@aleph-alpha/ui-library 2.10.0 → 2.12.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 +8 -2
- package/config.js +85 -73
- package/dist/system/components/UiAutocomplete/UiAutocomplete.vue.d.ts +0 -1
- package/dist/system/components/UiAutocomplete/types.d.ts +0 -3
- package/dist/system/components/UiDialog/UiDialogDescription.vue.d.ts +2 -1
- package/dist/system/components/UiDialog/UiDialogFooter.vue.d.ts +1 -2
- package/dist/system/components/UiDialog/UiDialogHeader.vue.d.ts +1 -2
- package/dist/system/components/UiDialog/UiDialogTitle.vue.d.ts +2 -1
- package/dist/system/components/UiDialog/types.d.ts +10 -4
- package/dist/system/components/UiDropdownMenu/UiDropdownMenuSub.vue.d.ts +3 -1
- package/dist/system/components/UiField/UiFieldError.vue.d.ts +8 -1
- package/dist/system/components/UiInput/UiInput.vue.d.ts +16 -1
- package/dist/system/components/UiSelect/UiSelect.vue.d.ts +4 -5
- package/dist/system/components/UiSelect/UiSelectContent.vue.d.ts +0 -1
- package/dist/system/components/UiSelect/UiSelectItem.vue.d.ts +2 -9
- package/dist/system/components/UiSelect/UiSelectTrigger.vue.d.ts +0 -2
- package/dist/system/components/UiSelect/UiSelectValue.vue.d.ts +0 -3
- package/dist/system/components/UiSelect/types.d.ts +26 -6
- package/dist/system/components/UiStepper/UiStepperDescription.vue.d.ts +3 -1
- package/dist/system/components/UiStepper/UiStepperIndicator.vue.d.ts +3 -1
- package/dist/system/components/UiStepper/UiStepperItem.vue.d.ts +3 -1
- package/dist/system/components/UiTagsInput/types.d.ts +1 -2
- package/dist/system/components/core/accordion/AccordionItem.vue.d.ts +3 -1
- package/dist/system/components/core/calendar/CalendarHeading.vue.d.ts +2 -2
- package/dist/system/components/core/dropdown-menu/DropdownMenuSub.vue.d.ts +3 -1
- package/dist/system/components/core/range-calendar/RangeCalendarHeading.vue.d.ts +2 -2
- package/dist/system/components/core/stepper/StepperDescription.vue.d.ts +3 -1
- package/dist/system/components/core/stepper/StepperIndicator.vue.d.ts +3 -1
- package/dist/system/components/core/stepper/StepperItem.vue.d.ts +3 -1
- package/dist/system/index.d.ts +2 -1
- package/dist/system/lib/utils.d.ts +6 -0
- package/dist/system/lib.js +9685 -9895
- package/dist/system/patterns/UiSidebar/UiSidebarContent.vue.d.ts +1 -2
- package/dist/system/patterns/UiSidebar/UiSidebarFooter.vue.d.ts +1 -2
- package/dist/system/patterns/UiSidebar/UiSidebarGroupContent.vue.d.ts +1 -2
- package/dist/system/patterns/UiSidebar/UiSidebarInset.vue.d.ts +1 -2
- package/dist/system/patterns/UiSidebar/UiSidebarMenu.vue.d.ts +1 -2
- package/dist/system/patterns/UiSidebar/UiSidebarMenuItem.vue.d.ts +1 -2
- package/dist/system/patterns/UiSidebar/UiSidebarProvider.vue.d.ts +1 -2
- package/dist/system/patterns/UiSidebar/UiSidebarRail.vue.d.ts +1 -2
- package/dist/system/patterns/UiSidebar/__tests__/sidebar-test-helpers.d.ts +9 -9
- package/dist/system/patterns/UiSidebar/types.d.ts +8 -16
- package/dist/system/story-sidebar-icons.json +10 -0
- package/package.json +5 -2
- package/src/@types/shims-vue.d.ts +1 -1
- package/src/__tests__/test-utils.ts +1 -1
- package/src/components/UiAlertDialog/UiAlertDialogAction.vue +1 -1
- package/src/components/UiAlertDialog/UiAlertDialogCancel.vue +1 -1
- package/src/components/UiAlertDialog/UiAlertDialogContent.vue +4 -1
- package/src/components/UiAlertDialog/UiAlertDialogDescription.vue +1 -1
- package/src/components/UiAlertDialog/UiAlertDialogTitle.vue +1 -1
- package/src/components/UiAlertDialog/UiAlertDialogTrigger.vue +1 -1
- package/src/components/UiAutocomplete/UiAutocomplete.vue +9 -9
- package/src/components/UiAutocomplete/__tests__/UiAutocomplete.test.ts +76 -5
- package/src/components/UiAutocomplete/types.ts +0 -3
- package/src/components/UiBadge/UiBadge.vue +1 -1
- package/src/components/UiBadge/constants.ts +1 -1
- package/src/components/UiBadge/types.ts +1 -1
- package/src/components/UiButton/UiButton.stories.ts +286 -198
- package/src/components/UiButton/mcp-docs.json +49 -0
- package/src/components/UiCalendar/UiCalendar.vue +2 -5
- package/src/components/UiCalendar/__tests__/UiCalendar.test.ts +4 -2
- package/src/components/UiCheckbox/UiCheckbox.stories.ts +176 -2
- package/src/components/UiCheckbox/mcp-docs.json +36 -0
- package/src/components/UiChip/types.ts +1 -1
- package/src/components/UiDialog/UiDialogFooter.vue +0 -3
- package/src/components/UiDialog/UiDialogHeader.vue +0 -3
- package/src/components/UiDialog/types.ts +10 -4
- package/src/components/UiDropdownMenu/__tests__/UiDropdownMenu.test.ts +1 -1
- package/src/components/UiField/UiField.stories.ts +265 -3
- package/src/components/UiField/UiField.vue +9 -2
- package/src/components/UiField/UiFieldError.vue +3 -3
- package/src/components/UiField/mcp-docs.json +72 -0
- package/src/components/UiFileItem/UiFileItem.stories.ts +11 -11
- package/src/components/UiFileUploadBox/UiFileUploadBox.vue +1 -1
- package/src/components/UiIcon/UiIcon.vue +3 -2
- package/src/components/UiInput/UiInput.vue +19 -3
- package/src/components/UiInput/mcp-docs.json +51 -0
- package/src/components/UiItem/UiItem.stories.ts +118 -2
- package/src/components/UiItem/__tests__/UiItem.test.ts +3 -5
- package/src/components/UiItem/mcp-docs.json +25 -0
- package/src/components/UiLabel/UiLabel.vue +1 -1
- package/src/components/UiListbox/UiListbox.vue +3 -6
- package/src/components/UiListbox/UiListboxFilter.vue +1 -1
- package/src/components/UiListbox/UiListboxItem.vue +1 -1
- package/src/components/UiProgress/UiProgress.vue +1 -1
- package/src/components/UiRadioGroup/UiRadioGroup.vue +1 -1
- package/src/components/UiRadioGroup/UiRadioGroupItem.vue +2 -2
- package/src/components/UiRadioGroup/__tests__/UiRadioGroup.test.ts +2 -2
- package/src/components/UiRangeCalendar/UiRangeCalendar.vue +2 -5
- package/src/components/UiRangeCalendar/__tests__/UiRangeCalendar.test.ts +9 -6
- package/src/components/UiSelect/UiSelect.stories.ts +4 -90
- package/src/components/UiSelect/UiSelect.vue +66 -144
- package/src/components/UiSelect/UiSelectContent.vue +8 -21
- package/src/components/UiSelect/UiSelectItem.vue +0 -82
- package/src/components/UiSelect/UiSelectTrigger.vue +1 -62
- package/src/components/UiSelect/UiSelectValue.vue +1 -47
- package/src/components/UiSelect/__tests__/UiSelect.test.ts +47 -98
- package/src/components/UiSelect/__tests__/UiSelectContent.test.ts +36 -3
- package/src/components/UiSelect/__tests__/UiSelectItem.test.ts +1 -1
- package/src/components/UiSelect/__tests__/UiSelectTrigger.test.ts +2 -2
- package/src/components/UiSelect/types.ts +29 -6
- package/src/components/UiSwitch/UiSwitch.vue +1 -1
- package/src/components/UiTagsInput/UiTagsInput.vue +1 -1
- package/src/components/UiTagsInput/UiTagsInputInput.vue +1 -1
- package/src/components/UiTagsInput/UiTagsInputItem.vue +1 -1
- package/src/components/UiTagsInput/types.ts +1 -4
- package/src/components/UiTooltip/UiTooltip.stories.ts +0 -8
- package/src/components/core/accordion/AccordionItem.vue +1 -1
- package/src/components/core/alert-dialog/AlertDialogContent.vue +1 -1
- package/src/components/core/badge/Badge.vue +2 -5
- package/src/components/core/calendar/CalendarHeading.vue +1 -1
- package/src/components/core/dropdown-menu/DropdownMenuSub.vue +1 -1
- package/src/components/core/item/index.ts +1 -1
- package/src/components/core/listbox/Listbox.vue +2 -5
- package/src/components/core/listbox/ListboxContent.vue +2 -5
- package/src/components/core/listbox/ListboxFilter.vue +2 -5
- package/src/components/core/listbox/ListboxGroup.vue +2 -5
- package/src/components/core/listbox/ListboxGroupLabel.vue +2 -5
- package/src/components/core/listbox/ListboxItem.vue +2 -5
- package/src/components/core/listbox/ListboxItemIndicator.vue +2 -5
- package/src/components/core/range-calendar/RangeCalendarHeading.vue +1 -1
- package/src/components/core/sidebar/SidebarContent.vue +4 -5
- package/src/components/core/sidebar/SidebarFooter.vue +4 -5
- package/src/components/core/sidebar/SidebarGroup.vue +4 -5
- package/src/components/core/sidebar/SidebarHeader.vue +4 -5
- package/src/components/core/sidebar/SidebarMenu.vue +4 -5
- package/src/components/core/sidebar/SidebarMenuAction.vue +1 -1
- package/src/components/core/sidebar/SidebarMenuButtonChild.vue +1 -1
- package/src/components/core/sidebar/SidebarMenuSkeleton.vue +1 -1
- package/src/components/core/sidebar/SidebarMenuSubButton.vue +1 -1
- package/src/components/core/sidebar/SidebarSeparator.vue +4 -5
- package/src/components/core/stepper/StepperDescription.vue +1 -1
- package/src/components/core/stepper/StepperIndicator.vue +1 -1
- package/src/components/core/stepper/StepperItem.vue +1 -1
- package/src/components/core/tags-input/TagsInput.vue +2 -5
- package/src/components/core/tags-input/TagsInputInput.vue +2 -5
- package/src/components/core/tags-input/TagsInputItem.vue +2 -5
- package/src/components/core/tags-input/TagsInputItemDelete.vue +2 -5
- package/src/components/core/tags-input/TagsInputItemText.vue +2 -5
- package/src/components/core/toggle/Toggle.vue +1 -1
- package/src/index.ts +30 -5
- package/src/lib/useDrag.ts +1 -0
- package/src/lib/utils.ts +12 -0
- package/src/patterns/UiDataTable/UiDataTable.mock.ts +13 -4
- package/src/patterns/UiDataTable/UiDataTable.vue +1 -0
- package/src/patterns/UiDataTable/__tests__/UiDataTable.test.ts +11 -2
- package/src/patterns/UiDatePicker/__tests__/UiDatePicker.test.ts +28 -39
- package/src/patterns/UiSidebar/UiSidebarContent.vue +0 -3
- package/src/patterns/UiSidebar/UiSidebarFooter.vue +0 -3
- package/src/patterns/UiSidebar/UiSidebarGroup.vue +4 -5
- package/src/patterns/UiSidebar/UiSidebarGroupContent.vue +0 -3
- package/src/patterns/UiSidebar/UiSidebarHeader.vue +4 -5
- package/src/patterns/UiSidebar/UiSidebarInset.vue +0 -3
- package/src/patterns/UiSidebar/UiSidebarMenu.vue +0 -3
- package/src/patterns/UiSidebar/UiSidebarMenuButton.vue +4 -5
- package/src/patterns/UiSidebar/UiSidebarMenuItem.vue +0 -3
- package/src/patterns/UiSidebar/UiSidebarMenuSub.vue +4 -5
- package/src/patterns/UiSidebar/UiSidebarMenuSubItem.vue +4 -5
- package/src/patterns/UiSidebar/UiSidebarPopoverMenu.vue +4 -5
- package/src/patterns/UiSidebar/UiSidebarPopoverMenuItem.vue +4 -5
- package/src/patterns/UiSidebar/UiSidebarPopoverTrigger.vue +4 -5
- package/src/patterns/UiSidebar/UiSidebarProvider.vue +0 -3
- package/src/patterns/UiSidebar/UiSidebarRail.vue +0 -3
- package/src/patterns/UiSidebar/UiSidebarSub.vue +4 -5
- package/src/patterns/UiSidebar/__tests__/UiSidebar.test.ts +21 -17
- package/src/patterns/UiSidebar/__tests__/UiSidebarMenuButton.test.ts +12 -10
- package/src/patterns/UiSidebar/types.ts +8 -8
- package/src/theme/Typography.stories.ts +3 -2
- package/dist/system/components/UiSelect/context.d.ts +0 -28
- package/src/components/UiSelect/context.ts +0 -42
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Selected value shape used by `UiSelect`.
|
|
4
|
+
*
|
|
5
|
+
* - Single-select mode uses a string value.
|
|
6
|
+
* - Multi-select mode uses an array of string values.
|
|
7
|
+
*
|
|
8
|
+
* This type represents an actual selection payload, so it intentionally does
|
|
9
|
+
* not include `undefined`. Optional props such as `modelValue` and
|
|
10
|
+
* `defaultValue` become `undefined` through the optional property itself.
|
|
11
|
+
*/
|
|
12
|
+
export type UiSelectValue = string | string[];
|
|
13
|
+
/**
|
|
14
|
+
* Optional selected value accepted by internal normalization helpers.
|
|
15
|
+
*
|
|
16
|
+
* Use this when code needs to handle the absence of a select value explicitly,
|
|
17
|
+
* for example while forwarding optional `modelValue` or `defaultValue` props
|
|
18
|
+
* to the underlying select primitive.
|
|
19
|
+
*/
|
|
20
|
+
export type UiSelectOptionalValue = UiSelectValue | undefined;
|
|
1
21
|
/**
|
|
2
22
|
* A dropdown select for choosing from a list of options. Use for
|
|
3
23
|
* form fields where users must pick one value from many.
|
|
@@ -12,9 +32,9 @@ export type UiSelectProps = {
|
|
|
12
32
|
* - In single-select (default): a `string`.
|
|
13
33
|
* - In multi-select (`multiple: true`): a `string[]`.
|
|
14
34
|
*/
|
|
15
|
-
modelValue?:
|
|
35
|
+
modelValue?: UiSelectValue;
|
|
16
36
|
/** The value when initially rendered (uncontrolled). Same shape as `modelValue`. */
|
|
17
|
-
defaultValue?:
|
|
37
|
+
defaultValue?: UiSelectValue;
|
|
18
38
|
/** Whether the select is open by default. */
|
|
19
39
|
defaultOpen?: boolean;
|
|
20
40
|
/** Controlled open state. */
|
|
@@ -39,7 +59,7 @@ export type UiSelectProps = {
|
|
|
39
59
|
/** Reading direction. */
|
|
40
60
|
dir?: 'ltr' | 'rtl';
|
|
41
61
|
/**
|
|
42
|
-
* When true, allows selecting multiple items. The
|
|
62
|
+
* When true, allows selecting multiple items. The dropdown stays open on
|
|
43
63
|
* click and the trigger renders the selected values as a comma-separated
|
|
44
64
|
* list. `modelValue` becomes a `string[]`.
|
|
45
65
|
*/
|
|
@@ -53,7 +73,7 @@ export type UiSelectEmits = {
|
|
|
53
73
|
* Emitted when the selected value changes.
|
|
54
74
|
* Payload is `string` in single-select and `string[]` in multi-select.
|
|
55
75
|
*/
|
|
56
|
-
'update:modelValue': [value:
|
|
76
|
+
'update:modelValue': [value: UiSelectValue];
|
|
57
77
|
/** Emitted when the open state changes. */
|
|
58
78
|
'update:open': [value: boolean];
|
|
59
79
|
};
|
|
@@ -65,13 +85,13 @@ export type UiSelectTriggerProps = {
|
|
|
65
85
|
ariaLabel?: string;
|
|
66
86
|
/** Whether the trigger is disabled. */
|
|
67
87
|
disabled?: boolean;
|
|
68
|
-
/** Size of the trigger. */
|
|
69
|
-
size?: 'default' | 'sm';
|
|
70
88
|
};
|
|
71
89
|
/**
|
|
72
90
|
* Props for the UiSelectContent component.
|
|
73
91
|
*/
|
|
74
92
|
export type UiSelectContentProps = {
|
|
93
|
+
/** Additional classes for the floating content. */
|
|
94
|
+
class?: HTMLAttributes['class'];
|
|
75
95
|
/** Preferred side of the trigger. */
|
|
76
96
|
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
77
97
|
/** Distance from the trigger in pixels. */
|
|
@@ -8,8 +8,7 @@ import { TagsInputRootProps } from 'reka-ui';
|
|
|
8
8
|
* @related UiInput, UiBadge
|
|
9
9
|
* @augments TagsInputRootProps
|
|
10
10
|
*/
|
|
11
|
-
export
|
|
12
|
-
}
|
|
11
|
+
export type UiTagsInputProps = Omit<TagsInputRootProps, 'class' | 'modelValue'>;
|
|
13
12
|
/**
|
|
14
13
|
* Props for the UiTagsInputInput component.
|
|
15
14
|
* The text input field for entering new tags.
|
|
@@ -8,11 +8,11 @@ declare function __VLS_template(): {
|
|
|
8
8
|
slots: Readonly<{
|
|
9
9
|
default: (props: {
|
|
10
10
|
headingValue: string;
|
|
11
|
-
}) =>
|
|
11
|
+
}) => unknown;
|
|
12
12
|
}> & {
|
|
13
13
|
default: (props: {
|
|
14
14
|
headingValue: string;
|
|
15
|
-
}) =>
|
|
15
|
+
}) => unknown;
|
|
16
16
|
};
|
|
17
17
|
refs: {};
|
|
18
18
|
rootEl: any;
|
|
@@ -8,11 +8,11 @@ declare function __VLS_template(): {
|
|
|
8
8
|
slots: Readonly<{
|
|
9
9
|
default: (props: {
|
|
10
10
|
headingValue: string;
|
|
11
|
-
}) =>
|
|
11
|
+
}) => unknown;
|
|
12
12
|
}> & {
|
|
13
13
|
default: (props: {
|
|
14
14
|
headingValue: string;
|
|
15
|
-
}) =>
|
|
15
|
+
}) => unknown;
|
|
16
16
|
};
|
|
17
17
|
refs: {};
|
|
18
18
|
rootEl: any;
|
package/dist/system/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
1
2
|
import { PrimitiveProps as RekaPrimitiveProps } from 'reka-ui';
|
|
2
3
|
export * from './components';
|
|
3
4
|
export * from './patterns';
|
|
@@ -6,6 +7,6 @@ export * from './directives';
|
|
|
6
7
|
export { Primitive } from 'reka-ui';
|
|
7
8
|
export type PrimitiveProps = RekaPrimitiveProps;
|
|
8
9
|
declare const _default: {
|
|
9
|
-
install(app:
|
|
10
|
+
install(app: App): void;
|
|
10
11
|
};
|
|
11
12
|
export default _default;
|
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
import { ClassValue } from 'clsx';
|
|
2
2
|
export declare function cn(...inputs: ClassValue[]): string;
|
|
3
|
+
/**
|
|
4
|
+
* Returns a shallow copy without the Vue `class` attr/prop.
|
|
5
|
+
* @param source Object that may contain a `class` key.
|
|
6
|
+
* @returns A shallow copy without `class`.
|
|
7
|
+
*/
|
|
8
|
+
export declare function omitClass<T extends object>(source: T): Omit<T, 'class'>;
|