@caseparts-org/caseblocks 0.0.35 → 0.0.36

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,21 +1,21 @@
1
- import { jsx as t, jsxs as n } from "react/jsx-runtime";
1
+ import { jsx as t, jsxs as s } from "react/jsx-runtime";
2
2
  import { Icon as o } from "../../atoms/Icon/Icon.js";
3
3
  import { Text as m } from "../../atoms/Text/Text.js";
4
4
  import { Button as g } from "../../atoms/Button/Button.js";
5
5
  import { Tooltip as _ } from "../Tooltip/Tooltip.js";
6
6
  import { QuantityInput as p } from "../QuantityInput/QuantityInput.js";
7
- import '../../assets/Cart.css';const I = "_cart_tgc5k_1", u = "_count_tgc5k_8", f = "_cartContainer_tgc5k_23", k = "_cartItems_tgc5k_32", v = "_itemInfo_tgc5k_54", z = "_removeItem_tgc5k_71", C = "_itemManagement_tgc5k_78", N = "_noItems_tgc5k_83", y = "_subtotal_tgc5k_90", e = {
8
- cart: I,
9
- count: u,
7
+ import '../../assets/Cart.css';const u = "_cart_tgc5k_1", I = "_count_tgc5k_8", f = "_cartContainer_tgc5k_23", k = "_cartItems_tgc5k_32", v = "_itemInfo_tgc5k_54", y = "_removeItem_tgc5k_71", z = "_itemManagement_tgc5k_78", C = "_noItems_tgc5k_83", N = "_subtotal_tgc5k_90", e = {
8
+ cart: u,
9
+ count: I,
10
10
  cartContainer: f,
11
11
  cartItems: k,
12
12
  itemInfo: v,
13
- removeItem: z,
14
- itemManagement: C,
15
- noItems: N,
16
- subtotal: y
13
+ removeItem: y,
14
+ itemManagement: z,
15
+ noItems: C,
16
+ subtotal: N
17
17
  };
18
- function T({
18
+ function Q({
19
19
  cart: i,
20
20
  onItemQtyChange: a,
21
21
  onItemDelete: r,
@@ -27,7 +27,7 @@ function T({
27
27
  return i = i || { items: [] }, /* @__PURE__ */ t(
28
28
  _,
29
29
  {
30
- trigger: /* @__PURE__ */ n("button", { className: e.cart, ...d, children: [
30
+ trigger: /* @__PURE__ */ s("button", { className: e.cart, ...d, children: [
31
31
  /* @__PURE__ */ t(
32
32
  o,
33
33
  {
@@ -40,27 +40,27 @@ function T({
40
40
  ] }),
41
41
  position: "bottom",
42
42
  on: "click",
43
- children: /* @__PURE__ */ n("div", { className: e.cartContainer, children: [
43
+ children: /* @__PURE__ */ s("div", { className: e.cartContainer, children: [
44
44
  /* @__PURE__ */ t(m, { as: "h1", size: "2xl", children: "Cart" }),
45
45
  /* @__PURE__ */ t("div", { className: e.cartItems, children: i.items.length > 0 ? /* @__PURE__ */ t("ul", { children: i.items.map(
46
- (s) => /* @__PURE__ */ n("li", { className: e.cartItem, children: [
47
- /* @__PURE__ */ n("div", { className: e.itemInfo, children: [
48
- /* @__PURE__ */ t("img", { src: s.imageUrl, alt: `${s.itemId} product image` }),
49
- /* @__PURE__ */ n("div", { children: [
50
- /* @__PURE__ */ t(m, { as: "p", size: "sm", children: s.description }),
51
- /* @__PURE__ */ n(m, { as: "p", size: "sm", children: [
46
+ (n) => /* @__PURE__ */ s("li", { className: e.cartItem, children: [
47
+ /* @__PURE__ */ s("div", { className: e.itemInfo, children: [
48
+ /* @__PURE__ */ t("img", { src: n.imageUrl, alt: `${n.itemId} product image` }),
49
+ /* @__PURE__ */ s("div", { children: [
50
+ /* @__PURE__ */ t(m, { as: "p", size: "sm", children: n.description }),
51
+ /* @__PURE__ */ s(m, { as: "p", size: "sm", children: [
52
52
  "Part # ",
53
- s.itemId
53
+ n.itemId
54
54
  ] })
55
55
  ] })
56
56
  ] }),
57
- /* @__PURE__ */ n("div", { className: e.itemManagement, children: [
58
- /* @__PURE__ */ t("button", { onClick: () => r(s), className: e.removeItem, children: /* @__PURE__ */ t(o, { iconKey: "fa-regular fa-trash", size: "sm" }) }),
59
- /* @__PURE__ */ t(p, { onQuantityChange: (h) => a(s, h), size: "sm" })
57
+ /* @__PURE__ */ s("div", { className: e.itemManagement, children: [
58
+ /* @__PURE__ */ t("button", { onClick: () => r(n), className: e.removeItem, children: /* @__PURE__ */ t(o, { iconKey: "fa-regular fa-trash", size: "sm" }) }),
59
+ /* @__PURE__ */ t(p, { quantity: n.quantity, onQuantityChange: (h) => a(n, h), size: "sm" })
60
60
  ] })
61
- ] }, s.id)
61
+ ] }, n.id)
62
62
  ) }) : /* @__PURE__ */ t("div", { className: e.noItems, children: /* @__PURE__ */ t(m, { as: "p", size: "sm", children: "No items in your cart yet" }) }) }),
63
- c && /* @__PURE__ */ n("div", { className: e.subtotal, children: [
63
+ c && /* @__PURE__ */ s("div", { className: e.subtotal, children: [
64
64
  /* @__PURE__ */ t(m, { size: "md", children: "Subtotal" }),
65
65
  /* @__PURE__ */ t(m, { size: "md", children: c })
66
66
  ] }),
@@ -70,5 +70,5 @@ function T({
70
70
  );
71
71
  }
72
72
  export {
73
- T as ShoppingCart
73
+ Q as ShoppingCart
74
74
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@caseparts-org/caseblocks",
3
3
  "private": false,
4
- "version": "0.0.35",
4
+ "version": "0.0.36",
5
5
  "type": "module",
6
6
  "module": "dist/main.js",
7
7
  "types": "dist/main.d.ts",