@caseparts-org/caseblocks 0.0.205 → 0.0.207
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-CqE2A_OG.js +25 -0
- package/dist/assets/Availability.css +1 -1
- package/dist/assets/Cart.css +1 -1
- package/dist/assets/DropdownButton.css +1 -0
- package/dist/atoms/DropdownButton/DropdownButton.d.ts +26 -0
- package/dist/atoms/DropdownButton/DropdownButton.js +126 -0
- package/dist/atoms/DropdownButton/DropdownButton.stories.d.ts +13 -0
- package/dist/atoms/DropdownButton/DropdownButton.stories.js +33 -0
- package/dist/atoms/Popover/Popover.d.ts +1 -0
- package/dist/atoms/Popover/Popover.js +44 -43
- package/dist/main-client.d.ts +2 -0
- package/dist/main-client.js +51 -49
- package/dist/main-server.d.ts +1 -1
- package/dist/molecules/Availability/Availability.d.ts +14 -5
- package/dist/molecules/Availability/Availability.js +61 -30
- package/dist/molecules/Availability/Availability.stories.d.ts +14 -13
- package/dist/molecules/Availability/Availability.stories.js +81 -46
- package/dist/molecules/Cart/Cart.d.ts +3 -3
- package/dist/molecules/Cart/Cart.js +1 -1
- package/dist/molecules/Cart/Cart.stories.d.ts +15 -0
- package/dist/molecules/Cart/Cart.stories.js +4 -6
- package/dist/molecules/Cart/CartPart.d.ts +4 -5
- package/dist/molecules/Cart/CartPart.js +42 -43
- package/dist/molecules/Cart/CartPart.stories.d.ts +3 -3
- package/dist/molecules/Cart/CartPart.stories.js +30 -20
- package/dist/molecules/Cart/CartSlideInPanel.d.ts +1 -4
- package/dist/molecules/Cart/CartSlideInPanel.js +13 -17
- package/dist/organisms/MainNav/MainNav.stories.js +6 -8
- package/dist/organisms/Product/Product.d.ts +1 -1
- package/dist/organisms/Product/Product.js +76 -77
- package/dist/organisms/Product/Product.stories.d.ts +0 -11
- package/dist/organisms/Product/Product.stories.js +12 -25
- package/package.json +1 -1
- package/dist/Cart.module-CcoNa4Nj.js +0 -25
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { CartPart as
|
|
3
|
-
const
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { CartPart as t } from "./CartPart.js";
|
|
3
|
+
const a = {
|
|
4
|
+
MPK: { Unreserved: 5, Available: 5 },
|
|
5
|
+
SEA: { Unreserved: 3, Available: 3 },
|
|
6
|
+
STL: { Unreserved: 8, Available: 8 }
|
|
7
|
+
}, n = {
|
|
4
8
|
title: "Case Parts/Molecules/CartPart",
|
|
5
|
-
component:
|
|
9
|
+
component: t,
|
|
6
10
|
parameters: {
|
|
7
11
|
layout: "centered"
|
|
8
12
|
},
|
|
@@ -18,10 +22,9 @@ const r = {
|
|
|
18
22
|
model: "SP-48-12-SM",
|
|
19
23
|
serial: "1-85266899",
|
|
20
24
|
custom: !1,
|
|
21
|
-
availabilityId: "
|
|
25
|
+
availabilityId: "in-stock",
|
|
22
26
|
availability: "In Stock",
|
|
23
|
-
|
|
24
|
-
contactLinkBehavior: "new-tab",
|
|
27
|
+
inventory: a,
|
|
25
28
|
priceLabel: "List Price",
|
|
26
29
|
price: "$99.99",
|
|
27
30
|
quantity: 1,
|
|
@@ -35,38 +38,45 @@ const r = {
|
|
|
35
38
|
alert("Edit Unit");
|
|
36
39
|
}
|
|
37
40
|
}
|
|
38
|
-
}, n = {
|
|
39
|
-
render: (i) => /* @__PURE__ */ t("div", { style: { width: 360 }, children: /* @__PURE__ */ t("ul", { style: { margin: 0, padding: 0 }, children: /* @__PURE__ */ t(a, { ...i }) }) })
|
|
40
41
|
}, d = {
|
|
42
|
+
render: (e) => /* @__PURE__ */ i("div", { style: { width: 360 }, children: /* @__PURE__ */ i("ul", { style: { margin: 0, padding: 0 }, children: /* @__PURE__ */ i(t, { ...e }) }) })
|
|
43
|
+
}, s = {
|
|
41
44
|
args: {
|
|
42
45
|
title: "Custom-Molded Snap-In Magnetic Gasket",
|
|
43
46
|
partNumber: 'MG064 36" x 79" 3-Sided Dart-to-Dart Gasket',
|
|
44
47
|
custom: !0,
|
|
45
|
-
availabilityId: "
|
|
48
|
+
availabilityId: "discontinued",
|
|
46
49
|
availability: "Contact us for availability",
|
|
50
|
+
inventory: {},
|
|
47
51
|
price: "$129.99"
|
|
48
52
|
},
|
|
49
|
-
render: (
|
|
50
|
-
},
|
|
53
|
+
render: (e) => /* @__PURE__ */ i("div", { style: { width: 360 }, children: /* @__PURE__ */ i("ul", { style: { margin: 0, padding: 0 }, children: /* @__PURE__ */ i(t, { ...e }) }) })
|
|
54
|
+
}, o = {
|
|
51
55
|
args: {
|
|
52
56
|
availabilityId: void 0,
|
|
53
57
|
availability: void 0,
|
|
58
|
+
inventory: {},
|
|
54
59
|
price: "$99.99"
|
|
55
60
|
},
|
|
56
|
-
render: (
|
|
57
|
-
},
|
|
61
|
+
render: (e) => /* @__PURE__ */ i("div", { style: { width: 360 }, children: /* @__PURE__ */ i("ul", { style: { margin: 0, padding: 0 }, children: /* @__PURE__ */ i(t, { ...e }) }) })
|
|
62
|
+
}, c = {
|
|
58
63
|
args: {
|
|
59
64
|
availabilityId: "limited",
|
|
60
65
|
availability: "Discontinued - limited stock",
|
|
66
|
+
inventory: {
|
|
67
|
+
MPK: { Unreserved: 1, Available: 1 },
|
|
68
|
+
SEA: { Unreserved: 0, Available: 0 },
|
|
69
|
+
STL: { Unreserved: 1, Available: 1 }
|
|
70
|
+
},
|
|
61
71
|
quantity: 2,
|
|
62
72
|
maxQuantity: 2
|
|
63
73
|
},
|
|
64
|
-
render: (
|
|
74
|
+
render: (e) => /* @__PURE__ */ i("div", { style: { width: 360 }, children: /* @__PURE__ */ i("ul", { style: { margin: 0, padding: 0 }, children: /* @__PURE__ */ i(t, { ...e }) }) })
|
|
65
75
|
};
|
|
66
76
|
export {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
77
|
+
d as Basic,
|
|
78
|
+
s as CustomSpecs,
|
|
79
|
+
c as MaxQuantityCapped,
|
|
80
|
+
o as WithoutAvailability,
|
|
81
|
+
n as default
|
|
72
82
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ContactUsLinkBehavior } from '../Availability/Availability';
|
|
2
1
|
import { CartItem, ShoppingCart } from './Cart';
|
|
3
2
|
export interface CartSlideInPanelProps {
|
|
4
3
|
open: boolean;
|
|
@@ -6,8 +5,6 @@ export interface CartSlideInPanelProps {
|
|
|
6
5
|
cart: ShoppingCart;
|
|
7
6
|
subtotal?: string;
|
|
8
7
|
itemPriceLabel?: string;
|
|
9
|
-
contactHref?: string;
|
|
10
|
-
contactLinkBehavior?: ContactUsLinkBehavior;
|
|
11
8
|
onItemQtyChange: (_item: CartItem, _newQty: number) => void;
|
|
12
9
|
onItemDelete: (_item: CartItem) => void;
|
|
13
10
|
onUnitEditClick?: (_item: CartItem) => void;
|
|
@@ -15,4 +12,4 @@ export interface CartSlideInPanelProps {
|
|
|
15
12
|
requiresUnitDetails?: boolean;
|
|
16
13
|
onCheckout: () => void;
|
|
17
14
|
}
|
|
18
|
-
export declare function CartSlideInPanel({ open, onClose, cart, subtotal, itemPriceLabel,
|
|
15
|
+
export declare function CartSlideInPanel({ open, onClose, cart, subtotal, itemPriceLabel, onItemQtyChange, onItemDelete, onUnitEditClick, onItemNavigate, requiresUnitDetails, onCheckout }: CartSlideInPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,28 +1,26 @@
|
|
|
1
1
|
import { jsx as i, jsxs as r } from "react/jsx-runtime";
|
|
2
|
-
import { SlideInPanel as
|
|
2
|
+
import { SlideInPanel as v } from "../../atoms/SlideInPanel/SlideInPanel.js";
|
|
3
3
|
import { Text as l } from "../../atoms/Text/Text.js";
|
|
4
4
|
import { Button as h } from "../../atoms/Button/Button.js";
|
|
5
5
|
import { Icon as u } from "../../atoms/Icon/Icon.js";
|
|
6
|
-
import { CartPart as
|
|
7
|
-
import { s as t } from "../../Cart.module-
|
|
8
|
-
function
|
|
6
|
+
import { CartPart as x } from "./CartPart.js";
|
|
7
|
+
import { s as t } from "../../Cart.module-CqE2A_OG.js";
|
|
8
|
+
function S({
|
|
9
9
|
open: p,
|
|
10
10
|
onClose: s,
|
|
11
11
|
cart: a,
|
|
12
12
|
subtotal: n,
|
|
13
13
|
itemPriceLabel: y,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
onItemQtyChange: b,
|
|
17
|
-
onItemDelete: k,
|
|
14
|
+
onItemQtyChange: f,
|
|
15
|
+
onItemDelete: g,
|
|
18
16
|
onUnitEditClick: d,
|
|
19
17
|
onItemNavigate: m,
|
|
20
|
-
requiresUnitDetails:
|
|
18
|
+
requiresUnitDetails: b = !1,
|
|
21
19
|
onCheckout: o
|
|
22
20
|
}) {
|
|
23
21
|
var c;
|
|
24
22
|
return a = a || { items: [] }, /* @__PURE__ */ i(
|
|
25
|
-
|
|
23
|
+
v,
|
|
26
24
|
{
|
|
27
25
|
side: "right",
|
|
28
26
|
open: p,
|
|
@@ -54,7 +52,7 @@ function w({
|
|
|
54
52
|
}
|
|
55
53
|
),
|
|
56
54
|
/* @__PURE__ */ i("div", { className: t.cartItems, children: a.items.length > 0 ? /* @__PURE__ */ i("ul", { children: a.items.map((e) => /* @__PURE__ */ i(
|
|
57
|
-
|
|
55
|
+
x,
|
|
58
56
|
{
|
|
59
57
|
imageUrl: e.imageUrl,
|
|
60
58
|
imageAlt: `${e.itemId} product image`,
|
|
@@ -69,16 +67,14 @@ function w({
|
|
|
69
67
|
custom: !!e.custom,
|
|
70
68
|
availabilityId: e.availabilityId,
|
|
71
69
|
availability: e.availability,
|
|
72
|
-
contactHref: f,
|
|
73
|
-
contactLinkBehavior: g,
|
|
74
70
|
price: e.price,
|
|
75
71
|
priceLabel: y || "List Price",
|
|
76
72
|
quantity: e.quantity,
|
|
77
73
|
maxQuantity: e.maxQuantity,
|
|
78
|
-
onQuantityChange: (
|
|
79
|
-
onRemove: () =>
|
|
74
|
+
onQuantityChange: (k) => f(e, k),
|
|
75
|
+
onRemove: () => g(e),
|
|
80
76
|
onUnitEditClick: d ? () => d(e) : void 0,
|
|
81
|
-
requiresUnitDetails:
|
|
77
|
+
requiresUnitDetails: b
|
|
82
78
|
},
|
|
83
79
|
`${e.id}-${e.make ?? ""}-${e.model ?? ""}-${e.serial ?? ""}`
|
|
84
80
|
)) }) : /* @__PURE__ */ i("div", { className: t.noItems, children: /* @__PURE__ */ i(l, { as: "p", size: "sm", children: "No items in your cart yet" }) }) }),
|
|
@@ -102,5 +98,5 @@ function w({
|
|
|
102
98
|
);
|
|
103
99
|
}
|
|
104
100
|
export {
|
|
105
|
-
|
|
101
|
+
S as CartSlideInPanel
|
|
106
102
|
};
|
|
@@ -3,8 +3,8 @@ import { useState as y } from "react";
|
|
|
3
3
|
import { MainNav as m } from "./MainNav.js";
|
|
4
4
|
import { Text as s } from "../../atoms/Text/Text.js";
|
|
5
5
|
import { Link as u } from "../../atoms/Link/Link.js";
|
|
6
|
-
import { Button as
|
|
7
|
-
import { CartSlideInPanel as
|
|
6
|
+
import { Button as p } from "../../atoms/Button/Button.js";
|
|
7
|
+
import { CartSlideInPanel as h } from "../../molecules/Cart/CartSlideInPanel.js";
|
|
8
8
|
const q = {
|
|
9
9
|
title: "Case Parts/Organisms/MainNav",
|
|
10
10
|
component: m,
|
|
@@ -122,7 +122,7 @@ const q = {
|
|
|
122
122
|
{ id: 12, itemId: "1092-02", description: "Kason Door Closer - Offset", price: "$99.99", quantity: 1, imageUrl: a, availability: "In Stock", availabilityId: "available" }
|
|
123
123
|
]
|
|
124
124
|
};
|
|
125
|
-
function
|
|
125
|
+
function C(e) {
|
|
126
126
|
return `$${e.items.reduce(
|
|
127
127
|
(i, o) => i + (parseFloat(o.price.replace(/[^0-9.]/g, "")) || 0) * o.quantity,
|
|
128
128
|
0
|
|
@@ -133,7 +133,7 @@ const d = /* @__PURE__ */ b("div", { style: { display: "flex", flexDirection: "c
|
|
|
133
133
|
/* @__PURE__ */ t(s, { size: "xs", children: "Signed in as Ringo" }),
|
|
134
134
|
/* @__PURE__ */ t(u, { href: "/account", "data-popover-close": "true", children: "View Account" }),
|
|
135
135
|
/* @__PURE__ */ t(u, { href: "/orders", "data-popover-close": "true", children: "Order History" }),
|
|
136
|
-
/* @__PURE__ */ t(
|
|
136
|
+
/* @__PURE__ */ t(p, { size: "sm", variant: "secondary", "data-popover-close": "true", onClick: () => alert("Sign out"), children: "Sign Out" })
|
|
137
137
|
] }), n = (e) => {
|
|
138
138
|
const [c, i] = y(!1);
|
|
139
139
|
return /* @__PURE__ */ b(g, { children: [
|
|
@@ -146,15 +146,13 @@ const d = /* @__PURE__ */ b("div", { style: { display: "flex", flexDirection: "c
|
|
|
146
146
|
}
|
|
147
147
|
),
|
|
148
148
|
/* @__PURE__ */ t(
|
|
149
|
-
|
|
149
|
+
h,
|
|
150
150
|
{
|
|
151
151
|
open: c,
|
|
152
152
|
onClose: () => i(!1),
|
|
153
153
|
cart: e.cart,
|
|
154
|
-
subtotal:
|
|
154
|
+
subtotal: C(e.cart),
|
|
155
155
|
itemPriceLabel: "List Price",
|
|
156
|
-
contactHref: e.contactRoute,
|
|
157
|
-
contactLinkBehavior: "new-tab",
|
|
158
156
|
onItemQtyChange: () => alert("Qty Change"),
|
|
159
157
|
onItemDelete: () => alert("Delete"),
|
|
160
158
|
onCheckout: () => alert("checkout")
|
|
@@ -25,4 +25,4 @@ export interface ProductProps extends AvailabilityProps {
|
|
|
25
25
|
requiresUnitDetails?: boolean;
|
|
26
26
|
maxQuantity?: number;
|
|
27
27
|
}
|
|
28
|
-
export declare function Product({ productView, itemKey, partNumber, productDescription, availDescription, availId,
|
|
28
|
+
export declare function Product({ productView, itemKey, partNumber, productDescription, availDescription, availId, inventory, productHref, priceLabel, price, imgSrc, attributes, className, onAddToCart, onClose, flat, size, showQuantity, onLinkClicked, requiresUnitDetails, maxQuantity, ...otherProps }: ProductProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,101 +1,100 @@
|
|
|
1
1
|
import { jsxs as o, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { Image as
|
|
3
|
-
import { Link as
|
|
4
|
-
import { Text as
|
|
5
|
-
import { Availability as
|
|
6
|
-
import { Pricing as
|
|
7
|
-
import { AddToCart as
|
|
8
|
-
import { Icon as
|
|
9
|
-
import { c as
|
|
10
|
-
import '../../assets/Product.css';const
|
|
11
|
-
productCard:
|
|
12
|
-
sm:
|
|
13
|
-
productInformation:
|
|
14
|
-
purchaseInformation:
|
|
15
|
-
addToCart:
|
|
16
|
-
addToCartButton:
|
|
17
|
-
partNumber:
|
|
18
|
-
partNumberLabel:
|
|
19
|
-
productTile:
|
|
20
|
-
topRow:
|
|
21
|
-
productData:
|
|
22
|
-
purchase:
|
|
23
|
-
attributeContainer:
|
|
24
|
-
elevated:
|
|
25
|
-
noImage:
|
|
2
|
+
import { Image as A } from "../../atoms/Image/Image.js";
|
|
3
|
+
import { Link as R } from "../../atoms/Link/Link.js";
|
|
4
|
+
import { Text as d } from "../../atoms/Text/Text.js";
|
|
5
|
+
import { Availability as $ } from "../../molecules/Availability/Availability.js";
|
|
6
|
+
import { Pricing as P } from "../../molecules/Pricing/Pricing.js";
|
|
7
|
+
import { AddToCart as j } from "../../molecules/AddToCart/AddToCart.js";
|
|
8
|
+
import { Icon as E } from "../../atoms/Icon/Icon.js";
|
|
9
|
+
import { c as D } from "../../clsx-OuTLNxxd.js";
|
|
10
|
+
import '../../assets/Product.css';const F = "_productCard_nx8r7_3", G = "_sm_nx8r7_15", J = "_productInformation_nx8r7_25", M = "_purchaseInformation_nx8r7_32", O = "_addToCart_nx8r7_40", W = "_addToCartButton_nx8r7_43", X = "_partNumber_nx8r7_53", Y = "_partNumberLabel_nx8r7_60", Z = "_productTile_nx8r7_64", q = "_topRow_nx8r7_83", H = "_productData_nx8r7_114", U = "_purchase_nx8r7_32", L = "_attributeContainer_nx8r7_151", y = "_elevated_nx8r7_199", K = "_noImage_nx8r7_205", r = {
|
|
11
|
+
productCard: F,
|
|
12
|
+
sm: G,
|
|
13
|
+
productInformation: J,
|
|
14
|
+
purchaseInformation: M,
|
|
15
|
+
addToCart: O,
|
|
16
|
+
addToCartButton: W,
|
|
17
|
+
partNumber: X,
|
|
18
|
+
partNumberLabel: Y,
|
|
19
|
+
productTile: Z,
|
|
20
|
+
topRow: q,
|
|
21
|
+
productData: H,
|
|
22
|
+
purchase: U,
|
|
23
|
+
attributeContainer: L,
|
|
24
|
+
elevated: y,
|
|
25
|
+
noImage: K
|
|
26
26
|
};
|
|
27
27
|
function nr({
|
|
28
|
-
productView:
|
|
28
|
+
productView: V,
|
|
29
29
|
itemKey: c,
|
|
30
30
|
partNumber: s,
|
|
31
31
|
productDescription: h,
|
|
32
32
|
availDescription: x,
|
|
33
33
|
availId: m,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
priceLabel: T,
|
|
34
|
+
inventory: b,
|
|
35
|
+
productHref: N,
|
|
36
|
+
priceLabel: f,
|
|
38
37
|
price: l,
|
|
39
|
-
imgSrc:
|
|
38
|
+
imgSrc: e,
|
|
40
39
|
attributes: p,
|
|
41
|
-
className:
|
|
42
|
-
onAddToCart:
|
|
43
|
-
onClose:
|
|
44
|
-
flat:
|
|
40
|
+
className: T,
|
|
41
|
+
onAddToCart: g,
|
|
42
|
+
onClose: C,
|
|
43
|
+
flat: v,
|
|
45
44
|
size: a = "md",
|
|
46
45
|
showQuantity: _ = !0,
|
|
47
|
-
onLinkClicked:
|
|
48
|
-
requiresUnitDetails:
|
|
49
|
-
maxQuantity:
|
|
50
|
-
...
|
|
46
|
+
onLinkClicked: n,
|
|
47
|
+
requiresUnitDetails: I = !1,
|
|
48
|
+
maxQuantity: w,
|
|
49
|
+
...B
|
|
51
50
|
}) {
|
|
52
51
|
const u = a === "sm" ? "xs" : "sm";
|
|
53
|
-
return
|
|
52
|
+
return V === "Card" ? /* @__PURE__ */ o(
|
|
54
53
|
"div",
|
|
55
54
|
{
|
|
56
|
-
className:
|
|
55
|
+
className: D(
|
|
57
56
|
r.productCard,
|
|
58
57
|
a && r[a],
|
|
59
|
-
|
|
60
|
-
!
|
|
61
|
-
!
|
|
58
|
+
T,
|
|
59
|
+
!v && r.elevated,
|
|
60
|
+
!e && r.noImage
|
|
62
61
|
),
|
|
63
|
-
...
|
|
62
|
+
...B,
|
|
64
63
|
children: [
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
e && /* @__PURE__ */ t(
|
|
65
|
+
A,
|
|
67
66
|
{
|
|
68
|
-
src:
|
|
67
|
+
src: e,
|
|
69
68
|
alt: `${s} product image`,
|
|
70
69
|
height: a === "sm" ? 78 : 96,
|
|
71
70
|
width: a === "sm" ? 78 : 96
|
|
72
71
|
}
|
|
73
72
|
),
|
|
74
73
|
/* @__PURE__ */ o("div", { className: r.productInformation, children: [
|
|
75
|
-
/* @__PURE__ */ t(
|
|
74
|
+
/* @__PURE__ */ t(R, { onClick: () => n == null ? void 0 : n(c), size: a, href: N || "#", children: h }),
|
|
76
75
|
/* @__PURE__ */ o("div", { className: r.partNumber, children: [
|
|
77
|
-
/* @__PURE__ */ t(
|
|
78
|
-
/* @__PURE__ */ t(
|
|
76
|
+
/* @__PURE__ */ t(d, { size: u, className: r.partNumberLabel, children: "Part #" }),
|
|
77
|
+
/* @__PURE__ */ t(d, { size: u, weight: "semibold", children: s })
|
|
79
78
|
] })
|
|
80
79
|
] }),
|
|
81
80
|
/* @__PURE__ */ o("div", { className: r.purchaseInformation, children: [
|
|
82
81
|
m && /* @__PURE__ */ t(
|
|
83
|
-
|
|
82
|
+
$,
|
|
84
83
|
{
|
|
85
84
|
availId: m,
|
|
86
85
|
availDescription: x,
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
inventory: b,
|
|
87
|
+
enableTooltip: !0
|
|
89
88
|
}
|
|
90
89
|
),
|
|
91
|
-
l && /* @__PURE__ */ t(
|
|
90
|
+
l && /* @__PURE__ */ t(P, { pricingLabel: f, price: l })
|
|
92
91
|
] }),
|
|
93
92
|
/* @__PURE__ */ t(
|
|
94
|
-
|
|
93
|
+
j,
|
|
95
94
|
{
|
|
96
95
|
itemKey: c,
|
|
97
|
-
onAdd:
|
|
98
|
-
max:
|
|
96
|
+
onAdd: g,
|
|
97
|
+
max: w,
|
|
99
98
|
className: r.addToCart,
|
|
100
99
|
addButtonClassName: r.addToCartButton,
|
|
101
100
|
addButtonVariant: _ ? "cta-primary" : "secondary",
|
|
@@ -103,22 +102,22 @@ function nr({
|
|
|
103
102
|
buttonDoneText: "",
|
|
104
103
|
buttonText: _ ? "Add" : "Add to Cart",
|
|
105
104
|
showQuantity: _,
|
|
106
|
-
requiresUnitDetails:
|
|
105
|
+
requiresUnitDetails: I
|
|
107
106
|
}
|
|
108
107
|
)
|
|
109
108
|
]
|
|
110
109
|
}
|
|
111
|
-
) : /* @__PURE__ */ o("div", { className:
|
|
110
|
+
) : /* @__PURE__ */ o("div", { className: D(
|
|
112
111
|
r.productTile,
|
|
113
|
-
|
|
112
|
+
T,
|
|
114
113
|
a && r[a],
|
|
115
|
-
!
|
|
116
|
-
!
|
|
117
|
-
), ...
|
|
118
|
-
|
|
119
|
-
|
|
114
|
+
!v && r.elevated,
|
|
115
|
+
!e && r.noImage
|
|
116
|
+
), ...B, children: [
|
|
117
|
+
e && /* @__PURE__ */ t(
|
|
118
|
+
A,
|
|
120
119
|
{
|
|
121
|
-
src:
|
|
120
|
+
src: e,
|
|
122
121
|
alt: `${s} product image`,
|
|
123
122
|
height: a === "sm" ? 86 : 108,
|
|
124
123
|
width: a === "sm" ? 86 : 108
|
|
@@ -127,35 +126,35 @@ function nr({
|
|
|
127
126
|
/* @__PURE__ */ o("div", { className: r.productData, children: [
|
|
128
127
|
/* @__PURE__ */ o("div", { className: r.topRow, children: [
|
|
129
128
|
/* @__PURE__ */ o("div", { className: r.productInformation, children: [
|
|
130
|
-
/* @__PURE__ */ t(
|
|
129
|
+
/* @__PURE__ */ t(R, { onClick: () => n == null ? void 0 : n(c), size: a, href: N || "#", children: h }),
|
|
131
130
|
/* @__PURE__ */ o("div", { className: r.partNumber, children: [
|
|
132
|
-
/* @__PURE__ */ t(
|
|
133
|
-
/* @__PURE__ */ t(
|
|
131
|
+
/* @__PURE__ */ t(d, { size: u, className: r.partNumberLabel, children: "Part #" }),
|
|
132
|
+
/* @__PURE__ */ t(d, { size: u, weight: "semibold", children: s })
|
|
134
133
|
] })
|
|
135
134
|
] }),
|
|
136
|
-
|
|
135
|
+
C && /* @__PURE__ */ t("button", { onClick: () => C(c), children: /* @__PURE__ */ t(E, { size: "sm", iconKey: "fa-light fa-xmark" }) })
|
|
137
136
|
] }),
|
|
138
137
|
/* @__PURE__ */ o("div", { className: r.purchase, children: [
|
|
139
138
|
/* @__PURE__ */ o("div", { className: r.purchaseInformation, children: [
|
|
140
139
|
m && /* @__PURE__ */ t(
|
|
141
|
-
|
|
140
|
+
$,
|
|
142
141
|
{
|
|
143
142
|
availId: m,
|
|
144
143
|
availDescription: x,
|
|
145
|
-
|
|
146
|
-
|
|
144
|
+
inventory: b,
|
|
145
|
+
enableTooltip: !0
|
|
147
146
|
}
|
|
148
147
|
),
|
|
149
|
-
l && /* @__PURE__ */ t(
|
|
148
|
+
l && /* @__PURE__ */ t(P, { pricingLabel: f, price: l })
|
|
150
149
|
] }),
|
|
151
|
-
/* @__PURE__ */ t(
|
|
150
|
+
/* @__PURE__ */ t(j, { size: a, itemKey: c, onAdd: g, max: w, className: r.addToCart, addButtonClassName: r.addToCartButton, requiresUnitDetails: I })
|
|
152
151
|
] }),
|
|
153
152
|
p && p.length > 0 && /* @__PURE__ */ t("ul", { className: r.attributeContainer, children: p.map((i) => /* @__PURE__ */ o("li", { children: [
|
|
154
|
-
/* @__PURE__ */ o(
|
|
153
|
+
/* @__PURE__ */ o(d, { size: "xs", weight: "light", children: [
|
|
155
154
|
i.label,
|
|
156
155
|
":"
|
|
157
156
|
] }),
|
|
158
|
-
/* @__PURE__ */ t(
|
|
157
|
+
/* @__PURE__ */ t(d, { size: "xs", weight: "semibold", children: i.value })
|
|
159
158
|
] }, `${i.label}.${i.value}`)) })
|
|
160
159
|
] })
|
|
161
160
|
] });
|
|
@@ -29,17 +29,6 @@ declare const meta: {
|
|
|
29
29
|
control: "text";
|
|
30
30
|
description: string;
|
|
31
31
|
};
|
|
32
|
-
contactHref: {
|
|
33
|
-
control: "text";
|
|
34
|
-
description: string;
|
|
35
|
-
};
|
|
36
|
-
contactLinkBehavior: {
|
|
37
|
-
control: {
|
|
38
|
-
type: "inline-radio";
|
|
39
|
-
};
|
|
40
|
-
options: string[];
|
|
41
|
-
description: string;
|
|
42
|
-
};
|
|
43
32
|
productDescription: {
|
|
44
33
|
control: "text";
|
|
45
34
|
};
|
|
@@ -23,22 +23,13 @@ const i = [
|
|
|
23
23
|
},
|
|
24
24
|
availId: {
|
|
25
25
|
control: { type: "select" },
|
|
26
|
-
options: ["available", "limited", "
|
|
26
|
+
options: ["in-stock", "available", "limited", "discontinued", "not-found"],
|
|
27
27
|
description: "Availability variant"
|
|
28
28
|
},
|
|
29
29
|
availDescription: {
|
|
30
30
|
control: "text",
|
|
31
31
|
description: "Availability text"
|
|
32
32
|
},
|
|
33
|
-
contactHref: {
|
|
34
|
-
control: "text",
|
|
35
|
-
description: "Contact link (only for contact variant)"
|
|
36
|
-
},
|
|
37
|
-
contactLinkBehavior: {
|
|
38
|
-
control: { type: "inline-radio" },
|
|
39
|
-
options: ["same-tab", "new-tab"],
|
|
40
|
-
description: "Contact link target behavior"
|
|
41
|
-
},
|
|
42
33
|
productDescription: { control: "text" },
|
|
43
34
|
productHref: { control: "text" },
|
|
44
35
|
partNumber: { control: "text" },
|
|
@@ -65,8 +56,6 @@ const i = [
|
|
|
65
56
|
productHref: "https://mobiledev.caseparts.com/part/1092-01/Kason-1092-Hydraulic-Door-Closer",
|
|
66
57
|
availId: "available",
|
|
67
58
|
availDescription: "In stock",
|
|
68
|
-
contactHref: "https://dev.caseparts.com/account/contactus",
|
|
69
|
-
contactLinkBehavior: "new-tab",
|
|
70
59
|
priceLabel: "List Price",
|
|
71
60
|
price: "$129.99",
|
|
72
61
|
imgSrc: "https://dev.caseparts.com/graphics/photos/R-23_IMG_2009.png",
|
|
@@ -90,18 +79,16 @@ const i = [
|
|
|
90
79
|
availId: "limited",
|
|
91
80
|
availDescription: "Limited stock"
|
|
92
81
|
}
|
|
93
|
-
},
|
|
82
|
+
}, s = {
|
|
94
83
|
args: {
|
|
95
|
-
availId: "
|
|
84
|
+
availId: "not-found",
|
|
96
85
|
availDescription: "Out of stock",
|
|
97
86
|
priceLabel: "Last Known"
|
|
98
87
|
}
|
|
99
|
-
},
|
|
88
|
+
}, c = {
|
|
100
89
|
args: {
|
|
101
|
-
availId: "
|
|
102
|
-
availDescription: "Contact for availability"
|
|
103
|
-
contactLinkBehavior: "new-tab",
|
|
104
|
-
contactHref: "https://dev.caseparts.com/account/contactus"
|
|
90
|
+
availId: "available",
|
|
91
|
+
availDescription: "Contact for availability"
|
|
105
92
|
}
|
|
106
93
|
}, d = {
|
|
107
94
|
args: {
|
|
@@ -118,12 +105,12 @@ const i = [
|
|
|
118
105
|
productView: "Card",
|
|
119
106
|
imgSrc: void 0
|
|
120
107
|
}
|
|
121
|
-
},
|
|
108
|
+
}, m = {
|
|
122
109
|
args: {
|
|
123
110
|
productView: "Tile",
|
|
124
111
|
flat: !0
|
|
125
112
|
}
|
|
126
|
-
},
|
|
113
|
+
}, v = {
|
|
127
114
|
args: {
|
|
128
115
|
productView: "Card",
|
|
129
116
|
imgSrc: void 0,
|
|
@@ -145,16 +132,16 @@ const i = [
|
|
|
145
132
|
}
|
|
146
133
|
};
|
|
147
134
|
export {
|
|
148
|
-
|
|
135
|
+
c as ContactForAvailability,
|
|
149
136
|
l as Default,
|
|
150
137
|
p as DifferentPriceLabel,
|
|
151
|
-
|
|
138
|
+
m as FlatTile,
|
|
152
139
|
n as LimitedStock,
|
|
153
140
|
b as MaxQuantityCard,
|
|
154
141
|
y as MaxQuantityTile,
|
|
155
142
|
u as NoImageCard,
|
|
156
|
-
|
|
143
|
+
v as NoImageFlatCard,
|
|
157
144
|
d as TileView,
|
|
158
|
-
|
|
145
|
+
s as Unavailable,
|
|
159
146
|
r as default
|
|
160
147
|
};
|
package/package.json
CHANGED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import './assets/Cart.css';const t = "_cartIconButton_m34kh_2", o = "_count_m34kh_16", e = "_cartContainer_m34kh_31", n = "_headerWrapper_m34kh_42", _ = "_header_m34kh_42", a = "_cartItems_m34kh_60", m = "_cartItem_m34kh_60", c = "_topRow_m34kh_86", r = "_itemInfo_m34kh_93", s = "_editUnit_m34kh_98", i = "_purchaseInformation_m34kh_114", h = "_availabilitySlot_m34kh_120", I = "_priceSlot_m34kh_123", k = "_itemManagement_m34kh_126", u = "_quantitySlot_m34kh_132", l = "_itemImage_m34kh_142", p = "_removeItem_m34kh_145", d = "_noItems_m34kh_155", S = "_subtotal_m34kh_162", y = "_checkoutButton_m34kh_169", b = {
|
|
2
|
-
cartIconButton: t,
|
|
3
|
-
count: o,
|
|
4
|
-
cartContainer: e,
|
|
5
|
-
headerWrapper: n,
|
|
6
|
-
header: _,
|
|
7
|
-
cartItems: a,
|
|
8
|
-
cartItem: m,
|
|
9
|
-
topRow: c,
|
|
10
|
-
itemInfo: r,
|
|
11
|
-
editUnit: s,
|
|
12
|
-
purchaseInformation: i,
|
|
13
|
-
availabilitySlot: h,
|
|
14
|
-
priceSlot: I,
|
|
15
|
-
itemManagement: k,
|
|
16
|
-
quantitySlot: u,
|
|
17
|
-
itemImage: l,
|
|
18
|
-
removeItem: p,
|
|
19
|
-
noItems: d,
|
|
20
|
-
subtotal: S,
|
|
21
|
-
checkoutButton: y
|
|
22
|
-
};
|
|
23
|
-
export {
|
|
24
|
-
b as s
|
|
25
|
-
};
|