@caseparts-org/caseblocks 0.0.175 → 0.0.177

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.
@@ -0,0 +1,6 @@
1
+ export { Markdown } from './atoms/Markdown/Markdown';
2
+ export type { MarkdownProps } from './atoms/Markdown/Markdown';
3
+ export { PreprocessedMarkdown } from './atoms/Markdown/PreprocessedMarkdown';
4
+ export type { PreprocessedMarkdownProps } from './atoms/Markdown/PreprocessedMarkdown';
5
+ export { usePreprocessedMarkdown } from './atoms/Markdown/usePreprocessedMarkdown';
6
+ export type { LinkTarget, ValidateToken } from './atoms/Markdown/usePreprocessedMarkdown';
@@ -0,0 +1,8 @@
1
+ import { Markdown as e } from "./atoms/Markdown/Markdown.js";
2
+ import { PreprocessedMarkdown as p } from "./atoms/Markdown/PreprocessedMarkdown.js";
3
+ import { usePreprocessedMarkdown as a } from "./atoms/Markdown/usePreprocessedMarkdown.js";
4
+ export {
5
+ e as Markdown,
6
+ p as PreprocessedMarkdown,
7
+ a as usePreprocessedMarkdown
8
+ };
@@ -3,12 +3,6 @@ export { HorizontalScroll } from './atoms/HorizontalScroll/HorizontalScroll';
3
3
  export type { HorizontalScrollProps } from './atoms/HorizontalScroll/HorizontalScroll';
4
4
  export { SlideInPanel } from './atoms/SlideInPanel/SlideInPanel';
5
5
  export type { SlideInPanelProps } from './atoms/SlideInPanel/SlideInPanel';
6
- export { Markdown } from './atoms/Markdown/Markdown';
7
- export type { MarkdownProps } from './atoms/Markdown/Markdown';
8
- export { PreprocessedMarkdown } from './atoms/Markdown/PreprocessedMarkdown';
9
- export type { PreprocessedMarkdownProps } from './atoms/Markdown/PreprocessedMarkdown';
10
- export { usePreprocessedMarkdown } from './atoms/Markdown/usePreprocessedMarkdown';
11
- export type { LinkTarget, ValidateToken } from './atoms/Markdown/usePreprocessedMarkdown';
12
6
  export { Tooltip } from './atoms/Tooltip/Tooltip';
13
7
  export { Popover } from './atoms/Popover/Popover';
14
8
  export type { PopoverProps } from './atoms/Popover/Popover';
@@ -1,18 +1,18 @@
1
1
  import { Button as e } from "./atoms/Button/Button.js";
2
- import { Flex as p } from "./atoms/Flex/Flex.js";
2
+ import { Flex as m } from "./atoms/Flex/Flex.js";
3
3
  import { Column as f, Grid as x } from "./atoms/Grid/Grid.js";
4
4
  import { Head as i } from "./atoms/Root/Head.js";
5
5
  import { Icon as l } from "./atoms/Icon/Icon.js";
6
6
  import { Root as u } from "./atoms/Root/Root.js";
7
- import { Separator as s } from "./atoms/Separator/Separator.js";
8
- import { Text as g } from "./atoms/Text/Text.js";
9
- import { Input as S } from "./atoms/Input/Input.js";
10
- import { ToggleSwitch as T } from "./atoms/ToggleSwitch/ToggleSwitch.js";
11
- import { Link as A } from "./atoms/Link/Link.js";
12
- import { linkClassName as B } from "./atoms/Link/linkClassName.js";
13
- import { configureLink as h, routerOverride as v } from "./atoms/Link/configureLink.js";
14
- import { LinkButton as b } from "./atoms/LinkButton/LinkButton.js";
15
- import { configureImage as F } from "./atoms/Image/configureImage.js";
7
+ import { Separator as C } from "./atoms/Separator/Separator.js";
8
+ import { Text as S } from "./atoms/Text/Text.js";
9
+ import { Input as T } from "./atoms/Input/Input.js";
10
+ import { ToggleSwitch as A } from "./atoms/ToggleSwitch/ToggleSwitch.js";
11
+ import { Link as P } from "./atoms/Link/Link.js";
12
+ import { linkClassName as h } from "./atoms/Link/linkClassName.js";
13
+ import { configureLink as L, routerOverride as w } from "./atoms/Link/configureLink.js";
14
+ import { LinkButton as y } from "./atoms/LinkButton/LinkButton.js";
15
+ import { configureImage as H } from "./atoms/Image/configureImage.js";
16
16
  import { getHideAtStyles as N } from "./atoms/HideAt.js";
17
17
  import { Logo as z } from "./molecules/Logo/Logo.js";
18
18
  import { SearchBox as E } from "./molecules/SearchBox/SearchBox.js";
@@ -23,88 +23,82 @@ import { Avatar as J } from "./molecules/Avatar/Avatar.js";
23
23
  import { BannerCard as U } from "./molecules/BannerCard/BannerCard.js";
