@adea-ai/ui 0.162.14 → 0.162.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/composites/accent-picker/accent-picker.js +1 -1
- package/dist/components/composites/accent-picker/accent-picker.js.map +1 -1
- package/dist/components/composites/accent-picker/custom-color-popover.js +1 -1
- package/dist/components/composites/accent-picker/custom-color-popover.js.map +1 -1
- package/dist/components/composites/appearance-editor/accent-swatch-groups.js +1 -1
- package/dist/components/composites/appearance-editor/accent-swatch-groups.js.map +1 -1
- package/dist/components/composites/appearance-editor/appearance-choices.d.ts.map +1 -1
- package/dist/components/composites/appearance-editor/appearance-choices.js +2 -2
- package/dist/components/composites/appearance-editor/appearance-choices.js.map +1 -1
- package/dist/components/composites/confirmation/confirmation.js +1 -1
- package/dist/components/composites/confirmation/confirmation.js.map +1 -1
- package/dist/components/composites/icon-picker/icon-picker.js +1 -1
- package/dist/components/composites/icon-picker/icon-picker.js.map +1 -1
- package/dist/components/composites/list-row/list-row-control.js +1 -1
- package/dist/components/composites/list-row/list-row-control.js.map +1 -1
- package/dist/components/composites/settings/settings.js +1 -1
- package/dist/components/composites/settings/settings.js.map +1 -1
- package/dist/components/composites/stack-trace/stack-trace.js +1 -1
- package/dist/components/composites/stack-trace/stack-trace.js.map +1 -1
- package/dist/components/composites/tree/tree.js +1 -1
- package/dist/components/composites/tree/tree.js.map +1 -1
- package/dist/components/composites/workspace-mark/workspace-mark.js +1 -1
- package/dist/components/composites/workspace-mark/workspace-mark.js.map +1 -1
- package/dist/components/conversation/thread-panel.js +1 -1
- package/dist/components/conversation/thread-panel.js.map +1 -1
- package/dist/components/layout/app-shell/skip-link.js +1 -1
- package/dist/components/layout/app-shell/skip-link.js.map +1 -1
- package/dist/components/layout/side-rail/side-rail.js +1 -1
- package/dist/components/layout/side-rail/side-rail.js.map +1 -1
- package/dist/components/layout/sidebar-nav/sidebar-nav-classes.js +1 -1
- package/dist/components/layout/sidebar-nav/sidebar-nav-classes.js.map +1 -1
- package/dist/components/layout/sidebar-nav/sidebar-nav.js +1 -1
- package/dist/components/layout/sidebar-nav/sidebar-nav.js.map +1 -1
- package/dist/components/layout/top-bar/top-bar.js +2 -2
- package/dist/components/layout/top-bar/top-bar.js.map +1 -1
- package/dist/components/ui/accordion/accordion.js +1 -1
- package/dist/components/ui/accordion/accordion.js.map +1 -1
- package/dist/components/ui/annotation-surface/annotation-surface.js +1 -1
- package/dist/components/ui/annotation-surface/annotation-surface.js.map +1 -1
- package/dist/components/ui/attachment/attachment.js +2 -2
- package/dist/components/ui/attachment/attachment.js.map +1 -1
- package/dist/components/ui/board/board.js +2 -2
- package/dist/components/ui/board/board.js.map +1 -1
- package/dist/components/ui/breadcrumb/breadcrumb.js +1 -1
- package/dist/components/ui/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/components/ui/button/button.js +1 -1
- package/dist/components/ui/button/button.js.map +1 -1
- package/dist/components/ui/checkbox/checkbox.js +1 -1
- package/dist/components/ui/checkbox/checkbox.js.map +1 -1
- package/dist/components/ui/collapsible/collapsible.js +1 -1
- package/dist/components/ui/collapsible/collapsible.js.map +1 -1
- package/dist/components/ui/combobox/combobox.js +3 -3
- package/dist/components/ui/combobox/combobox.js.map +1 -1
- package/dist/components/ui/field/field.js +2 -2
- package/dist/components/ui/field/field.js.map +1 -1
- package/dist/components/ui/input/input-control.js +1 -1
- package/dist/components/ui/input/input-control.js.map +1 -1
- package/dist/components/ui/input-group/input-group.js +1 -1
- package/dist/components/ui/input-group/input-group.js.map +1 -1
- package/dist/components/ui/input-otp/input-otp.js +1 -1
- package/dist/components/ui/input-otp/input-otp.js.map +1 -1
- package/dist/components/ui/menubar/menubar.js +1 -1
- package/dist/components/ui/menubar/menubar.js.map +1 -1
- package/dist/components/ui/native-select/native-select.js +1 -1
- package/dist/components/ui/native-select/native-select.js.map +1 -1
- package/dist/components/ui/pagination/pagination.js +1 -1
- package/dist/components/ui/pagination/pagination.js.map +1 -1
- package/dist/components/ui/questionnaire/questionnaire.js +1 -1
- package/dist/components/ui/questionnaire/questionnaire.js.map +1 -1
- package/dist/components/ui/radio-group/radio-group.js +2 -2
- package/dist/components/ui/radio-group/radio-group.js.map +1 -1
- package/dist/components/ui/scroll-area/scroll-area.js +1 -1
- package/dist/components/ui/scroll-area/scroll-area.js.map +1 -1
- package/dist/components/ui/select/select.js +1 -1
- package/dist/components/ui/select/select.js.map +1 -1
- package/dist/components/ui/slider/slider.js +1 -1
- package/dist/components/ui/slider/slider.js.map +1 -1
- package/dist/components/ui/switch/switch.js +1 -1
- package/dist/components/ui/switch/switch.js.map +1 -1
- package/dist/components/ui/tabs/tabs.js +1 -1
- package/dist/components/ui/tabs/tabs.js.map +1 -1
- package/dist/components/ui/text-link/text-link.js +1 -1
- package/dist/components/ui/text-link/text-link.js.map +1 -1
- package/dist/components/ui/textarea/textarea.js +1 -1
- package/dist/components/ui/textarea/textarea.js.map +1 -1
- package/dist/components/ui/toast/toast.js +1 -1
- package/dist/components/ui/toast/toast.js.map +1 -1
- package/dist/components/ui/trace/trace.js +1 -1
- package/dist/components/ui/trace/trace.js.map +1 -1
- package/dist/lib/overlay.d.ts.map +1 -1
- package/dist/lib/overlay.js +1 -1
- package/dist/lib/overlay.js.map +1 -1
- package/dist/lib/tokens.d.ts.map +1 -1
- package/dist/lib/tokens.js +2 -2
- package/dist/lib/tokens.js.map +1 -1
- package/dist/lib/variants.d.ts +1 -1
- package/dist/lib/variants.d.ts.map +1 -1
- package/dist/lib/variants.js +1 -1
- package/dist/lib/variants.js.map +1 -1
- package/dist/r/src/components/composites/accent-picker/accent-picker.tsx +1 -1
- package/dist/r/src/components/composites/accent-picker/custom-color-popover.tsx +1 -1
- package/dist/r/src/components/composites/appearance-editor/accent-swatch-groups.tsx +1 -1
- package/dist/r/src/components/composites/appearance-editor/appearance-choices.tsx +2 -5
- package/dist/r/src/components/composites/confirmation/confirmation.tsx +1 -1
- package/dist/r/src/components/composites/icon-picker/icon-picker.tsx +1 -1
- package/dist/r/src/components/composites/list-row/list-row-control.tsx +1 -1
- package/dist/r/src/components/composites/settings/settings.tsx +1 -1
- package/dist/r/src/components/composites/stack-trace/stack-trace.tsx +1 -1
- package/dist/r/src/components/composites/tree/tree.tsx +1 -1
- package/dist/r/src/components/composites/workspace-mark/workspace-mark.tsx +1 -1
- package/dist/r/src/components/conversation/thread-panel.tsx +1 -1
- package/dist/r/src/components/layout/app-shell/skip-link.tsx +1 -1
- package/dist/r/src/components/layout/side-rail/side-rail.tsx +1 -1
- package/dist/r/src/components/layout/sidebar-nav/sidebar-nav-classes.ts +1 -1
- package/dist/r/src/components/layout/sidebar-nav/sidebar-nav.tsx +1 -1
- package/dist/r/src/components/layout/top-bar/top-bar.tsx +2 -2
- package/dist/r/src/components/ui/accordion/accordion.tsx +1 -1
- package/dist/r/src/components/ui/annotation-surface/annotation-surface.tsx +1 -1
- package/dist/r/src/components/ui/attachment/attachment.tsx +2 -2
- package/dist/r/src/components/ui/board/board.tsx +2 -2
- package/dist/r/src/components/ui/breadcrumb/breadcrumb.tsx +1 -1
- package/dist/r/src/components/ui/button/button.tsx +1 -1
- package/dist/r/src/components/ui/checkbox/checkbox.tsx +1 -1
- package/dist/r/src/components/ui/collapsible/collapsible.tsx +1 -1
- package/dist/r/src/components/ui/combobox/combobox.tsx +3 -3
- package/dist/r/src/components/ui/field/field.tsx +2 -2
- package/dist/r/src/components/ui/input/input-control.tsx +1 -1
- package/dist/r/src/components/ui/input-group/input-group.tsx +1 -1
- package/dist/r/src/components/ui/input-otp/input-otp.tsx +1 -1
- package/dist/r/src/components/ui/menubar/menubar.tsx +1 -1
- package/dist/r/src/components/ui/native-select/native-select.tsx +1 -1
- package/dist/r/src/components/ui/pagination/pagination.tsx +1 -1
- package/dist/r/src/components/ui/questionnaire/questionnaire.tsx +1 -1
- package/dist/r/src/components/ui/radio-group/radio-group.tsx +2 -2
- package/dist/r/src/components/ui/scroll-area/scroll-area.tsx +1 -1
- package/dist/r/src/components/ui/select/select.tsx +1 -1
- package/dist/r/src/components/ui/slider/slider.tsx +1 -1
- package/dist/r/src/components/ui/switch/switch.tsx +1 -1
- package/dist/r/src/components/ui/tabs/tabs.tsx +1 -1
- package/dist/r/src/components/ui/text-link/text-link.tsx +1 -1
- package/dist/r/src/components/ui/textarea/textarea.tsx +1 -1
- package/dist/r/src/components/ui/toast/toast.tsx +1 -1
- package/dist/r/src/components/ui/trace/trace.tsx +1 -1
- package/dist/r/src/lib/overlay.ts +1 -1
- package/dist/r/src/lib/tokens.ts +4 -2
- package/dist/r/src/lib/variants.ts +1 -1
- package/dist/r/src/styles/base.css +35 -7
- package/dist/vite/tailwind-sources.d.ts.map +1 -1
- package/dist/vite/tailwind-sources.js +16 -5
- package/dist/vite/tailwind-sources.js.map +1 -1
- package/package.json +1 -1
- package/src/components/composites/accent-picker/accent-picker.tsx +1 -1
- package/src/components/composites/accent-picker/custom-color-popover.tsx +1 -1
- package/src/components/composites/appearance-editor/accent-swatch-groups.tsx +1 -1
- package/src/components/composites/appearance-editor/appearance-choices.tsx +2 -5
- package/src/components/composites/confirmation/confirmation.tsx +1 -1
- package/src/components/composites/icon-picker/icon-picker.tsx +1 -1
- package/src/components/composites/list-row/list-row-control.tsx +1 -1
- package/src/components/composites/settings/settings.tsx +1 -1
- package/src/components/composites/stack-trace/stack-trace.tsx +1 -1
- package/src/components/composites/tree/tree.tsx +1 -1
- package/src/components/composites/workspace-mark/workspace-mark.tsx +1 -1
- package/src/components/conversation/thread-panel.tsx +1 -1
- package/src/components/layout/app-shell/skip-link.tsx +1 -1
- package/src/components/layout/side-rail/side-rail.tsx +1 -1
- package/src/components/layout/sidebar-nav/sidebar-nav-classes.ts +1 -1
- package/src/components/layout/sidebar-nav/sidebar-nav.tsx +1 -1
- package/src/components/layout/top-bar/top-bar.tsx +2 -2
- package/src/components/ui/accordion/accordion.tsx +1 -1
- package/src/components/ui/annotation-surface/annotation-surface.tsx +1 -1
- package/src/components/ui/attachment/attachment.tsx +2 -2
- package/src/components/ui/board/board.tsx +2 -2
- package/src/components/ui/breadcrumb/breadcrumb.tsx +1 -1
- package/src/components/ui/button/button.tsx +1 -1
- package/src/components/ui/checkbox/checkbox.tsx +1 -1
- package/src/components/ui/collapsible/collapsible.tsx +1 -1
- package/src/components/ui/combobox/combobox.tsx +3 -3
- package/src/components/ui/field/field.tsx +2 -2
- package/src/components/ui/input/input-control.tsx +1 -1
- package/src/components/ui/input-group/input-group.tsx +1 -1
- package/src/components/ui/input-otp/input-otp.tsx +1 -1
- package/src/components/ui/menubar/menubar.tsx +1 -1
- package/src/components/ui/native-select/native-select.tsx +1 -1
- package/src/components/ui/pagination/pagination.tsx +1 -1
- package/src/components/ui/questionnaire/questionnaire.tsx +1 -1
- package/src/components/ui/radio-group/radio-group.tsx +2 -2
- package/src/components/ui/scroll-area/scroll-area.tsx +1 -1
- package/src/components/ui/select/select.tsx +1 -1
- package/src/components/ui/slider/slider.tsx +1 -1
- package/src/components/ui/switch/switch.tsx +1 -1
- package/src/components/ui/tabs/tabs.tsx +1 -1
- package/src/components/ui/text-link/text-link.tsx +1 -1
- package/src/components/ui/textarea/textarea.tsx +1 -1
- package/src/components/ui/toast/toast.tsx +1 -1
- package/src/components/ui/trace/trace.tsx +1 -1
- package/src/lib/overlay.ts +1 -1
- package/src/lib/tokens.ts +4 -2
- package/src/lib/variants.ts +1 -1
- package/src/styles/base.css +35 -7
- package/src/vite/tailwind-sources.ts +20 -3
|
@@ -183,7 +183,7 @@ export function IconPicker(props: IconPickerProps) {
|
|
|
183
183
|
'flex size-10 cursor-pointer items-center justify-center rounded-lg border border-border bg-card text-muted-foreground',
|
|
184
184
|
'transition-colors ease-out',
|
|
185
185
|
'hover:bg-surface-hover hover:text-foreground',
|
|
186
|
-
'has-focus-visible:border-ring has-focus-visible:
|
|
186
|
+
'has-focus-visible:border-ring has-focus-visible:focus-outline',
|
|
187
187
|
'has-checked:border-primary has-checked:bg-primary-subtle has-checked:text-primary',
|
|
188
188
|
'has-disabled:pointer-events-none has-disabled:opacity-50'
|
|
189
189
|
)}
|
|
@@ -87,7 +87,7 @@ export function ListRowControl<T extends ValidComponent = 'div'>(props: ListRowC
|
|
|
87
87
|
class={cn(
|
|
88
88
|
'group/row list-row-description flex min-w-0 items-center gap-2.5 rounded-md px-2 text-sm',
|
|
89
89
|
'transition-colors ease-out outline-none',
|
|
90
|
-
'focus-visible:border-ring focus-visible:
|
|
90
|
+
'focus-visible:border-ring focus-visible:focus-outline-inset',
|
|
91
91
|
{
|
|
92
92
|
'h-row-sm': local.dense && !local.description,
|
|
93
93
|
'h-row-md': !local.dense && !local.description,
|
|
@@ -37,7 +37,7 @@ function HelpTip(props: { label: string; help: string }) {
|
|
|
37
37
|
aria-describedby={tip.describedBy()}
|
|
38
38
|
onPointerEnter={tip.onPointerEnter}
|
|
39
39
|
onFocus={tip.onFocus}
|
|
40
|
-
class="inline-flex size-4 items-center justify-center rounded-full text-muted-foreground hover:text-foreground
|
|
40
|
+
class="inline-flex size-4 items-center justify-center rounded-full text-muted-foreground hover:text-foreground outline-none focus-visible:focus-outline"
|
|
41
41
|
>
|
|
42
42
|
<CircleHelp class="size-3.5" aria-hidden="true" />
|
|
43
43
|
</button>
|
|
@@ -98,7 +98,7 @@ const DETAIL_CHAR_LIMIT = 10_000
|
|
|
98
98
|
const rowClass =
|
|
99
99
|
'flex min-w-0 flex-wrap items-baseline gap-x-2 rounded-md px-1.5 py-0.5 text-start text-xs outline-none'
|
|
100
100
|
const interactiveClass =
|
|
101
|
-
'w-full cursor-pointer transition-colors ease-out hover:bg-muted/60 focus-visible:
|
|
101
|
+
'w-full cursor-pointer transition-colors ease-out hover:bg-muted/60 focus-visible:focus-outline-inset focus-visible:border-ring'
|
|
102
102
|
|
|
103
103
|
function omissionNote(lines: number, chars: number): string {
|
|
104
104
|
return lines > 0
|
|
@@ -593,7 +593,7 @@ export function TreeRow(props: TreeRowProps) {
|
|
|
593
593
|
data-expanded={local.item.expandable ? String(local.item.expanded) : undefined}
|
|
594
594
|
class={cn(
|
|
595
595
|
'group/tree-row flex min-h-row-sm w-full min-w-0 items-center gap-1.5 rounded-md pe-1.5 text-left text-sm outline-none transition-colors',
|
|
596
|
-
'focus-visible:border-ring focus-visible:
|
|
596
|
+
'focus-visible:border-ring focus-visible:focus-outline-inset',
|
|
597
597
|
{
|
|
598
598
|
// Guide lines are positioned against the row; without them it keeps its original classes.
|
|
599
599
|
relative: tree.guides(),
|
|
@@ -47,7 +47,7 @@ export function WorkspaceMark(props: WorkspaceMarkProps) {
|
|
|
47
47
|
'relative flex size-9 shrink-0 items-center justify-center rounded-lg border text-sm font-semibold',
|
|
48
48
|
'transition-[color,background-color,border-color,transform] ease-out outline-none select-none',
|
|
49
49
|
'hover:scale-105 active:scale-95',
|
|
50
|
-
'focus-visible:border-ring focus-visible:
|
|
50
|
+
'focus-visible:border-ring focus-visible:focus-outline',
|
|
51
51
|
'disabled:pointer-events-none disabled:opacity-50',
|
|
52
52
|
local.active
|
|
53
53
|
? 'border-primary bg-primary-subtle text-primary'
|
|
@@ -143,7 +143,7 @@ export function AttachmentCard(props: AttachmentCardProps) {
|
|
|
143
143
|
local.unavailable
|
|
144
144
|
? 'cursor-not-allowed opacity-60'
|
|
145
145
|
: 'hover:border-input hover:bg-surface-hover',
|
|
146
|
-
'focus-visible:border-ring focus-visible:
|
|
146
|
+
'focus-visible:border-ring focus-visible:focus-outline',
|
|
147
147
|
'[&_svg]:size-4 [&_svg]:shrink-0',
|
|
148
148
|
local.class
|
|
149
149
|
)}
|
|
@@ -23,7 +23,7 @@ export function SkipLink(props: ComponentProps<'a'>) {
|
|
|
23
23
|
'inline-flex items-center rounded-md border border-border bg-background',
|
|
24
24
|
'px-control-md py-2 text-sm font-medium text-foreground shadow-lg',
|
|
25
25
|
'underline decoration-2 underline-offset-2 outline-none transition-transform duration-150',
|
|
26
|
-
'focus:translate-y-0 focus-visible:border-ring focus-visible:
|
|
26
|
+
'focus:translate-y-0 focus-visible:border-ring focus-visible:focus-outline',
|
|
27
27
|
'motion-reduce:transition-none',
|
|
28
28
|
local.class
|
|
29
29
|
)}
|
|
@@ -158,7 +158,7 @@ const sideRailItemClass = [
|
|
|
158
158
|
'group/rail-item flex h-rail-item min-w-0 w-full items-center gap-2.5 rounded-md px-3 text-sm font-medium',
|
|
159
159
|
'group-data-[collapsed=true]/rail:justify-center group-data-[collapsed=true]/rail:px-0',
|
|
160
160
|
'transition-[color,background-color,transform] ease-out outline-none select-none',
|
|
161
|
-
'focus-visible:border-ring focus-visible:
|
|
161
|
+
'focus-visible:border-ring focus-visible:focus-outline-inset',
|
|
162
162
|
/*
|
|
163
163
|
* The donor's row scales up slightly under the pointer and down under a press.
|
|
164
164
|
* It is a CSS transform rather than a motion-library gesture because the two are
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
export const sidebarNavItemClass = [
|
|
6
6
|
'group/nav-item relative flex min-w-0 items-center gap-2.5 rounded-md px-3 py-2 text-sm font-medium',
|
|
7
7
|
'whitespace-nowrap transition-colors ease-out outline-none select-none [@media(any-pointer:coarse)]:min-h-11',
|
|
8
|
-
'focus-visible:border-ring focus-visible:
|
|
8
|
+
'focus-visible:border-ring focus-visible:focus-outline-inset',
|
|
9
9
|
'[&_svg]:size-4 [&_svg]:shrink-0',
|
|
10
10
|
].join(' ')
|
|
11
11
|
|
|
@@ -261,7 +261,7 @@ export function SidebarNavSection(props: SidebarNavSectionProps) {
|
|
|
261
261
|
trigger.onReorder?.(event.key === 'ArrowUp' ? 'up' : 'down')
|
|
262
262
|
}}
|
|
263
263
|
class={cn(
|
|
264
|
-
'flex min-w-0 flex-1 items-center gap-1.5 rounded-sm text-2xs font-medium tracking-wide uppercase outline-none transition-colors ease-out hover:text-sidebar-foreground focus-visible:border-ring focus-visible:
|
|
264
|
+
'flex min-w-0 flex-1 items-center gap-1.5 rounded-sm text-2xs font-medium tracking-wide uppercase outline-none transition-colors ease-out hover:text-sidebar-foreground focus-visible:border-ring focus-visible:focus-outline-inset [@media(any-pointer:coarse)]:min-h-11',
|
|
265
265
|
/* WCAG 2.5.8: the row's vertical padding sits on the header, so
|
|
266
266
|
the bare label would be a ~16px target. Stretch the button
|
|
267
267
|
across that padding; the row's height does not change. A
|
|
@@ -187,7 +187,7 @@ export function TopBarSearch(props: TopBarSearchProps) {
|
|
|
187
187
|
'text-muted-foreground flex h-control-md w-full min-w-(--control-height-md) items-center justify-center gap-2 rounded-md border border-input px-3 text-sm sm:justify-start',
|
|
188
188
|
'transition-colors ease-out outline-none',
|
|
189
189
|
'hover:bg-surface-hover hover:text-foreground',
|
|
190
|
-
'focus-visible:border-ring focus-visible:
|
|
190
|
+
'focus-visible:border-ring focus-visible:focus-outline',
|
|
191
191
|
'window-no-drag',
|
|
192
192
|
local.class
|
|
193
193
|
)}
|
|
@@ -222,7 +222,7 @@ export function TopBarPill(props: ComponentProps<'button'> & { label: string })
|
|
|
222
222
|
'text-muted-foreground inline-flex h-control-sm shrink-0 items-center gap-1.5 rounded-md border border-border px-2.5 text-xs font-medium',
|
|
223
223
|
'transition-colors ease-out outline-none',
|
|
224
224
|
'hover:border-input hover:text-foreground',
|
|
225
|
-
'focus-visible:border-ring focus-visible:
|
|
225
|
+
'focus-visible:border-ring focus-visible:focus-outline',
|
|
226
226
|
'window-no-drag [&_svg]:size-3.5 [&_svg]:shrink-0',
|
|
227
227
|
local.class
|
|
228
228
|
)}
|
|
@@ -74,7 +74,7 @@ export function AccordionTrigger(props: ComponentProps<typeof SdkAccordionTrigge
|
|
|
74
74
|
'group/accordion flex flex-1 items-center justify-between gap-2 py-3 text-left text-sm font-medium',
|
|
75
75
|
'transition-colors ease-out outline-none',
|
|
76
76
|
'hover:text-foreground',
|
|
77
|
-
'focus-visible:border-ring focus-visible:
|
|
77
|
+
'focus-visible:border-ring focus-visible:focus-outline',
|
|
78
78
|
'disabled:pointer-events-none disabled:opacity-50',
|
|
79
79
|
'data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
|
|
80
80
|
props.class as string
|
|
@@ -253,7 +253,7 @@ export function AnnotationSurface(props: AnnotationSurfaceProps) {
|
|
|
253
253
|
data-tool={local.tool}
|
|
254
254
|
data-dragging={dragging() ? 'true' : 'false'}
|
|
255
255
|
class={cn(
|
|
256
|
-
'dev-annotation-surface relative isolate block w-full aspect-video select-none overflow-hidden rounded-md border border-border bg-muted/20 text-muted-foreground outline-none focus-visible:border-ring focus-visible:
|
|
256
|
+
'dev-annotation-surface relative isolate block w-full aspect-video select-none overflow-hidden rounded-md border border-border bg-muted/20 text-muted-foreground outline-none focus-visible:border-ring focus-visible:focus-outline',
|
|
257
257
|
local.class
|
|
258
258
|
)}
|
|
259
259
|
ref={(element) => local.ref?.(element)}
|
|
@@ -153,7 +153,7 @@ export function Attachment(props: AttachmentProps) {
|
|
|
153
153
|
fallback={
|
|
154
154
|
<button
|
|
155
155
|
type="button"
|
|
156
|
-
class="min-w-0 truncate rounded-xs text-start font-medium outline-none hover:underline focus-visible:
|
|
156
|
+
class="min-w-0 truncate rounded-xs text-start font-medium outline-none hover:underline focus-visible:focus-outline"
|
|
157
157
|
title={local.name}
|
|
158
158
|
onClick={() => local.onOpen?.()}
|
|
159
159
|
>
|
|
@@ -165,7 +165,7 @@ export function Attachment(props: AttachmentProps) {
|
|
|
165
165
|
href={local.href}
|
|
166
166
|
target="_blank"
|
|
167
167
|
rel="noreferrer noopener"
|
|
168
|
-
class="min-w-0 truncate rounded-xs font-medium outline-none hover:underline focus-visible:
|
|
168
|
+
class="min-w-0 truncate rounded-xs font-medium outline-none hover:underline focus-visible:focus-outline"
|
|
169
169
|
title={local.name}
|
|
170
170
|
>
|
|
171
171
|
{local.name}
|
|
@@ -375,7 +375,7 @@ export function Board<T>(props: BoardProps<T>) {
|
|
|
375
375
|
cardElements.set(cardId, element)
|
|
376
376
|
}}
|
|
377
377
|
class={cn(
|
|
378
|
-
'relative shrink-0 cursor-grab rounded-md border border-border bg-card text-sm shadow-xs outline-none transition-colors hover:bg-surface-hover focus-visible:border-ring focus-visible:
|
|
378
|
+
'relative shrink-0 cursor-grab rounded-md border border-border bg-card text-sm shadow-xs outline-none transition-colors hover:bg-surface-hover focus-visible:border-ring focus-visible:focus-outline active:cursor-grabbing',
|
|
379
379
|
cardDragState[isDragging() ? 'dragging' : 'idle']
|
|
380
380
|
)}
|
|
381
381
|
// A board card is a control that can be moved, so it is
|
|
@@ -480,7 +480,7 @@ export function BoardCardTrigger(props: ComponentProps<'button'>) {
|
|
|
480
480
|
textVariants({ variant: 'label', tone: 'foreground' }),
|
|
481
481
|
'min-w-0 flex-1 truncate rounded-sm text-start outline-none',
|
|
482
482
|
'after:absolute after:inset-0 after:rounded-md',
|
|
483
|
-
'focus-visible:
|
|
483
|
+
'focus-visible:focus-outline',
|
|
484
484
|
local.class
|
|
485
485
|
)}
|
|
486
486
|
{...rest}
|
|
@@ -80,7 +80,7 @@ export function BreadcrumbLink(props: BreadcrumbLinkProps) {
|
|
|
80
80
|
data-slot="breadcrumb-link"
|
|
81
81
|
class={cn(
|
|
82
82
|
'rounded-sm transition-colors ease-out outline-none hover:text-foreground',
|
|
83
|
-
'focus-visible:border-ring focus-visible:
|
|
83
|
+
'focus-visible:border-ring focus-visible:focus-outline',
|
|
84
84
|
local.class
|
|
85
85
|
)}
|
|
86
86
|
href={local.href}
|
|
@@ -38,7 +38,7 @@ export const buttonVariants = cva(
|
|
|
38
38
|
secondary: 'bg-secondary text-secondary-foreground hover:bg-surface-hover',
|
|
39
39
|
/** For the action that destroys something. Never the default. */
|
|
40
40
|
destructive:
|
|
41
|
-
'bg-destructive-action text-destructive-action-foreground hover:bg-destructive-action/90
|
|
41
|
+
'bg-destructive-action text-destructive-action-foreground hover:bg-destructive-action/90',
|
|
42
42
|
/** A bordered button for a surface that already has a fill. */
|
|
43
43
|
outline:
|
|
44
44
|
'border border-border bg-transparent text-foreground hover:bg-surface-hover hover:border-input',
|
|
@@ -74,7 +74,7 @@ const controlClass = (className?: string) =>
|
|
|
74
74
|
cn(
|
|
75
75
|
'border-input bg-transparent flex size-4 shrink-0 items-center justify-center rounded-sm border',
|
|
76
76
|
'transition-[color,box-shadow,border-color,background-color] ease-out outline-none',
|
|
77
|
-
'peer-focus-visible:border-ring peer-focus-visible:
|
|
77
|
+
'peer-focus-visible:border-ring peer-focus-visible:focus-outline',
|
|
78
78
|
'data-[checked]:bg-primary data-[checked]:border-primary data-[checked]:text-primary-foreground',
|
|
79
79
|
'data-[indeterminate]:bg-primary data-[indeterminate]:border-primary data-[indeterminate]:text-primary-foreground',
|
|
80
80
|
'data-[invalid]:border-destructive data-[invalid]:ring-3 data-[invalid]:ring-destructive-subtle',
|
|
@@ -46,7 +46,7 @@ export function CollapsibleTrigger(props: ComponentProps<typeof SdkCollapsibleTr
|
|
|
46
46
|
class={cn(
|
|
47
47
|
'flex items-center gap-1.5 text-sm font-medium',
|
|
48
48
|
'transition-colors ease-out outline-none',
|
|
49
|
-
'focus-visible:border-ring focus-visible:
|
|
49
|
+
'focus-visible:border-ring focus-visible:focus-outline',
|
|
50
50
|
'disabled:pointer-events-none disabled:opacity-50',
|
|
51
51
|
'data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
|
|
52
52
|
props.class as string
|
|
@@ -302,7 +302,7 @@ export function ComboboxControl(props: ComponentProps<'div'>) {
|
|
|
302
302
|
class={cn(
|
|
303
303
|
'border-input bg-transparent flex h-control-md w-full items-center gap-1.5 rounded-md border px-control-sm',
|
|
304
304
|
'transition-[color,box-shadow,border-color] ease-out',
|
|
305
|
-
'focus-within:border-ring focus-within:
|
|
305
|
+
'focus-within:border-ring focus-within:focus-outline',
|
|
306
306
|
'data-[invalid]:border-destructive data-[invalid]:ring-3 data-[invalid]:ring-destructive-subtle',
|
|
307
307
|
'data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50',
|
|
308
308
|
props.class
|
|
@@ -365,7 +365,7 @@ export function ComboboxTrigger(props: ComponentProps<'button'>) {
|
|
|
365
365
|
class={cn(
|
|
366
366
|
'text-muted-foreground flex shrink-0 items-center justify-center rounded-sm outline-none',
|
|
367
367
|
'transition-colors ease-out hover:text-foreground',
|
|
368
|
-
'focus-visible:border-ring focus-visible:
|
|
368
|
+
'focus-visible:border-ring focus-visible:focus-outline',
|
|
369
369
|
'disabled:pointer-events-none disabled:opacity-50',
|
|
370
370
|
props.class
|
|
371
371
|
)}
|
|
@@ -482,7 +482,7 @@ export function ComboboxClear(props: { class?: string; onClear: () => void }) {
|
|
|
482
482
|
class={cn(
|
|
483
483
|
'text-muted-foreground flex size-4 shrink-0 items-center justify-center rounded-sm',
|
|
484
484
|
'transition-colors ease-out outline-none hover:text-foreground',
|
|
485
|
-
'focus-visible:border-ring focus-visible:
|
|
485
|
+
'focus-visible:border-ring focus-visible:focus-outline',
|
|
486
486
|
props.class
|
|
487
487
|
)}
|
|
488
488
|
>
|
|
@@ -262,7 +262,7 @@ export function FieldInput(props: ComponentProps<typeof SdkInput>) {
|
|
|
262
262
|
'h-control-md w-full min-w-0 rounded-md border border-input bg-transparent px-control-md py-1 text-sm',
|
|
263
263
|
'transition-[color,box-shadow,border-color] ease-out outline-none',
|
|
264
264
|
'placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground',
|
|
265
|
-
'focus-visible:border-ring focus-visible:
|
|
265
|
+
'focus-visible:border-ring focus-visible:focus-outline',
|
|
266
266
|
'aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive-subtle',
|
|
267
267
|
'disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50',
|
|
268
268
|
props.class as string | undefined
|
|
@@ -281,7 +281,7 @@ export function FieldTextArea(props: ComponentProps<typeof SdkTextarea>) {
|
|
|
281
281
|
'flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-control-md py-2 text-sm',
|
|
282
282
|
'transition-[color,box-shadow,border-color] ease-out outline-none resize-y',
|
|
283
283
|
'placeholder:text-muted-foreground',
|
|
284
|
-
'focus-visible:border-ring focus-visible:
|
|
284
|
+
'focus-visible:border-ring focus-visible:focus-outline',
|
|
285
285
|
'aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive-subtle',
|
|
286
286
|
'disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50',
|
|
287
287
|
props.class as string | undefined
|
|
@@ -26,7 +26,7 @@ const inputBase = [
|
|
|
26
26
|
'file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground',
|
|
27
27
|
/* A pointer click on a text field is a typing affordance, so the ring
|
|
28
28
|
appears where the user agent already matches :focus-visible. */
|
|
29
|
-
'focus-visible:border-ring focus-visible:
|
|
29
|
+
'focus-visible:border-ring focus-visible:focus-outline',
|
|
30
30
|
'aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive-subtle',
|
|
31
31
|
'disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50',
|
|
32
32
|
'read-only:bg-surface-hover',
|
|
@@ -54,7 +54,7 @@ export function InputGroup(props: InputGroupProps) {
|
|
|
54
54
|
'has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:items-stretch',
|
|
55
55
|
'has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:items-stretch',
|
|
56
56
|
'transition-[color,box-shadow,border-color] ease-out',
|
|
57
|
-
'focus-within:border-ring focus-within:
|
|
57
|
+
'focus-within:border-ring focus-within:focus-outline',
|
|
58
58
|
'has-[[aria-invalid=true]]:border-destructive has-[[aria-invalid=true]]:ring-3 has-[[aria-invalid=true]]:ring-destructive-subtle',
|
|
59
59
|
'has-[input:disabled]:cursor-not-allowed has-[input:disabled]:opacity-50',
|
|
60
60
|
'has-[textarea:disabled]:cursor-not-allowed has-[textarea:disabled]:opacity-50',
|
|
@@ -104,7 +104,7 @@ export function InputOtp(props: InputOtpProps) {
|
|
|
104
104
|
class={cn(
|
|
105
105
|
'border-input bg-transparent flex size-10 items-center justify-center rounded-md border text-sm font-medium',
|
|
106
106
|
'transition-[color,box-shadow,border-color] ease-out',
|
|
107
|
-
'data-[active]:border-ring data-[active]:
|
|
107
|
+
'data-[active]:border-ring data-[active]:focus-outline',
|
|
108
108
|
'data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50'
|
|
109
109
|
)}
|
|
110
110
|
/>
|
|
@@ -117,7 +117,7 @@ export function MenubarTrigger(props: MenubarTriggerProps) {
|
|
|
117
117
|
'transition-colors ease-out outline-none',
|
|
118
118
|
'data-[expanded]:bg-surface-active',
|
|
119
119
|
'data-[highlighted]:bg-surface-hover',
|
|
120
|
-
'focus-visible:border-ring focus-visible:
|
|
120
|
+
'focus-visible:border-ring focus-visible:focus-outline',
|
|
121
121
|
props.class
|
|
122
122
|
)}
|
|
123
123
|
/>
|
|
@@ -158,7 +158,7 @@ export function NativeSelect(props: NativeSelectProps) {
|
|
|
158
158
|
'h-control-lg px-control-lg pr-9 text-sm': local.size === 'lg',
|
|
159
159
|
},
|
|
160
160
|
'transition-[color,box-shadow,border-color] ease-out outline-none',
|
|
161
|
-
'focus-visible:border-ring focus-visible:
|
|
161
|
+
'focus-visible:border-ring focus-visible:focus-outline',
|
|
162
162
|
'aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive-subtle',
|
|
163
163
|
'disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 dark:bg-input/30',
|
|
164
164
|
local.class
|
|
@@ -74,7 +74,7 @@ const paginationControl = cn(
|
|
|
74
74
|
'inline-flex h-control-md min-w-(--control-height-md) items-center justify-center gap-1 rounded-md border border-transparent px-2 text-sm tabular-nums',
|
|
75
75
|
'transition-colors ease-out outline-none select-none',
|
|
76
76
|
'hover:bg-surface-hover',
|
|
77
|
-
'focus-visible:border-ring focus-visible:
|
|
77
|
+
'focus-visible:border-ring focus-visible:focus-outline',
|
|
78
78
|
'disabled:pointer-events-none disabled:opacity-50',
|
|
79
79
|
// A step at its end is `aria-disabled` and stays focusable, so it never
|
|
80
80
|
// matches `:disabled`; it takes the same look from `data-disabled`.
|
|
@@ -239,7 +239,7 @@ export function Questionnaire(props: QuestionnaireProps) {
|
|
|
239
239
|
// Not a tab stop: only the landing place for focus when a control goes away.
|
|
240
240
|
tabindex="-1"
|
|
241
241
|
class={cn(
|
|
242
|
-
'flex w-full max-w-xl min-w-0 flex-col gap-3 rounded-xl border bg-card p-4 outline-none focus-visible:
|
|
242
|
+
'flex w-full max-w-xl min-w-0 flex-col gap-3 rounded-xl border bg-card p-4 outline-none focus-visible:focus-outline',
|
|
243
243
|
{
|
|
244
244
|
'border-border': settled(),
|
|
245
245
|
'border-ring': !settled(),
|
|
@@ -201,7 +201,7 @@ export function RadioGroupItem(props: RadioGroupItemProps) {
|
|
|
201
201
|
'relative rounded-lg border border-border bg-card px-3 py-2.5 transition-[color,box-shadow,border-color,background-color] ease-out hover:bg-surface-hover data-[checked]:border-primary data-[disabled]:cursor-not-allowed data-[disabled]:hover:bg-card':
|
|
202
202
|
card(),
|
|
203
203
|
// The radio button is what takes focus; the card rings while it has it.
|
|
204
|
-
'has-[[data-slot=radio]:focus-visible]:border-ring has-[[data-slot=radio]:focus-visible]:
|
|
204
|
+
'has-[[data-slot=radio]:focus-visible]:border-ring has-[[data-slot=radio]:focus-visible]:focus-outline':
|
|
205
205
|
card(),
|
|
206
206
|
},
|
|
207
207
|
props.class
|
|
@@ -226,7 +226,7 @@ export function RadioGroupItem(props: RadioGroupItemProps) {
|
|
|
226
226
|
class={cn(
|
|
227
227
|
'border-input bg-transparent flex size-4 shrink-0 items-center justify-center rounded-full border',
|
|
228
228
|
'transition-[color,box-shadow,border-color,background-color] ease-out outline-none',
|
|
229
|
-
'focus-visible:border-ring focus-visible:
|
|
229
|
+
'focus-visible:border-ring focus-visible:focus-outline',
|
|
230
230
|
'data-[checked]:border-primary data-[checked]:text-primary',
|
|
231
231
|
'data-[invalid]:border-destructive data-[invalid]:ring-3 data-[invalid]:ring-destructive-subtle',
|
|
232
232
|
'data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50',
|
|
@@ -43,7 +43,7 @@ export function ScrollArea(props: ScrollAreaProps) {
|
|
|
43
43
|
*/
|
|
44
44
|
tabindex={local.tabindex ?? 0}
|
|
45
45
|
class={cn(
|
|
46
|
-
'relative min-h-0 min-w-0 outline-none focus-visible:
|
|
46
|
+
'relative min-h-0 min-w-0 outline-none focus-visible:focus-outline-inset',
|
|
47
47
|
{
|
|
48
48
|
'overflow-y-auto overflow-x-hidden':
|
|
49
49
|
local.orientation === 'vertical' || local.orientation === undefined,
|
|
@@ -300,7 +300,7 @@ export function SelectTrigger(props: SelectTriggerProps) {
|
|
|
300
300
|
'whitespace-nowrap transition-[color,box-shadow,border-color] ease-out outline-none',
|
|
301
301
|
'data-[placeholder-shown]:text-muted-foreground',
|
|
302
302
|
'hover:border-input',
|
|
303
|
-
'focus-visible:border-ring focus-visible:
|
|
303
|
+
'focus-visible:border-ring focus-visible:focus-outline',
|
|
304
304
|
'aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive-subtle',
|
|
305
305
|
'disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50',
|
|
306
306
|
'*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2',
|
|
@@ -136,7 +136,7 @@ export function Slider(props: SliderProps) {
|
|
|
136
136
|
'border-primary bg-background block size-4 shrink-0 rounded-full border-2 shadow-xs',
|
|
137
137
|
'transition-[color,box-shadow] ease-out outline-none',
|
|
138
138
|
'hover:ring-4 hover:ring-primary-subtle',
|
|
139
|
-
'has-[:focus-visible]:
|
|
139
|
+
'has-[:focus-visible]:focus-outline',
|
|
140
140
|
props.thumbClass
|
|
141
141
|
)}
|
|
142
142
|
>
|
|
@@ -62,7 +62,7 @@ const switchControlClass = (className?: string) =>
|
|
|
62
62
|
cn(
|
|
63
63
|
'bg-input inline-flex h-5 w-9 shrink-0 items-center rounded-full border border-transparent',
|
|
64
64
|
'transition-colors ease-out outline-none',
|
|
65
|
-
'peer-focus-visible:border-ring peer-focus-visible:
|
|
65
|
+
'peer-focus-visible:border-ring peer-focus-visible:focus-outline',
|
|
66
66
|
'data-[checked]:bg-primary',
|
|
67
67
|
'data-[invalid]:border-destructive',
|
|
68
68
|
'data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50',
|
|
@@ -211,7 +211,7 @@ export function TabsTrigger(props: TabsTriggerProps) {
|
|
|
211
211
|
class={cn(
|
|
212
212
|
'inline-flex shrink-0 items-center justify-center gap-1.5 whitespace-nowrap text-sm font-medium',
|
|
213
213
|
'transition-colors ease-out outline-none select-none',
|
|
214
|
-
'focus-visible:border-ring focus-visible:
|
|
214
|
+
'focus-visible:border-ring focus-visible:focus-outline',
|
|
215
215
|
'disabled:pointer-events-none disabled:opacity-50',
|
|
216
216
|
'data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
|
|
217
217
|
'text-foreground',
|
|
@@ -18,7 +18,7 @@ export function TextLink(props: ComponentProps<'a'>) {
|
|
|
18
18
|
class={cn(
|
|
19
19
|
'rounded-sm text-foreground underline decoration-primary underline-offset-4',
|
|
20
20
|
'transition-colors ease-out hover:decoration-foreground outline-none',
|
|
21
|
-
'focus-visible:border-ring focus-visible:
|
|
21
|
+
'focus-visible:border-ring focus-visible:focus-outline',
|
|
22
22
|
'motion-reduce:transition-none',
|
|
23
23
|
local.class
|
|
24
24
|
)}
|
|
@@ -11,7 +11,7 @@ export const textareaVariants = cva(
|
|
|
11
11
|
'transition-[color,box-shadow,border-color] ease-out outline-none',
|
|
12
12
|
'placeholder:text-muted-foreground',
|
|
13
13
|
'selection:bg-primary selection:text-primary-foreground',
|
|
14
|
-
'focus-visible:border-ring focus-visible:
|
|
14
|
+
'focus-visible:border-ring focus-visible:focus-outline',
|
|
15
15
|
'aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive-subtle',
|
|
16
16
|
'disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50',
|
|
17
17
|
],
|
|
@@ -175,7 +175,7 @@ function ToastCard(props: { toast: ToastData<JSX.Element> }) {
|
|
|
175
175
|
</div>
|
|
176
176
|
<UiToastClose
|
|
177
177
|
aria-label="Dismiss notification"
|
|
178
|
-
class="text-muted-foreground shrink-0 rounded-sm p-0.5 transition-colors ease-out outline-none hover:text-foreground focus-visible:border-ring focus-visible:
|
|
178
|
+
class="text-muted-foreground shrink-0 rounded-sm p-0.5 transition-colors ease-out outline-none hover:text-foreground focus-visible:border-ring focus-visible:focus-outline"
|
|
179
179
|
>
|
|
180
180
|
<X class="size-3.5" />
|
|
181
181
|
</UiToastClose>
|
|
@@ -281,7 +281,7 @@ function LineHead(props: {
|
|
|
281
281
|
const lineClass =
|
|
282
282
|
'flex min-h-control-xs w-full min-w-0 items-center gap-2 rounded-md px-1.5 py-0.5 text-start outline-none'
|
|
283
283
|
const interactiveClass =
|
|
284
|
-
'cursor-pointer transition-colors ease-out hover:bg-muted/60 focus-visible:
|
|
284
|
+
'cursor-pointer transition-colors ease-out hover:bg-muted/60 focus-visible:focus-outline-inset focus-visible:border-ring'
|
|
285
285
|
|
|
286
286
|
export function TraceLine(props: TraceLineProps) {
|
|
287
287
|
const local = props
|
package/src/lib/overlay.ts
CHANGED
|
@@ -75,7 +75,7 @@ export const overlayDescription = 'text-muted-foreground text-sm'
|
|
|
75
75
|
export const overlayCornerClose =
|
|
76
76
|
'absolute top-3.5 end-3.5 rounded-md p-1 text-muted-foreground ' +
|
|
77
77
|
'transition-colors ease-out hover:bg-surface-hover hover:text-foreground ' +
|
|
78
|
-
'focus-visible:border-ring focus-visible:
|
|
78
|
+
'focus-visible:border-ring focus-visible:focus-outline outline-none'
|
|
79
79
|
|
|
80
80
|
/**
|
|
81
81
|
* The tip: shadcn's inverted chip, foreground on background, so an explanation
|
package/src/lib/tokens.ts
CHANGED
|
@@ -161,7 +161,8 @@ export const colorTokens: TokenDefinition[] = [
|
|
|
161
161
|
name: 'primary-subtle',
|
|
162
162
|
kind: 'color',
|
|
163
163
|
themed: true,
|
|
164
|
-
description:
|
|
164
|
+
description:
|
|
165
|
+
'Tinted primary fill: selected rows, subtle buttons. Never a focus cue: it is below 3:1.',
|
|
165
166
|
},
|
|
166
167
|
|
|
167
168
|
{
|
|
@@ -276,7 +277,8 @@ export const colorTokens: TokenDefinition[] = [
|
|
|
276
277
|
name: 'ring',
|
|
277
278
|
kind: 'color',
|
|
278
279
|
themed: true,
|
|
279
|
-
description:
|
|
280
|
+
description:
|
|
281
|
+
'The focus indicator, drawn by the `focus-outline` and `focus-ring` utilities as a solid 2px outline. Held to 3:1 on the canvas.',
|
|
280
282
|
},
|
|
281
283
|
|
|
282
284
|
// Theme-invariant glass
|
package/src/lib/variants.ts
CHANGED
|
@@ -59,7 +59,7 @@ export type ControlSize = (typeof controlSizes)[number]
|
|
|
59
59
|
* a different state.
|
|
60
60
|
*/
|
|
61
61
|
export const controlInteractive =
|
|
62
|
-
'transition-colors ease-out outline-none focus-visible:border-ring focus-visible:
|
|
62
|
+
'transition-colors ease-out outline-none focus-visible:border-ring focus-visible:focus-outline disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50'
|
|
63
63
|
|
|
64
64
|
/** The shared focus treatment for surfaces that are not focusable controls. */
|
|
65
65
|
export const surfaceInteractive = 'transition-colors ease-out outline-none'
|
package/src/styles/base.css
CHANGED
|
@@ -249,6 +249,35 @@
|
|
|
249
249
|
border-width: 0;
|
|
250
250
|
}
|
|
251
251
|
|
|
252
|
+
/**
|
|
253
|
+
* The keyboard focus indicator, applied under a focus variant
|
|
254
|
+
* (`focus-visible:focus-outline`, `peer-focus-visible:focus-outline`, ...) by a
|
|
255
|
+
* control that sets `outline-none` and draws its focus on a painted part or a
|
|
256
|
+
* wrapper.
|
|
257
|
+
*
|
|
258
|
+
* The same solid 2px `--ring` outline as the global `:focus-visible` rule below.
|
|
259
|
+
* `--ring` is held to 3:1 against the canvas in both appearances and every
|
|
260
|
+
* accent (tests/focus-ring.test.ts), the WCAG 2.4.7 / 1.4.11 floor for a focus
|
|
261
|
+
* cue. The halo it replaces, a 3px box-shadow in `primary-subtle` (a 10-16% tint
|
|
262
|
+
* of the primary), never reached that floor. The offset keeps the cue legible
|
|
263
|
+
* next to a primary fill, and an outline, unlike a box-shadow, survives
|
|
264
|
+
* forced-colours mode.
|
|
265
|
+
*/
|
|
266
|
+
@utility focus-outline {
|
|
267
|
+
outline: 2px solid var(--color-ring);
|
|
268
|
+
outline-offset: 2px;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* `focus-outline` drawn inside the edge, for full-width rows and scroll regions
|
|
273
|
+
* that sit flush against a clipping container, where an outset ring would be cut
|
|
274
|
+
* off.
|
|
275
|
+
*/
|
|
276
|
+
@utility focus-outline-inset {
|
|
277
|
+
outline: 2px solid var(--color-ring);
|
|
278
|
+
outline-offset: -2px;
|
|
279
|
+
}
|
|
280
|
+
|
|
252
281
|
/**
|
|
253
282
|
* Reverses `visually-hidden` at a breakpoint, for a label that is only visible
|
|
254
283
|
* when there is room for it. Written as a companion because the two rules have
|
|
@@ -540,17 +569,16 @@
|
|
|
540
569
|
-webkit-backdrop-filter: blur(2px);
|
|
541
570
|
}
|
|
542
571
|
|
|
543
|
-
/* The focus ring
|
|
544
|
-
|
|
572
|
+
/* The focus ring as one class, for a part that takes no variant prefix (a
|
|
573
|
+
dialog or drawer close). The `focus-outline` indicator on `:focus-visible`;
|
|
574
|
+
an outline follows the element's own radius. */
|
|
545
575
|
@utility focus-ring {
|
|
546
|
-
transition:
|
|
547
|
-
border-color var(--duration-normal) var(--ease-out),
|
|
548
|
-
box-shadow var(--duration-normal) var(--ease-out);
|
|
576
|
+
transition: border-color var(--duration-normal) var(--ease-out);
|
|
549
577
|
|
|
550
578
|
&:focus-visible {
|
|
551
|
-
outline: none;
|
|
552
579
|
border-color: var(--ring);
|
|
553
|
-
|
|
580
|
+
outline: 2px solid var(--color-ring);
|
|
581
|
+
outline-offset: 2px;
|
|
554
582
|
}
|
|
555
583
|
}
|
|
556
584
|
|
|
@@ -70,17 +70,34 @@ const defaultLabel = 'ui-tailwind-sources'
|
|
|
70
70
|
* nested walk (the check inside a generation) shares it, while an independent walk that overlaps
|
|
71
71
|
* it (a hot update, or a second call after a file changed) starts with its own, and a later walk
|
|
72
72
|
* never reads an earlier answer.
|
|
73
|
+
*
|
|
74
|
+
* The memo ends with its walk. Anything async the walk started that outlives it (a resolver's
|
|
75
|
+
* cached promise, a timer) keeps the walk's async context, and with it the store. Left filled,
|
|
76
|
+
* every walk's parsed copy of the whole graph stayed reachable: in a dev server, where every hot
|
|
77
|
+
* update walks again, the heap grew by the size of the graph per edit until it ran out. A walk
|
|
78
|
+
* started later from such a captured context gets a memo of its own, not the finished one.
|
|
73
79
|
*/
|
|
74
80
|
interface WalkMemo {
|
|
75
81
|
realpaths: Map<string, string>
|
|
76
82
|
modules: Map<string, ParsedModule>
|
|
83
|
+
finished: boolean
|
|
77
84
|
}
|
|
78
85
|
const walkMemoStore = new AsyncLocalStorage<WalkMemo>()
|
|
79
|
-
const currentWalkMemo = (): WalkMemo | undefined =>
|
|
86
|
+
const currentWalkMemo = (): WalkMemo | undefined => {
|
|
87
|
+
const memo = walkMemoStore.getStore()
|
|
88
|
+
return memo && !memo.finished ? memo : undefined
|
|
89
|
+
}
|
|
80
90
|
|
|
81
|
-
function withWalkMemo<T>(walk: () => Promise<T>): Promise<T> {
|
|
91
|
+
async function withWalkMemo<T>(walk: () => Promise<T>): Promise<T> {
|
|
82
92
|
if (currentWalkMemo()) return walk()
|
|
83
|
-
|
|
93
|
+
const memo: WalkMemo = { realpaths: new Map(), modules: new Map(), finished: false }
|
|
94
|
+
try {
|
|
95
|
+
return await walkMemoStore.run(memo, walk)
|
|
96
|
+
} finally {
|
|
97
|
+
memo.finished = true
|
|
98
|
+
memo.realpaths.clear()
|
|
99
|
+
memo.modules.clear()
|
|
100
|
+
}
|
|
84
101
|
}
|
|
85
102
|
|
|
86
103
|
function modulePath(id: string): string {
|