@aleph-alpha/ui-library 5.3.1 → 5.5.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.
Files changed (109) hide show
  1. package/config.d.ts +38 -3
  2. package/config.js +103 -6
  3. package/dist/system/lib.js +8926 -8768
  4. package/dist/system/patterns/UiDataTable/UiDataTableFilterMenu.vue.d.ts +24 -0
  5. package/dist/system/patterns/UiDataTable/constants.d.ts +10 -0
  6. package/dist/system/patterns/UiDataTable/index.d.ts +1 -0
  7. package/dist/system/patterns/UiDataTable/types.d.ts +23 -1
  8. package/dist/system/patterns/UiFloatActions/UiFloatActionItems.vue.d.ts +173 -2
  9. package/dist/system/patterns/UiFloatActions/floatActionItemContext.d.ts +15 -1
  10. package/dist/system/patterns/UiFloatActions/types.d.ts +25 -1
  11. package/dist/system/story-sidebar-icons.json +5 -1
  12. package/docs/public-docs/getting-started-designers.md +3 -1
  13. package/package.json +5 -3
  14. package/src/components/UiAutocomplete/UiAutocomplete.stories.ts +2 -1
  15. package/src/components/UiAutocomplete/UiAutocomplete.vue +5 -5
  16. package/src/components/UiButton/UiButton.stories.ts +14 -14
  17. package/src/components/UiCheckbox/UiCheckbox.stories.ts +260 -9
  18. package/src/components/UiCheckbox/__tests__/UiCheckbox.test.ts +3 -18
  19. package/src/components/UiChip/UiChip.vue +1 -1
  20. package/src/components/UiDrawer/UiDrawer.stories.ts +2 -2
  21. package/src/components/UiDropdownMenu/UiDropdownMenu.stories.ts +4 -4
  22. package/src/components/UiEmpty/UiEmpty.vue +2 -2
  23. package/src/components/UiField/UiField.stories.ts +610 -3
  24. package/src/components/UiField/UiFieldDescription.vue +7 -2
  25. package/src/components/UiField/UiFieldLabelInfo.vue +1 -1
  26. package/src/components/UiFileUploadBox/UiFileUploadBox.stories.ts +2 -2
  27. package/src/components/UiFileUploadBox/UiFileUploadBox.vue +2 -2
  28. package/src/components/UiInput/UiInput.stories.ts +336 -2
  29. package/src/components/UiInput/UiInput.vue +3 -3
  30. package/src/components/UiInput/__tests__/UiInput.test.ts +20 -28
  31. package/src/components/UiItem/UiItem.stories.ts +236 -1
  32. package/src/components/UiItem/__tests__/UiItem.test.ts +11 -72
  33. package/src/components/UiKbd/UiKbd.stories.ts +14 -14
  34. package/src/components/UiNavigationMenu/UiNavigationMenu.stories.ts +42 -42
  35. package/src/components/UiPopover/UiPopover.stories.ts +6 -6
  36. package/src/components/UiRadioGroup/UiRadioGroup.stories.ts +2 -2
  37. package/src/components/UiResizable/UiResizable.stories.ts +6 -5
  38. package/src/components/UiSeparator/UiSeparator.stories.ts +6 -6
  39. package/src/components/UiSheet/UiSheet.stories.ts +2 -2
  40. package/src/components/UiSlider/UiSlider.stories.ts +8 -8
  41. package/src/components/UiSnackbar/UiSnackbar.stories.ts +6 -6
  42. package/src/components/UiSnackbar/UiSnackbar.vue +4 -4
  43. package/src/components/UiSnackbar/UiSnackbarContent.vue +4 -4
  44. package/src/components/UiSpinner/UiSpinner.stories.ts +8 -8
  45. package/src/components/UiSwitch/UiSwitch.stories.ts +2 -2
  46. package/src/components/UiTabs/UiTabs.stories.ts +30 -30
  47. package/src/components/UiToggle/__tests__/UiToggle.test.ts +5 -3
  48. package/src/components/UiToggleGroup/UiToggleGroup.stories.ts +9 -9
  49. package/src/components/UiTooltip/UiTooltip.stories.ts +3 -3
  50. package/src/components/core/accordion/AccordionTrigger.vue +2 -2
  51. package/src/components/core/alert/AlertDescription.vue +1 -1
  52. package/src/components/core/badge/index.ts +1 -1
  53. package/src/components/core/button/index.ts +2 -2
  54. package/src/components/core/calendar/CalendarCellTrigger.vue +2 -2
  55. package/src/components/core/calendar/CalendarHeadCell.vue +1 -1
  56. package/src/components/core/card/CardDescription.vue +1 -1
  57. package/src/components/core/checkbox/Checkbox.vue +1 -2
  58. package/src/components/core/drawer/DrawerDescription.vue +1 -1
  59. package/src/components/core/dropdown-menu/DropdownMenuItem.vue +1 -1
  60. package/src/components/core/dropdown-menu/DropdownMenuShortcut.vue +1 -1
  61. package/src/components/core/field/FieldDescription.vue +1 -1
  62. package/src/components/core/field/FieldLabel.vue +1 -1
  63. package/src/components/core/field/FieldSeparator.vue +1 -1
  64. package/src/components/core/input/Input.vue +2 -2
  65. package/src/components/core/item/index.ts +1 -1
  66. package/src/components/core/kbd/Kbd.vue +1 -1
  67. package/src/components/core/listbox/ListboxFilter.vue +1 -1
  68. package/src/components/core/listbox/ListboxGroupLabel.vue +4 -1
  69. package/src/components/core/listbox/ListboxItem.vue +1 -1
  70. package/src/components/core/native-select/NativeSelect.vue +3 -3
  71. package/src/components/core/navigation-menu/NavigationMenuLink.vue +1 -1
  72. package/src/components/core/navigation-menu/index.ts +1 -1
  73. package/src/components/core/radio-group/RadioGroupItem.vue +1 -1
  74. package/src/components/core/range-calendar/RangeCalendarCellTrigger.vue +2 -2
  75. package/src/components/core/range-calendar/RangeCalendarHeadCell.vue +1 -1
  76. package/src/components/core/select/SelectItem.vue +1 -1
  77. package/src/components/core/select/SelectLabel.vue +4 -1
  78. package/src/components/core/select/SelectTrigger.vue +1 -1
  79. package/src/components/core/sheet/SheetDescription.vue +3 -1
  80. package/src/components/core/switch/Switch.vue +1 -1
  81. package/src/components/core/table/TableCaption.vue +3 -1
  82. package/src/components/core/tabs/TabsList.vue +1 -1
  83. package/src/components/core/tabs/TabsTrigger.vue +1 -1
  84. package/src/components/core/tags-input/TagsInput.vue +1 -1
  85. package/src/components/core/tags-input/TagsInputInput.vue +1 -1
  86. package/src/components/core/tags-input/TagsInputItemDelete.vue +1 -1
  87. package/src/components/core/textarea/Textarea.vue +1 -1
  88. package/src/components/core/toggle/index.ts +3 -3
  89. package/src/components/core/toggle-group/index.ts +2 -2
  90. package/src/lib/useDrag.stories.ts +8 -8
  91. package/src/patterns/UiDataTable/UiDataTable.stories.ts +913 -16
  92. package/src/patterns/UiDataTable/UiDataTableColumnFilter.vue +1 -1
  93. package/src/patterns/UiDataTable/UiDataTableFilterMenu.vue +91 -0
  94. package/src/patterns/UiDataTable/UiDataTablePagination.vue +1 -1
  95. package/src/patterns/UiDataTable/__tests__/UiDataTable.test.ts +7 -184
  96. package/src/patterns/UiDataTable/constants.ts +12 -0
  97. package/src/patterns/UiDataTable/index.ts +1 -0
  98. package/src/patterns/UiDataTable/types.ts +24 -0
  99. package/src/patterns/UiDatePicker/UiDatePicker.stories.ts +4 -4
  100. package/src/patterns/UiDatePicker/UiDatePicker.vue +1 -1
  101. package/src/patterns/UiFloatActions/UiFloatActionItems.vue +140 -12
  102. package/src/patterns/UiFloatActions/UiFloatActions.stories.ts +1231 -438
  103. package/src/patterns/UiFloatActions/UiFloatActions.vue +1 -1
  104. package/src/patterns/UiFloatActions/__tests__/UiFloatActionItems.test.ts +46 -24
  105. package/src/patterns/UiFloatActions/floatActionItemContext.ts +16 -1
  106. package/src/patterns/UiFloatActions/types.ts +28 -1
  107. package/src/patterns/UiSidebar/UiSidebarMenuButton.stories.ts +2 -2
  108. package/src/components/UiField/__tests__/UiFieldError.test.ts +0 -39
  109. package/src/patterns/UiFloatActions/__tests__/UiFloatActions.a11y.test.ts +0 -152
