@purpurds/text-field 8.12.1 → 8.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,16 +1,16 @@
1
1
  import { jsxs as b, jsx as l } from "react/jsx-runtime";
2
2
  import * as c from "react";
3
- import { forwardRef as sr, useRef as jr, useId as Sr, isValidElement as Nr } from "react";
3
+ import { forwardRef as or, useRef as $r, useId as wr, isValidElement as jr } from "react";
4
4
  import "react-dom";
5
- const Or = {
5
+ const Sr = {
6
6
  LG: "lg"
7
7
  };
8
- function Cr(e) {
8
+ function Nr(e) {
9
9
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
10
10
  }
11
- var D = { exports: {} }, k;
12
- function Mr() {
13
- return k || (k = 1, (function(e) {
11
+ var D = { exports: {} }, L;
12
+ function Or() {
13
+ return L || (L = 1, (function(e) {
14
14
  (function() {
15
15
  var u = {}.hasOwnProperty;
16
16
  function n() {
@@ -41,31 +41,31 @@ function Mr() {
41
41
  })();
42
42
  })(D)), D.exports;
43
43
  }
44
- var Ar = Mr();
45
- const qr = /* @__PURE__ */ Cr(Ar), Rr = "_rotate_12t9p_1", Ir = "_dash_12t9p_1", Br = {
44
+ var Cr = Or();
45
+ const Mr = /* @__PURE__ */ Nr(Cr), Ar = "_rotate_12t9p_1", qr = "_dash_12t9p_1", Rr = {
46
46
  "purpur-spinner": "_purpur-spinner_12t9p_2",
47
- rotate: Rr,
47
+ rotate: Ar,
48
48
  "purpur-spinner--xxs": "_purpur-spinner--xxs_12t9p_6",
49
49
  "purpur-spinner--xs": "_purpur-spinner--xs_12t9p_10",
50
50
  "purpur-spinner--sm": "_purpur-spinner--sm_12t9p_14",
51
51
  "purpur-spinner--md": "_purpur-spinner--md_12t9p_18",
52
52
  "purpur-spinner--lg": "_purpur-spinner--lg_12t9p_22",
53
53
  "purpur-spinner__circle": "_purpur-spinner__circle_12t9p_26",
54
- dash: Ir,
54
+ dash: qr,
55
55
  "purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_12t9p_41",
56
56
  "purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_12t9p_44"
57
- }, Z = qr.bind(Br), w = "purpur-spinner", Pr = {
57
+ }, k = Mr.bind(Rr), w = "purpur-spinner", Ir = {
58
58
  SM: "sm"
59
- }, cr = ({
59
+ }, sr = ({
60
60
  disabled: e = !1,
61
61
  negative: u = !1,
62
- size: n = Pr.SM,
62
+ size: n = Ir.SM,
63
63
  className: p,
64
64
  ...a
65
- }) => /* @__PURE__ */ l("div", { className: Z(w, `${w}--${n}`, p), ...a, children: /* @__PURE__ */ l("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ l(
65
+ }) => /* @__PURE__ */ l("div", { className: k(w, `${w}--${n}`, p), ...a, children: /* @__PURE__ */ l("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ l(
66
66
  "circle",
67
67
  {
68
- className: Z(`${w}__circle`, {
68
+ className: k(`${w}__circle`, {
69
69
  [`${w}__circle--disabled`]: e,
70
70
  [`${w}__circle--negative`]: u
71
71
  }),
@@ -74,11 +74,11 @@ const qr = /* @__PURE__ */ Cr(Ar), Rr = "_rotate_12t9p_1", Ir = "_dash_12t9p_1",
74
74
  r: "20"
75
75
  }
76
76
  ) }) });
77
- cr.displayName = "Spinner";
78
- function zr(e) {
77
+ sr.displayName = "Spinner";
78
+ function Br(e) {
79
79
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
80
80
  }
81
- var W = { exports: {} }, F;
81
+ var Z = { exports: {} }, F;
82
82
  function Er() {
83
83
  return F || (F = 1, (function(e) {
84
84
  (function() {
@@ -109,10 +109,10 @@ function Er() {
109
109
  }
110
110
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
111
111
  })();
112
- })(W)), W.exports;
112
+ })(Z)), Z.exports;
113
113
  }
114
- var Vr = Er();
115
- const Lr = /* @__PURE__ */ zr(Vr), Dr = {
114
+ var Pr = Er();
115
+ const Vr = /* @__PURE__ */ Br(Pr), zr = {
116
116
  "purpur-button": "_purpur-button_10jh0_1",
117
117
  "purpur-button--xs": "_purpur-button--xs_10jh0_22",
118
118
  "purpur-button--icon-only": "_purpur-button--icon-only_10jh0_25",
@@ -135,7 +135,7 @@ const Lr = /* @__PURE__ */ zr(Vr), Dr = {
135
135
  "purpur-button--text-negative": "_purpur-button--text-negative_10jh0_185",
136
136
  "purpur-button--text": "_purpur-button--text_10jh0_185",
137
137
  "purpur-button__spinner": "_purpur-button__spinner_10jh0_235"
138
- }, T = Lr.bind(Dr), y = "purpur-button", _r = sr(
138
+ }, W = Vr.bind(zr), y = "purpur-button", cr = or(
139
139
  ({
140
140
  children: e,
141
141
  className: u,
@@ -149,10 +149,10 @@ const Lr = /* @__PURE__ */ zr(Vr), Dr = {
149
149
  variant: _,
150
150
  type: $ = "button",
151
151
  ...g
152
- }, N) => {
152
+ }, S) => {
153
153
  if (a && _ === "destructive")
154
154
  return null;
155
- const O = T(
155
+ const N = W(
156
156
  [
157
157
  y,
158
158
  `${y}--${t ? `${_}-negative` : _}`,
@@ -171,20 +171,20 @@ const Lr = /* @__PURE__ */ zr(Vr), Dr = {
171
171
  return /* @__PURE__ */ b(
172
172
  "button",
173
173
  {
174
- className: O,
174
+ className: N,
175
175
  type: $,
176
- ref: N,
176
+ ref: S,
177
177
  "aria-disabled": s,
178
178
  onClick: d,
179
179
  ...g,
180
180
  children: [
181
181
  r && /* @__PURE__ */ l(
182
- cr,
182
+ sr,
183
183
  {
184
- size: f === Or.LG ? "xs" : "xxs",
184
+ size: f === Sr.LG ? "xs" : "xxs",
185
185
  negative: t,
186
186
  disabled: s,
187
- className: T(`${y}__spinner`)
187
+ className: W(`${y}__spinner`)
188
188
  }
189
189
  ),
190
190
  " ",
@@ -194,13 +194,13 @@ const Lr = /* @__PURE__ */ zr(Vr), Dr = {
194
194
  );
195
195
  }
196
196
  );
197
- _r.displayName = "Button";
198
- function kr(e) {
197
+ cr.displayName = "Button";
198
+ function Dr(e) {
199
199
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
200
200
  }
201
- var G = { exports: {} }, H;
202
- function Zr() {
203
- return H || (H = 1, (function(e) {
201
+ var G = { exports: {} }, T;
202
+ function Lr() {
203
+ return T || (T = 1, (function(e) {
204
204
  (function() {
205
205
  var u = {}.hasOwnProperty;
206
206
  function n() {
@@ -231,8 +231,8 @@ function Zr() {
231
231
  })();
232
232
  })(G)), G.exports;
233
233
  }
234
- var Wr = Zr();
235
- const Fr = /* @__PURE__ */ kr(Wr), Tr = {
234
+ var kr = Lr();
235
+ const Zr = /* @__PURE__ */ Dr(kr), Fr = {
236
236
  "purpur-icon": "_purpur-icon_8u1lq_1",
237
237
  "purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
238
238
  "purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
@@ -240,34 +240,34 @@ const Fr = /* @__PURE__ */ kr(Wr), Tr = {
240
240
  "purpur-icon--md": "_purpur-icon--md_8u1lq_16",
241
241
  "purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
242
242
  "purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
243
- }, Gr = Fr.bind(Tr), U = "purpur-icon", Hr = "md", Ur = (e) => e.filter((u) => Object.keys(u).length >= 1).map((u) => `${u.name}="${u.value}"`).join(" "), Yr = ({ content: e = "", title: u } = {}) => {
243
+ }, Wr = Zr.bind(Fr), H = "purpur-icon", Gr = "md", Tr = (e) => e.filter((u) => Object.keys(u).length >= 1).map((u) => `${u.name}="${u.value}"`).join(" "), Hr = ({ content: e = "", title: u } = {}) => {
244
244
  const n = [
245
245
  { name: "xmlns", value: "http://www.w3.org/2000/svg" },
246
246
  { name: "fill", value: "currentColor" },
247
247
  { name: "viewBox", value: "0 0 24 24" },
248
248
  u ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
249
249
  ], p = u ? `<title>${u}</title>` : "";
250
- return `<svg ${Ur(n)}>${p}${e}</svg>`;
251
- }, Jr = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), dr = ({ svg: e, allyTitle: u, className: n, size: p = Hr, ...a }) => {
252
- const r = Yr({
253
- content: Jr(e.svg),
250
+ return `<svg ${Tr(n)}>${p}${e}</svg>`;
251
+ }, Ur = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), _r = ({ svg: e, allyTitle: u, className: n, size: p = Gr, ...a }) => {
252
+ const r = Hr({
253
+ content: Ur(e.svg),
254
254
  title: u
255
- }), t = Gr(U, `${U}--${p}`, n);
255
+ }), t = Wr(H, `${H}--${p}`, n);
256
256
  return /* @__PURE__ */ l("span", { className: t, dangerouslySetInnerHTML: { __html: r }, ...a });
257
257
  };
258
- dr.displayName = "Icon";
259
- const Kr = {
258
+ _r.displayName = "Icon";
259
+ const Yr = {
260
260
  name: "error-filled",
261
261
  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>',
262
262
  keywords: ["error-filled"],
263
263
  category: "status"
264
264
  };
265
- function Qr(e) {
265
+ function Jr(e) {
266
266
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
267
267
  }
268
- var Y = { exports: {} }, J;
269
- function Xr() {
270
- return J || (J = 1, (function(e) {
268
+ var U = { exports: {} }, Y;
269
+ function Kr() {
270
+ return Y || (Y = 1, (function(e) {
271
271
  (function() {
272
272
  var u = {}.hasOwnProperty;
273
273
  function n() {
@@ -296,14 +296,14 @@ function Xr() {
296
296
  }
297
297
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
298
298
  })();
299
- })(Y)), Y.exports;
299
+ })(U)), U.exports;
300
300
  }
301
- var re = Xr();
302
- const ee = /* @__PURE__ */ Qr(re), te = {
301
+ var Qr = Kr();
302
+ const Xr = /* @__PURE__ */ Jr(Qr), re = {
303
303
  "purpur-field-error-text": "_purpur-field-error-text_u1cy2_1",
304
304
  "purpur-field-error-text--negative": "_purpur-field-error-text--negative_u1cy2_11",
305
305
  "purpur-field-error-text__icon": "_purpur-field-error-text__icon_u1cy2_14"
306
- }, K = ee.bind(te), R = "purpur-field-error-text", ne = ({
306
+ }, J = Xr.bind(re), q = "purpur-field-error-text", ee = ({
307
307
  children: e,
308
308
  className: u,
309
309
  negative: n = !1,
@@ -312,24 +312,24 @@ const ee = /* @__PURE__ */ Qr(re), te = {
312
312
  }) => /* @__PURE__ */ b(
313
313
  "div",
314
314
  {
315
- className: K(u, R, {
316
- [`${R}--negative`]: n
315
+ className: J(u, q, {
316
+ [`${q}--negative`]: n
317
317
  }),
318
318
  "aria-live": "assertive",
319
319
  "aria-relevant": p,
320
320
  ...a,
321
321
  children: [
322
- /* @__PURE__ */ l(dr, { svg: Kr, size: "xs", className: K(`${R}__icon`) }),
322
+ /* @__PURE__ */ l(_r, { svg: Yr, size: "xs", className: J(`${q}__icon`) }),
323
323
  e
324
324
  ]
325
325
  }
326
326
  );
327
- function ie(e) {
327
+ function te(e) {
328
328
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
329
329
  }
330
- var Q = { exports: {} }, X;
331
- function ue() {
332
- return X || (X = 1, (function(e) {
330
+ var K = { exports: {} }, Q;
331
+ function ne() {
332
+ return Q || (Q = 1, (function(e) {
333
333
  (function() {
334
334
  var u = {}.hasOwnProperty;
335
335
  function n() {
@@ -358,14 +358,14 @@ function ue() {
358
358
  }
359
359
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
360
360
  })();
361
- })(Q)), Q.exports;
361
+ })(K)), K.exports;
362
362
  }
363
- var ae = ue();
364
- const pe = /* @__PURE__ */ ie(ae), le = {
363
+ var ie = ne();
364
+ const ue = /* @__PURE__ */ te(ie), ae = {
365
365
  "purpur-field-helper-text": "_purpur-field-helper-text_11nsh_1",
366
366
  "purpur-field-helper-text--disabled": "_purpur-field-helper-text--disabled_11nsh_9",
367
367
  "purpur-field-helper-text--negative": "_purpur-field-helper-text--negative_11nsh_12"
368
- }, oe = pe.bind(le), I = "purpur-field-helper-text", se = ({
368
+ }, pe = ue.bind(ae), R = "purpur-field-helper-text", le = ({
369
369
  children: e,
370
370
  className: u,
371
371
  disabled: n,
@@ -373,18 +373,18 @@ const pe = /* @__PURE__ */ ie(ae), le = {
373
373
  negative: a,
374
374
  ...r
375
375
  }) => {
376
- const t = oe(u, I, {
377
- [`${I}--disabled`]: n,
378
- [`${I}--negative`]: a
376
+ const t = pe(u, R, {
377
+ [`${R}--disabled`]: n,
378
+ [`${R}--negative`]: a
379
379
  });
380
380
  return /* @__PURE__ */ l("span", { id: p, className: t, ...r, children: e });
381
381
  };
382
- function ce(e) {
382
+ function oe(e) {
383
383
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
384
384
  }
385
- var rr = { exports: {} }, er;
386
- function _e() {
387
- return er || (er = 1, (function(e) {
385
+ var X = { exports: {} }, rr;
386
+ function se() {
387
+ return rr || (rr = 1, (function(e) {
388
388
  (function() {
389
389
  var u = {}.hasOwnProperty;
390
390
  function n() {
@@ -413,10 +413,10 @@ function _e() {
413
413
  }
414
414
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
415
415
  })();
416
- })(rr)), rr.exports;
416
+ })(X)), X.exports;
417
417
  }
418
- var de = _e();
419
- const fe = /* @__PURE__ */ ce(de), ve = {
418
+ var ce = se();
419
+ const _e = /* @__PURE__ */ oe(ce), de = {
420
420
  "purpur-icon": "_purpur-icon_8u1lq_1",
421
421
  "purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
422
422
  "purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
@@ -424,70 +424,61 @@ const fe = /* @__PURE__ */ ce(de), ve = {
424
424
  "purpur-icon--md": "_purpur-icon--md_8u1lq_16",
425
425
  "purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
426
426
  "purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
427
- }, he = fe.bind(ve), tr = "purpur-icon", me = "md", ge = (e) => e.filter((u) => Object.keys(u).length >= 1).map((u) => `${u.name}="${u.value}"`).join(" "), ye = ({ content: e = "", title: u } = {}) => {
427
+ }, fe = _e.bind(de), er = "purpur-icon", he = "md", ve = (e) => e.filter((u) => Object.keys(u).length >= 1).map((u) => `${u.name}="${u.value}"`).join(" "), me = ({ content: e = "", title: u } = {}) => {
428
428
  const n = [
429
429
  { name: "xmlns", value: "http://www.w3.org/2000/svg" },
430
430
  { name: "fill", value: "currentColor" },
431
431
  { name: "viewBox", value: "0 0 24 24" },
432
432
  u ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
433
433
  ], p = u ? `<title>${u}</title>` : "";
434
- return `<svg ${ge(n)}>${p}${e}</svg>`;
435
- }, xe = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), z = ({ svg: e, allyTitle: u, className: n, size: p = me, ...a }) => {
436
- const r = ye({
437
- content: xe(e.svg),
434
+ return `<svg ${ve(n)}>${p}${e}</svg>`;
435
+ }, ge = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), E = ({ svg: e, allyTitle: u, className: n, size: p = he, ...a }) => {
436
+ const r = me({
437
+ content: ge(e.svg),
438
438
  title: u
439
- }), t = he(tr, `${tr}--${p}`, n);
439
+ }), t = fe(er, `${er}--${p}`, n);
440
440
  return /* @__PURE__ */ l("span", { className: t, dangerouslySetInnerHTML: { __html: r }, ...a });
441
441
  };
442
- z.displayName = "Icon";
443
- const be = {
442
+ E.displayName = "Icon";
443
+ const ye = {
444
444
  name: "check-circle-filled",
445
445
  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>',
446
446
  keywords: ["check-circle-filled"],
447
447
  category: "status"
448
- }, fr = (e) => /* @__PURE__ */ l(z, { ...e, svg: be });
449
- fr.displayName = "IconCheckCircleFilled";
450
- const $e = {
448
+ }, dr = (e) => /* @__PURE__ */ l(E, { ...e, svg: ye });
449
+ dr.displayName = "IconCheckCircleFilled";
450
+ const xe = {
451
451
  name: "close",
452
452
  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>',
453
453
  keywords: ["close"],
454
454
  category: "utility"
455
- }, vr = (e) => /* @__PURE__ */ l(z, { ...e, svg: $e });
456
- vr.displayName = "IconClose";
457
- function nr(e, u) {
455
+ }, fr = (e) => /* @__PURE__ */ l(E, { ...e, svg: xe });
456
+ fr.displayName = "IconClose";
457
+ function tr(e, u) {
458
458
  if (typeof e == "function")
459
459
  return e(u);
460
460
  e != null && (e.current = u);
461
461
  }
462
- function we(...e) {
462
+ function be(...e) {
463
463
  return (u) => {
464
464
  let n = !1;
465
465
  const p = e.map((a) => {
466
- const r = nr(a, u);
466
+ const r = tr(a, u);
467
467
  return !n && typeof r == "function" && (n = !0), r;
468
468
  });
469
469
  if (n)
470
470
  return () => {
471
471
  for (let a = 0; a < p.length; a++) {
472
472
  const r = p[a];
473
- typeof r == "function" ? r() : nr(e[a], null);
473
+ typeof r == "function" ? r() : tr(e[a], null);
474
474
  }
475
475
  };
476
476
  };
477
477
  }
478
- var je = Symbol.for("react.lazy"), S = c[" use ".trim().toString()];
479
- function Se(e) {
480
- return typeof e == "object" && e !== null && "then" in e;
481
- }
482
- function hr(e) {
483
- return e != null && typeof e == "object" && "$$typeof" in e && e.$$typeof === je && "_payload" in e && Se(e._payload);
484
- }
485
478
  // @__NO_SIDE_EFFECTS__
486
- function Ne(e) {
487
- const u = /* @__PURE__ */ Oe(e), n = c.forwardRef((p, a) => {
488
- let { children: r, ...t } = p;
489
- hr(r) && typeof S == "function" && (r = S(r._payload));
490
- const i = c.Children.toArray(r), f = i.find(Me);
479
+ function $e(e) {
480
+ const u = /* @__PURE__ */ we(e), n = c.forwardRef((p, a) => {
481
+ const { children: r, ...t } = p, i = c.Children.toArray(r), f = i.find(Se);
491
482
  if (f) {
492
483
  const _ = f.props.children, $ = i.map((g) => g === f ? c.Children.count(_) > 1 ? c.Children.only(null) : c.isValidElement(_) ? _.props.children : null : g);
493
484
  return /* @__PURE__ */ l(u, { ...t, ref: a, children: c.isValidElement(_) ? c.cloneElement(_, void 0, $) : null });
@@ -497,22 +488,22 @@ function Ne(e) {
497
488
  return n.displayName = `${e}.Slot`, n;
498
489
  }
499
490
  // @__NO_SIDE_EFFECTS__
500
- function Oe(e) {
491
+ function we(e) {
501
492
  const u = c.forwardRef((n, p) => {
502
- let { children: a, ...r } = n;
503
- if (hr(a) && typeof S == "function" && (a = S(a._payload)), c.isValidElement(a)) {
504
- const t = qe(a), i = Ae(r, a.props);
505
- return a.type !== c.Fragment && (i.ref = p ? we(p, t) : t), c.cloneElement(a, i);
493
+ const { children: a, ...r } = n;
494
+ if (c.isValidElement(a)) {
495
+ const t = Oe(a), i = Ne(r, a.props);
496
+ return a.type !== c.Fragment && (i.ref = p ? be(p, t) : t), c.cloneElement(a, i);
506
497
  }
507
498
  return c.Children.count(a) > 1 ? c.Children.only(null) : null;
508
499
  });
509
500
  return u.displayName = `${e}.SlotClone`, u;
510
501
  }
511
- var Ce = Symbol("radix.slottable");
512
- function Me(e) {
513
- return c.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === Ce;
502
+ var je = Symbol("radix.slottable");
503
+ function Se(e) {
504
+ return c.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === je;
514
505
  }
515
- function Ae(e, u) {
506
+ function Ne(e, u) {
516
507
  const n = { ...u };
517
508
  for (const p in u) {
518
509
  const a = e[p], r = u[p];
@@ -523,11 +514,11 @@ function Ae(e, u) {
523
514
  }
524
515
  return { ...e, ...n };
525
516
  }
526
- function qe(e) {
517
+ function Oe(e) {
527
518
  let u = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = u && "isReactWarning" in u && u.isReactWarning;
528
519
  return n ? e.ref : (u = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = u && "isReactWarning" in u && u.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
529
520
  }
530
- var Re = [
521
+ var Ce = [
531
522
  "a",
532
523
  "button",
533
524
  "div",
@@ -545,14 +536,14 @@ var Re = [
545
536
  "span",
546
537
  "svg",
547
538
  "ul"
548
- ], Ie = Re.reduce((e, u) => {
549
- const n = /* @__PURE__ */ Ne(`Primitive.${u}`), p = c.forwardRef((a, r) => {
539
+ ], Me = Ce.reduce((e, u) => {
540
+ const n = /* @__PURE__ */ $e(`Primitive.${u}`), p = c.forwardRef((a, r) => {
550
541
  const { asChild: t, ...i } = a, f = t ? n : u;
551
542
  return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ l(f, { ...i, ref: r });
552
543
  });
553
544
  return p.displayName = `Primitive.${u}`, { ...e, [u]: p };
554
- }, {}), Be = "Label", mr = c.forwardRef((e, u) => /* @__PURE__ */ l(
555
- Ie.label,
545
+ }, {}), Ae = "Label", hr = c.forwardRef((e, u) => /* @__PURE__ */ l(
546
+ Me.label,
556
547
  {
557
548
  ...e,
558
549
  ref: u,
@@ -561,14 +552,14 @@ var Re = [
561
552
  }
562
553
  }
563
554
  ));
564
- mr.displayName = Be;
565
- var Pe = mr;
566
- function ze(e) {
555
+ hr.displayName = Ae;
556
+ var qe = hr;
557
+ function Re(e) {
567
558
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
568
559
  }
569
- var ir = { exports: {} }, ur;
570
- function Ee() {
571
- return ur || (ur = 1, (function(e) {
560
+ var nr = { exports: {} }, ir;
561
+ function Ie() {
562
+ return ir || (ir = 1, (function(e) {
572
563
  (function() {
573
564
  var u = {}.hasOwnProperty;
574
565
  function n() {
@@ -597,32 +588,32 @@ function Ee() {
597
588
  }
598
589
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
599
590
  })();
600
- })(ir)), ir.exports;
591
+ })(nr)), nr.exports;
601
592
  }
602
- var Ve = Ee();
603
- const Le = /* @__PURE__ */ ze(Ve), De = {
593
+ var Be = Ie();
594
+ const Ee = /* @__PURE__ */ Re(Be), Pe = {
604
595
  "purpur-label": "_purpur-label_1x80u_1",
605
596
  "purpur-label--negative": "_purpur-label--negative_1x80u_8",
606
597
  "purpur-label--disabled": "_purpur-label--disabled_1x80u_11"
607
- }, ke = Le.bind(De), B = "purpur-label", Ze = ({
598
+ }, Ve = Ee.bind(Pe), I = "purpur-label", ze = ({
608
599
  children: e,
609
600
  className: u,
610
601
  disabled: n,
611
602
  negative: p = !1,
612
603
  ...a
613
604
  }) => {
614
- const r = ke(u, B, {
615
- [`${B}--disabled`]: n,
616
- [`${B}--negative`]: p
605
+ const r = Ve(u, I, {
606
+ [`${I}--disabled`]: n,
607
+ [`${I}--negative`]: p
617
608
  });
618
- return /* @__PURE__ */ l(Pe, { className: r, ...a, children: e });
609
+ return /* @__PURE__ */ l(qe, { className: r, ...a, children: e });
619
610
  };
620
- function We(e) {
611
+ function De(e) {
621
612
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
622
613
  }
623
- var ar = { exports: {} }, pr;
624
- function Fe() {
625
- return pr || (pr = 1, (function(e) {
614
+ var ur = { exports: {} }, ar;
615
+ function Le() {
616
+ return ar || (ar = 1, (function(e) {
626
617
  (function() {
627
618
  var u = {}.hasOwnProperty;
628
619
  function n() {
@@ -651,33 +642,33 @@ function Fe() {
651
642
  }
652
643
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
653
644
  })();
654
- })(ar)), ar.exports;
645
+ })(ur)), ur.exports;
655
646
  }
656
- var Te = Fe();
657
- const Ge = /* @__PURE__ */ We(Te), He = "_rotate_12t9p_1", Ue = "_dash_12t9p_1", Ye = {
647
+ var ke = Le();
648
+ const Ze = /* @__PURE__ */ De(ke), Fe = "_rotate_12t9p_1", We = "_dash_12t9p_1", Ge = {
658
649
  "purpur-spinner": "_purpur-spinner_12t9p_2",
659
- rotate: He,
650
+ rotate: Fe,
660
651
  "purpur-spinner--xxs": "_purpur-spinner--xxs_12t9p_6",
661
652
  "purpur-spinner--xs": "_purpur-spinner--xs_12t9p_10",
662
653
  "purpur-spinner--sm": "_purpur-spinner--sm_12t9p_14",
663
654
  "purpur-spinner--md": "_purpur-spinner--md_12t9p_18",
664
655
  "purpur-spinner--lg": "_purpur-spinner--lg_12t9p_22",
665
656
  "purpur-spinner__circle": "_purpur-spinner__circle_12t9p_26",
666
- dash: Ue,
657
+ dash: We,
667
658
  "purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_12t9p_41",
668
659
  "purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_12t9p_44"
669
- }, lr = Ge.bind(Ye), j = "purpur-spinner", Je = {
660
+ }, pr = Ze.bind(Ge), j = "purpur-spinner", Te = {
670
661
  SM: "sm"
671
- }, gr = ({
662
+ }, vr = ({
672
663
  disabled: e = !1,
673
664
  negative: u = !1,
674
- size: n = Je.SM,
665
+ size: n = Te.SM,
675
666
  className: p,
676
667
  ...a
677
- }) => /* @__PURE__ */ l("div", { className: lr(j, `${j}--${n}`, p), ...a, children: /* @__PURE__ */ l("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ l(
668
+ }) => /* @__PURE__ */ l("div", { className: pr(j, `${j}--${n}`, p), ...a, children: /* @__PURE__ */ l("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ l(
678
669
  "circle",
679
670
  {
680
- className: lr(`${j}__circle`, {
671
+ className: pr(`${j}__circle`, {
681
672
  [`${j}__circle--disabled`]: e,
682
673
  [`${j}__circle--negative`]: u
683
674
  }),
@@ -686,14 +677,14 @@ const Ge = /* @__PURE__ */ We(Te), He = "_rotate_12t9p_1", Ue = "_dash_12t9p_1",
686
677
  r: "20"
687
678
  }
688
679
  ) }) });
689
- gr.displayName = "Spinner";
690
- function Ke(e) {
680
+ vr.displayName = "Spinner";
681
+ function He(e) {
691
682
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
692
683
  }
693
- var P = { exports: {} };
694
- var or;
695
- function Qe() {
696
- return or || (or = 1, (function(e) {
684
+ var B = { exports: {} };
685
+ var lr;
686
+ function Ue() {
687
+ return lr || (lr = 1, (function(e) {
697
688
  (function() {
698
689
  var u = {}.hasOwnProperty;
699
690
  function n() {
@@ -722,31 +713,31 @@ function Qe() {
722
713
  }
723
714
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
724
715
  })();
725
- })(P)), P.exports;
716
+ })(B)), B.exports;
726
717
  }
727
- var Xe = Qe();
728
- const rt = /* @__PURE__ */ Ke(Xe), et = {
729
- "purpur-text-field": "_purpur-text-field_1ar6e_1",
730
- "purpur-text-field__label": "_purpur-text-field__label_1ar6e_7",
731
- "purpur-text-field__label-text": "_purpur-text-field__label-text_1ar6e_12",
732
- "purpur-text-field__field-row": "_purpur-text-field__field-row_1ar6e_15",
733
- "purpur-text-field__frame": "_purpur-text-field__frame_1ar6e_19",
734
- "purpur-text-field__frame--negative": "_purpur-text-field__frame--negative_1ar6e_26",
735
- "purpur-text-field__input-container": "_purpur-text-field__input-container_1ar6e_29",
736
- "purpur-text-field__input-container--disabled": "_purpur-text-field__input-container--disabled_1ar6e_40",
737
- "purpur-text-field__input-container--readonly": "_purpur-text-field__input-container--readonly_1ar6e_43",
738
- "purpur-text-field__input-container--has-clear-button": "_purpur-text-field__input-container--has-clear-button_1ar6e_46",
739
- "purpur-text-field__input-container--end-adornment": "_purpur-text-field__input-container--end-adornment_1ar6e_49",
740
- "purpur-text-field__input": "_purpur-text-field__input_1ar6e_29",
741
- "purpur-text-field__input-container--start-adornment": "_purpur-text-field__input-container--start-adornment_1ar6e_55",
742
- "purpur-text-field__input-container--negative": "_purpur-text-field__input-container--negative_1ar6e_61",
743
- "purpur-text-field__input--valid": "_purpur-text-field__input--valid_1ar6e_109",
744
- "purpur-text-field__input--error": "_purpur-text-field__input--error_1ar6e_109",
745
- "purpur-text-field__input--negative": "_purpur-text-field__input--negative_1ar6e_127",
746
- "purpur-text-field__adornment-container": "_purpur-text-field__adornment-container_1ar6e_137",
747
- "purpur-text-field__valid-icon": "_purpur-text-field__valid-icon_1ar6e_142",
748
- "purpur-text-field__valid-icon--negative": "_purpur-text-field__valid-icon--negative_1ar6e_145"
749
- }, tt = (e) => jr(e), m = rt.bind(et), o = "purpur-text-field", yr = sr(
718
+ var Ye = Ue();
719
+ const Je = /* @__PURE__ */ He(Ye), Ke = {
720
+ "purpur-text-field": "_purpur-text-field_h2fch_1",
721
+ "purpur-text-field__label": "_purpur-text-field__label_h2fch_7",
722
+ "purpur-text-field__label-text": "_purpur-text-field__label-text_h2fch_12",
723
+ "purpur-text-field__field-row": "_purpur-text-field__field-row_h2fch_15",
724
+ "purpur-text-field__frame": "_purpur-text-field__frame_h2fch_19",
725
+ "purpur-text-field__frame--negative": "_purpur-text-field__frame--negative_h2fch_26",
726
+ "purpur-text-field__input-container": "_purpur-text-field__input-container_h2fch_29",
727
+ "purpur-text-field__input-container--disabled": "_purpur-text-field__input-container--disabled_h2fch_40",
728
+ "purpur-text-field__input-container--readonly": "_purpur-text-field__input-container--readonly_h2fch_43",
729
+ "purpur-text-field__input-container--has-clear-button": "_purpur-text-field__input-container--has-clear-button_h2fch_46",
730
+ "purpur-text-field__input-container--end-adornment": "_purpur-text-field__input-container--end-adornment_h2fch_49",
731
+ "purpur-text-field__input": "_purpur-text-field__input_h2fch_29",
732
+ "purpur-text-field__input-container--start-adornment": "_purpur-text-field__input-container--start-adornment_h2fch_55",
733
+ "purpur-text-field__input-container--negative": "_purpur-text-field__input-container--negative_h2fch_61",
734
+ "purpur-text-field__input--valid": "_purpur-text-field__input--valid_h2fch_109",
735
+ "purpur-text-field__input--error": "_purpur-text-field__input--error_h2fch_109",
736
+ "purpur-text-field__input--negative": "_purpur-text-field__input--negative_h2fch_127",
737
+ "purpur-text-field__adornment-container": "_purpur-text-field__adornment-container_h2fch_140",
738
+ "purpur-text-field__valid-icon": "_purpur-text-field__valid-icon_h2fch_145",
739
+ "purpur-text-field__valid-icon--negative": "_purpur-text-field__valid-icon--negative_h2fch_148"
740
+ }, Qe = (e) => $r(e), m = Je.bind(Ke), o = "purpur-text-field", mr = or(
750
741
  ({
751
742
  ["data-testid"]: e,
752
743
  className: u,
@@ -760,53 +751,53 @@ const rt = /* @__PURE__ */ Ke(Xe), et = {
760
751
  label: _,
761
752
  loading: $ = !1,
762
753
  onClear: g,
763
- startAdornment: N,
764
- valid: O = !1,
754
+ startAdornment: S,
755
+ valid: N = !1,
765
756
  negative: d = !1,
766
757
  ...s
767
758
  }, x) => {
768
- const xr = Sr(), C = s.id ?? xr, v = (h) => e ? `${e}-${h}` : void 0, E = O && !t, M = i ? `${C}-helper-text` : void 0, A = [N].filter((h) => !!h), V = (typeof s.value == "number" ? s.value !== void 0 : s.value?.length) && !s.disabled && !s.readOnly && !$ && g && n, L = tt(null), br = (h) => {
769
- L.current = h, typeof x == "function" ? x(h) : x && (x.current = h);
770
- }, $r = () => {
771
- g?.(), L.current?.focus();
772
- }, q = [
759
+ const gr = wr(), O = s.id ?? gr, h = (v) => e ? `${e}-${v}` : void 0, P = N && !t, C = i ? `${O}-helper-text` : void 0, M = [S].filter((v) => !!v), V = (typeof s.value == "number" ? s.value !== void 0 : s.value?.length) && !s.disabled && !s.readOnly && !$ && g && n, z = Qe(null), yr = (v) => {
760
+ z.current = v, typeof x == "function" ? x(v) : x && (x.current = v);
761
+ }, xr = () => {
762
+ g?.(), z.current?.focus();
763
+ }, A = [
773
764
  $ && /* @__PURE__ */ l(
774
- gr,
765
+ vr,
775
766
  {
776
767
  disabled: s.disabled,
777
768
  size: "xs",
778
- "data-testid": v("spinner"),
769
+ "data-testid": h("spinner"),
779
770
  negative: d
780
771
  },
781
772
  "spinner"
782
773
  ),
783
774
  V && /* @__PURE__ */ l(
784
- _r,
775
+ cr,
785
776
  {
786
777
  negative: d,
787
778
  variant: "tertiary-purple",
788
- onClick: $r,
779
+ onClick: xr,
789
780
  iconOnly: !0,
790
781
  "aria-label": n ?? "",
791
- "data-testid": v("clear-button"),
782
+ "data-testid": h("clear-button"),
792
783
  tabIndex: -1,
793
- children: /* @__PURE__ */ l(vr, { size: "xs" })
784
+ children: /* @__PURE__ */ l(fr, { size: "xs" })
794
785
  },
795
786
  "clear-button"
796
787
  ),
797
- E && /* @__PURE__ */ l(
798
- fr,
788
+ P && /* @__PURE__ */ l(
789
+ dr,
799
790
  {
800
- "data-testid": v("valid-icon"),
791
+ "data-testid": h("valid-icon"),
801
792
  className: m(`${o}__valid-icon`, {
802
793
  [`${o}__valid-icon--negative`]: d
803
794
  })
804
795
  },
805
796
  "valid-icon"
806
797
  )
807
- ].filter((h) => !!h), wr = m(`${o}__input-container`, {
808
- [`${o}__input-container--start-adornment`]: A.length,
809
- [`${o}__input-container--end-adornment`]: q.length || r,
798
+ ].filter((v) => !!v), br = m(`${o}__input-container`, {
799
+ [`${o}__input-container--start-adornment`]: M.length,
800
+ [`${o}__input-container--end-adornment`]: A.length || r,
810
801
  [`${o}__input-container--disabled`]: s.disabled,
811
802
  [`${o}__input-container--has-clear-button`]: V,
812
803
  [`${o}__input-container--readonly`]: s.readOnly && !s.disabled,
@@ -814,11 +805,11 @@ const rt = /* @__PURE__ */ Ke(Xe), et = {
814
805
  });
815
806
  return /* @__PURE__ */ b("div", { className: m(u, o), children: [
816
807
  _ && /* @__PURE__ */ b(
817
- Ze,
808
+ ze,
818
809
  {
819
- htmlFor: C,
810
+ htmlFor: O,
820
811
  className: m(`${o}__label`),
821
- "data-testid": v("label"),
812
+ "data-testid": h("label"),
822
813
  disabled: s.disabled,
823
814
  negative: d,
824
815
  children: [
@@ -829,28 +820,28 @@ const rt = /* @__PURE__ */ Ke(Xe), et = {
829
820
  ),
830
821
  /* @__PURE__ */ b("div", { className: m(`${o}__field-row`), children: [
831
822
  !!p && p,
832
- /* @__PURE__ */ b("div", { className: wr, children: [
833
- !!A.length && /* @__PURE__ */ l(
823
+ /* @__PURE__ */ b("div", { className: br, children: [
824
+ !!M.length && /* @__PURE__ */ l(
834
825
  "div",
835
826
  {
836
- "data-testid": v("start-adornments"),
827
+ "data-testid": h("start-adornments"),
837
828
  className: m(`${o}__adornment-container`),
838
- children: A
829
+ children: M
839
830
  }
840
831
  ),
841
832
  /* @__PURE__ */ l(
842
833
  "input",
843
834
  {
844
835
  ...s,
845
- id: C,
846
- ref: br,
847
- "data-testid": v("input"),
848
- "aria-describedby": s["aria-describedby"] || M,
836
+ id: O,
837
+ ref: yr,
838
+ "data-testid": h("input"),
839
+ "aria-describedby": s["aria-describedby"] || C,
849
840
  "aria-invalid": s["aria-invalid"] || !!t,
850
841
  className: m([
851
842
  `${o}__input`,
852
843
  {
853
- [`${o}__input--valid`]: E,
844
+ [`${o}__input--valid`]: P,
854
845
  [`${o}__input--error`]: !!t,
855
846
  [`${o}__input--negative`]: d
856
847
  }
@@ -865,13 +856,13 @@ const rt = /* @__PURE__ */ Ke(Xe), et = {
865
856
  })
866
857
  }
867
858
  ),
868
- (!!q.length || r) && /* @__PURE__ */ b(
859
+ (!!A.length || r) && /* @__PURE__ */ b(
869
860
  "div",
870
861
  {
871
- "data-testid": v("end-adornments"),
862
+ "data-testid": h("end-adornments"),
872
863
  className: m(`${o}__adornment-container`),
873
864
  children: [
874
- q,
865
+ A,
875
866
  r
876
867
  ]
877
868
  }
@@ -879,23 +870,24 @@ const rt = /* @__PURE__ */ Ke(Xe), et = {
879
870
  ] }),
880
871
  !!a && a
881
872
  ] }),
882
- M && /* @__PURE__ */ l(
883
- se,
873
+ C && /* @__PURE__ */ l(
874
+ le,
884
875
  {
885
- "data-testid": v("helper-text"),
886
- id: M,
876
+ "data-testid": h("helper-text"),
877
+ id: C,
887
878
  negative: d,
879
+ disabled: s.disabled,
888
880
  children: i
889
881
  }
890
882
  ),
891
- t && /* @__PURE__ */ l(ne, { "data-testid": v("error-text"), negative: d, children: t })
883
+ t && /* @__PURE__ */ l(ee, { "data-testid": h("error-text"), negative: d, children: t })
892
884
  ] });
893
885
  }
894
886
  );
895
- yr.displayName = "TextField";
896
- const pt = (e) => Nr(e) && e.type.displayName === yr.displayName;
887
+ mr.displayName = "TextField";
888
+ const nt = (e) => jr(e) && e.type.displayName === mr.displayName;
897
889
  export {
898
- yr as TextField,
899
- pt as isTextField
890
+ mr as TextField,
891
+ nt as isTextField
900
892
  };
901
893
  //# sourceMappingURL=text-field.es.js.map