@purpurds/quantity-selector 7.5.1 → 7.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,19 +1,19 @@
1
- import { jsx as o, jsxs as j, Fragment as Wr } from "react/jsx-runtime";
1
+ import { jsx as o, jsxs as A, Fragment as Gr } from "react/jsx-runtime";
2
2
  import * as c from "react";
3
- import { forwardRef as U, useId as pt, useRef as at, useState as nr, useEffect as ur } from "react";
3
+ import { forwardRef as U, useId as pt, useRef as at, useState as ur, useEffect as ir } from "react";
4
4
  import "react-dom";
5
5
  function ot(t) {
6
6
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
7
7
  }
8
- var ir = { exports: {} };
8
+ var pr = { exports: {} };
9
9
  /*!
10
10
  Copyright (c) 2018 Jed Watson.
11
11
  Licensed under the MIT License (MIT), see
12
12
  http://jedwatson.github.io/classnames
13
13
  */
14
- var pr;
14
+ var ar;
15
15
  function lt() {
16
- return pr || (pr = 1, function(t) {
16
+ return ar || (ar = 1, function(t) {
17
17
  (function() {
18
18
  var i = {}.hasOwnProperty;
19
19
  function n() {
@@ -42,10 +42,10 @@ function lt() {
42
42
  }
43
43
  t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
44
44
  })();
45
- }(ir)), ir.exports;
45
+ }(pr)), pr.exports;
46
46
  }
47
47
  var st = lt();
48
- const ar = /* @__PURE__ */ ot(st), ct = "_rotate_12t9p_1", _t = "_dash_12t9p_1", L = {
48
+ const or = /* @__PURE__ */ ot(st), ct = "_rotate_12t9p_1", _t = "_dash_12t9p_1", L = {
49
49
  "purpur-spinner": "_purpur-spinner_12t9p_2",
50
50
  rotate: ct,
51
51
  "purpur-spinner--xxs": "_purpur-spinner--xxs_12t9p_6",
@@ -68,13 +68,13 @@ const ar = /* @__PURE__ */ ot(st), ct = "_rotate_12t9p_1", _t = "_dash_12t9p_1",
68
68
  }) => /* @__PURE__ */ o(
69
69
  "div",
70
70
  {
71
- className: ar([L[E], L[`${E}--${a}`]]),
71
+ className: or([L[E], L[`${E}--${a}`]]),
72
72
  "data-testid": t,
73
73
  ...p,
74
74
  children: /* @__PURE__ */ o("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ o(
75
75
  "circle",
76
76
  {
77
- className: ar(L[`${E}__circle`], {
77
+ className: or(L[`${E}__circle`], {
78
78
  [L[`${E}__circle--disabled`]]: i,
79
79
  [L[`${E}__circle--negative`]]: n
80
80
  }),
@@ -90,15 +90,15 @@ const ar = /* @__PURE__ */ ot(st), ct = "_rotate_12t9p_1", _t = "_dash_12t9p_1",
90
90
  function gt(t) {
91
91
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
92
92
  }
93
- var or = { exports: {} };
93
+ var lr = { exports: {} };
94
94
  /*!
95
95
  Copyright (c) 2018 Jed Watson.
96
96
  Licensed under the MIT License (MIT), see
97
97
  http://jedwatson.github.io/classnames
98
98
  */
99
- var lr;
99
+ var sr;
100
100
  function bt() {
101
- return lr || (lr = 1, function(t) {
101
+ return sr || (sr = 1, function(t) {
102
102
  (function() {
103
103
  var i = {}.hasOwnProperty;
104
104
  function n() {
@@ -127,10 +127,10 @@ function bt() {
127
127
  }
128
128
  t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
129
129
  })();
130
- }(or)), or.exports;
130
+ }(lr)), lr.exports;
131
131
  }
132
132
  var mt = bt();
133
- const sr = /* @__PURE__ */ gt(mt), yt = "_rotate_12t9p_1", xt = "_dash_12t9p_1", F = {
133
+ const cr = /* @__PURE__ */ gt(mt), yt = "_rotate_12t9p_1", xt = "_dash_12t9p_1", F = {
134
134
  "purpur-spinner": "_purpur-spinner_12t9p_2",
135
135
  rotate: yt,
136
136
  "purpur-spinner--xxs": "_purpur-spinner--xxs_12t9p_6",
@@ -153,13 +153,13 @@ const sr = /* @__PURE__ */ gt(mt), yt = "_rotate_12t9p_1", xt = "_dash_12t9p_1",
153
153
  }) => /* @__PURE__ */ o(
154
154
  "div",
155
155
  {
156
- className: sr([F[V], F[`${V}--${a}`]]),
156
+ className: cr([F[V], F[`${V}--${a}`]]),
157
157
  "data-testid": t,
158
158
  ...p,
159
159
  children: /* @__PURE__ */ o("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ o(
160
160
  "circle",
161
161
  {
162
- className: sr(F[`${V}__circle`], {
162
+ className: cr(F[`${V}__circle`], {
163
163
  [F[`${V}__circle--disabled`]]: i,
164
164
  [F[`${V}__circle--negative`]]: n
165
165
  }),
@@ -173,15 +173,15 @@ const sr = /* @__PURE__ */ gt(mt), yt = "_rotate_12t9p_1", xt = "_dash_12t9p_1",
173
173
  function $t(t) {
174
174
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
175
175
  }
176
- var cr = { exports: {} };
176
+ var _r = { exports: {} };
177
177
  /*!
178
178
  Copyright (c) 2018 Jed Watson.
179
179
  Licensed under the MIT License (MIT), see
180
180
  http://jedwatson.github.io/classnames
181
181
  */
182
- var _r;
182
+ var dr;
183
183
  function qt() {
184
- return _r || (_r = 1, function(t) {
184
+ return dr || (dr = 1, function(t) {
185
185
  (function() {
186
186
  var i = {}.hasOwnProperty;
187
187
  function n() {
@@ -210,7 +210,7 @@ function qt() {
210
210
  }
211
211
  t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
212
212
  })();
213
- }(cr)), cr.exports;
213
+ }(_r)), _r.exports;
214
214
  }
215
215
  var St = qt();
216
216
  const Nt = /* @__PURE__ */ $t(St), Ot = {
@@ -235,7 +235,7 @@ const Nt = /* @__PURE__ */ $t(St), Ot = {
235
235
  "purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-negative_w455q_166",
236
236
  "purpur-button--text-negative": "_purpur-button--text-negative_w455q_181",
237
237
  "purpur-button--text": "_purpur-button--text_w455q_181"
238
- }, jt = Nt.bind(Ot), k = "purpur-button", At = ({
238
+ }, jt = Nt.bind(Ot), z = "purpur-button", At = ({
239
239
  children: t,
240
240
  className: i,
241
241
  ["data-testid"]: n,
@@ -245,60 +245,60 @@ const Nt = /* @__PURE__ */ $t(St), Ot = {
245
245
  loading: e = !1,
246
246
  negative: u = !1,
247
247
  onClick: f,
248
- size: b = "md",
249
- variant: v,
250
- type: M = "button",
251
- ...q
252
- }, l) => {
253
- if (r && v === "destructive")
248
+ size: v = "md",
249
+ variant: g,
250
+ type: S = "button",
251
+ ...N
252
+ }, M) => {
253
+ if (r && g === "destructive")
254
254
  return null;
255
- const x = jt(
255
+ const l = jt(
256
256
  [
257
- k,
258
- `${k}--${u ? `${v}-negative` : v}`,
259
- `${k}--${b}`
257
+ z,
258
+ `${z}--${u ? `${g}-negative` : g}`,
259
+ `${z}--${v}`
260
260
  ],
261
261
  {
262
- [`${k}--icon-only`]: r,
263
- [`${k}--negative`]: u,
264
- [`${k}--full-width`]: p,
265
- [`${k}--disabled`]: a || e
262
+ [`${z}--icon-only`]: r,
263
+ [`${z}--negative`]: u,
264
+ [`${z}--full-width`]: p,
265
+ [`${z}--disabled`]: a || e
266
266
  },
267
267
  i
268
- ), A = (m) => {
269
- a || e ? m.preventDefault() : f && f(m);
270
- }, S = !!q["aria-disabled"] || a || e;
271
- return /* @__PURE__ */ j(
268
+ ), m = (x) => {
269
+ a || e ? x.preventDefault() : f && f(x);
270
+ }, y = !!N["aria-disabled"] || a || e;
271
+ return /* @__PURE__ */ A(
272
272
  "button",
273
273
  {
274
- className: x,
274
+ className: l,
275
275
  "data-testid": n,
276
- type: M,
277
- ref: l,
278
- "aria-disabled": S,
279
- onClick: A,
280
- ...q,
276
+ type: S,
277
+ ref: M,
278
+ "aria-disabled": y,
279
+ onClick: m,
280
+ ...N,
281
281
  children: [
282
- e && /* @__PURE__ */ o(wt, { size: b === vt.LG ? "xs" : "xxs", negative: u, disabled: S }),
282
+ e && /* @__PURE__ */ o(wt, { size: v === vt.LG ? "xs" : "xxs", negative: u, disabled: y }),
283
283
  " ",
284
284
  t
285
285
  ]
286
286
  }
287
287
  );
288
- }, Gr = U(At);
289
- Gr.displayName = "Button";
288
+ }, Tr = U(At);
289
+ Tr.displayName = "Button";
290
290
  function Mt(t) {
291
291
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
292
292
  }
293
- var dr = { exports: {} };
293
+ var fr = { exports: {} };
294
294
  /*!
295
295
  Copyright (c) 2018 Jed Watson.
296
296
  Licensed under the MIT License (MIT), see
297
297
  http://jedwatson.github.io/classnames
298
298
  */
299
- var fr;
299
+ var vr;
300
300
  function Pt() {
301
- return fr || (fr = 1, function(t) {
301
+ return vr || (vr = 1, function(t) {
302
302
  (function() {
303
303
  var i = {}.hasOwnProperty;
304
304
  function n() {
@@ -327,7 +327,7 @@ function Pt() {
327
327
  }
328
328
  t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
329
329
  })();
330
- }(dr)), dr.exports;
330
+ }(fr)), fr.exports;
331
331
  }
332
332
  var kt = Pt();
333
333
  const Ct = /* @__PURE__ */ Mt(kt), zt = {
@@ -338,7 +338,7 @@ const Ct = /* @__PURE__ */ Mt(kt), zt = {
338
338
  "purpur-icon--md": "_purpur-icon--md_8u1lq_16",
339
339
  "purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
340
340
  "purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
341
- }, Bt = Ct.bind(zt), vr = "purpur-icon", Rt = "md", Dt = (t) => t.filter((i) => Object.keys(i).length >= 1).map((i) => `${i.name}="${i.value}"`).join(" "), It = ({ content: t = "", title: i } = {}) => {
341
+ }, Bt = Ct.bind(zt), gr = "purpur-icon", Rt = "md", Dt = (t) => t.filter((i) => Object.keys(i).length >= 1).map((i) => `${i.name}="${i.value}"`).join(" "), It = ({ content: t = "", title: i } = {}) => {
342
342
  const n = [
343
343
  { name: "xmlns", value: "http://www.w3.org/2000/svg" },
344
344
  { name: "fill", value: "currentColor" },
@@ -346,7 +346,7 @@ const Ct = /* @__PURE__ */ Mt(kt), zt = {
346
346
  i ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
347
347
  ], a = i ? `<title>${i}</title>` : "";
348
348
  return `<svg ${Dt(n)}>${a}${t}</svg>`;
349
- }, Lt = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Tr = ({
349
+ }, Lt = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Qr = ({
350
350
  ["data-testid"]: t,
351
351
  svg: i,
352
352
  allyTitle: n,
@@ -357,7 +357,7 @@ const Ct = /* @__PURE__ */ Mt(kt), zt = {
357
357
  const e = It({
358
358
  content: Lt(i.svg),
359
359
  title: n
360
- }), u = Bt(a, vr, `${vr}--${p}`);
360
+ }), u = Bt(a, gr, `${gr}--${p}`);
361
361
  return /* @__PURE__ */ o(
362
362
  "span",
363
363
  {
@@ -368,7 +368,7 @@ const Ct = /* @__PURE__ */ Mt(kt), zt = {
368
368
  }
369
369
  );
370
370
  };
371
- Tr.displayName = "Icon";
371
+ Qr.displayName = "Icon";
372
372
  const Et = {
373
373
  name: "error-filled",
374
374
  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>',
@@ -378,15 +378,15 @@ const Et = {
378
378
  function Ft(t) {
379
379
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
380
380
  }
381
- var gr = { exports: {} };
381
+ var br = { exports: {} };
382
382
  /*!
383
383
  Copyright (c) 2018 Jed Watson.
384
384
  Licensed under the MIT License (MIT), see
385
385
  http://jedwatson.github.io/classnames
386
386
  */
387
- var br;
387
+ var mr;
388
388
  function Vt() {
389
- return br || (br = 1, function(t) {
389
+ return mr || (mr = 1, function(t) {
390
390
  (function() {
391
391
  var i = {}.hasOwnProperty;
392
392
  function n() {
@@ -415,26 +415,26 @@ function Vt() {
415
415
  }
416
416
  t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
417
417
  })();
418
- }(gr)), gr.exports;
418
+ }(br)), br.exports;
419
419
  }
420
420
  var Zt = Vt();
421
- const Ht = /* @__PURE__ */ Ft(Zt), mr = {
421
+ const Ht = /* @__PURE__ */ Ft(Zt), yr = {
422
422
  "purpur-field-error-text": "_purpur-field-error-text_1lj7e_1",
423
423
  "purpur-field-error-text__icon": "_purpur-field-error-text__icon_1lj7e_11"
424
- }, yr = "purpur-field-error-text", Wt = ({
424
+ }, xr = "purpur-field-error-text", Wt = ({
425
425
  children: t,
426
426
  className: i,
427
427
  ["aria-relevant"]: n = "additions text",
428
428
  ...a
429
- }) => /* @__PURE__ */ j(
429
+ }) => /* @__PURE__ */ A(
430
430
  "div",
431
431
  {
432
- className: Ht([i, mr[yr]]),
432
+ className: Ht([i, yr[xr]]),
433
433
  "aria-live": "assertive",
434
434
  "aria-relevant": n,
435
435
  ...a,
436
436
  children: [
437
- /* @__PURE__ */ o(Tr, { svg: Et, size: "xs", className: mr[`${yr}__icon`] }),
437
+ /* @__PURE__ */ o(Qr, { svg: Et, size: "xs", className: yr[`${xr}__icon`] }),
438
438
  t
439
439
  ]
440
440
  }
@@ -442,15 +442,15 @@ const Ht = /* @__PURE__ */ Ft(Zt), mr = {
442
442
  function Gt(t) {
443
443
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
444
444
  }
445
- var xr = { exports: {} };
445
+ var hr = { exports: {} };
446
446
  /*!
447
447
  Copyright (c) 2018 Jed Watson.
448
448
  Licensed under the MIT License (MIT), see
449
449
  http://jedwatson.github.io/classnames
450
450
  */
451
- var hr;
451
+ var wr;
452
452
  function Tt() {
453
- return hr || (hr = 1, function(t) {
453
+ return wr || (wr = 1, function(t) {
454
454
  (function() {
455
455
  var i = {}.hasOwnProperty;
456
456
  function n() {
@@ -479,13 +479,13 @@ function Tt() {
479
479
  }
480
480
  t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
481
481
  })();
482
- }(xr)), xr.exports;
482
+ }(hr)), hr.exports;
483
483
  }
484
484
  var Qt = Tt();
485
- const Ut = /* @__PURE__ */ Gt(Qt), wr = {
485
+ const Ut = /* @__PURE__ */ Gt(Qt), $r = {
486
486
  "purpur-field-helper-text": "_purpur-field-helper-text_atw6b_1",
487
487
  "purpur-field-helper-text--disabled": "_purpur-field-helper-text--disabled_atw6b_9"
488
- }, $r = "purpur-field-helper-text", Xt = ({
488
+ }, qr = "purpur-field-helper-text", Xt = ({
489
489
  children: t,
490
490
  className: i,
491
491
  disabled: n,
@@ -494,9 +494,9 @@ const Ut = /* @__PURE__ */ Gt(Qt), wr = {
494
494
  }) => {
495
495
  const r = Ut([
496
496
  i,
497
- wr[$r],
497
+ $r[qr],
498
498
  {
499
- [wr[`${$r}--disabled`]]: n
499
+ [$r[`${qr}--disabled`]]: n
500
500
  }
501
501
  ]);
502
502
  return /* @__PURE__ */ o("span", { id: a, className: r, ...p, children: t });
@@ -504,15 +504,15 @@ const Ut = /* @__PURE__ */ Gt(Qt), wr = {
504
504
  function Yt(t) {
505
505
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
506
506
  }
507
- var qr = { exports: {} };
507
+ var Sr = { exports: {} };
508
508
  /*!
509
509
  Copyright (c) 2018 Jed Watson.
510
510
  Licensed under the MIT License (MIT), see
511
511
  http://jedwatson.github.io/classnames
512
512
  */
513
- var Sr;
513
+ var Nr;
514
514
  function Jt() {
515
- return Sr || (Sr = 1, function(t) {
515
+ return Nr || (Nr = 1, function(t) {
516
516
  (function() {
517
517
  var i = {}.hasOwnProperty;
518
518
  function n() {
@@ -541,7 +541,7 @@ function Jt() {
541
541
  }
542
542
  t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
543
543
  })();
544
- }(qr)), qr.exports;
544
+ }(Sr)), Sr.exports;
545
545
  }
546
546
  var Kt = Jt();
547
547
  const re = /* @__PURE__ */ Yt(Kt), te = {
@@ -552,7 +552,7 @@ const re = /* @__PURE__ */ Yt(Kt), te = {
552
552
  "purpur-icon--md": "_purpur-icon--md_8u1lq_16",
553
553
  "purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
554
554
  "purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
555
- }, ee = re.bind(te), Nr = "purpur-icon", ne = "md", ue = (t) => t.filter((i) => Object.keys(i).length >= 1).map((i) => `${i.name}="${i.value}"`).join(" "), ie = ({ content: t = "", title: i } = {}) => {
555
+ }, ee = re.bind(te), Or = "purpur-icon", ne = "md", ue = (t) => t.filter((i) => Object.keys(i).length >= 1).map((i) => `${i.name}="${i.value}"`).join(" "), ie = ({ content: t = "", title: i } = {}) => {
556
556
  const n = [
557
557
  { name: "xmlns", value: "http://www.w3.org/2000/svg" },
558
558
  { name: "fill", value: "currentColor" },
@@ -560,7 +560,7 @@ const re = /* @__PURE__ */ Yt(Kt), te = {
560
560
  i ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
561
561
  ], a = i ? `<title>${i}</title>` : "";
562
562
  return `<svg ${ue(n)}>${a}${t}</svg>`;
563
- }, pe = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), rr = ({
563
+ }, pe = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), tr = ({
564
564
  ["data-testid"]: t,
565
565
  svg: i,
566
566
  allyTitle: n,
@@ -571,7 +571,7 @@ const re = /* @__PURE__ */ Yt(Kt), te = {
571
571
  const e = ie({
572
572
  content: pe(i.svg),
573
573
  title: n
574
- }), u = ee(a, Nr, `${Nr}--${p}`);
574
+ }), u = ee(a, Or, `${Or}--${p}`);
575
575
  return /* @__PURE__ */ o(
576
576
  "span",
577
577
  {
@@ -582,22 +582,22 @@ const re = /* @__PURE__ */ Yt(Kt), te = {
582
582
  }
583
583
  );
584
584
  };
585
- rr.displayName = "Icon";
585
+ tr.displayName = "Icon";
586
586
  const ae = {
587
587
  name: "check-circle-filled",
588
588
  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>',
589
589
  keywords: ["check-circle-filled"],
590
590
  category: "status"
591
- }, Qr = (t) => /* @__PURE__ */ o(rr, { ...t, svg: ae });
592
- Qr.displayName = "IconCheckCircleFilled";
591
+ }, Ur = (t) => /* @__PURE__ */ o(tr, { ...t, svg: ae });
592
+ Ur.displayName = "IconCheckCircleFilled";
593
593
  const oe = {
594
594
  name: "close",
595
595
  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>',
596
596
  keywords: ["close"],
597
597
  category: "utility"
598
- }, Ur = (t) => /* @__PURE__ */ o(rr, { ...t, svg: oe });
599
- Ur.displayName = "IconClose";
600
- function Or(t, i) {
598
+ }, Xr = (t) => /* @__PURE__ */ o(tr, { ...t, svg: oe });
599
+ Xr.displayName = "IconClose";
600
+ function jr(t, i) {
601
601
  if (typeof t == "function")
602
602
  return t(i);
603
603
  t != null && (t.current = i);
@@ -606,28 +606,28 @@ function le(...t) {
606
606
  return (i) => {
607
607
  let n = !1;
608
608
  const a = t.map((p) => {
609
- const r = Or(p, i);
609
+ const r = jr(p, i);
610
610
  return !n && typeof r == "function" && (n = !0), r;
611
611
  });
612
612
  if (n)
613
613
  return () => {
614
614
  for (let p = 0; p < a.length; p++) {
615
615
  const r = a[p];
616
- typeof r == "function" ? r() : Or(t[p], null);
616
+ typeof r == "function" ? r() : jr(t[p], null);
617
617
  }
618
618
  };
619
619
  };
620
620
  }
621
- var Xr = c.forwardRef((t, i) => {
621
+ var Yr = c.forwardRef((t, i) => {
622
622
  const { children: n, ...a } = t, p = c.Children.toArray(n), r = p.find(ce);
623
623
  if (r) {
624
624
  const e = r.props.children, u = p.map((f) => f === r ? c.Children.count(e) > 1 ? c.Children.only(null) : c.isValidElement(e) ? e.props.children : null : f);
625
- return /* @__PURE__ */ o(K, { ...a, ref: i, children: c.isValidElement(e) ? c.cloneElement(e, void 0, u) : null });
625
+ return /* @__PURE__ */ o(rr, { ...a, ref: i, children: c.isValidElement(e) ? c.cloneElement(e, void 0, u) : null });
626
626
  }
627
- return /* @__PURE__ */ o(K, { ...a, ref: i, children: n });
627
+ return /* @__PURE__ */ o(rr, { ...a, ref: i, children: n });
628
628
  });
629
- Xr.displayName = "Slot";
630
- var K = c.forwardRef((t, i) => {
629
+ Yr.displayName = "Slot";
630
+ var rr = c.forwardRef((t, i) => {
631
631
  const { children: n, ...a } = t;
632
632
  if (c.isValidElement(n)) {
633
633
  const p = de(n), r = _e(a, n.props);
@@ -635,8 +635,8 @@ var K = c.forwardRef((t, i) => {
635
635
  }
636
636
  return c.Children.count(n) > 1 ? c.Children.only(null) : null;
637
637
  });
638
- K.displayName = "SlotClone";
639
- var se = ({ children: t }) => /* @__PURE__ */ o(Wr, { children: t });
638
+ rr.displayName = "SlotClone";
639
+ var se = ({ children: t }) => /* @__PURE__ */ o(Gr, { children: t });
640
640
  function ce(t) {
641
641
  return c.isValidElement(t) && t.type === se;
642
642
  }
@@ -674,11 +674,11 @@ var fe = [
674
674
  "ul"
675
675
  ], ve = fe.reduce((t, i) => {
676
676
  const n = c.forwardRef((a, p) => {
677
- const { asChild: r, ...e } = a, u = r ? Xr : i;
677
+ const { asChild: r, ...e } = a, u = r ? Yr : i;
678
678
  return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ o(u, { ...e, ref: p });
679
679
  });
680
680
  return n.displayName = `Primitive.${i}`, { ...t, [i]: n };
681
- }, {}), ge = "Label", Yr = c.forwardRef((t, i) => /* @__PURE__ */ o(
681
+ }, {}), ge = "Label", Jr = c.forwardRef((t, i) => /* @__PURE__ */ o(
682
682
  ve.label,
683
683
  {
684
684
  ...t,
@@ -689,20 +689,20 @@ var fe = [
689
689
  }
690
690
  }
691
691
  ));
692
- Yr.displayName = ge;
693
- var be = Yr;
692
+ Jr.displayName = ge;
693
+ var be = Jr;
694
694
  function me(t) {
695
695
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
696
696
  }
697
- var jr = { exports: {} };
697
+ var Ar = { exports: {} };
698
698
  /*!
699
699
  Copyright (c) 2018 Jed Watson.
700
700
  Licensed under the MIT License (MIT), see
701
701
  http://jedwatson.github.io/classnames
702
702
  */
703
- var Ar;
703
+ var Mr;
704
704
  function ye() {
705
- return Ar || (Ar = 1, function(t) {
705
+ return Mr || (Mr = 1, function(t) {
706
706
  (function() {
707
707
  var i = {}.hasOwnProperty;
708
708
  function n() {
@@ -731,14 +731,14 @@ function ye() {
731
731
  }
732
732
  t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
733
733
  })();
734
- }(jr)), jr.exports;
734
+ }(Ar)), Ar.exports;
735
735
  }
736
736
  var xe = ye();
737
- const he = /* @__PURE__ */ me(xe), X = {
737
+ const he = /* @__PURE__ */ me(xe), Y = {
738
738
  "purpur-label": "_purpur-label_1jndl_1",
739
739
  "purpur-label--negative": "_purpur-label--negative_1jndl_8",
740
740
  "purpur-label--disabled": "_purpur-label--disabled_1jndl_11"
741
- }, Y = "purpur-label", we = ({
741
+ }, J = "purpur-label", we = ({
742
742
  children: t,
743
743
  className: i,
744
744
  disabled: n,
@@ -747,10 +747,10 @@ const he = /* @__PURE__ */ me(xe), X = {
747
747
  }) => {
748
748
  const r = he([
749
749
  i,
750
- X[Y],
750
+ Y[J],
751
751
  {
752
- [X[`${Y}--disabled`]]: n,
753
- [X[`${Y}--negative`]]: a
752
+ [Y[`${J}--disabled`]]: n,
753
+ [Y[`${J}--negative`]]: a
754
754
  }
755
755
  ]);
756
756
  return /* @__PURE__ */ o(be, { className: r, ...p, children: t });
@@ -758,15 +758,15 @@ const he = /* @__PURE__ */ me(xe), X = {
758
758
  function $e(t) {
759
759
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
760
760
  }
761
- var Mr = { exports: {} };
761
+ var Pr = { exports: {} };
762
762
  /*!
763
763
  Copyright (c) 2018 Jed Watson.
764
764
  Licensed under the MIT License (MIT), see
765
765
  http://jedwatson.github.io/classnames
766
766
  */
767
- var Pr;
767
+ var kr;
768
768
  function qe() {
769
- return Pr || (Pr = 1, function(t) {
769
+ return kr || (kr = 1, function(t) {
770
770
  (function() {
771
771
  var i = {}.hasOwnProperty;
772
772
  function n() {
@@ -795,10 +795,10 @@ function qe() {
795
795
  }
796
796
  t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
797
797
  })();
798
- }(Mr)), Mr.exports;
798
+ }(Pr)), Pr.exports;
799
799
  }
800
800
  var Se = qe();
801
- const kr = /* @__PURE__ */ $e(Se), Ne = "_rotate_12t9p_1", Oe = "_dash_12t9p_1", Z = {
801
+ const Cr = /* @__PURE__ */ $e(Se), Ne = "_rotate_12t9p_1", Oe = "_dash_12t9p_1", Z = {
802
802
  "purpur-spinner": "_purpur-spinner_12t9p_2",
803
803
  rotate: Ne,
804
804
  "purpur-spinner--xxs": "_purpur-spinner--xxs_12t9p_6",
@@ -821,13 +821,13 @@ const kr = /* @__PURE__ */ $e(Se), Ne = "_rotate_12t9p_1", Oe = "_dash_12t9p_1",
821
821
  }) => /* @__PURE__ */ o(
822
822
  "div",
823
823
  {
824
- className: kr([Z[H], Z[`${H}--${a}`]]),
824
+ className: Cr([Z[H], Z[`${H}--${a}`]]),
825
825
  "data-testid": t,
826
826
  ...p,
827
827
  children: /* @__PURE__ */ o("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ o(
828
828
  "circle",
829
829
  {
830
- className: kr(Z[`${H}__circle`], {
830
+ className: Cr(Z[`${H}__circle`], {
831
831
  [Z[`${H}__circle--disabled`]]: i,
832
832
  [Z[`${H}__circle--negative`]]: n
833
833
  }),
@@ -841,15 +841,15 @@ const kr = /* @__PURE__ */ $e(Se), Ne = "_rotate_12t9p_1", Oe = "_dash_12t9p_1",
841
841
  function Me(t) {
842
842
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
843
843
  }
844
- var Cr = { exports: {} };
844
+ var zr = { exports: {} };
845
845
  /*!
846
846
  Copyright (c) 2018 Jed Watson.
847
847
  Licensed under the MIT License (MIT), see
848
848
  http://jedwatson.github.io/classnames
849
849
  */
850
- var zr;
850
+ var Br;
851
851
  function Pe() {
852
- return zr || (zr = 1, function(t) {
852
+ return Br || (Br = 1, function(t) {
853
853
  (function() {
854
854
  var i = {}.hasOwnProperty;
855
855
  function n() {
@@ -878,7 +878,7 @@ function Pe() {
878
878
  }
879
879
  t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
880
880
  })();
881
- }(Cr)), Cr.exports;
881
+ }(zr)), zr.exports;
882
882
  }
883
883
  var ke = Pe();
884
884
  const Ce = /* @__PURE__ */ Me(ke), ze = {
@@ -898,7 +898,7 @@ const Ce = /* @__PURE__ */ Me(ke), ze = {
898
898
  "purpur-text-field__input--error": "_purpur-text-field__input--error_3gl1k_94",
899
899
  "purpur-text-field__adornment-container": "_purpur-text-field__adornment-container_3gl1k_106",
900
900
  "purpur-text-field__valid-icon": "_purpur-text-field__valid-icon_3gl1k_111"
901
- }, Be = (t) => at(t), O = Ce.bind(ze), s = "purpur-text-field", Re = ({
901
+ }, Be = (t) => at(t), j = Ce.bind(ze), s = "purpur-text-field", Re = ({
902
902
  ["data-testid"]: t,
903
903
  className: i,
904
904
  clearButtonAriaLabel: n,
@@ -907,111 +907,112 @@ const Ce = /* @__PURE__ */ Me(ke), ze = {
907
907
  endAdornment: r,
908
908
  errorText: e,
909
909
  helperText: u,
910
- label: f,
911
- loading: b = !1,
912
- onClear: v,
913
- startAdornment: M,
914
- valid: q = !1,
910
+ hideRequiredAsterisk: f = !1,
911
+ label: v,
912
+ loading: g = !1,
913
+ onClear: S,
914
+ startAdornment: N,
915
+ valid: M = !1,
915
916
  ...l
916
- }, x) => {
917
- var A;
918
- const S = pt(), m = l.id ?? S, g = (_) => t ? `${t}-${_}` : void 0, D = q && !e, y = u ? `${m}-helper-text` : void 0, h = [M].filter((_) => !!_), I = (typeof l.value == "number" ? l.value !== void 0 : (A = l.value) == null ? void 0 : A.length) && !l.disabled && !l.readOnly && !b && v && n, w = Be(null), z = (_) => {
919
- w.current = _, typeof x == "function" ? x(_) : x && (x.current = _);
920
- }, B = () => {
917
+ }, m) => {
918
+ var y;
919
+ const x = pt(), P = l.id ?? x, b = (_) => t ? `${t}-${_}` : void 0, h = M && !e, w = u ? `${P}-helper-text` : void 0, R = [N].filter((_) => !!_), $ = (typeof l.value == "number" ? l.value !== void 0 : (y = l.value) == null ? void 0 : y.length) && !l.disabled && !l.readOnly && !g && S && n, k = Be(null), D = (_) => {
920
+ k.current = _, typeof m == "function" ? m(_) : m && (m.current = _);
921
+ }, C = () => {
921
922
  var _;
922
- v == null || v(), (_ = w.current) == null || _.focus();
923
- }, N = [
924
- b && /* @__PURE__ */ o(
923
+ S == null || S(), (_ = k.current) == null || _.focus();
924
+ }, O = [
925
+ g && /* @__PURE__ */ o(
925
926
  Ae,
926
927
  {
927
928
  disabled: l.disabled,
928
929
  size: "xs",
929
- "data-testid": g("spinner")
930
+ "data-testid": b("spinner")
930
931
  },
931
932
  "spinner"
932
933
  ),
933
- I && /* @__PURE__ */ o(
934
- Gr,
934
+ $ && /* @__PURE__ */ o(
935
+ Tr,
935
936
  {
936
937
  variant: "tertiary-purple",
937
- onClick: B,
938
+ onClick: C,
938
939
  iconOnly: !0,
939
940
  "aria-label": n ?? "",
940
- "data-testid": g("clear-button"),
941
+ "data-testid": b("clear-button"),
941
942
  tabIndex: -1,
942
- children: /* @__PURE__ */ o(Ur, { size: "xs" })
943
+ children: /* @__PURE__ */ o(Xr, { size: "xs" })
943
944
  },
944
945
  "clear-button"
945
946
  ),
946
- D && /* @__PURE__ */ o(
947
- Qr,
947
+ h && /* @__PURE__ */ o(
948
+ Ur,
948
949
  {
949
- "data-testid": g("valid-icon"),
950
- className: O(`${s}__valid-icon`)
950
+ "data-testid": b("valid-icon"),
951
+ className: j(`${s}__valid-icon`)
951
952
  },
952
953
  "valid-icon"
953
954
  )
954
- ].filter((_) => !!_), P = O([
955
+ ].filter((_) => !!_), X = j([
955
956
  `${s}__input-container`,
956
957
  {
957
- [`${s}__input-container--start-adornment`]: h.length,
958
- [`${s}__input-container--end-adornment`]: N.length || r,
958
+ [`${s}__input-container--start-adornment`]: R.length,
959
+ [`${s}__input-container--end-adornment`]: O.length || r,
959
960
  [`${s}__input-container--disabled`]: l.disabled,
960
- [`${s}__input-container--has-clear-button`]: I,
961
+ [`${s}__input-container--has-clear-button`]: $,
961
962
  [`${s}__input-container--readonly`]: l.readOnly && !l.disabled
962
963
  }
963
964
  ]);
964
- return /* @__PURE__ */ j("div", { className: O(i, s), children: [
965
- f && /* @__PURE__ */ j(
965
+ return /* @__PURE__ */ A("div", { className: j(i, s), children: [
966
+ v && /* @__PURE__ */ A(
966
967
  we,
967
968
  {
968
- htmlFor: m,
969
- className: O(`${s}__label`),
970
- "data-testid": g("label"),
969
+ htmlFor: P,
970
+ className: j(`${s}__label`),
971
+ "data-testid": b("label"),
971
972
  disabled: l.disabled,
972
973
  children: [
973
- l.required && /* @__PURE__ */ o("span", { "aria-hidden": !0, children: "*" }),
974
- f
974
+ l.required && !f && /* @__PURE__ */ o("span", { "aria-hidden": !0, children: "*" }),
975
+ v
975
976
  ]
976
977
  }
977
978
  ),
978
- /* @__PURE__ */ j("div", { className: O(`${s}__field-row`), children: [
979
+ /* @__PURE__ */ A("div", { className: j(`${s}__field-row`), children: [
979
980
  !!a && a,
980
- /* @__PURE__ */ j("div", { className: P, children: [
981
- !!h.length && /* @__PURE__ */ o(
981
+ /* @__PURE__ */ A("div", { className: X, children: [
982
+ !!R.length && /* @__PURE__ */ o(
982
983
  "div",
983
984
  {
984
- "data-testid": g("start-adornments"),
985
- className: O(`${s}__adornment-container`),
986
- children: h
985
+ "data-testid": b("start-adornments"),
986
+ className: j(`${s}__adornment-container`),
987
+ children: R
987
988
  }
988
989
  ),
989
990
  /* @__PURE__ */ o(
990
991
  "input",
991
992
  {
992
993
  ...l,
993
- id: m,
994
- ref: z,
995
- "data-testid": g("input"),
996
- "aria-describedby": l["aria-describedby"] || y,
994
+ id: P,
995
+ ref: D,
996
+ "data-testid": b("input"),
997
+ "aria-describedby": l["aria-describedby"] || w,
997
998
  "aria-invalid": l["aria-invalid"] || !!e,
998
- className: O([
999
+ className: j([
999
1000
  `${s}__input`,
1000
1001
  {
1001
- [`${s}__input--valid`]: D,
1002
+ [`${s}__input--valid`]: h,
1002
1003
  [`${s}__input--error`]: !!e
1003
1004
  }
1004
1005
  ])
1005
1006
  }
1006
1007
  ),
1007
- /* @__PURE__ */ o("div", { className: O(`${s}__frame`) }),
1008
- (!!N.length || r) && /* @__PURE__ */ j(
1008
+ /* @__PURE__ */ o("div", { className: j(`${s}__frame`) }),
1009
+ (!!O.length || r) && /* @__PURE__ */ A(
1009
1010
  "div",
1010
1011
  {
1011
- "data-testid": g("end-adornments"),
1012
- className: O(`${s}__adornment-container`),
1012
+ "data-testid": b("end-adornments"),
1013
+ className: j(`${s}__adornment-container`),
1013
1014
  children: [
1014
- N,
1015
+ O,
1015
1016
  r
1016
1017
  ]
1017
1018
  }
@@ -1019,23 +1020,23 @@ const Ce = /* @__PURE__ */ Me(ke), ze = {
1019
1020
  ] }),
1020
1021
  !!p && p
1021
1022
  ] }),
1022
- y && /* @__PURE__ */ o(Xt, { "data-testid": g("helper-text"), id: y, children: u }),
1023
- e && /* @__PURE__ */ o(Wt, { "data-testid": g("error-text"), children: e })
1023
+ w && /* @__PURE__ */ o(Xt, { "data-testid": b("helper-text"), id: w, children: u }),
1024
+ e && /* @__PURE__ */ o(Wt, { "data-testid": b("error-text"), children: e })
1024
1025
  ] });
1025
- }, Jr = U(Re);
1026
- Jr.displayName = "TextField";
1026
+ }, Kr = U(Re);
1027
+ Kr.displayName = "TextField";
1027
1028
  function De(t) {
1028
1029
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
1029
1030
  }
1030
- var J = { exports: {} };
1031
+ var K = { exports: {} };
1031
1032
  /*!
1032
1033
  Copyright (c) 2018 Jed Watson.
1033
1034
  Licensed under the MIT License (MIT), see
1034
1035
  http://jedwatson.github.io/classnames
1035
1036
  */
1036
- var Br;
1037
+ var Rr;
1037
1038
  function Ie() {
1038
- return Br || (Br = 1, function(t) {
1039
+ return Rr || (Rr = 1, function(t) {
1039
1040
  (function() {
1040
1041
  var i = {}.hasOwnProperty;
1041
1042
  function n() {
@@ -1064,10 +1065,10 @@ function Ie() {
1064
1065
  }
1065
1066
  t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
1066
1067
  })();
1067
- }(J)), J.exports;
1068
+ }(K)), K.exports;
1068
1069
  }
1069
1070
  var Le = Ie();
1070
- const Kr = /* @__PURE__ */ De(Le), Ee = {
1071
+ const rt = /* @__PURE__ */ De(Le), Ee = {
1071
1072
  "purpur-quantity-selector": "_purpur-quantity-selector_lzxe3_1",
1072
1073
  "purpur-quantity-selector--full-width": "_purpur-quantity-selector--full-width_lzxe3_21",
1073
1074
  "purpur-quantity-selector--loading": "_purpur-quantity-selector--loading_lzxe3_27",
@@ -1084,15 +1085,15 @@ const Kr = /* @__PURE__ */ De(Le), Ee = {
1084
1085
  function Ve(t) {
1085
1086
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
1086
1087
  }
1087
- var Rr = { exports: {} };
1088
+ var Dr = { exports: {} };
1088
1089
  /*!
1089
1090
  Copyright (c) 2018 Jed Watson.
1090
1091
  Licensed under the MIT License (MIT), see
1091
1092
  http://jedwatson.github.io/classnames
1092
1093
  */
1093
- var Dr;
1094
+ var Ir;
1094
1095
  function Ze() {
1095
- return Dr || (Dr = 1, function(t) {
1096
+ return Ir || (Ir = 1, function(t) {
1096
1097
  (function() {
1097
1098
  var i = {}.hasOwnProperty;
1098
1099
  function n() {
@@ -1121,10 +1122,10 @@ function Ze() {
1121
1122
  }
1122
1123
  t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
1123
1124
  })();
1124
- }(Rr)), Rr.exports;
1125
+ }(Dr)), Dr.exports;
1125
1126
  }
1126
1127
  var He = Ze();
1127
- const Ir = /* @__PURE__ */ Ve(He), We = "_rotate_12t9p_1", Ge = "_dash_12t9p_1", W = {
1128
+ const Lr = /* @__PURE__ */ Ve(He), We = "_rotate_12t9p_1", Ge = "_dash_12t9p_1", W = {
1128
1129
  "purpur-spinner": "_purpur-spinner_12t9p_2",
1129
1130
  rotate: We,
1130
1131
  "purpur-spinner--xxs": "_purpur-spinner--xxs_12t9p_6",
@@ -1147,13 +1148,13 @@ const Ir = /* @__PURE__ */ Ve(He), We = "_rotate_12t9p_1", Ge = "_dash_12t9p_1",
1147
1148
  }) => /* @__PURE__ */ o(
1148
1149
  "div",
1149
1150
  {
1150
- className: Ir([W[G], W[`${G}--${a}`]]),
1151
+ className: Lr([W[G], W[`${G}--${a}`]]),
1151
1152
  "data-testid": t,
1152
1153
  ...p,
1153
1154
  children: /* @__PURE__ */ o("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ o(
1154
1155
  "circle",
1155
1156
  {
1156
- className: Ir(W[`${G}__circle`], {
1157
+ className: Lr(W[`${G}__circle`], {
1157
1158
  [W[`${G}__circle--disabled`]]: i,
1158
1159
  [W[`${G}__circle--negative`]]: n
1159
1160
  }),
@@ -1167,15 +1168,15 @@ const Ir = /* @__PURE__ */ Ve(He), We = "_rotate_12t9p_1", Ge = "_dash_12t9p_1",
1167
1168
  function Ue(t) {
1168
1169
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
1169
1170
  }
1170
- var Lr = { exports: {} };
1171
+ var Er = { exports: {} };
1171
1172
  /*!
1172
1173
  Copyright (c) 2018 Jed Watson.
1173
1174
  Licensed under the MIT License (MIT), see
1174
1175
  http://jedwatson.github.io/classnames
1175
1176
  */
1176
- var Er;
1177
+ var Fr;
1177
1178
  function Xe() {
1178
- return Er || (Er = 1, function(t) {
1179
+ return Fr || (Fr = 1, function(t) {
1179
1180
  (function() {
1180
1181
  var i = {}.hasOwnProperty;
1181
1182
  function n() {
@@ -1204,7 +1205,7 @@ function Xe() {
1204
1205
  }
1205
1206
  t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
1206
1207
  })();
1207
- }(Lr)), Lr.exports;
1208
+ }(Er)), Er.exports;
1208
1209
  }
1209
1210
  var Ye = Xe();
1210
1211
  const Je = /* @__PURE__ */ Ue(Ye), Ke = {
@@ -1229,7 +1230,7 @@ const Je = /* @__PURE__ */ Ue(Ye), Ke = {
1229
1230
  "purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-negative_w455q_166",
1230
1231
  "purpur-button--text-negative": "_purpur-button--text-negative_w455q_181",
1231
1232
  "purpur-button--text": "_purpur-button--text_w455q_181"
1232
- }, rn = Je.bind(Ke), C = "purpur-button", tn = ({
1233
+ }, rn = Je.bind(Ke), B = "purpur-button", tn = ({
1233
1234
  children: t,
1234
1235
  className: i,
1235
1236
  ["data-testid"]: n,
@@ -1239,60 +1240,60 @@ const Je = /* @__PURE__ */ Ue(Ye), Ke = {
1239
1240
  loading: e = !1,
1240
1241
  negative: u = !1,
1241
1242
  onClick: f,
1242
- size: b = "md",
1243
- variant: v,
1244
- type: M = "button",
1245
- ...q
1246
- }, l) => {
1247
- if (r && v === "destructive")
1243
+ size: v = "md",
1244
+ variant: g,
1245
+ type: S = "button",
1246
+ ...N
1247
+ }, M) => {
1248
+ if (r && g === "destructive")
1248
1249
  return null;
1249
- const x = rn(
1250
+ const l = rn(
1250
1251
  [
1251
- C,
1252
- `${C}--${u ? `${v}-negative` : v}`,
1253
- `${C}--${b}`
1252
+ B,
1253
+ `${B}--${u ? `${g}-negative` : g}`,
1254
+ `${B}--${v}`
1254
1255
  ],
1255
1256
  {
1256
- [`${C}--icon-only`]: r,
1257
- [`${C}--negative`]: u,
1258
- [`${C}--full-width`]: p,
1259
- [`${C}--disabled`]: a || e
1257
+ [`${B}--icon-only`]: r,
1258
+ [`${B}--negative`]: u,
1259
+ [`${B}--full-width`]: p,
1260
+ [`${B}--disabled`]: a || e
1260
1261
  },
1261
1262
  i
1262
- ), A = (m) => {
1263
- a || e ? m.preventDefault() : f && f(m);
1264
- }, S = !!q["aria-disabled"] || a || e;
1265
- return /* @__PURE__ */ j(
1263
+ ), m = (x) => {
1264
+ a || e ? x.preventDefault() : f && f(x);
1265
+ }, y = !!N["aria-disabled"] || a || e;
1266
+ return /* @__PURE__ */ A(
1266
1267
  "button",
1267
1268
  {
1268
- className: x,
1269
+ className: l,
1269
1270
  "data-testid": n,
1270
- type: M,
1271
- ref: l,
1272
- "aria-disabled": S,
1273
- onClick: A,
1274
- ...q,
1271
+ type: S,
1272
+ ref: M,
1273
+ "aria-disabled": y,
1274
+ onClick: m,
1275
+ ...N,
1275
1276
  children: [
1276
- e && /* @__PURE__ */ o(Qe, { size: b === Fe.LG ? "xs" : "xxs", negative: u, disabled: S }),
1277
+ e && /* @__PURE__ */ o(Qe, { size: v === Fe.LG ? "xs" : "xxs", negative: u, disabled: y }),
1277
1278
  " ",
1278
1279
  t
1279
1280
  ]
1280
1281
  }
1281
1282
  );
1282
- }, rt = U(tn);
1283
- rt.displayName = "Button";
1283
+ }, tt = U(tn);
1284
+ tt.displayName = "Button";
1284
1285
  function en(t) {
1285
1286
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
1286
1287
  }
1287
- var Fr = { exports: {} };
1288
+ var Vr = { exports: {} };
1288
1289
  /*!
1289
1290
  Copyright (c) 2018 Jed Watson.
1290
1291
  Licensed under the MIT License (MIT), see
1291
1292
  http://jedwatson.github.io/classnames
1292
1293
  */
1293
- var Vr;
1294
+ var Zr;
1294
1295
  function nn() {
1295
- return Vr || (Vr = 1, function(t) {
1296
+ return Zr || (Zr = 1, function(t) {
1296
1297
  (function() {
1297
1298
  var i = {}.hasOwnProperty;
1298
1299
  function n() {
@@ -1321,7 +1322,7 @@ function nn() {
1321
1322
  }
1322
1323
  t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
1323
1324
  })();
1324
- }(Fr)), Fr.exports;
1325
+ }(Vr)), Vr.exports;
1325
1326
  }
1326
1327
  var un = nn();
1327
1328
  const pn = /* @__PURE__ */ en(un), an = {
@@ -1332,7 +1333,7 @@ const pn = /* @__PURE__ */ en(un), an = {
1332
1333
  "purpur-icon--md": "_purpur-icon--md_8u1lq_16",
1333
1334
  "purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
1334
1335
  "purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
1335
- }, on = pn.bind(an), Zr = "purpur-icon", ln = "md", sn = (t) => t.filter((i) => Object.keys(i).length >= 1).map((i) => `${i.name}="${i.value}"`).join(" "), cn = ({ content: t = "", title: i } = {}) => {
1336
+ }, on = pn.bind(an), Hr = "purpur-icon", ln = "md", sn = (t) => t.filter((i) => Object.keys(i).length >= 1).map((i) => `${i.name}="${i.value}"`).join(" "), cn = ({ content: t = "", title: i } = {}) => {
1336
1337
  const n = [
1337
1338
  { name: "xmlns", value: "http://www.w3.org/2000/svg" },
1338
1339
  { name: "fill", value: "currentColor" },
@@ -1340,7 +1341,7 @@ const pn = /* @__PURE__ */ en(un), an = {
1340
1341
  i ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
1341
1342
  ], a = i ? `<title>${i}</title>` : "";
1342
1343
  return `<svg ${sn(n)}>${a}${t}</svg>`;
1343
- }, _n = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), tr = ({
1344
+ }, _n = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), er = ({
1344
1345
  ["data-testid"]: t,
1345
1346
  svg: i,
1346
1347
  allyTitle: n,
@@ -1351,7 +1352,7 @@ const pn = /* @__PURE__ */ en(un), an = {
1351
1352
  const e = cn({
1352
1353
  content: _n(i.svg),
1353
1354
  title: n
1354
- }), u = on(a, Zr, `${Zr}--${p}`);
1355
+ }), u = on(a, Hr, `${Hr}--${p}`);
1355
1356
  return /* @__PURE__ */ o(
1356
1357
  "span",
1357
1358
  {
@@ -1362,28 +1363,28 @@ const pn = /* @__PURE__ */ en(un), an = {
1362
1363
  }
1363
1364
  );
1364
1365
  };
1365
- tr.displayName = "Icon";
1366
+ er.displayName = "Icon";
1366
1367
  const dn = {
1367
1368
  name: "minus",
1368
1369
  svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M4.1 12a.9.9 0 0 1 .9-.9h14a.9.9 0 1 1 0 1.8H5a.9.9 0 0 1-.9-.9Z" clip-rule="evenodd"/></svg>',
1369
1370
  keywords: ["minus"],
1370
1371
  category: "utility"
1371
- }, tt = (t) => /* @__PURE__ */ o(tr, { ...t, svg: dn });
1372
- tt.displayName = "IconMinus";
1372
+ }, et = (t) => /* @__PURE__ */ o(er, { ...t, svg: dn });
1373
+ et.displayName = "IconMinus";
1373
1374
  const fn = {
1374
1375
  name: "plus",
1375
1376
  svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M12 4.1a.9.9 0 0 1 .9.9v6.1H19a.9.9 0 1 1 0 1.8h-6.1V19a.9.9 0 0 1-1.8 0v-6.1H5a.9.9 0 0 1 0-1.8h6.1V5a.9.9 0 0 1 .9-.9Z" clip-rule="evenodd"/></svg>',
1376
1377
  keywords: ["plus"],
1377
1378
  category: "utility"
1378
- }, et = (t) => /* @__PURE__ */ o(tr, { ...t, svg: fn });
1379
- et.displayName = "IconPlus";
1379
+ }, nt = (t) => /* @__PURE__ */ o(er, { ...t, svg: fn });
1380
+ nt.displayName = "IconPlus";
1380
1381
  const vn = {
1381
1382
  "purpur-quantity-selector-button": "_purpur-quantity-selector-button_qjlbs_1",
1382
1383
  "purpur-quantity-selector-button--gap-left": "_purpur-quantity-selector-button--gap-left_qjlbs_4",
1383
1384
  "purpur-quantity-selector-button--gap-right": "_purpur-quantity-selector-button--gap-right_qjlbs_7",
1384
1385
  "purpur-quantity-selector-button--no-gap-right": "_purpur-quantity-selector-button--no-gap-right_qjlbs_10",
1385
1386
  "purpur-quantity-selector-button--no-gap-left": "_purpur-quantity-selector-button--no-gap-left_qjlbs_13"
1386
- }, gn = Kr.bind(vn), T = "purpur-quantity-selector-button", bn = ({
1387
+ }, gn = rt.bind(vn), T = "purpur-quantity-selector-button", bn = ({
1387
1388
  ["data-testid"]: t,
1388
1389
  disabled: i,
1389
1390
  hasGap: n,
@@ -1401,7 +1402,7 @@ const vn = {
1401
1402
  }
1402
1403
  ]);
1403
1404
  return /* @__PURE__ */ o(
1404
- rt,
1405
+ tt,
1405
1406
  {
1406
1407
  "data-testid": t,
1407
1408
  className: e,
@@ -1412,10 +1413,10 @@ const vn = {
1412
1413
  iconOnly: !0,
1413
1414
  disabled: i,
1414
1415
  tabIndex: -1,
1415
- children: p === "increment" ? /* @__PURE__ */ o(et, { size: "xs" }) : /* @__PURE__ */ o(tt, { size: "xs" })
1416
+ children: p === "increment" ? /* @__PURE__ */ o(nt, { size: "xs" }) : /* @__PURE__ */ o(et, { size: "xs" })
1416
1417
  }
1417
1418
  );
1418
- }, Hr = Kr.bind(Ee), wn = ["attached", "separated"], $n = ["primary", "secondary"], $ = "purpur-quantity-selector", mn = U(
1419
+ }, Wr = rt.bind(Ee), wn = ["attached", "separated"], $n = ["primary", "secondary"], q = "purpur-quantity-selector", mn = U(
1419
1420
  ({
1420
1421
  ["data-testid"]: t,
1421
1422
  className: i,
@@ -1426,100 +1427,100 @@ const vn = {
1426
1427
  defaultValue: e,
1427
1428
  fullWidth: u,
1428
1429
  disabled: f,
1429
- loading: b,
1430
- minValue: v,
1431
- maxValue: M,
1432
- ariaLabelDecrement: q,
1433
- ariaLabelIncrement: l,
1434
- ...x
1435
- }, A) => {
1436
- const [S, m] = nr(e ?? 0), [g, D] = nr(S), y = r !== void 0, h = y ? r : g, I = (d) => t ? `${t}-${d}` : void 0, w = f || b, z = Math.max(v ?? 0, 0), B = M ?? Number.MAX_SAFE_INTEGER, N = h === B, P = h === z;
1437
- ur(() => {
1438
- y && m(r);
1439
- }, [r, y]), ur(() => {
1440
- if (!y) {
1430
+ loading: v,
1431
+ minValue: g,
1432
+ maxValue: S,
1433
+ ariaLabelDecrement: N,
1434
+ ariaLabelIncrement: M,
1435
+ ...l
1436
+ }, m) => {
1437
+ const [y, x] = ur(e ?? 0), [P, b] = ur(y), h = r !== void 0, w = h ? r : P, R = (d) => t ? `${t}-${d}` : void 0, $ = f || v, k = Math.max(g ?? 0, 0), D = S ?? Number.MAX_SAFE_INTEGER, C = w === D, O = w === k;
1438
+ ir(() => {
1439
+ h && x(r);
1440
+ }, [r, h]), ir(() => {
1441
+ if (!h) {
1441
1442
  const d = setTimeout(() => {
1442
- m(g);
1443
+ x(P);
1443
1444
  }, 300);
1444
1445
  return () => clearTimeout(d);
1445
1446
  }
1446
- }, [g, y, p]);
1447
- const _ = Hr([
1447
+ }, [P, h, p]);
1448
+ const X = Wr([
1448
1449
  i,
1449
- $,
1450
+ q,
1450
1451
  {
1451
- [`${$}--no-gap`]: n === "attached" && !w && !P && !N,
1452
- [`${$}--no-gap-disabled-left`]: n === "attached" && !w && !N && P,
1453
- [`${$}--no-gap-disabled-right`]: n === "attached" && !w && !P && N,
1454
- [`${$}--no-gap-disabled`]: n === "attached" && (w || N && P),
1455
- [`${$}--full-width`]: u,
1456
- [`${$}--loading`]: b
1452
+ [`${q}--no-gap`]: n === "attached" && !$ && !O && !C,
1453
+ [`${q}--no-gap-disabled-left`]: n === "attached" && !$ && !C && O,
1454
+ [`${q}--no-gap-disabled-right`]: n === "attached" && !$ && !O && C,
1455
+ [`${q}--no-gap-disabled`]: n === "attached" && ($ || C && O),
1456
+ [`${q}--full-width`]: u,
1457
+ [`${q}--loading`]: v
1457
1458
  }
1458
- ]), nt = (d) => {
1459
+ ]), _ = (d) => {
1459
1460
  if (!/^[0-9]*$/.test(d.target.value))
1460
1461
  return;
1461
1462
  const Q = +d.target.value;
1462
- Q < z || Q > B || (y || D(Q), p(Q));
1463
+ Q < k || Q > D || (h || b(Q), p(Q));
1463
1464
  }, ut = (d) => {
1464
- const R = d === "increment" ? h + 1 : h - 1;
1465
- R < 0 || (y || D(R), p(R));
1466
- }, er = (d) => {
1467
- const R = d === "increment" && N || d === "decrement" && P;
1465
+ const I = d === "increment" ? w + 1 : w - 1;
1466
+ I < 0 || (h || b(I), p(I));
1467
+ }, nr = (d) => {
1468
+ const I = d === "increment" && C || d === "decrement" && O;
1468
1469
  return /* @__PURE__ */ o(
1469
1470
  bn,
1470
1471
  {
1471
- "data-testid": I("button-" + d),
1472
+ "data-testid": R("button-" + d),
1472
1473
  variant: a,
1473
1474
  buttonType: d,
1474
1475
  hasGap: n === "separated",
1475
1476
  onClick: ut,
1476
- disabled: w || R,
1477
- "aria-label": d === "increment" ? l : q
1477
+ disabled: $ || I,
1478
+ "aria-label": d === "increment" ? M : N
1478
1479
  }
1479
1480
  );
1480
- }, it = /* @__PURE__ */ j(Wr, { children: [
1481
- b && /* @__PURE__ */ o(
1481
+ }, it = /* @__PURE__ */ A(Gr, { children: [
1482
+ v && /* @__PURE__ */ o(
1482
1483
  "div",
1483
1484
  {
1484
- className: Hr([
1485
- `${$}__spinner`,
1485
+ className: Wr([
1486
+ `${q}__spinner`,
1486
1487
  {
1487
- [`${$}__spinner--full-width`]: u,
1488
- [`${$}__spinner--separated`]: !u && n === "separated"
1488
+ [`${q}__spinner--full-width`]: u,
1489
+ [`${q}__spinner--separated`]: !u && n === "separated"
1489
1490
  }
1490
1491
  ]),
1491
1492
  children: /* @__PURE__ */ o(
1492
1493
  ft,
1493
1494
  {
1494
- disabled: w,
1495
+ disabled: $,
1495
1496
  size: "xs",
1496
- "data-testid": I("spinner")
1497
+ "data-testid": R("spinner")
1497
1498
  },
1498
1499
  "spinner"
1499
1500
  )
1500
1501
  }
1501
1502
  ),
1502
- er("decrement")
1503
+ nr("decrement")
1503
1504
  ] });
1504
1505
  return /* @__PURE__ */ o(
1505
- Jr,
1506
+ Kr,
1506
1507
  {
1507
- value: h,
1508
+ value: w,
1508
1509
  type: "number",
1509
- ref: A,
1510
- className: _,
1510
+ ref: m,
1511
+ className: X,
1511
1512
  "data-testid": t,
1512
- onChange: nt,
1513
+ onChange: _,
1513
1514
  beforeField: it,
1514
- afterField: er("increment"),
1515
- disabled: w,
1516
- min: z,
1517
- max: B,
1515
+ afterField: nr("increment"),
1516
+ disabled: $,
1517
+ min: k,
1518
+ max: D,
1518
1519
  role: "spinbutton",
1519
- "aria-valuenow": h,
1520
- "aria-valuemax": B,
1521
- "aria-valuemin": z,
1522
- ...x
1520
+ "aria-valuenow": w,
1521
+ "aria-valuemax": D,
1522
+ "aria-valuemin": k,
1523
+ ...l
1523
1524
  }
1524
1525
  );
1525
1526
  }