@blakesteve/roster 5.19.0 → 5.19.1

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 CHANGED
@@ -1502,6 +1502,23 @@ and checks it's visible (Playwright's `toBeVisible`, say) finds it open. In
1502
1502
  read as hidden; `Sheet`'s was too, and is fixed the same way. Nothing on
1503
1503
  screen moves, and a click outside the panel still closes it.
1504
1504
 
1505
+ **One opened as another leaves.** A `Dialog` or `Sheet` opened while another
1506
+ is still leaving holds the page from its first frame, so the other one's focus
1507
+ restore can't move focus out onto the page. An opener in the toast host is the
1508
+ exception: the host stays live, so one opened from a toast still gives focus
1509
+ back to it as it leaves, out of whatever opened in its place. In 5.19.0 and
1510
+ before, a `Sheet` that mounted already
1511
+ open, as one whose code loads on its first open does, never held the part of
1512
+ the page it was written in. That part stayed live behind it, and a sheet or
1513
+ dialog leaving at the same time restored focus onto it as its leave ended. A
1514
+ `Sheet` now opens a render later, before anything is painted, as `Dialog`
1515
+ already did, so on that first open it also slides in rather than appearing in
1516
+ place. Nothing to change in your code.
1517
+
1518
+ Such a sheet may also have no opener to give focus back to: Headless UI keeps
1519
+ the record of what was pressed only once its code has loaded, after the press
1520
+ that opened the sheet. Remember the press and pass it as `returnFocus`.
1521
+
1505
1522
  **Full screen.** `layout="fullscreen"` makes a bare dialog over the whole
1506
1523
  viewport, for a photo viewer or a full-screen card: no box, no padding, and no
1507
1524
  header or close button of Roster's. Everything inside is yours, a close
@@ -2909,6 +2926,46 @@ output is hidden there), and no `meta.json` is written. A test that passed only
2909
2926
  on its retry is named in the output too, and `meta.json` records how many there
2910
2927
  were, as `passedOnRetry`.
2911
2928
 
2929
+ ## Discord notices
2930
+
2931
+ `.github/workflows/discord.yml` posts to Roster's channel on Blake's Discord,
2932
+ through the webhook in the `DISCORD_WEBHOOK_URL` repository secret. It's a
2933
+ separate workflow, so nothing it does can fail or delay CI or a deploy. Without
2934
+ the secret, as in a fork, it skips cleanly and posts nothing.
2935
+
2936
+ | Event | Posts when | Which copy of the file runs |
2937
+ | --- | --- | --- |
2938
+ | Storybook deployed, or its deploy failed | `deployment_status`, environment `Production`, state `success`, `failure` or `error` | The one in the deployed commit |
2939
+ | A release | `release: published` | The one in the tagged commit |
2940
+ | CI red | `workflow_run` on `CI`, `failure`, on `main`, from a push | The one on `main` |
2941
+
2942
+ A deploy here is Storybook, at `https://roster-tan.vercel.app`, so the post
2943
+ says Storybook was deployed. The package itself ships on `npm publish`, which
2944
+ isn't a GitHub event, so nothing posts it; the GitHub release made beside it
2945
+ does. Previews and pull requests don't post, and neither does a fork's: CI on a
2946
+ pull request isn't a push. Nor does a CI run that ends canceled, which is how a
2947
+ job stopped at its own time limit ends it. The Storybook job's steps have their
2948
+ own limits, so a stalled step there fails and posts, but Unit Tests and Build
2949
+ have only the job's, so a hung step in either is silent.
2950
+
2951
+ Each post has the version, the commit and a link. With `DETAILS: "on"`, a
2952
+ deploy lists the PRs merged since the last good deploy (not the `release/`
2953
+ PRs), a release carries its notes without the authors and links, and red CI
2954
+ names each failed job and its failed step, such as "Storybook Tests: Run
2955
+ Storybook tests with real input". All of that text is escaped, so a title can't
2956
+ ping anyone or draw a link.
2957
+
2958
+ `src/discord-workflow.test.ts` runs the job's real condition and its real
2959
+ script, with stand-ins for `curl` and `gh`, in the `unit` project. To send each
2960
+ message as a test, from `main`:
2961
+
2962
+ ```bash
2963
+ gh workflow run discord.yml --repo blakesteve/roster -f message=deploy
2964
+ ```
2965
+
2966
+ The other three are `deploy-failed`, `release` and `ci-failed`. A `ci-failed`
2967
+ test names the steps of CI's latest failed push to `main`.
2968
+
2912
2969
  ## Contributing
2913
2970
 
