@caseparts-org/caseblocks 0.0.231 → 0.0.233

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_zk1ld_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_zk1ld_1{flex-direction:column}}._leftColumn_zk1ld_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_zk1ld_31{border-right:0;border-bottom:1px solid var(--border-border-primary)}}._rightColumn_zk1ld_55{display:flex;flex-direction:column;gap:var(--spacing-spacing-1xs);padding:var(--spacing-spacing-default);background:var(--color-brand-primary-white);min-width:250px}._categorySection_zk1ld_75{border-top:1px solid var(--border-border-primary)}._suggestions_zk1ld_81,._categories_zk1ld_83{display:flex;flex-direction:column;gap:0;padding:0}._suggestions_zk1ld_81>:first-child,._categories_zk1ld_83>: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_zk1ld_81>:last-child{padding-bottom:var(--spacing-spacing-2xs)}._suggestionLink_zk1ld_119,._categoryLink_zk1ld_121{display:block;box-sizing:border-box;width:100%;padding:var(--spacing-spacing-2xs) var(--spacing-spacing-default)}._itemList_zk1ld_135{margin:0;padding:0;display:flex;flex-direction:column;gap:var(--spacing-spacing-2xs);width:100%}._item_zk1ld_135{display:flex;flex-direction:column;border:1px solid var(--border-border-primary);padding:var(--spacing-spacing-2xs);width:100%}._item_zk1ld_135 img{height:60px;width:60px}._item_zk1ld_135 a{display:flex;flex-direction:row;align-items:flex-start;gap:var(--spacing-spacing-2xs)}._itemInfo_zk1ld_193{display:grid;gap:var(--spacing-spacing-4xs)}._recentSearches_zk1ld_203{display:flex;flex-direction:column;background:var(--color-brand-primary-white);min-width:250px}._recentSearchesHeader_zk1ld_217{padding:var(--spacing-spacing-default) var(--spacing-spacing-default) var(--spacing-spacing-2xs)}._recentSearchesList_zk1ld_225{display:flex;flex-direction:column;gap:0;margin:0;padding:0}._recentSearch_zk1ld_203{display:flex;align-items:center;justify-content:space-between;gap:var(--spacing-spacing-2xs)}._recentSearchLink_zk1ld_255{display:flex;flex:1;min-width:0;align-items:center;padding:var(--spacing-spacing-2xs) var(--spacing-spacing-default)}._clearRecentSearch_zk1ld_271{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_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,58 +1,64 @@
1
- import { jsxs as w, jsx as t } from "react/jsx-runtime";
2
- import f, { useState as j } from "react";
1
+ import { jsxs as A, jsx as d } from "react/jsx-runtime";
2
+ import x, { useState as D } from "react";
3
3
  import { c as o } from "../../clsx-OuTLNxxd.js";
4
- import { getHideAtStyles as A } from "../HideAt.js";
5
- import '../../assets/Input.css';const F = "_input_wjc1i_1", x = "_search_wjc1i_24", B = "_hasEndAdornment_wjc1i_28", D = "_endAdornment_wjc1i_32", N = "_label_wjc1i_58", y = "_labelPlaceholder_wjc1i_72", E = "_labelDisabled_wjc1i_92", e = {
4
+ import { getHideAtStyles as N } from "../HideAt.js";
5
+ import '../../assets/Input.css';const y = "_input_wjc1i_1", E = "_search_wjc1i_24", F = "_hasEndAdornment_wjc1i_28", I = "_endAdornment_wjc1i_32", g = "_label_wjc1i_58", P = "_labelPlaceholder_wjc1i_72", R = "_labelDisabled_wjc1i_92", e = {
6
6
  "input-container": "_input-container_wjc1i_1",
7
- input: F,
8
- search: x,
9
- hasEndAdornment: B,
10
- endAdornment: D,
11
- label: N,
12
- labelPlaceholder: y,
13
- labelDisabled: E
14
- }, I = f.forwardRef(
7
+ input: y,
8
+ search: E,
9
+ hasEndAdornment: F,
10
+ endAdornment: I,
11
+ label: g,
12
+ labelPlaceholder: P,
13
+ labelDisabled: R
14
+ }, S = x.forwardRef(
15
15
  ({
16
- label: n,
17
- placeholder: c,
18
- value: a,
19
- hideAt: _,
20
- className: m,
21
- variant: u = "default",
22
- endAdornment: s,
23
- ...l
24
- }, b) => {
25
- const [i, d] = j(!1), h = !!l.disabled, r = !!n && (i || !!a), p = !!c && !n && !i && !a;
26
- return /* @__PURE__ */ w("div", { className: o(e["input-container"], A(_)), children: [
27
- (n || p) && /* @__PURE__ */ t(
16
+ label: a,
17
+ placeholder: _,
18
+ value: l,
19
+ hideAt: h,
20
+ className: p,
21
+ variant: w = "default",
22
+ endAdornment: t,
23
+ onFocus: s,
24
+ onBlur: i,
25
+ ...n
26
+ }, f) => {
27
+ const [r, m] = D(!1), j = !!n.disabled, b = !!a && (r || !!l), u = !!_ && !a && !r && !l;
28
+ return /* @__PURE__ */ A("div", { className: o(e["input-container"], N(h)), children: [
29
+ (a || u) && /* @__PURE__ */ d(
28
30
  "label",
29
31
  {
30
- htmlFor: l.name,
32
+ htmlFor: n.name,
31
33
  className: o(
32
- r ? e.label : e.labelPlaceholder,
33
- h ? e.labelDisabled : void 0
34
+ b ? e.label : e.labelPlaceholder,
35
+ j ? e.labelDisabled : void 0
34
36
  ),
35
- children: r ? n : c ?? n
37
+ children: b ? a : _ ?? a
36
38
  }
37
39
  ),
38
- /* @__PURE__ */ t(
40
+ /* @__PURE__ */ d(
39
41
  "input",
40
42
  {
41
- value: a,
42
- ref: b,
43
- id: l.name,
43
+ value: l,
44
+ ref: f,
45
+ id: n.name,
44
46
  type: "text",
45
- onFocus: () => d(!0),
46
- onBlur: () => d(!1),
47
- className: o(e.input, e[u], s && e.hasEndAdornment, m),
48
- ...l
47
+ onFocus: (c) => {
48
+ m(!0), s == null || s(c);
49
+ },
50
+ onBlur: (c) => {
51
+ m(!1), i == null || i(c);
52
+ },
53
+ className: o(e.input, e[w], t && e.hasEndAdornment, p),
54
+ ...n
49
55
  }
50
56
  ),
51
- s && /* @__PURE__ */ t("span", { className: e.endAdornment, children: s })
57
+ t && /* @__PURE__ */ d("span", { className: e.endAdornment, children: t })
52
58
  ] });
53
59
  }
54
60
  );
55
- I.displayName = "Input";
61
+ S.displayName = "Input";
56
62
  export {
57
- I as Input
63
+ S as Input
58
64
  };
@@ -2,7 +2,7 @@ import { jsx as i, jsxs as o, Fragment as B } from "react/jsx-runtime";
2
2
  import F from "react";
3
3
  import { Text as w } from "../../atoms/Text/Text.js";
4
4
  import { Link as y } from "../../atoms/Link/Link.js";
5
- import { Icon as a } from "../../atoms/Icon/Icon.js";
5
+ import { Icon as t } from "../../atoms/Icon/Icon.js";
6
6
  import { Flex as g } from "../../atoms/Flex/Flex.js";
7
7
  import { Grid as Y, Column as Z } from "../../atoms/Grid/Grid.js";
8
8
  import { Input as j } from "../../atoms/Input/Input.js";
@@ -14,16 +14,16 @@ import { Account as ee } from "../../molecules/Account/Account.js";
14
14
  import { CategoryNav as ie } from "../../molecules/CategoryNav/CategoryNav.js";
15
15
  import { SuggestionDropdown as N } from "../SuggestionDropdown/SuggestionDropdown.js";
16
16
  import { getHideAtStyles as M } from "../../atoms/HideAt.js";
17
- import { c as t } from "../../clsx-OuTLNxxd.js";
18
- import '../../assets/MainNav.css';const oe = "_main_12974_1", se = "_column_12974_8", ne = "_topNav_12974_13", ae = "_logo_12974_21", te = "_operations_12974_24", me = "_search_12974_31", ce = "_mobileSearch_12974_36", le = "_suggestionDropdown_12974_39", re = "_siteLink_12974_45", de = "_accountArea_12974_72", fe = "_category_12974_84", ue = "_categoryLink_12974_92", he = "_menuList_12974_108", ge = "_menuItemAction_12974_131", _e = "_shortcutIcon_12974_140", e = {
17
+ import { c as m } 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", me = "_search_12974_31", le = "_mobileSearch_12974_36", ce = "_suggestionDropdown_12974_39", re = "_siteLink_12974_45", de = "_accountArea_12974_72", fe = "_category_12974_84", ue = "_categoryLink_12974_92", he = "_menuList_12974_108", ge = "_menuItemAction_12974_131", _e = "_shortcutIcon_12974_140", e = {
19
19
  main: oe,
20
- column: se,
21
- topNav: ne,
20
+ column: ne,
21
+ topNav: se,
22
22
  logo: ae,
23
23
  operations: te,
24
24
  search: me,
25
- mobileSearch: ce,
26
- suggestionDropdown: le,
25
+ mobileSearch: le,
26
+ suggestionDropdown: ce,
27
27
  siteLink: re,
28
28
  accountArea: de,
29
29
  category: fe,
@@ -33,21 +33,21 @@ import '../../assets/MainNav.css';const oe = "_main_12974_1", se = "_column_1297
33
33
  shortcutIcon: _e
34
34
  }, je = F.forwardRef(function({
35
35
  account: p,
36
- categories: l,
36
+ categories: r,
37
37
  homeRoute: U,
38
38
  faqRoute: H,
39
39
  customPartsRoute: k,
40
40
  aboutUsRoute: q,
41
- contactRoute: L,
41
+ contactRoute: v,
42
42
  cart: E,
43
43
  open: G,
44
44
  // consume external panel control props from CartPropsBase
45
45
  className: Q,
46
46
  onLoginClick: T,
47
- searchInputProps: s,
48
- searchValue: r,
49
- onClearSearch: v,
50
- onSearch: m,
47
+ searchInputProps: n,
48
+ searchValue: a,
49
+ onClearSearch: L,
50
+ onSearch: l,
51
51
  searchSuggestions: d,
52
52
  recentSearches: f,
53
53
  onClearRecentSearch: z,
@@ -59,18 +59,18 @@ import '../../assets/MainNav.css';const oe = "_main_12974_1", se = "_column_1297
59
59
  isCategoriesLoading: R,
60
60
  ...S
61
61
  }, X) {
62
- const [D, K] = F.useState(!1), b = D && !!r && !!d, I = D && !b && !!(f != null && f.length), C = {
63
- ...s,
64
- onFocus: (n) => {
62
+ const [D, K] = F.useState(!1), b = D && !!a && !!d, I = D && !b && !!(f != null && f.length), C = {
63
+ ...n,
64
+ onFocus: (s) => {
65
65
  var u;
66
- (u = s == null ? void 0 : s.onFocus) == null || u.call(s, n), K(!0);
66
+ (u = n == null ? void 0 : n.onFocus) == null || u.call(n, s), K(!0);
67
67
  },
68
- onBlur: (n) => {
68
+ onBlur: (s) => {
69
69
  var u;
70
- (u = s == null ? void 0 : s.onBlur) == null || u.call(s, n), K(!1);
70
+ (u = n == null ? void 0 : n.onBlur) == null || u.call(n, s), K(!1);
71
71
  }
72
72
  };
73
- return /* @__PURE__ */ i(Y, { ...S, gridWrapperClassName: t(e.main, Q), children: /* @__PURE__ */ o(Z, { span: 12, className: e.column, children: [
73
+ return /* @__PURE__ */ i(Y, { ...S, gridWrapperClassName: m(e.main, Q), children: /* @__PURE__ */ o(Z, { span: 12, className: e.column, children: [
74
74
  /* @__PURE__ */ o(
75
75
  g,
76
76
  {
@@ -99,12 +99,13 @@ import '../../assets/MainNav.css';const oe = "_main_12974_1", se = "_column_1297
99
99
  autoComplete: "off",
100
100
  "aria-autocomplete": "list",
101
101
  ...C,
102
+ value: a,
102
103
  endAdornment: /* @__PURE__ */ o(B, { children: [
103
- !!r && /* @__PURE__ */ i(
104
+ !!a && /* @__PURE__ */ i(
104
105
  _,
105
106
  {
106
107
  "aria-label": "Clear search",
107
- onClick: v,
108
+ onClick: L,
108
109
  iconProps: { iconKey: "fa-regular fa-xmark", size: "sm" }
109
110
  }
110
111
  ),
@@ -112,7 +113,7 @@ import '../../assets/MainNav.css';const oe = "_main_12974_1", se = "_column_1297
112
113
  _,
113
114
  {
114
115
  "aria-label": "Submit search",
115
- onClick: () => m == null ? void 0 : m(r ?? ""),
116
+ onClick: () => l == null ? void 0 : l(a ?? ""),
116
117
  iconProps: { iconKey: "fa-regular fa-magnifying-glass", size: "sm" }
117
118
  }
118
119
  )
@@ -133,12 +134,12 @@ import '../../assets/MainNav.css';const oe = "_main_12974_1", se = "_column_1297
133
134
  }
134
135
  )
135
136
  ] }),
136
- /* @__PURE__ */ o("button", { onClick: x, className: t(e.siteLink, M(["sm", "md"])), children: [
137
- /* @__PURE__ */ i(a, { iconKey: "fa-regular fa-sparkles", size: "sm" }),
137
+ /* @__PURE__ */ o("button", { onClick: x, className: m(e.siteLink, M(["sm", "md"])), children: [
138
+ /* @__PURE__ */ i(t, { iconKey: "fa-regular fa-sparkles", size: "sm" }),
138
139
  "Model/Serial"
139
140
  ] }),
140
141
  /* @__PURE__ */ i(c, { href: k, hideAt: ["sm", "md"], children: "Custom Parts" }),
141
- /* @__PURE__ */ i(c, { href: L, hideAt: ["sm", "md"], children: "Contact Us" }),
142
+ /* @__PURE__ */ i(c, { href: v, hideAt: ["sm", "md"], children: "Contact Us" }),
142
143
  /* @__PURE__ */ i("div", { className: e.accountArea, children: /* @__PURE__ */ i(
143
144
  ee,
144
145
  {
@@ -167,43 +168,43 @@ import '../../assets/MainNav.css';const oe = "_main_12974_1", se = "_column_1297
167
168
  {
168
169
  onClick: x,
169
170
  "data-hamburger-close": "true",
170
- className: t(e.siteLink, e.menuItemAction, M(["lg"])),
171
+ className: m(e.siteLink, e.menuItemAction, M(["lg"])),
171
172
  children: [
172
- /* @__PURE__ */ i(a, { iconKey: "fa-regular fa-sparkles", size: "sm", className: e.shortcutIcon }),
173
+ /* @__PURE__ */ i(t, { iconKey: "fa-regular fa-sparkles", size: "sm", className: e.shortcutIcon }),
173
174
  "Model/Serial"
174
175
  ]
175
176
  }
176
177
  ) }),
177
- /* @__PURE__ */ i("li", { className: e.menuItem, children: /* @__PURE__ */ o(c, { href: k, className: t(e.siteLink, e.menuItemAction), children: [
178
- /* @__PURE__ */ i(a, { iconKey: "fa-regular fa-screwdriver-wrench", size: "sm", className: e.shortcutIcon }),
178
+ /* @__PURE__ */ i("li", { className: e.menuItem, children: /* @__PURE__ */ o(c, { href: k, className: m(e.siteLink, e.menuItemAction), children: [
179
+ /* @__PURE__ */ i(t, { iconKey: "fa-regular fa-screwdriver-wrench", size: "sm", className: e.shortcutIcon }),
179
180
  "Custom Parts"
180
181
  ] }) }),
181
- /* @__PURE__ */ i("li", { className: e.menuItem, children: /* @__PURE__ */ o(c, { href: L, className: t(e.siteLink, e.menuItemAction), children: [
182
- /* @__PURE__ */ i(a, { iconKey: "fa-regular fa-envelope", size: "sm", className: e.shortcutIcon }),
182
+ /* @__PURE__ */ i("li", { className: e.menuItem, children: /* @__PURE__ */ o(c, { href: v, className: m(e.siteLink, e.menuItemAction), children: [
183
+ /* @__PURE__ */ i(t, { iconKey: "fa-regular fa-envelope", size: "sm", className: e.shortcutIcon }),
183
184
  "Contact Us"
184
185
  ] }) }),
185
- /* @__PURE__ */ i("li", { className: e.menuItem, children: /* @__PURE__ */ o(c, { href: H, className: t(e.siteLink, e.menuItemAction), children: [
186
- /* @__PURE__ */ i(a, { iconKey: "fa-solid fa-question", size: "sm", className: e.shortcutIcon }),
186
+ /* @__PURE__ */ i("li", { className: e.menuItem, children: /* @__PURE__ */ o(c, { href: H, className: m(e.siteLink, e.menuItemAction), children: [
187
+ /* @__PURE__ */ i(t, { iconKey: "fa-solid fa-question", size: "sm", className: e.shortcutIcon }),
187
188
  "FAQ"
188
189
  ] }) }),
189
- /* @__PURE__ */ i("li", { className: e.menuItem, children: /* @__PURE__ */ o(c, { href: q, className: t(e.siteLink, e.menuItemAction), children: [
190
- /* @__PURE__ */ i(a, { iconKey: "fa-regular fa-people-group", size: "sm", className: e.shortcutIcon }),
190
+ /* @__PURE__ */ i("li", { className: e.menuItem, children: /* @__PURE__ */ o(c, { href: q, className: m(e.siteLink, e.menuItemAction), children: [
191
+ /* @__PURE__ */ i(t, { iconKey: "fa-regular fa-people-group", size: "sm", className: e.shortcutIcon }),
191
192
  "About Us"
192
193
  ] }) })
193
194
  ] })
194
195
  ] }),
195
196
  /* @__PURE__ */ o("section", { children: [
196
197
  /* @__PURE__ */ i(w, { size: "md", weight: "semibold", children: "Shop by category" }),
197
- /* @__PURE__ */ i("ul", { className: e.menuList, children: l && l.map((n) => /* @__PURE__ */ i("li", { className: e.category, children: /* @__PURE__ */ o(
198
+ /* @__PURE__ */ i("ul", { className: e.menuList, children: r && r.map((s) => /* @__PURE__ */ i("li", { className: e.category, children: /* @__PURE__ */ o(
198
199
  y,
199
200
  {
200
- href: n.route,
201
+ href: s.route,
201
202
  className: e.categoryLink,
202
- onClick: () => h == null ? void 0 : h(n),
203
+ onClick: () => h == null ? void 0 : h(s),
203
204
  children: [
204
- /* @__PURE__ */ i(w, { size: "sm", children: n.label }),
205
+ /* @__PURE__ */ i(w, { size: "sm", children: s.label }),
205
206
  /* @__PURE__ */ i(
206
- a,
207
+ t,
207
208
  {
208
209
  iconKey: "fa-solid fa-chevron-right",
209
210
  title: "Navigate",
@@ -212,7 +213,7 @@ import '../../assets/MainNav.css';const oe = "_main_12974_1", se = "_column_1297
212
213
  )
213
214
  ]
214
215
  }
215
- ) }, n.id)) })
216
+ ) }, s.id)) })
216
217
  ] })
217
218
  ] })
218
219
  ]
@@ -232,12 +233,13 @@ import '../../assets/MainNav.css';const oe = "_main_12974_1", se = "_column_1297
232
233
  autoComplete: "off",
233
234
  "aria-autocomplete": "list",
234
235
  ...C,
236
+ value: a,
235
237
  endAdornment: /* @__PURE__ */ o(B, { children: [
236
- !!r && /* @__PURE__ */ i(
238
+ !!a && /* @__PURE__ */ i(
237
239
  _,
238
240
  {
239
241
  "aria-label": "Clear search",
240
- onClick: v,
242
+ onClick: L,
241
243
  iconProps: { iconKey: "fa-regular fa-xmark", size: "sm" }
242
244
  }
243
245
  ),
@@ -245,7 +247,7 @@ import '../../assets/MainNav.css';const oe = "_main_12974_1", se = "_column_1297
245
247
  _,
246
248
  {
247
249
  "aria-label": "Submit search",
248
- onClick: () => m == null ? void 0 : m(r ?? ""),
250
+ onClick: () => l == null ? void 0 : l(a ?? ""),
249
251
  iconProps: { iconKey: "fa-regular fa-magnifying-glass", size: "sm" }
250
252
  }
251
253
  )
@@ -269,7 +271,7 @@ import '../../assets/MainNav.css';const oe = "_main_12974_1", se = "_column_1297
269
271
  /* @__PURE__ */ i(
270
272
  ie,
271
273
  {
272
- categories: l,
274
+ categories: r,
273
275
  isCategoriesLoading: R,
274
276
  onCategoryClick: h
275
277
  }
@@ -279,9 +281,9 @@ import '../../assets/MainNav.css';const oe = "_main_12974_1", se = "_column_1297
279
281
  function c({
280
282
  href: A,
281
283
  children: p,
282
- ...l
284
+ ...r
283
285
  }) {
284
- return /* @__PURE__ */ i(y, { href: A, className: e.siteLink, ...l, children: p });
286
+ return /* @__PURE__ */ i(y, { href: A, className: e.siteLink, ...r, children: p });
285
287
  }
286
288
  export {
287
289
  je as MainNav
@@ -1,85 +1,88 @@
1
- import { jsxs as n, jsx as s } from "react/jsx-runtime";
2
- import { Text as i } from "../../atoms/Text/Text.js";
3
- import { Link as c } from "../../atoms/Link/Link.js";
4
- import { Icon as g } from "../../atoms/Icon/Icon.js";
5
- import { c as a } from "../../clsx-OuTLNxxd.js";
6
- import { Image as u } from "../../atoms/Image/Image.js";
7
- import '../../assets/SuggestionDropdown.css';const k = "_suggestionDropdown_zk1ld_1", z = "_leftColumn_zk1ld_31", f = "_rightColumn_zk1ld_55", S = "_categorySection_zk1ld_75", p = "_suggestions_zk1ld_81", L = "_categories_zk1ld_83", N = "_suggestionLink_zk1ld_119", y = "_categoryLink_zk1ld_121", v = "_itemList_zk1ld_135", x = "_item_zk1ld_135", D = "_itemInfo_zk1ld_193", w = "_recentSearches_zk1ld_203", C = "_recentSearchesHeader_zk1ld_217", T = "_recentSearchesList_zk1ld_225", q = "_recentSearch_zk1ld_203", H = "_recentSearchLink_zk1ld_255", b = "_clearRecentSearch_zk1ld_271", r = {
8
- suggestionDropdown: k,
9
- leftColumn: z,
10
- rightColumn: f,
11
- categorySection: S,
12
- suggestions: p,
13
- categories: L,
14
- suggestionLink: N,
15
- categoryLink: y,
16
- itemList: v,
17
- item: x,
18
- itemInfo: D,
19
- recentSearches: w,
20
- recentSearchesHeader: C,
21
- recentSearchesList: T,
22
- recentSearch: q,
23
- recentSearchLink: H,
24
- clearRecentSearch: b
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 o } from "../../atoms/Link/Link.js";
4
+ import { Icon as m } from "../../atoms/Icon/Icon.js";
5
+ import { c as r } from "../../clsx-OuTLNxxd.js";
6
+ import { Image as f } from "../../atoms/Image/Image.js";
7
+ import '../../assets/SuggestionDropdown.css';const d = "_suggestionDropdown_1fc5y_1", y = "_leftColumn_1fc5y_31", S = "_leftColumnFullWidth_1fc5y_55", p = "_suggestionSectionFullHeight_1fc5y_63", L = "_rightColumn_1fc5y_73", k = "_categorySection_1fc5y_95", N = "_suggestions_1fc5y_101", v = "_categories_1fc5y_103", x = "_suggestionsFullHeight_1fc5y_117", F = "_suggestionLink_1fc5y_147", H = "_categoryLink_1fc5y_149", C = "_itemList_1fc5y_163", D = "_item_1fc5y_163", w = "_itemInfo_1fc5y_221", z = "_recentSearches_1fc5y_231", T = "_recentSearchesHeader_1fc5y_245", q = "_recentSearchesList_1fc5y_253", W = "_recentSearch_1fc5y_231", b = "_recentSearchLink_1fc5y_283", I = "_clearRecentSearch_1fc5y_299", n = {
8
+ suggestionDropdown: d,
9
+ leftColumn: y,
10
+ leftColumnFullWidth: S,
11
+ suggestionSectionFullHeight: p,
12
+ rightColumn: L,
13
+ categorySection: k,
14
+ suggestions: N,
15
+ categories: v,
16
+ suggestionsFullHeight: x,
17
+ suggestionLink: F,
18
+ categoryLink: H,
19
+ itemList: C,
20
+ item: D,
21
+ itemInfo: w,
22
+ recentSearches: z,
23
+ recentSearchesHeader: T,
24
+ recentSearchesList: q,
25
+ recentSearch: W,
26
+ recentSearchLink: b,
27
+ clearRecentSearch: I
25
28
  };
26
- function A({
29
+ function B({
27
30
  terms: l,
28
- categories: d,
29
- items: h,
30
- view: m = "suggestions",
31
+ categories: i,
32
+ items: a,
33
+ view: u = "suggestions",
31
34
  recentSearches: _ = [],
32
- onClearRecentSearch: t,
33
- className: o
35
+ onClearRecentSearch: g,
36
+ className: h
34
37
  }) {
35
- return m === "recent-searches" ? /* @__PURE__ */ n(
38
+ return u === "recent-searches" ? /* @__PURE__ */ t(
36
39
  "div",
37
40
  {
38
- className: a(r.suggestionDropdown, r.recentSearches, o),
41
+ className: r(n.suggestionDropdown, n.recentSearches, h),
39
42
  onMouseDown: (e) => e.preventDefault(),
40
43
  children: [
41
- /* @__PURE__ */ s("div", { className: r.recentSearchesHeader, children: /* @__PURE__ */ s(i, { size: "xxs", colorToken: "quaternary", children: "Recent Searches" }) }),
42
- /* @__PURE__ */ s("ol", { className: r.recentSearchesList, children: _.map((e) => /* @__PURE__ */ n("li", { className: r.recentSearch, children: [
43
- /* @__PURE__ */ s(c, { href: e.url, className: r.recentSearchLink, children: /* @__PURE__ */ s(i, { size: "sm", children: e.term }) }),
44
+ /* @__PURE__ */ s("div", { className: n.recentSearchesHeader, children: /* @__PURE__ */ s(c, { size: "xxs", colorToken: "quaternary", children: "Recent Searches" }) }),
45
+ /* @__PURE__ */ s("ol", { className: n.recentSearchesList, children: _.map((e) => /* @__PURE__ */ t("li", { className: n.recentSearch, children: [
46
+ /* @__PURE__ */ s(o, { href: e.url, className: n.recentSearchLink, children: /* @__PURE__ */ s(c, { size: "sm", children: e.term }) }),
44
47
  /* @__PURE__ */ s(
45
48
  "button",
46
49
  {
47
50
  type: "button",
48
- className: r.clearRecentSearch,
51
+ className: n.clearRecentSearch,
49
52
  "aria-label": `Clear recent search: ${e.term}`,
50
- onClick: () => t == null ? void 0 : t(e),
51
- children: /* @__PURE__ */ s(g, { iconKey: "fa-regular fa-xmark", size: "sm" })
53
+ onClick: () => g == null ? void 0 : g(e),
54
+ children: /* @__PURE__ */ s(m, { iconKey: "fa-regular fa-xmark", size: "sm" })
52
55
  }
53
56
  )
54
57
  ] }, e.url)) })
55
58
  ]
56
59
  }
57
- ) : /* @__PURE__ */ n("div", { className: a(r.suggestionDropdown, o), onMouseDown: (e) => e.preventDefault(), children: [
58
- /* @__PURE__ */ n("div", { className: r.leftColumn, children: [
59
- /* @__PURE__ */ s("div", { className: r.suggestionSection, children: /* @__PURE__ */ n("div", { className: r.suggestions, children: [
60
- /* @__PURE__ */ s(i, { size: "xxs", colorToken: "quaternary", children: "Suggestions" }),
60
+ ) : /* @__PURE__ */ t("div", { className: r(n.suggestionDropdown, h), onMouseDown: (e) => e.preventDefault(), children: [
61
+ (l.length > 0 || i.length > 0) && /* @__PURE__ */ t("div", { className: r(n.leftColumn, { [n.leftColumnFullWidth]: a.length === 0 }), children: [
62
+ l.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: [
63
+ /* @__PURE__ */ s(c, { size: "xxs", colorToken: "quaternary", children: "Suggestions" }),
61
64
  l.map(
62
- (e) => /* @__PURE__ */ s(i, { size: "sm", children: /* @__PURE__ */ s(c, { href: e.url, className: r.suggestionLink, children: e.name }) }, e.url)
65
+ (e) => /* @__PURE__ */ s(c, { size: "sm", children: /* @__PURE__ */ s(o, { href: e.url, className: n.suggestionLink, children: e.name }) }, e.url)
63
66
  )
64
67
  ] }) }),
65
- /* @__PURE__ */ s("div", { className: r.categorySection, children: /* @__PURE__ */ n("div", { className: r.categories, children: [
66
- /* @__PURE__ */ s(i, { size: "xxs", colorToken: "quaternary", children: "Categories" }),
67
- d.map(
68
- (e) => /* @__PURE__ */ s(i, { size: "sm", children: /* @__PURE__ */ s(c, { href: e.url, className: r.categoryLink, children: e.name }) }, e.name)
68
+ i.length > 0 && /* @__PURE__ */ s("div", { className: n.categorySection, children: /* @__PURE__ */ t("div", { className: n.categories, children: [
69
+ /* @__PURE__ */ s(c, { size: "xxs", colorToken: "quaternary", children: "Categories" }),
70
+ i.map(
71
+ (e) => /* @__PURE__ */ s(c, { size: "sm", children: /* @__PURE__ */ s(o, { href: e.url, className: n.categoryLink, children: e.name }) }, e.name)
69
72
  )
70
73
  ] }) })
71
74
  ] }),
72
- /* @__PURE__ */ s("div", { className: r.rightColumn, children: /* @__PURE__ */ s("ol", { className: r.itemList, children: h.map(
73
- (e) => /* @__PURE__ */ s("li", { className: r.item, children: /* @__PURE__ */ n(c, { href: e.url, children: [
74
- /* @__PURE__ */ s(u, { src: e.image, alt: `${e.description} product image`, height: 72, width: 72 }),
75
- /* @__PURE__ */ n("div", { className: r.itemInfo, children: [
76
- /* @__PURE__ */ s(i, { size: "sm", children: e.description }),
77
- /* @__PURE__ */ s(i, { size: "sm", colorToken: "quaternary", children: e.itemId })
75
+ a.length > 0 && /* @__PURE__ */ s("div", { className: n.rightColumn, children: /* @__PURE__ */ s("ol", { className: n.itemList, children: a.map(
76
+ (e) => /* @__PURE__ */ s("li", { className: n.item, children: /* @__PURE__ */ t(o, { href: e.url, children: [
77
+ /* @__PURE__ */ s(f, { src: e.image, alt: `${e.description} product image`, height: 72, width: 72 }),
78
+ /* @__PURE__ */ t("div", { className: n.itemInfo, children: [
79
+ /* @__PURE__ */ s(c, { size: "sm", children: e.description }),
80
+ /* @__PURE__ */ s(c, { size: "sm", colorToken: "quaternary", children: e.itemId })
78
81
  ] })
79
82
  ] }) }, e.itemId)
80
83
  ) }) })
81
84
  ] });
82
85
  }
83
86
  export {
84
- A as SuggestionDropdown
87
+ B as SuggestionDropdown
85
88
  };
@@ -11,4 +11,7 @@ declare const meta: {
11
11
  export default meta;
12
12
  type Story = StoryObj<typeof meta>;
13
13
  export declare const Default: Story;
14
+ export declare const WithoutCategories: Story;
15
+ export declare const WithoutItems: Story;
16
+ export declare const OnlyItems: Story;
14
17
  export declare const RecentSearches: Story;
@@ -1,12 +1,12 @@
1
- import { SuggestionDropdown as t } from "./SuggestionDropdown.js";
2
- const s = {
1
+ import { SuggestionDropdown as r } from "./SuggestionDropdown.js";
2
+ const a = {
3
3
  title: "Case Parts/Organisms/SuggestionDropdown",
4
- component: t,
4
+ component: r,
5
5
  parameters: {
6
6
  layout: "centered"
7
7
  },
8
8
  tags: ["autodocs"]
9
- }, a = {
9
+ }, e = {
10
10
  args: {
11
11
  terms: [
12
12
  { name: "thermostat", url: "/search/thermostat" },
@@ -44,6 +44,22 @@ const s = {
44
44
  ]
45
45
  }
46
46
  }, o = {
47
+ args: {
48
+ ...e.args,
49
+ categories: []
50
+ }
51
+ }, c = {
52
+ args: {
53
+ ...e.args,
54
+ items: []
55
+ }
56
+ }, n = {
57
+ args: {
58
+ ...e.args,
59
+ terms: [],
60
+ categories: []
61
+ }
62
+ }, i = {
47
63
  args: {
48
64
  view: "recent-searches",
49
65
  terms: [],
@@ -54,11 +70,14 @@ const s = {
54
70
  { term: "walk-in cooler", url: "/search/walk-in-cooler" },
55
71
  { term: "thermostat", url: "/search/thermostat" }
56
72
  ],
57
- onClearRecentSearch: (e) => alert(`Clear ${e.term}`)
73
+ onClearRecentSearch: (t) => alert(`Clear ${t.term}`)
58
74
  }
59
75
  };
60
76
  export {
61
- a as Default,
62
- o as RecentSearches,
63
- s as default
77
+ e as Default,
78
+ n as OnlyItems,
79
+ i as RecentSearches,
80
+ o as WithoutCategories,
81
+ c as WithoutItems,
82
+ a as default
64
83
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@caseparts-org/caseblocks",
3
3
  "private": false,
4
- "version": "0.0.231",
4
+ "version": "0.0.233",
5
5
  "type": "module",
6
6
  "module": "dist/main.js",
7
7
  "types": "dist/main.d.ts",