@purpurds/quantity-selector 7.13.1 → 8.0.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.es.js +219 -212
- package/dist/quantity-selector.es.js.map +1 -1
- package/package.json +6 -6
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { jsx as o, jsxs as O, Fragment as Er } from "react/jsx-runtime";
|
|
2
2
|
import * as c from "react";
|
|
3
|
-
import { forwardRef as T, useId as rt, useRef as tt, useState as
|
|
3
|
+
import { forwardRef as T, useId as rt, useRef as tt, useState as tr, useEffect as er } from "react";
|
|
4
4
|
import "react-dom";
|
|
5
5
|
function et(t) {
|
|
6
6
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
7
7
|
}
|
|
8
|
-
var
|
|
8
|
+
var nr = { 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
|
|
14
|
+
var ur;
|
|
15
15
|
function nt() {
|
|
16
|
-
return
|
|
16
|
+
return ur || (ur = 1, function(t) {
|
|
17
17
|
(function() {
|
|
18
18
|
var i = {}.hasOwnProperty;
|
|
19
19
|
function n() {
|
|
@@ -42,7 +42,7 @@ function nt() {
|
|
|
42
42
|
}
|
|
43
43
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
44
44
|
})();
|
|
45
|
-
}(
|
|
45
|
+
}(nr)), nr.exports;
|
|
46
46
|
}
|
|
47
47
|
var ut = nt();
|
|
48
48
|
const it = /* @__PURE__ */ et(ut), pt = "_rotate_12t9p_1", at = "_dash_12t9p_1", ot = {
|
|
@@ -57,17 +57,17 @@ const it = /* @__PURE__ */ et(ut), pt = "_rotate_12t9p_1", at = "_dash_12t9p_1",
|
|
|
57
57
|
dash: at,
|
|
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
|
+
}, ir = it.bind(ot), I = "purpur-spinner", st = {
|
|
61
61
|
SM: "sm"
|
|
62
62
|
}, lt = ({
|
|
63
63
|
disabled: t = !1,
|
|
64
64
|
negative: i = !1,
|
|
65
65
|
size: n = st.SM,
|
|
66
66
|
...a
|
|
67
|
-
}) => /* @__PURE__ */ o("div", { className:
|
|
67
|
+
}) => /* @__PURE__ */ o("div", { className: ir(I, `${I}--${n}`), ...a, children: /* @__PURE__ */ o("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ o(
|
|
68
68
|
"circle",
|
|
69
69
|
{
|
|
70
|
-
className:
|
|
70
|
+
className: ir(`${I}__circle`, {
|
|
71
71
|
[`${I}__circle--disabled`]: t,
|
|
72
72
|
[`${I}__circle--negative`]: i
|
|
73
73
|
}),
|
|
@@ -81,15 +81,15 @@ const it = /* @__PURE__ */ et(ut), pt = "_rotate_12t9p_1", at = "_dash_12t9p_1",
|
|
|
81
81
|
function _t(t) {
|
|
82
82
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
83
83
|
}
|
|
84
|
-
var
|
|
84
|
+
var pr = { 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
|
|
90
|
+
var ar;
|
|
91
91
|
function dt() {
|
|
92
|
-
return
|
|
92
|
+
return ar || (ar = 1, function(t) {
|
|
93
93
|
(function() {
|
|
94
94
|
var i = {}.hasOwnProperty;
|
|
95
95
|
function n() {
|
|
@@ -118,12 +118,12 @@ function dt() {
|
|
|
118
118
|
}
|
|
119
119
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
120
120
|
})();
|
|
121
|
-
}(
|
|
121
|
+
}(pr)), pr.exports;
|
|
122
122
|
}
|
|
123
123
|
var ft = dt();
|
|
124
|
-
const
|
|
124
|
+
const gt = /* @__PURE__ */ _t(ft), vt = "_rotate_12t9p_1", bt = "_dash_12t9p_1", mt = {
|
|
125
125
|
"purpur-spinner": "_purpur-spinner_12t9p_2",
|
|
126
|
-
rotate:
|
|
126
|
+
rotate: vt,
|
|
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",
|
|
@@ -133,17 +133,17 @@ const vt = /* @__PURE__ */ _t(ft), gt = "_rotate_12t9p_1", bt = "_dash_12t9p_1",
|
|
|
133
133
|
dash: bt,
|
|
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
|
+
}, or = gt.bind(mt), L = "purpur-spinner", yt = {
|
|
137
137
|
SM: "sm"
|
|
138
138
|
}, ht = ({
|
|
139
139
|
disabled: t = !1,
|
|
140
140
|
negative: i = !1,
|
|
141
141
|
size: n = yt.SM,
|
|
142
142
|
...a
|
|
143
|
-
}) => /* @__PURE__ */ o("div", { className:
|
|
143
|
+
}) => /* @__PURE__ */ o("div", { className: or(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: or(`${L}__circle`, {
|
|
147
147
|
[`${L}__circle--disabled`]: t,
|
|
148
148
|
[`${L}__circle--negative`]: i
|
|
149
149
|
}),
|
|
@@ -155,15 +155,15 @@ const vt = /* @__PURE__ */ _t(ft), gt = "_rotate_12t9p_1", bt = "_dash_12t9p_1",
|
|
|
155
155
|
function xt(t) {
|
|
156
156
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
157
157
|
}
|
|
158
|
-
var
|
|
158
|
+
var sr = { 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 lr;
|
|
165
|
+
function $t() {
|
|
166
|
+
return lr || (lr = 1, function(t) {
|
|
167
167
|
(function() {
|
|
168
168
|
var i = {}.hasOwnProperty;
|
|
169
169
|
function n() {
|
|
@@ -192,32 +192,32 @@ function wt() {
|
|
|
192
192
|
}
|
|
193
193
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
194
194
|
})();
|
|
195
|
-
}(
|
|
195
|
+
}(sr)), sr.exports;
|
|
196
196
|
}
|
|
197
|
-
var
|
|
198
|
-
const
|
|
199
|
-
"purpur-button": "_purpur-
|
|
200
|
-
"purpur-button--xs": "_purpur-button--
|
|
201
|
-
"purpur-button--icon-only": "_purpur-button--icon-
|
|
202
|
-
"purpur-button--sm": "_purpur-button--
|
|
203
|
-
"purpur-button--md": "_purpur-button--
|
|
204
|
-
"purpur-button--lg": "_purpur-button--
|
|
205
|
-
"purpur-button--full-width": "_purpur-button--full-
|
|
206
|
-
"purpur-button--primary": "_purpur-button--
|
|
207
|
-
"purpur-button--disabled": "_purpur-button--
|
|
208
|
-
"purpur-button--primary-negative": "_purpur-button--primary-
|
|
209
|
-
"purpur-button--secondary": "_purpur-button--
|
|
210
|
-
"purpur-button--secondary-negative": "_purpur-button--secondary-
|
|
211
|
-
"purpur-button--expressive": "_purpur-button--
|
|
212
|
-
"purpur-button--expressive-negative": "_purpur-button--expressive-
|
|
213
|
-
"purpur-button--negative": "_purpur-button--
|
|
214
|
-
"purpur-button--destructive": "_purpur-button--
|
|
215
|
-
"purpur-button--destructive-negative": "_purpur-button--destructive-
|
|
216
|
-
"purpur-button--tertiary-purple": "_purpur-button--tertiary-
|
|
217
|
-
"purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-
|
|
218
|
-
"purpur-button--text-negative": "_purpur-button--text-
|
|
219
|
-
"purpur-button--text": "_purpur-button--
|
|
220
|
-
}, Ot =
|
|
197
|
+
var wt = $t();
|
|
198
|
+
const St = /* @__PURE__ */ xt(wt), Nt = {
|
|
199
|
+
"purpur-button": "_purpur-button_1goi7_1",
|
|
200
|
+
"purpur-button--xs": "_purpur-button--xs_1goi7_33",
|
|
201
|
+
"purpur-button--icon-only": "_purpur-button--icon-only_1goi7_36",
|
|
202
|
+
"purpur-button--sm": "_purpur-button--sm_1goi7_39",
|
|
203
|
+
"purpur-button--md": "_purpur-button--md_1goi7_45",
|
|
204
|
+
"purpur-button--lg": "_purpur-button--lg_1goi7_51",
|
|
205
|
+
"purpur-button--full-width": "_purpur-button--full-width_1goi7_57",
|
|
206
|
+
"purpur-button--primary": "_purpur-button--primary_1goi7_60",
|
|
207
|
+
"purpur-button--disabled": "_purpur-button--disabled_1goi7_64",
|
|
208
|
+
"purpur-button--primary-negative": "_purpur-button--primary-negative_1goi7_70",
|
|
209
|
+
"purpur-button--secondary": "_purpur-button--secondary_1goi7_82",
|
|
210
|
+
"purpur-button--secondary-negative": "_purpur-button--secondary-negative_1goi7_93",
|
|
211
|
+
"purpur-button--expressive": "_purpur-button--expressive_1goi7_104",
|
|
212
|
+
"purpur-button--expressive-negative": "_purpur-button--expressive-negative_1goi7_114",
|
|
213
|
+
"purpur-button--negative": "_purpur-button--negative_1goi7_126",
|
|
214
|
+
"purpur-button--destructive": "_purpur-button--destructive_1goi7_133",
|
|
215
|
+
"purpur-button--destructive-negative": "_purpur-button--destructive-negative_1goi7_143",
|
|
216
|
+
"purpur-button--tertiary-purple": "_purpur-button--tertiary-purple_1goi7_153",
|
|
217
|
+
"purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-negative_1goi7_166",
|
|
218
|
+
"purpur-button--text-negative": "_purpur-button--text-negative_1goi7_181",
|
|
219
|
+
"purpur-button--text": "_purpur-button--text_1goi7_181"
|
|
220
|
+
}, Ot = St.bind(Nt), C = "purpur-button", Vr = T(
|
|
221
221
|
({
|
|
222
222
|
children: t,
|
|
223
223
|
className: i,
|
|
@@ -227,9 +227,9 @@ const qt = /* @__PURE__ */ xt($t), St = {
|
|
|
227
227
|
loading: r = !1,
|
|
228
228
|
negative: e = !1,
|
|
229
229
|
onClick: u,
|
|
230
|
-
size:
|
|
230
|
+
size: g = "md",
|
|
231
231
|
variant: _,
|
|
232
|
-
type:
|
|
232
|
+
type: q = "button",
|
|
233
233
|
...m
|
|
234
234
|
}, j) => {
|
|
235
235
|
if (p && _ === "destructive")
|
|
@@ -238,7 +238,7 @@ const qt = /* @__PURE__ */ xt($t), St = {
|
|
|
238
238
|
[
|
|
239
239
|
C,
|
|
240
240
|
`${C}--${e ? `${_}-negative` : _}`,
|
|
241
|
-
`${C}--${
|
|
241
|
+
`${C}--${g}`
|
|
242
242
|
],
|
|
243
243
|
{
|
|
244
244
|
[`${C}--icon-only`]: p,
|
|
@@ -249,23 +249,23 @@ const qt = /* @__PURE__ */ xt($t), St = {
|
|
|
249
249
|
i
|
|
250
250
|
), s = (y) => {
|
|
251
251
|
n || r ? y.preventDefault() : u && u(y);
|
|
252
|
-
},
|
|
252
|
+
}, v = !!m["aria-disabled"] || n || r;
|
|
253
253
|
return /* @__PURE__ */ O(
|
|
254
254
|
"button",
|
|
255
255
|
{
|
|
256
256
|
className: A,
|
|
257
|
-
type:
|
|
257
|
+
type: q,
|
|
258
258
|
ref: j,
|
|
259
|
-
"aria-disabled":
|
|
259
|
+
"aria-disabled": v,
|
|
260
260
|
onClick: s,
|
|
261
261
|
...m,
|
|
262
262
|
children: [
|
|
263
263
|
r && /* @__PURE__ */ o(
|
|
264
264
|
ht,
|
|
265
265
|
{
|
|
266
|
-
size:
|
|
266
|
+
size: g === ct.LG ? "xs" : "xxs",
|
|
267
267
|
negative: e,
|
|
268
|
-
disabled:
|
|
268
|
+
disabled: v
|
|
269
269
|
}
|
|
270
270
|
),
|
|
271
271
|
" ",
|
|
@@ -276,18 +276,18 @@ const qt = /* @__PURE__ */ xt($t), St = {
|
|
|
276
276
|
}
|
|
277
277
|
);
|
|
278
278
|
Vr.displayName = "Button";
|
|
279
|
-
function
|
|
279
|
+
function qt(t) {
|
|
280
280
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
281
281
|
}
|
|
282
|
-
var
|
|
282
|
+
var cr = { 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
|
|
288
|
+
var _r;
|
|
289
289
|
function jt() {
|
|
290
|
-
return
|
|
290
|
+
return _r || (_r = 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
|
+
}(cr)), cr.exports;
|
|
320
320
|
}
|
|
321
321
|
var At = jt();
|
|
322
|
-
const Mt = /* @__PURE__ */
|
|
322
|
+
const Mt = /* @__PURE__ */ qt(At), Pt = {
|
|
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,7 +327,7 @@ const Mt = /* @__PURE__ */ Nt(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
|
-
}, kt = Mt.bind(Pt),
|
|
330
|
+
}, kt = Mt.bind(Pt), dr = "purpur-icon", Ct = "md", zt = (t) => t.filter((i) => Object.keys(i).length >= 1).map((i) => `${i.name}="${i.value}"`).join(" "), Bt = ({ 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" },
|
|
@@ -339,7 +339,7 @@ const Mt = /* @__PURE__ */ Nt(At), Pt = {
|
|
|
339
339
|
const r = Bt({
|
|
340
340
|
content: Rt(t.svg),
|
|
341
341
|
title: i
|
|
342
|
-
}), e = kt(n,
|
|
342
|
+
}), e = kt(n, dr, `${dr}--${a}`);
|
|
343
343
|
return /* @__PURE__ */ o("span", { className: e, dangerouslySetInnerHTML: { __html: r }, ...p });
|
|
344
344
|
};
|
|
345
345
|
Fr.displayName = "Icon";
|
|
@@ -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 fr = { 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
|
|
361
|
+
var gr;
|
|
362
362
|
function Lt() {
|
|
363
|
-
return
|
|
363
|
+
return gr || (gr = 1, function(t) {
|
|
364
364
|
(function() {
|
|
365
365
|
var i = {}.hasOwnProperty;
|
|
366
366
|
function n() {
|
|
@@ -389,26 +389,30 @@ function Lt() {
|
|
|
389
389
|
}
|
|
390
390
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
391
391
|
})();
|
|
392
|
-
}(
|
|
392
|
+
}(fr)), fr.exports;
|
|
393
393
|
}
|
|
394
394
|
var Et = Lt();
|
|
395
395
|
const Vt = /* @__PURE__ */ It(Et), Ft = {
|
|
396
|
-
"purpur-field-error-text": "_purpur-field-error-
|
|
397
|
-
"purpur-field-error-
|
|
398
|
-
|
|
396
|
+
"purpur-field-error-text": "_purpur-field-error-text_u1cy2_1",
|
|
397
|
+
"purpur-field-error-text--negative": "_purpur-field-error-text--negative_u1cy2_11",
|
|
398
|
+
"purpur-field-error-text__icon": "_purpur-field-error-text__icon_u1cy2_14"
|
|
399
|
+
}, vr = Vt.bind(Ft), G = "purpur-field-error-text", Zt = ({
|
|
399
400
|
children: t,
|
|
400
401
|
className: i,
|
|
401
|
-
|
|
402
|
-
|
|
402
|
+
negative: n = !1,
|
|
403
|
+
["aria-relevant"]: a = "additions text",
|
|
404
|
+
...p
|
|
403
405
|
}) => /* @__PURE__ */ O(
|
|
404
406
|
"div",
|
|
405
407
|
{
|
|
406
|
-
className:
|
|
408
|
+
className: vr(i, G, {
|
|
409
|
+
[`${G}--negative`]: n
|
|
410
|
+
}),
|
|
407
411
|
"aria-live": "assertive",
|
|
408
|
-
"aria-relevant":
|
|
409
|
-
...
|
|
412
|
+
"aria-relevant": a,
|
|
413
|
+
...p,
|
|
410
414
|
children: [
|
|
411
|
-
/* @__PURE__ */ o(Fr, { svg: Dt, size: "xs", className:
|
|
415
|
+
/* @__PURE__ */ o(Fr, { svg: Dt, size: "xs", className: vr(`${G}__icon`) }),
|
|
412
416
|
t
|
|
413
417
|
]
|
|
414
418
|
}
|
|
@@ -416,15 +420,15 @@ const Vt = /* @__PURE__ */ It(Et), Ft = {
|
|
|
416
420
|
function Ht(t) {
|
|
417
421
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
418
422
|
}
|
|
419
|
-
var
|
|
423
|
+
var br = { exports: {} };
|
|
420
424
|
/*!
|
|
421
425
|
Copyright (c) 2018 Jed Watson.
|
|
422
426
|
Licensed under the MIT License (MIT), see
|
|
423
427
|
http://jedwatson.github.io/classnames
|
|
424
428
|
*/
|
|
425
|
-
var
|
|
429
|
+
var mr;
|
|
426
430
|
function Tt() {
|
|
427
|
-
return
|
|
431
|
+
return mr || (mr = 1, function(t) {
|
|
428
432
|
(function() {
|
|
429
433
|
var i = {}.hasOwnProperty;
|
|
430
434
|
function n() {
|
|
@@ -453,23 +457,26 @@ function Tt() {
|
|
|
453
457
|
}
|
|
454
458
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
455
459
|
})();
|
|
456
|
-
}(
|
|
460
|
+
}(br)), br.exports;
|
|
457
461
|
}
|
|
458
462
|
var Wt = Tt();
|
|
459
463
|
const Gt = /* @__PURE__ */ Ht(Wt), Qt = {
|
|
460
|
-
"purpur-field-helper-text": "_purpur-field-helper-
|
|
461
|
-
"purpur-field-helper-text--disabled": "_purpur-field-helper-text--
|
|
462
|
-
|
|
464
|
+
"purpur-field-helper-text": "_purpur-field-helper-text_11nsh_1",
|
|
465
|
+
"purpur-field-helper-text--disabled": "_purpur-field-helper-text--disabled_11nsh_9",
|
|
466
|
+
"purpur-field-helper-text--negative": "_purpur-field-helper-text--negative_11nsh_12"
|
|
467
|
+
}, Ut = Gt.bind(Qt), Q = "purpur-field-helper-text", Xt = ({
|
|
463
468
|
children: t,
|
|
464
469
|
className: i,
|
|
465
470
|
disabled: n,
|
|
466
471
|
id: a,
|
|
467
|
-
|
|
472
|
+
negative: p,
|
|
473
|
+
...r
|
|
468
474
|
}) => {
|
|
469
|
-
const
|
|
470
|
-
[`${
|
|
475
|
+
const e = Ut(i, Q, {
|
|
476
|
+
[`${Q}--disabled`]: n,
|
|
477
|
+
[`${Q}--negative`]: p
|
|
471
478
|
});
|
|
472
|
-
return /* @__PURE__ */ o("span", { id: a, className:
|
|
479
|
+
return /* @__PURE__ */ o("span", { id: a, className: e, ...r, children: t });
|
|
473
480
|
};
|
|
474
481
|
function Yt(t) {
|
|
475
482
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
@@ -530,29 +537,29 @@ const re = /* @__PURE__ */ Yt(Kt), te = {
|
|
|
530
537
|
i ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
531
538
|
], a = i ? `<title>${i}</title>` : "";
|
|
532
539
|
return `<svg ${ue(n)}>${a}${t}</svg>`;
|
|
533
|
-
}, pe = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(),
|
|
540
|
+
}, pe = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), J = ({ svg: t, allyTitle: i, className: n, size: a = ne, ...p }) => {
|
|
534
541
|
const r = ie({
|
|
535
542
|
content: pe(t.svg),
|
|
536
543
|
title: i
|
|
537
544
|
}), e = ee(n, xr, `${xr}--${a}`);
|
|
538
545
|
return /* @__PURE__ */ o("span", { className: e, dangerouslySetInnerHTML: { __html: r }, ...p });
|
|
539
546
|
};
|
|
540
|
-
|
|
547
|
+
J.displayName = "Icon";
|
|
541
548
|
const ae = {
|
|
542
549
|
name: "check-circle-filled",
|
|
543
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>',
|
|
544
551
|
keywords: ["check-circle-filled"],
|
|
545
552
|
category: "status"
|
|
546
|
-
}, Zr = (t) => /* @__PURE__ */ o(
|
|
553
|
+
}, Zr = (t) => /* @__PURE__ */ o(J, { ...t, svg: ae });
|
|
547
554
|
Zr.displayName = "IconCheckCircleFilled";
|
|
548
555
|
const oe = {
|
|
549
556
|
name: "close",
|
|
550
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>',
|
|
551
558
|
keywords: ["close"],
|
|
552
559
|
category: "utility"
|
|
553
|
-
}, Hr = (t) => /* @__PURE__ */ o(
|
|
560
|
+
}, Hr = (t) => /* @__PURE__ */ o(J, { ...t, svg: oe });
|
|
554
561
|
Hr.displayName = "IconClose";
|
|
555
|
-
function
|
|
562
|
+
function $r(t, i) {
|
|
556
563
|
if (typeof t == "function")
|
|
557
564
|
return t(i);
|
|
558
565
|
t != null && (t.current = i);
|
|
@@ -561,14 +568,14 @@ function se(...t) {
|
|
|
561
568
|
return (i) => {
|
|
562
569
|
let n = !1;
|
|
563
570
|
const a = t.map((p) => {
|
|
564
|
-
const r =
|
|
571
|
+
const r = $r(p, i);
|
|
565
572
|
return !n && typeof r == "function" && (n = !0), r;
|
|
566
573
|
});
|
|
567
574
|
if (n)
|
|
568
575
|
return () => {
|
|
569
576
|
for (let p = 0; p < a.length; p++) {
|
|
570
577
|
const r = a[p];
|
|
571
|
-
typeof r == "function" ? r() :
|
|
578
|
+
typeof r == "function" ? r() : $r(t[p], null);
|
|
572
579
|
}
|
|
573
580
|
};
|
|
574
581
|
};
|
|
@@ -576,13 +583,13 @@ function se(...t) {
|
|
|
576
583
|
var Tr = c.forwardRef((t, i) => {
|
|
577
584
|
const { children: n, ...a } = t, p = c.Children.toArray(n), r = p.find(ce);
|
|
578
585
|
if (r) {
|
|
579
|
-
const e = r.props.children, u = p.map((
|
|
580
|
-
return /* @__PURE__ */ o(
|
|
586
|
+
const e = r.props.children, u = p.map((g) => g === r ? c.Children.count(e) > 1 ? c.Children.only(null) : c.isValidElement(e) ? e.props.children : null : g);
|
|
587
|
+
return /* @__PURE__ */ o(Y, { ...a, ref: i, children: c.isValidElement(e) ? c.cloneElement(e, void 0, u) : null });
|
|
581
588
|
}
|
|
582
|
-
return /* @__PURE__ */ o(
|
|
589
|
+
return /* @__PURE__ */ o(Y, { ...a, ref: i, children: n });
|
|
583
590
|
});
|
|
584
591
|
Tr.displayName = "Slot";
|
|
585
|
-
var
|
|
592
|
+
var Y = c.forwardRef((t, i) => {
|
|
586
593
|
const { children: n, ...a } = t;
|
|
587
594
|
if (c.isValidElement(n)) {
|
|
588
595
|
const p = de(n), r = _e(a, n.props);
|
|
@@ -590,7 +597,7 @@ var U = c.forwardRef((t, i) => {
|
|
|
590
597
|
}
|
|
591
598
|
return c.Children.count(n) > 1 ? c.Children.only(null) : null;
|
|
592
599
|
});
|
|
593
|
-
|
|
600
|
+
Y.displayName = "SlotClone";
|
|
594
601
|
var le = ({ children: t }) => /* @__PURE__ */ o(Er, { children: t });
|
|
595
602
|
function ce(t) {
|
|
596
603
|
return c.isValidElement(t) && t.type === le;
|
|
@@ -627,14 +634,14 @@ var fe = [
|
|
|
627
634
|
"span",
|
|
628
635
|
"svg",
|
|
629
636
|
"ul"
|
|
630
|
-
],
|
|
637
|
+
], ge = fe.reduce((t, i) => {
|
|
631
638
|
const n = c.forwardRef((a, p) => {
|
|
632
639
|
const { asChild: r, ...e } = a, u = r ? Tr : i;
|
|
633
640
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ o(u, { ...e, ref: p });
|
|
634
641
|
});
|
|
635
642
|
return n.displayName = `Primitive.${i}`, { ...t, [i]: n };
|
|
636
|
-
}, {}),
|
|
637
|
-
|
|
643
|
+
}, {}), ve = "Label", Wr = c.forwardRef((t, i) => /* @__PURE__ */ o(
|
|
644
|
+
ge.label,
|
|
638
645
|
{
|
|
639
646
|
...t,
|
|
640
647
|
ref: i,
|
|
@@ -644,20 +651,20 @@ var fe = [
|
|
|
644
651
|
}
|
|
645
652
|
}
|
|
646
653
|
));
|
|
647
|
-
Wr.displayName =
|
|
654
|
+
Wr.displayName = ve;
|
|
648
655
|
var be = Wr;
|
|
649
656
|
function me(t) {
|
|
650
657
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
651
658
|
}
|
|
652
|
-
var
|
|
659
|
+
var wr = { exports: {} };
|
|
653
660
|
/*!
|
|
654
661
|
Copyright (c) 2018 Jed Watson.
|
|
655
662
|
Licensed under the MIT License (MIT), see
|
|
656
663
|
http://jedwatson.github.io/classnames
|
|
657
664
|
*/
|
|
658
|
-
var
|
|
665
|
+
var Sr;
|
|
659
666
|
function ye() {
|
|
660
|
-
return
|
|
667
|
+
return Sr || (Sr = 1, function(t) {
|
|
661
668
|
(function() {
|
|
662
669
|
var i = {}.hasOwnProperty;
|
|
663
670
|
function n() {
|
|
@@ -686,30 +693,30 @@ function ye() {
|
|
|
686
693
|
}
|
|
687
694
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
688
695
|
})();
|
|
689
|
-
}(
|
|
696
|
+
}(wr)), wr.exports;
|
|
690
697
|
}
|
|
691
698
|
var he = ye();
|
|
692
|
-
const xe = /* @__PURE__ */ me(he),
|
|
693
|
-
"purpur-label": "_purpur-
|
|
694
|
-
"purpur-label--negative": "_purpur-label--
|
|
695
|
-
"purpur-label--disabled": "_purpur-label--
|
|
696
|
-
},
|
|
699
|
+
const xe = /* @__PURE__ */ me(he), $e = {
|
|
700
|
+
"purpur-label": "_purpur-label_1x80u_1",
|
|
701
|
+
"purpur-label--negative": "_purpur-label--negative_1x80u_8",
|
|
702
|
+
"purpur-label--disabled": "_purpur-label--disabled_1x80u_11"
|
|
703
|
+
}, we = xe.bind($e), U = "purpur-label", Se = ({
|
|
697
704
|
children: t,
|
|
698
705
|
className: i,
|
|
699
706
|
disabled: n,
|
|
700
707
|
negative: a = !1,
|
|
701
708
|
...p
|
|
702
709
|
}) => {
|
|
703
|
-
const r =
|
|
704
|
-
[`${
|
|
705
|
-
[`${
|
|
710
|
+
const r = we(i, U, {
|
|
711
|
+
[`${U}--disabled`]: n,
|
|
712
|
+
[`${U}--negative`]: a
|
|
706
713
|
});
|
|
707
714
|
return /* @__PURE__ */ o(be, { className: r, ...p, children: t });
|
|
708
715
|
};
|
|
709
|
-
function
|
|
716
|
+
function Ne(t) {
|
|
710
717
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
711
718
|
}
|
|
712
|
-
var
|
|
719
|
+
var Nr = { exports: {} };
|
|
713
720
|
/*!
|
|
714
721
|
Copyright (c) 2018 Jed Watson.
|
|
715
722
|
Licensed under the MIT License (MIT), see
|
|
@@ -746,10 +753,10 @@ function Oe() {
|
|
|
746
753
|
}
|
|
747
754
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
748
755
|
})();
|
|
749
|
-
}(
|
|
756
|
+
}(Nr)), Nr.exports;
|
|
750
757
|
}
|
|
751
|
-
var
|
|
752
|
-
const je = /* @__PURE__ */
|
|
758
|
+
var qe = Oe();
|
|
759
|
+
const je = /* @__PURE__ */ Ne(qe), Ae = "_rotate_12t9p_1", Me = "_dash_12t9p_1", Pe = {
|
|
753
760
|
"purpur-spinner": "_purpur-spinner_12t9p_2",
|
|
754
761
|
rotate: Ae,
|
|
755
762
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_12t9p_6",
|
|
@@ -761,17 +768,17 @@ const je = /* @__PURE__ */ Se(Ne), Ae = "_rotate_12t9p_1", Me = "_dash_12t9p_1",
|
|
|
761
768
|
dash: Me,
|
|
762
769
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_12t9p_41",
|
|
763
770
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_12t9p_44"
|
|
764
|
-
},
|
|
771
|
+
}, qr = je.bind(Pe), E = "purpur-spinner", ke = {
|
|
765
772
|
SM: "sm"
|
|
766
773
|
}, Ce = ({
|
|
767
774
|
disabled: t = !1,
|
|
768
775
|
negative: i = !1,
|
|
769
776
|
size: n = ke.SM,
|
|
770
777
|
...a
|
|
771
|
-
}) => /* @__PURE__ */ o("div", { className:
|
|
778
|
+
}) => /* @__PURE__ */ o("div", { className: qr(E, `${E}--${n}`), ...a, children: /* @__PURE__ */ o("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ o(
|
|
772
779
|
"circle",
|
|
773
780
|
{
|
|
774
|
-
className:
|
|
781
|
+
className: qr(`${E}__circle`, {
|
|
775
782
|
[`${E}__circle--disabled`]: t,
|
|
776
783
|
[`${E}__circle--negative`]: i
|
|
777
784
|
}),
|
|
@@ -840,7 +847,7 @@ const De = /* @__PURE__ */ ze(Re), Ie = {
|
|
|
840
847
|
"purpur-text-field__input--error": "_purpur-text-field__input--error_3gl1k_94",
|
|
841
848
|
"purpur-text-field__adornment-container": "_purpur-text-field__adornment-container_3gl1k_106",
|
|
842
849
|
"purpur-text-field__valid-icon": "_purpur-text-field__valid-icon_3gl1k_111"
|
|
843
|
-
}, Le = (t) => tt(t),
|
|
850
|
+
}, Le = (t) => tt(t), N = De.bind(Ie), l = "purpur-text-field", Gr = T(
|
|
844
851
|
({
|
|
845
852
|
["data-testid"]: t,
|
|
846
853
|
className: i,
|
|
@@ -850,22 +857,22 @@ const De = /* @__PURE__ */ ze(Re), Ie = {
|
|
|
850
857
|
endAdornment: r,
|
|
851
858
|
errorText: e,
|
|
852
859
|
helperText: u,
|
|
853
|
-
hideRequiredAsterisk:
|
|
860
|
+
hideRequiredAsterisk: g = !1,
|
|
854
861
|
label: _,
|
|
855
|
-
loading:
|
|
862
|
+
loading: q = !1,
|
|
856
863
|
onClear: m,
|
|
857
864
|
startAdornment: j,
|
|
858
865
|
valid: A = !1,
|
|
859
866
|
...s
|
|
860
|
-
},
|
|
867
|
+
}, v) => {
|
|
861
868
|
var y;
|
|
862
|
-
const Z = rt(), M = s.id ?? Z, b = (d) => t ? `${t}-${d}` : void 0, h = A && !e, x = u ? `${M}-helper-text` : void 0, B = [j].filter((d) => !!d),
|
|
863
|
-
P.current = d, typeof
|
|
869
|
+
const Z = rt(), M = s.id ?? Z, b = (d) => t ? `${t}-${d}` : void 0, h = A && !e, x = u ? `${M}-helper-text` : void 0, B = [j].filter((d) => !!d), $ = (typeof s.value == "number" ? s.value !== void 0 : (y = s.value) == null ? void 0 : y.length) && !s.disabled && !s.readOnly && !q && m && n, P = Le(null), R = (d) => {
|
|
870
|
+
P.current = d, typeof v == "function" ? v(d) : v && (v.current = d);
|
|
864
871
|
}, k = () => {
|
|
865
872
|
var d;
|
|
866
873
|
m == null || m(), (d = P.current) == null || d.focus();
|
|
867
|
-
},
|
|
868
|
-
|
|
874
|
+
}, S = [
|
|
875
|
+
q && /* @__PURE__ */ o(
|
|
869
876
|
Ce,
|
|
870
877
|
{
|
|
871
878
|
disabled: s.disabled,
|
|
@@ -874,7 +881,7 @@ const De = /* @__PURE__ */ ze(Re), Ie = {
|
|
|
874
881
|
},
|
|
875
882
|
"spinner"
|
|
876
883
|
),
|
|
877
|
-
|
|
884
|
+
$ && /* @__PURE__ */ o(
|
|
878
885
|
Vr,
|
|
879
886
|
{
|
|
880
887
|
variant: "tertiary-purple",
|
|
@@ -891,39 +898,39 @@ const De = /* @__PURE__ */ ze(Re), Ie = {
|
|
|
891
898
|
Zr,
|
|
892
899
|
{
|
|
893
900
|
"data-testid": b("valid-icon"),
|
|
894
|
-
className:
|
|
901
|
+
className: N(`${l}__valid-icon`)
|
|
895
902
|
},
|
|
896
903
|
"valid-icon"
|
|
897
904
|
)
|
|
898
|
-
].filter((d) => !!d), W =
|
|
905
|
+
].filter((d) => !!d), W = N(`${l}__input-container`, {
|
|
899
906
|
[`${l}__input-container--start-adornment`]: B.length,
|
|
900
|
-
[`${l}__input-container--end-adornment`]:
|
|
907
|
+
[`${l}__input-container--end-adornment`]: S.length || r,
|
|
901
908
|
[`${l}__input-container--disabled`]: s.disabled,
|
|
902
|
-
[`${l}__input-container--has-clear-button`]:
|
|
909
|
+
[`${l}__input-container--has-clear-button`]: $,
|
|
903
910
|
[`${l}__input-container--readonly`]: s.readOnly && !s.disabled
|
|
904
911
|
});
|
|
905
|
-
return /* @__PURE__ */ O("div", { className:
|
|
912
|
+
return /* @__PURE__ */ O("div", { className: N(i, l), children: [
|
|
906
913
|
_ && /* @__PURE__ */ O(
|
|
907
|
-
|
|
914
|
+
Se,
|
|
908
915
|
{
|
|
909
916
|
htmlFor: M,
|
|
910
|
-
className:
|
|
917
|
+
className: N(`${l}__label`),
|
|
911
918
|
"data-testid": b("label"),
|
|
912
919
|
disabled: s.disabled,
|
|
913
920
|
children: [
|
|
914
|
-
s.required && !
|
|
921
|
+
s.required && !g && /* @__PURE__ */ o("span", { "aria-hidden": !0, children: "*" }),
|
|
915
922
|
_
|
|
916
923
|
]
|
|
917
924
|
}
|
|
918
925
|
),
|
|
919
|
-
/* @__PURE__ */ O("div", { className:
|
|
926
|
+
/* @__PURE__ */ O("div", { className: N(`${l}__field-row`), children: [
|
|
920
927
|
!!a && a,
|
|
921
928
|
/* @__PURE__ */ O("div", { className: W, children: [
|
|
922
929
|
!!B.length && /* @__PURE__ */ o(
|
|
923
930
|
"div",
|
|
924
931
|
{
|
|
925
932
|
"data-testid": b("start-adornments"),
|
|
926
|
-
className:
|
|
933
|
+
className: N(`${l}__adornment-container`),
|
|
927
934
|
children: B
|
|
928
935
|
}
|
|
929
936
|
),
|
|
@@ -936,7 +943,7 @@ const De = /* @__PURE__ */ ze(Re), Ie = {
|
|
|
936
943
|
"data-testid": b("input"),
|
|
937
944
|
"aria-describedby": s["aria-describedby"] || x,
|
|
938
945
|
"aria-invalid": s["aria-invalid"] || !!e,
|
|
939
|
-
className:
|
|
946
|
+
className: N([
|
|
940
947
|
`${l}__input`,
|
|
941
948
|
{
|
|
942
949
|
[`${l}__input--valid`]: h,
|
|
@@ -945,14 +952,14 @@ const De = /* @__PURE__ */ ze(Re), Ie = {
|
|
|
945
952
|
])
|
|
946
953
|
}
|
|
947
954
|
),
|
|
948
|
-
/* @__PURE__ */ o("div", { className:
|
|
949
|
-
(!!
|
|
955
|
+
/* @__PURE__ */ o("div", { className: N(`${l}__frame`) }),
|
|
956
|
+
(!!S.length || r) && /* @__PURE__ */ O(
|
|
950
957
|
"div",
|
|
951
958
|
{
|
|
952
959
|
"data-testid": b("end-adornments"),
|
|
953
|
-
className:
|
|
960
|
+
className: N(`${l}__adornment-container`),
|
|
954
961
|
children: [
|
|
955
|
-
|
|
962
|
+
S,
|
|
956
963
|
r
|
|
957
964
|
]
|
|
958
965
|
}
|
|
@@ -969,7 +976,7 @@ Gr.displayName = "TextField";
|
|
|
969
976
|
function Ee(t) {
|
|
970
977
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
971
978
|
}
|
|
972
|
-
var
|
|
979
|
+
var X = { exports: {} };
|
|
973
980
|
/*!
|
|
974
981
|
Copyright (c) 2018 Jed Watson.
|
|
975
982
|
Licensed under the MIT License (MIT), see
|
|
@@ -1006,7 +1013,7 @@ function Ve() {
|
|
|
1006
1013
|
}
|
|
1007
1014
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
1008
1015
|
})();
|
|
1009
|
-
}(
|
|
1016
|
+
}(X)), X.exports;
|
|
1010
1017
|
}
|
|
1011
1018
|
var Fe = Ve();
|
|
1012
1019
|
const Qr = /* @__PURE__ */ Ee(Fe), Ze = {
|
|
@@ -1141,27 +1148,27 @@ function tn() {
|
|
|
1141
1148
|
}
|
|
1142
1149
|
var en = tn();
|
|
1143
1150
|
const nn = /* @__PURE__ */ rn(en), un = {
|
|
1144
|
-
"purpur-button": "_purpur-
|
|
1145
|
-
"purpur-button--xs": "_purpur-button--
|
|
1146
|
-
"purpur-button--icon-only": "_purpur-button--icon-
|
|
1147
|
-
"purpur-button--sm": "_purpur-button--
|
|
1148
|
-
"purpur-button--md": "_purpur-button--
|
|
1149
|
-
"purpur-button--lg": "_purpur-button--
|
|
1150
|
-
"purpur-button--full-width": "_purpur-button--full-
|
|
1151
|
-
"purpur-button--primary": "_purpur-button--
|
|
1152
|
-
"purpur-button--disabled": "_purpur-button--
|
|
1153
|
-
"purpur-button--primary-negative": "_purpur-button--primary-
|
|
1154
|
-
"purpur-button--secondary": "_purpur-button--
|
|
1155
|
-
"purpur-button--secondary-negative": "_purpur-button--secondary-
|
|
1156
|
-
"purpur-button--expressive": "_purpur-button--
|
|
1157
|
-
"purpur-button--expressive-negative": "_purpur-button--expressive-
|
|
1158
|
-
"purpur-button--negative": "_purpur-button--
|
|
1159
|
-
"purpur-button--destructive": "_purpur-button--
|
|
1160
|
-
"purpur-button--destructive-negative": "_purpur-button--destructive-
|
|
1161
|
-
"purpur-button--tertiary-purple": "_purpur-button--tertiary-
|
|
1162
|
-
"purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-
|
|
1163
|
-
"purpur-button--text-negative": "_purpur-button--text-
|
|
1164
|
-
"purpur-button--text": "_purpur-button--
|
|
1151
|
+
"purpur-button": "_purpur-button_1goi7_1",
|
|
1152
|
+
"purpur-button--xs": "_purpur-button--xs_1goi7_33",
|
|
1153
|
+
"purpur-button--icon-only": "_purpur-button--icon-only_1goi7_36",
|
|
1154
|
+
"purpur-button--sm": "_purpur-button--sm_1goi7_39",
|
|
1155
|
+
"purpur-button--md": "_purpur-button--md_1goi7_45",
|
|
1156
|
+
"purpur-button--lg": "_purpur-button--lg_1goi7_51",
|
|
1157
|
+
"purpur-button--full-width": "_purpur-button--full-width_1goi7_57",
|
|
1158
|
+
"purpur-button--primary": "_purpur-button--primary_1goi7_60",
|
|
1159
|
+
"purpur-button--disabled": "_purpur-button--disabled_1goi7_64",
|
|
1160
|
+
"purpur-button--primary-negative": "_purpur-button--primary-negative_1goi7_70",
|
|
1161
|
+
"purpur-button--secondary": "_purpur-button--secondary_1goi7_82",
|
|
1162
|
+
"purpur-button--secondary-negative": "_purpur-button--secondary-negative_1goi7_93",
|
|
1163
|
+
"purpur-button--expressive": "_purpur-button--expressive_1goi7_104",
|
|
1164
|
+
"purpur-button--expressive-negative": "_purpur-button--expressive-negative_1goi7_114",
|
|
1165
|
+
"purpur-button--negative": "_purpur-button--negative_1goi7_126",
|
|
1166
|
+
"purpur-button--destructive": "_purpur-button--destructive_1goi7_133",
|
|
1167
|
+
"purpur-button--destructive-negative": "_purpur-button--destructive-negative_1goi7_143",
|
|
1168
|
+
"purpur-button--tertiary-purple": "_purpur-button--tertiary-purple_1goi7_153",
|
|
1169
|
+
"purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-negative_1goi7_166",
|
|
1170
|
+
"purpur-button--text-negative": "_purpur-button--text-negative_1goi7_181",
|
|
1171
|
+
"purpur-button--text": "_purpur-button--text_1goi7_181"
|
|
1165
1172
|
}, pn = nn.bind(un), z = "purpur-button", Ur = T(
|
|
1166
1173
|
({
|
|
1167
1174
|
children: t,
|
|
@@ -1172,9 +1179,9 @@ const nn = /* @__PURE__ */ rn(en), un = {
|
|
|
1172
1179
|
loading: r = !1,
|
|
1173
1180
|
negative: e = !1,
|
|
1174
1181
|
onClick: u,
|
|
1175
|
-
size:
|
|
1182
|
+
size: g = "md",
|
|
1176
1183
|
variant: _,
|
|
1177
|
-
type:
|
|
1184
|
+
type: q = "button",
|
|
1178
1185
|
...m
|
|
1179
1186
|
}, j) => {
|
|
1180
1187
|
if (p && _ === "destructive")
|
|
@@ -1183,7 +1190,7 @@ const nn = /* @__PURE__ */ rn(en), un = {
|
|
|
1183
1190
|
[
|
|
1184
1191
|
z,
|
|
1185
1192
|
`${z}--${e ? `${_}-negative` : _}`,
|
|
1186
|
-
`${z}--${
|
|
1193
|
+
`${z}--${g}`
|
|
1187
1194
|
],
|
|
1188
1195
|
{
|
|
1189
1196
|
[`${z}--icon-only`]: p,
|
|
@@ -1194,23 +1201,23 @@ const nn = /* @__PURE__ */ rn(en), un = {
|
|
|
1194
1201
|
i
|
|
1195
1202
|
), s = (y) => {
|
|
1196
1203
|
n || r ? y.preventDefault() : u && u(y);
|
|
1197
|
-
},
|
|
1204
|
+
}, v = !!m["aria-disabled"] || n || r;
|
|
1198
1205
|
return /* @__PURE__ */ O(
|
|
1199
1206
|
"button",
|
|
1200
1207
|
{
|
|
1201
1208
|
className: A,
|
|
1202
|
-
type:
|
|
1209
|
+
type: q,
|
|
1203
1210
|
ref: j,
|
|
1204
|
-
"aria-disabled":
|
|
1211
|
+
"aria-disabled": v,
|
|
1205
1212
|
onClick: s,
|
|
1206
1213
|
...m,
|
|
1207
1214
|
children: [
|
|
1208
1215
|
r && /* @__PURE__ */ o(
|
|
1209
1216
|
Ke,
|
|
1210
1217
|
{
|
|
1211
|
-
size:
|
|
1218
|
+
size: g === He.LG ? "xs" : "xxs",
|
|
1212
1219
|
negative: e,
|
|
1213
|
-
disabled:
|
|
1220
|
+
disabled: v
|
|
1214
1221
|
}
|
|
1215
1222
|
),
|
|
1216
1223
|
" ",
|
|
@@ -1272,7 +1279,7 @@ const ln = /* @__PURE__ */ an(sn), cn = {
|
|
|
1272
1279
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
1273
1280
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
1274
1281
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
1275
|
-
}, _n = ln.bind(cn), Ir = "purpur-icon", dn = "md", fn = (t) => t.filter((i) => Object.keys(i).length >= 1).map((i) => `${i.name}="${i.value}"`).join(" "),
|
|
1282
|
+
}, _n = ln.bind(cn), Ir = "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 } = {}) => {
|
|
1276
1283
|
const n = [
|
|
1277
1284
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
1278
1285
|
{ name: "fill", value: "currentColor" },
|
|
@@ -1280,27 +1287,27 @@ const ln = /* @__PURE__ */ an(sn), cn = {
|
|
|
1280
1287
|
i ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
1281
1288
|
], a = i ? `<title>${i}</title>` : "";
|
|
1282
1289
|
return `<svg ${fn(n)}>${a}${t}</svg>`;
|
|
1283
|
-
},
|
|
1284
|
-
const r =
|
|
1285
|
-
content:
|
|
1290
|
+
}, vn = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), K = ({ svg: t, allyTitle: i, className: n, size: a = dn, ...p }) => {
|
|
1291
|
+
const r = gn({
|
|
1292
|
+
content: vn(t.svg),
|
|
1286
1293
|
title: i
|
|
1287
1294
|
}), e = _n(n, Ir, `${Ir}--${a}`);
|
|
1288
1295
|
return /* @__PURE__ */ o("span", { className: e, dangerouslySetInnerHTML: { __html: r }, ...p });
|
|
1289
1296
|
};
|
|
1290
|
-
|
|
1297
|
+
K.displayName = "Icon";
|
|
1291
1298
|
const bn = {
|
|
1292
1299
|
name: "minus",
|
|
1293
1300
|
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>',
|
|
1294
1301
|
keywords: ["minus"],
|
|
1295
1302
|
category: "utility"
|
|
1296
|
-
}, Xr = (t) => /* @__PURE__ */ o(
|
|
1303
|
+
}, Xr = (t) => /* @__PURE__ */ o(K, { ...t, svg: bn });
|
|
1297
1304
|
Xr.displayName = "IconMinus";
|
|
1298
1305
|
const mn = {
|
|
1299
1306
|
name: "plus",
|
|
1300
1307
|
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>',
|
|
1301
1308
|
keywords: ["plus"],
|
|
1302
1309
|
category: "utility"
|
|
1303
|
-
}, Yr = (t) => /* @__PURE__ */ o(
|
|
1310
|
+
}, Yr = (t) => /* @__PURE__ */ o(K, { ...t, svg: mn });
|
|
1304
1311
|
Yr.displayName = "IconPlus";
|
|
1305
1312
|
const yn = {
|
|
1306
1313
|
"purpur-quantity-selector-button": "_purpur-quantity-selector-button_qjlbs_1",
|
|
@@ -1337,7 +1344,7 @@ const yn = {
|
|
|
1337
1344
|
children: p === "increment" ? /* @__PURE__ */ o(Yr, { size: "xs" }) : /* @__PURE__ */ o(Xr, { size: "xs" })
|
|
1338
1345
|
}
|
|
1339
1346
|
);
|
|
1340
|
-
}, Lr = Qr.bind(Ze), On = ["attached", "separated"],
|
|
1347
|
+
}, Lr = Qr.bind(Ze), On = ["attached", "separated"], qn = ["primary", "secondary"], w = "purpur-quantity-selector", $n = T(
|
|
1341
1348
|
({
|
|
1342
1349
|
["data-testid"]: t,
|
|
1343
1350
|
className: i,
|
|
@@ -1347,18 +1354,18 @@ const yn = {
|
|
|
1347
1354
|
value: r,
|
|
1348
1355
|
defaultValue: e,
|
|
1349
1356
|
fullWidth: u,
|
|
1350
|
-
disabled:
|
|
1357
|
+
disabled: g,
|
|
1351
1358
|
loading: _,
|
|
1352
|
-
minValue:
|
|
1359
|
+
minValue: q,
|
|
1353
1360
|
maxValue: m,
|
|
1354
1361
|
ariaLabelDecrement: j,
|
|
1355
1362
|
ariaLabelIncrement: A,
|
|
1356
1363
|
...s
|
|
1357
|
-
},
|
|
1358
|
-
const [y, Z] =
|
|
1359
|
-
|
|
1364
|
+
}, v) => {
|
|
1365
|
+
const [y, Z] = tr(e ?? 0), [M, b] = tr(y), h = r !== void 0, x = h ? r : M, B = (f) => t ? `${t}-${f}` : void 0, $ = g || _, P = Math.max(q ?? 0, 0), R = m ?? Number.MAX_SAFE_INTEGER, k = x === R, S = x === P;
|
|
1366
|
+
er(() => {
|
|
1360
1367
|
h && Z(r);
|
|
1361
|
-
}, [r, h]),
|
|
1368
|
+
}, [r, h]), er(() => {
|
|
1362
1369
|
if (!h) {
|
|
1363
1370
|
const f = setTimeout(() => {
|
|
1364
1371
|
Z(M);
|
|
@@ -1366,13 +1373,13 @@ const yn = {
|
|
|
1366
1373
|
return () => clearTimeout(f);
|
|
1367
1374
|
}
|
|
1368
1375
|
}, [M, h, p]);
|
|
1369
|
-
const W = Lr(i,
|
|
1370
|
-
[`${
|
|
1371
|
-
[`${
|
|
1372
|
-
[`${
|
|
1373
|
-
[`${
|
|
1374
|
-
[`${
|
|
1375
|
-
[`${
|
|
1376
|
+
const W = Lr(i, w, {
|
|
1377
|
+
[`${w}--no-gap`]: n === "attached" && !$ && !S && !k,
|
|
1378
|
+
[`${w}--no-gap-disabled-left`]: n === "attached" && !$ && !k && S,
|
|
1379
|
+
[`${w}--no-gap-disabled-right`]: n === "attached" && !$ && !S && k,
|
|
1380
|
+
[`${w}--no-gap-disabled`]: n === "attached" && ($ || k && S),
|
|
1381
|
+
[`${w}--full-width`]: u,
|
|
1382
|
+
[`${w}--loading`]: _
|
|
1376
1383
|
}), d = (f) => {
|
|
1377
1384
|
if (!/^[0-9]*$/.test(f.target.value))
|
|
1378
1385
|
return;
|
|
@@ -1381,8 +1388,8 @@ const yn = {
|
|
|
1381
1388
|
}, Jr = (f) => {
|
|
1382
1389
|
const D = f === "increment" ? x + 1 : x - 1;
|
|
1383
1390
|
D < 0 || (h || b(D), p(D));
|
|
1384
|
-
},
|
|
1385
|
-
const D = f === "increment" && k || f === "decrement" &&
|
|
1391
|
+
}, rr = (f) => {
|
|
1392
|
+
const D = f === "increment" && k || f === "decrement" && S;
|
|
1386
1393
|
return /* @__PURE__ */ o(
|
|
1387
1394
|
xn,
|
|
1388
1395
|
{
|
|
@@ -1391,7 +1398,7 @@ const yn = {
|
|
|
1391
1398
|
buttonType: f,
|
|
1392
1399
|
hasGap: n === "separated",
|
|
1393
1400
|
onClick: Jr,
|
|
1394
|
-
disabled:
|
|
1401
|
+
disabled: $ || D,
|
|
1395
1402
|
"aria-label": f === "increment" ? A : j
|
|
1396
1403
|
}
|
|
1397
1404
|
);
|
|
@@ -1399,14 +1406,14 @@ const yn = {
|
|
|
1399
1406
|
_ && /* @__PURE__ */ o(
|
|
1400
1407
|
"div",
|
|
1401
1408
|
{
|
|
1402
|
-
className: Lr(`${
|
|
1403
|
-
[`${
|
|
1404
|
-
[`${
|
|
1409
|
+
className: Lr(`${w}__spinner`, {
|
|
1410
|
+
[`${w}__spinner--full-width`]: u,
|
|
1411
|
+
[`${w}__spinner--separated`]: !u && n === "separated"
|
|
1405
1412
|
}),
|
|
1406
1413
|
children: /* @__PURE__ */ o(
|
|
1407
1414
|
lt,
|
|
1408
1415
|
{
|
|
1409
|
-
disabled:
|
|
1416
|
+
disabled: $,
|
|
1410
1417
|
size: "xs",
|
|
1411
1418
|
"data-testid": B("spinner")
|
|
1412
1419
|
},
|
|
@@ -1414,20 +1421,20 @@ const yn = {
|
|
|
1414
1421
|
)
|
|
1415
1422
|
}
|
|
1416
1423
|
),
|
|
1417
|
-
|
|
1424
|
+
rr("decrement")
|
|
1418
1425
|
] });
|
|
1419
1426
|
return /* @__PURE__ */ o(
|
|
1420
1427
|
Gr,
|
|
1421
1428
|
{
|
|
1422
1429
|
value: x,
|
|
1423
1430
|
type: "number",
|
|
1424
|
-
ref:
|
|
1431
|
+
ref: v,
|
|
1425
1432
|
className: W,
|
|
1426
1433
|
"data-testid": t,
|
|
1427
1434
|
onChange: d,
|
|
1428
1435
|
beforeField: Kr,
|
|
1429
|
-
afterField:
|
|
1430
|
-
disabled:
|
|
1436
|
+
afterField: rr("increment"),
|
|
1437
|
+
disabled: $,
|
|
1431
1438
|
min: P,
|
|
1432
1439
|
max: R,
|
|
1433
1440
|
role: "spinbutton",
|
|
@@ -1439,10 +1446,10 @@ const yn = {
|
|
|
1439
1446
|
);
|
|
1440
1447
|
}
|
|
1441
1448
|
);
|
|
1442
|
-
|
|
1449
|
+
$n.displayName = "QuantitySelector";
|
|
1443
1450
|
export {
|
|
1444
|
-
|
|
1445
|
-
|
|
1451
|
+
$n as QuantitySelector,
|
|
1452
|
+
qn as quantitySelectorButtonVariants,
|
|
1446
1453
|
On as quantitySelectorVariants
|
|
1447
1454
|
};
|
|
1448
1455
|
//# sourceMappingURL=quantity-selector.es.js.map
|