@purpurds/autocomplete 5.13.0 → 5.15.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.
@@ -1,7 +1,7 @@
1
- import { jsx as s, jsxs as O, Fragment as ot } from "react/jsx-runtime";
2
- import { forwardRef as P, Children as R, isValidElement as q, createElement as W, cloneElement as lr, useEffect as Nr, useId as pt, Fragment as st, useRef as Y, useCallback as lt, useState as ur } from "react";
1
+ import { jsx as s, jsxs as O, Fragment as st } from "react/jsx-runtime";
2
+ import { forwardRef as P, Children as B, 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";
3
3
  import "react-dom";
4
- function ct(t) {
4
+ function _t(t) {
5
5
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
6
6
  }
7
7
  var Ar = { exports: {} };
@@ -40,8 +40,8 @@ var Ar = { exports: {} };
40
40
  t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
41
41
  })();
42
42
  })(Ar);
43
- var dt = Ar.exports;
44
- const _t = /* @__PURE__ */ ct(dt), ft = {
43
+ var ft = Ar.exports;
44
+ const vt = /* @__PURE__ */ _t(ft), mt = {
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,44 +49,180 @@ const _t = /* @__PURE__ */ ct(dt), ft = {
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
- }, vt = {
53
- name: "checkmark",
54
- 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>',
55
- keywords: ["checkmark"],
56
- category: "utility"
57
- }, mt = {
52
+ }, gt = {
58
53
  name: "chevron-down",
59
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>',
60
55
  keywords: ["chevron-down"],
61
56
  category: "utility"
62
57
  }, Or = (t) => /* @__PURE__ */ s(
63
- Pr,
58
+ $t,
64
59
  {
65
60
  ...t,
66
- svg: mt
61
+ svg: gt
67
62
  }
68
63
  );
69
64
  Or.displayName = "IconChevronDown";
70
- const xt = _t.bind(ft), mr = "purpur-icon", gt = "md", bt = (t) => t.filter((a) => Object.keys(a).length >= 1).map((a) => `${a.name}="${a.value}"`).join(" "), ht = ({ content: t = "", title: a } = {}) => {
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 } = {}) => {
66
+ const n = [
67
+ { name: "xmlns", value: "http://www.w3.org/2000/svg" },
68
+ { name: "fill", value: "currentColor" },
69
+ { name: "viewBox", value: "0 0 24 24" },
70
+ a ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
71
+ ], i = a ? `<title>${a}</title>` : "";
72
+ return `<svg ${ht(n)}>${i}${t}</svg>`;
73
+ }, wt = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), $t = ({
74
+ ["data-testid"]: t,
75
+ svg: a,
76
+ allyTitle: n,
77
+ className: i,
78
+ size: o = bt,
79
+ ...r
80
+ }) => {
81
+ const e = yt({
82
+ content: wt(a.svg),
83
+ title: n
84
+ }), u = xt(i, vr, `${vr}--${o}`);
85
+ return /* @__PURE__ */ s(
86
+ "span",
87
+ {
88
+ "aria-label": n,
89
+ className: u,
90
+ "data-testid": t,
91
+ dangerouslySetInnerHTML: { __html: e },
92
+ ...r
93
+ }
94
+ );
95
+ };
96
+ function jt(t) {
97
+ return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
98
+ }
99
+ var Pr = { exports: {} };
100
+ /*!
101
+ Copyright (c) 2018 Jed Watson.
102
+ Licensed under the MIT License (MIT), see
103
+ http://jedwatson.github.io/classnames
104
+ */
105
+ (function(t) {
106
+ (function() {
107
+ var a = {}.hasOwnProperty;
108
+ function n() {
109
+ for (var r = "", e = 0; e < arguments.length; e++) {
110
+ var u = arguments[e];
111
+ u && (r = o(r, i.call(this, u)));
112
+ }
113
+ return r;
114
+ }
115
+ function i(r) {
116
+ if (typeof r == "string" || typeof r == "number")
117
+ return this && this[r] || r;
118
+ if (typeof r != "object")
119
+ return "";
120
+ if (Array.isArray(r))
121
+ return n.apply(this, r);
122
+ if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
123
+ return r.toString();
124
+ var e = "";
125
+ for (var u in r)
126
+ a.call(r, u) && r[u] && (e = o(e, this && this[u] || u));
127
+ return e;
128
+ }
129
+ function o(r, e) {
130
+ return e ? r ? r + " " + e : r + e : r;
131
+ }
132
+ t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
133
+ })();
134
+ })(Pr);
135
+ var St = Pr.exports;
136
+ const Mr = /* @__PURE__ */ jt(St), Cr = {
137
+ "purpur-listbox": "_purpur-listbox_qhoi7_1",
138
+ "purpur-listbox-item": "_purpur-listbox-item_qhoi7_15",
139
+ "purpur-listbox-item--hovered": "_purpur-listbox-item--hovered_qhoi7_29",
140
+ "purpur-listbox-item--highlighted": "_purpur-listbox-item--highlighted_qhoi7_37",
141
+ "purpur-listbox-item--noninteractive": "_purpur-listbox-item--noninteractive_qhoi7_41",
142
+ "purpur-listbox-item--disabled": "_purpur-listbox-item--disabled_qhoi7_44",
143
+ "purpur-listbox-item__icon": "_purpur-listbox-item__icon_qhoi7_51"
144
+ };
145
+ function Nt(t) {
146
+ return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
147
+ }
148
+ var Lr = { exports: {} };
149
+ /*!
150
+ Copyright (c) 2018 Jed Watson.
151
+ Licensed under the MIT License (MIT), see
152
+ http://jedwatson.github.io/classnames
153
+ */
154
+ (function(t) {
155
+ (function() {
156
+ var a = {}.hasOwnProperty;
157
+ function n() {
158
+ for (var r = "", e = 0; e < arguments.length; e++) {
159
+ var u = arguments[e];
160
+ u && (r = o(r, i.call(this, u)));
161
+ }
162
+ return r;
163
+ }
164
+ function i(r) {
165
+ if (typeof r == "string" || typeof r == "number")
166
+ return this && this[r] || r;
167
+ if (typeof r != "object")
168
+ return "";
169
+ if (Array.isArray(r))
170
+ return n.apply(this, r);
171
+ if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
172
+ return r.toString();
173
+ var e = "";
174
+ for (var u in r)
175
+ a.call(r, u) && r[u] && (e = o(e, this && this[u] || u));
176
+ return e;
177
+ }
178
+ function o(r, e) {
179
+ return e ? r ? r + " " + e : r + e : r;
180
+ }
181
+ t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
182
+ })();
183
+ })(Lr);
184
+ var At = Lr.exports;
185
+ const Ot = /* @__PURE__ */ Nt(At), Pt = {
186
+ "purpur-icon": "_purpur-icon_8u1lq_1",
187
+ "purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
188
+ "purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
189
+ "purpur-icon--sm": "_purpur-icon--sm_8u1lq_12",
190
+ "purpur-icon--md": "_purpur-icon--md_8u1lq_16",
191
+ "purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
192
+ "purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
193
+ }, Mt = {
194
+ name: "checkmark",
195
+ 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
+ keywords: ["checkmark"],
197
+ category: "utility"
198
+ }, qr = (t) => /* @__PURE__ */ s(
199
+ zt,
200
+ {
201
+ ...t,
202
+ svg: Mt
203
+ }
204
+ );
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 } = {}) => {
71
207
  const n = [
72
208
  { name: "xmlns", value: "http://www.w3.org/2000/svg" },
73
209
  { name: "fill", value: "currentColor" },
74
210
  { name: "viewBox", value: "0 0 24 24" },
75
211
  a ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
76
212
  ], i = a ? `<title>${a}</title>` : "";
77
- return `<svg ${bt(n)}>${i}${t}</svg>`;
78
- }, yt = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Pr = ({
213
+ return `<svg ${qt(n)}>${i}${t}</svg>`;
214
+ }, kt = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), zt = ({
79
215
  ["data-testid"]: t,
80
216
  svg: a,
81
217
  allyTitle: n,
82
218
  className: i,
83
- size: o = gt,
219
+ size: o = Lt,
84
220
  ...r
85
221
  }) => {
86
- const e = ht({
87
- content: yt(a.svg),
222
+ const e = It({
223
+ content: kt(a.svg),
88
224
  title: n
89
- }), u = xt(i, mr, `${mr}--${o}`);
225
+ }), u = Ct(i, mr, `${mr}--${o}`);
90
226
  return /* @__PURE__ */ s(
91
227
  "span",
92
228
  {
@@ -97,15 +233,146 @@ const xt = _t.bind(ft), mr = "purpur-icon", gt = "md", bt = (t) => t.filter((a)
97
233
  ...r
98
234
  }
99
235
  );
100
- }, wt = {
236
+ };
237
+ function Bt(t) {
238
+ return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
239
+ }
240
+ var Ir = { exports: {} };
241
+ /*!
242
+ Copyright (c) 2018 Jed Watson.
243
+ Licensed under the MIT License (MIT), see
244
+ http://jedwatson.github.io/classnames
245
+ */
246
+ (function(t) {
247
+ (function() {
248
+ var a = {}.hasOwnProperty;
249
+ function n() {
250
+ for (var r = "", e = 0; e < arguments.length; e++) {
251
+ var u = arguments[e];
252
+ u && (r = o(r, i(u)));
253
+ }
254
+ return r;
255
+ }
256
+ function i(r) {
257
+ if (typeof r == "string" || typeof r == "number")
258
+ return r;
259
+ if (typeof r != "object")
260
+ return "";
261
+ if (Array.isArray(r))
262
+ return n.apply(null, r);
263
+ if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
264
+ return r.toString();
265
+ var e = "";
266
+ for (var u in r)
267
+ a.call(r, u) && r[u] && (e = o(e, u));
268
+ return e;
269
+ }
270
+ function o(r, e) {
271
+ return e ? r ? r + " " + e : r + e : r;
272
+ }
273
+ t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
274
+ })();
275
+ })(Ir);
276
+ var Rt = Ir.exports;
277
+ const Et = /* @__PURE__ */ Bt(Rt), H = {
278
+ "purpur-paragraph": "_purpur-paragraph_1rh57_1",
279
+ "purpur-paragraph--disabled": "_purpur-paragraph--disabled_1rh57_7",
280
+ "purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_1rh57_10",
281
+ "purpur-paragraph--negative": "_purpur-paragraph--negative_1rh57_13",
282
+ "purpur-paragraph--paragraph-100": "_purpur-paragraph--paragraph-100_1rh57_16",
283
+ "purpur-paragraph--paragraph-100-medium": "_purpur-paragraph--paragraph-100-medium_1rh57_22",
284
+ "purpur-paragraph--paragraph-100-bold": "_purpur-paragraph--paragraph-100-bold_1rh57_29",
285
+ "purpur-paragraph--paragraph-200": "_purpur-paragraph--paragraph-200_1rh57_36",
286
+ "purpur-paragraph--preamble-100": "_purpur-paragraph--preamble-100_1rh57_42",
287
+ "purpur-paragraph--preamble-200": "_purpur-paragraph--preamble-200_1rh57_48",
288
+ "purpur-paragraph--additional-100": "_purpur-paragraph--additional-100_1rh57_54",
289
+ "purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_1rh57_60",
290
+ "purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_1rh57_67",
291
+ "purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1rh57_75"
292
+ }, Dt = {
293
+ PARAGRAPH100: "paragraph-100",
294
+ PARAGRAPH100MEDIUM: "paragraph-100-medium",
295
+ PARAGRAPH100BOLD: "paragraph-100-bold",
296
+ PARAGRAPH200: "paragraph-200",
297
+ PREAMBLE100: "preamble-100",
298
+ PREAMBLE200: "preamble-200",
299
+ ADDITIONAL100: "additional-100",
300
+ ADDITIONAL100MEDIUM: "additional-100-medium",
301
+ OVERLINE100: "overline-100",
302
+ OVERLINE200: "overline-200"
303
+ }, V = "purpur-paragraph", kr = ({
304
+ ["data-testid"]: t,
305
+ children: a,
306
+ className: n,
307
+ disabled: i,
308
+ enableHyphenation: o = !1,
309
+ negative: r = !1,
310
+ variant: e = Dt.PARAGRAPH100,
311
+ ...u
312
+ }) => {
313
+ const v = Et([
314
+ n,
315
+ H[V],
316
+ H[`${V}--${e}`],
317
+ {
318
+ [H[`${V}--hyphens`]]: o,
319
+ [H[`${V}--disabled`]]: i,
320
+ [H[`${V}--negative`]]: r
321
+ }
322
+ ]);
323
+ return /* @__PURE__ */ s("p", { ...u, className: v, "data-testid": t, children: a });
324
+ };
325
+ kr.displayName = "Paragraph";
326
+ const gr = Mr.bind(Cr), q = "purpur-listbox", lr = P(
327
+ (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
334
+ });
335
+ return /* @__PURE__ */ O(
336
+ "li",
337
+ {
338
+ ...v,
339
+ ref: a,
340
+ className: b,
341
+ "aria-selected": !!r,
342
+ role: "option",
343
+ "aria-disabled": !!n,
344
+ children: [
345
+ typeof e == "string" ? /* @__PURE__ */ s(kr, { children: e }) : e,
346
+ r && /* @__PURE__ */ s(qr, { size: "xs", className: gr(`${q}-item__icon`) })
347
+ ]
348
+ }
349
+ );
350
+ }
351
+ ), Tt = (t) => R(t) && (t == null ? void 0 : t.type) === lr;
352
+ lr.displayName = "ListBoxItem";
353
+ const Ft = Mr.bind(Cr), Gt = "purpur-listbox", W = P(
354
+ ({ children: t, ...a }, n) => /* @__PURE__ */ s(
355
+ "ul",
356
+ {
357
+ ...a,
358
+ ref: n,
359
+ className: Ft(Gt, a.className),
360
+ role: "listbox",
361
+ children: B.toArray(t).filter(Tt)
362
+ }
363
+ )
364
+ );
365
+ W.Item = lr;
366
+ W.displayName = "ListBox";
367
+ const Ht = {
101
368
  SM: "sm",
102
369
  MD: "md",
103
370
  LG: "lg"
104
371
  };
