@fluidattacks/design 11.11.0 → 11.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/card/card-with-input/index.js +2 -3
- package/dist/components/filters/filters-menu/index.js +23 -24
- package/dist/components/filters/options-menu/options/index.js +2 -3
- package/dist/components/inputs/fields/combobox/field/index.js +230 -225
- package/dist/components/inputs/fields/combobox/index.stories.d.ts +3 -1
- package/dist/components/inputs/fields/combobox/option/index.d.ts +1 -1
- package/dist/components/inputs/fields/combobox/option/index.js +103 -87
- package/dist/components/inputs/fields/combobox/styles.d.ts +9 -8
- package/dist/components/inputs/fields/combobox/styles.js +84 -64
- package/dist/components/inputs/fields/combobox/types.d.ts +8 -3
- package/dist/components/inputs/fields/month/index.js +20 -20
- package/dist/components/inputs/fields/month/panel.js +0 -2
- package/dist/components/inputs/fields/month/styles.d.ts +2 -1
- package/dist/components/inputs/fields/month/styles.js +21 -16
- package/dist/components/slider/index.js +2 -3
- package/package.json +1 -1
|
@@ -1,97 +1,97 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useVirtualizer as
|
|
3
|
-
import { useState as g, useMemo as
|
|
4
|
-
import { useButton as
|
|
5
|
-
import { useComboBox as
|
|
6
|
-
import { useFilter as
|
|
7
|
-
import { useListBox as
|
|
8
|
-
import { useComboBoxState as
|
|
9
|
-
import { Item as
|
|
10
|
-
import { useTheme as
|
|
11
|
-
import { OutlineContainer as
|
|
12
|
-
import { StyledTextInputContainer as
|
|
1
|
+
import { jsx as t, jsxs as D } from "react/jsx-runtime";
|
|
2
|
+
import { useVirtualizer as Qe } from "../../../../../node_modules/@tanstack/react-virtual/dist/esm/index.js";
|
|
3
|
+
import { useState as g, useMemo as y, useRef as v, useCallback as x } from "react";
|
|
4
|
+
import { useButton as Xe } from "../../../../../node_modules/react-aria/dist/private/button/useButton.js";
|
|
5
|
+
import { useComboBox as Ze } from "../../../../../node_modules/react-aria/dist/private/combobox/useComboBox.js";
|
|
6
|
+
import { useFilter as _e } from "../../../../../node_modules/react-aria/dist/private/i18n/useFilter.js";
|
|
7
|
+
import { useListBox as eo } from "../../../../../node_modules/react-aria/dist/private/listbox/useListBox.js";
|
|
8
|
+
import { useComboBoxState as oo } from "../../../../../node_modules/react-stately/dist/private/combobox/useComboBoxState.js";
|
|
9
|
+
import { Item as to } from "../../../../../node_modules/react-stately/dist/private/collections/Item.js";
|
|
10
|
+
import { useTheme as ro } from "styled-components";
|
|
11
|
+
import { OutlineContainer as no } from "../../../outline-container/index.js";
|
|
12
|
+
import { StyledTextInputContainer as so } from "../../../styles.js";
|
|
13
13
|
import { Popover as ye } from "../../../utils/popover/index.js";
|
|
14
|
-
import { Option as
|
|
15
|
-
import { StyledStatusMessage as
|
|
16
|
-
import { describeSelection as
|
|
17
|
-
import { Icon as
|
|
18
|
-
import { IconButton as
|
|
14
|
+
import { Option as lo } from "../option/index.js";
|
|
15
|
+
import { StyledStatusMessage as ao, ChevronIconButton as co, StyledMenu as ve, StyledDropdown as xe, StyledGroupHeader as io, StyledEmptyMessage as po } from "../styles.js";
|
|
16
|
+
import { describeSelection as uo, toSelection as $e } from "../utils.js";
|
|
17
|
+
import { Icon as Y } from "../../../../icon/index.js";
|
|
18
|
+
import { IconButton as fo } from "../../../../icon-button/index.js";
|
|
19
19
|
import "../../../../typography/heading/index.js";
|
|
20
20
|
import "../../../../typography/span/index.js";
|
|
21
|
-
import { Text as
|
|
22
|
-
import { useClickOutside as
|
|
23
|
-
const
|
|
21
|
+
import { Text as q } from "../../../../typography/text/index.js";
|
|
22
|
+
import { useClickOutside as ho } from "../../../../../hooks/use-click-outside.js";
|
|
23
|
+
const Vo = ({
|
|
24
24
|
field: i,
|
|
25
25
|
disabled: h = !1,
|
|
26
|
-
disabledKeys:
|
|
27
|
-
error:
|
|
28
|
-
helpLink:
|
|
29
|
-
helpLinkText:
|
|
30
|
-
helpText:
|
|
31
|
-
label:
|
|
32
|
-
loadingItems:
|
|
26
|
+
disabledKeys: w,
|
|
27
|
+
error: be,
|
|
28
|
+
helpLink: we,
|
|
29
|
+
helpLinkText: Se,
|
|
30
|
+
helpText: Be,
|
|
31
|
+
label: J,
|
|
32
|
+
loadingItems: P,
|
|
33
33
|
name: l,
|
|
34
|
-
multiSelection:
|
|
34
|
+
multiSelection: r = !1,
|
|
35
35
|
items: o,
|
|
36
|
-
onBlur:
|
|
36
|
+
onBlur: K,
|
|
37
37
|
onChange: d,
|
|
38
|
-
onClear:
|
|
39
|
-
placeholder:
|
|
40
|
-
clearable:
|
|
41
|
-
countLabel:
|
|
42
|
-
emptyMessage:
|
|
43
|
-
statusMessage:
|
|
44
|
-
required:
|
|
45
|
-
setValue:
|
|
46
|
-
tooltip:
|
|
47
|
-
value:
|
|
48
|
-
watch:
|
|
38
|
+
onClear: Q,
|
|
39
|
+
placeholder: Ce,
|
|
40
|
+
clearable: Ae = !1,
|
|
41
|
+
countLabel: X,
|
|
42
|
+
emptyMessage: Z,
|
|
43
|
+
statusMessage: _,
|
|
44
|
+
required: Oe,
|
|
45
|
+
setValue: S,
|
|
46
|
+
tooltip: ze,
|
|
47
|
+
value: Ie,
|
|
48
|
+
watch: B,
|
|
49
49
|
weight: Re
|
|
50
50
|
}) => {
|
|
51
|
-
const m =
|
|
52
|
-
|
|
51
|
+
const m = ro(), G = h ? void 0 : be, a = i?.value ?? Ie, [N, $] = g(() => r ? uo(
|
|
52
|
+
$e(B?.(`${l}Options`)),
|
|
53
53
|
o.map((e) => e.value),
|
|
54
|
-
|
|
54
|
+
w ?? [],
|
|
55
55
|
o.find((e) => e.value === "All")?.name,
|
|
56
|
-
|
|
57
|
-
).text : o.find((e) => e.value === a)?.name ?? ""), [
|
|
58
|
-
() =>
|
|
59
|
-
[
|
|
60
|
-
), [
|
|
61
|
-
a !==
|
|
56
|
+
X
|
|
57
|
+
).text : o.find((e) => e.value === a)?.name ?? ""), [ee, C] = g(a), L = (P === !1 || !a) && !r, A = y(
|
|
58
|
+
() => L ? o.find((e) => e.value === a)?.name ?? "" : "",
|
|
59
|
+
[L, a, o]
|
|
60
|
+
), [Fe, Me] = g(a), [ke, oe] = g(A), [De, V] = g(a);
|
|
61
|
+
a !== Fe ? (Me(a), oe(A), !r && (P !== !0 || !a) && a !== De && (V(a), $(
|
|
62
62
|
o.find((e) => e.value === a)?.name ?? ""
|
|
63
|
-
),
|
|
64
|
-
const [
|
|
65
|
-
const e =
|
|
63
|
+
), C(a ?? ""))) : L && A !== ke && (oe(A), $(A), C(a ?? ""));
|
|
64
|
+
const [Ge, j] = g(o), [te, O] = g(!1), { contains: T } = _e({ sensitivity: "base" }), H = v(null), U = v(null), z = v(null), I = v(null), re = v(null), R = v(null), W = v(/* @__PURE__ */ new Set()), Ne = y(() => {
|
|
65
|
+
const e = W.current, s = Array.from(w ?? []), p = o.some((n) => n.group !== void 0);
|
|
66
66
|
return o.toSorted((n, f) => {
|
|
67
67
|
if (n.value === "All") return -1;
|
|
68
68
|
if (f.value === "All") return 1;
|
|
69
|
-
const
|
|
69
|
+
const b = s.includes(n.value), he = s.includes(f.value);
|
|
70
70
|
if (p) {
|
|
71
|
-
const
|
|
71
|
+
const M = n.group ?? "", k = f.group ?? "";
|
|
72
72
|
if (!n.group && f.group) return -1;
|
|
73
73
|
if (n.group && !f.group) return 1;
|
|
74
|
-
if (
|
|
75
|
-
return
|
|
76
|
-
if (
|
|
77
|
-
if (
|
|
78
|
-
if (
|
|
74
|
+
if (M !== k)
|
|
75
|
+
return M.localeCompare(k);
|
|
76
|
+
if (b !== he) return b ? 1 : -1;
|
|
77
|
+
if (b) return 0;
|
|
78
|
+
if (r) {
|
|
79
79
|
const me = e.has(n.value), ge = e.has(f.value);
|
|
80
80
|
if (me && !ge) return -1;
|
|
81
81
|
if (!me && ge) return 1;
|
|
82
82
|
}
|
|
83
83
|
return n.name.localeCompare(f.name);
|
|
84
84
|
}
|
|
85
|
-
if (
|
|
86
|
-
if (
|
|
87
|
-
if (
|
|
88
|
-
const
|
|
89
|
-
return
|
|
85
|
+
if (b !== he) return b ? 1 : -1;
|
|
86
|
+
if (b) return 0;
|
|
87
|
+
if (r) {
|
|
88
|
+
const M = e.has(n.value), k = e.has(f.value);
|
|
89
|
+
return M && !k ? -1 : !M && k ? 1 : n.name.localeCompare(f.name);
|
|
90
90
|
}
|
|
91
91
|
return 0;
|
|
92
92
|
}).map(
|
|
93
|
-
(n) =>
|
|
94
|
-
|
|
93
|
+
(n) => T(n.name, N) || te ? /* @__PURE__ */ t(
|
|
94
|
+
to,
|
|
95
95
|
{
|
|
96
96
|
"aria-label": n.value,
|
|
97
97
|
hrefLang: n.href,
|
|
@@ -101,162 +101,170 @@ const Mo = ({
|
|
|
101
101
|
n.value
|
|
102
102
|
) : null
|
|
103
103
|
);
|
|
104
|
-
}, [
|
|
104
|
+
}, [T, w, N, o, r, te]), Ve = x(
|
|
105
105
|
(e) => {
|
|
106
106
|
const s = e.split(/,|\s/u).slice(-1)[0].trim();
|
|
107
|
-
|
|
107
|
+
$(r ? s : e), e === "" || e.endsWith(",") ? O(!0) : (O(!1), i || V(e), C((p) => {
|
|
108
108
|
const u = e === "" ? "" : p;
|
|
109
109
|
return i && i.onChange(u), d && d(e), u;
|
|
110
|
-
}),
|
|
110
|
+
}), j(
|
|
111
111
|
o.filter(
|
|
112
|
-
(p) =>
|
|
112
|
+
(p) => T(p.name, r ? s : e)
|
|
113
113
|
)
|
|
114
114
|
));
|
|
115
115
|
},
|
|
116
|
-
[
|
|
117
|
-
),
|
|
116
|
+
[T, o, i, r, d]
|
|
117
|
+
), Te = x(
|
|
118
118
|
(e) => {
|
|
119
|
-
|
|
119
|
+
$(o.find((s) => s.value === e)?.name ?? ""), C(e ? String(e) : ""), V(i ? e : String(e ?? "")), i && i.onChange(e), d && d(e ? String(e) : ""), j(o);
|
|
120
120
|
},
|
|
121
121
|
[o, i, d]
|
|
122
|
-
),
|
|
122
|
+
), ne = x(
|
|
123
123
|
(e) => {
|
|
124
|
-
e.key === "Enter" && e.preventDefault(),
|
|
124
|
+
e.key === "Enter" && e.preventDefault(), O(!1);
|
|
125
125
|
},
|
|
126
126
|
[]
|
|
127
|
-
),
|
|
128
|
-
|
|
129
|
-
}, [i,
|
|
130
|
-
|
|
131
|
-
}, []), c =
|
|
132
|
-
allowsCustomValue:
|
|
127
|
+
), Ee = x(() => {
|
|
128
|
+
K && K(), i && i.onBlur();
|
|
129
|
+
}, [i, K]), Ke = x(() => {
|
|
130
|
+
O(!0);
|
|
131
|
+
}, []), c = oo({
|
|
132
|
+
allowsCustomValue: r,
|
|
133
133
|
allowsEmptyCollection: !0,
|
|
134
|
-
disabledKeys:
|
|
135
|
-
inputValue:
|
|
136
|
-
items:
|
|
134
|
+
disabledKeys: w,
|
|
135
|
+
inputValue: N,
|
|
136
|
+
items: Ge,
|
|
137
137
|
menuTrigger: "focus",
|
|
138
|
-
shouldCloseOnBlur: !
|
|
139
|
-
selectedKey:
|
|
140
|
-
onBlur:
|
|
141
|
-
onInputChange:
|
|
142
|
-
onKeyDown:
|
|
143
|
-
onKeyUp:
|
|
138
|
+
shouldCloseOnBlur: !r,
|
|
139
|
+
selectedKey: ee,
|
|
140
|
+
onBlur: Ee,
|
|
141
|
+
onInputChange: Ve,
|
|
142
|
+
onKeyDown: ne,
|
|
143
|
+
onKeyUp: Ke,
|
|
144
144
|
onOpenChange(e, s) {
|
|
145
|
-
e &&
|
|
146
|
-
|
|
147
|
-
)),
|
|
145
|
+
e && r && B && (W.current = new Set(
|
|
146
|
+
$e(B(`${l}Options`)).filter(Boolean)
|
|
147
|
+
)), O(
|
|
148
148
|
e && (s === "manual" || s === "focus")
|
|
149
149
|
), e && s !== "focus" && requestAnimationFrame(() => {
|
|
150
|
-
|
|
150
|
+
H.current?.focus();
|
|
151
151
|
});
|
|
152
152
|
},
|
|
153
|
-
onSelectionChange:
|
|
154
|
-
children:
|
|
155
|
-
}),
|
|
156
|
-
|
|
153
|
+
onSelectionChange: r ? void 0 : Te,
|
|
154
|
+
children: Ne
|
|
155
|
+
}), Le = x(() => {
|
|
156
|
+
$(""), C(null), j(o), c.setSelectedKey(null), c.setInputValue(""), i || V(""), d && d(""), r && S && (S(`${l}Options`, []), S(`${l}CheckAll`, "")), Q?.();
|
|
157
157
|
}, [
|
|
158
158
|
i,
|
|
159
159
|
o,
|
|
160
|
-
|
|
160
|
+
r,
|
|
161
161
|
l,
|
|
162
|
-
|
|
162
|
+
Q,
|
|
163
163
|
d,
|
|
164
|
-
|
|
164
|
+
S,
|
|
165
165
|
c
|
|
166
166
|
]), {
|
|
167
|
-
buttonProps:
|
|
168
|
-
inputProps:
|
|
169
|
-
listBoxProps:
|
|
170
|
-
} =
|
|
167
|
+
buttonProps: je,
|
|
168
|
+
inputProps: He,
|
|
169
|
+
listBoxProps: Ue
|
|
170
|
+
} = Ze(
|
|
171
171
|
{
|
|
172
|
-
inputValue:
|
|
173
|
-
buttonRef:
|
|
172
|
+
inputValue: N,
|
|
173
|
+
buttonRef: U,
|
|
174
174
|
id: l,
|
|
175
|
-
inputRef:
|
|
176
|
-
label:
|
|
177
|
-
listBoxRef:
|
|
175
|
+
inputRef: H,
|
|
176
|
+
label: J ?? l,
|
|
177
|
+
listBoxRef: z,
|
|
178
178
|
name: l,
|
|
179
|
-
placeholder:
|
|
179
|
+
placeholder: Ce,
|
|
180
180
|
popoverRef: R
|
|
181
181
|
},
|
|
182
182
|
c
|
|
183
|
-
), { listBoxProps:
|
|
183
|
+
), { listBoxProps: se } = eo(Ue, c, z), { buttonProps: We } = Xe(je, U), { width: le } = I.current?.getBoundingClientRect() ?? {
|
|
184
184
|
width: 240
|
|
185
185
|
};
|
|
186
|
-
|
|
187
|
-
c.isOpen && !
|
|
186
|
+
ho(I, () => {
|
|
187
|
+
c.isOpen && !r && c.close();
|
|
188
188
|
}, [R]);
|
|
189
|
-
const
|
|
190
|
-
(e) => e.key === "All" ||
|
|
191
|
-
) : -1,
|
|
189
|
+
const F = Array.from(c.collection), ae = r ? F.findLastIndex(
|
|
190
|
+
(e) => e.key === "All" || W.current.has(String(e.key))
|
|
191
|
+
) : -1, Ye = y(() => o.map((e) => e.value), [o]), ce = y(
|
|
192
192
|
() => new Map(o.map((e) => [e.value, e.group])),
|
|
193
193
|
[o]
|
|
194
|
-
),
|
|
194
|
+
), qe = y(
|
|
195
195
|
() => new Map(o.map((e) => [e.value, e.tag])),
|
|
196
196
|
[o]
|
|
197
|
-
),
|
|
197
|
+
), Je = y(
|
|
198
|
+
() => new Map(o.map((e) => [e.value, e.icon])),
|
|
199
|
+
[o]
|
|
200
|
+
), E = y(() => F.reduce(
|
|
198
201
|
(e, s, p) => {
|
|
199
|
-
const u =
|
|
202
|
+
const u = ce.get(String(s.key));
|
|
200
203
|
return u !== void 0 && u !== e.currentGroup ? (e.result.push({ type: "header", group: u }), e.currentGroup = u) : u === void 0 && e.currentGroup !== void 0 && (e.currentGroup = void 0), e.result.push({ type: "item", index: p }), e;
|
|
201
204
|
},
|
|
202
205
|
{ result: [], currentGroup: void 0 }
|
|
203
|
-
).result, [
|
|
204
|
-
count:
|
|
205
|
-
estimateSize: (e) =>
|
|
206
|
-
getScrollElement: () =>
|
|
206
|
+
).result, [F, ce]), ie = Qe({
|
|
207
|
+
count: E.length,
|
|
208
|
+
estimateSize: (e) => E[e].type === "header" ? 44 : 28,
|
|
209
|
+
getScrollElement: () => z.current,
|
|
207
210
|
useFlushSync: !1
|
|
208
|
-
}),
|
|
211
|
+
}), pe = c.isOpen && !h, ue = pe && !!_, fe = pe && o.length === 0 && !!Z, Pe = x(
|
|
209
212
|
(e) => {
|
|
210
213
|
e.preventDefault();
|
|
211
214
|
},
|
|
212
215
|
[]
|
|
213
|
-
),
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
216
|
+
), de = ue ? /* @__PURE__ */ t(
|
|
217
|
+
ao,
|
|
218
|
+
{
|
|
219
|
+
"aria-live": "polite",
|
|
220
|
+
onMouseDown: Pe,
|
|
221
|
+
role: "status",
|
|
222
|
+
children: /* @__PURE__ */ t(
|
|
223
|
+
q,
|
|
224
|
+
{
|
|
225
|
+
color: m.palette.gray[400],
|
|
226
|
+
size: "md",
|
|
227
|
+
textOverflow: "auto",
|
|
228
|
+
whiteSpace: "wrap",
|
|
229
|
+
children: _
|
|
230
|
+
}
|
|
231
|
+
)
|
|
232
|
+
}
|
|
225
233
|
) : null;
|
|
226
|
-
return /* @__PURE__ */
|
|
227
|
-
|
|
234
|
+
return /* @__PURE__ */ D(
|
|
235
|
+
no,
|
|
228
236
|
{
|
|
229
|
-
containerRef:
|
|
230
|
-
error:
|
|
231
|
-
helpLink:
|
|
232
|
-
helpLinkText:
|
|
233
|
-
helpText:
|
|
237
|
+
containerRef: re,
|
|
238
|
+
error: G,
|
|
239
|
+
helpLink: we,
|
|
240
|
+
helpLinkText: Se,
|
|
241
|
+
helpText: Be,
|
|
234
242
|
htmlFor: l,
|
|
235
243
|
id: `combobox-${l}`,
|
|
236
|
-
label:
|
|
237
|
-
required:
|
|
238
|
-
tooltip:
|
|
244
|
+
label: J,
|
|
245
|
+
required: Oe,
|
|
246
|
+
tooltip: ze,
|
|
239
247
|
weight: Re,
|
|
240
248
|
children: [
|
|
241
|
-
/* @__PURE__ */
|
|
242
|
-
|
|
249
|
+
/* @__PURE__ */ D(
|
|
250
|
+
so,
|
|
243
251
|
{
|
|
244
|
-
className: `${h ? "disabled" : ""} ${
|
|
245
|
-
ref:
|
|
252
|
+
className: `${h ? "disabled" : ""} ${G ? "error" : ""}`,
|
|
253
|
+
ref: I,
|
|
246
254
|
children: [
|
|
247
|
-
/* @__PURE__ */
|
|
255
|
+
/* @__PURE__ */ t(
|
|
248
256
|
"input",
|
|
249
257
|
{
|
|
250
|
-
...
|
|
251
|
-
"aria-invalid":
|
|
258
|
+
...He,
|
|
259
|
+
"aria-invalid": G ? "true" : "false",
|
|
252
260
|
"aria-label": l,
|
|
253
261
|
disabled: h,
|
|
254
|
-
onKeyDown:
|
|
255
|
-
ref:
|
|
262
|
+
onKeyDown: ne,
|
|
263
|
+
ref: H
|
|
256
264
|
}
|
|
257
265
|
),
|
|
258
|
-
|
|
259
|
-
|
|
266
|
+
G ? /* @__PURE__ */ t(
|
|
267
|
+
Y,
|
|
260
268
|
{
|
|
261
269
|
icon: "exclamation-circle",
|
|
262
270
|
iconClass: "error-icon",
|
|
@@ -264,34 +272,34 @@ const Mo = ({
|
|
|
264
272
|
iconSize: "lg"
|
|
265
273
|
}
|
|
266
274
|
) : void 0,
|
|
267
|
-
|
|
268
|
-
|
|
275
|
+
Ae && !h && (r ? (B?.(`${l}Options`)?.length ?? 0) > 0 : ee) ? /* @__PURE__ */ t(
|
|
276
|
+
fo,
|
|
269
277
|
{
|
|
270
278
|
icon: "xmark",
|
|
271
279
|
iconColor: m.palette.gray[400],
|
|
272
280
|
iconSize: "sm",
|
|
273
281
|
iconType: "fa-light",
|
|
274
|
-
onClick:
|
|
282
|
+
onClick: Le,
|
|
275
283
|
px: 0.125,
|
|
276
284
|
py: 0.125,
|
|
277
285
|
type: "reset",
|
|
278
286
|
variant: "ghost"
|
|
279
287
|
}
|
|
280
288
|
) : void 0,
|
|
281
|
-
/* @__PURE__ */
|
|
282
|
-
|
|
289
|
+
/* @__PURE__ */ D(
|
|
290
|
+
co,
|
|
283
291
|
{
|
|
284
|
-
...
|
|
292
|
+
...We,
|
|
285
293
|
$variant: "ghost",
|
|
286
294
|
className: `action ${c.isOpen && !h ? "open" : "closed"}`,
|
|
287
295
|
disabled: h,
|
|
288
296
|
px: 0.125,
|
|
289
297
|
py: 0.125,
|
|
290
|
-
ref:
|
|
298
|
+
ref: U,
|
|
291
299
|
type: "button",
|
|
292
300
|
children: [
|
|
293
|
-
/* @__PURE__ */
|
|
294
|
-
|
|
301
|
+
/* @__PURE__ */ t("div", { className: "chevron-down", children: /* @__PURE__ */ t(
|
|
302
|
+
Y,
|
|
295
303
|
{
|
|
296
304
|
clickable: !1,
|
|
297
305
|
icon: "chevron-down",
|
|
@@ -300,8 +308,8 @@ const Mo = ({
|
|
|
300
308
|
iconType: "fa-light"
|
|
301
309
|
}
|
|
302
310
|
) }),
|
|
303
|
-
/* @__PURE__ */
|
|
304
|
-
|
|
311
|
+
/* @__PURE__ */ t("div", { className: "chevron-up", children: /* @__PURE__ */ t(
|
|
312
|
+
Y,
|
|
305
313
|
{
|
|
306
314
|
clickable: !1,
|
|
307
315
|
icon: "chevron-up",
|
|
@@ -316,7 +324,7 @@ const Mo = ({
|
|
|
316
324
|
]
|
|
317
325
|
}
|
|
318
326
|
),
|
|
319
|
-
c.isOpen && c.collection.size > 0 && !h ? /* @__PURE__ */
|
|
327
|
+
c.isOpen && c.collection.size > 0 && !h ? /* @__PURE__ */ t(
|
|
320
328
|
ye,
|
|
321
329
|
{
|
|
322
330
|
className: "dropdown",
|
|
@@ -325,27 +333,26 @@ const Mo = ({
|
|
|
325
333
|
placement: "bottom start",
|
|
326
334
|
popoverRef: R,
|
|
327
335
|
state: c,
|
|
328
|
-
triggerRef:
|
|
329
|
-
children: /* @__PURE__ */
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
/* @__PURE__ */ r(
|
|
336
|
+
triggerRef: I,
|
|
337
|
+
children: /* @__PURE__ */ D(ve, { $width: le, children: [
|
|
338
|
+
de,
|
|
339
|
+
/* @__PURE__ */ t(
|
|
340
|
+
xe,
|
|
341
|
+
{
|
|
342
|
+
...se,
|
|
343
|
+
$multiSelection: r && !Array.from(w ?? []).includes("All"),
|
|
344
|
+
ref: z,
|
|
345
|
+
children: /* @__PURE__ */ t(
|
|
339
346
|
"div",
|
|
340
347
|
{
|
|
341
348
|
style: {
|
|
342
|
-
height: `${
|
|
349
|
+
height: `${ie.getTotalSize()}px`,
|
|
343
350
|
position: "relative"
|
|
344
351
|
},
|
|
345
|
-
children:
|
|
346
|
-
const s =
|
|
352
|
+
children: ie.getVirtualItems().map((e) => {
|
|
353
|
+
const s = E[e.index];
|
|
347
354
|
if (s.type === "header")
|
|
348
|
-
return /* @__PURE__ */
|
|
355
|
+
return /* @__PURE__ */ t(
|
|
349
356
|
"div",
|
|
350
357
|
{
|
|
351
358
|
style: {
|
|
@@ -356,8 +363,8 @@ const Mo = ({
|
|
|
356
363
|
height: `${e.size}px`,
|
|
357
364
|
transform: `translateY(${e.start}px)`
|
|
358
365
|
},
|
|
359
|
-
children: /* @__PURE__ */
|
|
360
|
-
|
|
366
|
+
children: /* @__PURE__ */ t(io, { children: /* @__PURE__ */ t(
|
|
367
|
+
q,
|
|
361
368
|
{
|
|
362
369
|
color: m.palette.gray[400],
|
|
363
370
|
fontWeight: "bold",
|
|
@@ -368,8 +375,8 @@ const Mo = ({
|
|
|
368
375
|
},
|
|
369
376
|
`header-${e.index}`
|
|
370
377
|
);
|
|
371
|
-
const p =
|
|
372
|
-
return /* @__PURE__ */
|
|
378
|
+
const p = F[s.index], u = E[e.index + 1], n = p.key === "All" && u?.type === "header", f = r && s.index === ae && ae >= 0 && s.index < F.length - 1 && !n;
|
|
379
|
+
return /* @__PURE__ */ t(
|
|
373
380
|
"div",
|
|
374
381
|
{
|
|
375
382
|
style: {
|
|
@@ -381,21 +388,22 @@ const Mo = ({
|
|
|
381
388
|
transform: `translateY(${e.start}px)`,
|
|
382
389
|
borderBottom: f ? `1px solid ${m.palette.gray[200]}` : void 0
|
|
383
390
|
},
|
|
384
|
-
children: /* @__PURE__ */
|
|
385
|
-
|
|
391
|
+
children: /* @__PURE__ */ t(
|
|
392
|
+
lo,
|
|
386
393
|
{
|
|
387
|
-
allItemKeys:
|
|
388
|
-
containerRef:
|
|
389
|
-
countLabel:
|
|
394
|
+
allItemKeys: Ye,
|
|
395
|
+
containerRef: re,
|
|
396
|
+
countLabel: X,
|
|
397
|
+
icon: Je.get(String(p.key)),
|
|
390
398
|
item: p,
|
|
391
|
-
multiSelection:
|
|
399
|
+
multiSelection: r,
|
|
392
400
|
name: l,
|
|
393
401
|
popoverRef: R,
|
|
394
|
-
setInputValue:
|
|
395
|
-
setValue:
|
|
402
|
+
setInputValue: $,
|
|
403
|
+
setValue: S,
|
|
396
404
|
state: c,
|
|
397
|
-
tag:
|
|
398
|
-
watch:
|
|
405
|
+
tag: qe.get(String(p.key)),
|
|
406
|
+
watch: B
|
|
399
407
|
}
|
|
400
408
|
)
|
|
401
409
|
},
|
|
@@ -403,13 +411,12 @@ const Mo = ({
|
|
|
403
411
|
);
|
|
404
412
|
})
|
|
405
413
|
}
|
|
406
|
-
)
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
)
|
|
414
|
+
)
|
|
415
|
+
}
|
|
416
|
+
)
|
|
417
|
+
] })
|
|
411
418
|
}
|
|
412
|
-
) : !
|
|
419
|
+
) : !fe && !ue ? null : /* @__PURE__ */ t(
|
|
413
420
|
ye,
|
|
414
421
|
{
|
|
415
422
|
className: "dropdown",
|
|
@@ -418,30 +425,28 @@ const Mo = ({
|
|
|
418
425
|
placement: "bottom start",
|
|
419
426
|
popoverRef: R,
|
|
420
427
|
state: c,
|
|
421
|
-
triggerRef:
|
|
422
|
-
children: /* @__PURE__ */
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
P,
|
|
428
|
+
triggerRef: I,
|
|
429
|
+
children: /* @__PURE__ */ D(ve, { $width: le, children: [
|
|
430
|
+
de,
|
|
431
|
+
/* @__PURE__ */ t(
|
|
432
|
+
xe,
|
|
433
|
+
{
|
|
434
|
+
...se,
|
|
435
|
+
$multiSelection: !1,
|
|
436
|
+
ref: z,
|
|
437
|
+
children: fe ? /* @__PURE__ */ t(po, { children: /* @__PURE__ */ t(
|
|
438
|
+
q,
|
|
433
439
|
{
|
|
434
|
-
color: m.palette.gray[
|
|
440
|
+
color: m.palette.gray[600],
|
|
435
441
|
size: "md",
|
|
436
442
|
textOverflow: "auto",
|
|
437
443
|
whiteSpace: "wrap",
|
|
438
|
-
children:
|
|
444
|
+
children: Z
|
|
439
445
|
}
|
|
440
|
-
) }) : null
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
)
|
|
446
|
+
) }) : null
|
|
447
|
+
}
|
|
448
|
+
)
|
|
449
|
+
] })
|
|
445
450
|
}
|
|
446
451
|
)
|
|
447
452
|
]
|
|
@@ -449,5 +454,5 @@ const Mo = ({
|
|
|
449
454
|
);
|
|
450
455
|
};
|
|
451
456
|
export {
|
|
452
|
-
|
|
457
|
+
Vo as ComboBoxField
|
|
453
458
|
};
|