@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.
@@ -1,97 +1,97 @@
1
- import { jsx as r, jsxs as G } from "react/jsx-runtime";
2
- import { useVirtualizer as Je } from "../../../../../node_modules/@tanstack/react-virtual/dist/esm/index.js";
3
- import { useState as g, useMemo as $, useRef as y, useCallback as v } from "react";
4
- import { useButton as Pe } from "../../../../../node_modules/react-aria/dist/private/button/useButton.js";
5
- import { useComboBox as Qe } from "../../../../../node_modules/react-aria/dist/private/combobox/useComboBox.js";
6
- import { useFilter as Xe } from "../../../../../node_modules/react-aria/dist/private/i18n/useFilter.js";
7
- import { useListBox as Ze } from "../../../../../node_modules/react-aria/dist/private/listbox/useListBox.js";
8
- import { useComboBoxState as _e } from "../../../../../node_modules/react-stately/dist/private/combobox/useComboBoxState.js";
9
- import { Item as eo } from "../../../../../node_modules/react-stately/dist/private/collections/Item.js";
10
- import { useTheme as oo } from "styled-components";
11
- import { OutlineContainer as to } from "../../../outline-container/index.js";
12
- import { StyledTextInputContainer as ro } from "../../../styles.js";
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 no } from "../option/index.js";
15
- import { StyledStatusMessage as so, ChevronIconButton as lo, StyledDropdown as ve, StyledGroupHeader as ao, StyledEmptyMessage as co } from "../styles.js";
16
- import { describeSelection as io, toSelection as xe } from "../utils.js";
17
- import { Icon as J } from "../../../../icon/index.js";
18
- import { IconButton as po } from "../../../../icon-button/index.js";
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 P } from "../../../../typography/text/index.js";
22
- import { useClickOutside as uo } from "../../../../../hooks/use-click-outside.js";
23
- const Mo = ({
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: b,
27
- error: $e,
28
- helpLink: be,
29
- helpLinkText: we,
30
- helpText: Se,
31
- label: Q,
32
- loadingItems: X,
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: t = !1,
34
+ multiSelection: r = !1,
35
35
  items: o,
36
- onBlur: j,
36
+ onBlur: K,
37
37
  onChange: d,
38
- onClear: Z,
39
- placeholder: Be,
40
- clearable: Ce = !1,
41
- countLabel: _,
42
- emptyMessage: ee,
43
- statusMessage: oe,
44
- required: Ae,
45
- setValue: w,
46
- tooltip: Oe,
47
- value: ze,
48
- watch: S,
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 = oo(), k = h ? void 0 : $e, a = i?.value ?? ze, [M, x] = g(() => t ? io(
52
- xe(S?.(`${l}Options`)),
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
- b ?? [],
54
+ w ?? [],
55
55
  o.find((e) => e.value === "All")?.name,
56
- _
57
- ).text : o.find((e) => e.value === a)?.name ?? ""), [te, B] = g(a), H = (X === !1 || !a) && !t, C = $(
58
- () => H ? o.find((e) => e.value === a)?.name ?? "" : "",
59
- [H, a, o]
60
- ), [Ie, Fe] = g(a), [De, re] = g(C), [Ge, N] = g(a);
61
- a !== Ie ? (Fe(a), re(C), !t && (X !== !0 || !a) && a !== Ge && (N(a), x(
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
- ), B(a ?? ""))) : H && C !== De && (re(C), x(C), B(a ?? ""));
64
- const [ke, U] = g(o), [ne, A] = g(!1), { contains: V } = Xe({ sensitivity: "base" }), W = y(null), Y = y(null), O = y(null), z = y(null), se = y(null), R = y(null), q = y(/* @__PURE__ */ new Set()), Me = $(() => {
65
- const e = q.current, s = Array.from(b ?? []), p = o.some((n) => n.group !== void 0);
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 K = s.includes(n.value), L = s.includes(f.value);
69
+ const b = s.includes(n.value), he = s.includes(f.value);
70
70
  if (p) {
71
- const F = n.group ?? "", D = f.group ?? "";
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 (F !== D)
75
- return F.localeCompare(D);
76
- if (K && !L) return 1;
77
- if (!K && L) return -1;
78
- if (t) {
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 (K && !L) return 1;
86
- if (!K && L) return -1;
87
- if (t) {
88
- const F = e.has(n.value), D = e.has(f.value);
89
- return F && !D ? -1 : !F && D ? 1 : n.name.localeCompare(f.name);
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) => V(n.name, M) || ne ? /* @__PURE__ */ r(
94
- eo,
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
- }, [V, b, M, o, t, ne]), Ne = v(
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
- x(t ? s : e), e === "" || e.endsWith(",") ? A(!0) : (A(!1), i || N(e), B((p) => {
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
- }), U(
110
+ }), j(
111
111
  o.filter(
112
- (p) => V(p.name, t ? s : e)
112
+ (p) => T(p.name, r ? s : e)
113
113
  )
114
114
  ));
115
115
  },
116
- [V, o, i, t, d]
117
- ), Ve = v(
116
+ [T, o, i, r, d]
117
+ ), Te = x(
118
118
  (e) => {
119
- x(o.find((s) => s.value === e)?.name ?? ""), B(e ? String(e) : ""), N(i ? e : String(e ?? "")), i && i.onChange(e), d && d(e ? String(e) : ""), U(o);
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
- ), le = v(
122
+ ), ne = x(
123
123
  (e) => {
124
- e.key === "Enter" && e.preventDefault(), A(!1);
124
+ e.key === "Enter" && e.preventDefault(), O(!1);
125
125
  },
126
126
  []
127
- ), Te = v(() => {
128
- j && j(), i && i.onBlur();
129
- }, [i, j]), Ee = v(() => {
130
- A(!0);
131
- }, []), c = _e({
132
- allowsCustomValue: t,
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: b,
135
- inputValue: M,
136
- items: ke,
134
+ disabledKeys: w,
135
+ inputValue: N,
136
+ items: Ge,
137
137
  menuTrigger: "focus",
138
- shouldCloseOnBlur: !t,
139
- selectedKey: te,
140
- onBlur: Te,
141
- onInputChange: Ne,
142
- onKeyDown: le,
143
- onKeyUp: Ee,
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 && t && S && (q.current = new Set(
146
- xe(S(`${l}Options`)).filter(Boolean)
147
- )), A(
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
- W.current?.focus();
150
+ H.current?.focus();
151
151
  });
152
152
  },
153
- onSelectionChange: t ? void 0 : Ve,
154
- children: Me
155
- }), Ke = v(() => {
156
- x(""), B(null), U(o), c.setSelectedKey(null), c.setInputValue(""), i || N(""), d && d(""), t && w && (w(`${l}Options`, []), w(`${l}CheckAll`, "")), Z?.();
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
- t,
160
+ r,
161
161
  l,
162
- Z,
162
+ Q,
163
163
  d,
164
- w,
164
+ S,
165
165
  c
166
166
  ]), {
167
- buttonProps: Le,
168
- inputProps: je,
169
- listBoxProps: He
170
- } = Qe(
167
+ buttonProps: je,
168
+ inputProps: He,
169
+ listBoxProps: Ue
170
+ } = Ze(
171
171
  {
172
- inputValue: M,
173
- buttonRef: Y,
172
+ inputValue: N,
173
+ buttonRef: U,
174
174
  id: l,
175
- inputRef: W,
176
- label: Q ?? l,
177
- listBoxRef: O,
175
+ inputRef: H,
176
+ label: J ?? l,
177
+ listBoxRef: z,
178
178
  name: l,
179
- placeholder: Be,
179
+ placeholder: Ce,
180
180
  popoverRef: R
181
181
  },
182
182
  c
183
- ), { listBoxProps: ae } = Ze(He, c, O), { buttonProps: Ue } = Pe(Le, Y), { width: ce } = z.current?.getBoundingClientRect() ?? {
183
+ ), { listBoxProps: se } = eo(Ue, c, z), { buttonProps: We } = Xe(je, U), { width: le } = I.current?.getBoundingClientRect() ?? {
184
184
  width: 240
185
185
  };
186
- uo(z, () => {
187
- c.isOpen && !t && c.close();
186
+ ho(I, () => {
187
+ c.isOpen && !r && c.close();
188
188
  }, [R]);
189
- const I = Array.from(c.collection), ie = t ? I.findLastIndex(
190
- (e) => e.key === "All" || q.current.has(String(e.key))
191
- ) : -1, We = $(() => o.map((e) => e.value), [o]), pe = $(
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
- ), Ye = $(
194
+ ), qe = y(
195
195
  () => new Map(o.map((e) => [e.value, e.tag])),
196
196
  [o]
197
- ), T = $(() => I.reduce(
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 = pe.get(String(s.key));
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, [I, pe]), ue = Je({
204
- count: T.length,
205
- estimateSize: (e) => T[e].type === "header" ? 44 : 28,
206
- getScrollElement: () => O.current,
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
- }), fe = c.isOpen && !h, E = fe && !!oe, de = fe && o.length === 0 && !!ee, qe = v(
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
- ), he = E ? (
214
- // A listbox only owns options, so the row itself must stay presentational
215
- /* @__PURE__ */ r(so, { onMouseDown: qe, role: "presentation", children: /* @__PURE__ */ r("div", { "aria-live": "polite", role: "status", children: /* @__PURE__ */ r(
216
- P,
217
- {
218
- color: m.palette.gray[400],
219
- size: "sm",
220
- textOverflow: "auto",
221
- whiteSpace: "wrap",
222
- children: oe
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__ */ G(
227
- to,
234
+ return /* @__PURE__ */ D(
235
+ no,
228
236
  {
229
- containerRef: se,
230
- error: k,
231
- helpLink: be,
232
- helpLinkText: we,
233
- helpText: Se,
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: Q,
237
- required: Ae,
238
- tooltip: Oe,
244
+ label: J,
245
+ required: Oe,
246
+ tooltip: ze,
239
247
  weight: Re,
240
248
  children: [
241
- /* @__PURE__ */ G(
242
- ro,
249
+ /* @__PURE__ */ D(
250
+ so,
243
251
  {
244
- className: `${h ? "disabled" : ""} ${k ? "error" : ""}`,
245
- ref: z,
252
+ className: `${h ? "disabled" : ""} ${G ? "error" : ""}`,
253
+ ref: I,
246
254
  children: [
247
- /* @__PURE__ */ r(
255
+ /* @__PURE__ */ t(
248
256
  "input",
249
257
  {
250
- ...je,
251
- "aria-invalid": k ? "true" : "false",
258
+ ...He,
259
+ "aria-invalid": G ? "true" : "false",
252
260
  "aria-label": l,
253
261
  disabled: h,
254
- onKeyDown: le,
255
- ref: W
262
+ onKeyDown: ne,
263
+ ref: H
256
264
  }
257
265
  ),
258
- k ? /* @__PURE__ */ r(
259
- J,
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
- Ce && !h && (t ? (S?.(`${l}Options`)?.length ?? 0) > 0 : te) ? /* @__PURE__ */ r(
268
- po,
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: Ke,
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__ */ G(
282
- lo,
289
+ /* @__PURE__ */ D(
290
+ co,
283
291
  {
284
- ...Ue,
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: Y,
298
+ ref: U,
291
299
  type: "button",
292
300
  children: [
293
- /* @__PURE__ */ r("div", { className: "chevron-down", children: /* @__PURE__ */ r(
294
- J,
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__ */ r("div", { className: "chevron-up", children: /* @__PURE__ */ r(
304
- J,
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__ */ r(
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: z,
329
- children: /* @__PURE__ */ G(
330
- ve,
331
- {
332
- ...ae,
333
- $hasStatus: E,
334
- $multiSelection: t && !Array.from(b ?? []).includes("All"),
335
- $width: ce,
336
- ref: O,
337
- children: [
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: `${ue.getTotalSize()}px`,
349
+ height: `${ie.getTotalSize()}px`,
343
350
  position: "relative"
344
351
  },
345
- children: ue.getVirtualItems().map((e) => {
346
- const s = T[e.index];
352
+ children: ie.getVirtualItems().map((e) => {
353
+ const s = E[e.index];
347
354
  if (s.type === "header")
348
- return /* @__PURE__ */ r(
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__ */ r(ao, { children: /* @__PURE__ */ r(
360
- P,
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 = I[s.index], u = T[e.index + 1], n = p.key === "All" && u?.type === "header", f = t && s.index === ie && ie >= 0 && s.index < I.length - 1 && !n;
372
- return /* @__PURE__ */ r(
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__ */ r(
385
- no,
391
+ children: /* @__PURE__ */ t(
392
+ lo,
386
393
  {
387
- allItemKeys: We,
388
- containerRef: se,
389
- countLabel: _,
394
+ allItemKeys: Ye,
395
+ containerRef: re,
396
+ countLabel: X,
397
+ icon: Je.get(String(p.key)),
390
398
  item: p,
391
- multiSelection: t,
399
+ multiSelection: r,
392
400
  name: l,
393
401
  popoverRef: R,
394
- setInputValue: x,
395
- setValue: w,
402
+ setInputValue: $,
403
+ setValue: S,
396
404
  state: c,
397
- tag: Ye.get(String(p.key)),
398
- watch: S
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
- he
408
- ]
409
- }
410
- )
414
+ )
415
+ }
416
+ )
417
+ ] })
411
418
  }
412
- ) : !de && !E ? null : /* @__PURE__ */ r(
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: z,
422
- children: /* @__PURE__ */ G(
423
- ve,
424
- {
425
- ...ae,
426
- $hasStatus: E,
427
- $multiSelection: !1,
428
- $width: ce,
429
- ref: O,
430
- children: [
431
- de ? /* @__PURE__ */ r(co, { children: /* @__PURE__ */ r(
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[400],
440
+ color: m.palette.gray[600],
435
441
  size: "md",
436
442
  textOverflow: "auto",
437
443
  whiteSpace: "wrap",
438
- children: ee
444
+ children: Z
439
445
  }
440
- ) }) : null,
441
- he
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
- Mo as ComboBoxField
457
+ Vo as ComboBoxField
453
458
  };