@aleph-alpha/ui-library 5.4.0 → 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 (33) hide show
  1. package/config.d.ts +9 -0
  2. package/config.js +12 -3
  3. package/dist/system/lib.js +6461 -6397
  4. package/dist/system/patterns/UiFloatActions/UiFloatActionItems.vue.d.ts +173 -2
  5. package/dist/system/patterns/UiFloatActions/floatActionItemContext.d.ts +15 -1
  6. package/dist/system/patterns/UiFloatActions/types.d.ts +25 -1
  7. package/dist/system/story-sidebar-icons.json +5 -1
  8. package/package.json +5 -3
  9. package/src/components/UiAutocomplete/UiAutocomplete.stories.ts +1 -0
  10. package/src/components/UiButton/UiButton.stories.ts +9 -9
  11. package/src/components/UiCheckbox/UiCheckbox.stories.ts +253 -0
  12. package/src/components/UiCheckbox/__tests__/UiCheckbox.test.ts +3 -18
  13. package/src/components/UiField/UiField.stories.ts +608 -1
  14. package/src/components/UiField/UiFieldDescription.vue +7 -2
  15. package/src/components/UiInput/UiInput.stories.ts +336 -2
  16. package/src/components/UiInput/__tests__/UiInput.test.ts +20 -28
  17. package/src/components/UiItem/UiItem.stories.ts +236 -1
  18. package/src/components/UiItem/__tests__/UiItem.test.ts +11 -72
  19. package/src/components/UiSnackbar/UiSnackbar.stories.ts +6 -6
  20. package/src/components/UiSnackbar/UiSnackbar.vue +4 -4
  21. package/src/components/UiSnackbar/UiSnackbarContent.vue +4 -4
  22. package/src/components/core/checkbox/Checkbox.vue +0 -1
  23. package/src/components/core/tabs/TabsTrigger.vue +1 -1
  24. package/src/patterns/UiDataTable/UiDataTable.stories.ts +495 -8
  25. package/src/patterns/UiDataTable/UiDataTableFilterMenu.vue +1 -1
  26. package/src/patterns/UiDataTable/__tests__/UiDataTable.test.ts +7 -184
  27. package/src/patterns/UiFloatActions/UiFloatActionItems.vue +138 -11
  28. package/src/patterns/UiFloatActions/UiFloatActions.stories.ts +890 -3
  29. package/src/patterns/UiFloatActions/__tests__/UiFloatActionItems.test.ts +46 -24
  30. package/src/patterns/UiFloatActions/floatActionItemContext.ts +16 -1
  31. package/src/patterns/UiFloatActions/types.ts +28 -1
  32. package/src/components/UiField/__tests__/UiFieldError.test.ts +0 -39
  33. package/src/patterns/UiFloatActions/__tests__/UiFloatActions.a11y.test.ts +0 -152
@@ -1,3 +1,4 @@
1
+ import { nextTick } from 'vue';
1
2
  import { UiFloatActionItemsProps } from './types';
