@caseparts-org/caseblocks 0.0.11 → 0.0.15

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.
Files changed (38) hide show
  1. package/dist/assets/Account.css +1 -1
  2. package/dist/assets/Avatar.css +1 -1
  3. package/dist/assets/Cart.css +1 -0
  4. package/dist/assets/HamburgerMenu.css +1 -0
  5. package/dist/assets/Icon.css +1 -1
  6. package/dist/assets/MainNav.css +1 -1
  7. package/dist/assets/Root.css +1 -1
  8. package/dist/assets/SearchBox.css +1 -1
  9. package/dist/assets/Tooltip.css +1 -0
  10. package/dist/atoms/Icon/Icon.js +17 -17
  11. package/dist/atoms/Input/Input.d.ts +1 -1
  12. package/dist/atoms/Input/Input.js +12 -10
  13. package/dist/atoms/Input/Input.stories.d.ts +1 -2
  14. package/dist/molecules/Account/Account.d.ts +3 -0
  15. package/dist/molecules/Account/Account.js +56 -33
  16. package/dist/molecules/Account/Account.stories.js +12 -5
  17. package/dist/molecules/Avatar/Avatar.d.ts +2 -1
  18. package/dist/molecules/Avatar/Avatar.js +26 -24
  19. package/dist/molecules/Avatar/Avatar.stories.js +4 -1
  20. package/dist/molecules/Cart/Cart.d.ts +7 -0
  21. package/dist/molecules/Cart/Cart.js +23 -0
  22. package/dist/molecules/Cart/Cart.stories.d.ts +14 -0
  23. package/dist/molecules/Cart/Cart.stories.js +24 -0
  24. package/dist/molecules/HamburgerMenu/HamburgerMenu.d.ts +7 -0
  25. package/dist/molecules/HamburgerMenu/HamburgerMenu.js +63 -0
  26. package/dist/molecules/Logo/Logo.js +13 -44
  27. package/dist/molecules/SearchBox/SearchBox.js +16 -16
  28. package/dist/molecules/Tooltip/Tooltip.d.ts +11 -0
  29. package/dist/molecules/Tooltip/Tooltip.js +19417 -0
  30. package/dist/molecules/Tooltip/Tooltip.stories.d.ts +46 -0
  31. package/dist/molecules/Tooltip/Tooltip.stories.js +142 -0
  32. package/dist/organisms/MainNav/MainNav.d.ts +19 -1
  33. package/dist/organisms/MainNav/MainNav.js +118 -95
  34. package/dist/organisms/MainNav/MainNav.stories.d.ts +2 -1
  35. package/dist/organisms/MainNav/MainNav.stories.js +134 -11
  36. package/dist/styles/tokens.css +1 -0
  37. package/package.json +4 -2
  38. package/dist/assets/Logo.css +0 -1
