@aleph-alpha/ui-library 5.3.1 → 5.4.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/config.d.ts +29 -3
- package/config.js +91 -3
- package/dist/system/lib.js +5246 -5152
- package/dist/system/patterns/UiDataTable/UiDataTableFilterMenu.vue.d.ts +24 -0
- package/dist/system/patterns/UiDataTable/constants.d.ts +10 -0
- package/dist/system/patterns/UiDataTable/index.d.ts +1 -0
- package/dist/system/patterns/UiDataTable/types.d.ts +23 -1
- package/docs/public-docs/getting-started-designers.md +3 -1
- package/package.json +1 -1
- package/src/components/UiAutocomplete/UiAutocomplete.stories.ts +1 -1
- package/src/components/UiAutocomplete/UiAutocomplete.vue +5 -5
- package/src/components/UiButton/UiButton.stories.ts +5 -5
- package/src/components/UiCheckbox/UiCheckbox.stories.ts +7 -9
- package/src/components/UiChip/UiChip.vue +1 -1
- package/src/components/UiDrawer/UiDrawer.stories.ts +2 -2
- package/src/components/UiDropdownMenu/UiDropdownMenu.stories.ts +4 -4
- package/src/components/UiEmpty/UiEmpty.vue +2 -2
- package/src/components/UiField/UiField.stories.ts +2 -2
- package/src/components/UiField/UiFieldLabelInfo.vue +1 -1
- package/src/components/UiFileUploadBox/UiFileUploadBox.stories.ts +2 -2
- package/src/components/UiFileUploadBox/UiFileUploadBox.vue +2 -2
- package/src/components/UiInput/UiInput.vue +3 -3
- package/src/components/UiKbd/UiKbd.stories.ts +14 -14
- package/src/components/UiNavigationMenu/UiNavigationMenu.stories.ts +42 -42
- package/src/components/UiPopover/UiPopover.stories.ts +6 -6
- package/src/components/UiRadioGroup/UiRadioGroup.stories.ts +2 -2
- package/src/components/UiResizable/UiResizable.stories.ts +6 -5
- package/src/components/UiSeparator/UiSeparator.stories.ts +6 -6
- package/src/components/UiSheet/UiSheet.stories.ts +2 -2
- package/src/components/UiSlider/UiSlider.stories.ts +8 -8
- package/src/components/UiSpinner/UiSpinner.stories.ts +8 -8
- package/src/components/UiSwitch/UiSwitch.stories.ts +2 -2
- package/src/components/UiTabs/UiTabs.stories.ts +30 -30
- package/src/components/UiToggle/__tests__/UiToggle.test.ts +5 -3
- package/src/components/UiToggleGroup/UiToggleGroup.stories.ts +9 -9
- package/src/components/UiTooltip/UiTooltip.stories.ts +3 -3
- package/src/components/core/accordion/AccordionTrigger.vue +2 -2
- package/src/components/core/alert/AlertDescription.vue +1 -1
- package/src/components/core/badge/index.ts +1 -1
- package/src/components/core/button/index.ts +2 -2
- package/src/components/core/calendar/CalendarCellTrigger.vue +2 -2
- package/src/components/core/calendar/CalendarHeadCell.vue +1 -1
- package/src/components/core/card/CardDescription.vue +1 -1
- package/src/components/core/checkbox/Checkbox.vue +1 -1
- package/src/components/core/drawer/DrawerDescription.vue +1 -1
- package/src/components/core/dropdown-menu/DropdownMenuItem.vue +1 -1
- package/src/components/core/dropdown-menu/DropdownMenuShortcut.vue +1 -1
- package/src/components/core/field/FieldDescription.vue +1 -1
- package/src/components/core/field/FieldLabel.vue +1 -1
- package/src/components/core/field/FieldSeparator.vue +1 -1
- package/src/components/core/input/Input.vue +2 -2
- package/src/components/core/item/index.ts +1 -1
- package/src/components/core/kbd/Kbd.vue +1 -1
- package/src/components/core/listbox/ListboxFilter.vue +1 -1
- package/src/components/core/listbox/ListboxGroupLabel.vue +4 -1
- package/src/components/core/listbox/ListboxItem.vue +1 -1
- package/src/components/core/native-select/NativeSelect.vue +3 -3
- package/src/components/core/navigation-menu/NavigationMenuLink.vue +1 -1
- package/src/components/core/navigation-menu/index.ts +1 -1
- package/src/components/core/radio-group/RadioGroupItem.vue +1 -1
- package/src/components/core/range-calendar/RangeCalendarCellTrigger.vue +2 -2
- package/src/components/core/range-calendar/RangeCalendarHeadCell.vue +1 -1
- package/src/components/core/select/SelectItem.vue +1 -1
- package/src/components/core/select/SelectLabel.vue +4 -1
- package/src/components/core/select/SelectTrigger.vue +1 -1
- package/src/components/core/sheet/SheetDescription.vue +3 -1
- package/src/components/core/switch/Switch.vue +1 -1
- package/src/components/core/table/TableCaption.vue +3 -1
- package/src/components/core/tabs/TabsList.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/TagsInputInput.vue +1 -1
- package/src/components/core/tags-input/TagsInputItemDelete.vue +1 -1
- package/src/components/core/textarea/Textarea.vue +1 -1
- package/src/components/core/toggle/index.ts +3 -3
- package/src/components/core/toggle-group/index.ts +2 -2
- package/src/lib/useDrag.stories.ts +8 -8
- package/src/patterns/UiDataTable/UiDataTable.stories.ts +420 -10
- package/src/patterns/UiDataTable/UiDataTableColumnFilter.vue +1 -1
- package/src/patterns/UiDataTable/UiDataTableFilterMenu.vue +91 -0
- package/src/patterns/UiDataTable/UiDataTablePagination.vue +1 -1
- package/src/patterns/UiDataTable/constants.ts +12 -0
- package/src/patterns/UiDataTable/index.ts +1 -0
- package/src/patterns/UiDataTable/types.ts +24 -0
- package/src/patterns/UiDatePicker/UiDatePicker.stories.ts +4 -4
- package/src/patterns/UiDatePicker/UiDatePicker.vue +1 -1
- package/src/patterns/UiFloatActions/UiFloatActionItems.vue +4 -3
- package/src/patterns/UiFloatActions/UiFloatActions.stories.ts +353 -447
- package/src/patterns/UiFloatActions/UiFloatActions.vue +1 -1
- package/src/patterns/UiSidebar/UiSidebarMenuButton.stories.ts +2 -2
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { UiDataTableFilterMenuProps } 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<{
|
|
4
|
+
readonly "onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
5
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:open"> & ({
|
|
6
|
+
open?: boolean;
|
|
7
|
+
} & UiDataTableFilterMenuProps<TData>) & Partial<{}>> & import('vue').PublicProps;
|
|
8
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
9
|
+
attrs: any;
|
|
10
|
+
slots: Readonly<{
|
|
11
|
+
/** Filter controls, usually a form with inputs and checkbox groups. */
|
|
12
|
+
default(): unknown;
|
|
13
|
+
}> & {
|
|
14
|
+
/** Filter controls, usually a form with inputs and checkbox groups. */
|
|
15
|
+
default(): unknown;
|
|
16
|
+
};
|
|
17
|
+
emit: (evt: "update:open", value: boolean) => void;
|
|
18
|
+
}>) => import('vue').VNode & {
|
|
19
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
20
|
+
};
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_PrettifyLocal<T> = {
|
|
23
|
+
[K in keyof T]: T[K];
|
|
24
|
+
} & {};
|
|
@@ -21,6 +21,9 @@ 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
|
+
/** UiDataTableFilterMenu */
|
|
25
|
+
readonly filters: "Filters";
|
|
26
|
+
readonly toggleFilters: "Toggle Filters";
|
|
24
27
|
/** UiDataTableColumnFilter */
|
|
25
28
|
readonly columns: "Columns";
|
|
26
29
|
readonly toggleColumns: "Toggle columns";
|
|
@@ -66,3 +69,10 @@ export interface ColumnFilterLabels {
|
|
|
66
69
|
/** Dropdown section label. */
|
|
67
70
|
columnVisibility?: string;
|
|
68
71
|
}
|
|
72
|
+
/** Labels for UiDataTableFilterMenu */
|
|
73
|
+
export interface FilterMenuLabels {
|
|
74
|
+
/** Visible label for the trigger button. */
|
|
75
|
+
filters?: string;
|
|
76
|
+
/** Accessible label for the trigger button. */
|
|
77
|
+
toggleFilters?: string;
|
|
78
|
+
}
|
|
@@ -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 { default as UiDataTableFilterMenu } from './UiDataTableFilterMenu.vue';
|
|
6
7
|
export type { Column, ColumnDef, Row, Table } from '@tanstack/vue-table';
|
|
7
8
|
export * from './types';
|
|
8
9
|
export * from './constants';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Column, ColumnDef, Row, Table } from '@tanstack/vue-table';
|
|
2
|
-
import { ColumnHeaderLabels, ColumnFilterLabels, PaginationLabels } from './constants';
|
|
2
|
+
import { ColumnHeaderLabels, ColumnFilterLabels, FilterMenuLabels, 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.
|
|
@@ -119,3 +119,25 @@ export type UiDataTableColumnFilterProps<TData> = {
|
|
|
119
119
|
*/
|
|
120
120
|
labels?: ColumnFilterLabels;
|
|
121
121
|
};
|
|
122
|
+
/**
|
|
123
|
+
* Props for the UiDataTableFilterMenu component.
|
|
124
|
+
*/
|
|
125
|
+
export type UiDataTableFilterMenuProps<TData> = {
|
|
126
|
+
/**
|
|
127
|
+
* The TanStack Table instance. Optional — the menu only hosts filter controls
|
|
128
|
+
* passed via the default slot and does not read from the table directly.
|
|
129
|
+
* @internal
|
|
130
|
+
*/
|
|
131
|
+
table?: Table<TData>;
|
|
132
|
+
/**
|
|
133
|
+
* Number of filters currently applied. When greater than `0`, a count badge is
|
|
134
|
+
* shown next to the label and the trigger stays visually filled (active).
|
|
135
|
+
* @default 0
|
|
136
|
+
*/
|
|
137
|
+
activeCount?: number;
|
|
138
|
+
/**
|
|
139
|
+
* Custom labels for i18n support.
|
|
140
|
+
* Partial object that merges with defaults.
|
|
141
|
+
*/
|
|
142
|
+
labels?: FilterMenuLabels;
|
|
143
|
+
};
|
|
@@ -25,6 +25,8 @@ See Figma documentation for more details on how to manage libraries in [Add or r
|
|
|
25
25
|
|
|
26
26
|
With the library enabled on the file, open the **Style and variables** picker in the **right sidebar** on properties such as fill, stroke, spacing, and typography to apply **variables** and **styles** from the design system.
|
|
27
27
|
|
|
28
|
+
All components come preconfigured with our semantic tokens for color, padding and typography styles. Unless there is a specific need to change the values, please use the default settings. In the event that the spacing values need to be adjusted, please choose from the predefined spacing tokens instead of raw values.
|
|
29
|
+
|
|
28
30
|
## Contribution Model
|
|
29
31
|
|
|
30
|
-
See the [Contribution Model](/contributing-to-platform/) for how design and engineering changes flow into the design system.
|
|
32
|
+
See the [Contribution Model](/contributing-to-platform/) for how design and engineering changes flow into the design system.
|
package/package.json
CHANGED
|
@@ -175,7 +175,7 @@ export const WithSlots: Story = {
|
|
|
175
175
|
<template #item="{ option, selected }">
|
|
176
176
|
<div class="flex min-w-0 flex-1 items-center justify-between gap-2">
|
|
177
177
|
<span class="truncate">{{ option.label }}</span>
|
|
178
|
-
<span v-if="selected" class="label-12-regular text-muted
|
|
178
|
+
<span v-if="selected" class="label-12-regular text-content-on-surface-muted">Selected</span>
|
|
179
179
|
</div>
|
|
180
180
|
</template>
|
|
181
181
|
</UiAutocomplete>
|
|
@@ -143,7 +143,7 @@ const inputSlotProps = computed(() => ({
|
|
|
143
143
|
|
|
144
144
|
const shellClasses = computed(() =>
|
|
145
145
|
cn(
|
|
146
|
-
'border-input data-[placeholder]:bg-background-input-default [&:not([data-placeholder])]:border-border-surface-focus-ring
|
|
146
|
+
'border-input data-[placeholder]:bg-background-input-default [&:not([data-placeholder])]:border-border-surface-focus-ring ui-focus-ring-within aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex h-9 w-full min-w-0 items-center gap-2 rounded-md border bg-accent px-3 py-2 label-14-regular transition-[color,box-shadow]',
|
|
147
147
|
props.disabled && 'pointer-events-none cursor-not-allowed opacity-50',
|
|
148
148
|
),
|
|
149
149
|
);
|
|
@@ -322,7 +322,7 @@ provideUiAutocompleteContext({
|
|
|
322
322
|
v-if="props.startIcon"
|
|
323
323
|
:name="props.startIcon"
|
|
324
324
|
:size="16"
|
|
325
|
-
class="text-muted
|
|
325
|
+
class="text-content-on-surface-muted shrink-0"
|
|
326
326
|
/>
|
|
327
327
|
|
|
328
328
|
<div class="relative flex min-w-0 flex-1 items-center">
|
|
@@ -346,7 +346,7 @@ provideUiAutocompleteContext({
|
|
|
346
346
|
"
|
|
347
347
|
:disabled="props.disabled"
|
|
348
348
|
:required="props.required && selectedValues.length === 0"
|
|
349
|
-
class="placeholder:text-muted
|
|
349
|
+
class="placeholder:text-content-on-surface-muted min-w-0 bg-transparent outline-none disabled:cursor-not-allowed"
|
|
350
350
|
:class="
|
|
351
351
|
showSelectionDisplay
|
|
352
352
|
? 'absolute inset-0 size-full cursor-text opacity-0'
|
|
@@ -362,7 +362,7 @@ provideUiAutocompleteContext({
|
|
|
362
362
|
|
|
363
363
|
<button
|
|
364
364
|
type="button"
|
|
365
|
-
class="text-muted
|
|
365
|
+
class="text-content-on-surface-muted flex size-5 shrink-0 items-center justify-center rounded-sm outline-none"
|
|
366
366
|
:disabled="props.disabled"
|
|
367
367
|
:aria-expanded="openState"
|
|
368
368
|
aria-haspopup="listbox"
|
|
@@ -453,7 +453,7 @@ provideUiAutocompleteContext({
|
|
|
453
453
|
|
|
454
454
|
<div
|
|
455
455
|
v-if="hasInternalOptions && filteredOptions.length === 0"
|
|
456
|
-
class="text-muted
|
|
456
|
+
class="text-content-on-surface-muted px-2 py-1.5 label-14-regular"
|
|
457
457
|
>
|
|
458
458
|
{{ props.emptyText }}
|
|
459
459
|
</div>
|
|
@@ -1323,15 +1323,15 @@ export const AllVariantsAndSizes: Story = {
|
|
|
1323
1323
|
</colgroup>
|
|
1324
1324
|
<thead>
|
|
1325
1325
|
<tr>
|
|
1326
|
-
<th class="label-12-medium text-muted
|
|
1327
|
-
<th class="label-12-medium text-muted
|
|
1328
|
-
<th class="label-12-medium text-muted
|
|
1329
|
-
<th class="label-12-medium text-muted
|
|
1326
|
+
<th class="label-12-medium text-content-on-surface-muted border border-border-surface-default px-3 py-2 text-center">Size</th>
|
|
1327
|
+
<th class="label-12-medium text-content-on-surface-muted border border-border-surface-default px-3 py-2 text-center">Default</th>
|
|
1328
|
+
<th class="label-12-medium text-content-on-surface-muted border border-border-surface-default px-3 py-2 text-center">Loading</th>
|
|
1329
|
+
<th class="label-12-medium text-content-on-surface-muted border border-border-surface-default px-3 py-2 text-center">Disabled</th>
|
|
1330
1330
|
</tr>
|
|
1331
1331
|
</thead>
|
|
1332
1332
|
<tbody>
|
|
1333
1333
|
<tr v-for="row in rowsFor(variant)" :key="row.size" class="align-middle">
|
|
1334
|
-
<td class="label-12-medium text-muted
|
|
1334
|
+
<td class="label-12-medium text-content-on-surface-muted border border-border-surface-default px-3 py-2 text-center whitespace-nowrap">{{ row.size }}</td>
|
|
1335
1335
|
<td class="border border-border-surface-default px-3 py-2 text-center">
|
|
1336
1336
|
<UiButton :variant="variant" :size="row.size" aria-label="Close">
|
|
1337
1337
|
<template v-if="row.isIcon"><UiIcon name="x" /></template>
|
|
@@ -245,7 +245,7 @@ const checked = ref(true)
|
|
|
245
245
|
<label for="terms-2" class="body-14-medium">
|
|
246
246
|
Accept terms and conditions
|
|
247
247
|
</label>
|
|
248
|
-
<p class="body-14-regular text-muted
|
|
248
|
+
<p class="body-14-regular text-content-on-surface-muted">
|
|
249
249
|
By clicking this checkbox, you agree to the terms and conditions.
|
|
250
250
|
</p>
|
|
251
251
|
</div>
|
|
@@ -268,7 +268,7 @@ export const WithDescription: Story = {
|
|
|
268
268
|
<label for="terms-2" class="body-14-medium">
|
|
269
269
|
Accept terms and conditions
|
|
270
270
|
</label>
|
|
271
|
-
<p class="body-14-regular text-muted
|
|
271
|
+
<p class="body-14-regular text-content-on-surface-muted">
|
|
272
272
|
By clicking this checkbox, you agree to the terms and conditions.
|
|
273
273
|
</p>
|
|
274
274
|
</div>
|
|
@@ -333,19 +333,18 @@ const enabled = ref(true)
|
|
|
333
333
|
|
|
334
334
|
<template>
|
|
335
335
|
<label
|
|
336
|
-
class="hover:bg-accent/50 flex items-start gap-3 rounded-lg border p-3 has-[[aria-checked=true]]:border-
|
|
336
|
+
class="hover:bg-accent/50 flex items-start gap-3 rounded-lg border p-3 has-[[aria-checked=true]]:border-border-input-default has-[[aria-checked=true]]:bg-background-surface-secondary dark:has-[[aria-checked=true]]:border-blue-900 dark:has-[[aria-checked=true]]:bg-blue-950"
|
|
337
337
|
>
|
|
338
338
|
<UiCheckbox
|
|
339
339
|
id="notifications"
|
|
340
340
|
name="notifications"
|
|
341
341
|
v-model="enabled"
|
|
342
|
-
class="data-[state=checked]:border-blue-600 data-[state=checked]:bg-blue-600 data-[state=checked]:text-white dark:data-[state=checked]:border-blue-700 dark:data-[state=checked]:bg-blue-700"
|
|
343
342
|
/>
|
|
344
343
|
<div class="grid gap-1.5 font-normal">
|
|
345
344
|
<p class="body-14-medium leading-none">
|
|
346
345
|
Enable notifications
|
|
347
346
|
</p>
|
|
348
|
-
<p class="body-14-regular text-muted
|
|
347
|
+
<p class="body-14-regular text-content-on-surface-muted">
|
|
349
348
|
You can enable or disable notifications at any time.
|
|
350
349
|
</p>
|
|
351
350
|
</div>
|
|
@@ -364,20 +363,19 @@ export const Card: Story = {
|
|
|
364
363
|
return { args, enabled };
|
|
365
364
|
},
|
|
366
365
|
template: `<label
|
|
367
|
-
class="
|
|
366
|
+
class="flex items-start gap-3 rounded-lg border p-3 has-[[aria-checked=true]]:border-border-input-default has-[[aria-checked=true]]:bg-background-surface-muted dark:has-[[aria-checked=true]]:border-blue-900 dark:has-[[aria-checked=true]]:bg-blue-950"
|
|
368
367
|
>
|
|
369
368
|
<UiCheckbox
|
|
370
369
|
id="notifications"
|
|
371
370
|
name="notifications"
|
|
372
371
|
v-model="enabled"
|
|
373
372
|
:disabled="args.disabled"
|
|
374
|
-
class="data-[state=checked]:border-blue-600 data-[state=checked]:bg-blue-600 data-[state=checked]:text-white dark:data-[state=checked]:border-blue-700 dark:data-[state=checked]:bg-blue-700"
|
|
375
373
|
/>
|
|
376
374
|
<div class="grid gap-1.5 font-normal">
|
|
377
|
-
<p class="body-14-medium leading-none">
|
|
375
|
+
<p class="body-14-medium leading-none text-content-on-surface-primary">
|
|
378
376
|
Enable notifications
|
|
379
377
|
</p>
|
|
380
|
-
<p class="body-14-regular text-muted
|
|
378
|
+
<p class="body-14-regular text-content-on-surface-muted">
|
|
381
379
|
You can enable or disable notifications at any time.
|
|
382
380
|
</p>
|
|
383
381
|
</div>
|
|
@@ -136,7 +136,7 @@ const removableChipClass = computed(() =>
|
|
|
136
136
|
<button
|
|
137
137
|
data-slot="chip-remove"
|
|
138
138
|
type="button"
|
|
139
|
-
class="inline-flex size-5 items-center justify-center rounded-full outline-none hover-layer hover-layer-default
|
|
139
|
+
class="inline-flex size-5 items-center justify-center rounded-full outline-none hover-layer hover-layer-default ui-focus-ring disabled:pointer-events-none"
|
|
140
140
|
:aria-label="props.removeLabel"
|
|
141
141
|
:disabled="props.disabled"
|
|
142
142
|
@click="removeChip"
|
|
@@ -258,7 +258,7 @@ import {
|
|
|
258
258
|
|
|
259
259
|
<template>
|
|
260
260
|
<div class="gap-y-4">
|
|
261
|
-
<p class="body-14-regular text-muted
|
|
261
|
+
<p class="body-14-regular text-content-on-surface-muted">
|
|
262
262
|
Non-modal drawer: you can still interact with the page while it is open.
|
|
263
263
|
</p>
|
|
264
264
|
<UiDrawer :modal="false">
|
|
@@ -304,7 +304,7 @@ export const NonModal: Story = {
|
|
|
304
304
|
},
|
|
305
305
|
template: `
|
|
306
306
|
<div class="gap-y-4">
|
|
307
|
-
<p class="body-14-regular text-muted
|
|
307
|
+
<p class="body-14-regular text-content-on-surface-muted">
|
|
308
308
|
Non-modal drawer: you can still interact with the page while it is open.
|
|
309
309
|
</p>
|
|
310
310
|
<UiDrawer :modal="false">
|
|
@@ -1057,9 +1057,9 @@ const open = ref(false)
|
|
|
1057
1057
|
</UiAvatar>
|
|
1058
1058
|
<div class="flex flex-col items-start overflow-hidden">
|
|
1059
1059
|
<span class="truncate label-14-medium">Sofia Davis</span>
|
|
1060
|
-
<span class="truncate label-12-regular text-muted
|
|
1060
|
+
<span class="truncate label-12-regular text-content-on-surface-muted font-normal">sofia@example.com</span>
|
|
1061
1061
|
</div>
|
|
1062
|
-
<UiIcon name="chevrons-up-down" :size="16" class="shrink-0 text-muted
|
|
1062
|
+
<UiIcon name="chevrons-up-down" :size="16" class="shrink-0 text-content-on-surface-muted" />
|
|
1063
1063
|
</UiButton>
|
|
1064
1064
|
</UiDropdownMenuTrigger>
|
|
1065
1065
|
<UiDropdownMenuContent class="w-56" align="start">
|
|
@@ -1115,9 +1115,9 @@ export const WithAvatarTrigger: Story = {
|
|
|
1115
1115
|
</UiAvatar>
|
|
1116
1116
|
<div class="flex flex-col items-start overflow-hidden">
|
|
1117
1117
|
<span class="truncate label-14-medium">Sofia Davis</span>
|
|
1118
|
-
<span class="truncate label-12-regular text-muted
|
|
1118
|
+
<span class="truncate label-12-regular text-content-on-surface-muted font-normal">sofia@example.com</span>
|
|
1119
1119
|
</div>
|
|
1120
|
-
<UiIcon name="chevrons-up-down" :size="16" class="shrink-0 text-muted
|
|
1120
|
+
<UiIcon name="chevrons-up-down" :size="16" class="shrink-0 text-content-on-surface-muted" />
|
|
1121
1121
|
</UiButton>
|
|
1122
1122
|
</UiDropdownMenuTrigger>
|
|
1123
1123
|
<UiDropdownMenuContent class="w-56" align="start">
|
|
@@ -15,7 +15,7 @@ const props = withDefaults(defineProps<UiEmptyProps>(), {
|
|
|
15
15
|
|
|
16
16
|
<template>
|
|
17
17
|
<div class="flex flex-col items-center justify-center py-12 text-center">
|
|
18
|
-
<div class="mb-4 text-muted
|
|
18
|
+
<div class="mb-4 text-content-on-surface-muted" aria-hidden="true">
|
|
19
19
|
<component :is="props.icon" v-if="props.icon" class="size-12" />
|
|
20
20
|
<UiIcon v-else name="inbox" :size="48" />
|
|
21
21
|
</div>
|
|
@@ -26,7 +26,7 @@ const props = withDefaults(defineProps<UiEmptyProps>(), {
|
|
|
26
26
|
|
|
27
27
|
<p
|
|
28
28
|
v-if="props.description"
|
|
29
|
-
class="body-14-regular max-w-sm text-muted
|
|
29
|
+
class="body-14-regular max-w-sm text-content-on-surface-muted"
|
|
30
30
|
>
|
|
31
31
|
{{ props.description }}
|
|
32
32
|
</p>
|
|
@@ -1347,7 +1347,7 @@ const plan = ref('pro')
|
|
|
1347
1347
|
<UiField orientation="responsive" data-disabled="true">
|
|
1348
1348
|
<UiRadioGroupItem id="plan-enterprise" value="enterprise" disabled />
|
|
1349
1349
|
<UiFieldContent>
|
|
1350
|
-
<label for="plan-enterprise" class="label-14-medium text-muted
|
|
1350
|
+
<label for="plan-enterprise" class="label-14-medium text-content-on-surface-muted">Enterprise</label>
|
|
1351
1351
|
<UiFieldDescription>Contact sales for pricing.</UiFieldDescription>
|
|
1352
1352
|
</UiFieldContent>
|
|
1353
1353
|
</UiField>
|
|
@@ -1402,7 +1402,7 @@ export const RadioGroupInFieldSet: Story = {
|
|
|
1402
1402
|
<UiField orientation="responsive" data-disabled="true">
|
|
1403
1403
|
<UiRadioGroupItem id="plan-enterprise" value="enterprise" disabled />
|
|
1404
1404
|
<UiFieldContent>
|
|
1405
|
-
<label for="plan-enterprise" class="label-14-medium text-muted
|
|
1405
|
+
<label for="plan-enterprise" class="label-14-medium text-content-on-surface-muted">Enterprise</label>
|
|
1406
1406
|
<UiFieldDescription>Contact sales for pricing.</UiFieldDescription>
|
|
1407
1407
|
</UiFieldContent>
|
|
1408
1408
|
</UiField>
|
|
@@ -83,7 +83,7 @@ function onError(e: { message: string }) {
|
|
|
83
83
|
@error="onError"
|
|
84
84
|
/>
|
|
85
85
|
<p v-if="lastError" class="body-14-regular text-destructive">{{ lastError }}</p>
|
|
86
|
-
<p v-if="names.length" class="body-14-regular text-muted
|
|
86
|
+
<p v-if="names.length" class="body-14-regular text-content-on-surface-muted">Selected: {{ names.join(', ') }}</p>
|
|
87
87
|
</div>
|
|
88
88
|
</template>`;
|
|
89
89
|
|
|
@@ -110,7 +110,7 @@ export const Default: Story = {
|
|
|
110
110
|
<div class="max-w-md gap-y-2">
|
|
111
111
|
<UiFileUploadBox v-bind="args" @update:files="onFiles" @error="onError" />
|
|
112
112
|
<p v-if="lastError" class="body-14-regular text-destructive">{{ lastError }}</p>
|
|
113
|
-
<p v-if="names.length" class="body-14-regular text-muted
|
|
113
|
+
<p v-if="names.length" class="body-14-regular text-content-on-surface-muted">Selected: {{ names.join(', ') }}</p>
|
|
114
114
|
</div>
|
|
115
115
|
`,
|
|
116
116
|
}),
|
|
@@ -150,7 +150,7 @@ function processFileList(fileList: FileList) {
|
|
|
150
150
|
<div
|
|
151
151
|
:class="
|
|
152
152
|
cn(
|
|
153
|
-
'border-border-surface-default bg-background-surface-modal focus-
|
|
153
|
+
'border-border-surface-default bg-background-surface-modal ui-focus-ring relative flex cursor-pointer flex-col items-center justify-center gap-4 rounded-lg border border-dashed p-8 text-center transition-colors',
|
|
154
154
|
isDragging && 'border-1 border-border-surface-focus-ring',
|
|
155
155
|
disabled && 'cursor-not-allowed opacity-50',
|
|
156
156
|
)
|
|
@@ -231,7 +231,7 @@ function processFileList(fileList: FileList) {
|
|
|
231
231
|
<slot name="footer">
|
|
232
232
|
<div
|
|
233
233
|
v-if="showFooter"
|
|
234
|
-
class="text-muted
|
|
234
|
+
class="text-content-on-surface-muted flex flex-wrap items-center justify-between gap-2 label-12-regular"
|
|
235
235
|
>
|
|
236
236
|
<span v-if="supportedTypesLabel?.trim()">{{
|
|
237
237
|
supportedTypesLabel
|
|
@@ -61,7 +61,7 @@ function handleFilesChange(e: Event) {
|
|
|
61
61
|
<div
|
|
62
62
|
v-if="isFile"
|
|
63
63
|
v-bind="attrs"
|
|
64
|
-
class="flex h-9 w-full min-w-0 items-center gap-2 rounded-md border border-input bg-background-input-default px-1 transition-[color] outline-none
|
|
64
|
+
class="flex h-9 w-full min-w-0 items-center gap-2 rounded-md border border-input bg-background-input-default px-1 transition-[color] outline-none ui-focus-ring-within aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive"
|
|
65
65
|
:class="{
|
|
66
66
|
'pointer-events-none cursor-not-allowed opacity-50': props.disabled,
|
|
67
67
|
}"
|
|
@@ -84,8 +84,8 @@ function handleFilesChange(e: Event) {
|
|
|
84
84
|
</label>
|
|
85
85
|
</UiButton>
|
|
86
86
|
<span
|
|
87
|
-
class="placeholder:text-muted
|
|
88
|
-
:class="{ 'text-muted
|
|
87
|
+
class="placeholder:text-content-on-surface-muted flex-1 truncate pr-2 label-16-regular md:label-14-regular"
|
|
88
|
+
:class="{ 'text-content-on-surface-muted': fileDisplayValue === '' }"
|
|
89
89
|
:aria-controls="fileInputId"
|
|
90
90
|
>
|
|
91
91
|
{{ fileDisplayValue || filePlaceholder }}
|
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
347
|
-
<span class="flex-1 body-14-regular text-muted
|
|
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
|
|
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
|
|
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
|
|
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>
|