@gv-tech/ui-web 2.29.0 → 2.29.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__contracts.d.ts +0 -1
- package/dist/__contracts.d.ts.map +1 -1
- package/dist/accordion-Bd0-CZQn.js +1 -0
- package/dist/accordion-Cf6DNbLH.mjs +244 -0
- package/dist/accordion.cjs +1 -1
- package/dist/accordion.d.ts +1 -1
- package/dist/accordion.d.ts.map +1 -1
- package/dist/accordion.mjs +1 -2
- package/dist/{alert-dialog-BkUyJb_F.mjs → alert-dialog-BxFH0Lwn.mjs} +73 -75
- package/dist/alert-dialog-C6vNmGBL.js +1 -0
- package/dist/alert-dialog.cjs +1 -1
- package/dist/alert-dialog.d.ts +1 -1
- package/dist/alert-dialog.d.ts.map +1 -1
- package/dist/alert-dialog.mjs +1 -2
- package/dist/alert.cjs +1 -1
- package/dist/alert.d.ts +1 -1
- package/dist/alert.d.ts.map +1 -1
- package/dist/alert.mjs +4 -5
- package/dist/{aspect-ratio-C7oBX-p_.mjs → aspect-ratio-CdQevcDV.mjs} +4 -6
- package/dist/aspect-ratio-Z4Nkc56X.js +1 -0
- package/dist/aspect-ratio.cjs +1 -1
- package/dist/aspect-ratio.d.ts +2 -2
- package/dist/aspect-ratio.d.ts.map +1 -1
- package/dist/aspect-ratio.mjs +1 -2
- package/dist/attachment.cjs +1 -1
- package/dist/attachment.d.ts +2 -2
- package/dist/attachment.d.ts.map +1 -1
- package/dist/attachment.mjs +5 -6
- package/dist/avatar-B5PWwGhY.mjs +136 -0
- package/dist/avatar-CFhYRM52.js +1 -0
- package/dist/avatar.cjs +1 -1
- package/dist/avatar.d.ts +1 -1
- package/dist/avatar.d.ts.map +1 -1
- package/dist/avatar.mjs +1 -2
- 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 +6 -7
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.d.ts.map +1 -1
- package/dist/breadcrumb.mjs +3 -6
- package/dist/bubble.cjs +1 -1
- package/dist/bubble.d.ts +1 -1
- package/dist/bubble.d.ts.map +1 -1
- package/dist/bubble.mjs +6 -7
- package/dist/button-group.cjs +1 -1
- package/dist/button-group.d.ts +4 -4
- package/dist/button-group.d.ts.map +1 -1
- package/dist/button-group.mjs +5 -7
- 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 +5 -6
- package/dist/calendar-D5qgt2o2.js +1 -0
- package/dist/{calendar-CkHWa9Uu.mjs → calendar-DIqXNjOR.mjs} +732 -879
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.d.ts +1 -1
- package/dist/calendar.d.ts.map +1 -1
- package/dist/calendar.mjs +1 -2
- package/dist/card.cjs +1 -1
- package/dist/card.d.ts.map +1 -1
- package/dist/card.mjs +2 -3
- package/dist/carousel-D-xEqRCX.js +1 -0
- package/dist/{carousel-ynaeMNIV.mjs → carousel-DPjWmM_A.mjs} +15 -19
- package/dist/carousel.cjs +1 -1
- package/dist/carousel.d.ts +3 -3
- package/dist/carousel.d.ts.map +1 -1
- package/dist/carousel.mjs +1 -2
- package/dist/chart.cjs +2 -2
- package/dist/chart.mjs +14 -15
- package/dist/{checkbox-BLvAEmRC.mjs → checkbox-DEPm1BBc.mjs} +70 -68
- package/dist/checkbox-DI9Hn_e_.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 -2
- package/dist/chunk-HBS6WEDP-D2-yWzIN.js +1 -0
- package/dist/{chunk-HBS6WEDP-CzyhzCaP.mjs → chunk-HBS6WEDP-DD8ZmxRM.mjs} +3 -4
- package/dist/collapsible.cjs +1 -1
- package/dist/collapsible.d.ts +4 -4
- package/dist/collapsible.d.ts.map +1 -1
- package/dist/collapsible.mjs +8 -9
- package/dist/combobox-C4y8AbZX.mjs +5644 -0
- package/dist/combobox-boXp-mix.js +3 -0
- package/dist/combobox.cjs +1 -1
- package/dist/combobox.d.ts.map +1 -1
- package/dist/combobox.mjs +1 -2
- package/dist/command-BnW6UIVk.js +1 -0
- package/dist/{command-DY6u8V0D.mjs → command-Cbsp7PBx.mjs} +121 -124
- package/dist/command.cjs +1 -1
- package/dist/command.d.ts +1 -1
- package/dist/command.d.ts.map +1 -1
- package/dist/command.mjs +1 -2
- package/dist/context-menu-CwsdFpx1.js +1 -0
- package/dist/{context-menu-tL6CY6a0.mjs → context-menu-FNgV55ZV.mjs} +137 -140
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.d.ts +1 -1
- package/dist/context-menu.d.ts.map +1 -1
- package/dist/context-menu.mjs +1 -2
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.d.ts +1 -1
- package/dist/dialog.d.ts.map +1 -1
- package/dist/dialog.mjs +3 -4
- 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 +2 -3
- package/dist/dist-7YyzJonC.mjs +39 -0
- package/dist/dist-AlmToDtO.mjs +17 -0
- package/dist/{dist-DyMv0xk8.mjs → dist-B76UOZbx.mjs} +1 -2
- package/dist/{dist-BQhMregZ.mjs → dist-B7Ph9-T6.mjs} +2 -3
- package/dist/dist-B7jnFMko.js +1 -0
- package/dist/{dist-CS572Be42.mjs → dist-BOiFyvyS.mjs} +1 -2
- package/dist/dist-BQkDLAY7.js +1 -0
- package/dist/dist-Bal96K8t.js +1 -0
- package/dist/dist-Blgp9lfa.js +1 -0
- package/dist/{dist-Dg9ASyqI.mjs → dist-BnlI08Je.mjs} +4 -4
- package/dist/{dist-5r7hQmO0.mjs → dist-Bu-uFV1C.mjs} +60 -56
- package/dist/dist-C2BHd5i1.mjs +460 -0
- package/dist/{dist-8fYwoWd4.mjs → dist-C516Vwxy.mjs} +23 -18
- package/dist/dist-CBlqVBTk.js +1 -0
- package/dist/dist-CDcZ8WMF.js +1 -0
- package/dist/dist-CDksSmTD.mjs +189 -0
- package/dist/dist-CF-qVmmV.js +1 -0
- package/dist/dist-CIgGRTmJ.js +1 -0
- package/dist/dist-CJqVmdrU.js +1 -0
- package/dist/{dist-DMwCTE2i.mjs → dist-COqM3IM6.mjs} +3 -4
- package/dist/{dist-CYrqAnIr.mjs → dist-CbWpCWog.mjs} +13 -15
- package/dist/{dist-rx5WaFf5.mjs → dist-CcGLWbPa.mjs} +3 -4
- package/dist/dist-Cn4F8XlY.mjs +220 -0
- package/dist/dist-CoTs6T03.js +1 -0
- package/dist/dist-Co_xSt6d.js +1 -0
- package/dist/{dist-CBsYNwXz.mjs → dist-Cu0GG-3j.mjs} +2 -3
- package/dist/{dist-BUXpRW9O.mjs → dist-DKI-XYwI.mjs} +3 -5
- package/dist/dist-DQeXXRYL.mjs +201 -0
- package/dist/dist-DW2ltK5-.js +1 -0
- package/dist/dist-DWcKY_sJ.js +1 -0
- package/dist/dist-DdAeWIwf.js +1 -0
- package/dist/dist-DhubV_gU.mjs +4 -0
- package/dist/dist-DmY7elIQ.js +1 -0
- package/dist/{dist-Dm3IQk5b.mjs → dist-DoWtzxYc.mjs} +234 -235
- package/dist/dist-DuQlxGyN.js +1 -0
- package/dist/dist-KFF7QKuL.js +1 -0
- package/dist/dist-RXrZgzkO.js +1 -0
- package/dist/dist-R_G5UQRm.js +1 -0
- package/dist/dist-dwRwxUPt.mjs +22 -0
- package/dist/dist-fzmUl3YX.mjs +553 -0
- package/dist/{dist-ByW6RHeZ.mjs → dist-hBsne-A2.mjs} +24 -26
- package/dist/{dist-BIXhHahX.mjs → dist-ljiGYyay.mjs} +4 -5
- package/dist/dist-pqMcQ1Nk.js +1 -0
- package/dist/dist-zmnQp5Xf.js +1 -0
- package/dist/drawer.cjs +1 -1
- package/dist/drawer.d.ts +1 -1
- package/dist/drawer.d.ts.map +1 -1
- package/dist/drawer.mjs +2 -3
- package/dist/dropdown-menu-ChuqZeix.js +1 -0
- package/dist/{dropdown-menu-BWqWoYis.mjs → dropdown-menu-DU7KNoXP.mjs} +131 -133
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.d.ts +1 -1
- package/dist/dropdown-menu.d.ts.map +1 -1
- package/dist/dropdown-menu.mjs +1 -2
- package/dist/empty.cjs +1 -1
- package/dist/empty.d.ts +7 -7
- package/dist/empty.d.ts.map +1 -1
- package/dist/empty.mjs +3 -4
- package/dist/es2015-BooeZGhO.mjs +554 -0
- package/dist/es2015-Dggv0vx3.js +41 -0
- package/dist/field.cjs +1 -1
- package/dist/field.d.ts +12 -12
- package/dist/field.d.ts.map +1 -1
- package/dist/field.mjs +6 -8
- package/dist/{floating-ui.react-dom-CyupHsR6.mjs → floating-ui.react-dom-2hihjuTL.mjs} +12 -17
- package/dist/floating-ui.react-dom-BtFIezY4.js +1 -0
- package/dist/form.cjs +1 -1
- package/dist/form.d.ts +3 -3
- package/dist/form.d.ts.map +1 -1
- package/dist/form.mjs +19 -20
- package/dist/hooks/use-theme.d.ts +52 -52
- package/dist/hover-card-BeqCs_2R.js +1 -0
- package/dist/hover-card-w8PmCyw2.mjs +176 -0
- package/dist/hover-card.cjs +1 -1
- package/dist/hover-card.d.ts +1 -1
- package/dist/hover-card.d.ts.map +1 -1
- package/dist/hover-card.mjs +1 -2
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +66 -66
- package/dist/input-group.cjs +1 -1
- package/dist/input-group.d.ts +3 -3
- package/dist/input-group.d.ts.map +1 -1
- package/dist/input-group.mjs +5 -11
- package/dist/{input-otp-m_BTudNY.mjs → input-otp-Bn_Uy1mR.mjs} +7 -18
- package/dist/input-otp-CTRB_0Xp.js +20 -0
- package/dist/input-otp.cjs +1 -1
- package/dist/input-otp.d.ts +1 -1
- package/dist/input-otp.d.ts.map +1 -1
- package/dist/input-otp.mjs +1 -2
- package/dist/input.cjs +1 -1
- package/dist/input.d.ts.map +1 -1
- package/dist/input.mjs +2 -3
- package/dist/item.cjs +1 -1
- package/dist/item.d.ts +2 -2
- package/dist/item.d.ts.map +1 -1
- package/dist/item.mjs +7 -9
- 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 -3
- package/dist/{label-DVA-YKpB.mjs → label-Da0kELfR.mjs} +4 -6
- package/dist/label-JMa1tFfC.js +1 -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 -2
- package/dist/marker.cjs +1 -1
- package/dist/marker.d.ts +1 -1
- package/dist/marker.d.ts.map +1 -1
- package/dist/marker.mjs +6 -7
- package/dist/menubar-B7sRxpE4.mjs +405 -0
- package/dist/menubar-Bd-QKMcw.js +1 -0
- package/dist/menubar.cjs +1 -1
- package/dist/menubar.d.ts +1 -1
- package/dist/menubar.d.ts.map +1 -1
- package/dist/menubar.mjs +1 -2
- package/dist/{message-scroller-FwdKclRM.mjs → message-scroller-B8AU0v3Y.mjs} +83 -102
- package/dist/message-scroller-BJb4Mh_I.js +1 -0
- package/dist/message-scroller.cjs +1 -1
- package/dist/message-scroller.d.ts +1 -1
- package/dist/message-scroller.d.ts.map +1 -1
- package/dist/message-scroller.mjs +1 -2
- package/dist/message.cjs +1 -1
- package/dist/message.d.ts.map +1 -1
- package/dist/message.mjs +2 -3
- package/dist/native-select.cjs +1 -1
- package/dist/native-select.d.ts.map +1 -1
- package/dist/native-select.mjs +2 -3
- package/dist/navigation-menu-B-RwfscB.mjs +638 -0
- package/dist/navigation-menu-kPwxYZCR.js +1 -0
- package/dist/navigation-menu.cjs +1 -1
- package/dist/navigation-menu.d.ts +1 -1
- package/dist/navigation-menu.d.ts.map +1 -1
- package/dist/navigation-menu.mjs +1 -2
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.d.ts +2 -2
- package/dist/pagination.d.ts.map +1 -1
- package/dist/pagination.mjs +5 -5
- package/dist/popover-Cq5cTNtC.js +1 -0
- package/dist/popover-T6Ra737i.mjs +241 -0
- package/dist/popover.cjs +1 -1
- package/dist/popover.d.ts +1 -1
- package/dist/popover.d.ts.map +1 -1
- package/dist/popover.mjs +1 -2
- package/dist/{progress-ClcVCqjl.mjs → progress-e9YzxvRo.mjs} +15 -18
- package/dist/progress-iUSEI7J9.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 -2
- package/dist/{questionnaire-DKWcZeWT.mjs → questionnaire-BLCvUX1C.mjs} +153 -175
- package/dist/questionnaire-CcymIPae.js +1 -0
- package/dist/questionnaire.cjs +1 -1
- package/dist/questionnaire.d.ts +1 -1
- package/dist/questionnaire.d.ts.map +1 -1
- package/dist/questionnaire.mjs +1 -2
- package/dist/{radio-group-5VwmCXRK.mjs → radio-group-BKpiDcIb.mjs} +76 -77
- package/dist/radio-group-DPEzCmxe.js +1 -0
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.mjs +1 -2
- package/dist/resizable-ByF0NmN9.mjs +2153 -0
- package/dist/resizable-oL3v42zT.js +1 -0
- package/dist/resizable.cjs +1 -1
- package/dist/resizable.d.ts +3 -3
- package/dist/resizable.mjs +1 -2
- package/dist/{chunk-BmowowmI.mjs → rolldown-runtime-D7yIeQp2.mjs} +2 -3
- package/dist/rolldown-runtime-DbbDpzbe.js +1 -0
- package/dist/scroll-area-BzNeOQ6C.mjs +568 -0
- package/dist/scroll-area-s4_ZJK59.js +1 -0
- package/dist/scroll-area.cjs +1 -1
- package/dist/scroll-area.d.ts +1 -1
- package/dist/scroll-area.d.ts.map +1 -1
- package/dist/scroll-area.mjs +1 -2
- package/dist/scroll-to-top.cjs +1 -1
- package/dist/scroll-to-top.d.ts.map +1 -1
- package/dist/scroll-to-top.mjs +13 -16
- package/dist/search.cjs +1 -1
- package/dist/search.d.ts.map +1 -1
- package/dist/search.mjs +12 -13
- package/dist/select-B_nRxX2Y.mjs +831 -0
- package/dist/select-j5_dph9S.js +1 -0
- package/dist/select.cjs +1 -1
- package/dist/select.d.ts +1 -1
- package/dist/select.d.ts.map +1 -1
- package/dist/select.mjs +1 -2
- package/dist/separator-Bn-3XUSJ.js +1 -0
- package/dist/separator-CCcMNS78.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 -2
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.d.ts +1 -1
- package/dist/sheet.d.ts.map +1 -1
- package/dist/sheet.mjs +3 -4
- package/dist/{sidebar-B5q6nH2G.mjs → sidebar-C2ax_A0G.mjs} +50 -52
- package/dist/sidebar-Cnem2n5A.js +1 -0
- package/dist/sidebar.cjs +1 -1
- package/dist/sidebar.d.ts +1 -1
- package/dist/sidebar.d.ts.map +1 -1
- package/dist/sidebar.mjs +1 -2
- 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 +2 -3
- package/dist/slider-B2PUTc7W.mjs +484 -0
- package/dist/slider-wZuXwuib.js +1 -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 -2
- package/dist/sonner.d.ts +1 -1
- package/dist/sonner.mjs +1 -2
- package/dist/spinner.cjs +1 -1
- package/dist/spinner.d.ts +2 -1
- package/dist/spinner.d.ts.map +1 -1
- package/dist/spinner.mjs +10 -7
- package/dist/support-fab.cjs +1 -1
- package/dist/support-fab.d.ts.map +1 -1
- package/dist/support-fab.mjs +21 -22
- package/dist/switch-CD675xU7.js +1 -0
- package/dist/{switch-DagjjAQu.mjs → switch-ikzIzrme.mjs} +66 -64
- 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 -2
- package/dist/table-of-contents.cjs +1 -1
- package/dist/table-of-contents.d.ts +5 -10
- package/dist/table-of-contents.d.ts.map +1 -1
- package/dist/table-of-contents.mjs +6 -6
- package/dist/table.cjs +1 -1
- package/dist/table.d.ts.map +1 -1
- package/dist/table.mjs +2 -3
- package/dist/{tabs-OQ6rj-3B.mjs → tabs-DCm5zOYB.mjs} +73 -73
- package/dist/tabs-fcahDQDp.js +1 -0
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.d.ts +1 -1
- package/dist/tabs.d.ts.map +1 -1
- package/dist/tabs.mjs +1 -2
- package/dist/text.cjs +1 -1
- package/dist/text.d.ts +1 -1
- package/dist/text.d.ts.map +1 -1
- package/dist/text.mjs +17 -15
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.d.ts.map +1 -1
- package/dist/textarea.mjs +2 -3
- package/dist/theme-provider.d.ts +1 -1
- package/dist/theme-provider.d.ts.map +1 -1
- package/dist/theme-provider.mjs +1 -2
- package/dist/theme-toggle-BGTJsIA-.js +1 -0
- package/dist/{theme-toggle-BCcH-QtH.mjs → theme-toggle-BSMwXb8o.mjs} +29 -22
- 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 -2
- package/dist/toast-C31v9P1K.js +1 -0
- package/dist/toast-vU5ISM03.mjs +445 -0
- package/dist/toast.cjs +1 -1
- package/dist/toast.d.ts +1 -1
- package/dist/toast.d.ts.map +1 -1
- package/dist/toast.mjs +1 -2
- package/dist/toaster-CaJyOCyC.js +1 -0
- package/dist/{toaster-CKAJ9cht.mjs → toaster-D2BV6jez.mjs} +3 -5
- 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 -2
- package/dist/toggle-CSZdCCwX.js +1 -0
- package/dist/{toggle-CuLxBIWH.mjs → toggle-Cv9YYwLI.mjs} +14 -15
- package/dist/toggle-group-RT8wyBwK.js +1 -0
- package/dist/toggle-group-qvjasXS-.mjs +166 -0
- package/dist/toggle-group.cjs +1 -1
- package/dist/toggle-group.d.ts +1 -1
- package/dist/toggle-group.d.ts.map +1 -1
- package/dist/toggle-group.mjs +1 -2
- 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 -2
- package/dist/tooltip-7ERoN5mV.mjs +386 -0
- package/dist/tooltip-CC9_spXT.js +1 -0
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.d.ts +1 -1
- package/dist/tooltip.d.ts.map +1 -1
- package/dist/tooltip.mjs +1 -2
- package/dist/{utils-A_oVsYw5.mjs → utils-DQKc9joa.mjs} +1 -2
- package/package.json +18 -18
- package/src/__contracts.ts +318 -321
- package/src/accordion.tsx +1 -2
- package/src/alert-dialog.tsx +1 -2
- package/src/alert.tsx +3 -4
- package/src/aspect-ratio.tsx +1 -2
- package/src/attachment.tsx +8 -9
- package/src/avatar.tsx +1 -2
- package/src/badge.tsx +2 -3
- package/src/breadcrumb.tsx +1 -4
- package/src/bubble.tsx +7 -8
- package/src/button-group.tsx +2 -3
- package/src/button.tsx +3 -4
- package/src/calendar.tsx +8 -9
- package/src/card.tsx +1 -2
- package/src/carousel.tsx +9 -10
- package/src/checkbox.tsx +1 -2
- package/src/collapsible.tsx +1 -2
- package/src/combobox.tsx +6 -7
- package/src/command.tsx +1 -2
- package/src/context-menu.tsx +1 -2
- package/src/dialog.tsx +1 -2
- package/src/direction.tsx +1 -2
- package/src/drawer.tsx +1 -2
- package/src/dropdown-menu.tsx +1 -2
- package/src/empty.tsx +2 -3
- package/src/field.tsx +9 -11
- package/src/form.tsx +8 -8
- package/src/hooks/use-mobile.ts +1 -1
- package/src/hover-card.tsx +1 -2
- package/src/input-group.tsx +12 -21
- package/src/input-otp.tsx +5 -6
- package/src/input.tsx +1 -2
- package/src/item.tsx +10 -12
- package/src/kbd.tsx +1 -2
- package/src/label.tsx +1 -2
- package/src/marker.tsx +4 -5
- package/src/menubar.tsx +1 -2
- package/src/message-scroller.tsx +9 -10
- package/src/message.tsx +2 -3
- package/src/native-select.tsx +3 -4
- package/src/navigation-menu.tsx +2 -3
- package/src/pagination.tsx +5 -4
- package/src/popover.tsx +1 -2
- package/src/progress.tsx +1 -2
- package/src/questionnaire.tsx +6 -7
- package/src/scroll-area.tsx +1 -2
- package/src/scroll-to-top.tsx +7 -2
- package/src/search.tsx +2 -1
- package/src/select.tsx +1 -2
- package/src/separator.tsx +1 -2
- package/src/setupTests.ts +9 -9
- package/src/sheet.tsx +1 -2
- package/src/sidebar.tsx +15 -16
- package/src/skeleton.tsx +1 -2
- package/src/slider.tsx +1 -2
- package/src/spinner.tsx +8 -7
- package/src/support-fab.tsx +5 -1
- package/src/switch.tsx +1 -2
- package/src/table-of-contents.tsx +8 -11
- package/src/table.tsx +1 -2
- package/src/tabs.tsx +2 -3
- package/src/text.tsx +4 -4
- package/src/textarea.tsx +1 -2
- package/src/theme-provider.tsx +1 -1
- package/src/theme-toggle.tsx +26 -23
- package/src/toast.tsx +3 -4
- package/src/toaster.tsx +2 -1
- package/src/toggle-group.tsx +1 -2
- package/src/toggle.tsx +3 -4
- package/src/tooltip.tsx +1 -2
- package/dist/accordion-BgbjpZAF.js +0 -1
- package/dist/accordion-Bqt-y-u7.mjs +0 -239
- package/dist/alert-dialog-DonbkCSD.js +0 -1
- package/dist/aspect-ratio-X3HWxQz0.js +0 -1
- package/dist/avatar-DTkhTxt7.mjs +0 -133
- package/dist/avatar-DhvZbCtI.js +0 -1
- package/dist/calendar-Bo8kovKR.js +0 -1
- package/dist/carousel-Cv5isLeg.js +0 -1
- package/dist/checkbox-Dt06B4YW.js +0 -1
- package/dist/chunk-HBS6WEDP-CQNaACTf.js +0 -1
- package/dist/chunk-mLOUI7ql.js +0 -1
- package/dist/combobox-BB_YzCTY.js +0 -4
- package/dist/combobox-YxjYGUoe.mjs +0 -5748
- package/dist/command-BqO-CfH6.js +0 -1
- package/dist/context-menu-Dad9hs94.js +0 -1
- package/dist/dist-6c2NeKfz.mjs +0 -536
- package/dist/dist-9-j0_8D1.mjs +0 -34
- package/dist/dist-BMl8xXCH.mjs +0 -188
- package/dist/dist-BOKg7rhq.js +0 -1
- package/dist/dist-BPhn-EOy.mjs +0 -15
- package/dist/dist-BTN2t9yv.js +0 -1
- package/dist/dist-Bivv8B6p.mjs +0 -16
- package/dist/dist-BoNQb2nd.js +0 -1
- package/dist/dist-C83rnWRv.js +0 -1
- package/dist/dist-C8Pm6LRc.js +0 -1
- package/dist/dist-CGgemr2V.js +0 -1
- package/dist/dist-C_iFkwIX.js +0 -1
- package/dist/dist-CdBAkUWT.js +0 -1
- package/dist/dist-Cn7g8jD0.js +0 -1
- package/dist/dist-D7-Fky36.js +0 -1
- package/dist/dist-D7UHN1DJ.mjs +0 -5
- package/dist/dist-DOoZ3vGL.mjs +0 -407
- package/dist/dist-DYUvPCPC.js +0 -1
- package/dist/dist-DcRkoHAk.js +0 -1
- package/dist/dist-DfvK7DpO.mjs +0 -213
- package/dist/dist-Dj9s8AIv.js +0 -1
- package/dist/dist-NEeQKKDZ.js +0 -1
- package/dist/dist-N_70prl1.js +0 -1
- package/dist/dist-YAADIsyo.js +0 -1
- package/dist/dist-dMp9dzmY.mjs +0 -20
- package/dist/dist-mHQuNOH-.js +0 -1
- package/dist/dist-oyFh63Uq.js +0 -1
- package/dist/dist-v-Y6tnMq.js +0 -1
- package/dist/dist-v9094Auw.js +0 -1
- package/dist/dist-yA6iVq_M.js +0 -1
- package/dist/dropdown-menu-BpZcobmP.js +0 -1
- package/dist/es2015-CYxXY2oV.mjs +0 -727
- package/dist/es2015-t2RPC0Rg.js +0 -41
- package/dist/floating-ui.react-dom-BwFRxNGc.js +0 -1
- package/dist/hover-card-7NjGqlP0.js +0 -1
- package/dist/hover-card-DuRUptxQ.mjs +0 -176
- package/dist/input-otp-D9MwUsPO.js +0 -20
- package/dist/label-CgKiKHKG.js +0 -1
- package/dist/menubar-CyKBLHme.mjs +0 -405
- package/dist/menubar-DlOMZeh1.js +0 -1
- package/dist/message-scroller-DqLu0YI6.js +0 -1
- package/dist/navigation-menu-BzE1J1rs.mjs +0 -608
- package/dist/navigation-menu-CrR01R8Z.js +0 -1
- package/dist/popover-CFF_HXSf.mjs +0 -222
- package/dist/popover-D9pVy08c.js +0 -1
- package/dist/progress-nfJMuKGj.js +0 -6
- package/dist/questionnaire-PWClWvST.js +0 -1
- package/dist/radio-group-DhXnB0fI.js +0 -1
- package/dist/resizable-ChIqXiu4.js +0 -1
- package/dist/resizable-CpovHnG-.mjs +0 -1573
- package/dist/scroll-area-CUqjuvqH.js +0 -1
- package/dist/scroll-area-DstdIGvS.mjs +0 -539
- package/dist/select-CnCTQeh7.js +0 -1
- package/dist/select-CnHZdna2.mjs +0 -792
- package/dist/separator-BXaVJadH.js +0 -1
- package/dist/separator-D1a8myFf.mjs +0 -38
- package/dist/sidebar-ns_2TNBM.js +0 -1
- package/dist/slider-PoIV6N-u.js +0 -1
- package/dist/slider-ZnyQjYsS.mjs +0 -460
- package/dist/switch-DLY8PkmL.js +0 -1
- package/dist/tabs-QBWdNfSK.js +0 -1
- package/dist/theme-toggle-Q3UHstP_.js +0 -1
- package/dist/toast-BOdziIGg.mjs +0 -424
- package/dist/toast-D1fjLwO1.js +0 -1
- package/dist/toaster-DS9iODKU.js +0 -1
- package/dist/toggle-DtpvPox_.js +0 -1
- package/dist/toggle-group-DfkvPKU_.mjs +0 -164
- package/dist/toggle-group-UHY0Tip1.js +0 -1
- package/dist/tooltip-BbCL1gtU.mjs +0 -384
- package/dist/tooltip-BvpyStn2.js +0 -1
- /package/dist/{dist-DJqkhIXb2.js → dist-DJqkhIXb.js} +0 -0
package/dist/toast-BOdziIGg.mjs
DELETED
|
@@ -1,424 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./utils-A_oVsYw5.mjs";
|
|
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, {
|
|
26
|
-
scope: t,
|
|
27
|
-
children: /* @__PURE__ */ y(O, {
|
|
28
|
-
scope: t,
|
|
29
|
-
label: n,
|
|
30
|
-
duration: r,
|
|
31
|
-
swipeDirection: i,
|
|
32
|
-
swipeThreshold: a,
|
|
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), []),
|
|
38
|
-
isClosePausedRef: f,
|
|
39
|
-
announcerContainer: o,
|
|
40
|
-
children: s
|
|
41
|
-
})
|
|
42
|
-
});
|
|
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) => {
|
|
47
|
-
a.length !== 0 && a.every((t) => e[t] || e.code === t) && m.current?.focus();
|
|
48
|
-
}, "handleKeyDown");
|
|
49
|
-
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
50
|
-
}, [a]), g.useEffect(() => {
|
|
51
|
-
let e = u.current, t = m.current;
|
|
52
|
-
if (v && e && t) {
|
|
53
|
-
let n = /* @__PURE__ */ S(() => {
|
|
54
|
-
if (!c.isClosePausedRef.current) {
|
|
55
|
-
let e = new CustomEvent(j);
|
|
56
|
-
t.dispatchEvent(e), c.isClosePausedRef.current = !0;
|
|
57
|
-
}
|
|
58
|
-
}, "handlePause"), r = /* @__PURE__ */ S(() => {
|
|
59
|
-
if (c.isClosePausedRef.current) {
|
|
60
|
-
let e = new CustomEvent(M);
|
|
61
|
-
t.dispatchEvent(e), c.isClosePausedRef.current = !1;
|
|
62
|
-
}
|
|
63
|
-
}, "handleResume"), i = /* @__PURE__ */ S((t) => {
|
|
64
|
-
e.contains(t.relatedTarget) || r();
|
|
65
|
-
}, "handleFocusOutResume"), a = /* @__PURE__ */ S(() => {
|
|
66
|
-
e.contains(document.activeElement) || r();
|
|
67
|
-
}, "handlePointerLeaveResume");
|
|
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), () => {
|
|
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);
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
}, [v, c.isClosePausedRef]);
|
|
73
|
-
let x = g.useCallback(({ tabbingDirection: e }) => {
|
|
74
|
-
let t = l().map((t) => {
|
|
75
|
-
let n = t.ref.current, r = [n, ...de(n)];
|
|
76
|
-
return e === "forwards" ? r : r.reverse();
|
|
77
|
-
});
|
|
78
|
-
return (e === "forwards" ? t.reverse() : t).flat();
|
|
79
|
-
}, [l]);
|
|
80
|
-
return g.useEffect(() => {
|
|
81
|
-
let e = m.current;
|
|
82
|
-
if (e) {
|
|
83
|
-
let t = /* @__PURE__ */ S((t) => {
|
|
84
|
-
let n = t.altKey || t.ctrlKey || t.metaKey;
|
|
85
|
-
if (t.key === "Tab" && !n) {
|
|
86
|
-
let n = document.activeElement, r = t.shiftKey;
|
|
87
|
-
if (t.target === e && r) {
|
|
88
|
-
d.current?.focus();
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
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();
|
|
93
|
-
}
|
|
94
|
-
}, "handleKeyDown");
|
|
95
|
-
return e.addEventListener("keydown", t), () => e.removeEventListener("keydown", t);
|
|
96
|
-
}
|
|
97
|
-
}, [l, x]), /* @__PURE__ */ b(p, {
|
|
98
|
-
ref: u,
|
|
99
|
-
role: "region",
|
|
100
|
-
"aria-label": o.replace("{hotkey}", _),
|
|
101
|
-
tabIndex: -1,
|
|
102
|
-
style: { pointerEvents: v ? void 0 : "none" },
|
|
103
|
-
children: [
|
|
104
|
-
v && /* @__PURE__ */ y(F, {
|
|
105
|
-
ref: d,
|
|
106
|
-
onFocusFromOutsideViewport: () => {
|
|
107
|
-
Z(x({ tabbingDirection: "forwards" }));
|
|
108
|
-
}
|
|
109
|
-
}),
|
|
110
|
-
/* @__PURE__ */ y(w.Slot, {
|
|
111
|
-
scope: i,
|
|
112
|
-
children: /* @__PURE__ */ y(r.ol, {
|
|
113
|
-
tabIndex: -1,
|
|
114
|
-
...s,
|
|
115
|
-
ref: h
|
|
116
|
-
})
|
|
117
|
-
}),
|
|
118
|
-
v && /* @__PURE__ */ y(F, {
|
|
119
|
-
ref: f,
|
|
120
|
-
onFocusFromOutsideViewport: () => {
|
|
121
|
-
Z(x({ tabbingDirection: "backwards" }));
|
|
122
|
-
}
|
|
123
|
-
})
|
|
124
|
-
]
|
|
125
|
-
});
|
|
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, {
|
|
129
|
-
tabIndex: 0,
|
|
130
|
-
...a,
|
|
131
|
-
ref: t,
|
|
132
|
-
style: { position: "fixed" },
|
|
133
|
-
onFocus: (e) => {
|
|
134
|
-
let t = e.relatedTarget;
|
|
135
|
-
o.viewport?.contains(t) || r();
|
|
136
|
-
}
|
|
137
|
-
});
|
|
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) {
|
|
139
|
-
let { forceMount: n, open: r, defaultOpen: i, onOpenChange: a, ...o } = e, [c, f] = l({
|
|
140
|
-
prop: r,
|
|
141
|
-
defaultProp: i ?? !0,
|
|
142
|
-
onChange: a,
|
|
143
|
-
caller: I
|
|
144
|
-
});
|
|
145
|
-
return /* @__PURE__ */ y(u, {
|
|
146
|
-
present: n || c,
|
|
147
|
-
children: /* @__PURE__ */ y(z, {
|
|
148
|
-
open: c,
|
|
149
|
-
...o,
|
|
150
|
-
ref: t,
|
|
151
|
-
onClose: () => f(!1),
|
|
152
|
-
onPause: d(e.onPause),
|
|
153
|
-
onResume: d(e.onResume),
|
|
154
|
-
onSwipeStart: s(e.onSwipeStart, (e) => {
|
|
155
|
-
e.currentTarget.setAttribute("data-swipe", "start");
|
|
156
|
-
}),
|
|
157
|
-
onSwipeMove: s(e.onSwipeMove, (e) => {
|
|
158
|
-
let { x: t, y: n } = e.detail.delta;
|
|
159
|
-
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`);
|
|
160
|
-
}),
|
|
161
|
-
onSwipeCancel: s(e.onSwipeCancel, (e) => {
|
|
162
|
-
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");
|
|
163
|
-
}),
|
|
164
|
-
onSwipeEnd: s(e.onSwipeEnd, (e) => {
|
|
165
|
-
let { x: t, y: n } = e.detail.delta;
|
|
166
|
-
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);
|
|
167
|
-
})
|
|
168
|
-
})
|
|
169
|
-
});
|
|
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) => {
|
|
174
|
-
!e || e === Infinity || (window.clearTimeout(R.current), F.current = (/* @__PURE__ */ new Date()).getTime(), R.current = window.setTimeout(V, e));
|
|
175
|
-
}, [V]);
|
|
176
|
-
g.useEffect(() => {
|
|
177
|
-
let e = D.viewport;
|
|
178
|
-
if (e) {
|
|
179
|
-
let t = /* @__PURE__ */ S(() => {
|
|
180
|
-
H(L.current), m?.();
|
|
181
|
-
}, "handleResume"), n = /* @__PURE__ */ S(() => {
|
|
182
|
-
let e = (/* @__PURE__ */ new Date()).getTime() - F.current;
|
|
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);
|
|
187
|
-
};
|
|
188
|
-
}
|
|
189
|
-
}, [
|
|
190
|
-
D.viewport,
|
|
191
|
-
P,
|
|
192
|
-
p,
|
|
193
|
-
m,
|
|
194
|
-
H
|
|
195
|
-
]), g.useEffect(() => {
|
|
196
|
-
c && !D.isClosePausedRef.current && H(P);
|
|
197
|
-
}, [
|
|
198
|
-
c,
|
|
199
|
-
P,
|
|
200
|
-
D.isClosePausedRef,
|
|
201
|
-
H
|
|
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, {
|
|
207
|
-
__scopeToast: i,
|
|
208
|
-
role: "status",
|
|
209
|
-
"aria-live": a === "foreground" ? "assertive" : "polite",
|
|
210
|
-
children: U
|
|
211
|
-
}), /* @__PURE__ */ y(ce, {
|
|
212
|
-
scope: i,
|
|
213
|
-
onClose: V,
|
|
214
|
-
children: _.createPortal(/* @__PURE__ */ y(w.ItemSlot, {
|
|
215
|
-
scope: i,
|
|
216
|
-
children: /* @__PURE__ */ y(f, {
|
|
217
|
-
asChild: !0,
|
|
218
|
-
onEscapeKeyDown: s(u, (e) => {
|
|
219
|
-
te().some((t) => t.ref.current?.contains(e.target)) || V();
|
|
220
|
-
}),
|
|
221
|
-
children: /* @__PURE__ */ y(r.li, {
|
|
222
|
-
tabIndex: 0,
|
|
223
|
-
"data-state": c ? "open" : "closed",
|
|
224
|
-
"data-swipe-direction": D.swipeDirection,
|
|
225
|
-
...E,
|
|
226
|
-
ref: re,
|
|
227
|
-
style: {
|
|
228
|
-
userSelect: "none",
|
|
229
|
-
touchAction: "none",
|
|
230
|
-
...e.style
|
|
231
|
-
},
|
|
232
|
-
onKeyDown: s(e.onKeyDown, (e) => {
|
|
233
|
-
e.key === "Escape" && (u?.(e.nativeEvent), e.nativeEvent.defaultPrevented || V());
|
|
234
|
-
}),
|
|
235
|
-
onPointerDown: s(e.onPointerDown, (e) => {
|
|
236
|
-
e.button === 0 && (A.current = {
|
|
237
|
-
x: e.clientX,
|
|
238
|
-
y: e.clientY
|
|
239
|
-
});
|
|
240
|
-
}),
|
|
241
|
-
onPointerMove: s(e.onPointerMove, (e) => {
|
|
242
|
-
if (!A.current) return;
|
|
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 = {
|
|
244
|
-
x: o,
|
|
245
|
-
y: s
|
|
246
|
-
}, u = {
|
|
247
|
-
originalEvent: e,
|
|
248
|
-
delta: l
|
|
249
|
-
};
|
|
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);
|
|
251
|
-
}),
|
|
252
|
-
onPointerUp: s(e.onPointerUp, (e) => {
|
|
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) {
|
|
255
|
-
let n = e.currentTarget, r = {
|
|
256
|
-
originalEvent: e,
|
|
257
|
-
delta: t
|
|
258
|
-
};
|
|
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 });
|
|
260
|
-
}
|
|
261
|
-
})
|
|
262
|
-
})
|
|
263
|
-
})
|
|
264
|
-
}), D.viewport)
|
|
265
|
-
})] }) : null;
|
|
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(() => {
|
|
269
|
-
let e = window.setTimeout(() => l(!0), 1e3);
|
|
270
|
-
return () => window.clearTimeout(e);
|
|
271
|
-
}, []), c ? null : /* @__PURE__ */ y(m, {
|
|
272
|
-
asChild: !0,
|
|
273
|
-
container: a.announcerContainer || void 0,
|
|
274
|
-
children: /* @__PURE__ */ y(i, {
|
|
275
|
-
...r,
|
|
276
|
-
children: o && /* @__PURE__ */ b(v, { children: [
|
|
277
|
-
a.label,
|
|
278
|
-
" ",
|
|
279
|
-
n
|
|
280
|
-
] })
|
|
281
|
-
})
|
|
282
|
-
});
|
|
283
|
-
}, "ToastAnnounce"), B = /* @__PURE__ */ g.forwardRef(/* @__PURE__ */ S(function(e, t) {
|
|
284
|
-
let { __scopeToast: n, ...i } = e;
|
|
285
|
-
return /* @__PURE__ */ y(r.div, {
|
|
286
|
-
...i,
|
|
287
|
-
ref: t
|
|
288
|
-
});
|
|
289
|
-
}, "ToastTitle")), V = /* @__PURE__ */ g.forwardRef(/* @__PURE__ */ S(function(e, t) {
|
|
290
|
-
let { __scopeToast: n, ...i } = e;
|
|
291
|
-
return /* @__PURE__ */ y(r.div, {
|
|
292
|
-
...i,
|
|
293
|
-
ref: t
|
|
294
|
-
});
|
|
295
|
-
}, "ToastDescription")), H = "ToastAction", U = /* @__PURE__ */ g.forwardRef(/* @__PURE__ */ S(function(e, t) {
|
|
296
|
-
let { altText: n, ...r } = e;
|
|
297
|
-
return n.trim() ? /* @__PURE__ */ y(G, {
|
|
298
|
-
altText: n,
|
|
299
|
-
asChild: !0,
|
|
300
|
-
children: /* @__PURE__ */ y(W, {
|
|
301
|
-
...r,
|
|
302
|
-
ref: t
|
|
303
|
-
})
|
|
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, {
|
|
308
|
-
asChild: !0,
|
|
309
|
-
children: /* @__PURE__ */ y(r.button, {
|
|
310
|
-
type: "button",
|
|
311
|
-
...i,
|
|
312
|
-
ref: t,
|
|
313
|
-
onClick: s(e.onClick, a.onClose)
|
|
314
|
-
})
|
|
315
|
-
});
|
|
316
|
-
}, "ToastClose")), G = /* @__PURE__ */ g.forwardRef(/* @__PURE__ */ S(function(e, t) {
|
|
317
|
-
let { __scopeToast: n, altText: i, ...a } = e;
|
|
318
|
-
return /* @__PURE__ */ y(r.div, {
|
|
319
|
-
"data-radix-toast-announce-exclude": "",
|
|
320
|
-
"data-radix-toast-announce-alt": i || void 0,
|
|
321
|
-
...a,
|
|
322
|
-
ref: t
|
|
323
|
-
});
|
|
324
|
-
}, "ToastAnnounceExclude"));
|
|
325
|
-
function K(e) {
|
|
326
|
-
let t = [];
|
|
327
|
-
return Array.from(e.childNodes).forEach((e) => {
|
|
328
|
-
if (e.nodeType === e.TEXT_NODE && e.textContent && t.push(e.textContent), X(e)) {
|
|
329
|
-
let n = e.ariaHidden || e.hidden || e.style.display === "none", r = e.dataset.radixToastAnnounceExclude === "";
|
|
330
|
-
if (!n) if (r) {
|
|
331
|
-
let n = e.dataset.radixToastAnnounceAlt;
|
|
332
|
-
n && t.push(n);
|
|
333
|
-
} else t.push(...K(e));
|
|
334
|
-
}
|
|
335
|
-
}), t;
|
|
336
|
-
}
|
|
337
|
-
S(K, "getAnnounceTextContent");
|
|
338
|
-
function q(e, t, r, { discrete: i }) {
|
|
339
|
-
let a = r.originalEvent.currentTarget, o = new CustomEvent(e, {
|
|
340
|
-
bubbles: !0,
|
|
341
|
-
cancelable: !0,
|
|
342
|
-
detail: r
|
|
343
|
-
});
|
|
344
|
-
t && a.addEventListener(e, t, { once: !0 }), i ? n(a, o) : a.dispatchEvent(o);
|
|
345
|
-
}
|
|
346
|
-
S(q, "handleAndDispatchCustomEvent");
|
|
347
|
-
var J = /* @__PURE__ */ S((e, t, n = 0) => {
|
|
348
|
-
let r = Math.abs(e.x), i = Math.abs(e.y), a = r > i;
|
|
349
|
-
return t === "left" || t === "right" ? a && r > n : !a && i > n;
|
|
350
|
-
}, "isDeltaInDirection");
|
|
351
|
-
function Y(e = () => {}) {
|
|
352
|
-
let t = d(e);
|
|
353
|
-
c(() => {
|
|
354
|
-
let e = 0, n = 0;
|
|
355
|
-
return e = window.requestAnimationFrame(() => n = window.requestAnimationFrame(t)), () => {
|
|
356
|
-
window.cancelAnimationFrame(e), window.cancelAnimationFrame(n);
|
|
357
|
-
};
|
|
358
|
-
}, [t]);
|
|
359
|
-
}
|
|
360
|
-
S(Y, "useNextFrame");
|
|
361
|
-
function X(e) {
|
|
362
|
-
return e.nodeType === e.ELEMENT_NODE;
|
|
363
|
-
}
|
|
364
|
-
S(X, "isHTMLElement");
|
|
365
|
-
function de(e) {
|
|
366
|
-
let t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: /* @__PURE__ */ S((e) => {
|
|
367
|
-
let t = e.tagName === "INPUT" && e.type === "hidden";
|
|
368
|
-
return e.disabled || e.hidden || t ? NodeFilter.FILTER_SKIP : e.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
369
|
-
}, "acceptNode") });
|
|
370
|
-
for (; n.nextNode();) t.push(n.currentNode);
|
|
371
|
-
return t;
|
|
372
|
-
}
|
|
373
|
-
S(de, "getTabbableCandidates");
|
|
374
|
-
function Z(e) {
|
|
375
|
-
let t = document.activeElement;
|
|
376
|
-
return e.some((e) => e === t ? !0 : (e.focus(), document.activeElement !== t));
|
|
377
|
-
}
|
|
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, {
|
|
380
|
-
ref: r,
|
|
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),
|
|
382
|
-
...n
|
|
383
|
-
}));
|
|
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", {
|
|
386
|
-
variants: { variant: {
|
|
387
|
-
default: "border bg-background text-foreground",
|
|
388
|
-
destructive: "destructive group border-destructive bg-destructive text-destructive-foreground"
|
|
389
|
-
} },
|
|
390
|
-
defaultVariants: { variant: "default" }
|
|
391
|
-
}), xe = g.forwardRef(({ className: t, variant: n, ...r }, i) => /* @__PURE__ */ y(me, {
|
|
392
|
-
ref: i,
|
|
393
|
-
className: e(be({ variant: n }), t),
|
|
394
|
-
...r
|
|
395
|
-
}));
|
|
396
|
-
xe.displayName = me?.displayName || "Toast";
|
|
397
|
-
var Se = g.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ y(ge, {
|
|
398
|
-
ref: r,
|
|
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),
|
|
400
|
-
...n
|
|
401
|
-
}));
|
|
402
|
-
Se.displayName = ge?.displayName || "ToastAction";
|
|
403
|
-
var Ce = g.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ y(_e, {
|
|
404
|
-
ref: r,
|
|
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),
|
|
406
|
-
"toast-close": "",
|
|
407
|
-
...n,
|
|
408
|
-
children: /* @__PURE__ */ y(h, { className: "h-4 w-4" })
|
|
409
|
-
}));
|
|
410
|
-
Ce.displayName = _e?.displayName || "ToastClose";
|
|
411
|
-
var we = g.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ y(he, {
|
|
412
|
-
ref: r,
|
|
413
|
-
className: e("text-sm font-semibold [&+div]:text-xs", t),
|
|
414
|
-
...n
|
|
415
|
-
}));
|
|
416
|
-
we.displayName = he?.displayName || "ToastTitle";
|
|
417
|
-
var $ = g.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ y(Q, {
|
|
418
|
-
ref: r,
|
|
419
|
-
className: e("text-sm opacity-90", t),
|
|
420
|
-
...n
|
|
421
|
-
}));
|
|
422
|
-
$.displayName = Q?.displayName || "ToastDescription";
|
|
423
|
-
//#endregion
|
|
424
|
-
export { ve as a, $ as i, Se as n, we as o, Ce as r, ye as s, xe as t };
|
package/dist/toast-D1fjLwO1.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
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/toaster-DS9iODKU.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("./chunk-mLOUI7ql.js"),t=require("./toast-D1fjLwO1.js");let n=require("react");n=e.r(n);let r=require("react/jsx-runtime");var i=1,a=1e6,o={ADD_TOAST:`ADD_TOAST`,UPDATE_TOAST:`UPDATE_TOAST`,DISMISS_TOAST:`DISMISS_TOAST`,REMOVE_TOAST:`REMOVE_TOAST`},s=0;function c(){return s=(s+1)%(2**53-1),s.toString()}var l=new Map,u=e=>{if(l.has(e))return;let t=setTimeout(()=>{l.delete(e),m({type:`REMOVE_TOAST`,toastId:e})},a);l.set(e,t)},d=(e,t)=>{switch(t.type){case o.ADD_TOAST:return{...e,toasts:[t.toast,...e.toasts].slice(0,i)};case o.UPDATE_TOAST:return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case o.DISMISS_TOAST:{let{toastId:n}=t;return n?u(n):e.toasts.forEach(e=>{u(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===n||n===void 0?{...e,open:!1}:e)}}case o.REMOVE_TOAST:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},f=[],p={toasts:[]};function m(e){p=d(p,e),f.forEach(e=>{e(p)})}function h({...e}){let t=c(),n=e=>m({type:`UPDATE_TOAST`,toast:{...e,id:t}}),r=()=>m({type:`DISMISS_TOAST`,toastId:t});return m({type:`ADD_TOAST`,toast:{...e,id:t,open:!0,onOpenChange:e=>{e||r()}}}),{id:t,dismiss:r,update:n}}function g(){let[e,t]=n.useState(p);return n.useEffect(()=>(f.push(t),()=>{let e=f.indexOf(t);e>-1&&f.splice(e,1)}),[e]),{...e,toast:h,dismiss:e=>m({type:`DISMISS_TOAST`,toastId:e})}}function _({...e}){let{toasts:n}=g();return(0,r.jsxs)(t.a,{...e,children:[n.map(function({id:e,title:n,description:i,action:a,...o}){return(0,r.jsxs)(t.t,{...o,children:[(0,r.jsxs)(`div`,{className:`grid gap-1`,children:[n&&(0,r.jsx)(t.o,{children:n}),i&&(0,r.jsx)(t.i,{children:i})]}),a,(0,r.jsx)(t.r,{})]},e)}),(0,r.jsx)(t.s,{})]})}Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return _}});
|
package/dist/toggle-DtpvPox_.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("./chunk-mLOUI7ql.js"),t=require("./dist-C_iFkwIX.js"),n=require("./dist-BoNQb2nd.js"),r=require("./dist-DZiOPWLp.js"),i=require("./dist-YAADIsyo.js");let a=require("react"),o=e.r(a,1);a=e.r(a);let s=require("react/jsx-runtime"),c=require("class-variance-authority");var l=Object.defineProperty,u=(e,t)=>l(e,`name`,{value:t,configurable:!0}),d=`Toggle`,f=o.forwardRef(u(function(e,t){let{pressed:a,defaultPressed:o,onPressedChange:c,...l}=e,[u,f]=i.t({prop:a,onChange:c,defaultProp:o??!1,caller:d});return(0,s.jsx)(n.t.button,{type:`button`,"aria-pressed":u,"data-state":u?`on`:`off`,"data-disabled":e.disabled?``:void 0,...l,ref:t,onClick:r.t(e.onClick,()=>{e.disabled||f(!u)})})},`Toggle`)),p=f,m=(0,c.cva)(`group/toggle inline-flex items-center justify-center gap-1 rounded-lg text-sm font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-transparent`,outline:`border border-input bg-transparent hover:bg-muted`},size:{default:`h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2`,sm:`h-7 min-w-7 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2`}},defaultVariants:{variant:`default`,size:`default`}});function h({className:e,variant:n=`default`,size:r=`default`,...i}){return(0,s.jsx)(p,{"data-slot":`toggle`,className:t.t(m({variant:n,size:r,className:e})),...i})}Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return h}});
|
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./dist-Dm3IQk5b.mjs";
|
|
2
|
-
import { t } from "./dist-BQhMregZ.mjs";
|
|
3
|
-
import { t as n } from "./dist-DMwCTE2i.mjs";
|
|
4
|
-
import { t as r } from "./dist-BUXpRW9O.mjs";
|
|
5
|
-
import { n as i } from "./dist-dMp9dzmY.mjs";
|
|
6
|
-
import { n as a, r as o, t as s } from "./dist-5r7hQmO0.mjs";
|
|
7
|
-
import { n as c, r as l } from "./toggle-CuLxBIWH.mjs";
|
|
8
|
-
import * as u from "react";
|
|
9
|
-
import { jsx as d } from "react/jsx-runtime";
|
|
10
|
-
//#region ../../node_modules/.bun/@radix-ui+react-toggle-group@1.1.19+2b23df507bdda662/node_modules/@radix-ui/react-toggle-group/dist/index.mjs
|
|
11
|
-
var f = Object.defineProperty, p = (e, t) => f(e, "name", {
|
|
12
|
-
value: t,
|
|
13
|
-
configurable: !0
|
|
14
|
-
}), m = "ToggleGroup", [h, g] = n(m, [o]), _ = o(), v = /* @__PURE__ */ u.forwardRef(/* @__PURE__ */ p(function(e, t) {
|
|
15
|
-
let { type: n, ...r } = e;
|
|
16
|
-
if (n === "single") return /* @__PURE__ */ d(x, {
|
|
17
|
-
role: "radiogroup",
|
|
18
|
-
...r,
|
|
19
|
-
ref: t
|
|
20
|
-
});
|
|
21
|
-
if (n === "multiple") return /* @__PURE__ */ d(S, {
|
|
22
|
-
role: "toolbar",
|
|
23
|
-
...r,
|
|
24
|
-
ref: t
|
|
25
|
-
});
|
|
26
|
-
throw Error(`Missing prop \`type\` expected on \`${m}\``);
|
|
27
|
-
}, "ToggleGroup")), [y, b] = h(m), x = /* @__PURE__ */ u.forwardRef(/* @__PURE__ */ p(function(e, t) {
|
|
28
|
-
let { value: n, defaultValue: i, onValueChange: a = /* @__PURE__ */ p(() => {}, "onValueChange"), ...o } = e, [s, c] = r({
|
|
29
|
-
prop: n,
|
|
30
|
-
defaultProp: i ?? "",
|
|
31
|
-
onChange: a,
|
|
32
|
-
caller: m
|
|
33
|
-
});
|
|
34
|
-
return /* @__PURE__ */ d(y, {
|
|
35
|
-
scope: e.__scopeToggleGroup,
|
|
36
|
-
type: "single",
|
|
37
|
-
value: u.useMemo(() => s ? [s] : [], [s]),
|
|
38
|
-
onItemActivate: c,
|
|
39
|
-
onItemDeactivate: u.useCallback(() => c(""), [c]),
|
|
40
|
-
children: /* @__PURE__ */ d(T, {
|
|
41
|
-
...o,
|
|
42
|
-
ref: t
|
|
43
|
-
})
|
|
44
|
-
});
|
|
45
|
-
}, "ToggleGroupImplSingle")), S = /* @__PURE__ */ u.forwardRef(/* @__PURE__ */ p(function(e, t) {
|
|
46
|
-
let { value: n, defaultValue: i, onValueChange: a = /* @__PURE__ */ p(() => {}, "onValueChange"), ...o } = e, [s, c] = r({
|
|
47
|
-
prop: n,
|
|
48
|
-
defaultProp: i ?? [],
|
|
49
|
-
onChange: a,
|
|
50
|
-
caller: m
|
|
51
|
-
}), l = u.useCallback((e) => c((t = []) => [...t, e]), [c]), f = u.useCallback((e) => c((t = []) => t.filter((t) => t !== e)), [c]);
|
|
52
|
-
return /* @__PURE__ */ d(y, {
|
|
53
|
-
scope: e.__scopeToggleGroup,
|
|
54
|
-
type: "multiple",
|
|
55
|
-
value: s,
|
|
56
|
-
onItemActivate: l,
|
|
57
|
-
onItemDeactivate: f,
|
|
58
|
-
children: /* @__PURE__ */ d(T, {
|
|
59
|
-
...o,
|
|
60
|
-
ref: t
|
|
61
|
-
})
|
|
62
|
-
});
|
|
63
|
-
}, "ToggleGroupImplMultiple")), [C, w] = h(m), T = /* @__PURE__ */ u.forwardRef(/* @__PURE__ */ p(function(e, n) {
|
|
64
|
-
let { __scopeToggleGroup: r, disabled: o = !1, rovingFocus: s = !0, orientation: c, dir: l, loop: u = !0, ...f } = e, p = _(r), m = i(l), h = {
|
|
65
|
-
dir: m,
|
|
66
|
-
...f
|
|
67
|
-
};
|
|
68
|
-
return /* @__PURE__ */ d(C, {
|
|
69
|
-
scope: r,
|
|
70
|
-
rovingFocus: s,
|
|
71
|
-
disabled: o,
|
|
72
|
-
children: s ? /* @__PURE__ */ d(a, {
|
|
73
|
-
asChild: !0,
|
|
74
|
-
...p,
|
|
75
|
-
orientation: c,
|
|
76
|
-
dir: m,
|
|
77
|
-
loop: u,
|
|
78
|
-
children: /* @__PURE__ */ d(t.div, {
|
|
79
|
-
...h,
|
|
80
|
-
ref: n
|
|
81
|
-
})
|
|
82
|
-
}) : /* @__PURE__ */ d(t.div, {
|
|
83
|
-
...h,
|
|
84
|
-
ref: n
|
|
85
|
-
})
|
|
86
|
-
});
|
|
87
|
-
}, "ToggleGroupImpl")), E = "ToggleGroupItem", D = /* @__PURE__ */ u.forwardRef(/* @__PURE__ */ p(function(e, t) {
|
|
88
|
-
let n = b(E, e.__scopeToggleGroup), r = w(E, e.__scopeToggleGroup), i = _(e.__scopeToggleGroup), a = n.value.includes(e.value), o = r.disabled || e.disabled, c = {
|
|
89
|
-
...e,
|
|
90
|
-
pressed: a,
|
|
91
|
-
disabled: o
|
|
92
|
-
}, l = u.useRef(null);
|
|
93
|
-
return r.rovingFocus ? /* @__PURE__ */ d(s, {
|
|
94
|
-
asChild: !0,
|
|
95
|
-
...i,
|
|
96
|
-
focusable: !o,
|
|
97
|
-
active: a,
|
|
98
|
-
ref: l,
|
|
99
|
-
children: /* @__PURE__ */ d(O, {
|
|
100
|
-
...c,
|
|
101
|
-
ref: t
|
|
102
|
-
})
|
|
103
|
-
}) : /* @__PURE__ */ d(O, {
|
|
104
|
-
...c,
|
|
105
|
-
ref: t
|
|
106
|
-
});
|
|
107
|
-
}, "ToggleGroupItem")), O = /* @__PURE__ */ u.forwardRef(/* @__PURE__ */ p(function(e, t) {
|
|
108
|
-
let { __scopeToggleGroup: n, value: r, ...i } = e, a = b(E, n), o = {
|
|
109
|
-
role: "radio",
|
|
110
|
-
"aria-checked": e.pressed,
|
|
111
|
-
"aria-pressed": void 0
|
|
112
|
-
};
|
|
113
|
-
return /* @__PURE__ */ d(l, {
|
|
114
|
-
...a.type === "single" ? o : void 0,
|
|
115
|
-
...i,
|
|
116
|
-
ref: t,
|
|
117
|
-
onPressedChange: (e) => {
|
|
118
|
-
e ? a.onItemActivate(r) : a.onItemDeactivate(r);
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
}, "ToggleGroupItemImpl")), k = u.createContext({
|
|
122
|
-
size: "default",
|
|
123
|
-
variant: "default",
|
|
124
|
-
spacing: 2,
|
|
125
|
-
orientation: "horizontal"
|
|
126
|
-
});
|
|
127
|
-
function A({ className: t, variant: n, size: r, spacing: i = 2, orientation: a = "horizontal", children: o, ...s }) {
|
|
128
|
-
return /* @__PURE__ */ d(v, {
|
|
129
|
-
"data-slot": "toggle-group",
|
|
130
|
-
"data-variant": n,
|
|
131
|
-
"data-size": r,
|
|
132
|
-
"data-spacing": i,
|
|
133
|
-
"data-orientation": a,
|
|
134
|
-
style: { "--gap": i },
|
|
135
|
-
className: e("group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-lg data-vertical:flex-col data-vertical:items-stretch data-[size=sm]:rounded-[min(var(--radius-md),10px)]", t),
|
|
136
|
-
...s,
|
|
137
|
-
children: /* @__PURE__ */ d(k.Provider, {
|
|
138
|
-
value: {
|
|
139
|
-
variant: n,
|
|
140
|
-
size: r,
|
|
141
|
-
spacing: i,
|
|
142
|
-
orientation: a
|
|
143
|
-
},
|
|
144
|
-
children: o
|
|
145
|
-
})
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
function j({ className: t, children: n, variant: r = "default", size: i = "default", ...a }) {
|
|
149
|
-
let o = u.useContext(k);
|
|
150
|
-
return /* @__PURE__ */ d(D, {
|
|
151
|
-
"data-slot": "toggle-group-item",
|
|
152
|
-
"data-variant": o.variant || r,
|
|
153
|
-
"data-size": o.size || i,
|
|
154
|
-
"data-spacing": o.spacing,
|
|
155
|
-
className: e("shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pe-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:ps-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-s-lg group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-e-lg group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-lg group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-s-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-s group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t", c({
|
|
156
|
-
variant: o.variant || r,
|
|
157
|
-
size: o.size || i
|
|
158
|
-
}), t),
|
|
159
|
-
...a,
|
|
160
|
-
children: n
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
//#endregion
|
|
164
|
-
export { j as n, A as t };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("./chunk-mLOUI7ql.js"),t=require("./dist-C_iFkwIX.js"),n=require("./dist-BoNQb2nd.js"),r=require("./dist-DYUvPCPC.js"),i=require("./dist-YAADIsyo.js"),a=require("./dist-mHQuNOH-.js"),o=require("./dist-DcRkoHAk.js"),s=require("./toggle-DtpvPox_.js");let c=require("react"),l=e.r(c,1);c=e.r(c);let u=require("react/jsx-runtime");var d=Object.defineProperty,f=(e,t)=>d(e,`name`,{value:t,configurable:!0}),p=`ToggleGroup`,[m,h]=r.t(p,[o.r]),g=o.r(),_=l.forwardRef(f(function(e,t){let{type:n,...r}=e;if(n===`single`)return(0,u.jsx)(b,{role:`radiogroup`,...r,ref:t});if(n===`multiple`)return(0,u.jsx)(x,{role:`toolbar`,...r,ref:t});throw Error(`Missing prop \`type\` expected on \`${p}\``)},`ToggleGroup`)),[v,y]=m(p),b=l.forwardRef(f(function(e,t){let{value:n,defaultValue:r,onValueChange:a=f(()=>{},`onValueChange`),...o}=e,[s,c]=i.t({prop:n,defaultProp:r??``,onChange:a,caller:p});return(0,u.jsx)(v,{scope:e.__scopeToggleGroup,type:`single`,value:l.useMemo(()=>s?[s]:[],[s]),onItemActivate:c,onItemDeactivate:l.useCallback(()=>c(``),[c]),children:(0,u.jsx)(w,{...o,ref:t})})},`ToggleGroupImplSingle`)),x=l.forwardRef(f(function(e,t){let{value:n,defaultValue:r,onValueChange:a=f(()=>{},`onValueChange`),...o}=e,[s,c]=i.t({prop:n,defaultProp:r??[],onChange:a,caller:p}),d=l.useCallback(e=>c((t=[])=>[...t,e]),[c]),m=l.useCallback(e=>c((t=[])=>t.filter(t=>t!==e)),[c]);return(0,u.jsx)(v,{scope:e.__scopeToggleGroup,type:`multiple`,value:s,onItemActivate:d,onItemDeactivate:m,children:(0,u.jsx)(w,{...o,ref:t})})},`ToggleGroupImplMultiple`)),[S,C]=m(p),w=l.forwardRef(f(function(e,t){let{__scopeToggleGroup:r,disabled:i=!1,rovingFocus:s=!0,orientation:c,dir:l,loop:d=!0,...f}=e,p=g(r),m=a.n(l),h={dir:m,...f};return(0,u.jsx)(S,{scope:r,rovingFocus:s,disabled:i,children:s?(0,u.jsx)(o.n,{asChild:!0,...p,orientation:c,dir:m,loop:d,children:(0,u.jsx)(n.t.div,{...h,ref:t})}):(0,u.jsx)(n.t.div,{...h,ref:t})})},`ToggleGroupImpl`)),T=`ToggleGroupItem`,E=l.forwardRef(f(function(e,t){let n=y(T,e.__scopeToggleGroup),r=C(T,e.__scopeToggleGroup),i=g(e.__scopeToggleGroup),a=n.value.includes(e.value),s=r.disabled||e.disabled,c={...e,pressed:a,disabled:s},d=l.useRef(null);return r.rovingFocus?(0,u.jsx)(o.t,{asChild:!0,...i,focusable:!s,active:a,ref:d,children:(0,u.jsx)(D,{...c,ref:t})}):(0,u.jsx)(D,{...c,ref:t})},`ToggleGroupItem`)),D=l.forwardRef(f(function(e,t){let{__scopeToggleGroup:n,value:r,...i}=e,a=y(T,n),o={role:`radio`,"aria-checked":e.pressed,"aria-pressed":void 0};return(0,u.jsx)(s.r,{...a.type===`single`?o:void 0,...i,ref:t,onPressedChange:e=>{e?a.onItemActivate(r):a.onItemDeactivate(r)}})},`ToggleGroupItemImpl`)),O=c.createContext({size:`default`,variant:`default`,spacing:2,orientation:`horizontal`});function k({className:e,variant:n,size:r,spacing:i=2,orientation:a=`horizontal`,children:o,...s}){return(0,u.jsx)(_,{"data-slot":`toggle-group`,"data-variant":n,"data-size":r,"data-spacing":i,"data-orientation":a,style:{"--gap":i},className:t.t(`group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-lg data-vertical:flex-col data-vertical:items-stretch data-[size=sm]:rounded-[min(var(--radius-md),10px)]`,e),...s,children:(0,u.jsx)(O.Provider,{value:{variant:n,size:r,spacing:i,orientation:a},children:o})})}function A({className:e,children:n,variant:r=`default`,size:i=`default`,...a}){let o=c.useContext(O);return(0,u.jsx)(E,{"data-slot":`toggle-group-item`,"data-variant":o.variant||r,"data-size":o.size||i,"data-spacing":o.spacing,className:t.t(`shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pe-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:ps-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-s-lg group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-e-lg group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-lg group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-s-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-s group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t`,s.n({variant:o.variant||r,size:o.size||i}),e),...a,children:n})}Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return k}});
|