@aleph-alpha/ui-library 5.3.0 → 5.3.1
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/system/components/UiTooltip/UiTooltip.vue.d.ts +1 -0
- package/dist/system/components/UiTooltip/types.d.ts +8 -0
- package/dist/system/components/core/tooltip/TooltipContent.vue.d.ts +2 -0
- package/dist/system/lib.js +3148 -3137
- package/dist/system/patterns/UiFloatActions/UiFloatActions.vue.d.ts +3 -1
- package/docs/public-docs/quick-start.md +43 -0
- package/package.json +1 -1
- package/src/components/UiAccordion/UiAccordion.stories.ts +2 -2
- package/src/components/UiAutocomplete/UiAutocomplete.stories.ts +2 -2
- package/src/components/UiAutocomplete/UiAutocomplete.vue +3 -3
- package/src/components/UiBadge/UiBadge.stories.ts +9 -9
- package/src/components/UiDropdownMenu/UiDropdownMenu.stories.ts +4 -4
- package/src/components/UiField/UiField.stories.ts +6 -6
- package/src/components/UiInput/UiInput.vue +1 -1
- package/src/components/UiKbd/UiKbd.stories.ts +3 -3
- package/src/components/UiKbd/UiKbd.vue +1 -1
- package/src/components/UiNavigationMenu/UiNavigationMenu.stories.ts +28 -28
- package/src/components/UiPopover/UiPopover.stories.ts +20 -20
- package/src/components/UiRadioGroup/UiRadioGroup.stories.ts +24 -24
- package/src/components/UiResizable/UiResizable.stories.ts +14 -14
- package/src/components/UiSelect/UiSelect.stories.ts +1 -1
- package/src/components/UiSheet/UiSheet.stories.ts +14 -14
- package/src/components/UiSlider/UiSlider.stories.ts +8 -8
- package/src/components/UiSpinner/UiSpinner.stories.ts +8 -8
- package/src/components/UiSwitch/UiSwitch.stories.ts +4 -4
- package/src/components/UiTabs/UiTabs.stories.ts +46 -46
- package/src/components/UiToggleGroup/UiToggleGroup.stories.ts +14 -14
- package/src/components/UiTooltip/UiTooltip.vue +2 -0
- package/src/components/UiTooltip/types.ts +9 -0
- package/src/components/core/accordion/AccordionContent.vue +1 -1
- package/src/components/core/accordion/AccordionTrigger.vue +1 -1
- package/src/components/core/alert/AlertDescription.vue +1 -1
- package/src/components/core/alert/index.ts +1 -1
- package/src/components/core/calendar/Calendar.vue +4 -4
- package/src/components/core/calendar/CalendarCell.vue +1 -1
- package/src/components/core/drawer/DrawerDescription.vue +1 -1
- package/src/components/core/dropdown-menu/DropdownMenuCheckboxItem.vue +1 -1
- package/src/components/core/dropdown-menu/DropdownMenuItem.vue +1 -1
- package/src/components/core/dropdown-menu/DropdownMenuLabel.vue +1 -3
- package/src/components/core/dropdown-menu/DropdownMenuRadioItem.vue +1 -1
- package/src/components/core/dropdown-menu/DropdownMenuShortcut.vue +4 -1
- package/src/components/core/dropdown-menu/DropdownMenuSubTrigger.vue +1 -1
- package/src/components/core/field/FieldDescription.vue +1 -1
- package/src/components/core/field/FieldLegend.vue +2 -2
- package/src/components/core/field/FieldSeparator.vue +1 -1
- package/src/components/core/input/Input.vue +1 -1
- package/src/components/core/item/index.ts +1 -1
- package/src/components/core/label/Label.vue +1 -1
- package/src/components/core/listbox/ListboxFilter.vue +1 -1
- package/src/components/core/listbox/ListboxGroupLabel.vue +1 -1
- package/src/components/core/listbox/ListboxItem.vue +1 -1
- package/src/components/core/native-select/NativeSelect.vue +1 -1
- package/src/components/core/navigation-menu/NavigationMenuLink.vue +1 -1
- package/src/components/core/navigation-menu/index.ts +1 -1
- package/src/components/core/range-calendar/RangeCalendarCell.vue +1 -1
- package/src/components/core/select/SelectItem.vue +1 -1
- package/src/components/core/select/SelectLabel.vue +3 -1
- package/src/components/core/select/SelectTrigger.vue +1 -1
- package/src/components/core/sidebar/SidebarGroupContent.vue +1 -1
- package/src/components/core/sidebar/SidebarGroupLabel.vue +1 -1
- package/src/components/core/sidebar/SidebarMenuBadge.vue +1 -1
- package/src/components/core/sidebar/SidebarMenuSubButton.vue +2 -2
- package/src/components/core/sidebar/index.ts +4 -4
- package/src/components/core/slider/Slider.vue +3 -3
- package/src/components/core/stepper/StepperDescription.vue +1 -1
- package/src/components/core/table/Table.vue +1 -1
- package/src/components/core/table/TableEmpty.vue +1 -1
- package/src/components/core/tabs/TabsTrigger.vue +1 -1
- package/src/components/core/tags-input/TagsInput.vue +1 -1
- package/src/components/core/tags-input/TagsInputItem.vue +1 -1
- package/src/components/core/textarea/Textarea.vue +1 -1
- package/src/components/core/toggle/index.ts +1 -1
- package/src/components/core/toggle-group/index.ts +1 -1
- package/src/components/core/tooltip/TooltipContent.vue +10 -4
- package/src/lib/useDrag.stories.ts +12 -12
- package/src/patterns/UiDatePicker/UiDatePicker.stories.ts +8 -8
- package/src/patterns/UiFloatActions/UiFloatActionItems.vue +9 -3
- package/src/patterns/UiFloatActions/UiFloatActions.stories.ts +159 -26
- package/src/patterns/UiFloatActions/UiFloatActions.vue +5 -1
- package/src/patterns/UiSidebar/UiSidebarGroupLabel.stories.ts +2 -2
- package/src/patterns/UiSidebar/UiSidebarMenuButton.stories.ts +3 -3
|
@@ -11,7 +11,10 @@ const props = defineProps<{
|
|
|
11
11
|
<span
|
|
12
12
|
data-slot="dropdown-menu-shortcut"
|
|
13
13
|
:class="
|
|
14
|
-
cn(
|
|
14
|
+
cn(
|
|
15
|
+
'text-muted-foreground ml-auto label-12-regular tracking-widest',
|
|
16
|
+
props.class,
|
|
17
|
+
)
|
|
15
18
|
"
|
|
16
19
|
>
|
|
17
20
|
<slot />
|
|
@@ -23,7 +23,7 @@ const forwardedProps = useForwardProps(delegatedProps);
|
|
|
23
23
|
v-bind="forwardedProps"
|
|
24
24
|
:class="
|
|
25
25
|
cn(
|
|
26
|
-
'hover:bg-background-surface-muted-subtle data-[highlighted]:bg-background-surface-muted-subtle data-[state=open]:bg-background-surface-muted-subtle focus:text-foreground data-[state=open]:text-foreground flex cursor-default items-center rounded-sm px-2 py-1.5
|
|
26
|
+
'hover:bg-background-surface-muted-subtle data-[highlighted]:bg-background-surface-muted-subtle data-[state=open]:bg-background-surface-muted-subtle focus:text-foreground data-[state=open]:text-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 label-14-regular outline-hidden select-none data-[inset]:pl-8',
|
|
27
27
|
props.class,
|
|
28
28
|
)
|
|
29
29
|
"
|
|
@@ -12,7 +12,7 @@ const props = defineProps<{
|
|
|
12
12
|
data-slot="field-description"
|
|
13
13
|
:class="
|
|
14
14
|
cn(
|
|
15
|
-
'text-muted-foreground
|
|
15
|
+
'text-muted-foreground body-14-regular group-has-[[data-orientation=horizontal]]/field:text-balance',
|
|
16
16
|
'last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5',
|
|
17
17
|
'[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4',
|
|
18
18
|
props.class,
|
|
@@ -14,7 +14,7 @@ const props = defineProps<{
|
|
|
14
14
|
:data-content="!!$slots.default"
|
|
15
15
|
:class="
|
|
16
16
|
cn(
|
|
17
|
-
'relative -my-2 h-5
|
|
17
|
+
'relative -my-2 h-5 label-14-regular group-data-[variant=outline]/field-group:-mb-2',
|
|
18
18
|
props.class,
|
|
19
19
|
)
|
|
20
20
|
"
|
|
@@ -25,7 +25,7 @@ const modelValue = useVModel(props, 'modelValue', emits, {
|
|
|
25
25
|
data-slot="input"
|
|
26
26
|
:class="
|
|
27
27
|
cn(
|
|
28
|
-
'file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground border-input h-9 w-full min-w-0 rounded-md border bg-background-input-default px-3 py-1
|
|
28
|
+
'file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground border-input h-9 w-full min-w-0 rounded-md border bg-background-input-default px-3 py-1 label-16-regular transition-[color] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:label-14-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:label-14-regular',
|
|
29
29
|
'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',
|
|
30
30
|
'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',
|
|
31
31
|
props.class,
|
|
@@ -13,7 +13,7 @@ export { default as ItemSeparator } from './ItemSeparator.vue';
|
|
|
13
13
|
export { default as ItemTitle } from './ItemTitle.vue';
|
|
14
14
|
|
|
15
15
|
export const itemVariants = cva(
|
|
16
|
-
'group/item flex items-center
|
|
16
|
+
'group/item flex items-center label-14-regular rounded-md transition-[background-color,color,box-shadow] [a]:transition-colors duration-100 flex-wrap outline-none focus-visible:ring-ring/50 focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50',
|
|
17
17
|
{
|
|
18
18
|
variants: {
|
|
19
19
|
variant: {
|
|
@@ -18,7 +18,7 @@ const delegatedProps = reactiveOmit(props, 'class', 'for');
|
|
|
18
18
|
:for="props.for"
|
|
19
19
|
:class="
|
|
20
20
|
cn(
|
|
21
|
-
'flex items-center gap-2
|
|
21
|
+
'flex items-center gap-2 label-14-medium leading-none select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',
|
|
22
22
|
props.class,
|
|
23
23
|
)
|
|
24
24
|
"
|
|
@@ -20,7 +20,7 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
|
20
20
|
data-slot="listbox-filter"
|
|
21
21
|
:class="
|
|
22
22
|
cn(
|
|
23
|
-
'placeholder:text-muted-foreground flex h-9 w-full rounded-md bg-transparent px-3 py-2
|
|
23
|
+
'placeholder:text-muted-foreground flex h-9 w-full rounded-md bg-transparent px-3 py-2 label-14-regular outline-none disabled:cursor-not-allowed disabled:opacity-50',
|
|
24
24
|
props.class,
|
|
25
25
|
)
|
|
26
26
|
"
|
|
@@ -18,7 +18,7 @@ const forwardedProps = useForwardProps(delegatedProps);
|
|
|
18
18
|
<ListboxGroupLabel
|
|
19
19
|
data-slot="listbox-group-label"
|
|
20
20
|
:class="
|
|
21
|
-
cn('text-muted-foreground px-2 py-1.5
|
|
21
|
+
cn('text-muted-foreground px-2 py-1.5 label-12-medium', props.class)
|
|
22
22
|
"
|
|
23
23
|
v-bind="forwardedProps"
|
|
24
24
|
>
|
|
@@ -20,7 +20,7 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
|
20
20
|
data-slot="listbox-item"
|
|
21
21
|
:class="
|
|
22
22
|
cn(
|
|
23
|
-
'hover-layer hover-layer-default data-[highlighted]:text-foreground [&_svg:not([class*=\'text-\'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5
|
|
23
|
+
'hover-layer hover-layer-default data-[highlighted]:text-foreground [&_svg:not([class*=\'text-\'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 label-14-regular outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=\'size-\'])]:size-4',
|
|
24
24
|
props.class,
|
|
25
25
|
)
|
|
26
26
|
"
|
|
@@ -43,7 +43,7 @@ const delegatedProps = reactiveOmit(props, 'class');
|
|
|
43
43
|
data-slot="native-select"
|
|
44
44
|
:class="
|
|
45
45
|
cn(
|
|
46
|
-
'border-input placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground h-9 w-full min-w-0 appearance-none rounded-md border bg-background-input-default px-3 py-2 pr-9
|
|
46
|
+
'border-input placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground h-9 w-full min-w-0 appearance-none rounded-md border bg-background-input-default px-3 py-2 pr-9 label-14-regular shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed',
|
|
47
47
|
'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',
|
|
48
48
|
'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',
|
|
49
49
|
props.class,
|
|
@@ -23,7 +23,7 @@ const forwarded = useForwardPropsEmits(props, emits);
|
|
|
23
23
|
// Focus-visible: mirrors UiButton's focus recipe (focus-ring border
|
|
24
24
|
// + tinted ring shadow at 3px) so keyboard focus reads consistently
|
|
25
25
|
// across buttons and nav links.
|
|
26
|
-
'bg-transparent text-content-on-surface-primary border border-transparent flex flex-col gap-1 rounded-sm p-2
|
|
26
|
+
'bg-transparent text-content-on-surface-primary border border-transparent flex flex-col gap-1 rounded-sm p-2 label-14-regular transition-[color,box-shadow,border-color] outline-none hover:bg-background-surface-muted data-[active]:bg-background-surface-muted [&_svg:not([class*=\'text-\'])]:text-muted-foreground focus-visible:border-border-surface-focus-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] [&_svg:not([class*=\'size-\'])]:size-4',
|
|
27
27
|
$attrs.class ?? '',
|
|
28
28
|
)
|
|
29
29
|
"
|
|
@@ -19,5 +19,5 @@ export { default as NavigationMenuViewport } from './NavigationMenuViewport.vue'
|
|
|
19
19
|
// tinted ring shadow, 3px wide (no plain `:focus` bg —
|
|
20
20
|
// pointer hovers and kb focus are decoupled here)
|
|
21
21
|
export const navigationMenuTriggerStyle = cva(
|
|
22
|
-
'group inline-flex h-9 w-max items-center justify-center rounded-md border border-transparent bg-transparent px-4 py-2
|
|
22
|
+
'group inline-flex h-9 w-max items-center justify-center rounded-md border border-transparent bg-transparent px-4 py-2 label-14-medium text-content-on-surface-primary transition-[color,box-shadow,border-color] outline-none hover:bg-background-surface-muted data-[state=open]:bg-background-surface-muted data-[active]:bg-background-surface-muted disabled:pointer-events-none disabled:opacity-50 focus-visible:border-border-surface-focus-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',
|
|
23
23
|
);
|
|
@@ -19,7 +19,7 @@ const forwardedProps = useForwardProps(delegatedProps);
|
|
|
19
19
|
data-slot="range-calendar-cell"
|
|
20
20
|
:class="
|
|
21
21
|
cn(
|
|
22
|
-
'relative p-0 text-center
|
|
22
|
+
'relative p-0 text-center label-14-regular focus-within:relative focus-within:z-20 [&:has([data-selected])]:bg-accent first:[&:has([data-selected])]:rounded-l-md last:[&:has([data-selected])]:rounded-r-md [&:has([data-selected][data-selection-end])]:rounded-r-md [&:has([data-selected][data-selection-start])]:rounded-l-md',
|
|
23
23
|
props.class,
|
|
24
24
|
)
|
|
25
25
|
"
|
|
@@ -26,7 +26,7 @@ const forwardedProps = useForwardProps(delegatedProps);
|
|
|
26
26
|
v-bind="forwardedProps"
|
|
27
27
|
:class="
|
|
28
28
|
cn(
|
|
29
|
-
'hover-layer hover-layer-default focus:text-foreground [&_svg:not([class*=\'text-\'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-12 pl-2
|
|
29
|
+
'hover-layer hover-layer-default focus:text-foreground [&_svg:not([class*=\'text-\'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-12 pl-2 label-14-regular outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([data-slot=icon]):not([class*=\'size-\'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2',
|
|
30
30
|
props.class,
|
|
31
31
|
)
|
|
32
32
|
"
|
|
@@ -12,7 +12,9 @@ const props = defineProps<
|
|
|
12
12
|
<template>
|
|
13
13
|
<SelectLabel
|
|
14
14
|
data-slot="select-label"
|
|
15
|
-
:class="
|
|
15
|
+
:class="
|
|
16
|
+
cn('text-muted-foreground px-2 py-1.5 label-12-regular', props.class)
|
|
17
|
+
"
|
|
16
18
|
>
|
|
17
19
|
<slot />
|
|
18
20
|
</SelectLabel>
|
|
@@ -27,7 +27,7 @@ const forwardedProps = useForwardProps(delegatedProps);
|
|
|
27
27
|
v-bind="forwardedProps"
|
|
28
28
|
:class="
|
|
29
29
|
cn(
|
|
30
|
-
'border-input data-[placeholder]:text-muted-foreground data-[placeholder]:bg-background-input-default [&:not([data-placeholder])]:border-border-surface-focus-ring [&_svg:not([class*=\'text-\'])]:text-muted-foreground focus:border-border-surface-focus-ring focus-visible:border-border-surface-focus-ring active:border-border-surface-focus-ring data-[state=open]:border-border-surface-focus-ring focus:ring-ring/50 focus-visible:ring-ring/50 focus:shadow-xs focus-visible:shadow-xs aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex w-fit items-center justify-between gap-2 rounded-md border bg-accent px-3 py-2
|
|
30
|
+
'border-input data-[placeholder]:text-muted-foreground data-[placeholder]:bg-background-input-default [&:not([data-placeholder])]:border-border-surface-focus-ring [&_svg:not([class*=\'text-\'])]:text-muted-foreground focus:border-border-surface-focus-ring focus-visible:border-border-surface-focus-ring active:border-border-surface-focus-ring data-[state=open]:border-border-surface-focus-ring focus:ring-ring/50 focus-visible:ring-ring/50 focus:shadow-xs focus-visible:shadow-xs aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex w-fit items-center justify-between gap-2 rounded-md border bg-accent px-3 py-2 label-14-regular whitespace-nowrap transition-[color,box-shadow] outline-none focus:ring-[3px] focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([data-slot=icon]):not([class*=\'size-\'])]:size-4',
|
|
31
31
|
props.class,
|
|
32
32
|
)
|
|
33
33
|
"
|
|
@@ -9,7 +9,7 @@ defineOptions({ inheritAttrs: false });
|
|
|
9
9
|
v-bind="$attrs"
|
|
10
10
|
data-slot="sidebar-group-content"
|
|
11
11
|
data-sidebar="group-content"
|
|
12
|
-
:class="cn('w-full
|
|
12
|
+
:class="cn('w-full label-14-regular', $attrs.class ?? '')"
|
|
13
13
|
>
|
|
14
14
|
<slot />
|
|
15
15
|
</div>
|
|
@@ -12,7 +12,7 @@ defineOptions({ inheritAttrs: false });
|
|
|
12
12
|
data-sidebar="group-label"
|
|
13
13
|
:class="
|
|
14
14
|
cn(
|
|
15
|
-
'ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2
|
|
15
|
+
'ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 label-12-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0',
|
|
16
16
|
'group-data-[collapsible=icon]:hidden',
|
|
17
17
|
$attrs.class ?? '',
|
|
18
18
|
)
|
|
@@ -11,7 +11,7 @@ defineOptions({ inheritAttrs: false });
|
|
|
11
11
|
data-sidebar="menu-badge"
|
|
12
12
|
:class="
|
|
13
13
|
cn(
|
|
14
|
-
'text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1
|
|
14
|
+
'text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 label-12-medium tabular-nums select-none',
|
|
15
15
|
'peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground',
|
|
16
16
|
'peer-data-[size=sm]/menu-button:top-1',
|
|
17
17
|
'peer-data-[size=default]/menu-button:top-1.5',
|
|
@@ -26,8 +26,8 @@ withDefaults(
|
|
|
26
26
|
cn(
|
|
27
27
|
'text-sidebar-foreground ring-sidebar-ring hover:bg-background-surface-muted-subtle hover:text-sidebar-accent-foreground active:bg-background-surface-muted-subtle active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0',
|
|
28
28
|
'data-[active=true]:bg-background-surface-muted-subtle data-[active=true]:text-sidebar-accent-foreground',
|
|
29
|
-
size === 'sm' && '
|
|
30
|
-
size === 'md' && '
|
|
29
|
+
size === 'sm' && 'label-12-regular',
|
|
30
|
+
size === 'md' && 'label-14-regular',
|
|
31
31
|
'group-data-[collapsible=icon]:hidden',
|
|
32
32
|
$attrs.class ?? '',
|
|
33
33
|
)
|
|
@@ -51,7 +51,7 @@ export { default as SidebarTrigger } from './SidebarTrigger.vue';
|
|
|
51
51
|
export { useSidebar } from './utils';
|
|
52
52
|
|
|
53
53
|
export const sidebarMenuButtonVariants = cva(
|
|
54
|
-
'peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left
|
|
54
|
+
'peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left label-14-regular outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-background-surface-muted-subtle hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-background-surface-muted-subtle active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-background-surface-muted-subtle data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-background-surface-muted-subtle data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:justify-center! group-data-[collapsible=icon]:p-2! group-data-[collapsible=icon]:[&>svg~span]:hidden group-data-[collapsible=icon]:[&>span~svg]:hidden group-data-[collapsible=icon]:[&>div~*]:hidden [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0',
|
|
55
55
|
{
|
|
56
56
|
variants: {
|
|
57
57
|
variant: {
|
|
@@ -61,9 +61,9 @@ export const sidebarMenuButtonVariants = cva(
|
|
|
61
61
|
'bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-background-surface-muted-subtle hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]',
|
|
62
62
|
},
|
|
63
63
|
size: {
|
|
64
|
-
default: 'h-8
|
|
65
|
-
sm: 'h-7
|
|
66
|
-
lg: 'h-12
|
|
64
|
+
default: 'h-8 label-14-regular',
|
|
65
|
+
sm: 'h-7 label-12-regular',
|
|
66
|
+
lg: 'h-12 label-14-regular group-data-[collapsible=icon]:p-0!',
|
|
67
67
|
},
|
|
68
68
|
},
|
|
69
69
|
defaultVariants: {
|
|
@@ -35,11 +35,11 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
|
35
35
|
>
|
|
36
36
|
<SliderTrack
|
|
37
37
|
data-slot="slider-track"
|
|
38
|
-
class="bg-background-surface-
|
|
38
|
+
class="bg-background-surface-primary relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"
|
|
39
39
|
>
|
|
40
40
|
<SliderRange
|
|
41
41
|
data-slot="slider-range"
|
|
42
|
-
class="bg-
|
|
42
|
+
class="bg-background-accent-default absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full"
|
|
43
43
|
/>
|
|
44
44
|
</SliderTrack>
|
|
45
45
|
|
|
@@ -48,7 +48,7 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
|
48
48
|
:key="key"
|
|
49
49
|
data-slot="slider-thumb"
|
|
50
50
|
:aria-label="(modelValue?.length ?? 0) > 1 ? `Value ${key + 1}` : 'Value'"
|
|
51
|
-
class="bg-white border-
|
|
51
|
+
class="bg-white border-accent-default ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"
|
|
52
52
|
/>
|
|
53
53
|
</SliderRoot>
|
|
54
54
|
</template>
|
|
@@ -18,7 +18,7 @@ const forwarded = useForwardProps(delegatedProps);
|
|
|
18
18
|
<StepperDescription
|
|
19
19
|
v-slot="slotProps: Record<string, unknown>"
|
|
20
20
|
v-bind="forwarded"
|
|
21
|
-
:class="cn('
|
|
21
|
+
:class="cn('label-12-regular text-content-on-surface-muted', props.class)"
|
|
22
22
|
>
|
|
23
23
|
<slot v-bind="slotProps" />
|
|
24
24
|
</StepperDescription>
|
|
@@ -11,7 +11,7 @@ const props = defineProps<{
|
|
|
11
11
|
<div data-slot="table-container" class="relative w-full overflow-auto">
|
|
12
12
|
<table
|
|
13
13
|
data-slot="table"
|
|
14
|
-
:class="cn('w-full caption-bottom
|
|
14
|
+
:class="cn('w-full caption-bottom label-14-regular', props.class)"
|
|
15
15
|
>
|
|
16
16
|
<slot />
|
|
17
17
|
</table>
|
|
@@ -19,7 +19,7 @@ const forwardedProps = useForwardProps(delegatedProps);
|
|
|
19
19
|
data-slot="tabs-trigger"
|
|
20
20
|
:class="
|
|
21
21
|
cn(
|
|
22
|
-
'hover:bg-background-surface-secondary data-[state=active]:bg-background-surface-secondary focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1
|
|
22
|
+
'hover:bg-background-surface-secondary data-[state=active]:bg-background-surface-secondary focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 label-14-medium whitespace-nowrap transition-[color,background-color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=\'size-\'])]:size-4',
|
|
23
23
|
props.class,
|
|
24
24
|
)
|
|
25
25
|
"
|
|
@@ -21,7 +21,7 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
|
21
21
|
data-slot="tags-input"
|
|
22
22
|
:class="
|
|
23
23
|
cn(
|
|
24
|
-
'border-input focus-within:border-ring focus-within:ring-ring/50 flex min-h-9 w-full flex-wrap items-center gap-1.5 rounded-md border bg-background-input-default px-3 py-1
|
|
24
|
+
'border-input focus-within:border-ring focus-within:ring-ring/50 flex min-h-9 w-full flex-wrap items-center gap-1.5 rounded-md border bg-background-input-default px-3 py-1 label-14-regular shadow-xs transition-[color,box-shadow] focus-within:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50',
|
|
25
25
|
props.class,
|
|
26
26
|
)
|
|
27
27
|
"
|
|
@@ -19,7 +19,7 @@ const forwardedProps = useForwardProps(delegatedProps);
|
|
|
19
19
|
data-slot="tags-input-item"
|
|
20
20
|
:class="
|
|
21
21
|
cn(
|
|
22
|
-
'bg-secondary text-secondary-foreground data-[state=active]:border-ring data-[state=active]:ring-ring/50 inline-flex h-6 shrink-0 items-center gap-1 rounded-sm border px-1
|
|
22
|
+
'bg-secondary text-secondary-foreground data-[state=active]:border-ring data-[state=active]:ring-ring/50 inline-flex h-6 shrink-0 items-center gap-1 rounded-sm border px-1 label-12-medium transition-[color,box-shadow] data-[state=active]:ring-[3px] [&[data-disabled]]:opacity-50 [&>button]:shrink-0',
|
|
23
23
|
props.class,
|
|
24
24
|
)
|
|
25
25
|
"
|
|
@@ -25,7 +25,7 @@ const modelValue = useVModel(props, 'modelValue', emits, {
|
|
|
25
25
|
data-slot="textarea"
|
|
26
26
|
:class="
|
|
27
27
|
cn(
|
|
28
|
-
'border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex field-sizing-content min-h-16 w-full rounded-md border bg-background-input-default px-3 py-2
|
|
28
|
+
'border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex field-sizing-content min-h-16 w-full rounded-md border bg-background-input-default px-3 py-2 label-16-regular shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:label-14-regular',
|
|
29
29
|
props.class,
|
|
30
30
|
)
|
|
31
31
|
"
|
|
@@ -3,7 +3,7 @@ import { cva, type VariantProps } from 'class-variance-authority';
|
|
|
3
3
|
export { default as Toggle } from './Toggle.vue';
|
|
4
4
|
|
|
5
5
|
export const toggleVariants = cva(
|
|
6
|
-
'inline-flex items-center justify-center gap-2 rounded-md
|
|
6
|
+
'inline-flex items-center justify-center gap-2 rounded-md label-14-medium transition-colors hover:bg-background-surface-muted-subtle outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',
|
|
7
7
|
{
|
|
8
8
|
variants: {
|
|
9
9
|
variant: {
|
|
@@ -5,7 +5,7 @@ export { default as ToggleGroupItem } from './ToggleGroupItem.vue';
|
|
|
5
5
|
export { toggleGroupContextKey, type ToggleGroupContext } from './context';
|
|
6
6
|
|
|
7
7
|
export const toggleGroupVariants = cva(
|
|
8
|
-
'inline-flex items-center justify-center gap-2 rounded-md
|
|
8
|
+
'inline-flex items-center justify-center gap-2 rounded-md label-14-medium transition-colors hover:bg-background-surface-muted-subtle outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',
|
|
9
9
|
{
|
|
10
10
|
variants: {
|
|
11
11
|
variant: {
|
|
@@ -10,26 +10,32 @@ defineOptions({
|
|
|
10
10
|
});
|
|
11
11
|
|
|
12
12
|
const props = withDefaults(
|
|
13
|
-
defineProps<
|
|
13
|
+
defineProps<
|
|
14
|
+
TooltipContentProps & {
|
|
15
|
+
class?: HTMLAttributes['class'];
|
|
16
|
+
to?: string | HTMLElement | null;
|
|
17
|
+
}
|
|
18
|
+
>(),
|
|
14
19
|
{
|
|
15
20
|
sideOffset: 4,
|
|
21
|
+
to: undefined,
|
|
16
22
|
},
|
|
17
23
|
);
|
|
18
24
|
|
|
19
25
|
const emits = defineEmits<TooltipContentEmits>();
|
|
20
26
|
|
|
21
|
-
const delegatedProps = reactiveOmit(props, 'class');
|
|
27
|
+
const delegatedProps = reactiveOmit(props, 'class', 'to');
|
|
22
28
|
|
|
23
29
|
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
24
30
|
</script>
|
|
25
31
|
|
|
26
32
|
<template>
|
|
27
|
-
<TooltipPortal>
|
|
33
|
+
<TooltipPortal :to="props.to ?? undefined">
|
|
28
34
|
<TooltipContent
|
|
29
35
|
v-bind="{ ...forwarded, ...$attrs }"
|
|
30
36
|
:class="
|
|
31
37
|
cn(
|
|
32
|
-
'z-50 overflow-hidden rounded-md bg-inverse px-3 py-1.5
|
|
38
|
+
'z-50 overflow-hidden rounded-md bg-inverse px-3 py-1.5 label-12-regular text-inverse-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
|
|
33
39
|
props.class,
|
|
34
40
|
)
|
|
35
41
|
"
|
|
@@ -130,7 +130,7 @@ function onDragStart(event: DragEvent, itemId: string) {
|
|
|
130
130
|
|
|
131
131
|
<template>
|
|
132
132
|
<div class="max-w-md space-y-3">
|
|
133
|
-
<p class="text-muted-foreground
|
|
133
|
+
<p class="text-muted-foreground body-14-regular">
|
|
134
134
|
Drag an item over another item. The helper keeps the native drag data,
|
|
135
135
|
creates an empty bordered ghost, and reorders on drop.
|
|
136
136
|
</p>
|
|
@@ -140,7 +140,7 @@ function onDragStart(event: DragEvent, itemId: string) {
|
|
|
140
140
|
:key="item.id"
|
|
141
141
|
draggable="true"
|
|
142
142
|
:class="[
|
|
143
|
-
'rounded-md border border-border-surface-default bg-background-surface-primary px-3 py-2
|
|
143
|
+
'rounded-md border border-border-surface-default bg-background-surface-primary px-3 py-2 body-14-regular transition-[border-color,opacity,transform]',
|
|
144
144
|
draggedItemId === item.id ? 'opacity-50' : undefined,
|
|
145
145
|
activeItemId === item.id ? 'border-border-surface-focus-ring' : undefined,
|
|
146
146
|
]"
|
|
@@ -152,12 +152,12 @@ function onDragStart(event: DragEvent, itemId: string) {
|
|
|
152
152
|
{{ item.label }}
|
|
153
153
|
</div>
|
|
154
154
|
</div>
|
|
155
|
-
<div class="text-muted-foreground grid gap-1
|
|
155
|
+
<div class="text-muted-foreground grid gap-1 label-12-regular">
|
|
156
156
|
<span>Dragged item: {{ draggedItem?.label ?? 'none' }}</span>
|
|
157
157
|
<span>Active item: {{ activeItem?.label ?? 'none' }}</span>
|
|
158
158
|
<span>Original order: {{ originalItems?.map((item) => item.id).join(' -> ') ?? 'none' }}</span>
|
|
159
159
|
</div>
|
|
160
|
-
<pre class="rounded-md bg-background-surface-muted p-3
|
|
160
|
+
<pre class="rounded-md bg-background-surface-muted p-3 label-12-regular">{{ items.map((item) => item.id).join(' -> ') }}</pre>
|
|
161
161
|
</div>
|
|
162
162
|
</template>`,
|
|
163
163
|
},
|
|
@@ -201,7 +201,7 @@ function onDragStart(event: DragEvent, itemId: string) {
|
|
|
201
201
|
},
|
|
202
202
|
template: `
|
|
203
203
|
<div class="max-w-md space-y-3">
|
|
204
|
-
<p class="text-muted-foreground
|
|
204
|
+
<p class="text-muted-foreground body-14-regular">
|
|
205
205
|
Drag an item over another item. The helper keeps the native drag data,
|
|
206
206
|
creates an empty bordered ghost, and reorders on drop.
|
|
207
207
|
</p>
|
|
@@ -211,7 +211,7 @@ function onDragStart(event: DragEvent, itemId: string) {
|
|
|
211
211
|
:key="item.id"
|
|
212
212
|
draggable="true"
|
|
213
213
|
:class="[
|
|
214
|
-
'rounded-md border border-border-surface-default bg-background-surface-primary px-3 py-2
|
|
214
|
+
'rounded-md border border-border-surface-default bg-background-surface-primary px-3 py-2 body-14-regular transition-[border-color,opacity,transform]',
|
|
215
215
|
draggedItemId === item.id ? 'opacity-50' : undefined,
|
|
216
216
|
activeItemId === item.id ? 'border-border-surface-focus-ring' : undefined,
|
|
217
217
|
]"
|
|
@@ -223,12 +223,12 @@ function onDragStart(event: DragEvent, itemId: string) {
|
|
|
223
223
|
{{ item.label }}
|
|
224
224
|
</div>
|
|
225
225
|
</div>
|
|
226
|
-
<div class="text-muted-foreground grid gap-1
|
|
226
|
+
<div class="text-muted-foreground grid gap-1 label-12-regular">
|
|
227
227
|
<span>Dragged item: {{ draggedItem?.label ?? 'none' }}</span>
|
|
228
228
|
<span>Active item: {{ activeItem?.label ?? 'none' }}</span>
|
|
229
229
|
<span>Original order: {{ originalItems?.map((item) => item.id).join(' -> ') ?? 'none' }}</span>
|
|
230
230
|
</div>
|
|
231
|
-
<pre class="rounded-md bg-background-surface-muted p-3
|
|
231
|
+
<pre class="rounded-md bg-background-surface-muted p-3 label-12-regular">{{ items.map((item) => item.id).join(' -> ') }}</pre>
|
|
232
232
|
</div>
|
|
233
233
|
`,
|
|
234
234
|
}),
|
|
@@ -239,7 +239,7 @@ export const VerticalCards: Story = {
|
|
|
239
239
|
setup: setupCardDragStory,
|
|
240
240
|
template: `
|
|
241
241
|
<div class="max-w-lg space-y-3">
|
|
242
|
-
<p class="text-muted-foreground
|
|
242
|
+
<p class="text-muted-foreground body-14-regular">
|
|
243
243
|
Vertical card sorting with model-backed drop handling.
|
|
244
244
|
</p>
|
|
245
245
|
<div class="space-y-3">
|
|
@@ -258,7 +258,7 @@ export const VerticalCards: Story = {
|
|
|
258
258
|
@dragend="resetDragState"
|
|
259
259
|
>
|
|
260
260
|
<h3 class="label-14-medium text-content-on-surface-primary">{{ item.label }}</h3>
|
|
261
|
-
<p class="text-muted-foreground mt-1
|
|
261
|
+
<p class="text-muted-foreground mt-1 body-14-regular">{{ item.description }}</p>
|
|
262
262
|
</article>
|
|
263
263
|
</div>
|
|
264
264
|
</div>
|
|
@@ -271,7 +271,7 @@ export const GridCards: Story = {
|
|
|
271
271
|
setup: setupCardDragStory,
|
|
272
272
|
template: `
|
|
273
273
|
<div class="max-w-3xl space-y-3">
|
|
274
|
-
<p class="text-muted-foreground
|
|
274
|
+
<p class="text-muted-foreground body-14-regular">
|
|
275
275
|
Grid card sorting uses the same active-item model and default drop reorder.
|
|
276
276
|
</p>
|
|
277
277
|
<div class="grid gap-3 sm:grid-cols-2">
|
|
@@ -290,7 +290,7 @@ export const GridCards: Story = {
|
|
|
290
290
|
@dragend="resetDragState"
|
|
291
291
|
>
|
|
292
292
|
<h3 class="label-14-medium text-content-on-surface-primary">{{ item.label }}</h3>
|
|
293
|
-
<p class="text-muted-foreground mt-2
|
|
293
|
+
<p class="text-muted-foreground mt-2 body-14-regular">{{ item.description }}</p>
|
|
294
294
|
</article>
|
|
295
295
|
</div>
|
|
296
296
|
</div>
|
|
@@ -596,14 +596,14 @@ const appointmentDate = ref<DateValue>()
|
|
|
596
596
|
|
|
597
597
|
<template>
|
|
598
598
|
<div class="gap-y-2">
|
|
599
|
-
<label class="
|
|
599
|
+
<label class="label-14-medium">Appointment Date</label>
|
|
600
600
|
<UiDatePicker
|
|
601
601
|
v-model="appointmentDate"
|
|
602
602
|
placeholder="Select appointment date"
|
|
603
603
|
class="w-full"
|
|
604
604
|
aria-label="Select appointment date"
|
|
605
605
|
/>
|
|
606
|
-
<p class="
|
|
606
|
+
<p class="label-12-regular text-muted-foreground">
|
|
607
607
|
Choose a date for your appointment.
|
|
608
608
|
</p>
|
|
609
609
|
</div>
|
|
@@ -621,7 +621,7 @@ export const FormExample: Story = {
|
|
|
621
621
|
return { appointmentDate, args };
|
|
622
622
|
},
|
|
623
623
|
template: `<div class="gap-y-2">
|
|
624
|
-
<label class="
|
|
624
|
+
<label class="label-14-medium">Appointment Date</label>
|
|
625
625
|
<UiDatePicker
|
|
626
626
|
v-model="appointmentDate"
|
|
627
627
|
placeholder="Select appointment date"
|
|
@@ -630,7 +630,7 @@ export const FormExample: Story = {
|
|
|
630
630
|
:disabled="args.disabled"
|
|
631
631
|
:locale="args.locale"
|
|
632
632
|
/>
|
|
633
|
-
<p class="
|
|
633
|
+
<p class="label-12-regular text-muted-foreground">
|
|
634
634
|
Choose a date for your appointment.
|
|
635
635
|
</p>
|
|
636
636
|
</div>`,
|
|
@@ -863,7 +863,7 @@ const travelDates = ref<DateRange>()
|
|
|
863
863
|
|
|
864
864
|
<template>
|
|
865
865
|
<div class="gap-y-2 max-w-sm">
|
|
866
|
-
<label for="travel-dates" class="
|
|
866
|
+
<label for="travel-dates" class="label-14-medium">
|
|
867
867
|
Travel Dates
|
|
868
868
|
</label>
|
|
869
869
|
<UiDatePicker
|
|
@@ -874,7 +874,7 @@ const travelDates = ref<DateRange>()
|
|
|
874
874
|
placeholder="Select dates"
|
|
875
875
|
aria-label="Select travel dates"
|
|
876
876
|
/>
|
|
877
|
-
<p class="
|
|
877
|
+
<p class="label-12-regular text-muted-foreground">
|
|
878
878
|
Choose your check-in and check-out dates.
|
|
879
879
|
</p>
|
|
880
880
|
</div>
|
|
@@ -897,7 +897,7 @@ export const RangeFormExample: Story = {
|
|
|
897
897
|
return { travelDates, args };
|
|
898
898
|
},
|
|
899
899
|
template: `<div class="gap-y-2 max-w-sm">
|
|
900
|
-
<label for="travel-dates" class="
|
|
900
|
+
<label for="travel-dates" class="label-14-medium">
|
|
901
901
|
Travel Dates
|
|
902
902
|
</label>
|
|
903
903
|
<UiDatePicker
|
|
@@ -910,7 +910,7 @@ export const RangeFormExample: Story = {
|
|
|
910
910
|
:disabled="args.disabled"
|
|
911
911
|
:locale="args.locale"
|
|
912
912
|
/>
|
|
913
|
-
<p class="
|
|
913
|
+
<p class="label-12-regular text-muted-foreground">
|
|
914
914
|
Choose your check-in and check-out dates.
|
|
915
915
|
</p>
|
|
916
916
|
</div>`,
|