@gv-tech/ui-web 2.21.0 → 2.21.1
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-BTF24dQU.js +1 -0
- package/dist/accordion-DHTV2Am8.mjs +221 -0
- package/dist/accordion.cjs +1 -1
- package/dist/accordion.d.ts +2 -18
- package/dist/accordion.mjs +1 -1
- package/dist/alert-dialog-Bwn2-Uyf.mjs +164 -0
- package/dist/alert-dialog-DBMX5E0-.js +7 -0
- package/dist/alert-dialog.cjs +1 -1
- package/dist/alert-dialog.d.ts +2 -43
- package/dist/alert-dialog.mjs +1 -1
- package/dist/alert.cjs +1 -1
- package/dist/alert.d.ts +2 -18
- package/dist/alert.mjs +19 -19
- package/dist/{aspect-ratio-Bp8HMg-1.mjs → aspect-ratio-CFWobEnT.mjs} +11 -11
- package/dist/aspect-ratio-D9dApiWv.js +1 -0
- package/dist/aspect-ratio.cjs +1 -1
- package/dist/aspect-ratio.d.ts +2 -10
- package/dist/aspect-ratio.mjs +1 -1
- package/dist/avatar-BI7s8omb.js +1 -0
- package/dist/{avatar-vGm9JN1a.mjs → avatar-hzlewncL.mjs} +49 -48
- package/dist/avatar.cjs +1 -1
- package/dist/avatar.d.ts +2 -15
- package/dist/avatar.mjs +1 -1
- package/dist/badge.cjs +1 -1
- package/dist/badge.d.ts +2 -16
- package/dist/badge.mjs +7 -7
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.d.ts +2 -35
- package/dist/breadcrumb.mjs +26 -26
- package/dist/button.cjs +1 -1
- package/dist/button.d.ts +2 -17
- package/dist/button.mjs +12 -12
- package/dist/{calendar-oitID53a.mjs → calendar-DtFx4qdT.mjs} +856 -862
- package/dist/calendar-ykdYhTj9.js +1 -0
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.d.ts +2 -29
- package/dist/calendar.mjs +1 -1
- package/dist/card.cjs +1 -1
- package/dist/card.d.ts +2 -19
- package/dist/card.mjs +28 -28
- package/dist/carousel-DSmAn1nc.js +1 -0
- package/dist/{carousel-CENzZCXN.mjs → carousel-PQJ97GjQ.mjs} +252 -252
- package/dist/carousel.cjs +1 -1
- package/dist/carousel.d.ts +2 -50
- package/dist/carousel.mjs +1 -1
- package/dist/chart.cjs +2 -2
- package/dist/chart.d.ts +2 -28
- package/dist/chart.mjs +83 -83
- package/dist/checkbox-BOmSuATv.mjs +170 -0
- package/dist/checkbox-dK6DJKeV.js +1 -0
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.d.ts +2 -10
- package/dist/checkbox.mjs +1 -1
- package/dist/chunk-BmowowmI.mjs +14 -0
- package/dist/chunk-mLOUI7ql.js +1 -0
- package/dist/collapsible.cjs +1 -1
- package/dist/collapsible.d.ts +2 -20
- package/dist/collapsible.mjs +1 -1
- package/dist/command-CDSbHz4C.js +1 -0
- package/dist/command-j0rZqZ7B.mjs +531 -0
- package/dist/command.cjs +1 -1
- package/dist/command.d.ts +2 -115
- package/dist/command.mjs +1 -1
- package/dist/context-menu-BWgLbKLP.js +1 -0
- package/dist/context-menu-CWSzssAO.mjs +292 -0
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.d.ts +2 -80
- package/dist/context-menu.mjs +1 -1
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.d.ts +2 -31
- package/dist/dialog.mjs +25 -25
- package/dist/dist--EFQaGUD.mjs +18 -0
- package/dist/dist-9gQKRtL7.mjs +73 -0
- package/dist/dist-B28N93_W.js +1 -0
- package/dist/dist-B43Kk7ii.js +1 -0
- package/dist/dist-BQOrag93.mjs +152 -0
- package/dist/dist-BTPL2C0R.js +1 -0
- package/dist/dist-BTlmz3JV.js +1 -0
- package/dist/{dist-bDoR0CBU.mjs → dist-BjEG16aJ.mjs} +31 -32
- package/dist/{dist-DqvQ5UFr.mjs → dist-Bjlzl0jN.mjs} +10 -10
- package/dist/dist-BlKAvKHD.js +1 -0
- package/dist/dist-Bm8Cuttq.mjs +76 -0
- package/dist/dist-Byhx2fDJ.js +1 -0
- package/dist/dist-C3Z3atn0.mjs +10 -0
- package/dist/dist-C4q8IPk4.mjs +28 -0
- package/dist/{dist-BxmpAHsT.mjs → dist-C5EZ0AD6.mjs} +75 -75
- package/dist/dist-CEJNUZGZ.js +1 -0
- package/dist/dist-CGgemr2V.js +1 -0
- package/dist/dist-CPglx4om.js +1 -0
- package/dist/dist-CRmJFaEL.mjs +95 -0
- package/dist/dist-CSkpam6a.js +1 -0
- package/dist/dist-CTaBktQl.mjs +557 -0
- package/dist/dist-CV2U2xFR.js +1 -0
- package/dist/dist-C_45sBzc.js +1 -0
- package/dist/dist-Cb7OVHcJ.js +1 -0
- package/dist/dist-Ccv5O-Vw.js +1 -0
- package/dist/dist-Cv9YaN1n.mjs +61 -0
- package/dist/{dist-C9wnUiS4.mjs → dist-DCKyUINZ.mjs} +12 -12
- package/dist/dist-DQAJMTj0.js +1 -0
- package/dist/dist-D_tuvB-W.mjs +61 -0
- package/dist/dist-DaCPM8ia.js +1 -0
- package/dist/dist-DasmYflz.js +1 -0
- package/dist/{dist-d_pecHgw.mjs → dist-DdVp13bp.mjs} +2 -2
- package/dist/{dist-DikyKBU3.mjs → dist-Df2ez-DA.mjs} +1 -1
- package/dist/dist-DneYUKe0.js +1 -0
- package/dist/dist-Doq7FY_P.js +1 -0
- package/dist/{dist-Z7lEV5Nx.mjs → dist-Du2jbEkG.mjs} +346 -346
- package/dist/{dist-VI9bl_Wk.mjs → dist-DuTFGM_g.mjs} +1 -1
- package/dist/dist-Dw6-GQAn.js +1 -0
- package/dist/dist-DwGlbIjj.js +5 -0
- package/dist/dist-DynSBUGq.js +1 -0
- package/dist/dist-Dzjlf9ug.js +1 -0
- package/dist/dist-GaBUW_Tu.js +1 -0
- package/dist/{dist-FGQAMrhH.mjs → dist-N3JLy7yk.mjs} +1 -1
- package/dist/dist-NIAlh3KC.js +1 -0
- package/dist/dist-_LAgxsbh.mjs +117 -0
- package/dist/drawer.cjs +1 -1
- package/dist/drawer.d.ts +2 -65
- package/dist/drawer.mjs +28 -28
- package/dist/dropdown-menu-Bz5LlLjl.js +1 -0
- package/dist/dropdown-menu-Cp1qpOLk.mjs +288 -0
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.d.ts +2 -80
- package/dist/dropdown-menu.mjs +1 -1
- package/dist/es2015-Ca60p53M.js +41 -0
- package/dist/{es2015-a1b8kENC.mjs → es2015-DkZq_IIO.mjs} +218 -218
- package/dist/form.cjs +1 -1
- package/dist/form.d.ts +2 -53
- package/dist/form.mjs +48 -48
- package/dist/hover-card-BOk3-K0k.mjs +167 -0
- package/dist/hover-card-CyKIuXGH.js +1 -0
- package/dist/hover-card.cjs +1 -1
- package/dist/hover-card.d.ts +2 -19
- package/dist/hover-card.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -1360
- package/dist/index.mjs +30 -30
- package/dist/input.cjs +1 -1
- package/dist/input.d.ts +2 -9
- package/dist/input.mjs +8 -8
- package/dist/label-DGuuPl_e.mjs +22 -0
- package/dist/label-gVkdll-j.js +1 -0
- package/dist/label.cjs +1 -1
- package/dist/label.d.ts +2 -11
- package/dist/label.mjs +1 -1
- package/dist/menubar-DNrIQhY5.mjs +410 -0
- package/dist/menubar-DkjAo6qJ.js +1 -0
- package/dist/menubar.cjs +1 -1
- package/dist/menubar.d.ts +2 -79
- package/dist/menubar.mjs +1 -1
- package/dist/navigation-menu-1cmCEi0j.mjs +602 -0
- package/dist/navigation-menu-qPt8hpr5.js +1 -0
- package/dist/navigation-menu.cjs +1 -1
- package/dist/navigation-menu.d.ts +2 -47
- package/dist/navigation-menu.mjs +1 -1
- package/dist/packages/ui-web/src/accordion.d.ts +10 -0
- package/dist/packages/ui-web/src/accordion.d.ts.map +1 -0
- package/dist/packages/ui-web/src/accordion.test.d.ts +2 -0
- package/dist/packages/ui-web/src/accordion.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/alert-dialog.d.ts +23 -0
- package/dist/packages/ui-web/src/alert-dialog.d.ts.map +1 -0
- package/dist/packages/ui-web/src/alert-dialog.test.d.ts +2 -0
- package/dist/packages/ui-web/src/alert-dialog.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/alert.d.ts +11 -0
- package/dist/packages/ui-web/src/alert.d.ts.map +1 -0
- package/dist/packages/ui-web/src/alert.test.d.ts +2 -0
- package/dist/packages/ui-web/src/alert.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/aspect-ratio.d.ts +6 -0
- package/dist/packages/ui-web/src/aspect-ratio.d.ts.map +1 -0
- package/dist/packages/ui-web/src/aspect-ratio.test.d.ts +2 -0
- package/dist/packages/ui-web/src/aspect-ratio.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/avatar.d.ts +9 -0
- package/dist/packages/ui-web/src/avatar.d.ts.map +1 -0
- package/dist/packages/ui-web/src/avatar.test.d.ts +2 -0
- package/dist/packages/ui-web/src/avatar.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/badge.d.ts +11 -0
- package/dist/packages/ui-web/src/badge.d.ts.map +1 -0
- package/dist/packages/ui-web/src/badge.test.d.ts +2 -0
- package/dist/packages/ui-web/src/badge.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/breadcrumb.d.ts +20 -0
- package/dist/packages/ui-web/src/breadcrumb.d.ts.map +1 -0
- package/dist/packages/ui-web/src/button.d.ts +13 -0
- package/dist/packages/ui-web/src/button.d.ts.map +1 -0
- package/dist/packages/ui-web/src/button.test.d.ts +2 -0
- package/dist/packages/ui-web/src/button.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/calendar.d.ts +11 -0
- package/dist/packages/ui-web/src/calendar.d.ts.map +1 -0
- package/dist/packages/ui-web/src/calendar.test.d.ts +2 -0
- package/dist/packages/ui-web/src/calendar.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/card.d.ts +12 -0
- package/dist/packages/ui-web/src/card.d.ts.map +1 -0
- package/dist/packages/ui-web/src/card.test.d.ts +2 -0
- package/dist/packages/ui-web/src/card.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/carousel.d.ts +24 -0
- package/dist/packages/ui-web/src/carousel.d.ts.map +1 -0
- package/dist/packages/ui-web/src/carousel.test.d.ts +2 -0
- package/dist/packages/ui-web/src/carousel.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/chart.d.ts +17 -0
- package/dist/packages/ui-web/src/chart.d.ts.map +1 -0
- package/dist/packages/ui-web/src/chart.test.d.ts +2 -0
- package/dist/packages/ui-web/src/chart.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/checkbox.d.ts +8 -0
- package/dist/packages/ui-web/src/checkbox.d.ts.map +1 -0
- package/dist/packages/ui-web/src/checkbox.test.d.ts +2 -0
- package/dist/packages/ui-web/src/checkbox.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/collapsible.d.ts +8 -0
- package/dist/packages/ui-web/src/collapsible.d.ts.map +1 -0
- package/dist/packages/ui-web/src/collapsible.test.d.ts +2 -0
- package/dist/packages/ui-web/src/collapsible.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/command.d.ts +83 -0
- package/dist/packages/ui-web/src/command.d.ts.map +1 -0
- package/dist/packages/ui-web/src/command.test.d.ts +2 -0
- package/dist/packages/ui-web/src/command.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/context-menu.d.ts +24 -0
- package/dist/packages/ui-web/src/context-menu.d.ts.map +1 -0
- package/dist/packages/ui-web/src/context-menu.test.d.ts +2 -0
- package/dist/packages/ui-web/src/context-menu.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/dialog.d.ts +20 -0
- package/dist/packages/ui-web/src/dialog.d.ts.map +1 -0
- package/dist/packages/ui-web/src/dialog.test.d.ts +2 -0
- package/dist/packages/ui-web/src/dialog.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/drawer.d.ts +25 -0
- package/dist/packages/ui-web/src/drawer.d.ts.map +1 -0
- package/dist/packages/ui-web/src/drawer.test.d.ts +2 -0
- package/dist/packages/ui-web/src/drawer.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/dropdown-menu.d.ts +24 -0
- package/dist/packages/ui-web/src/dropdown-menu.d.ts.map +1 -0
- package/dist/packages/ui-web/src/dropdown-menu.test.d.ts +2 -0
- package/dist/packages/ui-web/src/dropdown-menu.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/form.d.ts +26 -0
- package/dist/packages/ui-web/src/form.d.ts.map +1 -0
- package/dist/packages/ui-web/src/form.test.d.ts +2 -0
- package/dist/packages/ui-web/src/form.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/hooks/use-theme.d.ts +52 -0
- package/dist/packages/ui-web/src/hooks/use-theme.d.ts.map +1 -0
- package/dist/packages/ui-web/src/hooks/use-toast.d.ts +45 -0
- package/dist/packages/ui-web/src/hooks/use-toast.d.ts.map +1 -0
- package/dist/packages/ui-web/src/hover-card.d.ts +9 -0
- package/dist/packages/ui-web/src/hover-card.d.ts.map +1 -0
- package/dist/packages/ui-web/src/hover-card.test.d.ts +2 -0
- package/dist/packages/ui-web/src/hover-card.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/index.d.ts +108 -0
- package/dist/packages/ui-web/src/index.d.ts.map +1 -0
- package/dist/packages/ui-web/src/input.d.ts +7 -0
- package/dist/packages/ui-web/src/input.d.ts.map +1 -0
- package/dist/packages/ui-web/src/input.test.d.ts +2 -0
- package/dist/packages/ui-web/src/input.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/label.d.ts +8 -0
- package/dist/packages/ui-web/src/label.d.ts.map +1 -0
- package/dist/packages/ui-web/src/label.test.d.ts +2 -0
- package/dist/packages/ui-web/src/label.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/lib/utils.d.ts +4 -0
- package/dist/packages/ui-web/src/lib/utils.d.ts.map +1 -0
- package/dist/packages/ui-web/src/menubar.d.ts +25 -0
- package/dist/packages/ui-web/src/menubar.d.ts.map +1 -0
- package/dist/packages/ui-web/src/menubar.test.d.ts +2 -0
- package/dist/packages/ui-web/src/menubar.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/navigation-menu.d.ts +15 -0
- package/dist/packages/ui-web/src/navigation-menu.d.ts.map +1 -0
- package/dist/packages/ui-web/src/navigation-menu.test.d.ts +2 -0
- package/dist/packages/ui-web/src/navigation-menu.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/pagination.d.ts +31 -0
- package/dist/packages/ui-web/src/pagination.d.ts.map +1 -0
- package/dist/packages/ui-web/src/pagination.test.d.ts +2 -0
- package/dist/packages/ui-web/src/pagination.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/popover.d.ts +10 -0
- package/dist/packages/ui-web/src/popover.d.ts.map +1 -0
- package/dist/packages/ui-web/src/popover.test.d.ts +2 -0
- package/dist/packages/ui-web/src/popover.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/progress.d.ts +7 -0
- package/dist/packages/ui-web/src/progress.d.ts.map +1 -0
- package/dist/packages/ui-web/src/progress.test.d.ts +2 -0
- package/dist/packages/ui-web/src/progress.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/radio-group.d.ts +11 -0
- package/dist/packages/ui-web/src/radio-group.d.ts.map +1 -0
- package/dist/packages/ui-web/src/radio-group.test.d.ts +2 -0
- package/dist/packages/ui-web/src/radio-group.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/resizable.d.ts +9 -0
- package/dist/packages/ui-web/src/resizable.d.ts.map +1 -0
- package/dist/packages/ui-web/src/resizable.test.d.ts +2 -0
- package/dist/packages/ui-web/src/resizable.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/scroll-area.d.ts +8 -0
- package/dist/packages/ui-web/src/scroll-area.d.ts.map +1 -0
- package/dist/packages/ui-web/src/scroll-area.test.d.ts +2 -0
- package/dist/packages/ui-web/src/scroll-area.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/scroll-to-top.d.ts +8 -0
- package/dist/packages/ui-web/src/scroll-to-top.d.ts.map +1 -0
- package/dist/packages/ui-web/src/scroll-to-top.test.d.ts +2 -0
- package/dist/packages/ui-web/src/scroll-to-top.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/search.d.ts +8 -0
- package/dist/packages/ui-web/src/search.d.ts.map +1 -0
- package/dist/packages/ui-web/src/search.test.d.ts +2 -0
- package/dist/packages/ui-web/src/search.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/select.d.ts +16 -0
- package/dist/packages/ui-web/src/select.d.ts.map +1 -0
- package/dist/packages/ui-web/src/select.test.d.ts +2 -0
- package/dist/packages/ui-web/src/select.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/separator.d.ts +7 -0
- package/dist/packages/ui-web/src/separator.d.ts.map +1 -0
- package/dist/packages/ui-web/src/separator.test.d.ts +2 -0
- package/dist/packages/ui-web/src/separator.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/setupTests.d.ts +1 -0
- package/dist/packages/ui-web/src/setupTests.d.ts.map +1 -0
- package/dist/packages/ui-web/src/sheet.d.ts +28 -0
- package/dist/packages/ui-web/src/sheet.d.ts.map +1 -0
- package/dist/packages/ui-web/src/sheet.test.d.ts +2 -0
- package/dist/packages/ui-web/src/sheet.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/skeleton.d.ts +6 -0
- package/dist/packages/ui-web/src/skeleton.d.ts.map +1 -0
- package/dist/packages/ui-web/src/skeleton.test.d.ts +2 -0
- package/dist/packages/ui-web/src/skeleton.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/slider.d.ts +7 -0
- package/dist/packages/ui-web/src/slider.d.ts.map +1 -0
- package/dist/packages/ui-web/src/slider.test.d.ts +2 -0
- package/dist/packages/ui-web/src/slider.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/sonner.d.ts +8 -0
- package/dist/packages/ui-web/src/sonner.d.ts.map +1 -0
- package/dist/packages/ui-web/src/sonner.test.d.ts +2 -0
- package/dist/packages/ui-web/src/sonner.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/support-fab.d.ts +16 -0
- package/dist/packages/ui-web/src/support-fab.d.ts.map +1 -0
- package/dist/packages/ui-web/src/support-fab.test.d.ts +2 -0
- package/dist/packages/ui-web/src/support-fab.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/switch.d.ts +7 -0
- package/dist/packages/ui-web/src/switch.d.ts.map +1 -0
- package/dist/packages/ui-web/src/switch.test.d.ts +2 -0
- package/dist/packages/ui-web/src/switch.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/table-of-contents.d.ts +24 -0
- package/dist/packages/ui-web/src/table-of-contents.d.ts.map +1 -0
- package/dist/packages/ui-web/src/table-of-contents.test.d.ts +2 -0
- package/dist/packages/ui-web/src/table-of-contents.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/table.d.ts +13 -0
- package/dist/packages/ui-web/src/table.d.ts.map +1 -0
- package/dist/packages/ui-web/src/table.test.d.ts +2 -0
- package/dist/packages/ui-web/src/table.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/tabs.d.ts +10 -0
- package/dist/packages/ui-web/src/tabs.d.ts.map +1 -0
- package/dist/packages/ui-web/src/tabs.test.d.ts +2 -0
- package/dist/packages/ui-web/src/tabs.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/text.d.ts +12 -0
- package/dist/packages/ui-web/src/text.d.ts.map +1 -0
- package/dist/packages/ui-web/src/text.test.d.ts +2 -0
- package/dist/packages/ui-web/src/text.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/textarea.d.ts +7 -0
- package/dist/packages/ui-web/src/textarea.d.ts.map +1 -0
- package/dist/packages/ui-web/src/textarea.test.d.ts +2 -0
- package/dist/packages/ui-web/src/textarea.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/theme-provider.d.ts +5 -0
- package/dist/packages/ui-web/src/theme-provider.d.ts.map +1 -0
- package/dist/packages/ui-web/src/theme-toggle.d.ts +4 -0
- package/dist/packages/ui-web/src/theme-toggle.d.ts.map +1 -0
- package/dist/packages/ui-web/src/theme-toggle.test.d.ts +2 -0
- package/dist/packages/ui-web/src/theme-toggle.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/toast.d.ts +16 -0
- package/dist/packages/ui-web/src/toast.d.ts.map +1 -0
- package/dist/packages/ui-web/src/toast.test.d.ts +2 -0
- package/dist/packages/ui-web/src/toast.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/toaster.d.ts +3 -0
- package/dist/packages/ui-web/src/toaster.d.ts.map +1 -0
- package/dist/packages/ui-web/src/toggle-group.d.ts +13 -0
- package/dist/packages/ui-web/src/toggle-group.d.ts.map +1 -0
- package/dist/packages/ui-web/src/toggle-group.test.d.ts +2 -0
- package/dist/packages/ui-web/src/toggle-group.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/toggle.d.ts +9 -0
- package/dist/packages/ui-web/src/toggle.d.ts.map +1 -0
- package/dist/packages/ui-web/src/toggle.test.d.ts +2 -0
- package/dist/packages/ui-web/src/toggle.test.d.ts.map +1 -0
- package/dist/packages/ui-web/src/tooltip.d.ts +13 -0
- package/dist/packages/ui-web/src/tooltip.d.ts.map +1 -0
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.d.ts +2 -68
- package/dist/pagination.mjs +29 -29
- package/dist/popover-CbM1tqdC.mjs +201 -0
- package/dist/popover-DGTgqdKX.js +1 -0
- package/dist/popover.cjs +1 -1
- package/dist/popover.d.ts +2 -24
- package/dist/popover.mjs +1 -1
- package/dist/progress-30ehxjKg.mjs +81 -0
- package/dist/progress-BqWHea4f.js +6 -0
- package/dist/progress.cjs +1 -1
- package/dist/progress.d.ts +2 -9
- package/dist/progress.mjs +1 -1
- package/dist/radio-group-BGThTiQM.mjs +193 -0
- package/dist/radio-group-ClFpAswm.js +1 -0
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.d.ts +2 -16
- package/dist/radio-group.mjs +1 -1
- package/dist/resizable-D09wr7tV.js +1 -0
- package/dist/{resizable-ChdgCzzx.mjs → resizable-DhOcAmNX.mjs} +275 -276
- package/dist/resizable.cjs +1 -1
- package/dist/resizable.d.ts +2 -22
- package/dist/resizable.mjs +1 -1
- package/dist/{scroll-area-3o0-cc3n.mjs → scroll-area-DJcPs0_v.mjs} +168 -169
- package/dist/scroll-area-W_aOLOdE.js +1 -0
- package/dist/scroll-area.cjs +1 -1
- package/dist/scroll-area.d.ts +2 -14
- package/dist/scroll-area.mjs +1 -1
- package/dist/scroll-to-top.cjs +1 -1
- package/dist/scroll-to-top.d.ts +2 -12
- package/dist/scroll-to-top.mjs +49 -49
- package/dist/search.cjs +1 -1
- package/dist/search.d.ts +2 -15
- package/dist/search.mjs +25 -26
- package/dist/select-BQtkQBiD.js +1 -0
- package/dist/select-D4bxRFq5.mjs +744 -0
- package/dist/select.cjs +1 -1
- package/dist/select.d.ts +2 -54
- package/dist/select.mjs +1 -1
- package/dist/separator-BmkhoDge.js +1 -0
- package/dist/separator-DZACUutC.mjs +31 -0
- package/dist/separator.cjs +1 -1
- package/dist/separator.d.ts +2 -9
- package/dist/separator.mjs +1 -1
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.d.ts +2 -68
- package/dist/sheet.mjs +27 -27
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.d.ts +2 -9
- package/dist/skeleton.mjs +6 -7
- package/dist/slider-Bkluwc3b.js +1 -0
- package/dist/slider-DTdrUy_s.mjs +366 -0
- package/dist/slider.cjs +1 -1
- package/dist/slider.d.ts +2 -9
- package/dist/slider.mjs +1 -1
- package/dist/sonner.cjs +1 -1
- package/dist/sonner.d.ts +2 -10
- package/dist/sonner.mjs +5 -5
- package/dist/support-fab.cjs +1 -1
- package/dist/support-fab.d.ts +2 -20
- package/dist/support-fab.mjs +46 -46
- package/dist/switch-DENAxyga.js +1 -0
- package/dist/switch-DbsdyQVg.mjs +103 -0
- package/dist/switch.cjs +1 -1
- package/dist/switch.d.ts +2 -9
- package/dist/switch.mjs +1 -1
- package/dist/table-of-contents.cjs +1 -1
- package/dist/table-of-contents.d.ts +2 -35
- package/dist/table-of-contents.mjs +82 -82
- package/dist/table.cjs +1 -1
- package/dist/table.d.ts +2 -43
- package/dist/table.mjs +37 -37
- package/dist/tabs-C9sMowgZ.mjs +136 -0
- package/dist/tabs-DeK-zpy4.js +1 -0
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.d.ts +2 -24
- package/dist/tabs.mjs +1 -1
- package/dist/text.cjs +1 -1
- package/dist/text.d.ts +2 -17
- package/dist/text.mjs +11 -11
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.d.ts +2 -9
- package/dist/textarea.mjs +8 -8
- package/dist/theme-provider.cjs +1 -1
- package/dist/theme-provider.d.ts +2 -9
- package/dist/theme-provider.mjs +5 -6
- package/dist/theme-toggle-DAHBgdy0.mjs +64 -0
- package/dist/theme-toggle-Dtze9fyN.js +1 -0
- package/dist/theme-toggle.cjs +1 -1
- package/dist/theme-toggle.d.ts +2 -8
- package/dist/theme-toggle.mjs +1 -1
- package/dist/toast-BtXY2QTe.js +1 -0
- package/dist/toast-G9LdgDDE.mjs +427 -0
- package/dist/toast.cjs +1 -1
- package/dist/toast.d.ts +2 -26
- package/dist/toast.mjs +1 -1
- package/dist/toaster-CKD4CKAZ.js +1 -0
- package/dist/toaster-WQJjavlc.mjs +125 -0
- package/dist/toaster.cjs +1 -1
- package/dist/toaster.d.ts +2 -6
- package/dist/toaster.mjs +1 -1
- package/dist/toggle-group-B0H9TwdD.mjs +155 -0
- package/dist/toggle-group-CAyztsIl.js +1 -0
- package/dist/toggle-group.cjs +1 -1
- package/dist/toggle-group.d.ts +2 -18
- package/dist/toggle-group.mjs +1 -1
- package/dist/toggle.cjs +1 -1
- package/dist/toggle.d.ts +2 -14
- package/dist/toggle.mjs +10 -10
- package/dist/{tooltip-oKfTBTbv.mjs → tooltip-BHEcM7lO.mjs} +71 -71
- package/dist/tooltip-CKcMl7tK.js +1 -0
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.d.ts +2 -25
- package/dist/tooltip.mjs +1 -1
- package/dist/utils-ChMUqofy.js +1 -0
- package/package.json +1 -1
- package/dist/accordion-Be1vGv6M.js +0 -1
- package/dist/accordion-DXnU0LgU.mjs +0 -221
- package/dist/alert-dialog-BXRY0Ghq.js +0 -7
- package/dist/alert-dialog-fcZ-sL7h.mjs +0 -164
- package/dist/aspect-ratio-BP5HarYZ.js +0 -1
- package/dist/avatar-klFl8Sqa.js +0 -1
- package/dist/calendar-aIuSXzs7.js +0 -1
- package/dist/carousel-BjTSkVh9.js +0 -1
- package/dist/checkbox-Bwq7mXA2.mjs +0 -170
- package/dist/checkbox-DzEO1q4R.js +0 -1
- package/dist/command-D7hksKY6.js +0 -1
- package/dist/command-Ws_iF1hM.mjs +0 -531
- package/dist/context-menu-DJbgNJ7N.js +0 -1
- package/dist/context-menu-fu39gePi.mjs +0 -292
- package/dist/dist-0FXx-pUX.js +0 -1
- package/dist/dist-4A0ut6a8.mjs +0 -10
- package/dist/dist-B4N_7Tps.js +0 -1
- package/dist/dist-B5776DvK.js +0 -5
- package/dist/dist-B57mzJP3.mjs +0 -28
- package/dist/dist-B5VmV2K7.js +0 -1
- package/dist/dist-BBRD-Qfb.js +0 -1
- package/dist/dist-BUS_s_6N.js +0 -1
- package/dist/dist-BVKPqhkg.js +0 -1
- package/dist/dist-Ba7mQG9D.mjs +0 -117
- package/dist/dist-BeFCyPgD.js +0 -1
- package/dist/dist-Bf4P28CV.js +0 -1
- package/dist/dist-BfFVoFJN.js +0 -1
- package/dist/dist-BhtQH_6Z.js +0 -1
- package/dist/dist-BrCTkQXt.mjs +0 -62
- package/dist/dist-C2ArLRnq.js +0 -1
- package/dist/dist-C2pRTcV_.mjs +0 -62
- package/dist/dist-CIRItnqs.js +0 -1
- package/dist/dist-CL1DhkaL.js +0 -1
- package/dist/dist-CRe7xawr.js +0 -1
- package/dist/dist-CUFjt0cI.js +0 -1
- package/dist/dist-CaaGWewc.mjs +0 -557
- package/dist/dist-Ci2whnVp.js +0 -1
- package/dist/dist-CmBtqW5f.js +0 -1
- package/dist/dist-CsEsK2jW.js +0 -1
- package/dist/dist-CscAxhT8.js +0 -1
- package/dist/dist-CvtF5JdF.mjs +0 -95
- package/dist/dist-Cvwtowos.mjs +0 -77
- package/dist/dist-D2f83VMO.mjs +0 -73
- package/dist/dist-DmmUjo_P.js +0 -1
- package/dist/dist-Jtk3jeb9.mjs +0 -18
- package/dist/dist-Kqk0oQYU.js +0 -1
- package/dist/dist-_Osar3kp.js +0 -1
- package/dist/dist-cRjbOZRf.js +0 -1
- package/dist/dist-r36zVVcK.js +0 -1
- package/dist/dist-sRlXdzvf.mjs +0 -152
- package/dist/dropdown-menu-BGkQXJ-r.mjs +0 -288
- package/dist/dropdown-menu-uGMnmGL-.js +0 -1
- package/dist/es2015-Cx0gpR1a.js +0 -41
- package/dist/hover-card-DdIYJP-Q.mjs +0 -167
- package/dist/hover-card-Ua-2KlY-.js +0 -1
- package/dist/jsx-runtime-CN3qjQQx.js +0 -6
- package/dist/jsx-runtime-CW53Uo-e.mjs +0 -189
- package/dist/label-8YSUv4kt.js +0 -1
- package/dist/label-Bur66PVg.mjs +0 -22
- package/dist/menubar-Bq1Sfbf5.js +0 -1
- package/dist/menubar-D2fY6zkQ.mjs +0 -410
- package/dist/navigation-menu-BuOakbgA.mjs +0 -602
- package/dist/navigation-menu-so6EvLAY.js +0 -1
- package/dist/popover-BUADXRkO.mjs +0 -201
- package/dist/popover-nBrSPqHk.js +0 -1
- package/dist/progress-BTApMbqg.js +0 -6
- package/dist/progress-BbN-RNvs.mjs +0 -81
- package/dist/radio-group-C5oprOrt.mjs +0 -193
- package/dist/radio-group-FDXr6VLM.js +0 -1
- package/dist/resizable-ztiFzq_y.js +0 -1
- package/dist/scroll-area-DXZqIKXN.js +0 -1
- package/dist/select-B2qM503G.mjs +0 -744
- package/dist/select-BHCeW-MD.js +0 -1
- package/dist/separator-BZJ-SDvg.js +0 -1
- package/dist/separator-DJ_IwKUQ.mjs +0 -31
- package/dist/slider-CJJPQ0fH.mjs +0 -366
- package/dist/slider-DHccqrW2.js +0 -1
- package/dist/switch-BbcAUYjl.mjs +0 -103
- package/dist/switch-DZfRzgWs.js +0 -1
- package/dist/tabs-BEy0IIV0.js +0 -1
- package/dist/tabs-DqAKyl9T.mjs +0 -136
- package/dist/theme-toggle-DKQmD-FO.js +0 -1
- package/dist/theme-toggle-dQbFWNI8.mjs +0 -65
- package/dist/toast-C84Cpidq.js +0 -1
- package/dist/toast-CQbUslcw.mjs +0 -427
- package/dist/toaster-BpcpNRz1.js +0 -1
- package/dist/toaster-i6giQYiq.mjs +0 -126
- package/dist/toggle-group-B2S7fkhA.mjs +0 -155
- package/dist/toggle-group-BNn6MNiJ.js +0 -1
- package/dist/tooltip-CElrNodA.js +0 -1
- package/dist/utils-BxDanjP7.js +0 -1
- /package/dist/{dist-BmjFh8i_.mjs → dist-C9PlF532.mjs} +0 -0
- /package/dist/{dist-ALQAoSGx.mjs → dist-CCokLFyA.mjs} +0 -0
- /package/dist/{dist-BC_VB6JL.mjs → dist-DAe-fOIM.mjs} +0 -0
- /package/dist/{dist-BKFtvTm8.mjs → dist-DGzGsPqo.mjs} +0 -0
- /package/dist/{dist-Dh_jWJh-.mjs → dist-xgVOvcNx.mjs} +0 -0
- /package/dist/{utils-yc5uc46c.mjs → utils-A_oVsYw5.mjs} +0 -0
package/dist/tabs-DqAKyl9T.mjs
DELETED
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./jsx-runtime-CW53Uo-e.mjs";
|
|
2
|
-
import { t } from "./utils-yc5uc46c.mjs";
|
|
3
|
-
import { n } from "./dist-Cvwtowos.mjs";
|
|
4
|
-
import { r, t as i } from "./dist-bDoR0CBU.mjs";
|
|
5
|
-
import { t as a } from "./dist-VI9bl_Wk.mjs";
|
|
6
|
-
import { t as o } from "./dist-d_pecHgw.mjs";
|
|
7
|
-
import { t as s } from "./dist-DikyKBU3.mjs";
|
|
8
|
-
import { t as c } from "./dist-4A0ut6a8.mjs";
|
|
9
|
-
import { n as l, r as u, t as d } from "./dist-sRlXdzvf.mjs";
|
|
10
|
-
import * as f from "react";
|
|
11
|
-
//#region ../../node_modules/.bun/@radix-ui+react-tabs@1.1.13+2d3f272c3a65784a/node_modules/@radix-ui/react-tabs/dist/index.mjs
|
|
12
|
-
var p = e(), m = "Tabs", [h, g] = n(m, [u]), _ = u(), [v, y] = h(m), b = f.forwardRef((e, t) => {
|
|
13
|
-
let { __scopeTabs: n, value: r, onValueChange: o, defaultValue: l, orientation: u = "horizontal", dir: d, activationMode: f = "automatic", ...h } = e, g = c(d), [_, y] = a({
|
|
14
|
-
prop: r,
|
|
15
|
-
onChange: o,
|
|
16
|
-
defaultProp: l ?? "",
|
|
17
|
-
caller: m
|
|
18
|
-
});
|
|
19
|
-
return /* @__PURE__ */ (0, p.jsx)(v, {
|
|
20
|
-
scope: n,
|
|
21
|
-
baseId: s(),
|
|
22
|
-
value: _,
|
|
23
|
-
onValueChange: y,
|
|
24
|
-
orientation: u,
|
|
25
|
-
dir: g,
|
|
26
|
-
activationMode: f,
|
|
27
|
-
children: /* @__PURE__ */ (0, p.jsx)(i.div, {
|
|
28
|
-
dir: g,
|
|
29
|
-
"data-orientation": u,
|
|
30
|
-
...h,
|
|
31
|
-
ref: t
|
|
32
|
-
})
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
|
-
b.displayName = m;
|
|
36
|
-
var x = "TabsList", S = f.forwardRef((e, t) => {
|
|
37
|
-
let { __scopeTabs: n, loop: r = !0, ...a } = e, o = y(x, n), s = _(n);
|
|
38
|
-
return /* @__PURE__ */ (0, p.jsx)(l, {
|
|
39
|
-
asChild: !0,
|
|
40
|
-
...s,
|
|
41
|
-
orientation: o.orientation,
|
|
42
|
-
dir: o.dir,
|
|
43
|
-
loop: r,
|
|
44
|
-
children: /* @__PURE__ */ (0, p.jsx)(i.div, {
|
|
45
|
-
role: "tablist",
|
|
46
|
-
"aria-orientation": o.orientation,
|
|
47
|
-
...a,
|
|
48
|
-
ref: t
|
|
49
|
-
})
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
S.displayName = x;
|
|
53
|
-
var C = "TabsTrigger", w = f.forwardRef((e, t) => {
|
|
54
|
-
let { __scopeTabs: n, value: a, disabled: o = !1, ...s } = e, c = y(C, n), l = _(n), u = D(c.baseId, a), f = O(c.baseId, a), m = a === c.value;
|
|
55
|
-
return /* @__PURE__ */ (0, p.jsx)(d, {
|
|
56
|
-
asChild: !0,
|
|
57
|
-
...l,
|
|
58
|
-
focusable: !o,
|
|
59
|
-
active: m,
|
|
60
|
-
children: /* @__PURE__ */ (0, p.jsx)(i.button, {
|
|
61
|
-
type: "button",
|
|
62
|
-
role: "tab",
|
|
63
|
-
"aria-selected": m,
|
|
64
|
-
"aria-controls": f,
|
|
65
|
-
"data-state": m ? "active" : "inactive",
|
|
66
|
-
"data-disabled": o ? "" : void 0,
|
|
67
|
-
disabled: o,
|
|
68
|
-
id: u,
|
|
69
|
-
...s,
|
|
70
|
-
ref: t,
|
|
71
|
-
onMouseDown: r(e.onMouseDown, (e) => {
|
|
72
|
-
!o && e.button === 0 && e.ctrlKey === !1 ? c.onValueChange(a) : e.preventDefault();
|
|
73
|
-
}),
|
|
74
|
-
onKeyDown: r(e.onKeyDown, (e) => {
|
|
75
|
-
[" ", "Enter"].includes(e.key) && c.onValueChange(a);
|
|
76
|
-
}),
|
|
77
|
-
onFocus: r(e.onFocus, () => {
|
|
78
|
-
let e = c.activationMode !== "manual";
|
|
79
|
-
!m && !o && e && c.onValueChange(a);
|
|
80
|
-
})
|
|
81
|
-
})
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
w.displayName = C;
|
|
85
|
-
var T = "TabsContent", E = f.forwardRef((e, t) => {
|
|
86
|
-
let { __scopeTabs: n, value: r, forceMount: a, children: s, ...c } = e, l = y(T, n), u = D(l.baseId, r), d = O(l.baseId, r), m = r === l.value, h = f.useRef(m);
|
|
87
|
-
return f.useEffect(() => {
|
|
88
|
-
let e = requestAnimationFrame(() => h.current = !1);
|
|
89
|
-
return () => cancelAnimationFrame(e);
|
|
90
|
-
}, []), /* @__PURE__ */ (0, p.jsx)(o, {
|
|
91
|
-
present: a || m,
|
|
92
|
-
children: ({ present: n }) => /* @__PURE__ */ (0, p.jsx)(i.div, {
|
|
93
|
-
"data-state": m ? "active" : "inactive",
|
|
94
|
-
"data-orientation": l.orientation,
|
|
95
|
-
role: "tabpanel",
|
|
96
|
-
"aria-labelledby": u,
|
|
97
|
-
hidden: !n,
|
|
98
|
-
id: d,
|
|
99
|
-
tabIndex: 0,
|
|
100
|
-
...c,
|
|
101
|
-
ref: t,
|
|
102
|
-
style: {
|
|
103
|
-
...e.style,
|
|
104
|
-
animationDuration: h.current ? "0s" : void 0
|
|
105
|
-
},
|
|
106
|
-
children: n && s
|
|
107
|
-
})
|
|
108
|
-
});
|
|
109
|
-
});
|
|
110
|
-
E.displayName = T;
|
|
111
|
-
function D(e, t) {
|
|
112
|
-
return `${e}-trigger-${t}`;
|
|
113
|
-
}
|
|
114
|
-
function O(e, t) {
|
|
115
|
-
return `${e}-content-${t}`;
|
|
116
|
-
}
|
|
117
|
-
var k = b, A = S, j = w, M = E, N = k, P = f.forwardRef(({ className: e, ...n }, r) => /* @__PURE__ */ (0, p.jsx)(A, {
|
|
118
|
-
ref: r,
|
|
119
|
-
className: t("bg-muted text-muted-foreground inline-flex h-9 items-center justify-center rounded-lg p-1", e),
|
|
120
|
-
...n
|
|
121
|
-
}));
|
|
122
|
-
P.displayName = A?.displayName || "TabsList";
|
|
123
|
-
var F = f.forwardRef(({ className: e, ...n }, r) => /* @__PURE__ */ (0, p.jsx)(j, {
|
|
124
|
-
ref: r,
|
|
125
|
-
className: t("ring-offset-background focus-visible:ring-ring data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center rounded-md px-3 py-1 text-sm font-medium whitespace-nowrap transition-all focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow", e),
|
|
126
|
-
...n
|
|
127
|
-
}));
|
|
128
|
-
F.displayName = j?.displayName || "TabsTrigger";
|
|
129
|
-
var I = f.forwardRef(({ className: e, ...n }, r) => /* @__PURE__ */ (0, p.jsx)(M, {
|
|
130
|
-
ref: r,
|
|
131
|
-
className: t("ring-offset-background focus-visible:ring-ring mt-2 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none", e),
|
|
132
|
-
...n
|
|
133
|
-
}));
|
|
134
|
-
I.displayName = M?.displayName || "TabsContent";
|
|
135
|
-
//#endregion
|
|
136
|
-
export { F as i, I as n, P as r, N as t };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require(`./jsx-runtime-CN3qjQQx.js`),t=require(`./utils-BxDanjP7.js`),n=require(`./button.cjs`),r=require(`./dropdown-menu-uGMnmGL-.js`);let i=require(`lucide-react`),a=require(`next-themes`),o=require(`@gv-tech/design-tokens`);function s(){let e=(0,a.useTheme)(),{resolvedTheme:t}=e,n=t===`dark`?o.theme.dark:o.theme.light;return{...e,tokens:n}}var c=e.t();function l({variant:e=`binary`,onThemeChange:a,customTheme:o,className:l}){let{theme:u,setTheme:d,resolvedTheme:f}=s(),p=o??u,m=(o||f)===`dark`,h=p===`system`,g=e=>{a?a(e):d(e)},_=()=>(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(i.Sun,{className:t.t(`h-[1.2rem] w-[1.2rem] transition-all`,!h&&!m?`scale-100 rotate-0`:`scale-0 -rotate-90`)}),(0,c.jsx)(i.Moon,{className:t.t(`absolute h-[1.2rem] w-[1.2rem] transition-all`,!h&&m?`scale-100 rotate-0`:`scale-0 rotate-90`)}),(0,c.jsx)(i.SunMoon,{className:t.t(`absolute h-[1.2rem] w-[1.2rem] transition-all`,h?`scale-100 rotate-0`:`scale-0 rotate-90`)}),(0,c.jsx)(`span`,{className:`sr-only`,children:`Toggle theme`})]});return e===`ternary`?(0,c.jsxs)(r.t,{children:[(0,c.jsx)(r.h,{asChild:!0,children:(0,c.jsx)(n.Button,{variant:`ghost`,size:`icon`,className:t.t(`relative h-9 w-9`,l),children:(0,c.jsx)(_,{})})}),(0,c.jsxs)(r.r,{align:`end`,children:[(0,c.jsxs)(r.a,{onClick:()=>g(`light`),children:[(0,c.jsx)(i.Sun,{className:`mr-2 h-4 w-4`}),(0,c.jsx)(`span`,{children:`Light`})]}),(0,c.jsxs)(r.a,{onClick:()=>g(`dark`),children:[(0,c.jsx)(i.Moon,{className:`mr-2 h-4 w-4`}),(0,c.jsx)(`span`,{children:`Dark`})]}),(0,c.jsxs)(r.a,{onClick:()=>g(`system`),children:[(0,c.jsx)(i.SunMoon,{className:`mr-2 h-4 w-4`}),(0,c.jsx)(`span`,{children:`System`})]})]})]}):(0,c.jsx)(n.Button,{variant:`ghost`,size:`icon`,className:t.t(`relative h-9 w-9`,l),onClick:()=>g(p===`dark`?`light`:`dark`),"aria-label":`Toggle theme`,children:(0,c.jsx)(_,{})})}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return l}});
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./jsx-runtime-CW53Uo-e.mjs";
|
|
2
|
-
import { t } from "./utils-yc5uc46c.mjs";
|
|
3
|
-
import { Button as n } from "./button.mjs";
|
|
4
|
-
import { a as r, h as i, r as a, t as o } from "./dropdown-menu-BGkQXJ-r.mjs";
|
|
5
|
-
import { Moon as s, Sun as c, SunMoon as l } from "lucide-react";
|
|
6
|
-
import { useTheme as u } from "next-themes";
|
|
7
|
-
import { theme as d } from "@gv-tech/design-tokens";
|
|
8
|
-
//#region src/hooks/use-theme.ts
|
|
9
|
-
function f() {
|
|
10
|
-
let e = u(), { resolvedTheme: t } = e, n = t === "dark" ? d.dark : d.light;
|
|
11
|
-
return {
|
|
12
|
-
...e,
|
|
13
|
-
tokens: n
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
//#endregion
|
|
17
|
-
//#region src/theme-toggle.tsx
|
|
18
|
-
var p = e();
|
|
19
|
-
function m({ variant: e = "binary", onThemeChange: u, customTheme: d, className: m }) {
|
|
20
|
-
let { theme: h, setTheme: g, resolvedTheme: _ } = f(), v = d ?? h, y = (d || _) === "dark", b = v === "system", x = (e) => {
|
|
21
|
-
u ? u(e) : g(e);
|
|
22
|
-
}, S = () => /* @__PURE__ */ (0, p.jsxs)(p.Fragment, { children: [
|
|
23
|
-
/* @__PURE__ */ (0, p.jsx)(c, { className: t("h-[1.2rem] w-[1.2rem] transition-all", !b && !y ? "scale-100 rotate-0" : "scale-0 -rotate-90") }),
|
|
24
|
-
/* @__PURE__ */ (0, p.jsx)(s, { className: t("absolute h-[1.2rem] w-[1.2rem] transition-all", !b && y ? "scale-100 rotate-0" : "scale-0 rotate-90") }),
|
|
25
|
-
/* @__PURE__ */ (0, p.jsx)(l, { className: t("absolute h-[1.2rem] w-[1.2rem] transition-all", b ? "scale-100 rotate-0" : "scale-0 rotate-90") }),
|
|
26
|
-
/* @__PURE__ */ (0, p.jsx)("span", {
|
|
27
|
-
className: "sr-only",
|
|
28
|
-
children: "Toggle theme"
|
|
29
|
-
})
|
|
30
|
-
] });
|
|
31
|
-
return e === "ternary" ? /* @__PURE__ */ (0, p.jsxs)(o, { children: [/* @__PURE__ */ (0, p.jsx)(i, {
|
|
32
|
-
asChild: !0,
|
|
33
|
-
children: /* @__PURE__ */ (0, p.jsx)(n, {
|
|
34
|
-
variant: "ghost",
|
|
35
|
-
size: "icon",
|
|
36
|
-
className: t("relative h-9 w-9", m),
|
|
37
|
-
children: /* @__PURE__ */ (0, p.jsx)(S, {})
|
|
38
|
-
})
|
|
39
|
-
}), /* @__PURE__ */ (0, p.jsxs)(a, {
|
|
40
|
-
align: "end",
|
|
41
|
-
children: [
|
|
42
|
-
/* @__PURE__ */ (0, p.jsxs)(r, {
|
|
43
|
-
onClick: () => x("light"),
|
|
44
|
-
children: [/* @__PURE__ */ (0, p.jsx)(c, { className: "mr-2 h-4 w-4" }), /* @__PURE__ */ (0, p.jsx)("span", { children: "Light" })]
|
|
45
|
-
}),
|
|
46
|
-
/* @__PURE__ */ (0, p.jsxs)(r, {
|
|
47
|
-
onClick: () => x("dark"),
|
|
48
|
-
children: [/* @__PURE__ */ (0, p.jsx)(s, { className: "mr-2 h-4 w-4" }), /* @__PURE__ */ (0, p.jsx)("span", { children: "Dark" })]
|
|
49
|
-
}),
|
|
50
|
-
/* @__PURE__ */ (0, p.jsxs)(r, {
|
|
51
|
-
onClick: () => x("system"),
|
|
52
|
-
children: [/* @__PURE__ */ (0, p.jsx)(l, { className: "mr-2 h-4 w-4" }), /* @__PURE__ */ (0, p.jsx)("span", { children: "System" })]
|
|
53
|
-
})
|
|
54
|
-
]
|
|
55
|
-
})] }) : /* @__PURE__ */ (0, p.jsx)(n, {
|
|
56
|
-
variant: "ghost",
|
|
57
|
-
size: "icon",
|
|
58
|
-
className: t("relative h-9 w-9", m),
|
|
59
|
-
onClick: () => x(v === "dark" ? "light" : "dark"),
|
|
60
|
-
"aria-label": "Toggle theme",
|
|
61
|
-
children: /* @__PURE__ */ (0, p.jsx)(S, {})
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
//#endregion
|
|
65
|
-
export { f as n, m as t };
|
package/dist/toast-C84Cpidq.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require(`./jsx-runtime-CN3qjQQx.js`),t=require(`./utils-BxDanjP7.js`),n=require(`./dist-Kqk0oQYU.js`),r=require(`./dist-CsEsK2jW.js`),i=require(`./dist-DmmUjo_P.js`),a=require(`./dist-Ci2whnVp.js`),o=require(`./dist-CscAxhT8.js`),s=require(`./dist-B5VmV2K7.js`),c=require(`./dist-_Osar3kp.js`),l=require(`./dist-cRjbOZRf.js`),u=require(`./dist-C2ArLRnq.js`),d=require(`./dist-CL1DhkaL.js`),f=require(`./dist-BfFVoFJN.js`);let p=require(`react`),m=e.i(p,1);p=e.i(p);let h=require(`react-dom`);h=e.i(h,1);let g=require(`lucide-react`),_=require(`class-variance-authority`);var v=e.t(),y=`ToastProvider`,[b,x,S]=a.t(`Toast`),[C,w]=n.n(`Toast`,[S]),[T,E]=C(y),D=e=>{let{__scopeToast:t,label:n=`Notification`,duration:r=5e3,swipeDirection:i=`right`,swipeThreshold:a=50,children:o}=e,[s,c]=m.useState(null),[l,u]=m.useState(0),d=m.useRef(!1),f=m.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${y}\`. Expected non-empty \`string\`.`),(0,v.jsx)(b.Provider,{scope:t,children:(0,v.jsx)(T,{scope:t,label:n,duration:r,swipeDirection:i,swipeThreshold:a,toastCount:l,viewport:s,onViewportChange:c,onToastAdd:m.useCallback(()=>u(e=>e+1),[]),onToastRemove:m.useCallback(()=>u(e=>e-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:o})})};D.displayName=y;var O=`ToastViewport`,k=[`F8`],A=`toast.viewportPause`,j=`toast.viewportResume`,M=m.forwardRef((e,t)=>{let{__scopeToast:n,hotkey:a=k,label:o=`Notifications ({hotkey})`,...s}=e,c=E(O,n),l=x(n),d=m.useRef(null),f=m.useRef(null),p=m.useRef(null),h=m.useRef(null),g=r.n(t,h,c.onViewportChange),_=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),y=c.toastCount>0;m.useEffect(()=>{let e=e=>{a.length!==0&&a.every(t=>e[t]||e.code===t)&&h.current?.focus()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),m.useEffect(()=>{let e=d.current,t=h.current;if(y&&e&&t){let n=()=>{if(!c.isClosePausedRef.current){let e=new CustomEvent(A);t.dispatchEvent(e),c.isClosePausedRef.current=!0}},r=()=>{if(c.isClosePausedRef.current){let e=new CustomEvent(j);t.dispatchEvent(e),c.isClosePausedRef.current=!1}},i=t=>{e.contains(t.relatedTarget)||r()},a=()=>{e.contains(document.activeElement)||r()};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,c.isClosePausedRef]);let S=m.useCallback(({tabbingDirection:e})=>{let t=l().map(t=>{let n=t.ref.current,r=[n,...ce(n)];return e===`forwards`?r:r.reverse()});return(e===`forwards`?t.reverse():t).flat()},[l]);return m.useEffect(()=>{let e=h.current;if(e){let t=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=S({tabbingDirection:r?`backwards`:`forwards`}),a=i.findIndex(e=>e===n);Z(i.slice(a+1))?t.preventDefault():r?f.current?.focus():p.current?.focus()}};return e.addEventListener(`keydown`,t),()=>e.removeEventListener(`keydown`,t)}},[l,S]),(0,v.jsxs)(u.t,{ref:d,role:`region`,"aria-label":o.replace(`{hotkey}`,_),tabIndex:-1,style:{pointerEvents:y?void 0:`none`},children:[y&&(0,v.jsx)(P,{ref:f,onFocusFromOutsideViewport:()=>{Z(S({tabbingDirection:`forwards`}))}}),(0,v.jsx)(b.Slot,{scope:n,children:(0,v.jsx)(i.t.ol,{tabIndex:-1,...s,ref:g})}),y&&(0,v.jsx)(P,{ref:p,onFocusFromOutsideViewport:()=>{Z(S({tabbingDirection:`backwards`}))}})]})});M.displayName=O;var N=`ToastFocusProxy`,P=m.forwardRef((e,t)=>{let{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=e,a=E(N,n);return(0,v.jsx)(f.r,{tabIndex:0,...i,ref:t,style:{position:`fixed`},onFocus:e=>{let t=e.relatedTarget;a.viewport?.contains(t)||r()}})});P.displayName=N;var F=`Toast`,ee=`toast.swipeStart`,te=`toast.swipeMove`,ne=`toast.swipeCancel`,re=`toast.swipeEnd`,I=m.forwardRef((e,t)=>{let{forceMount:n,open:r,defaultOpen:a,onOpenChange:o,...u}=e,[d,f]=s.t({prop:r,defaultProp:a??!0,onChange:o,caller:F});return(0,v.jsx)(c.t,{present:n||d,children:(0,v.jsx)(R,{open:d,...u,ref:t,onClose:()=>f(!1),onPause:l.t(e.onPause),onResume:l.t(e.onResume),onSwipeStart:i.r(e.onSwipeStart,e=>{e.currentTarget.setAttribute(`data-swipe`,`start`)}),onSwipeMove:i.r(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:i.r(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:i.r(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)})})})});I.displayName=F;var[ie,L]=C(F,{onClose(){}}),R=m.forwardRef((e,t)=>{let{__scopeToast:n,type:a=`foreground`,duration:o,open:s,onClose:c,onEscapeKeyDown:d,onPause:f,onResume:p,onSwipeStart:g,onSwipeMove:_,onSwipeCancel:y,onSwipeEnd:x,...S}=e,C=E(F,n),[w,T]=m.useState(null),D=r.n(t,e=>T(e)),O=m.useRef(null),k=m.useRef(null),M=o||C.duration,N=m.useRef(0),P=m.useRef(M),I=m.useRef(0),{onToastAdd:L,onToastRemove:R}=C,z=l.t(()=>{w?.contains(document.activeElement)&&C.viewport?.focus(),c()}),B=m.useCallback(e=>{!e||e===1/0||(window.clearTimeout(I.current),N.current=new Date().getTime(),I.current=window.setTimeout(z,e))},[z]);m.useEffect(()=>{let e=C.viewport;if(e){let t=()=>{B(P.current),p?.()},n=()=>{let e=new Date().getTime()-N.current;P.current-=e,window.clearTimeout(I.current),f?.()};return e.addEventListener(A,n),e.addEventListener(j,t),()=>{e.removeEventListener(A,n),e.removeEventListener(j,t)}}},[C.viewport,M,f,p,B]),m.useEffect(()=>{s&&!C.isClosePausedRef.current&&B(M)},[s,M,C.isClosePausedRef,B]),m.useEffect(()=>(L(),()=>R()),[L,R]);let V=m.useMemo(()=>w?J(w):null,[w]);return C.viewport?(0,v.jsxs)(v.Fragment,{children:[V&&(0,v.jsx)(ae,{__scopeToast:n,role:`status`,"aria-live":a===`foreground`?`assertive`:`polite`,children:V}),(0,v.jsx)(ie,{scope:n,onClose:z,children:h.createPortal((0,v.jsx)(b.ItemSlot,{scope:n,children:(0,v.jsx)(u.r,{asChild:!0,onEscapeKeyDown:i.r(d,()=>{C.isFocusedToastEscapeKeyDownRef.current||z(),C.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,v.jsx)(i.t.li,{tabIndex:0,"data-state":s?`open`:`closed`,"data-swipe-direction":C.swipeDirection,...S,ref:D,style:{userSelect:`none`,touchAction:`none`,...e.style},onKeyDown:i.r(e.onKeyDown,e=>{e.key===`Escape`&&(d?.(e.nativeEvent),e.nativeEvent.defaultPrevented||(C.isFocusedToastEscapeKeyDownRef.current=!0,z()))}),onPointerDown:i.r(e.onPointerDown,e=>{e.button===0&&(O.current={x:e.clientX,y:e.clientY})}),onPointerMove:i.r(e.onPointerMove,e=>{if(!O.current)return;let t=e.clientX-O.current.x,n=e.clientY-O.current.y,r=!!k.current,i=[`left`,`right`].includes(C.swipeDirection),a=[`left`,`up`].includes(C.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?(k.current=l,Y(te,_,u,{discrete:!1})):X(l,C.swipeDirection,c)?(k.current=l,Y(ee,g,u,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>c||Math.abs(n)>c)&&(O.current=null)}),onPointerUp:i.r(e.onPointerUp,e=>{let t=k.current,n=e.target;if(n.hasPointerCapture(e.pointerId)&&n.releasePointerCapture(e.pointerId),k.current=null,O.current=null,t){let n=e.currentTarget,r={originalEvent:e,delta:t};X(t,C.swipeDirection,C.swipeThreshold)?Y(re,x,r,{discrete:!0}):Y(ne,y,r,{discrete:!0}),n.addEventListener(`click`,e=>e.preventDefault(),{once:!0})}})})})}),C.viewport)})]}):null}),ae=e=>{let{__scopeToast:t,children:n,...r}=e,i=E(F,t),[a,o]=m.useState(!1),[s,c]=m.useState(!1);return oe(()=>o(!0)),m.useEffect(()=>{let e=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(e)},[]),s?null:(0,v.jsx)(d.t,{asChild:!0,children:(0,v.jsx)(f.r,{...r,children:a&&(0,v.jsxs)(v.Fragment,{children:[i.label,` `,n]})})})},z=`ToastTitle`,B=m.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e;return(0,v.jsx)(i.t.div,{...r,ref:t})});B.displayName=z;var V=`ToastDescription`,H=m.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e;return(0,v.jsx)(i.t.div,{...r,ref:t})});H.displayName=V;var U=`ToastAction`,W=m.forwardRef((e,t)=>{let{altText:n,...r}=e;return n.trim()?(0,v.jsx)(q,{altText:n,asChild:!0,children:(0,v.jsx)(K,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${U}\`. Expected non-empty \`string\`.`),null)});W.displayName=U;var G=`ToastClose`,K=m.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e,a=L(G,n);return(0,v.jsx)(q,{asChild:!0,children:(0,v.jsx)(i.t.button,{type:`button`,...r,ref:t,onClick:i.r(e.onClick,a.onClose)})})});K.displayName=G;var q=m.forwardRef((e,t)=>{let{__scopeToast:n,altText:r,...a}=e;return(0,v.jsx)(i.t.div,{"data-radix-toast-announce-exclude":``,"data-radix-toast-announce-alt":r||void 0,...a,ref:t})});function J(e){let t=[];return Array.from(e.childNodes).forEach(e=>{if(e.nodeType===e.TEXT_NODE&&e.textContent&&t.push(e.textContent),se(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(...J(e))}}),t}function Y(e,t,n,{discrete:r}){let a=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?i.n(a,o):a.dispatchEvent(o)}var X=(e,t,n=0)=>{let r=Math.abs(e.x),i=Math.abs(e.y),a=r>i;return t===`left`||t===`right`?a&&r>n:!a&&i>n};function oe(e=()=>{}){let t=l.t(e);o.t(()=>{let e=0,n=0;return e=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(n)}},[t])}function se(e){return e.nodeType===e.ELEMENT_NODE}function ce(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode: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}});for(;n.nextNode();)t.push(n.currentNode);return t}function Z(e){let t=document.activeElement;return e.some(e=>e===t?!0:(e.focus(),document.activeElement!==t))}var le=D,Q=M,$=I,ue=B,de=H,fe=W,pe=K,me=le,he=p.forwardRef(({className:e,...n},r)=>(0,v.jsx)(Q,{ref:r,className:t.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),...n}));he.displayName=Q?.displayName||`ToastViewport`;var ge=(0,_.cva)(`group 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 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`,{variants:{variant:{default:`border bg-background text-foreground`,destructive:`destructive group border-destructive bg-destructive text-destructive-foreground`}},defaultVariants:{variant:`default`}}),_e=p.forwardRef(({className:e,variant:n,...r},i)=>(0,v.jsx)($,{ref:i,className:t.t(ge({variant:n}),e),...r}));_e.displayName=$?.displayName||`Toast`;var ve=p.forwardRef(({className:e,...n},r)=>(0,v.jsx)(fe,{ref:r,className:t.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),...n}));ve.displayName=fe?.displayName||`ToastAction`;var ye=p.forwardRef(({className:e,...n},r)=>(0,v.jsx)(pe,{ref:r,className:t.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":``,...n,children:(0,v.jsx)(g.X,{className:`h-4 w-4`})}));ye.displayName=pe?.displayName||`ToastClose`;var be=p.forwardRef(({className:e,...n},r)=>(0,v.jsx)(ue,{ref:r,className:t.t(`text-sm font-semibold [&+div]:text-xs`,e),...n}));be.displayName=ue?.displayName||`ToastTitle`;var xe=p.forwardRef(({className:e,...n},r)=>(0,v.jsx)(de,{ref:r,className:t.t(`text-sm opacity-90`,e),...n}));xe.displayName=de?.displayName||`ToastDescription`,Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return me}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return xe}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return ve}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return be}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return ye}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return he}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return _e}});
|
package/dist/toast-CQbUslcw.mjs
DELETED
|
@@ -1,427 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./jsx-runtime-CW53Uo-e.mjs";
|
|
2
|
-
import { t } from "./utils-yc5uc46c.mjs";
|
|
3
|
-
import { n } from "./dist-Cvwtowos.mjs";
|
|
4
|
-
import { n as r } from "./dist-BC_VB6JL.mjs";
|
|
5
|
-
import { n as i, r as a, t as o } from "./dist-bDoR0CBU.mjs";
|
|
6
|
-
import { t as s } from "./dist-BrCTkQXt.mjs";
|
|
7
|
-
import { t as c } from "./dist-BmjFh8i_.mjs";
|
|
8
|
-
import { t as l } from "./dist-VI9bl_Wk.mjs";
|
|
9
|
-
import { t as u } from "./dist-d_pecHgw.mjs";
|
|
10
|
-
import { t as d } from "./dist-ALQAoSGx.mjs";
|
|
11
|
-
import { r as f, t as p } from "./dist-Ba7mQG9D.mjs";
|
|
12
|
-
import { t as m } from "./dist-Jtk3jeb9.mjs";
|
|
13
|
-
import { r as h } from "./dist-C9wnUiS4.mjs";
|
|
14
|
-
import * as g from "react";
|
|
15
|
-
import * as ee from "react-dom";
|
|
16
|
-
import { X as _ } from "lucide-react";
|
|
17
|
-
import { cva as v } from "class-variance-authority";
|
|
18
|
-
//#region ../../node_modules/.bun/@radix-ui+react-toast@1.2.15+2d3f272c3a65784a/node_modules/@radix-ui/react-toast/dist/index.mjs
|
|
19
|
-
var y = e(), b = "ToastProvider", [x, S, C] = s("Toast"), [w, te] = n("Toast", [C]), [T, E] = w(b), D = (e) => {
|
|
20
|
-
let { __scopeToast: t, label: n = "Notification", duration: r = 5e3, swipeDirection: i = "right", swipeThreshold: a = 50, children: o } = e, [s, c] = g.useState(null), [l, u] = g.useState(0), d = g.useRef(!1), f = g.useRef(!1);
|
|
21
|
-
return n.trim() || console.error(`Invalid prop \`label\` supplied to \`${b}\`. Expected non-empty \`string\`.`), /* @__PURE__ */ (0, y.jsx)(x.Provider, {
|
|
22
|
-
scope: t,
|
|
23
|
-
children: /* @__PURE__ */ (0, y.jsx)(T, {
|
|
24
|
-
scope: t,
|
|
25
|
-
label: n,
|
|
26
|
-
duration: r,
|
|
27
|
-
swipeDirection: i,
|
|
28
|
-
swipeThreshold: a,
|
|
29
|
-
toastCount: l,
|
|
30
|
-
viewport: s,
|
|
31
|
-
onViewportChange: c,
|
|
32
|
-
onToastAdd: g.useCallback(() => u((e) => e + 1), []),
|
|
33
|
-
onToastRemove: g.useCallback(() => u((e) => e - 1), []),
|
|
34
|
-
isFocusedToastEscapeKeyDownRef: d,
|
|
35
|
-
isClosePausedRef: f,
|
|
36
|
-
children: o
|
|
37
|
-
})
|
|
38
|
-
});
|
|
39
|
-
};
|
|
40
|
-
D.displayName = b;
|
|
41
|
-
var O = "ToastViewport", k = ["F8"], A = "toast.viewportPause", j = "toast.viewportResume", M = g.forwardRef((e, t) => {
|
|
42
|
-
let { __scopeToast: n, hotkey: i = k, label: a = "Notifications ({hotkey})", ...s } = e, c = E(O, n), l = S(n), u = g.useRef(null), d = g.useRef(null), f = g.useRef(null), m = g.useRef(null), h = r(t, m, c.onViewportChange), ee = i.join("+").replace(/Key/g, "").replace(/Digit/g, ""), _ = c.toastCount > 0;
|
|
43
|
-
g.useEffect(() => {
|
|
44
|
-
let e = (e) => {
|
|
45
|
-
i.length !== 0 && i.every((t) => e[t] || e.code === t) && m.current?.focus();
|
|
46
|
-
};
|
|
47
|
-
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
48
|
-
}, [i]), g.useEffect(() => {
|
|
49
|
-
let e = u.current, t = m.current;
|
|
50
|
-
if (_ && e && t) {
|
|
51
|
-
let n = () => {
|
|
52
|
-
if (!c.isClosePausedRef.current) {
|
|
53
|
-
let e = new CustomEvent(A);
|
|
54
|
-
t.dispatchEvent(e), c.isClosePausedRef.current = !0;
|
|
55
|
-
}
|
|
56
|
-
}, r = () => {
|
|
57
|
-
if (c.isClosePausedRef.current) {
|
|
58
|
-
let e = new CustomEvent(j);
|
|
59
|
-
t.dispatchEvent(e), c.isClosePausedRef.current = !1;
|
|
60
|
-
}
|
|
61
|
-
}, i = (t) => {
|
|
62
|
-
e.contains(t.relatedTarget) || r();
|
|
63
|
-
}, a = () => {
|
|
64
|
-
e.contains(document.activeElement) || r();
|
|
65
|
-
};
|
|
66
|
-
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), () => {
|
|
67
|
-
e.removeEventListener("focusin", n), e.removeEventListener("focusout", i), e.removeEventListener("pointermove", n), e.removeEventListener("pointerleave", a), window.removeEventListener("blur", n), window.removeEventListener("focus", r);
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
}, [_, c.isClosePausedRef]);
|
|
71
|
-
let v = g.useCallback(({ tabbingDirection: e }) => {
|
|
72
|
-
let t = l().map((t) => {
|
|
73
|
-
let n = t.ref.current, r = [n, ...fe(n)];
|
|
74
|
-
return e === "forwards" ? r : r.reverse();
|
|
75
|
-
});
|
|
76
|
-
return (e === "forwards" ? t.reverse() : t).flat();
|
|
77
|
-
}, [l]);
|
|
78
|
-
return g.useEffect(() => {
|
|
79
|
-
let e = m.current;
|
|
80
|
-
if (e) {
|
|
81
|
-
let t = (t) => {
|
|
82
|
-
let n = t.altKey || t.ctrlKey || t.metaKey;
|
|
83
|
-
if (t.key === "Tab" && !n) {
|
|
84
|
-
let n = document.activeElement, r = t.shiftKey;
|
|
85
|
-
if (t.target === e && r) {
|
|
86
|
-
d.current?.focus();
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
let i = v({ tabbingDirection: r ? "backwards" : "forwards" }), a = i.findIndex((e) => e === n);
|
|
90
|
-
Y(i.slice(a + 1)) ? t.preventDefault() : r ? d.current?.focus() : f.current?.focus();
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
return e.addEventListener("keydown", t), () => e.removeEventListener("keydown", t);
|
|
94
|
-
}
|
|
95
|
-
}, [l, v]), /* @__PURE__ */ (0, y.jsxs)(p, {
|
|
96
|
-
ref: u,
|
|
97
|
-
role: "region",
|
|
98
|
-
"aria-label": a.replace("{hotkey}", ee),
|
|
99
|
-
tabIndex: -1,
|
|
100
|
-
style: { pointerEvents: _ ? void 0 : "none" },
|
|
101
|
-
children: [
|
|
102
|
-
_ && /* @__PURE__ */ (0, y.jsx)(P, {
|
|
103
|
-
ref: d,
|
|
104
|
-
onFocusFromOutsideViewport: () => {
|
|
105
|
-
Y(v({ tabbingDirection: "forwards" }));
|
|
106
|
-
}
|
|
107
|
-
}),
|
|
108
|
-
/* @__PURE__ */ (0, y.jsx)(x.Slot, {
|
|
109
|
-
scope: n,
|
|
110
|
-
children: /* @__PURE__ */ (0, y.jsx)(o.ol, {
|
|
111
|
-
tabIndex: -1,
|
|
112
|
-
...s,
|
|
113
|
-
ref: h
|
|
114
|
-
})
|
|
115
|
-
}),
|
|
116
|
-
_ && /* @__PURE__ */ (0, y.jsx)(P, {
|
|
117
|
-
ref: f,
|
|
118
|
-
onFocusFromOutsideViewport: () => {
|
|
119
|
-
Y(v({ tabbingDirection: "backwards" }));
|
|
120
|
-
}
|
|
121
|
-
})
|
|
122
|
-
]
|
|
123
|
-
});
|
|
124
|
-
});
|
|
125
|
-
M.displayName = O;
|
|
126
|
-
var N = "ToastFocusProxy", P = g.forwardRef((e, t) => {
|
|
127
|
-
let { __scopeToast: n, onFocusFromOutsideViewport: r, ...i } = e, a = E(N, n);
|
|
128
|
-
return /* @__PURE__ */ (0, y.jsx)(h, {
|
|
129
|
-
tabIndex: 0,
|
|
130
|
-
...i,
|
|
131
|
-
ref: t,
|
|
132
|
-
style: { position: "fixed" },
|
|
133
|
-
onFocus: (e) => {
|
|
134
|
-
let t = e.relatedTarget;
|
|
135
|
-
a.viewport?.contains(t) || r();
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
|
-
});
|
|
139
|
-
P.displayName = N;
|
|
140
|
-
var F = "Toast", ne = "toast.swipeStart", re = "toast.swipeMove", ie = "toast.swipeCancel", ae = "toast.swipeEnd", I = g.forwardRef((e, t) => {
|
|
141
|
-
let { forceMount: n, open: r, defaultOpen: i, onOpenChange: o, ...s } = e, [c, f] = l({
|
|
142
|
-
prop: r,
|
|
143
|
-
defaultProp: i ?? !0,
|
|
144
|
-
onChange: o,
|
|
145
|
-
caller: F
|
|
146
|
-
});
|
|
147
|
-
return /* @__PURE__ */ (0, y.jsx)(u, {
|
|
148
|
-
present: n || c,
|
|
149
|
-
children: /* @__PURE__ */ (0, y.jsx)(R, {
|
|
150
|
-
open: c,
|
|
151
|
-
...s,
|
|
152
|
-
ref: t,
|
|
153
|
-
onClose: () => f(!1),
|
|
154
|
-
onPause: d(e.onPause),
|
|
155
|
-
onResume: d(e.onResume),
|
|
156
|
-
onSwipeStart: a(e.onSwipeStart, (e) => {
|
|
157
|
-
e.currentTarget.setAttribute("data-swipe", "start");
|
|
158
|
-
}),
|
|
159
|
-
onSwipeMove: a(e.onSwipeMove, (e) => {
|
|
160
|
-
let { x: t, y: n } = e.detail.delta;
|
|
161
|
-
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`);
|
|
162
|
-
}),
|
|
163
|
-
onSwipeCancel: a(e.onSwipeCancel, (e) => {
|
|
164
|
-
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");
|
|
165
|
-
}),
|
|
166
|
-
onSwipeEnd: a(e.onSwipeEnd, (e) => {
|
|
167
|
-
let { x: t, y: n } = e.detail.delta;
|
|
168
|
-
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);
|
|
169
|
-
})
|
|
170
|
-
})
|
|
171
|
-
});
|
|
172
|
-
});
|
|
173
|
-
I.displayName = F;
|
|
174
|
-
var [oe, L] = w(F, { onClose() {} }), R = g.forwardRef((e, t) => {
|
|
175
|
-
let { __scopeToast: n, type: i = "foreground", duration: s, open: c, onClose: l, onEscapeKeyDown: u, onPause: p, onResume: m, onSwipeStart: h, onSwipeMove: _, onSwipeCancel: v, onSwipeEnd: b, ...S } = e, C = E(F, n), [w, te] = g.useState(null), T = r(t, (e) => te(e)), D = g.useRef(null), O = g.useRef(null), k = s || C.duration, M = g.useRef(0), N = g.useRef(k), P = g.useRef(0), { onToastAdd: I, onToastRemove: L } = C, R = d(() => {
|
|
176
|
-
w?.contains(document.activeElement) && C.viewport?.focus(), l();
|
|
177
|
-
}), z = g.useCallback((e) => {
|
|
178
|
-
!e || e === Infinity || (window.clearTimeout(P.current), M.current = (/* @__PURE__ */ new Date()).getTime(), P.current = window.setTimeout(R, e));
|
|
179
|
-
}, [R]);
|
|
180
|
-
g.useEffect(() => {
|
|
181
|
-
let e = C.viewport;
|
|
182
|
-
if (e) {
|
|
183
|
-
let t = () => {
|
|
184
|
-
z(N.current), m?.();
|
|
185
|
-
}, n = () => {
|
|
186
|
-
let e = (/* @__PURE__ */ new Date()).getTime() - M.current;
|
|
187
|
-
N.current -= e, window.clearTimeout(P.current), p?.();
|
|
188
|
-
};
|
|
189
|
-
return e.addEventListener(A, n), e.addEventListener(j, t), () => {
|
|
190
|
-
e.removeEventListener(A, n), e.removeEventListener(j, t);
|
|
191
|
-
};
|
|
192
|
-
}
|
|
193
|
-
}, [
|
|
194
|
-
C.viewport,
|
|
195
|
-
k,
|
|
196
|
-
p,
|
|
197
|
-
m,
|
|
198
|
-
z
|
|
199
|
-
]), g.useEffect(() => {
|
|
200
|
-
c && !C.isClosePausedRef.current && z(k);
|
|
201
|
-
}, [
|
|
202
|
-
c,
|
|
203
|
-
k,
|
|
204
|
-
C.isClosePausedRef,
|
|
205
|
-
z
|
|
206
|
-
]), g.useEffect(() => (I(), () => L()), [I, L]);
|
|
207
|
-
let B = g.useMemo(() => w ? K(w) : null, [w]);
|
|
208
|
-
return C.viewport ? /* @__PURE__ */ (0, y.jsxs)(y.Fragment, { children: [B && /* @__PURE__ */ (0, y.jsx)(se, {
|
|
209
|
-
__scopeToast: n,
|
|
210
|
-
role: "status",
|
|
211
|
-
"aria-live": i === "foreground" ? "assertive" : "polite",
|
|
212
|
-
children: B
|
|
213
|
-
}), /* @__PURE__ */ (0, y.jsx)(oe, {
|
|
214
|
-
scope: n,
|
|
215
|
-
onClose: R,
|
|
216
|
-
children: ee.createPortal(/* @__PURE__ */ (0, y.jsx)(x.ItemSlot, {
|
|
217
|
-
scope: n,
|
|
218
|
-
children: /* @__PURE__ */ (0, y.jsx)(f, {
|
|
219
|
-
asChild: !0,
|
|
220
|
-
onEscapeKeyDown: a(u, () => {
|
|
221
|
-
C.isFocusedToastEscapeKeyDownRef.current || R(), C.isFocusedToastEscapeKeyDownRef.current = !1;
|
|
222
|
-
}),
|
|
223
|
-
children: /* @__PURE__ */ (0, y.jsx)(o.li, {
|
|
224
|
-
tabIndex: 0,
|
|
225
|
-
"data-state": c ? "open" : "closed",
|
|
226
|
-
"data-swipe-direction": C.swipeDirection,
|
|
227
|
-
...S,
|
|
228
|
-
ref: T,
|
|
229
|
-
style: {
|
|
230
|
-
userSelect: "none",
|
|
231
|
-
touchAction: "none",
|
|
232
|
-
...e.style
|
|
233
|
-
},
|
|
234
|
-
onKeyDown: a(e.onKeyDown, (e) => {
|
|
235
|
-
e.key === "Escape" && (u?.(e.nativeEvent), e.nativeEvent.defaultPrevented || (C.isFocusedToastEscapeKeyDownRef.current = !0, R()));
|
|
236
|
-
}),
|
|
237
|
-
onPointerDown: a(e.onPointerDown, (e) => {
|
|
238
|
-
e.button === 0 && (D.current = {
|
|
239
|
-
x: e.clientX,
|
|
240
|
-
y: e.clientY
|
|
241
|
-
});
|
|
242
|
-
}),
|
|
243
|
-
onPointerMove: a(e.onPointerMove, (e) => {
|
|
244
|
-
if (!D.current) return;
|
|
245
|
-
let t = e.clientX - D.current.x, n = e.clientY - D.current.y, r = !!O.current, i = ["left", "right"].includes(C.swipeDirection), a = ["left", "up"].includes(C.swipeDirection) ? Math.min : Math.max, o = i ? a(0, t) : 0, s = i ? 0 : a(0, n), c = e.pointerType === "touch" ? 10 : 2, l = {
|
|
246
|
-
x: o,
|
|
247
|
-
y: s
|
|
248
|
-
}, u = {
|
|
249
|
-
originalEvent: e,
|
|
250
|
-
delta: l
|
|
251
|
-
};
|
|
252
|
-
r ? (O.current = l, q(re, _, u, { discrete: !1 })) : J(l, C.swipeDirection, c) ? (O.current = l, q(ne, h, u, { discrete: !1 }), e.target.setPointerCapture(e.pointerId)) : (Math.abs(t) > c || Math.abs(n) > c) && (D.current = null);
|
|
253
|
-
}),
|
|
254
|
-
onPointerUp: a(e.onPointerUp, (e) => {
|
|
255
|
-
let t = O.current, n = e.target;
|
|
256
|
-
if (n.hasPointerCapture(e.pointerId) && n.releasePointerCapture(e.pointerId), O.current = null, D.current = null, t) {
|
|
257
|
-
let n = e.currentTarget, r = {
|
|
258
|
-
originalEvent: e,
|
|
259
|
-
delta: t
|
|
260
|
-
};
|
|
261
|
-
J(t, C.swipeDirection, C.swipeThreshold) ? q(ae, b, r, { discrete: !0 }) : q(ie, v, r, { discrete: !0 }), n.addEventListener("click", (e) => e.preventDefault(), { once: !0 });
|
|
262
|
-
}
|
|
263
|
-
})
|
|
264
|
-
})
|
|
265
|
-
})
|
|
266
|
-
}), C.viewport)
|
|
267
|
-
})] }) : null;
|
|
268
|
-
}), se = (e) => {
|
|
269
|
-
let { __scopeToast: t, children: n, ...r } = e, i = E(F, t), [a, o] = g.useState(!1), [s, c] = g.useState(!1);
|
|
270
|
-
return ue(() => o(!0)), g.useEffect(() => {
|
|
271
|
-
let e = window.setTimeout(() => c(!0), 1e3);
|
|
272
|
-
return () => window.clearTimeout(e);
|
|
273
|
-
}, []), s ? null : /* @__PURE__ */ (0, y.jsx)(m, {
|
|
274
|
-
asChild: !0,
|
|
275
|
-
children: /* @__PURE__ */ (0, y.jsx)(h, {
|
|
276
|
-
...r,
|
|
277
|
-
children: a && /* @__PURE__ */ (0, y.jsxs)(y.Fragment, { children: [
|
|
278
|
-
i.label,
|
|
279
|
-
" ",
|
|
280
|
-
n
|
|
281
|
-
] })
|
|
282
|
-
})
|
|
283
|
-
});
|
|
284
|
-
}, z = "ToastTitle", B = g.forwardRef((e, t) => {
|
|
285
|
-
let { __scopeToast: n, ...r } = e;
|
|
286
|
-
return /* @__PURE__ */ (0, y.jsx)(o.div, {
|
|
287
|
-
...r,
|
|
288
|
-
ref: t
|
|
289
|
-
});
|
|
290
|
-
});
|
|
291
|
-
B.displayName = z;
|
|
292
|
-
var ce = "ToastDescription", V = g.forwardRef((e, t) => {
|
|
293
|
-
let { __scopeToast: n, ...r } = e;
|
|
294
|
-
return /* @__PURE__ */ (0, y.jsx)(o.div, {
|
|
295
|
-
...r,
|
|
296
|
-
ref: t
|
|
297
|
-
});
|
|
298
|
-
});
|
|
299
|
-
V.displayName = ce;
|
|
300
|
-
var le = "ToastAction", H = g.forwardRef((e, t) => {
|
|
301
|
-
let { altText: n, ...r } = e;
|
|
302
|
-
return n.trim() ? /* @__PURE__ */ (0, y.jsx)(G, {
|
|
303
|
-
altText: n,
|
|
304
|
-
asChild: !0,
|
|
305
|
-
children: /* @__PURE__ */ (0, y.jsx)(W, {
|
|
306
|
-
...r,
|
|
307
|
-
ref: t
|
|
308
|
-
})
|
|
309
|
-
}) : (console.error(`Invalid prop \`altText\` supplied to \`${le}\`. Expected non-empty \`string\`.`), null);
|
|
310
|
-
});
|
|
311
|
-
H.displayName = le;
|
|
312
|
-
var U = "ToastClose", W = g.forwardRef((e, t) => {
|
|
313
|
-
let { __scopeToast: n, ...r } = e, i = L(U, n);
|
|
314
|
-
return /* @__PURE__ */ (0, y.jsx)(G, {
|
|
315
|
-
asChild: !0,
|
|
316
|
-
children: /* @__PURE__ */ (0, y.jsx)(o.button, {
|
|
317
|
-
type: "button",
|
|
318
|
-
...r,
|
|
319
|
-
ref: t,
|
|
320
|
-
onClick: a(e.onClick, i.onClose)
|
|
321
|
-
})
|
|
322
|
-
});
|
|
323
|
-
});
|
|
324
|
-
W.displayName = U;
|
|
325
|
-
var G = g.forwardRef((e, t) => {
|
|
326
|
-
let { __scopeToast: n, altText: r, ...i } = e;
|
|
327
|
-
return /* @__PURE__ */ (0, y.jsx)(o.div, {
|
|
328
|
-
"data-radix-toast-announce-exclude": "",
|
|
329
|
-
"data-radix-toast-announce-alt": r || void 0,
|
|
330
|
-
...i,
|
|
331
|
-
ref: t
|
|
332
|
-
});
|
|
333
|
-
});
|
|
334
|
-
function K(e) {
|
|
335
|
-
let t = [];
|
|
336
|
-
return Array.from(e.childNodes).forEach((e) => {
|
|
337
|
-
if (e.nodeType === e.TEXT_NODE && e.textContent && t.push(e.textContent), de(e)) {
|
|
338
|
-
let n = e.ariaHidden || e.hidden || e.style.display === "none", r = e.dataset.radixToastAnnounceExclude === "";
|
|
339
|
-
if (!n) if (r) {
|
|
340
|
-
let n = e.dataset.radixToastAnnounceAlt;
|
|
341
|
-
n && t.push(n);
|
|
342
|
-
} else t.push(...K(e));
|
|
343
|
-
}
|
|
344
|
-
}), t;
|
|
345
|
-
}
|
|
346
|
-
function q(e, t, n, { discrete: r }) {
|
|
347
|
-
let a = n.originalEvent.currentTarget, o = new CustomEvent(e, {
|
|
348
|
-
bubbles: !0,
|
|
349
|
-
cancelable: !0,
|
|
350
|
-
detail: n
|
|
351
|
-
});
|
|
352
|
-
t && a.addEventListener(e, t, { once: !0 }), r ? i(a, o) : a.dispatchEvent(o);
|
|
353
|
-
}
|
|
354
|
-
var J = (e, t, n = 0) => {
|
|
355
|
-
let r = Math.abs(e.x), i = Math.abs(e.y), a = r > i;
|
|
356
|
-
return t === "left" || t === "right" ? a && r > n : !a && i > n;
|
|
357
|
-
};
|
|
358
|
-
function ue(e = () => {}) {
|
|
359
|
-
let t = d(e);
|
|
360
|
-
c(() => {
|
|
361
|
-
let e = 0, n = 0;
|
|
362
|
-
return e = window.requestAnimationFrame(() => n = window.requestAnimationFrame(t)), () => {
|
|
363
|
-
window.cancelAnimationFrame(e), window.cancelAnimationFrame(n);
|
|
364
|
-
};
|
|
365
|
-
}, [t]);
|
|
366
|
-
}
|
|
367
|
-
function de(e) {
|
|
368
|
-
return e.nodeType === e.ELEMENT_NODE;
|
|
369
|
-
}
|
|
370
|
-
function fe(e) {
|
|
371
|
-
let t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: (e) => {
|
|
372
|
-
let t = e.tagName === "INPUT" && e.type === "hidden";
|
|
373
|
-
return e.disabled || e.hidden || t ? NodeFilter.FILTER_SKIP : e.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
374
|
-
} });
|
|
375
|
-
for (; n.nextNode();) t.push(n.currentNode);
|
|
376
|
-
return t;
|
|
377
|
-
}
|
|
378
|
-
function Y(e) {
|
|
379
|
-
let t = document.activeElement;
|
|
380
|
-
return e.some((e) => e === t ? !0 : (e.focus(), document.activeElement !== t));
|
|
381
|
-
}
|
|
382
|
-
var pe = D, X = M, Z = I, Q = B, me = V, he = H, $ = W, ge = pe, _e = g.forwardRef(({ className: e, ...n }, r) => /* @__PURE__ */ (0, y.jsx)(X, {
|
|
383
|
-
ref: r,
|
|
384
|
-
className: 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),
|
|
385
|
-
...n
|
|
386
|
-
}));
|
|
387
|
-
_e.displayName = X?.displayName || "ToastViewport";
|
|
388
|
-
var ve = v("group 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 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", {
|
|
389
|
-
variants: { variant: {
|
|
390
|
-
default: "border bg-background text-foreground",
|
|
391
|
-
destructive: "destructive group border-destructive bg-destructive text-destructive-foreground"
|
|
392
|
-
} },
|
|
393
|
-
defaultVariants: { variant: "default" }
|
|
394
|
-
}), ye = g.forwardRef(({ className: e, variant: n, ...r }, i) => /* @__PURE__ */ (0, y.jsx)(Z, {
|
|
395
|
-
ref: i,
|
|
396
|
-
className: t(ve({ variant: n }), e),
|
|
397
|
-
...r
|
|
398
|
-
}));
|
|
399
|
-
ye.displayName = Z?.displayName || "Toast";
|
|
400
|
-
var be = g.forwardRef(({ className: e, ...n }, r) => /* @__PURE__ */ (0, y.jsx)(he, {
|
|
401
|
-
ref: r,
|
|
402
|
-
className: 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),
|
|
403
|
-
...n
|
|
404
|
-
}));
|
|
405
|
-
be.displayName = he?.displayName || "ToastAction";
|
|
406
|
-
var xe = g.forwardRef(({ className: e, ...n }, r) => /* @__PURE__ */ (0, y.jsx)($, {
|
|
407
|
-
ref: r,
|
|
408
|
-
className: 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),
|
|
409
|
-
"toast-close": "",
|
|
410
|
-
...n,
|
|
411
|
-
children: /* @__PURE__ */ (0, y.jsx)(_, { className: "h-4 w-4" })
|
|
412
|
-
}));
|
|
413
|
-
xe.displayName = $?.displayName || "ToastClose";
|
|
414
|
-
var Se = g.forwardRef(({ className: e, ...n }, r) => /* @__PURE__ */ (0, y.jsx)(Q, {
|
|
415
|
-
ref: r,
|
|
416
|
-
className: t("text-sm font-semibold [&+div]:text-xs", e),
|
|
417
|
-
...n
|
|
418
|
-
}));
|
|
419
|
-
Se.displayName = Q?.displayName || "ToastTitle";
|
|
420
|
-
var Ce = g.forwardRef(({ className: e, ...n }, r) => /* @__PURE__ */ (0, y.jsx)(me, {
|
|
421
|
-
ref: r,
|
|
422
|
-
className: t("text-sm opacity-90", e),
|
|
423
|
-
...n
|
|
424
|
-
}));
|
|
425
|
-
Ce.displayName = me?.displayName || "ToastDescription";
|
|
426
|
-
//#endregion
|
|
427
|
-
export { ge as a, Ce as i, be as n, Se as o, xe as r, _e as s, ye as t };
|
package/dist/toaster-BpcpNRz1.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require(`./jsx-runtime-CN3qjQQx.js`),t=require(`./toast-C84Cpidq.js`);let n=require(`react`);n=e.i(n);var r=1,i=1e6,a={ADD_TOAST:`ADD_TOAST`,UPDATE_TOAST:`UPDATE_TOAST`,DISMISS_TOAST:`DISMISS_TOAST`,REMOVE_TOAST:`REMOVE_TOAST`},o=0;function s(){return o=(o+1)%(2**53-1),o.toString()}var c=new Map,l=e=>{if(c.has(e))return;let t=setTimeout(()=>{c.delete(e),p({type:`REMOVE_TOAST`,toastId:e})},i);c.set(e,t)},u=(e,t)=>{switch(t.type){case a.ADD_TOAST:return{...e,toasts:[t.toast,...e.toasts].slice(0,r)};case a.UPDATE_TOAST:return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case a.DISMISS_TOAST:{let{toastId:n}=t;return n?l(n):e.toasts.forEach(e=>{l(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===n||n===void 0?{...e,open:!1}:e)}}case a.REMOVE_TOAST:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},d=[],f={toasts:[]};function p(e){f=u(f,e),d.forEach(e=>{e(f)})}function m({...e}){let t=s(),n=e=>p({type:`UPDATE_TOAST`,toast:{...e,id:t}}),r=()=>p({type:`DISMISS_TOAST`,toastId:t});return p({type:`ADD_TOAST`,toast:{...e,id:t,open:!0,onOpenChange:e=>{e||r()}}}),{id:t,dismiss:r,update:n}}function h(){let[e,t]=n.useState(f);return n.useEffect(()=>(d.push(t),()=>{let e=d.indexOf(t);e>-1&&d.splice(e,1)}),[e]),{...e,toast:m,dismiss:e=>p({type:`DISMISS_TOAST`,toastId:e})}}var g=e.t();function _({...e}){let{toasts:n}=h();return(0,g.jsxs)(t.a,{...e,children:[n.map(function({id:e,title:n,description:r,action:i,...a}){return(0,g.jsxs)(t.t,{...a,children:[(0,g.jsxs)(`div`,{className:`grid gap-1`,children:[n&&(0,g.jsx)(t.o,{children:n}),r&&(0,g.jsx)(t.i,{children:r})]}),i,(0,g.jsx)(t.r,{})]},e)}),(0,g.jsx)(t.s,{})]})}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return _}});
|