@caseparts-org/caseblocks 0.0.280 → 0.0.281
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
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._productCard_1uvbr_3{box-sizing:border-box;position:relative;background:var(--surface-surface-primary, #FFF);display:flex;width:244px;height:308px;padding:var(--spacing-spacing-default, 16px) var(--spacing-spacing-sm, 20px);flex-direction:column;align-items:flex-start;gap:var(--spacing-spacing-2xs)}._productCard_1uvbr_3._sm_1uvbr_16{width:200px;height:265px}._productCard_1uvbr_3>img{object-fit:contain;flex-shrink:0;margin:0 auto}._productCard_1uvbr_3 ._productInformation_1uvbr_26{display:flex;flex-direction:column;align-items:flex-start;gap:2px;margin-top:auto}._productCard_1uvbr_3 ._purchaseInformation_1uvbr_33{display:flex;align-items:flex-start;width:100%}._productCard_1uvbr_3 ._purchaseControls_1uvbr_39{display:flex;flex-direction:column;width:100%;gap:var(--spacing-spacing-3xs)}._productCard_1uvbr_3 ._addToCart_1uvbr_46,._productCard_1uvbr_3 ._addToCartButton_1uvbr_49{width:100%}._productCard_1uvbr_3 ._pricing_1uvbr_53{align-self:stretch;width:100%}._productInformation_1uvbr_26>a{font-weight:var(--font-weight-semibold);white-space:break-spaces;word-wrap:normal}._partNumber_1uvbr_64{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-3xs)}._partNumberLabel_1uvbr_71{color:var(--text-text-quaternary)}._productTile_1uvbr_75{box-sizing:border-box;position:relative;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_1uvbr_75>img{object-fit:contain}._productTile_1uvbr_75 ._productInformation_1uvbr_26{display:flex;flex-direction:column;align-items:flex-start;gap:2px}._productTile_1uvbr_75 ._productData_1uvbr_102{display:flex;flex-direction:column;align-items:flex-start;width:100%;gap:var(--spacing-spacing-2xs)}._productTile_1uvbr_75 ._purchase_1uvbr_33{display:flex;flex-direction:column;align-items:stretch;justify-content:space-between;width:100%}@media (max-width: 480px){._productTile_1uvbr_75 ._purchase_1uvbr_33{align-items:flex-start;gap:var(--spacing-spacing-3xs)}}._purchase_1uvbr_33{gap:var(--spacing-spacing-2xs)}._productTile_1uvbr_75 ._purchaseInformation_1uvbr_33{display:flex;align-items:flex-start;width:100%}._productTile_1uvbr_75 ._purchaseControls_1uvbr_39{display:flex;flex-direction:column;align-self:flex-end;width:232px;gap:var(--spacing-spacing-3xs)}@media (max-width: 480px){._productTile_1uvbr_75 ._purchaseControls_1uvbr_39{align-self:stretch;width:100%}}._productTile_1uvbr_75 ._pricing_1uvbr_53{width:100%}._productTile_1uvbr_75 ._attributeContainer_1uvbr_148{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_1uvbr_75 ._attributeContainer_1uvbr_148{display:none}}._productTile_1uvbr_75 ._attributeContainer_1uvbr_148 li{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-3xs)}._productTile_1uvbr_75 ._addToCart_1uvbr_46{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-default);width:100%}@media (max-width: 480px){._productTile_1uvbr_75 ._addToCart_1uvbr_46{gap:var(--spacing-spacing-2xs)}}._productTile_1uvbr_75 ._addToCartButton_1uvbr_49{width:96px;font-size:var(--font-size-md);font-weight:var(--font-weight-semibold)}@media (max-width: 480px){._productTile_1uvbr_75 ._addToCartButton_1uvbr_49{width:100%}}._elevated_1uvbr_196{border:1px solid var(--border-border-primary, #DFDFDF);box-shadow:2px 4px 12px #00000026}._noImage_1uvbr_202 ._productInformation_1uvbr_26{margin-top:0}._sm_1uvbr_16{padding:var(--spacing-spacing-1xs)}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as c, jsxs as m } from "react/jsx-runtime";
|
|
2
2
|
import { Text as r } from "../../atoms/Text/Text.js";
|
|
3
|
-
import { Link as
|
|
3
|
+
import { Link as x } from "../../atoms/Link/Link.js";
|
|
4
4
|
import { buttonClassNames as f } from "../../atoms/Button/buttonClassName.js";
|
|
5
|
-
import { Image as
|
|
6
|
-
import { c as
|
|
7
|
-
import '../../assets/CardLink.css';const
|
|
8
|
-
card:
|
|
5
|
+
import { Image as y } from "../../atoms/Image/Image.js";
|
|
6
|
+
import { c as o } from "../../clsx-OuTLNxxd.js";
|
|
7
|
+
import '../../assets/CardLink.css';const C = "_card_oe8uu_1", z = "_cardWithCta_oe8uu_53", v = "_cardLink_oe8uu_61", L = "_callout_oe8uu_24", w = "_calloutText_oe8uu_99", I = "_cardImage_oe8uu_17", b = "_cardBody_oe8uu_10", A = "_cardTitle_oe8uu_137", W = "_cardDescription_oe8uu_145", D = "_cardCta_oe8uu_156", e = {
|
|
8
|
+
card: C,
|
|
9
9
|
cardWithCta: z,
|
|
10
10
|
cardLink: v,
|
|
11
11
|
callout: L,
|
|
@@ -17,35 +17,35 @@ import '../../assets/CardLink.css';const y = "_card_oe8uu_1", z = "_cardWithCta_
|
|
|
17
17
|
cardCta: D
|
|
18
18
|
};
|
|
19
19
|
function H({
|
|
20
|
-
href:
|
|
21
|
-
src:
|
|
20
|
+
href: _,
|
|
21
|
+
src: h,
|
|
22
22
|
alt: u = "",
|
|
23
23
|
callout: g = "Customize",
|
|
24
|
-
title:
|
|
25
|
-
description:
|
|
24
|
+
title: s,
|
|
25
|
+
description: n,
|
|
26
26
|
shortDescription: d,
|
|
27
|
-
hideCallout:
|
|
27
|
+
hideCallout: N = !1,
|
|
28
28
|
linkButtonProps: a,
|
|
29
|
-
onClick:
|
|
29
|
+
onClick: i
|
|
30
30
|
}) {
|
|
31
|
-
const
|
|
31
|
+
const T = d && d.length > 70 ? d.slice(0, 70) + "..." : d;
|
|
32
32
|
return /* @__PURE__ */ c("div", { className: e.cardLink, children: /* @__PURE__ */ c(
|
|
33
|
-
|
|
33
|
+
x,
|
|
34
34
|
{
|
|
35
|
-
href:
|
|
35
|
+
href: _,
|
|
36
36
|
unstyled: !0,
|
|
37
|
-
"aria-label":
|
|
37
|
+
"aria-label": s,
|
|
38
38
|
onClick: (l) => {
|
|
39
39
|
var t;
|
|
40
|
-
(t = a == null ? void 0 : a.onClick) == null || t.call(a, l),
|
|
40
|
+
(t = a == null ? void 0 : a.onClick) == null || t.call(a, l), i == null || i(l);
|
|
41
41
|
},
|
|
42
|
-
children: /* @__PURE__ */ m("div", { className:
|
|
43
|
-
/* @__PURE__ */ c(
|
|
44
|
-
!
|
|
42
|
+
children: /* @__PURE__ */ m("div", { className: o(e.card, a && e.cardWithCta), children: [
|
|
43
|
+
/* @__PURE__ */ c(y, { src: h, alt: u, width: 208, height: 104, className: e.cardImage }),
|
|
44
|
+
!N && /* @__PURE__ */ c("div", { className: e.callout, children: /* @__PURE__ */ c(r, { size: "xs", weight: "regular", colorToken: "default-inverted", className: e.calloutText, children: g }) }),
|
|
45
45
|
/* @__PURE__ */ m("div", { className: e.cardBody, children: [
|
|
46
|
-
/* @__PURE__ */ c(r, { size: "sm", weight: "regular", colorToken: "secondary", className: e.cardTitle, children:
|
|
47
|
-
/* @__PURE__ */ c(r, { size: "xs", weight: "regular", className: e.cardDescription, hideAt: ["sm"], children:
|
|
48
|
-
/* @__PURE__ */ c(r, { size: "xs", weight: "regular", className: e.cardDescription, hideAt: ["md", "lg"], children:
|
|
46
|
+
/* @__PURE__ */ c(r, { size: "sm", weight: "regular", colorToken: "secondary", className: e.cardTitle, children: s }),
|
|
47
|
+
/* @__PURE__ */ c(r, { size: "xs", weight: "regular", colorToken: "primary", className: e.cardDescription, hideAt: ["sm"], children: n }),
|
|
48
|
+
/* @__PURE__ */ c(r, { size: "xs", weight: "regular", colorToken: "primary", className: e.cardDescription, hideAt: ["md", "lg"], children: T }),
|
|
49
49
|
a && /* @__PURE__ */ c(
|
|
50
50
|
"span",
|
|
51
51
|
{
|
|
@@ -54,7 +54,7 @@ function H({
|
|
|
54
54
|
variant: a.variant,
|
|
55
55
|
hideAt: a.hideAt,
|
|
56
56
|
disabled: a.disabled,
|
|
57
|
-
className:
|
|
57
|
+
className: o(e.cardCta, a.className)
|
|
58
58
|
}),
|
|
59
59
|
children: a.children
|
|
60
60
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsxs as e, jsx as
|
|
1
|
+
import { jsxs as e, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import O from "react";
|
|
3
3
|
import { Image as R } from "../../atoms/Image/Image.js";
|
|
4
4
|
import { Link as V } from "../../atoms/Link/Link.js";
|
|
5
|
-
import { Text as
|
|
5
|
+
import { Text as d } from "../../atoms/Text/Text.js";
|
|
6
6
|
import { Availability as q } from "../../molecules/Availability/Availability.js";
|
|
7
7
|
import { Pricing as E } from "../../molecules/Pricing/Pricing.js";
|
|
8
8
|
import { AddToCart as F } from "../../molecules/AddToCart/AddToCart.js";
|
|
9
9
|
import { CustomWizardBadge as G } from "../../molecules/CustomWizardBadge/CustomWizardBadge.js";
|
|
10
10
|
import { c as J } from "../../clsx-OuTLNxxd.js";
|
|
11
|
-
import '../../assets/Product.css';const Q = "
|
|
11
|
+
import '../../assets/Product.css';const Q = "_productCard_1uvbr_3", X = "_sm_1uvbr_16", Y = "_productInformation_1uvbr_26", Z = "_purchaseInformation_1uvbr_33", H = "_purchaseControls_1uvbr_39", K = "_addToCart_1uvbr_46", L = "_addToCartButton_1uvbr_49", S = "_pricing_1uvbr_53", U = "_partNumber_1uvbr_64", W = "_partNumberLabel_1uvbr_71", z = "_productTile_1uvbr_75", k = "_productData_1uvbr_102", tt = "_purchase_1uvbr_33", rt = "_attributeContainer_1uvbr_148", at = "_elevated_1uvbr_196", et = "_noImage_1uvbr_202", t = {
|
|
12
12
|
productCard: Q,
|
|
13
13
|
sm: X,
|
|
14
14
|
productInformation: Y,
|
|
@@ -22,103 +22,103 @@ import '../../assets/Product.css';const Q = "_productCard_y50sy_3", X = "_sm_y50
|
|
|
22
22
|
productTile: z,
|
|
23
23
|
productData: k,
|
|
24
24
|
purchase: tt,
|
|
25
|
-
attributeContainer:
|
|
26
|
-
elevated:
|
|
25
|
+
attributeContainer: rt,
|
|
26
|
+
elevated: at,
|
|
27
27
|
noImage: et
|
|
28
28
|
};
|
|
29
29
|
function it({
|
|
30
30
|
productView: M,
|
|
31
|
-
itemKey:
|
|
31
|
+
itemKey: s,
|
|
32
32
|
partNumber: c,
|
|
33
|
-
productDescription:
|
|
34
|
-
availDescription:
|
|
35
|
-
availId:
|
|
36
|
-
inventory:
|
|
37
|
-
productHref:
|
|
38
|
-
customWizardUrl:
|
|
33
|
+
productDescription: b,
|
|
34
|
+
availDescription: v,
|
|
35
|
+
availId: u,
|
|
36
|
+
inventory: N,
|
|
37
|
+
productHref: f,
|
|
38
|
+
customWizardUrl: l,
|
|
39
39
|
customWizardText: C = "Customize",
|
|
40
40
|
customWizardColorToken: T = "secondary",
|
|
41
|
-
price:
|
|
41
|
+
price: m,
|
|
42
42
|
listPrice: g,
|
|
43
|
-
isSignedIn:
|
|
44
|
-
customerClass:
|
|
43
|
+
isSignedIn: x = !1,
|
|
44
|
+
customerClass: I,
|
|
45
45
|
imgSrc: o,
|
|
46
46
|
attributes: i,
|
|
47
|
-
className:
|
|
48
|
-
onAddToCart:
|
|
49
|
-
flat:
|
|
50
|
-
size:
|
|
47
|
+
className: B,
|
|
48
|
+
onAddToCart: A,
|
|
49
|
+
flat: w,
|
|
50
|
+
size: a = "md",
|
|
51
51
|
showQuantity: _ = !0,
|
|
52
|
-
onLinkClicked:
|
|
53
|
-
requiresUnitDetails:
|
|
54
|
-
maxQuantity:
|
|
55
|
-
...
|
|
52
|
+
onLinkClicked: n,
|
|
53
|
+
requiresUnitDetails: $ = !1,
|
|
54
|
+
maxQuantity: j,
|
|
55
|
+
...y
|
|
56
56
|
}) {
|
|
57
|
-
const [D, P] = O.useState(1), p =
|
|
57
|
+
const [D, P] = O.useState(1), p = a === "sm" ? "xs" : "sm";
|
|
58
58
|
return M === "Card" ? /* @__PURE__ */ e(
|
|
59
59
|
"div",
|
|
60
60
|
{
|
|
61
61
|
className: J(
|
|
62
62
|
t.productCard,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
!
|
|
63
|
+
a && t[a],
|
|
64
|
+
B,
|
|
65
|
+
!w && t.elevated,
|
|
66
66
|
!o && t.noImage
|
|
67
67
|
),
|
|
68
|
-
...
|
|
68
|
+
...y,
|
|
69
69
|
children: [
|
|
70
|
-
|
|
71
|
-
o && /* @__PURE__ */
|
|
70
|
+
l && /* @__PURE__ */ r(G, { href: l, text: C, colorToken: T }),
|
|
71
|
+
o && /* @__PURE__ */ r(
|
|
72
72
|
R,
|
|
73
73
|
{
|
|
74
74
|
src: o,
|
|
75
75
|
alt: `${c} product image`,
|
|
76
|
-
height:
|
|
77
|
-
width:
|
|
76
|
+
height: a === "sm" ? 78 : 96,
|
|
77
|
+
width: a === "sm" ? 78 : 96
|
|
78
78
|
}
|
|
79
79
|
),
|
|
80
80
|
/* @__PURE__ */ e("div", { className: t.productInformation, children: [
|
|
81
|
-
/* @__PURE__ */
|
|
81
|
+
/* @__PURE__ */ r(V, { onClick: () => n == null ? void 0 : n(s), size: a, href: f || "#", children: b }),
|
|
82
82
|
/* @__PURE__ */ e("div", { className: t.partNumber, children: [
|
|
83
|
-
/* @__PURE__ */
|
|
84
|
-
/* @__PURE__ */
|
|
83
|
+
/* @__PURE__ */ r(d, { size: p, className: t.partNumberLabel, children: "Part #" }),
|
|
84
|
+
/* @__PURE__ */ r(d, { size: p, weight: "semibold", children: c })
|
|
85
85
|
] })
|
|
86
86
|
] }),
|
|
87
|
-
/* @__PURE__ */
|
|
87
|
+
/* @__PURE__ */ r("div", { className: t.purchaseInformation, children: u && /* @__PURE__ */ r(
|
|
88
88
|
q,
|
|
89
89
|
{
|
|
90
|
-
availId:
|
|
91
|
-
availDescription:
|
|
92
|
-
inventory:
|
|
90
|
+
availId: u,
|
|
91
|
+
availDescription: v,
|
|
92
|
+
inventory: N,
|
|
93
93
|
enableTooltip: !0
|
|
94
94
|
}
|
|
95
95
|
) }),
|
|
96
96
|
/* @__PURE__ */ e("div", { className: t.purchaseControls, children: [
|
|
97
|
-
|
|
97
|
+
m && /* @__PURE__ */ r(
|
|
98
98
|
E,
|
|
99
99
|
{
|
|
100
|
-
price:
|
|
100
|
+
price: m,
|
|
101
101
|
listPrice: g,
|
|
102
|
-
isSignedIn:
|
|
103
|
-
customerClass:
|
|
102
|
+
isSignedIn: x,
|
|
103
|
+
customerClass: I,
|
|
104
104
|
quantity: D,
|
|
105
105
|
className: t.pricing
|
|
106
106
|
}
|
|
107
107
|
),
|
|
108
|
-
/* @__PURE__ */
|
|
108
|
+
/* @__PURE__ */ r(
|
|
109
109
|
F,
|
|
110
110
|
{
|
|
111
|
-
itemKey:
|
|
112
|
-
onAdd:
|
|
113
|
-
max:
|
|
111
|
+
itemKey: s,
|
|
112
|
+
onAdd: A,
|
|
113
|
+
max: j,
|
|
114
114
|
className: t.addToCart,
|
|
115
115
|
addButtonClassName: t.addToCartButton,
|
|
116
116
|
addButtonVariant: _ ? "cta-primary" : "secondary",
|
|
117
|
-
size:
|
|
117
|
+
size: a,
|
|
118
118
|
buttonDoneText: "",
|
|
119
119
|
buttonText: _ ? "Add" : "Add to Cart",
|
|
120
120
|
showQuantity: _,
|
|
121
|
-
requiresUnitDetails:
|
|
121
|
+
requiresUnitDetails: $,
|
|
122
122
|
onQuantityChange: P
|
|
123
123
|
}
|
|
124
124
|
)
|
|
@@ -127,60 +127,60 @@ function it({
|
|
|
127
127
|
}
|
|
128
128
|
) : /* @__PURE__ */ e("div", { className: J(
|
|
129
129
|
t.productTile,
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
!
|
|
130
|
+
B,
|
|
131
|
+
a && t[a],
|
|
132
|
+
!w && t.elevated,
|
|
133
133
|
!o && t.noImage
|
|
134
|
-
), ...
|
|
135
|
-
|
|
136
|
-
o && /* @__PURE__ */
|
|
134
|
+
), ...y, children: [
|
|
135
|
+
l && /* @__PURE__ */ r(G, { href: l, text: C, colorToken: T }),
|
|
136
|
+
o && /* @__PURE__ */ r(
|
|
137
137
|
R,
|
|
138
138
|
{
|
|
139
139
|
src: o,
|
|
140
140
|
alt: `${c} product image`,
|
|
141
|
-
height:
|
|
142
|
-
width:
|
|
141
|
+
height: a === "sm" ? 86 : 108,
|
|
142
|
+
width: a === "sm" ? 86 : 108
|
|
143
143
|
}
|
|
144
144
|
),
|
|
145
145
|
/* @__PURE__ */ e("div", { className: t.productData, children: [
|
|
146
146
|
/* @__PURE__ */ e("div", { className: t.productInformation, children: [
|
|
147
|
-
/* @__PURE__ */
|
|
147
|
+
/* @__PURE__ */ r(V, { onClick: () => n == null ? void 0 : n(s), size: a, href: f || "#", children: b }),
|
|
148
148
|
/* @__PURE__ */ e("div", { className: t.partNumber, children: [
|
|
149
|
-
/* @__PURE__ */
|
|
150
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ r(d, { size: p, className: t.partNumberLabel, children: "Part #" }),
|
|
150
|
+
/* @__PURE__ */ r(d, { size: p, weight: "semibold", children: c })
|
|
151
151
|
] })
|
|
152
152
|
] }),
|
|
153
153
|
/* @__PURE__ */ e("div", { className: t.purchase, children: [
|
|
154
|
-
/* @__PURE__ */
|
|
154
|
+
/* @__PURE__ */ r("div", { className: t.purchaseInformation, children: u && /* @__PURE__ */ r(
|
|
155
155
|
q,
|
|
156
156
|
{
|
|
157
|
-
availId:
|
|
158
|
-
availDescription:
|
|
159
|
-
inventory:
|
|
157
|
+
availId: u,
|
|
158
|
+
availDescription: v,
|
|
159
|
+
inventory: N,
|
|
160
160
|
enableTooltip: !0
|
|
161
161
|
}
|
|
162
162
|
) }),
|
|
163
163
|
/* @__PURE__ */ e("div", { className: t.purchaseControls, children: [
|
|
164
|
-
|
|
164
|
+
m && /* @__PURE__ */ r(
|
|
165
165
|
E,
|
|
166
166
|
{
|
|
167
|
-
price:
|
|
167
|
+
price: m,
|
|
168
168
|
listPrice: g,
|
|
169
|
-
isSignedIn:
|
|
170
|
-
customerClass:
|
|
169
|
+
isSignedIn: x,
|
|
170
|
+
customerClass: I,
|
|
171
171
|
quantity: D,
|
|
172
172
|
className: t.pricing
|
|
173
173
|
}
|
|
174
174
|
),
|
|
175
|
-
/* @__PURE__ */
|
|
175
|
+
/* @__PURE__ */ r(F, { size: a, itemKey: s, onAdd: A, max: j, className: t.addToCart, addButtonClassName: t.addToCartButton, requiresUnitDetails: $, onQuantityChange: P })
|
|
176
176
|
] })
|
|
177
177
|
] }),
|
|
178
|
-
i && i.length > 0 && /* @__PURE__ */
|
|
179
|
-
/* @__PURE__ */ e(
|
|
178
|
+
i && i.length > 0 && /* @__PURE__ */ r("ul", { className: t.attributeContainer, children: i.map((h) => /* @__PURE__ */ e("li", { children: [
|
|
179
|
+
/* @__PURE__ */ e(d, { size: "xs", weight: "light", children: [
|
|
180
180
|
h.label,
|
|
181
181
|
":"
|
|
182
182
|
] }),
|
|
183
|
-
/* @__PURE__ */
|
|
183
|
+
/* @__PURE__ */ r(d, { size: "xs", weight: "semibold", children: h.value })
|
|
184
184
|
] }, `${h.label}.${h.value}`)) })
|
|
185
185
|
] })
|
|
186
186
|
] });
|