@aleph-alpha/ui-library 2.5.2 → 2.6.1

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 (28) hide show
  1. package/dist/system/components/UiFileItem/index.d.ts +1 -1
  2. package/dist/system/components/UiFileType/UiFileType.vue.d.ts +1 -0
  3. package/dist/system/components/UiFileType/types.d.ts +5 -0
  4. package/dist/system/lib.js +2430 -2441
  5. package/dist/system/patterns/UiDataTable/UiDataTableToolbar.vue.d.ts +23 -12
  6. package/dist/system/patterns/UiDataTable/constants.d.ts +0 -13
  7. package/dist/system/patterns/UiDataTable/index.d.ts +1 -0
  8. package/dist/system/patterns/UiDataTable/types.d.ts +1 -28
  9. package/package.json +5 -5
  10. package/src/components/UiCodeBlock/UiCodeBlock.vue +17 -3
  11. package/src/components/UiCodeBlock/__tests__/UiCodeBlock.test.ts +21 -0
  12. package/src/components/UiFileItem/UiFileItem.stories.ts +16 -13
  13. package/src/components/UiFileItem/UiFileItem.vue +1 -0
  14. package/src/components/UiFileItem/index.ts +5 -1
  15. package/src/components/UiFileType/UiFileType.vue +2 -5
  16. package/src/components/UiFileType/__tests__/UiFileType.test.ts +9 -0
  17. package/src/components/UiFileType/types.ts +5 -0
  18. package/src/components/UiItem/UiItem.stories.ts +7 -10
  19. package/src/components/UiSelect/UiSelect.stories.ts +20 -20
  20. package/src/patterns/UiDataTable/UiDataTable.stories.ts +186 -118
  21. package/src/patterns/UiDataTable/UiDataTablePagination.vue +1 -1
  22. package/src/patterns/UiDataTable/UiDataTableToolbar.vue +17 -58
  23. package/src/patterns/UiDataTable/__tests__/UiDataTable.test.ts +1 -1
  24. package/src/patterns/UiDataTable/__tests__/UiDataTableColumnFilter.test.ts +1 -1
  25. package/src/patterns/UiDataTable/__tests__/UiDataTableToolbar.test.ts +26 -201
  26. package/src/patterns/UiDataTable/constants.ts +0 -15
  27. package/src/patterns/UiDataTable/index.ts +1 -0
  28. package/src/patterns/UiDataTable/types.ts +0 -29
