@db-ux/v-core-components 2.0.0-0-custom-select-16b8cce → 2.0.1

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.
Files changed (63) hide show
  1. package/dist/components/accordion/accordion.vue.d.ts +33 -8
  2. package/dist/components/accordion/model.d.ts +2 -2
  3. package/dist/components/accordion-item/accordion-item.vue.d.ts +40 -8
  4. package/dist/components/accordion-item/model.d.ts +5 -5
  5. package/dist/components/badge/badge.vue.d.ts +30 -8
  6. package/dist/components/badge/model.d.ts +2 -2
  7. package/dist/components/brand/brand.vue.d.ts +27 -6
  8. package/dist/components/button/button.vue.d.ts +54 -15
  9. package/dist/components/button/model.d.ts +11 -7
  10. package/dist/components/card/card.vue.d.ts +30 -9
  11. package/dist/components/checkbox/checkbox.vue.d.ts +83 -20
  12. package/dist/components/checkbox/model.d.ts +3 -3
  13. package/dist/components/custom-select/custom-select.vue.d.ts +221 -22
  14. package/dist/components/custom-select/model.d.ts +49 -29
  15. package/dist/components/custom-select-dropdown/custom-select-dropdown.vue.d.ts +20 -5
  16. package/dist/components/custom-select-form-field/custom-select-form-field.vue.d.ts +18 -4
  17. package/dist/components/custom-select-list/custom-select-list.vue.d.ts +20 -4
  18. package/dist/components/custom-select-list-item/custom-select-list-item.vue.d.ts +53 -12
  19. package/dist/components/divider/divider.vue.d.ts +3 -3
  20. package/dist/components/drawer/drawer.vue.d.ts +47 -13
  21. package/dist/components/drawer/model.d.ts +2 -2
  22. package/dist/components/header/header.vue.d.ts +57 -13
  23. package/dist/components/header/model.d.ts +2 -2
  24. package/dist/components/icon/icon.vue.d.ts +25 -7
  25. package/dist/components/infotext/infotext.vue.d.ts +28 -8
  26. package/dist/components/input/input.vue.d.ts +131 -33
  27. package/dist/components/input/model.d.ts +3 -3
  28. package/dist/components/link/link.vue.d.ts +48 -14
  29. package/dist/components/navigation/navigation.vue.d.ts +21 -4
  30. package/dist/components/navigation-item/model.d.ts +6 -3
  31. package/dist/components/navigation-item/navigation-item.vue.d.ts +76 -12
  32. package/dist/components/notification/model.d.ts +3 -3
  33. package/dist/components/notification/notification.vue.d.ts +58 -17
  34. package/dist/components/page/model.d.ts +1 -1
  35. package/dist/components/page/page.vue.d.ts +32 -9
  36. package/dist/components/popover/model.d.ts +1 -1
  37. package/dist/components/popover/popover.vue.d.ts +40 -13
  38. package/dist/components/radio/radio.vue.d.ts +56 -17
  39. package/dist/components/section/section.vue.d.ts +24 -6
  40. package/dist/components/select/model.d.ts +2 -2
  41. package/dist/components/select/select.vue.d.ts +106 -24
  42. package/dist/components/stack/model.d.ts +1 -1
  43. package/dist/components/stack/stack.vue.d.ts +31 -10
  44. package/dist/components/switch/model.d.ts +2 -2
  45. package/dist/components/switch/switch.vue.d.ts +67 -21
  46. package/dist/components/tab-item/model.d.ts +6 -6
  47. package/dist/components/tab-item/tab-item.vue.d.ts +52 -14
  48. package/dist/components/tab-list/tab-list.vue.d.ts +20 -4
  49. package/dist/components/tab-panel/tab-panel.vue.d.ts +20 -4
  50. package/dist/components/tabs/model.d.ts +11 -3
  51. package/dist/components/tabs/tabs.vue.d.ts +60 -15
  52. package/dist/components/tag/model.d.ts +9 -5
  53. package/dist/components/tag/tag.vue.d.ts +49 -15
  54. package/dist/components/textarea/model.d.ts +4 -4
  55. package/dist/components/textarea/textarea.vue.d.ts +24 -23
  56. package/dist/components/tooltip/model.d.ts +1 -1
  57. package/dist/components/tooltip/tooltip.vue.d.ts +37 -11
  58. package/dist/db-ux.es.js +1969 -1812
  59. package/dist/db-ux.umd.js +1 -1
  60. package/dist/shared/model.d.ts +56 -31
  61. package/dist/utils/document-click-listener.d.ts +8 -0
  62. package/dist/utils/index.d.ts +5 -28
  63. package/package.json +8 -7
