@purpurds/autocomplete 8.7.0 → 8.8.1
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 +351 -342
- package/dist/autocomplete.es.js.map +1 -1
- package/package.json +15 -15
package/dist/autocomplete.es.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { jsx as l, jsxs as O, Fragment as
|
|
2
|
-
import * as
|
|
3
|
-
import { forwardRef as Y, Children as
|
|
1
|
+
import { jsx as l, jsxs as O, Fragment as Ot } from "react/jsx-runtime";
|
|
2
|
+
import * as m from "react";
|
|
3
|
+
import { forwardRef as Y, Children as At, isValidElement as Xr, useId as kt, useRef as K, useCallback as Ct, useEffect as Pt, useState as ur, cloneElement as qt } 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
|
-
var
|
|
8
|
+
var mr = { exports: {} };
|
|
9
9
|
/*!
|
|
10
10
|
Copyright (c) 2018 Jed Watson.
|
|
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 i = {}.hasOwnProperty;
|
|
19
19
|
function n() {
|
|
@@ -42,10 +42,10 @@ function qt() {
|
|
|
42
42
|
}
|
|
43
43
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
44
44
|
})();
|
|
45
|
-
})(
|
|
45
|
+
})(mr)), mr.exports;
|
|
46
46
|
}
|
|
47
|
-
var
|
|
48
|
-
const
|
|
47
|
+
var Mt = Lt();
|
|
48
|
+
const Bt = /* @__PURE__ */ Rt(Mt), Et = {
|
|
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,41 +53,41 @@ const Lt = /* @__PURE__ */ Pt(Rt), Mt = {
|
|
|
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
|
+
}, Tt = Bt.bind(Et), gr = "purpur-icon", It = "md", zt = (t) => t.filter((i) => Object.keys(i).length >= 1).map((i) => `${i.name}="${i.value}"`).join(" "), Dt = ({ content: t = "", title: i } = {}) => {
|
|
57
57
|
const n = [
|
|
58
58
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
59
59
|
{ name: "fill", value: "currentColor" },
|
|
60
60
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
61
61
|
i ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
62
62
|
], o = i ? `<title>${i}</title>` : "";
|
|
63
|
-
return `<svg ${
|
|
64
|
-
},
|
|
65
|
-
const r =
|
|
66
|
-
content:
|
|
63
|
+
return `<svg ${zt(n)}>${o}${t}</svg>`;
|
|
64
|
+
}, Vt = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), rt = ({ svg: t, allyTitle: i, className: n, size: o = It, ...a }) => {
|
|
65
|
+
const r = Dt({
|
|
66
|
+
content: Vt(t.svg),
|
|
67
67
|
title: i
|
|
68
|
-
}), e =
|
|
68
|
+
}), e = Tt(gr, `${gr}--${o}`, n);
|
|
69
69
|
return /* @__PURE__ */ l("span", { className: e, dangerouslySetInnerHTML: { __html: r }, ...a });
|
|
70
70
|
};
|
|
71
|
-
|
|
72
|
-
const
|
|
71
|
+
rt.displayName = "Icon";
|
|
72
|
+
const Zt = {
|
|
73
73
|
name: "chevron-down",
|
|
74
74
|
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>',
|
|
75
75
|
keywords: ["chevron-down"],
|
|
76
76
|
category: "utility"
|
|
77
|
-
},
|
|
78
|
-
|
|
79
|
-
function
|
|
77
|
+
}, tt = (t) => /* @__PURE__ */ l(rt, { ...t, svg: Zt });
|
|
78
|
+
tt.displayName = "IconChevronDown";
|
|
79
|
+
function Ht(t) {
|
|
80
80
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
81
81
|
}
|
|
82
|
-
var
|
|
82
|
+
var br = { exports: {} };
|
|
83
83
|
/*!
|
|
84
84
|
Copyright (c) 2018 Jed Watson.
|
|
85
85
|
Licensed under the MIT License (MIT), see
|
|
86
86
|
http://jedwatson.github.io/classnames
|
|
87
87
|
*/
|
|
88
|
-
var
|
|
89
|
-
function
|
|
90
|
-
return
|
|
88
|
+
var yr;
|
|
89
|
+
function Ft() {
|
|
90
|
+
return yr || (yr = 1, (function(t) {
|
|
91
91
|
(function() {
|
|
92
92
|
var i = {}.hasOwnProperty;
|
|
93
93
|
function n() {
|
|
@@ -116,10 +116,10 @@ function Zt() {
|
|
|
116
116
|
}
|
|
117
117
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
118
118
|
})();
|
|
119
|
-
})(
|
|
119
|
+
})(br)), br.exports;
|
|
120
120
|
}
|
|
121
|
-
var
|
|
122
|
-
const
|
|
121
|
+
var Wt = Ft();
|
|
122
|
+
const et = /* @__PURE__ */ Ht(Wt), nt = {
|
|
123
123
|
"purpur-listbox": "_purpur-listbox_6c8yl_1",
|
|
124
124
|
"purpur-listbox-item": "_purpur-listbox-item_6c8yl_15",
|
|
125
125
|
"purpur-listbox-item--hovered": "_purpur-listbox-item--hovered_6c8yl_29",
|
|
@@ -128,18 +128,18 @@ const tt = /* @__PURE__ */ Vt(Ht), et = {
|
|
|
128
128
|
"purpur-listbox-item--disabled": "_purpur-listbox-item--disabled_6c8yl_44",
|
|
129
129
|
"purpur-listbox-item__icon": "_purpur-listbox-item__icon_6c8yl_51"
|
|
130
130
|
};
|
|
131
|
-
function
|
|
131
|
+
function Gt(t) {
|
|
132
132
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
133
133
|
}
|
|
134
|
-
var
|
|
134
|
+
var xr = { exports: {} };
|
|
135
135
|
/*!
|
|
136
136
|
Copyright (c) 2018 Jed Watson.
|
|
137
137
|
Licensed under the MIT License (MIT), see
|
|
138
138
|
http://jedwatson.github.io/classnames
|
|
139
139
|
*/
|
|
140
|
-
var
|
|
141
|
-
function
|
|
142
|
-
return
|
|
140
|
+
var $r;
|
|
141
|
+
function Kt() {
|
|
142
|
+
return $r || ($r = 1, (function(t) {
|
|
143
143
|
(function() {
|
|
144
144
|
var i = {}.hasOwnProperty;
|
|
145
145
|
function n() {
|
|
@@ -168,10 +168,10 @@ function Wt() {
|
|
|
168
168
|
}
|
|
169
169
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
170
170
|
})();
|
|
171
|
-
})(
|
|
171
|
+
})(xr)), xr.exports;
|
|
172
172
|
}
|
|
173
|
-
var
|
|
174
|
-
const
|
|
173
|
+
var Ut = Kt();
|
|
174
|
+
const Yt = /* @__PURE__ */ Gt(Ut), Jt = {
|
|
175
175
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
176
176
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
177
177
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -179,41 +179,41 @@ const Kt = /* @__PURE__ */ Ft(Gt), Ut = {
|
|
|
179
179
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
180
180
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
181
181
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
182
|
-
},
|
|
182
|
+
}, Qt = Yt.bind(Jt), wr = "purpur-icon", Xt = "md", re = (t) => t.filter((i) => Object.keys(i).length >= 1).map((i) => `${i.name}="${i.value}"`).join(" "), te = ({ content: t = "", title: i } = {}) => {
|
|
183
183
|
const n = [
|
|
184
184
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
185
185
|
{ name: "fill", value: "currentColor" },
|
|
186
186
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
187
187
|
i ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
188
188
|
], o = i ? `<title>${i}</title>` : "";
|
|
189
|
-
return `<svg ${
|
|
190
|
-
},
|
|
191
|
-
const r =
|
|
192
|
-
content:
|
|
189
|
+
return `<svg ${re(n)}>${o}${t}</svg>`;
|
|
190
|
+
}, ee = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), ut = ({ svg: t, allyTitle: i, className: n, size: o = Xt, ...a }) => {
|
|
191
|
+
const r = te({
|
|
192
|
+
content: ee(t.svg),
|
|
193
193
|
title: i
|
|
194
|
-
}), e =
|
|
194
|
+
}), e = Qt(wr, `${wr}--${o}`, n);
|
|
195
195
|
return /* @__PURE__ */ l("span", { className: e, dangerouslySetInnerHTML: { __html: r }, ...a });
|
|
196
196
|
};
|
|
197
|
-
|
|
198
|
-
const
|
|
197
|
+
ut.displayName = "Icon";
|
|
198
|
+
const ne = {
|
|
199
199
|
name: "checkmark",
|
|
200
200
|
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>',
|
|
201
201
|
keywords: ["checkmark"],
|
|
202
202
|
category: "utility"
|
|
203
|
-
},
|
|
204
|
-
|
|
205
|
-
function
|
|
203
|
+
}, it = (t) => /* @__PURE__ */ l(ut, { ...t, svg: ne });
|
|
204
|
+
it.displayName = "IconCheckmark";
|
|
205
|
+
function ue(t) {
|
|
206
206
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
207
207
|
}
|
|
208
|
-
var
|
|
208
|
+
var Sr = { exports: {} };
|
|
209
209
|
/*!
|
|
210
210
|
Copyright (c) 2018 Jed Watson.
|
|
211
211
|
Licensed under the MIT License (MIT), see
|
|
212
212
|
http://jedwatson.github.io/classnames
|
|
213
213
|
*/
|
|
214
|
-
var
|
|
215
|
-
function
|
|
216
|
-
return
|
|
214
|
+
var Nr;
|
|
215
|
+
function ie() {
|
|
216
|
+
return Nr || (Nr = 1, (function(t) {
|
|
217
217
|
(function() {
|
|
218
218
|
var i = {}.hasOwnProperty;
|
|
219
219
|
function n() {
|
|
@@ -242,10 +242,10 @@ function ne() {
|
|
|
242
242
|
}
|
|
243
243
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
244
244
|
})();
|
|
245
|
-
})(
|
|
245
|
+
})(Sr)), Sr.exports;
|
|
246
246
|
}
|
|
247
|
-
var
|
|
248
|
-
const
|
|
247
|
+
var ae = ie();
|
|
248
|
+
const oe = /* @__PURE__ */ ue(ae), pe = {
|
|
249
249
|
"purpur-paragraph": "_purpur-paragraph_1rh57_1",
|
|
250
250
|
"purpur-paragraph--disabled": "_purpur-paragraph--disabled_1rh57_7",
|
|
251
251
|
"purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_1rh57_10",
|
|
@@ -260,26 +260,26 @@ const ie = /* @__PURE__ */ ee(ue), ae = {
|
|
|
260
260
|
"purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_1rh57_60",
|
|
261
261
|
"purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_1rh57_67",
|
|
262
262
|
"purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1rh57_75"
|
|
263
|
-
},
|
|
263
|
+
}, le = oe.bind(pe), se = {
|
|
264
264
|
PARAGRAPH100: "paragraph-100"
|
|
265
|
-
}, H = "purpur-paragraph",
|
|
265
|
+
}, H = "purpur-paragraph", at = ({
|
|
266
266
|
children: t,
|
|
267
267
|
className: i,
|
|
268
268
|
disabled: n,
|
|
269
269
|
enableHyphenation: o = !1,
|
|
270
270
|
negative: a = !1,
|
|
271
|
-
variant: r =
|
|
271
|
+
variant: r = se.PARAGRAPH100,
|
|
272
272
|
...e
|
|
273
273
|
}) => {
|
|
274
|
-
const u =
|
|
274
|
+
const u = le(i, H, `${H}--${r}`, {
|
|
275
275
|
[`${H}--hyphens`]: o,
|
|
276
276
|
[`${H}--disabled`]: n,
|
|
277
277
|
[`${H}--negative`]: a
|
|
278
278
|
});
|
|
279
279
|
return /* @__PURE__ */ l("p", { ...e, className: u, children: t });
|
|
280
280
|
};
|
|
281
|
-
|
|
282
|
-
const
|
|
281
|
+
at.displayName = "Paragraph";
|
|
282
|
+
const jr = et.bind(nt), T = "purpur-listbox", lr = Y((t, i) => {
|
|
283
283
|
const {
|
|
284
284
|
disabled: n,
|
|
285
285
|
highlighted: o,
|
|
@@ -289,7 +289,7 @@ const Nr = tt.bind(et), T = "purpur-listbox", pr = Y((t, i) => {
|
|
|
289
289
|
className: u,
|
|
290
290
|
noninteractive: v,
|
|
291
291
|
..._
|
|
292
|
-
} = t, g =
|
|
292
|
+
} = t, g = jr(`${T}-item`, u, {
|
|
293
293
|
[`${T}-item--highlighted`]: o,
|
|
294
294
|
[`${T}-item--selected`]: r,
|
|
295
295
|
[`${T}-item--hovered`]: a,
|
|
@@ -306,42 +306,42 @@ const Nr = tt.bind(et), T = "purpur-listbox", pr = Y((t, i) => {
|
|
|
306
306
|
role: "option",
|
|
307
307
|
"aria-disabled": !!n,
|
|
308
308
|
children: [
|
|
309
|
-
typeof e == "string" ? /* @__PURE__ */ l(
|
|
310
|
-
r && /* @__PURE__ */ l(
|
|
309
|
+
typeof e == "string" ? /* @__PURE__ */ l(at, { children: e }) : e,
|
|
310
|
+
r && /* @__PURE__ */ l(it, { size: "xs", className: jr(`${T}-item__icon`) })
|
|
311
311
|
]
|
|
312
312
|
}
|
|
313
313
|
);
|
|
314
|
-
}),
|
|
315
|
-
|
|
316
|
-
const
|
|
314
|
+
}), ce = (t) => Xr(t) && (t == null ? void 0 : t.type) === lr;
|
|
315
|
+
lr.displayName = "ListBoxItem";
|
|
316
|
+
const de = et.bind(nt), _e = "purpur-listbox", U = Y(
|
|
317
317
|
({ children: t, ...i }, n) => /* @__PURE__ */ l(
|
|
318
318
|
"ul",
|
|
319
319
|
{
|
|
320
320
|
...i,
|
|
321
321
|
ref: n,
|
|
322
|
-
className:
|
|
322
|
+
className: de(_e, i.className),
|
|
323
323
|
role: "listbox",
|
|
324
|
-
children:
|
|
324
|
+
children: At.toArray(t).filter(ce)
|
|
325
325
|
}
|
|
326
326
|
)
|
|
327
327
|
);
|
|
328
|
-
U.Item =
|
|
328
|
+
U.Item = lr;
|
|
329
329
|
U.displayName = "ListBox";
|
|
330
|
-
const
|
|
330
|
+
const fe = {
|
|
331
331
|
LG: "lg"
|
|
332
332
|
};
|
|
333
|
-
function
|
|
333
|
+
function ve(t) {
|
|
334
334
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
335
335
|
}
|
|
336
|
-
var
|
|
336
|
+
var Or = { exports: {} };
|
|
337
337
|
/*!
|
|
338
338
|
Copyright (c) 2018 Jed Watson.
|
|
339
339
|
Licensed under the MIT License (MIT), see
|
|
340
340
|
http://jedwatson.github.io/classnames
|
|
341
341
|
*/
|
|
342
|
-
var
|
|
343
|
-
function
|
|
344
|
-
return
|
|
342
|
+
var Ar;
|
|
343
|
+
function me() {
|
|
344
|
+
return Ar || (Ar = 1, (function(t) {
|
|
345
345
|
(function() {
|
|
346
346
|
var i = {}.hasOwnProperty;
|
|
347
347
|
function n() {
|
|
@@ -370,33 +370,33 @@ function fe() {
|
|
|
370
370
|
}
|
|
371
371
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
372
372
|
})();
|
|
373
|
-
})(
|
|
373
|
+
})(Or)), Or.exports;
|
|
374
374
|
}
|
|
375
|
-
var
|
|
376
|
-
const
|
|
375
|
+
var he = me();
|
|
376
|
+
const ge = /* @__PURE__ */ ve(he), be = "_rotate_12t9p_1", ye = "_dash_12t9p_1", xe = {
|
|
377
377
|
"purpur-spinner": "_purpur-spinner_12t9p_2",
|
|
378
|
-
rotate:
|
|
378
|
+
rotate: be,
|
|
379
379
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_12t9p_6",
|
|
380
380
|
"purpur-spinner--xs": "_purpur-spinner--xs_12t9p_10",
|
|
381
381
|
"purpur-spinner--sm": "_purpur-spinner--sm_12t9p_14",
|
|
382
382
|
"purpur-spinner--md": "_purpur-spinner--md_12t9p_18",
|
|
383
383
|
"purpur-spinner--lg": "_purpur-spinner--lg_12t9p_22",
|
|
384
384
|
"purpur-spinner__circle": "_purpur-spinner__circle_12t9p_26",
|
|
385
|
-
dash:
|
|
385
|
+
dash: ye,
|
|
386
386
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_12t9p_41",
|
|
387
387
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_12t9p_44"
|
|
388
|
-
},
|
|
388
|
+
}, kr = ge.bind(xe), F = "purpur-spinner", $e = {
|
|
389
389
|
SM: "sm"
|
|
390
|
-
},
|
|
390
|
+
}, ot = ({
|
|
391
391
|
disabled: t = !1,
|
|
392
392
|
negative: i = !1,
|
|
393
|
-
size: n =
|
|
393
|
+
size: n = $e.SM,
|
|
394
394
|
className: o,
|
|
395
395
|
...a
|
|
396
|
-
}) => /* @__PURE__ */ l("div", { className:
|
|
396
|
+
}) => /* @__PURE__ */ l("div", { className: kr(F, `${F}--${n}`, o), ...a, children: /* @__PURE__ */ l("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ l(
|
|
397
397
|
"circle",
|
|
398
398
|
{
|
|
399
|
-
className:
|
|
399
|
+
className: kr(`${F}__circle`, {
|
|
400
400
|
[`${F}__circle--disabled`]: t,
|
|
401
401
|
[`${F}__circle--negative`]: i
|
|
402
402
|
}),
|
|
@@ -405,19 +405,19 @@ const me = /* @__PURE__ */ _e(ve), he = "_rotate_12t9p_1", ge = "_dash_12t9p_1",
|
|
|
405
405
|
r: "20"
|
|
406
406
|
}
|
|
407
407
|
) }) });
|
|
408
|
-
|
|
409
|
-
function
|
|
408
|
+
ot.displayName = "Spinner";
|
|
409
|
+
function we(t) {
|
|
410
410
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
411
411
|
}
|
|
412
|
-
var
|
|
412
|
+
var Cr = { exports: {} };
|
|
413
413
|
/*!
|
|
414
414
|
Copyright (c) 2018 Jed Watson.
|
|
415
415
|
Licensed under the MIT License (MIT), see
|
|
416
416
|
http://jedwatson.github.io/classnames
|
|
417
417
|
*/
|
|
418
|
-
var
|
|
419
|
-
function
|
|
420
|
-
return
|
|
418
|
+
var Pr;
|
|
419
|
+
function Se() {
|
|
420
|
+
return Pr || (Pr = 1, (function(t) {
|
|
421
421
|
(function() {
|
|
422
422
|
var i = {}.hasOwnProperty;
|
|
423
423
|
function n() {
|
|
@@ -446,10 +446,10 @@ function we() {
|
|
|
446
446
|
}
|
|
447
447
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
448
448
|
})();
|
|
449
|
-
})(
|
|
449
|
+
})(Cr)), Cr.exports;
|
|
450
450
|
}
|
|
451
|
-
var
|
|
452
|
-
const
|
|
451
|
+
var Ne = Se();
|
|
452
|
+
const je = /* @__PURE__ */ we(Ne), Oe = {
|
|
453
453
|
"purpur-button": "_purpur-button_10jh0_1",
|
|
454
454
|
"purpur-button--xs": "_purpur-button--xs_10jh0_22",
|
|
455
455
|
"purpur-button--icon-only": "_purpur-button--icon-only_10jh0_25",
|
|
@@ -472,7 +472,7 @@ const Se = /* @__PURE__ */ xe($e), Ne = {
|
|
|
472
472
|
"purpur-button--text-negative": "_purpur-button--text-negative_10jh0_185",
|
|
473
473
|
"purpur-button--text": "_purpur-button--text_10jh0_185",
|
|
474
474
|
"purpur-button__spinner": "_purpur-button__spinner_10jh0_235"
|
|
475
|
-
},
|
|
475
|
+
}, qr = je.bind(Oe), L = "purpur-button", pt = Y(
|
|
476
476
|
({
|
|
477
477
|
children: t,
|
|
478
478
|
className: i,
|
|
@@ -489,7 +489,7 @@ const Se = /* @__PURE__ */ xe($e), Ne = {
|
|
|
489
489
|
}, N) => {
|
|
490
490
|
if (a && _ === "destructive")
|
|
491
491
|
return null;
|
|
492
|
-
const A =
|
|
492
|
+
const A = qr(
|
|
493
493
|
[
|
|
494
494
|
L,
|
|
495
495
|
`${L}--${e ? `${_}-negative` : _}`,
|
|
@@ -504,24 +504,24 @@ const Se = /* @__PURE__ */ xe($e), Ne = {
|
|
|
504
504
|
i
|
|
505
505
|
), f = (S) => {
|
|
506
506
|
n || r ? S.preventDefault() : u && u(S);
|
|
507
|
-
},
|
|
507
|
+
}, w = !!b["aria-disabled"] || n || r;
|
|
508
508
|
return /* @__PURE__ */ O(
|
|
509
509
|
"button",
|
|
510
510
|
{
|
|
511
511
|
className: A,
|
|
512
512
|
type: g,
|
|
513
513
|
ref: N,
|
|
514
|
-
"aria-disabled":
|
|
514
|
+
"aria-disabled": w,
|
|
515
515
|
onClick: f,
|
|
516
516
|
...b,
|
|
517
517
|
children: [
|
|
518
518
|
r && /* @__PURE__ */ l(
|
|
519
|
-
|
|
519
|
+
ot,
|
|
520
520
|
{
|
|
521
|
-
size: v ===
|
|
521
|
+
size: v === fe.LG ? "xs" : "xxs",
|
|
522
522
|
negative: e,
|
|
523
|
-
disabled:
|
|
524
|
-
className:
|
|
523
|
+
disabled: w,
|
|
524
|
+
className: qr(`${L}__spinner`)
|
|
525
525
|
}
|
|
526
526
|
),
|
|
527
527
|
" ",
|
|
@@ -531,19 +531,19 @@ const Se = /* @__PURE__ */ xe($e), Ne = {
|
|
|
531
531
|
);
|
|
532
532
|
}
|
|
533
533
|
);
|
|
534
|
-
|
|
535
|
-
function
|
|
534
|
+
pt.displayName = "Button";
|
|
535
|
+
function Ae(t) {
|
|
536
536
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
537
537
|
}
|
|
538
|
-
var
|
|
538
|
+
var Rr = { exports: {} };
|
|
539
539
|
/*!
|
|
540
540
|
Copyright (c) 2018 Jed Watson.
|
|
541
541
|
Licensed under the MIT License (MIT), see
|
|
542
542
|
http://jedwatson.github.io/classnames
|
|
543
543
|
*/
|
|
544
|
-
var
|
|
545
|
-
function
|
|
546
|
-
return
|
|
544
|
+
var Lr;
|
|
545
|
+
function ke() {
|
|
546
|
+
return Lr || (Lr = 1, (function(t) {
|
|
547
547
|
(function() {
|
|
548
548
|
var i = {}.hasOwnProperty;
|
|
549
549
|
function n() {
|
|
@@ -572,10 +572,10 @@ function Oe() {
|
|
|
572
572
|
}
|
|
573
573
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
574
574
|
})();
|
|
575
|
-
})(
|
|
575
|
+
})(Rr)), Rr.exports;
|
|
576
576
|
}
|
|
577
|
-
var
|
|
578
|
-
const
|
|
577
|
+
var Ce = ke();
|
|
578
|
+
const Pe = /* @__PURE__ */ Ae(Ce), qe = {
|
|
579
579
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
580
580
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
581
581
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -583,40 +583,40 @@ const ke = /* @__PURE__ */ je(Ae), Ce = {
|
|
|
583
583
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
584
584
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
585
585
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
586
|
-
},
|
|
586
|
+
}, Re = Pe.bind(qe), Mr = "purpur-icon", Le = "md", Me = (t) => t.filter((i) => Object.keys(i).length >= 1).map((i) => `${i.name}="${i.value}"`).join(" "), Be = ({ content: t = "", title: i } = {}) => {
|
|
587
587
|
const n = [
|
|
588
588
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
589
589
|
{ name: "fill", value: "currentColor" },
|
|
590
590
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
591
591
|
i ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
592
592
|
], o = i ? `<title>${i}</title>` : "";
|
|
593
|
-
return `<svg ${
|
|
594
|
-
},
|
|
595
|
-
const r =
|
|
596
|
-
content:
|
|
593
|
+
return `<svg ${Me(n)}>${o}${t}</svg>`;
|
|
594
|
+
}, Ee = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), lt = ({ svg: t, allyTitle: i, className: n, size: o = Le, ...a }) => {
|
|
595
|
+
const r = Be({
|
|
596
|
+
content: Ee(t.svg),
|
|
597
597
|
title: i
|
|
598
|
-
}), e =
|
|
598
|
+
}), e = Re(Mr, `${Mr}--${o}`, n);
|
|
599
599
|
return /* @__PURE__ */ l("span", { className: e, dangerouslySetInnerHTML: { __html: r }, ...a });
|
|
600
600
|
};
|
|
601
|
-
|
|
602
|
-
const
|
|
601
|
+
lt.displayName = "Icon";
|
|
602
|
+
const Te = {
|
|
603
603
|
name: "error-filled",
|
|
604
604
|
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>',
|
|
605
605
|
keywords: ["error-filled"],
|
|
606
606
|
category: "status"
|
|
607
607
|
};
|
|
608
|
-
function
|
|
608
|
+
function Ie(t) {
|
|
609
609
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
610
610
|
}
|
|
611
|
-
var
|
|
611
|
+
var Br = { exports: {} };
|
|
612
612
|
/*!
|
|
613
613
|
Copyright (c) 2018 Jed Watson.
|
|
614
614
|
Licensed under the MIT License (MIT), see
|
|
615
615
|
http://jedwatson.github.io/classnames
|
|
616
616
|
*/
|
|
617
|
-
var
|
|
618
|
-
function
|
|
619
|
-
return
|
|
617
|
+
var Er;
|
|
618
|
+
function ze() {
|
|
619
|
+
return Er || (Er = 1, (function(t) {
|
|
620
620
|
(function() {
|
|
621
621
|
var i = {}.hasOwnProperty;
|
|
622
622
|
function n() {
|
|
@@ -645,14 +645,14 @@ function Te() {
|
|
|
645
645
|
}
|
|
646
646
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
647
647
|
})();
|
|
648
|
-
})(
|
|
648
|
+
})(Br)), Br.exports;
|
|
649
649
|
}
|
|
650
|
-
var
|
|
651
|
-
const
|
|
650
|
+
var De = ze();
|
|
651
|
+
const Ve = /* @__PURE__ */ Ie(De), Ze = {
|
|
652
652
|
"purpur-field-error-text": "_purpur-field-error-text_u1cy2_1",
|
|
653
653
|
"purpur-field-error-text--negative": "_purpur-field-error-text--negative_u1cy2_11",
|
|
654
654
|
"purpur-field-error-text__icon": "_purpur-field-error-text__icon_u1cy2_14"
|
|
655
|
-
},
|
|
655
|
+
}, Tr = Ve.bind(Ze), ir = "purpur-field-error-text", He = ({
|
|
656
656
|
children: t,
|
|
657
657
|
className: i,
|
|
658
658
|
negative: n = !1,
|
|
@@ -661,30 +661,30 @@ const ze = /* @__PURE__ */ Ee(Ie), De = {
|
|
|
661
661
|
}) => /* @__PURE__ */ O(
|
|
662
662
|
"div",
|
|
663
663
|
{
|
|
664
|
-
className:
|
|
665
|
-
[`${
|
|
664
|
+
className: Tr(i, ir, {
|
|
665
|
+
[`${ir}--negative`]: n
|
|
666
666
|
}),
|
|
667
667
|
"aria-live": "assertive",
|
|
668
668
|
"aria-relevant": o,
|
|
669
669
|
...a,
|
|
670
670
|
children: [
|
|
671
|
-
/* @__PURE__ */ l(
|
|
671
|
+
/* @__PURE__ */ l(lt, { svg: Te, size: "xs", className: Tr(`${ir}__icon`) }),
|
|
672
672
|
t
|
|
673
673
|
]
|
|
674
674
|
}
|
|
675
675
|
);
|
|
676
|
-
function
|
|
676
|
+
function Fe(t) {
|
|
677
677
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
678
678
|
}
|
|
679
|
-
var
|
|
679
|
+
var Ir = { exports: {} };
|
|
680
680
|
/*!
|
|
681
681
|
Copyright (c) 2018 Jed Watson.
|
|
682
682
|
Licensed under the MIT License (MIT), see
|
|
683
683
|
http://jedwatson.github.io/classnames
|
|
684
684
|
*/
|
|
685
|
-
var
|
|
686
|
-
function
|
|
687
|
-
return
|
|
685
|
+
var zr;
|
|
686
|
+
function We() {
|
|
687
|
+
return zr || (zr = 1, (function(t) {
|
|
688
688
|
(function() {
|
|
689
689
|
var i = {}.hasOwnProperty;
|
|
690
690
|
function n() {
|
|
@@ -713,14 +713,14 @@ function He() {
|
|
|
713
713
|
}
|
|
714
714
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
715
715
|
})();
|
|
716
|
-
})(
|
|
716
|
+
})(Ir)), Ir.exports;
|
|
717
717
|
}
|
|
718
|
-
var
|
|
719
|
-
const
|
|
718
|
+
var Ge = We();
|
|
719
|
+
const Ke = /* @__PURE__ */ Fe(Ge), Ue = {
|
|
720
720
|
"purpur-field-helper-text": "_purpur-field-helper-text_11nsh_1",
|
|
721
721
|
"purpur-field-helper-text--disabled": "_purpur-field-helper-text--disabled_11nsh_9",
|
|
722
722
|
"purpur-field-helper-text--negative": "_purpur-field-helper-text--negative_11nsh_12"
|
|
723
|
-
},
|
|
723
|
+
}, Ye = Ke.bind(Ue), ar = "purpur-field-helper-text", Je = ({
|
|
724
724
|
children: t,
|
|
725
725
|
className: i,
|
|
726
726
|
disabled: n,
|
|
@@ -728,24 +728,24 @@ const We = /* @__PURE__ */ Ze(Fe), Ge = {
|
|
|
728
728
|
negative: a,
|
|
729
729
|
...r
|
|
730
730
|
}) => {
|
|
731
|
-
const e =
|
|
732
|
-
[`${
|
|
733
|
-
[`${
|
|
731
|
+
const e = Ye(i, ar, {
|
|
732
|
+
[`${ar}--disabled`]: n,
|
|
733
|
+
[`${ar}--negative`]: a
|
|
734
734
|
});
|
|
735
735
|
return /* @__PURE__ */ l("span", { id: o, className: e, ...r, children: t });
|
|
736
736
|
};
|
|
737
|
-
function
|
|
737
|
+
function Qe(t) {
|
|
738
738
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
739
739
|
}
|
|
740
|
-
var
|
|
740
|
+
var Dr = { exports: {} };
|
|
741
741
|
/*!
|
|
742
742
|
Copyright (c) 2018 Jed Watson.
|
|
743
743
|
Licensed under the MIT License (MIT), see
|
|
744
744
|
http://jedwatson.github.io/classnames
|
|
745
745
|
*/
|
|
746
|
-
var
|
|
747
|
-
function
|
|
748
|
-
return
|
|
746
|
+
var Vr;
|
|
747
|
+
function Xe() {
|
|
748
|
+
return Vr || (Vr = 1, (function(t) {
|
|
749
749
|
(function() {
|
|
750
750
|
var i = {}.hasOwnProperty;
|
|
751
751
|
function n() {
|
|
@@ -774,10 +774,10 @@ function Je() {
|
|
|
774
774
|
}
|
|
775
775
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
776
776
|
})();
|
|
777
|
-
})(
|
|
777
|
+
})(Dr)), Dr.exports;
|
|
778
778
|
}
|
|
779
|
-
var
|
|
780
|
-
const
|
|
779
|
+
var rn = Xe();
|
|
780
|
+
const tn = /* @__PURE__ */ Qe(rn), en = {
|
|
781
781
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
782
782
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
783
783
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -785,86 +785,95 @@ const Xe = /* @__PURE__ */ Ye(Qe), rn = {
|
|
|
785
785
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
786
786
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
787
787
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
788
|
-
},
|
|
788
|
+
}, nn = tn.bind(en), Zr = "purpur-icon", un = "md", an = (t) => t.filter((i) => Object.keys(i).length >= 1).map((i) => `${i.name}="${i.value}"`).join(" "), on = ({ content: t = "", title: i } = {}) => {
|
|
789
789
|
const n = [
|
|
790
790
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
791
791
|
{ name: "fill", value: "currentColor" },
|
|
792
792
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
793
793
|
i ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
794
794
|
], o = i ? `<title>${i}</title>` : "";
|
|
795
|
-
return `<svg ${
|
|
796
|
-
},
|
|
797
|
-
const r =
|
|
798
|
-
content:
|
|
795
|
+
return `<svg ${an(n)}>${o}${t}</svg>`;
|
|
796
|
+
}, pn = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), sr = ({ svg: t, allyTitle: i, className: n, size: o = un, ...a }) => {
|
|
797
|
+
const r = on({
|
|
798
|
+
content: pn(t.svg),
|
|
799
799
|
title: i
|
|
800
|
-
}), e =
|
|
800
|
+
}), e = nn(Zr, `${Zr}--${o}`, n);
|
|
801
801
|
return /* @__PURE__ */ l("span", { className: e, dangerouslySetInnerHTML: { __html: r }, ...a });
|
|
802
802
|
};
|
|
803
|
-
|
|
804
|
-
const
|
|
803
|
+
sr.displayName = "Icon";
|
|
804
|
+
const ln = {
|
|
805
805
|
name: "check-circle-filled",
|
|
806
806
|
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>',
|
|
807
807
|
keywords: ["check-circle-filled"],
|
|
808
808
|
category: "status"
|
|
809
|
-
},
|
|
810
|
-
|
|
811
|
-
const
|
|
809
|
+
}, st = (t) => /* @__PURE__ */ l(sr, { ...t, svg: ln });
|
|
810
|
+
st.displayName = "IconCheckCircleFilled";
|
|
811
|
+
const sn = {
|
|
812
812
|
name: "close",
|
|
813
813
|
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>',
|
|
814
814
|
keywords: ["close"],
|
|
815
815
|
category: "utility"
|
|
816
|
-
},
|
|
817
|
-
|
|
818
|
-
function
|
|
816
|
+
}, ct = (t) => /* @__PURE__ */ l(sr, { ...t, svg: sn });
|
|
817
|
+
ct.displayName = "IconClose";
|
|
818
|
+
function Hr(t, i) {
|
|
819
819
|
if (typeof t == "function")
|
|
820
820
|
return t(i);
|
|
821
821
|
t != null && (t.current = i);
|
|
822
822
|
}
|
|
823
|
-
function
|
|
823
|
+
function cn(...t) {
|
|
824
824
|
return (i) => {
|
|
825
825
|
let n = !1;
|
|
826
826
|
const o = t.map((a) => {
|
|
827
|
-
const r =
|
|
827
|
+
const r = Hr(a, i);
|
|
828
828
|
return !n && typeof r == "function" && (n = !0), r;
|
|
829
829
|
});
|
|
830
830
|
if (n)
|
|
831
831
|
return () => {
|
|
832
832
|
for (let a = 0; a < o.length; a++) {
|
|
833
833
|
const r = o[a];
|
|
834
|
-
typeof r == "function" ? r() :
|
|
834
|
+
typeof r == "function" ? r() : Hr(t[a], null);
|
|
835
835
|
}
|
|
836
836
|
};
|
|
837
837
|
};
|
|
838
838
|
}
|
|
839
|
+
var dn = Symbol.for("react.lazy"), X = m[" use ".trim().toString()];
|
|
840
|
+
function _n(t) {
|
|
841
|
+
return typeof t == "object" && t !== null && "then" in t;
|
|
842
|
+
}
|
|
843
|
+
function dt(t) {
|
|
844
|
+
return t != null && typeof t == "object" && "$$typeof" in t && t.$$typeof === dn && "_payload" in t && _n(t._payload);
|
|
845
|
+
}
|
|
839
846
|
// @__NO_SIDE_EFFECTS__
|
|
840
|
-
function
|
|
841
|
-
const i = /* @__PURE__ */
|
|
842
|
-
|
|
847
|
+
function fn(t) {
|
|
848
|
+
const i = /* @__PURE__ */ vn(t), n = m.forwardRef((o, a) => {
|
|
849
|
+
let { children: r, ...e } = o;
|
|
850
|
+
dt(r) && typeof X == "function" && (r = X(r._payload));
|
|
851
|
+
const u = m.Children.toArray(r), v = u.find(hn);
|
|
843
852
|
if (v) {
|
|
844
|
-
const _ = v.props.children, g = u.map((b) => b === v ?
|
|
845
|
-
return /* @__PURE__ */ l(i, { ...e, ref: a, children:
|
|
853
|
+
const _ = v.props.children, g = u.map((b) => b === v ? m.Children.count(_) > 1 ? m.Children.only(null) : m.isValidElement(_) ? _.props.children : null : b);
|
|
854
|
+
return /* @__PURE__ */ l(i, { ...e, ref: a, children: m.isValidElement(_) ? m.cloneElement(_, void 0, g) : null });
|
|
846
855
|
}
|
|
847
856
|
return /* @__PURE__ */ l(i, { ...e, ref: a, children: r });
|
|
848
857
|
});
|
|
849
858
|
return n.displayName = `${t}.Slot`, n;
|
|
850
859
|
}
|
|
851
860
|
// @__NO_SIDE_EFFECTS__
|
|
852
|
-
function
|
|
853
|
-
const i =
|
|
854
|
-
|
|
855
|
-
if (
|
|
856
|
-
const e =
|
|
857
|
-
return a.type !==
|
|
861
|
+
function vn(t) {
|
|
862
|
+
const i = m.forwardRef((n, o) => {
|
|
863
|
+
let { children: a, ...r } = n;
|
|
864
|
+
if (dt(a) && typeof X == "function" && (a = X(a._payload)), m.isValidElement(a)) {
|
|
865
|
+
const e = bn(a), u = gn(r, a.props);
|
|
866
|
+
return a.type !== m.Fragment && (u.ref = o ? cn(o, e) : e), m.cloneElement(a, u);
|
|
858
867
|
}
|
|
859
|
-
return
|
|
868
|
+
return m.Children.count(a) > 1 ? m.Children.only(null) : null;
|
|
860
869
|
});
|
|
861
870
|
return i.displayName = `${t}.SlotClone`, i;
|
|
862
871
|
}
|
|
863
|
-
var
|
|
864
|
-
function
|
|
865
|
-
return
|
|
872
|
+
var mn = Symbol("radix.slottable");
|
|
873
|
+
function hn(t) {
|
|
874
|
+
return m.isValidElement(t) && typeof t.type == "function" && "__radixId" in t.type && t.type.__radixId === mn;
|
|
866
875
|
}
|
|
867
|
-
function
|
|
876
|
+
function gn(t, i) {
|
|
868
877
|
const n = { ...i };
|
|
869
878
|
for (const o in i) {
|
|
870
879
|
const a = t[o], r = i[o];
|
|
@@ -875,12 +884,12 @@ function fn(t, i) {
|
|
|
875
884
|
}
|
|
876
885
|
return { ...t, ...n };
|
|
877
886
|
}
|
|
878
|
-
function
|
|
887
|
+
function bn(t) {
|
|
879
888
|
var i, n;
|
|
880
889
|
let o = (i = Object.getOwnPropertyDescriptor(t.props, "ref")) == null ? void 0 : i.get, a = o && "isReactWarning" in o && o.isReactWarning;
|
|
881
890
|
return a ? t.ref : (o = (n = Object.getOwnPropertyDescriptor(t, "ref")) == null ? void 0 : n.get, a = o && "isReactWarning" in o && o.isReactWarning, a ? t.props.ref : t.props.ref || t.ref);
|
|
882
891
|
}
|
|
883
|
-
var
|
|
892
|
+
var yn = [
|
|
884
893
|
"a",
|
|
885
894
|
"button",
|
|
886
895
|
"div",
|
|
@@ -898,14 +907,14 @@ var mn = [
|
|
|
898
907
|
"span",
|
|
899
908
|
"svg",
|
|
900
909
|
"ul"
|
|
901
|
-
],
|
|
902
|
-
const n = /* @__PURE__ */
|
|
910
|
+
], xn = yn.reduce((t, i) => {
|
|
911
|
+
const n = /* @__PURE__ */ fn(`Primitive.${i}`), o = m.forwardRef((a, r) => {
|
|
903
912
|
const { asChild: e, ...u } = a, v = e ? n : i;
|
|
904
913
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ l(v, { ...u, ref: r });
|
|
905
914
|
});
|
|
906
915
|
return o.displayName = `Primitive.${i}`, { ...t, [i]: o };
|
|
907
|
-
}, {}),
|
|
908
|
-
|
|
916
|
+
}, {}), $n = "Label", _t = m.forwardRef((t, i) => /* @__PURE__ */ l(
|
|
917
|
+
xn.label,
|
|
909
918
|
{
|
|
910
919
|
...t,
|
|
911
920
|
ref: i,
|
|
@@ -915,20 +924,20 @@ var mn = [
|
|
|
915
924
|
}
|
|
916
925
|
}
|
|
917
926
|
));
|
|
918
|
-
|
|
919
|
-
var
|
|
920
|
-
function
|
|
927
|
+
_t.displayName = $n;
|
|
928
|
+
var wn = _t;
|
|
929
|
+
function Sn(t) {
|
|
921
930
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
922
931
|
}
|
|
923
|
-
var
|
|
932
|
+
var Fr = { exports: {} };
|
|
924
933
|
/*!
|
|
925
934
|
Copyright (c) 2018 Jed Watson.
|
|
926
935
|
Licensed under the MIT License (MIT), see
|
|
927
936
|
http://jedwatson.github.io/classnames
|
|
928
937
|
*/
|
|
929
|
-
var
|
|
930
|
-
function
|
|
931
|
-
return
|
|
938
|
+
var Wr;
|
|
939
|
+
function Nn() {
|
|
940
|
+
return Wr || (Wr = 1, (function(t) {
|
|
932
941
|
(function() {
|
|
933
942
|
var i = {}.hasOwnProperty;
|
|
934
943
|
function n() {
|
|
@@ -957,38 +966,38 @@ function xn() {
|
|
|
957
966
|
}
|
|
958
967
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
959
968
|
})();
|
|
960
|
-
})(
|
|
969
|
+
})(Fr)), Fr.exports;
|
|
961
970
|
}
|
|
962
|
-
var
|
|
963
|
-
const
|
|
971
|
+
var jn = Nn();
|
|
972
|
+
const On = /* @__PURE__ */ Sn(jn), An = {
|
|
964
973
|
"purpur-label": "_purpur-label_1x80u_1",
|
|
965
974
|
"purpur-label--negative": "_purpur-label--negative_1x80u_8",
|
|
966
975
|
"purpur-label--disabled": "_purpur-label--disabled_1x80u_11"
|
|
967
|
-
},
|
|
976
|
+
}, kn = On.bind(An), or = "purpur-label", Cn = ({
|
|
968
977
|
children: t,
|
|
969
978
|
className: i,
|
|
970
979
|
disabled: n,
|
|
971
980
|
negative: o = !1,
|
|
972
981
|
...a
|
|
973
982
|
}) => {
|
|
974
|
-
const r =
|
|
975
|
-
[`${
|
|
976
|
-
[`${
|
|
983
|
+
const r = kn(i, or, {
|
|
984
|
+
[`${or}--disabled`]: n,
|
|
985
|
+
[`${or}--negative`]: o
|
|
977
986
|
});
|
|
978
|
-
return /* @__PURE__ */ l(
|
|
987
|
+
return /* @__PURE__ */ l(wn, { className: r, ...a, children: t });
|
|
979
988
|
};
|
|
980
|
-
function
|
|
989
|
+
function Pn(t) {
|
|
981
990
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
982
991
|
}
|
|
983
|
-
var
|
|
992
|
+
var Gr = { exports: {} };
|
|
984
993
|
/*!
|
|
985
994
|
Copyright (c) 2018 Jed Watson.
|
|
986
995
|
Licensed under the MIT License (MIT), see
|
|
987
996
|
http://jedwatson.github.io/classnames
|
|
988
997
|
*/
|
|
989
|
-
var
|
|
990
|
-
function
|
|
991
|
-
return
|
|
998
|
+
var Kr;
|
|
999
|
+
function qn() {
|
|
1000
|
+
return Kr || (Kr = 1, (function(t) {
|
|
992
1001
|
(function() {
|
|
993
1002
|
var i = {}.hasOwnProperty;
|
|
994
1003
|
function n() {
|
|
@@ -1017,33 +1026,33 @@ function An() {
|
|
|
1017
1026
|
}
|
|
1018
1027
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
1019
1028
|
})();
|
|
1020
|
-
})(
|
|
1029
|
+
})(Gr)), Gr.exports;
|
|
1021
1030
|
}
|
|
1022
|
-
var
|
|
1023
|
-
const
|
|
1031
|
+
var Rn = qn();
|
|
1032
|
+
const Ln = /* @__PURE__ */ Pn(Rn), Mn = "_rotate_12t9p_1", Bn = "_dash_12t9p_1", En = {
|
|
1024
1033
|
"purpur-spinner": "_purpur-spinner_12t9p_2",
|
|
1025
|
-
rotate:
|
|
1034
|
+
rotate: Mn,
|
|
1026
1035
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_12t9p_6",
|
|
1027
1036
|
"purpur-spinner--xs": "_purpur-spinner--xs_12t9p_10",
|
|
1028
1037
|
"purpur-spinner--sm": "_purpur-spinner--sm_12t9p_14",
|
|
1029
1038
|
"purpur-spinner--md": "_purpur-spinner--md_12t9p_18",
|
|
1030
1039
|
"purpur-spinner--lg": "_purpur-spinner--lg_12t9p_22",
|
|
1031
1040
|
"purpur-spinner__circle": "_purpur-spinner__circle_12t9p_26",
|
|
1032
|
-
dash:
|
|
1041
|
+
dash: Bn,
|
|
1033
1042
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_12t9p_41",
|
|
1034
1043
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_12t9p_44"
|
|
1035
|
-
},
|
|
1044
|
+
}, Ur = Ln.bind(En), W = "purpur-spinner", Tn = {
|
|
1036
1045
|
SM: "sm"
|
|
1037
|
-
},
|
|
1046
|
+
}, ft = ({
|
|
1038
1047
|
disabled: t = !1,
|
|
1039
1048
|
negative: i = !1,
|
|
1040
|
-
size: n =
|
|
1049
|
+
size: n = Tn.SM,
|
|
1041
1050
|
className: o,
|
|
1042
1051
|
...a
|
|
1043
|
-
}) => /* @__PURE__ */ l("div", { className:
|
|
1052
|
+
}) => /* @__PURE__ */ l("div", { className: Ur(W, `${W}--${n}`, o), ...a, children: /* @__PURE__ */ l("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ l(
|
|
1044
1053
|
"circle",
|
|
1045
1054
|
{
|
|
1046
|
-
className:
|
|
1055
|
+
className: Ur(`${W}__circle`, {
|
|
1047
1056
|
[`${W}__circle--disabled`]: t,
|
|
1048
1057
|
[`${W}__circle--negative`]: i
|
|
1049
1058
|
}),
|
|
@@ -1052,19 +1061,19 @@ const Cn = /* @__PURE__ */ On(kn), Pn = "_rotate_12t9p_1", qn = "_dash_12t9p_1",
|
|
|
1052
1061
|
r: "20"
|
|
1053
1062
|
}
|
|
1054
1063
|
) }) });
|
|
1055
|
-
|
|
1056
|
-
function
|
|
1064
|
+
ft.displayName = "Spinner";
|
|
1065
|
+
function In(t) {
|
|
1057
1066
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
1058
1067
|
}
|
|
1059
|
-
var
|
|
1068
|
+
var Yr = { exports: {} };
|
|
1060
1069
|
/*!
|
|
1061
1070
|
Copyright (c) 2018 Jed Watson.
|
|
1062
1071
|
Licensed under the MIT License (MIT), see
|
|
1063
1072
|
http://jedwatson.github.io/classnames
|
|
1064
1073
|
*/
|
|
1065
|
-
var
|
|
1066
|
-
function
|
|
1067
|
-
return
|
|
1074
|
+
var Jr;
|
|
1075
|
+
function zn() {
|
|
1076
|
+
return Jr || (Jr = 1, (function(t) {
|
|
1068
1077
|
(function() {
|
|
1069
1078
|
var i = {}.hasOwnProperty;
|
|
1070
1079
|
function n() {
|
|
@@ -1093,10 +1102,10 @@ function Bn() {
|
|
|
1093
1102
|
}
|
|
1094
1103
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
1095
1104
|
})();
|
|
1096
|
-
})(
|
|
1105
|
+
})(Yr)), Yr.exports;
|
|
1097
1106
|
}
|
|
1098
|
-
var
|
|
1099
|
-
const
|
|
1107
|
+
var Dn = zn();
|
|
1108
|
+
const Vn = /* @__PURE__ */ In(Dn), Zn = {
|
|
1100
1109
|
"purpur-text-field": "_purpur-text-field_3gl1k_1",
|
|
1101
1110
|
"purpur-text-field__label": "_purpur-text-field__label_3gl1k_7",
|
|
1102
1111
|
"purpur-text-field__label-text": "_purpur-text-field__label-text_3gl1k_12",
|
|
@@ -1113,7 +1122,7 @@ const Tn = /* @__PURE__ */ Mn(En), In = {
|
|
|
1113
1122
|
"purpur-text-field__input--error": "_purpur-text-field__input--error_3gl1k_94",
|
|
1114
1123
|
"purpur-text-field__adornment-container": "_purpur-text-field__adornment-container_3gl1k_106",
|
|
1115
1124
|
"purpur-text-field__valid-icon": "_purpur-text-field__valid-icon_3gl1k_111"
|
|
1116
|
-
},
|
|
1125
|
+
}, Hn = (t) => K(t), P = Vn.bind(Zn), h = "purpur-text-field", vt = Y(
|
|
1117
1126
|
({
|
|
1118
1127
|
["data-testid"]: t,
|
|
1119
1128
|
className: i,
|
|
@@ -1130,16 +1139,16 @@ const Tn = /* @__PURE__ */ Mn(En), In = {
|
|
|
1130
1139
|
startAdornment: N,
|
|
1131
1140
|
valid: A = !1,
|
|
1132
1141
|
...f
|
|
1133
|
-
},
|
|
1142
|
+
}, w) => {
|
|
1134
1143
|
var S;
|
|
1135
|
-
const j =
|
|
1136
|
-
k.current = x, typeof
|
|
1144
|
+
const j = kt(), s = f.id ?? j, y = (x) => t ? `${t}-${x}` : void 0, q = A && !e, M = u ? `${s}-helper-text` : void 0, I = [N].filter((x) => !!x), d = (typeof f.value == "number" ? f.value !== void 0 : (S = f.value) == null ? void 0 : S.length) && !f.disabled && !f.readOnly && !g && b && n, k = Hn(null), z = (x) => {
|
|
1145
|
+
k.current = x, typeof w == "function" ? w(x) : w && (w.current = x);
|
|
1137
1146
|
}, J = () => {
|
|
1138
1147
|
var x;
|
|
1139
1148
|
b == null || b(), (x = k.current) == null || x.focus();
|
|
1140
1149
|
}, B = [
|
|
1141
1150
|
g && /* @__PURE__ */ l(
|
|
1142
|
-
|
|
1151
|
+
ft,
|
|
1143
1152
|
{
|
|
1144
1153
|
disabled: f.disabled,
|
|
1145
1154
|
size: "xs",
|
|
@@ -1148,7 +1157,7 @@ const Tn = /* @__PURE__ */ Mn(En), In = {
|
|
|
1148
1157
|
"spinner"
|
|
1149
1158
|
),
|
|
1150
1159
|
d && /* @__PURE__ */ l(
|
|
1151
|
-
|
|
1160
|
+
pt,
|
|
1152
1161
|
{
|
|
1153
1162
|
variant: "tertiary-purple",
|
|
1154
1163
|
onClick: J,
|
|
@@ -1156,31 +1165,31 @@ const Tn = /* @__PURE__ */ Mn(En), In = {
|
|
|
1156
1165
|
"aria-label": n ?? "",
|
|
1157
1166
|
"data-testid": y("clear-button"),
|
|
1158
1167
|
tabIndex: -1,
|
|
1159
|
-
children: /* @__PURE__ */ l(
|
|
1168
|
+
children: /* @__PURE__ */ l(ct, { size: "xs" })
|
|
1160
1169
|
},
|
|
1161
1170
|
"clear-button"
|
|
1162
1171
|
),
|
|
1163
1172
|
q && /* @__PURE__ */ l(
|
|
1164
|
-
|
|
1173
|
+
st,
|
|
1165
1174
|
{
|
|
1166
1175
|
"data-testid": y("valid-icon"),
|
|
1167
|
-
className: P(`${
|
|
1176
|
+
className: P(`${h}__valid-icon`)
|
|
1168
1177
|
},
|
|
1169
1178
|
"valid-icon"
|
|
1170
1179
|
)
|
|
1171
|
-
].filter((x) => !!x), D = P(`${
|
|
1172
|
-
[`${
|
|
1173
|
-
[`${
|
|
1174
|
-
[`${
|
|
1175
|
-
[`${
|
|
1176
|
-
[`${
|
|
1180
|
+
].filter((x) => !!x), D = P(`${h}__input-container`, {
|
|
1181
|
+
[`${h}__input-container--start-adornment`]: I.length,
|
|
1182
|
+
[`${h}__input-container--end-adornment`]: B.length || r,
|
|
1183
|
+
[`${h}__input-container--disabled`]: f.disabled,
|
|
1184
|
+
[`${h}__input-container--has-clear-button`]: d,
|
|
1185
|
+
[`${h}__input-container--readonly`]: f.readOnly && !f.disabled
|
|
1177
1186
|
});
|
|
1178
|
-
return /* @__PURE__ */ O("div", { className: P(i,
|
|
1187
|
+
return /* @__PURE__ */ O("div", { className: P(i, h), children: [
|
|
1179
1188
|
_ && /* @__PURE__ */ O(
|
|
1180
|
-
|
|
1189
|
+
Cn,
|
|
1181
1190
|
{
|
|
1182
1191
|
htmlFor: s,
|
|
1183
|
-
className: P(`${
|
|
1192
|
+
className: P(`${h}__label`),
|
|
1184
1193
|
"data-testid": y("label"),
|
|
1185
1194
|
disabled: f.disabled,
|
|
1186
1195
|
children: [
|
|
@@ -1189,14 +1198,14 @@ const Tn = /* @__PURE__ */ Mn(En), In = {
|
|
|
1189
1198
|
]
|
|
1190
1199
|
}
|
|
1191
1200
|
),
|
|
1192
|
-
/* @__PURE__ */ O("div", { className: P(`${
|
|
1201
|
+
/* @__PURE__ */ O("div", { className: P(`${h}__field-row`), children: [
|
|
1193
1202
|
!!o && o,
|
|
1194
1203
|
/* @__PURE__ */ O("div", { className: D, children: [
|
|
1195
1204
|
!!I.length && /* @__PURE__ */ l(
|
|
1196
1205
|
"div",
|
|
1197
1206
|
{
|
|
1198
1207
|
"data-testid": y("start-adornments"),
|
|
1199
|
-
className: P(`${
|
|
1208
|
+
className: P(`${h}__adornment-container`),
|
|
1200
1209
|
children: I
|
|
1201
1210
|
}
|
|
1202
1211
|
),
|
|
@@ -1210,20 +1219,20 @@ const Tn = /* @__PURE__ */ Mn(En), In = {
|
|
|
1210
1219
|
"aria-describedby": f["aria-describedby"] || M,
|
|
1211
1220
|
"aria-invalid": f["aria-invalid"] || !!e,
|
|
1212
1221
|
className: P([
|
|
1213
|
-
`${
|
|
1222
|
+
`${h}__input`,
|
|
1214
1223
|
{
|
|
1215
|
-
[`${
|
|
1216
|
-
[`${
|
|
1224
|
+
[`${h}__input--valid`]: q,
|
|
1225
|
+
[`${h}__input--error`]: !!e
|
|
1217
1226
|
}
|
|
1218
1227
|
])
|
|
1219
1228
|
}
|
|
1220
1229
|
),
|
|
1221
|
-
/* @__PURE__ */ l("div", { className: P(`${
|
|
1230
|
+
/* @__PURE__ */ l("div", { className: P(`${h}__frame`) }),
|
|
1222
1231
|
(!!B.length || r) && /* @__PURE__ */ O(
|
|
1223
1232
|
"div",
|
|
1224
1233
|
{
|
|
1225
1234
|
"data-testid": y("end-adornments"),
|
|
1226
|
-
className: P(`${
|
|
1235
|
+
className: P(`${h}__adornment-container`),
|
|
1227
1236
|
children: [
|
|
1228
1237
|
B,
|
|
1229
1238
|
r
|
|
@@ -1233,25 +1242,25 @@ const Tn = /* @__PURE__ */ Mn(En), In = {
|
|
|
1233
1242
|
] }),
|
|
1234
1243
|
!!a && a
|
|
1235
1244
|
] }),
|
|
1236
|
-
M && /* @__PURE__ */ l(
|
|
1237
|
-
e && /* @__PURE__ */ l(
|
|
1245
|
+
M && /* @__PURE__ */ l(Je, { "data-testid": y("helper-text"), id: M, children: u }),
|
|
1246
|
+
e && /* @__PURE__ */ l(He, { "data-testid": y("error-text"), children: e })
|
|
1238
1247
|
] });
|
|
1239
1248
|
}
|
|
1240
1249
|
);
|
|
1241
|
-
|
|
1242
|
-
const
|
|
1243
|
-
function
|
|
1250
|
+
vt.displayName = "TextField";
|
|
1251
|
+
const Fn = (t) => Xr(t) && t.type.displayName === vt.displayName;
|
|
1252
|
+
function Wn(t) {
|
|
1244
1253
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
1245
1254
|
}
|
|
1246
|
-
var
|
|
1255
|
+
var pr = { exports: {} };
|
|
1247
1256
|
/*!
|
|
1248
1257
|
Copyright (c) 2018 Jed Watson.
|
|
1249
1258
|
Licensed under the MIT License (MIT), see
|
|
1250
1259
|
http://jedwatson.github.io/classnames
|
|
1251
1260
|
*/
|
|
1252
|
-
var
|
|
1253
|
-
function
|
|
1254
|
-
return
|
|
1261
|
+
var Qr;
|
|
1262
|
+
function Gn() {
|
|
1263
|
+
return Qr || (Qr = 1, (function(t) {
|
|
1255
1264
|
(function() {
|
|
1256
1265
|
var i = {}.hasOwnProperty;
|
|
1257
1266
|
function n() {
|
|
@@ -1280,26 +1289,26 @@ function Zn() {
|
|
|
1280
1289
|
}
|
|
1281
1290
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
1282
1291
|
})();
|
|
1283
|
-
})(
|
|
1292
|
+
})(pr)), pr.exports;
|
|
1284
1293
|
}
|
|
1285
|
-
var
|
|
1286
|
-
const
|
|
1294
|
+
var Kn = Gn();
|
|
1295
|
+
const Un = /* @__PURE__ */ Wn(Kn), Yn = {
|
|
1287
1296
|
"purpur-autocomplete": "_purpur-autocomplete_1u8x6_1",
|
|
1288
1297
|
"purpur-autocomplete__listbox": "_purpur-autocomplete__listbox_1u8x6_4",
|
|
1289
1298
|
"purpur-autocomplete__chevron-button": "_purpur-autocomplete__chevron-button_1u8x6_9",
|
|
1290
1299
|
"purpur-autocomplete__chevron-icon": "_purpur-autocomplete__chevron-icon_1u8x6_15",
|
|
1291
1300
|
"purpur-autocomplete__chevron-icon--up": "_purpur-autocomplete__chevron-icon--up_1u8x6_19"
|
|
1292
|
-
},
|
|
1293
|
-
const n =
|
|
1301
|
+
}, Jn = (t) => K(t), Qn = (t, i) => {
|
|
1302
|
+
const n = Ct(
|
|
1294
1303
|
(o) => {
|
|
1295
1304
|
t && !t.contains(o.target) && i();
|
|
1296
1305
|
},
|
|
1297
1306
|
[i, t]
|
|
1298
1307
|
);
|
|
1299
|
-
|
|
1308
|
+
Pt(() => (document.addEventListener("mousedown", n), () => {
|
|
1300
1309
|
document.removeEventListener("mousedown", n);
|
|
1301
1310
|
}), [n]);
|
|
1302
|
-
},
|
|
1311
|
+
}, Xn = ({
|
|
1303
1312
|
combobox: t,
|
|
1304
1313
|
comboboxButtonAriaLabel: i,
|
|
1305
1314
|
highlightFirstOption: n,
|
|
@@ -1315,64 +1324,64 @@ const Fn = /* @__PURE__ */ Vn(Hn), Wn = {
|
|
|
1315
1324
|
onInputKeyDown: N,
|
|
1316
1325
|
onInputMouseDown: A,
|
|
1317
1326
|
openOnFocus: f,
|
|
1318
|
-
noOptionsText:
|
|
1327
|
+
noOptionsText: w,
|
|
1319
1328
|
onSelect: S,
|
|
1320
1329
|
options: j,
|
|
1321
1330
|
selectedOption: s,
|
|
1322
1331
|
["data-testid"]: y
|
|
1323
1332
|
}) => {
|
|
1324
|
-
const [q, M] =
|
|
1333
|
+
const [q, M] = ur(
|
|
1325
1334
|
((typeof a == "string" ? a : o) || (s == null ? void 0 : s.label)) ?? ""
|
|
1326
|
-
), I = typeof a == "string" ? a : q, [d, k] =
|
|
1327
|
-
function
|
|
1335
|
+
), I = typeof a == "string" ? a : q, [d, k] = ur(n ? j[0] : void 0), z = K(null), J = Jn(null), B = K(null), D = K({}), [x, cr] = ur(!1);
|
|
1336
|
+
function rr(p) {
|
|
1328
1337
|
return y ? `${y}-${p}` : void 0;
|
|
1329
1338
|
}
|
|
1330
1339
|
const V = () => {
|
|
1331
|
-
|
|
1340
|
+
cr(!1), k(void 0);
|
|
1332
1341
|
};
|
|
1333
|
-
|
|
1342
|
+
Qn(J.current, V);
|
|
1334
1343
|
const Z = ({ eventType: p }) => {
|
|
1335
|
-
|
|
1336
|
-
k({ ...s, isSetByClickEvent: p === "CLICK" }),
|
|
1344
|
+
cr(!0), s && requestAnimationFrame(() => {
|
|
1345
|
+
k({ ...s, isSetByClickEvent: p === "CLICK" }), er(D.current[s.id]);
|
|
1337
1346
|
});
|
|
1338
|
-
},
|
|
1347
|
+
}, mt = (p) => {
|
|
1339
1348
|
if (r)
|
|
1340
|
-
return j.filter((
|
|
1349
|
+
return j.filter(($) => r(p, $));
|
|
1341
1350
|
if (!p)
|
|
1342
1351
|
return j;
|
|
1343
1352
|
const c = p.toUpperCase().split(" ") || [];
|
|
1344
1353
|
return j.filter(
|
|
1345
|
-
(
|
|
1346
|
-
(C) => (
|
|
1354
|
+
($) => c.every(
|
|
1355
|
+
(C) => ($.value || $.label).toUpperCase().includes(C)
|
|
1347
1356
|
)
|
|
1348
1357
|
);
|
|
1349
|
-
},
|
|
1358
|
+
}, dr = (p) => s && (s == null ? void 0 : s.label) === p ? j : mt(p), R = dr(I), tr = (p) => {
|
|
1350
1359
|
g == null || g(p), M(p);
|
|
1351
|
-
},
|
|
1360
|
+
}, er = (p) => {
|
|
1352
1361
|
var c;
|
|
1353
1362
|
if (p) {
|
|
1354
|
-
const
|
|
1355
|
-
(
|
|
1363
|
+
const $ = p.getBoundingClientRect(), C = ((c = B.current) == null ? void 0 : c.getBoundingClientRect()) || { top: 0, bottom: 0 };
|
|
1364
|
+
($.top < C.top || $.bottom > C.bottom) && p.scrollIntoView({ block: "nearest" });
|
|
1356
1365
|
}
|
|
1357
|
-
},
|
|
1366
|
+
}, _r = (p) => {
|
|
1358
1367
|
var c;
|
|
1359
|
-
p && ((c = z.current) == null || c.focus(),
|
|
1360
|
-
}, vt = (p) => {
|
|
1361
|
-
const c = n && !d ? 0 : R.findIndex((C) => C && (d == null ? void 0 : d.id) === C.id), w = R.length;
|
|
1362
|
-
return p === "ArrowDown" ? R[(c ?? -1) + 1] || R[0] : R[(c ?? w) - 1] || R[w - 1];
|
|
1363
|
-
}, E = x && (!!R.length || !!$), mt = (p) => {
|
|
1364
|
-
!E && Z({ eventType: "KEYBOARD" });
|
|
1365
|
-
const c = vt(p);
|
|
1366
|
-
k(c), c && tr(D.current[c.id]);
|
|
1368
|
+
p && ((c = z.current) == null || c.focus(), tr(p.label), S == null || S(p)), V();
|
|
1367
1369
|
}, ht = (p) => {
|
|
1370
|
+
const c = n && !d ? 0 : R.findIndex((C) => C && (d == null ? void 0 : d.id) === C.id), $ = R.length;
|
|
1371
|
+
return p === "ArrowDown" ? R[(c ?? -1) + 1] || R[0] : R[(c ?? $) - 1] || R[$ - 1];
|
|
1372
|
+
}, E = x && (!!R.length || !!w), gt = (p) => {
|
|
1373
|
+
!E && Z({ eventType: "KEYBOARD" });
|
|
1374
|
+
const c = ht(p);
|
|
1375
|
+
k(c), c && er(D.current[c.id]);
|
|
1376
|
+
}, bt = (p) => {
|
|
1368
1377
|
switch (N == null || N(p), p.key) {
|
|
1369
1378
|
case "ArrowUp":
|
|
1370
1379
|
case "ArrowDown":
|
|
1371
|
-
p.preventDefault(),
|
|
1380
|
+
p.preventDefault(), gt(p.key);
|
|
1372
1381
|
break;
|
|
1373
1382
|
case "Enter": {
|
|
1374
1383
|
const c = d || (n ? j[0] : void 0);
|
|
1375
|
-
E &&
|
|
1384
|
+
E && _r(c), !E && Z({ eventType: "KEYBOARD" });
|
|
1376
1385
|
break;
|
|
1377
1386
|
}
|
|
1378
1387
|
case "Escape":
|
|
@@ -1380,39 +1389,39 @@ const Fn = /* @__PURE__ */ Vn(Hn), Wn = {
|
|
|
1380
1389
|
V();
|
|
1381
1390
|
break;
|
|
1382
1391
|
}
|
|
1383
|
-
}, gt = (p) => {
|
|
1384
|
-
const c = cr(p.target.value);
|
|
1385
|
-
rr(p.target.value), k(void 0), !E && Z({ eventType: "KEYBOARD" }), n && c[0] && tr(D.current[c[0].id]);
|
|
1386
|
-
}, bt = (p) => {
|
|
1387
|
-
A == null || A(p), E ? V() : Z({ eventType: "CLICK" });
|
|
1388
1392
|
}, yt = (p) => {
|
|
1393
|
+
const c = dr(p.target.value);
|
|
1394
|
+
tr(p.target.value), k(void 0), !E && Z({ eventType: "KEYBOARD" }), n && c[0] && er(D.current[c[0].id]);
|
|
1395
|
+
}, xt = (p) => {
|
|
1396
|
+
A == null || A(p), E ? V() : Z({ eventType: "CLICK" });
|
|
1397
|
+
}, $t = (p) => {
|
|
1389
1398
|
var c;
|
|
1390
1399
|
b == null || b(p), !x && f && Z({ eventType: "KEYBOARD" }), (c = z.current) == null || c.select();
|
|
1391
|
-
},
|
|
1400
|
+
}, wt = (p) => {
|
|
1392
1401
|
_ == null || _(p), setTimeout(() => {
|
|
1393
|
-
var c,
|
|
1394
|
-
!((c = z.current) != null && c.contains(document.activeElement)) && !((
|
|
1402
|
+
var c, $;
|
|
1403
|
+
!((c = z.current) != null && c.contains(document.activeElement)) && !(($ = B.current) != null && $.contains(document.activeElement)) && (V(), t && tr(s ? s.label : ""));
|
|
1395
1404
|
});
|
|
1396
|
-
},
|
|
1405
|
+
}, St = {
|
|
1397
1406
|
maxHeight: typeof v == "number" ? `${v}px` : v
|
|
1398
|
-
},
|
|
1407
|
+
}, fr = {
|
|
1399
1408
|
"aria-label": u,
|
|
1400
1409
|
"aria-expanded": E,
|
|
1401
|
-
"data-testid":
|
|
1410
|
+
"data-testid": rr("listbox"),
|
|
1402
1411
|
id: `${e}-listbox`,
|
|
1403
1412
|
ref: B,
|
|
1404
1413
|
onMouseLeave: () => k(void 0),
|
|
1405
|
-
style: v ?
|
|
1406
|
-
},
|
|
1407
|
-
const
|
|
1414
|
+
style: v ? St : void 0
|
|
1415
|
+
}, vr = (p) => `${e}-listbox-item-${p.id}`, Nt = (p, c) => {
|
|
1416
|
+
const $ = () => p.id !== (d == null ? void 0 : d.id) && k({ ...p, isSetByClickEvent: !0 }), C = (p.id === (d == null ? void 0 : d.id) || !!n && !d && c === 0) && !(d != null && d.isSetByClickEvent);
|
|
1408
1417
|
return {
|
|
1409
|
-
"data-testid":
|
|
1410
|
-
id:
|
|
1418
|
+
"data-testid": rr(`listbox-item-${p.id}`),
|
|
1419
|
+
id: vr(p),
|
|
1411
1420
|
key: p.id,
|
|
1412
|
-
onMouseMove:
|
|
1413
|
-
onMouseUp: () =>
|
|
1414
|
-
ref: (
|
|
1415
|
-
|
|
1421
|
+
onMouseMove: $,
|
|
1422
|
+
onMouseUp: () => _r(p),
|
|
1423
|
+
ref: (nr) => {
|
|
1424
|
+
nr && (D.current[p.id] = nr);
|
|
1416
1425
|
},
|
|
1417
1426
|
tabIndex: -1,
|
|
1418
1427
|
selected: p.id === (s == null ? void 0 : s.id),
|
|
@@ -1420,35 +1429,35 @@ const Fn = /* @__PURE__ */ Vn(Hn), Wn = {
|
|
|
1420
1429
|
highlighted: C,
|
|
1421
1430
|
hovered: p.id === (d == null ? void 0 : d.id) && !!(d != null && d.isSetByClickEvent)
|
|
1422
1431
|
};
|
|
1423
|
-
},
|
|
1424
|
-
"aria-activedescendant": d ?
|
|
1432
|
+
}, jt = {
|
|
1433
|
+
"aria-activedescendant": d ? vr(d) : void 0,
|
|
1425
1434
|
"aria-autocomplete": "list",
|
|
1426
|
-
"aria-controls":
|
|
1427
|
-
"data-testid":
|
|
1435
|
+
"aria-controls": fr.id,
|
|
1436
|
+
"data-testid": rr("input"),
|
|
1428
1437
|
autoComplete: "off",
|
|
1429
1438
|
id: `${e}-input`,
|
|
1430
|
-
onChange:
|
|
1431
|
-
onMouseDown:
|
|
1432
|
-
onFocus:
|
|
1433
|
-
onKeyDown:
|
|
1434
|
-
onBlur:
|
|
1439
|
+
onChange: yt,
|
|
1440
|
+
onMouseDown: xt,
|
|
1441
|
+
onFocus: $t,
|
|
1442
|
+
onKeyDown: bt,
|
|
1443
|
+
onBlur: wt,
|
|
1435
1444
|
ref: z,
|
|
1436
1445
|
role: "combobox",
|
|
1437
1446
|
value: I
|
|
1438
1447
|
};
|
|
1439
1448
|
return {
|
|
1440
1449
|
id: e,
|
|
1441
|
-
inputProps:
|
|
1450
|
+
inputProps: jt,
|
|
1442
1451
|
internalRef: J,
|
|
1443
1452
|
optionsToShow: R,
|
|
1444
1453
|
showListbox: E,
|
|
1445
|
-
noOptionsText:
|
|
1454
|
+
noOptionsText: w,
|
|
1446
1455
|
combobox: t,
|
|
1447
1456
|
comboboxButtonAriaLabel: i,
|
|
1448
|
-
getListBoxItemProps:
|
|
1449
|
-
listboxProps:
|
|
1457
|
+
getListBoxItemProps: Nt,
|
|
1458
|
+
listboxProps: fr
|
|
1450
1459
|
};
|
|
1451
|
-
}, Q =
|
|
1460
|
+
}, Q = Un.bind(Yn), G = "purpur-autocomplete", ru = ({ className: t, renderInput: i, renderOption: n, ...o }, a) => {
|
|
1452
1461
|
const {
|
|
1453
1462
|
id: r,
|
|
1454
1463
|
inputProps: e,
|
|
@@ -1460,15 +1469,15 @@ const Fn = /* @__PURE__ */ Vn(Hn), Wn = {
|
|
|
1460
1469
|
comboboxButtonAriaLabel: N,
|
|
1461
1470
|
getListBoxItemProps: A,
|
|
1462
1471
|
listboxProps: f
|
|
1463
|
-
} =
|
|
1472
|
+
} = Xn(o), w = (s, y) => {
|
|
1464
1473
|
const { key: q, ...M } = A(s, y);
|
|
1465
1474
|
return /* @__PURE__ */ l(U.Item, { ...M, children: n ? n == null ? void 0 : n(s) : s.label }, q);
|
|
1466
1475
|
}, S = (s) => {
|
|
1467
1476
|
u.current = s, typeof a == "function" ? a(s) : a && (a.current = s);
|
|
1468
1477
|
}, j = () => {
|
|
1469
1478
|
const s = i(e);
|
|
1470
|
-
if (b && N && g && s &&
|
|
1471
|
-
const q = /* @__PURE__ */ O(
|
|
1479
|
+
if (b && N && g && s && Fn(s)) {
|
|
1480
|
+
const q = /* @__PURE__ */ O(Ot, { children: [
|
|
1472
1481
|
s.props.endAdornment,
|
|
1473
1482
|
/* @__PURE__ */ l(
|
|
1474
1483
|
"button",
|
|
@@ -1483,7 +1492,7 @@ const Fn = /* @__PURE__ */ Vn(Hn), Wn = {
|
|
|
1483
1492
|
"aria-expanded": _,
|
|
1484
1493
|
"aria-controls": f.id,
|
|
1485
1494
|
children: /* @__PURE__ */ l(
|
|
1486
|
-
|
|
1495
|
+
tt,
|
|
1487
1496
|
{
|
|
1488
1497
|
size: "sm",
|
|
1489
1498
|
className: Q(`${G}__chevron-icon`, {
|
|
@@ -1494,18 +1503,18 @@ const Fn = /* @__PURE__ */ Vn(Hn), Wn = {
|
|
|
1494
1503
|
}
|
|
1495
1504
|
)
|
|
1496
1505
|
] });
|
|
1497
|
-
return
|
|
1506
|
+
return qt(s, { endAdornment: q });
|
|
1498
1507
|
}
|
|
1499
1508
|
return s;
|
|
1500
1509
|
};
|
|
1501
1510
|
return /* @__PURE__ */ O("div", { id: r, ref: S, className: Q([G, t]), children: [
|
|
1502
1511
|
j(),
|
|
1503
|
-
_ && /* @__PURE__ */ l(U, { ...f, className: Q(`${G}__listbox`), children: v.length ? v.filter((s) => !!s).map(
|
|
1512
|
+
_ && /* @__PURE__ */ l(U, { ...f, className: Q(`${G}__listbox`), children: v.length ? v.filter((s) => !!s).map(w) : /* @__PURE__ */ l(U.Item, { noninteractive: !0, children: g }) })
|
|
1504
1513
|
] });
|
|
1505
|
-
},
|
|
1506
|
-
|
|
1514
|
+
}, tu = Y(ru);
|
|
1515
|
+
tu.displayName = "Autocomplete";
|
|
1507
1516
|
export {
|
|
1508
|
-
|
|
1509
|
-
|
|
1517
|
+
tu as Autocomplete,
|
|
1518
|
+
Xn as useAutocomplete
|
|
1510
1519
|
};
|
|
1511
1520
|
//# sourceMappingURL=autocomplete.es.js.map
|