@purpurds/autocomplete 8.8.0 → 8.9.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,51 +1,45 @@
1
- import { jsx as l, jsxs as O, Fragment as Nt } from "react/jsx-runtime";
1
+ import { jsx as l, jsxs as S, Fragment as jr } from "react/jsx-runtime";
2
2
  import * as h from "react";
3
- import { forwardRef as Y, Children as jt, isValidElement as Qr, useId as Ot, useRef as K, useCallback as At, useEffect as kt, useState as nr, cloneElement as Ct } from "react";
3
+ import { forwardRef as Y, Children as Ar, isValidElement as Xt, useId as kr, useRef as G, useCallback as Cr, useEffect as Pr, useState as et, cloneElement as Ir } from "react";
4
4
  import "react-dom";
5
- function Pt(t) {
6
- return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
5
+ function Mr(r) {
6
+ return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
7
7
  }
8
- var vr = { exports: {} };
9
- /*!
10
- Copyright (c) 2018 Jed Watson.
11
- Licensed under the MIT License (MIT), see
12
- http://jedwatson.github.io/classnames
13
- */
14
- var mr;
15
- function qt() {
16
- return mr || (mr = 1, (function(t) {
8
+ var vt = { exports: {} }, gt;
9
+ function Br() {
10
+ return gt || (gt = 1, (function(r) {
17
11
  (function() {
18
- var i = {}.hasOwnProperty;
12
+ var u = {}.hasOwnProperty;
19
13
  function n() {
20
- for (var r = "", e = 0; e < arguments.length; e++) {
21
- var u = arguments[e];
22
- u && (r = a(r, o.call(this, u)));
14
+ for (var t = "", e = 0; e < arguments.length; e++) {
15
+ var i = arguments[e];
16
+ i && (t = o(t, a.call(this, i)));
23
17
  }
24
- return r;
18
+ return t;
25
19
  }
26
- function o(r) {
27
- if (typeof r == "string" || typeof r == "number")
28
- return this && this[r] || r;
29
- if (typeof r != "object")
20
+ function a(t) {
21
+ if (typeof t == "string" || typeof t == "number")
22
+ return this && this[t] || t;
23
+ if (typeof t != "object")
30
24
  return "";
31
- if (Array.isArray(r))
32
- return n.apply(this, r);
33
- if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
34
- return r.toString();
25
+ if (Array.isArray(t))
26
+ return n.apply(this, t);
27
+ if (t.toString !== Object.prototype.toString && !t.toString.toString().includes("[native code]"))
28
+ return t.toString();
35
29
  var e = "";
36
- for (var u in r)
37
- i.call(r, u) && r[u] && (e = a(e, this && this[u] || u));
30
+ for (var i in t)
31
+ u.call(t, i) && t[i] && (e = o(e, this && this[i] || i));
38
32
  return e;
39
33
  }
40
- function a(r, e) {
41
- return e ? r ? r + " " + e : r + e : r;
34
+ function o(t, e) {
35
+ return e ? t ? t + " " + e : t + e : t;
42
36
  }
43
- t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
37
+ r.exports ? (n.default = n, r.exports = n) : window.classNames = n;
44
38
  })();
45
- })(vr)), vr.exports;
39
+ })(vt)), vt.exports;
46
40
  }
47
- var Rt = qt();
48
- const Lt = /* @__PURE__ */ Pt(Rt), Mt = {
41
+ var qr = Br();
42
+ const Rr = /* @__PURE__ */ Mr(qr), Lr = {
49
43
  "purpur-icon": "_purpur-icon_8u1lq_1",
50
44
  "purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
51
45
  "purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
@@ -53,73 +47,67 @@ const Lt = /* @__PURE__ */ Pt(Rt), Mt = {
53
47
  "purpur-icon--md": "_purpur-icon--md_8u1lq_16",
54
48
  "purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
55
49
  "purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
56
- }, Bt = Lt.bind(Mt), hr = "purpur-icon", Et = "md", Tt = (t) => t.filter((i) => Object.keys(i).length >= 1).map((i) => `${i.name}="${i.value}"`).join(" "), It = ({ content: t = "", title: i } = {}) => {
50
+ }, Er = Rr.bind(Lr), mt = "purpur-icon", Tr = "md", Dr = (r) => r.filter((u) => Object.keys(u).length >= 1).map((u) => `${u.name}="${u.value}"`).join(" "), zr = ({ content: r = "", title: u } = {}) => {
57
51
  const n = [
58
52
  { name: "xmlns", value: "http://www.w3.org/2000/svg" },
59
53
  { name: "fill", value: "currentColor" },
60
54
  { name: "viewBox", value: "0 0 24 24" },
61
- i ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
62
- ], o = i ? `<title>${i}</title>` : "";
63
- return `<svg ${Tt(n)}>${o}${t}</svg>`;
64
- }, zt = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Xr = ({ svg: t, allyTitle: i, className: n, size: o = Et, ...a }) => {
65
- const r = It({
66
- content: zt(t.svg),
67
- title: i
68
- }), e = Bt(hr, `${hr}--${o}`, n);
69
- return /* @__PURE__ */ l("span", { className: e, dangerouslySetInnerHTML: { __html: r }, ...a });
55
+ u ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
56
+ ], a = u ? `<title>${u}</title>` : "";
57
+ return `<svg ${Dr(n)}>${a}${r}</svg>`;
58
+ }, Vr = (r) => r.replace(/<(\/?)svg([^>]*)>/g, "").trim(), tr = ({ svg: r, allyTitle: u, className: n, size: a = Tr, ...o }) => {
59
+ const t = zr({
60
+ content: Vr(r.svg),
61
+ title: u
62
+ }), e = Er(mt, `${mt}--${a}`, n);
63
+ return /* @__PURE__ */ l("span", { className: e, dangerouslySetInnerHTML: { __html: t }, ...o });
70
64
  };
71
- Xr.displayName = "Icon";
72
- const Dt = {
65
+ tr.displayName = "Icon";
66
+ const Fr = {
73
67
  name: "chevron-down",
74
68
  svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M20.136 7.864a.9.9 0 0 0-1.272 0L12 14.727 5.136 7.864a.9.9 0 0 0-1.272 1.272l7.5 7.5a.9.9 0 0 0 1.272 0l7.5-7.5a.9.9 0 0 0 0-1.272Z" clip-rule="evenodd"/></svg>',
75
69
  keywords: ["chevron-down"],
76
70
  category: "utility"
77
- }, rt = (t) => /* @__PURE__ */ l(Xr, { ...t, svg: Dt });
78
- rt.displayName = "IconChevronDown";
79
- function Vt(t) {
80
- return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
71
+ }, rr = (r) => /* @__PURE__ */ l(tr, { ...r, svg: Fr });
72
+ rr.displayName = "IconChevronDown";
73
+ function Zr(r) {
74
+ return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
81
75
  }
82
- var gr = { exports: {} };
83
- /*!
84
- Copyright (c) 2018 Jed Watson.
85
- Licensed under the MIT License (MIT), see
86
- http://jedwatson.github.io/classnames
87
- */
88
- var br;
89
- function Zt() {
90
- return br || (br = 1, (function(t) {
76
+ var bt = { exports: {} }, yt;
77
+ function Kr() {
78
+ return yt || (yt = 1, (function(r) {
91
79
  (function() {
92
- var i = {}.hasOwnProperty;
80
+ var u = {}.hasOwnProperty;
93
81
  function n() {
94
- for (var r = "", e = 0; e < arguments.length; e++) {
95
- var u = arguments[e];
96
- u && (r = a(r, o.call(this, u)));
82
+ for (var t = "", e = 0; e < arguments.length; e++) {
83
+ var i = arguments[e];
84
+ i && (t = o(t, a.call(this, i)));
97
85
  }
98
- return r;
86
+ return t;
99
87
  }
100
- function o(r) {
101
- if (typeof r == "string" || typeof r == "number")
102
- return this && this[r] || r;
103
- if (typeof r != "object")
88
+ function a(t) {
89
+ if (typeof t == "string" || typeof t == "number")
90
+ return this && this[t] || t;
91
+ if (typeof t != "object")
104
92
  return "";
105
- if (Array.isArray(r))
106
- return n.apply(this, r);
107
- if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
108
- return r.toString();
93
+ if (Array.isArray(t))
94
+ return n.apply(this, t);
95
+ if (t.toString !== Object.prototype.toString && !t.toString.toString().includes("[native code]"))
96
+ return t.toString();
109
97
  var e = "";
110
- for (var u in r)
111
- i.call(r, u) && r[u] && (e = a(e, this && this[u] || u));
98
+ for (var i in t)
99
+ u.call(t, i) && t[i] && (e = o(e, this && this[i] || i));
112
100
  return e;
113
101
  }
114
- function a(r, e) {
115
- return e ? r ? r + " " + e : r + e : r;
102
+ function o(t, e) {
103
+ return e ? t ? t + " " + e : t + e : t;
116
104
  }
117
- t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
105
+ r.exports ? (n.default = n, r.exports = n) : window.classNames = n;
118
106
  })();
119
- })(gr)), gr.exports;
107
+ })(bt)), bt.exports;
120
108
  }
121
- var Ht = Zt();
122
- const tt = /* @__PURE__ */ Vt(Ht), et = {
109
+ var Hr = Kr();
110
+ const er = /* @__PURE__ */ Zr(Hr), nr = {
123
111
  "purpur-listbox": "_purpur-listbox_6c8yl_1",
124
112
  "purpur-listbox-item": "_purpur-listbox-item_6c8yl_15",
125
113
  "purpur-listbox-item--hovered": "_purpur-listbox-item--hovered_6c8yl_29",
@@ -128,50 +116,44 @@ const tt = /* @__PURE__ */ Vt(Ht), et = {
128
116
  "purpur-listbox-item--disabled": "_purpur-listbox-item--disabled_6c8yl_44",
129
117
  "purpur-listbox-item__icon": "_purpur-listbox-item__icon_6c8yl_51"
130
118
  };
131
- function Ft(t) {
132
- return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
119
+ function Wr(r) {
120
+ return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
133
121
  }
134
- var yr = { exports: {} };
135
- /*!
136
- Copyright (c) 2018 Jed Watson.
137
- Licensed under the MIT License (MIT), see
138
- http://jedwatson.github.io/classnames
139
- */
140
- var xr;
141
- function Wt() {
142
- return xr || (xr = 1, (function(t) {
122
+ var xt = { exports: {} }, wt;
123
+ function Gr() {
124
+ return wt || (wt = 1, (function(r) {
143
125
  (function() {
144
- var i = {}.hasOwnProperty;
126
+ var u = {}.hasOwnProperty;
145
127
  function n() {
146
- for (var r = "", e = 0; e < arguments.length; e++) {
147
- var u = arguments[e];
148
- u && (r = a(r, o.call(this, u)));
128
+ for (var t = "", e = 0; e < arguments.length; e++) {
129
+ var i = arguments[e];
130
+ i && (t = o(t, a.call(this, i)));
149
131
  }
150
- return r;
132
+ return t;
151
133
  }
152
- function o(r) {
153
- if (typeof r == "string" || typeof r == "number")
154
- return this && this[r] || r;
155
- if (typeof r != "object")
134
+ function a(t) {
135
+ if (typeof t == "string" || typeof t == "number")
136
+ return this && this[t] || t;
137
+ if (typeof t != "object")
156
138
  return "";
157
- if (Array.isArray(r))
158
- return n.apply(this, r);
159
- if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
160
- return r.toString();
139
+ if (Array.isArray(t))
140
+ return n.apply(this, t);
141
+ if (t.toString !== Object.prototype.toString && !t.toString.toString().includes("[native code]"))
142
+ return t.toString();
161
143
  var e = "";
162
- for (var u in r)
163
- i.call(r, u) && r[u] && (e = a(e, this && this[u] || u));
144
+ for (var i in t)
145
+ u.call(t, i) && t[i] && (e = o(e, this && this[i] || i));
164
146
  return e;
165
147
  }
166
- function a(r, e) {
167
- return e ? r ? r + " " + e : r + e : r;
148
+ function o(t, e) {
149
+ return e ? t ? t + " " + e : t + e : t;
168
150
  }
169
- t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
151
+ r.exports ? (n.default = n, r.exports = n) : window.classNames = n;
170
152
  })();
171
- })(yr)), yr.exports;
153
+ })(xt)), xt.exports;
172
154
  }
173
- var Gt = Wt();
174
- const Kt = /* @__PURE__ */ Ft(Gt), Ut = {
155
+ var Ur = Gr();
156
+ const Yr = /* @__PURE__ */ Wr(Ur), Jr = {
175
157
  "purpur-icon": "_purpur-icon_8u1lq_1",
176
158
  "purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
177
159
  "purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
@@ -179,73 +161,67 @@ const Kt = /* @__PURE__ */ Ft(Gt), Ut = {
179
161
  "purpur-icon--md": "_purpur-icon--md_8u1lq_16",
180
162
  "purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
181
163
  "purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
182
- }, Yt = Kt.bind(Ut), wr = "purpur-icon", Jt = "md", Qt = (t) => t.filter((i) => Object.keys(i).length >= 1).map((i) => `${i.name}="${i.value}"`).join(" "), Xt = ({ content: t = "", title: i } = {}) => {
164
+ }, Qr = Yr.bind(Jr), $t = "purpur-icon", Xr = "md", te = (r) => r.filter((u) => Object.keys(u).length >= 1).map((u) => `${u.name}="${u.value}"`).join(" "), re = ({ content: r = "", title: u } = {}) => {
183
165
  const n = [
184
166
  { name: "xmlns", value: "http://www.w3.org/2000/svg" },
185
167
  { name: "fill", value: "currentColor" },
186
168
  { name: "viewBox", value: "0 0 24 24" },
187
- i ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
188
- ], o = i ? `<title>${i}</title>` : "";
189
- return `<svg ${Qt(n)}>${o}${t}</svg>`;
190
- }, re = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), nt = ({ svg: t, allyTitle: i, className: n, size: o = Jt, ...a }) => {
191
- const r = Xt({
192
- content: re(t.svg),
193
- title: i
194
- }), e = Yt(wr, `${wr}--${o}`, n);
195
- return /* @__PURE__ */ l("span", { className: e, dangerouslySetInnerHTML: { __html: r }, ...a });
169
+ u ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
170
+ ], a = u ? `<title>${u}</title>` : "";
171
+ return `<svg ${te(n)}>${a}${r}</svg>`;
172
+ }, ee = (r) => r.replace(/<(\/?)svg([^>]*)>/g, "").trim(), ir = ({ svg: r, allyTitle: u, className: n, size: a = Xr, ...o }) => {
173
+ const t = re({
174
+ content: ee(r.svg),
175
+ title: u
176
+ }), e = Qr($t, `${$t}--${a}`, n);
177
+ return /* @__PURE__ */ l("span", { className: e, dangerouslySetInnerHTML: { __html: t }, ...o });
196
178
  };
197
- nt.displayName = "Icon";
198
- const te = {
179
+ ir.displayName = "Icon";
180
+ const ne = {
199
181
  name: "checkmark",
200
182
  svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M21.06 3.795a.9.9 0 0 1 .145 1.264l-11.5 14.5a.9.9 0 0 1-1.341.077l-6-6a.9.9 0 0 1 1.272-1.272l5.286 5.286L19.795 3.94a.9.9 0 0 1 1.264-.145Z" clip-rule="evenodd"/></svg>',
201
183
  keywords: ["checkmark"],
202
184
  category: "utility"
203
- }, ut = (t) => /* @__PURE__ */ l(nt, { ...t, svg: te });
204
- ut.displayName = "IconCheckmark";
205
- function ee(t) {
206
- return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
185
+ }, ur = (r) => /* @__PURE__ */ l(ir, { ...r, svg: ne });
186
+ ur.displayName = "IconCheckmark";
187
+ function ie(r) {
188
+ return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
207
189
  }
208
- var $r = { exports: {} };
209
- /*!
210
- Copyright (c) 2018 Jed Watson.
211
- Licensed under the MIT License (MIT), see
212
- http://jedwatson.github.io/classnames
213
- */
214
- var Sr;
215
- function ne() {
216
- return Sr || (Sr = 1, (function(t) {
190
+ var St = { exports: {} }, Nt;
191
+ function ue() {
192
+ return Nt || (Nt = 1, (function(r) {
217
193
  (function() {
218
- var i = {}.hasOwnProperty;
194
+ var u = {}.hasOwnProperty;
219
195
  function n() {
220
- for (var r = "", e = 0; e < arguments.length; e++) {
221
- var u = arguments[e];
222
- u && (r = a(r, o.call(this, u)));
196
+ for (var t = "", e = 0; e < arguments.length; e++) {
197
+ var i = arguments[e];
198
+ i && (t = o(t, a.call(this, i)));
223
199
  }
224
- return r;
200
+ return t;
225
201
  }
226
- function o(r) {
227
- if (typeof r == "string" || typeof r == "number")
228
- return this && this[r] || r;
229
- if (typeof r != "object")
202
+ function a(t) {
203
+ if (typeof t == "string" || typeof t == "number")
204
+ return this && this[t] || t;
205
+ if (typeof t != "object")
230
206
  return "";
231
- if (Array.isArray(r))
232
- return n.apply(this, r);
233
- if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
234
- return r.toString();
207
+ if (Array.isArray(t))
208
+ return n.apply(this, t);
209
+ if (t.toString !== Object.prototype.toString && !t.toString.toString().includes("[native code]"))
210
+ return t.toString();
235
211
  var e = "";
236
- for (var u in r)
237
- i.call(r, u) && r[u] && (e = a(e, this && this[u] || u));
212
+ for (var i in t)
213
+ u.call(t, i) && t[i] && (e = o(e, this && this[i] || i));
238
214
  return e;
239
215
  }
240
- function a(r, e) {
241
- return e ? r ? r + " " + e : r + e : r;
216
+ function o(t, e) {
217
+ return e ? t ? t + " " + e : t + e : t;
242
218
  }
243
- t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
219
+ r.exports ? (n.default = n, r.exports = n) : window.classNames = n;
244
220
  })();
245
- })($r)), $r.exports;
221
+ })(St)), St.exports;
246
222
  }
247
- var ue = ne();
248
- const ie = /* @__PURE__ */ ee(ue), ae = {
223
+ var oe = ue();
224
+ const ae = /* @__PURE__ */ ie(oe), pe = {
249
225
  "purpur-paragraph": "_purpur-paragraph_1rh57_1",
250
226
  "purpur-paragraph--disabled": "_purpur-paragraph--disabled_1rh57_7",
251
227
  "purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_1rh57_10",
@@ -260,196 +236,184 @@ const ie = /* @__PURE__ */ ee(ue), ae = {
260
236
  "purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_1rh57_60",
261
237
  "purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_1rh57_67",
262
238
  "purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1rh57_75"
263
- }, oe = ie.bind(ae), pe = {
239
+ }, le = ae.bind(pe), se = {
264
240
  PARAGRAPH100: "paragraph-100"
265
- }, H = "purpur-paragraph", it = ({
266
- children: t,
267
- className: i,
241
+ }, Z = "purpur-paragraph", or = ({
242
+ children: r,
243
+ className: u,
268
244
  disabled: n,
269
- enableHyphenation: o = !1,
270
- negative: a = !1,
271
- variant: r = pe.PARAGRAPH100,
245
+ enableHyphenation: a = !1,
246
+ negative: o = !1,
247
+ variant: t = se.PARAGRAPH100,
272
248
  ...e
273
249
  }) => {
274
- const u = oe(i, H, `${H}--${r}`, {
275
- [`${H}--hyphens`]: o,
276
- [`${H}--disabled`]: n,
277
- [`${H}--negative`]: a
250
+ const i = le(u, Z, `${Z}--${t}`, {
251
+ [`${Z}--hyphens`]: a,
252
+ [`${Z}--disabled`]: n,
253
+ [`${Z}--negative`]: o
278
254
  });
279
- return /* @__PURE__ */ l("p", { ...e, className: u, children: t });
255
+ return /* @__PURE__ */ l("p", { ...e, className: i, children: r });
280
256
  };
281
- it.displayName = "Paragraph";
282
- const Nr = tt.bind(et), T = "purpur-listbox", pr = Y((t, i) => {
257
+ or.displayName = "Paragraph";
258
+ const Ot = er.bind(nr), L = "purpur-listbox", at = Y((r, u) => {
283
259
  const {
284
260
  disabled: n,
285
- highlighted: o,
286
- hovered: a,
287
- selected: r,
261
+ highlighted: a,
262
+ hovered: o,
263
+ selected: t,
288
264
  children: e,
289
- className: u,
290
- noninteractive: v,
265
+ className: i,
266
+ noninteractive: d,
291
267
  ..._
292
- } = t, g = Nr(`${T}-item`, u, {
293
- [`${T}-item--highlighted`]: o,
294
- [`${T}-item--selected`]: r,
295
- [`${T}-item--hovered`]: a,
296
- [`${T}-item--disabled`]: n,
297
- [`${T}-item--noninteractive`]: v
268
+ } = r, b = Ot(`${L}-item`, i, {
269
+ [`${L}-item--highlighted`]: a,
270
+ [`${L}-item--selected`]: t,
271
+ [`${L}-item--hovered`]: o,
272
+ [`${L}-item--disabled`]: n,
273
+ [`${L}-item--noninteractive`]: d
298
274
  });
299
- return /* @__PURE__ */ O(
275
+ return /* @__PURE__ */ S(
300
276
  "li",
301
277
  {
302
278
  ..._,
303
- ref: i,
304
- className: g,
305
- "aria-selected": !!r,
279
+ ref: u,
280
+ className: b,
281
+ "aria-selected": !!t,
306
282
  role: "option",
307
283
  "aria-disabled": !!n,
308
284
  children: [
309
- typeof e == "string" ? /* @__PURE__ */ l(it, { children: e }) : e,
310
- r && /* @__PURE__ */ l(ut, { size: "xs", className: Nr(`${T}-item__icon`) })
285
+ typeof e == "string" ? /* @__PURE__ */ l(or, { children: e }) : e,
286
+ t && /* @__PURE__ */ l(ur, { size: "xs", className: Ot(`${L}-item__icon`) })
311
287
  ]
312
288
  }
313
289
  );
314
- }), le = (t) => Qr(t) && (t == null ? void 0 : t.type) === pr;
315
- pr.displayName = "ListBoxItem";
316
- const se = tt.bind(et), ce = "purpur-listbox", U = Y(
317
- ({ children: t, ...i }, n) => /* @__PURE__ */ l(
290
+ }), ce = (r) => Xt(r) && r?.type === at;
291
+ at.displayName = "ListBoxItem";
292
+ const de = er.bind(nr), _e = "purpur-listbox", U = Y(
293
+ ({ children: r, ...u }, n) => /* @__PURE__ */ l(
318
294
  "ul",
319
295
  {
320
- ...i,
296
+ ...u,
321
297
  ref: n,
322
- className: se(ce, i.className),
298
+ className: de(_e, u.className),
323
299
  role: "listbox",
324
- children: jt.toArray(t).filter(le)
300
+ children: Ar.toArray(r).filter(ce)
325
301
  }
326
302
  )
327
303
  );
328
- U.Item = pr;
304
+ U.Item = at;
329
305
  U.displayName = "ListBox";
330
- const de = {
306
+ const fe = {
331
307
  LG: "lg"
332
308
  };
333
- function _e(t) {
334
- return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
309
+ function he(r) {
310
+ return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
335
311
  }
336
- var jr = { exports: {} };
337
- /*!
338
- Copyright (c) 2018 Jed Watson.
339
- Licensed under the MIT License (MIT), see
340
- http://jedwatson.github.io/classnames
341
- */
342
- var Or;
343
- function fe() {
344
- return Or || (Or = 1, (function(t) {
312
+ var jt = { exports: {} }, At;
313
+ function ve() {
314
+ return At || (At = 1, (function(r) {
345
315
  (function() {
346
- var i = {}.hasOwnProperty;
316
+ var u = {}.hasOwnProperty;
347
317
  function n() {
348
- for (var r = "", e = 0; e < arguments.length; e++) {
349
- var u = arguments[e];
350
- u && (r = a(r, o.call(this, u)));
318
+ for (var t = "", e = 0; e < arguments.length; e++) {
319
+ var i = arguments[e];
320
+ i && (t = o(t, a.call(this, i)));
351
321
  }
352
- return r;
322
+ return t;
353
323
  }
354
- function o(r) {
355
- if (typeof r == "string" || typeof r == "number")
356
- return this && this[r] || r;
357
- if (typeof r != "object")
324
+ function a(t) {
325
+ if (typeof t == "string" || typeof t == "number")
326
+ return this && this[t] || t;
327
+ if (typeof t != "object")
358
328
  return "";
359
- if (Array.isArray(r))
360
- return n.apply(this, r);
361
- if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
362
- return r.toString();
329
+ if (Array.isArray(t))
330
+ return n.apply(this, t);
331
+ if (t.toString !== Object.prototype.toString && !t.toString.toString().includes("[native code]"))
332
+ return t.toString();
363
333
  var e = "";
364
- for (var u in r)
365
- i.call(r, u) && r[u] && (e = a(e, this && this[u] || u));
334
+ for (var i in t)
335
+ u.call(t, i) && t[i] && (e = o(e, this && this[i] || i));
366
336
  return e;
367
337
  }
368
- function a(r, e) {
369
- return e ? r ? r + " " + e : r + e : r;
338
+ function o(t, e) {
339
+ return e ? t ? t + " " + e : t + e : t;
370
340
  }
371
- t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
341
+ r.exports ? (n.default = n, r.exports = n) : window.classNames = n;
372
342
  })();
373
- })(jr)), jr.exports;
343
+ })(jt)), jt.exports;
374
344
  }
375
- var ve = fe();
376
- const me = /* @__PURE__ */ _e(ve), he = "_rotate_12t9p_1", ge = "_dash_12t9p_1", be = {
345
+ var ge = ve();
346
+ const me = /* @__PURE__ */ he(ge), be = "_rotate_12t9p_1", ye = "_dash_12t9p_1", xe = {
377
347
  "purpur-spinner": "_purpur-spinner_12t9p_2",
378
- rotate: he,
348
+ rotate: be,
379
349
  "purpur-spinner--xxs": "_purpur-spinner--xxs_12t9p_6",
380
350
  "purpur-spinner--xs": "_purpur-spinner--xs_12t9p_10",
381
351
  "purpur-spinner--sm": "_purpur-spinner--sm_12t9p_14",
382
352
  "purpur-spinner--md": "_purpur-spinner--md_12t9p_18",
383
353
  "purpur-spinner--lg": "_purpur-spinner--lg_12t9p_22",
384
354
  "purpur-spinner__circle": "_purpur-spinner__circle_12t9p_26",
385
- dash: ge,
355
+ dash: ye,
386
356
  "purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_12t9p_41",
387
357
  "purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_12t9p_44"
388
- }, Ar = me.bind(be), F = "purpur-spinner", ye = {
358
+ }, kt = me.bind(xe), K = "purpur-spinner", we = {
389
359
  SM: "sm"
390
- }, at = ({
391
- disabled: t = !1,
392
- negative: i = !1,
393
- size: n = ye.SM,
394
- className: o,
395
- ...a
396
- }) => /* @__PURE__ */ l("div", { className: Ar(F, `${F}--${n}`, o), ...a, children: /* @__PURE__ */ l("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ l(
360
+ }, ar = ({
361
+ disabled: r = !1,
362
+ negative: u = !1,
363
+ size: n = we.SM,
364
+ className: a,
365
+ ...o
366
+ }) => /* @__PURE__ */ l("div", { className: kt(K, `${K}--${n}`, a), ...o, children: /* @__PURE__ */ l("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ l(
397
367
  "circle",
398
368
  {
399
- className: Ar(`${F}__circle`, {
400
- [`${F}__circle--disabled`]: t,
401
- [`${F}__circle--negative`]: i
369
+ className: kt(`${K}__circle`, {
370
+ [`${K}__circle--disabled`]: r,
371
+ [`${K}__circle--negative`]: u
402
372
  }),
403
373
  cx: "25",
404
374
  cy: "25",
405
375
  r: "20"
406
376
  }
407
377
  ) }) });
408
- at.displayName = "Spinner";
409
- function xe(t) {
410
- return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
378
+ ar.displayName = "Spinner";
379
+ function $e(r) {
380
+ return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
411
381
  }
412
- var kr = { exports: {} };
413
- /*!
414
- Copyright (c) 2018 Jed Watson.
415
- Licensed under the MIT License (MIT), see
416
- http://jedwatson.github.io/classnames
417
- */
418
- var Cr;
419
- function we() {
420
- return Cr || (Cr = 1, (function(t) {
382
+ var Ct = { exports: {} }, Pt;
383
+ function Se() {
384
+ return Pt || (Pt = 1, (function(r) {
421
385
  (function() {
422
- var i = {}.hasOwnProperty;
386
+ var u = {}.hasOwnProperty;
423
387
  function n() {
424
- for (var r = "", e = 0; e < arguments.length; e++) {
425
- var u = arguments[e];
426
- u && (r = a(r, o.call(this, u)));
388
+ for (var t = "", e = 0; e < arguments.length; e++) {
389
+ var i = arguments[e];
390
+ i && (t = o(t, a.call(this, i)));
427
391
  }
428
- return r;
392
+ return t;
429
393
  }
430
- function o(r) {
431
- if (typeof r == "string" || typeof r == "number")
432
- return this && this[r] || r;
433
- if (typeof r != "object")
394
+ function a(t) {
395
+ if (typeof t == "string" || typeof t == "number")
396
+ return this && this[t] || t;
397
+ if (typeof t != "object")
434
398
  return "";
435
- if (Array.isArray(r))
436
- return n.apply(this, r);
437
- if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
438
- return r.toString();
399
+ if (Array.isArray(t))
400
+ return n.apply(this, t);
401
+ if (t.toString !== Object.prototype.toString && !t.toString.toString().includes("[native code]"))
402
+ return t.toString();
439
403
  var e = "";
440
- for (var u in r)
441
- i.call(r, u) && r[u] && (e = a(e, this && this[u] || u));
404
+ for (var i in t)
405
+ u.call(t, i) && t[i] && (e = o(e, this && this[i] || i));
442
406
  return e;
443
407
  }
444
- function a(r, e) {
445
- return e ? r ? r + " " + e : r + e : r;
408
+ function o(t, e) {
409
+ return e ? t ? t + " " + e : t + e : t;
446
410
  }
447
- t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
411
+ r.exports ? (n.default = n, r.exports = n) : window.classNames = n;
448
412
  })();
449
- })(kr)), kr.exports;
413
+ })(Ct)), Ct.exports;
450
414
  }
451
- var $e = we();
452
- const Se = /* @__PURE__ */ xe($e), Ne = {
415
+ var Ne = Se();
416
+ const Oe = /* @__PURE__ */ $e(Ne), je = {
453
417
  "purpur-button": "_purpur-button_10jh0_1",
454
418
  "purpur-button--xs": "_purpur-button--xs_10jh0_22",
455
419
  "purpur-button--icon-only": "_purpur-button--icon-only_10jh0_25",
@@ -472,110 +436,104 @@ const Se = /* @__PURE__ */ xe($e), Ne = {
472
436
  "purpur-button--text-negative": "_purpur-button--text-negative_10jh0_185",
473
437
  "purpur-button--text": "_purpur-button--text_10jh0_185",
474
438
  "purpur-button__spinner": "_purpur-button__spinner_10jh0_235"
475
- }, Pr = Se.bind(Ne), L = "purpur-button", ot = Y(
439
+ }, It = Oe.bind(je), I = "purpur-button", pr = Y(
476
440
  ({
477
- children: t,
478
- className: i,
441
+ children: r,
442
+ className: u,
479
443
  disabled: n = !1,
480
- fullWidth: o = !1,
481
- iconOnly: a,
482
- loading: r = !1,
444
+ fullWidth: a = !1,
445
+ iconOnly: o,
446
+ loading: t = !1,
483
447
  negative: e = !1,
484
- onClick: u,
485
- size: v = "md",
448
+ onClick: i,
449
+ size: d = "md",
486
450
  variant: _,
487
- type: g = "button",
488
- ...b
489
- }, N) => {
490
- if (a && _ === "destructive")
451
+ type: b = "button",
452
+ ...y
453
+ }, j) => {
454
+ if (o && _ === "destructive")
491
455
  return null;
492
- const A = Pr(
456
+ const M = It(
493
457
  [
494
- L,
495
- `${L}--${e ? `${_}-negative` : _}`,
496
- `${L}--${v}`
458
+ I,
459
+ `${I}--${e ? `${_}-negative` : _}`,
460
+ `${I}--${d}`
497
461
  ],
498
462
  {
499
- [`${L}--icon-only`]: a,
500
- [`${L}--negative`]: e,
501
- [`${L}--full-width`]: o,
502
- [`${L}--disabled`]: n || r
463
+ [`${I}--icon-only`]: o,
464
+ [`${I}--negative`]: e,
465
+ [`${I}--full-width`]: a,
466
+ [`${I}--disabled`]: n || t
503
467
  },
504
- i
505
- ), f = (S) => {
506
- n || r ? S.preventDefault() : u && u(S);
507
- }, $ = !!b["aria-disabled"] || n || r;
508
- return /* @__PURE__ */ O(
468
+ u
469
+ ), c = (A) => {
470
+ n || t ? A.preventDefault() : i && i(A);
471
+ }, x = !!y["aria-disabled"] || n || t;
472
+ return /* @__PURE__ */ S(
509
473
  "button",
510
474
  {
511
- className: A,
512
- type: g,
513
- ref: N,
514
- "aria-disabled": $,
515
- onClick: f,
516
- ...b,
475
+ className: M,
476
+ type: b,
477
+ ref: j,
478
+ "aria-disabled": x,
479
+ onClick: c,
480
+ ...y,
517
481
  children: [
518
- r && /* @__PURE__ */ l(
519
- at,
482
+ t && /* @__PURE__ */ l(
483
+ ar,
520
484
  {
521
- size: v === de.LG ? "xs" : "xxs",
485
+ size: d === fe.LG ? "xs" : "xxs",
522
486
  negative: e,
523
- disabled: $,
524
- className: Pr(`${L}__spinner`)
487
+ disabled: x,
488
+ className: It(`${I}__spinner`)
525
489
  }
526
490
  ),
527
491
  " ",
528
- t
492
+ r
529
493
  ]
530
494
  }
531
495
  );
532
496
  }
533
497
  );
534
- ot.displayName = "Button";
535
- function je(t) {
536
- return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
498
+ pr.displayName = "Button";
499
+ function Ae(r) {
500
+ return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
537
501
  }
538
- var qr = { exports: {} };
539
- /*!
540
- Copyright (c) 2018 Jed Watson.
541
- Licensed under the MIT License (MIT), see
542
- http://jedwatson.github.io/classnames
543
- */
544
- var Rr;
545
- function Oe() {
546
- return Rr || (Rr = 1, (function(t) {
502
+ var Mt = { exports: {} }, Bt;
503
+ function ke() {
504
+ return Bt || (Bt = 1, (function(r) {
547
505
  (function() {
548
- var i = {}.hasOwnProperty;
506
+ var u = {}.hasOwnProperty;
549
507
  function n() {
550
- for (var r = "", e = 0; e < arguments.length; e++) {
551
- var u = arguments[e];
552
- u && (r = a(r, o.call(this, u)));
508
+ for (var t = "", e = 0; e < arguments.length; e++) {
509
+ var i = arguments[e];
510
+ i && (t = o(t, a.call(this, i)));
553
511
  }
554
- return r;
512
+ return t;
555
513
  }
556
- function o(r) {
557
- if (typeof r == "string" || typeof r == "number")
558
- return this && this[r] || r;
559
- if (typeof r != "object")
514
+ function a(t) {
515
+ if (typeof t == "string" || typeof t == "number")
516
+ return this && this[t] || t;
517
+ if (typeof t != "object")
560
518
  return "";
561
- if (Array.isArray(r))
562
- return n.apply(this, r);
563
- if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
564
- return r.toString();
519
+ if (Array.isArray(t))
520
+ return n.apply(this, t);
521
+ if (t.toString !== Object.prototype.toString && !t.toString.toString().includes("[native code]"))
522
+ return t.toString();
565
523
  var e = "";
566
- for (var u in r)
567
- i.call(r, u) && r[u] && (e = a(e, this && this[u] || u));
524
+ for (var i in t)
525
+ u.call(t, i) && t[i] && (e = o(e, this && this[i] || i));
568
526
  return e;
569
527
  }
570
- function a(r, e) {
571
- return e ? r ? r + " " + e : r + e : r;
528
+ function o(t, e) {
529
+ return e ? t ? t + " " + e : t + e : t;
572
530
  }
573
- t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
531
+ r.exports ? (n.default = n, r.exports = n) : window.classNames = n;
574
532
  })();
575
- })(qr)), qr.exports;
533
+ })(Mt)), Mt.exports;
576
534
  }
577
- var Ae = Oe();
578
- const ke = /* @__PURE__ */ je(Ae), Ce = {
535
+ var Ce = ke();
536
+ const Pe = /* @__PURE__ */ Ae(Ce), Ie = {
579
537
  "purpur-icon": "_purpur-icon_8u1lq_1",
580
538
  "purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
581
539
  "purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
@@ -583,201 +541,183 @@ const ke = /* @__PURE__ */ je(Ae), Ce = {
583
541
  "purpur-icon--md": "_purpur-icon--md_8u1lq_16",
584
542
  "purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
585
543
  "purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
586
- }, Pe = ke.bind(Ce), Lr = "purpur-icon", qe = "md", Re = (t) => t.filter((i) => Object.keys(i).length >= 1).map((i) => `${i.name}="${i.value}"`).join(" "), Le = ({ content: t = "", title: i } = {}) => {
544
+ }, Me = Pe.bind(Ie), qt = "purpur-icon", Be = "md", qe = (r) => r.filter((u) => Object.keys(u).length >= 1).map((u) => `${u.name}="${u.value}"`).join(" "), Re = ({ content: r = "", title: u } = {}) => {
587
545
  const n = [
588
546
  { name: "xmlns", value: "http://www.w3.org/2000/svg" },
589
547
  { name: "fill", value: "currentColor" },
590
548
  { name: "viewBox", value: "0 0 24 24" },
591
- i ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
592
- ], o = i ? `<title>${i}</title>` : "";
593
- return `<svg ${Re(n)}>${o}${t}</svg>`;
594
- }, Me = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), pt = ({ svg: t, allyTitle: i, className: n, size: o = qe, ...a }) => {
595
- const r = Le({
596
- content: Me(t.svg),
597
- title: i
598
- }), e = Pe(Lr, `${Lr}--${o}`, n);
599
- return /* @__PURE__ */ l("span", { className: e, dangerouslySetInnerHTML: { __html: r }, ...a });
549
+ u ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
550
+ ], a = u ? `<title>${u}</title>` : "";
551
+ return `<svg ${qe(n)}>${a}${r}</svg>`;
552
+ }, Le = (r) => r.replace(/<(\/?)svg([^>]*)>/g, "").trim(), lr = ({ svg: r, allyTitle: u, className: n, size: a = Be, ...o }) => {
553
+ const t = Re({
554
+ content: Le(r.svg),
555
+ title: u
556
+ }), e = Me(qt, `${qt}--${a}`, n);
557
+ return /* @__PURE__ */ l("span", { className: e, dangerouslySetInnerHTML: { __html: t }, ...o });
600
558
  };
601
- pt.displayName = "Icon";
602
- const Be = {
559
+ lr.displayName = "Icon";
560
+ const Ee = {
603
561
  name: "error-filled",
604
562
  svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 24" fill="currentColor"><path fill-rule="evenodd" d="M14.268 3.5c-.77-1.333-2.694-1.333-3.464 0l-8.66 15c-.77 1.333.192 3 1.732 3h17.32c1.54 0 2.502-1.667 1.733-3l-8.66-15Zm-.694 5.067-.247 6.876h-1.566l-.247-6.876a1.03 1.03 0 1 1 2.06 0Zm.212 8.917c0 .649-.585 1.234-1.25 1.234-.648 0-1.25-.585-1.25-1.234 0-.633.602-1.234 1.25-1.234.665 0 1.25.601 1.25 1.234Z" clip-rule="evenodd"/></svg>',
605
563
  keywords: ["error-filled"],
606
564
  category: "status"
607
565
  };
608
- function Ee(t) {
609
- return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
566
+ function Te(r) {
567
+ return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
610
568
  }
611
- var Mr = { exports: {} };
612
- /*!
613
- Copyright (c) 2018 Jed Watson.
614
- Licensed under the MIT License (MIT), see
615
- http://jedwatson.github.io/classnames
616
- */
617
- var Br;
618
- function Te() {
619
- return Br || (Br = 1, (function(t) {
569
+ var Rt = { exports: {} }, Lt;
570
+ function De() {
571
+ return Lt || (Lt = 1, (function(r) {
620
572
  (function() {
621
- var i = {}.hasOwnProperty;
573
+ var u = {}.hasOwnProperty;
622
574
  function n() {
623
- for (var r = "", e = 0; e < arguments.length; e++) {
624
- var u = arguments[e];
625
- u && (r = a(r, o.call(this, u)));
575
+ for (var t = "", e = 0; e < arguments.length; e++) {
576
+ var i = arguments[e];
577
+ i && (t = o(t, a.call(this, i)));
626
578
  }
627
- return r;
579
+ return t;
628
580
  }
629
- function o(r) {
630
- if (typeof r == "string" || typeof r == "number")
631
- return this && this[r] || r;
632
- if (typeof r != "object")
581
+ function a(t) {
582
+ if (typeof t == "string" || typeof t == "number")
583
+ return this && this[t] || t;
584
+ if (typeof t != "object")
633
585
  return "";
634
- if (Array.isArray(r))
635
- return n.apply(this, r);
636
- if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
637
- return r.toString();
586
+ if (Array.isArray(t))
587
+ return n.apply(this, t);
588
+ if (t.toString !== Object.prototype.toString && !t.toString.toString().includes("[native code]"))
589
+ return t.toString();
638
590
  var e = "";
639
- for (var u in r)
640
- i.call(r, u) && r[u] && (e = a(e, this && this[u] || u));
591
+ for (var i in t)
592
+ u.call(t, i) && t[i] && (e = o(e, this && this[i] || i));
641
593
  return e;
642
594
  }
643
- function a(r, e) {
644
- return e ? r ? r + " " + e : r + e : r;
595
+ function o(t, e) {
596
+ return e ? t ? t + " " + e : t + e : t;
645
597
  }
646
- t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
598
+ r.exports ? (n.default = n, r.exports = n) : window.classNames = n;
647
599
  })();
648
- })(Mr)), Mr.exports;
600
+ })(Rt)), Rt.exports;
649
601
  }
650
- var Ie = Te();
651
- const ze = /* @__PURE__ */ Ee(Ie), De = {
602
+ var ze = De();
603
+ const Ve = /* @__PURE__ */ Te(ze), Fe = {
652
604
  "purpur-field-error-text": "_purpur-field-error-text_u1cy2_1",
653
605
  "purpur-field-error-text--negative": "_purpur-field-error-text--negative_u1cy2_11",
654
606
  "purpur-field-error-text__icon": "_purpur-field-error-text__icon_u1cy2_14"
655
- }, Er = ze.bind(De), ur = "purpur-field-error-text", Ve = ({
656
- children: t,
657
- className: i,
607
+ }, Et = Ve.bind(Fe), nt = "purpur-field-error-text", Ze = ({
608
+ children: r,
609
+ className: u,
658
610
  negative: n = !1,
659
- ["aria-relevant"]: o = "additions text",
660
- ...a
661
- }) => /* @__PURE__ */ O(
611
+ ["aria-relevant"]: a = "additions text",
612
+ ...o
613
+ }) => /* @__PURE__ */ S(
662
614
  "div",
663
615
  {
664
- className: Er(i, ur, {
665
- [`${ur}--negative`]: n
616
+ className: Et(u, nt, {
617
+ [`${nt}--negative`]: n
666
618
  }),
667
619
  "aria-live": "assertive",
668
- "aria-relevant": o,
669
- ...a,
620
+ "aria-relevant": a,
621
+ ...o,
670
622
  children: [
671
- /* @__PURE__ */ l(pt, { svg: Be, size: "xs", className: Er(`${ur}__icon`) }),
672
- t
623
+ /* @__PURE__ */ l(lr, { svg: Ee, size: "xs", className: Et(`${nt}__icon`) }),
624
+ r
673
625
  ]
674
626
  }
675
627
  );
676
- function Ze(t) {
677
- return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
628
+ function Ke(r) {
629
+ return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
678
630
  }
679
- var Tr = { exports: {} };
680
- /*!
681
- Copyright (c) 2018 Jed Watson.
682
- Licensed under the MIT License (MIT), see
683
- http://jedwatson.github.io/classnames
684
- */
685
- var Ir;
631
+ var Tt = { exports: {} }, Dt;
686
632
  function He() {
687
- return Ir || (Ir = 1, (function(t) {
633
+ return Dt || (Dt = 1, (function(r) {
688
634
  (function() {
689
- var i = {}.hasOwnProperty;
635
+ var u = {}.hasOwnProperty;
690
636
  function n() {
691
- for (var r = "", e = 0; e < arguments.length; e++) {
692
- var u = arguments[e];
693
- u && (r = a(r, o.call(this, u)));
637
+ for (var t = "", e = 0; e < arguments.length; e++) {
638
+ var i = arguments[e];
639
+ i && (t = o(t, a.call(this, i)));
694
640
  }
695
- return r;
641
+ return t;
696
642
  }
697
- function o(r) {
698
- if (typeof r == "string" || typeof r == "number")
699
- return this && this[r] || r;
700
- if (typeof r != "object")
643
+ function a(t) {
644
+ if (typeof t == "string" || typeof t == "number")
645
+ return this && this[t] || t;
646
+ if (typeof t != "object")
701
647
  return "";
702
- if (Array.isArray(r))
703
- return n.apply(this, r);
704
- if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
705
- return r.toString();
648
+ if (Array.isArray(t))
649
+ return n.apply(this, t);
650
+ if (t.toString !== Object.prototype.toString && !t.toString.toString().includes("[native code]"))
651
+ return t.toString();
706
652
  var e = "";
707
- for (var u in r)
708
- i.call(r, u) && r[u] && (e = a(e, this && this[u] || u));
653
+ for (var i in t)
654
+ u.call(t, i) && t[i] && (e = o(e, this && this[i] || i));
709
655
  return e;
710
656
  }
711
- function a(r, e) {
712
- return e ? r ? r + " " + e : r + e : r;
657
+ function o(t, e) {
658
+ return e ? t ? t + " " + e : t + e : t;
713
659
  }
714
- t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
660
+ r.exports ? (n.default = n, r.exports = n) : window.classNames = n;
715
661
  })();
716
- })(Tr)), Tr.exports;
662
+ })(Tt)), Tt.exports;
717
663
  }
718
- var Fe = He();
719
- const We = /* @__PURE__ */ Ze(Fe), Ge = {
664
+ var We = He();
665
+ const Ge = /* @__PURE__ */ Ke(We), Ue = {
720
666
  "purpur-field-helper-text": "_purpur-field-helper-text_11nsh_1",
721
667
  "purpur-field-helper-text--disabled": "_purpur-field-helper-text--disabled_11nsh_9",
722
668
  "purpur-field-helper-text--negative": "_purpur-field-helper-text--negative_11nsh_12"
723
- }, Ke = We.bind(Ge), ir = "purpur-field-helper-text", Ue = ({
724
- children: t,
725
- className: i,
669
+ }, Ye = Ge.bind(Ue), it = "purpur-field-helper-text", Je = ({
670
+ children: r,
671
+ className: u,
726
672
  disabled: n,
727
- id: o,
728
- negative: a,
729
- ...r
673
+ id: a,
674
+ negative: o,
675
+ ...t
730
676
  }) => {
731
- const e = Ke(i, ir, {
732
- [`${ir}--disabled`]: n,
733
- [`${ir}--negative`]: a
677
+ const e = Ye(u, it, {
678
+ [`${it}--disabled`]: n,
679
+ [`${it}--negative`]: o
734
680
  });
735
- return /* @__PURE__ */ l("span", { id: o, className: e, ...r, children: t });
681
+ return /* @__PURE__ */ l("span", { id: a, className: e, ...t, children: r });
736
682
  };
737
- function Ye(t) {
738
- return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
683
+ function Qe(r) {
684
+ return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
739
685
  }
740
- var zr = { exports: {} };
741
- /*!
742
- Copyright (c) 2018 Jed Watson.
743
- Licensed under the MIT License (MIT), see
744
- http://jedwatson.github.io/classnames
745
- */
746
- var Dr;
747
- function Je() {
748
- return Dr || (Dr = 1, (function(t) {
686
+ var zt = { exports: {} }, Vt;
687
+ function Xe() {
688
+ return Vt || (Vt = 1, (function(r) {
749
689
  (function() {
750
- var i = {}.hasOwnProperty;
690
+ var u = {}.hasOwnProperty;
751
691
  function n() {
752
- for (var r = "", e = 0; e < arguments.length; e++) {
753
- var u = arguments[e];
754
- u && (r = a(r, o.call(this, u)));
692
+ for (var t = "", e = 0; e < arguments.length; e++) {
693
+ var i = arguments[e];
694
+ i && (t = o(t, a.call(this, i)));
755
695
  }
756
- return r;
696
+ return t;
757
697
  }
758
- function o(r) {
759
- if (typeof r == "string" || typeof r == "number")
760
- return this && this[r] || r;
761
- if (typeof r != "object")
698
+ function a(t) {
699
+ if (typeof t == "string" || typeof t == "number")
700
+ return this && this[t] || t;
701
+ if (typeof t != "object")
762
702
  return "";
763
- if (Array.isArray(r))
764
- return n.apply(this, r);
765
- if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
766
- return r.toString();
703
+ if (Array.isArray(t))
704
+ return n.apply(this, t);
705
+ if (t.toString !== Object.prototype.toString && !t.toString.toString().includes("[native code]"))
706
+ return t.toString();
767
707
  var e = "";
768
- for (var u in r)
769
- i.call(r, u) && r[u] && (e = a(e, this && this[u] || u));
708
+ for (var i in t)
709
+ u.call(t, i) && t[i] && (e = o(e, this && this[i] || i));
770
710
  return e;
771
711
  }
772
- function a(r, e) {
773
- return e ? r ? r + " " + e : r + e : r;
712
+ function o(t, e) {
713
+ return e ? t ? t + " " + e : t + e : t;
774
714
  }
775
- t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
715
+ r.exports ? (n.default = n, r.exports = n) : window.classNames = n;
776
716
  })();
777
- })(zr)), zr.exports;
717
+ })(zt)), zt.exports;
778
718
  }
779
- var Qe = Je();
780
- const Xe = /* @__PURE__ */ Ye(Qe), rn = {
719
+ var tn = Xe();
720
+ const rn = /* @__PURE__ */ Qe(tn), en = {
781
721
  "purpur-icon": "_purpur-icon_8u1lq_1",
782
722
  "purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
783
723
  "purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
@@ -785,102 +725,110 @@ const Xe = /* @__PURE__ */ Ye(Qe), rn = {
785
725
  "purpur-icon--md": "_purpur-icon--md_8u1lq_16",
786
726
  "purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
787
727
  "purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
788
- }, tn = Xe.bind(rn), Vr = "purpur-icon", en = "md", nn = (t) => t.filter((i) => Object.keys(i).length >= 1).map((i) => `${i.name}="${i.value}"`).join(" "), un = ({ content: t = "", title: i } = {}) => {
728
+ }, nn = rn.bind(en), Ft = "purpur-icon", un = "md", on = (r) => r.filter((u) => Object.keys(u).length >= 1).map((u) => `${u.name}="${u.value}"`).join(" "), an = ({ content: r = "", title: u } = {}) => {
789
729
  const n = [
790
730
  { name: "xmlns", value: "http://www.w3.org/2000/svg" },
791
731
  { name: "fill", value: "currentColor" },
792
732
  { name: "viewBox", value: "0 0 24 24" },
793
- i ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
794
- ], o = i ? `<title>${i}</title>` : "";
795
- return `<svg ${nn(n)}>${o}${t}</svg>`;
796
- }, an = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), lr = ({ svg: t, allyTitle: i, className: n, size: o = en, ...a }) => {
797
- const r = un({
798
- content: an(t.svg),
799
- title: i
800
- }), e = tn(Vr, `${Vr}--${o}`, n);
801
- return /* @__PURE__ */ l("span", { className: e, dangerouslySetInnerHTML: { __html: r }, ...a });
733
+ u ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
734
+ ], a = u ? `<title>${u}</title>` : "";
735
+ return `<svg ${on(n)}>${a}${r}</svg>`;
736
+ }, pn = (r) => r.replace(/<(\/?)svg([^>]*)>/g, "").trim(), pt = ({ svg: r, allyTitle: u, className: n, size: a = un, ...o }) => {
737
+ const t = an({
738
+ content: pn(r.svg),
739
+ title: u
740
+ }), e = nn(Ft, `${Ft}--${a}`, n);
741
+ return /* @__PURE__ */ l("span", { className: e, dangerouslySetInnerHTML: { __html: t }, ...o });
802
742
  };
803
- lr.displayName = "Icon";
804
- const on = {
743
+ pt.displayName = "Icon";
744
+ const ln = {
805
745
  name: "check-circle-filled",
806
746
  svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Zm4.712-12.491a.875.875 0 1 0-1.424-1.018l-4.4 6.16-2.27-2.27a.875.875 0 0 0-1.237 1.238l3 3a.875.875 0 0 0 1.331-.11l5-7Z" clip-rule="evenodd"/></svg>',
807
747
  keywords: ["check-circle-filled"],
808
748
  category: "status"
809
- }, lt = (t) => /* @__PURE__ */ l(lr, { ...t, svg: on });
810
- lt.displayName = "IconCheckCircleFilled";
811
- const pn = {
749
+ }, sr = (r) => /* @__PURE__ */ l(pt, { ...r, svg: ln });
750
+ sr.displayName = "IconCheckCircleFilled";
751
+ const sn = {
812
752
  name: "close",
813
753
  svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M4.864 4.864a.9.9 0 0 1 1.273 0L12 10.727l5.864-5.863a.9.9 0 0 1 1.272 1.272L13.273 12l5.863 5.864a.9.9 0 1 1-1.272 1.272L12 13.273l-5.863 5.863a.9.9 0 0 1-1.273-1.272L10.727 12 4.864 6.136a.9.9 0 0 1 0-1.272Z" clip-rule="evenodd"/></svg>',
814
754
  keywords: ["close"],
815
755
  category: "utility"
816
- }, st = (t) => /* @__PURE__ */ l(lr, { ...t, svg: pn });
817
- st.displayName = "IconClose";
818
- function Zr(t, i) {
819
- if (typeof t == "function")
820
- return t(i);
821
- t != null && (t.current = i);
756
+ }, cr = (r) => /* @__PURE__ */ l(pt, { ...r, svg: sn });
757
+ cr.displayName = "IconClose";
758
+ function Zt(r, u) {
759
+ if (typeof r == "function")
760
+ return r(u);
761
+ r != null && (r.current = u);
822
762
  }
823
- function ln(...t) {
824
- return (i) => {
763
+ function cn(...r) {
764
+ return (u) => {
825
765
  let n = !1;
826
- const o = t.map((a) => {
827
- const r = Zr(a, i);
828
- return !n && typeof r == "function" && (n = !0), r;
766
+ const a = r.map((o) => {
767
+ const t = Zt(o, u);
768
+ return !n && typeof t == "function" && (n = !0), t;
829
769
  });
830
770
  if (n)
831
771
  return () => {
832
- for (let a = 0; a < o.length; a++) {
833
- const r = o[a];
834
- typeof r == "function" ? r() : Zr(t[a], null);
772
+ for (let o = 0; o < a.length; o++) {
773
+ const t = a[o];
774
+ typeof t == "function" ? t() : Zt(r[o], null);
835
775
  }
836
776
  };
837
777
  };
838
778
  }
779
+ var dn = Symbol.for("react.lazy"), Q = h[" use ".trim().toString()];
780
+ function _n(r) {
781
+ return typeof r == "object" && r !== null && "then" in r;
782
+ }
783
+ function dr(r) {
784
+ return r != null && typeof r == "object" && "$$typeof" in r && r.$$typeof === dn && "_payload" in r && _n(r._payload);
785
+ }
839
786
  // @__NO_SIDE_EFFECTS__
840
- function sn(t) {
841
- const i = /* @__PURE__ */ cn(t), n = h.forwardRef((o, a) => {
842
- const { children: r, ...e } = o, u = h.Children.toArray(r), v = u.find(_n);
843
- if (v) {
844
- const _ = v.props.children, g = u.map((b) => b === v ? h.Children.count(_) > 1 ? h.Children.only(null) : h.isValidElement(_) ? _.props.children : null : b);
845
- return /* @__PURE__ */ l(i, { ...e, ref: a, children: h.isValidElement(_) ? h.cloneElement(_, void 0, g) : null });
787
+ function fn(r) {
788
+ const u = /* @__PURE__ */ hn(r), n = h.forwardRef((a, o) => {
789
+ let { children: t, ...e } = a;
790
+ dr(t) && typeof Q == "function" && (t = Q(t._payload));
791
+ const i = h.Children.toArray(t), d = i.find(gn);
792
+ if (d) {
793
+ const _ = d.props.children, b = i.map((y) => y === d ? h.Children.count(_) > 1 ? h.Children.only(null) : h.isValidElement(_) ? _.props.children : null : y);
794
+ return /* @__PURE__ */ l(u, { ...e, ref: o, children: h.isValidElement(_) ? h.cloneElement(_, void 0, b) : null });
846
795
  }
847
- return /* @__PURE__ */ l(i, { ...e, ref: a, children: r });
796
+ return /* @__PURE__ */ l(u, { ...e, ref: o, children: t });
848
797
  });
849
- return n.displayName = `${t}.Slot`, n;
798
+ return n.displayName = `${r}.Slot`, n;
850
799
  }
851
800
  // @__NO_SIDE_EFFECTS__
852
- function cn(t) {
853
- const i = h.forwardRef((n, o) => {
854
- const { children: a, ...r } = n;
855
- if (h.isValidElement(a)) {
856
- const e = vn(a), u = fn(r, a.props);
857
- return a.type !== h.Fragment && (u.ref = o ? ln(o, e) : e), h.cloneElement(a, u);
801
+ function hn(r) {
802
+ const u = h.forwardRef((n, a) => {
803
+ let { children: o, ...t } = n;
804
+ if (dr(o) && typeof Q == "function" && (o = Q(o._payload)), h.isValidElement(o)) {
805
+ const e = bn(o), i = mn(t, o.props);
806
+ return o.type !== h.Fragment && (i.ref = a ? cn(a, e) : e), h.cloneElement(o, i);
858
807
  }
859
- return h.Children.count(a) > 1 ? h.Children.only(null) : null;
808
+ return h.Children.count(o) > 1 ? h.Children.only(null) : null;
860
809
  });
861
- return i.displayName = `${t}.SlotClone`, i;
810
+ return u.displayName = `${r}.SlotClone`, u;
862
811
  }
863
- var dn = Symbol("radix.slottable");
864
- function _n(t) {
865
- return h.isValidElement(t) && typeof t.type == "function" && "__radixId" in t.type && t.type.__radixId === dn;
812
+ var vn = Symbol("radix.slottable");
813
+ function gn(r) {
814
+ return h.isValidElement(r) && typeof r.type == "function" && "__radixId" in r.type && r.type.__radixId === vn;
866
815
  }
867
- function fn(t, i) {
868
- const n = { ...i };
869
- for (const o in i) {
870
- const a = t[o], r = i[o];
871
- /^on[A-Z]/.test(o) ? a && r ? n[o] = (...e) => {
872
- const u = r(...e);
873
- return a(...e), u;
874
- } : a && (n[o] = a) : o === "style" ? n[o] = { ...a, ...r } : o === "className" && (n[o] = [a, r].filter(Boolean).join(" "));
816
+ function mn(r, u) {
817
+ const n = { ...u };
818
+ for (const a in u) {
819
+ const o = r[a], t = u[a];
820
+ /^on[A-Z]/.test(a) ? o && t ? n[a] = (...e) => {
821
+ const i = t(...e);
822
+ return o(...e), i;
823
+ } : o && (n[a] = o) : a === "style" ? n[a] = { ...o, ...t } : a === "className" && (n[a] = [o, t].filter(Boolean).join(" "));
875
824
  }
876
- return { ...t, ...n };
825
+ return { ...r, ...n };
877
826
  }
878
- function vn(t) {
879
- var i, n;
880
- let o = (i = Object.getOwnPropertyDescriptor(t.props, "ref")) == null ? void 0 : i.get, a = o && "isReactWarning" in o && o.isReactWarning;
881
- return a ? t.ref : (o = (n = Object.getOwnPropertyDescriptor(t, "ref")) == null ? void 0 : n.get, a = o && "isReactWarning" in o && o.isReactWarning, a ? t.props.ref : t.props.ref || t.ref);
827
+ function bn(r) {
828
+ let u = Object.getOwnPropertyDescriptor(r.props, "ref")?.get, n = u && "isReactWarning" in u && u.isReactWarning;
829
+ return n ? r.ref : (u = Object.getOwnPropertyDescriptor(r, "ref")?.get, n = u && "isReactWarning" in u && u.isReactWarning, n ? r.props.ref : r.props.ref || r.ref);
882
830
  }
883
- var mn = [
831
+ var yn = [
884
832
  "a",
885
833
  "button",
886
834
  "div",
@@ -898,205 +846,186 @@ var mn = [
898
846
  "span",
899
847
  "svg",
900
848
  "ul"
901
- ], hn = mn.reduce((t, i) => {
902
- const n = /* @__PURE__ */ sn(`Primitive.${i}`), o = h.forwardRef((a, r) => {
903
- const { asChild: e, ...u } = a, v = e ? n : i;
904
- return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ l(v, { ...u, ref: r });
849
+ ], xn = yn.reduce((r, u) => {
850
+ const n = /* @__PURE__ */ fn(`Primitive.${u}`), a = h.forwardRef((o, t) => {
851
+ const { asChild: e, ...i } = o, d = e ? n : u;
852
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ l(d, { ...i, ref: t });
905
853
  });
906
- return o.displayName = `Primitive.${i}`, { ...t, [i]: o };
907
- }, {}), gn = "Label", ct = h.forwardRef((t, i) => /* @__PURE__ */ l(
908
- hn.label,
854
+ return a.displayName = `Primitive.${u}`, { ...r, [u]: a };
855
+ }, {}), wn = "Label", _r = h.forwardRef((r, u) => /* @__PURE__ */ l(
856
+ xn.label,
909
857
  {
910
- ...t,
911
- ref: i,
858
+ ...r,
859
+ ref: u,
912
860
  onMouseDown: (n) => {
913
- var o;
914
- n.target.closest("button, input, select, textarea") || ((o = t.onMouseDown) == null || o.call(t, n), !n.defaultPrevented && n.detail > 1 && n.preventDefault());
861
+ n.target.closest("button, input, select, textarea") || (r.onMouseDown?.(n), !n.defaultPrevented && n.detail > 1 && n.preventDefault());
915
862
  }
916
863
  }
917
864
  ));
918
- ct.displayName = gn;
919
- var bn = ct;
920
- function yn(t) {
921
- return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
865
+ _r.displayName = wn;
866
+ var $n = _r;
867
+ function Sn(r) {
868
+ return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
922
869
  }
923
- var Hr = { exports: {} };
924
- /*!
925
- Copyright (c) 2018 Jed Watson.
926
- Licensed under the MIT License (MIT), see
927
- http://jedwatson.github.io/classnames
928
- */
929
- var Fr;
930
- function xn() {
931
- return Fr || (Fr = 1, (function(t) {
870
+ var Kt = { exports: {} }, Ht;
871
+ function Nn() {
872
+ return Ht || (Ht = 1, (function(r) {
932
873
  (function() {
933
- var i = {}.hasOwnProperty;
874
+ var u = {}.hasOwnProperty;
934
875
  function n() {
935
- for (var r = "", e = 0; e < arguments.length; e++) {
936
- var u = arguments[e];
937
- u && (r = a(r, o.call(this, u)));
876
+ for (var t = "", e = 0; e < arguments.length; e++) {
877
+ var i = arguments[e];
878
+ i && (t = o(t, a.call(this, i)));
938
879
  }
939
- return r;
880
+ return t;
940
881
  }
941
- function o(r) {
942
- if (typeof r == "string" || typeof r == "number")
943
- return this && this[r] || r;
944
- if (typeof r != "object")
882
+ function a(t) {
883
+ if (typeof t == "string" || typeof t == "number")
884
+ return this && this[t] || t;
885
+ if (typeof t != "object")
945
886
  return "";
946
- if (Array.isArray(r))
947
- return n.apply(this, r);
948
- if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
949
- return r.toString();
887
+ if (Array.isArray(t))
888
+ return n.apply(this, t);
889
+ if (t.toString !== Object.prototype.toString && !t.toString.toString().includes("[native code]"))
890
+ return t.toString();
950
891
  var e = "";
951
- for (var u in r)
952
- i.call(r, u) && r[u] && (e = a(e, this && this[u] || u));
892
+ for (var i in t)
893
+ u.call(t, i) && t[i] && (e = o(e, this && this[i] || i));
953
894
  return e;
954
895
  }
955
- function a(r, e) {
956
- return e ? r ? r + " " + e : r + e : r;
896
+ function o(t, e) {
897
+ return e ? t ? t + " " + e : t + e : t;
957
898
  }
958
- t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
899
+ r.exports ? (n.default = n, r.exports = n) : window.classNames = n;
959
900
  })();
960
- })(Hr)), Hr.exports;
901
+ })(Kt)), Kt.exports;
961
902
  }
962
- var wn = xn();
963
- const $n = /* @__PURE__ */ yn(wn), Sn = {
903
+ var On = Nn();
904
+ const jn = /* @__PURE__ */ Sn(On), An = {
964
905
  "purpur-label": "_purpur-label_1x80u_1",
965
906
  "purpur-label--negative": "_purpur-label--negative_1x80u_8",
966
907
  "purpur-label--disabled": "_purpur-label--disabled_1x80u_11"
967
- }, Nn = $n.bind(Sn), ar = "purpur-label", jn = ({
968
- children: t,
969
- className: i,
908
+ }, kn = jn.bind(An), ut = "purpur-label", Cn = ({
909
+ children: r,
910
+ className: u,
970
911
  disabled: n,
971
- negative: o = !1,
972
- ...a
912
+ negative: a = !1,
913
+ ...o
973
914
  }) => {
974
- const r = Nn(i, ar, {
975
- [`${ar}--disabled`]: n,
976
- [`${ar}--negative`]: o
915
+ const t = kn(u, ut, {
916
+ [`${ut}--disabled`]: n,
917
+ [`${ut}--negative`]: a
977
918
  });
978
- return /* @__PURE__ */ l(bn, { className: r, ...a, children: t });
919
+ return /* @__PURE__ */ l($n, { className: t, ...o, children: r });
979
920
  };
980
- function On(t) {
981
- return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
921
+ function Pn(r) {
922
+ return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
982
923
  }
983
- var Wr = { exports: {} };
984
- /*!
985
- Copyright (c) 2018 Jed Watson.
986
- Licensed under the MIT License (MIT), see
987
- http://jedwatson.github.io/classnames
988
- */
989
- var Gr;
990
- function An() {
991
- return Gr || (Gr = 1, (function(t) {
924
+ var Wt = { exports: {} }, Gt;
925
+ function In() {
926
+ return Gt || (Gt = 1, (function(r) {
992
927
  (function() {
993
- var i = {}.hasOwnProperty;
928
+ var u = {}.hasOwnProperty;
994
929
  function n() {
995
- for (var r = "", e = 0; e < arguments.length; e++) {
996
- var u = arguments[e];
997
- u && (r = a(r, o.call(this, u)));
930
+ for (var t = "", e = 0; e < arguments.length; e++) {
931
+ var i = arguments[e];
932
+ i && (t = o(t, a.call(this, i)));
998
933
  }
999
- return r;
934
+ return t;
1000
935
  }
1001
- function o(r) {
1002
- if (typeof r == "string" || typeof r == "number")
1003
- return this && this[r] || r;
1004
- if (typeof r != "object")
936
+ function a(t) {
937
+ if (typeof t == "string" || typeof t == "number")
938
+ return this && this[t] || t;
939
+ if (typeof t != "object")
1005
940
  return "";
1006
- if (Array.isArray(r))
1007
- return n.apply(this, r);
1008
- if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
1009
- return r.toString();
941
+ if (Array.isArray(t))
942
+ return n.apply(this, t);
943
+ if (t.toString !== Object.prototype.toString && !t.toString.toString().includes("[native code]"))
944
+ return t.toString();
1010
945
  var e = "";
1011
- for (var u in r)
1012
- i.call(r, u) && r[u] && (e = a(e, this && this[u] || u));
946
+ for (var i in t)
947
+ u.call(t, i) && t[i] && (e = o(e, this && this[i] || i));
1013
948
  return e;
1014
949
  }
1015
- function a(r, e) {
1016
- return e ? r ? r + " " + e : r + e : r;
950
+ function o(t, e) {
951
+ return e ? t ? t + " " + e : t + e : t;
1017
952
  }
1018
- t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
953
+ r.exports ? (n.default = n, r.exports = n) : window.classNames = n;
1019
954
  })();
1020
- })(Wr)), Wr.exports;
955
+ })(Wt)), Wt.exports;
1021
956
  }
1022
- var kn = An();
1023
- const Cn = /* @__PURE__ */ On(kn), Pn = "_rotate_12t9p_1", qn = "_dash_12t9p_1", Rn = {
957
+ var Mn = In();
958
+ const Bn = /* @__PURE__ */ Pn(Mn), qn = "_rotate_12t9p_1", Rn = "_dash_12t9p_1", Ln = {
1024
959
  "purpur-spinner": "_purpur-spinner_12t9p_2",
1025
- rotate: Pn,
960
+ rotate: qn,
1026
961
  "purpur-spinner--xxs": "_purpur-spinner--xxs_12t9p_6",
1027
962
  "purpur-spinner--xs": "_purpur-spinner--xs_12t9p_10",
1028
963
  "purpur-spinner--sm": "_purpur-spinner--sm_12t9p_14",
1029
964
  "purpur-spinner--md": "_purpur-spinner--md_12t9p_18",
1030
965
  "purpur-spinner--lg": "_purpur-spinner--lg_12t9p_22",
1031
966
  "purpur-spinner__circle": "_purpur-spinner__circle_12t9p_26",
1032
- dash: qn,
967
+ dash: Rn,
1033
968
  "purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_12t9p_41",
1034
969
  "purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_12t9p_44"
1035
- }, Kr = Cn.bind(Rn), W = "purpur-spinner", Ln = {
970
+ }, Ut = Bn.bind(Ln), H = "purpur-spinner", En = {
1036
971
  SM: "sm"
1037
- }, dt = ({
1038
- disabled: t = !1,
1039
- negative: i = !1,
1040
- size: n = Ln.SM,
1041
- className: o,
1042
- ...a
1043
- }) => /* @__PURE__ */ l("div", { className: Kr(W, `${W}--${n}`, o), ...a, children: /* @__PURE__ */ l("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ l(
972
+ }, fr = ({
973
+ disabled: r = !1,
974
+ negative: u = !1,
975
+ size: n = En.SM,
976
+ className: a,
977
+ ...o
978
+ }) => /* @__PURE__ */ l("div", { className: Ut(H, `${H}--${n}`, a), ...o, children: /* @__PURE__ */ l("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ l(
1044
979
  "circle",
1045
980
  {
1046
- className: Kr(`${W}__circle`, {
1047
- [`${W}__circle--disabled`]: t,
1048
- [`${W}__circle--negative`]: i
981
+ className: Ut(`${H}__circle`, {
982
+ [`${H}__circle--disabled`]: r,
983
+ [`${H}__circle--negative`]: u
1049
984
  }),
1050
985
  cx: "25",
1051
986
  cy: "25",
1052
987
  r: "20"
1053
988
  }
1054
989
  ) }) });
1055
- dt.displayName = "Spinner";
1056
- function Mn(t) {
1057
- return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
990
+ fr.displayName = "Spinner";
991
+ function Tn(r) {
992
+ return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
1058
993
  }
1059
- var Ur = { exports: {} };
1060
- /*!
1061
- Copyright (c) 2018 Jed Watson.
1062
- Licensed under the MIT License (MIT), see
1063
- http://jedwatson.github.io/classnames
1064
- */
1065
- var Yr;
1066
- function Bn() {
1067
- return Yr || (Yr = 1, (function(t) {
994
+ var Yt = { exports: {} }, Jt;
995
+ function Dn() {
996
+ return Jt || (Jt = 1, (function(r) {
1068
997
  (function() {
1069
- var i = {}.hasOwnProperty;
998
+ var u = {}.hasOwnProperty;
1070
999
  function n() {
1071
- for (var r = "", e = 0; e < arguments.length; e++) {
1072
- var u = arguments[e];
1073
- u && (r = a(r, o.call(this, u)));
1000
+ for (var t = "", e = 0; e < arguments.length; e++) {
1001
+ var i = arguments[e];
1002
+ i && (t = o(t, a.call(this, i)));
1074
1003
  }
1075
- return r;
1004
+ return t;
1076
1005
  }
1077
- function o(r) {
1078
- if (typeof r == "string" || typeof r == "number")
1079
- return this && this[r] || r;
1080
- if (typeof r != "object")
1006
+ function a(t) {
1007
+ if (typeof t == "string" || typeof t == "number")
1008
+ return this && this[t] || t;
1009
+ if (typeof t != "object")
1081
1010
  return "";
1082
- if (Array.isArray(r))
1083
- return n.apply(this, r);
1084
- if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
1085
- return r.toString();
1011
+ if (Array.isArray(t))
1012
+ return n.apply(this, t);
1013
+ if (t.toString !== Object.prototype.toString && !t.toString.toString().includes("[native code]"))
1014
+ return t.toString();
1086
1015
  var e = "";
1087
- for (var u in r)
1088
- i.call(r, u) && r[u] && (e = a(e, this && this[u] || u));
1016
+ for (var i in t)
1017
+ u.call(t, i) && t[i] && (e = o(e, this && this[i] || i));
1089
1018
  return e;
1090
1019
  }
1091
- function a(r, e) {
1092
- return e ? r ? r + " " + e : r + e : r;
1020
+ function o(t, e) {
1021
+ return e ? t ? t + " " + e : t + e : t;
1093
1022
  }
1094
- t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
1023
+ r.exports ? (n.default = n, r.exports = n) : window.classNames = n;
1095
1024
  })();
1096
- })(Ur)), Ur.exports;
1025
+ })(Yt)), Yt.exports;
1097
1026
  }
1098
- var En = Bn();
1099
- const Tn = /* @__PURE__ */ Mn(En), In = {
1027
+ var zn = Dn();
1028
+ const Vn = /* @__PURE__ */ Tn(zn), Fn = {
1100
1029
  "purpur-text-field": "_purpur-text-field_3gl1k_1",
1101
1030
  "purpur-text-field__label": "_purpur-text-field__label_3gl1k_7",
1102
1031
  "purpur-text-field__label-text": "_purpur-text-field__label-text_3gl1k_12",
@@ -1113,266 +1042,257 @@ const Tn = /* @__PURE__ */ Mn(En), In = {
1113
1042
  "purpur-text-field__input--error": "_purpur-text-field__input--error_3gl1k_94",
1114
1043
  "purpur-text-field__adornment-container": "_purpur-text-field__adornment-container_3gl1k_106",
1115
1044
  "purpur-text-field__valid-icon": "_purpur-text-field__valid-icon_3gl1k_111"
1116
- }, zn = (t) => K(t), P = Tn.bind(In), m = "purpur-text-field", _t = Y(
1045
+ }, Zn = (r) => G(r), O = Vn.bind(Fn), v = "purpur-text-field", hr = Y(
1117
1046
  ({
1118
- ["data-testid"]: t,
1119
- className: i,
1047
+ ["data-testid"]: r,
1048
+ className: u,
1120
1049
  clearButtonAriaLabel: n,
1121
- beforeField: o,
1122
- afterField: a,
1123
- endAdornment: r,
1050
+ beforeField: a,
1051
+ afterField: o,
1052
+ endAdornment: t,
1124
1053
  errorText: e,
1125
- helperText: u,
1126
- hideRequiredAsterisk: v = !1,
1054
+ helperText: i,
1055
+ hideRequiredAsterisk: d = !1,
1127
1056
  label: _,
1128
- loading: g = !1,
1129
- onClear: b,
1130
- startAdornment: N,
1131
- valid: A = !1,
1132
- ...f
1133
- }, $) => {
1134
- var S;
1135
- const j = Ot(), s = f.id ?? j, y = (x) => t ? `${t}-${x}` : void 0, q = A && !e, M = u ? `${s}-helper-text` : void 0, I = [N].filter((x) => !!x), d = (typeof f.value == "number" ? f.value !== void 0 : (S = f.value) == null ? void 0 : S.length) && !f.disabled && !f.readOnly && !g && b && n, k = zn(null), z = (x) => {
1136
- k.current = x, typeof $ == "function" ? $(x) : $ && ($.current = x);
1137
- }, J = () => {
1138
- var x;
1139
- b == null || b(), (x = k.current) == null || x.focus();
1140
- }, B = [
1141
- g && /* @__PURE__ */ l(
1142
- dt,
1057
+ loading: b = !1,
1058
+ onClear: y,
1059
+ startAdornment: j,
1060
+ valid: M = !1,
1061
+ ...c
1062
+ }, x) => {
1063
+ const A = kr(), w = c.id ?? A, s = (m) => r ? `${r}-${m}` : void 0, k = M && !e, N = i ? `${w}-helper-text` : void 0, B = [j].filter((m) => !!m), D = (typeof c.value == "number" ? c.value !== void 0 : c.value?.length) && !c.disabled && !c.readOnly && !b && y && n, g = Zn(null), C = (m) => {
1064
+ g.current = m, typeof x == "function" ? x(m) : x && (x.current = m);
1065
+ }, E = () => {
1066
+ y?.(), g.current?.focus();
1067
+ }, T = [
1068
+ b && /* @__PURE__ */ l(
1069
+ fr,
1143
1070
  {
1144
- disabled: f.disabled,
1071
+ disabled: c.disabled,
1145
1072
  size: "xs",
1146
- "data-testid": y("spinner")
1073
+ "data-testid": s("spinner")
1147
1074
  },
1148
1075
  "spinner"
1149
1076
  ),
1150
- d && /* @__PURE__ */ l(
1151
- ot,
1077
+ D && /* @__PURE__ */ l(
1078
+ pr,
1152
1079
  {
1153
1080
  variant: "tertiary-purple",
1154
- onClick: J,
1081
+ onClick: E,
1155
1082
  iconOnly: !0,
1156
1083
  "aria-label": n ?? "",
1157
- "data-testid": y("clear-button"),
1084
+ "data-testid": s("clear-button"),
1158
1085
  tabIndex: -1,
1159
- children: /* @__PURE__ */ l(st, { size: "xs" })
1086
+ children: /* @__PURE__ */ l(cr, { size: "xs" })
1160
1087
  },
1161
1088
  "clear-button"
1162
1089
  ),
1163
- q && /* @__PURE__ */ l(
1164
- lt,
1090
+ k && /* @__PURE__ */ l(
1091
+ sr,
1165
1092
  {
1166
- "data-testid": y("valid-icon"),
1167
- className: P(`${m}__valid-icon`)
1093
+ "data-testid": s("valid-icon"),
1094
+ className: O(`${v}__valid-icon`)
1168
1095
  },
1169
1096
  "valid-icon"
1170
1097
  )
1171
- ].filter((x) => !!x), D = P(`${m}__input-container`, {
1172
- [`${m}__input-container--start-adornment`]: I.length,
1173
- [`${m}__input-container--end-adornment`]: B.length || r,
1174
- [`${m}__input-container--disabled`]: f.disabled,
1175
- [`${m}__input-container--has-clear-button`]: d,
1176
- [`${m}__input-container--readonly`]: f.readOnly && !f.disabled
1098
+ ].filter((m) => !!m), z = O(`${v}__input-container`, {
1099
+ [`${v}__input-container--start-adornment`]: B.length,
1100
+ [`${v}__input-container--end-adornment`]: T.length || t,
1101
+ [`${v}__input-container--disabled`]: c.disabled,
1102
+ [`${v}__input-container--has-clear-button`]: D,
1103
+ [`${v}__input-container--readonly`]: c.readOnly && !c.disabled
1177
1104
  });
1178
- return /* @__PURE__ */ O("div", { className: P(i, m), children: [
1179
- _ && /* @__PURE__ */ O(
1180
- jn,
1105
+ return /* @__PURE__ */ S("div", { className: O(u, v), children: [
1106
+ _ && /* @__PURE__ */ S(
1107
+ Cn,
1181
1108
  {
1182
- htmlFor: s,
1183
- className: P(`${m}__label`),
1184
- "data-testid": y("label"),
1185
- disabled: f.disabled,
1109
+ htmlFor: w,
1110
+ className: O(`${v}__label`),
1111
+ "data-testid": s("label"),
1112
+ disabled: c.disabled,
1186
1113
  children: [
1187
- f.required && !v && /* @__PURE__ */ l("span", { "aria-hidden": !0, children: "*" }),
1114
+ c.required && !d && /* @__PURE__ */ l("span", { "aria-hidden": !0, children: "*" }),
1188
1115
  _
1189
1116
  ]
1190
1117
  }
1191
1118
  ),
1192
- /* @__PURE__ */ O("div", { className: P(`${m}__field-row`), children: [
1193
- !!o && o,
1194
- /* @__PURE__ */ O("div", { className: D, children: [
1195
- !!I.length && /* @__PURE__ */ l(
1119
+ /* @__PURE__ */ S("div", { className: O(`${v}__field-row`), children: [
1120
+ !!a && a,
1121
+ /* @__PURE__ */ S("div", { className: z, children: [
1122
+ !!B.length && /* @__PURE__ */ l(
1196
1123
  "div",
1197
1124
  {
1198
- "data-testid": y("start-adornments"),
1199
- className: P(`${m}__adornment-container`),
1200
- children: I
1125
+ "data-testid": s("start-adornments"),
1126
+ className: O(`${v}__adornment-container`),
1127
+ children: B
1201
1128
  }
1202
1129
  ),
1203
1130
  /* @__PURE__ */ l(
1204
1131
  "input",
1205
1132
  {
1206
- ...f,
1207
- id: s,
1208
- ref: z,
1209
- "data-testid": y("input"),
1210
- "aria-describedby": f["aria-describedby"] || M,
1211
- "aria-invalid": f["aria-invalid"] || !!e,
1212
- className: P([
1213
- `${m}__input`,
1133
+ ...c,
1134
+ id: w,
1135
+ ref: C,
1136
+ "data-testid": s("input"),
1137
+ "aria-describedby": c["aria-describedby"] || N,
1138
+ "aria-invalid": c["aria-invalid"] || !!e,
1139
+ className: O([
1140
+ `${v}__input`,
1214
1141
  {
1215
- [`${m}__input--valid`]: q,
1216
- [`${m}__input--error`]: !!e
1142
+ [`${v}__input--valid`]: k,
1143
+ [`${v}__input--error`]: !!e
1217
1144
  }
1218
1145
  ])
1219
1146
  }
1220
1147
  ),
1221
- /* @__PURE__ */ l("div", { className: P(`${m}__frame`) }),
1222
- (!!B.length || r) && /* @__PURE__ */ O(
1148
+ /* @__PURE__ */ l("div", { className: O(`${v}__frame`) }),
1149
+ (!!T.length || t) && /* @__PURE__ */ S(
1223
1150
  "div",
1224
1151
  {
1225
- "data-testid": y("end-adornments"),
1226
- className: P(`${m}__adornment-container`),
1152
+ "data-testid": s("end-adornments"),
1153
+ className: O(`${v}__adornment-container`),
1227
1154
  children: [
1228
- B,
1229
- r
1155
+ T,
1156
+ t
1230
1157
  ]
1231
1158
  }
1232
1159
  )
1233
1160
  ] }),
1234
- !!a && a
1161
+ !!o && o
1235
1162
  ] }),
1236
- M && /* @__PURE__ */ l(Ue, { "data-testid": y("helper-text"), id: M, children: u }),
1237
- e && /* @__PURE__ */ l(Ve, { "data-testid": y("error-text"), children: e })
1163
+ N && /* @__PURE__ */ l(Je, { "data-testid": s("helper-text"), id: N, children: i }),
1164
+ e && /* @__PURE__ */ l(Ze, { "data-testid": s("error-text"), children: e })
1238
1165
  ] });
1239
1166
  }
1240
1167
  );
1241
- _t.displayName = "TextField";
1242
- const Dn = (t) => Qr(t) && t.type.displayName === _t.displayName;
1243
- function Vn(t) {
1244
- return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
1168
+ hr.displayName = "TextField";
1169
+ const Kn = (r) => Xt(r) && r.type.displayName === hr.displayName;
1170
+ function Hn(r) {
1171
+ return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
1245
1172
  }
1246
- var or = { exports: {} };
1247
- /*!
1248
- Copyright (c) 2018 Jed Watson.
1249
- Licensed under the MIT License (MIT), see
1250
- http://jedwatson.github.io/classnames
1251
- */
1252
- var Jr;
1253
- function Zn() {
1254
- return Jr || (Jr = 1, (function(t) {
1173
+ var ot = { exports: {} };
1174
+ var Qt;
1175
+ function Wn() {
1176
+ return Qt || (Qt = 1, (function(r) {
1255
1177
  (function() {
1256
- var i = {}.hasOwnProperty;
1178
+ var u = {}.hasOwnProperty;
1257
1179
  function n() {
1258
- for (var r = "", e = 0; e < arguments.length; e++) {
1259
- var u = arguments[e];
1260
- u && (r = a(r, o.call(this, u)));
1180
+ for (var t = "", e = 0; e < arguments.length; e++) {
1181
+ var i = arguments[e];
1182
+ i && (t = o(t, a.call(this, i)));
1261
1183
  }
1262
- return r;
1184
+ return t;
1263
1185
  }
1264
- function o(r) {
1265
- if (typeof r == "string" || typeof r == "number")
1266
- return this && this[r] || r;
1267
- if (typeof r != "object")
1186
+ function a(t) {
1187
+ if (typeof t == "string" || typeof t == "number")
1188
+ return this && this[t] || t;
1189
+ if (typeof t != "object")
1268
1190
  return "";
1269
- if (Array.isArray(r))
1270
- return n.apply(this, r);
1271
- if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
1272
- return r.toString();
1191
+ if (Array.isArray(t))
1192
+ return n.apply(this, t);
1193
+ if (t.toString !== Object.prototype.toString && !t.toString.toString().includes("[native code]"))
1194
+ return t.toString();
1273
1195
  var e = "";
1274
- for (var u in r)
1275
- i.call(r, u) && r[u] && (e = a(e, this && this[u] || u));
1196
+ for (var i in t)
1197
+ u.call(t, i) && t[i] && (e = o(e, this && this[i] || i));
1276
1198
  return e;
1277
1199
  }
1278
- function a(r, e) {
1279
- return e ? r ? r + " " + e : r + e : r;
1200
+ function o(t, e) {
1201
+ return e ? t ? t + " " + e : t + e : t;
1280
1202
  }
1281
- t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
1203
+ r.exports ? (n.default = n, r.exports = n) : window.classNames = n;
1282
1204
  })();
1283
- })(or)), or.exports;
1205
+ })(ot)), ot.exports;
1284
1206
  }
1285
- var Hn = Zn();
1286
- const Fn = /* @__PURE__ */ Vn(Hn), Wn = {
1207
+ var Gn = Wn();
1208
+ const Un = /* @__PURE__ */ Hn(Gn), Yn = {
1287
1209
  "purpur-autocomplete": "_purpur-autocomplete_1u8x6_1",
1288
1210
  "purpur-autocomplete__listbox": "_purpur-autocomplete__listbox_1u8x6_4",
1289
1211
  "purpur-autocomplete__chevron-button": "_purpur-autocomplete__chevron-button_1u8x6_9",
1290
1212
  "purpur-autocomplete__chevron-icon": "_purpur-autocomplete__chevron-icon_1u8x6_15",
1291
1213
  "purpur-autocomplete__chevron-icon--up": "_purpur-autocomplete__chevron-icon--up_1u8x6_19"
1292
- }, Gn = (t) => K(t), Kn = (t, i) => {
1293
- const n = At(
1294
- (o) => {
1295
- t && !t.contains(o.target) && i();
1214
+ }, Jn = (r) => G(r), Qn = (r, u) => {
1215
+ const n = Cr(
1216
+ (a) => {
1217
+ r && !r.contains(a.target) && u();
1296
1218
  },
1297
- [i, t]
1219
+ [u, r]
1298
1220
  );
1299
- kt(() => (document.addEventListener("mousedown", n), () => {
1221
+ Pr(() => (document.addEventListener("mousedown", n), () => {
1300
1222
  document.removeEventListener("mousedown", n);
1301
1223
  }), [n]);
1302
- }, Un = ({
1303
- combobox: t,
1304
- comboboxButtonAriaLabel: i,
1224
+ }, Xn = ({
1225
+ combobox: r,
1226
+ comboboxButtonAriaLabel: u,
1305
1227
  highlightFirstOption: n,
1306
- defaultInputValue: o,
1307
- inputValue: a,
1308
- filterOption: r,
1228
+ defaultInputValue: a,
1229
+ inputValue: o,
1230
+ filterOption: t,
1309
1231
  id: e,
1310
- listboxLabel: u,
1311
- listboxMaxHeight: v,
1232
+ listboxLabel: i,
1233
+ listboxMaxHeight: d,
1312
1234
  onInputBlur: _,
1313
- onInputChange: g,
1314
- onInputFocus: b,
1315
- onInputKeyDown: N,
1316
- onInputMouseDown: A,
1317
- openOnFocus: f,
1318
- noOptionsText: $,
1319
- onSelect: S,
1320
- options: j,
1235
+ onInputChange: b,
1236
+ onInputFocus: y,
1237
+ onInputKeyDown: j,
1238
+ onInputMouseDown: M,
1239
+ openOnFocus: c,
1240
+ noOptionsText: x,
1241
+ onSelect: A,
1242
+ options: w,
1321
1243
  selectedOption: s,
1322
- ["data-testid"]: y
1244
+ ["data-testid"]: k
1323
1245
  }) => {
1324
- const [q, M] = nr(
1325
- ((typeof a == "string" ? a : o) || (s == null ? void 0 : s.label)) ?? ""
1326
- ), I = typeof a == "string" ? a : q, [d, k] = nr(n ? j[0] : void 0), z = K(null), J = Gn(null), B = K(null), D = K({}), [x, sr] = nr(!1);
1246
+ const [N, B] = et(
1247
+ ((typeof o == "string" ? o : a) || s?.label) ?? ""
1248
+ ), D = typeof o == "string" ? o : N, [g, C] = et(n ? w[0] : void 0), E = G(null), T = Jn(null), z = G(null), m = G({}), [lt, st] = et(!1);
1327
1249
  function X(p) {
1328
- return y ? `${y}-${p}` : void 0;
1250
+ return k ? `${k}-${p}` : void 0;
1329
1251
  }
1330
1252
  const V = () => {
1331
- sr(!1), k(void 0);
1253
+ st(!1), C(void 0);
1332
1254
  };
1333
- Kn(J.current, V);
1334
- const Z = ({ eventType: p }) => {
1335
- sr(!0), s && requestAnimationFrame(() => {
1336
- k({ ...s, isSetByClickEvent: p === "CLICK" }), tr(D.current[s.id]);
1255
+ Qn(T.current, V);
1256
+ const F = ({ eventType: p }) => {
1257
+ st(!0), s && requestAnimationFrame(() => {
1258
+ C({ ...s, isSetByClickEvent: p === "CLICK" }), rt(m.current[s.id]);
1337
1259
  });
1338
- }, ft = (p) => {
1339
- if (r)
1340
- return j.filter((w) => r(p, w));
1260
+ }, vr = (p) => {
1261
+ if (t)
1262
+ return w.filter(($) => t(p, $));
1341
1263
  if (!p)
1342
- return j;
1343
- const c = p.toUpperCase().split(" ") || [];
1344
- return j.filter(
1345
- (w) => c.every(
1346
- (C) => (w.value || w.label).toUpperCase().includes(C)
1264
+ return w;
1265
+ const f = p.toUpperCase().split(" ") || [];
1266
+ return w.filter(
1267
+ ($) => f.every(
1268
+ (R) => ($.value || $.label).toUpperCase().includes(R)
1347
1269
  )
1348
1270
  );
1349
- }, cr = (p) => s && (s == null ? void 0 : s.label) === p ? j : ft(p), R = cr(I), rr = (p) => {
1350
- g == null || g(p), M(p);
1351
- }, tr = (p) => {
1352
- var c;
1271
+ }, ct = (p) => s && s?.label === p ? w : vr(p), P = ct(D), tt = (p) => {
1272
+ b?.(p), B(p);
1273
+ }, rt = (p) => {
1353
1274
  if (p) {
1354
- const w = p.getBoundingClientRect(), C = ((c = B.current) == null ? void 0 : c.getBoundingClientRect()) || { top: 0, bottom: 0 };
1355
- (w.top < C.top || w.bottom > C.bottom) && p.scrollIntoView({ block: "nearest" });
1275
+ const f = p.getBoundingClientRect(), $ = z.current?.getBoundingClientRect() || { top: 0, bottom: 0 };
1276
+ (f.top < $.top || f.bottom > $.bottom) && p.scrollIntoView({ block: "nearest" });
1356
1277
  }
1357
- }, dr = (p) => {
1358
- var c;
1359
- p && ((c = z.current) == null || c.focus(), rr(p.label), S == null || S(p)), V();
1360
- }, vt = (p) => {
1361
- const c = n && !d ? 0 : R.findIndex((C) => C && (d == null ? void 0 : d.id) === C.id), w = R.length;
1362
- return p === "ArrowDown" ? R[(c ?? -1) + 1] || R[0] : R[(c ?? w) - 1] || R[w - 1];
1363
- }, E = x && (!!R.length || !!$), mt = (p) => {
1364
- !E && Z({ eventType: "KEYBOARD" });
1365
- const c = vt(p);
1366
- k(c), c && tr(D.current[c.id]);
1367
- }, ht = (p) => {
1368
- switch (N == null || N(p), p.key) {
1278
+ }, dt = (p) => {
1279
+ p && (E.current?.focus(), tt(p.label), A?.(p)), V();
1280
+ }, gr = (p) => {
1281
+ const f = n && !g ? 0 : P.findIndex((R) => R && g?.id === R.id), $ = P.length;
1282
+ return p === "ArrowDown" ? P[(f ?? -1) + 1] || P[0] : P[(f ?? $) - 1] || P[$ - 1];
1283
+ }, q = lt && (!!P.length || !!x), mr = (p) => {
1284
+ !q && F({ eventType: "KEYBOARD" });
1285
+ const f = gr(p);
1286
+ C(f), f && rt(m.current[f.id]);
1287
+ }, br = (p) => {
1288
+ switch (j?.(p), p.key) {
1369
1289
  case "ArrowUp":
1370
1290
  case "ArrowDown":
1371
- p.preventDefault(), mt(p.key);
1291
+ p.preventDefault(), mr(p.key);
1372
1292
  break;
1373
1293
  case "Enter": {
1374
- const c = d || (n ? j[0] : void 0);
1375
- E && dr(c), !E && Z({ eventType: "KEYBOARD" });
1294
+ const f = g || (n ? w[0] : void 0);
1295
+ q && dt(f), !q && F({ eventType: "KEYBOARD" });
1376
1296
  break;
1377
1297
  }
1378
1298
  case "Escape":
@@ -1380,132 +1300,130 @@ const Fn = /* @__PURE__ */ Vn(Hn), Wn = {
1380
1300
  V();
1381
1301
  break;
1382
1302
  }
1383
- }, gt = (p) => {
1384
- const c = cr(p.target.value);
1385
- rr(p.target.value), k(void 0), !E && Z({ eventType: "KEYBOARD" }), n && c[0] && tr(D.current[c[0].id]);
1386
- }, bt = (p) => {
1387
- A == null || A(p), E ? V() : Z({ eventType: "CLICK" });
1388
- }, yt = (p) => {
1389
- var c;
1390
- b == null || b(p), !x && f && Z({ eventType: "KEYBOARD" }), (c = z.current) == null || c.select();
1391
- }, xt = (p) => {
1392
- _ == null || _(p), setTimeout(() => {
1393
- var c, w;
1394
- !((c = z.current) != null && c.contains(document.activeElement)) && !((w = B.current) != null && w.contains(document.activeElement)) && (V(), t && rr(s ? s.label : ""));
1303
+ }, yr = (p) => {
1304
+ const f = ct(p.target.value);
1305
+ tt(p.target.value), C(void 0), !q && F({ eventType: "KEYBOARD" }), n && f[0] && rt(m.current[f[0].id]);
1306
+ }, xr = (p) => {
1307
+ M?.(p), q ? V() : F({ eventType: "CLICK" });
1308
+ }, wr = (p) => {
1309
+ y?.(p), !lt && c && F({ eventType: "KEYBOARD" }), E.current?.select();
1310
+ }, $r = (p) => {
1311
+ _?.(p), setTimeout(() => {
1312
+ !E.current?.contains(document.activeElement) && !z.current?.contains(document.activeElement) && (V(), r && tt(s ? s.label : ""));
1395
1313
  });
1396
- }, wt = {
1397
- maxHeight: typeof v == "number" ? `${v}px` : v
1398
- }, _r = {
1399
- "aria-label": u,
1400
- "aria-expanded": E,
1314
+ }, Sr = {
1315
+ maxHeight: typeof d == "number" ? `${d}px` : d
1316
+ }, _t = {
1317
+ "aria-label": i,
1318
+ "aria-expanded": q,
1401
1319
  "data-testid": X("listbox"),
1402
1320
  id: `${e}-listbox`,
1403
- ref: B,
1404
- onMouseLeave: () => k(void 0),
1405
- style: v ? wt : void 0
1406
- }, fr = (p) => `${e}-listbox-item-${p.id}`, $t = (p, c) => {
1407
- const w = () => p.id !== (d == null ? void 0 : d.id) && k({ ...p, isSetByClickEvent: !0 }), C = (p.id === (d == null ? void 0 : d.id) || !!n && !d && c === 0) && !(d != null && d.isSetByClickEvent);
1321
+ ref: z,
1322
+ onMouseLeave: () => C(void 0),
1323
+ style: d ? Sr : void 0
1324
+ }, ft = (p) => `${e}-listbox-item-${p.id}`, Nr = (p, f) => {
1325
+ const $ = () => p.id !== g?.id && C({ ...p, isSetByClickEvent: !0 }), R = (p.id === g?.id || !!n && !g && f === 0) && !g?.isSetByClickEvent;
1408
1326
  return {
1409
1327
  "data-testid": X(`listbox-item-${p.id}`),
1410
- id: fr(p),
1328
+ id: ft(p),
1411
1329
  key: p.id,
1412
- onMouseMove: w,
1413
- onMouseUp: () => dr(p),
1414
- ref: (er) => {
1415
- er && (D.current[p.id] = er);
1330
+ onMouseMove: $,
1331
+ onMouseUp: () => dt(p),
1332
+ ref: (ht) => {
1333
+ ht && (m.current[p.id] = ht);
1416
1334
  },
1417
1335
  tabIndex: -1,
1418
- selected: p.id === (s == null ? void 0 : s.id),
1336
+ selected: p.id === s?.id,
1419
1337
  disabled: p.disabled,
1420
- highlighted: C,
1421
- hovered: p.id === (d == null ? void 0 : d.id) && !!(d != null && d.isSetByClickEvent)
1338
+ highlighted: R,
1339
+ hovered: p.id === g?.id && !!g?.isSetByClickEvent
1422
1340
  };
1423
- }, St = {
1424
- "aria-activedescendant": d ? fr(d) : void 0,
1341
+ }, Or = {
1342
+ "aria-activedescendant": g ? ft(g) : void 0,
1425
1343
  "aria-autocomplete": "list",
1426
- "aria-controls": _r.id,
1344
+ "aria-controls": _t.id,
1427
1345
  "data-testid": X("input"),
1428
1346
  autoComplete: "off",
1429
1347
  id: `${e}-input`,
1430
- onChange: gt,
1431
- onMouseDown: bt,
1432
- onFocus: yt,
1433
- onKeyDown: ht,
1434
- onBlur: xt,
1435
- ref: z,
1348
+ onChange: yr,
1349
+ onMouseDown: xr,
1350
+ onFocus: wr,
1351
+ onKeyDown: br,
1352
+ onBlur: $r,
1353
+ ref: E,
1436
1354
  role: "combobox",
1437
- value: I
1355
+ value: D
1438
1356
  };
1439
1357
  return {
1440
1358
  id: e,
1441
- inputProps: St,
1442
- internalRef: J,
1443
- optionsToShow: R,
1444
- showListbox: E,
1445
- noOptionsText: $,
1446
- combobox: t,
1447
- comboboxButtonAriaLabel: i,
1448
- getListBoxItemProps: $t,
1449
- listboxProps: _r
1359
+ inputProps: Or,
1360
+ internalRef: T,
1361
+ optionsToShow: P,
1362
+ showListbox: q,
1363
+ noOptionsText: x,
1364
+ combobox: r,
1365
+ comboboxButtonAriaLabel: u,
1366
+ getListBoxItemProps: Nr,
1367
+ listboxProps: _t
1450
1368
  };
1451
- }, Q = Fn.bind(Wn), G = "purpur-autocomplete", Yn = ({ className: t, renderInput: i, renderOption: n, ...o }, a) => {
1369
+ }, J = Un.bind(Yn), W = "purpur-autocomplete", ti = ({ className: r, renderInput: u, renderOption: n, ...a }, o) => {
1452
1370
  const {
1453
- id: r,
1371
+ id: t,
1454
1372
  inputProps: e,
1455
- internalRef: u,
1456
- optionsToShow: v,
1373
+ internalRef: i,
1374
+ optionsToShow: d,
1457
1375
  showListbox: _,
1458
- noOptionsText: g,
1459
- combobox: b,
1460
- comboboxButtonAriaLabel: N,
1461
- getListBoxItemProps: A,
1462
- listboxProps: f
1463
- } = Un(o), $ = (s, y) => {
1464
- const { key: q, ...M } = A(s, y);
1465
- return /* @__PURE__ */ l(U.Item, { ...M, children: n ? n == null ? void 0 : n(s) : s.label }, q);
1466
- }, S = (s) => {
1467
- u.current = s, typeof a == "function" ? a(s) : a && (a.current = s);
1468
- }, j = () => {
1469
- const s = i(e);
1470
- if (b && N && g && s && Dn(s)) {
1471
- const q = /* @__PURE__ */ O(Nt, { children: [
1376
+ noOptionsText: b,
1377
+ combobox: y,
1378
+ comboboxButtonAriaLabel: j,
1379
+ getListBoxItemProps: M,
1380
+ listboxProps: c
1381
+ } = Xn(a), x = (s, k) => {
1382
+ const { key: N, ...B } = M(s, k);
1383
+ return /* @__PURE__ */ l(U.Item, { ...B, children: n ? n?.(s) : s.label }, N);
1384
+ }, A = (s) => {
1385
+ i.current = s, typeof o == "function" ? o(s) : o && (o.current = s);
1386
+ }, w = () => {
1387
+ const s = u(e);
1388
+ if (y && j && b && s && Kn(s)) {
1389
+ const N = /* @__PURE__ */ S(jr, { children: [
1472
1390
  s.props.endAdornment,
1473
1391
  /* @__PURE__ */ l(
1474
1392
  "button",
1475
1393
  {
1476
1394
  "data-testid": "chevron button",
1477
1395
  type: "button",
1478
- className: Q(`${G}__chevron-button`),
1396
+ className: J(`${W}__chevron-button`),
1479
1397
  onClick: () => {
1480
1398
  e.onFocus(void 0), e.onMouseDown(void 0);
1481
1399
  },
1482
- "aria-label": N,
1400
+ "aria-label": j,
1483
1401
  "aria-expanded": _,
1484
- "aria-controls": f.id,
1402
+ "aria-controls": c.id,
1485
1403
  children: /* @__PURE__ */ l(
1486
- rt,
1404
+ rr,
1487
1405
  {
1488
1406
  size: "sm",
1489
- className: Q(`${G}__chevron-icon`, {
1490
- [`${G}__chevron-icon--up`]: _
1407
+ className: J(`${W}__chevron-icon`, {
1408
+ [`${W}__chevron-icon--up`]: _
1491
1409
  })
1492
1410
  }
1493
1411
  )
1494
1412
  }
1495
1413
  )
1496
1414
  ] });
1497
- return Ct(s, { endAdornment: q });
1415
+ return Ir(s, { endAdornment: N });
1498
1416
  }
1499
1417
  return s;
1500
1418
  };
1501
- return /* @__PURE__ */ O("div", { id: r, ref: S, className: Q([G, t]), children: [
1502
- j(),
1503
- _ && /* @__PURE__ */ l(U, { ...f, className: Q(`${G}__listbox`), children: v.length ? v.filter((s) => !!s).map($) : /* @__PURE__ */ l(U.Item, { noninteractive: !0, children: g }) })
1419
+ return /* @__PURE__ */ S("div", { id: t, ref: A, className: J([W, r]), children: [
1420
+ w(),
1421
+ _ && /* @__PURE__ */ l(U, { ...c, className: J(`${W}__listbox`), children: d.length ? d.filter((s) => !!s).map(x) : /* @__PURE__ */ l(U.Item, { noninteractive: !0, children: b }) })
1504
1422
  ] });
1505
- }, Jn = Y(Yn);
1506
- Jn.displayName = "Autocomplete";
1423
+ }, ri = Y(ti);
1424
+ ri.displayName = "Autocomplete";
1507
1425
  export {
1508
- Jn as Autocomplete,
1509
- Un as useAutocomplete
1426
+ ri as Autocomplete,
1427
+ Xn as useAutocomplete
1510
1428
  };
1511
1429
  //# sourceMappingURL=autocomplete.es.js.map