@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
|
@@ -92,7 +92,7 @@ import { UiTextarea } from '@aleph-alpha/ui-library'
|
|
|
92
92
|
|
|
93
93
|
<template>
|
|
94
94
|
<div class="grid w-full max-w-sm items-center gap-1.5">
|
|
95
|
-
<label for="message" class="body-
|
|
95
|
+
<label for="message" class="body-s-medium">Your message</label>
|
|
96
96
|
<UiTextarea id="message" name="message" placeholder="Type your message here." />
|
|
97
97
|
</div>
|
|
98
98
|
</template>`;
|
|
@@ -107,7 +107,7 @@ export const WithLabel: Story = {
|
|
|
107
107
|
return { args };
|
|
108
108
|
},
|
|
109
109
|
template: `<div class="grid w-full max-w-sm items-center gap-1.5">
|
|
110
|
-
<label for="message" class="body-
|
|
110
|
+
<label for="message" class="body-s-medium">Your message</label>
|
|
111
111
|
<UiTextarea id="message" name="message" placeholder="Type your message here." :disabled="args.disabled" :required="args.required" />
|
|
112
112
|
</div>`,
|
|
113
113
|
}),
|
|
@@ -161,16 +161,16 @@ export const States: Story = {
|
|
|
161
161
|
},
|
|
162
162
|
template: `
|
|
163
163
|
<div class="grid w-fit grid-cols-[auto_320px] items-center gap-x-6 gap-y-4">
|
|
164
|
-
<label for="state-default" class="label-
|
|
164
|
+
<label for="state-default" class="label-s-medium text-content-on-surface-primary text-right">Default</label>
|
|
165
165
|
<UiTextarea id="state-default" name="state-default" placeholder="Placeholder" />
|
|
166
166
|
|
|
167
|
-
<label for="state-filled" class="label-
|
|
167
|
+
<label for="state-filled" class="label-s-medium text-content-on-surface-primary text-right">Filled</label>
|
|
168
168
|
<UiTextarea id="state-filled" v-model="filledValue" name="state-filled" placeholder="Placeholder" />
|
|
169
169
|
|
|
170
|
-
<label for="state-disabled" class="label-
|
|
170
|
+
<label for="state-disabled" class="label-s-medium text-content-on-surface-primary text-right">Disabled</label>
|
|
171
171
|
<UiTextarea id="state-disabled" name="state-disabled" placeholder="Placeholder" disabled />
|
|
172
172
|
|
|
173
|
-
<label for="state-error" class="label-
|
|
173
|
+
<label for="state-error" class="label-s-medium text-content-on-surface-primary text-right">Error</label>
|
|
174
174
|
<UiTextarea
|
|
175
175
|
id="state-error"
|
|
176
176
|
name="state-error"
|
|
@@ -299,10 +299,10 @@ export const Accessibility: Story = {
|
|
|
299
299
|
|
|
300
300
|
<div class="flex flex-col gap-6">
|
|
301
301
|
<div class="flex flex-col gap-2">
|
|
302
|
-
<h3 class="body-
|
|
302
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
303
303
|
Enable accessibility theme
|
|
304
304
|
</h3>
|
|
305
|
-
<p class="body-
|
|
305
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
306
306
|
When accessibility is required, enable our accessibility theme. This
|
|
307
307
|
increases contrast and ensures there are no color contrast issues.
|
|
308
308
|
</p>
|
|
@@ -311,7 +311,7 @@ export const Accessibility: Story = {
|
|
|
311
311
|
|
|
312
312
|
<div class="grid gap-4 md:grid-cols-2">
|
|
313
313
|
<div class="flex flex-col gap-3">
|
|
314
|
-
<h3 class="label-
|
|
314
|
+
<h3 class="label-m-medium text-center text-content-on-surface-primary">
|
|
315
315
|
Default
|
|
316
316
|
</h3>
|
|
317
317
|
<div class="flex min-h-20 items-center justify-center border border-border-surface-default p-6">
|
|
@@ -320,7 +320,7 @@ export const Accessibility: Story = {
|
|
|
320
320
|
</div>
|
|
321
321
|
|
|
322
322
|
<div class="accessible-theme flex flex-col gap-3">
|
|
323
|
-
<h3 class="label-
|
|
323
|
+
<h3 class="label-m-medium text-center text-content-on-surface-primary">
|
|
324
324
|
Accessible
|
|
325
325
|
</h3>
|
|
326
326
|
<div class="flex min-h-20 items-center justify-center border border-border-surface-default p-6">
|
|
@@ -360,11 +360,11 @@ export const KeyboardNavigation: Story = {
|
|
|
360
360
|
},
|
|
361
361
|
template: `<div class="flex flex-col gap-4">
|
|
362
362
|
<div class="grid w-full max-w-sm items-center gap-1.5">
|
|
363
|
-
<label for="kbd-notes" class="body-
|
|
363
|
+
<label for="kbd-notes" class="body-s-medium">Notes</label>
|
|
364
364
|
<UiTextarea id="kbd-notes" name="kbd-notes" placeholder="Add a note" @update:model-value="onUpdate" />
|
|
365
365
|
</div>
|
|
366
366
|
<div class="grid w-full max-w-sm items-center gap-1.5">
|
|
367
|
-
<label for="kbd-issue" class="body-
|
|
367
|
+
<label for="kbd-issue" class="body-s-medium">Issue</label>
|
|
368
368
|
<UiTextarea id="kbd-issue" name="kbd-issue" placeholder="Describe the issue" aria-invalid="true" />
|
|
369
369
|
</div>
|
|
370
370
|
<span
|
|
@@ -440,15 +440,15 @@ export const ScreenReader: Story = {
|
|
|
440
440
|
components: { UiTextarea },
|
|
441
441
|
template: `<div class="flex flex-col gap-4">
|
|
442
442
|
<div class="grid w-full max-w-sm items-center gap-1.5">
|
|
443
|
-
<label for="sr-notes" class="body-
|
|
443
|
+
<label for="sr-notes" class="body-s-medium">Notes</label>
|
|
444
444
|
<UiTextarea id="sr-notes" name="sr-notes" placeholder="Add a note" />
|
|
445
445
|
</div>
|
|
446
446
|
<div class="grid w-full max-w-sm items-center gap-1.5">
|
|
447
|
-
<label for="sr-issue" class="body-
|
|
447
|
+
<label for="sr-issue" class="body-s-medium">Issue</label>
|
|
448
448
|
<UiTextarea id="sr-issue" name="sr-issue" placeholder="Describe the issue" aria-invalid="true" />
|
|
449
449
|
</div>
|
|
450
450
|
<div class="grid w-full max-w-sm items-center gap-1.5">
|
|
451
|
-
<label for="sr-archived" class="body-
|
|
451
|
+
<label for="sr-archived" class="body-s-medium">Archived</label>
|
|
452
452
|
<UiTextarea id="sr-archived" name="sr-archived" placeholder="Archived notes" disabled />
|
|
453
453
|
</div>
|
|
454
454
|
</div>`,
|
|
@@ -517,7 +517,7 @@ export const TextEntry: Story = {
|
|
|
517
517
|
return { onUpdate };
|
|
518
518
|
},
|
|
519
519
|
template: `<div class="grid w-full max-w-sm items-center gap-1.5">
|
|
520
|
-
<label for="notes" class="body-
|
|
520
|
+
<label for="notes" class="body-s-medium">Notes</label>
|
|
521
521
|
<UiTextarea id="notes" name="notes" placeholder="Add a note" @update:model-value="onUpdate" />
|
|
522
522
|
</div>`,
|
|
523
523
|
}),
|
|
@@ -572,7 +572,7 @@ import { UiTextarea } from '@aleph-alpha/ui-library'
|
|
|
572
572
|
|
|
573
573
|
<template>
|
|
574
574
|
<div class="grid w-full max-w-sm items-center gap-1.5">
|
|
575
|
-
<label for="zoom-notes" class="body-
|
|
575
|
+
<label for="zoom-notes" class="body-s-medium">Notes</label>
|
|
576
576
|
<UiTextarea id="zoom-notes" name="notes" placeholder="Add a note" />
|
|
577
577
|
</div>
|
|
578
578
|
</template>`;
|
|
@@ -590,7 +590,7 @@ export const ZoomMagnification: Story = {
|
|
|
590
590
|
return { onUpdate };
|
|
591
591
|
},
|
|
592
592
|
template: `<div class="grid w-full max-w-sm items-center gap-1.5">
|
|
593
|
-
<label for="zoom-notes" class="body-
|
|
593
|
+
<label for="zoom-notes" class="body-s-medium">Notes</label>
|
|
594
594
|
<UiTextarea id="zoom-notes" name="notes" placeholder="Add a note" @update:model-value="onUpdate" />
|
|
595
595
|
</div>`,
|
|
596
596
|
}),
|
|
@@ -642,7 +642,7 @@ import { UiTextarea } from '@aleph-alpha/ui-library'
|
|
|
642
642
|
|
|
643
643
|
<template>
|
|
644
644
|
<div class="grid w-full max-w-sm items-center gap-1.5">
|
|
645
|
-
<label for="mobile-message" class="body-
|
|
645
|
+
<label for="mobile-message" class="body-s-medium">Your message</label>
|
|
646
646
|
<UiTextarea id="mobile-message" name="message" placeholder="Type your message here." />
|
|
647
647
|
</div>
|
|
648
648
|
</template>`;
|
|
@@ -662,7 +662,7 @@ export const MobileBreakpoint: Story = {
|
|
|
662
662
|
return { onUpdate };
|
|
663
663
|
},
|
|
664
664
|
template: `<div class="grid w-full max-w-sm items-center gap-1.5">
|
|
665
|
-
<label for="mobile-message" class="body-
|
|
665
|
+
<label for="mobile-message" class="body-s-medium">Your message</label>
|
|
666
666
|
<UiTextarea id="mobile-message" name="message" placeholder="Type your message here." @update:model-value="onUpdate" />
|
|
667
667
|
</div>`,
|
|
668
668
|
}),
|
|
@@ -617,7 +617,7 @@ import { UiToggle } from '@aleph-alpha/ui-library'
|
|
|
617
617
|
<div class="flex flex-col gap-6">
|
|
618
618
|
<!-- Variants, unpressed and pressed -->
|
|
619
619
|
<div>
|
|
620
|
-
<p class="body-
|
|
620
|
+
<p class="body-s-medium mb-2">Variants</p>
|
|
621
621
|
<div class="flex items-center gap-2">
|
|
622
622
|
<UiToggle left-icon="chevron-up" right-icon="chevron-down">Filter</UiToggle>
|
|
623
623
|
<UiToggle default-value left-icon="chevron-up" right-icon="chevron-down">Filter</UiToggle>
|
|
@@ -630,7 +630,7 @@ import { UiToggle } from '@aleph-alpha/ui-library'
|
|
|
630
630
|
|
|
631
631
|
<!-- Pressed fill: muted surface vs the soft overlay used by menu triggers -->
|
|
632
632
|
<div>
|
|
633
|
-
<p class="body-
|
|
633
|
+
<p class="body-s-medium mb-2">Pressed fill</p>
|
|
634
634
|
<div class="flex items-center gap-2">
|
|
635
635
|
<UiToggle default-value left-icon="chevron-up" right-icon="chevron-down">Density</UiToggle>
|
|
636
636
|
<UiToggle soft default-value left-icon="chevron-up" right-icon="chevron-down">Density</UiToggle>
|
|
@@ -639,7 +639,7 @@ import { UiToggle } from '@aleph-alpha/ui-library'
|
|
|
639
639
|
|
|
640
640
|
<!-- Sizes -->
|
|
641
641
|
<div>
|
|
642
|
-
<p class="body-
|
|
642
|
+
<p class="body-s-medium mb-2">Sizes</p>
|
|
643
643
|
<div class="flex items-center gap-2">
|
|
644
644
|
<UiToggle size="sm" left-icon="chevron-up" right-icon="chevron-down">Small</UiToggle>
|
|
645
645
|
<UiToggle left-icon="chevron-up" right-icon="chevron-down">Default</UiToggle>
|
|
@@ -649,7 +649,7 @@ import { UiToggle } from '@aleph-alpha/ui-library'
|
|
|
649
649
|
|
|
650
650
|
<!-- Label only, and icon only -->
|
|
651
651
|
<div>
|
|
652
|
-
<p class="body-
|
|
652
|
+
<p class="body-s-medium mb-2">Without both icons</p>
|
|
653
653
|
<div class="flex items-center gap-2">
|
|
654
654
|
<UiToggle>Rows</UiToggle>
|
|
655
655
|
<UiToggle default-value>Rows</UiToggle>
|
|
@@ -659,7 +659,7 @@ import { UiToggle } from '@aleph-alpha/ui-library'
|
|
|
659
659
|
|
|
660
660
|
<!-- Disabled -->
|
|
661
661
|
<div>
|
|
662
|
-
<p class="body-
|
|
662
|
+
<p class="body-s-medium mb-2">Disabled</p>
|
|
663
663
|
<div class="flex items-center gap-2">
|
|
664
664
|
<UiToggle disabled left-icon="chevron-up" right-icon="chevron-down">Export</UiToggle>
|
|
665
665
|
<UiToggle disabled default-value left-icon="chevron-up" right-icon="chevron-down">Export</UiToggle>
|
|
@@ -684,7 +684,7 @@ export const AllStates: Story = {
|
|
|
684
684
|
template: `
|
|
685
685
|
<div class="flex flex-col gap-6">
|
|
686
686
|
<div>
|
|
687
|
-
<p class="body-
|
|
687
|
+
<p class="body-s-medium mb-2">Variants</p>
|
|
688
688
|
<div class="flex items-center gap-2">
|
|
689
689
|
<UiToggle left-icon="chevron-up" right-icon="chevron-down">Filter</UiToggle>
|
|
690
690
|
<UiToggle default-value left-icon="chevron-up" right-icon="chevron-down">Filter</UiToggle>
|
|
@@ -696,7 +696,7 @@ export const AllStates: Story = {
|
|
|
696
696
|
</div>
|
|
697
697
|
|
|
698
698
|
<div>
|
|
699
|
-
<p class="body-
|
|
699
|
+
<p class="body-s-medium mb-2">Pressed fill</p>
|
|
700
700
|
<div class="flex items-center gap-2">
|
|
701
701
|
<UiToggle default-value left-icon="chevron-up" right-icon="chevron-down">Density</UiToggle>
|
|
702
702
|
<UiToggle soft default-value left-icon="chevron-up" right-icon="chevron-down">Density</UiToggle>
|
|
@@ -704,7 +704,7 @@ export const AllStates: Story = {
|
|
|
704
704
|
</div>
|
|
705
705
|
|
|
706
706
|
<div>
|
|
707
|
-
<p class="body-
|
|
707
|
+
<p class="body-s-medium mb-2">Sizes</p>
|
|
708
708
|
<div class="flex items-center gap-2">
|
|
709
709
|
<UiToggle variant="outline" size="sm" left-icon="chevron-up" right-icon="chevron-down">Small</UiToggle>
|
|
710
710
|
<UiToggle variant="outline" left-icon="chevron-up" right-icon="chevron-down">Default</UiToggle>
|
|
@@ -713,7 +713,7 @@ export const AllStates: Story = {
|
|
|
713
713
|
</div>
|
|
714
714
|
|
|
715
715
|
<div>
|
|
716
|
-
<p class="body-
|
|
716
|
+
<p class="body-s-medium mb-2">Without both icons</p>
|
|
717
717
|
<div class="flex items-center gap-2">
|
|
718
718
|
<UiToggle>Rows</UiToggle>
|
|
719
719
|
<UiToggle default-value>Rows</UiToggle>
|
|
@@ -722,7 +722,7 @@ export const AllStates: Story = {
|
|
|
722
722
|
</div>
|
|
723
723
|
|
|
724
724
|
<div>
|
|
725
|
-
<p class="body-
|
|
725
|
+
<p class="body-s-medium mb-2">Disabled</p>
|
|
726
726
|
<div class="flex items-center gap-2">
|
|
727
727
|
<UiToggle disabled left-icon="chevron-up" right-icon="chevron-down">Export</UiToggle>
|
|
728
728
|
<UiToggle disabled default-value left-icon="chevron-up" right-icon="chevron-down">Export</UiToggle>
|
|
@@ -819,10 +819,10 @@ export const Accessibility: Story = {
|
|
|
819
819
|
|
|
820
820
|
<div class="flex flex-col gap-6">
|
|
821
821
|
<div class="flex flex-col gap-2">
|
|
822
|
-
<h3 class="body-
|
|
822
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
823
823
|
Name an icon-only toggle explicitly
|
|
824
824
|
</h3>
|
|
825
|
-
<p class="body-
|
|
825
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
826
826
|
<code>leftIcon</code> and <code>rightIcon</code> render
|
|
827
827
|
<code>aria-hidden</code>, so a toggle that carries nothing but a
|
|
828
828
|
chevron has no accessible name. Give it an
|
|
@@ -832,10 +832,10 @@ export const Accessibility: Story = {
|
|
|
832
832
|
</div>
|
|
833
833
|
|
|
834
834
|
<div class="flex flex-col gap-2">
|
|
835
|
-
<h3 class="body-
|
|
835
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
836
836
|
Name the control, not its state
|
|
837
837
|
</h3>
|
|
838
|
-
<p class="body-
|
|
838
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
839
839
|
Pressed and unpressed are announced through
|
|
840
840
|
<code>aria-pressed</code>, which the component sets for you. Label
|
|
841
841
|
the toggle "Filter", not "Filter (open)" or "Close filters", so
|
|
@@ -844,10 +844,10 @@ export const Accessibility: Story = {
|
|
|
844
844
|
</div>
|
|
845
845
|
|
|
846
846
|
<div class="flex flex-col gap-2">
|
|
847
|
-
<h3 class="body-
|
|
847
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
848
848
|
Keep the visible text in the accessible name
|
|
849
849
|
</h3>
|
|
850
|
-
<p class="body-
|
|
850
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
851
851
|
When the toggle has a label, let that text be the name and skip
|
|
852
852
|
the <code>aria-label</code>. An override that does not contain the
|
|
853
853
|
visible words leaves speech-input users unable to activate the
|
|
@@ -856,10 +856,10 @@ export const Accessibility: Story = {
|
|
|
856
856
|
</div>
|
|
857
857
|
|
|
858
858
|
<div class="flex flex-col gap-2">
|
|
859
|
-
<h3 class="body-
|
|
859
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
860
860
|
A chevron is a hint, not the state
|
|
861
861
|
</h3>
|
|
862
|
-
<p class="body-
|
|
862
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
863
863
|
Chevrons suggest that something opens, but they are decorative and
|
|
864
864
|
never announced. Whether the toggle is pressed travels through
|
|
865
865
|
<code>aria-pressed</code> alone, so the icons may stay fixed — as
|
|
@@ -869,10 +869,10 @@ export const Accessibility: Story = {
|
|
|
869
869
|
</div>
|
|
870
870
|
|
|
871
871
|
<div class="flex flex-col gap-2">
|
|
872
|
-
<h3 class="body-
|
|
872
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
873
873
|
Do not rely on the fill alone
|
|
874
874
|
</h3>
|
|
875
|
-
<p class="body-
|
|
875
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
876
876
|
The default variant is borderless until it is pressed, and
|
|
877
877
|
<code>soft</code> makes that fill quieter still. Both are fine for
|
|
878
878
|
sighted users because <code>aria-pressed</code> carries the same
|
|
@@ -885,10 +885,10 @@ export const Accessibility: Story = {
|
|
|
885
885
|
</div>
|
|
886
886
|
|
|
887
887
|
<div class="flex flex-col gap-2">
|
|
888
|
-
<h3 class="body-
|
|
888
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
889
889
|
All three sizes are large enough to tap
|
|
890
890
|
</h3>
|
|
891
|
-
<p class="body-
|
|
891
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
892
892
|
The sizes differ in padding rather than in a fixed box, and every
|
|
893
893
|
one of them clears the 24×24px floor in WCAG 2.5.8 Target Size
|
|
894
894
|
(Minimum) without extra spacing around the button.
|
|
@@ -896,10 +896,10 @@ export const Accessibility: Story = {
|
|
|
896
896
|
</div>
|
|
897
897
|
|
|
898
898
|
<div class="flex flex-col gap-2">
|
|
899
|
-
<h3 class="body-
|
|
899
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
900
900
|
Enable accessibility theme
|
|
901
901
|
</h3>
|
|
902
|
-
<p class="body-
|
|
902
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
903
903
|
When accessibility is required, enable our accessibility theme.
|
|
904
904
|
This increases contrast and makes sure there are no color contrast
|
|
905
905
|
issues.
|
|
@@ -909,7 +909,7 @@ export const Accessibility: Story = {
|
|
|
909
909
|
|
|
910
910
|
<div class="grid gap-4 md:grid-cols-2">
|
|
911
911
|
<div class="flex flex-col gap-3">
|
|
912
|
-
<h3 class="label-
|
|
912
|
+
<h3 class="label-m-medium text-center text-content-on-surface-primary">
|
|
913
913
|
Default
|
|
914
914
|
</h3>
|
|
915
915
|
<div class="flex min-h-20 items-center justify-center gap-2 border border-border-surface-default p-6">
|
|
@@ -924,7 +924,7 @@ export const Accessibility: Story = {
|
|
|
924
924
|
</div>
|
|
925
925
|
|
|
926
926
|
<div class="accessible-theme flex flex-col gap-3">
|
|
927
|
-
<h3 class="label-
|
|
927
|
+
<h3 class="label-m-medium text-center text-content-on-surface-primary">
|
|
928
928
|
Accessible
|
|
929
929
|
</h3>
|
|
930
930
|
<div class="flex min-h-20 items-center justify-center gap-2 border border-border-surface-default p-6">
|
|
@@ -1201,7 +1201,7 @@ export const AllStates: Story = {
|
|
|
1201
1201
|
<h3 class="heading-s mb-4">Variants & selected fill</h3>
|
|
1202
1202
|
<div class="flex flex-col gap-4">
|
|
1203
1203
|
<div class="flex items-center gap-4">
|
|
1204
|
-
<span class="body-
|
|
1204
|
+
<span class="body-s-regular text-content-on-surface-muted w-24">Default:</span>
|
|
1205
1205
|
<UiToggleGroup v-model="multipleDefault" type="multiple" aria-label="Text formatting, default variant">
|
|
1206
1206
|
<UiToggleGroupItem v-for="item in formattingItems" :key="item.value" :value="item.value" :aria-label="item.label">
|
|
1207
1207
|
<UiIcon :name="item.icon" :size="16" />
|
|
@@ -1209,7 +1209,7 @@ export const AllStates: Story = {
|
|
|
1209
1209
|
</UiToggleGroup>
|
|
1210
1210
|
</div>
|
|
1211
1211
|
<div class="flex items-center gap-4">
|
|
1212
|
-
<span class="body-
|
|
1212
|
+
<span class="body-s-regular text-content-on-surface-muted w-24">Ghost:</span>
|
|
1213
1213
|
<UiToggleGroup v-model="multipleGhost" type="multiple" variant="ghost" aria-label="Text formatting, ghost variant">
|
|
1214
1214
|
<UiToggleGroupItem v-for="item in formattingItems" :key="item.value" :value="item.value" :aria-label="item.label">
|
|
1215
1215
|
<UiIcon :name="item.icon" :size="16" />
|
|
@@ -1217,7 +1217,7 @@ export const AllStates: Story = {
|
|
|
1217
1217
|
</UiToggleGroup>
|
|
1218
1218
|
</div>
|
|
1219
1219
|
<div class="flex items-center gap-4">
|
|
1220
|
-
<span class="body-
|
|
1220
|
+
<span class="body-s-regular text-content-on-surface-muted w-24">Outline:</span>
|
|
1221
1221
|
<UiToggleGroup v-model="multipleOutline" type="multiple" variant="outline" aria-label="Text formatting, outline variant">
|
|
1222
1222
|
<UiToggleGroupItem v-for="item in formattingItems" :key="item.value" :value="item.value" :aria-label="item.label">
|
|
1223
1223
|
<UiIcon :name="item.icon" :size="16" />
|
|
@@ -1225,7 +1225,7 @@ export const AllStates: Story = {
|
|
|
1225
1225
|
</UiToggleGroup>
|
|
1226
1226
|
</div>
|
|
1227
1227
|
<div class="flex items-center gap-4">
|
|
1228
|
-
<span class="body-
|
|
1228
|
+
<span class="body-s-regular text-content-on-surface-muted w-24">Soft:</span>
|
|
1229
1229
|
<UiToggleGroup v-model="multipleSoft" type="multiple" soft aria-label="Text formatting, soft fill">
|
|
1230
1230
|
<UiToggleGroupItem v-for="item in formattingItems" :key="item.value" :value="item.value" :aria-label="item.label">
|
|
1231
1231
|
<UiIcon :name="item.icon" :size="16" />
|
|
@@ -1239,7 +1239,7 @@ export const AllStates: Story = {
|
|
|
1239
1239
|
<h3 class="heading-s mb-4">Selection Types</h3>
|
|
1240
1240
|
<div class="flex flex-col gap-4">
|
|
1241
1241
|
<div class="flex items-center gap-4">
|
|
1242
|
-
<span class="body-
|
|
1242
|
+
<span class="body-s-regular text-content-on-surface-muted w-24">Single:</span>
|
|
1243
1243
|
<UiToggleGroup v-model="singleValue" type="single" variant="outline" aria-label="Text alignment, single choice">
|
|
1244
1244
|
<UiToggleGroupItem v-for="item in alignmentItems" :key="item.value" :value="item.value" :aria-label="item.label">
|
|
1245
1245
|
<UiIcon :name="item.icon" :size="16" />
|
|
@@ -1247,7 +1247,7 @@ export const AllStates: Story = {
|
|
|
1247
1247
|
</UiToggleGroup>
|
|
1248
1248
|
</div>
|
|
1249
1249
|
<div class="flex items-center gap-4">
|
|
1250
|
-
<span class="body-
|
|
1250
|
+
<span class="body-s-regular text-content-on-surface-muted w-24">Multiple:</span>
|
|
1251
1251
|
<UiToggleGroup v-model="multipleValue" type="multiple" variant="outline" aria-label="Text formatting, multiple choice">
|
|
1252
1252
|
<UiToggleGroupItem v-for="item in formattingItems" :key="item.value" :value="item.value" :aria-label="item.label">
|
|
1253
1253
|
<UiIcon :name="item.icon" :size="16" />
|
|
@@ -1261,7 +1261,7 @@ export const AllStates: Story = {
|
|
|
1261
1261
|
<h3 class="heading-s mb-4">Sizes</h3>
|
|
1262
1262
|
<div class="flex flex-col gap-4">
|
|
1263
1263
|
<div class="flex items-center gap-4">
|
|
1264
|
-
<span class="body-
|
|
1264
|
+
<span class="body-s-regular text-content-on-surface-muted w-24">Small:</span>
|
|
1265
1265
|
<UiToggleGroup v-model="smallValue" type="single" variant="outline" size="sm" aria-label="Text alignment, small">
|
|
1266
1266
|
<UiToggleGroupItem v-for="item in alignmentItems" :key="item.value" :value="item.value" :aria-label="item.label">
|
|
1267
1267
|
<UiIcon :name="item.icon" :size="16" />
|
|
@@ -1269,7 +1269,7 @@ export const AllStates: Story = {
|
|
|
1269
1269
|
</UiToggleGroup>
|
|
1270
1270
|
</div>
|
|
1271
1271
|
<div class="flex items-center gap-4">
|
|
1272
|
-
<span class="body-
|
|
1272
|
+
<span class="body-s-regular text-content-on-surface-muted w-24">Default:</span>
|
|
1273
1273
|
<UiToggleGroup v-model="defaultSizeValue" type="multiple" variant="outline" aria-label="Text formatting, default size">
|
|
1274
1274
|
<UiToggleGroupItem v-for="item in formattingItems" :key="item.value" :value="item.value" :aria-label="item.label">
|
|
1275
1275
|
<UiIcon :name="item.icon" :size="16" />
|
|
@@ -1277,7 +1277,7 @@ export const AllStates: Story = {
|
|
|
1277
1277
|
</UiToggleGroup>
|
|
1278
1278
|
</div>
|
|
1279
1279
|
<div class="flex items-center gap-4">
|
|
1280
|
-
<span class="body-
|
|
1280
|
+
<span class="body-s-regular text-content-on-surface-muted w-24">Large:</span>
|
|
1281
1281
|
<UiToggleGroup v-model="largeValue" type="multiple" variant="outline" size="lg" aria-label="Text formatting, large">
|
|
1282
1282
|
<UiToggleGroupItem v-for="item in formattingItems" :key="item.value" :value="item.value" :aria-label="item.label">
|
|
1283
1283
|
<UiIcon :name="item.icon" :size="16" />
|
|
@@ -1291,7 +1291,7 @@ export const AllStates: Story = {
|
|
|
1291
1291
|
<h3 class="heading-s mb-4">Disabled States</h3>
|
|
1292
1292
|
<div class="flex flex-col gap-4">
|
|
1293
1293
|
<div class="flex items-center gap-4">
|
|
1294
|
-
<span class="body-
|
|
1294
|
+
<span class="body-s-regular text-content-on-surface-muted w-24">All disabled:</span>
|
|
1295
1295
|
<UiToggleGroup v-model="disabledValue" type="multiple" variant="outline" disabled aria-label="Text formatting, disabled">
|
|
1296
1296
|
<UiToggleGroupItem v-for="item in formattingItems" :key="item.value" :value="item.value" :aria-label="item.label">
|
|
1297
1297
|
<UiIcon :name="item.icon" :size="16" />
|
|
@@ -1299,7 +1299,7 @@ export const AllStates: Story = {
|
|
|
1299
1299
|
</UiToggleGroup>
|
|
1300
1300
|
</div>
|
|
1301
1301
|
<div class="flex items-center gap-4">
|
|
1302
|
-
<span class="body-
|
|
1302
|
+
<span class="body-s-regular text-content-on-surface-muted w-24">Partial:</span>
|
|
1303
1303
|
<UiToggleGroup v-model="partialDisabled" type="multiple" variant="outline" aria-label="Text formatting, one item unavailable">
|
|
1304
1304
|
<UiToggleGroupItem v-for="(item, index) in formattingItems" :key="item.value" :value="item.value" :aria-label="item.label" :disabled="index === 1">
|
|
1305
1305
|
<UiIcon :name="item.icon" :size="16" />
|
|
@@ -1392,10 +1392,10 @@ export const Accessibility: Story = {
|
|
|
1392
1392
|
|
|
1393
1393
|
<div class="flex flex-col gap-6">
|
|
1394
1394
|
<div class="flex flex-col gap-2">
|
|
1395
|
-
<h3 class="body-
|
|
1395
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
1396
1396
|
Give the group an accessible name
|
|
1397
1397
|
</h3>
|
|
1398
|
-
<p class="body-
|
|
1398
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
1399
1399
|
The group renders as <code>role="group"</code>, which screen
|
|
1400
1400
|
readers announce with no name of its own. Pass an
|
|
1401
1401
|
<code>aria-label</code> such as "Text formatting" so the items are
|
|
@@ -1404,10 +1404,10 @@ export const Accessibility: Story = {
|
|
|
1404
1404
|
</div>
|
|
1405
1405
|
|
|
1406
1406
|
<div class="flex flex-col gap-2">
|
|
1407
|
-
<h3 class="body-
|
|
1407
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
1408
1408
|
Name every item, including icon-only ones
|
|
1409
1409
|
</h3>
|
|
1410
|
-
<p class="body-
|
|
1410
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
1411
1411
|
<code>UiIcon</code> renders <code>aria-hidden</code>, so an item
|
|
1412
1412
|
containing only an icon has no accessible name. Give each item an
|
|
1413
1413
|
<code>aria-label</code> that describes the control — "Bold", not
|
|
@@ -1417,10 +1417,10 @@ export const Accessibility: Story = {
|
|
|
1417
1417
|
</div>
|
|
1418
1418
|
|
|
1419
1419
|
<div class="flex flex-col gap-2">
|
|
1420
|
-
<h3 class="body-
|
|
1420
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
1421
1421
|
Keep the visible text inside the accessible name
|
|
1422
1422
|
</h3>
|
|
1423
|
-
<p class="body-
|
|
1423
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
1424
1424
|
When an item shows text next to its icon, the
|
|
1425
1425
|
<code>aria-label</code> must contain those words — "Align left"
|
|
1426
1426
|
alongside the visible "Left" is fine, "Justify" is not. Otherwise
|
|
@@ -1430,10 +1430,10 @@ export const Accessibility: Story = {
|
|
|
1430
1430
|
</div>
|
|
1431
1431
|
|
|
1432
1432
|
<div class="flex flex-col gap-2">
|
|
1433
|
-
<h3 class="body-
|
|
1433
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
1434
1434
|
The group is one tab stop
|
|
1435
1435
|
</h3>
|
|
1436
|
-
<p class="body-
|
|
1436
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
1437
1437
|
<code>Tab</code> enters the group once — landing on the pressed
|
|
1438
1438
|
item, or the first one — and the arrow keys move between items,
|
|
1439
1439
|
looping at the ends and stepping over disabled ones. A second
|
|
@@ -1444,10 +1444,10 @@ export const Accessibility: Story = {
|
|
|
1444
1444
|
</div>
|
|
1445
1445
|
|
|
1446
1446
|
<div class="flex flex-col gap-2">
|
|
1447
|
-
<h3 class="body-
|
|
1447
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
1448
1448
|
Do not rely on the fill alone
|
|
1449
1449
|
</h3>
|
|
1450
|
-
<p class="body-
|
|
1450
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
1451
1451
|
Selected items are filled with a muted surface, and
|
|
1452
1452
|
<code>soft</code> makes that fill quieter still. Neither is the
|
|
1453
1453
|
real signal: the same information reaches everyone through
|
|
@@ -1458,10 +1458,10 @@ export const Accessibility: Story = {
|
|
|
1458
1458
|
</div>
|
|
1459
1459
|
|
|
1460
1460
|
<div class="flex flex-col gap-2">
|
|
1461
|
-
<h3 class="body-
|
|
1461
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
1462
1462
|
A group is not a radio group
|
|
1463
1463
|
</h3>
|
|
1464
|
-
<p class="body-
|
|
1464
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
1465
1465
|
Even with <code>type="single"</code> the items stay toggle buttons
|
|
1466
1466
|
with <code>aria-pressed</code>, not radios with
|
|
1467
1467
|
<code>aria-checked</code>. If the choice is a form value that must
|
|
@@ -1471,10 +1471,10 @@ export const Accessibility: Story = {
|
|
|
1471
1471
|
</div>
|
|
1472
1472
|
|
|
1473
1473
|
<div class="flex flex-col gap-2">
|
|
1474
|
-
<h3 class="body-
|
|
1474
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
1475
1475
|
Every size is large enough to tap
|
|
1476
1476
|
</h3>
|
|
1477
|
-
<p class="body-
|
|
1477
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
1478
1478
|
The sizes differ in padding rather than in a fixed box, and every
|
|
1479
1479
|
one of them clears the 24×24px floor in WCAG 2.5.8 Target Size
|
|
1480
1480
|
(Minimum) — including <code>sm</code>, and including icon-only
|
|
@@ -1483,10 +1483,10 @@ export const Accessibility: Story = {
|
|
|
1483
1483
|
</div>
|
|
1484
1484
|
|
|
1485
1485
|
<div class="flex flex-col gap-2">
|
|
1486
|
-
<h3 class="body-
|
|
1486
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
1487
1487
|
Selected items keep their contrast when focused
|
|
1488
1488
|
</h3>
|
|
1489
|
-
<p class="body-
|
|
1489
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
1490
1490
|
Hover, focus and press are drawn as an overlay on top of the
|
|
1491
1491
|
item's own fill, so a selected item that is also focused stays
|
|
1492
1492
|
readable instead of washing out. The focus ring itself only
|
|
@@ -1496,10 +1496,10 @@ export const Accessibility: Story = {
|
|
|
1496
1496
|
</div>
|
|
1497
1497
|
|
|
1498
1498
|
<div class="flex flex-col gap-2">
|
|
1499
|
-
<h3 class="body-
|
|
1499
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
1500
1500
|
Enable accessibility theme
|
|
1501
1501
|
</h3>
|
|
1502
|
-
<p class="body-
|
|
1502
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
1503
1503
|
When accessibility is required, enable our accessibility theme.
|
|
1504
1504
|
This increases contrast and makes sure there are no color contrast
|
|
1505
1505
|
issues.
|
|
@@ -1509,7 +1509,7 @@ export const Accessibility: Story = {
|
|
|
1509
1509
|
|
|
1510
1510
|
<div class="grid gap-4 md:grid-cols-2">
|
|
1511
1511
|
<div class="flex flex-col gap-3">
|
|
1512
|
-
<h3 class="label-
|
|
1512
|
+
<h3 class="label-m-medium text-center text-content-on-surface-primary">
|
|
1513
1513
|
Default
|
|
1514
1514
|
</h3>
|
|
1515
1515
|
<div class="flex min-h-20 flex-col items-center justify-center gap-4 border border-border-surface-default p-6">
|
|
@@ -1527,7 +1527,7 @@ export const Accessibility: Story = {
|
|
|
1527
1527
|
</div>
|
|
1528
1528
|
|
|
1529
1529
|
<div class="accessible-theme flex flex-col gap-3">
|
|
1530
|
-
<h3 class="label-
|
|
1530
|
+
<h3 class="label-m-medium text-center text-content-on-surface-primary">
|
|
1531
1531
|
Accessible
|
|
1532
1532
|
</h3>
|
|
1533
1533
|
<div class="flex min-h-20 flex-col items-center justify-center gap-4 border border-border-surface-default p-6">
|
|
@@ -333,21 +333,21 @@ import { UiButton } from '@aleph-alpha/ui-library'
|
|
|
333
333
|
const alignmentOptionsTemplate = `
|
|
334
334
|
<div class="flex flex-col gap-8 items-center p-8">
|
|
335
335
|
<div class="flex flex-col items-center gap-2">
|
|
336
|
-
<span class="label-
|
|
336
|
+
<span class="label-xs-regular text-content-on-surface-muted">Align Start</span>
|
|
337
337
|
<UiTooltip content="Aligned to the start" side="bottom" align="start">
|
|
338
338
|
<UiButton>Hover me</UiButton>
|
|
339
339
|
</UiTooltip>
|
|
340
340
|
</div>
|
|
341
341
|
|
|
342
342
|
<div class="flex flex-col items-center gap-2">
|
|
343
|
-
<span class="label-
|
|
343
|
+
<span class="label-xs-regular text-content-on-surface-muted">Align Center</span>
|
|
344
344
|
<UiTooltip content="Aligned to the center" side="bottom" align="center">
|
|
345
345
|
<UiButton>Hover me</UiButton>
|
|
346
346
|
</UiTooltip>
|
|
347
347
|
</div>
|
|
348
348
|
|
|
349
349
|
<div class="flex flex-col items-center gap-2">
|
|
350
|
-
<span class="label-
|
|
350
|
+
<span class="label-xs-regular text-content-on-surface-muted">Align End</span>
|
|
351
351
|
<UiTooltip content="Aligned to the end" side="bottom" align="end">
|
|
352
352
|
<UiButton>Hover me</UiButton>
|
|
353
353
|
</UiTooltip>
|
|
@@ -613,10 +613,10 @@ export const Accessibility: Story = {
|
|
|
613
613
|
|
|
614
614
|
<div class="flex flex-col gap-6">
|
|
615
615
|
<div class="flex flex-col gap-2">
|
|
616
|
-
<h3 class="body-
|
|
616
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
617
617
|
Enable accessibility theme
|
|
618
618
|
</h3>
|
|
619
|
-
<p class="body-
|
|
619
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
620
620
|
When accessibility is required, enable our accessibility theme. This
|
|
621
621
|
increases contrast and ensures there are no color contrast issues.
|
|
622
622
|
</p>
|
|
@@ -625,7 +625,7 @@ export const Accessibility: Story = {
|
|
|
625
625
|
|
|
626
626
|
<div class="grid gap-4 md:grid-cols-2">
|
|
627
627
|
<div class="flex flex-col gap-3">
|
|
628
|
-
<h3 class="label-
|
|
628
|
+
<h3 class="label-m-medium text-center text-content-on-surface-primary">
|
|
629
629
|
Default
|
|
630
630
|
</h3>
|
|
631
631
|
<div class="flex min-h-32 items-center justify-center border border-border-surface-default p-10">
|
|
@@ -636,7 +636,7 @@ export const Accessibility: Story = {
|
|
|
636
636
|
</div>
|
|
637
637
|
|
|
638
638
|
<div class="accessible-theme flex flex-col gap-3">
|
|
639
|
-
<h3 class="label-
|
|
639
|
+
<h3 class="label-m-medium text-center text-content-on-surface-primary">
|
|
640
640
|
Accessible
|
|
641
641
|
</h3>
|
|
642
642
|
<div class="flex min-h-32 items-center justify-center border border-border-surface-default p-10">
|
|
@@ -16,7 +16,7 @@ const delegatedProps = reactiveOmit(props, 'class');
|
|
|
16
16
|
<AccordionContent
|
|
17
17
|
data-slot="accordion-content"
|
|
18
18
|
v-bind="delegatedProps"
|
|
19
|
-
class="ui-accordion-content overflow-hidden body-
|
|
19
|
+
class="ui-accordion-content overflow-hidden body-s-regular"
|
|
20
20
|
>
|
|
21
21
|
<div :class="cn('pt-0 pb-4', props.class)">
|
|
22
22
|
<slot />
|