@caseparts-org/caseblocks 0.0.216 → 0.0.218
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_1adwd_3{box-sizing:border-box;position:relative;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_1adwd_3._sm_1adwd_16{width:180px;height:230px}._productCard_1adwd_3>img{object-fit:contain;flex-shrink:0;margin:0 auto}._productCard_1adwd_3 ._productInformation_1adwd_26{display:flex;flex-direction:column;align-items:flex-start;gap:2px;margin-top:auto}._productCard_1adwd_3 ._purchaseInformation_1adwd_33{display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;width:100%}._productCard_1adwd_3 ._addToCart_1adwd_41,._productCard_1adwd_3 ._addToCartButton_1adwd_44{width:100%}._productInformation_1adwd_26>a{font-weight:var(--font-weight-semibold);white-space:break-spaces;word-wrap:normal}._partNumber_1adwd_54{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-3xs)}._partNumberLabel_1adwd_61{color:var(--text-text-quaternary)}._productTile_1adwd_65{box-sizing:border-box;position:relative;z-index:1;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_1adwd_65>img{object-fit:contain}._productTile_1adwd_65 ._productInformation_1adwd_26{display:flex;flex-direction:column;align-items:flex-start;gap:2px}._productTile_1adwd_65 ._productData_1adwd_93{display:flex;flex-direction:column;align-items:flex-start;width:100%;gap:var(--spacing-spacing-2xs)}._productTile_1adwd_65 ._purchase_1adwd_33{display:flex;flex-direction:row;align-items:flex-end;justify-content:space-between;width:100%}@media (max-width: 480px){._productTile_1adwd_65 ._purchase_1adwd_33{flex-direction:column;align-items:flex-start;gap:var(--spacing-spacing-3xs)}}._productTile_1adwd_65 ._purchaseInformation_1adwd_33{display:flex;flex-direction:column;align-items:flex-start;gap:var(--spacing-spacing-2xs)}@media (max-width: 480px){._productTile_1adwd_65 ._purchaseInformation_1adwd_33{flex-direction:row;align-items:flex-start;justify-content:space-between;width:100%;gap:0px}}._productTile_1adwd_65 ._attributeContainer_1adwd_130{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_1adwd_65 ._attributeContainer_1adwd_130{display:none}}._productTile_1adwd_65 ._attributeContainer_1adwd_130 li{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-3xs)}._productTile_1adwd_65 ._addToCart_1adwd_41{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-md)}@media (max-width: 480px){._productTile_1adwd_65 ._addToCart_1adwd_41{gap:var(--spacing-spacing-2xs);width:100%}}._productTile_1adwd_65 ._addToCartButton_1adwd_44{width:96px;font-size:var(--font-size-md);font-weight:var(--font-weight-semibold)}@media (max-width: 640px){._productTile_1adwd_65 ._addToCartButton_1adwd_44{width:100%}}._customWizardBadge_1adwd_177{position:absolute;top:0;right:0;z-index:2;display:flex;align-items:center;justify-content:center;gap:var(--spacing-spacing-4xs);max-width:70%;overflow:hidden;padding:var(--spacing-spacing-3xs) var(--spacing-spacing-2xs);border-radius:0 0 0 12px;background-color:var(--text-text-secondary);text-align:center;text-decoration:none;white-space:nowrap}@media (max-width: 768px){._customWizardBadge_1adwd_177{padding:var(--spacing-spacing-3xs);border-radius:0 0 0 10px}}._customWizardBadge-inherit_1adwd_200{background-color:inherit}._customWizardBadge-warning_1adwd_204{background-color:var(--text-text-caution)}._customWizardBadge-disabled_1adwd_208{background-color:var(--text-text-disabled)}._customWizardBadge-error-warning_1adwd_212{background-color:var(--text-text-error-warning)}._customWizardBadge-default-inverted_1adwd_216{background-color:var(--text-text-invert)}._customWizardBadge-links_1adwd_220{background-color:var(--text-text-links)}._customWizardBadge-links-hover-press_1adwd_224{background-color:var(--text-text-links-hover-press)}._customWizardBadge-primary_1adwd_228{background-color:var(--text-text-primary)}._customWizardBadge-quaternary_1adwd_232{background-color:var(--text-text-quaternary)}._customWizardBadge-search-bar_1adwd_236{background-color:var(--text-text-search-bar)}._customWizardBadge-secondary_1adwd_240{background-color:var(--text-text-secondary)}._customWizardBadge-success_1adwd_244{background-color:var(--text-text-success)}._customWizardBadge-tertiary_1adwd_248{background-color:var(--text-text-tertiary)}._customWizardBadge-footer_1adwd_252{background-color:var(--text-text-footer)}._customWizardBadgeText_1adwd_256{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--font-size-xs);line-height:var(--font-line-height-xs)}@media (max-width: 768px){._customWizardBadgeText_1adwd_256{font-size:var(--font-size-xxs);line-height:var(--font-line-height-xxs)}}._elevated_1adwd_269{border:1px solid var(--border-border-primary, #DFDFDF);box-shadow:2px 4px 12px #00000026}._noImage_1adwd_275 ._productInformation_1adwd_26{margin-top:0}._sm_1adwd_16{padding:var(--spacing-spacing-1xs)}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TextProps } from '../../atoms/Text/Text';
|
|
2
2
|
import { AvailabilityProps } from '../../molecules/Availability/Availability';
|
|
3
3
|
export type ProductView = "Card" | "Tile";
|
|
4
4
|
export type Size = "md" | "sm";
|
|
@@ -8,7 +8,7 @@ export interface ProductProps extends AvailabilityProps {
|
|
|
8
8
|
availDescription: string;
|
|
9
9
|
customWizardUrl?: string;
|
|
10
10
|
customWizardText?: string;
|
|
11
|
-
|
|
11
|
+
customWizardColorToken?: TextProps["colorToken"];
|
|
12
12
|
productHref?: string;
|
|
13
13
|
itemKey: number;
|
|
14
14
|
partNumber: string;
|
|
@@ -28,4 +28,4 @@ export interface ProductProps extends AvailabilityProps {
|
|
|
28
28
|
requiresUnitDetails?: boolean;
|
|
29
29
|
maxQuantity?: number;
|
|
30
30
|
}
|
|
31
|
-
export declare function Product({ productView, itemKey, partNumber, productDescription, availDescription, availId, inventory, productHref, customWizardUrl, customWizardText,
|
|
31
|
+
export declare function Product({ productView, itemKey, partNumber, productDescription, availDescription, availId, inventory, productHref, customWizardUrl, customWizardText, customWizardColorToken, priceLabel, price, imgSrc, attributes, className, onAddToCart, flat, size, showQuantity, onLinkClicked, requiresUnitDetails, maxQuantity, ...otherProps }: ProductProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,172 +1,179 @@
|
|
|
1
|
-
import { jsxs as e, jsx as
|
|
2
|
-
import { Image as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
purchase: y,
|
|
1
|
+
import { jsxs as e, jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { Image as $ } from "../../atoms/Image/Image.js";
|
|
3
|
+
import { Link as g } from "../../atoms/Link/Link.js";
|
|
4
|
+
import { Text as t } from "../../atoms/Text/Text.js";
|
|
5
|
+
import { Availability as P } from "../../molecules/Availability/Availability.js";
|
|
6
|
+
import { Pricing as j } from "../../molecules/Pricing/Pricing.js";
|
|
7
|
+
import { AddToCart as D } from "../../molecules/AddToCart/AddToCart.js";
|
|
8
|
+
import { c as h } from "../../clsx-OuTLNxxd.js";
|
|
9
|
+
import '../../assets/Product.css';const E = "_productCard_1adwd_3", F = "_sm_1adwd_16", G = "_productInformation_1adwd_26", J = "_purchaseInformation_1adwd_33", M = "_addToCart_1adwd_41", O = "_addToCartButton_1adwd_44", R = "_partNumber_1adwd_54", X = "_partNumberLabel_1adwd_61", Y = "_productTile_1adwd_65", Z = "_productData_1adwd_93", H = "_purchase_1adwd_33", L = "_attributeContainer_1adwd_130", K = "_customWizardBadge_1adwd_177", Q = "_customWizardBadgeText_1adwd_256", S = "_elevated_1adwd_269", U = "_noImage_1adwd_275", a = {
|
|
10
|
+
productCard: E,
|
|
11
|
+
sm: F,
|
|
12
|
+
productInformation: G,
|
|
13
|
+
purchaseInformation: J,
|
|
14
|
+
addToCart: M,
|
|
15
|
+
addToCartButton: O,
|
|
16
|
+
partNumber: R,
|
|
17
|
+
partNumberLabel: X,
|
|
18
|
+
productTile: Y,
|
|
19
|
+
productData: Z,
|
|
20
|
+
purchase: H,
|
|
22
21
|
attributeContainer: L,
|
|
23
|
-
customWizardBadge:
|
|
24
|
-
|
|
22
|
+
customWizardBadge: K,
|
|
23
|
+
"customWizardBadge-inherit": "_customWizardBadge-inherit_1adwd_200",
|
|
24
|
+
"customWizardBadge-warning": "_customWizardBadge-warning_1adwd_204",
|
|
25
|
+
"customWizardBadge-disabled": "_customWizardBadge-disabled_1adwd_208",
|
|
26
|
+
"customWizardBadge-error-warning": "_customWizardBadge-error-warning_1adwd_212",
|
|
27
|
+
"customWizardBadge-default-inverted": "_customWizardBadge-default-inverted_1adwd_216",
|
|
28
|
+
"customWizardBadge-links": "_customWizardBadge-links_1adwd_220",
|
|
29
|
+
"customWizardBadge-links-hover-press": "_customWizardBadge-links-hover-press_1adwd_224",
|
|
30
|
+
"customWizardBadge-primary": "_customWizardBadge-primary_1adwd_228",
|
|
31
|
+
"customWizardBadge-quaternary": "_customWizardBadge-quaternary_1adwd_232",
|
|
32
|
+
"customWizardBadge-search-bar": "_customWizardBadge-search-bar_1adwd_236",
|
|
33
|
+
"customWizardBadge-secondary": "_customWizardBadge-secondary_1adwd_240",
|
|
34
|
+
"customWizardBadge-success": "_customWizardBadge-success_1adwd_244",
|
|
35
|
+
"customWizardBadge-tertiary": "_customWizardBadge-tertiary_1adwd_248",
|
|
36
|
+
"customWizardBadge-footer": "_customWizardBadge-footer_1adwd_252",
|
|
37
|
+
customWizardBadgeText: Q,
|
|
25
38
|
elevated: S,
|
|
26
39
|
noImage: U
|
|
27
40
|
};
|
|
28
|
-
function
|
|
29
|
-
productView:
|
|
41
|
+
function ca({
|
|
42
|
+
productView: q,
|
|
30
43
|
itemKey: c,
|
|
31
|
-
partNumber:
|
|
32
|
-
productDescription:
|
|
33
|
-
availDescription:
|
|
34
|
-
availId:
|
|
35
|
-
inventory:
|
|
44
|
+
partNumber: m,
|
|
45
|
+
productDescription: w,
|
|
46
|
+
availDescription: W,
|
|
47
|
+
availId: i,
|
|
48
|
+
inventory: z,
|
|
36
49
|
productHref: b,
|
|
37
|
-
customWizardUrl:
|
|
38
|
-
customWizardText:
|
|
39
|
-
|
|
40
|
-
priceLabel:
|
|
41
|
-
price:
|
|
42
|
-
imgSrc:
|
|
43
|
-
attributes:
|
|
44
|
-
className:
|
|
45
|
-
onAddToCart:
|
|
46
|
-
flat:
|
|
50
|
+
customWizardUrl: n,
|
|
51
|
+
customWizardText: f = "Customize",
|
|
52
|
+
customWizardColorToken: V = "secondary",
|
|
53
|
+
priceLabel: N,
|
|
54
|
+
price: u,
|
|
55
|
+
imgSrc: o,
|
|
56
|
+
attributes: B,
|
|
57
|
+
className: T,
|
|
58
|
+
onAddToCart: v,
|
|
59
|
+
flat: x,
|
|
47
60
|
size: r = "md",
|
|
48
|
-
showQuantity:
|
|
61
|
+
showQuantity: p = !0,
|
|
49
62
|
onLinkClicked: s,
|
|
50
|
-
requiresUnitDetails:
|
|
51
|
-
maxQuantity:
|
|
52
|
-
...
|
|
63
|
+
requiresUnitDetails: C = !1,
|
|
64
|
+
maxQuantity: I,
|
|
65
|
+
...y
|
|
53
66
|
}) {
|
|
54
|
-
const
|
|
55
|
-
return
|
|
67
|
+
const _ = r === "sm" ? "xs" : "sm", A = a[`customWizardBadge-${V}`];
|
|
68
|
+
return q === "Card" ? /* @__PURE__ */ e(
|
|
56
69
|
"div",
|
|
57
70
|
{
|
|
58
|
-
className:
|
|
71
|
+
className: h(
|
|
59
72
|
a.productCard,
|
|
60
73
|
r && a[r],
|
|
61
|
-
|
|
62
|
-
!
|
|
63
|
-
!
|
|
74
|
+
T,
|
|
75
|
+
!x && a.elevated,
|
|
76
|
+
!o && a.noImage
|
|
64
77
|
),
|
|
65
|
-
...
|
|
78
|
+
...y,
|
|
66
79
|
children: [
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
] }),
|
|
71
|
-
d && /* @__PURE__ */ t(
|
|
72
|
-
P,
|
|
80
|
+
n && /* @__PURE__ */ d(g, { href: n, unstyled: !0, className: h(a.customWizardBadge, A), children: /* @__PURE__ */ d(t, { size: "xs", weight: "regular", colorToken: "default-inverted", className: a.customWizardBadgeText, children: f }) }),
|
|
81
|
+
o && /* @__PURE__ */ d(
|
|
82
|
+
$,
|
|
73
83
|
{
|
|
74
|
-
src:
|
|
75
|
-
alt: `${
|
|
84
|
+
src: o,
|
|
85
|
+
alt: `${m} product image`,
|
|
76
86
|
height: r === "sm" ? 78 : 96,
|
|
77
87
|
width: r === "sm" ? 78 : 96
|
|
78
88
|
}
|
|
79
89
|
),
|
|
80
90
|
/* @__PURE__ */ e("div", { className: a.productInformation, children: [
|
|
81
|
-
/* @__PURE__ */
|
|
91
|
+
/* @__PURE__ */ d(g, { onClick: () => s == null ? void 0 : s(c), size: r, href: b || "#", children: w }),
|
|
82
92
|
/* @__PURE__ */ e("div", { className: a.partNumber, children: [
|
|
83
|
-
/* @__PURE__ */ t
|
|
84
|
-
/* @__PURE__ */ t
|
|
93
|
+
/* @__PURE__ */ d(t, { size: _, className: a.partNumberLabel, children: "Part #" }),
|
|
94
|
+
/* @__PURE__ */ d(t, { size: _, weight: "semibold", children: m })
|
|
85
95
|
] })
|
|
86
96
|
] }),
|
|
87
97
|
/* @__PURE__ */ e("div", { className: a.purchaseInformation, children: [
|
|
88
|
-
|
|
89
|
-
|
|
98
|
+
i && /* @__PURE__ */ d(
|
|
99
|
+
P,
|
|
90
100
|
{
|
|
91
|
-
availId:
|
|
92
|
-
availDescription:
|
|
93
|
-
inventory:
|
|
101
|
+
availId: i,
|
|
102
|
+
availDescription: W,
|
|
103
|
+
inventory: z,
|
|
94
104
|
enableTooltip: !0
|
|
95
105
|
}
|
|
96
106
|
),
|
|
97
|
-
|
|
107
|
+
u && /* @__PURE__ */ d(j, { pricingLabel: N, price: u })
|
|
98
108
|
] }),
|
|
99
|
-
/* @__PURE__ */
|
|
100
|
-
|
|
109
|
+
/* @__PURE__ */ d(
|
|
110
|
+
D,
|
|
101
111
|
{
|
|
102
112
|
itemKey: c,
|
|
103
|
-
onAdd:
|
|
104
|
-
max:
|
|
113
|
+
onAdd: v,
|
|
114
|
+
max: I,
|
|
105
115
|
className: a.addToCart,
|
|
106
116
|
addButtonClassName: a.addToCartButton,
|
|
107
|
-
addButtonVariant:
|
|
117
|
+
addButtonVariant: p ? "cta-primary" : "secondary",
|
|
108
118
|
size: r,
|
|
109
119
|
buttonDoneText: "",
|
|
110
|
-
buttonText:
|
|
111
|
-
showQuantity:
|
|
112
|
-
requiresUnitDetails:
|
|
120
|
+
buttonText: p ? "Add" : "Add to Cart",
|
|
121
|
+
showQuantity: p,
|
|
122
|
+
requiresUnitDetails: C
|
|
113
123
|
}
|
|
114
124
|
)
|
|
115
125
|
]
|
|
116
126
|
}
|
|
117
|
-
) : /* @__PURE__ */ e("div", { className:
|
|
127
|
+
) : /* @__PURE__ */ e("div", { className: h(
|
|
118
128
|
a.productTile,
|
|
119
|
-
|
|
129
|
+
T,
|
|
120
130
|
r && a[r],
|
|
121
|
-
!
|
|
122
|
-
!
|
|
123
|
-
), ...
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
] }),
|
|
128
|
-
d && /* @__PURE__ */ t(
|
|
129
|
-
P,
|
|
131
|
+
!x && a.elevated,
|
|
132
|
+
!o && a.noImage
|
|
133
|
+
), ...y, children: [
|
|
134
|
+
n && /* @__PURE__ */ d(g, { href: n, unstyled: !0, className: h(a.customWizardBadge, A), children: /* @__PURE__ */ d(t, { size: "xs", weight: "regular", colorToken: "default-inverted", className: a.customWizardBadgeText, children: f }) }),
|
|
135
|
+
o && /* @__PURE__ */ d(
|
|
136
|
+
$,
|
|
130
137
|
{
|
|
131
|
-
src:
|
|
132
|
-
alt: `${
|
|
138
|
+
src: o,
|
|
139
|
+
alt: `${m} product image`,
|
|
133
140
|
height: r === "sm" ? 86 : 108,
|
|
134
141
|
width: r === "sm" ? 86 : 108
|
|
135
142
|
}
|
|
136
143
|
),
|
|
137
144
|
/* @__PURE__ */ e("div", { className: a.productData, children: [
|
|
138
145
|
/* @__PURE__ */ e("div", { className: a.productInformation, children: [
|
|
139
|
-
/* @__PURE__ */
|
|
146
|
+
/* @__PURE__ */ d(g, { onClick: () => s == null ? void 0 : s(c), size: r, href: b || "#", children: w }),
|
|
140
147
|
/* @__PURE__ */ e("div", { className: a.partNumber, children: [
|
|
141
|
-
/* @__PURE__ */ t
|
|
142
|
-
/* @__PURE__ */ t
|
|
148
|
+
/* @__PURE__ */ d(t, { size: _, className: a.partNumberLabel, children: "Part #" }),
|
|
149
|
+
/* @__PURE__ */ d(t, { size: _, weight: "semibold", children: m })
|
|
143
150
|
] })
|
|
144
151
|
] }),
|
|
145
152
|
/* @__PURE__ */ e("div", { className: a.purchase, children: [
|
|
146
153
|
/* @__PURE__ */ e("div", { className: a.purchaseInformation, children: [
|
|
147
|
-
|
|
148
|
-
|
|
154
|
+
i && /* @__PURE__ */ d(
|
|
155
|
+
P,
|
|
149
156
|
{
|
|
150
|
-
availId:
|
|
151
|
-
availDescription:
|
|
152
|
-
inventory:
|
|
157
|
+
availId: i,
|
|
158
|
+
availDescription: W,
|
|
159
|
+
inventory: z,
|
|
153
160
|
enableTooltip: !0
|
|
154
161
|
}
|
|
155
162
|
),
|
|
156
|
-
|
|
163
|
+
u && /* @__PURE__ */ d(j, { pricingLabel: N, price: u })
|
|
157
164
|
] }),
|
|
158
|
-
/* @__PURE__ */
|
|
165
|
+
/* @__PURE__ */ d(D, { size: r, itemKey: c, onAdd: v, max: I, className: a.addToCart, addButtonClassName: a.addToCartButton, requiresUnitDetails: C })
|
|
159
166
|
] }),
|
|
160
|
-
|
|
161
|
-
/* @__PURE__ */ e(
|
|
162
|
-
|
|
167
|
+
B && B.length > 0 && /* @__PURE__ */ d("ul", { className: a.attributeContainer, children: B.map((l) => /* @__PURE__ */ e("li", { children: [
|
|
168
|
+
/* @__PURE__ */ e(t, { size: "xs", weight: "light", children: [
|
|
169
|
+
l.label,
|
|
163
170
|
":"
|
|
164
171
|
] }),
|
|
165
|
-
/* @__PURE__ */ t
|
|
166
|
-
] }, `${
|
|
172
|
+
/* @__PURE__ */ d(t, { size: "xs", weight: "semibold", children: l.value })
|
|
173
|
+
] }, `${l.label}.${l.value}`)) })
|
|
167
174
|
] })
|
|
168
175
|
] });
|
|
169
176
|
}
|
|
170
177
|
export {
|
|
171
|
-
|
|
178
|
+
ca as Product
|
|
172
179
|
};
|