@caseparts-org/caseblocks 0.0.241 → 0.0.243

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_2kbdw_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_2kbdw_1{flex-direction:column}}._leftColumn_2kbdw_31{display:flex;flex-direction:column;border-right:1px solid var(--border-border-primary);background-color:#fff;min-width:150px}@media (max-width: 767px){._leftColumn_2kbdw_31{border-right:0;border-bottom:1px solid var(--border-border-primary)}}._leftColumnFullWidth_2kbdw_55{flex:1}._suggestionSectionFullHeight_2kbdw_63{display:flex;flex:1}._rightColumn_2kbdw_73{display:flex;flex:1;flex-direction:column;gap:var(--spacing-spacing-1xs);padding:var(--spacing-spacing-default);background:var(--color-brand-primary-primary-pale-gray);min-width:250px}._categorySection_2kbdw_95{border-top:1px solid var(--border-border-primary)}._suggestions_2kbdw_101,._categories_2kbdw_103{display:flex;flex-direction:column;gap:0;padding:0}._suggestionsFullHeight_2kbdw_117{flex:1}._suggestions_2kbdw_101>:first-child,._categories_2kbdw_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_2kbdw_101>:last-child,._categories_2kbdw_103>:last-child{padding-bottom:var(--spacing-spacing-2xs)}._suggestionLink_2kbdw_149,._categoryLink_2kbdw_151{display:block;box-sizing:border-box;width:100%;padding:var(--spacing-spacing-2xs) var(--spacing-spacing-default);transition:background-color .3s ease-in}._suggestionLink_2kbdw_149:hover,._categoryLink_2kbdw_151:hover{text-decoration:none;background-color:var(--color-alerts-light-teal-blue)}._activeOption_2kbdw_181{background:var(--color-alerts-light-teal-blue)}._itemList_2kbdw_189{margin:0;padding:0;display:flex;flex-direction:column;gap:var(--spacing-spacing-2xs);width:100%}._item_2kbdw_189{display:flex;flex-direction:column;border:1px solid var(--border-border-primary);padding:var(--spacing-spacing-2xs);width:100%;background-color:#fff;transition:background-color .3s ease-in}._item_2kbdw_189:hover{background-color:var(--color-alerts-light-teal-blue)}._item_2kbdw_189>a:hover{text-decoration:none}._activeItem_2kbdw_243{border-color:var(--text-text-links);box-shadow:inset 0 0 0 1px var(--text-text-links)}._item_2kbdw_189 img{height:60px;width:60px}._item_2kbdw_189 a{display:flex;flex-direction:row;align-items:flex-start;gap:var(--spacing-spacing-2xs)}._itemInfo_2kbdw_277{display:grid;gap:var(--spacing-spacing-4xs)}._recentSearches_2kbdw_287{display:flex;flex-direction:column;background:var(--color-brand-primary-white);min-width:250px}._recentSearchesHeader_2kbdw_301{padding:var(--spacing-spacing-default) var(--spacing-spacing-default) var(--spacing-spacing-2xs)}._recentSearchesList_2kbdw_309{display:flex;flex-direction:column;gap:0;margin:0;padding:0}._recentSearch_2kbdw_287{display:flex;align-items:center;justify-content:space-between;gap:var(--spacing-spacing-2xs)}._recentSearchLink_2kbdw_339{display:flex;flex:1;min-width:0;align-items:center;padding:var(--spacing-spacing-2xs) var(--spacing-spacing-default)}._clearRecentSearch_2kbdw_355{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_17xzw_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_17xzw_1{flex-direction:column}}._leftColumn_17xzw_31{display:flex;flex-direction:column;border-right:1px solid var(--border-border-primary);background-color:#fff;min-width:150px}@media (max-width: 767px){._leftColumn_17xzw_31{border-right:0;border-bottom:1px solid var(--border-border-primary)}}._leftColumnFullWidth_17xzw_55{flex:1}._suggestionSectionFullHeight_17xzw_63{display:flex;flex:1}._rightColumn_17xzw_73{display:flex;flex:1;flex-direction:column;gap:var(--spacing-spacing-1xs);padding:var(--spacing-spacing-default);background:var(--color-brand-primary-primary-pale-gray);min-width:250px}._categorySection_17xzw_95{border-top:1px solid var(--border-border-primary)}._suggestions_17xzw_101,._categories_17xzw_103{display:flex;flex-direction:column;gap:0;padding:0}._suggestionsFullHeight_17xzw_117{flex:1}._customPartLink_17xzw_125{display:flex;align-items:center;gap:var(--spacing-spacing-4xs);box-sizing:border-box;width:100%;padding:var(--spacing-spacing-4xs) var(--spacing-spacing-default);transition:background-color .3s ease-in}._suggestions_17xzw_101>:first-child,._categories_17xzw_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_17xzw_101>:last-child,._categories_17xzw_103>:last-child{margin-bottom:var(--spacing-spacing-2xs)}._suggestionLink_17xzw_169,._categoryLink_17xzw_171{display:block;box-sizing:border-box;width:100%;padding:var(--spacing-spacing-2xs) var(--spacing-spacing-default);transition:background-color .3s ease-in}._suggestionLink_17xzw_169:hover,._categoryLink_17xzw_171:hover,._customPartLink_17xzw_125:hover{text-decoration:none;background-color:var(--color-alerts-light-teal-blue)}._activeOption_17xzw_207{background:var(--color-alerts-light-teal-blue)}._itemList_17xzw_215{margin:0;padding:0;display:flex;flex-direction:column;gap:var(--spacing-spacing-2xs);width:100%}._item_17xzw_215{display:flex;flex-direction:column;border:1px solid var(--border-border-primary);padding:var(--spacing-spacing-2xs);width:100%;background-color:#fff;transition:background-color .3s ease-in}._item_17xzw_215:hover{background-color:var(--color-alerts-light-teal-blue)}._item_17xzw_215>a:hover{text-decoration:none}._activeItem_17xzw_269{border-color:var(--text-text-links);box-shadow:inset 0 0 0 1px var(--text-text-links)}._item_17xzw_215 img{height:60px;width:60px}._item_17xzw_215 a{display:flex;flex-direction:row;align-items:flex-start;gap:var(--spacing-spacing-2xs)}._itemInfo_17xzw_303{display:grid;gap:var(--spacing-spacing-4xs)}._recentSearches_17xzw_313{display:flex;flex-direction:column;background:var(--color-brand-primary-white);min-width:250px}._recentSearchesHeader_17xzw_327{padding:var(--spacing-spacing-default) var(--spacing-spacing-default) var(--spacing-spacing-2xs)}._recentSearchesList_17xzw_335{display:flex;flex-direction:column;gap:0;margin:0;padding:0}._recentSearch_17xzw_313{display:flex;align-items:center;justify-content:space-between;gap:var(--spacing-spacing-2xs)}._recentSearchLink_17xzw_365{display:flex;flex:1;min-width:0;align-items:center;padding:var(--spacing-spacing-2xs) var(--spacing-spacing-default)}._clearRecentSearch_17xzw_381{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}
@@ -49,7 +49,7 @@ export type { MainNavProps } from './organisms/MainNav/MainNav';
49
49
  export { ChipSelector } from './organisms/ChipSelector/ChipSelector';
50
50
  export type { ChipSelectorProps } from './organisms/ChipSelector/ChipSelector';
51
51
  export { SuggestionDropdown } from './organisms/SuggestionDropdown/SuggestionDropdown';
52
- export type { SuggestionDropdownProps, SuggestedCategory, SuggestedTerm, SuggestedItem, RecentSearch, } from './organisms/SuggestionDropdown/SuggestionDropdown';
52
+ export type { SuggestionDropdownProps, SuggestedCategory, SuggestedTerm, SuggestedItem, SuggestedCustomPart, RecentSearch, } from './organisms/SuggestionDropdown/SuggestionDropdown';
53
53
  export { Product } from './organisms/Product/Product';
54
54
  export type { ProductProps, ProductView } from './organisms/Product/Product';
55
55
  export { Carousel } from './organisms/Carousel/Carousel';
package/dist/main.d.ts CHANGED
@@ -34,4 +34,4 @@ export { MainNav } from './organisms/MainNav/MainNav';
34
34
  export { ChipSelector } from './organisms/ChipSelector/ChipSelector';
35
35
  export type { ChipSelectorProps } from './organisms/ChipSelector/ChipSelector';
36
36
  export { SuggestionDropdown } from './organisms/SuggestionDropdown/SuggestionDropdown';
37
- export type { SuggestionDropdownProps, SuggestedCategory, SuggestedTerm, SuggestedItem, RecentSearch, } from './organisms/SuggestionDropdown/SuggestionDropdown';
37
+ export type { SuggestionDropdownProps, SuggestedCategory, SuggestedTerm, SuggestedItem, SuggestedCustomPart, RecentSearch, } from './organisms/SuggestionDropdown/SuggestionDropdown';
@@ -1,126 +1,127 @@
1
- import { jsx as m, jsxs as d, Fragment as W } from "react/jsx-runtime";
1
+ import { jsx as m, jsxs as d, Fragment as J } from "react/jsx-runtime";
2
2
  import L from "react";
3
3
  import { Text as U } from "../../atoms/Text/Text.js";
4
4
  import { Link as j } from "../../atoms/Link/Link.js";
5
5
  import { Icon as y } from "../../atoms/Icon/Icon.js";
6
- import { Flex as u } from "../../atoms/Flex/Flex.js";
7
- import { Grid as ni, Column as di } from "../../atoms/Grid/Grid.js";
8
- import { Input as J } from "../../atoms/Input/Input.js";
9
- import { InputEndAdornmentButton as B } from "../../atoms/InputEndAdornmentButton/InputEndAdornmentButton.js";
6
+ import { Flex as B } from "../../atoms/Flex/Flex.js";
7
+ import { Grid as di, Column as fi } from "../../atoms/Grid/Grid.js";
8
+ import { Input as X } from "../../atoms/Input/Input.js";
9
+ import { InputEndAdornmentButton as $ } from "../../atoms/InputEndAdornmentButton/InputEndAdornmentButton.js";
10
10
  import { Logo as ei } from "../../molecules/Logo/Logo.js";
11
- import { HamburgerMenu as fi } from "../../molecules/HamburgerMenu/HamburgerMenu.js";
12
- import { ShoppingCart as si } from "../../molecules/Cart/Cart.js";
13
- import { Account as ci } from "../../molecules/Account/Account.js";
14
- import { CategoryNav as ri } from "../../molecules/CategoryNav/CategoryNav.js";
15
- import { SuggestionDropdown as $ } from "../SuggestionDropdown/SuggestionDropdown.js";
16
- import { getHideAtStyles as X } from "../../atoms/HideAt.js";
11
+ import { HamburgerMenu as si } from "../../molecules/HamburgerMenu/HamburgerMenu.js";
12
+ import { ShoppingCart as ci } from "../../molecules/Cart/Cart.js";
13
+ import { Account as ri } from "../../molecules/Account/Account.js";
14
+ import { CategoryNav as _i } from "../../molecules/CategoryNav/CategoryNav.js";
15
+ import { SuggestionDropdown as u } from "../SuggestionDropdown/SuggestionDropdown.js";
16
+ import { getHideAtStyles as Y } from "../../atoms/HideAt.js";
17
17
  import { c as k } from "../../clsx-OuTLNxxd.js";
18
- import '../../assets/MainNav.css';const _i = "_main_12974_1", ai = "_column_12974_8", Ni = "_topNav_12974_13", yi = "_logo_12974_21", ki = "_operations_12974_24", wi = "_search_12974_31", Ai = "_mobileSearch_12974_36", bi = "_suggestionDropdown_12974_39", Di = "_siteLink_12974_45", vi = "_accountArea_12974_72", xi = "_category_12974_84", Li = "_categoryLink_12974_92", Ki = "_menuList_12974_108", zi = "_menuItemAction_12974_131", pi = "_shortcutIcon_12974_140", t = {
19
- main: _i,
18
+ import '../../assets/MainNav.css';const Ni = "_main_12974_1", ai = "_column_12974_8", yi = "_topNav_12974_13", ki = "_logo_12974_21", wi = "_operations_12974_24", Ai = "_search_12974_31", bi = "_mobileSearch_12974_36", Di = "_suggestionDropdown_12974_39", vi = "_siteLink_12974_45", xi = "_accountArea_12974_72", Li = "_category_12974_84", Ki = "_categoryLink_12974_92", zi = "_menuList_12974_108", pi = "_menuItemAction_12974_131", Bi = "_shortcutIcon_12974_140", t = {
19
+ main: Ni,
20
20
  column: ai,
21
- topNav: Ni,
22
- logo: yi,
23
- operations: ki,
24
- search: wi,
25
- mobileSearch: Ai,
26
- suggestionDropdown: bi,
27
- siteLink: Di,
28
- accountArea: vi,
29
- category: xi,
30
- categoryLink: Li,
31
- menuList: Ki,
32
- menuItemAction: zi,
33
- shortcutIcon: pi
34
- }, Ji = L.forwardRef(function({
21
+ topNav: yi,
22
+ logo: ki,
23
+ operations: wi,
24
+ search: Ai,
25
+ mobileSearch: bi,
26
+ suggestionDropdown: Di,
27
+ siteLink: vi,
28
+ accountArea: xi,
29
+ category: Li,
30
+ categoryLink: Ki,
31
+ menuList: zi,
32
+ menuItemAction: pi,
33
+ shortcutIcon: Bi
34
+ }, Xi = L.forwardRef(function({
35
35
  account: F,
36
36
  categories: b,
37
- homeRoute: Y,
38
- faqRoute: Z,
37
+ homeRoute: Z,
38
+ faqRoute: C,
39
39
  customPartsRoute: I,
40
- aboutUsRoute: g,
40
+ aboutUsRoute: P,
41
41
  contactRoute: M,
42
- cart: C,
43
- open: P,
42
+ cart: g,
43
+ open: V,
44
44
  // consume external panel control props from CartPropsBase
45
- className: V,
46
- onLoginClick: h,
47
- searchInputProps: o,
45
+ className: h,
46
+ onLoginClick: S,
47
+ searchInputProps: l,
48
48
  searchValue: s,
49
49
  onSearchValueChange: n,
50
50
  onClearSearch: w,
51
51
  onSearch: c,
52
- searchSuggestions: l,
52
+ searchSuggestions: o,
53
53
  recentSearches: _,
54
54
  onClearRecentSearch: H,
55
55
  onCategoryClick: K,
56
56
  onClickModelSerial: R,
57
- onCartClick: S,
58
- accountPopoverContent: ii,
59
- isAccountLoading: ti,
60
- isCategoriesLoading: mi,
61
- ...oi
62
- }, li) {
63
- const [T, a] = L.useState(!1), [e, N] = L.useState(-1), z = L.useRef(null), r = L.useId(), D = T && !!s && !!l, O = T && !D && !!(_ != null && _.length), v = D ? ((l == null ? void 0 : l.terms.length) ?? 0) + ((l == null ? void 0 : l.categories.length) ?? 0) + ((l == null ? void 0 : l.items.length) ?? 0) : O ? (_ == null ? void 0 : _.length) ?? 0 : 0, q = {
64
- ...o,
57
+ onCartClick: ii,
58
+ accountPopoverContent: ti,
59
+ isAccountLoading: mi,
60
+ isCategoriesLoading: oi,
61
+ ...li
62
+ }, ni) {
63
+ var G;
64
+ const [T, N] = L.useState(!1), [f, a] = L.useState(-1), z = L.useRef(null), r = L.useId(), D = T && !!s && !!o, O = T && !D && !!(_ != null && _.length), v = D ? ((o == null ? void 0 : o.terms.length) ?? 0) + ((o == null ? void 0 : o.categories.length) ?? 0) + (((G = o == null ? void 0 : o.customParts) == null ? void 0 : G.length) ?? 0) + ((o == null ? void 0 : o.items.length) ?? 0) : O ? (_ == null ? void 0 : _.length) ?? 0 : 0, q = {
65
+ ...l,
65
66
  onChange: (i) => {
66
- var f;
67
- N(-1), (f = o == null ? void 0 : o.onChange) == null || f.call(o, i);
67
+ var e;
68
+ a(-1), (e = l == null ? void 0 : l.onChange) == null || e.call(l, i);
68
69
  },
69
70
  onFocus: (i) => {
70
- var f;
71
- (f = o == null ? void 0 : o.onFocus) == null || f.call(o, i), a(!0);
71
+ var e;
72
+ (e = l == null ? void 0 : l.onFocus) == null || e.call(l, i), N(!0);
72
73
  },
73
74
  onBlur: (i) => {
74
- var f;
75
- (f = o == null ? void 0 : o.onBlur) == null || f.call(o, i), a(!1);
75
+ var e;
76
+ (e = l == null ? void 0 : l.onBlur) == null || e.call(l, i), N(!1);
76
77
  },
77
78
  onKeyDown: (i) => {
78
- var f, G, Q;
79
- if ((f = o == null ? void 0 : o.onKeyDown) == null || f.call(o, i), !i.defaultPrevented) {
79
+ var e, Q, W;
80
+ if ((e = l == null ? void 0 : l.onKeyDown) == null || e.call(l, i), !i.defaultPrevented) {
80
81
  if (i.key === "ArrowDown" && v > 0) {
81
- i.preventDefault(), N((x) => x >= v - 1 ? 0 : x + 1);
82
+ i.preventDefault(), a((x) => x >= v - 1 ? 0 : x + 1);
82
83
  return;
83
84
  }
84
85
  if (i.key === "ArrowUp" && v > 0) {
85
- i.preventDefault(), N((x) => x <= 0 ? v - 1 : x - 1);
86
+ i.preventDefault(), a((x) => x <= 0 ? v - 1 : x - 1);
86
87
  return;
87
88
  }
88
- if (i.key === "Tab" && D && e >= 0 && e < ((l == null ? void 0 : l.terms.length) ?? 0)) {
89
- i.preventDefault(), n == null || n((l == null ? void 0 : l.terms[e].name) ?? ""), N(-1);
89
+ if (i.key === "Tab" && D && f >= 0 && f < ((o == null ? void 0 : o.terms.length) ?? 0)) {
90
+ i.preventDefault(), n == null || n((o == null ? void 0 : o.terms[f].name) ?? ""), a(-1);
90
91
  return;
91
92
  }
92
- if (i.key === "Enter" && e >= 0 && e < v) {
93
- i.preventDefault(), (G = document.getElementById(`${r}-${e}`)) == null || G.click();
93
+ if (i.key === "Enter" && f >= 0 && f < v) {
94
+ i.preventDefault(), (Q = document.getElementById(`${r}-${f}`)) == null || Q.click();
94
95
  return;
95
96
  }
96
- i.key === "Enter" && (i.preventDefault(), a(!1), (Q = z.current) == null || Q.blur(), c == null || c(s ?? ""));
97
+ i.key === "Enter" && (i.preventDefault(), N(!1), (W = z.current) == null || W.blur(), c == null || c(s ?? ""));
97
98
  }
98
99
  }
99
100
  }, p = (i) => {
100
- var f;
101
- i.key.length !== 1 || i.altKey || i.ctrlKey || i.metaKey || (i.preventDefault(), N(-1), n == null || n(`${s ?? ""}${i.key}`), (f = z.current) == null || f.focus());
101
+ var e;
102
+ i.key.length !== 1 || i.altKey || i.ctrlKey || i.metaKey || (i.preventDefault(), a(-1), n == null || n(`${s ?? ""}${i.key}`), (e = z.current) == null || e.focus());
102
103
  };
103
- return /* @__PURE__ */ m(ni, { ...oi, gridWrapperClassName: k(t.main, V), children: /* @__PURE__ */ d(di, { span: 12, className: t.column, children: [
104
+ return /* @__PURE__ */ m(di, { ...li, gridWrapperClassName: k(t.main, h), children: /* @__PURE__ */ d(fi, { span: 12, className: t.column, children: [
104
105
  /* @__PURE__ */ d(
105
- u,
106
+ B,
106
107
  {
107
108
  flexDirection: "row",
108
109
  alignItems: "center",
109
110
  justifyContent: "space-between",
110
111
  className: t.topNav,
111
112
  children: [
112
- /* @__PURE__ */ m("div", { className: t.logo, children: /* @__PURE__ */ m(j, { href: Y, children: /* @__PURE__ */ m(ei, {}) }) }),
113
+ /* @__PURE__ */ m("div", { className: t.logo, children: /* @__PURE__ */ m(j, { href: Z, children: /* @__PURE__ */ m(ei, {}) }) }),
113
114
  /* @__PURE__ */ d(
114
- u,
115
+ B,
115
116
  {
116
117
  flexDirection: "row",
117
118
  alignItems: "center",
118
119
  justifyContent: "flex-end",
119
120
  className: t.operations,
120
121
  children: [
121
- /* @__PURE__ */ d(u, { flexDirection: "row", hideAt: ["sm"], className: t.search, children: [
122
+ /* @__PURE__ */ d(B, { flexDirection: "row", hideAt: ["sm"], className: t.search, children: [
122
123
  /* @__PURE__ */ m(
123
- J,
124
+ X,
124
125
  {
125
126
  variant: "search",
126
127
  label: "Search",
@@ -129,23 +130,23 @@ import '../../assets/MainNav.css';const _i = "_main_12974_1", ai = "_column_1297
129
130
  autoComplete: "off",
130
131
  "aria-autocomplete": "list",
131
132
  "aria-controls": r,
132
- "aria-activedescendant": e >= 0 ? `${r}-${e}` : void 0,
133
+ "aria-activedescendant": f >= 0 ? `${r}-${f}` : void 0,
133
134
  ...q,
134
135
  ref: z,
135
136
  value: s,
136
- endAdornment: /* @__PURE__ */ d(W, { children: [
137
+ endAdornment: /* @__PURE__ */ d(J, { children: [
137
138
  !!s && /* @__PURE__ */ m(
138
- B,
139
+ $,
139
140
  {
140
141
  "aria-label": "Clear search",
141
142
  onClick: () => {
142
- N(-1), w == null || w();
143
+ a(-1), w == null || w();
143
144
  },
144
145
  iconProps: { iconKey: "fa-regular fa-xmark", size: "sm" }
145
146
  }
146
147
  ),
147
148
  /* @__PURE__ */ m(
148
- B,
149
+ $,
149
150
  {
150
151
  "aria-label": "Submit search",
151
152
  onClick: () => c == null ? void 0 : c(s ?? ""),
@@ -155,21 +156,21 @@ import '../../assets/MainNav.css';const _i = "_main_12974_1", ai = "_column_1297
155
156
  ] })
156
157
  }
157
158
  ),
158
- D && l && /* @__PURE__ */ m(
159
- $,
159
+ D && o && /* @__PURE__ */ m(
160
+ u,
160
161
  {
161
- ...l,
162
- activeOptionIndex: e,
162
+ ...o,
163
+ activeOptionIndex: f,
163
164
  optionIdPrefix: r,
164
165
  onKeyDown: p,
165
166
  onSuggestionClick: (i) => {
166
- n == null || n((i == null ? void 0 : i.name) ?? s ?? ""), a(!1);
167
+ n == null || n((i == null ? void 0 : i.name) ?? s ?? ""), N(!1);
167
168
  },
168
169
  className: t.suggestionDropdown
169
170
  }
170
171
  ),
171
172
  O && /* @__PURE__ */ m(
172
- $,
173
+ u,
173
174
  {
174
175
  terms: [],
175
176
  categories: [],
@@ -177,42 +178,42 @@ import '../../assets/MainNav.css';const _i = "_main_12974_1", ai = "_column_1297
177
178
  view: "recent-searches",
178
179
  recentSearches: _,
179
180
  onClearRecentSearch: H,
180
- activeOptionIndex: e,
181
+ activeOptionIndex: f,
181
182
  optionIdPrefix: r,
182
183
  onKeyDown: p,
183
184
  onSuggestionClick: (i) => {
184
- n == null || n((i == null ? void 0 : i.term) ?? s ?? ""), a(!1);
185
+ n == null || n((i == null ? void 0 : i.term) ?? s ?? ""), N(!1);
185
186
  },
186
187
  className: t.suggestionDropdown
187
188
  }
188
189
  )
189
190
  ] }),
190
- /* @__PURE__ */ d("button", { onClick: R, className: k(t.siteLink, X(["sm", "md"])), children: [
191
+ /* @__PURE__ */ d("button", { onClick: R, className: k(t.siteLink, Y(["sm", "md"])), children: [
191
192
  /* @__PURE__ */ m(y, { iconKey: "fa-regular fa-sparkles", size: "sm" }),
192
193
  "Model/Serial"
193
194
  ] }),
194
195
  /* @__PURE__ */ m(A, { href: I, hideAt: ["sm", "md"], children: "Custom Parts" }),
195
196
  /* @__PURE__ */ m(A, { href: M, hideAt: ["sm", "md"], children: "Contact Us" }),
196
197
  /* @__PURE__ */ m("div", { className: t.accountArea, children: /* @__PURE__ */ m(
197
- ci,
198
+ ri,
198
199
  {
199
200
  account: F,
200
- onLoginClick: h,
201
+ onLoginClick: S,
201
202
  className: t.avatar,
202
- popoverContent: ii,
203
- isAccountLoading: ti
203
+ popoverContent: ti,
204
+ isAccountLoading: mi
204
205
  }
205
206
  ) }),
206
207
  /* @__PURE__ */ m(
207
- si,
208
+ ci,
208
209
  {
209
- ref: li,
210
- cart: C,
211
- open: P,
212
- onCartClick: S
210
+ ref: ni,
211
+ cart: g,
212
+ open: V,
213
+ onCartClick: ii
213
214
  }
214
215
  ),
215
- /* @__PURE__ */ d(fi, { hideAt: ["lg"], children: [
216
+ /* @__PURE__ */ d(si, { hideAt: ["lg"], children: [
216
217
  /* @__PURE__ */ d("section", { children: [
217
218
  /* @__PURE__ */ m(U, { size: "md", weight: "semibold", children: "Useful shortcuts" }),
218
219
  /* @__PURE__ */ d("ul", { className: t.menuList, children: [
@@ -221,7 +222,7 @@ import '../../assets/MainNav.css';const _i = "_main_12974_1", ai = "_column_1297
221
222
  {
222
223
  onClick: R,
223
224
  "data-hamburger-close": "true",
224
- className: k(t.siteLink, t.menuItemAction, X(["lg"])),
225
+ className: k(t.siteLink, t.menuItemAction, Y(["lg"])),
225
226
  children: [
226
227
  /* @__PURE__ */ m(y, { iconKey: "fa-regular fa-sparkles", size: "sm", className: t.shortcutIcon }),
227
228
  "Model/Serial"
@@ -236,11 +237,11 @@ import '../../assets/MainNav.css';const _i = "_main_12974_1", ai = "_column_1297
236
237
  /* @__PURE__ */ m(y, { iconKey: "fa-regular fa-envelope", size: "sm", className: t.shortcutIcon }),
237
238
  "Contact Us"
238
239
  ] }) }),
239
- /* @__PURE__ */ m("li", { className: t.menuItem, children: /* @__PURE__ */ d(A, { href: Z, className: k(t.siteLink, t.menuItemAction), children: [
240
+ /* @__PURE__ */ m("li", { className: t.menuItem, children: /* @__PURE__ */ d(A, { href: C, className: k(t.siteLink, t.menuItemAction), children: [
240
241
  /* @__PURE__ */ m(y, { iconKey: "fa-solid fa-question", size: "sm", className: t.shortcutIcon }),
241
242
  "FAQ"
242
243
  ] }) }),
243
- /* @__PURE__ */ m("li", { className: t.menuItem, children: /* @__PURE__ */ d(A, { href: g, className: k(t.siteLink, t.menuItemAction), children: [
244
+ /* @__PURE__ */ m("li", { className: t.menuItem, children: /* @__PURE__ */ d(A, { href: P, className: k(t.siteLink, t.menuItemAction), children: [
244
245
  /* @__PURE__ */ m(y, { iconKey: "fa-regular fa-people-group", size: "sm", className: t.shortcutIcon }),
245
246
  "About Us"
246
247
  ] }) })
@@ -275,9 +276,9 @@ import '../../assets/MainNav.css';const _i = "_main_12974_1", ai = "_column_1297
275
276
  ]
276
277
  }
277
278
  ),
278
- /* @__PURE__ */ m(u, { flexDirection: "row", hideAt: ["md", "lg"], className: t.mobileSearch, children: /* @__PURE__ */ d("div", { className: t.search, children: [
279
+ /* @__PURE__ */ m(B, { flexDirection: "row", hideAt: ["md", "lg"], className: t.mobileSearch, children: /* @__PURE__ */ d("div", { className: t.search, children: [
279
280
  /* @__PURE__ */ m(
280
- J,
281
+ X,
281
282
  {
282
283
  variant: "search",
283
284
  label: "Search",
@@ -286,23 +287,23 @@ import '../../assets/MainNav.css';const _i = "_main_12974_1", ai = "_column_1297
286
287
  autoComplete: "off",
287
288
  "aria-autocomplete": "list",
288
289
  "aria-controls": r,
289
- "aria-activedescendant": e >= 0 ? `${r}-${e}` : void 0,
290
+ "aria-activedescendant": f >= 0 ? `${r}-${f}` : void 0,
290
291
  ...q,
291
292
  ref: z,
292
293
  value: s,
293
- endAdornment: /* @__PURE__ */ d(W, { children: [
294
+ endAdornment: /* @__PURE__ */ d(J, { children: [
294
295
  !!s && /* @__PURE__ */ m(
295
- B,
296
+ $,
296
297
  {
297
298
  "aria-label": "Clear search",
298
299
  onClick: () => {
299
- N(-1), w == null || w();
300
+ a(-1), w == null || w();
300
301
  },
301
302
  iconProps: { iconKey: "fa-regular fa-xmark", size: "sm" }
302
303
  }
303
304
  ),
304
305
  /* @__PURE__ */ m(
305
- B,
306
+ $,
306
307
  {
307
308
  "aria-label": "Submit search",
308
309
  onClick: () => c == null ? void 0 : c(s ?? ""),
@@ -312,11 +313,11 @@ import '../../assets/MainNav.css';const _i = "_main_12974_1", ai = "_column_1297
312
313
  ] })
313
314
  }
314
315
  ),
315
- D && l && /* @__PURE__ */ m($, { ...l, activeOptionIndex: e, optionIdPrefix: r, onKeyDown: p, onSuggestionClick: (i) => {
316
- n == null || n((i == null ? void 0 : i.name) ?? s ?? ""), a(!1);
316
+ D && o && /* @__PURE__ */ m(u, { ...o, activeOptionIndex: f, optionIdPrefix: r, onKeyDown: p, onSuggestionClick: (i) => {
317
+ n == null || n((i == null ? void 0 : i.name) ?? s ?? ""), N(!1);
317
318
  }, className: t.suggestionDropdown }),
318
319
  O && /* @__PURE__ */ m(
319
- $,
320
+ u,
320
321
  {
321
322
  terms: [],
322
323
  categories: [],
@@ -324,21 +325,21 @@ import '../../assets/MainNav.css';const _i = "_main_12974_1", ai = "_column_1297
324
325
  view: "recent-searches",
325
326
  recentSearches: _,
326
327
  onClearRecentSearch: H,
327
- activeOptionIndex: e,
328
+ activeOptionIndex: f,
328
329
  optionIdPrefix: r,
329
330
  onKeyDown: p,
330
331
  onSuggestionClick: (i) => {
331
- n == null || n((i == null ? void 0 : i.term) ?? s ?? ""), a(!1);
332
+ n == null || n((i == null ? void 0 : i.term) ?? s ?? ""), N(!1);
332
333
  },
333
334
  className: t.suggestionDropdown
334
335
  }
335
336
  )
336
337
  ] }) }),
337
338
  /* @__PURE__ */ m(
338
- ri,
339
+ _i,
339
340
  {
340
341
  categories: b,
341
- isCategoriesLoading: mi,
342
+ isCategoriesLoading: oi,
342
343
  onCategoryClick: K
343
344
  }
344
345
  )
@@ -352,5 +353,5 @@ function A({
352
353
  return /* @__PURE__ */ m(j, { href: E, className: t.siteLink, ...b, children: F });
353
354
  }
354
355
  export {
355
- Ji as MainNav
356
+ Xi as MainNav
356
357
  };
@@ -1,8 +1,8 @@
1
- import { jsxs as p, Fragment as k, jsx as i } from "react/jsx-runtime";
1
+ import { jsxs as p, Fragment as C, 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
- import { Text as y } from "../../atoms/Text/Text.js";
5
- import { Link as h } from "../../atoms/Link/Link.js";
4
+ import { Text as h } from "../../atoms/Text/Text.js";
5
+ import { Link as y } 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 = {
@@ -119,6 +119,10 @@ const P = {
119
119
  { categoryKey: 46971, name: "Magnetic Gaskets", url: "/category/46971" },
120
120
  { categoryKey: 47501, name: "Magnetic Gaskets", url: "/category/47501" }
121
121
  ],
122
+ customParts: [
123
+ { id: "gasket", label: "Gaskets", url: "/custom/gasket", icon: "fa-kit fa-gaskets" },
124
+ { id: "heater", label: "Bent Heaters", url: "/custom/heater", icon: "fa-kit fa-coils" }
125
+ ],
122
126
  items: [
123
127
  { itemKey: 13503, itemId: "GASKET-RING", description: "Gasket Sample Ring", image: a, url: "/part/GASKET-RING" },
124
128
  { itemKey: 13968, itemId: "810719", description: "26-5/8 x 54-1/4 Door Gasket For True", image: a, url: "/part/810719" },
@@ -126,7 +130,7 @@ const P = {
126
130
  { itemKey: 435, itemId: "810803", description: "25-5/8 x 54-1/8 Door Gasket For True", image: a, url: "/part/810803" },
127
131
  { itemKey: 14622, itemId: "932587", description: "26-3/4 x 26-3/4 Door Gasket For True", image: a, url: "/part/932587" }
128
132
  ]
129
- }, R = [
133
+ }, f = [
130
134
  { term: "door gasket", url: "/search/door-gasket" },
131
135
  { term: "walk-in cooler", url: "/search/walk-in-cooler" },
132
136
  { term: "thermostat", url: "/search/thermostat" }
@@ -146,21 +150,21 @@ const P = {
146
150
  { id: 12, itemId: "1092-02", description: "Kason Door Closer - Offset", price: "$99.99", quantity: 1, imageUrl: a, availability: "In Stock", availabilityId: "available" }
147
151
  ]
148
152
  };
149
- function f(e) {
153
+ function R(e) {
150
154
  return `$${e.items.reduce(
151
155
  (t, r) => t + (parseFloat(r.price.replace(/[^0-9.]/g, "")) || 0) * r.quantity,
152
156
  0
153
157
  ).toFixed(2)}`;
154
158
  }
155
159
  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(h, { size: "sm", weight: "semibold", children: "Account" }),
161
+ /* @__PURE__ */ i(h, { size: "xs", children: "Signed in as Ringo" }),
162
+ /* @__PURE__ */ i(y, { href: "/account", "data-popover-close": "true", children: "View Account" }),
163
+ /* @__PURE__ */ i(y, { href: "/orders", "data-popover-close": "true", children: "Order History" }),
160
164
  /* @__PURE__ */ i(S, { size: "sm", variant: "secondary", "data-popover-close": "true", onClick: () => alert("Sign out"), children: "Sign Out" })
161
165
  ] }), m = (e) => {
162
166
  const [o, t] = g(!1);
163
- return /* @__PURE__ */ p(k, { children: [
167
+ return /* @__PURE__ */ p(C, { children: [
164
168
  /* @__PURE__ */ i(
165
169
  b,
166
170
  {
@@ -175,7 +179,7 @@ const u = /* @__PURE__ */ p("div", { style: { display: "flex", flexDirection: "c
175
179
  open: o,
176
180
  onClose: () => t(!1),
177
181
  cart: e.cart,
178
- subtotal: f(e.cart),
182
+ subtotal: R(e.cart),
179
183
  itemPriceLabel: "List Price",
180
184
  onItemQtyChange: () => alert("Qty Change"),
181
185
  onItemDelete: () => alert("Delete"),
@@ -184,7 +188,7 @@ const u = /* @__PURE__ */ p("div", { style: { display: "flex", flexDirection: "c
184
188
  )
185
189
  ] });
186
190
  }, G = (e) => {
187
- const [o, t] = g(""), [r, C] = g(R);
191
+ const [o, t] = g(""), [r, k] = g(f);
188
192
  return /* @__PURE__ */ i(
189
193
  b,
190
194
  {
@@ -196,7 +200,7 @@ const u = /* @__PURE__ */ p("div", { style: { display: "flex", flexDirection: "c
196
200
  searchSuggestions: o ? I : void 0,
197
201
  recentSearches: r,
198
202
  onClearRecentSearch: (l) => {
199
- C((n) => n.filter((d) => d.url !== l.url));
203
+ k((n) => n.filter((d) => d.url !== l.url));
200
204
  },
201
205
  searchInputProps: {
202
206
  ...e.searchInputProps,
@@ -1,3 +1,4 @@
1
+ import { IconProps } from '../../atoms/Icon/Icon';
1
2
  export type SuggestedCategory = {
2
3
  categoryKey: number;
3
4
  name: string;
@@ -14,6 +15,12 @@ export type SuggestedItem = {
14
15
  image: string;
15
16
  url: string;
16
17
  };
18
+ export type SuggestedCustomPart = {
19
+ id: string;
20
+ label: string;
21
+ url: string;
22
+ icon: IconProps["iconKey"];
23
+ };
17
24
  export type RecentSearch = {
18
25
  term: string;
19
26
  url: string;
@@ -27,6 +34,7 @@ export interface SuggestionDropdownProps {
27
34
  terms: SuggestedTerm[];
28
35
  categories: SuggestedCategory[];
29
36
  items: SuggestedItem[];
37
+ customParts?: SuggestedCustomPart[];
30
38
  recentSearches?: RecentSearch[];
31
39
  onClearRecentSearch?: (_recentSearch: RecentSearch) => void;
32
40
  onSuggestionClick?: (_suggestion?: SearchSelection) => void;
@@ -35,5 +43,5 @@ export interface SuggestionDropdownProps {
35
43
  onKeyDown?: React.KeyboardEventHandler<HTMLDivElement>;
36
44
  className?: string;
37
45
  }
38
- export declare function SuggestionDropdown({ terms, categories, items, view, recentSearches, onClearRecentSearch, onSuggestionClick, activeOptionIndex, optionIdPrefix, onKeyDown, className }: SuggestionDropdownProps): import("react/jsx-runtime").JSX.Element;
46
+ export declare function SuggestionDropdown({ terms, categories, items, customParts, view, recentSearches, onClearRecentSearch, onSuggestionClick, activeOptionIndex, optionIdPrefix, onKeyDown, className }: SuggestionDropdownProps): import("react/jsx-runtime").JSX.Element | null;
39
47
  export {};
@@ -1,133 +1,157 @@
1
- import { jsxs as o, jsx as s } from "react/jsx-runtime";
1
+ import { jsxs as a, jsx as t } from "react/jsx-runtime";
2
2
  import { Text as h } from "../../atoms/Text/Text.js";
3
- import { Link as m } from "../../atoms/Link/Link.js";
4
- import { Icon as k } from "../../atoms/Icon/Icon.js";
5
- import { c as r } from "../../clsx-OuTLNxxd.js";
6
- import { Image as p } from "../../atoms/Image/Image.js";
7
- import '../../assets/SuggestionDropdown.css';const L = "_suggestionDropdown_2kbdw_1", N = "_leftColumn_2kbdw_31", v = "_leftColumnFullWidth_2kbdw_55", y = "_suggestionSectionFullHeight_2kbdw_63", F = "_rightColumn_2kbdw_73", H = "_categorySection_2kbdw_95", $ = "_suggestions_2kbdw_101", z = "_categories_2kbdw_103", D = "_suggestionsFullHeight_2kbdw_117", T = "_suggestionLink_2kbdw_149", q = "_categoryLink_2kbdw_151", W = "_activeOption_2kbdw_181", j = "_itemList_2kbdw_189", M = "_item_2kbdw_189", O = "_activeItem_2kbdw_243", S = "_itemInfo_2kbdw_277", K = "_recentSearches_2kbdw_287", R = "_recentSearchesHeader_2kbdw_301", x = "_recentSearchesList_2kbdw_309", A = "_recentSearch_2kbdw_287", B = "_recentSearchLink_2kbdw_339", E = "_clearRecentSearch_2kbdw_355", t = {
8
- suggestionDropdown: L,
9
- leftColumn: N,
10
- leftColumnFullWidth: v,
11
- suggestionSectionFullHeight: y,
12
- rightColumn: F,
13
- categorySection: H,
14
- suggestions: $,
15
- categories: z,
16
- suggestionsFullHeight: D,
17
- suggestionLink: T,
18
- categoryLink: q,
19
- activeOption: W,
20
- itemList: j,
21
- item: M,
22
- activeItem: O,
23
- itemInfo: S,
24
- recentSearches: K,
25
- recentSearchesHeader: R,
26
- recentSearchesList: x,
27
- recentSearch: A,
28
- recentSearchLink: B,
29
- clearRecentSearch: E
3
+ import { Link as g } from "../../atoms/Link/Link.js";
4
+ import { Icon as x } from "../../atoms/Icon/Icon.js";
5
+ import { c as o } from "../../clsx-OuTLNxxd.js";
6
+ import { Image as N } from "../../atoms/Image/Image.js";
7
+ import '../../assets/SuggestionDropdown.css';const y = "_suggestionDropdown_17xzw_1", v = "_leftColumn_17xzw_31", F = "_leftColumnFullWidth_17xzw_55", H = "_suggestionSectionFullHeight_17xzw_63", $ = "_rightColumn_17xzw_73", D = "_categorySection_17xzw_95", b = "_suggestions_17xzw_101", T = "_categories_17xzw_103", k = "_suggestionsFullHeight_17xzw_117", q = "_customPartLink_17xzw_125", W = "_suggestionLink_17xzw_169", j = "_categoryLink_17xzw_171", K = "_activeOption_17xzw_207", M = "_itemList_17xzw_215", O = "_item_17xzw_215", R = "_activeItem_17xzw_269", A = "_itemInfo_17xzw_303", B = "_recentSearches_17xzw_313", E = "_recentSearchesHeader_17xzw_327", G = "_recentSearchesList_17xzw_335", J = "_recentSearch_17xzw_313", Q = "_recentSearchLink_17xzw_365", U = "_clearRecentSearch_17xzw_381", l = {
8
+ suggestionDropdown: y,
9
+ leftColumn: v,
10
+ leftColumnFullWidth: F,
11
+ suggestionSectionFullHeight: H,
12
+ rightColumn: $,
13
+ categorySection: D,
14
+ suggestions: b,
15
+ categories: T,
16
+ suggestionsFullHeight: k,
17
+ customPartLink: q,
18
+ suggestionLink: W,
19
+ categoryLink: j,
20
+ activeOption: K,
21
+ itemList: M,
22
+ item: O,
23
+ activeItem: R,
24
+ itemInfo: A,
25
+ recentSearches: B,
26
+ recentSearchesHeader: E,
27
+ recentSearchesList: G,
28
+ recentSearch: J,
29
+ recentSearchLink: Q,
30
+ clearRecentSearch: U
30
31
  };
31
- function Y({
32
- terms: n,
33
- categories: c,
32
+ function I({
33
+ terms: i,
34
+ categories: r,
34
35
  items: u,
35
- view: f = "suggestions",
36
- recentSearches: d = [],
37
- onClearRecentSearch: g,
38
- onSuggestionClick: l,
39
- activeOptionIndex: a = -1,
40
- optionIdPrefix: _,
41
- onKeyDown: w,
42
- className: b
36
+ customParts: _ = [],
37
+ view: p = "suggestions",
38
+ recentSearches: m = [],
39
+ onClearRecentSearch: z,
40
+ onSuggestionClick: n,
41
+ activeOptionIndex: c = -1,
42
+ optionIdPrefix: d,
43
+ onKeyDown: f,
44
+ className: L
43
45
  }) {
44
- return f === "recent-searches" ? /* @__PURE__ */ o(
46
+ return i.length === 0 && r.length === 0 && u.length === 0 && _.length === 0 && m.length === 0 ? null : p === "recent-searches" ? /* @__PURE__ */ a(
45
47
  "div",
46
48
  {
47
- id: _,
49
+ id: d,
48
50
  role: "listbox",
49
- className: r(t.suggestionDropdown, t.recentSearches, b),
50
- onKeyDown: w,
51
+ className: o(l.suggestionDropdown, l.recentSearches, L),
52
+ onKeyDown: f,
51
53
  onMouseDown: (e) => e.preventDefault(),
52
54
  children: [
53
- /* @__PURE__ */ s("div", { className: t.recentSearchesHeader, children: /* @__PURE__ */ s(h, { size: "xxs", colorToken: "quaternary", children: "Recent Searches" }) }),
54
- /* @__PURE__ */ s("ol", { className: t.recentSearchesList, children: d.map((e) => /* @__PURE__ */ o("li", { className: t.recentSearch, children: [
55
- /* @__PURE__ */ s(
56
- m,
55
+ /* @__PURE__ */ t("div", { className: l.recentSearchesHeader, children: /* @__PURE__ */ t(h, { size: "xxs", colorToken: "quaternary", children: "Recent Searches" }) }),
56
+ /* @__PURE__ */ t("ol", { className: l.recentSearchesList, children: m.map((e) => /* @__PURE__ */ a("li", { className: l.recentSearch, children: [
57
+ /* @__PURE__ */ t(
58
+ g,
57
59
  {
58
60
  href: e.url,
59
- id: `${_}-${d.indexOf(e)}`,
61
+ id: `${d}-${m.indexOf(e)}`,
60
62
  role: "option",
61
- "aria-selected": a === d.indexOf(e),
62
- className: r(t.recentSearchLink, { [t.activeOption]: a === d.indexOf(e) }),
63
- onClick: () => l == null ? void 0 : l(e),
64
- children: /* @__PURE__ */ s(h, { size: "sm", children: e.term })
63
+ "aria-selected": c === m.indexOf(e),
64
+ className: o(l.recentSearchLink, { [l.activeOption]: c === m.indexOf(e) }),
65
+ onClick: () => n == null ? void 0 : n(e),
66
+ children: /* @__PURE__ */ t(h, { size: "sm", children: e.term })
65
67
  }
66
68
  ),
67
- /* @__PURE__ */ s(
69
+ /* @__PURE__ */ t(
68
70
  "button",
69
71
  {
70
72
  type: "button",
71
- className: t.clearRecentSearch,
73
+ className: l.clearRecentSearch,
72
74
  "aria-label": `Clear recent search: ${e.term}`,
73
- onClick: () => g == null ? void 0 : g(e),
74
- children: /* @__PURE__ */ s(k, { iconKey: "fa-regular fa-xmark", size: "sm" })
75
+ onClick: () => z == null ? void 0 : z(e),
76
+ children: /* @__PURE__ */ t(x, { iconKey: "fa-regular fa-xmark", size: "sm" })
75
77
  }
76
78
  )
77
79
  ] }, e.url)) })
78
80
  ]
79
81
  }
80
- ) : /* @__PURE__ */ o("div", { id: _, role: "listbox", className: r(t.suggestionDropdown, b), onKeyDown: w, onMouseDown: (e) => e.preventDefault(), children: [
81
- (n.length > 0 || c.length > 0) && /* @__PURE__ */ o("div", { className: r(t.leftColumn, { [t.leftColumnFullWidth]: u.length === 0 }), children: [
82
- n.length > 0 && /* @__PURE__ */ s("div", { className: r(t.suggestionSection, { [t.suggestionSectionFullHeight]: c.length === 0 }), children: /* @__PURE__ */ o("div", { className: r(t.suggestions, { [t.suggestionsFullHeight]: c.length === 0 }), children: [
83
- /* @__PURE__ */ s(h, { size: "xxs", colorToken: "quaternary", children: "Suggestions" }),
84
- n.map(
85
- (e, i) => /* @__PURE__ */ s(h, { size: "sm", children: /* @__PURE__ */ s(
86
- m,
82
+ ) : /* @__PURE__ */ a("div", { id: d, role: "listbox", className: o(l.suggestionDropdown, L), onKeyDown: f, onMouseDown: (e) => e.preventDefault(), children: [
83
+ (i.length > 0 || r.length > 0 || _.length > 0) && /* @__PURE__ */ a("div", { className: o(l.leftColumn, { [l.leftColumnFullWidth]: u.length === 0 }), children: [
84
+ i.length > 0 && /* @__PURE__ */ t("div", { className: o(l.suggestionSection, { [l.suggestionSectionFullHeight]: r.length === 0 }), children: /* @__PURE__ */ a("div", { className: o(l.suggestions, { [l.suggestionsFullHeight]: r.length === 0 }), children: [
85
+ /* @__PURE__ */ t(h, { size: "xxs", colorToken: "quaternary", children: "Suggestions" }),
86
+ i.map(
87
+ (e, s) => /* @__PURE__ */ t(h, { size: "sm", children: /* @__PURE__ */ t(
88
+ g,
87
89
  {
88
90
  href: e.url,
89
- id: `${_}-${i}`,
91
+ id: `${d}-${s}`,
90
92
  role: "option",
91
- "aria-selected": a === i,
92
- className: r(t.suggestionLink, { [t.activeOption]: a === i }),
93
- onClick: () => l == null ? void 0 : l(e),
93
+ "aria-selected": c === s,
94
+ className: o(l.suggestionLink, { [l.activeOption]: c === s }),
95
+ onClick: () => n == null ? void 0 : n(e),
94
96
  children: e.name
95
97
  }
96
98
  ) }, e.url)
97
99
  )
98
100
  ] }) }),
99
- c.length > 0 && /* @__PURE__ */ s("div", { className: t.categorySection, children: /* @__PURE__ */ o("div", { className: t.categories, children: [
100
- /* @__PURE__ */ s(h, { size: "xxs", colorToken: "quaternary", children: "Categories" }),
101
- c.map(
102
- (e, i) => /* @__PURE__ */ s(h, { size: "sm", children: /* @__PURE__ */ s(
103
- m,
101
+ r.length > 0 && /* @__PURE__ */ t("div", { className: l.categorySection, children: /* @__PURE__ */ a("div", { className: l.categories, children: [
102
+ /* @__PURE__ */ t(h, { size: "xxs", colorToken: "quaternary", children: "Categories" }),
103
+ r.map(
104
+ (e, s) => /* @__PURE__ */ t(h, { size: "sm", children: /* @__PURE__ */ t(
105
+ g,
104
106
  {
105
107
  href: e.url,
106
- id: `${_}-${n.length + i}`,
108
+ id: `${d}-${i.length + s}`,
107
109
  role: "option",
108
- "aria-selected": a === n.length + i,
109
- className: r(t.categoryLink, { [t.activeOption]: a === n.length + i }),
110
- onClick: () => l == null ? void 0 : l(),
110
+ "aria-selected": c === i.length + s,
111
+ className: o(l.categoryLink, { [l.activeOption]: c === i.length + s }),
112
+ onClick: () => n == null ? void 0 : n(),
111
113
  children: e.name
112
114
  }
113
115
  ) }, e.categoryKey)
114
116
  )
117
+ ] }) }),
118
+ _.length > 0 && /* @__PURE__ */ t("div", { className: l.categorySection, children: /* @__PURE__ */ a("div", { className: l.categories, children: [
119
+ /* @__PURE__ */ t(h, { size: "xxs", colorToken: "quaternary", children: "Custom Parts" }),
120
+ _.map((e, s) => {
121
+ const w = i.length + r.length + s;
122
+ return /* @__PURE__ */ a(
123
+ g,
124
+ {
125
+ href: e.url,
126
+ id: `${d}-${w}`,
127
+ role: "option",
128
+ "aria-selected": c === w,
129
+ className: o(l.customPartLink, { [l.activeOption]: c === w }),
130
+ onClick: () => n == null ? void 0 : n(),
131
+ children: [
132
+ /* @__PURE__ */ t(x, { iconKey: e.icon, size: "sm" }),
133
+ /* @__PURE__ */ t(h, { size: "sm", children: e.label })
134
+ ]
135
+ },
136
+ e.id
137
+ );
138
+ })
115
139
  ] }) })
116
140
  ] }),
117
- u.length > 0 && /* @__PURE__ */ s("div", { className: t.rightColumn, children: /* @__PURE__ */ s("ol", { className: t.itemList, children: u.map(
118
- (e, i) => /* @__PURE__ */ s("li", { className: r(t.item, { [t.activeItem]: a === n.length + c.length + i }), children: /* @__PURE__ */ o(
119
- m,
141
+ u.length > 0 && /* @__PURE__ */ t("div", { className: l.rightColumn, children: /* @__PURE__ */ t("ol", { className: l.itemList, children: u.map(
142
+ (e, s) => /* @__PURE__ */ t("li", { className: o(l.item, { [l.activeItem]: c === i.length + r.length + _.length + s }), children: /* @__PURE__ */ a(
143
+ g,
120
144
  {
121
145
  href: e.url,
122
- id: `${_}-${n.length + c.length + i}`,
146
+ id: `${d}-${i.length + r.length + _.length + s}`,
123
147
  role: "option",
124
- "aria-selected": a === n.length + c.length + i,
125
- onClick: () => l == null ? void 0 : l(),
148
+ "aria-selected": c === i.length + r.length + _.length + s,
149
+ onClick: () => n == null ? void 0 : n(),
126
150
  children: [
127
- /* @__PURE__ */ s(p, { src: e.image, alt: `${e.description} product image`, height: 72, width: 72 }),
128
- /* @__PURE__ */ o("div", { className: t.itemInfo, children: [
129
- /* @__PURE__ */ s(h, { size: "sm", children: e.description }),
130
- /* @__PURE__ */ s(h, { size: "xs", colorToken: "quaternary", children: e.itemId })
151
+ /* @__PURE__ */ t(N, { src: e.image, alt: `${e.description} product image`, height: 72, width: 72 }),
152
+ /* @__PURE__ */ a("div", { className: l.itemInfo, children: [
153
+ /* @__PURE__ */ t(h, { size: "sm", children: e.description }),
154
+ /* @__PURE__ */ t(h, { size: "xs", colorToken: "quaternary", children: e.itemId })
131
155
  ] })
132
156
  ]
133
157
  }
@@ -136,5 +160,5 @@ function Y({
136
160
  ] });
137
161
  }
138
162
  export {
139
- Y as SuggestionDropdown
163
+ I as SuggestionDropdown
140
164
  };
@@ -19,19 +19,23 @@ const a = {
19
19
  { categoryKey: 2, name: "Accessories", url: "/categories/accessories" },
20
20
  { categoryKey: 3, name: "Controls", url: "/categories/controls" }
21
21
  ],
22
+ customParts: [
23
+ { id: "gasket", label: "Gaskets", url: "/custom/gasket", icon: "fa-kit fa-gaskets" },
24
+ { id: "heater", label: "Bent Heaters", url: "/custom/heater", icon: "fa-kit fa-coils" }
25
+ ],
22
26
  items: [
23
27
  {
24
28
  itemKey: 1,
25
29
  itemId: "P-1001",
26
30
  description: "Smart Thermostat",
27
- image: "https://placehold.co/120x80/png?text=Thermostat",
31
+ image: "https://placehold.co/120x80/png?text=T-Stat",
28
32
  url: "/parts/p-1001"
29
33
  },
30
34
  {
31
35
  itemKey: 2,
32
36
  itemId: "P-1002",
33
37
  description: "Wire Harness",
34
- image: "https://placehold.co/120x80/png?text=Harness",
38
+ image: "https://placehold.co/120x80/png?text=Gasket",
35
39
  url: "/parts/p-1002"
36
40
  },
37
41
  {
@@ -53,13 +57,13 @@ const a = {
53
57
  ...e.args,
54
58
  items: []
55
59
  }
56
- }, n = {
60
+ }, i = {
57
61
  args: {
58
62
  ...e.args,
59
63
  terms: [],
60
64
  categories: []
61
65
  }
62
- }, i = {
66
+ }, n = {
63
67
  args: {
64
68
  view: "recent-searches",
65
69
  terms: [],
@@ -75,8 +79,8 @@ const a = {
75
79
  };
76
80
  export {
77
81
  e as Default,
78
- n as OnlyItems,
79
- i as RecentSearches,
82
+ i as OnlyItems,
83
+ n as RecentSearches,
80
84
  o as WithoutCategories,
81
85
  c as WithoutItems,
82
86
  a as default
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@caseparts-org/caseblocks",
3
3
  "private": false,
4
- "version": "0.0.241",
4
+ "version": "0.0.243",
5
5
  "type": "module",
6
6
  "module": "dist/main.js",
7
7
  "types": "dist/main.d.ts",