ivt 0.6.3 → 0.6.4
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/index.mjs +15 -15
- package/dist/accordion-table/index.mjs +27 -27
- package/dist/alert/index.mjs +2 -2
- package/dist/alert-dialog/index.mjs +17 -17
- package/dist/aspect-ratio/index.mjs +1 -1
- package/dist/avatar/index.mjs +7 -7
- package/dist/badge/index.mjs +3 -3
- package/dist/base/index.d.ts +90 -3
- package/dist/base/index.mjs +188 -46
- package/dist/base/index.mjs.map +1 -1
- package/dist/breadcrumb/index.mjs +5 -5
- package/dist/button/index.mjs +3 -3
- package/dist/button-group/index.mjs +4 -4
- package/dist/calendar/index.mjs +9 -9
- package/dist/card/index.mjs +3 -3
- package/dist/carousel/index.mjs +4 -4
- package/dist/chart/index.mjs +4 -4
- package/dist/checkbox/index.mjs +14 -14
- package/dist/chunks/{CalendarRange-C6vOFlmf.mjs → CalendarRange-CSSE2lnb.mjs} +8 -8
- package/dist/chunks/{CalendarRange-C6vOFlmf.mjs.map → CalendarRange-CSSE2lnb.mjs.map} +1 -1
- package/dist/chunks/{ComboboxField-Doi9J8PJ.mjs → ComboboxField-whSP1iXZ.mjs} +9 -9
- package/dist/chunks/{ComboboxField-Doi9J8PJ.mjs.map → ComboboxField-whSP1iXZ.mjs.map} +1 -1
- package/dist/chunks/{Container-z6R2DfdZ.mjs → Container-B-d4mE-S.mjs} +2 -2
- package/dist/chunks/{Container-z6R2DfdZ.mjs.map → Container-B-d4mE-S.mjs.map} +1 -1
- package/dist/chunks/{DeleteConfirmationModal-DJqM51Kc.mjs → DeleteConfirmationModal-DXIXFB-K.mjs} +4 -4
- package/dist/chunks/{DeleteConfirmationModal-DJqM51Kc.mjs.map → DeleteConfirmationModal-DXIXFB-K.mjs.map} +1 -1
- package/dist/chunks/ListItem-DMi-MHsZ.mjs +27 -0
- package/dist/chunks/ListItem-DMi-MHsZ.mjs.map +1 -0
- package/dist/chunks/{TooltipIndicator-DXdQXW6m.mjs → TooltipIndicator--2s1dkLz.mjs} +4 -4
- package/dist/chunks/{TooltipIndicator-DXdQXW6m.mjs.map → TooltipIndicator--2s1dkLz.mjs.map} +1 -1
- package/dist/chunks/{_commonjsHelpers-CVPOz0BZ.mjs → _commonjsHelpers-Chs9vA-X.mjs} +1 -1
- package/dist/chunks/_commonjsHelpers-Chs9vA-X.mjs.map +1 -0
- package/dist/chunks/{accordion-B3vf0fhd.mjs → accordion-CNQB0EvO.mjs} +11 -11
- package/dist/chunks/{accordion-B3vf0fhd.mjs.map → accordion-CNQB0EvO.mjs.map} +1 -1
- package/dist/chunks/{badge-C6F5MW8F.mjs → badge-Xgn2whYL.mjs} +2 -2
- package/dist/chunks/{badge-C6F5MW8F.mjs.map → badge-Xgn2whYL.mjs.map} +1 -1
- package/dist/chunks/{bundle-mjs-C2x5Ccl3.mjs → bundle-mjs-Bsj-DC7F.mjs} +1 -1
- package/dist/chunks/{bundle-mjs-C2x5Ccl3.mjs.map → bundle-mjs-Bsj-DC7F.mjs.map} +1 -1
- package/dist/chunks/{button-BxzkfInK.mjs → button-w3YgbO4N.mjs} +2 -2
- package/dist/chunks/{button-BxzkfInK.mjs.map → button-w3YgbO4N.mjs.map} +1 -1
- package/dist/chunks/{calendar-B4ub8F9N.mjs → calendar-C93_tf2a.mjs} +7 -7
- package/dist/chunks/{calendar-B4ub8F9N.mjs.map → calendar-C93_tf2a.mjs.map} +1 -1
- package/dist/chunks/{calendar-days-ejdYbUqz.mjs → calendar-days-D2L6Zk6C.mjs} +2 -2
- package/dist/chunks/{calendar-days-ejdYbUqz.mjs.map → calendar-days-D2L6Zk6C.mjs.map} +1 -1
- package/dist/chunks/{card-p-17uB9d.mjs → card-C7MCeKlS.mjs} +2 -2
- package/dist/chunks/{card-p-17uB9d.mjs.map → card-C7MCeKlS.mjs.map} +1 -1
- package/dist/chunks/{check-DhrPUDwT.mjs → check-C7sYxkuc.mjs} +2 -2
- package/dist/chunks/{check-DhrPUDwT.mjs.map → check-C7sYxkuc.mjs.map} +1 -1
- package/dist/chunks/{checkbox-DwTI3rrn.mjs → checkbox-BQiWlwi_.mjs} +11 -11
- package/dist/chunks/{checkbox-DwTI3rrn.mjs.map → checkbox-BQiWlwi_.mjs.map} +1 -1
- package/dist/chunks/{chevron-down-C7AXdCbM.mjs → chevron-down-1Bc_6jE2.mjs} +2 -2
- package/dist/chunks/{chevron-down-C7AXdCbM.mjs.map → chevron-down-1Bc_6jE2.mjs.map} +1 -1
- package/dist/chunks/{chevron-left-J7eijyjl.mjs → chevron-left-DL-iJCZO.mjs} +2 -2
- package/dist/chunks/{chevron-left-J7eijyjl.mjs.map → chevron-left-DL-iJCZO.mjs.map} +1 -1
- package/dist/chunks/{chevron-right-Cw3uJl_J.mjs → chevron-right-DzD-SgEG.mjs} +2 -2
- package/dist/chunks/{chevron-right-Cw3uJl_J.mjs.map → chevron-right-DzD-SgEG.mjs.map} +1 -1
- package/dist/chunks/{chevrons-up-down-qiBJw_CE.mjs → chevrons-up-down-4ljYv7S3.mjs} +2 -2
- package/dist/chunks/{chevrons-up-down-qiBJw_CE.mjs.map → chevrons-up-down-4ljYv7S3.mjs.map} +1 -1
- package/dist/chunks/{command-BK2qhT4A.mjs → command-Bojrd8ur.mjs} +8 -8
- package/dist/chunks/{command-BK2qhT4A.mjs.map → command-Bojrd8ur.mjs.map} +1 -1
- package/dist/chunks/{createLucideIcon-CNxzvTyx.mjs → createLucideIcon-CyJmURRz.mjs} +1 -1
- package/dist/chunks/{createLucideIcon-CNxzvTyx.mjs.map → createLucideIcon-CyJmURRz.mjs.map} +1 -1
- package/dist/chunks/{date-bsoTh0X8.mjs → date-DD27VBup.mjs} +2 -2
- package/dist/chunks/{date-bsoTh0X8.mjs.map → date-DD27VBup.mjs.map} +1 -1
- package/dist/chunks/{dialog-C8BqAoDa.mjs → dialog-gJyG_-ra.mjs} +4 -4
- package/dist/chunks/{dialog-C8BqAoDa.mjs.map → dialog-gJyG_-ra.mjs.map} +1 -1
- package/dist/chunks/{ellipsis-gf-7Pb5Z.mjs → ellipsis-O3-odoqB.mjs} +2 -2
- package/dist/chunks/{ellipsis-gf-7Pb5Z.mjs.map → ellipsis-O3-odoqB.mjs.map} +1 -1
- package/dist/chunks/{form-BBdrSGwB.mjs → form-CnjyqvxW.mjs} +3 -3
- package/dist/chunks/{form-BBdrSGwB.mjs.map → form-CnjyqvxW.mjs.map} +1 -1
- package/dist/chunks/{format-vafQCa1-.mjs → format-D3vl8Nt0.mjs} +1 -1
- package/dist/chunks/{format-vafQCa1-.mjs.map → format-D3vl8Nt0.mjs.map} +1 -1
- package/dist/chunks/{format-numbers-CHSMhEsY.mjs → format-numbers-BZH-5wd0.mjs} +1 -1
- package/dist/chunks/{format-numbers-CHSMhEsY.mjs.map → format-numbers-BZH-5wd0.mjs.map} +1 -1
- package/dist/chunks/{hover-card-DRiY9P32.mjs → hover-card-C9kr52Sn.mjs} +11 -11
- package/dist/chunks/{hover-card-DRiY9P32.mjs.map → hover-card-C9kr52Sn.mjs.map} +1 -1
- package/dist/chunks/{index-DLlcteii.mjs → index-1dIXhFYz.mjs} +1 -1
- package/dist/chunks/{index-DLlcteii.mjs.map → index-1dIXhFYz.mjs.map} +1 -1
- package/dist/chunks/{index-2n7_3Cjk.mjs → index-6X5LMFJg.mjs} +1 -1
- package/dist/chunks/{index-2n7_3Cjk.mjs.map → index-6X5LMFJg.mjs.map} +1 -1
- package/dist/chunks/{index-8IGka0hg.mjs → index-A9sCB-kz.mjs} +1 -1
- package/dist/chunks/{index-8IGka0hg.mjs.map → index-A9sCB-kz.mjs.map} +1 -1
- package/dist/chunks/{index-CPpwqFj8.mjs → index-B4otZW4q.mjs} +9 -9
- package/dist/chunks/{index-CPpwqFj8.mjs.map → index-B4otZW4q.mjs.map} +1 -1
- package/dist/chunks/{index-DJVlJsZA.mjs → index-BLX8fFuX.mjs} +3 -3
- package/dist/chunks/{index-DJVlJsZA.mjs.map → index-BLX8fFuX.mjs.map} +1 -1
- package/dist/chunks/{index-CXqAujOo.mjs → index-BTbETlk3.mjs} +2 -2
- package/dist/chunks/{index-CXqAujOo.mjs.map → index-BTbETlk3.mjs.map} +1 -1
- package/dist/chunks/{index-BddawZ7u.mjs → index-B_RTLXiw.mjs} +1 -1
- package/dist/chunks/{index-BddawZ7u.mjs.map → index-B_RTLXiw.mjs.map} +1 -1
- package/dist/chunks/{index-X0kJNTxp.mjs → index-BcETtjq7.mjs} +2 -2
- package/dist/chunks/{index-X0kJNTxp.mjs.map → index-BcETtjq7.mjs.map} +1 -1
- package/dist/chunks/{index-D3ZXHiOc.mjs → index-BnkQwtoI.mjs} +15 -15
- package/dist/chunks/{index-D3ZXHiOc.mjs.map → index-BnkQwtoI.mjs.map} +1 -1
- package/dist/chunks/{index-BXaCSCS6.mjs → index-C0W5TCYS.mjs} +1 -1
- package/dist/chunks/{index-BXaCSCS6.mjs.map → index-C0W5TCYS.mjs.map} +1 -1
- package/dist/chunks/{index-DynSCSYY.mjs → index-CDMXBjs5.mjs} +1 -1
- package/dist/chunks/{index-DynSCSYY.mjs.map → index-CDMXBjs5.mjs.map} +1 -1
- package/dist/chunks/{index-BkXjIXXx.mjs → index-CP5IMvF6.mjs} +1 -1
- package/dist/chunks/{index-BkXjIXXx.mjs.map → index-CP5IMvF6.mjs.map} +1 -1
- package/dist/chunks/{index-BHMUk6SI.mjs → index-CVlrcY4U.mjs} +5 -5
- package/dist/chunks/{index-BHMUk6SI.mjs.map → index-CVlrcY4U.mjs.map} +1 -1
- package/dist/chunks/{index-eryW7n4F.mjs → index-Ch7It_oz.mjs} +11 -11
- package/dist/chunks/{index-eryW7n4F.mjs.map → index-Ch7It_oz.mjs.map} +1 -1
- package/dist/chunks/{index-DmrnxEAX.mjs → index-D2ZM3eSk.mjs} +3 -3
- package/dist/chunks/{index-DmrnxEAX.mjs.map → index-D2ZM3eSk.mjs.map} +1 -1
- package/dist/chunks/{index-D-oXVZAI.mjs → index-D3raJhg-.mjs} +5 -5
- package/dist/chunks/{index-D-oXVZAI.mjs.map → index-D3raJhg-.mjs.map} +1 -1
- package/dist/chunks/{index-8mMbXCbb.mjs → index-DQB8cT4M.mjs} +1 -1
- package/dist/chunks/{index-8mMbXCbb.mjs.map → index-DQB8cT4M.mjs.map} +1 -1
- package/dist/chunks/{index-6jSM1EM8.mjs → index-GxLl6H4O.mjs} +7 -7
- package/dist/chunks/{index-6jSM1EM8.mjs.map → index-GxLl6H4O.mjs.map} +1 -1
- package/dist/chunks/{index--q4ID74U.mjs → index-LzZONhgk.mjs} +9 -9
- package/dist/chunks/{index--q4ID74U.mjs.map → index-LzZONhgk.mjs.map} +1 -1
- package/dist/chunks/{index-Dem9i7oG.mjs → index-MMJu4clW.mjs} +2 -2
- package/dist/chunks/{index-Dem9i7oG.mjs.map → index-MMJu4clW.mjs.map} +1 -1
- package/dist/chunks/{index-B_SGt3iD.mjs → index-P_DA76lP.mjs} +1 -1
- package/dist/chunks/{index-B_SGt3iD.mjs.map → index-P_DA76lP.mjs.map} +1 -1
- package/dist/chunks/{index-C57rrjbu.mjs → index-uSC1GXit.mjs} +2 -2
- package/dist/chunks/{index-C57rrjbu.mjs.map → index-uSC1GXit.mjs.map} +1 -1
- package/dist/chunks/{index-CccKokvh.mjs → index-xsn786mg.mjs} +1 -1
- package/dist/chunks/{index-CccKokvh.mjs.map → index-xsn786mg.mjs.map} +1 -1
- package/dist/chunks/{input-BmaMdUig.mjs → input-CRSidXiN.mjs} +2 -2
- package/dist/chunks/{input-BmaMdUig.mjs.map → input-CRSidXiN.mjs.map} +1 -1
- package/dist/chunks/{label-EVALGS31.mjs → label-CoCA5N9R.mjs} +3 -3
- package/dist/chunks/{label-EVALGS31.mjs.map → label-CoCA5N9R.mjs.map} +1 -1
- package/dist/chunks/{loader-circle-DWX4e7sf.mjs → loader-circle-CJThtpM8.mjs} +2 -2
- package/dist/chunks/{loader-circle-DWX4e7sf.mjs.map → loader-circle-CJThtpM8.mjs.map} +1 -1
- package/dist/chunks/menubar-IxCRcc3h.mjs +571 -0
- package/dist/chunks/menubar-IxCRcc3h.mjs.map +1 -0
- package/dist/chunks/{multi-select-0MSZ11CM.mjs → multi-select-DNB39SYt.mjs} +44 -20
- package/dist/chunks/multi-select-DNB39SYt.mjs.map +1 -0
- package/dist/chunks/{pagination-B1pMeR37.mjs → pagination-pfERksJd.mjs} +6 -6
- package/dist/chunks/{pagination-B1pMeR37.mjs.map → pagination-pfERksJd.mjs.map} +1 -1
- package/dist/chunks/{popover-CTt4bYVl.mjs → popover-CoM9Bdak.mjs} +13 -13
- package/dist/chunks/{popover-CTt4bYVl.mjs.map → popover-CoM9Bdak.mjs.map} +1 -1
- package/dist/chunks/{progress-DB31Fcrp.mjs → progress-PAATxYFo.mjs} +4 -4
- package/dist/chunks/{progress-DB31Fcrp.mjs.map → progress-PAATxYFo.mjs.map} +1 -1
- package/dist/chunks/{react-number-format.es-B74qXV9v.mjs → react-number-format.es-Dgl0O_tF.mjs} +1 -1
- package/dist/chunks/{react-number-format.es-B74qXV9v.mjs.map → react-number-format.es-Dgl0O_tF.mjs.map} +1 -1
- package/dist/chunks/{scroll-area-l4LJuq0i.mjs → scroll-area-BEXJ0PYK.mjs} +11 -11
- package/dist/chunks/{scroll-area-l4LJuq0i.mjs.map → scroll-area-BEXJ0PYK.mjs.map} +1 -1
- package/dist/chunks/{select-CAVb-nGs.mjs → select-BaMJUcD-.mjs} +5 -5
- package/dist/chunks/{select-CAVb-nGs.mjs.map → select-BaMJUcD-.mjs.map} +1 -1
- package/dist/chunks/{separator-D0VFW5Lo.mjs → separator-CT0d-bQx.mjs} +3 -3
- package/dist/chunks/{separator-D0VFW5Lo.mjs.map → separator-CT0d-bQx.mjs.map} +1 -1
- package/dist/chunks/{sheet-y3xiV9Ny.mjs → sheet-DBCCU2LY.mjs} +4 -4
- package/dist/chunks/{sheet-y3xiV9Ny.mjs.map → sheet-DBCCU2LY.mjs.map} +1 -1
- package/dist/chunks/{skeleton-CJl47J7g.mjs → skeleton-BGyVdjEB.mjs} +2 -2
- package/dist/chunks/{skeleton-CJl47J7g.mjs.map → skeleton-BGyVdjEB.mjs.map} +1 -1
- package/dist/chunks/{sortable-CZxlBWrl.mjs → sortable-Due8fPR6.mjs} +3 -3
- package/dist/chunks/{sortable-CZxlBWrl.mjs.map → sortable-Due8fPR6.mjs.map} +1 -1
- package/dist/chunks/{table-C63bCCPl.mjs → table-BCwQzaUG.mjs} +2 -2
- package/dist/chunks/{table-C63bCCPl.mjs.map → table-BCwQzaUG.mjs.map} +1 -1
- package/dist/chunks/{textarea-BM5xOATd.mjs → textarea-CkF8UcX5.mjs} +2 -2
- package/dist/chunks/{textarea-BM5xOATd.mjs.map → textarea-CkF8UcX5.mjs.map} +1 -1
- package/dist/chunks/{toggle-EMAWE62-.mjs → toggle-CXSa2200.mjs} +5 -5
- package/dist/chunks/{toggle-EMAWE62-.mjs.map → toggle-CXSa2200.mjs.map} +1 -1
- package/dist/chunks/{tooltip-d4mEsgiQ.mjs → tooltip-DLElmpyh.mjs} +13 -13
- package/dist/chunks/{tooltip-d4mEsgiQ.mjs.map → tooltip-DLElmpyh.mjs.map} +1 -1
- package/dist/chunks/{trash-2-uP7mRxLY.mjs → trash-2-C4LWxYG0.mjs} +2 -2
- package/dist/chunks/{trash-2-uP7mRxLY.mjs.map → trash-2-C4LWxYG0.mjs.map} +1 -1
- package/dist/chunks/{triangle-alert-XroV-rg0.mjs → triangle-alert-AD47bW6b.mjs} +2 -2
- package/dist/chunks/{triangle-alert-XroV-rg0.mjs.map → triangle-alert-AD47bW6b.mjs.map} +1 -1
- package/dist/chunks/{tslib.es6-Cd4zKtiY.mjs → tslib.es6-BIgLG7bA.mjs} +1 -1
- package/dist/chunks/{tslib.es6-Cd4zKtiY.mjs.map → tslib.es6-BIgLG7bA.mjs.map} +1 -1
- package/dist/chunks/{utils-Cf4V6qcv.mjs → utils-Do8DRzMk.mjs} +2 -2
- package/dist/chunks/{utils-Cf4V6qcv.mjs.map → utils-Do8DRzMk.mjs.map} +1 -1
- package/dist/chunks/{x-Dfbhgap6.mjs → x-DrN_X0V4.mjs} +2 -2
- package/dist/chunks/{x-Dfbhgap6.mjs.map → x-DrN_X0V4.mjs.map} +1 -1
- package/dist/collapsible/index.mjs +9 -9
- package/dist/combobox/index.mjs +26 -26
- package/dist/command/index.mjs +20 -20
- package/dist/context-menu/index.mjs +23 -23
- package/dist/dash/index.mjs +25 -25
- package/dist/data-table/index.mjs +35 -35
- package/dist/date-picker/index.mjs +27 -27
- package/dist/dialog/index.mjs +19 -19
- package/dist/drawer/index.mjs +16 -16
- package/dist/dropdown-menu/index.mjs +23 -23
- package/dist/dropzone/index.mjs +18 -18
- package/dist/editable-table/index.mjs +10 -10
- package/dist/empty/index.mjs +2 -2
- package/dist/field/index.mjs +5 -5
- package/dist/form/index.mjs +5 -5
- package/dist/form-fields/index.mjs +28 -28
- package/dist/hover-card/index.mjs +15 -15
- package/dist/icon/index.mjs +1 -1
- package/dist/index.css +1 -1
- package/dist/input/index.mjs +3 -3
- package/dist/input-group/index.mjs +5 -5
- package/dist/input-otp/index.mjs +3 -3
- package/dist/item/index.mjs +4 -4
- package/dist/ivt.css +1 -1
- package/dist/kbd/index.mjs +2 -2
- package/dist/label/index.mjs +4 -4
- package/dist/layout/index.d.ts +3 -0
- package/dist/layout/index.mjs +28 -25
- package/dist/layout/index.mjs.map +1 -1
- package/dist/menubar/index.mjs +27 -581
- package/dist/menubar/index.mjs.map +1 -1
- package/dist/multi-input-list/index.d.ts +24 -0
- package/dist/multi-input-list/index.mjs +217 -0
- package/dist/multi-input-list/index.mjs.map +1 -0
- package/dist/multi-select/index.d.ts +3 -1
- package/dist/multi-select/index.mjs +31 -31
- package/dist/navigation-menu/index.mjs +17 -17
- package/dist/pagination/index.mjs +8 -8
- package/dist/popover/index.mjs +18 -18
- package/dist/progress/index.mjs +5 -5
- package/dist/radio-group/index.mjs +17 -17
- package/dist/resizable/index.mjs +3 -3
- package/dist/scroll-area/index.mjs +12 -12
- package/dist/select/index.mjs +6 -6
- package/dist/separator/index.mjs +4 -4
- package/dist/shared/index.mjs +5 -5
- package/dist/sheet/index.mjs +19 -19
- package/dist/sidebar/index.mjs +27 -27
- package/dist/skeleton/index.mjs +3 -3
- package/dist/skeleton-component/index.mjs +26 -26
- package/dist/skeleton-component/index.mjs.map +1 -1
- package/dist/slider/index.mjs +12 -12
- package/dist/sortable/index.mjs +4 -4
- package/dist/spinner/index.mjs +4 -4
- package/dist/switch/index.mjs +10 -10
- package/dist/table/index.mjs +3 -3
- package/dist/table-filter/index.mjs +52 -52
- package/dist/tabs/index.mjs +13 -13
- package/dist/textarea/index.mjs +3 -3
- package/dist/toast/index.mjs +15 -15
- package/dist/toggle/index.mjs +7 -7
- package/dist/toggle-group/index.mjs +13 -13
- package/dist/tooltip/index.mjs +17 -17
- package/package.json +5 -1
- package/dist/chunks/_commonjsHelpers-CVPOz0BZ.mjs.map +0 -1
- package/dist/chunks/multi-select-0MSZ11CM.mjs.map +0 -1
|
@@ -0,0 +1,571 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { createCollection } from '@radix-ui/react-collection';
|
|
3
|
+
import { u as useDirection } from './index-CDMXBjs5.mjs';
|
|
4
|
+
import { c as composeEventHandlers } from './index-A9sCB-kz.mjs';
|
|
5
|
+
import { u as useComposedRefs } from './index-P_DA76lP.mjs';
|
|
6
|
+
import { c as createContextScope } from './index-1dIXhFYz.mjs';
|
|
7
|
+
import { u as useId } from './index-uSC1GXit.mjs';
|
|
8
|
+
import { c as createMenuScope, P as Portal, R as Root3$1, A as Anchor2, C as Content2$1, G as Group, S as Separator, L as Label, I as Item2, a as CheckboxItem, b as ItemIndicator, h as RadioGroup, d as RadioItem, e as Sub, g as SubTrigger, f as SubContent, i as Arrow2, j as Circle } from './index-BnkQwtoI.mjs';
|
|
9
|
+
import { c as createRovingFocusGroupScope, R as Root, I as Item } from './index-LzZONhgk.mjs';
|
|
10
|
+
import { P as Primitive } from './index-CP5IMvF6.mjs';
|
|
11
|
+
import { u as useControllableState } from './index-BTbETlk3.mjs';
|
|
12
|
+
import { jsx } from 'react/jsx-runtime';
|
|
13
|
+
import { c as cn } from './utils-Do8DRzMk.mjs';
|
|
14
|
+
import { C as Check } from './check-C7sYxkuc.mjs';
|
|
15
|
+
import { C as ChevronRight } from './chevron-right-DzD-SgEG.mjs';
|
|
16
|
+
|
|
17
|
+
var MENUBAR_NAME = "Menubar";
|
|
18
|
+
var [Collection, useCollection, createCollectionScope] = createCollection(MENUBAR_NAME);
|
|
19
|
+
var [createMenubarContext] = createContextScope(MENUBAR_NAME, [
|
|
20
|
+
createCollectionScope,
|
|
21
|
+
createRovingFocusGroupScope
|
|
22
|
+
]);
|
|
23
|
+
var useMenuScope = createMenuScope();
|
|
24
|
+
var useRovingFocusGroupScope = createRovingFocusGroupScope();
|
|
25
|
+
var [MenubarContextProvider, useMenubarContext] = createMenubarContext(MENUBAR_NAME);
|
|
26
|
+
var Menubar$1 = React.forwardRef((props, forwardedRef)=>{
|
|
27
|
+
const { __scopeMenubar, value: valueProp, onValueChange, defaultValue, loop = true, dir, ...menubarProps } = props;
|
|
28
|
+
const direction = useDirection(dir);
|
|
29
|
+
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenubar);
|
|
30
|
+
const [value, setValue] = useControllableState({
|
|
31
|
+
prop: valueProp,
|
|
32
|
+
onChange: onValueChange,
|
|
33
|
+
defaultProp: defaultValue ?? "",
|
|
34
|
+
caller: MENUBAR_NAME
|
|
35
|
+
});
|
|
36
|
+
const [currentTabStopId, setCurrentTabStopId] = React.useState(null);
|
|
37
|
+
return /* @__PURE__ */ jsx(MenubarContextProvider, {
|
|
38
|
+
scope: __scopeMenubar,
|
|
39
|
+
value,
|
|
40
|
+
onMenuOpen: React.useCallback((value2)=>{
|
|
41
|
+
setValue(value2);
|
|
42
|
+
setCurrentTabStopId(value2);
|
|
43
|
+
}, [
|
|
44
|
+
setValue
|
|
45
|
+
]),
|
|
46
|
+
onMenuClose: React.useCallback(()=>setValue(""), [
|
|
47
|
+
setValue
|
|
48
|
+
]),
|
|
49
|
+
onMenuToggle: React.useCallback((value2)=>{
|
|
50
|
+
setValue((prevValue)=>prevValue ? "" : value2);
|
|
51
|
+
setCurrentTabStopId(value2);
|
|
52
|
+
}, [
|
|
53
|
+
setValue
|
|
54
|
+
]),
|
|
55
|
+
dir: direction,
|
|
56
|
+
loop,
|
|
57
|
+
children: /* @__PURE__ */ jsx(Collection.Provider, {
|
|
58
|
+
scope: __scopeMenubar,
|
|
59
|
+
children: /* @__PURE__ */ jsx(Collection.Slot, {
|
|
60
|
+
scope: __scopeMenubar,
|
|
61
|
+
children: /* @__PURE__ */ jsx(Root, {
|
|
62
|
+
asChild: true,
|
|
63
|
+
...rovingFocusGroupScope,
|
|
64
|
+
orientation: "horizontal",
|
|
65
|
+
loop,
|
|
66
|
+
dir: direction,
|
|
67
|
+
currentTabStopId,
|
|
68
|
+
onCurrentTabStopIdChange: setCurrentTabStopId,
|
|
69
|
+
children: /* @__PURE__ */ jsx(Primitive.div, {
|
|
70
|
+
role: "menubar",
|
|
71
|
+
...menubarProps,
|
|
72
|
+
ref: forwardedRef
|
|
73
|
+
})
|
|
74
|
+
})
|
|
75
|
+
})
|
|
76
|
+
})
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
Menubar$1.displayName = MENUBAR_NAME;
|
|
80
|
+
var MENU_NAME = "MenubarMenu";
|
|
81
|
+
var [MenubarMenuProvider, useMenubarMenuContext] = createMenubarContext(MENU_NAME);
|
|
82
|
+
var MenubarMenu$1 = (props)=>{
|
|
83
|
+
const { __scopeMenubar, value: valueProp, ...menuProps } = props;
|
|
84
|
+
const autoValue = useId();
|
|
85
|
+
const value = valueProp || autoValue || "LEGACY_REACT_AUTO_VALUE";
|
|
86
|
+
const context = useMenubarContext(MENU_NAME, __scopeMenubar);
|
|
87
|
+
const menuScope = useMenuScope(__scopeMenubar);
|
|
88
|
+
const triggerRef = React.useRef(null);
|
|
89
|
+
const wasKeyboardTriggerOpenRef = React.useRef(false);
|
|
90
|
+
const open = context.value === value;
|
|
91
|
+
React.useEffect(()=>{
|
|
92
|
+
if (!open) wasKeyboardTriggerOpenRef.current = false;
|
|
93
|
+
}, [
|
|
94
|
+
open
|
|
95
|
+
]);
|
|
96
|
+
return /* @__PURE__ */ jsx(MenubarMenuProvider, {
|
|
97
|
+
scope: __scopeMenubar,
|
|
98
|
+
value,
|
|
99
|
+
triggerId: useId(),
|
|
100
|
+
triggerRef,
|
|
101
|
+
contentId: useId(),
|
|
102
|
+
wasKeyboardTriggerOpenRef,
|
|
103
|
+
children: /* @__PURE__ */ jsx(Root3$1, {
|
|
104
|
+
...menuScope,
|
|
105
|
+
open,
|
|
106
|
+
onOpenChange: (open2)=>{
|
|
107
|
+
if (!open2) context.onMenuClose();
|
|
108
|
+
},
|
|
109
|
+
modal: false,
|
|
110
|
+
dir: context.dir,
|
|
111
|
+
...menuProps
|
|
112
|
+
})
|
|
113
|
+
});
|
|
114
|
+
};
|
|
115
|
+
MenubarMenu$1.displayName = MENU_NAME;
|
|
116
|
+
var TRIGGER_NAME = "MenubarTrigger";
|
|
117
|
+
var MenubarTrigger$1 = React.forwardRef((props, forwardedRef)=>{
|
|
118
|
+
const { __scopeMenubar, disabled = false, ...triggerProps } = props;
|
|
119
|
+
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenubar);
|
|
120
|
+
const menuScope = useMenuScope(__scopeMenubar);
|
|
121
|
+
const context = useMenubarContext(TRIGGER_NAME, __scopeMenubar);
|
|
122
|
+
const menuContext = useMenubarMenuContext(TRIGGER_NAME, __scopeMenubar);
|
|
123
|
+
const ref = React.useRef(null);
|
|
124
|
+
const composedRefs = useComposedRefs(forwardedRef, ref, menuContext.triggerRef);
|
|
125
|
+
const [isFocused, setIsFocused] = React.useState(false);
|
|
126
|
+
const open = context.value === menuContext.value;
|
|
127
|
+
return /* @__PURE__ */ jsx(Collection.ItemSlot, {
|
|
128
|
+
scope: __scopeMenubar,
|
|
129
|
+
value: menuContext.value,
|
|
130
|
+
disabled,
|
|
131
|
+
children: /* @__PURE__ */ jsx(Item, {
|
|
132
|
+
asChild: true,
|
|
133
|
+
...rovingFocusGroupScope,
|
|
134
|
+
focusable: !disabled,
|
|
135
|
+
tabStopId: menuContext.value,
|
|
136
|
+
children: /* @__PURE__ */ jsx(Anchor2, {
|
|
137
|
+
asChild: true,
|
|
138
|
+
...menuScope,
|
|
139
|
+
children: /* @__PURE__ */ jsx(Primitive.button, {
|
|
140
|
+
type: "button",
|
|
141
|
+
role: "menuitem",
|
|
142
|
+
id: menuContext.triggerId,
|
|
143
|
+
"aria-haspopup": "menu",
|
|
144
|
+
"aria-expanded": open,
|
|
145
|
+
"aria-controls": open ? menuContext.contentId : void 0,
|
|
146
|
+
"data-highlighted": isFocused ? "" : void 0,
|
|
147
|
+
"data-state": open ? "open" : "closed",
|
|
148
|
+
"data-disabled": disabled ? "" : void 0,
|
|
149
|
+
disabled,
|
|
150
|
+
...triggerProps,
|
|
151
|
+
ref: composedRefs,
|
|
152
|
+
onPointerDown: composeEventHandlers(props.onPointerDown, (event)=>{
|
|
153
|
+
if (!disabled && event.button === 0 && event.ctrlKey === false) {
|
|
154
|
+
context.onMenuOpen(menuContext.value);
|
|
155
|
+
if (!open) event.preventDefault();
|
|
156
|
+
}
|
|
157
|
+
}),
|
|
158
|
+
onPointerEnter: composeEventHandlers(props.onPointerEnter, ()=>{
|
|
159
|
+
const menubarOpen = Boolean(context.value);
|
|
160
|
+
if (menubarOpen && !open) {
|
|
161
|
+
context.onMenuOpen(menuContext.value);
|
|
162
|
+
ref.current?.focus();
|
|
163
|
+
}
|
|
164
|
+
}),
|
|
165
|
+
onKeyDown: composeEventHandlers(props.onKeyDown, (event)=>{
|
|
166
|
+
if (disabled) return;
|
|
167
|
+
if ([
|
|
168
|
+
"Enter",
|
|
169
|
+
" "
|
|
170
|
+
].includes(event.key)) context.onMenuToggle(menuContext.value);
|
|
171
|
+
if (event.key === "ArrowDown") context.onMenuOpen(menuContext.value);
|
|
172
|
+
if ([
|
|
173
|
+
"Enter",
|
|
174
|
+
" ",
|
|
175
|
+
"ArrowDown"
|
|
176
|
+
].includes(event.key)) {
|
|
177
|
+
menuContext.wasKeyboardTriggerOpenRef.current = true;
|
|
178
|
+
event.preventDefault();
|
|
179
|
+
}
|
|
180
|
+
}),
|
|
181
|
+
onFocus: composeEventHandlers(props.onFocus, ()=>setIsFocused(true)),
|
|
182
|
+
onBlur: composeEventHandlers(props.onBlur, ()=>setIsFocused(false))
|
|
183
|
+
})
|
|
184
|
+
})
|
|
185
|
+
})
|
|
186
|
+
});
|
|
187
|
+
});
|
|
188
|
+
MenubarTrigger$1.displayName = TRIGGER_NAME;
|
|
189
|
+
var PORTAL_NAME = "MenubarPortal";
|
|
190
|
+
var MenubarPortal$1 = (props)=>{
|
|
191
|
+
const { __scopeMenubar, ...portalProps } = props;
|
|
192
|
+
const menuScope = useMenuScope(__scopeMenubar);
|
|
193
|
+
return /* @__PURE__ */ jsx(Portal, {
|
|
194
|
+
...menuScope,
|
|
195
|
+
...portalProps
|
|
196
|
+
});
|
|
197
|
+
};
|
|
198
|
+
MenubarPortal$1.displayName = PORTAL_NAME;
|
|
199
|
+
var CONTENT_NAME = "MenubarContent";
|
|
200
|
+
var MenubarContent$1 = React.forwardRef((props, forwardedRef)=>{
|
|
201
|
+
const { __scopeMenubar, align = "start", ...contentProps } = props;
|
|
202
|
+
const menuScope = useMenuScope(__scopeMenubar);
|
|
203
|
+
const context = useMenubarContext(CONTENT_NAME, __scopeMenubar);
|
|
204
|
+
const menuContext = useMenubarMenuContext(CONTENT_NAME, __scopeMenubar);
|
|
205
|
+
const getItems = useCollection(__scopeMenubar);
|
|
206
|
+
const hasInteractedOutsideRef = React.useRef(false);
|
|
207
|
+
return /* @__PURE__ */ jsx(Content2$1, {
|
|
208
|
+
id: menuContext.contentId,
|
|
209
|
+
"aria-labelledby": menuContext.triggerId,
|
|
210
|
+
"data-radix-menubar-content": "",
|
|
211
|
+
...menuScope,
|
|
212
|
+
...contentProps,
|
|
213
|
+
ref: forwardedRef,
|
|
214
|
+
align,
|
|
215
|
+
onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event)=>{
|
|
216
|
+
const menubarOpen = Boolean(context.value);
|
|
217
|
+
if (!menubarOpen && !hasInteractedOutsideRef.current) {
|
|
218
|
+
menuContext.triggerRef.current?.focus();
|
|
219
|
+
}
|
|
220
|
+
hasInteractedOutsideRef.current = false;
|
|
221
|
+
event.preventDefault();
|
|
222
|
+
}),
|
|
223
|
+
onFocusOutside: composeEventHandlers(props.onFocusOutside, (event)=>{
|
|
224
|
+
const target = event.target;
|
|
225
|
+
const isMenubarTrigger = getItems().some((item)=>item.ref.current?.contains(target));
|
|
226
|
+
if (isMenubarTrigger) event.preventDefault();
|
|
227
|
+
}),
|
|
228
|
+
onInteractOutside: composeEventHandlers(props.onInteractOutside, ()=>{
|
|
229
|
+
hasInteractedOutsideRef.current = true;
|
|
230
|
+
}),
|
|
231
|
+
onEntryFocus: (event)=>{
|
|
232
|
+
if (!menuContext.wasKeyboardTriggerOpenRef.current) event.preventDefault();
|
|
233
|
+
},
|
|
234
|
+
onKeyDown: composeEventHandlers(props.onKeyDown, (event)=>{
|
|
235
|
+
if ([
|
|
236
|
+
"ArrowRight",
|
|
237
|
+
"ArrowLeft"
|
|
238
|
+
].includes(event.key)) {
|
|
239
|
+
const target = event.target;
|
|
240
|
+
const targetIsSubTrigger = target.hasAttribute("data-radix-menubar-subtrigger");
|
|
241
|
+
const isKeyDownInsideSubMenu = target.closest("[data-radix-menubar-content]") !== event.currentTarget;
|
|
242
|
+
const prevMenuKey = context.dir === "rtl" ? "ArrowRight" : "ArrowLeft";
|
|
243
|
+
const isPrevKey = prevMenuKey === event.key;
|
|
244
|
+
const isNextKey = !isPrevKey;
|
|
245
|
+
if (isNextKey && targetIsSubTrigger) return;
|
|
246
|
+
if (isKeyDownInsideSubMenu && isPrevKey) return;
|
|
247
|
+
const items = getItems().filter((item)=>!item.disabled);
|
|
248
|
+
let candidateValues = items.map((item)=>item.value);
|
|
249
|
+
if (isPrevKey) candidateValues.reverse();
|
|
250
|
+
const currentIndex = candidateValues.indexOf(menuContext.value);
|
|
251
|
+
candidateValues = context.loop ? wrapArray(candidateValues, currentIndex + 1) : candidateValues.slice(currentIndex + 1);
|
|
252
|
+
const [nextValue] = candidateValues;
|
|
253
|
+
if (nextValue) context.onMenuOpen(nextValue);
|
|
254
|
+
}
|
|
255
|
+
}, {
|
|
256
|
+
checkForDefaultPrevented: false
|
|
257
|
+
}),
|
|
258
|
+
style: {
|
|
259
|
+
...props.style,
|
|
260
|
+
// re-namespace exposed content custom properties
|
|
261
|
+
...{
|
|
262
|
+
"--radix-menubar-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
263
|
+
"--radix-menubar-content-available-width": "var(--radix-popper-available-width)",
|
|
264
|
+
"--radix-menubar-content-available-height": "var(--radix-popper-available-height)",
|
|
265
|
+
"--radix-menubar-trigger-width": "var(--radix-popper-anchor-width)",
|
|
266
|
+
"--radix-menubar-trigger-height": "var(--radix-popper-anchor-height)"
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
});
|
|
271
|
+
MenubarContent$1.displayName = CONTENT_NAME;
|
|
272
|
+
var GROUP_NAME = "MenubarGroup";
|
|
273
|
+
var MenubarGroup$1 = React.forwardRef((props, forwardedRef)=>{
|
|
274
|
+
const { __scopeMenubar, ...groupProps } = props;
|
|
275
|
+
const menuScope = useMenuScope(__scopeMenubar);
|
|
276
|
+
return /* @__PURE__ */ jsx(Group, {
|
|
277
|
+
...menuScope,
|
|
278
|
+
...groupProps,
|
|
279
|
+
ref: forwardedRef
|
|
280
|
+
});
|
|
281
|
+
});
|
|
282
|
+
MenubarGroup$1.displayName = GROUP_NAME;
|
|
283
|
+
var LABEL_NAME = "MenubarLabel";
|
|
284
|
+
var MenubarLabel$1 = React.forwardRef((props, forwardedRef)=>{
|
|
285
|
+
const { __scopeMenubar, ...labelProps } = props;
|
|
286
|
+
const menuScope = useMenuScope(__scopeMenubar);
|
|
287
|
+
return /* @__PURE__ */ jsx(Label, {
|
|
288
|
+
...menuScope,
|
|
289
|
+
...labelProps,
|
|
290
|
+
ref: forwardedRef
|
|
291
|
+
});
|
|
292
|
+
});
|
|
293
|
+
MenubarLabel$1.displayName = LABEL_NAME;
|
|
294
|
+
var ITEM_NAME = "MenubarItem";
|
|
295
|
+
var MenubarItem$1 = React.forwardRef((props, forwardedRef)=>{
|
|
296
|
+
const { __scopeMenubar, ...itemProps } = props;
|
|
297
|
+
const menuScope = useMenuScope(__scopeMenubar);
|
|
298
|
+
return /* @__PURE__ */ jsx(Item2, {
|
|
299
|
+
...menuScope,
|
|
300
|
+
...itemProps,
|
|
301
|
+
ref: forwardedRef
|
|
302
|
+
});
|
|
303
|
+
});
|
|
304
|
+
MenubarItem$1.displayName = ITEM_NAME;
|
|
305
|
+
var CHECKBOX_ITEM_NAME = "MenubarCheckboxItem";
|
|
306
|
+
var MenubarCheckboxItem$1 = React.forwardRef((props, forwardedRef)=>{
|
|
307
|
+
const { __scopeMenubar, ...checkboxItemProps } = props;
|
|
308
|
+
const menuScope = useMenuScope(__scopeMenubar);
|
|
309
|
+
return /* @__PURE__ */ jsx(CheckboxItem, {
|
|
310
|
+
...menuScope,
|
|
311
|
+
...checkboxItemProps,
|
|
312
|
+
ref: forwardedRef
|
|
313
|
+
});
|
|
314
|
+
});
|
|
315
|
+
MenubarCheckboxItem$1.displayName = CHECKBOX_ITEM_NAME;
|
|
316
|
+
var RADIO_GROUP_NAME = "MenubarRadioGroup";
|
|
317
|
+
var MenubarRadioGroup$1 = React.forwardRef((props, forwardedRef)=>{
|
|
318
|
+
const { __scopeMenubar, ...radioGroupProps } = props;
|
|
319
|
+
const menuScope = useMenuScope(__scopeMenubar);
|
|
320
|
+
return /* @__PURE__ */ jsx(RadioGroup, {
|
|
321
|
+
...menuScope,
|
|
322
|
+
...radioGroupProps,
|
|
323
|
+
ref: forwardedRef
|
|
324
|
+
});
|
|
325
|
+
});
|
|
326
|
+
MenubarRadioGroup$1.displayName = RADIO_GROUP_NAME;
|
|
327
|
+
var RADIO_ITEM_NAME = "MenubarRadioItem";
|
|
328
|
+
var MenubarRadioItem$1 = React.forwardRef((props, forwardedRef)=>{
|
|
329
|
+
const { __scopeMenubar, ...radioItemProps } = props;
|
|
330
|
+
const menuScope = useMenuScope(__scopeMenubar);
|
|
331
|
+
return /* @__PURE__ */ jsx(RadioItem, {
|
|
332
|
+
...menuScope,
|
|
333
|
+
...radioItemProps,
|
|
334
|
+
ref: forwardedRef
|
|
335
|
+
});
|
|
336
|
+
});
|
|
337
|
+
MenubarRadioItem$1.displayName = RADIO_ITEM_NAME;
|
|
338
|
+
var INDICATOR_NAME = "MenubarItemIndicator";
|
|
339
|
+
var MenubarItemIndicator = React.forwardRef((props, forwardedRef)=>{
|
|
340
|
+
const { __scopeMenubar, ...itemIndicatorProps } = props;
|
|
341
|
+
const menuScope = useMenuScope(__scopeMenubar);
|
|
342
|
+
return /* @__PURE__ */ jsx(ItemIndicator, {
|
|
343
|
+
...menuScope,
|
|
344
|
+
...itemIndicatorProps,
|
|
345
|
+
ref: forwardedRef
|
|
346
|
+
});
|
|
347
|
+
});
|
|
348
|
+
MenubarItemIndicator.displayName = INDICATOR_NAME;
|
|
349
|
+
var SEPARATOR_NAME = "MenubarSeparator";
|
|
350
|
+
var MenubarSeparator$1 = React.forwardRef((props, forwardedRef)=>{
|
|
351
|
+
const { __scopeMenubar, ...separatorProps } = props;
|
|
352
|
+
const menuScope = useMenuScope(__scopeMenubar);
|
|
353
|
+
return /* @__PURE__ */ jsx(Separator, {
|
|
354
|
+
...menuScope,
|
|
355
|
+
...separatorProps,
|
|
356
|
+
ref: forwardedRef
|
|
357
|
+
});
|
|
358
|
+
});
|
|
359
|
+
MenubarSeparator$1.displayName = SEPARATOR_NAME;
|
|
360
|
+
var ARROW_NAME = "MenubarArrow";
|
|
361
|
+
var MenubarArrow = React.forwardRef((props, forwardedRef)=>{
|
|
362
|
+
const { __scopeMenubar, ...arrowProps } = props;
|
|
363
|
+
const menuScope = useMenuScope(__scopeMenubar);
|
|
364
|
+
return /* @__PURE__ */ jsx(Arrow2, {
|
|
365
|
+
...menuScope,
|
|
366
|
+
...arrowProps,
|
|
367
|
+
ref: forwardedRef
|
|
368
|
+
});
|
|
369
|
+
});
|
|
370
|
+
MenubarArrow.displayName = ARROW_NAME;
|
|
371
|
+
var SUB_NAME = "MenubarSub";
|
|
372
|
+
var MenubarSub$1 = (props)=>{
|
|
373
|
+
const { __scopeMenubar, children, open: openProp, onOpenChange, defaultOpen } = props;
|
|
374
|
+
const menuScope = useMenuScope(__scopeMenubar);
|
|
375
|
+
const [open, setOpen] = useControllableState({
|
|
376
|
+
prop: openProp,
|
|
377
|
+
defaultProp: defaultOpen ?? false,
|
|
378
|
+
onChange: onOpenChange,
|
|
379
|
+
caller: SUB_NAME
|
|
380
|
+
});
|
|
381
|
+
return /* @__PURE__ */ jsx(Sub, {
|
|
382
|
+
...menuScope,
|
|
383
|
+
open,
|
|
384
|
+
onOpenChange: setOpen,
|
|
385
|
+
children
|
|
386
|
+
});
|
|
387
|
+
};
|
|
388
|
+
MenubarSub$1.displayName = SUB_NAME;
|
|
389
|
+
var SUB_TRIGGER_NAME = "MenubarSubTrigger";
|
|
390
|
+
var MenubarSubTrigger$1 = React.forwardRef((props, forwardedRef)=>{
|
|
391
|
+
const { __scopeMenubar, ...subTriggerProps } = props;
|
|
392
|
+
const menuScope = useMenuScope(__scopeMenubar);
|
|
393
|
+
return /* @__PURE__ */ jsx(SubTrigger, {
|
|
394
|
+
"data-radix-menubar-subtrigger": "",
|
|
395
|
+
...menuScope,
|
|
396
|
+
...subTriggerProps,
|
|
397
|
+
ref: forwardedRef
|
|
398
|
+
});
|
|
399
|
+
});
|
|
400
|
+
MenubarSubTrigger$1.displayName = SUB_TRIGGER_NAME;
|
|
401
|
+
var SUB_CONTENT_NAME = "MenubarSubContent";
|
|
402
|
+
var MenubarSubContent$1 = React.forwardRef((props, forwardedRef)=>{
|
|
403
|
+
const { __scopeMenubar, ...subContentProps } = props;
|
|
404
|
+
const menuScope = useMenuScope(__scopeMenubar);
|
|
405
|
+
return /* @__PURE__ */ jsx(SubContent, {
|
|
406
|
+
...menuScope,
|
|
407
|
+
"data-radix-menubar-content": "",
|
|
408
|
+
...subContentProps,
|
|
409
|
+
ref: forwardedRef,
|
|
410
|
+
style: {
|
|
411
|
+
...props.style,
|
|
412
|
+
// re-namespace exposed content custom properties
|
|
413
|
+
...{
|
|
414
|
+
"--radix-menubar-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
415
|
+
"--radix-menubar-content-available-width": "var(--radix-popper-available-width)",
|
|
416
|
+
"--radix-menubar-content-available-height": "var(--radix-popper-available-height)",
|
|
417
|
+
"--radix-menubar-trigger-width": "var(--radix-popper-anchor-width)",
|
|
418
|
+
"--radix-menubar-trigger-height": "var(--radix-popper-anchor-height)"
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
});
|
|
422
|
+
});
|
|
423
|
+
MenubarSubContent$1.displayName = SUB_CONTENT_NAME;
|
|
424
|
+
function wrapArray(array, startIndex) {
|
|
425
|
+
return array.map((_, index)=>array[(startIndex + index) % array.length]);
|
|
426
|
+
}
|
|
427
|
+
var Root3 = Menubar$1;
|
|
428
|
+
var Menu = MenubarMenu$1;
|
|
429
|
+
var Trigger = MenubarTrigger$1;
|
|
430
|
+
var Portal2 = MenubarPortal$1;
|
|
431
|
+
var Content2 = MenubarContent$1;
|
|
432
|
+
var Group2 = MenubarGroup$1;
|
|
433
|
+
var Label2 = MenubarLabel$1;
|
|
434
|
+
var Item3 = MenubarItem$1;
|
|
435
|
+
var CheckboxItem2 = MenubarCheckboxItem$1;
|
|
436
|
+
var RadioGroup2 = MenubarRadioGroup$1;
|
|
437
|
+
var RadioItem2 = MenubarRadioItem$1;
|
|
438
|
+
var ItemIndicator2 = MenubarItemIndicator;
|
|
439
|
+
var Separator2 = MenubarSeparator$1;
|
|
440
|
+
var Sub2 = MenubarSub$1;
|
|
441
|
+
var SubTrigger2 = MenubarSubTrigger$1;
|
|
442
|
+
var SubContent2 = MenubarSubContent$1;
|
|
443
|
+
|
|
444
|
+
function Menubar({ className, ...props }) {
|
|
445
|
+
return /*#__PURE__*/ React.createElement(Root3, {
|
|
446
|
+
"data-slot": "menubar",
|
|
447
|
+
className: cn("bg-background *:font-lato flex h-9 w-fit items-center gap-1 rounded-md border p-1 shadow-xs", className),
|
|
448
|
+
...props
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
function MenubarMenu({ ...props }) {
|
|
452
|
+
return /*#__PURE__*/ React.createElement(Menu, {
|
|
453
|
+
"data-slot": "menubar-menu",
|
|
454
|
+
...props
|
|
455
|
+
});
|
|
456
|
+
}
|
|
457
|
+
function MenubarGroup({ ...props }) {
|
|
458
|
+
return /*#__PURE__*/ React.createElement(Group2, {
|
|
459
|
+
"data-slot": "menubar-group",
|
|
460
|
+
...props
|
|
461
|
+
});
|
|
462
|
+
}
|
|
463
|
+
function MenubarPortal({ ...props }) {
|
|
464
|
+
return /*#__PURE__*/ React.createElement(Portal2, {
|
|
465
|
+
"data-slot": "menubar-portal",
|
|
466
|
+
...props
|
|
467
|
+
});
|
|
468
|
+
}
|
|
469
|
+
function MenubarRadioGroup({ ...props }) {
|
|
470
|
+
return /*#__PURE__*/ React.createElement(RadioGroup2, {
|
|
471
|
+
"data-slot": "menubar-radio-group",
|
|
472
|
+
...props
|
|
473
|
+
});
|
|
474
|
+
}
|
|
475
|
+
function MenubarTrigger({ className, ...props }) {
|
|
476
|
+
return /*#__PURE__*/ React.createElement(Trigger, {
|
|
477
|
+
"data-slot": "menubar-trigger",
|
|
478
|
+
className: cn("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground *:font-lato flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none", className),
|
|
479
|
+
...props
|
|
480
|
+
});
|
|
481
|
+
}
|
|
482
|
+
function MenubarContent({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }) {
|
|
483
|
+
return /*#__PURE__*/ React.createElement(MenubarPortal, null, /*#__PURE__*/ React.createElement(Content2, {
|
|
484
|
+
"data-slot": "menubar-content",
|
|
485
|
+
align: align,
|
|
486
|
+
alignOffset: alignOffset,
|
|
487
|
+
sideOffset: sideOffset,
|
|
488
|
+
className: cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 *:font-lato z-50 min-w-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-md", className),
|
|
489
|
+
...props
|
|
490
|
+
}));
|
|
491
|
+
}
|
|
492
|
+
function MenubarItem({ className, inset, variant = "default", ...props }) {
|
|
493
|
+
return /*#__PURE__*/ React.createElement(Item3, {
|
|
494
|
+
"data-slot": "menubar-item",
|
|
495
|
+
"data-inset": inset,
|
|
496
|
+
"data-variant": variant,
|
|
497
|
+
className: cn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground *:font-lato relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
498
|
+
...props
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
function MenubarCheckboxItem({ className, children, checked, ...props }) {
|
|
502
|
+
return /*#__PURE__*/ React.createElement(CheckboxItem2, {
|
|
503
|
+
"data-slot": "menubar-checkbox-item",
|
|
504
|
+
className: cn("focus:bg-accent focus:text-accent-foreground *:font-lato relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
505
|
+
checked: checked,
|
|
506
|
+
...props
|
|
507
|
+
}, /*#__PURE__*/ React.createElement("span", {
|
|
508
|
+
className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center"
|
|
509
|
+
}, /*#__PURE__*/ React.createElement(ItemIndicator2, null, /*#__PURE__*/ React.createElement(Check, {
|
|
510
|
+
className: "size-4"
|
|
511
|
+
}))), children);
|
|
512
|
+
}
|
|
513
|
+
function MenubarRadioItem({ className, children, ...props }) {
|
|
514
|
+
return /*#__PURE__*/ React.createElement(RadioItem2, {
|
|
515
|
+
"data-slot": "menubar-radio-item",
|
|
516
|
+
className: cn("focus:bg-accent focus:text-accent-foreground *:font-lato relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
517
|
+
...props
|
|
518
|
+
}, /*#__PURE__*/ React.createElement("span", {
|
|
519
|
+
className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center"
|
|
520
|
+
}, /*#__PURE__*/ React.createElement(ItemIndicator2, null, /*#__PURE__*/ React.createElement(Circle, {
|
|
521
|
+
className: "size-2 fill-current"
|
|
522
|
+
}))), children);
|
|
523
|
+
}
|
|
524
|
+
function MenubarLabel({ className, inset, ...props }) {
|
|
525
|
+
return /*#__PURE__*/ React.createElement(Label2, {
|
|
526
|
+
"data-slot": "menubar-label",
|
|
527
|
+
"data-inset": inset,
|
|
528
|
+
className: cn("*:font-lato px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", className),
|
|
529
|
+
...props
|
|
530
|
+
});
|
|
531
|
+
}
|
|
532
|
+
function MenubarSeparator({ className, ...props }) {
|
|
533
|
+
return /*#__PURE__*/ React.createElement(Separator2, {
|
|
534
|
+
"data-slot": "menubar-separator",
|
|
535
|
+
className: cn("bg-border *:font-lato -mx-1 my-1 h-px", className),
|
|
536
|
+
...props
|
|
537
|
+
});
|
|
538
|
+
}
|
|
539
|
+
function MenubarShortcut({ className, ...props }) {
|
|
540
|
+
return /*#__PURE__*/ React.createElement("span", {
|
|
541
|
+
"data-slot": "menubar-shortcut",
|
|
542
|
+
className: cn("text-muted-foreground *:font-lato ml-auto text-xs tracking-widest", className),
|
|
543
|
+
...props
|
|
544
|
+
});
|
|
545
|
+
}
|
|
546
|
+
function MenubarSub({ ...props }) {
|
|
547
|
+
return /*#__PURE__*/ React.createElement(Sub2, {
|
|
548
|
+
"data-slot": "menubar-sub",
|
|
549
|
+
...props
|
|
550
|
+
});
|
|
551
|
+
}
|
|
552
|
+
function MenubarSubTrigger({ className, inset, children, ...props }) {
|
|
553
|
+
return /*#__PURE__*/ React.createElement(SubTrigger2, {
|
|
554
|
+
"data-slot": "menubar-sub-trigger",
|
|
555
|
+
"data-inset": inset,
|
|
556
|
+
className: cn("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground *:font-lato flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[inset]:pl-8", className),
|
|
557
|
+
...props
|
|
558
|
+
}, children, /*#__PURE__*/ React.createElement(ChevronRight, {
|
|
559
|
+
className: "ml-auto h-4 w-4"
|
|
560
|
+
}));
|
|
561
|
+
}
|
|
562
|
+
function MenubarSubContent({ className, ...props }) {
|
|
563
|
+
return /*#__PURE__*/ React.createElement(SubContent2, {
|
|
564
|
+
"data-slot": "menubar-sub-content",
|
|
565
|
+
className: cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 *:font-lato z-50 min-w-[8rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg", className),
|
|
566
|
+
...props
|
|
567
|
+
});
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
export { Menubar as M, MenubarPortal as a, MenubarMenu as b, MenubarTrigger as c, MenubarContent as d, MenubarGroup as e, MenubarSeparator as f, MenubarLabel as g, MenubarItem as h, MenubarShortcut as i, MenubarCheckboxItem as j, MenubarRadioGroup as k, MenubarRadioItem as l, MenubarSub as m, MenubarSubTrigger as n, MenubarSubContent as o };
|
|
571
|
+
//# sourceMappingURL=menubar-IxCRcc3h.mjs.map
|