@caseparts-org/caseblocks 0.0.278 → 0.0.279

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.
@@ -1,129 +1,151 @@
1
- import { jsx as m, jsxs as d, Fragment as Y } from "react/jsx-runtime";
2
- import D from "react";
3
- import { Text as I } from "../../atoms/Text/Text.js";
4
- import { Link as U } from "../../atoms/Link/Link.js";
5
- import { Icon as k } from "../../atoms/Icon/Icon.js";
6
- import { Flex as u } from "../../atoms/Flex/Flex.js";
7
- import { Grid as ei, Column as ci } from "../../atoms/Grid/Grid.js";
1
+ import { jsxs as n, Fragment as U, jsx as i } from "react/jsx-runtime";
2
+ import s from "react";
3
+ import { r as ct } from "../../index-BkF-BQ3Q.js";
4
+ import { Text as j } from "../../atoms/Text/Text.js";
5
+ import { Link as M } from "../../atoms/Link/Link.js";
6
+ import { Icon as N } from "../../atoms/Icon/Icon.js";
7
+ import { Flex as $ } from "../../atoms/Flex/Flex.js";
8
+ import { Grid as at, Column as st } from "../../atoms/Grid/Grid.js";
8
9
  import { Input as Z } from "../../atoms/Input/Input.js";
