@caseparts-org/caseblocks 0.0.269 → 0.0.271
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.
|
@@ -5,13 +5,13 @@ import { Tooltip as k } from "../../atoms/Tooltip/Tooltip.js";
|
|
|
5
5
|
import { Icon as l } from "../../atoms/Icon/Icon.js";
|
|
6
6
|
import { Disclaimer as n } from "../Disclaimer/Disclaimer.js";
|
|
7
7
|
import { Pill as w } from "../../atoms/Pill/Pill.js";
|
|
8
|
-
import '../../assets/Availability.css';const x = "_availability_4sun9_1", g = "_pointer_4sun9_8",
|
|
8
|
+
import '../../assets/Availability.css';const x = "_availability_4sun9_1", g = "_pointer_4sun9_8", b = "_tooltip_4sun9_12", y = "_tooltipContent_4sun9_20", v = "_tooltipHeader_4sun9_24", T = "_tooltipInfo_4sun9_33", z = "_tooltipTitle_4sun9_38", C = "_tooltipHeaderIcon_4sun9_42", H = "_tooltipHeaderAlert_4sun9_53", A = "_warehouseList_4sun9_67", K = "_warehouseName_4sun9_82", L = "_fulfillmentNotice_4sun9_93", S = "_available_4sun9_98", D = "_limited_4sun9_101", I = "_discontinued_4sun9_104", o = {
|
|
9
9
|
availability: x,
|
|
10
10
|
pointer: g,
|
|
11
|
-
tooltip:
|
|
12
|
-
tooltipContent:
|
|
13
|
-
tooltipHeader:
|
|
14
|
-
tooltipInfo:
|
|
11
|
+
tooltip: b,
|
|
12
|
+
tooltipContent: y,
|
|
13
|
+
tooltipHeader: v,
|
|
14
|
+
tooltipInfo: T,
|
|
15
15
|
tooltipTitle: z,
|
|
16
16
|
tooltipHeaderIcon: C,
|
|
17
17
|
tooltipHeaderAlert: H,
|
|
@@ -26,29 +26,29 @@ import '../../assets/Availability.css';const x = "_availability_4sun9_1", g = "_
|
|
|
26
26
|
function F({
|
|
27
27
|
availId: i,
|
|
28
28
|
availDescription: r,
|
|
29
|
-
availClassName:
|
|
29
|
+
availClassName: a,
|
|
30
30
|
enableTooltip: m = !1,
|
|
31
|
-
inventory:
|
|
31
|
+
inventory: c
|
|
32
32
|
}) {
|
|
33
|
-
const
|
|
34
|
-
return
|
|
33
|
+
const d = m && c && i !== "not-found";
|
|
34
|
+
return d ? /* @__PURE__ */ e(
|
|
35
35
|
k,
|
|
36
36
|
{
|
|
37
37
|
closeDelay: 0,
|
|
38
38
|
openDelay: 250,
|
|
39
39
|
position: "bottom center",
|
|
40
|
-
trigger: /* @__PURE__ */ t(s, { size: "xs", className: f(o.availability, o[i],
|
|
40
|
+
trigger: /* @__PURE__ */ t(s, { size: "xs", className: f(o.availability, o[i], d ? o.pointer : null, a), children: [
|
|
41
41
|
r,
|
|
42
42
|
/* @__PURE__ */ e(l, { iconKey: "fa-solid fa-chevron-down", size: "3xs" })
|
|
43
43
|
] }),
|
|
44
44
|
contentClassName: o.tooltip,
|
|
45
|
-
children: /* @__PURE__ */ e(P, { availabilityId: i, inventory:
|
|
45
|
+
children: /* @__PURE__ */ e(P, { availabilityId: i, inventory: c })
|
|
46
46
|
}
|
|
47
|
-
) : /* @__PURE__ */ e(s, { size: "xs", className: f(o.availability, o[i],
|
|
47
|
+
) : /* @__PURE__ */ e(s, { size: "xs", className: f(o.availability, o[i], d ? o.pointer : null, a), children: r });
|
|
48
48
|
}
|
|
49
49
|
function P({ availabilityId: i, inventory: r }) {
|
|
50
50
|
var u, h, p;
|
|
51
|
-
const
|
|
51
|
+
const a = Math.max(0, ((u = r.MPK) == null ? void 0 : u.Unreserved) ?? 0), m = Math.max(0, ((h = r.SEA) == null ? void 0 : h.Unreserved) ?? 0), c = Math.max(0, ((p = r.STL) == null ? void 0 : p.Unreserved) ?? 0), d = a + m + c;
|
|
52
52
|
if (i === "in-stock" || i === "limited") {
|
|
53
53
|
const _ = i === "in-stock" ? "Additional quantity will be backordered. A customer service representative will contact you if fulfillment requires multiple warehouses." : "Once our stock is depleted, this item will no longer be available.";
|
|
54
54
|
return /* @__PURE__ */ t("div", { className: o.tooltipContent, children: [
|
|
@@ -56,7 +56,7 @@ function P({ availabilityId: i, inventory: r }) {
|
|
|
56
56
|
/* @__PURE__ */ e("span", { className: o.tooltipHeaderIcon, children: /* @__PURE__ */ e(l, { colorToken: i === "in-stock" ? "success" : "warning", iconKey: i === "in-stock" ? "fa-solid fa-box" : "fa-solid fa-triangle-exclamation", size: "xs" }) }),
|
|
57
57
|
/* @__PURE__ */ e("div", { className: o.tooltipTitle, children: /* @__PURE__ */ e(s, { size: "sm", weight: "semibold", children: i === "limited" ? "Limited stock across 3 warehouses" : "Available across 3 warehouses" }) }),
|
|
58
58
|
/* @__PURE__ */ t(w, { colorToken: i === "limited" ? "warning" : "success", weight: "semibold", children: [
|
|
59
|
-
|
|
59
|
+
d,
|
|
60
60
|
" total"
|
|
61
61
|
] })
|
|
62
62
|
] }),
|
|
@@ -66,14 +66,14 @@ function P({ availabilityId: i, inventory: r }) {
|
|
|
66
66
|
/* @__PURE__ */ e(l, { iconKey: "fa-solid fa-box", size: "xs" }),
|
|
67
67
|
"Los Angeles"
|
|
68
68
|
] }),
|
|
69
|
-
/* @__PURE__ */ e(s, { size: "sm", weight: "semibold", children:
|
|
69
|
+
/* @__PURE__ */ e(s, { size: "sm", weight: "semibold", children: a })
|
|
70
70
|
] }),
|
|
71
71
|
/* @__PURE__ */ t("li", { children: [
|
|
72
72
|
/* @__PURE__ */ t(s, { size: "sm", className: o.warehouseName, children: [
|
|
73
73
|
/* @__PURE__ */ e(l, { iconKey: "fa-solid fa-box", size: "xs" }),
|
|
74
74
|
"St. Louis"
|
|
75
75
|
] }),
|
|
76
|
-
/* @__PURE__ */ e(s, { size: "sm", weight: "semibold", children:
|
|
76
|
+
/* @__PURE__ */ e(s, { size: "sm", weight: "semibold", children: c })
|
|
77
77
|
] }),
|
|
78
78
|
/* @__PURE__ */ t("li", { children: [
|
|
79
79
|
/* @__PURE__ */ t(s, { size: "sm", className: o.warehouseName, children: [
|
|
@@ -85,7 +85,7 @@ function P({ availabilityId: i, inventory: r }) {
|
|
|
85
85
|
] }),
|
|
86
86
|
/* @__PURE__ */ e(n, { backgroundColorToken: i === "in-stock" ? "neutral" : "warning", layout: "stacked", className: o.fulfillmentNotice, children: /* @__PURE__ */ t(n.Content, { children: [
|
|
87
87
|
/* @__PURE__ */ e(n.Icon, { icon: i === "in-stock" ? "info" : "warning", size: "xs", colorToken: i === "in-stock" ? "secondary" : "warning" }),
|
|
88
|
-
/* @__PURE__ */ e(n.Primary, { children: i === "limited" ? "Available while supplies last" :
|
|
88
|
+
/* @__PURE__ */ e(n.Primary, { children: i === "limited" ? "Available while supplies last" : "Need more than what's available?" }),
|
|
89
89
|
/* @__PURE__ */ e(n.Subtext, { children: _ })
|
|
90
90
|
] }) })
|
|
91
91
|
] });
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import v from "react";
|
|
3
|
+
import { r as p } from "../../index-BkF-BQ3Q.js";
|
|
3
4
|
import { c as n } from "../../clsx-OuTLNxxd.js";
|
|
4
|
-
import { Text as
|
|
5
|
-
import { Icon as
|
|
6
|
-
import '../../assets/Modal.css';const
|
|
7
|
-
overlay:
|
|
8
|
-
container:
|
|
9
|
-
toolbar:
|
|
10
|
-
toolbarPlain:
|
|
11
|
-
headerGroup:
|
|
12
|
-
headerLeft:
|
|
13
|
-
headerRight:
|
|
14
|
-
closeButton:
|
|
15
|
-
content:
|
|
16
|
-
},
|
|
5
|
+
import { Text as g } from "../../atoms/Text/Text.js";
|
|
6
|
+
import { Icon as b } from "../../atoms/Icon/Icon.js";
|
|
7
|
+
import '../../assets/Modal.css';const y = "_overlay_1imlv_1", T = "_container_1imlv_11", x = "_toolbar_1imlv_30", z = "_toolbarPlain_1imlv_47", B = "_headerGroup_1imlv_52", M = "_headerLeft_1imlv_60", N = "_headerRight_1imlv_64", R = "_closeButton_1imlv_68", w = "_content_1imlv_87", r = {
|
|
8
|
+
overlay: y,
|
|
9
|
+
container: T,
|
|
10
|
+
toolbar: x,
|
|
11
|
+
toolbarPlain: z,
|
|
12
|
+
headerGroup: B,
|
|
13
|
+
headerLeft: M,
|
|
14
|
+
headerRight: N,
|
|
15
|
+
closeButton: R,
|
|
16
|
+
content: w
|
|
17
|
+
}, P = {
|
|
17
18
|
sm: "sm",
|
|
18
19
|
md: "md",
|
|
19
20
|
lg: "lg"
|
|
@@ -32,35 +33,46 @@ import '../../assets/Modal.css';const b = "_overlay_1imlv_1", y = "_container_1i
|
|
|
32
33
|
..._
|
|
33
34
|
}) => {
|
|
34
35
|
const c = v.useRef(!1);
|
|
35
|
-
if (!t) return null;
|
|
36
|
-
const
|
|
36
|
+
if (!t || typeof document > "u") return null;
|
|
37
|
+
const f = (i) => {
|
|
37
38
|
e && (c.current = i.target === i.currentTarget);
|
|
38
|
-
},
|
|
39
|
+
}, h = (i) => {
|
|
39
40
|
if (!e) {
|
|
40
41
|
c.current = !1;
|
|
41
42
|
return;
|
|
42
43
|
}
|
|
43
44
|
c.current && i.target === i.currentTarget && o(), c.current = !1;
|
|
44
45
|
};
|
|
45
|
-
return
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
46
|
+
return p.createPortal(
|
|
47
|
+
/* @__PURE__ */ a(
|
|
48
|
+
"div",
|
|
49
|
+
{
|
|
50
|
+
className: n(r.overlay),
|
|
51
|
+
onMouseDown: f,
|
|
52
|
+
onMouseUp: h,
|
|
53
|
+
children: /* @__PURE__ */ a(
|
|
54
|
+
"div",
|
|
55
|
+
{
|
|
56
|
+
className: n(r.container, s),
|
|
57
|
+
role: "dialog",
|
|
58
|
+
"aria-modal": "true",
|
|
59
|
+
style: { ...m, "--modal-width": l },
|
|
60
|
+
..._,
|
|
61
|
+
children: u
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
}
|
|
65
|
+
),
|
|
66
|
+
document.body
|
|
67
|
+
);
|
|
68
|
+
}, D = ({ variant: t = "standard", className: o, children: e, ...l }) => /* @__PURE__ */ a(
|
|
57
69
|
"div",
|
|
58
70
|
{
|
|
59
71
|
className: n(r.toolbar, t === "plain" && r.toolbarPlain, o),
|
|
60
72
|
...l,
|
|
61
73
|
children: e
|
|
62
74
|
}
|
|
63
|
-
),
|
|
75
|
+
), G = ({
|
|
64
76
|
align: t = "left",
|
|
65
77
|
size: o = "md",
|
|
66
78
|
variant: e = "display",
|
|
@@ -74,13 +86,13 @@ import '../../assets/Modal.css';const b = "_overlay_1imlv_1", y = "_container_1i
|
|
|
74
86
|
{
|
|
75
87
|
className: n(r.headerGroup, t === "left" ? r.headerLeft : r.headerRight, l),
|
|
76
88
|
...m,
|
|
77
|
-
children: u ? /* @__PURE__ */ a(
|
|
89
|
+
children: u ? /* @__PURE__ */ a(g, { as: "div", size: P[o], variant: e, weight: "medium", children: s }) : s
|
|
78
90
|
}
|
|
79
91
|
);
|
|
80
|
-
},
|
|
81
|
-
d.Toolbar =
|
|
82
|
-
d.Header =
|
|
83
|
-
d.CloseButton =
|
|
92
|
+
}, L = ({ size: t = "md", className: o, ...e }) => /* @__PURE__ */ a("button", { type: "button", className: n(r.closeButton, o), "aria-label": "Close", ...e, children: /* @__PURE__ */ a(b, { iconKey: "fa-regular fa-xmark", size: C[t] }) }), S = ({ className: t, children: o, ...e }) => /* @__PURE__ */ a("div", { className: n(r.content, t), ...e, children: o });
|
|
93
|
+
d.Toolbar = D;
|
|
94
|
+
d.Header = G;
|
|
95
|
+
d.CloseButton = L;
|
|
84
96
|
d.Content = S;
|
|
85
97
|
export {
|
|
86
98
|
d as Modal
|
|
@@ -156,11 +156,11 @@ function R(e) {
|
|
|
156
156
|
0
|
|
157
157
|
).toFixed(2)}`;
|
|
158
158
|
}
|
|
159
|
-
const
|
|
159
|
+
const d = /* @__PURE__ */ p("div", { style: { display: "flex", flexDirection: "column", gap: 8, minWidth: 220 }, children: [
|
|
160
160
|
/* @__PURE__ */ i(h, { size: "sm", weight: "semibold", children: "Account" }),
|
|
161
161
|
/* @__PURE__ */ i(h, { size: "xs", children: "Signed in as Ringo" }),
|
|
162
162
|
/* @__PURE__ */ i(y, { href: "/account", "data-popover-close": "true", children: "View Account" }),
|
|
163
|
-
/* @__PURE__ */ i(y, { href: "/orders", "data-popover-close": "true", children: "
|
|
163
|
+
/* @__PURE__ */ i(y, { href: "/orders", "data-popover-close": "true", children: "Quotes & Orders" }),
|
|
164
164
|
/* @__PURE__ */ i(S, { size: "sm", variant: "secondary", "data-popover-close": "true", onClick: () => alert("Sign out"), children: "Sign Out" })
|
|
165
165
|
] }), m = (e) => {
|
|
166
166
|
const [o, t] = g(!1);
|
|
@@ -200,14 +200,14 @@ const u = /* @__PURE__ */ p("div", { style: { display: "flex", flexDirection: "c
|
|
|
200
200
|
searchSuggestions: o ? I : void 0,
|
|
201
201
|
recentSearches: r,
|
|
202
202
|
onClearRecentSearch: (l) => {
|
|
203
|
-
k((n) => n.filter((
|
|
203
|
+
k((n) => n.filter((u) => u.url !== l.url));
|
|
204
204
|
},
|
|
205
205
|
searchInputProps: {
|
|
206
206
|
...e.searchInputProps,
|
|
207
207
|
value: o,
|
|
208
208
|
onChange: (l) => {
|
|
209
|
-
var n,
|
|
210
|
-
(
|
|
209
|
+
var n, u;
|
|
210
|
+
(u = (n = e.searchInputProps) == null ? void 0 : n.onChange) == null || u.call(n, l), t(l.target.value);
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
213
|
}
|
|
@@ -234,7 +234,7 @@ const u = /* @__PURE__ */ p("div", { style: { display: "flex", flexDirection: "c
|
|
|
234
234
|
},
|
|
235
235
|
// placeholder required by component
|
|
236
236
|
categories: c,
|
|
237
|
-
accountPopoverContent:
|
|
237
|
+
accountPopoverContent: d
|
|
238
238
|
},
|
|
239
239
|
render: m
|
|
240
240
|
}, A = {
|
|
@@ -258,7 +258,7 @@ const u = /* @__PURE__ */ p("div", { style: { display: "flex", flexDirection: "c
|
|
|
258
258
|
onCartClick: () => {
|
|
259
259
|
},
|
|
260
260
|
categories: c,
|
|
261
|
-
accountPopoverContent:
|
|
261
|
+
accountPopoverContent: d
|
|
262
262
|
},
|
|
263
263
|
render: m
|
|
264
264
|
}, F = {
|
|
@@ -282,7 +282,7 @@ const u = /* @__PURE__ */ p("div", { style: { display: "flex", flexDirection: "c
|
|
|
282
282
|
onCartClick: () => {
|
|
283
283
|
},
|
|
284
284
|
categories: c,
|
|
285
|
-
accountPopoverContent:
|
|
285
|
+
accountPopoverContent: d
|
|
286
286
|
},
|
|
287
287
|
render: G
|
|
288
288
|
}, w = {
|
|
@@ -328,7 +328,7 @@ const u = /* @__PURE__ */ p("div", { style: { display: "flex", flexDirection: "c
|
|
|
328
328
|
onCartClick: () => {
|
|
329
329
|
},
|
|
330
330
|
categories: c,
|
|
331
|
-
accountPopoverContent:
|
|
331
|
+
accountPopoverContent: d,
|
|
332
332
|
isAccountLoading: !0,
|
|
333
333
|
isCategoriesLoading: !0
|
|
334
334
|
},
|