@knime/kds-components 0.23.2 → 0.24.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/dist/index.css +531 -1523
- package/dist/index.js +7234 -10323
- package/dist/index.js.map +1 -1
- package/dist/src/{containers/ListItem/ListItemDivider/ListItemDivider.vue.d.ts → accessories/Divider/KdsDivider.vue.d.ts} +1 -1
- package/dist/src/accessories/Divider/KdsDivider.vue.d.ts.map +1 -0
- package/dist/src/accessories/Divider/index.d.ts +2 -0
- package/dist/src/accessories/Divider/index.d.ts.map +1 -0
- package/dist/src/accessories/index.d.ts +1 -0
- package/dist/src/accessories/index.d.ts.map +1 -1
- package/dist/src/buttons/KdsMenuButton/KdsMenuButton.vue.d.ts +71 -38
- package/dist/src/buttons/KdsMenuButton/KdsMenuButton.vue.d.ts.map +1 -1
- package/dist/src/buttons/KdsSplitButton/KdsSplitButton.vue.d.ts +71 -38
- package/dist/src/buttons/KdsSplitButton/KdsSplitButton.vue.d.ts.map +1 -1
- package/dist/src/containers/ContextMenu/KdsContextMenu.vue.d.ts +14 -0
- package/dist/src/containers/ContextMenu/KdsContextMenu.vue.d.ts.map +1 -0
- package/dist/src/containers/ContextMenu/index.d.ts +3 -0
- package/dist/src/containers/ContextMenu/index.d.ts.map +1 -0
- package/dist/src/containers/ContextMenu/types.d.ts +35 -0
- package/dist/src/containers/ContextMenu/types.d.ts.map +1 -0
- package/dist/src/containers/ListContainer/KdsListContainer.vue.d.ts +1 -0
- package/dist/src/containers/ListContainer/KdsListContainer.vue.d.ts.map +1 -1
- package/dist/src/containers/ListContainer/types.d.ts +2 -0
- package/dist/src/containers/ListContainer/types.d.ts.map +1 -1
- package/dist/src/containers/ListItem/KdsListItem/KdsListItem.vue.d.ts.map +1 -1
- package/dist/src/containers/ListItem/KdsListItem/types.d.ts +25 -3
- package/dist/src/containers/ListItem/KdsListItem/types.d.ts.map +1 -1
- package/dist/src/containers/Menu/KdsMenu.vue.d.ts +363 -0
- package/dist/src/containers/Menu/KdsMenu.vue.d.ts.map +1 -0
- package/dist/src/containers/Menu/index.d.ts +3 -0
- package/dist/src/containers/Menu/index.d.ts.map +1 -0
- package/dist/src/containers/Menu/types.d.ts +13 -0
- package/dist/src/containers/Menu/types.d.ts.map +1 -0
- package/dist/src/containers/MenuContainer/KdsMenuContainer.vue.d.ts +1 -28
- package/dist/src/containers/MenuContainer/KdsMenuContainer.vue.d.ts.map +1 -1
- package/dist/src/containers/MenuContainer/KdsMenuItem.vue.d.ts +14 -0
- package/dist/src/containers/MenuContainer/KdsMenuItem.vue.d.ts.map +1 -0
- package/dist/src/containers/MenuContainer/types.d.ts +23 -5
- package/dist/src/containers/MenuContainer/types.d.ts.map +1 -1
- package/dist/src/containers/_helpers/useListItemKeyboardNav.d.ts +27 -0
- package/dist/src/containers/_helpers/useListItemKeyboardNav.d.ts.map +1 -0
- package/dist/src/containers/_helpers/useStableItemIds.d.ts +19 -0
- package/dist/src/containers/_helpers/useStableItemIds.d.ts.map +1 -0
- package/dist/src/containers/index.d.ts +5 -2
- package/dist/src/containers/index.d.ts.map +1 -1
- package/dist/src/forms/_helper/InfoPopover/KdsInfoToggleButton.vue.d.ts +136 -16
- package/dist/src/forms/_helper/InfoPopover/KdsInfoToggleButton.vue.d.ts.map +1 -1
- package/dist/src/forms/_helper/KdsLabel.vue.d.ts.map +1 -1
- package/dist/src/forms/_helper/VariablePopover/KdsVariableToggleButton.vue.d.ts +136 -16
- package/dist/src/forms/_helper/VariablePopover/KdsVariableToggleButton.vue.d.ts.map +1 -1
- package/dist/src/forms/inputs/BaseInput.vue.d.ts +7 -0
- package/dist/src/forms/inputs/BaseInput.vue.d.ts.map +1 -1
- package/dist/src/forms/inputs/ColorInput/KdsColorInput.vue.d.ts +68 -8
- package/dist/src/forms/inputs/ColorInput/KdsColorInput.vue.d.ts.map +1 -1
- package/dist/src/forms/inputs/DateInput/KdsDateInput.vue.d.ts +184 -99
- package/dist/src/forms/inputs/DateInput/KdsDateInput.vue.d.ts.map +1 -1
- package/dist/src/forms/inputs/DateInput/KdsDatePicker.vue.d.ts +88 -0
- package/dist/src/forms/inputs/DateInput/KdsDatePicker.vue.d.ts.map +1 -0
- package/dist/src/forms/inputs/DateInput/_helper/DatePickerDayGrid.vue.d.ts +17 -0
- package/dist/src/forms/inputs/DateInput/_helper/DatePickerDayGrid.vue.d.ts.map +1 -0
- package/dist/src/forms/inputs/DateInput/_helper/DatePickerMonthGrid.vue.d.ts +14 -0
- package/dist/src/forms/inputs/DateInput/_helper/DatePickerMonthGrid.vue.d.ts.map +1 -0
- package/dist/src/forms/inputs/DateInput/_helper/DatePickerYearGrid.vue.d.ts +14 -0
- package/dist/src/forms/inputs/DateInput/_helper/DatePickerYearGrid.vue.d.ts.map +1 -0
- package/dist/src/forms/inputs/DateInput/_helper/types.d.ts +18 -0
- package/dist/src/forms/inputs/DateInput/_helper/types.d.ts.map +1 -0
- package/dist/src/forms/inputs/DateInput/dateUtils.d.ts +4 -3
- package/dist/src/forms/inputs/DateInput/dateUtils.d.ts.map +1 -1
- package/dist/src/forms/inputs/DateInput/enums.d.ts +7 -0
- package/dist/src/forms/inputs/DateInput/enums.d.ts.map +1 -0
- package/dist/src/forms/inputs/DateInput/index.d.ts +1 -1
- package/dist/src/forms/inputs/DateInput/index.d.ts.map +1 -1
- package/dist/src/forms/inputs/DateInput/types.d.ts +22 -6
- package/dist/src/forms/inputs/DateInput/types.d.ts.map +1 -1
- package/dist/src/forms/inputs/DateInput/useDateInputMask.d.ts +12 -0
- package/dist/src/forms/inputs/DateInput/useDateInputMask.d.ts.map +1 -0
- package/dist/src/forms/inputs/DateTimeFormatInput/KdsDateTimeFormatInput.vue.d.ts +68 -8
- package/dist/src/forms/inputs/DateTimeFormatInput/KdsDateTimeFormatInput.vue.d.ts.map +1 -1
- package/dist/src/forms/inputs/NumberInput/KdsNumberInput.vue.d.ts +8 -1
- package/dist/src/forms/inputs/NumberInput/KdsNumberInput.vue.d.ts.map +1 -1
- package/dist/src/forms/inputs/PasswordInput/KdsPasswordInput.vue.d.ts +8 -1
- package/dist/src/forms/inputs/PasswordInput/KdsPasswordInput.vue.d.ts.map +1 -1
- package/dist/src/forms/inputs/PatternInput/KdsPatternInput.vue.d.ts +8 -1
- package/dist/src/forms/inputs/PatternInput/KdsPatternInput.vue.d.ts.map +1 -1
- package/dist/src/forms/inputs/SearchInput/KdsSearchInput.vue.d.ts +80 -11
- package/dist/src/forms/inputs/SearchInput/KdsSearchInput.vue.d.ts.map +1 -1
- package/dist/src/forms/inputs/TextInput/KdsTextInput.vue.d.ts +80 -11
- package/dist/src/forms/inputs/TextInput/KdsTextInput.vue.d.ts.map +1 -1
- package/dist/src/forms/inputs/TimeInput/KdsTimeInput.vue.d.ts +1221 -0
- package/dist/src/forms/inputs/TimeInput/KdsTimeInput.vue.d.ts.map +1 -0
- package/dist/src/forms/inputs/TimeInput/TimePicker.vue.d.ts +886 -0
- package/dist/src/forms/inputs/TimeInput/TimePicker.vue.d.ts.map +1 -0
- package/dist/src/forms/inputs/TimeInput/enums.d.ts +7 -0
- package/dist/src/forms/inputs/TimeInput/enums.d.ts.map +1 -0
- package/dist/src/forms/inputs/TimeInput/index.d.ts +4 -0
- package/dist/src/forms/inputs/TimeInput/index.d.ts.map +1 -0
- package/dist/src/forms/inputs/TimeInput/types.d.ts +15 -0
- package/dist/src/forms/inputs/TimeInput/types.d.ts.map +1 -0
- package/dist/src/forms/inputs/TimeInput/useTimeInputMask.d.ts +13 -0
- package/dist/src/forms/inputs/TimeInput/useTimeInputMask.d.ts.map +1 -0
- package/dist/src/forms/inputs/UsernameInput/KdsUsernameInput.vue.d.ts +8 -1
- package/dist/src/forms/inputs/UsernameInput/KdsUsernameInput.vue.d.ts.map +1 -1
- package/dist/src/forms/inputs/UsernameInput/enums.d.ts +1 -1
- package/dist/src/forms/inputs/index.d.ts +2 -0
- package/dist/src/forms/inputs/index.d.ts.map +1 -1
- package/dist/src/forms/inputs/useInputSegments.d.ts +16 -0
- package/dist/src/forms/inputs/useInputSegments.d.ts.map +1 -0
- package/dist/src/forms/inputs/useInputSegments.helpers.d.ts +64 -0
- package/dist/src/forms/inputs/useInputSegments.helpers.d.ts.map +1 -0
- package/dist/src/forms/inputs/useInputSegmentsDnd.d.ts +20 -0
- package/dist/src/forms/inputs/useInputSegmentsDnd.d.ts.map +1 -0
- package/dist/src/forms/inputs/useInputSegmentsMouse.d.ts +19 -0
- package/dist/src/forms/inputs/useInputSegmentsMouse.d.ts.map +1 -0
- package/dist/src/forms/selects/Dropdown/DropdownContainer.vue.d.ts +12 -3
- package/dist/src/forms/selects/Dropdown/DropdownContainer.vue.d.ts.map +1 -1
- package/dist/src/forms/selects/Dropdown/KdsDropdown.vue.d.ts +80 -11
- package/dist/src/forms/selects/Dropdown/KdsDropdown.vue.d.ts.map +1 -1
- package/dist/src/forms/selects/Dropdown/KdsMultiSelectDropdown.vue.d.ts +80 -11
- package/dist/src/forms/selects/Dropdown/KdsMultiSelectDropdown.vue.d.ts.map +1 -1
- package/dist/src/forms/selects/Dropdown/MultiSelectDropdownContainer.vue.d.ts +12 -3
- package/dist/src/forms/selects/Dropdown/MultiSelectDropdownContainer.vue.d.ts.map +1 -1
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/layouts/Navigation/KdsNavItem/KdsNavItem.vue.d.ts +12 -0
- package/dist/src/layouts/Navigation/KdsNavItem/KdsNavItem.vue.d.ts.map +1 -0
- package/dist/src/layouts/Navigation/KdsNavItem/index.d.ts +3 -0
- package/dist/src/layouts/Navigation/KdsNavItem/index.d.ts.map +1 -0
- package/dist/src/layouts/Navigation/KdsNavItem/types.d.ts +21 -0
- package/dist/src/layouts/Navigation/KdsNavItem/types.d.ts.map +1 -0
- package/dist/src/layouts/Navigation/KdsNavigation.vue.d.ts +14 -0
- package/dist/src/layouts/Navigation/KdsNavigation.vue.d.ts.map +1 -0
- package/dist/src/layouts/Navigation/index.d.ts +5 -0
- package/dist/src/layouts/Navigation/index.d.ts.map +1 -0
- package/dist/src/layouts/Navigation/types.d.ts +14 -0
- package/dist/src/layouts/Navigation/types.d.ts.map +1 -0
- package/dist/src/layouts/index.d.ts +2 -0
- package/dist/src/layouts/index.d.ts.map +1 -1
- package/dist/src/overlays/Popover/KdsPopover.vue.d.ts +52 -7
- package/dist/src/overlays/Popover/KdsPopover.vue.d.ts.map +1 -1
- package/dist/src/overlays/Popover/enums.d.ts +2 -1
- package/dist/src/overlays/Popover/enums.d.ts.map +1 -1
- package/dist/src/overlays/Popover/types.d.ts +34 -11
- package/dist/src/overlays/Popover/types.d.ts.map +1 -1
- package/dist/src/patterns/ResponsiveButtonGroup/KdsResponsiveButtonGroup.vue.d.ts +71 -38
- package/dist/src/patterns/ResponsiveButtonGroup/KdsResponsiveButtonGroup.vue.d.ts.map +1 -1
- package/package.json +4 -4
- package/dist/src/containers/ListItem/ListItemDivider/ListItemDivider.vue.d.ts.map +0 -1
- package/dist/src/containers/ListItem/ListItemDivider/index.d.ts +0 -2
- package/dist/src/containers/ListItem/ListItemDivider/index.d.ts.map +0 -1
|
@@ -0,0 +1,363 @@
|
|
|
1
|
+
import { UnwrapRef, nextTick } from 'vue';
|
|
2
|
+
import { KdsMenuProps } from './types';
|
|
3
|
+
declare const isMenuOpenReadonly: import('vue').ComputedRef<boolean>;
|
|
4
|
+
declare const open: () => void;
|
|
5
|
+
declare const close: () => void;
|
|
6
|
+
declare const toggle: () => void;
|
|
7
|
+
declare const attrs: import('vue').ComputedRef<{
|
|
8
|
+
"aria-haspopup": "menu";
|
|
9
|
+
"aria-expanded": boolean;
|
|
10
|
+
"aria-controls": string;
|
|
11
|
+
} | {
|
|
12
|
+
style: Record<string, string>;
|
|
13
|
+
"aria-haspopup": "menu";
|
|
14
|
+
"aria-expanded": boolean;
|
|
15
|
+
"aria-controls": string;
|
|
16
|
+
}>;
|
|
17
|
+
type SlotPropsType = {
|
|
18
|
+
attrs: UnwrapRef<typeof attrs>;
|
|
19
|
+
isOpen: UnwrapRef<typeof isMenuOpenReadonly>;
|
|
20
|
+
open: typeof open;
|
|
21
|
+
close: typeof close;
|
|
22
|
+
toggle: typeof toggle;
|
|
23
|
+
};
|
|
24
|
+
declare function __VLS_template(): {
|
|
25
|
+
attrs: Partial<{}>;
|
|
26
|
+
slots: Readonly<{
|
|
27
|
+
/**
|
|
28
|
+
* Custom toggle for the menu. This slot provides the following props:
|
|
29
|
+
*
|
|
30
|
+
* `attrs`: Attributes you must bind to your custom toggle. They ensure the correct aria attributes as well as the anchor positioning for the menu <br/>
|
|
31
|
+
* `isOpen`: Readonly state that communicates the current state of the menu <br/>
|
|
32
|
+
* `open`: function to programmatically open the menu <br/>
|
|
33
|
+
* `close`: function to programmatically close the menu <br/>
|
|
34
|
+
* `toggle`: function to programmatically switch between the open/close states <br/>
|
|
35
|
+
*/
|
|
36
|
+
default(props: SlotPropsType): unknown;
|
|
37
|
+
}> & {
|
|
38
|
+
/**
|
|
39
|
+
* Custom toggle for the menu. This slot provides the following props:
|
|
40
|
+
*
|
|
41
|
+
* `attrs`: Attributes you must bind to your custom toggle. They ensure the correct aria attributes as well as the anchor positioning for the menu <br/>
|
|
42
|
+
* `isOpen`: Readonly state that communicates the current state of the menu <br/>
|
|
43
|
+
* `open`: function to programmatically open the menu <br/>
|
|
44
|
+
* `close`: function to programmatically close the menu <br/>
|
|
45
|
+
* `toggle`: function to programmatically switch between the open/close states <br/>
|
|
46
|
+
*/
|
|
47
|
+
default(props: SlotPropsType): unknown;
|
|
48
|
+
};
|
|
49
|
+
refs: {
|
|
50
|
+
popover: ({
|
|
51
|
+
$: import('vue').ComponentInternalInstance;
|
|
52
|
+
$data: {};
|
|
53
|
+
$props: ({
|
|
54
|
+
readonly modelValue?: boolean | undefined;
|
|
55
|
+
readonly role?: import('../../overlays/Popover').KdsPopoverRole | undefined;
|
|
56
|
+
readonly popoverType?: import('../../overlays/Popover').KdsPopoverType | undefined;
|
|
57
|
+
readonly fullWidth?: boolean | undefined;
|
|
58
|
+
readonly maxInlineSize?: string | undefined;
|
|
59
|
+
readonly content?: string | undefined;
|
|
60
|
+
readonly placement?: Exclude<import('../../overlays/Popover').KdsPopoverPlacement, "custom"> | undefined;
|
|
61
|
+
readonly customPlacementPosition?: never | undefined;
|
|
62
|
+
readonly "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
63
|
+
} | {
|
|
64
|
+
readonly modelValue?: boolean | undefined;
|
|
65
|
+
readonly role?: import('../../overlays/Popover').KdsPopoverRole | undefined;
|
|
66
|
+
readonly popoverType?: import('../../overlays/Popover').KdsPopoverType | undefined;
|
|
67
|
+
readonly fullWidth?: boolean | undefined;
|
|
68
|
+
readonly maxInlineSize?: string | undefined;
|
|
69
|
+
readonly content?: string | undefined;
|
|
70
|
+
readonly placement: "custom";
|
|
71
|
+
readonly customPlacementPosition: {
|
|
72
|
+
x: number;
|
|
73
|
+
y: number;
|
|
74
|
+
};
|
|
75
|
+
readonly "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
76
|
+
}) & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
77
|
+
$attrs: import('vue').Attrs;
|
|
78
|
+
$refs: {
|
|
79
|
+
[x: string]: unknown;
|
|
80
|
+
} & {
|
|
81
|
+
popoverEl: HTMLDivElement;
|
|
82
|
+
};
|
|
83
|
+
$slots: Readonly<{
|
|
84
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
|
85
|
+
}>;
|
|
86
|
+
$root: import('vue').ComponentPublicInstance | null;
|
|
87
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
|
88
|
+
$host: Element | null;
|
|
89
|
+
$emit: (event: "update:modelValue", value: boolean) => void;
|
|
90
|
+
$el: HTMLDivElement;
|
|
91
|
+
$options: import('vue').ComponentOptionsBase<Readonly<({
|
|
92
|
+
modelValue?: boolean;
|
|
93
|
+
} & {
|
|
94
|
+
role?: import('../../overlays/Popover').KdsPopoverRole;
|
|
95
|
+
popoverType?: import('../../overlays/Popover').KdsPopoverType;
|
|
96
|
+
fullWidth?: boolean;
|
|
97
|
+
maxInlineSize?: string;
|
|
98
|
+
content?: string;
|
|
99
|
+
} & {
|
|
100
|
+
placement?: Exclude<import('../../overlays/Popover').KdsPopoverPlacement, "custom">;
|
|
101
|
+
customPlacementPosition?: never;
|
|
102
|
+
}) | ({
|
|
103
|
+
modelValue?: boolean;
|
|
104
|
+
} & {
|
|
105
|
+
role?: import('../../overlays/Popover').KdsPopoverRole;
|
|
106
|
+
popoverType?: import('../../overlays/Popover').KdsPopoverType;
|
|
107
|
+
fullWidth?: boolean;
|
|
108
|
+
maxInlineSize?: string;
|
|
109
|
+
content?: string;
|
|
110
|
+
} & {
|
|
111
|
+
placement: "custom";
|
|
112
|
+
customPlacementPosition: {
|
|
113
|
+
x: number;
|
|
114
|
+
y: number;
|
|
115
|
+
};
|
|
116
|
+
})> & Readonly<{
|
|
117
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
118
|
+
}>, {
|
|
119
|
+
anchorStyle: Record<string, string>;
|
|
120
|
+
popoverId: string;
|
|
121
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
122
|
+
"update:modelValue": (value: boolean) => any;
|
|
123
|
+
}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
124
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
125
|
+
created?: (() => void) | (() => void)[];
|
|
126
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
127
|
+
mounted?: (() => void) | (() => void)[];
|
|
128
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
129
|
+
updated?: (() => void) | (() => void)[];
|
|
130
|
+
activated?: (() => void) | (() => void)[];
|
|
131
|
+
deactivated?: (() => void) | (() => void)[];
|
|
132
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
133
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
134
|
+
destroyed?: (() => void) | (() => void)[];
|
|
135
|
+
unmounted?: (() => void) | (() => void)[];
|
|
136
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
137
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
138
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
139
|
+
};
|
|
140
|
+
$forceUpdate: () => void;
|
|
141
|
+
$nextTick: typeof nextTick;
|
|
142
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
143
|
+
} & Readonly<{}> & Omit<{} & (Readonly<({
|
|
144
|
+
modelValue?: boolean;
|
|
145
|
+
} & {
|
|
146
|
+
role?: import('../../overlays/Popover').KdsPopoverRole;
|
|
147
|
+
popoverType?: import('../../overlays/Popover').KdsPopoverType;
|
|
148
|
+
fullWidth?: boolean;
|
|
149
|
+
maxInlineSize?: string;
|
|
150
|
+
content?: string;
|
|
151
|
+
} & {
|
|
152
|
+
placement?: Exclude<import('../../overlays/Popover').KdsPopoverPlacement, "custom">;
|
|
153
|
+
customPlacementPosition?: never;
|
|
154
|
+
}) | ({
|
|
155
|
+
modelValue?: boolean;
|
|
156
|
+
} & {
|
|
157
|
+
role?: import('../../overlays/Popover').KdsPopoverRole;
|
|
158
|
+
popoverType?: import('../../overlays/Popover').KdsPopoverType;
|
|
159
|
+
fullWidth?: boolean;
|
|
160
|
+
maxInlineSize?: string;
|
|
161
|
+
content?: string;
|
|
162
|
+
} & {
|
|
163
|
+
placement: "custom";
|
|
164
|
+
customPlacementPosition: {
|
|
165
|
+
x: number;
|
|
166
|
+
y: number;
|
|
167
|
+
};
|
|
168
|
+
})> & Readonly<{
|
|
169
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
170
|
+
}>), "anchorStyle" | "popoverId"> & {
|
|
171
|
+
anchorStyle: Record<string, string>;
|
|
172
|
+
popoverId: string;
|
|
173
|
+
} & {} & import('vue').ComponentCustomProperties & {} & {
|
|
174
|
+
$slots: {
|
|
175
|
+
default?(_: {}): any;
|
|
176
|
+
};
|
|
177
|
+
}) | null;
|
|
178
|
+
menuContainer: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('../MenuContainer').KdsMenuContainerProps> & Readonly<{
|
|
179
|
+
onItemClick?: ((id: string) => any) | undefined;
|
|
180
|
+
}>, {
|
|
181
|
+
focus: () => void;
|
|
182
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
183
|
+
itemClick: (id: string) => any;
|
|
184
|
+
}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
185
|
+
containerEl: HTMLDivElement;
|
|
186
|
+
}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
187
|
+
P: {};
|
|
188
|
+
B: {};
|
|
189
|
+
D: {};
|
|
190
|
+
C: {};
|
|
191
|
+
M: {};
|
|
192
|
+
Defaults: {};
|
|
193
|
+
}, Readonly<import('../MenuContainer').KdsMenuContainerProps> & Readonly<{
|
|
194
|
+
onItemClick?: ((id: string) => any) | undefined;
|
|
195
|
+
}>, {
|
|
196
|
+
focus: () => void;
|
|
197
|
+
}, {}, {}, {}, {}> | null;
|
|
198
|
+
};
|
|
199
|
+
rootEl: any;
|
|
200
|
+
};
|
|
201
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
202
|
+
declare const __VLS_component: import('vue').DefineComponent<KdsMenuProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
203
|
+
itemClick: (id: string) => any;
|
|
204
|
+
}, string, import('vue').PublicProps, Readonly<KdsMenuProps> & Readonly<{
|
|
205
|
+
onItemClick?: ((id: string) => any) | undefined;
|
|
206
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
207
|
+
popover: ({
|
|
208
|
+
$: import('vue').ComponentInternalInstance;
|
|
209
|
+
$data: {};
|
|
210
|
+
$props: ({
|
|
211
|
+
readonly modelValue?: boolean | undefined;
|
|
212
|
+
readonly role?: import('../../overlays/Popover').KdsPopoverRole | undefined;
|
|
213
|
+
readonly popoverType?: import('../../overlays/Popover').KdsPopoverType | undefined;
|
|
214
|
+
readonly fullWidth?: boolean | undefined;
|
|
215
|
+
readonly maxInlineSize?: string | undefined;
|
|
216
|
+
readonly content?: string | undefined;
|
|
217
|
+
readonly placement?: Exclude<import('../../overlays/Popover').KdsPopoverPlacement, "custom"> | undefined;
|
|
218
|
+
readonly customPlacementPosition?: never | undefined;
|
|
219
|
+
readonly "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
220
|
+
} | {
|
|
221
|
+
readonly modelValue?: boolean | undefined;
|
|
222
|
+
readonly role?: import('../../overlays/Popover').KdsPopoverRole | undefined;
|
|
223
|
+
readonly popoverType?: import('../../overlays/Popover').KdsPopoverType | undefined;
|
|
224
|
+
readonly fullWidth?: boolean | undefined;
|
|
225
|
+
readonly maxInlineSize?: string | undefined;
|
|
226
|
+
readonly content?: string | undefined;
|
|
227
|
+
readonly placement: "custom";
|
|
228
|
+
readonly customPlacementPosition: {
|
|
229
|
+
x: number;
|
|
230
|
+
y: number;
|
|
231
|
+
};
|
|
232
|
+
readonly "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
233
|
+
}) & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
234
|
+
$attrs: import('vue').Attrs;
|
|
235
|
+
$refs: {
|
|
236
|
+
[x: string]: unknown;
|
|
237
|
+
} & {
|
|
238
|
+
popoverEl: HTMLDivElement;
|
|
239
|
+
};
|
|
240
|
+
$slots: Readonly<{
|
|
241
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
|
242
|
+
}>;
|
|
243
|
+
$root: import('vue').ComponentPublicInstance | null;
|
|
244
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
|
245
|
+
$host: Element | null;
|
|
246
|
+
$emit: (event: "update:modelValue", value: boolean) => void;
|
|
247
|
+
$el: HTMLDivElement;
|
|
248
|
+
$options: import('vue').ComponentOptionsBase<Readonly<({
|
|
249
|
+
modelValue?: boolean;
|
|
250
|
+
} & {
|
|
251
|
+
role?: import('../../overlays/Popover').KdsPopoverRole;
|
|
252
|
+
popoverType?: import('../../overlays/Popover').KdsPopoverType;
|
|
253
|
+
fullWidth?: boolean;
|
|
254
|
+
maxInlineSize?: string;
|
|
255
|
+
content?: string;
|
|
256
|
+
} & {
|
|
257
|
+
placement?: Exclude<import('../../overlays/Popover').KdsPopoverPlacement, "custom">;
|
|
258
|
+
customPlacementPosition?: never;
|
|
259
|
+
}) | ({
|
|
260
|
+
modelValue?: boolean;
|
|
261
|
+
} & {
|
|
262
|
+
role?: import('../../overlays/Popover').KdsPopoverRole;
|
|
263
|
+
popoverType?: import('../../overlays/Popover').KdsPopoverType;
|
|
264
|
+
fullWidth?: boolean;
|
|
265
|
+
maxInlineSize?: string;
|
|
266
|
+
content?: string;
|
|
267
|
+
} & {
|
|
268
|
+
placement: "custom";
|
|
269
|
+
customPlacementPosition: {
|
|
270
|
+
x: number;
|
|
271
|
+
y: number;
|
|
272
|
+
};
|
|
273
|
+
})> & Readonly<{
|
|
274
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
275
|
+
}>, {
|
|
276
|
+
anchorStyle: Record<string, string>;
|
|
277
|
+
popoverId: string;
|
|
278
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
279
|
+
"update:modelValue": (value: boolean) => any;
|
|
280
|
+
}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
281
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
282
|
+
created?: (() => void) | (() => void)[];
|
|
283
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
284
|
+
mounted?: (() => void) | (() => void)[];
|
|
285
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
286
|
+
updated?: (() => void) | (() => void)[];
|
|
287
|
+
activated?: (() => void) | (() => void)[];
|
|
288
|
+
deactivated?: (() => void) | (() => void)[];
|
|
289
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
290
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
291
|
+
destroyed?: (() => void) | (() => void)[];
|
|
292
|
+
unmounted?: (() => void) | (() => void)[];
|
|
293
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
294
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
295
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
296
|
+
};
|
|
297
|
+
$forceUpdate: () => void;
|
|
298
|
+
$nextTick: typeof nextTick;
|
|
299
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
300
|
+
} & Readonly<{}> & Omit<{} & (Readonly<({
|
|
301
|
+
modelValue?: boolean;
|
|
302
|
+
} & {
|
|
303
|
+
role?: import('../../overlays/Popover').KdsPopoverRole;
|
|
304
|
+
popoverType?: import('../../overlays/Popover').KdsPopoverType;
|
|
305
|
+
fullWidth?: boolean;
|
|
306
|
+
maxInlineSize?: string;
|
|
307
|
+
content?: string;
|
|
308
|
+
} & {
|
|
309
|
+
placement?: Exclude<import('../../overlays/Popover').KdsPopoverPlacement, "custom">;
|
|
310
|
+
customPlacementPosition?: never;
|
|
311
|
+
}) | ({
|
|
312
|
+
modelValue?: boolean;
|
|
313
|
+
} & {
|
|
314
|
+
role?: import('../../overlays/Popover').KdsPopoverRole;
|
|
315
|
+
popoverType?: import('../../overlays/Popover').KdsPopoverType;
|
|
316
|
+
fullWidth?: boolean;
|
|
317
|
+
maxInlineSize?: string;
|
|
318
|
+
content?: string;
|
|
319
|
+
} & {
|
|
320
|
+
placement: "custom";
|
|
321
|
+
customPlacementPosition: {
|
|
322
|
+
x: number;
|
|
323
|
+
y: number;
|
|
324
|
+
};
|
|
325
|
+
})> & Readonly<{
|
|
326
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
327
|
+
}>), "anchorStyle" | "popoverId"> & {
|
|
328
|
+
anchorStyle: Record<string, string>;
|
|
329
|
+
popoverId: string;
|
|
330
|
+
} & {} & import('vue').ComponentCustomProperties & {} & {
|
|
331
|
+
$slots: {
|
|
332
|
+
default?(_: {}): any;
|
|
333
|
+
};
|
|
334
|
+
}) | null;
|
|
335
|
+
menuContainer: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('../MenuContainer').KdsMenuContainerProps> & Readonly<{
|
|
336
|
+
onItemClick?: ((id: string) => any) | undefined;
|
|
337
|
+
}>, {
|
|
338
|
+
focus: () => void;
|
|
339
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
340
|
+
itemClick: (id: string) => any;
|
|
341
|
+
}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
342
|
+
containerEl: HTMLDivElement;
|
|
343
|
+
}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
344
|
+
P: {};
|
|
345
|
+
B: {};
|
|
346
|
+
D: {};
|
|
347
|
+
C: {};
|
|
348
|
+
M: {};
|
|
349
|
+
Defaults: {};
|
|
350
|
+
}, Readonly<import('../MenuContainer').KdsMenuContainerProps> & Readonly<{
|
|
351
|
+
onItemClick?: ((id: string) => any) | undefined;
|
|
352
|
+
}>, {
|
|
353
|
+
focus: () => void;
|
|
354
|
+
}, {}, {}, {}, {}> | null;
|
|
355
|
+
}, any>;
|
|
356
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
357
|
+
export default _default;
|
|
358
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
359
|
+
new (): {
|
|
360
|
+
$slots: S;
|
|
361
|
+
};
|
|
362
|
+
};
|
|
363
|
+
//# sourceMappingURL=KdsMenu.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KdsMenu.vue.d.ts","sourceRoot":"","sources":["../../../../src/containers/Menu/KdsMenu.vue"],"names":[],"mappings":"AAsIA,OAAO,EACL,KAAK,SAAS,EAEd,QAAQ,EAKT,MAAM,KAAK,CAAC;AAOb,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAsC5C,QAAA,MAAM,kBAAkB,oCAAmC,CAAC;AAE5D,QAAA,MAAM,IAAI,YAET,CAAC;AAEF,QAAA,MAAM,KAAK,YAEV,CAAC;AAEF,QAAA,MAAM,MAAM,YAEX,CAAC;AAEF,QAAA,MAAM,KAAK;;;;;;;;;EAeT,CAAC;AAEH,KAAK,aAAa,GAAG;IACnB,KAAK,EAAE,SAAS,CAAC,OAAO,KAAK,CAAC,CAAC;IAC/B,MAAM,EAAE,SAAS,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAC7C,IAAI,EAAE,OAAO,IAAI,CAAC;IAClB,KAAK,EAAE,OAAO,KAAK,CAAC;IACpB,MAAM,EAAE,OAAO,MAAM,CAAC;CACvB,CAAC;AAiBF,iBAAS,cAAc;WA8ET,OAAO,IAA6B;;QA5FhD;;;;;;;;WAQG;uBACY,aAAa,GAAG,OAAO;;QATtC;;;;;;;;WAQG;uBACY,aAAa,GAAG,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAmIw0gB,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA3Cr+gB;AAmBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAuB21gB,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAfp+gB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/containers/Menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,eAAe,CAAC;AACnD,mBAAmB,SAAS,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { KdsListItemVariant } from '../ListItem/KdsListItem';
|
|
2
|
+
import { KdsMenuItem } from '../MenuContainer/types';
|
|
3
|
+
export type KdsMenuProps = {
|
|
4
|
+
/** Menu items rendered in the list */
|
|
5
|
+
items: KdsMenuItem[];
|
|
6
|
+
/** Limits the height of the menu container */
|
|
7
|
+
menuMaxHeight?: string;
|
|
8
|
+
/** Size variant for all the items in this container */
|
|
9
|
+
variant?: KdsListItemVariant;
|
|
10
|
+
/** Accessible label for the menu. Defaults to "Menu". */
|
|
11
|
+
ariaLabel?: string;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/containers/Menu/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE1D,MAAM,MAAM,YAAY,GAAG;IACzB,sCAAsC;IACtC,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,8CAA8C;IAC9C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,uDAAuD;IACvD,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC"}
|
|
@@ -6,34 +6,7 @@ declare const _default: import('vue').DefineComponent<KdsMenuContainerProps, {
|
|
|
6
6
|
}, string, import('vue').PublicProps, Readonly<KdsMenuContainerProps> & Readonly<{
|
|
7
7
|
onItemClick?: ((id: string) => any) | undefined;
|
|
8
8
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
9
|
-
|
|
10
|
-
onItemClick?: ((id?: string | undefined) => any) | undefined;
|
|
11
|
-
}>, {
|
|
12
|
-
handleKeydown: (event: KeyboardEvent) => void;
|
|
13
|
-
handleFocus: () => void;
|
|
14
|
-
handleBlur: () => void;
|
|
15
|
-
activeDescendant: Readonly<import('vue').Ref<string | undefined>>;
|
|
16
|
-
focus: () => void;
|
|
17
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
18
|
-
itemClick: (id?: string | undefined) => any;
|
|
19
|
-
}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
20
|
-
containerEl: HTMLDivElement;
|
|
21
|
-
}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
22
|
-
P: {};
|
|
23
|
-
B: {};
|
|
24
|
-
D: {};
|
|
25
|
-
C: {};
|
|
26
|
-
M: {};
|
|
27
|
-
Defaults: {};
|
|
28
|
-
}, Readonly<import('..').KdsListContainerProps> & Readonly<{
|
|
29
|
-
onItemClick?: ((id?: string | undefined) => any) | undefined;
|
|
30
|
-
}>, {
|
|
31
|
-
handleKeydown: (event: KeyboardEvent) => void;
|
|
32
|
-
handleFocus: () => void;
|
|
33
|
-
handleBlur: () => void;
|
|
34
|
-
activeDescendant: Readonly<import('vue').Ref<string | undefined>>;
|
|
35
|
-
focus: () => void;
|
|
36
|
-
}, {}, {}, {}, {}> | null;
|
|
9
|
+
containerEl: HTMLDivElement;
|
|
37
10
|
}, HTMLDivElement>;
|
|
38
11
|
export default _default;
|
|
39
12
|
//# sourceMappingURL=KdsMenuContainer.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KdsMenuContainer.vue.d.ts","sourceRoot":"","sources":["../../../../src/containers/MenuContainer/KdsMenuContainer.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"KdsMenuContainer.vue.d.ts","sourceRoot":"","sources":["../../../../src/containers/MenuContainer/KdsMenuContainer.vue"],"names":[],"mappings":"AAoIA,OAAO,KAAK,EAEV,qBAAqB,EAEtB,MAAM,SAAS,CAAC;;;;;;;;;;AA0JjB,wBAUG"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { KdsMenuContainerProps, KdsMenuItem } from './types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
item: KdsMenuItem;
|
|
4
|
+
activeId: string | undefined;
|
|
5
|
+
isLast: boolean;
|
|
6
|
+
variant?: KdsMenuContainerProps["variant"];
|
|
7
|
+
};
|
|
8
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
9
|
+
click: (event: MouseEvent) => any;
|
|
10
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
+
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
12
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
export default _default;
|
|
14
|
+
//# sourceMappingURL=KdsMenuItem.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KdsMenuItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/containers/MenuContainer/KdsMenuItem.vue"],"names":[],"mappings":"AA0DA,OAAO,KAAK,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAElE,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,WAAW,CAAC;IAClB,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,qBAAqB,CAAC,SAAS,CAAC,CAAC;CAC5C,CAAC;;;;;;AAuHF,wBAOG"}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
import { KdsIconName } from '../../accessories';
|
|
1
|
+
import { KdsBadgeVariant, KdsIconName } from '../../accessories';
|
|
2
|
+
import { KdsListItemVariant } from '../ListItem/KdsListItem';
|
|
2
3
|
import { KdsAvatarAccessory, KdsIconAccessory, KdsLiveStatusAccessory } from '../ListItem/ListItemAccessory/types';
|
|
3
4
|
type KdsMenuItemAccessory = KdsIconAccessory | KdsLiveStatusAccessory | KdsAvatarAccessory;
|
|
4
5
|
export type KdsMenuItem = {
|
|
5
6
|
id: string;
|
|
7
|
+
/** Main text to show in the item */
|
|
8
|
+
text: string;
|
|
9
|
+
/** Optional subtext shown below the main label (multiline list item layout) */
|
|
10
|
+
subText?: string;
|
|
6
11
|
/** Optional leading icon shown before a section headline */
|
|
7
12
|
sectionHeadlineIcon?: KdsIconName;
|
|
8
13
|
/**
|
|
@@ -11,15 +16,26 @@ export type KdsMenuItem = {
|
|
|
11
16
|
* during keyboard navigation and cannot be clicked.
|
|
12
17
|
*/
|
|
13
18
|
sectionHeadline?: boolean;
|
|
14
|
-
/** Disables
|
|
19
|
+
/** Disables interaction and dims the content. */
|
|
15
20
|
disabled?: boolean;
|
|
16
21
|
/** Optional leading accessory (icon, data type, or color swatch) shown before the text */
|
|
17
22
|
accessory?: KdsMenuItemAccessory;
|
|
18
|
-
text: string;
|
|
19
|
-
/** Optional subtext shown below the main label (multiline list item layout) */
|
|
20
|
-
subText?: string;
|
|
21
23
|
/** Show a separator below the item if it's not the last in the list */
|
|
22
24
|
separator?: boolean;
|
|
25
|
+
/** Optional shortcut text shown at the end of the row (e.g. "Ctrl + 1"). Only shown for regular items (not headlines) */
|
|
26
|
+
shortcut?: string;
|
|
27
|
+
/**
|
|
28
|
+
* `KdsBadge` to show on the item. Only rendered for regular items (not headlines) and when a shortcut is not passed in to this item
|
|
29
|
+
*/
|
|
30
|
+
badge?: {
|
|
31
|
+
label: string;
|
|
32
|
+
variant?: KdsBadgeVariant;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Interaction handler callback. This will run whenever the item is interacted with, whether that is
|
|
36
|
+
* via a mouse event or a keyboard event
|
|
37
|
+
*/
|
|
38
|
+
handler?: (item: KdsMenuItem, event: MouseEvent | KeyboardEvent) => void;
|
|
23
39
|
};
|
|
24
40
|
export type KdsMenuContainerProps = {
|
|
25
41
|
/** id of the menu to be linked via aria-controls */
|
|
@@ -30,6 +46,8 @@ export type KdsMenuContainerProps = {
|
|
|
30
46
|
items: KdsMenuItem[];
|
|
31
47
|
/** Limits the height of the menu container */
|
|
32
48
|
menuMaxHeight?: string;
|
|
49
|
+
/** Size variant for all the items in this container */
|
|
50
|
+
variant?: KdsListItemVariant;
|
|
33
51
|
};
|
|
34
52
|
export type KdsMenuContainerExpose = {
|
|
35
53
|
/** Moves focus to the menu list */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/containers/MenuContainer/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/containers/MenuContainer/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EACV,kBAAkB,EAClB,gBAAgB,EAChB,sBAAsB,EACvB,MAAM,qCAAqC,CAAC;AAE7C,KAAK,oBAAoB,GACrB,gBAAgB,GAChB,sBAAsB,GACtB,kBAAkB,CAAC;AAEvB,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,oCAAoC;IACpC,IAAI,EAAE,MAAM,CAAC;IAEb,+EAA+E;IAC/E,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,4DAA4D;IAC5D,mBAAmB,CAAC,EAAE,WAAW,CAAC;IAElC;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B,iDAAiD;IACjD,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,0FAA0F;IAC1F,SAAS,CAAC,EAAE,oBAAoB,CAAC;IAEjC,uEAAuE;IACvE,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,yHAAyH;IACzH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,KAAK,CAAC,EAAE;QACN,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,eAAe,CAAC;KAC3B,CAAC;IAEF;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,UAAU,GAAG,aAAa,KAAK,IAAI,CAAC;CAC1E,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,oDAAoD;IACpD,EAAE,EAAE,MAAM,CAAC;IACX,oCAAoC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,8CAA8C;IAC9C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,uDAAuD;IACvD,OAAO,CAAC,EAAE,kBAAkB,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,mCAAmC;IACnC,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ComputedRef, MaybeRefOrGetter, ShallowRef } from 'vue';
|
|
2
|
+
type ItemWithId = {
|
|
3
|
+
id: string;
|
|
4
|
+
};
|
|
5
|
+
type Options<T extends ItemWithId> = {
|
|
6
|
+
containerEl: ShallowRef<HTMLElement | null>;
|
|
7
|
+
selectableItems: ComputedRef<Array<T>>;
|
|
8
|
+
enabledItems: ComputedRef<Array<T>>;
|
|
9
|
+
listItemRole: MaybeRefOrGetter<"menuitem" | "option">;
|
|
10
|
+
allowNoSelection?: boolean;
|
|
11
|
+
emptyOptionId?: string;
|
|
12
|
+
loading?: boolean;
|
|
13
|
+
triggers?: {
|
|
14
|
+
onEnter?: (activeItemId: string, item: T, event: KeyboardEvent) => void;
|
|
15
|
+
onSpace?: (activeItemId: string, item: T, event: KeyboardEvent) => void;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export declare const useListItemKeyboardNav: <T extends ItemWithId>(options: Options<T>) => {
|
|
19
|
+
handleKeydown: (event: KeyboardEvent) => void;
|
|
20
|
+
activeId: Readonly<import('vue').Ref<string | undefined, string | undefined>>;
|
|
21
|
+
focus: () => void;
|
|
22
|
+
blur: () => void;
|
|
23
|
+
setActiveId: (id: string | undefined) => void;
|
|
24
|
+
scrollSelectedIntoView: () => void;
|
|
25
|
+
};
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=useListItemKeyboardNav.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useListItemKeyboardNav.d.ts","sourceRoot":"","sources":["../../../../src/containers/_helpers/useListItemKeyboardNav.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,UAAU,EAShB,MAAM,KAAK,CAAC;AAEb,KAAK,UAAU,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjC,KAAK,OAAO,CAAC,CAAC,SAAS,UAAU,IAAI;IACnC,WAAW,EAAE,UAAU,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAC5C,eAAe,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACvC,YAAY,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACpC,YAAY,EAAE,gBAAgB,CAAC,UAAU,GAAG,QAAQ,CAAC,CAAC;IAEtD,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,QAAQ,CAAC,EAAE;QACT,OAAO,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;QACxE,OAAO,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;KACzE,CAAC;CACH,CAAC;AASF,eAAO,MAAM,sBAAsB,GAAI,CAAC,SAAS,UAAU,EACzD,SAAS,OAAO,CAAC,CAAC,CAAC;2BAwGW,aAAa;;;;sBAqElB,MAAM,GAAG,SAAS;;CAmD5C,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
type ItemWithId = {
|
|
3
|
+
id: string;
|
|
4
|
+
};
|
|
5
|
+
type Options<T extends ItemWithId> = {
|
|
6
|
+
items: Ref<Array<T>>;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* This composable adds prefixes to the ids of the given list of items.
|
|
10
|
+
* This is to ensure uniqueness of these values, which is especially relevant when
|
|
11
|
+
* binding them to DOM id attributes
|
|
12
|
+
*/
|
|
13
|
+
export declare const useStableItemIds: <T extends ItemWithId>(options: Options<T>) => {
|
|
14
|
+
itemsWithPrefix: import('vue').ComputedRef<T[]>;
|
|
15
|
+
idPrefix: string;
|
|
16
|
+
toUnprefixedId: (elementId?: string) => string | undefined;
|
|
17
|
+
};
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=useStableItemIds.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useStableItemIds.d.ts","sourceRoot":"","sources":["../../../../src/containers/_helpers/useStableItemIds.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,GAAG,EAA0B,MAAM,KAAK,CAAC;AAEvD,KAAK,UAAU,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjC,KAAK,OAAO,CAAC,CAAC,SAAS,UAAU,IAAI;IACnC,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;CACtB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAAI,CAAC,SAAS,UAAU,EAAE,SAAS,OAAO,CAAC,CAAC,CAAC;;;iCAkDpC,MAAM;CAK3C,CAAC"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export * from './ListContainer';
|
|
2
2
|
export type * from './ListContainer';
|
|
3
|
-
export * from './
|
|
4
|
-
export type * from './
|
|
3
|
+
export * from './Menu';
|
|
4
|
+
export type * from './Menu';
|
|
5
|
+
export * from './ContextMenu';
|
|
6
|
+
export type * from './ContextMenu';
|
|
7
|
+
export type { KdsMenuItem } from './MenuContainer/types';
|
|
5
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/containers/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,mBAAmB,iBAAiB,CAAC;AAErC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/containers/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,mBAAmB,iBAAiB,CAAC;AAErC,cAAc,QAAQ,CAAC;AACvB,mBAAmB,QAAQ,CAAC;AAE5B,cAAc,eAAe,CAAC;AAC9B,mBAAmB,eAAe,CAAC;AAEnC,YAAY,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC"}
|