@db-ux/v-core-components 2.0.9 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -33,8 +33,8 @@ declare const __VLS_component: import("vue").DefineComponent<DBCustomSelectProps
33
33
  open: boolean;
34
34
  multiple: boolean | string;
35
35
  options: CustomSelectOptionType[];
36
- ariaListLabel: string;
37
36
  amountText: string;
37
+ ariaListLabel: string;
38
38
  clearSelectionText: string;
39
39
  dropdownWidth: import("../custom-select-dropdown/model").CustomSelectDropdownWidthType | string;
40
40
  formFieldWidth: import("../../shared/model").WidthType | string;
@@ -42,18 +42,23 @@ declare const __VLS_component: import("vue").DefineComponent<DBCustomSelectProps
42
42
  mobileCloseButtonText: string;
43
43
  noResultsText: string;
44
44
  removeTagsTexts: string[];
45
+ searchFilter: (option: CustomSelectOptionType, filterText: string) => boolean;
45
46
  searchLabel: string;
46
47
  searchPlaceholder: string;
48
+ searchValue: string;
47
49
  selectAllLabel: string;
50
+ selectedLabels: string;
48
51
  selectedType: import("./model").SelectedTypeType;
49
52
  showClearSelection: boolean;
50
53
  showLoading: boolean;
51
54
  showNoResults: boolean;
52
55
  showSearch: boolean;
53
56
  showSelectAll: boolean;
57
+ transformSelectedLabels: (selectedOptions?: CustomSelectOptionType[]) => string;
54
58
  onAmountChange: (amount: number) => void;
55
59
  onOptionSelected: (values: string[]) => void;
56
60
  onDropdownToggle: (event: any) => void;
61
+ onSearch: (event: any) => void;
57
62
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
58
63
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
59
64
  export default _default;