2
3
  declare function __VLS_template(): {
3
4
  attrs: Partial<{}>;
@@ -8,23 +9,193 @@ declare function __VLS_template(): {
8
9
  default?(_: {}): any;
9
10
  };
10
11
  refs: {
11
- itemRef: HTMLInputElement;
12
+ itemRef: ({
13
+ $: import('vue').ComponentInternalInstance;
14
+ $data: {};
15
+ $props: {
16
+ readonly modelValue?: string | undefined;
17
+ readonly name: string;
18
+ readonly type?: import('../..').UiInputType | undefined;
19
+ readonly disabled?: boolean | undefined;
20
+ readonly placeholder?: string | undefined;
21
+ readonly required?: boolean | undefined;
22
+ readonly accept?: string | undefined;
23
+ readonly multiple?: boolean | undefined;
24
+ readonly uploadButtonLabel?: string | undefined;
25
+ readonly "onUpdate:modelValue"?: ((value: string) => any) | undefined;
26
+ readonly "onUpdate:files"?: ((files: File[]) => any) | undefined;
27
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
28
+ $attrs: {
29
+ [x: string]: unknown;
30
+ };
31
+ $refs: {
32
+ [x: string]: unknown;
33
+ };
34
+ $slots: Readonly<{
35
+ [name: string]: import('vue').Slot<any> | undefined;
36
+ }>;
37
+ $root: import('vue').ComponentPublicInstance | null;
38
+ $parent: import('vue').ComponentPublicInstance | null;
39
+ $host: Element | null;
40
+ $emit: ((event: "update:modelValue", value: string) => void) & ((event: "update:files", files: File[]) => void);
41
+ $el: any;
42
+ $options: import('vue').ComponentOptionsBase<Readonly<{
43
+ modelValue?: string;
44
+ } & import('../..').UiInputProps> & Readonly<{
45
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
46
+ "onUpdate:files"?: ((files: File[]) => any) | undefined;
47
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
48
+ "update:modelValue": (value: string) => any;
49
+ "update:files": (files: File[]) => any;
50
+ }, string, {
51
+ disabled: boolean;
52
+ type: import('../..').UiInputType;
53
+ multiple: boolean;
54
+ placeholder: string;
55
+ required: boolean;
56
+ accept: string;
57
+ uploadButtonLabel: string;
58
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
59
+ beforeCreate?: (() => void) | (() => void)[];
60
+ created?: (() => void) | (() => void)[];
61
+ beforeMount?: (() => void) | (() => void)[];
62
+ mounted?: (() => void) | (() => void)[];
63
+ beforeUpdate?: (() => void) | (() => void)[];
64
+ updated?: (() => void) | (() => void)[];
65
+ activated?: (() => void) | (() => void)[];
66
+ deactivated?: (() => void) | (() => void)[];
67
+ beforeDestroy?: (() => void) | (() => void)[];
68
+ beforeUnmount?: (() => void) | (() => void)[];
69
+ destroyed?: (() => void) | (() => void)[];
70
+ unmounted?: (() => void) | (() => void)[];
71
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
72
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
73
+ errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
74
+ };
75
+ $forceUpdate: () => void;
76
+ $nextTick: typeof nextTick;
77
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
78
+ } & Readonly<{
79
+ disabled: boolean;
80
+ type: import('../..').UiInputType;
81
+ multiple: boolean;
82
+ placeholder: string;
83
+ required: boolean;
84
+ accept: string;
85
+ uploadButtonLabel: string;
86
+ }> & Omit<Readonly<{
87
+ modelValue?: string;
88
+ } & import('../..').UiInputProps> & Readonly<{
89
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
90
+ "onUpdate:files"?: ((files: File[]) => any) | undefined;
91
+ }>, "disabled" | "type" | "multiple" | "placeholder" | "required" | "accept" | "uploadButtonLabel"> & import('vue').ShallowUnwrapRef<{}> & {} & import('vue').ComponentCustomProperties & {} & {
92
+ $slots: {
93
+ end?(_: {}): any;
94
+ };
95
+ }) | null;
12
96
  };
13
97
  rootEl: any;
14
98
  };
15
99
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
16
100
  declare const __VLS_component: import('vue').DefineComponent<UiFloatActionItemsProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
101
+ "update:modelValue": (value: import('./types').UiFloatActionItemsValue) => any;
17
102
  click: (event: MouseEvent) => any;
18
103
  }, string, import('vue').PublicProps, Readonly<UiFloatActionItemsProps> & Readonly<{
104
+ "onUpdate:modelValue"?: ((value: import('./types').UiFloatActionItemsValue) => any) | undefined;
19
105
  onClick?: ((event: MouseEvent) => any) | undefined;
20
106
  }>, {
21
107
  disabled: boolean;
22
108
  orientation: import('./types').UiFloatActionItemsOrientation;
23
109
  type: import('./types').UiFloatActionItemsType;
110
+ modelValue: import('./types').UiFloatActionItemsValue;
24
111
  placeholder: string;
112
+ value: import('./types').UiFloatActionItemsValue;
25
113
  ariaLabel: string;
26
114
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
27
- itemRef: HTMLInputElement;
115
+ itemRef: ({
116
+ $: import('vue').ComponentInternalInstance;
117
+ $data: {};
118
+ $props: {
119
+ readonly modelValue?: string | undefined;
120
+ readonly name: string;
121
+ readonly type?: import('../..').UiInputType | undefined;
122
+ readonly disabled?: boolean | undefined;
123
+ readonly placeholder?: string | undefined;
124
+ readonly required?: boolean | undefined;
125
+ readonly accept?: string | undefined;
126
+ readonly multiple?: boolean | undefined;
127
+ readonly uploadButtonLabel?: string | undefined;
128
+ readonly "onUpdate:modelValue"?: ((value: string) => any) | undefined;
129
+ readonly "onUpdate:files"?: ((files: File[]) => any) | undefined;
130
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
131
+ $attrs: {
132
+ [x: string]: unknown;
133
+ };
134
+ $refs: {
135
+ [x: string]: unknown;
136
+ };
137
+ $slots: Readonly<{
138
+ [name: string]: import('vue').Slot<any> | undefined;
139
+ }>;
140
+ $root: import('vue').ComponentPublicInstance | null;
141
+ $parent: import('vue').ComponentPublicInstance | null;
142
+ $host: Element | null;
143
+ $emit: ((event: "update:modelValue", value: string) => void) & ((event: "update:files", files: File[]) => void);
144
+ $el: any;
145
+ $options: import('vue').ComponentOptionsBase<Readonly<{
146
+ modelValue?: string;
147
+ } & import('../..').UiInputProps> & Readonly<{
148
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
149
+ "onUpdate:files"?: ((files: File[]) => any) | undefined;
150
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
151
+ "update:modelValue": (value: string) => any;
152
+ "update:files": (files: File[]) => any;
153
+ }, string, {
154
+ disabled: boolean;
155
+ type: import('../..').UiInputType;
156
+ multiple: boolean;
157
+ placeholder: string;
158
+ required: boolean;
159
+ accept: string;
160
+ uploadButtonLabel: string;
161
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
162
+ beforeCreate?: (() => void) | (() => void)[];
163
+ created?: (() => void) | (() => void)[];
164
+ beforeMount?: (() => void) | (() => void)[];
165
+ mounted?: (() => void) | (() => void)[];
166
+ beforeUpdate?: (() => void) | (() => void)[];
167
+ updated?: (() => void) | (() => void)[];
168
+ activated?: (() => void) | (() => void)[];
169
+ deactivated?: (() => void) | (() => void)[];
170
+ beforeDestroy?: (() => void) | (() => void)[];
171
+ beforeUnmount?: (() => void) | (() => void)[];
172
+ destroyed?: (() => void) | (() => void)[];
173
+ unmounted?: (() => void) | (() => void)[];
174
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
175
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
176
+ errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
177
+ };
178
+ $forceUpdate: () => void;
179
+ $nextTick: typeof nextTick;
180
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
181
+ } & Readonly<{
182
+ disabled: boolean;
183
+ type: import('../..').UiInputType;
184
+ multiple: boolean;
185
+ placeholder: string;
186
+ required: boolean;
187
+ accept: string;
188
+ uploadButtonLabel: string;
189
+ }> & Omit<Readonly<{
190
+ modelValue?: string;
191
+ } & import('../..').UiInputProps> & Readonly<{
192
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
193
+ "onUpdate:files"?: ((files: File[]) => any) | undefined;
194
+ }>, "disabled" | "type" | "multiple" | "placeholder" | "required" | "accept" | "uploadButtonLabel"> & import('vue').ShallowUnwrapRef<{}> & {} & import('vue').ComponentCustomProperties & {} & {
195
+ $slots: {
196
+ end?(_: {}): any;
197
+ };
198
+ }) | null;
28
199
  }, any>;
29
200
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
30
201
  export default _default;
@@ -1,8 +1,16 @@
1
1
  import { InjectionKey, Ref } from 'vue';
2
+ import { UiFloatActionItemsValue } from './types';
3
+ /** Metadata a child item shares with the toolbar when it registers. */
4
+ export interface FloatActionItemRegistration {
5
+ /** Live getter for the item's root element (used to position the indicator). */
6
+ el: () => HTMLElement | null;
7
+ /** Live getter for the item's `value`, if it is a selectable item. */
8
+ value: () => UiFloatActionItemsValue | undefined;
9
+ }
2
10
  /** Shared toolbar state used to coordinate roving-tabindex focus across items. */
3
11
  export interface FloatActionItemContext {
4
12
  /** Registers a focusable item so the toolbar can manage roving tabindex. */
5
- registerItem: (id: symbol) => void;
13
+ registerItem: (id: symbol, registration: FloatActionItemRegistration) => void;
6
14
  /** Removes an item from roving-tabindex tracking. */
7
15
  unregisterItem: (id: symbol) => void;
8
16
  /** Marks an item as the active (tabbable) one when it receives focus. */
@@ -11,6 +19,12 @@ export interface FloatActionItemContext {
11
19
  getTabIndex: (id: symbol) => number;
12
20
  /** Keyboard navigation direction for the toolbar. */
13
21
  orientation: Ref<'horizontal' | 'vertical'>;
22
+ /** Whether the toolbar is a `v-model`-driven single-select control. */
23
+ hasModel: Ref<boolean>;
24
+ /** Currently selected value when the toolbar is `v-model`-driven. */
25
+ modelValue: Ref<UiFloatActionItemsValue | undefined>;
26
+ /** Selects a value, emitting `update:modelValue` from the toolbar. */
27
+ select: (value: UiFloatActionItemsValue) => void;
14
28
  }
15
29
  export declare const FLOAT_ACTION_ITEM_CONTEXT: InjectionKey<FloatActionItemContext>;
16
30
  export declare const FLOAT_ACTION_ITEM_SELECTOR = "[data-slot=\"float-item-action\"]";
@@ -80,6 +80,8 @@ export interface UiFloatActionsProps {
80
80
  export type UiFloatActionItemsType = 'toolbar' | 'button' | 'input' | 'text' | 'group' | 'separator';
81
81
  /** Arrow-key navigation direction for toolbar roving focus. */
82
82
  export type UiFloatActionItemsOrientation = 'horizontal' | 'vertical';
83
+ /** Value identifying a selectable `button` item within a toolbar. */
84
+ export type UiFloatActionItemsValue = string | number;
83
85
  /**
84
86
  * Pill-shaped floating toolbar and its action items.
85
87
  *
@@ -118,10 +120,32 @@ export interface UiFloatActionItemsProps {
118
120
  * Placeholder text for `input` items.
119
121
  */
120
122
  placeholder?: string;
123
+ /**
124
+ * Selected item value for the `toolbar` container.
125
+ * Use `v-model` to turn the toolbar into a single-select control: the active
126
+ * `button` item (the one whose `value` matches) gets a sliding background
127
+ * indicator. Omit for a plain, stateless action bar.
128
+ * @example
129
+ * ```vue
130
+ * <UiFloatActionItems v-model="view" aria-label="View">
131
+ * <UiFloatActionItems type="button" value="grid" aria-label="Grid" />
132
+ * <UiFloatActionItems type="button" value="list" aria-label="List" />
133
+ * </UiFloatActionItems>
134
+ * ```
135
+ */
136
+ modelValue?: UiFloatActionItemsValue;
137
+ /**
138
+ * Value of a selectable `button` item.
139
+ * When the parent toolbar uses `v-model`, clicking this item selects its
140
+ * `value` and moves the active indicator onto it.
141
+ */
142
+ value?: UiFloatActionItemsValue;
121
143
  }
122
- /** Events emitted by {@link UiFloatActionItems} button items. */
144
+ /** Events emitted by {@link UiFloatActionItems}. */
123
145
  export interface UiFloatActionItemsEmits {
124
146
  /** Emitted when a `button` item is activated. */
125
147
  click: [event: MouseEvent];
148
+ /** Emitted by a `toolbar` with `v-model` when the selected value changes. */
149
+ 'update:modelValue': [value: UiFloatActionItemsValue];
126
150
  }
127
151
  export type UiFloatActionItemsClass = HTMLAttributes['class'];
@@ -6,5 +6,9 @@
6
6
  "components-uifield--design-notes": "palette",
7
7
  "components-uifield--accessibility": "accessibility",
8
8
  "components-uiitem--design-notes": "palette",
9
- "components-uiitem--accessibility": "accessibility"
9
+ "components-uiitem--accessibility": "accessibility",
10
+ "components-uiinput--design-notes": "palette",
11
+ "components-uiinput--accessibility": "accessibility",
12
+ "patterns-uifloatactions--accessibility": "accessibility",
13
+ "patterns-uidatatable--accessibility": "accessibility"
10
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aleph-alpha/ui-library",
3
- "version": "5.4.0",
3
+ "version": "5.5.0",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "dist/system/lib.js",
@@ -41,7 +41,8 @@
41
41
  "storybook": "Starts interactive Storybook development server on port 6006 for local component development",
42
42
  "chromatic": "Runs Chromatic visual regression against the Storybook build (requires CHROMATIC_PROJECT_TOKEN)",
43
43
  "test:e2e": "Runs end-to-end integration tests with Playwright",
44
- "tag-component": "Adds experimental/beta/deprecated lifecycle tags or removes them with stable for a component story and props JSDoc"
44
+ "tag-component": "Adds experimental/beta/deprecated lifecycle tags or removes them with stable for a component story and props JSDoc",
45
+ "report:scenarios-pdf": "Generates a PDF catalogue of the labelled step() test scenarios in every story, as a source of truth for ui-library"
45
46
  },
46
47
  "homepage": "https://docs.aleph-alpha.com",
47
48
  "devDependencies": {
@@ -83,7 +84,7 @@
83
84
  "wait-on": "9.0.3",
84
85
  "@aleph-alpha/eslint-config-frontend": "0.7.0",
85
86
  "@aleph-alpha/prettier-config-frontend": "2.1.0",
86
- "@aleph-alpha/tsconfig-frontend": "0.7.0"
87
+ "@aleph-alpha/tsconfig-frontend": "0.7.1"
87
88
  },
88
89
  "peerDependencies": {
89
90
  "@unocss/preset-wind4": ">=66.0.0",
@@ -145,6 +146,7 @@
145
146
  "chromatic": "npx chromatic --build-script-name=build-storybook --exit-zero-on-changes",
146
147
  "test:e2e": "playwright test",
147
148
  "tag-component": "node scripts/tag-component.mjs",
149
+ "report:scenarios-pdf": "node scripts/storybook-scenarios-pdf.mjs",
148
150
  "publish:local": "yalc publish && yalc push --sig"
149
151
  }
150
152
  }
