From 6866a060bc48031ecc3b0f7c1c1e99f6961a4cb1 Mon Sep 17 00:00:00 2001 From: Adam <2363879+adamdotdevin@users.noreply.github.com> Date: Wed, 10 Dec 2025 06:26:24 -0600 Subject: wip(desktop): progress --- packages/ui/src/components/dialog.css | 11 ++- packages/ui/src/components/dialog.tsx | 2 +- packages/ui/src/components/input.css | 2 + packages/ui/src/components/select-dialog.css | 28 ++++-- packages/ui/src/components/select-dialog.tsx | 138 ++++++++++++++------------- 5 files changed, 101 insertions(+), 80 deletions(-) (limited to 'packages/ui/src/components') diff --git a/packages/ui/src/components/dialog.css b/packages/ui/src/components/dialog.css index 2ac0709dd..267c891f3 100644 --- a/packages/ui/src/components/dialog.css +++ b/packages/ui/src/components/dialog.css @@ -36,14 +36,14 @@ flex-direction: column; align-items: flex-start; align-self: stretch; - gap: 8px; width: 100%; max-height: 100%; + min-height: 280px; /* padding: 8px; */ - padding: 8px 8px 0 8px; + /* padding: 8px 8px 0 8px; */ border: 1px solid var(--border-base); - border-radius: var(--radius-md); + border-radius: var(--radius-xl); background: var(--surface-raised-stronger-non-alpha); box-shadow: 0 15px 45px 0 rgba(19, 16, 16, 0.22), @@ -58,8 +58,9 @@ [data-slot="dialog-header"] { display: flex; - height: 40px; - padding: 4px 4px 4px 8px; + /* height: 40px; */ + /* padding: 4px 4px 4px 8px; */ + padding: 20px; justify-content: space-between; align-items: center; flex-shrink: 0; diff --git a/packages/ui/src/components/dialog.tsx b/packages/ui/src/components/dialog.tsx index 4625482b5..a16705a57 100644 --- a/packages/ui/src/components/dialog.tsx +++ b/packages/ui/src/components/dialog.tsx @@ -79,7 +79,7 @@ function DialogDescription(props: DialogDescriptionProps & ComponentProps<"p">) } function DialogCloseButton(props: DialogCloseButtonProps & ComponentProps<"button">) { - return + return } export const Dialog = Object.assign(DialogRoot, { diff --git a/packages/ui/src/components/input.css b/packages/ui/src/components/input.css index 9e8a3b164..c5f8cb8c5 100644 --- a/packages/ui/src/components/input.css +++ b/packages/ui/src/components/input.css @@ -1,7 +1,9 @@ [data-component="input"] { + width: 100%; /* [data-slot="input-label"] {} */ [data-slot="input-input"] { + width: 100%; color: var(--text-strong); /* text-14-regular */ diff --git a/packages/ui/src/components/select-dialog.css b/packages/ui/src/components/select-dialog.css index 6263cee67..6b78639a8 100644 --- a/packages/ui/src/components/select-dialog.css +++ b/packages/ui/src/components/select-dialog.css @@ -1,3 +1,12 @@ +[data-slot="select-dialog-content"] { + width: 100%; + display: flex; + flex-direction: column; + overflow: hidden; + gap: 12px; + padding: 0 10px; +} + [data-component="select-dialog-input"] { display: flex; height: 40px; @@ -29,11 +38,11 @@ [data-component="select-dialog"] { display: flex; flex-direction: column; - gap: 8px; + gap: 12px; [data-slot="select-dialog-empty-state"] { display: flex; - padding: 32px 160px; + padding: 32px 0px; flex-direction: column; justify-content: center; align-items: center; @@ -63,25 +72,30 @@ } [data-slot="select-dialog-group"] { + position: relative; display: flex; flex-direction: column; gap: 4px; [data-slot="select-dialog-header"] { display: flex; - padding: 4px 8px; + height: 28px; + padding: 0 10px; justify-content: space-between; align-items: center; align-self: stretch; + background: var(--surface-raised-stronger-non-alpha); + position: sticky; + top: 0; - color: var(--text-weak); + color: var(--text-base); - /* text-12-medium */ + /* text-14-medium */ font-family: var(--font-family-sans); - font-size: var(--font-size-small); + font-size: 14px; font-style: normal; font-weight: var(--font-weight-medium); - line-height: var(--line-height-large); /* 166.667% */ + line-height: var(--line-height-large); /* 142.857% */ letter-spacing: var(--letter-spacing-normal); } diff --git a/packages/ui/src/components/select-dialog.tsx b/packages/ui/src/components/select-dialog.tsx index 2f2d3e414..bfc39508e 100644 --- a/packages/ui/src/components/select-dialog.tsx +++ b/packages/ui/src/components/select-dialog.tsx @@ -20,6 +20,7 @@ interface SelectDialogProps export function SelectDialog(props: SelectDialogProps) { const [dialog, others] = splitProps(props, ["trigger", "onOpenChange", "defaultOpen"]) let closeButton!: HTMLButtonElement + let inputRef: HTMLInputElement | undefined let scrollRef: HTMLDivElement | undefined const [store, setStore] = createStore({ mouseActive: false, @@ -87,77 +88,80 @@ export function SelectDialog(props: SelectDialogProps) { {others.title} - + - - - - handleInput(value)} - onKeyDown={handleKey} - placeholder={others.placeholder} - autofocus - spellcheck={false} - autocorrect="off" - autocomplete="off" - autocapitalize="off" - /> + + + + + handleInput(value)} + onKeyDown={handleKey} + placeholder={others.placeholder} + spellcheck={false} + autocorrect="off" + autocomplete="off" + autocapitalize="off" + /> + + + { + onInput("") + reset() + }} + /> + - - { - onInput("") - reset() - }} - /> - - - - 0} - fallback={ - - - {props.emptyMessage ?? "No search results"} for{" "} - "{filter()}" - - - } - > - - {(group) => ( - - - {group.category} - - - - {(item) => ( - handleSelect(item)} - onMouseMove={() => { - setStore("mouseActive", true) - setActive(others.key(item)) - }} - > - {others.children(item)} - - )} - + + 0} + fallback={ + + + {props.emptyMessage ?? "No search results"} for{" "} + "{filter()}" - )} - - - + } + > + + {(group) => ( + + + {group.category} + + + + {(item) => ( + handleSelect(item)} + onMouseMove={() => { + setStore("mouseActive", true) + setActive(others.key(item)) + }} + > + {others.children(item)} + + )} + + + + )} + + + + ) } -- cgit v1.2.3