@caseparts-org/caseblocks 0.0.177 → 0.0.178
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.
|
@@ -21,5 +21,6 @@ export interface ProductProps extends AvailabilityProps {
|
|
|
21
21
|
flat?: boolean;
|
|
22
22
|
size?: Size;
|
|
23
23
|
showQuantity?: boolean;
|
|
24
|
+
onLinkClicked?: (_itemKey: number) => void;
|
|
24
25
|
}
|
|
25
|
-
export declare function Product({ productView, itemKey, partNumber, productDescription, availDescription, availId, contactHref, contactLinkBehavior, productHref, priceLabel, price, imgSrc, attributes, className, onAddToCart, onClose, flat, size, showQuantity, ...otherProps }: ProductProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare function Product({ productView, itemKey, partNumber, productDescription, availDescription, availId, contactHref, contactLinkBehavior, productHref, priceLabel, price, imgSrc, attributes, className, onAddToCart, onClose, flat, size, showQuantity, onLinkClicked, ...otherProps }: ProductProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,97 +1,98 @@
|
|
|
1
1
|
import { jsxs as o, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { Image as
|
|
3
|
-
import { Link as
|
|
2
|
+
import { Image as B } from "../../atoms/Image/Image.js";
|
|
3
|
+
import { Link as A } from "../../atoms/Link/Link.js";
|
|
4
4
|
import { Text as e } from "../../atoms/Text/Text.js";
|
|
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:
|
|
5
|
+
import { Availability as R } from "../../molecules/Availability/Availability.js";
|
|
6
|
+
import { Pricing as $ } from "../../molecules/Pricing/Pricing.js";
|
|
7
|
+
import { AddToCart as D } from "../../molecules/AddToCart/AddToCart.js";
|
|
8
|
+
import { Icon as L } from "../../atoms/Icon/Icon.js";
|
|
9
|
+
import { c as P } from "../../clsx-OuTLNxxd.js";
|
|
10
|
+
import '../../assets/Product.css';const V = "_productCard_nx8r7_3", q = "_sm_nx8r7_15", y = "_productInformation_nx8r7_25", E = "_purchaseInformation_nx8r7_32", F = "_addToCart_nx8r7_40", G = "_addToCartButton_nx8r7_43", J = "_partNumber_nx8r7_53", M = "_partNumberLabel_nx8r7_60", O = "_productTile_nx8r7_64", U = "_topRow_nx8r7_83", W = "_productData_nx8r7_114", X = "_purchase_nx8r7_32", Y = "_attributeContainer_nx8r7_151", Z = "_elevated_nx8r7_199", H = "_noImage_nx8r7_205", r = {
|
|
11
|
+
productCard: V,
|
|
12
|
+
sm: q,
|
|
13
13
|
productInformation: y,
|
|
14
|
-
purchaseInformation:
|
|
15
|
-
addToCart:
|
|
16
|
-
addToCartButton:
|
|
17
|
-
partNumber:
|
|
18
|
-
partNumberLabel:
|
|
19
|
-
productTile:
|
|
20
|
-
topRow:
|
|
21
|
-
productData:
|
|
22
|
-
purchase:
|
|
23
|
-
attributeContainer:
|
|
24
|
-
elevated:
|
|
25
|
-
noImage:
|
|
14
|
+
purchaseInformation: E,
|
|
15
|
+
addToCart: F,
|
|
16
|
+
addToCartButton: G,
|
|
17
|
+
partNumber: J,
|
|
18
|
+
partNumberLabel: M,
|
|
19
|
+
productTile: O,
|
|
20
|
+
topRow: U,
|
|
21
|
+
productData: W,
|
|
22
|
+
purchase: X,
|
|
23
|
+
attributeContainer: Y,
|
|
24
|
+
elevated: Z,
|
|
25
|
+
noImage: H
|
|
26
26
|
};
|
|
27
|
-
function
|
|
28
|
-
productView:
|
|
29
|
-
itemKey:
|
|
30
|
-
partNumber:
|
|
31
|
-
productDescription:
|
|
32
|
-
availDescription:
|
|
33
|
-
availId:
|
|
34
|
-
contactHref:
|
|
35
|
-
contactLinkBehavior:
|
|
36
|
-
productHref:
|
|
37
|
-
priceLabel:
|
|
38
|
-
price:
|
|
27
|
+
function nr({
|
|
28
|
+
productView: j,
|
|
29
|
+
itemKey: d,
|
|
30
|
+
partNumber: c,
|
|
31
|
+
productDescription: h,
|
|
32
|
+
availDescription: x,
|
|
33
|
+
availId: s,
|
|
34
|
+
contactHref: b,
|
|
35
|
+
contactLinkBehavior: N,
|
|
36
|
+
productHref: f,
|
|
37
|
+
priceLabel: C,
|
|
38
|
+
price: m,
|
|
39
39
|
imgSrc: n,
|
|
40
40
|
attributes: u,
|
|
41
|
-
className:
|
|
42
|
-
onAddToCart:
|
|
43
|
-
onClose:
|
|
44
|
-
flat:
|
|
41
|
+
className: T,
|
|
42
|
+
onAddToCart: g,
|
|
43
|
+
onClose: v,
|
|
44
|
+
flat: I,
|
|
45
45
|
size: a = "md",
|
|
46
46
|
showQuantity: p = !0,
|
|
47
|
-
|
|
47
|
+
onLinkClicked: _,
|
|
48
|
+
...w
|
|
48
49
|
}) {
|
|
49
|
-
const
|
|
50
|
-
return
|
|
50
|
+
const l = a === "sm" ? "xs" : "sm";
|
|
51
|
+
return j === "Card" ? /* @__PURE__ */ o(
|
|
51
52
|
"div",
|
|
52
53
|
{
|
|
53
|
-
className:
|
|
54
|
+
className: P(
|
|
54
55
|
r.productCard,
|
|
55
56
|
a && r[a],
|
|
56
|
-
|
|
57
|
-
!
|
|
57
|
+
T,
|
|
58
|
+
!I && r.elevated,
|
|
58
59
|
!n && r.noImage
|
|
59
60
|
),
|
|
60
|
-
...
|
|
61
|
+
...w,
|
|
61
62
|
children: [
|
|
62
63
|
n && /* @__PURE__ */ t(
|
|
63
|
-
|
|
64
|
+
B,
|
|
64
65
|
{
|
|
65
66
|
src: n,
|
|
66
|
-
alt: `${
|
|
67
|
+
alt: `${c} product image`,
|
|
67
68
|
height: a === "sm" ? 78 : 96,
|
|
68
69
|
width: a === "sm" ? 78 : 96
|
|
69
70
|
}
|
|
70
71
|
),
|
|
71
72
|
/* @__PURE__ */ o("div", { className: r.productInformation, children: [
|
|
72
|
-
/* @__PURE__ */ t(
|
|
73
|
+
/* @__PURE__ */ t(A, { onClick: () => _ == null ? void 0 : _(d), size: a, href: f, children: h }),
|
|
73
74
|
/* @__PURE__ */ o("div", { className: r.partNumber, children: [
|
|
74
|
-
/* @__PURE__ */ t(e, { size:
|
|
75
|
-
/* @__PURE__ */ t(e, { size:
|
|
75
|
+
/* @__PURE__ */ t(e, { size: l, className: r.partNumberLabel, children: "Part #" }),
|
|
76
|
+
/* @__PURE__ */ t(e, { size: l, weight: "semibold", children: c })
|
|
76
77
|
] })
|
|
77
78
|
] }),
|
|
78
79
|
/* @__PURE__ */ o("div", { className: r.purchaseInformation, children: [
|
|
79
|
-
|
|
80
|
-
|
|
80
|
+
s && /* @__PURE__ */ t(
|
|
81
|
+
R,
|
|
81
82
|
{
|
|
82
|
-
availId:
|
|
83
|
-
availDescription:
|
|
84
|
-
contactHref:
|
|
85
|
-
contactLinkBehavior:
|
|
83
|
+
availId: s,
|
|
84
|
+
availDescription: x,
|
|
85
|
+
contactHref: b,
|
|
86
|
+
contactLinkBehavior: N
|
|
86
87
|
}
|
|
87
88
|
),
|
|
88
|
-
|
|
89
|
+
m && /* @__PURE__ */ t($, { pricingLabel: C, price: m })
|
|
89
90
|
] }),
|
|
90
91
|
/* @__PURE__ */ t(
|
|
91
|
-
|
|
92
|
+
D,
|
|
92
93
|
{
|
|
93
|
-
itemKey:
|
|
94
|
-
onAdd:
|
|
94
|
+
itemKey: d,
|
|
95
|
+
onAdd: g,
|
|
95
96
|
className: r.addToCart,
|
|
96
97
|
addButtonClassName: r.addToCartButton,
|
|
97
98
|
addButtonVariant: p ? "cta-primary" : "secondary",
|
|
@@ -103,18 +104,18 @@ function or({
|
|
|
103
104
|
)
|
|
104
105
|
]
|
|
105
106
|
}
|
|
106
|
-
) : /* @__PURE__ */ o("div", { className:
|
|
107
|
+
) : /* @__PURE__ */ o("div", { className: P(
|
|
107
108
|
r.productTile,
|
|
108
|
-
|
|
109
|
+
T,
|
|
109
110
|
a && r[a],
|
|
110
|
-
!
|
|
111
|
+
!I && r.elevated,
|
|
111
112
|
!n && r.noImage
|
|
112
|
-
), ...
|
|
113
|
+
), ...w, children: [
|
|
113
114
|
n && /* @__PURE__ */ t(
|
|
114
|
-
|
|
115
|
+
B,
|
|
115
116
|
{
|
|
116
117
|
src: n,
|
|
117
|
-
alt: `${
|
|
118
|
+
alt: `${c} product image`,
|
|
118
119
|
height: a === "sm" ? 86 : 108,
|
|
119
120
|
width: a === "sm" ? 86 : 108
|
|
120
121
|
}
|
|
@@ -122,39 +123,39 @@ function or({
|
|
|
122
123
|
/* @__PURE__ */ o("div", { className: r.productData, children: [
|
|
123
124
|
/* @__PURE__ */ o("div", { className: r.topRow, children: [
|
|
124
125
|
/* @__PURE__ */ o("div", { className: r.productInformation, children: [
|
|
125
|
-
/* @__PURE__ */ t(
|
|
126
|
+
/* @__PURE__ */ t(A, { size: a, href: f, children: h }),
|
|
126
127
|
/* @__PURE__ */ o("div", { className: r.partNumber, children: [
|
|
127
|
-
/* @__PURE__ */ t(e, { size:
|
|
128
|
-
/* @__PURE__ */ t(e, { size:
|
|
128
|
+
/* @__PURE__ */ t(e, { size: l, className: r.partNumberLabel, children: "Part #" }),
|
|
129
|
+
/* @__PURE__ */ t(e, { size: l, weight: "semibold", children: c })
|
|
129
130
|
] })
|
|
130
131
|
] }),
|
|
131
|
-
|
|
132
|
+
v && /* @__PURE__ */ t("button", { onClick: () => v(d), children: /* @__PURE__ */ t(L, { size: "sm", iconKey: "fa-light fa-xmark" }) })
|
|
132
133
|
] }),
|
|
133
134
|
/* @__PURE__ */ o("div", { className: r.purchase, children: [
|
|
134
135
|
/* @__PURE__ */ o("div", { className: r.purchaseInformation, children: [
|
|
135
|
-
|
|
136
|
-
|
|
136
|
+
s && /* @__PURE__ */ t(
|
|
137
|
+
R,
|
|
137
138
|
{
|
|
138
|
-
availId:
|
|
139
|
-
availDescription:
|
|
140
|
-
contactHref:
|
|
141
|
-
contactLinkBehavior:
|
|
139
|
+
availId: s,
|
|
140
|
+
availDescription: x,
|
|
141
|
+
contactHref: b,
|
|
142
|
+
contactLinkBehavior: N
|
|
142
143
|
}
|
|
143
144
|
),
|
|
144
|
-
|
|
145
|
+
m && /* @__PURE__ */ t($, { pricingLabel: C, price: m })
|
|
145
146
|
] }),
|
|
146
|
-
/* @__PURE__ */ t(
|
|
147
|
+
/* @__PURE__ */ t(D, { size: a, itemKey: d, onAdd: g, className: r.addToCart, addButtonClassName: r.addToCartButton })
|
|
147
148
|
] }),
|
|
148
|
-
u && u.length > 0 && /* @__PURE__ */ t("ul", { className: r.attributeContainer, children: u.map((
|
|
149
|
+
u && u.length > 0 && /* @__PURE__ */ t("ul", { className: r.attributeContainer, children: u.map((i) => /* @__PURE__ */ o("li", { children: [
|
|
149
150
|
/* @__PURE__ */ o(e, { size: "xs", weight: "light", children: [
|
|
150
|
-
|
|
151
|
+
i.label,
|
|
151
152
|
":"
|
|
152
153
|
] }),
|
|
153
|
-
/* @__PURE__ */ t(e, { size: "xs", weight: "semibold", children:
|
|
154
|
-
] }, `${
|
|
154
|
+
/* @__PURE__ */ t(e, { size: "xs", weight: "semibold", children: i.value })
|
|
155
|
+
] }, `${i.label}.${i.value}`)) })
|
|
155
156
|
] })
|
|
156
157
|
] });
|
|
157
158
|
}
|
|
158
159
|
export {
|
|
159
|
-
|
|
160
|
+
nr as Product
|
|
160
161
|
};
|