@caseparts-org/caseblocks 0.0.155 → 0.0.156

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.
@@ -0,0 +1,19 @@
1
+ import './assets/Cart.css';const t = "_cartIconButton_1dh0n_2", n = "_count_1dh0n_9", o = "_cartContainer_1dh0n_24", e = "_headerWrapper_1dh0n_35", _ = "_header_1dh0n_35", c = "_cartItems_1dh0n_53", a = "_topRow_1dh0n_78", r = "_itemInfo_1dh0n_84", s = "_purchaseInformation_1dh0n_89", h = "_itemManagement_1dh0n_96", m = "_removeItem_1dh0n_114", d = "_noItems_1dh0n_124", u = "_subtotal_1dh0n_131", I = "_checkoutButton_1dh0n_138", p = {
2
+ cartIconButton: t,
3
+ count: n,
4
+ cartContainer: o,
5
+ headerWrapper: e,
6
+ header: _,
7
+ cartItems: c,
8
+ topRow: a,
9
+ itemInfo: r,
10
+ purchaseInformation: s,
11
+ itemManagement: h,
12
+ removeItem: m,
13
+ noItems: d,
14
+ subtotal: u,
15
+ checkoutButton: I
16
+ };
17
+ export {
18
+ p as s
19
+ };
@@ -1 +1 @@
1
- ._cartIconButton_pkqoj_2{position:relative;border:none;padding:0;margin:0;background-color:transparent}._count_pkqoj_9{position:absolute;top:0;left:14px;border-radius:50%;width:18px;height:18px;display:flex;flex-direction:row;align-items:center;justify-content:center;background-color:var(--color-brand-primary-primary-tangerine);color:var(--color-neutrals-neutral-1);font-weight:var(--font-weight-semibold)}._cartContainer_pkqoj_24{height:100vh;width:100%;min-width:320px;max-width:375px;box-sizing:border-box;display:grid;grid-template-rows:auto 1fr auto auto;gap:var(--spacing-1);padding:var(--spacing-1)}._header_pkqoj_35{display:flex;flex-direction:column;align-items:flex-start}._cartItems_pkqoj_40{height:100%;overflow-y:auto;overflow-x:hidden}._cartItems_pkqoj_40 ul{margin:0;padding:0}._cartItems_pkqoj_40 li{display:grid;grid-template-columns:auto 1fr;gap:var(--spacing-0-5);align-items:center;box-sizing:border-box;position:relative;list-style:none;margin:0;padding:var(--spacing-0-5);width:100%;border-bottom:1px solid var(--color-neutrals-neutral-2)}._cartItems_pkqoj_40 li:first-of-type{border-top:1px solid var(--color-neutrals-neutral-2)}._topRow_pkqoj_65{display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between}._itemInfo_pkqoj_71{display:flex;flex-direction:column;align-items:flex-start}._purchaseInformation_pkqoj_76{display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;width:100%}._itemManagement_pkqoj_83{display:flex;flex-direction:column;align-items:flex-end;gap:var(--spacing-spacing-3xs)}._cartItems_pkqoj_40 li p{margin:0;padding:0;word-wrap:break-word;white-space:normal;overflow-wrap:break-word}._cartItems_pkqoj_40 img{height:40px;width:40px;object-fit:contain}._removeItem_pkqoj_101{border:none;background-color:transparent;padding:0;margin:0;cursor:pointer;width:min-content;height:min-content}._noItems_pkqoj_111{display:flex;flex-direction:row;align-items:center;justify-content:center;height:100%}._subtotal_pkqoj_118{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:var(--spacing-0-5)}._checkoutButton_pkqoj_125{width:100%}
1
+ ._cartIconButton_1dh0n_2{position:relative;border:none;padding:0;margin:0;background-color:transparent}._count_1dh0n_9{position:absolute;top:0;left:14px;border-radius:50%;width:18px;height:18px;display:flex;flex-direction:row;align-items:center;justify-content:center;background-color:var(--color-brand-primary-primary-tangerine);color:var(--color-neutrals-neutral-1);font-weight:var(--font-weight-semibold)}._cartContainer_1dh0n_24{height:100vh;width:100%;min-width:320px;max-width:375px;box-sizing:border-box;display:grid;grid-template-rows:auto 1fr auto auto;gap:var(--spacing-1);padding:var(--spacing-1)}._headerWrapper_1dh0n_35{display:flex;flex-direction:row;align-items:flex-start;gap:var(--spacing-spacing-2xs)}._headerWrapper_1dh0n_35>button{padding:0;margin:0;background-color:transparent;border:none}._header_1dh0n_35{display:flex;flex-direction:column;align-items:flex-start;width:100%}._cartItems_1dh0n_53{height:100%;overflow-y:auto;overflow-x:hidden}._cartItems_1dh0n_53 ul{margin:0;padding:0}._cartItems_1dh0n_53 li{display:grid;grid-template-columns:auto 1fr;gap:var(--spacing-0-5);align-items:center;box-sizing:border-box;position:relative;list-style:none;margin:0;padding:var(--spacing-0-5);width:100%;border-bottom:1px solid var(--color-neutrals-neutral-2)}._cartItems_1dh0n_53 li:first-of-type{border-top:1px solid var(--color-neutrals-neutral-2)}._topRow_1dh0n_78{display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between}._itemInfo_1dh0n_84{display:flex;flex-direction:column;align-items:flex-start}._purchaseInformation_1dh0n_89{display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;width:100%}._itemManagement_1dh0n_96{display:flex;flex-direction:column;align-items:flex-end;gap:var(--spacing-spacing-3xs)}._cartItems_1dh0n_53 li p{margin:0;padding:0;word-wrap:break-word;white-space:normal;overflow-wrap:break-word}._cartItems_1dh0n_53 img{height:40px;width:40px;object-fit:contain}._removeItem_1dh0n_114{border:none;background-color:transparent;padding:0;margin:0;cursor:pointer;width:min-content;height:min-content}._noItems_1dh0n_124{display:flex;flex-direction:row;align-items:center;justify-content:center;height:100%}._subtotal_1dh0n_131{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:var(--spacing-0-5)}._checkoutButton_1dh0n_138{width:100%}
@@ -2,7 +2,7 @@ import { jsx as a, jsxs as d } from "react/jsx-runtime";
2
2
  import l from "react";
