@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
|
@@ -64,19 +64,19 @@ import { UiSpinner } from '@aleph-alpha/ui-library'
|
|
|
64
64
|
<template>
|
|
65
65
|
<div class="flex items-end gap-6">
|
|
66
66
|
<div class="flex flex-col items-center gap-2">
|
|
67
|
-
<span class="text-muted-foreground
|
|
67
|
+
<span class="text-muted-foreground label-12-regular">default</span>
|
|
68
68
|
<UiSpinner />
|
|
69
69
|
</div>
|
|
70
70
|
<div class="flex flex-col items-center gap-2">
|
|
71
|
-
<span class="text-muted-foreground
|
|
71
|
+
<span class="text-muted-foreground label-12-regular">size-6</span>
|
|
72
72
|
<UiSpinner class="size-6" />
|
|
73
73
|
</div>
|
|
74
74
|
<div class="flex flex-col items-center gap-2">
|
|
75
|
-
<span class="text-muted-foreground
|
|
75
|
+
<span class="text-muted-foreground label-12-regular">size-8</span>
|
|
76
76
|
<UiSpinner class="size-8" />
|
|
77
77
|
</div>
|
|
78
78
|
<div class="flex flex-col items-center gap-2">
|
|
79
|
-
<span class="text-muted-foreground
|
|
79
|
+
<span class="text-muted-foreground label-12-regular">size-12</span>
|
|
80
80
|
<UiSpinner class="size-12" />
|
|
81
81
|
</div>
|
|
82
82
|
</div>
|
|
@@ -90,19 +90,19 @@ export const Sizes: Story = {
|
|
|
90
90
|
components: { UiSpinner },
|
|
91
91
|
template: `<div class="flex items-end gap-6">
|
|
92
92
|
<div class="flex flex-col items-center gap-2">
|
|
93
|
-
<span class="text-muted-foreground
|
|
93
|
+
<span class="text-muted-foreground label-12-regular">default</span>
|
|
94
94
|
<UiSpinner />
|
|
95
95
|
</div>
|
|
96
96
|
<div class="flex flex-col items-center gap-2">
|
|
97
|
-
<span class="text-muted-foreground
|
|
97
|
+
<span class="text-muted-foreground label-12-regular">size-6</span>
|
|
98
98
|
<UiSpinner class="size-6" />
|
|
99
99
|
</div>
|
|
100
100
|
<div class="flex flex-col items-center gap-2">
|
|
101
|
-
<span class="text-muted-foreground
|
|
101
|
+
<span class="text-muted-foreground label-12-regular">size-8</span>
|
|
102
102
|
<UiSpinner class="size-8" />
|
|
103
103
|
</div>
|
|
104
104
|
<div class="flex flex-col items-center gap-2">
|
|
105
|
-
<span class="text-muted-foreground
|
|
105
|
+
<span class="text-muted-foreground label-12-regular">size-12</span>
|
|
106
106
|
<UiSpinner class="size-12" />
|
|
107
107
|
</div>
|
|
108
108
|
</div>`,
|
|
@@ -41,7 +41,7 @@ const enabled = ref(false)
|
|
|
41
41
|
<template>
|
|
42
42
|
<div class="flex items-center gap-x-3">
|
|
43
43
|
<UiSwitch id="airplane-mode" v-model="enabled" name="airplane-mode" />
|
|
44
|
-
<label for="airplane-mode" class="
|
|
44
|
+
<label for="airplane-mode" class="label-14-medium">Airplane Mode</label>
|
|
45
45
|
</div>
|
|
46
46
|
</template>`;
|
|
47
47
|
|
|
@@ -64,7 +64,7 @@ export const Default: Story = {
|
|
|
64
64
|
template: `
|
|
65
65
|
<div class="flex items-center gap-x-3">
|
|
66
66
|
<UiSwitch id="airplane-mode" v-model="enabled" name="airplane-mode" :disabled="args.disabled" />
|
|
67
|
-
<label for="airplane-mode" class="
|
|
67
|
+
<label for="airplane-mode" class="label-14-medium">Airplane Mode</label>
|
|
68
68
|
</div>
|
|
69
69
|
`,
|
|
70
70
|
}),
|
|
@@ -84,7 +84,7 @@ import { UiSwitch } from '@aleph-alpha/ui-library'
|
|
|
84
84
|
<template>
|
|
85
85
|
<div class="flex items-center gap-x-3">
|
|
86
86
|
<UiSwitch id="airplane-mode" name="airplane-mode" disabled />
|
|
87
|
-
<label for="airplane-mode" class="
|
|
87
|
+
<label for="airplane-mode" class="label-14-medium text-muted-foreground">Airplane Mode</label>
|
|
88
88
|
</div>
|
|
89
89
|
</template>`;
|
|
90
90
|
|
|
@@ -110,7 +110,7 @@ export const Disabled: Story = {
|
|
|
110
110
|
template: `
|
|
111
111
|
<div class="flex items-center gap-x-3">
|
|
112
112
|
<UiSwitch id="airplane-mode" v-model="enabled" name="airplane-mode" :disabled="args.disabled" />
|
|
113
|
-
<label for="airplane-mode" class="
|
|
113
|
+
<label for="airplane-mode" class="label-14-medium text-muted-foreground">Airplane Mode</label>
|
|
114
114
|
</div>
|
|
115
115
|
`,
|
|
116
116
|
}),
|
|
@@ -58,20 +58,20 @@ import {
|
|
|
58
58
|
</UiTabsList>
|
|
59
59
|
<UiTabsContent value="account">
|
|
60
60
|
<div class="p-4">
|
|
61
|
-
<h3 class="
|
|
62
|
-
<p class="
|
|
61
|
+
<h3 class="heading-s">Account</h3>
|
|
62
|
+
<p class="body-14-regular text-muted-foreground">Manage your account settings and preferences.</p>
|
|
63
63
|
</div>
|
|
64
64
|
</UiTabsContent>
|
|
65
65
|
<UiTabsContent value="password">
|
|
66
66
|
<div class="p-4">
|
|
67
|
-
<h3 class="
|
|
68
|
-
<p class="
|
|
67
|
+
<h3 class="heading-s">Password</h3>
|
|
68
|
+
<p class="body-14-regular text-muted-foreground">Change your password and security settings.</p>
|
|
69
69
|
</div>
|
|
70
70
|
</UiTabsContent>
|
|
71
71
|
<UiTabsContent value="settings">
|
|
72
72
|
<div class="p-4">
|
|
73
|
-
<h3 class="
|
|
74
|
-
<p class="
|
|
73
|
+
<h3 class="heading-s">Settings</h3>
|
|
74
|
+
<p class="body-14-regular text-muted-foreground">Configure your application settings.</p>
|
|
75
75
|
</div>
|
|
76
76
|
</UiTabsContent>
|
|
77
77
|
</UiTabs>
|
|
@@ -107,20 +107,20 @@ export const Default: Story = {
|
|
|
107
107
|
</UiTabsList>
|
|
108
108
|
<UiTabsContent value="account">
|
|
109
109
|
<div class="p-4">
|
|
110
|
-
<h3 class="
|
|
111
|
-
<p class="
|
|
110
|
+
<h3 class="heading-s">Account</h3>
|
|
111
|
+
<p class="body-14-regular text-muted-foreground">Manage your account settings and preferences.</p>
|
|
112
112
|
</div>
|
|
113
113
|
</UiTabsContent>
|
|
114
114
|
<UiTabsContent value="password">
|
|
115
115
|
<div class="p-4">
|
|
116
|
-
<h3 class="
|
|
117
|
-
<p class="
|
|
116
|
+
<h3 class="heading-s">Password</h3>
|
|
117
|
+
<p class="body-14-regular text-muted-foreground">Change your password and security settings.</p>
|
|
118
118
|
</div>
|
|
119
119
|
</UiTabsContent>
|
|
120
120
|
<UiTabsContent value="settings">
|
|
121
121
|
<div class="p-4">
|
|
122
|
-
<h3 class="
|
|
123
|
-
<p class="
|
|
122
|
+
<h3 class="heading-s">Settings</h3>
|
|
123
|
+
<p class="body-14-regular text-muted-foreground">Configure your application settings.</p>
|
|
124
124
|
</div>
|
|
125
125
|
</UiTabsContent>
|
|
126
126
|
</UiTabs>
|
|
@@ -153,17 +153,17 @@ import {
|
|
|
153
153
|
</UiTabsList>
|
|
154
154
|
<UiTabsContent value="tab1">
|
|
155
155
|
<div class="p-4">
|
|
156
|
-
<p class="
|
|
156
|
+
<p class="body-14-regular text-muted-foreground">Content for the first tab.</p>
|
|
157
157
|
</div>
|
|
158
158
|
</UiTabsContent>
|
|
159
159
|
<UiTabsContent value="tab2">
|
|
160
160
|
<div class="p-4">
|
|
161
|
-
<p class="
|
|
161
|
+
<p class="body-14-regular text-muted-foreground">This content is for the disabled tab.</p>
|
|
162
162
|
</div>
|
|
163
163
|
</UiTabsContent>
|
|
164
164
|
<UiTabsContent value="tab3">
|
|
165
165
|
<div class="p-4">
|
|
166
|
-
<p class="
|
|
166
|
+
<p class="body-14-regular text-muted-foreground">Content for the third tab.</p>
|
|
167
167
|
</div>
|
|
168
168
|
</UiTabsContent>
|
|
169
169
|
</UiTabs>
|
|
@@ -184,17 +184,17 @@ export const WithDisabledTab: Story = {
|
|
|
184
184
|
</UiTabsList>
|
|
185
185
|
<UiTabsContent value="tab1">
|
|
186
186
|
<div class="p-4">
|
|
187
|
-
<p class="
|
|
187
|
+
<p class="body-14-regular text-muted-foreground">Content for the first tab.</p>
|
|
188
188
|
</div>
|
|
189
189
|
</UiTabsContent>
|
|
190
190
|
<UiTabsContent value="tab2">
|
|
191
191
|
<div class="p-4">
|
|
192
|
-
<p class="
|
|
192
|
+
<p class="body-14-regular text-muted-foreground">This content is for the disabled tab.</p>
|
|
193
193
|
</div>
|
|
194
194
|
</UiTabsContent>
|
|
195
195
|
<UiTabsContent value="tab3">
|
|
196
196
|
<div class="p-4">
|
|
197
|
-
<p class="
|
|
197
|
+
<p class="body-14-regular text-muted-foreground">Content for the third tab.</p>
|
|
198
198
|
</div>
|
|
199
199
|
</UiTabsContent>
|
|
200
200
|
</UiTabs>
|
|
@@ -227,20 +227,20 @@ import {
|
|
|
227
227
|
</UiTabsList>
|
|
228
228
|
<UiTabsContent value="general">
|
|
229
229
|
<div class="p-4">
|
|
230
|
-
<h3 class="
|
|
231
|
-
<p class="
|
|
230
|
+
<h3 class="heading-s">General</h3>
|
|
231
|
+
<p class="body-14-regular text-muted-foreground">General settings content.</p>
|
|
232
232
|
</div>
|
|
233
233
|
</UiTabsContent>
|
|
234
234
|
<UiTabsContent value="security">
|
|
235
235
|
<div class="p-4">
|
|
236
|
-
<h3 class="
|
|
237
|
-
<p class="
|
|
236
|
+
<h3 class="heading-s">Security</h3>
|
|
237
|
+
<p class="body-14-regular text-muted-foreground">Security settings content.</p>
|
|
238
238
|
</div>
|
|
239
239
|
</UiTabsContent>
|
|
240
240
|
<UiTabsContent value="notifications">
|
|
241
241
|
<div class="p-4">
|
|
242
|
-
<h3 class="
|
|
243
|
-
<p class="
|
|
242
|
+
<h3 class="heading-s">Notifications</h3>
|
|
243
|
+
<p class="body-14-regular text-muted-foreground">Notification preferences content.</p>
|
|
244
244
|
</div>
|
|
245
245
|
</UiTabsContent>
|
|
246
246
|
</UiTabs>
|
|
@@ -262,20 +262,20 @@ export const Vertical: Story = {
|
|
|
262
262
|
</UiTabsList>
|
|
263
263
|
<UiTabsContent value="general">
|
|
264
264
|
<div class="p-4">
|
|
265
|
-
<h3 class="
|
|
266
|
-
<p class="
|
|
265
|
+
<h3 class="heading-s">General</h3>
|
|
266
|
+
<p class="body-14-regular text-muted-foreground">General settings content.</p>
|
|
267
267
|
</div>
|
|
268
268
|
</UiTabsContent>
|
|
269
269
|
<UiTabsContent value="security">
|
|
270
270
|
<div class="p-4">
|
|
271
|
-
<h3 class="
|
|
272
|
-
<p class="
|
|
271
|
+
<h3 class="heading-s">Security</h3>
|
|
272
|
+
<p class="body-14-regular text-muted-foreground">Security settings content.</p>
|
|
273
273
|
</div>
|
|
274
274
|
</UiTabsContent>
|
|
275
275
|
<UiTabsContent value="notifications">
|
|
276
276
|
<div class="p-4">
|
|
277
|
-
<h3 class="
|
|
278
|
-
<p class="
|
|
277
|
+
<h3 class="heading-s">Notifications</h3>
|
|
278
|
+
<p class="body-14-regular text-muted-foreground">Notification preferences content.</p>
|
|
279
279
|
</div>
|
|
280
280
|
</UiTabsContent>
|
|
281
281
|
</UiTabs>
|
|
@@ -308,17 +308,17 @@ import {
|
|
|
308
308
|
</UiTabsList>
|
|
309
309
|
<UiTabsContent value="tab1">
|
|
310
310
|
<div class="p-4">
|
|
311
|
-
<p class="
|
|
311
|
+
<p class="body-14-regular text-muted-foreground">Click to activate tabs (keyboard focus won't auto-switch).</p>
|
|
312
312
|
</div>
|
|
313
313
|
</UiTabsContent>
|
|
314
314
|
<UiTabsContent value="tab2">
|
|
315
315
|
<div class="p-4">
|
|
316
|
-
<p class="
|
|
316
|
+
<p class="body-14-regular text-muted-foreground">Second tab content.</p>
|
|
317
317
|
</div>
|
|
318
318
|
</UiTabsContent>
|
|
319
319
|
<UiTabsContent value="tab3">
|
|
320
320
|
<div class="p-4">
|
|
321
|
-
<p class="
|
|
321
|
+
<p class="body-14-regular text-muted-foreground">Third tab content.</p>
|
|
322
322
|
</div>
|
|
323
323
|
</UiTabsContent>
|
|
324
324
|
</UiTabs>
|
|
@@ -340,17 +340,17 @@ export const ManualActivation: Story = {
|
|
|
340
340
|
</UiTabsList>
|
|
341
341
|
<UiTabsContent value="tab1">
|
|
342
342
|
<div class="p-4">
|
|
343
|
-
<p class="
|
|
343
|
+
<p class="body-14-regular text-muted-foreground">Click to activate tabs (keyboard focus won't auto-switch).</p>
|
|
344
344
|
</div>
|
|
345
345
|
</UiTabsContent>
|
|
346
346
|
<UiTabsContent value="tab2">
|
|
347
347
|
<div class="p-4">
|
|
348
|
-
<p class="
|
|
348
|
+
<p class="body-14-regular text-muted-foreground">Second tab content.</p>
|
|
349
349
|
</div>
|
|
350
350
|
</UiTabsContent>
|
|
351
351
|
<UiTabsContent value="tab3">
|
|
352
352
|
<div class="p-4">
|
|
353
|
-
<p class="
|
|
353
|
+
<p class="body-14-regular text-muted-foreground">Third tab content.</p>
|
|
354
354
|
</div>
|
|
355
355
|
</UiTabsContent>
|
|
356
356
|
</UiTabs>
|
|
@@ -384,9 +384,9 @@ function goToDetails() {
|
|
|
384
384
|
<template>
|
|
385
385
|
<div class="gap-y-4">
|
|
386
386
|
<div class="flex items-center gap-4">
|
|
387
|
-
<p class="
|
|
387
|
+
<p class="body-14-regular">Current tab: <strong>{{ activeTab }}</strong></p>
|
|
388
388
|
<button
|
|
389
|
-
class="px-3 py-1
|
|
389
|
+
class="px-3 py-1 body-14-regular bg-primary text-primary-foreground rounded-md"
|
|
390
390
|
@click="goToDetails"
|
|
391
391
|
>
|
|
392
392
|
Go to Details
|
|
@@ -401,17 +401,17 @@ function goToDetails() {
|
|
|
401
401
|
</UiTabsList>
|
|
402
402
|
<UiTabsContent value="overview">
|
|
403
403
|
<div class="p-4">
|
|
404
|
-
<p class="
|
|
404
|
+
<p class="body-14-regular text-muted-foreground">Overview content.</p>
|
|
405
405
|
</div>
|
|
406
406
|
</UiTabsContent>
|
|
407
407
|
<UiTabsContent value="details">
|
|
408
408
|
<div class="p-4">
|
|
409
|
-
<p class="
|
|
409
|
+
<p class="body-14-regular text-muted-foreground">Details content.</p>
|
|
410
410
|
</div>
|
|
411
411
|
</UiTabsContent>
|
|
412
412
|
<UiTabsContent value="history">
|
|
413
413
|
<div class="p-4">
|
|
414
|
-
<p class="
|
|
414
|
+
<p class="body-14-regular text-muted-foreground">History content.</p>
|
|
415
415
|
</div>
|
|
416
416
|
</UiTabsContent>
|
|
417
417
|
</UiTabs>
|
|
@@ -435,9 +435,9 @@ export const Controlled: Story = {
|
|
|
435
435
|
template: `
|
|
436
436
|
<div class="gap-y-4">
|
|
437
437
|
<div class="flex items-center gap-4">
|
|
438
|
-
<p class="
|
|
438
|
+
<p class="body-14-regular">Current tab: <strong>{{ activeTab }}</strong></p>
|
|
439
439
|
<button
|
|
440
|
-
class="px-3 py-1
|
|
440
|
+
class="px-3 py-1 body-14-regular bg-primary text-primary-foreground rounded-md"
|
|
441
441
|
@click="goToDetails"
|
|
442
442
|
>
|
|
443
443
|
Go to Details
|
|
@@ -452,17 +452,17 @@ export const Controlled: Story = {
|
|
|
452
452
|
</UiTabsList>
|
|
453
453
|
<UiTabsContent value="overview">
|
|
454
454
|
<div class="p-4">
|
|
455
|
-
<p class="
|
|
455
|
+
<p class="body-14-regular text-muted-foreground">Overview content.</p>
|
|
456
456
|
</div>
|
|
457
457
|
</UiTabsContent>
|
|
458
458
|
<UiTabsContent value="details">
|
|
459
459
|
<div class="p-4">
|
|
460
|
-
<p class="
|
|
460
|
+
<p class="body-14-regular text-muted-foreground">Details content.</p>
|
|
461
461
|
</div>
|
|
462
462
|
</UiTabsContent>
|
|
463
463
|
<UiTabsContent value="history">
|
|
464
464
|
<div class="p-4">
|
|
465
|
-
<p class="
|
|
465
|
+
<p class="body-14-regular text-muted-foreground">History content.</p>
|
|
466
466
|
</div>
|
|
467
467
|
</UiTabsContent>
|
|
468
468
|
</UiTabs>
|
|
@@ -338,10 +338,10 @@ export const AllStates: Story = {
|
|
|
338
338
|
template: `
|
|
339
339
|
<div class="flex flex-col gap-8 w-full max-w-2xl">
|
|
340
340
|
<section>
|
|
341
|
-
<h3 class="
|
|
341
|
+
<h3 class="heading-s mb-4">Variants</h3>
|
|
342
342
|
<div class="flex flex-col gap-4">
|
|
343
343
|
<div class="flex items-center gap-4">
|
|
344
|
-
<span class="
|
|
344
|
+
<span class="body-14-regular text-muted-foreground w-24">Default:</span>
|
|
345
345
|
<UiToggleGroup v-model="multipleDefault" type="multiple">
|
|
346
346
|
<UiToggleGroupItem v-for="item in formattingItems" :key="item.value" :value="item.value" :aria-label="item.label">
|
|
347
347
|
<UiIcon :name="item.icon" :size="16" />
|
|
@@ -349,7 +349,7 @@ export const AllStates: Story = {
|
|
|
349
349
|
</UiToggleGroup>
|
|
350
350
|
</div>
|
|
351
351
|
<div class="flex items-center gap-4">
|
|
352
|
-
<span class="
|
|
352
|
+
<span class="body-14-regular text-muted-foreground w-24">Outline:</span>
|
|
353
353
|
<UiToggleGroup v-model="multipleOutline" type="multiple" variant="outline">
|
|
354
354
|
<UiToggleGroupItem v-for="item in formattingItems" :key="item.value" :value="item.value" :aria-label="item.label">
|
|
355
355
|
<UiIcon :name="item.icon" :size="16" />
|
|
@@ -360,10 +360,10 @@ export const AllStates: Story = {
|
|
|
360
360
|
</section>
|
|
361
361
|
|
|
362
362
|
<section>
|
|
363
|
-
<h3 class="
|
|
363
|
+
<h3 class="heading-s mb-4">Selection Types</h3>
|
|
364
364
|
<div class="flex flex-col gap-4">
|
|
365
365
|
<div class="flex items-center gap-4">
|
|
366
|
-
<span class="
|
|
366
|
+
<span class="body-14-regular text-muted-foreground w-24">Single:</span>
|
|
367
367
|
<UiToggleGroup v-model="singleValue" type="single" variant="outline">
|
|
368
368
|
<UiToggleGroupItem v-for="item in alignmentItems" :key="item.value" :value="item.value" :aria-label="item.label">
|
|
369
369
|
<UiIcon :name="item.icon" :size="16" />
|
|
@@ -371,7 +371,7 @@ export const AllStates: Story = {
|
|
|
371
371
|
</UiToggleGroup>
|
|
372
372
|
</div>
|
|
373
373
|
<div class="flex items-center gap-4">
|
|
374
|
-
<span class="
|
|
374
|
+
<span class="body-14-regular text-muted-foreground w-24">Multiple:</span>
|
|
375
375
|
<UiToggleGroup v-model="defaultSizeValue" type="multiple" variant="outline">
|
|
376
376
|
<UiToggleGroupItem v-for="item in formattingItems" :key="item.value" :value="item.value" :aria-label="item.label">
|
|
377
377
|
<UiIcon :name="item.icon" :size="16" />
|
|
@@ -382,10 +382,10 @@ export const AllStates: Story = {
|
|
|
382
382
|
</section>
|
|
383
383
|
|
|
384
384
|
<section>
|
|
385
|
-
<h3 class="
|
|
385
|
+
<h3 class="heading-s mb-4">Sizes</h3>
|
|
386
386
|
<div class="flex flex-col gap-4">
|
|
387
387
|
<div class="flex items-center gap-4">
|
|
388
|
-
<span class="
|
|
388
|
+
<span class="body-14-regular text-muted-foreground w-24">Small:</span>
|
|
389
389
|
<UiToggleGroup v-model="smallValue" type="single" variant="outline" size="sm">
|
|
390
390
|
<UiToggleGroupItem v-for="item in alignmentItems" :key="item.value" :value="item.value" :aria-label="item.label">
|
|
391
391
|
<UiIcon :name="item.icon" :size="16" />
|
|
@@ -393,7 +393,7 @@ export const AllStates: Story = {
|
|
|
393
393
|
</UiToggleGroup>
|
|
394
394
|
</div>
|
|
395
395
|
<div class="flex items-center gap-4">
|
|
396
|
-
<span class="
|
|
396
|
+
<span class="body-14-regular text-muted-foreground w-24">Default:</span>
|
|
397
397
|
<UiToggleGroup v-model="defaultSizeValue" type="multiple" variant="outline">
|
|
398
398
|
<UiToggleGroupItem v-for="item in formattingItems" :key="item.value" :value="item.value" :aria-label="item.label">
|
|
399
399
|
<UiIcon :name="item.icon" :size="16" />
|
|
@@ -401,7 +401,7 @@ export const AllStates: Story = {
|
|
|
401
401
|
</UiToggleGroup>
|
|
402
402
|
</div>
|
|
403
403
|
<div class="flex items-center gap-4">
|
|
404
|
-
<span class="
|
|
404
|
+
<span class="body-14-regular text-muted-foreground w-24">Large:</span>
|
|
405
405
|
<UiToggleGroup v-model="largeValue" type="multiple" variant="outline" size="lg">
|
|
406
406
|
<UiToggleGroupItem v-for="item in formattingItems" :key="item.value" :value="item.value" :aria-label="item.label">
|
|
407
407
|
<UiIcon :name="item.icon" :size="16" />
|
|
@@ -412,10 +412,10 @@ export const AllStates: Story = {
|
|
|
412
412
|
</section>
|
|
413
413
|
|
|
414
414
|
<section>
|
|
415
|
-
<h3 class="
|
|
415
|
+
<h3 class="heading-s mb-4">Disabled States</h3>
|
|
416
416
|
<div class="flex flex-col gap-4">
|
|
417
417
|
<div class="flex items-center gap-4">
|
|
418
|
-
<span class="
|
|
418
|
+
<span class="body-14-regular text-muted-foreground w-24">All disabled:</span>
|
|
419
419
|
<UiToggleGroup v-model="disabledValue" type="multiple" variant="outline" disabled>
|
|
420
420
|
<UiToggleGroupItem v-for="item in formattingItems" :key="item.value" :value="item.value" :aria-label="item.label">
|
|
421
421
|
<UiIcon :name="item.icon" :size="16" />
|
|
@@ -423,7 +423,7 @@ export const AllStates: Story = {
|
|
|
423
423
|
</UiToggleGroup>
|
|
424
424
|
</div>
|
|
425
425
|
<div class="flex items-center gap-4">
|
|
426
|
-
<span class="
|
|
426
|
+
<span class="body-14-regular text-muted-foreground w-24">Partial:</span>
|
|
427
427
|
<UiToggleGroup v-model="partialDisabled" type="multiple" variant="outline">
|
|
428
428
|
<UiToggleGroupItem v-for="(item, index) in formattingItems" :key="item.value" :value="item.value" :aria-label="item.label" :disabled="index === 1">
|
|
429
429
|
<UiIcon :name="item.icon" :size="16" />
|
|
@@ -434,7 +434,7 @@ export const AllStates: Story = {
|
|
|
434
434
|
</section>
|
|
435
435
|
|
|
436
436
|
<section>
|
|
437
|
-
<h3 class="
|
|
437
|
+
<h3 class="heading-s mb-4">With Text Labels</h3>
|
|
438
438
|
<UiToggleGroup v-model="singleValue" type="single" variant="outline">
|
|
439
439
|
<UiToggleGroupItem v-for="item in alignmentItems" :key="item.value" :value="item.value" :aria-label="item.label">
|
|
440
440
|
<UiIcon :name="item.icon" :size="16" />
|
|
@@ -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
|
"
|