@caseparts-org/caseblocks 0.0.289 → 0.0.291

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
- ._main_o3lxf_1{box-shadow:#bbb3 0 8px 24px;padding:var(--spacing-0-5) 0;z-index:1;position:relative}._column_o3lxf_8{box-sizing:border-box;padding:0 var(--spacing-1)}._topNav_o3lxf_13{padding-bottom:var(--spacing-0-5);gap:var(--spacing-1-5)}@media (max-width: 1281px){._topNav_o3lxf_13{gap:var(--spacing-1);padding-bottom:0}}._logo_o3lxf_21{cursor:pointer}._operations_o3lxf_24{gap:var(--spacing-1-5);width:100%}@media (max-width: 1281px){._operations_o3lxf_24{gap:var(--spacing-1)}}._search_o3lxf_31{flex:1;min-width:0;position:relative;container-type:inline-size}._mobileSearch_o3lxf_37{width:100%}._typeAheadPortal_o3lxf_40{position:fixed;z-index:900}._siteLink_o3lxf_44{color:var(--color-brand-primary-primary-black);cursor:default;border:none;background-color:transparent;padding:0;margin:0;font-family:var(--font-family-display);font-size:var(--font-size-md);cursor:pointer;display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-4xs)}._siteLink_o3lxf_44:hover{text-decoration:underline;color:var(--text-text-links)}@media (max-width:1280px){._siteLink_o3lxf_44{font-family:var(--font-family-body);font-size:var(--font-size-sm)}}._siteLink_o3lxf_44 path{fill:var(--color-brand-primary-primary-teal-blue)}._accountArea_o3lxf_71{width:145px}@media (max-width: 1281px){._accountArea_o3lxf_71{width:min-content}}._cart_o3lxf_77{border:none;padding:0;margin:0;background-color:transparent}._category_o3lxf_83{list-style:none;min-height:42px;display:flex;flex-direction:row;align-items:stretch;padding:0}._categoryLink_o3lxf_91{color:var(--text-text-primary);text-decoration:none;display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:100%}._categoryLink_o3lxf_91:hover{color:var(--color-brand-primary-primary-teal-blue);text-decoration:none}._categoryLink_o3lxf_91 path{fill:var(--color-brand-primary-primary-teal-blue)}._menuList_o3lxf_107{list-style:none;padding:0;margin:0;height:min-content;display:flex;flex-direction:column;gap:var(--spacing-spacing-3xs)}._menuList_o3lxf_107>li{width:100%;min-height:42px;padding:var(--spacing-spacing-2xs);border:1px solid var(--border-border-primary, #dfdfdf);box-sizing:border-box;display:flex;flex-direction:row;align-items:center;border-radius:var(--border-radius-md);color:var(--text-text-links)}._menuItemAction_o3lxf_130{width:100%;display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-4xs);color:var(--color-brand-primary-primary-black)}._shortcutIcon_o3lxf_139{color:var(--text-text-links)}
1
+ ._main_1w2jy_1{box-shadow:#bbb3 0 8px 24px;padding:var(--spacing-0-5) 0;z-index:1;position:relative}._column_1w2jy_8{box-sizing:border-box;padding:0 var(--spacing-1)}._topNav_1w2jy_13{padding-bottom:var(--spacing-0-5);gap:var(--spacing-1-5)}@media (max-width: 1281px){._topNav_1w2jy_13{gap:var(--spacing-1);padding-bottom:0}}._logo_1w2jy_21{cursor:pointer}._operations_1w2jy_24{gap:var(--spacing-1-5);width:100%}@media (max-width: 1281px){._operations_1w2jy_24{gap:var(--spacing-1)}}._search_1w2jy_31{flex:1;min-width:0;position:relative;container-type:inline-size}._mobileSearch_1w2jy_37{width:100%}._typeAheadPortal_1w2jy_40{position:fixed;z-index:900;container-type:inline-size;overflow-x:hidden;overflow-y:auto}._siteLink_1w2jy_47{color:var(--color-brand-primary-primary-black);cursor:default;border:none;background-color:transparent;padding:0;margin:0;font-family:var(--font-family-display);font-size:var(--font-size-md);cursor:pointer;display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-4xs)}._siteLink_1w2jy_47:hover{text-decoration:underline;color:var(--text-text-links)}@media (max-width:1280px){._siteLink_1w2jy_47{font-family:var(--font-family-body);font-size:var(--font-size-sm)}}._siteLink_1w2jy_47 path{fill:var(--color-brand-primary-primary-teal-blue)}._accountArea_1w2jy_74{width:145px}@media (max-width: 1281px){._accountArea_1w2jy_74{width:min-content}}._cart_1w2jy_80{border:none;padding:0;margin:0;background-color:transparent}._category_1w2jy_86{list-style:none;min-height:42px;display:flex;flex-direction:row;align-items:stretch;padding:0}._categoryLink_1w2jy_94{color:var(--text-text-primary);text-decoration:none;display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:100%}._categoryLink_1w2jy_94:hover{color:var(--color-brand-primary-primary-teal-blue);text-decoration:none}._categoryLink_1w2jy_94 path{fill:var(--color-brand-primary-primary-teal-blue)}._menuList_1w2jy_110{list-style:none;padding:0;margin:0;height:min-content;display:flex;flex-direction:column;gap:var(--spacing-spacing-3xs)}._menuList_1w2jy_110>li{width:100%;min-height:42px;padding:var(--spacing-spacing-2xs);border:1px solid var(--border-border-primary, #dfdfdf);box-sizing:border-box;display:flex;flex-direction:row;align-items:center;border-radius:var(--border-radius-md);color:var(--text-text-links)}._menuItemAction_1w2jy_133{width:100%;display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-4xs);color:var(--color-brand-primary-primary-black)}._shortcutIcon_1w2jy_142{color:var(--text-text-links)}
@@ -1 +1 @@
1
- ._suggestionDropdown_zn0un_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;background-color:#fff}@container (max-width: 480px){._suggestionDropdown_zn0un_1{flex-direction:column}}._leftColumn_zn0un_31{display:flex;flex-direction:column;border-right:1px solid var(--border-border-primary);background-color:#fff;min-width:190px;max-width:220px}@container (max-width: 480px){._leftColumn_zn0un_31{max-width:none;border-right:0;border-bottom:1px solid var(--border-border-primary)}}._leftColumnFullWidth_zn0un_59{flex:1;max-width:none}._suggestionSectionFullHeight_zn0un_69{display:flex;flex:1}._rightColumn_zn0un_79{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_zn0un_99{border-top:1px solid var(--border-border-primary)}._suggestions_zn0un_105,._categories_zn0un_107{display:flex;flex-direction:column;gap:0;padding:0}._suggestionsFullHeight_zn0un_121{flex:1}._customPartLink_zn0un_129{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_zn0un_105>:first-child,._categories_zn0un_107>: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_zn0un_105>:last-child,._categories_zn0un_107>:last-child{margin-bottom:var(--spacing-spacing-2xs)}._suggestionLink_zn0un_173,._categoryLink_zn0un_175{display:block;box-sizing:border-box;width:100%;padding:var(--spacing-spacing-2xs) var(--spacing-spacing-default);transition:background-color .3s ease-in}._suggestionLink_zn0un_173:hover,._categoryLink_zn0un_175:hover,._customPartLink_zn0un_129:hover{text-decoration:none;background-color:var(--color-alerts-light-teal-blue)}._activeOption_zn0un_211{background:var(--color-alerts-light-teal-blue)}._itemList_zn0un_219{margin:0;padding:0;display:flex;flex-direction:column;gap:var(--spacing-spacing-2xs);width:100%}._item_zn0un_219{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}._recentSearch_zn0un_257:hover,._item_zn0un_219:hover{background-color:var(--color-alerts-light-teal-blue)}._item_zn0un_219>a:hover{text-decoration:none}._activeItem_zn0un_275{border-color:var(--text-text-links);box-shadow:inset 0 0 0 1px var(--text-text-links)}._item_zn0un_219 img{height:60px;width:60px;object-fit:contain}._item_zn0un_219 a{display:flex;flex-direction:row;align-items:flex-start;gap:var(--spacing-spacing-2xs)}._itemInfo_zn0un_311{display:grid;gap:var(--spacing-spacing-4xs)}._recentSearches_zn0un_321{display:flex;flex-direction:column;background:var(--color-brand-primary-white);min-width:250px}._recentSearchesHeader_zn0un_335{padding:var(--spacing-spacing-default) var(--spacing-spacing-default) var(--spacing-spacing-2xs)}._recentSearchesList_zn0un_343{display:flex;flex-direction:column;gap:0;margin:0;padding:0}._recentSearch_zn0un_257{display:flex;align-items:center;justify-content:space-between;gap:var(--spacing-spacing-2xs);transition:background-color .3s ease-in}._recentSearchLink_zn0un_375{display:flex;flex:1;min-width:0;align-items:center;padding:var(--spacing-spacing-2xs) var(--spacing-spacing-default)}._recentSearchLink_zn0un_375:hover{text-decoration:none}._clearRecentSearch_zn0un_399{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_denik_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;background-color:#fff}@container (max-width: 480px){._suggestionDropdown_denik_1{flex-direction:column}}._leftColumn_denik_31{display:flex;flex-direction:column;border-right:1px solid var(--border-border-primary);background-color:#fff;min-width:190px;max-width:220px}@container (max-width: 480px){._leftColumn_denik_31{min-width:0;max-width:none;border-right:0;border-bottom:1px solid var(--border-border-primary)}}._leftColumnFullWidth_denik_61{flex:1;max-width:none}._suggestionSectionFullHeight_denik_71{display:flex;flex:1}._rightColumn_denik_81{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}@container (max-width: 480px){._rightColumn_denik_81{min-width:0}}._categorySection_denik_107{border-top:1px solid var(--border-border-primary)}._suggestions_denik_113,._categories_denik_115{display:flex;flex-direction:column;gap:0;padding:0}._suggestionsFullHeight_denik_129{flex:1}._customPartLink_denik_137{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_denik_113>:first-child,._categories_denik_115>: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_denik_113>:last-child,._categories_denik_115>:last-child{margin-bottom:var(--spacing-spacing-2xs)}._suggestionLink_denik_181,._categoryLink_denik_183{display:block;box-sizing:border-box;width:100%;padding:var(--spacing-spacing-2xs) var(--spacing-spacing-default);transition:background-color .3s ease-in}._suggestionLink_denik_181:hover,._categoryLink_denik_183:hover,._customPartLink_denik_137:hover{text-decoration:none;background-color:var(--color-alerts-light-teal-blue)}._activeOption_denik_219{background:var(--color-alerts-light-teal-blue)}._itemList_denik_227{margin:0;padding:0;display:flex;flex-direction:column;gap:var(--spacing-spacing-2xs);width:100%}._item_denik_227{display:flex;flex-direction:column;border:1px solid var(--border-border-primary);padding:var(--spacing-spacing-2xs);box-sizing:border-box;width:100%;background-color:#fff;transition:background-color .3s ease-in}._recentSearch_denik_267:hover,._item_denik_227:hover{background-color:var(--color-alerts-light-teal-blue)}._item_denik_227>a:hover{text-decoration:none}._activeItem_denik_285{border-color:var(--text-text-links);box-shadow:inset 0 0 0 1px var(--text-text-links)}._item_denik_227 img{height:60px;width:60px;object-fit:contain}._item_denik_227 a{display:flex;flex-direction:row;min-width:0;align-items:flex-start;gap:var(--spacing-spacing-2xs)}._itemInfo_denik_323{display:grid;min-width:0;gap:var(--spacing-spacing-4xs)}._recentSearches_denik_335{display:flex;flex-direction:column;background:var(--color-brand-primary-white);min-width:250px}@container (max-width: 480px){._recentSearches_denik_335{min-width:0}}._recentSearchesHeader_denik_355{padding:var(--spacing-spacing-default) var(--spacing-spacing-default) var(--spacing-spacing-2xs)}._recentSearchesList_denik_363{display:flex;flex-direction:column;gap:0;margin:0;padding:0}._recentSearch_denik_267{display:flex;align-items:center;justify-content:space-between;gap:var(--spacing-spacing-2xs);transition:background-color .3s ease-in}._recentSearchLink_denik_395{display:flex;flex:1;min-width:0;align-items:center;padding:var(--spacing-spacing-2xs) var(--spacing-spacing-default)}._recentSearchLink_denik_395:hover{text-decoration:none}._clearRecentSearch_denik_419{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,83 +1,81 @@
1
- import { jsxs as n, jsx as l } from "react/jsx-runtime";
2
- import { Text as m } from "../../atoms/Text/Text.js";
3
- import { c as f } from "../../clsx-OuTLNxxd.js";
4
- import '../../assets/ProgressBar.css';const g = "_track_w0n30_25", v = "_completed_w0n30_59", x = "_inProgress_w0n30_69", B = "_completedFull_w0n30_81", N = "_labels_w0n30_91", k = "_labelContainer_w0n30_105", r = {
1
+ import { jsxs as i, jsx as s } from "react/jsx-runtime";
2
+ import { Text as _ } from "../../atoms/Text/Text.js";
3
+ import { c as P } from "../../clsx-OuTLNxxd.js";
4
+ import '../../assets/ProgressBar.css';const f = "_track_w0n30_25", x = "_completed_w0n30_59", v = "_inProgress_w0n30_69", B = "_completedFull_w0n30_81", N = "_labels_w0n30_91", u = "_labelContainer_w0n30_105", r = {
5
5
  "progressBar-section": "_progressBar-section_w0n30_1",
6
6
  "progressBar-cell": "_progressBar-cell_w0n30_11",
7
- track: g,
8
- completed: v,
9
- inProgress: x,
7
+ track: f,
8
+ completed: x,
9
+ inProgress: v,
10
10
  completedFull: B,
11
11
  labels: N,
12
- labelContainer: k
12
+ labelContainer: u
13
13
  };
14
- function z({
14
+ function $({
15
15
  kind: o = "percent",
16
- completedValue: s,
17
- inProgressValue: e,
18
- totalValue: i,
19
- totalLabel: _,
20
- completedLabel: p,
16
+ completedValue: e,
17
+ inProgressValue: l,
18
+ totalValue: t,
19
+ totalLabel: p,
20
+ completedLabel: g,
21
21
  inProgressLabel: h,
22
22
  variant: a,
23
23
  className: b,
24
24
  ...w
25
25
  }) {
26
- let c = 0, t = 0;
27
- return o === "percent" && (c = s, t = e ?? 0), o === "raw" && i !== void 0 && (c = s / i * 100, e === void 0 && (e = 0), t = e / i * 100), c = Math.min(100, Math.max(0, c)), t = Math.min(100, Math.max(0, t)), /* @__PURE__ */ n(
26
+ let n = 0, c = 0;
27
+ const d = l ?? 0;
28
+ return o === "percent" && (n = e, c = d), o === "raw" && t !== void 0 && t > 0 && (n = e / t * 100, c = d / t * 100), n = Math.min(100, Math.max(0, n)), c = Math.min(100, Math.max(0, c)), /* @__PURE__ */ i(
28
29
  "div",
29
30
  {
30
- className: f(
31
+ className: P(
31
32
  r.progressBar,
32
33
  r[`progressBar-${a}`],
33
34
  b
34
35
  ),
35
36
  ...w,
36
37
  children: [
37
- a === "section" && /* @__PURE__ */ n("div", { className: r.labels, children: [
38
- /* @__PURE__ */ l(
39
- d,
38
+ a === "section" && /* @__PURE__ */ i("div", { className: r.labels, children: [
39
+ /* @__PURE__ */ s(
40
+ m,
40
41
  {
41
- label: _,
42
- value: i
42
+ label: p,
43
+ value: t
43
44
  }
44
45
  ),
45
- /* @__PURE__ */ l(
46
- d,
46
+ /* @__PURE__ */ s(
47
+ m,
47
48
  {
48
- label: p,
49
- value: s
49
+ label: g,
50
+ value: e
50
51
  }
51
52
  ),
52
- /* @__PURE__ */ l(
53
- d,
53
+ /* @__PURE__ */ s(
54
+ m,
54
55
  {
55
56
  label: h,
56
- value: e
57
+ value: l
57
58
  }
58
59
  )
59
60
  ] }),
60
- /* @__PURE__ */ n("div", { className: r.track, children: [
61
- /* @__PURE__ */ l("div", { className: r.completed, style: { width: `${c}%` } }),
62
- a === "section" && e !== void 0 && e !== 0 && s < 100 && /* @__PURE__ */ l("div", { className: r.inProgress, style: { width: `${t}%` } })
61
+ /* @__PURE__ */ i("div", { className: r.track, children: [
62
+ /* @__PURE__ */ s("div", { className: r.completed, style: { width: `${n}%` } }),
63
+ a === "section" && c > 0 && n < 100 && /* @__PURE__ */ s("div", { className: r.inProgress, style: { width: `${c}%` } })
63
64
  ] }),
64
- a === "cell" && /* @__PURE__ */ n(m, { weight: "semibold", size: "xs", children: [
65
- s,
66
- "%"
67
- ] })
65
+ a === "cell" && /* @__PURE__ */ s(_, { weight: "semibold", size: "xs", children: o === "percent" ? `${e}%` : e })
68
66
  ]
69
67
  }
70
68
  );
71
69
  }
72
- function d({ isVisible: o = !0, label: s, value: e }) {
73
- return !o || !s || e === void 0 || e === null ? null : /* @__PURE__ */ n("div", { className: r.labelContainer, children: [
74
- /* @__PURE__ */ n(m, { size: "sm", colorToken: "quaternary", children: [
75
- s,
70
+ function m({ isVisible: o = !0, label: e, value: l }) {
71
+ return !o || !e || l === void 0 || l === null ? null : /* @__PURE__ */ i("div", { className: r.labelContainer, children: [
72
+ /* @__PURE__ */ i(_, { size: "sm", colorToken: "quaternary", children: [
73
+ e,
76
74
  ":"
77
75
  ] }),
78
- /* @__PURE__ */ l(m, { weight: "semibold", size: "sm", children: e })
76
+ /* @__PURE__ */ s(_, { weight: "semibold", size: "sm", children: l })
79
77
  ] });
80
78
  }
81
79
  export {
82
- z as ProgressBar
80
+ $ as ProgressBar
83
81
  };
@@ -13,6 +13,7 @@ type Story = StoryObj<typeof meta>;
13
13
  export declare const CellVariant: Story;
14
14
  export declare const SectionVariant: Story;
15
15
  export declare const SectionAllLabelsUsed: Story;
16
+ export declare const SectionPercentWithInProgress: Story;
16
17
  export declare const CellZeroPercentProgress: Story;
17
18
  export declare const CellHundredPercentProgress: Story;
18
19
  export declare const SectionZeroPercentProgress: Story;
@@ -23,26 +23,37 @@ const r = {
23
23
  args: {
24
24
  variant: "section",
25
25
  kind: "raw",
26
- completedValue: 50,
27
- inProgressValue: 30,
28
- totalValue: 120,
26
+ completedValue: 1246,
27
+ inProgressValue: 221,
28
+ totalValue: 8979,
29
29
  totalLabel: "Total",
30
- completedLabel: "Completed",
31
- inProgressLabel: "In progress"
30
+ completedLabel: "Complete",
31
+ inProgressLabel: "In Progress"
32
32
  }
33
33
  }, n = {
34
+ args: {
35
+ variant: "section",
36
+ kind: "percent",
37
+ completedValue: 60,
38
+ inProgressValue: 20,
39
+ totalLabel: "Total",
40
+ totalValue: 100,
41
+ completedLabel: "Complete",
42
+ inProgressLabel: "In Progress"
43
+ }
44
+ }, s = {
34
45
  args: {
35
46
  variant: "cell",
36
47
  kind: "percent",
37
48
  completedValue: 0
38
49
  }
39
- }, s = {
50
+ }, c = {
40
51
  args: {
41
52
  variant: "cell",
42
53
  kind: "percent",
43
54
  completedValue: 100
44
55
  }
45
- }, c = {
56
+ }, i = {
46
57
  args: {
47
58
  variant: "section",
48
59
  kind: "percent",
@@ -58,12 +69,13 @@ const r = {
58
69
  }
59
70
  };
60
71
  export {
61
- s as CellHundredPercentProgress,
72
+ c as CellHundredPercentProgress,
62
73
  a as CellVariant,
63
- n as CellZeroPercentProgress,
74
+ s as CellZeroPercentProgress,
64
75
  l as SectionAllLabelsUsed,
65
76
  d as SectionHundredPercentProgress,
77
+ n as SectionPercentWithInProgress,
66
78
  o as SectionVariant,
67
- c as SectionZeroPercentProgress,
79
+ i as SectionZeroPercentProgress,
68
80
  r as default
69
81
  };
@@ -1,151 +1,152 @@
1
- import { jsxs as n, Fragment as U, jsx as i } from "react/jsx-runtime";
1
+ import { jsxs as n, Fragment as O, jsx as i } from "react/jsx-runtime";
2
2
  import s from "react";
3
3
  import { r as ct } from "../../index-BkF-BQ3Q.js";
4
- import { Text as j } from "../../atoms/Text/Text.js";
5
- import { Link as M } from "../../atoms/Link/Link.js";
6
- import { Icon as N } from "../../atoms/Icon/Icon.js";
7
- import { Flex as $ } from "../../atoms/Flex/Flex.js";
4
+ import { Text as M } from "../../atoms/Text/Text.js";
5
+ import { Link as U } from "../../atoms/Link/Link.js";
6
+ import { Icon as _ } from "../../atoms/Icon/Icon.js";
7
+ import { Flex as B } from "../../atoms/Flex/Flex.js";
8
8
  import { Grid as at, Column as st } from "../../atoms/Grid/Grid.js";
9
9
  import { Input as Z } from "../../atoms/Input/Input.js";
10
- import { InputEndAdornmentButton as F } from "../../atoms/InputEndAdornmentButton/InputEndAdornmentButton.js";
10
+ import { InputEndAdornmentButton as $ } from "../../atoms/InputEndAdornmentButton/InputEndAdornmentButton.js";
11
11
  import { Logo as yt } from "../../molecules/Logo/Logo.js";
12
- import { HamburgerMenu as ut } from "../../molecules/HamburgerMenu/HamburgerMenu.js";
13
- import { ShoppingCart as _t } from "../../molecules/Cart/Cart.js";
14
- import { Account as Nt } from "../../molecules/Account/Account.js";
15
- import { CategoryNav as kt } from "../../molecules/CategoryNav/CategoryNav.js";
12
+ import { HamburgerMenu as wt } from "../../molecules/HamburgerMenu/HamburgerMenu.js";
13
+ import { ShoppingCart as ut } from "../../molecules/Cart/Cart.js";
14
+ import { Account as _t } from "../../molecules/Account/Account.js";
15
+ import { CategoryNav as Nt } from "../../molecules/CategoryNav/CategoryNav.js";
16
16
  import { SuggestionDropdown as C } from "../SuggestionDropdown/SuggestionDropdown.js";
17
17
  import { getHideAtStyles as P } from "../../atoms/HideAt.js";
18
- import { c as k } from "../../clsx-OuTLNxxd.js";
19
- import '../../assets/MainNav.css';const wt = "_main_o3lxf_1", xt = "_column_o3lxf_8", At = "_topNav_o3lxf_13", bt = "_logo_o3lxf_21", vt = "_operations_o3lxf_24", Lt = "_search_o3lxf_31", pt = "_mobileSearch_o3lxf_37", Dt = "_typeAheadPortal_o3lxf_40", Kt = "_siteLink_o3lxf_44", zt = "_accountArea_o3lxf_71", Et = "_category_o3lxf_83", Bt = "_categoryLink_o3lxf_91", $t = "_menuList_o3lxf_107", Ft = "_menuItemAction_o3lxf_130", Rt = "_shortcutIcon_o3lxf_139", o = {
20
- main: wt,
21
- column: xt,
22
- topNav: At,
23
- logo: bt,
24
- operations: vt,
25
- search: Lt,
18
+ import { c as N } from "../../clsx-OuTLNxxd.js";
19
+ import '../../assets/MainNav.css';const kt = "_main_1w2jy_1", At = "_column_1w2jy_8", bt = "_topNav_1w2jy_13", vt = "_logo_1w2jy_21", Lt = "_operations_1w2jy_24", xt = "_search_1w2jy_31", pt = "_mobileSearch_1w2jy_37", Dt = "_typeAheadPortal_1w2jy_40", jt = "_siteLink_1w2jy_47", Kt = "_accountArea_1w2jy_74", zt = "_category_1w2jy_86", Et = "_categoryLink_1w2jy_94", Bt = "_menuList_1w2jy_110", $t = "_menuItemAction_1w2jy_133", Ft = "_shortcutIcon_1w2jy_142", e = {
20
+ main: kt,
21
+ column: At,
22
+ topNav: bt,
23
+ logo: vt,
24
+ operations: Lt,
25
+ search: xt,
26
26
  mobileSearch: pt,
27
27
  typeAheadPortal: Dt,
28
- siteLink: Kt,
29
- accountArea: zt,
30
- category: Et,
31
- categoryLink: Bt,
32
- menuList: $t,
33
- menuItemAction: Ft,
34
- shortcutIcon: Rt
28
+ siteLink: jt,
29
+ accountArea: Kt,
30
+ category: zt,
31
+ categoryLink: Et,
32
+ menuList: Bt,
33
+ menuItemAction: $t,
34
+ shortcutIcon: Ft
35
35
  }, gt = s.forwardRef(function({
36
- account: R,
37
- categories: v,
36
+ account: F,
37
+ categories: L,
38
38
  homeRoute: V,
39
39
  faqRoute: g,
40
- customPartsRoute: H,
40
+ customPartsRoute: T,
41
41
  aboutUsRoute: h,
42
42
  contactRoute: I,
43
43
  cart: S,
44
44
  open: tt,
45
45
  // consume external panel control props from CartPropsBase
46
46
  className: it,
47
- onLoginClick: ot,
48
- searchInputProps: m,
49
- searchValue: r,
50
- onSearchValueChange: f,
51
- onClearSearch: w,
52
- onSearch: c,
53
- searchSuggestions: e,
47
+ onLoginClick: et,
48
+ searchInputProps: l,
49
+ searchValue: f,
50
+ onSearchValueChange: d,
51
+ onClearSearch: k,
52
+ onSearch: a,
53
+ searchSuggestions: o,
54
54
  recentSearches: y,
55
- onClearRecentSearch: et,
56
- onCategoryClick: K,
55
+ onClearRecentSearch: ot,
56
+ onCategoryClick: j,
57
57
  onClickModelSerial: q,
58
- onCartClick: lt,
59
- accountPopoverContent: mt,
58
+ onCartClick: mt,
59
+ accountPopoverContent: lt,
60
60
  isAccountLoading: nt,
61
- isCategoriesLoading: ft,
62
- ...dt
63
- }, rt) {
61
+ isCategoriesLoading: dt,
62
+ ...rt
63
+ }, ft) {
64
64
  var Y;
65
- const [G, O] = s.useState(!1), [d, u] = s.useState(-1), [Q, W] = s.useState(), x = s.useRef(null), z = s.useRef(null), _ = s.useId(), E = () => {
65
+ const [G, R] = s.useState(!1), [r, w] = s.useState(-1), [Q, W] = s.useState(), A = s.useRef(null), K = s.useRef(null), u = s.useId(), z = () => {
66
66
  var t;
67
- return (t = x.current) != null && t.offsetParent ? x.current : z.current;
68
- }, A = G && !!r && !!e, B = G && !A && !!(y != null && y.length), L = A ? ((e == null ? void 0 : e.terms.length) ?? 0) + ((e == null ? void 0 : e.categories.length) ?? 0) + (((Y = e == null ? void 0 : e.customParts) == null ? void 0 : Y.length) ?? 0) + ((e == null ? void 0 : e.items.length) ?? 0) : B ? (y == null ? void 0 : y.length) ?? 0 : 0;
67
+ return (t = A.current) != null && t.offsetParent ? A.current : K.current;
68
+ }, b = G && !!f && !!o, E = G && !b && !!(y != null && y.length), x = b ? ((o == null ? void 0 : o.terms.length) ?? 0) + ((o == null ? void 0 : o.categories.length) ?? 0) + (((Y = o == null ? void 0 : o.customParts) == null ? void 0 : Y.length) ?? 0) + ((o == null ? void 0 : o.items.length) ?? 0) : E ? (y == null ? void 0 : y.length) ?? 0 : 0;
69
69
  s.useLayoutEffect(() => {
70
- if (!A && !B) {
70
+ if (!b && !E) {
71
71
  W(void 0);
72
72
  return;
73
73
  }
74
74
  function t() {
75
75
  var p;
76
- const l = (p = x.current) != null && p.offsetParent ? x.current : z.current;
77
- if (!l) return;
78
- const a = l.getBoundingClientRect();
76
+ const m = (p = A.current) != null && p.offsetParent ? A.current : K.current;
77
+ if (!m) return;
78
+ const c = m.getBoundingClientRect();
79
79
  W({
80
- top: a.bottom + 4,
81
- left: a.left,
82
- width: a.width
80
+ top: c.bottom + 4,
81
+ left: c.left,
82
+ width: c.width,
83
+ maxHeight: Math.max(0, window.innerHeight - c.bottom - 12)
83
84
  });
84
85
  }
85
86
  return t(), window.addEventListener("resize", t), window.addEventListener("scroll", t, !0), () => {
86
87
  window.removeEventListener("resize", t), window.removeEventListener("scroll", t, !0);
87
88
  };
88
- }, [A, B]);
89
+ }, [b, E]);
89
90
  const J = {
90
- ...m,
91
+ ...l,
91
92
  onChange: (t) => {
92
- var l;
93
- u(-1), (l = m == null ? void 0 : m.onChange) == null || l.call(m, t);
93
+ var m;
94
+ w(-1), (m = l == null ? void 0 : l.onChange) == null || m.call(l, t);
94
95
  },
95
96
  onFocus: (t) => {
96
- var l;
97
- (l = m == null ? void 0 : m.onFocus) == null || l.call(m, t), O(!0);
97
+ var m;
98
+ (m = l == null ? void 0 : l.onFocus) == null || m.call(l, t), R(!0);
98
99
  },
99
100
  onBlur: (t) => {
100
- var l;
101
- (l = m == null ? void 0 : m.onBlur) == null || l.call(m, t), O(!1);
101
+ var m;
102
+ (m = l == null ? void 0 : l.onBlur) == null || m.call(l, t), R(!1);
102
103
  },
103
104
  onKeyDown: (t) => {
104
- var l, a, p;
105
- if ((l = m == null ? void 0 : m.onKeyDown) == null || l.call(m, t), !t.defaultPrevented) {
106
- if (t.key === "ArrowDown" && L > 0) {
107
- t.preventDefault(), u((D) => D >= L - 1 ? 0 : D + 1);
105
+ var m, c, p;
106
+ if ((m = l == null ? void 0 : l.onKeyDown) == null || m.call(l, t), !t.defaultPrevented) {
107
+ if (t.key === "ArrowDown" && x > 0) {
108
+ t.preventDefault(), w((D) => D >= x - 1 ? 0 : D + 1);
108
109
  return;
109
110
  }
110
- if (t.key === "ArrowUp" && L > 0) {
111
- t.preventDefault(), u((D) => D <= 0 ? L - 1 : D - 1);
111
+ if (t.key === "ArrowUp" && x > 0) {
112
+ t.preventDefault(), w((D) => D <= 0 ? x - 1 : D - 1);
112
113
  return;
113
114
  }
114
- if (t.key === "Tab" && A && d >= 0 && d < ((e == null ? void 0 : e.terms.length) ?? 0)) {
115
- t.preventDefault(), f == null || f((e == null ? void 0 : e.terms[d].name) ?? ""), u(-1);
115
+ if (t.key === "Tab" && b && r >= 0 && r < ((o == null ? void 0 : o.terms.length) ?? 0)) {
116
+ t.preventDefault(), d == null || d((o == null ? void 0 : o.terms[r].name) ?? ""), w(-1);
116
117
  return;
117
118
  }
118
- if (t.key === "Enter" && d >= 0 && d < L) {
119
- t.preventDefault(), (a = document.getElementById(`${_}-${d}`)) == null || a.click();
119
+ if (t.key === "Enter" && r >= 0 && r < x) {
120
+ t.preventDefault(), (c = document.getElementById(`${u}-${r}`)) == null || c.click();
120
121
  return;
121
122
  }
122
- t.key === "Enter" && (t.preventDefault(), O(!1), (p = E()) == null || p.blur(), c == null || c(r ?? ""));
123
+ t.key === "Enter" && (t.preventDefault(), R(!1), (p = z()) == null || p.blur(), a == null || a(f ?? ""));
123
124
  }
124
125
  }
125
126
  }, X = (t) => {
126
- var l;
127
- t.key.length !== 1 || t.altKey || t.ctrlKey || t.metaKey || (t.preventDefault(), u(-1), f == null || f(`${r ?? ""}${t.key}`), (l = E()) == null || l.focus());
127
+ var m;
128
+ t.key.length !== 1 || t.altKey || t.ctrlKey || t.metaKey || (t.preventDefault(), w(-1), d == null || d(`${f ?? ""}${t.key}`), (m = z()) == null || m.focus());
128
129
  };
129
- return /* @__PURE__ */ n(U, { children: [
130
- /* @__PURE__ */ i(at, { ...dt, gridWrapperClassName: k(o.main, it), children: /* @__PURE__ */ n(st, { span: 12, className: o.column, children: [
130
+ return /* @__PURE__ */ n(O, { children: [
131
+ /* @__PURE__ */ i(at, { ...rt, gridWrapperClassName: N(e.main, it), children: /* @__PURE__ */ n(st, { span: 12, className: e.column, children: [
131
132
  /* @__PURE__ */ n(
132
- $,
133
+ B,
133
134
  {
134
135
  flexDirection: "row",
135
136
  alignItems: "center",
136
137
  justifyContent: "space-between",
137
- className: o.topNav,
138
+ className: e.topNav,
138
139
  children: [
139
- /* @__PURE__ */ i("div", { className: o.logo, children: /* @__PURE__ */ i(M, { href: V, children: /* @__PURE__ */ i(yt, {}) }) }),
140
+ /* @__PURE__ */ i("div", { className: e.logo, children: /* @__PURE__ */ i(U, { href: V, children: /* @__PURE__ */ i(yt, {}) }) }),
140
141
  /* @__PURE__ */ n(
141
- $,
142
+ B,
142
143
  {
143
144
  flexDirection: "row",
144
145
  alignItems: "center",
145
146
  justifyContent: "flex-end",
146
- className: o.operations,
147
+ className: e.operations,
147
148
  children: [
148
- /* @__PURE__ */ i($, { flexDirection: "row", hideAt: ["sm"], className: o.search, children: /* @__PURE__ */ i(
149
+ /* @__PURE__ */ i(B, { flexDirection: "row", hideAt: ["sm"], className: e.search, children: /* @__PURE__ */ i(
149
150
  Z,
150
151
  {
151
152
  variant: "search",
@@ -154,106 +155,106 @@ import '../../assets/MainNav.css';const wt = "_main_o3lxf_1", xt = "_column_o3lx
154
155
  name: "cpc-search",
155
156
  autoComplete: "off",
156
157
  "aria-autocomplete": "list",
157
- "aria-controls": _,
158
- "aria-activedescendant": d >= 0 ? `${_}-${d}` : void 0,
158
+ "aria-controls": u,
159
+ "aria-activedescendant": r >= 0 ? `${u}-${r}` : void 0,
159
160
  ...J,
160
- ref: x,
161
- value: r,
162
- endAdornment: /* @__PURE__ */ n(U, { children: [
163
- !!r && /* @__PURE__ */ i(
164
- F,
161
+ ref: A,
162
+ value: f,
163
+ endAdornment: /* @__PURE__ */ n(O, { children: [
164
+ !!f && /* @__PURE__ */ i(
165
+ $,
165
166
  {
166
167
  "aria-label": "Clear search",
167
168
  onMouseDown: (t) => t.preventDefault(),
168
169
  onClick: () => {
169
170
  var t;
170
- u(-1), w == null || w(), (t = x.current) == null || t.focus();
171
+ w(-1), k == null || k(), (t = A.current) == null || t.focus();
171
172
  },
172
173
  iconProps: { iconKey: "fa-regular fa-xmark", size: "sm" }
173
174
  }
174
175
  ),
175
176
  /* @__PURE__ */ i(
176
- F,
177
+ $,
177
178
  {
178
179
  "aria-label": "Submit search",
179
- onClick: () => c == null ? void 0 : c(r ?? ""),
180
+ onClick: () => a == null ? void 0 : a(f ?? ""),
180
181
  iconProps: { iconKey: "fa-regular fa-magnifying-glass", size: "sm" }
181
182
  }
182
183
  )
183
184
  ] })
184
185
  }
185
186
  ) }),
186
- /* @__PURE__ */ n("button", { onClick: q, className: k(o.siteLink, P(["sm", "md"])), children: [
187
- /* @__PURE__ */ i(N, { iconKey: "fa-regular fa-sparkles", size: "sm" }),
187
+ /* @__PURE__ */ n("button", { onClick: q, className: N(e.siteLink, P(["sm", "md"])), children: [
188
+ /* @__PURE__ */ i(_, { iconKey: "fa-regular fa-sparkles", size: "sm" }),
188
189
  "Ask Our Experts"
189
190
  ] }),
190
- /* @__PURE__ */ i(b, { href: H, hideAt: ["sm", "md"], children: "Custom Parts" }),
191
- /* @__PURE__ */ i(b, { href: I, hideAt: ["sm", "md"], children: "Contact Us" }),
192
- /* @__PURE__ */ i("div", { className: o.accountArea, children: /* @__PURE__ */ i(
193
- Nt,
191
+ /* @__PURE__ */ i(v, { href: T, hideAt: ["sm", "md"], children: "Custom Parts" }),
192
+ /* @__PURE__ */ i(v, { href: I, hideAt: ["sm", "md"], children: "Contact Us" }),
193
+ /* @__PURE__ */ i("div", { className: e.accountArea, children: /* @__PURE__ */ i(
194
+ _t,
194
195
  {
195
- account: R,
196
- onLoginClick: ot,
197
- className: o.avatar,
198
- popoverContent: mt,
196
+ account: F,
197
+ onLoginClick: et,
198
+ className: e.avatar,
199
+ popoverContent: lt,
199
200
  isAccountLoading: nt
200
201
  }
201
202
  ) }),
202
203
  /* @__PURE__ */ i(
203
- _t,
204
+ ut,
204
205
  {
205
- ref: rt,
206
+ ref: ft,
206
207
  cart: S,
207
208
  open: tt,
208
- onCartClick: lt
209
+ onCartClick: mt
209
210
  }
210
211
  ),
211
- /* @__PURE__ */ n(ut, { hideAt: ["lg"], children: [
212
+ /* @__PURE__ */ n(wt, { hideAt: ["lg"], children: [
212
213
  /* @__PURE__ */ n("section", { children: [
213
- /* @__PURE__ */ i(j, { size: "md", weight: "semibold", children: "Useful shortcuts" }),
214
- /* @__PURE__ */ n("ul", { className: o.menuList, children: [
215
- /* @__PURE__ */ i("li", { className: o.menuItem, children: /* @__PURE__ */ n(
214
+ /* @__PURE__ */ i(M, { size: "md", weight: "semibold", children: "Useful shortcuts" }),
215
+ /* @__PURE__ */ n("ul", { className: e.menuList, children: [
216
+ /* @__PURE__ */ i("li", { className: e.menuItem, children: /* @__PURE__ */ n(
216
217
  "button",
217
218
  {
218
219
  onClick: q,
219
220
  "data-hamburger-close": "true",
220
- className: k(o.siteLink, o.menuItemAction, P(["lg"])),
221
+ className: N(e.siteLink, e.menuItemAction, P(["lg"])),
221
222
  children: [
222
- /* @__PURE__ */ i(N, { iconKey: "fa-regular fa-sparkles", size: "sm", className: o.shortcutIcon }),
223
+ /* @__PURE__ */ i(_, { iconKey: "fa-regular fa-sparkles", size: "sm", className: e.shortcutIcon }),
223
224
  "Ask Our Experts"
224
225
  ]
225
226
  }
226
227
  ) }),
227
- /* @__PURE__ */ i("li", { className: o.menuItem, children: /* @__PURE__ */ n(b, { href: H, className: k(o.siteLink, o.menuItemAction), children: [
228
- /* @__PURE__ */ i(N, { iconKey: "fa-regular fa-screwdriver-wrench", size: "sm", className: o.shortcutIcon }),
228
+ /* @__PURE__ */ i("li", { className: e.menuItem, children: /* @__PURE__ */ n(v, { href: T, className: N(e.siteLink, e.menuItemAction), children: [
229
+ /* @__PURE__ */ i(_, { iconKey: "fa-regular fa-screwdriver-wrench", size: "sm", className: e.shortcutIcon }),
229
230
  "Custom Parts"
230
231
  ] }) }),
231
- /* @__PURE__ */ i("li", { className: o.menuItem, children: /* @__PURE__ */ n(b, { href: I, className: k(o.siteLink, o.menuItemAction), children: [
232
- /* @__PURE__ */ i(N, { iconKey: "fa-regular fa-envelope", size: "sm", className: o.shortcutIcon }),
232
+ /* @__PURE__ */ i("li", { className: e.menuItem, children: /* @__PURE__ */ n(v, { href: I, className: N(e.siteLink, e.menuItemAction), children: [
233
+ /* @__PURE__ */ i(_, { iconKey: "fa-regular fa-envelope", size: "sm", className: e.shortcutIcon }),
233
234
  "Contact Us"
234
235
  ] }) }),
235
- /* @__PURE__ */ i("li", { className: o.menuItem, children: /* @__PURE__ */ n(b, { href: g, className: k(o.siteLink, o.menuItemAction), children: [
236
- /* @__PURE__ */ i(N, { iconKey: "fa-solid fa-question", size: "sm", className: o.shortcutIcon }),
236
+ /* @__PURE__ */ i("li", { className: e.menuItem, children: /* @__PURE__ */ n(v, { href: g, className: N(e.siteLink, e.menuItemAction), children: [
237
+ /* @__PURE__ */ i(_, { iconKey: "fa-solid fa-question", size: "sm", className: e.shortcutIcon }),
237
238
  "FAQ"
238
239
  ] }) }),
239
- /* @__PURE__ */ i("li", { className: o.menuItem, children: /* @__PURE__ */ n(b, { href: h, className: k(o.siteLink, o.menuItemAction), children: [
240
- /* @__PURE__ */ i(N, { iconKey: "fa-regular fa-people-group", size: "sm", className: o.shortcutIcon }),
240
+ /* @__PURE__ */ i("li", { className: e.menuItem, children: /* @__PURE__ */ n(v, { href: h, className: N(e.siteLink, e.menuItemAction), children: [
241
+ /* @__PURE__ */ i(_, { iconKey: "fa-regular fa-people-group", size: "sm", className: e.shortcutIcon }),
241
242
  "About Us"
242
243
  ] }) })
243
244
  ] })
244
245
  ] }),
245
246
  /* @__PURE__ */ n("section", { children: [
246
- /* @__PURE__ */ i(j, { size: "md", weight: "semibold", children: "Shop by category" }),
247
- /* @__PURE__ */ i("ul", { className: o.menuList, children: v && v.map((t) => /* @__PURE__ */ i("li", { className: o.category, children: /* @__PURE__ */ n(
248
- M,
247
+ /* @__PURE__ */ i(M, { size: "md", weight: "semibold", children: "Shop by category" }),
248
+ /* @__PURE__ */ i("ul", { className: e.menuList, children: L && L.map((t) => /* @__PURE__ */ i("li", { className: e.category, children: /* @__PURE__ */ n(
249
+ U,
249
250
  {
250
251
  href: t.route,
251
- className: o.categoryLink,
252
- onClick: () => K == null ? void 0 : K(t),
252
+ className: e.categoryLink,
253
+ onClick: () => j == null ? void 0 : j(t),
253
254
  children: [
254
- /* @__PURE__ */ i(j, { size: "sm", children: t.label }),
255
+ /* @__PURE__ */ i(M, { size: "sm", children: t.label }),
255
256
  /* @__PURE__ */ i(
256
- N,
257
+ _,
257
258
  {
258
259
  iconKey: "fa-solid fa-chevron-right",
259
260
  title: "Navigate",
@@ -271,7 +272,7 @@ import '../../assets/MainNav.css';const wt = "_main_o3lxf_1", xt = "_column_o3lx
271
272
  ]
272
273
  }
273
274
  ),
274
- /* @__PURE__ */ i($, { flexDirection: "row", hideAt: ["md", "lg"], className: o.mobileSearch, children: /* @__PURE__ */ i("div", { className: o.search, children: /* @__PURE__ */ i(
275
+ /* @__PURE__ */ i(B, { flexDirection: "row", hideAt: ["md", "lg"], className: e.mobileSearch, children: /* @__PURE__ */ i("div", { className: e.search, children: /* @__PURE__ */ i(
275
276
  Z,
276
277
  {
277
278
  variant: "search",
@@ -280,29 +281,29 @@ import '../../assets/MainNav.css';const wt = "_main_o3lxf_1", xt = "_column_o3lx
280
281
  name: "cpc-search",
281
282
  autoComplete: "off",
282
283
  "aria-autocomplete": "list",
283
- "aria-controls": _,
284
- "aria-activedescendant": d >= 0 ? `${_}-${d}` : void 0,
284
+ "aria-controls": u,
285
+ "aria-activedescendant": r >= 0 ? `${u}-${r}` : void 0,
285
286
  ...J,
286
- ref: z,
287
- value: r,
288
- endAdornment: /* @__PURE__ */ n(U, { children: [
289
- !!r && /* @__PURE__ */ i(
290
- F,
287
+ ref: K,
288
+ value: f,
289
+ endAdornment: /* @__PURE__ */ n(O, { children: [
290
+ !!f && /* @__PURE__ */ i(
291
+ $,
291
292
  {
292
293
  "aria-label": "Clear search",
293
294
  onMouseDown: (t) => t.preventDefault(),
294
295
  onClick: () => {
295
296
  var t;
296
- u(-1), w == null || w(), (t = z.current) == null || t.focus();
297
+ w(-1), k == null || k(), (t = K.current) == null || t.focus();
297
298
  },
298
299
  iconProps: { iconKey: "fa-regular fa-xmark", size: "sm" }
299
300
  }
300
301
  ),
301
302
  /* @__PURE__ */ i(
302
- F,
303
+ $,
303
304
  {
304
305
  "aria-label": "Submit search",
305
- onClick: () => c == null ? void 0 : c(r ?? ""),
306
+ onClick: () => a == null ? void 0 : a(f ?? ""),
306
307
  iconProps: { iconKey: "fa-regular fa-magnifying-glass", size: "sm" }
307
308
  }
308
309
  )
@@ -310,11 +311,11 @@ import '../../assets/MainNav.css';const wt = "_main_o3lxf_1", xt = "_column_o3lx
310
311
  }
311
312
  ) }) }),
312
313
  /* @__PURE__ */ i(
313
- kt,
314
+ Nt,
314
315
  {
315
- categories: v,
316
- isCategoriesLoading: ft,
317
- onCategoryClick: K
316
+ categories: L,
317
+ isCategoriesLoading: dt,
318
+ onCategoryClick: j
318
319
  }
319
320
  )
320
321
  ] }) }),
@@ -322,23 +323,23 @@ import '../../assets/MainNav.css';const wt = "_main_o3lxf_1", xt = "_column_o3lx
322
323
  /* @__PURE__ */ n(
323
324
  "div",
324
325
  {
325
- className: o.typeAheadPortal,
326
+ className: e.typeAheadPortal,
326
327
  style: Q,
327
328
  children: [
328
- A && e && /* @__PURE__ */ i(
329
+ b && o && /* @__PURE__ */ i(
329
330
  C,
330
331
  {
331
- ...e,
332
- activeOptionIndex: d,
333
- optionIdPrefix: _,
332
+ ...o,
333
+ activeOptionIndex: r,
334
+ optionIdPrefix: u,
334
335
  onKeyDown: X,
335
336
  onSuggestionClick: (t) => {
336
- var l, a;
337
- (l = e.onSuggestionClick) == null || l.call(e, t), f == null || f((t == null ? void 0 : t.name) ?? r ?? ""), (a = E()) == null || a.blur();
337
+ var m, c;
338
+ (m = o.onSuggestionClick) == null || m.call(o, t), d == null || d((t == null ? void 0 : t.name) ?? f ?? ""), (c = z()) == null || c.blur();
338
339
  }
339
340
  }
340
341
  ),
341
- B && /* @__PURE__ */ i(
342
+ E && /* @__PURE__ */ i(
342
343
  C,
343
344
  {
344
345
  terms: [],
@@ -346,13 +347,13 @@ import '../../assets/MainNav.css';const wt = "_main_o3lxf_1", xt = "_column_o3lx
346
347
  items: [],
347
348
  view: "recent-searches",
348
349
  recentSearches: y,
349
- onClearRecentSearch: et,
350
- activeOptionIndex: d,
351
- optionIdPrefix: _,
350
+ onClearRecentSearch: ot,
351
+ activeOptionIndex: r,
352
+ optionIdPrefix: u,
352
353
  onKeyDown: X,
353
354
  onSuggestionClick: (t) => {
354
- var l;
355
- f == null || f((t == null ? void 0 : t.term) ?? r ?? ""), (l = E()) == null || l.blur();
355
+ var m;
356
+ d == null || d((t == null ? void 0 : t.term) ?? f ?? ""), (m = z()) == null || m.blur();
356
357
  }
357
358
  }
358
359
  )
@@ -363,12 +364,12 @@ import '../../assets/MainNav.css';const wt = "_main_o3lxf_1", xt = "_column_o3lx
363
364
  )
364
365
  ] });
365
366
  });
366
- function b({
367
- href: T,
368
- children: R,
369
- ...v
367
+ function v({
368
+ href: H,
369
+ children: F,
370
+ ...L
370
371
  }) {
371
- return /* @__PURE__ */ i(M, { href: T, className: o.siteLink, ...v, children: R });
372
+ return /* @__PURE__ */ i(U, { href: H, className: e.siteLink, ...L, children: F });
372
373
  }
373
374
  export {
374
375
  gt as MainNav
@@ -1,18 +1,18 @@
1
1
  import { jsxs as a, jsx as l } from "react/jsx-runtime";
2
2
  import { Text as h } from "../../atoms/Text/Text.js";
3
- import { Link as g } from "../../atoms/Link/Link.js";
3
+ import { Link as m } from "../../atoms/Link/Link.js";
4
4
  import { Icon as N } from "../../atoms/Icon/Icon.js";
5
5
  import { Image as y } from "../../atoms/Image/Image.js";
6
6
  import { c as o } from "../../clsx-OuTLNxxd.js";
7
- import '../../assets/SuggestionDropdown.css';const F = "_suggestionDropdown_zn0un_1", H = "_leftColumn_zn0un_31", $ = "_leftColumnFullWidth_zn0un_59", D = "_suggestionSectionFullHeight_zn0un_69", w = "_rightColumn_zn0un_79", b = "_categorySection_zn0un_99", T = "_suggestions_zn0un_105", k = "_categories_zn0un_107", q = "_suggestionsFullHeight_zn0un_121", W = "_customPartLink_zn0un_129", j = "_suggestionLink_zn0un_173", K = "_categoryLink_zn0un_175", M = "_activeOption_zn0un_211", O = "_itemList_zn0un_219", R = "_item_zn0un_219", x = "_recentSearch_zn0un_257", A = "_activeItem_zn0un_275", B = "_itemInfo_zn0un_311", E = "_recentSearches_zn0un_321", G = "_recentSearchesHeader_zn0un_335", J = "_recentSearchesList_zn0un_343", Q = "_recentSearchLink_zn0un_375", U = "_clearRecentSearch_zn0un_399", n = {
8
- suggestionDropdown: F,
9
- leftColumn: H,
10
- leftColumnFullWidth: $,
11
- suggestionSectionFullHeight: D,
12
- rightColumn: w,
13
- categorySection: b,
14
- suggestions: T,
15
- categories: k,
7
+ import '../../assets/SuggestionDropdown.css';const z = "_suggestionDropdown_denik_1", F = "_leftColumn_denik_31", H = "_leftColumnFullWidth_denik_61", $ = "_suggestionSectionFullHeight_denik_71", D = "_rightColumn_denik_81", w = "_categorySection_denik_107", b = "_suggestions_denik_113", T = "_categories_denik_115", q = "_suggestionsFullHeight_denik_129", W = "_customPartLink_denik_137", j = "_suggestionLink_denik_181", K = "_categoryLink_denik_183", M = "_activeOption_denik_219", O = "_itemList_denik_227", R = "_item_denik_227", x = "_recentSearch_denik_267", A = "_activeItem_denik_285", B = "_itemInfo_denik_323", E = "_recentSearches_denik_335", G = "_recentSearchesHeader_denik_355", J = "_recentSearchesList_denik_363", Q = "_recentSearchLink_denik_395", U = "_clearRecentSearch_denik_419", n = {
8
+ suggestionDropdown: z,
9
+ leftColumn: F,
10
+ leftColumnFullWidth: H,
11
+ suggestionSectionFullHeight: $,
12
+ rightColumn: D,
13
+ categorySection: w,
14
+ suggestions: b,
15
+ categories: T,
16
16
  suggestionsFullHeight: q,
17
17
  customPartLink: W,
18
18
  suggestionLink: j,
@@ -30,39 +30,39 @@ import '../../assets/SuggestionDropdown.css';const F = "_suggestionDropdown_zn0u
30
30
  clearRecentSearch: U
31
31
  };
32
32
  function I({
33
- terms: i,
33
+ terms: s,
34
34
  categories: r,
35
- items: m,
36
- customParts: _ = [],
35
+ items: u,
36
+ customParts: d = [],
37
37
  view: v = "suggestions",
38
- recentSearches: d = [],
39
- onClearRecentSearch: z,
40
- onSuggestionClick: t,
38
+ recentSearches: g = [],
39
+ onClearRecentSearch: k,
40
+ onSuggestionClick: i,
41
41
  activeOptionIndex: c = -1,
42
- optionIdPrefix: u,
42
+ optionIdPrefix: _,
43
43
  onKeyDown: L,
44
44
  className: p
45
45
  }) {
46
- return i.length === 0 && r.length === 0 && m.length === 0 && _.length === 0 && d.length === 0 ? null : v === "recent-searches" ? /* @__PURE__ */ a(
46
+ return s.length === 0 && r.length === 0 && u.length === 0 && d.length === 0 && g.length === 0 ? null : v === "recent-searches" ? /* @__PURE__ */ a(
47
47
  "div",
48
48
  {
49
- id: u,
49
+ id: _,
50
50
  role: "listbox",
51
51
  className: o(n.suggestionDropdown, n.recentSearches, p),
52
52
  onKeyDown: L,
53
53
  onMouseDown: (e) => e.preventDefault(),
54
54
  children: [
55
55
  /* @__PURE__ */ l("div", { className: n.recentSearchesHeader, children: /* @__PURE__ */ l(h, { size: "xxs", colorToken: "quaternary", children: "Recent Searches" }) }),
56
- /* @__PURE__ */ l("ol", { className: n.recentSearchesList, children: d.map((e) => /* @__PURE__ */ a("li", { className: n.recentSearch, children: [
56
+ /* @__PURE__ */ l("ol", { className: n.recentSearchesList, children: g.map((e) => /* @__PURE__ */ a("li", { className: n.recentSearch, children: [
57
57
  /* @__PURE__ */ l(
58
- g,
58
+ m,
59
59
  {
60
60
  href: e.url,
61
- id: `${u}-${d.indexOf(e)}`,
61
+ id: `${_}-${g.indexOf(e)}`,
62
62
  role: "option",
63
- "aria-selected": c === d.indexOf(e),
64
- className: o(n.recentSearchLink, { [n.activeOption]: c === d.indexOf(e) }),
65
- onClick: () => t == null ? void 0 : t(e),
63
+ "aria-selected": c === g.indexOf(e),
64
+ className: o(n.recentSearchLink, { [n.activeOption]: c === g.indexOf(e) }),
65
+ onClick: () => i == null ? void 0 : i(e),
66
66
  children: /* @__PURE__ */ l(h, { size: "sm", children: e.term })
67
67
  }
68
68
  ),
@@ -72,27 +72,27 @@ function I({
72
72
  type: "button",
73
73
  className: n.clearRecentSearch,
74
74
  "aria-label": `Clear recent search: ${e.term}`,
75
- onClick: () => z == null ? void 0 : z(e),
75
+ onClick: () => k == null ? void 0 : k(e),
76
76
  children: /* @__PURE__ */ l(N, { iconKey: "fa-regular fa-xmark", size: "sm" })
77
77
  }
78
78
  )
79
79
  ] }, e.url)) })
80
80
  ]
81
81
  }
82
- ) : /* @__PURE__ */ a("div", { id: u, role: "listbox", className: o(n.suggestionDropdown, p), onKeyDown: L, onMouseDown: (e) => e.preventDefault(), children: [
83
- (i.length > 0 || r.length > 0 || _.length > 0) && /* @__PURE__ */ a("div", { className: o(n.leftColumn, { [n.leftColumnFullWidth]: m.length === 0 }), children: [
84
- i.length > 0 && /* @__PURE__ */ l("div", { className: o(n.suggestionSection, { [n.suggestionSectionFullHeight]: r.length === 0 }), children: /* @__PURE__ */ a("div", { className: o(n.suggestions, { [n.suggestionsFullHeight]: r.length === 0 }), children: [
82
+ ) : /* @__PURE__ */ a("div", { id: _, role: "listbox", className: o(n.suggestionDropdown, p), onKeyDown: L, onMouseDown: (e) => e.preventDefault(), children: [
83
+ (s.length > 0 || r.length > 0 || d.length > 0) && /* @__PURE__ */ a("div", { className: o(n.leftColumn, { [n.leftColumnFullWidth]: u.length === 0 }), children: [
84
+ s.length > 0 && /* @__PURE__ */ l("div", { className: o(n.suggestionSection, { [n.suggestionSectionFullHeight]: r.length === 0 }), children: /* @__PURE__ */ a("div", { className: o(n.suggestions, { [n.suggestionsFullHeight]: r.length === 0 }), children: [
85
85
  /* @__PURE__ */ l(h, { size: "xxs", colorToken: "quaternary", children: "Suggestions" }),
86
- i.map(
87
- (e, s) => /* @__PURE__ */ l(h, { size: "sm", children: /* @__PURE__ */ l(
88
- g,
86
+ s.map(
87
+ (e, t) => /* @__PURE__ */ l(h, { size: "sm", children: /* @__PURE__ */ l(
88
+ m,
89
89
  {
90
90
  href: e.url,
91
- id: `${u}-${s}`,
91
+ id: `${_}-${t}`,
92
92
  role: "option",
93
- "aria-selected": c === s,
94
- className: o(n.suggestionLink, { [n.activeOption]: c === s }),
95
- onClick: () => t == null ? void 0 : t(e),
93
+ "aria-selected": c === t,
94
+ className: o(n.suggestionLink, { [n.activeOption]: c === t }),
95
+ onClick: () => i == null ? void 0 : i(e),
96
96
  children: e.name
97
97
  }
98
98
  ) }, e.url)
@@ -101,33 +101,33 @@ function I({
101
101
  r.length > 0 && /* @__PURE__ */ l("div", { className: n.categorySection, children: /* @__PURE__ */ a("div", { className: n.categories, children: [
102
102
  /* @__PURE__ */ l(h, { size: "xxs", colorToken: "quaternary", children: "Categories" }),
103
103
  r.map(
104
- (e, s) => /* @__PURE__ */ l(h, { size: "sm", children: /* @__PURE__ */ l(
105
- g,
104
+ (e, t) => /* @__PURE__ */ l(h, { size: "sm", children: /* @__PURE__ */ l(
105
+ m,
106
106
  {
107
107
  href: e.url,
108
- id: `${u}-${i.length + s}`,
108
+ id: `${_}-${s.length + t}`,
109
109
  role: "option",
110
- "aria-selected": c === i.length + s,
111
- className: o(n.categoryLink, { [n.activeOption]: c === i.length + s }),
112
- onClick: () => t == null ? void 0 : t(e),
110
+ "aria-selected": c === s.length + t,
111
+ className: o(n.categoryLink, { [n.activeOption]: c === s.length + t }),
112
+ onClick: () => i == null ? void 0 : i(e),
113
113
  children: e.name
114
114
  }
115
115
  ) }, e.categoryKey)
116
116
  )
117
117
  ] }) }),
118
- _.length > 0 && /* @__PURE__ */ l("div", { className: n.categorySection, children: /* @__PURE__ */ a("div", { className: n.categories, children: [
118
+ d.length > 0 && /* @__PURE__ */ l("div", { className: n.categorySection, children: /* @__PURE__ */ a("div", { className: n.categories, children: [
119
119
  /* @__PURE__ */ l(h, { size: "xxs", colorToken: "quaternary", children: "Custom Parts" }),
120
- _.map((e, s) => {
121
- const f = i.length + r.length + s;
120
+ d.map((e, t) => {
121
+ const f = s.length + r.length + t;
122
122
  return /* @__PURE__ */ a(
123
- g,
123
+ m,
124
124
  {
125
125
  href: e.url,
126
- id: `${u}-${f}`,
126
+ id: `${_}-${f}`,
127
127
  role: "option",
128
128
  "aria-selected": c === f,
129
129
  className: o(n.customPartLink, { [n.activeOption]: c === f }),
130
- onClick: () => t == null ? void 0 : t(e),
130
+ onClick: () => i == null ? void 0 : i(e),
131
131
  children: [
132
132
  /* @__PURE__ */ l(N, { iconKey: e.icon, size: "sm" }),
133
133
  /* @__PURE__ */ l(h, { size: "sm", children: e.label })
@@ -138,15 +138,15 @@ function I({
138
138
  })
139
139
  ] }) })
140
140
  ] }),
141
- m.length > 0 && /* @__PURE__ */ l("div", { className: n.rightColumn, children: /* @__PURE__ */ l("ol", { className: n.itemList, children: m.map(
142
- (e, s) => /* @__PURE__ */ l("li", { className: o(n.item, { [n.activeItem]: c === i.length + r.length + _.length + s }), children: /* @__PURE__ */ a(
143
- g,
141
+ u.length > 0 && /* @__PURE__ */ l("div", { className: n.rightColumn, children: /* @__PURE__ */ l("ol", { className: n.itemList, children: u.map(
142
+ (e, t) => /* @__PURE__ */ l("li", { className: o(n.item, { [n.activeItem]: c === s.length + r.length + d.length + t }), children: /* @__PURE__ */ a(
143
+ m,
144
144
  {
145
145
  href: e.url,
146
- id: `${u}-${i.length + r.length + _.length + s}`,
146
+ id: `${_}-${s.length + r.length + d.length + t}`,
147
147
  role: "option",
148
- "aria-selected": c === i.length + r.length + _.length + s,
149
- onClick: () => t == null ? void 0 : t(e),
148
+ "aria-selected": c === s.length + r.length + d.length + t,
149
+ onClick: () => i == null ? void 0 : i(e),
150
150
  children: [
151
151
  /* @__PURE__ */ l(y, { src: e.image, alt: `${e.description} product image`, height: 72, width: 72 }),
152
152
  /* @__PURE__ */ a("div", { className: n.itemInfo, children: [
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@caseparts-org/caseblocks",
3
3
  "private": false,
4
- "version": "0.0.289",
4
+ "version": "0.0.291",
5
5
  "type": "module",
6
6
  "module": "dist/main.js",
7
7
  "types": "dist/main.d.ts",