@aleph-alpha/ui-library 6.5.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/core/toggle/index.d.ts +1 -1
- package/dist/system/lib.js +14623 -14438
- 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 +4 -4
- package/src/components/UiFileItem/__tests__/UiFileItem.test.ts +2 -2
- 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 +35 -35
- 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/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 +14 -14
- package/src/patterns/UiFileUpload/UiFileUpload.stories.ts +6 -6
- 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
|
@@ -329,7 +329,7 @@ export const Group: Story = {
|
|
|
329
329
|
},
|
|
330
330
|
template: `
|
|
331
331
|
<div class="flex max-w-[620px] flex-col gap-3">
|
|
332
|
-
<p class="body-
|
|
332
|
+
<p class="body-s-regular text-content-on-surface-muted">
|
|
333
333
|
Interactive group example inspired by the Figma chips group. Use Tab to verify focus order.
|
|
334
334
|
</p>
|
|
335
335
|
|
|
@@ -368,7 +368,7 @@ export const FocusOrderInteractive: Story = {
|
|
|
368
368
|
},
|
|
369
369
|
template: `
|
|
370
370
|
<div class="flex max-w-[620px] flex-col gap-3">
|
|
371
|
-
<p class="body-
|
|
371
|
+
<p class="body-s-regular text-content-on-surface-muted">
|
|
372
372
|
Press Tab to verify focus order from left to right and top to bottom.
|
|
373
373
|
</p>
|
|
374
374
|
|
|
@@ -440,10 +440,10 @@ export const Accessibility: Story = {
|
|
|
440
440
|
|
|
441
441
|
<div class="flex flex-col gap-6">
|
|
442
442
|
<div class="flex flex-col gap-2">
|
|
443
|
-
<h3 class="body-
|
|
443
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
444
444
|
Let the variant match the behaviour
|
|
445
445
|
</h3>
|
|
446
|
-
<p class="body-
|
|
446
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
447
447
|
Each variant renders different semantics on purpose:
|
|
448
448
|
<code>static</code> is a plain <code>span</code> with no role and
|
|
449
449
|
no tab stop, <code>selectable</code> is a toggle button, and
|
|
@@ -454,10 +454,10 @@ export const Accessibility: Story = {
|
|
|
454
454
|
</div>
|
|
455
455
|
|
|
456
456
|
<div class="flex flex-col gap-2">
|
|
457
|
-
<h3 class="body-
|
|
457
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
458
458
|
Name the remove control after its chip
|
|
459
459
|
</h3>
|
|
460
|
-
<p class="body-
|
|
460
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
461
461
|
The remove control is icon-only, so
|
|
462
462
|
<code>removeLabel</code> is the only thing announced. The default
|
|
463
463
|
<code>Remove chip</code> is fine for a single chip, but in a list
|
|
@@ -468,10 +468,10 @@ export const Accessibility: Story = {
|
|
|
468
468
|
</div>
|
|
469
469
|
|
|
470
470
|
<div class="flex flex-col gap-2">
|
|
471
|
-
<h3 class="body-
|
|
471
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
472
472
|
Selection is announced, not just coloured
|
|
473
473
|
</h3>
|
|
474
|
-
<p class="body-
|
|
474
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
475
475
|
A selected chip changes its background, and
|
|
476
476
|
<code>aria-pressed</code> carries the same state for anyone who
|
|
477
477
|
cannot see it (WCAG 1.4.1). This only applies to interactive
|
|
@@ -481,10 +481,10 @@ export const Accessibility: Story = {
|
|
|
481
481
|
</div>
|
|
482
482
|
|
|
483
483
|
<div class="flex flex-col gap-2">
|
|
484
|
-
<h3 class="body-
|
|
484
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
485
485
|
Keep chips reachable
|
|
486
486
|
</h3>
|
|
487
|
-
<p class="body-
|
|
487
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
488
488
|
Interactive chips are ordinary buttons: <code>Tab</code> reaches
|
|
489
489
|
them and <code>Enter</code> or <code>Space</code> activates them.
|
|
490
490
|
A removable chip that also selects contributes two tab stops —
|
|
@@ -493,10 +493,10 @@ export const Accessibility: Story = {
|
|
|
493
493
|
</div>
|
|
494
494
|
|
|
495
495
|
<div class="flex flex-col gap-2">
|
|
496
|
-
<h3 class="body-
|
|
496
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
497
497
|
Enable accessibility theme
|
|
498
498
|
</h3>
|
|
499
|
-
<p class="body-
|
|
499
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
500
500
|
When accessibility is required, enable our accessibility theme.
|
|
501
501
|
This increases contrast and makes sure there are no color
|
|
502
502
|
contrast issues.
|
|
@@ -506,7 +506,7 @@ export const Accessibility: Story = {
|
|
|
506
506
|
|
|
507
507
|
<div class="grid gap-4 md:grid-cols-2">
|
|
508
508
|
<div class="flex flex-col gap-3">
|
|
509
|
-
<h3 class="label-
|
|
509
|
+
<h3 class="label-m-medium text-center text-content-on-surface-primary">
|
|
510
510
|
Default
|
|
511
511
|
</h3>
|
|
512
512
|
<div class="flex flex-wrap items-center gap-3 border border-border-surface-default p-6">
|
|
@@ -523,7 +523,7 @@ export const Accessibility: Story = {
|
|
|
523
523
|
</div>
|
|
524
524
|
|
|
525
525
|
<div class="accessible-theme flex flex-col gap-3">
|
|
526
|
-
<h3 class="label-
|
|
526
|
+
<h3 class="label-m-medium text-center text-content-on-surface-primary">
|
|
527
527
|
Accessible
|
|
528
528
|
</h3>
|
|
529
529
|
<div class="flex flex-wrap items-center gap-3 border border-border-surface-default p-6">
|
|
@@ -53,7 +53,7 @@ function handleRemovablePrimaryAction() {
|
|
|
53
53
|
|
|
54
54
|
const chipBaseClass = computed(() =>
|
|
55
55
|
cn(
|
|
56
|
-
'inline-flex items-center rounded-full border border-border-button-outlined bg-background-surface-secondary text-content-on-accent-soft label-
|
|
56
|
+
'inline-flex items-center rounded-full border border-border-button-outlined bg-background-surface-secondary text-content-on-accent-soft label-xs-medium transition-[color,background-color,border-color]',
|
|
57
57
|
'data-[selected=true]:bg-background-accent-soft data-[selected=true]:border-accent-default',
|
|
58
58
|
'data-[selected=true]:hover:bg-background-accent-soft data-[selected=true]:hover:border-accent-default',
|
|
59
59
|
props.disabled && 'opacity-50',
|
|
@@ -80,7 +80,7 @@ import {
|
|
|
80
80
|
title="Edit profile"
|
|
81
81
|
description="Make changes to your profile here. Click save when done."
|
|
82
82
|
>
|
|
83
|
-
<p class="body-
|
|
83
|
+
<p class="body-s-regular text-content-on-surface-secondary">
|
|
84
84
|
Dialog body content goes in the default slot.
|
|
85
85
|
</p>
|
|
86
86
|
<template #actions>
|
|
@@ -122,7 +122,7 @@ export const Default: Story = {
|
|
|
122
122
|
title="Edit profile"
|
|
123
123
|
description="Make changes to your profile here. Click save when done."
|
|
124
124
|
>
|
|
125
|
-
<p class="body-
|
|
125
|
+
<p class="body-s-regular text-content-on-surface-secondary">
|
|
126
126
|
Dialog body content goes in the default slot. The top-right close control dismisses; Cancel in actions also closes.
|
|
127
127
|
</p>
|
|
128
128
|
<template #actions>
|
|
@@ -179,8 +179,8 @@ import {
|
|
|
179
179
|
title="Dialog title"
|
|
180
180
|
description="This is a dialog description."
|
|
181
181
|
>
|
|
182
|
-
<div class="flex max-h-[min(60vh,22rem)] flex-col gap-4 overflow-y-auto pr-1 body-
|
|
183
|
-
<p class="shrink-0 body-
|
|
182
|
+
<div class="flex max-h-[min(60vh,22rem)] flex-col gap-4 overflow-y-auto pr-1 body-s-regular text-content-on-surface-secondary">
|
|
183
|
+
<p class="shrink-0 body-s-medium text-content-on-surface-primary">Lorem ipsum</p>
|
|
184
184
|
<p>
|
|
185
185
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus interdum hendrerit ex vitae sodales. Donec id leo ipsum. Phasellus volutpat aliquet mauris, et blandit nulla laoreet vitae. Quisque ante dui, porta eu felis nec, scelerisque pharetra turpis.
|
|
186
186
|
</p>
|
|
@@ -225,8 +225,8 @@ export const Content: Story = {
|
|
|
225
225
|
title="Dialog title"
|
|
226
226
|
description="This is a dialog description."
|
|
227
227
|
>
|
|
228
|
-
<div class="flex max-h-[min(60vh,22rem)] flex-col gap-4 overflow-y-auto pr-1 body-
|
|
229
|
-
<p class="shrink-0 body-
|
|
228
|
+
<div class="flex max-h-[min(60vh,22rem)] flex-col gap-4 overflow-y-auto pr-1 body-s-regular text-content-on-surface-secondary">
|
|
229
|
+
<p class="shrink-0 body-s-medium text-content-on-surface-primary">Lorem ipsum</p>
|
|
230
230
|
<p>
|
|
231
231
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus interdum hendrerit ex vitae sodales. Donec id leo ipsum. Phasellus volutpat aliquet mauris, et blandit nulla laoreet vitae. Quisque ante dui, porta eu felis nec, scelerisque pharetra turpis.
|
|
232
232
|
</p>
|
|
@@ -275,7 +275,7 @@ import {
|
|
|
275
275
|
title="Share document"
|
|
276
276
|
description="Anyone with the link can view this file."
|
|
277
277
|
>
|
|
278
|
-
<p class="body-
|
|
278
|
+
<p class="body-s-regular text-content-on-surface-secondary">
|
|
279
279
|
Body content uses the default slot. Put buttons in <code>#actions</code>; they render in the
|
|
280
280
|
dialog footer row.
|
|
281
281
|
</p>
|
|
@@ -316,8 +316,8 @@ export const WithActionsSlot: Story = {
|
|
|
316
316
|
title="Share document"
|
|
317
317
|
description="Anyone with the link can view this file."
|
|
318
318
|
>
|
|
319
|
-
<p class="body-
|
|
320
|
-
Body content uses the default slot. Put buttons in <code class="rounded bg-background-surface-muted px-1 py-0.5 label-
|
|
319
|
+
<p class="body-s-regular text-content-on-surface-secondary">
|
|
320
|
+
Body content uses the default slot. Put buttons in <code class="rounded bg-background-surface-muted px-1 py-0.5 label-xs-medium">#actions</code>; they render in the dialog footer row.
|
|
321
321
|
</p>
|
|
322
322
|
<template #actions>
|
|
323
323
|
<UiButton type="button" variant="ghost">Discard</UiButton>
|
|
@@ -354,7 +354,7 @@ import {
|
|
|
354
354
|
<UiButton variant="outline">Open</UiButton>
|
|
355
355
|
</UiDialogTrigger>
|
|
356
356
|
<UiDialogContent title="Notifications" max-width="max-w-md">
|
|
357
|
-
<p class="body-
|
|
357
|
+
<p class="body-s-regular text-content-on-surface-secondary">
|
|
358
358
|
No description or footer actions — the top-right close control is still shown (and Escape / overlay click).
|
|
359
359
|
</p>
|
|
360
360
|
</UiDialogContent>
|
|
@@ -381,7 +381,7 @@ export const TitleOnly: Story = {
|
|
|
381
381
|
<UiButton variant="outline">Open</UiButton>
|
|
382
382
|
</UiDialogTrigger>
|
|
383
383
|
<UiDialogContent title="Notifications" max-width="max-w-md">
|
|
384
|
-
<p class="body-
|
|
384
|
+
<p class="body-s-regular text-content-on-surface-secondary">
|
|
385
385
|
No description or footer actions — the top-right close control is still shown (and Escape / overlay click).
|
|
386
386
|
</p>
|
|
387
387
|
</UiDialogContent>
|
|
@@ -517,7 +517,7 @@ import {
|
|
|
517
517
|
</UiDialogClose>
|
|
518
518
|
</div>
|
|
519
519
|
</template>
|
|
520
|
-
<p class="body-
|
|
520
|
+
<p class="body-s-regular text-content-on-surface-secondary">Main content.</p>
|
|
521
521
|
<template #actions>
|
|
522
522
|
<UiDialogClose as-child>
|
|
523
523
|
<UiButton variant="outline">Cancel</UiButton>
|
|
@@ -568,7 +568,7 @@ export const CustomHeaderSlot: Story = {
|
|
|
568
568
|
</UiDialogClose>
|
|
569
569
|
</div>
|
|
570
570
|
</template>
|
|
571
|
-
<p class="body-
|
|
571
|
+
<p class="body-s-regular text-content-on-surface-secondary">Main content.</p>
|
|
572
572
|
<template #actions>
|
|
573
573
|
<UiDialogClose as-child>
|
|
574
574
|
<UiButton variant="outline">Cancel</UiButton>
|
|
@@ -773,11 +773,11 @@ const accessibilityDialogPreview = `
|
|
|
773
773
|
</UiButton>
|
|
774
774
|
<div class="flex min-w-0 flex-col gap-2 pe-8 text-left">
|
|
775
775
|
<p class="heading-s text-content-on-surface-primary">Edit profile</p>
|
|
776
|
-
<p class="body-
|
|
776
|
+
<p class="body-s-regular text-content-on-surface-muted">
|
|
777
777
|
Make changes to your profile here. Click save when done.
|
|
778
778
|
</p>
|
|
779
779
|
</div>
|
|
780
|
-
<p class="body-
|
|
780
|
+
<p class="body-s-regular text-content-on-surface-secondary">
|
|
781
781
|
Dialog body.
|
|
782
782
|
</p>
|
|
783
783
|
<div class="flex flex-col-reverse gap-2 sm:flex-row sm:justify-end">
|
|
@@ -807,10 +807,10 @@ export const Accessibility: Story = {
|
|
|
807
807
|
|
|
808
808
|
<div class="flex flex-col gap-6">
|
|
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
|
Enable accessibility theme
|
|
812
812
|
</h3>
|
|
813
|
-
<p class="body-
|
|
813
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
814
814
|
When accessibility is required, enable our accessibility theme. This
|
|
815
815
|
increases contrast and ensures there are no color contrast issues.
|
|
816
816
|
</p>
|
|
@@ -819,7 +819,7 @@ export const Accessibility: Story = {
|
|
|
819
819
|
|
|
820
820
|
<div class="grid gap-4 md:grid-cols-2">
|
|
821
821
|
<div class="flex flex-col gap-3">
|
|
822
|
-
<h3 class="label-
|
|
822
|
+
<h3 class="label-m-medium text-center text-content-on-surface-primary">
|
|
823
823
|
Default
|
|
824
824
|
</h3>
|
|
825
825
|
<div class="flex min-h-20 items-center justify-center border border-border-surface-default p-6">
|
|
@@ -828,7 +828,7 @@ export const Accessibility: Story = {
|
|
|
828
828
|
</div>
|
|
829
829
|
|
|
830
830
|
<div class="accessible-theme flex flex-col gap-3">
|
|
831
|
-
<h3 class="label-
|
|
831
|
+
<h3 class="label-m-medium text-center text-content-on-surface-primary">
|
|
832
832
|
Accessible
|
|
833
833
|
</h3>
|
|
834
834
|
<div class="flex min-h-20 items-center justify-center border border-border-surface-default p-6">
|
|
@@ -926,7 +926,7 @@ function renderTestDialog() {
|
|
|
926
926
|
description="Make changes to your profile here. Click save when done."
|
|
927
927
|
style="position: fixed"
|
|
928
928
|
>
|
|
929
|
-
<p class="body-
|
|
929
|
+
<p class="body-s-regular text-content-on-surface-secondary">
|
|
930
930
|
Dialog body content goes in the default slot.
|
|
931
931
|
</p>
|
|
932
932
|
<template #actions>
|
|
@@ -74,7 +74,7 @@ import {
|
|
|
74
74
|
This is a shadcn-style drawer built on top of reka-ui Dialog primitives.
|
|
75
75
|
</UiDrawerDescription>
|
|
76
76
|
</UiDrawerHeader>
|
|
77
|
-
<div class="p-4 pt-0 body-
|
|
77
|
+
<div class="p-4 pt-0 body-s-regular">
|
|
78
78
|
Put any content here.
|
|
79
79
|
</div>
|
|
80
80
|
<UiDrawerFooter>
|
|
@@ -134,7 +134,7 @@ export const Default: Story = {
|
|
|
134
134
|
This is a shadcn-style drawer built on top of reka-ui Dialog primitives.
|
|
135
135
|
</UiDrawerDescription>
|
|
136
136
|
</UiDrawerHeader>
|
|
137
|
-
<div class="p-4 pt-0 body-
|
|
137
|
+
<div class="p-4 pt-0 body-s-regular">
|
|
138
138
|
Put any content here.
|
|
139
139
|
</div>
|
|
140
140
|
<UiDrawerFooter>
|
|
@@ -206,7 +206,7 @@ const open = ref(false)
|
|
|
206
206
|
This drawer is controlled via v-model:open.
|
|
207
207
|
</UiDrawerDescription>
|
|
208
208
|
</UiDrawerHeader>
|
|
209
|
-
<div class="p-4 pt-0 body-
|
|
209
|
+
<div class="p-4 pt-0 body-s-regular gap-y-3">
|
|
210
210
|
<p>Click the buttons below to close programmatically.</p>
|
|
211
211
|
<div class="flex gap-2 flex-wrap">
|
|
212
212
|
<UiButton size="sm" @click="open = false">Close via model</UiButton>
|
|
@@ -254,7 +254,7 @@ export const Controlled: Story = {
|
|
|
254
254
|
This drawer is controlled via v-model:open.
|
|
255
255
|
</UiDrawerDescription>
|
|
256
256
|
</UiDrawerHeader>
|
|
257
|
-
<div class="p-4 pt-0 body-
|
|
257
|
+
<div class="p-4 pt-0 body-s-regular gap-y-3">
|
|
258
258
|
<p>Click the buttons below to close programmatically.</p>
|
|
259
259
|
<div class="flex gap-2 flex-wrap">
|
|
260
260
|
<UiButton size="sm" @click="open = false">Close via model</UiButton>
|
|
@@ -289,7 +289,7 @@ import {
|
|
|
289
289
|
|
|
290
290
|
<template>
|
|
291
291
|
<div class="gap-y-4">
|
|
292
|
-
<p class="body-
|
|
292
|
+
<p class="body-s-regular text-content-on-surface-muted">
|
|
293
293
|
Non-modal drawer: you can still interact with the page while it is open.
|
|
294
294
|
</p>
|
|
295
295
|
<UiDrawer :modal="false">
|
|
@@ -303,7 +303,7 @@ import {
|
|
|
303
303
|
Outside interaction is allowed.
|
|
304
304
|
</UiDrawerDescription>
|
|
305
305
|
</UiDrawerHeader>
|
|
306
|
-
<div class="p-4 pt-0 body-
|
|
306
|
+
<div class="p-4 pt-0 body-s-regular">
|
|
307
307
|
Try selecting text outside the drawer.
|
|
308
308
|
</div>
|
|
309
309
|
<UiDrawerFooter>
|
|
@@ -335,7 +335,7 @@ export const NonModal: Story = {
|
|
|
335
335
|
},
|
|
336
336
|
template: `
|
|
337
337
|
<div class="gap-y-4">
|
|
338
|
-
<p class="body-
|
|
338
|
+
<p class="body-s-regular text-content-on-surface-muted">
|
|
339
339
|
Non-modal drawer: you can still interact with the page while it is open.
|
|
340
340
|
</p>
|
|
341
341
|
<UiDrawer :modal="false">
|
|
@@ -349,7 +349,7 @@ export const NonModal: Story = {
|
|
|
349
349
|
Outside interaction is allowed.
|
|
350
350
|
</UiDrawerDescription>
|
|
351
351
|
</UiDrawerHeader>
|
|
352
|
-
<div class="p-4 pt-0 body-
|
|
352
|
+
<div class="p-4 pt-0 body-s-regular">
|
|
353
353
|
Try selecting text outside the drawer.
|
|
354
354
|
</div>
|
|
355
355
|
<UiDrawerFooter>
|
|
@@ -394,7 +394,7 @@ import {
|
|
|
394
394
|
The drawer handle bar is disabled via showHandle.
|
|
395
395
|
</UiDrawerDescription>
|
|
396
396
|
</UiDrawerHeader>
|
|
397
|
-
<div class="p-4 pt-0 body-
|
|
397
|
+
<div class="p-4 pt-0 body-s-regular">
|
|
398
398
|
Content without handle.
|
|
399
399
|
</div>
|
|
400
400
|
<UiDrawerFooter>
|
|
@@ -435,7 +435,7 @@ export const WithoutHandle: Story = {
|
|
|
435
435
|
The drawer handle bar is disabled via showHandle.
|
|
436
436
|
</UiDrawerDescription>
|
|
437
437
|
</UiDrawerHeader>
|
|
438
|
-
<div class="p-4 pt-0 body-
|
|
438
|
+
<div class="p-4 pt-0 body-s-regular">
|
|
439
439
|
Content without handle.
|
|
440
440
|
</div>
|
|
441
441
|
<UiDrawerFooter>
|
|
@@ -480,7 +480,7 @@ import {
|
|
|
480
480
|
</UiDrawerDescription>
|
|
481
481
|
</UiDrawerHeader>
|
|
482
482
|
<div class="px-4 pb-4 pt-0">
|
|
483
|
-
<div class="h-80 overflow-auto rounded-md border p-3 body-
|
|
483
|
+
<div class="h-80 overflow-auto rounded-md border p-3 body-s-regular gap-y-2">
|
|
484
484
|
<p v-for="i in 30" :key="i">Row {{ i }}</p>
|
|
485
485
|
</div>
|
|
486
486
|
</div>
|
|
@@ -523,7 +523,7 @@ export const LongContent: Story = {
|
|
|
523
523
|
</UiDrawerDescription>
|
|
524
524
|
</UiDrawerHeader>
|
|
525
525
|
<div class="px-4 pb-4 pt-0">
|
|
526
|
-
<div class="h-80 overflow-auto rounded-md border p-3 body-
|
|
526
|
+
<div class="h-80 overflow-auto rounded-md border p-3 body-s-regular gap-y-2">
|
|
527
527
|
<p v-for="i in 30" :key="i">Row {{ i }}</p>
|
|
528
528
|
</div>
|
|
529
529
|
</div>
|
|
@@ -571,7 +571,7 @@ const open = ref(true)
|
|
|
571
571
|
Useful for visual regression testing.
|
|
572
572
|
</UiDrawerDescription>
|
|
573
573
|
</UiDrawerHeader>
|
|
574
|
-
<div class="p-4 pt-0 body-
|
|
574
|
+
<div class="p-4 pt-0 body-s-regular">
|
|
575
575
|
This drawer starts open.
|
|
576
576
|
</div>
|
|
577
577
|
<UiDrawerFooter>
|
|
@@ -616,7 +616,7 @@ export const OpenByDefault: Story = {
|
|
|
616
616
|
Useful for visual regression testing.
|
|
617
617
|
</UiDrawerDescription>
|
|
618
618
|
</UiDrawerHeader>
|
|
619
|
-
<div class="p-4 pt-0 body-
|
|
619
|
+
<div class="p-4 pt-0 body-s-regular">
|
|
620
620
|
This drawer starts open.
|
|
621
621
|
</div>
|
|
622
622
|
<UiDrawerFooter>
|
|
@@ -700,10 +700,10 @@ export const Accessibility: Story = {
|
|
|
700
700
|
|
|
701
701
|
<div class="flex flex-col gap-6">
|
|
702
702
|
<div class="flex flex-col gap-2">
|
|
703
|
-
<h3 class="body-
|
|
703
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
704
704
|
Always include a title
|
|
705
705
|
</h3>
|
|
706
|
-
<p class="body-
|
|
706
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
707
707
|
<code>UiDrawerTitle</code> becomes the drawer's accessible name
|
|
708
708
|
via <code>aria-labelledby</code>. Without it the panel is
|
|
709
709
|
announced as an unnamed dialog, and a screen-reader user has no
|
|
@@ -712,10 +712,10 @@ export const Accessibility: Story = {
|
|
|
712
712
|
</div>
|
|
713
713
|
|
|
714
714
|
<div class="flex flex-col gap-2">
|
|
715
|
-
<h3 class="body-
|
|
715
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
716
716
|
Describe what the drawer is for
|
|
717
717
|
</h3>
|
|
718
|
-
<p class="body-
|
|
718
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
719
719
|
<code>UiDrawerDescription</code> is wired up as
|
|
720
720
|
<code>aria-describedby</code>, so it is read straight after the
|
|
721
721
|
title. Keep it to one sentence that explains the purpose rather
|
|
@@ -724,10 +724,10 @@ export const Accessibility: Story = {
|
|
|
724
724
|
</div>
|
|
725
725
|
|
|
726
726
|
<div class="flex flex-col gap-2">
|
|
727
|
-
<h3 class="body-
|
|
727
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
728
728
|
Keep it dismissible from the keyboard
|
|
729
729
|
</h3>
|
|
730
|
-
<p class="body-
|
|
730
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
731
731
|
A modal drawer traps focus, so it must always offer a way out.
|
|
732
732
|
<code>Escape</code> closes it and focus returns to the trigger;
|
|
733
733
|
add a <code>UiDrawerClose</code> button in the footer so the exit
|
|
@@ -736,10 +736,10 @@ export const Accessibility: Story = {
|
|
|
736
736
|
</div>
|
|
737
737
|
|
|
738
738
|
<div class="flex flex-col gap-2">
|
|
739
|
-
<h3 class="body-
|
|
739
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
740
740
|
The handle is decorative
|
|
741
741
|
</h3>
|
|
742
|
-
<p class="body-
|
|
742
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
743
743
|
The grab handle at the top of the sheet is presentational only —
|
|
744
744
|
it is not focusable and announces nothing. Never make it the only
|
|
745
745
|
way to close the drawer.
|
|
@@ -747,10 +747,10 @@ export const Accessibility: Story = {
|
|
|
747
747
|
</div>
|
|
748
748
|
|
|
749
749
|
<div class="flex flex-col gap-2">
|
|
750
|
-
<h3 class="body-
|
|
750
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
751
751
|
Enable accessibility theme
|
|
752
752
|
</h3>
|
|
753
|
-
<p class="body-
|
|
753
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
754
754
|
When accessibility is required, enable our accessibility theme.
|
|
755
755
|
This increases contrast and makes sure there are no color
|
|
756
756
|
contrast issues.
|
|
@@ -760,7 +760,7 @@ export const Accessibility: Story = {
|
|
|
760
760
|
|
|
761
761
|
<div class="grid gap-4 md:grid-cols-2">
|
|
762
762
|
<div class="flex flex-col gap-3">
|
|
763
|
-
<h3 class="label-
|
|
763
|
+
<h3 class="label-m-medium text-center text-content-on-surface-primary">
|
|
764
764
|
Default
|
|
765
765
|
</h3>
|
|
766
766
|
<div class="flex min-h-20 items-center justify-center border border-border-surface-default p-6">
|
|
@@ -775,7 +775,7 @@ export const Accessibility: Story = {
|
|
|
775
775
|
Review the details below before continuing.
|
|
776
776
|
</UiDrawerDescription>
|
|
777
777
|
</UiDrawerHeader>
|
|
778
|
-
<div class="p-4 pt-0 body-
|
|
778
|
+
<div class="p-4 pt-0 body-s-regular">Put any content here.</div>
|
|
779
779
|
<UiDrawerFooter>
|
|
780
780
|
<UiDrawerClose as-child>
|
|
781
781
|
<UiButton>Close</UiButton>
|
|
@@ -787,7 +787,7 @@ export const Accessibility: Story = {
|
|
|
787
787
|
</div>
|
|
788
788
|
|
|
789
789
|
<div class="accessible-theme flex flex-col gap-3">
|
|
790
|
-
<h3 class="label-
|
|
790
|
+
<h3 class="label-m-medium text-center text-content-on-surface-primary">
|
|
791
791
|
Accessible
|
|
792
792
|
</h3>
|
|
793
793
|
<div class="flex min-h-20 items-center justify-center border border-border-surface-default p-6">
|
|
@@ -802,7 +802,7 @@ export const Accessibility: Story = {
|
|
|
802
802
|
Review the details below before continuing.
|
|
803
803
|
</UiDrawerDescription>
|
|
804
804
|
</UiDrawerHeader>
|
|
805
|
-
<div class="p-4 pt-0 body-
|
|
805
|
+
<div class="p-4 pt-0 body-s-regular">Put any content here.</div>
|
|
806
806
|
<UiDrawerFooter>
|
|
807
807
|
<UiDrawerClose as-child>
|
|
808
808
|
<UiButton>Close</UiButton>
|
|
@@ -912,7 +912,7 @@ function renderTestDrawer() {
|
|
|
912
912
|
Review the details below before continuing.
|
|
913
913
|
</UiDrawerDescription>
|
|
914
914
|
</UiDrawerHeader>
|
|
915
|
-
<div class="p-4 pt-0 body-
|
|
915
|
+
<div class="p-4 pt-0 body-s-regular">Put any content here.</div>
|
|
916
916
|
<UiDrawerFooter>
|
|
917
917
|
<UiDrawerClose as-child>
|
|
918
918
|
<UiButton>Close</UiButton>
|
|
@@ -1793,8 +1793,8 @@ const open = ref(false)
|
|
|
1793
1793
|
<UiAvatarFallback>CN</UiAvatarFallback>
|
|
1794
1794
|
</UiAvatar>
|
|
1795
1795
|
<div class="flex flex-col items-start overflow-hidden">
|
|
1796
|
-
<span class="truncate label-
|
|
1797
|
-
<span class="truncate label-
|
|
1796
|
+
<span class="truncate label-s-medium">Sofia Davis</span>
|
|
1797
|
+
<span class="truncate label-xs-regular text-content-on-surface-muted font-normal">sofia@example.com</span>
|
|
1798
1798
|
</div>
|
|
1799
1799
|
<UiIcon name="chevrons-up-down" :size="16" class="shrink-0 text-content-on-surface-muted" />
|
|
1800
1800
|
</UiButton>
|
|
@@ -1851,8 +1851,8 @@ export const WithAvatarTrigger: Story = {
|
|
|
1851
1851
|
<UiAvatarFallback>CN</UiAvatarFallback>
|
|
1852
1852
|
</UiAvatar>
|
|
1853
1853
|
<div class="flex flex-col items-start overflow-hidden">
|
|
1854
|
-
<span class="truncate label-
|
|
1855
|
-
<span class="truncate label-
|
|
1854
|
+
<span class="truncate label-s-medium">Sofia Davis</span>
|
|
1855
|
+
<span class="truncate label-xs-regular text-content-on-surface-muted font-normal">sofia@example.com</span>
|
|
1856
1856
|
</div>
|
|
1857
1857
|
<UiIcon name="chevrons-up-down" :size="16" class="shrink-0 text-content-on-surface-muted" />
|
|
1858
1858
|
</UiButton>
|
|
@@ -1958,11 +1958,11 @@ export const Accessibility: Story = {
|
|
|
1958
1958
|
</h2>
|
|
1959
1959
|
|
|
1960
1960
|
<div class="flex flex-col gap-2">
|
|
1961
|
-
<h3 class="body-
|
|
1961
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
1962
1962
|
Requirements
|
|
1963
1963
|
</h3>
|
|
1964
|
-
<ul class="body-
|
|
1965
|
-
<li>The trigger needs a name of its own: give an icon-only trigger an <code class="label-
|
|
1964
|
+
<ul class="body-m-regular list-disc pl-5 text-content-on-surface-primary">
|
|
1965
|
+
<li>The trigger needs a name of its own: give an icon-only trigger an <code class="label-s-regular">aria-label</code>, since the icon is not read out.</li>
|
|
1966
1966
|
<li>The trigger tells assistive technology that it opens a menu, and whether that menu is currently open.</li>
|
|
1967
1967
|
<li>Every row is announced as a menu item, named by the text you can see; icons in an item are decoration and add nothing to that name.</li>
|
|
1968
1968
|
<li>A label groups the items below it and is not a choice — it cannot be focused or activated.</li>
|
|
@@ -1970,19 +1970,19 @@ export const Accessibility: Story = {
|
|
|
1970
1970
|
<li>Checkbox and radio items report checked and selected, so the state is spoken and not carried by the tick alone.</li>
|
|
1971
1971
|
<li>An item that leads to a second level says so, and opens with the right arrow key as well as on hover.</li>
|
|
1972
1972
|
<li>Enter or Space opens the menu, the arrow keys walk it, Home and End jump to its ends, and Escape closes it and puts focus back on the trigger.</li>
|
|
1973
|
-
<li>A modal menu hides the rest of the page from assistive technology. Pass <code class="label-
|
|
1973
|
+
<li>A modal menu hides the rest of the page from assistive technology. Pass <code class="label-s-regular">:modal="false"</code> when what is behind the menu should stay available.</li>
|
|
1974
1974
|
<li>Triggers need a touch target of at least 24px; every row is 36px tall, so it meets that on its own.</li>
|
|
1975
1975
|
<li>On a phone only five rows are in view and the rest scroll under a fade. The fade is decoration: the rows behind it are still in the tree, the arrow keys still reach them, and the list scrolls to keep the focused row visible.</li>
|
|
1976
1976
|
<li>On a phone a second level opens stacked 8px above or below its row, as wide as the menu, and dims the rest of the menu. It is still a menu named by its row: the row says it is expanded, the right arrow key opens it and moves focus into it, and the left arrow key closes it and puts focus back on the row.</li>
|
|
1977
|
-
<li>Put the checked state on the row, not on a control inside it: a switch or checkbox inside a menu item is nested interactive content. Give the row <code class="label-
|
|
1977
|
+
<li>Put the checked state on the row, not on a control inside it: a switch or checkbox inside a menu item is nested interactive content. Give the row <code class="label-s-regular">role="menuitemcheckbox"</code> and <code class="label-s-regular">aria-checked</code>, and mark the visual control <code class="label-s-regular">inert</code>.</li>
|
|
1978
1978
|
</ul>
|
|
1979
1979
|
</div>
|
|
1980
1980
|
|
|
1981
1981
|
<div class="flex flex-col gap-2">
|
|
1982
|
-
<h3 class="body-
|
|
1982
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
1983
1983
|
Enable accessibility theme
|
|
1984
1984
|
</h3>
|
|
1985
|
-
<p class="body-
|
|
1985
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
1986
1986
|
When accessibility is required, enable our accessibility theme. This
|
|
1987
1987
|
increases contrast and ensures there are no color contrast issues.
|
|
1988
1988
|
</p>
|
|
@@ -1990,14 +1990,14 @@ export const Accessibility: Story = {
|
|
|
1990
1990
|
|
|
1991
1991
|
<div class="flex flex-wrap gap-12">
|
|
1992
1992
|
<div class="flex w-64 flex-col gap-3">
|
|
1993
|
-
<h3 class="label-
|
|
1993
|
+
<h3 class="label-m-medium text-content-on-surface-primary">
|
|
1994
1994
|
Default
|
|
1995
1995
|
</h3>
|
|
1996
1996
|
<div class="min-h-72">${themedMenu()}</div>
|
|
1997
1997
|
</div>
|
|
1998
1998
|
|
|
1999
1999
|
<div class="flex w-64 flex-col gap-3">
|
|
2000
|
-
<h3 class="label-
|
|
2000
|
+
<h3 class="label-m-medium text-content-on-surface-primary">
|
|
2001
2001
|
Accessible
|
|
2002
2002
|
</h3>
|
|
2003
2003
|
<div class="min-h-72">${themedMenu('accessible-theme')}</div>
|
|
@@ -26,7 +26,7 @@ const props = withDefaults(defineProps<UiEmptyProps>(), {
|
|
|
26
26
|
|
|
27
27
|
<p
|
|
28
28
|
v-if="props.description"
|
|
29
|
-
class="body-
|
|
29
|
+
class="body-s-regular max-w-sm text-content-on-surface-muted"
|
|
30
30
|
>
|
|
31
31
|
{{ props.description }}
|
|
32
32
|
</p>
|