@@ -51,16 +51,24 @@ export type DBCustomSelectEvents = {
51
51
  * Informs the user when dropdown was toggled.
52
52
  */
53
53
  dropdownToggle?: (event: any) => void;
54
- };
55
- export type DBCustomSelectDefaultProps = {
56
54
  /**
57
- * Overwrite the default aria-label (props.label) for the custom-select-list
55
+ * Informs the user when a search was performed.
58
56
  */
59
- ariaListLabel?: string;
57
+ onSearch?: (event: any) => void;
58
+ /**
59
+ * Informs the user when a search was performed.
60
+ */
61
+ search?: (event: any) => void;
62
+ };
63
+ export type DBCustomSelectDefaultProps = {
60
64
  /**
61
65
  * Optional: if select-type="amount" change the shown text
62
66
  */
63
67
  amountText?: string;
68
+ /**
69
+ * Overwrite the default aria-label (props.label) for the custom-select-list
70
+ */
71
+ ariaListLabel?: string;
64
72
  /**
65
73
  * Label for the clear selection button
66
74
  */
@@ -107,6 +115,10 @@ export type DBCustomSelectDefaultProps = {
107
115
  * Optional: if you use selectedType=tag and options, you need to set the removeTagsTexts for screen reader users
108
116
  */
109
117
  removeTagsTexts?: string[];
118
+ /**
119
+ * Optional: Change the filter function for the search input
120
+ */
121
+ searchFilter?: (option: CustomSelectOptionType, filterText: string) => boolean;
110
122
  /**
111
123
  * Search label
112
124
  */
@@ -115,10 +127,19 @@ export type DBCustomSelectDefaultProps = {
115
127
  * Search placeholder
116
128
  */
117
129
  searchPlaceholder?: string;
130
+ /**
131
+ * Optional: Prefill the value of the search input
132
+ */
133
+ searchValue?: string;
118
134
  /**
119
135
  * Select all checkbox label
120
136
  */
121
137
  selectAllLabel?: string;
138
+ /**
139
+ * Optional: If you want to show a custom label for the selected values.
140
+ * You need to define the empty state as well based on selected options.
141
+ */
142
+ selectedLabels?: string;
122
143
  /**
123
144
  * Change the selected type for values shown in multi select
124
145
  */
@@ -143,6 +164,10 @@ export type DBCustomSelectDefaultProps = {
143
164
  * Forces select all checkbox (only for multiple).
144
165
  */
145
166
  showSelectAll?: boolean;
167
+ /**
168
+ * Optional: If you want to show a custom label based on the selected options.
169
+ */
170
+ transformSelectedLabels?: (selectedOptions?: CustomSelectOptionType[]) => string;
146
171
  /**
147
172
  * Initial value for multi select
148
173
  */
@@ -164,6 +189,7 @@ export type DBCustomSelectDefaultState = {
164
189
  _infoTextId?: string;
165
190
  _internalChangeTimestamp: number;
166
191
  _documentClickListenerCallbackId?: string;
192
+ _searchValue?: string;
167
193
  getNativeSelectValue: () => string;
168
194
  getOptionLabel: (option: CustomSelectOptionType) => string;
169
195
  getOptionChecked: (value?: string) => boolean;
@@ -5,7 +5,7 @@ type __VLS_Slots = {} & {
5
5
  };
6
6
  declare const __VLS_component: import("vue").DefineComponent<DBIconProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DBIconProps> & Readonly<{}>, {
7
7
  text: string;
8
- variant: import("./model").IconVariantType;
8
+ variant: string;
9
9
  children: any;
10
10
  className: string;
11
11
  id: string;
@@ -1,10 +1,8 @@
1
1
  import { GlobalProps, GlobalState, IconProps, TextProps } from '../../shared/model';
2
- export declare const IconVariantList: readonly ["default", "inverted", "filled"];
3
- export type IconVariantType = (typeof IconVariantList)[number];
4
2
  export declare const IconWeightList: readonly ["16", "20", "24", "32", "48", "64"];
5
3
  export type IconWeightType = (typeof IconWeightList)[number];
6
4
  export type DBIconDefaultProps = {
7
- variant?: IconVariantType;
5
+ variant?: string;
8
6
  weight?: IconWeightType;
9
7
  };
10
8
  export type DBIconProps = DBIconDefaultProps & GlobalProps & IconProps & TextProps;
@@ -1,7 +1,8 @@
1
1
  import { ChangeEventProps, ChangeEventState, ClickEventProps, ClickEventState, FocusEventProps, FocusEventState, FormMessageProps, FormProps, FormSizeProps, FormState, FromValidState, GlobalProps, GlobalState, IconProps, InitializedState, InputEventProps, InputEventState, ShowIconProps } from '../../shared/model';
2
2
  export type DBSelectDefaultProps = {
3
3
  /**
4
- * Enable multiple select -> use DBCustomSelect/db-custom-select for a better look
4
+ * @deprecated
5
+ * Enables multiple select, but it isn't styled, please use DBCustomSelect/db-custom-select instead
5
6
  */
6
7
  multiple?: boolean;
7
8
  /**
@@ -1,6 +1,17 @@
1
1
  import { ClickEventState, EmphasisProps, GlobalProps, GlobalState, InitializedState, PlacementProps, PopoverProps, PopoverState } from '../../shared/model';
2
+ export declare const TooltipVariantList: readonly ["description", "label"];
3
+ export type TooltipVariantType = (typeof TooltipVariantList)[number];
2
4
  export type DBTooltipDefaultProps = {
5
+ /**
6
+ * Show/Hides arrow
7
+ */
3
8
  showArrow?: boolean | string;
9
+ /**
10
+ * Change the behavior of the tooltip:
11
+ * - description: Adds `aria-describedby` to parent
12
+ * - label: Adds `aria-labelledby` to parent
13
+ */
14
+ variant?: TooltipVariantType;
4
15
  };
5
16
  export type DBTooltipProps = DBTooltipDefaultProps & GlobalProps & EmphasisProps & PlacementProps & PopoverProps;
6
17
  export type DBTooltipDefaultState = {};
@@ -4,6 +4,7 @@ type __VLS_Slots = {} & {
4
4
  default?: (props: typeof __VLS_1) => any;
5
5
  };
6
6
  declare const __VLS_component: import("vue").DefineComponent<DBTooltipProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DBTooltipProps> & Readonly<{}>, {
7
+ variant: import("./model").TooltipVariantType;
7
8
  children: any;
8
9
  className: string;
9
10
  id: string;