@@ -255,6 +255,7 @@ export const WithCheckboxes: Story = {
255
255
  :model-value="selected"
256
256
  class="pointer-events-none"
257
257
  tabindex="-1"
258
+ aria-hidden="true"
258
259
  />
259
260
  <span class="truncate">{{ option.label }}</span>
260
261
  </div>
@@ -345,7 +345,7 @@ export const KeyboardNavigation: Story = {
345
345
  },
346
346
  },
347
347
  play: async ({ canvasElement, step }) => {
348
- // Scenario: a keyboard user tabs to the button and activates it with Enter,
348
+ // Scenario (UiButton): a keyboard user tabs to the button and activates it with Enter,
349
349
  // Space, and a pointer click.
350
350
  const canvas = within(canvasElement);
351
351
  const button = canvas.getByRole('button', { name: 'Submit' });
@@ -430,7 +430,7 @@ export const KeyboardGroupNavigation: Story = {
430
430
  `,
431
431
  }),
432
432
  play: async ({ canvasElement, step }) => {
433
- // Scenario: a keyboard user tabs across the button group in DOM order and
433
+ // Scenario (UiButton): a keyboard user tabs across the button group in DOM order and
434
434
  // activates the focused control with Space.
435
435
  onClick.mockClear();
436
436
  const canvas = within(canvasElement);
@@ -504,7 +504,7 @@ export const ZoomMagnification: Story = {
504
504
  template: `<UiButton @click="onClick">Save changes</UiButton>`,
505
505
  }),
506
506
  play: async ({ canvasElement, step }) => {
507
- // Scenario: at 200% page zoom the button stays visible, keeps its
507
+ // Scenario (UiButton): at 200% page zoom the button stays visible, keeps its
508
508
  // accessible name, and remains clickable.
509
509
  onClick.mockClear();
510
510
  const canvas = within(canvasElement);
@@ -590,7 +590,7 @@ export const ScreenReader: Story = {
590
590
  `,
591
591
  }),
