@caseparts-org/caseblocks 0.0.235 → 0.0.236

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 +1 @@
1
- ._suggestionDropdown_1fc5y_1{display:flex;flex-direction:row;width:100%;border:1px solid;border-color:var(--color-neutrals-neutral-2);border-radius:var(--border-radius-sm);box-shadow:0 8px 24px #0f172a14;overflow:hidden}@media (max-width: 767px){._suggestionDropdown_1fc5y_1{flex-direction:column}}._leftColumn_1fc5y_31{display:flex;flex-direction:column;border-right:1px solid var(--border-border-primary);background:var(--color-brand-primary-primary-pale-gray);min-width:150px}@media (max-width: 767px){._leftColumn_1fc5y_31{border-right:0;border-bottom:1px solid var(--border-border-primary)}}._leftColumnFullWidth_1fc5y_55{flex:1}._suggestionSectionFullHeight_1fc5y_63{display:flex;flex:1}._rightColumn_1fc5y_73{display:flex;flex:1;flex-direction:column;gap:var(--spacing-spacing-1xs);padding:var(--spacing-spacing-default);background:var(--color-brand-primary-white);min-width:250px}._categorySection_1fc5y_95{border-top:1px solid var(--border-border-primary)}._suggestions_1fc5y_101,._categories_1fc5y_103{display:flex;flex-direction:column;gap:0;padding:0}._suggestionsFullHeight_1fc5y_117{flex:1}._suggestions_1fc5y_101>:first-child,._categories_1fc5y_103>:first-child{padding-top:var(--spacing-spacing-default);padding-right:var(--spacing-spacing-default);padding-left:var(--spacing-spacing-default);padding-bottom:var(--spacing-spacing-2xs)}._suggestions_1fc5y_101>:last-child{padding-bottom:var(--spacing-spacing-2xs)}._suggestionLink_1fc5y_147,._categoryLink_1fc5y_149{display:block;box-sizing:border-box;width:100%;padding:var(--spacing-spacing-2xs) var(--spacing-spacing-default)}._itemList_1fc5y_163{margin:0;padding:0;display:flex;flex-direction:column;gap:var(--spacing-spacing-2xs);width:100%}._item_1fc5y_163{display:flex;flex-direction:column;border:1px solid var(--border-border-primary);padding:var(--spacing-spacing-2xs);width:100%}._item_1fc5y_163 img{height:60px;width:60px}._item_1fc5y_163 a{display:flex;flex-direction:row;align-items:flex-start;gap:var(--spacing-spacing-2xs)}._itemInfo_1fc5y_221{display:grid;gap:var(--spacing-spacing-4xs)}._recentSearches_1fc5y_231{display:flex;flex-direction:column;background:var(--color-brand-primary-white);min-width:250px}._recentSearchesHeader_1fc5y_245{padding:var(--spacing-spacing-default) var(--spacing-spacing-default) var(--spacing-spacing-2xs)}._recentSearchesList_1fc5y_253{display:flex;flex-direction:column;gap:0;margin:0;padding:0}._recentSearch_1fc5y_231{display:flex;align-items:center;justify-content:space-between;gap:var(--spacing-spacing-2xs)}._recentSearchLink_1fc5y_283{display:flex;flex:1;min-width:0;align-items:center;padding:var(--spacing-spacing-2xs) var(--spacing-spacing-default)}._clearRecentSearch_1fc5y_299{display:flex;flex:0 0 auto;align-items:center;justify-content:center;padding:var(--spacing-spacing-2xs) var(--spacing-spacing-default);border:0;background:transparent;color:var(--text-text-primary);cursor:pointer}
1
+ ._suggestionDropdown_1udz7_1{display:flex;flex-direction:row;width:100%;border:1px solid;border-color:var(--color-neutrals-neutral-2);border-radius:var(--border-radius-sm);box-shadow:0 8px 24px #0f172a14;overflow:hidden}@media (max-width: 767px){._suggestionDropdown_1udz7_1{flex-direction:column}}._leftColumn_1udz7_31{display:flex;flex-direction:column;border-right:1px solid var(--border-border-primary);background:var(--color-brand-primary-primary-pale-gray);min-width:150px}@media (max-width: 767px){._leftColumn_1udz7_31{border-right:0;border-bottom:1px solid var(--border-border-primary)}}._leftColumnFullWidth_1udz7_55{flex:1}._suggestionSectionFullHeight_1udz7_63{display:flex;flex:1}._rightColumn_1udz7_73{display:flex;flex:1;flex-direction:column;gap:var(--spacing-spacing-1xs);padding:var(--spacing-spacing-default);background:var(--color-brand-primary-white);min-width:250px}._categorySection_1udz7_95{border-top:1px solid var(--border-border-primary)}._suggestions_1udz7_101,._categories_1udz7_103{display:flex;flex-direction:column;gap:0;padding:0}._suggestionsFullHeight_1udz7_117{flex:1}._suggestions_1udz7_101>:first-child,._categories_1udz7_103>:first-child{padding-top:var(--spacing-spacing-default);padding-right:var(--spacing-spacing-default);padding-left:var(--spacing-spacing-default);padding-bottom:var(--spacing-spacing-2xs)}._suggestions_1udz7_101>:last-child{padding-bottom:var(--spacing-spacing-2xs)}._suggestionLink_1udz7_147,._categoryLink_1udz7_149{display:block;box-sizing:border-box;width:100%;padding:var(--spacing-spacing-2xs) var(--spacing-spacing-default)}._activeOption_1udz7_163{background:var(--color-brand-primary-white);outline:2px solid var(--text-text-links);outline-offset:-2px}._itemList_1udz7_175{margin:0;padding:0;display:flex;flex-direction:column;gap:var(--spacing-spacing-2xs);width:100%}._item_1udz7_175{display:flex;flex-direction:column;border:1px solid var(--border-border-primary);padding:var(--spacing-spacing-2xs);width:100%}._activeItem_1udz7_209{border-color:var(--text-text-links);box-shadow:inset 0 0 0 1px var(--text-text-links)}._item_1udz7_175 img{height:60px;width:60px}._item_1udz7_175 a{display:flex;flex-direction:row;align-items:flex-start;gap:var(--spacing-spacing-2xs)}._itemInfo_1udz7_243{display:grid;gap:var(--spacing-spacing-4xs)}._recentSearches_1udz7_253{display:flex;flex-direction:column;background:var(--color-brand-primary-white);min-width:250px}._recentSearchesHeader_1udz7_267{padding:var(--spacing-spacing-default) var(--spacing-spacing-default) var(--spacing-spacing-2xs)}._recentSearchesList_1udz7_275{display:flex;flex-direction:column;gap:0;margin:0;padding:0}._recentSearch_1udz7_253{display:flex;align-items:center;justify-content:space-between;gap:var(--spacing-spacing-2xs)}._recentSearchLink_1udz7_305{display:flex;flex:1;min-width:0;align-items:center;padding:var(--spacing-spacing-2xs) var(--spacing-spacing-default)}._clearRecentSearch_1udz7_321{display:flex;flex:0 0 auto;align-items:center;justify-content:center;padding:var(--spacing-spacing-2xs) var(--spacing-spacing-default);border:0;background:transparent;color:var(--text-text-primary);cursor:pointer}
@@ -16,6 +16,8 @@ export interface MainNavProps extends CartPropsBase, React.HTMLAttributes<HTMLDi
16
16
  searchInputProps?: Omit<InputProps, "label" | "variant">;
17
17
  /** Current value of the consumer-controlled search input. */
18
18
  searchValue?: string;
19
+ /** Updates the consumer-controlled search input value. */
20
+ onSearchValueChange?: (_searchValue: string) => void;
19
21
  onClearSearch?: () => void;
20
22
  onSearch?: (_searchValue: string) => void;
21
23
  /** Type-ahead results supplied by the consumer after a search input change. */
@@ -1,96 +1,126 @@
1
- import { jsx as i, jsxs as o, Fragment as B } from "react/jsx-runtime";
2
- import F from "react";
3
- import { Text as w } from "../../atoms/Text/Text.js";
4
- import { Link as y } from "../../atoms/Link/Link.js";
5
- import { Icon as t } from "../../atoms/Icon/Icon.js";
6
- import { Flex as _ } from "../../atoms/Flex/Flex.js";
7
- import { Grid as Y, Column as Z } from "../../atoms/Grid/Grid.js";
8
- import { Input as j } from "../../atoms/Input/Input.js";
9
- import { InputEndAdornmentButton as N } from "../../atoms/InputEndAdornmentButton/InputEndAdornmentButton.js";
10
- import { Logo as $ } from "../../molecules/Logo/Logo.js";
11
- import { HamburgerMenu as V } from "../../molecules/HamburgerMenu/HamburgerMenu.js";
12
- import { ShoppingCart as P } from "../../molecules/Cart/Cart.js";
13
- import { Account as ee } from "../../molecules/Account/Account.js";
14
- import { CategoryNav as ie } from "../../molecules/CategoryNav/CategoryNav.js";
1
+ import { jsx as o, jsxs as l, Fragment as G } from "react/jsx-runtime";
2
+ import x from "react";
3
+ import { Text as O } from "../../atoms/Text/Text.js";
4
+ import { Link as U } from "../../atoms/Link/Link.js";
5
+ import { Icon as _ } from "../../atoms/Icon/Icon.js";
6
+ import { Flex as g } from "../../atoms/Flex/Flex.js";
7
+ import { Grid as ni, Column as li } from "../../atoms/Grid/Grid.js";
8
+ import { Input as Q } from "../../atoms/Input/Input.js";
9
+ import { InputEndAdornmentButton as z } from "../../atoms/InputEndAdornmentButton/InputEndAdornmentButton.js";
10
+ import { Logo as mi } from "../../molecules/Logo/Logo.js";
11
+ import { HamburgerMenu as ai } from "../../molecules/HamburgerMenu/HamburgerMenu.js";
12
+ import { ShoppingCart as ci } from "../../molecules/Cart/Cart.js";
13
+ import { Account as di } from "../../molecules/Account/Account.js";
14
+ import { CategoryNav as si } from "../../molecules/CategoryNav/CategoryNav.js";
15
15
  import { SuggestionDropdown as p } from "../SuggestionDropdown/SuggestionDropdown.js";
16
- import { getHideAtStyles as M } from "../../atoms/HideAt.js";
17
- import { c as l } from "../../clsx-OuTLNxxd.js";
18
- import '../../assets/MainNav.css';const oe = "_main_12974_1", ne = "_column_12974_8", se = "_topNav_12974_13", ae = "_logo_12974_21", te = "_operations_12974_24", le = "_search_12974_31", me = "_mobileSearch_12974_36", ce = "_suggestionDropdown_12974_39", re = "_siteLink_12974_45", de = "_accountArea_12974_72", fe = "_category_12974_84", ue = "_categoryLink_12974_92", ge = "_menuList_12974_108", he = "_menuItemAction_12974_131", _e = "_shortcutIcon_12974_140", e = {
19
- main: oe,
20
- column: ne,
21
- topNav: se,
22
- logo: ae,
23
- operations: te,
24
- search: le,
25
- mobileSearch: me,
26
- suggestionDropdown: ce,
27
- siteLink: re,
28
- accountArea: de,
29
- category: fe,
30
- categoryLink: ue,
31
- menuList: ge,
32
- menuItemAction: he,
33
- shortcutIcon: _e
34
- }, je = F.forwardRef(function({
35
- account: k,
36
- categories: r,
37
- homeRoute: U,
38
- faqRoute: H,
39
- customPartsRoute: v,
40
- aboutUsRoute: S,
41
- contactRoute: L,
42
- cart: q,
43
- open: E,
16
+ import { getHideAtStyles as W } from "../../atoms/HideAt.js";
17
+ import { c as N } from "../../clsx-OuTLNxxd.js";
18
+ import '../../assets/MainNav.css';const fi = "_main_12974_1", ri = "_column_12974_8", _i = "_topNav_12974_13", Ni = "_logo_12974_21", yi = "_operations_12974_24", ui = "_search_12974_31", ki = "_mobileSearch_12974_36", wi = "_suggestionDropdown_12974_39", Ai = "_siteLink_12974_45", Di = "_accountArea_12974_72", bi = "_category_12974_84", vi = "_categoryLink_12974_92", xi = "_menuList_12974_108", Li = "_menuItemAction_12974_131", Ki = "_shortcutIcon_12974_140", i = {
19
+ main: fi,
20
+ column: ri,
21
+ topNav: _i,
22
+ logo: Ni,
23
+ operations: yi,
24
+ search: ui,
25
+ mobileSearch: ki,
26
+ suggestionDropdown: wi,
27
+ siteLink: Ai,
28
+ accountArea: Di,
29
+ category: bi,
30
+ categoryLink: vi,
31
+ menuList: xi,
32
+ menuItemAction: Li,
33
+ shortcutIcon: Ki
34
+ }, Qi = x.forwardRef(function({
35
+ account: B,
36
+ categories: A,
37
+ homeRoute: J,
38
+ faqRoute: X,
39
+ customPartsRoute: E,
40
+ aboutUsRoute: Y,
41
+ contactRoute: I,
42
+ cart: Z,
43
+ open: C,
44
44
  // consume external panel control props from CartPropsBase
45
- className: G,
46
- onLoginClick: Q,
47
- searchInputProps: n,
48
- searchValue: a,
49
- onClearSearch: z,
50
- onSearch: m,
51
- searchSuggestions: d,
45
+ className: V,
46
+ onLoginClick: h,
47
+ searchInputProps: t,
48
+ searchValue: c,
49
+ onSearchValueChange: y,
50
+ onClearSearch: u,
51
+ onSearch: d,
52
+ searchSuggestions: n,
52
53
  recentSearches: f,
53
- onClearRecentSearch: x,
54
- onCategoryClick: g,
55
- onClickModelSerial: D,
56
- onCartClick: T,
57
- accountPopoverContent: W,
58
- isAccountLoading: J,
59
- isCategoriesLoading: O,
60
- ...R
61
- }, X) {
62
- const [C, h] = F.useState(!1), b = C && !!a && !!d, K = C && !b && !!(f != null && f.length), I = {
63
- ...n,
64
- onFocus: (s) => {
65
- var u;
66
- (u = n == null ? void 0 : n.onFocus) == null || u.call(n, s), h(!0);
54
+ onClearRecentSearch: M,
55
+ onCategoryClick: L,
56
+ onClickModelSerial: H,
57
+ onCartClick: P,
58
+ accountPopoverContent: S,
59
+ isAccountLoading: ii,
60
+ isCategoriesLoading: oi,
61
+ ...ei
62
+ }, ti) {
63
+ const [R, k] = x.useState(!1), [m, r] = x.useState(-1), $ = x.useRef(null), s = x.useId(), D = R && !!c && !!n, F = R && !D && !!(f != null && f.length), b = D ? ((n == null ? void 0 : n.terms.length) ?? 0) + ((n == null ? void 0 : n.categories.length) ?? 0) + ((n == null ? void 0 : n.items.length) ?? 0) : F ? (f == null ? void 0 : f.length) ?? 0 : 0, T = {
64
+ ...t,
65
+ onChange: (e) => {
66
+ var a;
67
+ r(-1), (a = t == null ? void 0 : t.onChange) == null || a.call(t, e);
67
68
  },
68
- onBlur: (s) => {
69
- var u;
70
- (u = n == null ? void 0 : n.onBlur) == null || u.call(n, s), h(!1);
69
+ onFocus: (e) => {
70
+ var a;
71
+ (a = t == null ? void 0 : t.onFocus) == null || a.call(t, e), k(!0);
72
+ },
73
+ onBlur: (e) => {
74
+ var a;
75
+ (a = t == null ? void 0 : t.onBlur) == null || a.call(t, e), k(!1);
76
+ },
77
+ onKeyDown: (e) => {
78
+ var a, q;
79
+ if ((a = t == null ? void 0 : t.onKeyDown) == null || a.call(t, e), !e.defaultPrevented) {
80
+ if (e.key === "ArrowDown" && b > 0) {
81
+ e.preventDefault(), r((v) => v >= b - 1 ? 0 : v + 1);
82
+ return;
83
+ }
84
+ if (e.key === "ArrowUp" && b > 0) {
85
+ e.preventDefault(), r((v) => v <= 0 ? b - 1 : v - 1);
86
+ return;
87
+ }
88
+ if (e.key === "Tab" && D && m >= 0 && m < ((n == null ? void 0 : n.terms.length) ?? 0)) {
89
+ e.preventDefault(), y == null || y((n == null ? void 0 : n.terms[m].name) ?? ""), r(-1);
90
+ return;
91
+ }
92
+ if (e.key === "Enter" && m >= 0 && m < b) {
93
+ e.preventDefault(), (q = document.getElementById(`${s}-${m}`)) == null || q.click();
94
+ return;
95
+ }
96
+ e.key === "Enter" && (e.preventDefault(), d == null || d(c ?? ""));
97
+ }
71
98
  }
99
+ }, K = (e) => {
100
+ var a;
101
+ e.key.length !== 1 || e.altKey || e.ctrlKey || e.metaKey || (e.preventDefault(), r(-1), y == null || y(`${c ?? ""}${e.key}`), (a = $.current) == null || a.focus());
72
102
  };
73
- return /* @__PURE__ */ i(Y, { ...R, gridWrapperClassName: l(e.main, G), children: /* @__PURE__ */ o(Z, { span: 12, className: e.column, children: [
74
- /* @__PURE__ */ o(
75
- _,
103
+ return /* @__PURE__ */ o(ni, { ...ei, gridWrapperClassName: N(i.main, V), children: /* @__PURE__ */ l(li, { span: 12, className: i.column, children: [
104
+ /* @__PURE__ */ l(
105
+ g,
76
106
  {
77
107
  flexDirection: "row",
78
108
  alignItems: "center",
79
109
  justifyContent: "space-between",
80
- className: e.topNav,
110
+ className: i.topNav,
81
111
  children: [
82
- /* @__PURE__ */ i("div", { className: e.logo, children: /* @__PURE__ */ i(y, { href: U, children: /* @__PURE__ */ i($, {}) }) }),
83
- /* @__PURE__ */ o(
84
- _,
112
+ /* @__PURE__ */ o("div", { className: i.logo, children: /* @__PURE__ */ o(U, { href: J, children: /* @__PURE__ */ o(mi, {}) }) }),
113
+ /* @__PURE__ */ l(
114
+ g,
85
115
  {
86
116
  flexDirection: "row",
87
117
  alignItems: "center",
88
118
  justifyContent: "flex-end",
89
- className: e.operations,
119
+ className: i.operations,
90
120
  children: [
91
- /* @__PURE__ */ o(_, { flexDirection: "row", hideAt: ["sm"], className: e.search, children: [
92
- /* @__PURE__ */ i(
93
- j,
121
+ /* @__PURE__ */ l(g, { flexDirection: "row", hideAt: ["sm"], className: i.search, children: [
122
+ /* @__PURE__ */ o(
123
+ Q,
94
124
  {
95
125
  variant: "search",
96
126
  label: "Search",
@@ -98,30 +128,35 @@ import '../../assets/MainNav.css';const oe = "_main_12974_1", ne = "_column_1297
98
128
  name: "cpc-search",
99
129
  autoComplete: "off",
100
130
  "aria-autocomplete": "list",
101
- ...I,
102
- value: a,
103
- endAdornment: /* @__PURE__ */ o(B, { children: [
104
- !!a && /* @__PURE__ */ i(
105
- N,
131
+ "aria-controls": s,
132
+ "aria-activedescendant": m >= 0 ? `${s}-${m}` : void 0,
133
+ ...T,
134
+ ref: $,
135
+ value: c,
136
+ endAdornment: /* @__PURE__ */ l(G, { children: [
137
+ !!c && /* @__PURE__ */ o(
138
+ z,
106
139
  {
107
140
  "aria-label": "Clear search",
108
- onClick: z,
141
+ onClick: () => {
142
+ r(-1), u == null || u();
143
+ },
109
144
  iconProps: { iconKey: "fa-regular fa-xmark", size: "sm" }
110
145
  }
111
146
  ),
112
- /* @__PURE__ */ i(
113
- N,
147
+ /* @__PURE__ */ o(
148
+ z,
114
149
  {
115
150
  "aria-label": "Submit search",
116
- onClick: () => m == null ? void 0 : m(a ?? ""),
151
+ onClick: () => d == null ? void 0 : d(c ?? ""),
117
152
  iconProps: { iconKey: "fa-regular fa-magnifying-glass", size: "sm" }
118
153
  }
119
154
  )
120
155
  ] })
121
156
  }
122
157
  ),
123
- b && d && /* @__PURE__ */ i(p, { ...d, onSuggestionClick: () => h(!1), className: e.suggestionDropdown }),
124
- K && /* @__PURE__ */ i(
158
+ D && n && /* @__PURE__ */ o(p, { ...n, activeOptionIndex: m, optionIdPrefix: s, onKeyDown: K, onSuggestionClick: () => k(!1), className: i.suggestionDropdown }),
159
+ F && /* @__PURE__ */ o(
125
160
  p,
126
161
  {
127
162
  terms: [],
@@ -129,82 +164,86 @@ import '../../assets/MainNav.css';const oe = "_main_12974_1", ne = "_column_1297
129
164
  items: [],
130
165
  view: "recent-searches",
131
166
  recentSearches: f,
132
- onClearRecentSearch: x,
133
- className: e.suggestionDropdown
167
+ onClearRecentSearch: M,
168
+ activeOptionIndex: m,
169
+ optionIdPrefix: s,
170
+ onKeyDown: K,
171
+ onSuggestionClick: () => k(!1),
172
+ className: i.suggestionDropdown
134
173
  }
135
174
  )
136
175
  ] }),
137
- /* @__PURE__ */ o("button", { onClick: D, className: l(e.siteLink, M(["sm", "md"])), children: [
138
- /* @__PURE__ */ i(t, { iconKey: "fa-regular fa-sparkles", size: "sm" }),
176
+ /* @__PURE__ */ l("button", { onClick: H, className: N(i.siteLink, W(["sm", "md"])), children: [
177
+ /* @__PURE__ */ o(_, { iconKey: "fa-regular fa-sparkles", size: "sm" }),
139
178
  "Model/Serial"
140
179
  ] }),
141
- /* @__PURE__ */ i(c, { href: v, hideAt: ["sm", "md"], children: "Custom Parts" }),
142
- /* @__PURE__ */ i(c, { href: L, hideAt: ["sm", "md"], children: "Contact Us" }),
143
- /* @__PURE__ */ i("div", { className: e.accountArea, children: /* @__PURE__ */ i(
144
- ee,
180
+ /* @__PURE__ */ o(w, { href: E, hideAt: ["sm", "md"], children: "Custom Parts" }),
181
+ /* @__PURE__ */ o(w, { href: I, hideAt: ["sm", "md"], children: "Contact Us" }),
182
+ /* @__PURE__ */ o("div", { className: i.accountArea, children: /* @__PURE__ */ o(
183
+ di,
145
184
  {
146
- account: k,
147
- onLoginClick: Q,
148
- className: e.avatar,
149
- popoverContent: W,
150
- isAccountLoading: J
185
+ account: B,
186
+ onLoginClick: h,
187
+ className: i.avatar,
188
+ popoverContent: S,
189
+ isAccountLoading: ii
151
190
  }
152
191
  ) }),
153
- /* @__PURE__ */ i(
154
- P,
192
+ /* @__PURE__ */ o(
193
+ ci,
155
194
  {
156
- ref: X,
157
- cart: q,
158
- open: E,
159
- onCartClick: T
195
+ ref: ti,
196
+ cart: Z,
197
+ open: C,
198
+ onCartClick: P
160
199
  }
161
200
  ),
162
- /* @__PURE__ */ o(V, { hideAt: ["lg"], children: [
163
- /* @__PURE__ */ o("section", { children: [
164
- /* @__PURE__ */ i(w, { size: "md", weight: "semibold", children: "Useful shortcuts" }),
165
- /* @__PURE__ */ o("ul", { className: e.menuList, children: [
166
- /* @__PURE__ */ i("li", { className: e.menuItem, children: /* @__PURE__ */ o(
201
+ /* @__PURE__ */ l(ai, { hideAt: ["lg"], children: [
202
+ /* @__PURE__ */ l("section", { children: [
203
+ /* @__PURE__ */ o(O, { size: "md", weight: "semibold", children: "Useful shortcuts" }),
204
+ /* @__PURE__ */ l("ul", { className: i.menuList, children: [
205
+ /* @__PURE__ */ o("li", { className: i.menuItem, children: /* @__PURE__ */ l(
167
206
  "button",
168
207
  {
169
- onClick: D,
208
+ onClick: H,
170
209
  "data-hamburger-close": "true",
171
- className: l(e.siteLink, e.menuItemAction, M(["lg"])),
210
+ className: N(i.siteLink, i.menuItemAction, W(["lg"])),
172
211
  children: [
173
- /* @__PURE__ */ i(t, { iconKey: "fa-regular fa-sparkles", size: "sm", className: e.shortcutIcon }),
212
+ /* @__PURE__ */ o(_, { iconKey: "fa-regular fa-sparkles", size: "sm", className: i.shortcutIcon }),
174
213
  "Model/Serial"
175
214
  ]
176
215
  }
177
216
  ) }),
178
- /* @__PURE__ */ i("li", { className: e.menuItem, children: /* @__PURE__ */ o(c, { href: v, className: l(e.siteLink, e.menuItemAction), children: [
179
- /* @__PURE__ */ i(t, { iconKey: "fa-regular fa-screwdriver-wrench", size: "sm", className: e.shortcutIcon }),
217
+ /* @__PURE__ */ o("li", { className: i.menuItem, children: /* @__PURE__ */ l(w, { href: E, className: N(i.siteLink, i.menuItemAction), children: [
218
+ /* @__PURE__ */ o(_, { iconKey: "fa-regular fa-screwdriver-wrench", size: "sm", className: i.shortcutIcon }),
180
219
  "Custom Parts"
181
220
  ] }) }),
182
- /* @__PURE__ */ i("li", { className: e.menuItem, children: /* @__PURE__ */ o(c, { href: L, className: l(e.siteLink, e.menuItemAction), children: [
183
- /* @__PURE__ */ i(t, { iconKey: "fa-regular fa-envelope", size: "sm", className: e.shortcutIcon }),
221
+ /* @__PURE__ */ o("li", { className: i.menuItem, children: /* @__PURE__ */ l(w, { href: I, className: N(i.siteLink, i.menuItemAction), children: [
222
+ /* @__PURE__ */ o(_, { iconKey: "fa-regular fa-envelope", size: "sm", className: i.shortcutIcon }),
184
223
  "Contact Us"
185
224
  ] }) }),
186
- /* @__PURE__ */ i("li", { className: e.menuItem, children: /* @__PURE__ */ o(c, { href: H, className: l(e.siteLink, e.menuItemAction), children: [
187
- /* @__PURE__ */ i(t, { iconKey: "fa-solid fa-question", size: "sm", className: e.shortcutIcon }),
225
+ /* @__PURE__ */ o("li", { className: i.menuItem, children: /* @__PURE__ */ l(w, { href: X, className: N(i.siteLink, i.menuItemAction), children: [
226
+ /* @__PURE__ */ o(_, { iconKey: "fa-solid fa-question", size: "sm", className: i.shortcutIcon }),
188
227
  "FAQ"
189
228
  ] }) }),
190
- /* @__PURE__ */ i("li", { className: e.menuItem, children: /* @__PURE__ */ o(c, { href: S, className: l(e.siteLink, e.menuItemAction), children: [
191
- /* @__PURE__ */ i(t, { iconKey: "fa-regular fa-people-group", size: "sm", className: e.shortcutIcon }),
229
+ /* @__PURE__ */ o("li", { className: i.menuItem, children: /* @__PURE__ */ l(w, { href: Y, className: N(i.siteLink, i.menuItemAction), children: [
230
+ /* @__PURE__ */ o(_, { iconKey: "fa-regular fa-people-group", size: "sm", className: i.shortcutIcon }),
192
231
  "About Us"
193
232
  ] }) })
194
233
  ] })
195
234
  ] }),
196
- /* @__PURE__ */ o("section", { children: [
197
- /* @__PURE__ */ i(w, { size: "md", weight: "semibold", children: "Shop by category" }),
198
- /* @__PURE__ */ i("ul", { className: e.menuList, children: r && r.map((s) => /* @__PURE__ */ i("li", { className: e.category, children: /* @__PURE__ */ o(
199
- y,
235
+ /* @__PURE__ */ l("section", { children: [
236
+ /* @__PURE__ */ o(O, { size: "md", weight: "semibold", children: "Shop by category" }),
237
+ /* @__PURE__ */ o("ul", { className: i.menuList, children: A && A.map((e) => /* @__PURE__ */ o("li", { className: i.category, children: /* @__PURE__ */ l(
238
+ U,
200
239
  {
201
- href: s.route,
202
- className: e.categoryLink,
203
- onClick: () => g == null ? void 0 : g(s),
240
+ href: e.route,
241
+ className: i.categoryLink,
242
+ onClick: () => L == null ? void 0 : L(e),
204
243
  children: [
205
- /* @__PURE__ */ i(w, { size: "sm", children: s.label }),
206
- /* @__PURE__ */ i(
207
- t,
244
+ /* @__PURE__ */ o(O, { size: "sm", children: e.label }),
245
+ /* @__PURE__ */ o(
246
+ _,
208
247
  {
209
248
  iconKey: "fa-solid fa-chevron-right",
210
249
  title: "Navigate",
@@ -213,7 +252,7 @@ import '../../assets/MainNav.css';const oe = "_main_12974_1", ne = "_column_1297
213
252
  )
214
253
  ]
215
254
  }
216
- ) }, s.id)) })
255
+ ) }, e.id)) })
217
256
  ] })
218
257
  ] })
219
258
  ]
@@ -222,9 +261,9 @@ import '../../assets/MainNav.css';const oe = "_main_12974_1", ne = "_column_1297
222
261
  ]
223
262
  }
224
263
  ),
225
- /* @__PURE__ */ i(_, { flexDirection: "row", hideAt: ["md", "lg"], className: e.mobileSearch, children: /* @__PURE__ */ o("div", { className: e.search, children: [
226
- /* @__PURE__ */ i(
227
- j,
264
+ /* @__PURE__ */ o(g, { flexDirection: "row", hideAt: ["md", "lg"], className: i.mobileSearch, children: /* @__PURE__ */ l("div", { className: i.search, children: [
265
+ /* @__PURE__ */ o(
266
+ Q,
228
267
  {
229
268
  variant: "search",
230
269
  label: "Search",
@@ -232,30 +271,35 @@ import '../../assets/MainNav.css';const oe = "_main_12974_1", ne = "_column_1297
232
271
  name: "cpc-search",
233
272
  autoComplete: "off",
234
273
  "aria-autocomplete": "list",
235
- ...I,
236
- value: a,
237
- endAdornment: /* @__PURE__ */ o(B, { children: [
238
- !!a && /* @__PURE__ */ i(
239
- N,
274
+ "aria-controls": s,
275
+ "aria-activedescendant": m >= 0 ? `${s}-${m}` : void 0,
276
+ ...T,
277
+ ref: $,
278
+ value: c,
279
+ endAdornment: /* @__PURE__ */ l(G, { children: [
280
+ !!c && /* @__PURE__ */ o(
281
+ z,
240
282
  {
241
283
  "aria-label": "Clear search",
242
- onClick: z,
284
+ onClick: () => {
285
+ r(-1), u == null || u();
286
+ },
243
287
  iconProps: { iconKey: "fa-regular fa-xmark", size: "sm" }
244
288
  }
245
289
  ),
246
- /* @__PURE__ */ i(
247
- N,
290
+ /* @__PURE__ */ o(
291
+ z,
248
292
  {
249
293
  "aria-label": "Submit search",
250
- onClick: () => m == null ? void 0 : m(a ?? ""),
294
+ onClick: () => d == null ? void 0 : d(c ?? ""),
251
295
  iconProps: { iconKey: "fa-regular fa-magnifying-glass", size: "sm" }
252
296
  }
253
297
  )
254
298
  ] })
255
299
  }
256
300
  ),
257
- b && d && /* @__PURE__ */ i(p, { ...d, onSuggestionClick: () => h(!1), className: e.suggestionDropdown }),
258
- K && /* @__PURE__ */ i(
301
+ D && n && /* @__PURE__ */ o(p, { ...n, activeOptionIndex: m, optionIdPrefix: s, onKeyDown: K, onSuggestionClick: () => k(!1), className: i.suggestionDropdown }),
302
+ F && /* @__PURE__ */ o(
259
303
  p,
260
304
  {
261
305
  terms: [],
@@ -263,28 +307,32 @@ import '../../assets/MainNav.css';const oe = "_main_12974_1", ne = "_column_1297
263
307
  items: [],
264
308
  view: "recent-searches",
265
309
  recentSearches: f,
266
- onClearRecentSearch: x,
267
- className: e.suggestionDropdown
310
+ onClearRecentSearch: M,
311
+ activeOptionIndex: m,
312
+ optionIdPrefix: s,
313
+ onKeyDown: K,
314
+ onSuggestionClick: () => k(!1),
315
+ className: i.suggestionDropdown
268
316
  }
269
317
  )
270
318
  ] }) }),
271
- /* @__PURE__ */ i(
272
- ie,
319
+ /* @__PURE__ */ o(
320
+ si,
273
321
  {
274
- categories: r,
275
- isCategoriesLoading: O,
276
- onCategoryClick: g
322
+ categories: A,
323
+ isCategoriesLoading: oi,
324
+ onCategoryClick: L
277
325
  }
278
326
  )
279
327
  ] }) });
280
328
  });
281
- function c({
282
- href: A,
283
- children: k,
284
- ...r
329
+ function w({
330
+ href: j,
331
+ children: B,
332
+ ...A
285
333
  }) {
286
- return /* @__PURE__ */ i(y, { href: A, className: e.siteLink, ...r, children: k });
334
+ return /* @__PURE__ */ o(U, { href: j, className: i.siteLink, ...A, children: B });
287
335
  }
288
336
  export {
289
- je as MainNav
337
+ Qi as MainNav
290
338
  };
@@ -1,8 +1,8 @@
1
- import { jsxs as h, Fragment as k, jsx as t } from "react/jsx-runtime";
1
+ import { jsxs as p, Fragment as k, jsx as i } from "react/jsx-runtime";
2
2
  import { useState as g } from "react";
3
3
  import { MainNav as b } from "./MainNav.js";
4
4
  import { Text as y } from "../../atoms/Text/Text.js";
5
- import { Link as p } from "../../atoms/Link/Link.js";
5
+ import { Link as h } from "../../atoms/Link/Link.js";
6
6
  import { Button as S } from "../../atoms/Button/Button.js";
7
7
  import { CartSlideInPanel as v } from "../../molecules/Cart/CartSlideInPanel.js";
8
8
  const P = {
@@ -148,32 +148,32 @@ const P = {
148
148
  };
149
149
  function f(e) {
150
150
  return `$${e.items.reduce(
151
- (o, r) => o + (parseFloat(r.price.replace(/[^0-9.]/g, "")) || 0) * r.quantity,
151
+ (t, r) => t + (parseFloat(r.price.replace(/[^0-9.]/g, "")) || 0) * r.quantity,
152
152
  0
153
153
  ).toFixed(2)}`;
154
154
  }
155
- const u = /* @__PURE__ */ h("div", { style: { display: "flex", flexDirection: "column", gap: 8, minWidth: 220 }, children: [
156
- /* @__PURE__ */ t(y, { size: "sm", weight: "semibold", children: "Account" }),
157
- /* @__PURE__ */ t(y, { size: "xs", children: "Signed in as Ringo" }),
158
- /* @__PURE__ */ t(p, { href: "/account", "data-popover-close": "true", children: "View Account" }),
159
- /* @__PURE__ */ t(p, { href: "/orders", "data-popover-close": "true", children: "Order History" }),
160
- /* @__PURE__ */ t(S, { size: "sm", variant: "secondary", "data-popover-close": "true", onClick: () => alert("Sign out"), children: "Sign Out" })
155
+ const u = /* @__PURE__ */ p("div", { style: { display: "flex", flexDirection: "column", gap: 8, minWidth: 220 }, children: [
156
+ /* @__PURE__ */ i(y, { size: "sm", weight: "semibold", children: "Account" }),
157
+ /* @__PURE__ */ i(y, { size: "xs", children: "Signed in as Ringo" }),
158
+ /* @__PURE__ */ i(h, { href: "/account", "data-popover-close": "true", children: "View Account" }),
159
+ /* @__PURE__ */ i(h, { href: "/orders", "data-popover-close": "true", children: "Order History" }),
160
+ /* @__PURE__ */ i(S, { size: "sm", variant: "secondary", "data-popover-close": "true", onClick: () => alert("Sign out"), children: "Sign Out" })
161
161
  ] }), m = (e) => {
162
- const [i, o] = g(!1);
163
- return /* @__PURE__ */ h(k, { children: [
164
- /* @__PURE__ */ t(
162
+ const [o, t] = g(!1);
163
+ return /* @__PURE__ */ p(k, { children: [
164
+ /* @__PURE__ */ i(
165
165
  b,
166
166
  {
167
167
  ...e,
168
- open: i,
169
- onCartClick: () => o((r) => !r)
168
+ open: o,
169
+ onCartClick: () => t((r) => !r)
170
170
  }
171
171
  ),
172
- /* @__PURE__ */ t(
172
+ /* @__PURE__ */ i(
173
173
  v,
174
174
  {
175
- open: i,
176
- onClose: () => o(!1),
175
+ open: o,
176
+ onClose: () => t(!1),
177
177
  cart: e.cart,
178
178
  subtotal: f(e.cart),
179
179
  itemPriceLabel: "List Price",
@@ -184,25 +184,26 @@ const u = /* @__PURE__ */ h("div", { style: { display: "flex", flexDirection: "c
184
184
  )
185
185
  ] });
186
186
  }, G = (e) => {
187
- const [i, o] = g(""), [r, C] = g(R);
188
- return /* @__PURE__ */ t(
187
+ const [o, t] = g(""), [r, C] = g(R);
188
+ return /* @__PURE__ */ i(
189
189
  b,
190
190
  {
191
191
  ...e,
192
- searchValue: i,
193
- onClearSearch: () => o(""),
192
+ searchValue: o,
193
+ onSearchValueChange: t,
194
+ onClearSearch: () => t(""),
194
195
  onSearch: (l) => alert(`Search for ${l}`),
195
- searchSuggestions: i ? I : void 0,
196
+ searchSuggestions: o ? I : void 0,
196
197
  recentSearches: r,
197
198
  onClearRecentSearch: (l) => {
198
199
  C((n) => n.filter((d) => d.url !== l.url));
199
200
  },
200
201
  searchInputProps: {
201
202
  ...e.searchInputProps,
202
- value: i,
203
+ value: o,
203
204
  onChange: (l) => {
204
205
  var n, d;
205
- (d = (n = e.searchInputProps) == null ? void 0 : n.onChange) == null || d.call(n, l), o(l.target.value);
206
+ (d = (n = e.searchInputProps) == null ? void 0 : n.onChange) == null || d.call(n, l), t(l.target.value);
206
207
  }
207
208
  }
208
209
  }
@@ -26,6 +26,9 @@ export interface SuggestionDropdownProps {
26
26
  recentSearches?: RecentSearch[];
27
27
  onClearRecentSearch?: (_recentSearch: RecentSearch) => void;
28
28
  onSuggestionClick?: () => void;
29
+ activeOptionIndex?: number;
30
+ optionIdPrefix?: string;
31
+ onKeyDown?: React.KeyboardEventHandler<HTMLDivElement>;
29
32
  className?: string;
30
33
  }
31
- export declare function SuggestionDropdown({ terms, categories, items, view, recentSearches, onClearRecentSearch, onSuggestionClick, className }: SuggestionDropdownProps): import("react/jsx-runtime").JSX.Element;
34
+ export declare function SuggestionDropdown({ terms, categories, items, view, recentSearches, onClearRecentSearch, onSuggestionClick, activeOptionIndex, optionIdPrefix, onKeyDown, className }: SuggestionDropdownProps): import("react/jsx-runtime").JSX.Element;
@@ -1,89 +1,140 @@
1
- import { jsxs as t, jsx as s } from "react/jsx-runtime";
2
- import { Text as c } from "../../atoms/Text/Text.js";
3
- import { Link as l } from "../../atoms/Link/Link.js";
4
- import { Icon as f } from "../../atoms/Icon/Icon.js";
5
- import { c as r } from "../../clsx-OuTLNxxd.js";
6
- import { Image as d } from "../../atoms/Image/Image.js";
7
- import '../../assets/SuggestionDropdown.css';const y = "_suggestionDropdown_1fc5y_1", S = "_leftColumn_1fc5y_31", p = "_leftColumnFullWidth_1fc5y_55", L = "_suggestionSectionFullHeight_1fc5y_63", k = "_rightColumn_1fc5y_73", N = "_categorySection_1fc5y_95", v = "_suggestions_1fc5y_101", x = "_categories_1fc5y_103", C = "_suggestionsFullHeight_1fc5y_117", F = "_suggestionLink_1fc5y_147", H = "_categoryLink_1fc5y_149", D = "_itemList_1fc5y_163", w = "_item_1fc5y_163", z = "_itemInfo_1fc5y_221", T = "_recentSearches_1fc5y_231", q = "_recentSearchesHeader_1fc5y_245", W = "_recentSearchesList_1fc5y_253", b = "_recentSearch_1fc5y_231", I = "_recentSearchLink_1fc5y_283", j = "_clearRecentSearch_1fc5y_299", n = {
8
- suggestionDropdown: y,
9
- leftColumn: S,
10
- leftColumnFullWidth: p,
11
- suggestionSectionFullHeight: L,
12
- rightColumn: k,
13
- categorySection: N,
14
- suggestions: v,
15
- categories: x,
16
- suggestionsFullHeight: C,
17
- suggestionLink: F,
18
- categoryLink: H,
19
- itemList: D,
20
- item: w,
21
- itemInfo: z,
22
- recentSearches: T,
23
- recentSearchesHeader: q,
24
- recentSearchesList: W,
25
- recentSearch: b,
26
- recentSearchLink: I,
27
- clearRecentSearch: j
1
+ import { jsxs as r, jsx as s } from "react/jsx-runtime";
2
+ import { Text as a } from "../../atoms/Text/Text.js";
3
+ import { Link as _ } from "../../atoms/Link/Link.js";
4
+ import { Icon as L } from "../../atoms/Icon/Icon.js";
5
+ import { c as l } from "../../clsx-OuTLNxxd.js";
6
+ import { Image as k } from "../../atoms/Image/Image.js";
7
+ import '../../assets/SuggestionDropdown.css';const S = "_suggestionDropdown_1udz7_1", N = "_leftColumn_1udz7_31", v = "_leftColumnFullWidth_1udz7_55", y = "_suggestionSectionFullHeight_1udz7_63", C = "_rightColumn_1udz7_73", F = "_categorySection_1udz7_95", H = "_suggestions_1udz7_101", $ = "_categories_1udz7_103", D = "_suggestionsFullHeight_1udz7_117", w = "_suggestionLink_1udz7_147", b = "_categoryLink_1udz7_149", T = "_activeOption_1udz7_163", q = "_itemList_1udz7_175", W = "_item_1udz7_175", j = "_activeItem_1udz7_209", M = "_itemInfo_1udz7_243", O = "_recentSearches_1udz7_253", K = "_recentSearchesHeader_1udz7_267", R = "_recentSearchesList_1udz7_275", A = "_recentSearch_1udz7_253", B = "_recentSearchLink_1udz7_305", E = "_clearRecentSearch_1udz7_321", t = {
8
+ suggestionDropdown: S,
9
+ leftColumn: N,
10
+ leftColumnFullWidth: v,
11
+ suggestionSectionFullHeight: y,
12
+ rightColumn: C,
13
+ categorySection: F,
14
+ suggestions: H,
15
+ categories: $,
16
+ suggestionsFullHeight: D,
17
+ suggestionLink: w,
18
+ categoryLink: b,
19
+ activeOption: T,
20
+ itemList: q,
21
+ item: W,
22
+ activeItem: j,
23
+ itemInfo: M,
24
+ recentSearches: O,
25
+ recentSearchesHeader: K,
26
+ recentSearchesList: R,
27
+ recentSearch: A,
28
+ recentSearchLink: B,
29
+ clearRecentSearch: E
28
30
  };
29
- function E({
30
- terms: o,
31
- categories: i,
32
- items: a,
33
- view: _ = "suggestions",
34
- recentSearches: m = [],
35
- onClearRecentSearch: h,
31
+ function Y({
32
+ terms: n,
33
+ categories: c,
34
+ items: d,
35
+ view: p = "suggestions",
36
+ recentSearches: h = [],
37
+ onClearRecentSearch: m,
36
38
  onSuggestionClick: g,
37
- className: u
39
+ activeOptionIndex: o = -1,
40
+ optionIdPrefix: u,
41
+ onKeyDown: z,
42
+ className: f
38
43
  }) {
39
- return _ === "recent-searches" ? /* @__PURE__ */ t(
44
+ return p === "recent-searches" ? /* @__PURE__ */ r(
40
45
  "div",
41
46
  {
42
- className: r(n.suggestionDropdown, n.recentSearches, u),
47
+ id: u,
48
+ role: "listbox",
49
+ className: l(t.suggestionDropdown, t.recentSearches, f),
50
+ onKeyDown: z,
43
51
  onMouseDown: (e) => e.preventDefault(),
44
52
  children: [
45
- /* @__PURE__ */ s("div", { className: n.recentSearchesHeader, children: /* @__PURE__ */ s(c, { size: "xxs", colorToken: "quaternary", children: "Recent Searches" }) }),
46
- /* @__PURE__ */ s("ol", { className: n.recentSearchesList, children: m.map((e) => /* @__PURE__ */ t("li", { className: n.recentSearch, children: [
47
- /* @__PURE__ */ s(l, { href: e.url, className: n.recentSearchLink, children: /* @__PURE__ */ s(c, { size: "sm", children: e.term }) }),
53
+ /* @__PURE__ */ s("div", { className: t.recentSearchesHeader, children: /* @__PURE__ */ s(a, { size: "xxs", colorToken: "quaternary", children: "Recent Searches" }) }),
54
+ /* @__PURE__ */ s("ol", { className: t.recentSearchesList, children: h.map((e) => /* @__PURE__ */ r("li", { className: t.recentSearch, children: [
55
+ /* @__PURE__ */ s(
56
+ _,
57
+ {
58
+ href: e.url,
59
+ id: `${u}-${h.indexOf(e)}`,
60
+ role: "option",
61
+ "aria-selected": o === h.indexOf(e),
62
+ className: l(t.recentSearchLink, { [t.activeOption]: o === h.indexOf(e) }),
63
+ onClick: g,
64
+ children: /* @__PURE__ */ s(a, { size: "sm", children: e.term })
65
+ }
66
+ ),
48
67
  /* @__PURE__ */ s(
49
68
  "button",
50
69
  {
51
70
  type: "button",
52
- className: n.clearRecentSearch,
71
+ className: t.clearRecentSearch,
53
72
  "aria-label": `Clear recent search: ${e.term}`,
54
- onClick: () => h == null ? void 0 : h(e),
55
- children: /* @__PURE__ */ s(f, { iconKey: "fa-regular fa-xmark", size: "sm" })
73
+ onClick: () => m == null ? void 0 : m(e),
74
+ children: /* @__PURE__ */ s(L, { iconKey: "fa-regular fa-xmark", size: "sm" })
56
75
  }
57
76
  )
58
77
  ] }, e.url)) })
59
78
  ]
60
79
  }
61
- ) : /* @__PURE__ */ t("div", { className: r(n.suggestionDropdown, u), onMouseDown: (e) => e.preventDefault(), children: [
62
- (o.length > 0 || i.length > 0) && /* @__PURE__ */ t("div", { className: r(n.leftColumn, { [n.leftColumnFullWidth]: a.length === 0 }), children: [
63
- o.length > 0 && /* @__PURE__ */ s("div", { className: r(n.suggestionSection, { [n.suggestionSectionFullHeight]: i.length === 0 }), children: /* @__PURE__ */ t("div", { className: r(n.suggestions, { [n.suggestionsFullHeight]: i.length === 0 }), children: [
64
- /* @__PURE__ */ s(c, { size: "xxs", colorToken: "quaternary", children: "Suggestions" }),
65
- o.map(
66
- (e) => /* @__PURE__ */ s(c, { size: "sm", children: /* @__PURE__ */ s(l, { href: e.url, className: n.suggestionLink, onClick: g, children: e.name }) }, e.url)
80
+ ) : /* @__PURE__ */ r("div", { id: u, role: "listbox", className: l(t.suggestionDropdown, f), onKeyDown: z, onMouseDown: (e) => e.preventDefault(), children: [
81
+ (n.length > 0 || c.length > 0) && /* @__PURE__ */ r("div", { className: l(t.leftColumn, { [t.leftColumnFullWidth]: d.length === 0 }), children: [
82
+ n.length > 0 && /* @__PURE__ */ s("div", { className: l(t.suggestionSection, { [t.suggestionSectionFullHeight]: c.length === 0 }), children: /* @__PURE__ */ r("div", { className: l(t.suggestions, { [t.suggestionsFullHeight]: c.length === 0 }), children: [
83
+ /* @__PURE__ */ s(a, { size: "xxs", colorToken: "quaternary", children: "Suggestions" }),
84
+ n.map(
85
+ (e, i) => /* @__PURE__ */ s(a, { size: "sm", children: /* @__PURE__ */ s(
86
+ _,
87
+ {
88
+ href: e.url,
89
+ id: `${u}-${i}`,
90
+ role: "option",
91
+ "aria-selected": o === i,
92
+ className: l(t.suggestionLink, { [t.activeOption]: o === i }),
93
+ onClick: g,
94
+ children: e.name
95
+ }
96
+ ) }, e.url)
67
97
  )
68
98
  ] }) }),
69
- i.length > 0 && /* @__PURE__ */ s("div", { className: n.categorySection, children: /* @__PURE__ */ t("div", { className: n.categories, children: [
70
- /* @__PURE__ */ s(c, { size: "xxs", colorToken: "quaternary", children: "Categories" }),
71
- i.map(
72
- (e) => /* @__PURE__ */ s(c, { size: "sm", children: /* @__PURE__ */ s(l, { href: e.url, className: n.categoryLink, onClick: g, children: e.name }) }, e.categoryKey)
99
+ c.length > 0 && /* @__PURE__ */ s("div", { className: t.categorySection, children: /* @__PURE__ */ r("div", { className: t.categories, children: [
100
+ /* @__PURE__ */ s(a, { size: "xxs", colorToken: "quaternary", children: "Categories" }),
101
+ c.map(
102
+ (e, i) => /* @__PURE__ */ s(a, { size: "sm", children: /* @__PURE__ */ s(
103
+ _,
104
+ {
105
+ href: e.url,
106
+ id: `${u}-${n.length + i}`,
107
+ role: "option",
108
+ "aria-selected": o === n.length + i,
109
+ className: l(t.categoryLink, { [t.activeOption]: o === n.length + i }),
110
+ onClick: g,
111
+ children: e.name
112
+ }
113
+ ) }, e.categoryKey)
73
114
  )
74
115
  ] }) })
75
116
  ] }),
76
- a.length > 0 && /* @__PURE__ */ s("div", { className: n.rightColumn, children: /* @__PURE__ */ s("ol", { className: n.itemList, children: a.map(
77
- (e) => /* @__PURE__ */ s("li", { className: n.item, children: /* @__PURE__ */ t(l, { href: e.url, onClick: g, children: [
78
- /* @__PURE__ */ s(d, { src: e.image, alt: `${e.description} product image`, height: 72, width: 72 }),
79
- /* @__PURE__ */ t("div", { className: n.itemInfo, children: [
80
- /* @__PURE__ */ s(c, { size: "sm", children: e.description }),
81
- /* @__PURE__ */ s(c, { size: "sm", colorToken: "quaternary", children: e.itemId })
82
- ] })
83
- ] }) }, e.itemId)
117
+ d.length > 0 && /* @__PURE__ */ s("div", { className: t.rightColumn, children: /* @__PURE__ */ s("ol", { className: t.itemList, children: d.map(
118
+ (e, i) => /* @__PURE__ */ s("li", { className: l(t.item, { [t.activeItem]: o === n.length + c.length + i }), children: /* @__PURE__ */ r(
119
+ _,
120
+ {
121
+ href: e.url,
122
+ id: `${u}-${n.length + c.length + i}`,
123
+ role: "option",
124
+ "aria-selected": o === n.length + c.length + i,
125
+ onClick: g,
126
+ children: [
127
+ /* @__PURE__ */ s(k, { src: e.image, alt: `${e.description} product image`, height: 72, width: 72 }),
128
+ /* @__PURE__ */ r("div", { className: t.itemInfo, children: [
129
+ /* @__PURE__ */ s(a, { size: "sm", children: e.description }),
130
+ /* @__PURE__ */ s(a, { size: "sm", colorToken: "quaternary", children: e.itemId })
131
+ ] })
132
+ ]
133
+ }
134
+ ) }, e.itemId)
84
135
  ) }) })
85
136
  ] });
86
137
  }
87
138
  export {
88
- E as SuggestionDropdown
139
+ Y as SuggestionDropdown
89
140
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@caseparts-org/caseblocks",
3
3
  "private": false,
4
- "version": "0.0.235",
4
+ "version": "0.0.236",
5
5
  "type": "module",
6
6
  "module": "dist/main.js",
7
7
  "types": "dist/main.d.ts",