@caseparts-org/caseblocks 0.0.290 → 0.0.292

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,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
  };
@@ -5,11 +5,11 @@ import { Link as a } from "../../atoms/Link/Link.js";
5
5
  import { Icon as _ } from "../../atoms/Icon/Icon.js";
6
6
  import { Logo as $ } from "../../molecules/Logo/Logo.js";
7
7
  import { Text as l } from "../../atoms/Text/Text.js";
8
- import { Tooltip as K } from "../../atoms/Tooltip/Tooltip.js";
9
- import { c as m } from "../../clsx-OuTLNxxd.js";
10
- import '../../assets/Footer.css';const B = "_footer_by119_2", I = "_grid_by119_18", j = "_title_by119_31", q = "_columnContent_by119_40", G = "_history_by119_48", R = "_logo_by119_62", Q = "_location_by119_72", r = {
11
- footer: B,
12
- grid: I,
8
+ import { Tooltip as I } from "../../atoms/Tooltip/Tooltip.js";
9
+ import { c as y } from "../../clsx-OuTLNxxd.js";
10
+ import '../../assets/Footer.css';const K = "_footer_by119_2", B = "_grid_by119_18", j = "_title_by119_31", q = "_columnContent_by119_40", G = "_history_by119_48", R = "_logo_by119_62", Q = "_location_by119_72", r = {
11
+ footer: K,
12
+ grid: B,
13
13
  "bottom-grid": "_bottom-grid_by119_19",
14
14
  title: j,
15
15
  "title-help": "_title-help_by119_36",
@@ -72,7 +72,7 @@ import '../../assets/Footer.css';const B = "_footer_by119_2", I = "_grid_by119_1
72
72
  };
73
73
  function ie({
74
74
  homeRoute: w = "/",
75
- isOnline: y = !0,
75
+ isOnline: m = !0,
76
76
  className: g,
77
77
  companyHistoryText: A = Y,
78
78
  customerCareTitle: C = "Customer Care",
@@ -86,14 +86,14 @@ function ie({
86
86
  liveChatHref: p,
87
87
  onLiveChatClick: f,
88
88
  partResearchLabel: v = "Part Research Request",
89
- partResearchDescription: D = "Ask Our Experts to Source a Part",
89
+ partResearchDescription: D = "Identify a Part",
90
90
  partResearchHref: u,
91
91
  onPartResearchClick: d,
92
92
  legalLinks: s = H,
93
93
  copyrightText: P = "Copyright 1972-2025 Case Parts Company | All Rights Reserved.",
94
94
  ...W
95
95
  }) {
96
- const M = m(r.footer, g), U = [
96
+ const M = y(r.footer, g), U = [
97
97
  i.cuttingBoards,
98
98
  i.gaskets,
99
99
  i.heatersAndPans,
@@ -108,13 +108,13 @@ function ie({
108
108
  n.salesTaxCertificates,
109
109
  n.salesTax,
110
110
  n.myAccount
111
- ].filter((t) => !!(t != null && t.href)), O = (t) => {
111
+ ].filter((t) => !!(t != null && t.href)), F = (t) => {
112
112
  u || t.preventDefault(), d == null || d(t);
113
- }, F = (t) => {
113
+ }, O = (t) => {
114
114
  p || t.preventDefault(), f == null || f(t);
115
115
  };
116
116
  return /* @__PURE__ */ o("footer", { className: M, ...W, children: [
117
- /* @__PURE__ */ o(N, { gridWrapperClassName: m(g, r.grid), children: [
117
+ /* @__PURE__ */ o(N, { gridWrapperClassName: y(g, r.grid), children: [
118
118
  /* @__PURE__ */ o(h, { span: [4, 6, 3], className: r.gridColumn, children: [
119
119
  /* @__PURE__ */ e(a, { href: w, children: /* @__PURE__ */ e($, { variant: "white", className: r.logo }) }),
120
120
  /* @__PURE__ */ e("div", { className: r.history, children: /* @__PURE__ */ e(l, { size: "sm", weight: "extra-light", colorToken: "footer", className: r["history-text"], children: A }) })
@@ -133,7 +133,7 @@ function ie({
133
133
  z.map((t) => /* @__PURE__ */ o(c, { flexDirection: "row", justifyContent: "flex-start", className: r["icon-gap"], children: [
134
134
  /* @__PURE__ */ e(_, { iconKey: "fa-solid fa-location-dot", size: "sm", colorToken: "warning" }),
135
135
  /* @__PURE__ */ e(
136
- K,
136
+ I,
137
137
  {
138
138
  trigger: /* @__PURE__ */ o("div", { className: r.location, children: [
139
139
  /* @__PURE__ */ o(l, { size: "xs", weight: "extra-light", colorToken: "footer", children: [
@@ -163,30 +163,30 @@ function ie({
163
163
  )
164
164
  ] }, `${t.office}-${t.phone}`)),
165
165
  /* @__PURE__ */ o(c, { flexDirection: "row", justifyContent: "flex-start", className: r["icon-gap"], children: [
166
- /* @__PURE__ */ e(_, { iconKey: "fa-kit fa-chat", size: "sm", colorToken: y ? "success" : "default-inverted" }),
166
+ /* @__PURE__ */ e(_, { iconKey: "fa-kit fa-chat", size: "sm", colorToken: m ? "success" : "default-inverted" }),
167
167
  p || f ? /* @__PURE__ */ o(
168
168
  a,
169
169
  {
170
170
  href: p || "#",
171
171
  unstyled: !0,
172
- onClick: F,
172
+ onClick: O,
173
173
  className: r["live-chat-interactive"],
174
174
  children: [
175
175
  /* @__PURE__ */ e(l, { size: "xs", weight: "extra-light", colorToken: "footer", children: b }),
176
176
  /* @__PURE__ */ e("br", {}),
177
- /* @__PURE__ */ e(l, { size: "xs", weight: "extra-light", colorToken: "footer", children: y ? x : T })
177
+ /* @__PURE__ */ e(l, { size: "xs", weight: "extra-light", colorToken: "footer", children: m ? x : T })
178
178
  ]
179
179
  }
180
180
  ) : /* @__PURE__ */ o("div", { children: [
181
181
  /* @__PURE__ */ e(l, { size: "xs", weight: "extra-light", colorToken: "footer", children: b }),
182
182
  /* @__PURE__ */ e("br", {}),
183
- /* @__PURE__ */ e(l, { size: "xs", weight: "extra-light", colorToken: "footer", children: y ? x : T })
183
+ /* @__PURE__ */ e(l, { size: "xs", weight: "extra-light", colorToken: "footer", children: m ? x : T })
184
184
  ] })
185
185
  ] }),
186
186
  /* @__PURE__ */ o(c, { flexDirection: "row", justifyContent: "flex-start", className: r["icon-gap"], children: [
187
187
  /* @__PURE__ */ e(_, { iconKey: "fa-regular fa-sparkles", size: "sm", colorToken: "default-inverted" }),
188
- /* @__PURE__ */ o("div", { className: m((u || d) && r["part-research-interactive"]), children: [
189
- u || d ? /* @__PURE__ */ e(a, { href: u || "#", unstyled: !0, onClick: O, children: v }) : /* @__PURE__ */ e(l, { size: "xs", weight: "extra-light", colorToken: "footer", children: v }),
188
+ /* @__PURE__ */ o("div", { className: y((u || d) && r["part-research-interactive"]), children: [
189
+ u || d ? /* @__PURE__ */ e(a, { href: u || "#", unstyled: !0, onClick: F, children: v }) : /* @__PURE__ */ e(l, { size: "xs", weight: "extra-light", colorToken: "footer", children: v }),
190
190
  /* @__PURE__ */ e("br", {}),
191
191
  /* @__PURE__ */ e(l, { size: "xs", weight: "extra-light", colorToken: "footer", children: D })
192
192
  ] })
@@ -194,7 +194,7 @@ function ie({
194
194
  ] })
195
195
  ] })
196
196
  ] }),
197
- /* @__PURE__ */ e(N, { gridWrapperClassName: m(g, r["bottom-grid"]), children: /* @__PURE__ */ e(h, { span: [4, 6, 12], className: r.gridColumn, children: /* @__PURE__ */ o("div", { className: r.columnContent, children: [
197
+ /* @__PURE__ */ e(N, { gridWrapperClassName: y(g, r["bottom-grid"]), children: /* @__PURE__ */ e(h, { span: [4, 6, 12], className: r.gridColumn, children: /* @__PURE__ */ o("div", { className: r.columnContent, children: [
198
198
  /* @__PURE__ */ e(a, { href: s.terms.href, unstyled: s.terms.unstyled, target: s.terms.target, rel: s.terms.rel, children: s.terms.label }),
199
199
  "  ",
200
200
  /* @__PURE__ */ e(l, { size: "xs", weight: "extra-light", variant: "body", colorToken: "footer", children: "|" }),
@@ -1,35 +1,35 @@
1
- import { jsxs as n, Fragment as O, jsx as i } from "react/jsx-runtime";
1
+ import { jsxs as l, Fragment as M, 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 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";
4
+ import { Text as U } from "../../atoms/Text/Text.js";
5
+ import { Link as H } from "../../atoms/Link/Link.js";
6
+ import { Icon as u } from "../../atoms/Icon/Icon.js";
7
+ import { Flex as E } 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
10
  import { InputEndAdornmentButton as $ } from "../../atoms/InputEndAdornmentButton/InputEndAdornmentButton.js";
11
11
  import { Logo as yt } from "../../molecules/Logo/Logo.js";
12
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";
13
+ import { ShoppingCart as _t } from "../../molecules/Cart/Cart.js";
14
+ import { Account as ut } from "../../molecules/Account/Account.js";
15
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
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 = {
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", Dt = "_search_1w2jy_31", xt = "_mobileSearch_1w2jy_37", pt = "_typeAheadPortal_1w2jy_40", jt = "_siteLink_1w2jy_47", Kt = "_accountArea_1w2jy_74", zt = "_category_1w2jy_86", Bt = "_categoryLink_1w2jy_94", Et = "_menuList_1w2jy_110", $t = "_menuItemAction_1w2jy_133", Ft = "_shortcutIcon_1w2jy_142", e = {
20
20
  main: kt,
21
21
  column: At,
22
22
  topNav: bt,
23
23
  logo: vt,
24
24
  operations: Lt,
25
- search: xt,
26
- mobileSearch: pt,
27
- typeAheadPortal: Dt,
25
+ search: Dt,
26
+ mobileSearch: xt,
27
+ typeAheadPortal: pt,
28
28
  siteLink: jt,
29
29
  accountArea: Kt,
30
30
  category: zt,
31
- categoryLink: Et,
32
- menuList: Bt,
31
+ categoryLink: Bt,
32
+ menuList: Et,
33
33
  menuItemAction: $t,
34
34
  shortcutIcon: Ft
35
35
  }, gt = s.forwardRef(function({
@@ -37,15 +37,15 @@ import '../../assets/MainNav.css';const kt = "_main_1w2jy_1", At = "_column_1w2j
37
37
  categories: L,
38
38
  homeRoute: V,
39
39
  faqRoute: g,
40
- customPartsRoute: T,
40
+ customPartsRoute: O,
41
41
  aboutUsRoute: h,
42
- contactRoute: I,
42
+ contactRoute: T,
43
43
  cart: S,
44
44
  open: tt,
45
45
  // consume external panel control props from CartPropsBase
46
46
  className: it,
47
47
  onLoginClick: et,
48
- searchInputProps: l,
48
+ searchInputProps: n,
49
49
  searchValue: f,
50
50
  onSearchValueChange: d,
51
51
  onClearSearch: k,
@@ -56,24 +56,24 @@ import '../../assets/MainNav.css';const kt = "_main_1w2jy_1", At = "_column_1w2j
56
56
  onCategoryClick: j,
57
57
  onClickModelSerial: q,
58
58
  onCartClick: mt,
59
- accountPopoverContent: lt,
60
- isAccountLoading: nt,
59
+ accountPopoverContent: nt,
60
+ isAccountLoading: lt,
61
61
  isCategoriesLoading: dt,
62
62
  ...rt
63
63
  }, ft) {
64
64
  var Y;
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 = () => {
65
+ const [G, R] = s.useState(!1), [r, w] = s.useState(-1), [Q, W] = s.useState(), A = s.useRef(null), K = s.useRef(null), _ = s.useId(), z = () => {
66
66
  var t;
67
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;
68
+ }, b = G && !!f && !!o, B = G && !b && !!(y != null && y.length), D = 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) : B ? (y == null ? void 0 : y.length) ?? 0 : 0;
69
69
  s.useLayoutEffect(() => {
70
- if (!b && !E) {
70
+ if (!b && !B) {
71
71
  W(void 0);
72
72
  return;
73
73
  }
74
74
  function t() {
75
- var p;
76
- const m = (p = A.current) != null && p.offsetParent ? A.current : K.current;
75
+ var x;
76
+ const m = (x = A.current) != null && x.offsetParent ? A.current : K.current;
77
77
  if (!m) return;
78
78
  const c = m.getBoundingClientRect();
79
79
  W({
@@ -86,67 +86,67 @@ import '../../assets/MainNav.css';const kt = "_main_1w2jy_1", At = "_column_1w2j
86
86
  return t(), window.addEventListener("resize", t), window.addEventListener("scroll", t, !0), () => {
87
87
  window.removeEventListener("resize", t), window.removeEventListener("scroll", t, !0);
88
88
  };
89
- }, [b, E]);
89
+ }, [b, B]);
90
90
  const J = {
91
- ...l,
91
+ ...n,
92
92
  onChange: (t) => {
93
93
  var m;
94
- w(-1), (m = l == null ? void 0 : l.onChange) == null || m.call(l, t);
94
+ w(-1), (m = n == null ? void 0 : n.onChange) == null || m.call(n, t);
95
95
  },
96
96
  onFocus: (t) => {
97
97
  var m;
98
- (m = l == null ? void 0 : l.onFocus) == null || m.call(l, t), R(!0);
98
+ (m = n == null ? void 0 : n.onFocus) == null || m.call(n, t), R(!0);
99
99
  },
100
100
  onBlur: (t) => {
101
101
  var m;
102
- (m = l == null ? void 0 : l.onBlur) == null || m.call(l, t), R(!1);
102
+ (m = n == null ? void 0 : n.onBlur) == null || m.call(n, t), R(!1);
103
103
  },
104
104
  onKeyDown: (t) => {
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);
105
+ var m, c, x;
106
+ if ((m = n == null ? void 0 : n.onKeyDown) == null || m.call(n, t), !t.defaultPrevented) {
107
+ if (t.key === "ArrowDown" && D > 0) {
108
+ t.preventDefault(), w((p) => p >= D - 1 ? 0 : p + 1);
109
109
  return;
110
110
  }
111
- if (t.key === "ArrowUp" && x > 0) {
112
- t.preventDefault(), w((D) => D <= 0 ? x - 1 : D - 1);
111
+ if (t.key === "ArrowUp" && D > 0) {
112
+ t.preventDefault(), w((p) => p <= 0 ? D - 1 : p - 1);
113
113
  return;
114
114
  }
115
115
  if (t.key === "Tab" && b && r >= 0 && r < ((o == null ? void 0 : o.terms.length) ?? 0)) {
116
116
  t.preventDefault(), d == null || d((o == null ? void 0 : o.terms[r].name) ?? ""), w(-1);
117
117
  return;
118
118
  }
119
- if (t.key === "Enter" && r >= 0 && r < x) {
120
- t.preventDefault(), (c = document.getElementById(`${u}-${r}`)) == null || c.click();
119
+ if (t.key === "Enter" && r >= 0 && r < D) {
120
+ t.preventDefault(), (c = document.getElementById(`${_}-${r}`)) == null || c.click();
121
121
  return;
122
122
  }
123
- t.key === "Enter" && (t.preventDefault(), R(!1), (p = z()) == null || p.blur(), a == null || a(f ?? ""));
123
+ t.key === "Enter" && (t.preventDefault(), R(!1), (x = z()) == null || x.blur(), a == null || a(f ?? ""));
124
124
  }
125
125
  }
126
126
  }, X = (t) => {
127
127
  var m;
128
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());
129
129
  };
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: [
132
- /* @__PURE__ */ n(
133
- B,
130
+ return /* @__PURE__ */ l(M, { children: [
131
+ /* @__PURE__ */ i(at, { ...rt, gridWrapperClassName: N(e.main, it), children: /* @__PURE__ */ l(st, { span: 12, className: e.column, children: [
132
+ /* @__PURE__ */ l(
133
+ E,
134
134
  {
135
135
  flexDirection: "row",
136
136
  alignItems: "center",
137
137
  justifyContent: "space-between",
138
138
  className: e.topNav,
139
139
  children: [
140
- /* @__PURE__ */ i("div", { className: e.logo, children: /* @__PURE__ */ i(U, { href: V, children: /* @__PURE__ */ i(yt, {}) }) }),
141
- /* @__PURE__ */ n(
142
- B,
140
+ /* @__PURE__ */ i("div", { className: e.logo, children: /* @__PURE__ */ i(H, { href: V, children: /* @__PURE__ */ i(yt, {}) }) }),
141
+ /* @__PURE__ */ l(
142
+ E,
143
143
  {
144
144
  flexDirection: "row",
145
145
  alignItems: "center",
146
146
  justifyContent: "flex-end",
147
147
  className: e.operations,
148
148
  children: [
149
- /* @__PURE__ */ i(B, { flexDirection: "row", hideAt: ["sm"], className: e.search, children: /* @__PURE__ */ i(
149
+ /* @__PURE__ */ i(E, { flexDirection: "row", hideAt: ["sm"], className: e.search, children: /* @__PURE__ */ i(
150
150
  Z,
151
151
  {
152
152
  variant: "search",
@@ -155,12 +155,12 @@ import '../../assets/MainNav.css';const kt = "_main_1w2jy_1", At = "_column_1w2j
155
155
  name: "cpc-search",
156
156
  autoComplete: "off",
157
157
  "aria-autocomplete": "list",
158
- "aria-controls": u,
159
- "aria-activedescendant": r >= 0 ? `${u}-${r}` : void 0,
158
+ "aria-controls": _,
159
+ "aria-activedescendant": r >= 0 ? `${_}-${r}` : void 0,
160
160
  ...J,
161
161
  ref: A,
162
162
  value: f,
163
- endAdornment: /* @__PURE__ */ n(O, { children: [
163
+ endAdornment: /* @__PURE__ */ l(M, { children: [
164
164
  !!f && /* @__PURE__ */ i(
165
165
  $,
166
166
  {
@@ -184,24 +184,24 @@ import '../../assets/MainNav.css';const kt = "_main_1w2jy_1", At = "_column_1w2j
184
184
  ] })
185
185
  }
186
186
  ) }),
187
- /* @__PURE__ */ n("button", { onClick: q, className: N(e.siteLink, P(["sm", "md"])), children: [
188
- /* @__PURE__ */ i(_, { iconKey: "fa-regular fa-sparkles", size: "sm" }),
189
- "Ask Our Experts"
187
+ /* @__PURE__ */ l("button", { onClick: q, className: N(e.siteLink, P(["sm", "md"])), children: [
188
+ /* @__PURE__ */ i(u, { iconKey: "fa-regular fa-sparkles", size: "sm" }),
189
+ "Identify a Part"
190
190
  ] }),
191
- /* @__PURE__ */ i(v, { href: T, hideAt: ["sm", "md"], children: "Custom Parts" }),
192
- /* @__PURE__ */ i(v, { href: I, hideAt: ["sm", "md"], children: "Contact Us" }),
191
+ /* @__PURE__ */ i(v, { href: O, hideAt: ["sm", "md"], children: "Custom Parts" }),
192
+ /* @__PURE__ */ i(v, { href: T, hideAt: ["sm", "md"], children: "Contact Us" }),
193
193
  /* @__PURE__ */ i("div", { className: e.accountArea, children: /* @__PURE__ */ i(
194
- _t,
194
+ ut,
195
195
  {
196
196
  account: F,
197
197
  onLoginClick: et,
198
198
  className: e.avatar,
199
- popoverContent: lt,
200
- isAccountLoading: nt
199
+ popoverContent: nt,
200
+ isAccountLoading: lt
201
201
  }
202
202
  ) }),
203
203
  /* @__PURE__ */ i(
204
- ut,
204
+ _t,
205
205
  {
206
206
  ref: ft,
207
207
  cart: S,
@@ -209,52 +209,52 @@ import '../../assets/MainNav.css';const kt = "_main_1w2jy_1", At = "_column_1w2j
209
209
  onCartClick: mt
210
210
  }
211
211
  ),
212
- /* @__PURE__ */ n(wt, { hideAt: ["lg"], children: [
213
- /* @__PURE__ */ n("section", { children: [
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(
212
+ /* @__PURE__ */ l(wt, { hideAt: ["lg"], children: [
213
+ /* @__PURE__ */ l("section", { children: [
214
+ /* @__PURE__ */ i(U, { size: "md", weight: "semibold", children: "Useful shortcuts" }),
215
+ /* @__PURE__ */ l("ul", { className: e.menuList, children: [
216
+ /* @__PURE__ */ i("li", { className: e.menuItem, children: /* @__PURE__ */ l(
217
217
  "button",
218
218
  {
219
219
  onClick: q,
220
220
  "data-hamburger-close": "true",
221
221
  className: N(e.siteLink, e.menuItemAction, P(["lg"])),
222
222
  children: [
223
- /* @__PURE__ */ i(_, { iconKey: "fa-regular fa-sparkles", size: "sm", className: e.shortcutIcon }),
224
- "Ask Our Experts"
223
+ /* @__PURE__ */ i(u, { iconKey: "fa-regular fa-sparkles", size: "sm", className: e.shortcutIcon }),
224
+ "Identify a Part"
225
225
  ]
226
226
  }
227
227
  ) }),
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 }),
228
+ /* @__PURE__ */ i("li", { className: e.menuItem, children: /* @__PURE__ */ l(v, { href: O, className: N(e.siteLink, e.menuItemAction), children: [
229
+ /* @__PURE__ */ i(u, { iconKey: "fa-regular fa-screwdriver-wrench", size: "sm", className: e.shortcutIcon }),
230
230
  "Custom Parts"
231
231
  ] }) }),
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 }),
232
+ /* @__PURE__ */ i("li", { className: e.menuItem, children: /* @__PURE__ */ l(v, { href: T, className: N(e.siteLink, e.menuItemAction), children: [
233
+ /* @__PURE__ */ i(u, { iconKey: "fa-regular fa-envelope", size: "sm", className: e.shortcutIcon }),
234
234
  "Contact Us"
235
235
  ] }) }),
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 }),
236
+ /* @__PURE__ */ i("li", { className: e.menuItem, children: /* @__PURE__ */ l(v, { href: g, className: N(e.siteLink, e.menuItemAction), children: [
237
+ /* @__PURE__ */ i(u, { iconKey: "fa-solid fa-question", size: "sm", className: e.shortcutIcon }),
238
238
  "FAQ"
239
239
  ] }) }),
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 }),
240
+ /* @__PURE__ */ i("li", { className: e.menuItem, children: /* @__PURE__ */ l(v, { href: h, className: N(e.siteLink, e.menuItemAction), children: [
241
+ /* @__PURE__ */ i(u, { iconKey: "fa-regular fa-people-group", size: "sm", className: e.shortcutIcon }),
242
242
  "About Us"
243
243
  ] }) })
244
244
  ] })
245
245
  ] }),
246
- /* @__PURE__ */ n("section", { children: [
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,
246
+ /* @__PURE__ */ l("section", { children: [
247
+ /* @__PURE__ */ i(U, { 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__ */ l(
249
+ H,
250
250
  {
251
251
  href: t.route,
252
252
  className: e.categoryLink,
253
253
  onClick: () => j == null ? void 0 : j(t),
254
254
  children: [
255
- /* @__PURE__ */ i(M, { size: "sm", children: t.label }),
255
+ /* @__PURE__ */ i(U, { size: "sm", children: t.label }),
256
256
  /* @__PURE__ */ i(
257
- _,
257
+ u,
258
258
  {
259
259
  iconKey: "fa-solid fa-chevron-right",
260
260
  title: "Navigate",
@@ -272,7 +272,7 @@ import '../../assets/MainNav.css';const kt = "_main_1w2jy_1", At = "_column_1w2j
272
272
  ]
273
273
  }
274
274
  ),
275
- /* @__PURE__ */ i(B, { flexDirection: "row", hideAt: ["md", "lg"], className: e.mobileSearch, children: /* @__PURE__ */ i("div", { className: e.search, children: /* @__PURE__ */ i(
275
+ /* @__PURE__ */ i(E, { flexDirection: "row", hideAt: ["md", "lg"], className: e.mobileSearch, children: /* @__PURE__ */ i("div", { className: e.search, children: /* @__PURE__ */ i(
276
276
  Z,
277
277
  {
278
278
  variant: "search",
@@ -281,12 +281,12 @@ import '../../assets/MainNav.css';const kt = "_main_1w2jy_1", At = "_column_1w2j
281
281
  name: "cpc-search",
282
282
  autoComplete: "off",
283
283
  "aria-autocomplete": "list",
284
- "aria-controls": u,
285
- "aria-activedescendant": r >= 0 ? `${u}-${r}` : void 0,
284
+ "aria-controls": _,
285
+ "aria-activedescendant": r >= 0 ? `${_}-${r}` : void 0,
286
286
  ...J,
287
287
  ref: K,
288
288
  value: f,
289
- endAdornment: /* @__PURE__ */ n(O, { children: [
289
+ endAdornment: /* @__PURE__ */ l(M, { children: [
290
290
  !!f && /* @__PURE__ */ i(
291
291
  $,
292
292
  {
@@ -320,7 +320,7 @@ import '../../assets/MainNav.css';const kt = "_main_1w2jy_1", At = "_column_1w2j
320
320
  )
321
321
  ] }) }),
322
322
  Q && typeof document < "u" && ct.createPortal(
323
- /* @__PURE__ */ n(
323
+ /* @__PURE__ */ l(
324
324
  "div",
325
325
  {
326
326
  className: e.typeAheadPortal,
@@ -331,7 +331,7 @@ import '../../assets/MainNav.css';const kt = "_main_1w2jy_1", At = "_column_1w2j
331
331
  {
332
332
  ...o,
333
333
  activeOptionIndex: r,
334
- optionIdPrefix: u,
334
+ optionIdPrefix: _,
335
335
  onKeyDown: X,
336
336
  onSuggestionClick: (t) => {
337
337
  var m, c;
@@ -339,7 +339,7 @@ import '../../assets/MainNav.css';const kt = "_main_1w2jy_1", At = "_column_1w2j
339
339
  }
340
340
  }
341
341
  ),
342
- E && /* @__PURE__ */ i(
342
+ B && /* @__PURE__ */ i(
343
343
  C,
344
344
  {
345
345
  terms: [],
@@ -349,7 +349,7 @@ import '../../assets/MainNav.css';const kt = "_main_1w2jy_1", At = "_column_1w2j
349
349
  recentSearches: y,
350
350
  onClearRecentSearch: ot,
351
351
  activeOptionIndex: r,
352
- optionIdPrefix: u,
352
+ optionIdPrefix: _,
353
353
  onKeyDown: X,
354
354
  onSuggestionClick: (t) => {
355
355
  var m;
@@ -365,11 +365,11 @@ import '../../assets/MainNav.css';const kt = "_main_1w2jy_1", At = "_column_1w2j
365
365
  ] });
366
366
  });
367
367
  function v({
368
- href: H,
368
+ href: I,
369
369
  children: F,
370
370
  ...L
371
371
  }) {
372
- return /* @__PURE__ */ i(U, { href: H, className: e.siteLink, ...L, children: F });
372
+ return /* @__PURE__ */ i(H, { href: I, className: e.siteLink, ...L, children: F });
373
373
  }
374
374
  export {
375
375
  gt as MainNav
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@caseparts-org/caseblocks",
3
3
  "private": false,
4
- "version": "0.0.290",
4
+ "version": "0.0.292",
5
5
  "type": "module",
6
6
  "module": "dist/main.js",
7
7
  "types": "dist/main.d.ts",