592
592
  play: async ({ canvasElement, step }) => {
593
- // Scenario: assistive tech reads each control's role and name, and hears the
593
+ // Scenario (UiButton): assistive tech reads each control's role and name, and hears the
594
594
  // toggle's pressed state change via aria-pressed.
595
595
  const canvas = within(canvasElement);
596
596
  const toggle = canvas.getByRole('button', { name: 'Mute' });
@@ -658,7 +658,7 @@ export const MobileBreakpoint: Story = {
658
658
  template: `<UiButton @click="onClick">Continue</UiButton>`,
659
659
  }),
660
660
  play: async ({ canvasElement, step }) => {
661
- // Scenario: at the 320px mobile breakpoint the button stays operable and
661
+ // Scenario (UiButton): at the 320px mobile breakpoint the button stays operable and
662
662
  // meets the minimum touch-target size.
663
663
  onClick.mockClear();
664
664
  const canvas = within(canvasElement);
@@ -951,7 +951,7 @@ export const IconUsage: Story = {
951
951
  },
952
952
  },
953
953
  play: async ({ canvasElement, step }) => {
954
- // Scenario: an icon-only button exposes an accessible name via aria-label
954
+ // Scenario (UiButton): an icon-only button exposes an accessible name via aria-label
955
955
  // and still responds to clicks.
956
956
  onClick.mockClear();
957
957
  const canvas = within(canvasElement);
@@ -1003,7 +1003,7 @@ export const Loading: Story = {
1003
1003
  },
1004
1004
  },
