@caseparts-org/caseblocks 0.0.290 → 0.0.292
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/molecules/ProgressBar/ProgressBar.js +40 -42
- package/dist/molecules/ProgressBar/ProgressBar.stories.d.ts +1 -0
- package/dist/molecules/ProgressBar/ProgressBar.stories.js +22 -10
- package/dist/organisms/Footer/Footer.js +19 -19
- package/dist/organisms/MainNav/MainNav.js +88 -88
- package/package.json +1 -1
|
@@ -1,83 +1,81 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Text as
|
|
3
|
-
import { c as
|
|
4
|
-
import '../../assets/ProgressBar.css';const
|
|
1
|
+
import { jsxs as i, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { Text as _ } from "../../atoms/Text/Text.js";
|
|
3
|
+
import { c as P } from "../../clsx-OuTLNxxd.js";
|
|
4
|
+
import '../../assets/ProgressBar.css';const f = "_track_w0n30_25", x = "_completed_w0n30_59", v = "_inProgress_w0n30_69", B = "_completedFull_w0n30_81", N = "_labels_w0n30_91", u = "_labelContainer_w0n30_105", r = {
|
|
5
5
|
"progressBar-section": "_progressBar-section_w0n30_1",
|
|
6
6
|
"progressBar-cell": "_progressBar-cell_w0n30_11",
|
|
7
|
-
track:
|
|
8
|
-
completed:
|
|
9
|
-
inProgress:
|
|
7
|
+
track: f,
|
|
8
|
+
completed: x,
|
|
9
|
+
inProgress: v,
|
|
10
10
|
completedFull: B,
|
|
11
11
|
labels: N,
|
|
12
|
-
labelContainer:
|
|
12
|
+
labelContainer: u
|
|
13
13
|
};
|
|
14
|
-
function
|
|
14
|
+
function $({
|
|
15
15
|
kind: o = "percent",
|
|
16
|
-
completedValue:
|
|
17
|
-
inProgressValue:
|
|
18
|
-
totalValue:
|
|
19
|
-
totalLabel:
|
|
20
|
-
completedLabel:
|
|
16
|
+
completedValue: e,
|
|
17
|
+
inProgressValue: l,
|
|
18
|
+
totalValue: t,
|
|
19
|
+
totalLabel: p,
|
|
20
|
+
completedLabel: g,
|
|
21
21
|
inProgressLabel: h,
|
|
22
22
|
variant: a,
|
|
23
23
|
className: b,
|
|
24
24
|
...w
|
|
25
25
|
}) {
|
|
26
|
-
let
|
|
27
|
-
|
|
26
|
+
let n = 0, c = 0;
|
|
27
|
+
const d = l ?? 0;
|
|
28
|
+
return o === "percent" && (n = e, c = d), o === "raw" && t !== void 0 && t > 0 && (n = e / t * 100, c = d / t * 100), n = Math.min(100, Math.max(0, n)), c = Math.min(100, Math.max(0, c)), /* @__PURE__ */ i(
|
|
28
29
|
"div",
|
|
29
30
|
{
|
|
30
|
-
className:
|
|
31
|
+
className: P(
|
|
31
32
|
r.progressBar,
|
|
32
33
|
r[`progressBar-${a}`],
|
|
33
34
|
b
|
|
34
35
|
),
|
|
35
36
|
...w,
|
|
36
37
|
children: [
|
|
37
|
-
a === "section" && /* @__PURE__ */
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
|
|
38
|
+
a === "section" && /* @__PURE__ */ i("div", { className: r.labels, children: [
|
|
39
|
+
/* @__PURE__ */ s(
|
|
40
|
+
m,
|
|
40
41
|
{
|
|
41
|
-
label:
|
|
42
|
-
value:
|
|
42
|
+
label: p,
|
|
43
|
+
value: t
|
|
43
44
|
}
|
|
44
45
|
),
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
|
|
46
|
+
/* @__PURE__ */ s(
|
|
47
|
+
m,
|
|
47
48
|
{
|
|
48
|
-
label:
|
|
49
|
-
value:
|
|
49
|
+
label: g,
|
|
50
|
+
value: e
|
|
50
51
|
}
|
|
51
52
|
),
|
|
52
|
-
/* @__PURE__ */
|
|
53
|
-
|
|
53
|
+
/* @__PURE__ */ s(
|
|
54
|
+
m,
|
|
54
55
|
{
|
|
55
56
|
label: h,
|
|
56
|
-
value:
|
|
57
|
+
value: l
|
|
57
58
|
}
|
|
58
59
|
)
|
|
59
60
|
] }),
|
|
60
|
-
/* @__PURE__ */
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
-
a === "section" &&
|
|
61
|
+
/* @__PURE__ */ i("div", { className: r.track, children: [
|
|
62
|
+
/* @__PURE__ */ s("div", { className: r.completed, style: { width: `${n}%` } }),
|
|
63
|
+
a === "section" && c > 0 && n < 100 && /* @__PURE__ */ s("div", { className: r.inProgress, style: { width: `${c}%` } })
|
|
63
64
|
] }),
|
|
64
|
-
a === "cell" && /* @__PURE__ */
|
|
65
|
-
s,
|
|
66
|
-
"%"
|
|
67
|
-
] })
|
|
65
|
+
a === "cell" && /* @__PURE__ */ s(_, { weight: "semibold", size: "xs", children: o === "percent" ? `${e}%` : e })
|
|
68
66
|
]
|
|
69
67
|
}
|
|
70
68
|
);
|
|
71
69
|
}
|
|
72
|
-
function
|
|
73
|
-
return !o || !
|
|
74
|
-
/* @__PURE__ */
|
|
75
|
-
|
|
70
|
+
function m({ isVisible: o = !0, label: e, value: l }) {
|
|
71
|
+
return !o || !e || l === void 0 || l === null ? null : /* @__PURE__ */ i("div", { className: r.labelContainer, children: [
|
|
72
|
+
/* @__PURE__ */ i(_, { size: "sm", colorToken: "quaternary", children: [
|
|
73
|
+
e,
|
|
76
74
|
":"
|
|
77
75
|
] }),
|
|
78
|
-
/* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */ s(_, { weight: "semibold", size: "sm", children: l })
|
|
79
77
|
] });
|
|
80
78
|
}
|
|
81
79
|
export {
|
|
82
|
-
|
|
80
|
+
$ as ProgressBar
|
|
83
81
|
};
|
|
@@ -13,6 +13,7 @@ type Story = StoryObj<typeof meta>;
|
|
|
13
13
|
export declare const CellVariant: Story;
|
|
14
14
|
export declare const SectionVariant: Story;
|
|
15
15
|
export declare const SectionAllLabelsUsed: Story;
|
|
16
|
+
export declare const SectionPercentWithInProgress: Story;
|
|
16
17
|
export declare const CellZeroPercentProgress: Story;
|
|
17
18
|
export declare const CellHundredPercentProgress: Story;
|
|
18
19
|
export declare const SectionZeroPercentProgress: Story;
|
|
@@ -23,26 +23,37 @@ const r = {
|
|
|
23
23
|
args: {
|
|
24
24
|
variant: "section",
|
|
25
25
|
kind: "raw",
|
|
26
|
-
completedValue:
|
|
27
|
-
inProgressValue:
|
|
28
|
-
totalValue:
|
|
26
|
+
completedValue: 1246,
|
|
27
|
+
inProgressValue: 221,
|
|
28
|
+
totalValue: 8979,
|
|
29
29
|
totalLabel: "Total",
|
|
30
|
-
completedLabel: "
|
|
31
|
-
inProgressLabel: "In
|
|
30
|
+
completedLabel: "Complete",
|
|
31
|
+
inProgressLabel: "In Progress"
|
|
32
32
|
}
|
|
33
33
|
}, n = {
|
|
34
|
+
args: {
|
|
35
|
+
variant: "section",
|
|
36
|
+
kind: "percent",
|
|
37
|
+
completedValue: 60,
|
|
38
|
+
inProgressValue: 20,
|
|
39
|
+
totalLabel: "Total",
|
|
40
|
+
totalValue: 100,
|
|
41
|
+
completedLabel: "Complete",
|
|
42
|
+
inProgressLabel: "In Progress"
|
|
43
|
+
}
|
|
44
|
+
}, s = {
|
|
34
45
|
args: {
|
|
35
46
|
variant: "cell",
|
|
36
47
|
kind: "percent",
|
|
37
48
|
completedValue: 0
|
|
38
49
|
}
|
|
39
|
-
},
|
|
50
|
+
}, c = {
|
|
40
51
|
args: {
|
|
41
52
|
variant: "cell",
|
|
42
53
|
kind: "percent",
|
|
43
54
|
completedValue: 100
|
|
44
55
|
}
|
|
45
|
-
},
|
|
56
|
+
}, i = {
|
|
46
57
|
args: {
|
|
47
58
|
variant: "section",
|
|
48
59
|
kind: "percent",
|
|
@@ -58,12 +69,13 @@ const r = {
|
|
|
58
69
|
}
|
|
59
70
|
};
|
|
60
71
|
export {
|
|
61
|
-
|
|
72
|
+
c as CellHundredPercentProgress,
|
|
62
73
|
a as CellVariant,
|
|
63
|
-
|
|
74
|
+
s as CellZeroPercentProgress,
|
|
64
75
|
l as SectionAllLabelsUsed,
|
|
65
76
|
d as SectionHundredPercentProgress,
|
|
77
|
+
n as SectionPercentWithInProgress,
|
|
66
78
|
o as SectionVariant,
|
|
67
|
-
|
|
79
|
+
i as SectionZeroPercentProgress,
|
|
68
80
|
r as default
|
|
69
81
|
};
|
|
@@ -5,11 +5,11 @@ import { Link as a } from "../../atoms/Link/Link.js";
|
|
|
5
5
|
import { Icon as _ } from "../../atoms/Icon/Icon.js";
|
|
6
6
|
import { Logo as $ } from "../../molecules/Logo/Logo.js";
|
|
7
7
|
import { Text as l } from "../../atoms/Text/Text.js";
|
|
8
|
-
import { Tooltip as
|
|
9
|
-
import { c as
|
|
10
|
-
import '../../assets/Footer.css';const
|
|
11
|
-
footer:
|
|
12
|
-
grid:
|
|
8
|
+
import { Tooltip as I } from "../../atoms/Tooltip/Tooltip.js";
|
|
9
|
+
import { c as y } from "../../clsx-OuTLNxxd.js";
|
|
10
|
+
import '../../assets/Footer.css';const K = "_footer_by119_2", B = "_grid_by119_18", j = "_title_by119_31", q = "_columnContent_by119_40", G = "_history_by119_48", R = "_logo_by119_62", Q = "_location_by119_72", r = {
|
|
11
|
+
footer: K,
|
|
12
|
+
grid: B,
|
|
13
13
|
"bottom-grid": "_bottom-grid_by119_19",
|
|
14
14
|
title: j,
|
|
15
15
|
"title-help": "_title-help_by119_36",
|
|
@@ -72,7 +72,7 @@ import '../../assets/Footer.css';const B = "_footer_by119_2", I = "_grid_by119_1
|
|
|
72
72
|
};
|
|
73
73
|
function ie({
|
|
74
74
|
homeRoute: w = "/",
|
|
75
|
-
isOnline:
|
|
75
|
+
isOnline: m = !0,
|
|
76
76
|
className: g,
|
|
77
77
|
companyHistoryText: A = Y,
|
|
78
78
|
customerCareTitle: C = "Customer Care",
|
|
@@ -86,14 +86,14 @@ function ie({
|
|
|
86
86
|
liveChatHref: p,
|
|
87
87
|
onLiveChatClick: f,
|
|
88
88
|
partResearchLabel: v = "Part Research Request",
|
|
89
|
-
partResearchDescription: D = "
|
|
89
|
+
partResearchDescription: D = "Identify a Part",
|
|
90
90
|
partResearchHref: u,
|
|
91
91
|
onPartResearchClick: d,
|
|
92
92
|
legalLinks: s = H,
|
|
93
93
|
copyrightText: P = "Copyright 1972-2025 Case Parts Company | All Rights Reserved.",
|
|
94
94
|
...W
|
|
95
95
|
}) {
|
|
96
|
-
const M =
|
|
96
|
+
const M = y(r.footer, g), U = [
|
|
97
97
|
i.cuttingBoards,
|
|
98
98
|
i.gaskets,
|
|
99
99
|
i.heatersAndPans,
|
|
@@ -108,13 +108,13 @@ function ie({
|
|
|
108
108
|
n.salesTaxCertificates,
|
|
109
109
|
n.salesTax,
|
|
110
110
|
n.myAccount
|
|
111
|
-
].filter((t) => !!(t != null && t.href)),
|
|
111
|
+
].filter((t) => !!(t != null && t.href)), F = (t) => {
|
|
112
112
|
u || t.preventDefault(), d == null || d(t);
|
|
113
|
-
},
|
|
113
|
+
}, O = (t) => {
|
|
114
114
|
p || t.preventDefault(), f == null || f(t);
|
|
115
115
|
};
|
|
116
116
|
return /* @__PURE__ */ o("footer", { className: M, ...W, children: [
|
|
117
|
-
/* @__PURE__ */ o(N, { gridWrapperClassName:
|
|
117
|
+
/* @__PURE__ */ o(N, { gridWrapperClassName: y(g, r.grid), children: [
|
|
118
118
|
/* @__PURE__ */ o(h, { span: [4, 6, 3], className: r.gridColumn, children: [
|
|
119
119
|
/* @__PURE__ */ e(a, { href: w, children: /* @__PURE__ */ e($, { variant: "white", className: r.logo }) }),
|
|
120
120
|
/* @__PURE__ */ e("div", { className: r.history, children: /* @__PURE__ */ e(l, { size: "sm", weight: "extra-light", colorToken: "footer", className: r["history-text"], children: A }) })
|
|
@@ -133,7 +133,7 @@ function ie({
|
|
|
133
133
|
z.map((t) => /* @__PURE__ */ o(c, { flexDirection: "row", justifyContent: "flex-start", className: r["icon-gap"], children: [
|
|
134
134
|
/* @__PURE__ */ e(_, { iconKey: "fa-solid fa-location-dot", size: "sm", colorToken: "warning" }),
|
|
135
135
|
/* @__PURE__ */ e(
|
|
136
|
-
|
|
136
|
+
I,
|
|
137
137
|
{
|
|
138
138
|
trigger: /* @__PURE__ */ o("div", { className: r.location, children: [
|
|
139
139
|
/* @__PURE__ */ o(l, { size: "xs", weight: "extra-light", colorToken: "footer", children: [
|
|
@@ -163,30 +163,30 @@ function ie({
|
|
|
163
163
|
)
|
|
164
164
|
] }, `${t.office}-${t.phone}`)),
|
|
165
165
|
/* @__PURE__ */ o(c, { flexDirection: "row", justifyContent: "flex-start", className: r["icon-gap"], children: [
|
|
166
|
-
/* @__PURE__ */ e(_, { iconKey: "fa-kit fa-chat", size: "sm", colorToken:
|
|
166
|
+
/* @__PURE__ */ e(_, { iconKey: "fa-kit fa-chat", size: "sm", colorToken: m ? "success" : "default-inverted" }),
|
|
167
167
|
p || f ? /* @__PURE__ */ o(
|
|
168
168
|
a,
|
|
169
169
|
{
|
|
170
170
|
href: p || "#",
|
|
171
171
|
unstyled: !0,
|
|
172
|
-
onClick:
|
|
172
|
+
onClick: O,
|
|
173
173
|
className: r["live-chat-interactive"],
|
|
174
174
|
children: [
|
|
175
175
|
/* @__PURE__ */ e(l, { size: "xs", weight: "extra-light", colorToken: "footer", children: b }),
|
|
176
176
|
/* @__PURE__ */ e("br", {}),
|
|
177
|
-
/* @__PURE__ */ e(l, { size: "xs", weight: "extra-light", colorToken: "footer", children:
|
|
177
|
+
/* @__PURE__ */ e(l, { size: "xs", weight: "extra-light", colorToken: "footer", children: m ? x : T })
|
|
178
178
|
]
|
|
179
179
|
}
|
|
180
180
|
) : /* @__PURE__ */ o("div", { children: [
|
|
181
181
|
/* @__PURE__ */ e(l, { size: "xs", weight: "extra-light", colorToken: "footer", children: b }),
|
|
182
182
|
/* @__PURE__ */ e("br", {}),
|
|
183
|
-
/* @__PURE__ */ e(l, { size: "xs", weight: "extra-light", colorToken: "footer", children:
|
|
183
|
+
/* @__PURE__ */ e(l, { size: "xs", weight: "extra-light", colorToken: "footer", children: m ? x : T })
|
|
184
184
|
] })
|
|
185
185
|
] }),
|
|
186
186
|
/* @__PURE__ */ o(c, { flexDirection: "row", justifyContent: "flex-start", className: r["icon-gap"], children: [
|
|
187
187
|
/* @__PURE__ */ e(_, { iconKey: "fa-regular fa-sparkles", size: "sm", colorToken: "default-inverted" }),
|
|
188
|
-
/* @__PURE__ */ o("div", { className:
|
|
189
|
-
u || d ? /* @__PURE__ */ e(a, { href: u || "#", unstyled: !0, onClick:
|
|
188
|
+
/* @__PURE__ */ o("div", { className: y((u || d) && r["part-research-interactive"]), children: [
|
|
189
|
+
u || d ? /* @__PURE__ */ e(a, { href: u || "#", unstyled: !0, onClick: F, children: v }) : /* @__PURE__ */ e(l, { size: "xs", weight: "extra-light", colorToken: "footer", children: v }),
|
|
190
190
|
/* @__PURE__ */ e("br", {}),
|
|
191
191
|
/* @__PURE__ */ e(l, { size: "xs", weight: "extra-light", colorToken: "footer", children: D })
|
|
192
192
|
] })
|
|
@@ -194,7 +194,7 @@ function ie({
|
|
|
194
194
|
] })
|
|
195
195
|
] })
|
|
196
196
|
] }),
|
|
197
|
-
/* @__PURE__ */ e(N, { gridWrapperClassName:
|
|
197
|
+
/* @__PURE__ */ e(N, { gridWrapperClassName: y(g, r["bottom-grid"]), children: /* @__PURE__ */ e(h, { span: [4, 6, 12], className: r.gridColumn, children: /* @__PURE__ */ o("div", { className: r.columnContent, children: [
|
|
198
198
|
/* @__PURE__ */ e(a, { href: s.terms.href, unstyled: s.terms.unstyled, target: s.terms.target, rel: s.terms.rel, children: s.terms.label }),
|
|
199
199
|
" ",
|
|
200
200
|
/* @__PURE__ */ e(l, { size: "xs", weight: "extra-light", variant: "body", colorToken: "footer", children: "|" }),
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as l, Fragment as M, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import s from "react";
|
|
3
3
|
import { r as ct } from "../../index-BkF-BQ3Q.js";
|
|
4
|
-
import { Text as
|
|
5
|
-
import { Link as
|
|
6
|
-
import { Icon as
|
|
7
|
-
import { Flex as
|
|
4
|
+
import { Text as U } from "../../atoms/Text/Text.js";
|
|
5
|
+
import { Link as H } from "../../atoms/Link/Link.js";
|
|
6
|
+
import { Icon as u } from "../../atoms/Icon/Icon.js";
|
|
7
|
+
import { Flex as E } from "../../atoms/Flex/Flex.js";
|
|
8
8
|
import { Grid as at, Column as st } from "../../atoms/Grid/Grid.js";
|
|
9
9
|
import { Input as Z } from "../../atoms/Input/Input.js";
|
|
10
10
|
import { InputEndAdornmentButton as $ } from "../../atoms/InputEndAdornmentButton/InputEndAdornmentButton.js";
|
|
11
11
|
import { Logo as yt } from "../../molecules/Logo/Logo.js";
|
|
12
12
|
import { HamburgerMenu as wt } from "../../molecules/HamburgerMenu/HamburgerMenu.js";
|
|
13
|
-
import { ShoppingCart as
|
|
14
|
-
import { Account as
|
|
13
|
+
import { ShoppingCart as _t } from "../../molecules/Cart/Cart.js";
|
|
14
|
+
import { Account as ut } from "../../molecules/Account/Account.js";
|
|
15
15
|
import { CategoryNav as Nt } from "../../molecules/CategoryNav/CategoryNav.js";
|
|
16
16
|
import { SuggestionDropdown as C } from "../SuggestionDropdown/SuggestionDropdown.js";
|
|
17
17
|
import { getHideAtStyles as P } from "../../atoms/HideAt.js";
|
|
18
18
|
import { c as N } from "../../clsx-OuTLNxxd.js";
|
|
19
|
-
import '../../assets/MainNav.css';const kt = "_main_1w2jy_1", At = "_column_1w2jy_8", bt = "_topNav_1w2jy_13", vt = "_logo_1w2jy_21", Lt = "_operations_1w2jy_24",
|
|
19
|
+
import '../../assets/MainNav.css';const kt = "_main_1w2jy_1", At = "_column_1w2jy_8", bt = "_topNav_1w2jy_13", vt = "_logo_1w2jy_21", Lt = "_operations_1w2jy_24", Dt = "_search_1w2jy_31", xt = "_mobileSearch_1w2jy_37", pt = "_typeAheadPortal_1w2jy_40", jt = "_siteLink_1w2jy_47", Kt = "_accountArea_1w2jy_74", zt = "_category_1w2jy_86", Bt = "_categoryLink_1w2jy_94", Et = "_menuList_1w2jy_110", $t = "_menuItemAction_1w2jy_133", Ft = "_shortcutIcon_1w2jy_142", e = {
|
|
20
20
|
main: kt,
|
|
21
21
|
column: At,
|
|
22
22
|
topNav: bt,
|
|
23
23
|
logo: vt,
|
|
24
24
|
operations: Lt,
|
|
25
|
-
search:
|
|
26
|
-
mobileSearch:
|
|
27
|
-
typeAheadPortal:
|
|
25
|
+
search: Dt,
|
|
26
|
+
mobileSearch: xt,
|
|
27
|
+
typeAheadPortal: pt,
|
|
28
28
|
siteLink: jt,
|
|
29
29
|
accountArea: Kt,
|
|
30
30
|
category: zt,
|
|
31
|
-
categoryLink:
|
|
32
|
-
menuList:
|
|
31
|
+
categoryLink: Bt,
|
|
32
|
+
menuList: Et,
|
|
33
33
|
menuItemAction: $t,
|
|
34
34
|
shortcutIcon: Ft
|
|
35
35
|
}, gt = s.forwardRef(function({
|
|
@@ -37,15 +37,15 @@ import '../../assets/MainNav.css';const kt = "_main_1w2jy_1", At = "_column_1w2j
|
|
|
37
37
|
categories: L,
|
|
38
38
|
homeRoute: V,
|
|
39
39
|
faqRoute: g,
|
|
40
|
-
customPartsRoute:
|
|
40
|
+
customPartsRoute: O,
|
|
41
41
|
aboutUsRoute: h,
|
|
42
|
-
contactRoute:
|
|
42
|
+
contactRoute: T,
|
|
43
43
|
cart: S,
|
|
44
44
|
open: tt,
|
|
45
45
|
// consume external panel control props from CartPropsBase
|
|
46
46
|
className: it,
|
|
47
47
|
onLoginClick: et,
|
|
48
|
-
searchInputProps:
|
|
48
|
+
searchInputProps: n,
|
|
49
49
|
searchValue: f,
|
|
50
50
|
onSearchValueChange: d,
|
|
51
51
|
onClearSearch: k,
|
|
@@ -56,24 +56,24 @@ import '../../assets/MainNav.css';const kt = "_main_1w2jy_1", At = "_column_1w2j
|
|
|
56
56
|
onCategoryClick: j,
|
|
57
57
|
onClickModelSerial: q,
|
|
58
58
|
onCartClick: mt,
|
|
59
|
-
accountPopoverContent:
|
|
60
|
-
isAccountLoading:
|
|
59
|
+
accountPopoverContent: nt,
|
|
60
|
+
isAccountLoading: lt,
|
|
61
61
|
isCategoriesLoading: dt,
|
|
62
62
|
...rt
|
|
63
63
|
}, ft) {
|
|
64
64
|
var Y;
|
|
65
|
-
const [G, R] = s.useState(!1), [r, w] = s.useState(-1), [Q, W] = s.useState(), A = s.useRef(null), K = s.useRef(null),
|
|
65
|
+
const [G, R] = s.useState(!1), [r, w] = s.useState(-1), [Q, W] = s.useState(), A = s.useRef(null), K = s.useRef(null), _ = s.useId(), z = () => {
|
|
66
66
|
var t;
|
|
67
67
|
return (t = A.current) != null && t.offsetParent ? A.current : K.current;
|
|
68
|
-
}, b = G && !!f && !!o,
|
|
68
|
+
}, b = G && !!f && !!o, B = G && !b && !!(y != null && y.length), D = b ? ((o == null ? void 0 : o.terms.length) ?? 0) + ((o == null ? void 0 : o.categories.length) ?? 0) + (((Y = o == null ? void 0 : o.customParts) == null ? void 0 : Y.length) ?? 0) + ((o == null ? void 0 : o.items.length) ?? 0) : B ? (y == null ? void 0 : y.length) ?? 0 : 0;
|
|
69
69
|
s.useLayoutEffect(() => {
|
|
70
|
-
if (!b && !
|
|
70
|
+
if (!b && !B) {
|
|
71
71
|
W(void 0);
|
|
72
72
|
return;
|
|
73
73
|
}
|
|
74
74
|
function t() {
|
|
75
|
-
var
|
|
76
|
-
const m = (
|
|
75
|
+
var x;
|
|
76
|
+
const m = (x = A.current) != null && x.offsetParent ? A.current : K.current;
|
|
77
77
|
if (!m) return;
|
|
78
78
|
const c = m.getBoundingClientRect();
|
|
79
79
|
W({
|
|
@@ -86,67 +86,67 @@ import '../../assets/MainNav.css';const kt = "_main_1w2jy_1", At = "_column_1w2j
|
|
|
86
86
|
return t(), window.addEventListener("resize", t), window.addEventListener("scroll", t, !0), () => {
|
|
87
87
|
window.removeEventListener("resize", t), window.removeEventListener("scroll", t, !0);
|
|
88
88
|
};
|
|
89
|
-
}, [b,
|
|
89
|
+
}, [b, B]);
|
|
90
90
|
const J = {
|
|
91
|
-
...
|
|
91
|
+
...n,
|
|
92
92
|
onChange: (t) => {
|
|
93
93
|
var m;
|
|
94
|
-
w(-1), (m =
|
|
94
|
+
w(-1), (m = n == null ? void 0 : n.onChange) == null || m.call(n, t);
|
|
95
95
|
},
|
|
96
96
|
onFocus: (t) => {
|
|
97
97
|
var m;
|
|
98
|
-
(m =
|
|
98
|
+
(m = n == null ? void 0 : n.onFocus) == null || m.call(n, t), R(!0);
|
|
99
99
|
},
|
|
100
100
|
onBlur: (t) => {
|
|
101
101
|
var m;
|
|
102
|
-
(m =
|
|
102
|
+
(m = n == null ? void 0 : n.onBlur) == null || m.call(n, t), R(!1);
|
|
103
103
|
},
|
|
104
104
|
onKeyDown: (t) => {
|
|
105
|
-
var m, c,
|
|
106
|
-
if ((m =
|
|
107
|
-
if (t.key === "ArrowDown" &&
|
|
108
|
-
t.preventDefault(), w((
|
|
105
|
+
var m, c, x;
|
|
106
|
+
if ((m = n == null ? void 0 : n.onKeyDown) == null || m.call(n, t), !t.defaultPrevented) {
|
|
107
|
+
if (t.key === "ArrowDown" && D > 0) {
|
|
108
|
+
t.preventDefault(), w((p) => p >= D - 1 ? 0 : p + 1);
|
|
109
109
|
return;
|
|
110
110
|
}
|
|
111
|
-
if (t.key === "ArrowUp" &&
|
|
112
|
-
t.preventDefault(), w((
|
|
111
|
+
if (t.key === "ArrowUp" && D > 0) {
|
|
112
|
+
t.preventDefault(), w((p) => p <= 0 ? D - 1 : p - 1);
|
|
113
113
|
return;
|
|
114
114
|
}
|
|
115
115
|
if (t.key === "Tab" && b && r >= 0 && r < ((o == null ? void 0 : o.terms.length) ?? 0)) {
|
|
116
116
|
t.preventDefault(), d == null || d((o == null ? void 0 : o.terms[r].name) ?? ""), w(-1);
|
|
117
117
|
return;
|
|
118
118
|
}
|
|
119
|
-
if (t.key === "Enter" && r >= 0 && r <
|
|
120
|
-
t.preventDefault(), (c = document.getElementById(`${
|
|
119
|
+
if (t.key === "Enter" && r >= 0 && r < D) {
|
|
120
|
+
t.preventDefault(), (c = document.getElementById(`${_}-${r}`)) == null || c.click();
|
|
121
121
|
return;
|
|
122
122
|
}
|
|
123
|
-
t.key === "Enter" && (t.preventDefault(), R(!1), (
|
|
123
|
+
t.key === "Enter" && (t.preventDefault(), R(!1), (x = z()) == null || x.blur(), a == null || a(f ?? ""));
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
}, X = (t) => {
|
|
127
127
|
var m;
|
|
128
128
|
t.key.length !== 1 || t.altKey || t.ctrlKey || t.metaKey || (t.preventDefault(), w(-1), d == null || d(`${f ?? ""}${t.key}`), (m = z()) == null || m.focus());
|
|
129
129
|
};
|
|
130
|
-
return /* @__PURE__ */
|
|
131
|
-
/* @__PURE__ */ i(at, { ...rt, gridWrapperClassName: N(e.main, it), children: /* @__PURE__ */
|
|
132
|
-
/* @__PURE__ */
|
|
133
|
-
|
|
130
|
+
return /* @__PURE__ */ l(M, { children: [
|
|
131
|
+
/* @__PURE__ */ i(at, { ...rt, gridWrapperClassName: N(e.main, it), children: /* @__PURE__ */ l(st, { span: 12, className: e.column, children: [
|
|
132
|
+
/* @__PURE__ */ l(
|
|
133
|
+
E,
|
|
134
134
|
{
|
|
135
135
|
flexDirection: "row",
|
|
136
136
|
alignItems: "center",
|
|
137
137
|
justifyContent: "space-between",
|
|
138
138
|
className: e.topNav,
|
|
139
139
|
children: [
|
|
140
|
-
/* @__PURE__ */ i("div", { className: e.logo, children: /* @__PURE__ */ i(
|
|
141
|
-
/* @__PURE__ */
|
|
142
|
-
|
|
140
|
+
/* @__PURE__ */ i("div", { className: e.logo, children: /* @__PURE__ */ i(H, { href: V, children: /* @__PURE__ */ i(yt, {}) }) }),
|
|
141
|
+
/* @__PURE__ */ l(
|
|
142
|
+
E,
|
|
143
143
|
{
|
|
144
144
|
flexDirection: "row",
|
|
145
145
|
alignItems: "center",
|
|
146
146
|
justifyContent: "flex-end",
|
|
147
147
|
className: e.operations,
|
|
148
148
|
children: [
|
|
149
|
-
/* @__PURE__ */ i(
|
|
149
|
+
/* @__PURE__ */ i(E, { flexDirection: "row", hideAt: ["sm"], className: e.search, children: /* @__PURE__ */ i(
|
|
150
150
|
Z,
|
|
151
151
|
{
|
|
152
152
|
variant: "search",
|
|
@@ -155,12 +155,12 @@ import '../../assets/MainNav.css';const kt = "_main_1w2jy_1", At = "_column_1w2j
|
|
|
155
155
|
name: "cpc-search",
|
|
156
156
|
autoComplete: "off",
|
|
157
157
|
"aria-autocomplete": "list",
|
|
158
|
-
"aria-controls":
|
|
159
|
-
"aria-activedescendant": r >= 0 ? `${
|
|
158
|
+
"aria-controls": _,
|
|
159
|
+
"aria-activedescendant": r >= 0 ? `${_}-${r}` : void 0,
|
|
160
160
|
...J,
|
|
161
161
|
ref: A,
|
|
162
162
|
value: f,
|
|
163
|
-
endAdornment: /* @__PURE__ */
|
|
163
|
+
endAdornment: /* @__PURE__ */ l(M, { children: [
|
|
164
164
|
!!f && /* @__PURE__ */ i(
|
|
165
165
|
$,
|
|
166
166
|
{
|
|
@@ -184,24 +184,24 @@ import '../../assets/MainNav.css';const kt = "_main_1w2jy_1", At = "_column_1w2j
|
|
|
184
184
|
] })
|
|
185
185
|
}
|
|
186
186
|
) }),
|
|
187
|
-
/* @__PURE__ */
|
|
188
|
-
/* @__PURE__ */ i(
|
|
189
|
-
"
|
|
187
|
+
/* @__PURE__ */ l("button", { onClick: q, className: N(e.siteLink, P(["sm", "md"])), children: [
|
|
188
|
+
/* @__PURE__ */ i(u, { iconKey: "fa-regular fa-sparkles", size: "sm" }),
|
|
189
|
+
"Identify a Part"
|
|
190
190
|
] }),
|
|
191
|
-
/* @__PURE__ */ i(v, { href:
|
|
192
|
-
/* @__PURE__ */ i(v, { href:
|
|
191
|
+
/* @__PURE__ */ i(v, { href: O, hideAt: ["sm", "md"], children: "Custom Parts" }),
|
|
192
|
+
/* @__PURE__ */ i(v, { href: T, hideAt: ["sm", "md"], children: "Contact Us" }),
|
|
193
193
|
/* @__PURE__ */ i("div", { className: e.accountArea, children: /* @__PURE__ */ i(
|
|
194
|
-
|
|
194
|
+
ut,
|
|
195
195
|
{
|
|
196
196
|
account: F,
|
|
197
197
|
onLoginClick: et,
|
|
198
198
|
className: e.avatar,
|
|
199
|
-
popoverContent:
|
|
200
|
-
isAccountLoading:
|
|
199
|
+
popoverContent: nt,
|
|
200
|
+
isAccountLoading: lt
|
|
201
201
|
}
|
|
202
202
|
) }),
|
|
203
203
|
/* @__PURE__ */ i(
|
|
204
|
-
|
|
204
|
+
_t,
|
|
205
205
|
{
|
|
206
206
|
ref: ft,
|
|
207
207
|
cart: S,
|
|
@@ -209,52 +209,52 @@ import '../../assets/MainNav.css';const kt = "_main_1w2jy_1", At = "_column_1w2j
|
|
|
209
209
|
onCartClick: mt
|
|
210
210
|
}
|
|
211
211
|
),
|
|
212
|
-
/* @__PURE__ */
|
|
213
|
-
/* @__PURE__ */
|
|
214
|
-
/* @__PURE__ */ i(
|
|
215
|
-
/* @__PURE__ */
|
|
216
|
-
/* @__PURE__ */ i("li", { className: e.menuItem, children: /* @__PURE__ */
|
|
212
|
+
/* @__PURE__ */ l(wt, { hideAt: ["lg"], children: [
|
|
213
|
+
/* @__PURE__ */ l("section", { children: [
|
|
214
|
+
/* @__PURE__ */ i(U, { size: "md", weight: "semibold", children: "Useful shortcuts" }),
|
|
215
|
+
/* @__PURE__ */ l("ul", { className: e.menuList, children: [
|
|
216
|
+
/* @__PURE__ */ i("li", { className: e.menuItem, children: /* @__PURE__ */ l(
|
|
217
217
|
"button",
|
|
218
218
|
{
|
|
219
219
|
onClick: q,
|
|
220
220
|
"data-hamburger-close": "true",
|
|
221
221
|
className: N(e.siteLink, e.menuItemAction, P(["lg"])),
|
|
222
222
|
children: [
|
|
223
|
-
/* @__PURE__ */ i(
|
|
224
|
-
"
|
|
223
|
+
/* @__PURE__ */ i(u, { iconKey: "fa-regular fa-sparkles", size: "sm", className: e.shortcutIcon }),
|
|
224
|
+
"Identify a Part"
|
|
225
225
|
]
|
|
226
226
|
}
|
|
227
227
|
) }),
|
|
228
|
-
/* @__PURE__ */ i("li", { className: e.menuItem, children: /* @__PURE__ */
|
|
229
|
-
/* @__PURE__ */ i(
|
|
228
|
+
/* @__PURE__ */ i("li", { className: e.menuItem, children: /* @__PURE__ */ l(v, { href: O, className: N(e.siteLink, e.menuItemAction), children: [
|
|
229
|
+
/* @__PURE__ */ i(u, { iconKey: "fa-regular fa-screwdriver-wrench", size: "sm", className: e.shortcutIcon }),
|
|
230
230
|
"Custom Parts"
|
|
231
231
|
] }) }),
|
|
232
|
-
/* @__PURE__ */ i("li", { className: e.menuItem, children: /* @__PURE__ */
|
|
233
|
-
/* @__PURE__ */ i(
|
|
232
|
+
/* @__PURE__ */ i("li", { className: e.menuItem, children: /* @__PURE__ */ l(v, { href: T, className: N(e.siteLink, e.menuItemAction), children: [
|
|
233
|
+
/* @__PURE__ */ i(u, { iconKey: "fa-regular fa-envelope", size: "sm", className: e.shortcutIcon }),
|
|
234
234
|
"Contact Us"
|
|
235
235
|
] }) }),
|
|
236
|
-
/* @__PURE__ */ i("li", { className: e.menuItem, children: /* @__PURE__ */
|
|
237
|
-
/* @__PURE__ */ i(
|
|
236
|
+
/* @__PURE__ */ i("li", { className: e.menuItem, children: /* @__PURE__ */ l(v, { href: g, className: N(e.siteLink, e.menuItemAction), children: [
|
|
237
|
+
/* @__PURE__ */ i(u, { iconKey: "fa-solid fa-question", size: "sm", className: e.shortcutIcon }),
|
|
238
238
|
"FAQ"
|
|
239
239
|
] }) }),
|
|
240
|
-
/* @__PURE__ */ i("li", { className: e.menuItem, children: /* @__PURE__ */
|
|
241
|
-
/* @__PURE__ */ i(
|
|
240
|
+
/* @__PURE__ */ i("li", { className: e.menuItem, children: /* @__PURE__ */ l(v, { href: h, className: N(e.siteLink, e.menuItemAction), children: [
|
|
241
|
+
/* @__PURE__ */ i(u, { iconKey: "fa-regular fa-people-group", size: "sm", className: e.shortcutIcon }),
|
|
242
242
|
"About Us"
|
|
243
243
|
] }) })
|
|
244
244
|
] })
|
|
245
245
|
] }),
|
|
246
|
-
/* @__PURE__ */
|
|
247
|
-
/* @__PURE__ */ i(
|
|
248
|
-
/* @__PURE__ */ i("ul", { className: e.menuList, children: L && L.map((t) => /* @__PURE__ */ i("li", { className: e.category, children: /* @__PURE__ */
|
|
249
|
-
|
|
246
|
+
/* @__PURE__ */ l("section", { children: [
|
|
247
|
+
/* @__PURE__ */ i(U, { size: "md", weight: "semibold", children: "Shop by category" }),
|
|
248
|
+
/* @__PURE__ */ i("ul", { className: e.menuList, children: L && L.map((t) => /* @__PURE__ */ i("li", { className: e.category, children: /* @__PURE__ */ l(
|
|
249
|
+
H,
|
|
250
250
|
{
|
|
251
251
|
href: t.route,
|
|
252
252
|
className: e.categoryLink,
|
|
253
253
|
onClick: () => j == null ? void 0 : j(t),
|
|
254
254
|
children: [
|
|
255
|
-
/* @__PURE__ */ i(
|
|
255
|
+
/* @__PURE__ */ i(U, { size: "sm", children: t.label }),
|
|
256
256
|
/* @__PURE__ */ i(
|
|
257
|
-
|
|
257
|
+
u,
|
|
258
258
|
{
|
|
259
259
|
iconKey: "fa-solid fa-chevron-right",
|
|
260
260
|
title: "Navigate",
|
|
@@ -272,7 +272,7 @@ import '../../assets/MainNav.css';const kt = "_main_1w2jy_1", At = "_column_1w2j
|
|
|
272
272
|
]
|
|
273
273
|
}
|
|
274
274
|
),
|
|
275
|
-
/* @__PURE__ */ i(
|
|
275
|
+
/* @__PURE__ */ i(E, { flexDirection: "row", hideAt: ["md", "lg"], className: e.mobileSearch, children: /* @__PURE__ */ i("div", { className: e.search, children: /* @__PURE__ */ i(
|
|
276
276
|
Z,
|
|
277
277
|
{
|
|
278
278
|
variant: "search",
|
|
@@ -281,12 +281,12 @@ import '../../assets/MainNav.css';const kt = "_main_1w2jy_1", At = "_column_1w2j
|
|
|
281
281
|
name: "cpc-search",
|
|
282
282
|
autoComplete: "off",
|
|
283
283
|
"aria-autocomplete": "list",
|
|
284
|
-
"aria-controls":
|
|
285
|
-
"aria-activedescendant": r >= 0 ? `${
|
|
284
|
+
"aria-controls": _,
|
|
285
|
+
"aria-activedescendant": r >= 0 ? `${_}-${r}` : void 0,
|
|
286
286
|
...J,
|
|
287
287
|
ref: K,
|
|
288
288
|
value: f,
|
|
289
|
-
endAdornment: /* @__PURE__ */
|
|
289
|
+
endAdornment: /* @__PURE__ */ l(M, { children: [
|
|
290
290
|
!!f && /* @__PURE__ */ i(
|
|
291
291
|
$,
|
|
292
292
|
{
|
|
@@ -320,7 +320,7 @@ import '../../assets/MainNav.css';const kt = "_main_1w2jy_1", At = "_column_1w2j
|
|
|
320
320
|
)
|
|
321
321
|
] }) }),
|
|
322
322
|
Q && typeof document < "u" && ct.createPortal(
|
|
323
|
-
/* @__PURE__ */
|
|
323
|
+
/* @__PURE__ */ l(
|
|
324
324
|
"div",
|
|
325
325
|
{
|
|
326
326
|
className: e.typeAheadPortal,
|
|
@@ -331,7 +331,7 @@ import '../../assets/MainNav.css';const kt = "_main_1w2jy_1", At = "_column_1w2j
|
|
|
331
331
|
{
|
|
332
332
|
...o,
|
|
333
333
|
activeOptionIndex: r,
|
|
334
|
-
optionIdPrefix:
|
|
334
|
+
optionIdPrefix: _,
|
|
335
335
|
onKeyDown: X,
|
|
336
336
|
onSuggestionClick: (t) => {
|
|
337
337
|
var m, c;
|
|
@@ -339,7 +339,7 @@ import '../../assets/MainNav.css';const kt = "_main_1w2jy_1", At = "_column_1w2j
|
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
341
|
),
|
|
342
|
-
|
|
342
|
+
B && /* @__PURE__ */ i(
|
|
343
343
|
C,
|
|
344
344
|
{
|
|
345
345
|
terms: [],
|
|
@@ -349,7 +349,7 @@ import '../../assets/MainNav.css';const kt = "_main_1w2jy_1", At = "_column_1w2j
|
|
|
349
349
|
recentSearches: y,
|
|
350
350
|
onClearRecentSearch: ot,
|
|
351
351
|
activeOptionIndex: r,
|
|
352
|
-
optionIdPrefix:
|
|
352
|
+
optionIdPrefix: _,
|
|
353
353
|
onKeyDown: X,
|
|
354
354
|
onSuggestionClick: (t) => {
|
|
355
355
|
var m;
|
|
@@ -365,11 +365,11 @@ import '../../assets/MainNav.css';const kt = "_main_1w2jy_1", At = "_column_1w2j
|
|
|
365
365
|
] });
|
|
366
366
|
});
|
|
367
367
|
function v({
|
|
368
|
-
href:
|
|
368
|
+
href: I,
|
|
369
369
|
children: F,
|
|
370
370
|
...L
|
|
371
371
|
}) {
|
|
372
|
-
return /* @__PURE__ */ i(
|
|
372
|
+
return /* @__PURE__ */ i(H, { href: I, className: e.siteLink, ...L, children: F });
|
|
373
373
|
}
|
|
374
374
|
export {
|
|
375
375
|
gt as MainNav
|