@@ -1,14 +1,25 @@
1
- import { UiDataTableToolbarProps } from './types';
2
- declare const _default: <TData>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
- props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, never> & UiDataTableToolbarProps<TData> & Partial<{}>> & import('vue').PublicProps;
4
- expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
5
- attrs: any;
6
- slots: {};
7
- emit: {};
8
- }>) => import('vue').VNode & {
9
- __ctx?: Awaited<typeof __VLS_setup>;
1
+ declare function __VLS_template(): {
2
+ attrs: Partial<{}>;
3
+ slots: Readonly<{
4
+ /** Primary controls, usually search and column filters. */
5
+ default(): unknown;
6
+ /** Trailing controls, usually view options or reset actions. */
7
+ actions(): unknown;
8
+ }> & {
9
+ /** Primary controls, usually search and column filters. */
10
+ default(): unknown;
11
+ /** Trailing controls, usually view options or reset actions. */
12
+ actions(): unknown;
13
+ };
14
+ refs: {};
15
+ rootEl: HTMLDivElement;
10
16
  };
17
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
18
+ declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
19
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
11
20
  export default _default;
12
- type __VLS_PrettifyLocal<T> = {
13
- [K in keyof T]: T[K];
14
- } & {};
21
+ type __VLS_WithTemplateSlots<T, S> = T & {
22
+ new (): {
23
+ $slots: S;
24
+ };
25
+ };
@@ -21,10 +21,6 @@ export declare const DATA_TABLE_LABELS: {
21
21
  readonly goToLastPage: "Go to last page";
22
22
  readonly pageOf: (page: number, total: number) => string;
23
23
  readonly rowsSelected: (selected: number, total: number) => string;
24
- /** UiDataTableToolbar */
25
- readonly filterPlaceholder: "Search...";
26
- readonly searchAllColumns: "Search all columns";
27
- readonly filterByColumn: (column: string) => string;
28
24
  /** UiDataTableColumnFilter */
29
25
  readonly columns: "Columns";
30
26
  readonly toggleColumns: "Toggle columns";
@@ -61,15 +57,6 @@ export interface PaginationLabels {
61
57
  /** Function to generate selection count text */
62
58
  rowsSelected?: (selected: number, total: number) => string;
63
59
  }
64
- /** Labels for UiDataTableToolbar */
65
- export interface ToolbarLabels {
66
- /** Placeholder text for filter input */
67
- filterPlaceholder?: string;
68
- /** Aria label for global search input */
69
- searchAllColumns?: string;
70
- /** Function to generate aria label for column filter */
71
- filterByColumn?: (column: string) => string;
72
- }
73
60
  /** Labels for UiDataTableColumnFilter */
74
61
  export interface ColumnFilterLabels {
75
62
  /** Visible label for the trigger button. */
@@ -3,6 +3,7 @@ export { default as UiDataTableColumnFilter } from './UiDataTableColumnFilter.vu
3
3
  export { default as UiDataTableColumnHeader } from './UiDataTableColumnHeader.vue';
4
4
  export { default as UiDataTablePagination } from './UiDataTablePagination.vue';
5
5
  export { default as UiDataTableToolbar } from './UiDataTableToolbar.vue';
6
+ export type { Column, ColumnDef, Row, Table } from '@tanstack/vue-table';
6
7
  export * from './types';
7
8
  export * from './constants';
8
9
  export * from '../../lib/useDrag';
@@ -1,5 +1,5 @@
1
1
  import { Column, ColumnDef, Row, Table } from '@tanstack/vue-table';
2
- import { ColumnHeaderLabels, ColumnFilterLabels, PaginationLabels, ToolbarLabels } from './constants';
2
+ import { ColumnHeaderLabels, ColumnFilterLabels, PaginationLabels } from './constants';
3
3
  /**
4
4
  * A feature-rich data table with sorting, filtering, and pagination.
5
5
  * Use for displaying and managing large datasets with interactive features.
@@ -104,33 +104,6 @@ export type UiDataTablePaginationProps<TData> = {
104
104
  */
105
105
  labels?: PaginationLabels;
106
106
  };
107
- /**
108
- * Props for the UiDataTableToolbar component.
109
- */
110
- export type UiDataTableToolbarProps<TData> = {
111
- /**
112
- * The TanStack Table instance.
113
- * @internal
114
- */
115
- table: Table<TData>;
116
- /** Filter a specific column by its accessor key. */
117
- filterColumn?: string;
118
- /**
119
- * Enable global search across all columns (takes precedence over filterColumn).
120
- * @default false
121
- */
122
- globalFilter?: boolean;
123
- /**
124
- * Placeholder text for the filter input.
125
- * @default "Search..."
126
- */
127
- filterPlaceholder?: string;
128
- /**
129
- * Custom labels for i18n support.
130
- * Partial object that merges with defaults.
131
- */
132
- labels?: ToolbarLabels;
133
- };
134
107
  /**
135
108
  * Props for the UiDataTableColumnFilter component.
136
109
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aleph-alpha/ui-library",
3
- "version": "2.5.2",
3
+ "version": "2.6.1",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "dist/system/lib.js",
@@ -78,9 +78,9 @@
78
78
  "vue-router": "4.6.4",
79
79
  "vue-tsc": "^2.2.12",
80
80
  "wait-on": "9.0.3",
81
- "@aleph-alpha/eslint-config-frontend": "0.5.0",
82
- "@aleph-alpha/prettier-config-frontend": "2.1.0",
83
- "@aleph-alpha/tsconfig-frontend": "0.6.0"
81
+ "@aleph-alpha/eslint-config-frontend": "0.6.0",
82
+ "@aleph-alpha/tsconfig-frontend": "0.6.0",
83
+ "@aleph-alpha/prettier-config-frontend": "2.1.0"
84
84
  },
85
85
  "peerDependencies": {
86
86
  "@unocss/preset-wind4": ">=66.0.0",
@@ -113,7 +113,7 @@
113
113
  "shiki": "^3.0.0",
114
114
  "tailwind-merge": "^3.4.0",
115
115
  "vue-sonner": "^2.0.9",
116
- "@aleph-alpha/config-css": "1.1.0"
116
+ "@aleph-alpha/config-css": "1.2.0"
117
117
  },
118
118
  "scripts": {
119
119
  "build": "node scripts/prepare-build.cjs && vite build",
@@ -28,6 +28,13 @@ const isCopied = ref(false);
28
28
 
29
29
  const { copy } = useClipboard();
30
30
 
31
+ const TOKEN_COLOR_CONTENT_ON_SURFACE_PRIMARY =
32
+ 'oklch(var(--content-on-surface-primary))';
33
+ const shikiTokenColorOverrides = {
34
+ '#E36209': TOKEN_COLOR_CONTENT_ON_SURFACE_PRIMARY,
35
+ '#FFAB70': TOKEN_COLOR_CONTENT_ON_SURFACE_PRIMARY,
36
+ } as const;
37
+
31
38
  const headerLabel = computed(() => props.filename || props.language);
32
39
  const showHeader = computed(
33
40
  () => headerLabel.value !== 'text' || props.showCopyButton,
@@ -35,6 +42,13 @@ const showHeader = computed(
35
42
 
36
43
  let highlightRequestId = 0;
37
44
 
45
+ function normalizeShikiTokenColors(html: string) {
46
+ return Object.entries(shikiTokenColorOverrides).reduce(
47
+ (nextHtml, [from, to]) => nextHtml.replaceAll(from, to),
48
+ html,
49
+ );
50
+ }
51
+
38
52
  async function highlightCode() {
39
53
  const requestId = ++highlightRequestId;
40
54
  isHighlighted.value = false;
@@ -47,7 +61,7 @@ async function highlightCode() {
47
61
  },
48
62
  });
49
63
  if (requestId !== highlightRequestId) return;
50
- highlightedHtml.value = html;
64
+ highlightedHtml.value = normalizeShikiTokenColors(html);
51
65
  isHighlighted.value = true;
52
66
  } catch {
53
67
  if (requestId !== highlightRequestId) return;
@@ -60,7 +74,7 @@ async function highlightCode() {
60
74
  },
61
75
  });
62
76
  if (requestId !== highlightRequestId) return;
63
- highlightedHtml.value = html;
77
+ highlightedHtml.value = normalizeShikiTokenColors(html);
64
78
  isHighlighted.value = true;
65
79
  } catch {
66
80
  if (requestId !== highlightRequestId) return;
@@ -107,7 +121,7 @@ onUnmounted(() => {
107
121
  v-if="showHeader"
108
122
  class="flex items-center justify-between border-b border-border bg-background-surface-muted px-4 py-2"
109
123
  >
110
- <span class="font-mono text-sm text-muted-foreground">
124
+ <span class="font-mono text-sm text-content-on-surface-secondary">
111
125
  {{ headerLabel !== 'text' ? headerLabel : '' }}
112
126
  </span>
113
127
  <UiButton
@@ -58,6 +58,27 @@ describe('UiCodeBlock', () => {
58
58
  });
59
59
  });
60
60
 
61
+ test('normalizes low-contrast Shiki token colors to theme tokens', async () => {
62
+ const { codeToHtml } = await import('shiki');
63
+ vi.mocked(codeToHtml).mockResolvedValueOnce(
64
+ '<pre class="shiki shiki-themes github-light github-dark"><code><span class="line"><span style="color:#E36209;--shiki-dark:#FFAB70">columns</span></span></code></pre>',
65
+ );
66
+
67
+ const { container } = render(UiCodeBlock, {
68
+ props: { code: 'columns', language: 'typescript' },
69
+ });
70
+
71
+ await waitFor(() => {
72
+ expect(container.querySelector('.shiki')).toBeInTheDocument();
73
+ });
74
+
75
+ expect(container.innerHTML).toContain(
76
+ 'oklch(var(--content-on-surface-primary))',
77
+ );
78
+ expect(container.innerHTML).not.toContain('#E36209');
79
+ expect(container.innerHTML).not.toContain('#FFAB70');
80
+ });
81
+
61
82
  test('shows language label in header', async () => {
62
83
  const { getByText } = render(UiCodeBlock, {
63
84
  props: { code: 'print("hi")', language: 'python' },
@@ -241,19 +241,22 @@ function onRemove() {}
241
241
  <template>
242
242
  <UiFileItem
243
243
  size="small"
244
- filename="Filename.pdf"
245
- type-label="PDF"
246
- size-label="12 MB"
244
+ filename="quarterly-report.csv"
245
+ type-label="CSV"
246
+ size-label="320 KB"
247
247
  @remove="onRemove"
248
248
  />
249
249
  </template>`;
250
250
 
251
- /** Small size · success. Pink media is derived from the `.pdf` filename. */
251
+ /**
252
+ * Small size · success. Yellow media + `table-2` icon are derived from the
253
+ * `.csv` filename
254
+ */
252
255
  export const SmallSuccess: Story = {
253
256
  args: {
254
- filename: 'Filename.pdf',
255
- typeLabel: 'PDF',
256
- sizeLabel: '12 MB',
257
+ filename: 'quarterly-report.csv',
258
+ typeLabel: 'CSV',
259
+ sizeLabel: '320 KB',
257
260
  progress: null,
258
261
  error: '',
259
262
  size: 'small',
@@ -301,9 +304,9 @@ import { UiFileItem } from '@aleph-alpha/ui-library'
301
304
 
302
305
  <template>
303
306
  <UiFileItem
304
- filename="sent.pdf"
305
- type-label="PDF"
306
- size-label="2 MB"
307
+ filename="release-notes.md"
308
+ type-label="MD"
309
+ size-label="14 KB"
307
310
  :removable="false"
308
311
  />
309
312
  </template>`;
@@ -311,9 +314,9 @@ import { UiFileItem } from '@aleph-alpha/ui-library'
311
314
  /** Read-only preview: no close icon. */
312
315
  export const NonRemovable: Story = {
313
316
  args: {
314
- filename: 'sent.pdf',
315
- typeLabel: 'PDF',
316
- sizeLabel: '2 MB',
317
+ filename: 'release-notes.md',
318
+ typeLabel: 'MD',
319
+ sizeLabel: '14 KB',
317
320
  progress: null,
318
321
  error: '',
319
322
  disabled: false,
@@ -109,6 +109,7 @@ const progressClass = computed(() =>
109
109
  :tone="mediaTone"
110
110
  :icon="mediaIcon"
111
111
  :error="isError"
112
+ :loading="isWithProgress"
112
113
  />
113
114
 
114
115
  <div data-slot="file-item-content" :class="contentClass">
@@ -1,2 +1,6 @@
1
1
  export { default as UiFileItem } from './UiFileItem.vue';
2
- export type { UiFileItemProps } from './types';
2
+ export type {
3
+ UiFileItemMediaTone,
4
+ UiFileItemProps,
5
+ UiFileItemSize,
6
+ } from './types';
@@ -14,6 +14,7 @@ const props = withDefaults(defineProps<UiFileTypeProps>(), {
14
14
  tone: undefined,
15
15
  icon: undefined,
16
16
  error: false,
17
+ loading: false,
17
18
  });
18
19
 
19
20
  /** Visual preset (tone + icon) for a known file extension. */
@@ -68,12 +69,8 @@ const filePreset = computed<FileTypePreset>(() => {
68
69
  return FILE_TYPE_PRESETS[ext] ?? DEFAULT_PRESET;
69
70
  });
70
71
 
71
- // Resolved tone/icon: `error` short-circuits to the neutral preset; an
72
- // explicit prop wins over the filename-derived preset. Truthy checks (`||`)
73
- // rather than nullish (`??`) so empty strings from text-based controls
74
- // (Storybook, form inputs) fall back to the auto-derived value.
75
72
  const resolvedTone = computed<UiFileTypeTone>(() => {
76
- if (props.error) return 'default';
73
+ if (props.error || props.loading) return 'default';
77
74
  return props.tone || filePreset.value.tone;
78
75
  });
79
76
 
@@ -30,6 +30,15 @@ describe('UiFileType', () => {
30
30
  expect(badge?.querySelector('svg.lucide-circle-alert')).not.toBeNull();
31
31
  });
32
32
 
33
+ test('loading forces the neutral badge but keeps the filename icon', () => {
34
+ const { container } = render(UiFileType, {
35
+ props: { filename: 'data.csv', loading: true },
36
+ });
37
+ const badge = container.querySelector('[data-slot="file-type"]');
38
+ expect(badge?.getAttribute('data-tone')).toBe('default');
39
+ expect(badge?.querySelector('svg.lucide-table-2')).not.toBeNull();
40
+ });
41
+
33
42
  test('explicit tone and icon props override the auto-derived values', () => {
34
43
  const { container } = render(UiFileType, {
35
44
  props: { filename: 'archive.zip', tone: 'accent-pink', icon: 'star' },
@@ -35,4 +35,9 @@ export interface UiFileTypeProps {
35
35
  * other prop. Use to indicate an upload/validation failure.
36
36
  */
37
37
  error?: boolean;
38
+ /**
39
+ * Use during upload/processing — the colored tone signals "success",
40
+ * so it shouldn't appear until the file is fully accepted.
41
+ */
42
+ loading?: boolean;
38
43
  }
@@ -162,7 +162,7 @@ const customSlotsTemplate = `
162
162
  <UiItem variant="hover-action">
163
163
  <template #icon>
164
164
  <UiAvatar>
165
- <UiAvatarImage src="https://i.pravatar.cc/150?u=ui-item" />
165
+ <UiAvatarImage src="https://i.pravatar.cc/150?u=ui-item" alt="User avatar" />
166
166
  <UiAvatarFallback>AR</UiAvatarFallback>
167
167
  </UiAvatar>
168
168
  </template>
@@ -170,11 +170,8 @@ const customSlotsTemplate = `
170
170
  <template #content>
171
171
  <div class="flex items-center gap-2">
172
172
  <span class="body-14-medium">Custom Content</span>
173
- <span class="rounded-sm bg-background-surface-muted px-1.5 label-12-medium text-content-on-surface-muted">
174
- Beta
175
- </span>
176
173
  </div>
177
- <p class="body-14-regular text-content-on-surface-muted">
174
+ <p class="body-14-regular text-content-on-surface-secondary">
178
175
  Content, media, and action slots can be fully composed.
179
176
  </p>
180
177
  </template>
@@ -373,7 +370,7 @@ const asLinkTemplate = `
373
370
  const allVariantsTemplate = `
374
371
  <div class="flex w-full flex-row justify-between gap-6">
375
372
  <UiItemGroup class="flex flex-col gap-2">
376
- <div class="label-12-medium text-content-on-surface-muted">Default Variant</div>
373
+ <div class="label-12-medium text-content-on-surface-secondary">Default Variant</div>
377
374
  <UiItem title="Default size" description="Standard spacing without row hover." />
378
375
  <UiItemSeparator />
379
376
  <UiItem size="sm" title="Small size" description="Compact spacing without row hover." />
@@ -382,7 +379,7 @@ const allVariantsTemplate = `
382
379
  </UiItemGroup>
383
380
 
384
381
  <UiItemGroup class="flex flex-col gap-2">
385
- <div class="label-12-medium text-content-on-surface-muted">Active Variant</div>
382
+ <div class="label-12-medium text-content-on-surface-secondary">Active Variant</div>
386
383
  <UiItem variant="active" title="Default size" description="Active indicator and background." />
387
384
  <UiItemSeparator />
388
385
  <UiItem variant="active" size="sm" title="Small size" description="Compact active row." />
@@ -391,7 +388,7 @@ const allVariantsTemplate = `
391
388
  </UiItemGroup>
392
389
 
393
390
  <UiItemGroup class="flex flex-col gap-2">
394
- <div class="label-12-medium text-content-on-surface-muted">Outline Variant</div>
391
+ <div class="label-12-medium text-content-on-surface-secondary">Outline Variant</div>
395
392
  <UiItem variant="outline" title="Default size" description="Inset outline keeps height stable." />
396
393
  <UiItemSeparator />
397
394
  <UiItem variant="outline" size="sm" title="Small size" description="Compact outlined row." />
@@ -400,7 +397,7 @@ const allVariantsTemplate = `
400
397
  </UiItemGroup>
401
398
 
402
399
  <UiItemGroup class="flex flex-col gap-2">
403
- <div class="label-12-medium text-content-on-surface-muted">Hover Variant</div>
400
+ <div class="label-12-medium text-content-on-surface-secondary">Hover Variant</div>
404
401
  <UiItem variant="hover" title="Default size" description="Only row hover feedback." />
405
402
  <UiItemSeparator />
406
403
  <UiItem variant="hover" size="sm" title="Small size" description="Compact row hover feedback." />
@@ -409,7 +406,7 @@ const allVariantsTemplate = `
409
406
  </UiItemGroup>
410
407
 
411
408
  <UiItemGroup class="flex flex-col gap-2">
412
- <div class="label-12-medium text-content-on-surface-muted">Hover Action Variant</div>
409
+ <div class="label-12-medium text-content-on-surface-secondary">Hover Action Variant</div>
413
410
  <UiItem variant="hover-action" title="Default size" description="Row hover plus action hover." />
414
411
  <UiItemSeparator />
415
412
  <UiItem variant="hover-action" size="sm" title="Small size" description="Compact row and action hover." />
@@ -59,7 +59,7 @@ const value = ref('')
59
59
 
60
60
  <template>
61
61
  <UiSelect v-model="value">
62
- <UiSelectTrigger>
62
+ <UiSelectTrigger ariaLabel="Select option">
63
63
  <UiSelectValue placeholder="Select a fruit" />
64
64
  </UiSelectTrigger>
65
65
  <UiSelectContent>
@@ -89,7 +89,7 @@ export const Default: Story = {
89
89
  },
90
90
  template: `
91
91
  <UiSelect v-model="value" v-bind="args">
92
- <UiSelectTrigger>
92
+ <UiSelectTrigger ariaLabel="Select option">
93
93
  <UiSelectValue placeholder="Select a fruit" />
94
94
  </UiSelectTrigger>
95
95
  <UiSelectContent>
@@ -129,7 +129,7 @@ const value = ref('')
129
129
 
130
130
  <template>
131
131
  <UiSelect v-model="value">
132
- <UiSelectTrigger>
132
+ <UiSelectTrigger ariaLabel="Select option">
133
133
  <UiSelectValue placeholder="Select a food" />
134
134
  </UiSelectTrigger>
135
135
  <UiSelectContent>
@@ -171,7 +171,7 @@ export const WithGroups: Story = {
171
171
  },
172
172
  template: `
173
173
  <UiSelect v-model="value" v-bind="args">
174
- <UiSelectTrigger>
174
+ <UiSelectTrigger ariaLabel="Select option">
175
175
  <UiSelectValue placeholder="Select a food" />
176
176
  </UiSelectTrigger>
177
177
  <UiSelectContent>
@@ -216,7 +216,7 @@ const value = ref('')
216
216
 
217
217
  <template>
218
218
  <UiSelect v-model="value">
219
- <UiSelectTrigger>
219
+ <UiSelectTrigger ariaLabel="Select option">
220
220
  <UiSelectValue placeholder="Select a plan" />
221
221
  </UiSelectTrigger>
222
222
  <UiSelectContent>
@@ -245,7 +245,7 @@ export const WithDisabledItems: Story = {
245
245
  },
246
246
  template: `
247
247
  <UiSelect v-model="value" v-bind="args">
248
- <UiSelectTrigger>
248
+ <UiSelectTrigger ariaLabel="Select option">
249
249
  <UiSelectValue placeholder="Select a plan" />
250
250
  </UiSelectTrigger>
251
251
  <UiSelectContent>
@@ -281,7 +281,7 @@ const value = ref('')
281
281
 
282
282
  <template>
283
283
  <UiSelect v-model="value">
284
- <UiSelectTrigger class="w-[220px]">
284
+ <UiSelectTrigger ariaLabel="Select option" class="w-[220px]">
285
285
  <UiSelectValue placeholder="Select chart type" />
286
286
  </UiSelectTrigger>
287
287
  <UiSelectContent>
@@ -327,7 +327,7 @@ export const WithIcons: Story = {
327
327
  },
328
328
  template: `
329
329
  <UiSelect v-model="value" v-bind="args">
330
- <UiSelectTrigger class="w-[220px]">
330
+ <UiSelectTrigger ariaLabel="Select option" class="w-[220px]">
331
331
  <UiSelectValue placeholder="Select chart type" />
332
332
  </UiSelectTrigger>
333
333
  <UiSelectContent>
@@ -377,7 +377,7 @@ const value = ref('')
377
377
 
378
378
  <template>
379
379
  <UiSelect v-model="value" :disabled="true">
380
- <UiSelectTrigger>
380
+ <UiSelectTrigger ariaLabel="Select option">
381
381
  <UiSelectValue placeholder="Select an option" />
382
382
  </UiSelectTrigger>
383
383
  <UiSelectContent>
@@ -405,7 +405,7 @@ export const Disabled: Story = {
405
405
  },
406
406
  template: `
407
407
  <UiSelect v-model="value" :disabled="true">
408
- <UiSelectTrigger>
408
+ <UiSelectTrigger ariaLabel="Select option">
409
409
  <UiSelectValue placeholder="Select an option" />
410
410
  </UiSelectTrigger>
411
411
  <UiSelectContent>
@@ -442,7 +442,7 @@ const value2 = ref('')
442
442
  <template>
443
443
  <div class="flex items-center gap-4">
444
444
  <UiSelect v-model="value">
445
- <UiSelectTrigger size="sm">
445
+ <UiSelectTrigger ariaLabel="Select option" size="sm">
446
446
  <UiSelectValue placeholder="Small" />
447
447
  </UiSelectTrigger>
448
448
  <UiSelectContent>
@@ -451,7 +451,7 @@ const value2 = ref('')
451
451
  </UiSelectContent>
452
452
  </UiSelect>
453
453
  <UiSelect v-model="value2">
454
- <UiSelectTrigger size="default">
454
+ <UiSelectTrigger ariaLabel="Select option" size="default">
455
455
  <UiSelectValue placeholder="Default" />
456
456
  </UiSelectTrigger>
457
457
  <UiSelectContent>
@@ -482,7 +482,7 @@ export const Sizes: Story = {
482
482
  template: `
483
483
  <div class="flex items-center gap-4">
484
484
  <UiSelect v-model="value">
485
- <UiSelectTrigger size="sm">
485
+ <UiSelectTrigger ariaLabel="Select option" size="sm">
486
486
  <UiSelectValue placeholder="Small" />
487
487
  </UiSelectTrigger>
488
488
  <UiSelectContent>
@@ -491,7 +491,7 @@ export const Sizes: Story = {
491
491
  </UiSelectContent>
492
492
  </UiSelect>
493
493
  <UiSelect v-model="value2">
494
- <UiSelectTrigger size="default">
494
+ <UiSelectTrigger ariaLabel="Select option" size="default">
495
495
  <UiSelectValue placeholder="Default" />
496
496
  </UiSelectTrigger>
497
497
  <UiSelectContent>
@@ -526,7 +526,7 @@ const value = ref('banana')
526
526
 
527
527
  <template>
528
528
  <UiSelect v-model="value">
529
- <UiSelectTrigger>
529
+ <UiSelectTrigger ariaLabel="Select option">
530
530
  <UiSelectValue placeholder="Select a fruit" />
531
531
  </UiSelectTrigger>
532
532
  <UiSelectContent>
@@ -557,7 +557,7 @@ const value = ref<string[]>([])
557
557
  stretching the trigger when more items are selected.
558
558
  -->
559
559
  <UiSelect v-model="value" :multiple="true">
560
- <UiSelectTrigger class="w-[220px]">
560
+ <UiSelectTrigger ariaLabel="Select option" class="w-[220px]">
561
561
  <UiSelectValue placeholder="Select fruits" />
562
562
  </UiSelectTrigger>
563
563
  <UiSelectContent>
@@ -593,7 +593,7 @@ export const Multiple: Story = {
593
593
  template: `
594
594
  <div class="flex flex-col gap-3">
595
595
  <UiSelect v-model="value" :multiple="true">
596
- <UiSelectTrigger class="w-[220px]">
596
+ <UiSelectTrigger ariaLabel="Select option" class="w-[220px]">
597
597
  <UiSelectValue placeholder="Select fruits" />
598
598
  </UiSelectTrigger>
599
599
  <UiSelectContent>
@@ -632,7 +632,7 @@ const value = ref<string[]>(['banana', 'mango'])
632
632
 
633
633
  <template>
634
634
  <UiSelect v-model="value" :multiple="true">
635
- <UiSelectTrigger class="w-[260px]">
635
+ <UiSelectTrigger ariaLabel="Select option" class="w-[260px]">
636
636
  <UiSelectValue placeholder="Select fruits" />
637
637
  </UiSelectTrigger>
638
638
  <UiSelectContent>
@@ -664,7 +664,7 @@ export const MultipleWithDefaultValue: Story = {
664
664
  },
665
665
  template: `
666
666
  <UiSelect v-model="value" :multiple="true">
667
- <UiSelectTrigger class="w-[260px]">
667
+ <UiSelectTrigger ariaLabel="Select option" class="w-[260px]">
668
668
  <UiSelectValue placeholder="Select fruits" />
669
669
  </UiSelectTrigger>
670
670
  <UiSelectContent>
@@ -704,7 +704,7 @@ export const WithDefaultValue: Story = {
704
704
  },
705
705
  template: `
706
706
  <UiSelect v-model="value">
707
- <UiSelectTrigger>
707
+ <UiSelectTrigger ariaLabel="Select option">
708
708
  <UiSelectValue placeholder="Select a fruit" />
709
709
  </UiSelectTrigger>
710
710
  <UiSelectContent>