105
- function $t(t) {
372
+ function Vt(t) {
106
373
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
107
374
  }
108
- var Cr = { exports: {} };
375
+ var zr = { exports: {} };
109
376
  /*!
110
377
  Copyright (c) 2018 Jed Watson.
111
378
  Licensed under the MIT License (MIT), see
@@ -140,44 +407,44 @@ var Cr = { exports: {} };
140
407
  }
141
408
  t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
142
409
  })();
143
- })(Cr);
144
- var jt = Cr.exports;
145
- const xr = /* @__PURE__ */ $t(jt), St = "_rotate_1xozj_1", Nt = "_dash_1xozj_1", G = {
410
+ })(zr);
411
+ var Zt = zr.exports;
412
+ const xr = /* @__PURE__ */ Vt(Zt), Kt = "_rotate_1xozj_1", Xt = "_dash_1xozj_1", Z = {
146
413
  "purpur-spinner": "_purpur-spinner_1xozj_1",
147
- rotate: St,
414
+ rotate: Kt,
148
415
  "purpur-spinner--xxs": "_purpur-spinner--xxs_1xozj_4",
149
416
  "purpur-spinner--xs": "_purpur-spinner--xs_1xozj_8",
150
417
  "purpur-spinner--sm": "_purpur-spinner--sm_1xozj_12",
151
418
  "purpur-spinner--md": "_purpur-spinner--md_1xozj_16",
152
419
  "purpur-spinner--lg": "_purpur-spinner--lg_1xozj_20",
153
420
  "purpur-spinner__circle": "_purpur-spinner__circle_1xozj_24",
154
- dash: Nt,
421
+ dash: Xt,
155
422
  "purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_1xozj_33",
156
423
  "purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_1xozj_36"
157
- }, K = "purpur-spinner", At = {
424
+ }, K = "purpur-spinner", Ut = {
158
425
  XXS: "xxs",
159
426
  XS: "xs",
160
427
  SM: "sm",
161
428
  MD: "md",
162
429
  LG: "lg"
163
- }, Ot = ({
430
+ }, Yt = ({
164
431
  ["data-testid"]: t,
165
432
  disabled: a = !1,
166
433
  negative: n = !1,
167
- size: i = At.SM,
434
+ size: i = Ut.SM,
168
435
  ...o
169
436
  }) => /* @__PURE__ */ s(
170
437
  "div",
171
438
  {
172
- className: xr([G[K], G[`${K}--${i}`]]),
439
+ className: xr([Z[K], Z[`${K}--${i}`]]),
173
440
  "data-testid": t,
174
441
  ...o,
175
442
  children: /* @__PURE__ */ s("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ s(
176
443
  "circle",
177
444
  {
178
- className: xr(G[`${K}__circle`], {
179
- [G[`${K}__circle--disabled`]]: a,
180
- [G[`${K}__circle--negative`]]: n
445
+ className: xr(Z[`${K}__circle`], {
446
+ [Z[`${K}__circle--disabled`]]: a,
447
+ [Z[`${K}__circle--negative`]]: n
181
448
  }),
182
449
  cx: "25",
183
450
  cy: "25",
@@ -186,10 +453,10 @@ const xr = /* @__PURE__ */ $t(jt), St = "_rotate_1xozj_1", Nt = "_dash_1xozj_1",
186
453
  ) })
187
454
  }
188
455
  );
189
- function Pt(t) {
456
+ function Jt(t) {
190
457
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
191
458
  }
192
- var Mr = { exports: {} };
459
+ var Br = { exports: {} };
193
460
  /*!
194
461
  Copyright (c) 2018 Jed Watson.
195
462
  Licensed under the MIT License (MIT), see
@@ -224,9 +491,9 @@ var Mr = { exports: {} };
224
491
  }
225
492
  t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
226
493
  })();
227
- })(Mr);
228
- var Ct = Mr.exports;
229
- const Mt = /* @__PURE__ */ Pt(Ct), Lt = {
494
+ })(Br);
495
+ var Wt = Br.exports;
496
+ const Qt = /* @__PURE__ */ Jt(Wt), re = {
230
497
  "purpur-button": "_purpur-button_1acxn_1",
231
498
  "purpur-button--sm": "_purpur-button--sm_1acxn_33",
232
499
  "purpur-button--icon-only": "_purpur-button--icon-only_1acxn_36",
@@ -247,7 +514,7 @@ const Mt = /* @__PURE__ */ Pt(Ct), Lt = {
247
514
  "purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-negative_1acxn_160",
248
515
  "purpur-button--text-negative": "_purpur-button--text-negative_1acxn_175",
249
516
  "purpur-button--text": "_purpur-button--text_1acxn_175"
250
- }, It = Mt.bind(Lt), B = "purpur-button", Bt = ({
517
+ }, te = Qt.bind(re), I = "purpur-button", ee = ({
251
518
  children: t,
252
519
  className: a,
253
520
  ["data-testid"]: n,
@@ -264,20 +531,20 @@ const Mt = /* @__PURE__ */ Pt(Ct), Lt = {
264
531
  }, _) => {
265
532
  if (r && y === "destructive")
266
533
  return null;
267
- const j = It(
534
+ const j = te(
268
535
  [
269
- B,
270
- `${B}--${u ? `${y}-negative` : y}`,
271
- `${B}--${b}`
536
+ I,
537
+ `${I}--${u ? `${y}-negative` : y}`,
538
+ `${I}--${b}`
272
539
  ],
273
540
  {
274
- [`${B}--icon-only`]: r,
275
- [`${B}--negative`]: u,
276
- [`${B}--full-width`]: o,
277
- [`${B}--disabled`]: i || e
541
+ [`${I}--icon-only`]: r,
542
+ [`${I}--negative`]: u,
543
+ [`${I}--full-width`]: o,
544
+ [`${I}--disabled`]: i || e
278
545
  },
279
546
  a
280
- ), L = (l) => {
547
+ ), C = (l) => {
281
548
  i || e ? l.preventDefault() : v && v(l);
282
549
  }, w = !!d["aria-disabled"] || i || e;
283
550
  return /* @__PURE__ */ O(
@@ -288,21 +555,21 @@ const Mt = /* @__PURE__ */ Pt(Ct), Lt = {
288
555
  type: $,
289
556
  ref: _,
290
557
  "aria-disabled": w,
291
- onClick: L,
558
+ onClick: C,
292
559
  ...d,
293
560
  children: [
294
- e && /* @__PURE__ */ s(Ot, { size: b === wt.LG ? "xs" : "xxs", negative: u, disabled: w }),
561
+ e && /* @__PURE__ */ s(Yt, { size: b === Ht.LG ? "xs" : "xxs", negative: u, disabled: w }),
295
562
  " ",
296
563
  t
297
564
  ]
298
565
  }
299
566
  );
300
- }, Lr = P(Bt);
301
- Lr.displayName = "Button";
302
- function zt(t) {
567
+ }, Rr = P(ee);
568
+ Rr.displayName = "Button";
569
+ function ne(t) {
303
570
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
304
571
  }
305
- var Ir = { exports: {} };
572
+ var Er = { exports: {} };
306
573
  /*!
307
574
  Copyright (c) 2018 Jed Watson.
308
575
  Licensed under the MIT License (MIT), see
@@ -337,9 +604,9 @@ var Ir = { exports: {} };
337
604
  }
338
605
  t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
339
606
  })();
340
- })(Ir);
341
- var kt = Ir.exports;
342
- const Rt = /* @__PURE__ */ zt(kt), qt = {
607
+ })(Er);
608
+ var ue = Er.exports;
609
+ const ae = /* @__PURE__ */ ne(ue), ie = {
343
610
  "purpur-icon": "_purpur-icon_8u1lq_1",
344
611
  "purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
345
612
  "purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
@@ -347,31 +614,31 @@ const Rt = /* @__PURE__ */ zt(kt), qt = {
347
614
  "purpur-icon--md": "_purpur-icon--md_8u1lq_16",
348
615
  "purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
349
616
  "purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
350
- }, Et = {
617
+ }, oe = {
351
618
  name: "error-filled",
352
619
  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>',
353
620
  keywords: ["error-filled"],
354
621
  category: "status"
355
- }, Dt = Rt.bind(qt), gr = "purpur-icon", Tt = "md", Ft = (t) => t.filter((a) => Object.keys(a).length >= 1).map((a) => `${a.name}="${a.value}"`).join(" "), Gt = ({ content: t = "", title: a } = {}) => {
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 } = {}) => {
356
623
  const n = [
357
624
  { name: "xmlns", value: "http://www.w3.org/2000/svg" },
358
625
  { name: "fill", value: "currentColor" },
359
626
  { name: "viewBox", value: "0 0 24 24" },
360
627
  a ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
361
628
  ], i = a ? `<title>${a}</title>` : "";
362
- return `<svg ${Ft(n)}>${i}${t}</svg>`;
363
- }, Kt = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Zt = ({
629
+ return `<svg ${le(n)}>${i}${t}</svg>`;
630
+ }, de = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), _e = ({
364
631
  ["data-testid"]: t,
365
632
  svg: a,
366
633
  allyTitle: n,
367
634
  className: i,
368
- size: o = Tt,
635
+ size: o = se,
369
636
  ...r
370
637
  }) => {
371
- const e = Gt({
372
- content: Kt(a.svg),
638
+ const e = ce({
639
+ content: de(a.svg),
373
640
  title: n
374
- }), u = Dt(i, gr, `${gr}--${o}`);
641
+ }), u = pe(i, br, `${br}--${o}`);
375
642
  return /* @__PURE__ */ s(
376
643
  "span",
377
644
  {
@@ -383,10 +650,10 @@ const Rt = /* @__PURE__ */ zt(kt), qt = {
383
650
  }
384
651
  );
385
652
  };
386
- function Ht(t) {
653
+ function fe(t) {
387
654
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
388
655
  }
389
- var Br = { exports: {} };
656
+ var Dr = { exports: {} };
390
657
  /*!
391
658
  Copyright (c) 2018 Jed Watson.
392
659
  Licensed under the MIT License (MIT), see
@@ -421,12 +688,12 @@ var Br = { exports: {} };
421
688
  }
422
689
  t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
423
690
  })();
424
- })(Br);
425
- var Vt = Br.exports;
426
- const Ut = /* @__PURE__ */ Ht(Vt), br = {
691
+ })(Dr);
692
+ var ve = Dr.exports;
693
+ const me = /* @__PURE__ */ fe(ve), hr = {
427
694
  "purpur-field-error-text": "_purpur-field-error-text_1u768_1",
428
695
  "purpur-field-error-text__icon": "_purpur-field-error-text__icon_1u768_12"
429
- }, hr = "purpur-field-error-text", Xt = ({
696
+ }, yr = "purpur-field-error-text", ge = ({
430
697
  ["data-testid"]: t,
431
698
  children: a,
432
699
  className: n,
@@ -435,21 +702,21 @@ const Ut = /* @__PURE__ */ Ht(Vt), br = {
435
702
  }) => /* @__PURE__ */ O(
436
703
  "div",
437
704
  {
438
- className: Ut([n, br[hr]]),
705
+ className: me([n, hr[yr]]),
439
706
  "data-testid": t,
440
707
  "aria-live": "assertive",
441
708
  "aria-relevant": i,
442
709
  ...o,
443
710
  children: [
444
- /* @__PURE__ */ s(Zt, { svg: Et, size: "xs", className: br[`${hr}__icon`] }),
711
+ /* @__PURE__ */ s(_e, { svg: oe, size: "xs", className: hr[`${yr}__icon`] }),
445
712
  a
446
713
  ]
447
714
  }
448
715
  );
449
- function Yt(t) {
716
+ function xe(t) {
450
717
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
451
718
  }
452
- var zr = { exports: {} };
719
+ var Tr = { exports: {} };
453
720
  /*!
454
721
  Copyright (c) 2018 Jed Watson.
455
722
  Licensed under the MIT License (MIT), see
@@ -484,12 +751,12 @@ var zr = { exports: {} };
484
751
  }
485
752
  t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
486
753
  })();
487
- })(zr);
488
- var Wt = zr.exports;
489
- const Jt = /* @__PURE__ */ Yt(Wt), yr = {
754
+ })(Tr);
755
+ var be = Tr.exports;
756
+ const he = /* @__PURE__ */ xe(be), wr = {
490
757
  "purpur-field-helper-text": "_purpur-field-helper-text_atw6b_1",
491
758
  "purpur-field-helper-text--disabled": "_purpur-field-helper-text--disabled_atw6b_9"
492
- }, wr = "purpur-field-helper-text", Qt = ({
759
+ }, $r = "purpur-field-helper-text", ye = ({
493
760
  ["data-testid"]: t,
494
761
  children: a,
495
762
  className: n,
@@ -497,19 +764,19 @@ const Jt = /* @__PURE__ */ Yt(Wt), yr = {
497
764
  id: o,
498
765
  ...r
499
766
  }) => {
500
- const e = Jt([
767
+ const e = he([
501
768
  n,
502
- yr[wr],
769
+ wr[$r],
503
770
  {
504
- [yr[`${wr}--disabled`]]: i
771
+ [wr[`${$r}--disabled`]]: i
505
772
  }
506
773
  ]);
507
774
  return /* @__PURE__ */ s("span", { id: o, className: e, "data-testid": t, ...r, children: a });
508
775
  };
509
- function re(t) {
776
+ function we(t) {
510
777
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
511
778
  }
512
- var kr = { exports: {} };
779
+ var Fr = { exports: {} };
513
780
  /*!
514
781
  Copyright (c) 2018 Jed Watson.
515
782
  Licensed under the MIT License (MIT), see
@@ -544,9 +811,9 @@ var kr = { exports: {} };
544
811
  }
545
812
  t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
546
813
  })();
547
- })(kr);
548
- var te = kr.exports;
549
- const ee = /* @__PURE__ */ re(te), ne = {
814
+ })(Fr);
815
+ var $e = Fr.exports;
816
+ const je = /* @__PURE__ */ we($e), Se = {
550
817
  "purpur-icon": "_purpur-icon_8u1lq_1",
551
818
  "purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
552
819
  "purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
@@ -554,52 +821,52 @@ const ee = /* @__PURE__ */ re(te), ne = {
554
821
  "purpur-icon--md": "_purpur-icon--md_8u1lq_16",
555
822
  "purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
556
823
  "purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
557
- }, ue = {
824
+ }, Ne = {
558
825
  name: "check-circle-filled",
559
826
  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>',
560
827
  keywords: ["check-circle-filled"],
561
828
  category: "status"
562
- }, ae = {
829
+ }, Ae = {
563
830
  name: "close",
564
831
  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>',
565
832
  keywords: ["close"],
566
833
  category: "utility"
567
- }, Rr = (t) => /* @__PURE__ */ s(
568
- Er,
834
+ }, Gr = (t) => /* @__PURE__ */ s(
835
+ Vr,
569
836
  {
570
837
  ...t,
571
- svg: ue
838
+ svg: Ne
572
839
  }
573
840
  );
574
- Rr.displayName = "IconCheckCircleFilled";
575
- const qr = (t) => /* @__PURE__ */ s(
576
- Er,
841
+ Gr.displayName = "IconCheckCircleFilled";
842
+ const Hr = (t) => /* @__PURE__ */ s(
843
+ Vr,
577
844
  {
578
845
  ...t,
579
- svg: ae
846
+ svg: Ae
580
847
  }
581
848
  );
582
- qr.displayName = "IconClose";
583
- const ie = ee.bind(ne), $r = "purpur-icon", oe = "md", pe = (t) => t.filter((a) => Object.keys(a).length >= 1).map((a) => `${a.name}="${a.value}"`).join(" "), se = ({ content: t = "", title: a } = {}) => {
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 } = {}) => {
584
851
  const n = [
585
852
  { name: "xmlns", value: "http://www.w3.org/2000/svg" },
586
853
  { name: "fill", value: "currentColor" },
587
854
  { name: "viewBox", value: "0 0 24 24" },
588
855
  a ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
589
856
  ], i = a ? `<title>${a}</title>` : "";
590
- return `<svg ${pe(n)}>${i}${t}</svg>`;
591
- }, le = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Er = ({
857
+ return `<svg ${Me(n)}>${i}${t}</svg>`;
858
+ }, Le = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Vr = ({
592
859
  ["data-testid"]: t,
593
860
  svg: a,
594
861
  allyTitle: n,
595
862
  className: i,
596
- size: o = oe,
863
+ size: o = Pe,
597
864
  ...r
598
865
  }) => {
599
- const e = se({
600
- content: le(a.svg),
866
+ const e = Ce({
867
+ content: Le(a.svg),
601
868
  title: n
602
- }), u = ie(i, $r, `${$r}--${o}`);
869
+ }), u = Oe(i, jr, `${jr}--${o}`);
603
870
  return /* @__PURE__ */ s(
604
871
  "span",
605
872
  {
@@ -611,60 +878,49 @@ const ie = ee.bind(ne), $r = "purpur-icon", oe = "md", pe = (t) => t.filter((a)
611
878
  }
612
879
  );
613
880
  };
614
- function or() {
615
- return or = Object.assign ? Object.assign.bind() : function(t) {
881
+ function E() {
882
+ return E = Object.assign ? Object.assign.bind() : function(t) {
616
883
  for (var a = 1; a < arguments.length; a++) {
617
884
  var n = arguments[a];
618
- for (var i in n)
619
- Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
885
+ for (var i in n) ({}).hasOwnProperty.call(n, i) && (t[i] = n[i]);
620
886
  }
621
887
  return t;
622
- }, or.apply(this, arguments);
888
+ }, E.apply(null, arguments);
623
889
  }
624
- function J() {
625
- return J = Object.assign ? Object.assign.bind() : function(t) {
626
- for (var a = 1; a < arguments.length; a++) {
627
- var n = arguments[a];
628
- for (var i in n)
629
- Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
630
- }
631
- return t;
632
- }, J.apply(this, arguments);
633
- }
634
- function ce(t, a) {
890
+ function qe(t, a) {
635
891
  typeof t == "function" ? t(a) : t != null && (t.current = a);
636
892
  }
637
- function de(...t) {
893
+ function Ie(...t) {
638
894
  return (a) => t.forEach(
639
- (n) => ce(n, a)
895
+ (n) => qe(n, a)
640
896
  );
641
897
  }
642
- const Dr = /* @__PURE__ */ P((t, a) => {
643
- const { children: n, ...i } = t, o = R.toArray(n), r = o.find(fe);
898
+ const Zr = /* @__PURE__ */ P((t, a) => {
899
+ const { children: n, ...i } = t, o = B.toArray(n), r = o.find(ze);
644
900
  if (r) {
645
- const e = r.props.children, u = o.map((v) => v === r ? R.count(e) > 1 ? R.only(null) : /* @__PURE__ */ q(e) ? e.props.children : null : v);
646
- return /* @__PURE__ */ W(pr, J({}, i, {
901
+ const e = r.props.children, u = o.map((v) => v === r ? B.count(e) > 1 ? B.only(null) : /* @__PURE__ */ R(e) ? e.props.children : null : v);
902
+ return /* @__PURE__ */ Q(pr, E({}, i, {
647
903
  ref: a
648
- }), /* @__PURE__ */ q(e) ? /* @__PURE__ */ lr(e, void 0, u) : null);
904
+ }), /* @__PURE__ */ R(e) ? /* @__PURE__ */ sr(e, void 0, u) : null);
649
905
  }
650
- return /* @__PURE__ */ W(pr, J({}, i, {
906
+ return /* @__PURE__ */ Q(pr, E({}, i, {
651
907
  ref: a
652
908
  }), n);
653
909
  });
654
- Dr.displayName = "Slot";
910
+ Zr.displayName = "Slot";
655
911
  const pr = /* @__PURE__ */ P((t, a) => {
656
912
  const { children: n, ...i } = t;
657
- return /* @__PURE__ */ q(n) ? /* @__PURE__ */ lr(n, {
658
- ...ve(i, n.props),
659
- ref: a ? de(a, n.ref) : n.ref
660
- }) : R.count(n) > 1 ? R.only(null) : null;
913
+ return /* @__PURE__ */ R(n) ? /* @__PURE__ */ sr(n, {
914
+ ...Be(i, n.props),
915
+ ref: a ? Ie(a, n.ref) : n.ref
916
+ }) : B.count(n) > 1 ? B.only(null) : null;
661
917
  });
662
918
  pr.displayName = "SlotClone";
663
- const _e = ({ children: t }) => /* @__PURE__ */ W(st, null, t);
664
- function fe(t) {
665
- return /* @__PURE__ */ q(t) && t.type === _e;
919
+ const ke = ({ children: t }) => /* @__PURE__ */ Q(ct, null, t);
920
+ function ze(t) {
921
+ return /* @__PURE__ */ R(t) && t.type === ke;
666
922
  }
667
- function ve(t, a) {
923
+ function Be(t, a) {
668
924
  const n = {
669
925
  ...a
670
926
  };
@@ -685,7 +941,7 @@ function ve(t, a) {
685
941
  ...n
686
942
  };
687
943
  }
688
- const me = [
944
+ const Re = [
689
945
  "a",
690
946
  "button",
691
947
  "div",
@@ -702,12 +958,12 @@ const me = [
702
958
  "span",
703
959
  "svg",
704
960
  "ul"
705
- ], xe = me.reduce((t, a) => {
961
+ ], Ee = Re.reduce((t, a) => {
706
962
  const n = /* @__PURE__ */ P((i, o) => {
707
- const { asChild: r, ...e } = i, u = r ? Dr : a;
963
+ const { asChild: r, ...e } = i, u = r ? Zr : a;
708
964
  return Nr(() => {
709
965
  window[Symbol.for("radix-ui")] = !0;
710
- }, []), /* @__PURE__ */ W(u, J({}, e, {
966
+ }, []), /* @__PURE__ */ Q(u, E({}, e, {
711
967
  ref: o
712
968
  }));
713
969
  });
@@ -715,17 +971,17 @@ const me = [
715
971
  ...t,
716
972
  [a]: n
717
973
  };
718
- }, {}), ge = /* @__PURE__ */ P((t, a) => /* @__PURE__ */ W(xe.label, or({}, t, {
974
+ }, {}), De = /* @__PURE__ */ P((t, a) => /* @__PURE__ */ Q(Ee.label, E({}, t, {
719
975
  ref: a,
720
976
  onMouseDown: (n) => {
721
977
  var i;
722
978
  (i = t.onMouseDown) === null || i === void 0 || i.call(t, n), !n.defaultPrevented && n.detail > 1 && n.preventDefault();
723
979
  }
724
- }))), be = ge;
725
- function he(t) {
980
+ }))), Te = De;
981
+ function Fe(t) {
726
982
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
727
983
  }
728
- var Tr = { exports: {} };
984
+ var Kr = { exports: {} };
729
985
  /*!
730
986
  Copyright (c) 2018 Jed Watson.
731
987
  Licensed under the MIT License (MIT), see
@@ -760,13 +1016,13 @@ var Tr = { exports: {} };
760
1016
  }
761
1017
  t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
762
1018
  })();
763
- })(Tr);
764
- var ye = Tr.exports;
765
- const we = /* @__PURE__ */ he(ye), ar = {
1019
+ })(Kr);
1020
+ var Ge = Kr.exports;
1021
+ const He = /* @__PURE__ */ Fe(Ge), ir = {
766
1022
  "purpur-label": "_purpur-label_12cfi_1",
767
1023
  "purpur-label--negative": "_purpur-label--negative_12cfi_9",
768
1024
  "purpur-label--disabled": "_purpur-label--disabled_12cfi_12"
769
- }, ir = "purpur-label", $e = ({
1025
+ }, or = "purpur-label", Ve = ({
770
1026
  children: t,
771
1027
  className: a,
772
1028
  htmlFor: n,
@@ -775,20 +1031,20 @@ const we = /* @__PURE__ */ he(ye), ar = {
775
1031
  negative: r = !1,
776
1032
  ...e
777
1033
  }) => {
778
- const u = we([
1034
+ const u = He([
779
1035
  a,
780
- ar[ir],
1036
+ ir[or],
781
1037
  {
782
- [ar[`${ir}--disabled`]]: o,
783
- [ar[`${ir}--negative`]]: r
1038
+ [ir[`${or}--disabled`]]: o,
1039
+ [ir[`${or}--negative`]]: r
784
1040
  }
785
1041
  ]);
786
- return /* @__PURE__ */ s(be, { className: u, "data-testid": i, htmlFor: n, ...e, children: t });
1042
+ return /* @__PURE__ */ s(Te, { className: u, "data-testid": i, htmlFor: n, ...e, children: t });
787
1043
  };
788
- function je(t) {
1044
+ function Ze(t) {
789
1045
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
790
1046
  }
791
- var Fr = { exports: {} };
1047
+ var Xr = { exports: {} };
792
1048
  /*!
793
1049
  Copyright (c) 2018 Jed Watson.
794
1050
  Licensed under the MIT License (MIT), see
@@ -823,44 +1079,44 @@ var Fr = { exports: {} };
823
1079
  }
824
1080
  t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
825
1081
  })();
826
- })(Fr);
827
- var Se = Fr.exports;
828
- const jr = /* @__PURE__ */ je(Se), Ne = "_rotate_1xozj_1", Ae = "_dash_1xozj_1", Z = {
1082
+ })(Xr);
1083
+ var Ke = Xr.exports;
1084
+ const Sr = /* @__PURE__ */ Ze(Ke), Xe = "_rotate_1xozj_1", Ue = "_dash_1xozj_1", X = {
829
1085
  "purpur-spinner": "_purpur-spinner_1xozj_1",
830
- rotate: Ne,
1086
+ rotate: Xe,
831
1087
  "purpur-spinner--xxs": "_purpur-spinner--xxs_1xozj_4",
832
1088
  "purpur-spinner--xs": "_purpur-spinner--xs_1xozj_8",
833
1089
  "purpur-spinner--sm": "_purpur-spinner--sm_1xozj_12",
834
1090
  "purpur-spinner--md": "_purpur-spinner--md_1xozj_16",
835
1091
  "purpur-spinner--lg": "_purpur-spinner--lg_1xozj_20",
836
1092
  "purpur-spinner__circle": "_purpur-spinner__circle_1xozj_24",
837
- dash: Ae,
1093
+ dash: Ue,
838
1094
  "purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_1xozj_33",
839
1095
  "purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_1xozj_36"
840
- }, H = "purpur-spinner", Oe = {
1096
+ }, U = "purpur-spinner", Ye = {
841
1097
  XXS: "xxs",
842
1098
  XS: "xs",
843
1099
  SM: "sm",
844
1100
  MD: "md",
845
1101
  LG: "lg"
846
- }, Pe = ({
1102
+ }, Je = ({
847
1103
  ["data-testid"]: t,
848
1104
  disabled: a = !1,
849
1105
  negative: n = !1,
850
- size: i = Oe.SM,
1106
+ size: i = Ye.SM,
851
1107
  ...o
852
1108
  }) => /* @__PURE__ */ s(
853
1109
  "div",
854
1110
  {
855
- className: jr([Z[H], Z[`${H}--${i}`]]),
1111
+ className: Sr([X[U], X[`${U}--${i}`]]),
856
1112
  "data-testid": t,
857
1113
  ...o,
858
1114
  children: /* @__PURE__ */ s("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ s(
859
1115
  "circle",
860
1116
  {
861
- className: jr(Z[`${H}__circle`], {
862
- [Z[`${H}__circle--disabled`]]: a,
863
- [Z[`${H}__circle--negative`]]: n
1117
+ className: Sr(X[`${U}__circle`], {
1118
+ [X[`${U}__circle--disabled`]]: a,
1119
+ [X[`${U}__circle--negative`]]: n
864
1120
  }),
865
1121
  cx: "25",
866
1122
  cy: "25",
@@ -869,10 +1125,10 @@ const jr = /* @__PURE__ */ je(Se), Ne = "_rotate_1xozj_1", Ae = "_dash_1xozj_1",
869
1125
  ) })
870
1126
  }
871
1127
  );
872
- function Ce(t) {
1128
+ function We(t) {
873
1129
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
874
1130
  }
875
- var Gr = { exports: {} };
1131
+ var Ur = { exports: {} };
876
1132
  /*!
877
1133
  Copyright (c) 2018 Jed Watson.
878
1134
  Licensed under the MIT License (MIT), see
@@ -907,9 +1163,9 @@ var Gr = { exports: {} };
907
1163
  }
908
1164
  t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
909
1165
  })();
910
- })(Gr);
911
- var Me = Gr.exports;
912
- const Le = /* @__PURE__ */ Ce(Me), Ie = {
1166
+ })(Ur);
1167
+ var Qe = Ur.exports;
1168
+ const rn = /* @__PURE__ */ We(Qe), tn = {
913
1169
  "purpur-text-field": "_purpur-text-field_nj9f4_1",
914
1170
  "purpur-text-field__label": "_purpur-text-field__label_nj9f4_7",
915
1171
  "purpur-text-field__label-text": "_purpur-text-field__label-text_nj9f4_13",
@@ -926,7 +1182,7 @@ const Le = /* @__PURE__ */ Ce(Me), Ie = {
926
1182
  "purpur-text-field__input--error": "_purpur-text-field__input--error_nj9f4_94",
927
1183
  "purpur-text-field__adornment-container": "_purpur-text-field__adornment-container_nj9f4_106",
928
1184
  "purpur-text-field__valid-icon": "_purpur-text-field__valid-icon_nj9f4_111"
929
- }, Be = (t) => Y(t), A = Le.bind(Ie), x = "purpur-text-field", ze = ({
1185
+ }, en = (t) => J(t), A = rn.bind(tn), g = "purpur-text-field", nn = ({
930
1186
  ["data-testid"]: t,
931
1187
  className: a,
932
1188
  clearButtonAllyLabel: n,
@@ -942,14 +1198,14 @@ const Le = /* @__PURE__ */ Ce(Me), Ie = {
942
1198
  ...d
943
1199
  }, _) => {
944
1200
  var j;
945
- const L = pt(), w = d.id ?? L, l = (m) => t ? `${t}-${m}` : void 0, c = $ && !r, g = e ? `${w}-helper-text` : void 0, S = [y].filter((m) => !!m), E = (typeof d.value == "number" ? d.value !== void 0 : (j = d.value) == null ? void 0 : j.length) && !d.disabled && !d.readOnly && !v && b && n, D = Be(null), z = (m) => {
946
- D.current = m, typeof _ == "function" ? _(m) : _ && (_.current = m);
947
- }, Q = () => {
1201
+ const C = lt(), w = d.id ?? C, l = (m) => t ? `${t}-${m}` : void 0, c = $ && !r, x = e ? `${w}-helper-text` : void 0, S = [y].filter((m) => !!m), D = (typeof d.value == "number" ? d.value !== void 0 : (j = d.value) == null ? void 0 : j.length) && !d.disabled && !d.readOnly && !v && b && n, T = en(null), k = (m) => {
1202
+ T.current = m, typeof _ == "function" ? _(m) : _ && (_.current = m);
1203
+ }, rr = () => {
948
1204
  var m;
949
- b == null || b(), (m = D.current) == null || m.focus();
950
- }, k = [
1205
+ b == null || b(), (m = T.current) == null || m.focus();
1206
+ }, z = [
951
1207
  v && /* @__PURE__ */ s(
952
- Pe,
1208
+ Je,
953
1209
  {
954
1210
  disabled: d.disabled,
955
1211
  size: "xs",
@@ -957,55 +1213,55 @@ const Le = /* @__PURE__ */ Ce(Me), Ie = {
957
1213
  },
958
1214
  "spinner"
959
1215
  ),
960
- E && /* @__PURE__ */ s(
961
- Lr,
1216
+ D && /* @__PURE__ */ s(
1217
+ Rr,
962
1218
  {
963
1219
  variant: "tertiary-purple",
964
- onClick: Q,
1220
+ onClick: rr,
965
1221
  iconOnly: !0,
966
1222
  "aria-label": n ?? "",
967
1223
  "data-testid": l("clear-button"),
968
1224
  tabIndex: -1,
969
- children: /* @__PURE__ */ s(qr, { size: "xs" })
1225
+ children: /* @__PURE__ */ s(Hr, { size: "xs" })
970
1226
  },
971
1227
  "clear-button"
972
1228
  ),
973
1229
  c && /* @__PURE__ */ s(
974
- Rr,
1230
+ Gr,
975
1231
  {
976
1232
  "data-testid": l("valid-icon"),
977
- className: A(`${x}__valid-icon`)
1233
+ className: A(`${g}__valid-icon`)
978
1234
  },
979
1235
  "valid-icon"
980
1236
  )
981
- ].filter((m) => !!m), T = A([
982
- `${x}__input-container`,
1237
+ ].filter((m) => !!m), F = A([
1238
+ `${g}__input-container`,
983
1239
  {
984
- [`${x}__input-container--start-adornment`]: S.length,
985
- [`${x}__input-container--end-adornment`]: k.length || o,
986
- [`${x}__input-container--disabled`]: d.disabled,
987
- [`${x}__input-container--has-clear-button`]: E,
988
- [`${x}__input-container--readonly`]: d.readOnly && !d.disabled
1240
+ [`${g}__input-container--start-adornment`]: S.length,
1241
+ [`${g}__input-container--end-adornment`]: z.length || o,
1242
+ [`${g}__input-container--disabled`]: d.disabled,
1243
+ [`${g}__input-container--has-clear-button`]: D,
1244
+ [`${g}__input-container--readonly`]: d.readOnly && !d.disabled
989
1245
  }
990
1246
  ]);
991
- return /* @__PURE__ */ O("div", { className: A(a, x), children: [
1247
+ return /* @__PURE__ */ O("div", { className: A(a, g), children: [
992
1248
  u && /* @__PURE__ */ s(
993
- $e,
1249
+ Ve,
994
1250
  {
995
1251
  htmlFor: w,
996
- className: A(`${x}__label`),
1252
+ className: A(`${g}__label`),
997
1253
  "data-testid": l("label"),
998
1254
  disabled: d.disabled,
999
1255
  children: `${d.required ? "* " : ""}${u}`
1000
1256
  }
1001
1257
  ),
1002
- /* @__PURE__ */ O("div", { className: A(`${x}__field-row`), children: [
1003
- /* @__PURE__ */ O("div", { className: T, children: [
1258
+ /* @__PURE__ */ O("div", { className: A(`${g}__field-row`), children: [
1259
+ /* @__PURE__ */ O("div", { className: F, children: [
1004
1260
  !!S.length && /* @__PURE__ */ s(
1005
1261
  "div",
1006
1262
  {
1007
1263
  "data-testid": l("start-adornments"),
1008
- className: A(`${x}__adornment-container`),
1264
+ className: A(`${g}__adornment-container`),
1009
1265
  children: S
1010
1266
  }
1011
1267
  ),
@@ -1014,27 +1270,27 @@ const Le = /* @__PURE__ */ Ce(Me), Ie = {
1014
1270
  {
1015
1271
  ...d,
1016
1272
  id: w,
1017
- ref: z,
1273
+ ref: k,
1018
1274
  "data-testid": l("input"),
1019
- "aria-describedby": d["aria-describedby"] || g,
1275
+ "aria-describedby": d["aria-describedby"] || x,
1020
1276
  "aria-invalid": d["aria-invalid"] || !!r,
1021
1277
  className: A([
1022
- `${x}__input`,
1278
+ `${g}__input`,
1023
1279
  {
1024
- [`${x}__input--valid`]: c,
1025
- [`${x}__input--error`]: !!r
1280
+ [`${g}__input--valid`]: c,
1281
+ [`${g}__input--error`]: !!r
1026
1282
  }
1027
1283
  ])
1028
1284
  }
1029
1285
  ),
1030
- /* @__PURE__ */ s("div", { className: A(`${x}__frame`) }),
1031
- (!!k.length || o) && /* @__PURE__ */ O(
1286
+ /* @__PURE__ */ s("div", { className: A(`${g}__frame`) }),
1287
+ (!!z.length || o) && /* @__PURE__ */ O(
1032
1288
  "div",
1033
1289
  {
1034
1290
  "data-testid": l("end-adornments"),
1035
- className: A(`${x}__adornment-container`),
1291
+ className: A(`${g}__adornment-container`),
1036
1292
  children: [
1037
- k,
1293
+ z,
1038
1294
  o
1039
1295
  ]
1040
1296
  }
@@ -1042,16 +1298,16 @@ const Le = /* @__PURE__ */ Ce(Me), Ie = {
1042
1298
  ] }),
1043
1299
  !!i && i
1044
1300
  ] }),
1045
- g && /* @__PURE__ */ s(Qt, { "data-testid": l("helper-text"), id: g, children: e }),
1046
- r && /* @__PURE__ */ s(Xt, { "data-testid": l("error-text"), children: r })
1301
+ x && /* @__PURE__ */ s(ye, { "data-testid": l("helper-text"), id: x, children: e }),
1302
+ r && /* @__PURE__ */ s(ge, { "data-testid": l("error-text"), children: r })
1047
1303
  ] });
1048
- }, Kr = P(ze);
1049
- Kr.displayName = "TextField";
1050
- const ke = (t) => q(t) && t.type.displayName === Kr.displayName;
1051
- function Re(t) {
1304
+ }, Yr = P(nn);
1305
+ Yr.displayName = "TextField";
1306
+ const un = (t) => R(t) && t.type.displayName === Yr.displayName;
1307
+ function an(t) {
1052
1308
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
1053
1309
  }
1054
- var Zr = { exports: {} };
1310
+ var Jr = { exports: {} };
1055
1311
  /*!
1056
1312
  Copyright (c) 2018 Jed Watson.
1057
1313
  Licensed under the MIT License (MIT), see
@@ -1086,114 +1342,16 @@ var Zr = { exports: {} };
1086
1342
  }
1087
1343
  t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
1088
1344
  })();
1089
- })(Zr);
1090
- var qe = Zr.exports;
1091
- const Hr = /* @__PURE__ */ Re(qe), Ee = {
1345
+ })(Jr);
1346
+ var on = Jr.exports;
1347
+ const pn = /* @__PURE__ */ an(on), sn = {
1092
1348
  "purpur-autocomplete": "_purpur-autocomplete_1u8x6_1",
1093
1349
  "purpur-autocomplete__listbox": "_purpur-autocomplete__listbox_1u8x6_4",
1094
1350
  "purpur-autocomplete__chevron-button": "_purpur-autocomplete__chevron-button_1u8x6_9",
1095
1351
  "purpur-autocomplete__chevron-icon": "_purpur-autocomplete__chevron-icon_1u8x6_15",
1096
1352
  "purpur-autocomplete__chevron-icon--up": "_purpur-autocomplete__chevron-icon--up_1u8x6_19"
1097
- };
1098
- function De(t) {
1099
- return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
1100
- }
1101
- var Vr = { exports: {} };
1102
- /*!
1103
- Copyright (c) 2018 Jed Watson.
1104
- Licensed under the MIT License (MIT), see
1105
- http://jedwatson.github.io/classnames
1106
- */
1107
- (function(t) {
1108
- (function() {
1109
- var a = {}.hasOwnProperty;
1110
- function n() {
1111
- for (var r = "", e = 0; e < arguments.length; e++) {
1112
- var u = arguments[e];
1113
- u && (r = o(r, i(u)));
1114
- }
1115
- return r;
1116
- }
1117
- function i(r) {
1118
- if (typeof r == "string" || typeof r == "number")
1119
- return r;
1120
- if (typeof r != "object")
1121
- return "";
1122
- if (Array.isArray(r))
1123
- return n.apply(null, r);
1124
- if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
1125
- return r.toString();
1126
- var e = "";
1127
- for (var u in r)
1128
- a.call(r, u) && r[u] && (e = o(e, u));
1129
- return e;
1130
- }
1131
- function o(r, e) {
1132
- return e ? r ? r + " " + e : r + e : r;
1133
- }
1134
- t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
1135
- })();
1136
- })(Vr);
1137
- var Te = Vr.exports;
1138
- const Fe = /* @__PURE__ */ De(Te), V = {
1139
- "purpur-paragraph": "_purpur-paragraph_1rh57_1",
1140
- "purpur-paragraph--disabled": "_purpur-paragraph--disabled_1rh57_7",
1141
- "purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_1rh57_10",
1142
- "purpur-paragraph--negative": "_purpur-paragraph--negative_1rh57_13",
1143
- "purpur-paragraph--paragraph-100": "_purpur-paragraph--paragraph-100_1rh57_16",
1144
- "purpur-paragraph--paragraph-100-medium": "_purpur-paragraph--paragraph-100-medium_1rh57_22",
1145
- "purpur-paragraph--paragraph-100-bold": "_purpur-paragraph--paragraph-100-bold_1rh57_29",
1146
- "purpur-paragraph--paragraph-200": "_purpur-paragraph--paragraph-200_1rh57_36",
1147
- "purpur-paragraph--preamble-100": "_purpur-paragraph--preamble-100_1rh57_42",
1148
- "purpur-paragraph--preamble-200": "_purpur-paragraph--preamble-200_1rh57_48",
1149
- "purpur-paragraph--additional-100": "_purpur-paragraph--additional-100_1rh57_54",
1150
- "purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_1rh57_60",
1151
- "purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_1rh57_67",
1152
- "purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1rh57_75"
1153
- }, Ge = {
1154
- PARAGRAPH100: "paragraph-100",
1155
- PARAGRAPH100MEDIUM: "paragraph-100-medium",
1156
- PARAGRAPH100BOLD: "paragraph-100-bold",
1157
- PARAGRAPH200: "paragraph-200",
1158
- PREAMBLE100: "preamble-100",
1159
- PREAMBLE200: "preamble-200",
1160
- ADDITIONAL100: "additional-100",
1161
- ADDITIONAL100MEDIUM: "additional-100-medium",
1162
- OVERLINE100: "overline-100",
1163
- OVERLINE200: "overline-200"
1164
- }, U = "purpur-paragraph", Ur = ({
1165
- ["data-testid"]: t,
1166
- children: a,
1167
- className: n,
1168
- disabled: i,
1169
- enableHyphenation: o = !1,
1170
- negative: r = !1,
1171
- variant: e = Ge.PARAGRAPH100,
1172
- ...u
1173
- }) => {
1174
- const v = Fe([
1175
- n,
1176
- V[U],
1177
- V[`${U}--${e}`],
1178
- {
1179
- [V[`${U}--hyphens`]]: o,
1180
- [V[`${U}--disabled`]]: i,
1181
- [V[`${U}--negative`]]: r
1182
- }
1183
- ]);
1184
- return /* @__PURE__ */ s("p", { ...u, className: v, "data-testid": t, children: a });
1185
- };
1186
- Ur.displayName = "Paragraph";
1187
- const Ke = {
1188
- "purpur-listbox": "_purpur-listbox_qhoi7_1",
1189
- "purpur-listbox-item": "_purpur-listbox-item_qhoi7_15",
1190
- "purpur-listbox-item--hovered": "_purpur-listbox-item--hovered_qhoi7_29",
1191
- "purpur-listbox-item--highlighted": "_purpur-listbox-item--highlighted_qhoi7_37",
1192
- "purpur-listbox-item--noninteractive": "_purpur-listbox-item--noninteractive_qhoi7_41",
1193
- "purpur-listbox-item--disabled": "_purpur-listbox-item--disabled_qhoi7_44",
1194
- "purpur-listbox-item__icon": "_purpur-listbox-item__icon_qhoi7_51"
1195
- }, Ze = (t) => Y(t), He = (t, a) => {
1196
- const n = lt(
1353
+ }, ln = (t) => J(t), cn = (t, a) => {
1354
+ const n = dt(
1197
1355
  (i) => {
1198
1356
  t && !t.contains(i.target) && a();
1199
1357
  },
@@ -1202,7 +1360,7 @@ const Ke = {
1202
1360
  Nr(() => (document.addEventListener("mousedown", n), () => {
1203
1361
  document.removeEventListener("mousedown", n);
1204
1362
  }), [n]);
1205
- }, Ve = ({
1363
+ }, dn = ({
1206
1364
  combobox: t,
1207
1365
  highlightFirstOption: a,
1208
1366
  defaultInputValue: n,
@@ -1219,21 +1377,21 @@ const Ke = {
1219
1377
  selectedOption: _,
1220
1378
  ["data-testid"]: j
1221
1379
  }) => {
1222
- const [L, w] = ur(
1380
+ const [C, w] = ar(
1223
1381
  ((typeof i == "string" ? i : n) || (_ == null ? void 0 : _.label)) ?? ""
1224
- ), l = typeof i == "string" ? i : L, [c, g] = ur(a ? d[0] : void 0), S = Y(null), E = Ze(null), D = Y(null), z = Y({}), [Q, k] = ur(!1);
1225
- function T(p) {
1382
+ ), l = typeof i == "string" ? i : C, [c, x] = ar(a ? d[0] : void 0), S = J(null), D = ln(null), T = J(null), k = J({}), [rr, z] = ar(!1);
1383
+ function F(p) {
1226
1384
  return j ? `${j}-${p}` : void 0;
1227
1385
  }
1228
1386
  const m = () => {
1229
- k(!1), g(void 0);
1387
+ z(!1), x(void 0);
1230
1388
  };
1231
- He(E.current, m);
1232
- const F = ({ eventType: p }) => {
1233
- k(!0), _ && requestAnimationFrame(() => {
1234
- g({ ..._, isSetByClickEvent: p === "CLICK" }), er(z.current[_.id]);
1389
+ cn(D.current, m);
1390
+ const G = ({ eventType: p }) => {
1391
+ z(!0), _ && requestAnimationFrame(() => {
1392
+ x({ ..._, isSetByClickEvent: p === "CLICK" }), nr(k.current[_.id]);
1235
1393
  });
1236
- }, Yr = (p) => {
1394
+ }, Wr = (p) => {
1237
1395
  if (o)
1238
1396
  return d.filter((h) => o(p, h));
1239
1397
  if (!p)
@@ -1244,33 +1402,33 @@ const Ke = {
1244
1402
  (N) => (h.value || h.label).toUpperCase().includes(N)
1245
1403
  )
1246
1404
  );
1247
- }, dr = (p) => _ && (_ == null ? void 0 : _.label) === p ? d : Yr(p), C = dr(l), tr = (p) => {
1405
+ }, cr = (p) => _ && (_ == null ? void 0 : _.label) === p ? d : Wr(p), M = cr(l), er = (p) => {
1248
1406
  v == null || v(p), w(p);
1249
- }, er = (p) => {
1407
+ }, nr = (p) => {
1250
1408
  var f;
1251
1409
  if (p) {
1252
- const h = p.getBoundingClientRect(), N = ((f = D.current) == null ? void 0 : f.getBoundingClientRect()) || { top: 0, bottom: 0 };
1410
+ const h = p.getBoundingClientRect(), N = ((f = T.current) == null ? void 0 : f.getBoundingClientRect()) || { top: 0, bottom: 0 };
1253
1411
  (h.top < N.top || h.bottom > N.bottom) && p.scrollIntoView({ block: "nearest" });
1254
1412
  }
1255
- }, _r = (p) => {
1413
+ }, dr = (p) => {
1256
1414
  var f;
1257
- p && ((f = S.current) == null || f.focus(), tr(p.label), $ == null || $(p)), m();
1258
- }, Wr = (p) => {
1259
- const f = a && !c ? 0 : C.findIndex((N) => N && (c == null ? void 0 : c.id) === N.id), h = C.length;
1260
- return p === "ArrowDown" ? C[(f ?? -1) + 1] || C[0] : C[(f ?? h) - 1] || C[h - 1];
1261
- }, I = Q && (!!C.length || !!y), Jr = (p) => {
1262
- !I && F({ eventType: "KEYBOARD" });
1263
- const f = Wr(p);
1264
- g(f), f && er(z.current[f.id]);
1415
+ p && ((f = S.current) == null || f.focus(), er(p.label), $ == null || $(p)), m();
1265
1416
  }, Qr = (p) => {
1417
+ const f = a && !c ? 0 : M.findIndex((N) => N && (c == null ? void 0 : c.id) === N.id), h = M.length;
1418
+ return p === "ArrowDown" ? M[(f ?? -1) + 1] || M[0] : M[(f ?? h) - 1] || M[h - 1];
1419
+ }, L = rr && (!!M.length || !!y), rt = (p) => {
1420
+ !L && G({ eventType: "KEYBOARD" });
1421
+ const f = Qr(p);
1422
+ x(f), f && nr(k.current[f.id]);
1423
+ }, tt = (p) => {
1266
1424
  switch (p.key) {
1267
1425
  case "ArrowUp":
1268
1426
  case "ArrowDown":
1269
- p.preventDefault(), Jr(p.key);
1427
+ p.preventDefault(), rt(p.key);
1270
1428
  break;
1271
1429
  case "Enter": {
1272
1430
  const f = c || (a ? d[0] : void 0);
1273
- I && _r(f), !I && F({ eventType: "KEYBOARD" });
1431
+ L && dr(f), !L && G({ eventType: "KEYBOARD" });
1274
1432
  break;
1275
1433
  }
1276
1434
  case "Escape":
@@ -1278,110 +1436,69 @@ const Ke = {
1278
1436
  m();
1279
1437
  break;
1280
1438
  }
1281
- }, rt = (p) => {
1282
- const f = dr(p.target.value);
1283
- tr(p.target.value), g(void 0), !I && F({ eventType: "KEYBOARD" }), a && f[0] && er(z.current[f[0].id]);
1284
- }, tt = () => {
1285
- I ? m() : F({ eventType: "CLICK" });
1286
- }, et = () => {
1287
- var p;
1288
- !Q && b && F({ eventType: "KEYBOARD" }), (p = S.current) == null || p.select();
1439
+ }, et = (p) => {
1440
+ const f = cr(p.target.value);
1441
+ er(p.target.value), x(void 0), !L && G({ eventType: "KEYBOARD" }), a && f[0] && nr(k.current[f[0].id]);
1289
1442
  }, nt = () => {
1290
- t && tr((_ == null ? void 0 : _.label) ?? "");
1291
- }, ut = {
1443
+ L ? m() : G({ eventType: "CLICK" });
1444
+ }, ut = () => {
1445
+ var p;
1446
+ !rr && b && G({ eventType: "KEYBOARD" }), (p = S.current) == null || p.select();
1447
+ }, at = () => {
1448
+ t && er((_ == null ? void 0 : _.label) ?? "");
1449
+ }, it = {
1292
1450
  maxHeight: typeof u == "number" ? `${u}px` : u
1293
- }, fr = {
1451
+ }, _r = {
1294
1452
  "aria-label": e,
1295
- "aria-expanded": I,
1296
- "data-testid": T("listbox"),
1453
+ "aria-expanded": L,
1454
+ "data-testid": F("listbox"),
1297
1455
  id: `${r}-listbox`,
1298
- ref: D,
1299
- onMouseLeave: () => g(void 0),
1300
- style: u ? ut : void 0
1301
- }, vr = (p) => `${r}-listbox-item-${p.id}`, at = (p, f) => {
1302
- const h = () => p.id !== (c == null ? void 0 : c.id) && g({ ...p, isSetByClickEvent: !0 }), N = (p.id === (c == null ? void 0 : c.id) || !!a && !c && f === 0) && !(c != null && c.isSetByClickEvent);
1456
+ ref: T,
1457
+ onMouseLeave: () => x(void 0),
1458
+ style: u ? it : void 0
1459
+ }, fr = (p) => `${r}-listbox-item-${p.id}`, ot = (p, f) => {
1460
+ 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 && f === 0) && !(c != null && c.isSetByClickEvent);
1303
1461
  return {
1304
- "data-testid": T(`listbox-item-${p.id}`),
1305
- id: vr(p),
1462
+ "data-testid": F(`listbox-item-${p.id}`),
1463
+ id: fr(p),
1306
1464
  key: p.id,
1307
1465
  onMouseMove: h,
1308
- onMouseUp: () => _r(p),
1309
- ref: (nr) => nr && (z.current[p.id] = nr),
1466
+ onMouseUp: () => dr(p),
1467
+ ref: (ur) => ur && (k.current[p.id] = ur),
1310
1468
  tabIndex: -1,
1311
1469
  selected: p.id === (_ == null ? void 0 : _.id),
1312
1470
  disabled: p.disabled,
1313
1471
  highlighted: N,
1314
1472
  hovered: p.id === (c == null ? void 0 : c.id) && !!(c != null && c.isSetByClickEvent)
1315
1473
  };
1316
- }, it = {
1317
- "aria-activedescendant": c ? vr(c) : void 0,
1474
+ }, pt = {
1475
+ "aria-activedescendant": c ? fr(c) : void 0,
1318
1476
  "aria-autocomplete": "list",
1319
- "aria-controls": fr.id,
1320
- "data-testid": T("input"),
1477
+ "aria-controls": _r.id,
1478
+ "data-testid": F("input"),
1321
1479
  autoComplete: "off",
1322
1480
  id: `${r}-input`,
1323
- onChange: rt,
1324
- onMouseDown: tt,
1325
- onFocus: et,
1326
- onKeyDown: Qr,
1327
- onBlur: nt,
1481
+ onChange: et,
1482
+ onMouseDown: nt,
1483
+ onFocus: ut,
1484
+ onKeyDown: tt,
1485
+ onBlur: at,
1328
1486
  ref: S,
1329
1487
  role: "combobox",
1330
1488
  value: l
1331
1489
  };
1332
1490
  return {
1333
1491
  id: r,
1334
- inputProps: it,
1335
- internalRef: E,
1336
- optionsToShow: C,
1337
- showListbox: I,
1492
+ inputProps: pt,
1493
+ internalRef: D,
1494
+ optionsToShow: M,
1495
+ showListbox: L,
1338
1496
  noOptionsText: y,
1339
1497
  combobox: t,
1340
- getListBoxItemProps: at,
1341
- listboxProps: fr
1498
+ getListBoxItemProps: ot,
1499
+ listboxProps: _r
1342
1500
  };
1343
- }, sr = Hr.bind(Ke), M = "purpur-listbox", Xr = P(
1344
- ({ children: t, ...a }, n) => /* @__PURE__ */ s(
1345
- "ul",
1346
- {
1347
- ...a,
1348
- ref: n,
1349
- className: sr(M, a.className),
1350
- role: "listbox",
1351
- children: R.toArray(t).filter(Ue)
1352
- }
1353
- )
1354
- );
1355
- Xr.displayName = "ListBox";
1356
- const cr = P((t, a) => {
1357
- const { disabled: n, highlighted: i, hovered: o, selected: r, children: e, noninteractive: u, ...v } = t, b = sr(`${M}-item`, v.className, {
1358
- [`${M}-item--highlighted`]: i,
1359
- [`${M}-item--selected`]: r,
1360
- [`${M}-item--hovered`]: o,
1361
- [`${M}-item--disabled`]: n,
1362
- [`${M}-item--noninteractive`]: u
1363
- });
1364
- return /* @__PURE__ */ O(
1365
- "li",
1366
- {
1367
- ...v,
1368
- ref: a,
1369
- className: b,
1370
- "aria-selected": !!r,
1371
- role: "option",
1372
- "aria-disabled": !!n,
1373
- children: [
1374
- typeof e == "string" ? /* @__PURE__ */ s(Ur, { children: e }) : e,
1375
- r && /* @__PURE__ */ s(Pr, { svg: vt, size: "xs", className: sr(`${M}-item__icon`) })
1376
- ]
1377
- }
1378
- );
1379
- });
1380
- cr.displayName = "ListBoxItem";
1381
- function Ue(t) {
1382
- return q(t) && (t == null ? void 0 : t.type) === cr;
1383
- }
1384
- const Xe = Xr, Sr = cr, rr = Hr.bind(Ee), X = "purpur-autocomplete", Ye = ({ className: t, renderInput: a, renderOption: n, ...i }, o) => {
1501
+ }, tr = pn.bind(sn), Y = "purpur-autocomplete", _n = ({ className: t, renderInput: a, renderOption: n, ...i }, o) => {
1385
1502
  const {
1386
1503
  id: r,
1387
1504
  inputProps: e,
@@ -1392,22 +1509,22 @@ const Xe = Xr, Sr = cr, rr = Hr.bind(Ee), X = "purpur-autocomplete", Ye = ({ cla
1392
1509
  combobox: $,
1393
1510
  getListBoxItemProps: d,
1394
1511
  listboxProps: _
1395
- } = Ve(i), j = (l, c) => {
1396
- const { key: g, ...S } = d(l, c);
1397
- return /* @__PURE__ */ s(Sr, { ...S, children: n ? n == null ? void 0 : n(l) : l.label }, g);
1398
- }, L = (l) => {
1512
+ } = dn(i), j = (l, c) => {
1513
+ const { key: x, ...S } = d(l, c);
1514
+ return /* @__PURE__ */ s(W.Item, { ...S, children: n ? n == null ? void 0 : n(l) : l.label }, x);
1515
+ }, C = (l) => {
1399
1516
  u.current = l, typeof o == "function" ? o(l) : o && (o.current = l);
1400
1517
  }, w = () => {
1401
1518
  const l = a(e);
1402
- if ($ && y && l && ke(l)) {
1403
- const g = /* @__PURE__ */ O(ot, { children: [
1519
+ if ($ && y && l && un(l)) {
1520
+ const x = /* @__PURE__ */ O(st, { children: [
1404
1521
  l.props.endAdornment,
1405
1522
  /* @__PURE__ */ s(
1406
1523
  "button",
1407
1524
  {
1408
1525
  "data-testid": "chevron button",
1409
1526
  type: "button",
1410
- className: rr(`${X}__chevron-button`),
1527
+ className: tr(`${Y}__chevron-button`),
1411
1528
  onClick: () => {
1412
1529
  e.onFocus(), e.onMouseDown();
1413
1530
  },
@@ -1416,26 +1533,26 @@ const Xe = Xr, Sr = cr, rr = Hr.bind(Ee), X = "purpur-autocomplete", Ye = ({ cla
1416
1533
  Or,
1417
1534
  {
1418
1535
  size: "sm",
1419
- className: rr(`${X}__chevron-icon`, {
1420
- [`${X}__chevron-icon--up`]: b
1536
+ className: tr(`${Y}__chevron-icon`, {
1537
+ [`${Y}__chevron-icon--up`]: b
1421
1538
  })
1422
1539
  }
1423
1540
  )
1424
1541
  }
1425
1542
  )
1426
1543
  ] });
1427
- return lr(l, { endAdornment: g });
1544
+ return sr(l, { endAdornment: x });
1428
1545
  }
1429
1546
  return l;
1430
1547
  };
1431
- return /* @__PURE__ */ O("div", { id: r, ref: L, className: rr([t, X]), children: [
1548
+ return /* @__PURE__ */ O("div", { id: r, ref: C, className: tr([t, Y]), children: [
1432
1549
  w(),
1433
- b && /* @__PURE__ */ s(Xe, { ..._, className: rr(`${X}__listbox`), children: v.length ? v.filter((l) => !!l).map(j) : /* @__PURE__ */ s(Sr, { noninteractive: !0, children: y }) })
1550
+ b && /* @__PURE__ */ s(W, { ..._, className: tr(`${Y}__listbox`), children: v.length ? v.filter((l) => !!l).map(j) : /* @__PURE__ */ s(W.Item, { noninteractive: !0, children: y }) })
1434
1551
  ] });
1435
- }, We = P(Ye);
1436
- We.displayName = "Autocomplete";
1552
+ }, fn = P(_n);
1553
+ fn.displayName = "Autocomplete";
1437
1554
  export {
1438
- We as Autocomplete,
1439
- Ve as useAutocomplete
1555
+ fn as Autocomplete,
1556
+ dn as useAutocomplete
1440
1557
  };
1441
1558
  //# sourceMappingURL=autocomplete.es.js.map