@gv-tech/ui-web 2.29.2 → 2.29.4
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.cjs +1 -1
- package/dist/accordion.mjs +53 -1
- package/dist/alert-dialog.cjs +1 -1
- package/dist/alert-dialog.mjs +99 -1
- package/dist/alert.cjs +1 -1
- package/dist/alert.mjs +1 -1
- package/dist/aspect-ratio.cjs +1 -1
- package/dist/aspect-ratio.mjs +10 -1
- package/dist/attachment.cjs +1 -1
- package/dist/attachment.mjs +25 -24
- package/dist/avatar.cjs +1 -1
- package/dist/avatar.mjs +49 -1
- package/dist/badge.cjs +1 -1
- package/dist/badge.mjs +5 -4
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.mjs +12 -11
- package/dist/bubble.cjs +1 -1
- package/dist/bubble.mjs +4 -3
- package/dist/button-group.cjs +1 -1
- package/dist/button-group.mjs +12 -11
- package/dist/button.cjs +1 -1
- package/dist/button.mjs +4 -3
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.mjs +97 -1
- package/dist/card.cjs +1 -1
- package/dist/card.mjs +1 -1
- package/dist/carousel.cjs +1 -1
- package/dist/carousel.mjs +107 -1
- package/dist/chart.cjs +2 -2
- package/dist/chart.mjs +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.mjs +19 -1
- package/dist/collapsible.cjs +1 -1
- package/dist/collapsible.mjs +12 -12
- package/dist/combobox.cjs +1 -1
- package/dist/combobox.mjs +161 -1
- package/dist/command.cjs +1 -1
- package/dist/command.mjs +89 -1
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.mjs +123 -1
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.mjs +40 -40
- package/dist/direction.cjs +1 -1
- package/dist/direction.mjs +7 -7
- package/dist/drawer.cjs +1 -1
- package/dist/drawer.mjs +1 -1
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.mjs +126 -1
- package/dist/empty.cjs +1 -1
- package/dist/empty.mjs +1 -1
- package/dist/field.cjs +1 -1
- package/dist/field.mjs +36 -36
- package/dist/form.cjs +1 -1
- package/dist/form.mjs +36 -36
- package/dist/hover-card.cjs +1 -1
- package/dist/hover-card.mjs +30 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +36 -36
- package/dist/input-group.cjs +1 -1
- package/dist/input-group.mjs +26 -26
- package/dist/input-otp.cjs +1 -1
- package/dist/input-otp.mjs +45 -1
- package/dist/input.cjs +1 -1
- package/dist/input.mjs +1 -1
- package/dist/item.cjs +1 -1
- package/dist/item.mjs +28 -27
- package/dist/kbd.cjs +1 -1
- package/dist/kbd.mjs +1 -1
- package/dist/label.cjs +1 -1
- package/dist/label.mjs +13 -1
- package/dist/marker.cjs +1 -1
- package/dist/marker.mjs +4 -3
- package/dist/menubar.cjs +1 -1
- package/dist/menubar.mjs +133 -1
- package/dist/message-scroller.cjs +1 -1
- package/dist/message-scroller.mjs +59 -1
- package/dist/message.cjs +1 -1
- package/dist/message.mjs +1 -1
- package/dist/native-select.cjs +1 -1
- package/dist/native-select.mjs +1 -1
- package/dist/navigation-menu.cjs +1 -1
- package/dist/navigation-menu.mjs +79 -1
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.mjs +14 -14
- package/dist/popover.cjs +1 -1
- package/dist/popover.mjs +54 -1
- package/dist/progress.cjs +1 -1
- package/dist/progress.mjs +19 -1
- package/dist/questionnaire.cjs +1 -1
- package/dist/questionnaire.mjs +168 -1
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.mjs +25 -1
- package/dist/resizable.cjs +1 -1
- package/dist/resizable.mjs +26 -1
- package/dist/rolldown-runtime-BocRIvOZ.js +1 -0
- package/dist/scroll-area.cjs +1 -1
- package/dist/scroll-area.mjs +35 -1
- package/dist/scroll-to-top.cjs +1 -1
- package/dist/search.cjs +1 -1
- package/dist/search.mjs +1 -1
- package/dist/select.cjs +1 -1
- package/dist/select.mjs +98 -1
- package/dist/separator.cjs +1 -1
- package/dist/separator.mjs +15 -1
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.mjs +38 -38
- package/dist/{sidebar-C2ax_A0G.mjs → sidebar-DrU3nKaL.mjs} +138 -134
- package/dist/sidebar-uOtFHnBs.js +1 -0
- package/dist/sidebar.cjs +1 -1
- package/dist/sidebar.mjs +3 -1
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.mjs +1 -1
- package/dist/slider.cjs +1 -1
- package/dist/slider.mjs +34 -1
- package/dist/spinner.cjs +1 -1
- package/dist/spinner.mjs +1 -1
- package/dist/support-fab.cjs +1 -1
- package/dist/switch.cjs +1 -1
- package/dist/switch.mjs +18 -1
- package/dist/table-of-contents.cjs +1 -1
- package/dist/table.cjs +1 -1
- package/dist/table.mjs +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.mjs +44 -1
- package/dist/text.cjs +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.mjs +1 -1
- package/dist/{theme-toggle-BSMwXb8o.mjs → theme-toggle-9KtAIRxy.mjs} +6 -6
- package/dist/theme-toggle-DkNI3bfh.js +1 -0
- package/dist/theme-toggle.cjs +1 -1
- package/dist/theme-toggle.mjs +2 -1
- package/dist/toast.cjs +1 -1
- package/dist/toast.mjs +52 -1
- package/dist/{toaster-D2BV6jez.mjs → toaster-8RrHPtlc.mjs} +8 -8
- package/dist/toaster-AFud4l6l.js +1 -0
- package/dist/toaster.cjs +1 -1
- package/dist/toaster.mjs +2 -1
- package/dist/toggle-group.cjs +1 -1
- package/dist/toggle-group.mjs +49 -1
- package/dist/toggle.cjs +1 -1
- package/dist/toggle.mjs +35 -1
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.mjs +34 -1
- package/package.json +2 -1
- package/dist/accordion-Bd0-CZQn.js +0 -1
- package/dist/accordion-Cf6DNbLH.mjs +0 -244
- package/dist/alert-dialog-BxFH0Lwn.mjs +0 -180
- package/dist/alert-dialog-C6vNmGBL.js +0 -1
- package/dist/aspect-ratio-CdQevcDV.mjs +0 -38
- package/dist/aspect-ratio-Z4Nkc56X.js +0 -1
- package/dist/avatar-B5PWwGhY.mjs +0 -136
- package/dist/avatar-CFhYRM52.js +0 -1
- package/dist/calendar-D5qgt2o2.js +0 -1
- package/dist/calendar-DIqXNjOR.mjs +0 -3029
- package/dist/carousel-D-xEqRCX.js +0 -1
- package/dist/carousel-DPjWmM_A.mjs +0 -1169
- package/dist/checkbox-DEPm1BBc.mjs +0 -184
- package/dist/checkbox-DI9Hn_e_.js +0 -1
- package/dist/chunk-HBS6WEDP-D2-yWzIN.js +0 -1
- package/dist/chunk-HBS6WEDP-DD8ZmxRM.mjs +0 -62
- package/dist/combobox-C4y8AbZX.mjs +0 -5644
- package/dist/combobox-boXp-mix.js +0 -3
- package/dist/command-BnW6UIVk.js +0 -1
- package/dist/command-Cbsp7PBx.mjs +0 -542
- package/dist/context-menu-CwsdFpx1.js +0 -1
- package/dist/context-menu-FNgV55ZV.mjs +0 -315
- package/dist/dist-7YyzJonC.mjs +0 -39
- package/dist/dist-AlmToDtO.mjs +0 -17
- package/dist/dist-B76UOZbx.mjs +0 -40
- package/dist/dist-B7Ph9-T6.mjs +0 -44
- package/dist/dist-B7jnFMko.js +0 -1
- package/dist/dist-BOiFyvyS.mjs +0 -10
- package/dist/dist-BQkDLAY7.js +0 -1
- package/dist/dist-Bal96K8t.js +0 -1
- package/dist/dist-Blgp9lfa.js +0 -1
- package/dist/dist-BnlI08Je.mjs +0 -96
- package/dist/dist-Bu-uFV1C.mjs +0 -191
- package/dist/dist-C2BHd5i1.mjs +0 -460
- package/dist/dist-C516Vwxy.mjs +0 -116
- package/dist/dist-CBlqVBTk.js +0 -1
- package/dist/dist-CDcZ8WMF.js +0 -1
- package/dist/dist-CDksSmTD.mjs +0 -189
- package/dist/dist-CF-qVmmV.js +0 -1
- package/dist/dist-CIgGRTmJ.js +0 -1
- package/dist/dist-CJqVmdrU.js +0 -1
- package/dist/dist-COqM3IM6.mjs +0 -89
- package/dist/dist-CbWpCWog.mjs +0 -180
- package/dist/dist-CcGLWbPa.mjs +0 -19
- package/dist/dist-Cn4F8XlY.mjs +0 -220
- package/dist/dist-CoTs6T03.js +0 -1
- package/dist/dist-Co_xSt6d.js +0 -1
- package/dist/dist-Cu0GG-3j.mjs +0 -15
- package/dist/dist-DJqkhIXb.js +0 -1
- package/dist/dist-DKI-XYwI.mjs +0 -98
- package/dist/dist-DQeXXRYL.mjs +0 -201
- package/dist/dist-DW2ltK5-.js +0 -1
- package/dist/dist-DWcKY_sJ.js +0 -1
- package/dist/dist-DZiOPWLp.js +0 -1
- package/dist/dist-DdAeWIwf.js +0 -1
- package/dist/dist-DhubV_gU.mjs +0 -4
- package/dist/dist-DmY7elIQ.js +0 -1
- package/dist/dist-DoWtzxYc.mjs +0 -684
- package/dist/dist-DuQlxGyN.js +0 -1
- package/dist/dist-KFF7QKuL.js +0 -1
- package/dist/dist-RXrZgzkO.js +0 -1
- package/dist/dist-R_G5UQRm.js +0 -1
- package/dist/dist-dwRwxUPt.mjs +0 -22
- package/dist/dist-fzmUl3YX.mjs +0 -553
- package/dist/dist-hBsne-A2.mjs +0 -92
- package/dist/dist-ljiGYyay.mjs +0 -29
- package/dist/dist-pqMcQ1Nk.js +0 -1
- package/dist/dist-zmnQp5Xf.js +0 -1
- package/dist/dropdown-menu-ChuqZeix.js +0 -1
- package/dist/dropdown-menu-DU7KNoXP.mjs +0 -311
- package/dist/es2015-BooeZGhO.mjs +0 -554
- package/dist/es2015-Dggv0vx3.js +0 -41
- package/dist/floating-ui.react-dom-2hihjuTL.mjs +0 -1057
- package/dist/floating-ui.react-dom-BtFIezY4.js +0 -1
- package/dist/hover-card-BeqCs_2R.js +0 -1
- package/dist/hover-card-w8PmCyw2.mjs +0 -176
- package/dist/input-otp-Bn_Uy1mR.mjs +0 -398
- package/dist/input-otp-CTRB_0Xp.js +0 -20
- package/dist/label-Da0kELfR.mjs +0 -26
- package/dist/label-JMa1tFfC.js +0 -1
- package/dist/menubar-B7sRxpE4.mjs +0 -405
- package/dist/menubar-Bd-QKMcw.js +0 -1
- package/dist/message-scroller-B8AU0v3Y.mjs +0 -805
- package/dist/message-scroller-BJb4Mh_I.js +0 -1
- package/dist/navigation-menu-B-RwfscB.mjs +0 -638
- package/dist/navigation-menu-kPwxYZCR.js +0 -1
- package/dist/popover-Cq5cTNtC.js +0 -1
- package/dist/popover-T6Ra737i.mjs +0 -241
- package/dist/progress-e9YzxvRo.mjs +0 -90
- package/dist/progress-iUSEI7J9.js +0 -6
- package/dist/questionnaire-BLCvUX1C.mjs +0 -1137
- package/dist/questionnaire-CcymIPae.js +0 -1
- package/dist/radio-group-BKpiDcIb.mjs +0 -264
- package/dist/radio-group-DPEzCmxe.js +0 -1
- package/dist/resizable-ByF0NmN9.mjs +0 -2153
- package/dist/resizable-oL3v42zT.js +0 -1
- package/dist/rolldown-runtime-D7yIeQp2.mjs +0 -13
- package/dist/rolldown-runtime-DbbDpzbe.js +0 -1
- package/dist/scroll-area-BzNeOQ6C.mjs +0 -568
- package/dist/scroll-area-s4_ZJK59.js +0 -1
- package/dist/select-B_nRxX2Y.mjs +0 -831
- package/dist/select-j5_dph9S.js +0 -1
- package/dist/separator-Bn-3XUSJ.js +0 -1
- package/dist/separator-CCcMNS78.mjs +0 -38
- package/dist/sidebar-Cnem2n5A.js +0 -1
- package/dist/slider-B2PUTc7W.mjs +0 -484
- package/dist/slider-wZuXwuib.js +0 -1
- package/dist/switch-CD675xU7.js +0 -1
- package/dist/switch-ikzIzrme.mjs +0 -172
- package/dist/tabs-DCm5zOYB.mjs +0 -158
- package/dist/tabs-fcahDQDp.js +0 -1
- package/dist/theme-toggle-BGTJsIA-.js +0 -1
- package/dist/toast-C31v9P1K.js +0 -1
- package/dist/toast-vU5ISM03.mjs +0 -445
- package/dist/toaster-CaJyOCyC.js +0 -1
- package/dist/toggle-CSZdCCwX.js +0 -1
- package/dist/toggle-Cv9YYwLI.mjs +0 -58
- package/dist/toggle-group-RT8wyBwK.js +0 -1
- package/dist/toggle-group-qvjasXS-.mjs +0 -166
- package/dist/tooltip-7ERoN5mV.mjs +0 -386
- package/dist/tooltip-CC9_spXT.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("./rolldown-runtime-DbbDpzbe.js"),t=require("./dist-CoTs6T03.js"),n=require("./dist-DW2ltK5-.js"),r=require("./dist-DZiOPWLp.js"),i=require("./dist-CBlqVBTk.js"),a=require("./dist-zmnQp5Xf.js"),o=require("./dist-CJqVmdrU.js"),s=require("./dist-DdAeWIwf.js"),c=require("./dist-Blgp9lfa.js"),l=require("./dist-RXrZgzkO.js"),u=require("./dist-Co_xSt6d.js"),d=require("./dist-R_G5UQRm.js"),f=require("./dist-B7jnFMko.js"),p=require("./dist-pqMcQ1Nk.js"),m=require("./dist-KFF7QKuL.js");let h=require("lucide-react"),g=require("react"),_=e.r(g,1);g=e.r(g);let v=require("react-dom");v=e.r(v,1);let y=require("react/jsx-runtime"),b=require("class-variance-authority");var x=Object.defineProperty,S=(e,t)=>x(e,`name`,{value:t,configurable:!0});function C(e){let t=_.useRef({value:e,previous:e});return _.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}S(C,`usePrevious`);var w=Object.defineProperty,T=(e,t)=>w(e,`name`,{value:t,configurable:!0}),E={Automatic:`automatic`,Manual:`manual`},D={Vertical:`vertical`,Horizontal:`horizontal`},O={LTR:`ltr`,RTL:`rtl`},k=`NavigationMenu`,[A,j,M]=u.t(k),[N,P,F]=u.t(k),[I,ee]=n.t(k,[M,F]),[te,L]=I(k),[ne,re]=I(k),ie=_.forwardRef(T(function(e,t){let{__scopeNavigationMenu:n,value:r,onValueChange:c,defaultValue:l,delayDuration:u=200,skipDelayDuration:d=300,orientation:f=D.Horizontal,dir:p,activationMode:m=E.Automatic,...h}=e,[g,v]=_.useState(null),b=o.a(t,v),x=s.n(p),S=_.useRef(0),C=_.useRef(0),w=_.useRef(0),[O,A]=_.useState(!0),[j,M]=a.t({prop:r,onChange:T(e=>{let t=e!==``,n=d>0;t?(window.clearTimeout(w.current),n&&A(!1)):(window.clearTimeout(w.current),w.current=window.setTimeout(()=>A(!0),d)),c?.(e)},`onChange`),defaultProp:l??``,caller:k}),N=_.useCallback(()=>{window.clearTimeout(C.current),C.current=window.setTimeout(()=>M(``),150)},[M]),P=_.useCallback(e=>{window.clearTimeout(C.current),M(e)},[M]),F=_.useCallback(e=>{j===e?window.clearTimeout(C.current):S.current=window.setTimeout(()=>{window.clearTimeout(C.current),M(e)},u)},[j,M,u]);return _.useEffect(()=>()=>{window.clearTimeout(S.current),window.clearTimeout(C.current),window.clearTimeout(w.current)},[]),(0,y.jsx)(ae,{scope:n,isRootMenu:!0,value:j,dir:x,orientation:f,activationMode:m,rootNavigationMenu:g,onTriggerEnter:e=>{m===E.Automatic&&(window.clearTimeout(S.current),O?F(e):P(e))},onTriggerLeave:()=>{m===E.Automatic&&(window.clearTimeout(S.current),N())},onContentEnter:()=>{m===E.Automatic&&window.clearTimeout(C.current)},onContentLeave:()=>{m===E.Automatic&&N()},onItemSelect:e=>{M(t=>t===e?``:e)},onItemDismiss:()=>M(``),children:(0,y.jsx)(i.t.nav,{"aria-label":`Main`,"data-orientation":f,dir:x,...h,ref:b})})},`NavigationMenu`)),ae=T(e=>{let{scope:t,isRootMenu:n,rootNavigationMenu:r,dir:i,orientation:a,activationMode:o,children:s,value:c,onItemSelect:u,onItemDismiss:d,onTriggerEnter:f,onTriggerLeave:m,onContentEnter:h,onContentLeave:g}=e,[v,b]=_.useState(null),[x,S]=_.useState(new Map),[w,T]=_.useState(null);return(0,y.jsx)(te,{scope:t,isRootMenu:n,rootNavigationMenu:r,value:c,previousValue:C(c),baseId:l.t(),dir:i,orientation:a,activationMode:o,viewport:v,onViewportChange:b,indicatorTrack:w,onIndicatorTrackChange:T,onTriggerEnter:p.t(f),onTriggerLeave:p.t(m),onContentEnter:p.t(h),onContentLeave:p.t(g),onItemSelect:p.t(u),onItemDismiss:p.t(d),onViewportContentChange:_.useCallback((e,t)=>{S(n=>(n.set(e,t),new Map(n)))},[]),onViewportContentRemove:_.useCallback(e=>{S(t=>t.has(e)?(t.delete(e),new Map(t)):t)},[]),children:(0,y.jsx)(A.Provider,{scope:t,children:(0,y.jsx)(ne,{scope:t,items:x,children:s})})})},`NavigationMenuProvider`),oe=`NavigationMenuList`,se=_.forwardRef(T(function(e,t){let{__scopeNavigationMenu:n,...r}=e,a=L(oe,n),o=(0,y.jsx)(i.t.ul,{"data-orientation":a.orientation,...r,ref:t});return(0,y.jsx)(i.t.div,{style:{position:`relative`},ref:a.onIndicatorTrackChange,children:(0,y.jsx)(A.Slot,{scope:n,children:a.isRootMenu?(0,y.jsx)(K,{asChild:!0,children:o}):o})})},`NavigationMenuList`)),[ce,R]=I(`NavigationMenuItem`),le=_.forwardRef(T(function(e,t){let{__scopeNavigationMenu:n,value:r,...a}=e,o=l.t(),s=r||o||`LEGACY_REACT_AUTO_VALUE`,c=_.useRef(null),u=_.useRef(null),d=_.useRef(null),f=_.useRef(()=>{}),p=_.useRef(!1),m=_.useCallback((e=`start`)=>{if(c.current){f.current();let t=q(c.current);t.length&&J(e===`start`?t:t.reverse())}},[]),h=_.useCallback(()=>{if(c.current){let e=q(c.current);e.length&&(f.current=we(e))}},[]);return(0,y.jsx)(ce,{scope:n,value:s,triggerRef:u,contentRef:c,focusProxyRef:d,wasEscapeCloseRef:p,onEntryKeyDown:m,onFocusProxyEnter:m,onRootContentClose:h,onContentFocusOutside:h,children:(0,y.jsx)(i.t.li,{...a,ref:t})})},`NavigationMenuItem`)),z=`NavigationMenuTrigger`,ue=_.forwardRef(T(function(e,t){let{__scopeNavigationMenu:n,disabled:a,...s}=e,c=L(z,e.__scopeNavigationMenu),l=R(z,e.__scopeNavigationMenu),u=_.useRef(null),d=o.a(u,l.triggerRef,t),f=Z(c.baseId,l.value),p=Q(c.baseId,l.value),h=_.useRef(!1),g=_.useRef(!1),v=l.value===c.value;return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(A.ItemSlot,{scope:n,value:l.value,children:(0,y.jsx)(Ce,{asChild:!0,children:(0,y.jsx)(i.t.button,{id:f,disabled:a,"data-disabled":a?``:void 0,"data-state":X(v),"aria-expanded":v,"aria-controls":v?p:void 0,...s,ref:d,onPointerEnter:r.t(e.onPointerEnter,()=>{g.current=!1,l.wasEscapeCloseRef.current=!1}),onPointerMove:r.t(e.onPointerMove,$(()=>{a||g.current||l.wasEscapeCloseRef.current||h.current||(c.onTriggerEnter(l.value),h.current=!0)})),onPointerLeave:r.t(e.onPointerLeave,$(()=>{a||(c.onTriggerLeave(),h.current=!1)})),onClick:r.t(e.onClick,()=>{c.onItemSelect(l.value),g.current=v}),onKeyDown:r.t(e.onKeyDown,e=>{let t={horizontal:`ArrowDown`,vertical:c.dir===O.RTL?`ArrowLeft`:`ArrowRight`}[c.orientation];v&&e.key===t&&(l.onEntryKeyDown(),e.preventDefault())})})})}),v&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(m.n,{"aria-hidden":!0,tabIndex:0,ref:l.focusProxyRef,onFocus:e=>{let t=l.contentRef.current,n=e.relatedTarget,r=n===u.current,i=t?.contains(n);(r||!i)&&l.onFocusProxyEnter(r?`start`:`end`)}}),c.viewport&&(0,y.jsx)(`span`,{"aria-owns":p})]})]})},`NavigationMenuTrigger`)),B=`navigationMenu.linkSelect`,de=_.forwardRef(T(function(e,t){let{__scopeNavigationMenu:n,active:a,onSelect:o,...s}=e;return(0,y.jsx)(Ce,{asChild:!0,children:(0,y.jsx)(i.t.a,{"data-active":a?``:void 0,"aria-current":a?`page`:void 0,...s,ref:t,onClick:r.t(e.onClick,e=>{let t=e.target,n=new CustomEvent(B,{bubbles:!0,cancelable:!0});if(t.addEventListener(B,e=>o?.(e),{once:!0}),i.n(t,n),!n.defaultPrevented&&!e.metaKey){let e=new CustomEvent(U,{bubbles:!0,cancelable:!0});i.n(t,e)}},{checkForDefaultPrevented:!1})})})},`NavigationMenuLink`)),V=`NavigationMenuIndicator`,fe=_.forwardRef(T(function(e,t){let{forceMount:n,...r}=e,i=L(V,e.__scopeNavigationMenu),a=!!i.value;return i.indicatorTrack?v.createPortal((0,y.jsx)(c.t,{present:n||a,children:(0,y.jsx)(pe,{...r,ref:t})}),i.indicatorTrack):null},`NavigationMenuIndicator`)),pe=_.forwardRef(T(function(e,t){let{__scopeNavigationMenu:n,...r}=e,a=L(V,n),o=j(n),[s,c]=_.useState(null),[l,u]=_.useState(null),d=a.orientation===D.Horizontal,f=!!a.value;_.useEffect(()=>{let e=o().find(e=>e.value===a.value)?.ref.current;e&&c(e)},[o,a.value]);let p=T(()=>{s&&u({size:d?s.offsetWidth:s.offsetHeight,offset:d?s.offsetLeft:s.offsetTop})},`handlePositionChange`);return Y(s,p),Y(a.indicatorTrack,p),l?(0,y.jsx)(i.t.div,{"aria-hidden":!0,"data-state":f?`visible`:`hidden`,"data-orientation":a.orientation,...r,ref:t,style:{position:`absolute`,...d?{left:0,width:l.size+`px`,transform:`translateX(${l.offset}px)`,"--radix-navigation-menu-indicator-translate-x":`${l.offset}px`}:{top:0,height:l.size+`px`,transform:`translateY(${l.offset}px)`,"--radix-navigation-menu-indicator-translate-y":`${l.offset}px`},...r.style}}):null},`NavigationMenuIndicatorImpl`)),H=`NavigationMenuContent`,me=_.forwardRef(T(function(e,t){let{forceMount:n,...i}=e,a=L(H,e.__scopeNavigationMenu),s=R(H,e.__scopeNavigationMenu),l=o.a(s.contentRef,t),u=s.value===a.value,d=X(u),f={value:s.value,triggerRef:s.triggerRef,focusProxyRef:s.focusProxyRef,wasEscapeCloseRef:s.wasEscapeCloseRef,onContentFocusOutside:s.onContentFocusOutside,onRootContentClose:s.onRootContentClose,...i};return a.viewport?(0,y.jsx)(he,{"data-state":d,forceMount:n,...f,ref:l}):(0,y.jsx)(c.t,{present:n||u,children:(0,y.jsx)(W,{"data-state":d,...f,ref:l,onPointerEnter:r.t(e.onPointerEnter,a.onContentEnter),onPointerLeave:r.t(e.onPointerLeave,$(a.onContentLeave)),style:{pointerEvents:!u&&a.isRootMenu?`none`:void 0,...f.style}})})},`NavigationMenuContent`)),he=_.forwardRef(T(function(e,t){let{onViewportContentChange:n,onViewportContentRemove:r}=L(H,e.__scopeNavigationMenu);return f.t(()=>{n(e.value,{ref:t,...e})},[e,t,n]),f.t(()=>()=>r(e.value),[e.value,r]),null},`ViewportContentMounter`)),U=`navigationMenu.rootContentDismiss`,W=_.forwardRef(T(function(e,t){let{__scopeNavigationMenu:n,value:i,triggerRef:a,focusProxyRef:s,wasEscapeCloseRef:c,onRootContentClose:l,onContentFocusOutside:u,...f}=e,p=L(H,n),m=_.useRef(null),h=o.a(m,t),g=Z(p.baseId,i),v=Q(p.baseId,i),b=j(n),x=_.useRef(null),{onItemDismiss:S}=p;_.useEffect(()=>{let e=m.current;if(p.isRootMenu&&e){let t=T(()=>{S(),l(),e.contains(document.activeElement)&&a.current?.focus()},`handleClose`);return e.addEventListener(U,t),()=>e.removeEventListener(U,t)}},[p.isRootMenu,e.value,a,S,l]);let C=_.useMemo(()=>{let e=b().map(e=>e.value);p.dir===O.RTL&&e.reverse();let t=e.indexOf(p.value),n=e.indexOf(p.previousValue),r=i===p.value,a=n===e.indexOf(i);if(!r&&!a)return x.current;let o=(()=>{if(t!==n){if(r&&n!==-1)return t>n?`from-end`:`from-start`;if(a&&t!==-1)return t>n?`to-start`:`to-end`}return null})();return x.current=o,o},[p.previousValue,p.value,p.dir,b,i]);return(0,y.jsx)(K,{asChild:!0,children:(0,y.jsx)(d.t,{id:v,"aria-labelledby":g,"data-motion":C,"data-orientation":p.orientation,...f,ref:h,disableOutsidePointerEvents:!1,onDismiss:()=>{let e=new Event(U,{bubbles:!0,cancelable:!0});m.current?.dispatchEvent(e)},onFocusOutside:r.t(e.onFocusOutside,e=>{u();let t=e.target,n=e.detail.originalEvent.relatedTarget,r=p.rootNavigationMenu?.contains(t),i=p.rootNavigationMenu?.contains(n);(r||!i)&&e.preventDefault()}),onPointerDownOutside:r.t(e.onPointerDownOutside,e=>{let t=e.target,n=b().some(e=>e.ref.current?.contains(t)),r=p.isRootMenu&&p.viewport?.contains(t);(n||r||!p.isRootMenu)&&e.preventDefault()}),onKeyDown:r.t(e.onKeyDown,e=>{let t=e.altKey||e.ctrlKey||e.metaKey;if(e.key===`Tab`&&!t){let t=q(e.currentTarget),n=document.activeElement,r=t.findIndex(e=>e===n);J(e.shiftKey?t.slice(0,r).reverse():t.slice(r+1,t.length))?e.preventDefault():s.current?.focus()}}),onEscapeKeyDown:r.t(e.onEscapeKeyDown,e=>{c.current=!0})})})},`NavigationMenuContentImpl`)),G=`NavigationMenuViewport`,ge=o.r(G),_e=_.forwardRef(T(function(e,t){let{forceMount:n,...r}=e,i=!!L(G,e.__scopeNavigationMenu).value;return(0,y.jsx)(c.t,{present:n||i,children:(0,y.jsx)(ve,{...r,ref:t})})},`NavigationMenuViewport`)),ve=_.forwardRef(T(function(e,t){let{__scopeNavigationMenu:n,children:a,...s}=e,l=L(G,n),u=o.a(t,l.onViewportChange),d=re(H,e.__scopeNavigationMenu),[f,p]=_.useState(null),[m,h]=_.useState(null),g=f?f?.width+`px`:void 0,v=f?f?.height+`px`:void 0,b=!!l.value,x=b?l.value:l.previousValue;return Y(m,T(()=>{m&&p({width:m.offsetWidth,height:m.offsetHeight})},`handleSizeChange`)),(0,y.jsxs)(i.t.div,{"data-state":X(b),"data-orientation":l.orientation,...s,ref:u,style:{pointerEvents:!b&&l.isRootMenu?`none`:void 0,"--radix-navigation-menu-viewport-width":g,"--radix-navigation-menu-viewport-height":v,...s.style},onPointerEnter:r.t(e.onPointerEnter,l.onContentEnter),onPointerLeave:r.t(e.onPointerLeave,$(l.onContentLeave)),children:[(0,y.jsx)(ge,{children:a}),Array.from(d.items).map(([e,{ref:t,forceMount:n,...r}])=>{let i=x===e;return(0,y.jsx)(c.t,{present:n||i,children:(0,y.jsx)(ye,{...r,contentRef:t,isActive:i,onActiveContentChange:h})},e)})]})},`NavigationMenuViewportImpl`)),ye=T(({contentRef:e,isActive:t,onActiveContentChange:n,...r})=>{let i=_.useCallback(e=>{t&&e&&n(e)},[t,n]),a=o.a(e,i);return(0,y.jsx)(W,{...r,ref:a})},`NavigationMenuViewportItem`),be=`FocusGroup`,K=_.forwardRef(T(function(e,t){let{__scopeNavigationMenu:n,...r}=e,a=L(be,n);return(0,y.jsx)(N.Provider,{scope:n,children:(0,y.jsx)(N.Slot,{scope:n,children:(0,y.jsx)(i.t.div,{dir:a.dir,...r,ref:t})})})},`FocusGroup`)),xe=[`ArrowRight`,`ArrowLeft`,`ArrowUp`,`ArrowDown`],Se=`FocusGroupItem`,Ce=_.forwardRef(T(function(e,t){let{__scopeNavigationMenu:n,...a}=e,o=P(n),s=L(Se,n);return(0,y.jsx)(N.ItemSlot,{scope:n,children:(0,y.jsx)(i.t.button,{...a,ref:t,onKeyDown:r.t(e.onKeyDown,e=>{if([`Home`,`End`,...xe].includes(e.key)){let t=o().map(e=>e.ref.current);if([s.dir===O.RTL?`ArrowRight`:`ArrowLeft`,`ArrowUp`,`End`].includes(e.key)&&t.reverse(),xe.includes(e.key)){let n=t.indexOf(e.currentTarget);t=t.slice(n+1)}setTimeout(()=>J(t)),e.preventDefault()}})})})},`FocusGroupItem`));function q(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:T(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}T(q,`getTabbableCandidates`);function J(e){let t=document.activeElement;return e.some(e=>e===t||(e.focus(),document.activeElement!==t))}T(J,`focusFirst`);function we(e){return e.forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)}),()=>{e.forEach(e=>{let t=e.dataset.tabindex;e.setAttribute(`tabindex`,t)})}}T(we,`removeFromTabOrder`);function Y(e,t){let n=p.t(t);f.t(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}T(Y,`useResizeObserver`);function X(e){return e?`open`:`closed`}T(X,`getOpenState`);function Z(e,t){return`${e}-trigger-${t}`}T(Z,`makeTriggerId`);function Q(e,t){return`${e}-content-${t}`}T(Q,`makeContentId`);function $(e){return t=>t.pointerType===`mouse`?e(t):void 0}T($,`whenMouse`);function Te({className:e,children:n,viewport:r=!0,...i}){return(0,y.jsxs)(ie,{"data-slot":`navigation-menu`,"data-viewport":r,className:t.t(`group/navigation-menu relative flex max-w-max flex-1 items-center justify-center`,e),...i,children:[n,r&&(0,y.jsx)(je,{})]})}function Ee({className:e,...n}){return(0,y.jsx)(se,{"data-slot":`navigation-menu-list`,className:t.t(`group flex flex-1 list-none items-center justify-center gap-0`,e),...n})}function De({className:e,...n}){return(0,y.jsx)(le,{"data-slot":`navigation-menu-item`,className:t.t(`relative`,e),...n})}var Oe=(0,b.cva)(`group/navigation-menu-trigger hover:bg-muted focus:bg-muted focus-visible:ring-ring/50 data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted data-open:bg-muted/50 data-open:hover:bg-muted data-open:focus:bg-muted inline-flex h-9 w-max items-center justify-center rounded-lg px-2.5 py-1.5 text-sm font-medium transition-all outline-none focus-visible:ring-3 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50`);function ke({className:e,children:n,...r}){return(0,y.jsxs)(ue,{"data-slot":`navigation-menu-trigger`,className:t.t(Oe(),`group`,e),...r,children:[n,` `,(0,y.jsx)(h.ChevronDownIcon,{className:`relative top-px ms-1 size-3 transition duration-300 group-data-open/navigation-menu-trigger:rotate-180 group-data-popup-open/navigation-menu-trigger:rotate-180`,"aria-hidden":`true`})]})}function Ae({className:e,...n}){return(0,y.jsx)(me,{"data-slot":`navigation-menu-content`,className:t.t(`group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:ring-foreground/10 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95 start-0 top-0 w-full p-1 ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-lg group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:duration-300 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none md:absolute md:w-auto`,e),...n})}function je({className:e,...n}){return(0,y.jsx)(`div`,{className:t.t(`absolute start-0 top-full isolate z-50 flex justify-center`),children:(0,y.jsx)(_e,{"data-slot":`navigation-menu-viewport`,className:t.t(`origin-top-center bg-popover text-popover-foreground ring-foreground/10 data-open:animate-in data-open:zoom-in-90 data-closed:animate-out data-closed:zoom-out-90 relative mt-1.5 h-(--radix-navigation-menu-viewport-height) w-full overflow-hidden rounded-lg shadow ring-1 duration-100 md:w-(--radix-navigation-menu-viewport-width)`,e),...n})})}function Me({className:e,...n}){return(0,y.jsx)(de,{"data-slot":`navigation-menu-link`,className:t.t(`hover:bg-muted focus:bg-muted focus-visible:ring-ring/50 data-active:bg-muted/50 data-active:hover:bg-muted data-active:focus:bg-muted flex items-center gap-2 rounded-lg p-2 text-sm transition-all outline-none focus-visible:ring-3 focus-visible:outline-1 in-data-[slot=navigation-menu-content]:rounded-md [&_svg:not([class*='size-'])]:size-4`,e),...n})}function Ne({className:e,...n}){return(0,y.jsx)(fe,{"data-slot":`navigation-menu-indicator`,className:t.t(`data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:animate-in data-[state=visible]:fade-in top-full z-1 flex h-1.5 items-end justify-center overflow-hidden`,e),...n,children:(0,y.jsx)(`div`,{className:`bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-ss-sm shadow-md`})})}Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return Me}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return je}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return De}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return Oe}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return Ae}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return Ee}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return Ne}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return ke}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return Te}});
|
package/dist/popover-Cq5cTNtC.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("./rolldown-runtime-DbbDpzbe.js"),t=require("./dist-CoTs6T03.js"),n=require("./dist-DZiOPWLp.js"),r=require("./dist-CJqVmdrU.js"),i=require("./dist-DW2ltK5-.js"),a=require("./dist-R_G5UQRm.js"),o=require("./es2015-Dggv0vx3.js"),s=require("./dist-DmY7elIQ.js"),c=require("./dist-RXrZgzkO.js"),l=require("./dist-CIgGRTmJ.js"),u=require("./dist-CDcZ8WMF.js"),d=require("./dist-Blgp9lfa.js"),f=require("./dist-CBlqVBTk.js"),p=require("./dist-zmnQp5Xf.js");let m=require("react"),h=e.r(m,1);m=e.r(m);let g=require("react/jsx-runtime");var _=Object.defineProperty,v=(e,t)=>_(e,`name`,{value:t,configurable:!0}),y=`Popover`,[b,x]=i.t(y,[l.a]),S=l.a(),[C,w]=b(y),T=v(e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=S(t),u=h.useRef(null),[d,f]=h.useState(!1),[m,_]=h.useState(0),[v,b]=h.useState(0),[x,w]=p.t({prop:r,defaultProp:i??!1,onChange:a,caller:y});return(0,g.jsx)(l.t,{...s,children:(0,g.jsx)(C,{scope:t,contentId:c.t(),titleId:c.t(),descriptionId:c.t(),titlePresent:m>0,descriptionPresent:v>0,setTitleCount:_,setDescriptionCount:b,triggerRef:u,open:x,onOpenChange:w,onOpenToggle:h.useCallback(()=>w(e=>!e),[w]),hasCustomAnchor:d,onCustomAnchorAdd:h.useCallback(()=>f(!0),[]),onCustomAnchorRemove:h.useCallback(()=>f(!1),[]),modal:o,children:n})})},`Popover`),E=`PopoverAnchor`,D=h.forwardRef(v(function(e,t){let{__scopePopover:n,...r}=e,i=w(E,n),a=S(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return h.useEffect(()=>(o(),()=>s()),[o,s]),(0,g.jsx)(l.n,{...a,...r,ref:t})},`PopoverAnchor`)),O=`PopoverTrigger`,k=h.forwardRef(v(function(e,t){let{__scopePopover:i,...a}=e,o=w(O,i),s=S(i),c=r.a(t,o.triggerRef),u=(0,g.jsx)(f.t.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":B(o.open),...a,ref:c,onClick:n.t(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?u:(0,g.jsx)(l.n,{asChild:!0,...s,children:u})},`PopoverTrigger`)),A=`PopoverPortal`,[j,M]=b(A,{forceMount:void 0}),N=v(e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=w(A,t);return(0,g.jsx)(j,{scope:t,forceMount:n,children:(0,g.jsx)(d.t,{present:n||a.open,children:(0,g.jsx)(u.t,{asChild:!0,container:i,children:r})})})},`PopoverPortal`),P=`PopoverContent`,F=h.forwardRef(v(function(e,t){let n=M(P,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=w(P,e.__scopePopover);return(0,g.jsx)(d.t,{present:r||a.open,children:a.modal?(0,g.jsx)(L,{...i,ref:t}):(0,g.jsx)(R,{...i,ref:t})})},`PopoverContent`)),I=r.n(`PopoverContent.RemoveScroll`),L=h.forwardRef(v(function(e,t){let i=w(P,e.__scopePopover),a=h.useRef(null),c=r.a(t,a),l=h.useRef(!1),{nodes:u,registry:d}=s.i();return h.useEffect(()=>{let e=a.current;if(e)return o.t(e)},[]),(0,g.jsx)(o.n,{as:I,allowPinchZoom:!0,shards:h.useMemo(()=>[a,...u.map(e=>({current:e}))],[a,u]),children:(0,g.jsx)(z,{...e,ref:c,branchNodes:u,branchRegistry:d,trapFocus:i.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:n.t(e.onCloseAutoFocus,e=>{e.preventDefault(),l.current||i.triggerRef.current?.focus()}),onPointerDownOutside:n.t(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;l.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:n.t(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})},`PopoverContentModal`)),R=h.forwardRef(v(function(e,t){let n=w(P,e.__scopePopover),r=h.useRef(!1),i=h.useRef(!1);return(0,g.jsx)(z,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`PopoverContentNonModal`)),z=h.forwardRef(v(function(e,t){let{__scopePopover:n,trapFocus:i,onOpenAutoFocus:c,onCloseAutoFocus:u,disableOutsidePointerEvents:d,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:m,onInteractOutside:_,"aria-describedby":v,branchNodes:y,branchRegistry:b,...x}=e,C=w(P,n),T=S(n),[E,D]=h.useState(null),O=r.a(t,D);return s.r(E),o.r(),(0,g.jsx)(s.n,{registry:b,children:(0,g.jsx)(s.t,{asChild:!0,loop:!0,trapped:i,branches:y,onMountAutoFocus:c,onUnmountAutoFocus:u,children:(0,g.jsx)(a.t,{asChild:!0,disableOutsidePointerEvents:d,onInteractOutside:_,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:m,onDismiss:()=>C.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,g.jsx)(l.i,{"data-state":B(C.open),role:`dialog`,id:C.contentId,"aria-labelledby":C.titlePresent?C.titleId:void 0,"aria-describedby":C.descriptionPresent?V(v,C.descriptionId):v,...T,...x,ref:O,style:{...x.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)`}})})})})},`PopoverContentImpl`));function B(e){return e?`open`:`closed`}v(B,`getState`);function V(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}v(V,`concatAriaDescribedby`);function H({...e}){return(0,g.jsx)(T,{"data-slot":`popover`,...e})}function U({...e}){return(0,g.jsx)(k,{"data-slot":`popover-trigger`,...e})}function W({className:e,align:n=`center`,sideOffset:r=4,...i}){return(0,g.jsx)(N,{children:(0,g.jsx)(F,{"data-slot":`popover-content`,align:n,sideOffset:r,className:t.t(`bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 flex w-72 origin-(--radix-popover-content-transform-origin) flex-col gap-2.5 rounded-lg p-2.5 text-sm shadow-md ring-1 outline-hidden duration-100`,e),...i})})}function G({...e}){return(0,g.jsx)(D,{"data-slot":`popover-anchor`,...e})}function K({className:e,...n}){return(0,g.jsx)(`div`,{"data-slot":`popover-header`,className:t.t(`flex flex-col gap-0.5 text-sm`,e),...n})}function q({className:e,...n}){return(0,g.jsx)(`div`,{"data-slot":`popover-title`,className:t.t(`font-medium`,e),...n})}function J({className:e,...n}){return(0,g.jsx)(`p`,{"data-slot":`popover-description`,className:t.t(`text-muted-foreground`,e),...n})}Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return K}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return J}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return G}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return q}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return W}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return U}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return H}});
|
|
@@ -1,241 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./dist-DoWtzxYc.mjs";
|
|
2
|
-
import { t } from "./dist-B76UOZbx.mjs";
|
|
3
|
-
import { a as n, n as r } from "./dist-C516Vwxy.mjs";
|
|
4
|
-
import { t as i } from "./dist-COqM3IM6.mjs";
|
|
5
|
-
import { t as a } from "./dist-CbWpCWog.mjs";
|
|
6
|
-
import { n as o, r as s, t as c } from "./es2015-BooeZGhO.mjs";
|
|
7
|
-
import { i as l, n as u, r as d, t as f } from "./dist-CDksSmTD.mjs";
|
|
8
|
-
import { t as p } from "./dist-Cu0GG-3j.mjs";
|
|
9
|
-
import { a as m, i as h, n as g, t as _ } from "./dist-Cn4F8XlY.mjs";
|
|
10
|
-
import { t as v } from "./dist-CcGLWbPa.mjs";
|
|
11
|
-
import { t as y } from "./dist-BnlI08Je.mjs";
|
|
12
|
-
import { t as b } from "./dist-B7Ph9-T6.mjs";
|
|
13
|
-
import { t as x } from "./dist-DKI-XYwI.mjs";
|
|
14
|
-
import * as S from "react";
|
|
15
|
-
import { jsx as C } from "react/jsx-runtime";
|
|
16
|
-
// ../../node_modules/.bun/@radix-ui+react-popover@1.3.1+2b23df507bdda662/node_modules/@radix-ui/react-popover/dist/index.mjs
|
|
17
|
-
var w = Object.defineProperty, T = (e, t) => w(e, "name", {
|
|
18
|
-
value: t,
|
|
19
|
-
configurable: !0
|
|
20
|
-
}), E = "Popover", [D, O] = i(E, [m]), k = m(), [A, j] = D(E), M = /* @__PURE__ */ T((e) => {
|
|
21
|
-
let { __scopePopover: t, children: n, open: r, defaultOpen: i, onOpenChange: a, modal: o = !1 } = e, s = k(t), c = S.useRef(null), [l, u] = S.useState(!1), [d, f] = S.useState(0), [m, h] = S.useState(0), [g, v] = x({
|
|
22
|
-
prop: r,
|
|
23
|
-
defaultProp: i ?? !1,
|
|
24
|
-
onChange: a,
|
|
25
|
-
caller: E
|
|
26
|
-
});
|
|
27
|
-
return /* @__PURE__ */ C(_, {
|
|
28
|
-
...s,
|
|
29
|
-
children: /* @__PURE__ */ C(A, {
|
|
30
|
-
scope: t,
|
|
31
|
-
contentId: p(),
|
|
32
|
-
titleId: p(),
|
|
33
|
-
descriptionId: p(),
|
|
34
|
-
titlePresent: d > 0,
|
|
35
|
-
descriptionPresent: m > 0,
|
|
36
|
-
setTitleCount: f,
|
|
37
|
-
setDescriptionCount: h,
|
|
38
|
-
triggerRef: c,
|
|
39
|
-
open: g,
|
|
40
|
-
onOpenChange: v,
|
|
41
|
-
onOpenToggle: S.useCallback(() => v((e) => !e), [v]),
|
|
42
|
-
hasCustomAnchor: l,
|
|
43
|
-
onCustomAnchorAdd: S.useCallback(() => u(!0), []),
|
|
44
|
-
onCustomAnchorRemove: S.useCallback(() => u(!1), []),
|
|
45
|
-
modal: o,
|
|
46
|
-
children: n
|
|
47
|
-
})
|
|
48
|
-
});
|
|
49
|
-
}, "Popover"), N = "PopoverAnchor", P = /* @__PURE__ */ S.forwardRef(/* @__PURE__ */ T(function(e, t) {
|
|
50
|
-
let { __scopePopover: n, ...r } = e, i = j(N, n), a = k(n), { onCustomAnchorAdd: o, onCustomAnchorRemove: s } = i;
|
|
51
|
-
return S.useEffect(() => (o(), () => s()), [o, s]), /* @__PURE__ */ C(g, {
|
|
52
|
-
...a,
|
|
53
|
-
...r,
|
|
54
|
-
ref: t
|
|
55
|
-
});
|
|
56
|
-
}, "PopoverAnchor")), F = "PopoverTrigger", I = /* @__PURE__ */ S.forwardRef(/* @__PURE__ */ T(function(e, r) {
|
|
57
|
-
let { __scopePopover: i, ...a } = e, o = j(F, i), s = k(i), c = n(r, o.triggerRef), l = /* @__PURE__ */ C(b.button, {
|
|
58
|
-
type: "button",
|
|
59
|
-
"aria-haspopup": "dialog",
|
|
60
|
-
"aria-expanded": o.open,
|
|
61
|
-
"aria-controls": o.open ? o.contentId : void 0,
|
|
62
|
-
"data-state": q(o.open),
|
|
63
|
-
...a,
|
|
64
|
-
ref: c,
|
|
65
|
-
onClick: t(e.onClick, o.onOpenToggle)
|
|
66
|
-
});
|
|
67
|
-
return o.hasCustomAnchor ? l : /* @__PURE__ */ C(g, {
|
|
68
|
-
asChild: !0,
|
|
69
|
-
...s,
|
|
70
|
-
children: l
|
|
71
|
-
});
|
|
72
|
-
}, "PopoverTrigger")), L = "PopoverPortal", [R, z] = D(L, { forceMount: void 0 }), B = /* @__PURE__ */ T((e) => {
|
|
73
|
-
let { __scopePopover: t, forceMount: n, children: r, container: i } = e, a = j(L, t);
|
|
74
|
-
return /* @__PURE__ */ C(R, {
|
|
75
|
-
scope: t,
|
|
76
|
-
forceMount: n,
|
|
77
|
-
children: /* @__PURE__ */ C(y, {
|
|
78
|
-
present: n || a.open,
|
|
79
|
-
children: /* @__PURE__ */ C(v, {
|
|
80
|
-
asChild: !0,
|
|
81
|
-
container: i,
|
|
82
|
-
children: r
|
|
83
|
-
})
|
|
84
|
-
})
|
|
85
|
-
});
|
|
86
|
-
}, "PopoverPortal"), V = "PopoverContent", H = /* @__PURE__ */ S.forwardRef(/* @__PURE__ */ T(function(e, t) {
|
|
87
|
-
let n = z(V, e.__scopePopover), { forceMount: r = n.forceMount, ...i } = e, a = j(V, e.__scopePopover);
|
|
88
|
-
return /* @__PURE__ */ C(y, {
|
|
89
|
-
present: r || a.open,
|
|
90
|
-
children: a.modal ? /* @__PURE__ */ C(W, {
|
|
91
|
-
...i,
|
|
92
|
-
ref: t
|
|
93
|
-
}) : /* @__PURE__ */ C(G, {
|
|
94
|
-
...i,
|
|
95
|
-
ref: t
|
|
96
|
-
})
|
|
97
|
-
});
|
|
98
|
-
}, "PopoverContent")), U = r("PopoverContent.RemoveScroll"), W = /* @__PURE__ */ S.forwardRef(/* @__PURE__ */ T(function(e, r) {
|
|
99
|
-
let i = j(V, e.__scopePopover), a = S.useRef(null), s = n(r, a), u = S.useRef(!1), { nodes: d, registry: f } = l();
|
|
100
|
-
return S.useEffect(() => {
|
|
101
|
-
let e = a.current;
|
|
102
|
-
if (e) return c(e);
|
|
103
|
-
}, []), /* @__PURE__ */ C(o, {
|
|
104
|
-
as: U,
|
|
105
|
-
allowPinchZoom: !0,
|
|
106
|
-
shards: S.useMemo(() => [a, ...d.map((e) => ({ current: e }))], [a, d]),
|
|
107
|
-
children: /* @__PURE__ */ C(K, {
|
|
108
|
-
...e,
|
|
109
|
-
ref: s,
|
|
110
|
-
branchNodes: d,
|
|
111
|
-
branchRegistry: f,
|
|
112
|
-
trapFocus: i.open,
|
|
113
|
-
disableOutsidePointerEvents: !0,
|
|
114
|
-
onCloseAutoFocus: t(e.onCloseAutoFocus, (e) => {
|
|
115
|
-
e.preventDefault(), u.current || i.triggerRef.current?.focus();
|
|
116
|
-
}),
|
|
117
|
-
onPointerDownOutside: t(e.onPointerDownOutside, (e) => {
|
|
118
|
-
let t = e.detail.originalEvent, n = t.button === 0 && t.ctrlKey === !0, r = t.button === 2 || n;
|
|
119
|
-
u.current = r;
|
|
120
|
-
}, { checkForDefaultPrevented: !1 }),
|
|
121
|
-
onFocusOutside: t(e.onFocusOutside, (e) => e.preventDefault(), { checkForDefaultPrevented: !1 })
|
|
122
|
-
})
|
|
123
|
-
});
|
|
124
|
-
}, "PopoverContentModal")), G = /* @__PURE__ */ S.forwardRef(/* @__PURE__ */ T(function(e, t) {
|
|
125
|
-
let n = j(V, e.__scopePopover), r = S.useRef(!1), i = S.useRef(!1);
|
|
126
|
-
return /* @__PURE__ */ C(K, {
|
|
127
|
-
...e,
|
|
128
|
-
ref: t,
|
|
129
|
-
trapFocus: !1,
|
|
130
|
-
disableOutsidePointerEvents: !1,
|
|
131
|
-
onCloseAutoFocus: (t) => {
|
|
132
|
-
e.onCloseAutoFocus?.(t), t.defaultPrevented || (r.current || n.triggerRef.current?.focus(), t.preventDefault()), r.current = !1, i.current = !1;
|
|
133
|
-
},
|
|
134
|
-
onInteractOutside: (t) => {
|
|
135
|
-
e.onInteractOutside?.(t), t.defaultPrevented || (r.current = !0, t.detail.originalEvent.type === "pointerdown" && (i.current = !0));
|
|
136
|
-
let a = t.target;
|
|
137
|
-
n.triggerRef.current?.contains(a) && t.preventDefault(), t.detail.originalEvent.type === "focusin" && i.current && t.preventDefault();
|
|
138
|
-
}
|
|
139
|
-
});
|
|
140
|
-
}, "PopoverContentNonModal")), K = /* @__PURE__ */ S.forwardRef(/* @__PURE__ */ T(function(e, t) {
|
|
141
|
-
let { __scopePopover: r, trapFocus: i, onOpenAutoFocus: o, onCloseAutoFocus: c, disableOutsidePointerEvents: l, onEscapeKeyDown: p, onPointerDownOutside: m, onFocusOutside: g, onInteractOutside: _, "aria-describedby": v, branchNodes: y, branchRegistry: b, ...x } = e, w = j(V, r), T = k(r), [E, D] = S.useState(null), O = n(t, D);
|
|
142
|
-
return d(E), s(), /* @__PURE__ */ C(u, {
|
|
143
|
-
registry: b,
|
|
144
|
-
children: /* @__PURE__ */ C(f, {
|
|
145
|
-
asChild: !0,
|
|
146
|
-
loop: !0,
|
|
147
|
-
trapped: i,
|
|
148
|
-
branches: y,
|
|
149
|
-
onMountAutoFocus: o,
|
|
150
|
-
onUnmountAutoFocus: c,
|
|
151
|
-
children: /* @__PURE__ */ C(a, {
|
|
152
|
-
asChild: !0,
|
|
153
|
-
disableOutsidePointerEvents: l,
|
|
154
|
-
onInteractOutside: _,
|
|
155
|
-
onEscapeKeyDown: p,
|
|
156
|
-
onPointerDownOutside: m,
|
|
157
|
-
onFocusOutside: g,
|
|
158
|
-
onDismiss: () => w.onOpenChange(!1),
|
|
159
|
-
deferPointerDownOutside: !0,
|
|
160
|
-
children: /* @__PURE__ */ C(h, {
|
|
161
|
-
"data-state": q(w.open),
|
|
162
|
-
role: "dialog",
|
|
163
|
-
id: w.contentId,
|
|
164
|
-
"aria-labelledby": w.titlePresent ? w.titleId : void 0,
|
|
165
|
-
"aria-describedby": w.descriptionPresent ? J(v, w.descriptionId) : v,
|
|
166
|
-
...T,
|
|
167
|
-
...x,
|
|
168
|
-
ref: O,
|
|
169
|
-
style: {
|
|
170
|
-
...x.style,
|
|
171
|
-
"--radix-popover-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
172
|
-
"--radix-popover-content-available-width": "var(--radix-popper-available-width)",
|
|
173
|
-
"--radix-popover-content-available-height": "var(--radix-popper-available-height)",
|
|
174
|
-
"--radix-popover-trigger-width": "var(--radix-popper-anchor-width)",
|
|
175
|
-
"--radix-popover-trigger-height": "var(--radix-popper-anchor-height)"
|
|
176
|
-
}
|
|
177
|
-
})
|
|
178
|
-
})
|
|
179
|
-
})
|
|
180
|
-
});
|
|
181
|
-
}, "PopoverContentImpl"));
|
|
182
|
-
function q(e) {
|
|
183
|
-
return e ? "open" : "closed";
|
|
184
|
-
}
|
|
185
|
-
T(q, "getState");
|
|
186
|
-
function J(...e) {
|
|
187
|
-
let t = /* @__PURE__ */ new Set();
|
|
188
|
-
for (let n of e) if (typeof n == "string") for (let e of String(n).trim().split(/\s+/)) e && t.add(e);
|
|
189
|
-
return t.size > 0 ? Array.from(t).join(" ") : void 0;
|
|
190
|
-
}
|
|
191
|
-
T(J, "concatAriaDescribedby");
|
|
192
|
-
// src/popover.tsx
|
|
193
|
-
function Y({ ...e }) {
|
|
194
|
-
return /* @__PURE__ */ C(M, {
|
|
195
|
-
"data-slot": "popover",
|
|
196
|
-
...e
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
|
-
function X({ ...e }) {
|
|
200
|
-
return /* @__PURE__ */ C(I, {
|
|
201
|
-
"data-slot": "popover-trigger",
|
|
202
|
-
...e
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
function Z({ className: t, align: n = "center", sideOffset: r = 4, ...i }) {
|
|
206
|
-
return /* @__PURE__ */ C(B, { children: /* @__PURE__ */ C(H, {
|
|
207
|
-
"data-slot": "popover-content",
|
|
208
|
-
align: n,
|
|
209
|
-
sideOffset: r,
|
|
210
|
-
className: e("bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 flex w-72 origin-(--radix-popover-content-transform-origin) flex-col gap-2.5 rounded-lg p-2.5 text-sm shadow-md ring-1 outline-hidden duration-100", t),
|
|
211
|
-
...i
|
|
212
|
-
}) });
|
|
213
|
-
}
|
|
214
|
-
function Q({ ...e }) {
|
|
215
|
-
return /* @__PURE__ */ C(P, {
|
|
216
|
-
"data-slot": "popover-anchor",
|
|
217
|
-
...e
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
function $({ className: t, ...n }) {
|
|
221
|
-
return /* @__PURE__ */ C("div", {
|
|
222
|
-
"data-slot": "popover-header",
|
|
223
|
-
className: e("flex flex-col gap-0.5 text-sm", t),
|
|
224
|
-
...n
|
|
225
|
-
});
|
|
226
|
-
}
|
|
227
|
-
function ee({ className: t, ...n }) {
|
|
228
|
-
return /* @__PURE__ */ C("div", {
|
|
229
|
-
"data-slot": "popover-title",
|
|
230
|
-
className: e("font-medium", t),
|
|
231
|
-
...n
|
|
232
|
-
});
|
|
233
|
-
}
|
|
234
|
-
function te({ className: t, ...n }) {
|
|
235
|
-
return /* @__PURE__ */ C("p", {
|
|
236
|
-
"data-slot": "popover-description",
|
|
237
|
-
className: e("text-muted-foreground", t),
|
|
238
|
-
...n
|
|
239
|
-
});
|
|
240
|
-
}
|
|
241
|
-
export { $ as a, te as i, Q as n, ee as o, Z as r, X as s, Y as t };
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./dist-DoWtzxYc.mjs";
|
|
2
|
-
import { t } from "./dist-COqM3IM6.mjs";
|
|
3
|
-
import { t as n } from "./dist-B7Ph9-T6.mjs";
|
|
4
|
-
import * as r from "react";
|
|
5
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
6
|
-
// ../../node_modules/.bun/@radix-ui+react-progress@1.2.1+2b23df507bdda662/node_modules/@radix-ui/react-progress/dist/index.mjs
|
|
7
|
-
var a = Object.defineProperty, o = (e, t) => a(e, "name", {
|
|
8
|
-
value: t,
|
|
9
|
-
configurable: !0
|
|
10
|
-
}), s = "Progress", c = 100, [l, u] = t(s), [d, f] = l(s), p = /* @__PURE__ */ r.forwardRef(/* @__PURE__ */ o(function(e, t) {
|
|
11
|
-
let { __scopeProgress: r, value: a = null, max: o, getValueLabel: s = g, ...l } = e;
|
|
12
|
-
(o || o === 0) && !y(o) && console.error(x(`${o}`, "Progress"));
|
|
13
|
-
let u = y(o) ? o : c;
|
|
14
|
-
a !== null && !b(a, u) && console.error(S(`${a}`, "Progress"));
|
|
15
|
-
let f = b(a, u) ? a : null, p = v(f) ? s(f, u) : void 0;
|
|
16
|
-
return /* @__PURE__ */ i(d, {
|
|
17
|
-
scope: r,
|
|
18
|
-
value: f,
|
|
19
|
-
max: u,
|
|
20
|
-
children: /* @__PURE__ */ i(n.div, {
|
|
21
|
-
"aria-valuemax": u,
|
|
22
|
-
"aria-valuemin": 0,
|
|
23
|
-
"aria-valuenow": v(f) ? f : void 0,
|
|
24
|
-
"aria-valuetext": p,
|
|
25
|
-
role: "progressbar",
|
|
26
|
-
"data-state": _(f, u),
|
|
27
|
-
"data-value": f ?? void 0,
|
|
28
|
-
"data-max": u,
|
|
29
|
-
...l,
|
|
30
|
-
ref: t
|
|
31
|
-
})
|
|
32
|
-
});
|
|
33
|
-
}, "Progress")), m = "ProgressIndicator", h = /* @__PURE__ */ r.forwardRef(/* @__PURE__ */ o(function(e, t) {
|
|
34
|
-
let { __scopeProgress: r, ...a } = e, o = f(m, r);
|
|
35
|
-
return /* @__PURE__ */ i(n.div, {
|
|
36
|
-
"data-state": _(o.value, o.max),
|
|
37
|
-
"data-value": o.value ?? void 0,
|
|
38
|
-
"data-max": o.max,
|
|
39
|
-
...a,
|
|
40
|
-
ref: t
|
|
41
|
-
});
|
|
42
|
-
}, "ProgressIndicator"));
|
|
43
|
-
function g(e, t) {
|
|
44
|
-
return `${Math.round(e / t * 100)}%`;
|
|
45
|
-
}
|
|
46
|
-
o(g, "defaultGetValueLabel");
|
|
47
|
-
function _(e, t) {
|
|
48
|
-
return e == null ? "indeterminate" : e === t ? "complete" : "loading";
|
|
49
|
-
}
|
|
50
|
-
o(_, "getProgressState");
|
|
51
|
-
function v(e) {
|
|
52
|
-
return typeof e == "number";
|
|
53
|
-
}
|
|
54
|
-
o(v, "isNumber");
|
|
55
|
-
function y(e) {
|
|
56
|
-
return v(e) && !isNaN(e) && e > 0;
|
|
57
|
-
}
|
|
58
|
-
o(y, "isValidMaxNumber");
|
|
59
|
-
function b(e, t) {
|
|
60
|
-
return v(e) && !isNaN(e) && e <= t && e >= 0;
|
|
61
|
-
}
|
|
62
|
-
o(b, "isValidValueNumber");
|
|
63
|
-
function x(e, t) {
|
|
64
|
-
return `Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${c}\`.`;
|
|
65
|
-
}
|
|
66
|
-
o(x, "getInvalidMaxError");
|
|
67
|
-
function S(e, t) {
|
|
68
|
-
return `Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
69
|
-
- a positive number
|
|
70
|
-
- less than the value passed to \`max\` (or ${c} if no \`max\` prop is set)
|
|
71
|
-
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
72
|
-
|
|
73
|
-
Defaulting to \`null\`.`;
|
|
74
|
-
}
|
|
75
|
-
o(S, "getInvalidValueError");
|
|
76
|
-
// src/progress.tsx
|
|
77
|
-
function C({ className: t, value: n, ...r }) {
|
|
78
|
-
return /* @__PURE__ */ i(p, {
|
|
79
|
-
"data-slot": "progress",
|
|
80
|
-
value: n,
|
|
81
|
-
className: e("bg-muted relative flex h-1 w-full items-center overflow-x-hidden rounded-full", t),
|
|
82
|
-
...r,
|
|
83
|
-
children: /* @__PURE__ */ i(h, {
|
|
84
|
-
"data-slot": "progress-indicator",
|
|
85
|
-
className: "bg-primary size-full flex-1 transition-all",
|
|
86
|
-
style: { transform: `translateX(-${100 - (n || 0)}%)` }
|
|
87
|
-
})
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
export { C as t };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
const e=require("./rolldown-runtime-DbbDpzbe.js"),t=require("./dist-CoTs6T03.js"),n=require("./dist-DW2ltK5-.js"),r=require("./dist-CBlqVBTk.js");let i=require("react"),a=e.r(i,1);i=e.r(i);let o=require("react/jsx-runtime");var s=Object.defineProperty,c=(e,t)=>s(e,`name`,{value:t,configurable:!0}),l=`Progress`,u=100,[d,f]=n.t(l),[p,m]=d(l),h=a.forwardRef(c(function(e,t){let{__scopeProgress:n,value:i=null,max:a,getValueLabel:s=v,...c}=e;(a||a===0)&&!x(a)&&console.error(C(`${a}`,`Progress`));let l=x(a)?a:u;i!==null&&!S(i,l)&&console.error(w(`${i}`,`Progress`));let d=S(i,l)?i:null,f=b(d)?s(d,l):void 0;return(0,o.jsx)(p,{scope:n,value:d,max:l,children:(0,o.jsx)(r.t.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":b(d)?d:void 0,"aria-valuetext":f,role:`progressbar`,"data-state":y(d,l),"data-value":d??void 0,"data-max":l,...c,ref:t})})},`Progress`)),g=`ProgressIndicator`,_=a.forwardRef(c(function(e,t){let{__scopeProgress:n,...i}=e,a=m(g,n);return(0,o.jsx)(r.t.div,{"data-state":y(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...i,ref:t})},`ProgressIndicator`));function v(e,t){return`${Math.round(e/t*100)}%`}c(v,`defaultGetValueLabel`);function y(e,t){return e==null?`indeterminate`:e===t?`complete`:`loading`}c(y,`getProgressState`);function b(e){return typeof e==`number`}c(b,`isNumber`);function x(e){return b(e)&&!isNaN(e)&&e>0}c(x,`isValidMaxNumber`);function S(e,t){return b(e)&&!isNaN(e)&&e<=t&&e>=0}c(S,`isValidValueNumber`);function C(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${u}\`.`}c(C,`getInvalidMaxError`);function w(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
2
|
-
- a positive number
|
|
3
|
-
- less than the value passed to \`max\` (or ${u} if no \`max\` prop is set)
|
|
4
|
-
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
5
|
-
|
|
6
|
-
Defaulting to \`null\`.`}c(w,`getInvalidValueError`);function T({className:e,value:n,...r}){return(0,o.jsx)(h,{"data-slot":`progress`,value:n,className:t.t(`bg-muted relative flex h-1 w-full items-center overflow-x-hidden rounded-full`,e),...r,children:(0,o.jsx)(_,{"data-slot":`progress-indicator`,className:`bg-primary size-full flex-1 transition-all`,style:{transform:`translateX(-${100-(n||0)}%)`}})})}Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return T}});
|