@@ -1,4 +1,5 @@
1
1
  import type { Meta, StoryObj } from '@storybook/vue3-vite';
2
+ import { expect, fn, userEvent, within } from 'storybook/test';
2
3
  import UiItem from './UiItem.vue';
3
4
  import {
4
5
  UiItemGroup,
@@ -87,6 +88,12 @@ export default meta;
87
88
 
88
89
  type Story = StoryObj<typeof UiItem>;
89
90
 
91
+ // `UiItem` emits an `action` event from its built-in trailing action button.
92
+ // Play functions assert against this module-level spy bound via `@action`
93
+ // rather than through `args`. Each `play` clears it first, so it is safe to
94
+ // share across the interaction and keyboard test stories.
95
+ const onAction = fn();
96
+
90
97
  const createSource = (
91
98
  imports: string[],
92
99
  template: string,
@@ -662,7 +669,15 @@ export const Actions: Story = {
662
669
  UiIcon,
663
670
  UiItem,
664
671
  },
665
- template: actionsTemplate,
672
+ setup() {
673
+ return { onAction };
674
+ },
675
+ // Wire the first item's action to the spy for the play function while
676
+ // keeping the docs source snippet unchanged.
677
+ template: actionsTemplate.replace(
678
+ '@action="() => {}"',
679
+ '@action="onAction"',
680
+ ),
666
681
  }),
