@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
|
@@ -84,7 +84,7 @@ import { UiSwitch } from '@aleph-alpha/ui-library'
|
|
|
84
84
|
<template>
|
|
85
85
|
<div class="flex items-center gap-x-3">
|
|
86
86
|
<UiSwitch id="airplane-mode" name="airplane-mode" disabled />
|
|
87
|
-
<label for="airplane-mode" class="label-14-medium text-muted
|
|
87
|
+
<label for="airplane-mode" class="label-14-medium text-content-on-surface-muted">Airplane Mode</label>
|
|
88
88
|
</div>
|
|
89
89
|
</template>`;
|
|
90
90
|
|
|
@@ -110,7 +110,7 @@ export const Disabled: Story = {
|
|
|
110
110
|
template: `
|
|
111
111
|
<div class="flex items-center gap-x-3">
|
|
112
112
|
<UiSwitch id="airplane-mode" v-model="enabled" name="airplane-mode" :disabled="args.disabled" />
|
|
113
|
-
<label for="airplane-mode" class="label-14-medium text-muted
|
|
113
|
+
<label for="airplane-mode" class="label-14-medium text-content-on-surface-muted">Airplane Mode</label>
|
|
114
114
|
</div>
|
|
115
115
|
`,
|
|
116
116
|
}),
|
|
@@ -59,19 +59,19 @@ import {
|
|
|
59
59
|
<UiTabsContent value="account">
|
|
60
60
|
<div class="p-4">
|
|
61
61
|
<h3 class="heading-s">Account</h3>
|
|
62
|
-
<p class="body-14-regular text-muted
|
|
62
|
+
<p class="body-14-regular text-content-on-surface-muted">Manage your account settings and preferences.</p>
|
|
63
63
|
</div>
|
|
64
64
|
</UiTabsContent>
|
|
65
65
|
<UiTabsContent value="password">
|
|
66
66
|
<div class="p-4">
|
|
67
67
|
<h3 class="heading-s">Password</h3>
|
|
68
|
-
<p class="body-14-regular text-muted
|
|
68
|
+
<p class="body-14-regular text-content-on-surface-muted">Change your password and security settings.</p>
|
|
69
69
|
</div>
|
|
70
70
|
</UiTabsContent>
|
|
71
71
|
<UiTabsContent value="settings">
|
|
72
72
|
<div class="p-4">
|
|
73
73
|
<h3 class="heading-s">Settings</h3>
|
|
74
|
-
<p class="body-14-regular text-muted
|
|
74
|
+
<p class="body-14-regular text-content-on-surface-muted">Configure your application settings.</p>
|
|
75
75
|
</div>
|
|
76
76
|
</UiTabsContent>
|
|
77
77
|
</UiTabs>
|
|
@@ -108,19 +108,19 @@ export const Default: Story = {
|
|
|
108
108
|
<UiTabsContent value="account">
|
|
109
109
|
<div class="p-4">
|
|
110
110
|
<h3 class="heading-s">Account</h3>
|
|
111
|
-
<p class="body-14-regular text-muted
|
|
111
|
+
<p class="body-14-regular text-content-on-surface-muted">Manage your account settings and preferences.</p>
|
|
112
112
|
</div>
|
|
113
113
|
</UiTabsContent>
|
|
114
114
|
<UiTabsContent value="password">
|
|
115
115
|
<div class="p-4">
|
|
116
116
|
<h3 class="heading-s">Password</h3>
|
|
117
|
-
<p class="body-14-regular text-muted
|
|
117
|
+
<p class="body-14-regular text-content-on-surface-muted">Change your password and security settings.</p>
|
|
118
118
|
</div>
|
|
119
119
|
</UiTabsContent>
|
|
120
120
|
<UiTabsContent value="settings">
|
|
121
121
|
<div class="p-4">
|
|
122
122
|
<h3 class="heading-s">Settings</h3>
|
|
123
|
-
<p class="body-14-regular text-muted
|
|
123
|
+
<p class="body-14-regular text-content-on-surface-muted">Configure your application settings.</p>
|
|
124
124
|
</div>
|
|
125
125
|
</UiTabsContent>
|
|
126
126
|
</UiTabs>
|
|
@@ -153,17 +153,17 @@ import {
|
|
|
153
153
|
</UiTabsList>
|
|
154
154
|
<UiTabsContent value="tab1">
|
|
155
155
|
<div class="p-4">
|
|
156
|
-
<p class="body-14-regular text-muted
|
|
156
|
+
<p class="body-14-regular text-content-on-surface-muted">Content for the first tab.</p>
|
|
157
157
|
</div>
|
|
158
158
|
</UiTabsContent>
|
|
159
159
|
<UiTabsContent value="tab2">
|
|
160
160
|
<div class="p-4">
|
|
161
|
-
<p class="body-14-regular text-muted
|
|
161
|
+
<p class="body-14-regular text-content-on-surface-muted">This content is for the disabled tab.</p>
|
|
162
162
|
</div>
|
|
163
163
|
</UiTabsContent>
|
|
164
164
|
<UiTabsContent value="tab3">
|
|
165
165
|
<div class="p-4">
|
|
166
|
-
<p class="body-14-regular text-muted
|
|
166
|
+
<p class="body-14-regular text-content-on-surface-muted">Content for the third tab.</p>
|
|
167
167
|
</div>
|
|
168
168
|
</UiTabsContent>
|
|
169
169
|
</UiTabs>
|
|
@@ -184,17 +184,17 @@ export const WithDisabledTab: Story = {
|
|
|
184
184
|
</UiTabsList>
|
|
185
185
|
<UiTabsContent value="tab1">
|
|
186
186
|
<div class="p-4">
|
|
187
|
-
<p class="body-14-regular text-muted
|
|
187
|
+
<p class="body-14-regular text-content-on-surface-muted">Content for the first tab.</p>
|
|
188
188
|
</div>
|
|
189
189
|
</UiTabsContent>
|
|
190
190
|
<UiTabsContent value="tab2">
|
|
191
191
|
<div class="p-4">
|
|
192
|
-
<p class="body-14-regular text-muted
|
|
192
|
+
<p class="body-14-regular text-content-on-surface-muted">This content is for the disabled tab.</p>
|
|
193
193
|
</div>
|
|
194
194
|
</UiTabsContent>
|
|
195
195
|
<UiTabsContent value="tab3">
|
|
196
196
|
<div class="p-4">
|
|
197
|
-
<p class="body-14-regular text-muted
|
|
197
|
+
<p class="body-14-regular text-content-on-surface-muted">Content for the third tab.</p>
|
|
198
198
|
</div>
|
|
199
199
|
</UiTabsContent>
|
|
200
200
|
</UiTabs>
|
|
@@ -228,19 +228,19 @@ import {
|
|
|
228
228
|
<UiTabsContent value="general">
|
|
229
229
|
<div class="p-4">
|
|
230
230
|
<h3 class="heading-s">General</h3>
|
|
231
|
-
<p class="body-14-regular text-muted
|
|
231
|
+
<p class="body-14-regular text-content-on-surface-muted">General settings content.</p>
|
|
232
232
|
</div>
|
|
233
233
|
</UiTabsContent>
|
|
234
234
|
<UiTabsContent value="security">
|
|
235
235
|
<div class="p-4">
|
|
236
236
|
<h3 class="heading-s">Security</h3>
|
|
237
|
-
<p class="body-14-regular text-muted
|
|
237
|
+
<p class="body-14-regular text-content-on-surface-muted">Security settings content.</p>
|
|
238
238
|
</div>
|
|
239
239
|
</UiTabsContent>
|
|
240
240
|
<UiTabsContent value="notifications">
|
|
241
241
|
<div class="p-4">
|
|
242
242
|
<h3 class="heading-s">Notifications</h3>
|
|
243
|
-
<p class="body-14-regular text-muted
|
|
243
|
+
<p class="body-14-regular text-content-on-surface-muted">Notification preferences content.</p>
|
|
244
244
|
</div>
|
|
245
245
|
</UiTabsContent>
|
|
246
246
|
</UiTabs>
|
|
@@ -263,19 +263,19 @@ export const Vertical: Story = {
|
|
|
263
263
|
<UiTabsContent value="general">
|
|
264
264
|
<div class="p-4">
|
|
265
265
|
<h3 class="heading-s">General</h3>
|
|
266
|
-
<p class="body-14-regular text-muted
|
|
266
|
+
<p class="body-14-regular text-content-on-surface-muted">General settings content.</p>
|
|
267
267
|
</div>
|
|
268
268
|
</UiTabsContent>
|
|
269
269
|
<UiTabsContent value="security">
|
|
270
270
|
<div class="p-4">
|
|
271
271
|
<h3 class="heading-s">Security</h3>
|
|
272
|
-
<p class="body-14-regular text-muted
|
|
272
|
+
<p class="body-14-regular text-content-on-surface-muted">Security settings content.</p>
|
|
273
273
|
</div>
|
|
274
274
|
</UiTabsContent>
|
|
275
275
|
<UiTabsContent value="notifications">
|
|
276
276
|
<div class="p-4">
|
|
277
277
|
<h3 class="heading-s">Notifications</h3>
|
|
278
|
-
<p class="body-14-regular text-muted
|
|
278
|
+
<p class="body-14-regular text-content-on-surface-muted">Notification preferences content.</p>
|
|
279
279
|
</div>
|
|
280
280
|
</UiTabsContent>
|
|
281
281
|
</UiTabs>
|
|
@@ -308,17 +308,17 @@ import {
|
|
|
308
308
|
</UiTabsList>
|
|
309
309
|
<UiTabsContent value="tab1">
|
|
310
310
|
<div class="p-4">
|
|
311
|
-
<p class="body-14-regular text-muted
|
|
311
|
+
<p class="body-14-regular text-content-on-surface-muted">Click to activate tabs (keyboard focus won't auto-switch).</p>
|
|
312
312
|
</div>
|
|
313
313
|
</UiTabsContent>
|
|
314
314
|
<UiTabsContent value="tab2">
|
|
315
315
|
<div class="p-4">
|
|
316
|
-
<p class="body-14-regular text-muted
|
|
316
|
+
<p class="body-14-regular text-content-on-surface-muted">Second tab content.</p>
|
|
317
317
|
</div>
|
|
318
318
|
</UiTabsContent>
|
|
319
319
|
<UiTabsContent value="tab3">
|
|
320
320
|
<div class="p-4">
|
|
321
|
-
<p class="body-14-regular text-muted
|
|
321
|
+
<p class="body-14-regular text-content-on-surface-muted">Third tab content.</p>
|
|
322
322
|
</div>
|
|
323
323
|
</UiTabsContent>
|
|
324
324
|
</UiTabs>
|
|
@@ -340,17 +340,17 @@ export const ManualActivation: Story = {
|
|
|
340
340
|
</UiTabsList>
|
|
341
341
|
<UiTabsContent value="tab1">
|
|
342
342
|
<div class="p-4">
|
|
343
|
-
<p class="body-14-regular text-muted
|
|
343
|
+
<p class="body-14-regular text-content-on-surface-muted">Click to activate tabs (keyboard focus won't auto-switch).</p>
|
|
344
344
|
</div>
|
|
345
345
|
</UiTabsContent>
|
|
346
346
|
<UiTabsContent value="tab2">
|
|
347
347
|
<div class="p-4">
|
|
348
|
-
<p class="body-14-regular text-muted
|
|
348
|
+
<p class="body-14-regular text-content-on-surface-muted">Second tab content.</p>
|
|
349
349
|
</div>
|
|
350
350
|
</UiTabsContent>
|
|
351
351
|
<UiTabsContent value="tab3">
|
|
352
352
|
<div class="p-4">
|
|
353
|
-
<p class="body-14-regular text-muted
|
|
353
|
+
<p class="body-14-regular text-content-on-surface-muted">Third tab content.</p>
|
|
354
354
|
</div>
|
|
355
355
|
</UiTabsContent>
|
|
356
356
|
</UiTabs>
|
|
@@ -401,17 +401,17 @@ function goToDetails() {
|
|
|
401
401
|
</UiTabsList>
|
|
402
402
|
<UiTabsContent value="overview">
|
|
403
403
|
<div class="p-4">
|
|
404
|
-
<p class="body-14-regular text-muted
|
|
404
|
+
<p class="body-14-regular text-content-on-surface-muted">Overview content.</p>
|
|
405
405
|
</div>
|
|
406
406
|
</UiTabsContent>
|
|
407
407
|
<UiTabsContent value="details">
|
|
408
408
|
<div class="p-4">
|
|
409
|
-
<p class="body-14-regular text-muted
|
|
409
|
+
<p class="body-14-regular text-content-on-surface-muted">Details content.</p>
|
|
410
410
|
</div>
|
|
411
411
|
</UiTabsContent>
|
|
412
412
|
<UiTabsContent value="history">
|
|
413
413
|
<div class="p-4">
|
|
414
|
-
<p class="body-14-regular text-muted
|
|
414
|
+
<p class="body-14-regular text-content-on-surface-muted">History content.</p>
|
|
415
415
|
</div>
|
|
416
416
|
</UiTabsContent>
|
|
417
417
|
</UiTabs>
|
|
@@ -452,17 +452,17 @@ export const Controlled: Story = {
|
|
|
452
452
|
</UiTabsList>
|
|
453
453
|
<UiTabsContent value="overview">
|
|
454
454
|
<div class="p-4">
|
|
455
|
-
<p class="body-14-regular text-muted
|
|
455
|
+
<p class="body-14-regular text-content-on-surface-muted">Overview content.</p>
|
|
456
456
|
</div>
|
|
457
457
|
</UiTabsContent>
|
|
458
458
|
<UiTabsContent value="details">
|
|
459
459
|
<div class="p-4">
|
|
460
|
-
<p class="body-14-regular text-muted
|
|
460
|
+
<p class="body-14-regular text-content-on-surface-muted">Details content.</p>
|
|
461
461
|
</div>
|
|
462
462
|
</UiTabsContent>
|
|
463
463
|
<UiTabsContent value="history">
|
|
464
464
|
<div class="p-4">
|
|
465
|
-
<p class="body-14-regular text-muted
|
|
465
|
+
<p class="body-14-regular text-content-on-surface-muted">History content.</p>
|
|
466
466
|
</div>
|
|
467
467
|
</UiTabsContent>
|
|
468
468
|
</UiTabs>
|
|
@@ -79,13 +79,15 @@ describe('UiToggle', () => {
|
|
|
79
79
|
expect(toggle).toHaveClass('border-border-button-outlined');
|
|
80
80
|
expect(toggle).toHaveClass('data-[state=on]:bg-background-accent-soft');
|
|
81
81
|
expect(toggle).toHaveClass('data-[state=on]:text-content-on-accent-soft');
|
|
82
|
-
expect(toggle).toHaveClass('data-[state=on]:border-accent-
|
|
82
|
+
expect(toggle).toHaveClass('data-[state=on]:border-background-accent-soft');
|
|
83
83
|
expect(toggle).toHaveClass('data-[state=open]:bg-background-accent-soft');
|
|
84
84
|
expect(toggle).toHaveClass('data-[state=open]:text-content-on-accent-soft');
|
|
85
|
-
expect(toggle).toHaveClass(
|
|
85
|
+
expect(toggle).toHaveClass(
|
|
86
|
+
'data-[state=open]:border-background-accent-soft',
|
|
87
|
+
);
|
|
86
88
|
expect(toggle).toHaveClass('aria-pressed:bg-background-accent-soft');
|
|
87
89
|
expect(toggle).toHaveClass('aria-pressed:text-content-on-accent-soft');
|
|
88
|
-
expect(toggle).toHaveClass('aria-pressed:border-accent-
|
|
90
|
+
expect(toggle).toHaveClass('aria-pressed:border-background-accent-soft');
|
|
89
91
|
});
|
|
90
92
|
|
|
91
93
|
test('applies sm size classes', () => {
|
|
@@ -341,7 +341,7 @@ export const AllStates: Story = {
|
|
|
341
341
|
<h3 class="heading-s mb-4">Variants</h3>
|
|
342
342
|
<div class="flex flex-col gap-4">
|
|
343
343
|
<div class="flex items-center gap-4">
|
|
344
|
-
<span class="body-14-regular text-muted
|
|
344
|
+
<span class="body-14-regular text-content-on-surface-muted w-24">Default:</span>
|
|
345
345
|
<UiToggleGroup v-model="multipleDefault" type="multiple">
|
|
346
346
|
<UiToggleGroupItem v-for="item in formattingItems" :key="item.value" :value="item.value" :aria-label="item.label">
|
|
347
347
|
<UiIcon :name="item.icon" :size="16" />
|
|
@@ -349,7 +349,7 @@ export const AllStates: Story = {
|
|
|
349
349
|
</UiToggleGroup>
|
|
350
350
|
</div>
|
|
351
351
|
<div class="flex items-center gap-4">
|
|
352
|
-
<span class="body-14-regular text-muted
|
|
352
|
+
<span class="body-14-regular text-content-on-surface-muted w-24">Outline:</span>
|
|
353
353
|
<UiToggleGroup v-model="multipleOutline" type="multiple" variant="outline">
|
|
354
354
|
<UiToggleGroupItem v-for="item in formattingItems" :key="item.value" :value="item.value" :aria-label="item.label">
|
|
355
355
|
<UiIcon :name="item.icon" :size="16" />
|
|
@@ -363,7 +363,7 @@ export const AllStates: Story = {
|
|
|
363
363
|
<h3 class="heading-s mb-4">Selection Types</h3>
|
|
364
364
|
<div class="flex flex-col gap-4">
|
|
365
365
|
<div class="flex items-center gap-4">
|
|
366
|
-
<span class="body-14-regular text-muted
|
|
366
|
+
<span class="body-14-regular text-content-on-surface-muted w-24">Single:</span>
|
|
367
367
|
<UiToggleGroup v-model="singleValue" type="single" variant="outline">
|
|
368
368
|
<UiToggleGroupItem v-for="item in alignmentItems" :key="item.value" :value="item.value" :aria-label="item.label">
|
|
369
369
|
<UiIcon :name="item.icon" :size="16" />
|
|
@@ -371,7 +371,7 @@ export const AllStates: Story = {
|
|
|
371
371
|
</UiToggleGroup>
|
|
372
372
|
</div>
|
|
373
373
|
<div class="flex items-center gap-4">
|
|
374
|
-
<span class="body-14-regular text-muted
|
|
374
|
+
<span class="body-14-regular text-content-on-surface-muted w-24">Multiple:</span>
|
|
375
375
|
<UiToggleGroup v-model="defaultSizeValue" type="multiple" variant="outline">
|
|
376
376
|
<UiToggleGroupItem v-for="item in formattingItems" :key="item.value" :value="item.value" :aria-label="item.label">
|
|
377
377
|
<UiIcon :name="item.icon" :size="16" />
|
|
@@ -385,7 +385,7 @@ export const AllStates: Story = {
|
|
|
385
385
|
<h3 class="heading-s mb-4">Sizes</h3>
|
|
386
386
|
<div class="flex flex-col gap-4">
|
|
387
387
|
<div class="flex items-center gap-4">
|
|
388
|
-
<span class="body-14-regular text-muted
|
|
388
|
+
<span class="body-14-regular text-content-on-surface-muted w-24">Small:</span>
|
|
389
389
|
<UiToggleGroup v-model="smallValue" type="single" variant="outline" size="sm">
|
|
390
390
|
<UiToggleGroupItem v-for="item in alignmentItems" :key="item.value" :value="item.value" :aria-label="item.label">
|
|
391
391
|
<UiIcon :name="item.icon" :size="16" />
|
|
@@ -393,7 +393,7 @@ export const AllStates: Story = {
|
|
|
393
393
|
</UiToggleGroup>
|
|
394
394
|
</div>
|
|
395
395
|
<div class="flex items-center gap-4">
|
|
396
|
-
<span class="body-14-regular text-muted
|
|
396
|
+
<span class="body-14-regular text-content-on-surface-muted w-24">Default:</span>
|
|
397
397
|
<UiToggleGroup v-model="defaultSizeValue" type="multiple" variant="outline">
|
|
398
398
|
<UiToggleGroupItem v-for="item in formattingItems" :key="item.value" :value="item.value" :aria-label="item.label">
|
|
399
399
|
<UiIcon :name="item.icon" :size="16" />
|
|
@@ -401,7 +401,7 @@ export const AllStates: Story = {
|
|
|
401
401
|
</UiToggleGroup>
|
|
402
402
|
</div>
|
|
403
403
|
<div class="flex items-center gap-4">
|
|
404
|
-
<span class="body-14-regular text-muted
|
|
404
|
+
<span class="body-14-regular text-content-on-surface-muted w-24">Large:</span>
|
|
405
405
|
<UiToggleGroup v-model="largeValue" type="multiple" variant="outline" size="lg">
|
|
406
406
|
<UiToggleGroupItem v-for="item in formattingItems" :key="item.value" :value="item.value" :aria-label="item.label">
|
|
407
407
|
<UiIcon :name="item.icon" :size="16" />
|
|
@@ -415,7 +415,7 @@ export const AllStates: Story = {
|
|
|
415
415
|
<h3 class="heading-s mb-4">Disabled States</h3>
|
|
416
416
|
<div class="flex flex-col gap-4">
|
|
417
417
|
<div class="flex items-center gap-4">
|
|
418
|
-
<span class="body-14-regular text-muted
|
|
418
|
+
<span class="body-14-regular text-content-on-surface-muted w-24">All disabled:</span>
|
|
419
419
|
<UiToggleGroup v-model="disabledValue" type="multiple" variant="outline" disabled>
|
|
420
420
|
<UiToggleGroupItem v-for="item in formattingItems" :key="item.value" :value="item.value" :aria-label="item.label">
|
|
421
421
|
<UiIcon :name="item.icon" :size="16" />
|
|
@@ -423,7 +423,7 @@ export const AllStates: Story = {
|
|
|
423
423
|
</UiToggleGroup>
|
|
424
424
|
</div>
|
|
425
425
|
<div class="flex items-center gap-4">
|
|
426
|
-
<span class="body-14-regular text-muted
|
|
426
|
+
<span class="body-14-regular text-content-on-surface-muted w-24">Partial:</span>
|
|
427
427
|
<UiToggleGroup v-model="partialDisabled" type="multiple" variant="outline">
|
|
428
428
|
<UiToggleGroupItem v-for="(item, index) in formattingItems" :key="item.value" :value="item.value" :aria-label="item.label" :disabled="index === 1">
|
|
429
429
|
<UiIcon :name="item.icon" :size="16" />
|
|
@@ -282,21 +282,21 @@ import { UiButton } from '@aleph-alpha/ui-library'
|
|
|
282
282
|
const alignmentOptionsTemplate = `
|
|
283
283
|
<div class="flex flex-col gap-8 items-center p-8">
|
|
284
284
|
<div class="flex flex-col items-center gap-2">
|
|
285
|
-
<span class="label-12-regular text-muted
|
|
285
|
+
<span class="label-12-regular text-content-on-surface-muted">Align Start</span>
|
|
286
286
|
<UiTooltip content="Aligned to the start" side="bottom" align="start">
|
|
287
287
|
<UiButton>Hover me</UiButton>
|
|
288
288
|
</UiTooltip>
|
|
289
289
|
</div>
|
|
290
290
|
|
|
291
291
|
<div class="flex flex-col items-center gap-2">
|
|
292
|
-
<span class="label-12-regular text-muted
|
|
292
|
+
<span class="label-12-regular text-content-on-surface-muted">Align Center</span>
|
|
293
293
|
<UiTooltip content="Aligned to the center" side="bottom" align="center">
|
|
294
294
|
<UiButton>Hover me</UiButton>
|
|
295
295
|
</UiTooltip>
|
|
296
296
|
</div>
|
|
297
297
|
|
|
298
298
|
<div class="flex flex-col items-center gap-2">
|
|
299
|
-
<span class="label-12-regular text-muted
|
|
299
|
+
<span class="label-12-regular text-content-on-surface-muted">Align End</span>
|
|
300
300
|
<UiTooltip content="Aligned to the end" side="bottom" align="end">
|
|
301
301
|
<UiButton>Hover me</UiButton>
|
|
302
302
|
</UiTooltip>
|
|
@@ -20,7 +20,7 @@ const delegatedProps = reactiveOmit(props, 'class');
|
|
|
20
20
|
v-bind="delegatedProps"
|
|
21
21
|
:class="
|
|
22
22
|
cn(
|
|
23
|
-
'
|
|
23
|
+
'ui-focus-ring flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left label-14-medium transition-all outline-none hover:underline disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180',
|
|
24
24
|
props.class,
|
|
25
25
|
)
|
|
26
26
|
"
|
|
@@ -30,7 +30,7 @@ const delegatedProps = reactiveOmit(props, 'class');
|
|
|
30
30
|
<UiIcon
|
|
31
31
|
name="chevron-down"
|
|
32
32
|
:size="16"
|
|
33
|
-
class="text-muted
|
|
33
|
+
class="text-content-on-surface-muted pointer-events-none shrink-0 translate-y-0.5 transition-transform duration-200"
|
|
34
34
|
/>
|
|
35
35
|
</slot>
|
|
36
36
|
</AccordionTrigger>
|
|
@@ -12,7 +12,7 @@ const props = defineProps<{
|
|
|
12
12
|
data-slot="alert-description"
|
|
13
13
|
:class="
|
|
14
14
|
cn(
|
|
15
|
-
'text-muted
|
|
15
|
+
'text-content-on-surface-muted col-start-2 grid justify-items-start gap-1 body-14-regular [&_p]:leading-relaxed',
|
|
16
16
|
props.class,
|
|
17
17
|
)
|
|
18
18
|
"
|
|
@@ -4,7 +4,7 @@ import { cva } from 'class-variance-authority';
|
|
|
4
4
|
export { default as Badge } from './Badge.vue';
|
|
5
5
|
|
|
6
6
|
export const badgeVariants = cva(
|
|
7
|
-
'inline-flex w-fit shrink-0 select-none items-center justify-center gap-1 overflow-hidden whitespace-nowrap rounded-full border font-[var(--font-font-weight-regular,400)] [font-family:var(--font-font-family-body,Saans)] [font-style:normal] transition-[color,box-shadow,opacity] [&>svg]:size-3 [&>svg]:pointer-events-none
|
|
7
|
+
'inline-flex w-fit shrink-0 select-none items-center justify-center gap-1 overflow-hidden whitespace-nowrap rounded-full border font-[var(--font-font-weight-regular,400)] [font-family:var(--font-font-family-body,Saans)] [font-style:normal] transition-[color,box-shadow,opacity] [&>svg]:size-3 [&>svg]:pointer-events-none ui-focus-ring aria-invalid:border-destructive aria-invalid:ring-destructive/20 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:aria-invalid:ring-destructive/40',
|
|
8
8
|
{
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
@@ -4,14 +4,14 @@ import { cva } from 'class-variance-authority';
|
|
|
4
4
|
export { default as Button } from './Button.vue';
|
|
5
5
|
|
|
6
6
|
export const buttonVariants = cva(
|
|
7
|
-
'inline-flex items-center justify-center whitespace-nowrap border border-transparent transition-all relative disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0
|
|
7
|
+
'inline-flex items-center justify-center whitespace-nowrap border border-transparent transition-all relative disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 ui-focus-ring aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',
|
|
8
8
|
{
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
11
11
|
default:
|
|
12
12
|
'bg-background-button-primary-button text-content-on-button-primary-button hover-layer hover-layer-subtle',
|
|
13
13
|
destructive:
|
|
14
|
-
'bg-background-button-danger-button text-content-on-button-danger-button hover-layer hover-layer-default
|
|
14
|
+
'bg-background-button-danger-button text-content-on-button-danger-button hover-layer hover-layer-default',
|
|
15
15
|
outline:
|
|
16
16
|
'border border-input bg-transparent text-foreground hover:bg-background-surface-muted-subtle',
|
|
17
17
|
secondary:
|
|
@@ -29,11 +29,11 @@ const forwardedProps = useForwardProps(delegatedProps);
|
|
|
29
29
|
// Selected: accent-default background with on-accent-default foreground
|
|
30
30
|
'data-[selected]:bg-accent-default data-[selected]:text-accent-default-foreground data-[selected]:opacity-100 data-[selected]:hover:bg-accent-default data-[selected]:hover:text-accent-default-foreground data-[selected]:focus:bg-accent-default data-[selected]:focus:text-accent-default-foreground',
|
|
31
31
|
// Disabled
|
|
32
|
-
'data-[disabled]:text-muted
|
|
32
|
+
'data-[disabled]:text-content-on-surface-muted data-[disabled]:opacity-50',
|
|
33
33
|
// Unavailable
|
|
34
34
|
'data-[unavailable]:text-destructive-foreground data-[unavailable]:line-through',
|
|
35
35
|
// Outside months
|
|
36
|
-
'data-[outside-view]:text-muted
|
|
36
|
+
'data-[outside-view]:text-content-on-surface-muted',
|
|
37
37
|
props.class,
|
|
38
38
|
)
|
|
39
39
|
"
|
|
@@ -19,7 +19,7 @@ const forwardedProps = useForwardProps(delegatedProps);
|
|
|
19
19
|
data-slot="calendar-head-cell"
|
|
20
20
|
:class="
|
|
21
21
|
cn(
|
|
22
|
-
'text-muted
|
|
22
|
+
'text-content-on-surface-muted rounded-md flex-1 font-normal text-[0.8rem]',
|
|
23
23
|
props.class,
|
|
24
24
|
)
|
|
25
25
|
"
|
|
@@ -24,7 +24,7 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
|
24
24
|
v-bind="forwarded"
|
|
25
25
|
:class="
|
|
26
26
|
cn(
|
|
27
|
-
'peer border-input data-[state=checked]:bg-accent-default data-[state=checked]:text-accent-default-foreground data-[state=checked]:border-accent-default
|
|
27
|
+
'peer border-input data-[state=checked]:bg-accent-default data-[state=checked]:text-accent-default-foreground data-[state=checked]:border-accent-default ui-focus-ring aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-sm border shadow-xs transition-shadow disabled:cursor-not-allowed disabled:opacity-50',
|
|
28
28
|
props.class,
|
|
29
29
|
)
|
|
30
30
|
"
|
|
@@ -15,7 +15,7 @@ const delegatedProps = reactiveOmit(props, 'class');
|
|
|
15
15
|
<DialogDescription
|
|
16
16
|
data-slot="drawer-description"
|
|
17
17
|
v-bind="delegatedProps"
|
|
18
|
-
:class="cn('text-muted
|
|
18
|
+
:class="cn('text-content-on-surface-muted body-14-regular', props.class)"
|
|
19
19
|
>
|
|
20
20
|
<slot />
|
|
21
21
|
</DialogDescription>
|
|
@@ -31,7 +31,7 @@ const forwardedProps = useForwardProps(delegatedProps);
|
|
|
31
31
|
v-bind="forwardedProps"
|
|
32
32
|
:class="
|
|
33
33
|
cn(
|
|
34
|
-
'hover:bg-background-surface-muted-subtle data-[highlighted]:bg-background-surface-muted-subtle focus:text-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*=\'text-\'])]:text-muted
|
|
34
|
+
'hover:bg-background-surface-muted-subtle data-[highlighted]:bg-background-surface-muted-subtle focus:text-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*=\'text-\'])]:text-content-on-surface-muted relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 label-14-regular outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=\'size-\'])]:size-4',
|
|
35
35
|
props.class,
|
|
36
36
|
)
|
|
37
37
|
"
|
|
@@ -12,7 +12,7 @@ const props = defineProps<{
|
|
|
12
12
|
data-slot="field-description"
|
|
13
13
|
:class="
|
|
14
14
|
cn(
|
|
15
|
-
'text-muted
|
|
15
|
+
'text-content-on-surface-muted body-14-regular group-has-[[data-orientation=horizontal]]/field:text-balance',
|
|
16
16
|
'last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5',
|
|
17
17
|
'[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4',
|
|
18
18
|
props.class,
|
|
@@ -16,7 +16,7 @@ const props = defineProps<{
|
|
|
16
16
|
:for="props.for"
|
|
17
17
|
:class="
|
|
18
18
|
cn(
|
|
19
|
-
'group/field-label peer/field-label flex w-fit items-center gap-2 leading-snug group-data-[disabled=true]/field:opacity-50',
|
|
19
|
+
'group/field-label peer/field-label flex w-fit items-center gap-2 leading-snug text-content-on-surface-muted body-14-medium group-data-[disabled=true]/field:opacity-50',
|
|
20
20
|
'has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4',
|
|
21
21
|
'has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10',
|
|
22
22
|
props.class,
|
|
@@ -22,7 +22,7 @@ const props = defineProps<{
|
|
|
22
22
|
<Separator class="absolute inset-0 top-1/2" />
|
|
23
23
|
<span
|
|
24
24
|
v-if="$slots.default"
|
|
25
|
-
class="bg-background text-muted
|
|
25
|
+
class="bg-background text-content-on-surface-muted relative mx-auto block w-fit px-2"
|
|
26
26
|
data-slot="field-separator-content"
|
|
27
27
|
>
|
|
28
28
|
<slot />
|
|
@@ -25,8 +25,8 @@ const modelValue = useVModel(props, 'modelValue', emits, {
|
|
|
25
25
|
data-slot="input"
|
|
26
26
|
:class="
|
|
27
27
|
cn(
|
|
28
|
-
'file:text-foreground placeholder:text-muted
|
|
29
|
-
'
|
|
28
|
+
'file:text-foreground placeholder:text-content-on-surface-muted selection:bg-primary selection:text-primary-foreground border-input h-9 w-full min-w-0 rounded-md border bg-background-input-default px-3 py-1 label-16-regular transition-[color] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:label-14-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:label-14-regular',
|
|
29
|
+
'ui-focus-ring',
|
|
30
30
|
'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',
|
|
31
31
|
props.class,
|
|
32
32
|
)
|
|
@@ -13,7 +13,7 @@ export { default as ItemSeparator } from './ItemSeparator.vue';
|
|
|
13
13
|
export { default as ItemTitle } from './ItemTitle.vue';
|
|
14
14
|
|
|
15
15
|
export const itemVariants = cva(
|
|
16
|
-
'group/item flex items-center label-14-regular rounded-md transition-[background-color,color,box-shadow] [a]:transition-colors duration-100 flex-wrap
|
|
16
|
+
'group/item flex items-center label-14-regular rounded-md transition-[background-color,color,box-shadow] [a]:transition-colors duration-100 flex-wrap ui-focus-ring disabled:pointer-events-none disabled:opacity-50',
|
|
17
17
|
{
|
|
18
18
|
variants: {
|
|
19
19
|
variant: {
|
|
@@ -10,7 +10,7 @@ const props = defineProps<{ class?: HTMLAttributes['class'] }>();
|
|
|
10
10
|
data-slot="kbd"
|
|
11
11
|
:class="
|
|
12
12
|
cn(
|
|
13
|
-
'pointer-events-none inline-flex h-5 select-none items-center gap-1 rounded border bg-background-surface-muted px-1.5 font-mono text-[10px] font-medium text-muted
|
|
13
|
+
'pointer-events-none inline-flex h-5 select-none items-center gap-1 rounded border bg-background-surface-muted px-1.5 font-mono text-[10px] font-medium text-content-on-surface-muted',
|
|
14
14
|
props.class,
|
|
15
15
|
)
|
|
16
16
|
"
|
|
@@ -20,7 +20,7 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
|
20
20
|
data-slot="listbox-filter"
|
|
21
21
|
:class="
|
|
22
22
|
cn(
|
|
23
|
-
'placeholder:text-muted
|
|
23
|
+
'placeholder:text-content-on-surface-muted flex h-9 w-full rounded-md bg-transparent px-3 py-2 label-14-regular outline-none disabled:cursor-not-allowed disabled:opacity-50',
|
|
24
24
|
props.class,
|
|
25
25
|
)
|
|
26
26
|
"
|
|
@@ -18,7 +18,10 @@ const forwardedProps = useForwardProps(delegatedProps);
|
|
|
18
18
|
<ListboxGroupLabel
|
|
19
19
|
data-slot="listbox-group-label"
|
|
20
20
|
:class="
|
|
21
|
-
cn(
|
|
21
|
+
cn(
|
|
22
|
+
'text-content-on-surface-muted px-2 py-1.5 label-12-medium',
|
|
23
|
+
props.class,
|
|
24
|
+
)
|
|
22
25
|
"
|
|
23
26
|
v-bind="forwardedProps"
|
|
24
27
|
>
|
|
@@ -20,7 +20,7 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
|
20
20
|
data-slot="listbox-item"
|
|
21
21
|
:class="
|
|
22
22
|
cn(
|
|
23
|
-
'hover-layer hover-layer-default data-[highlighted]:text-foreground [&_svg:not([class*=\'text-\'])]:text-muted
|
|
23
|
+
'hover-layer hover-layer-default data-[highlighted]:text-foreground [&_svg:not([class*=\'text-\'])]:text-content-on-surface-muted relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 label-14-regular outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=\'size-\'])]:size-4',
|
|
24
24
|
props.class,
|
|
25
25
|
)
|
|
26
26
|
"
|