@gv-tech/ui-web 2.22.1 → 2.23.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/accordion-Dd8Hrexd.mjs +244 -0
- package/dist/accordion-DdSOiVyo.js +1 -0
- package/dist/accordion.cjs +1 -1
- package/dist/accordion.d.ts +5 -7
- package/dist/accordion.d.ts.map +1 -1
- package/dist/accordion.mjs +1 -2
- package/dist/alert-dialog-B7zX3gJX.js +7 -0
- package/dist/alert-dialog-BQoG5g_w.mjs +213 -0
- package/dist/alert-dialog.cjs +1 -1
- package/dist/alert-dialog.d.ts +17 -21
- package/dist/alert-dialog.d.ts.map +1 -1
- package/dist/alert-dialog.mjs +2 -4
- package/dist/alert.cjs +1 -1
- package/dist/alert.d.ts +8 -8
- package/dist/alert.d.ts.map +1 -1
- package/dist/alert.mjs +37 -29
- package/dist/{aspect-ratio-CFWobEnT.mjs → aspect-ratio-DnChDaBi.mjs} +10 -4
- package/dist/{aspect-ratio-D9dApiWv.js → aspect-ratio-QD1ZXP2B.js} +1 -1
- package/dist/aspect-ratio.cjs +1 -1
- package/dist/aspect-ratio.d.ts +2 -4
- package/dist/aspect-ratio.d.ts.map +1 -1
- package/dist/aspect-ratio.mjs +1 -1
- package/dist/avatar-C4onD8-4.mjs +127 -0
- package/dist/avatar-ki_M47qG.js +1 -0
- package/dist/avatar.cjs +1 -1
- package/dist/avatar.d.ts +10 -7
- package/dist/avatar.d.ts.map +1 -1
- package/dist/avatar.mjs +2 -3
- package/dist/badge.cjs +1 -1
- package/dist/badge.d.ts +4 -5
- package/dist/badge.d.ts.map +1 -1
- package/dist/badge.mjs +17 -13
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.d.ts +9 -17
- package/dist/breadcrumb.d.ts.map +1 -1
- package/dist/breadcrumb.mjs +67 -58
- package/dist/button-group.cjs +1 -0
- package/dist/button-group.d.ts +11 -0
- package/dist/button-group.d.ts.map +1 -0
- package/dist/button-group.mjs +39 -0
- package/dist/button.cjs +1 -1
- package/dist/button.d.ts +3 -5
- package/dist/button.d.ts.map +1 -1
- package/dist/button.mjs +33 -26
- package/dist/calendar-D9sapvfY.js +1 -0
- package/dist/{calendar-DtFx4qdT.mjs → calendar-Dg6VGycy.mjs} +631 -625
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.d.ts +5 -5
- 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 +10 -10
- package/dist/card.d.ts.map +1 -1
- package/dist/card.mjs +53 -40
- package/dist/carousel-6oFHLN7R.js +1 -0
- package/dist/{carousel-PQJ97GjQ.mjs → carousel-DbDoNdqJ.mjs} +54 -59
- package/dist/carousel.cjs +1 -1
- package/dist/carousel.d.ts +18 -13
- package/dist/carousel.d.ts.map +1 -1
- package/dist/carousel.mjs +2 -4
- package/dist/chart.cjs +3 -3
- package/dist/chart.d.ts +35 -7
- package/dist/chart.d.ts.map +1 -1
- package/dist/chart.mjs +64 -71
- package/dist/checkbox-BLgY82mB.js +1 -0
- package/dist/{checkbox-BOmSuATv.mjs → checkbox-Bts_zfqd.mjs} +32 -29
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.d.ts +2 -5
- package/dist/checkbox.d.ts.map +1 -1
- package/dist/checkbox.mjs +1 -2
- package/dist/collapsible.cjs +1 -1
- package/dist/collapsible.d.ts +4 -6
- package/dist/collapsible.d.ts.map +1 -1
- package/dist/collapsible.mjs +21 -3
- package/dist/combobox-6qNx9Wbb.js +4 -0
- package/dist/combobox-yDMqxM_J.mjs +5522 -0
- package/dist/combobox.cjs +1 -0
- package/dist/combobox.d.ts +21 -0
- package/dist/combobox.d.ts.map +1 -0
- package/dist/combobox.mjs +4 -0
- package/dist/command-C6wJ5giF.mjs +576 -0
- package/dist/command-DCrPL1iW.js +1 -0
- package/dist/command.cjs +1 -1
- package/dist/command.d.ts +16 -80
- package/dist/command.d.ts.map +1 -1
- package/dist/command.mjs +1 -2
- package/dist/context-menu-CydUpD4W.mjs +349 -0
- package/dist/context-menu-DQ7XuuG5.js +1 -0
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.d.ts +29 -21
- 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 +15 -17
- package/dist/dialog.d.ts.map +1 -1
- package/dist/dialog.mjs +89 -43
- package/dist/direction.cjs +1 -0
- package/dist/direction.d.ts +7 -0
- package/dist/direction.d.ts.map +1 -0
- package/dist/direction.mjs +15 -0
- package/dist/dist-1C8JOpVg.js +1 -0
- package/dist/{dist-CTaBktQl.mjs → dist-B1OcuinL.mjs} +93 -92
- package/dist/dist-BGZDG175.mjs +199 -0
- package/dist/dist-BPBwSSyk.mjs +8 -0
- package/dist/{dist-BTlmz3JV.js → dist-BPX1UGAz2.js} +1 -1
- package/dist/dist-BRsDdVlJ.js +1 -0
- package/dist/{dist-_LAgxsbh.mjs → dist-BWwCr-xN.mjs} +10 -9
- package/dist/dist-BYdcKuDi.mjs +16 -0
- package/dist/{dist-DCKyUINZ.mjs → dist-BlB11V_z.mjs} +1 -1
- package/dist/dist-CCXBcfM3.js +1 -0
- package/dist/{dist--EFQaGUD.mjs → dist-CDU9vno-.mjs} +4 -4
- package/dist/dist-CJolxugc.js +1 -0
- package/dist/dist-CQhWBhaI.mjs +91 -0
- package/dist/dist-CRLbUj9C.js +1 -0
- package/dist/dist-CWElW7UD.js +1 -0
- package/dist/{dist-NIAlh3KC.js → dist-CXbzwSnE.js} +1 -1
- package/dist/{dist-C5EZ0AD6.mjs → dist-CYj6O95k.mjs} +42 -41
- package/dist/{dist-Bjlzl0jN.mjs → dist-Cacc4QIh.mjs} +13 -10
- package/dist/dist-ChuP-5Gb.js +1 -0
- package/dist/dist-CiM892Rg.js +1 -0
- package/dist/{dist-Doq7FY_P.js → dist-CuMQq0hV.js} +1 -1
- package/dist/dist-DMnXk8Uo.js +1 -0
- package/dist/{dist-CRmJFaEL.mjs → dist-DPBTfUqI.mjs} +18 -17
- package/dist/dist-DR0lXVFG.js +1 -0
- package/dist/dist-Da7BU5sd.js +5 -0
- package/dist/{dist-D_tuvB-W.mjs → dist-Dz3LbuDd.mjs} +8 -9
- package/dist/{dist-9gQKRtL7.mjs → dist-GhACpuJb2.mjs} +1 -1
- package/dist/dist-o4zlRoDG.js +1 -0
- package/dist/{dist-DdVp13bp.mjs → dist-rGeQfsgN.mjs} +1 -1
- package/dist/{dist-BQOrag93.mjs → dist-tvb2Wafb.mjs} +22 -21
- package/dist/drawer.cjs +1 -1
- package/dist/drawer.d.ts +10 -21
- package/dist/drawer.d.ts.map +1 -1
- package/dist/drawer.mjs +74 -45
- package/dist/dropdown-menu-BoJvZ3Fj.js +1 -0
- package/dist/dropdown-menu-CriaO1_i.mjs +347 -0
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.d.ts +27 -21
- package/dist/dropdown-menu.d.ts.map +1 -1
- package/dist/dropdown-menu.mjs +1 -1
- package/dist/empty.cjs +1 -0
- package/dist/empty.d.ts +13 -0
- package/dist/empty.d.ts.map +1 -0
- package/dist/empty.mjs +60 -0
- package/dist/{es2015-DkZq_IIO.mjs → es2015-BhmbVcui.mjs} +2 -2
- package/dist/{es2015-Ca60p53M.js → es2015-D22cM8Q_.js} +1 -1
- package/dist/field.cjs +1 -0
- package/dist/field.d.ts +18 -0
- package/dist/field.d.ts.map +1 -0
- package/dist/field.mjs +109 -0
- package/dist/floating-ui.react-dom-DgS_bqyY.mjs +1089 -0
- package/dist/floating-ui.react-dom-DpCJEf_x.js +1 -0
- package/dist/form.cjs +1 -1
- package/dist/form.mjs +8 -8
- package/dist/hooks/use-mobile.d.ts +2 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -0
- package/dist/hooks/use-theme.d.ts +16 -0
- package/dist/hooks/use-theme.d.ts.map +1 -1
- package/dist/{hover-card-BOk3-K0k.mjs → hover-card-CJ-ibpbC.mjs} +53 -33
- package/dist/hover-card-CK5SjVLL.js +1 -0
- package/dist/hover-card.cjs +1 -1
- package/dist/hover-card.d.ts +4 -6
- 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.d.ts +14 -43
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +66 -54
- package/dist/input-group.cjs +1 -0
- package/dist/input-group.d.ts +18 -0
- package/dist/input-group.d.ts.map +1 -0
- package/dist/input-group.mjs +78 -0
- package/dist/input-otp-BH_9dVhh.mjs +391 -0
- package/dist/input-otp-BibboKMt.js +20 -0
- package/dist/input-otp.cjs +1 -0
- package/dist/input-otp.d.ts +9 -0
- package/dist/input-otp.d.ts.map +1 -0
- package/dist/input-otp.mjs +4 -0
- package/dist/input.cjs +1 -1
- package/dist/input.d.ts +1 -4
- package/dist/input.d.ts.map +1 -1
- package/dist/input.mjs +11 -11
- package/dist/item.cjs +1 -0
- package/dist/item.d.ts +25 -0
- package/dist/item.d.ts.map +1 -0
- package/dist/item.mjs +118 -0
- package/dist/kbd.cjs +1 -0
- package/dist/kbd.d.ts +5 -0
- package/dist/kbd.d.ts.map +1 -0
- package/dist/kbd.mjs +20 -0
- package/dist/label-BXMSoyyu.js +1 -0
- package/dist/label-C8GNfPU0.mjs +25 -0
- package/dist/label.cjs +1 -1
- package/dist/label.d.ts +2 -5
- package/dist/label.d.ts.map +1 -1
- package/dist/label.mjs +1 -2
- package/dist/menubar-BcyqIJgy.mjs +441 -0
- package/dist/menubar-DPxokWFI.js +1 -0
- package/dist/menubar.cjs +1 -1
- package/dist/menubar.d.ts +25 -19
- package/dist/menubar.d.ts.map +1 -1
- package/dist/menubar.mjs +1 -1
- package/dist/native-select.cjs +1 -0
- package/dist/native-select.d.ts +8 -0
- package/dist/native-select.d.ts.map +1 -0
- package/dist/native-select.mjs +39 -0
- package/dist/navigation-menu-2yE2MUu-.js +1 -0
- package/dist/navigation-menu-N8gkxEXE.mjs +628 -0
- package/dist/navigation-menu.cjs +1 -1
- package/dist/navigation-menu.d.ts +11 -11
- 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 +13 -26
- package/dist/pagination.d.ts.map +1 -1
- package/dist/pagination.mjs +76 -59
- package/dist/popover-D1AO-E8p.js +1 -0
- package/dist/popover-wQACF3ut.mjs +245 -0
- package/dist/popover.cjs +1 -1
- package/dist/popover.d.ts +9 -8
- package/dist/popover.d.ts.map +1 -1
- package/dist/popover.mjs +2 -3
- package/dist/{progress-30ehxjKg.mjs → progress-DPWSEWa5.mjs} +19 -14
- package/dist/{progress-BqWHea4f.js → progress-ShXZwOfj.js} +2 -2
- package/dist/progress.cjs +1 -1
- package/dist/progress.d.ts +2 -4
- package/dist/progress.d.ts.map +1 -1
- package/dist/progress.mjs +1 -1
- package/dist/radio-group-CQbZCQmj.mjs +199 -0
- package/dist/radio-group-DAEi5vW_.js +1 -0
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.d.ts +3 -8
- package/dist/radio-group.d.ts.map +1 -1
- package/dist/radio-group.mjs +1 -2
- package/dist/resizable-Cv-mKMKP.js +1 -0
- package/dist/{resizable-DhOcAmNX.mjs → resizable-DJSE3e5L.mjs} +310 -282
- package/dist/resizable.cjs +1 -1
- package/dist/resizable.d.ts +6 -7
- package/dist/resizable.d.ts.map +1 -1
- package/dist/resizable.mjs +1 -1
- package/dist/{scroll-area-DJcPs0_v.mjs → scroll-area-8QcqkHnC.mjs} +69 -58
- package/dist/scroll-area-Cqqinhxf.js +1 -0
- package/dist/scroll-area.cjs +1 -1
- package/dist/scroll-area.d.ts +3 -5
- package/dist/scroll-area.d.ts.map +1 -1
- package/dist/scroll-area.mjs +1 -2
- 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 +15 -14
- package/dist/select-DdUveoSA.js +1 -0
- package/dist/{select-D4bxRFq5.mjs → select-yoeH35x2.mjs} +279 -245
- package/dist/select.cjs +1 -1
- package/dist/select.d.ts +13 -13
- package/dist/select.d.ts.map +1 -1
- package/dist/select.mjs +1 -1
- package/dist/{separator-DZACUutC.mjs → separator-BU1ea5gl.mjs} +14 -10
- package/dist/separator-DBjErwHf.js +1 -0
- package/dist/separator.cjs +1 -1
- package/dist/separator.d.ts +2 -4
- 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 +13 -26
- package/dist/sheet.d.ts.map +1 -1
- package/dist/sheet.mjs +84 -54
- package/dist/shim-B5sEfNEJ.js +1 -0
- package/dist/shim-DX33EwUw.mjs +91 -0
- package/dist/sidebar-B-sWccYh.mjs +355 -0
- package/dist/sidebar-DIW-1cin.js +1 -0
- package/dist/sidebar.cjs +1 -0
- package/dist/sidebar.d.ts +45 -0
- package/dist/sidebar.d.ts.map +1 -0
- package/dist/sidebar.mjs +5 -0
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.d.ts +1 -4
- package/dist/skeleton.d.ts.map +1 -1
- package/dist/skeleton.mjs +2 -3
- package/dist/{slider-DTdrUy_s.mjs → slider-CCPXejUF.mjs} +81 -59
- package/dist/slider-w05gD_Ix.js +1 -0
- package/dist/slider.cjs +1 -1
- package/dist/slider.d.ts +2 -4
- 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 +1 -5
- package/dist/sonner.d.ts.map +1 -1
- package/dist/sonner.mjs +23 -16
- package/dist/spinner.cjs +1 -0
- package/dist/spinner.d.ts +4 -0
- package/dist/spinner.d.ts.map +1 -0
- package/dist/spinner.mjs +15 -0
- package/dist/support-fab.cjs +1 -1
- package/dist/support-fab.mjs +1 -1
- package/dist/switch-CDBqsWQa.mjs +112 -0
- package/dist/switch-X2WBJsUu.js +1 -0
- package/dist/switch.cjs +1 -1
- package/dist/switch.d.ts +4 -4
- package/dist/switch.d.ts.map +1 -1
- package/dist/switch.mjs +1 -1
- package/dist/table.cjs +1 -1
- package/dist/table.d.ts +8 -10
- package/dist/table.d.ts.map +1 -1
- package/dist/table.mjs +62 -54
- package/dist/tabs-DzvgrVzk.js +1 -0
- package/dist/tabs-KDeHjVQU.mjs +160 -0
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.d.ts +10 -8
- package/dist/tabs.d.ts.map +1 -1
- package/dist/tabs.mjs +2 -2
- package/dist/text.d.ts +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.d.ts +1 -4
- package/dist/textarea.d.ts.map +1 -1
- package/dist/textarea.mjs +10 -10
- package/dist/{theme-toggle-Dtze9fyN.js → theme-toggle-C2Y4bIM3.js} +1 -1
- package/dist/{theme-toggle-DAHBgdy0.mjs → theme-toggle-clE-HpSS.mjs} +9 -9
- package/dist/theme-toggle.cjs +1 -1
- package/dist/theme-toggle.mjs +1 -2
- package/dist/toast-1keyrzem.js +1 -0
- package/dist/{toast-G9LdgDDE.mjs → toast-DVI6jPq5.mjs} +102 -101
- package/dist/toast.cjs +1 -1
- package/dist/toast.d.ts.map +1 -1
- package/dist/toast.mjs +1 -1
- package/dist/{toaster-WQJjavlc.mjs → toaster-Czhz-ktg.mjs} +1 -1
- package/dist/{toaster-CKD4CKAZ.js → toaster-DfDb2-aI.js} +1 -1
- package/dist/toaster.cjs +1 -1
- package/dist/toaster.mjs +1 -1
- package/dist/toggle-BGkq5XDM.js +1 -0
- package/dist/toggle-BfIIdlA6.mjs +58 -0
- package/dist/toggle-group-CbqgoPFU.mjs +167 -0
- package/dist/toggle-group-D7hR4BT2.js +1 -0
- package/dist/toggle-group.cjs +1 -1
- package/dist/toggle-group.d.ts +7 -9
- 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 +6 -5
- package/dist/toggle.d.ts.map +1 -1
- package/dist/toggle.mjs +2 -19
- package/dist/tooltip-CAIbshMk.js +1 -0
- package/dist/{tooltip-BHEcM7lO.mjs → tooltip-D_o8Z-Ya.mjs} +106 -90
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.d.ts +5 -10
- package/dist/tooltip.d.ts.map +1 -1
- package/dist/tooltip.mjs +1 -1
- package/package.json +8 -6
- package/src/accordion.tsx +58 -51
- package/src/alert-dialog.tsx +140 -93
- package/src/alert.tsx +44 -33
- package/src/aspect-ratio.tsx +10 -4
- package/src/avatar.tsx +92 -37
- package/src/badge.tsx +24 -14
- package/src/breadcrumb.tsx +73 -85
- package/src/button-group.tsx +78 -0
- package/src/button.tsx +46 -24
- package/src/calendar.tsx +52 -40
- package/src/card.tsx +67 -42
- package/src/carousel.tsx +164 -174
- package/src/chart.tsx +206 -232
- package/src/checkbox.tsx +17 -17
- package/src/collapsible.tsx +16 -10
- package/src/combobox.tsx +282 -0
- package/src/command.tsx +123 -120
- package/src/context-menu.tsx +206 -179
- package/src/dialog.tsx +111 -65
- package/src/direction.tsx +18 -0
- package/src/drawer.tsx +75 -78
- package/src/dropdown-menu.tsx +211 -180
- package/src/empty.tsx +83 -0
- package/src/field.tsx +217 -0
- package/src/hooks/use-mobile.ts +19 -0
- package/src/hover-card.tsx +33 -27
- package/src/index.ts +108 -154
- package/src/input-group.tsx +143 -0
- package/src/input-otp.tsx +81 -0
- package/src/input.tsx +8 -8
- package/src/item.tsx +185 -0
- package/src/kbd.tsx +21 -0
- package/src/label.tsx +17 -14
- package/src/menubar.tsx +211 -199
- package/src/native-select.tsx +54 -0
- package/src/navigation-menu.tsx +115 -110
- package/src/pagination.tsx +65 -80
- package/src/popover.tsx +53 -41
- package/src/progress.tsx +22 -20
- package/src/radio-group.tsx +22 -34
- package/src/resizable.tsx +34 -49
- package/src/scroll-area.tsx +43 -35
- package/src/search.tsx +12 -9
- package/src/select.tsx +138 -133
- package/src/separator.tsx +25 -18
- package/src/sheet.tsx +97 -127
- package/src/sidebar.tsx +660 -0
- package/src/skeleton.tsx +7 -6
- package/src/slider.tsx +51 -19
- package/src/sonner.tsx +22 -12
- package/src/spinner.tsx +10 -0
- package/src/support-fab.tsx +1 -1
- package/src/switch.tsx +28 -21
- package/src/table.tsx +61 -87
- package/src/tabs.tsx +75 -56
- package/src/textarea.tsx +8 -10
- package/src/toast.tsx +5 -0
- package/src/toggle-group.tsx +76 -40
- package/src/toggle.tsx +35 -15
- package/src/tooltip.tsx +41 -43
- package/dist/accordion-BTF24dQU.js +0 -1
- package/dist/accordion-DHTV2Am8.mjs +0 -221
- package/dist/alert-dialog-Bwn2-Uyf.mjs +0 -164
- package/dist/alert-dialog-DBMX5E0-.js +0 -7
- package/dist/avatar-BI7s8omb.js +0 -1
- package/dist/avatar-hzlewncL.mjs +0 -185
- package/dist/calendar-ykdYhTj9.js +0 -1
- package/dist/carousel-DSmAn1nc.js +0 -1
- package/dist/checkbox-dK6DJKeV.js +0 -1
- package/dist/command-CDSbHz4C.js +0 -1
- package/dist/command-j0rZqZ7B.mjs +0 -531
- package/dist/context-menu-BWgLbKLP.js +0 -1
- package/dist/context-menu-CWSzssAO.mjs +0 -292
- package/dist/dist-B28N93_W.js +0 -1
- package/dist/dist-B43Kk7ii.js +0 -1
- package/dist/dist-BTPL2C0R.js +0 -1
- package/dist/dist-BjEG16aJ.mjs +0 -111
- package/dist/dist-BlKAvKHD.js +0 -1
- package/dist/dist-C3Z3atn0.mjs +0 -10
- package/dist/dist-C4q8IPk4.mjs +0 -28
- package/dist/dist-CPglx4om.js +0 -1
- package/dist/dist-CV2U2xFR.js +0 -1
- package/dist/dist-Cv9YaN1n.mjs +0 -61
- package/dist/dist-DAe-fOIM.mjs +0 -25
- package/dist/dist-DQAJMTj0.js +0 -1
- package/dist/dist-DaCPM8ia.js +0 -1
- package/dist/dist-DasmYflz.js +0 -1
- package/dist/dist-DneYUKe0.js +0 -1
- package/dist/dist-Du2jbEkG.mjs +0 -1282
- package/dist/dist-Dw6-GQAn.js +0 -1
- package/dist/dist-DwGlbIjj.js +0 -5
- package/dist/dist-Dzjlf9ug.js +0 -1
- package/dist/dist-GaBUW_Tu.js +0 -1
- package/dist/dropdown-menu-Bz5LlLjl.js +0 -1
- package/dist/dropdown-menu-Cp1qpOLk.mjs +0 -288
- package/dist/hover-card-CyKIuXGH.js +0 -1
- package/dist/label-DGuuPl_e.mjs +0 -22
- package/dist/label-gVkdll-j.js +0 -1
- package/dist/menubar-DNrIQhY5.mjs +0 -410
- package/dist/menubar-DkjAo6qJ.js +0 -1
- package/dist/navigation-menu-1cmCEi0j.mjs +0 -602
- package/dist/navigation-menu-qPt8hpr5.js +0 -1
- package/dist/popover-CbM1tqdC.mjs +0 -201
- package/dist/popover-DGTgqdKX.js +0 -1
- package/dist/radio-group-BGThTiQM.mjs +0 -193
- package/dist/radio-group-ClFpAswm.js +0 -1
- package/dist/resizable-D09wr7tV.js +0 -1
- package/dist/scroll-area-W_aOLOdE.js +0 -1
- package/dist/select-BQtkQBiD.js +0 -1
- package/dist/separator-BmkhoDge.js +0 -1
- package/dist/slider-Bkluwc3b.js +0 -1
- package/dist/switch-DENAxyga.js +0 -1
- package/dist/switch-DbsdyQVg.mjs +0 -103
- package/dist/tabs-C9sMowgZ.mjs +0 -136
- package/dist/tabs-DeK-zpy4.js +0 -1
- package/dist/toast-BtXY2QTe.js +0 -1
- package/dist/toggle-group-B0H9TwdD.mjs +0 -155
- package/dist/toggle-group-CAyztsIl.js +0 -1
- package/dist/tooltip-CKcMl7tK.js +0 -1
- /package/dist/{dist-C_45sBzc.js → dist-C_45sBzc2.js} +0 -0
- /package/dist/{dist-DGzGsPqo.mjs → dist-DGzGsPqo2.mjs} +0 -0
package/src/avatar.tsx
CHANGED
|
@@ -1,41 +1,96 @@
|
|
|
1
|
-
|
|
2
|
-
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
1
|
+
import { Avatar as AvatarPrimitive } from 'radix-ui';
|
|
3
2
|
import * as React from 'react';
|
|
4
3
|
|
|
5
|
-
import { AvatarBaseProps, AvatarFallbackBaseProps, AvatarImageBaseProps } from '@gv-tech/ui-core';
|
|
6
4
|
import { cn } from './lib/utils';
|
|
7
5
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
6
|
+
import type { AvatarBaseProps } from '@gv-tech/ui-core';
|
|
7
|
+
|
|
8
|
+
function Avatar({
|
|
9
|
+
className,
|
|
10
|
+
size = 'default',
|
|
11
|
+
...props
|
|
12
|
+
}: React.ComponentProps<typeof AvatarPrimitive.Root> & {
|
|
13
|
+
size?: 'default' | 'sm' | 'lg';
|
|
14
|
+
}) {
|
|
15
|
+
return (
|
|
16
|
+
<AvatarPrimitive.Root
|
|
17
|
+
data-slot="avatar"
|
|
18
|
+
data-size={size}
|
|
19
|
+
className={cn(
|
|
20
|
+
'group/avatar after:border-border relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten',
|
|
21
|
+
className,
|
|
22
|
+
)}
|
|
23
|
+
{...props}
|
|
24
|
+
/>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function AvatarImage({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Image>) {
|
|
29
|
+
return (
|
|
30
|
+
<AvatarPrimitive.Image
|
|
31
|
+
data-slot="avatar-image"
|
|
32
|
+
className={cn('aspect-square size-full rounded-full object-cover', className)}
|
|
33
|
+
{...props}
|
|
34
|
+
/>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function AvatarFallback({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {
|
|
39
|
+
return (
|
|
40
|
+
<AvatarPrimitive.Fallback
|
|
41
|
+
data-slot="avatar-fallback"
|
|
42
|
+
className={cn(
|
|
43
|
+
'bg-muted text-muted-foreground flex size-full items-center justify-center rounded-full text-sm group-data-[size=sm]/avatar:text-xs',
|
|
44
|
+
className,
|
|
45
|
+
)}
|
|
46
|
+
{...props}
|
|
47
|
+
/>
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function AvatarBadge({ className, ...props }: React.ComponentProps<'span'>) {
|
|
52
|
+
return (
|
|
53
|
+
<span
|
|
54
|
+
data-slot="avatar-badge"
|
|
55
|
+
className={cn(
|
|
56
|
+
'bg-primary text-primary-foreground ring-background absolute end-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-blend-color ring-2 select-none',
|
|
57
|
+
'group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden',
|
|
58
|
+
'group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2',
|
|
59
|
+
'group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2',
|
|
60
|
+
className,
|
|
61
|
+
)}
|
|
62
|
+
{...props}
|
|
63
|
+
/>
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function AvatarGroup({ className, ...props }: React.ComponentProps<'div'>) {
|
|
68
|
+
return (
|
|
69
|
+
<div
|
|
70
|
+
data-slot="avatar-group"
|
|
71
|
+
className={cn(
|
|
72
|
+
'group/avatar-group *:data-[slot=avatar]:ring-background flex -space-x-2 *:data-[slot=avatar]:ring-2',
|
|
73
|
+
className,
|
|
74
|
+
)}
|
|
75
|
+
{...props}
|
|
76
|
+
/>
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function AvatarGroupCount({ className, ...props }: React.ComponentProps<'div'>) {
|
|
81
|
+
return (
|
|
82
|
+
<div
|
|
83
|
+
data-slot="avatar-group-count"
|
|
84
|
+
className={cn(
|
|
85
|
+
'bg-muted text-muted-foreground ring-background relative flex size-8 shrink-0 items-center justify-center rounded-full text-sm ring-2 group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3',
|
|
86
|
+
className,
|
|
87
|
+
)}
|
|
88
|
+
{...props}
|
|
89
|
+
/>
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export { Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage };
|
|
94
|
+
|
|
95
|
+
// Verify that the component satisfies the ui-core contract
|
|
96
|
+
const _verifyAvatarContract: AvatarBaseProps = {} as unknown as React.ComponentProps<typeof Avatar>;
|
package/src/badge.tsx
CHANGED
|
@@ -1,19 +1,23 @@
|
|
|
1
|
-
'use client';
|
|
2
1
|
import { cva, type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { Slot } from 'radix-ui';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
|
|
5
|
-
import { BadgeBaseProps } from '@gv-tech/ui-core';
|
|
6
5
|
import { cn } from './lib/utils';
|
|
7
6
|
|
|
7
|
+
import type { BadgeBaseProps } from '@gv-tech/ui-core';
|
|
8
|
+
|
|
8
9
|
const badgeVariants = cva(
|
|
9
|
-
'inline-flex items-center rounded-
|
|
10
|
+
'group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!',
|
|
10
11
|
{
|
|
11
12
|
variants: {
|
|
12
13
|
variant: {
|
|
13
|
-
default: '
|
|
14
|
-
secondary: '
|
|
15
|
-
destructive:
|
|
16
|
-
|
|
14
|
+
default: 'bg-primary text-primary-foreground [a]:hover:bg-primary/80',
|
|
15
|
+
secondary: 'bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80',
|
|
16
|
+
destructive:
|
|
17
|
+
'bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20',
|
|
18
|
+
outline: 'border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground',
|
|
19
|
+
ghost: 'hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50',
|
|
20
|
+
link: 'text-primary underline-offset-4 hover:underline',
|
|
17
21
|
},
|
|
18
22
|
},
|
|
19
23
|
defaultVariants: {
|
|
@@ -22,14 +26,20 @@ const badgeVariants = cva(
|
|
|
22
26
|
},
|
|
23
27
|
);
|
|
24
28
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
function Badge({
|
|
30
|
+
className,
|
|
31
|
+
variant = 'default',
|
|
32
|
+
asChild = false,
|
|
33
|
+
...props
|
|
34
|
+
}: React.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & { asChild?: boolean }) {
|
|
35
|
+
const Comp = asChild ? Slot.Root : 'span';
|
|
30
36
|
|
|
31
|
-
|
|
32
|
-
|
|
37
|
+
return (
|
|
38
|
+
<Comp data-slot="badge" data-variant={variant} className={cn(badgeVariants({ variant }), className)} {...props} />
|
|
39
|
+
);
|
|
33
40
|
}
|
|
34
41
|
|
|
35
42
|
export { Badge, badgeVariants };
|
|
43
|
+
|
|
44
|
+
// Verify that the component satisfies the ui-core contract
|
|
45
|
+
const _verifyBadgeContract: BadgeBaseProps = {} as unknown as React.ComponentProps<typeof Badge>;
|
package/src/breadcrumb.tsx
CHANGED
|
@@ -1,98 +1,84 @@
|
|
|
1
|
-
|
|
2
|
-
import { Slot } from '@radix-ui/react-slot';
|
|
3
|
-
import { ChevronRight, MoreHorizontal } from 'lucide-react';
|
|
1
|
+
import { Slot } from 'radix-ui';
|
|
4
2
|
import * as React from 'react';
|
|
5
3
|
|
|
6
|
-
import {
|
|
7
|
-
BreadcrumbBaseProps,
|
|
8
|
-
BreadcrumbEllipsisBaseProps,
|
|
9
|
-
BreadcrumbItemBaseProps,
|
|
10
|
-
BreadcrumbLinkBaseProps,
|
|
11
|
-
BreadcrumbListBaseProps,
|
|
12
|
-
BreadcrumbPageBaseProps,
|
|
13
|
-
BreadcrumbSeparatorBaseProps,
|
|
14
|
-
} from '@gv-tech/ui-core';
|
|
4
|
+
import { ChevronRightIcon, MoreHorizontalIcon } from 'lucide-react';
|
|
15
5
|
import { cn } from './lib/utils';
|
|
16
6
|
|
|
17
|
-
|
|
18
|
-
HTMLElement,
|
|
19
|
-
React.ComponentPropsWithoutRef<'nav'> &
|
|
20
|
-
BreadcrumbBaseProps & {
|
|
21
|
-
separator?: React.ReactNode;
|
|
22
|
-
}
|
|
23
|
-
>(({ ...props }, ref) => <nav ref={ref} aria-label="breadcrumb" {...props} />);
|
|
24
|
-
Breadcrumb.displayName = 'Breadcrumb';
|
|
7
|
+
import type { BreadcrumbBaseProps } from '@gv-tech/ui-core';
|
|
25
8
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
>(({ className, ...props }, ref) => (
|
|
30
|
-
<ol
|
|
31
|
-
ref={ref}
|
|
32
|
-
className={cn(
|
|
33
|
-
'text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5',
|
|
34
|
-
className,
|
|
35
|
-
)}
|
|
36
|
-
{...props}
|
|
37
|
-
/>
|
|
38
|
-
));
|
|
39
|
-
BreadcrumbList.displayName = 'BreadcrumbList';
|
|
9
|
+
function Breadcrumb({ className, ...props }: React.ComponentProps<'nav'>) {
|
|
10
|
+
return <nav aria-label="breadcrumb" data-slot="breadcrumb" className={cn(className)} {...props} />;
|
|
11
|
+
}
|
|
40
12
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
<
|
|
44
|
-
|
|
45
|
-
)
|
|
46
|
-
|
|
13
|
+
function BreadcrumbList({ className, ...props }: React.ComponentProps<'ol'>) {
|
|
14
|
+
return (
|
|
15
|
+
<ol
|
|
16
|
+
data-slot="breadcrumb-list"
|
|
17
|
+
className={cn('text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm wrap-break-word', className)}
|
|
18
|
+
{...props}
|
|
19
|
+
/>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
47
22
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
>(({ asChild, className, ...props }, ref) => {
|
|
52
|
-
const Comp = asChild ? Slot : 'a';
|
|
23
|
+
function BreadcrumbItem({ className, ...props }: React.ComponentProps<'li'>) {
|
|
24
|
+
return <li data-slot="breadcrumb-item" className={cn('inline-flex items-center gap-1', className)} {...props} />;
|
|
25
|
+
}
|
|
53
26
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
BreadcrumbLink.displayName = 'BreadcrumbLink';
|
|
57
|
-
|
|
58
|
-
const BreadcrumbPage = React.forwardRef<
|
|
59
|
-
HTMLSpanElement,
|
|
60
|
-
React.ComponentPropsWithoutRef<'span'> & BreadcrumbPageBaseProps
|
|
61
|
-
>(({ className, ...props }, ref) => (
|
|
62
|
-
<span
|
|
63
|
-
ref={ref}
|
|
64
|
-
role="link"
|
|
65
|
-
aria-disabled="true"
|
|
66
|
-
aria-current="page"
|
|
67
|
-
className={cn('text-foreground font-normal', className)}
|
|
68
|
-
{...props}
|
|
69
|
-
/>
|
|
70
|
-
));
|
|
71
|
-
BreadcrumbPage.displayName = 'BreadcrumbPage';
|
|
72
|
-
|
|
73
|
-
const BreadcrumbSeparator = ({
|
|
74
|
-
children,
|
|
27
|
+
function BreadcrumbLink({
|
|
28
|
+
asChild,
|
|
75
29
|
className,
|
|
76
30
|
...props
|
|
77
|
-
}: React.ComponentProps<'
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
31
|
+
}: React.ComponentProps<'a'> & {
|
|
32
|
+
asChild?: boolean;
|
|
33
|
+
}) {
|
|
34
|
+
const Comp = asChild ? Slot.Root : 'a';
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<Comp data-slot="breadcrumb-link" className={cn('hover:text-foreground transition-colors', className)} {...props} />
|
|
38
|
+
);
|
|
39
|
+
}
|
|
83
40
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
);
|
|
95
|
-
|
|
41
|
+
function BreadcrumbPage({ className, ...props }: React.ComponentProps<'span'>) {
|
|
42
|
+
return (
|
|
43
|
+
<span
|
|
44
|
+
data-slot="breadcrumb-page"
|
|
45
|
+
role="link"
|
|
46
|
+
aria-disabled="true"
|
|
47
|
+
aria-current="page"
|
|
48
|
+
className={cn('text-foreground font-normal', className)}
|
|
49
|
+
{...props}
|
|
50
|
+
/>
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function BreadcrumbSeparator({ children, className, ...props }: React.ComponentProps<'li'>) {
|
|
55
|
+
return (
|
|
56
|
+
<li
|
|
57
|
+
data-slot="breadcrumb-separator"
|
|
58
|
+
role="presentation"
|
|
59
|
+
aria-hidden="true"
|
|
60
|
+
className={cn('[&>svg]:size-3.5', className)}
|
|
61
|
+
{...props}
|
|
62
|
+
>
|
|
63
|
+
{children ?? <ChevronRightIcon />}
|
|
64
|
+
</li>
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function BreadcrumbEllipsis({ className, ...props }: React.ComponentProps<'span'>) {
|
|
69
|
+
return (
|
|
70
|
+
<span
|
|
71
|
+
data-slot="breadcrumb-ellipsis"
|
|
72
|
+
role="presentation"
|
|
73
|
+
aria-hidden="true"
|
|
74
|
+
className={cn('flex size-5 items-center justify-center [&>svg]:size-4', className)}
|
|
75
|
+
{...props}
|
|
76
|
+
>
|
|
77
|
+
<MoreHorizontalIcon />
|
|
78
|
+
<span className="sr-only">More</span>
|
|
79
|
+
</span>
|
|
80
|
+
);
|
|
81
|
+
}
|
|
96
82
|
|
|
97
83
|
export {
|
|
98
84
|
Breadcrumb,
|
|
@@ -103,4 +89,6 @@ export {
|
|
|
103
89
|
BreadcrumbPage,
|
|
104
90
|
BreadcrumbSeparator,
|
|
105
91
|
};
|
|
106
|
-
|
|
92
|
+
|
|
93
|
+
// Verify that the component satisfies the ui-core contract
|
|
94
|
+
const _verifyBreadcrumbContract: BreadcrumbBaseProps = {} as unknown as React.ComponentProps<typeof Breadcrumb>;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { cva, type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { Slot } from 'radix-ui';
|
|
3
|
+
|
|
4
|
+
import { cn } from './lib/utils';
|
|
5
|
+
import { Separator } from './separator';
|
|
6
|
+
|
|
7
|
+
const buttonGroupVariants = cva(
|
|
8
|
+
'group/button-group flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-e-lg [&>[data-slot=select-trigger]:not([class*=w-])]:w-fit [&>input]:flex-1',
|
|
9
|
+
{
|
|
10
|
+
variants: {
|
|
11
|
+
orientation: {
|
|
12
|
+
horizontal:
|
|
13
|
+
'[&>*:not(:first-child)]:rounded-s-none [&>*:not(:first-child)]:border-s-0 [&>*:not(:last-child)]:rounded-e-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-e-lg!',
|
|
14
|
+
vertical:
|
|
15
|
+
'flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-lg!',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
defaultVariants: {
|
|
19
|
+
orientation: 'horizontal',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
import type { ButtonGroupBaseProps, ButtonGroupSeparatorBaseProps, ButtonGroupTextBaseProps } from '@gv-tech/ui-core';
|
|
25
|
+
|
|
26
|
+
function ButtonGroup({
|
|
27
|
+
className,
|
|
28
|
+
orientation,
|
|
29
|
+
...props
|
|
30
|
+
}: React.ComponentProps<'div'> & VariantProps<typeof buttonGroupVariants> & ButtonGroupBaseProps) {
|
|
31
|
+
return (
|
|
32
|
+
<div
|
|
33
|
+
role="group"
|
|
34
|
+
data-slot="button-group"
|
|
35
|
+
data-orientation={orientation}
|
|
36
|
+
className={cn(buttonGroupVariants({ orientation }), className)}
|
|
37
|
+
{...props}
|
|
38
|
+
/>
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function ButtonGroupText({
|
|
43
|
+
className,
|
|
44
|
+
asChild = false,
|
|
45
|
+
...props
|
|
46
|
+
}: React.ComponentProps<'div'> & ButtonGroupTextBaseProps) {
|
|
47
|
+
const Comp = asChild ? Slot.Root : 'div';
|
|
48
|
+
|
|
49
|
+
return (
|
|
50
|
+
<Comp
|
|
51
|
+
className={cn(
|
|
52
|
+
'bg-muted flex items-center gap-2 rounded-lg border px-2.5 text-sm font-medium [&_svg]:pointer-events-none [&_svg:not([class*=size-])]:size-4',
|
|
53
|
+
className,
|
|
54
|
+
)}
|
|
55
|
+
{...props}
|
|
56
|
+
/>
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function ButtonGroupSeparator({
|
|
61
|
+
className,
|
|
62
|
+
orientation = 'vertical',
|
|
63
|
+
...props
|
|
64
|
+
}: React.ComponentProps<typeof Separator> & ButtonGroupSeparatorBaseProps) {
|
|
65
|
+
return (
|
|
66
|
+
<Separator
|
|
67
|
+
data-slot="button-group-separator"
|
|
68
|
+
orientation={orientation}
|
|
69
|
+
className={cn(
|
|
70
|
+
'bg-input relative self-stretch data-[orientation=horizontal]:mx-px data-[orientation=horizontal]:w-auto data-[orientation=vertical]:my-px data-[orientation=vertical]:h-auto',
|
|
71
|
+
className,
|
|
72
|
+
)}
|
|
73
|
+
{...props}
|
|
74
|
+
/>
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants };
|
package/src/button.tsx
CHANGED
|
@@ -1,28 +1,37 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { Slot } from '@radix-ui/react-slot';
|
|
3
1
|
import { cva, type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { Slot } from 'radix-ui';
|
|
4
3
|
import * as React from 'react';
|
|
5
4
|
|
|
6
|
-
import type { ButtonBaseProps } from '@gv-tech/ui-core';
|
|
7
5
|
import { cn } from './lib/utils';
|
|
8
6
|
|
|
7
|
+
import type { ButtonBaseProps } from '@gv-tech/ui-core';
|
|
8
|
+
|
|
9
9
|
const buttonVariants = cva(
|
|
10
|
-
'inline-flex items-center justify-center
|
|
10
|
+
'group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4',
|
|
11
11
|
{
|
|
12
12
|
variants: {
|
|
13
13
|
variant: {
|
|
14
|
-
default: 'bg-primary text-primary-foreground
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
secondary:
|
|
18
|
-
|
|
14
|
+
default: 'bg-primary text-primary-foreground hover:bg-primary/80',
|
|
15
|
+
outline:
|
|
16
|
+
'border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50',
|
|
17
|
+
secondary:
|
|
18
|
+
'bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground',
|
|
19
|
+
ghost:
|
|
20
|
+
'hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50',
|
|
21
|
+
destructive:
|
|
22
|
+
'bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40',
|
|
19
23
|
link: 'text-primary underline-offset-4 hover:underline',
|
|
20
24
|
},
|
|
21
25
|
size: {
|
|
22
|
-
default: 'h-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
default: 'h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2',
|
|
27
|
+
xs: 'h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&_svg:not([class*=size-])]:size-3',
|
|
28
|
+
sm: 'h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&_svg:not([class*=size-])]:size-3.5',
|
|
29
|
+
lg: 'h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2',
|
|
30
|
+
icon: 'size-8',
|
|
31
|
+
'icon-xs':
|
|
32
|
+
'size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*=size-])]:size-3',
|
|
33
|
+
'icon-sm': 'size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg',
|
|
34
|
+
'icon-lg': 'size-9',
|
|
26
35
|
},
|
|
27
36
|
},
|
|
28
37
|
defaultVariants: {
|
|
@@ -32,17 +41,30 @@ const buttonVariants = cva(
|
|
|
32
41
|
},
|
|
33
42
|
);
|
|
34
43
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
44
|
+
function Button({
|
|
45
|
+
className,
|
|
46
|
+
variant = 'default',
|
|
47
|
+
size = 'default',
|
|
48
|
+
asChild = false,
|
|
49
|
+
...props
|
|
50
|
+
}: React.ComponentProps<'button'> &
|
|
51
|
+
VariantProps<typeof buttonVariants> & {
|
|
52
|
+
asChild?: boolean;
|
|
53
|
+
}) {
|
|
54
|
+
const Comp = asChild ? Slot.Root : 'button';
|
|
39
55
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
)
|
|
46
|
-
|
|
56
|
+
return (
|
|
57
|
+
<Comp
|
|
58
|
+
data-slot="button"
|
|
59
|
+
data-variant={variant}
|
|
60
|
+
data-size={size}
|
|
61
|
+
className={cn(buttonVariants({ variant, size, className }))}
|
|
62
|
+
{...props}
|
|
63
|
+
/>
|
|
64
|
+
);
|
|
65
|
+
}
|
|
47
66
|
|
|
48
67
|
export { Button, buttonVariants };
|
|
68
|
+
|
|
69
|
+
// Verify that the component satisfies the ui-core contract
|
|
70
|
+
const _verifyButtonContract: ButtonBaseProps = {} as unknown as React.ComponentProps<typeof Button>;
|