@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
package/src/skeleton.tsx
CHANGED
package/src/slider.tsx
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
+
import { cn } from 'cn';
|
|
3
4
|
import { Slider as SliderPrimitive } from 'radix-ui';
|
|
4
5
|
import * as React from 'react';
|
|
5
6
|
|
|
6
|
-
import { cn } from './lib/utils';
|
|
7
|
-
|
|
8
7
|
import type { SliderBaseProps } from '@gv-tech/ui-core';
|
|
9
8
|
|
|
10
9
|
function Slider({
|
|
@@ -28,18 +27,18 @@ function Slider({
|
|
|
28
27
|
min={min}
|
|
29
28
|
max={max}
|
|
30
29
|
className={cn(
|
|
31
|
-
'relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-
|
|
30
|
+
'relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-vertical:h-full data-vertical:min-h-40 data-vertical:w-auto data-vertical:flex-col',
|
|
32
31
|
className,
|
|
33
32
|
)}
|
|
34
33
|
{...props}
|
|
35
34
|
>
|
|
36
35
|
<SliderPrimitive.Track
|
|
37
36
|
data-slot="slider-track"
|
|
38
|
-
className="bg-muted relative grow overflow-hidden rounded-full data-
|
|
37
|
+
className="bg-muted relative grow overflow-hidden rounded-full data-horizontal:h-1 data-horizontal:w-full data-vertical:h-full data-vertical:w-1"
|
|
39
38
|
>
|
|
40
39
|
<SliderPrimitive.Range
|
|
41
40
|
data-slot="slider-range"
|
|
42
|
-
className="bg-primary absolute select-none data-
|
|
41
|
+
className="bg-primary absolute select-none data-horizontal:h-full data-vertical:w-full"
|
|
43
42
|
/>
|
|
44
43
|
</SliderPrimitive.Track>
|
|
45
44
|
{Array.from({ length: _values.length }, (_, index) => (
|
package/src/sonner.tsx
CHANGED
|
@@ -2,8 +2,6 @@ import { CircleCheckIcon, InfoIcon, Loader2Icon, OctagonXIcon, TriangleAlertIcon
|
|
|
2
2
|
import { useTheme } from 'next-themes';
|
|
3
3
|
import { Toaster as Sonner, type ToasterProps } from 'sonner';
|
|
4
4
|
|
|
5
|
-
import type { SonnerBaseProps } from '@gv-tech/ui-core';
|
|
6
|
-
|
|
7
5
|
const Toaster = ({ ...props }: ToasterProps) => {
|
|
8
6
|
const { theme = 'system' } = useTheme();
|
|
9
7
|
|
|
@@ -37,6 +35,3 @@ const Toaster = ({ ...props }: ToasterProps) => {
|
|
|
37
35
|
};
|
|
38
36
|
|
|
39
37
|
export { Toaster };
|
|
40
|
-
|
|
41
|
-
// Verify that the component satisfies the ui-core contract
|
|
42
|
-
export type ___verifySonnerContract = React.ComponentProps<typeof Sonner> extends SonnerBaseProps ? true : false;
|
package/src/spinner.tsx
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
|
+
import { cn } from 'cn';
|
|
1
2
|
import { Loader2Icon } from 'lucide-react';
|
|
2
|
-
import { cn } from './lib/utils';
|
|
3
3
|
|
|
4
4
|
import type { SpinnerBaseProps } from '@gv-tech/ui-core';
|
|
5
5
|
|
|
6
6
|
function Spinner({ className, ...props }: React.ComponentProps<'svg'> & SpinnerBaseProps) {
|
|
7
|
-
return
|
|
7
|
+
return (
|
|
8
|
+
<Loader2Icon
|
|
9
|
+
data-slot="spinner"
|
|
10
|
+
role="status"
|
|
11
|
+
aria-label="Loading"
|
|
12
|
+
className={cn('size-4 animate-spin', className)}
|
|
13
|
+
{...props}
|
|
14
|
+
/>
|
|
15
|
+
);
|
|
8
16
|
}
|
|
9
17
|
|
|
10
18
|
export { Spinner };
|
package/src/support-fab.tsx
CHANGED
|
@@ -8,10 +8,31 @@ import { Drawer, DrawerContent, DrawerDescription, DrawerHeader, DrawerTitle } f
|
|
|
8
8
|
import { cn } from './lib/utils';
|
|
9
9
|
|
|
10
10
|
const MOBILE_QUERY = '(max-width: 767px)';
|
|
11
|
+
const DEFAULT_SUPPORT_URL = 'https://www.buymeacoffee.com';
|
|
12
|
+
const ALLOWED_SUPPORT_DOMAINS = new Set(['buymeacoffee.com', 'www.buymeacoffee.com']);
|
|
11
13
|
|
|
12
|
-
const
|
|
14
|
+
const validateSupportUrl = (url: string) => {
|
|
13
15
|
const trimmed = url.trim();
|
|
14
|
-
|
|
16
|
+
|
|
17
|
+
try {
|
|
18
|
+
const parsed = new URL(trimmed);
|
|
19
|
+
const hostname = parsed.hostname.toLowerCase();
|
|
20
|
+
|
|
21
|
+
if (parsed.protocol !== 'https:' || !ALLOWED_SUPPORT_DOMAINS.has(hostname)) {
|
|
22
|
+
console.warn(`Invalid supportUrl: ${url}. Falling back to default.`);
|
|
23
|
+
return DEFAULT_SUPPORT_URL;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return trimmed;
|
|
27
|
+
} catch {
|
|
28
|
+
console.warn(`Invalid supportUrl: ${url}. Falling back to default.`);
|
|
29
|
+
return DEFAULT_SUPPORT_URL;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const normalizeBaseUrl = (url: string) => {
|
|
34
|
+
const validated = validateSupportUrl(url);
|
|
35
|
+
return validated.endsWith('/') ? validated.slice(0, -1) : validated;
|
|
15
36
|
};
|
|
16
37
|
|
|
17
38
|
const sanitizeCreator = (creatorId: string) => creatorId.trim().replace(/^@+/, '');
|
|
@@ -72,7 +93,7 @@ export interface SupportFabProps extends Omit<React.ButtonHTMLAttributes<HTMLBut
|
|
|
72
93
|
}
|
|
73
94
|
|
|
74
95
|
export function SupportFab({
|
|
75
|
-
supportUrl =
|
|
96
|
+
supportUrl = DEFAULT_SUPPORT_URL,
|
|
76
97
|
creatorId,
|
|
77
98
|
title = 'Buy me a coffee',
|
|
78
99
|
description = 'Support the project directly from this panel.',
|
package/src/switch.tsx
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
+
import { cn } from 'cn';
|
|
3
4
|
import { Switch as SwitchPrimitive } from 'radix-ui';
|
|
4
5
|
import * as React from 'react';
|
|
5
6
|
|
|
6
|
-
import { cn } from './lib/utils';
|
|
7
|
-
|
|
8
7
|
import type { SwitchBaseProps } from '@gv-tech/ui-core';
|
|
9
8
|
|
|
10
9
|
function Switch({
|
|
@@ -19,14 +18,14 @@ function Switch({
|
|
|
19
18
|
data-slot="switch"
|
|
20
19
|
data-size={size}
|
|
21
20
|
className={cn(
|
|
22
|
-
'peer group/switch focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-
|
|
21
|
+
'peer group/switch focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none group-has-[:focus-visible]/field-label:border-transparent group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:ring-3 aria-invalid:ring-3 data-disabled:cursor-not-allowed data-disabled:opacity-50 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px]',
|
|
23
22
|
className,
|
|
24
23
|
)}
|
|
25
24
|
{...props}
|
|
26
25
|
>
|
|
27
26
|
<SwitchPrimitive.Thumb
|
|
28
27
|
data-slot="switch-thumb"
|
|
29
|
-
className="bg-background dark:data-
|
|
28
|
+
className="bg-background dark:data-checked:bg-primary-foreground dark:data-unchecked:bg-foreground pointer-events-none block rounded-full ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 rtl:group-data-[size=default]/switch:data-checked:-translate-x-[calc(100%-2px)] rtl:group-data-[size=sm]/switch:data-checked:-translate-x-[calc(100%-2px)] rtl:group-data-[size=default]/switch:data-unchecked:-translate-x-0 rtl:group-data-[size=sm]/switch:data-unchecked:-translate-x-0"
|
|
30
29
|
/>
|
|
31
30
|
</SwitchPrimitive.Root>
|
|
32
31
|
);
|
|
@@ -105,6 +105,13 @@ function TableOfContentsList({ className }: TableOfContentsListBaseProps) {
|
|
|
105
105
|
const { headings, activeId, activeHeadingText } = useTOC();
|
|
106
106
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
107
107
|
|
|
108
|
+
const currentMinLevel = React.useMemo(() => {
|
|
109
|
+
if (headings.length === 0) {
|
|
110
|
+
return 0;
|
|
111
|
+
}
|
|
112
|
+
return Math.min(...headings.map((h) => h.level));
|
|
113
|
+
}, [headings]);
|
|
114
|
+
|
|
108
115
|
// Auto-collapse on scroll
|
|
109
116
|
React.useEffect(() => {
|
|
110
117
|
if (!isOpen) {
|
|
@@ -123,8 +130,6 @@ function TableOfContentsList({ className }: TableOfContentsListBaseProps) {
|
|
|
123
130
|
return null;
|
|
124
131
|
}
|
|
125
132
|
|
|
126
|
-
const currentMinLevel = Math.min(...headings.map((h) => h.level));
|
|
127
|
-
|
|
128
133
|
const listContent = (
|
|
129
134
|
<ul className="m-0 list-none text-sm">
|
|
130
135
|
{headings.map((heading) => {
|
package/src/table.tsx
CHANGED
package/src/tabs.tsx
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { cva, type VariantProps } from 'class-variance-authority';
|
|
4
|
+
import { cn } from 'cn';
|
|
4
5
|
import { Tabs as TabsPrimitive } from 'radix-ui';
|
|
5
6
|
import * as React from 'react';
|
|
6
7
|
|
|
7
|
-
import { cn } from './lib/utils';
|
|
8
|
-
|
|
9
8
|
import type { TabsBaseProps } from '@gv-tech/ui-core';
|
|
10
9
|
|
|
11
10
|
function Tabs({ className, orientation = 'horizontal', ...props }: React.ComponentProps<typeof TabsPrimitive.Root>) {
|
|
@@ -13,19 +12,19 @@ function Tabs({ className, orientation = 'horizontal', ...props }: React.Compone
|
|
|
13
12
|
<TabsPrimitive.Root
|
|
14
13
|
data-slot="tabs"
|
|
15
14
|
data-orientation={orientation}
|
|
16
|
-
className={cn('group/tabs flex gap-2 data-
|
|
15
|
+
className={cn('group/tabs flex gap-2 data-horizontal:flex-col', className)}
|
|
17
16
|
{...props}
|
|
18
17
|
/>
|
|
19
18
|
);
|
|
20
19
|
}
|
|
21
20
|
|
|
22
21
|
const tabsListVariants = cva(
|
|
23
|
-
'group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-
|
|
22
|
+
'group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none',
|
|
24
23
|
{
|
|
25
24
|
variants: {
|
|
26
25
|
variant: {
|
|
27
26
|
default: 'bg-muted',
|
|
28
|
-
line: 'gap-1 bg-transparent
|
|
27
|
+
line: 'gap-1 bg-transparent',
|
|
29
28
|
},
|
|
30
29
|
},
|
|
31
30
|
defaultVariants: {
|
|
@@ -54,10 +53,10 @@ function TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPr
|
|
|
54
53
|
<TabsPrimitive.Trigger
|
|
55
54
|
data-slot="tabs-trigger"
|
|
56
55
|
className={cn(
|
|
57
|
-
|
|
58
|
-
'group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-
|
|
59
|
-
'data-
|
|
60
|
-
'after:bg-foreground after:absolute after:opacity-0 after:transition-opacity group-data-
|
|
56
|
+
"text-foreground/60 hover:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:text-muted-foreground dark:hover:text-foreground relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pe-1 has-data-[icon=inline-start]:ps-1 group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
57
|
+
'group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent',
|
|
58
|
+
'data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground',
|
|
59
|
+
'after:bg-foreground after:absolute after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-end-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100',
|
|
61
60
|
className,
|
|
62
61
|
)}
|
|
63
62
|
{...props}
|
package/src/textarea.tsx
CHANGED
package/src/toggle-group.tsx
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { type VariantProps } from 'class-variance-authority';
|
|
4
|
+
import { cn } from 'cn';
|
|
4
5
|
import { ToggleGroup as ToggleGroupPrimitive } from 'radix-ui';
|
|
5
6
|
import * as React from 'react';
|
|
6
7
|
|
|
7
|
-
import {
|
|
8
|
-
import { toggleVariants } from './toggle';
|
|
8
|
+
import { toggleVariants } from '@/./toggle';
|
|
9
9
|
|
|
10
10
|
import type { ToggleGroupBaseProps } from '@gv-tech/ui-core';
|
|
11
11
|
|
|
@@ -43,7 +43,7 @@ function ToggleGroup({
|
|
|
43
43
|
data-orientation={orientation}
|
|
44
44
|
style={{ '--gap': spacing } as React.CSSProperties}
|
|
45
45
|
className={cn(
|
|
46
|
-
'group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-lg data-
|
|
46
|
+
'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)]',
|
|
47
47
|
className,
|
|
48
48
|
)}
|
|
49
49
|
{...props}
|
|
@@ -71,7 +71,7 @@ function ToggleGroupItem({
|
|
|
71
71
|
data-size={context.size || size}
|
|
72
72
|
data-spacing={context.spacing}
|
|
73
73
|
className={cn(
|
|
74
|
-
'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-
|
|
74
|
+
'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',
|
|
75
75
|
toggleVariants({
|
|
76
76
|
variant: context.variant || variant,
|
|
77
77
|
size: context.size || size,
|
package/src/toggle.tsx
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { cva, type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { cn } from 'cn';
|
|
2
3
|
import { Toggle as TogglePrimitive } from 'radix-ui';
|
|
3
4
|
import * as React from 'react';
|
|
4
5
|
|
|
5
|
-
import { cn } from './lib/utils';
|
|
6
|
-
|
|
7
6
|
import type { ToggleBaseProps } from '@gv-tech/ui-core';
|
|
8
7
|
|
|
9
8
|
const toggleVariants = cva(
|
|
10
|
-
|
|
9
|
+
"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",
|
|
11
10
|
{
|
|
12
11
|
variants: {
|
|
13
12
|
variant: {
|
|
@@ -16,7 +15,7 @@ const toggleVariants = cva(
|
|
|
16
15
|
},
|
|
17
16
|
size: {
|
|
18
17
|
default: 'h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2',
|
|
19
|
-
sm:
|
|
18
|
+
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",
|
|
20
19
|
lg: 'h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2',
|
|
21
20
|
},
|
|
22
21
|
},
|
package/src/tooltip.tsx
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
+
import { cn } from 'cn';
|
|
3
4
|
import { Tooltip as TooltipPrimitive } from 'radix-ui';
|
|
4
5
|
import * as React from 'react';
|
|
5
6
|
|
|
6
|
-
import { cn } from './lib/utils';
|
|
7
|
-
|
|
8
7
|
import type { TooltipBaseProps } from '@gv-tech/ui-core';
|
|
9
8
|
|
|
10
9
|
function TooltipProvider({ delayDuration = 0, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>) {
|
|
@@ -31,7 +30,7 @@ function TooltipContent({
|
|
|
31
30
|
data-slot="tooltip-content"
|
|
32
31
|
sideOffset={sideOffset}
|
|
33
32
|
className={cn(
|
|
34
|
-
'bg-foreground text-background data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-
|
|
33
|
+
'bg-foreground text-background data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md px-3 py-1.5 text-xs has-data-[slot=kbd]:pe-1.5 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm',
|
|
35
34
|
className,
|
|
36
35
|
)}
|
|
37
36
|
{...props}
|
|
@@ -1,244 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./utils-A_oVsYw5.mjs";
|
|
2
|
-
import { a as t } from "./dist-CQhWBhaI.mjs";
|
|
3
|
-
import { t as n } from "./dist-Cacc4QIh.mjs";
|
|
4
|
-
import { n as r } from "./dist-Bm8Cuttq.mjs";
|
|
5
|
-
import { t as i } from "./dist-Dz3LbuDd.mjs";
|
|
6
|
-
import { t as a } from "./dist-BPBwSSyk.mjs";
|
|
7
|
-
import { t as o } from "./dist-DuTFGM_g.mjs";
|
|
8
|
-
import { t as s } from "./dist-Df2ez-DA.mjs";
|
|
9
|
-
import { a as c, i as l, o as u, r as d } from "./dist-DPBTfUqI.mjs";
|
|
10
|
-
import { n as f } from "./dist-BYdcKuDi.mjs";
|
|
11
|
-
import p from "react";
|
|
12
|
-
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
13
|
-
import { ChevronDownIcon as g, ChevronUpIcon as _ } from "lucide-react";
|
|
14
|
-
//#region ../../node_modules/.bun/@radix-ui+react-accordion@1.2.12+2d3f272c3a65784a/node_modules/@radix-ui/react-accordion/dist/index.mjs
|
|
15
|
-
var v = "Accordion", y = [
|
|
16
|
-
"Home",
|
|
17
|
-
"End",
|
|
18
|
-
"ArrowDown",
|
|
19
|
-
"ArrowUp",
|
|
20
|
-
"ArrowLeft",
|
|
21
|
-
"ArrowRight"
|
|
22
|
-
], [b, x, S] = i(v), [C, ee] = r(v, [S, u]), w = u(), T = p.forwardRef((e, t) => {
|
|
23
|
-
let { type: n, ...r } = e, i = r, a = r;
|
|
24
|
-
return /* @__PURE__ */ m(b.Provider, {
|
|
25
|
-
scope: e.__scopeAccordion,
|
|
26
|
-
children: n === "multiple" ? /* @__PURE__ */ m(j, {
|
|
27
|
-
...a,
|
|
28
|
-
ref: t
|
|
29
|
-
}) : /* @__PURE__ */ m(A, {
|
|
30
|
-
...i,
|
|
31
|
-
ref: t
|
|
32
|
-
})
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
|
-
T.displayName = v;
|
|
36
|
-
var [E, D] = C(v), [O, k] = C(v, { collapsible: !1 }), A = p.forwardRef((e, t) => {
|
|
37
|
-
let { value: n, defaultValue: r, onValueChange: i = () => {}, collapsible: a = !1, ...s } = e, [c, l] = o({
|
|
38
|
-
prop: n,
|
|
39
|
-
defaultProp: r ?? "",
|
|
40
|
-
onChange: i,
|
|
41
|
-
caller: v
|
|
42
|
-
});
|
|
43
|
-
return /* @__PURE__ */ m(E, {
|
|
44
|
-
scope: e.__scopeAccordion,
|
|
45
|
-
value: p.useMemo(() => c ? [c] : [], [c]),
|
|
46
|
-
onItemOpen: l,
|
|
47
|
-
onItemClose: p.useCallback(() => a && l(""), [a, l]),
|
|
48
|
-
children: /* @__PURE__ */ m(O, {
|
|
49
|
-
scope: e.__scopeAccordion,
|
|
50
|
-
collapsible: a,
|
|
51
|
-
children: /* @__PURE__ */ m(P, {
|
|
52
|
-
...s,
|
|
53
|
-
ref: t
|
|
54
|
-
})
|
|
55
|
-
})
|
|
56
|
-
});
|
|
57
|
-
}), j = p.forwardRef((e, t) => {
|
|
58
|
-
let { value: n, defaultValue: r, onValueChange: i = () => {}, ...a } = e, [s, c] = o({
|
|
59
|
-
prop: n,
|
|
60
|
-
defaultProp: r ?? [],
|
|
61
|
-
onChange: i,
|
|
62
|
-
caller: v
|
|
63
|
-
}), l = p.useCallback((e) => c((t = []) => [...t, e]), [c]), u = p.useCallback((e) => c((t = []) => t.filter((t) => t !== e)), [c]);
|
|
64
|
-
return /* @__PURE__ */ m(E, {
|
|
65
|
-
scope: e.__scopeAccordion,
|
|
66
|
-
value: s,
|
|
67
|
-
onItemOpen: l,
|
|
68
|
-
onItemClose: u,
|
|
69
|
-
children: /* @__PURE__ */ m(O, {
|
|
70
|
-
scope: e.__scopeAccordion,
|
|
71
|
-
collapsible: !0,
|
|
72
|
-
children: /* @__PURE__ */ m(P, {
|
|
73
|
-
...a,
|
|
74
|
-
ref: t
|
|
75
|
-
})
|
|
76
|
-
})
|
|
77
|
-
});
|
|
78
|
-
}), [M, N] = C(v), P = p.forwardRef((e, r) => {
|
|
79
|
-
let { __scopeAccordion: i, disabled: o, dir: s, orientation: c = "vertical", ...l } = e, u = t(p.useRef(null), r), d = x(i), h = f(s) === "ltr", g = a(e.onKeyDown, (e) => {
|
|
80
|
-
if (!y.includes(e.key)) return;
|
|
81
|
-
let t = e.target, n = d().filter((e) => !e.ref.current?.disabled), r = n.findIndex((e) => e.ref.current === t), i = n.length;
|
|
82
|
-
if (r === -1) return;
|
|
83
|
-
e.preventDefault();
|
|
84
|
-
let a = r, o = i - 1, s = () => {
|
|
85
|
-
a = r + 1, a > o && (a = 0);
|
|
86
|
-
}, l = () => {
|
|
87
|
-
a = r - 1, a < 0 && (a = o);
|
|
88
|
-
};
|
|
89
|
-
switch (e.key) {
|
|
90
|
-
case "Home":
|
|
91
|
-
a = 0;
|
|
92
|
-
break;
|
|
93
|
-
case "End":
|
|
94
|
-
a = o;
|
|
95
|
-
break;
|
|
96
|
-
case "ArrowRight":
|
|
97
|
-
c === "horizontal" && (h ? s() : l());
|
|
98
|
-
break;
|
|
99
|
-
case "ArrowDown":
|
|
100
|
-
c === "vertical" && s();
|
|
101
|
-
break;
|
|
102
|
-
case "ArrowLeft":
|
|
103
|
-
c === "horizontal" && (h ? l() : s());
|
|
104
|
-
break;
|
|
105
|
-
case "ArrowUp":
|
|
106
|
-
c === "vertical" && l();
|
|
107
|
-
break;
|
|
108
|
-
}
|
|
109
|
-
n[a % i].ref.current?.focus();
|
|
110
|
-
});
|
|
111
|
-
return /* @__PURE__ */ m(M, {
|
|
112
|
-
scope: i,
|
|
113
|
-
disabled: o,
|
|
114
|
-
direction: s,
|
|
115
|
-
orientation: c,
|
|
116
|
-
children: /* @__PURE__ */ m(b.Slot, {
|
|
117
|
-
scope: i,
|
|
118
|
-
children: /* @__PURE__ */ m(n.div, {
|
|
119
|
-
...l,
|
|
120
|
-
"data-orientation": c,
|
|
121
|
-
ref: u,
|
|
122
|
-
onKeyDown: o ? void 0 : g
|
|
123
|
-
})
|
|
124
|
-
})
|
|
125
|
-
});
|
|
126
|
-
}), F = "AccordionItem", [I, L] = C(F), R = p.forwardRef((e, t) => {
|
|
127
|
-
let { __scopeAccordion: n, value: r, ...i } = e, a = N(F, n), o = D(F, n), c = w(n), u = s(), d = r && o.value.includes(r) || !1, f = a.disabled || e.disabled;
|
|
128
|
-
return /* @__PURE__ */ m(I, {
|
|
129
|
-
scope: n,
|
|
130
|
-
open: d,
|
|
131
|
-
disabled: f,
|
|
132
|
-
triggerId: u,
|
|
133
|
-
children: /* @__PURE__ */ m(l, {
|
|
134
|
-
"data-orientation": a.orientation,
|
|
135
|
-
"data-state": G(d),
|
|
136
|
-
...c,
|
|
137
|
-
...i,
|
|
138
|
-
ref: t,
|
|
139
|
-
disabled: f,
|
|
140
|
-
open: d,
|
|
141
|
-
onOpenChange: (e) => {
|
|
142
|
-
e ? o.onItemOpen(r) : o.onItemClose(r);
|
|
143
|
-
}
|
|
144
|
-
})
|
|
145
|
-
});
|
|
146
|
-
});
|
|
147
|
-
R.displayName = F;
|
|
148
|
-
var z = "AccordionHeader", B = p.forwardRef((e, t) => {
|
|
149
|
-
let { __scopeAccordion: r, ...i } = e, a = N(v, r), o = L(z, r);
|
|
150
|
-
return /* @__PURE__ */ m(n.h3, {
|
|
151
|
-
"data-orientation": a.orientation,
|
|
152
|
-
"data-state": G(o.open),
|
|
153
|
-
"data-disabled": o.disabled ? "" : void 0,
|
|
154
|
-
...i,
|
|
155
|
-
ref: t
|
|
156
|
-
});
|
|
157
|
-
});
|
|
158
|
-
B.displayName = z;
|
|
159
|
-
var V = "AccordionTrigger", H = p.forwardRef((e, t) => {
|
|
160
|
-
let { __scopeAccordion: n, ...r } = e, i = N(v, n), a = L(V, n), o = k(V, n), s = w(n);
|
|
161
|
-
return /* @__PURE__ */ m(b.ItemSlot, {
|
|
162
|
-
scope: n,
|
|
163
|
-
children: /* @__PURE__ */ m(c, {
|
|
164
|
-
"aria-disabled": a.open && !o.collapsible || void 0,
|
|
165
|
-
"data-orientation": i.orientation,
|
|
166
|
-
id: a.triggerId,
|
|
167
|
-
...s,
|
|
168
|
-
...r,
|
|
169
|
-
ref: t
|
|
170
|
-
})
|
|
171
|
-
});
|
|
172
|
-
});
|
|
173
|
-
H.displayName = V;
|
|
174
|
-
var U = "AccordionContent", W = p.forwardRef((e, t) => {
|
|
175
|
-
let { __scopeAccordion: n, ...r } = e, i = N(v, n), a = L(U, n), o = w(n);
|
|
176
|
-
return /* @__PURE__ */ m(d, {
|
|
177
|
-
role: "region",
|
|
178
|
-
"aria-labelledby": a.triggerId,
|
|
179
|
-
"data-orientation": i.orientation,
|
|
180
|
-
...o,
|
|
181
|
-
...r,
|
|
182
|
-
ref: t,
|
|
183
|
-
style: {
|
|
184
|
-
"--radix-accordion-content-height": "var(--radix-collapsible-content-height)",
|
|
185
|
-
"--radix-accordion-content-width": "var(--radix-collapsible-content-width)",
|
|
186
|
-
...e.style
|
|
187
|
-
}
|
|
188
|
-
});
|
|
189
|
-
});
|
|
190
|
-
W.displayName = U;
|
|
191
|
-
function G(e) {
|
|
192
|
-
return e ? "open" : "closed";
|
|
193
|
-
}
|
|
194
|
-
var K = T, q = R, J = B, Y = H, X = W;
|
|
195
|
-
//#endregion
|
|
196
|
-
//#region src/accordion.tsx
|
|
197
|
-
function Z({ className: t, ...n }) {
|
|
198
|
-
return /* @__PURE__ */ m(K, {
|
|
199
|
-
"data-slot": "accordion",
|
|
200
|
-
className: e("flex w-full flex-col", t),
|
|
201
|
-
...n
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
|
-
function Q({ className: t, ...n }) {
|
|
205
|
-
return /* @__PURE__ */ m(q, {
|
|
206
|
-
"data-slot": "accordion-item",
|
|
207
|
-
className: e("not-last:border-b", t),
|
|
208
|
-
...n
|
|
209
|
-
});
|
|
210
|
-
}
|
|
211
|
-
function $({ className: t, children: n, ...r }) {
|
|
212
|
-
return /* @__PURE__ */ m(J, {
|
|
213
|
-
className: "flex",
|
|
214
|
-
children: /* @__PURE__ */ h(Y, {
|
|
215
|
-
"data-slot": "accordion-trigger",
|
|
216
|
-
className: e("group/accordion-trigger focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:after:border-ring **:data-[slot=accordion-trigger-icon]:text-muted-foreground relative flex flex-1 items-start justify-between rounded-lg border border-transparent py-2.5 text-start text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-3 disabled:pointer-events-none disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ms-auto **:data-[slot=accordion-trigger-icon]:size-4", t),
|
|
217
|
-
...r,
|
|
218
|
-
children: [
|
|
219
|
-
n,
|
|
220
|
-
/* @__PURE__ */ m(g, {
|
|
221
|
-
"data-slot": "accordion-trigger-icon",
|
|
222
|
-
className: "pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden"
|
|
223
|
-
}),
|
|
224
|
-
/* @__PURE__ */ m(_, {
|
|
225
|
-
"data-slot": "accordion-trigger-icon",
|
|
226
|
-
className: "pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline"
|
|
227
|
-
})
|
|
228
|
-
]
|
|
229
|
-
})
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
function te({ className: t, children: n, ...r }) {
|
|
233
|
-
return /* @__PURE__ */ m(X, {
|
|
234
|
-
"data-slot": "accordion-content",
|
|
235
|
-
className: "data-[state=open]:animate-accordion-down data-[state=closed]:animate-accordion-up overflow-hidden text-sm",
|
|
236
|
-
...r,
|
|
237
|
-
children: /* @__PURE__ */ m("div", {
|
|
238
|
-
className: e("[&_a]:hover:text-foreground h-(--radix-accordion-content-height) pt-0 pb-2.5 [&_a]:underline [&_a]:underline-offset-3 [&_p:not(:last-child)]:mb-4", t),
|
|
239
|
-
children: n
|
|
240
|
-
})
|
|
241
|
-
});
|
|
242
|
-
}
|
|
243
|
-
//#endregion
|
|
244
|
-
export { $ as i, te as n, Q as r, Z as t };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("./chunk-mLOUI7ql.js"),t=require("./utils-ChMUqofy.js"),n=require("./dist-DR0lXVFG.js"),r=require("./dist-CiM892Rg.js"),i=require("./dist-CSkpam6a.js"),a=require("./dist-CWElW7UD.js"),o=require("./dist-CRLbUj9C.js"),s=require("./dist-DynSBUGq.js"),c=require("./dist-Byhx2fDJ.js"),l=require("./dist-BRsDdVlJ.js"),u=require("./dist-1C8JOpVg.js");let d=require("react"),f=e.r(d,1);d=e.r(d);let p=require("react/jsx-runtime"),m=require("lucide-react");var h=`Accordion`,g=[`Home`,`End`,`ArrowDown`,`ArrowUp`,`ArrowLeft`,`ArrowRight`],[_,v,y]=a.t(h),[b,x]=i.n(h,[y,l.o]),S=l.o(),C=f.default.forwardRef((e,t)=>{let{type:n,...r}=e,i=r,a=r;return(0,p.jsx)(_.Provider,{scope:e.__scopeAccordion,children:n===`multiple`?(0,p.jsx)(k,{...a,ref:t}):(0,p.jsx)(O,{...i,ref:t})})});C.displayName=h;var[w,T]=b(h),[E,D]=b(h,{collapsible:!1}),O=f.default.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},collapsible:a=!1,...o}=e,[c,l]=s.t({prop:n,defaultProp:r??``,onChange:i,caller:h});return(0,p.jsx)(w,{scope:e.__scopeAccordion,value:f.default.useMemo(()=>c?[c]:[],[c]),onItemOpen:l,onItemClose:f.default.useCallback(()=>a&&l(``),[a,l]),children:(0,p.jsx)(E,{scope:e.__scopeAccordion,collapsible:a,children:(0,p.jsx)(M,{...o,ref:t})})})}),k=f.default.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},...a}=e,[o,c]=s.t({prop:n,defaultProp:r??[],onChange:i,caller:h}),l=f.default.useCallback(e=>c((t=[])=>[...t,e]),[c]),u=f.default.useCallback(e=>c((t=[])=>t.filter(t=>t!==e)),[c]);return(0,p.jsx)(w,{scope:e.__scopeAccordion,value:o,onItemOpen:l,onItemClose:u,children:(0,p.jsx)(E,{scope:e.__scopeAccordion,collapsible:!0,children:(0,p.jsx)(M,{...a,ref:t})})})}),[A,j]=b(h),M=f.default.forwardRef((e,t)=>{let{__scopeAccordion:i,disabled:a,dir:s,orientation:c=`vertical`,...l}=e,d=n.a(f.default.useRef(null),t),m=v(i),h=u.n(s)===`ltr`,y=o.t(e.onKeyDown,e=>{if(!g.includes(e.key))return;let t=e.target,n=m().filter(e=>!e.ref.current?.disabled),r=n.findIndex(e=>e.ref.current===t),i=n.length;if(r===-1)return;e.preventDefault();let a=r,o=i-1,s=()=>{a=r+1,a>o&&(a=0)},l=()=>{a=r-1,a<0&&(a=o)};switch(e.key){case`Home`:a=0;break;case`End`:a=o;break;case`ArrowRight`:c===`horizontal`&&(h?s():l());break;case`ArrowDown`:c===`vertical`&&s();break;case`ArrowLeft`:c===`horizontal`&&(h?l():s());break;case`ArrowUp`:c===`vertical`&&l();break}n[a%i].ref.current?.focus()});return(0,p.jsx)(A,{scope:i,disabled:a,direction:s,orientation:c,children:(0,p.jsx)(_.Slot,{scope:i,children:(0,p.jsx)(r.t.div,{...l,"data-orientation":c,ref:d,onKeyDown:a?void 0:y})})})}),N=`AccordionItem`,[P,F]=b(N),I=f.default.forwardRef((e,t)=>{let{__scopeAccordion:n,value:r,...i}=e,a=j(N,n),o=T(N,n),s=S(n),u=c.t(),d=r&&o.value.includes(r)||!1,f=a.disabled||e.disabled;return(0,p.jsx)(P,{scope:n,open:d,disabled:f,triggerId:u,children:(0,p.jsx)(l.i,{"data-orientation":a.orientation,"data-state":U(d),...s,...i,ref:t,disabled:f,open:d,onOpenChange:e=>{e?o.onItemOpen(r):o.onItemClose(r)}})})});I.displayName=N;var L=`AccordionHeader`,R=f.default.forwardRef((e,t)=>{let{__scopeAccordion:n,...i}=e,a=j(h,n),o=F(L,n);return(0,p.jsx)(r.t.h3,{"data-orientation":a.orientation,"data-state":U(o.open),"data-disabled":o.disabled?``:void 0,...i,ref:t})});R.displayName=L;var z=`AccordionTrigger`,B=f.default.forwardRef((e,t)=>{let{__scopeAccordion:n,...r}=e,i=j(h,n),a=F(z,n),o=D(z,n),s=S(n);return(0,p.jsx)(_.ItemSlot,{scope:n,children:(0,p.jsx)(l.a,{"aria-disabled":a.open&&!o.collapsible||void 0,"data-orientation":i.orientation,id:a.triggerId,...s,...r,ref:t})})});B.displayName=z;var V=`AccordionContent`,H=f.default.forwardRef((e,t)=>{let{__scopeAccordion:n,...r}=e,i=j(h,n),a=F(V,n),o=S(n);return(0,p.jsx)(l.r,{role:`region`,"aria-labelledby":a.triggerId,"data-orientation":i.orientation,...o,...r,ref:t,style:{"--radix-accordion-content-height":`var(--radix-collapsible-content-height)`,"--radix-accordion-content-width":`var(--radix-collapsible-content-width)`,...e.style}})});H.displayName=V;function U(e){return e?`open`:`closed`}var W=C,G=I,K=R,q=B,J=H;function Y({className:e,...n}){return(0,p.jsx)(W,{"data-slot":`accordion`,className:t.t(`flex w-full flex-col`,e),...n})}function X({className:e,...n}){return(0,p.jsx)(G,{"data-slot":`accordion-item`,className:t.t(`not-last:border-b`,e),...n})}function Z({className:e,children:n,...r}){return(0,p.jsx)(K,{className:`flex`,children:(0,p.jsxs)(q,{"data-slot":`accordion-trigger`,className:t.t(`group/accordion-trigger focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:after:border-ring **:data-[slot=accordion-trigger-icon]:text-muted-foreground relative flex flex-1 items-start justify-between rounded-lg border border-transparent py-2.5 text-start text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-3 disabled:pointer-events-none disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ms-auto **:data-[slot=accordion-trigger-icon]:size-4`,e),...r,children:[n,(0,p.jsx)(m.ChevronDownIcon,{"data-slot":`accordion-trigger-icon`,className:`pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden`}),(0,p.jsx)(m.ChevronUpIcon,{"data-slot":`accordion-trigger-icon`,className:`pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline`})]})})}function Q({className:e,children:n,...r}){return(0,p.jsx)(J,{"data-slot":`accordion-content`,className:`data-[state=open]:animate-accordion-down data-[state=closed]:animate-accordion-up overflow-hidden text-sm`,...r,children:(0,p.jsx)(`div`,{className:t.t(`[&_a]:hover:text-foreground h-(--radix-accordion-content-height) pt-0 pb-2.5 [&_a]:underline [&_a]:underline-offset-3 [&_p:not(:last-child)]:mb-4`,e),children:n})})}Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return Z}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return X}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return Y}});
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
const e=require("./chunk-mLOUI7ql.js"),t=require("./utils-ChMUqofy.js"),n=require("./dist-DR0lXVFG.js"),r=require("./dist-CSkpam6a.js"),i=require("./dist-CRLbUj9C.js"),a=require("./dist-Da7BU5sd.js"),o=require("./button.cjs");let s=require("react"),c=e.r(s,1);s=e.r(s);let l=require("react/jsx-runtime");var u=`AlertDialog`,[d,f]=r.n(u,[a.u]),p=a.u(),m=e=>{let{__scopeAlertDialog:t,...n}=e,r=p(t);return(0,l.jsx)(a.o,{...r,...n,modal:!0})};m.displayName=u;var h=`AlertDialogTrigger`,g=c.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=p(n);return(0,l.jsx)(a.c,{...i,...r,ref:t})});g.displayName=h;var _=`AlertDialogPortal`,v=e=>{let{__scopeAlertDialog:t,...n}=e,r=p(t);return(0,l.jsx)(a.a,{...r,...n})};v.displayName=_;var y=`AlertDialogOverlay`,b=c.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=p(n);return(0,l.jsx)(a.i,{...i,...r,ref:t})});b.displayName=y;var x=`AlertDialogContent`,[S,C]=d(x),w=n.r(`AlertDialogContent`),T=c.forwardRef((e,t)=>{let{__scopeAlertDialog:r,children:o,...s}=e,u=p(r),d=c.useRef(null),f=n.a(t,d),m=c.useRef(null);return(0,l.jsx)(a.l,{contentName:x,titleName:E,docsSlug:`alert-dialog`,children:(0,l.jsx)(S,{scope:r,cancelRef:m,children:(0,l.jsxs)(a.n,{role:`alertdialog`,...u,...s,ref:f,onOpenAutoFocus:i.t(s.onOpenAutoFocus,e=>{e.preventDefault(),m.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:[(0,l.jsx)(w,{children:o}),(0,l.jsx)(P,{contentRef:d})]})})})});T.displayName=x;var E=`AlertDialogTitle`,D=c.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=p(n);return(0,l.jsx)(a.s,{...i,...r,ref:t})});D.displayName=E;var O=`AlertDialogDescription`,k=c.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=p(n);return(0,l.jsx)(a.r,{...i,...r,ref:t})});k.displayName=O;var A=`AlertDialogAction`,j=c.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=p(n);return(0,l.jsx)(a.t,{...i,...r,ref:t})});j.displayName=A;var M=`AlertDialogCancel`,N=c.forwardRef((e,t)=>{let{__scopeAlertDialog:r,...i}=e,{cancelRef:o}=C(M,r),s=p(r),c=n.a(t,o);return(0,l.jsx)(a.t,{...s,...i,ref:c})});N.displayName=M;var P=({contentRef:e})=>{let t=`\`${x}\` requires a description for the component to be accessible for screen reader users.
|
|
2
|
-
|
|
3
|
-
You can add a description to the \`${x}\` by passing a \`${O}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
4
|
-
|
|
5
|
-
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${x}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
6
|
-
|
|
7
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return c.useEffect(()=>{document.getElementById(e.current?.getAttribute(`aria-describedby`))||console.warn(t)},[t,e]),null},F=m,I=g,L=v,R=b,z=T,B=j,V=N,H=D,U=k;function W({...e}){return(0,l.jsx)(F,{"data-slot":`alert-dialog`,...e})}function G({...e}){return(0,l.jsx)(I,{"data-slot":`alert-dialog-trigger`,...e})}function K({...e}){return(0,l.jsx)(L,{"data-slot":`alert-dialog-portal`,...e})}function q({className:e,...n}){return(0,l.jsx)(R,{"data-slot":`alert-dialog-overlay`,className:t.t(`data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs`,e),...n})}function J({className:e,size:n=`default`,...r}){return(0,l.jsxs)(K,{children:[(0,l.jsx)(q,{}),(0,l.jsx)(z,{"data-slot":`alert-dialog-content`,"data-size":n,className:t.t(`group/alert-dialog-content bg-popover text-popover-foreground ring-foreground/10 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 fixed start-1/2 top-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl p-4 ring-1 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm rtl:translate-x-1/2`,e),...r})]})}function Y({className:e,...n}){return(0,l.jsx)(`div`,{"data-slot":`alert-dialog-header`,className:t.t(`grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-start sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]`,e),...n})}function X({className:e,...n}){return(0,l.jsx)(`div`,{"data-slot":`alert-dialog-footer`,className:t.t(`bg-muted/50 -mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end`,e),...n})}function Z({className:e,...n}){return(0,l.jsx)(`div`,{"data-slot":`alert-dialog-media`,className:t.t(`bg-muted mb-2 inline-flex size-10 items-center justify-center rounded-md sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*=size-])]:size-6`,e),...n})}function Q({className:e,...n}){return(0,l.jsx)(H,{"data-slot":`alert-dialog-title`,className:t.t(`text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2`,e),...n})}function $({className:e,...n}){return(0,l.jsx)(U,{"data-slot":`alert-dialog-description`,className:t.t(`text-muted-foreground *:[a]:hover:text-foreground text-sm text-balance md:text-pretty *:[a]:underline *:[a]:underline-offset-3`,e),...n})}function ee({className:e,variant:n=`default`,size:r=`default`,...i}){return(0,l.jsx)(o.Button,{variant:n,size:r,asChild:!0,children:(0,l.jsx)(B,{"data-slot":`alert-dialog-action`,className:t.t(e),...i})})}function te({className:e,variant:n=`outline`,size:r=`default`,...i}){return(0,l.jsx)(o.Button,{variant:n,size:r,asChild:!0,children:(0,l.jsx)(V,{"data-slot":`alert-dialog-cancel`,className:t.t(e),...i})})}Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return Z}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return G}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return J}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return q}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return ee}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return X}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return te}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return Y}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return W}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return K}});
|