@aleph-alpha/ui-library 6.0.0 → 6.1.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 +28 -4
- package/config.js +99 -23
- package/dist/system/components/UiTagsInput/UiTagsInput.vue.d.ts +2 -0
- package/dist/system/components/UiTagsInput/UiTagsInputItemDelete.vue.d.ts +2 -1
- package/dist/system/components/UiTagsInput/types.d.ts +21 -2
- package/dist/system/components/core/tags-input/TagsInputItemDelete.vue.d.ts +5 -0
- package/dist/system/icons/story-sidebar-icons.json +7 -0
- package/dist/system/lib.js +1752 -1708
- package/dist/system/story-sidebar-icons.json +7 -0
- package/docs/public-docs/migration-guide.md +402 -0
- package/docs/public-docs/quick-start.md +19 -10
- package/package.json +4 -1
- package/src/components/UiAlert/UiAlert.stories.ts +732 -0
- package/src/components/UiAlert/__tests__/UiAlert.test.ts +57 -11
- package/src/components/UiChip/UiChip.stories.ts +756 -2
- package/src/components/UiChip/UiChip.vue +7 -6
- package/src/components/UiChip/__tests__/UiChip.test.ts +38 -61
- package/src/components/UiDrawer/UiDrawer.stories.ts +665 -0
- package/src/components/UiDrawer/__tests__/UiDrawer.test.ts +6 -190
- package/src/components/UiLabel/UiLabel.stories.ts +691 -16
- package/src/components/UiLabel/__tests__/UiLabel.test.ts +18 -26
- package/src/components/UiSheet/UiSheet.stories.ts +751 -0
- package/src/components/UiSheet/__tests__/UiSheet.test.ts +6 -190
- package/src/components/UiSlider/UiSlider.stories.ts +716 -0
- package/src/components/UiSlider/__tests__/UiSlider.test.ts +8 -45
- package/src/components/UiSwitch/UiSwitch.stories.ts +11 -5
- package/src/components/UiTagsInput/UiTagsInput.stories.ts +850 -4
- package/src/components/UiTagsInput/UiTagsInput.vue +34 -0
- package/src/components/UiTagsInput/UiTagsInputItemDelete.vue +4 -1
- package/src/components/UiTagsInput/__tests__/UiTagsInput.test.ts +113 -29
- package/src/components/UiTagsInput/types.ts +24 -2
- package/src/components/core/sheet/SheetContent.vue +6 -1
- package/src/components/core/switch/index.ts +8 -7
- package/src/components/core/tags-input/TagsInput.vue +4 -1
- package/src/components/core/tags-input/TagsInputItem.vue +13 -1
- package/src/components/core/tags-input/TagsInputItemDelete.vue +40 -7
- package/src/theme/Typography.stories.ts +125 -133
- package/tokens.json +8132 -2475
- package/dist/system/icons/mobile-device-frame.png +0 -0
- package/dist/system/mobile-device-frame.png +0 -0
package/config.d.ts
CHANGED
|
@@ -71,11 +71,14 @@ export interface UiLibraryThemeConfig {
|
|
|
71
71
|
includeAllTokens?: boolean;
|
|
72
72
|
/**
|
|
73
73
|
* Select which token theme set is used for resolving semantic token refs.
|
|
74
|
+
* A non-default set falls back to `2-theme/AA Base` for anything it does not
|
|
75
|
+
* redefine.
|
|
74
76
|
* - `default` reads `2-theme/AA Base`
|
|
75
77
|
* - `accessible` reads `2-theme/WCAG 2.2`
|
|
78
|
+
* - `brand` reads `2-theme/AA Brand`
|
|
76
79
|
* @default 'default'
|
|
77
80
|
*/
|
|
78
|
-
themeMode?: 'default' | 'accessible';
|
|
81
|
+
themeMode?: 'default' | 'accessible' | 'brand';
|
|
79
82
|
/**
|
|
80
83
|
* Convenience alias for `themeMode: 'accessible'`.
|
|
81
84
|
* @default false
|
|
@@ -92,6 +95,22 @@ export interface UiLibraryThemeConfig {
|
|
|
92
95
|
* @default 'html.accessible-theme'
|
|
93
96
|
*/
|
|
94
97
|
accessibleSelector?: string;
|
|
98
|
+
/**
|
|
99
|
+
* Convenience alias for `themeMode: 'brand'`.
|
|
100
|
+
* @default false
|
|
101
|
+
*/
|
|
102
|
+
brand?: boolean;
|
|
103
|
+
/**
|
|
104
|
+
* Emit an additional AA Brand theme CSS variable block that can be toggled
|
|
105
|
+
* at runtime by adding `brandSelector` to the root element.
|
|
106
|
+
* @default false
|
|
107
|
+
*/
|
|
108
|
+
brandTheme?: boolean;
|
|
109
|
+
/**
|
|
110
|
+
* Selector used for the runtime AA Brand theme block.
|
|
111
|
+
* @default 'html.brand-theme'
|
|
112
|
+
*/
|
|
113
|
+
brandSelector?: string;
|
|
95
114
|
}
|
|
96
115
|
|
|
97
116
|
/**
|
|
@@ -136,7 +155,7 @@ export declare const defineThemeConfig: <T extends UiLibraryThemeConfig>(
|
|
|
136
155
|
* Returns the default theme derived from the library's `tokens.json`.
|
|
137
156
|
*/
|
|
138
157
|
export declare const getUiLibraryThemeFromTokens: (
|
|
139
|
-
options?: Pick<UiLibraryThemeConfig, 'themeMode' | 'accessible'> & {
|
|
158
|
+
options?: Pick<UiLibraryThemeConfig, 'themeMode' | 'accessible' | 'brand'> & {
|
|
140
159
|
referenceThemeSet?: string;
|
|
141
160
|
},
|
|
142
161
|
) => UiLibraryTheme;
|
|
@@ -148,7 +167,7 @@ export declare const getUiLibraryThemeFromTokens: (
|
|
|
148
167
|
* - content.on-surface.primary -> --content-on-surface-primary
|
|
149
168
|
*/
|
|
150
169
|
export declare const getUiLibraryTokenVars: (
|
|
151
|
-
options?: Pick<UiLibraryThemeConfig, 'themeMode' | 'accessible'> & {
|
|
170
|
+
options?: Pick<UiLibraryThemeConfig, 'themeMode' | 'accessible' | 'brand'> & {
|
|
152
171
|
referenceThemeSet?: string;
|
|
153
172
|
},
|
|
154
173
|
) => UiLibraryTheme;
|
|
@@ -246,11 +265,15 @@ export declare const presetUiLibraryThemeFromTokens: (
|
|
|
246
265
|
* - `ui-focus-ring-inset` — same ring, drawn inside the element's own box.
|
|
247
266
|
* Apply to options that live in a clipping scroll container (listbox options,
|
|
248
267
|
* menu items), where an outset ring would be cut off by the overflow.
|
|
268
|
+
* - `ui-focus-ring-outline` — the same colors as `ui-focus-ring`, with the
|
|
269
|
+
* focus line painted as an outline instead of a border. Apply to controls
|
|
270
|
+
* that cannot spare a border because their box is the design (switch tracks
|
|
271
|
+
* and other small pills); an outline takes no space.
|
|
249
272
|
* - `ui-focus-ring-within` — same visual, but triggered on `:focus-within`.
|
|
250
273
|
* Apply to container controls that wrap the real focusable element (text
|
|
251
274
|
* field wrappers, tag inputs, comboboxes).
|
|
252
275
|
*
|
|
253
|
-
* All
|
|
276
|
+
* All four are namespaced with the `ui-` prefix on purpose: an unprefixed
|
|
254
277
|
* `focus-ring` would be parsed by UnoCSS as the `focus:` variant of the `ring`
|
|
255
278
|
* utility and emit an unintended `.focus-ring:focus` rule.
|
|
256
279
|
*
|
|
@@ -258,6 +281,7 @@ export declare const presetUiLibraryThemeFromTokens: (
|
|
|
258
281
|
* ```html
|
|
259
282
|
* <button class="ui-focus-ring border border-transparent">Save</button>
|
|
260
283
|
* <div role="option" class="ui-focus-ring-inset rounded-sm">Apple</div>
|
|
284
|
+
* <button role="switch" class="ui-focus-ring-outline rounded-full"></button>
|
|
261
285
|
* <div class="ui-focus-ring-within border border-input"><input /></div>
|
|
262
286
|
* ```
|
|
263
287
|
*/
|
package/config.js
CHANGED
|
@@ -185,6 +185,7 @@ const normalizeShadcnVarValue = (input) => {
|
|
|
185
185
|
const UI_LIBRARY_REFERENCE_THEME_SETS = Object.freeze({
|
|
186
186
|
default: '2-theme/AA Base',
|
|
187
187
|
accessible: '2-theme/WCAG 2.2',
|
|
188
|
+
brand: '2-theme/AA Brand',
|
|
188
189
|
});
|
|
189
190
|
|
|
190
191
|
const getUiLibraryThemeMode = (options = {}) => {
|
|
@@ -192,6 +193,9 @@ const getUiLibraryThemeMode = (options = {}) => {
|
|
|
192
193
|
if (options.accessible || options.themeMode === 'accessible') {
|
|
193
194
|
return UI_LIBRARY_REFERENCE_THEME_SETS.accessible;
|
|
194
195
|
}
|
|
196
|
+
if (options.brand || options.themeMode === 'brand') {
|
|
197
|
+
return UI_LIBRARY_REFERENCE_THEME_SETS.brand;
|
|
198
|
+
}
|
|
195
199
|
return UI_LIBRARY_REFERENCE_THEME_SETS.default;
|
|
196
200
|
};
|
|
197
201
|
|
|
@@ -203,12 +207,15 @@ const getTokenSetSearchOrder = (options = {}) => {
|
|
|
203
207
|
: Object.keys(tokens || {}).filter((k) => !k.startsWith('$'));
|
|
204
208
|
const referenceThemeSet = getUiLibraryThemeMode(options);
|
|
205
209
|
const fallbackThemeSet = UI_LIBRARY_REFERENCE_THEME_SETS.default;
|
|
210
|
+
// A non-default theme set only overrides what it redefines: AA Base stays in
|
|
211
|
+
// the order beneath it so groups it leaves out (typography composites, for
|
|
212
|
+
// one) still resolve. `tokenSetOrder` puts AA Base first, and lookups run the
|
|
213
|
+
// order in reverse, so the selected set still wins wherever both define a token.
|
|
206
214
|
return raw.filter(
|
|
207
215
|
(name) =>
|
|
208
216
|
!name.startsWith('2-theme/') ||
|
|
209
217
|
name === referenceThemeSet ||
|
|
210
|
-
(referenceThemeSet
|
|
211
|
-
name === fallbackThemeSet),
|
|
218
|
+
(referenceThemeSet !== fallbackThemeSet && name === fallbackThemeSet),
|
|
212
219
|
);
|
|
213
220
|
};
|
|
214
221
|
|
|
@@ -826,16 +833,16 @@ export const presetUiLibraryTheme = (theme, options = {}) => {
|
|
|
826
833
|
}))();
|
|
827
834
|
};
|
|
828
835
|
|
|
829
|
-
const
|
|
836
|
+
const toRuntimeThemeDarkSelector = (selector, themeClass) =>
|
|
830
837
|
selector
|
|
831
838
|
.split(',')
|
|
832
839
|
.map((part) => {
|
|
833
840
|
const trimmed = part.trim();
|
|
834
|
-
if (trimmed ===
|
|
835
|
-
return
|
|
841
|
+
if (trimmed === `html.${themeClass}`) {
|
|
842
|
+
return `html.dark.${themeClass}`;
|
|
836
843
|
}
|
|
837
|
-
if (trimmed ===
|
|
838
|
-
return
|
|
844
|
+
if (trimmed === `.${themeClass}`) {
|
|
845
|
+
return `html.dark .${themeClass}`;
|
|
839
846
|
}
|
|
840
847
|
return `${trimmed}.dark`;
|
|
841
848
|
})
|
|
@@ -850,6 +857,9 @@ export const presetUiLibraryThemeFromTokens = (options = {}) => {
|
|
|
850
857
|
accessible = false,
|
|
851
858
|
accessibleTheme = false,
|
|
852
859
|
accessibleSelector = 'html.accessible-theme',
|
|
860
|
+
brand = false,
|
|
861
|
+
brandTheme = false,
|
|
862
|
+
brandSelector = 'html.brand-theme',
|
|
853
863
|
...presetOptions
|
|
854
864
|
} = options;
|
|
855
865
|
|
|
@@ -879,7 +889,7 @@ export const presetUiLibraryThemeFromTokens = (options = {}) => {
|
|
|
879
889
|
};
|
|
880
890
|
|
|
881
891
|
// Radius utilities in Wind v4 resolve through --radius-* variables.
|
|
882
|
-
const modeOptions = { themeMode, accessible };
|
|
892
|
+
const modeOptions = { themeMode, accessible, brand };
|
|
883
893
|
let finalTheme = buildTheme(modeOptions);
|
|
884
894
|
|
|
885
895
|
// Merge with extend overrides
|
|
@@ -891,7 +901,17 @@ export const presetUiLibraryThemeFromTokens = (options = {}) => {
|
|
|
891
901
|
? presetUiLibraryTheme(buildTheme({ themeMode: 'accessible' }), {
|
|
892
902
|
...presetOptions,
|
|
893
903
|
rootSelector: accessibleSelector,
|
|
894
|
-
darkSelector:
|
|
904
|
+
darkSelector: toRuntimeThemeDarkSelector(
|
|
905
|
+
accessibleSelector,
|
|
906
|
+
'accessible-theme',
|
|
907
|
+
),
|
|
908
|
+
})
|
|
909
|
+
: null;
|
|
910
|
+
const brandPreset = brandTheme
|
|
911
|
+
? presetUiLibraryTheme(buildTheme({ themeMode: 'brand' }), {
|
|
912
|
+
...presetOptions,
|
|
913
|
+
rootSelector: brandSelector,
|
|
914
|
+
darkSelector: toRuntimeThemeDarkSelector(brandSelector, 'brand-theme'),
|
|
895
915
|
})
|
|
896
916
|
: null;
|
|
897
917
|
|
|
@@ -941,6 +961,7 @@ export const presetUiLibraryThemeFromTokens = (options = {}) => {
|
|
|
941
961
|
preflights: [
|
|
942
962
|
...(basePreset.preflights || []),
|
|
943
963
|
...(accessiblePreset?.preflights || []),
|
|
964
|
+
...(brandPreset?.preflights || []),
|
|
944
965
|
{ getCSS: () => getSaansFontFaceCss() },
|
|
945
966
|
{ getCSS: () => fontVariablesCss },
|
|
946
967
|
],
|
|
@@ -1171,6 +1192,28 @@ const vHoverOverlayCSS = `
|
|
|
1171
1192
|
box-shadow: inset 0 0 0 2px oklch(var(--ring) / 0.5);
|
|
1172
1193
|
border-radius: inherit;
|
|
1173
1194
|
}
|
|
1195
|
+
/* Companion for controls whose box size is part of the design and cannot carry
|
|
1196
|
+
a border (switch tracks and other small pills): a border shrinks the padding
|
|
1197
|
+
box the inner parts are sized against. Same colors and thickness as
|
|
1198
|
+
"ui-focus-ring" — the 1px line in border/surface/focus-ring is painted as an
|
|
1199
|
+
outline, which takes no space, and the ring around it grows by that 1px so
|
|
1200
|
+
2px of it stay visible. */
|
|
1201
|
+
.ui-focus-ring-outline {
|
|
1202
|
+
outline: 1px solid transparent;
|
|
1203
|
+
outline-offset: 0;
|
|
1204
|
+
transition:
|
|
1205
|
+
box-shadow 0.15s ease,
|
|
1206
|
+
outline-color 0.15s ease;
|
|
1207
|
+
}
|
|
1208
|
+
.ui-focus-ring-outline:focus-visible {
|
|
1209
|
+
outline-color: oklch(var(--border-surface-focus-ring));
|
|
1210
|
+
box-shadow: 0 0 0 3px oklch(var(--ring) / 0.5);
|
|
1211
|
+
}
|
|
1212
|
+
.ui-focus-ring-outline[aria-invalid='true']:focus-visible {
|
|
1213
|
+
outline-color: oklch(var(--border-input-error));
|
|
1214
|
+
box-shadow: 0 0 0 4px
|
|
1215
|
+
var(--custom-destructive-20-dark-destructive-40, rgba(220, 38, 38, 0.2));
|
|
1216
|
+
}
|
|
1174
1217
|
/* Companion for container/wrapper controls (text field wrappers, tag inputs,
|
|
1175
1218
|
comboboxes) that surface the ring when any descendant is focused. Same visual
|
|
1176
1219
|
as "ui-focus-ring", triggered on :focus-within instead of :focus-visible. */
|
|
@@ -1193,6 +1236,7 @@ const vHoverOverlayCSS = `
|
|
|
1193
1236
|
@media (prefers-reduced-motion: reduce) {
|
|
1194
1237
|
.ui-focus-ring,
|
|
1195
1238
|
.ui-focus-ring-inset,
|
|
1239
|
+
.ui-focus-ring-outline,
|
|
1196
1240
|
.ui-focus-ring-within {
|
|
1197
1241
|
transition: none;
|
|
1198
1242
|
}
|
|
@@ -1358,11 +1402,15 @@ const scrollbarCSS = `
|
|
|
1358
1402
|
* - `ui-focus-ring-inset` — same ring, drawn inside the element's own box.
|
|
1359
1403
|
* Apply to options that live in a clipping scroll container (listbox options,
|
|
1360
1404
|
* menu items), where an outset ring would be cut off by the overflow.
|
|
1405
|
+
* - `ui-focus-ring-outline` — the same colors as `ui-focus-ring`, with the
|
|
1406
|
+
* focus line painted as an outline instead of a border. Apply to controls
|
|
1407
|
+
* that cannot spare a border because their box is the design (switch tracks
|
|
1408
|
+
* and other small pills); an outline takes no space.
|
|
1361
1409
|
* - `ui-focus-ring-within` — same visual, but triggered on `:focus-within`.
|
|
1362
1410
|
* Apply to container controls that wrap the real focusable element (text
|
|
1363
1411
|
* field wrappers, tag inputs, comboboxes).
|
|
1364
1412
|
*
|
|
1365
|
-
* All
|
|
1413
|
+
* All four are namespaced with the `ui-` prefix on purpose: an unprefixed
|
|
1366
1414
|
* `focus-ring` would be parsed by UnoCSS as the `focus:` variant of the `ring`
|
|
1367
1415
|
* utility and emit an unintended `.focus-ring:focus` rule.
|
|
1368
1416
|
*
|
|
@@ -1383,6 +1431,7 @@ const scrollbarCSS = `
|
|
|
1383
1431
|
* ```html
|
|
1384
1432
|
* <button class="ui-focus-ring border border-transparent">Save</button>
|
|
1385
1433
|
* <div role="option" class="ui-focus-ring-inset rounded-sm">Apple</div>
|
|
1434
|
+
* <button role="switch" class="ui-focus-ring-outline rounded-full"></button>
|
|
1386
1435
|
* <div class="ui-focus-ring-within border border-input"><input /></div>
|
|
1387
1436
|
* ```
|
|
1388
1437
|
*
|
|
@@ -1452,6 +1501,9 @@ export const defineUiLibraryConfig = (options = {}) => {
|
|
|
1452
1501
|
accessible,
|
|
1453
1502
|
accessibleTheme,
|
|
1454
1503
|
accessibleSelector,
|
|
1504
|
+
brand,
|
|
1505
|
+
brandTheme,
|
|
1506
|
+
brandSelector,
|
|
1455
1507
|
presets: extraPresets = [],
|
|
1456
1508
|
rules: extraRules = [],
|
|
1457
1509
|
shortcuts: extraShortcuts = [],
|
|
@@ -1472,6 +1524,9 @@ export const defineUiLibraryConfig = (options = {}) => {
|
|
|
1472
1524
|
themeOptions.accessibleTheme = accessibleTheme;
|
|
1473
1525
|
if (accessibleSelector !== undefined)
|
|
1474
1526
|
themeOptions.accessibleSelector = accessibleSelector;
|
|
1527
|
+
if (brand !== undefined) themeOptions.brand = brand;
|
|
1528
|
+
if (brandTheme !== undefined) themeOptions.brandTheme = brandTheme;
|
|
1529
|
+
if (brandSelector !== undefined) themeOptions.brandSelector = brandSelector;
|
|
1475
1530
|
|
|
1476
1531
|
return defineConfig({
|
|
1477
1532
|
...getUiLibraryContentConfig(),
|
|
@@ -1606,6 +1661,22 @@ const getAaBaseFontFamilyName = (fontFamilyRef) => {
|
|
|
1606
1661
|
return 'Saans';
|
|
1607
1662
|
};
|
|
1608
1663
|
|
|
1664
|
+
// The token scale names its size steps instead of numbering them: `Body XS` is
|
|
1665
|
+
// 12px, `Body S` 14px, `Body M` 16px. Every numbered group is emitted under its
|
|
1666
|
+
// step name as well, so `body-14-regular` and `body-s-regular` produce the same
|
|
1667
|
+
// declarations while the numbered names are deprecated.
|
|
1668
|
+
const TYPOGRAPHY_SIZE_STEPS = Object.freeze({
|
|
1669
|
+
12: 'xs',
|
|
1670
|
+
14: 's',
|
|
1671
|
+
16: 'm',
|
|
1672
|
+
});
|
|
1673
|
+
|
|
1674
|
+
const stepGroupKebabFor = (groupKebab) => {
|
|
1675
|
+
const match = groupKebab.match(/^(body|label)-(\d+)$/);
|
|
1676
|
+
const step = match ? TYPOGRAPHY_SIZE_STEPS[match[2]] : undefined;
|
|
1677
|
+
return step ? `${match[1]}-${step}` : null;
|
|
1678
|
+
};
|
|
1679
|
+
|
|
1609
1680
|
const isTypographyTokenGroup = (group) =>
|
|
1610
1681
|
group &&
|
|
1611
1682
|
typeof group === 'object' &&
|
|
@@ -1676,10 +1747,13 @@ const setResolvedTypographyShortcut = (shortcuts, className, resolved) => {
|
|
|
1676
1747
|
/**
|
|
1677
1748
|
* Get typography shortcuts for UnoCSS.
|
|
1678
1749
|
* Scans `global` for groups whose children are typography tokens (e.g. `Label 12`, `Body 14`, `Heading S`).
|
|
1750
|
+
* Body and label groups are emitted twice: under the step name from the token
|
|
1751
|
+
* scale (`label-xs`, `label-s`, `label-m`, `body-s`, `body-m`) and under the
|
|
1752
|
+
* deprecated numbered name (`label-12`, `body-14`), which is removed in 7.0.0.
|
|
1679
1753
|
* Headings use one no-suffix utility per token group (`heading-s` … `heading-2xl`).
|
|
1680
1754
|
* Font family resolves from `2-theme/AA Base`.
|
|
1681
1755
|
* @example
|
|
1682
|
-
* - 'label-
|
|
1756
|
+
* - 'label-s-medium', 'body-m-regular', 'heading-s', 'heading-2xl'
|
|
1683
1757
|
* @returns {Array<[string, string]>} Typography shortcut tuples for UnoCSS rules.
|
|
1684
1758
|
*/
|
|
1685
1759
|
export const getUiLibraryTypographyShortcuts = () => {
|
|
@@ -1701,18 +1775,20 @@ export const getUiLibraryTypographyShortcuts = () => {
|
|
|
1701
1775
|
if (variantKebab.includes('mono')) continue;
|
|
1702
1776
|
|
|
1703
1777
|
const resolved = resolveTypographyToken(tokenData.value);
|
|
1704
|
-
const
|
|
1705
|
-
?
|
|
1706
|
-
:
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
)
|
|
1778
|
+
const stepGroupKebab = isHeadingGroup
|
|
1779
|
+
? null
|
|
1780
|
+
: stepGroupKebabFor(groupKebab);
|
|
1781
|
+
|
|
1782
|
+
for (const group of stepGroupKebab
|
|
1783
|
+
? [groupKebab, stepGroupKebab]
|
|
1784
|
+
: [groupKebab]) {
|
|
1785
|
+
const className = isHeadingGroup ? group : `${group}-${variantKebab}`;
|
|
1786
|
+
|
|
1787
|
+
setResolvedTypographyShortcut(shortcuts, className, resolved);
|
|
1788
|
+
// Token name is `regular`; many components use `*-normal` — keep both class names.
|
|
1789
|
+
if (!isHeadingGroup && variantKebab === 'regular') {
|
|
1790
|
+
setResolvedTypographyShortcut(shortcuts, `${group}-normal`, resolved);
|
|
1791
|
+
}
|
|
1716
1792
|
}
|
|
1717
1793
|
}
|
|
1718
1794
|
}
|
|
@@ -20,6 +20,8 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
20
20
|
"onUpdate:modelValue"?: ((value: string[]) => any) | undefined;
|
|
21
21
|
}>, {
|
|
22
22
|
disabled: boolean;
|
|
23
|
+
addedLabel: string;
|
|
24
|
+
removedLabel: string;
|
|
23
25
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
24
26
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
25
27
|
export default _default;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { UiTagsInputItemDeleteProps } from './types';
|
|
1
2
|
declare function __VLS_template(): {
|
|
2
3
|
attrs: Partial<{}>;
|
|
3
4
|
slots: {
|
|
@@ -7,7 +8,7 @@ declare function __VLS_template(): {
|
|
|
7
8
|
rootEl: any;
|
|
8
9
|
};
|
|
9
10
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
|
-
declare const __VLS_component: import('vue').DefineComponent<
|
|
11
|
+
declare const __VLS_component: import('vue').DefineComponent<UiTagsInputItemDeleteProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<UiTagsInputItemDeleteProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
11
12
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
12
13
|
export default _default;
|
|
13
14
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -8,7 +8,20 @@ import { TagsInputRootProps } from 'reka-ui';
|
|
|
8
8
|
* @related UiInput, UiBadge
|
|
9
9
|
* @augments TagsInputRootProps
|
|
10
10
|
*/
|
|
11
|
-
export type UiTagsInputProps = Omit<TagsInputRootProps, 'class' | 'modelValue'
|
|
11
|
+
export type UiTagsInputProps = Omit<TagsInputRootProps, 'class' | 'modelValue'> & {
|
|
12
|
+
/**
|
|
13
|
+
* Word appended to a tag value when it is added, announced by the
|
|
14
|
+
* component's live region. Override it to translate the announcement.
|
|
15
|
+
* @default 'added'
|
|
16
|
+
*/
|
|
17
|
+
addedLabel?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Word appended to a tag value when it is removed, announced by the
|
|
20
|
+
* component's live region. Override it to translate the announcement.
|
|
21
|
+
* @default 'removed'
|
|
22
|
+
*/
|
|
23
|
+
removedLabel?: string;
|
|
24
|
+
};
|
|
12
25
|
/**
|
|
13
26
|
* Props for the UiTagsInputInput component.
|
|
14
27
|
* The text input field for entering new tags.
|
|
@@ -43,4 +56,10 @@ export type UiTagsInputItemTextProps = Record<string, never>;
|
|
|
43
56
|
* Props for the UiTagsInputItemDelete component.
|
|
44
57
|
* The delete button for removing a tag.
|
|
45
58
|
*/
|
|
46
|
-
export
|
|
59
|
+
export interface UiTagsInputItemDeleteProps {
|
|
60
|
+
/**
|
|
61
|
+
* Accessible name for the delete control. Defaults to `Remove <tag value>`,
|
|
62
|
+
* so the control is not announced with the same name as the tag itself.
|
|
63
|
+
*/
|
|
64
|
+
label?: string;
|
|
65
|
+
}
|
|
@@ -2,6 +2,11 @@ import { TagsInputItemDeleteProps } from 'reka-ui';
|
|
|
2
2
|
import { HTMLAttributes } from 'vue';
|
|
3
3
|
type __VLS_Props = TagsInputItemDeleteProps & {
|
|
4
4
|
class?: HTMLAttributes['class'];
|
|
5
|
+
/**
|
|
6
|
+
* Accessible name for the delete control.
|
|
7
|
+
* Defaults to `Remove <tag value>`.
|
|
8
|
+
*/
|
|
9
|
+
label?: string;
|
|
5
10
|
};
|
|
6
11
|
declare function __VLS_template(): {
|
|
7
12
|
attrs: Partial<{}>;
|
|
@@ -4,7 +4,10 @@
|
|
|
4
4
|
"components-uibuttongroup--accessibility": "accessibility",
|
|
5
5
|
"components-uicheckbox--design-notes": "palette",
|
|
6
6
|
"components-uicheckbox--accessibility": "accessibility",
|
|
7
|
+
"components-uichip--accessibility": "accessibility",
|
|
8
|
+
"components-uialert--accessibility": "accessibility",
|
|
7
9
|
"components-uidialog--accessibility": "accessibility",
|
|
10
|
+
"components-uidrawer--accessibility": "accessibility",
|
|
8
11
|
"components-uialertdialog--accessibility": "accessibility",
|
|
9
12
|
"components-uidropdownmenu--accessibility": "accessibility",
|
|
10
13
|
"components-uitooltip--accessibility": "accessibility",
|
|
@@ -13,13 +16,17 @@
|
|
|
13
16
|
"components-uifield--accessibility": "accessibility",
|
|
14
17
|
"components-uiitem--design-notes": "palette",
|
|
15
18
|
"components-uiitem--accessibility": "accessibility",
|
|
19
|
+
"components-uilabel--accessibility": "accessibility",
|
|
16
20
|
"components-uiinput--design-notes": "palette",
|
|
17
21
|
"components-uiinput--accessibility": "accessibility",
|
|
18
22
|
"components-uitextarea--accessibility": "accessibility",
|
|
19
23
|
"components-uilistbox--accessibility": "accessibility",
|
|
20
24
|
"components-uiradiogroup--accessibility": "accessibility",
|
|
21
25
|
"components-uiselect--accessibility": "accessibility",
|
|
26
|
+
"components-uisheet--accessibility": "accessibility",
|
|
27
|
+
"components-uislider--accessibility": "accessibility",
|
|
22
28
|
"components-uiswitch--accessibility": "accessibility",
|
|
29
|
+
"components-uitagsinput--accessibility": "accessibility",
|
|
23
30
|
"components-uitoggle--accessibility": "accessibility",
|
|
24
31
|
"components-uitogglegroup--accessibility": "accessibility",
|
|
25
32
|
"components-uiautocomplete--accessibility": "accessibility",
|