@adamosuiteservices/ui 2.20.1 → 2.20.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion-rounded.cjs +1 -1
- package/dist/accordion-rounded.js +1 -1
- package/dist/accordion.cjs +1 -1
- package/dist/accordion.js +1 -1
- package/dist/checkbox-BHStM029.cjs +24 -0
- package/dist/{checkbox-DPlUjwLi.js → checkbox-DX8b_6kG.js} +4 -3
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/collapsible.cjs +1 -1
- package/dist/collapsible.js +1 -1
- package/dist/{combobox-DylTjGrw.cjs → combobox-BURhN76t.cjs} +1 -1
- package/dist/{combobox-DG9u4g84.js → combobox-BrHVXnf2.js} +3 -3
- package/dist/combobox.cjs +1 -1
- package/dist/combobox.js +1 -1
- package/dist/context-menu.cjs +8 -8
- package/dist/context-menu.js +56 -55
- package/dist/date-picker-selector.cjs +1 -1
- package/dist/date-picker-selector.js +2 -2
- package/dist/dialog.cjs +3 -3
- package/dist/dialog.js +3 -3
- package/dist/dropdown-menu.cjs +9 -9
- package/dist/dropdown-menu.js +33 -32
- package/dist/full-screen-loader.cjs +4 -4
- package/dist/full-screen-loader.js +27 -24
- package/dist/hover-card.cjs +2 -2
- package/dist/hover-card.js +12 -11
- package/dist/index-1Io41IIt.cjs +1 -0
- package/dist/index-437EL2iq.js +52 -0
- package/dist/index-B695uy69.js +9 -0
- package/dist/index-BE-HFcQ8.cjs +1 -0
- package/dist/{index-BPOsnOxS.js → index-BM2A-WRV.js} +1 -1
- package/dist/index-BOnhen57.cjs +1 -0
- package/dist/{index-D_hmhfRp.js → index-BPnOqaWN.js} +9 -8
- package/dist/index-BqyOu62e.cjs +1 -0
- package/dist/index-C8aODXfJ.cjs +1 -0
- package/dist/index-CFB4VzSW.js +542 -0
- package/dist/index-CgAmFB15.cjs +1 -0
- package/dist/{index-B76LQ4E5.js → index-CinpJ0oP.js} +24 -23
- package/dist/{index-wujanfX3.js → index-Cpaqurwq.js} +191 -190
- package/dist/{index-B6gxHWt9.js → index-CwrPuu3I.js} +15 -14
- package/dist/index-D3xJARPa.cjs +1 -0
- package/dist/index-DSj2iNTW.js +137 -0
- package/dist/{index-Ce7JfyIP.js → index-DWrql5dh.js} +11 -10
- package/dist/{index-BIydBVaH.js → index-E5ek046p.js} +78 -76
- package/dist/{index-BaCYnOIG.cjs → index-L8BhH23Y.cjs} +1 -1
- package/dist/index-ZzRl2Lfu.cjs +5 -0
- package/dist/index-_TfuLupy.cjs +41 -0
- package/dist/index-cBJ7G45l.cjs +1 -0
- package/dist/popover-Dod16CM1.cjs +15 -0
- package/dist/{popover-DcQ18EVl.js → popover-tP2NoMYx.js} +84 -82
- package/dist/popover.cjs +1 -1
- package/dist/popover.js +1 -1
- package/dist/radio-group.cjs +3 -3
- package/dist/radio-group.js +10 -9
- package/dist/select.cjs +8 -8
- package/dist/select.js +21 -19
- package/dist/{sheet-Cp6JGhWC.cjs → sheet-DR1nAs9U.cjs} +1 -1
- package/dist/{sheet-hWerE8S1.js → sheet-UNggtdu3.js} +1 -1
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +1 -1
- package/dist/sidebar.cjs +1 -1
- package/dist/sidebar.js +1 -1
- package/dist/slider.cjs +5 -5
- package/dist/slider.js +7 -6
- package/dist/styles.css +1 -1
- package/dist/switch.cjs +3 -3
- package/dist/switch.js +8 -7
- package/dist/tabs-underline.cjs +1 -1
- package/dist/tabs-underline.js +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/toggle.cjs +2 -2
- package/dist/toggle.js +6 -5
- package/dist/tooltip.cjs +3 -3
- package/dist/tooltip.js +23 -22
- package/docs/components/layout/full-screen-loader.md +19 -1
- package/docs/components/ui/dialog.md +28 -3
- package/package.json +4 -2
- package/dist/checkbox-CIzBdqN7.cjs +0 -24
- package/dist/index-8iwAKZIp.cjs +0 -1
- package/dist/index-BWaO7kQK.cjs +0 -1
- package/dist/index-BnkHpTJs.cjs +0 -1
- package/dist/index-C0UREtMP.js +0 -59
- package/dist/index-C2P2kXMc.cjs +0 -41
- package/dist/index-CC6DBo2g.cjs +0 -1
- package/dist/index-CRWn-2fF.cjs +0 -1
- package/dist/index-Ca99LLZF.cjs +0 -5
- package/dist/index-e0gNU5O1.js +0 -675
- package/dist/index-i5lLg35-.cjs +0 -1
- package/dist/popover-cGp_rNLg.cjs +0 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./jsx-runtime-BB_1_6y_.cjs"),h=require("./button-CPm4-98H.cjs"),n=require("./calendar-DbfRhJEt.cjs"),L=require("./combobox-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./jsx-runtime-BB_1_6y_.cjs"),h=require("./button-CPm4-98H.cjs"),n=require("./calendar-DbfRhJEt.cjs"),L=require("./combobox-BURhN76t.cjs"),x=require("./popover-Dod16CM1.cjs"),r=require("react");function D(a,u,m){return n.addDays(a,-u,m)}function T({dateRange:a,onDateRangeChange:u,labels:m,combobox:R,calendar:C,"aria-invalid":g,disabled:E}){const f=r.useRef(null),p=r.useRef(void 0),v=e=>{if(!e.from||!e.to)return;const l=n.startOfDay(new Date),j=[{value:"7_days",days:7},{value:"30_days",days:30},{value:"90_days",days:90}];for(const c of j){const q=D(l,c.days);if(n.startOfDay(e.from).getTime()===q.getTime()&&n.startOfDay(e.to).getTime()===l.getTime())return c.value}return"custom"},[y,o]=r.useState(()=>v(a)),[_,d]=r.useState(!1),[i,S]=r.useState(a);r.useEffect(()=>{const e=v(a);o(e)},[a]);const s={...{last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",custom:"Custom",placeholder:"Date",cancel:"Cancel",apply:"Apply"},...m},k=e=>{const l=n.startOfDay(new Date),c={"7_days":7,"30_days":30,"90_days":90}[e];return c?{from:D(l,c),to:l}:{from:void 0,to:void 0}},b=e=>{o(p.current),d(!1)},O=e=>{if(e==="custom"){p.current=y,o(e),d(!0);return}o(e),u(k(e))},P=()=>{if(i?.from&&i?.to){u(i),o("custom"),d(!1);return}o(p.current),d(!1)};return t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx(L.Combobox,{alwaysShowPlaceholder:!0,selectedFeedback:"check",icon:"calendar_today",options:[{label:s.last7Days,value:"7_days"},{label:s.last30Days,value:"30_days"},{label:s.last90Days,value:"90_days"},{label:s.custom,value:"custom"}],labels:{placeholder:s.placeholder},value:y,onValueChange:O,"aria-invalid":g,disabled:E,ref:e=>{f.current=e},...R}),t.jsxRuntimeExports.jsxs(x.Popover,{open:_,onOpenChange:e=>{!e&&y==="custom"&&b()},children:[t.jsxRuntimeExports.jsx(x.PopoverAnchor,{virtualRef:f}),t.jsxRuntimeExports.jsxs(x.PopoverContent,{align:"start",children:[t.jsxRuntimeExports.jsx(n.Calendar,{required:!0,mode:"range",selected:i,onSelect:S,captionLayout:"dropdown",classNames:{root:"adm:p-0!"},...C}),t.jsxRuntimeExports.jsxs("div",{className:"adm:mt-2 adm:flex adm:justify-end adm:gap-2",children:[t.jsxRuntimeExports.jsx(h.Button,{variant:"link",onClick:()=>b(),children:s.cancel}),t.jsxRuntimeExports.jsx(h.Button,{variant:"link",onClick:P,children:s.apply})]})]})]})]})}exports.DatePickerSelector=T;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { j as a } from "./jsx-runtime-BzflLqGi.js";
|
|
2
2
|
import { B as x } from "./button-D4ddrxyp.js";
|
|
3
3
|
import { b as V, C as A, s as i } from "./calendar-ghKmqI3K.js";
|
|
4
|
-
import { C as F } from "./combobox-
|
|
5
|
-
import { P as w, c as B, b as E } from "./popover-
|
|
4
|
+
import { C as F } from "./combobox-BrHVXnf2.js";
|
|
5
|
+
import { P as w, c as B, b as E } from "./popover-tP2NoMYx.js";
|
|
6
6
|
import { useRef as D, useState as y, useEffect as M } from "react";
|
|
7
7
|
function C(t, n, u) {
|
|
8
8
|
return V(t, -n, u);
|
package/dist/dialog.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./jsx-runtime-BB_1_6y_.cjs"),e=require("./index-
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./jsx-runtime-BB_1_6y_.cjs"),e=require("./index-ZzRl2Lfu.cjs"),r=require("./icon-C5Q2b1Am.cjs"),s=require("./index-DoxiiusW.cjs");require("react");function x({...a}){return t.jsxRuntimeExports.jsx(e.Root,{"data-slot":"dialog",...a})}function c({...a}){return t.jsxRuntimeExports.jsx(e.Trigger,{"data-slot":"dialog-trigger",...a})}function d({...a}){return t.jsxRuntimeExports.jsx(e.Portal,{"data-slot":"dialog-portal",...a})}function u({...a}){return t.jsxRuntimeExports.jsx(e.Close,{"data-slot":"dialog-close",...a})}function i({className:a,...o}){return t.jsxRuntimeExports.jsx(e.Overlay,{"data-slot":"dialog-overlay",className:s.cn(`
|
|
2
2
|
adm:fixed adm:inset-0 adm:z-50 adm:bg-black/50
|
|
3
3
|
adm:data-[state=closed]:animate-out adm:data-[state=closed]:fade-out-0
|
|
4
4
|
adm:data-[state=open]:animate-in adm:data-[state=open]:fade-in-0
|
|
@@ -27,6 +27,6 @@
|
|
|
27
27
|
adm:[&_svg]:pointer-events-none adm:[&_svg]:shrink-0
|
|
28
28
|
adm:[&_svg:not([class*=size-])]:size-4
|
|
29
29
|
`,children:[t.jsxRuntimeExports.jsx(r.Icon,{symbol:"close"}),t.jsxRuntimeExports.jsx("span",{className:"adm:sr-only",children:"Close"})]})]})]})}function p({className:a,...o}){return t.jsxRuntimeExports.jsx("div",{"data-slot":"dialog-header",className:s.cn("adm:flex adm:flex-col adm:gap-2",a),...o})}function f({className:a,...o}){return t.jsxRuntimeExports.jsx("div",{"data-slot":"dialog-footer",className:s.cn(`
|
|
30
|
-
adm:flex adm:gap-6
|
|
30
|
+
adm:mt-10 adm:flex adm:gap-6
|
|
31
31
|
adm:sm:flex-row adm:sm:justify-start
|
|
32
|
-
`,a),...o})}function j({className:a,...o}){return t.jsxRuntimeExports.jsx(e.Title,{"data-slot":"dialog-title",className:s.cn("adm:text-sm adm:font-semibold adm:text-foreground",a),...o})}function D({className:a,...o}){return t.jsxRuntimeExports.jsx(e.Description,{"data-slot":"dialog-description",className:s.cn("adm:text-sm adm:text-foreground",a),...o})}function R({className:a,...o}){return t.jsxRuntimeExports.jsx("div",{"data-slot":"dialog-body",className:s.cn("adm:mt-4
|
|
32
|
+
`,a),...o})}function j({className:a,...o}){return t.jsxRuntimeExports.jsx(e.Title,{"data-slot":"dialog-title",className:s.cn("adm:text-sm adm:font-semibold adm:text-foreground",a),...o})}function D({className:a,...o}){return t.jsxRuntimeExports.jsx(e.Description,{"data-slot":"dialog-description",className:s.cn("adm:text-sm adm:text-foreground",a),...o})}function R({className:a,...o}){return t.jsxRuntimeExports.jsx("div",{"data-slot":"dialog-body",className:s.cn("adm:mt-4",a),...o})}exports.Dialog=x;exports.DialogBody=R;exports.DialogClose=u;exports.DialogContent=g;exports.DialogDescription=D;exports.DialogFooter=f;exports.DialogHeader=p;exports.DialogOverlay=i;exports.DialogPortal=d;exports.DialogTitle=j;exports.DialogTrigger=c;
|
package/dist/dialog.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { j as t } from "./jsx-runtime-BzflLqGi.js";
|
|
3
|
-
import { R as n, C as e, a as i, D as r, O as c, P as g, b as u, T as x } from "./index-
|
|
3
|
+
import { R as n, C as e, a as i, D as r, O as c, P as g, b as u, T as x } from "./index-E5ek046p.js";
|
|
4
4
|
import { I as f } from "./icon-t4jt1Z2h.js";
|
|
5
5
|
import { c as d } from "./index-CRiPKpXj.js";
|
|
6
6
|
import "react";
|
|
@@ -122,7 +122,7 @@ function k({ className: a, ...o }) {
|
|
|
122
122
|
"data-slot": "dialog-footer",
|
|
123
123
|
className: d(
|
|
124
124
|
`
|
|
125
|
-
adm:flex adm:gap-6
|
|
125
|
+
adm:mt-10 adm:flex adm:gap-6
|
|
126
126
|
adm:sm:flex-row adm:sm:justify-start
|
|
127
127
|
`,
|
|
128
128
|
a
|
|
@@ -165,7 +165,7 @@ function P({
|
|
|
165
165
|
"div",
|
|
166
166
|
{
|
|
167
167
|
"data-slot": "dialog-body",
|
|
168
|
-
className: d("adm:mt-4
|
|
168
|
+
className: d("adm:mt-4", a),
|
|
169
169
|
...o
|
|
170
170
|
}
|
|
171
171
|
);
|
package/dist/dropdown-menu.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./jsx-runtime-BB_1_6y_.cjs"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./jsx-runtime-BB_1_6y_.cjs"),H=require("react"),g=require("./index-BqyOu62e.cjs"),K=require("./index-_XxjJPRD.cjs"),U=require("./index-cwZN7ZY3.cjs"),h=require("./index-C8aODXfJ.cjs"),B=require("./index-CocSS1YK.cjs"),d=require("./index-1Io41IIt.cjs"),M=require("./index-WIv2ndLu.cjs"),b=require("./icon-C5Q2b1Am.cjs"),p=require("./index-DoxiiusW.cjs");function F(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const m=F(H);var w="DropdownMenu",[W]=U.createContextScope(w,[d.createMenuScope]),u=d.createMenuScope(),[X,D]=W(w),R=e=>{const{__scopeDropdownMenu:o,children:t,dir:n,open:r,defaultOpen:i,onOpenChange:c,modal:s=!0}=e,l=u(o),v=m.useRef(null),[x,f]=h.useControllableState({prop:r,defaultProp:i??!1,onChange:c,caller:w});return a.jsxRuntimeExports.jsx(X,{scope:o,triggerId:M.useId(),triggerRef:v,contentId:M.useId(),open:x,onOpenChange:f,onOpenToggle:m.useCallback(()=>f(L=>!L),[f]),modal:s,children:a.jsxRuntimeExports.jsx(d.Root3,{...l,open:x,onOpenChange:f,dir:n,modal:s,children:t})})};R.displayName=w;var j="DropdownMenuTrigger",_=m.forwardRef((e,o)=>{const{__scopeDropdownMenu:t,disabled:n=!1,...r}=e,i=D(j,t),c=u(t);return a.jsxRuntimeExports.jsx(d.Anchor2,{asChild:!0,...c,children:a.jsxRuntimeExports.jsx(B.Primitive.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...r,ref:K.composeRefs(o,i.triggerRef),onPointerDown:g.composeEventHandlers(e.onPointerDown,s=>{!n&&s.button===0&&s.ctrlKey===!1&&(i.onOpenToggle(),i.open||s.preventDefault())}),onKeyDown:g.composeEventHandlers(e.onKeyDown,s=>{n||(["Enter"," "].includes(s.key)&&i.onOpenToggle(),s.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});_.displayName=j;var J="DropdownMenuPortal",E=e=>{const{__scopeDropdownMenu:o,...t}=e,n=u(o);return a.jsxRuntimeExports.jsx(d.Portal,{...n,...t})};E.displayName=J;var S="DropdownMenuContent",N=m.forwardRef((e,o)=>{const{__scopeDropdownMenu:t,...n}=e,r=D(S,t),i=u(t),c=m.useRef(!1);return a.jsxRuntimeExports.jsx(d.Content2,{id:r.contentId,"aria-labelledby":r.triggerId,...i,...n,ref:o,onCloseAutoFocus:g.composeEventHandlers(e.onCloseAutoFocus,s=>{c.current||r.triggerRef.current?.focus(),c.current=!1,s.preventDefault()}),onInteractOutside:g.composeEventHandlers(e.onInteractOutside,s=>{const l=s.detail.originalEvent,v=l.button===0&&l.ctrlKey===!0,x=l.button===2||v;(!r.modal||x)&&(c.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)"}})});N.displayName=S;var Q="DropdownMenuGroup",I=m.forwardRef((e,o)=>{const{__scopeDropdownMenu:t,...n}=e,r=u(t);return a.jsxRuntimeExports.jsx(d.Group,{...r,...n,ref:o})});I.displayName=Q;var V="DropdownMenuLabel",y=m.forwardRef((e,o)=>{const{__scopeDropdownMenu:t,...n}=e,r=u(t);return a.jsxRuntimeExports.jsx(d.Label,{...r,...n,ref:o})});y.displayName=V;var Y="DropdownMenuItem",C=m.forwardRef((e,o)=>{const{__scopeDropdownMenu:t,...n}=e,r=u(t);return a.jsxRuntimeExports.jsx(d.Item2,{...r,...n,ref:o})});C.displayName=Y;var Z="DropdownMenuCheckboxItem",P=m.forwardRef((e,o)=>{const{__scopeDropdownMenu:t,...n}=e,r=u(t);return a.jsxRuntimeExports.jsx(d.CheckboxItem,{...r,...n,ref:o})});P.displayName=Z;var ee="DropdownMenuRadioGroup",O=m.forwardRef((e,o)=>{const{__scopeDropdownMenu:t,...n}=e,r=u(t);return a.jsxRuntimeExports.jsx(d.RadioGroup,{...r,...n,ref:o})});O.displayName=ee;var oe="DropdownMenuRadioItem",A=m.forwardRef((e,o)=>{const{__scopeDropdownMenu:t,...n}=e,r=u(t);return a.jsxRuntimeExports.jsx(d.RadioItem,{...r,...n,ref:o})});A.displayName=oe;var te="DropdownMenuItemIndicator",k=m.forwardRef((e,o)=>{const{__scopeDropdownMenu:t,...n}=e,r=u(t);return a.jsxRuntimeExports.jsx(d.ItemIndicator,{...r,...n,ref:o})});k.displayName=te;var ne="DropdownMenuSeparator",T=m.forwardRef((e,o)=>{const{__scopeDropdownMenu:t,...n}=e,r=u(t);return a.jsxRuntimeExports.jsx(d.Separator,{...r,...n,ref:o})});T.displayName=ne;var ae="DropdownMenuArrow",re=m.forwardRef((e,o)=>{const{__scopeDropdownMenu:t,...n}=e,r=u(t);return a.jsxRuntimeExports.jsx(d.Arrow2,{...r,...n,ref:o})});re.displayName=ae;var de=e=>{const{__scopeDropdownMenu:o,children:t,open:n,onOpenChange:r,defaultOpen:i}=e,c=u(o),[s,l]=h.useControllableState({prop:n,defaultProp:i??!1,onChange:r,caller:"DropdownMenuSub"});return a.jsxRuntimeExports.jsx(d.Sub,{...c,open:s,onOpenChange:l,children:t})},se="DropdownMenuSubTrigger",z=m.forwardRef((e,o)=>{const{__scopeDropdownMenu:t,...n}=e,r=u(t);return a.jsxRuntimeExports.jsx(d.SubTrigger,{...r,...n,ref:o})});z.displayName=se;var ie="DropdownMenuSubContent",$=m.forwardRef((e,o)=>{const{__scopeDropdownMenu:t,...n}=e,r=u(t);return a.jsxRuntimeExports.jsx(d.SubContent,{...r,...n,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)"}})});$.displayName=ie;var me=R,ue=_,G=E,pe=N,ce=I,le=y,xe=C,fe=P,ge=O,we=A,q=k,ve=T,be=de,Me=z,he=$;function De({...e}){return a.jsxRuntimeExports.jsx(me,{"data-slot":"dropdown-menu",...e})}function Re({...e}){return a.jsxRuntimeExports.jsx(G,{"data-slot":"dropdown-menu-portal",...e})}function je({className:e,size:o="default",children:t,...n}){return a.jsxRuntimeExports.jsx(ue,{"data-slot":"dropdown-menu-trigger","data-size":o,className:p.cn(`
|
|
2
2
|
adm:flex adm:w-fit adm:items-center adm:justify-between adm:gap-2
|
|
3
3
|
adm:rounded-md adm:border adm:border-input adm:bg-background adm:px-3
|
|
4
4
|
adm:text-sm adm:whitespace-nowrap adm:text-foreground
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
adm:[&_svg]:pointer-events-none adm:[&_svg]:shrink-0
|
|
20
20
|
adm:[&_svg:not([class*=size-])]:size-4
|
|
21
21
|
adm:[&_svg:not([class*=text-])]:text-muted-foreground
|
|
22
|
-
`,e),...n,children:t})}function
|
|
22
|
+
`,e),...n,children:t})}function _e({className:e,sideOffset:o=4,...t}){return a.jsxRuntimeExports.jsx(G,{children:a.jsxRuntimeExports.jsx(pe,{"data-slot":"dropdown-menu-content",sideOffset:o,className:p.cn(`
|
|
23
23
|
adm:z-50 adm:max-h-(--radix-dropdown-menu-content-available-height)
|
|
24
24
|
adm:min-w-[8rem]
|
|
25
25
|
adm:origin-(--radix-dropdown-menu-content-transform-origin)
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
adm:data-[state=closed]:zoom-out-95
|
|
35
35
|
adm:data-[state=open]:animate-in adm:data-[state=open]:fade-in-0
|
|
36
36
|
adm:data-[state=open]:zoom-in-95
|
|
37
|
-
`,e),...t})})}function
|
|
37
|
+
`,e),...t})})}function Ee({...e}){return a.jsxRuntimeExports.jsx(ce,{"data-slot":"dropdown-menu-group",...e})}function Se({className:e,inset:o,variant:t="default",...n}){return a.jsxRuntimeExports.jsx(xe,{"data-slot":"dropdown-menu-item","data-inset":o,"data-variant":t,className:p.cn(`
|
|
38
38
|
adm:relative adm:flex adm:h-11 adm:w-full adm:cursor-default
|
|
39
39
|
adm:items-center adm:gap-3 adm:pr-10 adm:pl-4 adm:text-sm
|
|
40
40
|
adm:outline-hidden adm:select-none
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
adm:[&_svg:not([class*=text-])]:text-muted-foreground
|
|
53
53
|
adm:data-[variant=destructive]:*:[data-slot=icon]:text-destructive!
|
|
54
54
|
adm:data-[variant=destructive]:*:[svg]:text-destructive!
|
|
55
|
-
`,e),...n})}function
|
|
55
|
+
`,e),...n})}function Ne({className:e,children:o,checked:t,...n}){return a.jsxRuntimeExports.jsxs(fe,{"data-slot":"dropdown-menu-checkbox-item",className:p.cn(`
|
|
56
56
|
adm:relative adm:flex adm:h-11 adm:w-full adm:cursor-default
|
|
57
57
|
adm:items-center adm:gap-3 adm:pr-10 adm:pl-8 adm:text-sm
|
|
58
58
|
adm:outline-hidden adm:select-none
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
`,e),checked:t,...n,children:[a.jsxRuntimeExports.jsx("span",{className:`
|
|
67
67
|
adm:pointer-events-none adm:absolute adm:left-2 adm:flex adm:size-3.5
|
|
68
68
|
adm:items-center adm:justify-center
|
|
69
|
-
`,children:a.jsxRuntimeExports.jsx(
|
|
69
|
+
`,children:a.jsxRuntimeExports.jsx(q,{children:a.jsxRuntimeExports.jsx(b.Icon,{symbol:"check",className:"adm:text-xl adm:text-success"})})}),o]})}function Ie({...e}){return a.jsxRuntimeExports.jsx(ge,{"data-slot":"dropdown-menu-radio-group",...e})}function ye({className:e,children:o,...t}){return a.jsxRuntimeExports.jsxs(we,{"data-slot":"dropdown-menu-radio-item",className:p.cn(`
|
|
70
70
|
adm:relative adm:flex adm:h-11 adm:w-full adm:cursor-default
|
|
71
71
|
adm:items-center adm:gap-3 adm:pr-10 adm:pl-8 adm:text-sm
|
|
72
72
|
adm:outline-hidden adm:select-none
|
|
@@ -80,10 +80,10 @@
|
|
|
80
80
|
`,e),...t,children:[a.jsxRuntimeExports.jsx("span",{className:`
|
|
81
81
|
adm:pointer-events-none adm:absolute adm:left-2 adm:flex adm:size-3.5
|
|
82
82
|
adm:items-center adm:justify-center
|
|
83
|
-
`,children:a.jsxRuntimeExports.jsx(
|
|
83
|
+
`,children:a.jsxRuntimeExports.jsx(q,{children:a.jsxRuntimeExports.jsx(b.Icon,{symbol:"circle",fill:1,className:"adm:text-xs"})})}),o]})}function Ce({className:e,inset:o,...t}){return a.jsxRuntimeExports.jsx(le,{"data-slot":"dropdown-menu-label","data-inset":o,className:p.cn(`
|
|
84
84
|
adm:px-2 adm:py-1.5 adm:text-xs adm:text-muted-foreground
|
|
85
85
|
adm:data-inset:pl-8
|
|
86
|
-
`,e),...t})}function
|
|
86
|
+
`,e),...t})}function Pe({className:e,...o}){return a.jsxRuntimeExports.jsx(ve,{"data-slot":"dropdown-menu-separator",className:p.cn("adm:pointer-events-none adm:-mx-1 adm:my-1 adm:h-px adm:bg-border",e),...o})}function Oe({className:e,...o}){return a.jsxRuntimeExports.jsx("span",{"data-slot":"dropdown-menu-shortcut",className:p.cn("adm:ml-auto adm:text-xs adm:tracking-widest adm:text-muted-foreground",e),...o})}function Ae({...e}){return a.jsxRuntimeExports.jsx(be,{"data-slot":"dropdown-menu-sub",...e})}function ke({className:e,inset:o,children:t,...n}){return a.jsxRuntimeExports.jsxs(Me,{"data-slot":"dropdown-menu-sub-trigger","data-inset":o,className:p.cn(`
|
|
87
87
|
adm:flex adm:h-11 adm:w-full adm:cursor-default adm:items-center
|
|
88
88
|
adm:gap-3 adm:pr-10 adm:pl-4 adm:text-sm adm:outline-hidden
|
|
89
89
|
adm:select-none
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
adm:[&_svg]:pointer-events-none adm:[&_svg]:shrink-0
|
|
96
96
|
adm:[&_svg:not([class*=size-])]:size-4
|
|
97
97
|
adm:[&_svg:not([class*=text-])]:text-muted-foreground
|
|
98
|
-
`,e),...n,children:[t,a.jsxRuntimeExports.jsx(b.Icon,{symbol:"chevron_right",className:"adm:ml-auto adm:shrink-0"})]})}function
|
|
98
|
+
`,e),...n,children:[t,a.jsxRuntimeExports.jsx(b.Icon,{symbol:"chevron_right",className:"adm:ml-auto adm:shrink-0"})]})}function Te({className:e,...o}){return a.jsxRuntimeExports.jsx(he,{"data-slot":"dropdown-menu-sub-content",className:p.cn(`
|
|
99
99
|
adm:z-50 adm:min-w-[8rem]
|
|
100
100
|
adm:origin-(--radix-dropdown-menu-content-transform-origin)
|
|
101
101
|
adm:overflow-hidden adm:rounded-md adm:border adm:bg-popover
|
|
@@ -108,4 +108,4 @@
|
|
|
108
108
|
adm:data-[state=closed]:zoom-out-95
|
|
109
109
|
adm:data-[state=open]:animate-in adm:data-[state=open]:fade-in-0
|
|
110
110
|
adm:data-[state=open]:zoom-in-95
|
|
111
|
-
`,e),...o})}exports.DropdownMenu=
|
|
111
|
+
`,e),...o})}exports.DropdownMenu=De;exports.DropdownMenuCheckboxItem=Ne;exports.DropdownMenuContent=_e;exports.DropdownMenuGroup=Ee;exports.DropdownMenuItem=Se;exports.DropdownMenuLabel=Ce;exports.DropdownMenuPortal=Re;exports.DropdownMenuRadioGroup=Ie;exports.DropdownMenuRadioItem=ye;exports.DropdownMenuSeparator=Pe;exports.DropdownMenuShortcut=Oe;exports.DropdownMenuSub=Ae;exports.DropdownMenuSubContent=Te;exports.DropdownMenuSubTrigger=ke;exports.DropdownMenuTrigger=je;
|
package/dist/dropdown-menu.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { j as n } from "./jsx-runtime-BzflLqGi.js";
|
|
3
3
|
import * as i from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { c as v } from "./index-B695uy69.js";
|
|
5
5
|
import { c as U } from "./index-DLcqcWxM.js";
|
|
6
6
|
import { c as B } from "./index-FxyLF8MY.js";
|
|
7
|
+
import { u as h } from "./index-437EL2iq.js";
|
|
7
8
|
import { P as F } from "./index-BMWt1NBG.js";
|
|
8
|
-
import { c as M, R as H, P as W, A as X, C as q, G as J, L as Q, I as V, a as Y, b as Z, h as ee, d as ae, S as oe, e as te, g as ne, f as re, i as de } from "./index-
|
|
9
|
+
import { c as M, R as H, P as W, A as X, C as q, G as J, L as Q, I as V, a as Y, b as Z, h as ee, d as ae, S as oe, e as te, g as ne, f as re, i as de } from "./index-Cpaqurwq.js";
|
|
9
10
|
import { u as b } from "./index-Cv867SGx.js";
|
|
10
11
|
import { I as x } from "./icon-t4jt1Z2h.js";
|
|
11
12
|
import { c as u } from "./index-CRiPKpXj.js";
|
|
@@ -193,17 +194,17 @@ var De = "DropdownMenuSubContent", G = i.forwardRef((e, a) => {
|
|
|
193
194
|
});
|
|
194
195
|
G.displayName = De;
|
|
195
196
|
var _e = _, Ne = R, $ = I, Re = S, Ie = y, je = C, Se = P, ye = A, Ce = E, Pe = O, L = k, Ae = T, Ee = he, Oe = z, ke = G;
|
|
196
|
-
function
|
|
197
|
+
function We({
|
|
197
198
|
...e
|
|
198
199
|
}) {
|
|
199
200
|
return /* @__PURE__ */ n.jsx(_e, { "data-slot": "dropdown-menu", ...e });
|
|
200
201
|
}
|
|
201
|
-
function
|
|
202
|
+
function Xe({
|
|
202
203
|
...e
|
|
203
204
|
}) {
|
|
204
205
|
return /* @__PURE__ */ n.jsx($, { "data-slot": "dropdown-menu-portal", ...e });
|
|
205
206
|
}
|
|
206
|
-
function
|
|
207
|
+
function qe({
|
|
207
208
|
className: e,
|
|
208
209
|
size: a = "default",
|
|
209
210
|
children: o,
|
|
@@ -244,7 +245,7 @@ function Xe({
|
|
|
244
245
|
}
|
|
245
246
|
);
|
|
246
247
|
}
|
|
247
|
-
function
|
|
248
|
+
function Je({
|
|
248
249
|
className: e,
|
|
249
250
|
sideOffset: a = 4,
|
|
250
251
|
...o
|
|
@@ -277,12 +278,12 @@ function qe({
|
|
|
277
278
|
}
|
|
278
279
|
) });
|
|
279
280
|
}
|
|
280
|
-
function
|
|
281
|
+
function Qe({
|
|
281
282
|
...e
|
|
282
283
|
}) {
|
|
283
284
|
return /* @__PURE__ */ n.jsx(Ie, { "data-slot": "dropdown-menu-group", ...e });
|
|
284
285
|
}
|
|
285
|
-
function
|
|
286
|
+
function Ve({
|
|
286
287
|
className: e,
|
|
287
288
|
inset: a,
|
|
288
289
|
variant: o = "default",
|
|
@@ -320,7 +321,7 @@ function Qe({
|
|
|
320
321
|
}
|
|
321
322
|
);
|
|
322
323
|
}
|
|
323
|
-
function
|
|
324
|
+
function Ye({
|
|
324
325
|
className: e,
|
|
325
326
|
children: a,
|
|
326
327
|
checked: o,
|
|
@@ -363,7 +364,7 @@ function Ve({
|
|
|
363
364
|
}
|
|
364
365
|
);
|
|
365
366
|
}
|
|
366
|
-
function
|
|
367
|
+
function Ze({
|
|
367
368
|
...e
|
|
368
369
|
}) {
|
|
369
370
|
return /* @__PURE__ */ n.jsx(
|
|
@@ -374,7 +375,7 @@ function Ye({
|
|
|
374
375
|
}
|
|
375
376
|
);
|
|
376
377
|
}
|
|
377
|
-
function
|
|
378
|
+
function ea({
|
|
378
379
|
className: e,
|
|
379
380
|
children: a,
|
|
380
381
|
...o
|
|
@@ -415,7 +416,7 @@ function Ze({
|
|
|
415
416
|
}
|
|
416
417
|
);
|
|
417
418
|
}
|
|
418
|
-
function
|
|
419
|
+
function aa({
|
|
419
420
|
className: e,
|
|
420
421
|
inset: a,
|
|
421
422
|
...o
|
|
@@ -436,7 +437,7 @@ function ea({
|
|
|
436
437
|
}
|
|
437
438
|
);
|
|
438
439
|
}
|
|
439
|
-
function
|
|
440
|
+
function oa({
|
|
440
441
|
className: e,
|
|
441
442
|
...a
|
|
442
443
|
}) {
|
|
@@ -452,7 +453,7 @@ function aa({
|
|
|
452
453
|
}
|
|
453
454
|
);
|
|
454
455
|
}
|
|
455
|
-
function
|
|
456
|
+
function ta({
|
|
456
457
|
className: e,
|
|
457
458
|
...a
|
|
458
459
|
}) {
|
|
@@ -468,12 +469,12 @@ function oa({
|
|
|
468
469
|
}
|
|
469
470
|
);
|
|
470
471
|
}
|
|
471
|
-
function
|
|
472
|
+
function na({
|
|
472
473
|
...e
|
|
473
474
|
}) {
|
|
474
475
|
return /* @__PURE__ */ n.jsx(Ee, { "data-slot": "dropdown-menu-sub", ...e });
|
|
475
476
|
}
|
|
476
|
-
function
|
|
477
|
+
function ra({
|
|
477
478
|
className: e,
|
|
478
479
|
inset: a,
|
|
479
480
|
children: o,
|
|
@@ -508,7 +509,7 @@ function na({
|
|
|
508
509
|
}
|
|
509
510
|
);
|
|
510
511
|
}
|
|
511
|
-
function
|
|
512
|
+
function da({
|
|
512
513
|
className: e,
|
|
513
514
|
...a
|
|
514
515
|
}) {
|
|
@@ -538,19 +539,19 @@ function ra({
|
|
|
538
539
|
);
|
|
539
540
|
}
|
|
540
541
|
export {
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
542
|
+
We as DropdownMenu,
|
|
543
|
+
Ye as DropdownMenuCheckboxItem,
|
|
544
|
+
Je as DropdownMenuContent,
|
|
545
|
+
Qe as DropdownMenuGroup,
|
|
546
|
+
Ve as DropdownMenuItem,
|
|
547
|
+
aa as DropdownMenuLabel,
|
|
548
|
+
Xe as DropdownMenuPortal,
|
|
549
|
+
Ze as DropdownMenuRadioGroup,
|
|
550
|
+
ea as DropdownMenuRadioItem,
|
|
551
|
+
oa as DropdownMenuSeparator,
|
|
552
|
+
ta as DropdownMenuShortcut,
|
|
553
|
+
na as DropdownMenuSub,
|
|
554
|
+
da as DropdownMenuSubContent,
|
|
555
|
+
ra as DropdownMenuSubTrigger,
|
|
556
|
+
qe as DropdownMenuTrigger
|
|
556
557
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./jsx-runtime-BB_1_6y_.cjs"),
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./jsx-runtime-BB_1_6y_.cjs"),u=require("./index-L8BhH23Y.cjs"),l=require("./index-CgAmFB15.cjs"),c=require("./spinner-DUZ2vcus.cjs"),a=require("react");class o{subscribers=[];subscribe(e){return this.subscribers.push(e),()=>{this.subscribers=this.subscribers.filter(r=>r!==e)}}emit(e){this.subscribers.forEach(r=>r(e))}}const s=new o;function d(){const[t,e]=a.useState(!1);return a.useEffect(()=>{const r=s.subscribe(({open:i})=>{e(i)});return()=>{r()}},[]),t?n.jsxRuntimeExports.jsx(l.FocusScope,{asChild:!0,loop:!0,trapped:!0,children:n.jsxRuntimeExports.jsx(u.DismissableLayer,{disableOutsidePointerEvents:!0,"data-slot":"full-screen-loader",className:`
|
|
2
|
+
adm:pointer-events-auto adm:fixed adm:inset-0 adm:z-100 adm:flex
|
|
3
|
+
adm:items-center adm:justify-center adm:bg-black/20
|
|
4
|
+
`,children:n.jsxRuntimeExports.jsx(c.Spinner,{className:"adm:text-4xl adm:text-primary"})})}):null}class b{show(){s.emit({open:!0})}hide(){s.emit({open:!1})}}const m=new b;exports.FullScreenLoader=d;exports.FullScreenLoaderManager=m;exports.FullScreenLoaderObservable=s;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { j as t } from "./jsx-runtime-BzflLqGi.js";
|
|
2
|
+
import { D as n } from "./index-BM2A-WRV.js";
|
|
3
|
+
import { F as o } from "./index-DSj2iNTW.js";
|
|
4
|
+
import { S as u } from "./spinner-_-J3zJ_g.js";
|
|
5
|
+
import { useState as l, useEffect as c } from "react";
|
|
6
|
+
class m {
|
|
5
7
|
subscribers = [];
|
|
6
8
|
subscribe(e) {
|
|
7
9
|
return this.subscribers.push(e), () => {
|
|
@@ -12,39 +14,40 @@ class u {
|
|
|
12
14
|
this.subscribers.forEach((s) => s(e));
|
|
13
15
|
}
|
|
14
16
|
}
|
|
15
|
-
const
|
|
16
|
-
function
|
|
17
|
-
const [r, e] =
|
|
18
|
-
return
|
|
19
|
-
const s =
|
|
20
|
-
e(
|
|
17
|
+
const a = new m();
|
|
18
|
+
function S() {
|
|
19
|
+
const [r, e] = l(!1);
|
|
20
|
+
return c(() => {
|
|
21
|
+
const s = a.subscribe(({ open: i }) => {
|
|
22
|
+
e(i);
|
|
21
23
|
});
|
|
22
24
|
return () => {
|
|
23
25
|
s();
|
|
24
26
|
};
|
|
25
|
-
}, []), r ? /* @__PURE__ */
|
|
26
|
-
|
|
27
|
+
}, []), r ? /* @__PURE__ */ t.jsx(o, { asChild: !0, loop: !0, trapped: !0, children: /* @__PURE__ */ t.jsx(
|
|
28
|
+
n,
|
|
27
29
|
{
|
|
30
|
+
disableOutsidePointerEvents: !0,
|
|
28
31
|
"data-slot": "full-screen-loader",
|
|
29
32
|
className: `
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
children: /* @__PURE__ */
|
|
33
|
+
adm:pointer-events-auto adm:fixed adm:inset-0 adm:z-100 adm:flex
|
|
34
|
+
adm:items-center adm:justify-center adm:bg-black/20
|
|
35
|
+
`,
|
|
36
|
+
children: /* @__PURE__ */ t.jsx(u, { className: "adm:text-4xl adm:text-primary" })
|
|
34
37
|
}
|
|
35
|
-
) : null;
|
|
38
|
+
) }) : null;
|
|
36
39
|
}
|
|
37
|
-
class
|
|
40
|
+
class d {
|
|
38
41
|
show() {
|
|
39
|
-
|
|
42
|
+
a.emit({ open: !0 });
|
|
40
43
|
}
|
|
41
44
|
hide() {
|
|
42
|
-
|
|
45
|
+
a.emit({ open: !1 });
|
|
43
46
|
}
|
|
44
47
|
}
|
|
45
|
-
const
|
|
48
|
+
const F = new d();
|
|
46
49
|
export {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
+
S as FullScreenLoader,
|
|
51
|
+
F as FullScreenLoaderManager,
|
|
52
|
+
a as FullScreenLoaderObservable
|
|
50
53
|
};
|
package/dist/hover-card.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./jsx-runtime-BB_1_6y_.cjs"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./jsx-runtime-BB_1_6y_.cjs"),M=require("react"),l=require("./index-BqyOu62e.cjs"),L=require("./index-cwZN7ZY3.cjs"),$=require("./index-C8aODXfJ.cjs"),k=require("./index-_XxjJPRD.cjs"),f=require("./index-Cqf5g2f_.cjs"),F=require("./index-CBuLZ39k.cjs"),w=require("./index-DE3jjVoC.cjs"),I=require("./index-CocSS1YK.cjs"),U=require("./index-L8BhH23Y.cjs"),z=require("./index-DoxiiusW.cjs");function W(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const a=W(M);var H,P="HoverCard",[T]=L.createContextScope(P,[f.createPopperScope]),b=f.createPopperScope(),[B,j]=T(P),O=e=>{const{__scopeHoverCard:t,children:r,open:n,defaultOpen:i,onOpenChange:c,openDelay:m=700,closeDelay:v=300}=e,d=b(t),x=a.useRef(0),u=a.useRef(0),C=a.useRef(!1),p=a.useRef(!1),[h,o]=$.useControllableState({prop:n,defaultProp:i??!1,onChange:c,caller:P}),R=a.useCallback(()=>{clearTimeout(u.current),x.current=window.setTimeout(()=>o(!0),m)},[m,o]),A=a.useCallback(()=>{clearTimeout(x.current),!C.current&&!p.current&&(u.current=window.setTimeout(()=>o(!1),v))},[v,o]),q=a.useCallback(()=>o(!1),[o]);return a.useEffect(()=>()=>{clearTimeout(x.current),clearTimeout(u.current)},[]),s.jsxRuntimeExports.jsx(B,{scope:t,open:h,onOpenChange:o,onOpen:R,onClose:A,onDismiss:q,hasSelectionRef:C,isPointerDownOnContentRef:p,children:s.jsxRuntimeExports.jsx(f.Root2,{...d,children:r})})};O.displayName=P;var y="HoverCardTrigger",_=a.forwardRef((e,t)=>{const{__scopeHoverCard:r,...n}=e,i=j(y,r),c=b(r);return s.jsxRuntimeExports.jsx(f.Anchor,{asChild:!0,...c,children:s.jsxRuntimeExports.jsx(I.Primitive.a,{"data-state":i.open?"open":"closed",...n,ref:t,onPointerEnter:l.composeEventHandlers(e.onPointerEnter,g(i.onOpen)),onPointerLeave:l.composeEventHandlers(e.onPointerLeave,g(i.onClose)),onFocus:l.composeEventHandlers(e.onFocus,i.onOpen),onBlur:l.composeEventHandlers(e.onBlur,i.onClose),onTouchStart:l.composeEventHandlers(e.onTouchStart,m=>m.preventDefault())})})});_.displayName=y;var S="HoverCardPortal",[G,K]=T(S,{forceMount:void 0}),N=e=>{const{__scopeHoverCard:t,forceMount:r,children:n,container:i}=e,c=j(S,t);return s.jsxRuntimeExports.jsx(G,{scope:t,forceMount:r,children:s.jsxRuntimeExports.jsx(w.Presence,{present:r||c.open,children:s.jsxRuntimeExports.jsx(F.Portal,{asChild:!0,container:i,children:n})})})};N.displayName=S;var E="HoverCardContent",D=a.forwardRef((e,t)=>{const r=K(E,e.__scopeHoverCard),{forceMount:n=r.forceMount,...i}=e,c=j(E,e.__scopeHoverCard);return s.jsxRuntimeExports.jsx(w.Presence,{present:n||c.open,children:s.jsxRuntimeExports.jsx(V,{"data-state":c.open?"open":"closed",...i,onPointerEnter:l.composeEventHandlers(e.onPointerEnter,g(c.onOpen)),onPointerLeave:l.composeEventHandlers(e.onPointerLeave,g(c.onClose)),ref:t})})});D.displayName=E;var V=a.forwardRef((e,t)=>{const{__scopeHoverCard:r,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:c,onInteractOutside:m,...v}=e,d=j(E,r),x=b(r),u=a.useRef(null),C=k.useComposedRefs(t,u),[p,h]=a.useState(!1);return a.useEffect(()=>{if(p){const o=document.body;return H=o.style.userSelect||o.style.webkitUserSelect,o.style.userSelect="none",o.style.webkitUserSelect="none",()=>{o.style.userSelect=H,o.style.webkitUserSelect=H}}},[p]),a.useEffect(()=>{if(u.current){const o=()=>{h(!1),d.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==""&&(d.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",o),()=>{document.removeEventListener("pointerup",o),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!1}}},[d.isPointerDownOnContentRef,d.hasSelectionRef]),a.useEffect(()=>{u.current&&X(u.current).forEach(R=>R.setAttribute("tabindex","-1"))}),s.jsxRuntimeExports.jsx(U.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:m,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:l.composeEventHandlers(c,o=>{o.preventDefault()}),onDismiss:d.onDismiss,children:s.jsxRuntimeExports.jsx(f.Content,{...x,...v,onPointerDown:l.composeEventHandlers(v.onPointerDown,o=>{o.currentTarget.contains(o.target)&&h(!0),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!0}),ref:C,style:{...v.style,userSelect:p?"text":void 0,WebkitUserSelect:p?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),J="HoverCardArrow",Q=a.forwardRef((e,t)=>{const{__scopeHoverCard:r,...n}=e,i=b(r);return s.jsxRuntimeExports.jsx(f.Arrow,{...i,...n,ref:t})});Q.displayName=J;function g(e){return t=>t.pointerType==="touch"?void 0:e()}function X(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;r.nextNode();)t.push(r.currentNode);return t}var Y=O,Z=_,ee=N,te=D;function re({...e}){return s.jsxRuntimeExports.jsx(Y,{"data-slot":"hover-card",...e})}function oe({...e}){return s.jsxRuntimeExports.jsx(Z,{"data-slot":"hover-card-trigger",...e})}function ne({className:e,align:t="center",sideOffset:r=4,...n}){return s.jsxRuntimeExports.jsx(ee,{"data-slot":"hover-card-portal",children:s.jsxRuntimeExports.jsx(te,{"data-slot":"hover-card-content",align:t,sideOffset:r,className:z.cn(`
|
|
2
2
|
adm:z-50 adm:w-64
|
|
3
3
|
adm:origin-(--radix-hover-card-content-transform-origin)
|
|
4
4
|
adm:rounded-md adm:border adm:bg-popover adm:p-4
|
|
@@ -12,4 +12,4 @@
|
|
|
12
12
|
adm:data-[state=closed]:zoom-out-95
|
|
13
13
|
adm:data-[state=open]:animate-in adm:data-[state=open]:fade-in-0
|
|
14
14
|
adm:data-[state=open]:zoom-in-95
|
|
15
|
-
`,e),...n})})}exports.HoverCard=
|
|
15
|
+
`,e),...n})})}exports.HoverCard=re;exports.HoverCardContent=ne;exports.HoverCardTrigger=oe;
|
package/dist/hover-card.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { j as a } from "./jsx-runtime-BzflLqGi.js";
|
|
3
3
|
import * as n from "react";
|
|
4
|
-
import {
|
|
5
|
-
import { c as
|
|
4
|
+
import { c as l } from "./index-B695uy69.js";
|
|
5
|
+
import { c as M } from "./index-FxyLF8MY.js";
|
|
6
|
+
import { u as k } from "./index-437EL2iq.js";
|
|
6
7
|
import { u as F } from "./index-DLcqcWxM.js";
|
|
7
8
|
import { c as T, R as I, A as U, C as $, a as W } from "./index-BAEhLEFF.js";
|
|
8
9
|
import { P as z } from "./index-CZWDxvEo.js";
|
|
9
10
|
import { P as H } from "./index-CSFEzRxy.js";
|
|
10
11
|
import { P as B } from "./index-BMWt1NBG.js";
|
|
11
|
-
import { D as G } from "./index-
|
|
12
|
+
import { D as G } from "./index-BM2A-WRV.js";
|
|
12
13
|
import { c as K } from "./index-CRiPKpXj.js";
|
|
13
|
-
var w, R = "HoverCard", [O] =
|
|
14
|
+
var w, R = "HoverCard", [O] = M(R, [
|
|
14
15
|
T
|
|
15
16
|
]), S = T(), [V, b] = O(R), _ = (e) => {
|
|
16
17
|
const {
|
|
@@ -21,7 +22,7 @@ var w, R = "HoverCard", [O] = k(R, [
|
|
|
21
22
|
onOpenChange: c,
|
|
22
23
|
openDelay: f = 700,
|
|
23
24
|
closeDelay: m = 300
|
|
24
|
-
} = e, d = S(o), v = n.useRef(0), u = n.useRef(0), h = n.useRef(!1), p = n.useRef(!1), [C, r] =
|
|
25
|
+
} = e, d = S(o), v = n.useRef(0), u = n.useRef(0), h = n.useRef(!1), p = n.useRef(!1), [C, r] = k({
|
|
25
26
|
prop: s,
|
|
26
27
|
defaultProp: i ?? !1,
|
|
27
28
|
onChange: c,
|
|
@@ -174,17 +175,17 @@ function Z(e) {
|
|
|
174
175
|
return o;
|
|
175
176
|
}
|
|
176
177
|
var ee = _, re = N, oe = D, te = j;
|
|
177
|
-
function
|
|
178
|
+
function ve({
|
|
178
179
|
...e
|
|
179
180
|
}) {
|
|
180
181
|
return /* @__PURE__ */ a.jsx(ee, { "data-slot": "hover-card", ...e });
|
|
181
182
|
}
|
|
182
|
-
function
|
|
183
|
+
function he({
|
|
183
184
|
...e
|
|
184
185
|
}) {
|
|
185
186
|
return /* @__PURE__ */ a.jsx(re, { "data-slot": "hover-card-trigger", ...e });
|
|
186
187
|
}
|
|
187
|
-
function
|
|
188
|
+
function Ce({
|
|
188
189
|
className: e,
|
|
189
190
|
align: o = "center",
|
|
190
191
|
sideOffset: t = 4,
|
|
@@ -219,7 +220,7 @@ function he({
|
|
|
219
220
|
) });
|
|
220
221
|
}
|
|
221
222
|
export {
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
223
|
+
ve as HoverCard,
|
|
224
|
+
Ce as HoverCardContent,
|
|
225
|
+
he as HoverCardTrigger
|
|
225
226
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";const Xe=require("react"),v=require("./index-BqyOu62e.cjs"),Re=require("./index-Da298sEl.cjs"),_=require("./index-_XxjJPRD.cjs"),ze=require("./index-cwZN7ZY3.cjs"),Ze=require("./index-L8BhH23Y.cjs"),J=require("./index-_TfuLupy.cjs"),Je=require("./index-CgAmFB15.cjs"),me=require("./index-WIv2ndLu.cjs"),j=require("./index-Cqf5g2f_.cjs"),Qe=require("./index-CBuLZ39k.cjs"),$=require("./index-DE3jjVoC.cjs"),w=require("./index-CocSS1YK.cjs"),B=require("./index-D3xJARPa.cjs"),i=require("./jsx-runtime-BB_1_6y_.cjs"),ee=require("./index-CzY-WZXL.cjs");function et(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const r=et(Xe);function tt(e){const n=nt(e),t=r.forwardRef((o,s)=>{const{children:c,...l}=o,f=r.Children.toArray(c),m=f.find(rt);if(m){const p=m.props.children,d=f.map(u=>u===m?r.Children.count(p)>1?r.Children.only(null):r.isValidElement(p)?p.props.children:null:u);return i.jsxRuntimeExports.jsx(n,{...l,ref:s,children:r.isValidElement(p)?r.cloneElement(p,void 0,d):null})}return i.jsxRuntimeExports.jsx(n,{...l,ref:s,children:c})});return t.displayName=`${e}.Slot`,t}function nt(e){const n=r.forwardRef((t,o)=>{const{children:s,...c}=t;if(r.isValidElement(s)){const l=ct(s),f=st(c,s.props);return s.type!==r.Fragment&&(f.ref=o?_.composeRefs(o,l):l),r.cloneElement(s,f)}return r.Children.count(s)>1?r.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var ot=Symbol("radix.slottable");function rt(e){return r.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ot}function st(e,n){const t={...n};for(const o in n){const s=e[o],c=n[o];/^on[A-Z]/.test(o)?s&&c?t[o]=(...f)=>{const m=c(...f);return s(...f),m}:s&&(t[o]=s):o==="style"?t[o]={...s,...c}:o==="className"&&(t[o]=[s,c].filter(Boolean).join(" "))}return{...e,...t}}function ct(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,t=n&&"isReactWarning"in n&&n.isReactWarning;return t?e.ref:(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,t=n&&"isReactWarning"in n&&n.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}var Q=["Enter"," "],ut=["ArrowDown","PageUp","Home"],ve=["ArrowUp","PageDown","End"],it=[...ut,...ve],at={ltr:[...Q,"ArrowRight"],rtl:[...Q,"ArrowLeft"]},lt={ltr:["ArrowLeft"],rtl:["ArrowRight"]},F="Menu",[k,dt,ft]=Re.createCollection(F),[S,pt]=ze.createContextScope(F,[ft,j.createPopperScope,B.createRovingFocusGroupScope]),L=j.createPopperScope(),Ee=B.createRovingFocusGroupScope(),[Ce,g]=S(F),[mt,G]=S(F),he=e=>{const{__scopeMenu:n,open:t=!1,children:o,dir:s,onOpenChange:c,modal:l=!0}=e,f=L(n),[m,p]=r.useState(null),d=r.useRef(!1),u=ee.useCallbackRef(c),x=Re.useDirection(s);return r.useEffect(()=>{const C=()=>{d.current=!0,document.addEventListener("pointerdown",R,{capture:!0,once:!0}),document.addEventListener("pointermove",R,{capture:!0,once:!0})},R=()=>d.current=!1;return document.addEventListener("keydown",C,{capture:!0}),()=>{document.removeEventListener("keydown",C,{capture:!0}),document.removeEventListener("pointerdown",R,{capture:!0}),document.removeEventListener("pointermove",R,{capture:!0})}},[]),i.jsxRuntimeExports.jsx(j.Root2,{...f,children:i.jsxRuntimeExports.jsx(Ce,{scope:n,open:t,onOpenChange:u,content:m,onContentChange:p,children:i.jsxRuntimeExports.jsx(mt,{scope:n,onClose:r.useCallback(()=>u(!1),[u]),isUsingKeyboardRef:d,dir:x,modal:l,children:o})})})};he.displayName=F;var xt="MenuAnchor",te=r.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e,s=L(t);return i.jsxRuntimeExports.jsx(j.Anchor,{...s,...o,ref:n})});te.displayName=xt;var ne="MenuPortal",[Rt,ge]=S(ne,{forceMount:void 0}),Me=e=>{const{__scopeMenu:n,forceMount:t,children:o,container:s}=e,c=g(ne,n);return i.jsxRuntimeExports.jsx(Rt,{scope:n,forceMount:t,children:i.jsxRuntimeExports.jsx($.Presence,{present:t||c.open,children:i.jsxRuntimeExports.jsx(Qe.Portal,{asChild:!0,container:s,children:o})})})};Me.displayName=ne;var h="MenuContent",[vt,oe]=S(h),_e=r.forwardRef((e,n)=>{const t=ge(h,e.__scopeMenu),{forceMount:o=t.forceMount,...s}=e,c=g(h,e.__scopeMenu),l=G(h,e.__scopeMenu);return i.jsxRuntimeExports.jsx(k.Provider,{scope:e.__scopeMenu,children:i.jsxRuntimeExports.jsx($.Presence,{present:o||c.open,children:i.jsxRuntimeExports.jsx(k.Slot,{scope:e.__scopeMenu,children:l.modal?i.jsxRuntimeExports.jsx(Et,{...s,ref:n}):i.jsxRuntimeExports.jsx(Ct,{...s,ref:n})})})})}),Et=r.forwardRef((e,n)=>{const t=g(h,e.__scopeMenu),o=r.useRef(null),s=_.useComposedRefs(n,o);return r.useEffect(()=>{const c=o.current;if(c)return J.hideOthers(c)},[]),i.jsxRuntimeExports.jsx(re,{...e,ref:s,trapFocus:t.open,disableOutsidePointerEvents:t.open,disableOutsideScroll:!0,onFocusOutside:v.composeEventHandlers(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>t.onOpenChange(!1)})}),Ct=r.forwardRef((e,n)=>{const t=g(h,e.__scopeMenu);return i.jsxRuntimeExports.jsx(re,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>t.onOpenChange(!1)})}),ht=tt("MenuContent.ScrollLock"),re=r.forwardRef((e,n)=>{const{__scopeMenu:t,loop:o=!1,trapFocus:s,onOpenAutoFocus:c,onCloseAutoFocus:l,disableOutsidePointerEvents:f,onEntryFocus:m,onEscapeKeyDown:p,onPointerDownOutside:d,onFocusOutside:u,onInteractOutside:x,onDismiss:C,disableOutsideScroll:R,...P}=e,T=g(h,t),y=G(h,t),He=L(t),Ue=Ee(t),ae=dt(t),[Ve,le]=r.useState(null),K=r.useRef(null),qe=_.useComposedRefs(n,K,T.onContentChange),H=r.useRef(0),U=r.useRef(""),$e=r.useRef(0),Y=r.useRef(null),de=r.useRef("right"),X=r.useRef(0),Be=R?J.ReactRemoveScroll:r.Fragment,We=R?{as:ht,allowPinchZoom:!0}:void 0,Ye=a=>{const b=U.current+a,M=ae().filter(E=>!E.disabled),O=document.activeElement,z=M.find(E=>E.ref.current===O)?.textValue,Z=M.map(E=>E.textValue),fe=Ot(Z,b,z),A=M.find(E=>E.textValue===fe)?.ref.current;(function E(pe){U.current=pe,window.clearTimeout(H.current),pe!==""&&(H.current=window.setTimeout(()=>E(""),1e3))})(b),A&&setTimeout(()=>A.focus())};r.useEffect(()=>()=>window.clearTimeout(H.current),[]),J.useFocusGuards();const I=r.useCallback(a=>de.current===Y.current?.side&&Dt(a,Y.current?.area),[]);return i.jsxRuntimeExports.jsx(vt,{scope:t,searchRef:U,onItemEnter:r.useCallback(a=>{I(a)&&a.preventDefault()},[I]),onItemLeave:r.useCallback(a=>{I(a)||(K.current?.focus(),le(null))},[I]),onTriggerLeave:r.useCallback(a=>{I(a)&&a.preventDefault()},[I]),pointerGraceTimerRef:$e,onPointerGraceIntentChange:r.useCallback(a=>{Y.current=a},[]),children:i.jsxRuntimeExports.jsx(Be,{...We,children:i.jsxRuntimeExports.jsx(Je.FocusScope,{asChild:!0,trapped:s,onMountAutoFocus:v.composeEventHandlers(c,a=>{a.preventDefault(),K.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:i.jsxRuntimeExports.jsx(Ze.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:f,onEscapeKeyDown:p,onPointerDownOutside:d,onFocusOutside:u,onInteractOutside:x,onDismiss:C,children:i.jsxRuntimeExports.jsx(B.Root,{asChild:!0,...Ue,dir:y.dir,orientation:"vertical",loop:o,currentTabStopId:Ve,onCurrentTabStopIdChange:le,onEntryFocus:v.composeEventHandlers(m,a=>{y.isUsingKeyboardRef.current||a.preventDefault()}),preventScrollOnEntryFocus:!0,children:i.jsxRuntimeExports.jsx(j.Content,{role:"menu","aria-orientation":"vertical","data-state":Ke(T.open),"data-radix-menu-content":"",dir:y.dir,...He,...P,ref:qe,style:{outline:"none",...P.style},onKeyDown:v.composeEventHandlers(P.onKeyDown,a=>{const M=a.target.closest("[data-radix-menu-content]")===a.currentTarget,O=a.ctrlKey||a.altKey||a.metaKey,z=a.key.length===1;M&&(a.key==="Tab"&&a.preventDefault(),!O&&z&&Ye(a.key));const Z=K.current;if(a.target!==Z||!it.includes(a.key))return;a.preventDefault();const A=ae().filter(E=>!E.disabled).map(E=>E.ref.current);ve.includes(a.key)&&A.reverse(),wt(A)}),onBlur:v.composeEventHandlers(e.onBlur,a=>{a.currentTarget.contains(a.target)||(window.clearTimeout(H.current),U.current="")}),onPointerMove:v.composeEventHandlers(e.onPointerMove,N(a=>{const b=a.target,M=X.current!==a.clientX;if(a.currentTarget.contains(b)&&M){const O=a.clientX>X.current?"right":"left";de.current=O,X.current=a.clientX}}))})})})})})})});_e.displayName=h;var gt="MenuGroup",se=r.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e;return i.jsxRuntimeExports.jsx(w.Primitive.div,{role:"group",...o,ref:n})});se.displayName=gt;var Mt="MenuLabel",je=r.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e;return i.jsxRuntimeExports.jsx(w.Primitive.div,{...o,ref:n})});je.displayName=Mt;var V="MenuItem",xe="menu.itemSelect",W=r.forwardRef((e,n)=>{const{disabled:t=!1,onSelect:o,...s}=e,c=r.useRef(null),l=G(V,e.__scopeMenu),f=oe(V,e.__scopeMenu),m=_.useComposedRefs(n,c),p=r.useRef(!1),d=()=>{const u=c.current;if(!t&&u){const x=new CustomEvent(xe,{bubbles:!0,cancelable:!0});u.addEventListener(xe,C=>o?.(C),{once:!0}),w.dispatchDiscreteCustomEvent(u,x),x.defaultPrevented?p.current=!1:l.onClose()}};return i.jsxRuntimeExports.jsx(Se,{...s,ref:m,disabled:t,onClick:v.composeEventHandlers(e.onClick,d),onPointerDown:u=>{e.onPointerDown?.(u),p.current=!0},onPointerUp:v.composeEventHandlers(e.onPointerUp,u=>{p.current||u.currentTarget?.click()}),onKeyDown:v.composeEventHandlers(e.onKeyDown,u=>{const x=f.searchRef.current!=="";t||x&&u.key===" "||Q.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})})});W.displayName=V;var Se=r.forwardRef((e,n)=>{const{__scopeMenu:t,disabled:o=!1,textValue:s,...c}=e,l=oe(V,t),f=Ee(t),m=r.useRef(null),p=_.useComposedRefs(n,m),[d,u]=r.useState(!1),[x,C]=r.useState("");return r.useEffect(()=>{const R=m.current;R&&C((R.textContent??"").trim())},[c.children]),i.jsxRuntimeExports.jsx(k.ItemSlot,{scope:t,disabled:o,textValue:s??x,children:i.jsxRuntimeExports.jsx(B.Item,{asChild:!0,...f,focusable:!o,children:i.jsxRuntimeExports.jsx(w.Primitive.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...c,ref:p,onPointerMove:v.composeEventHandlers(e.onPointerMove,N(R=>{o?l.onItemLeave(R):(l.onItemEnter(R),R.defaultPrevented||R.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:v.composeEventHandlers(e.onPointerLeave,N(R=>l.onItemLeave(R))),onFocus:v.composeEventHandlers(e.onFocus,()=>u(!0)),onBlur:v.composeEventHandlers(e.onBlur,()=>u(!1))})})})}),_t="MenuCheckboxItem",Pe=r.forwardRef((e,n)=>{const{checked:t=!1,onCheckedChange:o,...s}=e;return i.jsxRuntimeExports.jsx(Te,{scope:e.__scopeMenu,checked:t,children:i.jsxRuntimeExports.jsx(W,{role:"menuitemcheckbox","aria-checked":q(t)?"mixed":t,...s,ref:n,"data-state":ie(t),onSelect:v.composeEventHandlers(s.onSelect,()=>o?.(q(t)?!0:!t),{checkForDefaultPrevented:!1})})})});Pe.displayName=_t;var ye="MenuRadioGroup",[jt,St]=S(ye,{value:void 0,onValueChange:()=>{}}),Ie=r.forwardRef((e,n)=>{const{value:t,onValueChange:o,...s}=e,c=ee.useCallbackRef(o);return i.jsxRuntimeExports.jsx(jt,{scope:e.__scopeMenu,value:t,onValueChange:c,children:i.jsxRuntimeExports.jsx(se,{...s,ref:n})})});Ie.displayName=ye;var be="MenuRadioItem",we=r.forwardRef((e,n)=>{const{value:t,...o}=e,s=St(be,e.__scopeMenu),c=t===s.value;return i.jsxRuntimeExports.jsx(Te,{scope:e.__scopeMenu,checked:c,children:i.jsxRuntimeExports.jsx(W,{role:"menuitemradio","aria-checked":c,...o,ref:n,"data-state":ie(c),onSelect:v.composeEventHandlers(o.onSelect,()=>s.onValueChange?.(t),{checkForDefaultPrevented:!1})})})});we.displayName=be;var ce="MenuItemIndicator",[Te,Pt]=S(ce,{checked:!1}),Oe=r.forwardRef((e,n)=>{const{__scopeMenu:t,forceMount:o,...s}=e,c=Pt(ce,t);return i.jsxRuntimeExports.jsx($.Presence,{present:o||q(c.checked)||c.checked===!0,children:i.jsxRuntimeExports.jsx(w.Primitive.span,{...s,ref:n,"data-state":ie(c.checked)})})});Oe.displayName=ce;var yt="MenuSeparator",Ae=r.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e;return i.jsxRuntimeExports.jsx(w.Primitive.div,{role:"separator","aria-orientation":"horizontal",...o,ref:n})});Ae.displayName=yt;var It="MenuArrow",De=r.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e,s=L(t);return i.jsxRuntimeExports.jsx(j.Arrow,{...s,...o,ref:n})});De.displayName=It;var ue="MenuSub",[bt,ke]=S(ue),Ne=e=>{const{__scopeMenu:n,children:t,open:o=!1,onOpenChange:s}=e,c=g(ue,n),l=L(n),[f,m]=r.useState(null),[p,d]=r.useState(null),u=ee.useCallbackRef(s);return r.useEffect(()=>(c.open===!1&&u(!1),()=>u(!1)),[c.open,u]),i.jsxRuntimeExports.jsx(j.Root2,{...l,children:i.jsxRuntimeExports.jsx(Ce,{scope:n,open:o,onOpenChange:u,content:p,onContentChange:d,children:i.jsxRuntimeExports.jsx(bt,{scope:n,contentId:me.useId(),triggerId:me.useId(),trigger:f,onTriggerChange:m,children:t})})})};Ne.displayName=ue;var D="MenuSubTrigger",Fe=r.forwardRef((e,n)=>{const t=g(D,e.__scopeMenu),o=G(D,e.__scopeMenu),s=ke(D,e.__scopeMenu),c=oe(D,e.__scopeMenu),l=r.useRef(null),{pointerGraceTimerRef:f,onPointerGraceIntentChange:m}=c,p={__scopeMenu:e.__scopeMenu},d=r.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return r.useEffect(()=>d,[d]),r.useEffect(()=>{const u=f.current;return()=>{window.clearTimeout(u),m(null)}},[f,m]),i.jsxRuntimeExports.jsx(te,{asChild:!0,...p,children:i.jsxRuntimeExports.jsx(Se,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":t.open,"aria-controls":s.contentId,"data-state":Ke(t.open),...e,ref:_.composeRefs(n,s.onTriggerChange),onClick:u=>{e.onClick?.(u),!(e.disabled||u.defaultPrevented)&&(u.currentTarget.focus(),t.open||t.onOpenChange(!0))},onPointerMove:v.composeEventHandlers(e.onPointerMove,N(u=>{c.onItemEnter(u),!u.defaultPrevented&&!e.disabled&&!t.open&&!l.current&&(c.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{t.onOpenChange(!0),d()},100))})),onPointerLeave:v.composeEventHandlers(e.onPointerLeave,N(u=>{d();const x=t.content?.getBoundingClientRect();if(x){const C=t.content?.dataset.side,R=C==="right",P=R?-5:5,T=x[R?"left":"right"],y=x[R?"right":"left"];c.onPointerGraceIntentChange({area:[{x:u.clientX+P,y:u.clientY},{x:T,y:x.top},{x:y,y:x.top},{x:y,y:x.bottom},{x:T,y:x.bottom}],side:C}),window.clearTimeout(f.current),f.current=window.setTimeout(()=>c.onPointerGraceIntentChange(null),300)}else{if(c.onTriggerLeave(u),u.defaultPrevented)return;c.onPointerGraceIntentChange(null)}})),onKeyDown:v.composeEventHandlers(e.onKeyDown,u=>{const x=c.searchRef.current!=="";e.disabled||x&&u.key===" "||at[o.dir].includes(u.key)&&(t.onOpenChange(!0),t.content?.focus(),u.preventDefault())})})})});Fe.displayName=D;var Le="MenuSubContent",Ge=r.forwardRef((e,n)=>{const t=ge(h,e.__scopeMenu),{forceMount:o=t.forceMount,...s}=e,c=g(h,e.__scopeMenu),l=G(h,e.__scopeMenu),f=ke(Le,e.__scopeMenu),m=r.useRef(null),p=_.useComposedRefs(n,m);return i.jsxRuntimeExports.jsx(k.Provider,{scope:e.__scopeMenu,children:i.jsxRuntimeExports.jsx($.Presence,{present:o||c.open,children:i.jsxRuntimeExports.jsx(k.Slot,{scope:e.__scopeMenu,children:i.jsxRuntimeExports.jsx(re,{id:f.contentId,"aria-labelledby":f.triggerId,...s,ref:p,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{l.isUsingKeyboardRef.current&&m.current?.focus(),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:v.composeEventHandlers(e.onFocusOutside,d=>{d.target!==f.trigger&&c.onOpenChange(!1)}),onEscapeKeyDown:v.composeEventHandlers(e.onEscapeKeyDown,d=>{l.onClose(),d.preventDefault()}),onKeyDown:v.composeEventHandlers(e.onKeyDown,d=>{const u=d.currentTarget.contains(d.target),x=lt[l.dir].includes(d.key);u&&x&&(c.onOpenChange(!1),f.trigger?.focus(),d.preventDefault())})})})})})});Ge.displayName=Le;function Ke(e){return e?"open":"closed"}function q(e){return e==="indeterminate"}function ie(e){return q(e)?"indeterminate":e?"checked":"unchecked"}function wt(e){const n=document.activeElement;for(const t of e)if(t===n||(t.focus(),document.activeElement!==n))return}function Tt(e,n){return e.map((t,o)=>e[(n+o)%e.length])}function Ot(e,n,t){const s=n.length>1&&Array.from(n).every(p=>p===n[0])?n[0]:n,c=t?e.indexOf(t):-1;let l=Tt(e,Math.max(c,0));s.length===1&&(l=l.filter(p=>p!==t));const m=l.find(p=>p.toLowerCase().startsWith(s.toLowerCase()));return m!==t?m:void 0}function At(e,n){const{x:t,y:o}=e;let s=!1;for(let c=0,l=n.length-1;c<n.length;l=c++){const f=n[c],m=n[l],p=f.x,d=f.y,u=m.x,x=m.y;d>o!=x>o&&t<(u-p)*(o-d)/(x-d)+p&&(s=!s)}return s}function Dt(e,n){if(!n)return!1;const t={x:e.clientX,y:e.clientY};return At(t,n)}function N(e){return n=>n.pointerType==="mouse"?e(n):void 0}var kt=he,Nt=te,Ft=Me,Lt=_e,Gt=se,Kt=je,Ht=W,Ut=Pe,Vt=Ie,qt=we,$t=Oe,Bt=Ae,Wt=De,Yt=Ne,Xt=Fe,zt=Ge;exports.Anchor2=Nt;exports.Arrow2=Wt;exports.CheckboxItem=Ut;exports.Content2=Lt;exports.Group=Gt;exports.Item2=Ht;exports.ItemIndicator=$t;exports.Label=Kt;exports.Portal=Ft;exports.RadioGroup=Vt;exports.RadioItem=qt;exports.Root3=kt;exports.Separator=Bt;exports.Sub=Yt;exports.SubContent=zt;exports.SubTrigger=Xt;exports.createMenuScope=pt;
|