@ironsource/shared-ui 1.4.3 → 2.0.0-rc.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 (179) hide show
  1. package/AddFilterButton.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  2. package/AppTrigger.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  3. package/AutocompleteDropdown.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  4. package/AutocompleteInput.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  5. package/Banner.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  6. package/Button.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  7. package/ButtonBase.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  8. package/ButtonV4.vue_vue_type_style_index_0_scoped_true_lang.css +1 -0
  9. package/CalendarMonth.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  10. package/Chip.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  11. package/ChipV4.vue_vue_type_style_index_0_scoped_true_lang.css +1 -0
  12. package/DateRange.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  13. package/Dialog.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  14. package/Dropdown.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  15. package/Dropdown.vue_vue_type_style_index_1_lang.css +1 -1
  16. package/DropdownV4.vue_vue_type_style_index_0_scoped_true_lang.css +1 -0
  17. package/DropdownV4.vue_vue_type_style_index_1_lang.css +1 -0
  18. package/Editable.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  19. package/EmptyState.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  20. package/FilterDropdown.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  21. package/FilterSearchInput.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  22. package/FloatingToolbar.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  23. package/GroupOption.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  24. package/IconButton.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  25. package/IncludeExclude.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  26. package/IncludeExcludeAppTrigger.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  27. package/IncludeExcludeChipFilter.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  28. package/IncludeExcludeDragDrop.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  29. package/IncludeExcludeOptionDraggable.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  30. package/Input.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  31. package/Label.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  32. package/Menu.vue_vue_type_style_index_1_lang.css +1 -1
  33. package/MenuItem.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  34. package/Option.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  35. package/Popover.vue_vue_type_style_index_0_lang.css +1 -1
  36. package/README.md +1 -1
  37. package/ScrollButton.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  38. package/Search.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  39. package/SearchInput.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  40. package/SearchV4.vue_vue_type_style_index_0_scoped_true_lang.css +1 -0
  41. package/Snackbar.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  42. package/Switch.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  43. package/SwitchV4.vue_vue_type_style_index_0_scoped_true_lang.css +1 -0
  44. package/Table.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  45. package/Table.vue_vue_type_style_index_1_lang.css +1 -1
  46. package/Tabs.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  47. package/TextArea.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  48. package/Toggle.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
  49. package/Typography.vue_vue_type_style_index_0_scoped_true_lang.css +1 -0
  50. package/commonCssVariables.scss +623 -0
  51. package/components/ThemeWrapper/ThemeStrore.d.ts +4 -0
  52. package/components/ThemeWrapper/ThemeWrapper.vue.d.ts +15 -0
  53. package/components/appTrigger/AppTrigger.vue.js +4 -4
  54. package/components/autocompleteDropdown/AutocompleteDropdown.vue.js +4 -3
  55. package/components/autocompleteDropdown/AutocompleteInput.vue.js +2 -2
  56. package/components/autocompleteDropdown/GroupOption.vue.js +2 -2
  57. package/components/button/common/ButtonBase.vue.d.ts +48 -0
  58. package/components/button/{ButtonBase.vue.js → common/ButtonBase.vue.js} +7 -7
  59. package/components/button/{Button.vue.d.ts → common/ButtonSuper.vue.d.ts} +3 -3
  60. package/components/button/{ButtonBase.vue.d.ts → v3/Button.vue.d.ts} +20 -4
  61. package/components/button/v3/Button.vue.js +102 -0
  62. package/components/button/{IconButton.vue.js → v3/IconButton.vue.js} +7 -7
  63. package/components/button/{ScrollButton.vue.js → v3/ScrollButton.vue.js} +6 -6
  64. package/components/button/v3/index.d.ts +79 -0
  65. package/components/button/v4/ButtonV4.vue.d.ts +57 -0
  66. package/components/button/v4/ButtonV4.vue.js +99 -0
  67. package/components/button/{index.d.ts → v4/index.d.ts} +33 -76
  68. package/components/button/v4/index.vue.js +6 -0
  69. package/components/checkbox/Checkbox.vue.d.ts +1 -1
  70. package/components/checkbox/index.d.ts +9 -9
  71. package/components/chip/{Chip.vue.js → v3/Chip.vue.js} +5 -5
  72. package/components/chip/v4/ChipV4.vue.d.ts +48 -0
  73. package/components/chip/v4/ChipV4.vue.js +76 -0
  74. package/components/chip/v4/index.d.ts +63 -0
  75. package/components/chip/v4/index.vue.js +6 -0
  76. package/components/dateRange/CalendarMonth.vue.js +3 -3
  77. package/components/dateRange/DateRange.vue.js +4 -4
  78. package/components/dialog/Dialog.vue.d.ts +1 -1
  79. package/components/dialog/Dialog.vue.js +8 -7
  80. package/components/dialog/index.d.ts +11 -11
  81. package/components/dropdown/common/Dropdown.common.d.ts +36 -0
  82. package/components/dropdown/common/Dropdown.common.vue.js +456 -0
  83. package/components/dropdown/{Label.vue.js → common/Label.vue.js} +5 -5
  84. package/components/dropdown/{Option.vue.js → common/Option.vue.js} +7 -7
  85. package/components/dropdown/{SearchInput.vue.js → common/SearchInput.vue.js} +8 -7
  86. package/components/dropdown/{Dropdown.vue.d.ts → v3/Dropdown.vue.d.ts} +15 -5
  87. package/components/dropdown/v3/Dropdown.vue.js +391 -0
  88. package/components/dropdown/{index.d.ts → v3/index.d.ts} +42 -20
  89. package/components/dropdown/v3/index.vue.js +12 -0
  90. package/components/dropdown/v4/DropdownV4.vue.d.ts +223 -0
  91. package/components/dropdown/v4/DropdownV4.vue.js +408 -0
  92. package/components/dropdown/v4/index.d.ts +433 -0
  93. package/components/dropdown/v4/index.vue.js +6 -0
  94. package/components/emptyState/EmptyState.vue.d.ts +1 -1
  95. package/components/emptyState/EmptyState.vue.js +4 -4
  96. package/components/emptyState/index.d.ts +11 -11
  97. package/components/filterDropdown/AddFilterButton.vue.js +2 -2
  98. package/components/filterDropdown/FilterDropdown.vue.js +5 -4
  99. package/components/filtersPanel/Filter.d.ts +1 -1
  100. package/components/filtersPanel/FilterSearchInput.vue.js +6 -6
  101. package/components/floatingToolbar/FloatingToolbar.vue.js +6 -5
  102. package/components/includeExclude/IncludeExclude.vue.d.ts +1 -1
  103. package/components/includeExclude/IncludeExclude.vue.js +4 -4
  104. package/components/includeExclude/IncludeExcludeAppHeader.vue.js +2 -2
  105. package/components/includeExclude/IncludeExcludeAppTrigger.vue.js +4 -4
  106. package/components/includeExclude/IncludeExcludeChipFilter.vue.js +3 -3
  107. package/components/includeExclude/IncludeExcludeDragDrop.vue.d.ts +1 -1
  108. package/components/includeExclude/IncludeExcludeDragDrop.vue.js +4 -4
  109. package/components/includeExclude/index.d.ts +22 -22
  110. package/components/input/Input.vue.d.ts +2 -2
  111. package/components/input/Input.vue.js +4 -4
  112. package/components/input/index.d.ts +16 -16
  113. package/components/menu/Menu.vue.d.ts +1 -1
  114. package/components/menu/index.d.ts +5 -5
  115. package/components/search/common/Search.common.d.ts +9 -0
  116. package/components/search/common/Search.common.vue.js +52 -0
  117. package/components/search/{Search.vue.js → v3/Search.vue.js} +19 -46
  118. package/components/search/{index.d.ts → v3/index.d.ts} +3 -3
  119. package/components/search/v4/SearchV4.vue.d.ts +51 -0
  120. package/components/search/v4/SearchV4.vue.js +70 -0
  121. package/components/search/v4/index.d.ts +72 -0
  122. package/components/search/v4/index.vue.js +6 -0
  123. package/components/snackbar/Snackbar.vue.d.ts +1 -1
  124. package/components/snackbar/Snackbar.vue.js +6 -5
  125. package/components/switch/{Switch.vue.js → v3/Switch.vue.js} +5 -5
  126. package/components/switch/v4/SwitchV4.vue.d.ts +37 -0
  127. package/components/switch/v4/SwitchV4.vue.js +87 -0
  128. package/components/switch/v4/index.d.ts +46 -0
  129. package/components/switch/v4/index.vue.js +6 -0
  130. package/components/table/Table.vue.js +3 -3
  131. package/components/table-cells/Editable.vue.js +1 -1
  132. package/components/tooltip/Tooltip.vue.d.ts +1 -1
  133. package/components/tooltip/index.d.ts +5 -5
  134. package/components/typography/index.d.ts +9 -9
  135. package/components/typography/v4/Typography.vue.d.ts +34 -0
  136. package/components/typography/v4/Typography.vue.js +68 -0
  137. package/components/typography/v4/index.d.ts +23 -0
  138. package/components/typography/v4/index.vue.js +6 -0
  139. package/design-foundation.stories/border-radius/BorderRadiusData.d.ts +5 -0
  140. package/design-foundation.stories/border-radius/BorderRadiusWrapper.vue.d.ts +4 -0
  141. package/design-foundation.stories/border-radius/index.d.ts +1 -0
  142. package/design-foundation.stories/colors/ColorsData.d.ts +114 -0
  143. package/design-foundation.stories/colors/ColorsStoryWrapper.vue.d.ts +3 -0
  144. package/design-foundation.stories/colors/index.d.ts +1 -0
  145. package/design-foundation.stories/elevations/ElevationStoryWrapper.vue.d.ts +4 -0
  146. package/design-foundation.stories/elevations/ElevationsData.d.ts +10 -0
  147. package/design-foundation.stories/elevations/index.d.ts +1 -0
  148. package/design-foundation.stories/typography/TypographyData.d.ts +7 -0
  149. package/design-foundation.stories/typography/TypographyStoryWrapper.vue.d.ts +3 -0
  150. package/design-foundation.stories/typography/index.d.ts +1 -0
  151. package/index.d.ts +1532 -5
  152. package/index.vue.js +28 -16
  153. package/package.json +39 -14
  154. package/styleguide.scss +77 -78
  155. package/styles/v4/border-radius.css +8 -0
  156. package/styles/v4/colors.css +100 -0
  157. package/styles/v4/elevations.css +10 -0
  158. package/styles/v4/fonts.css +1 -0
  159. package/styles/v4/fonts.css.map +1 -0
  160. package/styles/v4/fonts.scss +258 -0
  161. package/components/button/Button.vue.js +0 -65
  162. package/components/dropdown/Dropdown.vue.js +0 -785
  163. package/components/dropdown/index.vue.js +0 -12
  164. /package/components/button/{IconButton.vue.d.ts → v3/IconButton.vue.d.ts} +0 -0
  165. /package/components/button/{ScrollButton.vue.d.ts → v3/ScrollButton.vue.d.ts} +0 -0
  166. /package/components/button/{index.vue.js → v3/index.vue.js} +0 -0
  167. /package/components/chip/{Chip.vue.d.ts → v3/Chip.vue.d.ts} +0 -0
  168. /package/components/chip/{index.d.ts → v3/index.d.ts} +0 -0
  169. /package/components/chip/{index.vue.js → v3/index.vue.js} +0 -0
  170. /package/components/dropdown/{DropdownContext.d.ts → common/DropdownContext.d.ts} +0 -0
  171. /package/components/dropdown/{DropdownContext.vue.js → common/DropdownContext.vue.js} +0 -0
  172. /package/components/dropdown/{Label.vue.d.ts → common/Label.vue.d.ts} +0 -0
  173. /package/components/dropdown/{Option.vue.d.ts → common/Option.vue.d.ts} +0 -0
  174. /package/components/dropdown/{SearchInput.vue.d.ts → common/SearchInput.vue.d.ts} +0 -0
  175. /package/components/search/{Search.vue.d.ts → v3/Search.vue.d.ts} +0 -0
  176. /package/components/search/{index.vue.js → v3/index.vue.js} +0 -0
  177. /package/components/switch/{Switch.vue.d.ts → v3/Switch.vue.d.ts} +0 -0
  178. /package/components/switch/{index.d.ts → v3/index.d.ts} +0 -0
  179. /package/components/switch/{index.vue.js → v3/index.vue.js} +0 -0
