@blakesteve/roster 5.2.1 → 5.4.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 (72) hide show
  1. package/README.md +205 -21
  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/MediaPreview/MediaPreview.cjs +1 -0
  40. package/dist/components/molecules/MediaPreview/MediaPreview.d.ts +27 -0
  41. package/dist/components/molecules/MediaPreview/MediaPreview.js +55 -0
  42. package/dist/components/molecules/Toast/Toast.cjs +1 -1
  43. package/dist/components/molecules/Toast/Toast.js +1 -1
  44. package/dist/components/organisms/Dialog/Dialog.cjs +1 -1
  45. package/dist/components/organisms/Dialog/Dialog.d.ts +9 -1
  46. package/dist/components/organisms/Dialog/Dialog.js +26 -20
  47. package/dist/components/organisms/ModerationQueue/ModerationQueue.cjs +1 -0
  48. package/dist/components/organisms/ModerationQueue/ModerationQueue.d.ts +73 -0
  49. package/dist/components/organisms/ModerationQueue/ModerationQueue.js +430 -0
  50. package/dist/components/organisms/ModerationQueue/QueueEditDialog.cjs +1 -0
  51. package/dist/components/organisms/ModerationQueue/QueueEditDialog.d.ts +8 -0
  52. package/dist/components/organisms/ModerationQueue/QueueEditDialog.js +37 -0
  53. package/dist/components/organisms/ModerationQueue/QueueEditSheet.cjs +1 -0
  54. package/dist/components/organisms/ModerationQueue/QueueEditSheet.d.ts +12 -0
  55. package/dist/components/organisms/ModerationQueue/QueueEditSheet.js +30 -0
  56. package/dist/components/organisms/ModerationQueue/queue-actions.cjs +1 -0
  57. package/dist/components/organisms/ModerationQueue/queue-actions.d.ts +157 -0
  58. package/dist/components/organisms/ModerationQueue/queue-actions.js +6 -0
  59. package/dist/components/organisms/Navbar/Navbar.cjs +1 -1
  60. package/dist/components/organisms/Navbar/Navbar.js +2 -2
  61. package/dist/components/organisms/Sheet/Sheet.cjs +1 -1
  62. package/dist/components/organisms/Sheet/Sheet.js +1 -1
  63. package/dist/index.d.ts +5 -0
  64. package/dist/internal/popup.cjs +1 -1
  65. package/dist/internal/popup.js +1 -1
  66. package/dist/lib/utils.cjs +1 -1
  67. package/dist/lib/utils.js +16 -11
  68. package/dist/meta.json +3 -3
  69. package/dist/roster.cjs +1 -1
  70. package/dist/roster.css +1 -1
  71. package/dist/roster.js +118 -108
  72. package/package.json +1 -1
@@ -0,0 +1,6 @@
1
+ function n(t) {
2
+ return t;
3
+ }
4
+ export {
5
+ n as editAction
6
+ };
@@ -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
  }
package/dist/index.d.ts CHANGED
@@ -65,6 +65,7 @@ export * from './components/molecules/CallToAction/CallToAction';
65
65
  export * from './components/molecules/CallToAction/call-to-action-variants';
66
66
  export * from './components/molecules/EmptyState/EmptyState';
67
67
  export * from './components/molecules/EmptyState/empty-state-variants';
68
+ export * from './components/molecules/MediaPreview/MediaPreview';
68
69
  export * from './components/molecules/ErrorState/ErrorState';
69
70
  export * from './components/molecules/ErrorState/error-state-variants';
70
71
  export * from './components/molecules/MatchupCard/MatchupCard';
@@ -76,6 +77,10 @@ export * from './components/organisms/Footer/Footer';
76
77
  export * from './components/organisms/Navbar/Navbar';
77
78
  export * from './components/organisms/Navbar/navbar-variants';
78
79
  export * from './components/organisms/Sheet/Sheet';
80
+ export * from './components/organisms/ModerationQueue/ModerationQueue';
81
+ export * from './components/organisms/ModerationQueue/queue-actions';
82
+ export * from './components/organisms/ModerationQueue/QueueEditDialog';
83
+ export * from './components/organisms/ModerationQueue/QueueEditSheet';
79
84
  export * from './components/organisms/Table/Table';
80
85
  export * from './components/organisms/Table/table-variants';
81
86
  export * from './hooks/useCountdown';
@@ -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.4.0",
3
+ "tests": 1892,
4
+ "testFiles": 343
5
5
  }
