@blakesteve/roster 5.2.1 → 5.3.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 (53) hide show
  1. package/README.md +121 -20
  2. package/dist/components/atoms/Avatar/Avatar.cjs +1 -1
  3. package/dist/components/atoms/Avatar/Avatar.js +1 -1
  4. package/dist/components/atoms/Avatar/avatar-variants.cjs +1 -1
  5. package/dist/components/atoms/Avatar/avatar-variants.js +1 -1
  6. package/dist/components/atoms/Button/button-variants.cjs +1 -1
  7. package/dist/components/atoms/Button/button-variants.js +3 -3
  8. package/dist/components/atoms/Card/card-variants.cjs +1 -1
  9. package/dist/components/atoms/Card/card-variants.js +3 -2
  10. package/dist/components/atoms/Checkbox/Checkbox.cjs +1 -1
  11. package/dist/components/atoms/Checkbox/Checkbox.d.ts +5 -0
  12. package/dist/components/atoms/Checkbox/Checkbox.js +54 -40
  13. package/dist/components/atoms/Checkbox/checkbox-variants.cjs +1 -1
  14. package/dist/components/atoms/Checkbox/checkbox-variants.js +1 -1
  15. package/dist/components/atoms/InlineCode/inline-code-variants.cjs +1 -1
  16. package/dist/components/atoms/InlineCode/inline-code-variants.js +1 -1
  17. package/dist/components/atoms/Input/input-variants.cjs +1 -1
  18. package/dist/components/atoms/Input/input-variants.js +17 -7
  19. package/dist/components/atoms/LabeledDivider/LabeledDivider.cjs +1 -1
  20. package/dist/components/atoms/LabeledDivider/LabeledDivider.js +6 -6
  21. package/dist/components/atoms/MultiSelect/MultiSelect.cjs +1 -1
  22. package/dist/components/atoms/MultiSelect/MultiSelect.js +19 -18
  23. package/dist/components/atoms/PasswordInput/PasswordInput.cjs +1 -1
  24. package/dist/components/atoms/PasswordInput/PasswordInput.js +1 -1
  25. package/dist/components/atoms/Select/select-variants.cjs +1 -1
  26. package/dist/components/atoms/Select/select-variants.js +9 -2
  27. package/dist/components/atoms/Switch/switch-variants.cjs +1 -1
  28. package/dist/components/atoms/Switch/switch-variants.js +1 -1
  29. package/dist/components/atoms/Textarea/textarea-variants.cjs +1 -1
  30. package/dist/components/atoms/Textarea/textarea-variants.js +17 -11
  31. package/dist/components/atoms/Tooltip/Tooltip.cjs +1 -1
  32. package/dist/components/atoms/Tooltip/Tooltip.js +1 -1
  33. package/dist/components/molecules/Accordion/Accordion.cjs +1 -1
  34. package/dist/components/molecules/Accordion/Accordion.js +19 -19
  35. package/dist/components/molecules/Alert/Alert.cjs +1 -1
  36. package/dist/components/molecules/Alert/Alert.js +1 -1
  37. package/dist/components/molecules/CheckboxGroup/CheckboxGroup.cjs +1 -1
  38. package/dist/components/molecules/CheckboxGroup/CheckboxGroup.js +28 -27
  39. package/dist/components/molecules/Toast/Toast.cjs +1 -1
  40. package/dist/components/molecules/Toast/Toast.js +1 -1
  41. package/dist/components/organisms/Dialog/Dialog.cjs +1 -1
  42. package/dist/components/organisms/Dialog/Dialog.js +28 -24
  43. package/dist/components/organisms/Navbar/Navbar.cjs +1 -1
  44. package/dist/components/organisms/Navbar/Navbar.js +2 -2
  45. package/dist/components/organisms/Sheet/Sheet.cjs +1 -1
  46. package/dist/components/organisms/Sheet/Sheet.js +1 -1
  47. package/dist/internal/popup.cjs +1 -1
  48. package/dist/internal/popup.js +1 -1
  49. package/dist/lib/utils.cjs +1 -1
  50. package/dist/lib/utils.js +16 -11
  51. package/dist/meta.json +3 -3
  52. package/dist/roster.css +1 -1
  53. package/package.json +1 -1
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),p=require("react"),c=require("../../../node_modules/@fortawesome/react-fontawesome/dist/index.cjs"),s=require("../../../node_modules/@fortawesome/free-solid-svg-icons/index.cjs"),l=require("../../../lib/utils.cjs"),g=require("./toast-variants.cjs");function x(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const a in r)if(a!=="default"){const n=Object.getOwnPropertyDescriptor(r,a);Object.defineProperty(t,a,n.get?n:{enumerable:!0,get:()=>r[a]})}}return t.default=r,Object.freeze(t)}const j=x(p),h={success:s.faCircleCheck,error:s.faCircleExclamation,amber:s.faTriangleExclamation,info:s.faCircleInfo,primary:s.faCircleInfo,neutral:s.faCircleInfo},u=j.forwardRef(({className:r,colorScheme:t="neutral",variant:a="soft",title:n,icon:i,onDismiss:o,dismissLabel:f="Dismiss",children:d,...m},b)=>e.jsxs("div",{ref:b,className:l.cn(g.toastVariants({colorScheme:t,variant:a}),r),...m,children:[i!==null&&e.jsx("span",{"aria-hidden":"true",className:"rst:mt-0.5 rst:shrink-0",children:i??e.jsx(c.FontAwesomeIcon,{icon:h[t??"neutral"],className:"rst:h-4 rst:w-4"})}),e.jsxs("div",{className:"rst:flex rst:min-w-0 rst:flex-col rst:gap-0.5",children:[n&&e.jsx("p",{className:"rst:font-semibold",children:n}),e.jsx("div",{className:"rst:min-w-0 rst:break-words",children:d})]}),o&&e.jsx("button",{type:"button",onClick:o,"aria-label":f,className:l.cn("rst:-mr-1 rst:ml-auto rst:shrink-0 rst:cursor-pointer rst:rounded rst:opacity-70 rst:hover:opacity-100","rst:focus-visible:outline-hidden rst:focus-visible:ring-2 rst:focus-visible:ring-ring rst:ring-offset-background rst:focus-visible:ring-offset-2"),children:e.jsx(c.FontAwesomeIcon,{icon:s.faXmark,className:"rst:h-3.5 rst:w-3.5","aria-hidden":"true"})})]}));u.displayName="Toast";exports.Toast=u;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),p=require("react"),c=require("../../../node_modules/@fortawesome/react-fontawesome/dist/index.cjs"),r=require("../../../node_modules/@fortawesome/free-solid-svg-icons/index.cjs"),l=require("../../../lib/utils.cjs"),g=require("./toast-variants.cjs");function x(s){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const a in s)if(a!=="default"){const n=Object.getOwnPropertyDescriptor(s,a);Object.defineProperty(t,a,n.get?n:{enumerable:!0,get:()=>s[a]})}}return t.default=s,Object.freeze(t)}const j=x(p),h={success:r.faCircleCheck,error:r.faCircleExclamation,amber:r.faTriangleExclamation,info:r.faCircleInfo,primary:r.faCircleInfo,neutral:r.faCircleInfo},u=j.forwardRef(({className:s,colorScheme:t="neutral",variant:a="soft",title:n,icon:i,onDismiss:o,dismissLabel:f="Dismiss",children:d,...m},b)=>e.jsxs("div",{ref:b,className:l.cn(g.toastVariants({colorScheme:t,variant:a}),s),...m,children:[i!==null&&e.jsx("span",{"aria-hidden":"true",className:"rst:mt-0.5 rst:shrink-0",children:i??e.jsx(c.FontAwesomeIcon,{icon:h[t??"neutral"],className:"rst:h-4 rst:w-4"})}),e.jsxs("div",{className:"rst:flex rst:min-w-0 rst:flex-col rst:gap-0.5",children:[n&&e.jsx("p",{className:"rst:font-semibold",children:n}),e.jsx("div",{className:"rst:min-w-0 rst:break-words",children:d})]}),o&&e.jsx("button",{type:"button",onClick:o,"aria-label":f,className:l.cn("rst:-mr-1 rst:ml-auto rst:shrink-0 rst:cursor-pointer rst:rounded-sm rst:opacity-70 rst:hover:opacity-100","rst:focus-visible:outline-hidden rst:focus-visible:ring-2 rst:focus-visible:ring-ring rst:ring-offset-background rst:focus-visible:ring-offset-2"),children:e.jsx(c.FontAwesomeIcon,{icon:r.faXmark,className:"rst:h-3.5 rst:w-3.5","aria-hidden":"true"})})]}));u.displayName="Toast";exports.Toast=u;
@@ -48,7 +48,7 @@ const w = {
48
48
  onClick: e,
49
49
  "aria-label": f,
50
50
  className: l(
51
- "rst:-mr-1 rst:ml-auto rst:shrink-0 rst:cursor-pointer rst:rounded rst:opacity-70 rst:hover:opacity-100",
51
+ "rst:-mr-1 rst:ml-auto rst:shrink-0 rst:cursor-pointer rst:rounded-sm rst:opacity-70 rst:hover:opacity-100",
52
52
  "rst:focus-visible:outline-hidden rst:focus-visible:ring-2 rst:focus-visible:ring-ring rst:ring-offset-background rst:focus-visible:ring-offset-2"
53
53
  ),
54
54
  children: /* @__PURE__ */ r(n, { icon: v, className: "rst:h-3.5 rst:w-3.5", "aria-hidden": "true" })
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),t=require("react"),p=require("../../../node_modules/@fortawesome/react-fontawesome/dist/index.cjs"),h=require("../../../node_modules/@fortawesome/free-solid-svg-icons/index.cjs"),o=require("../../../node_modules/class-variance-authority/dist/index.cjs"),s=require("../../../lib/utils.cjs"),j=require("../../../internal/page-inert.cjs"),a=require("../../../node_modules/@headlessui/react/dist/components/dialog/dialog.cjs"),d=require("../../../node_modules/@headlessui/react/dist/components/transition/transition.cjs"),k=o.cva("rst:relative rst:w-full rst:transform rst:overflow-hidden rst:rounded-2xl rst:p-6 rst:text-left rst:align-middle rst:elevation-overlay rst:transition-all rst:border",{variants:{size:{xs:"rst:max-w-xs",sm:"rst:max-w-sm",md:"rst:max-w-md",lg:"rst:max-w-lg",xl:"rst:max-w-xl","2xl":"rst:max-w-2xl","3xl":"rst:max-w-3xl",full:"rst:max-w-[95vw] rst:m-4"},variant:{white:"rst:bg-[var(--roster-popover-bg)] rst:border-[var(--roster-popover-border)] rst:text-[var(--roster-popover-text)]",slate:"rst:bg-gray-700 rst:border-gray-600 rst:text-gray-100 rst:dark:bg-gray-900 rst:dark:border-gray-800 rst:[--roster-ring:var(--roster-primary-400,#5ea3de)] rst:[--roster-ring-offset:var(--roster-gray-700,#44403c)] rst:dark:[--roster-ring-offset:var(--roster-gray-900,#1c1917)] rst:[--roster-control-text:var(--roster-gray-100,#f5f5f4)] rst:[--roster-control-border:var(--roster-gray-400,#a8a29e)] rst:[--roster-control-border-focus:var(--roster-primary-400,#5ea3de)]",primary:"rst:bg-primary-700 rst:border-primary-600 rst:text-white rst:dark:bg-primary-950 rst:dark:border-primary-900 rst:[--roster-ring:var(--roster-primary-400,#5ea3de)] rst:[--roster-ring-offset:var(--roster-primary-700,#084063)] rst:dark:[--roster-ring-offset:var(--roster-primary-950,#021724)] rst:[--roster-control-text:var(--roster-gray-100,#f5f5f4)] rst:[--roster-control-border:var(--roster-gray-400,#a8a29e)] rst:[--roster-control-border-focus:var(--roster-primary-400,#5ea3de)]",glass:"rst:bg-white/80 rst:border-white/20 rst:backdrop-blur-xl rst:text-gray-900 rst:dark:bg-slate-900/80 rst:dark:border-slate-700/50 rst:dark:text-white"},status:{default:"",destructive:"rst:border-t-4 rst:border-t-error-500",success:"rst:border-t-4 rst:border-t-success-500"}},defaultVariants:{size:"md",variant:"white",status:"default"}}),w=o.cva("rst:text-xl rst:font-bold rst:leading-6 rst:text-inherit"),N=o.cva("rst:mt-1 rst:text-sm rst:text-inherit rst:opacity-75"),q=o.cva("rst:inline-flex rst:size-11 rst:shrink-0 rst:items-center rst:justify-center rst:-m-3 rst:cursor-pointer rst:rounded-md rst:bg-transparent rst:text-inherit rst:opacity-50 rst:hover:opacity-100 rst:focus:outline-hidden rst:focus-visible:ring-2 rst:focus-visible:ring-ring rst:focus-visible:ring-offset-2 rst:ring-offset-background rst:transition-opacity"),F=({isOpen:u,onClose:i,title:m,description:n,size:x,variant:l,status:g,children:f,className:v})=>{const[b,y]=t.useState(!1);t.useLayoutEffect(()=>{y(!0)},[]);const e=u&&b,c=t.useRef(null);return t.useLayoutEffect(()=>{if(e)return j.lockPage(c.current)},[e]),r.jsxs(r.Fragment,{children:[e&&r.jsx("span",{ref:c,hidden:!0}),r.jsxs(a.Dialog,{open:e,as:"div",className:"rst:font-ui rst:relative rst:z-50",onClose:i,children:[r.jsx(d.TransitionChild,{as:t.Fragment,enter:"rst:ease-out rst:duration-300",enterFrom:"rst:opacity-0",enterTo:"rst:opacity-100",leave:"rst:ease-in rst:duration-200",leaveFrom:"rst:opacity-100",leaveTo:"rst:opacity-0",children:r.jsx(a.DialogBackdrop,{className:s.cn("rst:fixed rst:inset-0 rst:transition-opacity",l==="glass"?"rst:bg-slate-900/40 rst:dark:bg-black/60":"rst:bg-slate-900/60 rst:dark:bg-black/80 rst:backdrop-blur-sm")})}),r.jsx("div",{className:"rst:fixed rst:inset-0 rst:overflow-y-auto",children:r.jsx("div",{className:"rst:flex rst:min-h-full rst:items-center rst:justify-center rst:p-4 rst:text-center",children:r.jsx(d.TransitionChild,{as:t.Fragment,enter:"rst:ease-out rst:duration-300",enterFrom:"rst:opacity-0 rst:scale-95",enterTo:"rst:opacity-100 rst:scale-100",leave:"rst:ease-in rst:duration-200",leaveFrom:"rst:opacity-100 rst:scale-100",leaveTo:"rst:opacity-0 rst:scale-95",children:r.jsxs(a.DialogPanel,{className:s.cn(k({size:x,variant:l,status:g}),v),children:[r.jsxs("div",{className:"rst:flex rst:items-start rst:justify-between",children:[r.jsxs("div",{children:[r.jsx(a.DialogTitle,{as:"h2",className:s.cn(w()),children:m}),n&&r.jsx("p",{className:s.cn(N()),children:n})]}),r.jsx("div",{className:"rst:ml-4 rst:flex rst:shrink-0",children:r.jsx("button",{type:"button",onClick:i,className:s.cn(q()),"aria-label":"Close dialog",children:r.jsx(p.FontAwesomeIcon,{icon:h.faXmark,className:"rst:h-5 rst:w-5"})})})]}),r.jsx("div",{className:"rst:mt-6",children:f})]})})})})]})]})};exports.Dialog=F;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),t=require("react"),y=require("../../../node_modules/@fortawesome/react-fontawesome/dist/index.cjs"),h=require("../../../node_modules/@fortawesome/free-solid-svg-icons/index.cjs"),o=require("../../../node_modules/class-variance-authority/dist/index.cjs"),s=require("../../../lib/utils.cjs"),k=require("../../../internal/page-inert.cjs"),a=require("../../../node_modules/@headlessui/react/dist/components/dialog/dialog.cjs"),d=require("../../../node_modules/@headlessui/react/dist/components/transition/transition.cjs"),j=o.cva("rst:relative rst:w-full rst:transform rst:overflow-hidden rst:rounded-2xl rst:p-6 rst:text-left rst:align-middle rst:elevation-overlay rst:transition-all rst:border",{variants:{size:{xs:"rst:max-w-xs",sm:"rst:max-w-sm",md:"rst:max-w-md",lg:"rst:max-w-lg",xl:"rst:max-w-xl","2xl":"rst:max-w-2xl","3xl":"rst:max-w-3xl",full:"rst:max-w-[95vw] rst:m-4"},variant:{white:"rst:bg-[var(--roster-popover-bg)] rst:border-[var(--roster-popover-border)] rst:text-[var(--roster-popover-text)]",slate:"rst:bg-gray-700 rst:border-gray-600 rst:text-gray-100 rst:dark:bg-gray-900 rst:dark:border-gray-800 rst:[--roster-ring:var(--roster-primary-400,#5ea3de)] rst:[--roster-ring-offset:var(--roster-gray-700,#44403c)] rst:dark:[--roster-ring-offset:var(--roster-gray-900,#1c1917)] rst:[--roster-control-text:var(--roster-gray-100,#f5f5f4)] rst:[--roster-control-border:var(--roster-gray-400,#a8a29e)] rst:[--roster-control-border-focus:var(--roster-primary-400,#5ea3de)]",primary:"rst:bg-primary-700 rst:border-primary-600 rst:text-primary-700-ink rst:dark:text-white rst:dark:bg-primary-950 rst:dark:border-primary-900 rst:[--roster-ring:var(--roster-primary-400,#5ea3de)] rst:[--roster-ring-offset:var(--roster-primary-700,#084063)] rst:dark:[--roster-ring-offset:var(--roster-primary-950,#021724)] rst:[--roster-control-text:var(--roster-gray-100,#f5f5f4)] rst:[--roster-control-border:var(--roster-gray-400,#a8a29e)] rst:[--roster-control-border-focus:var(--roster-primary-400,#5ea3de)]",glass:"rst:bg-white/80 rst:border-white/20 rst:backdrop-blur-xl rst:text-gray-900 rst:dark:bg-slate-900/80 rst:dark:border-slate-700/50 rst:dark:text-white"},status:{default:"",destructive:"rst:border-t-4 rst:border-t-error-500",success:"rst:border-t-4 rst:border-t-success-500"}},defaultVariants:{size:"md",variant:"white",status:"default"}}),w=o.cva("rst:text-xl rst:font-bold rst:leading-6 rst:text-inherit"),N=o.cva("rst:mt-1 rst:text-sm rst:text-inherit rst:opacity-75"),_=o.cva("rst:inline-flex rst:size-11 rst:shrink-0 rst:items-center rst:justify-center rst:-m-3 rst:cursor-pointer rst:rounded-md rst:bg-transparent rst:text-inherit rst:opacity-50 rst:hover:opacity-100 rst:focus:outline-hidden rst:focus-visible:ring-2 rst:focus-visible:ring-ring rst:focus-visible:ring-offset-2 rst:ring-offset-background rst:transition-opacity"),q=({isOpen:u,onClose:i,title:m,description:n,size:x,variant:l,status:g,children:b,className:f})=>{const[v,p]=t.useState(!1);t.useLayoutEffect(()=>{p(!0)},[]);const e=u&&v,c=t.useRef(null);return t.useLayoutEffect(()=>{if(e)return k.lockPage(c.current)},[e]),r.jsxs(r.Fragment,{children:[e&&r.jsx("span",{ref:c,hidden:!0}),r.jsxs(a.Dialog,{open:e,as:"div",className:"rst:font-ui rst:relative rst:z-50",onClose:i,children:[r.jsx(d.TransitionChild,{as:t.Fragment,enter:"rst:ease-out rst:duration-300",enterFrom:"rst:opacity-0",enterTo:"rst:opacity-100",leave:"rst:ease-in rst:duration-200",leaveFrom:"rst:opacity-100",leaveTo:"rst:opacity-0",children:r.jsx(a.DialogBackdrop,{className:s.cn("rst:fixed rst:inset-0 rst:transition-opacity",l==="glass"?"rst:bg-[var(--roster-backdrop,color-mix(in_oklab,oklch(20.8%_0.042_265.755)_40%,transparent))] rst:dark:bg-[var(--roster-backdrop,color-mix(in_oklab,var(--roster-black,#1e1c1a)_60%,transparent))]":"rst:bg-[var(--roster-backdrop,color-mix(in_oklab,oklch(20.8%_0.042_265.755)_60%,transparent))] rst:dark:bg-[var(--roster-backdrop,color-mix(in_oklab,var(--roster-black,#1e1c1a)_80%,transparent))] rst:backdrop-blur-backdrop")})}),r.jsx("div",{className:"rst:fixed rst:inset-0 rst:overflow-y-auto",children:r.jsx("div",{className:"rst:flex rst:min-h-full rst:items-center rst:justify-center rst:p-4 rst:text-center",children:r.jsx(d.TransitionChild,{as:t.Fragment,enter:"rst:ease-out rst:duration-300",enterFrom:"rst:opacity-0 rst:scale-95",enterTo:"rst:opacity-100 rst:scale-100",leave:"rst:ease-in rst:duration-200",leaveFrom:"rst:opacity-100 rst:scale-100",leaveTo:"rst:opacity-0 rst:scale-95",children:r.jsxs(a.DialogPanel,{className:s.cn(j({size:x,variant:l,status:g}),f),children:[r.jsxs("div",{className:"rst:flex rst:items-start rst:justify-between",children:[r.jsxs("div",{children:[r.jsx(a.DialogTitle,{as:"h2",className:s.cn(w()),children:m}),n&&r.jsx("p",{className:s.cn(N()),children:n})]}),r.jsx("div",{className:"rst:ml-4 rst:flex rst:shrink-0",children:r.jsx("button",{type:"button",onClick:i,className:s.cn(_()),"aria-label":"Close dialog",children:r.jsx(y.FontAwesomeIcon,{icon:h.faXmark,className:"rst:h-5 rst:w-5"})})})]}),r.jsx("div",{className:"rst:mt-6",children:b})]})})})})]})]})};exports.Dialog=q;
@@ -2,13 +2,13 @@
2
2
  import { jsxs as t, Fragment as h, jsx as r } from "react/jsx-runtime";