@@ -0,0 +1,223 @@
1
+ import { Placement } from 'floating-vue';
2
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
3
+ modelValue?: unknown | unknown[] | Record<string, unknown>;
4
+ placeholder?: string;
5
+ disabled?: boolean;
6
+ mandatory?: boolean;
7
+ helperText?: string;
8
+ searchPlaceholder?: string;
9
+ isOnTop?: boolean;
10
+ multi?: boolean;
11
+ title?: string;
12
+ inlineSearch?: boolean;
13
+ popperClass?: string;
14
+ noResultsText?: string;
15
+ loading?: boolean;
16
+ selected?: unknown | unknown[];
17
+ showSelectAll?: boolean;
18
+ defaultOpen?: boolean;
19
+ showButtonOnOpen?: boolean;
20
+ autoFocus?: boolean;
21
+ distance?: number;
22
+ isOpen?: boolean;
23
+ skidding?: number;
24
+ placement?: Placement;
25
+ clearable?: boolean;
26
+ error?: string;
27
+ size?: 'sm' | 'lg';
28
+ displayValue: (option: unknown) => string;
29
+ options: unknown[];
30
+ onSearch?: (option: any, term: string) => boolean;
31
+ theme?: string;
32
+ container?: string;
33
+ flip?: boolean;
34
+ keepOpen?: boolean;
35
+ autoSize?: boolean;
36
+ disableKeyboardEvents?: boolean;
37
+ multiOptionsPlaceholderPrefix?: string;
38
+ multiOptionsPlaceholderSuffix?: string;
39
+ testId?: string;
40
+ darkTheme?: boolean;
41
+ valueToCopy?: string;
42
+ }>, {
43
+ multi: boolean;
44
+ searchPlaceholder: string;
45
+ title: string;
46
+ popperClass: string;
47
+ mandatory: boolean;
48
+ selected: any;
49
+ open: boolean;
50
+ showButtonOnOpen: boolean;
51
+ inlineSearch: boolean;
52
+ isOnTop: boolean;
53
+ distance: number;
54
+ skidding: number;
55
+ placement: string;
56
+ noResultsText: string;
57
+ autoFocus: boolean;
58
+ modelValue: any;
59
+ defaultOpen: boolean;
60
+ disabled: boolean;
61
+ placeholder: string;
62
+ size: string;
63
+ clearable: boolean;
64
+ onSearch: () => true;
65
+ helperText: string;
66
+ error: string;
67
+ theme: string;
68
+ container: string;
69
+ flip: boolean;
70
+ keepOpen: boolean;
71
+ autoSize: boolean;
72
+ disableKeyboardEvents: boolean;
73
+ multiOptionsPlaceholderPrefix: string;
74
+ multiOptionsPlaceholderSuffix: string;
75
+ testId: string;
76
+ darkTheme: boolean;
77
+ valueToCopy: string;
78
+ }>, {
79
+ selectItem: (option: any, index?: number) => void;
80
+ scrollTo: (index: number) => void;
81
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
82
+ "update:selected": (value: unknown) => void;
83
+ } & {
84
+ "update:isOpen": (value: unknown) => void;
85
+ } & {
86
+ closed: () => void;
87
+ } & {
88
+ opened: () => void;
89
+ } & {
90
+ apply: (value: unknown) => void;
91
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
92
+ modelValue?: unknown | unknown[] | Record<string, unknown>;
93
+ placeholder?: string;
94
+ disabled?: boolean;
95
+ mandatory?: boolean;
96
+ helperText?: string;
97
+ searchPlaceholder?: string;
98
+ isOnTop?: boolean;
99
+ multi?: boolean;
100
+ title?: string;
101
+ inlineSearch?: boolean;
102
+ popperClass?: string;
103
+ noResultsText?: string;
104
+ loading?: boolean;
105
+ selected?: unknown | unknown[];
106
+ showSelectAll?: boolean;
107
+ defaultOpen?: boolean;
108
+ showButtonOnOpen?: boolean;
109
+ autoFocus?: boolean;
110
+ distance?: number;
111
+ isOpen?: boolean;
112
+ skidding?: number;
113
+ placement?: Placement;
114
+ clearable?: boolean;
115
+ error?: string;
116
+ size?: 'sm' | 'lg';
117
+ displayValue: (option: unknown) => string;
118
+ options: unknown[];
119
+ onSearch?: (option: any, term: string) => boolean;
120
+ theme?: string;
121
+ container?: string;
122
+ flip?: boolean;
123
+ keepOpen?: boolean;
124
+ autoSize?: boolean;
125
+ disableKeyboardEvents?: boolean;
126
+ multiOptionsPlaceholderPrefix?: string;
127
+ multiOptionsPlaceholderSuffix?: string;
128
+ testId?: string;
129
+ darkTheme?: boolean;
130
+ valueToCopy?: string;
131
+ }>, {
132
+ multi: boolean;
133
+ searchPlaceholder: string;
134
+ title: string;
135
+ popperClass: string;
136
+ mandatory: boolean;
137
+ selected: any;
138
+ open: boolean;
139
+ showButtonOnOpen: boolean;
140
+ inlineSearch: boolean;
141
+ isOnTop: boolean;
142
+ distance: number;
143
+ skidding: number;
144
+ placement: string;
145
+ noResultsText: string;
146
+ autoFocus: boolean;
147
+ modelValue: any;
148
+ defaultOpen: boolean;
149
+ disabled: boolean;
150
+ placeholder: string;
151
+ size: string;
152
+ clearable: boolean;
153
+ onSearch: () => true;
154
+ helperText: string;
155
+ error: string;
156
+ theme: string;
157
+ container: string;
158
+ flip: boolean;
159
+ keepOpen: boolean;
160
+ autoSize: boolean;
161
+ disableKeyboardEvents: boolean;
162
+ multiOptionsPlaceholderPrefix: string;
163
+ multiOptionsPlaceholderSuffix: string;
164
+ testId: string;
165
+ darkTheme: boolean;
166
+ valueToCopy: string;
167
+ }>>> & {
168
+ "onUpdate:selected"?: (value: unknown) => any;
169
+ onApply?: (value: unknown) => any;
170
+ "onUpdate:isOpen"?: (value: unknown) => any;
171
+ onOpened?: () => any;
172
+ onClosed?: () => any;
173
+ }, {
174
+ title: string;
175
+ theme: string;
176
+ size: 'sm' | 'lg';
177
+ testId: string;
178
+ error: string;
179
+ placement: Placement;
180
+ disabled: boolean;
181
+ selected: any;
182
+ modelValue: any;
183
+ placeholder: string;
184
+ multi: boolean;
185
+ searchPlaceholder: string;
186
+ popperClass: string;
187
+ mandatory: boolean;
188
+ showButtonOnOpen: boolean;
189
+ inlineSearch: boolean;
190
+ isOnTop: boolean;
191
+ distance: number;
192
+ skidding: number;
193
+ noResultsText: string;
194
+ autoFocus: boolean;
195
+ defaultOpen: boolean;
196
+ clearable: boolean;
197
+ onSearch: (option: any, term: string) => boolean;
198
+ helperText: string;
199
+ container: string;
200
+ flip: boolean;
201
+ keepOpen: boolean;
202
+ autoSize: boolean;
203
+ disableKeyboardEvents: boolean;
204
+ multiOptionsPlaceholderPrefix: string;
205
+ multiOptionsPlaceholderSuffix: string;
206
+ darkTheme: boolean;
207
+ valueToCopy: string;
208
+ }>;
209
+ export default _default;
210
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
211
+ type __VLS_TypePropsToRuntimeProps<T> = {
212
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
213
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
214
+ } : {
215
+ type: import('vue').PropType<T[K]>;
216
+ required: true;
217
+ };
218
+ };
219
+ type __VLS_WithDefaults<P, D> = {
220
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? P[K] & {
221
+ default: D[K];
222
+ } : P[K];
223
+ };
@@ -0,0 +1,408 @@
1
+ import { defineComponent, openBlock, createElementBlock, normalizeClass, unref, renderSlot, createElementVNode, createVNode, withCtx, Transition, createTextVNode, toDisplayString, createCommentVNode, createBlock, isRef, mergeProps, withModifiers, Fragment, renderList, toRaw, pushScopeId, popScopeId } from 'vue';
2
+ import Button from '../../button/v4/ButtonV4.vue.js';
3
+ import Option from '../common/Option.vue.js';
4
+ import Icon from '../../icon/Icon.vue.js';
5
+ import Search from '../../search/v4/SearchV4.vue.js';
6
+ import { DropdownTestIdModifiers } from '../../../testids/index.vue.js';
7
+ /* empty css */import _export_sfc from '../../../_virtual/plugin-vue_export-helper.vue.js';
8
+ import Text from '../../typography/Text.vue.js';
9
+ import { Dropdown as Dropdown$1 } from 'floating-vue';
10
+ import { dropdownCommon } from '../common/Dropdown.common.vue.js';
11
+ /* empty css *//* empty css */
12
+ import "../../../DropdownV4.vue_vue_type_style_index_0_scoped_true_lang.css";import "../../../DropdownV4.vue_vue_type_style_index_1_lang.css";
13
+ const _withScopeId = (n) => (pushScopeId("data-v-2f0b1568"), n = n(), popScopeId(), n);
14
+ const _hoisted_1 = ["tabindex", "data-testid"];
15
+ const _hoisted_2 = { style: { display: "flex", width: "100%" } };
16
+ const _hoisted_3 = ["disabled", "aria-expanded", "aria-labelledby", "aria-disabled"];
17
+ const _hoisted_4 = {
18
+ key: 0,
19
+ class: "image-slot"
20
+ };
21
+ const _hoisted_5 = { class: "angle-down" };
22
+ const _hoisted_6 = { ref: "listRef" };
23
+ const _hoisted_7 = {
24
+ key: 0,
25
+ class: "dropdown-title"
26
+ };
27
+ const _hoisted_8 = ["data-testid"];
28
+ const _hoisted_9 = ["data-testid"];
29
+ const _hoisted_10 = {
30
+ key: 0,
31
+ class: "no-result-container"
32
+ };
33
+ const _hoisted_11 = {
34
+ key: 1,
35
+ class: "loader"
36
+ };
37
+ const _hoisted_12 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("svg", {
38
+ width: "100",
39
+ height: "100",
40
+ viewBox: "0 0 100 100"
41
+ }, [
42
+ /* @__PURE__ */ createElementVNode("circle", {
43
+ cx: "50",
44
+ cy: "50",
45
+ fill: "none",
46
+ stroke: "currentColor",
47
+ "stroke-width": "6",
48
+ r: "35",
49
+ "stroke-dasharray": "164.93361431346415 56.97787143782138"
50
+ }, [
51
+ /* @__PURE__ */ createElementVNode("animateTransform", {
52
+ attributeName: "transform",
53
+ type: "rotate",
54
+ repeatCount: "indefinite",
55
+ dur: "1s",
56
+ values: "0 50 50;360 50 50",
57
+ keyTimes: "0;1"
58
+ })
59
+ ])
60
+ ], -1));
61
+ const _hoisted_13 = { key: 2 };
62
+ const _hoisted_14 = ["aria-selected", "aria-disabled", "onClick"];
63
+ const _hoisted_15 = {
64
+ key: 0,
65
+ class: "actions"
66
+ };
67
+ const _sfc_main = /* @__PURE__ */ defineComponent({
68
+ __name: "DropdownV4",
69
+ props: {
70
+ modelValue: { default: null },
71
+ placeholder: { default: "" },
72
+ disabled: { type: Boolean, default: false },
73
+ mandatory: { type: Boolean, default: false },
74
+ helperText: { default: "" },
75
+ searchPlaceholder: { default: "" },
76
+ isOnTop: { type: Boolean, default: false },
77
+ multi: { type: Boolean, default: false },
78
+ title: { default: "" },
79
+ inlineSearch: { type: Boolean, default: false },
80
+ popperClass: { default: "" },
81
+ noResultsText: { default: "No results found" },
82
+ loading: { type: Boolean },
83
+ selected: { default: null },
84
+ showSelectAll: { type: Boolean },
85
+ defaultOpen: { type: Boolean, default: false },
86
+ showButtonOnOpen: { type: Boolean, default: true },
87
+ autoFocus: { type: Boolean, default: false },
88
+ distance: { default: 0 },
89
+ isOpen: { type: Boolean },
90
+ skidding: { default: 0 },
91
+ placement: { default: "bottom-start" },
92
+ clearable: { type: Boolean, default: false },
93
+ error: { default: "" },
94
+ size: { default: "lg" },
95
+ displayValue: null,
96
+ options: null,
97
+ onSearch: { type: Function, default: () => true },
98
+ theme: { default: "is-dropdown" },
99
+ container: { default: "body" },
100
+ flip: { type: Boolean, default: true },
101
+ keepOpen: { type: Boolean, default: false },
102
+ autoSize: { type: Boolean, default: false },
103
+ disableKeyboardEvents: { type: Boolean, default: false },
104
+ multiOptionsPlaceholderPrefix: { default: "" },
105
+ multiOptionsPlaceholderSuffix: { default: "" },
106
+ testId: { default: "" },
107
+ darkTheme: { type: Boolean, default: true },
108
+ valueToCopy: { default: "" }
109
+ },
110
+ emits: ["update:selected", "update:isOpen", "closed", "opened", "apply"],
111
+ setup(__props, { expose, emit }) {
112
+ const props = __props;
113
+ const {
114
+ onKeydown,
115
+ location,
116
+ open,
117
+ toggleMenu,
118
+ onButtonKeydown,
119
+ displayedValue,
120
+ labelRef,
121
+ query,
122
+ containerProps,
123
+ calculateTableHeight,
124
+ wrapperProps,
125
+ filteredOptions,
126
+ allSelected,
127
+ isIndeterminate,
128
+ onSelectAll,
129
+ virtualOptions,
130
+ isSelected,
131
+ selectedOption,
132
+ onSelect,
133
+ activeIndex,
134
+ onCancel,
135
+ onApply,
136
+ scrollTo
137
+ } = dropdownCommon(props, emit);
138
+ const copyValue = () => {
139
+ };
140
+ expose({
141
+ selectItem: onSelect,
142
+ scrollTo
143
+ });
144
+ return (_ctx, _cache) => {
145
+ return openBlock(), createElementBlock("div", {
146
+ ref: "el",
147
+ class: normalizeClass(["dropdown", { "dropdown--disabled": __props.disabled }]),
148
+ tabindex: __props.disabled ? -1 : 0,
149
+ "data-testid": `${__props.testId}-${unref(DropdownTestIdModifiers).WRAPPER}`,
150
+ onKeydown: _cache[7] || (_cache[7] = (...args) => unref(onKeydown) && unref(onKeydown)(...args))
151
+ }, [
152
+ renderSlot(_ctx.$slots, "label", {}, void 0, true),
153
+ createElementVNode("div", _hoisted_2, [
154
+ createVNode(unref(Dropdown$1), {
155
+ theme: __props.theme,
156
+ "popper-class": [
157
+ __props.popperClass,
158
+ !__props.darkTheme ? "light-theme-v4" : "dark-theme-v4",
159
+ __props.autoSize ? "v-popper--theme-is-dropdown--auto-size" : null
160
+ ],
161
+ placement: __props.placement,
162
+ skidding: __props.isOnTop ? 0 : __props.skidding,
163
+ distance: __props.isOnTop ? -unref(location) : __props.distance,
164
+ flip: __props.flip,
165
+ triggers: [],
166
+ shown: !!unref(open),
167
+ "auto-hide": false,
168
+ container: __props.container,
169
+ "auto-size": __props.autoSize,
170
+ "data-testid": `${__props.testId}-${unref(DropdownTestIdModifiers).TRIGGER}`
171
+ }, {
172
+ popper: withCtx(() => [
173
+ createVNode(Transition, null, {
174
+ default: withCtx(() => [
175
+ createElementVNode("div", _hoisted_6, [
176
+ __props.inlineSearch || __props.title ? (openBlock(), createElementBlock("div", _hoisted_7, [
177
+ __props.title ? (openBlock(), createElementBlock("div", {
178
+ key: 0,
179
+ class: "dropdown-title__text",
180
+ "data-testid": `${__props.testId}-${unref(DropdownTestIdModifiers).TITLE}`
181
+ }, [
182
+ createVNode(unref(Text), { strong: "" }, {
183
+ default: withCtx(() => [
184
+ createTextVNode(toDisplayString(__props.title), 1)
185
+ ]),
186
+ _: 1
187
+ })
188
+ ], 8, _hoisted_8)) : createCommentVNode("", true),
189
+ __props.inlineSearch ? (openBlock(), createBlock(unref(Search), {
190
+ key: 1,
191
+ modelValue: unref(query),
192
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => isRef(query) ? query.value = $event : null),
193
+ placeholder: __props.searchPlaceholder,
194
+ class: "dropdown-title__search",
195
+ variant: "transparent",
196
+ size: "md",
197
+ "test-id": `${__props.testId}-${unref(DropdownTestIdModifiers).SEARCH}`,
198
+ onKeydown: unref(onKeydown)
199
+ }, null, 8, ["modelValue", "placeholder", "test-id", "onKeydown"])) : createCommentVNode("", true)
200
+ ])) : createCommentVNode("", true),
201
+ unref(open) ? (openBlock(), createElementBlock("div", {
202
+ key: 1,
203
+ class: "dropdown",
204
+ onKeydown: _cache[6] || (_cache[6] = (...args) => unref(onKeydown) && unref(onKeydown)(...args))
205
+ }, [
206
+ renderSlot(_ctx.$slots, "input-list", { open: unref(open) }, void 0, true),
207
+ createElementVNode("div", mergeProps(unref(containerProps), {
208
+ class: ["list-container", { "list-container--multi": __props.multi }],
209
+ style: { height: `${unref(calculateTableHeight)}rem` },
210
+ "data-testid": `${__props.testId}-${unref(DropdownTestIdModifiers).LIST_CONTAINER}`
211
+ }), [
212
+ createElementVNode("ul", mergeProps(unref(wrapperProps), {
213
+ role: "listbox",
214
+ class: ["list", { "list--multi": __props.multi }]
215
+ }), [
216
+ !unref(filteredOptions).length && !__props.loading ? (openBlock(), createElementBlock("li", _hoisted_10, [
217
+ createVNode(unref(Text), {
218
+ size: "sm",
219
+ class: "no-result"
220
+ }, {
221
+ default: withCtx(() => [
222
+ createTextVNode(toDisplayString(__props.noResultsText), 1)
223
+ ]),
224
+ _: 1
225
+ })
226
+ ])) : createCommentVNode("", true),
227
+ __props.loading ? (openBlock(), createElementBlock("li", _hoisted_11, [
228
+ createVNode(unref(Icon), {
229
+ "font-size": "md",
230
+ class: "loader-icon"
231
+ }, {
232
+ default: withCtx(() => [
233
+ _hoisted_12
234
+ ]),
235
+ _: 1
236
+ }),
237
+ createVNode(unref(Text), null, {
238
+ default: withCtx(() => [
239
+ createTextVNode("Loading...")
240
+ ]),
241
+ _: 1
242
+ })
243
+ ])) : createCommentVNode("", true),
244
+ __props.showSelectAll ? (openBlock(), createElementBlock("li", _hoisted_13, [
245
+ createVNode(Option, {
246
+ "aria-selected": unref(allSelected),
247
+ "aria-disabled": !!__props.disabled,
248
+ "selected-prop": unref(allSelected),
249
+ "is-indeterminate": unref(isIndeterminate),
250
+ "select-all-option": "",
251
+ onClick: _cache[5] || (_cache[5] = withModifiers(($event) => unref(onSelectAll)(), ["stop"]))
252
+ }, {
253
+ default: withCtx(() => [
254
+ createTextVNode("Select all ")
255
+ ]),
256
+ _: 1
257
+ }, 8, ["aria-selected", "aria-disabled", "selected-prop", "is-indeterminate"])
258
+ ])) : createCommentVNode("", true),
259
+ unref(virtualOptions).length && !__props.loading ? (openBlock(true), createElementBlock(Fragment, { key: 3 }, renderList(unref(virtualOptions), ({ data, index }) => {
260
+ return openBlock(), createElementBlock("li", {
261
+ key: index,
262
+ "aria-selected": unref(isSelected)(toRaw(unref(selectedOption)), data),
263
+ "aria-disabled": !!__props.disabled,
264
+ onClick: withModifiers(() => unref(onSelect)(data, index), ["stop"])
265
+ }, [
266
+ renderSlot(_ctx.$slots, "default", {
267
+ option: data,
268
+ selected: unref(isSelected)(toRaw(unref(selectedOption)), data),
269
+ active: toRaw(unref(activeIndex)) === index
270
+ }, void 0, true)
271
+ ], 8, _hoisted_14);
272
+ }), 128)) : createCommentVNode("", true)
273
+ ], 16)
274
+ ], 16, _hoisted_9),
275
+ __props.multi ? (openBlock(), createElementBlock("div", _hoisted_15, [
276
+ createVNode(unref(Button), {
277
+ ref: "cancel",
278
+ size: "small",
279
+ variant: "outlined",
280
+ color: "default",
281
+ "test-id": `${__props.testId}-${unref(DropdownTestIdModifiers).ACTION_CANCEL}`,
282
+ onClick: unref(onCancel)
283
+ }, {
284
+ default: withCtx(() => [
285
+ createTextVNode(" Cancel ")
286
+ ]),
287
+ _: 1
288
+ }, 8, ["test-id", "onClick"]),
289
+ createVNode(unref(Button), {
290
+ ref: "apply",
291
+ "data-testid": "mutli-apply",
292
+ size: "small",
293
+ class: "apply-button",
294
+ "test-id": `${__props.testId}-${unref(DropdownTestIdModifiers).ACTION_APPLY}`,
295
+ onClick: unref(onApply)
296
+ }, {
297
+ default: withCtx(() => [
298
+ createTextVNode("Apply ")
299
+ ]),
300
+ _: 1
301
+ }, 8, ["test-id", "onClick"])
302
+ ])) : createCommentVNode("", true)
303
+ ], 32)) : createCommentVNode("", true)
304
+ ], 512)
305
+ ]),
306
+ _: 3
307
+ })
308
+ ]),
309
+ default: withCtx(() => [
310
+ createElementVNode("div", {
311
+ class: normalizeClass(["button__container", {
312
+ "button__container--open": !!unref(open),
313
+ [`button__container--${__props.size}`]: true,
314
+ "button__container--disabled": __props.disabled
315
+ }])
316
+ }, [
317
+ _ctx.$slots.input ? (openBlock(), createElementBlock("div", {
318
+ key: 0,
319
+ ref: "buttonRef",
320
+ onClick: _cache[0] || (_cache[0] = ($event) => unref(toggleMenu)()),
321
+ onKeydown: _cache[1] || (_cache[1] = (...args) => unref(onButtonKeydown) && unref(onButtonKeydown)(...args))
322
+ }, [
323
+ renderSlot(_ctx.$slots, "input", {
324
+ open: unref(open),
325
+ value: unref(displayedValue),
326
+ disabled: __props.disabled
327
+ }, void 0, true)
328
+ ], 544)) : createCommentVNode("", true),
329
+ !_ctx.$slots.input ? (openBlock(), createElementBlock("button", {
330
+ key: 1,
331
+ ref: "buttonRef",
332
+ disabled: __props.disabled,
333
+ "aria-haspopup": true,
334
+ "aria-expanded": !!unref(open),
335
+ "aria-labelledby": unref(labelRef)?.id,
336
+ "aria-disabled": __props.disabled,
337
+ class: normalizeClass([{
338
+ "button--open": !!unref(open),
339
+ [`button--${__props.size}`]: true,
340
+ "button--disabled": __props.disabled
341
+ }, "button"]),
342
+ onKeydown: _cache[2] || (_cache[2] = (...args) => unref(onButtonKeydown) && unref(onButtonKeydown)(...args)),
343
+ onClick: _cache[3] || (_cache[3] = ($event) => unref(toggleMenu)())
344
+ }, [
345
+ _ctx.$slots.image ? (openBlock(), createElementBlock("div", _hoisted_4, [
346
+ renderSlot(_ctx.$slots, "image", {}, void 0, true)
347
+ ])) : createCommentVNode("", true),
348
+ createVNode(unref(Text), {
349
+ size: "sm",
350
+ "is-truncated": ""
351
+ }, {
352
+ default: withCtx(() => [
353
+ createTextVNode(toDisplayString(unref(displayedValue)), 1)
354
+ ]),
355
+ _: 1
356
+ }),
357
+ createElementVNode("div", _hoisted_5, [
358
+ createVNode(unref(Icon), {
359
+ name: "angle-down",
360
+ "font-size": "sm"
361
+ })
362
+ ])
363
+ ], 42, _hoisted_3)) : createCommentVNode("", true)
364
+ ], 2)
365
+ ]),
366
+ _: 3
367
+ }, 8, ["theme", "popper-class", "placement", "skidding", "distance", "flip", "shown", "container", "auto-size", "data-testid"]),
368
+ createElementVNode("div", null, [
369
+ createVNode(unref(Button), {
370
+ color: "default",
371
+ onClick: copyValue
372
+ }, {
373
+ default: withCtx(() => [
374
+ createVNode(unref(Icon), { name: "lock" })
375
+ ]),
376
+ _: 1
377
+ })
378
+ ])
379
+ ]),
380
+ !__props.error && __props.helperText ? (openBlock(), createBlock(unref(Text), {
381
+ key: 0,
382
+ size: "caption",
383
+ class: "helper-text",
384
+ "test-id": `${__props.testId}-${unref(DropdownTestIdModifiers).HELPER_TEXT}`
385
+ }, {
386
+ default: withCtx(() => [
387
+ createTextVNode(toDisplayString(__props.helperText), 1)
388
+ ]),
389
+ _: 1
390
+ }, 8, ["test-id"])) : createCommentVNode("", true),
391
+ __props.error ? (openBlock(), createBlock(unref(Text), {
392
+ key: 1,
393
+ size: "caption",
394
+ class: "helper-text helper-text--error",
395
+ "test-id": `${__props.testId}-${unref(DropdownTestIdModifiers).HELPER_TEXT_ERROR}`
396
+ }, {
397
+ default: withCtx(() => [
398
+ createTextVNode(toDisplayString(__props.error), 1)
399
+ ]),
400
+ _: 1
401
+ }, 8, ["test-id"])) : createCommentVNode("", true)
402
+ ], 42, _hoisted_1);
403
+ };
404
+ }
405
+ });
406
+ var Dropdown = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-2f0b1568"]]);
407
+
408
+ export { Dropdown as default };