@wrdagency/blockout 0.1.3 → 0.1.4
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/assets/style.css +1 -1
- package/dist/components/button/button.d.ts +10 -3
- package/dist/components/button/button.js +13 -26
- package/dist/components/button/icon.d.ts +1 -2
- package/dist/components/button/icon.js +6 -10
- package/dist/components/controls/select-control/component.js +590 -585
- package/package.json +1 -1
|
@@ -1,42 +1,43 @@
|
|
|
1
|
-
import { jsx as w, jsxs as
|
|
2
|
-
import { normalizeOption as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { noop as
|
|
5
|
-
import { e as
|
|
6
|
-
import * as
|
|
7
|
-
import { useMemo as Ce, useState as de, useRef as se, useEffect as ae, useCallback as
|
|
8
|
-
import { w as
|
|
9
|
-
import { g as
|
|
10
|
-
import { BaseControl as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { c as at, d as
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import { u as _n } from "../../../
|
|
21
|
-
import { u as
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import { u as xt } from "../../../
|
|
27
|
-
|
|
1
|
+
import { jsx as w, jsxs as X, Fragment as we } from "react/jsx-runtime";
|
|
2
|
+
import { normalizeOption as Bt } from "../../../types/options.js";
|
|
3
|
+
import { cn as jt } from "../../../utils/css.js";
|
|
4
|
+
import { noop as Wt } from "../../../utils/noop.js";
|
|
5
|
+
import { e as Zt } from "../../../CaretDown.es-eySGHzTJ.js";
|
|
6
|
+
import * as N from "react";
|
|
7
|
+
import { useMemo as Ce, useState as de, useRef as se, useEffect as ae, useCallback as Xe, useContext as Pe, createContext as ke, startTransition as $t } from "react";
|
|
8
|
+
import { w as qt } from "../../../SSRBase.es-BUXS72ra.js";
|
|
9
|
+
import { g as Yt } from "../../../_commonjsHelpers-C6fGbg64.js";
|
|
10
|
+
import { BaseControl as zt } from "../base-control/index.js";
|
|
11
|
+
import { Affix as Fe } from "../base-control/affix.js";
|
|
12
|
+
import { useBaseControlProps as Qt } from "../base-control/props.js";
|
|
13
|
+
import { C as Xt, a as Gt } from "../../../P7GR5CS5-BoOYUfSQ.js";
|
|
14
|
+
import { a as ne, _ as oe, i as me, m as H, o as A, v as Ge, f as re, q as le, $ as Je, Y as ie, X as D, U as $, Z as Me, j as R, e as Q, H as et, l as he, n as ye, ab as tt, r as nt, s as Ae, t as Jt, P as ot, Q as rt, R as en, h as tn, u as nn, ac as lt, c as on, a0 as rn, A as ln, ad as sn, ae as an, af as un, x as Be, ag as Ie, a6 as cn, B as dn, b as Ve, a9 as mn, W as fn, K as vn, k as pn } from "../../../LMDWO4NN--KEvZePp.js";
|
|
15
|
+
import { c as st, b as at, f as bn, e as hn, d as Sn, g as gn } from "../../../WMYDSCNQ-Dy1O-Kdl.js";
|
|
16
|
+
import { c as it, d as ut, b as ct } from "../../../4CMBR7SL-BAGv8IL2.js";
|
|
17
|
+
import { m as dt, o as Cn, t as mt, c as ft, s as G, b as J, g as vt, e as pt, f as be, u as bt, a as En, p as On } from "../../../YV4JVR4I-kvospPUa.js";
|
|
18
|
+
import { a as ht, C as yn, b as St, c as An, d as xn, e as gt, u as In, f as wn } from "../../../S43UC3DV-Dn8EFLaT.js";
|
|
19
|
+
import { t as Ct } from "../../../7PRQYBBV-91wrWGjk.js";
|
|
20
|
+
import { u as Ne, a as De, S as Et, b as Pn, c as Vn, d as _n, e as je } from "../../../DG5U6ZEL-CVj-Czp2.js";
|
|
21
|
+
import { u as kn } from "../../../MTZPJQMC-DyCWBG18.js";
|
|
22
|
+
import { u as Ot } from "../../../T7VMP3TM-DeRMoW8g.js";
|
|
23
|
+
import { i as yt } from "../../../WYCIER3C-DRn904Gy.js";
|
|
24
|
+
import { u as At } from "../../../5JTVDSTH-CG1NL6Fw.js";
|
|
25
|
+
import { h as _e } from "../../../PFRGBC2K-BEg8ahbY.js";
|
|
26
|
+
import { u as xt } from "../../../UQQRIHDV-Bu8e1bYU.js";
|
|
27
|
+
import { u as It } from "../../../6VRAQV3D-2rb_aClP.js";
|
|
28
|
+
var Mn = "span", Nn = {
|
|
28
29
|
top: "4,10 8,6 12,10",
|
|
29
30
|
right: "6,4 10,8 6,12",
|
|
30
31
|
bottom: "4,6 8,10 12,6",
|
|
31
32
|
left: "10,4 6,8 10,12"
|
|
32
|
-
},
|
|
33
|
+
}, wt = ne(function(n) {
|
|
33
34
|
var o = n, { store: e, placement: r } = o, l = oe(o, ["store", "placement"]);
|
|
34
|
-
const a =
|
|
35
|
+
const a = kn();
|
|
35
36
|
e = e || a, me(
|
|
36
37
|
e,
|
|
37
38
|
process.env.NODE_ENV !== "production" && "PopoverDisclosureArrow must be wrapped in a PopoverDisclosure component."
|
|
38
39
|
);
|
|
39
|
-
const
|
|
40
|
+
const v = e.useState((s) => r || s.placement).split("-")[0], c = Nn[v], i = Ce(
|
|
40
41
|
() => /* @__PURE__ */ w(
|
|
41
42
|
"svg",
|
|
42
43
|
{
|
|
@@ -54,7 +55,7 @@ var kn = "span", Mn = {
|
|
|
54
55
|
),
|
|
55
56
|
[c]
|
|
56
57
|
);
|
|
57
|
-
return l =
|
|
58
|
+
return l = H(A({
|
|
58
59
|
children: i,
|
|
59
60
|
"aria-hidden": !0
|
|
60
61
|
}, l), {
|
|
@@ -63,23 +64,23 @@ var kn = "span", Mn = {
|
|
|
63
64
|
height: "1em",
|
|
64
65
|
pointerEvents: "none"
|
|
65
66
|
}, l.style)
|
|
66
|
-
}),
|
|
67
|
+
}), Ge(l);
|
|
67
68
|
});
|
|
68
69
|
re(
|
|
69
70
|
function(n) {
|
|
70
|
-
const o =
|
|
71
|
-
return le(
|
|
71
|
+
const o = wt(n);
|
|
72
|
+
return le(Mn, o);
|
|
72
73
|
}
|
|
73
74
|
);
|
|
74
75
|
function Dn(t = {}) {
|
|
75
76
|
var n = t, {
|
|
76
77
|
combobox: o
|
|
77
|
-
} = n, e =
|
|
78
|
+
} = n, e = Je(n, [
|
|
78
79
|
"combobox"
|
|
79
80
|
]);
|
|
80
|
-
const r =
|
|
81
|
+
const r = dt(
|
|
81
82
|
e.store,
|
|
82
|
-
|
|
83
|
+
Cn(o, [
|
|
83
84
|
"value",
|
|
84
85
|
"items",
|
|
85
86
|
"renderedItems",
|
|
@@ -91,8 +92,8 @@ function Dn(t = {}) {
|
|
|
91
92
|
"disclosureElement"
|
|
92
93
|
])
|
|
93
94
|
);
|
|
94
|
-
|
|
95
|
-
const l = r.getState(), a =
|
|
95
|
+
mt(e, r);
|
|
96
|
+
const l = r.getState(), a = it(ie($({}, e), {
|
|
96
97
|
store: r,
|
|
97
98
|
virtualFocus: D(
|
|
98
99
|
e.virtualFocus,
|
|
@@ -115,19 +116,19 @@ function Dn(t = {}) {
|
|
|
115
116
|
l.orientation,
|
|
116
117
|
"vertical"
|
|
117
118
|
)
|
|
118
|
-
})), m =
|
|
119
|
+
})), m = st(ie($({}, e), {
|
|
119
120
|
store: r,
|
|
120
121
|
placement: D(
|
|
121
122
|
e.placement,
|
|
122
123
|
l.placement,
|
|
123
124
|
"bottom-start"
|
|
124
125
|
)
|
|
125
|
-
})),
|
|
126
|
+
})), v = new String(""), c = ie($($({}, a.getState()), m.getState()), {
|
|
126
127
|
value: D(
|
|
127
128
|
e.value,
|
|
128
129
|
l.value,
|
|
129
130
|
e.defaultValue,
|
|
130
|
-
|
|
131
|
+
v
|
|
131
132
|
),
|
|
132
133
|
setValueOnMove: D(
|
|
133
134
|
e.setValueOnMove,
|
|
@@ -137,41 +138,41 @@ function Dn(t = {}) {
|
|
|
137
138
|
labelElement: D(l.labelElement, null),
|
|
138
139
|
selectElement: D(l.selectElement, null),
|
|
139
140
|
listElement: D(l.listElement, null)
|
|
140
|
-
}), i =
|
|
141
|
-
return
|
|
141
|
+
}), i = ft(c, a, m, r);
|
|
142
|
+
return G(
|
|
142
143
|
i,
|
|
143
|
-
() =>
|
|
144
|
-
if (s.value !==
|
|
145
|
-
const
|
|
146
|
-
(
|
|
144
|
+
() => J(i, ["value", "items"], (s) => {
|
|
145
|
+
if (s.value !== v || !s.items.length) return;
|
|
146
|
+
const f = s.items.find(
|
|
147
|
+
(C) => !C.disabled && C.value != null
|
|
147
148
|
);
|
|
148
|
-
(
|
|
149
|
+
(f == null ? void 0 : f.value) != null && i.setState("value", f.value);
|
|
149
150
|
})
|
|
150
|
-
),
|
|
151
|
+
), G(
|
|
151
152
|
i,
|
|
152
|
-
() =>
|
|
153
|
+
() => J(i, ["mounted"], (s) => {
|
|
153
154
|
s.mounted || i.setState("activeId", c.activeId);
|
|
154
155
|
})
|
|
155
|
-
),
|
|
156
|
+
), G(
|
|
156
157
|
i,
|
|
157
|
-
() =>
|
|
158
|
+
() => J(i, ["mounted", "items", "value"], (s) => {
|
|
158
159
|
if (o || s.mounted) return;
|
|
159
|
-
const
|
|
160
|
-
if (
|
|
160
|
+
const f = Ct(s.value), C = f[f.length - 1];
|
|
161
|
+
if (C == null) return;
|
|
161
162
|
const d = s.items.find(
|
|
162
|
-
(p) => !p.disabled && p.value ===
|
|
163
|
+
(p) => !p.disabled && p.value === C
|
|
163
164
|
);
|
|
164
165
|
d && i.setState("activeId", d.id);
|
|
165
166
|
})
|
|
166
|
-
),
|
|
167
|
+
), G(
|
|
167
168
|
i,
|
|
168
|
-
() =>
|
|
169
|
-
const { mounted:
|
|
170
|
-
if (!s.setValueOnMove &&
|
|
169
|
+
() => vt(i, ["setValueOnMove", "moves"], (s) => {
|
|
170
|
+
const { mounted: f, value: C, activeId: d } = i.getState();
|
|
171
|
+
if (!s.setValueOnMove && f || Array.isArray(C) || !s.moves || !d) return;
|
|
171
172
|
const p = a.item(d);
|
|
172
173
|
!p || p.disabled || p.value == null || i.setState("value", p.value);
|
|
173
174
|
})
|
|
174
|
-
), ie(
|
|
175
|
+
), ie($($($({}, a), m), i), {
|
|
175
176
|
combobox: o,
|
|
176
177
|
setValue: (s) => i.setState("value", s),
|
|
177
178
|
setLabelElement: (s) => i.setState("labelElement", s),
|
|
@@ -179,38 +180,38 @@ function Dn(t = {}) {
|
|
|
179
180
|
setListElement: (s) => i.setState("listElement", s)
|
|
180
181
|
});
|
|
181
182
|
}
|
|
182
|
-
function
|
|
183
|
-
const n =
|
|
184
|
-
return t =
|
|
183
|
+
function Ln(t) {
|
|
184
|
+
const n = ht();
|
|
185
|
+
return t = H(A({}, t), {
|
|
185
186
|
combobox: t.combobox !== void 0 ? t.combobox : n
|
|
186
|
-
}),
|
|
187
|
+
}), ut(t);
|
|
187
188
|
}
|
|
188
|
-
function
|
|
189
|
-
return
|
|
190
|
-
|
|
191
|
-
|
|
189
|
+
function Tn(t, n, o) {
|
|
190
|
+
return Me(n, [o.combobox]), be(t, o, "value", "setValue"), be(t, o, "setValueOnMove"), Object.assign(
|
|
191
|
+
at(
|
|
192
|
+
ct(t, n, o),
|
|
192
193
|
n,
|
|
193
194
|
o
|
|
194
195
|
),
|
|
195
196
|
{ combobox: o.combobox }
|
|
196
197
|
);
|
|
197
198
|
}
|
|
198
|
-
function
|
|
199
|
-
t =
|
|
200
|
-
const [n, o] =
|
|
201
|
-
return
|
|
199
|
+
function Rn(t = {}) {
|
|
200
|
+
t = Ln(t);
|
|
201
|
+
const [n, o] = pt(Dn, t);
|
|
202
|
+
return Tn(n, o, t);
|
|
202
203
|
}
|
|
203
|
-
var
|
|
204
|
+
var Kn = "span", Hn = ne(
|
|
204
205
|
function(n) {
|
|
205
206
|
var o = n, { store: e } = o, r = oe(o, ["store"]);
|
|
206
|
-
const l =
|
|
207
|
-
return e = e || l, r =
|
|
207
|
+
const l = Ne();
|
|
208
|
+
return e = e || l, r = wt(A({ store: e }, r)), r;
|
|
208
209
|
}
|
|
209
|
-
),
|
|
210
|
-
const o =
|
|
211
|
-
return le(
|
|
212
|
-
}),
|
|
213
|
-
function
|
|
210
|
+
), Un = re(function(n) {
|
|
211
|
+
const o = Hn(n);
|
|
212
|
+
return le(Kn, o);
|
|
213
|
+
}), Fn = "button";
|
|
214
|
+
function Bn(t) {
|
|
214
215
|
return Array.from(t.selectedOptions).map((n) => n.value);
|
|
215
216
|
}
|
|
216
217
|
function Oe(t, n) {
|
|
@@ -227,14 +228,14 @@ function Oe(t, n) {
|
|
|
227
228
|
return r == null ? void 0 : r.id;
|
|
228
229
|
};
|
|
229
230
|
}
|
|
230
|
-
var
|
|
231
|
+
var jn = ne(function(n) {
|
|
231
232
|
var o = n, {
|
|
232
233
|
store: e,
|
|
233
234
|
name: r,
|
|
234
235
|
form: l,
|
|
235
236
|
required: a,
|
|
236
237
|
showOnKeyDown: m = !0,
|
|
237
|
-
moveOnKeyDown:
|
|
238
|
+
moveOnKeyDown: v = !0,
|
|
238
239
|
toggleOnPress: c = !0,
|
|
239
240
|
toggleOnClick: i = c
|
|
240
241
|
} = o, s = oe(o, [
|
|
@@ -247,50 +248,50 @@ var Bn = ne(function(n) {
|
|
|
247
248
|
"toggleOnPress",
|
|
248
249
|
"toggleOnClick"
|
|
249
250
|
]);
|
|
250
|
-
const
|
|
251
|
-
e = e ||
|
|
251
|
+
const f = De();
|
|
252
|
+
e = e || f, me(
|
|
252
253
|
e,
|
|
253
254
|
process.env.NODE_ENV !== "production" && "Select must receive a `store` prop or be wrapped in a SelectProvider component."
|
|
254
255
|
);
|
|
255
|
-
const
|
|
256
|
-
var
|
|
257
|
-
if (
|
|
258
|
-
const { orientation: q, items: Y, activeId:
|
|
259
|
-
ArrowUp: (
|
|
260
|
-
ArrowRight: (
|
|
261
|
-
ArrowDown: (
|
|
262
|
-
ArrowLeft: (
|
|
263
|
-
}[
|
|
264
|
-
pe && p(
|
|
265
|
-
const Se =
|
|
256
|
+
const C = s.onKeyDown, d = R(m), p = R(v), O = e.useState("placement").split("-")[0], g = e.useState("value"), K = Array.isArray(g), x = Q((S) => {
|
|
257
|
+
var E;
|
|
258
|
+
if (C == null || C(S), S.defaultPrevented || !e) return;
|
|
259
|
+
const { orientation: q, items: Y, activeId: ee } = e.getState(), fe = q !== "horizontal", ue = q !== "vertical", M = !!((E = Y.find((Ee) => !Ee.disabled && Ee.value != null)) != null && E.rowId), pe = {
|
|
260
|
+
ArrowUp: (M || fe) && Oe(e, e.up),
|
|
261
|
+
ArrowRight: (M || ue) && Oe(e, e.next),
|
|
262
|
+
ArrowDown: (M || fe) && Oe(e, e.down),
|
|
263
|
+
ArrowLeft: (M || ue) && Oe(e, e.previous)
|
|
264
|
+
}[S.key];
|
|
265
|
+
pe && p(S) && (S.preventDefault(), e.move(pe()));
|
|
266
|
+
const Se = O === "top" || O === "bottom";
|
|
266
267
|
({
|
|
267
268
|
ArrowDown: Se,
|
|
268
269
|
ArrowUp: Se,
|
|
269
|
-
ArrowLeft:
|
|
270
|
-
ArrowRight:
|
|
271
|
-
})[
|
|
270
|
+
ArrowLeft: O === "left",
|
|
271
|
+
ArrowRight: O === "right"
|
|
272
|
+
})[S.key] && d(S) && (S.preventDefault(), e.move(ee), et(S.currentTarget, "keyup", e.show));
|
|
272
273
|
});
|
|
273
274
|
s = he(
|
|
274
275
|
s,
|
|
275
|
-
(
|
|
276
|
+
(S) => /* @__PURE__ */ w(Et, { value: e, children: S }),
|
|
276
277
|
[e]
|
|
277
278
|
);
|
|
278
|
-
const [
|
|
279
|
+
const [Z, k] = de(!1), P = se(!1);
|
|
279
280
|
ae(() => {
|
|
280
|
-
const
|
|
281
|
-
|
|
282
|
-
}, [
|
|
283
|
-
const
|
|
284
|
-
var
|
|
285
|
-
return (
|
|
286
|
-
}), b = s["aria-label"], y = s["aria-labelledby"] ||
|
|
281
|
+
const S = P.current;
|
|
282
|
+
P.current = !1, !S && k(!1);
|
|
283
|
+
}, [g]);
|
|
284
|
+
const F = e.useState((S) => {
|
|
285
|
+
var E;
|
|
286
|
+
return (E = S.labelElement) == null ? void 0 : E.id;
|
|
287
|
+
}), b = s["aria-label"], y = s["aria-labelledby"] || F, B = e.useState((S) => {
|
|
287
288
|
if (r)
|
|
288
|
-
return
|
|
289
|
-
}),
|
|
289
|
+
return S.items;
|
|
290
|
+
}), j = Ce(() => [...new Set(B == null ? void 0 : B.map((S) => S.value).filter((S) => S != null))], [B]);
|
|
290
291
|
s = he(
|
|
291
292
|
s,
|
|
292
|
-
(
|
|
293
|
-
/* @__PURE__ */
|
|
293
|
+
(S) => r ? /* @__PURE__ */ X(we, { children: [
|
|
294
|
+
/* @__PURE__ */ X(
|
|
294
295
|
"select",
|
|
295
296
|
{
|
|
296
297
|
style: {
|
|
@@ -312,25 +313,25 @@ var Bn = ne(function(n) {
|
|
|
312
313
|
form: l,
|
|
313
314
|
required: a,
|
|
314
315
|
disabled: s.disabled,
|
|
315
|
-
value:
|
|
316
|
-
multiple:
|
|
316
|
+
value: g,
|
|
317
|
+
multiple: K,
|
|
317
318
|
onFocus: () => {
|
|
318
|
-
var
|
|
319
|
-
return (
|
|
319
|
+
var E;
|
|
320
|
+
return (E = e == null ? void 0 : e.getState().selectElement) == null ? void 0 : E.focus();
|
|
320
321
|
},
|
|
321
|
-
onChange: (
|
|
322
|
-
|
|
323
|
-
|
|
322
|
+
onChange: (E) => {
|
|
323
|
+
P.current = !0, k(!0), e == null || e.setValue(
|
|
324
|
+
K ? Bn(E.target) : E.target.value
|
|
324
325
|
);
|
|
325
326
|
},
|
|
326
327
|
children: [
|
|
327
|
-
|
|
328
|
-
|
|
328
|
+
Ct(g).map((E) => E == null || j.includes(E) ? null : /* @__PURE__ */ w("option", { value: E, children: E }, E)),
|
|
329
|
+
j.map((E) => /* @__PURE__ */ w("option", { value: E, children: E }, E))
|
|
329
330
|
]
|
|
330
331
|
}
|
|
331
332
|
),
|
|
332
|
-
|
|
333
|
-
] }) :
|
|
333
|
+
S
|
|
334
|
+
] }) : S,
|
|
334
335
|
[
|
|
335
336
|
e,
|
|
336
337
|
b,
|
|
@@ -338,42 +339,42 @@ var Bn = ne(function(n) {
|
|
|
338
339
|
r,
|
|
339
340
|
l,
|
|
340
341
|
a,
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
342
|
+
g,
|
|
343
|
+
K,
|
|
344
|
+
j,
|
|
344
345
|
s.disabled
|
|
345
346
|
]
|
|
346
347
|
);
|
|
347
|
-
const
|
|
348
|
-
|
|
349
|
-
/* @__PURE__ */ w(
|
|
350
|
-
] }),
|
|
351
|
-
return s =
|
|
348
|
+
const h = /* @__PURE__ */ X(we, { children: [
|
|
349
|
+
g,
|
|
350
|
+
/* @__PURE__ */ w(Un, {})
|
|
351
|
+
] }), _ = e.useState("contentElement");
|
|
352
|
+
return s = H(A({
|
|
352
353
|
role: "combobox",
|
|
353
354
|
"aria-autocomplete": "none",
|
|
354
|
-
"aria-labelledby":
|
|
355
|
-
"aria-haspopup":
|
|
356
|
-
"data-autofill":
|
|
355
|
+
"aria-labelledby": F,
|
|
356
|
+
"aria-haspopup": tt(_, "listbox"),
|
|
357
|
+
"data-autofill": Z || void 0,
|
|
357
358
|
"data-name": r,
|
|
358
|
-
children:
|
|
359
|
+
children: h
|
|
359
360
|
}, s), {
|
|
360
361
|
ref: ye(e.setSelectElement, s.ref),
|
|
361
|
-
onKeyDown:
|
|
362
|
-
}), s =
|
|
363
|
-
}),
|
|
364
|
-
const o =
|
|
365
|
-
return le(
|
|
362
|
+
onKeyDown: x
|
|
363
|
+
}), s = bn(A({ store: e, toggleOnClick: i }, s)), s = Ot(A({ store: e }, s)), s;
|
|
364
|
+
}), Wn = re(function(n) {
|
|
365
|
+
const o = jn(n);
|
|
366
|
+
return le(Fn, o);
|
|
366
367
|
});
|
|
367
|
-
function
|
|
368
|
-
const n =
|
|
369
|
-
return /* @__PURE__ */ w(
|
|
368
|
+
function Zn(t = {}) {
|
|
369
|
+
const n = Rn(t);
|
|
370
|
+
return /* @__PURE__ */ w(Pn, { value: n, children: t.children });
|
|
370
371
|
}
|
|
371
|
-
var
|
|
372
|
-
function
|
|
372
|
+
var $n = "div";
|
|
373
|
+
function qn(t, n) {
|
|
373
374
|
if (n != null)
|
|
374
375
|
return t == null ? !1 : Array.isArray(t) ? t.includes(n) : t === n;
|
|
375
376
|
}
|
|
376
|
-
var
|
|
377
|
+
var Yn = ne(
|
|
377
378
|
function(n) {
|
|
378
379
|
var o = n, {
|
|
379
380
|
store: e,
|
|
@@ -381,7 +382,7 @@ var qn = ne(
|
|
|
381
382
|
getItem: l,
|
|
382
383
|
hideOnClick: a,
|
|
383
384
|
setValueOnClick: m = r != null,
|
|
384
|
-
preventScrollOnKeyDown:
|
|
385
|
+
preventScrollOnKeyDown: v = !0,
|
|
385
386
|
focusOnHover: c = !0
|
|
386
387
|
} = o, i = oe(o, [
|
|
387
388
|
"store",
|
|
@@ -392,25 +393,25 @@ var qn = ne(
|
|
|
392
393
|
"preventScrollOnKeyDown",
|
|
393
394
|
"focusOnHover"
|
|
394
395
|
]), s;
|
|
395
|
-
const
|
|
396
|
-
e = e ||
|
|
396
|
+
const f = Vn();
|
|
397
|
+
e = e || f, me(
|
|
397
398
|
e,
|
|
398
399
|
process.env.NODE_ENV !== "production" && "SelectItem must be wrapped in a SelectList or SelectPopover component."
|
|
399
400
|
);
|
|
400
|
-
const
|
|
401
|
+
const C = Ae(i.id), d = Jt(i), { listElement: p, multiSelectable: V, selected: O, autoFocus: g } = bt(e, {
|
|
401
402
|
listElement: "listElement",
|
|
402
403
|
multiSelectable(b) {
|
|
403
404
|
return Array.isArray(b.value);
|
|
404
405
|
},
|
|
405
406
|
selected(b) {
|
|
406
|
-
return
|
|
407
|
+
return qn(b.value, r);
|
|
407
408
|
},
|
|
408
409
|
autoFocus(b) {
|
|
409
|
-
return r == null || b.value == null || b.activeId !==
|
|
410
|
+
return r == null || b.value == null || b.activeId !== C && (e != null && e.item(b.activeId)) ? !1 : Array.isArray(b.value) ? b.value[b.value.length - 1] === r : b.value === r;
|
|
410
411
|
}
|
|
411
|
-
}),
|
|
412
|
+
}), K = Xe(
|
|
412
413
|
(b) => {
|
|
413
|
-
const y =
|
|
414
|
+
const y = H(A({}, b), {
|
|
414
415
|
value: d ? void 0 : r,
|
|
415
416
|
children: r
|
|
416
417
|
});
|
|
@@ -419,46 +420,46 @@ var qn = ne(
|
|
|
419
420
|
[d, r, l]
|
|
420
421
|
);
|
|
421
422
|
a = a ?? (r != null && !V);
|
|
422
|
-
const
|
|
423
|
-
|
|
423
|
+
const x = i.onClick, Z = R(m), k = R(a), P = Q((b) => {
|
|
424
|
+
x == null || x(b), !b.defaultPrevented && (ot(b) || rt(b) || (Z(b) && r != null && (e == null || e.setValue((y) => Array.isArray(y) ? y.includes(r) ? y.filter((B) => B !== r) : [...y, r] : r)), k(b) && (e == null || e.hide())));
|
|
424
425
|
});
|
|
425
426
|
i = he(
|
|
426
427
|
i,
|
|
427
|
-
(b) => /* @__PURE__ */ w(
|
|
428
|
-
[
|
|
429
|
-
), i =
|
|
430
|
-
id:
|
|
431
|
-
role:
|
|
432
|
-
"aria-selected":
|
|
428
|
+
(b) => /* @__PURE__ */ w(_n.Provider, { value: O ?? !1, children: b }),
|
|
429
|
+
[O]
|
|
430
|
+
), i = H(A({
|
|
431
|
+
id: C,
|
|
432
|
+
role: en(p),
|
|
433
|
+
"aria-selected": O,
|
|
433
434
|
children: r
|
|
434
435
|
}, i), {
|
|
435
|
-
autoFocus: (s = i.autoFocus) != null ? s :
|
|
436
|
-
onClick:
|
|
437
|
-
}), i =
|
|
436
|
+
autoFocus: (s = i.autoFocus) != null ? s : g,
|
|
437
|
+
onClick: P
|
|
438
|
+
}), i = It(A({
|
|
438
439
|
store: e,
|
|
439
|
-
getItem:
|
|
440
|
-
preventScrollOnKeyDown:
|
|
440
|
+
getItem: K,
|
|
441
|
+
preventScrollOnKeyDown: v
|
|
441
442
|
}, i));
|
|
442
|
-
const
|
|
443
|
-
return i =
|
|
443
|
+
const F = R(c);
|
|
444
|
+
return i = xt(H(A({
|
|
444
445
|
store: e
|
|
445
446
|
}, i), {
|
|
446
447
|
// We have to disable focusOnHover when the popup is closed, otherwise
|
|
447
448
|
// the active item will change to null (the container) when the popup is
|
|
448
449
|
// closed by clicking on an item.
|
|
449
450
|
focusOnHover(b) {
|
|
450
|
-
if (!
|
|
451
|
+
if (!F(b)) return !1;
|
|
451
452
|
const y = e == null ? void 0 : e.getState();
|
|
452
453
|
return !!(y != null && y.open);
|
|
453
454
|
}
|
|
454
455
|
})), i;
|
|
455
456
|
}
|
|
456
|
-
),
|
|
457
|
+
), zn = nt(
|
|
457
458
|
re(function(n) {
|
|
458
|
-
const o =
|
|
459
|
-
return le(
|
|
459
|
+
const o = Yn(n);
|
|
460
|
+
return le($n, o);
|
|
460
461
|
})
|
|
461
|
-
),
|
|
462
|
+
), Qn = "div", We = ke(null), Pt = ne(
|
|
462
463
|
function(n) {
|
|
463
464
|
var o = n, {
|
|
464
465
|
store: e,
|
|
@@ -466,7 +467,7 @@ var qn = ne(
|
|
|
466
467
|
hideOnEnter: l = !0,
|
|
467
468
|
focusOnMove: a = !0,
|
|
468
469
|
composite: m,
|
|
469
|
-
alwaysVisible:
|
|
470
|
+
alwaysVisible: v
|
|
470
471
|
} = o, c = oe(o, [
|
|
471
472
|
"store",
|
|
472
473
|
"resetOnEscape",
|
|
@@ -475,102 +476,102 @@ var qn = ne(
|
|
|
475
476
|
"composite",
|
|
476
477
|
"alwaysVisible"
|
|
477
478
|
]);
|
|
478
|
-
const i =
|
|
479
|
+
const i = Ne();
|
|
479
480
|
e = e || i, me(
|
|
480
481
|
e,
|
|
481
482
|
process.env.NODE_ENV !== "production" && "SelectList must receive a `store` prop or be wrapped in a SelectProvider component."
|
|
482
483
|
);
|
|
483
|
-
const s = Ae(c.id),
|
|
484
|
+
const s = Ae(c.id), f = e.useState("value"), C = Array.isArray(f), [d, p] = de(f), V = e.useState("mounted");
|
|
484
485
|
ae(() => {
|
|
485
|
-
V || p(
|
|
486
|
-
}, [V,
|
|
487
|
-
const
|
|
488
|
-
|
|
489
|
-
}),
|
|
490
|
-
() => [
|
|
491
|
-
[
|
|
492
|
-
), [y,
|
|
486
|
+
V || p(f);
|
|
487
|
+
}, [V, f]), r = r && !C;
|
|
488
|
+
const O = c.onKeyDown, g = R(r), K = R(l), x = Q((M) => {
|
|
489
|
+
O == null || O(M), !M.defaultPrevented && (M.key === "Escape" && g(M) && (e == null || e.setValue(d)), (M.key === " " || M.key === "Enter") && tn(M) && K(M) && (M.preventDefault(), e == null || e.hide()));
|
|
490
|
+
}), Z = Pe(je), k = de(), [P, F] = Z || k, b = Ce(
|
|
491
|
+
() => [P, F],
|
|
492
|
+
[P]
|
|
493
|
+
), [y, B] = de(null), j = Pe(We);
|
|
493
494
|
ae(() => {
|
|
494
|
-
if (
|
|
495
|
-
return
|
|
496
|
-
}, [
|
|
495
|
+
if (j)
|
|
496
|
+
return j(e), () => j(null);
|
|
497
|
+
}, [j, e]), c = he(
|
|
497
498
|
c,
|
|
498
|
-
(
|
|
499
|
+
(M) => /* @__PURE__ */ w(Et, { value: e, children: /* @__PURE__ */ w(We.Provider, { value: B, children: /* @__PURE__ */ w(je.Provider, { value: b, children: M }) }) }),
|
|
499
500
|
[e, b]
|
|
500
501
|
);
|
|
501
|
-
const
|
|
502
|
-
m = m ?? (!
|
|
503
|
-
const [
|
|
502
|
+
const h = !!e.combobox;
|
|
503
|
+
m = m ?? (!h && y !== e);
|
|
504
|
+
const [_, S] = nn(
|
|
504
505
|
m ? e.setListElement : null
|
|
505
|
-
),
|
|
506
|
+
), E = lt(_, "role", c.role), Y = (m || (E === "listbox" || E === "menu" || E === "tree" || E === "grid")) && C || void 0, ee = yt(V, c.hidden, v), fe = ee ? H(A({}, c.style), { display: "none" }) : c.style;
|
|
506
507
|
m && (c = A({
|
|
507
508
|
role: "listbox",
|
|
508
509
|
"aria-multiselectable": Y
|
|
509
510
|
}, c));
|
|
510
511
|
const ue = e.useState(
|
|
511
|
-
(
|
|
512
|
+
(M) => {
|
|
512
513
|
var ve;
|
|
513
|
-
return
|
|
514
|
+
return P || ((ve = M.labelElement) == null ? void 0 : ve.id);
|
|
514
515
|
}
|
|
515
516
|
);
|
|
516
|
-
return c =
|
|
517
|
+
return c = H(A({
|
|
517
518
|
id: s,
|
|
518
519
|
"aria-labelledby": ue,
|
|
519
|
-
hidden:
|
|
520
|
+
hidden: ee
|
|
520
521
|
}, c), {
|
|
521
|
-
ref: ye(
|
|
522
|
+
ref: ye(S, c.ref),
|
|
522
523
|
style: fe,
|
|
523
|
-
onKeyDown:
|
|
524
|
-
}), c =
|
|
524
|
+
onKeyDown: x
|
|
525
|
+
}), c = At(H(A({ store: e }, c), { composite: m })), c = Ot(A({ store: e, typeahead: !h }, c)), c;
|
|
525
526
|
}
|
|
526
|
-
),
|
|
527
|
-
const o =
|
|
528
|
-
return le(
|
|
529
|
-
}),
|
|
527
|
+
), Xn = re(function(n) {
|
|
528
|
+
const o = Pt(n);
|
|
529
|
+
return le(Qn, o);
|
|
530
|
+
}), Gn = "div", Jn = ne(
|
|
530
531
|
function(n) {
|
|
531
532
|
var o = n, { store: e, alwaysVisible: r } = o, l = oe(o, ["store", "alwaysVisible"]);
|
|
532
533
|
const a = De();
|
|
533
|
-
return e = e || a, l =
|
|
534
|
+
return e = e || a, l = Pt(A({ store: e, alwaysVisible: r }, l)), l = Sn(A({ store: e, alwaysVisible: r }, l)), l;
|
|
534
535
|
}
|
|
535
|
-
),
|
|
536
|
+
), eo = hn(
|
|
536
537
|
re(function(n) {
|
|
537
|
-
const o =
|
|
538
|
-
return le(
|
|
538
|
+
const o = Jn(n);
|
|
539
|
+
return le(Gn, o);
|
|
539
540
|
}),
|
|
540
541
|
De
|
|
541
542
|
);
|
|
542
|
-
function
|
|
543
|
+
function to({
|
|
543
544
|
store: t,
|
|
544
545
|
fallback: n,
|
|
545
546
|
children: o
|
|
546
547
|
} = {}) {
|
|
547
|
-
const e =
|
|
548
|
+
const e = Ne();
|
|
548
549
|
t = t || e;
|
|
549
|
-
const r =
|
|
550
|
+
const r = En(t, (l) => l != null && l.value.length ? l.value : n);
|
|
550
551
|
return o ? o(r || "") : r;
|
|
551
552
|
}
|
|
552
|
-
|
|
553
|
-
|
|
553
|
+
ke(null);
|
|
554
|
+
ke(
|
|
554
555
|
null
|
|
555
556
|
);
|
|
556
|
-
var
|
|
557
|
-
[
|
|
558
|
-
[
|
|
559
|
-
),
|
|
560
|
-
function
|
|
557
|
+
var no = on(
|
|
558
|
+
[Gt],
|
|
559
|
+
[Xt]
|
|
560
|
+
), oo = no.useContext, ro = ln() && sn();
|
|
561
|
+
function lo(t = {}) {
|
|
561
562
|
var n = t, {
|
|
562
563
|
tag: o
|
|
563
|
-
} = n, e =
|
|
564
|
+
} = n, e = Je(n, [
|
|
564
565
|
"tag"
|
|
565
566
|
]);
|
|
566
|
-
const r =
|
|
567
|
-
|
|
567
|
+
const r = dt(e.store, On(o, ["value", "rtl"]));
|
|
568
|
+
mt(e, r);
|
|
568
569
|
const l = o == null ? void 0 : o.getState(), a = r == null ? void 0 : r.getState(), m = D(
|
|
569
570
|
e.activeId,
|
|
570
571
|
a == null ? void 0 : a.activeId,
|
|
571
572
|
e.defaultActiveId,
|
|
572
573
|
null
|
|
573
|
-
),
|
|
574
|
+
), v = it(ie($({}, e), {
|
|
574
575
|
activeId: m,
|
|
575
576
|
includesBaseElement: D(
|
|
576
577
|
e.includesBaseElement,
|
|
@@ -589,7 +590,7 @@ function ro(t = {}) {
|
|
|
589
590
|
a == null ? void 0 : a.virtualFocus,
|
|
590
591
|
!0
|
|
591
592
|
)
|
|
592
|
-
})), c =
|
|
593
|
+
})), c = st(ie($({}, e), {
|
|
593
594
|
placement: D(
|
|
594
595
|
e.placement,
|
|
595
596
|
a == null ? void 0 : a.placement,
|
|
@@ -606,109 +607,109 @@ function ro(t = {}) {
|
|
|
606
607
|
l == null ? void 0 : l.values,
|
|
607
608
|
e.defaultSelectedValue,
|
|
608
609
|
""
|
|
609
|
-
),
|
|
610
|
+
), f = Array.isArray(s), C = ie($($({}, v.getState()), c.getState()), {
|
|
610
611
|
value: i,
|
|
611
612
|
selectedValue: s,
|
|
612
613
|
resetValueOnSelect: D(
|
|
613
614
|
e.resetValueOnSelect,
|
|
614
615
|
a == null ? void 0 : a.resetValueOnSelect,
|
|
615
|
-
|
|
616
|
+
f
|
|
616
617
|
),
|
|
617
618
|
resetValueOnHide: D(
|
|
618
619
|
e.resetValueOnHide,
|
|
619
620
|
a == null ? void 0 : a.resetValueOnHide,
|
|
620
|
-
|
|
621
|
+
f && !o
|
|
621
622
|
),
|
|
622
623
|
activeValue: a == null ? void 0 : a.activeValue
|
|
623
|
-
}), d =
|
|
624
|
-
return
|
|
624
|
+
}), d = ft(C, v, c, r);
|
|
625
|
+
return ro && G(
|
|
625
626
|
d,
|
|
626
|
-
() =>
|
|
627
|
+
() => J(d, ["virtualFocus"], () => {
|
|
627
628
|
d.setState("virtualFocus", !1);
|
|
628
629
|
})
|
|
629
|
-
),
|
|
630
|
+
), G(d, () => {
|
|
630
631
|
if (o)
|
|
631
|
-
return
|
|
632
|
-
|
|
632
|
+
return rn(
|
|
633
|
+
J(d, ["selectedValue"], (p) => {
|
|
633
634
|
Array.isArray(p.selectedValue) && o.setValues(p.selectedValue);
|
|
634
635
|
}),
|
|
635
|
-
|
|
636
|
+
J(o, ["values"], (p) => {
|
|
636
637
|
d.setState("selectedValue", p.values);
|
|
637
638
|
})
|
|
638
639
|
);
|
|
639
|
-
}),
|
|
640
|
+
}), G(
|
|
640
641
|
d,
|
|
641
|
-
() =>
|
|
642
|
+
() => J(d, ["resetValueOnHide", "mounted"], (p) => {
|
|
642
643
|
p.resetValueOnHide && (p.mounted || d.setState("value", i));
|
|
643
644
|
})
|
|
644
|
-
),
|
|
645
|
+
), G(
|
|
645
646
|
d,
|
|
646
|
-
() =>
|
|
647
|
+
() => J(d, ["open"], (p) => {
|
|
647
648
|
p.open || (d.setState("activeId", m), d.setState("moves", 0));
|
|
648
649
|
})
|
|
649
|
-
),
|
|
650
|
+
), G(
|
|
650
651
|
d,
|
|
651
|
-
() =>
|
|
652
|
+
() => J(d, ["moves", "activeId"], (p, V) => {
|
|
652
653
|
p.moves === V.moves && d.setState("activeValue", void 0);
|
|
653
654
|
})
|
|
654
|
-
),
|
|
655
|
+
), G(
|
|
655
656
|
d,
|
|
656
|
-
() =>
|
|
657
|
+
() => vt(d, ["moves", "renderedItems"], (p, V) => {
|
|
657
658
|
if (p.moves === V.moves) return;
|
|
658
|
-
const { activeId:
|
|
659
|
-
d.setState("activeValue",
|
|
659
|
+
const { activeId: O } = d.getState(), g = v.item(O);
|
|
660
|
+
d.setState("activeValue", g == null ? void 0 : g.value);
|
|
660
661
|
})
|
|
661
|
-
), ie(
|
|
662
|
+
), ie($($($({}, c), v), d), {
|
|
662
663
|
tag: o,
|
|
663
664
|
setValue: (p) => d.setState("value", p),
|
|
664
|
-
resetValue: () => d.setState("value",
|
|
665
|
+
resetValue: () => d.setState("value", C.value),
|
|
665
666
|
setSelectedValue: (p) => d.setState("selectedValue", p)
|
|
666
667
|
});
|
|
667
668
|
}
|
|
668
|
-
function
|
|
669
|
-
const n =
|
|
670
|
-
return t =
|
|
669
|
+
function so(t) {
|
|
670
|
+
const n = oo();
|
|
671
|
+
return t = H(A({}, t), {
|
|
671
672
|
tag: t.tag !== void 0 ? t.tag : n
|
|
672
|
-
}),
|
|
673
|
+
}), ut(t);
|
|
673
674
|
}
|
|
674
|
-
function
|
|
675
|
-
return
|
|
676
|
-
|
|
677
|
-
|
|
675
|
+
function ao(t, n, o) {
|
|
676
|
+
return Me(n, [o.tag]), be(t, o, "value", "setValue"), be(t, o, "selectedValue", "setSelectedValue"), be(t, o, "resetValueOnHide"), be(t, o, "resetValueOnSelect"), Object.assign(
|
|
677
|
+
ct(
|
|
678
|
+
at(t, n, o),
|
|
678
679
|
n,
|
|
679
680
|
o
|
|
680
681
|
),
|
|
681
682
|
{ tag: o.tag }
|
|
682
683
|
);
|
|
683
684
|
}
|
|
684
|
-
function
|
|
685
|
-
t =
|
|
686
|
-
const [n, o] =
|
|
687
|
-
return
|
|
685
|
+
function io(t = {}) {
|
|
686
|
+
t = so(t);
|
|
687
|
+
const [n, o] = pt(lo, t);
|
|
688
|
+
return ao(n, o, t);
|
|
688
689
|
}
|
|
689
|
-
var
|
|
690
|
-
function
|
|
690
|
+
var uo = "input";
|
|
691
|
+
function Ze(t, n, o) {
|
|
691
692
|
if (!o) return !1;
|
|
692
693
|
const e = t.find((r) => !r.disabled && r.value);
|
|
693
694
|
return (e == null ? void 0 : e.value) === n;
|
|
694
695
|
}
|
|
695
|
-
function
|
|
696
|
-
return !n || t == null ? !1 : (t =
|
|
696
|
+
function $e(t, n) {
|
|
697
|
+
return !n || t == null ? !1 : (t = vn(t), n.length > t.length && n.toLowerCase().indexOf(t.toLowerCase()) === 0);
|
|
697
698
|
}
|
|
698
|
-
function
|
|
699
|
+
function co(t) {
|
|
699
700
|
return t.type === "input";
|
|
700
701
|
}
|
|
701
|
-
function
|
|
702
|
+
function mo(t) {
|
|
702
703
|
return t === "inline" || t === "list" || t === "both" || t === "none";
|
|
703
704
|
}
|
|
704
|
-
function
|
|
705
|
+
function fo(t) {
|
|
705
706
|
const n = t.find((o) => {
|
|
706
707
|
var e;
|
|
707
708
|
return o.disabled ? !1 : ((e = o.element) == null ? void 0 : e.getAttribute("role")) !== "tab";
|
|
708
709
|
});
|
|
709
710
|
return n == null ? void 0 : n.id;
|
|
710
711
|
}
|
|
711
|
-
var
|
|
712
|
+
var vo = ne(
|
|
712
713
|
function(n) {
|
|
713
714
|
var o = n, {
|
|
714
715
|
store: e,
|
|
@@ -716,17 +717,17 @@ var fo = ne(
|
|
|
716
717
|
autoSelect: l = !1,
|
|
717
718
|
getAutoSelectId: a,
|
|
718
719
|
setValueOnChange: m,
|
|
719
|
-
showMinLength:
|
|
720
|
+
showMinLength: v = 0,
|
|
720
721
|
showOnChange: c,
|
|
721
722
|
showOnMouseDown: i,
|
|
722
723
|
showOnClick: s = i,
|
|
723
|
-
showOnKeyDown:
|
|
724
|
-
showOnKeyPress:
|
|
724
|
+
showOnKeyDown: f,
|
|
725
|
+
showOnKeyPress: C = f,
|
|
725
726
|
blurActiveItemOnClick: d,
|
|
726
727
|
setValueOnClick: p = !0,
|
|
727
728
|
moveOnKeyPress: V = !0,
|
|
728
|
-
autoComplete:
|
|
729
|
-
} = o,
|
|
729
|
+
autoComplete: O = "list"
|
|
730
|
+
} = o, g = oe(o, [
|
|
730
731
|
"store",
|
|
731
732
|
"focusable",
|
|
732
733
|
"autoSelect",
|
|
@@ -743,208 +744,208 @@ var fo = ne(
|
|
|
743
744
|
"moveOnKeyPress",
|
|
744
745
|
"autoComplete"
|
|
745
746
|
]);
|
|
746
|
-
const
|
|
747
|
-
e = e ||
|
|
747
|
+
const K = ht();
|
|
748
|
+
e = e || K, me(
|
|
748
749
|
e,
|
|
749
750
|
process.env.NODE_ENV !== "production" && "Combobox must receive a `store` prop or be wrapped in a ComboboxProvider component."
|
|
750
751
|
);
|
|
751
|
-
const
|
|
752
|
+
const x = se(null), [Z, k] = an(), P = se(!1), F = se(!1), b = e.useState(
|
|
752
753
|
(u) => u.virtualFocus && l
|
|
753
|
-
), y =
|
|
754
|
-
|
|
755
|
-
y &&
|
|
754
|
+
), y = O === "inline" || O === "both", [B, j] = de(y);
|
|
755
|
+
un(() => {
|
|
756
|
+
y && j(!0);
|
|
756
757
|
}, [y]);
|
|
757
|
-
const
|
|
758
|
-
ae(() =>
|
|
759
|
-
|
|
758
|
+
const h = e.useState("value"), _ = se();
|
|
759
|
+
ae(() => J(e, ["selectedValue", "activeId"], (u, I) => {
|
|
760
|
+
_.current = I.selectedValue;
|
|
760
761
|
}), []);
|
|
761
|
-
const
|
|
762
|
-
var
|
|
763
|
-
if (y &&
|
|
762
|
+
const S = e.useState((u) => {
|
|
763
|
+
var I;
|
|
764
|
+
if (y && B && !(u.activeValue && Array.isArray(u.selectedValue) && (u.selectedValue.includes(u.activeValue) || (I = _.current) != null && I.includes(u.activeValue))))
|
|
764
765
|
return u.activeValue;
|
|
765
|
-
}),
|
|
766
|
-
if (!y || !
|
|
767
|
-
if (
|
|
768
|
-
|
|
769
|
-
|
|
766
|
+
}), E = e.useState("renderedItems"), q = e.useState("open"), Y = e.useState("contentElement"), ee = Ce(() => {
|
|
767
|
+
if (!y || !B) return h;
|
|
768
|
+
if (Ze(
|
|
769
|
+
E,
|
|
770
|
+
S,
|
|
770
771
|
b
|
|
771
772
|
)) {
|
|
772
|
-
if (
|
|
773
|
-
const
|
|
774
|
-
return
|
|
773
|
+
if ($e(h, S)) {
|
|
774
|
+
const I = (S == null ? void 0 : S.slice(h.length)) || "";
|
|
775
|
+
return h + I;
|
|
775
776
|
}
|
|
776
|
-
return
|
|
777
|
+
return h;
|
|
777
778
|
}
|
|
778
|
-
return
|
|
779
|
-
}, [y,
|
|
779
|
+
return S || h;
|
|
780
|
+
}, [y, B, E, S, b, h]);
|
|
780
781
|
ae(() => {
|
|
781
|
-
const u =
|
|
782
|
+
const u = x.current;
|
|
782
783
|
if (!u) return;
|
|
783
|
-
const
|
|
784
|
-
return u.addEventListener("combobox-item-move",
|
|
785
|
-
u.removeEventListener("combobox-item-move",
|
|
784
|
+
const I = () => j(!0);
|
|
785
|
+
return u.addEventListener("combobox-item-move", I), () => {
|
|
786
|
+
u.removeEventListener("combobox-item-move", I);
|
|
786
787
|
};
|
|
787
788
|
}, []), ae(() => {
|
|
788
|
-
if (!y || !
|
|
789
|
-
|
|
790
|
-
|
|
789
|
+
if (!y || !B || !S || !Ze(
|
|
790
|
+
E,
|
|
791
|
+
S,
|
|
791
792
|
b
|
|
792
|
-
) ||
|
|
793
|
-
let
|
|
793
|
+
) || !$e(h, S)) return;
|
|
794
|
+
let I = cn;
|
|
794
795
|
return queueMicrotask(() => {
|
|
795
|
-
const
|
|
796
|
-
if (!
|
|
797
|
-
const { start:
|
|
798
|
-
Ie(
|
|
799
|
-
if (!
|
|
800
|
-
const { start: ce, end:
|
|
801
|
-
ce ===
|
|
796
|
+
const L = x.current;
|
|
797
|
+
if (!L) return;
|
|
798
|
+
const { start: T, end: z } = Be(L), te = h.length, U = S.length;
|
|
799
|
+
Ie(L, te, U), I = () => {
|
|
800
|
+
if (!_e(L)) return;
|
|
801
|
+
const { start: ce, end: Ft } = Be(L);
|
|
802
|
+
ce === te && Ft === U && Ie(L, T, z);
|
|
802
803
|
};
|
|
803
|
-
}), () =>
|
|
804
|
+
}), () => I();
|
|
804
805
|
}, [
|
|
805
|
-
|
|
806
|
+
Z,
|
|
806
807
|
y,
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
808
|
+
B,
|
|
809
|
+
S,
|
|
810
|
+
E,
|
|
810
811
|
b,
|
|
811
|
-
|
|
812
|
+
h
|
|
812
813
|
]);
|
|
813
|
-
const fe = se(null), ue = Q(a),
|
|
814
|
+
const fe = se(null), ue = Q(a), M = se(null);
|
|
814
815
|
ae(() => {
|
|
815
816
|
if (!q || !Y) return;
|
|
816
|
-
const u =
|
|
817
|
+
const u = dn(Y);
|
|
817
818
|
if (!u) return;
|
|
818
819
|
fe.current = u;
|
|
819
|
-
const
|
|
820
|
-
|
|
821
|
-
},
|
|
822
|
-
if (!e || !
|
|
820
|
+
const I = () => {
|
|
821
|
+
P.current = !1;
|
|
822
|
+
}, L = () => {
|
|
823
|
+
if (!e || !P.current) return;
|
|
823
824
|
const { activeId: z } = e.getState();
|
|
824
|
-
z !== null && z !==
|
|
825
|
-
},
|
|
826
|
-
return u.addEventListener("wheel",
|
|
827
|
-
u.removeEventListener("wheel",
|
|
825
|
+
z !== null && z !== M.current && (P.current = !1);
|
|
826
|
+
}, T = { passive: !0, capture: !0 };
|
|
827
|
+
return u.addEventListener("wheel", I, T), u.addEventListener("touchmove", I, T), u.addEventListener("scroll", L, T), () => {
|
|
828
|
+
u.removeEventListener("wheel", I, !0), u.removeEventListener("touchmove", I, !0), u.removeEventListener("scroll", L, !0);
|
|
828
829
|
};
|
|
829
830
|
}, [q, Y, e]), Ve(() => {
|
|
830
|
-
|
|
831
|
-
}, [
|
|
832
|
-
b !== "always" && q || (
|
|
831
|
+
h && (F.current || (P.current = !0));
|
|
832
|
+
}, [h]), Ve(() => {
|
|
833
|
+
b !== "always" && q || (P.current = q);
|
|
833
834
|
}, [b, q]);
|
|
834
835
|
const ve = e.useState("resetValueOnSelect");
|
|
835
|
-
|
|
836
|
-
var u,
|
|
837
|
-
const
|
|
838
|
-
if (!e || !q || !
|
|
839
|
-
const { baseElement:
|
|
840
|
-
if (!(
|
|
836
|
+
Me(() => {
|
|
837
|
+
var u, I;
|
|
838
|
+
const L = P.current;
|
|
839
|
+
if (!e || !q || !L && !ve) return;
|
|
840
|
+
const { baseElement: T, contentElement: z, activeId: te } = e.getState();
|
|
841
|
+
if (!(T && !_e(T))) {
|
|
841
842
|
if (z != null && z.hasAttribute("data-placing")) {
|
|
842
|
-
const
|
|
843
|
-
return
|
|
843
|
+
const U = new MutationObserver(k);
|
|
844
|
+
return U.observe(z, { attributeFilter: ["data-placing"] }), () => U.disconnect();
|
|
844
845
|
}
|
|
845
|
-
if (b &&
|
|
846
|
-
const
|
|
847
|
-
|
|
846
|
+
if (b && L) {
|
|
847
|
+
const U = ue(E), ce = U !== void 0 ? U : (u = fo(E)) != null ? u : e.first();
|
|
848
|
+
M.current = ce, e.move(ce ?? null);
|
|
848
849
|
} else {
|
|
849
|
-
const
|
|
850
|
-
|
|
850
|
+
const U = (I = e.item(te || e.first())) == null ? void 0 : I.element;
|
|
851
|
+
U && "scrollIntoView" in U && U.scrollIntoView({ block: "nearest", inline: "nearest" });
|
|
851
852
|
}
|
|
852
853
|
}
|
|
853
854
|
}, [
|
|
854
855
|
e,
|
|
855
856
|
q,
|
|
856
|
-
|
|
857
|
-
|
|
857
|
+
Z,
|
|
858
|
+
h,
|
|
858
859
|
b,
|
|
859
860
|
ve,
|
|
860
861
|
ue,
|
|
861
|
-
|
|
862
|
+
E
|
|
862
863
|
]), ae(() => {
|
|
863
864
|
if (!y) return;
|
|
864
|
-
const u =
|
|
865
|
+
const u = x.current;
|
|
865
866
|
if (!u) return;
|
|
866
|
-
const
|
|
867
|
-
(
|
|
868
|
-
),
|
|
869
|
-
|
|
867
|
+
const I = [u, Y].filter(
|
|
868
|
+
(T) => !!T
|
|
869
|
+
), L = (T) => {
|
|
870
|
+
I.every((z) => fn(T, z)) && (e == null || e.setValue(ee));
|
|
870
871
|
};
|
|
871
|
-
for (const
|
|
872
|
-
|
|
872
|
+
for (const T of I)
|
|
873
|
+
T.addEventListener("focusout", L);
|
|
873
874
|
return () => {
|
|
874
|
-
for (const
|
|
875
|
-
|
|
875
|
+
for (const T of I)
|
|
876
|
+
T.removeEventListener("focusout", L);
|
|
876
877
|
};
|
|
877
|
-
}, [y, Y, e,
|
|
878
|
-
const pe = (u) => u.currentTarget.value.length >=
|
|
878
|
+
}, [y, Y, e, ee]);
|
|
879
|
+
const pe = (u) => u.currentTarget.value.length >= v, Se = g.onChange, Le = R(c ?? pe), Te = R(
|
|
879
880
|
// If the combobox is combined with tags, the value will be set by the tag
|
|
880
881
|
// input component.
|
|
881
882
|
m ?? !e.tag
|
|
882
|
-
),
|
|
883
|
+
), Re = Q((u) => {
|
|
883
884
|
if (Se == null || Se(u), u.defaultPrevented || !e) return;
|
|
884
|
-
const
|
|
885
|
-
if (
|
|
886
|
-
const
|
|
887
|
-
|
|
885
|
+
const I = u.currentTarget, { value: L, selectionStart: T, selectionEnd: z } = I, te = u.nativeEvent;
|
|
886
|
+
if (P.current = !0, co(te) && (te.isComposing && (P.current = !1, F.current = !0), y)) {
|
|
887
|
+
const U = te.inputType === "insertText" || te.inputType === "insertCompositionText", ce = T === L.length;
|
|
888
|
+
j(U && ce);
|
|
888
889
|
}
|
|
889
|
-
if (
|
|
890
|
-
const
|
|
891
|
-
e.setValue(
|
|
892
|
-
Ie(
|
|
893
|
-
}), y && b &&
|
|
890
|
+
if (Te(u)) {
|
|
891
|
+
const U = L === e.getState().value;
|
|
892
|
+
e.setValue(L), queueMicrotask(() => {
|
|
893
|
+
Ie(I, T, z);
|
|
894
|
+
}), y && b && U && k();
|
|
894
895
|
}
|
|
895
|
-
|
|
896
|
-
}), xe =
|
|
897
|
-
|
|
898
|
-
}),
|
|
896
|
+
Le(u) && e.show(), (!b || !P.current) && e.setActiveId(null);
|
|
897
|
+
}), xe = g.onCompositionEnd, Ee = Q((u) => {
|
|
898
|
+
P.current = !0, F.current = !1, xe == null || xe(u), !u.defaultPrevented && b && k();
|
|
899
|
+
}), Ke = g.onMouseDown, kt = R(
|
|
899
900
|
d ?? (() => !!(e != null && e.getState().includesBaseElement))
|
|
900
|
-
),
|
|
901
|
-
|
|
902
|
-
}),
|
|
903
|
-
if (
|
|
904
|
-
const { open:
|
|
905
|
-
|
|
906
|
-
}),
|
|
907
|
-
|
|
908
|
-
}),
|
|
909
|
-
return
|
|
910
|
-
id:
|
|
901
|
+
), Mt = R(p), Nt = R(s ?? pe), Dt = Q((u) => {
|
|
902
|
+
Ke == null || Ke(u), !u.defaultPrevented && (u.button || u.ctrlKey || e && (kt(u) && e.setActiveId(null), Mt(u) && e.setValue(ee), Nt(u) && et(u.currentTarget, "mouseup", e.show)));
|
|
903
|
+
}), He = g.onKeyDown, Lt = R(C ?? pe), Tt = Q((u) => {
|
|
904
|
+
if (He == null || He(u), u.repeat || (P.current = !1), u.defaultPrevented || u.ctrlKey || u.altKey || u.shiftKey || u.metaKey || !e) return;
|
|
905
|
+
const { open: I } = e.getState();
|
|
906
|
+
I || (u.key === "ArrowUp" || u.key === "ArrowDown") && Lt(u) && (u.preventDefault(), e.show());
|
|
907
|
+
}), Ue = g.onBlur, Rt = Q((u) => {
|
|
908
|
+
P.current = !1, Ue == null || Ue(u), u.defaultPrevented;
|
|
909
|
+
}), Kt = Ae(g.id), Ht = mo(O) ? O : void 0, Ut = e.useState((u) => u.activeId === null);
|
|
910
|
+
return g = H(A({
|
|
911
|
+
id: Kt,
|
|
911
912
|
role: "combobox",
|
|
912
|
-
"aria-autocomplete":
|
|
913
|
-
"aria-haspopup":
|
|
913
|
+
"aria-autocomplete": Ht,
|
|
914
|
+
"aria-haspopup": tt(Y, "listbox"),
|
|
914
915
|
"aria-expanded": q,
|
|
915
916
|
"aria-controls": Y == null ? void 0 : Y.id,
|
|
916
|
-
"data-active-item":
|
|
917
|
-
value:
|
|
918
|
-
},
|
|
919
|
-
ref: ye(
|
|
920
|
-
onChange:
|
|
917
|
+
"data-active-item": Ut || void 0,
|
|
918
|
+
value: ee
|
|
919
|
+
}, g), {
|
|
920
|
+
ref: ye(x, g.ref),
|
|
921
|
+
onChange: Re,
|
|
921
922
|
onCompositionEnd: Ee,
|
|
922
923
|
onMouseDown: Dt,
|
|
923
|
-
onKeyDown:
|
|
924
|
-
onBlur:
|
|
925
|
-
}),
|
|
924
|
+
onKeyDown: Tt,
|
|
925
|
+
onBlur: Rt
|
|
926
|
+
}), g = At(H(A({
|
|
926
927
|
store: e,
|
|
927
928
|
focusable: r
|
|
928
|
-
},
|
|
929
|
+
}, g), {
|
|
929
930
|
// Enable inline autocomplete when the user moves from the combobox input
|
|
930
931
|
// to an item.
|
|
931
|
-
moveOnKeyPress: (u) =>
|
|
932
|
-
})),
|
|
932
|
+
moveOnKeyPress: (u) => mn(V, u) ? !1 : (y && j(!0), !0)
|
|
933
|
+
})), g = gn(A({ store: e }, g)), A({ autoComplete: "off" }, g);
|
|
933
934
|
}
|
|
934
|
-
),
|
|
935
|
-
const o =
|
|
936
|
-
return le(
|
|
935
|
+
), po = re(function(n) {
|
|
936
|
+
const o = vo(n);
|
|
937
|
+
return le(uo, o);
|
|
937
938
|
});
|
|
938
|
-
function
|
|
939
|
-
const n =
|
|
940
|
-
return /* @__PURE__ */ w(
|
|
939
|
+
function bo(t = {}) {
|
|
940
|
+
const n = io(t);
|
|
941
|
+
return /* @__PURE__ */ w(yn, { value: n, children: t.children });
|
|
941
942
|
}
|
|
942
|
-
var
|
|
943
|
-
function
|
|
943
|
+
var ho = "div";
|
|
944
|
+
function So(t, n) {
|
|
944
945
|
if (n != null)
|
|
945
946
|
return t == null ? !1 : Array.isArray(t) ? t.includes(n) : t === n;
|
|
946
947
|
}
|
|
947
|
-
function
|
|
948
|
+
function go(t) {
|
|
948
949
|
var n;
|
|
949
950
|
return (n = {
|
|
950
951
|
menu: "menuitem",
|
|
@@ -952,7 +953,7 @@ function So(t) {
|
|
|
952
953
|
tree: "treeitem"
|
|
953
954
|
}[t]) != null ? n : "option";
|
|
954
955
|
}
|
|
955
|
-
var
|
|
956
|
+
var Co = ne(
|
|
956
957
|
function(n) {
|
|
957
958
|
var o = n, {
|
|
958
959
|
store: e,
|
|
@@ -960,11 +961,11 @@ var go = ne(
|
|
|
960
961
|
hideOnClick: l,
|
|
961
962
|
setValueOnClick: a,
|
|
962
963
|
selectValueOnClick: m = !0,
|
|
963
|
-
resetValueOnSelect:
|
|
964
|
+
resetValueOnSelect: v,
|
|
964
965
|
focusOnHover: c = !1,
|
|
965
966
|
moveOnKeyPress: i = !0,
|
|
966
967
|
getItem: s
|
|
967
|
-
} = o,
|
|
968
|
+
} = o, f = oe(o, [
|
|
968
969
|
"store",
|
|
969
970
|
"value",
|
|
970
971
|
"hideOnClick",
|
|
@@ -974,150 +975,150 @@ var go = ne(
|
|
|
974
975
|
"focusOnHover",
|
|
975
976
|
"moveOnKeyPress",
|
|
976
977
|
"getItem"
|
|
977
|
-
]),
|
|
978
|
-
const d =
|
|
978
|
+
]), C;
|
|
979
|
+
const d = St();
|
|
979
980
|
e = e || d, me(
|
|
980
981
|
e,
|
|
981
982
|
process.env.NODE_ENV !== "production" && "ComboboxItem must be wrapped in a ComboboxList or ComboboxPopover component."
|
|
982
983
|
);
|
|
983
|
-
const { resetValueOnSelectState: p, multiSelectable: V, selected:
|
|
984
|
+
const { resetValueOnSelectState: p, multiSelectable: V, selected: O } = bt(e, {
|
|
984
985
|
resetValueOnSelectState: "resetValueOnSelect",
|
|
985
|
-
multiSelectable(
|
|
986
|
-
return Array.isArray(
|
|
986
|
+
multiSelectable(h) {
|
|
987
|
+
return Array.isArray(h.selectedValue);
|
|
987
988
|
},
|
|
988
|
-
selected(
|
|
989
|
-
return
|
|
989
|
+
selected(h) {
|
|
990
|
+
return So(h.selectedValue, r);
|
|
990
991
|
}
|
|
991
|
-
}),
|
|
992
|
-
(
|
|
993
|
-
const
|
|
994
|
-
return s ? s(
|
|
992
|
+
}), g = Xe(
|
|
993
|
+
(h) => {
|
|
994
|
+
const _ = H(A({}, h), { value: r });
|
|
995
|
+
return s ? s(_) : _;
|
|
995
996
|
},
|
|
996
997
|
[r, s]
|
|
997
998
|
);
|
|
998
999
|
a = a ?? !V, l = l ?? (r != null && !V);
|
|
999
|
-
const
|
|
1000
|
-
(
|
|
1001
|
-
),
|
|
1002
|
-
|
|
1003
|
-
}), b =
|
|
1004
|
-
if (b == null || b(
|
|
1005
|
-
const
|
|
1006
|
-
if (!
|
|
1007
|
-
(
|
|
1000
|
+
const K = f.onClick, x = R(a), Z = R(m), k = R(
|
|
1001
|
+
(C = v ?? p) != null ? C : V
|
|
1002
|
+
), P = R(l), F = Q((h) => {
|
|
1003
|
+
K == null || K(h), !h.defaultPrevented && (ot(h) || rt(h) || (r != null && (Z(h) && (k(h) && (e == null || e.resetValue()), e == null || e.setSelectedValue((_) => Array.isArray(_) ? _.includes(r) ? _.filter((S) => S !== r) : [..._, r] : r)), x(h) && (e == null || e.setValue(r))), P(h) && (e == null || e.hide())));
|
|
1004
|
+
}), b = f.onKeyDown, y = Q((h) => {
|
|
1005
|
+
if (b == null || b(h), h.defaultPrevented) return;
|
|
1006
|
+
const _ = e == null ? void 0 : e.getState().baseElement;
|
|
1007
|
+
if (!_ || _e(_)) return;
|
|
1008
|
+
(h.key.length === 1 || h.key === "Backspace" || h.key === "Delete") && (queueMicrotask(() => _.focus()), pn(_) && (e == null || e.setValue(_.value)));
|
|
1008
1009
|
});
|
|
1009
|
-
V &&
|
|
1010
|
-
"aria-selected":
|
|
1011
|
-
},
|
|
1012
|
-
|
|
1013
|
-
(
|
|
1014
|
-
[r,
|
|
1010
|
+
V && O != null && (f = A({
|
|
1011
|
+
"aria-selected": O
|
|
1012
|
+
}, f)), f = he(
|
|
1013
|
+
f,
|
|
1014
|
+
(h) => /* @__PURE__ */ w(An.Provider, { value: r, children: /* @__PURE__ */ w(xn.Provider, { value: O ?? !1, children: h }) }),
|
|
1015
|
+
[r, O]
|
|
1015
1016
|
);
|
|
1016
|
-
const
|
|
1017
|
-
|
|
1018
|
-
role:
|
|
1017
|
+
const B = Pe(gt);
|
|
1018
|
+
f = H(A({
|
|
1019
|
+
role: go(B),
|
|
1019
1020
|
children: r
|
|
1020
|
-
},
|
|
1021
|
-
onClick:
|
|
1021
|
+
}, f), {
|
|
1022
|
+
onClick: F,
|
|
1022
1023
|
onKeyDown: y
|
|
1023
1024
|
});
|
|
1024
|
-
const
|
|
1025
|
-
return
|
|
1025
|
+
const j = R(i);
|
|
1026
|
+
return f = It(H(A({
|
|
1026
1027
|
store: e
|
|
1027
|
-
},
|
|
1028
|
-
getItem:
|
|
1028
|
+
}, f), {
|
|
1029
|
+
getItem: g,
|
|
1029
1030
|
// Dispatch a custom event on the combobox input when moving to an item
|
|
1030
1031
|
// with the keyboard so the Combobox component can enable inline
|
|
1031
1032
|
// autocompletion.
|
|
1032
|
-
moveOnKeyPress: (
|
|
1033
|
-
if (!
|
|
1034
|
-
const
|
|
1035
|
-
return
|
|
1033
|
+
moveOnKeyPress: (h) => {
|
|
1034
|
+
if (!j(h)) return !1;
|
|
1035
|
+
const _ = new Event("combobox-item-move"), S = e == null ? void 0 : e.getState().baseElement;
|
|
1036
|
+
return S == null || S.dispatchEvent(_), !0;
|
|
1036
1037
|
}
|
|
1037
|
-
})),
|
|
1038
|
+
})), f = xt(A({ store: e, focusOnHover: c }, f)), f;
|
|
1038
1039
|
}
|
|
1039
|
-
),
|
|
1040
|
+
), Eo = nt(
|
|
1040
1041
|
re(function(n) {
|
|
1041
|
-
const o =
|
|
1042
|
-
return le(
|
|
1042
|
+
const o = Co(n);
|
|
1043
|
+
return le(ho, o);
|
|
1043
1044
|
})
|
|
1044
|
-
),
|
|
1045
|
+
), Oo = "div", yo = ne(
|
|
1045
1046
|
function(n) {
|
|
1046
1047
|
var o = n, { store: e, alwaysVisible: r } = o, l = oe(o, ["store", "alwaysVisible"]);
|
|
1047
|
-
const a =
|
|
1048
|
+
const a = St(!0), m = In();
|
|
1048
1049
|
e = e || m;
|
|
1049
|
-
const
|
|
1050
|
+
const v = !!e && e === a;
|
|
1050
1051
|
me(
|
|
1051
1052
|
e,
|
|
1052
1053
|
process.env.NODE_ENV !== "production" && "ComboboxList must receive a `store` prop or be wrapped in a ComboboxProvider component."
|
|
1053
1054
|
);
|
|
1054
|
-
const c = se(null), i = Ae(l.id), s = e.useState("mounted"),
|
|
1055
|
-
(
|
|
1056
|
-
), p =
|
|
1055
|
+
const c = se(null), i = Ae(l.id), s = e.useState("mounted"), f = yt(s, l.hidden, r), C = f ? H(A({}, l.style), { display: "none" }) : l.style, d = e.useState(
|
|
1056
|
+
(k) => Array.isArray(k.selectedValue)
|
|
1057
|
+
), p = lt(c, "role", l.role), O = (p === "listbox" || p === "tree" || p === "grid") && d || void 0, [g, K] = de(!1), x = e.useState("contentElement");
|
|
1057
1058
|
Ve(() => {
|
|
1058
1059
|
if (!s) return;
|
|
1059
|
-
const
|
|
1060
|
-
if (!
|
|
1061
|
-
const
|
|
1062
|
-
|
|
1063
|
-
},
|
|
1064
|
-
return
|
|
1060
|
+
const k = c.current;
|
|
1061
|
+
if (!k || x !== k) return;
|
|
1062
|
+
const P = () => {
|
|
1063
|
+
K(!!k.querySelector("[role='listbox']"));
|
|
1064
|
+
}, F = new MutationObserver(P);
|
|
1065
|
+
return F.observe(k, {
|
|
1065
1066
|
subtree: !0,
|
|
1066
1067
|
childList: !0,
|
|
1067
1068
|
attributeFilter: ["role"]
|
|
1068
|
-
}),
|
|
1069
|
-
}, [s,
|
|
1069
|
+
}), P(), () => F.disconnect();
|
|
1070
|
+
}, [s, x]), g || (l = A({
|
|
1070
1071
|
role: "listbox",
|
|
1071
|
-
"aria-multiselectable":
|
|
1072
|
+
"aria-multiselectable": O
|
|
1072
1073
|
}, l)), l = he(
|
|
1073
1074
|
l,
|
|
1074
|
-
(
|
|
1075
|
+
(k) => /* @__PURE__ */ w(wn, { value: e, children: /* @__PURE__ */ w(gt.Provider, { value: p, children: k }) }),
|
|
1075
1076
|
[e, p]
|
|
1076
1077
|
);
|
|
1077
|
-
const
|
|
1078
|
-
return l =
|
|
1078
|
+
const Z = i && (!a || !v) ? e.setContentElement : null;
|
|
1079
|
+
return l = H(A({
|
|
1079
1080
|
id: i,
|
|
1080
|
-
hidden:
|
|
1081
|
+
hidden: f
|
|
1081
1082
|
}, l), {
|
|
1082
|
-
ref: ye(
|
|
1083
|
-
style:
|
|
1084
|
-
}),
|
|
1083
|
+
ref: ye(Z, c, l.ref),
|
|
1084
|
+
style: C
|
|
1085
|
+
}), Ge(l);
|
|
1085
1086
|
}
|
|
1086
|
-
),
|
|
1087
|
-
const o =
|
|
1088
|
-
return le(
|
|
1087
|
+
), Ao = re(function(n) {
|
|
1088
|
+
const o = yo(n);
|
|
1089
|
+
return le(Oo, o);
|
|
1089
1090
|
});
|
|
1090
|
-
const
|
|
1091
|
+
const xo = /* @__PURE__ */ new Map([
|
|
1091
1092
|
[
|
|
1092
1093
|
"bold",
|
|
1093
|
-
/* @__PURE__ */
|
|
1094
|
+
/* @__PURE__ */ N.createElement(N.Fragment, null, /* @__PURE__ */ N.createElement("path", { d: "M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z" }))
|
|
1094
1095
|
],
|
|
1095
1096
|
[
|
|
1096
1097
|
"duotone",
|
|
1097
|
-
/* @__PURE__ */
|
|
1098
|
+
/* @__PURE__ */ N.createElement(N.Fragment, null, /* @__PURE__ */ N.createElement("path", { d: "M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z", opacity: "0.2" }), /* @__PURE__ */ N.createElement("path", { d: "M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z" }))
|
|
1098
1099
|
],
|
|
1099
1100
|
[
|
|
1100
1101
|
"fill",
|
|
1101
|
-
/* @__PURE__ */
|
|
1102
|
+
/* @__PURE__ */ N.createElement(N.Fragment, null, /* @__PURE__ */ N.createElement("path", { d: "M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z" }))
|
|
1102
1103
|
],
|
|
1103
1104
|
[
|
|
1104
1105
|
"light",
|
|
1105
|
-
/* @__PURE__ */
|
|
1106
|
+
/* @__PURE__ */ N.createElement(N.Fragment, null, /* @__PURE__ */ N.createElement("path", { d: "M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z" }))
|
|
1106
1107
|
],
|
|
1107
1108
|
[
|
|
1108
1109
|
"regular",
|
|
1109
|
-
/* @__PURE__ */
|
|
1110
|
+
/* @__PURE__ */ N.createElement(N.Fragment, null, /* @__PURE__ */ N.createElement("path", { d: "M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z" }))
|
|
1110
1111
|
],
|
|
1111
1112
|
[
|
|
1112
1113
|
"thin",
|
|
1113
|
-
/* @__PURE__ */
|
|
1114
|
+
/* @__PURE__ */ N.createElement(N.Fragment, null, /* @__PURE__ */ N.createElement("path", { d: "M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z" }))
|
|
1114
1115
|
]
|
|
1115
|
-
]), Vt =
|
|
1116
|
+
]), Vt = N.forwardRef((t, n) => /* @__PURE__ */ N.createElement(qt, { ref: n, ...t, weights: xo }));
|
|
1116
1117
|
Vt.displayName = "MagnifyingGlassIcon";
|
|
1117
|
-
var ge = { exports: {} },
|
|
1118
|
-
function
|
|
1119
|
-
if (
|
|
1120
|
-
|
|
1118
|
+
var ge = { exports: {} }, qe;
|
|
1119
|
+
function Io() {
|
|
1120
|
+
if (qe) return ge.exports;
|
|
1121
|
+
qe = 1;
|
|
1121
1122
|
var t = {
|
|
1122
1123
|
À: "A",
|
|
1123
1124
|
Á: "A",
|
|
@@ -1589,15 +1590,15 @@ function xo() {
|
|
|
1589
1590
|
};
|
|
1590
1591
|
return ge.exports = l, ge.exports.has = a, ge.exports.remove = l, ge.exports;
|
|
1591
1592
|
}
|
|
1592
|
-
var
|
|
1593
|
-
const
|
|
1593
|
+
var wo = Io();
|
|
1594
|
+
const Po = /* @__PURE__ */ Yt(wo);
|
|
1594
1595
|
/**
|
|
1595
1596
|
* @name match-sorter
|
|
1596
1597
|
* @license MIT license.
|
|
1597
1598
|
* @copyright (c) 2020 Kent C. Dodds
|
|
1598
1599
|
* @author Kent C. Dodds <me@kentcdodds.com> (https://kentcdodds.com)
|
|
1599
1600
|
*/
|
|
1600
|
-
const
|
|
1601
|
+
const W = {
|
|
1601
1602
|
CASE_SENSITIVE_EQUAL: 7,
|
|
1602
1603
|
EQUAL: 6,
|
|
1603
1604
|
STARTS_WITH: 5,
|
|
@@ -1607,76 +1608,76 @@ const j = {
|
|
|
1607
1608
|
MATCHES: 1,
|
|
1608
1609
|
NO_MATCH: 0
|
|
1609
1610
|
}, Vo = (t, n) => String(t.rankedValue).localeCompare(String(n.rankedValue));
|
|
1610
|
-
function
|
|
1611
|
+
function _t(t, n, o) {
|
|
1611
1612
|
o === void 0 && (o = {});
|
|
1612
1613
|
const {
|
|
1613
1614
|
keys: e,
|
|
1614
|
-
threshold: r =
|
|
1615
|
+
threshold: r = W.MATCHES,
|
|
1615
1616
|
baseSort: l = Vo,
|
|
1616
|
-
sorter: a = (c) => c.sort((i, s) =>
|
|
1617
|
-
} = o, m = t.reduce(
|
|
1617
|
+
sorter: a = (c) => c.sort((i, s) => No(i, s, l))
|
|
1618
|
+
} = o, m = t.reduce(v, []);
|
|
1618
1619
|
return a(m).map((c) => {
|
|
1619
1620
|
let {
|
|
1620
1621
|
item: i
|
|
1621
1622
|
} = c;
|
|
1622
1623
|
return i;
|
|
1623
1624
|
});
|
|
1624
|
-
function
|
|
1625
|
-
const
|
|
1626
|
-
rank:
|
|
1625
|
+
function v(c, i, s) {
|
|
1626
|
+
const f = _o(i, e, n, o), {
|
|
1627
|
+
rank: C,
|
|
1627
1628
|
keyThreshold: d = r
|
|
1628
|
-
} =
|
|
1629
|
-
return
|
|
1630
|
-
...
|
|
1629
|
+
} = f;
|
|
1630
|
+
return C >= d && c.push({
|
|
1631
|
+
...f,
|
|
1631
1632
|
item: i,
|
|
1632
1633
|
index: s
|
|
1633
1634
|
}), c;
|
|
1634
1635
|
}
|
|
1635
1636
|
}
|
|
1636
|
-
|
|
1637
|
-
function
|
|
1637
|
+
_t.rankings = W;
|
|
1638
|
+
function _o(t, n, o, e) {
|
|
1638
1639
|
if (!n) {
|
|
1639
1640
|
const l = t;
|
|
1640
1641
|
return {
|
|
1641
1642
|
// ends up being duplicate of 'item' in matches but consistent
|
|
1642
1643
|
rankedValue: l,
|
|
1643
|
-
rank:
|
|
1644
|
+
rank: Ye(l, o, e),
|
|
1644
1645
|
keyIndex: -1,
|
|
1645
1646
|
keyThreshold: e.threshold
|
|
1646
1647
|
};
|
|
1647
1648
|
}
|
|
1648
|
-
return
|
|
1649
|
+
return To(t, n).reduce((l, a, m) => {
|
|
1649
1650
|
let {
|
|
1650
|
-
rank:
|
|
1651
|
+
rank: v,
|
|
1651
1652
|
rankedValue: c,
|
|
1652
1653
|
keyIndex: i,
|
|
1653
1654
|
keyThreshold: s
|
|
1654
1655
|
} = l, {
|
|
1655
|
-
itemValue:
|
|
1656
|
-
attributes:
|
|
1657
|
-
} = a, d =
|
|
1656
|
+
itemValue: f,
|
|
1657
|
+
attributes: C
|
|
1658
|
+
} = a, d = Ye(f, o, e), p = c;
|
|
1658
1659
|
const {
|
|
1659
1660
|
minRanking: V,
|
|
1660
|
-
maxRanking:
|
|
1661
|
-
threshold:
|
|
1662
|
-
} =
|
|
1663
|
-
return d < V && d >=
|
|
1661
|
+
maxRanking: O,
|
|
1662
|
+
threshold: g
|
|
1663
|
+
} = C;
|
|
1664
|
+
return d < V && d >= W.MATCHES ? d = V : d > O && (d = O), d > v && (v = d, i = m, s = g, p = f), {
|
|
1664
1665
|
rankedValue: p,
|
|
1665
|
-
rank:
|
|
1666
|
+
rank: v,
|
|
1666
1667
|
keyIndex: i,
|
|
1667
1668
|
keyThreshold: s
|
|
1668
1669
|
};
|
|
1669
1670
|
}, {
|
|
1670
1671
|
rankedValue: t,
|
|
1671
|
-
rank:
|
|
1672
|
+
rank: W.NO_MATCH,
|
|
1672
1673
|
keyIndex: -1,
|
|
1673
1674
|
keyThreshold: e.threshold
|
|
1674
1675
|
});
|
|
1675
1676
|
}
|
|
1676
|
-
function
|
|
1677
|
-
return t =
|
|
1677
|
+
function Ye(t, n, o) {
|
|
1678
|
+
return t = ze(t, o), n = ze(n, o), n.length > t.length ? W.NO_MATCH : t === n ? W.CASE_SENSITIVE_EQUAL : (t = t.toLowerCase(), n = n.toLowerCase(), t === n ? W.EQUAL : t.startsWith(n) ? W.STARTS_WITH : t.includes(` ${n}`) ? W.WORD_STARTS_WITH : t.includes(n) ? W.CONTAINS : n.length === 1 ? W.NO_MATCH : ko(t).includes(n) ? W.ACRONYM : Mo(t, n));
|
|
1678
1679
|
}
|
|
1679
|
-
function
|
|
1680
|
+
function ko(t) {
|
|
1680
1681
|
let n = "";
|
|
1681
1682
|
return t.split(" ").forEach((e) => {
|
|
1682
1683
|
e.split("-").forEach((l) => {
|
|
@@ -1684,45 +1685,45 @@ function _o(t) {
|
|
|
1684
1685
|
});
|
|
1685
1686
|
}), n;
|
|
1686
1687
|
}
|
|
1687
|
-
function
|
|
1688
|
+
function Mo(t, n) {
|
|
1688
1689
|
let o = 0, e = 0;
|
|
1689
|
-
function r(
|
|
1690
|
-
for (let s = i,
|
|
1691
|
-
if (c[s] ===
|
|
1690
|
+
function r(v, c, i) {
|
|
1691
|
+
for (let s = i, f = c.length; s < f; s++)
|
|
1692
|
+
if (c[s] === v)
|
|
1692
1693
|
return o += 1, s + 1;
|
|
1693
1694
|
return -1;
|
|
1694
1695
|
}
|
|
1695
|
-
function l(
|
|
1696
|
-
const c = 1 /
|
|
1697
|
-
return
|
|
1696
|
+
function l(v) {
|
|
1697
|
+
const c = 1 / v, i = o / n.length;
|
|
1698
|
+
return W.MATCHES + i * c;
|
|
1698
1699
|
}
|
|
1699
1700
|
const a = r(n[0], t, 0);
|
|
1700
1701
|
if (a < 0)
|
|
1701
|
-
return
|
|
1702
|
+
return W.NO_MATCH;
|
|
1702
1703
|
e = a;
|
|
1703
|
-
for (let
|
|
1704
|
-
const i = n[
|
|
1704
|
+
for (let v = 1, c = n.length; v < c; v++) {
|
|
1705
|
+
const i = n[v];
|
|
1705
1706
|
if (e = r(i, t, e), !(e > -1))
|
|
1706
|
-
return
|
|
1707
|
+
return W.NO_MATCH;
|
|
1707
1708
|
}
|
|
1708
1709
|
const m = e - a;
|
|
1709
1710
|
return l(m);
|
|
1710
1711
|
}
|
|
1711
|
-
function
|
|
1712
|
+
function No(t, n, o) {
|
|
1712
1713
|
const {
|
|
1713
1714
|
rank: l,
|
|
1714
1715
|
keyIndex: a
|
|
1715
1716
|
} = t, {
|
|
1716
1717
|
rank: m,
|
|
1717
|
-
keyIndex:
|
|
1718
|
+
keyIndex: v
|
|
1718
1719
|
} = n;
|
|
1719
|
-
return l === m ? a ===
|
|
1720
|
+
return l === m ? a === v ? o(t, n) : a < v ? -1 : 1 : l > m ? -1 : 1;
|
|
1720
1721
|
}
|
|
1721
|
-
function
|
|
1722
|
+
function ze(t, n) {
|
|
1722
1723
|
let {
|
|
1723
1724
|
keepDiacritics: o
|
|
1724
1725
|
} = n;
|
|
1725
|
-
return t = `${t}`, o || (t =
|
|
1726
|
+
return t = `${t}`, o || (t = Po(t)), t;
|
|
1726
1727
|
}
|
|
1727
1728
|
function Do(t, n) {
|
|
1728
1729
|
typeof n == "object" && (n = n.key);
|
|
@@ -1735,19 +1736,19 @@ function Do(t, n) {
|
|
|
1735
1736
|
o = t[n];
|
|
1736
1737
|
else {
|
|
1737
1738
|
if (n.includes("."))
|
|
1738
|
-
return
|
|
1739
|
+
return Lo(n, t);
|
|
1739
1740
|
o = null;
|
|
1740
1741
|
}
|
|
1741
1742
|
return o == null ? [] : Array.isArray(o) ? o : [String(o)];
|
|
1742
1743
|
}
|
|
1743
|
-
function
|
|
1744
|
+
function Lo(t, n) {
|
|
1744
1745
|
const o = t.split(".");
|
|
1745
1746
|
let e = [n];
|
|
1746
1747
|
for (let r = 0, l = o.length; r < l; r++) {
|
|
1747
1748
|
const a = o[r];
|
|
1748
1749
|
let m = [];
|
|
1749
|
-
for (let
|
|
1750
|
-
const i = e[
|
|
1750
|
+
for (let v = 0, c = e.length; v < c; v++) {
|
|
1751
|
+
const i = e[v];
|
|
1751
1752
|
if (i != null)
|
|
1752
1753
|
if (Object.hasOwnProperty.call(i, a)) {
|
|
1753
1754
|
const s = i[a];
|
|
@@ -1758,75 +1759,79 @@ function No(t, n) {
|
|
|
1758
1759
|
}
|
|
1759
1760
|
return Array.isArray(e[0]) ? [].concat(...e) : e;
|
|
1760
1761
|
}
|
|
1761
|
-
function
|
|
1762
|
+
function To(t, n) {
|
|
1762
1763
|
const o = [];
|
|
1763
1764
|
for (let e = 0, r = n.length; e < r; e++) {
|
|
1764
|
-
const l = n[e], a =
|
|
1765
|
-
for (let
|
|
1765
|
+
const l = n[e], a = Ro(l), m = Do(t, l);
|
|
1766
|
+
for (let v = 0, c = m.length; v < c; v++)
|
|
1766
1767
|
o.push({
|
|
1767
|
-
itemValue: m[
|
|
1768
|
+
itemValue: m[v],
|
|
1768
1769
|
attributes: a
|
|
1769
1770
|
});
|
|
1770
1771
|
}
|
|
1771
1772
|
return o;
|
|
1772
1773
|
}
|
|
1773
|
-
const
|
|
1774
|
+
const Qe = {
|
|
1774
1775
|
maxRanking: 1 / 0,
|
|
1775
1776
|
minRanking: -1 / 0
|
|
1776
1777
|
};
|
|
1777
|
-
function
|
|
1778
|
-
return typeof t == "string" ?
|
|
1779
|
-
...
|
|
1778
|
+
function Ro(t) {
|
|
1779
|
+
return typeof t == "string" ? Qe : {
|
|
1780
|
+
...Qe,
|
|
1780
1781
|
...t
|
|
1781
1782
|
};
|
|
1782
1783
|
}
|
|
1783
|
-
function
|
|
1784
|
-
var
|
|
1785
|
-
const { baseProps: n, controlProps: o } =
|
|
1784
|
+
function cr(t) {
|
|
1785
|
+
var K;
|
|
1786
|
+
const { baseProps: n, controlProps: o } = Qt(t, {
|
|
1786
1787
|
className: "component-select-control"
|
|
1787
|
-
}),
|
|
1788
|
-
value:
|
|
1789
|
-
onChangeValue:
|
|
1790
|
-
options:
|
|
1791
|
-
placeholder:
|
|
1792
|
-
searchable:
|
|
1793
|
-
...
|
|
1794
|
-
} = o,
|
|
1795
|
-
baseSort: (
|
|
1788
|
+
}), { prefix: e, suffix: r, ...l } = n, [a, m] = de(""), {
|
|
1789
|
+
value: v,
|
|
1790
|
+
onChangeValue: c = Wt,
|
|
1791
|
+
options: i,
|
|
1792
|
+
placeholder: s = "Choose an option...",
|
|
1793
|
+
searchable: f = !1,
|
|
1794
|
+
...C
|
|
1795
|
+
} = o, d = (i || []).map(Bt), p = Ce(() => _t(d, a, {
|
|
1796
|
+
baseSort: (x, Z) => x.index < Z.index ? -1 : 1,
|
|
1796
1797
|
keys: ["label", "description"]
|
|
1797
|
-
}), [
|
|
1798
|
+
}), [a]), V = f ? Ao : Xn, O = ((K = d.find((x) => x.value === v)) == null ? void 0 : K.label) || s;
|
|
1798
1799
|
return /* @__PURE__ */ w(
|
|
1799
|
-
|
|
1800
|
+
bo,
|
|
1800
1801
|
{
|
|
1801
1802
|
resetValueOnHide: !0,
|
|
1802
|
-
setValue: (
|
|
1803
|
-
|
|
1804
|
-
|
|
1803
|
+
setValue: (x) => {
|
|
1804
|
+
$t(() => {
|
|
1805
|
+
m(x);
|
|
1805
1806
|
});
|
|
1806
1807
|
},
|
|
1807
|
-
children: /* @__PURE__ */ w(
|
|
1808
|
-
/* @__PURE__ */
|
|
1809
|
-
|
|
1808
|
+
children: /* @__PURE__ */ w(Zn, { value: v, setValue: c, children: /* @__PURE__ */ X(zt, { ...l, children: [
|
|
1809
|
+
/* @__PURE__ */ X(
|
|
1810
|
+
Wn,
|
|
1810
1811
|
{
|
|
1811
1812
|
className: "component-select-control__input",
|
|
1812
|
-
...
|
|
1813
|
+
...C,
|
|
1813
1814
|
children: [
|
|
1814
1815
|
/* @__PURE__ */ w(
|
|
1815
1816
|
"div",
|
|
1816
1817
|
{
|
|
1817
|
-
className:
|
|
1818
|
+
className: jt(
|
|
1818
1819
|
"component-select-control__value",
|
|
1819
|
-
|
|
1820
|
+
O === s && "component-select-control__value--placeholder"
|
|
1820
1821
|
),
|
|
1821
|
-
children: /* @__PURE__ */ w(
|
|
1822
|
+
children: /* @__PURE__ */ w(to, { fallback: s, children: () => /* @__PURE__ */ X(we, { children: [
|
|
1823
|
+
/* @__PURE__ */ w(Fe, { children: e }),
|
|
1824
|
+
/* @__PURE__ */ w("span", { className: "component-select-control__value__label", children: O }),
|
|
1825
|
+
/* @__PURE__ */ w(Fe, { suffix: !0, children: r })
|
|
1826
|
+
] }) })
|
|
1822
1827
|
}
|
|
1823
1828
|
),
|
|
1824
|
-
/* @__PURE__ */ w("div", { className: "component-select-control__caret", children: /* @__PURE__ */ w(
|
|
1829
|
+
/* @__PURE__ */ w("div", { className: "component-select-control__caret", children: /* @__PURE__ */ w(Zt, {}) })
|
|
1825
1830
|
]
|
|
1826
1831
|
}
|
|
1827
1832
|
),
|
|
1828
|
-
/* @__PURE__ */
|
|
1829
|
-
|
|
1833
|
+
/* @__PURE__ */ X(
|
|
1834
|
+
eo,
|
|
1830
1835
|
{
|
|
1831
1836
|
className: "component-select-control__popover",
|
|
1832
1837
|
"data-colour-scheme": "invert",
|
|
@@ -1839,16 +1844,16 @@ function ir(t) {
|
|
|
1839
1844
|
shift: -1,
|
|
1840
1845
|
portal: !0,
|
|
1841
1846
|
children: [
|
|
1842
|
-
/* @__PURE__ */
|
|
1847
|
+
/* @__PURE__ */ X(
|
|
1843
1848
|
"div",
|
|
1844
1849
|
{
|
|
1845
1850
|
className: "component-select-control__popover__search-wrapper",
|
|
1846
|
-
inert: !
|
|
1847
|
-
hidden: !
|
|
1851
|
+
inert: !f,
|
|
1852
|
+
hidden: !f,
|
|
1848
1853
|
children: [
|
|
1849
1854
|
/* @__PURE__ */ w(Vt, { className: "component-select-control__popover__search-icon" }),
|
|
1850
1855
|
/* @__PURE__ */ w(
|
|
1851
|
-
|
|
1856
|
+
po,
|
|
1852
1857
|
{
|
|
1853
1858
|
autoSelect: !0,
|
|
1854
1859
|
placeholder: "Search...",
|
|
@@ -1858,22 +1863,22 @@ function ir(t) {
|
|
|
1858
1863
|
]
|
|
1859
1864
|
}
|
|
1860
1865
|
),
|
|
1861
|
-
/* @__PURE__ */ w(
|
|
1862
|
-
|
|
1866
|
+
/* @__PURE__ */ w(V, { className: "component-select-control__list", children: p.map((x) => /* @__PURE__ */ X(
|
|
1867
|
+
zn,
|
|
1863
1868
|
{
|
|
1864
|
-
disabled:
|
|
1865
|
-
value:
|
|
1869
|
+
disabled: x.disabled,
|
|
1870
|
+
value: x.value,
|
|
1866
1871
|
className: "component-select-control__option",
|
|
1867
|
-
render: /* @__PURE__ */ w(
|
|
1872
|
+
render: /* @__PURE__ */ w(Eo, {}),
|
|
1868
1873
|
children: [
|
|
1869
|
-
/* @__PURE__ */
|
|
1870
|
-
|
|
1871
|
-
|
|
1874
|
+
/* @__PURE__ */ X("div", { className: "component-select-control__option__label", children: [
|
|
1875
|
+
x.icon,
|
|
1876
|
+
x.label
|
|
1872
1877
|
] }),
|
|
1873
|
-
|
|
1878
|
+
x.description && /* @__PURE__ */ w("div", { className: "component-select-control__option__description", children: x.description })
|
|
1874
1879
|
]
|
|
1875
1880
|
},
|
|
1876
|
-
|
|
1881
|
+
x.value
|
|
1877
1882
|
)) })
|
|
1878
1883
|
]
|
|
1879
1884
|
}
|
|
@@ -1883,5 +1888,5 @@ function ir(t) {
|
|
|
1883
1888
|
);
|
|
1884
1889
|
}
|
|
1885
1890
|
export {
|
|
1886
|
-
|
|
1891
|
+
cr as SelectControl
|
|
1887
1892
|
};
|