@purpurds/autocomplete 5.20.1 → 5.21.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.
@@ -1,10 +1,10 @@
1
- import { jsx as s, jsxs as O, Fragment as st } from "react/jsx-runtime";
2
- import { forwardRef as P, Children as E, isValidElement as R, createElement as Q, cloneElement as sr, useEffect as Nr, useId as lt, Fragment as ct, useRef as J, useCallback as dt, useState as ar } from "react";
1
+ import { jsx as s, jsxs as O, Fragment as dt } from "react/jsx-runtime";
2
+ import { forwardRef as P, Children as E, isValidElement as R, createElement as W, cloneElement as sr, useEffect as Ar, useId as _t, Fragment as ft, useRef as J, useCallback as vt, useState as ar } from "react";
3
3
  import "react-dom";
4
- function _t(t) {
4
+ function mt(t) {
5
5
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
6
6
  }
7
- var Ar = { exports: {} };
7
+ var Or = { exports: {} };
8
8
  /*!
9
9
  Copyright (c) 2018 Jed Watson.
10
10
  Licensed under the MIT License (MIT), see
@@ -39,9 +39,9 @@ var Ar = { exports: {} };
39
39
  }
40
40
  t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
41
41
  })();
42
- })(Ar);
43
- var ft = Ar.exports;
44
- const vt = /* @__PURE__ */ _t(ft), mt = {
42
+ })(Or);
43
+ var gt = Or.exports;
44
+ const xt = /* @__PURE__ */ mt(gt), bt = {
45
45
  "purpur-icon": "_purpur-icon_8u1lq_1",
46
46
  "purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
47
47
  "purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
@@ -49,39 +49,39 @@ const vt = /* @__PURE__ */ _t(ft), mt = {
49
49
  "purpur-icon--md": "_purpur-icon--md_8u1lq_16",
50
50
  "purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
51
51
  "purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
52
- }, gt = {
52
+ }, ht = {
53
53
  name: "chevron-down",
54
54
  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>',
55
55
  keywords: ["chevron-down"],
56
56
  category: "utility"
57
- }, Or = (t) => /* @__PURE__ */ s(
58
- $t,
57
+ }, Pr = (t) => /* @__PURE__ */ s(
58
+ Mr,
59
59
  {
60
60
  ...t,
61
- svg: gt
61
+ svg: ht
62
62
  }
63
63
  );
64
- Or.displayName = "IconChevronDown";
65
- const xt = vt.bind(mt), vr = "purpur-icon", bt = "md", ht = (t) => t.filter((a) => Object.keys(a).length >= 1).map((a) => `${a.name}="${a.value}"`).join(" "), yt = ({ content: t = "", title: a } = {}) => {
64
+ Pr.displayName = "IconChevronDown";
65
+ const yt = xt.bind(bt), mr = "purpur-icon", wt = "md", $t = (t) => t.filter((a) => Object.keys(a).length >= 1).map((a) => `${a.name}="${a.value}"`).join(" "), jt = ({ content: t = "", title: a } = {}) => {
66
66
  const n = [
67
67
  { name: "xmlns", value: "http://www.w3.org/2000/svg" },
68
68
  { name: "fill", value: "currentColor" },
69
69
  { name: "viewBox", value: "0 0 24 24" },
70
70
  a ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
71
71
  ], i = a ? `<title>${a}</title>` : "";
72
- return `<svg ${ht(n)}>${i}${t}</svg>`;
73
- }, wt = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), $t = ({
72
+ return `<svg ${$t(n)}>${i}${t}</svg>`;
73
+ }, St = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Mr = ({
74
74
  ["data-testid"]: t,
75
75
  svg: a,
76
76
  allyTitle: n,
77
77
  className: i,
78
- size: o = bt,
78
+ size: o = wt,
79
79
  ...r
80
80
  }) => {
81
- const e = yt({
82
- content: wt(a.svg),
81
+ const e = jt({
82
+ content: St(a.svg),
83
83
  title: n
84
- }), u = xt(i, vr, `${vr}--${o}`);
84
+ }), u = yt(i, mr, `${mr}--${o}`);
85
85
  return /* @__PURE__ */ s(
86
86
  "span",
87
87
  {
@@ -93,10 +93,11 @@ const xt = vt.bind(mt), vr = "purpur-icon", bt = "md", ht = (t) => t.filter((a)
93
93
  }
94
94
  );
95
95
  };
96
- function jt(t) {
96
+ Mr.displayName = "Icon";
97
+ function Nt(t) {
97
98
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
98
99
  }
99
- var Pr = { exports: {} };
100
+ var Cr = { exports: {} };
100
101
  /*!
101
102
  Copyright (c) 2018 Jed Watson.
102
103
  Licensed under the MIT License (MIT), see
@@ -131,9 +132,9 @@ var Pr = { exports: {} };
131
132
  }
132
133
  t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
133
134
  })();
134
- })(Pr);
135
- var St = Pr.exports;
136
- const Mr = /* @__PURE__ */ jt(St), Cr = {
135
+ })(Cr);
136
+ var At = Cr.exports;
137
+ const Ir = /* @__PURE__ */ Nt(At), Lr = {
137
138
  "purpur-listbox": "_purpur-listbox_qhoi7_1",
138
139
  "purpur-listbox-item": "_purpur-listbox-item_qhoi7_15",
139
140
  "purpur-listbox-item--hovered": "_purpur-listbox-item--hovered_qhoi7_29",
@@ -142,10 +143,10 @@ const Mr = /* @__PURE__ */ jt(St), Cr = {
142
143
  "purpur-listbox-item--disabled": "_purpur-listbox-item--disabled_qhoi7_44",
143
144
  "purpur-listbox-item__icon": "_purpur-listbox-item__icon_qhoi7_51"
144
145
  };
145
- function Nt(t) {
146
+ function Ot(t) {
146
147
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
147
148
  }
148
- var Lr = { exports: {} };
149
+ var qr = { exports: {} };
149
150
  /*!
150
151
  Copyright (c) 2018 Jed Watson.
151
152
  Licensed under the MIT License (MIT), see
@@ -180,9 +181,9 @@ var Lr = { exports: {} };
180
181
  }
181
182
  t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
182
183
  })();
183
- })(Lr);
184
- var At = Lr.exports;
185
- const Ot = /* @__PURE__ */ Nt(At), Pt = {
184
+ })(qr);
185
+ var Pt = qr.exports;
186
+ const Mt = /* @__PURE__ */ Ot(Pt), Ct = {
186
187
  "purpur-icon": "_purpur-icon_8u1lq_1",
187
188
  "purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
188
189
  "purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
@@ -190,39 +191,39 @@ const Ot = /* @__PURE__ */ Nt(At), Pt = {
190
191
  "purpur-icon--md": "_purpur-icon--md_8u1lq_16",
191
192
  "purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
192
193
  "purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
193
- }, Mt = {
194
+ }, It = {
194
195
  name: "checkmark",
195
196
  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>',
196
197
  keywords: ["checkmark"],
197
198
  category: "utility"
198
- }, qr = (t) => /* @__PURE__ */ s(
199
- zt,
199
+ }, kr = (t) => /* @__PURE__ */ s(
200
+ zr,
200
201
  {
201
202
  ...t,
202
- svg: Mt
203
+ svg: It
203
204
  }
204
205
  );
205
- qr.displayName = "IconCheckmark";
206
- const Ct = Ot.bind(Pt), mr = "purpur-icon", Lt = "md", qt = (t) => t.filter((a) => Object.keys(a).length >= 1).map((a) => `${a.name}="${a.value}"`).join(" "), It = ({ content: t = "", title: a } = {}) => {
206
+ kr.displayName = "IconCheckmark";
207
+ const Lt = Mt.bind(Ct), gr = "purpur-icon", qt = "md", kt = (t) => t.filter((a) => Object.keys(a).length >= 1).map((a) => `${a.name}="${a.value}"`).join(" "), zt = ({ content: t = "", title: a } = {}) => {
207
208
  const n = [
208
209
  { name: "xmlns", value: "http://www.w3.org/2000/svg" },
209
210
  { name: "fill", value: "currentColor" },
210
211
  { name: "viewBox", value: "0 0 24 24" },
211
212
  a ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
212
213
  ], i = a ? `<title>${a}</title>` : "";
213
- return `<svg ${qt(n)}>${i}${t}</svg>`;
214
- }, kt = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), zt = ({
214
+ return `<svg ${kt(n)}>${i}${t}</svg>`;
215
+ }, Bt = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), zr = ({
215
216
  ["data-testid"]: t,
216
217
  svg: a,
217
218
  allyTitle: n,
218
219
  className: i,
219
- size: o = Lt,
220
+ size: o = qt,
220
221
  ...r
221
222
  }) => {
222
- const e = It({
223
- content: kt(a.svg),
223
+ const e = zt({
224
+ content: Bt(a.svg),
224
225
  title: n
225
- }), u = Ct(i, mr, `${mr}--${o}`);
226
+ }), u = Lt(i, gr, `${gr}--${o}`);
226
227
  return /* @__PURE__ */ s(
227
228
  "span",
228
229
  {
@@ -234,10 +235,11 @@ const Ct = Ot.bind(Pt), mr = "purpur-icon", Lt = "md", qt = (t) => t.filter((a)
234
235
  }
235
236
  );
236
237
  };
237
- function Bt(t) {
238
+ zr.displayName = "Icon";
239
+ function Et(t) {
238
240
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
239
241
  }
240
- var Ir = { exports: {} };
242
+ var Br = { exports: {} };
241
243
  /*!
242
244
  Copyright (c) 2018 Jed Watson.
243
245
  Licensed under the MIT License (MIT), see
@@ -272,9 +274,9 @@ var Ir = { exports: {} };
272
274
  }
273
275
  t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
274
276
  })();
275
- })(Ir);
276
- var Et = Ir.exports;
277
- const Rt = /* @__PURE__ */ Bt(Et), H = {
277
+ })(Br);
278
+ var Rt = Br.exports;
279
+ const Dt = /* @__PURE__ */ Et(Rt), H = {
278
280
  "purpur-paragraph": "_purpur-paragraph_1rh57_1",
279
281
  "purpur-paragraph--disabled": "_purpur-paragraph--disabled_1rh57_7",
280
282
  "purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_1rh57_10",
@@ -289,7 +291,7 @@ const Rt = /* @__PURE__ */ Bt(Et), H = {
289
291
  "purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_1rh57_60",
290
292
  "purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_1rh57_67",
291
293
  "purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1rh57_75"
292
- }, Dt = {
294
+ }, Tt = {
293
295
  PARAGRAPH100: "paragraph-100",
294
296
  PARAGRAPH100MEDIUM: "paragraph-100-medium",
295
297
  PARAGRAPH100BOLD: "paragraph-100-bold",
@@ -300,17 +302,17 @@ const Rt = /* @__PURE__ */ Bt(Et), H = {
300
302
  ADDITIONAL100MEDIUM: "additional-100-medium",
301
303
  OVERLINE100: "overline-100",
302
304
  OVERLINE200: "overline-200"
303
- }, V = "purpur-paragraph", kr = ({
305
+ }, V = "purpur-paragraph", Er = ({
304
306
  ["data-testid"]: t,
305
307
  children: a,
306
308
  className: n,
307
309
  disabled: i,
308
310
  enableHyphenation: o = !1,
309
311
  negative: r = !1,
310
- variant: e = Dt.PARAGRAPH100,
312
+ variant: e = Tt.PARAGRAPH100,
311
313
  ...u
312
314
  }) => {
313
- const v = Rt([
315
+ const v = Dt([
314
316
  n,
315
317
  H[V],
316
318
  H[`${V}--${e}`],
@@ -322,15 +324,15 @@ const Rt = /* @__PURE__ */ Bt(Et), H = {
322
324
  ]);
323
325
  return /* @__PURE__ */ s("p", { ...u, className: v, "data-testid": t, children: a });
324
326
  };
325
- kr.displayName = "Paragraph";
326
- const gr = Mr.bind(Cr), q = "purpur-listbox", lr = P(
327
+ Er.displayName = "Paragraph";
328
+ const xr = Ir.bind(Lr), L = "purpur-listbox", lr = P(
327
329
  (t, a) => {
328
- const { disabled: n, highlighted: i, hovered: o, selected: r, children: e, noninteractive: u, ...v } = t, b = gr(`${q}-item`, v.className, {
329
- [`${q}-item--highlighted`]: i,
330
- [`${q}-item--selected`]: r,
331
- [`${q}-item--hovered`]: o,
332
- [`${q}-item--disabled`]: n,
333
- [`${q}-item--noninteractive`]: u
330
+ const { disabled: n, highlighted: i, hovered: o, selected: r, children: e, noninteractive: u, ...v } = t, b = xr(`${L}-item`, v.className, {
331
+ [`${L}-item--highlighted`]: i,
332
+ [`${L}-item--selected`]: r,
333
+ [`${L}-item--hovered`]: o,
334
+ [`${L}-item--disabled`]: n,
335
+ [`${L}-item--noninteractive`]: u
334
336
  });
335
337
  return /* @__PURE__ */ O(
336
338
  "li",
@@ -342,37 +344,37 @@ const gr = Mr.bind(Cr), q = "purpur-listbox", lr = P(
342
344
  role: "option",
343
345
  "aria-disabled": !!n,
344
346
  children: [
345
- typeof e == "string" ? /* @__PURE__ */ s(kr, { children: e }) : e,
346
- r && /* @__PURE__ */ s(qr, { size: "xs", className: gr(`${q}-item__icon`) })
347
+ typeof e == "string" ? /* @__PURE__ */ s(Er, { children: e }) : e,
348
+ r && /* @__PURE__ */ s(kr, { size: "xs", className: xr(`${L}-item__icon`) })
347
349
  ]
348
350
  }
349
351
  );
350
352
  }
351
- ), Tt = (t) => R(t) && (t == null ? void 0 : t.type) === lr;
353
+ ), Ft = (t) => R(t) && (t == null ? void 0 : t.type) === lr;
352
354
  lr.displayName = "ListBoxItem";
353
- const Ft = Mr.bind(Cr), Gt = "purpur-listbox", W = P(
355
+ const Gt = Ir.bind(Lr), Ht = "purpur-listbox", Q = P(
354
356
  ({ children: t, ...a }, n) => /* @__PURE__ */ s(
355
357
  "ul",
356
358
  {
357
359
  ...a,
358
360
  ref: n,
359
- className: Ft(Gt, a.className),
361
+ className: Gt(Ht, a.className),
360
362
  role: "listbox",
361
- children: E.toArray(t).filter(Tt)
363
+ children: E.toArray(t).filter(Ft)
362
364
  }
363
365
  )
364
366
  );
365
- W.Item = lr;
366
- W.displayName = "ListBox";
367
- const Ht = {
367
+ Q.Item = lr;
368
+ Q.displayName = "ListBox";
369
+ const Vt = {
368
370
  SM: "sm",
369
371
  MD: "md",
370
372
  LG: "lg"
371
373
  };
372
- function Vt(t) {
374
+ function Zt(t) {
373
375
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
374
376
  }
375
- var zr = { exports: {} };
377
+ var Rr = { exports: {} };
376
378
  /*!
377
379
  Copyright (c) 2018 Jed Watson.
378
380
  Licensed under the MIT License (MIT), see
@@ -407,42 +409,42 @@ var zr = { exports: {} };
407
409
  }
408
410
  t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
409
411
  })();
410
- })(zr);
411
- var Zt = zr.exports;
412
- const xr = /* @__PURE__ */ Vt(Zt), Kt = "_rotate_1xozj_1", Xt = "_dash_1xozj_1", Z = {
412
+ })(Rr);
413
+ var Kt = Rr.exports;
414
+ const br = /* @__PURE__ */ Zt(Kt), Xt = "_rotate_1xozj_1", Ut = "_dash_1xozj_1", Z = {
413
415
  "purpur-spinner": "_purpur-spinner_1xozj_1",
414
- rotate: Kt,
416
+ rotate: Xt,
415
417
  "purpur-spinner--xxs": "_purpur-spinner--xxs_1xozj_4",
416
418
  "purpur-spinner--xs": "_purpur-spinner--xs_1xozj_8",
417
419
  "purpur-spinner--sm": "_purpur-spinner--sm_1xozj_12",
418
420
  "purpur-spinner--md": "_purpur-spinner--md_1xozj_16",
419
421
  "purpur-spinner--lg": "_purpur-spinner--lg_1xozj_20",
420
422
  "purpur-spinner__circle": "_purpur-spinner__circle_1xozj_24",
421
- dash: Xt,
423
+ dash: Ut,
422
424
  "purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_1xozj_33",
423
425
  "purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_1xozj_36"
424
- }, K = "purpur-spinner", Ut = {
426
+ }, K = "purpur-spinner", Yt = {
425
427
  XXS: "xxs",
426
428
  XS: "xs",
427
429
  SM: "sm",
428
430
  MD: "md",
429
431
  LG: "lg"
430
- }, Yt = ({
432
+ }, Jt = ({
431
433
  ["data-testid"]: t,
432
434
  disabled: a = !1,
433
435
  negative: n = !1,
434
- size: i = Ut.SM,
436
+ size: i = Yt.SM,
435
437
  ...o
436
438
  }) => /* @__PURE__ */ s(
437
439
  "div",
438
440
  {
439
- className: xr([Z[K], Z[`${K}--${i}`]]),
441
+ className: br([Z[K], Z[`${K}--${i}`]]),
440
442
  "data-testid": t,
441
443
  ...o,
442
444
  children: /* @__PURE__ */ s("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ s(
443
445
  "circle",
444
446
  {
445
- className: xr(Z[`${K}__circle`], {
447
+ className: br(Z[`${K}__circle`], {
446
448
  [Z[`${K}__circle--disabled`]]: a,
447
449
  [Z[`${K}__circle--negative`]]: n
448
450
  }),
@@ -453,10 +455,10 @@ const xr = /* @__PURE__ */ Vt(Zt), Kt = "_rotate_1xozj_1", Xt = "_dash_1xozj_1",
453
455
  ) })
454
456
  }
455
457
  );
456
- function Jt(t) {
458
+ function Qt(t) {
457
459
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
458
460
  }
459
- var Br = { exports: {} };
461
+ var Dr = { exports: {} };
460
462
  /*!
461
463
  Copyright (c) 2018 Jed Watson.
462
464
  Licensed under the MIT License (MIT), see
@@ -491,9 +493,9 @@ var Br = { exports: {} };
491
493
  }
492
494
  t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
493
495
  })();
494
- })(Br);
495
- var Wt = Br.exports;
496
- const Qt = /* @__PURE__ */ Jt(Wt), re = {
496
+ })(Dr);
497
+ var Wt = Dr.exports;
498
+ const re = /* @__PURE__ */ Qt(Wt), te = {
497
499
  "purpur-button": "_purpur-button_1acxn_1",
498
500
  "purpur-button--sm": "_purpur-button--sm_1acxn_33",
499
501
  "purpur-button--icon-only": "_purpur-button--icon-only_1acxn_36",
@@ -514,7 +516,7 @@ const Qt = /* @__PURE__ */ Jt(Wt), re = {
514
516
  "purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-negative_1acxn_160",
515
517
  "purpur-button--text-negative": "_purpur-button--text-negative_1acxn_175",
516
518
  "purpur-button--text": "_purpur-button--text_1acxn_175"
517
- }, te = Qt.bind(re), I = "purpur-button", ee = ({
519
+ }, ee = re.bind(te), q = "purpur-button", ne = ({
518
520
  children: t,
519
521
  className: a,
520
522
  ["data-testid"]: n,
@@ -531,17 +533,17 @@ const Qt = /* @__PURE__ */ Jt(Wt), re = {
531
533
  }, f) => {
532
534
  if (r && y === "destructive")
533
535
  return null;
534
- const S = te(
536
+ const S = ee(
535
537
  [
536
- I,
537
- `${I}--${u ? `${y}-negative` : y}`,
538
- `${I}--${b}`
538
+ q,
539
+ `${q}--${u ? `${y}-negative` : y}`,
540
+ `${q}--${b}`
539
541
  ],
540
542
  {
541
- [`${I}--icon-only`]: r,
542
- [`${I}--negative`]: u,
543
- [`${I}--full-width`]: o,
544
- [`${I}--disabled`]: i || e
543
+ [`${q}--icon-only`]: r,
544
+ [`${q}--negative`]: u,
545
+ [`${q}--full-width`]: o,
546
+ [`${q}--disabled`]: i || e
545
547
  },
546
548
  a
547
549
  ), C = (l) => {
@@ -558,18 +560,18 @@ const Qt = /* @__PURE__ */ Jt(Wt), re = {
558
560
  onClick: C,
559
561
  ...d,
560
562
  children: [
561
- e && /* @__PURE__ */ s(Yt, { size: b === Ht.LG ? "xs" : "xxs", negative: u, disabled: w }),
563
+ e && /* @__PURE__ */ s(Jt, { size: b === Vt.LG ? "xs" : "xxs", negative: u, disabled: w }),
562
564
  " ",
563
565
  t
564
566
  ]
565
567
  }
566
568
  );
567
- }, Er = P(ee);
568
- Er.displayName = "Button";
569
- function ne(t) {
569
+ }, Tr = P(ne);
570
+ Tr.displayName = "Button";
571
+ function ue(t) {
570
572
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
571
573
  }
572
- var Rr = { exports: {} };
574
+ var Fr = { exports: {} };
573
575
  /*!
574
576
  Copyright (c) 2018 Jed Watson.
575
577
  Licensed under the MIT License (MIT), see
@@ -604,9 +606,9 @@ var Rr = { exports: {} };
604
606
  }
605
607
  t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
606
608
  })();
607
- })(Rr);
608
- var ue = Rr.exports;
609
- const ae = /* @__PURE__ */ ne(ue), ie = {
609
+ })(Fr);
610
+ var ae = Fr.exports;
611
+ const ie = /* @__PURE__ */ ue(ae), oe = {
610
612
  "purpur-icon": "_purpur-icon_8u1lq_1",
611
613
  "purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
612
614
  "purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
@@ -614,31 +616,31 @@ const ae = /* @__PURE__ */ ne(ue), ie = {
614
616
  "purpur-icon--md": "_purpur-icon--md_8u1lq_16",
615
617
  "purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
616
618
  "purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
617
- }, oe = {
619
+ }, pe = {
618
620
  name: "error-filled",
619
621
  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>',
620
622
  keywords: ["error-filled"],
621
623
  category: "status"
622
- }, pe = ae.bind(ie), br = "purpur-icon", se = "md", le = (t) => t.filter((a) => Object.keys(a).length >= 1).map((a) => `${a.name}="${a.value}"`).join(" "), ce = ({ content: t = "", title: a } = {}) => {
624
+ }, se = ie.bind(oe), hr = "purpur-icon", le = "md", ce = (t) => t.filter((a) => Object.keys(a).length >= 1).map((a) => `${a.name}="${a.value}"`).join(" "), de = ({ content: t = "", title: a } = {}) => {
623
625
  const n = [
624
626
  { name: "xmlns", value: "http://www.w3.org/2000/svg" },
625
627
  { name: "fill", value: "currentColor" },
626
628
  { name: "viewBox", value: "0 0 24 24" },
627
629
  a ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
628
630
  ], i = a ? `<title>${a}</title>` : "";
629
- return `<svg ${le(n)}>${i}${t}</svg>`;
630
- }, de = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), _e = ({
631
+ return `<svg ${ce(n)}>${i}${t}</svg>`;
632
+ }, _e = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Gr = ({
631
633
  ["data-testid"]: t,
632
634
  svg: a,
633
635
  allyTitle: n,
634
636
  className: i,
635
- size: o = se,
637
+ size: o = le,
636
638
  ...r
637
639
  }) => {
638
- const e = ce({
639
- content: de(a.svg),
640
+ const e = de({
641
+ content: _e(a.svg),
640
642
  title: n
641
- }), u = pe(i, br, `${br}--${o}`);
643
+ }), u = se(i, hr, `${hr}--${o}`);
642
644
  return /* @__PURE__ */ s(
643
645
  "span",
644
646
  {
@@ -650,10 +652,11 @@ const ae = /* @__PURE__ */ ne(ue), ie = {
650
652
  }
651
653
  );
652
654
  };
655
+ Gr.displayName = "Icon";
653
656
  function fe(t) {
654
657
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
655
658
  }
656
- var Dr = { exports: {} };
659
+ var Hr = { exports: {} };
657
660
  /*!
658
661
  Copyright (c) 2018 Jed Watson.
659
662
  Licensed under the MIT License (MIT), see
@@ -688,12 +691,12 @@ var Dr = { exports: {} };
688
691
  }
689
692
  t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
690
693
  })();
691
- })(Dr);
692
- var ve = Dr.exports;
693
- const me = /* @__PURE__ */ fe(ve), hr = {
694
+ })(Hr);
695
+ var ve = Hr.exports;
696
+ const me = /* @__PURE__ */ fe(ve), yr = {
694
697
  "purpur-field-error-text": "_purpur-field-error-text_1u768_1",
695
698
  "purpur-field-error-text__icon": "_purpur-field-error-text__icon_1u768_12"
696
- }, yr = "purpur-field-error-text", ge = ({
699
+ }, wr = "purpur-field-error-text", ge = ({
697
700
  ["data-testid"]: t,
698
701
  children: a,
699
702
  className: n,
@@ -702,13 +705,13 @@ const me = /* @__PURE__ */ fe(ve), hr = {
702
705
  }) => /* @__PURE__ */ O(
703
706
  "div",
704
707
  {
705
- className: me([n, hr[yr]]),
708
+ className: me([n, yr[wr]]),
706
709
  "data-testid": t,
707
710
  "aria-live": "assertive",
708
711
  "aria-relevant": i,
709
712
  ...o,
710
713
  children: [
711
- /* @__PURE__ */ s(_e, { svg: oe, size: "xs", className: hr[`${yr}__icon`] }),
714
+ /* @__PURE__ */ s(Gr, { svg: pe, size: "xs", className: yr[`${wr}__icon`] }),
712
715
  a
713
716
  ]
714
717
  }
@@ -716,7 +719,7 @@ const me = /* @__PURE__ */ fe(ve), hr = {
716
719
  function xe(t) {
717
720
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
718
721
  }
719
- var Tr = { exports: {} };
722
+ var Vr = { exports: {} };
720
723
  /*!
721
724
  Copyright (c) 2018 Jed Watson.
722
725
  Licensed under the MIT License (MIT), see
@@ -751,12 +754,12 @@ var Tr = { exports: {} };
751
754
  }
752
755
  t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
753
756
  })();
754
- })(Tr);
755
- var be = Tr.exports;
756
- const he = /* @__PURE__ */ xe(be), wr = {
757
+ })(Vr);
758
+ var be = Vr.exports;
759
+ const he = /* @__PURE__ */ xe(be), $r = {
757
760
  "purpur-field-helper-text": "_purpur-field-helper-text_atw6b_1",
758
761
  "purpur-field-helper-text--disabled": "_purpur-field-helper-text--disabled_atw6b_9"
759
- }, $r = "purpur-field-helper-text", ye = ({
762
+ }, jr = "purpur-field-helper-text", ye = ({
760
763
  ["data-testid"]: t,
761
764
  children: a,
762
765
  className: n,
@@ -766,9 +769,9 @@ const he = /* @__PURE__ */ xe(be), wr = {
766
769
  }) => {
767
770
  const e = he([
768
771
  n,
769
- wr[$r],
772
+ $r[jr],
770
773
  {
771
- [wr[`${$r}--disabled`]]: i
774
+ [$r[`${jr}--disabled`]]: i
772
775
  }
773
776
  ]);
774
777
  return /* @__PURE__ */ s("span", { id: o, className: e, "data-testid": t, ...r, children: a });
@@ -776,7 +779,7 @@ const he = /* @__PURE__ */ xe(be), wr = {
776
779
  function we(t) {
777
780
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
778
781
  }
779
- var Fr = { exports: {} };
782
+ var Zr = { exports: {} };
780
783
  /*!
781
784
  Copyright (c) 2018 Jed Watson.
782
785
  Licensed under the MIT License (MIT), see
@@ -811,8 +814,8 @@ var Fr = { exports: {} };
811
814
  }
812
815
  t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
813
816
  })();
814
- })(Fr);
815
- var $e = Fr.exports;
817
+ })(Zr);
818
+ var $e = Zr.exports;
816
819
  const je = /* @__PURE__ */ we($e), Se = {
817
820
  "purpur-icon": "_purpur-icon_8u1lq_1",
818
821
  "purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
@@ -831,23 +834,23 @@ const je = /* @__PURE__ */ we($e), Se = {
831
834
  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>',
832
835
  keywords: ["close"],
833
836
  category: "utility"
834
- }, Gr = (t) => /* @__PURE__ */ s(
835
- Vr,
837
+ }, Kr = (t) => /* @__PURE__ */ s(
838
+ cr,
836
839
  {
837
840
  ...t,
838
841
  svg: Ne
839
842
  }
840
843
  );
841
- Gr.displayName = "IconCheckCircleFilled";
842
- const Hr = (t) => /* @__PURE__ */ s(
843
- Vr,
844
+ Kr.displayName = "IconCheckCircleFilled";
845
+ const Xr = (t) => /* @__PURE__ */ s(
846
+ cr,
844
847
  {
845
848
  ...t,
846
849
  svg: Ae
847
850
  }
848
851
  );
849
- Hr.displayName = "IconClose";
850
- const Oe = je.bind(Se), jr = "purpur-icon", Pe = "md", Me = (t) => t.filter((a) => Object.keys(a).length >= 1).map((a) => `${a.name}="${a.value}"`).join(" "), Ce = ({ content: t = "", title: a } = {}) => {
852
+ Xr.displayName = "IconClose";
853
+ const Oe = je.bind(Se), Sr = "purpur-icon", Pe = "md", Me = (t) => t.filter((a) => Object.keys(a).length >= 1).map((a) => `${a.name}="${a.value}"`).join(" "), Ce = ({ content: t = "", title: a } = {}) => {
851
854
  const n = [
852
855
  { name: "xmlns", value: "http://www.w3.org/2000/svg" },
853
856
  { name: "fill", value: "currentColor" },
@@ -855,7 +858,7 @@ const Oe = je.bind(Se), jr = "purpur-icon", Pe = "md", Me = (t) => t.filter((a)
855
858
  a ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
856
859
  ], i = a ? `<title>${a}</title>` : "";
857
860
  return `<svg ${Me(n)}>${i}${t}</svg>`;
858
- }, Le = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Vr = ({
861
+ }, Ie = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), cr = ({
859
862
  ["data-testid"]: t,
860
863
  svg: a,
861
864
  allyTitle: n,
@@ -864,9 +867,9 @@ const Oe = je.bind(Se), jr = "purpur-icon", Pe = "md", Me = (t) => t.filter((a)
864
867
  ...r
865
868
  }) => {
866
869
  const e = Ce({
867
- content: Le(a.svg),
870
+ content: Ie(a.svg),
868
871
  title: n
869
- }), u = Oe(i, jr, `${jr}--${o}`);
872
+ }), u = Oe(i, Sr, `${Sr}--${o}`);
870
873
  return /* @__PURE__ */ s(
871
874
  "span",
872
875
  {
@@ -878,6 +881,7 @@ const Oe = je.bind(Se), jr = "purpur-icon", Pe = "md", Me = (t) => t.filter((a)
878
881
  }
879
882
  );
880
883
  };
884
+ cr.displayName = "Icon";
881
885
  function D() {
882
886
  return D = Object.assign ? Object.assign.bind() : function(t) {
883
887
  for (var a = 1; a < arguments.length; a++) {
@@ -887,36 +891,36 @@ function D() {
887
891
  return t;
888
892
  }, D.apply(null, arguments);
889
893
  }
890
- function qe(t, a) {
894
+ function Le(t, a) {
891
895
  typeof t == "function" ? t(a) : t != null && (t.current = a);
892
896
  }
893
- function Ie(...t) {
897
+ function qe(...t) {
894
898
  return (a) => t.forEach(
895
- (n) => qe(n, a)
899
+ (n) => Le(n, a)
896
900
  );
897
901
  }
898
- const Zr = /* @__PURE__ */ P((t, a) => {
902
+ const Ur = /* @__PURE__ */ P((t, a) => {
899
903
  const { children: n, ...i } = t, o = E.toArray(n), r = o.find(ze);
900
904
  if (r) {
901
905
  const e = r.props.children, u = o.map((v) => v === r ? E.count(e) > 1 ? E.only(null) : /* @__PURE__ */ R(e) ? e.props.children : null : v);
902
- return /* @__PURE__ */ Q(pr, D({}, i, {
906
+ return /* @__PURE__ */ W(pr, D({}, i, {
903
907
  ref: a
904
908
  }), /* @__PURE__ */ R(e) ? /* @__PURE__ */ sr(e, void 0, u) : null);
905
909
  }
906
- return /* @__PURE__ */ Q(pr, D({}, i, {
910
+ return /* @__PURE__ */ W(pr, D({}, i, {
907
911
  ref: a
908
912
  }), n);
909
913
  });
910
- Zr.displayName = "Slot";
914
+ Ur.displayName = "Slot";
911
915
  const pr = /* @__PURE__ */ P((t, a) => {
912
916
  const { children: n, ...i } = t;
913
917
  return /* @__PURE__ */ R(n) ? /* @__PURE__ */ sr(n, {
914
918
  ...Be(i, n.props),
915
- ref: a ? Ie(a, n.ref) : n.ref
919
+ ref: a ? qe(a, n.ref) : n.ref
916
920
  }) : E.count(n) > 1 ? E.only(null) : null;
917
921
  });
918
922
  pr.displayName = "SlotClone";
919
- const ke = ({ children: t }) => /* @__PURE__ */ Q(ct, null, t);
923
+ const ke = ({ children: t }) => /* @__PURE__ */ W(ft, null, t);
920
924
  function ze(t) {
921
925
  return /* @__PURE__ */ R(t) && t.type === ke;
922
926
  }
@@ -960,10 +964,10 @@ const Ee = [
960
964
  "ul"
961
965
  ], Re = Ee.reduce((t, a) => {
962
966
  const n = /* @__PURE__ */ P((i, o) => {
963
- const { asChild: r, ...e } = i, u = r ? Zr : a;
964
- return Nr(() => {
967
+ const { asChild: r, ...e } = i, u = r ? Ur : a;
968
+ return Ar(() => {
965
969
  window[Symbol.for("radix-ui")] = !0;
966
- }, []), /* @__PURE__ */ Q(u, D({}, e, {
970
+ }, []), /* @__PURE__ */ W(u, D({}, e, {
967
971
  ref: o
968
972
  }));
969
973
  });
@@ -971,7 +975,7 @@ const Ee = [
971
975
  ...t,
972
976
  [a]: n
973
977
  };
974
- }, {}), De = /* @__PURE__ */ P((t, a) => /* @__PURE__ */ Q(Re.label, D({}, t, {
978
+ }, {}), De = /* @__PURE__ */ P((t, a) => /* @__PURE__ */ W(Re.label, D({}, t, {
975
979
  ref: a,
976
980
  onMouseDown: (n) => {
977
981
  var i;
@@ -981,7 +985,7 @@ const Ee = [
981
985
  function Fe(t) {
982
986
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
983
987
  }
984
- var Kr = { exports: {} };
988
+ var Yr = { exports: {} };
985
989
  /*!
986
990
  Copyright (c) 2018 Jed Watson.
987
991
  Licensed under the MIT License (MIT), see
@@ -1016,8 +1020,8 @@ var Kr = { exports: {} };
1016
1020
  }
1017
1021
  t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
1018
1022
  })();
1019
- })(Kr);
1020
- var Ge = Kr.exports;
1023
+ })(Yr);
1024
+ var Ge = Yr.exports;
1021
1025
  const He = /* @__PURE__ */ Fe(Ge), ir = {
1022
1026
  "purpur-label": "_purpur-label_12cfi_1",
1023
1027
  "purpur-label--negative": "_purpur-label--negative_12cfi_9",
@@ -1044,7 +1048,7 @@ const He = /* @__PURE__ */ Fe(Ge), ir = {
1044
1048
  function Ze(t) {
1045
1049
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
1046
1050
  }
1047
- var Xr = { exports: {} };
1051
+ var Jr = { exports: {} };
1048
1052
  /*!
1049
1053
  Copyright (c) 2018 Jed Watson.
1050
1054
  Licensed under the MIT License (MIT), see
@@ -1079,9 +1083,9 @@ var Xr = { exports: {} };
1079
1083
  }
1080
1084
  t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
1081
1085
  })();
1082
- })(Xr);
1083
- var Ke = Xr.exports;
1084
- const Sr = /* @__PURE__ */ Ze(Ke), Xe = "_rotate_1xozj_1", Ue = "_dash_1xozj_1", X = {
1086
+ })(Jr);
1087
+ var Ke = Jr.exports;
1088
+ const Nr = /* @__PURE__ */ Ze(Ke), Xe = "_rotate_1xozj_1", Ue = "_dash_1xozj_1", X = {
1085
1089
  "purpur-spinner": "_purpur-spinner_1xozj_1",
1086
1090
  rotate: Xe,
1087
1091
  "purpur-spinner--xxs": "_purpur-spinner--xxs_1xozj_4",
@@ -1108,13 +1112,13 @@ const Sr = /* @__PURE__ */ Ze(Ke), Xe = "_rotate_1xozj_1", Ue = "_dash_1xozj_1",
1108
1112
  }) => /* @__PURE__ */ s(
1109
1113
  "div",
1110
1114
  {
1111
- className: Sr([X[U], X[`${U}--${i}`]]),
1115
+ className: Nr([X[U], X[`${U}--${i}`]]),
1112
1116
  "data-testid": t,
1113
1117
  ...o,
1114
1118
  children: /* @__PURE__ */ s("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ s(
1115
1119
  "circle",
1116
1120
  {
1117
- className: Sr(X[`${U}__circle`], {
1121
+ className: Nr(X[`${U}__circle`], {
1118
1122
  [X[`${U}__circle--disabled`]]: a,
1119
1123
  [X[`${U}__circle--negative`]]: n
1120
1124
  }),
@@ -1125,10 +1129,10 @@ const Sr = /* @__PURE__ */ Ze(Ke), Xe = "_rotate_1xozj_1", Ue = "_dash_1xozj_1",
1125
1129
  ) })
1126
1130
  }
1127
1131
  );
1128
- function We(t) {
1132
+ function Qe(t) {
1129
1133
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
1130
1134
  }
1131
- var Ur = { exports: {} };
1135
+ var Qr = { exports: {} };
1132
1136
  /*!
1133
1137
  Copyright (c) 2018 Jed Watson.
1134
1138
  Licensed under the MIT License (MIT), see
@@ -1163,9 +1167,9 @@ var Ur = { exports: {} };
1163
1167
  }
1164
1168
  t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
1165
1169
  })();
1166
- })(Ur);
1167
- var Qe = Ur.exports;
1168
- const rn = /* @__PURE__ */ We(Qe), tn = {
1170
+ })(Qr);
1171
+ var We = Qr.exports;
1172
+ const rn = /* @__PURE__ */ Qe(We), tn = {
1169
1173
  "purpur-text-field": "_purpur-text-field_nj9f4_1",
1170
1174
  "purpur-text-field__label": "_purpur-text-field__label_nj9f4_7",
1171
1175
  "purpur-text-field__label-text": "_purpur-text-field__label-text_nj9f4_13",
@@ -1198,7 +1202,7 @@ const rn = /* @__PURE__ */ We(Qe), tn = {
1198
1202
  ...d
1199
1203
  }, f) => {
1200
1204
  var S;
1201
- const C = lt(), w = d.id ?? C, l = (m) => t ? `${t}-${m}` : void 0, c = j && !r, x = e ? `${w}-helper-text` : void 0, $ = [y].filter((m) => !!m), T = (typeof d.value == "number" ? d.value !== void 0 : (S = d.value) == null ? void 0 : S.length) && !d.disabled && !d.readOnly && !v && b && n, k = en(null), z = (m) => {
1205
+ const C = _t(), w = d.id ?? C, l = (m) => t ? `${t}-${m}` : void 0, c = j && !r, x = e ? `${w}-helper-text` : void 0, $ = [y].filter((m) => !!m), T = (typeof d.value == "number" ? d.value !== void 0 : (S = d.value) == null ? void 0 : S.length) && !d.disabled && !d.readOnly && !v && b && n, k = en(null), z = (m) => {
1202
1206
  k.current = m, typeof f == "function" ? f(m) : f && (f.current = m);
1203
1207
  }, rr = () => {
1204
1208
  var m;
@@ -1214,7 +1218,7 @@ const rn = /* @__PURE__ */ We(Qe), tn = {
1214
1218
  "spinner"
1215
1219
  ),
1216
1220
  T && /* @__PURE__ */ s(
1217
- Er,
1221
+ Tr,
1218
1222
  {
1219
1223
  variant: "tertiary-purple",
1220
1224
  onClick: rr,
@@ -1222,12 +1226,12 @@ const rn = /* @__PURE__ */ We(Qe), tn = {
1222
1226
  "aria-label": n ?? "",
1223
1227
  "data-testid": l("clear-button"),
1224
1228
  tabIndex: -1,
1225
- children: /* @__PURE__ */ s(Hr, { size: "xs" })
1229
+ children: /* @__PURE__ */ s(Xr, { size: "xs" })
1226
1230
  },
1227
1231
  "clear-button"
1228
1232
  ),
1229
1233
  c && /* @__PURE__ */ s(
1230
- Gr,
1234
+ Kr,
1231
1235
  {
1232
1236
  "data-testid": l("valid-icon"),
1233
1237
  className: A(`${g}__valid-icon`)
@@ -1301,13 +1305,13 @@ const rn = /* @__PURE__ */ We(Qe), tn = {
1301
1305
  x && /* @__PURE__ */ s(ye, { "data-testid": l("helper-text"), id: x, children: e }),
1302
1306
  r && /* @__PURE__ */ s(ge, { "data-testid": l("error-text"), children: r })
1303
1307
  ] });
1304
- }, Yr = P(nn);
1305
- Yr.displayName = "TextField";
1306
- const un = (t) => R(t) && t.type.displayName === Yr.displayName;
1308
+ }, Wr = P(nn);
1309
+ Wr.displayName = "TextField";
1310
+ const un = (t) => R(t) && t.type.displayName === Wr.displayName;
1307
1311
  function an(t) {
1308
1312
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
1309
1313
  }
1310
- var Jr = { exports: {} };
1314
+ var rt = { exports: {} };
1311
1315
  /*!
1312
1316
  Copyright (c) 2018 Jed Watson.
1313
1317
  Licensed under the MIT License (MIT), see
@@ -1342,8 +1346,8 @@ var Jr = { exports: {} };
1342
1346
  }
1343
1347
  t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
1344
1348
  })();
1345
- })(Jr);
1346
- var on = Jr.exports;
1349
+ })(rt);
1350
+ var on = rt.exports;
1347
1351
  const pn = /* @__PURE__ */ an(on), sn = {
1348
1352
  "purpur-autocomplete": "_purpur-autocomplete_1u8x6_1",
1349
1353
  "purpur-autocomplete__listbox": "_purpur-autocomplete__listbox_1u8x6_4",
@@ -1351,13 +1355,13 @@ const pn = /* @__PURE__ */ an(on), sn = {
1351
1355
  "purpur-autocomplete__chevron-icon": "_purpur-autocomplete__chevron-icon_1u8x6_15",
1352
1356
  "purpur-autocomplete__chevron-icon--up": "_purpur-autocomplete__chevron-icon--up_1u8x6_19"
1353
1357
  }, ln = (t) => J(t), cn = (t, a) => {
1354
- const n = dt(
1358
+ const n = vt(
1355
1359
  (i) => {
1356
1360
  t && !t.contains(i.target) && a();
1357
1361
  },
1358
1362
  [a, t]
1359
1363
  );
1360
- Nr(() => (document.addEventListener("mousedown", n), () => {
1364
+ Ar(() => (document.addEventListener("mousedown", n), () => {
1361
1365
  document.removeEventListener("mousedown", n);
1362
1366
  }), [n]);
1363
1367
  }, dn = ({
@@ -1391,7 +1395,7 @@ const pn = /* @__PURE__ */ an(on), sn = {
1391
1395
  B(!0), f && requestAnimationFrame(() => {
1392
1396
  x({ ...f, isSetByClickEvent: p === "CLICK" }), nr(z.current[f.id]);
1393
1397
  });
1394
- }, Wr = (p) => {
1398
+ }, tt = (p) => {
1395
1399
  if (o)
1396
1400
  return d.filter((h) => o(p, h));
1397
1401
  if (!p)
@@ -1402,7 +1406,7 @@ const pn = /* @__PURE__ */ an(on), sn = {
1402
1406
  (N) => (h.value || h.label).toUpperCase().includes(N)
1403
1407
  )
1404
1408
  );
1405
- }, cr = (p) => f && (f == null ? void 0 : f.label) === p ? d : Wr(p), M = cr(l), er = (p) => {
1409
+ }, dr = (p) => f && (f == null ? void 0 : f.label) === p ? d : tt(p), M = dr(l), er = (p) => {
1406
1410
  v == null || v(p), w(p);
1407
1411
  }, nr = (p) => {
1408
1412
  var _;
@@ -1410,25 +1414,25 @@ const pn = /* @__PURE__ */ an(on), sn = {
1410
1414
  const h = p.getBoundingClientRect(), N = ((_ = k.current) == null ? void 0 : _.getBoundingClientRect()) || { top: 0, bottom: 0 };
1411
1415
  (h.top < N.top || h.bottom > N.bottom) && p.scrollIntoView({ block: "nearest" });
1412
1416
  }
1413
- }, dr = (p) => {
1417
+ }, _r = (p) => {
1414
1418
  var _;
1415
1419
  p && ((_ = $.current) == null || _.focus(), er(p.label), j == null || j(p)), m();
1416
- }, Qr = (p) => {
1420
+ }, et = (p) => {
1417
1421
  const _ = a && !c ? 0 : M.findIndex((N) => N && (c == null ? void 0 : c.id) === N.id), h = M.length;
1418
1422
  return p === "ArrowDown" ? M[(_ ?? -1) + 1] || M[0] : M[(_ ?? h) - 1] || M[h - 1];
1419
- }, L = rr && (!!M.length || !!y), rt = (p) => {
1420
- !L && G({ eventType: "KEYBOARD" });
1421
- const _ = Qr(p);
1423
+ }, I = rr && (!!M.length || !!y), nt = (p) => {
1424
+ !I && G({ eventType: "KEYBOARD" });
1425
+ const _ = et(p);
1422
1426
  x(_), _ && nr(z.current[_.id]);
1423
- }, tt = (p) => {
1427
+ }, ut = (p) => {
1424
1428
  switch (p.key) {
1425
1429
  case "ArrowUp":
1426
1430
  case "ArrowDown":
1427
- p.preventDefault(), rt(p.key);
1431
+ p.preventDefault(), nt(p.key);
1428
1432
  break;
1429
1433
  case "Enter": {
1430
1434
  const _ = c || (a ? d[0] : void 0);
1431
- L && dr(_), !L && G({ eventType: "KEYBOARD" });
1435
+ I && _r(_), !I && G({ eventType: "KEYBOARD" });
1432
1436
  break;
1433
1437
  }
1434
1438
  case "Escape":
@@ -1436,37 +1440,37 @@ const pn = /* @__PURE__ */ an(on), sn = {
1436
1440
  m();
1437
1441
  break;
1438
1442
  }
1439
- }, et = (p) => {
1440
- const _ = cr(p.target.value);
1441
- er(p.target.value), x(void 0), !L && G({ eventType: "KEYBOARD" }), a && _[0] && nr(z.current[_[0].id]);
1442
- }, nt = () => {
1443
- L ? m() : G({ eventType: "CLICK" });
1444
- }, ut = () => {
1443
+ }, at = (p) => {
1444
+ const _ = dr(p.target.value);
1445
+ er(p.target.value), x(void 0), !I && G({ eventType: "KEYBOARD" }), a && _[0] && nr(z.current[_[0].id]);
1446
+ }, it = () => {
1447
+ I ? m() : G({ eventType: "CLICK" });
1448
+ }, ot = () => {
1445
1449
  var p;
1446
1450
  !rr && b && G({ eventType: "KEYBOARD" }), (p = $.current) == null || p.select();
1447
- }, at = () => {
1451
+ }, pt = () => {
1448
1452
  t && setTimeout(() => {
1449
1453
  var p, _;
1450
1454
  !((p = $.current) != null && p.contains(document.activeElement)) && !((_ = k.current) != null && _.contains(document.activeElement)) && er(f ? f.label : "");
1451
1455
  });
1452
- }, it = {
1456
+ }, st = {
1453
1457
  maxHeight: typeof u == "number" ? `${u}px` : u
1454
- }, _r = {
1458
+ }, fr = {
1455
1459
  "aria-label": e,
1456
- "aria-expanded": L,
1460
+ "aria-expanded": I,
1457
1461
  "data-testid": F("listbox"),
1458
1462
  id: `${r}-listbox`,
1459
1463
  ref: k,
1460
1464
  onMouseLeave: () => x(void 0),
1461
- style: u ? it : void 0
1462
- }, fr = (p) => `${r}-listbox-item-${p.id}`, ot = (p, _) => {
1465
+ style: u ? st : void 0
1466
+ }, vr = (p) => `${r}-listbox-item-${p.id}`, lt = (p, _) => {
1463
1467
  const h = () => p.id !== (c == null ? void 0 : c.id) && x({ ...p, isSetByClickEvent: !0 }), N = (p.id === (c == null ? void 0 : c.id) || !!a && !c && _ === 0) && !(c != null && c.isSetByClickEvent);
1464
1468
  return {
1465
1469
  "data-testid": F(`listbox-item-${p.id}`),
1466
- id: fr(p),
1470
+ id: vr(p),
1467
1471
  key: p.id,
1468
1472
  onMouseMove: h,
1469
- onMouseUp: () => dr(p),
1473
+ onMouseUp: () => _r(p),
1470
1474
  ref: (ur) => ur && (z.current[p.id] = ur),
1471
1475
  tabIndex: -1,
1472
1476
  selected: p.id === (f == null ? void 0 : f.id),
@@ -1474,32 +1478,32 @@ const pn = /* @__PURE__ */ an(on), sn = {
1474
1478
  highlighted: N,
1475
1479
  hovered: p.id === (c == null ? void 0 : c.id) && !!(c != null && c.isSetByClickEvent)
1476
1480
  };
1477
- }, pt = {
1478
- "aria-activedescendant": c ? fr(c) : void 0,
1481
+ }, ct = {
1482
+ "aria-activedescendant": c ? vr(c) : void 0,
1479
1483
  "aria-autocomplete": "list",
1480
- "aria-controls": _r.id,
1484
+ "aria-controls": fr.id,
1481
1485
  "data-testid": F("input"),
1482
1486
  autoComplete: "off",
1483
1487
  id: `${r}-input`,
1484
- onChange: et,
1485
- onMouseDown: nt,
1486
- onFocus: ut,
1487
- onKeyDown: tt,
1488
- onBlur: at,
1488
+ onChange: at,
1489
+ onMouseDown: it,
1490
+ onFocus: ot,
1491
+ onKeyDown: ut,
1492
+ onBlur: pt,
1489
1493
  ref: $,
1490
1494
  role: "combobox",
1491
1495
  value: l
1492
1496
  };
1493
1497
  return {
1494
1498
  id: r,
1495
- inputProps: pt,
1499
+ inputProps: ct,
1496
1500
  internalRef: T,
1497
1501
  optionsToShow: M,
1498
- showListbox: L,
1502
+ showListbox: I,
1499
1503
  noOptionsText: y,
1500
1504
  combobox: t,
1501
- getListBoxItemProps: ot,
1502
- listboxProps: _r
1505
+ getListBoxItemProps: lt,
1506
+ listboxProps: fr
1503
1507
  };
1504
1508
  }, tr = pn.bind(sn), Y = "purpur-autocomplete", _n = ({ className: t, renderInput: a, renderOption: n, ...i }, o) => {
1505
1509
  const {
@@ -1514,13 +1518,13 @@ const pn = /* @__PURE__ */ an(on), sn = {
1514
1518
  listboxProps: f
1515
1519
  } = dn(i), S = (l, c) => {
1516
1520
  const { key: x, ...$ } = d(l, c);
1517
- return /* @__PURE__ */ s(W.Item, { ...$, children: n ? n == null ? void 0 : n(l) : l.label }, x);
1521
+ return /* @__PURE__ */ s(Q.Item, { ...$, children: n ? n == null ? void 0 : n(l) : l.label }, x);
1518
1522
  }, C = (l) => {
1519
1523
  u.current = l, typeof o == "function" ? o(l) : o && (o.current = l);
1520
1524
  }, w = () => {
1521
1525
  const l = a(e);
1522
1526
  if (j && y && l && un(l)) {
1523
- const x = /* @__PURE__ */ O(st, { children: [
1527
+ const x = /* @__PURE__ */ O(dt, { children: [
1524
1528
  l.props.endAdornment,
1525
1529
  /* @__PURE__ */ s(
1526
1530
  "button",
@@ -1533,7 +1537,7 @@ const pn = /* @__PURE__ */ an(on), sn = {
1533
1537
  },
1534
1538
  "aria-hidden": "true",
1535
1539
  children: /* @__PURE__ */ s(
1536
- Or,
1540
+ Pr,
1537
1541
  {
1538
1542
  size: "sm",
1539
1543
  className: tr(`${Y}__chevron-icon`, {
@@ -1550,7 +1554,7 @@ const pn = /* @__PURE__ */ an(on), sn = {
1550
1554
  };
1551
1555
  return /* @__PURE__ */ O("div", { id: r, ref: C, className: tr([t, Y]), children: [
1552
1556
  w(),
1553
- b && /* @__PURE__ */ s(W, { ...f, className: tr(`${Y}__listbox`), children: v.length ? v.filter((l) => !!l).map(S) : /* @__PURE__ */ s(W.Item, { noninteractive: !0, children: y }) })
1557
+ b && /* @__PURE__ */ s(Q, { ...f, className: tr(`${Y}__listbox`), children: v.length ? v.filter((l) => !!l).map(S) : /* @__PURE__ */ s(Q.Item, { noninteractive: !0, children: y }) })
1554
1558
  ] });
1555
1559
  }, fn = P(_n);
1556
1560
  fn.displayName = "Autocomplete";