24
24
  import { CardLink as X } from "./molecules/CardLink/CardLink.js";
25
25
  import { Breadcrumbs as _ } from "./molecules/Breadcrumbs/Breadcrumbs.js";
26
- import { Disclaimer as rr } from "./molecules/Disclaimer/Disclaimer.js";
27
- import { NotFound as er } from "./organisms/NotFound/NotFound.js";
28
- import { HorizontalScroll as pr } from "./atoms/HorizontalScroll/HorizontalScroll.js";
29
- import { SlideInPanel as fr } from "./atoms/SlideInPanel/SlideInPanel.js";
30
- import { Markdown as ar } from "./atoms/Markdown/Markdown.js";
31
- import { PreprocessedMarkdown as nr } from "./atoms/Markdown/PreprocessedMarkdown.js";
32
- import { usePreprocessedMarkdown as dr } from "./atoms/Markdown/usePreprocessedMarkdown.js";
33
- import { Tooltip as cr } from "./atoms/Tooltip/Tooltip.js";
34
- import { Popover as Cr } from "./atoms/Popover/Popover.js";
35
- import { Account as kr } from "./molecules/Account/Account.js";
36
- import { Chip as Pr } from "./molecules/Chip/Chip.js";
37
- import { ToggleView as wr } from "./molecules/ToggleView/ToggleView.js";
38
- import { CartPart as Ir } from "./molecules/Cart/CartPart.js";
39
- import { AddToCartPart as Mr } from "./molecules/AddToCartPart/AddToCartPart.js";
40
- import { CartSlideInPanel as vr } from "./molecules/Cart/CartSlideInPanel.js";
41
- import { StatefulButton as br } from "./molecules/StatefulButton/StatefulButton.js";
42
- import { AnimatedCheckMark as Fr } from "./molecules/StatefulButton/AnimatedCheckmark.js";
43
- import { AddToCart as Nr } from "./molecules/AddToCart/AddToCart.js";
44
- import { Modal as zr } from "./molecules/Modal/Modal.js";
45
- import { ImageViewer as Er } from "./molecules/ImageViewer/ImageViewer.js";
46
- import { T as Or } from "./Table-BX4PtCNE.js";
47
- import { Error as Rr } from "./molecules/Error/Error.js";
48
- import { MainNav as jr } from "./organisms/MainNav/MainNav.js";
49
- import { ChipSelector as Jr } from "./organisms/ChipSelector/ChipSelector.js";
50
- import { Product as Ur } from "./organisms/Product/Product.js";
51
- import { Carousel as Xr } from "./organisms/Carousel/Carousel.js";
52
- import { Footer as _r } from "./organisms/Footer/Footer.js";
53
- import { default as ro } from "./organisms/SpinZoomViewer/SpinZoomViewer.js";
26
+ import { Disclaimer as oo } from "./molecules/Disclaimer/Disclaimer.js";
27
+ import { NotFound as eo } from "./organisms/NotFound/NotFound.js";
28
+ import { HorizontalScroll as mo } from "./atoms/HorizontalScroll/HorizontalScroll.js";
29
+ import { SlideInPanel as fo } from "./atoms/SlideInPanel/SlideInPanel.js";
30
+ import { Tooltip as ao } from "./atoms/Tooltip/Tooltip.js";
31
+ import { Popover as no } from "./atoms/Popover/Popover.js";
32
+ import { Account as uo } from "./molecules/Account/Account.js";
33
+ import { Chip as Co } from "./molecules/Chip/Chip.js";
34
+ import { ToggleView as So } from "./molecules/ToggleView/ToggleView.js";
35
+ import { CartPart as To } from "./molecules/Cart/CartPart.js";
36
+ import { AddToCartPart as Ao } from "./molecules/AddToCartPart/AddToCartPart.js";
37
+ import { CartSlideInPanel as Po } from "./molecules/Cart/CartSlideInPanel.js";
38
+ import { StatefulButton as ho } from "./molecules/StatefulButton/StatefulButton.js";
39
+ import { AnimatedCheckMark as Lo } from "./molecules/StatefulButton/AnimatedCheckmark.js";
40
+ import { AddToCart as bo } from "./molecules/AddToCart/AddToCart.js";
41
+ import { Modal as Fo } from "./molecules/Modal/Modal.js";
42
+ import { ImageViewer as Mo } from "./molecules/ImageViewer/ImageViewer.js";
43
+ import { T as Vo } from "./Table-BX4PtCNE.js";
44
+ import { Error as Do } from "./molecules/Error/Error.js";
45
+ import { MainNav as Go } from "./organisms/MainNav/MainNav.js";
46
+ import { ChipSelector as Qo } from "./organisms/ChipSelector/ChipSelector.js";
47
+ import { Product as Zo } from "./organisms/Product/Product.js";
48
+ import { Carousel as qo } from "./organisms/Carousel/Carousel.js";
49
+ import { Footer as Ko } from "./organisms/Footer/Footer.js";
50
+ import { default as Wo } from "./organisms/SpinZoomViewer/SpinZoomViewer.js";
54
51
  export {
55
- kr as Account,
56
- Nr as AddToCart,
57
- Mr as AddToCartPart,
58
- Fr as AnimatedCheckMark,
52
+ uo as Account,
53
+ bo as AddToCart,
54
+ Ao as AddToCartPart,
55
+ Lo as AnimatedCheckMark,
59
56
  j as Availability,
60
57
  J as Avatar,
61
58
  U as BannerCard,
62
59
  _ as Breadcrumbs,
63
60
  e as Button,
64
61
  X as CardLink,
65
- Xr as Carousel,
66
- Ir as CartPart,
67
- vr as CartSlideInPanel,
68
- Pr as Chip,
69
- Jr as ChipSelector,
62
+ qo as Carousel,
63
+ To as CartPart,
64
+ Po as CartSlideInPanel,
65
+ Co as Chip,
66
+ Qo as ChipSelector,
70
67
  f as Column,
71
- rr as Disclaimer,
72
- Rr as Error,
73
- p as Flex,
74
- _r as Footer,
68
+ oo as Disclaimer,
69
+ Do as Error,
70
+ m as Flex,
71
+ Ko as Footer,
75
72
  x as Grid,
76
73
  i as Head,
77
- pr as HorizontalScroll,
74
+ mo as HorizontalScroll,
78
75
  l as Icon,
79
- Er as ImageViewer,
80
- S as Input,
81
- A as Link,
82
- b as LinkButton,
76
+ Mo as ImageViewer,
77
+ T as Input,
78
+ P as Link,
79
+ y as LinkButton,
83
80
  z as Logo,
84
- jr as MainNav,
85
- ar as Markdown,
86
- zr as Modal,
87
- er as NotFound,
88
- Cr as Popover,
89
- nr as PreprocessedMarkdown,
81
+ Go as MainNav,
82
+ Fo as Modal,
83
+ eo as NotFound,
84
+ no as Popover,
90
85
  R as Pricing,
91
- Ur as Product,
86
+ Zo as Product,
92
87
  O as QuantityInput,
93
88
  u as Root,
94
89
  E as SearchBox,
95
- s as Separator,
96
- fr as SlideInPanel,
97
- ro as SpinZoomViewer,
98
- br as StatefulButton,
99
- Or as Table,
100
- g as Text,
101
- T as ToggleSwitch,
102
- wr as ToggleView,
103
- cr as Tooltip,
104
- F as configureImage,
105
- h as configureLink,
90
+ C as Separator,
91
+ fo as SlideInPanel,
92
+ Wo as SpinZoomViewer,
93
+ ho as StatefulButton,
94
+ Vo as Table,
95
+ S as Text,
96
+ A as ToggleSwitch,
97
+ So as ToggleView,
98
+ ao as Tooltip,
99
+ H as configureImage,
100
+ L as configureLink,
106
101
  N as getHideAtStyles,
107
- B as linkClassName,
108
- v as routerOverride,
109
- dr as usePreprocessedMarkdown
102
+ h as linkClassName,
103
+ w as routerOverride
110
104
  };
