@caseparts-org/caseblocks 0.0.298 → 0.0.300
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/Cart.module-Cnsy6nxN.js +40 -0
- package/dist/assets/AddToCartPart.css +1 -1
- package/dist/assets/Cart.css +1 -1
- package/dist/assets/MainNav.css +1 -1
- package/dist/atoms/Popover/Popover.js +56 -55
- package/dist/molecules/AddToCartPart/AddToCartPart.d.ts +5 -2
- package/dist/molecules/AddToCartPart/AddToCartPart.js +90 -86
- package/dist/molecules/AddToCartPart/AddToCartPart.stories.d.ts +2 -2
- package/dist/molecules/AddToCartPart/AddToCartPart.stories.js +5 -2
- package/dist/molecules/Cart/Cart.d.ts +1 -0
- package/dist/molecules/Cart/Cart.js +35 -29
- package/dist/molecules/Cart/CartPart.js +1 -1
- package/dist/molecules/Cart/CartSlideInPanel.js +1 -1
- package/dist/organisms/MainNav/MainNav.d.ts +4 -0
- package/dist/organisms/MainNav/MainNav.js +223 -200
- package/dist/organisms/MainNav/MainNav.stories.js +137 -84
- package/package.json +1 -1
- package/dist/Cart.module-CG06lLyg.js +0 -38
|
@@ -12,7 +12,7 @@ import { Tooltip as re } from "../../atoms/Tooltip/Tooltip.js";
|
|
|
12
12
|
import { ADMONITION_ICON_COLOR_TOKENS as le, ADMONITION_DEFAULT_ICONS as ae } from "../Admonition/admonitionTokens.js";
|
|
13
13
|
import { Admonition as ce } from "../Admonition/Admonition.js";
|
|
14
14
|
import { c as f } from "../../clsx-OuTLNxxd.js";
|
|
15
|
-
import { s as l } from "../../Cart.module-
|
|
15
|
+
import { s as l } from "../../Cart.module-Cnsy6nxN.js";
|
|
16
16
|
function be({
|
|
17
17
|
imageUrl: S,
|
|
18
18
|
imageAlt: _ = "Product image",
|
|
@@ -4,7 +4,7 @@ import { Text as l } from "../../atoms/Text/Text.js";
|
|
|
4
4
|
import { Button as h } from "../../atoms/Button/Button.js";
|
|
5
5
|
import { Icon as u } from "../../atoms/Icon/Icon.js";
|
|
6
6
|
import { CartPart as z } from "./CartPart.js";
|
|
7
|
-
import { s as t } from "../../Cart.module-
|
|
7
|
+
import { s as t } from "../../Cart.module-Cnsy6nxN.js";
|
|
8
8
|
function q({
|
|
9
9
|
open: p,
|
|
10
10
|
onClose: m,
|
|
@@ -31,6 +31,10 @@ export interface MainNavProps extends CartPropsBase, React.HTMLAttributes<HTMLDi
|
|
|
31
31
|
accountPopoverContent?: React.ReactNode;
|
|
32
32
|
isAccountLoading?: boolean;
|
|
33
33
|
isCategoriesLoading?: boolean;
|
|
34
|
+
cartConfirmation?: React.ReactNode;
|
|
35
|
+
cartConfirmationVisible?: boolean;
|
|
36
|
+
onCartConfirmationDismiss?: () => void;
|
|
37
|
+
cartConfirmationKey?: number;
|
|
34
38
|
}
|
|
35
39
|
export type MainNavHandle = ShoppingCartHandle;
|
|
36
40
|
export declare const MainNav: React.ForwardRefExoticComponent<MainNavProps & React.RefAttributes<ShoppingCartHandle>>;
|
|
@@ -1,153 +1,162 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as m, Fragment as O, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import s from "react";
|
|
3
|
-
import { r as
|
|
4
|
-
import { Text as
|
|
5
|
-
import { Link as
|
|
6
|
-
import { Icon as
|
|
7
|
-
import { Flex as
|
|
8
|
-
import { Grid as
|
|
9
|
-
import { Input as
|
|
10
|
-
import { InputEndAdornmentButton as
|
|
11
|
-
import { Logo as
|
|
12
|
-
import { HamburgerMenu as
|
|
13
|
-
import { ShoppingCart as
|
|
14
|
-
import { Account as
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
3
|
+
import { r as yt } from "../../index-BkF-BQ3Q.js";
|
|
4
|
+
import { Text as U } from "../../atoms/Text/Text.js";
|
|
5
|
+
import { Link as j } from "../../atoms/Link/Link.js";
|
|
6
|
+
import { Icon as N } from "../../atoms/Icon/Icon.js";
|
|
7
|
+
import { Flex as H } from "../../atoms/Flex/Flex.js";
|
|
8
|
+
import { Grid as vt, Column as ut } from "../../atoms/Grid/Grid.js";
|
|
9
|
+
import { Input as g } from "../../atoms/Input/Input.js";
|
|
10
|
+
import { InputEndAdornmentButton as $ } from "../../atoms/InputEndAdornmentButton/InputEndAdornmentButton.js";
|
|
11
|
+
import { Logo as Nt } from "../../molecules/Logo/Logo.js";
|
|
12
|
+
import { HamburgerMenu as pt } from "../../molecules/HamburgerMenu/HamburgerMenu.js";
|
|
13
|
+
import { ShoppingCart as xt } from "../../molecules/Cart/Cart.js";
|
|
14
|
+
import { Account as wt } from "../../molecules/Account/Account.js";
|
|
15
|
+
import { Popover as At } from "../../atoms/Popover/Popover.js";
|
|
16
|
+
import { CategoryNav as kt } from "../../molecules/CategoryNav/CategoryNav.js";
|
|
17
|
+
import { SuggestionDropdown as h } from "../SuggestionDropdown/SuggestionDropdown.js";
|
|
18
|
+
import { getHideAtStyles as C } from "../../atoms/HideAt.js";
|
|
19
|
+
import { c as _ } from "../../clsx-OuTLNxxd.js";
|
|
20
|
+
import '../../assets/MainNav.css';const bt = "_main_r1xgh_1", Lt = "_column_r1xgh_8", Kt = "_topNav_r1xgh_13", Dt = "_logo_r1xgh_21", zt = "_operations_r1xgh_24", Bt = "_search_r1xgh_31", Et = "_mobileSearch_r1xgh_37", Ht = "_typeAheadPortal_r1xgh_40", $t = "_siteLink_r1xgh_47", Ft = "_accountArea_r1xgh_74", Rt = "_cartArea_r1xgh_88", Mt = "_cartPopover_r1xgh_94", Ot = "_cartPopoverHidden_r1xgh_106", Ut = "_cartPopoverContent_r1xgh_110", jt = "_category_r1xgh_115", It = "_categoryLink_r1xgh_123", Tt = "_menuList_r1xgh_139", Pt = "_menuItemAction_r1xgh_162", qt = "_shortcutIcon_r1xgh_171", i = {
|
|
21
|
+
main: bt,
|
|
22
|
+
column: Lt,
|
|
23
|
+
topNav: Kt,
|
|
24
|
+
logo: Dt,
|
|
25
|
+
operations: zt,
|
|
26
|
+
search: Bt,
|
|
27
|
+
mobileSearch: Et,
|
|
28
|
+
typeAheadPortal: Ht,
|
|
29
|
+
siteLink: $t,
|
|
30
|
+
accountArea: Ft,
|
|
31
|
+
cartArea: Rt,
|
|
32
|
+
cartPopover: Mt,
|
|
33
|
+
cartPopoverHidden: Ot,
|
|
34
|
+
cartPopoverContent: Ut,
|
|
35
|
+
category: jt,
|
|
36
|
+
categoryLink: It,
|
|
37
|
+
menuList: Tt,
|
|
38
|
+
menuItemAction: Pt,
|
|
39
|
+
shortcutIcon: qt
|
|
40
|
+
}, re = s.forwardRef(function({
|
|
41
|
+
account: F,
|
|
42
|
+
categories: k,
|
|
38
43
|
homeRoute: V,
|
|
39
|
-
faqRoute:
|
|
40
|
-
customPartsRoute:
|
|
41
|
-
aboutUsRoute:
|
|
42
|
-
contactRoute:
|
|
43
|
-
cart:
|
|
44
|
-
open:
|
|
44
|
+
faqRoute: S,
|
|
45
|
+
customPartsRoute: T,
|
|
46
|
+
aboutUsRoute: tt,
|
|
47
|
+
contactRoute: P,
|
|
48
|
+
cart: et,
|
|
49
|
+
open: it,
|
|
45
50
|
// consume external panel control props from CartPropsBase
|
|
46
|
-
className:
|
|
47
|
-
onLoginClick:
|
|
48
|
-
searchInputProps:
|
|
49
|
-
searchValue:
|
|
50
|
-
onSearchValueChange:
|
|
51
|
-
onClearSearch:
|
|
52
|
-
onSearch:
|
|
51
|
+
className: ot,
|
|
52
|
+
onLoginClick: nt,
|
|
53
|
+
searchInputProps: l,
|
|
54
|
+
searchValue: c,
|
|
55
|
+
onSearchValueChange: r,
|
|
56
|
+
onClearSearch: p,
|
|
57
|
+
onSearch: f,
|
|
53
58
|
searchSuggestions: o,
|
|
54
59
|
recentSearches: y,
|
|
55
|
-
onClearRecentSearch:
|
|
56
|
-
onCategoryClick:
|
|
60
|
+
onClearRecentSearch: lt,
|
|
61
|
+
onCategoryClick: D,
|
|
57
62
|
onClickModelSerial: q,
|
|
58
63
|
onCartClick: mt,
|
|
59
|
-
accountPopoverContent:
|
|
60
|
-
isAccountLoading:
|
|
61
|
-
isCategoriesLoading:
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
accountPopoverContent: rt,
|
|
65
|
+
isAccountLoading: dt,
|
|
66
|
+
isCategoriesLoading: ct,
|
|
67
|
+
cartConfirmation: G,
|
|
68
|
+
cartConfirmationVisible: at,
|
|
69
|
+
onCartConfirmationDismiss: R,
|
|
70
|
+
cartConfirmationKey: ft,
|
|
71
|
+
...st
|
|
72
|
+
}, _t) {
|
|
73
|
+
var Z;
|
|
74
|
+
const [Q, M] = s.useState(!1), [d, v] = s.useState(-1), [W, J] = s.useState(), x = s.useRef(null), z = s.useRef(null), u = s.useId(), B = () => {
|
|
66
75
|
var t;
|
|
67
|
-
return (t =
|
|
68
|
-
},
|
|
76
|
+
return (t = x.current) != null && t.offsetParent ? x.current : z.current;
|
|
77
|
+
}, w = Q && !!c && !!o, E = Q && !w && !!(y != null && y.length), b = w ? ((o == null ? void 0 : o.terms.length) ?? 0) + ((o == null ? void 0 : o.categories.length) ?? 0) + (((Z = o == null ? void 0 : o.customParts) == null ? void 0 : Z.length) ?? 0) + ((o == null ? void 0 : o.items.length) ?? 0) : E ? (y == null ? void 0 : y.length) ?? 0 : 0;
|
|
69
78
|
s.useLayoutEffect(() => {
|
|
70
|
-
if (!
|
|
71
|
-
|
|
79
|
+
if (!w && !E) {
|
|
80
|
+
J(void 0);
|
|
72
81
|
return;
|
|
73
82
|
}
|
|
74
83
|
function t() {
|
|
75
|
-
var
|
|
76
|
-
const
|
|
77
|
-
if (!
|
|
78
|
-
const
|
|
79
|
-
|
|
80
|
-
top:
|
|
81
|
-
left:
|
|
82
|
-
width:
|
|
83
|
-
maxHeight: Math.max(0, window.innerHeight -
|
|
84
|
+
var L;
|
|
85
|
+
const n = (L = x.current) != null && L.offsetParent ? x.current : z.current;
|
|
86
|
+
if (!n) return;
|
|
87
|
+
const a = n.getBoundingClientRect();
|
|
88
|
+
J({
|
|
89
|
+
top: a.bottom + 4,
|
|
90
|
+
left: a.left,
|
|
91
|
+
width: a.width,
|
|
92
|
+
maxHeight: Math.max(0, window.innerHeight - a.bottom - 12)
|
|
84
93
|
});
|
|
85
94
|
}
|
|
86
95
|
return t(), window.addEventListener("resize", t), window.addEventListener("scroll", t, !0), () => {
|
|
87
96
|
window.removeEventListener("resize", t), window.removeEventListener("scroll", t, !0);
|
|
88
97
|
};
|
|
89
|
-
}, [
|
|
90
|
-
const
|
|
91
|
-
...
|
|
98
|
+
}, [w, E]);
|
|
99
|
+
const X = {
|
|
100
|
+
...l,
|
|
92
101
|
onChange: (t) => {
|
|
93
|
-
var
|
|
94
|
-
|
|
102
|
+
var n;
|
|
103
|
+
v(-1), (n = l == null ? void 0 : l.onChange) == null || n.call(l, t);
|
|
95
104
|
},
|
|
96
105
|
onFocus: (t) => {
|
|
97
|
-
var
|
|
98
|
-
(
|
|
106
|
+
var n;
|
|
107
|
+
(n = l == null ? void 0 : l.onFocus) == null || n.call(l, t), M(!0);
|
|
99
108
|
},
|
|
100
109
|
onBlur: (t) => {
|
|
101
|
-
var
|
|
102
|
-
(
|
|
110
|
+
var n;
|
|
111
|
+
(n = l == null ? void 0 : l.onBlur) == null || n.call(l, t), M(!1);
|
|
103
112
|
},
|
|
104
113
|
onKeyDown: (t) => {
|
|
105
|
-
var
|
|
106
|
-
if ((
|
|
107
|
-
if (t.key === "ArrowDown" &&
|
|
108
|
-
t.preventDefault(),
|
|
114
|
+
var n, a, L;
|
|
115
|
+
if ((n = l == null ? void 0 : l.onKeyDown) == null || n.call(l, t), !t.defaultPrevented) {
|
|
116
|
+
if (t.key === "ArrowDown" && b > 0) {
|
|
117
|
+
t.preventDefault(), v((K) => K >= b - 1 ? 0 : K + 1);
|
|
109
118
|
return;
|
|
110
119
|
}
|
|
111
|
-
if (t.key === "ArrowUp" &&
|
|
112
|
-
t.preventDefault(),
|
|
120
|
+
if (t.key === "ArrowUp" && b > 0) {
|
|
121
|
+
t.preventDefault(), v((K) => K <= 0 ? b - 1 : K - 1);
|
|
113
122
|
return;
|
|
114
123
|
}
|
|
115
|
-
if (t.key === "Tab" &&
|
|
116
|
-
t.preventDefault(),
|
|
124
|
+
if (t.key === "Tab" && w && d >= 0 && d < ((o == null ? void 0 : o.terms.length) ?? 0)) {
|
|
125
|
+
t.preventDefault(), r == null || r((o == null ? void 0 : o.terms[d].name) ?? ""), v(-1);
|
|
117
126
|
return;
|
|
118
127
|
}
|
|
119
|
-
if (t.key === "Enter" &&
|
|
120
|
-
t.preventDefault(), (
|
|
128
|
+
if (t.key === "Enter" && d >= 0 && d < b) {
|
|
129
|
+
t.preventDefault(), (a = document.getElementById(`${u}-${d}`)) == null || a.click();
|
|
121
130
|
return;
|
|
122
131
|
}
|
|
123
|
-
t.key === "Enter" && (t.preventDefault(), M(!1), (
|
|
132
|
+
t.key === "Enter" && (t.preventDefault(), M(!1), (L = B()) == null || L.blur(), f == null || f(c ?? ""));
|
|
124
133
|
}
|
|
125
134
|
}
|
|
126
|
-
},
|
|
127
|
-
var
|
|
128
|
-
t.key.length !== 1 || t.altKey || t.ctrlKey || t.metaKey || (t.preventDefault(),
|
|
135
|
+
}, Y = (t) => {
|
|
136
|
+
var n;
|
|
137
|
+
t.key.length !== 1 || t.altKey || t.ctrlKey || t.metaKey || (t.preventDefault(), v(-1), r == null || r(`${c ?? ""}${t.key}`), (n = B()) == null || n.focus());
|
|
129
138
|
};
|
|
130
|
-
return /* @__PURE__ */
|
|
131
|
-
/* @__PURE__ */
|
|
132
|
-
/* @__PURE__ */
|
|
133
|
-
|
|
139
|
+
return /* @__PURE__ */ m(O, { children: [
|
|
140
|
+
/* @__PURE__ */ e(vt, { ...st, gridWrapperClassName: _(i.main, ot), children: /* @__PURE__ */ m(ut, { span: 12, className: i.column, children: [
|
|
141
|
+
/* @__PURE__ */ m(
|
|
142
|
+
H,
|
|
134
143
|
{
|
|
135
144
|
flexDirection: "row",
|
|
136
145
|
alignItems: "center",
|
|
137
146
|
justifyContent: "space-between",
|
|
138
|
-
className:
|
|
147
|
+
className: i.topNav,
|
|
139
148
|
children: [
|
|
140
|
-
/* @__PURE__ */
|
|
141
|
-
/* @__PURE__ */
|
|
142
|
-
|
|
149
|
+
/* @__PURE__ */ e("div", { className: i.logo, children: /* @__PURE__ */ e(j, { href: V, children: /* @__PURE__ */ e(Nt, {}) }) }),
|
|
150
|
+
/* @__PURE__ */ m(
|
|
151
|
+
H,
|
|
143
152
|
{
|
|
144
153
|
flexDirection: "row",
|
|
145
154
|
alignItems: "center",
|
|
146
155
|
justifyContent: "flex-end",
|
|
147
|
-
className:
|
|
156
|
+
className: i.operations,
|
|
148
157
|
children: [
|
|
149
|
-
/* @__PURE__ */
|
|
150
|
-
|
|
158
|
+
/* @__PURE__ */ e(H, { flexDirection: "row", hideAt: ["sm"], className: i.search, children: /* @__PURE__ */ e(
|
|
159
|
+
g,
|
|
151
160
|
{
|
|
152
161
|
variant: "search",
|
|
153
162
|
label: "Search",
|
|
@@ -155,106 +164,120 @@ import '../../assets/MainNav.css';const wt = "_main_abc65_1", kt = "_column_abc6
|
|
|
155
164
|
name: "cpc-search",
|
|
156
165
|
autoComplete: "off",
|
|
157
166
|
"aria-autocomplete": "list",
|
|
158
|
-
"aria-controls":
|
|
159
|
-
"aria-activedescendant":
|
|
160
|
-
...
|
|
161
|
-
ref:
|
|
162
|
-
value:
|
|
163
|
-
endAdornment: /* @__PURE__ */
|
|
164
|
-
!!
|
|
165
|
-
|
|
167
|
+
"aria-controls": u,
|
|
168
|
+
"aria-activedescendant": d >= 0 ? `${u}-${d}` : void 0,
|
|
169
|
+
...X,
|
|
170
|
+
ref: x,
|
|
171
|
+
value: c,
|
|
172
|
+
endAdornment: /* @__PURE__ */ m(O, { children: [
|
|
173
|
+
!!c && /* @__PURE__ */ e(
|
|
174
|
+
$,
|
|
166
175
|
{
|
|
167
176
|
"aria-label": "Clear search",
|
|
168
177
|
onMouseDown: (t) => t.preventDefault(),
|
|
169
178
|
onClick: () => {
|
|
170
179
|
var t;
|
|
171
|
-
|
|
180
|
+
v(-1), p == null || p(), (t = x.current) == null || t.focus();
|
|
172
181
|
},
|
|
173
182
|
iconProps: { iconKey: "fa-regular fa-xmark", size: "sm" }
|
|
174
183
|
}
|
|
175
184
|
),
|
|
176
|
-
/* @__PURE__ */
|
|
177
|
-
|
|
185
|
+
/* @__PURE__ */ e(
|
|
186
|
+
$,
|
|
178
187
|
{
|
|
179
188
|
"aria-label": "Submit search",
|
|
180
|
-
onClick: () =>
|
|
189
|
+
onClick: () => f == null ? void 0 : f(c ?? ""),
|
|
181
190
|
iconProps: { iconKey: "fa-regular fa-magnifying-glass", size: "sm" }
|
|
182
191
|
}
|
|
183
192
|
)
|
|
184
193
|
] })
|
|
185
194
|
}
|
|
186
195
|
) }),
|
|
187
|
-
/* @__PURE__ */
|
|
188
|
-
/* @__PURE__ */
|
|
196
|
+
/* @__PURE__ */ m("button", { onClick: q, className: _(i.siteLink, C(["sm", "md"])), children: [
|
|
197
|
+
/* @__PURE__ */ e(N, { iconKey: "fa-regular fa-sparkles", size: "sm" }),
|
|
189
198
|
"Identify a Part"
|
|
190
199
|
] }),
|
|
191
|
-
/* @__PURE__ */
|
|
192
|
-
/* @__PURE__ */
|
|
193
|
-
/* @__PURE__ */
|
|
194
|
-
|
|
200
|
+
/* @__PURE__ */ e(A, { href: T, hideAt: ["sm", "md"], children: "Custom Parts" }),
|
|
201
|
+
/* @__PURE__ */ e(A, { href: P, hideAt: ["sm", "md"], children: "Contact Us" }),
|
|
202
|
+
/* @__PURE__ */ e("div", { className: i.accountArea, children: /* @__PURE__ */ e(
|
|
203
|
+
wt,
|
|
195
204
|
{
|
|
196
|
-
account:
|
|
197
|
-
onLoginClick:
|
|
198
|
-
className:
|
|
199
|
-
popoverContent:
|
|
200
|
-
isAccountLoading:
|
|
205
|
+
account: F,
|
|
206
|
+
onLoginClick: nt,
|
|
207
|
+
className: i.avatar,
|
|
208
|
+
popoverContent: rt,
|
|
209
|
+
isAccountLoading: dt
|
|
201
210
|
}
|
|
202
211
|
) }),
|
|
203
|
-
/* @__PURE__ */
|
|
204
|
-
|
|
212
|
+
/* @__PURE__ */ e(
|
|
213
|
+
At,
|
|
205
214
|
{
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
215
|
+
trigger: /* @__PURE__ */ e("div", { className: i.cartArea, children: /* @__PURE__ */ e(
|
|
216
|
+
xt,
|
|
217
|
+
{
|
|
218
|
+
ref: _t,
|
|
219
|
+
cart: et,
|
|
220
|
+
open: it,
|
|
221
|
+
onCartClick: mt,
|
|
222
|
+
splashKey: ft
|
|
223
|
+
}
|
|
224
|
+
) }),
|
|
225
|
+
position: "bottom right",
|
|
226
|
+
open: !!G,
|
|
227
|
+
onOpenChange: (t) => {
|
|
228
|
+
t || R == null || R();
|
|
229
|
+
},
|
|
230
|
+
popoverClassName: _(i.cartPopover, !at && i.cartPopoverHidden),
|
|
231
|
+
contentClassName: i.cartPopoverContent,
|
|
232
|
+
children: G
|
|
210
233
|
}
|
|
211
234
|
),
|
|
212
|
-
/* @__PURE__ */
|
|
213
|
-
/* @__PURE__ */
|
|
214
|
-
/* @__PURE__ */
|
|
215
|
-
/* @__PURE__ */
|
|
216
|
-
/* @__PURE__ */
|
|
235
|
+
/* @__PURE__ */ m(pt, { hideAt: ["lg"], children: [
|
|
236
|
+
/* @__PURE__ */ m("section", { children: [
|
|
237
|
+
/* @__PURE__ */ e(U, { size: "md", weight: "semibold", children: "Useful shortcuts" }),
|
|
238
|
+
/* @__PURE__ */ m("ul", { className: i.menuList, children: [
|
|
239
|
+
/* @__PURE__ */ e("li", { className: i.menuItem, children: /* @__PURE__ */ m(
|
|
217
240
|
"button",
|
|
218
241
|
{
|
|
219
242
|
onClick: q,
|
|
220
243
|
"data-hamburger-close": "true",
|
|
221
|
-
className:
|
|
244
|
+
className: _(i.siteLink, i.menuItemAction, C(["lg"])),
|
|
222
245
|
children: [
|
|
223
|
-
/* @__PURE__ */
|
|
246
|
+
/* @__PURE__ */ e(N, { iconKey: "fa-regular fa-sparkles", size: "sm", className: i.shortcutIcon }),
|
|
224
247
|
"Identify a Part"
|
|
225
248
|
]
|
|
226
249
|
}
|
|
227
250
|
) }),
|
|
228
|
-
/* @__PURE__ */
|
|
229
|
-
/* @__PURE__ */
|
|
251
|
+
/* @__PURE__ */ e("li", { className: i.menuItem, children: /* @__PURE__ */ m(A, { href: T, className: _(i.siteLink, i.menuItemAction), children: [
|
|
252
|
+
/* @__PURE__ */ e(N, { iconKey: "fa-regular fa-screwdriver-wrench", size: "sm", className: i.shortcutIcon }),
|
|
230
253
|
"Custom Parts"
|
|
231
254
|
] }) }),
|
|
232
|
-
/* @__PURE__ */
|
|
233
|
-
/* @__PURE__ */
|
|
255
|
+
/* @__PURE__ */ e("li", { className: i.menuItem, children: /* @__PURE__ */ m(A, { href: P, className: _(i.siteLink, i.menuItemAction), children: [
|
|
256
|
+
/* @__PURE__ */ e(N, { iconKey: "fa-regular fa-envelope", size: "sm", className: i.shortcutIcon }),
|
|
234
257
|
"Contact Us"
|
|
235
258
|
] }) }),
|
|
236
|
-
/* @__PURE__ */
|
|
237
|
-
/* @__PURE__ */
|
|
259
|
+
/* @__PURE__ */ e("li", { className: i.menuItem, children: /* @__PURE__ */ m(A, { href: S, className: _(i.siteLink, i.menuItemAction), children: [
|
|
260
|
+
/* @__PURE__ */ e(N, { iconKey: "fa-solid fa-question", size: "sm", className: i.shortcutIcon }),
|
|
238
261
|
"FAQ"
|
|
239
262
|
] }) }),
|
|
240
|
-
/* @__PURE__ */
|
|
241
|
-
/* @__PURE__ */
|
|
263
|
+
/* @__PURE__ */ e("li", { className: i.menuItem, children: /* @__PURE__ */ m(A, { href: tt, className: _(i.siteLink, i.menuItemAction), children: [
|
|
264
|
+
/* @__PURE__ */ e(N, { iconKey: "fa-regular fa-people-group", size: "sm", className: i.shortcutIcon }),
|
|
242
265
|
"About Us"
|
|
243
266
|
] }) })
|
|
244
267
|
] })
|
|
245
268
|
] }),
|
|
246
|
-
/* @__PURE__ */
|
|
247
|
-
/* @__PURE__ */
|
|
248
|
-
/* @__PURE__ */
|
|
249
|
-
|
|
269
|
+
/* @__PURE__ */ m("section", { children: [
|
|
270
|
+
/* @__PURE__ */ e(U, { size: "md", weight: "semibold", children: "Shop by category" }),
|
|
271
|
+
/* @__PURE__ */ e("ul", { className: i.menuList, children: k && k.map((t) => /* @__PURE__ */ e("li", { className: i.category, children: /* @__PURE__ */ m(
|
|
272
|
+
j,
|
|
250
273
|
{
|
|
251
274
|
href: t.route,
|
|
252
|
-
className:
|
|
253
|
-
onClick: () =>
|
|
275
|
+
className: i.categoryLink,
|
|
276
|
+
onClick: () => D == null ? void 0 : D(t),
|
|
254
277
|
children: [
|
|
255
|
-
/* @__PURE__ */
|
|
256
|
-
/* @__PURE__ */
|
|
257
|
-
|
|
278
|
+
/* @__PURE__ */ e(U, { size: "sm", children: t.label }),
|
|
279
|
+
/* @__PURE__ */ e(
|
|
280
|
+
N,
|
|
258
281
|
{
|
|
259
282
|
iconKey: "fa-solid fa-chevron-right",
|
|
260
283
|
title: "Navigate",
|
|
@@ -272,8 +295,8 @@ import '../../assets/MainNav.css';const wt = "_main_abc65_1", kt = "_column_abc6
|
|
|
272
295
|
]
|
|
273
296
|
}
|
|
274
297
|
),
|
|
275
|
-
/* @__PURE__ */
|
|
276
|
-
|
|
298
|
+
/* @__PURE__ */ e(H, { flexDirection: "row", hideAt: ["md", "lg"], className: i.mobileSearch, children: /* @__PURE__ */ e("div", { className: i.search, children: /* @__PURE__ */ e(
|
|
299
|
+
g,
|
|
277
300
|
{
|
|
278
301
|
variant: "search",
|
|
279
302
|
label: "Search",
|
|
@@ -281,79 +304,79 @@ import '../../assets/MainNav.css';const wt = "_main_abc65_1", kt = "_column_abc6
|
|
|
281
304
|
name: "cpc-search",
|
|
282
305
|
autoComplete: "off",
|
|
283
306
|
"aria-autocomplete": "list",
|
|
284
|
-
"aria-controls":
|
|
285
|
-
"aria-activedescendant":
|
|
286
|
-
...
|
|
307
|
+
"aria-controls": u,
|
|
308
|
+
"aria-activedescendant": d >= 0 ? `${u}-${d}` : void 0,
|
|
309
|
+
...X,
|
|
287
310
|
ref: z,
|
|
288
|
-
value:
|
|
289
|
-
endAdornment: /* @__PURE__ */
|
|
290
|
-
!!
|
|
291
|
-
|
|
311
|
+
value: c,
|
|
312
|
+
endAdornment: /* @__PURE__ */ m(O, { children: [
|
|
313
|
+
!!c && /* @__PURE__ */ e(
|
|
314
|
+
$,
|
|
292
315
|
{
|
|
293
316
|
"aria-label": "Clear search",
|
|
294
317
|
onMouseDown: (t) => t.preventDefault(),
|
|
295
318
|
onClick: () => {
|
|
296
319
|
var t;
|
|
297
|
-
|
|
320
|
+
v(-1), p == null || p(), (t = z.current) == null || t.focus();
|
|
298
321
|
},
|
|
299
322
|
iconProps: { iconKey: "fa-regular fa-xmark", size: "sm" }
|
|
300
323
|
}
|
|
301
324
|
),
|
|
302
|
-
/* @__PURE__ */
|
|
303
|
-
|
|
325
|
+
/* @__PURE__ */ e(
|
|
326
|
+
$,
|
|
304
327
|
{
|
|
305
328
|
"aria-label": "Submit search",
|
|
306
|
-
onClick: () =>
|
|
329
|
+
onClick: () => f == null ? void 0 : f(c ?? ""),
|
|
307
330
|
iconProps: { iconKey: "fa-regular fa-magnifying-glass", size: "sm" }
|
|
308
331
|
}
|
|
309
332
|
)
|
|
310
333
|
] })
|
|
311
334
|
}
|
|
312
335
|
) }) }),
|
|
313
|
-
/* @__PURE__ */
|
|
314
|
-
|
|
336
|
+
/* @__PURE__ */ e(
|
|
337
|
+
kt,
|
|
315
338
|
{
|
|
316
|
-
categories:
|
|
317
|
-
isCategoriesLoading:
|
|
318
|
-
onCategoryClick:
|
|
339
|
+
categories: k,
|
|
340
|
+
isCategoriesLoading: ct,
|
|
341
|
+
onCategoryClick: D
|
|
319
342
|
}
|
|
320
343
|
)
|
|
321
344
|
] }) }),
|
|
322
|
-
|
|
323
|
-
/* @__PURE__ */
|
|
345
|
+
W && typeof document < "u" && yt.createPortal(
|
|
346
|
+
/* @__PURE__ */ m(
|
|
324
347
|
"div",
|
|
325
348
|
{
|
|
326
|
-
className:
|
|
327
|
-
style:
|
|
349
|
+
className: i.typeAheadPortal,
|
|
350
|
+
style: W,
|
|
328
351
|
children: [
|
|
329
|
-
|
|
330
|
-
|
|
352
|
+
w && o && /* @__PURE__ */ e(
|
|
353
|
+
h,
|
|
331
354
|
{
|
|
332
355
|
...o,
|
|
333
|
-
activeOptionIndex:
|
|
334
|
-
optionIdPrefix:
|
|
335
|
-
onKeyDown:
|
|
356
|
+
activeOptionIndex: d,
|
|
357
|
+
optionIdPrefix: u,
|
|
358
|
+
onKeyDown: Y,
|
|
336
359
|
onSuggestionClick: (t) => {
|
|
337
|
-
var
|
|
338
|
-
(
|
|
360
|
+
var n, a;
|
|
361
|
+
(n = o.onSuggestionClick) == null || n.call(o, t), r == null || r((t == null ? void 0 : t.name) ?? c ?? ""), (a = B()) == null || a.blur();
|
|
339
362
|
}
|
|
340
363
|
}
|
|
341
364
|
),
|
|
342
|
-
E && /* @__PURE__ */
|
|
343
|
-
|
|
365
|
+
E && /* @__PURE__ */ e(
|
|
366
|
+
h,
|
|
344
367
|
{
|
|
345
368
|
terms: [],
|
|
346
369
|
categories: [],
|
|
347
370
|
items: [],
|
|
348
371
|
view: "recent-searches",
|
|
349
372
|
recentSearches: y,
|
|
350
|
-
onClearRecentSearch:
|
|
351
|
-
activeOptionIndex:
|
|
352
|
-
optionIdPrefix:
|
|
353
|
-
onKeyDown:
|
|
373
|
+
onClearRecentSearch: lt,
|
|
374
|
+
activeOptionIndex: d,
|
|
375
|
+
optionIdPrefix: u,
|
|
376
|
+
onKeyDown: Y,
|
|
354
377
|
onSuggestionClick: (t) => {
|
|
355
|
-
var
|
|
356
|
-
|
|
378
|
+
var n;
|
|
379
|
+
r == null || r((t == null ? void 0 : t.term) ?? c ?? ""), (n = B()) == null || n.blur();
|
|
357
380
|
}
|
|
358
381
|
}
|
|
359
382
|
)
|
|
@@ -364,13 +387,13 @@ import '../../assets/MainNav.css';const wt = "_main_abc65_1", kt = "_column_abc6
|
|
|
364
387
|
)
|
|
365
388
|
] });
|
|
366
389
|
});
|
|
367
|
-
function
|
|
390
|
+
function A({
|
|
368
391
|
href: I,
|
|
369
|
-
children:
|
|
370
|
-
...
|
|
392
|
+
children: F,
|
|
393
|
+
...k
|
|
371
394
|
}) {
|
|
372
|
-
return /* @__PURE__ */
|
|
395
|
+
return /* @__PURE__ */ e(j, { href: I, className: i.siteLink, ...k, children: F });
|
|
373
396
|
}
|
|
374
397
|
export {
|
|
375
|
-
|
|
398
|
+
re as MainNav
|
|
376
399
|
};
|