@purpurds/quantity-selector 5.25.0 → 5.26.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.
- package/.rush/temp/operation/ci_build/all.log +4 -4
- package/.rush/temp/operation/ci_build/state.json +1 -1
- package/.rush/temp/operation/test_unit/all.log +5 -4
- package/.rush/temp/operation/test_unit/state.json +1 -1
- package/.rush/temp/shrinkwrap-deps.json +167 -244
- package/dist/LICENSE.txt +4 -4
- package/dist/quantity-selector.cjs.js +15 -15
- package/dist/quantity-selector.cjs.js.map +1 -1
- package/dist/quantity-selector.es.js +189 -209
- package/dist/quantity-selector.es.js.map +1 -1
- package/package.json +5 -5
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as o, jsxs as S, Fragment as
|
|
2
|
-
import { forwardRef as N, Children as
|
|
1
|
+
import { jsx as o, jsxs as S, Fragment as Zr } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as N, Children as R, isValidElement as Q, createElement as T, Fragment as Hr, cloneElement as gr, useEffect as xr, useId as Rr, useRef as Tr, useState as nr } from "react";
|
|
3
3
|
import "react-dom";
|
|
4
|
-
function
|
|
4
|
+
function Gr(t) {
|
|
5
5
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
6
6
|
}
|
|
7
|
-
var
|
|
7
|
+
var br = { exports: {} };
|
|
8
8
|
/*!
|
|
9
9
|
Copyright (c) 2018 Jed Watson.
|
|
10
10
|
Licensed under the MIT License (MIT), see
|
|
@@ -39,44 +39,40 @@ var mr = { exports: {} };
|
|
|
39
39
|
}
|
|
40
40
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
41
41
|
})();
|
|
42
|
-
})(
|
|
43
|
-
var
|
|
44
|
-
const ur = /* @__PURE__ */
|
|
42
|
+
})(br);
|
|
43
|
+
var Qr = br.exports;
|
|
44
|
+
const ur = /* @__PURE__ */ Gr(Qr), Xr = "_rotate_1xozj_1", Yr = "_dash_1xozj_1", k = {
|
|
45
45
|
"purpur-spinner": "_purpur-spinner_1xozj_1",
|
|
46
|
-
rotate:
|
|
46
|
+
rotate: Xr,
|
|
47
47
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_1xozj_4",
|
|
48
48
|
"purpur-spinner--xs": "_purpur-spinner--xs_1xozj_8",
|
|
49
49
|
"purpur-spinner--sm": "_purpur-spinner--sm_1xozj_12",
|
|
50
50
|
"purpur-spinner--md": "_purpur-spinner--md_1xozj_16",
|
|
51
51
|
"purpur-spinner--lg": "_purpur-spinner--lg_1xozj_20",
|
|
52
52
|
"purpur-spinner__circle": "_purpur-spinner__circle_1xozj_24",
|
|
53
|
-
dash:
|
|
53
|
+
dash: Yr,
|
|
54
54
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_1xozj_33",
|
|
55
55
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_1xozj_36"
|
|
56
|
-
},
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
SM: "sm",
|
|
60
|
-
MD: "md",
|
|
61
|
-
LG: "lg"
|
|
62
|
-
}, Yr = ({
|
|
56
|
+
}, I = "purpur-spinner", Jr = {
|
|
57
|
+
SM: "sm"
|
|
58
|
+
}, Ur = ({
|
|
63
59
|
["data-testid"]: t,
|
|
64
60
|
disabled: i = !1,
|
|
65
61
|
negative: n = !1,
|
|
66
|
-
size: a =
|
|
62
|
+
size: a = Jr.SM,
|
|
67
63
|
...p
|
|
68
64
|
}) => /* @__PURE__ */ o(
|
|
69
65
|
"div",
|
|
70
66
|
{
|
|
71
|
-
className: ur([
|
|
67
|
+
className: ur([k[I], k[`${I}--${a}`]]),
|
|
72
68
|
"data-testid": t,
|
|
73
69
|
...p,
|
|
74
70
|
children: /* @__PURE__ */ o("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ o(
|
|
75
71
|
"circle",
|
|
76
72
|
{
|
|
77
|
-
className: ur(
|
|
78
|
-
[
|
|
79
|
-
[
|
|
73
|
+
className: ur(k[`${I}__circle`], {
|
|
74
|
+
[k[`${I}__circle--disabled`]]: i,
|
|
75
|
+
[k[`${I}__circle--negative`]]: n
|
|
80
76
|
}),
|
|
81
77
|
cx: "25",
|
|
82
78
|
cy: "25",
|
|
@@ -85,14 +81,12 @@ const ur = /* @__PURE__ */ Rr(Tr), Qr = "_rotate_1xozj_1", Jr = "_dash_1xozj_1",
|
|
|
85
81
|
) })
|
|
86
82
|
}
|
|
87
83
|
), Wr = {
|
|
88
|
-
SM: "sm",
|
|
89
|
-
MD: "md",
|
|
90
84
|
LG: "lg"
|
|
91
85
|
};
|
|
92
86
|
function Kr(t) {
|
|
93
87
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
94
88
|
}
|
|
95
|
-
var
|
|
89
|
+
var mr = { exports: {} };
|
|
96
90
|
/*!
|
|
97
91
|
Copyright (c) 2018 Jed Watson.
|
|
98
92
|
Licensed under the MIT License (MIT), see
|
|
@@ -127,9 +121,9 @@ var br = { exports: {} };
|
|
|
127
121
|
}
|
|
128
122
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
129
123
|
})();
|
|
130
|
-
})(
|
|
131
|
-
var rt =
|
|
132
|
-
const ir = /* @__PURE__ */ Kr(rt), tt = "_rotate_1xozj_1", et = "_dash_1xozj_1",
|
|
124
|
+
})(mr);
|
|
125
|
+
var rt = mr.exports;
|
|
126
|
+
const ir = /* @__PURE__ */ Kr(rt), tt = "_rotate_1xozj_1", et = "_dash_1xozj_1", F = {
|
|
133
127
|
"purpur-spinner": "_purpur-spinner_1xozj_1",
|
|
134
128
|
rotate: tt,
|
|
135
129
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_1xozj_4",
|
|
@@ -141,12 +135,8 @@ const ir = /* @__PURE__ */ Kr(rt), tt = "_rotate_1xozj_1", et = "_dash_1xozj_1",
|
|
|
141
135
|
dash: et,
|
|
142
136
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_1xozj_33",
|
|
143
137
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_1xozj_36"
|
|
144
|
-
},
|
|
145
|
-
|
|
146
|
-
XS: "xs",
|
|
147
|
-
SM: "sm",
|
|
148
|
-
MD: "md",
|
|
149
|
-
LG: "lg"
|
|
138
|
+
}, L = "purpur-spinner", nt = {
|
|
139
|
+
SM: "sm"
|
|
150
140
|
}, ut = ({
|
|
151
141
|
["data-testid"]: t,
|
|
152
142
|
disabled: i = !1,
|
|
@@ -156,15 +146,15 @@ const ir = /* @__PURE__ */ Kr(rt), tt = "_rotate_1xozj_1", et = "_dash_1xozj_1",
|
|
|
156
146
|
}) => /* @__PURE__ */ o(
|
|
157
147
|
"div",
|
|
158
148
|
{
|
|
159
|
-
className: ir([
|
|
149
|
+
className: ir([F[L], F[`${L}--${a}`]]),
|
|
160
150
|
"data-testid": t,
|
|
161
151
|
...p,
|
|
162
152
|
children: /* @__PURE__ */ o("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ o(
|
|
163
153
|
"circle",
|
|
164
154
|
{
|
|
165
|
-
className: ir(
|
|
166
|
-
[
|
|
167
|
-
[
|
|
155
|
+
className: ir(F[`${L}__circle`], {
|
|
156
|
+
[F[`${L}__circle--disabled`]]: i,
|
|
157
|
+
[F[`${L}__circle--negative`]]: n
|
|
168
158
|
}),
|
|
169
159
|
cx: "25",
|
|
170
160
|
cy: "25",
|
|
@@ -234,7 +224,7 @@ const pt = /* @__PURE__ */ it(at), ot = {
|
|
|
234
224
|
"purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-negative_1acxn_160",
|
|
235
225
|
"purpur-button--text-negative": "_purpur-button--text-negative_1acxn_175",
|
|
236
226
|
"purpur-button--text": "_purpur-button--text_1acxn_175"
|
|
237
|
-
}, st = pt.bind(ot),
|
|
227
|
+
}, st = pt.bind(ot), A = "purpur-button", lt = ({
|
|
238
228
|
children: t,
|
|
239
229
|
className: i,
|
|
240
230
|
["data-testid"]: n,
|
|
@@ -244,7 +234,7 @@ const pt = /* @__PURE__ */ it(at), ot = {
|
|
|
244
234
|
loading: e = !1,
|
|
245
235
|
negative: u = !1,
|
|
246
236
|
onClick: d,
|
|
247
|
-
size:
|
|
237
|
+
size: b = "md",
|
|
248
238
|
variant: f,
|
|
249
239
|
type: z = "button",
|
|
250
240
|
...h
|
|
@@ -253,20 +243,20 @@ const pt = /* @__PURE__ */ it(at), ot = {
|
|
|
253
243
|
return null;
|
|
254
244
|
const x = st(
|
|
255
245
|
[
|
|
256
|
-
|
|
257
|
-
`${
|
|
258
|
-
`${
|
|
246
|
+
A,
|
|
247
|
+
`${A}--${u ? `${f}-negative` : f}`,
|
|
248
|
+
`${A}--${b}`
|
|
259
249
|
],
|
|
260
250
|
{
|
|
261
|
-
[`${
|
|
262
|
-
[`${
|
|
263
|
-
[`${
|
|
264
|
-
[`${
|
|
251
|
+
[`${A}--icon-only`]: r,
|
|
252
|
+
[`${A}--negative`]: u,
|
|
253
|
+
[`${A}--full-width`]: p,
|
|
254
|
+
[`${A}--disabled`]: a || e
|
|
265
255
|
},
|
|
266
256
|
i
|
|
267
|
-
),
|
|
268
|
-
a || e ?
|
|
269
|
-
},
|
|
257
|
+
), v = (g) => {
|
|
258
|
+
a || e ? g.preventDefault() : d && d(g);
|
|
259
|
+
}, m = !!h["aria-disabled"] || a || e;
|
|
270
260
|
return /* @__PURE__ */ S(
|
|
271
261
|
"button",
|
|
272
262
|
{
|
|
@@ -274,11 +264,11 @@ const pt = /* @__PURE__ */ it(at), ot = {
|
|
|
274
264
|
"data-testid": n,
|
|
275
265
|
type: z,
|
|
276
266
|
ref: s,
|
|
277
|
-
"aria-disabled":
|
|
278
|
-
onClick:
|
|
267
|
+
"aria-disabled": m,
|
|
268
|
+
onClick: v,
|
|
279
269
|
...h,
|
|
280
270
|
children: [
|
|
281
|
-
e && /* @__PURE__ */ o(ut, { size:
|
|
271
|
+
e && /* @__PURE__ */ o(ut, { size: b === Wr.LG ? "xs" : "xxs", negative: u, disabled: m }),
|
|
282
272
|
" ",
|
|
283
273
|
t
|
|
284
274
|
]
|
|
@@ -334,19 +324,19 @@ const dt = /* @__PURE__ */ ct(_t), ft = {
|
|
|
334
324
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
335
325
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
336
326
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
337
|
-
},
|
|
327
|
+
}, vt = {
|
|
338
328
|
name: "error-filled",
|
|
339
329
|
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>',
|
|
340
330
|
keywords: ["error-filled"],
|
|
341
331
|
category: "status"
|
|
342
|
-
},
|
|
332
|
+
}, gt = dt.bind(ft), ar = "purpur-icon", xt = "md", bt = (t) => t.filter((i) => Object.keys(i).length >= 1).map((i) => `${i.name}="${i.value}"`).join(" "), mt = ({ content: t = "", title: i } = {}) => {
|
|
343
333
|
const n = [
|
|
344
334
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
345
335
|
{ name: "fill", value: "currentColor" },
|
|
346
336
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
347
337
|
i ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
348
338
|
], a = i ? `<title>${i}</title>` : "";
|
|
349
|
-
return `<svg ${
|
|
339
|
+
return `<svg ${bt(n)}>${a}${t}</svg>`;
|
|
350
340
|
}, yt = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), $r = ({
|
|
351
341
|
["data-testid"]: t,
|
|
352
342
|
svg: i,
|
|
@@ -355,10 +345,10 @@ const dt = /* @__PURE__ */ ct(_t), ft = {
|
|
|
355
345
|
size: p = xt,
|
|
356
346
|
...r
|
|
357
347
|
}) => {
|
|
358
|
-
const e =
|
|
348
|
+
const e = mt({
|
|
359
349
|
content: yt(i.svg),
|
|
360
350
|
title: n
|
|
361
|
-
}), u =
|
|
351
|
+
}), u = gt(a, ar, `${ar}--${p}`);
|
|
362
352
|
return /* @__PURE__ */ o(
|
|
363
353
|
"span",
|
|
364
354
|
{
|
|
@@ -429,7 +419,7 @@ const $t = /* @__PURE__ */ ht(wt), pr = {
|
|
|
429
419
|
"aria-relevant": a,
|
|
430
420
|
...p,
|
|
431
421
|
children: [
|
|
432
|
-
/* @__PURE__ */ o($r, { svg:
|
|
422
|
+
/* @__PURE__ */ o($r, { svg: vt, size: "xs", className: pr[`${or}__icon`] }),
|
|
433
423
|
i
|
|
434
424
|
]
|
|
435
425
|
}
|
|
@@ -533,8 +523,8 @@ var Nr = { exports: {} };
|
|
|
533
523
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
534
524
|
})();
|
|
535
525
|
})(Nr);
|
|
536
|
-
var
|
|
537
|
-
const
|
|
526
|
+
var At = Nr.exports;
|
|
527
|
+
const Mt = /* @__PURE__ */ qt(At), Pt = {
|
|
538
528
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
539
529
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
540
530
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -568,26 +558,26 @@ const Or = (t) => /* @__PURE__ */ o(
|
|
|
568
558
|
}
|
|
569
559
|
);
|
|
570
560
|
Or.displayName = "IconClose";
|
|
571
|
-
const
|
|
561
|
+
const kt = Mt.bind(Pt), cr = "purpur-icon", It = "md", Ft = (t) => t.filter((i) => Object.keys(i).length >= 1).map((i) => `${i.name}="${i.value}"`).join(" "), Lt = ({ content: t = "", title: i } = {}) => {
|
|
572
562
|
const n = [
|
|
573
563
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
574
564
|
{ name: "fill", value: "currentColor" },
|
|
575
565
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
576
566
|
i ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
577
567
|
], a = i ? `<title>${i}</title>` : "";
|
|
578
|
-
return `<svg ${
|
|
579
|
-
},
|
|
568
|
+
return `<svg ${Ft(n)}>${a}${t}</svg>`;
|
|
569
|
+
}, Dt = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), tr = ({
|
|
580
570
|
["data-testid"]: t,
|
|
581
571
|
svg: i,
|
|
582
572
|
allyTitle: n,
|
|
583
573
|
className: a,
|
|
584
|
-
size: p =
|
|
574
|
+
size: p = It,
|
|
585
575
|
...r
|
|
586
576
|
}) => {
|
|
587
|
-
const e =
|
|
588
|
-
content:
|
|
577
|
+
const e = Lt({
|
|
578
|
+
content: Dt(i.svg),
|
|
589
579
|
title: n
|
|
590
|
-
}), u =
|
|
580
|
+
}), u = kt(a, cr, `${cr}--${p}`);
|
|
591
581
|
return /* @__PURE__ */ o(
|
|
592
582
|
"span",
|
|
593
583
|
{
|
|
@@ -609,40 +599,40 @@ function B() {
|
|
|
609
599
|
return t;
|
|
610
600
|
}, B.apply(null, arguments);
|
|
611
601
|
}
|
|
612
|
-
function
|
|
602
|
+
function Vt(t, i) {
|
|
613
603
|
typeof t == "function" ? t(i) : t != null && (t.current = i);
|
|
614
604
|
}
|
|
615
605
|
function Et(...t) {
|
|
616
606
|
return (i) => t.forEach(
|
|
617
|
-
(n) =>
|
|
607
|
+
(n) => Vt(n, i)
|
|
618
608
|
);
|
|
619
609
|
}
|
|
620
610
|
const qr = /* @__PURE__ */ N((t, i) => {
|
|
621
|
-
const { children: n, ...a } = t, p =
|
|
611
|
+
const { children: n, ...a } = t, p = R.toArray(n), r = p.find(Ht);
|
|
622
612
|
if (r) {
|
|
623
|
-
const e = r.props.children, u = p.map((d) => d === r ?
|
|
624
|
-
return /* @__PURE__ */
|
|
613
|
+
const e = r.props.children, u = p.map((d) => d === r ? R.count(e) > 1 ? R.only(null) : /* @__PURE__ */ Q(e) ? e.props.children : null : d);
|
|
614
|
+
return /* @__PURE__ */ T(rr, B({}, a, {
|
|
625
615
|
ref: i
|
|
626
|
-
}), /* @__PURE__ */
|
|
616
|
+
}), /* @__PURE__ */ Q(e) ? /* @__PURE__ */ gr(e, void 0, u) : null);
|
|
627
617
|
}
|
|
628
|
-
return /* @__PURE__ */
|
|
618
|
+
return /* @__PURE__ */ T(rr, B({}, a, {
|
|
629
619
|
ref: i
|
|
630
620
|
}), n);
|
|
631
621
|
});
|
|
632
622
|
qr.displayName = "Slot";
|
|
633
623
|
const rr = /* @__PURE__ */ N((t, i) => {
|
|
634
624
|
const { children: n, ...a } = t;
|
|
635
|
-
return /* @__PURE__ */
|
|
636
|
-
...
|
|
625
|
+
return /* @__PURE__ */ Q(n) ? /* @__PURE__ */ gr(n, {
|
|
626
|
+
...Rt(a, n.props),
|
|
637
627
|
ref: i ? Et(i, n.ref) : n.ref
|
|
638
|
-
}) :
|
|
628
|
+
}) : R.count(n) > 1 ? R.only(null) : null;
|
|
639
629
|
});
|
|
640
630
|
rr.displayName = "SlotClone";
|
|
641
|
-
const
|
|
642
|
-
function
|
|
643
|
-
return /* @__PURE__ */
|
|
631
|
+
const Zt = ({ children: t }) => /* @__PURE__ */ T(Hr, null, t);
|
|
632
|
+
function Ht(t) {
|
|
633
|
+
return /* @__PURE__ */ Q(t) && t.type === Zt;
|
|
644
634
|
}
|
|
645
|
-
function
|
|
635
|
+
function Rt(t, i) {
|
|
646
636
|
const n = {
|
|
647
637
|
...i
|
|
648
638
|
};
|
|
@@ -663,7 +653,7 @@ function Gt(t, i) {
|
|
|
663
653
|
...n
|
|
664
654
|
};
|
|
665
655
|
}
|
|
666
|
-
const
|
|
656
|
+
const Tt = [
|
|
667
657
|
"a",
|
|
668
658
|
"button",
|
|
669
659
|
"div",
|
|
@@ -680,12 +670,12 @@ const Ht = [
|
|
|
680
670
|
"span",
|
|
681
671
|
"svg",
|
|
682
672
|
"ul"
|
|
683
|
-
],
|
|
673
|
+
], Gt = Tt.reduce((t, i) => {
|
|
684
674
|
const n = /* @__PURE__ */ N((a, p) => {
|
|
685
675
|
const { asChild: r, ...e } = a, u = r ? qr : i;
|
|
686
676
|
return xr(() => {
|
|
687
677
|
window[Symbol.for("radix-ui")] = !0;
|
|
688
|
-
}, []), /* @__PURE__ */
|
|
678
|
+
}, []), /* @__PURE__ */ T(u, B({}, e, {
|
|
689
679
|
ref: p
|
|
690
680
|
}));
|
|
691
681
|
});
|
|
@@ -693,17 +683,17 @@ const Ht = [
|
|
|
693
683
|
...t,
|
|
694
684
|
[i]: n
|
|
695
685
|
};
|
|
696
|
-
}, {}),
|
|
686
|
+
}, {}), Qt = /* @__PURE__ */ N((t, i) => /* @__PURE__ */ T(Gt.label, B({}, t, {
|
|
697
687
|
ref: i,
|
|
698
688
|
onMouseDown: (n) => {
|
|
699
689
|
var a;
|
|
700
690
|
(a = t.onMouseDown) === null || a === void 0 || a.call(t, n), !n.defaultPrevented && n.detail > 1 && n.preventDefault();
|
|
701
691
|
}
|
|
702
|
-
}))),
|
|
703
|
-
function
|
|
692
|
+
}))), Xt = Qt;
|
|
693
|
+
function Yt(t) {
|
|
704
694
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
705
695
|
}
|
|
706
|
-
var
|
|
696
|
+
var Ar = { exports: {} };
|
|
707
697
|
/*!
|
|
708
698
|
Copyright (c) 2018 Jed Watson.
|
|
709
699
|
Licensed under the MIT License (MIT), see
|
|
@@ -738,9 +728,9 @@ var Mr = { exports: {} };
|
|
|
738
728
|
}
|
|
739
729
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
740
730
|
})();
|
|
741
|
-
})(
|
|
742
|
-
var
|
|
743
|
-
const
|
|
731
|
+
})(Ar);
|
|
732
|
+
var Jt = Ar.exports;
|
|
733
|
+
const Ut = /* @__PURE__ */ Yt(Jt), W = {
|
|
744
734
|
"purpur-label": "_purpur-label_12cfi_1",
|
|
745
735
|
"purpur-label--negative": "_purpur-label--negative_12cfi_9",
|
|
746
736
|
"purpur-label--disabled": "_purpur-label--disabled_12cfi_12"
|
|
@@ -753,7 +743,7 @@ const Yt = /* @__PURE__ */ Jt(Ut), W = {
|
|
|
753
743
|
negative: r = !1,
|
|
754
744
|
...e
|
|
755
745
|
}) => {
|
|
756
|
-
const u =
|
|
746
|
+
const u = Ut([
|
|
757
747
|
i,
|
|
758
748
|
W[K],
|
|
759
749
|
{
|
|
@@ -761,12 +751,12 @@ const Yt = /* @__PURE__ */ Jt(Ut), W = {
|
|
|
761
751
|
[W[`${K}--negative`]]: r
|
|
762
752
|
}
|
|
763
753
|
]);
|
|
764
|
-
return /* @__PURE__ */ o(
|
|
754
|
+
return /* @__PURE__ */ o(Xt, { className: u, "data-testid": a, htmlFor: n, ...e, children: t });
|
|
765
755
|
};
|
|
766
756
|
function Kt(t) {
|
|
767
757
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
768
758
|
}
|
|
769
|
-
var
|
|
759
|
+
var Mr = { exports: {} };
|
|
770
760
|
/*!
|
|
771
761
|
Copyright (c) 2018 Jed Watson.
|
|
772
762
|
Licensed under the MIT License (MIT), see
|
|
@@ -801,9 +791,9 @@ var Ar = { exports: {} };
|
|
|
801
791
|
}
|
|
802
792
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
803
793
|
})();
|
|
804
|
-
})(
|
|
805
|
-
var re =
|
|
806
|
-
const _r = /* @__PURE__ */ Kt(re), te = "_rotate_1xozj_1", ee = "_dash_1xozj_1",
|
|
794
|
+
})(Mr);
|
|
795
|
+
var re = Mr.exports;
|
|
796
|
+
const _r = /* @__PURE__ */ Kt(re), te = "_rotate_1xozj_1", ee = "_dash_1xozj_1", D = {
|
|
807
797
|
"purpur-spinner": "_purpur-spinner_1xozj_1",
|
|
808
798
|
rotate: te,
|
|
809
799
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_1xozj_4",
|
|
@@ -815,12 +805,8 @@ const _r = /* @__PURE__ */ Kt(re), te = "_rotate_1xozj_1", ee = "_dash_1xozj_1",
|
|
|
815
805
|
dash: ee,
|
|
816
806
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_1xozj_33",
|
|
817
807
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_1xozj_36"
|
|
818
|
-
},
|
|
819
|
-
|
|
820
|
-
XS: "xs",
|
|
821
|
-
SM: "sm",
|
|
822
|
-
MD: "md",
|
|
823
|
-
LG: "lg"
|
|
808
|
+
}, V = "purpur-spinner", ne = {
|
|
809
|
+
SM: "sm"
|
|
824
810
|
}, ue = ({
|
|
825
811
|
["data-testid"]: t,
|
|
826
812
|
disabled: i = !1,
|
|
@@ -830,15 +816,15 @@ const _r = /* @__PURE__ */ Kt(re), te = "_rotate_1xozj_1", ee = "_dash_1xozj_1",
|
|
|
830
816
|
}) => /* @__PURE__ */ o(
|
|
831
817
|
"div",
|
|
832
818
|
{
|
|
833
|
-
className: _r([
|
|
819
|
+
className: _r([D[V], D[`${V}--${a}`]]),
|
|
834
820
|
"data-testid": t,
|
|
835
821
|
...p,
|
|
836
822
|
children: /* @__PURE__ */ o("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ o(
|
|
837
823
|
"circle",
|
|
838
824
|
{
|
|
839
|
-
className: _r(
|
|
840
|
-
[
|
|
841
|
-
[
|
|
825
|
+
className: _r(D[`${V}__circle`], {
|
|
826
|
+
[D[`${V}__circle--disabled`]]: i,
|
|
827
|
+
[D[`${V}__circle--negative`]]: n
|
|
842
828
|
}),
|
|
843
829
|
cx: "25",
|
|
844
830
|
cy: "25",
|
|
@@ -904,7 +890,7 @@ const pe = /* @__PURE__ */ ie(ae), oe = {
|
|
|
904
890
|
"purpur-text-field__input--error": "_purpur-text-field__input--error_nj9f4_94",
|
|
905
891
|
"purpur-text-field__adornment-container": "_purpur-text-field__adornment-container_nj9f4_106",
|
|
906
892
|
"purpur-text-field__valid-icon": "_purpur-text-field__valid-icon_nj9f4_111"
|
|
907
|
-
}, se = (t) =>
|
|
893
|
+
}, se = (t) => Tr(t), $ = pe.bind(oe), _ = "purpur-text-field", le = ({
|
|
908
894
|
["data-testid"]: t,
|
|
909
895
|
className: i,
|
|
910
896
|
clearButtonAllyLabel: n,
|
|
@@ -914,20 +900,20 @@ const pe = /* @__PURE__ */ ie(ae), oe = {
|
|
|
914
900
|
errorText: e,
|
|
915
901
|
helperText: u,
|
|
916
902
|
label: d,
|
|
917
|
-
loading:
|
|
903
|
+
loading: b = !1,
|
|
918
904
|
onClear: f,
|
|
919
905
|
startAdornment: z,
|
|
920
906
|
valid: h = !1,
|
|
921
907
|
...s
|
|
922
908
|
}, x) => {
|
|
923
|
-
var
|
|
924
|
-
const
|
|
925
|
-
|
|
926
|
-
},
|
|
909
|
+
var v;
|
|
910
|
+
const m = Rr(), g = s.id ?? m, c = (l) => t ? `${t}-${l}` : void 0, P = h && !e, O = u ? `${g}-helper-text` : void 0, w = [z].filter((l) => !!l), j = (typeof s.value == "number" ? s.value !== void 0 : (v = s.value) == null ? void 0 : v.length) && !s.disabled && !s.readOnly && !b && f && n, G = se(null), X = (l) => {
|
|
911
|
+
G.current = l, typeof x == "function" ? x(l) : x && (x.current = l);
|
|
912
|
+
}, Y = () => {
|
|
927
913
|
var l;
|
|
928
|
-
f == null || f(), (l =
|
|
914
|
+
f == null || f(), (l = G.current) == null || l.focus();
|
|
929
915
|
}, C = [
|
|
930
|
-
|
|
916
|
+
b && /* @__PURE__ */ o(
|
|
931
917
|
ue,
|
|
932
918
|
{
|
|
933
919
|
disabled: s.disabled,
|
|
@@ -940,7 +926,7 @@ const pe = /* @__PURE__ */ ie(ae), oe = {
|
|
|
940
926
|
hr,
|
|
941
927
|
{
|
|
942
928
|
variant: "tertiary-purple",
|
|
943
|
-
onClick:
|
|
929
|
+
onClick: Y,
|
|
944
930
|
iconOnly: !0,
|
|
945
931
|
"aria-label": n ?? "",
|
|
946
932
|
"data-testid": c("clear-button"),
|
|
@@ -957,7 +943,7 @@ const pe = /* @__PURE__ */ ie(ae), oe = {
|
|
|
957
943
|
},
|
|
958
944
|
"valid-icon"
|
|
959
945
|
)
|
|
960
|
-
].filter((l) => !!l),
|
|
946
|
+
].filter((l) => !!l), J = $([
|
|
961
947
|
`${_}__input-container`,
|
|
962
948
|
{
|
|
963
949
|
[`${_}__input-container--start-adornment`]: w.length,
|
|
@@ -971,7 +957,7 @@ const pe = /* @__PURE__ */ ie(ae), oe = {
|
|
|
971
957
|
d && /* @__PURE__ */ o(
|
|
972
958
|
Wt,
|
|
973
959
|
{
|
|
974
|
-
htmlFor:
|
|
960
|
+
htmlFor: g,
|
|
975
961
|
className: $(`${_}__label`),
|
|
976
962
|
"data-testid": c("label"),
|
|
977
963
|
disabled: s.disabled,
|
|
@@ -980,7 +966,7 @@ const pe = /* @__PURE__ */ ie(ae), oe = {
|
|
|
980
966
|
),
|
|
981
967
|
/* @__PURE__ */ S("div", { className: $(`${_}__field-row`), children: [
|
|
982
968
|
!!a && a,
|
|
983
|
-
/* @__PURE__ */ S("div", { className:
|
|
969
|
+
/* @__PURE__ */ S("div", { className: J, children: [
|
|
984
970
|
!!w.length && /* @__PURE__ */ o(
|
|
985
971
|
"div",
|
|
986
972
|
{
|
|
@@ -993,8 +979,8 @@ const pe = /* @__PURE__ */ ie(ae), oe = {
|
|
|
993
979
|
"input",
|
|
994
980
|
{
|
|
995
981
|
...s,
|
|
996
|
-
id:
|
|
997
|
-
ref:
|
|
982
|
+
id: g,
|
|
983
|
+
ref: X,
|
|
998
984
|
"data-testid": c("input"),
|
|
999
985
|
"aria-describedby": s["aria-describedby"] || O,
|
|
1000
986
|
"aria-invalid": s["aria-invalid"] || !!e,
|
|
@@ -1067,7 +1053,7 @@ var Br = { exports: {} };
|
|
|
1067
1053
|
})();
|
|
1068
1054
|
})(Br);
|
|
1069
1055
|
var _e = Br.exports;
|
|
1070
|
-
const
|
|
1056
|
+
const kr = /* @__PURE__ */ ce(_e), de = {
|
|
1071
1057
|
"purpur-quantity-selector": "_purpur-quantity-selector_lzxe3_1",
|
|
1072
1058
|
"purpur-quantity-selector--full-width": "_purpur-quantity-selector--full-width_lzxe3_21",
|
|
1073
1059
|
"purpur-quantity-selector--loading": "_purpur-quantity-selector--loading_lzxe3_27",
|
|
@@ -1079,14 +1065,12 @@ const Dr = /* @__PURE__ */ ce(_e), de = {
|
|
|
1079
1065
|
"purpur-quantity-selector__spinner--full-width": "_purpur-quantity-selector__spinner--full-width_lzxe3_53",
|
|
1080
1066
|
"purpur-quantity-selector__spinner--separated": "_purpur-quantity-selector__spinner--separated_lzxe3_57"
|
|
1081
1067
|
}, fe = {
|
|
1082
|
-
SM: "sm",
|
|
1083
|
-
MD: "md",
|
|
1084
1068
|
LG: "lg"
|
|
1085
1069
|
};
|
|
1086
|
-
function
|
|
1070
|
+
function ve(t) {
|
|
1087
1071
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
1088
1072
|
}
|
|
1089
|
-
var
|
|
1073
|
+
var Ir = { exports: {} };
|
|
1090
1074
|
/*!
|
|
1091
1075
|
Copyright (c) 2018 Jed Watson.
|
|
1092
1076
|
Licensed under the MIT License (MIT), see
|
|
@@ -1121,9 +1105,9 @@ var Lr = { exports: {} };
|
|
|
1121
1105
|
}
|
|
1122
1106
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
1123
1107
|
})();
|
|
1124
|
-
})(
|
|
1125
|
-
var
|
|
1126
|
-
const dr = /* @__PURE__ */ ge
|
|
1108
|
+
})(Ir);
|
|
1109
|
+
var ge = Ir.exports;
|
|
1110
|
+
const dr = /* @__PURE__ */ ve(ge), xe = "_rotate_1xozj_1", be = "_dash_1xozj_1", E = {
|
|
1127
1111
|
"purpur-spinner": "_purpur-spinner_1xozj_1",
|
|
1128
1112
|
rotate: xe,
|
|
1129
1113
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_1xozj_4",
|
|
@@ -1132,33 +1116,29 @@ const dr = /* @__PURE__ */ ge(ve), xe = "_rotate_1xozj_1", me = "_dash_1xozj_1",
|
|
|
1132
1116
|
"purpur-spinner--md": "_purpur-spinner--md_1xozj_16",
|
|
1133
1117
|
"purpur-spinner--lg": "_purpur-spinner--lg_1xozj_20",
|
|
1134
1118
|
"purpur-spinner__circle": "_purpur-spinner__circle_1xozj_24",
|
|
1135
|
-
dash:
|
|
1119
|
+
dash: be,
|
|
1136
1120
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_1xozj_33",
|
|
1137
1121
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_1xozj_36"
|
|
1138
|
-
},
|
|
1139
|
-
|
|
1140
|
-
XS: "xs",
|
|
1141
|
-
SM: "sm",
|
|
1142
|
-
MD: "md",
|
|
1143
|
-
LG: "lg"
|
|
1122
|
+
}, Z = "purpur-spinner", me = {
|
|
1123
|
+
SM: "sm"
|
|
1144
1124
|
}, ye = ({
|
|
1145
1125
|
["data-testid"]: t,
|
|
1146
1126
|
disabled: i = !1,
|
|
1147
1127
|
negative: n = !1,
|
|
1148
|
-
size: a =
|
|
1128
|
+
size: a = me.SM,
|
|
1149
1129
|
...p
|
|
1150
1130
|
}) => /* @__PURE__ */ o(
|
|
1151
1131
|
"div",
|
|
1152
1132
|
{
|
|
1153
|
-
className: dr([E[
|
|
1133
|
+
className: dr([E[Z], E[`${Z}--${a}`]]),
|
|
1154
1134
|
"data-testid": t,
|
|
1155
1135
|
...p,
|
|
1156
1136
|
children: /* @__PURE__ */ o("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ o(
|
|
1157
1137
|
"circle",
|
|
1158
1138
|
{
|
|
1159
|
-
className: dr(E[`${
|
|
1160
|
-
[E[`${
|
|
1161
|
-
[E[`${
|
|
1139
|
+
className: dr(E[`${Z}__circle`], {
|
|
1140
|
+
[E[`${Z}__circle--disabled`]]: i,
|
|
1141
|
+
[E[`${Z}__circle--negative`]]: n
|
|
1162
1142
|
}),
|
|
1163
1143
|
cx: "25",
|
|
1164
1144
|
cy: "25",
|
|
@@ -1170,7 +1150,7 @@ const dr = /* @__PURE__ */ ge(ve), xe = "_rotate_1xozj_1", me = "_dash_1xozj_1",
|
|
|
1170
1150
|
function he(t) {
|
|
1171
1151
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
1172
1152
|
}
|
|
1173
|
-
var
|
|
1153
|
+
var Fr = { exports: {} };
|
|
1174
1154
|
/*!
|
|
1175
1155
|
Copyright (c) 2018 Jed Watson.
|
|
1176
1156
|
Licensed under the MIT License (MIT), see
|
|
@@ -1205,8 +1185,8 @@ var kr = { exports: {} };
|
|
|
1205
1185
|
}
|
|
1206
1186
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
1207
1187
|
})();
|
|
1208
|
-
})(
|
|
1209
|
-
var we =
|
|
1188
|
+
})(Fr);
|
|
1189
|
+
var we = Fr.exports;
|
|
1210
1190
|
const $e = /* @__PURE__ */ he(we), je = {
|
|
1211
1191
|
"purpur-button": "_purpur-button_1acxn_1",
|
|
1212
1192
|
"purpur-button--sm": "_purpur-button--sm_1acxn_33",
|
|
@@ -1228,7 +1208,7 @@ const $e = /* @__PURE__ */ he(we), je = {
|
|
|
1228
1208
|
"purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-negative_1acxn_160",
|
|
1229
1209
|
"purpur-button--text-negative": "_purpur-button--text-negative_1acxn_175",
|
|
1230
1210
|
"purpur-button--text": "_purpur-button--text_1acxn_175"
|
|
1231
|
-
}, Se = $e.bind(je),
|
|
1211
|
+
}, Se = $e.bind(je), M = "purpur-button", Ne = ({
|
|
1232
1212
|
children: t,
|
|
1233
1213
|
className: i,
|
|
1234
1214
|
["data-testid"]: n,
|
|
@@ -1238,7 +1218,7 @@ const $e = /* @__PURE__ */ he(we), je = {
|
|
|
1238
1218
|
loading: e = !1,
|
|
1239
1219
|
negative: u = !1,
|
|
1240
1220
|
onClick: d,
|
|
1241
|
-
size:
|
|
1221
|
+
size: b = "md",
|
|
1242
1222
|
variant: f,
|
|
1243
1223
|
type: z = "button",
|
|
1244
1224
|
...h
|
|
@@ -1247,20 +1227,20 @@ const $e = /* @__PURE__ */ he(we), je = {
|
|
|
1247
1227
|
return null;
|
|
1248
1228
|
const x = Se(
|
|
1249
1229
|
[
|
|
1250
|
-
|
|
1251
|
-
`${
|
|
1252
|
-
`${
|
|
1230
|
+
M,
|
|
1231
|
+
`${M}--${u ? `${f}-negative` : f}`,
|
|
1232
|
+
`${M}--${b}`
|
|
1253
1233
|
],
|
|
1254
1234
|
{
|
|
1255
|
-
[`${
|
|
1256
|
-
[`${
|
|
1257
|
-
[`${
|
|
1258
|
-
[`${
|
|
1235
|
+
[`${M}--icon-only`]: r,
|
|
1236
|
+
[`${M}--negative`]: u,
|
|
1237
|
+
[`${M}--full-width`]: p,
|
|
1238
|
+
[`${M}--disabled`]: a || e
|
|
1259
1239
|
},
|
|
1260
1240
|
i
|
|
1261
|
-
),
|
|
1262
|
-
a || e ?
|
|
1263
|
-
},
|
|
1241
|
+
), v = (g) => {
|
|
1242
|
+
a || e ? g.preventDefault() : d && d(g);
|
|
1243
|
+
}, m = !!h["aria-disabled"] || a || e;
|
|
1264
1244
|
return /* @__PURE__ */ S(
|
|
1265
1245
|
"button",
|
|
1266
1246
|
{
|
|
@@ -1268,22 +1248,22 @@ const $e = /* @__PURE__ */ he(we), je = {
|
|
|
1268
1248
|
"data-testid": n,
|
|
1269
1249
|
type: z,
|
|
1270
1250
|
ref: s,
|
|
1271
|
-
"aria-disabled":
|
|
1272
|
-
onClick:
|
|
1251
|
+
"aria-disabled": m,
|
|
1252
|
+
onClick: v,
|
|
1273
1253
|
...h,
|
|
1274
1254
|
children: [
|
|
1275
|
-
e && /* @__PURE__ */ o(ye, { size:
|
|
1255
|
+
e && /* @__PURE__ */ o(ye, { size: b === fe.LG ? "xs" : "xxs", negative: u, disabled: m }),
|
|
1276
1256
|
" ",
|
|
1277
1257
|
t
|
|
1278
1258
|
]
|
|
1279
1259
|
}
|
|
1280
1260
|
);
|
|
1281
|
-
},
|
|
1282
|
-
|
|
1261
|
+
}, Lr = N(Ne);
|
|
1262
|
+
Lr.displayName = "Button";
|
|
1283
1263
|
function ze(t) {
|
|
1284
1264
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
1285
1265
|
}
|
|
1286
|
-
var
|
|
1266
|
+
var Dr = { exports: {} };
|
|
1287
1267
|
/*!
|
|
1288
1268
|
Copyright (c) 2018 Jed Watson.
|
|
1289
1269
|
Licensed under the MIT License (MIT), see
|
|
@@ -1318,9 +1298,9 @@ var Xr = { exports: {} };
|
|
|
1318
1298
|
}
|
|
1319
1299
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
1320
1300
|
})();
|
|
1321
|
-
})(
|
|
1322
|
-
var Oe =
|
|
1323
|
-
const qe = /* @__PURE__ */ ze(Oe),
|
|
1301
|
+
})(Dr);
|
|
1302
|
+
var Oe = Dr.exports;
|
|
1303
|
+
const qe = /* @__PURE__ */ ze(Oe), Ae = {
|
|
1324
1304
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
1325
1305
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
1326
1306
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -1328,7 +1308,7 @@ const qe = /* @__PURE__ */ ze(Oe), Me = {
|
|
|
1328
1308
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
1329
1309
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
1330
1310
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
1331
|
-
},
|
|
1311
|
+
}, Me = {
|
|
1332
1312
|
name: "minus",
|
|
1333
1313
|
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>',
|
|
1334
1314
|
keywords: ["minus"],
|
|
@@ -1338,14 +1318,14 @@ const qe = /* @__PURE__ */ ze(Oe), Me = {
|
|
|
1338
1318
|
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>',
|
|
1339
1319
|
keywords: ["plus"],
|
|
1340
1320
|
category: "utility"
|
|
1341
|
-
},
|
|
1321
|
+
}, Vr = (t) => /* @__PURE__ */ o(
|
|
1342
1322
|
er,
|
|
1343
1323
|
{
|
|
1344
1324
|
...t,
|
|
1345
|
-
svg:
|
|
1325
|
+
svg: Me
|
|
1346
1326
|
}
|
|
1347
1327
|
);
|
|
1348
|
-
|
|
1328
|
+
Vr.displayName = "IconMinus";
|
|
1349
1329
|
const Er = (t) => /* @__PURE__ */ o(
|
|
1350
1330
|
er,
|
|
1351
1331
|
{
|
|
@@ -1354,15 +1334,15 @@ const Er = (t) => /* @__PURE__ */ o(
|
|
|
1354
1334
|
}
|
|
1355
1335
|
);
|
|
1356
1336
|
Er.displayName = "IconPlus";
|
|
1357
|
-
const Ce = qe.bind(
|
|
1337
|
+
const Ce = qe.bind(Ae), fr = "purpur-icon", Be = "md", ke = (t) => t.filter((i) => Object.keys(i).length >= 1).map((i) => `${i.name}="${i.value}"`).join(" "), Ie = ({ content: t = "", title: i } = {}) => {
|
|
1358
1338
|
const n = [
|
|
1359
1339
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
1360
1340
|
{ name: "fill", value: "currentColor" },
|
|
1361
1341
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
1362
1342
|
i ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
1363
1343
|
], a = i ? `<title>${i}</title>` : "";
|
|
1364
|
-
return `<svg ${
|
|
1365
|
-
},
|
|
1344
|
+
return `<svg ${ke(n)}>${a}${t}</svg>`;
|
|
1345
|
+
}, Fe = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), er = ({
|
|
1366
1346
|
["data-testid"]: t,
|
|
1367
1347
|
svg: i,
|
|
1368
1348
|
allyTitle: n,
|
|
@@ -1370,8 +1350,8 @@ const Ce = qe.bind(Me), fr = "purpur-icon", Be = "md", De = (t) => t.filter((i)
|
|
|
1370
1350
|
size: p = Be,
|
|
1371
1351
|
...r
|
|
1372
1352
|
}) => {
|
|
1373
|
-
const e =
|
|
1374
|
-
content:
|
|
1353
|
+
const e = Ie({
|
|
1354
|
+
content: Fe(i.svg),
|
|
1375
1355
|
title: n
|
|
1376
1356
|
}), u = Ce(a, fr, `${fr}--${p}`);
|
|
1377
1357
|
return /* @__PURE__ */ o(
|
|
@@ -1386,13 +1366,13 @@ const Ce = qe.bind(Me), fr = "purpur-icon", Be = "md", De = (t) => t.filter((i)
|
|
|
1386
1366
|
);
|
|
1387
1367
|
};
|
|
1388
1368
|
er.displayName = "Icon";
|
|
1389
|
-
const
|
|
1369
|
+
const Le = {
|
|
1390
1370
|
"purpur-quantity-selector-button": "_purpur-quantity-selector-button_qjlbs_1",
|
|
1391
1371
|
"purpur-quantity-selector-button--gap-left": "_purpur-quantity-selector-button--gap-left_qjlbs_4",
|
|
1392
1372
|
"purpur-quantity-selector-button--gap-right": "_purpur-quantity-selector-button--gap-right_qjlbs_7",
|
|
1393
1373
|
"purpur-quantity-selector-button--no-gap-right": "_purpur-quantity-selector-button--no-gap-right_qjlbs_10",
|
|
1394
1374
|
"purpur-quantity-selector-button--no-gap-left": "_purpur-quantity-selector-button--no-gap-left_qjlbs_13"
|
|
1395
|
-
},
|
|
1375
|
+
}, De = kr.bind(Le), H = "purpur-quantity-selector-button", Ve = ({
|
|
1396
1376
|
["data-testid"]: t,
|
|
1397
1377
|
disabled: i,
|
|
1398
1378
|
hasGap: n,
|
|
@@ -1400,17 +1380,17 @@ const Ie = {
|
|
|
1400
1380
|
buttonType: p,
|
|
1401
1381
|
onClick: r
|
|
1402
1382
|
}) => {
|
|
1403
|
-
const e =
|
|
1404
|
-
|
|
1383
|
+
const e = De([
|
|
1384
|
+
H,
|
|
1405
1385
|
{
|
|
1406
|
-
[`${
|
|
1407
|
-
[`${
|
|
1408
|
-
[`${
|
|
1409
|
-
[`${
|
|
1386
|
+
[`${H}--gap-left`]: n && p === "decrement",
|
|
1387
|
+
[`${H}--gap-right`]: n && p === "increment",
|
|
1388
|
+
[`${H}--no-gap-left`]: !n && p === "decrement",
|
|
1389
|
+
[`${H}--no-gap-right`]: !n && p === "increment"
|
|
1410
1390
|
}
|
|
1411
1391
|
]);
|
|
1412
1392
|
return /* @__PURE__ */ o(
|
|
1413
|
-
|
|
1393
|
+
Lr,
|
|
1414
1394
|
{
|
|
1415
1395
|
"data-testid": t,
|
|
1416
1396
|
className: e,
|
|
@@ -1421,10 +1401,10 @@ const Ie = {
|
|
|
1421
1401
|
iconOnly: !0,
|
|
1422
1402
|
disabled: i,
|
|
1423
1403
|
tabIndex: -1,
|
|
1424
|
-
children: p === "increment" ? /* @__PURE__ */ o(Er, { size: "xs" }) : /* @__PURE__ */ o(
|
|
1404
|
+
children: p === "increment" ? /* @__PURE__ */ o(Er, { size: "xs" }) : /* @__PURE__ */ o(Vr, { size: "xs" })
|
|
1425
1405
|
}
|
|
1426
1406
|
);
|
|
1427
|
-
},
|
|
1407
|
+
}, vr = kr.bind(de), Te = ["attached", "separated"], Ge = ["primary", "secondary"], y = "purpur-quantity-selector", Ee = N(
|
|
1428
1408
|
({
|
|
1429
1409
|
["data-testid"]: t,
|
|
1430
1410
|
className: i,
|
|
@@ -1435,22 +1415,22 @@ const Ie = {
|
|
|
1435
1415
|
fullWidth: e,
|
|
1436
1416
|
disabled: u,
|
|
1437
1417
|
loading: d,
|
|
1438
|
-
minValue:
|
|
1418
|
+
minValue: b,
|
|
1439
1419
|
maxValue: f,
|
|
1440
1420
|
...z
|
|
1441
1421
|
}, h) => {
|
|
1442
|
-
const [s, x] = nr(r ?? 0), [
|
|
1422
|
+
const [s, x] = nr(r ?? 0), [v, m] = nr(s), g = (l) => t ? `${t}-${l}` : void 0, c = u || d, P = Math.max(b ?? 0, 0), O = f ?? Number.MAX_SAFE_INTEGER, w = s === O, j = s === P;
|
|
1443
1423
|
xr(() => {
|
|
1444
|
-
if (
|
|
1424
|
+
if (v === s)
|
|
1445
1425
|
return;
|
|
1446
1426
|
const l = setTimeout(() => {
|
|
1447
|
-
x(
|
|
1427
|
+
x(v), p(v);
|
|
1448
1428
|
}, 300);
|
|
1449
1429
|
return () => {
|
|
1450
1430
|
clearTimeout(l);
|
|
1451
1431
|
};
|
|
1452
|
-
}, [
|
|
1453
|
-
const
|
|
1432
|
+
}, [v, s, p]);
|
|
1433
|
+
const G = vr([
|
|
1454
1434
|
i,
|
|
1455
1435
|
y,
|
|
1456
1436
|
{
|
|
@@ -1461,32 +1441,32 @@ const Ie = {
|
|
|
1461
1441
|
[`${y}--full-width`]: e,
|
|
1462
1442
|
[`${y}--loading`]: d
|
|
1463
1443
|
}
|
|
1464
|
-
]),
|
|
1444
|
+
]), X = (l) => {
|
|
1465
1445
|
if (!/^[0-9]*$/.test(l.target.value))
|
|
1466
1446
|
return;
|
|
1467
|
-
const
|
|
1468
|
-
|
|
1469
|
-
},
|
|
1447
|
+
const U = +l.target.value;
|
|
1448
|
+
U < P || U > O || m(U);
|
|
1449
|
+
}, Y = (l) => {
|
|
1470
1450
|
const q = l === "increment" ? s + 1 : s - 1;
|
|
1471
|
-
q < 0 || (x(q),
|
|
1451
|
+
q < 0 || (x(q), m(q), p(q));
|
|
1472
1452
|
}, C = (l) => {
|
|
1473
1453
|
const q = l === "increment" && w || l === "decrement" && j;
|
|
1474
1454
|
return /* @__PURE__ */ o(
|
|
1475
|
-
|
|
1455
|
+
Ve,
|
|
1476
1456
|
{
|
|
1477
|
-
"data-testid":
|
|
1457
|
+
"data-testid": g("button-" + l),
|
|
1478
1458
|
variant: a,
|
|
1479
1459
|
buttonType: l,
|
|
1480
1460
|
hasGap: n === "separated",
|
|
1481
|
-
onClick:
|
|
1461
|
+
onClick: Y,
|
|
1482
1462
|
disabled: c || q
|
|
1483
1463
|
}
|
|
1484
1464
|
);
|
|
1485
|
-
},
|
|
1465
|
+
}, J = /* @__PURE__ */ S(Zr, { children: [
|
|
1486
1466
|
d && /* @__PURE__ */ o(
|
|
1487
1467
|
"div",
|
|
1488
1468
|
{
|
|
1489
|
-
className:
|
|
1469
|
+
className: vr([
|
|
1490
1470
|
`${y}__spinner`,
|
|
1491
1471
|
{
|
|
1492
1472
|
[`${y}__spinner--full-width`]: e,
|
|
@@ -1494,11 +1474,11 @@ const Ie = {
|
|
|
1494
1474
|
}
|
|
1495
1475
|
]),
|
|
1496
1476
|
children: /* @__PURE__ */ o(
|
|
1497
|
-
|
|
1477
|
+
Ur,
|
|
1498
1478
|
{
|
|
1499
1479
|
disabled: c,
|
|
1500
1480
|
size: "xs",
|
|
1501
|
-
"data-testid":
|
|
1481
|
+
"data-testid": g("spinner")
|
|
1502
1482
|
},
|
|
1503
1483
|
"spinner"
|
|
1504
1484
|
)
|
|
@@ -1509,13 +1489,13 @@ const Ie = {
|
|
|
1509
1489
|
return /* @__PURE__ */ o(
|
|
1510
1490
|
Cr,
|
|
1511
1491
|
{
|
|
1512
|
-
value:
|
|
1492
|
+
value: v,
|
|
1513
1493
|
type: "number",
|
|
1514
1494
|
ref: h,
|
|
1515
|
-
className:
|
|
1495
|
+
className: G,
|
|
1516
1496
|
"data-testid": t,
|
|
1517
|
-
onChange:
|
|
1518
|
-
beforeField:
|
|
1497
|
+
onChange: X,
|
|
1498
|
+
beforeField: J,
|
|
1519
1499
|
afterField: C("increment"),
|
|
1520
1500
|
disabled: c,
|
|
1521
1501
|
min: P,
|
|
@@ -1528,7 +1508,7 @@ const Ie = {
|
|
|
1528
1508
|
Ee.displayName = "QuantitySelector";
|
|
1529
1509
|
export {
|
|
1530
1510
|
Ee as QuantitySelector,
|
|
1531
|
-
|
|
1532
|
-
|
|
1511
|
+
Ge as quantitySelectorButtonVariants,
|
|
1512
|
+
Te as quantitySelectorVariants
|
|
1533
1513
|
};
|
|
1534
1514
|
//# sourceMappingURL=quantity-selector.es.js.map
|