@blakesteve/roster 5.8.0 → 5.10.0

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 (44) hide show
  1. package/README.md +126 -23
  2. package/dist/components/atoms/Button/button-variants.js +1 -1
  3. package/dist/components/atoms/Eyebrow/eyebrow-variants.d.ts +2 -2
  4. package/dist/components/atoms/Input/input-variants.js +1 -1
  5. package/dist/components/atoms/Skeleton/Skeleton.cjs +1 -1
  6. package/dist/components/atoms/Skeleton/Skeleton.d.ts +19 -3
  7. package/dist/components/atoms/Skeleton/Skeleton.js +38 -33
  8. package/dist/components/atoms/ThemeToggle/ThemeToggle.d.ts +1 -1
  9. package/dist/components/molecules/CheckboxGroup/CheckboxGroup.d.ts +1 -1
  10. package/dist/components/molecules/CheckboxGroup/checkbox-group-variants.d.ts +1 -1
  11. package/dist/components/molecules/Menu/Menu.cjs +1 -0
  12. package/dist/components/molecules/Menu/Menu.d.ts +169 -0
  13. package/dist/components/molecules/Menu/Menu.js +577 -0
  14. package/dist/components/molecules/Menu/menu-typeahead.cjs +1 -0
  15. package/dist/components/molecules/Menu/menu-typeahead.d.ts +7 -0
  16. package/dist/components/molecules/Menu/menu-typeahead.js +13 -0
  17. package/dist/components/molecules/SkeletonPresets/SkeletonPresets.cjs +1 -1
  18. package/dist/components/molecules/SkeletonPresets/SkeletonPresets.d.ts +13 -4
  19. package/dist/components/molecules/SkeletonPresets/SkeletonPresets.js +35 -35
  20. package/dist/components/molecules/Toast/Toaster.d.ts +1 -1
  21. package/dist/components/organisms/Navbar/Navbar.cjs +1 -1
  22. package/dist/components/organisms/Navbar/Navbar.d.ts +1 -1
  23. package/dist/components/organisms/Navbar/Navbar.js +275 -302
  24. package/dist/index.d.ts +1 -0
  25. package/dist/lib/utils.cjs +1 -1
  26. package/dist/lib/utils.js +4 -1
  27. package/dist/meta.json +3 -3
  28. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +7 -7
  29. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +2 -2
  30. package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +5 -5
  31. package/dist/node_modules/@headlessui/react/dist/components/portal/portal.js +6 -6
  32. package/dist/node_modules/@headlessui/react/dist/utils/focus-management.cjs +1 -1
  33. package/dist/node_modules/@headlessui/react/dist/utils/focus-management.js +52 -61
  34. package/dist/node_modules/@radix-ui/react-popper/dist/index.js +6 -6
  35. package/dist/roster.cjs +1 -1
  36. package/dist/roster.css +1 -1
  37. package/dist/roster.js +127 -116
  38. package/package.json +2 -1
  39. package/dist/node_modules/@headlessui/react/dist/components/menu/menu-machine-glue.cjs +0 -1
  40. package/dist/node_modules/@headlessui/react/dist/components/menu/menu-machine-glue.js +0 -21
  41. package/dist/node_modules/@headlessui/react/dist/components/menu/menu-machine.cjs +0 -1
  42. package/dist/node_modules/@headlessui/react/dist/components/menu/menu-machine.js +0 -120
  43. package/dist/node_modules/@headlessui/react/dist/components/menu/menu.cjs +0 -1
  44. package/dist/node_modules/@headlessui/react/dist/components/menu/menu.js +0 -197
@@ -1,20 +1,25 @@
1
1
  import { CSSProperties } from 'react';
2
2
  import { CardProps } from '../../atoms/Card/Card';
3
+ import { SkeletonAnimation } from '../../atoms/Skeleton/Skeleton';
3
4
  export interface SkeletonCardProps extends Pick<CardProps, "variant" | "padding"> {
4
5
  /** A media block above the text, at this height (an image, a chart). */
5
6
  media?: CSSProperties["height"];
6
7
  /** Body lines under the title. */
7
8
  lines?: number;
9
+ /** How its skeletons move: see `Skeleton`. Inside a `SkeletonRegion`, the region's. */
10
+ animation?: SkeletonAnimation;
8
11
  className?: string;
9
12
  }
10
13
  /**
11
14
  * A Card loading. Stands in for a Card holding an optional media block (with
12
15
  * 16px below it), a `text-base` title, and `text-sm` body lines 8px under it.
13
16
  */
14
- declare function SkeletonCard({ media, lines, variant, padding, className }: SkeletonCardProps): import("react/jsx-runtime").JSX.Element;
17
+ declare function SkeletonCard({ media, lines, variant, padding, animation, className }: SkeletonCardProps): import("react/jsx-runtime").JSX.Element;
15
18
  export interface SkeletonTableRowProps {
16
19
  /** How many cells. */
17
20
  columns: number;
21
+ /** How its skeletons move: see `Skeleton`. Inside a `SkeletonRegion`, the region's. */
22
+ animation?: SkeletonAnimation;
18
23
  className?: string;
19
24
  }
20
25
  /**
@@ -22,16 +27,18 @@ export interface SkeletonTableRowProps {
22
27
  * size, each holding one line in the cell's text size. Stands in for a row of
23
28
  * one-line cells.
24
29
  */
25
- declare function SkeletonTableRow({ columns, className }: SkeletonTableRowProps): import("react/jsx-runtime").JSX.Element;
30
+ declare function SkeletonTableRow({ columns, animation, className }: SkeletonTableRowProps): import("react/jsx-runtime").JSX.Element;
26
31
  export interface SkeletonAvatarProps {
27
32
  /** Avatar's sizes. */
28
33
  size?: "xs" | "sm" | "md" | "lg" | "xl";
29
34
  /** A name line beside it, in `text-sm`. */
30
35
  withName?: boolean;
36
+ /** How its skeletons move: see `Skeleton`. Inside a `SkeletonRegion`, the region's. */
37
+ animation?: SkeletonAnimation;
31
38
  className?: string;
32
39
  }
33
40
  /** An Avatar loading, and optionally the name beside it. */