1005
1005
  play: async ({ canvasElement, step }) => {
1006
- // Scenario: while loading, the button announces aria-busy, shows a labelled
1006
+ // Scenario (UiButton): while loading, the button announces aria-busy, shows a labelled
1007
1007
  // spinner, drops out of the tab order, and ignores forced clicks.
1008
1008
  onClick.mockClear();
1009
1009
  const canvas = within(canvasElement);
@@ -1108,7 +1108,7 @@ export const AsChild: Story = {
1108
1108
  },
1109
1109
  },
1110
1110
  play: async ({ canvasElement, step }) => {
1111
- // Scenario: rendered as a link via asChild, it exposes the link role and
1111
+ // Scenario (UiButton): rendered as a link via asChild, it exposes the link role and
1112
1112
  // href and does not expose a redundant button role.
1113
1113
  const canvas = within(canvasElement);
1114
1114
  const link = canvas.getByRole('link', { name: 'Login' });
@@ -1225,7 +1225,7 @@ export const Disabled: Story = {
1225
1225
  },
1226
1226
  },
1227
1227
  play: async ({ canvasElement, step }) => {
1228
- // Scenario: a disabled button reports its disabled state, is skipped by Tab,
1228
+ // Scenario (UiButton): a disabled button reports its disabled state, is skipped by Tab,
1229
1229
  // and ignores forced clicks.
1230
1230
  onClick.mockClear();
1231
1231
  const canvas = within(canvasElement);