3
3
  import { Icon as g } from "../../atoms/Icon/Icon.js";
4
4
  import { Text as p } from "../../atoms/Text/Text.js";
5
- import { s as m } from "../../Cart.module-9txlotpz.js";
5
+ import { s as m } from "../../Cart.module-gkb4IOVS.js";
6
6
  const S = l.forwardRef(function({
7
7
  cart: i,
8
8
  open: t = !1,
@@ -1,86 +1,89 @@
1
- import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
- import { SlideInPanel as g } from "../../atoms/SlideInPanel/SlideInPanel.js";
1
+ import { jsx as e, jsxs as a } from "react/jsx-runtime";
2
+ import { SlideInPanel as y } from "../../atoms/SlideInPanel/SlideInPanel.js";
3
3
  import { Text as n } from "../../atoms/Text/Text.js";
4
- import { Link as y } from "../../atoms/Link/Link.js";
5
- import { Button as I } from "../../atoms/Button/Button.js";
6
- import { Pricing as b } from "../Pricing/Pricing.js";
7
- import { QuantityInput as N } from "../QuantityInput/QuantityInput.js";
8
- import { Availability as z } from "../Availability/Availability.js";
9
- import { Icon as k } from "../../atoms/Icon/Icon.js";
10
- import { s as r } from "../../Cart.module-9txlotpz.js";
4
+ import { Link as I } from "../../atoms/Link/Link.js";
5
+ import { Button as b } from "../../atoms/Button/Button.js";
6
+ import { Pricing as N } from "../Pricing/Pricing.js";
7
+ import { QuantityInput as z } from "../QuantityInput/QuantityInput.js";
8
+ import { Availability as k } from "../Availability/Availability.js";
9
+ import { Icon as c } from "../../atoms/Icon/Icon.js";
10
+ import { s as r } from "../../Cart.module-gkb4IOVS.js";
11
11
  function H({
12
- open: m,
13
- onClose: o,
14
- cart: a,
15
- subtotal: l,
16
- itemPriceLabel: c,
17
- contactHref: d,
18
- contactLinkBehavior: h,
19
- onItemQtyChange: p,
20
- onItemDelete: u,
12
+ open: o,
13
+ onClose: l,
14
+ cart: t,
15
+ subtotal: m,
16
+ itemPriceLabel: d,
17
+ contactHref: h,
18
+ contactLinkBehavior: p,
19
+ onItemQtyChange: u,
20
+ onItemDelete: f,
21
21
  onCheckout: v
22
22
  }) {
23
23
  var s;
24
- return a = a || { items: [] }, /* @__PURE__ */ e(
25
- g,
24
+ return t = t || { items: [] }, /* @__PURE__ */ e(
25
+ y,
26
26
  {
27
27
  side: "right",
28
- open: m,
29
- onClose: o,
28
+ open: o,
29
+ onClose: l,
30
30
  ariaLabel: "Shopping Cart",
31
- children: /* @__PURE__ */ t("div", { id: "cart-panel", className: r.cartContainer, children: [
32
- /* @__PURE__ */ t("div", { className: r.header, children: [
33
- /* @__PURE__ */ e(n, { size: "2xl", children: "Cart" }),
34
- /* @__PURE__ */ t(n, { size: "xs", colorToken: "quaternary", children: [
35
- (s = a == null ? void 0 : a.items) == null ? void 0 : s.length,
36
- " items in your cart"
37
- ] })
31
+ children: /* @__PURE__ */ a("div", { id: "cart-panel", className: r.cartContainer, children: [
32
+ /* @__PURE__ */ a("div", { className: r.headerWrapper, children: [
33
+ /* @__PURE__ */ a("div", { className: r.header, children: [
34
+ /* @__PURE__ */ e(n, { size: "2xl", children: "Cart" }),
35
+ /* @__PURE__ */ a(n, { size: "xs", colorToken: "quaternary", children: [
36
+ (s = t == null ? void 0 : t.items) == null ? void 0 : s.length,
37
+ " items in your cart"
38
+ ] })
39
+ ] }),
40
+ /* @__PURE__ */ e("button", { onClick: l, children: /* @__PURE__ */ e(c, { iconKey: "fa-regular fa-xmark", size: "md" }) })
38
41
  ] }),
39
- /* @__PURE__ */ e("div", { className: r.cartItems, children: a.items.length > 0 ? /* @__PURE__ */ e("ul", { children: a.items.map((i) => /* @__PURE__ */ t("li", { className: r.cartItem, children: [
42
+ /* @__PURE__ */ e("div", { className: r.cartItems, children: t.items.length > 0 ? /* @__PURE__ */ e("ul", { children: t.items.map((i) => /* @__PURE__ */ a("li", { className: r.cartItem, children: [
40
43
  /* @__PURE__ */ e("img", { src: i.imageUrl, alt: `${i.itemId} product image` }),
41
- /* @__PURE__ */ t("div", { children: [
42
- /* @__PURE__ */ t("div", { className: r.topRow, children: [
43
- /* @__PURE__ */ t("div", { className: r.itemInfo, children: [
44
- /* @__PURE__ */ e(n, { size: "sm", weight: "semibold", children: /* @__PURE__ */ e(y, { href: i.itemHref || `/part/${i.itemId}`, children: i.description }) }),
45
- /* @__PURE__ */ t(n, { size: "sm", children: [
44
+ /* @__PURE__ */ a("div", { children: [
45
+ /* @__PURE__ */ a("div", { className: r.topRow, children: [
46
+ /* @__PURE__ */ a("div", { className: r.itemInfo, children: [
47
+ /* @__PURE__ */ e(n, { size: "sm", weight: "semibold", children: /* @__PURE__ */ e(I, { href: i.itemHref || `/part/${i.itemId}`, children: i.description }) }),
48
+ /* @__PURE__ */ a(n, { size: "sm", children: [
46
49
  /* @__PURE__ */ e(n, { colorToken: "quaternary", size: "xs", children: i.custom ? "Specs " : "Part # " }),
47
50
  i.itemId
48
51
  ] })
49
52
  ] }),
50
- /* @__PURE__ */ e("button", { onClick: () => u(i), className: r.removeItem, "aria-label": "Remove item", children: /* @__PURE__ */ e(k, { iconKey: "fa-regular fa-trash", size: "sm" }) })
53
+ /* @__PURE__ */ e("button", { onClick: () => f(i), className: r.removeItem, "aria-label": "Remove item", children: /* @__PURE__ */ e(c, { iconKey: "fa-regular fa-trash", size: "sm" }) })
51
54
  ] }),
52
- /* @__PURE__ */ t("div", { className: r.itemManagement, children: [
53
- /* @__PURE__ */ t("div", { className: r.purchaseInformation, children: [
55
+ /* @__PURE__ */ a("div", { className: r.itemManagement, children: [
56
+ /* @__PURE__ */ a("div", { className: r.purchaseInformation, children: [
54
57
  /* @__PURE__ */ e(
55
- z,
58
+ k,
56
59
  {
57
60
  availId: i.availabilityId || "",
58
61
  availDescription: i.availability || "",
59
- contactHref: d || "",
60
- contactLinkBehavior: h || "new-tab"
62
+ contactHref: h || "",
63
+ contactLinkBehavior: p || "new-tab"
61
64
  }
62
65
  ),
63
- /* @__PURE__ */ e(b, { pricingLabel: c || "List Price", price: i.price })
66
+ /* @__PURE__ */ e(N, { pricingLabel: d || "List Price", price: i.price })
64
67
  ] }),
65
68
  /* @__PURE__ */ e(
66
- N,
69
+ z,
67
70
  {
68
71
  quantity: i.quantity,
69
- onQuantityChange: (f) => p(i, f),
72
+ onQuantityChange: (g) => u(i, g),
70
73
  size: "sm"
71
74
  }
72
75
  )
73
76
  ] })
74
77
  ] })
75
78
  ] }, i.id)) }) : /* @__PURE__ */ e("div", { className: r.noItems, children: /* @__PURE__ */ e(n, { as: "p", size: "sm", children: "No items in your cart yet" }) }) }),
76
- l && /* @__PURE__ */ t("div", { className: r.subtotal, children: [
79
+ m && /* @__PURE__ */ a("div", { className: r.subtotal, children: [
77
80
  /* @__PURE__ */ e(n, { size: "md", weight: "semibold", children: "Subtotal" }),
78
- /* @__PURE__ */ e(n, { size: "md", weight: "semibold", children: l })
81
+ /* @__PURE__ */ e(n, { size: "md", weight: "semibold", children: m })
79
82
  ] }),
80
83
  /* @__PURE__ */ e(
81
- I,
84
+ b,
82
85
  {
83
- disabled: a.items.length === 0,
86
+ disabled: t.items.length === 0,
84
87
  onClick: v,
85
88
  variant: "cta-primary",
86
89
  size: "md",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@caseparts-org/caseblocks",
3
3
  "private": false,
4
- "version": "0.0.155",
4
+ "version": "0.0.156",
5
5
  "type": "module",
6
6
  "module": "dist/main.js",
7
7
  "types": "dist/main.d.ts",
@@ -1,18 +0,0 @@
1
- import './assets/Cart.css';const t = "_cartIconButton_pkqoj_2", o = "_count_pkqoj_9", n = "_cartContainer_pkqoj_24", e = "_header_pkqoj_35", _ = "_cartItems_pkqoj_40", c = "_topRow_pkqoj_65", a = "_itemInfo_pkqoj_71", s = "_purchaseInformation_pkqoj_76", r = "_itemManagement_pkqoj_83", m = "_removeItem_pkqoj_101", p = "_noItems_pkqoj_111", u = "_subtotal_pkqoj_118", I = "_checkoutButton_pkqoj_125", k = {
2
- cartIconButton: t,
3
- count: o,
4
- cartContainer: n,
5
- header: e,
6
- cartItems: _,
7
- topRow: c,
8
- itemInfo: a,
9
- purchaseInformation: s,
10
- itemManagement: r,
11
- removeItem: m,
12
- noItems: p,
13
- subtotal: u,
14
- checkoutButton: I
15
- };
16
- export {
17
- k as s
18
- };