2914
2971
  Pull requests are welcome. Please:
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),O=require("react"),tt=require("../../../node_modules/@headlessui/react/dist/components/description/description.cjs"),b=require("../../../node_modules/@headlessui/react/dist/components/dialog/dialog.cjs"),et=require("../../../node_modules/@headlessui/react/dist/components/transition/transition.cjs"),f=require("../../../lib/utils.cjs"),rt=require("../../../lib/labels.cjs"),st=require("../../../internal/popup.cjs"),nt=require("../../../internal/motion.cjs"),ot=require("../../../internal/page-inert.cjs"),at=require("../../../internal/leave-watchdog.cjs"),S=require("./sheet-drag.cjs"),it=require("./sheet-title.cjs"),ct=require("../../../internal/key-focus.cjs");function ut(r){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const u in r)if(u!=="default"){const l=Object.getOwnPropertyDescriptor(r,u);Object.defineProperty(c,u,l.get?l:{enumerable:!0,get:()=>r[u]})}}return c.default=r,Object.freeze(c)}const n=ut(O),lt={close:"Close"},dt="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",ft="rst:transition-opacity rst:duration-(--roster-sheet-fade-duration) rst:ease-out rst:data-closed:opacity-0",pt="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",ht="rst:transition-opacity rst:duration-(--roster-sheet-fade-duration) rst:ease-out rst:data-closed:opacity-0",z={slide:200,fade:150},gt=["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 mt(r){return r?"current"in r?r.current:r:null}function yt({target:r}){const c=n.useRef(r),u=n.useRef(!1);return n.useEffect(()=>{c.current=r}),n.useEffect(()=>(u.current=!1,()=>{u.current=!0,queueMicrotask(()=>{if(!u.current)return;const l=mt(c.current);l?.isConnected&&l.focus()})}),[]),null}function bt(){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 xt=({isOpen:r,onClose:c,onAfterClose:u,title:l,hideTitle:B=!1,description:D,actions:N,maxWidth:x=560,initialFocus:v,returnFocus:Y,busy:p=!1,dragToDismiss:j=!0,contentKey:h,labels:V,className:K,children:U})=>{ct.useKeyFocus();const X=rt.withLabels(lt,V),{ref:R,inDarkScope:$}=st.useDarkScope(),E=nt.useReducedMotion(),q=n.useRef(null),i=n.useRef(null),C=at.useLeaveWatchdog(q,i,r,E?z.fade:z.slide,u);n.useLayoutEffect(()=>{if(r)return ot.lockPage(R.current)},[r,R]);const I=n.useRef(null),w=n.useRef(null),k=n.useRef(null),L=n.useRef(null),P=n.useId(),g=it.titleSignature(l),M=n.useRef({signature:g,contentKey:h,open:r,busy:p});n.useEffect(()=>{const t=M.current;if(M.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||(w.current?.focus(),L.current&&(L.current.scrollTop=0))},[g,h,r,p]),n.useEffect(()=>{if(!r)return;const t=requestAnimationFrame(()=>{const e=i.current,o=document.activeElement;!e||o&&e.contains(o)||(v?.current??k.current)?.focus()});return()=>cancelAnimationFrame(t)},[r,v]);const[A,F]=n.useState(null);n.useEffect(()=>{if(!r)return;const t=window.visualViewport;if(!t)return;const e=()=>{const o=document.activeElement,d=!!o&&!!i.current?.contains(o)&&o.matches(gt);F(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),F(null)}},[r]);const a=n.useRef(null),m=n.useRef(!1),_=n.useRef(r);n.useEffect(()=>{_.current=r},[r]);const y=t=>{i.current?.style.setProperty("--rst-sheet-drag",`${t}px`)},T=t=>{const e=i.current;a.current=null,e&&(delete e.dataset.dragging,t==="close"?(c(),requestAnimationFrame(()=>{_.current&&!a.current&&y(0)})):y(0))};n.useEffect(()=>{!r&&a.current&&(a.current=null,i.current&&delete i.current.dataset.dragging),r&&!a.current&&y(0)},[r]);const G=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}]})))},W=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(!S.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{}i.current&&(i.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(),y(Math.max(0,d)))},H=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=i.current?.getBoundingClientRect().height??0;T(S.sheetDragOutcome(o,d,S.sheetReleaseVelocity(e.samples)))},J=t=>{const e=a.current;!e||t.pointerId!==e.pointerId||(e.phase==="dragging"?T("stay"):a.current=null)},Q=t=>{!m.current||t.detail===0||(m.current=!1,t.preventDefault(),t.stopPropagation())},Z={"--rst-sheet-max-width":typeof x=="number"?`${x}px`:x,...A!==null&&{"--rst-sheet-keyboard-cap":`${A}px`}};return s.jsxs(s.Fragment,{children:[s.jsx("span",{ref:R,hidden:!0}),s.jsxs(b.Dialog,{ref:q,open:r,as:"div",onClose:c,initialFocus:v??k,className:f.cn("rst:font-ui rst:fixed rst:inset-0 rst:z-50 rst:focus:outline-hidden",$&&"dark"),children:[s.jsx(b.DialogBackdrop,{transition:!0,"data-testid":"sheet-backdrop",className:f.cn("rst:fixed rst:inset-0 rst:bg-[var(--roster-backdrop,var(--roster-sheet-backdrop))]",E?ht:pt)}),s.jsx("div",{className:"rst:fixed rst:inset-0 rst:flex rst:items-end rst:justify-center",children:s.jsx(et.TransitionChild,{afterLeave:C.afterLeave,children:s.jsxs(b.DialogPanel,{ref:i,style:Z,"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)]",E?ft:dt,"rst:data-dragging:transition-none",K),children:[s.jsxs("div",{"data-testid":"sheet-drag-zone",className:f.cn("rst:shrink-0",j&&"rst:touch-none"),onPointerDown:G,onPointerMove:W,onPointerUp:H,onPointerCancel:J,onClickCapture:Q,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(b.DialogTitle,{as:"h2",id:P,ref:w,tabIndex:-1,className:f.cn("rst:text-lg rst:font-semibold rst:text-inherit rst:focus:outline-hidden",B&&"rst:sr-only"),children:l}),D&&s.jsx(tt.Description,{as:"p",className:"rst:mt-1 rst:text-sm rst:text-inherit rst:opacity-75",children:D})]}),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:k,type:"button",onClick:c,"aria-label":X.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(bt,{})})]})]}),s.jsx("div",{ref:L,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:U}),s.jsx(yt,{target:Y})]})})})]},C.key)]})};exports.Sheet=xt;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),re=require("react"),se=require("../../../node_modules/@headlessui/react/dist/components/description/description.cjs"),x=require("../../../node_modules/@headlessui/react/dist/components/dialog/dialog.cjs"),ne=require("../../../node_modules/@headlessui/react/dist/components/transition/transition.cjs"),p=require("../../../lib/utils.cjs"),oe=require("../../../lib/labels.cjs"),ie=require("../../../internal/popup.cjs"),ae=require("../../../internal/motion.cjs"),ce=require("../../../internal/page-inert.cjs"),ue=require("../../../internal/leave-watchdog.cjs"),D=require("./sheet-drag.cjs"),le=require("./sheet-title.cjs"),de=require("../../../internal/key-focus.cjs");function fe(o){const u=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const l in o)if(l!=="default"){const d=Object.getOwnPropertyDescriptor(o,l);Object.defineProperty(u,l,d.get?d:{enumerable:!0,get:()=>o[l]})}}return u.default=o,Object.freeze(u)}const r=fe(re),pe={close:"Close"},he="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",ge="rst:transition-opacity rst:duration-(--roster-sheet-fade-duration) rst:ease-out rst:data-closed:opacity-0",me="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",ye="rst:transition-opacity rst:duration-(--roster-sheet-fade-duration) rst:ease-out rst:data-closed:opacity-0",z={slide:200,fade:150},be=["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 xe(o){return o?"current"in o?o.current:o:null}function ve({target:o}){const u=r.useRef(o),l=r.useRef(!1);return r.useEffect(()=>{u.current=o}),r.useEffect(()=>(l.current=!1,()=>{l.current=!0,queueMicrotask(()=>{if(!l.current)return;const d=xe(u.current);d?.isConnected&&d.focus()})}),[]),null}function je(){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 Ee=({isOpen:o,onClose:u,onAfterClose:l,title:d,hideTitle:B=!1,description:N,actions:q,maxWidth:v=560,initialFocus:j,returnFocus:Y,busy:h=!1,dragToDismiss:E=!0,contentKey:g,labels:V,className:K,children:U})=>{de.useKeyFocus();const X=oe.withLabels(pe,V),{ref:R,inDarkScope:$}=ie.useDarkScope(),k=ae.useReducedMotion(),[G,W]=r.useState(!1);r.useLayoutEffect(()=>{W(!0)},[]);const n=o&&G,C=r.useRef(null),c=r.useRef(null),I=ue.useLeaveWatchdog(C,c,n,k?z.fade:z.slide,l);r.useLayoutEffect(()=>{if(n)return ce.lockPage(R.current)},[n,R]);const w=r.useRef(null),P=r.useRef(null),L=r.useRef(null),S=r.useRef(null),M=r.useId(),m=le.titleSignature(d),O=r.useRef({signature:m,contentKey:g,open:n,busy:h});r.useEffect(()=>{const e=O.current;if(O.current={signature:m,contentKey:g,open:n,busy:h},!e.open||!n)return;const t=e.contentKey!==g,i=e.signature!==m&&!e.busy;!t&&!i||(P.current?.focus(),S.current&&(S.current.scrollTop=0))},[m,g,n,h]),r.useEffect(()=>{if(!n)return;const e=requestAnimationFrame(()=>{const t=c.current,i=document.activeElement;!t||i&&t.contains(i)||(j?.current??L.current)?.focus()});return()=>cancelAnimationFrame(e)},[n,j]);const[A,F]=r.useState(null);r.useEffect(()=>{if(!n)return;const e=window.visualViewport;if(!e)return;const t=()=>{const i=document.activeElement,f=!!i&&!!c.current?.contains(i)&&i.matches(be);F(f?Math.round(e.height):null)};return e.addEventListener("resize",t),document.addEventListener("focusin",t),document.addEventListener("focusout",t),()=>{e.removeEventListener("resize",t),document.removeEventListener("focusin",t),document.removeEventListener("focusout",t),F(null)}},[n]);const a=r.useRef(null),y=r.useRef(!1),_=r.useRef(n);r.useEffect(()=>{_.current=n},[n]);const b=e=>{c.current?.style.setProperty("--rst-sheet-drag",`${e}px`)},T=e=>{const t=c.current;a.current=null,t&&(delete t.dataset.dragging,e==="close"?(u(),requestAnimationFrame(()=>{_.current&&!a.current&&b(0)})):b(0))};r.useEffect(()=>{!n&&a.current&&(a.current=null,c.current&&delete c.current.dataset.dragging),n&&!a.current&&b(0)},[n]);const H=e=>{a.current||(y.current=!1,!(!E||!n)&&(e.pointerType==="mouse"&&(e.button!==0||!w.current?.contains(e.target))||(a.current={pointerId:e.pointerId,x0:e.clientX,y0:e.clientY,dy:0,phase:"pending",samples:[{t:e.timeStamp,y:e.clientY}]})))},J=e=>{const t=a.current;if(!t||e.pointerId!==t.pointerId)return;const i=e.clientX-t.x0,f=e.clientY-t.y0;if(t.phase==="pending"){if(!D.exceedsSheetTapSlop(i,f))return;if(Math.abs(i)>Math.abs(f)){t.phase="ignored";return}t.phase="dragging",y.current=!0;try{e.currentTarget.setPointerCapture(e.pointerId)}catch{}c.current&&(c.current.dataset.dragging="")}t.phase==="dragging"&&(t.dy=f,t.samples.push({t:e.timeStamp,y:e.clientY}),t.samples.length>32&&t.samples.shift(),b(Math.max(0,f)))},Q=e=>{const t=a.current;if(!t||e.pointerId!==t.pointerId)return;if(t.phase!=="dragging"){a.current=null;return}t.samples.push({t:e.timeStamp,y:e.clientY});const i=e.clientY-t.y0,f=c.current?.getBoundingClientRect().height??0;T(D.sheetDragOutcome(i,f,D.sheetReleaseVelocity(t.samples)))},Z=e=>{const t=a.current;!t||e.pointerId!==t.pointerId||(t.phase==="dragging"?T("stay"):a.current=null)},ee=e=>{!y.current||e.detail===0||(y.current=!1,e.preventDefault(),e.stopPropagation())},te={"--rst-sheet-max-width":typeof v=="number"?`${v}px`:v,...A!==null&&{"--rst-sheet-keyboard-cap":`${A}px`}};return s.jsxs(s.Fragment,{children:[s.jsx("span",{ref:R,hidden:!0}),s.jsxs(x.Dialog,{ref:C,open:n,as:"div",onClose:u,initialFocus:j??L,className:p.cn("rst:font-ui rst:fixed rst:inset-0 rst:z-50 rst:focus:outline-hidden",$&&"dark"),children:[s.jsx(x.DialogBackdrop,{transition:!0,"data-testid":"sheet-backdrop",className:p.cn("rst:fixed rst:inset-0 rst:bg-[var(--roster-backdrop,var(--roster-sheet-backdrop))]",k?ye:me)}),s.jsx("div",{className:"rst:fixed rst:inset-0 rst:flex rst:items-end rst:justify-center",children:s.jsx(ne.TransitionChild,{afterLeave:I.afterLeave,children:s.jsxs(x.DialogPanel,{ref:c,style:te,"data-testid":"sheet-panel",className:p.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)]",k?ge:he,"rst:data-dragging:transition-none",K),children:[s.jsxs("div",{"data-testid":"sheet-drag-zone",className:p.cn("rst:shrink-0",E&&"rst:touch-none"),onPointerDown:H,onPointerMove:J,onPointerUp:Q,onPointerCancel:Z,onClickCapture:ee,children:[s.jsx("div",{ref:w,"aria-hidden":"true","data-testid":"sheet-handle",className:p.cn("rst:flex rst:h-11 rst:items-start rst:justify-center rst:pt-2",E&&"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(x.DialogTitle,{as:"h2",id:M,ref:P,tabIndex:-1,className:p.cn("rst:text-lg rst:font-semibold rst:text-inherit rst:focus:outline-hidden",B&&"rst:sr-only"),children:d}),N&&s.jsx(se.Description,{as:"p",className:"rst:mt-1 rst:text-sm rst:text-inherit rst:opacity-75",children:N})]}),q&&s.jsx("div",{className:"rst:flex rst:h-11 rst:shrink-0 rst:items-center rst:gap-1",children:q}),s.jsx("button",{ref:L,type:"button",onClick:u,"aria-label":X.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(je,{})})]})]}),s.jsx("div",{ref:S,role:"region","aria-labelledby":M,tabIndex:0,"data-testid":"sheet-content","aria-busy":h||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:U}),s.jsx(ve,{target:Y})]})})})]},I.key)]})};exports.Sheet=Ee;
@@ -46,7 +46,10 @@ export interface SheetProps {
46
46
  * Where focus goes on close, over whatever opened the sheet.
47
47
  *
48
48
  * A sheet opened on page load from a deep link has no opener, so without
49
- * this focus falls to `<body>`.
49
+ * this focus falls to `<body>`. A sheet whose code loads on its first open
50
+ * can have none either: Headless UI, which keeps the record of what was
51
+ * pressed, starts keeping it only once its code has loaded, after the press
52
+ * that opened the sheet. Remember the press yourself and pass it here.
50
53
  */
51
54
  returnFocus?: React.RefObject<HTMLElement | null> | HTMLElement | null;
52
55
  /** Sets `aria-busy` on the content region while its content loads. */
@@ -1,40 +1,40 @@
1
1
  "use client";
2
- import { jsxs as l, Fragment as Z, jsx as n } from "react/jsx-runtime";
3
- import * as s from "react";
4
- import { Description as O } from "../../../node_modules/@headlessui/react/dist/components/description/description.js";
5
- import { Dialog as tt, DialogBackdrop as et, DialogPanel as rt, DialogTitle as st } from "../../../node_modules/@headlessui/react/dist/components/dialog/dialog.js";
6
- import { TransitionChild as nt } from "../../../node_modules/@headlessui/react/dist/components/transition/transition.js";
7
- import { cn as d } from "../../../lib/utils.js";
8
- import { withLabels as ot } from "../../../lib/labels.js";
9
- import { useDarkScope as at } from "../../../internal/popup.js";
10
- import { useReducedMotion as it } from "../../../internal/motion.js";
11
- import { lockPage as ct } from "../../../internal/page-inert.js";
12
- import { useLeaveWatchdog as ut } from "../../../internal/leave-watchdog.js";
13
- import { sheetDragOutcome as lt, sheetReleaseVelocity as dt, exceedsSheetTapSlop as ft } from "./sheet-drag.js";
14
- import { titleSignature as pt } from "./sheet-title.js";
15
- import { useKeyFocus as mt } from "../../../internal/key-focus.js";
16
- const ht = { close: "Close" }, gt = "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", yt = "rst:transition-opacity rst:duration-(--roster-sheet-fade-duration) rst:ease-out rst:data-closed:opacity-0", bt = "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", vt = "rst:transition-opacity rst:duration-(--roster-sheet-fade-duration) rst:ease-out rst:data-closed:opacity-0", Y = { slide: 200, fade: 150 }, xt = [
2
+ import { jsxs as d, Fragment as et, jsx as n } from "react/jsx-runtime";
3
+ import * as r from "react";
4
+ import { Description as rt } from "../../../node_modules/@headlessui/react/dist/components/description/description.js";
5
+ import { Dialog as st, DialogBackdrop as nt, DialogPanel as ot, DialogTitle as at } from "../../../node_modules/@headlessui/react/dist/components/dialog/dialog.js";
6
+ import { TransitionChild as it } from "../../../node_modules/@headlessui/react/dist/components/transition/transition.js";
7
+ import { cn as f } from "../../../lib/utils.js";
8
+ import { withLabels as ct } from "../../../lib/labels.js";
9
+ import { useDarkScope as ut } from "../../../internal/popup.js";
10
+ import { useReducedMotion as lt } from "../../../internal/motion.js";
11
+ import { lockPage as dt } from "../../../internal/page-inert.js";
12
+ import { useLeaveWatchdog as ft } from "../../../internal/leave-watchdog.js";
13
+ import { sheetDragOutcome as pt, sheetReleaseVelocity as mt, exceedsSheetTapSlop as ht } from "./sheet-drag.js";
14
+ import { titleSignature as gt } from "./sheet-title.js";
15
+ import { useKeyFocus as yt } from "../../../internal/key-focus.js";
16
+ const bt = { close: "Close" }, vt = "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", xt = "rst:transition-opacity rst:duration-(--roster-sheet-fade-duration) rst:ease-out rst:data-closed:opacity-0", Et = "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", Rt = "rst:transition-opacity rst:duration-(--roster-sheet-fade-duration) rst:ease-out rst:data-closed:opacity-0", Y = { slide: 200, fade: 150 }, kt = [
17
17
  "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])",
18
18
  "textarea",
19
19
  "select",
20
20
  "[contenteditable]:not([contenteditable=false])"
21
21
  ].join(",");
22
- function Et(r) {
23
- return r ? "current" in r ? r.current : r : null;
22
+ function Lt(c) {
23
+ return c ? "current" in c ? c.current : c : null;
24
24
  }
25
- function Rt({ target: r }) {
26
- const u = s.useRef(r), f = s.useRef(!1);
27
- return s.useEffect(() => {
28
- u.current = r;
29
- }), s.useEffect(() => (f.current = !1, () => {
30
- f.current = !0, queueMicrotask(() => {
31
- if (!f.current) return;
32
- const p = Et(u.current);
33
- p?.isConnected && p.focus();
25
+ function Ct({ target: c }) {
26
+ const l = r.useRef(c), p = r.useRef(!1);
27
+ return r.useEffect(() => {
28
+ l.current = c;
29
+ }), r.useEffect(() => (p.current = !1, () => {
30
+ p.current = !0, queueMicrotask(() => {
31
+ if (!p.current) return;
32
+ const m = Lt(l.current);
33
+ m?.isConnected && m.focus();
34
34
  });
35
35
  }), []), null;
36
36
  }
37
- function kt() {
37
+ function Nt() {
38
38
  return /* @__PURE__ */ n(
39
39
  "svg",
40
40
  {
@@ -50,74 +50,78 @@ function kt() {
50
50
  }
51
51
  );
52
52
  }
53
- const Bt = ({
54
- isOpen: r,
55
- onClose: u,
56
- onAfterClose: f,
57
- title: p,
53
+ const _t = ({
54
+ isOpen: c,
55
+ onClose: l,
56
+ onAfterClose: p,
57
+ title: m,
58
58
  hideTitle: _ = !1,
59
- description: N,
59
+ description: S,
60
60
  actions: D,
61
- maxWidth: v = 560,
62
- initialFocus: x,
61
+ maxWidth: x = 560,
62
+ initialFocus: E,
63
63
  returnFocus: T,
64
- busy: m = !1,
65
- dragToDismiss: E = !0,
66
- contentKey: h,
64
+ busy: h = !1,
65
+ dragToDismiss: R = !0,
66
+ contentKey: g,
67
67
  labels: q,
68
68
  className: V,
69
69
  children: $
70
70
  }) => {
71
- mt();
72
- const K = ot(ht, q), { ref: R, inDarkScope: U } = at(), k = it(), I = s.useRef(null), i = s.useRef(null), S = ut(I, i, r, k ? Y.fade : Y.slide, f);
73
- s.useLayoutEffect(() => {
74
- if (r)
75
- return ct(R.current);
76
- }, [r, R]);
77
- const w = s.useRef(null), P = s.useRef(null), L = s.useRef(null), C = s.useRef(null), M = s.useId(), g = pt(p), A = s.useRef({ signature: g, contentKey: h, open: r, busy: m });
78
- s.useEffect(() => {
79
- const t = A.current;
80
- if (A.current = { signature: g, contentKey: h, open: r, busy: m }, !t.open || !r) return;
81
- const e = t.contentKey !== h, o = t.signature !== g && !t.busy;
82
- !e && !o || (P.current?.focus(), C.current && (C.current.scrollTop = 0));
83
- }, [g, h, r, m]), s.useEffect(() => {
84
- if (!r) return;
71
+ yt();
72
+ const K = ct(bt, q), { ref: k, inDarkScope: U } = ut(), L = lt(), [X, G] = r.useState(!1);
73
+ r.useLayoutEffect(() => {
74
+ G(!0);
75
+ }, []);
76
+ const s = c && X, I = r.useRef(null), i = r.useRef(null), w = ft(I, i, s, L ? Y.fade : Y.slide, p);
77
+ r.useLayoutEffect(() => {
78
+ if (s)
79
+ return dt(k.current);
80
+ }, [s, k]);
81
+ const M = r.useRef(null), P = r.useRef(null), C = r.useRef(null), N = r.useRef(null), A = r.useId(), y = gt(m), F = r.useRef({ signature: y, contentKey: g, open: s, busy: h });
82
+ r.useEffect(() => {
83
+ const t = F.current;
84
+ if (F.current = { signature: y, contentKey: g, open: s, busy: h }, !t.open || !s) return;
85
+ const e = t.contentKey !== g, o = t.signature !== y && !t.busy;
86
+ !e && !o || (P.current?.focus(), N.current && (N.current.scrollTop = 0));
87
+ }, [y, g, s, h]), r.useEffect(() => {
88
+ if (!s) return;
85
89
  const t = requestAnimationFrame(() => {
86
90
  const e = i.current, o = document.activeElement;
87
- !e || o && e.contains(o) || (x?.current ?? L.current)?.focus();
91
+ !e || o && e.contains(o) || (E?.current ?? C.current)?.focus();
88
92
  });
89
93
  return () => cancelAnimationFrame(t);
90
- }, [r, x]);
91
- const [F, j] = s.useState(null);
92
- s.useEffect(() => {
93
- if (!r) return;
94
+ }, [s, E]);
95
+ const [O, j] = r.useState(null);
96
+ r.useEffect(() => {
97
+ if (!s) return;
94
98
  const t = window.visualViewport;
95
99
  if (!t) return;
96
100
  const e = () => {
97
- const o = document.activeElement, c = !!o && !!i.current?.contains(o) && o.matches(xt);
98
- j(c ? Math.round(t.height) : null);
101
+ const o = document.activeElement, u = !!o && !!i.current?.contains(o) && o.matches(kt);
102
+ j(u ? Math.round(t.height) : null);
99
103
  };
100
104
  return t.addEventListener("resize", e), document.addEventListener("focusin", e), document.addEventListener("focusout", e), () => {
101
105
  t.removeEventListener("resize", e), document.removeEventListener("focusin", e), document.removeEventListener("focusout", e), j(null);
102
106
  };
103
- }, [r]);
104
- const a = s.useRef(null), y = s.useRef(!1), z = s.useRef(r);
105
- s.useEffect(() => {
106
- z.current = r;
107
- }, [r]);
108
- const b = (t) => {
107
+ }, [s]);
108
+ const a = r.useRef(null), b = r.useRef(!1), z = r.useRef(s);
109
+ r.useEffect(() => {
110
+ z.current = s;
111
+ }, [s]);
112
+ const v = (t) => {
109
113
  i.current?.style.setProperty("--rst-sheet-drag", `${t}px`);
110
114
  }, B = (t) => {
111
115
  const e = i.current;
112
- a.current = null, e && (delete e.dataset.dragging, t === "close" ? (u(), requestAnimationFrame(() => {
113
- z.current && !a.current && b(0);
114
- })) : b(0));
116
+ a.current = null, e && (delete e.dataset.dragging, t === "close" ? (l(), requestAnimationFrame(() => {
117
+ z.current && !a.current && v(0);
118
+ })) : v(0));
115
119
  };
116
- s.useEffect(() => {
117
- !r && a.current && (a.current = null, i.current && delete i.current.dataset.dragging), r && !a.current && b(0);
118
- }, [r]);
119
- const X = (t) => {
120
- a.current || (y.current = !1, !(!E || !r) && (t.pointerType === "mouse" && (t.button !== 0 || !w.current?.contains(t.target)) || (a.current = {
120
+ r.useEffect(() => {
121
+ !s && a.current && (a.current = null, i.current && delete i.current.dataset.dragging), s && !a.current && v(0);
122
+ }, [s]);
123
+ const Q = (t) => {
124
+ a.current || (b.current = !1, !(!R || !s) && (t.pointerType === "mouse" && (t.button !== 0 || !M.current?.contains(t.target)) || (a.current = {
121
125
  pointerId: t.pointerId,
122
126
  x0: t.clientX,
123
127
  y0: t.clientY,
@@ -125,25 +129,25 @@ const Bt = ({
125
129
  phase: "pending",
126
130
  samples: [{ t: t.timeStamp, y: t.clientY }]
127
131
  })));
128
- }, G = (t) => {
132
+ }, H = (t) => {
129
133
  const e = a.current;
130
134
  if (!e || t.pointerId !== e.pointerId) return;
131
- const o = t.clientX - e.x0, c = t.clientY - e.y0;
135
+ const o = t.clientX - e.x0, u = t.clientY - e.y0;
132
136
  if (e.phase === "pending") {
133
- if (!ft(o, c)) return;
134
- if (Math.abs(o) > Math.abs(c)) {
137
+ if (!ht(o, u)) return;
138
+ if (Math.abs(o) > Math.abs(u)) {
135
139
  e.phase = "ignored";
136
140
  return;
137
141
  }
138
- e.phase = "dragging", y.current = !0;
142
+ e.phase = "dragging", b.current = !0;
139
143
  try {
140
144
  t.currentTarget.setPointerCapture(t.pointerId);
141
145
  } catch {
142
146
  }
143
147
  i.current && (i.current.dataset.dragging = "");
144
148
  }
145
- e.phase === "dragging" && (e.dy = c, e.samples.push({ t: t.timeStamp, y: t.clientY }), e.samples.length > 32 && e.samples.shift(), b(Math.max(0, c)));
146
- }, Q = (t) => {
149
+ e.phase === "dragging" && (e.dy = u, e.samples.push({ t: t.timeStamp, y: t.clientY }), e.samples.length > 32 && e.samples.shift(), v(Math.max(0, u)));
150
+ }, J = (t) => {
147
151
  const e = a.current;
148
152
  if (!e || t.pointerId !== e.pointerId) return;
149
153
  if (e.phase !== "dragging") {
@@ -151,50 +155,50 @@ const Bt = ({
151
155
  return;
152
156
  }
153
157
  e.samples.push({ t: t.timeStamp, y: t.clientY });
154
- const o = t.clientY - e.y0, c = i.current?.getBoundingClientRect().height ?? 0;
155
- B(lt(o, c, dt(e.samples)));
156
- }, H = (t) => {
158
+ const o = t.clientY - e.y0, u = i.current?.getBoundingClientRect().height ?? 0;
159
+ B(pt(o, u, mt(e.samples)));
160
+ }, W = (t) => {
157
161
  const e = a.current;
158
162
  !e || t.pointerId !== e.pointerId || (e.phase === "dragging" ? B("stay") : a.current = null);
159
- }, J = (t) => {
160
- !y.current || t.detail === 0 || (y.current = !1, t.preventDefault(), t.stopPropagation());
161
- }, W = {
162
- "--rst-sheet-max-width": typeof v == "number" ? `${v}px` : v,
163
- ...F !== null && { "--rst-sheet-keyboard-cap": `${F}px` }
163
+ }, Z = (t) => {
164
+ !b.current || t.detail === 0 || (b.current = !1, t.preventDefault(), t.stopPropagation());
165
+ }, tt = {
166
+ "--rst-sheet-max-width": typeof x == "number" ? `${x}px` : x,
167
+ ...O !== null && { "--rst-sheet-keyboard-cap": `${O}px` }
164
168
  };
165
- return /* @__PURE__ */ l(Z, { children: [
166
- /* @__PURE__ */ n("span", { ref: R, hidden: !0 }),
167
- /* @__PURE__ */ l(
168
- tt,
169
+ return /* @__PURE__ */ d(et, { children: [
170
+ /* @__PURE__ */ n("span", { ref: k, hidden: !0 }),
171
+ /* @__PURE__ */ d(
172
+ st,
169
173
  {
170
174
  ref: I,
171
- open: r,
175
+ open: s,
172
176
  as: "div",
173
- onClose: u,
174
- initialFocus: x ?? L,
175
- className: d(
177
+ onClose: l,
178
+ initialFocus: E ?? C,
179
+ className: f(
176
180
  "rst:font-ui rst:fixed rst:inset-0 rst:z-50 rst:focus:outline-hidden",
177
181
  U && "dark"
178
182
  ),
179
183
  children: [
180
184
  /* @__PURE__ */ n(
181
- et,
185
+ nt,
182
186
  {
183
187
  transition: !0,
184
188
  "data-testid": "sheet-backdrop",
185
- className: d(
189
+ className: f(
186
190
  "rst:fixed rst:inset-0 rst:bg-[var(--roster-backdrop,var(--roster-sheet-backdrop))]",
187
- k ? vt : bt
191
+ L ? Rt : Et
188
192
  )
189
193
  }
190
194
  ),
191
- /* @__PURE__ */ n("div", { className: "rst:fixed rst:inset-0 rst:flex rst:items-end rst:justify-center", children: /* @__PURE__ */ n(nt, { afterLeave: S.afterLeave, children: /* @__PURE__ */ l(
192
- rt,
195
+ /* @__PURE__ */ n("div", { className: "rst:fixed rst:inset-0 rst:flex rst:items-end rst:justify-center", children: /* @__PURE__ */ n(it, { afterLeave: w.afterLeave, children: /* @__PURE__ */ d(
196
+ ot,
193
197
  {
194
198
  ref: i,
195
- style: W,
199
+ style: tt,
196
200
  "data-testid": "sheet-panel",
197
- className: d(
201
+ className: f(
198
202
  /* 92dvh, or the visual viewport while the keyboard is up,
199
203
  whichever is shorter. */
200
204
  "rst:relative rst:flex rst:max-h-[min(92dvh,var(--rst-sheet-keyboard-cap,92dvh))] rst:w-full rst:flex-col",
@@ -206,62 +210,62 @@ const Bt = ({
206
210
  "rst:[--roster-ring-offset:var(--roster-popover-bg)]",
207
211
  "rst:pb-[env(safe-area-inset-bottom)]",
208
212
  "rst:translate-y-[var(--rst-sheet-drag,0px)]",
209
- k ? yt : gt,
213
+ L ? xt : vt,
210
214
  "rst:data-dragging:transition-none",
211
215
  V
212
216
  ),
213
217
  children: [
214
- /* @__PURE__ */ l(
218
+ /* @__PURE__ */ d(
215
219
  "div",
216
220
  {
217
221
  "data-testid": "sheet-drag-zone",
218
- className: d("rst:shrink-0", E && "rst:touch-none"),
219
- onPointerDown: X,
220
- onPointerMove: G,
221
- onPointerUp: Q,
222
- onPointerCancel: H,
223
- onClickCapture: J,
222
+ className: f("rst:shrink-0", R && "rst:touch-none"),
223
+ onPointerDown: Q,
224
+ onPointerMove: H,
225
+ onPointerUp: J,
226
+ onPointerCancel: W,
227
+ onClickCapture: Z,
224
228
  children: [
225
229
  /* @__PURE__ */ n(
226
230
  "div",
227
231
  {
228
- ref: w,
232
+ ref: M,
229
233
  "aria-hidden": "true",
230
234
  "data-testid": "sheet-handle",
231
- className: d(
235
+ className: f(
232
236
  /* The grip sits near the top edge, where a sheet's grabber
233
237
  is expected, inside a 44px strip. The header below pulls
234
238
  up over the strip's lower part, so a touch there drags
235
239
  too (the header is a drag zone) and a mouse drags from
236
240
  the 32px above it, the full width of the sheet. */
237
241
  "rst:flex rst:h-11 rst:items-start rst:justify-center rst:pt-2",
238
- E && "rst:cursor-grab rst:active:cursor-grabbing"
242
+ R && "rst:cursor-grab rst:active:cursor-grabbing"
239
243
  ),
240
244
  children: /* @__PURE__ */ n("span", { className: "rst:h-1 rst:w-10 rst:rounded-full rst:bg-current rst:opacity-30" })
241
245
  }
242
246
  ),
243
- /* @__PURE__ */ l("div", { className: "rst:-mt-3 rst:flex rst:items-start rst:gap-2 rst:px-5 rst:pb-4", children: [
244
- /* @__PURE__ */ l("div", { className: "rst:min-w-0 rst:flex-1 rst:pt-2", children: [
247
+ /* @__PURE__ */ d("div", { className: "rst:-mt-3 rst:flex rst:items-start rst:gap-2 rst:px-5 rst:pb-4", children: [
248
+ /* @__PURE__ */ d("div", { className: "rst:min-w-0 rst:flex-1 rst:pt-2", children: [
245
249
  /* @__PURE__ */ n(
246
- st,
250
+ at,
247
251
  {
248
252
  as: "h2",
249
- id: M,
253
+ id: A,
250
254
  ref: P,
251
255
  tabIndex: -1,
252
- className: d(
256
+ className: f(
253
257
  "rst:text-lg rst:font-semibold rst:text-inherit rst:focus:outline-hidden",
254
258
  _ && "rst:sr-only"
255
259
  ),
256
- children: p
260
+ children: m
257
261
  }
258
262
  ),
259
- N && /* @__PURE__ */ n(
260
- O,
263
+ S && /* @__PURE__ */ n(
264
+ rt,
261
265
  {
262
266
  as: "p",
263
267
  className: "rst:mt-1 rst:text-sm rst:text-inherit rst:opacity-75",
264
- children: N
268
+ children: S
265
269
  }
266
270
  )
267
271
  ] }),
@@ -271,12 +275,12 @@ const Bt = ({
271
275
  /* @__PURE__ */ n(
272
276
  "button",
273
277
  {
274
- ref: L,
278
+ ref: C,
275
279
  type: "button",
276
- onClick: u,
280
+ onClick: l,
277
281
  "aria-label": K.close,
278
282
  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",
279
- children: /* @__PURE__ */ n(kt, {})
283
+ children: /* @__PURE__ */ n(Nt, {})
280
284
  }
281
285
  )
282
286
  ] })
@@ -286,26 +290,26 @@ const Bt = ({
286
290
  /* @__PURE__ */ n(
287
291
  "div",
288
292
  {
289
- ref: C,
293
+ ref: N,
290
294
  role: "region",
291
- "aria-labelledby": M,
295
+ "aria-labelledby": A,
292
296
  tabIndex: 0,
293
297
  "data-testid": "sheet-content",
294
- "aria-busy": m || void 0,
298
+ "aria-busy": h || void 0,
295
299
  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",
296
300
  children: $
297
301
  }
298
302
  ),
299
- /* @__PURE__ */ n(Rt, { target: T })
303
+ /* @__PURE__ */ n(Ct, { target: T })
300
304
  ]
301
305
  }
302
306
  ) }) })
303
307
  ]
304
308
  },
305
- S.key
309
+ w.key
306
310
  )
307
311
  ] });
308
312
  };
309
313
  export {
310
- Bt as Sheet
314
+ _t as Sheet
311
315
  };
package/dist/meta.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "5.19.0",
3
- "tests": 2745,
4
- "testFiles": 221,
2
+ "version": "5.19.1",
3
+ "tests": 2886,
4
+ "testFiles": 223,
5
5
  "passedOnRetry": 0
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blakesteve/roster",
3
- "version": "5.19.0",
3
+ "version": "5.19.1",
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",