@caseparts-org/caseblocks 0.0.150 → 0.0.151
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/assets/Product.css +1 -1
- package/dist/organisms/Product/Product.js +124 -121
- package/package.json +1 -1
package/dist/assets/Product.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._productCard_12y5l_3{box-sizing:border-box;background:var(--surface-surface-primary, #FFF);display:flex;width:232px;height:296px;padding:var(--spacing-spacing-default, 16px) var(--spacing-spacing-sm, 20px);flex-direction:column;align-items:flex-start;gap:var(--spacing-spacing-2xs)}._productCard_12y5l_3._sm_12y5l_15{width:180px;height:230px}._productCard_12y5l_3>img{width:78px;height:78px;object-fit:contain;flex-shrink:0;margin:0 auto}._productCard_12y5l_3 ._productInformation_12y5l_27{display:flex;flex-direction:column;align-items:flex-start;gap:2px;margin-top:auto}._productCard_12y5l_3 ._purchaseInformation_12y5l_34{display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;width:100%}._productCard_12y5l_3 ._addToCart_12y5l_42,._productCard_12y5l_3 ._addToCartButton_12y5l_45{width:100%}._productInformation_12y5l_27>a{font-weight:var(--font-weight-semibold)}._partNumber_12y5l_53{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-3xs)}._partNumberLabel_12y5l_60{color:var(--text-text-quaternary)}._productTile_12y5l_64{box-sizing:border-box;width:100%;max-width:1072px;display:flex;flex-direction:row;align-items:flex-start;background:var(--surface-surface-primary, #FFF);padding:var(--spacing-spacing-default, 16px) var(--spacing-spacing-sm, 20px);gap:var(--spacing-spacing-1xs)}._productTile_12y5l_64>img{object-fit:contain}._productTile_12y5l_64 ._topRow_12y5l_83{display:grid;grid-template-columns:1fr auto;width:100%}._productTile_12y5l_64 ._topRow_12y5l_83 button{background-color:transparent;padding:0;margin:0;outline:none;border:none;height:min-content;width:min-content}._productTile_12y5l_64 ._topRow_12y5l_83 path{fill:var(--icons-icon-search)}._productTile_12y5l_64 ._topRow_12y5l_83 svg{padding:0}._productTile_12y5l_64 ._productInformation_12y5l_27{display:flex;flex-direction:column;align-items:flex-start;gap:2px}._productTile_12y5l_64 ._productData_12y5l_114{display:flex;flex-direction:column;align-items:flex-start;width:100%;gap:var(--spacing-spacing-2xs)}._productTile_12y5l_64 ._purchase_12y5l_34{display:flex;flex-direction:row;align-items:flex-end;justify-content:space-between;width:100%}@media (max-width: 480px){._productTile_12y5l_64 ._purchase_12y5l_34{flex-direction:column;align-items:flex-start;gap:var(--spacing-spacing-3xs)}}._productTile_12y5l_64 ._purchaseInformation_12y5l_34{display:flex;flex-direction:column;align-items:flex-start;gap:var(--spacing-spacing-2xs)}@media (max-width: 480px){._productTile_12y5l_64 ._purchaseInformation_12y5l_34{flex-direction:row;align-items:flex-start;justify-content:space-between;width:100%;gap:0px}}._productTile_12y5l_64 ._attributeContainer_12y5l_151{margin:0;padding:0;padding-top:var(--spacing-spacing-1xs);border-top:1px solid var(--border-border-primary);width:100%;list-style:none;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:wrap;column-gap:var(--spacing-spacing-lg);row-gap:var(--spacing-spacing-3xs)}@media (max-width: 640px){._productTile_12y5l_64 ._attributeContainer_12y5l_151{display:none}}._productTile_12y5l_64 ._attributeContainer_12y5l_151 li{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-3xs)}._productTile_12y5l_64 ._addToCart_12y5l_42{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-md)}@media (max-width: 480px){._productTile_12y5l_64 ._addToCart_12y5l_42{gap:var(--spacing-spacing-2xs);width:100%}}._productTile_12y5l_64 ._addToCartButton_12y5l_45{width:96px;font-size:var(--font-size-md);font-weight:var(--font-weight-semibold)}@media (max-width: 640px){._productTile_12y5l_64 ._addToCartButton_12y5l_45{width:100%}}._elevated_12y5l_199{border:1px solid var(--border-border-primary, #DFDFDF);box-shadow:2px 4px 12px #00000026}._noImage_12y5l_205 ._productInformation_12y5l_27{margin-top:0}._sm_12y5l_15{padding:var(--spacing-spacing-1xs)}
|
|
@@ -1,157 +1,160 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Image as
|
|
1
|
+
import { jsxs as o, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { Image as x } from "../../atoms/Image/Image.js";
|
|
3
3
|
import { Link as w } from "../../atoms/Link/Link.js";
|
|
4
|
-
import { Text as
|
|
4
|
+
import { Text as d } from "../../atoms/Text/Text.js";
|
|
5
5
|
import { Availability as B } from "../../molecules/Availability/Availability.js";
|
|
6
6
|
import { Pricing as L } from "../../molecules/Pricing/Pricing.js";
|
|
7
7
|
import { AddToCart as A } from "../../molecules/AddToCart/AddToCart.js";
|
|
8
8
|
import { Icon as D } from "../../atoms/Icon/Icon.js";
|
|
9
9
|
import { c as R } from "../../clsx-OuTLNxxd.js";
|
|
10
|
-
import '../../assets/Product.css';const P = "
|
|
10
|
+
import '../../assets/Product.css';const P = "_productCard_12y5l_3", j = "_sm_12y5l_15", k = "_productInformation_12y5l_27", V = "_purchaseInformation_12y5l_34", q = "_addToCart_12y5l_42", E = "_addToCartButton_12y5l_45", F = "_partNumber_12y5l_53", G = "_partNumberLabel_12y5l_60", J = "_productTile_12y5l_64", M = "_topRow_12y5l_83", O = "_productData_12y5l_114", U = "_purchase_12y5l_34", W = "_attributeContainer_12y5l_151", X = "_elevated_12y5l_199", Y = "_noImage_12y5l_205", t = {
|
|
11
11
|
productCard: P,
|
|
12
12
|
sm: j,
|
|
13
13
|
productInformation: k,
|
|
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: V,
|
|
15
|
+
addToCart: q,
|
|
16
|
+
addToCartButton: E,
|
|
17
|
+
partNumber: F,
|
|
18
|
+
partNumberLabel: G,
|
|
19
|
+
productTile: J,
|
|
20
|
+
topRow: M,
|
|
21
|
+
productData: O,
|
|
22
|
+
purchase: U,
|
|
23
|
+
attributeContainer: W,
|
|
24
|
+
elevated: X,
|
|
25
|
+
noImage: Y
|
|
26
26
|
};
|
|
27
|
-
function
|
|
27
|
+
function ot({
|
|
28
28
|
productView: $,
|
|
29
|
-
itemKey:
|
|
30
|
-
partNumber:
|
|
31
|
-
productDescription:
|
|
32
|
-
availDescription:
|
|
33
|
-
availId:
|
|
34
|
-
contactHref:
|
|
35
|
-
contactLinkBehavior:
|
|
36
|
-
productHref:
|
|
37
|
-
priceLabel:
|
|
38
|
-
price:
|
|
39
|
-
imgSrc:
|
|
40
|
-
attributes:
|
|
41
|
-
className:
|
|
42
|
-
onAddToCart:
|
|
43
|
-
onClose:
|
|
44
|
-
flat:
|
|
45
|
-
size:
|
|
29
|
+
itemKey: i,
|
|
30
|
+
partNumber: n,
|
|
31
|
+
productDescription: _,
|
|
32
|
+
availDescription: h,
|
|
33
|
+
availId: l,
|
|
34
|
+
contactHref: b,
|
|
35
|
+
contactLinkBehavior: N,
|
|
36
|
+
productHref: f,
|
|
37
|
+
priceLabel: C,
|
|
38
|
+
price: c,
|
|
39
|
+
imgSrc: e,
|
|
40
|
+
attributes: u,
|
|
41
|
+
className: T,
|
|
42
|
+
onAddToCart: y,
|
|
43
|
+
onClose: g,
|
|
44
|
+
flat: v,
|
|
45
|
+
size: r = "md",
|
|
46
46
|
showQuantity: p = !0,
|
|
47
|
-
...
|
|
47
|
+
...I
|
|
48
48
|
}) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
49
|
+
const s = r === "sm" ? "xs" : "sm";
|
|
50
|
+
return $ === "Card" ? /* @__PURE__ */ o(
|
|
51
|
+
"div",
|
|
52
|
+
{
|
|
53
|
+
className: R(
|
|
54
|
+
t.productCard,
|
|
55
|
+
r && t[r],
|
|
56
|
+
T,
|
|
57
|
+
!v && t.elevated,
|
|
58
|
+
!e && t.noImage
|
|
59
|
+
),
|
|
60
|
+
...I,
|
|
61
|
+
children: [
|
|
62
|
+
e && /* @__PURE__ */ a(
|
|
63
|
+
x,
|
|
64
|
+
{
|
|
65
|
+
src: e,
|
|
66
|
+
alt: `${n} product image`,
|
|
67
|
+
height: r === "sm" ? 78 : 96,
|
|
68
|
+
width: r === "sm" ? 78 : 96
|
|
69
|
+
}
|
|
60
70
|
),
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
71
|
+
/* @__PURE__ */ o("div", { className: t.productInformation, children: [
|
|
72
|
+
/* @__PURE__ */ a(w, { size: r, href: f, children: _ }),
|
|
73
|
+
/* @__PURE__ */ o("div", { className: t.partNumber, children: [
|
|
74
|
+
/* @__PURE__ */ a(d, { size: s, className: t.partNumberLabel, children: "Part #" }),
|
|
75
|
+
/* @__PURE__ */ a(d, { size: s, weight: "semibold", children: n })
|
|
76
|
+
] })
|
|
77
|
+
] }),
|
|
78
|
+
/* @__PURE__ */ o("div", { className: t.purchaseInformation, children: [
|
|
79
|
+
l && /* @__PURE__ */ a(
|
|
80
|
+
B,
|
|
65
81
|
{
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
82
|
+
availId: l,
|
|
83
|
+
availDescription: h,
|
|
84
|
+
contactHref: b,
|
|
85
|
+
contactLinkBehavior: N
|
|
70
86
|
}
|
|
71
87
|
),
|
|
72
|
-
/* @__PURE__ */ a(
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
size: o,
|
|
100
|
-
buttonDoneText: "",
|
|
101
|
-
buttonText: p ? "Add" : "Add to Cart",
|
|
102
|
-
showQuantity: p
|
|
103
|
-
}
|
|
104
|
-
)
|
|
105
|
-
]
|
|
106
|
-
}
|
|
107
|
-
);
|
|
108
|
-
}
|
|
109
|
-
return /* @__PURE__ */ a("div", { className: R(t.productTile, f, !g && t.elevated, !d && t.noImage), ...v, children: [
|
|
110
|
-
d && /* @__PURE__ */ r(
|
|
111
|
-
I,
|
|
88
|
+
c && /* @__PURE__ */ a(L, { pricingLabel: C, price: c })
|
|
89
|
+
] }),
|
|
90
|
+
/* @__PURE__ */ a(
|
|
91
|
+
A,
|
|
92
|
+
{
|
|
93
|
+
itemKey: i,
|
|
94
|
+
onAdd: y,
|
|
95
|
+
className: t.addToCart,
|
|
96
|
+
addButtonClassName: t.addToCartButton,
|
|
97
|
+
addButtonVariant: p ? "cta-primary" : "secondary",
|
|
98
|
+
size: r,
|
|
99
|
+
buttonDoneText: "",
|
|
100
|
+
buttonText: p ? "Add" : "Add to Cart",
|
|
101
|
+
showQuantity: p
|
|
102
|
+
}
|
|
103
|
+
)
|
|
104
|
+
]
|
|
105
|
+
}
|
|
106
|
+
) : /* @__PURE__ */ o("div", { className: R(
|
|
107
|
+
t.productTile,
|
|
108
|
+
T,
|
|
109
|
+
r && t[r],
|
|
110
|
+
!v && t.elevated,
|
|
111
|
+
!e && t.noImage
|
|
112
|
+
), ...I, children: [
|
|
113
|
+
e && /* @__PURE__ */ a(
|
|
114
|
+
x,
|
|
112
115
|
{
|
|
113
|
-
src:
|
|
114
|
-
alt: `${
|
|
115
|
-
height: 108,
|
|
116
|
-
width: 108
|
|
116
|
+
src: e,
|
|
117
|
+
alt: `${n} product image`,
|
|
118
|
+
height: r === "sm" ? 86 : 108,
|
|
119
|
+
width: r === "sm" ? 86 : 108
|
|
117
120
|
}
|
|
118
121
|
),
|
|
119
|
-
/* @__PURE__ */
|
|
120
|
-
/* @__PURE__ */
|
|
121
|
-
/* @__PURE__ */
|
|
122
|
-
/* @__PURE__ */
|
|
123
|
-
/* @__PURE__ */
|
|
124
|
-
/* @__PURE__ */
|
|
125
|
-
/* @__PURE__ */
|
|
122
|
+
/* @__PURE__ */ o("div", { className: t.productData, children: [
|
|
123
|
+
/* @__PURE__ */ o("div", { className: t.topRow, children: [
|
|
124
|
+
/* @__PURE__ */ o("div", { className: t.productInformation, children: [
|
|
125
|
+
/* @__PURE__ */ a(w, { size: r, href: f, children: _ }),
|
|
126
|
+
/* @__PURE__ */ o("div", { className: t.partNumber, children: [
|
|
127
|
+
/* @__PURE__ */ a(d, { size: s, className: t.partNumberLabel, children: "Part #" }),
|
|
128
|
+
/* @__PURE__ */ a(d, { size: s, weight: "semibold", children: n })
|
|
126
129
|
] })
|
|
127
130
|
] }),
|
|
128
|
-
|
|
131
|
+
g && /* @__PURE__ */ a("button", { onClick: () => g(i), children: /* @__PURE__ */ a(D, { size: "sm", iconKey: "fa-light fa-xmark" }) })
|
|
129
132
|
] }),
|
|
130
|
-
/* @__PURE__ */
|
|
131
|
-
/* @__PURE__ */
|
|
132
|
-
|
|
133
|
+
/* @__PURE__ */ o("div", { className: t.purchase, children: [
|
|
134
|
+
/* @__PURE__ */ o("div", { className: t.purchaseInformation, children: [
|
|
135
|
+
l && /* @__PURE__ */ a(
|
|
133
136
|
B,
|
|
134
137
|
{
|
|
135
|
-
availId:
|
|
136
|
-
availDescription:
|
|
137
|
-
contactHref:
|
|
138
|
-
contactLinkBehavior:
|
|
138
|
+
availId: l,
|
|
139
|
+
availDescription: h,
|
|
140
|
+
contactHref: b,
|
|
141
|
+
contactLinkBehavior: N
|
|
139
142
|
}
|
|
140
143
|
),
|
|
141
|
-
|
|
144
|
+
c && /* @__PURE__ */ a(L, { pricingLabel: C, price: c })
|
|
142
145
|
] }),
|
|
143
|
-
/* @__PURE__ */
|
|
146
|
+
/* @__PURE__ */ a(A, { size: r, itemKey: i, onAdd: y, className: t.addToCart, addButtonClassName: t.addToCartButton })
|
|
144
147
|
] }),
|
|
145
|
-
|
|
146
|
-
/* @__PURE__ */
|
|
147
|
-
|
|
148
|
+
u && u.length > 0 && /* @__PURE__ */ a("ul", { className: t.attributeContainer, children: u.map((m) => /* @__PURE__ */ o("li", { children: [
|
|
149
|
+
/* @__PURE__ */ o(d, { size: "xs", weight: "light", children: [
|
|
150
|
+
m.label,
|
|
148
151
|
":"
|
|
149
152
|
] }),
|
|
150
|
-
/* @__PURE__ */
|
|
151
|
-
] }, `${
|
|
153
|
+
/* @__PURE__ */ a(d, { size: "xs", weight: "semibold", children: m.value })
|
|
154
|
+
] }, `${m.label}.${m.value}`)) })
|
|
152
155
|
] })
|
|
153
156
|
] });
|
|
154
157
|
}
|
|
155
158
|
export {
|
|
156
|
-
|
|
159
|
+
ot as Product
|
|
157
160
|
};
|