@gv-tech/ui-web 2.29.1 → 2.29.2
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-Bd0-CZQn.js +1 -0
- package/dist/{accordion-D5QXSsCK.mjs → accordion-Cf6DNbLH.mjs} +47 -51
- package/dist/accordion.cjs +1 -1
- package/dist/accordion.mjs +1 -2
- package/dist/{alert-dialog-B-a0Wa1M.mjs → alert-dialog-BxFH0Lwn.mjs} +43 -45
- package/dist/alert-dialog-C6vNmGBL.js +1 -0
- package/dist/alert-dialog.cjs +1 -1
- package/dist/alert-dialog.mjs +1 -2
- package/dist/alert.cjs +1 -1
- package/dist/alert.mjs +2 -3
- package/dist/{aspect-ratio-s7Ji1MSr.mjs → aspect-ratio-CdQevcDV.mjs} +4 -6
- package/dist/aspect-ratio-Z4Nkc56X.js +1 -0
- package/dist/aspect-ratio.cjs +1 -1
- package/dist/aspect-ratio.mjs +1 -2
- package/dist/attachment.cjs +1 -1
- package/dist/attachment.mjs +3 -4
- package/dist/{avatar-d8Di248f.mjs → avatar-B5PWwGhY.mjs} +50 -52
- package/dist/avatar-CFhYRM52.js +1 -0
- package/dist/avatar.cjs +1 -1
- package/dist/avatar.mjs +1 -2
- package/dist/badge.cjs +1 -1
- package/dist/badge.mjs +5 -6
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.mjs +3 -4
- package/dist/bubble.cjs +1 -1
- package/dist/bubble.mjs +3 -4
- package/dist/button-group.cjs +1 -1
- package/dist/button-group.mjs +4 -5
- package/dist/button.cjs +1 -1
- package/dist/button.mjs +3 -4
- package/dist/calendar-D5qgt2o2.js +1 -0
- package/dist/{calendar-UW8h9dfh.mjs → calendar-DIqXNjOR.mjs} +687 -840
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.mjs +1 -2
- package/dist/card.cjs +1 -1
- package/dist/card.mjs +2 -3
- package/dist/carousel-D-xEqRCX.js +1 -0
- package/dist/{carousel-DG9xGJns.mjs → carousel-DPjWmM_A.mjs} +13 -15
- package/dist/carousel.cjs +1 -1
- package/dist/carousel.mjs +1 -2
- package/dist/chart.cjs +2 -2
- package/dist/chart.mjs +14 -15
- package/dist/{checkbox-Dq8VHKDH.mjs → checkbox-DEPm1BBc.mjs} +36 -38
- package/dist/checkbox-DI9Hn_e_.js +1 -0
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.mjs +1 -2
- package/dist/chunk-HBS6WEDP-D2-yWzIN.js +1 -0
- package/dist/{chunk-HBS6WEDP-aK8IuEX9.mjs → chunk-HBS6WEDP-DD8ZmxRM.mjs} +3 -4
- package/dist/collapsible.cjs +1 -1
- package/dist/collapsible.mjs +2 -3
- package/dist/{combobox-b4OmCNw1.mjs → combobox-C4y8AbZX.mjs} +348 -591
- package/dist/combobox-boXp-mix.js +3 -0
- package/dist/combobox.cjs +1 -1
- package/dist/combobox.mjs +1 -2
- package/dist/command-BnW6UIVk.js +1 -0
- package/dist/{command-5hobOyGG.mjs → command-Cbsp7PBx.mjs} +121 -124
- package/dist/command.cjs +1 -1
- package/dist/command.mjs +1 -2
- package/dist/context-menu-CwsdFpx1.js +1 -0
- package/dist/{context-menu-DzzU-_v8.mjs → context-menu-FNgV55ZV.mjs} +117 -119
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.mjs +1 -2
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.mjs +3 -4
- package/dist/direction.cjs +1 -1
- package/dist/direction.mjs +2 -3
- package/dist/{dist-Bb5W_J2F.mjs → dist-7YyzJonC.mjs} +4 -4
- package/dist/{dist-BPL7gUpg.mjs → dist-AlmToDtO.mjs} +2 -3
- package/dist/{dist-BB78QQyQ.mjs → dist-B76UOZbx.mjs} +1 -2
- package/dist/{dist-BEbV0Hal.mjs → dist-B7Ph9-T6.mjs} +2 -3
- package/dist/dist-B7jnFMko.js +1 -0
- package/dist/{dist-CS572Be42.mjs → dist-BOiFyvyS.mjs} +1 -2
- package/dist/dist-BQkDLAY7.js +1 -0
- package/dist/dist-Bal96K8t.js +1 -0
- package/dist/dist-Blgp9lfa.js +1 -0
- package/dist/{dist-CpKLY_uZ.mjs → dist-BnlI08Je.mjs} +4 -4
- package/dist/{dist-BexAB6yo.mjs → dist-Bu-uFV1C.mjs} +33 -34
- package/dist/{dist-OqDzLHTa.mjs → dist-C2BHd5i1.mjs} +31 -31
- package/dist/{dist-Dq-h6VAy.mjs → dist-C516Vwxy.mjs} +4 -6
- package/dist/dist-CBlqVBTk.js +1 -0
- package/dist/dist-CDcZ8WMF.js +1 -0
- package/dist/{dist-E8ieJTBC.mjs → dist-CDksSmTD.mjs} +5 -6
- package/dist/dist-CF-qVmmV.js +1 -0
- package/dist/dist-CIgGRTmJ.js +1 -0
- package/dist/dist-CJqVmdrU.js +1 -0
- package/dist/{dist-CPAF050o.mjs → dist-COqM3IM6.mjs} +3 -4
- package/dist/{dist-s7ibhASj.mjs → dist-CbWpCWog.mjs} +12 -13
- package/dist/{dist-DI1vapnL.mjs → dist-CcGLWbPa.mjs} +3 -4
- package/dist/{dist-Dt6m-kwU.mjs → dist-Cn4F8XlY.mjs} +50 -51
- package/dist/dist-CoTs6T03.js +1 -0
- package/dist/dist-Co_xSt6d.js +1 -0
- package/dist/{dist-UkWa-Arh.mjs → dist-Cu0GG-3j.mjs} +2 -3
- package/dist/{dist-Bvfb4y_L.mjs → dist-DKI-XYwI.mjs} +3 -5
- package/dist/{dist-DatgTWLz.mjs → dist-DQeXXRYL.mjs} +81 -82
- package/dist/dist-DW2ltK5-.js +1 -0
- package/dist/dist-DWcKY_sJ.js +1 -0
- package/dist/dist-DdAeWIwf.js +1 -0
- package/dist/dist-DhubV_gU.mjs +4 -0
- package/dist/dist-DmY7elIQ.js +1 -0
- package/dist/{dist-Dm3IQk5b.mjs → dist-DoWtzxYc.mjs} +234 -235
- package/dist/dist-DuQlxGyN.js +1 -0
- package/dist/dist-KFF7QKuL.js +1 -0
- package/dist/dist-RXrZgzkO.js +1 -0
- package/dist/dist-R_G5UQRm.js +1 -0
- package/dist/{dist-BbI6NHqR.mjs → dist-dwRwxUPt.mjs} +1 -2
- package/dist/dist-fzmUl3YX.mjs +553 -0
- package/dist/{dist-vu20fMUK.mjs → dist-hBsne-A2.mjs} +22 -23
- package/dist/{dist-B057I8ju.mjs → dist-ljiGYyay.mjs} +2 -3
- package/dist/dist-pqMcQ1Nk.js +1 -0
- package/dist/dist-zmnQp5Xf.js +1 -0
- package/dist/drawer.cjs +1 -1
- package/dist/drawer.mjs +2 -3
- package/dist/dropdown-menu-ChuqZeix.js +1 -0
- package/dist/{dropdown-menu-BqAhn64y.mjs → dropdown-menu-DU7KNoXP.mjs} +75 -77
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.mjs +1 -2
- package/dist/empty.cjs +1 -1
- package/dist/empty.mjs +2 -3
- package/dist/{es2015-DbsmTzuc.mjs → es2015-BooeZGhO.mjs} +94 -111
- package/dist/es2015-Dggv0vx3.js +41 -0
- package/dist/field.cjs +1 -1
- package/dist/field.mjs +4 -5
- package/dist/{floating-ui.react-dom-CyupHsR6.mjs → floating-ui.react-dom-2hihjuTL.mjs} +12 -17
- package/dist/floating-ui.react-dom-BtFIezY4.js +1 -0
- package/dist/form.cjs +1 -1
- package/dist/form.mjs +19 -20
- package/dist/hooks/use-theme.d.ts +52 -52
- package/dist/hover-card-BeqCs_2R.js +1 -0
- package/dist/{hover-card-DMsxpR9G.mjs → hover-card-w8PmCyw2.mjs} +62 -64
- package/dist/hover-card.cjs +1 -1
- package/dist/hover-card.mjs +1 -2
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +66 -66
- package/dist/input-group.cjs +1 -1
- package/dist/input-group.mjs +2 -3
- package/dist/{input-otp-D49Y9VcH.mjs → input-otp-Bn_Uy1mR.mjs} +6 -17
- package/dist/input-otp-CTRB_0Xp.js +20 -0
- package/dist/input-otp.cjs +1 -1
- package/dist/input-otp.mjs +1 -2
- package/dist/input.cjs +1 -1
- package/dist/input.mjs +2 -3
- package/dist/item.cjs +1 -1
- package/dist/item.mjs +4 -5
- package/dist/kbd.cjs +1 -1
- package/dist/kbd.mjs +2 -3
- package/dist/{label-DsSICLPc.mjs → label-Da0kELfR.mjs} +4 -6
- package/dist/label-JMa1tFfC.js +1 -0
- package/dist/label.cjs +1 -1
- package/dist/label.mjs +1 -2
- package/dist/marker.cjs +1 -1
- package/dist/marker.mjs +3 -4
- package/dist/{menubar-DZqEj6S1.mjs → menubar-B7sRxpE4.mjs} +179 -181
- package/dist/menubar-Bd-QKMcw.js +1 -0
- package/dist/menubar.cjs +1 -1
- package/dist/menubar.mjs +1 -2
- package/dist/{message-scroller-CS4t7Ypn.mjs → message-scroller-B8AU0v3Y.mjs} +83 -102
- package/dist/message-scroller-BJb4Mh_I.js +1 -0
- package/dist/message-scroller.cjs +1 -1
- package/dist/message-scroller.mjs +1 -2
- package/dist/message.cjs +1 -1
- package/dist/message.mjs +2 -3
- package/dist/native-select.cjs +1 -1
- package/dist/native-select.mjs +2 -3
- package/dist/{navigation-menu-RO6thDOF.mjs → navigation-menu-B-RwfscB.mjs} +161 -159
- package/dist/navigation-menu-kPwxYZCR.js +1 -0
- package/dist/navigation-menu.cjs +1 -1
- package/dist/navigation-menu.mjs +1 -2
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.mjs +2 -3
- package/dist/popover-Cq5cTNtC.js +1 -0
- package/dist/{popover-DSBkc70V.mjs → popover-T6Ra737i.mjs} +79 -81
- package/dist/popover.cjs +1 -1
- package/dist/popover.mjs +1 -2
- package/dist/{progress-CQ4nQ85t.mjs → progress-e9YzxvRo.mjs} +11 -13
- package/dist/progress-iUSEI7J9.js +6 -0
- package/dist/progress.cjs +1 -1
- package/dist/progress.mjs +1 -2
- package/dist/{questionnaire-CVED7G7R.mjs → questionnaire-BLCvUX1C.mjs} +153 -175
- package/dist/questionnaire-CcymIPae.js +1 -0
- package/dist/questionnaire.cjs +1 -1
- package/dist/questionnaire.mjs +1 -2
- package/dist/{radio-group-TRiAhMZB.mjs → radio-group-BKpiDcIb.mjs} +58 -60
- package/dist/radio-group-DPEzCmxe.js +1 -0
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.mjs +1 -2
- package/dist/resizable-ByF0NmN9.mjs +2153 -0
- package/dist/resizable-oL3v42zT.js +1 -0
- package/dist/resizable.cjs +1 -1
- package/dist/resizable.mjs +1 -2
- package/dist/{chunk-BmowowmI.mjs → rolldown-runtime-D7yIeQp2.mjs} +2 -3
- package/dist/rolldown-runtime-DbbDpzbe.js +1 -0
- package/dist/{scroll-area-D6MiNHnJ.mjs → scroll-area-BzNeOQ6C.mjs} +109 -105
- package/dist/scroll-area-s4_ZJK59.js +1 -0
- package/dist/scroll-area.cjs +1 -1
- package/dist/scroll-area.mjs +1 -2
- package/dist/scroll-to-top.cjs +1 -1
- package/dist/scroll-to-top.mjs +6 -11
- package/dist/search.cjs +1 -1
- package/dist/search.mjs +12 -13
- package/dist/{select-BFJUmjvX.mjs → select-B_nRxX2Y.mjs} +280 -279
- package/dist/select-j5_dph9S.js +1 -0
- package/dist/select.cjs +1 -1
- package/dist/select.mjs +1 -2
- package/dist/separator-Bn-3XUSJ.js +1 -0
- package/dist/{separator-2kr96SyF.mjs → separator-CCcMNS78.mjs} +4 -6
- package/dist/separator.cjs +1 -1
- package/dist/separator.mjs +1 -2
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.mjs +3 -4
- package/dist/{sidebar-DM9ee9wf.mjs → sidebar-C2ax_A0G.mjs} +47 -49
- package/dist/sidebar-Cnem2n5A.js +1 -0
- package/dist/sidebar.cjs +1 -1
- package/dist/sidebar.mjs +1 -2
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.mjs +2 -3
- package/dist/{slider-CdTCoQu1.mjs → slider-B2PUTc7W.mjs} +103 -104
- package/dist/slider-wZuXwuib.js +1 -0
- package/dist/slider.cjs +1 -1
- package/dist/slider.mjs +1 -2
- package/dist/sonner.mjs +1 -2
- package/dist/spinner.cjs +1 -1
- package/dist/spinner.mjs +2 -3
- package/dist/support-fab.cjs +1 -1
- package/dist/support-fab.mjs +21 -22
- package/dist/switch-CD675xU7.js +1 -0
- package/dist/{switch-zUBdj7jK.mjs → switch-ikzIzrme.mjs} +29 -31
- package/dist/switch.cjs +1 -1
- package/dist/switch.mjs +1 -2
- package/dist/table-of-contents.cjs +1 -1
- package/dist/table-of-contents.mjs +5 -6
- package/dist/table.cjs +1 -1
- package/dist/table.mjs +2 -3
- package/dist/{tabs-DaE9pEbo.mjs → tabs-DCm5zOYB.mjs} +45 -47
- package/dist/tabs-fcahDQDp.js +1 -0
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.mjs +1 -2
- package/dist/text.cjs +1 -1
- package/dist/text.mjs +14 -12
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.mjs +2 -3
- package/dist/theme-provider.mjs +1 -2
- package/dist/{theme-toggle-DKh8WFLT.js → theme-toggle-BGTJsIA-.js} +1 -1
- package/dist/{theme-toggle-3RStptYf.mjs → theme-toggle-BSMwXb8o.mjs} +13 -15
- package/dist/theme-toggle.cjs +1 -1
- package/dist/theme-toggle.mjs +1 -2
- package/dist/toast-C31v9P1K.js +1 -0
- package/dist/{toast-D0Yb-K84.mjs → toast-vU5ISM03.mjs} +181 -181
- package/dist/toast.cjs +1 -1
- package/dist/toast.mjs +1 -2
- package/dist/toaster-CaJyOCyC.js +1 -0
- package/dist/{toaster-gT2b7mfE.mjs → toaster-D2BV6jez.mjs} +3 -5
- package/dist/toaster.cjs +1 -1
- package/dist/toaster.mjs +1 -2
- package/dist/toggle-CSZdCCwX.js +1 -0
- package/dist/{toggle-BAeKd2N0.mjs → toggle-Cv9YYwLI.mjs} +8 -9
- package/dist/toggle-group-RT8wyBwK.js +1 -0
- package/dist/{toggle-group-CEKhUozD.mjs → toggle-group-qvjasXS-.mjs} +44 -45
- package/dist/toggle-group.cjs +1 -1
- package/dist/toggle-group.mjs +1 -2
- package/dist/toggle.cjs +1 -1
- package/dist/toggle.mjs +1 -2
- package/dist/{tooltip-R_nK_Qh5.mjs → tooltip-7ERoN5mV.mjs} +97 -101
- package/dist/tooltip-CC9_spXT.js +1 -0
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.mjs +1 -2
- package/dist/{utils-A_oVsYw5.mjs → utils-DQKc9joa.mjs} +1 -2
- package/package.json +3 -3
- package/dist/accordion-DjyDOX-h.js +0 -1
- package/dist/alert-dialog-DYQAhGBC.js +0 -1
- package/dist/aspect-ratio-C-KOOyGP.js +0 -1
- package/dist/avatar-4K3XjhP8.js +0 -1
- package/dist/calendar-DFj14O6r.js +0 -1
- package/dist/carousel-CNGpg5df.js +0 -1
- package/dist/checkbox-BCgbTAdU.js +0 -1
- package/dist/chunk-HBS6WEDP-CQNaACTf.js +0 -1
- package/dist/chunk-mLOUI7ql.js +0 -1
- package/dist/combobox-CpPIGtPJ.js +0 -4
- package/dist/command-Dbqnm9kI.js +0 -1
- package/dist/context-menu-DyTUismw.js +0 -1
- package/dist/dist-1zUKVGvf.js +0 -1
- package/dist/dist-BBvidwzC.js +0 -1
- package/dist/dist-BTUvBzOm.js +0 -1
- package/dist/dist-BU-TFzJf.js +0 -1
- package/dist/dist-BgXIqHHq.js +0 -1
- package/dist/dist-C8Pm6LRc.js +0 -1
- package/dist/dist-CGgemr2V.js +0 -1
- package/dist/dist-CUvxOuXM.mjs +0 -551
- package/dist/dist-C_iFkwIX.js +0 -1
- package/dist/dist-ClYM7l1t.js +0 -1
- package/dist/dist-D1qkELLT.js +0 -1
- package/dist/dist-D7-Fky36.js +0 -1
- package/dist/dist-DEpkkABT.js +0 -1
- package/dist/dist-DKXojpVG.js +0 -1
- package/dist/dist-DYUvPCPC.js +0 -1
- package/dist/dist-DoivLw3t.js +0 -1
- package/dist/dist-GazS1kfR.mjs +0 -5
- package/dist/dist-N97cIp0_.js +0 -1
- package/dist/dist-Qm9hFvM1.js +0 -1
- package/dist/dist-UnTrOmPV.js +0 -1
- package/dist/dist-YAADIsyo.js +0 -1
- package/dist/dist-Zs2sjYhL.js +0 -1
- package/dist/dist-hFLuJoMi.js +0 -1
- package/dist/dropdown-menu-BtKOr--r.js +0 -1
- package/dist/es2015-DbAsWDbs.js +0 -41
- package/dist/floating-ui.react-dom-BwFRxNGc.js +0 -1
- package/dist/hover-card-DWXusgiI.js +0 -1
- package/dist/input-otp-u3obpt-Q.js +0 -20
- package/dist/label-Dacwh21G.js +0 -1
- package/dist/menubar-BYNeRuzx.js +0 -1
- package/dist/message-scroller-DqLu0YI6.js +0 -1
- package/dist/navigation-menu-B36G3O83.js +0 -1
- package/dist/popover-DUHbvKB8.js +0 -1
- package/dist/progress-B9z08UXf.js +0 -6
- package/dist/questionnaire-PWClWvST.js +0 -1
- package/dist/radio-group-Bd3WbH5I.js +0 -1
- package/dist/resizable-Cq60hEWB.js +0 -1
- package/dist/resizable-Qc8cVUKd.mjs +0 -2857
- package/dist/scroll-area-DFUdJeSZ.js +0 -1
- package/dist/select-iQFoKU1s.js +0 -1
- package/dist/separator-Bo49G2aj.js +0 -1
- package/dist/sidebar-C6O8hLkz.js +0 -1
- package/dist/slider-CagVxozY.js +0 -1
- package/dist/switch-CoeAC1Wk.js +0 -1
- package/dist/tabs-TMhXe20x.js +0 -1
- package/dist/toast-B0S3F09s.js +0 -1
- package/dist/toaster-CX9im8R_.js +0 -1
- package/dist/toggle-B0hXPsi7.js +0 -1
- package/dist/toggle-group-htyug3G7.js +0 -1
- package/dist/tooltip-BZazhXDZ.js +0 -1
- /package/dist/{dist-DJqkhIXb2.js → dist-DJqkhIXb.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./rolldown-runtime-DbbDpzbe.js"),t=require("./dist-DZiOPWLp.js"),n=require("./dist-CJqVmdrU.js"),r=require("./dist-Co_xSt6d.js"),i=require("./dist-DW2ltK5-.js"),a=require("./dist-R_G5UQRm.js"),o=require("./dist-CDcZ8WMF.js"),s=require("./dist-Blgp9lfa.js"),c=require("./dist-CBlqVBTk.js"),l=require("./dist-pqMcQ1Nk.js"),u=require("./dist-zmnQp5Xf.js"),d=require("./dist-B7jnFMko.js"),f=require("./dist-KFF7QKuL.js"),p=require("./utils-ChMUqofy.js");let m=require("lucide-react"),h=require("react"),g=e.r(h,1);h=e.r(h);let _=require("react-dom");_=e.r(_,1);let v=require("react/jsx-runtime"),y=require("class-variance-authority");var b=Object.defineProperty,x=(e,t)=>b(e,`name`,{value:t,configurable:!0}),S=g.startTransition||(()=>void 0),C=`ToastProvider`,[w,T,E]=r.t(`Toast`),D={Up:`up`,Down:`down`,Left:`left`,Right:`right`},O={Foreground:`foreground`,Background:`background`},[k,ee]=i.t(`Toast`,[E]),[te,A]=k(C);function j(e){typeof S==`function`?S(e):e()}x(j,`scheduleUpdate`);var M=x(e=>{let{__scopeToast:t,label:n=`Notification`,duration:r=5e3,swipeDirection:i=D.Right,swipeThreshold:a=50,announcerContainer:o,children:s}=e,[c,l]=g.useState(null),[u,d]=g.useState(0),f=g.useRef(!1),p=g.useCallback(e=>{j(()=>l(e))},[]),m=g.useCallback(()=>{j(()=>d(e=>e+1))},[]),h=g.useCallback(()=>{j(()=>d(e=>e-1))},[]);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${C}\`. Expected non-empty \`string\`.`),(0,v.jsx)(w.Provider,{scope:t,children:(0,v.jsx)(te,{scope:t,label:n,duration:r,swipeDirection:i,swipeThreshold:a,toastCount:u,viewport:c,onViewportChange:p,onToastAdd:m,onToastRemove:h,isClosePausedRef:f,announcerContainer:o,children:s})})},`ToastProvider`),N=`ToastViewport`,P=[`F8`],F=`toast.viewportPause`,I=`toast.viewportResume`,L=g.forwardRef(x(function(e,t){let{__scopeToast:r,hotkey:i=P,label:o=`Notifications ({hotkey})`,...s}=e,l=A(N,r),u=T(r),d=g.useRef(null),f=g.useRef(null),p=g.useRef(null),m=g.useRef(null),h=n.a(t,m,l.onViewportChange),_=i.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),y=l.toastCount>0;g.useEffect(()=>{let e=x(e=>{i.length!==0&&i.every(t=>e[t]||e.code===t)&&m.current?.focus()},`handleKeyDown`);return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[i]),g.useEffect(()=>{let e=d.current,t=m.current;if(y&&e&&t){let n=x(()=>{if(!l.isClosePausedRef.current){let e=new CustomEvent(F);t.dispatchEvent(e),l.isClosePausedRef.current=!0}},`handlePause`),r=x(()=>{if(l.isClosePausedRef.current){let e=new CustomEvent(I);t.dispatchEvent(e),l.isClosePausedRef.current=!1}},`handleResume`),i=x(t=>{e.contains(t.relatedTarget)||r()},`handleFocusOutResume`),a=x(()=>{e.contains(document.activeElement)||r()},`handlePointerLeaveResume`);return e.addEventListener(`focusin`,n),e.addEventListener(`focusout`,i),e.addEventListener(`pointermove`,n),e.addEventListener(`pointerleave`,a),window.addEventListener(`blur`,n),window.addEventListener(`focus`,r),()=>{e.removeEventListener(`focusin`,n),e.removeEventListener(`focusout`,i),e.removeEventListener(`pointermove`,n),e.removeEventListener(`pointerleave`,a),window.removeEventListener(`blur`,n),window.removeEventListener(`focus`,r)}}},[y,l.isClosePausedRef]);let b=g.useCallback(({tabbingDirection:e})=>{let t=u().map(t=>{let n=t.ref.current,r=[n,...de(n)];return e===`forwards`?r:r.reverse()});return(e===`forwards`?t.reverse():t).flat()},[u]);return g.useEffect(()=>{let e=m.current;if(e){let t=x(t=>{let n=t.altKey||t.ctrlKey||t.metaKey;if(t.key===`Tab`&&!n){let n=document.activeElement,r=t.shiftKey;if(t.target===e&&r){f.current?.focus();return}let i=b({tabbingDirection:r?`backwards`:`forwards`}),a=i.findIndex(e=>e===n);$(i.slice(a+1))?t.preventDefault():r?f.current?.focus():p.current?.focus()}},`handleKeyDown`);return e.addEventListener(`keydown`,t),()=>e.removeEventListener(`keydown`,t)}},[u,b]),(0,v.jsxs)(a.n,{ref:d,role:`region`,"aria-label":o.replace(`{hotkey}`,_),tabIndex:-1,style:{pointerEvents:y?void 0:`none`},children:[y&&(0,v.jsx)(z,{ref:f,onFocusFromOutsideViewport:()=>{$(b({tabbingDirection:`forwards`}))}}),(0,v.jsx)(w.Slot,{scope:r,children:(0,v.jsx)(c.t.ol,{tabIndex:-1,...s,ref:h})}),y&&(0,v.jsx)(z,{ref:p,onFocusFromOutsideViewport:()=>{$(b({tabbingDirection:`backwards`}))}})]})},`ToastViewport`)),R=`ToastFocusProxy`,z=g.forwardRef(x(function(e,t){let{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=e,a=A(R,n);return(0,v.jsx)(f.n,{tabIndex:0,...i,ref:t,style:{position:`fixed`},onFocus:e=>{let t=e.relatedTarget;a.viewport?.contains(t)||r()}})},`ToastFocusProxy`)),B=`Toast`,ne=`toast.swipeStart`,re=`toast.swipeMove`,ie=`toast.swipeCancel`,ae=`toast.swipeEnd`,V=g.forwardRef(x(function(e,n){let{forceMount:r,open:i,defaultOpen:a,onOpenChange:o,...c}=e,[d,f]=u.t({prop:i,defaultProp:a??!0,onChange:o,caller:B});return(0,v.jsx)(s.t,{present:r||d,children:(0,v.jsx)(U,{open:d,...c,ref:n,onClose:()=>f(!1),onPause:l.t(e.onPause),onResume:l.t(e.onResume),onSwipeStart:t.t(e.onSwipeStart,e=>{e.currentTarget.setAttribute(`data-swipe`,`start`)}),onSwipeMove:t.t(e.onSwipeMove,e=>{let{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute(`data-swipe`,`move`),e.currentTarget.style.setProperty(`--radix-toast-swipe-move-x`,`${t}px`),e.currentTarget.style.setProperty(`--radix-toast-swipe-move-y`,`${n}px`)}),onSwipeCancel:t.t(e.onSwipeCancel,e=>{e.currentTarget.setAttribute(`data-swipe`,`cancel`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-y`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-end-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-end-y`)}),onSwipeEnd:t.t(e.onSwipeEnd,e=>{let{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute(`data-swipe`,`end`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-y`),e.currentTarget.style.setProperty(`--radix-toast-swipe-end-x`,`${t}px`),e.currentTarget.style.setProperty(`--radix-toast-swipe-end-y`,`${n}px`),f(!1)})})})},`Toast`)),[oe,H]=k(B,{onClose(){}}),U=g.forwardRef(x(function(e,r){let{__scopeToast:i,type:o=O.Foreground,duration:s,open:u,onClose:d,onEscapeKeyDown:f,onPause:p,onResume:m,onSwipeStart:h,onSwipeMove:y,onSwipeCancel:b,onSwipeEnd:S,...C}=e,E=A(B,i),D=T(i),[k,ee]=g.useState(null),te=n.a(r,ee),j=g.useRef(null),M=g.useRef(null),N=s||E.duration,P=g.useRef(0),L=g.useRef(N),R=g.useRef(0),{onToastAdd:z,onToastRemove:V}=E,H=l.t(()=>{k?.contains(document.activeElement)&&E.viewport?.focus(),d()}),U=g.useCallback(e=>{e&&e!==1/0&&(window.clearTimeout(R.current),P.current=new Date().getTime(),R.current=window.setTimeout(H,e))},[H]);g.useEffect(()=>{let e=E.viewport;if(e){let t=x(()=>{U(L.current),m?.()},`handleResume`),n=x(()=>{let e=new Date().getTime()-P.current;L.current-=e,window.clearTimeout(R.current),p?.()},`handlePause`);return e.addEventListener(F,n),e.addEventListener(I,t),()=>{e.removeEventListener(F,n),e.removeEventListener(I,t)}}},[E.viewport,N,p,m,U]),g.useEffect(()=>{L.current=N,u&&!E.isClosePausedRef.current&&U(N)},[u,N,E.isClosePausedRef,U]),g.useEffect(()=>()=>{window.clearTimeout(R.current)},[]),g.useEffect(()=>(z(),()=>V()),[z,V]);let W=g.useMemo(()=>k?Y(k):null,[k]);return E.viewport?(0,v.jsxs)(v.Fragment,{children:[W&&(0,v.jsx)(se,{__scopeToast:i,role:`status`,"aria-live":o===O.Foreground?`assertive`:`polite`,children:W}),(0,v.jsx)(oe,{scope:i,onClose:H,children:_.createPortal((0,v.jsx)(w.ItemSlot,{scope:i,children:(0,v.jsx)(a.t,{asChild:!0,onEscapeKeyDown:t.t(f,e=>{D().some(t=>t.ref.current?.contains(e.target))||H()}),children:(0,v.jsx)(c.t.li,{tabIndex:0,"data-state":u?`open`:`closed`,"data-swipe-direction":E.swipeDirection,...C,ref:te,style:{userSelect:`none`,touchAction:`none`,...e.style},onKeyDown:t.t(e.onKeyDown,e=>{e.key===`Escape`&&(f?.(e.nativeEvent),e.nativeEvent.defaultPrevented||H())}),onPointerDown:t.t(e.onPointerDown,e=>{e.button===0&&(j.current={x:e.clientX,y:e.clientY})}),onPointerMove:t.t(e.onPointerMove,e=>{if(!j.current)return;let t=e.clientX-j.current.x,n=e.clientY-j.current.y,r=!!M.current,i=[`left`,`right`].includes(E.swipeDirection),a=[`left`,`up`].includes(E.swipeDirection)?Math.min:Math.max,o=i?a(0,t):0,s=i?0:a(0,n),c=e.pointerType===`touch`?10:2,l={x:o,y:s},u={originalEvent:e,delta:l};r?(M.current=l,X(re,y,u,{discrete:!1})):Z(l,E.swipeDirection,c)?(M.current=l,X(ne,h,u,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>c||Math.abs(n)>c)&&(j.current=null)}),onPointerUp:t.t(e.onPointerUp,e=>{let t=M.current,n=e.target;if(n.hasPointerCapture(e.pointerId)&&n.releasePointerCapture(e.pointerId),M.current=null,j.current=null,t){let n=e.currentTarget,r={originalEvent:e,delta:t};Z(t,E.swipeDirection,E.swipeThreshold)?X(ae,S,r,{discrete:!0}):X(ie,b,r,{discrete:!0}),n.addEventListener(`click`,e=>e.preventDefault(),{once:!0})}})})})}),E.viewport)})]}):null},`ToastImpl`)),se=x(e=>{let{__scopeToast:t,children:n,...r}=e,i=A(B,t),[a,s]=g.useState(!1),[c,l]=g.useState(!1);return Q(()=>s(!0)),g.useEffect(()=>{let e=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(e)},[]),c?null:(0,v.jsx)(o.t,{asChild:!0,container:i.announcerContainer||void 0,children:(0,v.jsx)(f.n,{...r,children:a&&(0,v.jsxs)(v.Fragment,{children:[i.label,` `,n]})})})},`ToastAnnounce`),W=g.forwardRef(x(function(e,t){let{__scopeToast:n,...r}=e;return(0,v.jsx)(c.t.div,{...r,ref:t})},`ToastTitle`)),G=g.forwardRef(x(function(e,t){let{__scopeToast:n,...r}=e;return(0,v.jsx)(c.t.div,{...r,ref:t})},`ToastDescription`)),ce=`ToastAction`,K=g.forwardRef(x(function(e,t){let{altText:n,...r}=e;return n.trim()?(0,v.jsx)(J,{altText:n,asChild:!0,children:(0,v.jsx)(q,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${ce}\`. Expected non-empty \`string\`.`),null)},`ToastAction`)),le=`ToastClose`,q=g.forwardRef(x(function(e,n){let{__scopeToast:r,...i}=e,a=H(le,r);return(0,v.jsx)(J,{asChild:!0,children:(0,v.jsx)(c.t.button,{type:`button`,...i,ref:n,onClick:t.t(e.onClick,a.onClose)})})},`ToastClose`)),J=g.forwardRef(x(function(e,t){let{__scopeToast:n,altText:r,...i}=e;return(0,v.jsx)(c.t.div,{"data-radix-toast-announce-exclude":``,"data-radix-toast-announce-alt":r||void 0,...i,ref:t})},`ToastAnnounceExclude`));function Y(e){let t=[];return Array.from(e.childNodes).forEach(e=>{if(e.nodeType===e.TEXT_NODE&&e.textContent&&t.push(e.textContent),ue(e)){let n=e.ariaHidden||e.hidden||e.style.display===`none`,r=e.dataset.radixToastAnnounceExclude===``;if(!n){if(r){let n=e.dataset.radixToastAnnounceAlt;n&&t.push(n)}else t.push(...Y(e))}}}),t}x(Y,`getAnnounceTextContent`);function X(e,t,n,{discrete:r}){let i=n.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?c.n(i,a):i.dispatchEvent(a)}x(X,`handleAndDispatchCustomEvent`);var Z=x((e,t,n=0)=>{let r=Math.abs(e.x),i=Math.abs(e.y),a=r>i;return t===D.Left||t===D.Right?a&&r>n:!a&&i>n},`isDeltaInDirection`);function Q(e=()=>{}){let t=l.t(e);d.t(()=>{let e=0,n=0;return e=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(n)}},[t])}x(Q,`useNextFrame`);function ue(e){return e.nodeType===e.ELEMENT_NODE}x(ue,`isHTMLElement`);function de(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:x(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}x(de,`getTabbableCandidates`);function $(e){let t=document.activeElement;return e.some(e=>e===t||(e.focus(),document.activeElement!==t))}x($,`focusFirst`);var fe=M,pe=h.forwardRef(({className:e,...t},n)=>(0,v.jsx)(L,{ref:n,className:p.t(`fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:top-auto sm:right-0 sm:bottom-0 sm:flex-col md:max-w-[420px]`,e),...t}));pe.displayName=L?.displayName||`ToastViewport`;var me=(0,y.cva)(`group data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none`,{variants:{variant:{default:`bg-background text-foreground border`,destructive:`destructive group border-destructive bg-destructive text-destructive-foreground`}},defaultVariants:{variant:`default`}}),he=h.forwardRef(({className:e,variant:t,...n},r)=>(0,v.jsx)(V,{ref:r,className:p.t(me({variant:t}),e),...n}));he.displayName=V?.displayName||`Toast`;var ge=h.forwardRef(({className:e,...t},n)=>(0,v.jsx)(K,{ref:n,className:p.t(`hover:bg-secondary focus:ring-ring group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors focus:ring-1 focus:outline-none disabled:pointer-events-none disabled:opacity-50`,e),...t}));ge.displayName=K?.displayName||`ToastAction`;var _e=h.forwardRef(({className:e,...t},n)=>(0,v.jsx)(q,{ref:n,className:p.t(`text-foreground/50 hover:text-foreground absolute top-1 right-1 rounded-md p-1 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:ring-1 focus:outline-none group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600`,e),"toast-close":``,...t,children:(0,v.jsx)(m.X,{className:`h-4 w-4`})}));_e.displayName=q?.displayName||`ToastClose`;var ve=h.forwardRef(({className:e,...t},n)=>(0,v.jsx)(W,{ref:n,className:p.t(`text-sm font-semibold [&+div]:text-xs`,e),...t}));ve.displayName=W?.displayName||`ToastTitle`;var ye=h.forwardRef(({className:e,...t},n)=>(0,v.jsx)(G,{ref:n,className:p.t(`text-sm opacity-90`,e),...t}));ye.displayName=G?.displayName||`ToastDescription`,Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return fe}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return ye}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return ge}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return ve}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return _e}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return pe}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return he}});
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import { t as e } from "./
|
|
2
|
-
import { a as t } from "./dist-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { t as a } from "./dist-
|
|
6
|
-
import { t as o } from "./dist-
|
|
7
|
-
import { t as s } from "./dist-
|
|
8
|
-
import {
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as
|
|
11
|
-
import { t as
|
|
12
|
-
import { n as
|
|
13
|
-
import { t as m } from "./
|
|
1
|
+
import { t as e } from "./dist-B76UOZbx.mjs";
|
|
2
|
+
import { a as t } from "./dist-C516Vwxy.mjs";
|
|
3
|
+
import { t as n } from "./dist-C2BHd5i1.mjs";
|
|
4
|
+
import { t as r } from "./dist-COqM3IM6.mjs";
|
|
5
|
+
import { n as i, t as a } from "./dist-CbWpCWog.mjs";
|
|
6
|
+
import { t as o } from "./dist-CcGLWbPa.mjs";
|
|
7
|
+
import { t as s } from "./dist-BnlI08Je.mjs";
|
|
8
|
+
import { n as c, t as l } from "./dist-B7Ph9-T6.mjs";
|
|
9
|
+
import { t as u } from "./dist-AlmToDtO.mjs";
|
|
10
|
+
import { t as d } from "./dist-DKI-XYwI.mjs";
|
|
11
|
+
import { t as f } from "./dist-DhubV_gU.mjs";
|
|
12
|
+
import { n as p } from "./dist-ljiGYyay.mjs";
|
|
13
|
+
import { t as m } from "./utils-DQKc9joa.mjs";
|
|
14
14
|
import { X as h } from "lucide-react";
|
|
15
15
|
import * as g from "react";
|
|
16
16
|
import * as _ from "react-dom";
|
|
17
17
|
import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
18
18
|
import { cva as x } from "class-variance-authority";
|
|
19
|
-
|
|
19
|
+
// ../../node_modules/.bun/@radix-ui+react-toast@1.3.1+2b23df507bdda662/node_modules/@radix-ui/react-toast/dist/index.mjs
|
|
20
20
|
var S = Object.defineProperty, C = (e, t) => S(e, "name", {
|
|
21
21
|
value: t,
|
|
22
22
|
configurable: !0
|
|
23
|
-
}), w = g.startTransition || (() => void 0), T = "ToastProvider", [E, D, O] =
|
|
23
|
+
}), w = g.startTransition || (() => void 0), T = "ToastProvider", [E, D, O] = n("Toast"), k = {
|
|
24
24
|
Up: "up",
|
|
25
25
|
Down: "down",
|
|
26
26
|
Left: "left",
|
|
27
27
|
Right: "right"
|
|
28
|
-
},
|
|
28
|
+
}, ee = {
|
|
29
29
|
Foreground: "foreground",
|
|
30
30
|
Background: "background"
|
|
31
|
-
}, [
|
|
32
|
-
function
|
|
31
|
+
}, [A, te] = r("Toast", [O]), [j, M] = A(T);
|
|
32
|
+
function N(e) {
|
|
33
33
|
typeof w == "function" ? w(e) : e();
|
|
34
34
|
}
|
|
35
|
-
C(
|
|
36
|
-
var
|
|
35
|
+
C(N, "scheduleUpdate");
|
|
36
|
+
var P = /* @__PURE__ */ C((e) => {
|
|
37
37
|
let { __scopeToast: t, label: n = "Notification", duration: r = 5e3, swipeDirection: i = k.Right, swipeThreshold: a = 50, announcerContainer: o, children: s } = e, [c, l] = g.useState(null), [u, d] = g.useState(0), f = g.useRef(!1), p = g.useCallback((e) => {
|
|
38
|
-
|
|
38
|
+
N(() => l(e));
|
|
39
39
|
}, []), m = g.useCallback(() => {
|
|
40
|
-
|
|
40
|
+
N(() => d((e) => e + 1));
|
|
41
41
|
}, []), h = g.useCallback(() => {
|
|
42
|
-
|
|
42
|
+
N(() => d((e) => e - 1));
|
|
43
43
|
}, []);
|
|
44
44
|
return n.trim() || console.error(`Invalid prop \`label\` supplied to \`${T}\`. Expected non-empty \`string\`.`), /* @__PURE__ */ y(E.Provider, {
|
|
45
45
|
scope: t,
|
|
46
|
-
children: /* @__PURE__ */ y(
|
|
46
|
+
children: /* @__PURE__ */ y(j, {
|
|
47
47
|
scope: t,
|
|
48
48
|
label: n,
|
|
49
49
|
duration: r,
|
|
@@ -59,24 +59,24 @@ var F = /* @__PURE__ */ C((e) => {
|
|
|
59
59
|
children: s
|
|
60
60
|
})
|
|
61
61
|
});
|
|
62
|
-
}, "ToastProvider"),
|
|
63
|
-
let { __scopeToast:
|
|
62
|
+
}, "ToastProvider"), F = "ToastViewport", I = ["F8"], L = "toast.viewportPause", R = "toast.viewportResume", z = /* @__PURE__ */ g.forwardRef(/* @__PURE__ */ C(function(e, n) {
|
|
63
|
+
let { __scopeToast: r, hotkey: a = I, label: o = "Notifications ({hotkey})", ...s } = e, c = M(F, r), u = D(r), d = g.useRef(null), f = g.useRef(null), p = g.useRef(null), m = g.useRef(null), h = t(n, m, c.onViewportChange), _ = a.join("+").replace(/Key/g, "").replace(/Digit/g, ""), v = c.toastCount > 0;
|
|
64
64
|
g.useEffect(() => {
|
|
65
65
|
let e = /* @__PURE__ */ C((e) => {
|
|
66
66
|
a.length !== 0 && a.every((t) => e[t] || e.code === t) && m.current?.focus();
|
|
67
67
|
}, "handleKeyDown");
|
|
68
68
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
69
69
|
}, [a]), g.useEffect(() => {
|
|
70
|
-
let e =
|
|
70
|
+
let e = d.current, t = m.current;
|
|
71
71
|
if (v && e && t) {
|
|
72
72
|
let n = /* @__PURE__ */ C(() => {
|
|
73
73
|
if (!c.isClosePausedRef.current) {
|
|
74
|
-
let e = new CustomEvent(
|
|
74
|
+
let e = new CustomEvent(L);
|
|
75
75
|
t.dispatchEvent(e), c.isClosePausedRef.current = !0;
|
|
76
76
|
}
|
|
77
77
|
}, "handlePause"), r = /* @__PURE__ */ C(() => {
|
|
78
78
|
if (c.isClosePausedRef.current) {
|
|
79
|
-
let e = new CustomEvent(
|
|
79
|
+
let e = new CustomEvent(R);
|
|
80
80
|
t.dispatchEvent(e), c.isClosePausedRef.current = !1;
|
|
81
81
|
}
|
|
82
82
|
}, "handleResume"), i = /* @__PURE__ */ C((t) => {
|
|
@@ -90,12 +90,12 @@ var F = /* @__PURE__ */ C((e) => {
|
|
|
90
90
|
}
|
|
91
91
|
}, [v, c.isClosePausedRef]);
|
|
92
92
|
let x = g.useCallback(({ tabbingDirection: e }) => {
|
|
93
|
-
let t =
|
|
93
|
+
let t = u().map((t) => {
|
|
94
94
|
let n = t.ref.current, r = [n, ...pe(n)];
|
|
95
95
|
return e === "forwards" ? r : r.reverse();
|
|
96
96
|
});
|
|
97
97
|
return (e === "forwards" ? t.reverse() : t).flat();
|
|
98
|
-
}, [
|
|
98
|
+
}, [u]);
|
|
99
99
|
return g.useEffect(() => {
|
|
100
100
|
let e = m.current;
|
|
101
101
|
if (e) {
|
|
@@ -104,37 +104,37 @@ var F = /* @__PURE__ */ C((e) => {
|
|
|
104
104
|
if (t.key === "Tab" && !n) {
|
|
105
105
|
let n = document.activeElement, r = t.shiftKey;
|
|
106
106
|
if (t.target === e && r) {
|
|
107
|
-
|
|
107
|
+
f.current?.focus();
|
|
108
108
|
return;
|
|
109
109
|
}
|
|
110
110
|
let i = x({ tabbingDirection: r ? "backwards" : "forwards" }), a = i.findIndex((e) => e === n);
|
|
111
|
-
$(i.slice(a + 1)) ? t.preventDefault() : r ?
|
|
111
|
+
$(i.slice(a + 1)) ? t.preventDefault() : r ? f.current?.focus() : p.current?.focus();
|
|
112
112
|
}
|
|
113
113
|
}, "handleKeyDown");
|
|
114
114
|
return e.addEventListener("keydown", t), () => e.removeEventListener("keydown", t);
|
|
115
115
|
}
|
|
116
|
-
}, [
|
|
117
|
-
ref:
|
|
116
|
+
}, [u, x]), /* @__PURE__ */ b(i, {
|
|
117
|
+
ref: d,
|
|
118
118
|
role: "region",
|
|
119
119
|
"aria-label": o.replace("{hotkey}", _),
|
|
120
120
|
tabIndex: -1,
|
|
121
121
|
style: { pointerEvents: v ? void 0 : "none" },
|
|
122
122
|
children: [
|
|
123
|
-
v && /* @__PURE__ */ y(
|
|
124
|
-
ref:
|
|
123
|
+
v && /* @__PURE__ */ y(V, {
|
|
124
|
+
ref: f,
|
|
125
125
|
onFocusFromOutsideViewport: () => {
|
|
126
126
|
$(x({ tabbingDirection: "forwards" }));
|
|
127
127
|
}
|
|
128
128
|
}),
|
|
129
129
|
/* @__PURE__ */ y(E.Slot, {
|
|
130
|
-
scope:
|
|
131
|
-
children: /* @__PURE__ */ y(
|
|
130
|
+
scope: r,
|
|
131
|
+
children: /* @__PURE__ */ y(l.ol, {
|
|
132
132
|
tabIndex: -1,
|
|
133
133
|
...s,
|
|
134
134
|
ref: h
|
|
135
135
|
})
|
|
136
136
|
}),
|
|
137
|
-
v && /* @__PURE__ */ y(
|
|
137
|
+
v && /* @__PURE__ */ y(V, {
|
|
138
138
|
ref: p,
|
|
139
139
|
onFocusFromOutsideViewport: () => {
|
|
140
140
|
$(x({ tabbingDirection: "backwards" }));
|
|
@@ -142,202 +142,202 @@ var F = /* @__PURE__ */ C((e) => {
|
|
|
142
142
|
})
|
|
143
143
|
]
|
|
144
144
|
});
|
|
145
|
-
}, "ToastViewport")),
|
|
146
|
-
let { __scopeToast: n, onFocusFromOutsideViewport: r, ...
|
|
147
|
-
return /* @__PURE__ */ y(
|
|
145
|
+
}, "ToastViewport")), B = "ToastFocusProxy", V = /* @__PURE__ */ g.forwardRef(/* @__PURE__ */ C(function(e, t) {
|
|
146
|
+
let { __scopeToast: n, onFocusFromOutsideViewport: r, ...i } = e, a = M(B, n);
|
|
147
|
+
return /* @__PURE__ */ y(p, {
|
|
148
148
|
tabIndex: 0,
|
|
149
|
-
...
|
|
149
|
+
...i,
|
|
150
150
|
ref: t,
|
|
151
151
|
style: { position: "fixed" },
|
|
152
152
|
onFocus: (e) => {
|
|
153
153
|
let t = e.relatedTarget;
|
|
154
|
-
|
|
154
|
+
a.viewport?.contains(t) || r();
|
|
155
155
|
}
|
|
156
156
|
});
|
|
157
|
-
}, "ToastFocusProxy")),
|
|
158
|
-
let { forceMount:
|
|
159
|
-
prop:
|
|
160
|
-
defaultProp:
|
|
161
|
-
onChange:
|
|
162
|
-
caller:
|
|
157
|
+
}, "ToastFocusProxy")), H = "Toast", ne = "toast.swipeStart", re = "toast.swipeMove", ie = "toast.swipeCancel", ae = "toast.swipeEnd", U = /* @__PURE__ */ g.forwardRef(/* @__PURE__ */ C(function(t, n) {
|
|
158
|
+
let { forceMount: r, open: i, defaultOpen: a, onOpenChange: o, ...c } = t, [l, f] = d({
|
|
159
|
+
prop: i,
|
|
160
|
+
defaultProp: a ?? !0,
|
|
161
|
+
onChange: o,
|
|
162
|
+
caller: H
|
|
163
163
|
});
|
|
164
|
-
return /* @__PURE__ */ y(
|
|
165
|
-
present:
|
|
166
|
-
children: /* @__PURE__ */ y(
|
|
167
|
-
open:
|
|
168
|
-
...
|
|
169
|
-
ref:
|
|
164
|
+
return /* @__PURE__ */ y(s, {
|
|
165
|
+
present: r || l,
|
|
166
|
+
children: /* @__PURE__ */ y(G, {
|
|
167
|
+
open: l,
|
|
168
|
+
...c,
|
|
169
|
+
ref: n,
|
|
170
170
|
onClose: () => f(!1),
|
|
171
|
-
onPause:
|
|
172
|
-
onResume:
|
|
173
|
-
onSwipeStart:
|
|
171
|
+
onPause: u(t.onPause),
|
|
172
|
+
onResume: u(t.onResume),
|
|
173
|
+
onSwipeStart: e(t.onSwipeStart, (e) => {
|
|
174
174
|
e.currentTarget.setAttribute("data-swipe", "start");
|
|
175
175
|
}),
|
|
176
|
-
onSwipeMove:
|
|
176
|
+
onSwipeMove: e(t.onSwipeMove, (e) => {
|
|
177
177
|
let { x: t, y: n } = e.detail.delta;
|
|
178
178
|
e.currentTarget.setAttribute("data-swipe", "move"), e.currentTarget.style.setProperty("--radix-toast-swipe-move-x", `${t}px`), e.currentTarget.style.setProperty("--radix-toast-swipe-move-y", `${n}px`);
|
|
179
179
|
}),
|
|
180
|
-
onSwipeCancel:
|
|
180
|
+
onSwipeCancel: e(t.onSwipeCancel, (e) => {
|
|
181
181
|
e.currentTarget.setAttribute("data-swipe", "cancel"), e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), e.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"), e.currentTarget.style.removeProperty("--radix-toast-swipe-end-y");
|
|
182
182
|
}),
|
|
183
|
-
onSwipeEnd:
|
|
183
|
+
onSwipeEnd: e(t.onSwipeEnd, (e) => {
|
|
184
184
|
let { x: t, y: n } = e.detail.delta;
|
|
185
185
|
e.currentTarget.setAttribute("data-swipe", "end"), e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), e.currentTarget.style.setProperty("--radix-toast-swipe-end-x", `${t}px`), e.currentTarget.style.setProperty("--radix-toast-swipe-end-y", `${n}px`), f(!1);
|
|
186
186
|
})
|
|
187
187
|
})
|
|
188
188
|
});
|
|
189
|
-
}, "Toast")), [
|
|
190
|
-
let { __scopeToast: i, type:
|
|
191
|
-
|
|
192
|
-
}),
|
|
193
|
-
|
|
194
|
-
}, [
|
|
189
|
+
}, "Toast")), [oe, W] = A(H, { onClose() {} }), G = /* @__PURE__ */ g.forwardRef(/* @__PURE__ */ C(function(n, r) {
|
|
190
|
+
let { __scopeToast: i, type: o = ee.Foreground, duration: s, open: c, onClose: d, onEscapeKeyDown: f, onPause: p, onResume: m, onSwipeStart: h, onSwipeMove: x, onSwipeCancel: S, onSwipeEnd: w, ...T } = n, O = M(H, i), k = D(i), [A, te] = g.useState(null), j = t(r, te), N = g.useRef(null), P = g.useRef(null), F = s || O.duration, I = g.useRef(0), z = g.useRef(F), B = g.useRef(0), { onToastAdd: V, onToastRemove: U } = O, W = u(() => {
|
|
191
|
+
A?.contains(document.activeElement) && O.viewport?.focus(), d();
|
|
192
|
+
}), G = g.useCallback((e) => {
|
|
193
|
+
e && e !== Infinity && (window.clearTimeout(B.current), I.current = (/* @__PURE__ */ new Date()).getTime(), B.current = window.setTimeout(W, e));
|
|
194
|
+
}, [W]);
|
|
195
195
|
g.useEffect(() => {
|
|
196
196
|
let e = O.viewport;
|
|
197
197
|
if (e) {
|
|
198
198
|
let t = /* @__PURE__ */ C(() => {
|
|
199
|
-
|
|
199
|
+
G(z.current), m?.();
|
|
200
200
|
}, "handleResume"), n = /* @__PURE__ */ C(() => {
|
|
201
|
-
let e = (/* @__PURE__ */ new Date()).getTime() -
|
|
202
|
-
|
|
201
|
+
let e = (/* @__PURE__ */ new Date()).getTime() - I.current;
|
|
202
|
+
z.current -= e, window.clearTimeout(B.current), p?.();
|
|
203
203
|
}, "handlePause");
|
|
204
|
-
return e.addEventListener(
|
|
205
|
-
e.removeEventListener(
|
|
204
|
+
return e.addEventListener(L, n), e.addEventListener(R, t), () => {
|
|
205
|
+
e.removeEventListener(L, n), e.removeEventListener(R, t);
|
|
206
206
|
};
|
|
207
207
|
}
|
|
208
208
|
}, [
|
|
209
209
|
O.viewport,
|
|
210
|
-
|
|
211
|
-
|
|
210
|
+
F,
|
|
211
|
+
p,
|
|
212
212
|
m,
|
|
213
|
-
|
|
213
|
+
G
|
|
214
214
|
]), g.useEffect(() => {
|
|
215
|
-
|
|
215
|
+
z.current = F, c && !O.isClosePausedRef.current && G(F);
|
|
216
216
|
}, [
|
|
217
|
-
|
|
218
|
-
|
|
217
|
+
c,
|
|
218
|
+
F,
|
|
219
219
|
O.isClosePausedRef,
|
|
220
|
-
|
|
220
|
+
G
|
|
221
221
|
]), g.useEffect(() => () => {
|
|
222
|
-
window.clearTimeout(
|
|
223
|
-
}, []), g.useEffect(() => (
|
|
224
|
-
let
|
|
225
|
-
return O.viewport ? /* @__PURE__ */ b(v, { children: [
|
|
222
|
+
window.clearTimeout(B.current);
|
|
223
|
+
}, []), g.useEffect(() => (V(), () => U()), [V, U]);
|
|
224
|
+
let K = g.useMemo(() => A ? Z(A) : null, [A]);
|
|
225
|
+
return O.viewport ? /* @__PURE__ */ b(v, { children: [K && /* @__PURE__ */ y(se, {
|
|
226
226
|
__scopeToast: i,
|
|
227
227
|
role: "status",
|
|
228
|
-
"aria-live":
|
|
229
|
-
children:
|
|
230
|
-
}), /* @__PURE__ */ y(
|
|
228
|
+
"aria-live": o === ee.Foreground ? "assertive" : "polite",
|
|
229
|
+
children: K
|
|
230
|
+
}), /* @__PURE__ */ y(oe, {
|
|
231
231
|
scope: i,
|
|
232
|
-
onClose:
|
|
232
|
+
onClose: W,
|
|
233
233
|
children: _.createPortal(/* @__PURE__ */ y(E.ItemSlot, {
|
|
234
234
|
scope: i,
|
|
235
|
-
children: /* @__PURE__ */ y(
|
|
235
|
+
children: /* @__PURE__ */ y(a, {
|
|
236
236
|
asChild: !0,
|
|
237
|
-
onEscapeKeyDown:
|
|
238
|
-
k().some((t) => t.ref.current?.contains(e.target)) ||
|
|
237
|
+
onEscapeKeyDown: e(f, (e) => {
|
|
238
|
+
k().some((t) => t.ref.current?.contains(e.target)) || W();
|
|
239
239
|
}),
|
|
240
|
-
children: /* @__PURE__ */ y(
|
|
240
|
+
children: /* @__PURE__ */ y(l.li, {
|
|
241
241
|
tabIndex: 0,
|
|
242
|
-
"data-state":
|
|
242
|
+
"data-state": c ? "open" : "closed",
|
|
243
243
|
"data-swipe-direction": O.swipeDirection,
|
|
244
244
|
...T,
|
|
245
|
-
ref:
|
|
245
|
+
ref: j,
|
|
246
246
|
style: {
|
|
247
247
|
userSelect: "none",
|
|
248
248
|
touchAction: "none",
|
|
249
|
-
...
|
|
249
|
+
...n.style
|
|
250
250
|
},
|
|
251
|
-
onKeyDown:
|
|
252
|
-
e.key === "Escape" && (
|
|
251
|
+
onKeyDown: e(n.onKeyDown, (e) => {
|
|
252
|
+
e.key === "Escape" && (f?.(e.nativeEvent), e.nativeEvent.defaultPrevented || W());
|
|
253
253
|
}),
|
|
254
|
-
onPointerDown:
|
|
255
|
-
e.button === 0 && (
|
|
254
|
+
onPointerDown: e(n.onPointerDown, (e) => {
|
|
255
|
+
e.button === 0 && (N.current = {
|
|
256
256
|
x: e.clientX,
|
|
257
257
|
y: e.clientY
|
|
258
258
|
});
|
|
259
259
|
}),
|
|
260
|
-
onPointerMove:
|
|
261
|
-
if (!
|
|
262
|
-
let t = e.clientX -
|
|
260
|
+
onPointerMove: e(n.onPointerMove, (e) => {
|
|
261
|
+
if (!N.current) return;
|
|
262
|
+
let t = e.clientX - N.current.x, n = e.clientY - N.current.y, r = !!P.current, i = ["left", "right"].includes(O.swipeDirection), a = ["left", "up"].includes(O.swipeDirection) ? Math.min : Math.max, o = i ? a(0, t) : 0, s = i ? 0 : a(0, n), c = e.pointerType === "touch" ? 10 : 2, l = {
|
|
263
263
|
x: o,
|
|
264
264
|
y: s
|
|
265
265
|
}, u = {
|
|
266
266
|
originalEvent: e,
|
|
267
267
|
delta: l
|
|
268
268
|
};
|
|
269
|
-
r ? (
|
|
269
|
+
r ? (P.current = l, Q(re, x, u, { discrete: !1 })) : ue(l, O.swipeDirection, c) ? (P.current = l, Q(ne, h, u, { discrete: !1 }), e.target.setPointerCapture(e.pointerId)) : (Math.abs(t) > c || Math.abs(n) > c) && (N.current = null);
|
|
270
270
|
}),
|
|
271
|
-
onPointerUp:
|
|
272
|
-
let t =
|
|
273
|
-
if (n.hasPointerCapture(e.pointerId) && n.releasePointerCapture(e.pointerId),
|
|
271
|
+
onPointerUp: e(n.onPointerUp, (e) => {
|
|
272
|
+
let t = P.current, n = e.target;
|
|
273
|
+
if (n.hasPointerCapture(e.pointerId) && n.releasePointerCapture(e.pointerId), P.current = null, N.current = null, t) {
|
|
274
274
|
let n = e.currentTarget, r = {
|
|
275
275
|
originalEvent: e,
|
|
276
276
|
delta: t
|
|
277
277
|
};
|
|
278
|
-
ue(t, O.swipeDirection, O.swipeThreshold) ? Q(
|
|
278
|
+
ue(t, O.swipeDirection, O.swipeThreshold) ? Q(ae, w, r, { discrete: !0 }) : Q(ie, S, r, { discrete: !0 }), n.addEventListener("click", (e) => e.preventDefault(), { once: !0 });
|
|
279
279
|
}
|
|
280
280
|
})
|
|
281
281
|
})
|
|
282
282
|
})
|
|
283
283
|
}), O.viewport)
|
|
284
284
|
})] }) : null;
|
|
285
|
-
}, "ToastImpl")),
|
|
286
|
-
let { __scopeToast: t, children: n, ...r } = e,
|
|
285
|
+
}, "ToastImpl")), se = /* @__PURE__ */ C((e) => {
|
|
286
|
+
let { __scopeToast: t, children: n, ...r } = e, i = M(H, t), [a, s] = g.useState(!1), [c, l] = g.useState(!1);
|
|
287
287
|
return de(() => s(!0)), g.useEffect(() => {
|
|
288
288
|
let e = window.setTimeout(() => l(!0), 1e3);
|
|
289
289
|
return () => window.clearTimeout(e);
|
|
290
|
-
}, []), c ? null : /* @__PURE__ */ y(
|
|
290
|
+
}, []), c ? null : /* @__PURE__ */ y(o, {
|
|
291
291
|
asChild: !0,
|
|
292
|
-
container:
|
|
293
|
-
children: /* @__PURE__ */ y(
|
|
292
|
+
container: i.announcerContainer || void 0,
|
|
293
|
+
children: /* @__PURE__ */ y(p, {
|
|
294
294
|
...r,
|
|
295
|
-
children:
|
|
296
|
-
|
|
295
|
+
children: a && /* @__PURE__ */ b(v, { children: [
|
|
296
|
+
i.label,
|
|
297
297
|
" ",
|
|
298
298
|
n
|
|
299
299
|
] })
|
|
300
300
|
})
|
|
301
301
|
});
|
|
302
|
-
}, "ToastAnnounce"),
|
|
303
|
-
let { __scopeToast: n, ...
|
|
304
|
-
return /* @__PURE__ */ y(
|
|
305
|
-
...
|
|
302
|
+
}, "ToastAnnounce"), K = /* @__PURE__ */ g.forwardRef(/* @__PURE__ */ C(function(e, t) {
|
|
303
|
+
let { __scopeToast: n, ...r } = e;
|
|
304
|
+
return /* @__PURE__ */ y(l.div, {
|
|
305
|
+
...r,
|
|
306
306
|
ref: t
|
|
307
307
|
});
|
|
308
|
-
}, "ToastTitle")),
|
|
309
|
-
let { __scopeToast: n, ...
|
|
310
|
-
return /* @__PURE__ */ y(
|
|
311
|
-
...
|
|
308
|
+
}, "ToastTitle")), q = /* @__PURE__ */ g.forwardRef(/* @__PURE__ */ C(function(e, t) {
|
|
309
|
+
let { __scopeToast: n, ...r } = e;
|
|
310
|
+
return /* @__PURE__ */ y(l.div, {
|
|
311
|
+
...r,
|
|
312
312
|
ref: t
|
|
313
313
|
});
|
|
314
|
-
}, "ToastDescription")),
|
|
314
|
+
}, "ToastDescription")), ce = "ToastAction", J = /* @__PURE__ */ g.forwardRef(/* @__PURE__ */ C(function(e, t) {
|
|
315
315
|
let { altText: n, ...r } = e;
|
|
316
|
-
return n.trim() ? /* @__PURE__ */ y(
|
|
316
|
+
return n.trim() ? /* @__PURE__ */ y(X, {
|
|
317
317
|
altText: n,
|
|
318
318
|
asChild: !0,
|
|
319
|
-
children: /* @__PURE__ */ y(
|
|
319
|
+
children: /* @__PURE__ */ y(Y, {
|
|
320
320
|
...r,
|
|
321
321
|
ref: t
|
|
322
322
|
})
|
|
323
|
-
}) : (console.error(`Invalid prop \`altText\` supplied to \`${
|
|
324
|
-
}, "ToastAction")),
|
|
325
|
-
let { __scopeToast:
|
|
326
|
-
return /* @__PURE__ */ y(
|
|
323
|
+
}) : (console.error(`Invalid prop \`altText\` supplied to \`${ce}\`. Expected non-empty \`string\`.`), null);
|
|
324
|
+
}, "ToastAction")), le = "ToastClose", Y = /* @__PURE__ */ g.forwardRef(/* @__PURE__ */ C(function(t, n) {
|
|
325
|
+
let { __scopeToast: r, ...i } = t, a = W(le, r);
|
|
326
|
+
return /* @__PURE__ */ y(X, {
|
|
327
327
|
asChild: !0,
|
|
328
|
-
children: /* @__PURE__ */ y(
|
|
328
|
+
children: /* @__PURE__ */ y(l.button, {
|
|
329
329
|
type: "button",
|
|
330
330
|
...i,
|
|
331
|
-
ref:
|
|
332
|
-
onClick:
|
|
331
|
+
ref: n,
|
|
332
|
+
onClick: e(t.onClick, a.onClose)
|
|
333
333
|
})
|
|
334
334
|
});
|
|
335
|
-
}, "ToastClose")),
|
|
336
|
-
let { __scopeToast: n, altText:
|
|
337
|
-
return /* @__PURE__ */ y(
|
|
335
|
+
}, "ToastClose")), X = /* @__PURE__ */ g.forwardRef(/* @__PURE__ */ C(function(e, t) {
|
|
336
|
+
let { __scopeToast: n, altText: r, ...i } = e;
|
|
337
|
+
return /* @__PURE__ */ y(l.div, {
|
|
338
338
|
"data-radix-toast-announce-exclude": "",
|
|
339
|
-
"data-radix-toast-announce-alt":
|
|
340
|
-
...
|
|
339
|
+
"data-radix-toast-announce-alt": r || void 0,
|
|
340
|
+
...i,
|
|
341
341
|
ref: t
|
|
342
342
|
});
|
|
343
343
|
}, "ToastAnnounceExclude"));
|
|
@@ -346,21 +346,23 @@ function Z(e) {
|
|
|
346
346
|
return Array.from(e.childNodes).forEach((e) => {
|
|
347
347
|
if (e.nodeType === e.TEXT_NODE && e.textContent && t.push(e.textContent), fe(e)) {
|
|
348
348
|
let n = e.ariaHidden || e.hidden || e.style.display === "none", r = e.dataset.radixToastAnnounceExclude === "";
|
|
349
|
-
if (!n)
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
349
|
+
if (!n) {
|
|
350
|
+
if (r) {
|
|
351
|
+
let n = e.dataset.radixToastAnnounceAlt;
|
|
352
|
+
n && t.push(n);
|
|
353
|
+
} else t.push(...Z(e));
|
|
354
|
+
}
|
|
353
355
|
}
|
|
354
356
|
}), t;
|
|
355
357
|
}
|
|
356
358
|
C(Z, "getAnnounceTextContent");
|
|
357
|
-
function Q(e, t,
|
|
358
|
-
let
|
|
359
|
+
function Q(e, t, n, { discrete: r }) {
|
|
360
|
+
let i = n.originalEvent.currentTarget, a = new CustomEvent(e, {
|
|
359
361
|
bubbles: !0,
|
|
360
362
|
cancelable: !0,
|
|
361
|
-
detail:
|
|
363
|
+
detail: n
|
|
362
364
|
});
|
|
363
|
-
t &&
|
|
365
|
+
t && i.addEventListener(e, t, { once: !0 }), r ? c(i, a) : i.dispatchEvent(a);
|
|
364
366
|
}
|
|
365
367
|
C(Q, "handleAndDispatchCustomEvent");
|
|
366
368
|
var ue = /* @__PURE__ */ C((e, t, n = 0) => {
|
|
@@ -368,8 +370,8 @@ var ue = /* @__PURE__ */ C((e, t, n = 0) => {
|
|
|
368
370
|
return t === k.Left || t === k.Right ? a && r > n : !a && i > n;
|
|
369
371
|
}, "isDeltaInDirection");
|
|
370
372
|
function de(e = () => {}) {
|
|
371
|
-
let t =
|
|
372
|
-
|
|
373
|
+
let t = u(e);
|
|
374
|
+
f(() => {
|
|
373
375
|
let e = 0, n = 0;
|
|
374
376
|
return e = window.requestAnimationFrame(() => n = window.requestAnimationFrame(t)), () => {
|
|
375
377
|
window.cancelAnimationFrame(e), window.cancelAnimationFrame(n);
|
|
@@ -392,54 +394,52 @@ function pe(e) {
|
|
|
392
394
|
C(pe, "getTabbableCandidates");
|
|
393
395
|
function $(e) {
|
|
394
396
|
let t = document.activeElement;
|
|
395
|
-
return e.some((e) => e === t
|
|
397
|
+
return e.some((e) => e === t || (e.focus(), document.activeElement !== t));
|
|
396
398
|
}
|
|
397
399
|
C($, "focusFirst");
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
...n
|
|
400
|
+
// src/toast.tsx
|
|
401
|
+
var me = P, he = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y(z, {
|
|
402
|
+
ref: n,
|
|
403
|
+
className: m("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:top-auto sm:right-0 sm:bottom-0 sm:flex-col md:max-w-[420px]", e),
|
|
404
|
+
...t
|
|
404
405
|
}));
|
|
405
|
-
he.displayName =
|
|
406
|
+
he.displayName = z?.displayName || "ToastViewport";
|
|
406
407
|
var ge = x("group data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none", {
|
|
407
408
|
variants: { variant: {
|
|
408
409
|
default: "bg-background text-foreground border",
|
|
409
410
|
destructive: "destructive group border-destructive bg-destructive text-destructive-foreground"
|
|
410
411
|
} },
|
|
411
412
|
defaultVariants: { variant: "default" }
|
|
412
|
-
}), _e = g.forwardRef(({ className:
|
|
413
|
-
ref: i,
|
|
414
|
-
className: e(ge({ variant: n }), t),
|
|
415
|
-
...r
|
|
416
|
-
}));
|
|
417
|
-
_e.displayName = W?.displayName || "Toast";
|
|
418
|
-
var ve = g.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ y(Y, {
|
|
413
|
+
}), _e = g.forwardRef(({ className: e, variant: t, ...n }, r) => /* @__PURE__ */ y(U, {
|
|
419
414
|
ref: r,
|
|
420
|
-
className:
|
|
415
|
+
className: m(ge({ variant: t }), e),
|
|
421
416
|
...n
|
|
422
417
|
}));
|
|
423
|
-
|
|
424
|
-
var
|
|
425
|
-
ref:
|
|
426
|
-
className:
|
|
418
|
+
_e.displayName = U?.displayName || "Toast";
|
|
419
|
+
var ve = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y(J, {
|
|
420
|
+
ref: n,
|
|
421
|
+
className: m("hover:bg-secondary focus:ring-ring group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors focus:ring-1 focus:outline-none disabled:pointer-events-none disabled:opacity-50", e),
|
|
422
|
+
...t
|
|
423
|
+
}));
|
|
424
|
+
ve.displayName = J?.displayName || "ToastAction";
|
|
425
|
+
var ye = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y(Y, {
|
|
426
|
+
ref: n,
|
|
427
|
+
className: m("text-foreground/50 hover:text-foreground absolute top-1 right-1 rounded-md p-1 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:ring-1 focus:outline-none group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600", e),
|
|
427
428
|
"toast-close": "",
|
|
428
|
-
...
|
|
429
|
+
...t,
|
|
429
430
|
children: /* @__PURE__ */ y(h, { className: "h-4 w-4" })
|
|
430
431
|
}));
|
|
431
|
-
ye.displayName =
|
|
432
|
-
var be = g.forwardRef(({ className:
|
|
433
|
-
ref:
|
|
434
|
-
className:
|
|
435
|
-
...
|
|
432
|
+
ye.displayName = Y?.displayName || "ToastClose";
|
|
433
|
+
var be = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y(K, {
|
|
434
|
+
ref: n,
|
|
435
|
+
className: m("text-sm font-semibold [&+div]:text-xs", e),
|
|
436
|
+
...t
|
|
436
437
|
}));
|
|
437
|
-
be.displayName =
|
|
438
|
-
var xe = g.forwardRef(({ className:
|
|
439
|
-
ref:
|
|
440
|
-
className:
|
|
441
|
-
...
|
|
438
|
+
be.displayName = K?.displayName || "ToastTitle";
|
|
439
|
+
var xe = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y(q, {
|
|
440
|
+
ref: n,
|
|
441
|
+
className: m("text-sm opacity-90", e),
|
|
442
|
+
...t
|
|
442
443
|
}));
|
|
443
|
-
xe.displayName =
|
|
444
|
-
//#endregion
|
|
444
|
+
xe.displayName = q?.displayName || "ToastDescription";
|
|
445
445
|
export { me as a, xe as i, ve as n, be as o, ye as r, he as s, _e as t };
|