@purpurds/quantity-selector 6.7.2 → 6.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.rush/temp/operation/ci_build/all.log +2 -2
- 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/state.json +1 -1
- package/dist/LICENSE.txt +4 -4
- package/dist/quantity-selector.cjs.js +11 -11
- package/dist/quantity-selector.cjs.js.map +1 -1
- package/dist/quantity-selector.es.js +43 -43
- package/dist/quantity-selector.es.js.map +1 -1
- package/package.json +5 -5
|
@@ -338,26 +338,26 @@ const Mt = /* @__PURE__ */ Ot(At), Pt = {
|
|
|
338
338
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
339
339
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
340
340
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
341
|
-
},
|
|
341
|
+
}, kt = Mt.bind(Pt), vr = "purpur-icon", Ct = "md", Bt = (t) => t.filter((i) => Object.keys(i).length >= 1).map((i) => `${i.name}="${i.value}"`).join(" "), Rt = ({ content: t = "", title: i } = {}) => {
|
|
342
342
|
const n = [
|
|
343
343
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
344
344
|
{ name: "fill", value: "currentColor" },
|
|
345
345
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
346
346
|
i ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
347
347
|
], o = i ? `<title>${i}</title>` : "";
|
|
348
|
-
return `<svg ${
|
|
348
|
+
return `<svg ${Bt(n)}>${o}${t}</svg>`;
|
|
349
349
|
}, Dt = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Wr = ({
|
|
350
350
|
["data-testid"]: t,
|
|
351
351
|
svg: i,
|
|
352
352
|
allyTitle: n,
|
|
353
353
|
className: o,
|
|
354
|
-
size: a =
|
|
354
|
+
size: a = Ct,
|
|
355
355
|
...r
|
|
356
356
|
}) => {
|
|
357
357
|
const e = Rt({
|
|
358
358
|
content: Dt(i.svg),
|
|
359
359
|
title: n
|
|
360
|
-
}), u =
|
|
360
|
+
}), u = kt(o, vr, `${vr}--${a}`);
|
|
361
361
|
return /* @__PURE__ */ p(
|
|
362
362
|
"span",
|
|
363
363
|
{
|
|
@@ -848,15 +848,15 @@ const Pr = /* @__PURE__ */ he($e), je = "_rotate_1xozj_1", qe = "_dash_1xozj_1",
|
|
|
848
848
|
function Oe(t) {
|
|
849
849
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
850
850
|
}
|
|
851
|
-
var
|
|
851
|
+
var kr = { exports: {} };
|
|
852
852
|
/*!
|
|
853
853
|
Copyright (c) 2018 Jed Watson.
|
|
854
854
|
Licensed under the MIT License (MIT), see
|
|
855
855
|
http://jedwatson.github.io/classnames
|
|
856
856
|
*/
|
|
857
|
-
var
|
|
857
|
+
var Cr;
|
|
858
858
|
function Ne() {
|
|
859
|
-
return
|
|
859
|
+
return Cr || (Cr = 1, function(t) {
|
|
860
860
|
(function() {
|
|
861
861
|
var i = {}.hasOwnProperty;
|
|
862
862
|
function n() {
|
|
@@ -885,27 +885,27 @@ function Ne() {
|
|
|
885
885
|
}
|
|
886
886
|
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
|
|
887
887
|
})();
|
|
888
|
-
}(
|
|
888
|
+
}(kr)), kr.exports;
|
|
889
889
|
}
|
|
890
890
|
var Ae = Ne();
|
|
891
891
|
const Me = /* @__PURE__ */ Oe(Ae), Pe = {
|
|
892
|
-
"purpur-text-field": "_purpur-text-
|
|
893
|
-
"purpur-text-field__label": "_purpur-text-
|
|
894
|
-
"purpur-text-field__label-text": "_purpur-text-field__label-
|
|
895
|
-
"purpur-text-field__field-row": "_purpur-text-field__field-
|
|
896
|
-
"purpur-text-field__frame": "_purpur-text-
|
|
897
|
-
"purpur-text-field__input-container": "_purpur-text-field__input-
|
|
898
|
-
"purpur-text-field__input-container--disabled": "_purpur-text-field__input-container--
|
|
899
|
-
"purpur-text-field__input-container--readonly": "_purpur-text-field__input-container--
|
|
900
|
-
"purpur-text-field__input-container--has-clear-button": "_purpur-text-field__input-container--has-clear-
|
|
901
|
-
"purpur-text-field__input-container--end-adornment": "_purpur-text-field__input-container--end-
|
|
902
|
-
"purpur-text-field__input": "_purpur-text-
|
|
903
|
-
"purpur-text-field__input-container--start-adornment": "_purpur-text-field__input-container--start-
|
|
904
|
-
"purpur-text-field__input--valid": "_purpur-text-field__input--
|
|
905
|
-
"purpur-text-field__input--error": "_purpur-text-field__input--
|
|
906
|
-
"purpur-text-field__adornment-container": "_purpur-text-field__adornment-
|
|
907
|
-
"purpur-text-field__valid-icon": "_purpur-text-field__valid-
|
|
908
|
-
},
|
|
892
|
+
"purpur-text-field": "_purpur-text-field_1k23z_1",
|
|
893
|
+
"purpur-text-field__label": "_purpur-text-field__label_1k23z_7",
|
|
894
|
+
"purpur-text-field__label-text": "_purpur-text-field__label-text_1k23z_13",
|
|
895
|
+
"purpur-text-field__field-row": "_purpur-text-field__field-row_1k23z_16",
|
|
896
|
+
"purpur-text-field__frame": "_purpur-text-field__frame_1k23z_20",
|
|
897
|
+
"purpur-text-field__input-container": "_purpur-text-field__input-container_1k23z_27",
|
|
898
|
+
"purpur-text-field__input-container--disabled": "_purpur-text-field__input-container--disabled_1k23z_38",
|
|
899
|
+
"purpur-text-field__input-container--readonly": "_purpur-text-field__input-container--readonly_1k23z_41",
|
|
900
|
+
"purpur-text-field__input-container--has-clear-button": "_purpur-text-field__input-container--has-clear-button_1k23z_44",
|
|
901
|
+
"purpur-text-field__input-container--end-adornment": "_purpur-text-field__input-container--end-adornment_1k23z_47",
|
|
902
|
+
"purpur-text-field__input": "_purpur-text-field__input_1k23z_27",
|
|
903
|
+
"purpur-text-field__input-container--start-adornment": "_purpur-text-field__input-container--start-adornment_1k23z_53",
|
|
904
|
+
"purpur-text-field__input--valid": "_purpur-text-field__input--valid_1k23z_95",
|
|
905
|
+
"purpur-text-field__input--error": "_purpur-text-field__input--error_1k23z_95",
|
|
906
|
+
"purpur-text-field__adornment-container": "_purpur-text-field__adornment-container_1k23z_107",
|
|
907
|
+
"purpur-text-field__valid-icon": "_purpur-text-field__valid-icon_1k23z_112"
|
|
908
|
+
}, ke = (t) => it(t), q = Me.bind(Pe), c = "purpur-text-field", Ce = ({
|
|
909
909
|
["data-testid"]: t,
|
|
910
910
|
className: i,
|
|
911
911
|
clearButtonAllyLabel: n,
|
|
@@ -922,11 +922,11 @@ const Me = /* @__PURE__ */ Oe(Ae), Pe = {
|
|
|
922
922
|
...s
|
|
923
923
|
}, h) => {
|
|
924
924
|
var j;
|
|
925
|
-
const y = ut(), x = s.id ?? y, l = (d) => t ? `${t}-${d}` : void 0, S = $ && !e,
|
|
926
|
-
|
|
925
|
+
const y = ut(), x = s.id ?? y, l = (d) => t ? `${t}-${d}` : void 0, S = $ && !e, k = u ? `${x}-helper-text` : void 0, m = [O].filter((d) => !!d), C = (typeof s.value == "number" ? s.value !== void 0 : (j = s.value) == null ? void 0 : j.length) && !s.disabled && !s.readOnly && !b && v && n, B = ke(null), N = (d) => {
|
|
926
|
+
B.current = d, typeof h == "function" ? h(d) : h && (h.current = d);
|
|
927
927
|
}, A = () => {
|
|
928
928
|
var d;
|
|
929
|
-
v == null || v(), (d =
|
|
929
|
+
v == null || v(), (d = B.current) == null || d.focus();
|
|
930
930
|
}, D = [
|
|
931
931
|
b && /* @__PURE__ */ p(
|
|
932
932
|
ze,
|
|
@@ -937,7 +937,7 @@ const Me = /* @__PURE__ */ Oe(Ae), Pe = {
|
|
|
937
937
|
},
|
|
938
938
|
"spinner"
|
|
939
939
|
),
|
|
940
|
-
|
|
940
|
+
C && /* @__PURE__ */ p(
|
|
941
941
|
Gr,
|
|
942
942
|
{
|
|
943
943
|
variant: "tertiary-purple",
|
|
@@ -964,7 +964,7 @@ const Me = /* @__PURE__ */ Oe(Ae), Pe = {
|
|
|
964
964
|
[`${c}__input-container--start-adornment`]: m.length,
|
|
965
965
|
[`${c}__input-container--end-adornment`]: D.length || r,
|
|
966
966
|
[`${c}__input-container--disabled`]: s.disabled,
|
|
967
|
-
[`${c}__input-container--has-clear-button`]:
|
|
967
|
+
[`${c}__input-container--has-clear-button`]: C,
|
|
968
968
|
[`${c}__input-container--readonly`]: s.readOnly && !s.disabled
|
|
969
969
|
}
|
|
970
970
|
]);
|
|
@@ -997,7 +997,7 @@ const Me = /* @__PURE__ */ Oe(Ae), Pe = {
|
|
|
997
997
|
id: x,
|
|
998
998
|
ref: N,
|
|
999
999
|
"data-testid": l("input"),
|
|
1000
|
-
"aria-describedby": s["aria-describedby"] ||
|
|
1000
|
+
"aria-describedby": s["aria-describedby"] || k,
|
|
1001
1001
|
"aria-invalid": s["aria-invalid"] || !!e,
|
|
1002
1002
|
className: q([
|
|
1003
1003
|
`${c}__input`,
|
|
@@ -1023,12 +1023,12 @@ const Me = /* @__PURE__ */ Oe(Ae), Pe = {
|
|
|
1023
1023
|
] }),
|
|
1024
1024
|
!!a && a
|
|
1025
1025
|
] }),
|
|
1026
|
-
|
|
1026
|
+
k && /* @__PURE__ */ p(Qt, { "data-testid": l("helper-text"), id: k, children: u }),
|
|
1027
1027
|
e && /* @__PURE__ */ p(Zt, { "data-testid": l("error-text"), children: e })
|
|
1028
1028
|
] });
|
|
1029
|
-
}, Jr = Q(
|
|
1029
|
+
}, Jr = Q(Ce);
|
|
1030
1030
|
Jr.displayName = "TextField";
|
|
1031
|
-
function
|
|
1031
|
+
function Be(t) {
|
|
1032
1032
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
1033
1033
|
}
|
|
1034
1034
|
var J = { exports: {} };
|
|
@@ -1037,9 +1037,9 @@ var J = { exports: {} };
|
|
|
1037
1037
|
Licensed under the MIT License (MIT), see
|
|
1038
1038
|
http://jedwatson.github.io/classnames
|
|
1039
1039
|
*/
|
|
1040
|
-
var
|
|
1040
|
+
var Br;
|
|
1041
1041
|
function Re() {
|
|
1042
|
-
return
|
|
1042
|
+
return Br || (Br = 1, function(t) {
|
|
1043
1043
|
(function() {
|
|
1044
1044
|
var i = {}.hasOwnProperty;
|
|
1045
1045
|
function n() {
|
|
@@ -1071,7 +1071,7 @@ function Re() {
|
|
|
1071
1071
|
}(J)), J.exports;
|
|
1072
1072
|
}
|
|
1073
1073
|
var De = Re();
|
|
1074
|
-
const Kr = /* @__PURE__ */
|
|
1074
|
+
const Kr = /* @__PURE__ */ Be(De), Fe = {
|
|
1075
1075
|
"purpur-quantity-selector": "_purpur-quantity-selector_lzxe3_1",
|
|
1076
1076
|
"purpur-quantity-selector--full-width": "_purpur-quantity-selector--full-width_lzxe3_21",
|
|
1077
1077
|
"purpur-quantity-selector--loading": "_purpur-quantity-selector--loading_lzxe3_27",
|
|
@@ -1436,7 +1436,7 @@ const dn = {
|
|
|
1436
1436
|
maxValue: O,
|
|
1437
1437
|
...$
|
|
1438
1438
|
}, s) => {
|
|
1439
|
-
const [h, j] = nr(e ?? 0), [y, x] = nr(h), l = r !== void 0, S = l ? r : y,
|
|
1439
|
+
const [h, j] = nr(e ?? 0), [y, x] = nr(h), l = r !== void 0, S = l ? r : y, k = (g) => t ? `${t}-${g}` : void 0, m = f || b, C = Math.max(v ?? 0, 0), B = O ?? Number.MAX_SAFE_INTEGER, N = S === B, A = S === C;
|
|
1440
1440
|
ur(() => {
|
|
1441
1441
|
l && j(r);
|
|
1442
1442
|
}, [r, l]), ur(() => {
|
|
@@ -1462,7 +1462,7 @@ const dn = {
|
|
|
1462
1462
|
if (!/^[0-9]*$/.test(g.target.value))
|
|
1463
1463
|
return;
|
|
1464
1464
|
const W = +g.target.value;
|
|
1465
|
-
W <
|
|
1465
|
+
W < C || W > B || (l || x(W), a(W));
|
|
1466
1466
|
}, d = (g) => {
|
|
1467
1467
|
const R = g === "increment" ? S + 1 : S - 1;
|
|
1468
1468
|
R < 0 || (l || x(R), a(R));
|
|
@@ -1471,7 +1471,7 @@ const dn = {
|
|
|
1471
1471
|
return /* @__PURE__ */ p(
|
|
1472
1472
|
vn,
|
|
1473
1473
|
{
|
|
1474
|
-
"data-testid":
|
|
1474
|
+
"data-testid": k("button-" + g),
|
|
1475
1475
|
variant: o,
|
|
1476
1476
|
buttonType: g,
|
|
1477
1477
|
hasGap: n === "separated",
|
|
@@ -1495,7 +1495,7 @@ const dn = {
|
|
|
1495
1495
|
{
|
|
1496
1496
|
disabled: m,
|
|
1497
1497
|
size: "xs",
|
|
1498
|
-
"data-testid":
|
|
1498
|
+
"data-testid": k("spinner")
|
|
1499
1499
|
},
|
|
1500
1500
|
"spinner"
|
|
1501
1501
|
)
|
|
@@ -1515,8 +1515,8 @@ const dn = {
|
|
|
1515
1515
|
beforeField: nt,
|
|
1516
1516
|
afterField: er("increment"),
|
|
1517
1517
|
disabled: m,
|
|
1518
|
-
min:
|
|
1519
|
-
max:
|
|
1518
|
+
min: C,
|
|
1519
|
+
max: B,
|
|
1520
1520
|
...$
|
|
1521
1521
|
}
|
|
1522
1522
|
);
|