@purpurds/autocomplete 7.0.0 → 7.2.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/LICENSE.txt +3 -3
- package/dist/autocomplete.cjs.js +15 -15
- package/dist/autocomplete.cjs.js.map +1 -1
- package/dist/autocomplete.es.js +277 -277
- package/dist/autocomplete.es.js.map +1 -1
- package/package.json +12 -12
package/dist/autocomplete.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as l, jsxs as j, Fragment as et } from "react/jsx-runtime";
|
|
2
2
|
import * as m from "react";
|
|
3
|
-
import { forwardRef as X, Children as qt, isValidElement as nt, useId as kt, useRef as K, useCallback as Ct, useEffect as Pt, useState as ar, cloneElement as
|
|
3
|
+
import { forwardRef as X, Children as qt, isValidElement as nt, useId as kt, useRef as K, useCallback as Ct, useEffect as Pt, useState as ar, cloneElement as Mt } from "react";
|
|
4
4
|
import "react-dom";
|
|
5
|
-
function
|
|
5
|
+
function Rt(t) {
|
|
6
6
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
7
7
|
}
|
|
8
8
|
var gr = { exports: {} };
|
|
@@ -11,9 +11,9 @@ var gr = { exports: {} };
|
|
|
11
11
|
Licensed under the MIT License (MIT), see
|
|
12
12
|
http://jedwatson.github.io/classnames
|
|
13
13
|
*/
|
|
14
|
-
var
|
|
15
|
-
function
|
|
16
|
-
return
|
|
14
|
+
var hr;
|
|
15
|
+
function Lt() {
|
|
16
|
+
return hr || (hr = 1, function(t) {
|
|
17
17
|
(function() {
|
|
18
18
|
var a = {}.hasOwnProperty;
|
|
19
19
|
function n() {
|
|
@@ -44,8 +44,8 @@ function Rt() {
|
|
|
44
44
|
})();
|
|
45
45
|
}(gr)), gr.exports;
|
|
46
46
|
}
|
|
47
|
-
var
|
|
48
|
-
const
|
|
47
|
+
var Bt = Lt();
|
|
48
|
+
const Et = /* @__PURE__ */ Rt(Bt), Tt = {
|
|
49
49
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
50
50
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
51
51
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -53,7 +53,7 @@ const Bt = /* @__PURE__ */ Mt(Lt), Et = {
|
|
|
53
53
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
54
54
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
55
55
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
56
|
-
},
|
|
56
|
+
}, It = Et.bind(Tt), br = "purpur-icon", zt = "md", Dt = (t) => t.filter((a) => Object.keys(a).length >= 1).map((a) => `${a.name}="${a.value}"`).join(" "), Vt = ({ content: t = "", title: a } = {}) => {
|
|
57
57
|
const n = [
|
|
58
58
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
59
59
|
{ name: "fill", value: "currentColor" },
|
|
@@ -66,14 +66,14 @@ const Bt = /* @__PURE__ */ Mt(Lt), Et = {
|
|
|
66
66
|
svg: a,
|
|
67
67
|
allyTitle: n,
|
|
68
68
|
className: i,
|
|
69
|
-
size: o =
|
|
69
|
+
size: o = zt,
|
|
70
70
|
...r
|
|
71
71
|
}) => {
|
|
72
72
|
const e = Vt({
|
|
73
73
|
content: Zt(a.svg),
|
|
74
74
|
title: n
|
|
75
|
-
}), u =
|
|
76
|
-
return /* @__PURE__ */
|
|
75
|
+
}), u = It(i, br, `${br}--${o}`);
|
|
76
|
+
return /* @__PURE__ */ l(
|
|
77
77
|
"span",
|
|
78
78
|
{
|
|
79
79
|
className: u,
|
|
@@ -89,20 +89,20 @@ const Ht = {
|
|
|
89
89
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M20.136 7.864a.9.9 0 0 0-1.272 0L12 14.727 5.136 7.864a.9.9 0 0 0-1.272 1.272l7.5 7.5a.9.9 0 0 0 1.272 0l7.5-7.5a.9.9 0 0 0 0-1.272Z" clip-rule="evenodd"/></svg>',
|
|
90
90
|
keywords: ["chevron-down"],
|
|
91
91
|
category: "utility"
|
|
92
|
-
}, at = (t) => /* @__PURE__ */
|
|
92
|
+
}, at = (t) => /* @__PURE__ */ l(ut, { ...t, svg: Ht });
|
|
93
93
|
at.displayName = "IconChevronDown";
|
|
94
94
|
function Ft(t) {
|
|
95
95
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
96
96
|
}
|
|
97
|
-
var
|
|
97
|
+
var yr = { exports: {} };
|
|
98
98
|
/*!
|
|
99
99
|
Copyright (c) 2018 Jed Watson.
|
|
100
100
|
Licensed under the MIT License (MIT), see
|
|
101
101
|
http://jedwatson.github.io/classnames
|
|
102
102
|
*/
|
|
103
|
-
var
|
|
103
|
+
var xr;
|
|
104
104
|
function Wt() {
|
|
105
|
-
return
|
|
105
|
+
return xr || (xr = 1, function(t) {
|
|
106
106
|
(function() {
|
|
107
107
|
var a = {}.hasOwnProperty;
|
|
108
108
|
function n() {
|
|
@@ -131,7 +131,7 @@ function Wt() {
|
|
|
131
131
|
}
|
|
132
132
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
133
133
|
})();
|
|
134
|
-
}(
|
|
134
|
+
}(yr)), yr.exports;
|
|
135
135
|
}
|
|
136
136
|
var Gt = Wt();
|
|
137
137
|
const it = /* @__PURE__ */ Ft(Gt), ot = {
|
|
@@ -202,7 +202,7 @@ const Xt = /* @__PURE__ */ Ut(Yt), Jt = {
|
|
|
202
202
|
a ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
203
203
|
], i = a ? `<title>${a}</title>` : "";
|
|
204
204
|
return `<svg ${te(n)}>${i}${t}</svg>`;
|
|
205
|
-
}, ne = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(),
|
|
205
|
+
}, ne = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), pt = ({
|
|
206
206
|
["data-testid"]: t,
|
|
207
207
|
svg: a,
|
|
208
208
|
allyTitle: n,
|
|
@@ -214,7 +214,7 @@ const Xt = /* @__PURE__ */ Ut(Yt), Jt = {
|
|
|
214
214
|
content: ne(a.svg),
|
|
215
215
|
title: n
|
|
216
216
|
}), u = Qt(i, Sr, `${Sr}--${o}`);
|
|
217
|
-
return /* @__PURE__ */
|
|
217
|
+
return /* @__PURE__ */ l(
|
|
218
218
|
"span",
|
|
219
219
|
{
|
|
220
220
|
className: u,
|
|
@@ -224,26 +224,26 @@ const Xt = /* @__PURE__ */ Ut(Yt), Jt = {
|
|
|
224
224
|
}
|
|
225
225
|
);
|
|
226
226
|
};
|
|
227
|
-
|
|
227
|
+
pt.displayName = "Icon";
|
|
228
228
|
const ue = {
|
|
229
229
|
name: "checkmark",
|
|
230
230
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M21.06 3.795a.9.9 0 0 1 .145 1.264l-11.5 14.5a.9.9 0 0 1-1.341.077l-6-6a.9.9 0 0 1 1.272-1.272l5.286 5.286L19.795 3.94a.9.9 0 0 1 1.264-.145Z" clip-rule="evenodd"/></svg>',
|
|
231
231
|
keywords: ["checkmark"],
|
|
232
232
|
category: "utility"
|
|
233
|
-
},
|
|
234
|
-
|
|
233
|
+
}, lt = (t) => /* @__PURE__ */ l(pt, { ...t, svg: ue });
|
|
234
|
+
lt.displayName = "IconCheckmark";
|
|
235
235
|
function ae(t) {
|
|
236
236
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
237
237
|
}
|
|
238
|
-
var
|
|
238
|
+
var Nr = { exports: {} };
|
|
239
239
|
/*!
|
|
240
240
|
Copyright (c) 2018 Jed Watson.
|
|
241
241
|
Licensed under the MIT License (MIT), see
|
|
242
242
|
http://jedwatson.github.io/classnames
|
|
243
243
|
*/
|
|
244
|
-
var
|
|
244
|
+
var jr;
|
|
245
245
|
function ie() {
|
|
246
|
-
return
|
|
246
|
+
return jr || (jr = 1, function(t) {
|
|
247
247
|
(function() {
|
|
248
248
|
var a = {}.hasOwnProperty;
|
|
249
249
|
function n() {
|
|
@@ -272,10 +272,10 @@ function ie() {
|
|
|
272
272
|
}
|
|
273
273
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
274
274
|
})();
|
|
275
|
-
}(
|
|
275
|
+
}(Nr)), Nr.exports;
|
|
276
276
|
}
|
|
277
277
|
var oe = ie();
|
|
278
|
-
const
|
|
278
|
+
const pe = /* @__PURE__ */ ae(oe), V = {
|
|
279
279
|
"purpur-paragraph": "_purpur-paragraph_1rh57_1",
|
|
280
280
|
"purpur-paragraph--disabled": "_purpur-paragraph--disabled_1rh57_7",
|
|
281
281
|
"purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_1rh57_10",
|
|
@@ -290,7 +290,7 @@ const le = /* @__PURE__ */ ae(oe), V = {
|
|
|
290
290
|
"purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_1rh57_60",
|
|
291
291
|
"purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_1rh57_67",
|
|
292
292
|
"purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1rh57_75"
|
|
293
|
-
},
|
|
293
|
+
}, le = {
|
|
294
294
|
PARAGRAPH100: "paragraph-100"
|
|
295
295
|
}, Z = "purpur-paragraph", st = ({
|
|
296
296
|
["data-testid"]: t,
|
|
@@ -299,10 +299,10 @@ const le = /* @__PURE__ */ ae(oe), V = {
|
|
|
299
299
|
disabled: i,
|
|
300
300
|
enableHyphenation: o = !1,
|
|
301
301
|
negative: r = !1,
|
|
302
|
-
variant: e =
|
|
302
|
+
variant: e = le.PARAGRAPH100,
|
|
303
303
|
...u
|
|
304
304
|
}) => {
|
|
305
|
-
const f =
|
|
305
|
+
const f = pe([
|
|
306
306
|
n,
|
|
307
307
|
V[Z],
|
|
308
308
|
V[`${Z}--${e}`],
|
|
@@ -312,30 +312,30 @@ const le = /* @__PURE__ */ ae(oe), V = {
|
|
|
312
312
|
[V[`${Z}--negative`]]: r
|
|
313
313
|
}
|
|
314
314
|
]);
|
|
315
|
-
return /* @__PURE__ */
|
|
315
|
+
return /* @__PURE__ */ l("p", { ...u, className: f, "data-testid": t, children: a });
|
|
316
316
|
};
|
|
317
317
|
st.displayName = "Paragraph";
|
|
318
|
-
const
|
|
318
|
+
const Ar = it.bind(ot), B = "purpur-listbox", sr = X(
|
|
319
319
|
(t, a) => {
|
|
320
|
-
const { disabled: n, highlighted: i, hovered: o, selected: r, children: e, noninteractive: u, ...f } = t,
|
|
321
|
-
[`${
|
|
322
|
-
[`${
|
|
323
|
-
[`${
|
|
324
|
-
[`${
|
|
325
|
-
[`${
|
|
320
|
+
const { disabled: n, highlighted: i, hovered: o, selected: r, children: e, noninteractive: u, ...f } = t, y = Ar(`${B}-item`, f.className, {
|
|
321
|
+
[`${B}-item--highlighted`]: i,
|
|
322
|
+
[`${B}-item--selected`]: r,
|
|
323
|
+
[`${B}-item--hovered`]: o,
|
|
324
|
+
[`${B}-item--disabled`]: n,
|
|
325
|
+
[`${B}-item--noninteractive`]: u
|
|
326
326
|
});
|
|
327
|
-
return /* @__PURE__ */
|
|
327
|
+
return /* @__PURE__ */ j(
|
|
328
328
|
"li",
|
|
329
329
|
{
|
|
330
330
|
...f,
|
|
331
331
|
ref: a,
|
|
332
|
-
className:
|
|
332
|
+
className: y,
|
|
333
333
|
"aria-selected": !!r,
|
|
334
334
|
role: "option",
|
|
335
335
|
"aria-disabled": !!n,
|
|
336
336
|
children: [
|
|
337
|
-
typeof e == "string" ? /* @__PURE__ */
|
|
338
|
-
r && /* @__PURE__ */
|
|
337
|
+
typeof e == "string" ? /* @__PURE__ */ l(st, { children: e }) : e,
|
|
338
|
+
r && /* @__PURE__ */ l(lt, { size: "xs", className: Ar(`${B}-item__icon`) })
|
|
339
339
|
]
|
|
340
340
|
}
|
|
341
341
|
);
|
|
@@ -343,7 +343,7 @@ const Or = it.bind(ot), L = "purpur-listbox", sr = X(
|
|
|
343
343
|
), se = (t) => nt(t) && (t == null ? void 0 : t.type) === sr;
|
|
344
344
|
sr.displayName = "ListBoxItem";
|
|
345
345
|
const ce = it.bind(ot), de = "purpur-listbox", Y = X(
|
|
346
|
-
({ children: t, ...a }, n) => /* @__PURE__ */
|
|
346
|
+
({ children: t, ...a }, n) => /* @__PURE__ */ l(
|
|
347
347
|
"ul",
|
|
348
348
|
{
|
|
349
349
|
...a,
|
|
@@ -362,7 +362,7 @@ const _e = {
|
|
|
362
362
|
function fe(t) {
|
|
363
363
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
364
364
|
}
|
|
365
|
-
var
|
|
365
|
+
var Or = { exports: {} };
|
|
366
366
|
/*!
|
|
367
367
|
Copyright (c) 2018 Jed Watson.
|
|
368
368
|
Licensed under the MIT License (MIT), see
|
|
@@ -399,36 +399,36 @@ function ve() {
|
|
|
399
399
|
}
|
|
400
400
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
401
401
|
})();
|
|
402
|
-
}(
|
|
402
|
+
}(Or)), Or.exports;
|
|
403
403
|
}
|
|
404
404
|
var me = ve();
|
|
405
|
-
const kr = /* @__PURE__ */ fe(me), ge = "
|
|
406
|
-
"purpur-spinner": "_purpur-
|
|
405
|
+
const kr = /* @__PURE__ */ fe(me), ge = "_rotate_12t9p_1", he = "_dash_12t9p_1", H = {
|
|
406
|
+
"purpur-spinner": "_purpur-spinner_12t9p_2",
|
|
407
407
|
rotate: ge,
|
|
408
|
-
"purpur-spinner--xxs": "_purpur-spinner--
|
|
409
|
-
"purpur-spinner--xs": "_purpur-spinner--
|
|
410
|
-
"purpur-spinner--sm": "_purpur-spinner--
|
|
411
|
-
"purpur-spinner--md": "_purpur-spinner--
|
|
412
|
-
"purpur-spinner--lg": "_purpur-spinner--
|
|
413
|
-
"purpur-spinner__circle": "_purpur-
|
|
414
|
-
dash:
|
|
415
|
-
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--
|
|
416
|
-
"purpur-spinner__circle--negative": "_purpur-spinner__circle--
|
|
417
|
-
}, F = "purpur-spinner",
|
|
408
|
+
"purpur-spinner--xxs": "_purpur-spinner--xxs_12t9p_6",
|
|
409
|
+
"purpur-spinner--xs": "_purpur-spinner--xs_12t9p_10",
|
|
410
|
+
"purpur-spinner--sm": "_purpur-spinner--sm_12t9p_14",
|
|
411
|
+
"purpur-spinner--md": "_purpur-spinner--md_12t9p_18",
|
|
412
|
+
"purpur-spinner--lg": "_purpur-spinner--lg_12t9p_22",
|
|
413
|
+
"purpur-spinner__circle": "_purpur-spinner__circle_12t9p_26",
|
|
414
|
+
dash: he,
|
|
415
|
+
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_12t9p_41",
|
|
416
|
+
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_12t9p_44"
|
|
417
|
+
}, F = "purpur-spinner", be = {
|
|
418
418
|
SM: "sm"
|
|
419
|
-
},
|
|
419
|
+
}, ye = ({
|
|
420
420
|
["data-testid"]: t,
|
|
421
421
|
disabled: a = !1,
|
|
422
422
|
negative: n = !1,
|
|
423
|
-
size: i =
|
|
423
|
+
size: i = be.SM,
|
|
424
424
|
...o
|
|
425
|
-
}) => /* @__PURE__ */
|
|
425
|
+
}) => /* @__PURE__ */ l(
|
|
426
426
|
"div",
|
|
427
427
|
{
|
|
428
428
|
className: kr([H[F], H[`${F}--${i}`]]),
|
|
429
429
|
"data-testid": t,
|
|
430
430
|
...o,
|
|
431
|
-
children: /* @__PURE__ */
|
|
431
|
+
children: /* @__PURE__ */ l("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ l(
|
|
432
432
|
"circle",
|
|
433
433
|
{
|
|
434
434
|
className: kr(H[`${F}__circle`], {
|
|
@@ -442,7 +442,7 @@ const kr = /* @__PURE__ */ fe(me), ge = "_rotate_1xozj_1", be = "_dash_1xozj_1",
|
|
|
442
442
|
) })
|
|
443
443
|
}
|
|
444
444
|
);
|
|
445
|
-
function
|
|
445
|
+
function xe(t) {
|
|
446
446
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
447
447
|
}
|
|
448
448
|
var Cr = { exports: {} };
|
|
@@ -485,7 +485,7 @@ function we() {
|
|
|
485
485
|
}(Cr)), Cr.exports;
|
|
486
486
|
}
|
|
487
487
|
var $e = we();
|
|
488
|
-
const Se = /* @__PURE__ */
|
|
488
|
+
const Se = /* @__PURE__ */ xe($e), Ne = {
|
|
489
489
|
"purpur-button": "_purpur-button_w455q_1",
|
|
490
490
|
"purpur-button--xs": "_purpur-button--xs_w455q_33",
|
|
491
491
|
"purpur-button--icon-only": "_purpur-button--icon-only_w455q_36",
|
|
@@ -507,7 +507,7 @@ const Se = /* @__PURE__ */ ye($e), je = {
|
|
|
507
507
|
"purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-negative_w455q_166",
|
|
508
508
|
"purpur-button--text-negative": "_purpur-button--text-negative_w455q_181",
|
|
509
509
|
"purpur-button--text": "_purpur-button--text_w455q_181"
|
|
510
|
-
},
|
|
510
|
+
}, je = Se.bind(Ne), E = "purpur-button", Ae = ({
|
|
511
511
|
children: t,
|
|
512
512
|
className: a,
|
|
513
513
|
["data-testid"]: n,
|
|
@@ -517,60 +517,60 @@ const Se = /* @__PURE__ */ ye($e), je = {
|
|
|
517
517
|
loading: e = !1,
|
|
518
518
|
negative: u = !1,
|
|
519
519
|
onClick: f,
|
|
520
|
-
size:
|
|
521
|
-
variant:
|
|
522
|
-
type:
|
|
520
|
+
size: y = "md",
|
|
521
|
+
variant: x,
|
|
522
|
+
type: A = "button",
|
|
523
523
|
...S
|
|
524
524
|
}, _) => {
|
|
525
|
-
if (r &&
|
|
525
|
+
if (r && x === "destructive")
|
|
526
526
|
return null;
|
|
527
|
-
const $ =
|
|
527
|
+
const $ = je(
|
|
528
528
|
[
|
|
529
|
-
|
|
530
|
-
`${
|
|
531
|
-
`${
|
|
529
|
+
E,
|
|
530
|
+
`${E}--${u ? `${x}-negative` : x}`,
|
|
531
|
+
`${E}--${y}`
|
|
532
532
|
],
|
|
533
533
|
{
|
|
534
|
-
[`${
|
|
535
|
-
[`${
|
|
536
|
-
[`${
|
|
537
|
-
[`${
|
|
534
|
+
[`${E}--icon-only`]: r,
|
|
535
|
+
[`${E}--negative`]: u,
|
|
536
|
+
[`${E}--full-width`]: o,
|
|
537
|
+
[`${E}--disabled`]: i || e
|
|
538
538
|
},
|
|
539
539
|
a
|
|
540
|
-
),
|
|
540
|
+
), N = (s) => {
|
|
541
541
|
i || e ? s.preventDefault() : f && f(s);
|
|
542
542
|
}, w = !!S["aria-disabled"] || i || e;
|
|
543
|
-
return /* @__PURE__ */
|
|
543
|
+
return /* @__PURE__ */ j(
|
|
544
544
|
"button",
|
|
545
545
|
{
|
|
546
546
|
className: $,
|
|
547
547
|
"data-testid": n,
|
|
548
|
-
type:
|
|
548
|
+
type: A,
|
|
549
549
|
ref: _,
|
|
550
550
|
"aria-disabled": w,
|
|
551
|
-
onClick:
|
|
551
|
+
onClick: N,
|
|
552
552
|
...S,
|
|
553
553
|
children: [
|
|
554
|
-
e && /* @__PURE__ */
|
|
554
|
+
e && /* @__PURE__ */ l(ye, { size: y === _e.LG ? "xs" : "xxs", negative: u, disabled: w }),
|
|
555
555
|
" ",
|
|
556
556
|
t
|
|
557
557
|
]
|
|
558
558
|
}
|
|
559
559
|
);
|
|
560
|
-
}, ct = X(
|
|
560
|
+
}, ct = X(Ae);
|
|
561
561
|
ct.displayName = "Button";
|
|
562
|
-
function
|
|
562
|
+
function Oe(t) {
|
|
563
563
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
564
564
|
}
|
|
565
|
-
var
|
|
565
|
+
var Mr = { exports: {} };
|
|
566
566
|
/*!
|
|
567
567
|
Copyright (c) 2018 Jed Watson.
|
|
568
568
|
Licensed under the MIT License (MIT), see
|
|
569
569
|
http://jedwatson.github.io/classnames
|
|
570
570
|
*/
|
|
571
|
-
var
|
|
571
|
+
var Rr;
|
|
572
572
|
function qe() {
|
|
573
|
-
return
|
|
573
|
+
return Rr || (Rr = 1, function(t) {
|
|
574
574
|
(function() {
|
|
575
575
|
var a = {}.hasOwnProperty;
|
|
576
576
|
function n() {
|
|
@@ -599,10 +599,10 @@ function qe() {
|
|
|
599
599
|
}
|
|
600
600
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
601
601
|
})();
|
|
602
|
-
}(
|
|
602
|
+
}(Mr)), Mr.exports;
|
|
603
603
|
}
|
|
604
604
|
var ke = qe();
|
|
605
|
-
const Ce = /* @__PURE__ */
|
|
605
|
+
const Ce = /* @__PURE__ */ Oe(ke), Pe = {
|
|
606
606
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
607
607
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
608
608
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -610,27 +610,27 @@ const Ce = /* @__PURE__ */ Ae(ke), Pe = {
|
|
|
610
610
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
611
611
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
612
612
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
613
|
-
},
|
|
613
|
+
}, Me = Ce.bind(Pe), Lr = "purpur-icon", Re = "md", Le = (t) => t.filter((a) => Object.keys(a).length >= 1).map((a) => `${a.name}="${a.value}"`).join(" "), Be = ({ content: t = "", title: a } = {}) => {
|
|
614
614
|
const n = [
|
|
615
615
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
616
616
|
{ name: "fill", value: "currentColor" },
|
|
617
617
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
618
618
|
a ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
619
619
|
], i = a ? `<title>${a}</title>` : "";
|
|
620
|
-
return `<svg ${
|
|
621
|
-
},
|
|
620
|
+
return `<svg ${Le(n)}>${i}${t}</svg>`;
|
|
621
|
+
}, Ee = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), dt = ({
|
|
622
622
|
["data-testid"]: t,
|
|
623
623
|
svg: a,
|
|
624
624
|
allyTitle: n,
|
|
625
625
|
className: i,
|
|
626
|
-
size: o =
|
|
626
|
+
size: o = Re,
|
|
627
627
|
...r
|
|
628
628
|
}) => {
|
|
629
|
-
const e =
|
|
630
|
-
content:
|
|
629
|
+
const e = Be({
|
|
630
|
+
content: Ee(a.svg),
|
|
631
631
|
title: n
|
|
632
|
-
}), u =
|
|
633
|
-
return /* @__PURE__ */
|
|
632
|
+
}), u = Me(i, Lr, `${Lr}--${o}`);
|
|
633
|
+
return /* @__PURE__ */ l(
|
|
634
634
|
"span",
|
|
635
635
|
{
|
|
636
636
|
className: u,
|
|
@@ -641,24 +641,24 @@ const Ce = /* @__PURE__ */ Ae(ke), Pe = {
|
|
|
641
641
|
);
|
|
642
642
|
};
|
|
643
643
|
dt.displayName = "Icon";
|
|
644
|
-
const
|
|
644
|
+
const Te = {
|
|
645
645
|
name: "error-filled",
|
|
646
646
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 24" fill="currentColor"><path fill-rule="evenodd" d="M14.268 3.5c-.77-1.333-2.694-1.333-3.464 0l-8.66 15c-.77 1.333.192 3 1.732 3h17.32c1.54 0 2.502-1.667 1.733-3l-8.66-15Zm-.694 5.067-.247 6.876h-1.566l-.247-6.876a1.03 1.03 0 1 1 2.06 0Zm.212 8.917c0 .649-.585 1.234-1.25 1.234-.648 0-1.25-.585-1.25-1.234 0-.633.602-1.234 1.25-1.234.665 0 1.25.601 1.25 1.234Z" clip-rule="evenodd"/></svg>',
|
|
647
647
|
keywords: ["error-filled"],
|
|
648
648
|
category: "status"
|
|
649
649
|
};
|
|
650
|
-
function
|
|
650
|
+
function Ie(t) {
|
|
651
651
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
652
652
|
}
|
|
653
|
-
var
|
|
653
|
+
var Br = { exports: {} };
|
|
654
654
|
/*!
|
|
655
655
|
Copyright (c) 2018 Jed Watson.
|
|
656
656
|
Licensed under the MIT License (MIT), see
|
|
657
657
|
http://jedwatson.github.io/classnames
|
|
658
658
|
*/
|
|
659
|
-
var
|
|
660
|
-
function
|
|
661
|
-
return
|
|
659
|
+
var Er;
|
|
660
|
+
function ze() {
|
|
661
|
+
return Er || (Er = 1, function(t) {
|
|
662
662
|
(function() {
|
|
663
663
|
var a = {}.hasOwnProperty;
|
|
664
664
|
function n() {
|
|
@@ -687,26 +687,26 @@ function Ie() {
|
|
|
687
687
|
}
|
|
688
688
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
689
689
|
})();
|
|
690
|
-
}(
|
|
690
|
+
}(Br)), Br.exports;
|
|
691
691
|
}
|
|
692
|
-
var De =
|
|
693
|
-
const Ve = /* @__PURE__ */
|
|
692
|
+
var De = ze();
|
|
693
|
+
const Ve = /* @__PURE__ */ Ie(De), Tr = {
|
|
694
694
|
"purpur-field-error-text": "_purpur-field-error-text_1lj7e_1",
|
|
695
695
|
"purpur-field-error-text__icon": "_purpur-field-error-text__icon_1lj7e_11"
|
|
696
|
-
},
|
|
696
|
+
}, Ir = "purpur-field-error-text", Ze = ({
|
|
697
697
|
children: t,
|
|
698
698
|
className: a,
|
|
699
699
|
["aria-relevant"]: n = "additions text",
|
|
700
700
|
...i
|
|
701
|
-
}) => /* @__PURE__ */
|
|
701
|
+
}) => /* @__PURE__ */ j(
|
|
702
702
|
"div",
|
|
703
703
|
{
|
|
704
|
-
className: Ve([a,
|
|
704
|
+
className: Ve([a, Tr[Ir]]),
|
|
705
705
|
"aria-live": "assertive",
|
|
706
706
|
"aria-relevant": n,
|
|
707
707
|
...i,
|
|
708
708
|
children: [
|
|
709
|
-
/* @__PURE__ */
|
|
709
|
+
/* @__PURE__ */ l(dt, { svg: Te, size: "xs", className: Tr[`${Ir}__icon`] }),
|
|
710
710
|
t
|
|
711
711
|
]
|
|
712
712
|
}
|
|
@@ -714,7 +714,7 @@ const Ve = /* @__PURE__ */ Te(De), Er = {
|
|
|
714
714
|
function He(t) {
|
|
715
715
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
716
716
|
}
|
|
717
|
-
var
|
|
717
|
+
var zr = { exports: {} };
|
|
718
718
|
/*!
|
|
719
719
|
Copyright (c) 2018 Jed Watson.
|
|
720
720
|
Licensed under the MIT License (MIT), see
|
|
@@ -751,7 +751,7 @@ function Fe() {
|
|
|
751
751
|
}
|
|
752
752
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
753
753
|
})();
|
|
754
|
-
}(
|
|
754
|
+
}(zr)), zr.exports;
|
|
755
755
|
}
|
|
756
756
|
var We = Fe();
|
|
757
757
|
const Ge = /* @__PURE__ */ He(We), Vr = {
|
|
@@ -771,7 +771,7 @@ const Ge = /* @__PURE__ */ He(We), Vr = {
|
|
|
771
771
|
[Vr[`${Zr}--disabled`]]: n
|
|
772
772
|
}
|
|
773
773
|
]);
|
|
774
|
-
return /* @__PURE__ */
|
|
774
|
+
return /* @__PURE__ */ l("span", { id: i, className: r, ...o, children: t });
|
|
775
775
|
};
|
|
776
776
|
function Ke(t) {
|
|
777
777
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
@@ -844,7 +844,7 @@ const Je = /* @__PURE__ */ Ke(Xe), Qe = {
|
|
|
844
844
|
content: un(a.svg),
|
|
845
845
|
title: n
|
|
846
846
|
}), u = rn(i, Wr, `${Wr}--${o}`);
|
|
847
|
-
return /* @__PURE__ */
|
|
847
|
+
return /* @__PURE__ */ l(
|
|
848
848
|
"span",
|
|
849
849
|
{
|
|
850
850
|
className: u,
|
|
@@ -860,21 +860,21 @@ const an = {
|
|
|
860
860
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Zm4.712-12.491a.875.875 0 1 0-1.424-1.018l-4.4 6.16-2.27-2.27a.875.875 0 0 0-1.237 1.238l3 3a.875.875 0 0 0 1.331-.11l5-7Z" clip-rule="evenodd"/></svg>',
|
|
861
861
|
keywords: ["check-circle-filled"],
|
|
862
862
|
category: "status"
|
|
863
|
-
}, _t = (t) => /* @__PURE__ */
|
|
863
|
+
}, _t = (t) => /* @__PURE__ */ l(cr, { ...t, svg: an });
|
|
864
864
|
_t.displayName = "IconCheckCircleFilled";
|
|
865
865
|
const on = {
|
|
866
866
|
name: "close",
|
|
867
867
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M4.864 4.864a.9.9 0 0 1 1.273 0L12 10.727l5.864-5.863a.9.9 0 0 1 1.272 1.272L13.273 12l5.863 5.864a.9.9 0 1 1-1.272 1.272L12 13.273l-5.863 5.863a.9.9 0 0 1-1.273-1.272L10.727 12 4.864 6.136a.9.9 0 0 1 0-1.272Z" clip-rule="evenodd"/></svg>',
|
|
868
868
|
keywords: ["close"],
|
|
869
869
|
category: "utility"
|
|
870
|
-
}, ft = (t) => /* @__PURE__ */
|
|
870
|
+
}, ft = (t) => /* @__PURE__ */ l(cr, { ...t, svg: on });
|
|
871
871
|
ft.displayName = "IconClose";
|
|
872
872
|
function Gr(t, a) {
|
|
873
873
|
if (typeof t == "function")
|
|
874
874
|
return t(a);
|
|
875
875
|
t != null && (t.current = a);
|
|
876
876
|
}
|
|
877
|
-
function
|
|
877
|
+
function pn(...t) {
|
|
878
878
|
return (a) => {
|
|
879
879
|
let n = !1;
|
|
880
880
|
const i = t.map((o) => {
|
|
@@ -894,23 +894,23 @@ var vt = m.forwardRef((t, a) => {
|
|
|
894
894
|
const { children: n, ...i } = t, o = m.Children.toArray(n), r = o.find(sn);
|
|
895
895
|
if (r) {
|
|
896
896
|
const e = r.props.children, u = o.map((f) => f === r ? m.Children.count(e) > 1 ? m.Children.only(null) : m.isValidElement(e) ? e.props.children : null : f);
|
|
897
|
-
return /* @__PURE__ */
|
|
897
|
+
return /* @__PURE__ */ l(lr, { ...i, ref: a, children: m.isValidElement(e) ? m.cloneElement(e, void 0, u) : null });
|
|
898
898
|
}
|
|
899
|
-
return /* @__PURE__ */
|
|
899
|
+
return /* @__PURE__ */ l(lr, { ...i, ref: a, children: n });
|
|
900
900
|
});
|
|
901
901
|
vt.displayName = "Slot";
|
|
902
|
-
var
|
|
902
|
+
var lr = m.forwardRef((t, a) => {
|
|
903
903
|
const { children: n, ...i } = t;
|
|
904
904
|
if (m.isValidElement(n)) {
|
|
905
905
|
const o = dn(n), r = cn(i, n.props);
|
|
906
|
-
return n.type !== m.Fragment && (r.ref = a ?
|
|
906
|
+
return n.type !== m.Fragment && (r.ref = a ? pn(a, o) : o), m.cloneElement(n, r);
|
|
907
907
|
}
|
|
908
908
|
return m.Children.count(n) > 1 ? m.Children.only(null) : null;
|
|
909
909
|
});
|
|
910
|
-
|
|
911
|
-
var
|
|
910
|
+
lr.displayName = "SlotClone";
|
|
911
|
+
var ln = ({ children: t }) => /* @__PURE__ */ l(et, { children: t });
|
|
912
912
|
function sn(t) {
|
|
913
|
-
return m.isValidElement(t) && t.type ===
|
|
913
|
+
return m.isValidElement(t) && t.type === ln;
|
|
914
914
|
}
|
|
915
915
|
function cn(t, a) {
|
|
916
916
|
const n = { ...a };
|
|
@@ -947,10 +947,10 @@ var _n = [
|
|
|
947
947
|
], fn = _n.reduce((t, a) => {
|
|
948
948
|
const n = m.forwardRef((i, o) => {
|
|
949
949
|
const { asChild: r, ...e } = i, u = r ? vt : a;
|
|
950
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */
|
|
950
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ l(u, { ...e, ref: o });
|
|
951
951
|
});
|
|
952
952
|
return n.displayName = `Primitive.${a}`, { ...t, [a]: n };
|
|
953
|
-
}, {}), vn = "Label", mt = m.forwardRef((t, a) => /* @__PURE__ */
|
|
953
|
+
}, {}), vn = "Label", mt = m.forwardRef((t, a) => /* @__PURE__ */ l(
|
|
954
954
|
fn.label,
|
|
955
955
|
{
|
|
956
956
|
...t,
|
|
@@ -973,7 +973,7 @@ var Ur = { exports: {} };
|
|
|
973
973
|
http://jedwatson.github.io/classnames
|
|
974
974
|
*/
|
|
975
975
|
var Kr;
|
|
976
|
-
function
|
|
976
|
+
function hn() {
|
|
977
977
|
return Kr || (Kr = 1, function(t) {
|
|
978
978
|
(function() {
|
|
979
979
|
var a = {}.hasOwnProperty;
|
|
@@ -1005,19 +1005,19 @@ function bn() {
|
|
|
1005
1005
|
})();
|
|
1006
1006
|
}(Ur)), Ur.exports;
|
|
1007
1007
|
}
|
|
1008
|
-
var
|
|
1009
|
-
const
|
|
1008
|
+
var bn = hn();
|
|
1009
|
+
const yn = /* @__PURE__ */ gn(bn), ir = {
|
|
1010
1010
|
"purpur-label": "_purpur-label_1jndl_1",
|
|
1011
1011
|
"purpur-label--negative": "_purpur-label--negative_1jndl_8",
|
|
1012
1012
|
"purpur-label--disabled": "_purpur-label--disabled_1jndl_11"
|
|
1013
|
-
}, or = "purpur-label",
|
|
1013
|
+
}, or = "purpur-label", xn = ({
|
|
1014
1014
|
children: t,
|
|
1015
1015
|
className: a,
|
|
1016
1016
|
disabled: n,
|
|
1017
1017
|
negative: i = !1,
|
|
1018
1018
|
...o
|
|
1019
1019
|
}) => {
|
|
1020
|
-
const r =
|
|
1020
|
+
const r = yn([
|
|
1021
1021
|
a,
|
|
1022
1022
|
ir[or],
|
|
1023
1023
|
{
|
|
@@ -1025,7 +1025,7 @@ const hn = /* @__PURE__ */ gn(xn), ir = {
|
|
|
1025
1025
|
[ir[`${or}--negative`]]: i
|
|
1026
1026
|
}
|
|
1027
1027
|
]);
|
|
1028
|
-
return /* @__PURE__ */
|
|
1028
|
+
return /* @__PURE__ */ l(mn, { className: r, ...o, children: t });
|
|
1029
1029
|
};
|
|
1030
1030
|
function wn(t) {
|
|
1031
1031
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
@@ -1070,33 +1070,33 @@ function $n() {
|
|
|
1070
1070
|
}(Yr)), Yr.exports;
|
|
1071
1071
|
}
|
|
1072
1072
|
var Sn = $n();
|
|
1073
|
-
const Jr = /* @__PURE__ */ wn(Sn),
|
|
1074
|
-
"purpur-spinner": "_purpur-
|
|
1075
|
-
rotate:
|
|
1076
|
-
"purpur-spinner--xxs": "_purpur-spinner--
|
|
1077
|
-
"purpur-spinner--xs": "_purpur-spinner--
|
|
1078
|
-
"purpur-spinner--sm": "_purpur-spinner--
|
|
1079
|
-
"purpur-spinner--md": "_purpur-spinner--
|
|
1080
|
-
"purpur-spinner--lg": "_purpur-spinner--
|
|
1081
|
-
"purpur-spinner__circle": "_purpur-
|
|
1082
|
-
dash:
|
|
1083
|
-
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--
|
|
1084
|
-
"purpur-spinner__circle--negative": "_purpur-spinner__circle--
|
|
1085
|
-
}, G = "purpur-spinner",
|
|
1073
|
+
const Jr = /* @__PURE__ */ wn(Sn), Nn = "_rotate_12t9p_1", jn = "_dash_12t9p_1", W = {
|
|
1074
|
+
"purpur-spinner": "_purpur-spinner_12t9p_2",
|
|
1075
|
+
rotate: Nn,
|
|
1076
|
+
"purpur-spinner--xxs": "_purpur-spinner--xxs_12t9p_6",
|
|
1077
|
+
"purpur-spinner--xs": "_purpur-spinner--xs_12t9p_10",
|
|
1078
|
+
"purpur-spinner--sm": "_purpur-spinner--sm_12t9p_14",
|
|
1079
|
+
"purpur-spinner--md": "_purpur-spinner--md_12t9p_18",
|
|
1080
|
+
"purpur-spinner--lg": "_purpur-spinner--lg_12t9p_22",
|
|
1081
|
+
"purpur-spinner__circle": "_purpur-spinner__circle_12t9p_26",
|
|
1082
|
+
dash: jn,
|
|
1083
|
+
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_12t9p_41",
|
|
1084
|
+
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_12t9p_44"
|
|
1085
|
+
}, G = "purpur-spinner", An = {
|
|
1086
1086
|
SM: "sm"
|
|
1087
|
-
},
|
|
1087
|
+
}, On = ({
|
|
1088
1088
|
["data-testid"]: t,
|
|
1089
1089
|
disabled: a = !1,
|
|
1090
1090
|
negative: n = !1,
|
|
1091
|
-
size: i =
|
|
1091
|
+
size: i = An.SM,
|
|
1092
1092
|
...o
|
|
1093
|
-
}) => /* @__PURE__ */
|
|
1093
|
+
}) => /* @__PURE__ */ l(
|
|
1094
1094
|
"div",
|
|
1095
1095
|
{
|
|
1096
1096
|
className: Jr([W[G], W[`${G}--${i}`]]),
|
|
1097
1097
|
"data-testid": t,
|
|
1098
1098
|
...o,
|
|
1099
|
-
children: /* @__PURE__ */
|
|
1099
|
+
children: /* @__PURE__ */ l("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ l(
|
|
1100
1100
|
"circle",
|
|
1101
1101
|
{
|
|
1102
1102
|
className: Jr(W[`${G}__circle`], {
|
|
@@ -1153,7 +1153,7 @@ function kn() {
|
|
|
1153
1153
|
}(Qr)), Qr.exports;
|
|
1154
1154
|
}
|
|
1155
1155
|
var Cn = kn();
|
|
1156
|
-
const Pn = /* @__PURE__ */ qn(Cn),
|
|
1156
|
+
const Pn = /* @__PURE__ */ qn(Cn), Mn = {
|
|
1157
1157
|
"purpur-text-field": "_purpur-text-field_3gl1k_1",
|
|
1158
1158
|
"purpur-text-field__label": "_purpur-text-field__label_3gl1k_7",
|
|
1159
1159
|
"purpur-text-field__label-text": "_purpur-text-field__label-text_3gl1k_12",
|
|
@@ -1170,7 +1170,7 @@ const Pn = /* @__PURE__ */ qn(Cn), zn = {
|
|
|
1170
1170
|
"purpur-text-field__input--error": "_purpur-text-field__input--error_3gl1k_94",
|
|
1171
1171
|
"purpur-text-field__adornment-container": "_purpur-text-field__adornment-container_3gl1k_106",
|
|
1172
1172
|
"purpur-text-field__valid-icon": "_purpur-text-field__valid-icon_3gl1k_111"
|
|
1173
|
-
},
|
|
1173
|
+
}, Rn = (t) => K(t), k = Pn.bind(Mn), v = "purpur-text-field", Ln = ({
|
|
1174
1174
|
["data-testid"]: t,
|
|
1175
1175
|
className: a,
|
|
1176
1176
|
clearButtonAriaLabel: n,
|
|
@@ -1180,21 +1180,21 @@ const Pn = /* @__PURE__ */ qn(Cn), zn = {
|
|
|
1180
1180
|
errorText: e,
|
|
1181
1181
|
helperText: u,
|
|
1182
1182
|
label: f,
|
|
1183
|
-
loading:
|
|
1184
|
-
onClear:
|
|
1185
|
-
startAdornment:
|
|
1183
|
+
loading: y = !1,
|
|
1184
|
+
onClear: x,
|
|
1185
|
+
startAdornment: A,
|
|
1186
1186
|
valid: S = !1,
|
|
1187
1187
|
..._
|
|
1188
1188
|
}, $) => {
|
|
1189
|
-
var
|
|
1190
|
-
const w = kt(), s = _.id ?? w, g = (
|
|
1191
|
-
|
|
1189
|
+
var N;
|
|
1190
|
+
const w = kt(), s = _.id ?? w, g = (h) => t ? `${t}-${h}` : void 0, C = S && !e, M = u ? `${s}-helper-text` : void 0, T = [A].filter((h) => !!h), d = (typeof _.value == "number" ? _.value !== void 0 : (N = _.value) == null ? void 0 : N.length) && !_.disabled && !_.readOnly && !y && x && n, O = Rn(null), I = (h) => {
|
|
1191
|
+
O.current = h, typeof $ == "function" ? $(h) : $ && ($.current = h);
|
|
1192
1192
|
}, J = () => {
|
|
1193
|
-
var
|
|
1194
|
-
|
|
1195
|
-
},
|
|
1196
|
-
|
|
1197
|
-
|
|
1193
|
+
var h;
|
|
1194
|
+
x == null || x(), (h = O.current) == null || h.focus();
|
|
1195
|
+
}, R = [
|
|
1196
|
+
y && /* @__PURE__ */ l(
|
|
1197
|
+
On,
|
|
1198
1198
|
{
|
|
1199
1199
|
disabled: _.disabled,
|
|
1200
1200
|
size: "xs",
|
|
@@ -1202,7 +1202,7 @@ const Pn = /* @__PURE__ */ qn(Cn), zn = {
|
|
|
1202
1202
|
},
|
|
1203
1203
|
"spinner"
|
|
1204
1204
|
),
|
|
1205
|
-
d && /* @__PURE__ */
|
|
1205
|
+
d && /* @__PURE__ */ l(
|
|
1206
1206
|
ct,
|
|
1207
1207
|
{
|
|
1208
1208
|
variant: "tertiary-purple",
|
|
@@ -1211,11 +1211,11 @@ const Pn = /* @__PURE__ */ qn(Cn), zn = {
|
|
|
1211
1211
|
"aria-label": n ?? "",
|
|
1212
1212
|
"data-testid": g("clear-button"),
|
|
1213
1213
|
tabIndex: -1,
|
|
1214
|
-
children: /* @__PURE__ */
|
|
1214
|
+
children: /* @__PURE__ */ l(ft, { size: "xs" })
|
|
1215
1215
|
},
|
|
1216
1216
|
"clear-button"
|
|
1217
1217
|
),
|
|
1218
|
-
C && /* @__PURE__ */
|
|
1218
|
+
C && /* @__PURE__ */ l(
|
|
1219
1219
|
_t,
|
|
1220
1220
|
{
|
|
1221
1221
|
"data-testid": g("valid-icon"),
|
|
@@ -1223,49 +1223,49 @@ const Pn = /* @__PURE__ */ qn(Cn), zn = {
|
|
|
1223
1223
|
},
|
|
1224
1224
|
"valid-icon"
|
|
1225
1225
|
)
|
|
1226
|
-
].filter((
|
|
1226
|
+
].filter((h) => !!h), z = k([
|
|
1227
1227
|
`${v}__input-container`,
|
|
1228
1228
|
{
|
|
1229
|
-
[`${v}__input-container--start-adornment`]:
|
|
1230
|
-
[`${v}__input-container--end-adornment`]:
|
|
1229
|
+
[`${v}__input-container--start-adornment`]: T.length,
|
|
1230
|
+
[`${v}__input-container--end-adornment`]: R.length || r,
|
|
1231
1231
|
[`${v}__input-container--disabled`]: _.disabled,
|
|
1232
1232
|
[`${v}__input-container--has-clear-button`]: d,
|
|
1233
1233
|
[`${v}__input-container--readonly`]: _.readOnly && !_.disabled
|
|
1234
1234
|
}
|
|
1235
1235
|
]);
|
|
1236
|
-
return /* @__PURE__ */
|
|
1237
|
-
f && /* @__PURE__ */
|
|
1238
|
-
|
|
1236
|
+
return /* @__PURE__ */ j("div", { className: k(a, v), children: [
|
|
1237
|
+
f && /* @__PURE__ */ j(
|
|
1238
|
+
xn,
|
|
1239
1239
|
{
|
|
1240
1240
|
htmlFor: s,
|
|
1241
1241
|
className: k(`${v}__label`),
|
|
1242
1242
|
"data-testid": g("label"),
|
|
1243
1243
|
disabled: _.disabled,
|
|
1244
1244
|
children: [
|
|
1245
|
-
_.required && /* @__PURE__ */
|
|
1245
|
+
_.required && /* @__PURE__ */ l("span", { "aria-hidden": !0, children: "*" }),
|
|
1246
1246
|
f
|
|
1247
1247
|
]
|
|
1248
1248
|
}
|
|
1249
1249
|
),
|
|
1250
|
-
/* @__PURE__ */
|
|
1250
|
+
/* @__PURE__ */ j("div", { className: k(`${v}__field-row`), children: [
|
|
1251
1251
|
!!i && i,
|
|
1252
|
-
/* @__PURE__ */
|
|
1253
|
-
!!
|
|
1252
|
+
/* @__PURE__ */ j("div", { className: z, children: [
|
|
1253
|
+
!!T.length && /* @__PURE__ */ l(
|
|
1254
1254
|
"div",
|
|
1255
1255
|
{
|
|
1256
1256
|
"data-testid": g("start-adornments"),
|
|
1257
1257
|
className: k(`${v}__adornment-container`),
|
|
1258
|
-
children:
|
|
1258
|
+
children: T
|
|
1259
1259
|
}
|
|
1260
1260
|
),
|
|
1261
|
-
/* @__PURE__ */
|
|
1261
|
+
/* @__PURE__ */ l(
|
|
1262
1262
|
"input",
|
|
1263
1263
|
{
|
|
1264
1264
|
..._,
|
|
1265
1265
|
id: s,
|
|
1266
|
-
ref:
|
|
1266
|
+
ref: I,
|
|
1267
1267
|
"data-testid": g("input"),
|
|
1268
|
-
"aria-describedby": _["aria-describedby"] ||
|
|
1268
|
+
"aria-describedby": _["aria-describedby"] || M,
|
|
1269
1269
|
"aria-invalid": _["aria-invalid"] || !!e,
|
|
1270
1270
|
className: k([
|
|
1271
1271
|
`${v}__input`,
|
|
@@ -1276,14 +1276,14 @@ const Pn = /* @__PURE__ */ qn(Cn), zn = {
|
|
|
1276
1276
|
])
|
|
1277
1277
|
}
|
|
1278
1278
|
),
|
|
1279
|
-
/* @__PURE__ */
|
|
1280
|
-
(!!
|
|
1279
|
+
/* @__PURE__ */ l("div", { className: k(`${v}__frame`) }),
|
|
1280
|
+
(!!R.length || r) && /* @__PURE__ */ j(
|
|
1281
1281
|
"div",
|
|
1282
1282
|
{
|
|
1283
1283
|
"data-testid": g("end-adornments"),
|
|
1284
1284
|
className: k(`${v}__adornment-container`),
|
|
1285
1285
|
children: [
|
|
1286
|
-
|
|
1286
|
+
R,
|
|
1287
1287
|
r
|
|
1288
1288
|
]
|
|
1289
1289
|
}
|
|
@@ -1291,23 +1291,23 @@ const Pn = /* @__PURE__ */ qn(Cn), zn = {
|
|
|
1291
1291
|
] }),
|
|
1292
1292
|
!!o && o
|
|
1293
1293
|
] }),
|
|
1294
|
-
|
|
1295
|
-
e && /* @__PURE__ */
|
|
1294
|
+
M && /* @__PURE__ */ l(Ue, { "data-testid": g("helper-text"), id: M, children: u }),
|
|
1295
|
+
e && /* @__PURE__ */ l(Ze, { "data-testid": g("error-text"), children: e })
|
|
1296
1296
|
] });
|
|
1297
|
-
}, gt = X(
|
|
1297
|
+
}, gt = X(Ln);
|
|
1298
1298
|
gt.displayName = "TextField";
|
|
1299
|
-
const
|
|
1300
|
-
function
|
|
1299
|
+
const Bn = (t) => nt(t) && t.type.displayName === gt.displayName;
|
|
1300
|
+
function En(t) {
|
|
1301
1301
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
1302
1302
|
}
|
|
1303
|
-
var
|
|
1303
|
+
var pr = { exports: {} };
|
|
1304
1304
|
/*!
|
|
1305
1305
|
Copyright (c) 2018 Jed Watson.
|
|
1306
1306
|
Licensed under the MIT License (MIT), see
|
|
1307
1307
|
http://jedwatson.github.io/classnames
|
|
1308
1308
|
*/
|
|
1309
1309
|
var tt;
|
|
1310
|
-
function
|
|
1310
|
+
function Tn() {
|
|
1311
1311
|
return tt || (tt = 1, function(t) {
|
|
1312
1312
|
(function() {
|
|
1313
1313
|
var a = {}.hasOwnProperty;
|
|
@@ -1337,10 +1337,10 @@ function En() {
|
|
|
1337
1337
|
}
|
|
1338
1338
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
1339
1339
|
})();
|
|
1340
|
-
}(
|
|
1340
|
+
}(pr)), pr.exports;
|
|
1341
1341
|
}
|
|
1342
|
-
var
|
|
1343
|
-
const
|
|
1342
|
+
var In = Tn();
|
|
1343
|
+
const zn = /* @__PURE__ */ En(In), Dn = {
|
|
1344
1344
|
"purpur-autocomplete": "_purpur-autocomplete_1u8x6_1",
|
|
1345
1345
|
"purpur-autocomplete__listbox": "_purpur-autocomplete__listbox_1u8x6_4",
|
|
1346
1346
|
"purpur-autocomplete__chevron-button": "_purpur-autocomplete__chevron-button_1u8x6_9",
|
|
@@ -1366,69 +1366,69 @@ const In = /* @__PURE__ */ Bn(Tn), Dn = {
|
|
|
1366
1366
|
listboxLabel: e,
|
|
1367
1367
|
listboxMaxHeight: u,
|
|
1368
1368
|
onInputBlur: f,
|
|
1369
|
-
onInputChange:
|
|
1370
|
-
onInputFocus:
|
|
1371
|
-
onInputKeyDown:
|
|
1369
|
+
onInputChange: y,
|
|
1370
|
+
onInputFocus: x,
|
|
1371
|
+
onInputKeyDown: A,
|
|
1372
1372
|
onInputMouseDown: S,
|
|
1373
1373
|
openOnFocus: _,
|
|
1374
1374
|
noOptionsText: $,
|
|
1375
|
-
onSelect:
|
|
1375
|
+
onSelect: N,
|
|
1376
1376
|
options: w,
|
|
1377
1377
|
selectedOption: s,
|
|
1378
1378
|
["data-testid"]: g
|
|
1379
1379
|
}) => {
|
|
1380
|
-
const [C,
|
|
1380
|
+
const [C, M] = ar(
|
|
1381
1381
|
((typeof i == "string" ? i : n) || (s == null ? void 0 : s.label)) ?? ""
|
|
1382
|
-
),
|
|
1383
|
-
function tr(
|
|
1384
|
-
return g ? `${g}-${
|
|
1382
|
+
), T = typeof i == "string" ? i : C, [d, O] = ar(a ? w[0] : void 0), I = K(null), J = Vn(null), R = K(null), z = K({}), [h, dr] = ar(!1);
|
|
1383
|
+
function tr(p) {
|
|
1384
|
+
return g ? `${g}-${p}` : void 0;
|
|
1385
1385
|
}
|
|
1386
1386
|
const Q = () => {
|
|
1387
|
-
dr(!1),
|
|
1387
|
+
dr(!1), O(void 0);
|
|
1388
1388
|
};
|
|
1389
1389
|
Zn(J.current, Q);
|
|
1390
|
-
const D = ({ eventType:
|
|
1390
|
+
const D = ({ eventType: p }) => {
|
|
1391
1391
|
dr(!0), s && requestAnimationFrame(() => {
|
|
1392
|
-
|
|
1392
|
+
O({ ...s, isSetByClickEvent: p === "CLICK" }), nr(z.current[s.id]);
|
|
1393
1393
|
});
|
|
1394
|
-
},
|
|
1394
|
+
}, ht = (p) => {
|
|
1395
1395
|
if (o)
|
|
1396
|
-
return w.filter((
|
|
1397
|
-
if (!
|
|
1396
|
+
return w.filter((b) => o(p, b));
|
|
1397
|
+
if (!p)
|
|
1398
1398
|
return w;
|
|
1399
|
-
const c =
|
|
1399
|
+
const c = p.toUpperCase().split(" ") || [];
|
|
1400
1400
|
return w.filter(
|
|
1401
|
-
(
|
|
1402
|
-
(q) => (
|
|
1401
|
+
(b) => c.every(
|
|
1402
|
+
(q) => (b.value || b.label).toUpperCase().includes(q)
|
|
1403
1403
|
)
|
|
1404
1404
|
);
|
|
1405
|
-
}, _r = (
|
|
1406
|
-
|
|
1407
|
-
}, nr = (
|
|
1405
|
+
}, _r = (p) => s && (s == null ? void 0 : s.label) === p ? w : ht(p), P = _r(T), er = (p) => {
|
|
1406
|
+
y == null || y(p), M(p);
|
|
1407
|
+
}, nr = (p) => {
|
|
1408
1408
|
var c;
|
|
1409
|
-
if (
|
|
1410
|
-
const
|
|
1411
|
-
(
|
|
1409
|
+
if (p) {
|
|
1410
|
+
const b = p.getBoundingClientRect(), q = ((c = R.current) == null ? void 0 : c.getBoundingClientRect()) || { top: 0, bottom: 0 };
|
|
1411
|
+
(b.top < q.top || b.bottom > q.bottom) && p.scrollIntoView({ block: "nearest" });
|
|
1412
1412
|
}
|
|
1413
|
-
}, fr = (
|
|
1413
|
+
}, fr = (p) => {
|
|
1414
1414
|
var c;
|
|
1415
|
-
|
|
1416
|
-
},
|
|
1417
|
-
const c = a && !d ? 0 : P.findIndex((q) => q && (d == null ? void 0 : d.id) === q.id),
|
|
1418
|
-
return
|
|
1419
|
-
},
|
|
1420
|
-
!
|
|
1421
|
-
const c =
|
|
1422
|
-
|
|
1423
|
-
},
|
|
1424
|
-
switch (
|
|
1415
|
+
p && ((c = I.current) == null || c.focus(), er(p.label), N == null || N(p)), Q();
|
|
1416
|
+
}, bt = (p) => {
|
|
1417
|
+
const c = a && !d ? 0 : P.findIndex((q) => q && (d == null ? void 0 : d.id) === q.id), b = P.length;
|
|
1418
|
+
return p === "ArrowDown" ? P[(c ?? -1) + 1] || P[0] : P[(c ?? b) - 1] || P[b - 1];
|
|
1419
|
+
}, L = h && (!!P.length || !!$), yt = (p) => {
|
|
1420
|
+
!L && D({ eventType: "KEYBOARD" });
|
|
1421
|
+
const c = bt(p);
|
|
1422
|
+
O(c), c && nr(z.current[c.id]);
|
|
1423
|
+
}, xt = (p) => {
|
|
1424
|
+
switch (A == null || A(p), p.key) {
|
|
1425
1425
|
case "ArrowUp":
|
|
1426
1426
|
case "ArrowDown":
|
|
1427
|
-
|
|
1427
|
+
p.preventDefault(), yt(p.key);
|
|
1428
1428
|
break;
|
|
1429
1429
|
case "Enter": {
|
|
1430
1430
|
const c = d || (a ? w[0] : void 0);
|
|
1431
|
-
|
|
1431
|
+
L && fr(c), !L && D({ eventType: "KEYBOARD" });
|
|
1432
1432
|
break;
|
|
1433
1433
|
}
|
|
1434
1434
|
case "Escape":
|
|
@@ -1436,47 +1436,47 @@ const In = /* @__PURE__ */ Bn(Tn), Dn = {
|
|
|
1436
1436
|
Q();
|
|
1437
1437
|
break;
|
|
1438
1438
|
}
|
|
1439
|
-
}, wt = (
|
|
1440
|
-
const c = _r(
|
|
1441
|
-
er(
|
|
1442
|
-
}, $t = (
|
|
1443
|
-
S == null || S(
|
|
1444
|
-
}, St = (
|
|
1439
|
+
}, wt = (p) => {
|
|
1440
|
+
const c = _r(p.target.value);
|
|
1441
|
+
er(p.target.value), O(void 0), !L && D({ eventType: "KEYBOARD" }), a && c[0] && nr(z.current[c[0].id]);
|
|
1442
|
+
}, $t = (p) => {
|
|
1443
|
+
S == null || S(p), L ? Q() : D({ eventType: "CLICK" });
|
|
1444
|
+
}, St = (p) => {
|
|
1445
1445
|
var c;
|
|
1446
|
-
|
|
1447
|
-
},
|
|
1448
|
-
f == null || f(
|
|
1449
|
-
var c,
|
|
1450
|
-
!((c =
|
|
1446
|
+
x == null || x(p), !h && _ && D({ eventType: "KEYBOARD" }), (c = I.current) == null || c.select();
|
|
1447
|
+
}, Nt = (p) => {
|
|
1448
|
+
f == null || f(p), t && setTimeout(() => {
|
|
1449
|
+
var c, b;
|
|
1450
|
+
!((c = I.current) != null && c.contains(document.activeElement)) && !((b = R.current) != null && b.contains(document.activeElement)) && er(s ? s.label : "");
|
|
1451
1451
|
});
|
|
1452
|
-
},
|
|
1452
|
+
}, jt = {
|
|
1453
1453
|
maxHeight: typeof u == "number" ? `${u}px` : u
|
|
1454
1454
|
}, vr = {
|
|
1455
1455
|
"aria-label": e,
|
|
1456
|
-
"aria-expanded":
|
|
1456
|
+
"aria-expanded": L,
|
|
1457
1457
|
"data-testid": tr("listbox"),
|
|
1458
1458
|
id: `${r}-listbox`,
|
|
1459
|
-
ref:
|
|
1460
|
-
onMouseLeave: () =>
|
|
1461
|
-
style: u ?
|
|
1462
|
-
}, mr = (
|
|
1463
|
-
const
|
|
1459
|
+
ref: R,
|
|
1460
|
+
onMouseLeave: () => O(void 0),
|
|
1461
|
+
style: u ? jt : void 0
|
|
1462
|
+
}, mr = (p) => `${r}-listbox-item-${p.id}`, At = (p, c) => {
|
|
1463
|
+
const b = () => p.id !== (d == null ? void 0 : d.id) && O({ ...p, isSetByClickEvent: !0 }), q = (p.id === (d == null ? void 0 : d.id) || !!a && !d && c === 0) && !(d != null && d.isSetByClickEvent);
|
|
1464
1464
|
return {
|
|
1465
|
-
"data-testid": tr(`listbox-item-${
|
|
1466
|
-
id: mr(
|
|
1467
|
-
key:
|
|
1468
|
-
onMouseMove:
|
|
1469
|
-
onMouseUp: () => fr(
|
|
1465
|
+
"data-testid": tr(`listbox-item-${p.id}`),
|
|
1466
|
+
id: mr(p),
|
|
1467
|
+
key: p.id,
|
|
1468
|
+
onMouseMove: b,
|
|
1469
|
+
onMouseUp: () => fr(p),
|
|
1470
1470
|
ref: (ur) => {
|
|
1471
|
-
ur && (
|
|
1471
|
+
ur && (z.current[p.id] = ur);
|
|
1472
1472
|
},
|
|
1473
1473
|
tabIndex: -1,
|
|
1474
|
-
selected:
|
|
1475
|
-
disabled:
|
|
1474
|
+
selected: p.id === (s == null ? void 0 : s.id),
|
|
1475
|
+
disabled: p.disabled,
|
|
1476
1476
|
highlighted: q,
|
|
1477
|
-
hovered:
|
|
1477
|
+
hovered: p.id === (d == null ? void 0 : d.id) && !!(d != null && d.isSetByClickEvent)
|
|
1478
1478
|
};
|
|
1479
|
-
},
|
|
1479
|
+
}, Ot = {
|
|
1480
1480
|
"aria-activedescendant": d ? mr(d) : void 0,
|
|
1481
1481
|
"aria-autocomplete": "list",
|
|
1482
1482
|
"aria-controls": vr.id,
|
|
@@ -1486,45 +1486,45 @@ const In = /* @__PURE__ */ Bn(Tn), Dn = {
|
|
|
1486
1486
|
onChange: wt,
|
|
1487
1487
|
onMouseDown: $t,
|
|
1488
1488
|
onFocus: St,
|
|
1489
|
-
onKeyDown:
|
|
1490
|
-
onBlur:
|
|
1491
|
-
ref:
|
|
1489
|
+
onKeyDown: xt,
|
|
1490
|
+
onBlur: Nt,
|
|
1491
|
+
ref: I,
|
|
1492
1492
|
role: "combobox",
|
|
1493
|
-
value:
|
|
1493
|
+
value: T
|
|
1494
1494
|
};
|
|
1495
1495
|
return {
|
|
1496
1496
|
id: r,
|
|
1497
|
-
inputProps:
|
|
1497
|
+
inputProps: Ot,
|
|
1498
1498
|
internalRef: J,
|
|
1499
1499
|
optionsToShow: P,
|
|
1500
|
-
showListbox:
|
|
1500
|
+
showListbox: L,
|
|
1501
1501
|
noOptionsText: $,
|
|
1502
1502
|
combobox: t,
|
|
1503
|
-
getListBoxItemProps:
|
|
1503
|
+
getListBoxItemProps: At,
|
|
1504
1504
|
listboxProps: vr
|
|
1505
1505
|
};
|
|
1506
|
-
}, rr =
|
|
1506
|
+
}, rr = zn.bind(Dn), U = "purpur-autocomplete", Fn = ({ className: t, renderInput: a, renderOption: n, ...i }, o) => {
|
|
1507
1507
|
const {
|
|
1508
1508
|
id: r,
|
|
1509
1509
|
inputProps: e,
|
|
1510
1510
|
internalRef: u,
|
|
1511
1511
|
optionsToShow: f,
|
|
1512
|
-
showListbox:
|
|
1513
|
-
noOptionsText:
|
|
1514
|
-
combobox:
|
|
1512
|
+
showListbox: y,
|
|
1513
|
+
noOptionsText: x,
|
|
1514
|
+
combobox: A,
|
|
1515
1515
|
getListBoxItemProps: S,
|
|
1516
1516
|
listboxProps: _
|
|
1517
1517
|
} = Hn(i), $ = (s, g) => {
|
|
1518
|
-
const { key: C, ...
|
|
1519
|
-
return /* @__PURE__ */
|
|
1520
|
-
},
|
|
1518
|
+
const { key: C, ...M } = S(s, g);
|
|
1519
|
+
return /* @__PURE__ */ l(Y.Item, { ...M, children: n ? n == null ? void 0 : n(s) : s.label }, C);
|
|
1520
|
+
}, N = (s) => {
|
|
1521
1521
|
u.current = s, typeof o == "function" ? o(s) : o && (o.current = s);
|
|
1522
1522
|
}, w = () => {
|
|
1523
1523
|
const s = a(e);
|
|
1524
|
-
if (
|
|
1525
|
-
const C = /* @__PURE__ */
|
|
1524
|
+
if (A && x && s && Bn(s)) {
|
|
1525
|
+
const C = /* @__PURE__ */ j(et, { children: [
|
|
1526
1526
|
s.props.endAdornment,
|
|
1527
|
-
/* @__PURE__ */
|
|
1527
|
+
/* @__PURE__ */ l(
|
|
1528
1528
|
"button",
|
|
1529
1529
|
{
|
|
1530
1530
|
"data-testid": "chevron button",
|
|
@@ -1534,25 +1534,25 @@ const In = /* @__PURE__ */ Bn(Tn), Dn = {
|
|
|
1534
1534
|
e.onFocus(void 0), e.onMouseDown(void 0);
|
|
1535
1535
|
},
|
|
1536
1536
|
"aria-hidden": "true",
|
|
1537
|
-
children: /* @__PURE__ */
|
|
1537
|
+
children: /* @__PURE__ */ l(
|
|
1538
1538
|
at,
|
|
1539
1539
|
{
|
|
1540
1540
|
size: "sm",
|
|
1541
1541
|
className: rr(`${U}__chevron-icon`, {
|
|
1542
|
-
[`${U}__chevron-icon--up`]:
|
|
1542
|
+
[`${U}__chevron-icon--up`]: y
|
|
1543
1543
|
})
|
|
1544
1544
|
}
|
|
1545
1545
|
)
|
|
1546
1546
|
}
|
|
1547
1547
|
)
|
|
1548
1548
|
] });
|
|
1549
|
-
return
|
|
1549
|
+
return Mt(s, { endAdornment: C });
|
|
1550
1550
|
}
|
|
1551
1551
|
return s;
|
|
1552
1552
|
};
|
|
1553
|
-
return /* @__PURE__ */
|
|
1553
|
+
return /* @__PURE__ */ j("div", { id: r, ref: N, className: rr([t, U]), children: [
|
|
1554
1554
|
w(),
|
|
1555
|
-
|
|
1555
|
+
y && /* @__PURE__ */ l(Y, { ..._, className: rr(`${U}__listbox`), children: f.length ? f.filter((s) => !!s).map($) : /* @__PURE__ */ l(Y.Item, { noninteractive: !0, children: x }) })
|
|
1556
1556
|
] });
|
|
1557
1557
|
}, Wn = X(Fn);
|
|
1558
1558
|
Wn.displayName = "Autocomplete";
|