@caseparts-org/caseblocks 0.0.45 → 0.0.46
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_tzp06_1{box-sizing:border-box;border:1px solid var(--border-border-primary, #DFDFDF);background:var(--surface-surface-primary, #FFF);box-shadow:2px 4px 12px #00000026;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_tzp06_1>img{width:116px;height:116px;object-fit:contain;flex-shrink:0;margin:0 auto}._productCard_tzp06_1 ._productInformation_tzp06_22{display:flex;flex-direction:column;align-items:flex-start;gap:2px;margin-top:auto}._productCard_tzp06_1 ._purchaseInformation_tzp06_29{display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;width:100%}._productCard_tzp06_1 ._addToCart_tzp06_37,._productCard_tzp06_1 ._addToCartButton_tzp06_40{width:100%}._productTile_tzp06_45{box-sizing:border-box;width:100%;max-width:1072px;display:flex;flex-direction:row;align-items:flex-start;border:1px solid var(--border-border-primary, #DFDFDF);background:var(--surface-surface-primary, #FFF);box-shadow:2px 4px 12px #00000026;padding:var(--spacing-spacing-default, 16px) var(--spacing-spacing-sm, 20px);gap:var(--spacing-spacing-1xs)}._productTile_tzp06_45>img{width:108px;height:108px;object-fit:contain}._productTile_tzp06_45 ._topRow_tzp06_66{display:grid;grid-template-columns:1fr auto;width:100%}._productTile_tzp06_45 ._topRow_tzp06_66 button{background-color:transparent;padding:0;margin:0;outline:none;border:none;height:min-content;width:min-content}._productTile_tzp06_45 ._topRow_tzp06_66 path{fill:var(--icons-icon-search)}._productTile_tzp06_45 ._topRow_tzp06_66 svg{padding:0}._productTile_tzp06_45 ._productData_tzp06_90{display:flex;flex-direction:column;align-items:flex-start;width:100%;gap:var(--spacing-spacing-2xs)}._productTile_tzp06_45 ._purchase_tzp06_29{display:flex;flex-direction:row;align-items:flex-end;justify-content:space-between;width:100%}@media (max-width: 480px){._productTile_tzp06_45 ._purchase_tzp06_29{flex-direction:column;align-items:flex-start;gap:var(--spacing-spacing-3xs)}}._productTile_tzp06_45 ._purchaseInformation_tzp06_29{display:flex;flex-direction:column;align-items:flex-start;gap:var(--spacing-spacing-2xs)}@media (max-width: 480px){._productTile_tzp06_45 ._purchaseInformation_tzp06_29{flex-direction:row;align-items:flex-start;justify-content:space-between;width:100%;gap:0px}}._productTile_tzp06_45 ._attributeContainer_tzp06_127{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_tzp06_45 ._attributeContainer_tzp06_127{display:none}}._productTile_tzp06_45 ._attributeContainer_tzp06_127 li{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-3xs)}._productTile_tzp06_45 ._addToCart_tzp06_37{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-md)}@media (max-width: 480px){._productTile_tzp06_45 ._addToCart_tzp06_37{gap:var(--spacing-spacing-2xs);width:100%}}._productTile_tzp06_45 ._addToCartButton_tzp06_40{width:96px;font-size:var(--font-size-md);font-weight:var(--font-weight-semibold)}@media (max-width: 640px){._productTile_tzp06_45 ._addToCartButton_tzp06_40{width:100%}}
|
|
@@ -6,8 +6,8 @@ import { Availability as x } from "../../molecules/Availability/Availability.js"
|
|
|
6
6
|
import { Pricing as I } from "../../molecules/Pricing/Pricing.js";
|
|
7
7
|
import { AddToCart as b } from "../../molecules/AddToCart/AddToCart.js";
|
|
8
8
|
import { Icon as P } from "../../atoms/Icon/Icon.js";
|
|
9
|
-
import { c as
|
|
10
|
-
import '../../assets/Product.css';const R = "
|
|
9
|
+
import { c as v } from "../../clsx-OuTLNxxd.js";
|
|
10
|
+
import '../../assets/Product.css';const R = "_productCard_tzp06_1", A = "_productInformation_tzp06_22", D = "_purchaseInformation_tzp06_29", j = "_addToCart_tzp06_37", k = "_addToCartButton_tzp06_40", $ = "_productTile_tzp06_45", y = "_topRow_tzp06_66", L = "_productData_tzp06_90", q = "_purchase_tzp06_29", E = "_attributeContainer_tzp06_127", t = {
|
|
11
11
|
productCard: R,
|
|
12
12
|
productInformation: A,
|
|
13
13
|
purchaseInformation: D,
|
|
@@ -20,25 +20,25 @@ import '../../assets/Product.css';const R = "_productCard_178dv_1", A = "_produc
|
|
|
20
20
|
attributeContainer: E
|
|
21
21
|
};
|
|
22
22
|
function X({
|
|
23
|
-
productView:
|
|
23
|
+
productView: w,
|
|
24
24
|
itemKey: i,
|
|
25
25
|
partNumber: a,
|
|
26
26
|
productDescription: l,
|
|
27
27
|
availDescription: m,
|
|
28
28
|
availId: d,
|
|
29
|
-
contactHref:
|
|
30
|
-
contactLinkBehavior:
|
|
29
|
+
contactHref: p,
|
|
30
|
+
contactLinkBehavior: u,
|
|
31
31
|
productHref: h,
|
|
32
32
|
priceLabel: _,
|
|
33
33
|
price: n,
|
|
34
34
|
imgSrc: f,
|
|
35
35
|
attributes: s,
|
|
36
36
|
className: C,
|
|
37
|
-
onAddToCart:
|
|
37
|
+
onAddToCart: z,
|
|
38
38
|
onClose: T,
|
|
39
39
|
...B
|
|
40
40
|
}) {
|
|
41
|
-
return
|
|
41
|
+
return w === "Card" ? /* @__PURE__ */ r("div", { className: v(t.productCard, C), children: [
|
|
42
42
|
/* @__PURE__ */ o(N, { src: f, alt: `${a} product image` }),
|
|
43
43
|
/* @__PURE__ */ r("div", { className: t.productInformation, children: [
|
|
44
44
|
/* @__PURE__ */ o(g, { href: h, children: l }),
|
|
@@ -53,8 +53,8 @@ function X({
|
|
|
53
53
|
{
|
|
54
54
|
availId: d,
|
|
55
55
|
availDescription: m,
|
|
56
|
-
contactHref:
|
|
57
|
-
contactLinkBehavior:
|
|
56
|
+
contactHref: p,
|
|
57
|
+
contactLinkBehavior: u
|
|
58
58
|
}
|
|
59
59
|
),
|
|
60
60
|
n && /* @__PURE__ */ o(I, { pricingLabel: _, price: n })
|
|
@@ -63,14 +63,14 @@ function X({
|
|
|
63
63
|
b,
|
|
64
64
|
{
|
|
65
65
|
itemKey: i,
|
|
66
|
-
onAdd:
|
|
66
|
+
onAdd: z,
|
|
67
67
|
className: t.addToCart,
|
|
68
68
|
addButtonClassName: t.addToCartButton,
|
|
69
69
|
size: "md",
|
|
70
70
|
buttonDoneText: ""
|
|
71
71
|
}
|
|
72
72
|
)
|
|
73
|
-
] }) : /* @__PURE__ */ r("div", { className:
|
|
73
|
+
] }) : /* @__PURE__ */ r("div", { className: v(t.productTile, C), ...B, children: [
|
|
74
74
|
/* @__PURE__ */ o(N, { src: f, alt: `${a} product image` }),
|
|
75
75
|
/* @__PURE__ */ r("div", { className: t.productData, children: [
|
|
76
76
|
/* @__PURE__ */ r("div", { className: t.topRow, children: [
|
|
@@ -90,13 +90,13 @@ function X({
|
|
|
90
90
|
{
|
|
91
91
|
availId: d,
|
|
92
92
|
availDescription: m,
|
|
93
|
-
contactHref:
|
|
94
|
-
contactLinkBehavior:
|
|
93
|
+
contactHref: p,
|
|
94
|
+
contactLinkBehavior: u
|
|
95
95
|
}
|
|
96
96
|
),
|
|
97
97
|
n && /* @__PURE__ */ o(I, { pricingLabel: _, price: n })
|
|
98
98
|
] }),
|
|
99
|
-
/* @__PURE__ */ o(b, { itemKey: i, onAdd:
|
|
99
|
+
/* @__PURE__ */ o(b, { itemKey: i, onAdd: z, className: t.addToCart, addButtonClassName: t.addToCartButton })
|
|
100
100
|
] }),
|
|
101
101
|
s && s.length > 0 && /* @__PURE__ */ o("ul", { className: t.attributeContainer, children: s.map((e) => /* @__PURE__ */ r("li", { children: [
|
|
102
102
|
/* @__PURE__ */ r(c, { size: "xs", weight: "light", children: [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Product as
|
|
1
|
+
import { Product as e } from "./Product.js";
|
|
2
2
|
const o = [
|
|
3
3
|
{ label: "Color", value: "Gray" },
|
|
4
4
|
{ label: "Brand", value: "Kason" },
|
|
@@ -13,7 +13,7 @@ const o = [
|
|
|
13
13
|
{ label: "Attribute", value: "Placeholder" }
|
|
14
14
|
], r = {
|
|
15
15
|
title: "Case Parts/Organisms/Product",
|
|
16
|
-
component:
|
|
16
|
+
component: e,
|
|
17
17
|
parameters: { layout: "centered" },
|
|
18
18
|
argTypes: {
|
|
19
19
|
productView: {
|
|
@@ -53,6 +53,7 @@ const o = [
|
|
|
53
53
|
itemKey: 101,
|
|
54
54
|
partNumber: "PN-44567",
|
|
55
55
|
productDescription: "Example Replacement Part Long Description",
|
|
56
|
+
// productHref: 'https://dev.caseparts.com/graphics/photos/R-23_IMG_2009.png',
|
|
56
57
|
productHref: "https://mobiledev.caseparts.com/part/1092-01/Kason-1092-Hydraulic-Door-Closer",
|
|
57
58
|
availId: "available",
|
|
58
59
|
availDescription: "In stock",
|
|
@@ -60,10 +61,11 @@ const o = [
|
|
|
60
61
|
contactLinkBehavior: "new-tab",
|
|
61
62
|
priceLabel: "List Price",
|
|
62
63
|
price: "$129.99",
|
|
63
|
-
imgSrc: "https://
|
|
64
|
+
imgSrc: "https://dev.caseparts.com/graphics/photos/R-23_IMG_2009.png",
|
|
65
|
+
// imgSrc: 'https://www.caseparts.com/Ortery/360/Optimized/1092-01_/1092-01_04.webp',
|
|
64
66
|
attributes: o,
|
|
65
|
-
onAddToCart: (t,
|
|
66
|
-
alert(`Add to cart (story) ${JSON.stringify({ itemKey: t, quantity:
|
|
67
|
+
onAddToCart: (t, a) => {
|
|
68
|
+
alert(`Add to cart (story) ${JSON.stringify({ itemKey: t, quantity: a })}`);
|
|
67
69
|
},
|
|
68
70
|
onClose: (t) => {
|
|
69
71
|
alert(`On close clicked ${t}`);
|