@aleph-alpha/ui-library 5.4.0 → 5.6.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 +9 -0
- package/config.js +12 -3
- package/dist/system/components/UiAutocomplete/UiAutocomplete.vue.d.ts +2 -0
- package/dist/system/components/UiButtonGroup/UiButtonGroup.vue.d.ts +20 -0
- package/dist/system/components/UiButtonGroup/index.d.ts +2 -0
- package/dist/system/components/UiButtonGroup/types.d.ts +20 -0
- package/dist/system/components/core/button-group/ButtonGroup.vue.d.ts +23 -0
- package/dist/system/components/core/button-group/ButtonGroupSeparator.vue.d.ts +9 -0
- package/dist/system/components/core/button-group/ButtonGroupText.vue.d.ts +26 -0
- package/dist/system/components/core/button-group/index.d.ts +8 -0
- package/dist/system/components/index.d.ts +1 -0
- package/dist/system/lib.js +8878 -8692
- package/dist/system/patterns/UiFloatActions/UiFloatActionItems.vue.d.ts +173 -2
- package/dist/system/patterns/UiFloatActions/floatActionItemContext.d.ts +15 -1
- package/dist/system/patterns/UiFloatActions/types.d.ts +25 -1
- package/dist/system/story-sidebar-icons.json +8 -1
- package/package.json +5 -3
- package/src/components/UiAutocomplete/UiAutocomplete.stories.ts +620 -0
- package/src/components/UiAutocomplete/UiAutocomplete.vue +28 -3
- package/src/components/UiAutocomplete/__tests__/UiAutocomplete.test.ts +14 -69
- package/src/components/UiButton/UiButton.stories.ts +9 -9
- package/src/components/UiButtonGroup/UiButtonGroup.stories.ts +690 -0
- package/src/components/UiButtonGroup/UiButtonGroup.vue +18 -0
- package/src/components/UiButtonGroup/__tests__/UiButtonGroup.test.ts +68 -0
- package/src/components/UiButtonGroup/index.ts +2 -0
- package/src/components/UiButtonGroup/types.ts +21 -0
- package/src/components/UiCheckbox/UiCheckbox.stories.ts +253 -0
- package/src/components/UiCheckbox/__tests__/UiCheckbox.test.ts +3 -18
- package/src/components/UiField/UiField.stories.ts +608 -1
- package/src/components/UiField/UiFieldDescription.vue +7 -2
- package/src/components/UiInput/UiInput.stories.ts +336 -2
- package/src/components/UiInput/__tests__/UiInput.test.ts +20 -28
- package/src/components/UiItem/UiItem.stories.ts +236 -1
- package/src/components/UiItem/__tests__/UiItem.test.ts +11 -72
- package/src/components/UiSelect/UiSelect.stories.ts +769 -0
- package/src/components/UiSelect/__tests__/UiSelect.test.ts +4 -73
- package/src/components/UiSelect/__tests__/UiSelectItem.test.ts +3 -31
- package/src/components/UiSelect/__tests__/UiSelectTrigger.test.ts +14 -5
- package/src/components/UiSnackbar/UiSnackbar.stories.ts +6 -6
- package/src/components/UiSnackbar/UiSnackbar.vue +4 -4
- package/src/components/UiSnackbar/UiSnackbarContent.vue +4 -4
- package/src/components/core/button-group/ButtonGroup.vue +24 -0
- package/src/components/core/button-group/ButtonGroupSeparator.vue +29 -0
- package/src/components/core/button-group/ButtonGroupText.vue +33 -0
- package/src/components/core/button-group/index.ts +25 -0
- package/src/components/core/checkbox/Checkbox.vue +0 -1
- package/src/components/core/select/SelectTrigger.vue +1 -1
- package/src/components/core/tabs/TabsTrigger.vue +1 -1
- package/src/components/index.ts +1 -0
- package/src/patterns/UiDataTable/UiDataTable.stories.ts +495 -8
- package/src/patterns/UiDataTable/UiDataTableFilterMenu.vue +1 -1
- package/src/patterns/UiDataTable/__tests__/UiDataTable.test.ts +7 -184
- package/src/patterns/UiFloatActions/UiFloatActionItems.vue +138 -11
- package/src/patterns/UiFloatActions/UiFloatActions.stories.ts +890 -3
- package/src/patterns/UiFloatActions/__tests__/UiFloatActionItems.test.ts +46 -24
- package/src/patterns/UiFloatActions/floatActionItemContext.ts +16 -1
- package/src/patterns/UiFloatActions/types.ts +28 -1
- package/src/components/UiField/__tests__/UiFieldError.test.ts +0 -39
- package/src/patterns/UiFloatActions/__tests__/UiFloatActions.a11y.test.ts +0 -152
package/config.d.ts
CHANGED
|
@@ -304,6 +304,15 @@ export declare const getSparkTokenPresetWithoutUiLibraryTypography: () => Preset
|
|
|
304
304
|
* Combines theme customization with additional UnoCSS config.
|
|
305
305
|
*/
|
|
306
306
|
export interface UiLibraryConfigOptions extends UiLibraryPresetOptions {
|
|
307
|
+
/**
|
|
308
|
+
* Include the legacy Spark design-system token preset (emits `--core-*`,
|
|
309
|
+
* `--brand-*`, `--semantic-*`, `--primitives-*` plus Spark spacing/shadow
|
|
310
|
+
* vars and utilities). Enabled by default for coexistence with
|
|
311
|
+
* `ds-components-vue`. Pure ui-library apps can set this to `false` so only
|
|
312
|
+
* ui-library theme tokens are emitted.
|
|
313
|
+
* @default true
|
|
314
|
+
*/
|
|
315
|
+
includeSparkTokens?: boolean;
|
|
307
316
|
/** Additional UnoCSS presets to append after the built-in ones */
|
|
308
317
|
presets?: Preset[];
|
|
309
318
|
/** Additional UnoCSS rules */
|
package/config.js
CHANGED
|
@@ -646,6 +646,9 @@ const getBorderRadiusExactUtilityRules = () => {
|
|
|
646
646
|
const className = key === 'DEFAULT' ? 'rounded' : `rounded-${key}`;
|
|
647
647
|
entries.push([className, { 'border-radius': value }]);
|
|
648
648
|
}
|
|
649
|
+
// Manual intermediate radius between the `xl` and `2xl` tokens; not sourced
|
|
650
|
+
// from Figma, so it's declared here rather than in tokens.json.
|
|
651
|
+
entries.push(['rounded-xl-2xl', { 'border-radius': '1.375rem' }]);
|
|
649
652
|
return entriesToRules(entries);
|
|
650
653
|
};
|
|
651
654
|
|
|
@@ -1255,6 +1258,7 @@ export const defineUiLibraryConfig = (options = {}) => {
|
|
|
1255
1258
|
extend,
|
|
1256
1259
|
theme,
|
|
1257
1260
|
includeAllTokens,
|
|
1261
|
+
includeSparkTokens = true,
|
|
1258
1262
|
themeMode,
|
|
1259
1263
|
accessible,
|
|
1260
1264
|
accessibleTheme,
|
|
@@ -1290,9 +1294,14 @@ export const defineUiLibraryConfig = (options = {}) => {
|
|
|
1290
1294
|
color: 'neutral',
|
|
1291
1295
|
darkSelector: darkSelector ?? 'html.dark',
|
|
1292
1296
|
}),
|
|
1293
|
-
// Spark Colors / Spacings / Box-shadow tokens
|
|
1294
|
-
//
|
|
1295
|
-
|
|
1297
|
+
// Legacy Spark Colors / Spacings / Box-shadow tokens, bundled for
|
|
1298
|
+
// coexistence with ds-components-vue. Typography utilities are filtered
|
|
1299
|
+
// out where ui-library owns the same class names. Pure ui-library apps
|
|
1300
|
+
// can opt out via `includeSparkTokens: false` so only ui-library theme
|
|
1301
|
+
// tokens are emitted.
|
|
1302
|
+
...(includeSparkTokens
|
|
1303
|
+
? [getSparkTokenPresetWithoutUiLibraryTypography()]
|
|
1304
|
+
: []),
|
|
1296
1305
|
presetUiLibraryThemeFromTokens(themeOptions),
|
|
1297
1306
|
presetUiLibraryUtils(),
|
|
1298
1307
|
...extraPresets,
|
|
@@ -33,6 +33,7 @@ declare function __VLS_template(): {
|
|
|
33
33
|
}): any;
|
|
34
34
|
};
|
|
35
35
|
refs: {
|
|
36
|
+
rootEl: HTMLDivElement;
|
|
36
37
|
inputEl: HTMLInputElement;
|
|
37
38
|
};
|
|
38
39
|
rootEl: HTMLDivElement;
|
|
@@ -74,6 +75,7 @@ declare const __VLS_component: import('vue').DefineComponent<UiAutocompleteProps
|
|
|
74
75
|
emptyText: string;
|
|
75
76
|
showIndicator: boolean;
|
|
76
77
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
78
|
+
rootEl: HTMLDivElement;
|
|
77
79
|
inputEl: HTMLInputElement;
|
|
78
80
|
}, HTMLDivElement>;
|
|
79
81
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { UiButtonGroupProps } from './types';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: {
|
|
5
|
+
default?(_: {}): any;
|
|
6
|
+
};
|
|
7
|
+
refs: {};
|
|
8
|
+
rootEl: HTMLDivElement;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
11
|
+
declare const __VLS_component: import('vue').DefineComponent<UiButtonGroupProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<UiButtonGroupProps> & Readonly<{}>, {
|
|
12
|
+
orientation: import('./types').UiButtonGroupOrientation;
|
|
13
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
14
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Layout direction for the buttons inside a `UiButtonGroup`.
|
|
3
|
+
*/
|
|
4
|
+
export type UiButtonGroupOrientation = 'horizontal' | 'vertical';
|
|
5
|
+
/**
|
|
6
|
+
* Visually joins a set of related actions (and inputs) into a single, connected
|
|
7
|
+
* control. Renders a `role="group"` container and merges the borders and radii
|
|
8
|
+
* of its children so they read as one unit.
|
|
9
|
+
* @category Actions
|
|
10
|
+
* @useCases toolbar, segmented actions, split button, input with buttons, pagination controls
|
|
11
|
+
* @keywords button group, group, toolbar, segmented, joined, split button
|
|
12
|
+
* @related UiButton, UiInput
|
|
13
|
+
*/
|
|
14
|
+
export interface UiButtonGroupProps {
|
|
15
|
+
/**
|
|
16
|
+
* The layout direction of the grouped buttons.
|
|
17
|
+
* @default 'horizontal'
|
|
18
|
+
*/
|
|
19
|
+
orientation?: UiButtonGroupOrientation;
|
|
20
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'vue';
|
|
2
|
+
import { ButtonGroupVariants } from '.';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
class?: HTMLAttributes['class'];
|
|
5
|
+
orientation?: ButtonGroupVariants['orientation'];
|
|
6
|
+
};
|
|
7
|
+
declare function __VLS_template(): {
|
|
8
|
+
attrs: Partial<{}>;
|
|
9
|
+
slots: {
|
|
10
|
+
default?(_: {}): any;
|
|
11
|
+
};
|
|
12
|
+
refs: {};
|
|
13
|
+
rootEl: HTMLDivElement;
|
|
14
|
+
};
|
|
15
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
16
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
17
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SeparatorProps } from 'reka-ui';
|
|
2
|
+
import { HTMLAttributes } from 'vue';
|
|
3
|
+
type __VLS_Props = SeparatorProps & {
|
|
4
|
+
class?: HTMLAttributes['class'];
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
7
|
+
orientation: "vertical" | "horizontal";
|
|
8
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { PrimitiveProps } from 'reka-ui';
|
|
2
|
+
import { HTMLAttributes } from 'vue';
|
|
3
|
+
import { ButtonGroupVariants } from '.';
|
|
4
|
+
interface Props extends PrimitiveProps {
|
|
5
|
+
class?: HTMLAttributes['class'];
|
|
6
|
+
orientation?: ButtonGroupVariants['orientation'];
|
|
7
|
+
}
|
|
8
|
+
declare function __VLS_template(): {
|
|
9
|
+
attrs: Partial<{}>;
|
|
10
|
+
slots: {
|
|
11
|
+
default?(_: {}): any;
|
|
12
|
+
};
|
|
13
|
+
refs: {};
|
|
14
|
+
rootEl: any;
|
|
15
|
+
};
|
|
16
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
17
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
18
|
+
as: import('reka-ui').AsTag | import('vue').Component;
|
|
19
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
23
|
+
new (): {
|
|
24
|
+
$slots: S;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
export { default as ButtonGroup } from './ButtonGroup.vue';
|
|
3
|
+
export { default as ButtonGroupSeparator } from './ButtonGroupSeparator.vue';
|
|
4
|
+
export { default as ButtonGroupText } from './ButtonGroupText.vue';
|
|
5
|
+
export declare const buttonGroupVariants: (props?: ({
|
|
6
|
+
orientation?: "vertical" | "horizontal" | null | undefined;
|
|
7
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
|
+
export type ButtonGroupVariants = VariantProps<typeof buttonGroupVariants>;
|