@adamosuiteservices/ui 2.20.2 → 2.20.3
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/dist/accordion-rounded.cjs +1 -1
- package/dist/accordion-rounded.js +1 -1
- package/dist/accordion.cjs +1 -1
- package/dist/accordion.js +1 -1
- package/dist/checkbox-BHStM029.cjs +24 -0
- package/dist/{checkbox-DPlUjwLi.js → checkbox-DX8b_6kG.js} +4 -3
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/collapsible.cjs +1 -1
- package/dist/collapsible.js +1 -1
- package/dist/{combobox-DylTjGrw.cjs → combobox-BURhN76t.cjs} +1 -1
- package/dist/{combobox-DG9u4g84.js → combobox-BrHVXnf2.js} +3 -3
- package/dist/combobox.cjs +1 -1
- package/dist/combobox.js +1 -1
- package/dist/context-menu.cjs +8 -8
- package/dist/context-menu.js +56 -55
- package/dist/date-picker-selector.cjs +1 -1
- package/dist/date-picker-selector.js +2 -2
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.js +1 -1
- package/dist/dropdown-menu.cjs +9 -9
- package/dist/dropdown-menu.js +33 -32
- package/dist/full-screen-loader.cjs +4 -4
- package/dist/full-screen-loader.js +27 -24
- package/dist/hover-card.cjs +2 -2
- package/dist/hover-card.js +12 -11
- package/dist/index-1Io41IIt.cjs +1 -0
- package/dist/index-437EL2iq.js +52 -0
- package/dist/index-B695uy69.js +9 -0
- package/dist/index-BE-HFcQ8.cjs +1 -0
- package/dist/{index-BPOsnOxS.js → index-BM2A-WRV.js} +1 -1
- package/dist/index-BOnhen57.cjs +1 -0
- package/dist/{index-D_hmhfRp.js → index-BPnOqaWN.js} +9 -8
- package/dist/index-BqyOu62e.cjs +1 -0
- package/dist/index-C8aODXfJ.cjs +1 -0
- package/dist/index-CFB4VzSW.js +542 -0
- package/dist/index-CgAmFB15.cjs +1 -0
- package/dist/{index-B76LQ4E5.js → index-CinpJ0oP.js} +24 -23
- package/dist/{index-wujanfX3.js → index-Cpaqurwq.js} +191 -190
- package/dist/{index-B6gxHWt9.js → index-CwrPuu3I.js} +15 -14
- package/dist/index-D3xJARPa.cjs +1 -0
- package/dist/index-DSj2iNTW.js +137 -0
- package/dist/{index-Ce7JfyIP.js → index-DWrql5dh.js} +11 -10
- package/dist/{index-BIydBVaH.js → index-E5ek046p.js} +78 -76
- package/dist/{index-BaCYnOIG.cjs → index-L8BhH23Y.cjs} +1 -1
- package/dist/index-ZzRl2Lfu.cjs +5 -0
- package/dist/index-_TfuLupy.cjs +41 -0
- package/dist/index-cBJ7G45l.cjs +1 -0
- package/dist/popover-Dod16CM1.cjs +15 -0
- package/dist/{popover-DcQ18EVl.js → popover-tP2NoMYx.js} +84 -82
- package/dist/popover.cjs +1 -1
- package/dist/popover.js +1 -1
- package/dist/radio-group.cjs +3 -3
- package/dist/radio-group.js +10 -9
- package/dist/select.cjs +8 -8
- package/dist/select.js +21 -19
- package/dist/{sheet-Cp6JGhWC.cjs → sheet-DR1nAs9U.cjs} +1 -1
- package/dist/{sheet-hWerE8S1.js → sheet-UNggtdu3.js} +1 -1
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +1 -1
- package/dist/sidebar.cjs +1 -1
- package/dist/sidebar.js +1 -1
- package/dist/slider.cjs +5 -5
- package/dist/slider.js +7 -6
- package/dist/switch.cjs +3 -3
- package/dist/switch.js +8 -7
- package/dist/tabs-underline.cjs +1 -1
- package/dist/tabs-underline.js +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/toggle.cjs +2 -2
- package/dist/toggle.js +6 -5
- package/dist/tooltip.cjs +3 -3
- package/dist/tooltip.js +23 -22
- package/docs/components/layout/full-screen-loader.md +16 -5
- package/package.json +4 -2
- package/dist/checkbox-CIzBdqN7.cjs +0 -24
- package/dist/index-8iwAKZIp.cjs +0 -1
- package/dist/index-BWaO7kQK.cjs +0 -1
- package/dist/index-BnkHpTJs.cjs +0 -1
- package/dist/index-C0UREtMP.js +0 -59
- package/dist/index-C2P2kXMc.cjs +0 -41
- package/dist/index-CC6DBo2g.cjs +0 -1
- package/dist/index-CRWn-2fF.cjs +0 -1
- package/dist/index-Ca99LLZF.cjs +0 -5
- package/dist/index-e0gNU5O1.js +0 -675
- package/dist/index-i5lLg35-.cjs +0 -1
- package/dist/popover-cGp_rNLg.cjs +0 -15
package/dist/toggle.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { j as o } from "./jsx-runtime-BzflLqGi.js";
|
|
3
3
|
import * as c from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { c as u } from "./index-B695uy69.js";
|
|
5
|
+
import { u as g } from "./index-437EL2iq.js";
|
|
5
6
|
import { P as f } from "./index-BMWt1NBG.js";
|
|
6
7
|
import { c as p } from "./index-CRiPKpXj.js";
|
|
7
8
|
import { c as v } from "./index-BqtVL8d-.js";
|
|
8
9
|
var r = "Toggle", n = c.forwardRef((a, e) => {
|
|
9
|
-
const { pressed: t, defaultPressed: d, onPressedChange: i, ...m } = a, [s, l] =
|
|
10
|
+
const { pressed: t, defaultPressed: d, onPressedChange: i, ...m } = a, [s, l] = g({
|
|
10
11
|
prop: t,
|
|
11
12
|
onChange: i,
|
|
12
13
|
defaultProp: d ?? !1,
|
|
@@ -21,7 +22,7 @@ var r = "Toggle", n = c.forwardRef((a, e) => {
|
|
|
21
22
|
"data-disabled": a.disabled ? "" : void 0,
|
|
22
23
|
...m,
|
|
23
24
|
ref: e,
|
|
24
|
-
onClick:
|
|
25
|
+
onClick: u(a.onClick, () => {
|
|
25
26
|
a.disabled || l(!s);
|
|
26
27
|
})
|
|
27
28
|
}
|
|
@@ -68,7 +69,7 @@ const x = v(
|
|
|
68
69
|
}
|
|
69
70
|
}
|
|
70
71
|
);
|
|
71
|
-
function
|
|
72
|
+
function C({
|
|
72
73
|
className: a,
|
|
73
74
|
variant: e,
|
|
74
75
|
size: t,
|
|
@@ -84,6 +85,6 @@ function k({
|
|
|
84
85
|
);
|
|
85
86
|
}
|
|
86
87
|
export {
|
|
87
|
-
|
|
88
|
+
C as Toggle,
|
|
88
89
|
x as toggleVariants
|
|
89
90
|
};
|
package/dist/tooltip.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./jsx-runtime-BB_1_6y_.cjs"),K=require("react"),E=require("./index-
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./jsx-runtime-BB_1_6y_.cjs"),K=require("react"),E=require("./index-BqyOu62e.cjs"),M=require("./index-_XxjJPRD.cjs"),W=require("./index-cwZN7ZY3.cjs"),J=require("./index-L8BhH23Y.cjs"),Q=require("./index-WIv2ndLu.cjs"),R=require("./index-Cqf5g2f_.cjs"),Z=require("./index-CBuLZ39k.cjs"),N=require("./index-DE3jjVoC.cjs"),ee=require("./index-CocSS1YK.cjs"),te=require("./index-C8aODXfJ.cjs"),oe=require("./index-BDs8lUfq.cjs"),re=require("./index-DoxiiusW.cjs");function ne(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const s=ne(K);var se=Symbol("radix.slottable");function ie(e){const o=({children:t})=>c.jsxRuntimeExports.jsx(c.jsxRuntimeExports.Fragment,{children:t});return o.displayName=`${e}.Slottable`,o.__radixId=se,o}var[O]=W.createContextScope("Tooltip",[R.createPopperScope]),D=R.createPopperScope(),q="TooltipProvider",ae=700,L="tooltip.open",[le,k]=O(q),$=e=>{const{__scopeTooltip:o,delayDuration:t=ae,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:l}=e,a=s.useRef(!0),f=s.useRef(!1),i=s.useRef(0);return s.useEffect(()=>{const p=i.current;return()=>window.clearTimeout(p)},[]),c.jsxRuntimeExports.jsx(le,{scope:o,isOpenDelayedRef:a,delayDuration:t,onOpen:s.useCallback(()=>{window.clearTimeout(i.current),a.current=!1},[]),onClose:s.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(()=>a.current=!0,r)},[r]),isPointerInTransitRef:f,onPointerInTransitChange:s.useCallback(p=>{f.current=p},[]),disableHoverableContent:n,children:l})};$.displayName=q;var P="Tooltip",[ce,_]=O(P),F=e=>{const{__scopeTooltip:o,children:t,open:r,defaultOpen:n,onOpenChange:l,disableHoverableContent:a,delayDuration:f}=e,i=k(P,e.__scopeTooltip),p=D(o),[u,x]=s.useState(null),m=Q.useId(),d=s.useRef(0),v=a??i.disableHoverableContent,T=f??i.delayDuration,h=s.useRef(!1),[y,g]=te.useControllableState({prop:r,defaultProp:n??!1,onChange:H=>{H?(i.onOpen(),document.dispatchEvent(new CustomEvent(L))):i.onClose(),l?.(H)},caller:P}),b=s.useMemo(()=>y?h.current?"delayed-open":"instant-open":"closed",[y]),j=s.useCallback(()=>{window.clearTimeout(d.current),d.current=0,h.current=!1,g(!0)},[g]),w=s.useCallback(()=>{window.clearTimeout(d.current),d.current=0,g(!1)},[g]),I=s.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>{h.current=!0,g(!0),d.current=0},T)},[T,g]);return s.useEffect(()=>()=>{d.current&&(window.clearTimeout(d.current),d.current=0)},[]),c.jsxRuntimeExports.jsx(R.Root2,{...p,children:c.jsxRuntimeExports.jsx(ce,{scope:o,contentId:m,open:y,stateAttribute:b,trigger:u,onTriggerChange:x,onTriggerEnter:s.useCallback(()=>{i.isOpenDelayedRef.current?I():j()},[i.isOpenDelayedRef,I,j]),onTriggerLeave:s.useCallback(()=>{v?w():(window.clearTimeout(d.current),d.current=0)},[w,v]),onOpen:j,onClose:w,disableHoverableContent:v,children:t})})};F.displayName=P;var A="TooltipTrigger",G=s.forwardRef((e,o)=>{const{__scopeTooltip:t,...r}=e,n=_(A,t),l=k(A,t),a=D(t),f=s.useRef(null),i=M.useComposedRefs(o,f,n.onTriggerChange),p=s.useRef(!1),u=s.useRef(!1),x=s.useCallback(()=>p.current=!1,[]);return s.useEffect(()=>()=>document.removeEventListener("pointerup",x),[x]),c.jsxRuntimeExports.jsx(R.Anchor,{asChild:!0,...a,children:c.jsxRuntimeExports.jsx(ee.Primitive.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:i,onPointerMove:E.composeEventHandlers(e.onPointerMove,m=>{m.pointerType!=="touch"&&!u.current&&!l.isPointerInTransitRef.current&&(n.onTriggerEnter(),u.current=!0)}),onPointerLeave:E.composeEventHandlers(e.onPointerLeave,()=>{n.onTriggerLeave(),u.current=!1}),onPointerDown:E.composeEventHandlers(e.onPointerDown,()=>{n.open&&n.onClose(),p.current=!0,document.addEventListener("pointerup",x,{once:!0})}),onFocus:E.composeEventHandlers(e.onFocus,()=>{p.current||n.onOpen()}),onBlur:E.composeEventHandlers(e.onBlur,n.onClose),onClick:E.composeEventHandlers(e.onClick,n.onClose)})})});G.displayName=A;var S="TooltipPortal",[ue,de]=O(S,{forceMount:void 0}),z=e=>{const{__scopeTooltip:o,forceMount:t,children:r,container:n}=e,l=_(S,o);return c.jsxRuntimeExports.jsx(ue,{scope:o,forceMount:t,children:c.jsxRuntimeExports.jsx(N.Presence,{present:t||l.open,children:c.jsxRuntimeExports.jsx(Z.Portal,{asChild:!0,container:n,children:r})})})};z.displayName=S;var C="TooltipContent",B=s.forwardRef((e,o)=>{const t=de(C,e.__scopeTooltip),{forceMount:r=t.forceMount,side:n="top",...l}=e,a=_(C,e.__scopeTooltip);return c.jsxRuntimeExports.jsx(N.Presence,{present:r||a.open,children:a.disableHoverableContent?c.jsxRuntimeExports.jsx(U,{side:n,...l,ref:o}):c.jsxRuntimeExports.jsx(pe,{side:n,...l,ref:o})})}),pe=s.forwardRef((e,o)=>{const t=_(C,e.__scopeTooltip),r=k(C,e.__scopeTooltip),n=s.useRef(null),l=M.useComposedRefs(o,n),[a,f]=s.useState(null),{trigger:i,onClose:p}=t,u=n.current,{onPointerInTransitChange:x}=r,m=s.useCallback(()=>{f(null),x(!1)},[x]),d=s.useCallback((v,T)=>{const h=v.currentTarget,y={x:v.clientX,y:v.clientY},g=ve(y,h.getBoundingClientRect()),b=he(y,g),j=Te(T.getBoundingClientRect()),w=ye([...b,...j]);f(w),x(!0)},[x]);return s.useEffect(()=>()=>m(),[m]),s.useEffect(()=>{if(i&&u){const v=h=>d(h,u),T=h=>d(h,i);return i.addEventListener("pointerleave",v),u.addEventListener("pointerleave",T),()=>{i.removeEventListener("pointerleave",v),u.removeEventListener("pointerleave",T)}}},[i,u,d,m]),s.useEffect(()=>{if(a){const v=T=>{const h=T.target,y={x:T.clientX,y:T.clientY},g=i?.contains(h)||u?.contains(h),b=!ge(y,a);g?m():b&&(m(),p())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[i,u,a,p,m]),c.jsxRuntimeExports.jsx(U,{...e,ref:l})}),[xe,fe]=O(P,{isInside:!1}),me=ie("TooltipContent"),U=s.forwardRef((e,o)=>{const{__scopeTooltip:t,children:r,"aria-label":n,onEscapeKeyDown:l,onPointerDownOutside:a,...f}=e,i=_(C,t),p=D(t),{onClose:u}=i;return s.useEffect(()=>(document.addEventListener(L,u),()=>document.removeEventListener(L,u)),[u]),s.useEffect(()=>{if(i.trigger){const x=m=>{m.target?.contains(i.trigger)&&u()};return window.addEventListener("scroll",x,{capture:!0}),()=>window.removeEventListener("scroll",x,{capture:!0})}},[i.trigger,u]),c.jsxRuntimeExports.jsx(J.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:a,onFocusOutside:x=>x.preventDefault(),onDismiss:u,children:c.jsxRuntimeExports.jsxs(R.Content,{"data-state":i.stateAttribute,...p,...f,ref:o,style:{...f.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsxRuntimeExports.jsx(me,{children:r}),c.jsxRuntimeExports.jsx(xe,{scope:t,isInside:!0,children:c.jsxRuntimeExports.jsx(oe.Root,{id:i.contentId,role:"tooltip",children:n||r})})]})})});B.displayName=C;var V="TooltipArrow",Y=s.forwardRef((e,o)=>{const{__scopeTooltip:t,...r}=e,n=D(t);return fe(V,t).isInside?null:c.jsxRuntimeExports.jsx(R.Arrow,{...n,...r,ref:o})});Y.displayName=V;function ve(e,o){const t=Math.abs(o.top-e.y),r=Math.abs(o.bottom-e.y),n=Math.abs(o.right-e.x),l=Math.abs(o.left-e.x);switch(Math.min(t,r,n,l)){case l:return"left";case n:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function he(e,o,t=5){const r=[];switch(o){case"top":r.push({x:e.x-t,y:e.y+t},{x:e.x+t,y:e.y+t});break;case"bottom":r.push({x:e.x-t,y:e.y-t},{x:e.x+t,y:e.y-t});break;case"left":r.push({x:e.x+t,y:e.y-t},{x:e.x+t,y:e.y+t});break;case"right":r.push({x:e.x-t,y:e.y-t},{x:e.x-t,y:e.y+t});break}return r}function Te(e){const{top:o,right:t,bottom:r,left:n}=e;return[{x:n,y:o},{x:t,y:o},{x:t,y:r},{x:n,y:r}]}function ge(e,o){const{x:t,y:r}=e;let n=!1;for(let l=0,a=o.length-1;l<o.length;a=l++){const f=o[l],i=o[a],p=f.x,u=f.y,x=i.x,m=i.y;u>r!=m>r&&t<(x-p)*(r-u)/(m-u)+p&&(n=!n)}return n}function ye(e){const o=e.slice();return o.sort((t,r)=>t.x<r.x?-1:t.x>r.x?1:t.y<r.y?-1:t.y>r.y?1:0),Ee(o)}function Ee(e){if(e.length<=1)return e.slice();const o=[];for(let r=0;r<e.length;r++){const n=e[r];for(;o.length>=2;){const l=o[o.length-1],a=o[o.length-2];if((l.x-a.x)*(n.y-a.y)>=(l.y-a.y)*(n.x-a.x))o.pop();else break}o.push(n)}o.pop();const t=[];for(let r=e.length-1;r>=0;r--){const n=e[r];for(;t.length>=2;){const l=t[t.length-1],a=t[t.length-2];if((l.x-a.x)*(n.y-a.y)>=(l.y-a.y)*(n.x-a.x))t.pop();else break}t.push(n)}return t.pop(),o.length===1&&t.length===1&&o[0].x===t[0].x&&o[0].y===t[0].y?o:o.concat(t)}var Ce=$,Re=F,be=G,je=z,we=B,Pe=Y;function X({delayDuration:e=0,...o}){return c.jsxRuntimeExports.jsx(Ce,{"data-slot":"tooltip-provider",delayDuration:e,...o})}function _e({...e}){return c.jsxRuntimeExports.jsx(X,{children:c.jsxRuntimeExports.jsx(Re,{"data-slot":"tooltip",...e})})}function Oe({...e}){return c.jsxRuntimeExports.jsx(be,{"data-slot":"tooltip-trigger",...e})}function De({className:e,sideOffset:o=0,children:t,...r}){return c.jsxRuntimeExports.jsx(je,{children:c.jsxRuntimeExports.jsxs(we,{"data-slot":"tooltip-content",sideOffset:o,className:re.cn(`
|
|
2
2
|
adm:z-50 adm:w-fit
|
|
3
3
|
adm:origin-(--radix-tooltip-content-transform-origin) adm:animate-in
|
|
4
4
|
adm:rounded-md adm:bg-neutrals-900 adm:px-3 adm:py-1.5 adm:text-xs
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
adm:data-[state=closed]:animate-out
|
|
11
11
|
adm:data-[state=closed]:fade-out-0
|
|
12
12
|
adm:data-[state=closed]:zoom-out-95
|
|
13
|
-
`,e),...r,children:[t,c.jsxRuntimeExports.jsx(
|
|
13
|
+
`,e),...r,children:[t,c.jsxRuntimeExports.jsx(Pe,{className:`
|
|
14
14
|
adm:z-50 adm:size-2.5 adm:translate-y-[calc(-50%-2px)] adm:rotate-45
|
|
15
15
|
adm:rounded-[2px] adm:bg-neutrals-900 adm:fill-neutrals-900
|
|
16
|
-
`})]})})}exports.Tooltip=
|
|
16
|
+
`})]})})}exports.Tooltip=_e;exports.TooltipContent=De;exports.TooltipProvider=X;exports.TooltipTrigger=Oe;
|
package/dist/tooltip.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { j as c } from "./jsx-runtime-BzflLqGi.js";
|
|
3
3
|
import * as a from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { c as C } from "./index-B695uy69.js";
|
|
5
5
|
import { u as M } from "./index-DLcqcWxM.js";
|
|
6
|
-
import { c as
|
|
7
|
-
import { D as
|
|
8
|
-
import { u as
|
|
9
|
-
import { c as S, R as
|
|
10
|
-
import { P as
|
|
6
|
+
import { c as X } from "./index-FxyLF8MY.js";
|
|
7
|
+
import { D as K } from "./index-BM2A-WRV.js";
|
|
8
|
+
import { u as W } from "./index-Cv867SGx.js";
|
|
9
|
+
import { c as S, R as J, A as Q, a as Z, C as ee } from "./index-BAEhLEFF.js";
|
|
10
|
+
import { P as te } from "./index-CZWDxvEo.js";
|
|
11
11
|
import { P as H } from "./index-CSFEzRxy.js";
|
|
12
|
-
import { P as
|
|
12
|
+
import { P as oe } from "./index-BMWt1NBG.js";
|
|
13
|
+
import { u as re } from "./index-437EL2iq.js";
|
|
13
14
|
import { R as ne } from "./index-PYkEXTqJ.js";
|
|
14
15
|
import { c as ae } from "./index-CRiPKpXj.js";
|
|
15
16
|
var se = Symbol("radix.slottable");
|
|
@@ -18,7 +19,7 @@ function ie(e) {
|
|
|
18
19
|
const o = ({ children: t }) => /* @__PURE__ */ c.jsx(c.Fragment, { children: t });
|
|
19
20
|
return o.displayName = `${e}.Slottable`, o.__radixId = se, o;
|
|
20
21
|
}
|
|
21
|
-
var [j] =
|
|
22
|
+
var [j] = X("Tooltip", [
|
|
22
23
|
S
|
|
23
24
|
]), O = S(), F = "TooltipProvider", le = 700, D = "tooltip.open", [ce, L] = j(F), G = (e) => {
|
|
24
25
|
const {
|
|
@@ -65,7 +66,7 @@ var R = "Tooltip", [ue, _] = j(R), $ = (e) => {
|
|
|
65
66
|
onOpenChange: l,
|
|
66
67
|
disableHoverableContent: i,
|
|
67
68
|
delayDuration: m
|
|
68
|
-
} = e, s = L(R, e.__scopeTooltip), p = O(o), [u, f] = a.useState(null), x =
|
|
69
|
+
} = e, s = L(R, e.__scopeTooltip), p = O(o), [u, f] = a.useState(null), x = W(), d = a.useRef(0), v = i ?? s.disableHoverableContent, T = m ?? s.delayDuration, h = a.useRef(!1), [y, g] = re({
|
|
69
70
|
prop: r,
|
|
70
71
|
defaultProp: n ?? !1,
|
|
71
72
|
onChange: (N) => {
|
|
@@ -83,7 +84,7 @@ var R = "Tooltip", [ue, _] = j(R), $ = (e) => {
|
|
|
83
84
|
}, [T, g]);
|
|
84
85
|
return a.useEffect(() => () => {
|
|
85
86
|
d.current && (window.clearTimeout(d.current), d.current = 0);
|
|
86
|
-
}, []), /* @__PURE__ */ c.jsx(
|
|
87
|
+
}, []), /* @__PURE__ */ c.jsx(J, { ...p, children: /* @__PURE__ */ c.jsx(
|
|
87
88
|
ue,
|
|
88
89
|
{
|
|
89
90
|
scope: o,
|
|
@@ -109,8 +110,8 @@ $.displayName = R;
|
|
|
109
110
|
var A = "TooltipTrigger", z = a.forwardRef(
|
|
110
111
|
(e, o) => {
|
|
111
112
|
const { __scopeTooltip: t, ...r } = e, n = _(A, t), l = L(A, t), i = O(t), m = a.useRef(null), s = M(o, m, n.onTriggerChange), p = a.useRef(!1), u = a.useRef(!1), f = a.useCallback(() => p.current = !1, []);
|
|
112
|
-
return a.useEffect(() => () => document.removeEventListener("pointerup", f), [f]), /* @__PURE__ */ c.jsx(
|
|
113
|
-
|
|
113
|
+
return a.useEffect(() => () => document.removeEventListener("pointerup", f), [f]), /* @__PURE__ */ c.jsx(Q, { asChild: !0, ...i, children: /* @__PURE__ */ c.jsx(
|
|
114
|
+
oe.button,
|
|
114
115
|
{
|
|
115
116
|
"aria-describedby": n.open ? n.contentId : void 0,
|
|
116
117
|
"data-state": n.stateAttribute,
|
|
@@ -139,7 +140,7 @@ var k = "TooltipPortal", [de, pe] = j(k, {
|
|
|
139
140
|
forceMount: void 0
|
|
140
141
|
}), B = (e) => {
|
|
141
142
|
const { __scopeTooltip: o, forceMount: t, children: r, container: n } = e, l = _(k, o);
|
|
142
|
-
return /* @__PURE__ */ c.jsx(de, { scope: o, forceMount: t, children: /* @__PURE__ */ c.jsx(H, { present: t || l.open, children: /* @__PURE__ */ c.jsx(
|
|
143
|
+
return /* @__PURE__ */ c.jsx(de, { scope: o, forceMount: t, children: /* @__PURE__ */ c.jsx(H, { present: t || l.open, children: /* @__PURE__ */ c.jsx(te, { asChild: !0, container: n, children: r }) }) });
|
|
143
144
|
};
|
|
144
145
|
B.displayName = k;
|
|
145
146
|
var b = "TooltipContent", U = a.forwardRef(
|
|
@@ -191,7 +192,7 @@ var b = "TooltipContent", U = a.forwardRef(
|
|
|
191
192
|
return window.addEventListener("scroll", f, { capture: !0 }), () => window.removeEventListener("scroll", f, { capture: !0 });
|
|
192
193
|
}
|
|
193
194
|
}, [s.trigger, u]), /* @__PURE__ */ c.jsx(
|
|
194
|
-
|
|
195
|
+
K,
|
|
195
196
|
{
|
|
196
197
|
asChild: !0,
|
|
197
198
|
disableOutsidePointerEvents: !1,
|
|
@@ -200,7 +201,7 @@ var b = "TooltipContent", U = a.forwardRef(
|
|
|
200
201
|
onFocusOutside: (f) => f.preventDefault(),
|
|
201
202
|
onDismiss: u,
|
|
202
203
|
children: /* @__PURE__ */ c.jsxs(
|
|
203
|
-
|
|
204
|
+
ee,
|
|
204
205
|
{
|
|
205
206
|
"data-state": s.stateAttribute,
|
|
206
207
|
...p,
|
|
@@ -231,7 +232,7 @@ var Y = "TooltipArrow", q = a.forwardRef(
|
|
|
231
232
|
return xe(
|
|
232
233
|
Y,
|
|
233
234
|
t
|
|
234
|
-
).isInside ? null : /* @__PURE__ */ c.jsx(
|
|
235
|
+
).isInside ? null : /* @__PURE__ */ c.jsx(Z, { ...n, ...r, ref: o });
|
|
235
236
|
}
|
|
236
237
|
);
|
|
237
238
|
q.displayName = Y;
|
|
@@ -341,17 +342,17 @@ function Oe({
|
|
|
341
342
|
}
|
|
342
343
|
);
|
|
343
344
|
}
|
|
344
|
-
function
|
|
345
|
+
function Be({
|
|
345
346
|
...e
|
|
346
347
|
}) {
|
|
347
348
|
return /* @__PURE__ */ c.jsx(Oe, { children: /* @__PURE__ */ c.jsx(Pe, { "data-slot": "tooltip", ...e }) });
|
|
348
349
|
}
|
|
349
|
-
function
|
|
350
|
+
function Ue({
|
|
350
351
|
...e
|
|
351
352
|
}) {
|
|
352
353
|
return /* @__PURE__ */ c.jsx(Ee, { "data-slot": "tooltip-trigger", ...e });
|
|
353
354
|
}
|
|
354
|
-
function
|
|
355
|
+
function Ve({
|
|
355
356
|
className: e,
|
|
356
357
|
sideOffset: o = 0,
|
|
357
358
|
children: t,
|
|
@@ -395,8 +396,8 @@ function Ue({
|
|
|
395
396
|
) });
|
|
396
397
|
}
|
|
397
398
|
export {
|
|
398
|
-
|
|
399
|
-
|
|
399
|
+
Be as Tooltip,
|
|
400
|
+
Ve as TooltipContent,
|
|
400
401
|
Oe as TooltipProvider,
|
|
401
|
-
|
|
402
|
+
Ue as TooltipTrigger
|
|
402
403
|
};
|
|
@@ -13,7 +13,7 @@ A **full-screen loading overlay** that blocks user interaction during asynchrono
|
|
|
13
13
|
- ✅ Observable pattern for global state synchronization
|
|
14
14
|
- ✅ High z-index for optimal layering (`z-100`)
|
|
15
15
|
- ✅ Automatic spinner centering
|
|
16
|
-
- ✅ Blocks user interaction during loading, including inside an already-open `Dialog`/`Sheet`
|
|
16
|
+
- ✅ Blocks user interaction during loading, including inside an already-open `Dialog`/`Sheet` — pointer clicks, the `Escape` key, and keyboard focus/`Tab` are all blocked while it is visible
|
|
17
17
|
|
|
18
18
|
## Import
|
|
19
19
|
|
|
@@ -223,7 +223,16 @@ The loader uses an observable pattern that synchronizes state across the entire
|
|
|
223
223
|
- **z-index**: `z-100` to be above all content
|
|
224
224
|
- **Positioning**: `fixed` with `inset-0` (covers entire viewport)
|
|
225
225
|
- **Centering**: Flexbox with `items-center` and `justify-center`
|
|
226
|
-
- **`pointer-events: auto`**:
|
|
226
|
+
- **`pointer-events: auto`**: set as a fallback so the overlay is interactive on first paint, before Radix's layer effects have run
|
|
227
|
+
|
|
228
|
+
### Interaction blocking
|
|
229
|
+
|
|
230
|
+
The loader wraps itself in Radix's own `DismissableLayer` (`disableOutsidePointerEvents`) and `FocusScope` (`trapped`, `loop`) — the same primitives `Dialog`, `Sheet`, and `Popover` use internally. While the loader is visible:
|
|
231
|
+
|
|
232
|
+
- It registers as the topmost layer in Radix's internal layer stack, so an already-open `Dialog`/`Sheet`/`Popover` underneath stops reacting to the `Escape` key and outside pointer-down events.
|
|
233
|
+
- Radix disables `pointer-events` on every layer below it directly (not just via the loader's own CSS), so clicks can't reach the content underneath even if the loader's visual coverage were somehow incomplete.
|
|
234
|
+
- Focus is trapped inside the loader, which has no focusable elements, so `Tab`/`Shift+Tab` can't reach controls in the `Dialog`/`Sheet`/page behind it.
|
|
235
|
+
- The loader can't be dismissed by the user (no `onDismiss` is wired up) — only `FullScreenLoaderManager.hide()` closes it.
|
|
227
236
|
|
|
228
237
|
### Visual styles
|
|
229
238
|
|
|
@@ -340,6 +349,8 @@ The component includes basic accessibility considerations:
|
|
|
340
349
|
|
|
341
350
|
- **Fixed positioning**: Ensures visibility over all content
|
|
342
351
|
- **Visual feedback**: Clearly visible animated spinner
|
|
352
|
+
- **Focus trapping**: Keyboard focus can't reach content behind the loader (via Radix `FocusScope`)
|
|
353
|
+
- **Escape handling**: Pressing `Escape` while the loader is visible doesn't dismiss any `Dialog`/`Sheet` underneath, since the loader becomes the topmost dismissable layer
|
|
343
354
|
|
|
344
355
|
### Suggested improvements
|
|
345
356
|
|
|
@@ -379,11 +390,11 @@ try {
|
|
|
379
390
|
|
|
380
391
|
**Solution**: The loader uses `z-100`. Verify that no element has a higher z-index. If necessary, adjust the loader's z-index.
|
|
381
392
|
|
|
382
|
-
### Elements stay clickable through the loader while a `Dialog`/`Sheet` is open
|
|
393
|
+
### Elements stay clickable/focusable through the loader while a `Dialog`/`Sheet` is open
|
|
383
394
|
|
|
384
|
-
**Cause**:
|
|
395
|
+
**Cause**: The loader is nested inside another element that sets `pointer-events: none` or `visibility: hidden`, which prevents its `DismissableLayer`/`FocusScope` wrapper from ever mounting into the visible DOM, so it can't register itself as the topmost layer.
|
|
385
396
|
|
|
386
|
-
**Solution**:
|
|
397
|
+
**Solution**: Render `<FullScreenLoader />` directly at the top level of your app, not inside a container that could hide or disable it.
|
|
387
398
|
|
|
388
399
|
### Multiple loaders appear simultaneously
|
|
389
400
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adamosuiteservices/ui",
|
|
3
|
-
"version": "2.20.
|
|
3
|
+
"version": "2.20.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -274,7 +274,9 @@
|
|
|
274
274
|
"@radix-ui/react-collapsible": "^1.1.12",
|
|
275
275
|
"@radix-ui/react-context-menu": "^2.2.16",
|
|
276
276
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
277
|
+
"@radix-ui/react-dismissable-layer": "^1.1.11",
|
|
277
278
|
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
279
|
+
"@radix-ui/react-focus-scope": "^1.1.7",
|
|
278
280
|
"@radix-ui/react-hover-card": "^1.1.15",
|
|
279
281
|
"@radix-ui/react-label": "^2.1.7",
|
|
280
282
|
"@radix-ui/react-popover": "^1.1.15",
|
|
@@ -329,4 +331,4 @@
|
|
|
329
331
|
"vite": "^7.1.7",
|
|
330
332
|
"vite-plugin-dts": "^4.5.4"
|
|
331
333
|
}
|
|
332
|
-
}
|
|
334
|
+
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";const n=require("./jsx-runtime-BB_1_6y_.cjs"),H=require("react"),S=require("./index-_XxjJPRD.cjs"),L=require("./index-cwZN7ZY3.cjs"),_=require("./index-BWaO7kQK.cjs"),G=require("./index-DYxWvftI.cjs"),K=require("./index-bSPhqlcX.cjs"),U=require("./index-DE3jjVoC.cjs"),P=require("./index-CocSS1YK.cjs"),N=require("./icon-C5Q2b1Am.cjs"),y=require("./index-DoxiiusW.cjs");function X(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const a=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(r,o,a.get?a:{enumerable:!0,get:()=>e[o]})}}return r.default=e,Object.freeze(r)}const d=X(H);var R="Checkbox",[J]=L.createContextScope(R),[Q,I]=J(R);function V(e){const{__scopeCheckbox:r,checked:o,children:a,defaultChecked:c,disabled:t,form:p,name:b,onCheckedChange:u,required:f,value:h="on",internal_do_not_use_render:l}=e,[m,v]=_.useControllableState({prop:o,defaultProp:c??!1,onChange:u,caller:R}),[k,C]=d.useState(null),[g,s]=d.useState(null),i=d.useRef(!1),j=k?!!p||!!k.closest("form"):!0,E={checked:m,disabled:t,setChecked:v,control:k,setControl:C,name:b,form:p,value:h,hasConsumerStoppedPropagationRef:i,required:f,defaultChecked:x(c)?!1:c,isFormControl:j,bubbleInput:g,setBubbleInput:s};return n.jsxRuntimeExports.jsx(Q,{scope:r,...E,children:W(l)?l(E):a})}var w="CheckboxTrigger",O=d.forwardRef(({__scopeCheckbox:e,onKeyDown:r,onClick:o,...a},c)=>{const{control:t,value:p,disabled:b,checked:u,required:f,setControl:h,setChecked:l,hasConsumerStoppedPropagationRef:m,isFormControl:v,bubbleInput:k}=I(w,e),C=S.useComposedRefs(c,h),g=d.useRef(u);return d.useEffect(()=>{const s=t?.form;if(s){const i=()=>l(g.current);return s.addEventListener("reset",i),()=>s.removeEventListener("reset",i)}},[t,l]),n.jsxRuntimeExports.jsx(P.Primitive.button,{type:"button",role:"checkbox","aria-checked":x(u)?"mixed":u,"aria-required":f,"data-state":A(u),"data-disabled":b?"":void 0,disabled:b,value:p,...a,ref:C,onKeyDown:_.composeEventHandlers(r,s=>{s.key==="Enter"&&s.preventDefault()}),onClick:_.composeEventHandlers(o,s=>{l(i=>x(i)?!0:!i),k&&v&&(m.current=s.isPropagationStopped(),m.current||s.stopPropagation())})})});O.displayName=w;var B=d.forwardRef((e,r)=>{const{__scopeCheckbox:o,name:a,checked:c,defaultChecked:t,required:p,disabled:b,value:u,onCheckedChange:f,form:h,...l}=e;return n.jsxRuntimeExports.jsx(V,{__scopeCheckbox:o,checked:c,defaultChecked:t,disabled:b,required:p,onCheckedChange:f,name:a,form:h,value:u,internal_do_not_use_render:({isFormControl:m})=>n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[n.jsxRuntimeExports.jsx(O,{...l,ref:r,__scopeCheckbox:o}),m&&n.jsxRuntimeExports.jsx(D,{__scopeCheckbox:o})]})})});B.displayName=R;var M="CheckboxIndicator",T=d.forwardRef((e,r)=>{const{__scopeCheckbox:o,forceMount:a,...c}=e,t=I(M,o);return n.jsxRuntimeExports.jsx(U.Presence,{present:a||x(t.checked)||t.checked===!0,children:n.jsxRuntimeExports.jsx(P.Primitive.span,{"data-state":A(t.checked),"data-disabled":t.disabled?"":void 0,...c,ref:r,style:{pointerEvents:"none",...e.style}})})});T.displayName=M;var $="CheckboxBubbleInput",D=d.forwardRef(({__scopeCheckbox:e,...r},o)=>{const{control:a,hasConsumerStoppedPropagationRef:c,checked:t,defaultChecked:p,required:b,disabled:u,name:f,value:h,form:l,bubbleInput:m,setBubbleInput:v}=I($,e),k=S.useComposedRefs(o,v),C=G.usePrevious(t),g=K.useSize(a);d.useEffect(()=>{const i=m;if(!i)return;const j=window.HTMLInputElement.prototype,q=Object.getOwnPropertyDescriptor(j,"checked").set,z=!c.current;if(C!==t&&q){const F=new Event("click",{bubbles:z});i.indeterminate=x(t),q.call(i,x(t)?!1:t),i.dispatchEvent(F)}},[m,C,t,c]);const s=d.useRef(x(t)?!1:t);return n.jsxRuntimeExports.jsx(P.Primitive.input,{type:"checkbox","aria-hidden":!0,defaultChecked:p??s.current,required:b,disabled:u,name:f,value:h,form:l,...r,tabIndex:-1,ref:k,style:{...r.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});D.displayName=$;function W(e){return typeof e=="function"}function x(e){return e==="indeterminate"}function A(e){return x(e)?"indeterminate":e?"checked":"unchecked"}function Y({className:e,...r}){return n.jsxRuntimeExports.jsx(B,{"data-slot":"checkbox",className:y.cn(`
|
|
2
|
-
adm:peer adm:size-5 adm:shrink-0 adm:rounded-[4px] adm:border
|
|
3
|
-
adm:border-medium-border adm:bg-background
|
|
4
|
-
adm:transition-[color,box-shadow,background-color] adm:outline-none
|
|
5
|
-
adm:hover:bg-muted
|
|
6
|
-
adm:focus-visible:border-primary-300 adm:focus-visible:ring-4
|
|
7
|
-
adm:focus-visible:ring-primary/10
|
|
8
|
-
adm:disabled:cursor-not-allowed adm:disabled:bg-disabled
|
|
9
|
-
adm:aria-invalid:border-destructive
|
|
10
|
-
adm:aria-invalid:focus-visible:ring-4
|
|
11
|
-
adm:aria-invalid:focus-visible:ring-destructive/10
|
|
12
|
-
adm:data-[state=checked]:border-primary
|
|
13
|
-
adm:data-[state=checked]:bg-primary
|
|
14
|
-
adm:data-[state=checked]:text-primary-foreground
|
|
15
|
-
adm:data-[state=checked]:hover:bg-primary
|
|
16
|
-
`,e),...r,children:n.jsxRuntimeExports.jsxs(T,{"data-slot":"checkbox-indicator",className:`
|
|
17
|
-
adm:group adm:grid adm:place-content-center adm:text-current
|
|
18
|
-
adm:transition-none
|
|
19
|
-
adm:*:data-[slot=icon]:text-current
|
|
20
|
-
`,children:[n.jsxRuntimeExports.jsx(N.Icon,{symbol:"check",className:y.cn("adm:text-base adm:text-primary-foreground",`
|
|
21
|
-
adm:group-data-[state=indeterminate]:hidden
|
|
22
|
-
`)}),n.jsxRuntimeExports.jsx(N.Icon,{symbol:"remove",className:y.cn("adm:text-base adm:text-primary",`
|
|
23
|
-
adm:group-data-[state=checked]:hidden
|
|
24
|
-
`)})]})})}exports.Checkbox=Y;
|
package/dist/index-8iwAKZIp.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";const Xe=require("react"),v=require("./index-BWaO7kQK.cjs"),Re=require("./index-Da298sEl.cjs"),_=require("./index-_XxjJPRD.cjs"),ze=require("./index-cwZN7ZY3.cjs"),Ze=require("./index-BaCYnOIG.cjs"),V=require("./index-C2P2kXMc.cjs"),me=require("./index-WIv2ndLu.cjs"),j=require("./index-Cqf5g2f_.cjs"),Je=require("./index-CBuLZ39k.cjs"),$=require("./index-DE3jjVoC.cjs"),w=require("./index-CocSS1YK.cjs"),W=require("./index-CC6DBo2g.cjs"),a=require("./jsx-runtime-BB_1_6y_.cjs"),ee=require("./index-CzY-WZXL.cjs");function Qe(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const r=Qe(Xe);function et(e){const n=tt(e),t=r.forwardRef((o,s)=>{const{children:c,...l}=o,f=r.Children.toArray(c),m=f.find(ot);if(m){const p=m.props.children,d=f.map(u=>u===m?r.Children.count(p)>1?r.Children.only(null):r.isValidElement(p)?p.props.children:null:u);return a.jsxRuntimeExports.jsx(n,{...l,ref:s,children:r.isValidElement(p)?r.cloneElement(p,void 0,d):null})}return a.jsxRuntimeExports.jsx(n,{...l,ref:s,children:c})});return t.displayName=`${e}.Slot`,t}function tt(e){const n=r.forwardRef((t,o)=>{const{children:s,...c}=t;if(r.isValidElement(s)){const l=st(s),f=rt(c,s.props);return s.type!==r.Fragment&&(f.ref=o?_.composeRefs(o,l):l),r.cloneElement(s,f)}return r.Children.count(s)>1?r.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var nt=Symbol("radix.slottable");function ot(e){return r.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===nt}function rt(e,n){const t={...n};for(const o in n){const s=e[o],c=n[o];/^on[A-Z]/.test(o)?s&&c?t[o]=(...f)=>{const m=c(...f);return s(...f),m}:s&&(t[o]=s):o==="style"?t[o]={...s,...c}:o==="className"&&(t[o]=[s,c].filter(Boolean).join(" "))}return{...e,...t}}function st(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,t=n&&"isReactWarning"in n&&n.isReactWarning;return t?e.ref:(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,t=n&&"isReactWarning"in n&&n.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}var Q=["Enter"," "],ct=["ArrowDown","PageUp","Home"],ve=["ArrowUp","PageDown","End"],ut=[...ct,...ve],at={ltr:[...Q,"ArrowRight"],rtl:[...Q,"ArrowLeft"]},it={ltr:["ArrowLeft"],rtl:["ArrowRight"]},F="Menu",[k,lt,dt]=Re.createCollection(F),[S,ft]=ze.createContextScope(F,[dt,j.createPopperScope,W.createRovingFocusGroupScope]),L=j.createPopperScope(),Ee=W.createRovingFocusGroupScope(),[Ce,g]=S(F),[pt,G]=S(F),he=e=>{const{__scopeMenu:n,open:t=!1,children:o,dir:s,onOpenChange:c,modal:l=!0}=e,f=L(n),[m,p]=r.useState(null),d=r.useRef(!1),u=ee.useCallbackRef(c),x=Re.useDirection(s);return r.useEffect(()=>{const C=()=>{d.current=!0,document.addEventListener("pointerdown",R,{capture:!0,once:!0}),document.addEventListener("pointermove",R,{capture:!0,once:!0})},R=()=>d.current=!1;return document.addEventListener("keydown",C,{capture:!0}),()=>{document.removeEventListener("keydown",C,{capture:!0}),document.removeEventListener("pointerdown",R,{capture:!0}),document.removeEventListener("pointermove",R,{capture:!0})}},[]),a.jsxRuntimeExports.jsx(j.Root2,{...f,children:a.jsxRuntimeExports.jsx(Ce,{scope:n,open:t,onOpenChange:u,content:m,onContentChange:p,children:a.jsxRuntimeExports.jsx(pt,{scope:n,onClose:r.useCallback(()=>u(!1),[u]),isUsingKeyboardRef:d,dir:x,modal:l,children:o})})})};he.displayName=F;var mt="MenuAnchor",te=r.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e,s=L(t);return a.jsxRuntimeExports.jsx(j.Anchor,{...s,...o,ref:n})});te.displayName=mt;var ne="MenuPortal",[xt,ge]=S(ne,{forceMount:void 0}),Me=e=>{const{__scopeMenu:n,forceMount:t,children:o,container:s}=e,c=g(ne,n);return a.jsxRuntimeExports.jsx(xt,{scope:n,forceMount:t,children:a.jsxRuntimeExports.jsx($.Presence,{present:t||c.open,children:a.jsxRuntimeExports.jsx(Je.Portal,{asChild:!0,container:s,children:o})})})};Me.displayName=ne;var h="MenuContent",[Rt,oe]=S(h),_e=r.forwardRef((e,n)=>{const t=ge(h,e.__scopeMenu),{forceMount:o=t.forceMount,...s}=e,c=g(h,e.__scopeMenu),l=G(h,e.__scopeMenu);return a.jsxRuntimeExports.jsx(k.Provider,{scope:e.__scopeMenu,children:a.jsxRuntimeExports.jsx($.Presence,{present:o||c.open,children:a.jsxRuntimeExports.jsx(k.Slot,{scope:e.__scopeMenu,children:l.modal?a.jsxRuntimeExports.jsx(vt,{...s,ref:n}):a.jsxRuntimeExports.jsx(Et,{...s,ref:n})})})})}),vt=r.forwardRef((e,n)=>{const t=g(h,e.__scopeMenu),o=r.useRef(null),s=_.useComposedRefs(n,o);return r.useEffect(()=>{const c=o.current;if(c)return V.hideOthers(c)},[]),a.jsxRuntimeExports.jsx(re,{...e,ref:s,trapFocus:t.open,disableOutsidePointerEvents:t.open,disableOutsideScroll:!0,onFocusOutside:v.composeEventHandlers(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>t.onOpenChange(!1)})}),Et=r.forwardRef((e,n)=>{const t=g(h,e.__scopeMenu);return a.jsxRuntimeExports.jsx(re,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>t.onOpenChange(!1)})}),Ct=et("MenuContent.ScrollLock"),re=r.forwardRef((e,n)=>{const{__scopeMenu:t,loop:o=!1,trapFocus:s,onOpenAutoFocus:c,onCloseAutoFocus:l,disableOutsidePointerEvents:f,onEntryFocus:m,onEscapeKeyDown:p,onPointerDownOutside:d,onFocusOutside:u,onInteractOutside:x,onDismiss:C,disableOutsideScroll:R,...P}=e,T=g(h,t),y=G(h,t),He=L(t),Ue=Ee(t),ie=lt(t),[Ve,le]=r.useState(null),K=r.useRef(null),qe=_.useComposedRefs(n,K,T.onContentChange),H=r.useRef(0),U=r.useRef(""),Be=r.useRef(0),X=r.useRef(null),de=r.useRef("right"),z=r.useRef(0),$e=R?V.ReactRemoveScroll:r.Fragment,We=R?{as:Ct,allowPinchZoom:!0}:void 0,Ye=i=>{const b=U.current+i,M=ie().filter(E=>!E.disabled),O=document.activeElement,Z=M.find(E=>E.ref.current===O)?.textValue,J=M.map(E=>E.textValue),fe=Tt(J,b,Z),A=M.find(E=>E.textValue===fe)?.ref.current;(function E(pe){U.current=pe,window.clearTimeout(H.current),pe!==""&&(H.current=window.setTimeout(()=>E(""),1e3))})(b),A&&setTimeout(()=>A.focus())};r.useEffect(()=>()=>window.clearTimeout(H.current),[]),V.useFocusGuards();const I=r.useCallback(i=>de.current===X.current?.side&&At(i,X.current?.area),[]);return a.jsxRuntimeExports.jsx(Rt,{scope:t,searchRef:U,onItemEnter:r.useCallback(i=>{I(i)&&i.preventDefault()},[I]),onItemLeave:r.useCallback(i=>{I(i)||(K.current?.focus(),le(null))},[I]),onTriggerLeave:r.useCallback(i=>{I(i)&&i.preventDefault()},[I]),pointerGraceTimerRef:Be,onPointerGraceIntentChange:r.useCallback(i=>{X.current=i},[]),children:a.jsxRuntimeExports.jsx($e,{...We,children:a.jsxRuntimeExports.jsx(V.FocusScope,{asChild:!0,trapped:s,onMountAutoFocus:v.composeEventHandlers(c,i=>{i.preventDefault(),K.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:a.jsxRuntimeExports.jsx(Ze.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:f,onEscapeKeyDown:p,onPointerDownOutside:d,onFocusOutside:u,onInteractOutside:x,onDismiss:C,children:a.jsxRuntimeExports.jsx(W.Root,{asChild:!0,...Ue,dir:y.dir,orientation:"vertical",loop:o,currentTabStopId:Ve,onCurrentTabStopIdChange:le,onEntryFocus:v.composeEventHandlers(m,i=>{y.isUsingKeyboardRef.current||i.preventDefault()}),preventScrollOnEntryFocus:!0,children:a.jsxRuntimeExports.jsx(j.Content,{role:"menu","aria-orientation":"vertical","data-state":Ke(T.open),"data-radix-menu-content":"",dir:y.dir,...He,...P,ref:qe,style:{outline:"none",...P.style},onKeyDown:v.composeEventHandlers(P.onKeyDown,i=>{const M=i.target.closest("[data-radix-menu-content]")===i.currentTarget,O=i.ctrlKey||i.altKey||i.metaKey,Z=i.key.length===1;M&&(i.key==="Tab"&&i.preventDefault(),!O&&Z&&Ye(i.key));const J=K.current;if(i.target!==J||!ut.includes(i.key))return;i.preventDefault();const A=ie().filter(E=>!E.disabled).map(E=>E.ref.current);ve.includes(i.key)&&A.reverse(),bt(A)}),onBlur:v.composeEventHandlers(e.onBlur,i=>{i.currentTarget.contains(i.target)||(window.clearTimeout(H.current),U.current="")}),onPointerMove:v.composeEventHandlers(e.onPointerMove,N(i=>{const b=i.target,M=z.current!==i.clientX;if(i.currentTarget.contains(b)&&M){const O=i.clientX>z.current?"right":"left";de.current=O,z.current=i.clientX}}))})})})})})})});_e.displayName=h;var ht="MenuGroup",se=r.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e;return a.jsxRuntimeExports.jsx(w.Primitive.div,{role:"group",...o,ref:n})});se.displayName=ht;var gt="MenuLabel",je=r.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e;return a.jsxRuntimeExports.jsx(w.Primitive.div,{...o,ref:n})});je.displayName=gt;var q="MenuItem",xe="menu.itemSelect",Y=r.forwardRef((e,n)=>{const{disabled:t=!1,onSelect:o,...s}=e,c=r.useRef(null),l=G(q,e.__scopeMenu),f=oe(q,e.__scopeMenu),m=_.useComposedRefs(n,c),p=r.useRef(!1),d=()=>{const u=c.current;if(!t&&u){const x=new CustomEvent(xe,{bubbles:!0,cancelable:!0});u.addEventListener(xe,C=>o?.(C),{once:!0}),w.dispatchDiscreteCustomEvent(u,x),x.defaultPrevented?p.current=!1:l.onClose()}};return a.jsxRuntimeExports.jsx(Se,{...s,ref:m,disabled:t,onClick:v.composeEventHandlers(e.onClick,d),onPointerDown:u=>{e.onPointerDown?.(u),p.current=!0},onPointerUp:v.composeEventHandlers(e.onPointerUp,u=>{p.current||u.currentTarget?.click()}),onKeyDown:v.composeEventHandlers(e.onKeyDown,u=>{const x=f.searchRef.current!=="";t||x&&u.key===" "||Q.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})})});Y.displayName=q;var Se=r.forwardRef((e,n)=>{const{__scopeMenu:t,disabled:o=!1,textValue:s,...c}=e,l=oe(q,t),f=Ee(t),m=r.useRef(null),p=_.useComposedRefs(n,m),[d,u]=r.useState(!1),[x,C]=r.useState("");return r.useEffect(()=>{const R=m.current;R&&C((R.textContent??"").trim())},[c.children]),a.jsxRuntimeExports.jsx(k.ItemSlot,{scope:t,disabled:o,textValue:s??x,children:a.jsxRuntimeExports.jsx(W.Item,{asChild:!0,...f,focusable:!o,children:a.jsxRuntimeExports.jsx(w.Primitive.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...c,ref:p,onPointerMove:v.composeEventHandlers(e.onPointerMove,N(R=>{o?l.onItemLeave(R):(l.onItemEnter(R),R.defaultPrevented||R.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:v.composeEventHandlers(e.onPointerLeave,N(R=>l.onItemLeave(R))),onFocus:v.composeEventHandlers(e.onFocus,()=>u(!0)),onBlur:v.composeEventHandlers(e.onBlur,()=>u(!1))})})})}),Mt="MenuCheckboxItem",Pe=r.forwardRef((e,n)=>{const{checked:t=!1,onCheckedChange:o,...s}=e;return a.jsxRuntimeExports.jsx(Te,{scope:e.__scopeMenu,checked:t,children:a.jsxRuntimeExports.jsx(Y,{role:"menuitemcheckbox","aria-checked":B(t)?"mixed":t,...s,ref:n,"data-state":ae(t),onSelect:v.composeEventHandlers(s.onSelect,()=>o?.(B(t)?!0:!t),{checkForDefaultPrevented:!1})})})});Pe.displayName=Mt;var ye="MenuRadioGroup",[_t,jt]=S(ye,{value:void 0,onValueChange:()=>{}}),Ie=r.forwardRef((e,n)=>{const{value:t,onValueChange:o,...s}=e,c=ee.useCallbackRef(o);return a.jsxRuntimeExports.jsx(_t,{scope:e.__scopeMenu,value:t,onValueChange:c,children:a.jsxRuntimeExports.jsx(se,{...s,ref:n})})});Ie.displayName=ye;var be="MenuRadioItem",we=r.forwardRef((e,n)=>{const{value:t,...o}=e,s=jt(be,e.__scopeMenu),c=t===s.value;return a.jsxRuntimeExports.jsx(Te,{scope:e.__scopeMenu,checked:c,children:a.jsxRuntimeExports.jsx(Y,{role:"menuitemradio","aria-checked":c,...o,ref:n,"data-state":ae(c),onSelect:v.composeEventHandlers(o.onSelect,()=>s.onValueChange?.(t),{checkForDefaultPrevented:!1})})})});we.displayName=be;var ce="MenuItemIndicator",[Te,St]=S(ce,{checked:!1}),Oe=r.forwardRef((e,n)=>{const{__scopeMenu:t,forceMount:o,...s}=e,c=St(ce,t);return a.jsxRuntimeExports.jsx($.Presence,{present:o||B(c.checked)||c.checked===!0,children:a.jsxRuntimeExports.jsx(w.Primitive.span,{...s,ref:n,"data-state":ae(c.checked)})})});Oe.displayName=ce;var Pt="MenuSeparator",Ae=r.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e;return a.jsxRuntimeExports.jsx(w.Primitive.div,{role:"separator","aria-orientation":"horizontal",...o,ref:n})});Ae.displayName=Pt;var yt="MenuArrow",De=r.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e,s=L(t);return a.jsxRuntimeExports.jsx(j.Arrow,{...s,...o,ref:n})});De.displayName=yt;var ue="MenuSub",[It,ke]=S(ue),Ne=e=>{const{__scopeMenu:n,children:t,open:o=!1,onOpenChange:s}=e,c=g(ue,n),l=L(n),[f,m]=r.useState(null),[p,d]=r.useState(null),u=ee.useCallbackRef(s);return r.useEffect(()=>(c.open===!1&&u(!1),()=>u(!1)),[c.open,u]),a.jsxRuntimeExports.jsx(j.Root2,{...l,children:a.jsxRuntimeExports.jsx(Ce,{scope:n,open:o,onOpenChange:u,content:p,onContentChange:d,children:a.jsxRuntimeExports.jsx(It,{scope:n,contentId:me.useId(),triggerId:me.useId(),trigger:f,onTriggerChange:m,children:t})})})};Ne.displayName=ue;var D="MenuSubTrigger",Fe=r.forwardRef((e,n)=>{const t=g(D,e.__scopeMenu),o=G(D,e.__scopeMenu),s=ke(D,e.__scopeMenu),c=oe(D,e.__scopeMenu),l=r.useRef(null),{pointerGraceTimerRef:f,onPointerGraceIntentChange:m}=c,p={__scopeMenu:e.__scopeMenu},d=r.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return r.useEffect(()=>d,[d]),r.useEffect(()=>{const u=f.current;return()=>{window.clearTimeout(u),m(null)}},[f,m]),a.jsxRuntimeExports.jsx(te,{asChild:!0,...p,children:a.jsxRuntimeExports.jsx(Se,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":t.open,"aria-controls":s.contentId,"data-state":Ke(t.open),...e,ref:_.composeRefs(n,s.onTriggerChange),onClick:u=>{e.onClick?.(u),!(e.disabled||u.defaultPrevented)&&(u.currentTarget.focus(),t.open||t.onOpenChange(!0))},onPointerMove:v.composeEventHandlers(e.onPointerMove,N(u=>{c.onItemEnter(u),!u.defaultPrevented&&!e.disabled&&!t.open&&!l.current&&(c.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{t.onOpenChange(!0),d()},100))})),onPointerLeave:v.composeEventHandlers(e.onPointerLeave,N(u=>{d();const x=t.content?.getBoundingClientRect();if(x){const C=t.content?.dataset.side,R=C==="right",P=R?-5:5,T=x[R?"left":"right"],y=x[R?"right":"left"];c.onPointerGraceIntentChange({area:[{x:u.clientX+P,y:u.clientY},{x:T,y:x.top},{x:y,y:x.top},{x:y,y:x.bottom},{x:T,y:x.bottom}],side:C}),window.clearTimeout(f.current),f.current=window.setTimeout(()=>c.onPointerGraceIntentChange(null),300)}else{if(c.onTriggerLeave(u),u.defaultPrevented)return;c.onPointerGraceIntentChange(null)}})),onKeyDown:v.composeEventHandlers(e.onKeyDown,u=>{const x=c.searchRef.current!=="";e.disabled||x&&u.key===" "||at[o.dir].includes(u.key)&&(t.onOpenChange(!0),t.content?.focus(),u.preventDefault())})})})});Fe.displayName=D;var Le="MenuSubContent",Ge=r.forwardRef((e,n)=>{const t=ge(h,e.__scopeMenu),{forceMount:o=t.forceMount,...s}=e,c=g(h,e.__scopeMenu),l=G(h,e.__scopeMenu),f=ke(Le,e.__scopeMenu),m=r.useRef(null),p=_.useComposedRefs(n,m);return a.jsxRuntimeExports.jsx(k.Provider,{scope:e.__scopeMenu,children:a.jsxRuntimeExports.jsx($.Presence,{present:o||c.open,children:a.jsxRuntimeExports.jsx(k.Slot,{scope:e.__scopeMenu,children:a.jsxRuntimeExports.jsx(re,{id:f.contentId,"aria-labelledby":f.triggerId,...s,ref:p,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{l.isUsingKeyboardRef.current&&m.current?.focus(),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:v.composeEventHandlers(e.onFocusOutside,d=>{d.target!==f.trigger&&c.onOpenChange(!1)}),onEscapeKeyDown:v.composeEventHandlers(e.onEscapeKeyDown,d=>{l.onClose(),d.preventDefault()}),onKeyDown:v.composeEventHandlers(e.onKeyDown,d=>{const u=d.currentTarget.contains(d.target),x=it[l.dir].includes(d.key);u&&x&&(c.onOpenChange(!1),f.trigger?.focus(),d.preventDefault())})})})})})});Ge.displayName=Le;function Ke(e){return e?"open":"closed"}function B(e){return e==="indeterminate"}function ae(e){return B(e)?"indeterminate":e?"checked":"unchecked"}function bt(e){const n=document.activeElement;for(const t of e)if(t===n||(t.focus(),document.activeElement!==n))return}function wt(e,n){return e.map((t,o)=>e[(n+o)%e.length])}function Tt(e,n,t){const s=n.length>1&&Array.from(n).every(p=>p===n[0])?n[0]:n,c=t?e.indexOf(t):-1;let l=wt(e,Math.max(c,0));s.length===1&&(l=l.filter(p=>p!==t));const m=l.find(p=>p.toLowerCase().startsWith(s.toLowerCase()));return m!==t?m:void 0}function Ot(e,n){const{x:t,y:o}=e;let s=!1;for(let c=0,l=n.length-1;c<n.length;l=c++){const f=n[c],m=n[l],p=f.x,d=f.y,u=m.x,x=m.y;d>o!=x>o&&t<(u-p)*(o-d)/(x-d)+p&&(s=!s)}return s}function At(e,n){if(!n)return!1;const t={x:e.clientX,y:e.clientY};return Ot(t,n)}function N(e){return n=>n.pointerType==="mouse"?e(n):void 0}var Dt=he,kt=te,Nt=Me,Ft=_e,Lt=se,Gt=je,Kt=Y,Ht=Pe,Ut=Ie,Vt=we,qt=Oe,Bt=Ae,$t=De,Wt=Ne,Yt=Fe,Xt=Ge;exports.Anchor2=kt;exports.Arrow2=$t;exports.CheckboxItem=Ht;exports.Content2=Ft;exports.Group=Lt;exports.Item2=Kt;exports.ItemIndicator=qt;exports.Label=Gt;exports.Portal=Nt;exports.RadioGroup=Ut;exports.RadioItem=Vt;exports.Root3=Dt;exports.Separator=Bt;exports.Sub=Wt;exports.SubContent=Xt;exports.SubTrigger=Yt;exports.createMenuScope=ft;
|
package/dist/index-BWaO7kQK.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const m=require("react"),v=require("./index-MQ0c3ZX_.cjs");function b(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const c=b(m);function g(e,n,{checkForDefaultPrevented:t=!0}={}){return function(o){if(e?.(o),t===!1||!o.defaultPrevented)return n?.(o)}}var R=c[" useInsertionEffect ".trim().toString()]||v.useLayoutEffect2;function E({prop:e,defaultProp:n,onChange:t=()=>{},caller:r}){const[o,l,i]=C({defaultProp:n,onChange:t}),u=e!==void 0,a=u?e:o;{const s=c.useRef(e!==void 0);c.useEffect(()=>{const f=s.current;f!==u&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),s.current=u},[u,r])}const d=c.useCallback(s=>{if(u){const f=S(s)?s(e):s;f!==e&&i.current?.(f)}else l(s)},[u,e,l,i]);return[a,d]}function C({defaultProp:e,onChange:n}){const[t,r]=c.useState(e),o=c.useRef(t),l=c.useRef(n);return R(()=>{l.current=n},[n]),c.useEffect(()=>{o.current!==t&&(l.current?.(t),o.current=t)},[t,o]),[t,r,l]}function S(e){return typeof e=="function"}exports.composeEventHandlers=g;exports.useControllableState=E;
|
package/dist/index-BnkHpTJs.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";const l=require("react"),Q=require("./index-cwZN7ZY3.cjs"),T=require("./index-Da298sEl.cjs"),W=require("./index-_XxjJPRD.cjs"),N=require("./index-BWaO7kQK.cjs"),q=require("./index-CocSS1YK.cjs"),v=require("./index-CRWn-2fF.cjs"),X=require("./index-WIv2ndLu.cjs"),n=require("./jsx-runtime-BB_1_6y_.cjs");var d="Accordion",Z=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[y,ee,oe]=T.createCollection(d),[R]=Q.createContextScope(d,[oe,v.createCollapsibleScope]),k=v.createCollapsibleScope(),M=l.forwardRef((o,c)=>{const{type:e,...t}=o,i=t,r=t;return n.jsxRuntimeExports.jsx(y.Provider,{scope:o.__scopeAccordion,children:e==="multiple"?n.jsxRuntimeExports.jsx(ce,{...r,ref:c}):n.jsxRuntimeExports.jsx(ne,{...i,ref:c})})});M.displayName=d;var[H,re]=R(d),[V,te]=R(d,{collapsible:!1}),ne=l.forwardRef((o,c)=>{const{value:e,defaultValue:t,onValueChange:i=()=>{},collapsible:r=!1,...a}=o,[s,u]=N.useControllableState({prop:e,defaultProp:t??"",onChange:i,caller:d});return n.jsxRuntimeExports.jsx(H,{scope:o.__scopeAccordion,value:l.useMemo(()=>s?[s]:[],[s]),onItemOpen:u,onItemClose:l.useCallback(()=>r&&u(""),[r,u]),children:n.jsxRuntimeExports.jsx(V,{scope:o.__scopeAccordion,collapsible:r,children:n.jsxRuntimeExports.jsx($,{...a,ref:c})})})}),ce=l.forwardRef((o,c)=>{const{value:e,defaultValue:t,onValueChange:i=()=>{},...r}=o,[a,s]=N.useControllableState({prop:e,defaultProp:t??[],onChange:i,caller:d}),u=l.useCallback(f=>s((x=[])=>[...x,f]),[s]),m=l.useCallback(f=>s((x=[])=>x.filter(b=>b!==f)),[s]);return n.jsxRuntimeExports.jsx(H,{scope:o.__scopeAccordion,value:a,onItemOpen:u,onItemClose:m,children:n.jsxRuntimeExports.jsx(V,{scope:o.__scopeAccordion,collapsible:!0,children:n.jsxRuntimeExports.jsx($,{...r,ref:c})})})}),[ie,j]=R(d),$=l.forwardRef((o,c)=>{const{__scopeAccordion:e,disabled:t,dir:i,orientation:r="vertical",...a}=o,s=l.useRef(null),u=W.useComposedRefs(s,c),m=ee(e),x=T.useDirection(i)==="ltr",b=N.composeEventHandlers(o.onKeyDown,C=>{if(!Z.includes(C.key))return;const F=C.target,I=m().filter(P=>!P.ref.current?.disabled),A=I.findIndex(P=>P.ref.current===F),O=I.length;if(A===-1)return;C.preventDefault();let p=A;const h=0,E=O-1,_=()=>{p=A+1,p>E&&(p=h)},w=()=>{p=A-1,p<h&&(p=E)};switch(C.key){case"Home":p=h;break;case"End":p=E;break;case"ArrowRight":r==="horizontal"&&(x?_():w());break;case"ArrowDown":r==="vertical"&&_();break;case"ArrowLeft":r==="horizontal"&&(x?w():_());break;case"ArrowUp":r==="vertical"&&w();break}const J=p%O;I[J].ref.current?.focus()});return n.jsxRuntimeExports.jsx(ie,{scope:e,disabled:t,direction:i,orientation:r,children:n.jsxRuntimeExports.jsx(y.Slot,{scope:e,children:n.jsxRuntimeExports.jsx(q.Primitive.div,{...a,"data-orientation":r,ref:u,onKeyDown:t?void 0:b})})})}),g="AccordionItem",[se,D]=R(g),K=l.forwardRef((o,c)=>{const{__scopeAccordion:e,value:t,...i}=o,r=j(g,e),a=re(g,e),s=k(e),u=X.useId(),m=t&&a.value.includes(t)||!1,f=r.disabled||o.disabled;return n.jsxRuntimeExports.jsx(se,{scope:e,open:m,disabled:f,triggerId:u,children:n.jsxRuntimeExports.jsx(v.Root,{"data-orientation":r.orientation,"data-state":B(m),...s,...i,ref:c,disabled:f,open:m,onOpenChange:x=>{x?a.onItemOpen(t):a.onItemClose(t)}})})});K.displayName=g;var L="AccordionHeader",z=l.forwardRef((o,c)=>{const{__scopeAccordion:e,...t}=o,i=j(d,e),r=D(L,e);return n.jsxRuntimeExports.jsx(q.Primitive.h3,{"data-orientation":i.orientation,"data-state":B(r.open),"data-disabled":r.disabled?"":void 0,...t,ref:c})});z.displayName=L;var S="AccordionTrigger",G=l.forwardRef((o,c)=>{const{__scopeAccordion:e,...t}=o,i=j(d,e),r=D(S,e),a=te(S,e),s=k(e);return n.jsxRuntimeExports.jsx(y.ItemSlot,{scope:e,children:n.jsxRuntimeExports.jsx(v.Trigger,{"aria-disabled":r.open&&!a.collapsible||void 0,"data-orientation":i.orientation,id:r.triggerId,...s,...t,ref:c})})});G.displayName=S;var U="AccordionContent",Y=l.forwardRef((o,c)=>{const{__scopeAccordion:e,...t}=o,i=j(d,e),r=D(U,e),a=k(e);return n.jsxRuntimeExports.jsx(v.Content,{role:"region","aria-labelledby":r.triggerId,"data-orientation":i.orientation,...a,...t,ref:c,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...o.style}})});Y.displayName=U;function B(o){return o?"open":"closed"}var ae=M,le=K,de=z,ue=G,pe=Y;exports.Content2=pe;exports.Header=de;exports.Item=le;exports.Root2=ae;exports.Trigger2=ue;
|
package/dist/index-C0UREtMP.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import * as n from "react";
|
|
2
|
-
import { u as m } from "./index-CCKe-Mpx.js";
|
|
3
|
-
function w(e, r, { checkForDefaultPrevented: t = !0 } = {}) {
|
|
4
|
-
return function(o) {
|
|
5
|
-
if (e?.(o), t === !1 || !o.defaultPrevented)
|
|
6
|
-
return r?.(o);
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
|
-
var v = n[" useInsertionEffect ".trim().toString()] || m;
|
|
10
|
-
function S({
|
|
11
|
-
prop: e,
|
|
12
|
-
defaultProp: r,
|
|
13
|
-
onChange: t = () => {
|
|
14
|
-
},
|
|
15
|
-
caller: l
|
|
16
|
-
}) {
|
|
17
|
-
const [o, u, i] = R({
|
|
18
|
-
defaultProp: r,
|
|
19
|
-
onChange: t
|
|
20
|
-
}), c = e !== void 0, a = c ? e : o;
|
|
21
|
-
{
|
|
22
|
-
const s = n.useRef(e !== void 0);
|
|
23
|
-
n.useEffect(() => {
|
|
24
|
-
const f = s.current;
|
|
25
|
-
f !== c && console.warn(
|
|
26
|
-
`${l} is changing from ${f ? "controlled" : "uncontrolled"} to ${c ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
|
|
27
|
-
), s.current = c;
|
|
28
|
-
}, [c, l]);
|
|
29
|
-
}
|
|
30
|
-
const d = n.useCallback(
|
|
31
|
-
(s) => {
|
|
32
|
-
if (c) {
|
|
33
|
-
const f = E(s) ? s(e) : s;
|
|
34
|
-
f !== e && i.current?.(f);
|
|
35
|
-
} else
|
|
36
|
-
u(s);
|
|
37
|
-
},
|
|
38
|
-
[c, e, u, i]
|
|
39
|
-
);
|
|
40
|
-
return [a, d];
|
|
41
|
-
}
|
|
42
|
-
function R({
|
|
43
|
-
defaultProp: e,
|
|
44
|
-
onChange: r
|
|
45
|
-
}) {
|
|
46
|
-
const [t, l] = n.useState(e), o = n.useRef(t), u = n.useRef(r);
|
|
47
|
-
return v(() => {
|
|
48
|
-
u.current = r;
|
|
49
|
-
}, [r]), n.useEffect(() => {
|
|
50
|
-
o.current !== t && (u.current?.(t), o.current = t);
|
|
51
|
-
}, [t, o]), [t, l, u];
|
|
52
|
-
}
|
|
53
|
-
function E(e) {
|
|
54
|
-
return typeof e == "function";
|
|
55
|
-
}
|
|
56
|
-
export {
|
|
57
|
-
w as c,
|
|
58
|
-
S as u
|
|
59
|
-
};
|
package/dist/index-C2P2kXMc.cjs
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";const oe=require("react"),ge=require("./index-_XxjJPRD.cjs"),ye=require("./index-CocSS1YK.cjs"),G=require("./index-CzY-WZXL.cjs"),be=require("./jsx-runtime-BB_1_6y_.cjs");function Ee(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const u=Ee(oe);var j="focusScope.autoFocusOnMount",_="focusScope.autoFocusOnUnmount",z={bubbles:!1,cancelable:!0},Se="FocusScope",ce=u.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:c,onUnmountAutoFocus:i,...s}=e,[a,S]=u.useState(null),b=G.useCallbackRef(c),g=G.useCallbackRef(i),f=u.useRef(null),v=ge.useComposedRefs(t,o=>S(o)),h=u.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;u.useEffect(()=>{if(r){let o=function(p){if(h.paused||!a)return;const y=p.target;a.contains(y)?f.current=y:k(f.current,{select:!0})},l=function(p){if(h.paused||!a)return;const y=p.relatedTarget;y!==null&&(a.contains(y)||k(f.current,{select:!0}))},d=function(p){if(document.activeElement===document.body)for(const E of p)E.removedNodes.length>0&&k(a)};document.addEventListener("focusin",o),document.addEventListener("focusout",l);const m=new MutationObserver(d);return a&&m.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",o),document.removeEventListener("focusout",l),m.disconnect()}}},[r,a,h.paused]),u.useEffect(()=>{if(a){Q.add(h);const o=document.activeElement;if(!a.contains(o)){const d=new CustomEvent(j,z);a.addEventListener(j,b),a.dispatchEvent(d),d.defaultPrevented||(we(Te(ue(a)),{select:!0}),document.activeElement===o&&k(a))}return()=>{a.removeEventListener(j,b),setTimeout(()=>{const d=new CustomEvent(_,z);a.addEventListener(_,g),a.dispatchEvent(d),d.defaultPrevented||k(o??document.body,{select:!0}),a.removeEventListener(_,g),Q.remove(h)},0)}}},[a,b,g,h]);const w=u.useCallback(o=>{if(!n&&!r||h.paused)return;const l=o.key==="Tab"&&!o.altKey&&!o.ctrlKey&&!o.metaKey,d=document.activeElement;if(l&&d){const m=o.currentTarget,[p,y]=Ce(m);p&&y?!o.shiftKey&&d===y?(o.preventDefault(),n&&k(p,{select:!0})):o.shiftKey&&d===p&&(o.preventDefault(),n&&k(y,{select:!0})):d===m&&o.preventDefault()}},[n,r,h.paused]);return be.jsxRuntimeExports.jsx(ye.Primitive.div,{tabIndex:-1,...s,ref:v,onKeyDown:w})});ce.displayName=Se;function we(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(k(r,{select:t}),document.activeElement!==n)return}function Ce(e){const t=ue(e),n=Z(t,e),r=Z(t.reverse(),e);return[n,r]}function ue(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const c=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||c?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Z(e,t){for(const n of e)if(!Re(n,{upTo:t}))return n}function Re(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function ke(e){return e instanceof HTMLInputElement&&"select"in e}function k(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&ke(e)&&t&&e.select()}}var Q=Ae();function Ae(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=$(e,t),e.unshift(t)},remove(t){e=$(e,t),e[0]?.resume()}}}function $(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Te(e){return e.filter(t=>t.tagName!=="A")}var U=0;function Oe(){u.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??J()),document.body.insertAdjacentElement("beforeend",e[1]??J()),U++,()=>{U===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),U--}},[])}function J(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var C=function(){return C=Object.assign||function(t){for(var n,r=1,c=arguments.length;r<c;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},C.apply(this,arguments)};function ie(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,r=Object.getOwnPropertySymbols(e);c<r.length;c++)t.indexOf(r[c])<0&&Object.prototype.propertyIsEnumerable.call(e,r[c])&&(n[r[c]]=e[r[c]]);return n}function Ne(e,t,n){if(n||arguments.length===2)for(var r=0,c=t.length,i;r<c;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var W="right-scroll-bar-position",D="width-before-scroll-bar",Me="with-scroll-bars-hidden",Fe="--removed-body-scroll-bar-size";function K(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Pe(e,t){var n=oe.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var c=n.value;c!==r&&(n.value=r,n.callback(r,c))}}}})[0];return n.callback=t,n.facade}var Le=typeof window<"u"?u.useLayoutEffect:u.useEffect,ee=new WeakMap;function xe(e,t){var n=Pe(null,function(r){return e.forEach(function(c){return K(c,r)})});return Le(function(){var r=ee.get(n);if(r){var c=new Set(r),i=new Set(e),s=n.current;c.forEach(function(a){i.has(a)||K(a,null)}),i.forEach(function(a){c.has(a)||K(a,s)})}ee.set(n,e)},[e]),n}function Ie(e){return e}function We(e,t){t===void 0&&(t=Ie);var n=[],r=!1,c={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var s=t(i,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(i){for(r=!0;n.length;){var s=n;n=[],s.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(i),s=n}var S=function(){var g=s;s=[],g.forEach(i)},b=function(){return Promise.resolve().then(S)};b(),n={push:function(g){s.push(g),b()},filter:function(g){return s=s.filter(g),n}}}};return c}function De(e){e===void 0&&(e={});var t=We(null);return t.options=C({async:!0,ssr:!1},e),t}var le=function(e){var t=e.sideCar,n=ie(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return u.createElement(r,C({},n))};le.isSideCarExport=!0;function Be(e,t){return e.useMedium(t),le}var se=De(),H=function(){},B=u.forwardRef(function(e,t){var n=u.useRef(null),r=u.useState({onScrollCapture:H,onWheelCapture:H,onTouchMoveCapture:H}),c=r[0],i=r[1],s=e.forwardProps,a=e.children,S=e.className,b=e.removeScrollBar,g=e.enabled,f=e.shards,v=e.sideCar,h=e.noRelative,w=e.noIsolation,o=e.inert,l=e.allowPinchZoom,d=e.as,m=d===void 0?"div":d,p=e.gapMode,y=ie(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=v,A=xe([n,t]),R=C(C({},y),c);return u.createElement(u.Fragment,null,g&&u.createElement(E,{sideCar:se,removeScrollBar:b,shards:f,noRelative:h,noIsolation:w,inert:o,setCallbacks:i,allowPinchZoom:!!l,lockRef:n,gapMode:p}),s?u.cloneElement(u.Children.only(a),C(C({},R),{ref:A})):u.createElement(m,C({},R,{className:S,ref:A}),a))});B.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};B.classNames={fullWidth:D,zeroRight:W};var je=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function _e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=je();return t&&e.setAttribute("nonce",t),e}function Ue(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ke(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var He=function(){var e=0,t=null;return{add:function(n){e==0&&(t=_e())&&(Ue(t,n),Ke(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ve=function(){var e=He();return function(t,n){u.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},fe=function(){var e=Ve(),t=function(n){var r=n.styles,c=n.dynamic;return e(r,c),null};return t},Xe={left:0,top:0,right:0,gap:0},V=function(e){return parseInt(e||"",10)||0},Ye=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],c=t[e==="padding"?"paddingRight":"marginRight"];return[V(n),V(r),V(c)]},qe=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Xe;var t=Ye(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Ge=fe(),M="data-scroll-locked",ze=function(e,t,n,r){var c=e.left,i=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
2
|
-
.`.concat(Me,` {
|
|
3
|
-
overflow: hidden `).concat(r,`;
|
|
4
|
-
padding-right: `).concat(a,"px ").concat(r,`;
|
|
5
|
-
}
|
|
6
|
-
body[`).concat(M,`] {
|
|
7
|
-
overflow: hidden `).concat(r,`;
|
|
8
|
-
overscroll-behavior: contain;
|
|
9
|
-
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
10
|
-
padding-left: `.concat(c,`px;
|
|
11
|
-
padding-top: `).concat(i,`px;
|
|
12
|
-
padding-right: `).concat(s,`px;
|
|
13
|
-
margin-left:0;
|
|
14
|
-
margin-top:0;
|
|
15
|
-
margin-right: `).concat(a,"px ").concat(r,`;
|
|
16
|
-
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.`).concat(W,` {
|
|
20
|
-
right: `).concat(a,"px ").concat(r,`;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.`).concat(D,` {
|
|
24
|
-
margin-right: `).concat(a,"px ").concat(r,`;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.`).concat(W," .").concat(W,` {
|
|
28
|
-
right: 0 `).concat(r,`;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.`).concat(D," .").concat(D,` {
|
|
32
|
-
margin-right: 0 `).concat(r,`;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
body[`).concat(M,`] {
|
|
36
|
-
`).concat(Fe,": ").concat(a,`px;
|
|
37
|
-
}
|
|
38
|
-
`)},te=function(){var e=parseInt(document.body.getAttribute(M)||"0",10);return isFinite(e)?e:0},Ze=function(){u.useEffect(function(){return document.body.setAttribute(M,(te()+1).toString()),function(){var e=te()-1;e<=0?document.body.removeAttribute(M):document.body.setAttribute(M,e.toString())}},[])},Qe=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,c=r===void 0?"margin":r;Ze();var i=u.useMemo(function(){return qe(c)},[c]);return u.createElement(Ge,{styles:ze(i,!t,c,n?"":"!important")})},Y=!1;if(typeof window<"u")try{var P=Object.defineProperty({},"passive",{get:function(){return Y=!0,!0}});window.addEventListener("test",P,P),window.removeEventListener("test",P,P)}catch{Y=!1}var T=Y?{passive:!1}:!1,$e=function(e){return e.tagName==="TEXTAREA"},de=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!$e(e)&&n[t]==="visible")},Je=function(e){return de(e,"overflowY")},et=function(e){return de(e,"overflowX")},ne=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var c=ve(e,r);if(c){var i=he(e,r),s=i[1],a=i[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},tt=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},nt=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},ve=function(e,t){return e==="v"?Je(t):et(t)},he=function(e,t){return e==="v"?tt(t):nt(t)},rt=function(e,t){return e==="h"&&t==="rtl"?-1:1},at=function(e,t,n,r,c){var i=rt(e,window.getComputedStyle(t).direction),s=i*r,a=n.target,S=t.contains(a),b=!1,g=s>0,f=0,v=0;do{if(!a)break;var h=he(e,a),w=h[0],o=h[1],l=h[2],d=o-l-i*w;(w||d)&&ve(e,a)&&(f+=d,v+=w);var m=a.parentNode;a=m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE?m.host:m}while(!S&&a!==document.body||S&&(t.contains(a)||t===a));return(g&&Math.abs(f)<1||!g&&Math.abs(v)<1)&&(b=!0),b},L=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},re=function(e){return[e.deltaX,e.deltaY]},ae=function(e){return e&&"current"in e?e.current:e},ot=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ct=function(e){return`
|
|
39
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
-
`)},ut=0,O=[];function it(e){var t=u.useRef([]),n=u.useRef([0,0]),r=u.useRef(),c=u.useState(ut++)[0],i=u.useState(fe)[0],s=u.useRef(e);u.useEffect(function(){s.current=e},[e]),u.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(c));var o=Ne([e.lockRef.current],(e.shards||[]).map(ae),!0).filter(Boolean);return o.forEach(function(l){return l.classList.add("allow-interactivity-".concat(c))}),function(){document.body.classList.remove("block-interactivity-".concat(c)),o.forEach(function(l){return l.classList.remove("allow-interactivity-".concat(c))})}}},[e.inert,e.lockRef.current,e.shards]);var a=u.useCallback(function(o,l){if("touches"in o&&o.touches.length===2||o.type==="wheel"&&o.ctrlKey)return!s.current.allowPinchZoom;var d=L(o),m=n.current,p="deltaX"in o?o.deltaX:m[0]-d[0],y="deltaY"in o?o.deltaY:m[1]-d[1],E,A=o.target,R=Math.abs(p)>Math.abs(y)?"h":"v";if("touches"in o&&R==="h"&&A.type==="range")return!1;var F=ne(R,A);if(!F)return!0;if(F?E=R:(E=R==="v"?"h":"v",F=ne(R,A)),!F)return!1;if(!r.current&&"changedTouches"in o&&(p||y)&&(r.current=E),!E)return!0;var q=r.current||E;return at(q,l,o,q==="h"?p:y)},[]),S=u.useCallback(function(o){var l=o;if(!(!O.length||O[O.length-1]!==i)){var d="deltaY"in l?re(l):L(l),m=t.current.filter(function(E){return E.name===l.type&&(E.target===l.target||l.target===E.shadowParent)&&ot(E.delta,d)})[0];if(m&&m.should){l.cancelable&&l.preventDefault();return}if(!m){var p=(s.current.shards||[]).map(ae).filter(Boolean).filter(function(E){return E.contains(l.target)}),y=p.length>0?a(l,p[0]):!s.current.noIsolation;y&&l.cancelable&&l.preventDefault()}}},[]),b=u.useCallback(function(o,l,d,m){var p={name:o,delta:l,target:d,should:m,shadowParent:lt(d)};t.current.push(p),setTimeout(function(){t.current=t.current.filter(function(y){return y!==p})},1)},[]),g=u.useCallback(function(o){n.current=L(o),r.current=void 0},[]),f=u.useCallback(function(o){b(o.type,re(o),o.target,a(o,e.lockRef.current))},[]),v=u.useCallback(function(o){b(o.type,L(o),o.target,a(o,e.lockRef.current))},[]);u.useEffect(function(){return O.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:v}),document.addEventListener("wheel",S,T),document.addEventListener("touchmove",S,T),document.addEventListener("touchstart",g,T),function(){O=O.filter(function(o){return o!==i}),document.removeEventListener("wheel",S,T),document.removeEventListener("touchmove",S,T),document.removeEventListener("touchstart",g,T)}},[]);var h=e.removeScrollBar,w=e.inert;return u.createElement(u.Fragment,null,w?u.createElement(i,{styles:ct(c)}):null,h?u.createElement(Qe,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function lt(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const st=Be(se,it);var me=u.forwardRef(function(e,t){return u.createElement(B,C({},e,{ref:t,sideCar:st}))});me.classNames=B.classNames;var ft=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},N=new WeakMap,x=new WeakMap,I={},X=0,pe=function(e){return e&&(e.host||pe(e.parentNode))},dt=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=pe(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},vt=function(e,t,n,r){var c=dt(t,Array.isArray(e)?e:[e]);I[n]||(I[n]=new WeakMap);var i=I[n],s=[],a=new Set,S=new Set(c),b=function(f){!f||a.has(f)||(a.add(f),b(f.parentNode))};c.forEach(b);var g=function(f){!f||S.has(f)||Array.prototype.forEach.call(f.children,function(v){if(a.has(v))g(v);else try{var h=v.getAttribute(r),w=h!==null&&h!=="false",o=(N.get(v)||0)+1,l=(i.get(v)||0)+1;N.set(v,o),i.set(v,l),s.push(v),o===1&&w&&x.set(v,!0),l===1&&v.setAttribute(n,"true"),w||v.setAttribute(r,"true")}catch(d){console.error("aria-hidden: cannot operate on ",v,d)}})};return g(t),a.clear(),X++,function(){s.forEach(function(f){var v=N.get(f)-1,h=i.get(f)-1;N.set(f,v),i.set(f,h),v||(x.has(f)||f.removeAttribute(r),x.delete(f)),h||f.removeAttribute(n)}),X--,X||(N=new WeakMap,N=new WeakMap,x=new WeakMap,I={})}},ht=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),c=ft(e);return c?(r.push.apply(r,Array.from(c.querySelectorAll("[aria-live], script"))),vt(r,c,n,"aria-hidden")):function(){return null}};exports.FocusScope=ce;exports.ReactRemoveScroll=me;exports.hideOthers=ht;exports.useFocusGuards=Oe;
|
package/dist/index-CC6DBo2g.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";const B=require("react"),f=require("./index-BWaO7kQK.cjs"),P=require("./index-Da298sEl.cjs"),Y=require("./index-_XxjJPRD.cjs"),z=require("./index-cwZN7ZY3.cjs"),V=require("./index-WIv2ndLu.cjs"),D=require("./index-CocSS1YK.cjs"),J=require("./index-CzY-WZXL.cjs"),p=require("./jsx-runtime-BB_1_6y_.cjs");function Q(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const t=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(o,n,t.get?t:{enumerable:!0,get:()=>e[n]})}}return o.default=e,Object.freeze(o)}const c=Q(B);var y="rovingFocusGroup.onEntryFocus",W={bubbles:!1,cancelable:!0},b="RovingFocusGroup",[j,G,X]=P.createCollection(b),[Z,ee]=z.createContextScope(b,[X]),[te,oe]=Z(b),N=c.forwardRef((e,o)=>p.jsxRuntimeExports.jsx(j.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsxRuntimeExports.jsx(j.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsxRuntimeExports.jsx(ne,{...e,ref:o})})}));N.displayName=b;var ne=c.forwardRef((e,o)=>{const{__scopeRovingFocusGroup:n,orientation:t,loop:F=!1,dir:S,currentTabStopId:v,defaultCurrentTabStopId:T,onCurrentTabStopIdChange:w,onEntryFocus:m,preventScrollOnEntryFocus:u=!1,...I}=e,R=c.useRef(null),g=Y.useComposedRefs(o,R),x=P.useDirection(S),[E,r]=f.useControllableState({prop:v,defaultProp:T??null,onChange:w,caller:b}),[a,C]=c.useState(!1),i=J.useCallbackRef(m),l=G(n),_=c.useRef(!1),[q,A]=c.useState(0);return c.useEffect(()=>{const s=R.current;if(s)return s.addEventListener(y,i),()=>s.removeEventListener(y,i)},[i]),p.jsxRuntimeExports.jsx(te,{scope:n,orientation:t,dir:x,loop:F,currentTabStopId:E,onItemFocus:c.useCallback(s=>r(s),[r]),onItemShiftTab:c.useCallback(()=>C(!0),[]),onFocusableItemAdd:c.useCallback(()=>A(s=>s+1),[]),onFocusableItemRemove:c.useCallback(()=>A(s=>s-1),[]),children:p.jsxRuntimeExports.jsx(D.Primitive.div,{tabIndex:a||q===0?-1:0,"data-orientation":t,...I,ref:g,style:{outline:"none",...e.style},onMouseDown:f.composeEventHandlers(e.onMouseDown,()=>{_.current=!0}),onFocus:f.composeEventHandlers(e.onFocus,s=>{const L=!_.current;if(s.target===s.currentTarget&&L&&!a){const O=new CustomEvent(y,W);if(s.currentTarget.dispatchEvent(O),!O.defaultPrevented){const h=l().filter(d=>d.focusable),U=h.find(d=>d.active),H=h.find(d=>d.id===E),$=[U,H,...h].filter(Boolean).map(d=>d.ref.current);k($,u)}}_.current=!1}),onBlur:f.composeEventHandlers(e.onBlur,()=>C(!1))})})}),K="RovingFocusGroupItem",M=c.forwardRef((e,o)=>{const{__scopeRovingFocusGroup:n,focusable:t=!0,active:F=!1,tabStopId:S,children:v,...T}=e,w=V.useId(),m=S||w,u=oe(K,n),I=u.currentTabStopId===m,R=G(n),{onFocusableItemAdd:g,onFocusableItemRemove:x,currentTabStopId:E}=u;return c.useEffect(()=>{if(t)return g(),()=>x()},[t,g,x]),p.jsxRuntimeExports.jsx(j.ItemSlot,{scope:n,id:m,focusable:t,active:F,children:p.jsxRuntimeExports.jsx(D.Primitive.span,{tabIndex:I?0:-1,"data-orientation":u.orientation,...T,ref:o,onMouseDown:f.composeEventHandlers(e.onMouseDown,r=>{t?u.onItemFocus(m):r.preventDefault()}),onFocus:f.composeEventHandlers(e.onFocus,()=>u.onItemFocus(m)),onKeyDown:f.composeEventHandlers(e.onKeyDown,r=>{if(r.key==="Tab"&&r.shiftKey){u.onItemShiftTab();return}if(r.target!==r.currentTarget)return;const a=ce(r,u.orientation,u.dir);if(a!==void 0){if(r.metaKey||r.ctrlKey||r.altKey||r.shiftKey)return;r.preventDefault();let i=R().filter(l=>l.focusable).map(l=>l.ref.current);if(a==="last")i.reverse();else if(a==="prev"||a==="next"){a==="prev"&&i.reverse();const l=i.indexOf(r.currentTarget);i=u.loop?ue(i,l+1):i.slice(l+1)}setTimeout(()=>k(i))}}),children:typeof v=="function"?v({isCurrentTabStop:I,hasTabStop:E!=null}):v})})});M.displayName=K;var re={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function se(e,o){return o!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function ce(e,o,n){const t=se(e.key,n);if(!(o==="vertical"&&["ArrowLeft","ArrowRight"].includes(t))&&!(o==="horizontal"&&["ArrowUp","ArrowDown"].includes(t)))return re[t]}function k(e,o=!1){const n=document.activeElement;for(const t of e)if(t===n||(t.focus({preventScroll:o}),document.activeElement!==n))return}function ue(e,o){return e.map((n,t)=>e[(o+t)%e.length])}var ie=N,ae=M;exports.Item=ae;exports.Root=ie;exports.createRovingFocusGroupScope=ee;
|
package/dist/index-CRWn-2fF.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";const w=require("react"),T=require("./index-BWaO7kQK.cjs"),A=require("./index-cwZN7ZY3.cjs"),I=require("./index-MQ0c3ZX_.cjs"),$=require("./index-_XxjJPRD.cjs"),m=require("./index-CocSS1YK.cjs"),D=require("./index-DE3jjVoC.cjs"),M=require("./index-WIv2ndLu.cjs"),c=require("./jsx-runtime-BB_1_6y_.cjs");function k(e){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(s,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return s.default=e,Object.freeze(s)}const r=k(w);var f="Collapsible",[L,F]=A.createContextScope(f),[B,g]=L(f),q=r.forwardRef((e,s)=>{const{__scopeCollapsible:t,open:n,defaultOpen:o,disabled:l,onOpenChange:a,...b}=e,[u,d]=T.useControllableState({prop:n,defaultProp:o??!1,onChange:a,caller:f});return c.jsxRuntimeExports.jsx(B,{scope:t,disabled:l,contentId:M.useId(),open:u,onOpenToggle:r.useCallback(()=>d(x=>!x),[d]),children:c.jsxRuntimeExports.jsx(m.Primitive.div,{"data-state":j(u),"data-disabled":l?"":void 0,...b,ref:s})})});q.displayName=f;var S="CollapsibleTrigger",R=r.forwardRef((e,s)=>{const{__scopeCollapsible:t,...n}=e,o=g(S,t);return c.jsxRuntimeExports.jsx(m.Primitive.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":j(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...n,ref:s,onClick:T.composeEventHandlers(e.onClick,o.onOpenToggle)})});R.displayName=S;var v="CollapsibleContent",h=r.forwardRef((e,s)=>{const{forceMount:t,...n}=e,o=g(v,e.__scopeCollapsible);return c.jsxRuntimeExports.jsx(D.Presence,{present:t||o.open,children:({present:l})=>c.jsxRuntimeExports.jsx(G,{...n,ref:s,present:l})})});h.displayName=v;var G=r.forwardRef((e,s)=>{const{__scopeCollapsible:t,present:n,children:o,...l}=e,a=g(v,t),[b,u]=r.useState(n),d=r.useRef(null),x=$.useComposedRefs(s,d),y=r.useRef(0),P=y.current,E=r.useRef(0),N=E.current,C=a.open||b,_=r.useRef(C),p=r.useRef(void 0);return r.useEffect(()=>{const i=requestAnimationFrame(()=>_.current=!1);return()=>cancelAnimationFrame(i)},[]),I.useLayoutEffect2(()=>{const i=d.current;if(i){p.current=p.current||{transitionDuration:i.style.transitionDuration,animationName:i.style.animationName},i.style.transitionDuration="0s",i.style.animationName="none";const O=i.getBoundingClientRect();y.current=O.height,E.current=O.width,_.current||(i.style.transitionDuration=p.current.transitionDuration,i.style.animationName=p.current.animationName),u(n)}},[a.open,n]),c.jsxRuntimeExports.jsx(m.Primitive.div,{"data-state":j(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!C,...l,ref:x,style:{"--radix-collapsible-content-height":P?`${P}px`:void 0,"--radix-collapsible-content-width":N?`${N}px`:void 0,...e.style},children:C&&o})});function j(e){return e?"open":"closed"}var z=q,H=R,J=h;exports.CollapsibleContent=h;exports.CollapsibleTrigger=R;exports.Content=J;exports.Root=z;exports.Trigger=H;exports.createCollapsibleScope=F;
|
package/dist/index-Ca99LLZF.cjs
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";const V=require("react"),g=require("./index-BWaO7kQK.cjs"),D=require("./index-_XxjJPRD.cjs"),O=require("./index-cwZN7ZY3.cjs"),j=require("./index-WIv2ndLu.cjs"),B=require("./index-BaCYnOIG.cjs"),E=require("./index-C2P2kXMc.cjs"),Z=require("./index-CBuLZ39k.cjs"),y=require("./index-DE3jjVoC.cjs"),m=require("./index-CocSS1YK.cjs"),a=require("./jsx-runtime-BB_1_6y_.cjs");function z(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,r.get?r:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const i=z(V);function K(e){const t=U(e),o=i.forwardRef((r,n)=>{const{children:s,...c}=r,l=i.Children.toArray(s),u=l.find(J);if(u){const p=u.props.children,x=l.map(R=>R===u?i.Children.count(p)>1?i.Children.only(null):i.isValidElement(p)?p.props.children:null:R);return a.jsxRuntimeExports.jsx(t,{...c,ref:n,children:i.isValidElement(p)?i.cloneElement(p,void 0,x):null})}return a.jsxRuntimeExports.jsx(t,{...c,ref:n,children:s})});return o.displayName=`${e}.Slot`,o}function U(e){const t=i.forwardRef((o,r)=>{const{children:n,...s}=o;if(i.isValidElement(n)){const c=X(n),l=Q(s,n.props);return n.type!==i.Fragment&&(l.ref=r?D.composeRefs(r,c):c),i.cloneElement(n,l)}return i.Children.count(n)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Y=Symbol("radix.slottable");function J(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Y}function Q(e,t){const o={...t};for(const r in t){const n=e[r],s=t[r];/^on[A-Z]/.test(r)?n&&s?o[r]=(...l)=>{const u=s(...l);return n(...l),u}:n&&(o[r]=n):r==="style"?o[r]={...n,...s}:r==="className"&&(o[r]=[n,s].filter(Boolean).join(" "))}return{...e,...o}}function X(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var C="Dialog",[I]=O.createContextScope(C),[ee,d]=I(C),N=e=>{const{__scopeDialog:t,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:c=!0}=e,l=i.useRef(null),u=i.useRef(null),[p,x]=g.useControllableState({prop:r,defaultProp:n??!1,onChange:s,caller:C});return a.jsxRuntimeExports.jsx(ee,{scope:t,triggerRef:l,contentRef:u,contentId:j.useId(),titleId:j.useId(),descriptionId:j.useId(),open:p,onOpenChange:x,onOpenToggle:i.useCallback(()=>x(R=>!R),[x]),modal:c,children:o})};N.displayName=C;var b="DialogTrigger",T=i.forwardRef((e,t)=>{const{__scopeDialog:o,...r}=e,n=d(b,o),s=D.useComposedRefs(t,n.triggerRef);return a.jsxRuntimeExports.jsx(m.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":P(n.open),...r,ref:s,onClick:g.composeEventHandlers(e.onClick,n.onOpenToggle)})});T.displayName=b;var _="DialogPortal",[te,A]=I(_,{forceMount:void 0}),S=e=>{const{__scopeDialog:t,forceMount:o,children:r,container:n}=e,s=d(_,t);return a.jsxRuntimeExports.jsx(te,{scope:t,forceMount:o,children:i.Children.map(r,c=>a.jsxRuntimeExports.jsx(y.Presence,{present:o||s.open,children:a.jsxRuntimeExports.jsx(Z.Portal,{asChild:!0,container:n,children:c})}))})};S.displayName=_;var v="DialogOverlay",M=i.forwardRef((e,t)=>{const o=A(v,e.__scopeDialog),{forceMount:r=o.forceMount,...n}=e,s=d(v,e.__scopeDialog);return s.modal?a.jsxRuntimeExports.jsx(y.Presence,{present:r||s.open,children:a.jsxRuntimeExports.jsx(ne,{...n,ref:t})}):null});M.displayName=v;var oe=K("DialogOverlay.RemoveScroll"),ne=i.forwardRef((e,t)=>{const{__scopeDialog:o,...r}=e,n=d(v,o);return a.jsxRuntimeExports.jsx(E.ReactRemoveScroll,{as:oe,allowPinchZoom:!0,shards:[n.contentRef],children:a.jsxRuntimeExports.jsx(m.Primitive.div,{"data-state":P(n.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),f="DialogContent",w=i.forwardRef((e,t)=>{const o=A(f,e.__scopeDialog),{forceMount:r=o.forceMount,...n}=e,s=d(f,e.__scopeDialog);return a.jsxRuntimeExports.jsx(y.Presence,{present:r||s.open,children:s.modal?a.jsxRuntimeExports.jsx(re,{...n,ref:t}):a.jsxRuntimeExports.jsx(se,{...n,ref:t})})});w.displayName=f;var re=i.forwardRef((e,t)=>{const o=d(f,e.__scopeDialog),r=i.useRef(null),n=D.useComposedRefs(t,o.contentRef,r);return i.useEffect(()=>{const s=r.current;if(s)return E.hideOthers(s)},[]),a.jsxRuntimeExports.jsx(F,{...e,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:g.composeEventHandlers(e.onCloseAutoFocus,s=>{s.preventDefault(),o.triggerRef.current?.focus()}),onPointerDownOutside:g.composeEventHandlers(e.onPointerDownOutside,s=>{const c=s.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0;(c.button===2||l)&&s.preventDefault()}),onFocusOutside:g.composeEventHandlers(e.onFocusOutside,s=>s.preventDefault())})}),se=i.forwardRef((e,t)=>{const o=d(f,e.__scopeDialog),r=i.useRef(!1),n=i.useRef(!1);return a.jsxRuntimeExports.jsx(F,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const c=s.target;o.triggerRef.current?.contains(c)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),F=i.forwardRef((e,t)=>{const{__scopeDialog:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,...c}=e,l=d(f,o),u=i.useRef(null),p=D.useComposedRefs(t,u);return E.useFocusGuards(),a.jsxRuntimeExports.jsxs(a.jsxRuntimeExports.Fragment,{children:[a.jsxRuntimeExports.jsx(E.FocusScope,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:a.jsxRuntimeExports.jsx(B.DismissableLayer,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":P(l.open),...c,ref:p,onDismiss:()=>l.onOpenChange(!1)})}),a.jsxRuntimeExports.jsxs(a.jsxRuntimeExports.Fragment,{children:[a.jsxRuntimeExports.jsx(ie,{titleId:l.titleId}),a.jsxRuntimeExports.jsx(le,{contentRef:u,descriptionId:l.descriptionId})]})]})}),h="DialogTitle",W=i.forwardRef((e,t)=>{const{__scopeDialog:o,...r}=e,n=d(h,o);return a.jsxRuntimeExports.jsx(m.Primitive.h2,{id:n.titleId,...r,ref:t})});W.displayName=h;var $="DialogDescription",q=i.forwardRef((e,t)=>{const{__scopeDialog:o,...r}=e,n=d($,o);return a.jsxRuntimeExports.jsx(m.Primitive.p,{id:n.descriptionId,...r,ref:t})});q.displayName=$;var L="DialogClose",k=i.forwardRef((e,t)=>{const{__scopeDialog:o,...r}=e,n=d(L,o);return a.jsxRuntimeExports.jsx(m.Primitive.button,{type:"button",...r,ref:t,onClick:g.composeEventHandlers(e.onClick,()=>n.onOpenChange(!1))})});k.displayName=L;function P(e){return e?"open":"closed"}var G="DialogTitleWarning",[Re,H]=O.createContext2(G,{contentName:f,titleName:h,docsSlug:"dialog"}),ie=({titleId:e})=>{const t=H(G),o=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
2
|
-
|
|
3
|
-
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
4
|
-
|
|
5
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return i.useEffect(()=>{e&&(document.getElementById(e)||console.error(o))},[o,e]),null},ae="DialogDescriptionWarning",le=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${H(ae).contentName}}.`;return i.useEffect(()=>{const n=e.current?.getAttribute("aria-describedby");t&&n&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},ce=N,ue=T,de=S,pe=M,fe=w,ge=W,xe=q,me=k;exports.Close=me;exports.Content=fe;exports.Description=xe;exports.Overlay=pe;exports.Portal=de;exports.Root=ce;exports.Title=ge;exports.Trigger=ue;
|