@purpurds/quantity-selector 7.4.0 → 7.5.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/chunked-rush-logs/quantity-selector.ci_build.chunks.jsonl +4 -4
- package/.rush/temp/chunked-rush-logs/quantity-selector.test_unit.chunks.jsonl +3 -3
- package/.rush/temp/operation/ci_build/all.log +4 -4
- package/.rush/temp/operation/ci_build/log-chunks.jsonl +4 -4
- package/.rush/temp/operation/ci_build/state.json +1 -1
- package/.rush/temp/operation/test_unit/all.log +3 -3
- package/.rush/temp/operation/test_unit/log-chunks.jsonl +3 -3
- package/.rush/temp/operation/test_unit/state.json +1 -1
- 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.d.ts +4 -0
- package/dist/quantity-selector.d.ts.map +1 -1
- package/dist/quantity-selector.es.js +320 -313
- package/dist/quantity-selector.es.js.map +1 -1
- package/package.json +5 -5
- package/src/quantity-selector.tsx +9 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import { forwardRef as
|
|
1
|
+
import { jsx as o, jsxs as j, Fragment as Wr } from "react/jsx-runtime";
|
|
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";
|
|
4
4
|
import "react-dom";
|
|
5
|
-
function
|
|
5
|
+
function ot(t) {
|
|
6
6
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
7
7
|
}
|
|
8
8
|
var ir = { exports: {} };
|
|
@@ -12,7 +12,7 @@ var ir = { exports: {} };
|
|
|
12
12
|
http://jedwatson.github.io/classnames
|
|
13
13
|
*/
|
|
14
14
|
var pr;
|
|
15
|
-
function
|
|
15
|
+
function lt() {
|
|
16
16
|
return pr || (pr = 1, function(t) {
|
|
17
17
|
(function() {
|
|
18
18
|
var i = {}.hasOwnProperty;
|
|
@@ -44,39 +44,39 @@ function at() {
|
|
|
44
44
|
})();
|
|
45
45
|
}(ir)), ir.exports;
|
|
46
46
|
}
|
|
47
|
-
var
|
|
48
|
-
const ar = /* @__PURE__ */
|
|
47
|
+
var st = lt();
|
|
48
|
+
const ar = /* @__PURE__ */ ot(st), ct = "_rotate_12t9p_1", _t = "_dash_12t9p_1", L = {
|
|
49
49
|
"purpur-spinner": "_purpur-spinner_12t9p_2",
|
|
50
|
-
rotate:
|
|
50
|
+
rotate: ct,
|
|
51
51
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_12t9p_6",
|
|
52
52
|
"purpur-spinner--xs": "_purpur-spinner--xs_12t9p_10",
|
|
53
53
|
"purpur-spinner--sm": "_purpur-spinner--sm_12t9p_14",
|
|
54
54
|
"purpur-spinner--md": "_purpur-spinner--md_12t9p_18",
|
|
55
55
|
"purpur-spinner--lg": "_purpur-spinner--lg_12t9p_22",
|
|
56
56
|
"purpur-spinner__circle": "_purpur-spinner__circle_12t9p_26",
|
|
57
|
-
dash:
|
|
57
|
+
dash: _t,
|
|
58
58
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_12t9p_41",
|
|
59
59
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_12t9p_44"
|
|
60
|
-
},
|
|
60
|
+
}, E = "purpur-spinner", dt = {
|
|
61
61
|
SM: "sm"
|
|
62
|
-
},
|
|
62
|
+
}, ft = ({
|
|
63
63
|
["data-testid"]: t,
|
|
64
64
|
disabled: i = !1,
|
|
65
65
|
negative: n = !1,
|
|
66
|
-
size: a =
|
|
66
|
+
size: a = dt.SM,
|
|
67
67
|
...p
|
|
68
68
|
}) => /* @__PURE__ */ o(
|
|
69
69
|
"div",
|
|
70
70
|
{
|
|
71
|
-
className: ar([
|
|
71
|
+
className: ar([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(
|
|
78
|
-
[
|
|
79
|
-
[
|
|
77
|
+
className: ar(L[`${E}__circle`], {
|
|
78
|
+
[L[`${E}__circle--disabled`]]: i,
|
|
79
|
+
[L[`${E}__circle--negative`]]: n
|
|
80
80
|
}),
|
|
81
81
|
cx: "25",
|
|
82
82
|
cy: "25",
|
|
@@ -84,10 +84,10 @@ const ar = /* @__PURE__ */ pt(ot), lt = "_rotate_12t9p_1", st = "_dash_12t9p_1",
|
|
|
84
84
|
}
|
|
85
85
|
) })
|
|
86
86
|
}
|
|
87
|
-
),
|
|
87
|
+
), vt = {
|
|
88
88
|
LG: "lg"
|
|
89
89
|
};
|
|
90
|
-
function
|
|
90
|
+
function gt(t) {
|
|
91
91
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
92
92
|
}
|
|
93
93
|
var or = { exports: {} };
|
|
@@ -97,7 +97,7 @@ var or = { exports: {} };
|
|
|
97
97
|
http://jedwatson.github.io/classnames
|
|
98
98
|
*/
|
|
99
99
|
var lr;
|
|
100
|
-
function
|
|
100
|
+
function bt() {
|
|
101
101
|
return lr || (lr = 1, function(t) {
|
|
102
102
|
(function() {
|
|
103
103
|
var i = {}.hasOwnProperty;
|
|
@@ -129,39 +129,39 @@ function vt() {
|
|
|
129
129
|
})();
|
|
130
130
|
}(or)), or.exports;
|
|
131
131
|
}
|
|
132
|
-
var
|
|
133
|
-
const sr = /* @__PURE__ */
|
|
132
|
+
var mt = bt();
|
|
133
|
+
const sr = /* @__PURE__ */ gt(mt), yt = "_rotate_12t9p_1", xt = "_dash_12t9p_1", F = {
|
|
134
134
|
"purpur-spinner": "_purpur-spinner_12t9p_2",
|
|
135
|
-
rotate:
|
|
135
|
+
rotate: yt,
|
|
136
136
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_12t9p_6",
|
|
137
137
|
"purpur-spinner--xs": "_purpur-spinner--xs_12t9p_10",
|
|
138
138
|
"purpur-spinner--sm": "_purpur-spinner--sm_12t9p_14",
|
|
139
139
|
"purpur-spinner--md": "_purpur-spinner--md_12t9p_18",
|
|
140
140
|
"purpur-spinner--lg": "_purpur-spinner--lg_12t9p_22",
|
|
141
141
|
"purpur-spinner__circle": "_purpur-spinner__circle_12t9p_26",
|
|
142
|
-
dash:
|
|
142
|
+
dash: xt,
|
|
143
143
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_12t9p_41",
|
|
144
144
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_12t9p_44"
|
|
145
|
-
},
|
|
145
|
+
}, V = "purpur-spinner", ht = {
|
|
146
146
|
SM: "sm"
|
|
147
|
-
},
|
|
147
|
+
}, wt = ({
|
|
148
148
|
["data-testid"]: t,
|
|
149
149
|
disabled: i = !1,
|
|
150
150
|
negative: n = !1,
|
|
151
|
-
size: a =
|
|
151
|
+
size: a = ht.SM,
|
|
152
152
|
...p
|
|
153
153
|
}) => /* @__PURE__ */ o(
|
|
154
154
|
"div",
|
|
155
155
|
{
|
|
156
|
-
className: sr([
|
|
156
|
+
className: sr([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(
|
|
163
|
-
[
|
|
164
|
-
[
|
|
162
|
+
className: sr(F[`${V}__circle`], {
|
|
163
|
+
[F[`${V}__circle--disabled`]]: i,
|
|
164
|
+
[F[`${V}__circle--negative`]]: n
|
|
165
165
|
}),
|
|
166
166
|
cx: "25",
|
|
167
167
|
cy: "25",
|
|
@@ -170,7 +170,7 @@ const sr = /* @__PURE__ */ ft(gt), bt = "_rotate_12t9p_1", mt = "_dash_12t9p_1",
|
|
|
170
170
|
) })
|
|
171
171
|
}
|
|
172
172
|
);
|
|
173
|
-
function
|
|
173
|
+
function $t(t) {
|
|
174
174
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
175
175
|
}
|
|
176
176
|
var cr = { exports: {} };
|
|
@@ -180,7 +180,7 @@ var cr = { exports: {} };
|
|
|
180
180
|
http://jedwatson.github.io/classnames
|
|
181
181
|
*/
|
|
182
182
|
var _r;
|
|
183
|
-
function
|
|
183
|
+
function qt() {
|
|
184
184
|
return _r || (_r = 1, function(t) {
|
|
185
185
|
(function() {
|
|
186
186
|
var i = {}.hasOwnProperty;
|
|
@@ -212,8 +212,8 @@ function wt() {
|
|
|
212
212
|
})();
|
|
213
213
|
}(cr)), cr.exports;
|
|
214
214
|
}
|
|
215
|
-
var
|
|
216
|
-
const
|
|
215
|
+
var St = qt();
|
|
216
|
+
const Nt = /* @__PURE__ */ $t(St), Ot = {
|
|
217
217
|
"purpur-button": "_purpur-button_w455q_1",
|
|
218
218
|
"purpur-button--xs": "_purpur-button--xs_w455q_33",
|
|
219
219
|
"purpur-button--icon-only": "_purpur-button--icon-only_w455q_36",
|
|
@@ -235,7 +235,7 @@ const qt = /* @__PURE__ */ ht($t), St = {
|
|
|
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
|
-
},
|
|
238
|
+
}, jt = Nt.bind(Ot), k = "purpur-button", At = ({
|
|
239
239
|
children: t,
|
|
240
240
|
className: i,
|
|
241
241
|
["data-testid"]: n,
|
|
@@ -247,47 +247,47 @@ const qt = /* @__PURE__ */ ht($t), St = {
|
|
|
247
247
|
onClick: f,
|
|
248
248
|
size: b = "md",
|
|
249
249
|
variant: v,
|
|
250
|
-
type:
|
|
251
|
-
|
|
250
|
+
type: M = "button",
|
|
251
|
+
...q
|
|
252
252
|
}, l) => {
|
|
253
253
|
if (r && v === "destructive")
|
|
254
254
|
return null;
|
|
255
|
-
const
|
|
255
|
+
const x = jt(
|
|
256
256
|
[
|
|
257
|
-
|
|
258
|
-
`${
|
|
259
|
-
`${
|
|
257
|
+
k,
|
|
258
|
+
`${k}--${u ? `${v}-negative` : v}`,
|
|
259
|
+
`${k}--${b}`
|
|
260
260
|
],
|
|
261
261
|
{
|
|
262
|
-
[`${
|
|
263
|
-
[`${
|
|
264
|
-
[`${
|
|
265
|
-
[`${
|
|
262
|
+
[`${k}--icon-only`]: r,
|
|
263
|
+
[`${k}--negative`]: u,
|
|
264
|
+
[`${k}--full-width`]: p,
|
|
265
|
+
[`${k}--disabled`]: a || e
|
|
266
266
|
},
|
|
267
267
|
i
|
|
268
|
-
),
|
|
268
|
+
), A = (m) => {
|
|
269
269
|
a || e ? m.preventDefault() : f && f(m);
|
|
270
|
-
},
|
|
271
|
-
return /* @__PURE__ */
|
|
270
|
+
}, S = !!q["aria-disabled"] || a || e;
|
|
271
|
+
return /* @__PURE__ */ j(
|
|
272
272
|
"button",
|
|
273
273
|
{
|
|
274
|
-
className:
|
|
274
|
+
className: x,
|
|
275
275
|
"data-testid": n,
|
|
276
|
-
type:
|
|
276
|
+
type: M,
|
|
277
277
|
ref: l,
|
|
278
|
-
"aria-disabled":
|
|
279
|
-
onClick:
|
|
280
|
-
|
|
278
|
+
"aria-disabled": S,
|
|
279
|
+
onClick: A,
|
|
280
|
+
...q,
|
|
281
281
|
children: [
|
|
282
|
-
e && /* @__PURE__ */ o(
|
|
282
|
+
e && /* @__PURE__ */ o(wt, { size: b === vt.LG ? "xs" : "xxs", negative: u, disabled: S }),
|
|
283
283
|
" ",
|
|
284
284
|
t
|
|
285
285
|
]
|
|
286
286
|
}
|
|
287
287
|
);
|
|
288
|
-
},
|
|
289
|
-
|
|
290
|
-
function
|
|
288
|
+
}, Gr = U(At);
|
|
289
|
+
Gr.displayName = "Button";
|
|
290
|
+
function Mt(t) {
|
|
291
291
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
292
292
|
}
|
|
293
293
|
var dr = { exports: {} };
|
|
@@ -297,7 +297,7 @@ var dr = { exports: {} };
|
|
|
297
297
|
http://jedwatson.github.io/classnames
|
|
298
298
|
*/
|
|
299
299
|
var fr;
|
|
300
|
-
function
|
|
300
|
+
function Pt() {
|
|
301
301
|
return fr || (fr = 1, function(t) {
|
|
302
302
|
(function() {
|
|
303
303
|
var i = {}.hasOwnProperty;
|
|
@@ -329,8 +329,8 @@ function At() {
|
|
|
329
329
|
})();
|
|
330
330
|
}(dr)), dr.exports;
|
|
331
331
|
}
|
|
332
|
-
var
|
|
333
|
-
const
|
|
332
|
+
var kt = Pt();
|
|
333
|
+
const Ct = /* @__PURE__ */ Mt(kt), zt = {
|
|
334
334
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
335
335
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
336
336
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -338,26 +338,26 @@ const Pt = /* @__PURE__ */ jt(Mt), kt = {
|
|
|
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
|
-
},
|
|
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 } = {}) => {
|
|
342
342
|
const n = [
|
|
343
343
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
344
344
|
{ name: "fill", value: "currentColor" },
|
|
345
345
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
346
346
|
i ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
347
347
|
], a = i ? `<title>${i}</title>` : "";
|
|
348
|
-
return `<svg ${
|
|
349
|
-
},
|
|
348
|
+
return `<svg ${Dt(n)}>${a}${t}</svg>`;
|
|
349
|
+
}, Lt = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Tr = ({
|
|
350
350
|
["data-testid"]: t,
|
|
351
351
|
svg: i,
|
|
352
352
|
allyTitle: n,
|
|
353
353
|
className: a,
|
|
354
|
-
size: p =
|
|
354
|
+
size: p = Rt,
|
|
355
355
|
...r
|
|
356
356
|
}) => {
|
|
357
|
-
const e =
|
|
358
|
-
content:
|
|
357
|
+
const e = It({
|
|
358
|
+
content: Lt(i.svg),
|
|
359
359
|
title: n
|
|
360
|
-
}), u =
|
|
360
|
+
}), u = Bt(a, vr, `${vr}--${p}`);
|
|
361
361
|
return /* @__PURE__ */ o(
|
|
362
362
|
"span",
|
|
363
363
|
{
|
|
@@ -368,14 +368,14 @@ const Pt = /* @__PURE__ */ jt(Mt), kt = {
|
|
|
368
368
|
}
|
|
369
369
|
);
|
|
370
370
|
};
|
|
371
|
-
|
|
372
|
-
const
|
|
371
|
+
Tr.displayName = "Icon";
|
|
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>',
|
|
375
375
|
keywords: ["error-filled"],
|
|
376
376
|
category: "status"
|
|
377
377
|
};
|
|
378
|
-
function
|
|
378
|
+
function Ft(t) {
|
|
379
379
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
380
380
|
}
|
|
381
381
|
var gr = { exports: {} };
|
|
@@ -385,7 +385,7 @@ var gr = { exports: {} };
|
|
|
385
385
|
http://jedwatson.github.io/classnames
|
|
386
386
|
*/
|
|
387
387
|
var br;
|
|
388
|
-
function
|
|
388
|
+
function Vt() {
|
|
389
389
|
return br || (br = 1, function(t) {
|
|
390
390
|
(function() {
|
|
391
391
|
var i = {}.hasOwnProperty;
|
|
@@ -417,29 +417,29 @@ function Et() {
|
|
|
417
417
|
})();
|
|
418
418
|
}(gr)), gr.exports;
|
|
419
419
|
}
|
|
420
|
-
var
|
|
421
|
-
const
|
|
420
|
+
var Zt = Vt();
|
|
421
|
+
const Ht = /* @__PURE__ */ Ft(Zt), mr = {
|
|
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",
|
|
424
|
+
}, yr = "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__ */
|
|
429
|
+
}) => /* @__PURE__ */ j(
|
|
430
430
|
"div",
|
|
431
431
|
{
|
|
432
|
-
className:
|
|
432
|
+
className: Ht([i, mr[yr]]),
|
|
433
433
|
"aria-live": "assertive",
|
|
434
434
|
"aria-relevant": n,
|
|
435
435
|
...a,
|
|
436
436
|
children: [
|
|
437
|
-
/* @__PURE__ */ o(
|
|
437
|
+
/* @__PURE__ */ o(Tr, { svg: Et, size: "xs", className: mr[`${yr}__icon`] }),
|
|
438
438
|
t
|
|
439
439
|
]
|
|
440
440
|
}
|
|
441
441
|
);
|
|
442
|
-
function
|
|
442
|
+
function Gt(t) {
|
|
443
443
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
444
444
|
}
|
|
445
445
|
var xr = { exports: {} };
|
|
@@ -481,18 +481,18 @@ function Tt() {
|
|
|
481
481
|
})();
|
|
482
482
|
}(xr)), xr.exports;
|
|
483
483
|
}
|
|
484
|
-
var
|
|
485
|
-
const
|
|
484
|
+
var Qt = Tt();
|
|
485
|
+
const Ut = /* @__PURE__ */ Gt(Qt), wr = {
|
|
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",
|
|
488
|
+
}, $r = "purpur-field-helper-text", Xt = ({
|
|
489
489
|
children: t,
|
|
490
490
|
className: i,
|
|
491
491
|
disabled: n,
|
|
492
492
|
id: a,
|
|
493
493
|
...p
|
|
494
494
|
}) => {
|
|
495
|
-
const r =
|
|
495
|
+
const r = Ut([
|
|
496
496
|
i,
|
|
497
497
|
wr[$r],
|
|
498
498
|
{
|
|
@@ -501,7 +501,7 @@ const Gt = /* @__PURE__ */ Ht(Wt), wr = {
|
|
|
501
501
|
]);
|
|
502
502
|
return /* @__PURE__ */ o("span", { id: a, className: r, ...p, children: t });
|
|
503
503
|
};
|
|
504
|
-
function
|
|
504
|
+
function Yt(t) {
|
|
505
505
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
506
506
|
}
|
|
507
507
|
var qr = { exports: {} };
|
|
@@ -511,7 +511,7 @@ var qr = { exports: {} };
|
|
|
511
511
|
http://jedwatson.github.io/classnames
|
|
512
512
|
*/
|
|
513
513
|
var Sr;
|
|
514
|
-
function
|
|
514
|
+
function Jt() {
|
|
515
515
|
return Sr || (Sr = 1, function(t) {
|
|
516
516
|
(function() {
|
|
517
517
|
var i = {}.hasOwnProperty;
|
|
@@ -543,8 +543,8 @@ function Xt() {
|
|
|
543
543
|
})();
|
|
544
544
|
}(qr)), qr.exports;
|
|
545
545
|
}
|
|
546
|
-
var
|
|
547
|
-
const
|
|
546
|
+
var Kt = Jt();
|
|
547
|
+
const re = /* @__PURE__ */ Yt(Kt), te = {
|
|
548
548
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
549
549
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
550
550
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -552,26 +552,26 @@ const Jt = /* @__PURE__ */ Ut(Yt), Kt = {
|
|
|
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
|
-
},
|
|
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 } = {}) => {
|
|
556
556
|
const n = [
|
|
557
557
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
558
558
|
{ name: "fill", value: "currentColor" },
|
|
559
559
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
560
560
|
i ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
561
561
|
], a = i ? `<title>${i}</title>` : "";
|
|
562
|
-
return `<svg ${
|
|
563
|
-
},
|
|
562
|
+
return `<svg ${ue(n)}>${a}${t}</svg>`;
|
|
563
|
+
}, pe = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), rr = ({
|
|
564
564
|
["data-testid"]: t,
|
|
565
565
|
svg: i,
|
|
566
566
|
allyTitle: n,
|
|
567
567
|
className: a,
|
|
568
|
-
size: p =
|
|
568
|
+
size: p = ne,
|
|
569
569
|
...r
|
|
570
570
|
}) => {
|
|
571
|
-
const e =
|
|
572
|
-
content:
|
|
571
|
+
const e = ie({
|
|
572
|
+
content: pe(i.svg),
|
|
573
573
|
title: n
|
|
574
|
-
}), u =
|
|
574
|
+
}), u = ee(a, Nr, `${Nr}--${p}`);
|
|
575
575
|
return /* @__PURE__ */ o(
|
|
576
576
|
"span",
|
|
577
577
|
{
|
|
@@ -583,26 +583,26 @@ const Jt = /* @__PURE__ */ Ut(Yt), Kt = {
|
|
|
583
583
|
);
|
|
584
584
|
};
|
|
585
585
|
rr.displayName = "Icon";
|
|
586
|
-
const
|
|
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:
|
|
591
|
+
}, Qr = (t) => /* @__PURE__ */ o(rr, { ...t, svg: ae });
|
|
592
592
|
Qr.displayName = "IconCheckCircleFilled";
|
|
593
|
-
const
|
|
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:
|
|
598
|
+
}, Ur = (t) => /* @__PURE__ */ o(rr, { ...t, svg: oe });
|
|
599
599
|
Ur.displayName = "IconClose";
|
|
600
600
|
function Or(t, i) {
|
|
601
601
|
if (typeof t == "function")
|
|
602
602
|
return t(i);
|
|
603
603
|
t != null && (t.current = i);
|
|
604
604
|
}
|
|
605
|
-
function
|
|
605
|
+
function le(...t) {
|
|
606
606
|
return (i) => {
|
|
607
607
|
let n = !1;
|
|
608
608
|
const a = t.map((p) => {
|
|
@@ -618,29 +618,29 @@ function ae(...t) {
|
|
|
618
618
|
};
|
|
619
619
|
};
|
|
620
620
|
}
|
|
621
|
-
var Xr =
|
|
622
|
-
const { children: n, ...a } = t, p =
|
|
621
|
+
var Xr = c.forwardRef((t, i) => {
|
|
622
|
+
const { children: n, ...a } = t, p = c.Children.toArray(n), r = p.find(ce);
|
|
623
623
|
if (r) {
|
|
624
|
-
const e = r.props.children, u = p.map((f) => f === r ?
|
|
625
|
-
return /* @__PURE__ */ o(K, { ...a, ref: i, children:
|
|
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 });
|
|
626
626
|
}
|
|
627
627
|
return /* @__PURE__ */ o(K, { ...a, ref: i, children: n });
|
|
628
628
|
});
|
|
629
629
|
Xr.displayName = "Slot";
|
|
630
|
-
var K =
|
|
630
|
+
var K = c.forwardRef((t, i) => {
|
|
631
631
|
const { children: n, ...a } = t;
|
|
632
|
-
if (
|
|
633
|
-
const p =
|
|
634
|
-
return n.type !==
|
|
632
|
+
if (c.isValidElement(n)) {
|
|
633
|
+
const p = de(n), r = _e(a, n.props);
|
|
634
|
+
return n.type !== c.Fragment && (r.ref = i ? le(i, p) : p), c.cloneElement(n, r);
|
|
635
635
|
}
|
|
636
|
-
return
|
|
636
|
+
return c.Children.count(n) > 1 ? c.Children.only(null) : null;
|
|
637
637
|
});
|
|
638
638
|
K.displayName = "SlotClone";
|
|
639
|
-
var
|
|
640
|
-
function
|
|
641
|
-
return
|
|
639
|
+
var se = ({ children: t }) => /* @__PURE__ */ o(Wr, { children: t });
|
|
640
|
+
function ce(t) {
|
|
641
|
+
return c.isValidElement(t) && t.type === se;
|
|
642
642
|
}
|
|
643
|
-
function
|
|
643
|
+
function _e(t, i) {
|
|
644
644
|
const n = { ...i };
|
|
645
645
|
for (const a in i) {
|
|
646
646
|
const p = t[a], r = i[a];
|
|
@@ -650,12 +650,12 @@ function se(t, i) {
|
|
|
650
650
|
}
|
|
651
651
|
return { ...t, ...n };
|
|
652
652
|
}
|
|
653
|
-
function
|
|
653
|
+
function de(t) {
|
|
654
654
|
var i, n;
|
|
655
655
|
let a = (i = Object.getOwnPropertyDescriptor(t.props, "ref")) == null ? void 0 : i.get, p = a && "isReactWarning" in a && a.isReactWarning;
|
|
656
656
|
return p ? t.ref : (a = (n = Object.getOwnPropertyDescriptor(t, "ref")) == null ? void 0 : n.get, p = a && "isReactWarning" in a && a.isReactWarning, p ? t.props.ref : t.props.ref || t.ref);
|
|
657
657
|
}
|
|
658
|
-
var
|
|
658
|
+
var fe = [
|
|
659
659
|
"a",
|
|
660
660
|
"button",
|
|
661
661
|
"div",
|
|
@@ -672,14 +672,14 @@ var _e = [
|
|
|
672
672
|
"span",
|
|
673
673
|
"svg",
|
|
674
674
|
"ul"
|
|
675
|
-
],
|
|
676
|
-
const n =
|
|
675
|
+
], ve = fe.reduce((t, i) => {
|
|
676
|
+
const n = c.forwardRef((a, p) => {
|
|
677
677
|
const { asChild: r, ...e } = a, u = r ? Xr : 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
|
-
}, {}),
|
|
682
|
-
|
|
681
|
+
}, {}), ge = "Label", Yr = c.forwardRef((t, i) => /* @__PURE__ */ o(
|
|
682
|
+
ve.label,
|
|
683
683
|
{
|
|
684
684
|
...t,
|
|
685
685
|
ref: i,
|
|
@@ -689,9 +689,9 @@ var _e = [
|
|
|
689
689
|
}
|
|
690
690
|
}
|
|
691
691
|
));
|
|
692
|
-
Yr.displayName =
|
|
693
|
-
var
|
|
694
|
-
function
|
|
692
|
+
Yr.displayName = ge;
|
|
693
|
+
var be = Yr;
|
|
694
|
+
function me(t) {
|
|
695
695
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
696
696
|
}
|
|
697
697
|
var jr = { exports: {} };
|
|
@@ -701,7 +701,7 @@ var jr = { exports: {} };
|
|
|
701
701
|
http://jedwatson.github.io/classnames
|
|
702
702
|
*/
|
|
703
703
|
var Ar;
|
|
704
|
-
function
|
|
704
|
+
function ye() {
|
|
705
705
|
return Ar || (Ar = 1, function(t) {
|
|
706
706
|
(function() {
|
|
707
707
|
var i = {}.hasOwnProperty;
|
|
@@ -733,19 +733,19 @@ function be() {
|
|
|
733
733
|
})();
|
|
734
734
|
}(jr)), jr.exports;
|
|
735
735
|
}
|
|
736
|
-
var
|
|
737
|
-
const
|
|
736
|
+
var xe = ye();
|
|
737
|
+
const he = /* @__PURE__ */ me(xe), X = {
|
|
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",
|
|
741
|
+
}, Y = "purpur-label", we = ({
|
|
742
742
|
children: t,
|
|
743
743
|
className: i,
|
|
744
744
|
disabled: n,
|
|
745
745
|
negative: a = !1,
|
|
746
746
|
...p
|
|
747
747
|
}) => {
|
|
748
|
-
const r =
|
|
748
|
+
const r = he([
|
|
749
749
|
i,
|
|
750
750
|
X[Y],
|
|
751
751
|
{
|
|
@@ -753,9 +753,9 @@ const ye = /* @__PURE__ */ ge(me), X = {
|
|
|
753
753
|
[X[`${Y}--negative`]]: a
|
|
754
754
|
}
|
|
755
755
|
]);
|
|
756
|
-
return /* @__PURE__ */ o(
|
|
756
|
+
return /* @__PURE__ */ o(be, { className: r, ...p, children: t });
|
|
757
757
|
};
|
|
758
|
-
function
|
|
758
|
+
function $e(t) {
|
|
759
759
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
760
760
|
}
|
|
761
761
|
var Mr = { exports: {} };
|
|
@@ -765,7 +765,7 @@ var Mr = { exports: {} };
|
|
|
765
765
|
http://jedwatson.github.io/classnames
|
|
766
766
|
*/
|
|
767
767
|
var Pr;
|
|
768
|
-
function
|
|
768
|
+
function qe() {
|
|
769
769
|
return Pr || (Pr = 1, function(t) {
|
|
770
770
|
(function() {
|
|
771
771
|
var i = {}.hasOwnProperty;
|
|
@@ -797,39 +797,39 @@ function we() {
|
|
|
797
797
|
})();
|
|
798
798
|
}(Mr)), Mr.exports;
|
|
799
799
|
}
|
|
800
|
-
var
|
|
801
|
-
const kr = /* @__PURE__ */
|
|
800
|
+
var Se = qe();
|
|
801
|
+
const kr = /* @__PURE__ */ $e(Se), Ne = "_rotate_12t9p_1", Oe = "_dash_12t9p_1", Z = {
|
|
802
802
|
"purpur-spinner": "_purpur-spinner_12t9p_2",
|
|
803
|
-
rotate:
|
|
803
|
+
rotate: Ne,
|
|
804
804
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_12t9p_6",
|
|
805
805
|
"purpur-spinner--xs": "_purpur-spinner--xs_12t9p_10",
|
|
806
806
|
"purpur-spinner--sm": "_purpur-spinner--sm_12t9p_14",
|
|
807
807
|
"purpur-spinner--md": "_purpur-spinner--md_12t9p_18",
|
|
808
808
|
"purpur-spinner--lg": "_purpur-spinner--lg_12t9p_22",
|
|
809
809
|
"purpur-spinner__circle": "_purpur-spinner__circle_12t9p_26",
|
|
810
|
-
dash:
|
|
810
|
+
dash: Oe,
|
|
811
811
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_12t9p_41",
|
|
812
812
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_12t9p_44"
|
|
813
|
-
},
|
|
813
|
+
}, H = "purpur-spinner", je = {
|
|
814
814
|
SM: "sm"
|
|
815
|
-
},
|
|
815
|
+
}, Ae = ({
|
|
816
816
|
["data-testid"]: t,
|
|
817
817
|
disabled: i = !1,
|
|
818
818
|
negative: n = !1,
|
|
819
|
-
size: a =
|
|
819
|
+
size: a = je.SM,
|
|
820
820
|
...p
|
|
821
821
|
}) => /* @__PURE__ */ o(
|
|
822
822
|
"div",
|
|
823
823
|
{
|
|
824
|
-
className: kr([
|
|
824
|
+
className: kr([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(
|
|
831
|
-
[
|
|
832
|
-
[
|
|
830
|
+
className: kr(Z[`${H}__circle`], {
|
|
831
|
+
[Z[`${H}__circle--disabled`]]: i,
|
|
832
|
+
[Z[`${H}__circle--negative`]]: n
|
|
833
833
|
}),
|
|
834
834
|
cx: "25",
|
|
835
835
|
cy: "25",
|
|
@@ -838,7 +838,7 @@ const kr = /* @__PURE__ */ he($e), qe = "_rotate_12t9p_1", Se = "_dash_12t9p_1",
|
|
|
838
838
|
) })
|
|
839
839
|
}
|
|
840
840
|
);
|
|
841
|
-
function
|
|
841
|
+
function Me(t) {
|
|
842
842
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
843
843
|
}
|
|
844
844
|
var Cr = { exports: {} };
|
|
@@ -848,7 +848,7 @@ var Cr = { exports: {} };
|
|
|
848
848
|
http://jedwatson.github.io/classnames
|
|
849
849
|
*/
|
|
850
850
|
var zr;
|
|
851
|
-
function
|
|
851
|
+
function Pe() {
|
|
852
852
|
return zr || (zr = 1, function(t) {
|
|
853
853
|
(function() {
|
|
854
854
|
var i = {}.hasOwnProperty;
|
|
@@ -880,8 +880,8 @@ function Ae() {
|
|
|
880
880
|
})();
|
|
881
881
|
}(Cr)), Cr.exports;
|
|
882
882
|
}
|
|
883
|
-
var
|
|
884
|
-
const
|
|
883
|
+
var ke = Pe();
|
|
884
|
+
const Ce = /* @__PURE__ */ Me(ke), ze = {
|
|
885
885
|
"purpur-text-field": "_purpur-text-field_3gl1k_1",
|
|
886
886
|
"purpur-text-field__label": "_purpur-text-field__label_3gl1k_7",
|
|
887
887
|
"purpur-text-field__label-text": "_purpur-text-field__label-text_3gl1k_12",
|
|
@@ -898,7 +898,7 @@ const Pe = /* @__PURE__ */ je(Me), ke = {
|
|
|
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
|
-
},
|
|
901
|
+
}, Be = (t) => at(t), O = Ce.bind(ze), s = "purpur-text-field", Re = ({
|
|
902
902
|
["data-testid"]: t,
|
|
903
903
|
className: i,
|
|
904
904
|
clearButtonAriaLabel: n,
|
|
@@ -910,64 +910,64 @@ const Pe = /* @__PURE__ */ je(Me), ke = {
|
|
|
910
910
|
label: f,
|
|
911
911
|
loading: b = !1,
|
|
912
912
|
onClear: v,
|
|
913
|
-
startAdornment:
|
|
914
|
-
valid:
|
|
913
|
+
startAdornment: M,
|
|
914
|
+
valid: q = !1,
|
|
915
915
|
...l
|
|
916
|
-
},
|
|
917
|
-
var
|
|
918
|
-
const
|
|
919
|
-
|
|
920
|
-
},
|
|
921
|
-
var
|
|
922
|
-
v == null || v(), (
|
|
923
|
-
},
|
|
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 = () => {
|
|
921
|
+
var _;
|
|
922
|
+
v == null || v(), (_ = w.current) == null || _.focus();
|
|
923
|
+
}, N = [
|
|
924
924
|
b && /* @__PURE__ */ o(
|
|
925
|
-
|
|
925
|
+
Ae,
|
|
926
926
|
{
|
|
927
927
|
disabled: l.disabled,
|
|
928
928
|
size: "xs",
|
|
929
|
-
"data-testid":
|
|
929
|
+
"data-testid": g("spinner")
|
|
930
930
|
},
|
|
931
931
|
"spinner"
|
|
932
932
|
),
|
|
933
|
-
|
|
934
|
-
|
|
933
|
+
I && /* @__PURE__ */ o(
|
|
934
|
+
Gr,
|
|
935
935
|
{
|
|
936
936
|
variant: "tertiary-purple",
|
|
937
|
-
onClick:
|
|
937
|
+
onClick: B,
|
|
938
938
|
iconOnly: !0,
|
|
939
939
|
"aria-label": n ?? "",
|
|
940
|
-
"data-testid":
|
|
940
|
+
"data-testid": g("clear-button"),
|
|
941
941
|
tabIndex: -1,
|
|
942
942
|
children: /* @__PURE__ */ o(Ur, { size: "xs" })
|
|
943
943
|
},
|
|
944
944
|
"clear-button"
|
|
945
945
|
),
|
|
946
|
-
|
|
946
|
+
D && /* @__PURE__ */ o(
|
|
947
947
|
Qr,
|
|
948
948
|
{
|
|
949
|
-
"data-testid":
|
|
950
|
-
className:
|
|
949
|
+
"data-testid": g("valid-icon"),
|
|
950
|
+
className: O(`${s}__valid-icon`)
|
|
951
951
|
},
|
|
952
952
|
"valid-icon"
|
|
953
953
|
)
|
|
954
|
-
].filter((
|
|
955
|
-
`${
|
|
954
|
+
].filter((_) => !!_), P = O([
|
|
955
|
+
`${s}__input-container`,
|
|
956
956
|
{
|
|
957
|
-
[`${
|
|
958
|
-
[`${
|
|
959
|
-
[`${
|
|
960
|
-
[`${
|
|
961
|
-
[`${
|
|
957
|
+
[`${s}__input-container--start-adornment`]: h.length,
|
|
958
|
+
[`${s}__input-container--end-adornment`]: N.length || r,
|
|
959
|
+
[`${s}__input-container--disabled`]: l.disabled,
|
|
960
|
+
[`${s}__input-container--has-clear-button`]: I,
|
|
961
|
+
[`${s}__input-container--readonly`]: l.readOnly && !l.disabled
|
|
962
962
|
}
|
|
963
963
|
]);
|
|
964
|
-
return /* @__PURE__ */
|
|
965
|
-
f && /* @__PURE__ */
|
|
966
|
-
|
|
964
|
+
return /* @__PURE__ */ j("div", { className: O(i, s), children: [
|
|
965
|
+
f && /* @__PURE__ */ j(
|
|
966
|
+
we,
|
|
967
967
|
{
|
|
968
968
|
htmlFor: m,
|
|
969
|
-
className:
|
|
970
|
-
"data-testid":
|
|
969
|
+
className: O(`${s}__label`),
|
|
970
|
+
"data-testid": g("label"),
|
|
971
971
|
disabled: l.disabled,
|
|
972
972
|
children: [
|
|
973
973
|
l.required && /* @__PURE__ */ o("span", { "aria-hidden": !0, children: "*" }),
|
|
@@ -975,15 +975,15 @@ const Pe = /* @__PURE__ */ je(Me), ke = {
|
|
|
975
975
|
]
|
|
976
976
|
}
|
|
977
977
|
),
|
|
978
|
-
/* @__PURE__ */
|
|
978
|
+
/* @__PURE__ */ j("div", { className: O(`${s}__field-row`), children: [
|
|
979
979
|
!!a && a,
|
|
980
|
-
/* @__PURE__ */
|
|
981
|
-
!!
|
|
980
|
+
/* @__PURE__ */ j("div", { className: P, children: [
|
|
981
|
+
!!h.length && /* @__PURE__ */ o(
|
|
982
982
|
"div",
|
|
983
983
|
{
|
|
984
|
-
"data-testid":
|
|
985
|
-
className:
|
|
986
|
-
children:
|
|
984
|
+
"data-testid": g("start-adornments"),
|
|
985
|
+
className: O(`${s}__adornment-container`),
|
|
986
|
+
children: h
|
|
987
987
|
}
|
|
988
988
|
),
|
|
989
989
|
/* @__PURE__ */ o(
|
|
@@ -991,27 +991,27 @@ const Pe = /* @__PURE__ */ je(Me), ke = {
|
|
|
991
991
|
{
|
|
992
992
|
...l,
|
|
993
993
|
id: m,
|
|
994
|
-
ref:
|
|
995
|
-
"data-testid":
|
|
996
|
-
"aria-describedby": l["aria-describedby"] ||
|
|
994
|
+
ref: z,
|
|
995
|
+
"data-testid": g("input"),
|
|
996
|
+
"aria-describedby": l["aria-describedby"] || y,
|
|
997
997
|
"aria-invalid": l["aria-invalid"] || !!e,
|
|
998
|
-
className:
|
|
999
|
-
`${
|
|
998
|
+
className: O([
|
|
999
|
+
`${s}__input`,
|
|
1000
1000
|
{
|
|
1001
|
-
[`${
|
|
1002
|
-
[`${
|
|
1001
|
+
[`${s}__input--valid`]: D,
|
|
1002
|
+
[`${s}__input--error`]: !!e
|
|
1003
1003
|
}
|
|
1004
1004
|
])
|
|
1005
1005
|
}
|
|
1006
1006
|
),
|
|
1007
|
-
/* @__PURE__ */ o("div", { className:
|
|
1008
|
-
(!!
|
|
1007
|
+
/* @__PURE__ */ o("div", { className: O(`${s}__frame`) }),
|
|
1008
|
+
(!!N.length || r) && /* @__PURE__ */ j(
|
|
1009
1009
|
"div",
|
|
1010
1010
|
{
|
|
1011
|
-
"data-testid":
|
|
1012
|
-
className:
|
|
1011
|
+
"data-testid": g("end-adornments"),
|
|
1012
|
+
className: O(`${s}__adornment-container`),
|
|
1013
1013
|
children: [
|
|
1014
|
-
|
|
1014
|
+
N,
|
|
1015
1015
|
r
|
|
1016
1016
|
]
|
|
1017
1017
|
}
|
|
@@ -1019,12 +1019,12 @@ const Pe = /* @__PURE__ */ je(Me), ke = {
|
|
|
1019
1019
|
] }),
|
|
1020
1020
|
!!p && p
|
|
1021
1021
|
] }),
|
|
1022
|
-
|
|
1023
|
-
e && /* @__PURE__ */ o(
|
|
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 })
|
|
1024
1024
|
] });
|
|
1025
|
-
}, Jr =
|
|
1025
|
+
}, Jr = U(Re);
|
|
1026
1026
|
Jr.displayName = "TextField";
|
|
1027
|
-
function
|
|
1027
|
+
function De(t) {
|
|
1028
1028
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
1029
1029
|
}
|
|
1030
1030
|
var J = { exports: {} };
|
|
@@ -1034,7 +1034,7 @@ var J = { exports: {} };
|
|
|
1034
1034
|
http://jedwatson.github.io/classnames
|
|
1035
1035
|
*/
|
|
1036
1036
|
var Br;
|
|
1037
|
-
function
|
|
1037
|
+
function Ie() {
|
|
1038
1038
|
return Br || (Br = 1, function(t) {
|
|
1039
1039
|
(function() {
|
|
1040
1040
|
var i = {}.hasOwnProperty;
|
|
@@ -1066,8 +1066,8 @@ function Re() {
|
|
|
1066
1066
|
})();
|
|
1067
1067
|
}(J)), J.exports;
|
|
1068
1068
|
}
|
|
1069
|
-
var
|
|
1070
|
-
const Kr = /* @__PURE__ */
|
|
1069
|
+
var Le = Ie();
|
|
1070
|
+
const Kr = /* @__PURE__ */ De(Le), Ee = {
|
|
1071
1071
|
"purpur-quantity-selector": "_purpur-quantity-selector_lzxe3_1",
|
|
1072
1072
|
"purpur-quantity-selector--full-width": "_purpur-quantity-selector--full-width_lzxe3_21",
|
|
1073
1073
|
"purpur-quantity-selector--loading": "_purpur-quantity-selector--loading_lzxe3_27",
|
|
@@ -1078,10 +1078,10 @@ const Kr = /* @__PURE__ */ Be(De), Ie = {
|
|
|
1078
1078
|
"purpur-quantity-selector__spinner": "_purpur-quantity-selector__spinner_lzxe3_46",
|
|
1079
1079
|
"purpur-quantity-selector__spinner--full-width": "_purpur-quantity-selector__spinner--full-width_lzxe3_53",
|
|
1080
1080
|
"purpur-quantity-selector__spinner--separated": "_purpur-quantity-selector__spinner--separated_lzxe3_57"
|
|
1081
|
-
},
|
|
1081
|
+
}, Fe = {
|
|
1082
1082
|
LG: "lg"
|
|
1083
1083
|
};
|
|
1084
|
-
function
|
|
1084
|
+
function Ve(t) {
|
|
1085
1085
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
1086
1086
|
}
|
|
1087
1087
|
var Rr = { exports: {} };
|
|
@@ -1091,7 +1091,7 @@ var Rr = { exports: {} };
|
|
|
1091
1091
|
http://jedwatson.github.io/classnames
|
|
1092
1092
|
*/
|
|
1093
1093
|
var Dr;
|
|
1094
|
-
function
|
|
1094
|
+
function Ze() {
|
|
1095
1095
|
return Dr || (Dr = 1, function(t) {
|
|
1096
1096
|
(function() {
|
|
1097
1097
|
var i = {}.hasOwnProperty;
|
|
@@ -1123,22 +1123,22 @@ function Fe() {
|
|
|
1123
1123
|
})();
|
|
1124
1124
|
}(Rr)), Rr.exports;
|
|
1125
1125
|
}
|
|
1126
|
-
var
|
|
1127
|
-
const Ir = /* @__PURE__ */
|
|
1126
|
+
var He = Ze();
|
|
1127
|
+
const Ir = /* @__PURE__ */ Ve(He), We = "_rotate_12t9p_1", Ge = "_dash_12t9p_1", W = {
|
|
1128
1128
|
"purpur-spinner": "_purpur-spinner_12t9p_2",
|
|
1129
|
-
rotate:
|
|
1129
|
+
rotate: We,
|
|
1130
1130
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_12t9p_6",
|
|
1131
1131
|
"purpur-spinner--xs": "_purpur-spinner--xs_12t9p_10",
|
|
1132
1132
|
"purpur-spinner--sm": "_purpur-spinner--sm_12t9p_14",
|
|
1133
1133
|
"purpur-spinner--md": "_purpur-spinner--md_12t9p_18",
|
|
1134
1134
|
"purpur-spinner--lg": "_purpur-spinner--lg_12t9p_22",
|
|
1135
1135
|
"purpur-spinner__circle": "_purpur-spinner__circle_12t9p_26",
|
|
1136
|
-
dash:
|
|
1136
|
+
dash: Ge,
|
|
1137
1137
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_12t9p_41",
|
|
1138
1138
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_12t9p_44"
|
|
1139
|
-
},
|
|
1139
|
+
}, G = "purpur-spinner", Te = {
|
|
1140
1140
|
SM: "sm"
|
|
1141
|
-
},
|
|
1141
|
+
}, Qe = ({
|
|
1142
1142
|
["data-testid"]: t,
|
|
1143
1143
|
disabled: i = !1,
|
|
1144
1144
|
negative: n = !1,
|
|
@@ -1147,15 +1147,15 @@ const Ir = /* @__PURE__ */ Ee(Ve), Ze = "_rotate_12t9p_1", He = "_dash_12t9p_1",
|
|
|
1147
1147
|
}) => /* @__PURE__ */ o(
|
|
1148
1148
|
"div",
|
|
1149
1149
|
{
|
|
1150
|
-
className: Ir([
|
|
1150
|
+
className: Ir([W[G], W[`${G}--${a}`]]),
|
|
1151
1151
|
"data-testid": t,
|
|
1152
1152
|
...p,
|
|
1153
1153
|
children: /* @__PURE__ */ o("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ o(
|
|
1154
1154
|
"circle",
|
|
1155
1155
|
{
|
|
1156
|
-
className: Ir(
|
|
1157
|
-
[
|
|
1158
|
-
[
|
|
1156
|
+
className: Ir(W[`${G}__circle`], {
|
|
1157
|
+
[W[`${G}__circle--disabled`]]: i,
|
|
1158
|
+
[W[`${G}__circle--negative`]]: n
|
|
1159
1159
|
}),
|
|
1160
1160
|
cx: "25",
|
|
1161
1161
|
cy: "25",
|
|
@@ -1164,7 +1164,7 @@ const Ir = /* @__PURE__ */ Ee(Ve), Ze = "_rotate_12t9p_1", He = "_dash_12t9p_1",
|
|
|
1164
1164
|
) })
|
|
1165
1165
|
}
|
|
1166
1166
|
);
|
|
1167
|
-
function
|
|
1167
|
+
function Ue(t) {
|
|
1168
1168
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
1169
1169
|
}
|
|
1170
1170
|
var Lr = { exports: {} };
|
|
@@ -1174,7 +1174,7 @@ var Lr = { exports: {} };
|
|
|
1174
1174
|
http://jedwatson.github.io/classnames
|
|
1175
1175
|
*/
|
|
1176
1176
|
var Er;
|
|
1177
|
-
function
|
|
1177
|
+
function Xe() {
|
|
1178
1178
|
return Er || (Er = 1, function(t) {
|
|
1179
1179
|
(function() {
|
|
1180
1180
|
var i = {}.hasOwnProperty;
|
|
@@ -1206,8 +1206,8 @@ function Qe() {
|
|
|
1206
1206
|
})();
|
|
1207
1207
|
}(Lr)), Lr.exports;
|
|
1208
1208
|
}
|
|
1209
|
-
var
|
|
1210
|
-
const
|
|
1209
|
+
var Ye = Xe();
|
|
1210
|
+
const Je = /* @__PURE__ */ Ue(Ye), Ke = {
|
|
1211
1211
|
"purpur-button": "_purpur-button_w455q_1",
|
|
1212
1212
|
"purpur-button--xs": "_purpur-button--xs_w455q_33",
|
|
1213
1213
|
"purpur-button--icon-only": "_purpur-button--icon-only_w455q_36",
|
|
@@ -1229,7 +1229,7 @@ const Xe = /* @__PURE__ */ Ge(Ue), Ye = {
|
|
|
1229
1229
|
"purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-negative_w455q_166",
|
|
1230
1230
|
"purpur-button--text-negative": "_purpur-button--text-negative_w455q_181",
|
|
1231
1231
|
"purpur-button--text": "_purpur-button--text_w455q_181"
|
|
1232
|
-
},
|
|
1232
|
+
}, rn = Je.bind(Ke), C = "purpur-button", tn = ({
|
|
1233
1233
|
children: t,
|
|
1234
1234
|
className: i,
|
|
1235
1235
|
["data-testid"]: n,
|
|
@@ -1241,47 +1241,47 @@ const Xe = /* @__PURE__ */ Ge(Ue), Ye = {
|
|
|
1241
1241
|
onClick: f,
|
|
1242
1242
|
size: b = "md",
|
|
1243
1243
|
variant: v,
|
|
1244
|
-
type:
|
|
1245
|
-
|
|
1244
|
+
type: M = "button",
|
|
1245
|
+
...q
|
|
1246
1246
|
}, l) => {
|
|
1247
1247
|
if (r && v === "destructive")
|
|
1248
1248
|
return null;
|
|
1249
|
-
const
|
|
1249
|
+
const x = rn(
|
|
1250
1250
|
[
|
|
1251
|
-
|
|
1252
|
-
`${
|
|
1253
|
-
`${
|
|
1251
|
+
C,
|
|
1252
|
+
`${C}--${u ? `${v}-negative` : v}`,
|
|
1253
|
+
`${C}--${b}`
|
|
1254
1254
|
],
|
|
1255
1255
|
{
|
|
1256
|
-
[`${
|
|
1257
|
-
[`${
|
|
1258
|
-
[`${
|
|
1259
|
-
[`${
|
|
1256
|
+
[`${C}--icon-only`]: r,
|
|
1257
|
+
[`${C}--negative`]: u,
|
|
1258
|
+
[`${C}--full-width`]: p,
|
|
1259
|
+
[`${C}--disabled`]: a || e
|
|
1260
1260
|
},
|
|
1261
1261
|
i
|
|
1262
|
-
),
|
|
1262
|
+
), A = (m) => {
|
|
1263
1263
|
a || e ? m.preventDefault() : f && f(m);
|
|
1264
|
-
},
|
|
1265
|
-
return /* @__PURE__ */
|
|
1264
|
+
}, S = !!q["aria-disabled"] || a || e;
|
|
1265
|
+
return /* @__PURE__ */ j(
|
|
1266
1266
|
"button",
|
|
1267
1267
|
{
|
|
1268
|
-
className:
|
|
1268
|
+
className: x,
|
|
1269
1269
|
"data-testid": n,
|
|
1270
|
-
type:
|
|
1270
|
+
type: M,
|
|
1271
1271
|
ref: l,
|
|
1272
|
-
"aria-disabled":
|
|
1273
|
-
onClick:
|
|
1274
|
-
|
|
1272
|
+
"aria-disabled": S,
|
|
1273
|
+
onClick: A,
|
|
1274
|
+
...q,
|
|
1275
1275
|
children: [
|
|
1276
|
-
e && /* @__PURE__ */ o(
|
|
1276
|
+
e && /* @__PURE__ */ o(Qe, { size: b === Fe.LG ? "xs" : "xxs", negative: u, disabled: S }),
|
|
1277
1277
|
" ",
|
|
1278
1278
|
t
|
|
1279
1279
|
]
|
|
1280
1280
|
}
|
|
1281
1281
|
);
|
|
1282
|
-
}, rt =
|
|
1282
|
+
}, rt = U(tn);
|
|
1283
1283
|
rt.displayName = "Button";
|
|
1284
|
-
function
|
|
1284
|
+
function en(t) {
|
|
1285
1285
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
1286
1286
|
}
|
|
1287
1287
|
var Fr = { exports: {} };
|
|
@@ -1291,7 +1291,7 @@ var Fr = { exports: {} };
|
|
|
1291
1291
|
http://jedwatson.github.io/classnames
|
|
1292
1292
|
*/
|
|
1293
1293
|
var Vr;
|
|
1294
|
-
function
|
|
1294
|
+
function nn() {
|
|
1295
1295
|
return Vr || (Vr = 1, function(t) {
|
|
1296
1296
|
(function() {
|
|
1297
1297
|
var i = {}.hasOwnProperty;
|
|
@@ -1323,8 +1323,8 @@ function tn() {
|
|
|
1323
1323
|
})();
|
|
1324
1324
|
}(Fr)), Fr.exports;
|
|
1325
1325
|
}
|
|
1326
|
-
var
|
|
1327
|
-
const
|
|
1326
|
+
var un = nn();
|
|
1327
|
+
const pn = /* @__PURE__ */ en(un), an = {
|
|
1328
1328
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
1329
1329
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
1330
1330
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -1332,26 +1332,26 @@ const nn = /* @__PURE__ */ rn(en), un = {
|
|
|
1332
1332
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
1333
1333
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
1334
1334
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
1335
|
-
},
|
|
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
1336
|
const n = [
|
|
1337
1337
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
1338
1338
|
{ name: "fill", value: "currentColor" },
|
|
1339
1339
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
1340
1340
|
i ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
1341
1341
|
], a = i ? `<title>${i}</title>` : "";
|
|
1342
|
-
return `<svg ${
|
|
1343
|
-
},
|
|
1342
|
+
return `<svg ${sn(n)}>${a}${t}</svg>`;
|
|
1343
|
+
}, _n = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), tr = ({
|
|
1344
1344
|
["data-testid"]: t,
|
|
1345
1345
|
svg: i,
|
|
1346
1346
|
allyTitle: n,
|
|
1347
1347
|
className: a,
|
|
1348
|
-
size: p =
|
|
1348
|
+
size: p = ln,
|
|
1349
1349
|
...r
|
|
1350
1350
|
}) => {
|
|
1351
|
-
const e =
|
|
1352
|
-
content:
|
|
1351
|
+
const e = cn({
|
|
1352
|
+
content: _n(i.svg),
|
|
1353
1353
|
title: n
|
|
1354
|
-
}), u =
|
|
1354
|
+
}), u = on(a, Zr, `${Zr}--${p}`);
|
|
1355
1355
|
return /* @__PURE__ */ o(
|
|
1356
1356
|
"span",
|
|
1357
1357
|
{
|
|
@@ -1363,27 +1363,27 @@ const nn = /* @__PURE__ */ rn(en), un = {
|
|
|
1363
1363
|
);
|
|
1364
1364
|
};
|
|
1365
1365
|
tr.displayName = "Icon";
|
|
1366
|
-
const
|
|
1366
|
+
const dn = {
|
|
1367
1367
|
name: "minus",
|
|
1368
1368
|
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
1369
|
keywords: ["minus"],
|
|
1370
1370
|
category: "utility"
|
|
1371
|
-
}, tt = (t) => /* @__PURE__ */ o(tr, { ...t, svg:
|
|
1371
|
+
}, tt = (t) => /* @__PURE__ */ o(tr, { ...t, svg: dn });
|
|
1372
1372
|
tt.displayName = "IconMinus";
|
|
1373
|
-
const
|
|
1373
|
+
const fn = {
|
|
1374
1374
|
name: "plus",
|
|
1375
1375
|
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
1376
|
keywords: ["plus"],
|
|
1377
1377
|
category: "utility"
|
|
1378
|
-
}, et = (t) => /* @__PURE__ */ o(tr, { ...t, svg:
|
|
1378
|
+
}, et = (t) => /* @__PURE__ */ o(tr, { ...t, svg: fn });
|
|
1379
1379
|
et.displayName = "IconPlus";
|
|
1380
|
-
const
|
|
1380
|
+
const vn = {
|
|
1381
1381
|
"purpur-quantity-selector-button": "_purpur-quantity-selector-button_qjlbs_1",
|
|
1382
1382
|
"purpur-quantity-selector-button--gap-left": "_purpur-quantity-selector-button--gap-left_qjlbs_4",
|
|
1383
1383
|
"purpur-quantity-selector-button--gap-right": "_purpur-quantity-selector-button--gap-right_qjlbs_7",
|
|
1384
1384
|
"purpur-quantity-selector-button--no-gap-right": "_purpur-quantity-selector-button--no-gap-right_qjlbs_10",
|
|
1385
1385
|
"purpur-quantity-selector-button--no-gap-left": "_purpur-quantity-selector-button--no-gap-left_qjlbs_13"
|
|
1386
|
-
},
|
|
1386
|
+
}, gn = Kr.bind(vn), T = "purpur-quantity-selector-button", bn = ({
|
|
1387
1387
|
["data-testid"]: t,
|
|
1388
1388
|
disabled: i,
|
|
1389
1389
|
hasGap: n,
|
|
@@ -1391,13 +1391,13 @@ const dn = {
|
|
|
1391
1391
|
buttonType: p,
|
|
1392
1392
|
onClick: r
|
|
1393
1393
|
}) => {
|
|
1394
|
-
const e =
|
|
1395
|
-
|
|
1394
|
+
const e = gn([
|
|
1395
|
+
T,
|
|
1396
1396
|
{
|
|
1397
|
-
[`${
|
|
1398
|
-
[`${
|
|
1399
|
-
[`${
|
|
1400
|
-
[`${
|
|
1397
|
+
[`${T}--gap-left`]: n && p === "decrement",
|
|
1398
|
+
[`${T}--gap-right`]: n && p === "increment",
|
|
1399
|
+
[`${T}--no-gap-left`]: !n && p === "decrement",
|
|
1400
|
+
[`${T}--no-gap-right`]: !n && p === "increment"
|
|
1401
1401
|
}
|
|
1402
1402
|
]);
|
|
1403
1403
|
return /* @__PURE__ */ o(
|
|
@@ -1415,7 +1415,7 @@ const dn = {
|
|
|
1415
1415
|
children: p === "increment" ? /* @__PURE__ */ o(et, { size: "xs" }) : /* @__PURE__ */ o(tt, { size: "xs" })
|
|
1416
1416
|
}
|
|
1417
1417
|
);
|
|
1418
|
-
}, Hr = Kr.bind(
|
|
1418
|
+
}, Hr = Kr.bind(Ee), wn = ["attached", "separated"], $n = ["primary", "secondary"], $ = "purpur-quantity-selector", mn = U(
|
|
1419
1419
|
({
|
|
1420
1420
|
["data-testid"]: t,
|
|
1421
1421
|
className: i,
|
|
@@ -1428,69 +1428,72 @@ const dn = {
|
|
|
1428
1428
|
disabled: f,
|
|
1429
1429
|
loading: b,
|
|
1430
1430
|
minValue: v,
|
|
1431
|
-
maxValue:
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
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;
|
|
1435
1437
|
ur(() => {
|
|
1436
|
-
|
|
1437
|
-
}, [r,
|
|
1438
|
-
if (!
|
|
1439
|
-
const
|
|
1440
|
-
|
|
1438
|
+
y && m(r);
|
|
1439
|
+
}, [r, y]), ur(() => {
|
|
1440
|
+
if (!y) {
|
|
1441
|
+
const d = setTimeout(() => {
|
|
1442
|
+
m(g);
|
|
1441
1443
|
}, 300);
|
|
1442
|
-
return () => clearTimeout(
|
|
1444
|
+
return () => clearTimeout(d);
|
|
1443
1445
|
}
|
|
1444
|
-
}, [
|
|
1445
|
-
const
|
|
1446
|
+
}, [g, y, p]);
|
|
1447
|
+
const _ = Hr([
|
|
1446
1448
|
i,
|
|
1447
|
-
|
|
1449
|
+
$,
|
|
1448
1450
|
{
|
|
1449
|
-
[`${
|
|
1450
|
-
[`${
|
|
1451
|
-
[`${
|
|
1452
|
-
[`${
|
|
1453
|
-
[`${
|
|
1454
|
-
[`${
|
|
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
|
|
1455
1457
|
}
|
|
1456
|
-
]),
|
|
1457
|
-
if (!/^[0-9]*$/.test(
|
|
1458
|
+
]), nt = (d) => {
|
|
1459
|
+
if (!/^[0-9]*$/.test(d.target.value))
|
|
1458
1460
|
return;
|
|
1459
|
-
const
|
|
1460
|
-
|
|
1461
|
-
},
|
|
1462
|
-
const R =
|
|
1463
|
-
R < 0 || (
|
|
1464
|
-
}, er = (
|
|
1465
|
-
const R =
|
|
1461
|
+
const Q = +d.target.value;
|
|
1462
|
+
Q < z || Q > B || (y || D(Q), p(Q));
|
|
1463
|
+
}, 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;
|
|
1466
1468
|
return /* @__PURE__ */ o(
|
|
1467
|
-
|
|
1469
|
+
bn,
|
|
1468
1470
|
{
|
|
1469
|
-
"data-testid":
|
|
1471
|
+
"data-testid": I("button-" + d),
|
|
1470
1472
|
variant: a,
|
|
1471
|
-
buttonType:
|
|
1473
|
+
buttonType: d,
|
|
1472
1474
|
hasGap: n === "separated",
|
|
1473
|
-
onClick:
|
|
1474
|
-
disabled:
|
|
1475
|
+
onClick: ut,
|
|
1476
|
+
disabled: w || R,
|
|
1477
|
+
"aria-label": d === "increment" ? l : q
|
|
1475
1478
|
}
|
|
1476
1479
|
);
|
|
1477
|
-
},
|
|
1480
|
+
}, it = /* @__PURE__ */ j(Wr, { children: [
|
|
1478
1481
|
b && /* @__PURE__ */ o(
|
|
1479
1482
|
"div",
|
|
1480
1483
|
{
|
|
1481
1484
|
className: Hr([
|
|
1482
|
-
`${
|
|
1485
|
+
`${$}__spinner`,
|
|
1483
1486
|
{
|
|
1484
|
-
[`${
|
|
1485
|
-
[`${
|
|
1487
|
+
[`${$}__spinner--full-width`]: u,
|
|
1488
|
+
[`${$}__spinner--separated`]: !u && n === "separated"
|
|
1486
1489
|
}
|
|
1487
1490
|
]),
|
|
1488
1491
|
children: /* @__PURE__ */ o(
|
|
1489
|
-
|
|
1492
|
+
ft,
|
|
1490
1493
|
{
|
|
1491
|
-
disabled:
|
|
1494
|
+
disabled: w,
|
|
1492
1495
|
size: "xs",
|
|
1493
|
-
"data-testid":
|
|
1496
|
+
"data-testid": I("spinner")
|
|
1494
1497
|
},
|
|
1495
1498
|
"spinner"
|
|
1496
1499
|
)
|
|
@@ -1501,26 +1504,30 @@ const dn = {
|
|
|
1501
1504
|
return /* @__PURE__ */ o(
|
|
1502
1505
|
Jr,
|
|
1503
1506
|
{
|
|
1504
|
-
value:
|
|
1507
|
+
value: h,
|
|
1505
1508
|
type: "number",
|
|
1506
|
-
ref:
|
|
1507
|
-
className:
|
|
1509
|
+
ref: A,
|
|
1510
|
+
className: _,
|
|
1508
1511
|
"data-testid": t,
|
|
1509
|
-
onChange:
|
|
1510
|
-
beforeField:
|
|
1512
|
+
onChange: nt,
|
|
1513
|
+
beforeField: it,
|
|
1511
1514
|
afterField: er("increment"),
|
|
1512
|
-
disabled:
|
|
1515
|
+
disabled: w,
|
|
1513
1516
|
min: z,
|
|
1514
1517
|
max: B,
|
|
1515
|
-
|
|
1518
|
+
role: "spinbutton",
|
|
1519
|
+
"aria-valuenow": h,
|
|
1520
|
+
"aria-valuemax": B,
|
|
1521
|
+
"aria-valuemin": z,
|
|
1522
|
+
...x
|
|
1516
1523
|
}
|
|
1517
1524
|
);
|
|
1518
1525
|
}
|
|
1519
1526
|
);
|
|
1520
|
-
|
|
1527
|
+
mn.displayName = "QuantitySelector";
|
|
1521
1528
|
export {
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1529
|
+
mn as QuantitySelector,
|
|
1530
|
+
$n as quantitySelectorButtonVariants,
|
|
1531
|
+
wn as quantitySelectorVariants
|
|
1525
1532
|
};
|
|
1526
1533
|
//# sourceMappingURL=quantity-selector.es.js.map
|