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