@caseparts-org/caseblocks 0.0.19 → 0.0.21

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
- ._cart_jjkwa_1{position:relative;border:none;padding:0;margin:0;background-color:transparent}._count_jjkwa_8{position:absolute;top:4px;left:17px;border-radius:50%;width:18px;height:18px;display:flex;flex-direction:row;align-items:center;justify-content:center;background-color:var(--color-brand-primary-primary-tangerine);color:var(--color-neutrals-neutral-1);font-weight:var(--font-weight-semibold)}
1
+ ._cart_15bzn_1{position:relative;border:none;padding:0;margin:0;background-color:transparent}._count_15bzn_8{position:absolute;top:4px;left:17px;border-radius:50%;width:18px;height:18px;display:flex;flex-direction:row;align-items:center;justify-content:center;background-color:var(--color-brand-primary-primary-tangerine);color:var(--color-neutrals-neutral-1);font-weight:var(--font-weight-semibold)}._cartContainer_15bzn_23{height:calc(100vh - 120px);width:375px;box-sizing:border-box;display:grid;grid-template-rows:auto 1fr auto;gap:var(--spacing-1)}._cartItems_15bzn_32{height:100%;overflow-y:auto;overflow-x:hidden}._cartItems_15bzn_32 ul{margin:0;padding:0}._cartItems_15bzn_32 li{list-style:none;margin:0;padding:var(--spacing-0-25);width:100%;display:flex;flex-direction:row;align-items:center}._cartItems_15bzn_32 li p{margin:0;padding:0}._cartItems_15bzn_32 img{height:40px;width:40px}._noItems_15bzn_58{display:flex;flex-direction:row;align-items:center;justify-content:center;height:100%}
@@ -1 +1 @@
1
- ._button_8serw_1{box-sizing:border-box;cursor:pointer;width:var(--spacing-2-5);height:var(--spacing-2-5);padding:var(--spacing-0-5);border-width:0;border-radius:0px var(--spacing-0-125) var(--spacing-0-125) 0px;display:flex;flex-direction:row;align-items:center;justify-content:center;background-color:inherit;color:var(--icons-icon-search)}._text_8serw_16{flex:1;position:relative;border:none;border-radius:40px;outline:none;font-family:var(--font-family-body);font-weight:var(--font-weight-light);font-size:var(--font-size-sm);line-height:var(--line-height-sm);background:var(--surface-surface-searchBar, #f6f6f6);color:var(--text-text-search-bar)}._text_8serw_16::placeholder{font-style:italic}._input_8serw_32{flex:1;padding:0px 0px 0px var(--spacing-0-25)}._inputSearch_8serw_36{flex:1;border-radius:var(--spacing-0-125)}._searchfield_8serw_40{flex:1;height:var(--spacing-2-5);border-radius:var(--spacing-2-5);overflow:hidden;background-color:var(--surface-surface-search-bar)}._searchBox_8serw_47{flex:1;width:100%;min-width:250px;height:var(--spacing-2-5);position:relative;border-radius:var(--spacing-2-5);overflow:hidden;text-align:left;background-color:var(--surface-surface-search-bar)}
1
+ ._button_1izj4_1{box-sizing:border-box;cursor:pointer;width:var(--spacing-2-5);height:var(--spacing-2-5);padding:var(--spacing-0-5);border-width:0;border-radius:0px var(--spacing-0-125) var(--spacing-0-125) 0px;display:flex;flex-direction:row;align-items:center;justify-content:center;background-color:inherit;color:var(--icons-icon-search)}._text_1izj4_16{flex:1;position:relative;border:none;border-radius:40px;outline:none;font-family:var(--font-family-body);font-size:var(--font-size-sm);line-height:var(--line-height-sm);background:var(--surface-surface-searchBar, #f6f6f6)}._text_1izj4_16::placeholder{font-style:italic;font-weight:var(--font-weight-light);color:var(--text-text-search-bar)}._input_1izj4_32{flex:1;padding:0px var(--spacing-0-5) 0px var(--spacing-0-5);box-sizing:border-box}._inputSearch_1izj4_37{flex:1;border-radius:var(--spacing-0-125)}._searchfield_1izj4_41{flex:1;height:var(--spacing-2-5);border-radius:var(--spacing-2-5);overflow:hidden;background-color:var(--surface-surface-search-bar)}._searchBox_1izj4_48{flex:1;width:100%;min-width:250px;height:var(--spacing-2-5);position:relative;border-radius:var(--spacing-2-5);overflow:hidden;text-align:left;background-color:var(--surface-surface-search-bar)}
@@ -1 +1 @@
1
- ._tooltip_mtsuw_1{box-shadow:8px 8px 12px #00000026;background-color:var(--color-neutrals-neutral-1)}._content_mtsuw_5{padding:var(--spacing-1)}.popup-content{margin:auto;background:#fff;width:50%;padding:5px;border:1px solid #d7d7d7}[role=tooltip].popup-content{width:200px;box-shadow:0 0 3px #00000029;border-radius:5px}.popup-overlay{background:#00000080}[data-popup=tooltip].popup-overlay{background:transparent}.popup-arrow{-webkit-filter:drop-shadow(0 -3px 3px rgba(0,0,0,.16));filter:drop-shadow(0 -3px 3px rgba(0,0,0,.16));color:#fff;stroke-width:2px;stroke:#d7d7d7;stroke-dasharray:30px;stroke-dashoffset:-54px;left:0;right:0;top:0;bottom:0}
1
+ ._content_lgc5i_1{box-shadow:8px 8px 12px #00000026;background-color:#fff;padding:var(--spacing-1);box-sizing:border-box;width:max-content;border:1px solid var(--color-neutrals-neutral-1);border-radius:4px;z-index:9999}
package/dist/main.d.ts CHANGED
@@ -27,5 +27,6 @@ export type { SearchBoxProps } from './molecules/SearchBox/SearchBox';
27
27
  export { ToggleView } from './molecules/ToggleView/ToggleView';
28
28
  export type { ToggleViewProps, ToggleOptionProps, ToggleOptionBaseProps, } from './molecules/ToggleView/ToggleView';
29
29
  export { MainNav } from './organisms/MainNav/MainNav';
30
+ export type { MainCategory, Category } from './organisms/MainNav/MainNav';
30
31
  export { ChipSelector } from './organisms/ChipSelector/ChipSelector';
31
32
  export type { ChipSelectorProps } from './organisms/ChipSelector/ChipSelector';
@@ -1,7 +1,24 @@
1
1
  import { default as React } from 'react';
2
- interface cartProps extends React.HtmlHTMLAttributes<HTMLButtonElement> {
3
- onClick: () => void;
4
- cartItemCount: number;
2
+ export interface CartItem {
3
+ id: string | number;
4
+ itemId: string | undefined;
5
+ description: string | undefined;
6
+ price: number;
7
+ quantity: number;
8
+ availability: string;
9
+ imageUrl: string | undefined;
5
10
  }
6
- export declare function Cart({ onClick, cartItemCount, ...otherProps }: cartProps): import("react/jsx-runtime").JSX.Element;
11
+ export interface ShoppingCart {
12
+ items: CartItem[];
13
+ }
14
+ export interface CartPropsBase {
15
+ onItemQtyChange: (_item: CartItem, _newQuantity: number) => void;
16
+ onItemDelete: (_item: CartItem) => void;
17
+ onItemEdit: (_item: CartItem) => void;
18
+ onCheckout: () => void;
19
+ cart: ShoppingCart;
20
+ }
21
+ interface CartProps extends CartPropsBase, React.HtmlHTMLAttributes<HTMLButtonElement> {
22
+ }
23
+ export declare function ShoppingCart({ cart, onItemQtyChange, onItemDelete, onItemEdit, onCheckout, ...otherProps }: CartProps): import("react/jsx-runtime").JSX.Element;
7
24
  export {};
@@ -1,23 +1,59 @@
1
- import { jsxs as s, jsx as t } from "react/jsx-runtime";
2
- import { Icon as i } from "../../atoms/Icon/Icon.js";
3
- import { Text as a } from "../../atoms/Text/Text.js";
4
- import '../../assets/Cart.css';const e = "_cart_jjkwa_1", p = "_count_jjkwa_8", o = {
5
- cart: e,
6
- count: p
1
+ import { jsx as t, jsxs as i } from "react/jsx-runtime";
2
+ import { Icon as m } from "../../atoms/Icon/Icon.js";
3
+ import { Text as n } from "../../atoms/Text/Text.js";
4
+ import { Button as a } from "../../atoms/Button/Button.js";
5
+ import { Tooltip as l } from "../Tooltip/Tooltip.js";
6
+ import '../../assets/Cart.css';const d = "_cart_15bzn_1", h = "_count_15bzn_8", p = "_cartContainer_15bzn_23", g = "_cartItems_15bzn_32", _ = "_noItems_15bzn_58", s = {
7
+ cart: d,
8
+ count: h,
9
+ cartContainer: p,
10
+ cartItems: g,
11
+ noItems: _
7
12
  };
8
- function j({ onClick: r, cartItemCount: c, ...n }) {
9
- return /* @__PURE__ */ s("button", { onClick: r, className: o.cart, ...n, children: [
10
- /* @__PURE__ */ t(
11
- i,
12
- {
13
- iconKey: "fa-kit fa-shoppingcart-empty",
14
- title: "Shopping Cart",
15
- size: "lg"
16
- }
17
- ),
18
- c > 0 && /* @__PURE__ */ t("div", { className: o.count, children: /* @__PURE__ */ t(a, { size: "xxs", children: c }) })
19
- ] });
13
+ function v({
14
+ cart: e,
15
+ onItemQtyChange: I,
16
+ onItemDelete: u,
17
+ onItemEdit: z,
18
+ onCheckout: o,
19
+ ...c
20
+ }) {
21
+ return e = e || { items: [] }, /* @__PURE__ */ t(
22
+ l,
23
+ {
24
+ trigger: /* @__PURE__ */ i("button", { className: s.cart, ...c, children: [
25
+ /* @__PURE__ */ t(
26
+ m,
27
+ {
28
+ iconKey: "fa-kit fa-shoppingcart-empty",
29
+ title: "Shopping Cart",
30
+ size: "lg"
31
+ }
32
+ ),
33
+ e.items.length > 0 && /* @__PURE__ */ t("div", { className: s.count, children: /* @__PURE__ */ t(n, { size: "xxs", children: e.items.length }) })
34
+ ] }),
35
+ arrow: !1,
36
+ position: "bottom right",
37
+ on: "click",
38
+ children: /* @__PURE__ */ i("div", { className: s.cartContainer, children: [
39
+ /* @__PURE__ */ t(n, { as: "h1", size: "2xl", children: "Cart" }),
40
+ /* @__PURE__ */ t("div", { className: s.cartItems, children: e.items.length > 0 ? /* @__PURE__ */ t("ul", { children: e.items.map(
41
+ (r) => /* @__PURE__ */ i("li", { children: [
42
+ /* @__PURE__ */ t("img", { src: r.imageUrl, alt: `${r.itemId} product image` }),
43
+ /* @__PURE__ */ i("div", { children: [
44
+ /* @__PURE__ */ t(n, { as: "p", size: "sm", children: r.description }),
45
+ /* @__PURE__ */ i(n, { as: "p", size: "sm", children: [
46
+ "Part # ",
47
+ r.itemId
48
+ ] })
49
+ ] })
50
+ ] })
51
+ ) }) : /* @__PURE__ */ t("div", { className: s.noItems, children: /* @__PURE__ */ t(n, { as: "p", size: "sm", children: "No items in your cart yet" }) }) }),
52
+ /* @__PURE__ */ t(a, { disabled: e.items.length === 0, onClick: o, variant: "cta-primary", size: "md", children: "Checkout" })
53
+ ] })
54
+ }
55
+ );
20
56
  }
21
57
  export {
22
- j as Cart
58
+ v as ShoppingCart
23
59
  };
@@ -1,8 +1,8 @@
1
1
  import { StoryObj } from '@storybook/react-vite';
2
- import { Cart } from './Cart';
2
+ import { ShoppingCart } from './Cart';
3
3
  declare const meta: {
4
4
  title: string;
5
- component: typeof Cart;
5
+ component: typeof ShoppingCart;
6
6
  parameters: {
7
7
  layout: string;
8
8
  };
@@ -1,24 +1,61 @@
1
- import { Cart as t } from "./Cart.js";
2
- const e = {
1
+ import { ShoppingCart as e } from "./Cart.js";
2
+ const r = {
3
3
  title: "Case Parts/Molecules/Cart",
4
- component: t,
4
+ component: e,
5
5
  parameters: {
6
6
  layout: "centered"
7
7
  },
8
8
  tags: ["autodocs"]
9
- }, r = {
9
+ }, t = "https://m.media-amazon.com/images/I/216+JEttsYL._UF1000,1000_QL80_.jpg", i = {
10
+ items: [
11
+ { id: 1, itemId: "1094-01", description: "Kason Door Closer - Flush", price: 99.99, quantity: 1, imageUrl: t, availability: "In Stock" },
12
+ { id: 2, itemId: "810810", description: "True Door Gasket", price: 9.99, quantity: 1, imageUrl: t, availability: "In Stock" },
13
+ { id: 3, itemId: "MG064", description: '36" x 79" 3-Sided Dart-to-Dart Gasket', price: 9.99, quantity: 1, imageUrl: t, availability: "" },
14
+ { id: 4, itemId: "MG064-B", description: '36" x 79" 3-Sided Dart-to-Dart Gasket', price: 9.99, quantity: 1, imageUrl: t, availability: "" },
15
+ { id: 5, itemId: "Warmer Wire", description: '228" 7.0 ohms 115V', price: 9.99, quantity: 1, imageUrl: t, availability: "" },
16
+ { id: 6, itemId: "810803", description: "True Door Gasket", price: 9.99, quantity: 1, imageUrl: t, availability: "In Stock" },
17
+ { id: 7, itemId: "ABG-12114-PF", description: "Adhesive Sponge Gasket 1/4", price: 9.99, quantity: 10, imageUrl: t, availability: "In Stock" },
18
+ { id: 8, itemId: "ABG-12138-PF", description: "Adhesive Sponge Gasket 3/8", price: 9.99, quantity: 10, imageUrl: t, availability: "In Stock" },
19
+ { id: 9, itemId: "1094-C1", description: "Kason Door Closer - Flush", price: 20.99, quantity: 1, imageUrl: t, availability: "In Stock" },
20
+ { id: 10, itemId: "1094-02", description: "Kason Door Closer - Offset", price: 30.05, quantity: 1, imageUrl: t, availability: "In Stock" },
21
+ { id: 11, itemId: "1092-01", description: "Kason Door Closer - Flush", price: 40.1, quantity: 1, imageUrl: t, availability: "In Stock" },
22
+ { id: 12, itemId: "1092-02", description: "Kason Door Closer - Offset", price: 50.15, quantity: 1, imageUrl: t, availability: "In Stock" }
23
+ ]
24
+ }, o = {
10
25
  args: {
11
- cartItemCount: 0,
12
- onClick: () => alert("Cart clicked")
26
+ cart: { items: [] },
27
+ onCheckout: () => {
28
+ alert("Checkout");
29
+ },
30
+ onItemDelete: () => {
31
+ alert("Delete");
32
+ },
33
+ onItemEdit: () => {
34
+ alert("Delete");
35
+ },
36
+ onItemQtyChange: () => {
37
+ alert("Delete");
38
+ }
13
39
  }
14
- }, o = {
40
+ }, l = {
15
41
  args: {
16
- cartItemCount: 15,
17
- onClick: () => alert("Cart clicked")
42
+ cart: i,
43
+ onCheckout: () => {
44
+ alert("Checkout");
45
+ },
46
+ onItemDelete: () => {
47
+ alert("Delete");
48
+ },
49
+ onItemEdit: () => {
50
+ alert("Delete");
51
+ },
52
+ onItemQtyChange: () => {
53
+ alert("Delete");
54
+ }
18
55
  }
19
56
  };
20
57
  export {
21
- o as CartWithItems,
22
- r as EmptyCart,
23
- e as default
58
+ l as CartWithItems,
59
+ o as EmptyCart,
60
+ r as default
24
61
  };
@@ -1,22 +1,23 @@
1
1
  import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
- import { c } from "../../clsx-OuTLNxxd.js";
2
+ import { c as a } from "../../clsx-OuTLNxxd.js";
3
3
  import { Text as n } from "../../atoms/Text/Text.js";
4
4
  import { Link as s } from "../../atoms/Link/Link.js";
5
5
  import { Icon as m } from "../../atoms/Icon/Icon.js";
6
+ import { getHideAtStyles as c } from "../../atoms/HideAt.js";
6
7
  import { Tooltip as h } from "../Tooltip/Tooltip.js";
7
- import { getHideAtStyles as a } from "../../atoms/HideAt.js";
8
8
  import '../../assets/CategoryNav.css';const d = "_categories_1m4w9_1", u = "_category_1m4w9_16", p = "_submenuTooltip_1m4w9_42", o = {
9
9
  categories: d,
10
10
  category: u,
11
11
  submenuTooltip: p
12
12
  };
13
13
  function z({
14
- categories: l
14
+ categories: r
15
15
  }) {
16
- return !l || l.length === 0 ? null : /* @__PURE__ */ e("ul", { className: c(o.categories, a(["sm"])), children: l.map(
16
+ return !r || r.length === 0 ? null : /* @__PURE__ */ e("ul", { className: a(o.categories, c(["sm"])), children: r.map(
17
17
  (i) => i.children.length > 0 ? /* @__PURE__ */ e(
18
18
  h,
19
19
  {
20
+ arrow: !1,
20
21
  trigger: /* @__PURE__ */ e("li", { className: o.category, children: /* @__PURE__ */ t(s, { href: i.route, children: [
21
22
  /* @__PURE__ */ e(n, { size: "sm", weight: "semibold", children: i.label }),
22
23
  i.showChevron && /* @__PURE__ */ e(
@@ -30,7 +31,7 @@ function z({
30
31
  ] }) }),
31
32
  on: "hover",
32
33
  position: "bottom center",
33
- children: /* @__PURE__ */ e("ul", { className: o.submenuTooltip, children: i.children.map((r) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(s, { href: r.route, children: /* @__PURE__ */ e(n, { size: "sm", weight: "semibold", children: r.label }) }) }, r.id)) })
34
+ children: /* @__PURE__ */ e("ul", { className: o.submenuTooltip, children: i.children.map((l) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(s, { href: l.route, children: /* @__PURE__ */ e(n, { size: "sm", weight: "semibold", children: l.label }) }) }, l.id)) })
34
35
  },
35
36
  i.id
36
37
  ) : /* @__PURE__ */ e("li", { className: o.category, children: /* @__PURE__ */ t(s, { href: i.route, children: [
@@ -1,6 +1,7 @@
1
1
  import { HideAtProps } from '../../atoms/HideAt';
2
2
  /** A search box. */
3
3
  export interface SearchBoxProps extends React.HTMLAttributes<HTMLDivElement>, HideAtProps {
4
- action: string;
4
+ onSearch: (_input: string) => void;
5
+ inputName?: string;
5
6
  }
6
- export declare function SearchBox({ action, hideAt, className, ...otherProps }: SearchBoxProps): import("react/jsx-runtime").JSX.Element;
7
+ export declare function SearchBox({ onSearch, inputName, hideAt, className, ...otherProps }: SearchBoxProps): import("react/jsx-runtime").JSX.Element;
@@ -1,50 +1,55 @@
1
- import { jsx as e, jsxs as i } from "react/jsx-runtime";
2
- import { c as a } from "../../clsx-OuTLNxxd.js";
1
+ import { jsx as e, jsxs as m } from "react/jsx-runtime";
2
+ import { c as h } from "../../clsx-OuTLNxxd.js";
3
3
  import { Flex as r } from "../../atoms/Flex/Flex.js";
4
- import { getHideAtStyles as l } from "../../atoms/HideAt.js";
5
- import { Icon as m } from "../../atoms/Icon/Icon.js";
6
- import '../../assets/SearchBox.css';const h = "_button_8serw_1", u = "_text_8serw_16", p = "_input_8serw_32", x = "_inputSearch_8serw_36", _ = "_searchfield_8serw_40", f = "_searchBox_8serw_47", t = {
7
- button: h,
8
- text: u,
9
- input: p,
10
- inputSearch: x,
11
- searchfield: _,
12
- searchBox: f
4
+ import { getHideAtStyles as u } from "../../atoms/HideAt.js";
5
+ import { Icon as f } from "../../atoms/Icon/Icon.js";
6
+ import '../../assets/SearchBox.css';const p = "_button_1izj4_1", x = "_text_1izj4_16", _ = "_input_1izj4_32", d = "_inputSearch_1izj4_37", g = "_searchfield_1izj4_41", b = "_searchBox_1izj4_48", t = {
7
+ button: p,
8
+ text: x,
9
+ input: _,
10
+ inputSearch: d,
11
+ searchfield: g,
12
+ searchBox: b
13
13
  };
14
- function S({
15
- action: s,
16
- hideAt: c,
17
- className: n,
18
- ...o
14
+ function D({
15
+ onSearch: i,
16
+ inputName: c,
17
+ hideAt: s,
18
+ className: o,
19
+ ...a
19
20
  }) {
20
21
  return /* @__PURE__ */ e(
21
22
  r,
22
23
  {
23
24
  flexDirection: "row",
24
25
  alignItems: "center",
25
- className: a(t.searchBox, l(c), n),
26
- ...o,
26
+ className: h(t.searchBox, u(s), o),
27
+ ...a,
27
28
  children: /* @__PURE__ */ e(
28
29
  r,
29
30
  {
30
31
  flexDirection: "row",
31
32
  alignItems: "center",
32
33
  className: t.searchfield,
33
- children: /* @__PURE__ */ e("div", { className: t.inputSearch, children: /* @__PURE__ */ e("form", { action: s, method: "get", children: /* @__PURE__ */ i(
34
+ children: /* @__PURE__ */ e("div", { className: t.inputSearch, children: /* @__PURE__ */ e("form", { onSubmit: (n) => {
35
+ n.preventDefault();
36
+ const l = (new FormData(n.currentTarget).get(c ?? "search") || "").trim();
37
+ i(l);
38
+ }, children: /* @__PURE__ */ m(
34
39
  r,
35
40
  {
36
41
  className: t.input,
37
42
  flexDirection: "row",
38
43
  alignItems: "center",
39
44
  children: [
40
- /* @__PURE__ */ e("button", { className: t.button, type: "submit", children: /* @__PURE__ */ e(m, { iconKey: "fa-regular fa-magnifying-glass", size: "sm" }) }),
45
+ /* @__PURE__ */ e("button", { className: t.button, type: "submit", children: /* @__PURE__ */ e(f, { iconKey: "fa-regular fa-magnifying-glass", size: "sm" }) }),
41
46
  /* @__PURE__ */ e(
42
47
  "input",
43
48
  {
44
49
  type: "text",
45
50
  className: t.text,
46
51
  placeholder: "Search by keyword(s) or Part #....",
47
- name: "query"
52
+ name: c ?? "search"
48
53
  }
49
54
  )
50
55
  ]
@@ -56,5 +61,5 @@ function S({
56
61
  );
57
62
  }
58
63
  export {
59
- S as SearchBox
64
+ D as SearchBox
60
65
  };
@@ -1,15 +1,15 @@
1
- import { SearchBox as e } from "./SearchBox.js";
2
- const a = {
1
+ import { SearchBox as a } from "./SearchBox.js";
2
+ const r = {
3
3
  title: "Case Parts/Molecules/SearchBox",
4
- component: e,
4
+ component: a,
5
5
  parameters: {
6
6
  // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
7
7
  layout: "centered"
8
8
  }
9
9
  }, o = {
10
- args: { action: "/search" }
10
+ args: { onSearch: (e) => alert(`Search ${e}`) }
11
11
  };
12
12
  export {
13
13
  o as Default,
14
- a as default
14
+ r as default
15
15
  };
@@ -14,10 +14,10 @@ var K = { exports: {} }, O = {};
14
14
  * This source code is licensed under the MIT license found in the
15
15
  * LICENSE file in the root directory of this source tree.
16
16
  */
17
- var _e;
17
+ var Ee;
18
18
  function Ke() {
19
- if (_e) return O;
20
- _e = 1;
19
+ if (Ee) return O;
20
+ Ee = 1;
21
21
  var s = T;
22
22
  function i(n) {
23
23
  var t = "https://react.dev/errors/" + n;
@@ -147,7 +147,7 @@ function Ke() {
147
147
  return p.H.useHostTransitionStatus();
148
148
  }, O.version = "19.1.1", O;
149
149
  }
150
- var _ = {};
150
+ var E = {};
151
151
  /**
152
152
  * @license React
153
153
  * react-dom.development.js
@@ -157,9 +157,9 @@ var _ = {};
157
157
  * This source code is licensed under the MIT license found in the
158
158
  * LICENSE file in the root directory of this source tree.
159
159
  */
160
- var Ee;
160
+ var _e;
161
161
  function We() {
162
- return Ee || (Ee = 1, process.env.NODE_ENV !== "production" && function() {
162
+ return _e || (_e = 1, process.env.NODE_ENV !== "production" && function() {
163
163
  function s() {
164
164
  }
165
165
  function i(r) {
@@ -169,11 +169,11 @@ function We() {
169
169
  var y = 3 < arguments.length && arguments[3] !== void 0 ? arguments[3] : null;
170
170
  try {
171
171
  i(y);
172
- var v = !1;
172
+ var g = !1;
173
173
  } catch {
174
- v = !0;
174
+ g = !0;
175
175
  }
176
- return v && (console.error(
176
+ return g && (console.error(
177
177
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
178
178
  typeof Symbol == "function" && Symbol.toStringTag && y[Symbol.toStringTag] || y.constructor.name || "Object"
179
179
  ), i(y)), {
@@ -227,12 +227,12 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
227
227
  }, t = Symbol.for("react.portal"), l = m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
228
228
  typeof Map == "function" && Map.prototype != null && typeof Map.prototype.forEach == "function" && typeof Set == "function" && Set.prototype != null && typeof Set.prototype.clear == "function" && typeof Set.prototype.forEach == "function" || console.error(
229
229
  "React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"
230
- ), _.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = n, _.createPortal = function(r, e) {
230
+ ), E.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = n, E.createPortal = function(r, e) {
231
231
  var o = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : null;
232
232
  if (!e || e.nodeType !== 1 && e.nodeType !== 9 && e.nodeType !== 11)
233
233
  throw Error("Target container is not a DOM element.");
234
234
  return c(r, e, null, o);
235
- }, _.flushSync = function(r) {
235
+ }, E.flushSync = function(r) {
236
236
  var e = l.T, o = n.p;
237
237
  try {
238
238
  if (l.T = null, n.p = 2, r)
@@ -242,7 +242,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
242
242
  "flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."
243
243
  );
244
244
  }
245
- }, _.preconnect = function(r, e) {
245
+ }, E.preconnect = function(r, e) {
246
246
  typeof r == "string" && r ? e != null && typeof e != "object" ? console.error(
247
247
  "ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",
248
248
  d(e)
@@ -253,7 +253,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
253
253
  "ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
254
254
  f(r)
255
255
  ), typeof r == "string" && (e ? (e = e.crossOrigin, e = typeof e == "string" ? e === "use-credentials" ? e : "" : void 0) : e = null, n.d.C(r, e));
256
- }, _.prefetchDNS = function(r) {
256
+ }, E.prefetchDNS = function(r) {
257
257
  if (typeof r != "string" || !r)
258
258
  console.error(
259
259
  "ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
@@ -270,7 +270,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
270
270
  );
271
271
  }
272
272
  typeof r == "string" && n.d.D(r);
273
- }, _.preinit = function(r, e) {
273
+ }, E.preinit = function(r, e) {
274
274
  if (typeof r == "string" && r ? e == null || typeof e != "object" ? console.error(
275
275
  "ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",
276
276
  d(e)
@@ -281,23 +281,23 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
281
281
  "ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
282
282
  f(r)
283
283
  ), typeof r == "string" && e && typeof e.as == "string") {
284
- var o = e.as, y = a(o, e.crossOrigin), v = typeof e.integrity == "string" ? e.integrity : void 0, w = typeof e.fetchPriority == "string" ? e.fetchPriority : void 0;
284
+ var o = e.as, y = a(o, e.crossOrigin), g = typeof e.integrity == "string" ? e.integrity : void 0, w = typeof e.fetchPriority == "string" ? e.fetchPriority : void 0;
285
285
  o === "style" ? n.d.S(
286
286
  r,
287
287
  typeof e.precedence == "string" ? e.precedence : void 0,
288
288
  {
289
289
  crossOrigin: y,
290
- integrity: v,
290
+ integrity: g,
291
291
  fetchPriority: w
292
292
  }
293
293
  ) : o === "script" && n.d.X(r, {
294
294
  crossOrigin: y,
295
- integrity: v,
295
+ integrity: g,
296
296
  fetchPriority: w,
297
297
  nonce: typeof e.nonce == "string" ? e.nonce : void 0
298
298
  });
299
299
  }
300
- }, _.preinitModule = function(r, e) {
300
+ }, E.preinitModule = function(r, e) {
301
301
  var o = "";
302
302
  if (typeof r == "string" && r || (o += " The `href` argument encountered was " + f(r) + "."), e !== void 0 && typeof e != "object" ? o += " The `options` argument encountered was " + f(e) + "." : e && "as" in e && e.as !== "script" && (o += " The `as` option encountered was " + d(e.as) + "."), o)
303
303
  console.error(
@@ -323,7 +323,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
323
323
  integrity: typeof e.integrity == "string" ? e.integrity : void 0,
324
324
  nonce: typeof e.nonce == "string" ? e.nonce : void 0
325
325
  })) : e == null && n.d.M(r));
326
- }, _.preload = function(r, e) {
326
+ }, E.preload = function(r, e) {
327
327
  var o = "";
328
328
  if (typeof r == "string" && r || (o += " The `href` argument encountered was " + f(r) + "."), e == null || typeof e != "object" ? o += " The `options` argument encountered was " + f(e) + "." : typeof e.as == "string" && e.as || (o += " The `as` option encountered was " + f(e.as) + "."), o && console.error(
329
329
  'ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',
@@ -346,7 +346,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
346
346
  media: typeof e.media == "string" ? e.media : void 0
347
347
  });
348
348
  }
349
- }, _.preloadModule = function(r, e) {
349
+ }, E.preloadModule = function(r, e) {
350
350
  var o = "";
351
351
  typeof r == "string" && r || (o += " The `href` argument encountered was " + f(r) + "."), e !== void 0 && typeof e != "object" ? o += " The `options` argument encountered was " + f(e) + "." : e && "as" in e && typeof e.as != "string" && (o += " The `as` option encountered was " + f(e.as) + "."), o && console.error(
352
352
  'ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',
@@ -359,16 +359,16 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
359
359
  crossOrigin: o,
360
360
  integrity: typeof e.integrity == "string" ? e.integrity : void 0
361
361
  })) : n.d.m(r));
362
- }, _.requestFormReset = function(r) {
362
+ }, E.requestFormReset = function(r) {
363
363
  n.d.r(r);
364
- }, _.unstable_batchedUpdates = function(r, e) {
364
+ }, E.unstable_batchedUpdates = function(r, e) {
365
365
  return r(e);
366
- }, _.useFormState = function(r, e, o) {
366
+ }, E.useFormState = function(r, e, o) {
367
367
  return p().useFormState(r, e, o);
368
- }, _.useFormStatus = function() {
368
+ }, E.useFormStatus = function() {
369
369
  return p().useHostTransitionStatus();
370
- }, _.version = "19.1.1", typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
371
- }()), _;
370
+ }, E.version = "19.1.1", typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
371
+ }()), E;
372
372
  }
373
373
  function Se() {
374
374
  if (!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ > "u" || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE != "function")) {
@@ -491,7 +491,7 @@ var Ze = function(i, c) {
491
491
  }
492
492
  }
493
493
  }, nt = ["top left", "top center", "top right", "right top", "right center", "right bottom", "bottom left", "bottom center", "bottom right", "left top", "left center", "left bottom"], ot = function(i, c, a, f, d) {
494
- var p = d.offsetX, m = d.offsetY, n = f ? 8 : 0, t = a.split(" "), l = i.top + i.height / 2, r = i.left + i.width / 2, e = c.height, o = c.width, y = l - e / 2, v = r - o / 2, w = "", R = "0%", k = "0%";
494
+ var p = d.offsetX, m = d.offsetY, n = f ? 8 : 0, t = a.split(" "), l = i.top + i.height / 2, r = i.left + i.width / 2, e = c.height, o = c.width, y = l - e / 2, g = r - o / 2, w = "", R = "0%", k = "0%";
495
495
  switch (t[0]) {
496
496
  case "top":
497
497
  y -= e / 2 + i.height / 2 + n, w = "rotate(180deg) translateX(50%)", R = "100%", k = "50%";
@@ -500,10 +500,10 @@ var Ze = function(i, c) {
500
500
  y += e / 2 + i.height / 2 + n, w = "rotate(0deg) translateY(-100%) translateX(-50%)", k = "50%";
501
501
  break;
502
502
  case "left":
503
- v -= o / 2 + i.width / 2 + n, w = " rotate(90deg) translateY(50%) translateX(-25%)", k = "100%", R = "50%";
503
+ g -= o / 2 + i.width / 2 + n, w = " rotate(90deg) translateY(50%) translateX(-25%)", k = "100%", R = "50%";
504
504
  break;
505
505
  case "right":
506
- v += o / 2 + i.width / 2 + n, w = "rotate(-90deg) translateY(-150%) translateX(25%)", R = "50%";
506
+ g += o / 2 + i.width / 2 + n, w = "rotate(-90deg) translateY(-150%) translateX(25%)", R = "50%";
507
507
  break;
508
508
  }
509
509
  switch (t[1]) {
@@ -514,15 +514,15 @@ var Ze = function(i, c) {
514
514
  y = i.top - e + i.height, R = e - i.height / 2 + "px";
515
515
  break;
516
516
  case "left":
517
- v = i.left, k = i.width / 2 + "px";
517
+ g = i.left, k = i.width / 2 + "px";
518
518
  break;
519
519
  case "right":
520
- v = i.left - o + i.width, k = o - i.width / 2 + "px";
520
+ g = i.left - o + i.width, k = o - i.width / 2 + "px";
521
521
  break;
522
522
  }
523
- return y = t[0] === "top" ? y - m : y + m, v = t[0] === "left" ? v - p : v + p, {
523
+ return y = t[0] === "top" ? y - m : y + m, g = t[0] === "left" ? g - p : g + p, {
524
524
  top: y,
525
- left: v,
525
+ left: g,
526
526
  transform: w,
527
527
  arrowLeft: k,
528
528
  arrowTop: R
@@ -574,9 +574,9 @@ var Ze = function(i, c) {
574
574
  }, lt = /* @__PURE__ */ Xe(function(s, i) {
575
575
  var c = s.trigger, a = c === void 0 ? null : c, f = s.onOpen, d = f === void 0 ? function() {
576
576
  } : f, p = s.onClose, m = p === void 0 ? function() {
577
- } : p, n = s.defaultOpen, t = n === void 0 ? !1 : n, l = s.open, r = l === void 0 ? void 0 : l, e = s.disabled, o = e === void 0 ? !1 : e, y = s.nested, v = y === void 0 ? !1 : y, w = s.closeOnDocumentClick, R = w === void 0 ? !0 : w, k = s.repositionOnResize, we = k === void 0 ? !0 : k, W = s.closeOnEscape, Te = W === void 0 ? !0 : W, J = s.on, I = J === void 0 ? ["click"] : J, Q = s.contentStyle, Re = Q === void 0 ? {} : Q, Z = s.arrowStyle, X = Z === void 0 ? {} : Z, B = s.overlayStyle, De = B === void 0 ? {} : B, ee = s.className, A = ee === void 0 ? "" : ee, te = s.position, ke = te === void 0 ? "bottom center" : te, re = s.modal, ne = re === void 0 ? !1 : re, oe = s.lockScroll, ie = oe === void 0 ? !1 : oe, ae = s.arrow, F = ae === void 0 ? !0 : ae, se = s.offsetX, Ce = se === void 0 ? 0 : se, ce = s.offsetY, Le = ce === void 0 ? 0 : ce, le = s.mouseEnterDelay, Pe = le === void 0 ? 100 : le, ue = s.mouseLeaveDelay, Me = ue === void 0 ? 100 : ue, fe = s.keepTooltipInside, Ae = fe === void 0 ? !1 : fe, z = s.children, de = Fe(r || t), D = de[0], pe = de[1], C = N(null), b = N(null), P = N(null), ye = N(null), ve = N("popup-" + ++st), S = ne ? !0 : !a, j = N(0);
577
+ } : p, n = s.defaultOpen, t = n === void 0 ? !1 : n, l = s.open, r = l === void 0 ? void 0 : l, e = s.disabled, o = e === void 0 ? !1 : e, y = s.nested, g = y === void 0 ? !1 : y, w = s.closeOnDocumentClick, R = w === void 0 ? !0 : w, k = s.repositionOnResize, we = k === void 0 ? !0 : k, W = s.closeOnEscape, Te = W === void 0 ? !0 : W, J = s.on, I = J === void 0 ? ["click"] : J, Q = s.contentStyle, Re = Q === void 0 ? {} : Q, Z = s.arrowStyle, X = Z === void 0 ? {} : Z, B = s.overlayStyle, De = B === void 0 ? {} : B, ee = s.className, A = ee === void 0 ? "" : ee, te = s.position, ke = te === void 0 ? "bottom center" : te, re = s.modal, ne = re === void 0 ? !1 : re, oe = s.lockScroll, ie = oe === void 0 ? !1 : oe, ae = s.arrow, F = ae === void 0 ? !0 : ae, se = s.offsetX, Ce = se === void 0 ? 0 : se, ce = s.offsetY, Le = ce === void 0 ? 0 : ce, le = s.mouseEnterDelay, Pe = le === void 0 ? 100 : le, ue = s.mouseLeaveDelay, Me = ue === void 0 ? 100 : ue, fe = s.keepTooltipInside, Ae = fe === void 0 ? !1 : fe, z = s.children, de = Fe(r || t), D = de[0], pe = de[1], C = N(null), b = N(null), P = N(null), ye = N(null), ge = N("popup-" + ++st), S = ne ? !0 : !a, j = N(0);
578
578
  rt(function() {
579
- return D ? (ye.current = document.activeElement, ge(), je(), xe()) : Ie(), function() {
579
+ return D ? (ye.current = document.activeElement, ve(), je(), xe()) : Ie(), function() {
580
580
  clearTimeout(j.current);
581
581
  };
582
582
  }, [D]), x(function() {
@@ -587,8 +587,8 @@ var Ze = function(i, c) {
587
587
  return d(u);
588
588
  }, 0));
589
589
  }, L = function(u) {
590
- var E;
591
- !D || o || (pe(!1), S && ((E = ye.current) === null || E === void 0 || E.focus()), setTimeout(function() {
590
+ var _;
591
+ !D || o || (pe(!1), S && ((_ = ye.current) === null || _ === void 0 || _.focus()), setTimeout(function() {
592
592
  return m(u);
593
593
  }, 0));
594
594
  }, V = function(u) {
@@ -608,8 +608,8 @@ var Ze = function(i, c) {
608
608
  }, Ie = function() {
609
609
  S && ie && (document.getElementsByTagName("body")[0].style.overflow = "auto");
610
610
  }, je = function() {
611
- var u, E = b == null || (u = b.current) === null || u === void 0 ? void 0 : u.querySelectorAll('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex="0"]'), g = Array.prototype.slice.call(E)[0];
612
- g == null || g.focus();
611
+ var u, _ = b == null || (u = b.current) === null || u === void 0 ? void 0 : u.querySelectorAll('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex="0"]'), v = Array.prototype.slice.call(_)[0];
612
+ v == null || v.focus();
613
613
  };
614
614
  Ge(i, function() {
615
615
  return {
@@ -624,26 +624,26 @@ var Ze = function(i, c) {
624
624
  }
625
625
  };
626
626
  });
627
- var ge = function() {
627
+ var ve = function() {
628
628
  if (!(S || !D) && !(!(C != null && C.current) || !(C != null && C.current) || !(b != null && b.current))) {
629
- var u = C.current.getBoundingClientRect(), E = b.current.getBoundingClientRect(), g = at(u, E, ke, F, {
629
+ var u = C.current.getBoundingClientRect(), _ = b.current.getBoundingClientRect(), v = at(u, _, ke, F, {
630
630
  offsetX: Ce,
631
631
  offsetY: Le
632
632
  }, Ae);
633
- if (b.current.style.top = g.top + window.scrollY + "px", b.current.style.left = g.left + window.scrollX + "px", F && P.current) {
633
+ if (b.current.style.top = v.top + window.scrollY + "px", b.current.style.left = v.left + window.scrollX + "px", F && P.current) {
634
634
  var M, $;
635
- P.current.style.transform = g.transform, P.current.style.setProperty("-ms-transform", g.transform), P.current.style.setProperty("-webkit-transform", g.transform), P.current.style.top = ((M = X.top) === null || M === void 0 ? void 0 : M.toString()) || g.arrowTop, P.current.style.left = (($ = X.left) === null || $ === void 0 ? void 0 : $.toString()) || g.arrowLeft;
635
+ P.current.style.transform = v.transform, P.current.style.setProperty("-ms-transform", v.transform), P.current.style.setProperty("-webkit-transform", v.transform), P.current.style.top = ((M = X.top) === null || M === void 0 ? void 0 : M.toString()) || v.arrowTop, P.current.style.left = (($ = X.left) === null || $ === void 0 ? void 0 : $.toString()) || v.arrowLeft;
636
636
  }
637
637
  }
638
638
  };
639
- Ze(L, Te), tt(b, D && S), Be(ge, we), et(a ? [b, C] : [b], L, R && !v);
639
+ Ze(L, Te), tt(b, D && S), Be(ve, we), et(a ? [b, C] : [b], L, R && !g);
640
640
  var $e = function() {
641
641
  for (var u = {
642
642
  key: "T",
643
643
  ref: C,
644
- "aria-describedby": ve.current
645
- }, E = Array.isArray(I) ? I : [I], g = 0, M = E.length; g < M; g++)
646
- switch (E[g]) {
644
+ "aria-describedby": ge.current
645
+ }, _ = Array.isArray(I) ? I : [I], v = 0, M = _.length; v < M; v++)
646
+ switch (_[v]) {
647
647
  case "click":
648
648
  u.onClick = V;
649
649
  break;
@@ -663,9 +663,9 @@ var Ze = function(i, c) {
663
663
  }
664
664
  return !!a && T.cloneElement(a, u);
665
665
  }, He = function() {
666
- var u = S ? H.popupContent.modal : H.popupContent.tooltip, E = {
667
- className: "popup-content " + (A !== "" ? A.split(" ").map(function(g) {
668
- return g + "-content";
666
+ var u = S ? H.popupContent.modal : H.popupContent.tooltip, _ = {
667
+ className: "popup-content " + (A !== "" ? A.split(" ").map(function(v) {
668
+ return v + "-content";
669
669
  }).join(" ") : ""),
670
670
  style: Y({}, u, Re, {
671
671
  pointerEvents: "auto"
@@ -675,12 +675,12 @@ var Ze = function(i, c) {
675
675
  M.stopPropagation();
676
676
  }
677
677
  };
678
- return !ne && I.indexOf("hover") >= 0 && (E.onMouseEnter = G, E.onMouseLeave = q), E;
678
+ return !ne && I.indexOf("hover") >= 0 && (_.onMouseEnter = G, _.onMouseLeave = q), _;
679
679
  }, me = function() {
680
680
  return T.createElement("div", Object.assign({}, He(), {
681
681
  key: "C",
682
682
  role: S ? "dialog" : "tooltip",
683
- id: ve.current
683
+ id: ge.current
684
684
  }), F && !S && T.createElement("div", {
685
685
  ref: P,
686
686
  style: H.popupArrow
@@ -705,17 +705,16 @@ var Ze = function(i, c) {
705
705
  return h + "-overlay";
706
706
  }).join(" ") : ""),
707
707
  style: Y({}, ze, De, {
708
- pointerEvents: R && v || S ? "auto" : "none"
708
+ pointerEvents: R && g || S ? "auto" : "none"
709
709
  }),
710
- onClick: R && v ? L : void 0,
710
+ onClick: R && g ? L : void 0,
711
711
  tabIndex: -1
712
712
  }, S && me()), !S && me()];
713
713
  return T.createElement(T.Fragment, null, $e(), D && Qe.createPortal(Ue, ct()));
714
714
  });
715
- const ut = "_tooltip_mtsuw_1", ft = "_content_mtsuw_5", be = {
716
- tooltip: ut,
717
- content: ft
718
- }, vt = ({
715
+ const ut = "_content_lgc5i_1", be = {
716
+ content: ut
717
+ }, yt = ({
719
718
  tooltipClassName: s,
720
719
  contentClassName: i,
721
720
  children: c,
@@ -730,5 +729,5 @@ const ut = "_tooltip_mtsuw_1", ft = "_content_mtsuw_5", be = {
730
729
  }
731
730
  );
732
731
  export {
733
- vt as Tooltip
732
+ yt as Tooltip
734
733
  };
@@ -1,14 +1,15 @@
1
+ import { CartPropsBase, ShoppingCart } from '../../molecules/Cart/Cart';
1
2
  import { AccountProps } from '../../molecules/Account/Account';
2
- export interface MainNavProps extends React.HTMLAttributes<HTMLDivElement>, Pick<AccountProps, "account"> {
3
+ export interface MainNavProps extends CartPropsBase, React.HTMLAttributes<HTMLDivElement>, Pick<AccountProps, "account"> {
3
4
  categories?: MainCategory[];
4
5
  faqRoute: string;
5
6
  customPartsRoute: string;
6
7
  aboutUsRoute: string;
7
8
  accountRoute: string;
8
9
  contactRoute: string;
9
- cartItemCount: number;
10
+ cart: ShoppingCart;
10
11
  onLoginClick: () => void;
11
- onCartClick: () => void;
12
+ onSearch: (_input: string) => void;
12
13
  }
13
14
  export interface Category {
14
15
  id: string | number;
@@ -19,4 +20,4 @@ export interface MainCategory extends Category {
19
20
  children: Category[];
20
21
  showChevron?: boolean;
21
22
  }
22
- export declare function MainNav({ account, categories, faqRoute, customPartsRoute, aboutUsRoute, accountRoute, contactRoute, cartItemCount, onLoginClick, onCartClick, }: MainNavProps): import("react/jsx-runtime").JSX.Element;
23
+ export declare function MainNav({ account, categories, faqRoute, customPartsRoute, aboutUsRoute, accountRoute, contactRoute, cart, onLoginClick, onSearch, onItemQtyChange, onItemDelete, onItemEdit, onCheckout, ...otherProps }: MainNavProps): import("react/jsx-runtime").JSX.Element;
@@ -1,78 +1,91 @@
1
1
  import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
- import { Text as d } from "../../atoms/Text/Text.js";
3
- import { Link as f } from "../../atoms/Link/Link.js";
4
- import { Icon as v } from "../../atoms/Icon/Icon.js";
5
- import { Flex as c } from "../../atoms/Flex/Flex.js";
6
- import { Grid as w, Column as g } from "../../atoms/Grid/Grid.js";
7
- import { Logo as x } from "../../molecules/Logo/Logo.js";
8
- import { SearchBox as m } from "../../molecules/SearchBox/SearchBox.js";
9
- import { HamburgerMenu as L } from "../../molecules/HamburgerMenu/HamburgerMenu.js";
10
- import { Cart as C } from "../../molecules/Cart/Cart.js";
11
- import { Account as y } from "../../molecules/Account/Account.js";
12
- import { CategoryNav as k } from "../../molecules/CategoryNav/CategoryNav.js";
13
- import '../../assets/MainNav.css';const b = "_topNav_1uhwf_1", j = "_operations_1uhwf_9", D = "_search_1uhwf_16", z = "_siteLink_1uhwf_19", F = "_accountArea_1uhwf_23", I = "_category_1uhwf_35", U = "_menuList_1uhwf_57", r = {
14
- topNav: b,
15
- operations: j,
16
- search: D,
17
- siteLink: z,
18
- accountArea: F,
19
- category: I,
20
- menuList: U
2
+ import { Text as f } from "../../atoms/Text/Text.js";
3
+ import { Link as p } from "../../atoms/Link/Link.js";
4
+ import { Icon as C } from "../../atoms/Icon/Icon.js";
5
+ import { Flex as o } from "../../atoms/Flex/Flex.js";
6
+ import { Grid as y, Column as k } from "../../atoms/Grid/Grid.js";
7
+ import { Logo as b } from "../../molecules/Logo/Logo.js";
8
+ import { SearchBox as d } from "../../molecules/SearchBox/SearchBox.js";
9
+ import { HamburgerMenu as j } from "../../molecules/HamburgerMenu/HamburgerMenu.js";
10
+ import { ShoppingCart as D } from "../../molecules/Cart/Cart.js";
11
+ import { Account as z } from "../../molecules/Account/Account.js";
12
+ import { CategoryNav as F } from "../../molecules/CategoryNav/CategoryNav.js";
13
+ import '../../assets/MainNav.css';const I = "_topNav_1uhwf_1", U = "_operations_1uhwf_9", M = "_search_1uhwf_16", Q = "_siteLink_1uhwf_19", B = "_accountArea_1uhwf_23", G = "_category_1uhwf_35", H = "_menuList_1uhwf_57", i = {
14
+ topNav: I,
15
+ operations: U,
16
+ search: M,
17
+ siteLink: Q,
18
+ accountArea: B,
19
+ category: G,
20
+ menuList: H
21
21
  };
22
- function V({
22
+ function $({
23
23
  account: s,
24
24
  categories: n,
25
- faqRoute: o,
25
+ faqRoute: c,
26
26
  customPartsRoute: l,
27
27
  aboutUsRoute: u,
28
- accountRoute: p,
29
- contactRoute: h,
30
- cartItemCount: _ = 0,
31
- onLoginClick: N,
32
- onCartClick: A
33
- // chat,
28
+ accountRoute: _,
29
+ contactRoute: m,
30
+ cart: N,
31
+ onLoginClick: A,
32
+ onSearch: h,
33
+ onItemQtyChange: v,
34
+ onItemDelete: w,
35
+ onItemEdit: g,
36
+ onCheckout: x,
37
+ ...L
34
38
  }) {
35
- return /* @__PURE__ */ e(w, { children: /* @__PURE__ */ t(g, { span: 12, children: [
39
+ return /* @__PURE__ */ e(y, { ...L, children: /* @__PURE__ */ t(k, { span: 12, children: [
36
40
  /* @__PURE__ */ t(
37
- c,
41
+ o,
38
42
  {
39
43
  flexDirection: "row",
40
44
  alignItems: "center",
41
45
  justifyContent: "space-between",
42
- className: r.topNav,
46
+ className: i.topNav,
43
47
  children: [
44
- /* @__PURE__ */ e("div", { className: r.logo, children: /* @__PURE__ */ e(x, {}) }),
48
+ /* @__PURE__ */ e("div", { className: i.logo, children: /* @__PURE__ */ e(b, {}) }),
45
49
  /* @__PURE__ */ t(
46
- c,
50
+ o,
47
51
  {
48
52
  flexDirection: "row",
49
53
  alignItems: "center",
50
54
  justifyContent: "flex-end",
51
- className: r.operations,
55
+ className: i.operations,
52
56
  children: [
53
- /* @__PURE__ */ e(c, { flexDirection: "row", hideAt: ["sm"], className: r.search, children: /* @__PURE__ */ e(m, { action: "/search" }) }),
54
- /* @__PURE__ */ e(i, { href: l, hideAt: ["sm", "md"], children: "Custom Parts" }),
55
- /* @__PURE__ */ e(i, { href: o, hideAt: ["sm", "md"], children: "FAQ" }),
56
- /* @__PURE__ */ e(i, { href: h, hideAt: ["sm", "md"], children: "Contact Us" }),
57
- /* @__PURE__ */ e("div", { className: r.accountArea, children: /* @__PURE__ */ e(
58
- y,
57
+ /* @__PURE__ */ e(o, { flexDirection: "row", hideAt: ["sm"], className: i.search, children: /* @__PURE__ */ e(d, { onSearch: h, inputName: "cpc-search" }) }),
58
+ /* @__PURE__ */ e(r, { href: l, hideAt: ["sm", "md"], children: "Custom Parts" }),
59
+ /* @__PURE__ */ e(r, { href: c, hideAt: ["sm", "md"], children: "FAQ" }),
60
+ /* @__PURE__ */ e(r, { href: m, hideAt: ["sm", "md"], children: "Contact Us" }),
61
+ /* @__PURE__ */ e("div", { className: i.accountArea, children: /* @__PURE__ */ e(
62
+ z,
59
63
  {
60
64
  account: s,
61
- accountRoute: p,
62
- onLoginClick: N,
63
- className: r.avatar
65
+ accountRoute: _,
66
+ onLoginClick: A,
67
+ className: i.avatar
64
68
  }
65
69
  ) }),
66
- /* @__PURE__ */ e(C, { onClick: A, cartItemCount: _ }),
67
- /* @__PURE__ */ e(L, { hideAt: ["lg"], children: /* @__PURE__ */ t("ul", { className: r.menuList, children: [
68
- /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(i, { href: l, children: "Custom Parts" }) }),
69
- /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(i, { href: o, children: "FAQ" }) }),
70
- /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(i, { href: h, children: "Contact Us" }) }),
71
- /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(i, { href: u, children: "About Us" }) }),
72
- n && n.map((a) => /* @__PURE__ */ e("li", { className: r.category, children: /* @__PURE__ */ t(f, { href: a.route, children: [
73
- /* @__PURE__ */ e(d, { size: "sm", weight: "semibold", children: a.label }),
70
+ /* @__PURE__ */ e(
71
+ D,
72
+ {
73
+ cart: N,
74
+ onItemDelete: w,
75
+ onItemEdit: g,
76
+ onItemQtyChange: v,
77
+ onCheckout: x
78
+ }
79
+ ),
80
+ /* @__PURE__ */ e(j, { hideAt: ["lg"], children: /* @__PURE__ */ t("ul", { className: i.menuList, children: [
81
+ /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(r, { href: l, children: "Custom Parts" }) }),
82
+ /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(r, { href: c, children: "FAQ" }) }),
83
+ /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(r, { href: m, children: "Contact Us" }) }),
84
+ /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(r, { href: u, children: "About Us" }) }),
85
+ n && n.map((a) => /* @__PURE__ */ e("li", { className: i.category, children: /* @__PURE__ */ t(p, { href: a.route, children: [
86
+ /* @__PURE__ */ e(f, { size: "sm", weight: "semibold", children: a.label }),
74
87
  /* @__PURE__ */ e(
75
- v,
88
+ C,
76
89
  {
77
90
  iconKey: "fa-solid fa-chevron-right",
78
91
  title: "Navigate",
@@ -87,17 +100,17 @@ function V({
87
100
  ]
88
101
  }
89
102
  ),
90
- /* @__PURE__ */ e(c, { flexDirection: "row", hideAt: ["md", "lg"], children: /* @__PURE__ */ e(m, { action: "/search", className: r.search }) }),
91
- /* @__PURE__ */ e(k, { categories: n })
103
+ /* @__PURE__ */ e(o, { flexDirection: "row", hideAt: ["md", "lg"], children: /* @__PURE__ */ e(d, { onSearch: h, inputName: "cpc-search", className: i.search }) }),
104
+ /* @__PURE__ */ e(F, { categories: n })
92
105
  ] }) });
93
106
  }
94
- function i({
107
+ function r({
95
108
  href: s,
96
109
  children: n,
97
- ...o
110
+ ...c
98
111
  }) {
99
- return /* @__PURE__ */ e(f, { href: s, className: r.siteLink, ...o, children: /* @__PURE__ */ e(d, { size: "md", variant: "display", children: n }) });
112
+ return /* @__PURE__ */ e(p, { href: s, className: i.siteLink, ...c, children: /* @__PURE__ */ e(f, { size: "md", variant: "display", children: n }) });
100
113
  }
101
114
  export {
102
- V as MainNav
115
+ $ as MainNav
103
116
  };
@@ -1,13 +1,13 @@
1
- import { MainNav as e } from "./MainNav.js";
2
- const o = {
1
+ import { MainNav as o } from "./MainNav.js";
2
+ const l = {
3
3
  title: "Case Parts/Organisms/MainNav",
4
- component: e,
4
+ component: o,
5
5
  parameters: {
6
6
  // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
7
7
  layout: "fullscreen"
8
8
  }
9
9
  // tags: ["autodocs"],
10
- }, t = [
10
+ }, a = [
11
11
  {
12
12
  id: 0,
13
13
  label: "Shop by Brands",
@@ -80,14 +80,29 @@ const o = {
80
80
  route: "#",
81
81
  children: []
82
82
  }
83
- ], n = {
83
+ ], e = "https://m.media-amazon.com/images/I/216+JEttsYL._UF1000,1000_QL80_.jpg", i = {
84
+ items: [
85
+ { id: 1, itemId: "1094-01", description: "Kason Door Closer - Flush", price: 99.99, quantity: 1, imageUrl: e, availability: "In Stock" },
86
+ { id: 2, itemId: "810810", description: "True Door Gasket", price: 9.99, quantity: 1, imageUrl: e, availability: "In Stock" },
87
+ { id: 3, itemId: "MG064", description: '36" x 79" 3-Sided Dart-to-Dart Gasket', price: 9.99, quantity: 1, imageUrl: e, availability: "" },
88
+ { id: 4, itemId: "MG064-B", description: '36" x 79" 3-Sided Dart-to-Dart Gasket', price: 9.99, quantity: 1, imageUrl: e, availability: "" },
89
+ { id: 5, itemId: "Warmer Wire", description: '228" 7.0 ohms 115V', price: 9.99, quantity: 1, imageUrl: e, availability: "" },
90
+ { id: 6, itemId: "810803", description: "True Door Gasket", price: 9.99, quantity: 1, imageUrl: e, availability: "In Stock" },
91
+ { id: 7, itemId: "ABG-12114-PF", description: "Adhesive Sponge Gasket 1/4", price: 9.99, quantity: 10, imageUrl: e, availability: "In Stock" },
92
+ { id: 8, itemId: "ABG-12138-PF", description: "Adhesive Sponge Gasket 3/8", price: 9.99, quantity: 10, imageUrl: e, availability: "In Stock" },
93
+ { id: 9, itemId: "1094-C1", description: "Kason Door Closer - Flush", price: 20.99, quantity: 1, imageUrl: e, availability: "In Stock" },
94
+ { id: 10, itemId: "1094-02", description: "Kason Door Closer - Offset", price: 30.05, quantity: 1, imageUrl: e, availability: "In Stock" },
95
+ { id: 11, itemId: "1092-01", description: "Kason Door Closer - Flush", price: 40.1, quantity: 1, imageUrl: e, availability: "In Stock" },
96
+ { id: 12, itemId: "1092-02", description: "Kason Door Closer - Offset", price: 50.15, quantity: 1, imageUrl: e, availability: "In Stock" }
97
+ ]
98
+ }, n = {
84
99
  args: {
85
100
  account: {
86
101
  name: "Ringo",
87
102
  initials: "RS",
88
103
  number: "123456789012"
89
104
  },
90
- cartItemCount: 0,
105
+ cart: i,
91
106
  customPartsRoute: "/custom",
92
107
  accountRoute: "/account",
93
108
  faqRoute: "/faq",
@@ -96,19 +111,31 @@ const o = {
96
111
  onLoginClick: () => {
97
112
  alert("Login ");
98
113
  },
99
- onCartClick: () => {
100
- alert("Cart");
114
+ onCheckout: () => {
115
+ alert("Checkout");
101
116
  },
102
- categories: t
117
+ onItemDelete: () => {
118
+ alert("Delete");
119
+ },
120
+ onItemEdit: () => {
121
+ alert("Delete");
122
+ },
123
+ onItemQtyChange: () => {
124
+ alert("Delete");
125
+ },
126
+ onSearch: (t) => {
127
+ alert(`Search ${t}`);
128
+ },
129
+ categories: a
103
130
  }
104
- }, r = {
131
+ }, c = {
105
132
  args: {
106
133
  account: {
107
134
  name: "Ringo",
108
135
  initials: "RS",
109
136
  number: "123456789012"
110
137
  },
111
- cartItemCount: 10,
138
+ cart: i,
112
139
  customPartsRoute: "/custom",
113
140
  accountRoute: "/account",
114
141
  faqRoute: "/faq",
@@ -117,14 +144,26 @@ const o = {
117
144
  onLoginClick: () => {
118
145
  alert("Login ");
119
146
  },
120
- onCartClick: () => {
121
- alert("Cart");
147
+ onCheckout: () => {
148
+ alert("Checkout");
149
+ },
150
+ onItemDelete: () => {
151
+ alert("Delete");
152
+ },
153
+ onItemEdit: () => {
154
+ alert("Delete");
122
155
  },
123
- categories: t
156
+ onItemQtyChange: () => {
157
+ alert("Delete");
158
+ },
159
+ onSearch: (t) => {
160
+ alert(`Search ${t}`);
161
+ },
162
+ categories: a
124
163
  }
125
- }, l = {
164
+ }, s = {
126
165
  args: {
127
- cartItemCount: 0,
166
+ cart: i,
128
167
  customPartsRoute: "/custom",
129
168
  accountRoute: "/account",
130
169
  faqRoute: "/faq",
@@ -133,15 +172,27 @@ const o = {
133
172
  onLoginClick: () => {
134
173
  alert("Login ");
135
174
  },
136
- onCartClick: () => {
137
- alert("Cart");
175
+ onCheckout: () => {
176
+ alert("Checkout");
177
+ },
178
+ onItemDelete: () => {
179
+ alert("Delete");
180
+ },
181
+ onItemEdit: () => {
182
+ alert("Delete");
183
+ },
184
+ onItemQtyChange: () => {
185
+ alert("Delete");
186
+ },
187
+ onSearch: (t) => {
188
+ alert(`Search ${t}`);
138
189
  },
139
- categories: t
190
+ categories: a
140
191
  }
141
192
  };
142
193
  export {
143
194
  n as Authenticated,
144
- l as Unauthenticated,
145
- r as WithCartItems,
146
- o as default
195
+ s as Unauthenticated,
196
+ c as WithCartItems,
197
+ l as default
147
198
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@caseparts-org/caseblocks",
3
3
  "private": false,
4
- "version": "0.0.19",
4
+ "version": "0.0.21",
5
5
  "type": "module",
6
6
  "module": "dist/main.js",
7
7
  "types": "dist/main.d.ts",