@@ -7,7 +7,10 @@ export interface CategoryWithChildren extends Category {
7
7
  children: Category[];
8
8
  showChevron?: boolean;
9
9
  }
10
- export declare function CategoryNav({ categories, isCategoriesLoading, }: {
10
+ interface CategoryNavProps {
11
11
  categories?: CategoryWithChildren[];
12
12
  isCategoriesLoading?: boolean;
13
- }): import("react/jsx-runtime").JSX.Element | null;
13
+ onCategoryClick?: (_category: Category) => void;
14
+ }
15
+ export declare function CategoryNav({ categories, isCategoriesLoading, onCategoryClick, }: CategoryNavProps): import("react/jsx-runtime").JSX.Element | null;
16
+ export {};
@@ -1,31 +1,32 @@
1
- import { jsx as e, jsxs as n } from "react/jsx-runtime";
2
- import { c } from "../../clsx-OuTLNxxd.js";
3
- import { Text as t } from "../../atoms/Text/Text.js";
4
- import { Link as s } from "../../atoms/Link/Link.js";
5
- import { Icon as m } from "../../atoms/Icon/Icon.js";
6
- import { getHideAtStyles as d } from "../../atoms/HideAt.js";
7
- import { Tooltip as h } from "../../atoms/Tooltip/Tooltip.js";
8
- import '../../assets/CategoryNav.css';const p = "_categories_19tew_1", u = "_placeholder_19tew_17", f = "_category_19tew_25", b = "_submenuTooltip_19tew_51", i = {
9
- categories: p,
10
- placeholder: u,
11
- category: f,
12
- submenuTooltip: b
1
+ import { jsx as e, jsxs as o } from "react/jsx-runtime";
2
+ import { c as p } from "../../clsx-OuTLNxxd.js";
3
+ import { Text as m } from "../../atoms/Text/Text.js";
4
+ import { Link as t } from "../../atoms/Link/Link.js";
5
+ import { Icon as d } from "../../atoms/Icon/Icon.js";
6
+ import { getHideAtStyles as u } from "../../atoms/HideAt.js";
7
+ import { Tooltip as f } from "../../atoms/Tooltip/Tooltip.js";
8
+ import '../../assets/CategoryNav.css';const c = "_categories_19tew_1", a = "_placeholder_19tew_17", b = "_category_19tew_25", _ = "_submenuTooltip_19tew_51", i = {
9
+ categories: c,
10
+ placeholder: a,
11
+ category: b,
12
+ submenuTooltip: _
13
13
  };
14
- function v({
15
- categories: o,
16
- isCategoriesLoading: a
14
+ function D({
15
+ categories: n,
16
+ isCategoriesLoading: h,
17
+ onCategoryClick: s
17
18
  }) {
18
- return a ? /* @__PURE__ */ e("div", { className: i.placeholder }) : !o || o.length === 0 ? null : /* @__PURE__ */ e("ul", { className: c(i.categories, d(["sm"])), children: o.map(
19
+ return h ? /* @__PURE__ */ e("div", { className: i.placeholder }) : !n || n.length === 0 ? null : /* @__PURE__ */ e("ul", { className: p(i.categories, u(["sm"])), children: n.map(
19
20
  (l) => l.children.length > 0 ? /* @__PURE__ */ e(
20
- h,
21
+ f,
21
22
  {
22
23
  openDelay: 180,
23
24
  closeDelay: 0,
24
25
  tooltipOffset: 0,
25
- trigger: /* @__PURE__ */ e("li", { className: i.category, tabIndex: 0, children: /* @__PURE__ */ n(s, { href: l.route, children: [
26
- /* @__PURE__ */ e(t, { size: "sm", weight: "semibold", children: l.label }),
26
+ trigger: /* @__PURE__ */ e("li", { className: i.category, tabIndex: 0, children: /* @__PURE__ */ o(t, { href: l.route, onClick: () => s == null ? void 0 : s(l), children: [
27
+ /* @__PURE__ */ e(m, { size: "sm", weight: "semibold", children: l.label }),
27
28
  l.showChevron && /* @__PURE__ */ e(
28
- m,
29
+ d,
29
30
  {
30
31
  iconKey: "fa-regular fa-angle-down",
31
32
  title: "Expand",
@@ -34,13 +35,13 @@ function v({
34
35
  )
35
36
  ] }) }),
36
37
  position: "bottom center",
37
- children: /* @__PURE__ */ e("ul", { className: i.submenuTooltip, children: l.children.map((r) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(s, { href: r.route, children: /* @__PURE__ */ e(t, { size: "sm", weight: "semibold", children: r.label }) }) }, r.id)) })
38
+ children: /* @__PURE__ */ e("ul", { className: i.submenuTooltip, children: l.children.map((r) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(t, { href: r.route, onClick: () => s == null ? void 0 : s(r), children: /* @__PURE__ */ e(m, { size: "sm", weight: "semibold", children: r.label }) }) }, r.id)) })
38
39
  },
39
40
  l.id
40
- ) : /* @__PURE__ */ e("li", { className: i.category, children: /* @__PURE__ */ n(s, { href: l.route, children: [
41
- /* @__PURE__ */ e(t, { size: "sm", weight: "semibold", children: l.label }),
41
+ ) : /* @__PURE__ */ e("li", { className: i.category, children: /* @__PURE__ */ o(t, { href: l.route, onClick: () => s == null ? void 0 : s(l), children: [
42
+ /* @__PURE__ */ e(m, { size: "sm", weight: "semibold", children: l.label }),
42
43
  l.showChevron && /* @__PURE__ */ e(
43
- m,
44
+ d,
44
45
  {
45
46
  iconKey: "fa-regular fa-angle-down",
46
47
  title: "Expand",
@@ -51,5 +52,5 @@ function v({
51
52
  ) });
52
53
  }
53
54
  export {
54
- v as CategoryNav
55
+ D as CategoryNav
55
56
  };
@@ -12,6 +12,7 @@ export interface MainNavProps extends CartPropsBase, React.HTMLAttributes<HTMLDi
12
12
  cart: ShoppingCart;
13
13
  onLoginClick: () => void;
14
14
  onSearch: (_input: string) => void;
15
+ onCategoryClick?: (_category: CategoryWithChildren | CategoryWithChildren["children"][number]) => void;
15
16
  onClickModelSerial: () => void;
16
17
  /** Content shown in the account popover when authenticated */
17
18
  accountPopoverContent?: React.ReactNode;
@@ -1,123 +1,124 @@
1
1
  import { jsx as e, jsxs as r } from "react/jsx-runtime";
2
- import D from "react";
2
+ import S from "react";
3
3
  import { Text as l } from "../../atoms/Text/Text.js";
4
- import { Link as h } from "../../atoms/Link/Link.js";
5
- import { Icon as n } from "../../atoms/Icon/Icon.js";
6
- import { Flex as s } from "../../atoms/Flex/Flex.js";
7
- import { Grid as M, Column as S } from "../../atoms/Grid/Grid.js";
8
- import { Logo as U } from "../../molecules/Logo/Logo.js";
9
- import { SearchBox as N } from "../../molecules/SearchBox/SearchBox.js";
10
- import { HamburgerMenu as F } from "../../molecules/HamburgerMenu/HamburgerMenu.js";
11
- import { ShoppingCart as H } from "../../molecules/Cart/Cart.js";
12
- import { Account as q } from "../../molecules/Account/Account.js";
13
- import { CategoryNav as B } from "../../molecules/CategoryNav/CategoryNav.js";
4
+ import { Link as d } from "../../atoms/Link/Link.js";
5
+ import { Icon as s } from "../../atoms/Icon/Icon.js";
6
+ import { Flex as a } from "../../atoms/Flex/Flex.js";
7
+ import { Grid as U, Column as C } from "../../atoms/Grid/Grid.js";
8
+ import { Logo as F } from "../../molecules/Logo/Logo.js";
9
+ import { SearchBox as b } from "../../molecules/SearchBox/SearchBox.js";
10
+ import { HamburgerMenu as H } from "../../molecules/HamburgerMenu/HamburgerMenu.js";
11
+ import { ShoppingCart as q } from "../../molecules/Cart/Cart.js";
12
+ import { Account as B } from "../../molecules/Account/Account.js";
13
+ import { CategoryNav as G } from "../../molecules/CategoryNav/CategoryNav.js";
14
14
  import { getHideAtStyles as g } from "../../atoms/HideAt.js";
15
- import { c as m } from "../../clsx-OuTLNxxd.js";
16
- import '../../assets/MainNav.css';const G = "_main_t25b8_1", P = "_column_t25b8_8", Q = "_topNav_t25b8_13", T = "_logo_t25b8_21", W = "_operations_t25b8_24", E = "_search_t25b8_31", J = "_siteLink_t25b8_34", O = "_accountArea_t25b8_54", R = "_category_t25b8_66", V = "_menuList_t25b8_91", i = {
17
- main: G,
18
- column: P,
19
- topNav: Q,
20
- logo: T,
21
- operations: W,
22
- search: E,
23
- siteLink: J,
24
- accountArea: O,
25
- category: R,
26
- menuList: V
27
- }, he = D.forwardRef(function({
28
- account: a,
29
- categories: o,
30
- homeRoute: b,
31
- faqRoute: v,
32
- customPartsRoute: f,
33
- aboutUsRoute: y,
34
- contactRoute: u,
35
- cart: L,
36
- open: A,
15
+ import { c as h } from "../../clsx-OuTLNxxd.js";
16
+ import '../../assets/MainNav.css';const P = "_main_t25b8_1", Q = "_column_t25b8_8", T = "_topNav_t25b8_13", W = "_logo_t25b8_21", E = "_operations_t25b8_24", J = "_search_t25b8_31", O = "_siteLink_t25b8_34", R = "_accountArea_t25b8_54", V = "_category_t25b8_66", X = "_menuList_t25b8_91", i = {
17
+ main: P,
18
+ column: Q,
19
+ topNav: T,
20
+ logo: W,
21
+ operations: E,
22
+ search: J,
23
+ siteLink: O,
24
+ accountArea: R,
25
+ category: V,
26
+ menuList: X
27
+ }, de = S.forwardRef(function({
28
+ account: m,
29
+ categories: t,
30
+ homeRoute: v,
31
+ faqRoute: L,
32
+ customPartsRoute: u,
33
+ aboutUsRoute: A,
34
+ contactRoute: p,
35
+ cart: x,
36
+ open: w,
37
37
  // consume external panel control props from CartPropsBase
38
- className: x,
39
- onLoginClick: C,
40
- onSearch: p,
41
- onClickModelSerial: _,
42
- onCartClick: k,
43
- accountPopoverContent: w,
44
- isAccountLoading: z,
45
- isCategoriesLoading: I,
46
- ...K
47
- }, j) {
48
- return /* @__PURE__ */ e(M, { ...K, gridWrapperClassName: m(i.main, x), children: /* @__PURE__ */ r(S, { span: 12, className: i.column, children: [
38
+ className: y,
39
+ onLoginClick: z,
40
+ onSearch: _,
41
+ onCategoryClick: o,
42
+ onClickModelSerial: N,
43
+ onCartClick: I,
44
+ accountPopoverContent: k,
45
+ isAccountLoading: K,
46
+ isCategoriesLoading: j,
47
+ ...D
48
+ }, M) {
49
+ return /* @__PURE__ */ e(U, { ...D, gridWrapperClassName: h(i.main, y), children: /* @__PURE__ */ r(C, { span: 12, className: i.column, children: [
49
50
  /* @__PURE__ */ r(
50
- s,
51
+ a,
51
52
  {
52
53
  flexDirection: "row",
53
54
  alignItems: "center",
54
55
  justifyContent: "space-between",
55
56
  className: i.topNav,
56
57
  children: [
57
- /* @__PURE__ */ e("div", { className: i.logo, children: /* @__PURE__ */ e(h, { href: b, children: /* @__PURE__ */ e(U, {}) }) }),
58
+ /* @__PURE__ */ e("div", { className: i.logo, children: /* @__PURE__ */ e(d, { href: v, children: /* @__PURE__ */ e(F, {}) }) }),
58
59
  /* @__PURE__ */ r(
59
- s,
60
+ a,
60
61
  {
61
62
  flexDirection: "row",
62
63
  alignItems: "center",
63
64
  justifyContent: "flex-end",
64
65
  className: i.operations,
65
66
  children: [
66
- /* @__PURE__ */ e(s, { flexDirection: "row", hideAt: ["sm"], className: i.search, children: /* @__PURE__ */ e(N, { onSearch: p, inputName: "cpc-search" }) }),
67
- /* @__PURE__ */ e("button", { onClick: _, className: m(i.siteLink, g(["sm", "md"])), children: "Model/Serial" }),
68
- /* @__PURE__ */ e(t, { href: f, hideAt: ["sm", "md"], children: "Custom Parts" }),
69
- /* @__PURE__ */ e(t, { href: u, hideAt: ["sm", "md"], children: "Contact Us" }),
67
+ /* @__PURE__ */ e(a, { flexDirection: "row", hideAt: ["sm"], className: i.search, children: /* @__PURE__ */ e(b, { onSearch: _, inputName: "cpc-search" }) }),
68
+ /* @__PURE__ */ e("button", { onClick: N, className: h(i.siteLink, g(["sm", "md"])), children: "Model/Serial" }),
69
+ /* @__PURE__ */ e(n, { href: u, hideAt: ["sm", "md"], children: "Custom Parts" }),
70
+ /* @__PURE__ */ e(n, { href: p, hideAt: ["sm", "md"], children: "Contact Us" }),
70
71
  /* @__PURE__ */ e("div", { className: i.accountArea, children: /* @__PURE__ */ e(
71
- q,
72
+ B,
72
73
  {
73
- account: a,
74
- onLoginClick: C,
74
+ account: m,
75
+ onLoginClick: z,
75
76
  className: i.avatar,
76
- popoverContent: w,
77
- isAccountLoading: z
77
+ popoverContent: k,
78
+ isAccountLoading: K
78
79
  }
79
80
  ) }),
80
81
  /* @__PURE__ */ e(
81
- H,
82
+ q,
82
83
  {
83
- ref: j,
84
- cart: L,
85
- open: A,
86
- onCartClick: k
84
+ ref: M,
85
+ cart: x,
86
+ open: w,
87
+ onCartClick: I
87
88
  }
88
89
  ),
89
- /* @__PURE__ */ r(F, { hideAt: ["lg"], children: [
90
+ /* @__PURE__ */ r(H, { hideAt: ["lg"], children: [
90
91
  /* @__PURE__ */ r("section", { children: [
91
92
  /* @__PURE__ */ e(l, { size: "md", weight: "semibold", children: "Useful shortcuts" }),
92
93
  /* @__PURE__ */ r("ul", { className: i.menuList, children: [
93
94
  /* @__PURE__ */ r("li", { className: i.menuItem, children: [
94
- /* @__PURE__ */ e(n, { iconKey: "fa-regular fa-book", size: "sm" }),
95
- /* @__PURE__ */ e("button", { onClick: _, className: m(i.siteLink, g(["lg"])), children: "Model/Serial" })
95
+ /* @__PURE__ */ e(s, { iconKey: "fa-regular fa-book", size: "sm" }),
96
+ /* @__PURE__ */ e("button", { onClick: N, className: h(i.siteLink, g(["lg"])), children: "Model/Serial" })
96
97
  ] }),
97
98
  /* @__PURE__ */ r("li", { className: i.menuItem, children: [
98
- /* @__PURE__ */ e(n, { iconKey: "fa-regular fa-screwdriver-wrench", size: "sm" }),
99
- /* @__PURE__ */ e(t, { href: f, children: "Custom Parts" })
99
+ /* @__PURE__ */ e(s, { iconKey: "fa-regular fa-screwdriver-wrench", size: "sm" }),
100
+ /* @__PURE__ */ e(n, { href: u, children: "Custom Parts" })
100
101
  ] }),
101
102
  /* @__PURE__ */ r("li", { className: i.menuItem, children: [
102
- /* @__PURE__ */ e(n, { iconKey: "fa-regular fa-envelope", size: "sm" }),
103
- /* @__PURE__ */ e(t, { href: u, children: "Contact Us" })
103
+ /* @__PURE__ */ e(s, { iconKey: "fa-regular fa-envelope", size: "sm" }),
104
+ /* @__PURE__ */ e(n, { href: p, children: "Contact Us" })
104
105
  ] }),
105
106
  /* @__PURE__ */ r("li", { className: i.menuItem, children: [
106
- /* @__PURE__ */ e(n, { iconKey: "fa-solid fa-question", size: "sm" }),
107
- /* @__PURE__ */ e(t, { href: v, children: "FAQ" })
107
+ /* @__PURE__ */ e(s, { iconKey: "fa-solid fa-question", size: "sm" }),
108
+ /* @__PURE__ */ e(n, { href: L, children: "FAQ" })
108
109
  ] }),
109
110
  /* @__PURE__ */ r("li", { className: i.menuItem, children: [
110
- /* @__PURE__ */ e(n, { iconKey: "fa-regular fa-people-group", size: "sm" }),
111
- /* @__PURE__ */ e(t, { href: y, children: "About Us" })
111
+ /* @__PURE__ */ e(s, { iconKey: "fa-regular fa-people-group", size: "sm" }),
112
+ /* @__PURE__ */ e(n, { href: A, children: "About Us" })
112
113
  ] })
113
114
  ] })
114
115
  ] }),
115
116
  /* @__PURE__ */ r("section", { children: [
116
117
  /* @__PURE__ */ e(l, { size: "md", weight: "semibold", children: "Shop by category" }),
117
- /* @__PURE__ */ e("ul", { className: i.menuList, children: o && o.map((c) => /* @__PURE__ */ e("li", { className: i.category, children: /* @__PURE__ */ r(h, { href: c.route, children: [
118
+ /* @__PURE__ */ e("ul", { className: i.menuList, children: t && t.map((c) => /* @__PURE__ */ e("li", { className: i.category, children: /* @__PURE__ */ r(d, { href: c.route, onClick: () => o == null ? void 0 : o(c), children: [
118
119
  /* @__PURE__ */ e(l, { size: "sm", children: c.label }),
119
120
  /* @__PURE__ */ e(
120
- n,
121
+ s,
121
122
  {
122
123
  iconKey: "fa-solid fa-chevron-right",
123
124
  title: "Navigate",
@@ -133,17 +134,24 @@ import '../../assets/MainNav.css';const G = "_main_t25b8_1", P = "_column_t25b8_
133
134
  ]
134
135
  }
135
136
  ),
136
- /* @__PURE__ */ e(s, { flexDirection: "row", hideAt: ["md", "lg"], children: /* @__PURE__ */ e(N, { onSearch: p, inputName: "cpc-search", className: i.search }) }),
137
- /* @__PURE__ */ e(B, { categories: o, isCategoriesLoading: I })
137
+ /* @__PURE__ */ e(a, { flexDirection: "row", hideAt: ["md", "lg"], children: /* @__PURE__ */ e(b, { onSearch: _, inputName: "cpc-search", className: i.search }) }),
138
+ /* @__PURE__ */ e(
139
+ G,
140
+ {
141
+ categories: t,
142
+ isCategoriesLoading: j,
143
+ onCategoryClick: o
144
+ }
145
+ )
138
146
  ] }) });
139
147
  });
140
- function t({
141
- href: d,
142
- children: a,
143
- ...o
148
+ function n({
149
+ href: f,
150
+ children: m,
151
+ ...t
144
152
  }) {
145
- return /* @__PURE__ */ e(h, { href: d, className: i.siteLink, ...o, children: a });
153
+ return /* @__PURE__ */ e(d, { href: f, className: i.siteLink, ...t, children: m });
146
154
  }
147
155
  export {
148
- he as MainNav
156
+ de as MainNav
149
157
  };
@@ -1,11 +1,11 @@
1
1
  import { jsxs as b, Fragment as g, jsx as t } from "react/jsx-runtime";
2
- import { useState as h } from "react";
2
+ import { useState as y } from "react";
3
3
  import { MainNav as m } from "./MainNav.js";
4
4
  import { Text as s } from "../../atoms/Text/Text.js";
5
5
  import { Link as u } from "../../atoms/Link/Link.js";
6
- import { Button as p } from "../../atoms/Button/Button.js";
7
- import { CartSlideInPanel as v } from "../../molecules/Cart/CartSlideInPanel.js";
8
- const U = {
6
+ import { Button as h } from "../../atoms/Button/Button.js";
7
+ import { CartSlideInPanel as p } from "../../molecules/Cart/CartSlideInPanel.js";
8
+ const q = {
9
9
  title: "Case Parts/Organisms/MainNav",
10
10
  component: m,
11
11
  parameters: {
@@ -122,7 +122,7 @@ const U = {
122
122
  { id: 12, itemId: "1092-02", description: "Kason Door Closer - Offset", price: "$99.99", quantity: 1, imageUrl: a, availability: "In Stock", availabilityId: "available" }
123
123
  ]
124
124
  };
125
- function y(e) {
125
+ function v(e) {
126
126
  return `$${e.items.reduce(
127
127
  (i, o) => i + (parseFloat(o.price.replace(/[^0-9.]/g, "")) || 0) * o.quantity,
128
128
  0
@@ -133,9 +133,9 @@ const d = /* @__PURE__ */ b("div", { style: { display: "flex", flexDirection: "c
133
133
  /* @__PURE__ */ t(s, { size: "xs", children: "Signed in as Ringo" }),
134
134
  /* @__PURE__ */ t(u, { href: "/account", "data-popover-close": "true", children: "View Account" }),
135
135
  /* @__PURE__ */ t(u, { href: "/orders", "data-popover-close": "true", children: "Order History" }),
136
- /* @__PURE__ */ t(p, { size: "sm", variant: "secondary", "data-popover-close": "true", onClick: () => alert("Sign out"), children: "Sign Out" })
136
+ /* @__PURE__ */ t(h, { size: "sm", variant: "secondary", "data-popover-close": "true", onClick: () => alert("Sign out"), children: "Sign Out" })
137
137
  ] }), n = (e) => {
138
- const [c, i] = h(!1);
138
+ const [c, i] = y(!1);
139
139
  return /* @__PURE__ */ b(g, { children: [
140
140
  /* @__PURE__ */ t(
141
141
  m,
@@ -146,12 +146,12 @@ const d = /* @__PURE__ */ b("div", { style: { display: "flex", flexDirection: "c
146
146
  }
147
147
  ),
148
148
  /* @__PURE__ */ t(
149
- v,
149
+ p,
150
150
  {
151
151
  open: c,
152
152
  onClose: () => i(!1),
153
153
  cart: e.cart,
154
- subtotal: y(e.cart),
154
+ subtotal: v(e.cart),
155
155
  itemPriceLabel: "List Price",
156
156
  contactHref: e.contactRoute,
157
157
  contactLinkBehavior: "new-tab",
@@ -161,7 +161,7 @@ const d = /* @__PURE__ */ b("div", { style: { display: "flex", flexDirection: "c
161
161
  }
162
162
  )
163
163
  ] });
164
- }, $ = {
164
+ }, U = {
165
165
  args: {
166
166
  account: { name: "Ringo", initials: "RS", number: "123456789012" },
167
167
  cart: r,
@@ -179,6 +179,9 @@ const d = /* @__PURE__ */ b("div", { style: { display: "flex", flexDirection: "c
179
179
  onSearch: (e) => {
180
180
  alert(`Search ${e}`);
181
181
  },
182
+ onCategoryClick: (e) => {
183
+ alert(`Category ${e.label}`);
184
+ },
182
185
  onCartClick: () => {
183
186
  },
184
187
  // placeholder required by component
@@ -204,6 +207,9 @@ const d = /* @__PURE__ */ b("div", { style: { display: "flex", flexDirection: "c
204
207
  onSearch: (e) => {
205
208
  alert(`Search ${e}`);
206
209
  },
210
+ onCategoryClick: (e) => {
211
+ alert(`Category ${e.label}`);
212
+ },
207
213
  onCartClick: () => {
208
214
  },
209
215
  categories: l,
@@ -227,6 +233,9 @@ const d = /* @__PURE__ */ b("div", { style: { display: "flex", flexDirection: "c
227
233
  onSearch: (e) => {
228
234
  alert(`Search ${e}`);
229
235
  },
236
+ onCategoryClick: (e) => {
237
+ alert(`Category ${e.label}`);
238
+ },
230
239
  onCartClick: () => {
231
240
  },
232
241
  categories: l
@@ -250,6 +259,9 @@ const d = /* @__PURE__ */ b("div", { style: { display: "flex", flexDirection: "c
250
259
  onSearch: (e) => {
251
260
  alert(`Search ${e}`);
252
261
  },
262
+ onCategoryClick: (e) => {
263
+ alert(`Category ${e.label}`);
264
+ },
253
265
  onCartClick: () => {
254
266
  },
255
267
  categories: l,
@@ -260,9 +272,9 @@ const d = /* @__PURE__ */ b("div", { style: { display: "flex", flexDirection: "c
260
272
  render: n
261
273
  };
262
274
  export {
263
- $ as Authenticated,
275
+ U as Authenticated,
264
276
  M as Loading,
265
277
  L as Unauthenticated,
266
278
  D as WithCartItems,
267
- U as default
279
+ q as default
268
280
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@caseparts-org/caseblocks",
3
3
  "private": false,
4
- "version": "0.0.175",
4
+ "version": "0.0.177",
5
5
  "type": "module",
6
6
  "module": "dist/main.js",
7
7
  "types": "dist/main.d.ts",
@@ -17,6 +17,10 @@
17
17
  "import": "./dist/main-client.js",
18
18
  "types": "./dist/main-client.d.ts"
19
19
  },
20
+ "./browser": {
21
+ "import": "./dist/main-browser.js",
22
+ "types": "./dist/main-browser.d.ts"
23
+ },
20
24
  "./styles/*": {
21
25
  "default": "./dist/styles/*"
22
26
  }