@bikdotai/bik-component-library 0.0.875-beta.3 → 0.0.875
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/cjs/components/dropdown/OpenedDropdown/components/OpennedDropdown.js +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/OpennedDropdown.js.map +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuItem.js +10 -27
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuItem.js.map +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuList.js +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuList.js.map +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/SelectAllMenu.js +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/SelectAllMenu.js.map +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.js +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.js.map +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/utils/iterationOnOptions.js +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/utils/iterationOnOptions.js.map +1 -1
- package/dist/cjs/components/dropdown/hooks/useDropdown.js +1 -1
- package/dist/cjs/components/dropdown/hooks/useDropdown.js.map +1 -1
- package/dist/cjs/components/toaster/Toaster.styled.js +20 -35
- package/dist/cjs/components/toaster/Toaster.styled.js.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.js +278 -300
- package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.js.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuItem.d.ts +0 -8
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuItem.js +126 -170
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuItem.js.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.d.ts +0 -4
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.js +112 -144
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.js.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/SelectAllMenu.d.ts +0 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/SelectAllMenu.js +31 -32
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/SelectAllMenu.js.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.d.ts +0 -2
- package/dist/esm/components/dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.js +39 -54
- package/dist/esm/components/dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.js.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/utils/iterationOnOptions.d.ts +16 -18
- package/dist/esm/components/dropdown/OpenedDropdown/utils/iterationOnOptions.js +27 -73
- package/dist/esm/components/dropdown/OpenedDropdown/utils/iterationOnOptions.js.map +1 -1
- package/dist/esm/components/dropdown/hooks/useDropdown.d.ts +17 -4
- package/dist/esm/components/dropdown/hooks/useDropdown.js +163 -176
- package/dist/esm/components/dropdown/hooks/useDropdown.js.map +1 -1
- package/dist/esm/components/dropdown/type.d.ts +0 -22
- package/dist/esm/components/toaster/Toaster.styled.js +22 -37
- package/dist/esm/components/toaster/Toaster.styled.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,425 +1,403 @@
|
|
|
1
|
-
import { jsx as u, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { useCallback as
|
|
5
|
-
import { ZeroState as
|
|
6
|
-
import { useOutside as
|
|
7
|
-
import { COLORS as
|
|
8
|
-
import { useDropdown as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
const ee = {
|
|
1
|
+
import { jsx as u, jsxs as N } from "react/jsx-runtime";
|
|
2
|
+
import Me from "../../../../assets/icons/errorInfo.svg.js";
|
|
3
|
+
import Ne from "../../../../assets/icons/refresh-purple.svg.js";
|
|
4
|
+
import { useCallback as se, useState as A, useRef as m, useEffect as f } from "react";
|
|
5
|
+
import { ZeroState as Ge } from "../../../zeroState/ZeroState.js";
|
|
6
|
+
import { useOutside as Je } from "../../../../hooks/useOutside.js";
|
|
7
|
+
import { COLORS as E } from "../../../../constants/Theme.js";
|
|
8
|
+
import { useDropdown as Qe } from "../../hooks/useDropdown.js";
|
|
9
|
+
import { Description as Xe } from "./description/Description.js";
|
|
10
|
+
import { FreeFormMenu as Ye } from "./menu/FreeFormMenu.js";
|
|
11
|
+
import { MenuList as _e } from "./menu/MenuList.js";
|
|
12
|
+
import { SelectAllMenu as et } from "./menu/SelectAllMenu.js";
|
|
13
|
+
import tt from "./multiSelect/MultiSelectDropdownBottomBar.js";
|
|
14
|
+
import { OpennedDropdownContainer as nt, MenuListContainer as ot } from "./OpennedDropdown.styled.js";
|
|
15
|
+
import { SearchBox as rt } from "./searchbox/SearchBox.js";
|
|
16
|
+
import { SearchZeroState as st } from "./searchbox/SearchZeroState.js";
|
|
17
|
+
const G = {
|
|
19
18
|
height: 304,
|
|
20
19
|
width: 290
|
|
21
|
-
},
|
|
22
|
-
options:
|
|
23
|
-
isSearchable:
|
|
24
|
-
searchPlaceholder:
|
|
25
|
-
staticMenuHeight:
|
|
26
|
-
isMultiSelect:
|
|
27
|
-
maxSelections:
|
|
28
|
-
width:
|
|
29
|
-
allowFreeForm:
|
|
30
|
-
height:
|
|
31
|
-
onClose:
|
|
32
|
-
onSelect:
|
|
33
|
-
onSearch:
|
|
34
|
-
version:
|
|
35
|
-
skipSorting:
|
|
36
|
-
headerRef:
|
|
37
|
-
hideSelectAll:
|
|
38
|
-
primaryButtonText:
|
|
39
|
-
onInfiniteScroll:
|
|
40
|
-
onMultiSelectClear:
|
|
41
|
-
onDropdownItemClick:
|
|
42
|
-
buttonOptions:
|
|
43
|
-
isSearchLoading:
|
|
44
|
-
isOptionsLoading:
|
|
45
|
-
optionsErrorState:
|
|
46
|
-
disableSearchOptions:
|
|
47
|
-
disableSearchedOptionExcept:
|
|
48
|
-
useDefaultCursor:
|
|
49
|
-
containerStyle:
|
|
50
|
-
zeroState:
|
|
51
|
-
isDraggable:
|
|
52
|
-
onOptionsReorder:
|
|
53
|
-
hideClearButton:
|
|
54
|
-
showCheckboxForCustomElement:
|
|
55
|
-
checkboxActiveColor:
|
|
56
|
-
brandSelectedRow:
|
|
57
|
-
childrenLayout: h,
|
|
58
|
-
collapsibleChildren: A,
|
|
59
|
-
defaultCollapsed: j,
|
|
60
|
-
hideSelectedCount: We
|
|
20
|
+
}, Tt = ({
|
|
21
|
+
options: k,
|
|
22
|
+
isSearchable: g,
|
|
23
|
+
searchPlaceholder: ie,
|
|
24
|
+
staticMenuHeight: J,
|
|
25
|
+
isMultiSelect: i,
|
|
26
|
+
maxSelections: I,
|
|
27
|
+
width: B,
|
|
28
|
+
allowFreeForm: Q,
|
|
29
|
+
height: le,
|
|
30
|
+
onClose: X,
|
|
31
|
+
onSelect: ce,
|
|
32
|
+
onSearch: d,
|
|
33
|
+
version: l,
|
|
34
|
+
skipSorting: ue,
|
|
35
|
+
headerRef: de,
|
|
36
|
+
hideSelectAll: ae,
|
|
37
|
+
primaryButtonText: fe,
|
|
38
|
+
onInfiniteScroll: pe,
|
|
39
|
+
onMultiSelectClear: he,
|
|
40
|
+
onDropdownItemClick: R,
|
|
41
|
+
buttonOptions: me,
|
|
42
|
+
isSearchLoading: ge,
|
|
43
|
+
isOptionsLoading: we,
|
|
44
|
+
optionsErrorState: w,
|
|
45
|
+
disableSearchOptions: ye,
|
|
46
|
+
disableSearchedOptionExcept: be,
|
|
47
|
+
useDefaultCursor: Oe,
|
|
48
|
+
containerStyle: xe = {},
|
|
49
|
+
zeroState: H = void 0,
|
|
50
|
+
isDraggable: y = !1,
|
|
51
|
+
onOptionsReorder: b,
|
|
52
|
+
hideClearButton: Le = !1,
|
|
53
|
+
showCheckboxForCustomElement: Te = !1,
|
|
54
|
+
checkboxActiveColor: U,
|
|
55
|
+
brandSelectedRow: q
|
|
61
56
|
}) => {
|
|
62
|
-
const
|
|
57
|
+
const Z = se(
|
|
63
58
|
(e) => {
|
|
64
|
-
if (!
|
|
65
|
-
const t = [],
|
|
66
|
-
return e.forEach((
|
|
67
|
-
|
|
68
|
-
}), [...t, ...
|
|
59
|
+
if (!y || !i) return e;
|
|
60
|
+
const t = [], n = [];
|
|
61
|
+
return e.forEach((s) => {
|
|
62
|
+
s.options ? n.push(s) : s.selected ? t.push(s) : n.push(s);
|
|
63
|
+
}), [...t, ...n];
|
|
69
64
|
},
|
|
70
|
-
[
|
|
71
|
-
), [
|
|
72
|
-
() =>
|
|
73
|
-
),
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}, [
|
|
77
|
-
|
|
78
|
-
}, [
|
|
79
|
-
|
|
80
|
-
}, [
|
|
81
|
-
|
|
65
|
+
[y, i]
|
|
66
|
+
), [v, Y] = A(
|
|
67
|
+
() => Z(k)
|
|
68
|
+
), _ = m(v), ee = m(!1), j = m(b);
|
|
69
|
+
f(() => {
|
|
70
|
+
Y(Z(k));
|
|
71
|
+
}, [k, Z]), f(() => {
|
|
72
|
+
_.current = v;
|
|
73
|
+
}, [v]), f(() => {
|
|
74
|
+
j.current = b;
|
|
75
|
+
}, [b]), f(() => () => {
|
|
76
|
+
ee.current && j.current && j.current(_.current);
|
|
82
77
|
}, []);
|
|
83
|
-
const
|
|
78
|
+
const Se = se(
|
|
84
79
|
(e) => {
|
|
85
|
-
|
|
80
|
+
Y(e), l === "2.0" ? b?.(e) : ee.current = !0;
|
|
86
81
|
},
|
|
87
|
-
[
|
|
88
|
-
),
|
|
89
|
-
dropdownOptions:
|
|
90
|
-
search:
|
|
91
|
-
searchedString:
|
|
92
|
-
searchedOptions:
|
|
93
|
-
searchError:
|
|
94
|
-
retrySearch:
|
|
95
|
-
onApplyHandler:
|
|
96
|
-
selectAllHandler:
|
|
82
|
+
[b, l]
|
|
83
|
+
), Ce = y ? v : k, {
|
|
84
|
+
dropdownOptions: a,
|
|
85
|
+
search: Ee,
|
|
86
|
+
searchedString: o,
|
|
87
|
+
searchedOptions: O,
|
|
88
|
+
searchError: ke,
|
|
89
|
+
retrySearch: Ie,
|
|
90
|
+
onApplyHandler: K,
|
|
91
|
+
selectAllHandler: Re,
|
|
97
92
|
onMultiSelectClear: ve,
|
|
98
|
-
onFreeFormSelect:
|
|
99
|
-
onMultiSelectApply:
|
|
100
|
-
latestDropdownOptionsRef:
|
|
101
|
-
getSelectedOptions:
|
|
102
|
-
getCurrentSelectionCount:
|
|
103
|
-
} =
|
|
104
|
-
c,
|
|
105
|
-
Be,
|
|
106
|
-
me,
|
|
107
|
-
ge || x,
|
|
93
|
+
onFreeFormSelect: De,
|
|
94
|
+
onMultiSelectApply: Fe,
|
|
95
|
+
latestDropdownOptionsRef: We,
|
|
96
|
+
getSelectedOptions: Ae,
|
|
97
|
+
getCurrentSelectionCount: Be
|
|
98
|
+
} = Qe(
|
|
108
99
|
l,
|
|
109
|
-
p,
|
|
110
100
|
Ce,
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
);
|
|
122
|
-
e.length && (J.current = [
|
|
123
|
-
...J.current,
|
|
124
|
-
...e
|
|
125
|
-
], ce((t) => [...t, ...e]));
|
|
126
|
-
}, [f, A, j]);
|
|
127
|
-
const $e = (e) => {
|
|
128
|
-
ce(
|
|
129
|
-
(t) => t.includes(e) ? t.filter((o) => o !== e) : [...t, e]
|
|
130
|
-
), G(-1);
|
|
131
|
-
}, L = g(null), ie = g([]), Q = g(null);
|
|
132
|
-
ot(
|
|
133
|
-
L,
|
|
101
|
+
ce,
|
|
102
|
+
ue || y,
|
|
103
|
+
i,
|
|
104
|
+
d,
|
|
105
|
+
ye,
|
|
106
|
+
be,
|
|
107
|
+
I
|
|
108
|
+
), [He, P] = A(B ?? G.width), [p, V] = A(null), [D, te] = A(-1), x = m(null), ne = m([]), $ = m(null);
|
|
109
|
+
Je(
|
|
110
|
+
x,
|
|
134
111
|
() => {
|
|
135
|
-
if (
|
|
136
|
-
const e =
|
|
137
|
-
|
|
112
|
+
if (V(null), i && l === "2.0") {
|
|
113
|
+
const e = Ae(
|
|
114
|
+
We.current
|
|
138
115
|
);
|
|
139
|
-
|
|
116
|
+
X?.(e);
|
|
140
117
|
} else
|
|
141
|
-
|
|
118
|
+
X?.(a);
|
|
142
119
|
},
|
|
143
|
-
[
|
|
144
|
-
),
|
|
120
|
+
[de, ne]
|
|
121
|
+
), f(() => {
|
|
145
122
|
const e = setTimeout(() => {
|
|
146
|
-
|
|
123
|
+
x.current && x.current.focus({ preventScroll: !0 });
|
|
147
124
|
}, 0);
|
|
148
125
|
return () => clearTimeout(e);
|
|
149
|
-
}, [])
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
126
|
+
}, []);
|
|
127
|
+
const Ue = (e) => {
|
|
128
|
+
const t = [];
|
|
129
|
+
return e.forEach((n) => {
|
|
130
|
+
if (n.options)
|
|
131
|
+
n.options.forEach((r) => {
|
|
132
|
+
r.disabled || t.push(r);
|
|
133
|
+
});
|
|
134
|
+
else {
|
|
135
|
+
const s = n;
|
|
136
|
+
s.disabled || t.push(s);
|
|
137
|
+
}
|
|
138
|
+
}), t;
|
|
139
|
+
};
|
|
140
|
+
f(() => {
|
|
141
|
+
const e = (n) => {
|
|
142
|
+
const r = Ue(o && d ? O : a);
|
|
143
|
+
if (r.length !== 0) {
|
|
144
|
+
if (n.key === "ArrowDown")
|
|
145
|
+
n.preventDefault(), te((c) => {
|
|
146
|
+
const S = c < r.length - 1 ? c + 1 : 0;
|
|
159
147
|
return setTimeout(() => {
|
|
160
|
-
const
|
|
161
|
-
`[data-option-index="${
|
|
148
|
+
const C = $.current?.querySelector(
|
|
149
|
+
`[data-option-index="${S}"]`
|
|
162
150
|
);
|
|
163
|
-
|
|
151
|
+
C && C.scrollIntoView({
|
|
164
152
|
block: "nearest",
|
|
165
153
|
behavior: "smooth"
|
|
166
154
|
});
|
|
167
|
-
}, 0),
|
|
155
|
+
}, 0), S;
|
|
168
156
|
});
|
|
169
|
-
else if (
|
|
170
|
-
|
|
171
|
-
const
|
|
157
|
+
else if (n.key === "ArrowUp")
|
|
158
|
+
n.preventDefault(), te((c) => {
|
|
159
|
+
const S = c > 0 ? c - 1 : r.length - 1;
|
|
172
160
|
return setTimeout(() => {
|
|
173
|
-
const
|
|
174
|
-
`[data-option-index="${
|
|
161
|
+
const C = $.current?.querySelector(
|
|
162
|
+
`[data-option-index="${S}"]`
|
|
175
163
|
);
|
|
176
|
-
|
|
164
|
+
C && C.scrollIntoView({
|
|
177
165
|
block: "nearest",
|
|
178
166
|
behavior: "smooth"
|
|
179
167
|
});
|
|
180
|
-
}, 0),
|
|
168
|
+
}, 0), S;
|
|
181
169
|
});
|
|
182
|
-
else if (
|
|
183
|
-
|
|
184
|
-
const
|
|
185
|
-
|
|
186
|
-
...
|
|
187
|
-
selected: !
|
|
188
|
-
}),
|
|
170
|
+
else if (n.key === "Enter" && D >= 0) {
|
|
171
|
+
n.preventDefault();
|
|
172
|
+
const c = r[D];
|
|
173
|
+
c && (K({
|
|
174
|
+
...c,
|
|
175
|
+
selected: !c.selected
|
|
176
|
+
}), R && R(c));
|
|
189
177
|
}
|
|
190
178
|
}
|
|
191
|
-
}, t =
|
|
179
|
+
}, t = x.current;
|
|
192
180
|
if (t)
|
|
193
181
|
return t.addEventListener("keydown", e), () => {
|
|
194
182
|
t.removeEventListener("keydown", e);
|
|
195
183
|
};
|
|
196
184
|
}, [
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
h,
|
|
205
|
-
P
|
|
185
|
+
D,
|
|
186
|
+
o,
|
|
187
|
+
O,
|
|
188
|
+
a,
|
|
189
|
+
d,
|
|
190
|
+
K,
|
|
191
|
+
R
|
|
206
192
|
]);
|
|
207
|
-
const
|
|
208
|
-
function
|
|
209
|
-
|
|
193
|
+
const h = le ?? G.height, F = typeof h == "number" ? g && i ? h - 96 : g && !i || !g && i ? h - 48 : h : h;
|
|
194
|
+
function qe(e, t) {
|
|
195
|
+
V(e && t ? {
|
|
210
196
|
title: e,
|
|
211
197
|
description: t
|
|
212
198
|
} : null);
|
|
213
199
|
}
|
|
214
|
-
|
|
215
|
-
const e =
|
|
216
|
-
if (
|
|
217
|
-
|
|
200
|
+
f(() => {
|
|
201
|
+
const e = B ?? G.width;
|
|
202
|
+
if (p === null)
|
|
203
|
+
P(e);
|
|
218
204
|
else if (typeof e == "number")
|
|
219
|
-
|
|
205
|
+
P(e * 2);
|
|
220
206
|
else if (typeof e == "string" && e.endsWith("px")) {
|
|
221
207
|
const t = parseInt(e.replace("px", "")) * 2;
|
|
222
|
-
|
|
208
|
+
P(t);
|
|
223
209
|
}
|
|
224
|
-
}, [
|
|
225
|
-
const
|
|
226
|
-
if (!
|
|
210
|
+
}, [p]);
|
|
211
|
+
const W = [], z = ((e) => {
|
|
212
|
+
if (!i || !I && I !== 0)
|
|
227
213
|
return e;
|
|
228
|
-
const
|
|
229
|
-
return
|
|
230
|
-
if (
|
|
214
|
+
const n = Be(a) >= I;
|
|
215
|
+
return n ? e.map((s) => {
|
|
216
|
+
if (s.options)
|
|
231
217
|
return {
|
|
232
|
-
...
|
|
233
|
-
options:
|
|
234
|
-
...
|
|
235
|
-
disabled:
|
|
218
|
+
...s,
|
|
219
|
+
options: s.options.map((r) => ({
|
|
220
|
+
...r,
|
|
221
|
+
disabled: r.disabled || !r.selected && n
|
|
236
222
|
}))
|
|
237
223
|
};
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
} : r;
|
|
224
|
+
{
|
|
225
|
+
const r = s;
|
|
226
|
+
return {
|
|
227
|
+
...r,
|
|
228
|
+
disabled: r.disabled || !r.selected && n
|
|
229
|
+
};
|
|
230
|
+
}
|
|
246
231
|
}) : e;
|
|
247
232
|
})(
|
|
248
|
-
(
|
|
249
|
-
if (
|
|
233
|
+
(o && d ? O : a).map((e) => {
|
|
234
|
+
if (o && !d)
|
|
250
235
|
if (e.options) {
|
|
251
236
|
const t = { ...e };
|
|
252
|
-
return t.options = t.options.filter((
|
|
253
|
-
!
|
|
237
|
+
return t.options = t.options.filter((n) => n.label?.toLowerCase().includes(o.toLowerCase()) ? (W.push(
|
|
238
|
+
!o || n.label === o
|
|
254
239
|
), !0) : !1), t.options.length > 0 ? t : null;
|
|
255
240
|
} else
|
|
256
|
-
return e.label?.toLowerCase().includes(
|
|
257
|
-
!
|
|
241
|
+
return e.label?.toLowerCase().includes(o.toLowerCase()) || e.searchKey?.toLowerCase().includes(o.toLowerCase()) ? (W.push(
|
|
242
|
+
!o || e.label === o
|
|
258
243
|
), e) : null;
|
|
259
244
|
return e;
|
|
260
245
|
}).filter((e) => e !== null)
|
|
261
|
-
),
|
|
246
|
+
), M = !!g && o && z.length === 0, L = !o && !!we, T = !o && !!w && !L, Ze = !o && !z.length && !L && !T, oe = L || T || Ze, je = H?.title || "No results found", Ke = H?.subTitle || "Please try again later or contact us at support@bik.ai if you require further assistance.", Pe = w?.title || "Failed to load options", Ve = w?.subTitle || "Something went wrong while fetching the list. Please try again", $e = {
|
|
262
247
|
buttonText: "Try again",
|
|
263
248
|
buttonType: "text",
|
|
264
249
|
size: "small",
|
|
265
|
-
buttonTextColor:
|
|
266
|
-
customIconColor:
|
|
267
|
-
LeadingIcon:
|
|
268
|
-
},
|
|
250
|
+
buttonTextColor: E.background.inverseLight,
|
|
251
|
+
customIconColor: E.background.inverseLight,
|
|
252
|
+
LeadingIcon: Ne
|
|
253
|
+
}, re = {
|
|
269
254
|
IconHolderStyle: {
|
|
270
|
-
background:
|
|
255
|
+
background: E.background.negative.light
|
|
271
256
|
},
|
|
272
|
-
Icon: /* @__PURE__ */ u(
|
|
273
|
-
...
|
|
257
|
+
Icon: /* @__PURE__ */ u(Me, { color: E.content.negative, width: 24, height: 24 }),
|
|
258
|
+
...w
|
|
274
259
|
};
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
...
|
|
260
|
+
re.actionButton = {
|
|
261
|
+
...$e,
|
|
262
|
+
...w?.actionButton ?? {}
|
|
278
263
|
};
|
|
279
|
-
const
|
|
280
|
-
return /* @__PURE__ */
|
|
281
|
-
|
|
264
|
+
const ze = L ? void 0 : T ? re : H;
|
|
265
|
+
return /* @__PURE__ */ N(
|
|
266
|
+
nt,
|
|
282
267
|
{
|
|
283
|
-
version:
|
|
284
|
-
ref:
|
|
268
|
+
version: l,
|
|
269
|
+
ref: x,
|
|
285
270
|
tabIndex: -1,
|
|
286
271
|
style: {
|
|
287
272
|
// maxWidth: descriptionInfo ? 800 : 400,
|
|
288
|
-
width:
|
|
289
|
-
...
|
|
273
|
+
width: He,
|
|
274
|
+
...xe,
|
|
290
275
|
outline: "none"
|
|
291
276
|
},
|
|
292
277
|
children: [
|
|
293
|
-
/* @__PURE__ */
|
|
278
|
+
/* @__PURE__ */ N(
|
|
294
279
|
"div",
|
|
295
280
|
{
|
|
296
281
|
style: {
|
|
297
|
-
width:
|
|
282
|
+
width: p ? "50%" : "100%",
|
|
298
283
|
display: "flex",
|
|
299
284
|
flexDirection: "column",
|
|
300
285
|
background: "white"
|
|
301
286
|
},
|
|
302
287
|
children: [
|
|
303
|
-
!!
|
|
304
|
-
|
|
288
|
+
!!g && /* @__PURE__ */ u(
|
|
289
|
+
rt,
|
|
305
290
|
{
|
|
306
|
-
onSearch:
|
|
307
|
-
version:
|
|
308
|
-
placeholder:
|
|
291
|
+
onSearch: Ee,
|
|
292
|
+
version: l,
|
|
293
|
+
placeholder: ie
|
|
309
294
|
}
|
|
310
295
|
),
|
|
311
|
-
|
|
296
|
+
oe ? /* @__PURE__ */ u(
|
|
312
297
|
"div",
|
|
313
298
|
{
|
|
314
299
|
"data-testid": "dropdown-options-zero-state",
|
|
315
300
|
style: {
|
|
316
|
-
height:
|
|
301
|
+
height: J ? F : h,
|
|
317
302
|
display: "flex",
|
|
318
|
-
background:
|
|
303
|
+
background: E.background.base
|
|
319
304
|
},
|
|
320
305
|
children: /* @__PURE__ */ u(
|
|
321
|
-
|
|
306
|
+
Ge,
|
|
322
307
|
{
|
|
323
|
-
...
|
|
324
|
-
isLoading:
|
|
325
|
-
title:
|
|
326
|
-
subTitle:
|
|
308
|
+
...ze ?? {},
|
|
309
|
+
isLoading: L,
|
|
310
|
+
title: T ? Pe : je,
|
|
311
|
+
subTitle: T ? Ve : Ke
|
|
327
312
|
}
|
|
328
313
|
)
|
|
329
314
|
}
|
|
330
|
-
) : /* @__PURE__ */
|
|
331
|
-
|
|
315
|
+
) : /* @__PURE__ */ N(
|
|
316
|
+
ot,
|
|
332
317
|
{
|
|
333
318
|
"data-testid": "dropdown-menu-list",
|
|
334
|
-
minHeight:
|
|
335
|
-
maxHeight:
|
|
336
|
-
ref:
|
|
319
|
+
minHeight: J ? F : void 0,
|
|
320
|
+
maxHeight: F,
|
|
321
|
+
ref: $,
|
|
337
322
|
children: [
|
|
338
|
-
!!
|
|
339
|
-
|
|
323
|
+
!!i && !M && !ae && /* @__PURE__ */ u(
|
|
324
|
+
et,
|
|
340
325
|
{
|
|
341
|
-
version:
|
|
342
|
-
options:
|
|
343
|
-
onSelect:
|
|
344
|
-
checkboxActiveColor:
|
|
345
|
-
brandSelectedRow:
|
|
346
|
-
childrenLayout: h
|
|
326
|
+
version: l,
|
|
327
|
+
options: o && d ? O : a,
|
|
328
|
+
onSelect: Re,
|
|
329
|
+
checkboxActiveColor: U,
|
|
330
|
+
brandSelectedRow: q
|
|
347
331
|
}
|
|
348
332
|
),
|
|
349
|
-
!
|
|
350
|
-
|
|
333
|
+
!Q && M && /* @__PURE__ */ u(
|
|
334
|
+
st,
|
|
351
335
|
{
|
|
352
|
-
isLoading:
|
|
353
|
-
errorMessage:
|
|
354
|
-
onRetry:
|
|
355
|
-
height:
|
|
356
|
-
searchedString:
|
|
357
|
-
containerWidth:
|
|
358
|
-
version:
|
|
336
|
+
isLoading: ge,
|
|
337
|
+
errorMessage: ke,
|
|
338
|
+
onRetry: Ie,
|
|
339
|
+
height: F,
|
|
340
|
+
searchedString: o,
|
|
341
|
+
containerWidth: B,
|
|
342
|
+
version: l
|
|
359
343
|
}
|
|
360
344
|
),
|
|
361
|
-
|
|
362
|
-
|
|
345
|
+
Q && (M || !!W.length && W.every((e) => e === !1)) && /* @__PURE__ */ u(
|
|
346
|
+
Ye,
|
|
363
347
|
{
|
|
364
|
-
version:
|
|
365
|
-
isMultiSelect:
|
|
366
|
-
onSelect:
|
|
367
|
-
searchedString:
|
|
368
|
-
checkboxActiveColor:
|
|
369
|
-
brandSelectedRow:
|
|
348
|
+
version: l,
|
|
349
|
+
isMultiSelect: i,
|
|
350
|
+
onSelect: De,
|
|
351
|
+
searchedString: o,
|
|
352
|
+
checkboxActiveColor: U,
|
|
353
|
+
brandSelectedRow: q
|
|
370
354
|
}
|
|
371
355
|
),
|
|
372
356
|
/* @__PURE__ */ u(
|
|
373
|
-
|
|
357
|
+
_e,
|
|
374
358
|
{
|
|
375
|
-
onInfiniteScroll:
|
|
376
|
-
onDropdownItemClick:
|
|
377
|
-
version:
|
|
378
|
-
onSelect:
|
|
379
|
-
showDescription:
|
|
380
|
-
isMultiSelect:
|
|
381
|
-
options:
|
|
382
|
-
useDefaultCursor:
|
|
383
|
-
ref:
|
|
384
|
-
focusedIndex:
|
|
385
|
-
isDraggable:
|
|
386
|
-
onOptionsReorder:
|
|
387
|
-
showCheckboxForCustomElement:
|
|
388
|
-
checkboxActiveColor:
|
|
389
|
-
brandSelectedRow:
|
|
390
|
-
childrenLayout: h,
|
|
391
|
-
collapsibleChildren: A,
|
|
392
|
-
collapsedParents: P,
|
|
393
|
-
onToggleCollapsed: $e
|
|
359
|
+
onInfiniteScroll: pe,
|
|
360
|
+
onDropdownItemClick: R,
|
|
361
|
+
version: l,
|
|
362
|
+
onSelect: K,
|
|
363
|
+
showDescription: qe,
|
|
364
|
+
isMultiSelect: i,
|
|
365
|
+
options: z,
|
|
366
|
+
useDefaultCursor: Oe,
|
|
367
|
+
ref: ne,
|
|
368
|
+
focusedIndex: D,
|
|
369
|
+
isDraggable: y,
|
|
370
|
+
onOptionsReorder: Se,
|
|
371
|
+
showCheckboxForCustomElement: Te,
|
|
372
|
+
checkboxActiveColor: U,
|
|
373
|
+
brandSelectedRow: q
|
|
394
374
|
}
|
|
395
375
|
)
|
|
396
376
|
]
|
|
397
377
|
}
|
|
398
378
|
),
|
|
399
|
-
!!
|
|
400
|
-
|
|
379
|
+
!!i && !oe && l !== "2.0" && /* @__PURE__ */ u(
|
|
380
|
+
tt,
|
|
401
381
|
{
|
|
402
382
|
onClear: () => {
|
|
403
|
-
ve(),
|
|
383
|
+
ve(), he?.();
|
|
404
384
|
},
|
|
405
|
-
onApply:
|
|
406
|
-
list:
|
|
407
|
-
buttonText:
|
|
408
|
-
buttonOptions:
|
|
409
|
-
hideClearButton:
|
|
410
|
-
hideSelectedCount: We,
|
|
411
|
-
childrenLayout: h
|
|
385
|
+
onApply: Fe,
|
|
386
|
+
list: o && d ? O : a,
|
|
387
|
+
buttonText: fe,
|
|
388
|
+
buttonOptions: me,
|
|
389
|
+
hideClearButton: Le
|
|
412
390
|
}
|
|
413
391
|
)
|
|
414
392
|
]
|
|
415
393
|
}
|
|
416
394
|
),
|
|
417
|
-
!!
|
|
418
|
-
|
|
395
|
+
!!p && /* @__PURE__ */ u(
|
|
396
|
+
Xe,
|
|
419
397
|
{
|
|
420
|
-
title:
|
|
421
|
-
description:
|
|
422
|
-
version:
|
|
398
|
+
title: p.title,
|
|
399
|
+
description: p.description,
|
|
400
|
+
version: l
|
|
423
401
|
}
|
|
424
402
|
)
|
|
425
403
|
]
|
|
@@ -427,6 +405,6 @@ const ee = {
|
|
|
427
405
|
);
|
|
428
406
|
};
|
|
429
407
|
export {
|
|
430
|
-
|
|
408
|
+
Tt as OpenedDropdown
|
|
431
409
|
};
|
|
432
410
|
//# sourceMappingURL=OpennedDropdown.js.map
|