@optiaxiom/web-components 0.1.0-next.6 → 0.1.0-next.7
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/AccordionContext-BS4tzaYj.js +1 -0
- package/dist/AlertDialogContext-B4Mk3IGx.js +1 -0
- package/dist/{AnimatePresence-BbWMIAMv.js → AnimatePresence-DzrZCSaJ.js} +1 -1
- package/dist/AvatarContext-7FKCZbzX.js +1 -0
- package/dist/Badge-DWH0EFQ9.js +1 -0
- package/dist/Box-B4nJyawi.js +1 -0
- package/dist/Button-Cdg-DuLv.js +1 -0
- package/dist/Code-By_B3wkS.js +1 -0
- package/dist/ControlBase-DMcwb7zZ.js +1 -0
- package/dist/DialogContext-DnQQMqU1.js +1 -0
- package/dist/DropdownMenuContext-D7-qHDoH.js +1 -0
- package/dist/FieldContext-Rwlm7Nt0.js +1 -0
- package/dist/Flex-0eazjKXh.js +1 -0
- package/dist/{Heading--mWDxECV.js → Heading-Ds_ZsQpp.js} +1 -1
- package/dist/{HoverCard-fmCDm9Yy.js → HoverCard-BodKmF2V.js} +1 -1
- package/dist/HoverCardContent-Cq9ZeVwn.js +1 -0
- package/dist/{HoverCardContext-Vxfxdy_t.js → HoverCardContext-WUjiNN__.js} +1 -1
- package/dist/{HoverCardTrigger-n4TVgXYZ.js → HoverCardTrigger-CJPoYUOo.js} +1 -1
- package/dist/{IconAngleDown-mMMPUE-T.js → IconAngleDown-CA3oBQCM.js} +1 -1
- package/dist/{IconAngleRight-B80Kbnyb.js → IconAngleRight-CMO2Bhbm.js} +1 -1
- package/dist/{IconTriangleExclamationFilled-Mt1Z0ryD.js → IconTriangleExclamationFilled-9S233uyT.js} +1 -1
- package/dist/{IconX-CeYhwlRB.js → IconX-mf-4dyiI.js} +1 -1
- package/dist/Input-DpmXSJk_.js +1 -0
- package/dist/InputBase-g-0r08j_.js +1 -0
- package/dist/Link-B-OlBELh.js +1 -0
- package/dist/PopoverContext-DMFFYbSN.js +1 -0
- package/dist/Separator-DlI42kqG.js +1 -0
- package/dist/{Spinner-CQpDu63K.js → Spinner-CdhvSjyK.js} +1 -1
- package/dist/TableRow.css.ts.vanilla-DMfjFOjy-CROgfxka.js +1 -0
- package/dist/TabsContext-CLnhrNjy.js +1 -0
- package/dist/Text-D_wdmUeA.js +1 -0
- package/dist/ToastProvider-DuWHBD5V.js +1 -0
- package/dist/ToastProvider.css.ts.vanilla-WsywbHOO-KuqOW2RR.js +1 -0
- package/dist/Tooltip-BHJ_05zX.js +1 -0
- package/dist/Transition-ChqOWQ9T.js +1 -0
- package/dist/components/Accordion.js +1 -1
- package/dist/components/AccordionContent.js +1 -1
- package/dist/components/AccordionItem.js +1 -1
- package/dist/components/AccordionTrigger.js +1 -1
- package/dist/components/Alert.js +1 -1
- package/dist/components/AlertDescription.js +1 -1
- package/dist/components/AlertDialog.js +1 -1
- package/dist/components/AlertDialogAction.js +1 -1
- package/dist/components/AlertDialogCancel.js +1 -1
- package/dist/components/AlertDialogContent.js +1 -1
- package/dist/components/AlertDialogDescription.js +1 -1
- package/dist/components/AlertDialogFooter.js +1 -1
- package/dist/components/AlertDialogTitle.js +1 -1
- package/dist/components/AlertDialogTrigger.js +1 -1
- package/dist/components/AlertTitle.js +1 -1
- package/dist/components/AnimatePresence.js +1 -1
- package/dist/components/Avatar.js +1 -1
- package/dist/components/AvatarGroup.js +1 -1
- package/dist/components/AxiomProvider.js +1 -1
- package/dist/components/Badge.js +1 -1
- package/dist/components/Box.js +1 -1
- package/dist/components/Button.js +1 -1
- package/dist/components/ButtonGroup.js +1 -1
- package/dist/components/Checkbox.js +1 -1
- package/dist/components/Code.js +1 -1
- package/dist/components/Dialog.js +1 -1
- package/dist/components/DialogBody.js +1 -1
- package/dist/components/DialogClose.js +1 -1
- package/dist/components/DialogContent.js +1 -1
- package/dist/components/DialogDescription.js +1 -1
- package/dist/components/DialogFooter.js +1 -1
- package/dist/components/DialogTitle.js +1 -1
- package/dist/components/DialogTrigger.js +1 -1
- package/dist/components/Drawer.js +1 -1
- package/dist/components/DrawerBody.js +1 -1
- package/dist/components/DrawerFooter.js +1 -1
- package/dist/components/DrawerTitle.js +1 -1
- package/dist/components/DropdownMenu.js +1 -1
- package/dist/components/DropdownMenuContent.js +1 -1
- package/dist/components/DropdownMenuItem.js +1 -1
- package/dist/components/DropdownMenuLabel.js +1 -1
- package/dist/components/DropdownMenuSeparator.js +1 -1
- package/dist/components/DropdownMenuTrigger.js +1 -1
- package/dist/components/Field.js +1 -1
- package/dist/components/Flex.js +1 -1
- package/dist/components/Grid.js +1 -1
- package/dist/components/Heading.js +1 -1
- package/dist/components/HoverCard.js +1 -1
- package/dist/components/HoverCardContent.js +1 -1
- package/dist/components/HoverCardTrigger.js +1 -1
- package/dist/components/Indicator.js +1 -1
- package/dist/components/Input.js +1 -1
- package/dist/components/Kbd.js +1 -1
- package/dist/components/Link.js +1 -1
- package/dist/components/Pagination.js +1 -1
- package/dist/components/Popover.js +1 -1
- package/dist/components/PopoverAnchor.js +1 -0
- package/dist/components/PopoverContent.js +1 -1
- package/dist/components/PopoverTrigger.js +1 -1
- package/dist/components/Progress.js +1 -1
- package/dist/components/RadioGroup.js +1 -1
- package/dist/components/RadioGroupItem.js +1 -1
- package/dist/components/SearchInput.js +1 -1
- package/dist/components/Separator.js +1 -1
- package/dist/components/Skeleton.js +1 -1
- package/dist/components/Spinner.js +1 -1
- package/dist/components/Switch.js +1 -1
- package/dist/components/Tabs.js +1 -1
- package/dist/components/TabsContent.js +1 -1
- package/dist/components/TabsList.js +1 -1
- package/dist/components/TabsTrigger.js +1 -1
- package/dist/components/Text.js +1 -1
- package/dist/components/Textarea.js +1 -1
- package/dist/components/ThemeProvider.js +1 -0
- package/dist/components/Toast.js +1 -1
- package/dist/components/ToastAction.js +1 -1
- package/dist/components/ToastProvider.js +1 -1
- package/dist/components/ToastTitle.js +1 -1
- package/dist/components/Toggle.js +1 -1
- package/dist/components/Tooltip.js +1 -1
- package/dist/components/Transition.js +1 -1
- package/dist/fallbackSpan-DTwZUKQ1.js +1 -0
- package/dist/index-7hHOaxPS.js +1 -0
- package/dist/{index-CW2yTo0m.js → index-Avrq4PLo.js} +1 -1
- package/dist/{index-T5C_7mB3.js → index-B4AYGhqc.js} +1 -1
- package/dist/{index-BTATElDB.js → index-B8Ln-a2K.js} +1 -1
- package/dist/{index-DCOcH9nN.js → index-BMUvgC0z.js} +1 -1
- package/dist/{index-CxCCwn9J.js → index-BMz8l7Ea.js} +1 -1
- package/dist/{index-DvEIspaW.js → index-BZ2epHJe.js} +1 -1
- package/dist/{index-DP8sFpQ4.js → index-BrASi1Fq.js} +1 -1
- package/dist/{index-SWiEhwHV.js → index-C4Ddh78E.js} +1 -1
- package/dist/{index-cYMIRQ5-.js → index-C7hI37J6.js} +1 -1
- package/dist/{index-CEQ_0VwD.js → index-C9mlvE8r.js} +1 -1
- package/dist/{index-DS329H0d.js → index-CCKmoeiz.js} +1 -1
- package/dist/{index-DHGBvUxh.js → index-CGi7EQ4B.js} +1 -1
- package/dist/{index-BCoYHCFR.js → index-CIoVhxCw.js} +1 -1
- package/dist/index-CoOTQzY_.js +1 -0
- package/dist/{index-DvcM92mD.js → index-CwEuOG-t.js} +1 -1
- package/dist/{index-CTs9Zxle.js → index-D3P1ZBL7.js} +1 -1
- package/dist/{index-BAtelL39.js → index-DU9Dnyc5.js} +1 -1
- package/dist/{index-sUyO5_Lv.js → index-DXPdEuVD.js} +1 -1
- package/dist/index-DYBIOwPk.js +1 -0
- package/dist/{index-DLCV57H_.js → index-Da2N7fS9.js} +1 -1
- package/dist/{index-DPS2LPv-.js → index-QPG9Kw_8.js} +1 -1
- package/dist/{index-BaU0ZfEj.js → index-RWAeIAOl.js} +1 -1
- package/dist/index-UWfpVAt_.js +1 -0
- package/dist/{index-EMW_AgdY.js → index-lPgTb1Wg.js} +1 -1
- package/dist/{index-CidN3WJY.js → index-sjjhrOQO.js} +1 -1
- package/dist/{index-BYMJBUt7.js → index-xlO69rRA.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{mapping-BmitzdW2.js → mapping-DbL9vtE_.js} +1 -1
- package/dist/reach-auto-id-BxdvVNVh.js +10 -0
- package/dist/recipeRuntime-Cz1XHbfF.js +1 -0
- package/dist/register-n8cQ4cVU.js +9 -0
- package/dist/{withIcon-f6ZAf_aa.js → withIcon-BeUikfAh.js} +1 -1
- package/package.json +4 -3
- package/dist/AccordionContext-Dr-EEVfx.js +0 -1
- package/dist/AlertDialogContext-DbShODuH.js +0 -1
- package/dist/AvatarContext-DEstsvfZ.js +0 -1
- package/dist/Badge-CuyBX-YF.js +0 -1
- package/dist/Box-qixlfMoF.js +0 -1
- package/dist/Button-B0OjXMva.js +0 -1
- package/dist/Code-DIYovBcE.js +0 -1
- package/dist/ControlBase-CnLrZNQe.js +0 -1
- package/dist/DialogContext-Ckcf573F.js +0 -1
- package/dist/DropdownMenuContext-Bg6P0CKM.js +0 -1
- package/dist/FieldContext-D9BvX-1z.js +0 -1
- package/dist/Flex-CFCDumVB.js +0 -1
- package/dist/HoverCardContent-FotpBHJS.js +0 -1
- package/dist/Input-DyDytTiU.js +0 -1
- package/dist/InputBase-BEW1ja6W.js +0 -1
- package/dist/Link-rKDZrNkw.js +0 -1
- package/dist/PopoverContext-DVvWOkdj.js +0 -1
- package/dist/Separator-CclQWjOT.js +0 -1
- package/dist/TableRow.css.ts.vanilla-4BGjgIuZ-D6mjWNCs.js +0 -1
- package/dist/TabsContext-X9RYzVxC.js +0 -1
- package/dist/Text-CqYojU6a.js +0 -1
- package/dist/ToastProvider.css.ts.vanilla-C2Olq0Jl-CvJ26fPj.js +0 -1
- package/dist/Tooltip-BEomNSZb.js +0 -1
- package/dist/Transition-DC3zEMA0.js +0 -1
- package/dist/fallbackSpan-DqKpbG6q.js +0 -1
- package/dist/index-BaHDhyAa.js +0 -1
- package/dist/index-Bm-SkoWD.js +0 -1
- package/dist/index-DtK30_fg.js +0 -1
- package/dist/reach-auto-id-sbNy7iYB.js +0 -10
- package/dist/recipeRuntime-ZMTVowk_.js +0 -1
- package/dist/register-DdihPvJa.js +0 -1
- package/dist/theme-css-DhvIC4NH.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{k as s,u as a,r as c}from"../register-
|
|
1
|
+
import{k as s,u as a,r as c}from"../register-n8cQ4cVU.js";import{u as f,c as u}from"../index-BMUvgC0z.js";import{P}from"../index-xlO69rRA.js";import{b}from"../Button-Cdg-DuLv.js";import"../mapping-DbL9vtE_.js";import"../index-BMz8l7Ea.js";import"../index-CwEuOG-t.js";import"../AnimatePresence-DzrZCSaJ.js";import"../Box-B4nJyawi.js";import"../recipeRuntime-Cz1XHbfF.js";import"../Flex-0eazjKXh.js";import"../Spinner-CdhvSjyK.js";import"../Transition-ChqOWQ9T.js";import"../fallbackSpan-DTwZUKQ1.js";import"../TableRow.css.ts.vanilla-DMfjFOjy-CROgfxka.js";var v="Toggle",i=s((e,o)=>{const{pressed:r,defaultPressed:n=!1,onPressedChange:p,...m}=e,[t=!1,g]=f({prop:r,onChange:p,defaultProp:n});return a(P.button,{type:"button","aria-pressed":t,"data-state":t?"on":"off","data-disabled":e.disabled?"":void 0,...m,ref:o,onClick:u(e.onClick,()=>{e.disabled||g(!t)})})});i.displayName=v;var h=i;const d=s(({children:e,...o},r)=>a(b,{appearance:"secondary",asChild:!0,...o,children:a(h,{ref:r,children:e})}));d.displayName="@optiaxiom/react/Toggle";const l="ax-toggle";var C=c(l,d,{customEvents:["onPressedChange"]});export{l as Toggle,C as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t}from"../register-
|
|
1
|
+
import{r as t}from"../register-n8cQ4cVU.js";import{u as r}from"../Tooltip-BHJ_05zX.js";import"../mapping-DbL9vtE_.js";import"../index-CwEuOG-t.js";import"../index-BrASi1Fq.js";import"../index-BMUvgC0z.js";import"../index-BMz8l7Ea.js";import"../index-RWAeIAOl.js";import"../index-Da2N7fS9.js";import"../index-xlO69rRA.js";import"../index-DYBIOwPk.js";import"../index-CoOTQzY_.js";import"../index-sjjhrOQO.js";import"../index-CIoVhxCw.js";import"../index-DXPdEuVD.js";import"../index-lPgTb1Wg.js";import"../AnimatePresence-DzrZCSaJ.js";import"../Box-B4nJyawi.js";import"../recipeRuntime-Cz1XHbfF.js";import"../Text-D_wdmUeA.js";import"../Transition-ChqOWQ9T.js";const o="ax-tooltip";var i=t(o,r,{customEvents:["onEscapeKeyDown","onPointerDownOutside","onOpenChange"]});export{o as Tooltip,i as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t}from"../register-
|
|
1
|
+
import{r as t}from"../register-n8cQ4cVU.js";import{r as o}from"../Transition-ChqOWQ9T.js";import"../mapping-DbL9vtE_.js";import"../index-CwEuOG-t.js";import"../AnimatePresence-DzrZCSaJ.js";import"../recipeRuntime-Cz1XHbfF.js";const r="ax-transition";var i=t(r,o,{customEvents:[]});export{r as Transition,i as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as r,f as i,u as f}from"./register-n8cQ4cVU.js";const a=(n,c,s=e=>e)=>{const e={};for(const[t,o]of Object.entries(n))e[s?s(t):t]=c(o,t);return e};({...a(r.screens,n=>({"@media":`screen and (min-width: ${n})`}))});const d=n=>i(n)?n:f("span",{children:n});export{d as l};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{k as o,u as i}from"./register-n8cQ4cVU.js";import{P as l}from"./index-xlO69rRA.js";var u="Label",r=o((e,a)=>i(l.label,{...e,ref:a,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));r.displayName=u;var s=r;export{s as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{k as R,u as i,q as le,h as se,A as x,y as de,R as u}from"./register-
|
|
1
|
+
import{k as R,u as i,q as le,h as se,A as x,y as de,R as u}from"./register-n8cQ4cVU.js";import{a as F}from"./index-RWAeIAOl.js";import{c as pe}from"./index-CGi7EQ4B.js";import{u as q}from"./index-CwEuOG-t.js";import{u as D,c as z}from"./index-BMUvgC0z.js";import{P as _}from"./index-xlO69rRA.js";import{u as ue}from"./index-DYBIOwPk.js";import{P as fe}from"./index-DXPdEuVD.js";import{u as B}from"./index-CoOTQzY_.js";import{u as me}from"./index-D3P1ZBL7.js";var k="Collapsible",[Ce,U]=F(k),[ve,M]=Ce(k),Y=R((e,a)=>{const{__scopeCollapsible:o,open:n,defaultOpen:r,disabled:t,onOpenChange:c,...s}=e,[d=!1,p]=D({prop:n,defaultProp:r,onChange:c});return i(ve,{scope:o,disabled:t,contentId:B(),open:d,onOpenToggle:le(()=>p(f=>!f),[p]),children:i(_.div,{"data-state":L(d),"data-disabled":t?"":void 0,...s,ref:a})})});Y.displayName=k;var j="CollapsibleTrigger",J=R((e,a)=>{const{__scopeCollapsible:o,...n}=e,r=M(j,o);return i(_.button,{type:"button","aria-controls":r.contentId,"aria-expanded":r.open||!1,"data-state":L(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled,...n,ref:a,onClick:z(e.onClick,r.onOpenToggle)})});J.displayName=j;var V="CollapsibleContent",Q=R((e,a)=>{const{forceMount:o,...n}=e,r=M(V,e.__scopeCollapsible);return i(fe,{present:o||r.open,children:({present:t})=>i(be,{...n,ref:a,present:t})})});Q.displayName=V;var be=R((e,a)=>{const{__scopeCollapsible:o,present:n,children:r,...t}=e,c=M(V,o),[s,d]=se(n),p=x(null),f=q(a,p),m=x(0),h=m.current,v=x(0),P=v.current,b=c.open||s,g=x(b),A=x();return de(()=>{const l=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(l)},[]),ue(()=>{const l=p.current;if(l){A.current=A.current||{transitionDuration:l.style.transitionDuration,animationName:l.style.animationName},l.style.transitionDuration="0s",l.style.animationName="none";const I=l.getBoundingClientRect();m.current=I.height,v.current=I.width,g.current||(l.style.transitionDuration=A.current.transitionDuration,l.style.animationName=A.current.animationName),d(n)}},[c.open,n]),i(_.div,{"data-state":L(c.open),"data-disabled":c.disabled?"":void 0,id:c.contentId,hidden:!b,...t,ref:f,style:{["--radix-collapsible-content-height"]:h?`${h}px`:void 0,["--radix-collapsible-content-width"]:P?`${P}px`:void 0,...e.style},children:b&&r})});function L(e){return e?"open":"closed"}var ge=Y,Ae=J,he=Q,C="Accordion",Ie=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[H,xe,_e]=pe(C),[y,Be]=F(C,[_e,U]),$=U(),W=u.forwardRef((e,a)=>{const{type:o,...n}=e,r=n,t=n;return i(H.Provider,{scope:e.__scopeAccordion,children:o==="multiple"?i(Ne,{...t,ref:a}):i(ye,{...r,ref:a})})});W.displayName=C;var[X,Pe]=y(C),[Z,Re]=y(C,{collapsible:!1}),ye=u.forwardRef((e,a)=>{const{value:o,defaultValue:n,onValueChange:r=()=>{},collapsible:t=!1,...c}=e,[s,d]=D({prop:o,defaultProp:n,onChange:r});return i(X,{scope:e.__scopeAccordion,value:s?[s]:[],onItemOpen:d,onItemClose:u.useCallback(()=>t&&d(""),[t,d]),children:i(Z,{scope:e.__scopeAccordion,collapsible:t,children:i(ee,{...c,ref:a})})})}),Ne=u.forwardRef((e,a)=>{const{value:o,defaultValue:n,onValueChange:r=()=>{},...t}=e,[c=[],s]=D({prop:o,defaultProp:n,onChange:r}),d=u.useCallback(f=>s((m=[])=>[...m,f]),[s]),p=u.useCallback(f=>s((m=[])=>m.filter(h=>h!==f)),[s]);return i(X,{scope:e.__scopeAccordion,value:c,onItemOpen:d,onItemClose:p,children:i(Z,{scope:e.__scopeAccordion,collapsible:!0,children:i(ee,{...t,ref:a})})})}),[we,N]=y(C),ee=u.forwardRef((e,a)=>{const{__scopeAccordion:o,disabled:n,dir:r,orientation:t="vertical",...c}=e,s=u.useRef(null),d=q(s,a),p=xe(o),m=me(r)==="ltr",h=z(e.onKeyDown,v=>{if(!Ie.includes(v.key))return;const P=v.target,b=p().filter(T=>!T.ref.current?.disabled),g=b.findIndex(T=>T.ref.current===P),A=b.length;if(g===-1)return;v.preventDefault();let l=g;const I=0,E=A-1,O=()=>{l=g+1,l>E&&(l=I)},S=()=>{l=g-1,l<I&&(l=E)};switch(v.key){case"Home":l=I;break;case"End":l=E;break;case"ArrowRight":t==="horizontal"&&(m?O():S());break;case"ArrowDown":t==="vertical"&&O();break;case"ArrowLeft":t==="horizontal"&&(m?S():O());break;case"ArrowUp":t==="vertical"&&S();break}const ce=l%A;b[ce].ref.current?.focus()});return i(we,{scope:o,disabled:n,direction:r,orientation:t,children:i(H.Slot,{scope:o,children:i(_.div,{...c,"data-orientation":t,ref:d,onKeyDown:n?void 0:h})})})}),w="AccordionItem",[Ee,G]=y(w),oe=u.forwardRef((e,a)=>{const{__scopeAccordion:o,value:n,...r}=e,t=N(w,o),c=Pe(w,o),s=$(o),d=B(),p=n&&c.value.includes(n)||!1,f=t.disabled||e.disabled;return i(Ee,{scope:o,open:p,disabled:f,triggerId:d,children:i(ge,{"data-orientation":t.orientation,"data-state":ie(p),...s,...r,ref:a,disabled:f,open:p,onOpenChange:m=>{m?c.onItemOpen(n):c.onItemClose(n)}})})});oe.displayName=w;var te="AccordionHeader",Oe=u.forwardRef((e,a)=>{const{__scopeAccordion:o,...n}=e,r=N(C,o),t=G(te,o);return i(_.h3,{"data-orientation":r.orientation,"data-state":ie(t.open),"data-disabled":t.disabled?"":void 0,...n,ref:a})});Oe.displayName=te;var K="AccordionTrigger",ne=u.forwardRef((e,a)=>{const{__scopeAccordion:o,...n}=e,r=N(C,o),t=G(K,o),c=Re(K,o),s=$(o);return i(H.ItemSlot,{scope:o,children:i(Ae,{"aria-disabled":t.open&&!c.collapsible||void 0,"data-orientation":r.orientation,id:t.triggerId,...s,...n,ref:a})})});ne.displayName=K;var re="AccordionContent",ae=u.forwardRef((e,a)=>{const{__scopeAccordion:o,...n}=e,r=N(C,o),t=G(re,o),c=$(o);return i(he,{role:"region","aria-labelledby":t.triggerId,"data-orientation":r.orientation,...c,...n,ref:a,style:{["--radix-accordion-content-height"]:"var(--radix-collapsible-content-height)",["--radix-accordion-content-width"]:"var(--radix-collapsible-content-width)",...e.style}})});ae.displayName=re;function ie(e){return e?"open":"closed"}var Se=W,Te=oe,De=ne,ke=ae;export{ke as C,Te as I,Se as R,De as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{k as m,u as d,A as R,y as x}from"./register-
|
|
1
|
+
import{k as m,u as d,A as R,y as x}from"./register-n8cQ4cVU.js";import{u as E,c as T}from"./index-BMUvgC0z.js";import{a as D}from"./index-RWAeIAOl.js";import{c as I,R as V,I as G}from"./index-C9mlvE8r.js";import{P as L}from"./index-DXPdEuVD.js";import{P as p}from"./index-xlO69rRA.js";import{u as k}from"./index-D3P1ZBL7.js";import{u as w}from"./index-CoOTQzY_.js";var f="Tabs",[$,Y]=D(f,[I]),h=I(),[K,g]=$(f),C=m((e,n)=>{const{__scopeTabs:s,value:t,onValueChange:r,defaultValue:c,orientation:a="horizontal",dir:u,activationMode:v="automatic",...b}=e,i=k(u),[o,l]=E({prop:t,onChange:r,defaultProp:c});return d(K,{scope:s,baseId:w(),value:o,onValueChange:l,orientation:a,dir:i,activationMode:v,children:d(p.div,{dir:i,"data-orientation":a,...b,ref:n})})});C.displayName=f;var y="TabsList",A=m((e,n)=>{const{__scopeTabs:s,loop:t=!0,...r}=e,c=g(y,s),a=h(s);return d(V,{asChild:!0,...a,orientation:c.orientation,dir:c.dir,loop:t,children:d(p.div,{role:"tablist","aria-orientation":c.orientation,...r,ref:n})})});A.displayName=y;var _="TabsTrigger",P=m((e,n)=>{const{__scopeTabs:s,value:t,disabled:r=!1,...c}=e,a=g(_,s),u=h(s),v=N(a.baseId,t),b=F(a.baseId,t),i=t===a.value;return d(G,{asChild:!0,...u,focusable:!r,active:i,children:d(p.button,{type:"button",role:"tab","aria-selected":i,"aria-controls":b,"data-state":i?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:v,...c,ref:n,onMouseDown:T(e.onMouseDown,o=>{!r&&o.button===0&&o.ctrlKey===!1?a.onValueChange(t):o.preventDefault()}),onKeyDown:T(e.onKeyDown,o=>{[" ","Enter"].includes(o.key)&&a.onValueChange(t)}),onFocus:T(e.onFocus,()=>{const o=a.activationMode!=="manual";!i&&!r&&o&&a.onValueChange(t)})})})});P.displayName=_;var S="TabsContent",M=m((e,n)=>{const{__scopeTabs:s,value:t,forceMount:r,children:c,...a}=e,u=g(S,s),v=N(u.baseId,t),b=F(u.baseId,t),i=t===u.value,o=R(i);return x(()=>{const l=requestAnimationFrame(()=>o.current=!1);return()=>cancelAnimationFrame(l)},[]),d(L,{present:r||i,children:({present:l})=>d(p.div,{"data-state":i?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":v,hidden:!l,id:b,tabIndex:0,...a,ref:n,style:{...e.style,animationDuration:o.current?"0s":void 0},children:l&&c})})});M.displayName=S;function N(e,n){return`${e}-trigger-${n}`}function F(e,n){return`${e}-content-${n}`}var B=C,q=A,z=P;export{q as L,B as R,M as T,z as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{k as u,u as i,A as g,y as _,
|
|
1
|
+
import{k as u,u as i,A as g,y as _,b as A,q as K,N as U}from"./register-n8cQ4cVU.js";import{c as f,u as Y}from"./index-BMUvgC0z.js";import{u as h,a as Z}from"./index-CwEuOG-t.js";import{a as j,c as z}from"./index-RWAeIAOl.js";import{u as P}from"./index-CoOTQzY_.js";import{D as J,P as Q}from"./index-Da2N7fS9.js";import{o as X,h as ee,u as te,F as oe}from"./index-BZ2epHJe.js";import{P as N}from"./index-DXPdEuVD.js";import{P as D}from"./index-xlO69rRA.js";var y="Dialog",[R,ne]=j(y),[re,l]=R(y),T=e=>{const{__scopeDialog:o,children:r,open:a,defaultOpen:n,onOpenChange:t,modal:c=!0}=e,s=g(null),p=g(null),[v=!1,C]=Y({prop:a,defaultProp:n,onChange:t});return i(re,{scope:o,triggerRef:s,contentRef:p,contentId:P(),titleId:P(),descriptionId:P(),open:v,onOpenChange:C,onOpenToggle:K(()=>C(V=>!V),[C]),modal:c,children:r})};T.displayName=y;var x="DialogTrigger",b=u((e,o)=>{const{__scopeDialog:r,...a}=e,n=l(x,r),t=h(o,n.triggerRef);return i(D.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":I(n.open),...a,ref:t,onClick:f(e.onClick,n.onOpenToggle)})});b.displayName=x;var E="DialogPortal",[ae,M]=R(E,{forceMount:void 0}),F=e=>{const{__scopeDialog:o,forceMount:r,children:a,container:n}=e,t=l(E,o);return i(ae,{scope:o,forceMount:r,children:U.map(a,c=>i(N,{present:r||t.open,children:i(Q,{asChild:!0,container:n,children:c})}))})};F.displayName=E;var m="DialogOverlay",S=u((e,o)=>{const r=M(m,e.__scopeDialog),{forceMount:a=r.forceMount,...n}=e,t=l(m,e.__scopeDialog);return t.modal?i(N,{present:a||t.open,children:i(ie,{...n,ref:o})}):null});S.displayName=m;var ie=u((e,o)=>{const{__scopeDialog:r,...a}=e,n=l(m,r);return i(X,{as:Z,allowPinchZoom:!0,shards:[n.contentRef],children:i(D.div,{"data-state":I(n.open),...a,ref:o,style:{pointerEvents:"auto",...a.style}})})}),d="DialogContent",W=u((e,o)=>{const r=M(d,e.__scopeDialog),{forceMount:a=r.forceMount,...n}=e,t=l(d,e.__scopeDialog);return i(N,{present:a||t.open,children:t.modal?i(se,{...n,ref:o}):i(ce,{...n,ref:o})})});W.displayName=d;var se=u((e,o)=>{const r=l(d,e.__scopeDialog),a=g(null),n=h(o,r.contentRef,a);return _(()=>{const t=a.current;if(t)return ee(t)},[]),i(k,{...e,ref:n,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:f(e.onCloseAutoFocus,t=>{t.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:f(e.onPointerDownOutside,t=>{const c=t.detail.originalEvent,s=c.button===0&&c.ctrlKey===!0;(c.button===2||s)&&t.preventDefault()}),onFocusOutside:f(e.onFocusOutside,t=>t.preventDefault())})}),ce=u((e,o)=>{const r=l(d,e.__scopeDialog),a=g(!1),n=g(!1);return i(k,{...e,ref:o,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(a.current||r.triggerRef.current?.focus(),t.preventDefault()),a.current=!1,n.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(a.current=!0,t.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const c=t.target;r.triggerRef.current?.contains(c)&&t.preventDefault(),t.detail.originalEvent.type==="focusin"&&n.current&&t.preventDefault()}})}),k=u((e,o)=>{const{__scopeDialog:r,trapFocus:a,onOpenAutoFocus:n,onCloseAutoFocus:t,...c}=e,s=l(d,r),p=g(null),v=h(o,p);return te(),i(A,{children:[i(oe,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:n,onUnmountAutoFocus:t,children:i(J,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":I(s.open),...c,ref:v,onDismiss:()=>s.onOpenChange(!1)})}),i(A,{children:[i(ue,{titleId:s.titleId}),i(ge,{contentRef:p,descriptionId:s.descriptionId})]})]})}),O="DialogTitle",w=u((e,o)=>{const{__scopeDialog:r,...a}=e,n=l(O,r);return i(D.h2,{id:n.titleId,...a,ref:o})});w.displayName=O;var G="DialogDescription",L=u((e,o)=>{const{__scopeDialog:r,...a}=e,n=l(G,r);return i(D.p,{id:n.descriptionId,...a,ref:o})});L.displayName=G;var $="DialogClose",B=u((e,o)=>{const{__scopeDialog:r,...a}=e,n=l($,r);return i(D.button,{type:"button",...a,ref:o,onClick:f(e.onClick,()=>n.onOpenChange(!1))})});B.displayName=$;function I(e){return e?"open":"closed"}var q="DialogTitleWarning",[le,H]=z(q,{contentName:d,titleName:O,docsSlug:"dialog"}),ue=({titleId:e})=>{const o=H(q),r=`\`${o.contentName}\` requires a \`${o.titleName}\` for the component to be accessible for screen reader users.
|
|
2
2
|
|
|
3
3
|
If you want to hide the \`${o.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as d,h as v,A as h,y as m}from"./register-
|
|
1
|
+
import{q as d,h as v,A as h,y as m}from"./register-n8cQ4cVU.js";import{u as a}from"./index-BMz8l7Ea.js";function C(e,s,{checkForDefaultPrevented:o=!0}={}){return function(t){if(e?.(t),o===!1||!t.defaultPrevented)return s?.(t)}}function P({prop:e,defaultProp:s,onChange:o=()=>{}}){const[n,t]=S({defaultProp:s,onChange:o}),r=e!==void 0,f=r?e:n,l=a(o),i=d(c=>{if(r){const u=typeof c=="function"?c(e):c;u!==e&&l(u)}else t(c)},[r,e,t,l]);return[f,i]}function S({defaultProp:e,onChange:s}){const o=v(e),[n]=o,t=h(n),r=a(s);return m(()=>{t.current!==n&&(r(n),t.current=n)},[n,t,r]),o}export{C as c,P as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as n,y as u,T as c}from"./register-
|
|
1
|
+
import{A as n,y as u,T as c}from"./register-n8cQ4cVU.js";function o(r){const e=n(r);return u(()=>{e.current=r}),c(()=>(...t)=>e.current?.(...t),[])}export{o as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{k as K,h as x,A as N,y as C,q as M,u as Se,
|
|
1
|
+
import{k as K,h as x,A as N,y as C,q as M,u as Se,g as Ce,_ as A,d as Ae,N as Te,b as Q,T as Ne}from"./register-n8cQ4cVU.js";import{u as Me}from"./index-CwEuOG-t.js";import{P as ke}from"./index-xlO69rRA.js";import{u as ee}from"./index-BMz8l7Ea.js";var Y="focusScope.autoFocusOnMount",X="focusScope.autoFocusOnUnmount",te={bubbles:!1,cancelable:!0},Fe="FocusScope",ne=K((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:c,onUnmountAutoFocus:i,...s}=e,[o,E]=x(null),y=ee(c),h=ee(i),l=N(null),f=Me(t,a=>E(a)),v=N({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C(()=>{if(r){let a=function(p){if(v.paused||!o)return;const m=p.target;o.contains(m)?l.current=m:T(l.current,{select:!0})},u=function(p){if(v.paused||!o)return;const m=p.relatedTarget;m!==null&&(o.contains(m)||T(l.current,{select:!0}))},d=function(p){if(document.activeElement===document.body)for(const g of p)g.removedNodes.length>0&&T(o)};document.addEventListener("focusin",a),document.addEventListener("focusout",u);const b=new MutationObserver(d);return o&&b.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",a),document.removeEventListener("focusout",u),b.disconnect()}}},[r,o,v.paused]),C(()=>{if(o){ae.add(v);const a=document.activeElement;if(!o.contains(a)){const d=new CustomEvent(Y,te);o.addEventListener(Y,y),o.dispatchEvent(d),d.defaultPrevented||(Oe(Re(re(o)),{select:!0}),document.activeElement===a&&T(o))}return()=>{o.removeEventListener(Y,y),setTimeout(()=>{const d=new CustomEvent(X,te);o.addEventListener(X,h),o.dispatchEvent(d),d.defaultPrevented||T(a??document.body,{select:!0}),o.removeEventListener(X,h),ae.remove(v)},0)}}},[o,y,h,v]);const w=M(a=>{if(!n&&!r||v.paused)return;const u=a.key==="Tab"&&!a.altKey&&!a.ctrlKey&&!a.metaKey,d=document.activeElement;if(u&&d){const b=a.currentTarget,[p,m]=_e(b);p&&m?!a.shiftKey&&d===m?(a.preventDefault(),n&&T(p,{select:!0})):a.shiftKey&&d===p&&(a.preventDefault(),n&&T(m,{select:!0})):d===b&&a.preventDefault()}},[n,r,v.paused]);return Se(ke.div,{tabIndex:-1,...s,ref:f,onKeyDown:w})});ne.displayName=Fe;function Oe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(T(r,{select:t}),document.activeElement!==n)return}function _e(e){const t=re(e),n=oe(t,e),r=oe(t.reverse(),e);return[n,r]}function re(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 oe(e,t){for(const n of e)if(!Le(n,{upTo:t}))return n}function Le(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 Pe(e){return e instanceof HTMLInputElement&&"select"in e}function T(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Pe(e)&&t&&e.select()}}var ae=xe();function xe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=ce(e,t),e.unshift(t)},remove(t){e=ce(e,t),e[0]?.resume()}}}function ce(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Re(e){return e.filter(t=>t.tagName!=="A")}var H=0;function Ie(){C(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ie()),document.body.insertAdjacentElement("beforeend",e[1]??ie()),H++,()=>{H===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),H--}},[])}function ie(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var S=function(){return S=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},S.apply(this,arguments)};function ue(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 $e(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))}typeof SuppressedError=="function"&&SuppressedError;var I="right-scroll-bar-position",$="width-before-scroll-bar",We="with-scroll-bars-hidden",Be="--removed-body-scroll-bar-size";function z(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Ue(e,t){var n=x(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 De=typeof window<"u"?Ce:C,se=new WeakMap;function je(e,t){var n=Ue(null,function(r){return e.forEach(function(c){return z(c,r)})});return De(function(){var r=se.get(n);if(r){var c=new Set(r),i=new Set(e),s=n.current;c.forEach(function(o){i.has(o)||z(o,null)}),i.forEach(function(o){c.has(o)||z(o,s)})}se.set(n,e)},[e]),n}function Ke(e){return e}function Ye(e,t){t===void 0&&(t=Ke);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(o){return o!==s})}},assignSyncMedium:function(i){for(r=!0;n.length;){var s=n;n=[],s.forEach(i)}n={push:function(o){return i(o)},filter:function(){return n}}},assignMedium:function(i){r=!0;var s=[];if(n.length){var o=n;n=[],o.forEach(i),s=n}var E=function(){var h=s;s=[],h.forEach(i)},y=function(){return Promise.resolve().then(E)};y(),n={push:function(h){s.push(h),y()},filter:function(h){return s=s.filter(h),n}}}};return c}function Xe(e){e===void 0&&(e={});var t=Ye(null);return t.options=S({async:!0,ssr:!1},e),t}var le=function(e){var t=e.sideCar,n=ue(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 A(r,S({},n))};le.isSideCarExport=!0;function He(e,t){return e.useMedium(t),le}var de=Xe(),G=function(){},W=K(function(e,t){var n=N(null),r=x({onScrollCapture:G,onWheelCapture:G,onTouchMoveCapture:G}),c=r[0],i=r[1],s=e.forwardProps,o=e.children,E=e.className,y=e.removeScrollBar,h=e.enabled,l=e.shards,f=e.sideCar,v=e.noIsolation,w=e.inert,a=e.allowPinchZoom,u=e.as,d=u===void 0?"div":u,b=e.gapMode,p=ue(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),m=f,g=je([n,t]),k=S(S({},p),c);return A(Q,null,h&&A(m,{sideCar:de,removeScrollBar:y,shards:l,noIsolation:v,inert:w,setCallbacks:i,allowPinchZoom:!!a,lockRef:n,gapMode:b}),s?Ae(Te.only(o),S(S({},k),{ref:g})):A(d,S({},k,{className:E,ref:g}),o))});W.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},W.classNames={fullWidth:$,zeroRight:I};var ze=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Ge(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ze();return t&&e.setAttribute("nonce",t),e}function qe(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ve(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Ze=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Ge())&&(qe(t,n),Ve(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Je=function(){var e=Ze();return function(t,n){C(function(){return e.add(t),function(){e.remove()}},[t&&n])}},fe=function(){var e=Je(),t=function(n){var r=n.styles,c=n.dynamic;return e(r,c),null};return t},Qe={left:0,top:0,right:0,gap:0},q=function(e){return parseInt(e||"",10)||0},et=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[q(n),q(r),q(c)]},tt=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Qe;var t=et(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])}},nt=fe(),F="data-scroll-locked",rt=function(e,t,n,r){var c=e.left,i=e.top,s=e.right,o=e.gap;return n===void 0&&(n="margin"),`
|
|
2
2
|
.`.concat(We,` {
|
|
3
3
|
overflow: hidden `).concat(r,`;
|
|
4
4
|
padding-right: `).concat(o,"px ").concat(r,`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{k as A,A as C,q as y,y as P,u as c,h as M,T as Q}from"./register-
|
|
1
|
+
import{k as A,A as C,q as y,y as P,u as c,h as M,T as Q}from"./register-n8cQ4cVU.js";import{c as w,u as Z}from"./index-BMUvgC0z.js";import{u as B,S as ee}from"./index-CwEuOG-t.js";import{a as te}from"./index-RWAeIAOl.js";import{D as oe,P as re}from"./index-Da2N7fS9.js";import{u as ne}from"./index-CoOTQzY_.js";import{c as j,A as se,C as ie,a as ae,R as le}from"./index-sjjhrOQO.js";import{P as q}from"./index-DXPdEuVD.js";import{P as ce}from"./index-xlO69rRA.js";import{R as ue}from"./index-lPgTb1Wg.js";var[R,je]=te("Tooltip",[j]),L=j(),U="TooltipProvider",pe=700,H="tooltip.open",[de,N]=R(U),V=t=>{const{__scopeTooltip:o,delayDuration:e=pe,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:i}=t,[a,d]=M(!0),s=C(!1),u=C(0);return P(()=>{const l=u.current;return()=>window.clearTimeout(l)},[]),c(de,{scope:o,isOpenDelayed:a,delayDuration:e,onOpen:y(()=>{window.clearTimeout(u.current),d(!1)},[]),onClose:y(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>d(!0),r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:y(l=>{s.current=l},[]),disableHoverableContent:n,children:i})};V.displayName=U;var I="Tooltip",[ve,D]=R(I),Y=t=>{const{__scopeTooltip:o,children:e,open:r,defaultOpen:n=!1,onOpenChange:i,disableHoverableContent:a,delayDuration:d}=t,s=N(I,t.__scopeTooltip),u=L(o),[l,p]=M(null),h=ne(),T=C(0),v=a??s.disableHoverableContent,m=d??s.delayDuration,f=C(!1),[x=!1,g]=Z({prop:r,defaultProp:n,onChange:F=>{F?(s.onOpen(),document.dispatchEvent(new CustomEvent(H))):s.onClose(),i?.(F)}}),E=Q(()=>x?f.current?"delayed-open":"instant-open":"closed",[x]),_=y(()=>{window.clearTimeout(T.current),f.current=!1,g(!0)},[g]),O=y(()=>{window.clearTimeout(T.current),g(!1)},[g]),G=y(()=>{window.clearTimeout(T.current),T.current=window.setTimeout(()=>{f.current=!0,g(!0)},m)},[m,g]);return P(()=>()=>window.clearTimeout(T.current),[]),c(le,{...u,children:c(ve,{scope:o,contentId:h,open:x,stateAttribute:E,trigger:l,onTriggerChange:p,onTriggerEnter:y(()=>{s.isOpenDelayed?G():_()},[s.isOpenDelayed,G,_]),onTriggerLeave:y(()=>{v?O():window.clearTimeout(T.current)},[O,v]),onOpen:_,onClose:O,disableHoverableContent:v,children:e})})};Y.displayName=I;var S="TooltipTrigger",X=A((t,o)=>{const{__scopeTooltip:e,...r}=t,n=D(S,e),i=N(S,e),a=L(e),d=C(null),s=B(o,d,n.onTriggerChange),u=C(!1),l=C(!1),p=y(()=>u.current=!1,[]);return P(()=>()=>document.removeEventListener("pointerup",p),[p]),c(se,{asChild:!0,...a,children:c(ce.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:s,onPointerMove:w(t.onPointerMove,h=>{h.pointerType!=="touch"&&!l.current&&!i.isPointerInTransitRef.current&&(n.onTriggerEnter(),l.current=!0)}),onPointerLeave:w(t.onPointerLeave,()=>{n.onTriggerLeave(),l.current=!1}),onPointerDown:w(t.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:w(t.onFocus,()=>{u.current||n.onOpen()}),onBlur:w(t.onBlur,n.onClose),onClick:w(t.onClick,n.onClose)})})});X.displayName=S;var k="TooltipPortal",[he,fe]=R(k,{forceMount:void 0}),K=t=>{const{__scopeTooltip:o,forceMount:e,children:r,container:n}=t,i=D(k,o);return c(he,{scope:o,forceMount:e,children:c(q,{present:e||i.open,children:c(re,{asChild:!0,container:n,children:r})})})};K.displayName=k;var b="TooltipContent",W=A((t,o)=>{const e=fe(b,t.__scopeTooltip),{forceMount:r=e.forceMount,side:n="top",...i}=t,a=D(b,t.__scopeTooltip);return c(q,{present:r||a.open,children:a.disableHoverableContent?c($,{side:n,...i,ref:o}):c(Te,{side:n,...i,ref:o})})}),Te=A((t,o)=>{const e=D(b,t.__scopeTooltip),r=N(b,t.__scopeTooltip),n=C(null),i=B(o,n),[a,d]=M(null),{trigger:s,onClose:u}=e,l=n.current,{onPointerInTransitChange:p}=r,h=y(()=>{d(null),p(!1)},[p]),T=y((v,m)=>{const f=v.currentTarget,x={x:v.clientX,y:v.clientY},g=ge(x,f.getBoundingClientRect()),E=xe(x,g),_=Ce(m.getBoundingClientRect()),O=we([...E,..._]);d(O),p(!0)},[p]);return P(()=>()=>h(),[h]),P(()=>{if(s&&l){const v=f=>T(f,l),m=f=>T(f,s);return s.addEventListener("pointerleave",v),l.addEventListener("pointerleave",m),()=>{s.removeEventListener("pointerleave",v),l.removeEventListener("pointerleave",m)}}},[s,l,T,h]),P(()=>{if(a){const v=m=>{const f=m.target,x={x:m.clientX,y:m.clientY},g=s?.contains(f)||l?.contains(f),E=!Pe(x,a);g?h():E&&(h(),u())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[s,l,a,u,h]),c($,{...t,ref:i})}),[me,ye]=R(I,{isInside:!1}),$=A((t,o)=>{const{__scopeTooltip:e,children:r,"aria-label":n,onEscapeKeyDown:i,onPointerDownOutside:a,...d}=t,s=D(b,e),u=L(e),{onClose:l}=s;return P(()=>(document.addEventListener(H,l),()=>document.removeEventListener(H,l)),[l]),P(()=>{if(s.trigger){const p=h=>{h.target?.contains(s.trigger)&&l()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[s.trigger,l]),c(oe,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:p=>p.preventDefault(),onDismiss:l,children:c(ie,{"data-state":s.stateAttribute,...u,...d,ref:o,style:{...d.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(ee,{children:r}),c(me,{scope:e,isInside:!0,children:c(ue,{id:s.contentId,role:"tooltip",children:n||r})})]})})});W.displayName=b;var z="TooltipArrow",J=A((t,o)=>{const{__scopeTooltip:e,...r}=t,n=L(e);return ye(z,e).isInside?null:c(ae,{...n,...r,ref:o})});J.displayName=z;function ge(t,o){const e=Math.abs(o.top-t.y),r=Math.abs(o.bottom-t.y),n=Math.abs(o.right-t.x),i=Math.abs(o.left-t.x);switch(Math.min(e,r,n,i)){case i:return"left";case n:return"right";case e:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function xe(t,o,e=5){const r=[];switch(o){case"top":r.push({x:t.x-e,y:t.y+e},{x:t.x+e,y:t.y+e});break;case"bottom":r.push({x:t.x-e,y:t.y-e},{x:t.x+e,y:t.y-e});break;case"left":r.push({x:t.x+e,y:t.y-e},{x:t.x+e,y:t.y+e});break;case"right":r.push({x:t.x-e,y:t.y-e},{x:t.x-e,y:t.y+e});break}return r}function Ce(t){const{top:o,right:e,bottom:r,left:n}=t;return[{x:n,y:o},{x:e,y:o},{x:e,y:r},{x:n,y:r}]}function Pe(t,o){const{x:e,y:r}=t;let n=!1;for(let i=0,a=o.length-1;i<o.length;a=i++){const d=o[i].x,s=o[i].y,u=o[a].x,l=o[a].y;s>r!=l>r&&e<(u-d)*(r-s)/(l-s)+d&&(n=!n)}return n}function we(t){const o=t.slice();return o.sort((e,r)=>e.x<r.x?-1:e.x>r.x?1:e.y<r.y?-1:e.y>r.y?1:0),be(o)}function be(t){if(t.length<=1)return t.slice();const o=[];for(let r=0;r<t.length;r++){const n=t[r];for(;o.length>=2;){const i=o[o.length-1],a=o[o.length-2];if((i.x-a.x)*(n.y-a.y)>=(i.y-a.y)*(n.x-a.x))o.pop();else break}o.push(n)}o.pop();const e=[];for(let r=t.length-1;r>=0;r--){const n=t[r];for(;e.length>=2;){const i=e[e.length-1],a=e[e.length-2];if((i.x-a.x)*(n.y-a.y)>=(i.y-a.y)*(n.x-a.x))e.pop();else break}e.push(n)}return e.pop(),o.length===1&&e.length===1&&o[0].x===e[0].x&&o[0].y===e[0].y?o:o.concat(e)}var Ee=V,_e=Y,Oe=X,Ae=K,De=W,Re=J;export{Re as A,De as C,Ee as P,_e as R,Oe as T,Ae as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{k as h,h as K,A as b,u as i,y as I}from"./register-
|
|
1
|
+
import{k as h,h as K,A as b,u as i,y as I}from"./register-n8cQ4cVU.js";import{c as k,u as V}from"./index-BMUvgC0z.js";import{u as G}from"./index-CwEuOG-t.js";import{a as g}from"./index-RWAeIAOl.js";import{P as y}from"./index-xlO69rRA.js";import{c as E,R as T,I as B}from"./index-C9mlvE8r.js";import{u as U}from"./index-D3P1ZBL7.js";import{u as z}from"./index-CIoVhxCw.js";import{u as H}from"./index-CCKmoeiz.js";import{P as j}from"./index-DXPdEuVD.js";var C="Radio",[W,S]=g(C),[X,Y]=W(C),_=h((t,s)=>{const{__scopeRadio:e,name:n,checked:o=!1,required:r,disabled:a,value:d="on",onCheck:u,...m}=t,[v,p]=K(null),l=G(s,R=>p(R)),c=b(!1),f=v?Boolean(v.closest("form")):!0;return i(X,{scope:e,checked:o,disabled:a,children:[i(y.button,{type:"button",role:"radio","aria-checked":o,"data-state":N(o),"data-disabled":a?"":void 0,disabled:a,value:d,...m,ref:l,onClick:k(t.onClick,R=>{o||u?.(),f&&(c.current=R.isPropagationStopped(),c.current||R.stopPropagation())})}),f&&i(J,{control:v,bubbles:!c.current,name:n,value:d,checked:o,required:r,disabled:a,style:{transform:"translateX(-100%)"}})]})});_.displayName=C;var A="RadioIndicator",w=h((t,s)=>{const{__scopeRadio:e,forceMount:n,...o}=t,r=Y(A,e);return i(j,{present:n||r.checked,children:i(y.span,{"data-state":N(r.checked),"data-disabled":r.disabled?"":void 0,...o,ref:s})})});w.displayName=A;var J=t=>{const{control:s,checked:e,bubbles:n=!0,...o}=t,r=b(null),a=H(e),d=z(s);return I(()=>{const u=r.current,m=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(m,"checked").set;if(a!==e&&p){const l=new Event("click",{bubbles:n});p.call(u,e),u.dispatchEvent(l)}},[a,e,n]),i("input",{type:"radio","aria-hidden":!0,defaultChecked:e,...o,tabIndex:-1,ref:r,style:{...t.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function N(t){return t?"checked":"unchecked"}var Q=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],P="RadioGroup",[Z,ve]=g(P,[E,S]),D=E(),x=S(),[$,ee]=Z(P),M=h((t,s)=>{const{__scopeRadioGroup:e,name:n,defaultValue:o,value:r,required:a=!1,disabled:d=!1,orientation:u,dir:m,loop:v=!0,onValueChange:p,...l}=t,c=D(e),f=U(m),[R,q]=V({prop:r,defaultProp:o,onChange:p});return i($,{scope:e,name:n,required:a,disabled:d,value:R,onValueChange:q,children:i(T,{asChild:!0,...c,orientation:u,dir:f,loop:v,children:i(y.div,{role:"radiogroup","aria-required":a,"aria-orientation":u,"data-disabled":d?"":void 0,dir:f,...l,ref:s})})})});M.displayName=P;var O="RadioGroupItem",F=h((t,s)=>{const{__scopeRadioGroup:e,disabled:n,...o}=t,r=ee(O,e),a=r.disabled||n,d=D(e),u=x(e),m=b(null),v=G(s,m),p=r.value===o.value,l=b(!1);return I(()=>{const c=R=>{Q.includes(R.key)&&(l.current=!0)},f=()=>l.current=!1;return document.addEventListener("keydown",c),document.addEventListener("keyup",f),()=>{document.removeEventListener("keydown",c),document.removeEventListener("keyup",f)}},[]),i(B,{asChild:!0,...d,focusable:!a,active:p,children:i(_,{disabled:a,required:r.required,checked:p,...u,...o,name:r.name,ref:v,onCheck:()=>r.onValueChange(o.value),onKeyDown:k(c=>{c.key==="Enter"&&c.preventDefault()}),onFocus:k(o.onFocus,()=>{l.current&&m.current?.click()})})})});F.displayName=O;var oe="RadioGroupIndicator",L=h((t,s)=>{const{__scopeRadioGroup:e,...n}=t,o=x(e);return i(w,{...o,...n,ref:s})});L.displayName=oe;var re=F,te=L;export{re as I,M as R,te as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{k as s,u as i,A,y as M}from"./register-
|
|
1
|
+
import{k as s,u as i,A,y as M}from"./register-n8cQ4cVU.js";import{a as I}from"./index-RWAeIAOl.js";import{u,S as x}from"./index-CwEuOG-t.js";import{c as v,T as w,O as L,C as $,W as F,a as G,D as W,b as D,R as Y,P as k}from"./index-B8Ln-a2K.js";import{c as q}from"./index-BMUvgC0z.js";var m="AlertDialog",[B,ge]=I(m,[v]),l=v(),f=e=>{const{__scopeAlertDialog:o,...r}=e,a=l(o);return i(Y,{...a,...r,modal:!0})};f.displayName=m;var H="AlertDialogTrigger",y=s((e,o)=>{const{__scopeAlertDialog:r,...a}=e,t=l(r);return i(w,{...t,...a,ref:o})});y.displayName=H;var V="AlertDialogPortal",_=e=>{const{__scopeAlertDialog:o,...r}=e,a=l(o);return i(k,{...a,...r})};_.displayName=V;var j="AlertDialogOverlay",N=s((e,o)=>{const{__scopeAlertDialog:r,...a}=e,t=l(r);return i(L,{...t,...a,ref:o})});N.displayName=j;var n="AlertDialogContent",[z,J]=B(n),C=s((e,o)=>{const{__scopeAlertDialog:r,children:a,...t}=e,g=l(r),p=A(null),R=u(o,p),d=A(null);return i(F,{contentName:n,titleName:h,docsSlug:"alert-dialog",children:i(z,{scope:r,cancelRef:d,children:i($,{role:"alertdialog",...g,...t,ref:R,onOpenAutoFocus:q(t.onOpenAutoFocus,c=>{c.preventDefault(),d.current?.focus({preventScroll:!0})}),onPointerDownOutside:c=>c.preventDefault(),onInteractOutside:c=>c.preventDefault(),children:[i(x,{children:a}),i(Q,{contentRef:p})]})})})});C.displayName=n;var h="AlertDialogTitle",P=s((e,o)=>{const{__scopeAlertDialog:r,...a}=e,t=l(r);return i(G,{...t,...a,ref:o})});P.displayName=h;var S="AlertDialogDescription",E=s((e,o)=>{const{__scopeAlertDialog:r,...a}=e,t=l(r);return i(W,{...t,...a,ref:o})});E.displayName=S;var K="AlertDialogAction",T=s((e,o)=>{const{__scopeAlertDialog:r,...a}=e,t=l(r);return i(D,{...t,...a,ref:o})});T.displayName=K;var O="AlertDialogCancel",b=s((e,o)=>{const{__scopeAlertDialog:r,...a}=e,{cancelRef:t}=J(O,r),g=l(r),p=u(o,t);return i(D,{...g,...a,ref:p})});b.displayName=O;var Q=({contentRef:e})=>{const o=`\`${n}\` requires a description for the component to be accessible for screen reader users.
|
|
2
2
|
|
|
3
3
|
You can add a description to the \`${n}\` by passing a \`${S}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{k as _,u as f,A as x,h as N,y as O,q as I}from"./register-
|
|
1
|
+
import{k as _,u as f,A as x,h as N,y as O,q as I}from"./register-n8cQ4cVU.js";import{u as J,c as m}from"./index-BMUvgC0z.js";import{c as Q}from"./index-CGi7EQ4B.js";import{u as W}from"./index-CwEuOG-t.js";import{a as X}from"./index-RWAeIAOl.js";import{u as Z}from"./index-CoOTQzY_.js";import{P as K}from"./index-xlO69rRA.js";import{u as $}from"./index-BMz8l7Ea.js";import{u as ee}from"./index-D3P1ZBL7.js";var y="rovingFocusGroup.onEntryFocus",oe={bubbles:!1,cancelable:!0},F="RovingFocusGroup",[P,M,te]=Q(F),[re,ne]=X(F,[te]),[se,ce]=re(F),L=_((e,r)=>f(P.Provider,{scope:e.__scopeRovingFocusGroup,children:f(P.Slot,{scope:e.__scopeRovingFocusGroup,children:f(ue,{...e,ref:r})})}));L.displayName=F;var ue=_((e,r)=>{const{__scopeRovingFocusGroup:s,orientation:o,loop:g=!1,dir:b,currentTabStopId:R,defaultCurrentTabStopId:E,onCurrentTabStopIdChange:d,onEntryFocus:c,preventScrollOnEntryFocus:T=!1,...w}=e,p=x(null),v=W(r,p),t=ee(b),[i=null,C]=J({prop:R,defaultProp:E,onChange:d}),[u,a]=N(!1),S=$(c),Y=M(s),A=x(!1),[H,D]=N(0);return O(()=>{const n=p.current;if(n)return n.addEventListener(y,S),()=>n.removeEventListener(y,S)},[S]),f(se,{scope:s,orientation:o,dir:t,loop:g,currentTabStopId:i,onItemFocus:I(n=>C(n),[C]),onItemShiftTab:I(()=>a(!0),[]),onFocusableItemAdd:I(()=>D(n=>n+1),[]),onFocusableItemRemove:I(()=>D(n=>n-1),[]),children:f(K.div,{tabIndex:u||H===0?-1:0,"data-orientation":o,...w,ref:v,style:{outline:"none",...e.style},onMouseDown:m(e.onMouseDown,()=>{A.current=!0}),onFocus:m(e.onFocus,n=>{const V=!A.current;if(n.target===n.currentTarget&&V&&!u){const G=new CustomEvent(y,oe);if(n.currentTarget.dispatchEvent(G),!G.defaultPrevented){const h=Y().filter(l=>l.focusable),q=h.find(l=>l.active),z=h.find(l=>l.id===i),j=[q,z,...h].filter(Boolean).map(l=>l.ref.current);B(j,T)}}A.current=!1}),onBlur:m(e.onBlur,()=>a(!1))})})}),U="RovingFocusGroupItem",k=_((e,r)=>{const{__scopeRovingFocusGroup:s,focusable:o=!0,active:g=!1,tabStopId:b,...R}=e,E=Z(),d=b||E,c=ce(U,s),T=c.currentTabStopId===d,w=M(s),{onFocusableItemAdd:p,onFocusableItemRemove:v}=c;return O(()=>{if(o)return p(),()=>v()},[o,p,v]),f(P.ItemSlot,{scope:s,id:d,focusable:o,active:g,children:f(K.span,{tabIndex:T?0:-1,"data-orientation":c.orientation,...R,ref:r,onMouseDown:m(e.onMouseDown,t=>{o?c.onItemFocus(d):t.preventDefault()}),onFocus:m(e.onFocus,()=>c.onItemFocus(d)),onKeyDown:m(e.onKeyDown,t=>{if(t.key==="Tab"&&t.shiftKey){c.onItemShiftTab();return}if(t.target!==t.currentTarget)return;const i=le(t,c.orientation,c.dir);if(i!==void 0){if(t.metaKey||t.ctrlKey||t.altKey||t.shiftKey)return;t.preventDefault();let u=w().filter(a=>a.focusable).map(a=>a.ref.current);if(i==="last")u.reverse();else if(i==="prev"||i==="next"){i==="prev"&&u.reverse();const a=u.indexOf(t.currentTarget);u=c.loop?fe(u,a+1):u.slice(a+1)}setTimeout(()=>B(u))}})})})});k.displayName=U;var ae={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ie(e,r){return r!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function le(e,r,s){const o=ie(e.key,s);if(!(r==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(r==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return ae[o]}function B(e,r=!1){const s=document.activeElement;for(const o of e)if(o===s||(o.focus({preventScroll:r}),document.activeElement!==s))return}function fe(e,r){return e.map((s,o)=>e[(r+o)%e.length])}var de=L,me=k;export{me as I,de as R,ne as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as u,T as t}from"./register-
|
|
1
|
+
import{A as u,T as t}from"./register-n8cQ4cVU.js";function n(r){const e=u({value:r,previous:r});return t(()=>(e.current.value!==r&&(e.current.previous=e.current.value,e.current.value=r),e.current.previous),[r])}export{n as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{R as r,u}from"./register-
|
|
1
|
+
import{R as r,u}from"./register-n8cQ4cVU.js";import{a as _}from"./index-RWAeIAOl.js";import{u as S,a as x}from"./index-CwEuOG-t.js";function v(s){const a=s+"CollectionProvider",[A,N]=_(a),[E,f]=A(a,{collectionRef:{current:null},itemMap:new Map}),m=c=>{const{scope:e,children:l}=c,o=r.useRef(null),t=r.useRef(new Map).current;return u(E,{scope:e,itemMap:t,collectionRef:o,children:l})};m.displayName=a;const d=s+"CollectionSlot",p=r.forwardRef((c,e)=>{const{scope:l,children:o}=c,t=f(d,l),n=S(e,t.collectionRef);return u(x,{ref:n,children:o})});p.displayName=d;const C=s+"CollectionItemSlot",R="data-radix-collection-item",M=r.forwardRef((c,e)=>{const{scope:l,children:o,...t}=c,n=r.useRef(null),I=S(e,n),i=f(C,l);return r.useEffect(()=>(i.itemMap.set(n,{ref:n,...t}),()=>void i.itemMap.delete(n))),u(x,{[R]:"",ref:I,children:o})});M.displayName=C;function T(c){const e=f(s+"CollectionConsumer",c);return r.useCallback(()=>{const o=e.collectionRef.current;if(!o)return[];const t=Array.from(o.querySelectorAll(`[${R}]`));return Array.from(e.itemMap.values()).sort((i,O)=>t.indexOf(i.ref.current)-t.indexOf(O.ref.current))},[e.collectionRef,e.itemMap])}return[{Provider:m,Slot:p,ItemSlot:M},T,N]}export{v as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as u}from"./register-
|
|
1
|
+
import{h as u}from"./register-n8cQ4cVU.js";import{u as z}from"./index-DYBIOwPk.js";function n(r){const[d,i]=u(void 0);return z(()=>{if(r){i({width:r.offsetWidth,height:r.offsetHeight});const f=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const b=o[0];let e,t;if("borderBoxSize"in b){const s=b.borderBoxSize,h=Array.isArray(s)?s[0]:s;e=h.inlineSize,t=h.blockSize}else e=r.offsetWidth,t=r.offsetHeight;i({width:e,height:t})});return f.observe(r,{box:"border-box"}),()=>f.unobserve(r)}else i(void 0)},[r]),d}export{n as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as u,e as a}from"./register-n8cQ4cVU.js";import{u as s}from"./index-DYBIOwPk.js";var i=a["useId".toString()]||(()=>{}),d=0;function n(r){const[t,e]=u(i());return s(()=>{e(o=>o??String(d++))},[r]),t?`radix-${t}`:""}export{n as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as R,k as d,N as l,f as a,u,
|
|
1
|
+
import{q as R,k as d,N as l,f as a,u,d as g,b as S}from"./register-n8cQ4cVU.js";function b(n,r){typeof n=="function"?n(r):n!=null&&(n.current=r)}function f(...n){return r=>n.forEach(e=>b(e,r))}function v(...n){return R(f(...n),n)}var m=d((n,r)=>{const{children:e,...t}=n,o=l.toArray(e),s=o.find(N);if(s){const i=s.props.children,c=o.map(y=>y===s?l.count(i)>1?l.only(null):a(i)?i.props.children:null:y);return u(p,{...t,ref:r,children:a(i)?g(i,void 0,c):null})}return u(p,{...t,ref:r,children:e})});m.displayName="Slot";var p=d((n,r)=>{const{children:e,...t}=n;if(a(e)){const o=W(e);return g(e,{...P(t,e.props),ref:r?f(r,o):o})}return l.count(e)>1?l.only(null):null});p.displayName="SlotClone";var h=({children:n})=>u(S,{children:n});function N(n){return a(n)&&n.type===h}function P(n,r){const e={...r};for(const t in r){const o=n[t],s=r[t];/^on[A-Z]/.test(t)?o&&s?e[t]=(...c)=>{s(...c),o(...c)}:o&&(e[t]=o):t==="style"?e[t]={...o,...s}:t==="className"&&(e[t]=[o,s].filter(Boolean).join(" "))}return{...n,...e}}function W(n){let r=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,e=r&&"isReactWarning"in r&&r.isReactWarning;return e?n.ref:(r=Object.getOwnPropertyDescriptor(n,"ref")?.get,e=r&&"isReactWarning"in r&&r.isReactWarning,e?n.props.ref:n.props.ref||n.ref)}export{h as S,m as a,f as c,v as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{G as t,x as i}from"./register-
|
|
1
|
+
import{G as t,x as i}from"./register-n8cQ4cVU.js";var n=t(void 0);function e(o){const r=i(n);return o||r||"ltr"}export{e as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as k,A as C,u as c,q as X,k as g,y as _,T as Ce,j as xe,c as re}from"./register-DdihPvJa.js";import{u as be,c as x}from"./index-DCOcH9nN.js";import{u as se}from"./index-DvcM92mD.js";import{c as ge}from"./index-DHGBvUxh.js";import{a as Re}from"./index-BaU0ZfEj.js";import{B as Se,R as Ae,P as Ie}from"./index-DLCV57H_.js";import{P as _e}from"./index-sUyO5_Lv.js";import{P as F,d as Fe}from"./index-BYMJBUt7.js";import{u as $}from"./index-CxCCwn9J.js";import{u as De}from"./index-DtK30_fg.js";import{V as ae}from"./index-EMW_AgdY.js";var z="ToastProvider",[G,Ne,Le]=ge("Toast"),[ie,ft]=Re("Toast",[Le]),[Oe,Y]=ie(z),ce=e=>{const{__scopeToast:o,label:n="Notification",duration:t=5e3,swipeDirection:i="right",swipeThreshold:l=50,children:d}=e,[m,T]=k(null),[a,h]=k(0),w=C(!1),D=C(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${z}\`. Expected non-empty \`string\`.`),c(G.Provider,{scope:o,children:c(Oe,{scope:o,label:n,duration:t,swipeDirection:i,swipeThreshold:l,toastCount:a,viewport:m,onViewportChange:T,onToastAdd:X(()=>h(S=>S+1),[]),onToastRemove:X(()=>h(S=>S-1),[]),isFocusedToastEscapeKeyDownRef:w,isClosePausedRef:D,children:d})})};ce.displayName=z;var ue="ToastViewport",Me=["F8"],J="toast.viewportPause",Q="toast.viewportResume",le=g((e,o)=>{const{__scopeToast:n,hotkey:t=Me,label:i="Notifications ({hotkey})",...l}=e,d=Y(ue,n),m=Ne(n),T=C(null),a=C(null),h=C(null),w=C(null),D=se(o,w,d.onViewportChange),S=t.join("+").replace(/Key/g,"").replace(/Digit/g,""),A=d.toastCount>0;_(()=>{const s=E=>{t.every(f=>E[f]||E.code===f)&&w.current?.focus()};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[t]),_(()=>{const s=T.current,E=w.current;if(A&&s&&E){const p=()=>{if(!d.isClosePausedRef.current){const v=new CustomEvent(J);E.dispatchEvent(v),d.isClosePausedRef.current=!0}},f=()=>{if(d.isClosePausedRef.current){const v=new CustomEvent(Q);E.dispatchEvent(v),d.isClosePausedRef.current=!1}},y=v=>{!s.contains(v.relatedTarget)&&f()},P=()=>{s.contains(document.activeElement)||f()};return s.addEventListener("focusin",p),s.addEventListener("focusout",y),s.addEventListener("pointermove",p),s.addEventListener("pointerleave",P),window.addEventListener("blur",p),window.addEventListener("focus",f),()=>{s.removeEventListener("focusin",p),s.removeEventListener("focusout",y),s.removeEventListener("pointermove",p),s.removeEventListener("pointerleave",P),window.removeEventListener("blur",p),window.removeEventListener("focus",f)}}},[A,d.isClosePausedRef]);const u=X(({tabbingDirection:s})=>{const p=m().map(f=>{const y=f.ref.current,P=[y,...Ge(y)];return s==="forwards"?P:P.reverse()});return(s==="forwards"?p.reverse():p).flat()},[m]);return _(()=>{const s=w.current;if(s){const E=p=>{const f=p.altKey||p.ctrlKey||p.metaKey;if(p.key==="Tab"&&!f){const P=document.activeElement,v=p.shiftKey;if(p.target===s&&v){a.current?.focus();return}const L=u({tabbingDirection:v?"backwards":"forwards"}),K=L.findIndex(I=>I===P);te(L.slice(K+1))?p.preventDefault():v?a.current?.focus():h.current?.focus()}};return s.addEventListener("keydown",E),()=>s.removeEventListener("keydown",E)}},[m,u]),c(Se,{ref:T,role:"region","aria-label":i.replace("{hotkey}",S),tabIndex:-1,style:{pointerEvents:A?void 0:"none"},children:[A&&c(Z,{ref:a,onFocusFromOutsideViewport:()=>{const s=u({tabbingDirection:"forwards"});te(s)}}),c(G.Slot,{scope:n,children:c(F.ol,{tabIndex:-1,...l,ref:D})}),A&&c(Z,{ref:h,onFocusFromOutsideViewport:()=>{const s=u({tabbingDirection:"backwards"});te(s)}})]})});le.displayName=ue;var de="ToastFocusProxy",Z=g((e,o)=>{const{__scopeToast:n,onFocusFromOutsideViewport:t,...i}=e,l=Y(de,n);return c(ae,{"aria-hidden":!0,tabIndex:0,...i,ref:o,style:{position:"fixed"},onFocus:d=>{const m=d.relatedTarget;!l.viewport?.contains(m)&&t()}})});Z.displayName=de;var B="Toast",ke="toast.swipeStart",Ve="toast.swipeMove",Ke="toast.swipeCancel",He="toast.swipeEnd",pe=g((e,o)=>{const{forceMount:n,open:t,defaultOpen:i,onOpenChange:l,...d}=e,[m=!0,T]=be({prop:t,defaultProp:i,onChange:l});return c(_e,{present:n||m,children:c(Xe,{open:m,...d,ref:o,onClose:()=>T(!1),onPause:$(e.onPause),onResume:$(e.onResume),onSwipeStart:x(e.onSwipeStart,a=>{a.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:x(e.onSwipeMove,a=>{const{x:h,y:w}=a.detail.delta;a.currentTarget.setAttribute("data-swipe","move"),a.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${h}px`),a.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${w}px`)}),onSwipeCancel:x(e.onSwipeCancel,a=>{a.currentTarget.setAttribute("data-swipe","cancel"),a.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),a.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),a.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),a.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:x(e.onSwipeEnd,a=>{const{x:h,y:w}=a.detail.delta;a.currentTarget.setAttribute("data-swipe","end"),a.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),a.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),a.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${h}px`),a.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${w}px`),T(!1)})})})});pe.displayName=B;var[We,Ue]=ie(B,{onClose(){}}),Xe=g((e,o)=>{const{__scopeToast:n,type:t="foreground",duration:i,open:l,onClose:d,onEscapeKeyDown:m,onPause:T,onResume:a,onSwipeStart:h,onSwipeMove:w,onSwipeCancel:D,onSwipeEnd:S,...A}=e,u=Y(B,n),[s,E]=k(null),p=se(o,r=>E(r)),f=C(null),y=C(null),P=i||u.duration,v=C(0),N=C(P),V=C(0),{onToastAdd:L,onToastRemove:K}=u,I=$(()=>{s?.contains(document.activeElement)&&u.viewport?.focus(),d()}),H=X(r=>{!r||r===1/0||(window.clearTimeout(V.current),v.current=new Date().getTime(),V.current=window.setTimeout(I,r))},[I]);_(()=>{const r=u.viewport;if(r){const b=()=>{H(N.current),a?.()},R=()=>{const O=new Date().getTime()-v.current;N.current=N.current-O,window.clearTimeout(V.current),T?.()};return r.addEventListener(J,R),r.addEventListener(Q,b),()=>{r.removeEventListener(J,R),r.removeEventListener(Q,b)}}},[u.viewport,P,T,a,H]),_(()=>{l&&!u.isClosePausedRef.current&&H(P)},[l,P,u.isClosePausedRef,H]),_(()=>(L(),()=>K()),[L,K]);const oe=Ce(()=>s?Ee(s):null,[s]);return u.viewport?c(re,{children:[oe&&c($e,{__scopeToast:n,role:"status","aria-live":t==="foreground"?"assertive":"polite","aria-atomic":!0,children:oe}),c(We,{scope:n,onClose:I,children:xe(c(G.ItemSlot,{scope:n,children:c(Ae,{asChild:!0,onEscapeKeyDown:x(m,()=>{u.isFocusedToastEscapeKeyDownRef.current||I(),u.isFocusedToastEscapeKeyDownRef.current=!1}),children:c(F.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":l?"open":"closed","data-swipe-direction":u.swipeDirection,...A,ref:p,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:x(e.onKeyDown,r=>{r.key==="Escape"&&(m?.(r.nativeEvent),r.nativeEvent.defaultPrevented||(u.isFocusedToastEscapeKeyDownRef.current=!0,I()))}),onPointerDown:x(e.onPointerDown,r=>{r.button===0&&(f.current={x:r.clientX,y:r.clientY})}),onPointerMove:x(e.onPointerMove,r=>{if(!f.current)return;const b=r.clientX-f.current.x,R=r.clientY-f.current.y,O=Boolean(y.current),M=["left","right"].includes(u.swipeDirection),W=["left","up"].includes(u.swipeDirection)?Math.min:Math.max,Pe=M?W(0,b):0,he=M?0:W(0,R),j=r.pointerType==="touch"?10:2,U={x:Pe,y:he},ne={originalEvent:r,delta:U};O?(y.current=U,q(Ve,w,ne,{discrete:!1})):ye(U,u.swipeDirection,j)?(y.current=U,q(ke,h,ne,{discrete:!1}),r.target.setPointerCapture(r.pointerId)):(Math.abs(b)>j||Math.abs(R)>j)&&(f.current=null)}),onPointerUp:x(e.onPointerUp,r=>{const b=y.current,R=r.target;if(R.hasPointerCapture(r.pointerId)&&R.releasePointerCapture(r.pointerId),y.current=null,f.current=null,b){const O=r.currentTarget,M={originalEvent:r,delta:b};ye(b,u.swipeDirection,u.swipeThreshold)?q(He,S,M,{discrete:!0}):q(Ke,D,M,{discrete:!0}),O.addEventListener("click",W=>W.preventDefault(),{once:!0})}})})})}),u.viewport)})]}):null}),$e=e=>{const{__scopeToast:o,children:n,...t}=e,i=Y(B,o),[l,d]=k(!1),[m,T]=k(!1);return je(()=>d(!0)),_(()=>{const a=window.setTimeout(()=>T(!0),1e3);return()=>window.clearTimeout(a)},[]),m?null:c(Ie,{asChild:!0,children:c(ae,{...t,children:l&&c(re,{children:[i.label," ",n]})})})},Ye="ToastTitle",fe=g((e,o)=>{const{__scopeToast:n,...t}=e;return c(F.div,{...t,ref:o})});fe.displayName=Ye;var Be="ToastDescription",qe=g((e,o)=>{const{__scopeToast:n,...t}=e;return c(F.div,{...t,ref:o})});qe.displayName=Be;var me="ToastAction",Te=g((e,o)=>{const{altText:n,...t}=e;return n.trim()?c(we,{altText:n,asChild:!0,children:c(ee,{...t,ref:o})}):(console.error(`Invalid prop \`altText\` supplied to \`${me}\`. Expected non-empty \`string\`.`),null)});Te.displayName=me;var ve="ToastClose",ee=g((e,o)=>{const{__scopeToast:n,...t}=e,i=Ue(ve,n);return c(we,{asChild:!0,children:c(F.button,{type:"button",...t,ref:o,onClick:x(e.onClick,i.onClose)})})});ee.displayName=ve;var we=g((e,o)=>{const{__scopeToast:n,altText:t,...i}=e;return c(F.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":t||void 0,...i,ref:o})});function Ee(e){const o=[];return Array.from(e.childNodes).forEach(t=>{if(t.nodeType===t.TEXT_NODE&&t.textContent&&o.push(t.textContent),ze(t)){const i=t.ariaHidden||t.hidden||t.style.display==="none",l=t.dataset.radixToastAnnounceExclude==="";if(!i)if(l){const d=t.dataset.radixToastAnnounceAlt;d&&o.push(d)}else o.push(...Ee(t))}}),o}function q(e,o,n,{discrete:t}){const i=n.originalEvent.currentTarget,l=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});o&&i.addEventListener(e,o,{once:!0}),t?Fe(i,l):i.dispatchEvent(l)}var ye=(e,o,n=0)=>{const t=Math.abs(e.x),i=Math.abs(e.y),l=t>i;return o==="left"||o==="right"?l&&t>n:!l&&i>n};function je(e=()=>{}){const o=$(e);De(()=>{let n=0,t=0;return n=window.requestAnimationFrame(()=>t=window.requestAnimationFrame(o)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(t)}},[o])}function ze(e){return e.nodeType===e.ELEMENT_NODE}function Ge(e){const o=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:t=>{const i=t.tagName==="INPUT"&&t.type==="hidden";return t.disabled||t.hidden||i?NodeFilter.FILTER_SKIP:t.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)o.push(n.currentNode);return o}function te(e){const o=document.activeElement;return e.some(n=>n===o?!0:(n.focus(),document.activeElement!==o))}var Je=le,Qe=pe,Ze=fe,et=Te,tt=ee;export{et as A,tt as C,Qe as R,ce as T,Je as V,Ze as a};
|
|
1
|
+
import{h as k,A as C,u as c,q as X,k as g,y as _,T as Ce,j as xe,b as re}from"./register-n8cQ4cVU.js";import{u as be,c as x}from"./index-BMUvgC0z.js";import{u as se}from"./index-CwEuOG-t.js";import{c as ge}from"./index-CGi7EQ4B.js";import{a as Re}from"./index-RWAeIAOl.js";import{B as Se,R as Ae,P as Ie}from"./index-Da2N7fS9.js";import{P as _e}from"./index-DXPdEuVD.js";import{P as F,d as Fe}from"./index-xlO69rRA.js";import{u as $}from"./index-BMz8l7Ea.js";import{u as De}from"./index-DYBIOwPk.js";import{V as ae}from"./index-lPgTb1Wg.js";var z="ToastProvider",[G,Ne,Le]=ge("Toast"),[ie,ft]=Re("Toast",[Le]),[Oe,Y]=ie(z),ce=e=>{const{__scopeToast:o,label:n="Notification",duration:t=5e3,swipeDirection:i="right",swipeThreshold:l=50,children:d}=e,[m,T]=k(null),[a,h]=k(0),w=C(!1),D=C(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${z}\`. Expected non-empty \`string\`.`),c(G.Provider,{scope:o,children:c(Oe,{scope:o,label:n,duration:t,swipeDirection:i,swipeThreshold:l,toastCount:a,viewport:m,onViewportChange:T,onToastAdd:X(()=>h(S=>S+1),[]),onToastRemove:X(()=>h(S=>S-1),[]),isFocusedToastEscapeKeyDownRef:w,isClosePausedRef:D,children:d})})};ce.displayName=z;var ue="ToastViewport",Me=["F8"],J="toast.viewportPause",Q="toast.viewportResume",le=g((e,o)=>{const{__scopeToast:n,hotkey:t=Me,label:i="Notifications ({hotkey})",...l}=e,d=Y(ue,n),m=Ne(n),T=C(null),a=C(null),h=C(null),w=C(null),D=se(o,w,d.onViewportChange),S=t.join("+").replace(/Key/g,"").replace(/Digit/g,""),A=d.toastCount>0;_(()=>{const s=E=>{t.every(f=>E[f]||E.code===f)&&w.current?.focus()};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[t]),_(()=>{const s=T.current,E=w.current;if(A&&s&&E){const p=()=>{if(!d.isClosePausedRef.current){const v=new CustomEvent(J);E.dispatchEvent(v),d.isClosePausedRef.current=!0}},f=()=>{if(d.isClosePausedRef.current){const v=new CustomEvent(Q);E.dispatchEvent(v),d.isClosePausedRef.current=!1}},y=v=>{!s.contains(v.relatedTarget)&&f()},P=()=>{s.contains(document.activeElement)||f()};return s.addEventListener("focusin",p),s.addEventListener("focusout",y),s.addEventListener("pointermove",p),s.addEventListener("pointerleave",P),window.addEventListener("blur",p),window.addEventListener("focus",f),()=>{s.removeEventListener("focusin",p),s.removeEventListener("focusout",y),s.removeEventListener("pointermove",p),s.removeEventListener("pointerleave",P),window.removeEventListener("blur",p),window.removeEventListener("focus",f)}}},[A,d.isClosePausedRef]);const u=X(({tabbingDirection:s})=>{const p=m().map(f=>{const y=f.ref.current,P=[y,...Ge(y)];return s==="forwards"?P:P.reverse()});return(s==="forwards"?p.reverse():p).flat()},[m]);return _(()=>{const s=w.current;if(s){const E=p=>{const f=p.altKey||p.ctrlKey||p.metaKey;if(p.key==="Tab"&&!f){const P=document.activeElement,v=p.shiftKey;if(p.target===s&&v){a.current?.focus();return}const L=u({tabbingDirection:v?"backwards":"forwards"}),K=L.findIndex(I=>I===P);te(L.slice(K+1))?p.preventDefault():v?a.current?.focus():h.current?.focus()}};return s.addEventListener("keydown",E),()=>s.removeEventListener("keydown",E)}},[m,u]),c(Se,{ref:T,role:"region","aria-label":i.replace("{hotkey}",S),tabIndex:-1,style:{pointerEvents:A?void 0:"none"},children:[A&&c(Z,{ref:a,onFocusFromOutsideViewport:()=>{const s=u({tabbingDirection:"forwards"});te(s)}}),c(G.Slot,{scope:n,children:c(F.ol,{tabIndex:-1,...l,ref:D})}),A&&c(Z,{ref:h,onFocusFromOutsideViewport:()=>{const s=u({tabbingDirection:"backwards"});te(s)}})]})});le.displayName=ue;var de="ToastFocusProxy",Z=g((e,o)=>{const{__scopeToast:n,onFocusFromOutsideViewport:t,...i}=e,l=Y(de,n);return c(ae,{"aria-hidden":!0,tabIndex:0,...i,ref:o,style:{position:"fixed"},onFocus:d=>{const m=d.relatedTarget;!l.viewport?.contains(m)&&t()}})});Z.displayName=de;var B="Toast",ke="toast.swipeStart",Ve="toast.swipeMove",Ke="toast.swipeCancel",He="toast.swipeEnd",pe=g((e,o)=>{const{forceMount:n,open:t,defaultOpen:i,onOpenChange:l,...d}=e,[m=!0,T]=be({prop:t,defaultProp:i,onChange:l});return c(_e,{present:n||m,children:c(Xe,{open:m,...d,ref:o,onClose:()=>T(!1),onPause:$(e.onPause),onResume:$(e.onResume),onSwipeStart:x(e.onSwipeStart,a=>{a.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:x(e.onSwipeMove,a=>{const{x:h,y:w}=a.detail.delta;a.currentTarget.setAttribute("data-swipe","move"),a.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${h}px`),a.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${w}px`)}),onSwipeCancel:x(e.onSwipeCancel,a=>{a.currentTarget.setAttribute("data-swipe","cancel"),a.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),a.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),a.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),a.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:x(e.onSwipeEnd,a=>{const{x:h,y:w}=a.detail.delta;a.currentTarget.setAttribute("data-swipe","end"),a.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),a.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),a.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${h}px`),a.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${w}px`),T(!1)})})})});pe.displayName=B;var[We,Ue]=ie(B,{onClose(){}}),Xe=g((e,o)=>{const{__scopeToast:n,type:t="foreground",duration:i,open:l,onClose:d,onEscapeKeyDown:m,onPause:T,onResume:a,onSwipeStart:h,onSwipeMove:w,onSwipeCancel:D,onSwipeEnd:S,...A}=e,u=Y(B,n),[s,E]=k(null),p=se(o,r=>E(r)),f=C(null),y=C(null),P=i||u.duration,v=C(0),N=C(P),V=C(0),{onToastAdd:L,onToastRemove:K}=u,I=$(()=>{s?.contains(document.activeElement)&&u.viewport?.focus(),d()}),H=X(r=>{!r||r===1/0||(window.clearTimeout(V.current),v.current=new Date().getTime(),V.current=window.setTimeout(I,r))},[I]);_(()=>{const r=u.viewport;if(r){const b=()=>{H(N.current),a?.()},R=()=>{const O=new Date().getTime()-v.current;N.current=N.current-O,window.clearTimeout(V.current),T?.()};return r.addEventListener(J,R),r.addEventListener(Q,b),()=>{r.removeEventListener(J,R),r.removeEventListener(Q,b)}}},[u.viewport,P,T,a,H]),_(()=>{l&&!u.isClosePausedRef.current&&H(P)},[l,P,u.isClosePausedRef,H]),_(()=>(L(),()=>K()),[L,K]);const oe=Ce(()=>s?Ee(s):null,[s]);return u.viewport?c(re,{children:[oe&&c($e,{__scopeToast:n,role:"status","aria-live":t==="foreground"?"assertive":"polite","aria-atomic":!0,children:oe}),c(We,{scope:n,onClose:I,children:xe(c(G.ItemSlot,{scope:n,children:c(Ae,{asChild:!0,onEscapeKeyDown:x(m,()=>{u.isFocusedToastEscapeKeyDownRef.current||I(),u.isFocusedToastEscapeKeyDownRef.current=!1}),children:c(F.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":l?"open":"closed","data-swipe-direction":u.swipeDirection,...A,ref:p,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:x(e.onKeyDown,r=>{r.key==="Escape"&&(m?.(r.nativeEvent),r.nativeEvent.defaultPrevented||(u.isFocusedToastEscapeKeyDownRef.current=!0,I()))}),onPointerDown:x(e.onPointerDown,r=>{r.button===0&&(f.current={x:r.clientX,y:r.clientY})}),onPointerMove:x(e.onPointerMove,r=>{if(!f.current)return;const b=r.clientX-f.current.x,R=r.clientY-f.current.y,O=Boolean(y.current),M=["left","right"].includes(u.swipeDirection),W=["left","up"].includes(u.swipeDirection)?Math.min:Math.max,Pe=M?W(0,b):0,he=M?0:W(0,R),j=r.pointerType==="touch"?10:2,U={x:Pe,y:he},ne={originalEvent:r,delta:U};O?(y.current=U,q(Ve,w,ne,{discrete:!1})):ye(U,u.swipeDirection,j)?(y.current=U,q(ke,h,ne,{discrete:!1}),r.target.setPointerCapture(r.pointerId)):(Math.abs(b)>j||Math.abs(R)>j)&&(f.current=null)}),onPointerUp:x(e.onPointerUp,r=>{const b=y.current,R=r.target;if(R.hasPointerCapture(r.pointerId)&&R.releasePointerCapture(r.pointerId),y.current=null,f.current=null,b){const O=r.currentTarget,M={originalEvent:r,delta:b};ye(b,u.swipeDirection,u.swipeThreshold)?q(He,S,M,{discrete:!0}):q(Ke,D,M,{discrete:!0}),O.addEventListener("click",W=>W.preventDefault(),{once:!0})}})})})}),u.viewport)})]}):null}),$e=e=>{const{__scopeToast:o,children:n,...t}=e,i=Y(B,o),[l,d]=k(!1),[m,T]=k(!1);return je(()=>d(!0)),_(()=>{const a=window.setTimeout(()=>T(!0),1e3);return()=>window.clearTimeout(a)},[]),m?null:c(Ie,{asChild:!0,children:c(ae,{...t,children:l&&c(re,{children:[i.label," ",n]})})})},Ye="ToastTitle",fe=g((e,o)=>{const{__scopeToast:n,...t}=e;return c(F.div,{...t,ref:o})});fe.displayName=Ye;var Be="ToastDescription",qe=g((e,o)=>{const{__scopeToast:n,...t}=e;return c(F.div,{...t,ref:o})});qe.displayName=Be;var me="ToastAction",Te=g((e,o)=>{const{altText:n,...t}=e;return n.trim()?c(we,{altText:n,asChild:!0,children:c(ee,{...t,ref:o})}):(console.error(`Invalid prop \`altText\` supplied to \`${me}\`. Expected non-empty \`string\`.`),null)});Te.displayName=me;var ve="ToastClose",ee=g((e,o)=>{const{__scopeToast:n,...t}=e,i=Ue(ve,n);return c(we,{asChild:!0,children:c(F.button,{type:"button",...t,ref:o,onClick:x(e.onClick,i.onClose)})})});ee.displayName=ve;var we=g((e,o)=>{const{__scopeToast:n,altText:t,...i}=e;return c(F.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":t||void 0,...i,ref:o})});function Ee(e){const o=[];return Array.from(e.childNodes).forEach(t=>{if(t.nodeType===t.TEXT_NODE&&t.textContent&&o.push(t.textContent),ze(t)){const i=t.ariaHidden||t.hidden||t.style.display==="none",l=t.dataset.radixToastAnnounceExclude==="";if(!i)if(l){const d=t.dataset.radixToastAnnounceAlt;d&&o.push(d)}else o.push(...Ee(t))}}),o}function q(e,o,n,{discrete:t}){const i=n.originalEvent.currentTarget,l=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});o&&i.addEventListener(e,o,{once:!0}),t?Fe(i,l):i.dispatchEvent(l)}var ye=(e,o,n=0)=>{const t=Math.abs(e.x),i=Math.abs(e.y),l=t>i;return o==="left"||o==="right"?l&&t>n:!l&&i>n};function je(e=()=>{}){const o=$(e);De(()=>{let n=0,t=0;return n=window.requestAnimationFrame(()=>t=window.requestAnimationFrame(o)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(t)}},[o])}function ze(e){return e.nodeType===e.ELEMENT_NODE}function Ge(e){const o=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:t=>{const i=t.tagName==="INPUT"&&t.type==="hidden";return t.disabled||t.hidden||i?NodeFilter.FILTER_SKIP:t.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)o.push(n.currentNode);return o}function te(e){const o=document.activeElement;return e.some(n=>n===o?!0:(n.focus(),document.activeElement!==o))}var Je=le,Qe=pe,Ze=fe,et=Te,tt=ee;export{et as A,tt as C,Qe as R,ce as T,Je as V,Ze as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{N as O,
|
|
1
|
+
import{N as O,d as M,h as y,A as N,y as P,m as T,q as v,p as E}from"./register-n8cQ4cVU.js";import{u as h}from"./index-CwEuOG-t.js";import{u as l}from"./index-DYBIOwPk.js";function U(e,n){return E((t,i)=>n[t][i]??t,e)}var g=e=>{const{present:n,children:t}=e,i=I(n),s=typeof t=="function"?t({present:i.isPresent}):O.only(t),a=h(i.ref,R(s));return typeof t=="function"||i.isPresent?M(s,{ref:a}):null};g.displayName="Presence";function I(e){const[n,t]=y(),i=N({}),s=N(e),a=N("none"),p=e?"mounted":"unmounted",[f,o]=U(p,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return P(()=>{const r=d(i.current);a.current=f==="mounted"?r:"none"},[f]),l(()=>{const r=i.current,c=s.current;if(c!==e){const A=a.current,m=d(r);e?o("MOUNT"):m==="none"||r?.display==="none"?o("UNMOUNT"):o(c&&A!==m?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,o]),l(()=>{if(n){const r=u=>{const m=d(i.current).includes(u.animationName);u.target===n&&m&&T(()=>o("ANIMATION_END"))},c=u=>{u.target===n&&(a.current=d(i.current))};return n.addEventListener("animationstart",c),n.addEventListener("animationcancel",r),n.addEventListener("animationend",r),()=>{n.removeEventListener("animationstart",c),n.removeEventListener("animationcancel",r),n.removeEventListener("animationend",r)}}else o("ANIMATION_END")},[n,o]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:v(r=>{r&&(i.current=getComputedStyle(r)),t(r)},[])}}function d(e){return e?.animationName||"none"}function R(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)}export{g as P};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as o}from"./register-n8cQ4cVU.js";var a=Boolean(globalThis?.document)?o:()=>{};export{a as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{y as f,G as X,k as p,x as A,h as m,u as b,A as y,R as Y}from"./register-
|
|
1
|
+
import{y as f,G as X,k as p,x as A,h as m,u as b,A as y,R as Y}from"./register-n8cQ4cVU.js";import{c as P}from"./index-BMUvgC0z.js";import{P as D,d as j}from"./index-xlO69rRA.js";import{u as F}from"./index-CwEuOG-t.js";import{u as O}from"./index-BMz8l7Ea.js";import{u as q}from"./index-DYBIOwPk.js";function J(s,e=globalThis?.document){const t=O(s);f(()=>{const r=n=>{n.key==="Escape"&&t(n)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[t,e])}var Q="DismissableLayer",L="dismissableLayer.update",V="dismissableLayer.pointerDownOutside",Z="dismissableLayer.focusOutside",I,N=X({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),C=p((s,e)=>{const{disableOutsidePointerEvents:t=!1,onEscapeKeyDown:r,onPointerDownOutside:n,onFocusOutside:o,onInteractOutside:u,onDismiss:d,...v}=s,a=A(N),[c,_]=m(null),l=c?.ownerDocument??globalThis?.document,[,U]=m({}),M=F(e,i=>_(i)),g=Array.from(a.layers),[z]=[...a.layersWithOutsidePointerEventsDisabled].slice(-1),H=g.indexOf(z),w=c?g.indexOf(c):-1,K=a.layersWithOutsidePointerEventsDisabled.size>0,R=w>=H,G=ee(i=>{const E=i.target,B=[...a.branches].some(h=>h.contains(E));!R||B||(n?.(i),u?.(i),i.defaultPrevented||d?.())},l),T=te(i=>{const E=i.target;[...a.branches].some(h=>h.contains(E))||(o?.(i),u?.(i),i.defaultPrevented||d?.())},l);return J(i=>{w===a.layers.size-1&&(r?.(i),!i.defaultPrevented&&d&&(i.preventDefault(),d()))},l),f(()=>{if(c)return t&&(a.layersWithOutsidePointerEventsDisabled.size===0&&(I=l.body.style.pointerEvents,l.body.style.pointerEvents="none"),a.layersWithOutsidePointerEventsDisabled.add(c)),a.layers.add(c),W(),()=>{t&&a.layersWithOutsidePointerEventsDisabled.size===1&&(l.body.style.pointerEvents=I)}},[c,l,t,a]),f(()=>()=>{c&&(a.layers.delete(c),a.layersWithOutsidePointerEventsDisabled.delete(c),W())},[c,a]),f(()=>{const i=()=>U({});return document.addEventListener(L,i),()=>document.removeEventListener(L,i)},[]),b(D.div,{...v,ref:M,style:{pointerEvents:K?R?"auto":"none":void 0,...s.style},onFocusCapture:P(s.onFocusCapture,T.onFocusCapture),onBlurCapture:P(s.onBlurCapture,T.onBlurCapture),onPointerDownCapture:P(s.onPointerDownCapture,G.onPointerDownCapture)})});C.displayName=Q;var $="DismissableLayerBranch",k=p((s,e)=>{const t=A(N),r=y(null),n=F(e,r);return f(()=>{const o=r.current;if(o)return t.branches.add(o),()=>{t.branches.delete(o)}},[t.branches]),b(D.div,{...s,ref:n})});k.displayName=$;function ee(s,e=globalThis?.document){const t=O(s),r=y(!1),n=y(()=>{});return f(()=>{const o=d=>{if(d.target&&!r.current){let v=function(){x(V,t,a,{discrete:!0})};const a={originalEvent:d};d.pointerType==="touch"?(e.removeEventListener("click",n.current),n.current=v,e.addEventListener("click",n.current,{once:!0})):v()}else e.removeEventListener("click",n.current);r.current=!1},u=window.setTimeout(()=>{e.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(u),e.removeEventListener("pointerdown",o),e.removeEventListener("click",n.current)}},[e,t]),{onPointerDownCapture:()=>r.current=!0}}function te(s,e=globalThis?.document){const t=O(s),r=y(!1);return f(()=>{const n=o=>{o.target&&!r.current&&x(Z,t,{originalEvent:o},{discrete:!1})};return e.addEventListener("focusin",n),()=>e.removeEventListener("focusin",n)},[e,t]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function W(){const s=new CustomEvent(L);document.dispatchEvent(s)}function x(s,e,t,{discrete:r}){const n=t.originalEvent.target,o=new CustomEvent(s,{bubbles:!1,cancelable:!0,detail:t});e&&n.addEventListener(s,e,{once:!0}),r?j(n,o):n.dispatchEvent(o)}var ne=C,se=k,re="Portal",S=p((s,e)=>{const{container:t,...r}=s,[n,o]=m(!1);q(()=>o(!0),[]);const u=t||n&&globalThis?.document?.body;return u?Y.createPortal(b(D.div,{...r,ref:e}),u):null});S.displayName=re;export{se as B,C as D,S as P,ne as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{k as p,u as c,A as g,y as A,h as Y,q as D,c as dn}from"./register-DdihPvJa.js";import{c as M,u as ln}from"./index-DCOcH9nN.js";import{u as L,c as Me,a as pn}from"./index-DvcM92mD.js";import{a as ve}from"./index-BaU0ZfEj.js";import{P as N,d as fn}from"./index-BYMJBUt7.js";import{c as mn}from"./index-DHGBvUxh.js";import{u as Mn}from"./index-CTs9Zxle.js";import{D as vn,P as hn}from"./index-DLCV57H_.js";import{h as gn,u as _n,F as Cn,o as wn}from"./index-DvEIspaW.js";import{c as he,A as Pn,C as Dn,a as In,R as En}from"./index-CidN3WJY.js";import{P as H}from"./index-sUyO5_Lv.js";import{c as ge,R as Sn,I as yn}from"./index-CEQ_0VwD.js";import{u as _e}from"./index-CxCCwn9J.js";import{u as Ce}from"./index-Bm-SkoWD.js";var ne=["Enter"," "],xn=["ArrowDown","PageUp","Home"],we=["ArrowUp","PageDown","End"],Rn=[...xn,...we],bn={ltr:[...ne,"ArrowRight"],rtl:[...ne,"ArrowLeft"]},An={ltr:["ArrowLeft"],rtl:["ArrowRight"]},F="Menu",[G,Nn,Tn]=mn(F),[E,Pe]=ve(F,[Tn,he,ge]),W=he(),De=ge(),[On,S]=E(F),[kn,K]=E(F),Ie=e=>{const{__scopeMenu:o,open:n=!1,children:t,dir:r,onOpenChange:a,modal:i=!0}=e,d=W(o),[f,m]=Y(null),l=g(!1),s=_e(a),v=Mn(r);return A(()=>{const P=()=>{l.current=!0,document.addEventListener("pointerdown",h,{capture:!0,once:!0}),document.addEventListener("pointermove",h,{capture:!0,once:!0})},h=()=>l.current=!1;return document.addEventListener("keydown",P,{capture:!0}),()=>{document.removeEventListener("keydown",P,{capture:!0}),document.removeEventListener("pointerdown",h,{capture:!0}),document.removeEventListener("pointermove",h,{capture:!0})}},[]),c(En,{...d,children:c(On,{scope:o,open:n,onOpenChange:s,content:f,onContentChange:m,children:c(kn,{scope:o,onClose:D(()=>s(!1),[s]),isUsingKeyboardRef:l,dir:v,modal:i,children:t})})})};Ie.displayName=F;var Ln="MenuAnchor",oe=p((e,o)=>{const{__scopeMenu:n,...t}=e,r=W(n);return c(Pn,{...r,...t,ref:o})});oe.displayName=Ln;var te="MenuPortal",[Fn,Ee]=E(te,{forceMount:void 0}),Se=e=>{const{__scopeMenu:o,forceMount:n,children:t,container:r}=e,a=S(te,o);return c(Fn,{scope:o,forceMount:n,children:c(H,{present:n||a.open,children:c(hn,{asChild:!0,container:r,children:t})})})};Se.displayName=te;var w="MenuContent",[Gn,re]=E(w),ye=p((e,o)=>{const n=Ee(w,e.__scopeMenu),{forceMount:t=n.forceMount,...r}=e,a=S(w,e.__scopeMenu),i=K(w,e.__scopeMenu);return c(G.Provider,{scope:e.__scopeMenu,children:c(H,{present:t||a.open,children:c(G.Slot,{scope:e.__scopeMenu,children:i.modal?c(Kn,{...r,ref:o}):c(Un,{...r,ref:o})})})})}),Kn=p((e,o)=>{const n=S(w,e.__scopeMenu),t=g(null),r=L(o,t);return A(()=>{const a=t.current;if(a)return gn(a)},[]),c(ae,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:M(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Un=p((e,o)=>{const n=S(w,e.__scopeMenu);return c(ae,{...e,ref:o,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),ae=p((e,o)=>{const{__scopeMenu:n,loop:t=!1,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:d,onEntryFocus:f,onEscapeKeyDown:m,onPointerDownOutside:l,onFocusOutside:s,onInteractOutside:v,onDismiss:P,disableOutsideScroll:h,...y}=e,T=S(w,n),x=K(w,n),nn=W(n),on=De(n),de=Nn(n),[tn,le]=Y(null),B=g(null),rn=L(o,B,T.onContentChange),V=g(0),X=g(""),an=g(0),Z=g(null),pe=g("right"),J=g(0),cn=h?wn:dn,sn=h?{as:pn,allowPinchZoom:!0}:void 0,un=u=>{const b=X.current+u,I=de().filter(C=>!C.disabled),O=document.activeElement,Q=I.find(C=>C.ref.current===O)?.textValue,ee=I.map(C=>C.textValue),fe=Jn(ee,b,Q),k=I.find(C=>C.textValue===fe)?.ref.current;(function C(me){X.current=me,window.clearTimeout(V.current),me!==""&&(V.current=window.setTimeout(()=>C(""),1e3))})(b),k&&setTimeout(()=>k.focus())};A(()=>()=>window.clearTimeout(V.current),[]),_n();const R=D(u=>pe.current===Z.current?.side&&eo(u,Z.current?.area),[]);return c(Gn,{scope:n,searchRef:X,onItemEnter:D(u=>{R(u)&&u.preventDefault()},[R]),onItemLeave:D(u=>{R(u)||(B.current?.focus(),le(null))},[R]),onTriggerLeave:D(u=>{R(u)&&u.preventDefault()},[R]),pointerGraceTimerRef:an,onPointerGraceIntentChange:D(u=>{Z.current=u},[]),children:c(cn,{...sn,children:c(Cn,{asChild:!0,trapped:r,onMountAutoFocus:M(a,u=>{u.preventDefault(),B.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:c(vn,{asChild:!0,disableOutsidePointerEvents:d,onEscapeKeyDown:m,onPointerDownOutside:l,onFocusOutside:s,onInteractOutside:v,onDismiss:P,children:c(Sn,{asChild:!0,...on,dir:x.dir,orientation:"vertical",loop:t,currentTabStopId:tn,onCurrentTabStopIdChange:le,onEntryFocus:M(f,u=>{x.isUsingKeyboardRef.current||u.preventDefault()}),preventScrollOnEntryFocus:!0,children:c(Dn,{role:"menu","aria-orientation":"vertical","data-state":Xe(T.open),"data-radix-menu-content":"",dir:x.dir,...nn,...y,ref:rn,style:{outline:"none",...y.style},onKeyDown:M(y.onKeyDown,u=>{const I=u.target.closest("[data-radix-menu-content]")===u.currentTarget,O=u.ctrlKey||u.altKey||u.metaKey,Q=u.key.length===1;I&&(u.key==="Tab"&&u.preventDefault(),!O&&Q&&un(u.key));const ee=B.current;if(u.target!==ee||!Rn.includes(u.key))return;u.preventDefault();const k=de().filter(C=>!C.disabled).map(C=>C.ref.current);we.includes(u.key)&&k.reverse(),qn(k)}),onBlur:M(e.onBlur,u=>{u.currentTarget.contains(u.target)||(window.clearTimeout(V.current),X.current="")}),onPointerMove:M(e.onPointerMove,$(u=>{const b=u.target,I=J.current!==u.clientX;if(u.currentTarget.contains(b)&&I){const O=u.clientX>J.current?"right":"left";pe.current=O,J.current=u.clientX}}))})})})})})})});ye.displayName=w;var $n="MenuGroup",ce=p((e,o)=>{const{__scopeMenu:n,...t}=e;return c(N.div,{role:"group",...t,ref:o})});ce.displayName=$n;var Bn="MenuLabel",xe=p((e,o)=>{const{__scopeMenu:n,...t}=e;return c(N.div,{...t,ref:o})});xe.displayName=Bn;var j="MenuItem",Re="menu.itemSelect",z=p((e,o)=>{const{disabled:n=!1,onSelect:t,...r}=e,a=g(null),i=K(j,e.__scopeMenu),d=re(j,e.__scopeMenu),f=L(o,a),m=g(!1),l=()=>{const s=a.current;if(!n&&s){const v=new CustomEvent(Re,{bubbles:!0,cancelable:!0});s.addEventListener(Re,P=>t?.(P),{once:!0}),fn(s,v),v.defaultPrevented?m.current=!1:i.onClose()}};return c(be,{...r,ref:f,disabled:n,onClick:M(e.onClick,l),onPointerDown:s=>{e.onPointerDown?.(s),m.current=!0},onPointerUp:M(e.onPointerUp,s=>{m.current||s.currentTarget?.click()}),onKeyDown:M(e.onKeyDown,s=>{const v=d.searchRef.current!=="";n||v&&s.key===" "||ne.includes(s.key)&&(s.currentTarget.click(),s.preventDefault())})})});z.displayName=j;var be=p((e,o)=>{const{__scopeMenu:n,disabled:t=!1,textValue:r,...a}=e,i=re(j,n),d=De(n),f=g(null),m=L(o,f),[l,s]=Y(!1),[v,P]=Y("");return A(()=>{const h=f.current;h&&P((h.textContent??"").trim())},[a.children]),c(G.ItemSlot,{scope:n,disabled:t,textValue:r??v,children:c(yn,{asChild:!0,...d,focusable:!t,children:c(N.div,{role:"menuitem","data-highlighted":l?"":void 0,"aria-disabled":t||void 0,"data-disabled":t?"":void 0,...a,ref:m,onPointerMove:M(e.onPointerMove,$(h=>{t?i.onItemLeave(h):(i.onItemEnter(h),h.defaultPrevented||h.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:M(e.onPointerLeave,$(h=>i.onItemLeave(h))),onFocus:M(e.onFocus,()=>s(!0)),onBlur:M(e.onBlur,()=>s(!1))})})})}),Vn="MenuCheckboxItem",Ae=p((e,o)=>{const{checked:n=!1,onCheckedChange:t,...r}=e;return c(Le,{scope:e.__scopeMenu,checked:n,children:c(z,{role:"menuitemcheckbox","aria-checked":q(n)?"mixed":n,...r,ref:o,"data-state":ue(n),onSelect:M(r.onSelect,()=>t?.(q(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Ae.displayName=Vn;var Ne="MenuRadioGroup",[Xn,Yn]=E(Ne,{value:void 0,onValueChange:()=>{}}),Te=p((e,o)=>{const{value:n,onValueChange:t,...r}=e,a=_e(t);return c(Xn,{scope:e.__scopeMenu,value:n,onValueChange:a,children:c(ce,{...r,ref:o})})});Te.displayName=Ne;var Oe="MenuRadioItem",ke=p((e,o)=>{const{value:n,...t}=e,r=Yn(Oe,e.__scopeMenu),a=n===r.value;return c(Le,{scope:e.__scopeMenu,checked:a,children:c(z,{role:"menuitemradio","aria-checked":a,...t,ref:o,"data-state":ue(a),onSelect:M(t.onSelect,()=>r.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});ke.displayName=Oe;var se="MenuItemIndicator",[Le,Hn]=E(se,{checked:!1}),Fe=p((e,o)=>{const{__scopeMenu:n,forceMount:t,...r}=e,a=Hn(se,n);return c(H,{present:t||q(a.checked)||a.checked===!0,children:c(N.span,{...r,ref:o,"data-state":ue(a.checked)})})});Fe.displayName=se;var Wn="MenuSeparator",Ge=p((e,o)=>{const{__scopeMenu:n,...t}=e;return c(N.div,{role:"separator","aria-orientation":"horizontal",...t,ref:o})});Ge.displayName=Wn;var jn="MenuArrow",Ke=p((e,o)=>{const{__scopeMenu:n,...t}=e,r=W(n);return c(In,{...r,...t,ref:o})});Ke.displayName=jn;var zn="MenuSub",[ct,Ue]=E(zn),U="MenuSubTrigger",$e=p((e,o)=>{const n=S(U,e.__scopeMenu),t=K(U,e.__scopeMenu),r=Ue(U,e.__scopeMenu),a=re(U,e.__scopeMenu),i=g(null),{pointerGraceTimerRef:d,onPointerGraceIntentChange:f}=a,m={__scopeMenu:e.__scopeMenu},l=D(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return A(()=>l,[l]),A(()=>{const s=d.current;return()=>{window.clearTimeout(s),f(null)}},[d,f]),c(oe,{asChild:!0,...m,children:c(be,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":Xe(n.open),...e,ref:Me(o,r.onTriggerChange),onClick:s=>{e.onClick?.(s),!(e.disabled||s.defaultPrevented)&&(s.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:M(e.onPointerMove,$(s=>{a.onItemEnter(s),!s.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),l()},100))})),onPointerLeave:M(e.onPointerLeave,$(s=>{l();const v=n.content?.getBoundingClientRect();if(v){const P=n.content?.dataset.side,h=P==="right",y=h?-5:5,T=v[h?"left":"right"],x=v[h?"right":"left"];a.onPointerGraceIntentChange({area:[{x:s.clientX+y,y:s.clientY},{x:T,y:v.top},{x,y:v.top},{x,y:v.bottom},{x:T,y:v.bottom}],side:P}),window.clearTimeout(d.current),d.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(s),s.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:M(e.onKeyDown,s=>{const v=a.searchRef.current!=="";e.disabled||v&&s.key===" "||bn[t.dir].includes(s.key)&&(n.onOpenChange(!0),n.content?.focus(),s.preventDefault())})})})});$e.displayName=U;var Be="MenuSubContent",Ve=p((e,o)=>{const n=Ee(w,e.__scopeMenu),{forceMount:t=n.forceMount,...r}=e,a=S(w,e.__scopeMenu),i=K(w,e.__scopeMenu),d=Ue(Be,e.__scopeMenu),f=g(null),m=L(o,f);return c(G.Provider,{scope:e.__scopeMenu,children:c(H,{present:t||a.open,children:c(G.Slot,{scope:e.__scopeMenu,children:c(ae,{id:d.contentId,"aria-labelledby":d.triggerId,...r,ref:m,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:l=>{i.isUsingKeyboardRef.current&&f.current?.focus(),l.preventDefault()},onCloseAutoFocus:l=>l.preventDefault(),onFocusOutside:M(e.onFocusOutside,l=>{l.target!==d.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:M(e.onEscapeKeyDown,l=>{i.onClose(),l.preventDefault()}),onKeyDown:M(e.onKeyDown,l=>{const s=l.currentTarget.contains(l.target),v=An[i.dir].includes(l.key);s&&v&&(a.onOpenChange(!1),d.trigger?.focus(),l.preventDefault())})})})})})});Ve.displayName=Be;function Xe(e){return e?"open":"closed"}function q(e){return e==="indeterminate"}function ue(e){return q(e)?"indeterminate":e?"checked":"unchecked"}function qn(e){const o=document.activeElement;for(const n of e)if(n===o||(n.focus(),document.activeElement!==o))return}function Zn(e,o){return e.map((n,t)=>e[(o+t)%e.length])}function Jn(e,o,n){const r=o.length>1&&Array.from(o).every(m=>m===o[0])?o[0]:o,a=n?e.indexOf(n):-1;let i=Zn(e,Math.max(a,0));r.length===1&&(i=i.filter(m=>m!==n));const f=i.find(m=>m.toLowerCase().startsWith(r.toLowerCase()));return f!==n?f:void 0}function Qn(e,o){const{x:n,y:t}=e;let r=!1;for(let a=0,i=o.length-1;a<o.length;i=a++){const d=o[a].x,f=o[a].y,m=o[i].x,l=o[i].y;f>t!=l>t&&n<(m-d)*(t-f)/(l-f)+d&&(r=!r)}return r}function eo(e,o){if(!o)return!1;const n={x:e.clientX,y:e.clientY};return Qn(n,o)}function $(e){return o=>o.pointerType==="mouse"?e(o):void 0}var no=Ie,oo=oe,to=Se,ro=ye,ao=ce,co=xe,so=z,uo=Ae,io=Te,lo=ke,po=Fe,fo=Ge,mo=Ke,Mo=$e,vo=Ve,ie="DropdownMenu",[ho,st]=ve(ie,[Pe]),_=Pe(),[go,Ye]=ho(ie),He=e=>{const{__scopeDropdownMenu:o,children:n,dir:t,open:r,defaultOpen:a,onOpenChange:i,modal:d=!0}=e,f=_(o),m=g(null),[l=!1,s]=ln({prop:r,defaultProp:a,onChange:i});return c(go,{scope:o,triggerId:Ce(),triggerRef:m,contentId:Ce(),open:l,onOpenChange:s,onOpenToggle:D(()=>s(v=>!v),[s]),modal:d,children:c(no,{...f,open:l,onOpenChange:s,dir:t,modal:d,children:n})})};He.displayName=ie;var We="DropdownMenuTrigger",je=p((e,o)=>{const{__scopeDropdownMenu:n,disabled:t=!1,...r}=e,a=Ye(We,n),i=_(n);return c(oo,{asChild:!0,...i,children:c(N.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":t?"":void 0,disabled:t,...r,ref:Me(o,a.triggerRef),onPointerDown:M(e.onPointerDown,d=>{!t&&d.button===0&&d.ctrlKey===!1&&(a.onOpenToggle(),a.open||d.preventDefault())}),onKeyDown:M(e.onKeyDown,d=>{t||(["Enter"," "].includes(d.key)&&a.onOpenToggle(),d.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(d.key)&&d.preventDefault())})})})});je.displayName=We;var _o="DropdownMenuPortal",ze=e=>{const{__scopeDropdownMenu:o,...n}=e,t=_(o);return c(to,{...t,...n})};ze.displayName=_o;var qe="DropdownMenuContent",Ze=p((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,r=Ye(qe,n),a=_(n),i=g(!1);return c(ro,{id:r.contentId,"aria-labelledby":r.triggerId,...a,...t,ref:o,onCloseAutoFocus:M(e.onCloseAutoFocus,d=>{i.current||r.triggerRef.current?.focus(),i.current=!1,d.preventDefault()}),onInteractOutside:M(e.onInteractOutside,d=>{const f=d.detail.originalEvent,m=f.button===0&&f.ctrlKey===!0,l=f.button===2||m;(!r.modal||l)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Ze.displayName=qe;var Co="DropdownMenuGroup",wo=p((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,r=_(n);return c(ao,{...r,...t,ref:o})});wo.displayName=Co;var Po="DropdownMenuLabel",Je=p((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,r=_(n);return c(co,{...r,...t,ref:o})});Je.displayName=Po;var Do="DropdownMenuItem",Qe=p((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,r=_(n);return c(so,{...r,...t,ref:o})});Qe.displayName=Do;var Io="DropdownMenuCheckboxItem",Eo=p((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,r=_(n);return c(uo,{...r,...t,ref:o})});Eo.displayName=Io;var So="DropdownMenuRadioGroup",yo=p((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,r=_(n);return c(io,{...r,...t,ref:o})});yo.displayName=So;var xo="DropdownMenuRadioItem",Ro=p((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,r=_(n);return c(lo,{...r,...t,ref:o})});Ro.displayName=xo;var bo="DropdownMenuItemIndicator",Ao=p((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,r=_(n);return c(po,{...r,...t,ref:o})});Ao.displayName=bo;var No="DropdownMenuSeparator",en=p((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,r=_(n);return c(fo,{...r,...t,ref:o})});en.displayName=No;var To="DropdownMenuArrow",Oo=p((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,r=_(n);return c(mo,{...r,...t,ref:o})});Oo.displayName=To;var ko="DropdownMenuSubTrigger",Lo=p((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,r=_(n);return c(Mo,{...r,...t,ref:o})});Lo.displayName=ko;var Fo="DropdownMenuSubContent",Go=p((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,r=_(n);return c(vo,{...r,...t,ref:o,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Go.displayName=Fo;var Ko=He,Uo=je,$o=ze,Bo=Ze,Vo=Je,Xo=Qe,Yo=en;export{Bo as C,Xo as I,Vo as L,$o as P,Ko as R,Yo as S,Uo as T};
|
|
1
|
+
import{k as p,u as c,A as g,y as A,h as Y,q as D,b as dn}from"./register-n8cQ4cVU.js";import{c as M,u as ln}from"./index-BMUvgC0z.js";import{u as L,c as Me,a as pn}from"./index-CwEuOG-t.js";import{a as ve}from"./index-RWAeIAOl.js";import{P as N,d as fn}from"./index-xlO69rRA.js";import{c as mn}from"./index-CGi7EQ4B.js";import{u as Mn}from"./index-D3P1ZBL7.js";import{D as vn,P as hn}from"./index-Da2N7fS9.js";import{h as gn,u as _n,F as Cn,o as wn}from"./index-BZ2epHJe.js";import{c as he,A as Pn,C as Dn,a as In,R as En}from"./index-sjjhrOQO.js";import{P as H}from"./index-DXPdEuVD.js";import{c as ge,R as Sn,I as yn}from"./index-C9mlvE8r.js";import{u as _e}from"./index-BMz8l7Ea.js";import{u as Ce}from"./index-CoOTQzY_.js";var ne=["Enter"," "],xn=["ArrowDown","PageUp","Home"],we=["ArrowUp","PageDown","End"],bn=[...xn,...we],Rn={ltr:[...ne,"ArrowRight"],rtl:[...ne,"ArrowLeft"]},An={ltr:["ArrowLeft"],rtl:["ArrowRight"]},F="Menu",[G,Nn,Tn]=mn(F),[E,Pe]=ve(F,[Tn,he,ge]),W=he(),De=ge(),[On,S]=E(F),[kn,K]=E(F),Ie=e=>{const{__scopeMenu:o,open:n=!1,children:t,dir:r,onOpenChange:a,modal:i=!0}=e,d=W(o),[f,m]=Y(null),l=g(!1),s=_e(a),v=Mn(r);return A(()=>{const P=()=>{l.current=!0,document.addEventListener("pointerdown",h,{capture:!0,once:!0}),document.addEventListener("pointermove",h,{capture:!0,once:!0})},h=()=>l.current=!1;return document.addEventListener("keydown",P,{capture:!0}),()=>{document.removeEventListener("keydown",P,{capture:!0}),document.removeEventListener("pointerdown",h,{capture:!0}),document.removeEventListener("pointermove",h,{capture:!0})}},[]),c(En,{...d,children:c(On,{scope:o,open:n,onOpenChange:s,content:f,onContentChange:m,children:c(kn,{scope:o,onClose:D(()=>s(!1),[s]),isUsingKeyboardRef:l,dir:v,modal:i,children:t})})})};Ie.displayName=F;var Ln="MenuAnchor",oe=p((e,o)=>{const{__scopeMenu:n,...t}=e,r=W(n);return c(Pn,{...r,...t,ref:o})});oe.displayName=Ln;var te="MenuPortal",[Fn,Ee]=E(te,{forceMount:void 0}),Se=e=>{const{__scopeMenu:o,forceMount:n,children:t,container:r}=e,a=S(te,o);return c(Fn,{scope:o,forceMount:n,children:c(H,{present:n||a.open,children:c(hn,{asChild:!0,container:r,children:t})})})};Se.displayName=te;var w="MenuContent",[Gn,re]=E(w),ye=p((e,o)=>{const n=Ee(w,e.__scopeMenu),{forceMount:t=n.forceMount,...r}=e,a=S(w,e.__scopeMenu),i=K(w,e.__scopeMenu);return c(G.Provider,{scope:e.__scopeMenu,children:c(H,{present:t||a.open,children:c(G.Slot,{scope:e.__scopeMenu,children:i.modal?c(Kn,{...r,ref:o}):c(Un,{...r,ref:o})})})})}),Kn=p((e,o)=>{const n=S(w,e.__scopeMenu),t=g(null),r=L(o,t);return A(()=>{const a=t.current;if(a)return gn(a)},[]),c(ae,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:M(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Un=p((e,o)=>{const n=S(w,e.__scopeMenu);return c(ae,{...e,ref:o,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),ae=p((e,o)=>{const{__scopeMenu:n,loop:t=!1,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:d,onEntryFocus:f,onEscapeKeyDown:m,onPointerDownOutside:l,onFocusOutside:s,onInteractOutside:v,onDismiss:P,disableOutsideScroll:h,...y}=e,T=S(w,n),x=K(w,n),nn=W(n),on=De(n),de=Nn(n),[tn,le]=Y(null),B=g(null),rn=L(o,B,T.onContentChange),V=g(0),X=g(""),an=g(0),Z=g(null),pe=g("right"),J=g(0),cn=h?wn:dn,sn=h?{as:pn,allowPinchZoom:!0}:void 0,un=u=>{const R=X.current+u,I=de().filter(C=>!C.disabled),O=document.activeElement,Q=I.find(C=>C.ref.current===O)?.textValue,ee=I.map(C=>C.textValue),fe=Jn(ee,R,Q),k=I.find(C=>C.textValue===fe)?.ref.current;(function C(me){X.current=me,window.clearTimeout(V.current),me!==""&&(V.current=window.setTimeout(()=>C(""),1e3))})(R),k&&setTimeout(()=>k.focus())};A(()=>()=>window.clearTimeout(V.current),[]),_n();const b=D(u=>pe.current===Z.current?.side&&eo(u,Z.current?.area),[]);return c(Gn,{scope:n,searchRef:X,onItemEnter:D(u=>{b(u)&&u.preventDefault()},[b]),onItemLeave:D(u=>{b(u)||(B.current?.focus(),le(null))},[b]),onTriggerLeave:D(u=>{b(u)&&u.preventDefault()},[b]),pointerGraceTimerRef:an,onPointerGraceIntentChange:D(u=>{Z.current=u},[]),children:c(cn,{...sn,children:c(Cn,{asChild:!0,trapped:r,onMountAutoFocus:M(a,u=>{u.preventDefault(),B.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:c(vn,{asChild:!0,disableOutsidePointerEvents:d,onEscapeKeyDown:m,onPointerDownOutside:l,onFocusOutside:s,onInteractOutside:v,onDismiss:P,children:c(Sn,{asChild:!0,...on,dir:x.dir,orientation:"vertical",loop:t,currentTabStopId:tn,onCurrentTabStopIdChange:le,onEntryFocus:M(f,u=>{x.isUsingKeyboardRef.current||u.preventDefault()}),preventScrollOnEntryFocus:!0,children:c(Dn,{role:"menu","aria-orientation":"vertical","data-state":Xe(T.open),"data-radix-menu-content":"",dir:x.dir,...nn,...y,ref:rn,style:{outline:"none",...y.style},onKeyDown:M(y.onKeyDown,u=>{const I=u.target.closest("[data-radix-menu-content]")===u.currentTarget,O=u.ctrlKey||u.altKey||u.metaKey,Q=u.key.length===1;I&&(u.key==="Tab"&&u.preventDefault(),!O&&Q&&un(u.key));const ee=B.current;if(u.target!==ee||!bn.includes(u.key))return;u.preventDefault();const k=de().filter(C=>!C.disabled).map(C=>C.ref.current);we.includes(u.key)&&k.reverse(),qn(k)}),onBlur:M(e.onBlur,u=>{u.currentTarget.contains(u.target)||(window.clearTimeout(V.current),X.current="")}),onPointerMove:M(e.onPointerMove,$(u=>{const R=u.target,I=J.current!==u.clientX;if(u.currentTarget.contains(R)&&I){const O=u.clientX>J.current?"right":"left";pe.current=O,J.current=u.clientX}}))})})})})})})});ye.displayName=w;var $n="MenuGroup",ce=p((e,o)=>{const{__scopeMenu:n,...t}=e;return c(N.div,{role:"group",...t,ref:o})});ce.displayName=$n;var Bn="MenuLabel",xe=p((e,o)=>{const{__scopeMenu:n,...t}=e;return c(N.div,{...t,ref:o})});xe.displayName=Bn;var j="MenuItem",be="menu.itemSelect",z=p((e,o)=>{const{disabled:n=!1,onSelect:t,...r}=e,a=g(null),i=K(j,e.__scopeMenu),d=re(j,e.__scopeMenu),f=L(o,a),m=g(!1),l=()=>{const s=a.current;if(!n&&s){const v=new CustomEvent(be,{bubbles:!0,cancelable:!0});s.addEventListener(be,P=>t?.(P),{once:!0}),fn(s,v),v.defaultPrevented?m.current=!1:i.onClose()}};return c(Re,{...r,ref:f,disabled:n,onClick:M(e.onClick,l),onPointerDown:s=>{e.onPointerDown?.(s),m.current=!0},onPointerUp:M(e.onPointerUp,s=>{m.current||s.currentTarget?.click()}),onKeyDown:M(e.onKeyDown,s=>{const v=d.searchRef.current!=="";n||v&&s.key===" "||ne.includes(s.key)&&(s.currentTarget.click(),s.preventDefault())})})});z.displayName=j;var Re=p((e,o)=>{const{__scopeMenu:n,disabled:t=!1,textValue:r,...a}=e,i=re(j,n),d=De(n),f=g(null),m=L(o,f),[l,s]=Y(!1),[v,P]=Y("");return A(()=>{const h=f.current;h&&P((h.textContent??"").trim())},[a.children]),c(G.ItemSlot,{scope:n,disabled:t,textValue:r??v,children:c(yn,{asChild:!0,...d,focusable:!t,children:c(N.div,{role:"menuitem","data-highlighted":l?"":void 0,"aria-disabled":t||void 0,"data-disabled":t?"":void 0,...a,ref:m,onPointerMove:M(e.onPointerMove,$(h=>{t?i.onItemLeave(h):(i.onItemEnter(h),h.defaultPrevented||h.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:M(e.onPointerLeave,$(h=>i.onItemLeave(h))),onFocus:M(e.onFocus,()=>s(!0)),onBlur:M(e.onBlur,()=>s(!1))})})})}),Vn="MenuCheckboxItem",Ae=p((e,o)=>{const{checked:n=!1,onCheckedChange:t,...r}=e;return c(Le,{scope:e.__scopeMenu,checked:n,children:c(z,{role:"menuitemcheckbox","aria-checked":q(n)?"mixed":n,...r,ref:o,"data-state":ue(n),onSelect:M(r.onSelect,()=>t?.(q(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Ae.displayName=Vn;var Ne="MenuRadioGroup",[Xn,Yn]=E(Ne,{value:void 0,onValueChange:()=>{}}),Te=p((e,o)=>{const{value:n,onValueChange:t,...r}=e,a=_e(t);return c(Xn,{scope:e.__scopeMenu,value:n,onValueChange:a,children:c(ce,{...r,ref:o})})});Te.displayName=Ne;var Oe="MenuRadioItem",ke=p((e,o)=>{const{value:n,...t}=e,r=Yn(Oe,e.__scopeMenu),a=n===r.value;return c(Le,{scope:e.__scopeMenu,checked:a,children:c(z,{role:"menuitemradio","aria-checked":a,...t,ref:o,"data-state":ue(a),onSelect:M(t.onSelect,()=>r.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});ke.displayName=Oe;var se="MenuItemIndicator",[Le,Hn]=E(se,{checked:!1}),Fe=p((e,o)=>{const{__scopeMenu:n,forceMount:t,...r}=e,a=Hn(se,n);return c(H,{present:t||q(a.checked)||a.checked===!0,children:c(N.span,{...r,ref:o,"data-state":ue(a.checked)})})});Fe.displayName=se;var Wn="MenuSeparator",Ge=p((e,o)=>{const{__scopeMenu:n,...t}=e;return c(N.div,{role:"separator","aria-orientation":"horizontal",...t,ref:o})});Ge.displayName=Wn;var jn="MenuArrow",Ke=p((e,o)=>{const{__scopeMenu:n,...t}=e,r=W(n);return c(In,{...r,...t,ref:o})});Ke.displayName=jn;var zn="MenuSub",[ct,Ue]=E(zn),U="MenuSubTrigger",$e=p((e,o)=>{const n=S(U,e.__scopeMenu),t=K(U,e.__scopeMenu),r=Ue(U,e.__scopeMenu),a=re(U,e.__scopeMenu),i=g(null),{pointerGraceTimerRef:d,onPointerGraceIntentChange:f}=a,m={__scopeMenu:e.__scopeMenu},l=D(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return A(()=>l,[l]),A(()=>{const s=d.current;return()=>{window.clearTimeout(s),f(null)}},[d,f]),c(oe,{asChild:!0,...m,children:c(Re,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":Xe(n.open),...e,ref:Me(o,r.onTriggerChange),onClick:s=>{e.onClick?.(s),!(e.disabled||s.defaultPrevented)&&(s.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:M(e.onPointerMove,$(s=>{a.onItemEnter(s),!s.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),l()},100))})),onPointerLeave:M(e.onPointerLeave,$(s=>{l();const v=n.content?.getBoundingClientRect();if(v){const P=n.content?.dataset.side,h=P==="right",y=h?-5:5,T=v[h?"left":"right"],x=v[h?"right":"left"];a.onPointerGraceIntentChange({area:[{x:s.clientX+y,y:s.clientY},{x:T,y:v.top},{x,y:v.top},{x,y:v.bottom},{x:T,y:v.bottom}],side:P}),window.clearTimeout(d.current),d.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(s),s.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:M(e.onKeyDown,s=>{const v=a.searchRef.current!=="";e.disabled||v&&s.key===" "||Rn[t.dir].includes(s.key)&&(n.onOpenChange(!0),n.content?.focus(),s.preventDefault())})})})});$e.displayName=U;var Be="MenuSubContent",Ve=p((e,o)=>{const n=Ee(w,e.__scopeMenu),{forceMount:t=n.forceMount,...r}=e,a=S(w,e.__scopeMenu),i=K(w,e.__scopeMenu),d=Ue(Be,e.__scopeMenu),f=g(null),m=L(o,f);return c(G.Provider,{scope:e.__scopeMenu,children:c(H,{present:t||a.open,children:c(G.Slot,{scope:e.__scopeMenu,children:c(ae,{id:d.contentId,"aria-labelledby":d.triggerId,...r,ref:m,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:l=>{i.isUsingKeyboardRef.current&&f.current?.focus(),l.preventDefault()},onCloseAutoFocus:l=>l.preventDefault(),onFocusOutside:M(e.onFocusOutside,l=>{l.target!==d.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:M(e.onEscapeKeyDown,l=>{i.onClose(),l.preventDefault()}),onKeyDown:M(e.onKeyDown,l=>{const s=l.currentTarget.contains(l.target),v=An[i.dir].includes(l.key);s&&v&&(a.onOpenChange(!1),d.trigger?.focus(),l.preventDefault())})})})})})});Ve.displayName=Be;function Xe(e){return e?"open":"closed"}function q(e){return e==="indeterminate"}function ue(e){return q(e)?"indeterminate":e?"checked":"unchecked"}function qn(e){const o=document.activeElement;for(const n of e)if(n===o||(n.focus(),document.activeElement!==o))return}function Zn(e,o){return e.map((n,t)=>e[(o+t)%e.length])}function Jn(e,o,n){const r=o.length>1&&Array.from(o).every(m=>m===o[0])?o[0]:o,a=n?e.indexOf(n):-1;let i=Zn(e,Math.max(a,0));r.length===1&&(i=i.filter(m=>m!==n));const f=i.find(m=>m.toLowerCase().startsWith(r.toLowerCase()));return f!==n?f:void 0}function Qn(e,o){const{x:n,y:t}=e;let r=!1;for(let a=0,i=o.length-1;a<o.length;i=a++){const d=o[a].x,f=o[a].y,m=o[i].x,l=o[i].y;f>t!=l>t&&n<(m-d)*(t-f)/(l-f)+d&&(r=!r)}return r}function eo(e,o){if(!o)return!1;const n={x:e.clientX,y:e.clientY};return Qn(n,o)}function $(e){return o=>o.pointerType==="mouse"?e(o):void 0}var no=Ie,oo=oe,to=Se,ro=ye,ao=ce,co=xe,so=z,uo=Ae,io=Te,lo=ke,po=Fe,fo=Ge,mo=Ke,Mo=$e,vo=Ve,ie="DropdownMenu",[ho,st]=ve(ie,[Pe]),_=Pe(),[go,Ye]=ho(ie),He=e=>{const{__scopeDropdownMenu:o,children:n,dir:t,open:r,defaultOpen:a,onOpenChange:i,modal:d=!0}=e,f=_(o),m=g(null),[l=!1,s]=ln({prop:r,defaultProp:a,onChange:i});return c(go,{scope:o,triggerId:Ce(),triggerRef:m,contentId:Ce(),open:l,onOpenChange:s,onOpenToggle:D(()=>s(v=>!v),[s]),modal:d,children:c(no,{...f,open:l,onOpenChange:s,dir:t,modal:d,children:n})})};He.displayName=ie;var We="DropdownMenuTrigger",je=p((e,o)=>{const{__scopeDropdownMenu:n,disabled:t=!1,...r}=e,a=Ye(We,n),i=_(n);return c(oo,{asChild:!0,...i,children:c(N.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":t?"":void 0,disabled:t,...r,ref:Me(o,a.triggerRef),onPointerDown:M(e.onPointerDown,d=>{!t&&d.button===0&&d.ctrlKey===!1&&(a.onOpenToggle(),a.open||d.preventDefault())}),onKeyDown:M(e.onKeyDown,d=>{t||(["Enter"," "].includes(d.key)&&a.onOpenToggle(),d.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(d.key)&&d.preventDefault())})})})});je.displayName=We;var _o="DropdownMenuPortal",ze=e=>{const{__scopeDropdownMenu:o,...n}=e,t=_(o);return c(to,{...t,...n})};ze.displayName=_o;var qe="DropdownMenuContent",Ze=p((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,r=Ye(qe,n),a=_(n),i=g(!1);return c(ro,{id:r.contentId,"aria-labelledby":r.triggerId,...a,...t,ref:o,onCloseAutoFocus:M(e.onCloseAutoFocus,d=>{i.current||r.triggerRef.current?.focus(),i.current=!1,d.preventDefault()}),onInteractOutside:M(e.onInteractOutside,d=>{const f=d.detail.originalEvent,m=f.button===0&&f.ctrlKey===!0,l=f.button===2||m;(!r.modal||l)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Ze.displayName=qe;var Co="DropdownMenuGroup",wo=p((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,r=_(n);return c(ao,{...r,...t,ref:o})});wo.displayName=Co;var Po="DropdownMenuLabel",Je=p((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,r=_(n);return c(co,{...r,...t,ref:o})});Je.displayName=Po;var Do="DropdownMenuItem",Qe=p((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,r=_(n);return c(so,{...r,...t,ref:o})});Qe.displayName=Do;var Io="DropdownMenuCheckboxItem",Eo=p((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,r=_(n);return c(uo,{...r,...t,ref:o})});Eo.displayName=Io;var So="DropdownMenuRadioGroup",yo=p((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,r=_(n);return c(io,{...r,...t,ref:o})});yo.displayName=So;var xo="DropdownMenuRadioItem",bo=p((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,r=_(n);return c(lo,{...r,...t,ref:o})});bo.displayName=xo;var Ro="DropdownMenuItemIndicator",Ao=p((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,r=_(n);return c(po,{...r,...t,ref:o})});Ao.displayName=Ro;var No="DropdownMenuSeparator",en=p((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,r=_(n);return c(fo,{...r,...t,ref:o})});en.displayName=No;var To="DropdownMenuArrow",Oo=p((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,r=_(n);return c(mo,{...r,...t,ref:o})});Oo.displayName=To;var ko="DropdownMenuSubTrigger",Lo=p((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,r=_(n);return c(Mo,{...r,...t,ref:o})});Lo.displayName=ko;var Fo="DropdownMenuSubContent",Go=p((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,r=_(n);return c(vo,{...r,...t,ref:o,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Go.displayName=Fo;var Ko=He,Uo=je,$o=ze,Bo=Ze,Vo=Je,Xo=Qe,Yo=en;export{Bo as C,Xo as I,Vo as L,$o as P,Ko as R,Yo as S,Uo as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{G as S,T as d,u as P,x as l}from"./register-
|
|
1
|
+
import{G as S,T as d,u as P,x as l}from"./register-n8cQ4cVU.js";function w(t,c){const o=S(c);function i(r){const{children:e,...n}=r,s=d(()=>n,Object.values(n));return P(o.Provider,{value:s,children:e})}function u(r){const e=l(o);if(e)return e;if(c!==void 0)return c;throw new Error(`\`${r}\` must be used within \`${t}\``)}return i.displayName=t+"Provider",[i,u]}function C(t,c=[]){let o=[];function i(r,e){const n=S(e),s=o.length;o=[...o,e];function a(p){const{scope:f,children:v,...x}=p,m=f?.[t][s]||n,$=d(()=>x,Object.values(x));return P(m.Provider,{value:$,children:v})}function h(p,f){const v=f?.[t][s]||n,x=l(v);if(x)return x;if(e!==void 0)return e;throw new Error(`\`${p}\` must be used within \`${r}\``)}return a.displayName=r+"Provider",[a,h]}const u=()=>{const r=o.map(e=>S(e));return function(n){const s=n?.[t]||r;return d(()=>({[`__scope${t}`]:{...n,[t]:s}}),[n,s])}};return u.scopeName=t,[i,_(u,...c)]}function _(...t){const c=t[0];if(t.length===1)return c;const o=()=>{const i=t.map(u=>({useScope:u(),scopeName:u.scopeName}));return function(r){const e=i.reduce((n,{useScope:s,scopeName:a})=>{const p=s(r)[`__scope${a}`];return{...n,...p}},{});return d(()=>({[`__scope${c.scopeName}`]:e}),[e])}};return o.scopeName=c.scopeName,o}export{C as a,w as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{k as i,y as x,u as c,A as P,h as q,q as O}from"./register-n8cQ4cVU.js";import{c as h,u as U}from"./index-BMUvgC0z.js";import{u as E,a as V}from"./index-CwEuOG-t.js";import{a as W}from"./index-RWAeIAOl.js";import{D as Z,P as j}from"./index-Da2N7fS9.js";import{h as z,o as B,u as J,F as Q}from"./index-BZ2epHJe.js";import{u as X}from"./index-CoOTQzY_.js";import{c as F,A as N,C as Y,a as oo,R as eo}from"./index-sjjhrOQO.js";import{P as y}from"./index-DXPdEuVD.js";import{P as b}from"./index-xlO69rRA.js";var _="Popover",[w,Fo]=W(_,[F]),g=F(),[ro,u]=w(_),D=o=>{const{__scopePopover:n,children:t,open:a,defaultOpen:e,onOpenChange:r,modal:s=!1}=o,p=g(n),v=P(null),[f,m]=q(!1),[C=!1,l]=U({prop:a,defaultProp:e,onChange:r});return c(eo,{...p,children:c(ro,{scope:n,contentId:X(),triggerRef:v,open:C,onOpenChange:l,onOpenToggle:O(()=>l(A=>!A),[l]),hasCustomAnchor:f,onCustomAnchorAdd:O(()=>m(!0),[]),onCustomAnchorRemove:O(()=>m(!1),[]),modal:s,children:t})})};D.displayName=_;var M="PopoverAnchor",S=i((o,n)=>{const{__scopePopover:t,...a}=o,e=u(M,t),r=g(t),{onCustomAnchorAdd:s,onCustomAnchorRemove:p}=e;return x(()=>(s(),()=>p()),[s,p]),c(N,{...r,...a,ref:n})});S.displayName=M;var T="PopoverTrigger",I=i((o,n)=>{const{__scopePopover:t,...a}=o,e=u(T,t),r=g(t),s=E(n,e.triggerRef),p=c(b.button,{type:"button","aria-haspopup":"dialog","aria-expanded":e.open,"aria-controls":e.contentId,"data-state":$(e.open),...a,ref:s,onClick:h(o.onClick,e.onOpenToggle)});return e.hasCustomAnchor?p:c(N,{asChild:!0,...r,children:p})});I.displayName=T;var R="PopoverPortal",[to,no]=w(R,{forceMount:void 0}),k=o=>{const{__scopePopover:n,forceMount:t,children:a,container:e}=o,r=u(R,n);return c(to,{scope:n,forceMount:t,children:c(y,{present:t||r.open,children:c(j,{asChild:!0,container:e,children:a})})})};k.displayName=R;var d="PopoverContent",L=i((o,n)=>{const t=no(d,o.__scopePopover),{forceMount:a=t.forceMount,...e}=o,r=u(d,o.__scopePopover);return c(y,{present:a||r.open,children:r.modal?c(ao,{...e,ref:n}):c(so,{...e,ref:n})})});L.displayName=d;var ao=i((o,n)=>{const t=u(d,o.__scopePopover),a=P(null),e=E(n,a),r=P(!1);return x(()=>{const s=a.current;if(s)return z(s)},[]),c(B,{as:V,allowPinchZoom:!0,children:c(G,{...o,ref:e,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:h(o.onCloseAutoFocus,s=>{s.preventDefault(),r.current||t.triggerRef.current?.focus()}),onPointerDownOutside:h(o.onPointerDownOutside,s=>{const p=s.detail.originalEvent,v=p.button===0&&p.ctrlKey===!0,f=p.button===2||v;r.current=f},{checkForDefaultPrevented:!1}),onFocusOutside:h(o.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),so=i((o,n)=>{const t=u(d,o.__scopePopover),a=P(!1),e=P(!1);return c(G,{...o,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:r=>{o.onCloseAutoFocus?.(r),r.defaultPrevented||(a.current||t.triggerRef.current?.focus(),r.preventDefault()),a.current=!1,e.current=!1},onInteractOutside:r=>{o.onInteractOutside?.(r),r.defaultPrevented||(a.current=!0,r.detail.originalEvent.type==="pointerdown"&&(e.current=!0));const s=r.target;t.triggerRef.current?.contains(s)&&r.preventDefault(),r.detail.originalEvent.type==="focusin"&&e.current&&r.preventDefault()}})}),G=i((o,n)=>{const{__scopePopover:t,trapFocus:a,onOpenAutoFocus:e,onCloseAutoFocus:r,disableOutsidePointerEvents:s,onEscapeKeyDown:p,onPointerDownOutside:v,onFocusOutside:f,onInteractOutside:m,...C}=o,l=u(d,t),A=g(t);return J(),c(Q,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:e,onUnmountAutoFocus:r,children:c(Z,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:m,onEscapeKeyDown:p,onPointerDownOutside:v,onFocusOutside:f,onDismiss:()=>l.onOpenChange(!1),children:c(Y,{"data-state":$(l.open),role:"dialog",id:l.contentId,...A,...C,ref:n,style:{...C.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),H="PopoverClose",co=i((o,n)=>{const{__scopePopover:t,...a}=o,e=u(H,t);return c(b.button,{type:"button",...a,ref:n,onClick:h(o.onClick,()=>e.onOpenChange(!1))})});co.displayName=H;var po="PopoverArrow",K=i((o,n)=>{const{__scopePopover:t,...a}=o,e=g(t);return c(oo,{...e,...a,ref:n})});K.displayName=po;function $(o){return o?"open":"closed"}var io=D,uo=S,lo=I,vo=k,fo=L,Po=K;export{uo as A,fo as C,vo as P,io as R,lo as T,Po as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{k as e,u as o}from"./register-
|
|
1
|
+
import{k as e,u as o}from"./register-n8cQ4cVU.js";import{P as t}from"./index-xlO69rRA.js";var d="VisuallyHidden",r=e((i,a)=>o(t.span,{...i,ref:a,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...i.style}}));r.displayName=d;var l=r;export{l as R,r as V};
|