@aleph-alpha/ui-library 6.4.0 → 6.6.0
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/UiFileItem/UiFileItem.vue.d.ts +10 -1
- package/dist/system/components/UiFileItem/index.d.ts +1 -1
- package/dist/system/components/UiFileItem/types.d.ts +81 -5
- package/dist/system/components/UiPopover/UiPopoverContent.vue.d.ts +1 -0
- package/dist/system/components/UiPopover/types.d.ts +6 -0
- package/dist/system/components/core/popover/PopoverContent.vue.d.ts +1 -0
- package/dist/system/components/core/toggle/index.d.ts +1 -1
- package/dist/system/lib.js +12336 -12055
- package/dist/system/patterns/UiFloatActions/UiFloatActionItems.vue.d.ts +21 -174
- package/dist/system/patterns/UiFloatActions/core/FloatingButton.vue.d.ts +36 -0
- package/dist/system/patterns/UiFloatActions/core/FloatingInput.vue.d.ts +19 -0
- package/dist/system/patterns/UiFloatActions/floatActionItemContext.d.ts +3 -1
- package/dist/system/patterns/UiFloatActions/types.d.ts +93 -19
- package/dist/system/patterns/UiLayout/layout-shell.d.ts +117 -252
- package/package.json +2 -2
- package/src/components/UiAccordion/UiAccordion.stories.ts +8 -8
- package/src/components/UiAlert/UiAlert.stories.ts +13 -13
- package/src/components/UiAlertDialog/UiAlertDialog.stories.ts +4 -4
- package/src/components/UiAutocomplete/UiAutocomplete.stories.ts +13 -13
- package/src/components/UiAutocomplete/UiAutocomplete.vue +3 -3
- package/src/components/UiBadge/UiBadge.stories.ts +9 -9
- package/src/components/UiBreadcrumb/UiBreadcrumb.stories.ts +14 -14
- package/src/components/UiButton/UiButton.stories.ts +35 -35
- package/src/components/UiButtonGroup/UiButtonGroup.stories.ts +6 -6
- package/src/components/UiCalendar/UiCalendar.stories.ts +6 -6
- package/src/components/UiCard/UiCard.stories.ts +6 -6
- package/src/components/UiCheckbox/UiCheckbox.stories.ts +30 -30
- package/src/components/UiChip/UiChip.stories.ts +14 -14
- package/src/components/UiChip/UiChip.vue +1 -1
- package/src/components/UiDialog/UiDialog.stories.ts +20 -20
- package/src/components/UiDrawer/UiDrawer.stories.ts +29 -29
- package/src/components/UiDropdownMenu/UiDropdownMenu.stories.ts +13 -13
- package/src/components/UiEmpty/UiEmpty.vue +1 -1
- package/src/components/UiFadeMask/UiFadeMask.stories.ts +13 -13
- package/src/components/UiField/UiField.stories.ts +27 -27
- package/src/components/UiFileItem/UiFileItem.vue +114 -9
- package/src/components/UiFileItem/__tests__/UiFileItem.test.ts +54 -2
- package/src/components/UiFileItem/index.ts +1 -0
- package/src/components/UiFileItem/types.ts +82 -5
- package/src/components/UiFileType/UiFileType.stories.ts +10 -10
- package/src/components/UiFileUploadBox/UiFileUploadBox.stories.ts +10 -10
- package/src/components/UiFileUploadBox/UiFileUploadBox.vue +3 -3
- package/src/components/UiIcon/UiIcon.stories.ts +9 -9
- package/src/components/UiInput/UiInput.stories.ts +13 -13
- package/src/components/UiInput/UiInput.vue +1 -1
- package/src/components/UiInputGroup/UiInputGroup.stories.ts +10 -10
- package/src/components/UiItem/UiItem.stories.ts +12 -12
- package/src/components/UiItem/__tests__/UiItem.test.ts +2 -2
- package/src/components/UiKbd/UiKbd.stories.ts +18 -18
- package/src/components/UiKbd/UiKbd.vue +1 -1
- package/src/components/UiLabel/UiLabel.stories.ts +12 -12
- package/src/components/UiLabel/__tests__/UiLabel.test.ts +1 -1
- package/src/components/UiListbox/UiListbox.stories.ts +20 -20
- package/src/components/UiNavigationMenu/UiNavigationMenu.stories.ts +94 -94
- package/src/components/UiPopover/UiPopover.stories.ts +168 -27
- package/src/components/UiPopover/UiPopoverContent.vue +2 -0
- package/src/components/UiPopover/__tests__/UiPopover.test.ts +48 -0
- package/src/components/UiPopover/types.ts +7 -0
- package/src/components/UiRadioGroup/UiRadioGroup.stories.ts +53 -53
- package/src/components/UiRangeCalendar/UiRangeCalendar.stories.ts +6 -6
- package/src/components/UiResizable/UiResizable.stories.ts +40 -40
- package/src/components/UiSelect/UiSelect.stories.ts +14 -14
- package/src/components/UiSeparator/UiSeparator.stories.ts +16 -16
- package/src/components/UiSheet/UiSheet.stories.ts +29 -29
- package/src/components/UiSlider/UiSlider.stories.ts +28 -28
- package/src/components/UiSnackbar/UiSnackbar.stories.ts +6 -6
- package/src/components/UiSnackbar/UiSnackbar.vue +2 -2
- package/src/components/UiSnackbar/UiSnackbarContent.vue +2 -2
- package/src/components/UiSpinner/UiSpinner.stories.ts +8 -8
- package/src/components/UiStepper/UiStepper.stories.ts +6 -6
- package/src/components/UiSwitch/UiSwitch.stories.ts +37 -37
- package/src/components/UiTable/UiTable.stories.ts +4 -4
- package/src/components/UiTabs/UiTabs.stories.ts +64 -64
- package/src/components/UiTagsInput/UiTagsInput.stories.ts +16 -16
- package/src/components/UiTextarea/UiTextarea.stories.ts +20 -20
- package/src/components/UiToggle/UiToggle.stories.ts +26 -26
- package/src/components/UiToggleGroup/UiToggleGroup.stories.ts +31 -31
- package/src/components/UiTooltip/UiTooltip.stories.ts +7 -7
- 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/alert-dialog/AlertDialogDescription.vue +1 -1
- package/src/components/core/badge/index.ts +2 -2
- package/src/components/core/button/index.ts +3 -3
- package/src/components/core/calendar/Calendar.vue +4 -4
- package/src/components/core/calendar/CalendarCell.vue +1 -1
- package/src/components/core/calendar/CalendarHeading.vue +1 -1
- package/src/components/core/card/CardDescription.vue +1 -1
- package/src/components/core/dialog/DialogDescription.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/DropdownMenuLabel.vue +1 -1
- package/src/components/core/dropdown-menu/DropdownMenuRadioItem.vue +1 -1
- package/src/components/core/dropdown-menu/DropdownMenuShortcut.vue +1 -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/FieldError.vue +1 -1
- package/src/components/core/field/FieldLabel.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/field/FieldTitle.vue +1 -1
- package/src/components/core/input/Input.vue +1 -1
- package/src/components/core/input-group/InputGroupText.vue +1 -1
- package/src/components/core/input-group/index.ts +1 -1
- package/src/components/core/item/ItemDescription.vue +1 -1
- package/src/components/core/item/ItemTitle.vue +1 -1
- package/src/components/core/item/index.ts +2 -2
- 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/popover/PopoverContent.vue +9 -3
- package/src/components/core/range-calendar/RangeCalendarCell.vue +1 -1
- package/src/components/core/range-calendar/RangeCalendarHeading.vue +1 -1
- package/src/components/core/select/SelectItem.vue +1 -1
- package/src/components/core/select/SelectLabel.vue +1 -1
- package/src/components/core/select/SelectTrigger.vue +1 -1
- package/src/components/core/sheet/SheetDescription.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/stepper/StepperDescription.vue +1 -1
- package/src/components/core/stepper/StepperTitle.vue +1 -1
- package/src/components/core/table/Table.vue +1 -1
- package/src/components/core/table/TableCaption.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/tooltip/TooltipContent.vue +1 -1
- package/src/directives/vHover.stories.ts +17 -17
- package/src/lib/useDevice.stories.ts +29 -29
- package/src/lib/useDrag.stories.ts +14 -14
- package/src/patterns/UiDataTable/UiDataTable.stories.ts +27 -27
- package/src/patterns/UiDataTable/UiDataTableColumnFilter.vue +2 -2
- package/src/patterns/UiDataTable/UiDataTableFilterMenu.vue +2 -2
- package/src/patterns/UiDataTable/UiDataTablePagination.vue +3 -3
- package/src/patterns/UiDataTable/__tests__/UiDataTableColumnFilter.test.ts +2 -2
- package/src/patterns/UiDatePicker/UiDatePicker.stories.ts +14 -14
- package/src/patterns/UiFileUpload/UiFileItem.stories.ts +818 -32
- package/src/patterns/UiFileUpload/UiFileUpload.stories.ts +194 -12
- package/src/patterns/UiFloatActions/UiFloatActionItems.vue +226 -76
- package/src/patterns/UiFloatActions/UiFloatActions.stories.ts +1136 -116
- package/src/patterns/UiFloatActions/__tests__/UiFloatActionItems.test.ts +187 -1
- package/src/patterns/UiFloatActions/core/FloatingButton.vue +83 -0
- package/src/patterns/UiFloatActions/core/FloatingInput.vue +53 -0
- package/src/patterns/UiFloatActions/floatActionItemContext.ts +3 -1
- package/src/patterns/UiFloatActions/types.ts +106 -19
- package/src/patterns/UiLayout/UiLayoutContent.stories.ts +17 -17
- package/src/patterns/UiLayout/UiLayoutMobile.stories.ts +4 -4
- package/src/patterns/UiLayout/layout-shell.ts +6 -6
- package/src/patterns/UiProfileCard/UiProfileCard.stories.ts +8 -8
- package/src/patterns/UiProfileCard/profile-card.ts +2 -2
- package/src/patterns/UiSidebar/UiSidebar.stories.ts +6 -6
- package/src/patterns/UiSidebar/UiSidebarGroup.stories.ts +1 -1
- package/src/patterns/UiSidebar/UiSidebarGroupLabel.stories.ts +4 -4
- package/src/patterns/UiSidebar/UiSidebarGroupLabel.vue +1 -1
- package/src/patterns/UiSidebar/UiSidebarHeader.vue +1 -1
- package/src/patterns/UiSidebar/UiSidebarMenuButton.stories.ts +7 -7
- package/src/patterns/UiSidebar/UiSidebarMenuButton.vue +4 -4
- package/src/patterns/UiSidebar/UiSidebarMenuItem.stories.ts +4 -4
- package/src/patterns/UiSidebar/UiSidebarMenuSubItem.stories.ts +1 -1
- package/src/patterns/UiSidebar/UiSidebarMenuSubItem.vue +1 -1
- package/src/patterns/UiSidebar/UiSidebarPopoverMenu.vue +1 -1
- package/src/patterns/UiSidebar/UiSidebarPopoverMenuItem.vue +3 -3
- package/src/patterns/UiSidebar/UiSidebarPopoverTrigger.stories.ts +1 -1
- package/src/patterns/UiSidebar/UiSidebarPopoverTrigger.vue +1 -1
- package/src/patterns/UiSidebar/UiSidebarSub.stories.ts +1 -1
- package/src/patterns/UiTopBar/UiTopBar.stories.ts +24 -24
- package/src/theme/Background.stories.ts +62 -62
- package/src/theme/Border.stories.ts +19 -19
- package/src/theme/BorderRadius.stories.ts +14 -14
- package/src/theme/Extended.stories.ts +26 -26
- package/src/theme/Flex.stories.ts +21 -21
- package/src/theme/Grid.stories.ts +19 -19
- package/src/theme/HoverLayer.stories.ts +26 -26
- package/src/theme/Overlay.stories.ts +14 -14
- package/src/theme/Scrollbar.stories.ts +58 -58
- package/src/theme/Shadow.stories.ts +5 -5
- package/src/theme/Theme.stories.ts +38 -38
|
@@ -66,19 +66,19 @@ import {
|
|
|
66
66
|
<UiTabsContent value="account">
|
|
67
67
|
<div class="p-4">
|
|
68
68
|
<h3 class="heading-s">Account</h3>
|
|
69
|
-
<p class="body-
|
|
69
|
+
<p class="body-s-regular text-content-on-surface-muted">Manage your account settings and preferences.</p>
|
|
70
70
|
</div>
|
|
71
71
|
</UiTabsContent>
|
|
72
72
|
<UiTabsContent value="password">
|
|
73
73
|
<div class="p-4">
|
|
74
74
|
<h3 class="heading-s">Password</h3>
|
|
75
|
-
<p class="body-
|
|
75
|
+
<p class="body-s-regular text-content-on-surface-muted">Change your password and security settings.</p>
|
|
76
76
|
</div>
|
|
77
77
|
</UiTabsContent>
|
|
78
78
|
<UiTabsContent value="settings">
|
|
79
79
|
<div class="p-4">
|
|
80
80
|
<h3 class="heading-s">Settings</h3>
|
|
81
|
-
<p class="body-
|
|
81
|
+
<p class="body-s-regular text-content-on-surface-muted">Configure your application settings.</p>
|
|
82
82
|
</div>
|
|
83
83
|
</UiTabsContent>
|
|
84
84
|
</UiTabs>
|
|
@@ -115,19 +115,19 @@ export const Default: Story = {
|
|
|
115
115
|
<UiTabsContent value="account">
|
|
116
116
|
<div class="p-4">
|
|
117
117
|
<h3 class="heading-s">Account</h3>
|
|
118
|
-
<p class="body-
|
|
118
|
+
<p class="body-s-regular text-content-on-surface-muted">Manage your account settings and preferences.</p>
|
|
119
119
|
</div>
|
|
120
120
|
</UiTabsContent>
|
|
121
121
|
<UiTabsContent value="password">
|
|
122
122
|
<div class="p-4">
|
|
123
123
|
<h3 class="heading-s">Password</h3>
|
|
124
|
-
<p class="body-
|
|
124
|
+
<p class="body-s-regular text-content-on-surface-muted">Change your password and security settings.</p>
|
|
125
125
|
</div>
|
|
126
126
|
</UiTabsContent>
|
|
127
127
|
<UiTabsContent value="settings">
|
|
128
128
|
<div class="p-4">
|
|
129
129
|
<h3 class="heading-s">Settings</h3>
|
|
130
|
-
<p class="body-
|
|
130
|
+
<p class="body-s-regular text-content-on-surface-muted">Configure your application settings.</p>
|
|
131
131
|
</div>
|
|
132
132
|
</UiTabsContent>
|
|
133
133
|
</UiTabs>
|
|
@@ -202,17 +202,17 @@ import {
|
|
|
202
202
|
</UiTabsList>
|
|
203
203
|
<UiTabsContent value="tab1">
|
|
204
204
|
<div class="p-4">
|
|
205
|
-
<p class="body-
|
|
205
|
+
<p class="body-s-regular text-content-on-surface-muted">Content for the first tab.</p>
|
|
206
206
|
</div>
|
|
207
207
|
</UiTabsContent>
|
|
208
208
|
<UiTabsContent value="tab2">
|
|
209
209
|
<div class="p-4">
|
|
210
|
-
<p class="body-
|
|
210
|
+
<p class="body-s-regular text-content-on-surface-muted">This content is for the disabled tab.</p>
|
|
211
211
|
</div>
|
|
212
212
|
</UiTabsContent>
|
|
213
213
|
<UiTabsContent value="tab3">
|
|
214
214
|
<div class="p-4">
|
|
215
|
-
<p class="body-
|
|
215
|
+
<p class="body-s-regular text-content-on-surface-muted">Content for the third tab.</p>
|
|
216
216
|
</div>
|
|
217
217
|
</UiTabsContent>
|
|
218
218
|
</UiTabs>
|
|
@@ -233,17 +233,17 @@ export const WithDisabledTab: Story = {
|
|
|
233
233
|
</UiTabsList>
|
|
234
234
|
<UiTabsContent value="tab1">
|
|
235
235
|
<div class="p-4">
|
|
236
|
-
<p class="body-
|
|
236
|
+
<p class="body-s-regular text-content-on-surface-muted">Content for the first tab.</p>
|
|
237
237
|
</div>
|
|
238
238
|
</UiTabsContent>
|
|
239
239
|
<UiTabsContent value="tab2">
|
|
240
240
|
<div class="p-4">
|
|
241
|
-
<p class="body-
|
|
241
|
+
<p class="body-s-regular text-content-on-surface-muted">This content is for the disabled tab.</p>
|
|
242
242
|
</div>
|
|
243
243
|
</UiTabsContent>
|
|
244
244
|
<UiTabsContent value="tab3">
|
|
245
245
|
<div class="p-4">
|
|
246
|
-
<p class="body-
|
|
246
|
+
<p class="body-s-regular text-content-on-surface-muted">Content for the third tab.</p>
|
|
247
247
|
</div>
|
|
248
248
|
</UiTabsContent>
|
|
249
249
|
</UiTabs>
|
|
@@ -309,19 +309,19 @@ import {
|
|
|
309
309
|
<UiTabsContent value="general">
|
|
310
310
|
<div class="p-4">
|
|
311
311
|
<h3 class="heading-s">General</h3>
|
|
312
|
-
<p class="body-
|
|
312
|
+
<p class="body-s-regular text-content-on-surface-muted">General settings content.</p>
|
|
313
313
|
</div>
|
|
314
314
|
</UiTabsContent>
|
|
315
315
|
<UiTabsContent value="security">
|
|
316
316
|
<div class="p-4">
|
|
317
317
|
<h3 class="heading-s">Security</h3>
|
|
318
|
-
<p class="body-
|
|
318
|
+
<p class="body-s-regular text-content-on-surface-muted">Security settings content.</p>
|
|
319
319
|
</div>
|
|
320
320
|
</UiTabsContent>
|
|
321
321
|
<UiTabsContent value="notifications">
|
|
322
322
|
<div class="p-4">
|
|
323
323
|
<h3 class="heading-s">Notifications</h3>
|
|
324
|
-
<p class="body-
|
|
324
|
+
<p class="body-s-regular text-content-on-surface-muted">Notification preferences content.</p>
|
|
325
325
|
</div>
|
|
326
326
|
</UiTabsContent>
|
|
327
327
|
</UiTabs>
|
|
@@ -344,19 +344,19 @@ export const Vertical: Story = {
|
|
|
344
344
|
<UiTabsContent value="general">
|
|
345
345
|
<div class="p-4">
|
|
346
346
|
<h3 class="heading-s">General</h3>
|
|
347
|
-
<p class="body-
|
|
347
|
+
<p class="body-s-regular text-content-on-surface-muted">General settings content.</p>
|
|
348
348
|
</div>
|
|
349
349
|
</UiTabsContent>
|
|
350
350
|
<UiTabsContent value="security">
|
|
351
351
|
<div class="p-4">
|
|
352
352
|
<h3 class="heading-s">Security</h3>
|
|
353
|
-
<p class="body-
|
|
353
|
+
<p class="body-s-regular text-content-on-surface-muted">Security settings content.</p>
|
|
354
354
|
</div>
|
|
355
355
|
</UiTabsContent>
|
|
356
356
|
<UiTabsContent value="notifications">
|
|
357
357
|
<div class="p-4">
|
|
358
358
|
<h3 class="heading-s">Notifications</h3>
|
|
359
|
-
<p class="body-
|
|
359
|
+
<p class="body-s-regular text-content-on-surface-muted">Notification preferences content.</p>
|
|
360
360
|
</div>
|
|
361
361
|
</UiTabsContent>
|
|
362
362
|
</UiTabs>
|
|
@@ -425,17 +425,17 @@ import {
|
|
|
425
425
|
</UiTabsList>
|
|
426
426
|
<UiTabsContent value="tab1">
|
|
427
427
|
<div class="p-4">
|
|
428
|
-
<p class="body-
|
|
428
|
+
<p class="body-s-regular text-content-on-surface-muted">Click to activate tabs (keyboard focus won't auto-switch).</p>
|
|
429
429
|
</div>
|
|
430
430
|
</UiTabsContent>
|
|
431
431
|
<UiTabsContent value="tab2">
|
|
432
432
|
<div class="p-4">
|
|
433
|
-
<p class="body-
|
|
433
|
+
<p class="body-s-regular text-content-on-surface-muted">Second tab content.</p>
|
|
434
434
|
</div>
|
|
435
435
|
</UiTabsContent>
|
|
436
436
|
<UiTabsContent value="tab3">
|
|
437
437
|
<div class="p-4">
|
|
438
|
-
<p class="body-
|
|
438
|
+
<p class="body-s-regular text-content-on-surface-muted">Third tab content.</p>
|
|
439
439
|
</div>
|
|
440
440
|
</UiTabsContent>
|
|
441
441
|
</UiTabs>
|
|
@@ -457,17 +457,17 @@ export const ManualActivation: Story = {
|
|
|
457
457
|
</UiTabsList>
|
|
458
458
|
<UiTabsContent value="tab1">
|
|
459
459
|
<div class="p-4">
|
|
460
|
-
<p class="body-
|
|
460
|
+
<p class="body-s-regular text-content-on-surface-muted">Click to activate tabs (keyboard focus won't auto-switch).</p>
|
|
461
461
|
</div>
|
|
462
462
|
</UiTabsContent>
|
|
463
463
|
<UiTabsContent value="tab2">
|
|
464
464
|
<div class="p-4">
|
|
465
|
-
<p class="body-
|
|
465
|
+
<p class="body-s-regular text-content-on-surface-muted">Second tab content.</p>
|
|
466
466
|
</div>
|
|
467
467
|
</UiTabsContent>
|
|
468
468
|
<UiTabsContent value="tab3">
|
|
469
469
|
<div class="p-4">
|
|
470
|
-
<p class="body-
|
|
470
|
+
<p class="body-s-regular text-content-on-surface-muted">Third tab content.</p>
|
|
471
471
|
</div>
|
|
472
472
|
</UiTabsContent>
|
|
473
473
|
</UiTabs>
|
|
@@ -519,9 +519,9 @@ function goToDetails() {
|
|
|
519
519
|
<template>
|
|
520
520
|
<div class="gap-y-4">
|
|
521
521
|
<div class="flex items-center gap-4">
|
|
522
|
-
<p class="body-
|
|
522
|
+
<p class="body-s-regular">Current tab: <strong>{{ activeTab }}</strong></p>
|
|
523
523
|
<button
|
|
524
|
-
class="px-3 py-1 body-
|
|
524
|
+
class="px-3 py-1 body-s-regular bg-primary text-primary-foreground rounded-md"
|
|
525
525
|
@click="goToDetails"
|
|
526
526
|
>
|
|
527
527
|
Go to Details
|
|
@@ -536,17 +536,17 @@ function goToDetails() {
|
|
|
536
536
|
</UiTabsList>
|
|
537
537
|
<UiTabsContent value="overview">
|
|
538
538
|
<div class="p-4">
|
|
539
|
-
<p class="body-
|
|
539
|
+
<p class="body-s-regular text-content-on-surface-muted">Overview content.</p>
|
|
540
540
|
</div>
|
|
541
541
|
</UiTabsContent>
|
|
542
542
|
<UiTabsContent value="details">
|
|
543
543
|
<div class="p-4">
|
|
544
|
-
<p class="body-
|
|
544
|
+
<p class="body-s-regular text-content-on-surface-muted">Details content.</p>
|
|
545
545
|
</div>
|
|
546
546
|
</UiTabsContent>
|
|
547
547
|
<UiTabsContent value="history">
|
|
548
548
|
<div class="p-4">
|
|
549
|
-
<p class="body-
|
|
549
|
+
<p class="body-s-regular text-content-on-surface-muted">History content.</p>
|
|
550
550
|
</div>
|
|
551
551
|
</UiTabsContent>
|
|
552
552
|
</UiTabs>
|
|
@@ -570,9 +570,9 @@ export const Controlled: Story = {
|
|
|
570
570
|
template: `
|
|
571
571
|
<div class="gap-y-4">
|
|
572
572
|
<div class="flex items-center gap-4">
|
|
573
|
-
<p class="body-
|
|
573
|
+
<p class="body-s-regular">Current tab: <strong>{{ activeTab }}</strong></p>
|
|
574
574
|
<button
|
|
575
|
-
class="px-3 py-1 body-
|
|
575
|
+
class="px-3 py-1 body-s-regular bg-primary text-primary-foreground rounded-md"
|
|
576
576
|
@click="goToDetails"
|
|
577
577
|
>
|
|
578
578
|
Go to Details
|
|
@@ -587,17 +587,17 @@ export const Controlled: Story = {
|
|
|
587
587
|
</UiTabsList>
|
|
588
588
|
<UiTabsContent value="overview">
|
|
589
589
|
<div class="p-4">
|
|
590
|
-
<p class="body-
|
|
590
|
+
<p class="body-s-regular text-content-on-surface-muted">Overview content.</p>
|
|
591
591
|
</div>
|
|
592
592
|
</UiTabsContent>
|
|
593
593
|
<UiTabsContent value="details">
|
|
594
594
|
<div class="p-4">
|
|
595
|
-
<p class="body-
|
|
595
|
+
<p class="body-s-regular text-content-on-surface-muted">Details content.</p>
|
|
596
596
|
</div>
|
|
597
597
|
</UiTabsContent>
|
|
598
598
|
<UiTabsContent value="history">
|
|
599
599
|
<div class="p-4">
|
|
600
|
-
<p class="body-
|
|
600
|
+
<p class="body-s-regular text-content-on-surface-muted">History content.</p>
|
|
601
601
|
</div>
|
|
602
602
|
</UiTabsContent>
|
|
603
603
|
</UiTabs>
|
|
@@ -666,10 +666,10 @@ export const Accessibility: Story = {
|
|
|
666
666
|
|
|
667
667
|
<div class="flex flex-col gap-6">
|
|
668
668
|
<div class="flex flex-col gap-2">
|
|
669
|
-
<h3 class="body-
|
|
669
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
670
670
|
Use tabs for in-page panels, not site navigation
|
|
671
671
|
</h3>
|
|
672
|
-
<p class="body-
|
|
672
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
673
673
|
Tabs switch related views inside a single page region. For
|
|
674
674
|
top-level page navigation, use
|
|
675
675
|
<code>UiNavigationMenu</code> so the destination is a link rather
|
|
@@ -678,10 +678,10 @@ export const Accessibility: Story = {
|
|
|
678
678
|
</div>
|
|
679
679
|
|
|
680
680
|
<div class="flex flex-col gap-2">
|
|
681
|
-
<h3 class="body-
|
|
681
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
682
682
|
The tablist is one tab stop
|
|
683
683
|
</h3>
|
|
684
|
-
<p class="body-
|
|
684
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
685
685
|
<code>Tab</code> enters the list on the selected tab. The arrow
|
|
686
686
|
keys move between tabs — Left/Right when horizontal, Up/Down when
|
|
687
687
|
vertical — looping at the ends and stepping over disabled ones.
|
|
@@ -692,10 +692,10 @@ export const Accessibility: Story = {
|
|
|
692
692
|
</div>
|
|
693
693
|
|
|
694
694
|
<div class="flex flex-col gap-2">
|
|
695
|
-
<h3 class="body-
|
|
695
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
696
696
|
Automatic vs manual activation
|
|
697
697
|
</h3>
|
|
698
|
-
<p class="body-
|
|
698
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
699
699
|
Automatic mode (the default) activates a tab as soon as it
|
|
700
700
|
receives focus, which is what most users expect. Use
|
|
701
701
|
<code>activation-mode="manual"</code> when panel content is
|
|
@@ -705,10 +705,10 @@ export const Accessibility: Story = {
|
|
|
705
705
|
</div>
|
|
706
706
|
|
|
707
707
|
<div class="flex flex-col gap-2">
|
|
708
|
-
<h3 class="body-
|
|
708
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
709
709
|
Do not rely on the selected fill alone
|
|
710
710
|
</h3>
|
|
711
|
-
<p class="body-
|
|
711
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
712
712
|
The selected tab is filled, and the same information reaches
|
|
713
713
|
everyone else through <code>aria-selected</code> (WCAG 1.4.1 Use
|
|
714
714
|
of Color). Keep disabled tabs in the list so the full set of
|
|
@@ -717,10 +717,10 @@ export const Accessibility: Story = {
|
|
|
717
717
|
</div>
|
|
718
718
|
|
|
719
719
|
<div class="flex flex-col gap-2">
|
|
720
|
-
<h3 class="body-
|
|
720
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
721
721
|
Enable accessibility theme
|
|
722
722
|
</h3>
|
|
723
|
-
<p class="body-
|
|
723
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
724
724
|
When accessibility is required, enable our accessibility theme.
|
|
725
725
|
This increases contrast and makes sure there are no color
|
|
726
726
|
contrast issues.
|
|
@@ -730,7 +730,7 @@ export const Accessibility: Story = {
|
|
|
730
730
|
|
|
731
731
|
<div class="grid gap-4 md:grid-cols-2">
|
|
732
732
|
<div class="flex flex-col gap-3">
|
|
733
|
-
<h3 class="label-
|
|
733
|
+
<h3 class="label-m-medium text-center text-content-on-surface-primary">
|
|
734
734
|
Default
|
|
735
735
|
</h3>
|
|
736
736
|
<div class="flex min-h-20 items-center justify-center border border-border-surface-default p-6">
|
|
@@ -741,20 +741,20 @@ export const Accessibility: Story = {
|
|
|
741
741
|
<UiTabsTrigger value="settings">Settings</UiTabsTrigger>
|
|
742
742
|
</UiTabsList>
|
|
743
743
|
<UiTabsContent value="account">
|
|
744
|
-
<p class="body-
|
|
744
|
+
<p class="body-s-regular p-4 text-content-on-surface-muted">Account panel.</p>
|
|
745
745
|
</UiTabsContent>
|
|
746
746
|
<UiTabsContent value="password">
|
|
747
|
-
<p class="body-
|
|
747
|
+
<p class="body-s-regular p-4 text-content-on-surface-muted">Password panel.</p>
|
|
748
748
|
</UiTabsContent>
|
|
749
749
|
<UiTabsContent value="settings">
|
|
750
|
-
<p class="body-
|
|
750
|
+
<p class="body-s-regular p-4 text-content-on-surface-muted">Settings panel.</p>
|
|
751
751
|
</UiTabsContent>
|
|
752
752
|
</UiTabs>
|
|
753
753
|
</div>
|
|
754
754
|
</div>
|
|
755
755
|
|
|
756
756
|
<div class="accessible-theme flex flex-col gap-3">
|
|
757
|
-
<h3 class="label-
|
|
757
|
+
<h3 class="label-m-medium text-center text-content-on-surface-primary">
|
|
758
758
|
Accessible
|
|
759
759
|
</h3>
|
|
760
760
|
<div class="flex min-h-20 items-center justify-center border border-border-surface-default p-6">
|
|
@@ -765,13 +765,13 @@ export const Accessibility: Story = {
|
|
|
765
765
|
<UiTabsTrigger value="settings">Settings</UiTabsTrigger>
|
|
766
766
|
</UiTabsList>
|
|
767
767
|
<UiTabsContent value="account">
|
|
768
|
-
<p class="body-
|
|
768
|
+
<p class="body-s-regular p-4 text-content-on-surface-muted">Account panel.</p>
|
|
769
769
|
</UiTabsContent>
|
|
770
770
|
<UiTabsContent value="password">
|
|
771
|
-
<p class="body-
|
|
771
|
+
<p class="body-s-regular p-4 text-content-on-surface-muted">Password panel.</p>
|
|
772
772
|
</UiTabsContent>
|
|
773
773
|
<UiTabsContent value="settings">
|
|
774
|
-
<p class="body-
|
|
774
|
+
<p class="body-s-regular p-4 text-content-on-surface-muted">Settings panel.</p>
|
|
775
775
|
</UiTabsContent>
|
|
776
776
|
</UiTabs>
|
|
777
777
|
</div>
|
|
@@ -807,13 +807,13 @@ function renderTestTabs() {
|
|
|
807
807
|
<UiTabsTrigger value="settings">Settings</UiTabsTrigger>
|
|
808
808
|
</UiTabsList>
|
|
809
809
|
<UiTabsContent value="account">
|
|
810
|
-
<p class="body-
|
|
810
|
+
<p class="body-s-regular p-4">Account panel.</p>
|
|
811
811
|
</UiTabsContent>
|
|
812
812
|
<UiTabsContent value="password">
|
|
813
|
-
<p class="body-
|
|
813
|
+
<p class="body-s-regular p-4">Password panel.</p>
|
|
814
814
|
</UiTabsContent>
|
|
815
815
|
<UiTabsContent value="settings">
|
|
816
|
-
<p class="body-
|
|
816
|
+
<p class="body-s-regular p-4">Settings panel.</p>
|
|
817
817
|
</UiTabsContent>
|
|
818
818
|
</UiTabs>
|
|
819
819
|
</div>
|
|
@@ -843,13 +843,13 @@ function renderSelectionTabs() {
|
|
|
843
843
|
<UiTabsTrigger value="settings">Settings</UiTabsTrigger>
|
|
844
844
|
</UiTabsList>
|
|
845
845
|
<UiTabsContent value="account">
|
|
846
|
-
<p class="body-
|
|
846
|
+
<p class="body-s-regular p-4">Account panel.</p>
|
|
847
847
|
</UiTabsContent>
|
|
848
848
|
<UiTabsContent value="password">
|
|
849
|
-
<p class="body-
|
|
849
|
+
<p class="body-s-regular p-4">Password panel.</p>
|
|
850
850
|
</UiTabsContent>
|
|
851
851
|
<UiTabsContent value="settings">
|
|
852
|
-
<p class="body-
|
|
852
|
+
<p class="body-s-regular p-4">Settings panel.</p>
|
|
853
853
|
</UiTabsContent>
|
|
854
854
|
</UiTabs>
|
|
855
855
|
</div>
|
|
@@ -881,13 +881,13 @@ function renderKeyboardTabs() {
|
|
|
881
881
|
<UiTabsTrigger value="settings">Settings</UiTabsTrigger>
|
|
882
882
|
</UiTabsList>
|
|
883
883
|
<UiTabsContent value="account">
|
|
884
|
-
<p class="body-
|
|
884
|
+
<p class="body-s-regular p-4">Account panel.</p>
|
|
885
885
|
</UiTabsContent>
|
|
886
886
|
<UiTabsContent value="password">
|
|
887
|
-
<p class="body-
|
|
887
|
+
<p class="body-s-regular p-4">Password panel.</p>
|
|
888
888
|
</UiTabsContent>
|
|
889
889
|
<UiTabsContent value="settings">
|
|
890
|
-
<p class="body-
|
|
890
|
+
<p class="body-s-regular p-4">Settings panel.</p>
|
|
891
891
|
</UiTabsContent>
|
|
892
892
|
</UiTabs>
|
|
893
893
|
|
|
@@ -898,13 +898,13 @@ function renderKeyboardTabs() {
|
|
|
898
898
|
<UiTabsTrigger value="tab3">Tab 3</UiTabsTrigger>
|
|
899
899
|
</UiTabsList>
|
|
900
900
|
<UiTabsContent value="tab1">
|
|
901
|
-
<p class="body-
|
|
901
|
+
<p class="body-s-regular p-4">First panel.</p>
|
|
902
902
|
</UiTabsContent>
|
|
903
903
|
<UiTabsContent value="tab2">
|
|
904
|
-
<p class="body-
|
|
904
|
+
<p class="body-s-regular p-4">Second panel.</p>
|
|
905
905
|
</UiTabsContent>
|
|
906
906
|
<UiTabsContent value="tab3">
|
|
907
|
-
<p class="body-
|
|
907
|
+
<p class="body-s-regular p-4">Third panel.</p>
|
|
908
908
|
</UiTabsContent>
|
|
909
909
|
</UiTabs>
|
|
910
910
|
</div>
|
|
@@ -783,10 +783,10 @@ export const Accessibility: Story = {
|
|
|
783
783
|
|
|
784
784
|
<div class="flex flex-col gap-6">
|
|
785
785
|
<div class="flex flex-col gap-2">
|
|
786
|
-
<h3 class="body-
|
|
786
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
787
787
|
Give the field a real label
|
|
788
788
|
</h3>
|
|
789
|
-
<p class="body-
|
|
789
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
790
790
|
The placeholder is not a label. Associate a
|
|
791
791
|
<code>UiLabel</code> with the inner input (or pass an
|
|
792
792
|
<code>aria-label</code>) so the field keeps its name once the
|
|
@@ -795,10 +795,10 @@ export const Accessibility: Story = {
|
|
|
795
795
|
</div>
|
|
796
796
|
|
|
797
797
|
<div class="flex flex-col gap-2">
|
|
798
|
-
<h3 class="body-
|
|
798
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
799
799
|
Remove controls name their tag
|
|
800
800
|
</h3>
|
|
801
|
-
<p class="body-
|
|
801
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
802
802
|
Each delete button is announced as
|
|
803
803
|
<code>Remove <tag></code>, so it is distinguishable from
|
|
804
804
|
the tag beside it and from every other remove control. Pass
|
|
@@ -807,10 +807,10 @@ export const Accessibility: Story = {
|
|
|
807
807
|
</div>
|
|
808
808
|
|
|
809
809
|
<div class="flex flex-col gap-2">
|
|
810
|
-
<h3 class="body-
|
|
810
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
811
811
|
Additions and removals are announced
|
|
812
812
|
</h3>
|
|
813
|
-
<p class="body-
|
|
813
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
814
814
|
Adding or removing a tag changes the DOM without moving focus,
|
|
815
815
|
which a screen reader would otherwise pass over in silence. The
|
|
816
816
|
component announces the change through a polite live region
|
|
@@ -820,10 +820,10 @@ export const Accessibility: Story = {
|
|
|
820
820
|
</div>
|
|
821
821
|
|
|
822
822
|
<div class="flex flex-col gap-2">
|
|
823
|
-
<h3 class="body-
|
|
823
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
824
824
|
Tags are exposed as text, not as list items
|
|
825
825
|
</h3>
|
|
826
|
-
<p class="body-
|
|
826
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
827
827
|
Each tag is a generic element, so its value reaches assistive
|
|
828
828
|
technology as plain text. A <code>list</code> role is not an
|
|
829
829
|
option here because the text input shares the container and
|
|
@@ -835,10 +835,10 @@ export const Accessibility: Story = {
|
|
|
835
835
|
</div>
|
|
836
836
|
|
|
837
837
|
<div class="flex flex-col gap-2">
|
|
838
|
-
<h3 class="body-
|
|
838
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
839
839
|
Keyboard model
|
|
840
840
|
</h3>
|
|
841
|
-
<p class="body-
|
|
841
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
842
842
|
Only the text field is a tab stop; tags are reached with the
|
|
843
843
|
arrow keys and removed with <kbd>Delete</kbd> or
|
|
844
844
|
<kbd>Backspace</kbd>. Because tag selection moves reka's internal
|
|
@@ -848,10 +848,10 @@ export const Accessibility: Story = {
|
|
|
848
848
|
</div>
|
|
849
849
|
|
|
850
850
|
<div class="flex flex-col gap-2">
|
|
851
|
-
<h3 class="body-
|
|
851
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
852
852
|
Enable accessibility theme
|
|
853
853
|
</h3>
|
|
854
|
-
<p class="body-
|
|
854
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
855
855
|
When accessibility is required, enable our accessibility theme.
|
|
856
856
|
This increases contrast and makes sure there are no color
|
|
857
857
|
contrast issues.
|
|
@@ -861,7 +861,7 @@ export const Accessibility: Story = {
|
|
|
861
861
|
|
|
862
862
|
<div class="grid gap-4 md:grid-cols-2">
|
|
863
863
|
<div class="flex flex-col gap-3">
|
|
864
|
-
<h3 class="label-
|
|
864
|
+
<h3 class="label-m-medium text-center text-content-on-surface-primary">
|
|
865
865
|
Default
|
|
866
866
|
</h3>
|
|
867
867
|
<div class="flex flex-col gap-4 border border-border-surface-default p-6">
|
|
@@ -876,7 +876,7 @@ export const Accessibility: Story = {
|
|
|
876
876
|
</div>
|
|
877
877
|
|
|
878
878
|
<div class="accessible-theme flex flex-col gap-3">
|
|
879
|
-
<h3 class="label-
|
|
879
|
+
<h3 class="label-m-medium text-center text-content-on-surface-primary">
|
|
880
880
|
Accessible
|
|
881
881
|
</h3>
|
|
882
882
|
<div class="flex flex-col gap-4 border border-border-surface-default p-6">
|
|
@@ -948,7 +948,7 @@ function renderTestTagsInput() {
|
|
|
948
948
|
},
|
|
949
949
|
template: `
|
|
950
950
|
<div class="max-w-sm">
|
|
951
|
-
<label for="test-tags" class="mb-1.5 block label-
|
|
951
|
+
<label for="test-tags" class="mb-1.5 block label-s-medium">Fruits</label>
|
|
952
952
|
<UiTagsInput v-model="tags">
|
|
953
953
|
<UiTagsInputItem v-for="item in tags" :key="item" :value="item">
|
|
954
954
|
<UiTagsInputItemText />
|
|
@@ -1356,7 +1356,7 @@ export const MaxTagsLimit: Story = {
|
|
|
1356
1356
|
},
|
|
1357
1357
|
template: `
|
|
1358
1358
|
<div class="max-w-sm">
|
|
1359
|
-
<label for="max-tags" class="mb-1.5 block label-
|
|
1359
|
+
<label for="max-tags" class="mb-1.5 block label-s-medium">Tags</label>
|
|
1360
1360
|
<UiTagsInput v-model="tags" :max="3">
|
|
1361
1361
|
<UiTagsInputItem v-for="item in tags" :key="item" :value="item">
|
|
1362
1362
|
<UiTagsInputItemText />
|