@purpurds/autocomplete 8.12.1 → 8.13.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 +1 -1
- package/dist/autocomplete.cjs.js.map +1 -1
- package/dist/autocomplete.es.js +352 -360
- package/dist/autocomplete.es.js.map +1 -1
- package/package.json +16 -16
package/dist/autocomplete.es.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsx as l, jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import { forwardRef as Y, Children as
|
|
1
|
+
import { jsx as l, jsxs as O, Fragment as Nt } from "react/jsx-runtime";
|
|
2
|
+
import * as g from "react";
|
|
3
|
+
import { forwardRef as Y, Children as Ot, isValidElement as Qe, useId as jt, useRef as G, useCallback as At, useEffect as Ct, useState as re, cloneElement as Pt } from "react";
|
|
4
4
|
import "react-dom";
|
|
5
|
-
function
|
|
5
|
+
function It(t) {
|
|
6
6
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
7
7
|
}
|
|
8
|
-
var he = { exports: {} },
|
|
9
|
-
function
|
|
10
|
-
return
|
|
8
|
+
var he = { exports: {} }, ve;
|
|
9
|
+
function kt() {
|
|
10
|
+
return ve || (ve = 1, (function(t) {
|
|
11
11
|
(function() {
|
|
12
12
|
var u = {}.hasOwnProperty;
|
|
13
13
|
function n() {
|
|
@@ -38,8 +38,8 @@ function Bt() {
|
|
|
38
38
|
})();
|
|
39
39
|
})(he)), he.exports;
|
|
40
40
|
}
|
|
41
|
-
var
|
|
42
|
-
const
|
|
41
|
+
var Mt = kt();
|
|
42
|
+
const Bt = /* @__PURE__ */ It(Mt), qt = {
|
|
43
43
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
44
44
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
45
45
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -47,35 +47,35 @@ const Lt = /* @__PURE__ */ Mt(qt), Rt = {
|
|
|
47
47
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
48
48
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
49
49
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
50
|
-
},
|
|
50
|
+
}, Lt = Bt.bind(qt), ge = "purpur-icon", Rt = "md", zt = (t) => t.filter((u) => Object.keys(u).length >= 1).map((u) => `${u.name}="${u.value}"`).join(" "), Et = ({ content: t = "", title: u } = {}) => {
|
|
51
51
|
const n = [
|
|
52
52
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
53
53
|
{ name: "fill", value: "currentColor" },
|
|
54
54
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
55
55
|
u ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
56
56
|
], o = u ? `<title>${u}</title>` : "";
|
|
57
|
-
return `<svg ${
|
|
58
|
-
},
|
|
59
|
-
const e =
|
|
60
|
-
content:
|
|
57
|
+
return `<svg ${zt(n)}>${o}${t}</svg>`;
|
|
58
|
+
}, Tt = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Xe = ({ svg: t, allyTitle: u, className: n, size: o = Rt, ...a }) => {
|
|
59
|
+
const e = Et({
|
|
60
|
+
content: Tt(t.svg),
|
|
61
61
|
title: u
|
|
62
|
-
}), r =
|
|
62
|
+
}), r = Lt(ge, `${ge}--${o}`, n);
|
|
63
63
|
return /* @__PURE__ */ l("span", { className: r, dangerouslySetInnerHTML: { __html: e }, ...a });
|
|
64
64
|
};
|
|
65
|
-
|
|
66
|
-
const
|
|
65
|
+
Xe.displayName = "Icon";
|
|
66
|
+
const Dt = {
|
|
67
67
|
name: "chevron-down",
|
|
68
68
|
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>',
|
|
69
69
|
keywords: ["chevron-down"],
|
|
70
70
|
category: "utility"
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
function
|
|
71
|
+
}, et = (t) => /* @__PURE__ */ l(Xe, { ...t, svg: Dt });
|
|
72
|
+
et.displayName = "IconChevronDown";
|
|
73
|
+
function Vt(t) {
|
|
74
74
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
75
75
|
}
|
|
76
|
-
var
|
|
77
|
-
function
|
|
78
|
-
return
|
|
76
|
+
var me = { exports: {} }, be;
|
|
77
|
+
function Ft() {
|
|
78
|
+
return be || (be = 1, (function(t) {
|
|
79
79
|
(function() {
|
|
80
80
|
var u = {}.hasOwnProperty;
|
|
81
81
|
function n() {
|
|
@@ -104,10 +104,10 @@ function Kt() {
|
|
|
104
104
|
}
|
|
105
105
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
106
106
|
})();
|
|
107
|
-
})(
|
|
107
|
+
})(me)), me.exports;
|
|
108
108
|
}
|
|
109
|
-
var
|
|
110
|
-
const
|
|
109
|
+
var Zt = Ft();
|
|
110
|
+
const tt = /* @__PURE__ */ Vt(Zt), rt = {
|
|
111
111
|
"purpur-listbox": "_purpur-listbox_6c8yl_1",
|
|
112
112
|
"purpur-listbox-item": "_purpur-listbox-item_6c8yl_15",
|
|
113
113
|
"purpur-listbox-item--hovered": "_purpur-listbox-item--hovered_6c8yl_29",
|
|
@@ -116,12 +116,12 @@ const rt = /* @__PURE__ */ Zt(Ht), nt = {
|
|
|
116
116
|
"purpur-listbox-item--disabled": "_purpur-listbox-item--disabled_6c8yl_44",
|
|
117
117
|
"purpur-listbox-item__icon": "_purpur-listbox-item__icon_6c8yl_51"
|
|
118
118
|
};
|
|
119
|
-
function
|
|
119
|
+
function Kt(t) {
|
|
120
120
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
121
121
|
}
|
|
122
|
-
var
|
|
123
|
-
function
|
|
124
|
-
return
|
|
122
|
+
var ye = { exports: {} }, xe;
|
|
123
|
+
function Ht() {
|
|
124
|
+
return xe || (xe = 1, (function(t) {
|
|
125
125
|
(function() {
|
|
126
126
|
var u = {}.hasOwnProperty;
|
|
127
127
|
function n() {
|
|
@@ -150,10 +150,10 @@ function Gt() {
|
|
|
150
150
|
}
|
|
151
151
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
152
152
|
})();
|
|
153
|
-
})(
|
|
153
|
+
})(ye)), ye.exports;
|
|
154
154
|
}
|
|
155
|
-
var
|
|
156
|
-
const
|
|
155
|
+
var Wt = Ht();
|
|
156
|
+
const Gt = /* @__PURE__ */ Kt(Wt), Ut = {
|
|
157
157
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
158
158
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
159
159
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -161,35 +161,35 @@ const Yt = /* @__PURE__ */ Wt(Ut), Jt = {
|
|
|
161
161
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
162
162
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
163
163
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
164
|
-
},
|
|
164
|
+
}, Yt = Gt.bind(Ut), we = "purpur-icon", Jt = "md", Qt = (t) => t.filter((u) => Object.keys(u).length >= 1).map((u) => `${u.name}="${u.value}"`).join(" "), Xt = ({ content: t = "", title: u } = {}) => {
|
|
165
165
|
const n = [
|
|
166
166
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
167
167
|
{ name: "fill", value: "currentColor" },
|
|
168
168
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
169
169
|
u ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
170
170
|
], o = u ? `<title>${u}</title>` : "";
|
|
171
|
-
return `<svg ${
|
|
172
|
-
},
|
|
173
|
-
const e =
|
|
174
|
-
content:
|
|
171
|
+
return `<svg ${Qt(n)}>${o}${t}</svg>`;
|
|
172
|
+
}, er = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), nt = ({ svg: t, allyTitle: u, className: n, size: o = Jt, ...a }) => {
|
|
173
|
+
const e = Xt({
|
|
174
|
+
content: er(t.svg),
|
|
175
175
|
title: u
|
|
176
|
-
}), r =
|
|
176
|
+
}), r = Yt(we, `${we}--${o}`, n);
|
|
177
177
|
return /* @__PURE__ */ l("span", { className: r, dangerouslySetInnerHTML: { __html: e }, ...a });
|
|
178
178
|
};
|
|
179
|
-
|
|
180
|
-
const
|
|
179
|
+
nt.displayName = "Icon";
|
|
180
|
+
const tr = {
|
|
181
181
|
name: "checkmark",
|
|
182
182
|
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>',
|
|
183
183
|
keywords: ["checkmark"],
|
|
184
184
|
category: "utility"
|
|
185
|
-
},
|
|
186
|
-
|
|
187
|
-
function
|
|
185
|
+
}, it = (t) => /* @__PURE__ */ l(nt, { ...t, svg: tr });
|
|
186
|
+
it.displayName = "IconCheckmark";
|
|
187
|
+
function rr(t) {
|
|
188
188
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
189
189
|
}
|
|
190
|
-
var
|
|
191
|
-
function
|
|
192
|
-
return
|
|
190
|
+
var $e = { exports: {} }, Se;
|
|
191
|
+
function nr() {
|
|
192
|
+
return Se || (Se = 1, (function(t) {
|
|
193
193
|
(function() {
|
|
194
194
|
var u = {}.hasOwnProperty;
|
|
195
195
|
function n() {
|
|
@@ -218,10 +218,10 @@ function ur() {
|
|
|
218
218
|
}
|
|
219
219
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
220
220
|
})();
|
|
221
|
-
})(
|
|
221
|
+
})($e)), $e.exports;
|
|
222
222
|
}
|
|
223
|
-
var
|
|
224
|
-
const
|
|
223
|
+
var ir = nr();
|
|
224
|
+
const ur = /* @__PURE__ */ rr(ir), ar = {
|
|
225
225
|
"purpur-paragraph": "_purpur-paragraph_1vz75_1",
|
|
226
226
|
"purpur-paragraph--disabled": "_purpur-paragraph--disabled_1vz75_7",
|
|
227
227
|
"purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_1vz75_10",
|
|
@@ -237,26 +237,26 @@ const or = /* @__PURE__ */ ir(ar), pr = {
|
|
|
237
237
|
"purpur-paragraph--additional-100-bold": "_purpur-paragraph--additional-100-bold_1vz75_67",
|
|
238
238
|
"purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_1vz75_74",
|
|
239
239
|
"purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1vz75_82"
|
|
240
|
-
},
|
|
240
|
+
}, or = ur.bind(ar), pr = {
|
|
241
241
|
PARAGRAPH100: "paragraph-100"
|
|
242
|
-
}, Z = "purpur-paragraph",
|
|
242
|
+
}, Z = "purpur-paragraph", ut = ({
|
|
243
243
|
children: t,
|
|
244
244
|
className: u,
|
|
245
245
|
disabled: n,
|
|
246
246
|
enableHyphenation: o = !1,
|
|
247
247
|
negative: a = !1,
|
|
248
|
-
variant: e =
|
|
248
|
+
variant: e = pr.PARAGRAPH100,
|
|
249
249
|
...r
|
|
250
250
|
}) => {
|
|
251
|
-
const i =
|
|
251
|
+
const i = or(u, Z, `${Z}--${e}`, {
|
|
252
252
|
[`${Z}--hyphens`]: o,
|
|
253
253
|
[`${Z}--disabled`]: n,
|
|
254
254
|
[`${Z}--negative`]: a
|
|
255
255
|
});
|
|
256
256
|
return /* @__PURE__ */ l("p", { ...r, className: i, children: t });
|
|
257
257
|
};
|
|
258
|
-
|
|
259
|
-
const Ne =
|
|
258
|
+
ut.displayName = "Paragraph";
|
|
259
|
+
const Ne = tt.bind(rt), z = "purpur-listbox", oe = Y((t, u) => {
|
|
260
260
|
const {
|
|
261
261
|
disabled: n,
|
|
262
262
|
highlighted: o,
|
|
@@ -273,7 +273,7 @@ const Ne = rt.bind(nt), z = "purpur-listbox", pe = Y((t, u) => {
|
|
|
273
273
|
[`${z}-item--disabled`]: n,
|
|
274
274
|
[`${z}-item--noninteractive`]: d
|
|
275
275
|
});
|
|
276
|
-
return /* @__PURE__ */
|
|
276
|
+
return /* @__PURE__ */ O(
|
|
277
277
|
"li",
|
|
278
278
|
{
|
|
279
279
|
..._,
|
|
@@ -283,36 +283,36 @@ const Ne = rt.bind(nt), z = "purpur-listbox", pe = Y((t, u) => {
|
|
|
283
283
|
role: "option",
|
|
284
284
|
"aria-disabled": !!n,
|
|
285
285
|
children: [
|
|
286
|
-
typeof r == "string" ? /* @__PURE__ */ l(
|
|
287
|
-
e && /* @__PURE__ */ l(
|
|
286
|
+
typeof r == "string" ? /* @__PURE__ */ l(ut, { children: r }) : r,
|
|
287
|
+
e && /* @__PURE__ */ l(it, { size: "xs", className: Ne(`${z}-item__icon`) })
|
|
288
288
|
]
|
|
289
289
|
}
|
|
290
290
|
);
|
|
291
|
-
}),
|
|
292
|
-
|
|
293
|
-
const
|
|
291
|
+
}), lr = (t) => Qe(t) && t?.type === oe;
|
|
292
|
+
oe.displayName = "ListBoxItem";
|
|
293
|
+
const sr = tt.bind(rt), cr = "purpur-listbox", U = Y(
|
|
294
294
|
({ children: t, ...u }, n) => /* @__PURE__ */ l(
|
|
295
295
|
"ul",
|
|
296
296
|
{
|
|
297
297
|
...u,
|
|
298
298
|
ref: n,
|
|
299
|
-
className:
|
|
299
|
+
className: sr(cr, u.className),
|
|
300
300
|
role: "listbox",
|
|
301
|
-
children:
|
|
301
|
+
children: Ot.toArray(t).filter(lr)
|
|
302
302
|
}
|
|
303
303
|
)
|
|
304
304
|
);
|
|
305
|
-
U.Item =
|
|
305
|
+
U.Item = oe;
|
|
306
306
|
U.displayName = "ListBox";
|
|
307
|
-
const
|
|
307
|
+
const dr = {
|
|
308
308
|
LG: "lg"
|
|
309
309
|
};
|
|
310
|
-
function
|
|
310
|
+
function _r(t) {
|
|
311
311
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
312
312
|
}
|
|
313
|
-
var
|
|
314
|
-
function
|
|
315
|
-
return
|
|
313
|
+
var Oe = { exports: {} }, je;
|
|
314
|
+
function fr() {
|
|
315
|
+
return je || (je = 1, (function(t) {
|
|
316
316
|
(function() {
|
|
317
317
|
var u = {}.hasOwnProperty;
|
|
318
318
|
function n() {
|
|
@@ -341,33 +341,33 @@ function hr() {
|
|
|
341
341
|
}
|
|
342
342
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
343
343
|
})();
|
|
344
|
-
})(
|
|
344
|
+
})(Oe)), Oe.exports;
|
|
345
345
|
}
|
|
346
|
-
var
|
|
347
|
-
const
|
|
346
|
+
var hr = fr();
|
|
347
|
+
const vr = /* @__PURE__ */ _r(hr), gr = "_rotate_12t9p_1", mr = "_dash_12t9p_1", br = {
|
|
348
348
|
"purpur-spinner": "_purpur-spinner_12t9p_2",
|
|
349
|
-
rotate:
|
|
349
|
+
rotate: gr,
|
|
350
350
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_12t9p_6",
|
|
351
351
|
"purpur-spinner--xs": "_purpur-spinner--xs_12t9p_10",
|
|
352
352
|
"purpur-spinner--sm": "_purpur-spinner--sm_12t9p_14",
|
|
353
353
|
"purpur-spinner--md": "_purpur-spinner--md_12t9p_18",
|
|
354
354
|
"purpur-spinner--lg": "_purpur-spinner--lg_12t9p_22",
|
|
355
355
|
"purpur-spinner__circle": "_purpur-spinner__circle_12t9p_26",
|
|
356
|
-
dash:
|
|
356
|
+
dash: mr,
|
|
357
357
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_12t9p_41",
|
|
358
358
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_12t9p_44"
|
|
359
|
-
},
|
|
359
|
+
}, Ae = vr.bind(br), K = "purpur-spinner", yr = {
|
|
360
360
|
SM: "sm"
|
|
361
|
-
},
|
|
361
|
+
}, at = ({
|
|
362
362
|
disabled: t = !1,
|
|
363
363
|
negative: u = !1,
|
|
364
|
-
size: n =
|
|
364
|
+
size: n = yr.SM,
|
|
365
365
|
className: o,
|
|
366
366
|
...a
|
|
367
|
-
}) => /* @__PURE__ */ l("div", { className:
|
|
367
|
+
}) => /* @__PURE__ */ l("div", { className: Ae(K, `${K}--${n}`, o), ...a, children: /* @__PURE__ */ l("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ l(
|
|
368
368
|
"circle",
|
|
369
369
|
{
|
|
370
|
-
className:
|
|
370
|
+
className: Ae(`${K}__circle`, {
|
|
371
371
|
[`${K}__circle--disabled`]: t,
|
|
372
372
|
[`${K}__circle--negative`]: u
|
|
373
373
|
}),
|
|
@@ -376,13 +376,13 @@ const mr = /* @__PURE__ */ vr(gr), br = "_rotate_12t9p_1", yr = "_dash_12t9p_1",
|
|
|
376
376
|
r: "20"
|
|
377
377
|
}
|
|
378
378
|
) }) });
|
|
379
|
-
|
|
380
|
-
function
|
|
379
|
+
at.displayName = "Spinner";
|
|
380
|
+
function xr(t) {
|
|
381
381
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
382
382
|
}
|
|
383
|
-
var
|
|
384
|
-
function
|
|
385
|
-
return
|
|
383
|
+
var Ce = { exports: {} }, Pe;
|
|
384
|
+
function wr() {
|
|
385
|
+
return Pe || (Pe = 1, (function(t) {
|
|
386
386
|
(function() {
|
|
387
387
|
var u = {}.hasOwnProperty;
|
|
388
388
|
function n() {
|
|
@@ -411,10 +411,10 @@ function Sr() {
|
|
|
411
411
|
}
|
|
412
412
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
413
413
|
})();
|
|
414
|
-
})(
|
|
414
|
+
})(Ce)), Ce.exports;
|
|
415
415
|
}
|
|
416
|
-
var
|
|
417
|
-
const
|
|
416
|
+
var $r = wr();
|
|
417
|
+
const Sr = /* @__PURE__ */ xr($r), Nr = {
|
|
418
418
|
"purpur-button": "_purpur-button_10jh0_1",
|
|
419
419
|
"purpur-button--xs": "_purpur-button--xs_10jh0_22",
|
|
420
420
|
"purpur-button--icon-only": "_purpur-button--icon-only_10jh0_25",
|
|
@@ -437,7 +437,7 @@ const Nr = /* @__PURE__ */ $r(Or), jr = {
|
|
|
437
437
|
"purpur-button--text-negative": "_purpur-button--text-negative_10jh0_185",
|
|
438
438
|
"purpur-button--text": "_purpur-button--text_10jh0_185",
|
|
439
439
|
"purpur-button__spinner": "_purpur-button__spinner_10jh0_235"
|
|
440
|
-
},
|
|
440
|
+
}, Ie = Sr.bind(Nr), k = "purpur-button", ot = Y(
|
|
441
441
|
({
|
|
442
442
|
children: t,
|
|
443
443
|
className: u,
|
|
@@ -454,7 +454,7 @@ const Nr = /* @__PURE__ */ $r(Or), jr = {
|
|
|
454
454
|
}, C) => {
|
|
455
455
|
if (a && _ === "destructive")
|
|
456
456
|
return null;
|
|
457
|
-
const M =
|
|
457
|
+
const M = Ie(
|
|
458
458
|
[
|
|
459
459
|
k,
|
|
460
460
|
`${k}--${r ? `${_}-negative` : _}`,
|
|
@@ -467,26 +467,26 @@ const Nr = /* @__PURE__ */ $r(Or), jr = {
|
|
|
467
467
|
[`${k}--disabled`]: n || e
|
|
468
468
|
},
|
|
469
469
|
u
|
|
470
|
-
),
|
|
470
|
+
), v = (S) => {
|
|
471
471
|
n || e ? S.preventDefault() : i && i(S);
|
|
472
472
|
}, c = !!x["aria-disabled"] || n || e;
|
|
473
|
-
return /* @__PURE__ */
|
|
473
|
+
return /* @__PURE__ */ O(
|
|
474
474
|
"button",
|
|
475
475
|
{
|
|
476
476
|
className: M,
|
|
477
477
|
type: y,
|
|
478
478
|
ref: C,
|
|
479
479
|
"aria-disabled": c,
|
|
480
|
-
onClick:
|
|
480
|
+
onClick: v,
|
|
481
481
|
...x,
|
|
482
482
|
children: [
|
|
483
483
|
e && /* @__PURE__ */ l(
|
|
484
|
-
|
|
484
|
+
at,
|
|
485
485
|
{
|
|
486
|
-
size: d ===
|
|
486
|
+
size: d === dr.LG ? "xs" : "xxs",
|
|
487
487
|
negative: r,
|
|
488
488
|
disabled: c,
|
|
489
|
-
className:
|
|
489
|
+
className: Ie(`${k}__spinner`)
|
|
490
490
|
}
|
|
491
491
|
),
|
|
492
492
|
" ",
|
|
@@ -496,13 +496,13 @@ const Nr = /* @__PURE__ */ $r(Or), jr = {
|
|
|
496
496
|
);
|
|
497
497
|
}
|
|
498
498
|
);
|
|
499
|
-
|
|
500
|
-
function
|
|
499
|
+
ot.displayName = "Button";
|
|
500
|
+
function Or(t) {
|
|
501
501
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
502
502
|
}
|
|
503
|
-
var
|
|
504
|
-
function
|
|
505
|
-
return
|
|
503
|
+
var ke = { exports: {} }, Me;
|
|
504
|
+
function jr() {
|
|
505
|
+
return Me || (Me = 1, (function(t) {
|
|
506
506
|
(function() {
|
|
507
507
|
var u = {}.hasOwnProperty;
|
|
508
508
|
function n() {
|
|
@@ -531,10 +531,10 @@ function Cr() {
|
|
|
531
531
|
}
|
|
532
532
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
533
533
|
})();
|
|
534
|
-
})(
|
|
534
|
+
})(ke)), ke.exports;
|
|
535
535
|
}
|
|
536
|
-
var
|
|
537
|
-
const
|
|
536
|
+
var Ar = jr();
|
|
537
|
+
const Cr = /* @__PURE__ */ Or(Ar), Pr = {
|
|
538
538
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
539
539
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
540
540
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -542,34 +542,34 @@ const Ir = /* @__PURE__ */ Ar(Pr), kr = {
|
|
|
542
542
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
543
543
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
544
544
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
545
|
-
},
|
|
545
|
+
}, Ir = Cr.bind(Pr), Be = "purpur-icon", kr = "md", Mr = (t) => t.filter((u) => Object.keys(u).length >= 1).map((u) => `${u.name}="${u.value}"`).join(" "), Br = ({ content: t = "", title: u } = {}) => {
|
|
546
546
|
const n = [
|
|
547
547
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
548
548
|
{ name: "fill", value: "currentColor" },
|
|
549
549
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
550
550
|
u ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
551
551
|
], o = u ? `<title>${u}</title>` : "";
|
|
552
|
-
return `<svg ${
|
|
553
|
-
},
|
|
554
|
-
const e =
|
|
555
|
-
content:
|
|
552
|
+
return `<svg ${Mr(n)}>${o}${t}</svg>`;
|
|
553
|
+
}, qr = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), pt = ({ svg: t, allyTitle: u, className: n, size: o = kr, ...a }) => {
|
|
554
|
+
const e = Br({
|
|
555
|
+
content: qr(t.svg),
|
|
556
556
|
title: u
|
|
557
|
-
}), r =
|
|
557
|
+
}), r = Ir(Be, `${Be}--${o}`, n);
|
|
558
558
|
return /* @__PURE__ */ l("span", { className: r, dangerouslySetInnerHTML: { __html: e }, ...a });
|
|
559
559
|
};
|
|
560
|
-
|
|
561
|
-
const
|
|
560
|
+
pt.displayName = "Icon";
|
|
561
|
+
const Lr = {
|
|
562
562
|
name: "error-filled",
|
|
563
563
|
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>',
|
|
564
564
|
keywords: ["error-filled"],
|
|
565
565
|
category: "status"
|
|
566
566
|
};
|
|
567
|
-
function
|
|
567
|
+
function Rr(t) {
|
|
568
568
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
569
569
|
}
|
|
570
|
-
var
|
|
571
|
-
function
|
|
572
|
-
return
|
|
570
|
+
var qe = { exports: {} }, Le;
|
|
571
|
+
function zr() {
|
|
572
|
+
return Le || (Le = 1, (function(t) {
|
|
573
573
|
(function() {
|
|
574
574
|
var u = {}.hasOwnProperty;
|
|
575
575
|
function n() {
|
|
@@ -598,40 +598,40 @@ function Tr() {
|
|
|
598
598
|
}
|
|
599
599
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
600
600
|
})();
|
|
601
|
-
})(
|
|
601
|
+
})(qe)), qe.exports;
|
|
602
602
|
}
|
|
603
|
-
var
|
|
604
|
-
const
|
|
603
|
+
var Er = zr();
|
|
604
|
+
const Tr = /* @__PURE__ */ Rr(Er), Dr = {
|
|
605
605
|
"purpur-field-error-text": "_purpur-field-error-text_u1cy2_1",
|
|
606
606
|
"purpur-field-error-text--negative": "_purpur-field-error-text--negative_u1cy2_11",
|
|
607
607
|
"purpur-field-error-text__icon": "_purpur-field-error-text__icon_u1cy2_14"
|
|
608
|
-
},
|
|
608
|
+
}, Re = Tr.bind(Dr), ne = "purpur-field-error-text", Vr = ({
|
|
609
609
|
children: t,
|
|
610
610
|
className: u,
|
|
611
611
|
negative: n = !1,
|
|
612
612
|
["aria-relevant"]: o = "additions text",
|
|
613
613
|
...a
|
|
614
|
-
}) => /* @__PURE__ */
|
|
614
|
+
}) => /* @__PURE__ */ O(
|
|
615
615
|
"div",
|
|
616
616
|
{
|
|
617
|
-
className:
|
|
618
|
-
[`${
|
|
617
|
+
className: Re(u, ne, {
|
|
618
|
+
[`${ne}--negative`]: n
|
|
619
619
|
}),
|
|
620
620
|
"aria-live": "assertive",
|
|
621
621
|
"aria-relevant": o,
|
|
622
622
|
...a,
|
|
623
623
|
children: [
|
|
624
|
-
/* @__PURE__ */ l(
|
|
624
|
+
/* @__PURE__ */ l(pt, { svg: Lr, size: "xs", className: Re(`${ne}__icon`) }),
|
|
625
625
|
t
|
|
626
626
|
]
|
|
627
627
|
}
|
|
628
628
|
);
|
|
629
|
-
function
|
|
629
|
+
function Fr(t) {
|
|
630
630
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
631
631
|
}
|
|
632
|
-
var
|
|
633
|
-
function
|
|
634
|
-
return
|
|
632
|
+
var ze = { exports: {} }, Ee;
|
|
633
|
+
function Zr() {
|
|
634
|
+
return Ee || (Ee = 1, (function(t) {
|
|
635
635
|
(function() {
|
|
636
636
|
var u = {}.hasOwnProperty;
|
|
637
637
|
function n() {
|
|
@@ -660,14 +660,14 @@ function Hr() {
|
|
|
660
660
|
}
|
|
661
661
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
662
662
|
})();
|
|
663
|
-
})(
|
|
663
|
+
})(ze)), ze.exports;
|
|
664
664
|
}
|
|
665
|
-
var
|
|
666
|
-
const
|
|
665
|
+
var Kr = Zr();
|
|
666
|
+
const Hr = /* @__PURE__ */ Fr(Kr), Wr = {
|
|
667
667
|
"purpur-field-helper-text": "_purpur-field-helper-text_11nsh_1",
|
|
668
668
|
"purpur-field-helper-text--disabled": "_purpur-field-helper-text--disabled_11nsh_9",
|
|
669
669
|
"purpur-field-helper-text--negative": "_purpur-field-helper-text--negative_11nsh_12"
|
|
670
|
-
},
|
|
670
|
+
}, Gr = Hr.bind(Wr), ie = "purpur-field-helper-text", Ur = ({
|
|
671
671
|
children: t,
|
|
672
672
|
className: u,
|
|
673
673
|
disabled: n,
|
|
@@ -675,18 +675,18 @@ const Gr = /* @__PURE__ */ Kr(Wr), Ur = {
|
|
|
675
675
|
negative: a,
|
|
676
676
|
...e
|
|
677
677
|
}) => {
|
|
678
|
-
const r =
|
|
679
|
-
[`${
|
|
680
|
-
[`${
|
|
678
|
+
const r = Gr(u, ie, {
|
|
679
|
+
[`${ie}--disabled`]: n,
|
|
680
|
+
[`${ie}--negative`]: a
|
|
681
681
|
});
|
|
682
682
|
return /* @__PURE__ */ l("span", { id: o, className: r, ...e, children: t });
|
|
683
683
|
};
|
|
684
|
-
function
|
|
684
|
+
function Yr(t) {
|
|
685
685
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
686
686
|
}
|
|
687
|
-
var
|
|
688
|
-
function
|
|
689
|
-
return
|
|
687
|
+
var Te = { exports: {} }, De;
|
|
688
|
+
function Jr() {
|
|
689
|
+
return De || (De = 1, (function(t) {
|
|
690
690
|
(function() {
|
|
691
691
|
var u = {}.hasOwnProperty;
|
|
692
692
|
function n() {
|
|
@@ -715,10 +715,10 @@ function Xr() {
|
|
|
715
715
|
}
|
|
716
716
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
717
717
|
})();
|
|
718
|
-
})(
|
|
718
|
+
})(Te)), Te.exports;
|
|
719
719
|
}
|
|
720
|
-
var
|
|
721
|
-
const
|
|
720
|
+
var Qr = Jr();
|
|
721
|
+
const Xr = /* @__PURE__ */ Yr(Qr), en = {
|
|
722
722
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
723
723
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
724
724
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -726,95 +726,86 @@ const tn = /* @__PURE__ */ Qr(en), rn = {
|
|
|
726
726
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
727
727
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
728
728
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
729
|
-
},
|
|
729
|
+
}, tn = Xr.bind(en), Ve = "purpur-icon", rn = "md", nn = (t) => t.filter((u) => Object.keys(u).length >= 1).map((u) => `${u.name}="${u.value}"`).join(" "), un = ({ content: t = "", title: u } = {}) => {
|
|
730
730
|
const n = [
|
|
731
731
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
732
732
|
{ name: "fill", value: "currentColor" },
|
|
733
733
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
734
734
|
u ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
735
735
|
], o = u ? `<title>${u}</title>` : "";
|
|
736
|
-
return `<svg ${
|
|
737
|
-
},
|
|
738
|
-
const e =
|
|
739
|
-
content:
|
|
736
|
+
return `<svg ${nn(n)}>${o}${t}</svg>`;
|
|
737
|
+
}, an = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), pe = ({ svg: t, allyTitle: u, className: n, size: o = rn, ...a }) => {
|
|
738
|
+
const e = un({
|
|
739
|
+
content: an(t.svg),
|
|
740
740
|
title: u
|
|
741
|
-
}), r =
|
|
741
|
+
}), r = tn(Ve, `${Ve}--${o}`, n);
|
|
742
742
|
return /* @__PURE__ */ l("span", { className: r, dangerouslySetInnerHTML: { __html: e }, ...a });
|
|
743
743
|
};
|
|
744
|
-
|
|
745
|
-
const
|
|
744
|
+
pe.displayName = "Icon";
|
|
745
|
+
const on = {
|
|
746
746
|
name: "check-circle-filled",
|
|
747
747
|
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>',
|
|
748
748
|
keywords: ["check-circle-filled"],
|
|
749
749
|
category: "status"
|
|
750
|
-
},
|
|
751
|
-
|
|
752
|
-
const
|
|
750
|
+
}, lt = (t) => /* @__PURE__ */ l(pe, { ...t, svg: on });
|
|
751
|
+
lt.displayName = "IconCheckCircleFilled";
|
|
752
|
+
const pn = {
|
|
753
753
|
name: "close",
|
|
754
754
|
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>',
|
|
755
755
|
keywords: ["close"],
|
|
756
756
|
category: "utility"
|
|
757
|
-
},
|
|
758
|
-
|
|
759
|
-
function
|
|
757
|
+
}, st = (t) => /* @__PURE__ */ l(pe, { ...t, svg: pn });
|
|
758
|
+
st.displayName = "IconClose";
|
|
759
|
+
function Fe(t, u) {
|
|
760
760
|
if (typeof t == "function")
|
|
761
761
|
return t(u);
|
|
762
762
|
t != null && (t.current = u);
|
|
763
763
|
}
|
|
764
|
-
function
|
|
764
|
+
function ln(...t) {
|
|
765
765
|
return (u) => {
|
|
766
766
|
let n = !1;
|
|
767
767
|
const o = t.map((a) => {
|
|
768
|
-
const e =
|
|
768
|
+
const e = Fe(a, u);
|
|
769
769
|
return !n && typeof e == "function" && (n = !0), e;
|
|
770
770
|
});
|
|
771
771
|
if (n)
|
|
772
772
|
return () => {
|
|
773
773
|
for (let a = 0; a < o.length; a++) {
|
|
774
774
|
const e = o[a];
|
|
775
|
-
typeof e == "function" ? e() :
|
|
775
|
+
typeof e == "function" ? e() : Fe(t[a], null);
|
|
776
776
|
}
|
|
777
777
|
};
|
|
778
778
|
};
|
|
779
779
|
}
|
|
780
|
-
var dn = Symbol.for("react.lazy"), X = h[" use ".trim().toString()];
|
|
781
|
-
function _n(t) {
|
|
782
|
-
return typeof t == "object" && t !== null && "then" in t;
|
|
783
|
-
}
|
|
784
|
-
function dt(t) {
|
|
785
|
-
return t != null && typeof t == "object" && "$$typeof" in t && t.$$typeof === dn && "_payload" in t && _n(t._payload);
|
|
786
|
-
}
|
|
787
780
|
// @__NO_SIDE_EFFECTS__
|
|
788
|
-
function
|
|
789
|
-
const u = /* @__PURE__ */
|
|
790
|
-
|
|
791
|
-
dt(e) && typeof X == "function" && (e = X(e._payload));
|
|
792
|
-
const i = h.Children.toArray(e), d = i.find(gn);
|
|
781
|
+
function sn(t) {
|
|
782
|
+
const u = /* @__PURE__ */ cn(t), n = g.forwardRef((o, a) => {
|
|
783
|
+
const { children: e, ...r } = o, i = g.Children.toArray(e), d = i.find(_n);
|
|
793
784
|
if (d) {
|
|
794
|
-
const _ = d.props.children, y = i.map((x) => x === d ?
|
|
795
|
-
return /* @__PURE__ */ l(u, { ...r, ref: a, children:
|
|
785
|
+
const _ = d.props.children, y = i.map((x) => x === d ? g.Children.count(_) > 1 ? g.Children.only(null) : g.isValidElement(_) ? _.props.children : null : x);
|
|
786
|
+
return /* @__PURE__ */ l(u, { ...r, ref: a, children: g.isValidElement(_) ? g.cloneElement(_, void 0, y) : null });
|
|
796
787
|
}
|
|
797
788
|
return /* @__PURE__ */ l(u, { ...r, ref: a, children: e });
|
|
798
789
|
});
|
|
799
790
|
return n.displayName = `${t}.Slot`, n;
|
|
800
791
|
}
|
|
801
792
|
// @__NO_SIDE_EFFECTS__
|
|
802
|
-
function
|
|
803
|
-
const u =
|
|
804
|
-
|
|
805
|
-
if (
|
|
806
|
-
const r =
|
|
807
|
-
return a.type !==
|
|
793
|
+
function cn(t) {
|
|
794
|
+
const u = g.forwardRef((n, o) => {
|
|
795
|
+
const { children: a, ...e } = n;
|
|
796
|
+
if (g.isValidElement(a)) {
|
|
797
|
+
const r = hn(a), i = fn(e, a.props);
|
|
798
|
+
return a.type !== g.Fragment && (i.ref = o ? ln(o, r) : r), g.cloneElement(a, i);
|
|
808
799
|
}
|
|
809
|
-
return
|
|
800
|
+
return g.Children.count(a) > 1 ? g.Children.only(null) : null;
|
|
810
801
|
});
|
|
811
802
|
return u.displayName = `${t}.SlotClone`, u;
|
|
812
803
|
}
|
|
813
|
-
var
|
|
814
|
-
function
|
|
815
|
-
return
|
|
804
|
+
var dn = Symbol("radix.slottable");
|
|
805
|
+
function _n(t) {
|
|
806
|
+
return g.isValidElement(t) && typeof t.type == "function" && "__radixId" in t.type && t.type.__radixId === dn;
|
|
816
807
|
}
|
|
817
|
-
function
|
|
808
|
+
function fn(t, u) {
|
|
818
809
|
const n = { ...u };
|
|
819
810
|
for (const o in u) {
|
|
820
811
|
const a = t[o], e = u[o];
|
|
@@ -825,11 +816,11 @@ function mn(t, u) {
|
|
|
825
816
|
}
|
|
826
817
|
return { ...t, ...n };
|
|
827
818
|
}
|
|
828
|
-
function
|
|
819
|
+
function hn(t) {
|
|
829
820
|
let u = Object.getOwnPropertyDescriptor(t.props, "ref")?.get, n = u && "isReactWarning" in u && u.isReactWarning;
|
|
830
821
|
return n ? t.ref : (u = Object.getOwnPropertyDescriptor(t, "ref")?.get, n = u && "isReactWarning" in u && u.isReactWarning, n ? t.props.ref : t.props.ref || t.ref);
|
|
831
822
|
}
|
|
832
|
-
var
|
|
823
|
+
var vn = [
|
|
833
824
|
"a",
|
|
834
825
|
"button",
|
|
835
826
|
"div",
|
|
@@ -847,14 +838,14 @@ var yn = [
|
|
|
847
838
|
"span",
|
|
848
839
|
"svg",
|
|
849
840
|
"ul"
|
|
850
|
-
],
|
|
851
|
-
const n = /* @__PURE__ */
|
|
841
|
+
], gn = vn.reduce((t, u) => {
|
|
842
|
+
const n = /* @__PURE__ */ sn(`Primitive.${u}`), o = g.forwardRef((a, e) => {
|
|
852
843
|
const { asChild: r, ...i } = a, d = r ? n : u;
|
|
853
844
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ l(d, { ...i, ref: e });
|
|
854
845
|
});
|
|
855
846
|
return o.displayName = `Primitive.${u}`, { ...t, [u]: o };
|
|
856
|
-
}, {}),
|
|
857
|
-
|
|
847
|
+
}, {}), mn = "Label", ct = g.forwardRef((t, u) => /* @__PURE__ */ l(
|
|
848
|
+
gn.label,
|
|
858
849
|
{
|
|
859
850
|
...t,
|
|
860
851
|
ref: u,
|
|
@@ -863,14 +854,14 @@ var yn = [
|
|
|
863
854
|
}
|
|
864
855
|
}
|
|
865
856
|
));
|
|
866
|
-
|
|
867
|
-
var
|
|
868
|
-
function
|
|
857
|
+
ct.displayName = mn;
|
|
858
|
+
var bn = ct;
|
|
859
|
+
function yn(t) {
|
|
869
860
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
870
861
|
}
|
|
871
|
-
var
|
|
872
|
-
function
|
|
873
|
-
return
|
|
862
|
+
var Ze = { exports: {} }, Ke;
|
|
863
|
+
function xn() {
|
|
864
|
+
return Ke || (Ke = 1, (function(t) {
|
|
874
865
|
(function() {
|
|
875
866
|
var u = {}.hasOwnProperty;
|
|
876
867
|
function n() {
|
|
@@ -899,32 +890,32 @@ function On() {
|
|
|
899
890
|
}
|
|
900
891
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
901
892
|
})();
|
|
902
|
-
})(
|
|
893
|
+
})(Ze)), Ze.exports;
|
|
903
894
|
}
|
|
904
|
-
var
|
|
905
|
-
const
|
|
895
|
+
var wn = xn();
|
|
896
|
+
const $n = /* @__PURE__ */ yn(wn), Sn = {
|
|
906
897
|
"purpur-label": "_purpur-label_1x80u_1",
|
|
907
898
|
"purpur-label--negative": "_purpur-label--negative_1x80u_8",
|
|
908
899
|
"purpur-label--disabled": "_purpur-label--disabled_1x80u_11"
|
|
909
|
-
},
|
|
900
|
+
}, Nn = $n.bind(Sn), ue = "purpur-label", On = ({
|
|
910
901
|
children: t,
|
|
911
902
|
className: u,
|
|
912
903
|
disabled: n,
|
|
913
904
|
negative: o = !1,
|
|
914
905
|
...a
|
|
915
906
|
}) => {
|
|
916
|
-
const e =
|
|
917
|
-
[`${
|
|
918
|
-
[`${
|
|
907
|
+
const e = Nn(u, ue, {
|
|
908
|
+
[`${ue}--disabled`]: n,
|
|
909
|
+
[`${ue}--negative`]: o
|
|
919
910
|
});
|
|
920
|
-
return /* @__PURE__ */ l(
|
|
911
|
+
return /* @__PURE__ */ l(bn, { className: e, ...a, children: t });
|
|
921
912
|
};
|
|
922
|
-
function
|
|
913
|
+
function jn(t) {
|
|
923
914
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
924
915
|
}
|
|
925
|
-
var
|
|
926
|
-
function
|
|
927
|
-
return
|
|
916
|
+
var He = { exports: {} }, We;
|
|
917
|
+
function An() {
|
|
918
|
+
return We || (We = 1, (function(t) {
|
|
928
919
|
(function() {
|
|
929
920
|
var u = {}.hasOwnProperty;
|
|
930
921
|
function n() {
|
|
@@ -953,33 +944,33 @@ function kn() {
|
|
|
953
944
|
}
|
|
954
945
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
955
946
|
})();
|
|
956
|
-
})(
|
|
947
|
+
})(He)), He.exports;
|
|
957
948
|
}
|
|
958
|
-
var
|
|
959
|
-
const
|
|
949
|
+
var Cn = An();
|
|
950
|
+
const Pn = /* @__PURE__ */ jn(Cn), In = "_rotate_12t9p_1", kn = "_dash_12t9p_1", Mn = {
|
|
960
951
|
"purpur-spinner": "_purpur-spinner_12t9p_2",
|
|
961
|
-
rotate:
|
|
952
|
+
rotate: In,
|
|
962
953
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_12t9p_6",
|
|
963
954
|
"purpur-spinner--xs": "_purpur-spinner--xs_12t9p_10",
|
|
964
955
|
"purpur-spinner--sm": "_purpur-spinner--sm_12t9p_14",
|
|
965
956
|
"purpur-spinner--md": "_purpur-spinner--md_12t9p_18",
|
|
966
957
|
"purpur-spinner--lg": "_purpur-spinner--lg_12t9p_22",
|
|
967
958
|
"purpur-spinner__circle": "_purpur-spinner__circle_12t9p_26",
|
|
968
|
-
dash:
|
|
959
|
+
dash: kn,
|
|
969
960
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_12t9p_41",
|
|
970
961
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_12t9p_44"
|
|
971
|
-
},
|
|
962
|
+
}, Ge = Pn.bind(Mn), H = "purpur-spinner", Bn = {
|
|
972
963
|
SM: "sm"
|
|
973
|
-
},
|
|
964
|
+
}, dt = ({
|
|
974
965
|
disabled: t = !1,
|
|
975
966
|
negative: u = !1,
|
|
976
|
-
size: n =
|
|
967
|
+
size: n = Bn.SM,
|
|
977
968
|
className: o,
|
|
978
969
|
...a
|
|
979
|
-
}) => /* @__PURE__ */ l("div", { className:
|
|
970
|
+
}) => /* @__PURE__ */ l("div", { className: Ge(H, `${H}--${n}`, o), ...a, children: /* @__PURE__ */ l("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ l(
|
|
980
971
|
"circle",
|
|
981
972
|
{
|
|
982
|
-
className:
|
|
973
|
+
className: Ge(`${H}__circle`, {
|
|
983
974
|
[`${H}__circle--disabled`]: t,
|
|
984
975
|
[`${H}__circle--negative`]: u
|
|
985
976
|
}),
|
|
@@ -988,13 +979,13 @@ const Bn = /* @__PURE__ */ In(Mn), qn = "_rotate_12t9p_1", Ln = "_dash_12t9p_1",
|
|
|
988
979
|
r: "20"
|
|
989
980
|
}
|
|
990
981
|
) }) });
|
|
991
|
-
|
|
992
|
-
function
|
|
982
|
+
dt.displayName = "Spinner";
|
|
983
|
+
function qn(t) {
|
|
993
984
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
994
985
|
}
|
|
995
|
-
var
|
|
996
|
-
function
|
|
997
|
-
return
|
|
986
|
+
var Ue = { exports: {} }, Ye;
|
|
987
|
+
function Ln() {
|
|
988
|
+
return Ye || (Ye = 1, (function(t) {
|
|
998
989
|
(function() {
|
|
999
990
|
var u = {}.hasOwnProperty;
|
|
1000
991
|
function n() {
|
|
@@ -1023,31 +1014,31 @@ function Tn() {
|
|
|
1023
1014
|
}
|
|
1024
1015
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
1025
1016
|
})();
|
|
1026
|
-
})(
|
|
1017
|
+
})(Ue)), Ue.exports;
|
|
1027
1018
|
}
|
|
1028
|
-
var
|
|
1029
|
-
const
|
|
1030
|
-
"purpur-text-field": "_purpur-text-
|
|
1031
|
-
"purpur-text-field__label": "_purpur-text-
|
|
1032
|
-
"purpur-text-field__label-text": "_purpur-text-field__label-
|
|
1033
|
-
"purpur-text-field__field-row": "_purpur-text-field__field-
|
|
1034
|
-
"purpur-text-field__frame": "_purpur-text-
|
|
1035
|
-
"purpur-text-field__frame--negative": "_purpur-text-field__frame--
|
|
1036
|
-
"purpur-text-field__input-container": "_purpur-text-field__input-
|
|
1037
|
-
"purpur-text-field__input-container--disabled": "_purpur-text-field__input-container--
|
|
1038
|
-
"purpur-text-field__input-container--readonly": "_purpur-text-field__input-container--
|
|
1039
|
-
"purpur-text-field__input-container--has-clear-button": "_purpur-text-field__input-container--has-clear-
|
|
1040
|
-
"purpur-text-field__input-container--end-adornment": "_purpur-text-field__input-container--end-
|
|
1041
|
-
"purpur-text-field__input": "_purpur-text-
|
|
1042
|
-
"purpur-text-field__input-container--start-adornment": "_purpur-text-field__input-container--start-
|
|
1043
|
-
"purpur-text-field__input-container--negative": "_purpur-text-field__input-container--
|
|
1044
|
-
"purpur-text-field__input--valid": "_purpur-text-field__input--
|
|
1045
|
-
"purpur-text-field__input--error": "_purpur-text-field__input--
|
|
1046
|
-
"purpur-text-field__input--negative": "_purpur-text-field__input--
|
|
1047
|
-
"purpur-text-field__adornment-container": "_purpur-text-field__adornment-
|
|
1048
|
-
"purpur-text-field__valid-icon": "_purpur-text-field__valid-
|
|
1049
|
-
"purpur-text-field__valid-icon--negative": "_purpur-text-field__valid-icon--
|
|
1050
|
-
},
|
|
1019
|
+
var Rn = Ln();
|
|
1020
|
+
const zn = /* @__PURE__ */ qn(Rn), En = {
|
|
1021
|
+
"purpur-text-field": "_purpur-text-field_h2fch_1",
|
|
1022
|
+
"purpur-text-field__label": "_purpur-text-field__label_h2fch_7",
|
|
1023
|
+
"purpur-text-field__label-text": "_purpur-text-field__label-text_h2fch_12",
|
|
1024
|
+
"purpur-text-field__field-row": "_purpur-text-field__field-row_h2fch_15",
|
|
1025
|
+
"purpur-text-field__frame": "_purpur-text-field__frame_h2fch_19",
|
|
1026
|
+
"purpur-text-field__frame--negative": "_purpur-text-field__frame--negative_h2fch_26",
|
|
1027
|
+
"purpur-text-field__input-container": "_purpur-text-field__input-container_h2fch_29",
|
|
1028
|
+
"purpur-text-field__input-container--disabled": "_purpur-text-field__input-container--disabled_h2fch_40",
|
|
1029
|
+
"purpur-text-field__input-container--readonly": "_purpur-text-field__input-container--readonly_h2fch_43",
|
|
1030
|
+
"purpur-text-field__input-container--has-clear-button": "_purpur-text-field__input-container--has-clear-button_h2fch_46",
|
|
1031
|
+
"purpur-text-field__input-container--end-adornment": "_purpur-text-field__input-container--end-adornment_h2fch_49",
|
|
1032
|
+
"purpur-text-field__input": "_purpur-text-field__input_h2fch_29",
|
|
1033
|
+
"purpur-text-field__input-container--start-adornment": "_purpur-text-field__input-container--start-adornment_h2fch_55",
|
|
1034
|
+
"purpur-text-field__input-container--negative": "_purpur-text-field__input-container--negative_h2fch_61",
|
|
1035
|
+
"purpur-text-field__input--valid": "_purpur-text-field__input--valid_h2fch_109",
|
|
1036
|
+
"purpur-text-field__input--error": "_purpur-text-field__input--error_h2fch_109",
|
|
1037
|
+
"purpur-text-field__input--negative": "_purpur-text-field__input--negative_h2fch_127",
|
|
1038
|
+
"purpur-text-field__adornment-container": "_purpur-text-field__adornment-container_h2fch_140",
|
|
1039
|
+
"purpur-text-field__valid-icon": "_purpur-text-field__valid-icon_h2fch_145",
|
|
1040
|
+
"purpur-text-field__valid-icon--negative": "_purpur-text-field__valid-icon--negative_h2fch_148"
|
|
1041
|
+
}, Tn = (t) => G(t), A = zn.bind(En), f = "purpur-text-field", _t = Y(
|
|
1051
1042
|
({
|
|
1052
1043
|
["data-testid"]: t,
|
|
1053
1044
|
className: u,
|
|
@@ -1063,44 +1054,44 @@ const Vn = /* @__PURE__ */ En(Dn), Fn = {
|
|
|
1063
1054
|
onClear: x,
|
|
1064
1055
|
startAdornment: C,
|
|
1065
1056
|
valid: M = !1,
|
|
1066
|
-
negative:
|
|
1057
|
+
negative: v = !1,
|
|
1067
1058
|
...c
|
|
1068
1059
|
}, S) => {
|
|
1069
|
-
const
|
|
1060
|
+
const N = jt(), s = c.id ?? N, m = (w) => t ? `${t}-${w}` : void 0, P = M && !r, B = i ? `${s}-helper-text` : void 0, E = [C].filter((w) => !!w), b = (typeof c.value == "number" ? c.value !== void 0 : c.value?.length) && !c.disabled && !c.readOnly && !y && x && n, j = Tn(null), T = (w) => {
|
|
1070
1061
|
j.current = w, typeof S == "function" ? S(w) : S && (S.current = w);
|
|
1071
1062
|
}, J = () => {
|
|
1072
1063
|
x?.(), j.current?.focus();
|
|
1073
1064
|
}, q = [
|
|
1074
1065
|
y && /* @__PURE__ */ l(
|
|
1075
|
-
|
|
1066
|
+
dt,
|
|
1076
1067
|
{
|
|
1077
1068
|
disabled: c.disabled,
|
|
1078
1069
|
size: "xs",
|
|
1079
1070
|
"data-testid": m("spinner"),
|
|
1080
|
-
negative:
|
|
1071
|
+
negative: v
|
|
1081
1072
|
},
|
|
1082
1073
|
"spinner"
|
|
1083
1074
|
),
|
|
1084
1075
|
b && /* @__PURE__ */ l(
|
|
1085
|
-
|
|
1076
|
+
ot,
|
|
1086
1077
|
{
|
|
1087
|
-
negative:
|
|
1078
|
+
negative: v,
|
|
1088
1079
|
variant: "tertiary-purple",
|
|
1089
1080
|
onClick: J,
|
|
1090
1081
|
iconOnly: !0,
|
|
1091
1082
|
"aria-label": n ?? "",
|
|
1092
1083
|
"data-testid": m("clear-button"),
|
|
1093
1084
|
tabIndex: -1,
|
|
1094
|
-
children: /* @__PURE__ */ l(
|
|
1085
|
+
children: /* @__PURE__ */ l(st, { size: "xs" })
|
|
1095
1086
|
},
|
|
1096
1087
|
"clear-button"
|
|
1097
1088
|
),
|
|
1098
1089
|
P && /* @__PURE__ */ l(
|
|
1099
|
-
|
|
1090
|
+
lt,
|
|
1100
1091
|
{
|
|
1101
1092
|
"data-testid": m("valid-icon"),
|
|
1102
1093
|
className: A(`${f}__valid-icon`, {
|
|
1103
|
-
[`${f}__valid-icon--negative`]:
|
|
1094
|
+
[`${f}__valid-icon--negative`]: v
|
|
1104
1095
|
})
|
|
1105
1096
|
},
|
|
1106
1097
|
"valid-icon"
|
|
@@ -1111,26 +1102,26 @@ const Vn = /* @__PURE__ */ En(Dn), Fn = {
|
|
|
1111
1102
|
[`${f}__input-container--disabled`]: c.disabled,
|
|
1112
1103
|
[`${f}__input-container--has-clear-button`]: b,
|
|
1113
1104
|
[`${f}__input-container--readonly`]: c.readOnly && !c.disabled,
|
|
1114
|
-
[`${f}__input-container--negative`]:
|
|
1105
|
+
[`${f}__input-container--negative`]: v
|
|
1115
1106
|
});
|
|
1116
|
-
return /* @__PURE__ */
|
|
1117
|
-
_ && /* @__PURE__ */
|
|
1118
|
-
|
|
1107
|
+
return /* @__PURE__ */ O("div", { className: A(u, f), children: [
|
|
1108
|
+
_ && /* @__PURE__ */ O(
|
|
1109
|
+
On,
|
|
1119
1110
|
{
|
|
1120
1111
|
htmlFor: s,
|
|
1121
1112
|
className: A(`${f}__label`),
|
|
1122
1113
|
"data-testid": m("label"),
|
|
1123
1114
|
disabled: c.disabled,
|
|
1124
|
-
negative:
|
|
1115
|
+
negative: v,
|
|
1125
1116
|
children: [
|
|
1126
1117
|
c.required && !d && /* @__PURE__ */ l("span", { "aria-hidden": !0, children: "*" }),
|
|
1127
1118
|
_
|
|
1128
1119
|
]
|
|
1129
1120
|
}
|
|
1130
1121
|
),
|
|
1131
|
-
/* @__PURE__ */
|
|
1122
|
+
/* @__PURE__ */ O("div", { className: A(`${f}__field-row`), children: [
|
|
1132
1123
|
!!o && o,
|
|
1133
|
-
/* @__PURE__ */
|
|
1124
|
+
/* @__PURE__ */ O("div", { className: D, children: [
|
|
1134
1125
|
!!E.length && /* @__PURE__ */ l(
|
|
1135
1126
|
"div",
|
|
1136
1127
|
{
|
|
@@ -1153,7 +1144,7 @@ const Vn = /* @__PURE__ */ En(Dn), Fn = {
|
|
|
1153
1144
|
{
|
|
1154
1145
|
[`${f}__input--valid`]: P,
|
|
1155
1146
|
[`${f}__input--error`]: !!r,
|
|
1156
|
-
[`${f}__input--negative`]:
|
|
1147
|
+
[`${f}__input--negative`]: v
|
|
1157
1148
|
}
|
|
1158
1149
|
])
|
|
1159
1150
|
}
|
|
@@ -1162,11 +1153,11 @@ const Vn = /* @__PURE__ */ En(Dn), Fn = {
|
|
|
1162
1153
|
"div",
|
|
1163
1154
|
{
|
|
1164
1155
|
className: A(`${f}__frame`, {
|
|
1165
|
-
[`${f}__frame--negative`]:
|
|
1156
|
+
[`${f}__frame--negative`]: v
|
|
1166
1157
|
})
|
|
1167
1158
|
}
|
|
1168
1159
|
),
|
|
1169
|
-
(!!q.length || e) && /* @__PURE__ */
|
|
1160
|
+
(!!q.length || e) && /* @__PURE__ */ O(
|
|
1170
1161
|
"div",
|
|
1171
1162
|
{
|
|
1172
1163
|
"data-testid": m("end-adornments"),
|
|
@@ -1181,27 +1172,28 @@ const Vn = /* @__PURE__ */ En(Dn), Fn = {
|
|
|
1181
1172
|
!!a && a
|
|
1182
1173
|
] }),
|
|
1183
1174
|
B && /* @__PURE__ */ l(
|
|
1184
|
-
|
|
1175
|
+
Ur,
|
|
1185
1176
|
{
|
|
1186
1177
|
"data-testid": m("helper-text"),
|
|
1187
1178
|
id: B,
|
|
1188
|
-
negative:
|
|
1179
|
+
negative: v,
|
|
1180
|
+
disabled: c.disabled,
|
|
1189
1181
|
children: i
|
|
1190
1182
|
}
|
|
1191
1183
|
),
|
|
1192
|
-
r && /* @__PURE__ */ l(
|
|
1184
|
+
r && /* @__PURE__ */ l(Vr, { "data-testid": m("error-text"), negative: v, children: r })
|
|
1193
1185
|
] });
|
|
1194
1186
|
}
|
|
1195
1187
|
);
|
|
1196
|
-
|
|
1197
|
-
const
|
|
1198
|
-
function
|
|
1188
|
+
_t.displayName = "TextField";
|
|
1189
|
+
const Dn = (t) => Qe(t) && t.type.displayName === _t.displayName;
|
|
1190
|
+
function Vn(t) {
|
|
1199
1191
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
1200
1192
|
}
|
|
1201
|
-
var
|
|
1202
|
-
var
|
|
1203
|
-
function
|
|
1204
|
-
return
|
|
1193
|
+
var ae = { exports: {} };
|
|
1194
|
+
var Je;
|
|
1195
|
+
function Fn() {
|
|
1196
|
+
return Je || (Je = 1, (function(t) {
|
|
1205
1197
|
(function() {
|
|
1206
1198
|
var u = {}.hasOwnProperty;
|
|
1207
1199
|
function n() {
|
|
@@ -1230,26 +1222,26 @@ function Wn() {
|
|
|
1230
1222
|
}
|
|
1231
1223
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
1232
1224
|
})();
|
|
1233
|
-
})(
|
|
1225
|
+
})(ae)), ae.exports;
|
|
1234
1226
|
}
|
|
1235
|
-
var
|
|
1236
|
-
const
|
|
1227
|
+
var Zn = Fn();
|
|
1228
|
+
const Kn = /* @__PURE__ */ Vn(Zn), Hn = {
|
|
1237
1229
|
"purpur-autocomplete": "_purpur-autocomplete_1u8x6_1",
|
|
1238
1230
|
"purpur-autocomplete__listbox": "_purpur-autocomplete__listbox_1u8x6_4",
|
|
1239
1231
|
"purpur-autocomplete__chevron-button": "_purpur-autocomplete__chevron-button_1u8x6_9",
|
|
1240
1232
|
"purpur-autocomplete__chevron-icon": "_purpur-autocomplete__chevron-icon_1u8x6_15",
|
|
1241
1233
|
"purpur-autocomplete__chevron-icon--up": "_purpur-autocomplete__chevron-icon--up_1u8x6_19"
|
|
1242
|
-
},
|
|
1243
|
-
const n =
|
|
1234
|
+
}, Wn = (t) => G(t), Gn = (t, u) => {
|
|
1235
|
+
const n = At(
|
|
1244
1236
|
(o) => {
|
|
1245
1237
|
t && !t.contains(o.target) && u();
|
|
1246
1238
|
},
|
|
1247
1239
|
[u, t]
|
|
1248
1240
|
);
|
|
1249
|
-
|
|
1241
|
+
Ct(() => (document.addEventListener("mousedown", n), () => {
|
|
1250
1242
|
document.removeEventListener("mousedown", n);
|
|
1251
1243
|
}), [n]);
|
|
1252
|
-
},
|
|
1244
|
+
}, Un = ({
|
|
1253
1245
|
combobox: t,
|
|
1254
1246
|
comboboxButtonAriaLabel: u,
|
|
1255
1247
|
highlightFirstOption: n,
|
|
@@ -1264,63 +1256,63 @@ const Un = /* @__PURE__ */ Hn(Gn), Yn = {
|
|
|
1264
1256
|
onInputFocus: x,
|
|
1265
1257
|
onInputKeyDown: C,
|
|
1266
1258
|
onInputMouseDown: M,
|
|
1267
|
-
openOnFocus:
|
|
1259
|
+
openOnFocus: v,
|
|
1268
1260
|
noOptionsText: c,
|
|
1269
1261
|
onSelect: S,
|
|
1270
|
-
options:
|
|
1262
|
+
options: N,
|
|
1271
1263
|
selectedOption: s,
|
|
1272
1264
|
["data-testid"]: m
|
|
1273
1265
|
}) => {
|
|
1274
|
-
const [P, B] =
|
|
1266
|
+
const [P, B] = re(
|
|
1275
1267
|
((typeof a == "string" ? a : o) || s?.label) ?? ""
|
|
1276
|
-
), E = typeof a == "string" ? a : P, [b, j] =
|
|
1277
|
-
function
|
|
1268
|
+
), E = typeof a == "string" ? a : P, [b, j] = re(n ? N[0] : void 0), T = G(null), J = Wn(null), q = G(null), D = G({}), [w, le] = re(!1);
|
|
1269
|
+
function X(p) {
|
|
1278
1270
|
return m ? `${m}-${p}` : void 0;
|
|
1279
1271
|
}
|
|
1280
1272
|
const V = () => {
|
|
1281
|
-
|
|
1273
|
+
le(!1), j(void 0);
|
|
1282
1274
|
};
|
|
1283
|
-
|
|
1275
|
+
Gn(J.current, V);
|
|
1284
1276
|
const F = ({ eventType: p }) => {
|
|
1285
|
-
|
|
1286
|
-
j({ ...s, isSetByClickEvent: p === "CLICK" }),
|
|
1277
|
+
le(!0), s && requestAnimationFrame(() => {
|
|
1278
|
+
j({ ...s, isSetByClickEvent: p === "CLICK" }), te(D.current[s.id]);
|
|
1287
1279
|
});
|
|
1288
|
-
},
|
|
1280
|
+
}, ft = (p) => {
|
|
1289
1281
|
if (e)
|
|
1290
|
-
return
|
|
1282
|
+
return N.filter(($) => e(p, $));
|
|
1291
1283
|
if (!p)
|
|
1292
|
-
return
|
|
1293
|
-
const
|
|
1294
|
-
return
|
|
1295
|
-
($) =>
|
|
1284
|
+
return N;
|
|
1285
|
+
const h = p.toUpperCase().split(" ") || [];
|
|
1286
|
+
return N.filter(
|
|
1287
|
+
($) => h.every(
|
|
1296
1288
|
(R) => ($.value || $.label).toUpperCase().includes(R)
|
|
1297
1289
|
)
|
|
1298
1290
|
);
|
|
1299
|
-
},
|
|
1291
|
+
}, se = (p) => s && s?.label === p ? N : ft(p), I = se(E), ee = (p) => {
|
|
1300
1292
|
y?.(p), B(p);
|
|
1301
|
-
},
|
|
1293
|
+
}, te = (p) => {
|
|
1302
1294
|
if (p) {
|
|
1303
|
-
const
|
|
1304
|
-
(
|
|
1295
|
+
const h = p.getBoundingClientRect(), $ = q.current?.getBoundingClientRect() || { top: 0, bottom: 0 };
|
|
1296
|
+
(h.top < $.top || h.bottom > $.bottom) && p.scrollIntoView({ block: "nearest" });
|
|
1305
1297
|
}
|
|
1306
|
-
},
|
|
1307
|
-
p && (T.current?.focus(),
|
|
1308
|
-
},
|
|
1309
|
-
const
|
|
1310
|
-
return p === "ArrowDown" ? I[(
|
|
1311
|
-
}, L = w && (!!I.length || !!c),
|
|
1298
|
+
}, ce = (p) => {
|
|
1299
|
+
p && (T.current?.focus(), ee(p.label), S?.(p)), V();
|
|
1300
|
+
}, ht = (p) => {
|
|
1301
|
+
const h = n && !b ? 0 : I.findIndex((R) => R && b?.id === R.id), $ = I.length;
|
|
1302
|
+
return p === "ArrowDown" ? I[(h ?? -1) + 1] || I[0] : I[(h ?? $) - 1] || I[$ - 1];
|
|
1303
|
+
}, L = w && (!!I.length || !!c), vt = (p) => {
|
|
1312
1304
|
!L && F({ eventType: "KEYBOARD" });
|
|
1313
|
-
const
|
|
1314
|
-
j(
|
|
1315
|
-
},
|
|
1305
|
+
const h = ht(p);
|
|
1306
|
+
j(h), h && te(D.current[h.id]);
|
|
1307
|
+
}, gt = (p) => {
|
|
1316
1308
|
switch (C?.(p), p.key) {
|
|
1317
1309
|
case "ArrowUp":
|
|
1318
1310
|
case "ArrowDown":
|
|
1319
|
-
p.preventDefault(),
|
|
1311
|
+
p.preventDefault(), vt(p.key);
|
|
1320
1312
|
break;
|
|
1321
1313
|
case "Enter": {
|
|
1322
|
-
const
|
|
1323
|
-
L &&
|
|
1314
|
+
const h = b || (n ? N[0] : void 0);
|
|
1315
|
+
L && ce(h), !L && F({ eventType: "KEYBOARD" });
|
|
1324
1316
|
break;
|
|
1325
1317
|
}
|
|
1326
1318
|
case "Escape":
|
|
@@ -1328,37 +1320,37 @@ const Un = /* @__PURE__ */ Hn(Gn), Yn = {
|
|
|
1328
1320
|
V();
|
|
1329
1321
|
break;
|
|
1330
1322
|
}
|
|
1323
|
+
}, mt = (p) => {
|
|
1324
|
+
const h = se(p.target.value);
|
|
1325
|
+
ee(p.target.value), j(void 0), !L && F({ eventType: "KEYBOARD" }), n && h[0] && te(D.current[h[0].id]);
|
|
1326
|
+
}, bt = (p) => {
|
|
1327
|
+
M?.(p), L ? V() : F({ eventType: "CLICK" });
|
|
1331
1328
|
}, yt = (p) => {
|
|
1332
|
-
|
|
1333
|
-
te(p.target.value), j(void 0), !L && F({ eventType: "KEYBOARD" }), n && v[0] && re(D.current[v[0].id]);
|
|
1329
|
+
x?.(p), !w && v && F({ eventType: "KEYBOARD" }), T.current?.select();
|
|
1334
1330
|
}, xt = (p) => {
|
|
1335
|
-
M?.(p), L ? V() : F({ eventType: "CLICK" });
|
|
1336
|
-
}, wt = (p) => {
|
|
1337
|
-
x?.(p), !w && g && F({ eventType: "KEYBOARD" }), T.current?.select();
|
|
1338
|
-
}, $t = (p) => {
|
|
1339
1331
|
_?.(p), setTimeout(() => {
|
|
1340
|
-
!T.current?.contains(document.activeElement) && !q.current?.contains(document.activeElement) && (V(), t &&
|
|
1332
|
+
!T.current?.contains(document.activeElement) && !q.current?.contains(document.activeElement) && (V(), t && ee(s ? s.label : ""));
|
|
1341
1333
|
});
|
|
1342
|
-
},
|
|
1334
|
+
}, wt = {
|
|
1343
1335
|
maxHeight: typeof d == "number" ? `${d}px` : d
|
|
1344
|
-
},
|
|
1336
|
+
}, de = {
|
|
1345
1337
|
"aria-label": i,
|
|
1346
1338
|
"aria-expanded": L,
|
|
1347
|
-
"data-testid":
|
|
1339
|
+
"data-testid": X("listbox"),
|
|
1348
1340
|
id: `${r}-listbox`,
|
|
1349
1341
|
ref: q,
|
|
1350
1342
|
onMouseLeave: () => j(void 0),
|
|
1351
|
-
style: d ?
|
|
1352
|
-
},
|
|
1353
|
-
const $ = () => p.id !== b?.id && j({ ...p, isSetByClickEvent: !0 }), R = (p.id === b?.id || !!n && !b &&
|
|
1343
|
+
style: d ? wt : void 0
|
|
1344
|
+
}, _e = (p) => `${r}-listbox-item-${p.id}`, $t = (p, h) => {
|
|
1345
|
+
const $ = () => p.id !== b?.id && j({ ...p, isSetByClickEvent: !0 }), R = (p.id === b?.id || !!n && !b && h === 0) && !b?.isSetByClickEvent;
|
|
1354
1346
|
return {
|
|
1355
|
-
"data-testid":
|
|
1356
|
-
id:
|
|
1347
|
+
"data-testid": X(`listbox-item-${p.id}`),
|
|
1348
|
+
id: _e(p),
|
|
1357
1349
|
key: p.id,
|
|
1358
1350
|
onMouseMove: $,
|
|
1359
|
-
onMouseUp: () =>
|
|
1360
|
-
ref: (
|
|
1361
|
-
|
|
1351
|
+
onMouseUp: () => ce(p),
|
|
1352
|
+
ref: (fe) => {
|
|
1353
|
+
fe && (D.current[p.id] = fe);
|
|
1362
1354
|
},
|
|
1363
1355
|
tabIndex: -1,
|
|
1364
1356
|
selected: p.id === s?.id,
|
|
@@ -1366,35 +1358,35 @@ const Un = /* @__PURE__ */ Hn(Gn), Yn = {
|
|
|
1366
1358
|
highlighted: R,
|
|
1367
1359
|
hovered: p.id === b?.id && !!b?.isSetByClickEvent
|
|
1368
1360
|
};
|
|
1369
|
-
},
|
|
1370
|
-
"aria-activedescendant": b ?
|
|
1361
|
+
}, St = {
|
|
1362
|
+
"aria-activedescendant": b ? _e(b) : void 0,
|
|
1371
1363
|
"aria-autocomplete": "list",
|
|
1372
|
-
"aria-controls":
|
|
1373
|
-
"data-testid":
|
|
1364
|
+
"aria-controls": de.id,
|
|
1365
|
+
"data-testid": X("input"),
|
|
1374
1366
|
autoComplete: "off",
|
|
1375
1367
|
id: `${r}-input`,
|
|
1376
|
-
onChange:
|
|
1377
|
-
onMouseDown:
|
|
1378
|
-
onFocus:
|
|
1379
|
-
onKeyDown:
|
|
1380
|
-
onBlur:
|
|
1368
|
+
onChange: mt,
|
|
1369
|
+
onMouseDown: bt,
|
|
1370
|
+
onFocus: yt,
|
|
1371
|
+
onKeyDown: gt,
|
|
1372
|
+
onBlur: xt,
|
|
1381
1373
|
ref: T,
|
|
1382
1374
|
role: "combobox",
|
|
1383
1375
|
value: E
|
|
1384
1376
|
};
|
|
1385
1377
|
return {
|
|
1386
1378
|
id: r,
|
|
1387
|
-
inputProps:
|
|
1379
|
+
inputProps: St,
|
|
1388
1380
|
internalRef: J,
|
|
1389
1381
|
optionsToShow: I,
|
|
1390
1382
|
showListbox: L,
|
|
1391
1383
|
noOptionsText: c,
|
|
1392
1384
|
combobox: t,
|
|
1393
1385
|
comboboxButtonAriaLabel: u,
|
|
1394
|
-
getListBoxItemProps:
|
|
1395
|
-
listboxProps:
|
|
1386
|
+
getListBoxItemProps: $t,
|
|
1387
|
+
listboxProps: de
|
|
1396
1388
|
};
|
|
1397
|
-
}, Q =
|
|
1389
|
+
}, Q = Kn.bind(Hn), W = "purpur-autocomplete", Yn = ({ className: t, renderInput: u, renderOption: n, ...o }, a) => {
|
|
1398
1390
|
const {
|
|
1399
1391
|
id: e,
|
|
1400
1392
|
inputProps: r,
|
|
@@ -1405,16 +1397,16 @@ const Un = /* @__PURE__ */ Hn(Gn), Yn = {
|
|
|
1405
1397
|
combobox: x,
|
|
1406
1398
|
comboboxButtonAriaLabel: C,
|
|
1407
1399
|
getListBoxItemProps: M,
|
|
1408
|
-
listboxProps:
|
|
1409
|
-
} =
|
|
1400
|
+
listboxProps: v
|
|
1401
|
+
} = Un(o), c = (s, m) => {
|
|
1410
1402
|
const { key: P, ...B } = M(s, m);
|
|
1411
1403
|
return /* @__PURE__ */ l(U.Item, { ...B, children: n ? n?.(s) : s.label }, P);
|
|
1412
1404
|
}, S = (s) => {
|
|
1413
1405
|
i.current = s, typeof a == "function" ? a(s) : a && (a.current = s);
|
|
1414
|
-
},
|
|
1406
|
+
}, N = () => {
|
|
1415
1407
|
const s = u(r);
|
|
1416
|
-
if (x && C && y && s &&
|
|
1417
|
-
const P = /* @__PURE__ */
|
|
1408
|
+
if (x && C && y && s && Dn(s)) {
|
|
1409
|
+
const P = /* @__PURE__ */ O(Nt, { children: [
|
|
1418
1410
|
s.props.endAdornment,
|
|
1419
1411
|
/* @__PURE__ */ l(
|
|
1420
1412
|
"button",
|
|
@@ -1427,9 +1419,9 @@ const Un = /* @__PURE__ */ Hn(Gn), Yn = {
|
|
|
1427
1419
|
},
|
|
1428
1420
|
"aria-label": C,
|
|
1429
1421
|
"aria-expanded": _,
|
|
1430
|
-
"aria-controls":
|
|
1422
|
+
"aria-controls": v.id,
|
|
1431
1423
|
children: /* @__PURE__ */ l(
|
|
1432
|
-
|
|
1424
|
+
et,
|
|
1433
1425
|
{
|
|
1434
1426
|
size: "sm",
|
|
1435
1427
|
className: Q(`${W}__chevron-icon`, {
|
|
@@ -1440,18 +1432,18 @@ const Un = /* @__PURE__ */ Hn(Gn), Yn = {
|
|
|
1440
1432
|
}
|
|
1441
1433
|
)
|
|
1442
1434
|
] });
|
|
1443
|
-
return
|
|
1435
|
+
return Pt(s, { endAdornment: P });
|
|
1444
1436
|
}
|
|
1445
1437
|
return s;
|
|
1446
1438
|
};
|
|
1447
|
-
return /* @__PURE__ */
|
|
1448
|
-
|
|
1449
|
-
_ && /* @__PURE__ */ l(U, { ...
|
|
1439
|
+
return /* @__PURE__ */ O("div", { id: e, ref: S, className: Q([W, t]), children: [
|
|
1440
|
+
N(),
|
|
1441
|
+
_ && /* @__PURE__ */ l(U, { ...v, className: Q(`${W}__listbox`), children: d.length ? d.filter((s) => !!s).map(c) : /* @__PURE__ */ l(U.Item, { noninteractive: !0, children: y }) })
|
|
1450
1442
|
] });
|
|
1451
|
-
},
|
|
1452
|
-
|
|
1443
|
+
}, Jn = Y(Yn);
|
|
1444
|
+
Jn.displayName = "Autocomplete";
|
|
1453
1445
|
export {
|
|
1454
|
-
|
|
1455
|
-
|
|
1446
|
+
Jn as Autocomplete,
|
|
1447
|
+
Un as useAutocomplete
|
|
1456
1448
|
};
|
|
1457
1449
|
//# sourceMappingURL=autocomplete.es.js.map
|