@aleph-alpha/ui-library 5.2.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/index.d.ts +1 -0
- package/dist/system/lib/useAnchorFloat.d.ts +143 -0
- package/dist/system/lib.js +18787 -18280
- package/dist/system/patterns/UiFloatActions/UiFloatActionItems.vue.d.ts +35 -0
- package/dist/system/patterns/UiFloatActions/UiFloatActions.vue.d.ts +45 -0
- package/dist/system/patterns/UiFloatActions/floatActionItemContext.d.ts +16 -0
- package/dist/system/patterns/UiFloatActions/index.d.ts +3 -0
- package/dist/system/patterns/UiFloatActions/types.d.ts +127 -0
- package/dist/system/patterns/index.d.ts +1 -0
- 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/index.ts +1 -0
- package/src/lib/useAnchorFloat.test.ts +166 -0
- package/src/lib/useAnchorFloat.ts +437 -0
- package/src/lib/useDrag.stories.ts +12 -12
- package/src/patterns/UiDatePicker/UiDatePicker.stories.ts +8 -8
- package/src/patterns/UiFloatActions/UiFloatActionItems.vue +327 -0
- package/src/patterns/UiFloatActions/UiFloatActions.stories.ts +900 -0
- package/src/patterns/UiFloatActions/UiFloatActions.vue +224 -0
- package/src/patterns/UiFloatActions/__tests__/UiFloatActionItems.test.ts +104 -0
- package/src/patterns/UiFloatActions/__tests__/UiFloatActions.a11y.test.ts +152 -0
- package/src/patterns/UiFloatActions/__tests__/UiFloatActions.test.ts +86 -0
- package/src/patterns/UiFloatActions/floatActionItemContext.ts +20 -0
- package/src/patterns/UiFloatActions/index.ts +3 -0
- package/src/patterns/UiFloatActions/types.ts +155 -0
- package/src/patterns/UiSidebar/UiSidebarGroupLabel.stories.ts +2 -2
- package/src/patterns/UiSidebar/UiSidebarMenuButton.stories.ts +3 -3
- package/src/patterns/index.ts +1 -0
|
@@ -20,6 +20,7 @@ const props = withDefaults(defineProps<UiTooltipProps>(), {
|
|
|
20
20
|
class: '',
|
|
21
21
|
delayDuration: 500,
|
|
22
22
|
disabled: false,
|
|
23
|
+
to: undefined,
|
|
23
24
|
});
|
|
24
25
|
</script>
|
|
25
26
|
|
|
@@ -33,6 +34,7 @@ const props = withDefaults(defineProps<UiTooltipProps>(), {
|
|
|
33
34
|
:side="props.side"
|
|
34
35
|
:side-offset="props.sideOffset"
|
|
35
36
|
:align="props.align"
|
|
37
|
+
:to="props.to"
|
|
36
38
|
:class="props.class"
|
|
37
39
|
>
|
|
38
40
|
{{ props.content }}
|
|
@@ -49,4 +49,13 @@ export interface UiTooltipProps {
|
|
|
49
49
|
* @default false
|
|
50
50
|
*/
|
|
51
51
|
disabled?: boolean;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Teleport target for the tooltip content. Defaults to `<body>`.
|
|
55
|
+
* Pass an element when the trigger lives inside a browser top-layer element
|
|
56
|
+
* (e.g. a `popover`, dialog, or `UiFloatActions` panel) and set this to that
|
|
57
|
+
* container so the tooltip shares its top layer instead of being painted
|
|
58
|
+
* underneath it.
|
|
59
|
+
*/
|
|
60
|
+
to?: string | HTMLElement | null;
|
|
52
61
|
}
|
|
@@ -16,7 +16,7 @@ const delegatedProps = reactiveOmit(props, 'class');
|
|
|
16
16
|
<AccordionContent
|
|
17
17
|
data-slot="accordion-content"
|
|
18
18
|
v-bind="delegatedProps"
|
|
19
|
-
class="ui-accordion-content overflow-hidden
|
|
19
|
+
class="ui-accordion-content overflow-hidden body-14-regular"
|
|
20
20
|
>
|
|
21
21
|
<div :class="cn('pt-0 pb-4', props.class)">
|
|
22
22
|
<slot />
|
|
@@ -20,7 +20,7 @@ const delegatedProps = reactiveOmit(props, 'class');
|
|
|
20
20
|
v-bind="delegatedProps"
|
|
21
21
|
:class="
|
|
22
22
|
cn(
|
|
23
|
-
'focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left
|
|
23
|
+
'focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left label-14-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180',
|
|
24
24
|
props.class,
|
|
25
25
|
)
|
|
26
26
|
"
|
|
@@ -12,7 +12,7 @@ const props = defineProps<{
|
|
|
12
12
|
data-slot="alert-description"
|
|
13
13
|
:class="
|
|
14
14
|
cn(
|
|
15
|
-
'text-muted-foreground col-start-2 grid justify-items-start gap-1
|
|
15
|
+
'text-muted-foreground col-start-2 grid justify-items-start gap-1 body-14-regular [&_p]:leading-relaxed',
|
|
16
16
|
props.class,
|
|
17
17
|
)
|
|
18
18
|
"
|
|
@@ -6,7 +6,7 @@ export { default as AlertDescription } from './AlertDescription.vue';
|
|
|
6
6
|
export { default as AlertTitle } from './AlertTitle.vue';
|
|
7
7
|
|
|
8
8
|
export const alertVariants = cva(
|
|
9
|
-
'relative w-full rounded-lg border px-4 py-3
|
|
9
|
+
'relative w-full rounded-lg border px-4 py-3 body-14-regular grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current',
|
|
10
10
|
{
|
|
11
11
|
variants: {
|
|
12
12
|
variant: {
|
|
@@ -103,12 +103,12 @@ watch(() => props.readonly, removeUnsupportedReadonlyAttributes);
|
|
|
103
103
|
<div class="**:data-[slot=native-select-icon]:right-1">
|
|
104
104
|
<div class="relative">
|
|
105
105
|
<div
|
|
106
|
-
class="absolute inset-0 flex h-full items-center
|
|
106
|
+
class="absolute inset-0 flex h-full items-center label-14-regular pl-2 pointer-events-none"
|
|
107
107
|
>
|
|
108
108
|
{{ formatter.custom(toDate(date), { month: 'short' }) }}
|
|
109
109
|
</div>
|
|
110
110
|
<NativeSelect
|
|
111
|
-
class="
|
|
111
|
+
class="label-12-regular h-8 pr-6 pl-2 text-transparent relative"
|
|
112
112
|
@change="
|
|
113
113
|
(e: Event) => {
|
|
114
114
|
placeholder = placeholder.set({
|
|
@@ -134,12 +134,12 @@ watch(() => props.readonly, removeUnsupportedReadonlyAttributes);
|
|
|
134
134
|
<div class="**:data-[slot=native-select-icon]:right-1">
|
|
135
135
|
<div class="relative">
|
|
136
136
|
<div
|
|
137
|
-
class="absolute inset-0 flex h-full items-center
|
|
137
|
+
class="absolute inset-0 flex h-full items-center label-14-regular pl-2 pointer-events-none"
|
|
138
138
|
>
|
|
139
139
|
{{ formatter.custom(toDate(date), { year: 'numeric' }) }}
|
|
140
140
|
</div>
|
|
141
141
|
<NativeSelect
|
|
142
|
-
class="
|
|
142
|
+
class="label-12-regular h-8 pr-6 pl-2 text-transparent relative"
|
|
143
143
|
@change="
|
|
144
144
|
(e: Event) => {
|
|
145
145
|
placeholder = placeholder.set({
|
|
@@ -19,7 +19,7 @@ const forwardedProps = useForwardProps(delegatedProps);
|
|
|
19
19
|
data-slot="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])]:rounded-md [&:has([data-selected])]:bg-accent',
|
|
23
23
|
props.class,
|
|
24
24
|
)
|
|
25
25
|
"
|
|
@@ -15,7 +15,7 @@ const delegatedProps = reactiveOmit(props, 'class');
|
|
|
15
15
|
<DialogDescription
|
|
16
16
|
data-slot="drawer-description"
|
|
17
17
|
v-bind="delegatedProps"
|
|
18
|
-
:class="cn('text-muted-foreground
|
|
18
|
+
:class="cn('text-muted-foreground body-14-regular', props.class)"
|
|
19
19
|
>
|
|
20
20
|
<slot />
|
|
21
21
|
</DialogDescription>
|
|
@@ -25,7 +25,7 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
|
25
25
|
v-bind="forwarded"
|
|
26
26
|
:class="
|
|
27
27
|
cn(
|
|
28
|
-
'group/dropdown-menu-checkbox-item hover:bg-background-surface-muted-subtle data-[highlighted]:bg-background-surface-muted-subtle focus:text-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8
|
|
28
|
+
'group/dropdown-menu-checkbox-item hover:bg-background-surface-muted-subtle data-[highlighted]:bg-background-surface-muted-subtle focus:text-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 label-14-regular outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
|
|
29
29
|
props.class,
|
|
30
30
|
)
|
|
31
31
|
"
|
|
@@ -31,7 +31,7 @@ const forwardedProps = useForwardProps(delegatedProps);
|
|
|
31
31
|
v-bind="forwardedProps"
|
|
32
32
|
:class="
|
|
33
33
|
cn(
|
|
34
|
-
'hover:bg-background-surface-muted-subtle data-[highlighted]:bg-background-surface-muted-subtle focus:text-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*=\'text-\'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5
|
|
34
|
+
'hover:bg-background-surface-muted-subtle data-[highlighted]:bg-background-surface-muted-subtle focus:text-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_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 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=\'size-\'])]:size-4',
|
|
35
35
|
props.class,
|
|
36
36
|
)
|
|
37
37
|
"
|
|
@@ -21,9 +21,7 @@ const forwardedProps = useForwardProps(delegatedProps);
|
|
|
21
21
|
data-slot="dropdown-menu-label"
|
|
22
22
|
:data-inset="inset ? '' : undefined"
|
|
23
23
|
v-bind="forwardedProps"
|
|
24
|
-
:class="
|
|
25
|
-
cn('px-2 py-1.5 text-sm font-medium data-[inset]:pl-8', props.class)
|
|
26
|
-
"
|
|
24
|
+
:class="cn('px-2 py-1.5 label-14-medium data-[inset]:pl-8', props.class)"
|
|
27
25
|
>
|
|
28
26
|
<slot />
|
|
29
27
|
</DropdownMenuLabel>
|
|
@@ -29,7 +29,7 @@ const visualRadioValue = computed(() => String(props.value ?? ''));
|
|
|
29
29
|
v-bind="forwarded"
|
|
30
30
|
:class="
|
|
31
31
|
cn(
|
|
32
|
-
'group/dropdown-menu-radio-item hover:bg-background-surface-muted-subtle data-[highlighted]:bg-background-surface-muted-subtle focus:text-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8
|
|
32
|
+
'group/dropdown-menu-radio-item hover:bg-background-surface-muted-subtle data-[highlighted]:bg-background-surface-muted-subtle focus:text-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 label-14-regular outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
|
|
33
33
|
props.class,
|
|
34
34
|
)
|
|
35
35
|
"
|
|
@@ -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
|
"
|