@caseparts-org/caseblocks 0.0.239 → 0.0.241
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/Availability.css +1 -1
- package/dist/assets/Product.css +1 -1
- package/dist/assets/SuggestionDropdown.css +1 -1
- package/dist/atoms/HighlightedText/HighlightedText.d.ts +3 -4
- package/dist/atoms/HighlightedText/HighlightedText.js +10 -10
- package/dist/atoms/HighlightedText/HighlightedText.stories.js +5 -4
- package/dist/molecules/Availability/Availability.js +44 -40
- package/dist/organisms/Product/Product.js +102 -102
- package/dist/organisms/SuggestionDropdown/SuggestionDropdown.js +47 -47
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._availability_1divs_1{font-style:italic;display:flex;align-items:center;gap:var(--spacing-spacing-4xs)}._pointer_1divs_8{cursor:pointer}._tooltip_1divs_12{background-color:#fafafa}._tooltipContent_1divs_16{max-width:370px}._tooltipContent_1divs_16>ul{padding:0;margin:var(--spacing-spacing-2xs) 0}._tooltipContent_1divs_16 li{list-style:none}._available_1divs_29,._in-stock_1divs_29{color:var(--color-alerts-success)}._limited_1divs_32{color:var(--color-alerts-warning)}._discontinued_1divs_35{color:var(--color-alerts-error-warning)}
|
package/dist/assets/Product.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._productCard_h4utb_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_h4utb_3._sm_h4utb_16{width:180px;height:230px}._productCard_h4utb_3>img{object-fit:contain;flex-shrink:0;margin:0 auto}._productCard_h4utb_3 ._productInformation_h4utb_26{display:flex;flex-direction:column;align-items:flex-start;gap:2px;margin-top:auto}._productCard_h4utb_3 ._purchaseInformation_h4utb_33{display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;width:100%}._productCard_h4utb_3 ._addToCart_h4utb_41,._productCard_h4utb_3 ._addToCartButton_h4utb_44{width:100%}._productInformation_h4utb_26>a{font-weight:var(--font-weight-semibold);white-space:break-spaces;word-wrap:normal}._partNumber_h4utb_54{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-3xs)}._partNumberLabel_h4utb_61{color:var(--text-text-quaternary)}._productTile_h4utb_65{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_h4utb_65>img{object-fit:contain}._productTile_h4utb_65 ._productInformation_h4utb_26{display:flex;flex-direction:column;align-items:flex-start;gap:2px}._productTile_h4utb_65 ._productData_h4utb_92{display:flex;flex-direction:column;align-items:flex-start;width:100%;gap:var(--spacing-spacing-2xs)}._productTile_h4utb_65 ._purchase_h4utb_33{display:flex;flex-direction:row;align-items:flex-end;justify-content:space-between;width:100%}@media (max-width: 480px){._productTile_h4utb_65 ._purchase_h4utb_33{flex-direction:column;align-items:flex-start;gap:var(--spacing-spacing-3xs)}}._productTile_h4utb_65 ._purchaseInformation_h4utb_33{display:flex;flex-direction:column;align-items:flex-start;gap:var(--spacing-spacing-2xs)}@media (max-width: 480px){._productTile_h4utb_65 ._purchaseInformation_h4utb_33{flex-direction:row;align-items:flex-start;justify-content:space-between;width:100%;gap:0px}}._productTile_h4utb_65 ._attributeContainer_h4utb_129{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_h4utb_65 ._attributeContainer_h4utb_129{display:none}}._productTile_h4utb_65 ._attributeContainer_h4utb_129 li{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-3xs)}._productTile_h4utb_65 ._addToCart_h4utb_41{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-md)}@media (max-width: 480px){._productTile_h4utb_65 ._addToCart_h4utb_41{gap:var(--spacing-spacing-2xs);width:100%}}._productTile_h4utb_65 ._addToCartButton_h4utb_44{width:96px;font-size:var(--font-size-md);font-weight:var(--font-weight-semibold)}@media (max-width: 640px){._productTile_h4utb_65 ._addToCartButton_h4utb_44{width:100%}}._elevated_h4utb_177{border:1px solid var(--border-border-primary, #DFDFDF);box-shadow:2px 4px 12px #00000026}._noImage_h4utb_183 ._productInformation_h4utb_26{margin-top:0}._sm_h4utb_16{padding:var(--spacing-spacing-1xs)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._suggestionDropdown_2kbdw_1{display:flex;flex-direction:row;width:100%;border:1px solid;border-color:var(--color-neutrals-neutral-2);border-radius:var(--border-radius-sm);box-shadow:0 8px 24px #0f172a14;overflow:hidden}@media (max-width: 767px){._suggestionDropdown_2kbdw_1{flex-direction:column}}._leftColumn_2kbdw_31{display:flex;flex-direction:column;border-right:1px solid var(--border-border-primary);background-color:#fff;min-width:150px}@media (max-width: 767px){._leftColumn_2kbdw_31{border-right:0;border-bottom:1px solid var(--border-border-primary)}}._leftColumnFullWidth_2kbdw_55{flex:1}._suggestionSectionFullHeight_2kbdw_63{display:flex;flex:1}._rightColumn_2kbdw_73{display:flex;flex:1;flex-direction:column;gap:var(--spacing-spacing-1xs);padding:var(--spacing-spacing-default);background:var(--color-brand-primary-primary-pale-gray);min-width:250px}._categorySection_2kbdw_95{border-top:1px solid var(--border-border-primary)}._suggestions_2kbdw_101,._categories_2kbdw_103{display:flex;flex-direction:column;gap:0;padding:0}._suggestionsFullHeight_2kbdw_117{flex:1}._suggestions_2kbdw_101>:first-child,._categories_2kbdw_103>:first-child{padding-top:var(--spacing-spacing-default);padding-right:var(--spacing-spacing-default);padding-left:var(--spacing-spacing-default);padding-bottom:var(--spacing-spacing-2xs)}._suggestions_2kbdw_101>:last-child,._categories_2kbdw_103>:last-child{padding-bottom:var(--spacing-spacing-2xs)}._suggestionLink_2kbdw_149,._categoryLink_2kbdw_151{display:block;box-sizing:border-box;width:100%;padding:var(--spacing-spacing-2xs) var(--spacing-spacing-default);transition:background-color .3s ease-in}._suggestionLink_2kbdw_149:hover,._categoryLink_2kbdw_151:hover{text-decoration:none;background-color:var(--color-alerts-light-teal-blue)}._activeOption_2kbdw_181{background:var(--color-alerts-light-teal-blue)}._itemList_2kbdw_189{margin:0;padding:0;display:flex;flex-direction:column;gap:var(--spacing-spacing-2xs);width:100%}._item_2kbdw_189{display:flex;flex-direction:column;border:1px solid var(--border-border-primary);padding:var(--spacing-spacing-2xs);width:100%;background-color:#fff;transition:background-color .3s ease-in}._item_2kbdw_189:hover{background-color:var(--color-alerts-light-teal-blue)}._item_2kbdw_189>a:hover{text-decoration:none}._activeItem_2kbdw_243{border-color:var(--text-text-links);box-shadow:inset 0 0 0 1px var(--text-text-links)}._item_2kbdw_189 img{height:60px;width:60px}._item_2kbdw_189 a{display:flex;flex-direction:row;align-items:flex-start;gap:var(--spacing-spacing-2xs)}._itemInfo_2kbdw_277{display:grid;gap:var(--spacing-spacing-4xs)}._recentSearches_2kbdw_287{display:flex;flex-direction:column;background:var(--color-brand-primary-white);min-width:250px}._recentSearchesHeader_2kbdw_301{padding:var(--spacing-spacing-default) var(--spacing-spacing-default) var(--spacing-spacing-2xs)}._recentSearchesList_2kbdw_309{display:flex;flex-direction:column;gap:0;margin:0;padding:0}._recentSearch_2kbdw_287{display:flex;align-items:center;justify-content:space-between;gap:var(--spacing-spacing-2xs)}._recentSearchLink_2kbdw_339{display:flex;flex:1;min-width:0;align-items:center;padding:var(--spacing-spacing-2xs) var(--spacing-spacing-default)}._clearRecentSearch_2kbdw_355{display:flex;flex:0 0 auto;align-items:center;justify-content:center;padding:var(--spacing-spacing-2xs) var(--spacing-spacing-default);border:0;background:transparent;color:var(--text-text-primary);cursor:pointer}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface HighlightedTextProps {
|
|
1
|
+
import { TextProps } from '../Text/Text';
|
|
2
|
+
export interface HighlightedTextProps extends Omit<TextProps, "children" | "variant"> {
|
|
3
3
|
text: string;
|
|
4
|
-
size: TextSize;
|
|
5
4
|
highlight: string;
|
|
6
5
|
variant?: "bold" | "highlight" | "italic";
|
|
7
6
|
className?: string;
|
|
8
7
|
}
|
|
9
|
-
export declare function HighlightedText({ text,
|
|
8
|
+
export declare function HighlightedText({ text, highlight, variant, className, ...textProps }: HighlightedTextProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { jsx as g, jsxs as x } from "react/jsx-runtime";
|
|
2
2
|
import { c as T } from "../../clsx-OuTLNxxd.js";
|
|
3
|
-
import { Text as
|
|
4
|
-
import '../../assets/HighlightedText.css';const a = "_highlightedText_p19vf_1",
|
|
3
|
+
import { Text as c } from "../Text/Text.js";
|
|
4
|
+
import '../../assets/HighlightedText.css';const a = "_highlightedText_p19vf_1", o = {
|
|
5
5
|
highlightedText: a,
|
|
6
6
|
"highlightedText-bold": "_highlightedText-bold_p19vf_9",
|
|
7
7
|
"highlightedText-highlight": "_highlightedText-highlight_p19vf_17",
|
|
8
8
|
"highlightedText-italic": "_highlightedText-italic_p19vf_29"
|
|
9
9
|
};
|
|
10
|
-
function
|
|
11
|
-
const
|
|
12
|
-
if (!h ||
|
|
13
|
-
return /* @__PURE__ */ g(
|
|
14
|
-
const r =
|
|
15
|
-
return /* @__PURE__ */ x(
|
|
10
|
+
function p({ text: e, highlight: h, variant: d = "bold", className: i, ...l }) {
|
|
11
|
+
const t = e.toLowerCase().indexOf(h.toLowerCase());
|
|
12
|
+
if (!h || t === -1)
|
|
13
|
+
return /* @__PURE__ */ g(c, { className: i, ...l, children: e });
|
|
14
|
+
const r = e.slice(0, t), s = e.slice(t, t + h.length), n = e.slice(t + h.length);
|
|
15
|
+
return /* @__PURE__ */ x(c, { ...l, children: [
|
|
16
16
|
r,
|
|
17
|
-
/* @__PURE__ */ g("span", { className: T(
|
|
17
|
+
/* @__PURE__ */ g("span", { className: T(o.highlightedText, o[`highlightedText-${d}`], i), children: s }),
|
|
18
18
|
n
|
|
19
19
|
] });
|
|
20
20
|
}
|
|
21
21
|
export {
|
|
22
|
-
|
|
22
|
+
p as HighlightedText
|
|
23
23
|
};
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { HighlightedText as t } from "./HighlightedText.js";
|
|
2
|
-
const
|
|
2
|
+
const e = {
|
|
3
3
|
title: "Case Parts/Atoms/HighlightedText",
|
|
4
4
|
component: t,
|
|
5
5
|
parameters: {
|
|
6
6
|
layout: "centered"
|
|
7
7
|
},
|
|
8
8
|
tags: ["autodocs"]
|
|
9
|
-
},
|
|
9
|
+
}, i = {
|
|
10
10
|
args: {
|
|
11
11
|
text: "Thermostat",
|
|
12
12
|
size: "md",
|
|
13
|
+
weight: "regular",
|
|
13
14
|
highlight: "stat",
|
|
14
15
|
variant: "bold"
|
|
15
16
|
}
|
|
@@ -29,8 +30,8 @@ const i = {
|
|
|
29
30
|
}
|
|
30
31
|
};
|
|
31
32
|
export {
|
|
32
|
-
|
|
33
|
+
i as Bold,
|
|
33
34
|
s as Highlight,
|
|
34
35
|
h as Italic,
|
|
35
|
-
|
|
36
|
+
e as default
|
|
36
37
|
};
|
|
@@ -1,70 +1,74 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
3
|
-
import { Text as
|
|
4
|
-
import { Tooltip as
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { jsx as i, jsxs as o, Fragment as _ } from "react/jsx-runtime";
|
|
2
|
+
import { c as p } from "../../clsx-OuTLNxxd.js";
|
|
3
|
+
import { Text as s } from "../../atoms/Text/Text.js";
|
|
4
|
+
import { Tooltip as f } from "../../atoms/Tooltip/Tooltip.js";
|
|
5
|
+
import { Icon as b } from "../../atoms/Icon/Icon.js";
|
|
6
|
+
import '../../assets/Availability.css';const w = "_availability_1divs_1", C = "_pointer_1divs_8", g = "_tooltip_1divs_12", z = "_tooltipContent_1divs_16", k = "_available_1divs_29", x = "_limited_1divs_32", S = "_discontinued_1divs_35", l = {
|
|
7
|
+
availability: w,
|
|
8
|
+
pointer: C,
|
|
9
|
+
tooltip: g,
|
|
10
|
+
tooltipContent: z,
|
|
11
|
+
available: k,
|
|
12
|
+
"in-stock": "_in-stock_1divs_29",
|
|
13
|
+
limited: x,
|
|
13
14
|
discontinued: S
|
|
14
15
|
};
|
|
15
|
-
function
|
|
16
|
-
availId:
|
|
17
|
-
availDescription:
|
|
16
|
+
function D({
|
|
17
|
+
availId: t,
|
|
18
|
+
availDescription: e,
|
|
18
19
|
availClassName: d,
|
|
19
20
|
enableTooltip: n = !1,
|
|
20
|
-
inventory:
|
|
21
|
+
inventory: c
|
|
21
22
|
}) {
|
|
22
|
-
const
|
|
23
|
-
return
|
|
24
|
-
|
|
23
|
+
const a = n && c && t !== "not-found";
|
|
24
|
+
return a ? /* @__PURE__ */ i(
|
|
25
|
+
f,
|
|
25
26
|
{
|
|
26
27
|
closeDelay: 0,
|
|
27
28
|
openDelay: 250,
|
|
28
|
-
position: "
|
|
29
|
-
trigger:
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
position: "bottom center",
|
|
30
|
+
trigger: /* @__PURE__ */ o(s, { size: "xs", className: p(l.availability, l[t], a ? l.pointer : null, d), children: [
|
|
31
|
+
e,
|
|
32
|
+
/* @__PURE__ */ i(b, { iconKey: "fa-solid fa-chevron-down", size: "3xs" })
|
|
33
|
+
] }),
|
|
34
|
+
contentClassName: l.tooltip,
|
|
35
|
+
children: /* @__PURE__ */ i(T, { availabilityId: t, inventory: c })
|
|
32
36
|
}
|
|
33
|
-
) :
|
|
37
|
+
) : /* @__PURE__ */ i(s, { size: "xs", className: p(l.availability, l[t], a ? l.pointer : null, d), children: e });
|
|
34
38
|
}
|
|
35
|
-
function
|
|
36
|
-
var n,
|
|
37
|
-
const d = (((n =
|
|
38
|
-
if (
|
|
39
|
-
const
|
|
40
|
-
return /* @__PURE__ */ o("div", { className:
|
|
41
|
-
/* @__PURE__ */ o(
|
|
39
|
+
function T({ availabilityId: t, inventory: e }) {
|
|
40
|
+
var n, c, a, r, m, h;
|
|
41
|
+
const d = (((n = e == null ? void 0 : e.MPK) == null ? void 0 : n.Unreserved) ?? 0) + (((c = e == null ? void 0 : e.SEA) == null ? void 0 : c.Unreserved) ?? 0) + (((a = e == null ? void 0 : e.STL) == null ? void 0 : a.Unreserved) ?? 0);
|
|
42
|
+
if (t === "in-stock" || t === "limited") {
|
|
43
|
+
const u = t === "in-stock" ? "Additional quantity will be backordered. If you need more than we have at any one warehouse, a CSR will contact you with options." : "Once our stock is depleted, this item will no longer be available.";
|
|
44
|
+
return /* @__PURE__ */ o("div", { className: l.tooltipContent, children: [
|
|
45
|
+
/* @__PURE__ */ o(s, { size: "sm", children: [
|
|
42
46
|
"We currently have (",
|
|
43
47
|
d,
|
|
44
48
|
") in stock across our three warehouses:"
|
|
45
49
|
] }),
|
|
46
50
|
/* @__PURE__ */ o("ul", { children: [
|
|
47
|
-
/* @__PURE__ */
|
|
51
|
+
/* @__PURE__ */ i("li", { children: /* @__PURE__ */ o(s, { size: "sm", children: [
|
|
48
52
|
"(",
|
|
49
|
-
((r =
|
|
53
|
+
((r = e == null ? void 0 : e.MPK) == null ? void 0 : r.Unreserved) ?? 0,
|
|
50
54
|
") Los Angeles"
|
|
51
55
|
] }) }),
|
|
52
|
-
/* @__PURE__ */
|
|
56
|
+
/* @__PURE__ */ i("li", { children: /* @__PURE__ */ o(s, { size: "sm", children: [
|
|
53
57
|
"(",
|
|
54
|
-
((
|
|
58
|
+
((m = e == null ? void 0 : e.STL) == null ? void 0 : m.Unreserved) ?? 0,
|
|
55
59
|
") St. Louis"
|
|
56
60
|
] }) }),
|
|
57
|
-
/* @__PURE__ */
|
|
61
|
+
/* @__PURE__ */ i("li", { children: /* @__PURE__ */ o(s, { size: "sm", children: [
|
|
58
62
|
"(",
|
|
59
|
-
((
|
|
63
|
+
((h = e == null ? void 0 : e.SEA) == null ? void 0 : h.Unreserved) ?? 0,
|
|
60
64
|
") Seattle"
|
|
61
65
|
] }) })
|
|
62
66
|
] }),
|
|
63
|
-
/* @__PURE__ */
|
|
67
|
+
/* @__PURE__ */ i(s, { size: "sm", children: u })
|
|
64
68
|
] });
|
|
65
69
|
}
|
|
66
|
-
return
|
|
70
|
+
return t === "available" ? /* @__PURE__ */ i("div", { className: l.tooltipContent, children: /* @__PURE__ */ i(s, { size: "sm", children: "While this part is not currently in stock, we will arrange to get it to you asap, and your CSR will keep you advised of the lead time." }) }) : t === "discontinued" ? /* @__PURE__ */ i("div", { className: l.tooltipContent, children: /* @__PURE__ */ i(s, { size: "sm", children: "Unfortunately, this item is no longer available to purchase." }) }) : /* @__PURE__ */ i(_, {});
|
|
67
71
|
}
|
|
68
72
|
export {
|
|
69
|
-
|
|
73
|
+
D as Availability
|
|
70
74
|
};
|
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
import { jsxs as e, jsx as
|
|
2
|
-
import { Image as
|
|
3
|
-
import { Link as
|
|
1
|
+
import { jsxs as e, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { Image as P } from "../../atoms/Image/Image.js";
|
|
3
|
+
import { Link as j } from "../../atoms/Link/Link.js";
|
|
4
4
|
import { Text as n } from "../../atoms/Text/Text.js";
|
|
5
|
-
import { Availability as
|
|
6
|
-
import { Pricing as
|
|
7
|
-
import { AddToCart as
|
|
8
|
-
import { CustomWizardBadge as
|
|
9
|
-
import { c as
|
|
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
|
-
productData:
|
|
21
|
-
purchase:
|
|
22
|
-
attributeContainer:
|
|
23
|
-
elevated:
|
|
24
|
-
noImage:
|
|
5
|
+
import { Availability as D } from "../../molecules/Availability/Availability.js";
|
|
6
|
+
import { Pricing as V } from "../../molecules/Pricing/Pricing.js";
|
|
7
|
+
import { AddToCart as E } from "../../molecules/AddToCart/AddToCart.js";
|
|
8
|
+
import { CustomWizardBadge as F } from "../../molecules/CustomWizardBadge/CustomWizardBadge.js";
|
|
9
|
+
import { c as G } from "../../clsx-OuTLNxxd.js";
|
|
10
|
+
import '../../assets/Product.css';const M = "_productCard_h4utb_3", O = "_sm_h4utb_16", R = "_productInformation_h4utb_26", X = "_purchaseInformation_h4utb_33", Y = "_addToCart_h4utb_41", Z = "_addToCartButton_h4utb_44", q = "_partNumber_h4utb_54", H = "_partNumberLabel_h4utb_61", y = "_productTile_h4utb_65", L = "_productData_h4utb_92", K = "_purchase_h4utb_33", Q = "_attributeContainer_h4utb_129", S = "_elevated_h4utb_177", U = "_noImage_h4utb_183", t = {
|
|
11
|
+
productCard: M,
|
|
12
|
+
sm: O,
|
|
13
|
+
productInformation: R,
|
|
14
|
+
purchaseInformation: X,
|
|
15
|
+
addToCart: Y,
|
|
16
|
+
addToCartButton: Z,
|
|
17
|
+
partNumber: q,
|
|
18
|
+
partNumberLabel: H,
|
|
19
|
+
productTile: y,
|
|
20
|
+
productData: L,
|
|
21
|
+
purchase: K,
|
|
22
|
+
attributeContainer: Q,
|
|
23
|
+
elevated: S,
|
|
24
|
+
noImage: U
|
|
25
25
|
};
|
|
26
|
-
function
|
|
27
|
-
productView:
|
|
26
|
+
function nt({
|
|
27
|
+
productView: J,
|
|
28
28
|
itemKey: c,
|
|
29
29
|
partNumber: s,
|
|
30
|
-
productDescription:
|
|
30
|
+
productDescription: i,
|
|
31
31
|
availDescription: f,
|
|
32
32
|
availId: m,
|
|
33
33
|
inventory: N,
|
|
34
34
|
productHref: T,
|
|
35
|
-
customWizardUrl:
|
|
36
|
-
customWizardText:
|
|
37
|
-
customWizardColorToken:
|
|
38
|
-
priceLabel:
|
|
39
|
-
price:
|
|
35
|
+
customWizardUrl: u,
|
|
36
|
+
customWizardText: C = "Customize",
|
|
37
|
+
customWizardColorToken: g = "secondary",
|
|
38
|
+
priceLabel: v,
|
|
39
|
+
price: l,
|
|
40
40
|
imgSrc: o,
|
|
41
41
|
attributes: _,
|
|
42
|
-
className:
|
|
43
|
-
onAddToCart:
|
|
44
|
-
flat:
|
|
45
|
-
size:
|
|
46
|
-
showQuantity:
|
|
42
|
+
className: x,
|
|
43
|
+
onAddToCart: I,
|
|
44
|
+
flat: B,
|
|
45
|
+
size: r = "md",
|
|
46
|
+
showQuantity: b = !0,
|
|
47
47
|
onLinkClicked: d,
|
|
48
|
-
requiresUnitDetails:
|
|
49
|
-
maxQuantity:
|
|
50
|
-
|
|
48
|
+
requiresUnitDetails: A = !1,
|
|
49
|
+
maxQuantity: w,
|
|
50
|
+
...$
|
|
51
51
|
}) {
|
|
52
|
-
const
|
|
53
|
-
return
|
|
52
|
+
const h = r === "sm" ? "xs" : "sm";
|
|
53
|
+
return J === "Card" ? /* @__PURE__ */ e(
|
|
54
54
|
"div",
|
|
55
55
|
{
|
|
56
|
-
className:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
!
|
|
61
|
-
!o &&
|
|
56
|
+
className: G(
|
|
57
|
+
t.productCard,
|
|
58
|
+
r && t[r],
|
|
59
|
+
x,
|
|
60
|
+
!B && t.elevated,
|
|
61
|
+
!o && t.noImage
|
|
62
62
|
),
|
|
63
|
-
|
|
63
|
+
...$,
|
|
64
64
|
children: [
|
|
65
|
-
|
|
66
|
-
o && /* @__PURE__ */
|
|
67
|
-
|
|
65
|
+
u && /* @__PURE__ */ a(F, { href: u, text: C, colorToken: g }),
|
|
66
|
+
o && /* @__PURE__ */ a(
|
|
67
|
+
P,
|
|
68
68
|
{
|
|
69
69
|
src: o,
|
|
70
70
|
alt: `${s} product image`,
|
|
71
|
-
height:
|
|
72
|
-
width:
|
|
71
|
+
height: r === "sm" ? 78 : 96,
|
|
72
|
+
width: r === "sm" ? 78 : 96
|
|
73
73
|
}
|
|
74
74
|
),
|
|
75
|
-
/* @__PURE__ */ e("div", { className:
|
|
76
|
-
/* @__PURE__ */
|
|
77
|
-
/* @__PURE__ */ e("div", { className:
|
|
78
|
-
/* @__PURE__ */
|
|
79
|
-
/* @__PURE__ */
|
|
75
|
+
/* @__PURE__ */ e("div", { className: t.productInformation, children: [
|
|
76
|
+
/* @__PURE__ */ a(j, { onClick: () => d == null ? void 0 : d(c), size: r, href: T || "#", children: i }),
|
|
77
|
+
/* @__PURE__ */ e("div", { className: t.partNumber, children: [
|
|
78
|
+
/* @__PURE__ */ a(n, { size: h, className: t.partNumberLabel, children: "Part #" }),
|
|
79
|
+
/* @__PURE__ */ a(n, { size: h, weight: "semibold", children: s })
|
|
80
80
|
] })
|
|
81
81
|
] }),
|
|
82
|
-
/* @__PURE__ */ e("div", { className:
|
|
83
|
-
m && /* @__PURE__ */
|
|
84
|
-
|
|
82
|
+
/* @__PURE__ */ e("div", { className: t.purchaseInformation, children: [
|
|
83
|
+
m && /* @__PURE__ */ a(
|
|
84
|
+
D,
|
|
85
85
|
{
|
|
86
86
|
availId: m,
|
|
87
87
|
availDescription: f,
|
|
@@ -89,55 +89,55 @@ function nr({
|
|
|
89
89
|
enableTooltip: !0
|
|
90
90
|
}
|
|
91
91
|
),
|
|
92
|
-
|
|
92
|
+
l && /* @__PURE__ */ a(V, { pricingLabel: v, price: l })
|
|
93
93
|
] }),
|
|
94
|
-
/* @__PURE__ */
|
|
95
|
-
|
|
94
|
+
/* @__PURE__ */ a(
|
|
95
|
+
E,
|
|
96
96
|
{
|
|
97
97
|
itemKey: c,
|
|
98
|
-
onAdd:
|
|
99
|
-
max:
|
|
100
|
-
className:
|
|
101
|
-
addButtonClassName:
|
|
102
|
-
addButtonVariant:
|
|
103
|
-
size:
|
|
98
|
+
onAdd: I,
|
|
99
|
+
max: w,
|
|
100
|
+
className: t.addToCart,
|
|
101
|
+
addButtonClassName: t.addToCartButton,
|
|
102
|
+
addButtonVariant: b ? "cta-primary" : "secondary",
|
|
103
|
+
size: r,
|
|
104
104
|
buttonDoneText: "",
|
|
105
|
-
buttonText:
|
|
106
|
-
showQuantity:
|
|
107
|
-
requiresUnitDetails:
|
|
105
|
+
buttonText: b ? "Add" : "Add to Cart",
|
|
106
|
+
showQuantity: b,
|
|
107
|
+
requiresUnitDetails: A
|
|
108
108
|
}
|
|
109
109
|
)
|
|
110
110
|
]
|
|
111
111
|
}
|
|
112
|
-
) : /* @__PURE__ */ e("div", { className:
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
!
|
|
117
|
-
!o &&
|
|
118
|
-
),
|
|
119
|
-
|
|
120
|
-
o && /* @__PURE__ */
|
|
121
|
-
|
|
112
|
+
) : /* @__PURE__ */ e("div", { className: G(
|
|
113
|
+
t.productTile,
|
|
114
|
+
x,
|
|
115
|
+
r && t[r],
|
|
116
|
+
!B && t.elevated,
|
|
117
|
+
!o && t.noImage
|
|
118
|
+
), ...$, children: [
|
|
119
|
+
u && /* @__PURE__ */ a(F, { href: u, text: C, colorToken: g }),
|
|
120
|
+
o && /* @__PURE__ */ a(
|
|
121
|
+
P,
|
|
122
122
|
{
|
|
123
123
|
src: o,
|
|
124
124
|
alt: `${s} product image`,
|
|
125
|
-
height:
|
|
126
|
-
width:
|
|
125
|
+
height: r === "sm" ? 86 : 108,
|
|
126
|
+
width: r === "sm" ? 86 : 108
|
|
127
127
|
}
|
|
128
128
|
),
|
|
129
|
-
/* @__PURE__ */ e("div", { className:
|
|
130
|
-
/* @__PURE__ */ e("div", { className:
|
|
131
|
-
/* @__PURE__ */
|
|
132
|
-
/* @__PURE__ */ e("div", { className:
|
|
133
|
-
/* @__PURE__ */
|
|
134
|
-
/* @__PURE__ */
|
|
129
|
+
/* @__PURE__ */ e("div", { className: t.productData, children: [
|
|
130
|
+
/* @__PURE__ */ e("div", { className: t.productInformation, children: [
|
|
131
|
+
/* @__PURE__ */ a(j, { onClick: () => d == null ? void 0 : d(c), size: r, href: T || "#", children: i }),
|
|
132
|
+
/* @__PURE__ */ e("div", { className: t.partNumber, children: [
|
|
133
|
+
/* @__PURE__ */ a(n, { size: h, className: t.partNumberLabel, children: "Part #" }),
|
|
134
|
+
/* @__PURE__ */ a(n, { size: h, weight: "semibold", children: s })
|
|
135
135
|
] })
|
|
136
136
|
] }),
|
|
137
|
-
/* @__PURE__ */ e("div", { className:
|
|
138
|
-
/* @__PURE__ */ e("div", { className:
|
|
139
|
-
m && /* @__PURE__ */
|
|
140
|
-
|
|
137
|
+
/* @__PURE__ */ e("div", { className: t.purchase, children: [
|
|
138
|
+
/* @__PURE__ */ e("div", { className: t.purchaseInformation, children: [
|
|
139
|
+
m && /* @__PURE__ */ a(
|
|
140
|
+
D,
|
|
141
141
|
{
|
|
142
142
|
availId: m,
|
|
143
143
|
availDescription: f,
|
|
@@ -145,20 +145,20 @@ function nr({
|
|
|
145
145
|
enableTooltip: !0
|
|
146
146
|
}
|
|
147
147
|
),
|
|
148
|
-
|
|
148
|
+
l && /* @__PURE__ */ a(V, { pricingLabel: v, price: l })
|
|
149
149
|
] }),
|
|
150
|
-
/* @__PURE__ */
|
|
150
|
+
/* @__PURE__ */ a(E, { size: r, itemKey: c, onAdd: I, max: w, className: t.addToCart, addButtonClassName: t.addToCartButton, requiresUnitDetails: A })
|
|
151
151
|
] }),
|
|
152
|
-
_ && _.length > 0 && /* @__PURE__ */
|
|
152
|
+
_ && _.length > 0 && /* @__PURE__ */ a("ul", { className: t.attributeContainer, children: _.map((p) => /* @__PURE__ */ e("li", { children: [
|
|
153
153
|
/* @__PURE__ */ e(n, { size: "xs", weight: "light", children: [
|
|
154
|
-
|
|
154
|
+
p.label,
|
|
155
155
|
":"
|
|
156
156
|
] }),
|
|
157
|
-
/* @__PURE__ */
|
|
158
|
-
] }, `${
|
|
157
|
+
/* @__PURE__ */ a(n, { size: "xs", weight: "semibold", children: p.value })
|
|
158
|
+
] }, `${p.label}.${p.value}`)) })
|
|
159
159
|
] })
|
|
160
160
|
] });
|
|
161
161
|
}
|
|
162
162
|
export {
|
|
163
|
-
|
|
163
|
+
nt as Product
|
|
164
164
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { jsxs as o, jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { Text as h } from "../../atoms/Text/Text.js";
|
|
3
|
-
import { Link as
|
|
4
|
-
import { Icon as
|
|
3
|
+
import { Link as m } from "../../atoms/Link/Link.js";
|
|
4
|
+
import { Icon as k } from "../../atoms/Icon/Icon.js";
|
|
5
5
|
import { c as r } from "../../clsx-OuTLNxxd.js";
|
|
6
|
-
import { Image as
|
|
7
|
-
import '../../assets/SuggestionDropdown.css';const
|
|
8
|
-
suggestionDropdown:
|
|
9
|
-
leftColumn:
|
|
10
|
-
leftColumnFullWidth:
|
|
11
|
-
suggestionSectionFullHeight:
|
|
12
|
-
rightColumn:
|
|
13
|
-
categorySection:
|
|
14
|
-
suggestions:
|
|
15
|
-
categories:
|
|
16
|
-
suggestionsFullHeight:
|
|
17
|
-
suggestionLink:
|
|
6
|
+
import { Image as p } from "../../atoms/Image/Image.js";
|
|
7
|
+
import '../../assets/SuggestionDropdown.css';const L = "_suggestionDropdown_2kbdw_1", N = "_leftColumn_2kbdw_31", v = "_leftColumnFullWidth_2kbdw_55", y = "_suggestionSectionFullHeight_2kbdw_63", F = "_rightColumn_2kbdw_73", H = "_categorySection_2kbdw_95", $ = "_suggestions_2kbdw_101", z = "_categories_2kbdw_103", D = "_suggestionsFullHeight_2kbdw_117", T = "_suggestionLink_2kbdw_149", q = "_categoryLink_2kbdw_151", W = "_activeOption_2kbdw_181", j = "_itemList_2kbdw_189", M = "_item_2kbdw_189", O = "_activeItem_2kbdw_243", S = "_itemInfo_2kbdw_277", K = "_recentSearches_2kbdw_287", R = "_recentSearchesHeader_2kbdw_301", x = "_recentSearchesList_2kbdw_309", A = "_recentSearch_2kbdw_287", B = "_recentSearchLink_2kbdw_339", E = "_clearRecentSearch_2kbdw_355", t = {
|
|
8
|
+
suggestionDropdown: L,
|
|
9
|
+
leftColumn: N,
|
|
10
|
+
leftColumnFullWidth: v,
|
|
11
|
+
suggestionSectionFullHeight: y,
|
|
12
|
+
rightColumn: F,
|
|
13
|
+
categorySection: H,
|
|
14
|
+
suggestions: $,
|
|
15
|
+
categories: z,
|
|
16
|
+
suggestionsFullHeight: D,
|
|
17
|
+
suggestionLink: T,
|
|
18
18
|
categoryLink: q,
|
|
19
19
|
activeOption: W,
|
|
20
20
|
itemList: j,
|
|
@@ -23,43 +23,43 @@ import '../../assets/SuggestionDropdown.css';const v = "_suggestionDropdown_1udz
|
|
|
23
23
|
itemInfo: S,
|
|
24
24
|
recentSearches: K,
|
|
25
25
|
recentSearchesHeader: R,
|
|
26
|
-
recentSearchesList:
|
|
27
|
-
recentSearch:
|
|
28
|
-
recentSearchLink:
|
|
29
|
-
clearRecentSearch:
|
|
26
|
+
recentSearchesList: x,
|
|
27
|
+
recentSearch: A,
|
|
28
|
+
recentSearchLink: B,
|
|
29
|
+
clearRecentSearch: E
|
|
30
30
|
};
|
|
31
|
-
function
|
|
31
|
+
function Y({
|
|
32
32
|
terms: n,
|
|
33
33
|
categories: c,
|
|
34
|
-
items:
|
|
35
|
-
view:
|
|
36
|
-
recentSearches:
|
|
34
|
+
items: u,
|
|
35
|
+
view: f = "suggestions",
|
|
36
|
+
recentSearches: d = [],
|
|
37
37
|
onClearRecentSearch: g,
|
|
38
38
|
onSuggestionClick: l,
|
|
39
39
|
activeOptionIndex: a = -1,
|
|
40
|
-
optionIdPrefix:
|
|
41
|
-
onKeyDown:
|
|
42
|
-
className:
|
|
40
|
+
optionIdPrefix: _,
|
|
41
|
+
onKeyDown: w,
|
|
42
|
+
className: b
|
|
43
43
|
}) {
|
|
44
|
-
return
|
|
44
|
+
return f === "recent-searches" ? /* @__PURE__ */ o(
|
|
45
45
|
"div",
|
|
46
46
|
{
|
|
47
|
-
id:
|
|
47
|
+
id: _,
|
|
48
48
|
role: "listbox",
|
|
49
|
-
className: r(t.suggestionDropdown, t.recentSearches,
|
|
50
|
-
onKeyDown:
|
|
49
|
+
className: r(t.suggestionDropdown, t.recentSearches, b),
|
|
50
|
+
onKeyDown: w,
|
|
51
51
|
onMouseDown: (e) => e.preventDefault(),
|
|
52
52
|
children: [
|
|
53
53
|
/* @__PURE__ */ s("div", { className: t.recentSearchesHeader, children: /* @__PURE__ */ s(h, { size: "xxs", colorToken: "quaternary", children: "Recent Searches" }) }),
|
|
54
|
-
/* @__PURE__ */ s("ol", { className: t.recentSearchesList, children:
|
|
54
|
+
/* @__PURE__ */ s("ol", { className: t.recentSearchesList, children: d.map((e) => /* @__PURE__ */ o("li", { className: t.recentSearch, children: [
|
|
55
55
|
/* @__PURE__ */ s(
|
|
56
|
-
|
|
56
|
+
m,
|
|
57
57
|
{
|
|
58
58
|
href: e.url,
|
|
59
|
-
id: `${
|
|
59
|
+
id: `${_}-${d.indexOf(e)}`,
|
|
60
60
|
role: "option",
|
|
61
|
-
"aria-selected": a ===
|
|
62
|
-
className: r(t.recentSearchLink, { [t.activeOption]: a ===
|
|
61
|
+
"aria-selected": a === d.indexOf(e),
|
|
62
|
+
className: r(t.recentSearchLink, { [t.activeOption]: a === d.indexOf(e) }),
|
|
63
63
|
onClick: () => l == null ? void 0 : l(e),
|
|
64
64
|
children: /* @__PURE__ */ s(h, { size: "sm", children: e.term })
|
|
65
65
|
}
|
|
@@ -71,22 +71,22 @@ function Z({
|
|
|
71
71
|
className: t.clearRecentSearch,
|
|
72
72
|
"aria-label": `Clear recent search: ${e.term}`,
|
|
73
73
|
onClick: () => g == null ? void 0 : g(e),
|
|
74
|
-
children: /* @__PURE__ */ s(
|
|
74
|
+
children: /* @__PURE__ */ s(k, { iconKey: "fa-regular fa-xmark", size: "sm" })
|
|
75
75
|
}
|
|
76
76
|
)
|
|
77
77
|
] }, e.url)) })
|
|
78
78
|
]
|
|
79
79
|
}
|
|
80
|
-
) : /* @__PURE__ */ o("div", { id:
|
|
81
|
-
(n.length > 0 || c.length > 0) && /* @__PURE__ */ o("div", { className: r(t.leftColumn, { [t.leftColumnFullWidth]:
|
|
80
|
+
) : /* @__PURE__ */ o("div", { id: _, role: "listbox", className: r(t.suggestionDropdown, b), onKeyDown: w, onMouseDown: (e) => e.preventDefault(), children: [
|
|
81
|
+
(n.length > 0 || c.length > 0) && /* @__PURE__ */ o("div", { className: r(t.leftColumn, { [t.leftColumnFullWidth]: u.length === 0 }), children: [
|
|
82
82
|
n.length > 0 && /* @__PURE__ */ s("div", { className: r(t.suggestionSection, { [t.suggestionSectionFullHeight]: c.length === 0 }), children: /* @__PURE__ */ o("div", { className: r(t.suggestions, { [t.suggestionsFullHeight]: c.length === 0 }), children: [
|
|
83
83
|
/* @__PURE__ */ s(h, { size: "xxs", colorToken: "quaternary", children: "Suggestions" }),
|
|
84
84
|
n.map(
|
|
85
85
|
(e, i) => /* @__PURE__ */ s(h, { size: "sm", children: /* @__PURE__ */ s(
|
|
86
|
-
|
|
86
|
+
m,
|
|
87
87
|
{
|
|
88
88
|
href: e.url,
|
|
89
|
-
id: `${
|
|
89
|
+
id: `${_}-${i}`,
|
|
90
90
|
role: "option",
|
|
91
91
|
"aria-selected": a === i,
|
|
92
92
|
className: r(t.suggestionLink, { [t.activeOption]: a === i }),
|
|
@@ -100,10 +100,10 @@ function Z({
|
|
|
100
100
|
/* @__PURE__ */ s(h, { size: "xxs", colorToken: "quaternary", children: "Categories" }),
|
|
101
101
|
c.map(
|
|
102
102
|
(e, i) => /* @__PURE__ */ s(h, { size: "sm", children: /* @__PURE__ */ s(
|
|
103
|
-
|
|
103
|
+
m,
|
|
104
104
|
{
|
|
105
105
|
href: e.url,
|
|
106
|
-
id: `${
|
|
106
|
+
id: `${_}-${n.length + i}`,
|
|
107
107
|
role: "option",
|
|
108
108
|
"aria-selected": a === n.length + i,
|
|
109
109
|
className: r(t.categoryLink, { [t.activeOption]: a === n.length + i }),
|
|
@@ -114,20 +114,20 @@ function Z({
|
|
|
114
114
|
)
|
|
115
115
|
] }) })
|
|
116
116
|
] }),
|
|
117
|
-
|
|
117
|
+
u.length > 0 && /* @__PURE__ */ s("div", { className: t.rightColumn, children: /* @__PURE__ */ s("ol", { className: t.itemList, children: u.map(
|
|
118
118
|
(e, i) => /* @__PURE__ */ s("li", { className: r(t.item, { [t.activeItem]: a === n.length + c.length + i }), children: /* @__PURE__ */ o(
|
|
119
|
-
|
|
119
|
+
m,
|
|
120
120
|
{
|
|
121
121
|
href: e.url,
|
|
122
|
-
id: `${
|
|
122
|
+
id: `${_}-${n.length + c.length + i}`,
|
|
123
123
|
role: "option",
|
|
124
124
|
"aria-selected": a === n.length + c.length + i,
|
|
125
125
|
onClick: () => l == null ? void 0 : l(),
|
|
126
126
|
children: [
|
|
127
|
-
/* @__PURE__ */ s(
|
|
127
|
+
/* @__PURE__ */ s(p, { src: e.image, alt: `${e.description} product image`, height: 72, width: 72 }),
|
|
128
128
|
/* @__PURE__ */ o("div", { className: t.itemInfo, children: [
|
|
129
129
|
/* @__PURE__ */ s(h, { size: "sm", children: e.description }),
|
|
130
|
-
/* @__PURE__ */ s(h, { size: "
|
|
130
|
+
/* @__PURE__ */ s(h, { size: "xs", colorToken: "quaternary", children: e.itemId })
|
|
131
131
|
] })
|
|
132
132
|
]
|
|
133
133
|
}
|
|
@@ -136,5 +136,5 @@ function Z({
|
|
|
136
136
|
] });
|
|
137
137
|
}
|
|
138
138
|
export {
|
|
139
|
-
|
|
139
|
+
Y as SuggestionDropdown
|
|
140
140
|
};
|