34
- declare function SkeletonAvatar({ size, withName, className }: SkeletonAvatarProps): import("react/jsx-runtime").JSX.Element;
41
+ declare function SkeletonAvatar({ size, withName, animation, className }: SkeletonAvatarProps): import("react/jsx-runtime").JSX.Element;
35
42
  export interface SkeletonStatProps {
36
43
  /** Stat's sizes. */
37
44
  size?: "sm" | "md" | "lg";
@@ -43,6 +50,8 @@ export interface SkeletonStatProps {
43
50
  semantics?: "definition" | "standalone";
44
51
  /** A source line under the figure, as a Stat with `source` has. */
45
52
  source?: boolean;
53
+ /** How its skeletons move: see `Skeleton`. Inside a `SkeletonRegion`, the region's. */
54
+ animation?: SkeletonAnimation;
46
55
  className?: string;
47
56
  }
48
57
  /**
@@ -51,5 +60,5 @@ export interface SkeletonStatProps {
51
60
  * the label is the real Eyebrow, a flex item where Stat's is, so it makes the
52
61
  * same line.
53
62
  */
54
- declare function SkeletonStat({ size, semantics, source, className }: SkeletonStatProps): import("react/jsx-runtime").JSX.Element;
63
+ declare function SkeletonStat({ size, semantics, source, animation, className }: SkeletonStatProps): import("react/jsx-runtime").JSX.Element;
55
64
  export { SkeletonCard, SkeletonTableRow, SkeletonAvatar, SkeletonStat };
@@ -1,45 +1,45 @@
1
1
  "use client";
2
2
  import { jsx as t, jsxs as o } from "react/jsx-runtime";
3
- import { cn as n } from "../../../lib/utils.js";
4
- import { Card as p } from "../../atoms/Card/Card.js";
5
- import { Eyebrow as u } from "../../atoms/Eyebrow/Eyebrow.js";
6
- import { statValueVariants as f, statSourceClass as h } from "../../atoms/Stat/stat-variants.js";
7
- import { TableRow as w, TableCell as g } from "../../organisms/Table/Table.js";
8
- import { Skeleton as r } from "../../atoms/Skeleton/Skeleton.js";
9
- function C({ media: s, lines: a = 3, variant: e, padding: l, className: i }) {
10
- return /* @__PURE__ */ o(p, { variant: e, padding: l, className: i, "aria-hidden": "true", "data-skeleton": "card", children: [
11
- s !== void 0 && /* @__PURE__ */ t(r, { shape: "block", height: s, className: "rst:mb-4" }),
12
- /* @__PURE__ */ t(r, { size: "lg", width: "45%" }),
13
- a > 0 && /* @__PURE__ */ t(r, { size: "md", lines: a, className: "rst:mt-2" })
3
+ import { cn as d } from "../../../lib/utils.js";
4
+ import { Card as u } from "../../atoms/Card/Card.js";
5
+ import { Eyebrow as f } from "../../atoms/Eyebrow/Eyebrow.js";
6
+ import { statValueVariants as w, statSourceClass as m } from "../../atoms/Stat/stat-variants.js";
7
+ import { TableRow as g, TableCell as k } from "../../organisms/Table/Table.js";
8
+ import { Skeleton as e } from "../../atoms/Skeleton/Skeleton.js";
9
+ function T({ media: a, lines: l = 3, variant: s, padding: r, animation: n, className: i }) {
10
+ return /* @__PURE__ */ o(u, { variant: s, padding: r, className: i, "aria-hidden": "true", "data-skeleton": "card", children: [
11
+ a !== void 0 && /* @__PURE__ */ t(e, { shape: "block", height: a, animation: n, className: "rst:mb-4" }),
12
+ /* @__PURE__ */ t(e, { size: "lg", width: "45%", animation: n }),
13
+ l > 0 && /* @__PURE__ */ t(e, { size: "md", lines: l, animation: n, className: "rst:mt-2" })
14
14
  ] });
15
15
  }
16
- function T({ columns: s, className: a }) {
17
- const e = ["70%", "50%", "60%", "40%"];
18
- return /* @__PURE__ */ t(w, { "aria-hidden": "true", className: a, "data-skeleton": "table-row", children: Array.from({ length: Math.max(1, s) }, (l, i) => /* @__PURE__ */ t(g, { children: /* @__PURE__ */ t(r, { size: "inherit", width: e[i % e.length] }) }, i)) });
16
+ function j({ columns: a, animation: l, className: s }) {
17
+ const r = ["70%", "50%", "60%", "40%"];
18
+ return /* @__PURE__ */ t(g, { "aria-hidden": "true", className: s, "data-skeleton": "table-row", children: Array.from({ length: Math.max(1, a) }, (n, i) => /* @__PURE__ */ t(k, { children: /* @__PURE__ */ t(e, { size: "inherit", width: r[i % r.length], animation: l }) }, i)) });
19
19
  }
20
- function j({ size: s = "md", withName: a = !1, className: e }) {
21
- return a ? /* @__PURE__ */ o("span", { "aria-hidden": "true", className: n("rst:flex rst:items-center rst:gap-3", e), "data-skeleton": "avatar", children: [
22
- /* @__PURE__ */ t(r, { shape: "circle", size: s }),
23
- /* @__PURE__ */ t(r, { size: "md", width: "8rem" })
24
- ] }) : /* @__PURE__ */ t(r, { shape: "circle", size: s, className: e });
20
+ function y({ size: a = "md", withName: l = !1, animation: s, className: r }) {
21
+ return l ? /* @__PURE__ */ o("span", { "aria-hidden": "true", className: d("rst:flex rst:items-center rst:gap-3", r), "data-skeleton": "avatar", children: [
22
+ /* @__PURE__ */ t(e, { shape: "circle", size: a, animation: s }),
23
+ /* @__PURE__ */ t(e, { size: "md", width: "8rem", animation: s })
24
+ ] }) : /* @__PURE__ */ t(e, { shape: "circle", size: a, animation: s, className: r });
25
25
  }
26
- function y({ size: s = "md", semantics: a = "definition", source: e = !1, className: l }) {
27
- const i = f({ size: s, colorScheme: "neutral" }), d = /* @__PURE__ */ t(r, { size: "inherit", width: "2.5em" }), c = /* @__PURE__ */ t(u, { size: "xs", children: /* @__PURE__ */ t(r, { size: "inherit", width: "9em" }) }), m = /* @__PURE__ */ t("span", { className: h, children: /* @__PURE__ */ t(r, { size: "inherit", width: "12em" }) });
28
- return a === "standalone" ? /* @__PURE__ */ o("span", { "aria-hidden": "true", className: n("rst:flex rst:flex-col rst:gap-[3px]", l), "data-skeleton": "stat", children: [
29
- /* @__PURE__ */ t("span", { className: i, children: d }),
30
- c,
31
- e && m
32
- ] }) : /* @__PURE__ */ o("div", { "aria-hidden": "true", className: n("rst:grid rst:content-start rst:gap-[3px]", l), "data-skeleton": "stat", children: [
33
- /* @__PURE__ */ t("dt", { className: "rst:relative rst:col-start-1 rst:row-start-2 rst:flex", children: c }),
34
- e ? /* @__PURE__ */ o("dd", { className: n("rst:m-0", i, "rst:col-start-1 rst:row-span-3 rst:row-start-1 rst:grid rst:grid-rows-subgrid"), children: [
35
- /* @__PURE__ */ t("span", { className: "rst:row-start-1", children: d }),
36
- /* @__PURE__ */ t("span", { className: n(h, "rst:row-start-3"), children: /* @__PURE__ */ t(r, { size: "inherit", width: "12em" }) })
37
- ] }) : /* @__PURE__ */ t("dd", { className: n("rst:m-0 rst:col-start-1 rst:row-start-1", i), children: d })
26
+ function A({ size: a = "md", semantics: l = "definition", source: s = !1, animation: r, className: n }) {
27
+ const i = w({ size: a, colorScheme: "neutral" }), c = /* @__PURE__ */ t(e, { size: "inherit", width: "2.5em", animation: r }), h = /* @__PURE__ */ t(f, { size: "xs", children: /* @__PURE__ */ t(e, { size: "inherit", width: "9em", animation: r }) }), p = /* @__PURE__ */ t("span", { className: m, children: /* @__PURE__ */ t(e, { size: "inherit", width: "12em", animation: r }) });
28
+ return l === "standalone" ? /* @__PURE__ */ o("span", { "aria-hidden": "true", className: d("rst:flex rst:flex-col rst:gap-[3px]", n), "data-skeleton": "stat", children: [
29
+ /* @__PURE__ */ t("span", { className: i, children: c }),
30
+ h,
31
+ s && p
32
+ ] }) : /* @__PURE__ */ o("div", { "aria-hidden": "true", className: d("rst:grid rst:content-start rst:gap-[3px]", n), "data-skeleton": "stat", children: [
33
+ /* @__PURE__ */ t("dt", { className: "rst:relative rst:col-start-1 rst:row-start-2 rst:flex", children: h }),
34
+ s ? /* @__PURE__ */ o("dd", { className: d("rst:m-0", i, "rst:col-start-1 rst:row-span-3 rst:row-start-1 rst:grid rst:grid-rows-subgrid"), children: [
35
+ /* @__PURE__ */ t("span", { className: "rst:row-start-1", children: c }),
36
+ /* @__PURE__ */ t("span", { className: d(m, "rst:row-start-3"), children: /* @__PURE__ */ t(e, { size: "inherit", width: "12em", animation: r }) })
37
+ ] }) : /* @__PURE__ */ t("dd", { className: d("rst:m-0 rst:col-start-1 rst:row-start-1", i), children: c })
38
38
  ] });
39
39
  }
40
40
  export {
41
- j as SkeletonAvatar,
42
- C as SkeletonCard,
43
- y as SkeletonStat,
44
- T as SkeletonTableRow
41
+ y as SkeletonAvatar,
42
+ T as SkeletonCard,
43
+ A as SkeletonStat,
44
+ j as SkeletonTableRow
45
45
  };
@@ -21,7 +21,7 @@ export interface ToasterProps extends Pick<HotToasterProps, "position" | "gutter
21
21
  * already depend on it at the same version and already write
22
22
  * `toast.success(...)`. Wrapping means their call sites do not move; what
23
23
  * changes is that the toast stops being styled with hardcoded hex in each app
24
- * — game-verdict pinned `#1a1f2e` and `#10b981`, mega-squad `#413f3c` and
24
+ * — one app pinned `#1a1f2e` and `#10b981`, the other `#413f3c` and
25
25
  * `#f3eee3`, neither of which is in either app's palette any more.
26
26
  *
27
27
  * The `children` render prop is used rather than `toastOptions`, so the body
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),p=require("react"),u=require("../../../node_modules/@fortawesome/react-fontawesome/dist/index.cjs"),m=require("../../../node_modules/@fortawesome/free-solid-svg-icons/index.cjs"),e=require("../../../lib/utils.cjs"),sr=require("../../../lib/labels.cjs"),y=require("../../atoms/Button/Button.cjs"),j=require("../../atoms/Link/Link.cjs"),X=require("../../atoms/Badge/Badge.cjs"),er=require("../../atoms/Avatar/Avatar.cjs"),K=require("../../atoms/Switch/switch-variants.cjs"),ar=require("./navbar-variants.cjs"),g=require("../../../node_modules/@headlessui/react/dist/components/menu/menu.cjs"),O=require("../../../node_modules/@headlessui/react/dist/components/popover/popover.cjs"),G=require("../../../node_modules/@headlessui/react/dist/components/transition/transition.cjs");function J({on:s,size:a}){return r.jsx("span",{"aria-hidden":"true","data-testid":"navbar-theme-track","data-checked":s?"":void 0,className:e.cn(K.switchTrackVariants({size:a,variant:"neutral"}),"rst:pointer-events-none"),children:r.jsx("span",{className:e.cn(K.switchThumbVariants({size:a}))})})}const nr=s=>{s?.setAttribute("role","menuitemcheckbox")},Q=(s,a)=>typeof s=="function"?s({close:a}):s,ir={openMainMenu:"Open main menu",closeMainMenu:"Close menu",openUserMenu:"Open user menu",logIn:"Log In",logOut:"Log Out",darkMode:"Dark Mode",pendingInvitations:"Pending Invitations",inbox:s=>`Inbox (${s})`};function or(s){return p.useSyncExternalStore(a=>{if(!s||typeof document>"u")return()=>{};const n=new MutationObserver(a);return n.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>n.disconnect()},()=>s&&document.documentElement.classList.contains("dark"),()=>!1)}function cr({close:s}){return p.useEffect(()=>{const a=n=>{const v=document.querySelector("[data-roster-mobile-panel]"),N=document.querySelector("[data-roster-hamburger]"),f=n.target;!v?.contains(f)&&!N?.contains(f)&&s()};return document.addEventListener("pointerdown",a,{capture:!0}),()=>document.removeEventListener("pointerdown",a,{capture:!0})},[s]),null}function lr({activePath:s,close:a}){const n=p.useRef(s);return p.useEffect(()=>{n.current!==s&&(n.current=s,a())},[s,a]),null}const dr=({logoSrc:s,logoSize:a="2rem",logoHeight:n,logoWidth:v,logoClassName:N,brandName:f,items:E,activePath:w,routerElement:k,user:i,onLogin:M,onLogout:B,onInboxClick:I,onThemeToggle:b,actions:Y,brandElement:R,navActions:Z,userMenuItems:A=[],className:_,variant:l="default",position:H="sticky",themeMode:z,labels:W,notificationVariant:V="error",notificationFill:T="solid",...rr})=>{const o=sr.withLabels(ir,W),F=(i?.notificationCount||0)>0,q=h=>typeof h=="number"?`${h}px`:h,$=n!==void 0||v!==void 0,P=$?{width:v===void 0?"auto":q(v),height:n===void 0?"auto":q(n)}:{width:q(a),height:q(a)},U=$&&"rst:object-contain rst:object-left rst:rtl:object-right",tr=or(z==="auto"),d=(z==="auto"?tr?"dark":"light":z??(l==="white"||l==="default"?"light":"dark"))==="dark",C=l==="slate"||l==="primary"||l==="default"&&d||l==="white"&&d||l==="transparent"&&d,S=l==="primary"?{brand:"rst:text-primary-700-ink rst:hover:text-primary-700-ink/80 rst:dark:text-white rst:dark:hover:text-gray-200",linkBase:"rst:text-primary-700-ink/80 rst:hover:text-primary-700-ink rst:dark:text-gray-300 rst:dark:hover:text-white",linkActive:"rst:text-primary-700-ink rst:font-semibold rst:hover:text-primary-700-ink/80 rst:dark:text-primary-400 rst:dark:hover:text-primary-300",hamburger:"rst:text-primary-700-ink/80 rst:hover:bg-primary-700-ink/10 rst:hover:text-primary-700-ink rst:dark:text-gray-300 rst:dark:hover:bg-white/10 rst:dark:hover:text-white"}:{brand:C?"rst:text-white rst:dark:text-white rst:hover:text-gray-200 rst:dark:hover:text-gray-200":"rst:text-gray-900 rst:dark:text-gray-900 rst:hover:text-gray-600 rst:dark:hover:text-gray-600",linkBase:C?"rst:text-gray-300 rst:dark:text-gray-300 rst:hover:text-white rst:dark:hover:text-white":"rst:text-gray-600 rst:dark:text-gray-600 rst:hover:text-gray-900 rst:dark:hover:text-gray-900",linkActive:C?"rst:text-primary-400 rst:dark:text-primary-400 rst:font-semibold rst:hover:text-primary-300 rst:dark:hover:text-primary-300":"rst:text-primary-600 rst:dark:text-primary-600 rst:font-semibold rst:hover:text-primary-700 rst:dark:hover:text-primary-700",hamburger:C?"rst:text-gray-300 rst:dark:text-gray-300 rst:hover:bg-white/10 rst:dark:hover:bg-white/10 rst:hover:text-white rst:dark:hover:text-white":"rst:text-gray-500 rst:dark:text-gray-500 rst:hover:bg-gray-100 rst:dark:hover:bg-gray-100 rst:hover:text-gray-700 rst:dark:hover:text-gray-700"};return r.jsx(O.Popover,{as:"nav",className:e.cn("rst:z-50",ar.navbarVariants({variant:l,position:H}),_),...rr,children:({open:h,close:x})=>{const D=Q(Y,x),L=Q(Z,x);return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"rst:container rst:mx-auto rst:flex rst:items-center rst:justify-between rst:px-4 rst:h-16",children:[r.jsxs(j.Link,{as:k,href:"/",to:"/",variant:"neutral",underline:"none",className:e.cn("rst:flex rst:items-center rst:gap-3 rst:transition-opacity",S.brand),children:[r.jsx("img",{src:s,alt:"",style:P,className:e.cn("rst:shrink-0",U,N??"rst:rounded-md")}),R??r.jsx("span",{className:"rst:text-xl rst:font-bold rst:tracking-tight",children:f})]}),r.jsxs("div",{className:"rst:hidden rst:md:flex rst:items-center rst:gap-8",children:[r.jsx("div",{className:"rst:flex rst:items-center rst:gap-6",children:E.map(t=>{const c=w===t.path;return r.jsxs(j.Link,{as:k,href:t.path,to:t.path,variant:"neutral",underline:"none",className:e.cn("rst:inline-flex rst:items-center rst:gap-1.5 rst:text-sm rst:transition-colors rst:duration-200",c?S.linkActive:S.linkBase),children:[t.label,t.badge&&r.jsx("span",{className:"rst:inline-flex",children:t.badge})]},t.path)})}),L,D??(i?r.jsxs(g.Menu,{as:"div",className:"rst:relative rst:ml-2",children:[r.jsxs(g.MenuButton,{className:"rst:relative rst:flex rst:rounded-full rst:text-sm rst:focus-visible:outline-hidden rst:focus-visible:ring-2 rst:focus-visible:ring-ring rst:focus-visible:ring-offset-2 rst:ring-offset-background",children:[r.jsx("span",{className:"rst:sr-only",children:o.openUserMenu}),r.jsx(er.Avatar,{"aria-hidden":"true",alt:"",initials:i.initials,src:i.avatarSrc,size:"sm",shape:"circle",colorScheme:i.avatarColor??"primary"}),F&&r.jsx("div",{className:"rst:absolute rst:-top-1 rst:-right-2",children:r.jsx(X.Badge,{fill:T,size:"xs",statusBadge:!0,variant:V,children:i.notificationCount})})]}),r.jsx(G.Transition,{as:p.Fragment,enter:"rst:transition rst:ease-out rst:duration-100",enterFrom:"rst:transform rst:opacity-0 rst:scale-95",enterTo:"rst:transform rst:opacity-100 rst:scale-100",leave:"rst:transition rst:ease-in rst:duration-75",leaveFrom:"rst:transform rst:opacity-100 rst:scale-100",leaveTo:"rst:transform rst:opacity-0 rst:scale-95",children:r.jsxs(g.MenuItems,{className:"rst:absolute rst:right-0 rst:z-50 rst:mt-2 rst:w-48 rst:origin-top-right rst:rounded-md rst:bg-white rst:dark:bg-gray-800 rst:py-1 rst:elevation-anchored rst:ring rst:ring-black/5 rst:dark:ring-white/10 rst:focus:outline-hidden rst:divide-y rst:divide-gray-100 rst:dark:divide-gray-700",children:[r.jsxs("div",{className:"rst:py-1",children:[F&&I&&r.jsx(g.MenuItem,{children:({focus:t})=>r.jsx(y.Button,{variant:"ghost",colorScheme:"neutral",size:"sm",onClick:I,className:e.cn("rst:w-full rst:justify-start rst:rounded-none rst:px-4",t&&"rst:bg-gray-50 rst:dark:bg-gray-700"),startIcon:r.jsx(u.FontAwesomeIcon,{icon:m.faInbox,className:"rst:text-primary-500 rst:w-4"}),children:o.inbox(i.notificationCount??0)})}),b&&r.jsx(g.MenuItem,{children:({focus:t})=>r.jsxs("div",{ref:nr,"aria-checked":d,onClick:c=>{c.preventDefault(),b()},className:e.cn("rst:flex rst:w-full rst:items-center rst:justify-between rst:px-4 rst:py-2 rst:text-sm rst:text-gray-700 rst:dark:text-gray-200 rst:cursor-pointer rst:transition-colors",t&&"rst:bg-gray-50 rst:dark:bg-gray-700"),children:[r.jsxs("div",{className:"rst:flex rst:items-center rst:gap-2",children:[r.jsx(u.FontAwesomeIcon,{icon:m.faMoon,className:e.cn("rst:w-4 rst:transition-colors",d?"rst:text-amber-500":"rst:text-gray-400")}),r.jsx("span",{className:"rst:font-medium",children:o.darkMode})]}),r.jsx(J,{on:d,size:"xs"})]})})]}),A.length>0&&r.jsx("div",{className:"rst:py-1",children:A.map(t=>r.jsx(g.MenuItem,{children:({focus:c})=>r.jsxs(j.Link,{as:k,href:t.path,to:t.path,variant:"neutral",underline:"none",className:e.cn("rst:flex rst:w-full rst:items-center rst:justify-between rst:gap-2 rst:px-4 rst:py-2 rst:text-sm rst:text-gray-700 rst:dark:text-gray-200 rst:transition-colors",c&&"rst:bg-gray-50 rst:dark:bg-gray-700"),children:[t.label,t.badge&&r.jsx("span",{className:"rst:inline-flex",children:t.badge})]})},t.path))}),B&&r.jsx("div",{className:"rst:py-1",children:r.jsx(g.MenuItem,{children:({focus:t})=>r.jsx(y.Button,{variant:"ghost",colorScheme:"neutral",size:"sm",onClick:B,className:e.cn("rst:w-full rst:justify-start rst:rounded-none rst:px-4",t&&"rst:bg-gray-50 rst:dark:bg-gray-700"),startIcon:r.jsx(u.FontAwesomeIcon,{icon:m.faRightFromBracket,className:"rst:text-gray-400 rst:dark:text-gray-500 rst:w-4"}),children:o.logOut})})})]})})]}):r.jsx(y.Button,{size:"sm",variant:"solid",colorScheme:"primary",onClick:M,children:o.logIn}))]}),r.jsx("div",{"data-roster-hamburger":!0,className:"rst:flex rst:md:hidden",children:r.jsxs(O.PopoverButton,{className:e.cn("rst:inline-flex rst:items-center rst:justify-center rst:rounded-md rst:p-2 rst:focus-visible:outline-hidden rst:focus-visible:ring-2 rst:focus-visible:ring-ring rst:focus-visible:ring-offset-2 rst:ring-offset-background",S.hamburger),children:[r.jsx("span",{className:"rst:sr-only",children:o.openMainMenu}),h?r.jsx(u.FontAwesomeIcon,{icon:m.faXmark,className:"rst:block rst:h-6 rst:w-6","aria-hidden":"true"}):r.jsxs("div",{className:"rst:relative",children:[r.jsx(u.FontAwesomeIcon,{icon:m.faBars,className:"rst:block rst:h-6 rst:w-6","aria-hidden":"true"}),F&&r.jsx("span",{className:"rst:absolute rst:top-0 rst:right-0 rst:block rst:h-2.5 rst:w-2.5 rst:rounded-full rst:bg-error-500 rst:ring-2 rst:ring-transparent rst:transform rst:translate-x-1/4 rst:-translate-y-1/4"})]})]})})]}),h&&r.jsx(cr,{close:x}),h&&r.jsx(lr,{activePath:w,close:x}),r.jsx(G.Transition,{as:p.Fragment,enter:"rst:duration-200 rst:ease-out",enterFrom:"rst:opacity-0 rst:scale-95",enterTo:"rst:opacity-100 rst:scale-100",leave:"rst:duration-100 rst:ease-in",leaveFrom:"rst:opacity-100 rst:scale-100",leaveTo:"rst:opacity-0 rst:scale-95",children:r.jsx(O.PopoverPanel,{focus:!0,className:"rst:absolute rst:top-0 rst:inset-x-0 rst:z-50 rst:origin-top-right rst:transform rst:p-2 rst:transition rst:md:hidden",children:r.jsxs("div",{"data-roster-mobile-panel":!0,className:"rst:rounded-lg rst:elevation-anchored rst:ring rst:ring-black/5 rst:dark:ring-white/10 rst:divide-y rst:divide-gray-100 rst:dark:divide-gray-700 rst:bg-white rst:dark:bg-gray-800",children:[r.jsxs("div",{className:"rst:px-5 rst:pt-5 rst:pb-6",children:[r.jsxs("div",{className:"rst:flex rst:items-center rst:justify-between",children:[r.jsxs("div",{className:"rst:flex rst:items-center rst:gap-3",children:[r.jsx("img",{src:s,alt:"",style:P,className:e.cn("rst:shrink-0",U,N??"rst:rounded-md")}),R??r.jsx("span",{className:"rst:font-bold rst:text-gray-900 rst:dark:text-white",children:f})]}),r.jsx("div",{className:"rst:-mr-2",children:r.jsxs(O.PopoverButton,{className:"rst:inline-flex rst:items-center rst:justify-center rst:rounded-md rst:p-2 rst:text-gray-400 rst:hover:bg-gray-100 rst:dark:hover:bg-gray-700 rst:hover:text-gray-500 rst:dark:hover:text-white rst:focus:outline-hidden",children:[r.jsx("span",{className:"rst:sr-only",children:o.closeMainMenu}),r.jsx(u.FontAwesomeIcon,{icon:m.faXmark,className:"rst:h-6 rst:w-6","aria-hidden":"true"})]})})]}),r.jsxs("div",{className:"rst:mt-6",children:[L&&r.jsx("div",{className:"rst:mb-4",children:L}),r.jsxs("nav",{className:"rst:grid rst:gap-y-4",children:[E.map(t=>{const c=w===t.path;return r.jsx(j.Link,{as:k,href:t.path,to:t.path,onClick:()=>x(),variant:"neutral",underline:"none",className:e.cn("rst:-m-3 rst:flex rst:items-center rst:rounded-md rst:p-3 rst:transition-colors","rst:hover:bg-gray-50 rst:dark:hover:bg-gray-700",c?"rst:bg-gray-50 rst:dark:bg-gray-700":"rst:text-gray-900 rst:dark:text-gray-100"),children:r.jsxs("span",{className:e.cn("rst:ml-3 rst:inline-flex rst:items-center rst:gap-1.5 rst:text-base rst:font-medium",c?"rst:text-primary-600 rst:dark:text-primary-400 rst:font-bold":"rst:text-gray-900 rst:dark:text-gray-100"),children:[t.label,t.badge&&r.jsx("span",{className:"rst:inline-flex",children:t.badge})]})},t.path)}),i&&A.length>0&&r.jsxs(r.Fragment,{children:[r.jsx("hr",{className:"rst:border-gray-100 rst:dark:border-gray-700"}),A.map(t=>{const c=w===t.path;return r.jsxs(j.Link,{as:k,href:t.path,to:t.path,onClick:()=>x(),variant:"neutral",underline:"none",className:e.cn("rst:-m-3 rst:flex rst:items-center rst:rounded-md rst:p-3 rst:transition-colors","rst:hover:bg-gray-50 rst:dark:hover:bg-gray-700",c?"rst:bg-gray-50 rst:dark:bg-gray-700":"rst:text-gray-900 rst:dark:text-gray-100"),children:[r.jsx("span",{className:e.cn("rst:ml-3 rst:text-base rst:font-medium",c?"rst:text-primary-600 rst:dark:text-primary-400 rst:font-bold":"rst:text-gray-900 rst:dark:text-gray-100"),children:t.label}),t.badge&&r.jsx("span",{className:"rst:ml-2 rst:inline-flex",children:t.badge})]},t.path)})]})]})]})]}),(i||D||M)&&r.jsx("div",{className:"rst:py-6 rst:px-5 rst:space-y-4",children:D||(!i&&M?r.jsx(y.Button,{variant:"solid",colorScheme:"primary",className:"rst:w-full rst:justify-center",onClick:()=>{M(),x()},children:o.logIn}):r.jsxs(r.Fragment,{children:[F&&I&&r.jsx(y.Button,{variant:"ghost",colorScheme:"neutral",onClick:()=>{I?.(),x()},className:"rst:w-full rst:justify-between rst:px-4 rst:text-base rst:font-medium rst:hover:bg-gray-50 rst:dark:hover:bg-gray-700 rst:text-gray-900 rst:dark:text-gray-100",endIcon:r.jsx(X.Badge,{fill:T,size:"xs",statusBadge:!0,variant:V,children:i?.notificationCount}),children:o.pendingInvitations}),b&&r.jsxs("div",{onClick:t=>{t.preventDefault(),b()},role:"switch","aria-checked":d,tabIndex:0,onKeyDown:t=>{t.repeat||(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),b())},className:"rst:flex rst:w-full rst:items-center rst:justify-between rst:rounded-md rst:px-4 rst:py-2 rst:text-base rst:transition-colors rst:cursor-pointer rst:hover:bg-gray-50 rst:dark:hover:bg-gray-700 rst:text-gray-900 rst:dark:text-gray-100",children:[r.jsxs("div",{className:"rst:flex rst:items-center rst:gap-3 rst:font-medium",children:[r.jsx(u.FontAwesomeIcon,{icon:m.faMoon,className:e.cn("rst:w-5 rst:transition-colors",d?"rst:text-amber-500":"rst:text-gray-400")}),r.jsx("span",{children:o.darkMode})]}),r.jsx(J,{on:d,size:"sm"})]}),B&&r.jsx(y.Button,{variant:"outline",colorScheme:"error",className:"rst:w-full rst:justify-center",onClick:()=>{B?.(),x()},children:o.logOut})]}))})]})})})]})}})};exports.Navbar=dr;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),m=require("react"),f=require("../../../node_modules/@fortawesome/react-fontawesome/dist/index.cjs"),p=require("../../../node_modules/@fortawesome/free-solid-svg-icons/index.cjs"),n=require("../../../lib/utils.cjs"),cr=require("../../../lib/labels.cjs"),q=require("../../atoms/Button/Button.cjs"),E=require("../../atoms/Link/Link.cjs"),J=require("../../atoms/Badge/Badge.cjs"),dr=require("../../atoms/Avatar/Avatar.cjs"),Q=require("../../atoms/Switch/switch-variants.cjs"),d=require("../../molecules/Menu/Menu.cjs"),lr=require("./navbar-variants.cjs"),L=require("../../../node_modules/@headlessui/react/dist/components/popover/popover.cjs"),ur=require("../../../node_modules/@headlessui/react/dist/components/transition/transition.cjs");function T({on:s,size:e}){return r.jsx("span",{"aria-hidden":"true","data-testid":"navbar-theme-track","data-checked":s?"":void 0,className:n.cn(Q.switchTrackVariants({size:e,variant:"neutral"}),"rst:pointer-events-none"),children:r.jsx("span",{className:n.cn(Q.switchThumbVariants({size:e}))})})}const D="rst:gap-2 rst:px-4 rst:[&>[data-menu-lead]]:w-auto rst:text-gray-700 rst:dark:text-gray-200 rst:focus:bg-gray-50 rst:focus:text-gray-700 rst:dark:focus:bg-gray-700 rst:dark:focus:text-gray-200",xr=n.cn(D,"rst:font-semibold rst:rounded-sm rst:hover:text-gray-900 rst:dark:hover:text-gray-100 rst:hover:focus:text-gray-900 rst:dark:hover:focus:text-gray-100"),W=new WeakMap;function hr(s){if(!s||typeof s=="string")return;let e=W.get(s);return e||(e=a=>r.jsx(s,{...a}),W.set(s,e)),e}const Y=n.cn(D,"rst:border rst:border-transparent rst:font-medium rst:text-gray-600 rst:dark:text-gray-400 rst:focus:text-gray-600 rst:dark:focus:text-gray-400 rst:hover:bg-gray-500/10 rst:dark:hover:bg-gray-400/15 rst:hover:focus:bg-gray-500/10 rst:dark:hover:focus:bg-gray-400/15"),Z=(s,e)=>typeof s=="function"?s({close:e}):s,mr={openMainMenu:"Open main menu",closeMainMenu:"Close menu",openUserMenu:"Open user menu",logIn:"Log In",logOut:"Log Out",darkMode:"Dark Mode",pendingInvitations:"Pending Invitations",inbox:s=>`Inbox (${s})`};function gr(s){return m.useSyncExternalStore(e=>{if(!s||typeof document>"u")return()=>{};const a=new MutationObserver(e);return a.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>a.disconnect()},()=>s&&document.documentElement.classList.contains("dark"),()=>!1)}function H(s,e){if(!e||!s)return!1;if(s.contains(e))return!0;const a=e.closest?.("[data-menu-panel]")?.getAttribute("data-menu-tree");return!!a&&!!s.querySelector(`[data-menu-tree="${CSS.escape(a)}"]`)}const yr='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';function fr({close:s,panel:e,hamburger:a}){return m.useEffect(()=>{const x=g=>{const b=g.target;!H(e.current,b)&&!a.current?.contains(b)&&s()};return document.addEventListener("pointerdown",x,{capture:!0}),()=>document.removeEventListener("pointerdown",x,{capture:!0})},[s,e,a]),null}function pr({close:s,panel:e}){return m.useEffect(()=>{const a=g=>{g.target!==e.current?.parentElement&&(H(e.current,g.target)||s())},x=requestAnimationFrame(()=>{e.current?.querySelector(yr)?.focus(),document.addEventListener("focusin",a)});return()=>{cancelAnimationFrame(x),document.removeEventListener("focusin",a)}},[s,e]),null}function vr({activePath:s,close:e}){const a=m.useRef(s);return m.useEffect(()=>{a.current!==s&&(a.current=s,e())},[s,e]),null}const br=({logoSrc:s,logoSize:e="2rem",logoHeight:a,logoWidth:x,logoClassName:g,brandName:b,items:_,activePath:w,routerElement:k,user:i,onLogin:M,onLogout:S,onInboxClick:j,onThemeToggle:v,actions:rr,brandElement:z,navActions:tr,userMenuItems:F=[],className:sr,variant:l="default",position:er="sticky",themeMode:O,labels:ar,notificationVariant:P="error",notificationFill:V="solid",...nr})=>{const o=cr.withLabels(mr,ar),ir=hr(k),N=(i?.notificationCount||0)>0,I=h=>typeof h=="number"?`${h}px`:h,$=a!==void 0||x!==void 0,G=$?{width:x===void 0?"auto":I(x),height:a===void 0?"auto":I(a)}:{width:I(e),height:I(e)},K=$&&"rst:object-contain rst:object-left rst:rtl:object-right",or=gr(O==="auto"),u=(O==="auto"?or?"dark":"light":O??(l==="white"||l==="default"?"light":"dark"))==="dark",A=l==="slate"||l==="primary"||l==="default"&&u||l==="white"&&u||l==="transparent"&&u,B=l==="primary"?{brand:"rst:text-primary-700-ink rst:hover:text-primary-700-ink/80 rst:dark:text-white rst:dark:hover:text-gray-200",linkBase:"rst:text-primary-700-ink/80 rst:hover:text-primary-700-ink rst:dark:text-gray-300 rst:dark:hover:text-white",linkActive:"rst:text-primary-700-ink rst:font-semibold rst:hover:text-primary-700-ink/80 rst:dark:text-primary-400 rst:dark:hover:text-primary-300",hamburger:"rst:text-primary-700-ink/80 rst:hover:bg-primary-700-ink/10 rst:hover:text-primary-700-ink rst:dark:text-gray-300 rst:dark:hover:bg-white/10 rst:dark:hover:text-white"}:{brand:A?"rst:text-white rst:dark:text-white rst:hover:text-gray-200 rst:dark:hover:text-gray-200":"rst:text-gray-900 rst:dark:text-gray-900 rst:hover:text-gray-600 rst:dark:hover:text-gray-600",linkBase:A?"rst:text-gray-300 rst:dark:text-gray-300 rst:hover:text-white rst:dark:hover:text-white":"rst:text-gray-600 rst:dark:text-gray-600 rst:hover:text-gray-900 rst:dark:hover:text-gray-900",linkActive:A?"rst:text-primary-400 rst:dark:text-primary-400 rst:font-semibold rst:hover:text-primary-300 rst:dark:hover:text-primary-300":"rst:text-primary-600 rst:dark:text-primary-600 rst:font-semibold rst:hover:text-primary-700 rst:dark:hover:text-primary-700",hamburger:A?"rst:text-gray-300 rst:dark:text-gray-300 rst:hover:bg-white/10 rst:dark:hover:bg-white/10 rst:hover:text-white rst:dark:hover:text-white":"rst:text-gray-500 rst:dark:text-gray-500 rst:hover:bg-gray-100 rst:dark:hover:bg-gray-100 rst:hover:text-gray-700 rst:dark:hover:text-gray-700"},R=m.useRef(null),X=m.useRef(null);return r.jsx(L.Popover,{as:"nav",className:n.cn("rst:z-50",lr.navbarVariants({variant:l,position:er}),sr),...nr,children:({open:h,close:c})=>{const C=Z(rr,c),U=Z(tr,c);return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"rst:container rst:mx-auto rst:flex rst:items-center rst:justify-between rst:px-4 rst:h-16",children:[r.jsxs(E.Link,{as:k,href:"/",to:"/",variant:"neutral",underline:"none",className:n.cn("rst:flex rst:items-center rst:gap-3 rst:transition-opacity",B.brand),children:[r.jsx("img",{src:s,alt:"",style:G,className:n.cn("rst:shrink-0",K,g??"rst:rounded-md")}),z??r.jsx("span",{className:"rst:text-xl rst:font-bold rst:tracking-tight",children:b})]}),r.jsxs("div",{className:"rst:hidden rst:md:flex rst:items-center rst:gap-8",children:[r.jsx("div",{className:"rst:flex rst:items-center rst:gap-6",children:_.map(t=>{const y=w===t.path;return r.jsxs(E.Link,{as:k,href:t.path,to:t.path,variant:"neutral",underline:"none",className:n.cn("rst:inline-flex rst:items-center rst:gap-1.5 rst:text-sm rst:transition-colors rst:duration-200",y?B.linkActive:B.linkBase),children:[t.label,t.badge&&r.jsx("span",{className:"rst:inline-flex",children:t.badge})]},t.path)})}),U,C??(i?r.jsx("div",{className:"rst:relative rst:ml-2",children:r.jsxs(d.Menu,{linkComponent:ir,children:[r.jsxs(d.MenuButton,{plain:!0,className:"rst:relative rst:flex rst:rounded-full rst:text-sm rst:focus-visible:outline-hidden rst:focus-visible:ring-2 rst:focus-visible:ring-ring rst:focus-visible:ring-offset-2 rst:ring-offset-background rst:before:absolute rst:before:-inset-1.5 rst:before:content-['']",children:[r.jsx("span",{className:"rst:sr-only",children:o.openUserMenu}),r.jsx(dr.Avatar,{"aria-hidden":"true",alt:"",initials:i.initials,src:i.avatarSrc,size:"sm",shape:"circle",colorScheme:i.avatarColor??"primary"}),N&&r.jsx("div",{className:"rst:absolute rst:-top-1 rst:-right-2",children:r.jsx(J.Badge,{fill:V,size:"xs",statusBadge:!0,variant:P,children:i.notificationCount})})]}),r.jsxs(d.MenuItems,{align:"end",offset:8,className:"rst:w-48 rst:min-w-0 rst:bg-white rst:dark:bg-gray-800 rst:ring-black/5 rst:dark:ring-white/10 rst:divide-y rst:divide-gray-100 rst:dark:divide-gray-700",children:[(N&&j||v)&&r.jsxs(d.MenuGroup,{className:"rst:py-1",children:[N&&j&&r.jsx(d.MenuItem,{onSelect:j,className:Y,icon:r.jsx(f.FontAwesomeIcon,{icon:p.faInbox,className:"rst:text-primary-500 rst:w-4"}),children:o.inbox(i.notificationCount??0)}),v&&r.jsx(d.MenuCheckboxItem,{checked:u,onCheckedChange:()=>v(),closeOnSelect:!1,className:D,icon:r.jsx(f.FontAwesomeIcon,{icon:p.faMoon,className:n.cn("rst:w-4 rst:transition-colors",u?"rst:text-amber-500":"rst:text-gray-400")}),indicator:r.jsx(T,{on:u,size:"xs"}),children:r.jsx("span",{className:"rst:font-medium",children:o.darkMode})})]}),F.length>0&&r.jsx(d.MenuGroup,{className:"rst:py-1",children:F.map(t=>r.jsx(d.MenuItem,{href:t.path,badge:t.badge,className:xr,children:t.label},t.path))}),S&&r.jsx(d.MenuGroup,{className:"rst:py-1",children:r.jsx(d.MenuItem,{onSelect:S,className:Y,icon:r.jsx(f.FontAwesomeIcon,{icon:p.faRightFromBracket,className:"rst:text-gray-400 rst:dark:text-gray-500 rst:w-4"}),children:o.logOut})})]})]})}):r.jsx(q.Button,{size:"sm",variant:"solid",colorScheme:"primary",onClick:M,children:o.logIn}))]}),r.jsx("div",{ref:X,"data-roster-hamburger":!0,className:"rst:flex rst:md:hidden",children:r.jsxs(L.PopoverButton,{className:n.cn("rst:inline-flex rst:items-center rst:justify-center rst:rounded-md rst:p-2 rst:focus-visible:outline-hidden rst:focus-visible:ring-2 rst:focus-visible:ring-ring rst:focus-visible:ring-offset-2 rst:ring-offset-background",B.hamburger),children:[r.jsx("span",{className:"rst:sr-only",children:o.openMainMenu}),h?r.jsx(f.FontAwesomeIcon,{icon:p.faXmark,className:"rst:block rst:h-6 rst:w-6","aria-hidden":"true"}):r.jsxs("div",{className:"rst:relative",children:[r.jsx(f.FontAwesomeIcon,{icon:p.faBars,className:"rst:block rst:h-6 rst:w-6","aria-hidden":"true"}),N&&r.jsx("span",{className:"rst:absolute rst:top-0 rst:right-0 rst:block rst:h-2.5 rst:w-2.5 rst:rounded-full rst:bg-error-500 rst:ring-2 rst:ring-transparent rst:transform rst:translate-x-1/4 rst:-translate-y-1/4"})]})]})})]}),h&&r.jsx(fr,{close:c,panel:R,hamburger:X}),h&&r.jsx(pr,{close:c,panel:R}),h&&r.jsx(vr,{activePath:w,close:c}),r.jsx(ur.Transition,{as:m.Fragment,enter:"rst:duration-200 rst:ease-out",enterFrom:"rst:opacity-0 rst:scale-95",enterTo:"rst:opacity-100 rst:scale-100",leave:"rst:duration-100 rst:ease-in",leaveFrom:"rst:opacity-100 rst:scale-100",leaveTo:"rst:opacity-0 rst:scale-95",children:r.jsx(L.PopoverPanel,{className:"rst:absolute rst:top-0 rst:inset-x-0 rst:z-50 rst:origin-top-right rst:transform rst:p-2 rst:transition rst:md:hidden",children:r.jsxs("div",{ref:R,"data-roster-mobile-panel":!0,className:"rst:rounded-lg rst:elevation-anchored rst:ring rst:ring-black/5 rst:dark:ring-white/10 rst:divide-y rst:divide-gray-100 rst:dark:divide-gray-700 rst:bg-white rst:dark:bg-gray-800",children:[r.jsxs("div",{className:"rst:px-5 rst:pt-5 rst:pb-6",children:[r.jsxs("div",{className:"rst:flex rst:items-center rst:justify-between",children:[r.jsxs("div",{className:"rst:flex rst:items-center rst:gap-3",children:[r.jsx("img",{src:s,alt:"",style:G,className:n.cn("rst:shrink-0",K,g??"rst:rounded-md")}),z??r.jsx("span",{className:"rst:font-bold rst:text-gray-900 rst:dark:text-white",children:b})]}),r.jsx("div",{className:"rst:-mr-2",children:r.jsxs(L.PopoverButton,{className:"rst:inline-flex rst:items-center rst:justify-center rst:rounded-md rst:p-2 rst:text-gray-400 rst:hover:bg-gray-100 rst:dark:hover:bg-gray-700 rst:hover:text-gray-500 rst:dark:hover:text-white rst:focus:outline-hidden",children:[r.jsx("span",{className:"rst:sr-only",children:o.closeMainMenu}),r.jsx(f.FontAwesomeIcon,{icon:p.faXmark,className:"rst:h-6 rst:w-6","aria-hidden":"true"})]})})]}),r.jsxs("div",{className:"rst:mt-6",children:[U&&r.jsx("div",{className:"rst:mb-4",children:U}),r.jsxs("nav",{className:"rst:grid rst:gap-y-4",children:[_.map(t=>{const y=w===t.path;return r.jsx(E.Link,{as:k,href:t.path,to:t.path,onClick:()=>c(),variant:"neutral",underline:"none",className:n.cn("rst:-m-3 rst:flex rst:items-center rst:rounded-md rst:p-3 rst:transition-colors","rst:hover:bg-gray-50 rst:dark:hover:bg-gray-700",y?"rst:bg-gray-50 rst:dark:bg-gray-700":"rst:text-gray-900 rst:dark:text-gray-100"),children:r.jsxs("span",{className:n.cn("rst:ml-3 rst:inline-flex rst:items-center rst:gap-1.5 rst:text-base rst:font-medium",y?"rst:text-primary-600 rst:dark:text-primary-400 rst:font-bold":"rst:text-gray-900 rst:dark:text-gray-100"),children:[t.label,t.badge&&r.jsx("span",{className:"rst:inline-flex",children:t.badge})]})},t.path)}),i&&F.length>0&&r.jsxs(r.Fragment,{children:[r.jsx("hr",{className:"rst:border-gray-100 rst:dark:border-gray-700"}),F.map(t=>{const y=w===t.path;return r.jsxs(E.Link,{as:k,href:t.path,to:t.path,onClick:()=>c(),variant:"neutral",underline:"none",className:n.cn("rst:-m-3 rst:flex rst:items-center rst:rounded-md rst:p-3 rst:transition-colors","rst:hover:bg-gray-50 rst:dark:hover:bg-gray-700",y?"rst:bg-gray-50 rst:dark:bg-gray-700":"rst:text-gray-900 rst:dark:text-gray-100"),children:[r.jsx("span",{className:n.cn("rst:ml-3 rst:text-base rst:font-medium",y?"rst:text-primary-600 rst:dark:text-primary-400 rst:font-bold":"rst:text-gray-900 rst:dark:text-gray-100"),children:t.label}),t.badge&&r.jsx("span",{className:"rst:ml-2 rst:inline-flex",children:t.badge})]},t.path)})]})]})]})]}),(i||C||M)&&r.jsx("div",{className:"rst:py-6 rst:px-5 rst:space-y-4",children:C||(!i&&M?r.jsx(q.Button,{variant:"solid",colorScheme:"primary",className:"rst:w-full rst:justify-center",onClick:()=>{M(),c()},children:o.logIn}):r.jsxs(r.Fragment,{children:[N&&j&&r.jsx(q.Button,{variant:"ghost",colorScheme:"neutral",onClick:()=>{j?.(),c()},className:"rst:w-full rst:justify-between rst:px-4 rst:text-base rst:font-medium rst:hover:bg-gray-50 rst:dark:hover:bg-gray-700 rst:text-gray-900 rst:dark:text-gray-100",endIcon:r.jsx(J.Badge,{fill:V,size:"xs",statusBadge:!0,variant:P,children:i?.notificationCount}),children:o.pendingInvitations}),v&&r.jsxs("div",{onClick:t=>{t.preventDefault(),v()},role:"switch","aria-checked":u,tabIndex:0,onKeyDown:t=>{t.repeat||(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),v())},className:"rst:flex rst:w-full rst:items-center rst:justify-between rst:rounded-md rst:px-4 rst:py-2 rst:text-base rst:transition-colors rst:cursor-pointer rst:hover:bg-gray-50 rst:dark:hover:bg-gray-700 rst:text-gray-900 rst:dark:text-gray-100",children:[r.jsxs("div",{className:"rst:flex rst:items-center rst:gap-3 rst:font-medium",children:[r.jsx(f.FontAwesomeIcon,{icon:p.faMoon,className:n.cn("rst:w-5 rst:transition-colors",u?"rst:text-amber-500":"rst:text-gray-400")}),r.jsx("span",{children:o.darkMode})]}),r.jsx(T,{on:u,size:"sm"})]}),S&&r.jsx(q.Button,{variant:"outline",colorScheme:"error",className:"rst:w-full rst:justify-center",onClick:()=>{S?.(),c()},children:o.logOut})]}))})]})})})]})}})};exports.Navbar=br;
@@ -107,7 +107,7 @@ export interface NavbarProps extends React.HTMLAttributes<HTMLElement>, VariantP
107
107
  /**
108
108
  * Replaces the default brand name `<span>` with arbitrary markup. Use this
109
109
  * when you need mixed weights, colors, or other rich styling that a plain
110
- * string cannot express (e.g. bold "GAME" + thin "VERDICT").
110
+ * string can't express (e.g. a bold word beside a thin one).
111
111
  * The logo image is always rendered; this only affects the text element.
112
112
  * The logo is decorative (empty alt) because this or the brand name names
113
113
  * the link, so give it text a screen reader can read, visible or not.