3
3
  import { useState as k, useLayoutEffect as c, useRef as w, Fragment as d } from "react";
4
4
  import { FontAwesomeIcon as N } from "../../../node_modules/@fortawesome/react-fontawesome/dist/index.js";
5
- import { faXmark as F } from "../../../node_modules/@fortawesome/free-solid-svg-icons/index.js";
5
+ import { faXmark as _ } from "../../../node_modules/@fortawesome/free-solid-svg-icons/index.js";
6
6
  import { cva as a } from "../../../node_modules/class-variance-authority/dist/index.js";
7
7
  import { cn as s } from "../../../lib/utils.js";
8
- import { lockPage as T } from "../../../internal/page-inert.js";
9
- import { Dialog as j, DialogBackdrop as z, DialogPanel as D, DialogTitle as V } from "../../../node_modules/@headlessui/react/dist/components/dialog/dialog.js";
8
+ import { lockPage as F } from "../../../internal/page-inert.js";
9
+ import { Dialog as T, DialogBackdrop as j, DialogPanel as z, DialogTitle as D } from "../../../node_modules/@headlessui/react/dist/components/dialog/dialog.js";
10
10
  import { TransitionChild as m } from "../../../node_modules/@headlessui/react/dist/components/transition/transition.js";
11
- const C = /* @__PURE__ */ a(
11
+ const V = /* @__PURE__ */ a(
12
12
  "rst:relative rst:w-full rst:transform rst:overflow-hidden rst:rounded-2xl rst:p-6 rst:text-left rst:align-middle rst:elevation-overlay rst:transition-all rst:border",
13
13
  {
14
14
  variants: {
@@ -56,9 +56,13 @@ const C = /* @__PURE__ */ a(
56
56
  4.07 / 6.93 for the border.
57
57
 
58
58
  `white` and `glass` are not here on purpose: both follow the page's
59
- scheme, so the page-level tokens are already right for them. */
59
+ scheme, so the page-level tokens are already right for them.
60
+
61
+ `primary`'s text is its fill's ink token, as on every other solid
62
+ fill, so a light primary gets dark text. Dark stays white: that
63
+ fill is primary-950, which has no ink token. */
60
64
  slate: "rst:bg-gray-700 rst:border-gray-600 rst:text-gray-100 rst:dark:bg-gray-900 rst:dark:border-gray-800 rst:[--roster-ring:var(--roster-primary-400,#5ea3de)] rst:[--roster-ring-offset:var(--roster-gray-700,#44403c)] rst:dark:[--roster-ring-offset:var(--roster-gray-900,#1c1917)] rst:[--roster-control-text:var(--roster-gray-100,#f5f5f4)] rst:[--roster-control-border:var(--roster-gray-400,#a8a29e)] rst:[--roster-control-border-focus:var(--roster-primary-400,#5ea3de)]",
61
- primary: "rst:bg-primary-700 rst:border-primary-600 rst:text-white rst:dark:bg-primary-950 rst:dark:border-primary-900 rst:[--roster-ring:var(--roster-primary-400,#5ea3de)] rst:[--roster-ring-offset:var(--roster-primary-700,#084063)] rst:dark:[--roster-ring-offset:var(--roster-primary-950,#021724)] rst:[--roster-control-text:var(--roster-gray-100,#f5f5f4)] rst:[--roster-control-border:var(--roster-gray-400,#a8a29e)] rst:[--roster-control-border-focus:var(--roster-primary-400,#5ea3de)]",
65
+ primary: "rst:bg-primary-700 rst:border-primary-600 rst:text-primary-700-ink rst:dark:text-white rst:dark:bg-primary-950 rst:dark:border-primary-900 rst:[--roster-ring:var(--roster-primary-400,#5ea3de)] rst:[--roster-ring-offset:var(--roster-primary-700,#084063)] rst:dark:[--roster-ring-offset:var(--roster-primary-950,#021724)] rst:[--roster-control-text:var(--roster-gray-100,#f5f5f4)] rst:[--roster-control-border:var(--roster-gray-400,#a8a29e)] rst:[--roster-control-border-focus:var(--roster-primary-400,#5ea3de)]",
62
66
  glass: "rst:bg-white/80 rst:border-white/20 rst:backdrop-blur-xl rst:text-gray-900 rst:dark:bg-slate-900/80 rst:dark:border-slate-700/50 rst:dark:text-white"
63
67
  },
64
68
  status: {
@@ -73,18 +77,18 @@ const C = /* @__PURE__ */ a(
73
77
  status: "default"
74
78
  }
75
79
  }
76
- ), L = /* @__PURE__ */ a("rst:text-xl rst:font-bold rst:leading-6 rst:text-inherit"), P = /* @__PURE__ */ a("rst:mt-1 rst:text-sm rst:text-inherit rst:opacity-75"), R = /* @__PURE__ */ a(
80
+ ), C = /* @__PURE__ */ a("rst:text-xl rst:font-bold rst:leading-6 rst:text-inherit"), L = /* @__PURE__ */ a("rst:mt-1 rst:text-sm rst:text-inherit rst:opacity-75"), P = /* @__PURE__ */ a(
77
81
  "rst:inline-flex rst:size-11 rst:shrink-0 rst:items-center rst:justify-center rst:-m-3 rst:cursor-pointer rst:rounded-md rst:bg-transparent rst:text-inherit rst:opacity-50 rst:hover:opacity-100 rst:focus:outline-hidden rst:focus-visible:ring-2 rst:focus-visible:ring-ring rst:focus-visible:ring-offset-2 rst:ring-offset-background rst:transition-opacity"
78
- ), $ = ({
82
+ ), X = ({
79
83
  isOpen: f,
80
84
  onClose: o,
81
- title: g,
85
+ title: p,
82
86
  description: i,
83
- size: p,
87
+ size: b,
84
88
  variant: n,
85
- status: u,
89
+ status: g,
86
90
  children: v,
87
- className: b
91
+ className: u
88
92
  }) => {
89
93
  const [x, y] = k(!1);
90
94
  c(() => {
@@ -93,11 +97,11 @@ const C = /* @__PURE__ */ a(
93
97
  const e = f && x, l = w(null);
94
98
  return c(() => {
95
99
  if (e)
96
- return T(l.current);
100
+ return F(l.current);
97
101
  }, [e]), /* @__PURE__ */ t(h, { children: [
98
102
  e && /* @__PURE__ */ r("span", { ref: l, hidden: !0 }),
99
103
  /* @__PURE__ */ t(
100
- j,
104
+ T,
101
105
  {
102
106
  open: e,
103
107
  as: "div",
@@ -115,11 +119,11 @@ const C = /* @__PURE__ */ a(
115
119
  leaveFrom: "rst:opacity-100",
116
120
  leaveTo: "rst:opacity-0",
117
121
  children: /* @__PURE__ */ r(
118
- z,
122
+ j,
119
123
  {
120
124
  className: s(
121
125
  "rst:fixed rst:inset-0 rst:transition-opacity",
122
- n === "glass" ? "rst:bg-slate-900/40 rst:dark:bg-black/60" : "rst:bg-slate-900/60 rst:dark:bg-black/80 rst:backdrop-blur-sm"
126
+ n === "glass" ? "rst:bg-[var(--roster-backdrop,color-mix(in_oklab,oklch(20.8%_0.042_265.755)_40%,transparent))] rst:dark:bg-[var(--roster-backdrop,color-mix(in_oklab,var(--roster-black,#1e1c1a)_60%,transparent))]" : "rst:bg-[var(--roster-backdrop,color-mix(in_oklab,oklch(20.8%_0.042_265.755)_60%,transparent))] rst:dark:bg-[var(--roster-backdrop,color-mix(in_oklab,var(--roster-black,#1e1c1a)_80%,transparent))] rst:backdrop-blur-backdrop"
123
127
  )
124
128
  }
125
129
  )
@@ -136,26 +140,26 @@ const C = /* @__PURE__ */ a(
136
140
  leaveFrom: "rst:opacity-100 rst:scale-100",
137
141
  leaveTo: "rst:opacity-0 rst:scale-95",
138
142
  children: /* @__PURE__ */ t(
139
- D,
143
+ z,
140
144
  {
141
145
  className: s(
142
- C({ size: p, variant: n, status: u }),
143
- b
146
+ V({ size: b, variant: n, status: g }),
147
+ u
144
148
  ),
145
149
  children: [
146
150
  /* @__PURE__ */ t("div", { className: "rst:flex rst:items-start rst:justify-between", children: [
147
151
  /* @__PURE__ */ t("div", { children: [
148
- /* @__PURE__ */ r(V, { as: "h2", className: s(L()), children: g }),
149
- i && /* @__PURE__ */ r("p", { className: s(P()), children: i })
152
+ /* @__PURE__ */ r(D, { as: "h2", className: s(C()), children: p }),
153
+ i && /* @__PURE__ */ r("p", { className: s(L()), children: i })
150
154
  ] }),
151
155
  /* @__PURE__ */ r("div", { className: "rst:ml-4 rst:flex rst:shrink-0", children: /* @__PURE__ */ r(
152
156
  "button",
153
157
  {
154
158
  type: "button",
155
159
  onClick: o,
156
- className: s(R()),
160
+ className: s(P()),
157
161
  "aria-label": "Close dialog",
158
- children: /* @__PURE__ */ r(N, { icon: F, className: "rst:h-5 rst:w-5" })
162
+ children: /* @__PURE__ */ r(N, { icon: _, className: "rst:h-5 rst:w-5" })
159
163
  }
160
164
  ) })
161
165
  ] }),
@@ -171,5 +175,5 @@ const C = /* @__PURE__ */ a(
171
175
  ] });
172
176
  };
173
177
  export {
174
- $ as Dialog
178
+ X as Dialog
175
179
  };
@@ -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"),h=require("../../../node_modules/@fortawesome/free-solid-svg-icons/index.cjs"),e=require("../../../lib/utils.cjs"),y=require("../../atoms/Button/Button.cjs"),b=require("../../atoms/Link/Link.cjs"),E=require("../../atoms/Badge/Badge.cjs"),W=require("../../atoms/Avatar/Avatar.cjs"),T=require("../../atoms/Switch/switch-variants.cjs"),Y=require("./navbar-variants.cjs"),m=require("../../../node_modules/@headlessui/react/dist/components/menu/menu.cjs"),q=require("../../../node_modules/@headlessui/react/dist/components/popover/popover.cjs"),$=require("../../../node_modules/@headlessui/react/dist/components/transition/transition.cjs");function P({on:s,size:a}){return r.jsx("span",{"aria-hidden":"true","data-testid":"navbar-theme-track","data-checked":s?"":void 0,className:e.cn(T.switchTrackVariants({size:a,variant:"neutral"}),"rst:pointer-events-none"),children:r.jsx("span",{className:e.cn(T.switchThumbVariants({size:a}))})})}const Z=s=>{s?.setAttribute("role","menuitemcheckbox")},X=(s,a)=>typeof s=="function"?s({close:a}):s;function _(s){return p.useSyncExternalStore(a=>{if(!s||typeof document>"u")return()=>{};const o=new MutationObserver(a);return o.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>o.disconnect()},()=>s&&document.documentElement.classList.contains("dark"),()=>!1)}function rr({close:s}){return p.useEffect(()=>{const a=o=>{const g=document.querySelector("[data-roster-mobile-panel]"),k=document.querySelector("[data-roster-hamburger]"),x=o.target;!g?.contains(x)&&!k?.contains(x)&&s()};return document.addEventListener("pointerdown",a,{capture:!0}),()=>document.removeEventListener("pointerdown",a,{capture:!0})},[s]),null}function tr({activePath:s,close:a}){const o=p.useRef(s);return p.useEffect(()=>{o.current!==s&&(o.current=s,a())},[s,a]),null}const sr=({logoSrc:s,logoSize:a="2rem",logoClassName:o,brandName:g,items:k,activePath:x,routerElement:f,user:n,onLogin:j,onLogout:N,onInboxClick:w,onThemeToggle:v,actions:K,brandElement:L,navActions:G,userMenuItems:B=[],className:H,variant:d="default",position:J="sticky",themeMode:S,notificationVariant:z="error",notificationFill:O="solid",...Q})=>{const A=(n?.notificationCount||0)>0,R=typeof a=="number"?`${a}px`:a,V={width:R,height:R},U=_(S==="auto"),c=(S==="auto"?U?"dark":"light":S??(d==="white"||d==="default"?"light":"dark"))==="dark",C=d==="slate"||d==="primary"||d==="default"&&c||d==="white"&&c||d==="transparent"&&c,F={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(q.Popover,{as:"nav",className:e.cn("rst:z-50",Y.navbarVariants({variant:d,position:J}),H),...Q,children:({open:M,close:l})=>{const I=X(K,l),D=X(G,l);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(b.Link,{as:f,href:"/",to:"/",variant:"neutral",underline:"none",className:e.cn("rst:flex rst:items-center rst:gap-3 rst:transition-opacity",F.brand),children:[r.jsx("img",{src:s,alt:`${g} Logo`,style:V,className:e.cn("rst:shrink-0",o??"rst:rounded-md")}),L??r.jsx("span",{className:"rst:text-xl rst:font-bold rst:tracking-tight",children:g})]}),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:k.map(t=>{const i=x===t.path;return r.jsxs(b.Link,{as:f,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",i?F.linkActive:F.linkBase),children:[t.label,t.badge&&r.jsx("span",{className:"rst:inline-flex",children:t.badge})]},t.path)})}),D,I??(n?r.jsxs(m.Menu,{as:"div",className:"rst:relative rst:ml-2",children:[r.jsxs(m.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:"Open user menu"}),r.jsx(W.Avatar,{initials:n.initials,src:n.avatarSrc,size:"sm",shape:"circle",colorScheme:n.avatarColor??"primary"}),A&&r.jsx("div",{className:"rst:absolute rst:-top-1 rst:-right-2",children:r.jsx(E.Badge,{fill:O,size:"xs",statusBadge:!0,variant:z,children:n.notificationCount})})]}),r.jsx($.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(m.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-1 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:[A&&w&&r.jsx(m.MenuItem,{children:({focus:t})=>r.jsxs(y.Button,{variant:"ghost",colorScheme:"neutral",size:"sm",onClick:w,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:h.faInbox,className:"rst:text-primary-500 rst:w-4"}),children:["Inbox (",n.notificationCount,")"]})}),v&&r.jsx(m.MenuItem,{children:({focus:t})=>r.jsxs("div",{ref:Z,"aria-checked":c,onClick:i=>{i.preventDefault(),v()},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:h.faMoon,className:e.cn("rst:w-4 rst:transition-colors",c?"rst:text-amber-500":"rst:text-gray-400")}),r.jsx("span",{className:"rst:font-medium",children:"Dark Mode"})]}),r.jsx(P,{on:c,size:"xs"})]})})]}),B.length>0&&r.jsx("div",{className:"rst:py-1",children:B.map(t=>r.jsx(m.MenuItem,{children:({focus:i})=>r.jsxs(b.Link,{as:f,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",i&&"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))}),N&&r.jsx("div",{className:"rst:py-1",children:r.jsx(m.MenuItem,{children:({focus:t})=>r.jsx(y.Button,{variant:"ghost",colorScheme:"neutral",size:"sm",onClick:N,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:h.faRightFromBracket,className:"rst:text-gray-400 rst:dark:text-gray-500 rst:w-4"}),children:"Log Out"})})})]})})]}):r.jsx(y.Button,{size:"sm",variant:"solid",colorScheme:"primary",onClick:j,children:"Log In"}))]}),r.jsx("div",{"data-roster-hamburger":!0,className:"rst:flex rst:md:hidden",children:r.jsxs(q.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",F.hamburger),children:[r.jsx("span",{className:"rst:sr-only",children:"Open main menu"}),M?r.jsx(u.FontAwesomeIcon,{icon:h.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:h.faBars,className:"rst:block rst:h-6 rst:w-6","aria-hidden":"true"}),A&&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"})]})]})})]}),M&&r.jsx(rr,{close:l}),M&&r.jsx(tr,{activePath:x,close:l}),r.jsx($.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(q.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-1 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:g,style:V,className:e.cn("rst:shrink-0",o??"rst:rounded-md")}),L??r.jsx("span",{className:"rst:font-bold rst:text-gray-900 rst:dark:text-white",children:g})]}),r.jsx("div",{className:"rst:-mr-2",children:r.jsxs(q.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:"Close menu"}),r.jsx(u.FontAwesomeIcon,{icon:h.faXmark,className:"rst:h-6 rst:w-6","aria-hidden":"true"})]})})]}),r.jsxs("div",{className:"rst:mt-6",children:[D&&r.jsx("div",{className:"rst:mb-4",children:D}),r.jsxs("nav",{className:"rst:grid rst:gap-y-4",children:[k.map(t=>{const i=x===t.path;return r.jsx(b.Link,{as:f,href:t.path,to:t.path,onClick:()=>l(),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",i?"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",i?"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)}),n&&B.length>0&&r.jsxs(r.Fragment,{children:[r.jsx("hr",{className:"rst:border-gray-100 rst:dark:border-gray-700"}),B.map(t=>{const i=x===t.path;return r.jsxs(b.Link,{as:f,href:t.path,to:t.path,onClick:()=>l(),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",i?"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",i?"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)})]})]})]})]}),(n||I||j)&&r.jsx("div",{className:"rst:py-6 rst:px-5 rst:space-y-4",children:I||(!n&&j?r.jsx(y.Button,{variant:"solid",colorScheme:"primary",className:"rst:w-full rst:justify-center",onClick:()=>{j(),l()},children:"Log In"}):r.jsxs(r.Fragment,{children:[A&&w&&r.jsx(y.Button,{variant:"ghost",colorScheme:"neutral",onClick:()=>{w?.(),l()},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(E.Badge,{fill:O,size:"xs",statusBadge:!0,variant:z,children:n?.notificationCount}),children:"Pending Invitations"}),v&&r.jsxs("div",{onClick:t=>{t.preventDefault(),v()},role:"switch","aria-checked":c,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(u.FontAwesomeIcon,{icon:h.faMoon,className:e.cn("rst:w-5 rst:transition-colors",c?"rst:text-amber-500":"rst:text-gray-400")}),r.jsx("span",{children:"Dark Mode"})]}),r.jsx(P,{on:c,size:"sm"})]}),N&&r.jsx(y.Button,{variant:"outline",colorScheme:"error",className:"rst:w-full rst:justify-center",onClick:()=>{N?.(),l()},children:"Log Out"})]}))})]})})})]})}})};exports.Navbar=sr;
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"),h=require("../../../node_modules/@fortawesome/free-solid-svg-icons/index.cjs"),e=require("../../../lib/utils.cjs"),y=require("../../atoms/Button/Button.cjs"),b=require("../../atoms/Link/Link.cjs"),E=require("../../atoms/Badge/Badge.cjs"),W=require("../../atoms/Avatar/Avatar.cjs"),T=require("../../atoms/Switch/switch-variants.cjs"),Y=require("./navbar-variants.cjs"),m=require("../../../node_modules/@headlessui/react/dist/components/menu/menu.cjs"),q=require("../../../node_modules/@headlessui/react/dist/components/popover/popover.cjs"),$=require("../../../node_modules/@headlessui/react/dist/components/transition/transition.cjs");function P({on:s,size:a}){return r.jsx("span",{"aria-hidden":"true","data-testid":"navbar-theme-track","data-checked":s?"":void 0,className:e.cn(T.switchTrackVariants({size:a,variant:"neutral"}),"rst:pointer-events-none"),children:r.jsx("span",{className:e.cn(T.switchThumbVariants({size:a}))})})}const Z=s=>{s?.setAttribute("role","menuitemcheckbox")},X=(s,a)=>typeof s=="function"?s({close:a}):s;function _(s){return p.useSyncExternalStore(a=>{if(!s||typeof document>"u")return()=>{};const o=new MutationObserver(a);return o.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>o.disconnect()},()=>s&&document.documentElement.classList.contains("dark"),()=>!1)}function rr({close:s}){return p.useEffect(()=>{const a=o=>{const g=document.querySelector("[data-roster-mobile-panel]"),k=document.querySelector("[data-roster-hamburger]"),x=o.target;!g?.contains(x)&&!k?.contains(x)&&s()};return document.addEventListener("pointerdown",a,{capture:!0}),()=>document.removeEventListener("pointerdown",a,{capture:!0})},[s]),null}function tr({activePath:s,close:a}){const o=p.useRef(s);return p.useEffect(()=>{o.current!==s&&(o.current=s,a())},[s,a]),null}const sr=({logoSrc:s,logoSize:a="2rem",logoClassName:o,brandName:g,items:k,activePath:x,routerElement:f,user:n,onLogin:j,onLogout:N,onInboxClick:w,onThemeToggle:v,actions:K,brandElement:L,navActions:G,userMenuItems:B=[],className:H,variant:d="default",position:J="sticky",themeMode:S,notificationVariant:z="error",notificationFill:O="solid",...Q})=>{const A=(n?.notificationCount||0)>0,R=typeof a=="number"?`${a}px`:a,V={width:R,height:R},U=_(S==="auto"),c=(S==="auto"?U?"dark":"light":S??(d==="white"||d==="default"?"light":"dark"))==="dark",C=d==="slate"||d==="primary"||d==="default"&&c||d==="white"&&c||d==="transparent"&&c,F={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(q.Popover,{as:"nav",className:e.cn("rst:z-50",Y.navbarVariants({variant:d,position:J}),H),...Q,children:({open:M,close:l})=>{const I=X(K,l),D=X(G,l);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(b.Link,{as:f,href:"/",to:"/",variant:"neutral",underline:"none",className:e.cn("rst:flex rst:items-center rst:gap-3 rst:transition-opacity",F.brand),children:[r.jsx("img",{src:s,alt:`${g} Logo`,style:V,className:e.cn("rst:shrink-0",o??"rst:rounded-md")}),L??r.jsx("span",{className:"rst:text-xl rst:font-bold rst:tracking-tight",children:g})]}),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:k.map(t=>{const i=x===t.path;return r.jsxs(b.Link,{as:f,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",i?F.linkActive:F.linkBase),children:[t.label,t.badge&&r.jsx("span",{className:"rst:inline-flex",children:t.badge})]},t.path)})}),D,I??(n?r.jsxs(m.Menu,{as:"div",className:"rst:relative rst:ml-2",children:[r.jsxs(m.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:"Open user menu"}),r.jsx(W.Avatar,{initials:n.initials,src:n.avatarSrc,size:"sm",shape:"circle",colorScheme:n.avatarColor??"primary"}),A&&r.jsx("div",{className:"rst:absolute rst:-top-1 rst:-right-2",children:r.jsx(E.Badge,{fill:O,size:"xs",statusBadge:!0,variant:z,children:n.notificationCount})})]}),r.jsx($.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(m.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:[A&&w&&r.jsx(m.MenuItem,{children:({focus:t})=>r.jsxs(y.Button,{variant:"ghost",colorScheme:"neutral",size:"sm",onClick:w,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:h.faInbox,className:"rst:text-primary-500 rst:w-4"}),children:["Inbox (",n.notificationCount,")"]})}),v&&r.jsx(m.MenuItem,{children:({focus:t})=>r.jsxs("div",{ref:Z,"aria-checked":c,onClick:i=>{i.preventDefault(),v()},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:h.faMoon,className:e.cn("rst:w-4 rst:transition-colors",c?"rst:text-amber-500":"rst:text-gray-400")}),r.jsx("span",{className:"rst:font-medium",children:"Dark Mode"})]}),r.jsx(P,{on:c,size:"xs"})]})})]}),B.length>0&&r.jsx("div",{className:"rst:py-1",children:B.map(t=>r.jsx(m.MenuItem,{children:({focus:i})=>r.jsxs(b.Link,{as:f,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",i&&"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))}),N&&r.jsx("div",{className:"rst:py-1",children:r.jsx(m.MenuItem,{children:({focus:t})=>r.jsx(y.Button,{variant:"ghost",colorScheme:"neutral",size:"sm",onClick:N,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:h.faRightFromBracket,className:"rst:text-gray-400 rst:dark:text-gray-500 rst:w-4"}),children:"Log Out"})})})]})})]}):r.jsx(y.Button,{size:"sm",variant:"solid",colorScheme:"primary",onClick:j,children:"Log In"}))]}),r.jsx("div",{"data-roster-hamburger":!0,className:"rst:flex rst:md:hidden",children:r.jsxs(q.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",F.hamburger),children:[r.jsx("span",{className:"rst:sr-only",children:"Open main menu"}),M?r.jsx(u.FontAwesomeIcon,{icon:h.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:h.faBars,className:"rst:block rst:h-6 rst:w-6","aria-hidden":"true"}),A&&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"})]})]})})]}),M&&r.jsx(rr,{close:l}),M&&r.jsx(tr,{activePath:x,close:l}),r.jsx($.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(q.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:g,style:V,className:e.cn("rst:shrink-0",o??"rst:rounded-md")}),L??r.jsx("span",{className:"rst:font-bold rst:text-gray-900 rst:dark:text-white",children:g})]}),r.jsx("div",{className:"rst:-mr-2",children:r.jsxs(q.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:"Close menu"}),r.jsx(u.FontAwesomeIcon,{icon:h.faXmark,className:"rst:h-6 rst:w-6","aria-hidden":"true"})]})})]}),r.jsxs("div",{className:"rst:mt-6",children:[D&&r.jsx("div",{className:"rst:mb-4",children:D}),r.jsxs("nav",{className:"rst:grid rst:gap-y-4",children:[k.map(t=>{const i=x===t.path;return r.jsx(b.Link,{as:f,href:t.path,to:t.path,onClick:()=>l(),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",i?"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",i?"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)}),n&&B.length>0&&r.jsxs(r.Fragment,{children:[r.jsx("hr",{className:"rst:border-gray-100 rst:dark:border-gray-700"}),B.map(t=>{const i=x===t.path;return r.jsxs(b.Link,{as:f,href:t.path,to:t.path,onClick:()=>l(),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",i?"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",i?"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)})]})]})]})]}),(n||I||j)&&r.jsx("div",{className:"rst:py-6 rst:px-5 rst:space-y-4",children:I||(!n&&j?r.jsx(y.Button,{variant:"solid",colorScheme:"primary",className:"rst:w-full rst:justify-center",onClick:()=>{j(),l()},children:"Log In"}):r.jsxs(r.Fragment,{children:[A&&w&&r.jsx(y.Button,{variant:"ghost",colorScheme:"neutral",onClick:()=>{w?.(),l()},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(E.Badge,{fill:O,size:"xs",statusBadge:!0,variant:z,children:n?.notificationCount}),children:"Pending Invitations"}),v&&r.jsxs("div",{onClick:t=>{t.preventDefault(),v()},role:"switch","aria-checked":c,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(u.FontAwesomeIcon,{icon:h.faMoon,className:e.cn("rst:w-5 rst:transition-colors",c?"rst:text-amber-500":"rst:text-gray-400")}),r.jsx("span",{children:"Dark Mode"})]}),r.jsx(P,{on:c,size:"sm"})]}),N&&r.jsx(y.Button,{variant:"outline",colorScheme:"error",className:"rst:w-full rst:justify-center",onClick:()=>{N?.(),l()},children:"Log Out"})]}))})]})})})]})}})};exports.Navbar=sr;
@@ -186,7 +186,7 @@ const Ir = ({
186
186
  leave: "rst:transition rst:ease-in rst:duration-75",
187
187
  leaveFrom: "rst:transform rst:opacity-100 rst:scale-100",
188
188
  leaveTo: "rst:transform rst:opacity-0 rst:scale-95",
189
- children: /* @__PURE__ */ s(dr, { 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-1 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: [
189
+ children: /* @__PURE__ */ s(dr, { 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: [
190
190
  /* @__PURE__ */ s("div", { className: "rst:py-1", children: [
191
191
  C && N && /* @__PURE__ */ r(A, { children: ({ focus: t }) => /* @__PURE__ */ s(
192
192
  p,
@@ -342,7 +342,7 @@ const Ir = ({
342
342
  {
343
343
  focus: !0,
344
344
  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",
345
- children: /* @__PURE__ */ s("div", { "data-roster-mobile-panel": !0, className: "rst:rounded-lg rst:elevation-anchored rst:ring-1 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: [
345
+ children: /* @__PURE__ */ s("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: [
346
346
  /* @__PURE__ */ s("div", { className: "rst:px-5 rst:pt-5 rst:pb-6", children: [
347
347
  /* @__PURE__ */ s("div", { className: "rst:flex rst:items-center rst:justify-between", children: [
348
348
  /* @__PURE__ */ s("div", { className: "rst:flex rst:items-center rst:gap-3", children: [
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),H=require("react"),J=require("../../../node_modules/@headlessui/react/dist/components/description/description.cjs"),y=require("../../../node_modules/@headlessui/react/dist/components/dialog/dialog.cjs"),Q=require("../../../node_modules/@headlessui/react/dist/components/transition/transition.cjs"),f=require("../../../lib/utils.cjs"),Z=require("../../../internal/popup.cjs"),W=require("../../../internal/motion.cjs"),O=require("../../../internal/page-inert.cjs"),D=require("./sheet-drag.cjs"),tt=require("./sheet-title.cjs");function et(r){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const c in r)if(c!=="default"){const l=Object.getOwnPropertyDescriptor(r,c);Object.defineProperty(i,c,l.get?l:{enumerable:!0,get:()=>r[c]})}}return i.default=r,Object.freeze(i)}const n=et(H),rt="rst:transition-transform rst:duration-(--roster-sheet-enter-duration) rst:ease-(--roster-sheet-enter-easing) rst:data-leave:duration-(--roster-sheet-leave-duration) rst:data-leave:ease-(--roster-sheet-leave-easing) rst:data-closed:translate-y-full",st="rst:transition-opacity rst:duration-(--roster-sheet-fade-duration) rst:ease-out rst:data-closed:opacity-0",nt="rst:transition-opacity rst:duration-(--roster-sheet-enter-duration) rst:ease-out rst:data-leave:duration-(--roster-sheet-leave-duration) rst:data-closed:opacity-0",ot="rst:transition-opacity rst:duration-(--roster-sheet-fade-duration) rst:ease-out rst:data-closed:opacity-0",at=["input:not([type=checkbox]):not([type=radio]):not([type=button]):not([type=submit]):not([type=reset]):not([type=range]):not([type=color]):not([type=file]):not([type=image])","textarea","select","[contenteditable]:not([contenteditable=false])"].join(",");function it(r){return r?"current"in r?r.current:r:null}function ct({target:r}){const i=n.useRef(r),c=n.useRef(!1);return n.useEffect(()=>{i.current=r}),n.useEffect(()=>(c.current=!1,()=>{c.current=!0,queueMicrotask(()=>{if(!c.current)return;const l=it(i.current);l?.isConnected&&l.focus()})}),[]),null}function ut(){return s.jsx("svg",{"aria-hidden":"true",focusable:"false",viewBox:"0 0 20 20",className:"rst:h-5 rst:w-5",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:s.jsx("path",{d:"M5 5l10 10M15 5L5 15"})})}const lt=({isOpen:r,onClose:i,onAfterClose:c,title:l,hideTitle:T=!1,description:S,actions:N,maxWidth:b=560,initialFocus:v,returnFocus:_,busy:p=!1,dragToDismiss:j=!0,contentKey:h,className:z,children:Y})=>{const{ref:R,inDarkScope:B}=Z.useDarkScope(),C=W.useReducedMotion();n.useLayoutEffect(()=>{if(r)return O.lockPage(R.current)},[r,R]);const u=n.useRef(null),I=n.useRef(null),L=n.useRef(null),E=n.useRef(null),k=n.useRef(null),P=n.useId(),g=tt.titleSignature(l),w=n.useRef({signature:g,contentKey:h,open:r,busy:p});n.useEffect(()=>{const t=w.current;if(w.current={signature:g,contentKey:h,open:r,busy:p},!t.open||!r)return;const e=t.contentKey!==h,o=t.signature!==g&&!t.busy;!e&&!o||(L.current?.focus(),k.current&&(k.current.scrollTop=0))},[g,h,r,p]),n.useEffect(()=>{if(!r)return;const t=requestAnimationFrame(()=>{const e=u.current,o=document.activeElement;!e||o&&e.contains(o)||(v?.current??E.current)?.focus()});return()=>cancelAnimationFrame(t)},[r,v]);const[q,M]=n.useState(null);n.useEffect(()=>{if(!r)return;const t=window.visualViewport;if(!t)return;const e=()=>{const o=document.activeElement,d=!!o&&!!u.current?.contains(o)&&o.matches(at);M(d?Math.round(t.height):null)};return t.addEventListener("resize",e),document.addEventListener("focusin",e),document.addEventListener("focusout",e),()=>{t.removeEventListener("resize",e),document.removeEventListener("focusin",e),document.removeEventListener("focusout",e),M(null)}},[r]);const a=n.useRef(null),m=n.useRef(!1),A=n.useRef(r);n.useEffect(()=>{A.current=r},[r]);const x=t=>{u.current?.style.setProperty("--rst-sheet-drag",`${t}px`)},F=t=>{const e=u.current;a.current=null,e&&(delete e.dataset.dragging,t==="close"?(i(),requestAnimationFrame(()=>{A.current&&!a.current&&x(0)})):x(0))};n.useEffect(()=>{!r&&a.current&&(a.current=null,u.current&&delete u.current.dataset.dragging),r&&!a.current&&x(0)},[r]);const U=t=>{a.current||(m.current=!1,!(!j||!r)&&(t.pointerType==="mouse"&&(t.button!==0||!I.current?.contains(t.target))||(a.current={pointerId:t.pointerId,x0:t.clientX,y0:t.clientY,dy:0,phase:"pending",samples:[{t:t.timeStamp,y:t.clientY}]})))},V=t=>{const e=a.current;if(!e||t.pointerId!==e.pointerId)return;const o=t.clientX-e.x0,d=t.clientY-e.y0;if(e.phase==="pending"){if(!D.exceedsSheetTapSlop(o,d))return;if(Math.abs(o)>Math.abs(d)){e.phase="ignored";return}e.phase="dragging",m.current=!0;try{t.currentTarget.setPointerCapture(t.pointerId)}catch{}u.current&&(u.current.dataset.dragging="")}e.phase==="dragging"&&(e.dy=d,e.samples.push({t:t.timeStamp,y:t.clientY}),e.samples.length>32&&e.samples.shift(),x(Math.max(0,d)))},X=t=>{const e=a.current;if(!e||t.pointerId!==e.pointerId)return;if(e.phase!=="dragging"){a.current=null;return}e.samples.push({t:t.timeStamp,y:t.clientY});const o=t.clientY-e.y0,d=u.current?.getBoundingClientRect().height??0;F(D.sheetDragOutcome(o,d,D.sheetReleaseVelocity(e.samples)))},$=t=>{const e=a.current;!e||t.pointerId!==e.pointerId||(e.phase==="dragging"?F("stay"):a.current=null)},G=t=>{!m.current||t.detail===0||(m.current=!1,t.preventDefault(),t.stopPropagation())},K={"--rst-sheet-max-width":typeof b=="number"?`${b}px`:b,...q!==null&&{"--rst-sheet-keyboard-cap":`${q}px`}};return s.jsxs(s.Fragment,{children:[s.jsx("span",{ref:R,hidden:!0}),s.jsxs(y.Dialog,{open:r,as:"div",onClose:i,initialFocus:v??E,className:f.cn("rst:font-ui rst:relative rst:z-50 rst:focus:outline-hidden",B&&"dark"),children:[s.jsx(y.DialogBackdrop,{transition:!0,"data-testid":"sheet-backdrop",className:f.cn("rst:fixed rst:inset-0 rst:bg-(--roster-sheet-backdrop)",C?ot:nt)}),s.jsx("div",{className:"rst:fixed rst:inset-0 rst:flex rst:items-end rst:justify-center",children:s.jsx(Q.TransitionChild,{afterLeave:c,children:s.jsxs(y.DialogPanel,{ref:u,style:K,"data-testid":"sheet-panel",className:f.cn("rst:relative rst:flex rst:max-h-[min(92dvh,var(--rst-sheet-keyboard-cap,92dvh))] rst:w-full rst:flex-col","rst:md:max-w-(--rst-sheet-max-width)","rst:rounded-t-2xl rst:border rst:border-b-0 rst:elevation-overlay","rst:bg-[var(--roster-popover-bg)] rst:border-[var(--roster-popover-border)] rst:text-[var(--roster-popover-text)]","rst:[--roster-ring-offset:var(--roster-popover-bg)]","rst:pb-[env(safe-area-inset-bottom)]","rst:translate-y-[var(--rst-sheet-drag,0px)]",C?st:rt,"rst:data-dragging:transition-none",z),children:[s.jsxs("div",{"data-testid":"sheet-drag-zone",className:f.cn("rst:shrink-0",j&&"rst:touch-none"),onPointerDown:U,onPointerMove:V,onPointerUp:X,onPointerCancel:$,onClickCapture:G,children:[s.jsx("div",{ref:I,"aria-hidden":"true","data-testid":"sheet-handle",className:f.cn("rst:flex rst:h-11 rst:items-start rst:justify-center rst:pt-2",j&&"rst:cursor-grab rst:active:cursor-grabbing"),children:s.jsx("span",{className:"rst:h-1 rst:w-10 rst:rounded-full rst:bg-current rst:opacity-30"})}),s.jsxs("div",{className:"rst:-mt-3 rst:flex rst:items-start rst:gap-2 rst:px-5 rst:pb-4",children:[s.jsxs("div",{className:"rst:min-w-0 rst:flex-1 rst:pt-2",children:[s.jsx(y.DialogTitle,{as:"h2",id:P,ref:L,tabIndex:-1,className:f.cn("rst:text-lg rst:font-semibold rst:text-inherit rst:focus:outline-hidden",T&&"rst:sr-only"),children:l}),S&&s.jsx(J.Description,{as:"p",className:"rst:mt-1 rst:text-sm rst:text-inherit rst:opacity-75",children:S})]}),N&&s.jsx("div",{className:"rst:flex rst:h-11 rst:shrink-0 rst:items-center rst:gap-1",children:N}),s.jsx("button",{ref:E,type:"button",onClick:i,"aria-label":"Close",className:"rst:inline-flex rst:size-11 rst:shrink-0 rst:-mr-2 rst:cursor-pointer rst:items-center rst:justify-center rst:rounded-md rst:bg-transparent rst:text-inherit rst:opacity-60 rst:transition-opacity rst:hover:opacity-100 rst:focus:outline-hidden rst:focus-visible:opacity-100 rst:focus-visible:ring-2 rst:focus-visible:ring-ring rst:focus-visible:ring-offset-2 rst:ring-offset-background",children:s.jsx(ut,{})})]})]}),s.jsx("div",{ref:k,role:"region","aria-labelledby":P,tabIndex:0,"data-testid":"sheet-content","aria-busy":p||void 0,className:"rst:min-h-0 rst:flex-1 rst:overflow-y-auto rst:overscroll-contain rst:px-5 rst:pb-4 rst:focus:outline-hidden rst:ring-inset rst:focus-visible:ring-2 rst:focus-visible:ring-ring",children:Y}),s.jsx(ct,{target:_})]})})})]})]})};exports.Sheet=lt;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),H=require("react"),J=require("../../../node_modules/@headlessui/react/dist/components/description/description.cjs"),y=require("../../../node_modules/@headlessui/react/dist/components/dialog/dialog.cjs"),Q=require("../../../node_modules/@headlessui/react/dist/components/transition/transition.cjs"),f=require("../../../lib/utils.cjs"),Z=require("../../../internal/popup.cjs"),W=require("../../../internal/motion.cjs"),O=require("../../../internal/page-inert.cjs"),D=require("./sheet-drag.cjs"),tt=require("./sheet-title.cjs");function et(r){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const c in r)if(c!=="default"){const l=Object.getOwnPropertyDescriptor(r,c);Object.defineProperty(i,c,l.get?l:{enumerable:!0,get:()=>r[c]})}}return i.default=r,Object.freeze(i)}const n=et(H),rt="rst:transition-transform rst:duration-(--roster-sheet-enter-duration) rst:ease-(--roster-sheet-enter-easing) rst:data-leave:duration-(--roster-sheet-leave-duration) rst:data-leave:ease-(--roster-sheet-leave-easing) rst:data-closed:translate-y-full",st="rst:transition-opacity rst:duration-(--roster-sheet-fade-duration) rst:ease-out rst:data-closed:opacity-0",nt="rst:transition-opacity rst:duration-(--roster-sheet-enter-duration) rst:ease-out rst:data-leave:duration-(--roster-sheet-leave-duration) rst:data-closed:opacity-0",ot="rst:transition-opacity rst:duration-(--roster-sheet-fade-duration) rst:ease-out rst:data-closed:opacity-0",at=["input:not([type=checkbox]):not([type=radio]):not([type=button]):not([type=submit]):not([type=reset]):not([type=range]):not([type=color]):not([type=file]):not([type=image])","textarea","select","[contenteditable]:not([contenteditable=false])"].join(",");function it(r){return r?"current"in r?r.current:r:null}function ct({target:r}){const i=n.useRef(r),c=n.useRef(!1);return n.useEffect(()=>{i.current=r}),n.useEffect(()=>(c.current=!1,()=>{c.current=!0,queueMicrotask(()=>{if(!c.current)return;const l=it(i.current);l?.isConnected&&l.focus()})}),[]),null}function ut(){return s.jsx("svg",{"aria-hidden":"true",focusable:"false",viewBox:"0 0 20 20",className:"rst:h-5 rst:w-5",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:s.jsx("path",{d:"M5 5l10 10M15 5L5 15"})})}const lt=({isOpen:r,onClose:i,onAfterClose:c,title:l,hideTitle:T=!1,description:S,actions:N,maxWidth:b=560,initialFocus:v,returnFocus:_,busy:p=!1,dragToDismiss:j=!0,contentKey:h,className:z,children:Y})=>{const{ref:R,inDarkScope:B}=Z.useDarkScope(),C=W.useReducedMotion();n.useLayoutEffect(()=>{if(r)return O.lockPage(R.current)},[r,R]);const u=n.useRef(null),I=n.useRef(null),L=n.useRef(null),E=n.useRef(null),k=n.useRef(null),P=n.useId(),g=tt.titleSignature(l),w=n.useRef({signature:g,contentKey:h,open:r,busy:p});n.useEffect(()=>{const t=w.current;if(w.current={signature:g,contentKey:h,open:r,busy:p},!t.open||!r)return;const e=t.contentKey!==h,o=t.signature!==g&&!t.busy;!e&&!o||(L.current?.focus(),k.current&&(k.current.scrollTop=0))},[g,h,r,p]),n.useEffect(()=>{if(!r)return;const t=requestAnimationFrame(()=>{const e=u.current,o=document.activeElement;!e||o&&e.contains(o)||(v?.current??E.current)?.focus()});return()=>cancelAnimationFrame(t)},[r,v]);const[q,M]=n.useState(null);n.useEffect(()=>{if(!r)return;const t=window.visualViewport;if(!t)return;const e=()=>{const o=document.activeElement,d=!!o&&!!u.current?.contains(o)&&o.matches(at);M(d?Math.round(t.height):null)};return t.addEventListener("resize",e),document.addEventListener("focusin",e),document.addEventListener("focusout",e),()=>{t.removeEventListener("resize",e),document.removeEventListener("focusin",e),document.removeEventListener("focusout",e),M(null)}},[r]);const a=n.useRef(null),m=n.useRef(!1),A=n.useRef(r);n.useEffect(()=>{A.current=r},[r]);const x=t=>{u.current?.style.setProperty("--rst-sheet-drag",`${t}px`)},F=t=>{const e=u.current;a.current=null,e&&(delete e.dataset.dragging,t==="close"?(i(),requestAnimationFrame(()=>{A.current&&!a.current&&x(0)})):x(0))};n.useEffect(()=>{!r&&a.current&&(a.current=null,u.current&&delete u.current.dataset.dragging),r&&!a.current&&x(0)},[r]);const U=t=>{a.current||(m.current=!1,!(!j||!r)&&(t.pointerType==="mouse"&&(t.button!==0||!I.current?.contains(t.target))||(a.current={pointerId:t.pointerId,x0:t.clientX,y0:t.clientY,dy:0,phase:"pending",samples:[{t:t.timeStamp,y:t.clientY}]})))},V=t=>{const e=a.current;if(!e||t.pointerId!==e.pointerId)return;const o=t.clientX-e.x0,d=t.clientY-e.y0;if(e.phase==="pending"){if(!D.exceedsSheetTapSlop(o,d))return;if(Math.abs(o)>Math.abs(d)){e.phase="ignored";return}e.phase="dragging",m.current=!0;try{t.currentTarget.setPointerCapture(t.pointerId)}catch{}u.current&&(u.current.dataset.dragging="")}e.phase==="dragging"&&(e.dy=d,e.samples.push({t:t.timeStamp,y:t.clientY}),e.samples.length>32&&e.samples.shift(),x(Math.max(0,d)))},X=t=>{const e=a.current;if(!e||t.pointerId!==e.pointerId)return;if(e.phase!=="dragging"){a.current=null;return}e.samples.push({t:t.timeStamp,y:t.clientY});const o=t.clientY-e.y0,d=u.current?.getBoundingClientRect().height??0;F(D.sheetDragOutcome(o,d,D.sheetReleaseVelocity(e.samples)))},$=t=>{const e=a.current;!e||t.pointerId!==e.pointerId||(e.phase==="dragging"?F("stay"):a.current=null)},G=t=>{!m.current||t.detail===0||(m.current=!1,t.preventDefault(),t.stopPropagation())},K={"--rst-sheet-max-width":typeof b=="number"?`${b}px`:b,...q!==null&&{"--rst-sheet-keyboard-cap":`${q}px`}};return s.jsxs(s.Fragment,{children:[s.jsx("span",{ref:R,hidden:!0}),s.jsxs(y.Dialog,{open:r,as:"div",onClose:i,initialFocus:v??E,className:f.cn("rst:font-ui rst:relative rst:z-50 rst:focus:outline-hidden",B&&"dark"),children:[s.jsx(y.DialogBackdrop,{transition:!0,"data-testid":"sheet-backdrop",className:f.cn("rst:fixed rst:inset-0 rst:bg-[var(--roster-backdrop,var(--roster-sheet-backdrop))]",C?ot:nt)}),s.jsx("div",{className:"rst:fixed rst:inset-0 rst:flex rst:items-end rst:justify-center",children:s.jsx(Q.TransitionChild,{afterLeave:c,children:s.jsxs(y.DialogPanel,{ref:u,style:K,"data-testid":"sheet-panel",className:f.cn("rst:relative rst:flex rst:max-h-[min(92dvh,var(--rst-sheet-keyboard-cap,92dvh))] rst:w-full rst:flex-col","rst:md:max-w-(--rst-sheet-max-width)","rst:rounded-t-2xl rst:border rst:border-b-0 rst:elevation-overlay","rst:bg-[var(--roster-popover-bg)] rst:border-[var(--roster-popover-border)] rst:text-[var(--roster-popover-text)]","rst:[--roster-ring-offset:var(--roster-popover-bg)]","rst:pb-[env(safe-area-inset-bottom)]","rst:translate-y-[var(--rst-sheet-drag,0px)]",C?st:rt,"rst:data-dragging:transition-none",z),children:[s.jsxs("div",{"data-testid":"sheet-drag-zone",className:f.cn("rst:shrink-0",j&&"rst:touch-none"),onPointerDown:U,onPointerMove:V,onPointerUp:X,onPointerCancel:$,onClickCapture:G,children:[s.jsx("div",{ref:I,"aria-hidden":"true","data-testid":"sheet-handle",className:f.cn("rst:flex rst:h-11 rst:items-start rst:justify-center rst:pt-2",j&&"rst:cursor-grab rst:active:cursor-grabbing"),children:s.jsx("span",{className:"rst:h-1 rst:w-10 rst:rounded-full rst:bg-current rst:opacity-30"})}),s.jsxs("div",{className:"rst:-mt-3 rst:flex rst:items-start rst:gap-2 rst:px-5 rst:pb-4",children:[s.jsxs("div",{className:"rst:min-w-0 rst:flex-1 rst:pt-2",children:[s.jsx(y.DialogTitle,{as:"h2",id:P,ref:L,tabIndex:-1,className:f.cn("rst:text-lg rst:font-semibold rst:text-inherit rst:focus:outline-hidden",T&&"rst:sr-only"),children:l}),S&&s.jsx(J.Description,{as:"p",className:"rst:mt-1 rst:text-sm rst:text-inherit rst:opacity-75",children:S})]}),N&&s.jsx("div",{className:"rst:flex rst:h-11 rst:shrink-0 rst:items-center rst:gap-1",children:N}),s.jsx("button",{ref:E,type:"button",onClick:i,"aria-label":"Close",className:"rst:inline-flex rst:size-11 rst:shrink-0 rst:-mr-2 rst:cursor-pointer rst:items-center rst:justify-center rst:rounded-md rst:bg-transparent rst:text-inherit rst:opacity-60 rst:transition-opacity rst:hover:opacity-100 rst:focus:outline-hidden rst:focus-visible:opacity-100 rst:focus-visible:ring-2 rst:focus-visible:ring-ring rst:focus-visible:ring-offset-2 rst:ring-offset-background",children:s.jsx(ut,{})})]})]}),s.jsx("div",{ref:k,role:"region","aria-labelledby":P,tabIndex:0,"data-testid":"sheet-content","aria-busy":p||void 0,className:"rst:min-h-0 rst:flex-1 rst:overflow-y-auto rst:overscroll-contain rst:px-5 rst:pb-4 rst:focus:outline-hidden rst:ring-inset rst:focus-visible:ring-2 rst:focus-visible:ring-ring",children:Y}),s.jsx(ct,{target:_})]})})})]})]})};exports.Sheet=lt;
@@ -177,7 +177,7 @@ const Lt = ({
177
177
  transition: !0,
178
178
  "data-testid": "sheet-backdrop",
179
179
  className: d(
180
- "rst:fixed rst:inset-0 rst:bg-(--roster-sheet-backdrop)",
180
+ "rst:fixed rst:inset-0 rst:bg-[var(--roster-backdrop,var(--roster-sheet-backdrop))]",
181
181
  D ? lt : ut
182
182
  )
183
183
  }
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react");function c(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const o=c(s);function a(){const t=o.useRef(null),[e,r]=o.useState(!1);return o.useLayoutEffect(()=>{r(!!t.current?.closest(".dark"))},[]),{ref:t,inDarkScope:e}}const u=["rst:font-ui","rst:z-50 rst:rounded-md rst:py-1 rst:elevation-anchored rst:ring-1 rst:focus:outline-hidden","rst:bg-[var(--roster-popover-bg)] rst:text-[var(--roster-popover-text)] rst:ring-[var(--roster-popover-border)]","rst:[--anchor-gap:4px]"].join(" ");function P(t,e){return t||e==="slate"}const p="rst:w-(--button-width)",i="rst:w-(--input-width)",l="bottom start";exports.POPUP_ANCHOR=l;exports.POPUP_PANEL=u;exports.POPUP_WIDTH_OF_BUTTON=p;exports.POPUP_WIDTH_OF_INPUT=i;exports.popupInDarkPalette=P;exports.useDarkScope=a;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react");function c(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const o=c(s);function a(){const t=o.useRef(null),[e,r]=o.useState(!1);return o.useLayoutEffect(()=>{r(!!t.current?.closest(".dark"))},[]),{ref:t,inDarkScope:e}}const u=["rst:font-ui","rst:z-50 rst:rounded-md rst:py-1 rst:elevation-anchored rst:ring rst:focus:outline-hidden","rst:bg-[var(--roster-popover-bg)] rst:text-[var(--roster-popover-text)] rst:ring-[var(--roster-popover-border)]","rst:[--anchor-gap:4px]"].join(" ");function P(t,e){return t||e==="slate"}const p="rst:w-(--button-width)",i="rst:w-(--input-width)",l="bottom start";exports.POPUP_ANCHOR=l;exports.POPUP_PANEL=u;exports.POPUP_WIDTH_OF_BUTTON=p;exports.POPUP_WIDTH_OF_INPUT=i;exports.popupInDarkPalette=P;exports.useDarkScope=a;
@@ -11,7 +11,7 @@ const n = [
11
11
  anything else in the panel — the empty message rendered in the host's
12
12
  prose face while the options beside it did not. */
13
13
  "rst:font-ui",
14
- "rst:z-50 rst:rounded-md rst:py-1 rst:elevation-anchored rst:ring-1 rst:focus:outline-hidden",
14
+ "rst:z-50 rst:rounded-md rst:py-1 rst:elevation-anchored rst:ring rst:focus:outline-hidden",
15
15
  "rst:bg-[var(--roster-popover-bg)] rst:text-[var(--roster-popover-text)] rst:ring-[var(--roster-popover-border)]",
16
16
  "rst:[--anchor-gap:4px]"
17
17
  ].join(" ");
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../node_modules/clsx/dist/clsx.cjs"),r=require("../node_modules/tailwind-merge/dist/bundle-mjs.cjs"),t=r.extendTailwindMerge({prefix:"rst",extend:{classGroups:{shadow:["elevation-raised","elevation-anchored","elevation-overlay"]}}});function o(...e){return t(n.clsx(e))}exports.cn=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../node_modules/clsx/dist/clsx.cjs"),r=require("../node_modules/tailwind-merge/dist/bundle-mjs.cjs"),t=r.extendTailwindMerge({prefix:"rst",extend:{classGroups:{shadow:["elevation-raised","elevation-anchored","elevation-overlay","elevation-control"]}}});function o(...e){return t(n.clsx(e))}exports.cn=o;
package/dist/lib/utils.js CHANGED
@@ -1,26 +1,31 @@
1
- import { clsx as r } from "../node_modules/clsx/dist/clsx.js";
2
- import { extendTailwindMerge as o } from "../node_modules/tailwind-merge/dist/bundle-mjs.js";
3
- const n = /* @__PURE__ */ o({
1
+ import { clsx as o } from "../node_modules/clsx/dist/clsx.js";
2
+ import { extendTailwindMerge as r } from "../node_modules/tailwind-merge/dist/bundle-mjs.js";
3
+ const n = /* @__PURE__ */ r({
4
4
  prefix: "rst",
5
5
  extend: {
6
6
  classGroups: {
7
7
  /* The elevation levels are custom utilities, so tailwind-merge does not
8
- know they set `box-shadow` and conflict with `shadow-*` and with each
9
- other. Without this, `cn(cardVariants(), "rst:elevation-overlay")`
10
- kept BOTH and the winner fell to stylesheet order — which emits
11
- anchored, overlay, raised, so the family resolved in the inverse of
12
- its own depth order and a consumer's override was a no-op. Exactly the
13
- degradation the comment above describes, on the newest utility. */
8
+ know they set `box-shadow` and conflict with `shadow-*` and with each
9
+ other. Without this, `cn(cardVariants(), "rst:elevation-overlay")`
10
+ kept BOTH and the winner fell to stylesheet order — which emits
11
+ anchored, overlay, raised, so the family resolved in the inverse of
12
+ its own depth order and a consumer's override was a no-op. Exactly the
13
+ degradation the comment above describes, on the newest utility.
14
+
15
+ `elevation-control` is the same kind of utility on controls, and
16
+ `cn(buttonVariants(), "rst:shadow-none")` is how a caller flattens a
17
+ Button, so leaving it out would have kept both there too. */
14
18
  shadow: [
15
19
  "elevation-raised",
16
20
  "elevation-anchored",
17
- "elevation-overlay"
21
+ "elevation-overlay",
22
+ "elevation-control"
18
23
  ]
19
24
  }
20
25
  }
21
26
  });
22
27
  function a(...e) {
23
- return n(r(e));
28
+ return n(o(e));
24
29
  }
25
30
  export {
26
31
  a as cn
package/dist/meta.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.2.1",
3
- "tests": 1767,
4
- "testFiles": 297
2
+ "version": "5.3.0",
3
+ "tests": 1803,
4
+ "testFiles": 306
5
5
  }