667
682
  parameters: {
668
683
  docs: {
@@ -671,6 +686,28 @@ export const Actions: Story = {
671
686
  },
672
687
  },
673
688
  },
689
+ play: async ({ canvasElement, step }) => {
690
+ // Scenario (UiItem): the built-in trailing action exposes an accessible name and
691
+ // emits the `action` event when a pointer user activates it.
692
+ onAction.mockClear();
693
+ const canvas = within(canvasElement);
694
+ const [action] = canvas.getAllByRole('button', { name: 'More actions' });
695
+
696
+ await step(
697
+ 'interaction: default action exposes an accessible name (WCAG 4.1.2)',
698
+ async () => {
699
+ await expect(action).toHaveAccessibleName('More actions');
700
+ },
701
+ );
702
+
703
+ await step(
704
+ 'interaction: clicking the default action emits the action event',
705
+ async () => {
706
+ await userEvent.click(action);
707
+ await expect(onAction).toHaveBeenCalledTimes(1);
708
+ },
709
+ );
710
+ },
674
711
  };
675
712
 
676
713
  /**
@@ -803,6 +840,126 @@ export const AsLink: Story = {
803
840
  },
804
841
  },
805
842
  },
843
+ play: async ({ canvasElement, step }) => {
844
+ // Scenario (UiItem): rendered as an anchor via `asChild`, the row exposes a link
845
+ // role with the child accessible name and preserves the destination,
846
+ // without leaking a redundant button role.
847
+ const canvas = within(canvasElement);
848
+
849
+ await step(
850
+ 'interaction: asChild exposes a link role with the child accessible name (WCAG 4.1.2)',
851
+ async () => {
852
+ const link = canvas.getByRole('link', { name: /Documentation/ });
853
+ await expect(link).toHaveAttribute('href', '#');
854
+ },
855
+ );
856
+
857
+ await step(
858
+ 'interaction: does not expose a redundant button role',
859
+ async () => {
860
+ await expect(canvas.queryByRole('button')).not.toBeInTheDocument();
861
+ },
862
+ );
863
+ },
864
+ };
865
+
866
+ /**
867
+ * The built-in trailing action is fully keyboard operable: `Tab` moves focus to
868
+ * it and `Enter` / `Space` activate it. Hidden test-only story.
869
+ */
870
+ export const KeyboardNavigation: Story = {
871
+ name: 'test - Keyboard Navigation',
872
+ tags: ['!dev', '!autodocs'],
873
+ render: () => ({
874
+ components: { UiItem },
875
+ setup() {
876
+ return { onAction };
877
+ },
878
+ template: `
879
+ <div class="w-full max-w-md">
880
+ <UiItem title="Weekly report" description="Summary of this week's activity" @action="onAction" />
881
+ </div>
882
+ `,
883
+ }),
884
+ parameters: {
885
+ // Focus moves during the play function; skip the visual snapshot so the
886
+ // focus ring doesn't register as a Chromatic diff.
887
+ chromatic: { disableSnapshot: true },
888
+ docs: {
889
+ description: {
890
+ story:
891
+ 'Press `Tab` to focus the trailing action, then `Enter` or `Space` to activate it.',
892
+ },
893
+ },
894
+ },
895
+ play: async ({ canvasElement, step }) => {
896
+ // Scenario (UiItem): a keyboard user tabs to the trailing action and activates it
897
+ // with Enter and Space.
898
+ onAction.mockClear();
899
+ const canvas = within(canvasElement);
900
+ const action = canvas.getByRole('button', { name: 'More actions' });
901
+
902
+ await step(
903
+ 'keyboard: trailing action is reachable via Tab (WCAG 2.1.1)',
904
+ async () => {
905
+ await userEvent.tab();
906
+ await expect(action).toHaveFocus();
907
+ },
908
+ );
909
+
910
+ await step('keyboard: activates with Enter', async () => {
911
+ await userEvent.keyboard('{Enter}');
912
+ await expect(onAction).toHaveBeenCalledTimes(1);
913
+ });
914
+
915
+ await step('keyboard: activates with Space', async () => {
916
+ await userEvent.keyboard(' ');
917
+ await expect(onAction).toHaveBeenCalledTimes(2);
918
+ });
919
+ },
920
+ };
921
+
922
+ /**
923
+ * `withListSemantics` opts an item into `role="listitem"` so it can be a
924
+ * semantic child of a `role="list"` container, while omitting it keeps the item
925
+ * roleless. Hidden test-only story.
926
+ */
927
+ export const ListSemantics: Story = {
928
+ name: 'test - List Semantics',
929
+ tags: ['!dev', '!autodocs'],
930
+ render: () => ({
931
+ components: { UiItem },
932
+ template: `
933
+ <div class="flex w-full max-w-md flex-col gap-3">
934
+ <div role="list">
935
+ <UiItem with-list-semantics title="List item" description="Exposes role=listitem" />
936
+ </div>
937
+ <UiItem title="Plain item" description="Stays roleless by default" />
938
+ </div>
939
+ `,
940
+ }),
941
+ parameters: {
942
+ docs: {
943
+ description: {
944
+ story:
945
+ 'Only items with `withListSemantics` expose `role="listitem"`; the default item stays roleless.',
946
+ },
947
+ },
948
+ },
949
+ play: async ({ canvasElement, step }) => {
950
+ // Scenario (UiItem): assistive tech only sees a listitem for the item that opted in
951
+ // via `withListSemantics`; the default item exposes no list role.
952
+ const canvas = within(canvasElement);
953
+
954
+ await step(
955
+ 'screen-reader: only the opted-in item exposes role=listitem (WCAG 1.3.1)',
956
+ async () => {
957
+ const listItems = canvas.getAllByRole('listitem');
958
+ await expect(listItems).toHaveLength(1);
959
+ await expect(listItems[0]).toHaveTextContent('List item');
960
+ },
961
+ );
962
+ },
806
963
  };
