@gv-tech/ui-web 2.27.3 → 2.29.0
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/__contracts.d.ts +44 -1
- package/dist/__contracts.d.ts.map +1 -1
- package/dist/accordion-BgbjpZAF.js +1 -0
- package/dist/accordion-Bqt-y-u7.mjs +239 -0
- package/dist/accordion.cjs +1 -1
- package/dist/accordion.d.ts +4 -4
- package/dist/accordion.d.ts.map +1 -1
- package/dist/accordion.mjs +1 -1
- package/dist/alert-dialog-BkUyJb_F.mjs +182 -0
- package/dist/alert-dialog-DonbkCSD.js +1 -0
- package/dist/alert-dialog.cjs +1 -1
- package/dist/alert-dialog.d.ts +12 -12
- package/dist/alert-dialog.d.ts.map +1 -1
- package/dist/alert-dialog.mjs +1 -1
- package/dist/alert.cjs +1 -1
- package/dist/alert.d.ts +4 -4
- package/dist/alert.d.ts.map +1 -1
- package/dist/alert.mjs +2 -2
- package/dist/{aspect-ratio-DnChDaBi.mjs → aspect-ratio-C7oBX-p_.mjs} +10 -9
- package/dist/aspect-ratio-X3HWxQz0.js +1 -0
- package/dist/aspect-ratio.cjs +1 -1
- package/dist/aspect-ratio.d.ts +1 -1
- package/dist/aspect-ratio.d.ts.map +1 -1
- package/dist/aspect-ratio.mjs +1 -1
- package/dist/attachment.cjs +1 -0
- package/dist/attachment.d.ts +23 -0
- package/dist/attachment.d.ts.map +1 -0
- package/dist/attachment.mjs +101 -0
- package/dist/attachment.test.d.ts +2 -0
- package/dist/attachment.test.d.ts.map +1 -0
- package/dist/avatar-DTkhTxt7.mjs +133 -0
- package/dist/avatar-DhvZbCtI.js +1 -0
- package/dist/avatar.cjs +1 -1
- package/dist/avatar.d.ts +6 -6
- package/dist/avatar.d.ts.map +1 -1
- package/dist/avatar.mjs +1 -1
- package/dist/badge.cjs +1 -1
- package/dist/badge.d.ts +1 -1
- package/dist/badge.d.ts.map +1 -1
- package/dist/badge.mjs +1 -1
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.d.ts +7 -7
- package/dist/breadcrumb.d.ts.map +1 -1
- package/dist/breadcrumb.mjs +25 -25
- package/dist/bubble.cjs +1 -0
- package/dist/bubble.d.ts +13 -0
- package/dist/bubble.d.ts.map +1 -0
- package/dist/bubble.mjs +72 -0
- package/dist/bubble.test.d.ts +2 -0
- package/dist/bubble.test.d.ts.map +1 -0
- package/dist/button-group.cjs +1 -1
- package/dist/button-group.d.ts +3 -3
- package/dist/button-group.d.ts.map +1 -1
- package/dist/button-group.mjs +6 -6
- package/dist/button.cjs +1 -1
- package/dist/button.d.ts +1 -1
- package/dist/button.d.ts.map +1 -1
- package/dist/button.mjs +6 -6
- package/dist/calendar-Bo8kovKR.js +1 -0
- package/dist/{calendar-Dg6VGycy.mjs → calendar-CkHWa9Uu.mjs} +825 -803
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.d.ts +2 -2
- package/dist/calendar.d.ts.map +1 -1
- package/dist/calendar.mjs +1 -1
- package/dist/card.cjs +1 -1
- package/dist/card.d.ts +7 -7
- package/dist/card.d.ts.map +1 -1
- package/dist/card.mjs +5 -5
- package/dist/carousel-Cv5isLeg.js +1 -0
- package/dist/{carousel-DbDoNdqJ.mjs → carousel-ynaeMNIV.mjs} +53 -53
- package/dist/carousel.cjs +1 -1
- package/dist/carousel.d.ts +5 -5
- package/dist/carousel.d.ts.map +1 -1
- package/dist/carousel.mjs +1 -1
- package/dist/chart.cjs +1 -1
- package/dist/chart.d.ts +4 -4
- package/dist/chart.d.ts.map +1 -1
- package/dist/chart.mjs +1 -1
- package/dist/checkbox-BLvAEmRC.mjs +182 -0
- package/dist/checkbox-Dt06B4YW.js +1 -0
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.d.ts +1 -1
- package/dist/checkbox.d.ts.map +1 -1
- package/dist/checkbox.mjs +1 -1
- package/dist/chunk-HBS6WEDP-CQNaACTf.js +1 -0
- package/dist/chunk-HBS6WEDP-CzyhzCaP.mjs +63 -0
- package/dist/collapsible.cjs +1 -1
- package/dist/collapsible.d.ts +3 -3
- package/dist/collapsible.d.ts.map +1 -1
- package/dist/collapsible.mjs +1 -1
- package/dist/combobox-BB_YzCTY.js +4 -0
- package/dist/combobox-YxjYGUoe.mjs +5748 -0
- package/dist/combobox.cjs +1 -1
- package/dist/combobox.d.ts +14 -14
- package/dist/combobox.d.ts.map +1 -1
- package/dist/combobox.mjs +1 -1
- package/dist/command-BqO-CfH6.js +1 -0
- package/dist/command-DY6u8V0D.mjs +545 -0
- package/dist/command.cjs +1 -1
- package/dist/command.d.ts +9 -9
- package/dist/command.d.ts.map +1 -1
- package/dist/command.mjs +1 -1
- package/dist/context-menu-Dad9hs94.js +1 -0
- package/dist/context-menu-tL6CY6a0.mjs +318 -0
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.d.ts +15 -15
- package/dist/context-menu.d.ts.map +1 -1
- package/dist/context-menu.mjs +1 -1
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.d.ts +10 -10
- package/dist/dialog.d.ts.map +1 -1
- package/dist/dialog.mjs +25 -25
- package/dist/direction.cjs +1 -1
- package/dist/direction.d.ts +1 -1
- package/dist/direction.d.ts.map +1 -1
- package/dist/direction.mjs +1 -1
- package/dist/dist-5r7hQmO0.mjs +187 -0
- package/dist/dist-6c2NeKfz.mjs +536 -0
- package/dist/dist-8fYwoWd4.mjs +111 -0
- package/dist/{dist-N3JLy7yk.mjs → dist-9-j0_8D1.mjs} +9 -4
- package/dist/dist-BIXhHahX.mjs +30 -0
- package/dist/dist-BMl8xXCH.mjs +188 -0
- package/dist/dist-BOKg7rhq.js +1 -0
- package/dist/dist-BPhn-EOy.mjs +15 -0
- package/dist/{dist-Cacc4QIh.mjs → dist-BQhMregZ.mjs} +9 -5
- package/dist/dist-BTN2t9yv.js +1 -0
- package/dist/dist-BUXpRW9O.mjs +100 -0
- package/dist/{dist-xgVOvcNx.mjs → dist-Bivv8B6p.mjs} +8 -3
- package/dist/dist-BoNQb2nd.js +1 -0
- package/dist/dist-ByW6RHeZ.mjs +94 -0
- package/dist/dist-C83rnWRv.js +1 -0
- package/dist/dist-C8Pm6LRc.js +1 -0
- package/dist/dist-CBsYNwXz.mjs +16 -0
- package/dist/dist-CS572Be42.mjs +11 -0
- package/dist/dist-CYrqAnIr.mjs +182 -0
- package/dist/dist-C_iFkwIX.js +1 -0
- package/dist/dist-CdBAkUWT.js +1 -0
- package/dist/dist-Cn7g8jD0.js +1 -0
- package/dist/dist-D7-Fky36.js +1 -0
- package/dist/{dist-C9PlF532.mjs → dist-D7UHN1DJ.mjs} +1 -1
- package/dist/dist-DJqkhIXb2.js +1 -0
- package/dist/dist-DMwCTE2i.mjs +90 -0
- package/dist/dist-DOoZ3vGL.mjs +407 -0
- package/dist/dist-DYUvPCPC.js +1 -0
- package/dist/dist-DZiOPWLp.js +1 -0
- package/dist/dist-DcRkoHAk.js +1 -0
- package/dist/dist-DfvK7DpO.mjs +213 -0
- package/dist/dist-Dg9ASyqI.mjs +96 -0
- package/dist/dist-Dj9s8AIv.js +1 -0
- package/dist/dist-Dm3IQk5b.mjs +685 -0
- package/dist/dist-DyMv0xk8.mjs +41 -0
- package/dist/dist-NEeQKKDZ.js +1 -0
- package/dist/dist-N_70prl1.js +1 -0
- package/dist/dist-YAADIsyo.js +1 -0
- package/dist/dist-dMp9dzmY.mjs +20 -0
- package/dist/dist-mHQuNOH-.js +1 -0
- package/dist/dist-oyFh63Uq.js +1 -0
- package/dist/dist-rx5WaFf5.mjs +20 -0
- package/dist/dist-v-Y6tnMq.js +1 -0
- package/dist/dist-v9094Auw.js +1 -0
- package/dist/dist-yA6iVq_M.js +1 -0
- package/dist/drawer.cjs +1 -1
- package/dist/drawer.d.ts +10 -10
- package/dist/drawer.d.ts.map +1 -1
- package/dist/drawer.mjs +2 -2
- package/dist/{dropdown-menu-CriaO1_i.mjs → dropdown-menu-BWqWoYis.mjs} +117 -151
- package/dist/dropdown-menu-BpZcobmP.js +1 -0
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.d.ts +15 -15
- package/dist/dropdown-menu.d.ts.map +1 -1
- package/dist/dropdown-menu.mjs +1 -1
- package/dist/empty.cjs +1 -1
- package/dist/empty.d.ts +6 -6
- package/dist/empty.d.ts.map +1 -1
- package/dist/empty.mjs +2 -2
- package/dist/{es2015-BhmbVcui.mjs → es2015-CYxXY2oV.mjs} +242 -216
- package/dist/es2015-t2RPC0Rg.js +41 -0
- package/dist/field.cjs +1 -1
- package/dist/field.d.ts +11 -11
- package/dist/field.d.ts.map +1 -1
- package/dist/field.mjs +4 -4
- package/dist/floating-ui.react-dom-BwFRxNGc.js +1 -0
- package/dist/{floating-ui.react-dom-DgS_bqyY.mjs → floating-ui.react-dom-CyupHsR6.mjs} +249 -276
- package/dist/form.cjs +1 -1
- package/dist/form.d.ts +6 -4
- package/dist/form.d.ts.map +1 -1
- package/dist/form.mjs +8 -8
- package/dist/hover-card-7NjGqlP0.js +1 -0
- package/dist/hover-card-DuRUptxQ.mjs +176 -0
- package/dist/hover-card.cjs +1 -1
- package/dist/hover-card.d.ts +3 -3
- package/dist/hover-card.d.ts.map +1 -1
- package/dist/hover-card.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +72 -66
- package/dist/input-group.cjs +1 -1
- package/dist/input-group.d.ts +7 -7
- package/dist/input-group.d.ts.map +1 -1
- package/dist/input-group.mjs +4 -4
- package/dist/input-otp-D9MwUsPO.js +20 -0
- package/dist/input-otp-m_BTudNY.mjs +409 -0
- package/dist/input-otp.cjs +1 -1
- package/dist/input-otp.d.ts +4 -4
- package/dist/input-otp.d.ts.map +1 -1
- package/dist/input-otp.mjs +1 -1
- package/dist/input.cjs +1 -1
- package/dist/input.d.ts +1 -1
- package/dist/input.d.ts.map +1 -1
- package/dist/input.mjs +1 -1
- package/dist/item.cjs +1 -1
- package/dist/item.d.ts +11 -11
- package/dist/item.d.ts.map +1 -1
- package/dist/item.mjs +4 -4
- package/dist/kbd.cjs +1 -1
- package/dist/kbd.d.ts +2 -2
- package/dist/kbd.d.ts.map +1 -1
- package/dist/kbd.mjs +2 -2
- package/dist/label-CgKiKHKG.js +1 -0
- package/dist/label-DVA-YKpB.mjs +28 -0
- package/dist/label.cjs +1 -1
- package/dist/label.d.ts +1 -1
- package/dist/label.d.ts.map +1 -1
- package/dist/label.mjs +1 -1
- package/dist/marker.cjs +1 -0
- package/dist/marker.d.ts +12 -0
- package/dist/marker.d.ts.map +1 -0
- package/dist/marker.mjs +40 -0
- package/dist/marker.test.d.ts +2 -0
- package/dist/marker.test.d.ts.map +1 -0
- package/dist/{menubar-BcyqIJgy.mjs → menubar-CyKBLHme.mjs} +130 -166
- package/dist/menubar-DlOMZeh1.js +1 -0
- package/dist/menubar.cjs +1 -1
- package/dist/menubar.d.ts +16 -16
- package/dist/menubar.d.ts.map +1 -1
- package/dist/menubar.mjs +1 -1
- package/dist/message-scroller-DqLu0YI6.js +1 -0
- package/dist/message-scroller-FwdKclRM.mjs +824 -0
- package/dist/message-scroller.cjs +1 -0
- package/dist/message-scroller.d.ts +13 -0
- package/dist/message-scroller.d.ts.map +1 -0
- package/dist/message-scroller.mjs +3 -0
- package/dist/message-scroller.test.d.ts +2 -0
- package/dist/message-scroller.test.d.ts.map +1 -0
- package/dist/message.cjs +1 -0
- package/dist/message.d.ts +11 -0
- package/dist/message.d.ts.map +1 -0
- package/dist/message.mjs +50 -0
- package/dist/message.test.d.ts +2 -0
- package/dist/message.test.d.ts.map +1 -0
- package/dist/native-select.cjs +1 -1
- package/dist/native-select.d.ts +3 -3
- package/dist/native-select.d.ts.map +1 -1
- package/dist/native-select.mjs +12 -12
- package/dist/navigation-menu-BzE1J1rs.mjs +608 -0
- package/dist/navigation-menu-CrR01R8Z.js +1 -0
- package/dist/navigation-menu.cjs +1 -1
- package/dist/navigation-menu.d.ts +8 -8
- package/dist/navigation-menu.d.ts.map +1 -1
- package/dist/navigation-menu.mjs +1 -1
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.d.ts +7 -7
- package/dist/pagination.d.ts.map +1 -1
- package/dist/pagination.mjs +40 -34
- package/dist/popover-CFF_HXSf.mjs +222 -0
- package/dist/popover-D9pVy08c.js +1 -0
- package/dist/popover.cjs +1 -1
- package/dist/popover.d.ts +7 -7
- package/dist/popover.d.ts.map +1 -1
- package/dist/popover.mjs +1 -1
- package/dist/progress-ClcVCqjl.mjs +93 -0
- package/dist/progress-nfJMuKGj.js +6 -0
- package/dist/progress.cjs +1 -1
- package/dist/progress.d.ts +1 -1
- package/dist/progress.d.ts.map +1 -1
- package/dist/progress.mjs +1 -1
- package/dist/questionnaire-DKWcZeWT.mjs +1159 -0
- package/dist/questionnaire-PWClWvST.js +1 -0
- package/dist/questionnaire.cjs +1 -0
- package/dist/questionnaire.d.ts +22 -0
- package/dist/questionnaire.d.ts.map +1 -0
- package/dist/questionnaire.mjs +4 -0
- package/dist/questionnaire.test.d.ts +2 -0
- package/dist/questionnaire.test.d.ts.map +1 -0
- package/dist/radio-group-5VwmCXRK.mjs +265 -0
- package/dist/radio-group-DhXnB0fI.js +1 -0
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.d.ts +2 -2
- package/dist/radio-group.d.ts.map +1 -1
- package/dist/radio-group.mjs +1 -1
- package/dist/resizable-ChIqXiu4.js +1 -0
- package/dist/{resizable-DJSE3e5L.mjs → resizable-CpovHnG-.mjs} +341 -329
- package/dist/resizable.cjs +1 -1
- package/dist/resizable.d.ts +3 -3
- package/dist/resizable.d.ts.map +1 -1
- package/dist/resizable.mjs +1 -1
- package/dist/scroll-area-CUqjuvqH.js +1 -0
- package/dist/{scroll-area-8QcqkHnC.mjs → scroll-area-DstdIGvS.mjs} +151 -142
- package/dist/scroll-area.cjs +1 -1
- package/dist/scroll-area.d.ts +2 -2
- package/dist/scroll-area.d.ts.map +1 -1
- package/dist/scroll-area.mjs +1 -1
- package/dist/scroll-to-top.cjs +1 -1
- package/dist/scroll-to-top.d.ts +1 -1
- package/dist/scroll-to-top.d.ts.map +1 -1
- package/dist/scroll-to-top.mjs +11 -11
- package/dist/search.cjs +1 -1
- package/dist/search.d.ts +1 -1
- package/dist/search.d.ts.map +1 -1
- package/dist/search.mjs +17 -17
- package/dist/select-CnCTQeh7.js +1 -0
- package/dist/select-CnHZdna2.mjs +792 -0
- package/dist/select.cjs +1 -1
- package/dist/select.d.ts +10 -10
- package/dist/select.d.ts.map +1 -1
- package/dist/select.mjs +1 -1
- package/dist/separator-BXaVJadH.js +1 -0
- package/dist/separator-D1a8myFf.mjs +38 -0
- package/dist/separator.cjs +1 -1
- package/dist/separator.d.ts +1 -1
- package/dist/separator.d.ts.map +1 -1
- package/dist/separator.mjs +1 -1
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.d.ts +8 -8
- package/dist/sheet.d.ts.map +1 -1
- package/dist/sheet.mjs +23 -23
- package/dist/{sidebar-B-sWccYh.mjs → sidebar-B5q6nH2G.mjs} +64 -64
- package/dist/sidebar-ns_2TNBM.js +1 -0
- package/dist/sidebar.cjs +1 -1
- package/dist/sidebar.d.ts +24 -24
- package/dist/sidebar.d.ts.map +1 -1
- package/dist/sidebar.mjs +1 -1
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.d.ts +1 -1
- package/dist/skeleton.d.ts.map +1 -1
- package/dist/skeleton.mjs +1 -1
- package/dist/slider-PoIV6N-u.js +1 -0
- package/dist/slider-ZnyQjYsS.mjs +460 -0
- package/dist/slider.cjs +1 -1
- package/dist/slider.d.ts +1 -1
- package/dist/slider.d.ts.map +1 -1
- package/dist/slider.mjs +1 -1
- package/dist/sonner.cjs +1 -1
- package/dist/sonner.d.ts +2 -4
- package/dist/sonner.d.ts.map +1 -1
- package/dist/sonner.mjs +8 -8
- package/dist/spinner.cjs +1 -1
- package/dist/spinner.d.ts +1 -1
- package/dist/spinner.d.ts.map +1 -1
- package/dist/spinner.mjs +5 -4
- package/dist/support-fab.cjs +1 -1
- package/dist/support-fab.d.ts +1 -1
- package/dist/support-fab.d.ts.map +1 -1
- package/dist/support-fab.mjs +49 -41
- package/dist/switch-DLY8PkmL.js +1 -0
- package/dist/switch-DagjjAQu.mjs +170 -0
- package/dist/switch.cjs +1 -1
- package/dist/switch.d.ts +1 -1
- package/dist/switch.d.ts.map +1 -1
- package/dist/switch.mjs +1 -1
- package/dist/table-of-contents.cjs +1 -1
- package/dist/table-of-contents.d.ts +4 -3
- package/dist/table-of-contents.d.ts.map +1 -1
- package/dist/table-of-contents.mjs +2 -2
- package/dist/table.cjs +1 -1
- package/dist/table.d.ts +8 -8
- package/dist/table.d.ts.map +1 -1
- package/dist/table.mjs +1 -1
- package/dist/tabs-OQ6rj-3B.mjs +158 -0
- package/dist/tabs-QBWdNfSK.js +1 -0
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.d.ts +4 -4
- package/dist/tabs.d.ts.map +1 -1
- package/dist/tabs.mjs +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.d.ts +1 -1
- package/dist/textarea.d.ts.map +1 -1
- package/dist/textarea.mjs +1 -1
- package/dist/theme-provider.d.ts +1 -1
- package/dist/theme-provider.d.ts.map +1 -1
- package/dist/{theme-toggle-clE-HpSS.mjs → theme-toggle-BCcH-QtH.mjs} +20 -20
- package/dist/theme-toggle-Q3UHstP_.js +1 -0
- package/dist/theme-toggle.cjs +1 -1
- package/dist/theme-toggle.d.ts +1 -1
- package/dist/theme-toggle.d.ts.map +1 -1
- package/dist/theme-toggle.mjs +1 -1
- package/dist/{toast-DVI6jPq5.mjs → toast-BOdziIGg.mjs} +165 -169
- package/dist/toast-D1fjLwO1.js +1 -0
- package/dist/toast.cjs +1 -1
- package/dist/toast.mjs +1 -1
- package/dist/{toaster-Czhz-ktg.mjs → toaster-CKAJ9cht.mjs} +1 -1
- package/dist/{toaster-DfDb2-aI.js → toaster-DS9iODKU.js} +1 -1
- package/dist/toaster.cjs +1 -1
- package/dist/toaster.d.ts +1 -1
- package/dist/toaster.d.ts.map +1 -1
- package/dist/toaster.mjs +1 -1
- package/dist/toggle-CuLxBIWH.mjs +59 -0
- package/dist/toggle-DtpvPox_.js +1 -0
- package/dist/toggle-group-DfkvPKU_.mjs +164 -0
- package/dist/toggle-group-UHY0Tip1.js +1 -0
- package/dist/toggle-group.cjs +1 -1
- package/dist/toggle-group.d.ts +2 -2
- package/dist/toggle-group.d.ts.map +1 -1
- package/dist/toggle-group.mjs +1 -1
- package/dist/toggle.cjs +1 -1
- package/dist/toggle.d.ts +1 -1
- package/dist/toggle.d.ts.map +1 -1
- package/dist/toggle.mjs +1 -1
- package/dist/tooltip-BbCL1gtU.mjs +384 -0
- package/dist/tooltip-BvpyStn2.js +1 -0
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.d.ts +4 -4
- package/dist/tooltip.d.ts.map +1 -1
- package/dist/tooltip.mjs +1 -1
- package/package.json +3 -1
- package/src/__contracts.ts +163 -0
- package/src/accordion.tsx +3 -4
- package/src/alert-dialog.tsx +5 -5
- package/src/alert.tsx +2 -3
- package/src/attachment.tsx +203 -0
- package/src/breadcrumb.tsx +3 -4
- package/src/bubble.tsx +116 -0
- package/src/button-group.tsx +5 -5
- package/src/button.tsx +5 -6
- package/src/calendar.tsx +6 -5
- package/src/card.tsx +5 -5
- package/src/carousel.tsx +7 -7
- package/src/chart.tsx +1 -4
- package/src/checkbox.tsx +3 -4
- package/src/combobox.tsx +8 -7
- package/src/command.tsx +7 -7
- package/src/context-menu.tsx +9 -10
- package/src/dialog.tsx +5 -5
- package/src/drawer.tsx +2 -3
- package/src/dropdown-menu.tsx +9 -10
- package/src/empty.tsx +2 -3
- package/src/field.tsx +5 -4
- package/src/hover-card.tsx +2 -3
- package/src/index.ts +55 -1
- package/src/input-group.tsx +8 -7
- package/src/input-otp.tsx +3 -3
- package/src/input.tsx +1 -2
- package/src/item.tsx +4 -3
- package/src/kbd.tsx +3 -2
- package/src/label.tsx +1 -2
- package/src/marker.tsx +62 -0
- package/src/menubar.tsx +10 -11
- package/src/message-scroller.tsx +134 -0
- package/src/message.tsx +86 -0
- package/src/native-select.tsx +2 -2
- package/src/navigation-menu.tsx +7 -8
- package/src/pagination.tsx +6 -6
- package/src/popover.tsx +2 -3
- package/src/progress.tsx +1 -2
- package/src/questionnaire.tsx +334 -0
- package/src/radio-group.tsx +2 -3
- package/src/resizable.tsx +1 -4
- package/src/scroll-area.tsx +2 -3
- package/src/select.tsx +7 -8
- package/src/separator.tsx +3 -4
- package/src/sheet.tsx +5 -5
- package/src/sidebar.tsx +14 -13
- package/src/skeleton.tsx +1 -1
- package/src/slider.tsx +4 -5
- package/src/sonner.tsx +0 -5
- package/src/spinner.tsx +10 -2
- package/src/support-fab.tsx +24 -3
- package/src/switch.tsx +3 -4
- package/src/table-of-contents.tsx +7 -2
- package/src/table.tsx +1 -2
- package/src/tabs.tsx +8 -9
- package/src/textarea.tsx +1 -2
- package/src/toggle-group.tsx +4 -4
- package/src/toggle.tsx +3 -4
- package/src/tooltip.tsx +2 -3
- package/dist/accordion-Dd8Hrexd.mjs +0 -244
- package/dist/accordion-DdSOiVyo.js +0 -1
- package/dist/alert-dialog-B7zX3gJX.js +0 -7
- package/dist/alert-dialog-BQoG5g_w.mjs +0 -213
- package/dist/aspect-ratio-QD1ZXP2B.js +0 -1
- package/dist/avatar-C4onD8-4.mjs +0 -127
- package/dist/avatar-ki_M47qG.js +0 -1
- package/dist/calendar-D9sapvfY.js +0 -1
- package/dist/carousel-6oFHLN7R.js +0 -1
- package/dist/checkbox-BLgY82mB.js +0 -1
- package/dist/checkbox-Bts_zfqd.mjs +0 -173
- package/dist/combobox-6qNx9Wbb.js +0 -4
- package/dist/combobox-yDMqxM_J.mjs +0 -5522
- package/dist/command-C6wJ5giF.mjs +0 -576
- package/dist/command-DCrPL1iW.js +0 -1
- package/dist/context-menu-CydUpD4W.mjs +0 -349
- package/dist/context-menu-DQ7XuuG5.js +0 -1
- package/dist/dist-1C8JOpVg.js +0 -1
- package/dist/dist-B1OcuinL.mjs +0 -558
- package/dist/dist-BGZDG175.mjs +0 -199
- package/dist/dist-BPBwSSyk.mjs +0 -8
- package/dist/dist-BPX1UGAz2.js +0 -1
- package/dist/dist-BRsDdVlJ.js +0 -1
- package/dist/dist-BWwCr-xN.mjs +0 -118
- package/dist/dist-BYdcKuDi.mjs +0 -16
- package/dist/dist-BlB11V_z.mjs +0 -27
- package/dist/dist-Bm8Cuttq.mjs +0 -76
- package/dist/dist-Byhx2fDJ.js +0 -1
- package/dist/dist-CCXBcfM3.js +0 -1
- package/dist/dist-CCokLFyA.mjs +0 -10
- package/dist/dist-CDU9vno-.mjs +0 -18
- package/dist/dist-CEJNUZGZ.js +0 -1
- package/dist/dist-CJolxugc.js +0 -1
- package/dist/dist-CQhWBhaI.mjs +0 -91
- package/dist/dist-CRLbUj9C.js +0 -1
- package/dist/dist-CSkpam6a.js +0 -1
- package/dist/dist-CWElW7UD.js +0 -1
- package/dist/dist-CXbzwSnE.js +0 -1
- package/dist/dist-CYj6O95k.mjs +0 -220
- package/dist/dist-C_45sBzc2.js +0 -1
- package/dist/dist-Cb7OVHcJ.js +0 -1
- package/dist/dist-Ccv5O-Vw.js +0 -1
- package/dist/dist-ChuP-5Gb.js +0 -1
- package/dist/dist-CiM892Rg.js +0 -1
- package/dist/dist-CuMQq0hV.js +0 -1
- package/dist/dist-DGzGsPqo2.mjs +0 -6
- package/dist/dist-DMnXk8Uo.js +0 -1
- package/dist/dist-DPBTfUqI.mjs +0 -96
- package/dist/dist-DR0lXVFG.js +0 -1
- package/dist/dist-Da7BU5sd.js +0 -5
- package/dist/dist-Df2ez-DA.mjs +0 -12
- package/dist/dist-DuTFGM_g.mjs +0 -45
- package/dist/dist-DynSBUGq.js +0 -1
- package/dist/dist-Dz3LbuDd.mjs +0 -60
- package/dist/dist-GhACpuJb2.mjs +0 -73
- package/dist/dist-o4zlRoDG.js +0 -1
- package/dist/dist-rGeQfsgN.mjs +0 -66
- package/dist/dist-tvb2Wafb.mjs +0 -153
- package/dist/dropdown-menu-BoJvZ3Fj.js +0 -1
- package/dist/es2015-D22cM8Q_.js +0 -41
- package/dist/floating-ui.react-dom-DpCJEf_x.js +0 -1
- package/dist/hover-card-CJ-ibpbC.mjs +0 -187
- package/dist/hover-card-CK5SjVLL.js +0 -1
- package/dist/input-otp-BH_9dVhh.mjs +0 -391
- package/dist/input-otp-BibboKMt.js +0 -20
- package/dist/label-BXMSoyyu.js +0 -1
- package/dist/label-C8GNfPU0.mjs +0 -25
- package/dist/menubar-DPxokWFI.js +0 -1
- package/dist/navigation-menu-2yE2MUu-.js +0 -1
- package/dist/navigation-menu-N8gkxEXE.mjs +0 -628
- package/dist/popover-D1AO-E8p.js +0 -1
- package/dist/popover-wQACF3ut.mjs +0 -245
- package/dist/progress-DPWSEWa5.mjs +0 -86
- package/dist/progress-ShXZwOfj.js +0 -6
- package/dist/radio-group-CQbZCQmj.mjs +0 -199
- package/dist/radio-group-DAEi5vW_.js +0 -1
- package/dist/resizable-Cv-mKMKP.js +0 -1
- package/dist/scroll-area-Cqqinhxf.js +0 -1
- package/dist/select-DdUveoSA.js +0 -1
- package/dist/select-yoeH35x2.mjs +0 -778
- package/dist/separator-BU1ea5gl.mjs +0 -35
- package/dist/separator-DBjErwHf.js +0 -1
- package/dist/shim-B5sEfNEJ.js +0 -1
- package/dist/shim-DX33EwUw.mjs +0 -91
- package/dist/sidebar-DIW-1cin.js +0 -1
- package/dist/slider-CCPXejUF.mjs +0 -388
- package/dist/slider-w05gD_Ix.js +0 -1
- package/dist/switch-CDBqsWQa.mjs +0 -112
- package/dist/switch-X2WBJsUu.js +0 -1
- package/dist/tabs-DzvgrVzk.js +0 -1
- package/dist/tabs-KDeHjVQU.mjs +0 -160
- package/dist/theme-toggle-C2Y4bIM3.js +0 -1
- package/dist/toast-1keyrzem.js +0 -1
- package/dist/toggle-BGkq5XDM.js +0 -1
- package/dist/toggle-BfIIdlA6.mjs +0 -58
- package/dist/toggle-group-CbqgoPFU.mjs +0 -167
- package/dist/toggle-group-D7hR4BT2.js +0 -1
- package/dist/tooltip-CAIbshMk.js +0 -1
- package/dist/tooltip-D_o8Z-Ya.mjs +0 -380
|
@@ -1,85 +1,86 @@
|
|
|
1
1
|
import { t as e } from "./utils-A_oVsYw5.mjs";
|
|
2
|
-
import { a as t } from "./dist-
|
|
3
|
-
import { n, t as r } from "./dist-
|
|
4
|
-
import { r as i } from "./dist-
|
|
5
|
-
import {
|
|
6
|
-
import { t as o } from "./dist-
|
|
7
|
-
import { t as s } from "./dist-
|
|
8
|
-
import { t as c } from "./dist-
|
|
9
|
-
import { t as l } from "./dist-
|
|
10
|
-
import { t as u } from "./dist-
|
|
11
|
-
import { t as d } from "./dist-
|
|
12
|
-
import { r as f, t as p } from "./dist-
|
|
13
|
-
import { t as m } from "./dist-
|
|
14
|
-
import
|
|
15
|
-
import * as
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
18
|
-
import { cva as
|
|
19
|
-
//#region ../../node_modules/.bun/@radix-ui+react-toast@1.2.
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
|
|
2
|
+
import { a as t } from "./dist-8fYwoWd4.mjs";
|
|
3
|
+
import { n, t as r } from "./dist-BQhMregZ.mjs";
|
|
4
|
+
import { r as i } from "./dist-BIXhHahX.mjs";
|
|
5
|
+
import { t as a } from "./dist-DMwCTE2i.mjs";
|
|
6
|
+
import { t as o } from "./dist-DOoZ3vGL.mjs";
|
|
7
|
+
import { t as s } from "./dist-DyMv0xk8.mjs";
|
|
8
|
+
import { t as c } from "./dist-D7UHN1DJ.mjs";
|
|
9
|
+
import { t as l } from "./dist-BUXpRW9O.mjs";
|
|
10
|
+
import { t as u } from "./dist-Dg9ASyqI.mjs";
|
|
11
|
+
import { t as d } from "./dist-BPhn-EOy.mjs";
|
|
12
|
+
import { r as f, t as p } from "./dist-CYrqAnIr.mjs";
|
|
13
|
+
import { t as m } from "./dist-rx5WaFf5.mjs";
|
|
14
|
+
import { X as h } from "lucide-react";
|
|
15
|
+
import * as g from "react";
|
|
16
|
+
import * as _ from "react-dom";
|
|
17
|
+
import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
18
|
+
import { cva as x } from "class-variance-authority";
|
|
19
|
+
//#region ../../node_modules/.bun/@radix-ui+react-toast@1.2.23+2b23df507bdda662/node_modules/@radix-ui/react-toast/dist/index.mjs
|
|
20
|
+
var ee = Object.defineProperty, S = (e, t) => ee(e, "name", {
|
|
21
|
+
value: t,
|
|
22
|
+
configurable: !0
|
|
23
|
+
}), C = "ToastProvider", [w, T, E] = o("Toast"), [D, te] = a("Toast", [E]), [O, k] = D(C), ne = /* @__PURE__ */ S((e) => {
|
|
24
|
+
let { __scopeToast: t, label: n = "Notification", duration: r = 5e3, swipeDirection: i = "right", swipeThreshold: a = 50, announcerContainer: o, children: s } = e, [c, l] = g.useState(null), [u, d] = g.useState(0), f = g.useRef(!1);
|
|
25
|
+
return n.trim() || console.error(`Invalid prop \`label\` supplied to \`${C}\`. Expected non-empty \`string\`.`), /* @__PURE__ */ y(w.Provider, {
|
|
23
26
|
scope: t,
|
|
24
|
-
children: /* @__PURE__ */
|
|
27
|
+
children: /* @__PURE__ */ y(O, {
|
|
25
28
|
scope: t,
|
|
26
29
|
label: n,
|
|
27
30
|
duration: r,
|
|
28
31
|
swipeDirection: i,
|
|
29
32
|
swipeThreshold: a,
|
|
30
|
-
toastCount:
|
|
31
|
-
viewport:
|
|
32
|
-
onViewportChange:
|
|
33
|
-
onToastAdd:
|
|
34
|
-
onToastRemove:
|
|
35
|
-
isFocusedToastEscapeKeyDownRef: d,
|
|
33
|
+
toastCount: u,
|
|
34
|
+
viewport: c,
|
|
35
|
+
onViewportChange: l,
|
|
36
|
+
onToastAdd: g.useCallback(() => d((e) => e + 1), []),
|
|
37
|
+
onToastRemove: g.useCallback(() => d((e) => e - 1), []),
|
|
36
38
|
isClosePausedRef: f,
|
|
37
|
-
|
|
39
|
+
announcerContainer: o,
|
|
40
|
+
children: s
|
|
38
41
|
})
|
|
39
42
|
});
|
|
40
|
-
}
|
|
41
|
-
k.
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
h.useEffect(() => {
|
|
45
|
-
let e = (e) => {
|
|
43
|
+
}, "ToastProvider"), re = "ToastViewport", A = ["F8"], j = "toast.viewportPause", M = "toast.viewportResume", N = /* @__PURE__ */ g.forwardRef(/* @__PURE__ */ S(function(e, n) {
|
|
44
|
+
let { __scopeToast: i, hotkey: a = A, label: o = "Notifications ({hotkey})", ...s } = e, c = k(re, i), l = T(i), u = g.useRef(null), d = g.useRef(null), f = 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;
|
|
45
|
+
g.useEffect(() => {
|
|
46
|
+
let e = /* @__PURE__ */ S((e) => {
|
|
46
47
|
a.length !== 0 && a.every((t) => e[t] || e.code === t) && m.current?.focus();
|
|
47
|
-
};
|
|
48
|
+
}, "handleKeyDown");
|
|
48
49
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
49
|
-
}, [a]),
|
|
50
|
+
}, [a]), g.useEffect(() => {
|
|
50
51
|
let e = u.current, t = m.current;
|
|
51
|
-
if (
|
|
52
|
-
let n = () => {
|
|
52
|
+
if (v && e && t) {
|
|
53
|
+
let n = /* @__PURE__ */ S(() => {
|
|
53
54
|
if (!c.isClosePausedRef.current) {
|
|
54
|
-
let e = new CustomEvent(
|
|
55
|
+
let e = new CustomEvent(j);
|
|
55
56
|
t.dispatchEvent(e), c.isClosePausedRef.current = !0;
|
|
56
57
|
}
|
|
57
|
-
}, r = () => {
|
|
58
|
+
}, "handlePause"), r = /* @__PURE__ */ S(() => {
|
|
58
59
|
if (c.isClosePausedRef.current) {
|
|
59
|
-
let e = new CustomEvent(
|
|
60
|
+
let e = new CustomEvent(M);
|
|
60
61
|
t.dispatchEvent(e), c.isClosePausedRef.current = !1;
|
|
61
62
|
}
|
|
62
|
-
}, i = (t) => {
|
|
63
|
+
}, "handleResume"), i = /* @__PURE__ */ S((t) => {
|
|
63
64
|
e.contains(t.relatedTarget) || r();
|
|
64
|
-
}, a = () => {
|
|
65
|
+
}, "handleFocusOutResume"), a = /* @__PURE__ */ S(() => {
|
|
65
66
|
e.contains(document.activeElement) || r();
|
|
66
|
-
};
|
|
67
|
+
}, "handlePointerLeaveResume");
|
|
67
68
|
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), () => {
|
|
68
69
|
e.removeEventListener("focusin", n), e.removeEventListener("focusout", i), e.removeEventListener("pointermove", n), e.removeEventListener("pointerleave", a), window.removeEventListener("blur", n), window.removeEventListener("focus", r);
|
|
69
70
|
};
|
|
70
71
|
}
|
|
71
|
-
}, [
|
|
72
|
-
let
|
|
72
|
+
}, [v, c.isClosePausedRef]);
|
|
73
|
+
let x = g.useCallback(({ tabbingDirection: e }) => {
|
|
73
74
|
let t = l().map((t) => {
|
|
74
|
-
let n = t.ref.current, r = [n, ...
|
|
75
|
+
let n = t.ref.current, r = [n, ...de(n)];
|
|
75
76
|
return e === "forwards" ? r : r.reverse();
|
|
76
77
|
});
|
|
77
78
|
return (e === "forwards" ? t.reverse() : t).flat();
|
|
78
79
|
}, [l]);
|
|
79
|
-
return
|
|
80
|
+
return g.useEffect(() => {
|
|
80
81
|
let e = m.current;
|
|
81
82
|
if (e) {
|
|
82
|
-
let t = (t) => {
|
|
83
|
+
let t = /* @__PURE__ */ S((t) => {
|
|
83
84
|
let n = t.altKey || t.ctrlKey || t.metaKey;
|
|
84
85
|
if (t.key === "Tab" && !n) {
|
|
85
86
|
let n = document.activeElement, r = t.shiftKey;
|
|
@@ -87,46 +88,44 @@ var A = "ToastViewport", j = ["F8"], M = "toast.viewportPause", N = "toast.viewp
|
|
|
87
88
|
d.current?.focus();
|
|
88
89
|
return;
|
|
89
90
|
}
|
|
90
|
-
let i =
|
|
91
|
-
|
|
91
|
+
let i = x({ tabbingDirection: r ? "backwards" : "forwards" }), a = i.findIndex((e) => e === n);
|
|
92
|
+
Z(i.slice(a + 1)) ? t.preventDefault() : r ? d.current?.focus() : f.current?.focus();
|
|
92
93
|
}
|
|
93
|
-
};
|
|
94
|
+
}, "handleKeyDown");
|
|
94
95
|
return e.addEventListener("keydown", t), () => e.removeEventListener("keydown", t);
|
|
95
96
|
}
|
|
96
|
-
}, [l,
|
|
97
|
+
}, [l, x]), /* @__PURE__ */ b(p, {
|
|
97
98
|
ref: u,
|
|
98
99
|
role: "region",
|
|
99
|
-
"aria-label": o.replace("{hotkey}",
|
|
100
|
+
"aria-label": o.replace("{hotkey}", _),
|
|
100
101
|
tabIndex: -1,
|
|
101
|
-
style: { pointerEvents:
|
|
102
|
+
style: { pointerEvents: v ? void 0 : "none" },
|
|
102
103
|
children: [
|
|
103
|
-
|
|
104
|
+
v && /* @__PURE__ */ y(F, {
|
|
104
105
|
ref: d,
|
|
105
106
|
onFocusFromOutsideViewport: () => {
|
|
106
|
-
|
|
107
|
+
Z(x({ tabbingDirection: "forwards" }));
|
|
107
108
|
}
|
|
108
109
|
}),
|
|
109
|
-
/* @__PURE__ */
|
|
110
|
+
/* @__PURE__ */ y(w.Slot, {
|
|
110
111
|
scope: i,
|
|
111
|
-
children: /* @__PURE__ */
|
|
112
|
+
children: /* @__PURE__ */ y(r.ol, {
|
|
112
113
|
tabIndex: -1,
|
|
113
114
|
...s,
|
|
114
|
-
ref:
|
|
115
|
+
ref: h
|
|
115
116
|
})
|
|
116
117
|
}),
|
|
117
|
-
|
|
118
|
+
v && /* @__PURE__ */ y(F, {
|
|
118
119
|
ref: f,
|
|
119
120
|
onFocusFromOutsideViewport: () => {
|
|
120
|
-
|
|
121
|
+
Z(x({ tabbingDirection: "backwards" }));
|
|
121
122
|
}
|
|
122
123
|
})
|
|
123
124
|
]
|
|
124
125
|
});
|
|
125
|
-
})
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
let { __scopeToast: n, onFocusFromOutsideViewport: r, ...a } = e, o = O(F, n);
|
|
129
|
-
return /* @__PURE__ */ _(i, {
|
|
126
|
+
}, "ToastViewport")), P = "ToastFocusProxy", F = /* @__PURE__ */ g.forwardRef(/* @__PURE__ */ S(function(e, t) {
|
|
127
|
+
let { __scopeToast: n, onFocusFromOutsideViewport: r, ...a } = e, o = k(P, n);
|
|
128
|
+
return /* @__PURE__ */ y(i, {
|
|
130
129
|
tabIndex: 0,
|
|
131
130
|
...a,
|
|
132
131
|
ref: t,
|
|
@@ -136,18 +135,16 @@ var F = "ToastFocusProxy", I = h.forwardRef((e, t) => {
|
|
|
136
135
|
o.viewport?.contains(t) || r();
|
|
137
136
|
}
|
|
138
137
|
});
|
|
139
|
-
})
|
|
140
|
-
I.displayName = F;
|
|
141
|
-
var L = "Toast", te = "toast.swipeStart", ne = "toast.swipeMove", re = "toast.swipeCancel", ie = "toast.swipeEnd", R = h.forwardRef((e, t) => {
|
|
138
|
+
}, "ToastFocusProxy")), I = "Toast", ie = "toast.swipeStart", ae = "toast.swipeMove", oe = "toast.swipeCancel", se = "toast.swipeEnd", L = /* @__PURE__ */ g.forwardRef(/* @__PURE__ */ S(function(e, t) {
|
|
142
139
|
let { forceMount: n, open: r, defaultOpen: i, onOpenChange: a, ...o } = e, [c, f] = l({
|
|
143
140
|
prop: r,
|
|
144
141
|
defaultProp: i ?? !0,
|
|
145
142
|
onChange: a,
|
|
146
|
-
caller:
|
|
143
|
+
caller: I
|
|
147
144
|
});
|
|
148
|
-
return /* @__PURE__ */
|
|
145
|
+
return /* @__PURE__ */ y(u, {
|
|
149
146
|
present: n || c,
|
|
150
|
-
children: /* @__PURE__ */
|
|
147
|
+
children: /* @__PURE__ */ y(z, {
|
|
151
148
|
open: c,
|
|
152
149
|
...o,
|
|
153
150
|
ref: t,
|
|
@@ -170,70 +167,70 @@ var L = "Toast", te = "toast.swipeStart", ne = "toast.swipeMove", re = "toast.sw
|
|
|
170
167
|
})
|
|
171
168
|
})
|
|
172
169
|
});
|
|
173
|
-
})
|
|
174
|
-
R.
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
E?.contains(document.activeElement) && T.viewport?.focus(), l();
|
|
178
|
-
}), H = h.useCallback((e) => {
|
|
170
|
+
}, "Toast")), [ce, R] = D(I, { onClose() {} }), z = /* @__PURE__ */ g.forwardRef(/* @__PURE__ */ S(function(e, n) {
|
|
171
|
+
let { __scopeToast: i, type: a = "foreground", duration: o, open: c, onClose: l, onEscapeKeyDown: u, onPause: p, onResume: m, onSwipeStart: h, onSwipeMove: x, onSwipeCancel: ee, onSwipeEnd: C, ...E } = e, D = k(I, i), te = T(i), [O, ne] = g.useState(null), re = t(n, ne), A = g.useRef(null), N = g.useRef(null), P = o || D.duration, F = g.useRef(0), L = g.useRef(P), R = g.useRef(0), { onToastAdd: z, onToastRemove: B } = D, V = d(() => {
|
|
172
|
+
O?.contains(document.activeElement) && D.viewport?.focus(), l();
|
|
173
|
+
}), H = g.useCallback((e) => {
|
|
179
174
|
!e || e === Infinity || (window.clearTimeout(R.current), F.current = (/* @__PURE__ */ new Date()).getTime(), R.current = window.setTimeout(V, e));
|
|
180
175
|
}, [V]);
|
|
181
|
-
|
|
182
|
-
let e =
|
|
176
|
+
g.useEffect(() => {
|
|
177
|
+
let e = D.viewport;
|
|
183
178
|
if (e) {
|
|
184
|
-
let t = () => {
|
|
185
|
-
H(
|
|
186
|
-
}, n = () => {
|
|
179
|
+
let t = /* @__PURE__ */ S(() => {
|
|
180
|
+
H(L.current), m?.();
|
|
181
|
+
}, "handleResume"), n = /* @__PURE__ */ S(() => {
|
|
187
182
|
let e = (/* @__PURE__ */ new Date()).getTime() - F.current;
|
|
188
|
-
|
|
189
|
-
};
|
|
190
|
-
return e.addEventListener(
|
|
191
|
-
e.removeEventListener(
|
|
183
|
+
L.current -= e, window.clearTimeout(R.current), p?.();
|
|
184
|
+
}, "handlePause");
|
|
185
|
+
return e.addEventListener(j, n), e.addEventListener(M, t), () => {
|
|
186
|
+
e.removeEventListener(j, n), e.removeEventListener(M, t);
|
|
192
187
|
};
|
|
193
188
|
}
|
|
194
189
|
}, [
|
|
195
|
-
|
|
190
|
+
D.viewport,
|
|
196
191
|
P,
|
|
197
192
|
p,
|
|
198
193
|
m,
|
|
199
194
|
H
|
|
200
|
-
]),
|
|
201
|
-
c && !
|
|
195
|
+
]), g.useEffect(() => {
|
|
196
|
+
c && !D.isClosePausedRef.current && H(P);
|
|
202
197
|
}, [
|
|
203
198
|
c,
|
|
204
199
|
P,
|
|
205
|
-
|
|
200
|
+
D.isClosePausedRef,
|
|
206
201
|
H
|
|
207
|
-
]),
|
|
208
|
-
|
|
209
|
-
|
|
202
|
+
]), g.useEffect(() => () => {
|
|
203
|
+
window.clearTimeout(R.current);
|
|
204
|
+
}, []), g.useEffect(() => (z(), () => B()), [z, B]);
|
|
205
|
+
let U = g.useMemo(() => O ? K(O) : null, [O]);
|
|
206
|
+
return D.viewport ? /* @__PURE__ */ b(v, { children: [U && /* @__PURE__ */ y(le, {
|
|
210
207
|
__scopeToast: i,
|
|
211
208
|
role: "status",
|
|
212
209
|
"aria-live": a === "foreground" ? "assertive" : "polite",
|
|
213
210
|
children: U
|
|
214
|
-
}), /* @__PURE__ */
|
|
211
|
+
}), /* @__PURE__ */ y(ce, {
|
|
215
212
|
scope: i,
|
|
216
213
|
onClose: V,
|
|
217
|
-
children:
|
|
214
|
+
children: _.createPortal(/* @__PURE__ */ y(w.ItemSlot, {
|
|
218
215
|
scope: i,
|
|
219
|
-
children: /* @__PURE__ */
|
|
216
|
+
children: /* @__PURE__ */ y(f, {
|
|
220
217
|
asChild: !0,
|
|
221
|
-
onEscapeKeyDown: s(u, () => {
|
|
222
|
-
|
|
218
|
+
onEscapeKeyDown: s(u, (e) => {
|
|
219
|
+
te().some((t) => t.ref.current?.contains(e.target)) || V();
|
|
223
220
|
}),
|
|
224
|
-
children: /* @__PURE__ */
|
|
221
|
+
children: /* @__PURE__ */ y(r.li, {
|
|
225
222
|
tabIndex: 0,
|
|
226
223
|
"data-state": c ? "open" : "closed",
|
|
227
|
-
"data-swipe-direction":
|
|
228
|
-
...
|
|
229
|
-
ref:
|
|
224
|
+
"data-swipe-direction": D.swipeDirection,
|
|
225
|
+
...E,
|
|
226
|
+
ref: re,
|
|
230
227
|
style: {
|
|
231
228
|
userSelect: "none",
|
|
232
229
|
touchAction: "none",
|
|
233
230
|
...e.style
|
|
234
231
|
},
|
|
235
232
|
onKeyDown: s(e.onKeyDown, (e) => {
|
|
236
|
-
e.key === "Escape" && (u?.(e.nativeEvent), e.nativeEvent.defaultPrevented ||
|
|
233
|
+
e.key === "Escape" && (u?.(e.nativeEvent), e.nativeEvent.defaultPrevented || V());
|
|
237
234
|
}),
|
|
238
235
|
onPointerDown: s(e.onPointerDown, (e) => {
|
|
239
236
|
e.button === 0 && (A.current = {
|
|
@@ -243,108 +240,102 @@ var [ae, z] = T(L, { onClose() {} }), B = h.forwardRef((e, n) => {
|
|
|
243
240
|
}),
|
|
244
241
|
onPointerMove: s(e.onPointerMove, (e) => {
|
|
245
242
|
if (!A.current) return;
|
|
246
|
-
let t = e.clientX - A.current.x, n = e.clientY - A.current.y, r = !!
|
|
243
|
+
let t = e.clientX - A.current.x, n = e.clientY - A.current.y, r = !!N.current, i = ["left", "right"].includes(D.swipeDirection), a = ["left", "up"].includes(D.swipeDirection) ? Math.min : Math.max, o = i ? a(0, t) : 0, s = i ? 0 : a(0, n), c = e.pointerType === "touch" ? 10 : 2, l = {
|
|
247
244
|
x: o,
|
|
248
245
|
y: s
|
|
249
246
|
}, u = {
|
|
250
247
|
originalEvent: e,
|
|
251
248
|
delta: l
|
|
252
249
|
};
|
|
253
|
-
r ? (
|
|
250
|
+
r ? (N.current = l, q(ae, x, u, { discrete: !1 })) : J(l, D.swipeDirection, c) ? (N.current = l, q(ie, h, u, { discrete: !1 }), e.target.setPointerCapture(e.pointerId)) : (Math.abs(t) > c || Math.abs(n) > c) && (A.current = null);
|
|
254
251
|
}),
|
|
255
252
|
onPointerUp: s(e.onPointerUp, (e) => {
|
|
256
|
-
let t =
|
|
257
|
-
if (n.hasPointerCapture(e.pointerId) && n.releasePointerCapture(e.pointerId),
|
|
253
|
+
let t = N.current, n = e.target;
|
|
254
|
+
if (n.hasPointerCapture(e.pointerId) && n.releasePointerCapture(e.pointerId), N.current = null, A.current = null, t) {
|
|
258
255
|
let n = e.currentTarget, r = {
|
|
259
256
|
originalEvent: e,
|
|
260
257
|
delta: t
|
|
261
258
|
};
|
|
262
|
-
|
|
259
|
+
J(t, D.swipeDirection, D.swipeThreshold) ? q(se, C, r, { discrete: !0 }) : q(oe, ee, r, { discrete: !0 }), n.addEventListener("click", (e) => e.preventDefault(), { once: !0 });
|
|
263
260
|
}
|
|
264
261
|
})
|
|
265
262
|
})
|
|
266
263
|
})
|
|
267
|
-
}),
|
|
264
|
+
}), D.viewport)
|
|
268
265
|
})] }) : null;
|
|
269
|
-
}),
|
|
270
|
-
let { __scopeToast: t, children: n, ...r } = e, a =
|
|
271
|
-
return
|
|
266
|
+
}, "ToastImpl")), le = /* @__PURE__ */ S((e) => {
|
|
267
|
+
let { __scopeToast: t, children: n, ...r } = e, a = k(I, t), [o, s] = g.useState(!1), [c, l] = g.useState(!1);
|
|
268
|
+
return Y(() => s(!0)), g.useEffect(() => {
|
|
272
269
|
let e = window.setTimeout(() => l(!0), 1e3);
|
|
273
270
|
return () => window.clearTimeout(e);
|
|
274
|
-
}, []), c ? null : /* @__PURE__ */
|
|
271
|
+
}, []), c ? null : /* @__PURE__ */ y(m, {
|
|
275
272
|
asChild: !0,
|
|
276
|
-
|
|
273
|
+
container: a.announcerContainer || void 0,
|
|
274
|
+
children: /* @__PURE__ */ y(i, {
|
|
277
275
|
...r,
|
|
278
|
-
children: o && /* @__PURE__ */ v
|
|
276
|
+
children: o && /* @__PURE__ */ b(v, { children: [
|
|
279
277
|
a.label,
|
|
280
278
|
" ",
|
|
281
279
|
n
|
|
282
280
|
] })
|
|
283
281
|
})
|
|
284
282
|
});
|
|
285
|
-
},
|
|
283
|
+
}, "ToastAnnounce"), B = /* @__PURE__ */ g.forwardRef(/* @__PURE__ */ S(function(e, t) {
|
|
286
284
|
let { __scopeToast: n, ...i } = e;
|
|
287
|
-
return /* @__PURE__ */
|
|
285
|
+
return /* @__PURE__ */ y(r.div, {
|
|
288
286
|
...i,
|
|
289
287
|
ref: t
|
|
290
288
|
});
|
|
291
|
-
})
|
|
292
|
-
H.displayName = V;
|
|
293
|
-
var U = "ToastDescription", W = h.forwardRef((e, t) => {
|
|
289
|
+
}, "ToastTitle")), V = /* @__PURE__ */ g.forwardRef(/* @__PURE__ */ S(function(e, t) {
|
|
294
290
|
let { __scopeToast: n, ...i } = e;
|
|
295
|
-
return /* @__PURE__ */
|
|
291
|
+
return /* @__PURE__ */ y(r.div, {
|
|
296
292
|
...i,
|
|
297
293
|
ref: t
|
|
298
294
|
});
|
|
299
|
-
})
|
|
300
|
-
W.displayName = U;
|
|
301
|
-
var G = "ToastAction", K = h.forwardRef((e, t) => {
|
|
295
|
+
}, "ToastDescription")), H = "ToastAction", U = /* @__PURE__ */ g.forwardRef(/* @__PURE__ */ S(function(e, t) {
|
|
302
296
|
let { altText: n, ...r } = e;
|
|
303
|
-
return n.trim() ? /* @__PURE__ */
|
|
297
|
+
return n.trim() ? /* @__PURE__ */ y(G, {
|
|
304
298
|
altText: n,
|
|
305
299
|
asChild: !0,
|
|
306
|
-
children: /* @__PURE__ */
|
|
300
|
+
children: /* @__PURE__ */ y(W, {
|
|
307
301
|
...r,
|
|
308
302
|
ref: t
|
|
309
303
|
})
|
|
310
|
-
}) : (console.error(`Invalid prop \`altText\` supplied to \`${
|
|
311
|
-
})
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
let { __scopeToast: n, ...i } = e, a = z(q, n);
|
|
315
|
-
return /* @__PURE__ */ _(Y, {
|
|
304
|
+
}) : (console.error(`Invalid prop \`altText\` supplied to \`${H}\`. Expected non-empty \`string\`.`), null);
|
|
305
|
+
}, "ToastAction")), ue = "ToastClose", W = /* @__PURE__ */ g.forwardRef(/* @__PURE__ */ S(function(e, t) {
|
|
306
|
+
let { __scopeToast: n, ...i } = e, a = R(ue, n);
|
|
307
|
+
return /* @__PURE__ */ y(G, {
|
|
316
308
|
asChild: !0,
|
|
317
|
-
children: /* @__PURE__ */
|
|
309
|
+
children: /* @__PURE__ */ y(r.button, {
|
|
318
310
|
type: "button",
|
|
319
311
|
...i,
|
|
320
312
|
ref: t,
|
|
321
313
|
onClick: s(e.onClick, a.onClose)
|
|
322
314
|
})
|
|
323
315
|
});
|
|
324
|
-
})
|
|
325
|
-
J.displayName = q;
|
|
326
|
-
var Y = h.forwardRef((e, t) => {
|
|
316
|
+
}, "ToastClose")), G = /* @__PURE__ */ g.forwardRef(/* @__PURE__ */ S(function(e, t) {
|
|
327
317
|
let { __scopeToast: n, altText: i, ...a } = e;
|
|
328
|
-
return /* @__PURE__ */
|
|
318
|
+
return /* @__PURE__ */ y(r.div, {
|
|
329
319
|
"data-radix-toast-announce-exclude": "",
|
|
330
320
|
"data-radix-toast-announce-alt": i || void 0,
|
|
331
321
|
...a,
|
|
332
322
|
ref: t
|
|
333
323
|
});
|
|
334
|
-
});
|
|
335
|
-
function
|
|
324
|
+
}, "ToastAnnounceExclude"));
|
|
325
|
+
function K(e) {
|
|
336
326
|
let t = [];
|
|
337
327
|
return Array.from(e.childNodes).forEach((e) => {
|
|
338
|
-
if (e.nodeType === e.TEXT_NODE && e.textContent && t.push(e.textContent),
|
|
328
|
+
if (e.nodeType === e.TEXT_NODE && e.textContent && t.push(e.textContent), X(e)) {
|
|
339
329
|
let n = e.ariaHidden || e.hidden || e.style.display === "none", r = e.dataset.radixToastAnnounceExclude === "";
|
|
340
330
|
if (!n) if (r) {
|
|
341
331
|
let n = e.dataset.radixToastAnnounceAlt;
|
|
342
332
|
n && t.push(n);
|
|
343
|
-
} else t.push(...
|
|
333
|
+
} else t.push(...K(e));
|
|
344
334
|
}
|
|
345
335
|
}), t;
|
|
346
336
|
}
|
|
347
|
-
|
|
337
|
+
S(K, "getAnnounceTextContent");
|
|
338
|
+
function q(e, t, r, { discrete: i }) {
|
|
348
339
|
let a = r.originalEvent.currentTarget, o = new CustomEvent(e, {
|
|
349
340
|
bubbles: !0,
|
|
350
341
|
cancelable: !0,
|
|
@@ -352,11 +343,12 @@ function Z(e, t, r, { discrete: i }) {
|
|
|
352
343
|
});
|
|
353
344
|
t && a.addEventListener(e, t, { once: !0 }), i ? n(a, o) : a.dispatchEvent(o);
|
|
354
345
|
}
|
|
355
|
-
|
|
346
|
+
S(q, "handleAndDispatchCustomEvent");
|
|
347
|
+
var J = /* @__PURE__ */ S((e, t, n = 0) => {
|
|
356
348
|
let r = Math.abs(e.x), i = Math.abs(e.y), a = r > i;
|
|
357
349
|
return t === "left" || t === "right" ? a && r > n : !a && i > n;
|
|
358
|
-
};
|
|
359
|
-
function
|
|
350
|
+
}, "isDeltaInDirection");
|
|
351
|
+
function Y(e = () => {}) {
|
|
360
352
|
let t = d(e);
|
|
361
353
|
c(() => {
|
|
362
354
|
let e = 0, n = 0;
|
|
@@ -365,64 +357,68 @@ function se(e = () => {}) {
|
|
|
365
357
|
};
|
|
366
358
|
}, [t]);
|
|
367
359
|
}
|
|
368
|
-
|
|
360
|
+
S(Y, "useNextFrame");
|
|
361
|
+
function X(e) {
|
|
369
362
|
return e.nodeType === e.ELEMENT_NODE;
|
|
370
363
|
}
|
|
371
|
-
|
|
372
|
-
|
|
364
|
+
S(X, "isHTMLElement");
|
|
365
|
+
function de(e) {
|
|
366
|
+
let t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: /* @__PURE__ */ S((e) => {
|
|
373
367
|
let t = e.tagName === "INPUT" && e.type === "hidden";
|
|
374
368
|
return e.disabled || e.hidden || t ? NodeFilter.FILTER_SKIP : e.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
375
|
-
} });
|
|
369
|
+
}, "acceptNode") });
|
|
376
370
|
for (; n.nextNode();) t.push(n.currentNode);
|
|
377
371
|
return t;
|
|
378
372
|
}
|
|
379
|
-
|
|
373
|
+
S(de, "getTabbableCandidates");
|
|
374
|
+
function Z(e) {
|
|
380
375
|
let t = document.activeElement;
|
|
381
376
|
return e.some((e) => e === t ? !0 : (e.focus(), document.activeElement !== t));
|
|
382
377
|
}
|
|
383
|
-
|
|
378
|
+
S(Z, "focusFirst");
|
|
379
|
+
var fe = ne, pe = N, me = L, he = B, Q = V, ge = U, _e = W, ve = fe, ye = g.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ y(pe, {
|
|
384
380
|
ref: r,
|
|
385
381
|
className: e("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]", t),
|
|
386
382
|
...n
|
|
387
383
|
}));
|
|
388
|
-
|
|
389
|
-
var
|
|
384
|
+
ye.displayName = pe?.displayName || "ToastViewport";
|
|
385
|
+
var be = x("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", {
|
|
390
386
|
variants: { variant: {
|
|
391
387
|
default: "border bg-background text-foreground",
|
|
392
388
|
destructive: "destructive group border-destructive bg-destructive text-destructive-foreground"
|
|
393
389
|
} },
|
|
394
390
|
defaultVariants: { variant: "default" }
|
|
395
|
-
}),
|
|
391
|
+
}), xe = g.forwardRef(({ className: t, variant: n, ...r }, i) => /* @__PURE__ */ y(me, {
|
|
396
392
|
ref: i,
|
|
397
|
-
className: e(
|
|
393
|
+
className: e(be({ variant: n }), t),
|
|
398
394
|
...r
|
|
399
395
|
}));
|
|
400
|
-
|
|
401
|
-
var
|
|
396
|
+
xe.displayName = me?.displayName || "Toast";
|
|
397
|
+
var Se = g.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ y(ge, {
|
|
402
398
|
ref: r,
|
|
403
399
|
className: e("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", t),
|
|
404
400
|
...n
|
|
405
401
|
}));
|
|
406
|
-
|
|
407
|
-
var
|
|
402
|
+
Se.displayName = ge?.displayName || "ToastAction";
|
|
403
|
+
var Ce = g.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ y(_e, {
|
|
408
404
|
ref: r,
|
|
409
405
|
className: e("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", t),
|
|
410
406
|
"toast-close": "",
|
|
411
407
|
...n,
|
|
412
|
-
children: /* @__PURE__ */
|
|
408
|
+
children: /* @__PURE__ */ y(h, { className: "h-4 w-4" })
|
|
413
409
|
}));
|
|
414
|
-
|
|
415
|
-
var
|
|
410
|
+
Ce.displayName = _e?.displayName || "ToastClose";
|
|
411
|
+
var we = g.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ y(he, {
|
|
416
412
|
ref: r,
|
|
417
413
|
className: e("text-sm font-semibold [&+div]:text-xs", t),
|
|
418
414
|
...n
|
|
419
415
|
}));
|
|
420
|
-
|
|
421
|
-
var
|
|
416
|
+
we.displayName = he?.displayName || "ToastTitle";
|
|
417
|
+
var $ = g.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ y(Q, {
|
|
422
418
|
ref: r,
|
|
423
419
|
className: e("text-sm opacity-90", t),
|
|
424
420
|
...n
|
|
425
421
|
}));
|
|
426
|
-
|
|
422
|
+
$.displayName = Q?.displayName || "ToastDescription";
|
|
427
423
|
//#endregion
|
|
428
|
-
export {
|
|
424
|
+
export { ve as a, $ as i, Se as n, we as o, Ce as r, ye as s, xe as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./chunk-mLOUI7ql.js"),t=require("./utils-ChMUqofy.js"),n=require("./dist-NEeQKKDZ.js"),r=require("./dist-BoNQb2nd.js"),i=require("./dist-v-Y6tnMq.js"),a=require("./dist-DYUvPCPC.js"),o=require("./dist-v9094Auw.js"),s=require("./dist-DZiOPWLp.js"),c=require("./dist-CGgemr2V.js"),l=require("./dist-YAADIsyo.js"),u=require("./dist-D7-Fky36.js"),d=require("./dist-C83rnWRv.js"),f=require("./dist-CdBAkUWT.js"),p=require("./dist-BTN2t9yv.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=`ToastProvider`,[C,w,T]=o.t(`Toast`),[E,ee]=a.t(`Toast`,[T]),[D,O]=E(S),k=x(e=>{let{__scopeToast:t,label:n=`Notification`,duration:r=5e3,swipeDirection:i=`right`,swipeThreshold:a=50,announcerContainer:o,children:s}=e,[c,l]=g.useState(null),[u,d]=g.useState(0),f=g.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${S}\`. Expected non-empty \`string\`.`),(0,v.jsx)(C.Provider,{scope:t,children:(0,v.jsx)(D,{scope:t,label:n,duration:r,swipeDirection:i,swipeThreshold:a,toastCount:u,viewport:c,onViewportChange:l,onToastAdd:g.useCallback(()=>d(e=>e+1),[]),onToastRemove:g.useCallback(()=>d(e=>e-1),[]),isClosePausedRef:f,announcerContainer:o,children:s})})},`ToastProvider`),A=`ToastViewport`,j=[`F8`],M=`toast.viewportPause`,N=`toast.viewportResume`,P=g.forwardRef(x(function(e,t){let{__scopeToast:i,hotkey:a=j,label:o=`Notifications ({hotkey})`,...s}=e,c=O(A,i),l=w(i),u=g.useRef(null),d=g.useRef(null),p=g.useRef(null),m=g.useRef(null),h=n.a(t,m,c.onViewportChange),_=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),y=c.toastCount>0;g.useEffect(()=>{let e=x(e=>{a.length!==0&&a.every(t=>e[t]||e.code===t)&&m.current?.focus()},`handleKeyDown`);return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),g.useEffect(()=>{let e=u.current,t=m.current;if(y&&e&&t){let n=x(()=>{if(!c.isClosePausedRef.current){let e=new CustomEvent(M);t.dispatchEvent(e),c.isClosePausedRef.current=!0}},`handlePause`),r=x(()=>{if(c.isClosePausedRef.current){let e=new CustomEvent(N);t.dispatchEvent(e),c.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,c.isClosePausedRef]);let b=g.useCallback(({tabbingDirection:e})=>{let t=l().map(t=>{let n=t.ref.current,r=[n,...Q(n)];return e===`forwards`?r:r.reverse()});return(e===`forwards`?t.reverse():t).flat()},[l]);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){d.current?.focus();return}let i=b({tabbingDirection:r?`backwards`:`forwards`}),a=i.findIndex(e=>e===n);$(i.slice(a+1))?t.preventDefault():r?d.current?.focus():p.current?.focus()}},`handleKeyDown`);return e.addEventListener(`keydown`,t),()=>e.removeEventListener(`keydown`,t)}},[l,b]),(0,v.jsxs)(f.t,{ref:u,role:`region`,"aria-label":o.replace(`{hotkey}`,_),tabIndex:-1,style:{pointerEvents:y?void 0:`none`},children:[y&&(0,v.jsx)(I,{ref:d,onFocusFromOutsideViewport:()=>{$(b({tabbingDirection:`forwards`}))}}),(0,v.jsx)(C.Slot,{scope:i,children:(0,v.jsx)(r.t.ol,{tabIndex:-1,...s,ref:h})}),y&&(0,v.jsx)(I,{ref:p,onFocusFromOutsideViewport:()=>{$(b({tabbingDirection:`backwards`}))}})]})},`ToastViewport`)),F=`ToastFocusProxy`,I=g.forwardRef(x(function(e,t){let{__scopeToast:n,onFocusFromOutsideViewport:r,...a}=e,o=O(F,n);return(0,v.jsx)(i.r,{tabIndex:0,...a,ref:t,style:{position:`fixed`},onFocus:e=>{let t=e.relatedTarget;o.viewport?.contains(t)||r()}})},`ToastFocusProxy`)),L=`Toast`,te=`toast.swipeStart`,ne=`toast.swipeMove`,re=`toast.swipeCancel`,ie=`toast.swipeEnd`,R=g.forwardRef(x(function(e,t){let{forceMount:n,open:r,defaultOpen:i,onOpenChange:a,...o}=e,[c,f]=l.t({prop:r,defaultProp:i??!0,onChange:a,caller:L});return(0,v.jsx)(u.t,{present:n||c,children:(0,v.jsx)(B,{open:c,...o,ref:t,onClose:()=>f(!1),onPause:d.t(e.onPause),onResume:d.t(e.onResume),onSwipeStart:s.t(e.onSwipeStart,e=>{e.currentTarget.setAttribute(`data-swipe`,`start`)}),onSwipeMove:s.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:s.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:s.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`)),[ae,z]=E(L,{onClose(){}}),B=g.forwardRef(x(function(e,t){let{__scopeToast:i,type:a=`foreground`,duration:o,open:c,onClose:l,onEscapeKeyDown:u,onPause:p,onResume:m,onSwipeStart:h,onSwipeMove:y,onSwipeCancel:b,onSwipeEnd:S,...T}=e,E=O(L,i),ee=w(i),[D,k]=g.useState(null),A=n.a(t,k),j=g.useRef(null),P=g.useRef(null),F=o||E.duration,I=g.useRef(0),R=g.useRef(F),z=g.useRef(0),{onToastAdd:B,onToastRemove:V}=E,H=d.t(()=>{D?.contains(document.activeElement)&&E.viewport?.focus(),l()}),U=g.useCallback(e=>{!e||e===1/0||(window.clearTimeout(z.current),I.current=new Date().getTime(),z.current=window.setTimeout(H,e))},[H]);g.useEffect(()=>{let e=E.viewport;if(e){let t=x(()=>{U(R.current),m?.()},`handleResume`),n=x(()=>{let e=new Date().getTime()-I.current;R.current-=e,window.clearTimeout(z.current),p?.()},`handlePause`);return e.addEventListener(M,n),e.addEventListener(N,t),()=>{e.removeEventListener(M,n),e.removeEventListener(N,t)}}},[E.viewport,F,p,m,U]),g.useEffect(()=>{c&&!E.isClosePausedRef.current&&U(F)},[c,F,E.isClosePausedRef,U]),g.useEffect(()=>()=>{window.clearTimeout(z.current)},[]),g.useEffect(()=>(B(),()=>V()),[B,V]);let W=g.useMemo(()=>D?q(D):null,[D]);return E.viewport?(0,v.jsxs)(v.Fragment,{children:[W&&(0,v.jsx)(oe,{__scopeToast:i,role:`status`,"aria-live":a===`foreground`?`assertive`:`polite`,children:W}),(0,v.jsx)(ae,{scope:i,onClose:H,children:_.createPortal((0,v.jsx)(C.ItemSlot,{scope:i,children:(0,v.jsx)(f.r,{asChild:!0,onEscapeKeyDown:s.t(u,e=>{ee().some(t=>t.ref.current?.contains(e.target))||H()}),children:(0,v.jsx)(r.t.li,{tabIndex:0,"data-state":c?`open`:`closed`,"data-swipe-direction":E.swipeDirection,...T,ref:A,style:{userSelect:`none`,touchAction:`none`,...e.style},onKeyDown:s.t(e.onKeyDown,e=>{e.key===`Escape`&&(u?.(e.nativeEvent),e.nativeEvent.defaultPrevented||H())}),onPointerDown:s.t(e.onPointerDown,e=>{e.button===0&&(j.current={x:e.clientX,y:e.clientY})}),onPointerMove:s.t(e.onPointerMove,e=>{if(!j.current)return;let t=e.clientX-j.current.x,n=e.clientY-j.current.y,r=!!P.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?(P.current=l,J(ne,y,u,{discrete:!1})):Y(l,E.swipeDirection,c)?(P.current=l,J(te,h,u,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>c||Math.abs(n)>c)&&(j.current=null)}),onPointerUp:s.t(e.onPointerUp,e=>{let t=P.current,n=e.target;if(n.hasPointerCapture(e.pointerId)&&n.releasePointerCapture(e.pointerId),P.current=null,j.current=null,t){let n=e.currentTarget,r={originalEvent:e,delta:t};Y(t,E.swipeDirection,E.swipeThreshold)?J(ie,S,r,{discrete:!0}):J(re,b,r,{discrete:!0}),n.addEventListener(`click`,e=>e.preventDefault(),{once:!0})}})})})}),E.viewport)})]}):null},`ToastImpl`)),oe=x(e=>{let{__scopeToast:t,children:n,...r}=e,a=O(L,t),[o,s]=g.useState(!1),[c,l]=g.useState(!1);return X(()=>s(!0)),g.useEffect(()=>{let e=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(e)},[]),c?null:(0,v.jsx)(p.t,{asChild:!0,container:a.announcerContainer||void 0,children:(0,v.jsx)(i.r,{...r,children:o&&(0,v.jsxs)(v.Fragment,{children:[a.label,` `,n]})})})},`ToastAnnounce`),V=g.forwardRef(x(function(e,t){let{__scopeToast:n,...i}=e;return(0,v.jsx)(r.t.div,{...i,ref:t})},`ToastTitle`)),H=g.forwardRef(x(function(e,t){let{__scopeToast:n,...i}=e;return(0,v.jsx)(r.t.div,{...i,ref:t})},`ToastDescription`)),U=`ToastAction`,W=g.forwardRef(x(function(e,t){let{altText:n,...r}=e;return n.trim()?(0,v.jsx)(K,{altText:n,asChild:!0,children:(0,v.jsx)(G,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${U}\`. Expected non-empty \`string\`.`),null)},`ToastAction`)),se=`ToastClose`,G=g.forwardRef(x(function(e,t){let{__scopeToast:n,...i}=e,a=z(se,n);return(0,v.jsx)(K,{asChild:!0,children:(0,v.jsx)(r.t.button,{type:`button`,...i,ref:t,onClick:s.t(e.onClick,a.onClose)})})},`ToastClose`)),K=g.forwardRef(x(function(e,t){let{__scopeToast:n,altText:i,...a}=e;return(0,v.jsx)(r.t.div,{"data-radix-toast-announce-exclude":``,"data-radix-toast-announce-alt":i||void 0,...a,ref:t})},`ToastAnnounceExclude`));function q(e){let t=[];return Array.from(e.childNodes).forEach(e=>{if(e.nodeType===e.TEXT_NODE&&e.textContent&&t.push(e.textContent),Z(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(...q(e))}}),t}x(q,`getAnnounceTextContent`);function J(e,t,n,{discrete:i}){let a=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),i?r.n(a,o):a.dispatchEvent(o)}x(J,`handleAndDispatchCustomEvent`);var Y=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},`isDeltaInDirection`);function X(e=()=>{}){let t=d.t(e);c.t(()=>{let e=0,n=0;return e=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(n)}},[t])}x(X,`useNextFrame`);function Z(e){return e.nodeType===e.ELEMENT_NODE}x(Z,`isHTMLElement`);function Q(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(Q,`getTabbableCandidates`);function $(e){let t=document.activeElement;return e.some(e=>e===t?!0:(e.focus(),document.activeElement!==t))}x($,`focusFirst`);var ce=k,le=P,ue=R,de=V,fe=H,pe=W,me=G,he=ce,ge=h.forwardRef(({className:e,...n},r)=>(0,v.jsx)(le,{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}));ge.displayName=le?.displayName||`ToastViewport`;var _e=(0,y.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`}}),ve=h.forwardRef(({className:e,variant:n,...r},i)=>(0,v.jsx)(ue,{ref:i,className:t.t(_e({variant:n}),e),...r}));ve.displayName=ue?.displayName||`Toast`;var ye=h.forwardRef(({className:e,...n},r)=>(0,v.jsx)(pe,{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}));ye.displayName=pe?.displayName||`ToastAction`;var be=h.forwardRef(({className:e,...n},r)=>(0,v.jsx)(me,{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)(m.X,{className:`h-4 w-4`})}));be.displayName=me?.displayName||`ToastClose`;var xe=h.forwardRef(({className:e,...n},r)=>(0,v.jsx)(de,{ref:r,className:t.t(`text-sm font-semibold [&+div]:text-xs`,e),...n}));xe.displayName=de?.displayName||`ToastTitle`;var Se=h.forwardRef(({className:e,...n},r)=>(0,v.jsx)(fe,{ref:r,className:t.t(`text-sm opacity-90`,e),...n}));Se.displayName=fe?.displayName||`ToastDescription`,Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return he}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return Se}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return ye}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return xe}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return be}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return ge}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return ve}});
|
package/dist/toast.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./toast-
|
|
1
|
+
"use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./toast-D1fjLwO1.js");exports.Toast=e.t,exports.ToastAction=e.n,exports.ToastClose=e.r,exports.ToastDescription=e.i,exports.ToastProvider=e.a,exports.ToastTitle=e.o,exports.ToastViewport=e.s;
|
package/dist/toast.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client";
|
|
3
|
-
import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./toast-
|
|
3
|
+
import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./toast-BOdziIGg.mjs";
|
|
4
4
|
export { o as Toast, n as ToastAction, i as ToastClose, t as ToastDescription, e as ToastProvider, r as ToastTitle, a as ToastViewport };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as e, i as t, o as n, r, s as i, t as a } from "./toast-
|
|
1
|
+
import { a as e, i as t, o as n, r, s as i, t as a } from "./toast-BOdziIGg.mjs";
|
|
2
2
|
import * as o from "react";
|
|
3
3
|
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
4
4
|
//#region src/hooks/use-toast.ts
|