@caseparts-org/caseblocks 0.0.190 → 0.0.192
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.
|
@@ -14,8 +14,8 @@ function V({
|
|
|
14
14
|
itemKey: c,
|
|
15
15
|
disableButton: p,
|
|
16
16
|
initialQuantity: _ = 1,
|
|
17
|
-
min: s =
|
|
18
|
-
max:
|
|
17
|
+
min: s = 1,
|
|
18
|
+
max: i,
|
|
19
19
|
onQuantityChange: n,
|
|
20
20
|
onAdd: T,
|
|
21
21
|
autoHideDelayMs: x = 3e3,
|
|
@@ -25,10 +25,10 @@ function V({
|
|
|
25
25
|
addButtonVariant: R,
|
|
26
26
|
buttonText: S,
|
|
27
27
|
buttonDoneText: k,
|
|
28
|
-
size:
|
|
28
|
+
size: d,
|
|
29
29
|
requiresUnitDetails: v = !1
|
|
30
30
|
}) {
|
|
31
|
-
const [
|
|
31
|
+
const [a, z] = o.useState(() => {
|
|
32
32
|
const e = Number(_) || 1;
|
|
33
33
|
return e < s ? s : e;
|
|
34
34
|
}), [C, l] = o.useState(!1), t = o.useRef(null);
|
|
@@ -40,15 +40,15 @@ function V({
|
|
|
40
40
|
}, [n]), u = /* @__PURE__ */ r(
|
|
41
41
|
q,
|
|
42
42
|
{
|
|
43
|
-
size:
|
|
43
|
+
size: d || "md",
|
|
44
44
|
variant: R || "cta-primary",
|
|
45
45
|
completed: C,
|
|
46
46
|
onClick: async () => {
|
|
47
|
-
c && (await T(c,
|
|
47
|
+
c && (await T(c, a), l(!0), t.current && clearTimeout(t.current), t.current = setTimeout(() => l(!1), x));
|
|
48
48
|
},
|
|
49
49
|
text: S,
|
|
50
50
|
completedText: k,
|
|
51
|
-
disabled: !c || p || (
|
|
51
|
+
disabled: !c || p || (i ?? 99999) <= 0 || a <= 0,
|
|
52
52
|
className: N
|
|
53
53
|
}
|
|
54
54
|
);
|
|
@@ -56,11 +56,11 @@ function V({
|
|
|
56
56
|
b && /* @__PURE__ */ r(
|
|
57
57
|
y,
|
|
58
58
|
{
|
|
59
|
-
quantity:
|
|
59
|
+
quantity: a,
|
|
60
60
|
onQuantityChange: h,
|
|
61
61
|
min: s,
|
|
62
|
-
max:
|
|
63
|
-
size:
|
|
62
|
+
max: i,
|
|
63
|
+
size: d || "md"
|
|
64
64
|
}
|
|
65
65
|
),
|
|
66
66
|
v ? /* @__PURE__ */ r(B, { trigger: u, children: /* @__PURE__ */ m("div", { className: f.tooltipContent, children: [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as e, jsxs as m } from "react/jsx-runtime";
|
|
2
2
|
import { c as h } from "../../clsx-OuTLNxxd.js";
|
|
3
|
-
import { Flex as
|
|
3
|
+
import { Flex as c } from "../../atoms/Flex/Flex.js";
|
|
4
4
|
import { getHideAtStyles as u } from "../../atoms/HideAt.js";
|
|
5
5
|
import { Icon as f } from "../../atoms/Icon/Icon.js";
|
|
6
6
|
import '../../assets/SearchBox.css';const p = "_button_11jol_1", x = "_text_11jol_16", _ = "_input_11jol_33", d = "_inputSearch_11jol_38", g = "_searchfield_11jol_42", b = "_searchBox_11jol_49", t = {
|
|
@@ -12,31 +12,31 @@ import '../../assets/SearchBox.css';const p = "_button_11jol_1", x = "_text_11jo
|
|
|
12
12
|
searchBox: b
|
|
13
13
|
};
|
|
14
14
|
function N({
|
|
15
|
-
onSearch:
|
|
16
|
-
inputName:
|
|
15
|
+
onSearch: o,
|
|
16
|
+
inputName: n,
|
|
17
17
|
hideAt: s,
|
|
18
18
|
className: a,
|
|
19
19
|
...i
|
|
20
20
|
}) {
|
|
21
21
|
return /* @__PURE__ */ e(
|
|
22
|
-
|
|
22
|
+
c,
|
|
23
23
|
{
|
|
24
24
|
flexDirection: "row",
|
|
25
25
|
alignItems: "center",
|
|
26
26
|
className: h(t.searchBox, u(s), a),
|
|
27
27
|
...i,
|
|
28
28
|
children: /* @__PURE__ */ e(
|
|
29
|
-
|
|
29
|
+
c,
|
|
30
30
|
{
|
|
31
31
|
flexDirection: "row",
|
|
32
32
|
alignItems: "center",
|
|
33
33
|
className: t.searchfield,
|
|
34
|
-
children: /* @__PURE__ */ e("div", { className: t.inputSearch, children: /* @__PURE__ */ e("form", { onSubmit: (
|
|
35
|
-
|
|
36
|
-
const l = (new FormData(
|
|
37
|
-
|
|
34
|
+
children: /* @__PURE__ */ e("div", { className: t.inputSearch, children: /* @__PURE__ */ e("form", { onSubmit: (r) => {
|
|
35
|
+
r.preventDefault();
|
|
36
|
+
const l = (new FormData(r.currentTarget).get(n ?? "search") || "").trim();
|
|
37
|
+
o(l), r.currentTarget.reset();
|
|
38
38
|
}, children: /* @__PURE__ */ m(
|
|
39
|
-
|
|
39
|
+
c,
|
|
40
40
|
{
|
|
41
41
|
className: t.input,
|
|
42
42
|
flexDirection: "row",
|
|
@@ -49,7 +49,7 @@ function N({
|
|
|
49
49
|
type: "text",
|
|
50
50
|
className: t.text,
|
|
51
51
|
placeholder: "Search by keyword(s) or Part #....",
|
|
52
|
-
name:
|
|
52
|
+
name: n ?? "search"
|
|
53
53
|
}
|
|
54
54
|
)
|
|
55
55
|
]
|