@caseparts-org/caseblocks 0.0.165 → 0.0.167
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/dist/Cart.module-DzPBP5QJ.js +24 -0
- package/dist/assets/Cart.css +1 -1
- package/dist/molecules/Cart/Cart.js +1 -1
- package/dist/molecules/Cart/CartPart.js +46 -46
- package/dist/molecules/Cart/CartPart.stories.d.ts +1 -0
- package/dist/molecules/Cart/CartPart.stories.js +14 -6
- package/dist/molecules/Cart/CartSlideInPanel.js +1 -1
- package/package.json +1 -1
- package/dist/Cart.module-B-yc1ax6.js +0 -21
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import './assets/Cart.css';const t = "_cartIconButton_a2slx_2", a = "_count_a2slx_9", o = "_cartContainer_a2slx_24", e = "_headerWrapper_a2slx_35", n = "_header_a2slx_35", _ = "_cartItems_a2slx_53", s = "_cartItem_a2slx_53", c = "_topRow_a2slx_79", r = "_itemInfo_a2slx_85", l = "_purchaseInformation_a2slx_90", m = "_availabilitySlot_a2slx_96", i = "_priceSlot_a2slx_99", I = "_itemManagement_a2slx_102", u = "_quantitySlot_a2slx_108", x = "_itemImage_a2slx_118", p = "_removeItem_a2slx_121", h = "_noItems_a2slx_131", S = "_subtotal_a2slx_138", y = "_checkoutButton_a2slx_145", b = {
|
|
2
|
+
cartIconButton: t,
|
|
3
|
+
count: a,
|
|
4
|
+
cartContainer: o,
|
|
5
|
+
headerWrapper: e,
|
|
6
|
+
header: n,
|
|
7
|
+
cartItems: _,
|
|
8
|
+
cartItem: s,
|
|
9
|
+
topRow: c,
|
|
10
|
+
itemInfo: r,
|
|
11
|
+
purchaseInformation: l,
|
|
12
|
+
availabilitySlot: m,
|
|
13
|
+
priceSlot: i,
|
|
14
|
+
itemManagement: I,
|
|
15
|
+
quantitySlot: u,
|
|
16
|
+
itemImage: x,
|
|
17
|
+
removeItem: p,
|
|
18
|
+
noItems: h,
|
|
19
|
+
subtotal: S,
|
|
20
|
+
checkoutButton: y
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
b as s
|
|
24
|
+
};
|
package/dist/assets/Cart.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._cartIconButton_a2slx_2{position:relative;border:none;padding:0;margin:0;background-color:transparent}._count_a2slx_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_a2slx_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_a2slx_35{display:flex;flex-direction:row;align-items:flex-start;gap:var(--spacing-spacing-2xs)}._headerWrapper_a2slx_35>button{padding:0;margin:0;background-color:transparent;border:none}._header_a2slx_35{display:flex;flex-direction:column;align-items:flex-start;width:100%}._cartItems_a2slx_53{height:100%;overflow-y:auto;overflow-x:hidden}._cartItems_a2slx_53 ul{margin:0;padding:0;display:flex;flex-direction:column;gap:var(--spacing-spacing-1xs)}._cartItem_a2slx_53{display:grid;grid-template-columns:auto 1fr;gap:var(--spacing-0-5);align-items:start;box-sizing:border-box;position:relative;list-style:none;margin:0;padding:var(--spacing-0-5);width:100%;border:1px solid var(--color-neutrals-neutral-2);border-radius:var(--border-radius-md)}._topRow_a2slx_79{display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between}._itemInfo_a2slx_85{display:flex;flex-direction:column;align-items:flex-start}._purchaseInformation_a2slx_90{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:flex-start;width:100%}._availabilitySlot_a2slx_96{min-width:0}._priceSlot_a2slx_99{justify-self:end}._itemManagement_a2slx_102{display:flex;flex-direction:column;align-items:stretch;gap:var(--spacing-spacing-3xs)}._quantitySlot_a2slx_108{align-self:flex-end}._cartItem_a2slx_53 p{margin:0;padding:0;word-wrap:break-word;white-space:normal;overflow-wrap:break-word}._itemImage_a2slx_118{object-fit:contain}._removeItem_a2slx_121{border:none;background-color:transparent;padding:0;margin:0;cursor:pointer;width:min-content;height:min-content}._noItems_a2slx_131{display:flex;flex-direction:row;align-items:center;justify-content:center;height:100%}._subtotal_a2slx_138{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:var(--spacing-0-5)}._checkoutButton_a2slx_145{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-
|
|
5
|
+
import { s as m } from "../../Cart.module-DzPBP5QJ.js";
|
|
6
6
|
const S = l.forwardRef(function({
|
|
7
7
|
cart: i,
|
|
8
8
|
open: t = !1,
|
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Link as
|
|
3
|
-
import { Text as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
1
|
+
import { jsxs as r, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { Link as x } from "../../atoms/Link/Link.js";
|
|
3
|
+
import { Text as a } from "../../atoms/Text/Text.js";
|
|
4
|
+
import { Image as y } from "../../atoms/Image/Image.js";
|
|
5
|
+
import { Availability as z } from "../Availability/Availability.js";
|
|
6
|
+
import { Pricing as P } from "../Pricing/Pricing.js";
|
|
7
|
+
import { QuantityInput as w } from "../QuantityInput/QuantityInput.js";
|
|
8
|
+
import { Icon as S } from "../../atoms/Icon/Icon.js";
|
|
9
|
+
import { c as k } from "../../clsx-OuTLNxxd.js";
|
|
10
|
+
import { s as e } from "../../Cart.module-DzPBP5QJ.js";
|
|
11
11
|
function B({
|
|
12
|
-
imageUrl:
|
|
13
|
-
imageAlt:
|
|
14
|
-
title:
|
|
12
|
+
imageUrl: h,
|
|
13
|
+
imageAlt: p = "Product image",
|
|
14
|
+
title: m,
|
|
15
15
|
titleHref: s,
|
|
16
16
|
partNumber: t,
|
|
17
|
-
custom:
|
|
18
|
-
availabilityId:
|
|
19
|
-
availability:
|
|
20
|
-
contactHref:
|
|
21
|
-
contactLinkBehavior:
|
|
22
|
-
priceLabel:
|
|
23
|
-
price:
|
|
24
|
-
quantity:
|
|
17
|
+
custom: f,
|
|
18
|
+
availabilityId: v,
|
|
19
|
+
availability: c,
|
|
20
|
+
contactHref: u,
|
|
21
|
+
contactLinkBehavior: I = "new-tab",
|
|
22
|
+
priceLabel: N = "List Price",
|
|
23
|
+
price: l,
|
|
24
|
+
quantity: o,
|
|
25
25
|
onQuantityChange: n,
|
|
26
26
|
onRemove: d,
|
|
27
|
-
className:
|
|
28
|
-
...
|
|
27
|
+
className: g,
|
|
28
|
+
...b
|
|
29
29
|
}) {
|
|
30
|
-
return /* @__PURE__ */
|
|
31
|
-
/* @__PURE__ */
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
-
/* @__PURE__ */
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
t != null && /* @__PURE__ */
|
|
37
|
-
/* @__PURE__ */
|
|
30
|
+
return /* @__PURE__ */ r("li", { className: k(e.cartItem, g), ...b, children: [
|
|
31
|
+
/* @__PURE__ */ i(y, { height: 50, width: 50, src: h || "", alt: p, className: e.itemImage }),
|
|
32
|
+
/* @__PURE__ */ r("div", { children: [
|
|
33
|
+
/* @__PURE__ */ r("div", { className: e.topRow, children: [
|
|
34
|
+
/* @__PURE__ */ r("div", { className: e.itemInfo, children: [
|
|
35
|
+
/* @__PURE__ */ i(a, { size: "sm", weight: "semibold", children: s ? /* @__PURE__ */ i(x, { href: s, children: m }) : m }),
|
|
36
|
+
t != null && /* @__PURE__ */ r(a, { size: "sm", children: [
|
|
37
|
+
/* @__PURE__ */ i(a, { colorToken: "quaternary", size: "xs", children: f ? "Specs " : "Part # " }),
|
|
38
38
|
t
|
|
39
39
|
] })
|
|
40
40
|
] }),
|
|
41
|
-
d && /* @__PURE__ */
|
|
41
|
+
d && /* @__PURE__ */ i("button", { onClick: d, className: e.removeItem, "aria-label": "Remove item", type: "button", children: /* @__PURE__ */ i(S, { iconKey: "fa-regular fa-trash", size: "sm" }) })
|
|
42
42
|
] }),
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
/* @__PURE__ */ r("div", { className: e.itemManagement, children: [
|
|
44
|
+
/* @__PURE__ */ r("div", { className: e.purchaseInformation, children: [
|
|
45
|
+
/* @__PURE__ */ i("div", { className: e.availabilitySlot, children: c && /* @__PURE__ */ i(
|
|
46
|
+
z,
|
|
47
47
|
{
|
|
48
|
-
availId:
|
|
49
|
-
availDescription:
|
|
50
|
-
contactHref:
|
|
51
|
-
contactLinkBehavior:
|
|
48
|
+
availId: v || "",
|
|
49
|
+
availDescription: c,
|
|
50
|
+
contactHref: u || "",
|
|
51
|
+
contactLinkBehavior: I
|
|
52
52
|
}
|
|
53
|
-
),
|
|
54
|
-
|
|
53
|
+
) }),
|
|
54
|
+
/* @__PURE__ */ i("div", { className: e.priceSlot, children: l && /* @__PURE__ */ i(P, { pricingLabel: N, price: l }) })
|
|
55
55
|
] }),
|
|
56
|
-
typeof
|
|
57
|
-
|
|
56
|
+
typeof o == "number" && n && /* @__PURE__ */ i("div", { className: e.quantitySlot, children: /* @__PURE__ */ i(
|
|
57
|
+
w,
|
|
58
58
|
{
|
|
59
|
-
quantity:
|
|
59
|
+
quantity: o,
|
|
60
60
|
onQuantityChange: n,
|
|
61
61
|
size: "sm"
|
|
62
62
|
}
|
|
63
|
-
)
|
|
63
|
+
) })
|
|
64
64
|
] })
|
|
65
65
|
] })
|
|
66
66
|
] });
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { CartPart as
|
|
2
|
+
import { CartPart as i } from "./CartPart.js";
|
|
3
3
|
const l = {
|
|
4
4
|
title: "Case Parts/Molecules/CartPart",
|
|
5
|
-
component:
|
|
5
|
+
component: i,
|
|
6
6
|
parameters: {
|
|
7
7
|
layout: "centered"
|
|
8
8
|
},
|
|
@@ -27,8 +27,8 @@ const l = {
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
}, o = {
|
|
30
|
-
render: (a) => /* @__PURE__ */ t("div", { style: { width: 360 }, children: /* @__PURE__ */ t("ul", { style: { margin: 0, padding: 0 }, children: /* @__PURE__ */ t(
|
|
31
|
-
},
|
|
30
|
+
render: (a) => /* @__PURE__ */ t("div", { style: { width: 360 }, children: /* @__PURE__ */ t("ul", { style: { margin: 0, padding: 0 }, children: /* @__PURE__ */ t(i, { ...a }) }) })
|
|
31
|
+
}, n = {
|
|
32
32
|
args: {
|
|
33
33
|
title: "Custom-Molded Snap-In Magnetic Gasket",
|
|
34
34
|
partNumber: 'MG064 36" x 79" 3-Sided Dart-to-Dart Gasket',
|
|
@@ -37,10 +37,18 @@ const l = {
|
|
|
37
37
|
availability: "Contact us for availability",
|
|
38
38
|
price: "$129.99"
|
|
39
39
|
},
|
|
40
|
-
render: (a) => /* @__PURE__ */ t("div", { style: { width: 360 }, children: /* @__PURE__ */ t("ul", { style: { margin: 0, padding: 0 }, children: /* @__PURE__ */ t(
|
|
40
|
+
render: (a) => /* @__PURE__ */ t("div", { style: { width: 360 }, children: /* @__PURE__ */ t("ul", { style: { margin: 0, padding: 0 }, children: /* @__PURE__ */ t(i, { ...a }) }) })
|
|
41
|
+
}, s = {
|
|
42
|
+
args: {
|
|
43
|
+
availabilityId: void 0,
|
|
44
|
+
availability: void 0,
|
|
45
|
+
price: "$99.99"
|
|
46
|
+
},
|
|
47
|
+
render: (a) => /* @__PURE__ */ t("div", { style: { width: 360 }, children: /* @__PURE__ */ t("ul", { style: { margin: 0, padding: 0 }, children: /* @__PURE__ */ t(i, { ...a }) }) })
|
|
41
48
|
};
|
|
42
49
|
export {
|
|
43
50
|
o as Basic,
|
|
44
|
-
|
|
51
|
+
n as CustomSpecs,
|
|
52
|
+
s as WithoutAvailability,
|
|
45
53
|
l as default
|
|
46
54
|
};
|
|
@@ -4,7 +4,7 @@ import { Text as l } from "../../atoms/Text/Text.js";
|
|
|
4
4
|
import { Button as f } from "../../atoms/Button/Button.js";
|
|
5
5
|
import { Icon as v } from "../../atoms/Icon/Icon.js";
|
|
6
6
|
import { CartPart as I } from "./CartPart.js";
|
|
7
|
-
import { s as a } from "../../Cart.module-
|
|
7
|
+
import { s as a } from "../../Cart.module-DzPBP5QJ.js";
|
|
8
8
|
function q({
|
|
9
9
|
open: o,
|
|
10
10
|
onClose: m,
|
package/package.json
CHANGED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import './assets/Cart.css';const t = "_cartIconButton_5jpfu_2", e = "_count_5jpfu_9", o = "_cartContainer_5jpfu_24", n = "_headerWrapper_5jpfu_35", _ = "_header_5jpfu_35", c = "_cartItems_5jpfu_53", a = "_cartItem_5jpfu_53", r = "_topRow_5jpfu_79", u = "_itemInfo_5jpfu_85", m = "_purchaseInformation_5jpfu_90", s = "_itemManagement_5jpfu_97", p = "_itemImage_5jpfu_110", I = "_removeItem_5jpfu_113", f = "_noItems_5jpfu_123", j = "_subtotal_5jpfu_130", i = "_checkoutButton_5jpfu_137", h = {
|
|
2
|
-
cartIconButton: t,
|
|
3
|
-
count: e,
|
|
4
|
-
cartContainer: o,
|
|
5
|
-
headerWrapper: n,
|
|
6
|
-
header: _,
|
|
7
|
-
cartItems: c,
|
|
8
|
-
cartItem: a,
|
|
9
|
-
topRow: r,
|
|
10
|
-
itemInfo: u,
|
|
11
|
-
purchaseInformation: m,
|
|
12
|
-
itemManagement: s,
|
|
13
|
-
itemImage: p,
|
|
14
|
-
removeItem: I,
|
|
15
|
-
noItems: f,
|
|
16
|
-
subtotal: j,
|
|
17
|
-
checkoutButton: i
|
|
18
|
-
};
|
|
19
|
-
export {
|
|
20
|
-
h as s
|
|
21
|
-
};
|