@blakesteve/roster 5.16.0 → 5.18.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 +227 -2
- package/dist/components/molecules/RadioTileGroup/RadioTileGroup.cjs +1 -0
- package/dist/components/molecules/RadioTileGroup/RadioTileGroup.d.ts +101 -0
- package/dist/components/molecules/RadioTileGroup/RadioTileGroup.js +142 -0
- package/dist/components/molecules/RadioTileGroup/radio-tile-group-variants.cjs +1 -0
- package/dist/components/molecules/RadioTileGroup/radio-tile-group-variants.d.ts +49 -0
- package/dist/components/molecules/RadioTileGroup/radio-tile-group-variants.js +34 -0
- package/dist/components/molecules/StepProgress/StepProgress.cjs +1 -1
- package/dist/components/molecules/StepProgress/StepProgress.js +29 -42
- package/dist/components/molecules/Timeline/Timeline.cjs +1 -0
- package/dist/components/molecules/Timeline/Timeline.d.ts +86 -0
- package/dist/components/molecules/Timeline/Timeline.js +217 -0
- package/dist/components/organisms/Dialog/Dialog.cjs +1 -1
- package/dist/components/organisms/Dialog/Dialog.d.ts +58 -6
- package/dist/components/organisms/Dialog/Dialog.js +82 -59
- package/dist/components/organisms/Sheet/Sheet.cjs +1 -1
- package/dist/components/organisms/Sheet/Sheet.d.ts +2 -1
- package/dist/components/organisms/Sheet/Sheet.js +90 -87
- package/dist/index.d.ts +3 -0
- package/dist/internal/leave-watchdog.cjs +1 -0
- package/dist/internal/leave-watchdog.d.ts +62 -0
- package/dist/internal/leave-watchdog.js +64 -0
- package/dist/internal/step-check.cjs +1 -0
- package/dist/internal/step-check.d.ts +2 -0
- package/dist/internal/step-check.js +6 -0
- package/dist/internal/step-marker.cjs +1 -0
- package/dist/internal/step-marker.d.ts +10 -0
- package/dist/internal/step-marker.js +12 -0
- package/dist/meta.json +3 -3
- package/dist/roster.cjs +1 -1
- package/dist/roster.css +1 -1
- package/dist/roster.js +155 -147
- package/package.json +1 -1
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { FontAwesomeIcon as
|
|
5
|
-
import { faXmark as
|
|
6
|
-
import { cva as
|
|
7
|
-
import { cn as
|
|
8
|
-
import { withLabels as
|
|
9
|
-
import { lockPage as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
2
|
+
import { jsxs as s, Fragment as A, jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import { useState as S, useLayoutEffect as x, useRef as l, Fragment as c } from "react";
|
|
4
|
+
import { FontAwesomeIcon as B } from "../../../node_modules/@fortawesome/react-fontawesome/dist/index.js";
|
|
5
|
+
import { faXmark as C } from "../../../node_modules/@fortawesome/free-solid-svg-icons/index.js";
|
|
6
|
+
import { cva as o } from "../../../node_modules/class-variance-authority/dist/index.js";
|
|
7
|
+
import { cn as t } from "../../../lib/utils.js";
|
|
8
|
+
import { withLabels as M } from "../../../lib/labels.js";
|
|
9
|
+
import { lockPage as P } from "../../../internal/page-inert.js";
|
|
10
|
+
import { useLeaveWatchdog as I } from "../../../internal/leave-watchdog.js";
|
|
11
|
+
import { useKeyFocus as K } from "../../../internal/key-focus.js";
|
|
12
|
+
import { Dialog as O, DialogBackdrop as Q, DialogPanel as h, DialogTitle as k } from "../../../node_modules/@headlessui/react/dist/components/dialog/dialog.js";
|
|
13
|
+
import { TransitionChild as d } from "../../../node_modules/@headlessui/react/dist/components/transition/transition.js";
|
|
14
|
+
const W = /* @__PURE__ */ o(
|
|
14
15
|
"rst:relative rst:w-full rst:transform rst:overflow-hidden rst:rounded-2xl rst:p-6 rst:text-left rst:align-middle rst:elevation-overlay rst:transition-all rst:border",
|
|
15
16
|
{
|
|
16
17
|
variants: {
|
|
@@ -79,44 +80,47 @@ const E = /* @__PURE__ */ a(
|
|
|
79
80
|
status: "default"
|
|
80
81
|
}
|
|
81
82
|
}
|
|
82
|
-
),
|
|
83
|
+
), w = /* @__PURE__ */ o("rst:text-xl rst:font-bold rst:leading-6 rst:text-inherit"), N = /* @__PURE__ */ o("rst:mt-1 rst:text-sm rst:text-inherit rst:opacity-75"), X = /* @__PURE__ */ o(
|
|
83
84
|
"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"
|
|
84
|
-
),
|
|
85
|
-
isOpen:
|
|
86
|
-
onClose:
|
|
87
|
-
title:
|
|
88
|
-
description:
|
|
89
|
-
size:
|
|
90
|
-
variant:
|
|
91
|
-
status:
|
|
85
|
+
), $ = { close: "Close dialog" }, q = 200, ir = ({
|
|
86
|
+
isOpen: _,
|
|
87
|
+
onClose: m,
|
|
88
|
+
title: f,
|
|
89
|
+
description: a,
|
|
90
|
+
size: F,
|
|
91
|
+
variant: p,
|
|
92
|
+
status: L,
|
|
92
93
|
children: u,
|
|
93
94
|
className: v,
|
|
94
|
-
onAfterClose:
|
|
95
|
-
labels:
|
|
95
|
+
onAfterClose: T,
|
|
96
|
+
labels: V,
|
|
97
|
+
layout: j = "default",
|
|
98
|
+
titleHidden: g = !1
|
|
96
99
|
}) => {
|
|
97
|
-
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
|
|
100
|
+
K();
|
|
101
|
+
const z = j === "fullscreen", D = M($, V), [E, R] = S(!1);
|
|
102
|
+
x(() => {
|
|
103
|
+
R(!0);
|
|
101
104
|
}, []);
|
|
102
|
-
const e =
|
|
103
|
-
return
|
|
105
|
+
const e = _ && E, b = l(null), i = l(null), n = I(b, i, e, q, T), y = l(null);
|
|
106
|
+
return x(() => {
|
|
104
107
|
if (e)
|
|
105
|
-
return
|
|
106
|
-
}, [e]), /* @__PURE__ */
|
|
107
|
-
e && /* @__PURE__ */ r("span", { ref:
|
|
108
|
-
/* @__PURE__ */
|
|
109
|
-
|
|
108
|
+
return P(y.current);
|
|
109
|
+
}, [e]), /* @__PURE__ */ s(A, { children: [
|
|
110
|
+
e && /* @__PURE__ */ r("span", { ref: y, hidden: !0 }),
|
|
111
|
+
/* @__PURE__ */ s(
|
|
112
|
+
O,
|
|
110
113
|
{
|
|
114
|
+
ref: b,
|
|
111
115
|
open: e,
|
|
112
116
|
as: "div",
|
|
113
|
-
className: "rst:font-ui rst:
|
|
114
|
-
onClose:
|
|
117
|
+
className: "rst:font-ui rst:fixed rst:inset-0 rst:z-50",
|
|
118
|
+
onClose: m,
|
|
115
119
|
children: [
|
|
116
120
|
/* @__PURE__ */ r(
|
|
117
|
-
|
|
121
|
+
d,
|
|
118
122
|
{
|
|
119
|
-
as:
|
|
123
|
+
as: c,
|
|
120
124
|
enter: "rst:ease-out rst:duration-300",
|
|
121
125
|
enterFrom: "rst:opacity-0",
|
|
122
126
|
enterTo: "rst:opacity-100",
|
|
@@ -124,48 +128,66 @@ const E = /* @__PURE__ */ a(
|
|
|
124
128
|
leaveFrom: "rst:opacity-100",
|
|
125
129
|
leaveTo: "rst:opacity-0",
|
|
126
130
|
children: /* @__PURE__ */ r(
|
|
127
|
-
|
|
131
|
+
Q,
|
|
128
132
|
{
|
|
129
|
-
className:
|
|
133
|
+
className: t(
|
|
130
134
|
"rst:fixed rst:inset-0 rst:transition-opacity",
|
|
131
|
-
|
|
135
|
+
p === "glass" ? "rst:bg-[var(--roster-backdrop,color-mix(in_oklab,oklch(20.8%_0.042_265.755)_40%,transparent))] rst:dark:bg-[var(--roster-backdrop,color-mix(in_oklab,var(--roster-black,#1e1c1a)_60%,transparent))]" : "rst:bg-[var(--roster-backdrop,color-mix(in_oklab,oklch(20.8%_0.042_265.755)_60%,transparent))] rst:dark:bg-[var(--roster-backdrop,color-mix(in_oklab,var(--roster-black,#1e1c1a)_80%,transparent))] rst:backdrop-blur-backdrop"
|
|
132
136
|
)
|
|
133
137
|
}
|
|
134
138
|
)
|
|
135
139
|
}
|
|
136
140
|
),
|
|
137
|
-
|
|
138
|
-
|
|
141
|
+
z ? /* @__PURE__ */ r(
|
|
142
|
+
d,
|
|
139
143
|
{
|
|
140
|
-
as:
|
|
144
|
+
as: c,
|
|
145
|
+
enter: "rst:ease-out rst:duration-300",
|
|
146
|
+
enterFrom: "rst:opacity-0",
|
|
147
|
+
enterTo: "rst:opacity-100",
|
|
148
|
+
leave: "rst:ease-in rst:duration-200",
|
|
149
|
+
leaveFrom: "rst:opacity-100",
|
|
150
|
+
leaveTo: "rst:opacity-0",
|
|
151
|
+
afterLeave: n.afterLeave,
|
|
152
|
+
children: /* @__PURE__ */ s(h, { ref: i, className: t("rst:fixed rst:inset-0 rst:overflow-y-auto", v), children: [
|
|
153
|
+
/* @__PURE__ */ r(k, { as: "h2", className: g ? "rst:sr-only" : t(w()), children: f }),
|
|
154
|
+
a && /* @__PURE__ */ r("p", { className: t(N()), children: a }),
|
|
155
|
+
u
|
|
156
|
+
] })
|
|
157
|
+
}
|
|
158
|
+
) : /* @__PURE__ */ r("div", { className: "rst:fixed rst:inset-0 rst:overflow-y-auto", children: /* @__PURE__ */ r("div", { className: "rst:flex rst:min-h-full rst:items-center rst:justify-center rst:p-4 rst:text-center", children: /* @__PURE__ */ r(
|
|
159
|
+
d,
|
|
160
|
+
{
|
|
161
|
+
as: c,
|
|
141
162
|
enter: "rst:ease-out rst:duration-300",
|
|
142
163
|
enterFrom: "rst:opacity-0 rst:scale-95",
|
|
143
164
|
enterTo: "rst:opacity-100 rst:scale-100",
|
|
144
165
|
leave: "rst:ease-in rst:duration-200",
|
|
145
166
|
leaveFrom: "rst:opacity-100 rst:scale-100",
|
|
146
167
|
leaveTo: "rst:opacity-0 rst:scale-95",
|
|
147
|
-
afterLeave:
|
|
148
|
-
children: /* @__PURE__ */
|
|
149
|
-
|
|
168
|
+
afterLeave: n.afterLeave,
|
|
169
|
+
children: /* @__PURE__ */ s(
|
|
170
|
+
h,
|
|
150
171
|
{
|
|
151
|
-
|
|
152
|
-
|
|
172
|
+
ref: i,
|
|
173
|
+
className: t(
|
|
174
|
+
W({ size: F, variant: p, status: L }),
|
|
153
175
|
v
|
|
154
176
|
),
|
|
155
177
|
children: [
|
|
156
|
-
/* @__PURE__ */
|
|
157
|
-
/* @__PURE__ */
|
|
158
|
-
/* @__PURE__ */ r(
|
|
159
|
-
|
|
178
|
+
/* @__PURE__ */ s("div", { className: "rst:flex rst:items-start rst:justify-between", children: [
|
|
179
|
+
/* @__PURE__ */ s("div", { children: [
|
|
180
|
+
/* @__PURE__ */ r(k, { as: "h2", className: g ? "rst:sr-only" : t(w()), children: f }),
|
|
181
|
+
a && /* @__PURE__ */ r("p", { className: t(N()), children: a })
|
|
160
182
|
] }),
|
|
161
183
|
/* @__PURE__ */ r("div", { className: "rst:ml-4 rst:flex rst:shrink-0", children: /* @__PURE__ */ r(
|
|
162
184
|
"button",
|
|
163
185
|
{
|
|
164
186
|
type: "button",
|
|
165
|
-
onClick:
|
|
166
|
-
className:
|
|
167
|
-
"aria-label":
|
|
168
|
-
children: /* @__PURE__ */ r(
|
|
187
|
+
onClick: m,
|
|
188
|
+
className: t(X()),
|
|
189
|
+
"aria-label": D.close,
|
|
190
|
+
children: /* @__PURE__ */ r(B, { icon: C, className: "rst:h-5 rst:w-5" })
|
|
169
191
|
}
|
|
170
192
|
) })
|
|
171
193
|
] }),
|
|
@@ -176,10 +198,11 @@ const E = /* @__PURE__ */ a(
|
|
|
176
198
|
}
|
|
177
199
|
) }) })
|
|
178
200
|
]
|
|
179
|
-
}
|
|
201
|
+
},
|
|
202
|
+
n.key
|
|
180
203
|
)
|
|
181
204
|
] });
|
|
182
205
|
};
|
|
183
206
|
export {
|
|
184
|
-
|
|
207
|
+
ir as Dialog
|
|
185
208
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),
|
|
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;
|
|
@@ -9,7 +9,8 @@ export interface SheetProps {
|
|
|
9
9
|
/** Called by Escape, a backdrop click, the close button and a dismissing drag. */
|
|
10
10
|
onClose: () => void;
|
|
11
11
|
/**
|
|
12
|
-
* Called once the leave transition has finished and the sheet is gone
|
|
12
|
+
* Called once the leave transition has finished and the sheet is gone,
|
|
13
|
+
* once for each close, a close during the entrance included.
|
|
13
14
|
*
|
|
14
15
|
* Clear the sheet's content here rather than in `onClose`. Cleared in
|
|
15
16
|
* `onClose`, it empties while it is still sliding out.
|