@@ -1,5 +1,154 @@
1
- import { DBCustomSelectProps, CustomSelectOptionType } from "./model";
2
- declare const _default: __VLS_WithSlots<import("vue").DefineComponent<DBCustomSelectProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
1
+ import { DBCustomSelectProps, DBCustomSelectState, CustomSelectOptionType } from "./model";
2
+ import { cls, getBoolean, getBooleanAsString, getHideProp, stringPropVisible } from "../../utils";
3
+ import { DEFAULT_CLOSE_BUTTON, DEFAULT_LABEL, DEFAULT_MESSAGE, DEFAULT_VALID_MESSAGE } from "../../shared/constants";
4
+ import DBCustomSelectList from "../custom-select-list/custom-select-list.vue";
5
+ import DBCustomSelectListItem from "../custom-select-list-item/custom-select-list-item.vue";
6
+ import DBCustomSelectDropdown from "../custom-select-dropdown/custom-select-dropdown.vue";
7
+ import DBInfotext from "../infotext/infotext.vue";
8
+ import DBTag from "../tag/tag.vue";
9
+ import DBButton from "../button/button.vue";
10
+ import DBTooltip from "../tooltip/tooltip.vue";
11
+ import DBInput from "../input/input.vue";
12
+ declare const _id: import("vue").Ref<string | undefined, string | undefined>;
13
+ declare const _messageId: import("vue").Ref<string | undefined, string | undefined>;
14
+ declare const _validMessageId: import("vue").Ref<string | undefined, string | undefined>;
15
+ declare const _invalidMessageId: import("vue").Ref<string | undefined, string | undefined>;
16
+ declare const _invalidMessage: import("vue").Ref<string | undefined, string | undefined>;
17
+ declare const _selectId: import("vue").Ref<string | undefined, string | undefined>;
18
+ declare const _labelId: import("vue").Ref<string | undefined, string | undefined>;
19
+ declare const _summaryId: import("vue").Ref<string | undefined, string | undefined>;
20
+ declare const _placeholderId: import("vue").Ref<string | undefined, string | undefined>;
21
+ declare const _infoTextId: import("vue").Ref<string | undefined, string | undefined>;
22
+ declare const _validity: import("vue").Ref<"invalid" | "valid" | "no-validation" | undefined, "invalid" | "valid" | "no-validation" | undefined>;
23
+ declare const _selectedLabels: import("vue").Ref<string | undefined, string | undefined>;
24
+ declare const _selectedLabelsId: import("vue").Ref<string | undefined, string | undefined>;
25
+ declare const _voiceOverFallback: import("vue").Ref<string | undefined, string | undefined>;
26
+ declare const _selectedOptions: import("vue").Ref<{
27
+ disabled?: boolean | undefined;
28
+ id?: string | undefined;
29
+ label?: string | undefined;
30
+ value?: string | undefined;
31
+ isGroupTitle?: boolean | undefined;
32
+ showDivider?: boolean | undefined;
33
+ icon?: import("@db-ux/core-foundations").IconTypes | undefined;
34
+ showIcon?: boolean | string | undefined;
35
+ }[] | undefined, CustomSelectOptionType[] | {
36
+ disabled?: boolean | undefined;
37
+ id?: string | undefined;
38
+ label?: string | undefined;
39
+ value?: string | undefined;
40
+ isGroupTitle?: boolean | undefined;
41
+ showDivider?: boolean | undefined;
42
+ icon?: import("@db-ux/core-foundations").IconTypes | undefined;
43
+ showIcon?: boolean | string | undefined;
44
+ }[] | undefined>;
45
+ declare const selectAllEnabled: import("vue").Ref<boolean, boolean>;
46
+ declare const searchEnabled: import("vue").Ref<boolean, boolean>;
47
+ declare const _values: import("vue").Ref<string[] | undefined, string[] | undefined>;
48
+ declare const _options: import("vue").Ref<{
49
+ disabled?: boolean | undefined;
50
+ id?: string | undefined;
51
+ label?: string | undefined;
52
+ value?: string | undefined;
53
+ isGroupTitle?: boolean | undefined;
54
+ showDivider?: boolean | undefined;
55
+ icon?: import("@db-ux/core-foundations").IconTypes | undefined;
56
+ showIcon?: boolean | string | undefined;
57
+ }[] | undefined, CustomSelectOptionType[] | {
58
+ disabled?: boolean | undefined;
59
+ id?: string | undefined;
60
+ label?: string | undefined;
61
+ value?: string | undefined;
62
+ isGroupTitle?: boolean | undefined;
63
+ showDivider?: boolean | undefined;
64
+ icon?: import("@db-ux/core-foundations").IconTypes | undefined;
65
+ showIcon?: boolean | string | undefined;
66
+ }[] | undefined>;
67
+ declare const _hasNoOptions: import("vue").Ref<boolean, boolean>;
68
+ declare const selectAllChecked: import("vue").Ref<boolean, boolean>;
69
+ declare const _ref: import("vue").Ref<any, any>;
70
+ declare const detailsRef: import("vue").Ref<any, any>;
71
+ declare const selectRef: import("vue").Ref<any, any>;
72
+ declare const selectAllRef: import("vue").Ref<any, any>;
73
+ declare const searchInputRef: import("vue").Ref<any, any>;
74
+ declare function hasValidState(): ReturnType<DBCustomSelectState["hasValidState"]>;
75
+ declare function handleDropdownToggle(event: any): ReturnType<DBCustomSelectState["handleDropdownToggle"]>;
76
+ declare function getSelectAllLabel(): ReturnType<DBCustomSelectState["getSelectAllLabel"]>;
77
+ declare function getOptionLabel(option: CustomSelectOptionType): ReturnType<DBCustomSelectState["getOptionLabel"]>;
78
+ declare function getOptionChecked(value?: string): ReturnType<DBCustomSelectState["getOptionChecked"]>;
79
+ declare function getTagRemoveLabel(index: number): ReturnType<DBCustomSelectState["getTagRemoveLabel"]>;
80
+ declare function handleTagRemove(option: CustomSelectOptionType, event: any): ReturnType<DBCustomSelectState["handleTagRemove"]>;
81
+ declare function handleKeyboardPress(event: any): ReturnType<DBCustomSelectState["handleKeyboardPress"]>;
82
+ declare function handleClose(event: any): ReturnType<DBCustomSelectState["handleClose"]>;
83
+ declare function handleSelect(value?: string): ReturnType<DBCustomSelectState["handleSelect"]>;
84
+ declare function handleSelectAll(): ReturnType<DBCustomSelectState["handleSelectAll"]>;
85
+ declare function handleSearch(event: any): ReturnType<DBCustomSelectState["handleSearch"]>;
86
+ declare function handleClearAll(): ReturnType<DBCustomSelectState["handleClearAll"]>;
87
+ declare function satisfyReact(): void;
88
+ declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
89
+ declare var __VLS_1: {};
90
+ type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
91
+ default?: (props: typeof __VLS_1) => any;
92
+ }>;
93
+ declare const __VLS_self: import("vue").DefineComponent<DBCustomSelectProps, {
94
+ cls: typeof cls;
95
+ getBoolean: typeof getBoolean;
96
+ getBooleanAsString: typeof getBooleanAsString;
97
+ getHideProp: typeof getHideProp;
98
+ stringPropVisible: typeof stringPropVisible;
99
+ DEFAULT_CLOSE_BUTTON: typeof DEFAULT_CLOSE_BUTTON;
100
+ DEFAULT_LABEL: typeof DEFAULT_LABEL;
101
+ DEFAULT_MESSAGE: typeof DEFAULT_MESSAGE;
102
+ DEFAULT_VALID_MESSAGE: typeof DEFAULT_VALID_MESSAGE;
103
+ DBCustomSelectList: typeof DBCustomSelectList;
104
+ DBCustomSelectListItem: typeof DBCustomSelectListItem;
105
+ DBCustomSelectDropdown: typeof DBCustomSelectDropdown;
106
+ DBInfotext: typeof DBInfotext;
107
+ DBTag: typeof DBTag;
108
+ DBButton: typeof DBButton;
109
+ DBTooltip: typeof DBTooltip;
110
+ DBInput: typeof DBInput;
111
+ _id: typeof _id;
112
+ _messageId: typeof _messageId;
113
+ _validMessageId: typeof _validMessageId;
114
+ _invalidMessageId: typeof _invalidMessageId;
115
+ _invalidMessage: typeof _invalidMessage;
116
+ _selectId: typeof _selectId;
117
+ _labelId: typeof _labelId;
118
+ _summaryId: typeof _summaryId;
119
+ _placeholderId: typeof _placeholderId;
120
+ _infoTextId: typeof _infoTextId;
121
+ _validity: typeof _validity;
122
+ _selectedLabels: typeof _selectedLabels;
123
+ _selectedLabelsId: typeof _selectedLabelsId;
124
+ _voiceOverFallback: typeof _voiceOverFallback;
125
+ _selectedOptions: typeof _selectedOptions;
126
+ selectAllEnabled: typeof selectAllEnabled;
127
+ searchEnabled: typeof searchEnabled;
128
+ _values: typeof _values;
129
+ _options: typeof _options;
130
+ _hasNoOptions: typeof _hasNoOptions;
131
+ selectAllChecked: typeof selectAllChecked;
132
+ _ref: typeof _ref;
133
+ detailsRef: typeof detailsRef;
134
+ selectRef: typeof selectRef;
135
+ selectAllRef: typeof selectAllRef;
136
+ searchInputRef: typeof searchInputRef;
137
+ hasValidState: typeof hasValidState;
138
+ handleDropdownToggle: typeof handleDropdownToggle;
139
+ getSelectAllLabel: typeof getSelectAllLabel;
140
+ getOptionLabel: typeof getOptionLabel;
141
+ getOptionChecked: typeof getOptionChecked;
142
+ getTagRemoveLabel: typeof getTagRemoveLabel;
143
+ handleTagRemove: typeof handleTagRemove;
144
+ handleKeyboardPress: typeof handleKeyboardPress;
145
+ handleClose: typeof handleClose;
146
+ handleSelect: typeof handleSelect;
147
+ handleSelectAll: typeof handleSelectAll;
148
+ handleSearch: typeof handleSearch;
149
+ handleClearAll: typeof handleClearAll;
150
+ satisfyReact: typeof satisfyReact;
151
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
3
152
  "update:values": (...args: any[]) => void;
4
153
  }, string, import("vue").PublicProps, Readonly<DBCustomSelectProps> & Readonly<{
5
154
  "onUpdate:values"?: ((...args: any[]) => any) | undefined;
@@ -7,51 +156,101 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<DBCustomSe
7
156
  name: string;
8
157
  form: string;
9
158
  label: string;
10
- disabled: boolean;
11
- variant: "above" | "floating";
159
+ disabled: boolean | string;
160
+ variant: import("../../shared/model").LabelVariantType;
12
161
  children: any;
13
162
  className: string;
14
163
  id: string;
15
- icon: import("@db-ux/core-foundations").BaseIconTypes | import("@db-ux/core-foundations").LooseAutocomplete;
16
- width: string;
17
- showIcon: boolean;
164
+ icon: import("@db-ux/core-foundations").IconTypes;
165
+ showIcon: boolean | string;
18
166
  values: string[];
19
- onSelect: (values: string[]) => void;
20
- placement: "top" | "bottom" | "top-start" | "top-end" | "bottom-start" | "bottom-end";
21
- validation: "invalid" | "valid" | "no-validation";
22
- required: boolean;
23
- showLabel: boolean;
167
+ placement: import("../../shared/model").PlacementVerticalType;
168
+ validation: import("../../shared/model").ValidationType;
169
+ required: boolean | string;
170
+ showLabel: boolean | string;
24
171
  placeholder: string;
25
172
  message: string;
26
173
  validMessage: string;
27
174
  invalidMessage: string;
28
- messageIcon: import("@db-ux/core-foundations").BaseIconTypes | import("@db-ux/core-foundations").LooseAutocomplete;
29
- showMessage: boolean;
175
+ messageIcon: import("@db-ux/core-foundations").IconTypes;
176
+ showMessage: boolean | string;
30
177
  open: boolean;
31
- multiple: boolean;
178
+ multiple: boolean | string;
32
179
  options: CustomSelectOptionType[];
180
+ ariaListLabel: string;
33
181
  amountText: string;
34
- clearSelectionLabel: string;
35
- deSelectAllLabel: string;
36
- dropdownWidth: "string" | "full" | "auto" | "fixed";
182
+ clearSelectionText: string;
183
+ dropdownWidth: import("../custom-select-dropdown/model").CustomSelectDropdownWidthType | string;
184
+ formFieldWidth: import("../../shared/model").WidthType | string;
37
185
  loadingText: string;
38
186
  mobileCloseButtonText: string;
39
187
  noResultsText: string;
188
+ removeTagsTexts: string[];
189
+ searchLabel: string;
190
+ searchPlaceholder: string;
191
+ selectAllLabel: string;
192
+ selectedType: import("./model").SelectedTypeType;
193
+ showClearSelection: boolean;
194
+ showLoading: boolean;
195
+ showNoResults: boolean;
196
+ showSearch: boolean;
197
+ showSelectAll: boolean;
40
198
  onAmountChange: (amount: number) => void;
199
+ onOptionSelected: (values: string[]) => void;
200
+ onDropdownToggle: (event: any) => void;
201
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
202
+ declare const __VLS_component: import("vue").DefineComponent<DBCustomSelectProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
203
+ "update:values": (...args: any[]) => void;
204
+ }, string, import("vue").PublicProps, Readonly<DBCustomSelectProps> & Readonly<{
205
+ "onUpdate:values"?: ((...args: any[]) => any) | undefined;
206
+ }>, {
207
+ name: string;
208
+ form: string;
209
+ label: string;
210
+ disabled: boolean | string;
211
+ variant: import("../../shared/model").LabelVariantType;
212
+ children: any;
213
+ className: string;
214
+ id: string;
215
+ icon: import("@db-ux/core-foundations").IconTypes;
216
+ showIcon: boolean | string;
217
+ values: string[];
218
+ placement: import("../../shared/model").PlacementVerticalType;
219
+ validation: import("../../shared/model").ValidationType;
220
+ required: boolean | string;
221
+ showLabel: boolean | string;
222
+ placeholder: string;
223
+ message: string;
224
+ validMessage: string;
225
+ invalidMessage: string;
226
+ messageIcon: import("@db-ux/core-foundations").IconTypes;
227
+ showMessage: boolean | string;
228
+ open: boolean;
229
+ multiple: boolean | string;
230
+ options: CustomSelectOptionType[];
231
+ ariaListLabel: string;
232
+ amountText: string;
233
+ clearSelectionText: string;
234
+ dropdownWidth: import("../custom-select-dropdown/model").CustomSelectDropdownWidthType | string;
235
+ formFieldWidth: import("../../shared/model").WidthType | string;
236
+ loadingText: string;
237
+ mobileCloseButtonText: string;
238
+ noResultsText: string;
41
239
  removeTagsTexts: string[];
42
240
  searchLabel: string;
43
241
  searchPlaceholder: string;
44
242
  selectAllLabel: string;
45
- selectedType: "text" | "amount" | "tag";
243
+ selectedType: import("./model").SelectedTypeType;
46
244
  showClearSelection: boolean;
47
245
  showLoading: boolean;
48
246
  showNoResults: boolean;
49
247
  showSearch: boolean;
50
248
  showSelectAll: boolean;
249
+ onAmountChange: (amount: number) => void;
250
+ onOptionSelected: (values: string[]) => void;
51
251
  onDropdownToggle: (event: any) => void;
52
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
53
- default?: ((props: {}) => any) | undefined;
54
- }>;
252
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
253
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
55
254
  export default _default;
