From 8bcbfd63960120efa3cb770f8e07de1bb57e93b0 Mon Sep 17 00:00:00 2001 From: Adam <2363879+adamdotdevin@users.noreply.github.com> Date: Tue, 6 Jan 2026 15:21:00 -0600 Subject: wip(app): settings --- packages/ui/src/components/dialog.css | 16 ++++- packages/ui/src/components/dialog.tsx | 4 +- packages/ui/src/components/tabs.css | 122 ++++++++++++++++++++++++++++------ packages/ui/src/components/tabs.tsx | 9 ++- 4 files changed, 126 insertions(+), 25 deletions(-) (limited to 'packages/ui/src') diff --git a/packages/ui/src/components/dialog.css b/packages/ui/src/components/dialog.css index 177dc0a79..96e967a6f 100644 --- a/packages/ui/src/components/dialog.css +++ b/packages/ui/src/components/dialog.css @@ -30,6 +30,7 @@ flex-direction: column; align-items: center; justify-items: start; + overflow: visible; [data-slot="dialog-content"] { display: flex; @@ -39,6 +40,14 @@ width: 100%; max-height: 100%; min-height: 280px; + overflow: auto; + + /* Hide scrollbar */ + scrollbar-width: none; + -ms-overflow-style: none; + &::-webkit-scrollbar { + display: none; + } /* padding: 8px; */ /* padding: 8px 8px 0 8px; */ @@ -108,7 +117,7 @@ display: flex; flex-direction: column; flex: 1; - overflow-y: auto; + overflow: hidden; &:focus-visible { outline: none; @@ -129,6 +138,11 @@ } } } + + &[data-size="large"] [data-slot="dialog-container"] { + width: min(calc(100vw - 32px), 800px); + height: min(calc(100vh - 32px), 600px); + } } @keyframes overlayShow { diff --git a/packages/ui/src/components/dialog.tsx b/packages/ui/src/components/dialog.tsx index 797fbcbfc..1aff55030 100644 --- a/packages/ui/src/components/dialog.tsx +++ b/packages/ui/src/components/dialog.tsx @@ -6,6 +6,7 @@ export interface DialogProps extends ParentProps { title?: JSXElement description?: JSXElement action?: JSXElement + size?: "normal" | "large" class?: ComponentProps<"div">["class"] classList?: ComponentProps<"div">["classList"] fit?: boolean @@ -13,10 +14,11 @@ export interface DialogProps extends ParentProps { export function Dialog(props: DialogProps) { return ( -
+
{ - variant?: "normal" | "alt" + variant?: "normal" | "alt" | "settings" orientation?: "horizontal" | "vertical" } export interface TabsListProps extends ComponentProps {} @@ -106,8 +106,13 @@ function TabsContent(props: ParentProps) { ) } +const TabsSectionTitle: Component = (props) => { + return
{props.children}
+} + export const Tabs = Object.assign(TabsRoot, { List: TabsList, Trigger: TabsTrigger, Content: TabsContent, + SectionTitle: TabsSectionTitle, }) -- cgit v1.2.3