@blakesteve/roster 4.13.0 → 5.0.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.
- package/README.md +14 -6
- package/dist/components/atoms/Avatar/Avatar.cjs +1 -1
- package/dist/components/atoms/Avatar/Avatar.js +9 -8
- package/dist/components/atoms/AvatarStrip/AvatarStrip.cjs +1 -1
- package/dist/components/atoms/AvatarStrip/AvatarStrip.js +11 -10
- package/dist/components/atoms/Badge/Badge.cjs +1 -1
- package/dist/components/atoms/Badge/Badge.js +12 -11
- package/dist/components/atoms/Button/Button.cjs +1 -1
- package/dist/components/atoms/Button/Button.js +9 -8
- package/dist/components/atoms/Card/Card.cjs +1 -1
- package/dist/components/atoms/Card/Card.js +14 -13
- package/dist/components/atoms/Checkbox/Checkbox.cjs +1 -1
- package/dist/components/atoms/Checkbox/Checkbox.js +10 -9
- package/dist/components/atoms/Chip/Chip.cjs +1 -1
- package/dist/components/atoms/Chip/Chip.js +1 -0
- package/dist/components/atoms/CollapsibleSection/CollapsibleSection.cjs +1 -1
- package/dist/components/atoms/CollapsibleSection/CollapsibleSection.js +1 -0
- package/dist/components/atoms/Combobox/Combobox.cjs +1 -1
- package/dist/components/atoms/Combobox/Combobox.js +20 -19
- package/dist/components/atoms/Disclosure/Disclosure.cjs +1 -1
- package/dist/components/atoms/Disclosure/Disclosure.js +5 -4
- package/dist/components/atoms/Eyebrow/Eyebrow.cjs +1 -1
- package/dist/components/atoms/Eyebrow/Eyebrow.js +9 -8
- package/dist/components/atoms/InlineCode/InlineCode.cjs +1 -1
- package/dist/components/atoms/InlineCode/InlineCode.js +7 -6
- package/dist/components/atoms/Input/Input.cjs +1 -1
- package/dist/components/atoms/Input/Input.js +12 -11
- package/dist/components/atoms/LabeledDivider/LabeledDivider.cjs +1 -1
- package/dist/components/atoms/LabeledDivider/LabeledDivider.js +6 -5
- package/dist/components/atoms/Link/Link.cjs +1 -1
- package/dist/components/atoms/Link/Link.js +10 -9
- package/dist/components/atoms/LiquidTabs/LiquidTabs.cjs +1 -1
- package/dist/components/atoms/LiquidTabs/LiquidTabs.js +1 -0
- package/dist/components/atoms/MultiSelect/MultiSelect.cjs +1 -1
- package/dist/components/atoms/MultiSelect/MultiSelect.js +1 -0
- package/dist/components/atoms/PasswordInput/PasswordInput.cjs +1 -1
- package/dist/components/atoms/PasswordInput/PasswordInput.js +1 -0
- package/dist/components/atoms/Pill/Pill.cjs +1 -1
- package/dist/components/atoms/Pill/Pill.js +5 -4
- package/dist/components/atoms/SegmentBar/SegmentBar.cjs +1 -1
- package/dist/components/atoms/SegmentBar/SegmentBar.js +1 -0
- package/dist/components/atoms/Select/Select.cjs +1 -1
- package/dist/components/atoms/Select/Select.js +1 -0
- package/dist/components/atoms/Spinner/Spinner.cjs +1 -1
- package/dist/components/atoms/Spinner/Spinner.js +3 -2
- package/dist/components/atoms/Stat/Stat.cjs +1 -1
- package/dist/components/atoms/Stat/Stat.js +7 -6
- package/dist/components/atoms/Switch/Switch.cjs +1 -1
- package/dist/components/atoms/Switch/Switch.js +1 -0
- package/dist/components/atoms/Textarea/Textarea.cjs +1 -1
- package/dist/components/atoms/Textarea/Textarea.js +11 -10
- package/dist/components/atoms/ThemeToggle/ThemeToggle.cjs +1 -1
- package/dist/components/atoms/ThemeToggle/ThemeToggle.js +1 -0
- package/dist/components/atoms/Tooltip/Tooltip.cjs +1 -1
- package/dist/components/atoms/Tooltip/Tooltip.js +4 -3
- package/dist/components/molecules/Accordion/Accordion.cjs +1 -1
- package/dist/components/molecules/Accordion/Accordion.js +5 -4
- package/dist/components/molecules/Alert/Alert.cjs +1 -1
- package/dist/components/molecules/Alert/Alert.js +1 -0
- package/dist/components/molecules/Breadcrumbs/Breadcrumbs.cjs +1 -1
- package/dist/components/molecules/Breadcrumbs/Breadcrumbs.js +4 -3
- package/dist/components/molecules/CallToAction/CallToAction.cjs +1 -1
- package/dist/components/molecules/CallToAction/CallToAction.js +1 -0
- package/dist/components/molecules/CheckboxGroup/CheckboxGroup.cjs +1 -1
- package/dist/components/molecules/CheckboxGroup/CheckboxGroup.js +7 -6
- package/dist/components/molecules/DescriptionList/DescriptionList.cjs +1 -1
- package/dist/components/molecules/DescriptionList/DescriptionList.js +1 -0
- package/dist/components/molecules/EmptyState/EmptyState.cjs +1 -1
- package/dist/components/molecules/EmptyState/EmptyState.js +1 -0
- package/dist/components/molecules/ErrorState/ErrorState.cjs +1 -1
- package/dist/components/molecules/ErrorState/ErrorState.js +5 -4
- package/dist/components/molecules/MatchupCard/MatchupCard.cjs +1 -1
- package/dist/components/molecules/MatchupCard/MatchupCard.js +1 -0
- package/dist/components/molecules/Pullquote/Pullquote.cjs +1 -1
- package/dist/components/molecules/Pullquote/Pullquote.js +6 -5
- package/dist/components/molecules/RadioGroup/RadioGroup.cjs +1 -1
- package/dist/components/molecules/RadioGroup/RadioGroup.js +1 -0
- package/dist/components/molecules/Toast/Toast.cjs +1 -1
- package/dist/components/molecules/Toast/Toast.js +1 -0
- package/dist/components/molecules/Toast/Toaster.cjs +1 -1
- package/dist/components/molecules/Toast/Toaster.js +1 -0
- package/dist/components/molecules/Toast/toast-api.cjs +1 -1
- package/dist/components/molecules/Toast/toast-api.js +11 -10
- package/dist/components/organisms/ActionBar/ActionBar.cjs +1 -1
- package/dist/components/organisms/ActionBar/ActionBar.js +5 -4
- package/dist/components/organisms/Countdown/Countdown.cjs +1 -1
- package/dist/components/organisms/Countdown/Countdown.js +1 -0
- package/dist/components/organisms/DataTable/DataTable.cjs +1 -1
- package/dist/components/organisms/DataTable/DataTable.js +1 -0
- package/dist/components/organisms/Dialog/Dialog.cjs +1 -1
- package/dist/components/organisms/Dialog/Dialog.js +5 -4
- package/dist/components/organisms/Footer/Footer.cjs +1 -1
- package/dist/components/organisms/Footer/Footer.js +1 -0
- package/dist/components/organisms/Navbar/Navbar.cjs +1 -1
- package/dist/components/organisms/Navbar/Navbar.js +1 -0
- package/dist/components/organisms/Table/Table.cjs +1 -1
- package/dist/components/organisms/Table/Table.js +20 -19
- package/dist/data-table.cjs +1 -1
- package/dist/data-table.js +2 -3
- package/dist/hooks/useCountdown.cjs +1 -1
- package/dist/hooks/useCountdown.js +1 -0
- package/dist/hooks/useKeySequence.cjs +1 -1
- package/dist/hooks/useKeySequence.js +1 -0
- package/dist/internal/PopupOption.cjs +1 -1
- package/dist/internal/PopupOption.js +1 -0
- package/dist/internal/popup.cjs +1 -1
- package/dist/internal/popup.js +8 -7
- package/dist/meta.json +1 -1
- package/dist/roster.cjs +1 -1
- package/dist/roster.js +7 -8
- package/dist/utils.d.ts +11 -8
- package/package.json +4 -3
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsx as r, jsxs as s } from "react/jsx-runtime";
|
|
2
3
|
import { Fragment as a } from "react";
|
|
3
4
|
import { FontAwesomeIcon as v } from "../../../node_modules/@fortawesome/react-fontawesome/dist/index.js";
|
|
@@ -74,16 +75,16 @@ const k = /* @__PURE__ */ e(
|
|
|
74
75
|
), N = /* @__PURE__ */ e("rst:text-xl rst:font-bold rst:leading-6 rst:text-inherit"), T = /* @__PURE__ */ e("rst:mt-1 rst:text-sm rst:text-inherit rst:opacity-75"), F = /* @__PURE__ */ e(
|
|
75
76
|
"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"
|
|
76
77
|
), K = ({
|
|
77
|
-
isOpen:
|
|
78
|
+
isOpen: c,
|
|
78
79
|
onClose: o,
|
|
79
|
-
title:
|
|
80
|
+
title: d,
|
|
80
81
|
description: i,
|
|
81
82
|
size: m,
|
|
82
83
|
variant: l,
|
|
83
84
|
status: f,
|
|
84
85
|
children: g,
|
|
85
86
|
className: p
|
|
86
|
-
}) => /* @__PURE__ */ r(w, { appear: !0, show:
|
|
87
|
+
}) => /* @__PURE__ */ r(w, { appear: !0, show: c, as: a, children: /* @__PURE__ */ s(x, { as: "div", className: "rst:font-ui rst:relative rst:z-50", onClose: o, children: [
|
|
87
88
|
/* @__PURE__ */ r(
|
|
88
89
|
n,
|
|
89
90
|
{
|
|
@@ -125,7 +126,7 @@ const k = /* @__PURE__ */ e(
|
|
|
125
126
|
children: [
|
|
126
127
|
/* @__PURE__ */ s("div", { className: "rst:flex rst:items-start rst:justify-between", children: [
|
|
127
128
|
/* @__PURE__ */ s("div", { children: [
|
|
128
|
-
/* @__PURE__ */ r(h, { as: "h2", className: t(N()), children:
|
|
129
|
+
/* @__PURE__ */ r(h, { as: "h2", className: t(N()), children: d }),
|
|
129
130
|
i && /* @__PURE__ */ r("p", { className: t(T()), children: i })
|
|
130
131
|
] }),
|
|
131
132
|
/* @__PURE__ */ r("div", { className: "rst:ml-4 rst:flex rst:shrink-0", children: /* @__PURE__ */ r(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),u=require("react"),m=require("../../../lib/utils.cjs"),h=require("./footer-variants.cjs"),s=u.forwardRef(({className:a,variant:o,companyName:i="Ball Collaborative",links:r,routerElement:n,...c},l)=>{const x=new Date().getFullYear(),f=n??"a";return t.jsx("footer",{ref:l,className:m.cn(h.footerVariants({variant:o}),a),...c,children:t.jsxs("div",{className:"rst:container rst:mx-auto rst:px-4 rst:flex rst:flex-col rst:items-center rst:gap-2",children:[r&&r.length>0&&t.jsx("nav",{"aria-label":"Footer navigation",className:"rst:flex rst:flex-wrap rst:justify-center rst:gap-x-5 rst:gap-y-1",children:r.map(e=>t.jsx(f,{href:e.href,to:e.href,className:"rst:text-sm rst:text-inherit rst:opacity-70 rst:hover:opacity-100 rst:transition-opacity",children:e.label},e.href))}),t.jsxs("p",{className:"rst:text-center rst:text-sm rst:font-medium rst:text-inherit",children:["© ",x," ",i,", All rights reserved."]})]})})});s.displayName="Footer";exports.Footer=s;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),f=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"),p=require("../../atoms/Button/Button.cjs"),b=require("../../atoms/Link/Link.cjs"),$=require("../../atoms/Badge/Badge.cjs"),W=require("../../atoms/Avatar/Avatar.cjs"),K=require("../../atoms/Switch/Switch.cjs"),Y=require("./navbar-variants.cjs"),m=require("../../../node_modules/@headlessui/react/dist/components/menu/menu.cjs"),S=require("../../../node_modules/@headlessui/react/dist/components/popover/popover.cjs"),P=require("../../../node_modules/@headlessui/react/dist/components/transition/transition.cjs"),X=(s,n)=>typeof s=="function"?s({close:n}):s;function Z(s){return f.useSyncExternalStore(n=>{if(!s||typeof document>"u")return()=>{};const o=new MutationObserver(n);return o.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>o.disconnect()},()=>s&&document.documentElement.classList.contains("dark"),()=>!1)}function _({close:s}){return f.useEffect(()=>{const n=o=>{const g=document.querySelector("[data-roster-mobile-panel]"),k=document.querySelector("[data-roster-hamburger]"),d=o.target;!g?.contains(d)&&!k?.contains(d)&&s()};return document.addEventListener("pointerdown",n,{capture:!0}),()=>document.removeEventListener("pointerdown",n,{capture:!0})},[s]),null}function T({activePath:s,close:n}){const o=f.useRef(s);return f.useEffect(()=>{o.current!==s&&(o.current=s,n())},[s,n]),null}const rr=({logoSrc:s,logoSize:n="2rem",logoClassName:o,brandName:g,items:k,activePath:d,routerElement:v,user:i,onLogin:j,onLogout:N,onInboxClick:w,onThemeToggle:y,actions:V,brandElement:z,navActions:G,userMenuItems:B=[],className:H,variant:l="default",position:J="sticky",themeMode:q,notificationVariant:L="error",notificationFill:O="solid",...Q})=>{const C=(i?.notificationCount||0)>0,E=typeof n=="number"?`${n}px`:n,R={width:E,height:E},U=Z(q==="auto"),x=(q==="auto"?U?"dark":"light":q??(l==="white"||l==="default"?"light":"dark"))==="dark",A=l==="slate"||l==="primary"||l==="default"&&x||l==="white"&&x||l==="transparent"&&x,F={brand:A?"rst:text-white rst:dark:text-white rst:hover:text-gray-200 rst:dark:hover:text-gray-200":"rst:text-gray-900 rst:dark:text-gray-900 rst:hover:text-gray-600 rst:dark:hover:text-gray-600",linkBase:A?"rst:text-gray-300 rst:dark:text-gray-300 rst:hover:text-white rst:dark:hover:text-white":"rst:text-gray-600 rst:dark:text-gray-600 rst:hover:text-gray-900 rst:dark:hover:text-gray-900",linkActive:A?"rst:text-primary-400 rst:dark:text-primary-400 rst:font-semibold rst:hover:text-primary-300 rst:dark:hover:text-primary-300":"rst:text-primary-600 rst:dark:text-primary-600 rst:font-semibold rst:hover:text-primary-700 rst:dark:hover:text-primary-700",hamburger:A?"rst:text-gray-300 rst:dark:text-gray-300 rst:hover:bg-white/10 rst:dark:hover:bg-white/10 rst:hover:text-white rst:dark:hover:text-white":"rst:text-gray-500 rst:dark:text-gray-500 rst:hover:bg-gray-100 rst:dark:hover:bg-gray-100 rst:hover:text-gray-700 rst:dark:hover:text-gray-700"};return r.jsx(S.Popover,{as:"nav",className:e.cn("rst:z-50",Y.navbarVariants({variant:l,position:J}),H),...Q,children:({open:D,close:c})=>{const I=X(V,c),M=X(G,c);return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"rst:container rst:mx-auto rst:flex rst:items-center rst:justify-between rst:px-4 rst:h-16",children:[r.jsxs(b.Link,{as:v,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:R,className:e.cn("rst:shrink-0",o??"rst:rounded-md")}),z??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 a=d===t.path;return r.jsxs(b.Link,{as:v,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",a?F.linkActive:F.linkBase),children:[t.label,t.badge&&r.jsx("span",{className:"rst:inline-flex",children:t.badge})]},t.path)})}),M,I??(i?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:i.initials,src:i.avatarSrc,size:"sm",shape:"circle",colorScheme:i.avatarColor??"primary"}),C&&r.jsx("div",{className:"rst:absolute rst:-top-1 rst:-right-2",children:r.jsx($.Badge,{fill:O,size:"xs",statusBadge:!0,variant:L,children:i.notificationCount})})]}),r.jsx(P.Transition,{as:f.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:[C&&w&&r.jsx(m.MenuItem,{children:({focus:t})=>r.jsxs(p.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 (",i.notificationCount,")"]})}),y&&r.jsx(m.MenuItem,{children:({focus:t})=>r.jsxs("div",{onClick:a=>{a.preventDefault(),y()},role:"button",tabIndex:0,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"),onKeyDown:a=>{(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),y())},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",x?"rst:text-amber-500":"rst:text-gray-400")}),r.jsx("span",{className:"rst:font-medium",children:"Dark Mode"})]}),r.jsx(K.Switch,{checked:x,onChange:()=>{},size:"xs",variant:"neutral",className:"rst:pointer-events-none rst:m-0"})]})})]}),B.length>0&&r.jsx("div",{className:"rst:py-1",children:B.map(t=>r.jsx(m.MenuItem,{children:({focus:a})=>r.jsxs(b.Link,{as:v,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",a&&"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(p.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(p.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(S.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"}),D?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"}),C&&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"})]})]})})]}),D&&r.jsx(_,{close:c}),D&&r.jsx(T,{activePath:d,close:c}),r.jsx(P.Transition,{as:f.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(S.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:R,className:e.cn("rst:shrink-0",o??"rst:rounded-md")}),z??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(S.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:[M&&r.jsx("div",{className:"rst:mb-4",children:M}),r.jsxs("nav",{className:"rst:grid rst:gap-y-4",children:[k.map(t=>{const a=d===t.path;return r.jsx(b.Link,{as:v,href:t.path,to:t.path,onClick:()=>c(),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",a?"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",a?"rst:text-primary-600 rst:dark:text-primary-400 rst:font-bold":"rst:text-gray-900 rst:dark:text-gray-100"),children:[t.label,t.badge&&r.jsx("span",{className:"rst:inline-flex",children:t.badge})]})},t.path)}),i&&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 a=d===t.path;return r.jsxs(b.Link,{as:v,href:t.path,to:t.path,onClick:()=>c(),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",a?"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",a?"rst:text-primary-600 rst:dark:text-primary-400 rst:font-bold":"rst:text-gray-900 rst:dark:text-gray-100"),children:t.label}),t.badge&&r.jsx("span",{className:"rst:ml-2 rst:inline-flex",children:t.badge})]},t.path)})]})]})]})]}),(i||I||j)&&r.jsx("div",{className:"rst:py-6 rst:px-5 rst:space-y-4",children:I||(!i&&j?r.jsx(p.Button,{variant:"solid",colorScheme:"primary",className:"rst:w-full rst:justify-center",onClick:()=>{j(),c()},children:"Log In"}):r.jsxs(r.Fragment,{children:[C&&w&&r.jsx(p.Button,{variant:"ghost",colorScheme:"neutral",onClick:()=>{w?.(),c()},className:"rst:w-full rst:justify-between rst:px-4 rst:text-base rst:font-medium rst:hover:bg-gray-50 rst:dark:hover:bg-gray-700 rst:text-gray-900 rst:dark:text-gray-100",endIcon:r.jsx($.Badge,{fill:O,size:"xs",statusBadge:!0,variant:L,children:i?.notificationCount}),children:"Pending Invitations"}),y&&r.jsxs("div",{onClick:t=>{t.preventDefault(),y()},role:"button",tabIndex:0,onKeyDown:t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),y())},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",x?"rst:text-amber-500":"rst:text-gray-400")}),r.jsx("span",{children:"Dark Mode"})]}),r.jsx(K.Switch,{checked:x,onChange:()=>{},size:"sm",variant:"neutral",className:"rst:pointer-events-none rst:m-0"})]}),N&&r.jsx(p.Button,{variant:"outline",colorScheme:"error",className:"rst:w-full rst:justify-center",onClick:()=>{N?.(),c()},children:"Log Out"})]}))})]})})})]})}})};exports.Navbar=rr;
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),f=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"),p=require("../../atoms/Button/Button.cjs"),b=require("../../atoms/Link/Link.cjs"),$=require("../../atoms/Badge/Badge.cjs"),W=require("../../atoms/Avatar/Avatar.cjs"),K=require("../../atoms/Switch/Switch.cjs"),Y=require("./navbar-variants.cjs"),m=require("../../../node_modules/@headlessui/react/dist/components/menu/menu.cjs"),S=require("../../../node_modules/@headlessui/react/dist/components/popover/popover.cjs"),P=require("../../../node_modules/@headlessui/react/dist/components/transition/transition.cjs"),X=(s,n)=>typeof s=="function"?s({close:n}):s;function Z(s){return f.useSyncExternalStore(n=>{if(!s||typeof document>"u")return()=>{};const o=new MutationObserver(n);return o.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>o.disconnect()},()=>s&&document.documentElement.classList.contains("dark"),()=>!1)}function _({close:s}){return f.useEffect(()=>{const n=o=>{const g=document.querySelector("[data-roster-mobile-panel]"),k=document.querySelector("[data-roster-hamburger]"),d=o.target;!g?.contains(d)&&!k?.contains(d)&&s()};return document.addEventListener("pointerdown",n,{capture:!0}),()=>document.removeEventListener("pointerdown",n,{capture:!0})},[s]),null}function T({activePath:s,close:n}){const o=f.useRef(s);return f.useEffect(()=>{o.current!==s&&(o.current=s,n())},[s,n]),null}const rr=({logoSrc:s,logoSize:n="2rem",logoClassName:o,brandName:g,items:k,activePath:d,routerElement:v,user:i,onLogin:j,onLogout:N,onInboxClick:w,onThemeToggle:y,actions:V,brandElement:z,navActions:G,userMenuItems:B=[],className:H,variant:l="default",position:J="sticky",themeMode:q,notificationVariant:L="error",notificationFill:O="solid",...Q})=>{const C=(i?.notificationCount||0)>0,E=typeof n=="number"?`${n}px`:n,R={width:E,height:E},U=Z(q==="auto"),x=(q==="auto"?U?"dark":"light":q??(l==="white"||l==="default"?"light":"dark"))==="dark",A=l==="slate"||l==="primary"||l==="default"&&x||l==="white"&&x||l==="transparent"&&x,F={brand:A?"rst:text-white rst:dark:text-white rst:hover:text-gray-200 rst:dark:hover:text-gray-200":"rst:text-gray-900 rst:dark:text-gray-900 rst:hover:text-gray-600 rst:dark:hover:text-gray-600",linkBase:A?"rst:text-gray-300 rst:dark:text-gray-300 rst:hover:text-white rst:dark:hover:text-white":"rst:text-gray-600 rst:dark:text-gray-600 rst:hover:text-gray-900 rst:dark:hover:text-gray-900",linkActive:A?"rst:text-primary-400 rst:dark:text-primary-400 rst:font-semibold rst:hover:text-primary-300 rst:dark:hover:text-primary-300":"rst:text-primary-600 rst:dark:text-primary-600 rst:font-semibold rst:hover:text-primary-700 rst:dark:hover:text-primary-700",hamburger:A?"rst:text-gray-300 rst:dark:text-gray-300 rst:hover:bg-white/10 rst:dark:hover:bg-white/10 rst:hover:text-white rst:dark:hover:text-white":"rst:text-gray-500 rst:dark:text-gray-500 rst:hover:bg-gray-100 rst:dark:hover:bg-gray-100 rst:hover:text-gray-700 rst:dark:hover:text-gray-700"};return r.jsx(S.Popover,{as:"nav",className:e.cn("rst:z-50",Y.navbarVariants({variant:l,position:J}),H),...Q,children:({open:D,close:c})=>{const I=X(V,c),M=X(G,c);return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"rst:container rst:mx-auto rst:flex rst:items-center rst:justify-between rst:px-4 rst:h-16",children:[r.jsxs(b.Link,{as:v,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:R,className:e.cn("rst:shrink-0",o??"rst:rounded-md")}),z??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 a=d===t.path;return r.jsxs(b.Link,{as:v,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",a?F.linkActive:F.linkBase),children:[t.label,t.badge&&r.jsx("span",{className:"rst:inline-flex",children:t.badge})]},t.path)})}),M,I??(i?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:i.initials,src:i.avatarSrc,size:"sm",shape:"circle",colorScheme:i.avatarColor??"primary"}),C&&r.jsx("div",{className:"rst:absolute rst:-top-1 rst:-right-2",children:r.jsx($.Badge,{fill:O,size:"xs",statusBadge:!0,variant:L,children:i.notificationCount})})]}),r.jsx(P.Transition,{as:f.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:[C&&w&&r.jsx(m.MenuItem,{children:({focus:t})=>r.jsxs(p.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 (",i.notificationCount,")"]})}),y&&r.jsx(m.MenuItem,{children:({focus:t})=>r.jsxs("div",{onClick:a=>{a.preventDefault(),y()},role:"button",tabIndex:0,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"),onKeyDown:a=>{(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),y())},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",x?"rst:text-amber-500":"rst:text-gray-400")}),r.jsx("span",{className:"rst:font-medium",children:"Dark Mode"})]}),r.jsx(K.Switch,{checked:x,onChange:()=>{},size:"xs",variant:"neutral",className:"rst:pointer-events-none rst:m-0"})]})})]}),B.length>0&&r.jsx("div",{className:"rst:py-1",children:B.map(t=>r.jsx(m.MenuItem,{children:({focus:a})=>r.jsxs(b.Link,{as:v,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",a&&"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(p.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(p.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(S.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"}),D?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"}),C&&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"})]})]})})]}),D&&r.jsx(_,{close:c}),D&&r.jsx(T,{activePath:d,close:c}),r.jsx(P.Transition,{as:f.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(S.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:R,className:e.cn("rst:shrink-0",o??"rst:rounded-md")}),z??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(S.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:[M&&r.jsx("div",{className:"rst:mb-4",children:M}),r.jsxs("nav",{className:"rst:grid rst:gap-y-4",children:[k.map(t=>{const a=d===t.path;return r.jsx(b.Link,{as:v,href:t.path,to:t.path,onClick:()=>c(),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",a?"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",a?"rst:text-primary-600 rst:dark:text-primary-400 rst:font-bold":"rst:text-gray-900 rst:dark:text-gray-100"),children:[t.label,t.badge&&r.jsx("span",{className:"rst:inline-flex",children:t.badge})]})},t.path)}),i&&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 a=d===t.path;return r.jsxs(b.Link,{as:v,href:t.path,to:t.path,onClick:()=>c(),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",a?"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",a?"rst:text-primary-600 rst:dark:text-primary-400 rst:font-bold":"rst:text-gray-900 rst:dark:text-gray-100"),children:t.label}),t.badge&&r.jsx("span",{className:"rst:ml-2 rst:inline-flex",children:t.badge})]},t.path)})]})]})]})]}),(i||I||j)&&r.jsx("div",{className:"rst:py-6 rst:px-5 rst:space-y-4",children:I||(!i&&j?r.jsx(p.Button,{variant:"solid",colorScheme:"primary",className:"rst:w-full rst:justify-center",onClick:()=>{j(),c()},children:"Log In"}):r.jsxs(r.Fragment,{children:[C&&w&&r.jsx(p.Button,{variant:"ghost",colorScheme:"neutral",onClick:()=>{w?.(),c()},className:"rst:w-full rst:justify-between rst:px-4 rst:text-base rst:font-medium rst:hover:bg-gray-50 rst:dark:hover:bg-gray-700 rst:text-gray-900 rst:dark:text-gray-100",endIcon:r.jsx($.Badge,{fill:O,size:"xs",statusBadge:!0,variant:L,children:i?.notificationCount}),children:"Pending Invitations"}),y&&r.jsxs("div",{onClick:t=>{t.preventDefault(),y()},role:"button",tabIndex:0,onKeyDown:t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),y())},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",x?"rst:text-amber-500":"rst:text-gray-400")}),r.jsx("span",{children:"Dark Mode"})]}),r.jsx(K.Switch,{checked:x,onChange:()=>{},size:"sm",variant:"neutral",className:"rst:pointer-events-none rst:m-0"})]}),N&&r.jsx(p.Button,{variant:"outline",colorScheme:"error",className:"rst:w-full rst:justify-center",onClick:()=>{N?.(),c()},children:"Log Out"})]}))})]})})})]})}})};exports.Navbar=rr;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),N=require("react"),n=require("../../../lib/utils.cjs"),c=require("./table-variants.cjs");function j(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const r=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,r.get?r:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const s=j(N),d=s.createContext({variant:"default",size:"md",hoverable:!1}),i=s.forwardRef(({className:e,variant:t="default",size:a="md",hoverable:r=!1,...o},y)=>l.jsx(d.Provider,{value:{variant:t,size:a,hoverable:r},children:l.jsx("div",{className:n.cn(c.tableWrapperVariants({variant:t})),children:l.jsx("table",{ref:y,className:n.cn(c.tableVariants({size:a}),e),...o})})}));i.displayName="Table";const b=s.forwardRef(({className:e,...t},a)=>{const{variant:r}=s.useContext(d);return l.jsx("thead",{ref:a,className:n.cn(c.tableHeaderVariants({variant:r}),e),...t})});b.displayName="TableHeader";const u=s.forwardRef(({className:e,...t},a)=>l.jsx("tbody",{ref:a,className:n.cn("rst:[&_tr:last-child]:border-0",e),...t}));u.displayName="TableBody";const f=s.forwardRef(({className:e,...t},a)=>{const{variant:r}=s.useContext(d);return l.jsx("tfoot",{ref:a,className:n.cn(c.tableHeaderVariants({variant:r}),"rst:border-t rst:font-medium rst:[&>tr]:last:border-b-0",e),...t})});f.displayName="TableFooter";const m=s.forwardRef(({className:e,...t},a)=>{const{variant:r,hoverable:o}=s.useContext(d);return l.jsx("tr",{ref:a,className:n.cn(c.tableRowVariants({variant:r,hoverable:o}),e),...t})});m.displayName="TableRow";const T=s.forwardRef(({className:e,...t},a)=>{const{variant:r,size:o}=s.useContext(d);return l.jsx("th",{ref:a,className:n.cn(c.tableHeadVariants({variant:r,size:o}),e),...t})});T.displayName="TableHead";const p=s.forwardRef(({className:e,...t},a)=>{const{variant:r,size:o}=s.useContext(d);return l.jsx("td",{ref:a,className:n.cn(c.tableCellVariants({variant:r,size:o}),e),...t})});p.displayName="TableCell";const x=s.forwardRef(({className:e,...t},a)=>l.jsx("caption",{ref:a,className:n.cn("rst:mt-4 rst:text-sm rst:text-gray-500 rst:dark:text-gray-400",e),...t}));x.displayName="TableCaption";exports.Table=i;exports.TableBody=u;exports.TableCaption=x;exports.TableCell=p;exports.TableFooter=f;exports.TableHead=T;exports.TableHeader=b;exports.TableRow=m;
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),N=require("react"),n=require("../../../lib/utils.cjs"),c=require("./table-variants.cjs");function j(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const r=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,r.get?r:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const s=j(N),d=s.createContext({variant:"default",size:"md",hoverable:!1}),i=s.forwardRef(({className:e,variant:t="default",size:a="md",hoverable:r=!1,...o},y)=>l.jsx(d.Provider,{value:{variant:t,size:a,hoverable:r},children:l.jsx("div",{className:n.cn(c.tableWrapperVariants({variant:t})),children:l.jsx("table",{ref:y,className:n.cn(c.tableVariants({size:a}),e),...o})})}));i.displayName="Table";const b=s.forwardRef(({className:e,...t},a)=>{const{variant:r}=s.useContext(d);return l.jsx("thead",{ref:a,className:n.cn(c.tableHeaderVariants({variant:r}),e),...t})});b.displayName="TableHeader";const u=s.forwardRef(({className:e,...t},a)=>l.jsx("tbody",{ref:a,className:n.cn("rst:[&_tr:last-child]:border-0",e),...t}));u.displayName="TableBody";const f=s.forwardRef(({className:e,...t},a)=>{const{variant:r}=s.useContext(d);return l.jsx("tfoot",{ref:a,className:n.cn(c.tableHeaderVariants({variant:r}),"rst:border-t rst:font-medium rst:[&>tr]:last:border-b-0",e),...t})});f.displayName="TableFooter";const m=s.forwardRef(({className:e,...t},a)=>{const{variant:r,hoverable:o}=s.useContext(d);return l.jsx("tr",{ref:a,className:n.cn(c.tableRowVariants({variant:r,hoverable:o}),e),...t})});m.displayName="TableRow";const T=s.forwardRef(({className:e,...t},a)=>{const{variant:r,size:o}=s.useContext(d);return l.jsx("th",{ref:a,className:n.cn(c.tableHeadVariants({variant:r,size:o}),e),...t})});T.displayName="TableHead";const p=s.forwardRef(({className:e,...t},a)=>{const{variant:r,size:o}=s.useContext(d);return l.jsx("td",{ref:a,className:n.cn(c.tableCellVariants({variant:r,size:o}),e),...t})});p.displayName="TableCell";const x=s.forwardRef(({className:e,...t},a)=>l.jsx("caption",{ref:a,className:n.cn("rst:mt-4 rst:text-sm rst:text-gray-500 rst:dark:text-gray-400",e),...t}));x.displayName="TableCaption";exports.Table=i;exports.TableBody=u;exports.TableCaption=x;exports.TableCell=p;exports.TableFooter=f;exports.TableHead=T;exports.TableHeader=b;exports.TableRow=m;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
3
|
import * as r from "react";
|
|
3
|
-
import { cn as
|
|
4
|
-
import { tableVariants as
|
|
4
|
+
import { cn as o } from "../../../lib/utils.js";
|
|
5
|
+
import { tableVariants as c, tableWrapperVariants as m, tableCellVariants as f, tableHeaderVariants as i, tableHeadVariants as p, tableRowVariants as N } from "./table-variants.js";
|
|
5
6
|
const d = r.createContext({
|
|
6
7
|
variant: "default",
|
|
7
8
|
size: "md",
|
|
@@ -13,11 +14,11 @@ const d = r.createContext({
|
|
|
13
14
|
size: e = "md",
|
|
14
15
|
hoverable: s = !1,
|
|
15
16
|
...n
|
|
16
|
-
}, b) => /* @__PURE__ */
|
|
17
|
+
}, b) => /* @__PURE__ */ l(d.Provider, { value: { variant: a, size: e, hoverable: s }, children: /* @__PURE__ */ l("div", { className: o(m({ variant: a })), children: /* @__PURE__ */ l(
|
|
17
18
|
"table",
|
|
18
19
|
{
|
|
19
20
|
ref: b,
|
|
20
|
-
className:
|
|
21
|
+
className: o(c({ size: e }), t),
|
|
21
22
|
...n
|
|
22
23
|
}
|
|
23
24
|
) }) })
|
|
@@ -25,32 +26,32 @@ const d = r.createContext({
|
|
|
25
26
|
T.displayName = "Table";
|
|
26
27
|
const u = r.forwardRef(({ className: t, ...a }, e) => {
|
|
27
28
|
const { variant: s } = r.useContext(d);
|
|
28
|
-
return /* @__PURE__ */
|
|
29
|
+
return /* @__PURE__ */ l(
|
|
29
30
|
"thead",
|
|
30
31
|
{
|
|
31
32
|
ref: e,
|
|
32
|
-
className:
|
|
33
|
+
className: o(i({ variant: s }), t),
|
|
33
34
|
...a
|
|
34
35
|
}
|
|
35
36
|
);
|
|
36
37
|
});
|
|
37
38
|
u.displayName = "TableHeader";
|
|
38
|
-
const y = r.forwardRef(({ className: t, ...a }, e) => /* @__PURE__ */
|
|
39
|
+
const y = r.forwardRef(({ className: t, ...a }, e) => /* @__PURE__ */ l(
|
|
39
40
|
"tbody",
|
|
40
41
|
{
|
|
41
42
|
ref: e,
|
|
42
|
-
className:
|
|
43
|
+
className: o("rst:[&_tr:last-child]:border-0", t),
|
|
43
44
|
...a
|
|
44
45
|
}
|
|
45
46
|
));
|
|
46
47
|
y.displayName = "TableBody";
|
|
47
48
|
const x = r.forwardRef(({ className: t, ...a }, e) => {
|
|
48
49
|
const { variant: s } = r.useContext(d);
|
|
49
|
-
return /* @__PURE__ */
|
|
50
|
+
return /* @__PURE__ */ l(
|
|
50
51
|
"tfoot",
|
|
51
52
|
{
|
|
52
53
|
ref: e,
|
|
53
|
-
className:
|
|
54
|
+
className: o(
|
|
54
55
|
i({ variant: s }),
|
|
55
56
|
"rst:border-t rst:font-medium rst:[&>tr]:last:border-b-0",
|
|
56
57
|
t
|
|
@@ -62,11 +63,11 @@ const x = r.forwardRef(({ className: t, ...a }, e) => {
|
|
|
62
63
|
x.displayName = "TableFooter";
|
|
63
64
|
const C = r.forwardRef(({ className: t, ...a }, e) => {
|
|
64
65
|
const { variant: s, hoverable: n } = r.useContext(d);
|
|
65
|
-
return /* @__PURE__ */
|
|
66
|
+
return /* @__PURE__ */ l(
|
|
66
67
|
"tr",
|
|
67
68
|
{
|
|
68
69
|
ref: e,
|
|
69
|
-
className:
|
|
70
|
+
className: o(N({ variant: s, hoverable: n }), t),
|
|
70
71
|
...a
|
|
71
72
|
}
|
|
72
73
|
);
|
|
@@ -74,11 +75,11 @@ const C = r.forwardRef(({ className: t, ...a }, e) => {
|
|
|
74
75
|
C.displayName = "TableRow";
|
|
75
76
|
const R = r.forwardRef(({ className: t, ...a }, e) => {
|
|
76
77
|
const { variant: s, size: n } = r.useContext(d);
|
|
77
|
-
return /* @__PURE__ */
|
|
78
|
+
return /* @__PURE__ */ l(
|
|
78
79
|
"th",
|
|
79
80
|
{
|
|
80
81
|
ref: e,
|
|
81
|
-
className:
|
|
82
|
+
className: o(p({ variant: s, size: n }), t),
|
|
82
83
|
...a
|
|
83
84
|
}
|
|
84
85
|
);
|
|
@@ -86,21 +87,21 @@ const R = r.forwardRef(({ className: t, ...a }, e) => {
|
|
|
86
87
|
R.displayName = "TableHead";
|
|
87
88
|
const w = r.forwardRef(({ className: t, ...a }, e) => {
|
|
88
89
|
const { variant: s, size: n } = r.useContext(d);
|
|
89
|
-
return /* @__PURE__ */
|
|
90
|
+
return /* @__PURE__ */ l(
|
|
90
91
|
"td",
|
|
91
92
|
{
|
|
92
93
|
ref: e,
|
|
93
|
-
className:
|
|
94
|
+
className: o(f({ variant: s, size: n }), t),
|
|
94
95
|
...a
|
|
95
96
|
}
|
|
96
97
|
);
|
|
97
98
|
});
|
|
98
99
|
w.displayName = "TableCell";
|
|
99
|
-
const v = r.forwardRef(({ className: t, ...a }, e) => /* @__PURE__ */
|
|
100
|
+
const v = r.forwardRef(({ className: t, ...a }, e) => /* @__PURE__ */ l(
|
|
100
101
|
"caption",
|
|
101
102
|
{
|
|
102
103
|
ref: e,
|
|
103
|
-
className:
|
|
104
|
+
className: o("rst:mt-4 rst:text-sm rst:text-gray-500 rst:dark:text-gray-400", t),
|
|
104
105
|
...a
|
|
105
106
|
}
|
|
106
107
|
));
|
package/dist/data-table.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./components/organisms/DataTable/DataTable.cjs");exports.DataTable=e.DataTable;
|
package/dist/data-table.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react"),l=require("../node_modules/date-fns/isAfter.cjs"),f=require("../node_modules/date-fns/intervalToDuration.cjs"),m=u=>{const e=u.getTime(),n=i.useCallback(()=>{const t=new Date,s=new Date(e);if(l.isAfter(t,s))return{days:0,hours:0,minutes:0,seconds:0,isFinished:!0};const r=f.intervalToDuration({start:t,end:s});return{days:r.days??0,hours:r.hours??0,minutes:r.minutes??0,seconds:r.seconds??0,isFinished:!1}},[e]),[a,o]=i.useState(n),[c,d]=i.useState(e);return Object.is(c,e)||(d(e),o(n())),i.useEffect(()=>{if(Number.isNaN(e))return;const t=setInterval(()=>{const s=n();o(s),s.isFinished&&clearInterval(t)},1e3);return()=>clearInterval(t)},[e,n]),a};exports.useCountdown=m;
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react"),l=require("../node_modules/date-fns/isAfter.cjs"),f=require("../node_modules/date-fns/intervalToDuration.cjs"),m=u=>{const e=u.getTime(),n=i.useCallback(()=>{const t=new Date,s=new Date(e);if(l.isAfter(t,s))return{days:0,hours:0,minutes:0,seconds:0,isFinished:!0};const r=f.intervalToDuration({start:t,end:s});return{days:r.days??0,hours:r.hours??0,minutes:r.minutes??0,seconds:r.seconds??0,isFinished:!1}},[e]),[a,o]=i.useState(n),[c,d]=i.useState(e);return Object.is(c,e)||(d(e),o(n())),i.useEffect(()=>{if(Number.isNaN(e))return;const t=setInterval(()=>{const s=n();o(s),s.isFinished&&clearInterval(t)},1e3);return()=>clearInterval(t)},[e,n]),a};exports.useCountdown=m;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react"),y={timeout:1500,ignoreCase:!0,preventDefault:!1,enabled:!0,ignoreWhenTyping:!0},T=["ArrowUp","ArrowUp","ArrowDown","ArrowDown","ArrowLeft","ArrowRight","ArrowLeft","ArrowRight","b","a","Enter"];function D(e){if(!(e instanceof HTMLElement))return!1;if(e.isContentEditable)return!0;const
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react"),y={timeout:1500,ignoreCase:!0,preventDefault:!1,enabled:!0,ignoreWhenTyping:!0},T=["ArrowUp","ArrowUp","ArrowDown","ArrowDown","ArrowLeft","ArrowRight","ArrowLeft","ArrowRight","b","a","Enter"];function D(e){if(!(e instanceof HTMLElement))return!1;if(e.isContentEditable)return!0;const r=e.getAttribute("contenteditable");return r!==null&&r!=="false"?!0:["INPUT","TEXTAREA","SELECT"].includes(e.tagName)}function b(e,r,p={}){const{timeout:u,ignoreCase:s,preventDefault:c,enabled:f,ignoreWhenTyping:a}={...y,...p},t=o.useRef(0),l=o.useRef(0),w=o.useRef(r);o.useEffect(()=>{w.current=r},[r]),o.useEffect(()=>{if(!f||e.length===0)return;const d=n=>s?n.toLowerCase():n,i=e.map(d);function g(n){if(a&&D(n.target))return;const A=Date.now();u>0&&t.current>0&&A-l.current>u&&(t.current=0),l.current=A;const E=d(n.key);if(E===i[t.current]){c&&n.preventDefault(),t.current+=1,t.current===i.length&&(t.current=0,w.current());return}t.current=E===i[0]?1:0}return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[e,u,s,c,f,a])}exports.KONAMI_CODE=T;exports.useKeySequence=b;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime");require("react");const
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime");require("react");const c=require("../node_modules/@fortawesome/react-fontawesome/dist/index.cjs"),o=require("../node_modules/@fortawesome/free-solid-svg-icons/index.cjs"),s=require("../lib/utils.cjs"),l=require("../components/atoms/Select/select-variants.cjs");function u({as:r,value:n,disabled:i,size:e,children:a}){return t.jsxs(r,{value:n,disabled:i,className:s.cn(l.selectOptionVariants({size:e})),children:[t.jsx("span",{className:"rst:block rst:truncate rst:font-normal rst:group-data-selected:font-semibold",children:a}),t.jsx("span",{className:s.cn("rst:absolute rst:inset-y-0 rst:right-0 rst:hidden rst:items-center rst:text-primary-600 rst:dark:text-primary-400 rst:group-data-selected:flex",e==="sm"?"rst:pr-3":"rst:pr-4"),children:t.jsx(c.FontAwesomeIcon,{icon:o.faCheck,className:"rst:h-3.5 rst:w-3.5"})})]})}exports.PopupOption=u;
|
package/dist/internal/popup.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react");function
|
|
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;
|
package/dist/internal/popup.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import * as e from "react";
|
|
2
3
|
function s() {
|
|
3
|
-
const t =
|
|
4
|
-
return
|
|
5
|
-
|
|
4
|
+
const t = e.useRef(null), [r, o] = e.useState(!1);
|
|
5
|
+
return e.useLayoutEffect(() => {
|
|
6
|
+
o(!!t.current?.closest(".dark"));
|
|
6
7
|
}, []), { ref: t, inDarkScope: r };
|
|
7
8
|
}
|
|
8
9
|
const n = [
|
|
@@ -17,12 +18,12 @@ const n = [
|
|
|
17
18
|
function a(t, r) {
|
|
18
19
|
return t || r === "slate";
|
|
19
20
|
}
|
|
20
|
-
const c = "rst:w-(--button-width)",
|
|
21
|
+
const c = "rst:w-(--button-width)", u = "rst:w-(--input-width)", p = "bottom start";
|
|
21
22
|
export {
|
|
22
|
-
|
|
23
|
+
p as POPUP_ANCHOR,
|
|
23
24
|
n as POPUP_PANEL,
|
|
24
25
|
c as POPUP_WIDTH_OF_BUTTON,
|
|
25
|
-
|
|
26
|
+
u as POPUP_WIDTH_OF_INPUT,
|
|
26
27
|
a as popupInDarkPalette,
|
|
27
28
|
s as useDarkScope
|
|
28
29
|
};
|
package/dist/meta.json
CHANGED
package/dist/roster.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use
|
|
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"),e=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"),A=require("./components/atoms/PasswordInput/PasswordInput.cjs"),B=require("./components/atoms/Combobox/Combobox.cjs"),v=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"),E=require("./components/atoms/Eyebrow/Eyebrow.cjs"),L=require("./components/atoms/Eyebrow/eyebrow-variants.cjs"),O=require("./components/atoms/InlineCode/InlineCode.cjs"),G=require("./components/atoms/InlineCode/inline-code-variants.cjs"),P=require("./components/atoms/LabeledDivider/LabeledDivider.cjs"),I=require("./components/atoms/Stat/Stat.cjs"),M=require("./components/atoms/Stat/stat-variants.cjs"),R=require("./components/atoms/ThemeToggle/ThemeToggle.cjs"),H=require("./components/atoms/MultiSelect/MultiSelect.cjs"),F=require("./components/atoms/Select/Select.cjs"),o=require("./components/atoms/Select/select-variants.cjs"),N=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/LiquidTabs/LiquidTabs.cjs"),j=require("./components/atoms/Tooltip/Tooltip.cjs"),z=require("./components/atoms/CollapsibleSection/CollapsibleSection.cjs"),J=require("./components/atoms/SegmentBar/SegmentBar.cjs"),Q=require("./components/molecules/Toast/Toast.cjs"),U=require("./components/molecules/Toast/toast-variants.cjs"),Y=require("./components/molecules/Toast/Toaster.cjs"),c=require("./components/molecules/Toast/toast-api.cjs"),Z=require("./components/molecules/Alert/Alert.cjs"),$=require("./components/molecules/Alert/alert-variants.cjs"),rr=require("./components/molecules/Accordion/Accordion.cjs"),ar=require("./components/molecules/DescriptionList/DescriptionList.cjs"),tr=require("./components/molecules/DescriptionList/description-list-variants.cjs"),er=require("./components/molecules/Pullquote/Pullquote.cjs"),ir=require("./components/molecules/Pullquote/pullquote-variants.cjs"),nr=require("./components/molecules/CheckboxGroup/CheckboxGroup.cjs"),u=require("./components/molecules/CheckboxGroup/checkbox-group-variants.cjs"),or=require("./components/molecules/RadioGroup/RadioGroup.cjs"),t=require("./components/molecules/RadioGroup/radio-group-variants.cjs"),sr=require("./components/molecules/Breadcrumbs/Breadcrumbs.cjs"),cr=require("./components/molecules/Breadcrumbs/breadcrumb-variants.cjs"),ur=require("./components/molecules/CallToAction/CallToAction.cjs"),lr=require("./components/molecules/CallToAction/call-to-action-variants.cjs"),Vr=require("./components/molecules/EmptyState/EmptyState.cjs"),qr=require("./components/molecules/EmptyState/empty-state-variants.cjs"),br=require("./components/molecules/ErrorState/ErrorState.cjs"),dr=require("./components/molecules/ErrorState/error-state-variants.cjs"),pr=require("./components/molecules/MatchupCard/MatchupCard.cjs"),Tr=require("./components/organisms/ActionBar/ActionBar.cjs"),Cr=require("./components/organisms/ActionBar/action-bar-variants.cjs"),Sr=require("./components/organisms/Countdown/Countdown.cjs"),hr=require("./components/organisms/Dialog/Dialog.cjs"),gr=require("./components/organisms/Footer/Footer.cjs"),wr=require("./components/organisms/Navbar/Navbar.cjs"),mr=require("./components/organisms/Navbar/navbar-variants.cjs"),r=require("./components/organisms/Table/Table.cjs"),a=require("./components/organisms/Table/table-variants.cjs"),xr=require("./hooks/useCountdown.cjs"),l=require("./hooks/useKeySequence.cjs"),kr=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=e.disclosureContentVariants;exports.disclosureTriggerVariants=e.disclosureTriggerVariants;exports.Input=m.Input;exports.iconVariants=i.iconVariants;exports.inputVariants=i.inputVariants;exports.Link=x.Link;exports.linkVariants=k.linkVariants;exports.PasswordInput=A.PasswordInput;exports.Combobox=B.Combobox;exports.Chip=v.Chip;exports.chipVariants=y.chipVariants;exports.Pill=D.Pill;exports.pillDotVariants=n.pillDotVariants;exports.pillVariants=n.pillVariants;exports.Eyebrow=E.Eyebrow;exports.eyebrowVariants=L.eyebrowVariants;exports.InlineCode=O.InlineCode;exports.inlineCodeVariants=G.inlineCodeVariants;exports.LabeledDivider=P.LabeledDivider;exports.Stat=I.Stat;exports.statValueVariants=M.statValueVariants;exports.ThemeToggle=R.ThemeToggle;exports.MultiSelect=H.MultiSelect;exports.Select=F.Select;exports.selectOptionVariants=o.selectOptionVariants;exports.selectTriggerVariants=o.selectTriggerVariants;exports.Spinner=N.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.LiquidTabs=f.LiquidTabs;exports.Tooltip=j.Tooltip;exports.CollapsibleSection=z.CollapsibleSection;exports.SegmentBar=J.SegmentBar;exports.Toast=Q.Toast;exports.toastVariants=U.toastVariants;exports.Toaster=Y.Toaster;exports.TONE_PREFIX=c.TONE_PREFIX;exports.toast=c.toast;exports.Alert=Z.Alert;exports.alertVariants=$.alertVariants;exports.Accordion=rr.Accordion;exports.DescriptionList=ar.DescriptionList;exports.descriptionListVariants=tr.descriptionListVariants;exports.Pullquote=er.Pullquote;exports.pullquoteVariants=ir.pullquoteVariants;exports.CheckboxGroup=nr.CheckboxGroup;exports.checkboxGroupOptionsVariants=u.checkboxGroupOptionsVariants;exports.checkboxGroupPanelVariants=u.checkboxGroupPanelVariants;exports.RadioGroup=or.RadioGroup;exports.radioDotVariants=t.radioDotVariants;exports.radioGroupOptionsVariants=t.radioGroupOptionsVariants;exports.radioOptionVariants=t.radioOptionVariants;exports.radioVariants=t.radioVariants;exports.Breadcrumbs=sr.Breadcrumbs;exports.breadcrumbVariants=cr.breadcrumbVariants;exports.CallToAction=ur.CallToAction;exports.ctaVariants=lr.ctaVariants;exports.EmptyState=Vr.EmptyState;exports.emptyStateVariants=qr.emptyStateVariants;exports.ErrorState=br.ErrorState;exports.errorStateVariants=dr.errorStateVariants;exports.MatchupCard=pr.MatchupCard;exports.ActionBar=Tr.ActionBar;exports.actionBarVariants=Cr.actionBarVariants;exports.Countdown=Sr.Countdown;exports.Dialog=hr.Dialog;exports.Footer=gr.Footer;exports.Navbar=wr.Navbar;exports.navbarVariants=mr.navbarVariants;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=xr.useCountdown;exports.KONAMI_CODE=l.KONAMI_CODE;exports.useKeySequence=l.useKeySequence;exports.cn=kr.cn;
|
package/dist/roster.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use client";
|
|
2
1
|
/* empty css */
|
|
3
2
|
import { Avatar as e } from "./components/atoms/Avatar/Avatar.js";
|
|
4
3
|
import { avatarVariants as p } from "./components/atoms/Avatar/avatar-variants.js";
|
|
@@ -7,7 +6,7 @@ import { badgeVariants as n } from "./components/atoms/Badge/badge-variants.js";
|
|
|
7
6
|
import { Button as s } from "./components/atoms/Button/Button.js";
|
|
8
7
|
import { buttonVariants as V } from "./components/atoms/Button/button-variants.js";
|
|
9
8
|
import { Card as b } from "./components/atoms/Card/Card.js";
|
|
10
|
-
import { cardVariants as
|
|
9
|
+
import { cardVariants as u } from "./components/atoms/Card/card-variants.js";
|
|
11
10
|
import { Checkbox as C } from "./components/atoms/Checkbox/Checkbox.js";
|
|
12
11
|
import { checkboxVariants as S } from "./components/atoms/Checkbox/checkbox-variants.js";
|
|
13
12
|
import { Disclosure as w } from "./components/atoms/Disclosure/Disclosure.js";
|
|
@@ -32,7 +31,7 @@ import { statValueVariants as xr } from "./components/atoms/Stat/stat-variants.j
|
|
|
32
31
|
import { ThemeToggle as fr } from "./components/atoms/ThemeToggle/ThemeToggle.js";
|
|
33
32
|
import { MultiSelect as lr } from "./components/atoms/MultiSelect/MultiSelect.js";
|
|
34
33
|
import { Select as cr } from "./components/atoms/Select/Select.js";
|
|
35
|
-
import { selectOptionVariants as
|
|
34
|
+
import { selectOptionVariants as dr, selectTriggerVariants as ur } from "./components/atoms/Select/select-variants.js";
|
|
36
35
|
import { Spinner as Cr } from "./components/atoms/Spinner/Spinner.js";
|
|
37
36
|
import { Switch as Sr } from "./components/atoms/Switch/Switch.js";
|
|
38
37
|
import { switchThumbVariants as wr, switchTrackVariants as kr } from "./components/atoms/Switch/switch-variants.js";
|
|
@@ -76,7 +75,7 @@ import { Navbar as Uo } from "./components/organisms/Navbar/Navbar.js";
|
|
|
76
75
|
import { navbarVariants as Zo } from "./components/organisms/Navbar/navbar-variants.js";
|
|
77
76
|
import { Table as rt, TableBody as ot, TableCaption as tt, TableCell as et, TableFooter as at, TableHead as pt, TableHeader as it, TableRow as mt } from "./components/organisms/Table/Table.js";
|
|
78
77
|
import { tableCellVariants as nt, tableHeadVariants as ft, tableHeaderVariants as st, tableRowVariants as lt, tableVariants as Vt, tableWrapperVariants as ct } from "./components/organisms/Table/table-variants.js";
|
|
79
|
-
import { useCountdown as
|
|
78
|
+
import { useCountdown as dt } from "./hooks/useCountdown.js";
|
|
80
79
|
import { KONAMI_CODE as Tt, useKeySequence as Ct } from "./hooks/useKeySequence.js";
|
|
81
80
|
import { cn as St } from "./lib/utils.js";
|
|
82
81
|
export {
|
|
@@ -141,7 +140,7 @@ export {
|
|
|
141
140
|
n as badgeVariants,
|
|
142
141
|
ko as breadcrumbVariants,
|
|
143
142
|
V as buttonVariants,
|
|
144
|
-
|
|
143
|
+
u as cardVariants,
|
|
145
144
|
so as checkboxGroupOptionsVariants,
|
|
146
145
|
lo as checkboxGroupPanelVariants,
|
|
147
146
|
S as checkboxVariants,
|
|
@@ -166,8 +165,8 @@ export {
|
|
|
166
165
|
To as radioGroupOptionsVariants,
|
|
167
166
|
Co as radioOptionVariants,
|
|
168
167
|
ho as radioVariants,
|
|
169
|
-
|
|
170
|
-
|
|
168
|
+
dr as selectOptionVariants,
|
|
169
|
+
ur as selectTriggerVariants,
|
|
171
170
|
xr as statValueVariants,
|
|
172
171
|
wr as switchThumbVariants,
|
|
173
172
|
kr as switchTrackVariants,
|
|
@@ -180,6 +179,6 @@ export {
|
|
|
180
179
|
Or as textareaVariants,
|
|
181
180
|
zr as toast,
|
|
182
181
|
Kr as toastVariants,
|
|
183
|
-
|
|
182
|
+
dt as useCountdown,
|
|
184
183
|
Ct as useKeySequence
|
|
185
184
|
};
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Utilities, shipped from their own entry.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* That makes everything exported from `@blakesteve/roster` a client reference,
|
|
7
|
-
* which is correct for components but wrong for a plain function: importing
|
|
8
|
-
* `cn` from the root and calling it inside a React Server Component
|
|
9
|
-
* typechecks, then throws at render.
|
|
4
|
+
* This entry has no `"use client"` directive and no React, so `cn` is callable
|
|
5
|
+
* from either side of the boundary.
|
|
10
6
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
7
|
+
* It used to be the only way to get that. The package entry carried the
|
|
8
|
+
* directive, which made everything exported from the root a client reference:
|
|
9
|
+
* importing `cn` from there and calling it inside a React Server Component
|
|
10
|
+
* typechecked, then threw at render. The directive now sits on the modules
|
|
11
|
+
* that need it, so the root resolves through a bare barrel to this same
|
|
12
|
+
* module and works too.
|
|
13
|
+
*
|
|
14
|
+
* The entry stays because it is the narrower import, and because it can not be
|
|
15
|
+
* affected by a later change to what the barrel does.
|
|
13
16
|
*/
|
|
14
17
|
export { cn } from './lib/utils';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blakesteve/roster",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "A production-grade atomic component library: accessible, theme-aware, and documented in Storybook. React 19, TypeScript, Tailwind CSS v4.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
},
|
|
56
56
|
"scripts": {
|
|
57
57
|
"dev": "vite",
|
|
58
|
-
"build": "tsc -b && vite build && node scripts/check-prefix.mjs && node scripts/check-classes-emit.mjs && node scripts/check-tokens.mjs",
|
|
58
|
+
"build": "tsc -b && vite build && node scripts/check-prefix.mjs && node scripts/check-classes-emit.mjs && node scripts/check-tokens.mjs && node scripts/check-client-boundary.mjs",
|
|
59
59
|
"lint": "eslint .",
|
|
60
60
|
"preview": "vite preview",
|
|
61
61
|
"storybook": "storybook dev -p 6006",
|
|
@@ -66,7 +66,8 @@
|
|
|
66
66
|
"check:prefix": "node scripts/check-prefix.mjs",
|
|
67
67
|
"check:classes-emit": "node scripts/check-classes-emit.mjs",
|
|
68
68
|
"prepack": "npm run build && node scripts/write-meta.mjs",
|
|
69
|
-
"check:tokens": "node scripts/check-tokens.mjs"
|
|
69
|
+
"check:tokens": "node scripts/check-tokens.mjs",
|
|
70
|
+
"check:client-boundary": "node scripts/check-client-boundary.mjs"
|
|
70
71
|
},
|
|
71
72
|
"peerDependencies": {
|
|
72
73
|
"@tanstack/react-table": "^9.1.2",
|