56
255
  type __VLS_WithSlots<T, S> = T & {
57
256
  new (): {
@@ -1,4 +1,4 @@
1
- import { BaseFormProps, CloseEventState, CustomFormProps, FormMessageProps, FormState, GlobalProps, GlobalState, IconProps, PlacementVerticalType, PopoverState, RequiredProps, ShowIconProps, ShowLabelProps, ValidationType, WidthProps } from '../../shared/model';
1
+ import { BaseFormProps, CloseEventState, CustomFormProps, FormMessageProps, FormState, FromValidState, GlobalProps, GlobalState, IconProps, PlacementVerticalType, PopoverState, RequiredProps, ShowIconProps, ShowLabelProps, ValidationType, WidthType } from '../../shared/model';
2
2
  import { DBCustomSelectFormFieldDefaultProps } from '../custom-select-form-field/model';
3
3
  import { CustomSelectDropdownWidthType } from '../custom-select-dropdown/model';
4
4
  import { DBCustomSelectListItemExtraProps } from '../custom-select-list-item/model';
@@ -22,7 +22,41 @@ export type CustomSelectOptionType = {
22
22
  } & DBCustomSelectListItemExtraProps;
23
23
  export declare const SelectedTypeList: readonly ["amount", "text", "tag"];
24
24
  export type SelectedTypeType = (typeof SelectedTypeList)[number];
25
+ export type DBCustomSelectEvents = {
26
+ /**
27
+ * Optional: if select-type="amount" when amount changes
28
+ * @param amount The amount of selected checkboxes
29
+ */
30
+ onAmountChange?: (amount: number) => void;
31
+ /**
32
+ * Optional: if select-type="amount" when amount changes
33
+ * @param amount The amount of selected checkboxes
34
+ */
35
+ amountChange?: (amount: number) => void;
36
+ /**
37
+ * Triggers after some option was clicked in dropdown
38
+ * @param values the changed values
39
+ */
40
+ onOptionSelected?: (values: string[]) => void;
41
+ /**
42
+ * Triggers after some option was clicked in dropdown
43
+ * @param values the changed values
44
+ */
45
+ optionSelected?: (values: string[]) => void;
46
+ /**
47
+ * Informs the user when dropdown was toggled.
48
+ */
49
+ onDropdownToggle?: (event: any) => void;
50
+ /**
51
+ * Informs the user when dropdown was toggled.
52
+ */
53
+ dropdownToggle?: (event: any) => void;
54
+ };
25
55
  export type DBCustomSelectDefaultProps = {
56
+ /**
57
+ * Overwrite the default aria-label (props.label) for the custom-select-list
58
+ */
59
+ ariaListLabel?: string;
26
60
  /**
27
61
  * Optional: if select-type="amount" change the shown text
28
62
  */
@@ -30,17 +64,17 @@ export type DBCustomSelectDefaultProps = {
30
64
  /**
31
65
  * Label for the clear selection button
32
66
  */
33
- clearSelectionLabel?: string;
34
- /**
35
- * Deselect all checkbox label
36
- */
37
- deSelectAllLabel?: string;
67
+ clearSelectionText?: string;
38
68
  /**
39
69
  * Changes the behavior of the dropdown with.
40
70
  * Default: fixed 328px
41
71
  * Auto: Based on the size of the form-field
42
72
  */
43
- dropdownWidth?: CustomSelectDropdownWidthType | 'string';
73
+ dropdownWidth?: CustomSelectDropdownWidthType | string;
74
+ /**
75
+ * Width of the component. Auto width based on children size, full width based on parent elements width.
76
+ */
77
+ formFieldWidth?: WidthType | string;
44
78
  /**
45
79
  * Dropdown - hint if data has to be loaded
46
80
  */
@@ -52,21 +86,15 @@ export type DBCustomSelectDefaultProps = {
52
86
  /**
53
87
  * Enables CustomSelect
54
88
  */
55
- multiple?: boolean;
89
+ multiple?: boolean | string;
56
90
  /**
57
91
  * Dropdown - hint if there are no options
58
92
  */
59
93
  noResultsText?: string;
60
94
  /**
61
- * Optional: if select-type="amount" when amount changes
62
- * @param amount The amount of selected checkboxes
63
- */
64
- onAmountChange?: (amount: number) => void;
65
- /**
66
- * Triggers after some checkbox was clicked in dropdown
67
- * @param values the changed values
95
+ * Programmatically open the dropdown. May differ if you don't use onDropdownToggle.
68
96
  */
69
- onSelect?: (values: string[]) => void;
97
+ open?: boolean;
70
98
  /**
71
99
  * You should pass in the options as an array.
72
100
  */
@@ -119,16 +147,8 @@ export type DBCustomSelectDefaultProps = {
119
147
  * Initial value for multi select
120
148
  */
121
149
  values?: string[];
122
- /**
123
- * Programmatically open the dropdown. May differ if you don't use onDropdownToggle.
124
- */
125
- open?: boolean;
126
- /**
127
- * Informs the user when dropdown was toggled.
128
- */
129
- onDropdownToggle?: (event: any) => void;
130
150
  };
131
- export type DBCustomSelectProps = GlobalProps & CustomFormProps & BaseFormProps & RequiredProps & FormMessageProps & DBCustomSelectDefaultProps & DBCustomSelectFormFieldDefaultProps & WidthProps & IconProps & ShowIconProps & ShowLabelProps;
151
+ export type DBCustomSelectProps = GlobalProps & CustomFormProps & BaseFormProps & RequiredProps & FormMessageProps & DBCustomSelectDefaultProps & DBCustomSelectEvents & DBCustomSelectFormFieldDefaultProps & IconProps & ShowIconProps & ShowLabelProps;
132
152
  export type DBCustomSelectDefaultState = {
133
153
  _validity?: ValidationType;
134
154
  _values?: string[];
@@ -142,9 +162,8 @@ export type DBCustomSelectDefaultState = {
142
162
  _selectedLabels?: string;
143
163
  _selectedLabelsId?: string;
144
164
  _infoTextId?: string;
145
- _externalChangeTimestamp?: number;
146
- _internalChangeTimestamp?: number;
147
- _name?: string;
165
+ _internalChangeTimestamp: number;
166
+ _documentClickListenerCallbackId?: string;
148
167
  getNativeSelectValue: () => string;
149
168
  getOptionLabel: (option: CustomSelectOptionType) => string;
150
169
  getOptionChecked: (value?: string) => boolean;
@@ -166,8 +185,9 @@ export type DBCustomSelectDefaultState = {
166
185
  handleKeyboardPress: (event: any) => void;
167
186
  handleArrowDownUp: (event: any) => void;
168
187
  handleSearch: (event: any) => void;
188
+ handleOptionSelected: (_values: string[]) => void;
169
189
  getSelectAllLabel: () => string;
170
190
  selectAllChecked: boolean;
171
191
  selectAllIndeterminate: boolean;
172
192
  };
173
- export type DBCustomSelectState = DBCustomSelectDefaultState & GlobalState & FormState & CloseEventState & PopoverState;
193
+ export type DBCustomSelectState = DBCustomSelectDefaultState & GlobalState & FormState & FromValidState & CloseEventState & PopoverState;
@@ -1,12 +1,27 @@
1
1
  import { DBCustomSelectDropdownProps } from "./model";
2
- declare const _default: __VLS_WithSlots<import("vue").DefineComponent<DBCustomSelectDropdownProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DBCustomSelectDropdownProps> & Readonly<{}>, {
2
+ import { cls } from "../../utils";
3
+ declare const _ref: import("vue").Ref<any, any>;
4
+ declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
5
+ declare var __VLS_1: {};
6
+ type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
7
+ default?: (props: typeof __VLS_1) => any;
8
+ }>;
9
+ declare const __VLS_self: import("vue").DefineComponent<DBCustomSelectDropdownProps, {
10
+ cls: typeof cls;
11
+ _ref: typeof _ref;
12
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DBCustomSelectDropdownProps> & Readonly<{}>, {
3
13
  children: any;
4
14
  className: string;
5
15
  id: string;
6
- width: string;
7
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
8
- default?: ((props: {}) => any) | undefined;
9
- }>;
16
+ width: import("./model").CustomSelectDropdownWidthType | string;
17
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ declare const __VLS_component: import("vue").DefineComponent<DBCustomSelectDropdownProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DBCustomSelectDropdownProps> & Readonly<{}>, {
19
+ children: any;
20
+ className: string;
21
+ id: string;
22
+ width: import("./model").CustomSelectDropdownWidthType | string;
23
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
24
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
10
25
  export default _default;
11
26
  type __VLS_WithSlots<T, S> = T & {
12
27
  new (): {
@@ -1,10 +1,24 @@
1
- declare const _default: __VLS_WithSlots<import("vue").DefineComponent<import("../../shared/model").GlobalProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("../../shared/model").GlobalProps> & Readonly<{}>, {
1
+ import { cls } from "../../utils";
2
+ declare const _ref: import("vue").Ref<any, any>;
3
+ declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
4
+ declare var __VLS_1: {};
5
+ type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
6
+ default?: (props: typeof __VLS_1) => any;
7
+ }>;
8
+ declare const __VLS_self: import("vue").DefineComponent<import("../..").GlobalProps, {
9
+ cls: typeof cls;
10
+ _ref: typeof _ref;
11
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("../..").GlobalProps> & Readonly<{}>, {
2
12
  children: any;
3
13
  className: string;
4
14
  id: string;
5
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
6
- default?: ((props: {}) => any) | undefined;
7
- }>;
15
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ declare const __VLS_component: import("vue").DefineComponent<import("../..").GlobalProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("../..").GlobalProps> & Readonly<{}>, {
17
+ children: any;
18
+ className: string;
19
+ id: string;
20
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
8
22
  export default _default;
9
23
  type __VLS_WithSlots<T, S> = T & {
10
24
  new (): {
@@ -1,13 +1,29 @@
1
1
  import { DBCustomSelectListProps } from "./model";
2
- declare const _default: __VLS_WithSlots<import("vue").DefineComponent<DBCustomSelectListProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DBCustomSelectListProps> & Readonly<{}>, {
2
+ import { cls } from "../../utils";
3
+ declare const _ref: import("vue").Ref<any, any>;
4
+ declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
5
+ declare var __VLS_1: {};
6
+ type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
7
+ default?: (props: typeof __VLS_1) => any;
8
+ }>;
9
+ declare const __VLS_self: import("vue").DefineComponent<DBCustomSelectListProps, {
10
+ cls: typeof cls;
11
+ _ref: typeof _ref;
12
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DBCustomSelectListProps> & Readonly<{}>, {
3
13
  label: string;
4
14
  children: any;
5
15
  className: string;
6
16
  id: string;
7
17
  multiple: boolean;
8
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
9
- default?: ((props: {}) => any) | undefined;
10
- }>;
18
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
+ declare const __VLS_component: import("vue").DefineComponent<DBCustomSelectListProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DBCustomSelectListProps> & Readonly<{}>, {
20
+ label: string;
21
+ children: any;
22
+ className: string;
23
+ id: string;
24
+ multiple: boolean;
25
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
26
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
11
27
  export default _default;
12
28
  type __VLS_WithSlots<T, S> = T & {
13
29
  new (): {
@@ -1,28 +1,69 @@
1
- import { DBCustomSelectListItemProps } from "./model";
2
- declare const _default: __VLS_WithSlots<import("vue").DefineComponent<DBCustomSelectListItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
1
+ import { DBCustomSelectListItemProps, DBCustomSelectListItemState } from "./model";
2
+ import { cls, getBoolean, getBooleanAsString, getHideProp } from "../../utils";
3
+ import { ChangeEvent } from "../../shared/model";
4
+ declare const _id: import("vue").Ref<string | undefined, string | undefined>;
5
+ declare const hasDivider: import("vue").Ref<boolean | undefined, boolean | undefined>;
6
+ declare const _ref: import("vue").Ref<any, any>;
7
+ declare function handleChange(event: ChangeEvent<HTMLInputElement>): ReturnType<DBCustomSelectListItemState["handleChange"]>;
8
+ declare function getIconAfter(): ReturnType<DBCustomSelectListItemState["getIconAfter"]>;
9
+ declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
10
+ declare var __VLS_1: {};
11
+ type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
12
+ default?: (props: typeof __VLS_1) => any;
13
+ }>;
14
+ declare const __VLS_self: import("vue").DefineComponent<DBCustomSelectListItemProps, {
15
+ cls: typeof cls;
16
+ getBoolean: typeof getBoolean;
17
+ getBooleanAsString: typeof getBooleanAsString;
18
+ getHideProp: typeof getHideProp;
19
+ _id: typeof _id;
20
+ hasDivider: typeof hasDivider;
21
+ _ref: typeof _ref;
22
+ handleChange: typeof handleChange;
23
+ getIconAfter: typeof getIconAfter;
24
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
3
25
  "update:checked": (...args: any[]) => void;
4
26
  }, string, import("vue").PublicProps, Readonly<DBCustomSelectListItemProps> & Readonly<{
5
27
  "onUpdate:checked"?: ((...args: any[]) => any) | undefined;
6
28
  }>, {
7
29
  name: string;
8
30
  label: string;
9
- disabled: boolean;
10
- type: "checkbox" | "radio";
31
+ disabled: boolean | string;
32
+ type: import("./model").CustomSelectListItemTypeType;
11
33
  value: any;
12
34
  children: any;
13
35
  className: string;
14
36
  id: string;
15
- icon: import("@db-ux/core-foundations").BaseIconTypes | import("@db-ux/core-foundations").LooseAutocomplete;
16
- showIcon: boolean;
17
- change: (event: Event) => void;
18
- onChange: (event: Event) => void;
19
- checked: boolean;
37
+ icon: import("@db-ux/core-foundations").IconTypes;
38
+ showIcon: boolean | string;
39
+ onChange: (event: ChangeEvent<HTMLInputElement>) => void;
40
+ checked: boolean | string;
20
41
  groupTitle: string;
21
42
  isGroupTitle: boolean;
22
43
  showDivider: boolean;
23
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
24
- default?: ((props: {}) => any) | undefined;
25
- }>;
44
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
45
+ declare const __VLS_component: import("vue").DefineComponent<DBCustomSelectListItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
46
+ "update:checked": (...args: any[]) => void;
47
+ }, string, import("vue").PublicProps, Readonly<DBCustomSelectListItemProps> & Readonly<{
48
+ "onUpdate:checked"?: ((...args: any[]) => any) | undefined;
49
+ }>, {
50
+ name: string;
51
+ label: string;
52
+ disabled: boolean | string;
53
+ type: import("./model").CustomSelectListItemTypeType;
54
+ value: any;
55
+ children: any;
56
+ className: string;
57
+ id: string;
58
+ icon: import("@db-ux/core-foundations").IconTypes;
59
+ showIcon: boolean | string;
60
+ onChange: (event: ChangeEvent<HTMLInputElement>) => void;
61
+ checked: boolean | string;
62
+ groupTitle: string;
63
+ isGroupTitle: boolean;
64
+ showDivider: boolean;
65
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
66
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
26
67
  export default _default;
27
68
  type __VLS_WithSlots<T, S> = T & {
28
69
  new (): {
@@ -1,10 +1,10 @@
1
1
  import { DBDividerProps } from "./model";
2
2
  declare const _default: import("vue").DefineComponent<DBDividerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DBDividerProps> & Readonly<{}>, {
3
- variant: "horizontal" | "vertical";
3
+ variant: import("./model").DividerVariantType;
4
4
  className: string;
5
5
  id: string;
6
- width: string;
7
- emphasis: "weak" | "strong";
6
+ width: import("../..").WidthType | string;
7
+ emphasis: import("../..").EmphasisType;
8
8
  margin: "none";
9
9
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
10
  export default _default;