807
964
 
808
965
  /**
@@ -829,3 +986,81 @@ export const AllVariants: Story = {
829
986
  },
830
987
  },
831
988
  };
989
+
990
+ const mobileBreakpointTemplate = `
991
+ <div class="w-full max-w-md">
992
+ <UiItem
993
+ title="Weekly report"
994
+ description="Summary of this week's activity"
995
+ />
996
+ </div>
997
+ `;
998
+
999
+ /**
1000
+ * Rendered at the mobile (320px reflow) breakpoint via the Media breakpoint
1001
+ * toolbar. The row and its trailing action stay operable and keyboard
1002
+ * navigable at 320px. Hidden test-only story.
1003
+ */
1004
+ export const MobileBreakpoint: Story = {
1005
+ name: 'test - Mobile Breakpoint',
1006
+ tags: ['!dev', '!autodocs'],
1007
+ globals: { mediaBreakpoint: 'reflow' },
1008
+ render: () => ({
1009
+ components: { UiItem },
1010
+ setup() {
1011
+ return { onAction };
1012
+ },
1013
+ template: `
1014
+ <div class="w-full max-w-md">
1015
+ <UiItem title="Weekly report" description="Summary of this week's activity" @action="onAction" />
1016
+ </div>
1017
+ `,
1018
+ }),
1019
+ parameters: {
1020
+ // The play function focuses and activates the action; skip the snapshot.
1021
+ chromatic: { disableSnapshot: true },
1022
+ docs: {
1023
+ description: {
1024
+ story:
1025
+ 'Switch the Media breakpoint toolbar to Mobile to preview the 320px layout.',
1026
+ },
1027
+ source: {
1028
+ code: createSource(['UiItem'], mobileBreakpointTemplate),
1029
+ },
1030
+ },
1031
+ },
1032
+ play: async ({ canvasElement, step }) => {
1033
+ // Scenario (UiItem): at the 320px mobile breakpoint the item's trailing action stays
1034
+ // labelled, keyboard operable, and sized for touch.
1035
+ onAction.mockClear();
1036
+ const canvas = within(canvasElement);
1037
+ const action = canvas.getByRole('button', { name: 'More actions' });
1038
+
1039
+ await step(
1040
+ 'mobile: the trailing action exposes an accessible name at the 320px breakpoint (WCAG 4.1.2)',
1041
+ async () => {
1042
+ await expect(action).toBeVisible();
1043
+ await expect(action).toHaveAccessibleName('More actions');
1044
+ },
1045
+ );
1046
+
1047
+ await step(
1048
+ 'mobile: stays keyboard operable — Tab focuses and Enter activates (WCAG 2.1.1)',
1049
+ async () => {
1050
+ await userEvent.tab();
1051
+ await expect(action).toHaveFocus();
1052
+ await userEvent.keyboard('{Enter}');
1053
+ await expect(onAction).toHaveBeenCalledTimes(1);
1054
+ },
1055
+ );
1056
+
1057
+ await step(
1058
+ 'mobile: the action control stays visible and sized at the mobile breakpoint',
1059
+ async () => {
1060
+ const { width, height } = action.getBoundingClientRect();
1061
+ await expect(width).toBeGreaterThanOrEqual(16);
1062
+ await expect(height).toBeGreaterThanOrEqual(16);
1063
+ },
1064
+ );
1065
+ },
1066
+ };
@@ -1,5 +1,5 @@
1
- import { fireEvent, render } from '@testing-library/vue';
2
- import { describe, expect, test, vi } from 'vitest';
1
+ import { render } from '@testing-library/vue';
2
+ import { describe, expect, test } from 'vitest';
3
3
  import {
4
4
  UiItem,
5
5
  UiItemGroup,
@@ -16,31 +16,9 @@ import { ItemActionVariants, ItemMediaVariants } from '../constants';
16
16
 
17
17
  describe('UiItem', () => {
18
18
  describe('Rendering', () => {
19
- test('renders as div by default', () => {
20
- const { container } = render(UiItem, {
21
- slots: {
22
- default: 'Item content',
23
- },
24
- });
25
-
26
- const element = container.querySelector('[data-slot="item"]');
27
- expect(element?.tagName).toBe('DIV');
28
- expect(element).not.toHaveAttribute('role');
29
- });
30
-
31
- test('applies listitem role only when list semantics are requested', () => {
32
- const { container } = render(UiItem, {
33
- props: {
34
- withListSemantics: true,
35
- },
36
- slots: {
37
- default: 'Item content',
38
- },
39
- });
40
-
41
- const element = container.querySelector('[data-slot="item"]');
42
- expect(element).toHaveAttribute('role', 'listitem');
43
- });
19
+ // Keyboard, focus, and a11y/role behavior (role="listitem" via
20
+ // withListSemantics, roleless by default) is covered by the `test - List
21
+ // Semantics` play story in UiItem.stories.ts.
44
22
 
45
23
  test('renders slot content', () => {
46
24
  const { getByText } = render(UiItem, {
@@ -303,20 +281,9 @@ describe('UiItem', () => {
303
281
  expect(defaultAction.className).toContain('[&_svg]:size-3');
304
282
  });
305
283
 
306
- test('emits action when the default action is clicked', async () => {
307
- const onAction = vi.fn();
308
- const { getByRole } = render(UiItem, {
309
- props: {
310
- title: 'Item title',
311
- onAction,
312
- },
313
- });
314
-
315
- await fireEvent.click(getByRole('button', { name: 'More actions' }));
316
-
317
- expect(onAction).toHaveBeenCalledTimes(1);
318
- expect(onAction.mock.calls[0]?.[0]).toBeInstanceOf(MouseEvent);
319
- });
284
+ // The default action's click/keyboard activation and accessible name are
285
+ // covered by the `Actions` and `test - Keyboard Navigation` play stories in
286
+ // UiItem.stories.ts.
320
287
 
321
288
  test('does not infer hover background when action slot is present', () => {
322
289
  const { container } = render(UiItem, {
@@ -336,37 +303,9 @@ describe('UiItem', () => {
336
303
  });
337
304
 
338
305
  describe('asChild behavior', () => {
339
- test('renders child element as root when asChild is true with anchor tag', () => {
340
- const { container } = render(UiItem, {
341
- props: {
342
- asChild: true,
343
- },
344
- slots: {
345
- default: '<a href="/test">Link Item</a>',
346
- },
347
- });
348
-
349
- const element = container.querySelector('[data-slot="item"]');
350
- expect(element).toBeInTheDocument();
351
- expect(element?.tagName).toBe('A');
352
- expect(element).toHaveAttribute('href', '/test');
353
- });
354
-
355
- test('renders child element as root when asChild is true with button tag', () => {
356
- const { container } = render(UiItem, {
357
- props: {
358
- asChild: true,
359
- },
360
- slots: {
361
- default: '<button type="button">Button Item</button>',
362
- },
363
- });
364
-
365
- const element = container.querySelector('[data-slot="item"]');
366
- expect(element).toBeInTheDocument();
367
- expect(element?.tagName).toBe('BUTTON');
368
- expect(element).toHaveAttribute('type', 'button');
369
- });
306
+ // The accessible role/name of the rendered child (link role + href) is
307
+ // covered by the `AsLink` play story in UiItem.stories.ts. Rendering a child
308
+ // button uses the same asChild passthrough, so it needs no separate test.
370
309
 
371
310
  test('applies computed classes to child element when asChild is true', () => {
372
311
  const { container } = render(UiItem, {
@@ -132,7 +132,7 @@ onUnmounted(() => window.removeEventListener('keydown', handleKeydown))
132
132
  <span class="body-14-regular">Open Command Palette</span>
133
133
  <UiKbdGroup>
134
134
  <UiKbd>Ctrl</UiKbd>
135
- <span class="text-muted-foreground">+</span>
135
+ <span class="text-content-on-surface-muted">+</span>
136
136
  <UiKbd>.</UiKbd>
137
137
  </UiKbdGroup>
138
138
  </div>
@@ -140,7 +140,7 @@ onUnmounted(() => window.removeEventListener('keydown', handleKeydown))
140
140
  <span class="body-14-regular">Toggle Help</span>
141
141
  <UiKbdGroup>
142
142
  <UiKbd>Ctrl</UiKbd>
143
- <span class="text-muted-foreground">+</span>
143
+ <span class="text-content-on-surface-muted">+</span>
144
144
  <UiKbd>/</UiKbd>
145
145
  </UiKbdGroup>
146
146
  </div>
@@ -221,7 +221,7 @@ export const Interactive: Story = {
221
221
  <div class="flex flex-col items-center gap-6 p-4">
222
222
  <div class="text-center gap-y-2">
223
223
  <h3 class="heading-s">Interactive Keyboard Shortcuts</h3>
224
- <p class="body-14-regular text-muted-foreground">Try pressing these keyboard shortcuts:</p>
224
+ <p class="body-14-regular text-content-on-surface-muted">Try pressing these keyboard shortcuts:</p>
225
225
  </div>
226
226
 
227
227
  <div class="flex flex-col gap-3 rounded-lg border p-4 bg-background-surface-muted/30">
@@ -229,7 +229,7 @@ export const Interactive: Story = {
229
229
  <span class="body-14-regular">Open Command Palette</span>
230
230
  <UiKbdGroup>
231
231
  <UiKbd>Ctrl</UiKbd>
232
- <span class="text-muted-foreground">+</span>
232
+ <span class="text-content-on-surface-muted">+</span>
233
233
  <UiKbd>.</UiKbd>
234
234
  </UiKbdGroup>
235
235
  </div>
@@ -237,7 +237,7 @@ export const Interactive: Story = {
237
237
  <span class="body-14-regular">Toggle Help</span>
238
238
  <UiKbdGroup>
239
239
  <UiKbd>Ctrl</UiKbd>
240
- <span class="text-muted-foreground">+</span>
240
+ <span class="text-content-on-surface-muted">+</span>
241
241
  <UiKbd>/</UiKbd>
242
242
  </UiKbdGroup>
243
243
  </div>
@@ -247,7 +247,7 @@ export const Interactive: Story = {
247
247
  </div>
248
248
  </div>
249
249
 
250
- <div v-if="lastPressed" class="body-14-regular text-muted-foreground">
250
+ <div v-if="lastPressed" class="body-14-regular text-content-on-surface-muted">
251
251
  Last pressed: <UiKbd>{{ lastPressed }}</UiKbd>
252
252
  </div>
253
253
 
@@ -256,7 +256,7 @@ export const Interactive: Story = {
256
256
  <h4 class="body-14-medium">Keyboard Shortcuts Help</h4>
257
257
  <UiKbd>Esc</UiKbd>
258
258
  </div>
259
- <div class="gap-y-2 body-14-regular text-muted-foreground">
259
+ <div class="gap-y-2 body-14-regular text-content-on-surface-muted">
260
260
  <p>Use keyboard shortcuts to navigate quickly through the application.</p>
261
261
  <p>Press <UiKbd>Esc</UiKbd> to close this help panel.</p>
262
262
  </div>
@@ -311,7 +311,7 @@ import { UiKbd, UiKbdGroup } from '@aleph-alpha/ui-library'
311
311
  </script>
312
312
 
313
313
  <template>
314
- <p class="body-14-regular text-muted-foreground">
314
+ <p class="body-14-regular text-content-on-surface-muted">
315
315
  Use
316
316
  <UiKbdGroup>
317
317
  <UiKbd>Ctrl</UiKbd>
@@ -333,7 +333,7 @@ export const Group: Story = {
333
333
  },
334
334
  template: `
335
335
  <div class="flex flex-col items-center gap-4">
336
- <p class="body-14-regular text-muted-foreground">
336
+ <p class="body-14-regular text-content-on-surface-muted">
337
337
  Use
338
338
  <UiKbdGroup>
339
339
  <UiKbd v-bind="args">Ctrl + Shift + P</UiKbd>
@@ -343,8 +343,8 @@ export const Group: Story = {
343
343
 
344
344
  <div class="mt-8 w-full max-w-md rounded-lg border bg-background-surface-floating p-4 shadow-lg">
345
345
  <div class="flex items-center gap-2 border-b pb-3">
346
- <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="text-muted-foreground"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg>
347
- <span class="flex-1 body-14-regular text-muted-foreground">Type a command or search...</span>
346
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="text-content-on-surface-muted"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg>
347
+ <span class="flex-1 body-14-regular text-content-on-surface-muted">Type a command or search...</span>
348
348
  <UiKbd v-bind="args">Esc</UiKbd>
349
349
  </div>
350
350
  <div class="pt-3 gap-y-1">
@@ -528,17 +528,17 @@ export const Sizes: Story = {
528
528
  template: `
529
529
  <div class="flex items-center gap-4">
530
530
  <div class="flex items-center gap-1">
531
- <span class="label-12-regular text-muted-foreground">sm:</span>
531
+ <span class="label-12-regular text-content-on-surface-muted">sm:</span>
532
532
  <UiKbd size="sm">Ctrl</UiKbd>
533
533
  <UiKbd size="sm">S</UiKbd>
534
534
  </div>
535
535
  <div class="flex items-center gap-1">
536
- <span class="label-12-regular text-muted-foreground">default:</span>
536
+ <span class="label-12-regular text-content-on-surface-muted">default:</span>
537
537
  <UiKbd>Ctrl</UiKbd>
538
538
  <UiKbd>S</UiKbd>
539
539
  </div>
540
540
  <div class="flex items-center gap-1">
541
- <span class="label-12-regular text-muted-foreground">lg:</span>
541
+ <span class="label-12-regular text-content-on-surface-muted">lg:</span>
542
542
  <UiKbd size="lg">Ctrl</UiKbd>
543
543
  <UiKbd size="lg">S</UiKbd>
544
544
  </div>