@purpurds/quantity-selector 8.2.2 → 8.2.4
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 +5 -5
- package/.rush/temp/chunked-rush-logs/quantity-selector.test_unit.chunks.jsonl +4 -4
- package/.rush/temp/operation/ci_build/all.log +5 -5
- package/.rush/temp/operation/ci_build/log-chunks.jsonl +5 -5
- package/.rush/temp/operation/ci_build/state.json +1 -1
- package/.rush/temp/operation/test_unit/all.log +4 -4
- package/.rush/temp/operation/test_unit/log-chunks.jsonl +4 -4
- package/.rush/temp/operation/test_unit/state.json +1 -1
- package/.rush/temp/shrinkwrap-deps.json +181 -185
- package/dist/LICENSE.txt +4 -4
- package/dist/quantity-selector-button.d.ts.map +1 -1
- package/dist/quantity-selector.cjs.js +15 -15
- package/dist/quantity-selector.cjs.js.map +1 -1
- package/dist/quantity-selector.es.js +352 -344
- package/dist/quantity-selector.es.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +6 -6
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import { forwardRef as T, useId as
|
|
1
|
+
import { jsx as o, jsxs as q, Fragment as Yr } from "react/jsx-runtime";
|
|
2
|
+
import * as _ from "react";
|
|
3
|
+
import { forwardRef as T, useId as Jr, useRef as Kr, useState as rr, useEffect as tr } from "react";
|
|
4
4
|
import "react-dom";
|
|
5
|
-
function
|
|
5
|
+
function rt(t) {
|
|
6
6
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
7
7
|
}
|
|
8
|
-
var
|
|
8
|
+
var er = { 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
|
|
15
|
-
function
|
|
16
|
-
return
|
|
14
|
+
var nr;
|
|
15
|
+
function tt() {
|
|
16
|
+
return nr || (nr = 1, (function(t) {
|
|
17
17
|
(function() {
|
|
18
18
|
var i = {}.hasOwnProperty;
|
|
19
19
|
function n() {
|
|
@@ -42,54 +42,54 @@ function nt() {
|
|
|
42
42
|
}
|
|
43
43
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
44
44
|
})();
|
|
45
|
-
}(
|
|
45
|
+
})(er)), er.exports;
|
|
46
46
|
}
|
|
47
|
-
var
|
|
48
|
-
const
|
|
47
|
+
var et = tt();
|
|
48
|
+
const nt = /* @__PURE__ */ rt(et), ut = "_rotate_12t9p_1", it = "_dash_12t9p_1", pt = {
|
|
49
49
|
"purpur-spinner": "_purpur-spinner_12t9p_2",
|
|
50
|
-
rotate:
|
|
50
|
+
rotate: ut,
|
|
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: it,
|
|
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
|
+
}, ur = nt.bind(pt), D = "purpur-spinner", at = {
|
|
61
61
|
SM: "sm"
|
|
62
|
-
},
|
|
62
|
+
}, ot = ({
|
|
63
63
|
disabled: t = !1,
|
|
64
64
|
negative: i = !1,
|
|
65
|
-
size: n =
|
|
65
|
+
size: n = at.SM,
|
|
66
66
|
...a
|
|
67
|
-
}) => /* @__PURE__ */ o("div", { className:
|
|
67
|
+
}) => /* @__PURE__ */ o("div", { className: ur(D, `${D}--${n}`), ...a, children: /* @__PURE__ */ o("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ o(
|
|
68
68
|
"circle",
|
|
69
69
|
{
|
|
70
|
-
className:
|
|
71
|
-
[`${
|
|
72
|
-
[`${
|
|
70
|
+
className: ur(`${D}__circle`, {
|
|
71
|
+
[`${D}__circle--disabled`]: t,
|
|
72
|
+
[`${D}__circle--negative`]: i
|
|
73
73
|
}),
|
|
74
74
|
cx: "25",
|
|
75
75
|
cy: "25",
|
|
76
76
|
r: "20"
|
|
77
77
|
}
|
|
78
|
-
) }) }),
|
|
78
|
+
) }) }), st = {
|
|
79
79
|
LG: "lg"
|
|
80
80
|
};
|
|
81
|
-
function
|
|
81
|
+
function lt(t) {
|
|
82
82
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
83
83
|
}
|
|
84
|
-
var
|
|
84
|
+
var ir = { exports: {} };
|
|
85
85
|
/*!
|
|
86
86
|
Copyright (c) 2018 Jed Watson.
|
|
87
87
|
Licensed under the MIT License (MIT), see
|
|
88
88
|
http://jedwatson.github.io/classnames
|
|
89
89
|
*/
|
|
90
|
-
var
|
|
91
|
-
function
|
|
92
|
-
return
|
|
90
|
+
var pr;
|
|
91
|
+
function ct() {
|
|
92
|
+
return pr || (pr = 1, (function(t) {
|
|
93
93
|
(function() {
|
|
94
94
|
var i = {}.hasOwnProperty;
|
|
95
95
|
function n() {
|
|
@@ -118,32 +118,32 @@ function dt() {
|
|
|
118
118
|
}
|
|
119
119
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
120
120
|
})();
|
|
121
|
-
}(
|
|
121
|
+
})(ir)), ir.exports;
|
|
122
122
|
}
|
|
123
|
-
var
|
|
124
|
-
const
|
|
123
|
+
var _t = ct();
|
|
124
|
+
const dt = /* @__PURE__ */ lt(_t), ft = "_rotate_12t9p_1", gt = "_dash_12t9p_1", vt = {
|
|
125
125
|
"purpur-spinner": "_purpur-spinner_12t9p_2",
|
|
126
|
-
rotate:
|
|
126
|
+
rotate: ft,
|
|
127
127
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_12t9p_6",
|
|
128
128
|
"purpur-spinner--xs": "_purpur-spinner--xs_12t9p_10",
|
|
129
129
|
"purpur-spinner--sm": "_purpur-spinner--sm_12t9p_14",
|
|
130
130
|
"purpur-spinner--md": "_purpur-spinner--md_12t9p_18",
|
|
131
131
|
"purpur-spinner--lg": "_purpur-spinner--lg_12t9p_22",
|
|
132
132
|
"purpur-spinner__circle": "_purpur-spinner__circle_12t9p_26",
|
|
133
|
-
dash:
|
|
133
|
+
dash: gt,
|
|
134
134
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_12t9p_41",
|
|
135
135
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_12t9p_44"
|
|
136
|
-
},
|
|
136
|
+
}, ar = dt.bind(vt), L = "purpur-spinner", bt = {
|
|
137
137
|
SM: "sm"
|
|
138
|
-
},
|
|
138
|
+
}, mt = ({
|
|
139
139
|
disabled: t = !1,
|
|
140
140
|
negative: i = !1,
|
|
141
|
-
size: n =
|
|
141
|
+
size: n = bt.SM,
|
|
142
142
|
...a
|
|
143
|
-
}) => /* @__PURE__ */ o("div", { className:
|
|
143
|
+
}) => /* @__PURE__ */ o("div", { className: ar(L, `${L}--${n}`), ...a, children: /* @__PURE__ */ o("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ o(
|
|
144
144
|
"circle",
|
|
145
145
|
{
|
|
146
|
-
className:
|
|
146
|
+
className: ar(`${L}__circle`, {
|
|
147
147
|
[`${L}__circle--disabled`]: t,
|
|
148
148
|
[`${L}__circle--negative`]: i
|
|
149
149
|
}),
|
|
@@ -152,18 +152,18 @@ const gt = /* @__PURE__ */ _t(ft), vt = "_rotate_12t9p_1", bt = "_dash_12t9p_1",
|
|
|
152
152
|
r: "20"
|
|
153
153
|
}
|
|
154
154
|
) }) });
|
|
155
|
-
function
|
|
155
|
+
function yt(t) {
|
|
156
156
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
157
157
|
}
|
|
158
|
-
var
|
|
158
|
+
var or = { exports: {} };
|
|
159
159
|
/*!
|
|
160
160
|
Copyright (c) 2018 Jed Watson.
|
|
161
161
|
Licensed under the MIT License (MIT), see
|
|
162
162
|
http://jedwatson.github.io/classnames
|
|
163
163
|
*/
|
|
164
|
-
var
|
|
165
|
-
function
|
|
166
|
-
return
|
|
164
|
+
var sr;
|
|
165
|
+
function ht() {
|
|
166
|
+
return sr || (sr = 1, (function(t) {
|
|
167
167
|
(function() {
|
|
168
168
|
var i = {}.hasOwnProperty;
|
|
169
169
|
function n() {
|
|
@@ -192,10 +192,10 @@ function $t() {
|
|
|
192
192
|
}
|
|
193
193
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
194
194
|
})();
|
|
195
|
-
}(
|
|
195
|
+
})(or)), or.exports;
|
|
196
196
|
}
|
|
197
|
-
var
|
|
198
|
-
const
|
|
197
|
+
var xt = ht();
|
|
198
|
+
const $t = /* @__PURE__ */ yt(xt), wt = {
|
|
199
199
|
"purpur-button": "_purpur-button_1goi7_1",
|
|
200
200
|
"purpur-button--xs": "_purpur-button--xs_1goi7_33",
|
|
201
201
|
"purpur-button--icon-only": "_purpur-button--icon-only_1goi7_36",
|
|
@@ -217,7 +217,7 @@ const St = /* @__PURE__ */ xt(wt), Nt = {
|
|
|
217
217
|
"purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-negative_1goi7_166",
|
|
218
218
|
"purpur-button--text-negative": "_purpur-button--text-negative_1goi7_181",
|
|
219
219
|
"purpur-button--text": "_purpur-button--text_1goi7_181"
|
|
220
|
-
},
|
|
220
|
+
}, St = $t.bind(wt), C = "purpur-button", Lr = T(
|
|
221
221
|
({
|
|
222
222
|
children: t,
|
|
223
223
|
className: i,
|
|
@@ -227,18 +227,18 @@ const St = /* @__PURE__ */ xt(wt), Nt = {
|
|
|
227
227
|
loading: r = !1,
|
|
228
228
|
negative: e = !1,
|
|
229
229
|
onClick: u,
|
|
230
|
-
size:
|
|
231
|
-
variant:
|
|
232
|
-
type:
|
|
233
|
-
...
|
|
230
|
+
size: d = "md",
|
|
231
|
+
variant: l,
|
|
232
|
+
type: y = "button",
|
|
233
|
+
...f
|
|
234
234
|
}, j) => {
|
|
235
|
-
if (p &&
|
|
235
|
+
if (p && l === "destructive")
|
|
236
236
|
return null;
|
|
237
|
-
const A =
|
|
237
|
+
const A = St(
|
|
238
238
|
[
|
|
239
239
|
C,
|
|
240
|
-
`${C}--${e ? `${
|
|
241
|
-
`${C}--${
|
|
240
|
+
`${C}--${e ? `${l}-negative` : l}`,
|
|
241
|
+
`${C}--${d}`
|
|
242
242
|
],
|
|
243
243
|
{
|
|
244
244
|
[`${C}--icon-only`]: p,
|
|
@@ -247,25 +247,25 @@ const St = /* @__PURE__ */ xt(wt), Nt = {
|
|
|
247
247
|
[`${C}--disabled`]: n || r
|
|
248
248
|
},
|
|
249
249
|
i
|
|
250
|
-
), s = (
|
|
251
|
-
n || r ?
|
|
252
|
-
},
|
|
253
|
-
return /* @__PURE__ */
|
|
250
|
+
), s = (h) => {
|
|
251
|
+
n || r ? h.preventDefault() : u && u(h);
|
|
252
|
+
}, b = !!f["aria-disabled"] || n || r;
|
|
253
|
+
return /* @__PURE__ */ q(
|
|
254
254
|
"button",
|
|
255
255
|
{
|
|
256
256
|
className: A,
|
|
257
|
-
type:
|
|
257
|
+
type: y,
|
|
258
258
|
ref: j,
|
|
259
|
-
"aria-disabled":
|
|
259
|
+
"aria-disabled": b,
|
|
260
260
|
onClick: s,
|
|
261
|
-
...
|
|
261
|
+
...f,
|
|
262
262
|
children: [
|
|
263
263
|
r && /* @__PURE__ */ o(
|
|
264
|
-
|
|
264
|
+
mt,
|
|
265
265
|
{
|
|
266
|
-
size:
|
|
266
|
+
size: d === st.LG ? "xs" : "xxs",
|
|
267
267
|
negative: e,
|
|
268
|
-
disabled:
|
|
268
|
+
disabled: b
|
|
269
269
|
}
|
|
270
270
|
),
|
|
271
271
|
" ",
|
|
@@ -275,19 +275,19 @@ const St = /* @__PURE__ */ xt(wt), Nt = {
|
|
|
275
275
|
);
|
|
276
276
|
}
|
|
277
277
|
);
|
|
278
|
-
|
|
279
|
-
function
|
|
278
|
+
Lr.displayName = "Button";
|
|
279
|
+
function Nt(t) {
|
|
280
280
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
281
281
|
}
|
|
282
|
-
var
|
|
282
|
+
var lr = { exports: {} };
|
|
283
283
|
/*!
|
|
284
284
|
Copyright (c) 2018 Jed Watson.
|
|
285
285
|
Licensed under the MIT License (MIT), see
|
|
286
286
|
http://jedwatson.github.io/classnames
|
|
287
287
|
*/
|
|
288
|
-
var
|
|
289
|
-
function
|
|
290
|
-
return
|
|
288
|
+
var cr;
|
|
289
|
+
function Ot() {
|
|
290
|
+
return cr || (cr = 1, (function(t) {
|
|
291
291
|
(function() {
|
|
292
292
|
var i = {}.hasOwnProperty;
|
|
293
293
|
function n() {
|
|
@@ -316,10 +316,10 @@ function jt() {
|
|
|
316
316
|
}
|
|
317
317
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
318
318
|
})();
|
|
319
|
-
}(
|
|
319
|
+
})(lr)), lr.exports;
|
|
320
320
|
}
|
|
321
|
-
var
|
|
322
|
-
const
|
|
321
|
+
var qt = Ot();
|
|
322
|
+
const jt = /* @__PURE__ */ Nt(qt), At = {
|
|
323
323
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
324
324
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
325
325
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -327,23 +327,23 @@ const Mt = /* @__PURE__ */ qt(At), Pt = {
|
|
|
327
327
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
328
328
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
329
329
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
330
|
-
},
|
|
330
|
+
}, Mt = jt.bind(At), _r = "purpur-icon", Pt = "md", kt = (t) => t.filter((i) => Object.keys(i).length >= 1).map((i) => `${i.name}="${i.value}"`).join(" "), Ct = ({ content: t = "", title: i } = {}) => {
|
|
331
331
|
const n = [
|
|
332
332
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
333
333
|
{ name: "fill", value: "currentColor" },
|
|
334
334
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
335
335
|
i ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
336
336
|
], a = i ? `<title>${i}</title>` : "";
|
|
337
|
-
return `<svg ${
|
|
338
|
-
},
|
|
339
|
-
const r =
|
|
340
|
-
content:
|
|
337
|
+
return `<svg ${kt(n)}>${a}${t}</svg>`;
|
|
338
|
+
}, Bt = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Er = ({ svg: t, allyTitle: i, className: n, size: a = Pt, ...p }) => {
|
|
339
|
+
const r = Ct({
|
|
340
|
+
content: Bt(t.svg),
|
|
341
341
|
title: i
|
|
342
|
-
}), e =
|
|
342
|
+
}), e = Mt(n, _r, `${_r}--${a}`);
|
|
343
343
|
return /* @__PURE__ */ o("span", { className: e, dangerouslySetInnerHTML: { __html: r }, ...p });
|
|
344
344
|
};
|
|
345
|
-
|
|
346
|
-
const
|
|
345
|
+
Er.displayName = "Icon";
|
|
346
|
+
const zt = {
|
|
347
347
|
name: "error-filled",
|
|
348
348
|
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>',
|
|
349
349
|
keywords: ["error-filled"],
|
|
@@ -352,15 +352,15 @@ const Dt = {
|
|
|
352
352
|
function It(t) {
|
|
353
353
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
354
354
|
}
|
|
355
|
-
var
|
|
355
|
+
var dr = { exports: {} };
|
|
356
356
|
/*!
|
|
357
357
|
Copyright (c) 2018 Jed Watson.
|
|
358
358
|
Licensed under the MIT License (MIT), see
|
|
359
359
|
http://jedwatson.github.io/classnames
|
|
360
360
|
*/
|
|
361
|
-
var
|
|
362
|
-
function
|
|
363
|
-
return
|
|
361
|
+
var fr;
|
|
362
|
+
function Rt() {
|
|
363
|
+
return fr || (fr = 1, (function(t) {
|
|
364
364
|
(function() {
|
|
365
365
|
var i = {}.hasOwnProperty;
|
|
366
366
|
function n() {
|
|
@@ -389,46 +389,46 @@ function Lt() {
|
|
|
389
389
|
}
|
|
390
390
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
391
391
|
})();
|
|
392
|
-
}(
|
|
392
|
+
})(dr)), dr.exports;
|
|
393
393
|
}
|
|
394
|
-
var
|
|
395
|
-
const
|
|
394
|
+
var Dt = Rt();
|
|
395
|
+
const Lt = /* @__PURE__ */ It(Dt), Et = {
|
|
396
396
|
"purpur-field-error-text": "_purpur-field-error-text_u1cy2_1",
|
|
397
397
|
"purpur-field-error-text--negative": "_purpur-field-error-text--negative_u1cy2_11",
|
|
398
398
|
"purpur-field-error-text__icon": "_purpur-field-error-text__icon_u1cy2_14"
|
|
399
|
-
},
|
|
399
|
+
}, gr = Lt.bind(Et), G = "purpur-field-error-text", Vt = ({
|
|
400
400
|
children: t,
|
|
401
401
|
className: i,
|
|
402
402
|
negative: n = !1,
|
|
403
403
|
["aria-relevant"]: a = "additions text",
|
|
404
404
|
...p
|
|
405
|
-
}) => /* @__PURE__ */
|
|
405
|
+
}) => /* @__PURE__ */ q(
|
|
406
406
|
"div",
|
|
407
407
|
{
|
|
408
|
-
className:
|
|
408
|
+
className: gr(i, G, {
|
|
409
409
|
[`${G}--negative`]: n
|
|
410
410
|
}),
|
|
411
411
|
"aria-live": "assertive",
|
|
412
412
|
"aria-relevant": a,
|
|
413
413
|
...p,
|
|
414
414
|
children: [
|
|
415
|
-
/* @__PURE__ */ o(
|
|
415
|
+
/* @__PURE__ */ o(Er, { svg: zt, size: "xs", className: gr(`${G}__icon`) }),
|
|
416
416
|
t
|
|
417
417
|
]
|
|
418
418
|
}
|
|
419
419
|
);
|
|
420
|
-
function
|
|
420
|
+
function Ft(t) {
|
|
421
421
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
422
422
|
}
|
|
423
|
-
var
|
|
423
|
+
var vr = { exports: {} };
|
|
424
424
|
/*!
|
|
425
425
|
Copyright (c) 2018 Jed Watson.
|
|
426
426
|
Licensed under the MIT License (MIT), see
|
|
427
427
|
http://jedwatson.github.io/classnames
|
|
428
428
|
*/
|
|
429
|
-
var
|
|
430
|
-
function
|
|
431
|
-
return
|
|
429
|
+
var br;
|
|
430
|
+
function Zt() {
|
|
431
|
+
return br || (br = 1, (function(t) {
|
|
432
432
|
(function() {
|
|
433
433
|
var i = {}.hasOwnProperty;
|
|
434
434
|
function n() {
|
|
@@ -457,14 +457,14 @@ function Tt() {
|
|
|
457
457
|
}
|
|
458
458
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
459
459
|
})();
|
|
460
|
-
}(
|
|
460
|
+
})(vr)), vr.exports;
|
|
461
461
|
}
|
|
462
|
-
var
|
|
463
|
-
const
|
|
462
|
+
var Ht = Zt();
|
|
463
|
+
const Tt = /* @__PURE__ */ Ft(Ht), Wt = {
|
|
464
464
|
"purpur-field-helper-text": "_purpur-field-helper-text_11nsh_1",
|
|
465
465
|
"purpur-field-helper-text--disabled": "_purpur-field-helper-text--disabled_11nsh_9",
|
|
466
466
|
"purpur-field-helper-text--negative": "_purpur-field-helper-text--negative_11nsh_12"
|
|
467
|
-
},
|
|
467
|
+
}, Gt = Tt.bind(Wt), Q = "purpur-field-helper-text", Qt = ({
|
|
468
468
|
children: t,
|
|
469
469
|
className: i,
|
|
470
470
|
disabled: n,
|
|
@@ -472,24 +472,24 @@ const Gt = /* @__PURE__ */ Ht(Wt), Qt = {
|
|
|
472
472
|
negative: p,
|
|
473
473
|
...r
|
|
474
474
|
}) => {
|
|
475
|
-
const e =
|
|
475
|
+
const e = Gt(i, Q, {
|
|
476
476
|
[`${Q}--disabled`]: n,
|
|
477
477
|
[`${Q}--negative`]: p
|
|
478
478
|
});
|
|
479
479
|
return /* @__PURE__ */ o("span", { id: a, className: e, ...r, children: t });
|
|
480
480
|
};
|
|
481
|
-
function
|
|
481
|
+
function Ut(t) {
|
|
482
482
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
483
483
|
}
|
|
484
|
-
var
|
|
484
|
+
var mr = { exports: {} };
|
|
485
485
|
/*!
|
|
486
486
|
Copyright (c) 2018 Jed Watson.
|
|
487
487
|
Licensed under the MIT License (MIT), see
|
|
488
488
|
http://jedwatson.github.io/classnames
|
|
489
489
|
*/
|
|
490
|
-
var
|
|
491
|
-
function
|
|
492
|
-
return
|
|
490
|
+
var yr;
|
|
491
|
+
function Xt() {
|
|
492
|
+
return yr || (yr = 1, (function(t) {
|
|
493
493
|
(function() {
|
|
494
494
|
var i = {}.hasOwnProperty;
|
|
495
495
|
function n() {
|
|
@@ -518,10 +518,10 @@ function Jt() {
|
|
|
518
518
|
}
|
|
519
519
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
520
520
|
})();
|
|
521
|
-
}(
|
|
521
|
+
})(mr)), mr.exports;
|
|
522
522
|
}
|
|
523
|
-
var
|
|
524
|
-
const
|
|
523
|
+
var Yt = Xt();
|
|
524
|
+
const Jt = /* @__PURE__ */ Ut(Yt), Kt = {
|
|
525
525
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
526
526
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
527
527
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -529,85 +529,92 @@ const re = /* @__PURE__ */ Yt(Kt), te = {
|
|
|
529
529
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
530
530
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
531
531
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
532
|
-
},
|
|
532
|
+
}, re = Jt.bind(Kt), hr = "purpur-icon", te = "md", ee = (t) => t.filter((i) => Object.keys(i).length >= 1).map((i) => `${i.name}="${i.value}"`).join(" "), ne = ({ content: t = "", title: i } = {}) => {
|
|
533
533
|
const n = [
|
|
534
534
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
535
535
|
{ name: "fill", value: "currentColor" },
|
|
536
536
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
537
537
|
i ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
538
538
|
], a = i ? `<title>${i}</title>` : "";
|
|
539
|
-
return `<svg ${
|
|
540
|
-
},
|
|
541
|
-
const r =
|
|
542
|
-
content:
|
|
539
|
+
return `<svg ${ee(n)}>${a}${t}</svg>`;
|
|
540
|
+
}, ue = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Y = ({ svg: t, allyTitle: i, className: n, size: a = te, ...p }) => {
|
|
541
|
+
const r = ne({
|
|
542
|
+
content: ue(t.svg),
|
|
543
543
|
title: i
|
|
544
|
-
}), e =
|
|
544
|
+
}), e = re(n, hr, `${hr}--${a}`);
|
|
545
545
|
return /* @__PURE__ */ o("span", { className: e, dangerouslySetInnerHTML: { __html: r }, ...p });
|
|
546
546
|
};
|
|
547
|
-
|
|
548
|
-
const
|
|
547
|
+
Y.displayName = "Icon";
|
|
548
|
+
const ie = {
|
|
549
549
|
name: "check-circle-filled",
|
|
550
550
|
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>',
|
|
551
551
|
keywords: ["check-circle-filled"],
|
|
552
552
|
category: "status"
|
|
553
|
-
},
|
|
554
|
-
|
|
555
|
-
const
|
|
553
|
+
}, Vr = (t) => /* @__PURE__ */ o(Y, { ...t, svg: ie });
|
|
554
|
+
Vr.displayName = "IconCheckCircleFilled";
|
|
555
|
+
const pe = {
|
|
556
556
|
name: "close",
|
|
557
557
|
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>',
|
|
558
558
|
keywords: ["close"],
|
|
559
559
|
category: "utility"
|
|
560
|
-
},
|
|
561
|
-
|
|
562
|
-
function
|
|
560
|
+
}, Fr = (t) => /* @__PURE__ */ o(Y, { ...t, svg: pe });
|
|
561
|
+
Fr.displayName = "IconClose";
|
|
562
|
+
function xr(t, i) {
|
|
563
563
|
if (typeof t == "function")
|
|
564
564
|
return t(i);
|
|
565
565
|
t != null && (t.current = i);
|
|
566
566
|
}
|
|
567
|
-
function
|
|
567
|
+
function ae(...t) {
|
|
568
568
|
return (i) => {
|
|
569
569
|
let n = !1;
|
|
570
570
|
const a = t.map((p) => {
|
|
571
|
-
const r =
|
|
571
|
+
const r = xr(p, i);
|
|
572
572
|
return !n && typeof r == "function" && (n = !0), r;
|
|
573
573
|
});
|
|
574
574
|
if (n)
|
|
575
575
|
return () => {
|
|
576
576
|
for (let p = 0; p < a.length; p++) {
|
|
577
577
|
const r = a[p];
|
|
578
|
-
typeof r == "function" ? r() :
|
|
578
|
+
typeof r == "function" ? r() : xr(t[p], null);
|
|
579
579
|
}
|
|
580
580
|
};
|
|
581
581
|
};
|
|
582
582
|
}
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
const
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
}
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
583
|
+
// @__NO_SIDE_EFFECTS__
|
|
584
|
+
function oe(t) {
|
|
585
|
+
const i = /* @__PURE__ */ se(t), n = _.forwardRef((a, p) => {
|
|
586
|
+
const { children: r, ...e } = a, u = _.Children.toArray(r), d = u.find(ce);
|
|
587
|
+
if (d) {
|
|
588
|
+
const l = d.props.children, y = u.map((f) => f === d ? _.Children.count(l) > 1 ? _.Children.only(null) : _.isValidElement(l) ? l.props.children : null : f);
|
|
589
|
+
return /* @__PURE__ */ o(i, { ...e, ref: p, children: _.isValidElement(l) ? _.cloneElement(l, void 0, y) : null });
|
|
590
|
+
}
|
|
591
|
+
return /* @__PURE__ */ o(i, { ...e, ref: p, children: r });
|
|
592
|
+
});
|
|
593
|
+
return n.displayName = `${t}.Slot`, n;
|
|
594
|
+
}
|
|
595
|
+
// @__NO_SIDE_EFFECTS__
|
|
596
|
+
function se(t) {
|
|
597
|
+
const i = _.forwardRef((n, a) => {
|
|
598
|
+
const { children: p, ...r } = n;
|
|
599
|
+
if (_.isValidElement(p)) {
|
|
600
|
+
const e = de(p), u = _e(r, p.props);
|
|
601
|
+
return p.type !== _.Fragment && (u.ref = a ? ae(a, e) : e), _.cloneElement(p, u);
|
|
602
|
+
}
|
|
603
|
+
return _.Children.count(p) > 1 ? _.Children.only(null) : null;
|
|
604
|
+
});
|
|
605
|
+
return i.displayName = `${t}.SlotClone`, i;
|
|
606
|
+
}
|
|
607
|
+
var le = Symbol("radix.slottable");
|
|
602
608
|
function ce(t) {
|
|
603
|
-
return
|
|
609
|
+
return _.isValidElement(t) && typeof t.type == "function" && "__radixId" in t.type && t.type.__radixId === le;
|
|
604
610
|
}
|
|
605
611
|
function _e(t, i) {
|
|
606
612
|
const n = { ...i };
|
|
607
613
|
for (const a in i) {
|
|
608
614
|
const p = t[a], r = i[a];
|
|
609
615
|
/^on[A-Z]/.test(a) ? p && r ? n[a] = (...e) => {
|
|
610
|
-
r(...e)
|
|
616
|
+
const u = r(...e);
|
|
617
|
+
return p(...e), u;
|
|
611
618
|
} : p && (n[a] = p) : a === "style" ? n[a] = { ...p, ...r } : a === "className" && (n[a] = [p, r].filter(Boolean).join(" "));
|
|
612
619
|
}
|
|
613
620
|
return { ...t, ...n };
|
|
@@ -631,16 +638,17 @@ var fe = [
|
|
|
631
638
|
"nav",
|
|
632
639
|
"ol",
|
|
633
640
|
"p",
|
|
641
|
+
"select",
|
|
634
642
|
"span",
|
|
635
643
|
"svg",
|
|
636
644
|
"ul"
|
|
637
645
|
], ge = fe.reduce((t, i) => {
|
|
638
|
-
const n =
|
|
639
|
-
const { asChild:
|
|
640
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ o(
|
|
646
|
+
const n = /* @__PURE__ */ oe(`Primitive.${i}`), a = _.forwardRef((p, r) => {
|
|
647
|
+
const { asChild: e, ...u } = p, d = e ? n : i;
|
|
648
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ o(d, { ...u, ref: r });
|
|
641
649
|
});
|
|
642
|
-
return
|
|
643
|
-
}, {}), ve = "Label",
|
|
650
|
+
return a.displayName = `Primitive.${i}`, { ...t, [i]: a };
|
|
651
|
+
}, {}), ve = "Label", Zr = _.forwardRef((t, i) => /* @__PURE__ */ o(
|
|
644
652
|
ge.label,
|
|
645
653
|
{
|
|
646
654
|
...t,
|
|
@@ -651,20 +659,20 @@ var fe = [
|
|
|
651
659
|
}
|
|
652
660
|
}
|
|
653
661
|
));
|
|
654
|
-
|
|
655
|
-
var be =
|
|
662
|
+
Zr.displayName = ve;
|
|
663
|
+
var be = Zr;
|
|
656
664
|
function me(t) {
|
|
657
665
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
658
666
|
}
|
|
659
|
-
var
|
|
667
|
+
var $r = { exports: {} };
|
|
660
668
|
/*!
|
|
661
669
|
Copyright (c) 2018 Jed Watson.
|
|
662
670
|
Licensed under the MIT License (MIT), see
|
|
663
671
|
http://jedwatson.github.io/classnames
|
|
664
672
|
*/
|
|
665
|
-
var
|
|
673
|
+
var wr;
|
|
666
674
|
function ye() {
|
|
667
|
-
return
|
|
675
|
+
return wr || (wr = 1, (function(t) {
|
|
668
676
|
(function() {
|
|
669
677
|
var i = {}.hasOwnProperty;
|
|
670
678
|
function n() {
|
|
@@ -693,7 +701,7 @@ function ye() {
|
|
|
693
701
|
}
|
|
694
702
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
695
703
|
})();
|
|
696
|
-
}(
|
|
704
|
+
})($r)), $r.exports;
|
|
697
705
|
}
|
|
698
706
|
var he = ye();
|
|
699
707
|
const xe = /* @__PURE__ */ me(he), $e = {
|
|
@@ -716,15 +724,15 @@ const xe = /* @__PURE__ */ me(he), $e = {
|
|
|
716
724
|
function Ne(t) {
|
|
717
725
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
718
726
|
}
|
|
719
|
-
var
|
|
727
|
+
var Sr = { exports: {} };
|
|
720
728
|
/*!
|
|
721
729
|
Copyright (c) 2018 Jed Watson.
|
|
722
730
|
Licensed under the MIT License (MIT), see
|
|
723
731
|
http://jedwatson.github.io/classnames
|
|
724
732
|
*/
|
|
725
|
-
var
|
|
733
|
+
var Nr;
|
|
726
734
|
function Oe() {
|
|
727
|
-
return
|
|
735
|
+
return Nr || (Nr = 1, (function(t) {
|
|
728
736
|
(function() {
|
|
729
737
|
var i = {}.hasOwnProperty;
|
|
730
738
|
function n() {
|
|
@@ -753,7 +761,7 @@ function Oe() {
|
|
|
753
761
|
}
|
|
754
762
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
755
763
|
})();
|
|
756
|
-
}(
|
|
764
|
+
})(Sr)), Sr.exports;
|
|
757
765
|
}
|
|
758
766
|
var qe = Oe();
|
|
759
767
|
const je = /* @__PURE__ */ Ne(qe), Ae = "_rotate_12t9p_1", Me = "_dash_12t9p_1", Pe = {
|
|
@@ -768,17 +776,17 @@ const je = /* @__PURE__ */ Ne(qe), Ae = "_rotate_12t9p_1", Me = "_dash_12t9p_1",
|
|
|
768
776
|
dash: Me,
|
|
769
777
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_12t9p_41",
|
|
770
778
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_12t9p_44"
|
|
771
|
-
},
|
|
779
|
+
}, Or = je.bind(Pe), E = "purpur-spinner", ke = {
|
|
772
780
|
SM: "sm"
|
|
773
781
|
}, Ce = ({
|
|
774
782
|
disabled: t = !1,
|
|
775
783
|
negative: i = !1,
|
|
776
784
|
size: n = ke.SM,
|
|
777
785
|
...a
|
|
778
|
-
}) => /* @__PURE__ */ o("div", { className:
|
|
786
|
+
}) => /* @__PURE__ */ o("div", { className: Or(E, `${E}--${n}`), ...a, children: /* @__PURE__ */ o("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ o(
|
|
779
787
|
"circle",
|
|
780
788
|
{
|
|
781
|
-
className:
|
|
789
|
+
className: Or(`${E}__circle`, {
|
|
782
790
|
[`${E}__circle--disabled`]: t,
|
|
783
791
|
[`${E}__circle--negative`]: i
|
|
784
792
|
}),
|
|
@@ -787,18 +795,18 @@ const je = /* @__PURE__ */ Ne(qe), Ae = "_rotate_12t9p_1", Me = "_dash_12t9p_1",
|
|
|
787
795
|
r: "20"
|
|
788
796
|
}
|
|
789
797
|
) }) });
|
|
790
|
-
function
|
|
798
|
+
function Be(t) {
|
|
791
799
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
792
800
|
}
|
|
793
|
-
var
|
|
801
|
+
var qr = { exports: {} };
|
|
794
802
|
/*!
|
|
795
803
|
Copyright (c) 2018 Jed Watson.
|
|
796
804
|
Licensed under the MIT License (MIT), see
|
|
797
805
|
http://jedwatson.github.io/classnames
|
|
798
806
|
*/
|
|
799
|
-
var
|
|
800
|
-
function
|
|
801
|
-
return
|
|
807
|
+
var jr;
|
|
808
|
+
function ze() {
|
|
809
|
+
return jr || (jr = 1, (function(t) {
|
|
802
810
|
(function() {
|
|
803
811
|
var i = {}.hasOwnProperty;
|
|
804
812
|
function n() {
|
|
@@ -827,10 +835,10 @@ function Be() {
|
|
|
827
835
|
}
|
|
828
836
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
829
837
|
})();
|
|
830
|
-
}(
|
|
838
|
+
})(qr)), qr.exports;
|
|
831
839
|
}
|
|
832
|
-
var
|
|
833
|
-
const
|
|
840
|
+
var Ie = ze();
|
|
841
|
+
const Re = /* @__PURE__ */ Be(Ie), De = {
|
|
834
842
|
"purpur-text-field": "_purpur-text-field_3gl1k_1",
|
|
835
843
|
"purpur-text-field__label": "_purpur-text-field__label_3gl1k_7",
|
|
836
844
|
"purpur-text-field__label-text": "_purpur-text-field__label-text_3gl1k_12",
|
|
@@ -847,7 +855,7 @@ const De = /* @__PURE__ */ ze(Re), Ie = {
|
|
|
847
855
|
"purpur-text-field__input--error": "_purpur-text-field__input--error_3gl1k_94",
|
|
848
856
|
"purpur-text-field__adornment-container": "_purpur-text-field__adornment-container_3gl1k_106",
|
|
849
857
|
"purpur-text-field__valid-icon": "_purpur-text-field__valid-icon_3gl1k_111"
|
|
850
|
-
}, Le = (t) =>
|
|
858
|
+
}, Le = (t) => Kr(t), O = Re.bind(De), c = "purpur-text-field", Hr = T(
|
|
851
859
|
({
|
|
852
860
|
["data-testid"]: t,
|
|
853
861
|
className: i,
|
|
@@ -857,81 +865,81 @@ const De = /* @__PURE__ */ ze(Re), Ie = {
|
|
|
857
865
|
endAdornment: r,
|
|
858
866
|
errorText: e,
|
|
859
867
|
helperText: u,
|
|
860
|
-
hideRequiredAsterisk:
|
|
861
|
-
label:
|
|
862
|
-
loading:
|
|
863
|
-
onClear:
|
|
868
|
+
hideRequiredAsterisk: d = !1,
|
|
869
|
+
label: l,
|
|
870
|
+
loading: y = !1,
|
|
871
|
+
onClear: f,
|
|
864
872
|
startAdornment: j,
|
|
865
873
|
valid: A = !1,
|
|
866
874
|
...s
|
|
867
|
-
},
|
|
868
|
-
var
|
|
869
|
-
const Z =
|
|
870
|
-
P.current =
|
|
875
|
+
}, b) => {
|
|
876
|
+
var h;
|
|
877
|
+
const Z = Jr(), M = s.id ?? Z, m = (g) => t ? `${t}-${g}` : void 0, x = A && !e, $ = u ? `${M}-helper-text` : void 0, z = [j].filter((g) => !!g), w = (typeof s.value == "number" ? s.value !== void 0 : (h = s.value) == null ? void 0 : h.length) && !s.disabled && !s.readOnly && !y && f && n, P = Le(null), I = (g) => {
|
|
878
|
+
P.current = g, typeof b == "function" ? b(g) : b && (b.current = g);
|
|
871
879
|
}, k = () => {
|
|
872
|
-
var
|
|
873
|
-
|
|
874
|
-
},
|
|
875
|
-
|
|
880
|
+
var g;
|
|
881
|
+
f == null || f(), (g = P.current) == null || g.focus();
|
|
882
|
+
}, N = [
|
|
883
|
+
y && /* @__PURE__ */ o(
|
|
876
884
|
Ce,
|
|
877
885
|
{
|
|
878
886
|
disabled: s.disabled,
|
|
879
887
|
size: "xs",
|
|
880
|
-
"data-testid":
|
|
888
|
+
"data-testid": m("spinner")
|
|
881
889
|
},
|
|
882
890
|
"spinner"
|
|
883
891
|
),
|
|
884
|
-
|
|
885
|
-
|
|
892
|
+
w && /* @__PURE__ */ o(
|
|
893
|
+
Lr,
|
|
886
894
|
{
|
|
887
895
|
variant: "tertiary-purple",
|
|
888
896
|
onClick: k,
|
|
889
897
|
iconOnly: !0,
|
|
890
898
|
"aria-label": n ?? "",
|
|
891
|
-
"data-testid":
|
|
899
|
+
"data-testid": m("clear-button"),
|
|
892
900
|
tabIndex: -1,
|
|
893
|
-
children: /* @__PURE__ */ o(
|
|
901
|
+
children: /* @__PURE__ */ o(Fr, { size: "xs" })
|
|
894
902
|
},
|
|
895
903
|
"clear-button"
|
|
896
904
|
),
|
|
897
|
-
|
|
898
|
-
|
|
905
|
+
x && /* @__PURE__ */ o(
|
|
906
|
+
Vr,
|
|
899
907
|
{
|
|
900
|
-
"data-testid":
|
|
901
|
-
className:
|
|
908
|
+
"data-testid": m("valid-icon"),
|
|
909
|
+
className: O(`${c}__valid-icon`)
|
|
902
910
|
},
|
|
903
911
|
"valid-icon"
|
|
904
912
|
)
|
|
905
|
-
].filter((
|
|
906
|
-
[`${
|
|
907
|
-
[`${
|
|
908
|
-
[`${
|
|
909
|
-
[`${
|
|
910
|
-
[`${
|
|
913
|
+
].filter((g) => !!g), W = O(`${c}__input-container`, {
|
|
914
|
+
[`${c}__input-container--start-adornment`]: z.length,
|
|
915
|
+
[`${c}__input-container--end-adornment`]: N.length || r,
|
|
916
|
+
[`${c}__input-container--disabled`]: s.disabled,
|
|
917
|
+
[`${c}__input-container--has-clear-button`]: w,
|
|
918
|
+
[`${c}__input-container--readonly`]: s.readOnly && !s.disabled
|
|
911
919
|
});
|
|
912
|
-
return /* @__PURE__ */
|
|
913
|
-
|
|
920
|
+
return /* @__PURE__ */ q("div", { className: O(i, c), children: [
|
|
921
|
+
l && /* @__PURE__ */ q(
|
|
914
922
|
Se,
|
|
915
923
|
{
|
|
916
924
|
htmlFor: M,
|
|
917
|
-
className:
|
|
918
|
-
"data-testid":
|
|
925
|
+
className: O(`${c}__label`),
|
|
926
|
+
"data-testid": m("label"),
|
|
919
927
|
disabled: s.disabled,
|
|
920
928
|
children: [
|
|
921
|
-
s.required && !
|
|
922
|
-
|
|
929
|
+
s.required && !d && /* @__PURE__ */ o("span", { "aria-hidden": !0, children: "*" }),
|
|
930
|
+
l
|
|
923
931
|
]
|
|
924
932
|
}
|
|
925
933
|
),
|
|
926
|
-
/* @__PURE__ */
|
|
934
|
+
/* @__PURE__ */ q("div", { className: O(`${c}__field-row`), children: [
|
|
927
935
|
!!a && a,
|
|
928
|
-
/* @__PURE__ */
|
|
929
|
-
!!
|
|
936
|
+
/* @__PURE__ */ q("div", { className: W, children: [
|
|
937
|
+
!!z.length && /* @__PURE__ */ o(
|
|
930
938
|
"div",
|
|
931
939
|
{
|
|
932
|
-
"data-testid":
|
|
933
|
-
className:
|
|
934
|
-
children:
|
|
940
|
+
"data-testid": m("start-adornments"),
|
|
941
|
+
className: O(`${c}__adornment-container`),
|
|
942
|
+
children: z
|
|
935
943
|
}
|
|
936
944
|
),
|
|
937
945
|
/* @__PURE__ */ o(
|
|
@@ -939,27 +947,27 @@ const De = /* @__PURE__ */ ze(Re), Ie = {
|
|
|
939
947
|
{
|
|
940
948
|
...s,
|
|
941
949
|
id: M,
|
|
942
|
-
ref:
|
|
943
|
-
"data-testid":
|
|
944
|
-
"aria-describedby": s["aria-describedby"] ||
|
|
950
|
+
ref: I,
|
|
951
|
+
"data-testid": m("input"),
|
|
952
|
+
"aria-describedby": s["aria-describedby"] || $,
|
|
945
953
|
"aria-invalid": s["aria-invalid"] || !!e,
|
|
946
|
-
className:
|
|
947
|
-
`${
|
|
954
|
+
className: O([
|
|
955
|
+
`${c}__input`,
|
|
948
956
|
{
|
|
949
|
-
[`${
|
|
950
|
-
[`${
|
|
957
|
+
[`${c}__input--valid`]: x,
|
|
958
|
+
[`${c}__input--error`]: !!e
|
|
951
959
|
}
|
|
952
960
|
])
|
|
953
961
|
}
|
|
954
962
|
),
|
|
955
|
-
/* @__PURE__ */ o("div", { className:
|
|
956
|
-
(!!
|
|
963
|
+
/* @__PURE__ */ o("div", { className: O(`${c}__frame`) }),
|
|
964
|
+
(!!N.length || r) && /* @__PURE__ */ q(
|
|
957
965
|
"div",
|
|
958
966
|
{
|
|
959
|
-
"data-testid":
|
|
960
|
-
className:
|
|
967
|
+
"data-testid": m("end-adornments"),
|
|
968
|
+
className: O(`${c}__adornment-container`),
|
|
961
969
|
children: [
|
|
962
|
-
|
|
970
|
+
N,
|
|
963
971
|
r
|
|
964
972
|
]
|
|
965
973
|
}
|
|
@@ -967,12 +975,12 @@ const De = /* @__PURE__ */ ze(Re), Ie = {
|
|
|
967
975
|
] }),
|
|
968
976
|
!!p && p
|
|
969
977
|
] }),
|
|
970
|
-
|
|
971
|
-
e && /* @__PURE__ */ o(
|
|
978
|
+
$ && /* @__PURE__ */ o(Qt, { "data-testid": m("helper-text"), id: $, children: u }),
|
|
979
|
+
e && /* @__PURE__ */ o(Vt, { "data-testid": m("error-text"), children: e })
|
|
972
980
|
] });
|
|
973
981
|
}
|
|
974
982
|
);
|
|
975
|
-
|
|
983
|
+
Hr.displayName = "TextField";
|
|
976
984
|
function Ee(t) {
|
|
977
985
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
978
986
|
}
|
|
@@ -982,9 +990,9 @@ var X = { exports: {} };
|
|
|
982
990
|
Licensed under the MIT License (MIT), see
|
|
983
991
|
http://jedwatson.github.io/classnames
|
|
984
992
|
*/
|
|
985
|
-
var
|
|
993
|
+
var Ar;
|
|
986
994
|
function Ve() {
|
|
987
|
-
return
|
|
995
|
+
return Ar || (Ar = 1, (function(t) {
|
|
988
996
|
(function() {
|
|
989
997
|
var i = {}.hasOwnProperty;
|
|
990
998
|
function n() {
|
|
@@ -1013,35 +1021,35 @@ function Ve() {
|
|
|
1013
1021
|
}
|
|
1014
1022
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
1015
1023
|
})();
|
|
1016
|
-
}(X)), X.exports;
|
|
1024
|
+
})(X)), X.exports;
|
|
1017
1025
|
}
|
|
1018
1026
|
var Fe = Ve();
|
|
1019
|
-
const
|
|
1020
|
-
"purpur-quantity-selector": "_purpur-quantity-
|
|
1021
|
-
"purpur-quantity-selector--full-width": "_purpur-quantity-selector--full-
|
|
1022
|
-
"purpur-quantity-selector--loading": "_purpur-quantity-selector--
|
|
1023
|
-
"purpur-quantity-selector--no-gap": "_purpur-quantity-selector--no-
|
|
1024
|
-
"purpur-quantity-selector--no-gap-disabled-left": "_purpur-quantity-selector--no-gap-disabled-
|
|
1025
|
-
"purpur-quantity-selector--no-gap-disabled-right": "_purpur-quantity-selector--no-gap-disabled-
|
|
1026
|
-
"purpur-quantity-selector--no-gap-disabled": "_purpur-quantity-selector--no-gap-
|
|
1027
|
-
"purpur-quantity-selector__spinner": "_purpur-quantity-
|
|
1028
|
-
"purpur-quantity-selector__spinner--full-width": "_purpur-quantity-selector__spinner--full-
|
|
1029
|
-
"purpur-quantity-selector__spinner--separated": "_purpur-quantity-selector__spinner--
|
|
1027
|
+
const Tr = /* @__PURE__ */ Ee(Fe), Ze = {
|
|
1028
|
+
"purpur-quantity-selector": "_purpur-quantity-selector_pun3b_1",
|
|
1029
|
+
"purpur-quantity-selector--full-width": "_purpur-quantity-selector--full-width_pun3b_25",
|
|
1030
|
+
"purpur-quantity-selector--loading": "_purpur-quantity-selector--loading_pun3b_31",
|
|
1031
|
+
"purpur-quantity-selector--no-gap": "_purpur-quantity-selector--no-gap_pun3b_34",
|
|
1032
|
+
"purpur-quantity-selector--no-gap-disabled-left": "_purpur-quantity-selector--no-gap-disabled-left_pun3b_39",
|
|
1033
|
+
"purpur-quantity-selector--no-gap-disabled-right": "_purpur-quantity-selector--no-gap-disabled-right_pun3b_43",
|
|
1034
|
+
"purpur-quantity-selector--no-gap-disabled": "_purpur-quantity-selector--no-gap-disabled_pun3b_39",
|
|
1035
|
+
"purpur-quantity-selector__spinner": "_purpur-quantity-selector__spinner_pun3b_50",
|
|
1036
|
+
"purpur-quantity-selector__spinner--full-width": "_purpur-quantity-selector__spinner--full-width_pun3b_57",
|
|
1037
|
+
"purpur-quantity-selector__spinner--separated": "_purpur-quantity-selector__spinner--separated_pun3b_61"
|
|
1030
1038
|
}, He = {
|
|
1031
1039
|
LG: "lg"
|
|
1032
1040
|
};
|
|
1033
1041
|
function Te(t) {
|
|
1034
1042
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
1035
1043
|
}
|
|
1036
|
-
var
|
|
1044
|
+
var Mr = { exports: {} };
|
|
1037
1045
|
/*!
|
|
1038
1046
|
Copyright (c) 2018 Jed Watson.
|
|
1039
1047
|
Licensed under the MIT License (MIT), see
|
|
1040
1048
|
http://jedwatson.github.io/classnames
|
|
1041
1049
|
*/
|
|
1042
|
-
var
|
|
1050
|
+
var Pr;
|
|
1043
1051
|
function We() {
|
|
1044
|
-
return
|
|
1052
|
+
return Pr || (Pr = 1, (function(t) {
|
|
1045
1053
|
(function() {
|
|
1046
1054
|
var i = {}.hasOwnProperty;
|
|
1047
1055
|
function n() {
|
|
@@ -1070,7 +1078,7 @@ function We() {
|
|
|
1070
1078
|
}
|
|
1071
1079
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
1072
1080
|
})();
|
|
1073
|
-
}(
|
|
1081
|
+
})(Mr)), Mr.exports;
|
|
1074
1082
|
}
|
|
1075
1083
|
var Ge = We();
|
|
1076
1084
|
const Qe = /* @__PURE__ */ Te(Ge), Ue = "_rotate_12t9p_1", Xe = "_dash_12t9p_1", Ye = {
|
|
@@ -1085,17 +1093,17 @@ const Qe = /* @__PURE__ */ Te(Ge), Ue = "_rotate_12t9p_1", Xe = "_dash_12t9p_1",
|
|
|
1085
1093
|
dash: Xe,
|
|
1086
1094
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_12t9p_41",
|
|
1087
1095
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_12t9p_44"
|
|
1088
|
-
},
|
|
1096
|
+
}, kr = Qe.bind(Ye), V = "purpur-spinner", Je = {
|
|
1089
1097
|
SM: "sm"
|
|
1090
1098
|
}, Ke = ({
|
|
1091
1099
|
disabled: t = !1,
|
|
1092
1100
|
negative: i = !1,
|
|
1093
1101
|
size: n = Je.SM,
|
|
1094
1102
|
...a
|
|
1095
|
-
}) => /* @__PURE__ */ o("div", { className:
|
|
1103
|
+
}) => /* @__PURE__ */ o("div", { className: kr(V, `${V}--${n}`), ...a, children: /* @__PURE__ */ o("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ o(
|
|
1096
1104
|
"circle",
|
|
1097
1105
|
{
|
|
1098
|
-
className:
|
|
1106
|
+
className: kr(`${V}__circle`, {
|
|
1099
1107
|
[`${V}__circle--disabled`]: t,
|
|
1100
1108
|
[`${V}__circle--negative`]: i
|
|
1101
1109
|
}),
|
|
@@ -1107,7 +1115,7 @@ const Qe = /* @__PURE__ */ Te(Ge), Ue = "_rotate_12t9p_1", Xe = "_dash_12t9p_1",
|
|
|
1107
1115
|
function rn(t) {
|
|
1108
1116
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
1109
1117
|
}
|
|
1110
|
-
var
|
|
1118
|
+
var Cr = { exports: {} };
|
|
1111
1119
|
/*!
|
|
1112
1120
|
Copyright (c) 2018 Jed Watson.
|
|
1113
1121
|
Licensed under the MIT License (MIT), see
|
|
@@ -1115,7 +1123,7 @@ var zr = { exports: {} };
|
|
|
1115
1123
|
*/
|
|
1116
1124
|
var Br;
|
|
1117
1125
|
function tn() {
|
|
1118
|
-
return Br || (Br = 1, function(t) {
|
|
1126
|
+
return Br || (Br = 1, (function(t) {
|
|
1119
1127
|
(function() {
|
|
1120
1128
|
var i = {}.hasOwnProperty;
|
|
1121
1129
|
function n() {
|
|
@@ -1144,7 +1152,7 @@ function tn() {
|
|
|
1144
1152
|
}
|
|
1145
1153
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
1146
1154
|
})();
|
|
1147
|
-
}(
|
|
1155
|
+
})(Cr)), Cr.exports;
|
|
1148
1156
|
}
|
|
1149
1157
|
var en = tn();
|
|
1150
1158
|
const nn = /* @__PURE__ */ rn(en), un = {
|
|
@@ -1169,7 +1177,7 @@ const nn = /* @__PURE__ */ rn(en), un = {
|
|
|
1169
1177
|
"purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-negative_1goi7_166",
|
|
1170
1178
|
"purpur-button--text-negative": "_purpur-button--text-negative_1goi7_181",
|
|
1171
1179
|
"purpur-button--text": "_purpur-button--text_1goi7_181"
|
|
1172
|
-
}, pn = nn.bind(un),
|
|
1180
|
+
}, pn = nn.bind(un), B = "purpur-button", Wr = T(
|
|
1173
1181
|
({
|
|
1174
1182
|
children: t,
|
|
1175
1183
|
className: i,
|
|
@@ -1179,45 +1187,45 @@ const nn = /* @__PURE__ */ rn(en), un = {
|
|
|
1179
1187
|
loading: r = !1,
|
|
1180
1188
|
negative: e = !1,
|
|
1181
1189
|
onClick: u,
|
|
1182
|
-
size:
|
|
1183
|
-
variant:
|
|
1184
|
-
type:
|
|
1185
|
-
...
|
|
1190
|
+
size: d = "md",
|
|
1191
|
+
variant: l,
|
|
1192
|
+
type: y = "button",
|
|
1193
|
+
...f
|
|
1186
1194
|
}, j) => {
|
|
1187
|
-
if (p &&
|
|
1195
|
+
if (p && l === "destructive")
|
|
1188
1196
|
return null;
|
|
1189
1197
|
const A = pn(
|
|
1190
1198
|
[
|
|
1191
|
-
|
|
1192
|
-
`${
|
|
1193
|
-
`${
|
|
1199
|
+
B,
|
|
1200
|
+
`${B}--${e ? `${l}-negative` : l}`,
|
|
1201
|
+
`${B}--${d}`
|
|
1194
1202
|
],
|
|
1195
1203
|
{
|
|
1196
|
-
[`${
|
|
1197
|
-
[`${
|
|
1198
|
-
[`${
|
|
1199
|
-
[`${
|
|
1204
|
+
[`${B}--icon-only`]: p,
|
|
1205
|
+
[`${B}--negative`]: e,
|
|
1206
|
+
[`${B}--full-width`]: a,
|
|
1207
|
+
[`${B}--disabled`]: n || r
|
|
1200
1208
|
},
|
|
1201
1209
|
i
|
|
1202
|
-
), s = (
|
|
1203
|
-
n || r ?
|
|
1204
|
-
},
|
|
1205
|
-
return /* @__PURE__ */
|
|
1210
|
+
), s = (h) => {
|
|
1211
|
+
n || r ? h.preventDefault() : u && u(h);
|
|
1212
|
+
}, b = !!f["aria-disabled"] || n || r;
|
|
1213
|
+
return /* @__PURE__ */ q(
|
|
1206
1214
|
"button",
|
|
1207
1215
|
{
|
|
1208
1216
|
className: A,
|
|
1209
|
-
type:
|
|
1217
|
+
type: y,
|
|
1210
1218
|
ref: j,
|
|
1211
|
-
"aria-disabled":
|
|
1219
|
+
"aria-disabled": b,
|
|
1212
1220
|
onClick: s,
|
|
1213
|
-
...
|
|
1221
|
+
...f,
|
|
1214
1222
|
children: [
|
|
1215
1223
|
r && /* @__PURE__ */ o(
|
|
1216
1224
|
Ke,
|
|
1217
1225
|
{
|
|
1218
|
-
size:
|
|
1226
|
+
size: d === He.LG ? "xs" : "xxs",
|
|
1219
1227
|
negative: e,
|
|
1220
|
-
disabled:
|
|
1228
|
+
disabled: b
|
|
1221
1229
|
}
|
|
1222
1230
|
),
|
|
1223
1231
|
" ",
|
|
@@ -1227,19 +1235,19 @@ const nn = /* @__PURE__ */ rn(en), un = {
|
|
|
1227
1235
|
);
|
|
1228
1236
|
}
|
|
1229
1237
|
);
|
|
1230
|
-
|
|
1238
|
+
Wr.displayName = "Button";
|
|
1231
1239
|
function an(t) {
|
|
1232
1240
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
1233
1241
|
}
|
|
1234
|
-
var
|
|
1242
|
+
var zr = { exports: {} };
|
|
1235
1243
|
/*!
|
|
1236
1244
|
Copyright (c) 2018 Jed Watson.
|
|
1237
1245
|
Licensed under the MIT License (MIT), see
|
|
1238
1246
|
http://jedwatson.github.io/classnames
|
|
1239
1247
|
*/
|
|
1240
|
-
var
|
|
1248
|
+
var Ir;
|
|
1241
1249
|
function on() {
|
|
1242
|
-
return
|
|
1250
|
+
return Ir || (Ir = 1, (function(t) {
|
|
1243
1251
|
(function() {
|
|
1244
1252
|
var i = {}.hasOwnProperty;
|
|
1245
1253
|
function n() {
|
|
@@ -1268,7 +1276,7 @@ function on() {
|
|
|
1268
1276
|
}
|
|
1269
1277
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
1270
1278
|
})();
|
|
1271
|
-
}(
|
|
1279
|
+
})(zr)), zr.exports;
|
|
1272
1280
|
}
|
|
1273
1281
|
var sn = on();
|
|
1274
1282
|
const ln = /* @__PURE__ */ an(sn), cn = {
|
|
@@ -1279,7 +1287,7 @@ const ln = /* @__PURE__ */ an(sn), cn = {
|
|
|
1279
1287
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
1280
1288
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
1281
1289
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
1282
|
-
}, _n = ln.bind(cn),
|
|
1290
|
+
}, _n = ln.bind(cn), Rr = "purpur-icon", dn = "md", fn = (t) => t.filter((i) => Object.keys(i).length >= 1).map((i) => `${i.name}="${i.value}"`).join(" "), gn = ({ content: t = "", title: i } = {}) => {
|
|
1283
1291
|
const n = [
|
|
1284
1292
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
1285
1293
|
{ name: "fill", value: "currentColor" },
|
|
@@ -1287,35 +1295,35 @@ const ln = /* @__PURE__ */ an(sn), cn = {
|
|
|
1287
1295
|
i ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
1288
1296
|
], a = i ? `<title>${i}</title>` : "";
|
|
1289
1297
|
return `<svg ${fn(n)}>${a}${t}</svg>`;
|
|
1290
|
-
}, vn = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(),
|
|
1298
|
+
}, vn = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), J = ({ svg: t, allyTitle: i, className: n, size: a = dn, ...p }) => {
|
|
1291
1299
|
const r = gn({
|
|
1292
1300
|
content: vn(t.svg),
|
|
1293
1301
|
title: i
|
|
1294
|
-
}), e = _n(n,
|
|
1302
|
+
}), e = _n(n, Rr, `${Rr}--${a}`);
|
|
1295
1303
|
return /* @__PURE__ */ o("span", { className: e, dangerouslySetInnerHTML: { __html: r }, ...p });
|
|
1296
1304
|
};
|
|
1297
|
-
|
|
1305
|
+
J.displayName = "Icon";
|
|
1298
1306
|
const bn = {
|
|
1299
1307
|
name: "minus",
|
|
1300
1308
|
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>',
|
|
1301
1309
|
keywords: ["minus"],
|
|
1302
1310
|
category: "utility"
|
|
1303
|
-
},
|
|
1304
|
-
|
|
1311
|
+
}, Gr = (t) => /* @__PURE__ */ o(J, { ...t, svg: bn });
|
|
1312
|
+
Gr.displayName = "IconMinus";
|
|
1305
1313
|
const mn = {
|
|
1306
1314
|
name: "plus",
|
|
1307
1315
|
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>',
|
|
1308
1316
|
keywords: ["plus"],
|
|
1309
1317
|
category: "utility"
|
|
1310
|
-
},
|
|
1311
|
-
|
|
1318
|
+
}, Qr = (t) => /* @__PURE__ */ o(J, { ...t, svg: mn });
|
|
1319
|
+
Qr.displayName = "IconPlus";
|
|
1312
1320
|
const yn = {
|
|
1313
1321
|
"purpur-quantity-selector-button": "_purpur-quantity-selector-button_qjlbs_1",
|
|
1314
1322
|
"purpur-quantity-selector-button--gap-left": "_purpur-quantity-selector-button--gap-left_qjlbs_4",
|
|
1315
1323
|
"purpur-quantity-selector-button--gap-right": "_purpur-quantity-selector-button--gap-right_qjlbs_7",
|
|
1316
1324
|
"purpur-quantity-selector-button--no-gap-right": "_purpur-quantity-selector-button--no-gap-right_qjlbs_10",
|
|
1317
1325
|
"purpur-quantity-selector-button--no-gap-left": "_purpur-quantity-selector-button--no-gap-left_qjlbs_13"
|
|
1318
|
-
}, hn =
|
|
1326
|
+
}, hn = Tr.bind(yn), F = "purpur-quantity-selector-button", xn = ({
|
|
1319
1327
|
["data-testid"]: t,
|
|
1320
1328
|
disabled: i,
|
|
1321
1329
|
hasGap: n,
|
|
@@ -1330,7 +1338,7 @@ const yn = {
|
|
|
1330
1338
|
[`${F}--no-gap-right`]: !n && p === "increment"
|
|
1331
1339
|
});
|
|
1332
1340
|
return /* @__PURE__ */ o(
|
|
1333
|
-
|
|
1341
|
+
Wr,
|
|
1334
1342
|
{
|
|
1335
1343
|
"data-testid": t,
|
|
1336
1344
|
className: e,
|
|
@@ -1341,10 +1349,10 @@ const yn = {
|
|
|
1341
1349
|
iconOnly: !0,
|
|
1342
1350
|
disabled: i,
|
|
1343
1351
|
tabIndex: -1,
|
|
1344
|
-
children: p === "increment" ? /* @__PURE__ */ o(
|
|
1352
|
+
children: p === "increment" ? /* @__PURE__ */ o(Qr, { size: "xs" }) : /* @__PURE__ */ o(Gr, { size: "xs" })
|
|
1345
1353
|
}
|
|
1346
1354
|
);
|
|
1347
|
-
},
|
|
1355
|
+
}, Dr = Tr.bind(Ze), On = ["attached", "separated"], qn = ["primary", "secondary"], S = "purpur-quantity-selector", $n = T(
|
|
1348
1356
|
({
|
|
1349
1357
|
["data-testid"]: t,
|
|
1350
1358
|
className: i,
|
|
@@ -1354,92 +1362,92 @@ const yn = {
|
|
|
1354
1362
|
value: r,
|
|
1355
1363
|
defaultValue: e,
|
|
1356
1364
|
fullWidth: u,
|
|
1357
|
-
disabled:
|
|
1358
|
-
loading:
|
|
1359
|
-
minValue:
|
|
1360
|
-
maxValue:
|
|
1365
|
+
disabled: d,
|
|
1366
|
+
loading: l,
|
|
1367
|
+
minValue: y,
|
|
1368
|
+
maxValue: f,
|
|
1361
1369
|
ariaLabelDecrement: j,
|
|
1362
1370
|
ariaLabelIncrement: A,
|
|
1363
1371
|
...s
|
|
1364
|
-
},
|
|
1365
|
-
const [
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
}, [r,
|
|
1369
|
-
if (!
|
|
1370
|
-
const
|
|
1372
|
+
}, b) => {
|
|
1373
|
+
const [h, Z] = rr(e ?? 0), [M, m] = rr(h), x = r !== void 0, $ = x ? r : M, z = (v) => t ? `${t}-${v}` : void 0, w = d || l, P = Math.max(y ?? 0, 0), I = f ?? Number.MAX_SAFE_INTEGER, k = $ === I, N = $ === P;
|
|
1374
|
+
tr(() => {
|
|
1375
|
+
x && Z(r);
|
|
1376
|
+
}, [r, x]), tr(() => {
|
|
1377
|
+
if (!x) {
|
|
1378
|
+
const v = setTimeout(() => {
|
|
1371
1379
|
Z(M);
|
|
1372
1380
|
}, 300);
|
|
1373
|
-
return () => clearTimeout(
|
|
1381
|
+
return () => clearTimeout(v);
|
|
1374
1382
|
}
|
|
1375
|
-
}, [M,
|
|
1376
|
-
const W =
|
|
1377
|
-
[`${
|
|
1378
|
-
[`${
|
|
1379
|
-
[`${
|
|
1380
|
-
[`${
|
|
1381
|
-
[`${
|
|
1382
|
-
[`${
|
|
1383
|
-
}),
|
|
1384
|
-
if (!/^[0-9]*$/.test(
|
|
1383
|
+
}, [M, x, p]);
|
|
1384
|
+
const W = Dr(i, S, {
|
|
1385
|
+
[`${S}--no-gap`]: n === "attached" && !w && !N && !k,
|
|
1386
|
+
[`${S}--no-gap-disabled-left`]: n === "attached" && !w && !k && N,
|
|
1387
|
+
[`${S}--no-gap-disabled-right`]: n === "attached" && !w && !N && k,
|
|
1388
|
+
[`${S}--no-gap-disabled`]: n === "attached" && (w || k && N),
|
|
1389
|
+
[`${S}--full-width`]: u,
|
|
1390
|
+
[`${S}--loading`]: l
|
|
1391
|
+
}), g = (v) => {
|
|
1392
|
+
if (!/^[0-9]*$/.test(v.target.value))
|
|
1385
1393
|
return;
|
|
1386
|
-
const H = +
|
|
1387
|
-
H < P || H >
|
|
1388
|
-
},
|
|
1389
|
-
const
|
|
1390
|
-
|
|
1391
|
-
},
|
|
1392
|
-
const
|
|
1394
|
+
const H = +v.target.value;
|
|
1395
|
+
H < P || H > I || (x || m(H), p(H));
|
|
1396
|
+
}, Ur = (v) => {
|
|
1397
|
+
const R = v === "increment" ? $ + 1 : $ - 1;
|
|
1398
|
+
R < 0 || (x || m(R), p(R));
|
|
1399
|
+
}, K = (v) => {
|
|
1400
|
+
const R = v === "increment" && k || v === "decrement" && N;
|
|
1393
1401
|
return /* @__PURE__ */ o(
|
|
1394
1402
|
xn,
|
|
1395
1403
|
{
|
|
1396
|
-
"data-testid":
|
|
1404
|
+
"data-testid": z("button-" + v),
|
|
1397
1405
|
variant: a,
|
|
1398
|
-
buttonType:
|
|
1406
|
+
buttonType: v,
|
|
1399
1407
|
hasGap: n === "separated",
|
|
1400
|
-
onClick:
|
|
1401
|
-
disabled:
|
|
1402
|
-
"aria-label":
|
|
1408
|
+
onClick: Ur,
|
|
1409
|
+
disabled: w || R,
|
|
1410
|
+
"aria-label": v === "increment" ? A : j
|
|
1403
1411
|
}
|
|
1404
1412
|
);
|
|
1405
|
-
},
|
|
1406
|
-
|
|
1413
|
+
}, Xr = /* @__PURE__ */ q(Yr, { children: [
|
|
1414
|
+
l && /* @__PURE__ */ o(
|
|
1407
1415
|
"div",
|
|
1408
1416
|
{
|
|
1409
|
-
className:
|
|
1410
|
-
[`${
|
|
1411
|
-
[`${
|
|
1417
|
+
className: Dr(`${S}__spinner`, {
|
|
1418
|
+
[`${S}__spinner--full-width`]: u,
|
|
1419
|
+
[`${S}__spinner--separated`]: !u && n === "separated"
|
|
1412
1420
|
}),
|
|
1413
1421
|
children: /* @__PURE__ */ o(
|
|
1414
|
-
|
|
1422
|
+
ot,
|
|
1415
1423
|
{
|
|
1416
|
-
disabled:
|
|
1424
|
+
disabled: w,
|
|
1417
1425
|
size: "xs",
|
|
1418
|
-
"data-testid":
|
|
1426
|
+
"data-testid": z("spinner")
|
|
1419
1427
|
},
|
|
1420
1428
|
"spinner"
|
|
1421
1429
|
)
|
|
1422
1430
|
}
|
|
1423
1431
|
),
|
|
1424
|
-
|
|
1432
|
+
K("decrement")
|
|
1425
1433
|
] });
|
|
1426
1434
|
return /* @__PURE__ */ o(
|
|
1427
|
-
|
|
1435
|
+
Hr,
|
|
1428
1436
|
{
|
|
1429
|
-
value:
|
|
1437
|
+
value: $,
|
|
1430
1438
|
type: "number",
|
|
1431
|
-
ref:
|
|
1439
|
+
ref: b,
|
|
1432
1440
|
className: W,
|
|
1433
1441
|
"data-testid": t,
|
|
1434
|
-
onChange:
|
|
1435
|
-
beforeField:
|
|
1436
|
-
afterField:
|
|
1437
|
-
disabled:
|
|
1442
|
+
onChange: g,
|
|
1443
|
+
beforeField: Xr,
|
|
1444
|
+
afterField: K("increment"),
|
|
1445
|
+
disabled: w,
|
|
1438
1446
|
min: P,
|
|
1439
|
-
max:
|
|
1447
|
+
max: I,
|
|
1440
1448
|
role: "spinbutton",
|
|
1441
|
-
"aria-valuenow":
|
|
1442
|
-
"aria-valuemax":
|
|
1449
|
+
"aria-valuenow": $,
|
|
1450
|
+
"aria-valuemax": I,
|
|
1443
1451
|
"aria-valuemin": P,
|
|
1444
1452
|
...s
|
|
1445
1453
|
}
|