@@ -1 +1 @@
1
- ._button_j66cf_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_j66cf_16{flex:1;position:relative;border:none;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:transparent;color:var(--text-text-search-bar)}._text_j66cf_16::placeholder{font-style:italic}._input_j66cf_31{flex:1;padding:0px 0px 0px var(--spacing-0-25)}._inputSearch_j66cf_35{flex:1;border-radius:var(--spacing-0-125)}._searchfield_j66cf_39{flex:1;height:var(--spacing-2-5);border-radius:var(--spacing-2-5);overflow:hidden;background-color:var(--surface-surface-search-bar)}._searchBox_j66cf_46{flex:1;width:100%;min-width:250px;max-width:392px;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_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)}
@@ -0,0 +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,33 +1,33 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { c as l } from "../../clsx-OuTLNxxd.js";
3
- import { getHideAtStyles as _ } from "../HideAt.js";
4
- import '../../assets/Icon.css';const e = {
5
- "icon-sm": "_icon-sm_flrgw_1",
6
- "icon-md": "_icon-md_flrgw_6",
7
- "icon-lg": "_icon-lg_flrgw_11"
2
+ import { c as _ } from "../../clsx-OuTLNxxd.js";
3
+ import { getHideAtStyles as e } from "../HideAt.js";
4
+ import '../../assets/Icon.css';const l = {
5
+ "icon-sm": "_icon-sm_nwr4s_1",
6
+ "icon-md": "_icon-md_nwr4s_6",
7
+ "icon-lg": "_icon-lg_nwr4s_11"
8
8
  };
9
- function d({
9
+ function a({
10
10
  iconKey: o,
11
- size: c = "md",
12
- hideAt: i,
13
- className: n,
14
- ...s
11
+ size: n = "md",
12
+ hideAt: s,
13
+ className: c,
14
+ ...i
15
15
  }) {
16
16
  const [t, m] = o.split(" ");
17
17
  return /* @__PURE__ */ r(
18
18
  "i",
19
19
  {
20
- className: l(
20
+ className: _(
21
21
  t,
22
22
  m,
23
- e[`icon-${c}`],
24
- _(i),
25
- n
23
+ l[`icon-${n}`],
24
+ e(s),
25
+ c
26
26
  ),
27
- ...s
27
+ ...i
28
28
  }
29
29
  );
30
30
  }
31
31
  export {
32
- d as Icon
32
+ a as Icon
33
33
  };
@@ -3,4 +3,4 @@ import { HideAtProps } from '../HideAt';
3
3
  export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement>, HideAtProps {
4
4
  label: string | null;
5
5
  }
6
- export declare function Input({ label, hideAt, className, ...otherProps }: InputProps): import("react/jsx-runtime").JSX.Element;
6
+ export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
@@ -1,24 +1,26 @@
1
- import { jsxs as p, jsx as i } from "react/jsx-runtime";
2
- import { c as m } from "../../clsx-OuTLNxxd.js";
3
- import { getHideAtStyles as r } from "../HideAt.js";
1
+ import { jsxs as a, jsx as i } from "react/jsx-runtime";
2
+ import m from "react";
3
+ import { c } from "../../clsx-OuTLNxxd.js";
4
+ import { getHideAtStyles as o } from "../HideAt.js";
4
5
  import '../../assets/Input.css';const u = "_input_1fwgs_1", e = {
5
6
  "input-container": "_input-container_1fwgs_1",
6
7
  input: u
7
- };
8
- function f({ label: n, hideAt: s, className: c, ...t }) {
9
- return /* @__PURE__ */ p("div", { className: e["input-container"], children: [
8
+ }, l = m.forwardRef(
9
+ ({ label: n, hideAt: s, className: p, ...t }, r) => /* @__PURE__ */ a("div", { className: e["input-container"], children: [
10
10
  n && /* @__PURE__ */ i("label", { htmlFor: t.name, children: n }),
11
11
  /* @__PURE__ */ i(
12
12
  "input",
13
13
  {
14
+ ref: r,
14
15
  id: t.name,
15
16
  type: "text",
16
- className: m(e.input, r(s), c),
17
+ className: c(e.input, o(s), p),
17
18
  ...t
18
19
  }
19
20
  )
20
- ] });
21
- }
21
+ ] })
22
+ );
23
+ l.displayName = "Input";
22
24
  export {
23
- f as Input
25
+ l as Input
24
26
  };
@@ -1,8 +1,7 @@
1
1
  import { StoryObj } from '@storybook/react';
2
- import { Input } from './Input';
3
2
  declare const meta: {
4
3
  title: string;
5
- component: typeof Input;
4
+ component: import('react').ForwardRefExoticComponent<import('./Input').InputProps & import('react').RefAttributes<HTMLInputElement>>;
6
5
  parameters: {
7
6
  layout: string;
8
7
  };
@@ -1,3 +1,4 @@
1
+ import { default as React } from 'react';
1
2
  import { HideAtProps } from '../../atoms/HideAt';
2
3
  /** Base props shared by all account types */
3
4
  export interface AccountProps extends React.HTMLAttributes<HTMLDivElement>, HideAtProps {
@@ -9,5 +10,7 @@ export interface AccountProps extends React.HTMLAttributes<HTMLDivElement>, Hide
9
10
  /** The account user's initials. */
10
11
  initials: string;
11
12
  };
13
+ accountRoute: string;
14
+ onLoginClick: () => void;
12
15
  }
13
16
  export declare function Account(props: AccountProps): import("react/jsx-runtime").JSX.Element;
@@ -1,66 +1,89 @@
1
- import { jsx as i, jsxs as r } from "react/jsx-runtime";
2
- import { getHideAtStyles as d } from "../../atoms/HideAt.js";
3
- import { Icon as g } from "../../atoms/Icon/Icon.js";
4
- import { Text as n } from "../../atoms/Text/Text.js";
5
- import { Avatar as c } from "../Avatar/Avatar.js";
6
- import { Flex as t } from "../../atoms/Flex/Flex.js";
7
- import { Button as f } from "../../atoms/Button/Button.js";
8
- import { c as a } from "../../clsx-OuTLNxxd.js";
9
- import { Link as u } from "../../atoms/Link/Link.js";
10
- import '../../assets/Account.css';const h = "_loggedIn_iiyge_1", x = "_customer_iiyge_5", o = {
11
- loggedIn: h,
12
- customer: x
1
+ import { jsx as i, jsxs as n } from "react/jsx-runtime";
2
+ import { getHideAtStyles as o } from "../../atoms/HideAt.js";
3
+ import { Icon as f } from "../../atoms/Icon/Icon.js";
4
+ import { Text as m } from "../../atoms/Text/Text.js";
5
+ import { Avatar as a } from "../Avatar/Avatar.js";
6
+ import { Flex as r } from "../../atoms/Flex/Flex.js";
7
+ import { Button as h } from "../../atoms/Button/Button.js";
8
+ import { c as s } from "../../clsx-OuTLNxxd.js";
9
+ import { Link as x } from "../../atoms/Link/Link.js";
10
+ import '../../assets/Account.css';const u = "_loggedIn_1uin2_1", t = {
11
+ loggedIn: u
13
12
  };
14
13
  function A(e) {
15
14
  return e.account !== void 0;
16
15
  }
17
- function H(e) {
18
- return A(e) ? /* @__PURE__ */ i(I, { ...e }) : /* @__PURE__ */ i(p, { ...e });
16
+ function w(e) {
17
+ return A(e) ? /* @__PURE__ */ i(I, { ...e }) : /* @__PURE__ */ i(k, { ...e });
19
18
  }
20
19
  function I({
21
20
  account: e,
22
- className: m,
23
- hideAt: s,
24
- ...l
21
+ accountRoute: l,
22
+ onLoginClick: y,
23
+ className: d,
24
+ hideAt: g,
25
+ ...c
25
26
  }) {
26
- return /* @__PURE__ */ r(
27
- t,
27
+ return /* @__PURE__ */ n(
28
+ r,
28
29
  {
29
30
  flexDirection: "row",
30
31
  alignItems: "center",
31
- className: a(o.loggedIn, d(s), m),
32
- ...l,
32
+ className: s(t.loggedIn, o(g), d),
33
+ ...c,
33
34
  children: [
34
- /* @__PURE__ */ r(
35
- t,
35
+ /* @__PURE__ */ n(
36
+ r,
36
37
  {
37
38
  flexDirection: "column",
38
39
  alignItems: "flex-end",
39
40
  hideAt: ["sm", "md"],
40
- className: o.customer,
41
+ className: t.customer,
41
42
  children: [
42
- /* @__PURE__ */ r(n, { size: "xxs", children: [
43
+ /* @__PURE__ */ n(m, { size: "xxs", children: [
43
44
  "Acct: ",
44
45
  e == null ? void 0 : e.number
45
46
  ] }),
46
- /* @__PURE__ */ i(u, { href: "#", children: /* @__PURE__ */ r(n, { size: "sm", variant: "display", children: [
47
+ /* @__PURE__ */ i(x, { href: l, children: /* @__PURE__ */ n(m, { size: "sm", variant: "display", children: [
47
48
  "Hello ",
48
49
  e == null ? void 0 : e.name
49
50
  ] }) })
50
51
  ]
51
52
  }
52
53
  ),
53
- /* @__PURE__ */ i(c, { initials: e.initials })
54
+ /* @__PURE__ */ i(a, { initials: e.initials, accountRoute: l })
54
55
  ]
55
56
  }
56
57
  );
57
58
  }
58
- function p(e) {
59
- return /* @__PURE__ */ r(t, { flexDirection: "row", alignItems: "center", ...e, children: [
60
- /* @__PURE__ */ i(f, { size: "sm", variant: "primary", hideAt: ["sm", "md"], children: "Sign In / Register" }),
61
- /* @__PURE__ */ i(g, { iconKey: "fa-kit fa-user-anon", size: "lg", hideAt: "lg" })
62
- ] });
59
+ function k(e) {
60
+ return /* @__PURE__ */ n(
61
+ r,
62
+ {
63
+ flexDirection: "row",
64
+ alignItems: "center",
65
+ ...e,
66
+ className: s(
67
+ t.unauthenticated,
68
+ o(e.hideAt),
69
+ e.className
70
+ ),
71
+ children: [
72
+ /* @__PURE__ */ i(
73
+ h,
74
+ {
75
+ onClick: e.onLoginClick,
76
+ size: "sm",
77
+ variant: "primary",
78
+ hideAt: ["sm", "md"],
79
+ children: "Sign In / Register"
80
+ }
81
+ ),
82
+ /* @__PURE__ */ i(f, { iconKey: "fa-kit fa-user-anon", size: "lg", hideAt: "lg" })
83
+ ]
84
+ }
85
+ );
63
86
  }
64
87
  export {
65
- H as Account
88
+ w as Account
66
89
  };
@@ -1,5 +1,5 @@
1
1
  import { Account as t } from "./Account.js";
2
- const a = {
2
+ const c = {
3
3
  title: "Case Parts/Molecules/Account",
4
4
  component: t,
5
5
  parameters: {
@@ -9,18 +9,25 @@ const a = {
9
9
  // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
10
10
  tags: ["autodocs"]
11
11
  }, n = {
12
- args: {}
13
- }, o = {
12
+ args: {
13
+ accountRoute: "/account",
14
+ onLoginClick: () => {
15
+ }
16
+ }
17
+ }, a = {
14
18
  args: {
15
19
  account: {
16
20
  name: "Ringo",
17
21
  initials: "RS",
18
22
  number: "123456789012"
23
+ },
24
+ accountRoute: "/account",
25
+ onLoginClick: () => {
19
26
  }
20
27
  }
21
28
  };
22
29
  export {
23
- o as Authenticated,
30
+ a as Authenticated,
24
31
  n as Unauthenticated,
25
- a as default
32
+ c as default
26
33
  };
@@ -2,5 +2,6 @@ import { HideAtProps } from '../../atoms/HideAt';
2
2
  export interface AvatarProps extends React.HTMLAttributes<HTMLDivElement>, HideAtProps {
3
3
  /** The user's initials (2 characters) */
4
4
  initials: string;
5
+ accountRoute: string;
5
6
  }
6
- export declare function Avatar({ initials, className, hideAt, ...otherProps }: AvatarProps): import("react/jsx-runtime").JSX.Element;
7
+ export declare function Avatar({ initials, accountRoute, className, hideAt, ...otherProps }: AvatarProps): import("react/jsx-runtime").JSX.Element;
@@ -1,35 +1,37 @@
1
- import { jsx as s } from "react/jsx-runtime";
2
- import { Flex as i } from "../../atoms/Flex/Flex.js";
3
- import { getHideAtStyles as m } from "../../atoms/HideAt.js";
4
- import { c as n } from "../../clsx-OuTLNxxd.js";
5
- import { t } from "../../Text.module-smM1g1J4.js";
6
- import '../../assets/Avatar.css';const c = "_avatar_1x5y3_1", l = {
7
- avatar: c
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { Flex as m } from "../../atoms/Flex/Flex.js";
3
+ import { Link as n } from "../../atoms/Link/Link.js";
4
+ import { getHideAtStyles as c } from "../../atoms/HideAt.js";
5
+ import { c as l } from "../../clsx-OuTLNxxd.js";
6
+ import { t as r } from "../../Text.module-smM1g1J4.js";
7
+ import '../../assets/Avatar.css';const f = "_avatar_vwzwk_1", p = {
8
+ avatar: f
8
9
  };
9
- function d({
10
- initials: r,
11
- className: e,
12
- hideAt: a,
13
- ...o
10
+ function h({
11
+ initials: e,
12
+ accountRoute: a,
13
+ className: o,
14
+ hideAt: i,
15
+ ...s
14
16
  }) {
15
- return /* @__PURE__ */ s(
16
- i,
17
+ return /* @__PURE__ */ t(n, { href: a, children: /* @__PURE__ */ t(
18
+ m,
17
19
  {
18
20
  flexDirection: "row",
19
21
  alignItems: "center",
20
22
  justifyContent: "center",
21
- className: n(
22
- l.avatar,
23
- t["text-display"],
24
- t["text-md"],
25
- m(a),
26
- e
23
+ className: l(
24
+ p.avatar,
25
+ r["text-display"],
26
+ r["text-md"],
27
+ c(i),
28
+ o
27
29
  ),
28
- ...o,
29
- children: r.substring(0, 2)
30
+ ...s,
31
+ children: e.substring(0, 2)
30
32
  }
31
- );
33
+ ) });
32
34
  }
33
35
  export {
34
- d as Avatar
36
+ h as Avatar
35
37
  };
@@ -9,7 +9,10 @@ const e = {
9
9
  // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
10
10
  tags: ["autodocs"]
11
11
  }, o = {
12
- args: { initials: "RS" }
12
+ args: {
13
+ initials: "RS",
14
+ accountRoute: "/account"
15
+ }
13
16
  };
14
17
  export {
15
18
  o as Default,
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ interface cartProps extends React.HtmlHTMLAttributes<HTMLButtonElement> {
3
+ onClick: () => void;
4
+ cartItemCount: number;
5
+ }
6
+ export declare function Cart({ onClick, cartItemCount, ...otherProps }: cartProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,23 @@
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
7
+ };
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
+ ] });
20
+ }
21
+ export {
22
+ j as Cart
23
+ };
@@ -0,0 +1,14 @@
1
+ import { StoryObj } from '@storybook/react';
2
+ import { Cart } from './Cart';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof Cart;
6
+ parameters: {
7
+ layout: string;
8
+ };
9
+ tags: string[];
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const EmptyCart: Story;
14
+ export declare const CartWithItems: Story;
@@ -0,0 +1,24 @@
1
+ import { Cart as t } from "./Cart.js";
2
+ const e = {
3
+ title: "Case Parts/Molecules/Cart",
4
+ component: t,
5
+ parameters: {
6
+ layout: "centered"
7
+ },
8
+ tags: ["autodocs"]
9
+ }, r = {
10
+ args: {
11
+ cartItemCount: 0,
12
+ onClick: () => alert("Cart clicked")
13
+ }
14
+ }, o = {
15
+ args: {
16
+ cartItemCount: 15,
17
+ onClick: () => alert("Cart clicked")
18
+ }
19
+ };
20
+ export {
21
+ o as CartWithItems,
22
+ r as EmptyCart,
23
+ e as default
24
+ };
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ import { HideAtProps } from '../../atoms/HideAt';
3
+ interface HamburgerMenuProps extends HideAtProps {
4
+ children: React.ReactNode;
5
+ }
6
+ export declare function HamburgerMenu({ hideAt, children }: HamburgerMenuProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,63 @@
1
+ import { jsxs as m, jsx as o } from "react/jsx-runtime";
2
+ import { useState as u, useRef as l, useEffect as f } from "react";
3
+ import { getHideAtStyles as d } from "../../atoms/HideAt.js";
4
+ import { Flex as p } from "../../atoms/Flex/Flex.js";
5
+ import { Icon as _ } from "../../atoms/Icon/Icon.js";
6
+ import { c as b } from "../../clsx-OuTLNxxd.js";
7
+ import '../../assets/HamburgerMenu.css';const C = "_hamburgerContainer_b84wp_1", g = "_menuIcon_b84wp_4", h = "_menuContent_b84wp_8", v = "_closeContainer_b84wp_22", w = "_overlay_b84wp_41", t = {
8
+ hamburgerContainer: C,
9
+ menuIcon: g,
10
+ menuContent: h,
11
+ closeContainer: v,
12
+ overlay: w
13
+ };
14
+ function j({ hideAt: s, children: c }) {
15
+ const [e, r] = u(!1), a = l(null);
16
+ return f(() => {
17
+ if (!e) return;
18
+ function n(i) {
19
+ a.current && !a.current.contains(i.target) && r(!1);
20
+ }
21
+ return document.addEventListener("mousedown", n), () => document.removeEventListener("mousedown", n);
22
+ }, [e]), /* @__PURE__ */ m(
23
+ "div",
24
+ {
25
+ ref: a,
26
+ className: b(t.hamburgerContainer, d(s)),
27
+ children: [
28
+ e && /* @__PURE__ */ o(
29
+ "div",
30
+ {
31
+ className: t.overlay,
32
+ onClick: () => r(!1),
33
+ "aria-hidden": "true"
34
+ }
35
+ ),
36
+ /* @__PURE__ */ o(
37
+ p,
38
+ {
39
+ flexDirection: "row",
40
+ className: t.menuIcon,
41
+ onClick: () => r((n) => !n),
42
+ "aria-expanded": e,
43
+ "aria-controls": "hamburger-menu-content",
44
+ role: "button",
45
+ children: /* @__PURE__ */ o(_, { iconKey: "fa-kit fa-bars", title: "Menu", size: "lg" })
46
+ }
47
+ ),
48
+ e && /* @__PURE__ */ o(
49
+ "div",
50
+ {
51
+ id: "hamburger-menu-content",
52
+ className: t.menuContent,
53
+ role: "menu",
54
+ children: c
55
+ }
56
+ )
57
+ ]
58
+ }
59
+ );
60
+ }
61
+ export {
62
+ j as HamburgerMenu
63
+ };