@purpurds/quantity-selector 8.13.0 → 8.14.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 +1 -1
- package/dist/quantity-selector.cjs.js.map +1 -1
- package/dist/quantity-selector.es.js +118 -118
- package/dist/quantity-selector.es.js.map +1 -1
- package/package.json +6 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
1
|
+
import { jsx as o, jsxs as N, Fragment as nt } from "react/jsx-runtime";
|
|
2
2
|
import * as _ from "react";
|
|
3
3
|
import { forwardRef as G, useId as ut, useRef as it, useState as rr, useEffect as tr } from "react";
|
|
4
4
|
import "react-dom";
|
|
@@ -79,7 +79,7 @@ function vt(t) {
|
|
|
79
79
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
80
80
|
}
|
|
81
81
|
var ir = { exports: {} }, pr;
|
|
82
|
-
function
|
|
82
|
+
function gt() {
|
|
83
83
|
return pr || (pr = 1, (function(t) {
|
|
84
84
|
(function() {
|
|
85
85
|
var i = {}.hasOwnProperty;
|
|
@@ -111,8 +111,8 @@ function ht() {
|
|
|
111
111
|
})();
|
|
112
112
|
})(ir)), ir.exports;
|
|
113
113
|
}
|
|
114
|
-
var
|
|
115
|
-
const
|
|
114
|
+
var bt = gt();
|
|
115
|
+
const ht = /* @__PURE__ */ vt(bt), mt = "_rotate_12t9p_1", yt = "_dash_12t9p_1", xt = {
|
|
116
116
|
"purpur-spinner": "_purpur-spinner_12t9p_2",
|
|
117
117
|
rotate: mt,
|
|
118
118
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_12t9p_6",
|
|
@@ -124,7 +124,7 @@ const bt = /* @__PURE__ */ vt(gt), mt = "_rotate_12t9p_1", yt = "_dash_12t9p_1",
|
|
|
124
124
|
dash: yt,
|
|
125
125
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_12t9p_41",
|
|
126
126
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_12t9p_44"
|
|
127
|
-
}, ar =
|
|
127
|
+
}, ar = ht.bind(xt), L = "purpur-spinner", $t = {
|
|
128
128
|
SM: "sm"
|
|
129
129
|
}, Fr = ({
|
|
130
130
|
disabled: t = !1,
|
|
@@ -182,7 +182,7 @@ function jt() {
|
|
|
182
182
|
})(or)), or.exports;
|
|
183
183
|
}
|
|
184
184
|
var St = jt();
|
|
185
|
-
const
|
|
185
|
+
const qt = /* @__PURE__ */ wt(St), Nt = {
|
|
186
186
|
"purpur-button": "_purpur-button_10jh0_1",
|
|
187
187
|
"purpur-button--xs": "_purpur-button--xs_10jh0_22",
|
|
188
188
|
"purpur-button--icon-only": "_purpur-button--icon-only_10jh0_25",
|
|
@@ -205,7 +205,7 @@ const Nt = /* @__PURE__ */ wt(St), Ot = {
|
|
|
205
205
|
"purpur-button--text-negative": "_purpur-button--text-negative_10jh0_185",
|
|
206
206
|
"purpur-button--text": "_purpur-button--text_10jh0_185",
|
|
207
207
|
"purpur-button__spinner": "_purpur-button__spinner_10jh0_235"
|
|
208
|
-
}, lr =
|
|
208
|
+
}, lr = qt.bind(Nt), O = "purpur-button", Zr = G(
|
|
209
209
|
({
|
|
210
210
|
children: t,
|
|
211
211
|
className: i,
|
|
@@ -218,27 +218,27 @@ const Nt = /* @__PURE__ */ wt(St), Ot = {
|
|
|
218
218
|
size: d = "md",
|
|
219
219
|
variant: l,
|
|
220
220
|
type: y = "button",
|
|
221
|
-
...
|
|
221
|
+
...g
|
|
222
222
|
}, M) => {
|
|
223
223
|
if (p && l === "destructive")
|
|
224
224
|
return null;
|
|
225
225
|
const P = lr(
|
|
226
226
|
[
|
|
227
|
-
|
|
228
|
-
`${
|
|
229
|
-
`${
|
|
227
|
+
O,
|
|
228
|
+
`${O}--${e ? `${l}-negative` : l}`,
|
|
229
|
+
`${O}--${d}`
|
|
230
230
|
],
|
|
231
231
|
{
|
|
232
|
-
[`${
|
|
233
|
-
[`${
|
|
234
|
-
[`${
|
|
235
|
-
[`${
|
|
232
|
+
[`${O}--icon-only`]: p,
|
|
233
|
+
[`${O}--negative`]: e,
|
|
234
|
+
[`${O}--full-width`]: a,
|
|
235
|
+
[`${O}--disabled`]: n || r
|
|
236
236
|
},
|
|
237
237
|
i
|
|
238
|
-
), f = (
|
|
239
|
-
n || r ?
|
|
240
|
-
}, s = !!
|
|
241
|
-
return /* @__PURE__ */
|
|
238
|
+
), f = (b) => {
|
|
239
|
+
n || r ? b.preventDefault() : u && u(b);
|
|
240
|
+
}, s = !!g["aria-disabled"] || n || r;
|
|
241
|
+
return /* @__PURE__ */ N(
|
|
242
242
|
"button",
|
|
243
243
|
{
|
|
244
244
|
className: P,
|
|
@@ -246,7 +246,7 @@ const Nt = /* @__PURE__ */ wt(St), Ot = {
|
|
|
246
246
|
ref: M,
|
|
247
247
|
"aria-disabled": s,
|
|
248
248
|
onClick: f,
|
|
249
|
-
...
|
|
249
|
+
...g,
|
|
250
250
|
children: [
|
|
251
251
|
r && /* @__PURE__ */ o(
|
|
252
252
|
Fr,
|
|
@@ -254,7 +254,7 @@ const Nt = /* @__PURE__ */ wt(St), Ot = {
|
|
|
254
254
|
size: d === ft.LG ? "xs" : "xxs",
|
|
255
255
|
negative: e,
|
|
256
256
|
disabled: s,
|
|
257
|
-
className: lr(`${
|
|
257
|
+
className: lr(`${O}__spinner`)
|
|
258
258
|
}
|
|
259
259
|
),
|
|
260
260
|
" ",
|
|
@@ -265,7 +265,7 @@ const Nt = /* @__PURE__ */ wt(St), Ot = {
|
|
|
265
265
|
}
|
|
266
266
|
);
|
|
267
267
|
Zr.displayName = "Button";
|
|
268
|
-
function
|
|
268
|
+
function Ot(t) {
|
|
269
269
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
270
270
|
}
|
|
271
271
|
var cr = { exports: {} }, _r;
|
|
@@ -302,7 +302,7 @@ function At() {
|
|
|
302
302
|
})(cr)), cr.exports;
|
|
303
303
|
}
|
|
304
304
|
var Mt = At();
|
|
305
|
-
const Pt = /* @__PURE__ */
|
|
305
|
+
const Pt = /* @__PURE__ */ Ot(Mt), Ct = {
|
|
306
306
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
307
307
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
308
308
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -373,23 +373,23 @@ const Ft = /* @__PURE__ */ Lt(Vt), Zt = {
|
|
|
373
373
|
"purpur-field-error-text": "_purpur-field-error-text_u1cy2_1",
|
|
374
374
|
"purpur-field-error-text--negative": "_purpur-field-error-text--negative_u1cy2_11",
|
|
375
375
|
"purpur-field-error-text__icon": "_purpur-field-error-text__icon_u1cy2_14"
|
|
376
|
-
},
|
|
376
|
+
}, gr = Ft.bind(Zt), Q = "purpur-field-error-text", Ht = ({
|
|
377
377
|
children: t,
|
|
378
378
|
className: i,
|
|
379
379
|
negative: n = !1,
|
|
380
380
|
["aria-relevant"]: a = "additions text",
|
|
381
381
|
...p
|
|
382
|
-
}) => /* @__PURE__ */
|
|
382
|
+
}) => /* @__PURE__ */ N(
|
|
383
383
|
"div",
|
|
384
384
|
{
|
|
385
|
-
className:
|
|
385
|
+
className: gr(i, Q, {
|
|
386
386
|
[`${Q}--negative`]: n
|
|
387
387
|
}),
|
|
388
388
|
"aria-live": "assertive",
|
|
389
389
|
"aria-relevant": a,
|
|
390
390
|
...p,
|
|
391
391
|
children: [
|
|
392
|
-
/* @__PURE__ */ o(Hr, { svg: Dt, size: "xs", className:
|
|
392
|
+
/* @__PURE__ */ o(Hr, { svg: Dt, size: "xs", className: gr(`${Q}__icon`) }),
|
|
393
393
|
t
|
|
394
394
|
]
|
|
395
395
|
}
|
|
@@ -397,9 +397,9 @@ const Ft = /* @__PURE__ */ Lt(Vt), Zt = {
|
|
|
397
397
|
function Gt(t) {
|
|
398
398
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
399
399
|
}
|
|
400
|
-
var
|
|
400
|
+
var br = { exports: {} }, hr;
|
|
401
401
|
function Wt() {
|
|
402
|
-
return
|
|
402
|
+
return hr || (hr = 1, (function(t) {
|
|
403
403
|
(function() {
|
|
404
404
|
var i = {}.hasOwnProperty;
|
|
405
405
|
function n() {
|
|
@@ -428,13 +428,13 @@ function Wt() {
|
|
|
428
428
|
}
|
|
429
429
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
430
430
|
})();
|
|
431
|
-
})(
|
|
431
|
+
})(br)), br.exports;
|
|
432
432
|
}
|
|
433
433
|
var Qt = Wt();
|
|
434
434
|
const Tt = /* @__PURE__ */ Gt(Qt), Ut = {
|
|
435
|
-
"purpur-field-helper-text": "_purpur-field-helper-
|
|
436
|
-
"purpur-field-helper-text--disabled": "_purpur-field-helper-text--
|
|
437
|
-
"purpur-field-helper-text--negative": "_purpur-field-helper-text--
|
|
435
|
+
"purpur-field-helper-text": "_purpur-field-helper-text_1ociq_1",
|
|
436
|
+
"purpur-field-helper-text--disabled": "_purpur-field-helper-text--disabled_1ociq_9",
|
|
437
|
+
"purpur-field-helper-text--negative": "_purpur-field-helper-text--negative_1ociq_12"
|
|
438
438
|
}, Yt = Tt.bind(Ut), T = "purpur-field-helper-text", Jt = ({
|
|
439
439
|
children: t,
|
|
440
440
|
className: i,
|
|
@@ -550,7 +550,7 @@ function ce(t) {
|
|
|
550
550
|
const i = /* @__PURE__ */ _e(t), n = _.forwardRef((a, p) => {
|
|
551
551
|
const { children: r, ...e } = a, u = _.Children.toArray(r), d = u.find(fe);
|
|
552
552
|
if (d) {
|
|
553
|
-
const l = d.props.children, y = u.map((
|
|
553
|
+
const l = d.props.children, y = u.map((g) => g === d ? _.Children.count(l) > 1 ? _.Children.only(null) : _.isValidElement(l) ? l.props.children : null : g);
|
|
554
554
|
return /* @__PURE__ */ o(i, { ...e, ref: p, children: _.isValidElement(l) ? _.cloneElement(l, void 0, y) : null });
|
|
555
555
|
}
|
|
556
556
|
return /* @__PURE__ */ o(i, { ...e, ref: p, children: r });
|
|
@@ -562,7 +562,7 @@ function _e(t) {
|
|
|
562
562
|
const i = _.forwardRef((n, a) => {
|
|
563
563
|
const { children: p, ...r } = n;
|
|
564
564
|
if (_.isValidElement(p)) {
|
|
565
|
-
const e =
|
|
565
|
+
const e = ge(p), u = ve(r, p.props);
|
|
566
566
|
return p.type !== _.Fragment && (u.ref = a ? le(a, e) : e), _.cloneElement(p, u);
|
|
567
567
|
}
|
|
568
568
|
return _.Children.count(p) > 1 ? _.Children.only(null) : null;
|
|
@@ -584,11 +584,11 @@ function ve(t, i) {
|
|
|
584
584
|
}
|
|
585
585
|
return { ...t, ...n };
|
|
586
586
|
}
|
|
587
|
-
function
|
|
587
|
+
function ge(t) {
|
|
588
588
|
let i = Object.getOwnPropertyDescriptor(t.props, "ref")?.get, n = i && "isReactWarning" in i && i.isReactWarning;
|
|
589
589
|
return n ? t.ref : (i = Object.getOwnPropertyDescriptor(t, "ref")?.get, n = i && "isReactWarning" in i && i.isReactWarning, n ? t.props.ref : t.props.ref || t.ref);
|
|
590
590
|
}
|
|
591
|
-
var
|
|
591
|
+
var be = [
|
|
592
592
|
"a",
|
|
593
593
|
"button",
|
|
594
594
|
"div",
|
|
@@ -606,14 +606,14 @@ var ge = [
|
|
|
606
606
|
"span",
|
|
607
607
|
"svg",
|
|
608
608
|
"ul"
|
|
609
|
-
],
|
|
609
|
+
], he = be.reduce((t, i) => {
|
|
610
610
|
const n = /* @__PURE__ */ ce(`Primitive.${i}`), a = _.forwardRef((p, r) => {
|
|
611
611
|
const { asChild: e, ...u } = p, d = e ? n : i;
|
|
612
612
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ o(d, { ...u, ref: r });
|
|
613
613
|
});
|
|
614
614
|
return a.displayName = `Primitive.${i}`, { ...t, [i]: a };
|
|
615
615
|
}, {}), me = "Label", Qr = _.forwardRef((t, i) => /* @__PURE__ */ o(
|
|
616
|
-
|
|
616
|
+
he.label,
|
|
617
617
|
{
|
|
618
618
|
...t,
|
|
619
619
|
ref: i,
|
|
@@ -665,25 +665,25 @@ const je = /* @__PURE__ */ xe(we), Se = {
|
|
|
665
665
|
"purpur-label": "_purpur-label_1x80u_1",
|
|
666
666
|
"purpur-label--negative": "_purpur-label--negative_1x80u_8",
|
|
667
667
|
"purpur-label--disabled": "_purpur-label--disabled_1x80u_11"
|
|
668
|
-
},
|
|
668
|
+
}, qe = je.bind(Se), U = "purpur-label", Ne = ({
|
|
669
669
|
children: t,
|
|
670
670
|
className: i,
|
|
671
671
|
disabled: n,
|
|
672
672
|
negative: a = !1,
|
|
673
673
|
...p
|
|
674
674
|
}) => {
|
|
675
|
-
const r =
|
|
675
|
+
const r = qe(i, U, {
|
|
676
676
|
[`${U}--disabled`]: n,
|
|
677
677
|
[`${U}--negative`]: a
|
|
678
678
|
});
|
|
679
679
|
return /* @__PURE__ */ o(ye, { className: r, ...p, children: t });
|
|
680
680
|
};
|
|
681
|
-
function
|
|
681
|
+
function Oe(t) {
|
|
682
682
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
683
683
|
}
|
|
684
|
-
var Sr = { exports: {} },
|
|
684
|
+
var Sr = { exports: {} }, qr;
|
|
685
685
|
function Ae() {
|
|
686
|
-
return
|
|
686
|
+
return qr || (qr = 1, (function(t) {
|
|
687
687
|
(function() {
|
|
688
688
|
var i = {}.hasOwnProperty;
|
|
689
689
|
function n() {
|
|
@@ -715,7 +715,7 @@ function Ae() {
|
|
|
715
715
|
})(Sr)), Sr.exports;
|
|
716
716
|
}
|
|
717
717
|
var Me = Ae();
|
|
718
|
-
const Pe = /* @__PURE__ */
|
|
718
|
+
const Pe = /* @__PURE__ */ Oe(Me), Ce = "_rotate_12t9p_1", Be = "_dash_12t9p_1", ze = {
|
|
719
719
|
"purpur-spinner": "_purpur-spinner_12t9p_2",
|
|
720
720
|
rotate: Ce,
|
|
721
721
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_12t9p_6",
|
|
@@ -727,7 +727,7 @@ const Pe = /* @__PURE__ */ qe(Me), Ce = "_rotate_12t9p_1", Be = "_dash_12t9p_1",
|
|
|
727
727
|
dash: Be,
|
|
728
728
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_12t9p_41",
|
|
729
729
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_12t9p_44"
|
|
730
|
-
},
|
|
730
|
+
}, Nr = Pe.bind(ze), E = "purpur-spinner", ke = {
|
|
731
731
|
SM: "sm"
|
|
732
732
|
}, Tr = ({
|
|
733
733
|
disabled: t = !1,
|
|
@@ -735,10 +735,10 @@ const Pe = /* @__PURE__ */ qe(Me), Ce = "_rotate_12t9p_1", Be = "_dash_12t9p_1",
|
|
|
735
735
|
size: n = ke.SM,
|
|
736
736
|
className: a,
|
|
737
737
|
...p
|
|
738
|
-
}) => /* @__PURE__ */ o("div", { className:
|
|
738
|
+
}) => /* @__PURE__ */ o("div", { className: Nr(E, `${E}--${n}`, a), ...p, children: /* @__PURE__ */ o("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ o(
|
|
739
739
|
"circle",
|
|
740
740
|
{
|
|
741
|
-
className:
|
|
741
|
+
className: Nr(`${E}__circle`, {
|
|
742
742
|
[`${E}__circle--disabled`]: t,
|
|
743
743
|
[`${E}__circle--negative`]: i
|
|
744
744
|
}),
|
|
@@ -751,7 +751,7 @@ Tr.displayName = "Spinner";
|
|
|
751
751
|
function Ie(t) {
|
|
752
752
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
753
753
|
}
|
|
754
|
-
var
|
|
754
|
+
var Or = { exports: {} }, Ar;
|
|
755
755
|
function Re() {
|
|
756
756
|
return Ar || (Ar = 1, (function(t) {
|
|
757
757
|
(function() {
|
|
@@ -782,31 +782,31 @@ function Re() {
|
|
|
782
782
|
}
|
|
783
783
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
784
784
|
})();
|
|
785
|
-
})(
|
|
785
|
+
})(Or)), Or.exports;
|
|
786
786
|
}
|
|
787
787
|
var De = Re();
|
|
788
788
|
const Le = /* @__PURE__ */ Ie(De), Ee = {
|
|
789
|
-
"purpur-text-field": "_purpur-text-
|
|
790
|
-
"purpur-text-field__label": "_purpur-text-
|
|
791
|
-
"purpur-text-field__label-text": "_purpur-text-field__label-
|
|
792
|
-
"purpur-text-field__field-row": "_purpur-text-field__field-
|
|
793
|
-
"purpur-text-field__frame": "_purpur-text-
|
|
794
|
-
"purpur-text-field__frame--negative": "_purpur-text-field__frame--
|
|
795
|
-
"purpur-text-field__input-container": "_purpur-text-field__input-
|
|
796
|
-
"purpur-text-field__input-container--disabled": "_purpur-text-field__input-container--
|
|
797
|
-
"purpur-text-field__input-container--readonly": "_purpur-text-field__input-container--
|
|
798
|
-
"purpur-text-field__input-container--has-clear-button": "_purpur-text-field__input-container--has-clear-
|
|
799
|
-
"purpur-text-field__input-container--end-adornment": "_purpur-text-field__input-container--end-
|
|
800
|
-
"purpur-text-field__input": "_purpur-text-
|
|
801
|
-
"purpur-text-field__input-container--start-adornment": "_purpur-text-field__input-container--start-
|
|
802
|
-
"purpur-text-field__input-container--negative": "_purpur-text-field__input-container--
|
|
803
|
-
"purpur-text-field__input--valid": "_purpur-text-field__input--
|
|
804
|
-
"purpur-text-field__input--error": "_purpur-text-field__input--
|
|
805
|
-
"purpur-text-field__input--negative": "_purpur-text-field__input--
|
|
806
|
-
"purpur-text-field__adornment-container": "_purpur-text-field__adornment-
|
|
807
|
-
"purpur-text-field__valid-icon": "_purpur-text-field__valid-
|
|
808
|
-
"purpur-text-field__valid-icon--negative": "_purpur-text-field__valid-icon--
|
|
809
|
-
}, Ve = (t) => it(t),
|
|
789
|
+
"purpur-text-field": "_purpur-text-field_1n0q1_1",
|
|
790
|
+
"purpur-text-field__label": "_purpur-text-field__label_1n0q1_7",
|
|
791
|
+
"purpur-text-field__label-text": "_purpur-text-field__label-text_1n0q1_12",
|
|
792
|
+
"purpur-text-field__field-row": "_purpur-text-field__field-row_1n0q1_15",
|
|
793
|
+
"purpur-text-field__frame": "_purpur-text-field__frame_1n0q1_19",
|
|
794
|
+
"purpur-text-field__frame--negative": "_purpur-text-field__frame--negative_1n0q1_26",
|
|
795
|
+
"purpur-text-field__input-container": "_purpur-text-field__input-container_1n0q1_29",
|
|
796
|
+
"purpur-text-field__input-container--disabled": "_purpur-text-field__input-container--disabled_1n0q1_40",
|
|
797
|
+
"purpur-text-field__input-container--readonly": "_purpur-text-field__input-container--readonly_1n0q1_43",
|
|
798
|
+
"purpur-text-field__input-container--has-clear-button": "_purpur-text-field__input-container--has-clear-button_1n0q1_46",
|
|
799
|
+
"purpur-text-field__input-container--end-adornment": "_purpur-text-field__input-container--end-adornment_1n0q1_49",
|
|
800
|
+
"purpur-text-field__input": "_purpur-text-field__input_1n0q1_29",
|
|
801
|
+
"purpur-text-field__input-container--start-adornment": "_purpur-text-field__input-container--start-adornment_1n0q1_55",
|
|
802
|
+
"purpur-text-field__input-container--negative": "_purpur-text-field__input-container--negative_1n0q1_61",
|
|
803
|
+
"purpur-text-field__input--valid": "_purpur-text-field__input--valid_1n0q1_109",
|
|
804
|
+
"purpur-text-field__input--error": "_purpur-text-field__input--error_1n0q1_109",
|
|
805
|
+
"purpur-text-field__input--negative": "_purpur-text-field__input--negative_1n0q1_130",
|
|
806
|
+
"purpur-text-field__adornment-container": "_purpur-text-field__adornment-container_1n0q1_146",
|
|
807
|
+
"purpur-text-field__valid-icon": "_purpur-text-field__valid-icon_1n0q1_151",
|
|
808
|
+
"purpur-text-field__valid-icon--negative": "_purpur-text-field__valid-icon--negative_1n0q1_154"
|
|
809
|
+
}, Ve = (t) => it(t), q = Le.bind(Ee), c = "purpur-text-field", Ur = G(
|
|
810
810
|
({
|
|
811
811
|
["data-testid"]: t,
|
|
812
812
|
className: i,
|
|
@@ -819,23 +819,23 @@ const Le = /* @__PURE__ */ Ie(De), Ee = {
|
|
|
819
819
|
hideRequiredAsterisk: d = !1,
|
|
820
820
|
label: l,
|
|
821
821
|
loading: y = !1,
|
|
822
|
-
onClear:
|
|
822
|
+
onClear: g,
|
|
823
823
|
startAdornment: M,
|
|
824
824
|
valid: P = !1,
|
|
825
825
|
negative: f = !1,
|
|
826
826
|
...s
|
|
827
|
-
},
|
|
828
|
-
const Z = ut(), C = s.id ?? Z,
|
|
829
|
-
B.current = m, typeof
|
|
827
|
+
}, b) => {
|
|
828
|
+
const Z = ut(), C = s.id ?? Z, h = (m) => t ? `${t}-${m}` : void 0, x = P && !e, $ = u ? `${C}-helper-text` : void 0, k = [M].filter((m) => !!m), w = (typeof s.value == "number" ? s.value !== void 0 : s.value?.length) && !s.disabled && !s.readOnly && !y && g && n, B = Ve(null), I = (m) => {
|
|
829
|
+
B.current = m, typeof b == "function" ? b(m) : b && (b.current = m);
|
|
830
830
|
}, z = () => {
|
|
831
|
-
|
|
831
|
+
g?.(), B.current?.focus();
|
|
832
832
|
}, S = [
|
|
833
833
|
y && /* @__PURE__ */ o(
|
|
834
834
|
Tr,
|
|
835
835
|
{
|
|
836
836
|
disabled: s.disabled,
|
|
837
837
|
size: "xs",
|
|
838
|
-
"data-testid":
|
|
838
|
+
"data-testid": h("spinner"),
|
|
839
839
|
negative: f
|
|
840
840
|
},
|
|
841
841
|
"spinner"
|
|
@@ -848,7 +848,7 @@ const Le = /* @__PURE__ */ Ie(De), Ee = {
|
|
|
848
848
|
onClick: z,
|
|
849
849
|
iconOnly: !0,
|
|
850
850
|
"aria-label": n ?? "",
|
|
851
|
-
"data-testid":
|
|
851
|
+
"data-testid": h("clear-button"),
|
|
852
852
|
tabIndex: -1,
|
|
853
853
|
children: /* @__PURE__ */ o(Wr, { size: "xs" })
|
|
854
854
|
},
|
|
@@ -857,14 +857,14 @@ const Le = /* @__PURE__ */ Ie(De), Ee = {
|
|
|
857
857
|
x && /* @__PURE__ */ o(
|
|
858
858
|
Gr,
|
|
859
859
|
{
|
|
860
|
-
"data-testid":
|
|
861
|
-
className:
|
|
860
|
+
"data-testid": h("valid-icon"),
|
|
861
|
+
className: q(`${c}__valid-icon`, {
|
|
862
862
|
[`${c}__valid-icon--negative`]: f
|
|
863
863
|
})
|
|
864
864
|
},
|
|
865
865
|
"valid-icon"
|
|
866
866
|
)
|
|
867
|
-
].filter((m) => !!m), W =
|
|
867
|
+
].filter((m) => !!m), W = q(`${c}__input-container`, {
|
|
868
868
|
[`${c}__input-container--start-adornment`]: k.length,
|
|
869
869
|
[`${c}__input-container--end-adornment`]: S.length || r,
|
|
870
870
|
[`${c}__input-container--disabled`]: s.disabled,
|
|
@@ -872,13 +872,13 @@ const Le = /* @__PURE__ */ Ie(De), Ee = {
|
|
|
872
872
|
[`${c}__input-container--readonly`]: s.readOnly && !s.disabled,
|
|
873
873
|
[`${c}__input-container--negative`]: f
|
|
874
874
|
});
|
|
875
|
-
return /* @__PURE__ */
|
|
876
|
-
l && /* @__PURE__ */
|
|
877
|
-
|
|
875
|
+
return /* @__PURE__ */ N("div", { className: q(i, c), children: [
|
|
876
|
+
l && /* @__PURE__ */ N(
|
|
877
|
+
Ne,
|
|
878
878
|
{
|
|
879
879
|
htmlFor: C,
|
|
880
|
-
className:
|
|
881
|
-
"data-testid":
|
|
880
|
+
className: q(`${c}__label`),
|
|
881
|
+
"data-testid": h("label"),
|
|
882
882
|
disabled: s.disabled,
|
|
883
883
|
negative: f,
|
|
884
884
|
children: [
|
|
@@ -887,14 +887,14 @@ const Le = /* @__PURE__ */ Ie(De), Ee = {
|
|
|
887
887
|
]
|
|
888
888
|
}
|
|
889
889
|
),
|
|
890
|
-
/* @__PURE__ */
|
|
890
|
+
/* @__PURE__ */ N("div", { className: q(`${c}__field-row`), children: [
|
|
891
891
|
!!a && a,
|
|
892
|
-
/* @__PURE__ */
|
|
892
|
+
/* @__PURE__ */ N("div", { className: W, children: [
|
|
893
893
|
!!k.length && /* @__PURE__ */ o(
|
|
894
894
|
"div",
|
|
895
895
|
{
|
|
896
|
-
"data-testid":
|
|
897
|
-
className:
|
|
896
|
+
"data-testid": h("start-adornments"),
|
|
897
|
+
className: q(`${c}__adornment-container`),
|
|
898
898
|
children: k
|
|
899
899
|
}
|
|
900
900
|
),
|
|
@@ -904,10 +904,10 @@ const Le = /* @__PURE__ */ Ie(De), Ee = {
|
|
|
904
904
|
...s,
|
|
905
905
|
id: C,
|
|
906
906
|
ref: I,
|
|
907
|
-
"data-testid":
|
|
907
|
+
"data-testid": h("input"),
|
|
908
908
|
"aria-describedby": s["aria-describedby"] || $,
|
|
909
909
|
"aria-invalid": s["aria-invalid"] || !!e,
|
|
910
|
-
className:
|
|
910
|
+
className: q([
|
|
911
911
|
`${c}__input`,
|
|
912
912
|
{
|
|
913
913
|
[`${c}__input--valid`]: x,
|
|
@@ -920,16 +920,16 @@ const Le = /* @__PURE__ */ Ie(De), Ee = {
|
|
|
920
920
|
/* @__PURE__ */ o(
|
|
921
921
|
"div",
|
|
922
922
|
{
|
|
923
|
-
className:
|
|
923
|
+
className: q(`${c}__frame`, {
|
|
924
924
|
[`${c}__frame--negative`]: f
|
|
925
925
|
})
|
|
926
926
|
}
|
|
927
927
|
),
|
|
928
|
-
(!!S.length || r) && /* @__PURE__ */
|
|
928
|
+
(!!S.length || r) && /* @__PURE__ */ N(
|
|
929
929
|
"div",
|
|
930
930
|
{
|
|
931
|
-
"data-testid":
|
|
932
|
-
className:
|
|
931
|
+
"data-testid": h("end-adornments"),
|
|
932
|
+
className: q(`${c}__adornment-container`),
|
|
933
933
|
children: [
|
|
934
934
|
S,
|
|
935
935
|
r
|
|
@@ -942,14 +942,14 @@ const Le = /* @__PURE__ */ Ie(De), Ee = {
|
|
|
942
942
|
$ && /* @__PURE__ */ o(
|
|
943
943
|
Jt,
|
|
944
944
|
{
|
|
945
|
-
"data-testid":
|
|
945
|
+
"data-testid": h("helper-text"),
|
|
946
946
|
id: $,
|
|
947
947
|
negative: f,
|
|
948
948
|
disabled: s.disabled,
|
|
949
949
|
children: u
|
|
950
950
|
}
|
|
951
951
|
),
|
|
952
|
-
e && /* @__PURE__ */ o(Ht, { "data-testid":
|
|
952
|
+
e && /* @__PURE__ */ o(Ht, { "data-testid": h("error-text"), negative: f, children: e })
|
|
953
953
|
] });
|
|
954
954
|
}
|
|
955
955
|
);
|
|
@@ -1149,7 +1149,7 @@ const un = /* @__PURE__ */ tn(nn), pn = {
|
|
|
1149
1149
|
size: d = "md",
|
|
1150
1150
|
variant: l,
|
|
1151
1151
|
type: y = "button",
|
|
1152
|
-
...
|
|
1152
|
+
...g
|
|
1153
1153
|
}, M) => {
|
|
1154
1154
|
if (p && l === "destructive")
|
|
1155
1155
|
return null;
|
|
@@ -1166,10 +1166,10 @@ const un = /* @__PURE__ */ tn(nn), pn = {
|
|
|
1166
1166
|
[`${A}--disabled`]: n || r
|
|
1167
1167
|
},
|
|
1168
1168
|
i
|
|
1169
|
-
), f = (
|
|
1170
|
-
n || r ?
|
|
1171
|
-
}, s = !!
|
|
1172
|
-
return /* @__PURE__ */
|
|
1169
|
+
), f = (b) => {
|
|
1170
|
+
n || r ? b.preventDefault() : u && u(b);
|
|
1171
|
+
}, s = !!g["aria-disabled"] || n || r;
|
|
1172
|
+
return /* @__PURE__ */ N(
|
|
1173
1173
|
"button",
|
|
1174
1174
|
{
|
|
1175
1175
|
className: P,
|
|
@@ -1177,7 +1177,7 @@ const un = /* @__PURE__ */ tn(nn), pn = {
|
|
|
1177
1177
|
ref: M,
|
|
1178
1178
|
"aria-disabled": s,
|
|
1179
1179
|
onClick: f,
|
|
1180
|
-
...
|
|
1180
|
+
...g,
|
|
1181
1181
|
children: [
|
|
1182
1182
|
r && /* @__PURE__ */ o(
|
|
1183
1183
|
Jr,
|
|
@@ -1249,27 +1249,27 @@ const ln = /* @__PURE__ */ an(sn), cn = {
|
|
|
1249
1249
|
i ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
1250
1250
|
], a = i ? `<title>${i}</title>` : "";
|
|
1251
1251
|
return `<svg ${fn(n)}>${a}${t}</svg>`;
|
|
1252
|
-
},
|
|
1252
|
+
}, gn = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), K = ({ svg: t, allyTitle: i, className: n, size: a = dn, ...p }) => {
|
|
1253
1253
|
const r = vn({
|
|
1254
|
-
content:
|
|
1254
|
+
content: gn(t.svg),
|
|
1255
1255
|
title: i
|
|
1256
1256
|
}), e = _n(Lr, `${Lr}--${a}`, n);
|
|
1257
1257
|
return /* @__PURE__ */ o("span", { className: e, dangerouslySetInnerHTML: { __html: r }, ...p });
|
|
1258
1258
|
};
|
|
1259
1259
|
K.displayName = "Icon";
|
|
1260
|
-
const
|
|
1260
|
+
const bn = {
|
|
1261
1261
|
name: "minus",
|
|
1262
1262
|
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>',
|
|
1263
1263
|
keywords: ["minus"],
|
|
1264
1264
|
category: "utility"
|
|
1265
|
-
}, Xr = (t) => /* @__PURE__ */ o(K, { ...t, svg:
|
|
1265
|
+
}, Xr = (t) => /* @__PURE__ */ o(K, { ...t, svg: bn });
|
|
1266
1266
|
Xr.displayName = "IconMinus";
|
|
1267
|
-
const
|
|
1267
|
+
const hn = {
|
|
1268
1268
|
name: "plus",
|
|
1269
1269
|
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>',
|
|
1270
1270
|
keywords: ["plus"],
|
|
1271
1271
|
category: "utility"
|
|
1272
|
-
}, rt = (t) => /* @__PURE__ */ o(K, { ...t, svg:
|
|
1272
|
+
}, rt = (t) => /* @__PURE__ */ o(K, { ...t, svg: hn });
|
|
1273
1273
|
rt.displayName = "IconPlus";
|
|
1274
1274
|
const mn = {
|
|
1275
1275
|
"purpur-quantity-selector-button": "_purpur-quantity-selector-button_qjlbs_1",
|
|
@@ -1306,7 +1306,7 @@ const mn = {
|
|
|
1306
1306
|
children: p === "increment" ? /* @__PURE__ */ o(rt, { size: "xs" }) : /* @__PURE__ */ o(Xr, { size: "xs" })
|
|
1307
1307
|
}
|
|
1308
1308
|
);
|
|
1309
|
-
}, Er = Yr.bind(Ge),
|
|
1309
|
+
}, Er = Yr.bind(Ge), qn = ["attached", "separated"], Nn = ["primary", "secondary"], j = "purpur-quantity-selector", $n = G(
|
|
1310
1310
|
({
|
|
1311
1311
|
["data-testid"]: t,
|
|
1312
1312
|
className: i,
|
|
@@ -1319,12 +1319,12 @@ const mn = {
|
|
|
1319
1319
|
disabled: d,
|
|
1320
1320
|
loading: l,
|
|
1321
1321
|
minValue: y,
|
|
1322
|
-
maxValue:
|
|
1322
|
+
maxValue: g,
|
|
1323
1323
|
ariaLabelDecrement: M,
|
|
1324
1324
|
ariaLabelIncrement: P,
|
|
1325
1325
|
...f
|
|
1326
1326
|
}, s) => {
|
|
1327
|
-
const [
|
|
1327
|
+
const [b, Z] = rr(e ?? 0), [C, h] = rr(b), x = r !== void 0, $ = x ? r : C, k = (v) => t ? `${t}-${v}` : void 0, w = d || l, B = Math.max(y ?? 0, 0), I = g ?? Number.MAX_SAFE_INTEGER, z = $ === I, S = $ === B;
|
|
1328
1328
|
tr(() => {
|
|
1329
1329
|
x && Z(r);
|
|
1330
1330
|
}, [r, x]), tr(() => {
|
|
@@ -1346,10 +1346,10 @@ const mn = {
|
|
|
1346
1346
|
if (!/^[0-9]*$/.test(v.target.value))
|
|
1347
1347
|
return;
|
|
1348
1348
|
const H = +v.target.value;
|
|
1349
|
-
H < B || H > I || (x ||
|
|
1349
|
+
H < B || H > I || (x || h(H), p(H));
|
|
1350
1350
|
}, tt = (v) => {
|
|
1351
1351
|
const R = v === "increment" ? $ + 1 : $ - 1;
|
|
1352
|
-
R < 0 || (x ||
|
|
1352
|
+
R < 0 || (x || h(R), p(R));
|
|
1353
1353
|
}, X = (v) => {
|
|
1354
1354
|
const R = v === "increment" && z || v === "decrement" && S;
|
|
1355
1355
|
return /* @__PURE__ */ o(
|
|
@@ -1364,7 +1364,7 @@ const mn = {
|
|
|
1364
1364
|
"aria-label": v === "increment" ? P : M
|
|
1365
1365
|
}
|
|
1366
1366
|
);
|
|
1367
|
-
}, et = /* @__PURE__ */
|
|
1367
|
+
}, et = /* @__PURE__ */ N(nt, { children: [
|
|
1368
1368
|
l && /* @__PURE__ */ o(
|
|
1369
1369
|
"div",
|
|
1370
1370
|
{
|
|
@@ -1411,7 +1411,7 @@ const mn = {
|
|
|
1411
1411
|
$n.displayName = "QuantitySelector";
|
|
1412
1412
|
export {
|
|
1413
1413
|
$n as QuantitySelector,
|
|
1414
|
-
|
|
1415
|
-
|
|
1414
|
+
Nn as quantitySelectorButtonVariants,
|
|
1415
|
+
qn as quantitySelectorVariants
|
|
1416
1416
|
};
|
|
1417
1417
|
//# sourceMappingURL=quantity-selector.es.js.map
|