package/dist/roster.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});;/* empty css */const V=require("./components/atoms/Avatar/Avatar.cjs"),q=require("./components/atoms/Avatar/avatar-variants.cjs"),b=require("./components/atoms/Badge/Badge.cjs"),d=require("./components/atoms/Badge/badge-variants.cjs"),p=require("./components/atoms/Button/Button.cjs"),T=require("./components/atoms/Button/button-variants.cjs"),C=require("./components/atoms/Card/Card.cjs"),S=require("./components/atoms/Card/card-variants.cjs"),h=require("./components/atoms/Checkbox/Checkbox.cjs"),g=require("./components/atoms/Checkbox/checkbox-variants.cjs"),w=require("./components/atoms/Disclosure/Disclosure.cjs"),t=require("./components/atoms/Disclosure/disclosure-variants.cjs"),m=require("./components/atoms/Input/Input.cjs"),i=require("./components/atoms/Input/input-variants.cjs"),x=require("./components/atoms/Link/Link.cjs"),k=require("./components/atoms/Link/link-variants.cjs"),v=require("./components/atoms/PasswordInput/PasswordInput.cjs"),A=require("./components/atoms/Combobox/Combobox.cjs"),B=require("./components/atoms/Chip/Chip.cjs"),y=require("./components/atoms/Chip/chip-variants.cjs"),D=require("./components/atoms/Pill/Pill.cjs"),n=require("./components/atoms/Pill/pill-variants.cjs"),L=require("./components/atoms/Eyebrow/Eyebrow.cjs"),I=require("./components/atoms/Eyebrow/eyebrow-variants.cjs"),E=require("./components/atoms/InlineCode/InlineCode.cjs"),O=require("./components/atoms/InlineCode/inline-code-variants.cjs"),G=require("./components/atoms/LabeledDivider/LabeledDivider.cjs"),P=require("./components/atoms/Stat/Stat.cjs"),N=require("./components/atoms/Stat/stat-variants.cjs"),M=require("./components/atoms/ThemeToggle/ThemeToggle.cjs"),R=require("./components/atoms/MultiSelect/MultiSelect.cjs"),H=require("./components/atoms/Select/Select.cjs"),o=require("./components/atoms/Select/select-variants.cjs"),F=require("./components/atoms/Spinner/Spinner.cjs"),K=require("./components/atoms/Switch/Switch.cjs"),s=require("./components/atoms/Switch/switch-variants.cjs"),_=require("./components/atoms/Textarea/Textarea.cjs"),W=require("./components/atoms/Textarea/textarea-variants.cjs"),X=require("./components/atoms/AvatarStrip/AvatarStrip.cjs"),f=require("./components/atoms/Tooltip/Tooltip.cjs"),j=require("./components/atoms/CollapsibleSection/CollapsibleSection.cjs"),z=require("./components/atoms/SegmentBar/SegmentBar.cjs"),J=require("./components/molecules/Toast/Toast.cjs"),Q=require("./components/molecules/Toast/toast-variants.cjs"),U=require("./components/molecules/Toast/Toaster.cjs"),c=require("./components/molecules/Toast/toast-api.cjs"),Y=require("./components/molecules/Alert/Alert.cjs"),Z=require("./components/molecules/Alert/alert-variants.cjs"),$=require("./components/molecules/Accordion/Accordion.cjs"),rr=require("./components/molecules/DescriptionList/DescriptionList.cjs"),ar=require("./components/molecules/DescriptionList/description-list-variants.cjs"),er=require("./components/molecules/Pullquote/Pullquote.cjs"),tr=require("./components/molecules/Pullquote/pullquote-variants.cjs"),ir=require("./components/molecules/CheckboxGroup/CheckboxGroup.cjs"),u=require("./components/molecules/CheckboxGroup/checkbox-group-variants.cjs"),nr=require("./components/molecules/RadioGroup/RadioGroup.cjs"),e=require("./components/molecules/RadioGroup/radio-group-variants.cjs"),or=require("./components/molecules/Breadcrumbs/Breadcrumbs.cjs"),sr=require("./components/molecules/Breadcrumbs/breadcrumb-variants.cjs"),cr=require("./components/molecules/LiquidTabs/LiquidTabs.cjs"),ur=require("./components/molecules/LiquidTabs/LiquidNav.cjs"),lr=require("./components/molecules/LiquidTabs/liquid-tab-id.cjs"),Vr=require("./components/molecules/Carousel/Carousel.cjs"),qr=require("./components/molecules/CallToAction/CallToAction.cjs"),br=require("./components/molecules/CallToAction/call-to-action-variants.cjs"),dr=require("./components/molecules/EmptyState/EmptyState.cjs"),pr=require("./components/molecules/EmptyState/empty-state-variants.cjs"),Tr=require("./components/molecules/ErrorState/ErrorState.cjs"),Cr=require("./components/molecules/ErrorState/error-state-variants.cjs"),Sr=require("./components/molecules/MatchupCard/MatchupCard.cjs"),hr=require("./components/organisms/ActionBar/ActionBar.cjs"),gr=require("./components/organisms/ActionBar/action-bar-variants.cjs"),wr=require("./components/organisms/Countdown/Countdown.cjs"),mr=require("./components/organisms/Dialog/Dialog.cjs"),xr=require("./components/organisms/Footer/Footer.cjs"),kr=require("./components/organisms/Navbar/Navbar.cjs"),vr=require("./components/organisms/Navbar/navbar-variants.cjs"),Ar=require("./components/organisms/Sheet/Sheet.cjs"),r=require("./components/organisms/Table/Table.cjs"),a=require("./components/organisms/Table/table-variants.cjs"),Br=require("./hooks/useCountdown.cjs"),l=require("./hooks/useKeySequence.cjs"),yr=require("./lib/utils.cjs");exports.Avatar=V.Avatar;exports.avatarVariants=q.avatarVariants;exports.Badge=b.Badge;exports.badgeVariants=d.badgeVariants;exports.Button=p.Button;exports.buttonVariants=T.buttonVariants;exports.Card=C.Card;exports.cardVariants=S.cardVariants;exports.Checkbox=h.Checkbox;exports.checkboxVariants=g.checkboxVariants;exports.Disclosure=w.Disclosure;exports.disclosureContentVariants=t.disclosureContentVariants;exports.disclosureTriggerVariants=t.disclosureTriggerVariants;exports.Input=m.Input;exports.iconVariants=i.iconVariants;exports.inputVariants=i.inputVariants;exports.Link=x.Link;exports.linkVariants=k.linkVariants;exports.PasswordInput=v.PasswordInput;exports.Combobox=A.Combobox;exports.Chip=B.Chip;exports.chipVariants=y.chipVariants;exports.Pill=D.Pill;exports.pillDotVariants=n.pillDotVariants;exports.pillVariants=n.pillVariants;exports.Eyebrow=L.Eyebrow;exports.eyebrowVariants=I.eyebrowVariants;exports.InlineCode=E.InlineCode;exports.inlineCodeVariants=O.inlineCodeVariants;exports.LabeledDivider=G.LabeledDivider;exports.Stat=P.Stat;exports.statValueVariants=N.statValueVariants;exports.ThemeToggle=M.ThemeToggle;exports.MultiSelect=R.MultiSelect;exports.Select=H.Select;exports.selectOptionVariants=o.selectOptionVariants;exports.selectTriggerVariants=o.selectTriggerVariants;exports.Spinner=F.Spinner;exports.Switch=K.Switch;exports.switchThumbVariants=s.switchThumbVariants;exports.switchTrackVariants=s.switchTrackVariants;exports.Textarea=_.Textarea;exports.textareaVariants=W.textareaVariants;exports.AvatarStrip=X.AvatarStrip;exports.Tooltip=f.Tooltip;exports.CollapsibleSection=j.CollapsibleSection;exports.SegmentBar=z.SegmentBar;exports.Toast=J.Toast;exports.toastVariants=Q.toastVariants;exports.Toaster=U.Toaster;exports.TONE_PREFIX=c.TONE_PREFIX;exports.toast=c.toast;exports.Alert=Y.Alert;exports.alertVariants=Z.alertVariants;exports.Accordion=$.Accordion;exports.DescriptionList=rr.DescriptionList;exports.descriptionListVariants=ar.descriptionListVariants;exports.Pullquote=er.Pullquote;exports.pullquoteVariants=tr.pullquoteVariants;exports.CheckboxGroup=ir.CheckboxGroup;exports.checkboxGroupOptionsVariants=u.checkboxGroupOptionsVariants;exports.checkboxGroupPanelVariants=u.checkboxGroupPanelVariants;exports.RadioGroup=nr.RadioGroup;exports.radioDotVariants=e.radioDotVariants;exports.radioGroupOptionsVariants=e.radioGroupOptionsVariants;exports.radioOptionVariants=e.radioOptionVariants;exports.radioVariants=e.radioVariants;exports.Breadcrumbs=or.Breadcrumbs;exports.breadcrumbVariants=sr.breadcrumbVariants;exports.LiquidTabs=cr.LiquidTabs;exports.LiquidNav=ur.LiquidNav;exports.liquidTabId=lr.liquidTabId;exports.Carousel=Vr.Carousel;exports.CallToAction=qr.CallToAction;exports.ctaVariants=br.ctaVariants;exports.EmptyState=dr.EmptyState;exports.emptyStateVariants=pr.emptyStateVariants;exports.ErrorState=Tr.ErrorState;exports.errorStateVariants=Cr.errorStateVariants;exports.MatchupCard=Sr.MatchupCard;exports.ActionBar=hr.ActionBar;exports.actionBarVariants=gr.actionBarVariants;exports.Countdown=wr.Countdown;exports.Dialog=mr.Dialog;exports.Footer=xr.Footer;exports.Navbar=kr.Navbar;exports.navbarVariants=vr.navbarVariants;exports.Sheet=Ar.Sheet;exports.Table=r.Table;exports.TableBody=r.TableBody;exports.TableCaption=r.TableCaption;exports.TableCell=r.TableCell;exports.TableFooter=r.TableFooter;exports.TableHead=r.TableHead;exports.TableHeader=r.TableHeader;exports.TableRow=r.TableRow;exports.tableCellVariants=a.tableCellVariants;exports.tableHeadVariants=a.tableHeadVariants;exports.tableHeaderVariants=a.tableHeaderVariants;exports.tableRowVariants=a.tableRowVariants;exports.tableVariants=a.tableVariants;exports.tableWrapperVariants=a.tableWrapperVariants;exports.useCountdown=Br.useCountdown;exports.KONAMI_CODE=l.KONAMI_CODE;exports.useKeySequence=l.useKeySequence;exports.cn=yr.cn;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});;/* empty css */const V=require("./components/atoms/Avatar/Avatar.cjs"),q=require("./components/atoms/Avatar/avatar-variants.cjs"),d=require("./components/atoms/Badge/Badge.cjs"),b=require("./components/atoms/Badge/badge-variants.cjs"),p=require("./components/atoms/Button/Button.cjs"),T=require("./components/atoms/Button/button-variants.cjs"),C=require("./components/atoms/Card/Card.cjs"),S=require("./components/atoms/Card/card-variants.cjs"),h=require("./components/atoms/Checkbox/Checkbox.cjs"),g=require("./components/atoms/Checkbox/checkbox-variants.cjs"),w=require("./components/atoms/Disclosure/Disclosure.cjs"),t=require("./components/atoms/Disclosure/disclosure-variants.cjs"),v=require("./components/atoms/Input/Input.cjs"),i=require("./components/atoms/Input/input-variants.cjs"),A=require("./components/atoms/Link/Link.cjs"),m=require("./components/atoms/Link/link-variants.cjs"),x=require("./components/atoms/PasswordInput/PasswordInput.cjs"),k=require("./components/atoms/Combobox/Combobox.cjs"),D=require("./components/atoms/Chip/Chip.cjs"),E=require("./components/atoms/Chip/chip-variants.cjs"),B=require("./components/atoms/Pill/Pill.cjs"),n=require("./components/atoms/Pill/pill-variants.cjs"),y=require("./components/atoms/Eyebrow/Eyebrow.cjs"),L=require("./components/atoms/Eyebrow/eyebrow-variants.cjs"),P=require("./components/atoms/InlineCode/InlineCode.cjs"),I=require("./components/atoms/InlineCode/inline-code-variants.cjs"),M=require("./components/atoms/LabeledDivider/LabeledDivider.cjs"),O=require("./components/atoms/Stat/Stat.cjs"),G=require("./components/atoms/Stat/stat-variants.cjs"),N=require("./components/atoms/ThemeToggle/ThemeToggle.cjs"),Q=require("./components/atoms/MultiSelect/MultiSelect.cjs"),R=require("./components/atoms/Select/Select.cjs"),o=require("./components/atoms/Select/select-variants.cjs"),H=require("./components/atoms/Spinner/Spinner.cjs"),F=require("./components/atoms/Switch/Switch.cjs"),s=require("./components/atoms/Switch/switch-variants.cjs"),K=require("./components/atoms/Textarea/Textarea.cjs"),_=require("./components/atoms/Textarea/textarea-variants.cjs"),W=require("./components/atoms/AvatarStrip/AvatarStrip.cjs"),X=require("./components/atoms/Tooltip/Tooltip.cjs"),f=require("./components/atoms/CollapsibleSection/CollapsibleSection.cjs"),j=require("./components/atoms/SegmentBar/SegmentBar.cjs"),z=require("./components/molecules/Toast/Toast.cjs"),J=require("./components/molecules/Toast/toast-variants.cjs"),U=require("./components/molecules/Toast/Toaster.cjs"),u=require("./components/molecules/Toast/toast-api.cjs"),Y=require("./components/molecules/Alert/Alert.cjs"),Z=require("./components/molecules/Alert/alert-variants.cjs"),$=require("./components/molecules/Accordion/Accordion.cjs"),ee=require("./components/molecules/DescriptionList/DescriptionList.cjs"),re=require("./components/molecules/DescriptionList/description-list-variants.cjs"),ae=require("./components/molecules/Pullquote/Pullquote.cjs"),te=require("./components/molecules/Pullquote/pullquote-variants.cjs"),ie=require("./components/molecules/CheckboxGroup/CheckboxGroup.cjs"),c=require("./components/molecules/CheckboxGroup/checkbox-group-variants.cjs"),ne=require("./components/molecules/RadioGroup/RadioGroup.cjs"),a=require("./components/molecules/RadioGroup/radio-group-variants.cjs"),oe=require("./components/molecules/Breadcrumbs/Breadcrumbs.cjs"),se=require("./components/molecules/Breadcrumbs/breadcrumb-variants.cjs"),ue=require("./components/molecules/LiquidTabs/LiquidTabs.cjs"),ce=require("./components/molecules/LiquidTabs/LiquidNav.cjs"),le=require("./components/molecules/LiquidTabs/liquid-tab-id.cjs"),Ve=require("./components/molecules/Carousel/Carousel.cjs"),qe=require("./components/molecules/CallToAction/CallToAction.cjs"),de=require("./components/molecules/CallToAction/call-to-action-variants.cjs"),be=require("./components/molecules/EmptyState/EmptyState.cjs"),pe=require("./components/molecules/EmptyState/empty-state-variants.cjs"),Te=require("./components/molecules/MediaPreview/MediaPreview.cjs"),Ce=require("./components/molecules/ErrorState/ErrorState.cjs"),Se=require("./components/molecules/ErrorState/error-state-variants.cjs"),he=require("./components/molecules/MatchupCard/MatchupCard.cjs"),ge=require("./components/organisms/ActionBar/ActionBar.cjs"),we=require("./components/organisms/ActionBar/action-bar-variants.cjs"),ve=require("./components/organisms/Countdown/Countdown.cjs"),Ae=require("./components/organisms/Dialog/Dialog.cjs"),me=require("./components/organisms/Footer/Footer.cjs"),xe=require("./components/organisms/Navbar/Navbar.cjs"),ke=require("./components/organisms/Navbar/navbar-variants.cjs"),De=require("./components/organisms/Sheet/Sheet.cjs"),Ee=require("./components/organisms/ModerationQueue/ModerationQueue.cjs"),Be=require("./components/organisms/ModerationQueue/queue-actions.cjs"),ye=require("./components/organisms/ModerationQueue/QueueEditDialog.cjs"),Le=require("./components/organisms/ModerationQueue/QueueEditSheet.cjs"),e=require("./components/organisms/Table/Table.cjs"),r=require("./components/organisms/Table/table-variants.cjs"),Pe=require("./hooks/useCountdown.cjs"),l=require("./hooks/useKeySequence.cjs"),Ie=require("./lib/utils.cjs");exports.Avatar=V.Avatar;exports.avatarVariants=q.avatarVariants;exports.Badge=d.Badge;exports.badgeVariants=b.badgeVariants;exports.Button=p.Button;exports.buttonVariants=T.buttonVariants;exports.Card=C.Card;exports.cardVariants=S.cardVariants;exports.Checkbox=h.Checkbox;exports.checkboxVariants=g.checkboxVariants;exports.Disclosure=w.Disclosure;exports.disclosureContentVariants=t.disclosureContentVariants;exports.disclosureTriggerVariants=t.disclosureTriggerVariants;exports.Input=v.Input;exports.iconVariants=i.iconVariants;exports.inputVariants=i.inputVariants;exports.Link=A.Link;exports.linkVariants=m.linkVariants;exports.PasswordInput=x.PasswordInput;exports.Combobox=k.Combobox;exports.Chip=D.Chip;exports.chipVariants=E.chipVariants;exports.Pill=B.Pill;exports.pillDotVariants=n.pillDotVariants;exports.pillVariants=n.pillVariants;exports.Eyebrow=y.Eyebrow;exports.eyebrowVariants=L.eyebrowVariants;exports.InlineCode=P.InlineCode;exports.inlineCodeVariants=I.inlineCodeVariants;exports.LabeledDivider=M.LabeledDivider;exports.Stat=O.Stat;exports.statValueVariants=G.statValueVariants;exports.ThemeToggle=N.ThemeToggle;exports.MultiSelect=Q.MultiSelect;exports.Select=R.Select;exports.selectOptionVariants=o.selectOptionVariants;exports.selectTriggerVariants=o.selectTriggerVariants;exports.Spinner=H.Spinner;exports.Switch=F.Switch;exports.switchThumbVariants=s.switchThumbVariants;exports.switchTrackVariants=s.switchTrackVariants;exports.Textarea=K.Textarea;exports.textareaVariants=_.textareaVariants;exports.AvatarStrip=W.AvatarStrip;exports.Tooltip=X.Tooltip;exports.CollapsibleSection=f.CollapsibleSection;exports.SegmentBar=j.SegmentBar;exports.Toast=z.Toast;exports.toastVariants=J.toastVariants;exports.Toaster=U.Toaster;exports.TONE_PREFIX=u.TONE_PREFIX;exports.toast=u.toast;exports.Alert=Y.Alert;exports.alertVariants=Z.alertVariants;exports.Accordion=$.Accordion;exports.DescriptionList=ee.DescriptionList;exports.descriptionListVariants=re.descriptionListVariants;exports.Pullquote=ae.Pullquote;exports.pullquoteVariants=te.pullquoteVariants;exports.CheckboxGroup=ie.CheckboxGroup;exports.checkboxGroupOptionsVariants=c.checkboxGroupOptionsVariants;exports.checkboxGroupPanelVariants=c.checkboxGroupPanelVariants;exports.RadioGroup=ne.RadioGroup;exports.radioDotVariants=a.radioDotVariants;exports.radioGroupOptionsVariants=a.radioGroupOptionsVariants;exports.radioOptionVariants=a.radioOptionVariants;exports.radioVariants=a.radioVariants;exports.Breadcrumbs=oe.Breadcrumbs;exports.breadcrumbVariants=se.breadcrumbVariants;exports.LiquidTabs=ue.LiquidTabs;exports.LiquidNav=ce.LiquidNav;exports.liquidTabId=le.liquidTabId;exports.Carousel=Ve.Carousel;exports.CallToAction=qe.CallToAction;exports.ctaVariants=de.ctaVariants;exports.EmptyState=be.EmptyState;exports.emptyStateVariants=pe.emptyStateVariants;exports.MediaPreview=Te.MediaPreview;exports.ErrorState=Ce.ErrorState;exports.errorStateVariants=Se.errorStateVariants;exports.MatchupCard=he.MatchupCard;exports.ActionBar=ge.ActionBar;exports.actionBarVariants=we.actionBarVariants;exports.Countdown=ve.Countdown;exports.Dialog=Ae.Dialog;exports.Footer=me.Footer;exports.Navbar=xe.Navbar;exports.navbarVariants=ke.navbarVariants;exports.Sheet=De.Sheet;exports.ModerationQueue=Ee.ModerationQueue;exports.editAction=Be.editAction;exports.QueueEditDialog=ye.QueueEditDialog;exports.QueueEditSheet=Le.QueueEditSheet;exports.Table=e.Table;exports.TableBody=e.TableBody;exports.TableCaption=e.TableCaption;exports.TableCell=e.TableCell;exports.TableFooter=e.TableFooter;exports.TableHead=e.TableHead;exports.TableHeader=e.TableHeader;exports.TableRow=e.TableRow;exports.tableCellVariants=r.tableCellVariants;exports.tableHeadVariants=r.tableHeadVariants;exports.tableHeaderVariants=r.tableHeaderVariants;exports.tableRowVariants=r.tableRowVariants;exports.tableVariants=r.tableVariants;exports.tableWrapperVariants=r.tableWrapperVariants;exports.useCountdown=Pe.useCountdown;exports.KONAMI_CODE=l.KONAMI_CODE;exports.useKeySequence=l.useKeySequence;exports.cn=Ie.cn;