@caseparts-org/caseblocks 0.0.272 → 0.0.273

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.
@@ -1 +1 @@
1
- ._qty-container_18e2j_1{display:flex;flex-direction:row;align-items:center}._qty-container_18e2j_1>button{font-size:1.25rem;border:1px solid var(--border-border-primary);background-color:#fff;box-sizing:border-box}._qty-container_18e2j_1>input{text-align:center;font-size:var(--font-size-md);border:1px solid var(--border-border-primary);box-sizing:border-box;outline:none}._qty-container_18e2j_1>input::-webkit-outer-spin-button,._qty-container_18e2j_1>input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}._qty-container_18e2j_1>input[type=number]{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}._decrease-btn_18e2j_35{position:relative;left:2px;z-index:0;display:flex;flex-direction:row;align-items:center;justify-content:center;cursor:pointer}._increase-btn_18e2j_46{position:relative;left:-2px;z-index:0;display:flex;flex-direction:row;align-items:center;justify-content:center;cursor:pointer}._decrease-btn_18e2j_35:disabled,._increase-btn_18e2j_46:disabled{pointer-events:none}._decrease-btn_18e2j_35:disabled svg,._increase-btn_18e2j_46:disabled svg{fill:var(--color-neutrals-neutral-4)}._button-sm_18e2j_67{width:1.25rem;height:1.25rem}._button-md_18e2j_71{width:2rem;height:2rem}._button-lg_18e2j_75{width:2.5rem;height:2.5rem}._qty-input-sm_18e2j_79{width:2.5rem;height:1.25rem}._qty-input-md_18e2j_83{width:2.5rem;height:2rem}._qty-input-lg_18e2j_87{width:3rem;height:2.5rem}
1
+ ._qty-container_1mse4_1{display:flex;flex-direction:row;align-items:center}._qty-container_1mse4_1>button{font-size:1.25rem;border:1px solid var(--border-border-primary);background-color:#fff;box-sizing:border-box}._qty-container_1mse4_1>input{text-align:center;font-size:var(--font-size-md);border:1px solid var(--border-border-primary);box-sizing:border-box;outline:none}._qty-container_1mse4_1>input::-webkit-outer-spin-button,._qty-container_1mse4_1>input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}._qty-container_1mse4_1>input[type=number]{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}._decrease-btn_1mse4_35{position:relative;left:2px;z-index:0;display:flex;flex-direction:row;align-items:center;justify-content:center;cursor:pointer;border-top-left-radius:4px;border-bottom-left-radius:4px}._increase-btn_1mse4_48{position:relative;left:-2px;z-index:0;display:flex;flex-direction:row;align-items:center;justify-content:center;cursor:pointer;border-top-right-radius:4px;border-bottom-right-radius:4px}._decrease-btn_1mse4_35._button-sm_1mse4_61{border-top-left-radius:2px;border-bottom-left-radius:2px}._increase-btn_1mse4_48._button-sm_1mse4_61{border-top-right-radius:2px;border-bottom-right-radius:2px}._decrease-btn_1mse4_35:disabled,._increase-btn_1mse4_48:disabled{pointer-events:none}._decrease-btn_1mse4_35:disabled svg,._increase-btn_1mse4_48:disabled svg{fill:var(--color-neutrals-neutral-4)}._button-sm_1mse4_61{width:1.25rem;height:1.25rem}._button-md_1mse4_84{width:2rem;height:2rem}._button-lg_1mse4_88{width:2.5rem;height:2.5rem}._qty-input-sm_1mse4_92{width:2.5rem;height:1.25rem}._qty-input-md_1mse4_96{width:2.5rem;height:2rem}._qty-input-lg_1mse4_100{width:3rem;height:2.5rem}
@@ -1,75 +1,75 @@
1
- import { jsxs as N, jsx as i } from "react/jsx-runtime";
2
- import { c as a } from "../../clsx-OuTLNxxd.js";
1
+ import { jsxs as g, jsx as a } from "react/jsx-runtime";
2
+ import { c as r } from "../../clsx-OuTLNxxd.js";
3
3
  import { Icon as l } from "../../atoms/Icon/Icon.js";
4
- import { getHideAtStyles as g } from "../../atoms/HideAt.js";
4
+ import { getHideAtStyles as v } from "../../atoms/HideAt.js";
5
5
  import '../../assets/QuantityInput.css';const s = {
6
- "qty-container": "_qty-container_18e2j_1",
7
- "decrease-btn": "_decrease-btn_18e2j_35",
8
- "increase-btn": "_increase-btn_18e2j_46",
9
- "button-sm": "_button-sm_18e2j_67",
10
- "button-md": "_button-md_18e2j_71",
11
- "button-lg": "_button-lg_18e2j_75",
12
- "qty-input-sm": "_qty-input-sm_18e2j_79",
13
- "qty-input-md": "_qty-input-md_18e2j_83",
14
- "qty-input-lg": "_qty-input-lg_18e2j_87"
6
+ "qty-container": "_qty-container_1mse4_1",
7
+ "decrease-btn": "_decrease-btn_1mse4_35",
8
+ "increase-btn": "_increase-btn_1mse4_48",
9
+ "button-sm": "_button-sm_1mse4_61",
10
+ "button-md": "_button-md_1mse4_84",
11
+ "button-lg": "_button-lg_1mse4_88",
12
+ "qty-input-sm": "_qty-input-sm_1mse4_92",
13
+ "qty-input-md": "_qty-input-md_1mse4_96",
14
+ "qty-input-lg": "_qty-input-lg_1mse4_100"
15
15
  };
16
- function C({
16
+ function $({
17
17
  quantity: o = 1,
18
18
  onQuantityChange: _,
19
19
  min: e = 1,
20
20
  max: n = 9999,
21
21
  className: b,
22
- wrapperClassName: d,
23
- hideAt: p,
24
- size: r = "md",
25
- ...y
22
+ wrapperClassName: m,
23
+ hideAt: d,
24
+ size: c = "md",
25
+ ...p
26
26
  }) {
27
- const m = (t) => (e !== void 0 && t < e && (t = e), n !== void 0 && n !== void 0 && t > n && (t = n), t), u = (t) => {
28
- const c = m(Number.isNaN(t) ? e ?? 1 : t);
29
- _(c);
30
- }, f = () => u(o - 1), j = () => u(o + 1);
31
- return /* @__PURE__ */ N("div", { className: a(s["qty-container"], g(p), d), children: [
32
- /* @__PURE__ */ i(
27
+ const y = (t) => (e !== void 0 && t < e && (t = e), n !== void 0 && n !== void 0 && t > n && (t = n), t), u = (t) => {
28
+ const i = y(Number.isNaN(t) ? e ?? 1 : t);
29
+ _(i);
30
+ }, f = () => u(o - 1), N = () => u(o + 1);
31
+ return /* @__PURE__ */ g("div", { className: r(s["qty-container"], v(d), m), children: [
32
+ /* @__PURE__ */ a(
33
33
  "button",
34
34
  {
35
35
  type: "button",
36
- className: a(s["decrease-btn"], s[`button-${r}`]),
36
+ className: r(s["decrease-btn"], s[`button-${c}`]),
37
37
  onClick: f,
38
38
  disabled: o <= (e ?? 1),
39
39
  "aria-label": "Decrease quantity",
40
- children: /* @__PURE__ */ i(l, { iconKey: "fa-solid fa-minus", size: "sm" })
40
+ children: /* @__PURE__ */ a(l, { iconKey: "fa-solid fa-minus", size: c === "sm" ? "3xs" : "xs" })
41
41
  }
42
42
  ),
43
- /* @__PURE__ */ i(
43
+ /* @__PURE__ */ a(
44
44
  "input",
45
45
  {
46
- className: a(s["qty-input"], s[`qty-input-${r}`], b),
46
+ className: r(s["qty-input"], s[`qty-input-${c}`], b),
47
47
  type: "number",
48
48
  min: e,
49
49
  max: n,
50
50
  value: o,
51
51
  onFocus: (t) => t.currentTarget.select(),
52
52
  onChange: (t) => {
53
- const c = parseInt(t.target.value, 10);
54
- u(Number.isNaN(c) ? e ?? 1 : c);
53
+ const i = parseInt(t.target.value, 10);
54
+ u(Number.isNaN(i) ? e ?? 1 : i);
55
55
  },
56
56
  "aria-label": "Quantity",
57
- ...y
57
+ ...p
58
58
  }
59
59
  ),
60
- /* @__PURE__ */ i(
60
+ /* @__PURE__ */ a(
61
61
  "button",
62
62
  {
63
63
  type: "button",
64
- className: a(s["increase-btn"], s[`button-${r}`]),
65
- onClick: j,
64
+ className: r(s["increase-btn"], s[`button-${c}`]),
65
+ onClick: N,
66
66
  disabled: n !== void 0 && o >= n,
67
67
  "aria-label": "Increase quantity",
68
- children: /* @__PURE__ */ i(l, { iconKey: "fa-solid fa-plus", size: "sm" })
68
+ children: /* @__PURE__ */ a(l, { iconKey: "fa-solid fa-plus", size: c === "sm" ? "3xs" : "xs" })
69
69
  }
70
70
  )
71
71
  ] });
72
72
  }
73
73
  export {
74
- C as QuantityInput
74
+ $ as QuantityInput
75
75
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@caseparts-org/caseblocks",
3
3
  "private": false,
4
- "version": "0.0.272",
4
+ "version": "0.0.273",
5
5
  "type": "module",
6
6
  "module": "dist/main.js",
7
7
  "types": "dist/main.d.ts",