@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
|
@@ -392,10 +392,10 @@ export const Accessibility: Story = {
|
|
|
392
392
|
|
|
393
393
|
<div class="flex flex-col gap-6">
|
|
394
394
|
<div class="flex flex-col gap-2">
|
|
395
|
-
<h3 class="body-
|
|
395
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
396
396
|
Mount the alert to announce it
|
|
397
397
|
</h3>
|
|
398
|
-
<p class="body-
|
|
398
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
399
399
|
<code>UiAlert</code> renders <code>role="alert"</code>, which is
|
|
400
400
|
an assertive live region. Screen readers announce it when it
|
|
401
401
|
enters the page, so render it in response to the event it reports
|
|
@@ -406,10 +406,10 @@ export const Accessibility: Story = {
|
|
|
406
406
|
</div>
|
|
407
407
|
|
|
408
408
|
<div class="flex flex-col gap-2">
|
|
409
|
-
<h3 class="body-
|
|
409
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
410
410
|
Don't rely on colour or the icon
|
|
411
411
|
</h3>
|
|
412
|
-
<p class="body-
|
|
412
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
413
413
|
The variant icon is decorative — <code>UiIcon</code> marks it
|
|
414
414
|
<code>aria-hidden</code> unless you give it an
|
|
415
415
|
<code>ariaLabel</code> — and the destructive styling is colour
|
|
@@ -419,10 +419,10 @@ export const Accessibility: Story = {
|
|
|
419
419
|
</div>
|
|
420
420
|
|
|
421
421
|
<div class="flex flex-col gap-2">
|
|
422
|
-
<h3 class="body-
|
|
422
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
423
423
|
Keep announcements short
|
|
424
424
|
</h3>
|
|
425
|
-
<p class="body-
|
|
425
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
426
426
|
An alert is atomic: the whole region is read as one
|
|
427
427
|
announcement, including anything interactive inside it. Keep the
|
|
428
428
|
title and description tight, and don't pack an alert with several
|
|
@@ -431,10 +431,10 @@ export const Accessibility: Story = {
|
|
|
431
431
|
</div>
|
|
432
432
|
|
|
433
433
|
<div class="flex flex-col gap-2">
|
|
434
|
-
<h3 class="body-
|
|
434
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
435
435
|
Compose dismissal with a labelled button
|
|
436
436
|
</h3>
|
|
437
|
-
<p class="body-
|
|
437
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
438
438
|
There is no built-in dismiss. Add your own control in the content
|
|
439
439
|
column and prefer visible text such as <code>Dismiss</code> over
|
|
440
440
|
an icon-only X: it names itself and it is reachable with
|
|
@@ -445,10 +445,10 @@ export const Accessibility: Story = {
|
|
|
445
445
|
</div>
|
|
446
446
|
|
|
447
447
|
<div class="flex flex-col gap-2">
|
|
448
|
-
<h3 class="body-
|
|
448
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
449
449
|
Enable accessibility theme
|
|
450
450
|
</h3>
|
|
451
|
-
<p class="body-
|
|
451
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
452
452
|
When accessibility is required, enable our accessibility theme.
|
|
453
453
|
This increases contrast and makes sure there are no color
|
|
454
454
|
contrast issues.
|
|
@@ -458,7 +458,7 @@ export const Accessibility: Story = {
|
|
|
458
458
|
|
|
459
459
|
<div class="grid gap-4 md:grid-cols-2">
|
|
460
460
|
<div class="flex flex-col gap-3">
|
|
461
|
-
<h3 class="label-
|
|
461
|
+
<h3 class="label-m-medium text-center text-content-on-surface-primary">
|
|
462
462
|
Default
|
|
463
463
|
</h3>
|
|
464
464
|
<div class="flex flex-col gap-3 border border-border-surface-default p-6">
|
|
@@ -478,7 +478,7 @@ export const Accessibility: Story = {
|
|
|
478
478
|
</div>
|
|
479
479
|
|
|
480
480
|
<div class="accessible-theme flex flex-col gap-3">
|
|
481
|
-
<h3 class="label-
|
|
481
|
+
<h3 class="label-m-medium text-center text-content-on-surface-primary">
|
|
482
482
|
Accessible
|
|
483
483
|
</h3>
|
|
484
484
|
<div class="flex flex-col gap-3 border border-border-surface-default p-6">
|
|
@@ -911,7 +911,7 @@ export const MobileBreakpoint: Story = {
|
|
|
911
911
|
'mobile: the dismiss control meets the minimum touch-target size (WCAG 2.5.8)',
|
|
912
912
|
async () => {
|
|
913
913
|
// `UiButton size="sm"` measures exactly 24px tall, so this sits on the
|
|
914
|
-
// 2.5.8 floor with no headroom: shrinking `label-
|
|
914
|
+
// 2.5.8 floor with no headroom: shrinking `label-xs-medium` or the
|
|
915
915
|
// button's `py-1` would drop the documented pattern below conformance.
|
|
916
916
|
const { width, height } = canvas
|
|
917
917
|
.getByRole('button', { name: 'Dismiss' })
|
|
@@ -371,10 +371,10 @@ export const Accessibility: Story = {
|
|
|
371
371
|
|
|
372
372
|
<div class="flex flex-col gap-6">
|
|
373
373
|
<div class="flex flex-col gap-2">
|
|
374
|
-
<h3 class="body-
|
|
374
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
375
375
|
Enable accessibility theme
|
|
376
376
|
</h3>
|
|
377
|
-
<p class="body-
|
|
377
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
378
378
|
When accessibility is required, enable our accessibility theme. This
|
|
379
379
|
increases contrast and ensures there are no color contrast issues.
|
|
380
380
|
</p>
|
|
@@ -383,7 +383,7 @@ export const Accessibility: Story = {
|
|
|
383
383
|
|
|
384
384
|
<div class="grid gap-4 md:grid-cols-2">
|
|
385
385
|
<div class="flex flex-col gap-3">
|
|
386
|
-
<h3 class="label-
|
|
386
|
+
<h3 class="label-m-medium text-center text-content-on-surface-primary">
|
|
387
387
|
Default
|
|
388
388
|
</h3>
|
|
389
389
|
<div class="flex min-h-20 items-center justify-center border border-border-surface-default p-6">
|
|
@@ -409,7 +409,7 @@ export const Accessibility: Story = {
|
|
|
409
409
|
</div>
|
|
410
410
|
|
|
411
411
|
<div class="accessible-theme flex flex-col gap-3">
|
|
412
|
-
<h3 class="label-
|
|
412
|
+
<h3 class="label-m-medium text-center text-content-on-surface-primary">
|
|
413
413
|
Accessible
|
|
414
414
|
</h3>
|
|
415
415
|
<div class="flex min-h-20 items-center justify-center border border-border-surface-default p-6">
|
|
@@ -162,7 +162,7 @@ export const Multiple: Story = {
|
|
|
162
162
|
placeholder="Search fruits"
|
|
163
163
|
class="w-[220px]"
|
|
164
164
|
/>
|
|
165
|
-
<div class="label-
|
|
165
|
+
<div class="label-xs-regular text-content-on-surface-secondary">
|
|
166
166
|
Selected: {{ value.join(', ') || 'None' }}
|
|
167
167
|
</div>
|
|
168
168
|
</div>
|
|
@@ -221,13 +221,13 @@ export const States: Story = {
|
|
|
221
221
|
},
|
|
222
222
|
template: `
|
|
223
223
|
<div class="grid w-fit grid-cols-[auto_220px] items-center gap-x-6 gap-y-4">
|
|
224
|
-
<span class="label-
|
|
224
|
+
<span class="label-s-medium text-content-on-surface-primary text-right">Default</span>
|
|
225
225
|
<UiAutocomplete v-model="emptyValue" :options="fruits" placeholder="Placeholder" />
|
|
226
226
|
|
|
227
|
-
<span class="label-
|
|
227
|
+
<span class="label-s-medium text-content-on-surface-primary text-right">Filled</span>
|
|
228
228
|
<UiAutocomplete v-model="filledValue" :options="fruits" placeholder="Placeholder" />
|
|
229
229
|
|
|
230
|
-
<span class="label-
|
|
230
|
+
<span class="label-s-medium text-content-on-surface-primary text-right">Disabled</span>
|
|
231
231
|
<UiAutocomplete v-model="disabledValue" :options="fruits" placeholder="Placeholder" disabled />
|
|
232
232
|
</div>
|
|
233
233
|
`,
|
|
@@ -263,7 +263,7 @@ export const WithSlots: Story = {
|
|
|
263
263
|
<template #item="{ option, selected }">
|
|
264
264
|
<div class="flex min-w-0 flex-1 items-center justify-between gap-2">
|
|
265
265
|
<span class="truncate">{{ option.label }}</span>
|
|
266
|
-
<span v-if="selected" class="label-
|
|
266
|
+
<span v-if="selected" class="label-xs-regular text-content-on-surface-muted">Selected</span>
|
|
267
267
|
</div>
|
|
268
268
|
</template>
|
|
269
269
|
</UiAutocomplete>
|
|
@@ -572,10 +572,10 @@ export const Accessibility: Story = {
|
|
|
572
572
|
|
|
573
573
|
<div class="flex flex-col gap-6">
|
|
574
574
|
<div class="flex flex-col gap-2">
|
|
575
|
-
<h3 class="body-
|
|
575
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
576
576
|
Give the input an accessible name
|
|
577
577
|
</h3>
|
|
578
|
-
<p class="body-
|
|
578
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
579
579
|
Placeholders disappear while typing, so they are not labels.
|
|
580
580
|
Pair the field with a visible label or set the
|
|
581
581
|
<code>ariaLabel</code> prop.
|
|
@@ -583,10 +583,10 @@ export const Accessibility: Story = {
|
|
|
583
583
|
</div>
|
|
584
584
|
|
|
585
585
|
<div class="flex flex-col gap-2">
|
|
586
|
-
<h3 class="body-
|
|
586
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
587
587
|
Keep disabled options visible
|
|
588
588
|
</h3>
|
|
589
|
-
<p class="body-
|
|
589
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
590
590
|
A disabled option stays in the results so users see the full set
|
|
591
591
|
of choices. When possible, explain why it is unavailable in its
|
|
592
592
|
label.
|
|
@@ -594,10 +594,10 @@ export const Accessibility: Story = {
|
|
|
594
594
|
</div>
|
|
595
595
|
|
|
596
596
|
<div class="flex flex-col gap-2">
|
|
597
|
-
<h3 class="body-
|
|
597
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
598
598
|
Enable accessibility theme
|
|
599
599
|
</h3>
|
|
600
|
-
<p class="body-
|
|
600
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
601
601
|
When accessibility is required, enable our accessibility theme.
|
|
602
602
|
This increases contrast and makes sure there are no color
|
|
603
603
|
contrast issues.
|
|
@@ -607,7 +607,7 @@ export const Accessibility: Story = {
|
|
|
607
607
|
|
|
608
608
|
<div class="grid gap-4 md:grid-cols-2">
|
|
609
609
|
<div class="flex flex-col gap-3">
|
|
610
|
-
<h3 class="label-
|
|
610
|
+
<h3 class="label-m-medium text-center text-content-on-surface-primary">
|
|
611
611
|
Default
|
|
612
612
|
</h3>
|
|
613
613
|
<div class="flex min-h-20 items-center justify-center border border-border-surface-default p-6">
|
|
@@ -621,7 +621,7 @@ export const Accessibility: Story = {
|
|
|
621
621
|
</div>
|
|
622
622
|
|
|
623
623
|
<div class="accessible-theme flex flex-col gap-3">
|
|
624
|
-
<h3 class="label-
|
|
624
|
+
<h3 class="label-m-medium text-center text-content-on-surface-primary">
|
|
625
625
|
Accessible
|
|
626
626
|
</h3>
|
|
627
627
|
<div class="flex min-h-20 items-center justify-center border border-border-surface-default p-6">
|
|
@@ -244,7 +244,7 @@ const inputSlotProps = computed(() => ({
|
|
|
244
244
|
|
|
245
245
|
const shellClasses = computed(() =>
|
|
246
246
|
cn(
|
|
247
|
-
'border-input ui-focus-ring-within aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex h-9 w-full min-w-0 items-center gap-2 rounded-md border bg-background-input-default px-3 py-2 label-
|
|
247
|
+
'border-input ui-focus-ring-within aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex h-9 w-full min-w-0 items-center gap-2 rounded-md border bg-background-input-default px-3 py-2 label-s-regular transition-[color,box-shadow]',
|
|
248
248
|
props.disabled && 'pointer-events-none cursor-not-allowed opacity-50',
|
|
249
249
|
),
|
|
250
250
|
);
|
|
@@ -558,7 +558,7 @@ provideUiAutocompleteContext({
|
|
|
558
558
|
"
|
|
559
559
|
:data-state="isSelected(option.value) ? 'checked' : 'unchecked'"
|
|
560
560
|
tabindex="-1"
|
|
561
|
-
class="hover-layer hover-layer-default focus:text-foreground data-[highlighted]:bg-background-surface-muted-subtle data-[highlighted]:text-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pl-2 label-
|
|
561
|
+
class="hover-layer hover-layer-default focus:text-foreground data-[highlighted]:bg-background-surface-muted-subtle data-[highlighted]:text-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pl-2 label-s-regular outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50"
|
|
562
562
|
:class="{
|
|
563
563
|
'pr-12': props.showIndicator,
|
|
564
564
|
'pr-2': !props.showIndicator,
|
|
@@ -598,7 +598,7 @@ provideUiAutocompleteContext({
|
|
|
598
598
|
|
|
599
599
|
<div
|
|
600
600
|
v-if="hasInternalOptions && filteredOptions.length === 0"
|
|
601
|
-
class="text-content-on-surface-muted px-2 py-1.5 label-
|
|
601
|
+
class="text-content-on-surface-muted px-2 py-1.5 label-s-regular"
|
|
602
602
|
>
|
|
603
603
|
{{ props.emptyText }}
|
|
604
604
|
</div>
|
|
@@ -248,17 +248,17 @@ export const Numbers: Story = {
|
|
|
248
248
|
class="grid min-w-[920px] gap-x-4 gap-y-3"
|
|
249
249
|
:style="{ gridTemplateColumns: '120px repeat(' + variants.length + ', minmax(0, 1fr))' }"
|
|
250
250
|
>
|
|
251
|
-
<div class="label-
|
|
251
|
+
<div class="label-xs-medium text-content-on-surface-muted">Variant</div>
|
|
252
252
|
<div
|
|
253
253
|
v-for="variant in variants"
|
|
254
254
|
:key="variant.key"
|
|
255
|
-
class="label-
|
|
255
|
+
class="label-xs-medium text-content-on-surface-muted"
|
|
256
256
|
>
|
|
257
257
|
{{ variant.label }}
|
|
258
258
|
</div>
|
|
259
259
|
|
|
260
260
|
<template v-for="state in states" :key="state.key">
|
|
261
|
-
<div class="label-
|
|
261
|
+
<div class="label-xs-medium text-content-on-surface-muted">
|
|
262
262
|
{{ state.label }}
|
|
263
263
|
</div>
|
|
264
264
|
|
|
@@ -297,17 +297,17 @@ export const Sizes: Story = {
|
|
|
297
297
|
class="grid min-w-[920px] items-center gap-x-4 gap-y-3"
|
|
298
298
|
:style="{ gridTemplateColumns: '120px repeat(' + variants.length + ', minmax(0, 1fr))' }"
|
|
299
299
|
>
|
|
300
|
-
<div class="label-
|
|
300
|
+
<div class="label-xs-medium text-content-on-surface-muted">Size</div>
|
|
301
301
|
<div
|
|
302
302
|
v-for="variant in variants"
|
|
303
303
|
:key="variant.key"
|
|
304
|
-
class="label-
|
|
304
|
+
class="label-xs-medium text-content-on-surface-muted"
|
|
305
305
|
>
|
|
306
306
|
{{ variant.label }}
|
|
307
307
|
</div>
|
|
308
308
|
|
|
309
309
|
<template v-for="size in sizes" :key="size.key">
|
|
310
|
-
<div class="label-
|
|
310
|
+
<div class="label-xs-medium text-content-on-surface-muted">
|
|
311
311
|
{{ size.label }}
|
|
312
312
|
</div>
|
|
313
313
|
|
|
@@ -356,17 +356,17 @@ export const AllVariants: Story = {
|
|
|
356
356
|
class="grid min-w-[920px] items-center gap-x-4 gap-y-3"
|
|
357
357
|
:style="{ gridTemplateColumns: '160px repeat(' + variants.length + ', minmax(0, 1fr))' }"
|
|
358
358
|
>
|
|
359
|
-
<div class="label-
|
|
359
|
+
<div class="label-xs-medium text-content-on-surface-muted">Variant</div>
|
|
360
360
|
<div
|
|
361
361
|
v-for="variant in variants"
|
|
362
362
|
:key="variant.key"
|
|
363
|
-
class="label-
|
|
363
|
+
class="label-xs-medium text-content-on-surface-muted"
|
|
364
364
|
>
|
|
365
365
|
{{ variant.label }}
|
|
366
366
|
</div>
|
|
367
367
|
|
|
368
368
|
<template v-for="row in rows" :key="row.key">
|
|
369
|
-
<div class="label-
|
|
369
|
+
<div class="label-xs-medium text-content-on-surface-muted">
|
|
370
370
|
{{ row.label }}
|
|
371
371
|
</div>
|
|
372
372
|
|
|
@@ -705,7 +705,7 @@ const isDesktop = useMediaQuery('(min-width: 768px)')
|
|
|
705
705
|
v-for="item in items.slice(1, -2)"
|
|
706
706
|
:key="item.label"
|
|
707
707
|
:href="item.href"
|
|
708
|
-
class="py-1 body-
|
|
708
|
+
class="py-1 body-s-regular"
|
|
709
709
|
>
|
|
710
710
|
{{ item.label }}
|
|
711
711
|
</a>
|
|
@@ -797,7 +797,7 @@ const renderResponsiveTrail = () => ({
|
|
|
797
797
|
v-for="item in items.slice(1, -2)"
|
|
798
798
|
:key="item.label"
|
|
799
799
|
:href="item.href"
|
|
800
|
-
class="py-1 body-
|
|
800
|
+
class="py-1 body-s-regular"
|
|
801
801
|
>
|
|
802
802
|
{{ item.label }}
|
|
803
803
|
</a>
|
|
@@ -1141,10 +1141,10 @@ export const Accessibility: Story = {
|
|
|
1141
1141
|
|
|
1142
1142
|
<div class="flex flex-col gap-6">
|
|
1143
1143
|
<div class="flex flex-col gap-2">
|
|
1144
|
-
<h3 class="body-
|
|
1144
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
1145
1145
|
The trail is already a named landmark
|
|
1146
1146
|
</h3>
|
|
1147
|
-
<p class="body-
|
|
1147
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
1148
1148
|
<code>UiBreadcrumb</code> renders a <code>nav</code> labelled
|
|
1149
1149
|
"breadcrumb" around an ordered list, so screen-reader users can jump
|
|
1150
1150
|
straight to it. You do not need to add your own
|
|
@@ -1154,10 +1154,10 @@ export const Accessibility: Story = {
|
|
|
1154
1154
|
</div>
|
|
1155
1155
|
|
|
1156
1156
|
<div class="flex flex-col gap-2">
|
|
1157
|
-
<h3 class="body-
|
|
1157
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
1158
1158
|
Mark the current page
|
|
1159
1159
|
</h3>
|
|
1160
|
-
<p class="body-
|
|
1160
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
1161
1161
|
End the trail with <code>UiBreadcrumbPage</code> instead of
|
|
1162
1162
|
<code>UiBreadcrumbLink</code>. It sets
|
|
1163
1163
|
<code>aria-current="page"</code> and is not a link, so
|
|
@@ -1167,10 +1167,10 @@ export const Accessibility: Story = {
|
|
|
1167
1167
|
</div>
|
|
1168
1168
|
|
|
1169
1169
|
<div class="flex flex-col gap-2">
|
|
1170
|
-
<h3 class="body-
|
|
1170
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
1171
1171
|
Label the collapsed-crumbs trigger
|
|
1172
1172
|
</h3>
|
|
1173
|
-
<p class="body-
|
|
1173
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
1174
1174
|
<code>UiBreadcrumbEllipsis</code> is hidden from assistive
|
|
1175
1175
|
technology, so it contributes no accessible name. When you wrap it in
|
|
1176
1176
|
a menu trigger, give that trigger an <code>aria-label</code> such as
|
|
@@ -1180,10 +1180,10 @@ export const Accessibility: Story = {
|
|
|
1180
1180
|
</div>
|
|
1181
1181
|
|
|
1182
1182
|
<div class="flex flex-col gap-2">
|
|
1183
|
-
<h3 class="body-
|
|
1183
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
1184
1184
|
Keep separators decorative
|
|
1185
1185
|
</h3>
|
|
1186
|
-
<p class="body-
|
|
1186
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
1187
1187
|
<code>UiBreadcrumbSeparator</code> is presentational and excluded
|
|
1188
1188
|
from the list, so screen readers announce the crumbs without a
|
|
1189
1189
|
"slash" between each one. Never put meaningful text in it.
|
|
@@ -1191,10 +1191,10 @@ export const Accessibility: Story = {
|
|
|
1191
1191
|
</div>
|
|
1192
1192
|
|
|
1193
1193
|
<div class="flex flex-col gap-2">
|
|
1194
|
-
<h3 class="body-
|
|
1194
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
1195
1195
|
Enable accessibility theme
|
|
1196
1196
|
</h3>
|
|
1197
|
-
<p class="body-
|
|
1197
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
1198
1198
|
When accessibility is required, enable our accessibility theme.
|
|
1199
1199
|
This increases contrast and makes sure there are no color
|
|
1200
1200
|
contrast issues.
|
|
@@ -1204,7 +1204,7 @@ export const Accessibility: Story = {
|
|
|
1204
1204
|
|
|
1205
1205
|
<div class="grid gap-4 md:grid-cols-2">
|
|
1206
1206
|
<div class="flex flex-col gap-3">
|
|
1207
|
-
<h3 class="label-
|
|
1207
|
+
<h3 class="label-m-medium text-center text-content-on-surface-primary">
|
|
1208
1208
|
Default
|
|
1209
1209
|
</h3>
|
|
1210
1210
|
<div class="flex min-h-20 items-center justify-center border border-border-surface-default p-6">
|
|
@@ -1227,7 +1227,7 @@ export const Accessibility: Story = {
|
|
|
1227
1227
|
</div>
|
|
1228
1228
|
|
|
1229
1229
|
<div class="accessible-theme flex flex-col gap-3">
|
|
1230
|
-
<h3 class="label-
|
|
1230
|
+
<h3 class="label-m-medium text-center text-content-on-surface-primary">
|
|
1231
1231
|
Accessible
|
|
1232
1232
|
</h3>
|
|
1233
1233
|
<div class="flex min-h-20 items-center justify-center border border-border-surface-default p-6">
|