@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
|
@@ -416,7 +416,7 @@ export const DesignNotes: Story = {
|
|
|
416
416
|
<section class="flex flex-col gap-8 p-4">
|
|
417
417
|
<div>
|
|
418
418
|
<h2 class="heading-m font-bold text-content-on-surface-primary">Usage</h2>
|
|
419
|
-
<p class="body-
|
|
419
|
+
<p class="body-m-regular mt-2 text-content-on-surface-primary">
|
|
420
420
|
A phone gets one column, so the grid underneath it and the way the
|
|
421
421
|
shell spends its edges are what a screen has to work with. Use the
|
|
422
422
|
guidelines below when placing content in the mobile layout.
|
|
@@ -425,14 +425,14 @@ export const DesignNotes: Story = {
|
|
|
425
425
|
|
|
426
426
|
<div class="grid gap-x-12 gap-y-6 md:grid-cols-[320px_1fr]">
|
|
427
427
|
<div>${GRID_SPECIMEN}</div>
|
|
428
|
-
<p class="label-
|
|
428
|
+
<p class="label-s-regular text-content-on-surface-primary !leading-[1.75]">
|
|
429
429
|
Our mobile grid consists of 4 columns, <code>16px</code> margins and a <code>24px</code>
|
|
430
430
|
gutter. On a <code>320px</code> screen the margins take 32px and the three
|
|
431
431
|
gutters <code>320px</code>, leaving four <code>320px</code> columns.
|
|
432
432
|
</p>
|
|
433
433
|
|
|
434
434
|
<div>${PADDING_SPECIMEN}</div>
|
|
435
|
-
<p class="label-
|
|
435
|
+
<p class="label-s-regular text-content-on-surface-primary !leading-[1.75]">
|
|
436
436
|
Instead of applying padding to the main frame, we apply it to the
|
|
437
437
|
content area, which allows more flexible alignment options with
|
|
438
438
|
floating elements. The frame stays flush: the bar spans the full
|
|
@@ -441,7 +441,7 @@ export const DesignNotes: Story = {
|
|
|
441
441
|
</p>
|
|
442
442
|
|
|
443
443
|
<div>${FADE_SPECIMEN}</div>
|
|
444
|
-
<p class="label-
|
|
444
|
+
<p class="label-s-regular text-content-on-surface-primary !leading-[1.75]">
|
|
445
445
|
Inside chat we utilize a fade mask on top and bottom to help hide
|
|
446
446
|
text underneath floating elements like top bar or prompt field.
|
|
447
447
|
Give the scroll area padding (or margin on the last block) at least
|
|
@@ -115,7 +115,7 @@ const BRAND_MARK = `
|
|
|
115
115
|
const WORDMARK = `
|
|
116
116
|
<span class="flex items-center gap-2">
|
|
117
117
|
${BRAND_MARK}
|
|
118
|
-
<span class="body-
|
|
118
|
+
<span class="body-m-medium text-content-on-surface-primary">Phoenix</span>
|
|
119
119
|
</span>
|
|
120
120
|
`;
|
|
121
121
|
|
|
@@ -347,7 +347,7 @@ const MOBILE_TOP_BAR = `
|
|
|
347
347
|
<UiDropdownMenuTrigger as-child>
|
|
348
348
|
<UiFloatActionItems
|
|
349
349
|
type="button"
|
|
350
|
-
class="h-full w-auto px-3 body-
|
|
350
|
+
class="h-full w-auto px-3 body-s-medium text-content-on-surface-primary"
|
|
351
351
|
>
|
|
352
352
|
<!-- The tooltip goes inside the button rather than around it: the
|
|
353
353
|
menu needs the button itself as its anchor, and two
|
|
@@ -356,7 +356,7 @@ const MOBILE_TOP_BAR = `
|
|
|
356
356
|
<UiTooltip content="Switch model" side="bottom">
|
|
357
357
|
<span class="flex items-center gap-2">
|
|
358
358
|
${BRAND_MARK}
|
|
359
|
-
<span class="body-
|
|
359
|
+
<span class="body-s-medium">{{ model }}</span>
|
|
360
360
|
<UiIcon name="chevron-down" size="s" />
|
|
361
361
|
</span>
|
|
362
362
|
</UiTooltip>
|
|
@@ -429,7 +429,7 @@ const MOBILE_PROFILE = profileCard({
|
|
|
429
429
|
<UiAvatar :size="8">
|
|
430
430
|
<UiAvatarFallback class="bg-background-accent-pink">${PERSON.initials}</UiAvatarFallback>
|
|
431
431
|
</UiAvatar>
|
|
432
|
-
<span class="truncate body-
|
|
432
|
+
<span class="truncate body-m-regular text-content-on-surface-primary">${PERSON.name}</span>
|
|
433
433
|
</button>
|
|
434
434
|
</UiDropdownMenuTrigger>
|
|
435
435
|
`,
|
|
@@ -503,7 +503,7 @@ function content(rows: number): string {
|
|
|
503
503
|
<div class="flex h-full min-h-0 flex-col rounded-md">
|
|
504
504
|
<div class="shrink-0 p-6 pb-4">
|
|
505
505
|
<h1 class="heading-s text-content-on-surface-primary">{{ selected.title }}</h1>
|
|
506
|
-
<p class="mt-1 body-
|
|
506
|
+
<p class="mt-1 body-s-regular text-content-on-surface-muted">
|
|
507
507
|
The bar and the sidebar stay put; this column is the only thing that scrolls.
|
|
508
508
|
</p>
|
|
509
509
|
</div>
|
|
@@ -563,7 +563,7 @@ function mobileContent(rows: number): string {
|
|
|
563
563
|
:style="{ paddingTop: 'var(--sidebar-offset-top, 3.75rem)' }"
|
|
564
564
|
>
|
|
565
565
|
<h1 class="heading-s text-content-on-surface-primary">{{ selected.title }}</h1>
|
|
566
|
-
<p class="mt-1 body-
|
|
566
|
+
<p class="mt-1 body-s-regular text-content-on-surface-muted">
|
|
567
567
|
The bar floats over this column, so everything here scrolls under it.
|
|
568
568
|
</p>
|
|
569
569
|
|
|
@@ -104,8 +104,8 @@ const defaultTemplateSource = `<template>
|
|
|
104
104
|
<UiAvatarFallback class="bg-background-accent-pink">CN</UiAvatarFallback>
|
|
105
105
|
</UiAvatar>
|
|
106
106
|
<span class="flex min-w-0 flex-col">
|
|
107
|
-
<span class="truncate label-
|
|
108
|
-
<span class="truncate label-
|
|
107
|
+
<span class="truncate label-s-medium">Christina Neumann</span>
|
|
108
|
+
<span class="truncate label-xs-regular text-content-on-surface-muted">christina.neumann@example.com</span>
|
|
109
109
|
</span>
|
|
110
110
|
</UiDropdownMenuLabel>
|
|
111
111
|
<UiDropdownMenuSeparator />
|
|
@@ -520,10 +520,10 @@ export const Accessibility: Story = {
|
|
|
520
520
|
</h2>
|
|
521
521
|
|
|
522
522
|
<div class="flex flex-col gap-2">
|
|
523
|
-
<h3 class="body-
|
|
523
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
524
524
|
Requirements
|
|
525
525
|
</h3>
|
|
526
|
-
<ul class="body-
|
|
526
|
+
<ul class="body-m-regular list-disc pl-5 text-content-on-surface-primary">
|
|
527
527
|
<li>The avatar is a button and needs a name of its own, since a picture of a person says nothing about what clicking it does.</li>
|
|
528
528
|
<li>The avatar tells assistive technology that it opens a menu, and whether that menu is currently open.</li>
|
|
529
529
|
<li>The card is announced as a menu and each row as one of its items, named by the text you can see.</li>
|
|
@@ -537,10 +537,10 @@ export const Accessibility: Story = {
|
|
|
537
537
|
</div>
|
|
538
538
|
|
|
539
539
|
<div class="flex flex-col gap-2">
|
|
540
|
-
<h3 class="body-
|
|
540
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
541
541
|
Enable accessibility theme
|
|
542
542
|
</h3>
|
|
543
|
-
<p class="body-
|
|
543
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
544
544
|
When accessibility is required, enable our accessibility theme. This
|
|
545
545
|
increases contrast and ensures there are no color contrast issues.
|
|
546
546
|
</p>
|
|
@@ -548,7 +548,7 @@ export const Accessibility: Story = {
|
|
|
548
548
|
|
|
549
549
|
<div class="flex flex-wrap gap-12">
|
|
550
550
|
<div class="flex w-80 flex-col gap-3">
|
|
551
|
-
<h3 class="label-
|
|
551
|
+
<h3 class="label-m-medium text-content-on-surface-primary">
|
|
552
552
|
Default
|
|
553
553
|
</h3>
|
|
554
554
|
<!--
|
|
@@ -560,7 +560,7 @@ export const Accessibility: Story = {
|
|
|
560
560
|
</div>
|
|
561
561
|
|
|
562
562
|
<div class="flex w-80 flex-col gap-3">
|
|
563
|
-
<h3 class="label-
|
|
563
|
+
<h3 class="label-m-medium text-content-on-surface-primary">
|
|
564
564
|
Accessible
|
|
565
565
|
</h3>
|
|
566
566
|
<div class="min-h-72">${themedCard('accessible-theme')}</div>
|
|
@@ -114,8 +114,8 @@ export function header(person = PERSON): string {
|
|
|
114
114
|
<UiAvatarFallback class="bg-background-accent-pink">${person.initials}</UiAvatarFallback>
|
|
115
115
|
</UiAvatar>
|
|
116
116
|
<span class="flex min-w-0 flex-col">
|
|
117
|
-
<span class="truncate label-
|
|
118
|
-
<span class="truncate label-
|
|
117
|
+
<span class="truncate label-s-medium text-content-on-surface-primary">${person.name}</span>
|
|
118
|
+
<span class="truncate label-xs-regular text-content-on-surface-muted">${person.email}</span>
|
|
119
119
|
</span>
|
|
120
120
|
</UiDropdownMenuLabel>
|
|
121
121
|
<UiDropdownMenuSeparator />
|
|
@@ -285,7 +285,7 @@ const renderStory = (args: Story['args']) => ({
|
|
|
285
285
|
<UiSidebarMenuButton tooltip="Profile menu" aria-label="Profile menu">
|
|
286
286
|
<template #start-icon>
|
|
287
287
|
<div
|
|
288
|
-
class="flex size-8 items-center justify-center overflow-hidden rounded-md bg-background-surface-muted body-
|
|
288
|
+
class="flex size-8 items-center justify-center overflow-hidden rounded-md bg-background-surface-muted body-s-regular text-content-on-surface-primary"
|
|
289
289
|
>
|
|
290
290
|
U
|
|
291
291
|
</div>
|
|
@@ -301,15 +301,15 @@ const renderStory = (args: Story['args']) => ({
|
|
|
301
301
|
<UiSidebarPopoverMenu :show-footer-separator="true">
|
|
302
302
|
<div class="flex items-center gap-3 px-2 py-2">
|
|
303
303
|
<div
|
|
304
|
-
class="flex size-10 shrink-0 items-center justify-center overflow-hidden rounded-md bg-background-surface-muted body-
|
|
304
|
+
class="flex size-10 shrink-0 items-center justify-center overflow-hidden rounded-md bg-background-surface-muted body-s-regular text-content-on-surface-primary"
|
|
305
305
|
>
|
|
306
306
|
U
|
|
307
307
|
</div>
|
|
308
308
|
<div class="min-w-0">
|
|
309
|
-
<div class="truncate body-
|
|
309
|
+
<div class="truncate body-s-medium text-content-on-surface-primary">
|
|
310
310
|
user
|
|
311
311
|
</div>
|
|
312
|
-
<div class="truncate body-
|
|
312
|
+
<div class="truncate body-s-regular text-content-on-surface-muted">
|
|
313
313
|
descriptipn
|
|
314
314
|
</div>
|
|
315
315
|
</div>
|
|
@@ -367,7 +367,7 @@ const renderStory = (args: Story['args']) => ({
|
|
|
367
367
|
</UiButton>
|
|
368
368
|
|
|
369
369
|
<div class="heading-s text-content-on-surface-primary">{{ selected.title }}</div>
|
|
370
|
-
<div class="mt-1 body-
|
|
370
|
+
<div class="mt-1 body-s-regular text-content-on-surface-muted">
|
|
371
371
|
{{ selected.title }} screen
|
|
372
372
|
</div>
|
|
373
373
|
|
|
@@ -447,7 +447,7 @@ export const ControlledOpenState: Story = {
|
|
|
447
447
|
'<div class="heading-s text-content-on-surface-primary">{{ selected.title }}</div>',
|
|
448
448
|
`<label class="mb-4 flex w-fit items-center gap-3">
|
|
449
449
|
<UiSwitch v-model="sidebarOpen" name="expand-sidebar" aria-label="Expand sidebar" />
|
|
450
|
-
<span class="body-
|
|
450
|
+
<span class="body-s-regular text-content-on-surface-primary">Expand sidebar</span>
|
|
451
451
|
</label>
|
|
452
452
|
<div class="heading-s text-content-on-surface-primary">{{ selected.title }}</div>`,
|
|
453
453
|
),
|
|
@@ -98,7 +98,7 @@ const renderStory = (defaultOpen = true) => ({
|
|
|
98
98
|
name="expand-sidebar"
|
|
99
99
|
aria-label="Expand sidebar"
|
|
100
100
|
/>
|
|
101
|
-
<span class="body-
|
|
101
|
+
<span class="body-s-regular text-content-on-surface-primary">Expand sidebar</span>
|
|
102
102
|
</label>
|
|
103
103
|
</div>
|
|
104
104
|
</div>
|
|
@@ -112,7 +112,7 @@ const renderStory = (args: Story['args']) => ({
|
|
|
112
112
|
Projects
|
|
113
113
|
</UiSidebarGroupLabel>
|
|
114
114
|
<UiSidebarGroupContent v-if="open">
|
|
115
|
-
<div class="px-2 py-2 body-
|
|
115
|
+
<div class="px-2 py-2 body-s-regular text-content-on-surface-muted">Group content</div>
|
|
116
116
|
</UiSidebarGroupContent>
|
|
117
117
|
</UiSidebarGroup>
|
|
118
118
|
</UiSidebarContent>
|
|
@@ -125,7 +125,7 @@ const renderStory = (args: Story['args']) => ({
|
|
|
125
125
|
name="expand-sidebar"
|
|
126
126
|
aria-label="Expand sidebar"
|
|
127
127
|
/>
|
|
128
|
-
<span class="body-
|
|
128
|
+
<span class="body-s-regular text-content-on-surface-primary">Expand sidebar</span>
|
|
129
129
|
</label>
|
|
130
130
|
</div>
|
|
131
131
|
</div>
|
|
@@ -193,7 +193,7 @@ export const CustomIcons: Story = {
|
|
|
193
193
|
Projects
|
|
194
194
|
</UiSidebarGroupLabel>
|
|
195
195
|
<UiSidebarGroupContent v-if="open">
|
|
196
|
-
<div class="px-2 py-2 body-
|
|
196
|
+
<div class="px-2 py-2 body-s-regular text-content-on-surface-muted">Group content</div>
|
|
197
197
|
</UiSidebarGroupContent>
|
|
198
198
|
</UiSidebarGroup>
|
|
199
199
|
</UiSidebarContent>
|
|
@@ -206,7 +206,7 @@ export const CustomIcons: Story = {
|
|
|
206
206
|
name="expand-sidebar"
|
|
207
207
|
aria-label="Expand sidebar"
|
|
208
208
|
/>
|
|
209
|
-
<span class="body-
|
|
209
|
+
<span class="body-s-regular text-content-on-surface-primary">Expand sidebar</span>
|
|
210
210
|
</label>
|
|
211
211
|
</div>
|
|
212
212
|
</div>
|
|
@@ -32,7 +32,7 @@ const props = withDefaults(defineProps<UiSidebarGroupLabelProps>(), {
|
|
|
32
32
|
const group = inject(uiSidebarGroupContextKey, null);
|
|
33
33
|
|
|
34
34
|
/** Group title: Label 12 / medium, muted (see design tokens). */
|
|
35
|
-
const labelClass = 'label-
|
|
35
|
+
const labelClass = 'label-xs-medium text-content-on-surface-muted';
|
|
36
36
|
|
|
37
37
|
const collapseRotationClass = computed(() => {
|
|
38
38
|
if (!group) return 'rotate-0';
|
|
@@ -33,7 +33,7 @@ const passthroughAttrs = computed(() =>
|
|
|
33
33
|
class="flex shrink-0 grow items-center gap-2 group-data-[collapsible=icon]:hidden"
|
|
34
34
|
>
|
|
35
35
|
<slot name="logo"> </slot>
|
|
36
|
-
<span v-if="$slots.default" class="min-w-0 truncate body-
|
|
36
|
+
<span v-if="$slots.default" class="min-w-0 truncate body-m-medium">
|
|
37
37
|
<slot />
|
|
38
38
|
</span>
|
|
39
39
|
</div>
|
|
@@ -127,7 +127,7 @@ const renderMode = (mode: MenuButtonStoryConfig) => ({
|
|
|
127
127
|
<template v-if="mode.endIcon || mode.badge" #end-icon>
|
|
128
128
|
<span
|
|
129
129
|
v-if="mode.badge"
|
|
130
|
-
class="min-w-6 rounded-sm bg-background-surface-muted px-1.5 py-0.5 text-center label-
|
|
130
|
+
class="min-w-6 rounded-sm bg-background-surface-muted px-1.5 py-0.5 text-center label-xs-regular text-content-on-surface-primary"
|
|
131
131
|
>
|
|
132
132
|
{{ mode.badge }}
|
|
133
133
|
</span>
|
|
@@ -165,7 +165,7 @@ const renderMode = (mode: MenuButtonStoryConfig) => ({
|
|
|
165
165
|
<template v-if="mode.endIcon || mode.badge" #end-icon>
|
|
166
166
|
<span
|
|
167
167
|
v-if="mode.badge"
|
|
168
|
-
class="min-w-6 rounded-sm bg-background-surface-muted px-1.5 py-0.5 text-center label-
|
|
168
|
+
class="min-w-6 rounded-sm bg-background-surface-muted px-1.5 py-0.5 text-center label-xs-regular text-content-on-surface-primary"
|
|
169
169
|
>
|
|
170
170
|
{{ mode.badge }}
|
|
171
171
|
</span>
|
|
@@ -184,9 +184,9 @@ const renderMode = (mode: MenuButtonStoryConfig) => ({
|
|
|
184
184
|
name="expand-sidebar"
|
|
185
185
|
aria-label="Expand sidebar"
|
|
186
186
|
/>
|
|
187
|
-
<span class="body-
|
|
187
|
+
<span class="body-s-regular text-content-on-surface-primary">Expand sidebar</span>
|
|
188
188
|
</label>
|
|
189
|
-
<p v-if="mode.endIconClickable" class="label-
|
|
189
|
+
<p v-if="mode.endIconClickable" class="label-xs-regular text-content-on-surface-muted">
|
|
190
190
|
End icon clicks: {{ actionCount }}
|
|
191
191
|
</p>
|
|
192
192
|
</div>
|
|
@@ -305,9 +305,9 @@ export const WithVueRouter: Story = {
|
|
|
305
305
|
setup: () => ({ label: item.label, to: item.to }),
|
|
306
306
|
template: `
|
|
307
307
|
<div class="flex flex-col gap-2 p-6">
|
|
308
|
-
<div class="label-
|
|
308
|
+
<div class="label-xs-regular text-content-on-surface-muted">Route</div>
|
|
309
309
|
<div class="heading-s text-content-on-surface-primary">{{ label }}</div>
|
|
310
|
-
<div class="body-
|
|
310
|
+
<div class="body-s-regular text-content-on-surface-muted">
|
|
311
311
|
Rendered by <code><RouterView /></code> for <code>{{ to }}</code>.
|
|
312
312
|
</div>
|
|
313
313
|
</div>
|
|
@@ -359,7 +359,7 @@ export const WithVueRouter: Story = {
|
|
|
359
359
|
name="expand-sidebar"
|
|
360
360
|
aria-label="Expand sidebar"
|
|
361
361
|
/>
|
|
362
|
-
<span class="body-
|
|
362
|
+
<span class="body-s-regular text-content-on-surface-primary">Expand sidebar</span>
|
|
363
363
|
</label>
|
|
364
364
|
<RouterView />
|
|
365
365
|
</div>
|
|
@@ -45,7 +45,7 @@ const containerClass = computed(() =>
|
|
|
45
45
|
|
|
46
46
|
const rootClass = computed(() =>
|
|
47
47
|
cn(
|
|
48
|
-
'!h-full !rounded-none !p-0 body-
|
|
48
|
+
'!h-full !rounded-none !p-0 body-s-regular text-content-on-surface-primary',
|
|
49
49
|
'!hover:bg-transparent !active:bg-transparent',
|
|
50
50
|
'data-[active=true]:!bg-transparent data-[active=true]:!text-content-on-surface-primary',
|
|
51
51
|
'[&>[data-slot=start-icon]]:shrink-0',
|
|
@@ -100,8 +100,8 @@ function onEndIconClick(event: MouseEvent) {
|
|
|
100
100
|
cn(
|
|
101
101
|
'truncate text-content-on-surface-primary',
|
|
102
102
|
hasSubtitle || !props.isActive
|
|
103
|
-
? 'body-
|
|
104
|
-
: 'body-
|
|
103
|
+
? 'body-s-regular'
|
|
104
|
+
: 'body-s-medium',
|
|
105
105
|
)
|
|
106
106
|
"
|
|
107
107
|
>
|
|
@@ -109,7 +109,7 @@ function onEndIconClick(event: MouseEvent) {
|
|
|
109
109
|
</div>
|
|
110
110
|
<div
|
|
111
111
|
v-if="$slots.subtitle"
|
|
112
|
-
class="mt-0.5 truncate label-
|
|
112
|
+
class="mt-0.5 truncate label-xs-medium text-content-on-surface-muted"
|
|
113
113
|
>
|
|
114
114
|
<slot name="subtitle" />
|
|
115
115
|
</div>
|
|
@@ -80,7 +80,7 @@ export const Default: Story = {
|
|
|
80
80
|
name="expand-sidebar"
|
|
81
81
|
aria-label="Expand sidebar"
|
|
82
82
|
/>
|
|
83
|
-
<span class="body-
|
|
83
|
+
<span class="body-s-regular text-content-on-surface-primary">Expand sidebar</span>
|
|
84
84
|
</label>
|
|
85
85
|
</div>
|
|
86
86
|
</div>
|
|
@@ -143,9 +143,9 @@ export const WithVueRouter: Story = {
|
|
|
143
143
|
setup: () => ({ label: item.label }),
|
|
144
144
|
template: `
|
|
145
145
|
<div class="flex flex-col gap-2 p-6">
|
|
146
|
-
<div class="label-
|
|
146
|
+
<div class="label-xs-regular text-content-on-surface-muted">Route</div>
|
|
147
147
|
<div class="heading-s text-content-on-surface-primary">{{ label }}</div>
|
|
148
|
-
<div class="body-
|
|
148
|
+
<div class="body-s-regular text-content-on-surface-muted">
|
|
149
149
|
Rendered by <code><RouterView /></code> for <code>${item.to}</code>.
|
|
150
150
|
</div>
|
|
151
151
|
</div>
|
|
@@ -197,7 +197,7 @@ export const WithVueRouter: Story = {
|
|
|
197
197
|
name="expand-sidebar"
|
|
198
198
|
aria-label="Expand sidebar"
|
|
199
199
|
/>
|
|
200
|
-
<span class="body-
|
|
200
|
+
<span class="body-s-regular text-content-on-surface-primary">Expand sidebar</span>
|
|
201
201
|
</label>
|
|
202
202
|
<RouterView />
|
|
203
203
|
</div>
|
|
@@ -93,7 +93,7 @@ export const Default: Story = {
|
|
|
93
93
|
name="expand-sidebar"
|
|
94
94
|
aria-label="Expand sidebar"
|
|
95
95
|
/>
|
|
96
|
-
<span class="body-
|
|
96
|
+
<span class="body-s-regular text-content-on-surface-primary">Expand sidebar</span>
|
|
97
97
|
</label>
|
|
98
98
|
</div>
|
|
99
99
|
</div>
|
|
@@ -30,7 +30,7 @@ const containerClass = computed(() =>
|
|
|
30
30
|
const itemClass = computed(() =>
|
|
31
31
|
cn(
|
|
32
32
|
'!h-full min-w-0 flex-1 rounded-none bg-transparent px-0 py-0 text-left outline-hidden transition-colors',
|
|
33
|
-
'body-
|
|
33
|
+
'body-s-regular text-content-on-surface-primary',
|
|
34
34
|
'!hover:bg-transparent !active:bg-transparent',
|
|
35
35
|
'focus-visible:ring-0',
|
|
36
36
|
'data-[active=true]:!bg-transparent data-[active=true]:!text-content-on-surface-primary',
|
|
@@ -31,7 +31,7 @@ const containerClass = computed(() =>
|
|
|
31
31
|
const itemClass = computed(() =>
|
|
32
32
|
cn(
|
|
33
33
|
'group/sidebar-popover-menu-item flex h-full w-full min-w-0 items-center gap-3 text-left outline-hidden transition-colors',
|
|
34
|
-
'body-
|
|
34
|
+
'body-s-regular text-content-on-surface-primary',
|
|
35
35
|
'!hover:bg-transparent !active:bg-transparent',
|
|
36
36
|
'focus-visible:ring-0',
|
|
37
37
|
'data-[active=true]:text-content-on-surface-primary',
|
|
@@ -64,7 +64,7 @@ const passthroughAttrs = computed(() =>
|
|
|
64
64
|
:class="
|
|
65
65
|
cn(
|
|
66
66
|
'min-w-0 flex-1 truncate text-content-on-surface-primary',
|
|
67
|
-
props.isActive ? 'body-
|
|
67
|
+
props.isActive ? 'body-s-medium' : 'body-s-regular',
|
|
68
68
|
)
|
|
69
69
|
"
|
|
70
70
|
>
|
|
@@ -77,7 +77,7 @@ const passthroughAttrs = computed(() =>
|
|
|
77
77
|
>
|
|
78
78
|
<span
|
|
79
79
|
v-if="props.shortcut"
|
|
80
|
-
class="body-
|
|
80
|
+
class="body-s-regular text-content-on-surface-muted"
|
|
81
81
|
>
|
|
82
82
|
{{ props.shortcut }}
|
|
83
83
|
</span>
|
|
@@ -88,7 +88,7 @@ export const Default: Story = {
|
|
|
88
88
|
name="expand-sidebar"
|
|
89
89
|
aria-label="Expand sidebar"
|
|
90
90
|
/>
|
|
91
|
-
<span class="body-
|
|
91
|
+
<span class="body-s-regular text-content-on-surface-primary">Expand sidebar</span>
|
|
92
92
|
</label>
|
|
93
93
|
</div>
|
|
94
94
|
</div>
|
|
@@ -32,7 +32,7 @@ const containerClass = computed(() =>
|
|
|
32
32
|
const rootClass = computed(() =>
|
|
33
33
|
cn(
|
|
34
34
|
'!rounded-md !px-2 !py-2 text-content-on-surface-primary',
|
|
35
|
-
props.isActive ? 'body-
|
|
35
|
+
props.isActive ? 'body-s-medium' : 'body-s-regular',
|
|
36
36
|
'!hover:bg-transparent !active:bg-transparent',
|
|
37
37
|
'data-[active=true]:!bg-transparent data-[active=true]:!text-content-on-surface-primary',
|
|
38
38
|
'[&>[data-slot=start-icon]]:shrink-0',
|
|
@@ -106,7 +106,7 @@ export const Variants: Story = {
|
|
|
106
106
|
name="expand-sidebar"
|
|
107
107
|
aria-label="Expand sidebar"
|
|
108
108
|
/>
|
|
109
|
-
<span class="body-
|
|
109
|
+
<span class="body-s-regular text-content-on-surface-primary">Expand sidebar</span>
|
|
110
110
|
</label>
|
|
111
111
|
</div>
|
|
112
112
|
</div>
|
|
@@ -46,8 +46,8 @@ const BRAND_MARK = `
|
|
|
46
46
|
</svg>
|
|
47
47
|
`;
|
|
48
48
|
|
|
49
|
-
/** `body-
|
|
50
|
-
const WORDMARK_CLASS = 'body-
|
|
49
|
+
/** `body-m-medium` is the 1rem / 600 step — the wordmark treatment. */
|
|
50
|
+
const WORDMARK_CLASS = 'body-m-medium';
|
|
51
51
|
|
|
52
52
|
/** Desktop wordmark: the product mark plus its name. */
|
|
53
53
|
const LOGO = `
|
|
@@ -60,7 +60,7 @@ const LOGO = `
|
|
|
60
60
|
/** Mobile brand content: the mark plus the product version. */
|
|
61
61
|
const BRAND_CONTENT = `
|
|
62
62
|
${BRAND_MARK}
|
|
63
|
-
<span class="body-
|
|
63
|
+
<span class="body-s-medium">Phoenix 1.2</span>
|
|
64
64
|
`;
|
|
65
65
|
|
|
66
66
|
/** Translucent floating pill for the mobile bar controls. */
|
|
@@ -127,7 +127,7 @@ const BRAND_PILL = `
|
|
|
127
127
|
<UiTooltip content="Switch workspace" side="bottom">
|
|
128
128
|
<UiFloatActionItems
|
|
129
129
|
type="button"
|
|
130
|
-
class="w-auto gap-2 px-3 body-
|
|
130
|
+
class="w-auto gap-2 px-3 body-s-medium text-content-on-surface-primary"
|
|
131
131
|
@click="onBrandClick"
|
|
132
132
|
>
|
|
133
133
|
${BRAND_CONTENT}
|
|
@@ -207,7 +207,7 @@ function switchRow(id: string, model: string, label: string): string {
|
|
|
207
207
|
return `
|
|
208
208
|
<label
|
|
209
209
|
for="${id}"
|
|
210
|
-
class="flex min-h-6 w-fit cursor-pointer items-center gap-x-3 py-1 label-
|
|
210
|
+
class="flex min-h-6 w-fit cursor-pointer items-center gap-x-3 py-1 label-s-medium text-content-on-surface-primary"
|
|
211
211
|
>
|
|
212
212
|
<UiSwitch id="${id}" v-model="${model}" name="${id}" />
|
|
213
213
|
<span>${label}</span>
|
|
@@ -245,7 +245,7 @@ function renderSlotVisibility(args: UiTopBarProps = {}) {
|
|
|
245
245
|
</UiTopBar>
|
|
246
246
|
|
|
247
247
|
<div class="flex flex-col gap-2 px-4">
|
|
248
|
-
<p class="label-
|
|
248
|
+
<p class="label-s-medium text-content-on-surface-muted">Slots</p>
|
|
249
249
|
<div class="flex flex-wrap items-center gap-x-6 gap-y-1">
|
|
250
250
|
${switchRow('top-bar-show-logo', 'showLogo', 'Show logo')}
|
|
251
251
|
${switchRow('top-bar-show-sidebar-action', 'showSidebarToggle', 'Show sidebar action')}
|
|
@@ -421,11 +421,11 @@ const mobileTemplateSource = `<template>
|
|
|
421
421
|
<UiTooltip content="Switch workspace" side="bottom">
|
|
422
422
|
<UiFloatActionItems
|
|
423
423
|
type="button"
|
|
424
|
-
class="w-auto gap-2 px-3 body-
|
|
424
|
+
class="w-auto gap-2 px-3 body-s-medium"
|
|
425
425
|
@click="openWorkspaces"
|
|
426
426
|
>
|
|
427
427
|
<AppMark />
|
|
428
|
-
<span class="body-
|
|
428
|
+
<span class="body-s-medium">Phoenix 1.2</span>
|
|
429
429
|
<UiIcon name="chevron-down" size="s" />
|
|
430
430
|
</UiFloatActionItems>
|
|
431
431
|
</UiTooltip>
|
|
@@ -540,7 +540,7 @@ const showProfile = ref(true)
|
|
|
540
540
|
</template>
|
|
541
541
|
</UiTopBar>
|
|
542
542
|
|
|
543
|
-
<label for="show-logo" class="flex min-h-6 w-fit items-center gap-x-3 py-1 label-
|
|
543
|
+
<label for="show-logo" class="flex min-h-6 w-fit items-center gap-x-3 py-1 label-s-medium">
|
|
544
544
|
<UiSwitch id="show-logo" v-model="showLogo" name="show-logo" />
|
|
545
545
|
<span>Show logo</span>
|
|
546
546
|
</label>
|
|
@@ -619,28 +619,28 @@ export const Accessibility: Story = {
|
|
|
619
619
|
|
|
620
620
|
<div class="flex flex-col gap-6">
|
|
621
621
|
<div class="flex flex-col gap-2">
|
|
622
|
-
<h3 class="body-
|
|
622
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
623
623
|
Requirements
|
|
624
624
|
</h3>
|
|
625
|
-
<ul class="body-
|
|
626
|
-
<li>The bar renders a <code class="label-
|
|
625
|
+
<ul class="body-m-regular list-disc pl-5 text-content-on-surface-primary">
|
|
626
|
+
<li>The bar renders a <code class="label-s-regular">header</code> element, so it is a <code class="label-s-regular">banner</code> landmark. Name it with <code class="label-s-regular">aria-label</code> when a page has more than one.</li>
|
|
627
627
|
<li>Only one bar per page may be a banner — nest the rest inside a landmark, or drop the label.</li>
|
|
628
|
-
<li>The bar ships no controls, so naming them is on you: every icon-only control you pass in needs an <code class="label-
|
|
629
|
-
<li>A control that toggles something (a menu button, the sidebar trigger) must carry <code class="label-
|
|
630
|
-
<li>Use <code class="label-
|
|
631
|
-
<li>A labelled control that opens a menu — the accessibility toggle below — needs both <code class="label-
|
|
632
|
-
<li>The <code class="label-
|
|
628
|
+
<li>The bar ships no controls, so naming them is on you: every icon-only control you pass in needs an <code class="label-s-regular">aria-label</code>.</li>
|
|
629
|
+
<li>A control that toggles something (a menu button, the sidebar trigger) must carry <code class="label-s-regular">aria-expanded</code>, so a swapped icon is never the only signal.</li>
|
|
630
|
+
<li>Use <code class="label-s-regular">aria-pressed</code> on a layout switch so the selection is not conveyed by colour alone.</li>
|
|
631
|
+
<li>A labelled control that opens a menu — the accessibility toggle below — needs both <code class="label-s-regular">aria-haspopup</code> and <code class="label-s-regular">aria-expanded</code>, so a chevron that flips direction is never the only sign the menu is open (WCAG 1.4.1).</li>
|
|
632
|
+
<li>The <code class="label-s-regular">layout-actions</code> region takes as many controls as the design calls for, and each is its own Tab stop in the order you write them. Mind that order: it is what a keyboard user walks through.</li>
|
|
633
633
|
<li>Focus order follows DOM order: leading gutter, then trailing actions, then profile. Keep that order in the default slot too.</li>
|
|
634
634
|
<li>Mobile controls need a 24px minimum target; the reference pills are 40px.</li>
|
|
635
|
-
<li>Wrap each icon-only action in <code class="label-
|
|
635
|
+
<li>Wrap each icon-only action in <code class="label-s-regular">UiTooltip</code> on a focusable trigger, so the tip is reachable by keyboard and not only by hover. A tooltip supplements the accessible name, it never replaces it.</li>
|
|
636
636
|
</ul>
|
|
637
637
|
</div>
|
|
638
638
|
|
|
639
639
|
<div class="flex flex-col gap-2">
|
|
640
|
-
<h3 class="body-
|
|
640
|
+
<h3 class="body-m-medium text-content-on-surface-primary">
|
|
641
641
|
Enable accessibility theme
|
|
642
642
|
</h3>
|
|
643
|
-
<p class="body-
|
|
643
|
+
<p class="body-m-regular text-content-on-surface-primary">
|
|
644
644
|
When accessibility is required, enable our accessibility theme. This
|
|
645
645
|
increases contrast and ensures there are no color contrast issues.
|
|
646
646
|
</p>
|
|
@@ -649,7 +649,7 @@ export const Accessibility: Story = {
|
|
|
649
649
|
|
|
650
650
|
<div class="flex flex-col gap-4">
|
|
651
651
|
<div class="flex flex-col gap-3">
|
|
652
|
-
<h3 class="label-
|
|
652
|
+
<h3 class="label-m-medium text-content-on-surface-primary">
|
|
653
653
|
Default
|
|
654
654
|
</h3>
|
|
655
655
|
<UiTopBar aria-label="Default top bar">
|
|
@@ -661,7 +661,7 @@ export const Accessibility: Story = {
|
|
|
661
661
|
</div>
|
|
662
662
|
|
|
663
663
|
<div class="accessible-theme flex flex-col gap-3">
|
|
664
|
-
<h3 class="label-
|
|
664
|
+
<h3 class="label-m-medium text-content-on-surface-primary">
|
|
665
665
|
Accessible
|
|
666
666
|
</h3>
|
|
667
667
|
<UiTopBar aria-label="Accessible top bar">
|
|
@@ -1006,10 +1006,10 @@ export const DefaultSlotWrapper: Story = {
|
|
|
1006
1006
|
template: `
|
|
1007
1007
|
<UiTopBar v-slot="{ isMobile }">
|
|
1008
1008
|
${LOGO}
|
|
1009
|
-
<span data-testid="mode" class="body-
|
|
1009
|
+
<span data-testid="mode" class="body-s-regular text-content-on-surface-muted">
|
|
1010
1010
|
{{ isMobile ? 'mobile' : 'desktop' }}
|
|
1011
1011
|
</span>
|
|
1012
|
-
<button type="button" class="ml-auto label-
|
|
1012
|
+
<button type="button" class="ml-auto label-s-medium">Publish</button>
|
|
1013
1013
|
</UiTopBar>
|
|
1014
1014
|
`,
|
|
1015
1015
|
}),
|