9
- import { InputEndAdornmentButton as B } from "../../atoms/InputEndAdornmentButton/InputEndAdornmentButton.js";
10
- import { Logo as ri } from "../../molecules/Logo/Logo.js";
11
- import { HamburgerMenu as si } from "../../molecules/HamburgerMenu/HamburgerMenu.js";
12
- import { ShoppingCart as _i } from "../../molecules/Cart/Cart.js";
13
- import { Account as Ni } from "../../molecules/Account/Account.js";
14
- import { CategoryNav as yi } from "../../molecules/CategoryNav/CategoryNav.js";
15
- import { SuggestionDropdown as O } from "../SuggestionDropdown/SuggestionDropdown.js";
16
- import { getHideAtStyles as C } from "../../atoms/HideAt.js";
17
- import { c as w } from "../../clsx-OuTLNxxd.js";
18
- import '../../assets/MainNav.css';const ki = "_main_12974_1", wi = "_column_12974_8", ai = "_topNav_12974_13", Di = "_logo_12974_21", Ai = "_operations_12974_24", bi = "_search_12974_31", vi = "_mobileSearch_12974_36", xi = "_suggestionDropdown_12974_39", Li = "_siteLink_12974_45", Ki = "_accountArea_12974_72", pi = "_category_12974_84", zi = "_categoryLink_12974_92", ui = "_menuList_12974_108", Bi = "_menuItemAction_12974_131", Oi = "_shortcutIcon_12974_140", t = {
19
- main: ki,
20
- column: wi,
21
- topNav: ai,
22
- logo: Di,
23
- operations: Ai,
24
- search: bi,
25
- mobileSearch: vi,
26
- suggestionDropdown: xi,
27
- siteLink: Li,
28
- accountArea: Ki,
29
- category: pi,
30
- categoryLink: zi,
31
- menuList: ui,
32
- menuItemAction: Bi,
33
- shortcutIcon: Oi
34
- }, Zi = D.forwardRef(function({
35
- account: $,
36
- categories: b,
37
- homeRoute: P,
38
- faqRoute: V,
39
- customPartsRoute: M,
40
- aboutUsRoute: g,
41
- contactRoute: R,
42
- cart: h,
43
- open: S,
10
+ import { InputEndAdornmentButton as F } from "../../atoms/InputEndAdornmentButton/InputEndAdornmentButton.js";
11
+ import { Logo as yt } from "../../molecules/Logo/Logo.js";
12
+ import { HamburgerMenu as ut } from "../../molecules/HamburgerMenu/HamburgerMenu.js";
13
+ import { ShoppingCart as _t } from "../../molecules/Cart/Cart.js";
14
+ import { Account as Nt } from "../../molecules/Account/Account.js";
15
+ import { CategoryNav as kt } from "../../molecules/CategoryNav/CategoryNav.js";
16
+ import { SuggestionDropdown as C } from "../SuggestionDropdown/SuggestionDropdown.js";
17
+ import { getHideAtStyles as P } from "../../atoms/HideAt.js";
18
+ import { c as k } from "../../clsx-OuTLNxxd.js";
19
+ import '../../assets/MainNav.css';const wt = "_main_o3lxf_1", xt = "_column_o3lxf_8", At = "_topNav_o3lxf_13", bt = "_logo_o3lxf_21", vt = "_operations_o3lxf_24", Lt = "_search_o3lxf_31", pt = "_mobileSearch_o3lxf_37", Dt = "_typeAheadPortal_o3lxf_40", Kt = "_siteLink_o3lxf_44", zt = "_accountArea_o3lxf_71", Et = "_category_o3lxf_83", Bt = "_categoryLink_o3lxf_91", $t = "_menuList_o3lxf_107", Ft = "_menuItemAction_o3lxf_130", Rt = "_shortcutIcon_o3lxf_139", o = {
20
+ main: wt,
21
+ column: xt,
22
+ topNav: At,
23
+ logo: bt,
24
+ operations: vt,
25
+ search: Lt,
26
+ mobileSearch: pt,
27
+ typeAheadPortal: Dt,
28
+ siteLink: Kt,
29
+ accountArea: zt,
30
+ category: Et,
31
+ categoryLink: Bt,
32
+ menuList: $t,
33
+ menuItemAction: Ft,
34
+ shortcutIcon: Rt
35
+ }, gt = s.forwardRef(function({
36
+ account: R,
37
+ categories: v,
38
+ homeRoute: V,
39
+ faqRoute: g,
40
+ customPartsRoute: H,
41
+ aboutUsRoute: h,
42
+ contactRoute: I,
43
+ cart: S,
44
+ open: tt,
44
45
  // consume external panel control props from CartPropsBase
45
- className: ii,
46
- onLoginClick: ti,
47
- searchInputProps: l,
48
- searchValue: c,
46
+ className: it,
47
+ onLoginClick: ot,
48
+ searchInputProps: m,
49
+ searchValue: r,
49
50
  onSearchValueChange: f,
50
- onClearSearch: a,
51
- onSearch: r,
52
- searchSuggestions: o,
53
- recentSearches: _,
54
- onClearRecentSearch: H,
51
+ onClearSearch: w,
52
+ onSearch: c,
53
+ searchSuggestions: e,
54
+ recentSearches: y,
55
+ onClearRecentSearch: et,
55
56
  onCategoryClick: K,
56
- onClickModelSerial: T,
57
- onCartClick: mi,
58
- accountPopoverContent: oi,
59
- isAccountLoading: li,
60
- isCategoriesLoading: ni,
61
- ...fi
62
- }, di) {
63
- var W;
64
- const [q, N] = D.useState(!1), [e, y] = D.useState(-1), p = D.useRef(null), F = D.useRef(null), s = D.useId(), G = () => {
65
- var i;
66
- return (i = p.current) != null && i.offsetParent ? p.current : F.current;
67
- }, v = q && !!c && !!o, E = q && !v && !!(_ != null && _.length), x = v ? ((o == null ? void 0 : o.terms.length) ?? 0) + ((o == null ? void 0 : o.categories.length) ?? 0) + (((W = o == null ? void 0 : o.customParts) == null ? void 0 : W.length) ?? 0) + ((o == null ? void 0 : o.items.length) ?? 0) : E ? (_ == null ? void 0 : _.length) ?? 0 : 0, Q = {
68
- ...l,
69
- onChange: (i) => {
70
- var n;
71
- y(-1), (n = l == null ? void 0 : l.onChange) == null || n.call(l, i);
57
+ onClickModelSerial: q,
58
+ onCartClick: lt,
59
+ accountPopoverContent: mt,
60
+ isAccountLoading: nt,
61
+ isCategoriesLoading: ft,
62
+ ...dt
63
+ }, rt) {
64
+ var Y;
65
+ const [G, O] = s.useState(!1), [d, u] = s.useState(-1), [Q, W] = s.useState(), x = s.useRef(null), z = s.useRef(null), _ = s.useId(), E = () => {
66
+ var t;
67
+ return (t = x.current) != null && t.offsetParent ? x.current : z.current;
68
+ }, A = G && !!r && !!e, B = G && !A && !!(y != null && y.length), L = A ? ((e == null ? void 0 : e.terms.length) ?? 0) + ((e == null ? void 0 : e.categories.length) ?? 0) + (((Y = e == null ? void 0 : e.customParts) == null ? void 0 : Y.length) ?? 0) + ((e == null ? void 0 : e.items.length) ?? 0) : B ? (y == null ? void 0 : y.length) ?? 0 : 0;
69
+ s.useLayoutEffect(() => {
70
+ if (!A && !B) {
71
+ W(void 0);
72
+ return;
73
+ }
74
+ function t() {
75
+ var p;
76
+ const l = (p = x.current) != null && p.offsetParent ? x.current : z.current;
77
+ if (!l) return;
78
+ const a = l.getBoundingClientRect();
79
+ W({
80
+ top: a.bottom + 4,
81
+ left: a.left,
82
+ width: a.width
83
+ });
84
+ }
85
+ return t(), window.addEventListener("resize", t), window.addEventListener("scroll", t, !0), () => {
86
+ window.removeEventListener("resize", t), window.removeEventListener("scroll", t, !0);
87
+ };
88
+ }, [A, B]);
89
+ const J = {
90
+ ...m,
91
+ onChange: (t) => {
92
+ var l;
93
+ u(-1), (l = m == null ? void 0 : m.onChange) == null || l.call(m, t);
72
94
  },
73
- onFocus: (i) => {
74
- var n;
75
- (n = l == null ? void 0 : l.onFocus) == null || n.call(l, i), N(!0);
95
+ onFocus: (t) => {
96
+ var l;
97
+ (l = m == null ? void 0 : m.onFocus) == null || l.call(m, t), O(!0);
76
98
  },
77
- onBlur: (i) => {
78
- var n;
79
- (n = l == null ? void 0 : l.onBlur) == null || n.call(l, i), N(!1);
99
+ onBlur: (t) => {
100
+ var l;
101
+ (l = m == null ? void 0 : m.onBlur) == null || l.call(m, t), O(!1);
80
102
  },
81
- onKeyDown: (i) => {
82
- var n, J, X;
83
- if ((n = l == null ? void 0 : l.onKeyDown) == null || n.call(l, i), !i.defaultPrevented) {
84
- if (i.key === "ArrowDown" && x > 0) {
85
- i.preventDefault(), y((L) => L >= x - 1 ? 0 : L + 1);
103
+ onKeyDown: (t) => {
104
+ var l, a, p;
105
+ if ((l = m == null ? void 0 : m.onKeyDown) == null || l.call(m, t), !t.defaultPrevented) {
106
+ if (t.key === "ArrowDown" && L > 0) {
107
+ t.preventDefault(), u((D) => D >= L - 1 ? 0 : D + 1);
86
108
  return;
87
109
  }
88
- if (i.key === "ArrowUp" && x > 0) {
89
- i.preventDefault(), y((L) => L <= 0 ? x - 1 : L - 1);
110
+ if (t.key === "ArrowUp" && L > 0) {
111
+ t.preventDefault(), u((D) => D <= 0 ? L - 1 : D - 1);
90
112
  return;
91
113
  }
92
- if (i.key === "Tab" && v && e >= 0 && e < ((o == null ? void 0 : o.terms.length) ?? 0)) {
93
- i.preventDefault(), f == null || f((o == null ? void 0 : o.terms[e].name) ?? ""), y(-1);
114
+ if (t.key === "Tab" && A && d >= 0 && d < ((e == null ? void 0 : e.terms.length) ?? 0)) {
115
+ t.preventDefault(), f == null || f((e == null ? void 0 : e.terms[d].name) ?? ""), u(-1);
94
116
  return;
95
117
  }
96
- if (i.key === "Enter" && e >= 0 && e < x) {
97
- i.preventDefault(), (J = document.getElementById(`${s}-${e}`)) == null || J.click();
118
+ if (t.key === "Enter" && d >= 0 && d < L) {
119
+ t.preventDefault(), (a = document.getElementById(`${_}-${d}`)) == null || a.click();
98
120
  return;
99
121
  }
100
- i.key === "Enter" && (i.preventDefault(), N(!1), (X = G()) == null || X.blur(), r == null || r(c ?? ""));
122
+ t.key === "Enter" && (t.preventDefault(), O(!1), (p = E()) == null || p.blur(), c == null || c(r ?? ""));
101
123
  }
102
124
  }
103
- }, z = (i) => {
104
- var n;
105
- i.key.length !== 1 || i.altKey || i.ctrlKey || i.metaKey || (i.preventDefault(), y(-1), f == null || f(`${c ?? ""}${i.key}`), (n = G()) == null || n.focus());
125
+ }, X = (t) => {
126
+ var l;
127
+ t.key.length !== 1 || t.altKey || t.ctrlKey || t.metaKey || (t.preventDefault(), u(-1), f == null || f(`${r ?? ""}${t.key}`), (l = E()) == null || l.focus());
106
128
  };
107
- return /* @__PURE__ */ m(ei, { ...fi, gridWrapperClassName: w(t.main, ii), children: /* @__PURE__ */ d(ci, { span: 12, className: t.column, children: [
108
- /* @__PURE__ */ d(
109
- u,
110
- {
111
- flexDirection: "row",
112
- alignItems: "center",
113
- justifyContent: "space-between",
114
- className: t.topNav,
115
- children: [
116
- /* @__PURE__ */ m("div", { className: t.logo, children: /* @__PURE__ */ m(U, { href: P, children: /* @__PURE__ */ m(ri, {}) }) }),
117
- /* @__PURE__ */ d(
118
- u,
119
- {
120
- flexDirection: "row",
121
- alignItems: "center",
122
- justifyContent: "flex-end",
123
- className: t.operations,
124
- children: [
125
- /* @__PURE__ */ d(u, { flexDirection: "row", hideAt: ["sm"], className: t.search, children: [
126
- /* @__PURE__ */ m(
129
+ return /* @__PURE__ */ n(U, { children: [
130
+ /* @__PURE__ */ i(at, { ...dt, gridWrapperClassName: k(o.main, it), children: /* @__PURE__ */ n(st, { span: 12, className: o.column, children: [
131
+ /* @__PURE__ */ n(
132
+ $,
133
+ {
134
+ flexDirection: "row",
135
+ alignItems: "center",
136
+ justifyContent: "space-between",
137
+ className: o.topNav,
138
+ children: [
139
+ /* @__PURE__ */ i("div", { className: o.logo, children: /* @__PURE__ */ i(M, { href: V, children: /* @__PURE__ */ i(yt, {}) }) }),
140
+ /* @__PURE__ */ n(
141
+ $,
142
+ {
143
+ flexDirection: "row",
144
+ alignItems: "center",
145
+ justifyContent: "flex-end",
146
+ className: o.operations,
147
+ children: [
148
+ /* @__PURE__ */ i($, { flexDirection: "row", hideAt: ["sm"], className: o.search, children: /* @__PURE__ */ i(
127
149
  Z,
128
150
  {
129
151
  variant: "search",
@@ -132,158 +154,124 @@ import '../../assets/MainNav.css';const ki = "_main_12974_1", wi = "_column_1297
132
154
  name: "cpc-search",
133
155
  autoComplete: "off",
134
156
  "aria-autocomplete": "list",
135
- "aria-controls": s,
136
- "aria-activedescendant": e >= 0 ? `${s}-${e}` : void 0,
137
- ...Q,
138
- ref: p,
139
- value: c,
140
- endAdornment: /* @__PURE__ */ d(Y, { children: [
141
- !!c && /* @__PURE__ */ m(
142
- B,
157
+ "aria-controls": _,
158
+ "aria-activedescendant": d >= 0 ? `${_}-${d}` : void 0,
159
+ ...J,
160
+ ref: x,
161
+ value: r,
162
+ endAdornment: /* @__PURE__ */ n(U, { children: [
163
+ !!r && /* @__PURE__ */ i(
164
+ F,
143
165
  {
144
166
  "aria-label": "Clear search",
145
- onMouseDown: (i) => i.preventDefault(),
167
+ onMouseDown: (t) => t.preventDefault(),
146
168
  onClick: () => {
147
- var i;
148
- y(-1), a == null || a(), (i = p.current) == null || i.focus();
169
+ var t;
170
+ u(-1), w == null || w(), (t = x.current) == null || t.focus();
149
171
  },
150
172
  iconProps: { iconKey: "fa-regular fa-xmark", size: "sm" }
151
173
  }
152
174
  ),
153
- /* @__PURE__ */ m(
154
- B,
175
+ /* @__PURE__ */ i(
176
+ F,
155
177
  {
156
178
  "aria-label": "Submit search",
157
- onClick: () => r == null ? void 0 : r(c ?? ""),
179
+ onClick: () => c == null ? void 0 : c(r ?? ""),
158
180
  iconProps: { iconKey: "fa-regular fa-magnifying-glass", size: "sm" }
159
181
  }
160
182
  )
161
183
  ] })
162
184
  }
163
- ),
164
- v && o && /* @__PURE__ */ m(
165
- O,
185
+ ) }),
186
+ /* @__PURE__ */ n("button", { onClick: q, className: k(o.siteLink, P(["sm", "md"])), children: [
187
+ /* @__PURE__ */ i(N, { iconKey: "fa-regular fa-sparkles", size: "sm" }),
188
+ "Ask Our Experts"
189
+ ] }),
190
+ /* @__PURE__ */ i(b, { href: H, hideAt: ["sm", "md"], children: "Custom Parts" }),
191
+ /* @__PURE__ */ i(b, { href: I, hideAt: ["sm", "md"], children: "Contact Us" }),
192
+ /* @__PURE__ */ i("div", { className: o.accountArea, children: /* @__PURE__ */ i(
193
+ Nt,
166
194
  {
167
- ...o,
168
- activeOptionIndex: e,
169
- optionIdPrefix: s,
170
- onKeyDown: z,
171
- onSuggestionClick: (i) => {
172
- var n;
173
- (n = o.onSuggestionClick) == null || n.call(o, i), f == null || f((i == null ? void 0 : i.name) ?? c ?? ""), N(!1);
174
- },
175
- className: t.suggestionDropdown
195
+ account: R,
196
+ onLoginClick: ot,
197
+ className: o.avatar,
198
+ popoverContent: mt,
199
+ isAccountLoading: nt
176
200
  }
177
- ),
178
- E && /* @__PURE__ */ m(
179
- O,
201
+ ) }),
202
+ /* @__PURE__ */ i(
203
+ _t,
180
204
  {
181
- terms: [],
182
- categories: [],
183
- items: [],
184
- view: "recent-searches",
185
- recentSearches: _,
186
- onClearRecentSearch: H,
187
- activeOptionIndex: e,
188
- optionIdPrefix: s,
189
- onKeyDown: z,
190
- onSuggestionClick: (i) => {
191
- f == null || f((i == null ? void 0 : i.term) ?? c ?? ""), N(!1);
192
- },
193
- className: t.suggestionDropdown
205
+ ref: rt,
206
+ cart: S,
207
+ open: tt,
208
+ onCartClick: lt
194
209
  }
195
- )
196
- ] }),
197
- /* @__PURE__ */ d("button", { onClick: T, className: w(t.siteLink, C(["sm", "md"])), children: [
198
- /* @__PURE__ */ m(k, { iconKey: "fa-regular fa-sparkles", size: "sm" }),
199
- "Ask Our Experts"
200
- ] }),
201
- /* @__PURE__ */ m(A, { href: M, hideAt: ["sm", "md"], children: "Custom Parts" }),
202
- /* @__PURE__ */ m(A, { href: R, hideAt: ["sm", "md"], children: "Contact Us" }),
203
- /* @__PURE__ */ m("div", { className: t.accountArea, children: /* @__PURE__ */ m(
204
- Ni,
205
- {
206
- account: $,
207
- onLoginClick: ti,
208
- className: t.avatar,
209
- popoverContent: oi,
210
- isAccountLoading: li
211
- }
212
- ) }),
213
- /* @__PURE__ */ m(
214
- _i,
215
- {
216
- ref: di,
217
- cart: h,
218
- open: S,
219
- onCartClick: mi
220
- }
221
- ),
222
- /* @__PURE__ */ d(si, { hideAt: ["lg"], children: [
223
- /* @__PURE__ */ d("section", { children: [
224
- /* @__PURE__ */ m(I, { size: "md", weight: "semibold", children: "Useful shortcuts" }),
225
- /* @__PURE__ */ d("ul", { className: t.menuList, children: [
226
- /* @__PURE__ */ m("li", { className: t.menuItem, children: /* @__PURE__ */ d(
227
- "button",
210
+ ),
211
+ /* @__PURE__ */ n(ut, { hideAt: ["lg"], children: [
212
+ /* @__PURE__ */ n("section", { children: [
213
+ /* @__PURE__ */ i(j, { size: "md", weight: "semibold", children: "Useful shortcuts" }),
214
+ /* @__PURE__ */ n("ul", { className: o.menuList, children: [
215
+ /* @__PURE__ */ i("li", { className: o.menuItem, children: /* @__PURE__ */ n(
216
+ "button",
217
+ {
218
+ onClick: q,
219
+ "data-hamburger-close": "true",
220
+ className: k(o.siteLink, o.menuItemAction, P(["lg"])),
221
+ children: [
222
+ /* @__PURE__ */ i(N, { iconKey: "fa-regular fa-sparkles", size: "sm", className: o.shortcutIcon }),
223
+ "Ask Our Experts"
224
+ ]
225
+ }
226
+ ) }),
227
+ /* @__PURE__ */ i("li", { className: o.menuItem, children: /* @__PURE__ */ n(b, { href: H, className: k(o.siteLink, o.menuItemAction), children: [
228
+ /* @__PURE__ */ i(N, { iconKey: "fa-regular fa-screwdriver-wrench", size: "sm", className: o.shortcutIcon }),
229
+ "Custom Parts"
230
+ ] }) }),
231
+ /* @__PURE__ */ i("li", { className: o.menuItem, children: /* @__PURE__ */ n(b, { href: I, className: k(o.siteLink, o.menuItemAction), children: [
232
+ /* @__PURE__ */ i(N, { iconKey: "fa-regular fa-envelope", size: "sm", className: o.shortcutIcon }),
233
+ "Contact Us"
234
+ ] }) }),
235
+ /* @__PURE__ */ i("li", { className: o.menuItem, children: /* @__PURE__ */ n(b, { href: g, className: k(o.siteLink, o.menuItemAction), children: [
236
+ /* @__PURE__ */ i(N, { iconKey: "fa-solid fa-question", size: "sm", className: o.shortcutIcon }),
237
+ "FAQ"
238
+ ] }) }),
239
+ /* @__PURE__ */ i("li", { className: o.menuItem, children: /* @__PURE__ */ n(b, { href: h, className: k(o.siteLink, o.menuItemAction), children: [
240
+ /* @__PURE__ */ i(N, { iconKey: "fa-regular fa-people-group", size: "sm", className: o.shortcutIcon }),
241
+ "About Us"
242
+ ] }) })
243
+ ] })
244
+ ] }),
245
+ /* @__PURE__ */ n("section", { children: [
246
+ /* @__PURE__ */ i(j, { size: "md", weight: "semibold", children: "Shop by category" }),
247
+ /* @__PURE__ */ i("ul", { className: o.menuList, children: v && v.map((t) => /* @__PURE__ */ i("li", { className: o.category, children: /* @__PURE__ */ n(
248
+ M,
228
249
  {
229
- onClick: T,
230
- "data-hamburger-close": "true",
231
- className: w(t.siteLink, t.menuItemAction, C(["lg"])),
250
+ href: t.route,
251
+ className: o.categoryLink,
252
+ onClick: () => K == null ? void 0 : K(t),
232
253
  children: [
233
- /* @__PURE__ */ m(k, { iconKey: "fa-regular fa-sparkles", size: "sm", className: t.shortcutIcon }),
234
- "Ask Our Experts"
254
+ /* @__PURE__ */ i(j, { size: "sm", children: t.label }),
255
+ /* @__PURE__ */ i(
256
+ N,
257
+ {
258
+ iconKey: "fa-solid fa-chevron-right",
259
+ title: "Navigate",
260
+ size: "sm"
261
+ }
262
+ )
235
263
  ]
236
264
  }
237
- ) }),
238
- /* @__PURE__ */ m("li", { className: t.menuItem, children: /* @__PURE__ */ d(A, { href: M, className: w(t.siteLink, t.menuItemAction), children: [
239
- /* @__PURE__ */ m(k, { iconKey: "fa-regular fa-screwdriver-wrench", size: "sm", className: t.shortcutIcon }),
240
- "Custom Parts"
241
- ] }) }),
242
- /* @__PURE__ */ m("li", { className: t.menuItem, children: /* @__PURE__ */ d(A, { href: R, className: w(t.siteLink, t.menuItemAction), children: [
243
- /* @__PURE__ */ m(k, { iconKey: "fa-regular fa-envelope", size: "sm", className: t.shortcutIcon }),
244
- "Contact Us"
245
- ] }) }),
246
- /* @__PURE__ */ m("li", { className: t.menuItem, children: /* @__PURE__ */ d(A, { href: V, className: w(t.siteLink, t.menuItemAction), children: [
247
- /* @__PURE__ */ m(k, { iconKey: "fa-solid fa-question", size: "sm", className: t.shortcutIcon }),
248
- "FAQ"
249
- ] }) }),
250
- /* @__PURE__ */ m("li", { className: t.menuItem, children: /* @__PURE__ */ d(A, { href: g, className: w(t.siteLink, t.menuItemAction), children: [
251
- /* @__PURE__ */ m(k, { iconKey: "fa-regular fa-people-group", size: "sm", className: t.shortcutIcon }),
252
- "About Us"
253
- ] }) })
265
+ ) }, t.id)) })
254
266
  ] })
255
- ] }),
256
- /* @__PURE__ */ d("section", { children: [
257
- /* @__PURE__ */ m(I, { size: "md", weight: "semibold", children: "Shop by category" }),
258
- /* @__PURE__ */ m("ul", { className: t.menuList, children: b && b.map((i) => /* @__PURE__ */ m("li", { className: t.category, children: /* @__PURE__ */ d(
259
- U,
260
- {
261
- href: i.route,
262
- className: t.categoryLink,
263
- onClick: () => K == null ? void 0 : K(i),
264
- children: [
265
- /* @__PURE__ */ m(I, { size: "sm", children: i.label }),
266
- /* @__PURE__ */ m(
267
- k,
268
- {
269
- iconKey: "fa-solid fa-chevron-right",
270
- title: "Navigate",
271
- size: "sm"
272
- }
273
- )
274
- ]
275
- }
276
- ) }, i.id)) })
277
267
  ] })
278
- ] })
279
- ]
280
- }
281
- )
282
- ]
283
- }
284
- ),
285
- /* @__PURE__ */ m(u, { flexDirection: "row", hideAt: ["md", "lg"], className: t.mobileSearch, children: /* @__PURE__ */ d("div", { className: t.search, children: [
286
- /* @__PURE__ */ m(
268
+ ]
269
+ }
270
+ )
271
+ ]
272
+ }
273
+ ),
274
+ /* @__PURE__ */ i($, { flexDirection: "row", hideAt: ["md", "lg"], className: o.mobileSearch, children: /* @__PURE__ */ i("div", { className: o.search, children: /* @__PURE__ */ i(
287
275
  Z,
288
276
  {
289
277
  variant: "search",
@@ -292,75 +280,96 @@ import '../../assets/MainNav.css';const ki = "_main_12974_1", wi = "_column_1297
292
280
  name: "cpc-search",
293
281
  autoComplete: "off",
294
282
  "aria-autocomplete": "list",
295
- "aria-controls": s,
296
- "aria-activedescendant": e >= 0 ? `${s}-${e}` : void 0,
297
- ...Q,
298
- ref: F,
299
- value: c,
300
- endAdornment: /* @__PURE__ */ d(Y, { children: [
301
- !!c && /* @__PURE__ */ m(
302
- B,
283
+ "aria-controls": _,
284
+ "aria-activedescendant": d >= 0 ? `${_}-${d}` : void 0,
285
+ ...J,
286
+ ref: z,
287
+ value: r,
288
+ endAdornment: /* @__PURE__ */ n(U, { children: [
289
+ !!r && /* @__PURE__ */ i(
290
+ F,
303
291
  {
304
292
  "aria-label": "Clear search",
305
- onMouseDown: (i) => i.preventDefault(),
293
+ onMouseDown: (t) => t.preventDefault(),
306
294
  onClick: () => {
307
- var i;
308
- y(-1), a == null || a(), (i = F.current) == null || i.focus();
295
+ var t;
296
+ u(-1), w == null || w(), (t = z.current) == null || t.focus();
309
297
  },
310
298
  iconProps: { iconKey: "fa-regular fa-xmark", size: "sm" }
311
299
  }
312
300
  ),
313
- /* @__PURE__ */ m(
314
- B,
301
+ /* @__PURE__ */ i(
302
+ F,
315
303
  {
316
304
  "aria-label": "Submit search",
317
- onClick: () => r == null ? void 0 : r(c ?? ""),
305
+ onClick: () => c == null ? void 0 : c(r ?? ""),
318
306
  iconProps: { iconKey: "fa-regular fa-magnifying-glass", size: "sm" }
319
307
  }
320
308
  )
321
309
  ] })
322
310
  }
323
- ),
324
- v && o && /* @__PURE__ */ m(O, { ...o, activeOptionIndex: e, optionIdPrefix: s, onKeyDown: z, onSuggestionClick: (i) => {
325
- var n;
326
- (n = o.onSuggestionClick) == null || n.call(o, i), f == null || f((i == null ? void 0 : i.name) ?? c ?? ""), N(!1);
327
- }, className: t.suggestionDropdown }),
328
- E && /* @__PURE__ */ m(
329
- O,
311
+ ) }) }),
312
+ /* @__PURE__ */ i(
313
+ kt,
330
314
  {
331
- terms: [],
332
- categories: [],
333
- items: [],
334
- view: "recent-searches",
335
- recentSearches: _,
336
- onClearRecentSearch: H,
337
- activeOptionIndex: e,
338
- optionIdPrefix: s,
339
- onKeyDown: z,
340
- onSuggestionClick: (i) => {
341
- f == null || f((i == null ? void 0 : i.term) ?? c ?? ""), N(!1);
342
- },
343
- className: t.suggestionDropdown
315
+ categories: v,
316
+ isCategoriesLoading: ft,
317
+ onCategoryClick: K
344
318
  }
345
319
  )
346
320
  ] }) }),
347
- /* @__PURE__ */ m(
348
- yi,
349
- {
350
- categories: b,
351
- isCategoriesLoading: ni,
352
- onCategoryClick: K
353
- }
321
+ Q && typeof document < "u" && ct.createPortal(
322
+ /* @__PURE__ */ n(
323
+ "div",
324
+ {
325
+ className: o.typeAheadPortal,
326
+ style: Q,
327
+ children: [
328
+ A && e && /* @__PURE__ */ i(
329
+ C,
330
+ {
331
+ ...e,
332
+ activeOptionIndex: d,
333
+ optionIdPrefix: _,
334
+ onKeyDown: X,
335
+ onSuggestionClick: (t) => {
336
+ var l, a;
337
+ (l = e.onSuggestionClick) == null || l.call(e, t), f == null || f((t == null ? void 0 : t.name) ?? r ?? ""), (a = E()) == null || a.blur();
338
+ }
339
+ }
340
+ ),
341
+ B && /* @__PURE__ */ i(
342
+ C,
343
+ {
344
+ terms: [],
345
+ categories: [],
346
+ items: [],
347
+ view: "recent-searches",
348
+ recentSearches: y,
349
+ onClearRecentSearch: et,
350
+ activeOptionIndex: d,
351
+ optionIdPrefix: _,
352
+ onKeyDown: X,
353
+ onSuggestionClick: (t) => {
354
+ var l;
355
+ f == null || f((t == null ? void 0 : t.term) ?? r ?? ""), (l = E()) == null || l.blur();
356
+ }
357
+ }
358
+ )
359
+ ]
360
+ }
361
+ ),
362
+ document.body
354
363
  )
355
- ] }) });
364
+ ] });
356
365
  });
357
- function A({
358
- href: j,
359
- children: $,
360
- ...b
366
+ function b({
367
+ href: T,
368
+ children: R,
369
+ ...v
361
370
  }) {
362
- return /* @__PURE__ */ m(U, { href: j, className: t.siteLink, ...b, children: $ });
371
+ return /* @__PURE__ */ i(M, { href: T, className: o.siteLink, ...v, children: R });
363
372
  }
364
373
  export {
365
- Zi as MainNav
374
+ gt as MainNav
366
375
  };