@fragiola/primitives-vue 0.0.0-stage → 0.1.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/CHANGELOG.md +67 -0
- package/LICENSE +21 -0
- package/README.md +41 -2
- package/dist/accordion-CmKuKHkK.js +278 -0
- package/dist/accordion-CmKuKHkK.js.map +1 -0
- package/dist/accordion.d.ts +4 -0
- package/dist/accordion.js +1 -0
- package/dist/alert-dialog-CPG51QOk.js +38 -0
- package/dist/alert-dialog-CPG51QOk.js.map +1 -0
- package/dist/alert-dialog.d.ts +9 -0
- package/dist/alert-dialog.js +1 -0
- package/dist/aspect-ratio-Ba7GaRnV.js +37 -0
- package/dist/aspect-ratio-Ba7GaRnV.js.map +1 -0
- package/dist/aspect-ratio.d.ts +3 -0
- package/dist/aspect-ratio.js +1 -0
- package/dist/async-list-Dc8wqcxe.js +39 -0
- package/dist/async-list-Dc8wqcxe.js.map +1 -0
- package/dist/async-list.d.ts +2 -0
- package/dist/async-list.js +1 -0
- package/dist/autocomplete-virtual-D_2Wuih7.js +55 -0
- package/dist/autocomplete-virtual-D_2Wuih7.js.map +1 -0
- package/dist/autocomplete-virtual.d.ts +2 -0
- package/dist/autocomplete-virtual.js +3 -0
- package/dist/autocomplete.d.ts +6 -0
- package/dist/autocomplete.js +1 -0
- package/dist/avatar-DdDGa6x7.js +166 -0
- package/dist/avatar-DdDGa6x7.js.map +1 -0
- package/dist/avatar.d.ts +3 -0
- package/dist/avatar.js +1 -0
- package/dist/breadcrumbs-BFAjlnC_.js +131 -0
- package/dist/breadcrumbs-BFAjlnC_.js.map +1 -0
- package/dist/breadcrumbs.d.ts +3 -0
- package/dist/breadcrumbs.js +1 -0
- package/dist/button-DVUcUCXc.js +56 -0
- package/dist/button-DVUcUCXc.js.map +1 -0
- package/dist/button-attributes-Ue6sUse5.js +83 -0
- package/dist/button-attributes-Ue6sUse5.js.map +1 -0
- package/dist/button.d.ts +3 -0
- package/dist/button.js +1 -0
- package/dist/calendar-preset-Bjc7rcNX.js +84 -0
- package/dist/calendar-preset-Bjc7rcNX.js.map +1 -0
- package/dist/calendar-preset.d.ts +3 -0
- package/dist/calendar-preset.js +3 -0
- package/dist/calendar-prev-button-jluYmM-3.js +307 -0
- package/dist/calendar-prev-button-jluYmM-3.js.map +1 -0
- package/dist/calendar-root-base-C9dfkl55.js +310 -0
- package/dist/calendar-root-base-C9dfkl55.js.map +1 -0
- package/dist/calendar-view-Djy5iHGK.js +160 -0
- package/dist/calendar-view-Djy5iHGK.js.map +1 -0
- package/dist/calendar-view.d.ts +4 -0
- package/dist/calendar-view.js +4 -0
- package/dist/calendar.d.ts +5 -0
- package/dist/calendar.js +1 -0
- package/dist/carousel-BOacnCmz.js +553 -0
- package/dist/carousel-BOacnCmz.js.map +1 -0
- package/dist/carousel.d.ts +4 -0
- package/dist/carousel.js +1 -0
- package/dist/cascade-select-B-Nf6eOA.js +697 -0
- package/dist/cascade-select-B-Nf6eOA.js.map +1 -0
- package/dist/cascade-select.d.ts +6 -0
- package/dist/cascade-select.js +1 -0
- package/dist/change-details-Bc4-Xzdm.d.ts +37 -0
- package/dist/checkbox-D5NvqFgS.js +230 -0
- package/dist/checkbox-D5NvqFgS.js.map +1 -0
- package/dist/checkbox-group-C3XftlZd.js +104 -0
- package/dist/checkbox-group-C3XftlZd.js.map +1 -0
- package/dist/checkbox-group-context-C0Z5sWM1.js +5 -0
- package/dist/checkbox-group-context-C0Z5sWM1.js.map +1 -0
- package/dist/checkbox-group.d.ts +4 -0
- package/dist/checkbox-group.js +1 -0
- package/dist/checkbox.d.ts +4 -0
- package/dist/checkbox.js +1 -0
- package/dist/clipboard-BM-4-lTv.js +195 -0
- package/dist/clipboard-BM-4-lTv.js.map +1 -0
- package/dist/clipboard.d.ts +4 -0
- package/dist/clipboard.js +1 -0
- package/dist/collapsible-DSCxhlQN.js +158 -0
- package/dist/collapsible-DSCxhlQN.js.map +1 -0
- package/dist/collapsible.d.ts +4 -0
- package/dist/collapsible.js +1 -0
- package/dist/color-area-uEHPo-Nq.js +350 -0
- package/dist/color-area-uEHPo-Nq.js.map +1 -0
- package/dist/color-area.d.ts +4 -0
- package/dist/color-area.js +1 -0
- package/dist/color-field-Di2IbTa3.js +384 -0
- package/dist/color-field-Di2IbTa3.js.map +1 -0
- package/dist/color-field.d.ts +4 -0
- package/dist/color-field.js +1 -0
- package/dist/color-picker-BgFgq5R0.js +311 -0
- package/dist/color-picker-BgFgq5R0.js.map +1 -0
- package/dist/color-picker-binding-CJ-Cbxbj.js +5 -0
- package/dist/color-picker-binding-CJ-Cbxbj.js.map +1 -0
- package/dist/color-picker-popover-Dx6LX0V3.js +233 -0
- package/dist/color-picker-popover-Dx6LX0V3.js.map +1 -0
- package/dist/color-picker-popover.d.ts +6 -0
- package/dist/color-picker-popover.js +1 -0
- package/dist/color-picker.d.ts +4 -0
- package/dist/color-picker.js +1 -0
- package/dist/color-slider-BCqoolnY.js +410 -0
- package/dist/color-slider-BCqoolnY.js.map +1 -0
- package/dist/color-slider.d.ts +4 -0
- package/dist/color-slider.js +1 -0
- package/dist/color-swatch-C-8IN28V.js +54 -0
- package/dist/color-swatch-C-8IN28V.js.map +1 -0
- package/dist/color-swatch-picker-CU1wrhjX.js +312 -0
- package/dist/color-swatch-picker-CU1wrhjX.js.map +1 -0
- package/dist/color-swatch-picker.d.ts +4 -0
- package/dist/color-swatch-picker.js +1 -0
- package/dist/color-swatch.d.ts +3 -0
- package/dist/color-swatch.js +1 -0
- package/dist/color-wheel-F_BoXKON.js +284 -0
- package/dist/color-wheel-F_BoXKON.js.map +1 -0
- package/dist/color-wheel.d.ts +4 -0
- package/dist/color-wheel.js +1 -0
- package/dist/combobox-virtual-DTRTVq5N.js +56 -0
- package/dist/combobox-virtual-DTRTVq5N.js.map +1 -0
- package/dist/combobox-virtual.d.ts +2 -0
- package/dist/combobox-virtual.js +3 -0
- package/dist/combobox.d.ts +6 -0
- package/dist/combobox.js +1 -0
- package/dist/command-virtual-LoTBDEY5.js +59 -0
- package/dist/command-virtual-LoTBDEY5.js.map +1 -0
- package/dist/command-virtual.d.ts +3 -0
- package/dist/command-virtual.js +3 -0
- package/dist/command.d.ts +4 -0
- package/dist/command.js +1 -0
- package/dist/context-menu-zdHIGS9E.js +151 -0
- package/dist/context-menu-zdHIGS9E.js.map +1 -0
- package/dist/context-menu.d.ts +7 -0
- package/dist/context-menu.js +1 -0
- package/dist/date-field-pgSTZiPb.js +78 -0
- package/dist/date-field-pgSTZiPb.js.map +1 -0
- package/dist/date-field-root-base-CYLuAykm.js +212 -0
- package/dist/date-field-root-base-CYLuAykm.js.map +1 -0
- package/dist/date-field.d.ts +4 -0
- package/dist/date-field.js +1 -0
- package/dist/date-picker-input-CiuuRiWZ.js +16 -0
- package/dist/date-picker-input-CiuuRiWZ.js.map +1 -0
- package/dist/date-picker-input-root-base-ExPSLeKw.js +318 -0
- package/dist/date-picker-input-root-base-ExPSLeKw.js.map +1 -0
- package/dist/date-picker-input.d.ts +4 -0
- package/dist/date-picker-input.js +3 -0
- package/dist/date-picker-trigger-C2BlzvfR.js +349 -0
- package/dist/date-picker-trigger-C2BlzvfR.js.map +1 -0
- package/dist/date-picker.d.ts +6 -0
- package/dist/date-picker.js +1 -0
- package/dist/date-range-field-Bygmkl5c.js +80 -0
- package/dist/date-range-field-Bygmkl5c.js.map +1 -0
- package/dist/date-range-field-input-CivpQMYd.js +69 -0
- package/dist/date-range-field-input-CivpQMYd.js.map +1 -0
- package/dist/date-range-field-root-base-BP26TSWz.js +267 -0
- package/dist/date-range-field-root-base-BP26TSWz.js.map +1 -0
- package/dist/date-range-field.d.ts +4 -0
- package/dist/date-range-field.js +1 -0
- package/dist/date-range-picker-input-BUNCCXUY.js +17 -0
- package/dist/date-range-picker-input-BUNCCXUY.js.map +1 -0
- package/dist/date-range-picker-input.d.ts +4 -0
- package/dist/date-range-picker-input.js +3 -0
- package/dist/date-range-picker.d.ts +7 -0
- package/dist/date-range-picker.js +1 -0
- package/dist/dialog-MNjIMCfA.js +38 -0
- package/dist/dialog-MNjIMCfA.js.map +1 -0
- package/dist/dialog-root-base-jbZipaoQ.js +329 -0
- package/dist/dialog-root-base-jbZipaoQ.js.map +1 -0
- package/dist/dialog-viewport-tYqWTs9Q.d.ts +54 -0
- package/dist/dialog.d.ts +9 -0
- package/dist/dialog.js +1 -0
- package/dist/direction-CN_deiZU.js +30 -0
- package/dist/direction-CN_deiZU.js.map +1 -0
- package/dist/direction-context-D-C_P6Lm.js +19 -0
- package/dist/direction-context-D-C_P6Lm.js.map +1 -0
- package/dist/direction.d.ts +2 -0
- package/dist/direction.js +1 -0
- package/dist/drawer-BcnuGtEt.js +357 -0
- package/dist/drawer-BcnuGtEt.js.map +1 -0
- package/dist/drawer.d.ts +9 -0
- package/dist/drawer.js +1 -0
- package/dist/drop-zone-vFJ5Kvsy.js +98 -0
- package/dist/drop-zone-vFJ5Kvsy.js.map +1 -0
- package/dist/drop-zone.d.ts +4 -0
- package/dist/drop-zone.js +1 -0
- package/dist/editable-CabzXgiN.js +436 -0
- package/dist/editable-CabzXgiN.js.map +1 -0
- package/dist/editable.d.ts +4 -0
- package/dist/editable.js +1 -0
- package/dist/field-DQ2d5nhC.js +397 -0
- package/dist/field-DQ2d5nhC.js.map +1 -0
- package/dist/field.d.ts +4 -0
- package/dist/field.js +1 -0
- package/dist/fieldset-CmmDzOPs.js +80 -0
- package/dist/fieldset-CmmDzOPs.js.map +1 -0
- package/dist/fieldset-context-DtEOoG6M.js +5 -0
- package/dist/fieldset-context-DtEOoG6M.js.map +1 -0
- package/dist/fieldset.d.ts +3 -0
- package/dist/fieldset.js +1 -0
- package/dist/file-upload-_Hh-STdv.js +644 -0
- package/dist/file-upload-_Hh-STdv.js.map +1 -0
- package/dist/file-upload.d.ts +4 -0
- package/dist/file-upload.js +1 -0
- package/dist/form-context-DBnVT1lw.js +5 -0
- package/dist/form-context-DBnVT1lw.js.map +1 -0
- package/dist/form-s9HijjTL.js +92 -0
- package/dist/form-s9HijjTL.js.map +1 -0
- package/dist/form.d.ts +3 -0
- package/dist/form.js +1 -0
- package/dist/hover-card-rmd0fD17.js +355 -0
- package/dist/hover-card-rmd0fD17.js.map +1 -0
- package/dist/hover-card.d.ts +9 -0
- package/dist/hover-card.js +1 -0
- package/dist/index-5WtjXdX9.d.ts +63 -0
- package/dist/index-5eBkkEtv.d.ts +36 -0
- package/dist/index-B-vqAG6g.d.ts +33 -0
- package/dist/index-B1uYYVtV.d.ts +18 -0
- package/dist/index-B8E3X1CK.d.ts +66 -0
- package/dist/index-B8Ufhgzu.d.ts +36 -0
- package/dist/index-BJz7OWbi.d.ts +88 -0
- package/dist/index-BMjRueuv.d.ts +40 -0
- package/dist/index-BP7Tmb0E.d.ts +95 -0
- package/dist/index-Bbb1Zgwo.d.ts +50 -0
- package/dist/index-BdJFU5tH.d.ts +28 -0
- package/dist/index-BdfnRo-h.d.ts +55 -0
- package/dist/index-BniQvFN-.d.ts +38 -0
- package/dist/index-Bt0B-8RV.d.ts +14 -0
- package/dist/index-BuWJcRPC.d.ts +18 -0
- package/dist/index-Byf0GNd9.d.ts +41 -0
- package/dist/index-BzHLkAWU.d.ts +35 -0
- package/dist/index-C-QYKtWy.d.ts +28 -0
- package/dist/index-C7nh2Oil.d.ts +40 -0
- package/dist/index-CDKebSlA.d.ts +41 -0
- package/dist/index-CFPqV6qJ.d.ts +72 -0
- package/dist/index-CRJv_zWm.d.ts +37 -0
- package/dist/index-CTzUalDO.d.ts +76 -0
- package/dist/index-CZHLD5cJ.d.ts +17 -0
- package/dist/index-Cgwn5qgy.d.ts +88 -0
- package/dist/index-Ch4h1DFC.d.ts +55 -0
- package/dist/index-Cj3B9gY_.d.ts +50 -0
- package/dist/index-Cj6NwCBD.d.ts +44 -0
- package/dist/index-CkDThwop.d.ts +21 -0
- package/dist/index-Cn-D14iz.d.ts +13 -0
- package/dist/index-CpTiLSql.d.ts +53 -0
- package/dist/index-CqP363e5.d.ts +118 -0
- package/dist/index-Cv4dRdEa.d.ts +72 -0
- package/dist/index-CyI637MF.d.ts +37 -0
- package/dist/index-D11YCkvR.d.ts +42 -0
- package/dist/index-D3yyJGzf.d.ts +74 -0
- package/dist/index-D5PbKxcs.d.ts +26 -0
- package/dist/index-DAYklR-H.d.ts +18 -0
- package/dist/index-DIZSgXHM.d.ts +79 -0
- package/dist/index-DZckp3H0.d.ts +37 -0
- package/dist/index-DaqoBvQf.d.ts +56 -0
- package/dist/index-Df9i45Gr.d.ts +65 -0
- package/dist/index-DqI6n06W.d.ts +59 -0
- package/dist/index-Drp7svmT.d.ts +30 -0
- package/dist/index-DxsUcSGT.d.ts +99 -0
- package/dist/index-Dyyi-1mv.d.ts +35 -0
- package/dist/index-I2ewgOGz.d.ts +76 -0
- package/dist/index-JGhlANKo.d.ts +24 -0
- package/dist/index-KASc7z5u.d.ts +38 -0
- package/dist/index-LTcmDERY.d.ts +65 -0
- package/dist/index-Mf2RPgmw.d.ts +38 -0
- package/dist/index-NdY27G_d.d.ts +58 -0
- package/dist/index-QO79pDtI.d.ts +70 -0
- package/dist/index-S0FIwOSw.d.ts +59 -0
- package/dist/index-UxsyZS_A.d.ts +23 -0
- package/dist/index-W8aOtVIu.d.ts +40 -0
- package/dist/index-WC9xwMaX.d.ts +34 -0
- package/dist/index-Xwb9OtVU.d.ts +7 -0
- package/dist/index-ZWJJ2V_J.d.ts +49 -0
- package/dist/index-_Q_N8ZbU.d.ts +35 -0
- package/dist/index-bC3hHzam.d.ts +101 -0
- package/dist/index-baY49J-s.d.ts +15 -0
- package/dist/index-dCTvA7uS.d.ts +20 -0
- package/dist/index-mhpoLESL.d.ts +77 -0
- package/dist/index-p3t0BKd4.d.ts +22 -0
- package/dist/index-sgaMj_3p.d.ts +69 -0
- package/dist/index-tSLNRqTo.d.ts +33 -0
- package/dist/index-t_lSQgLA.d.ts +1346 -0
- package/dist/index-uL1dEAhG.d.ts +28 -0
- package/dist/index.d.ts +79 -0
- package/dist/index.js +106 -0
- package/dist/label-Ce-gIayi.js +35 -0
- package/dist/label-Ce-gIayi.js.map +1 -0
- package/dist/label.d.ts +3 -0
- package/dist/label.js +1 -0
- package/dist/labelled-part-DB2rXJFG.js +56 -0
- package/dist/labelled-part-DB2rXJFG.js.map +1 -0
- package/dist/link-CZ3ISaPX.js +42 -0
- package/dist/link-CZ3ISaPX.js.map +1 -0
- package/dist/link-attributes-D9UusWws.js +29 -0
- package/dist/link-attributes-D9UusWws.js.map +1 -0
- package/dist/link.d.ts +3 -0
- package/dist/link.js +1 -0
- package/dist/listbox-virtual-He6BWlPj.js +291 -0
- package/dist/listbox-virtual-He6BWlPj.js.map +1 -0
- package/dist/listbox-virtual.d.ts +5 -0
- package/dist/listbox-virtual.js +3 -0
- package/dist/listbox.d.ts +4 -0
- package/dist/listbox.js +1 -0
- package/dist/live-region-style-9ofmajhO.js +46 -0
- package/dist/live-region-style-9ofmajhO.js.map +1 -0
- package/dist/menu-D7TVxPdb.js +144 -0
- package/dist/menu-D7TVxPdb.js.map +1 -0
- package/dist/menu-bar-context-k5vMlwmW.js +13 -0
- package/dist/menu-bar-context-k5vMlwmW.js.map +1 -0
- package/dist/menu-submenu-trigger-ClI2Pm4X.js +885 -0
- package/dist/menu-submenu-trigger-ClI2Pm4X.js.map +1 -0
- package/dist/menu-submenu-trigger-DNH8_uUB.d.ts +127 -0
- package/dist/menu.d.ts +10 -0
- package/dist/menu.js +1 -0
- package/dist/menubar-CQn3AOiQ.js +212 -0
- package/dist/menubar-CQn3AOiQ.js.map +1 -0
- package/dist/menubar.d.ts +3 -0
- package/dist/menubar.js +1 -0
- package/dist/meter-7Qd_WaUY.js +202 -0
- package/dist/meter-7Qd_WaUY.js.map +1 -0
- package/dist/meter.d.ts +3 -0
- package/dist/meter.js +1 -0
- package/dist/month-calendar-root-base-VcD8ZNW5.js +354 -0
- package/dist/month-calendar-root-base-VcD8ZNW5.js.map +1 -0
- package/dist/month-calendar.d.ts +5 -0
- package/dist/month-calendar.js +1 -0
- package/dist/month-picker-DzOYqW1S.js +15 -0
- package/dist/month-picker-DzOYqW1S.js.map +1 -0
- package/dist/month-picker-root-base-ByMK_Mfq.js +158 -0
- package/dist/month-picker-root-base-ByMK_Mfq.js.map +1 -0
- package/dist/month-picker.d.ts +7 -0
- package/dist/month-picker.js +3 -0
- package/dist/month-range-calendar-CJAWu1-Z.js +18 -0
- package/dist/month-range-calendar-CJAWu1-Z.js.map +1 -0
- package/dist/month-range-calendar.d.ts +5 -0
- package/dist/month-range-calendar.js +3 -0
- package/dist/month-range-picker-CRJDG2HG.js +15 -0
- package/dist/month-range-picker-CRJDG2HG.js.map +1 -0
- package/dist/month-range-picker.d.ts +8 -0
- package/dist/month-range-picker.js +3 -0
- package/dist/multiple-calendar-BIb2zfBH.js +176 -0
- package/dist/multiple-calendar-BIb2zfBH.js.map +1 -0
- package/dist/multiple-calendar.d.ts +5 -0
- package/dist/multiple-calendar.js +3 -0
- package/dist/navigation-menu-COTxGol_.js +727 -0
- package/dist/navigation-menu-COTxGol_.js.map +1 -0
- package/dist/navigation-menu.d.ts +5 -0
- package/dist/navigation-menu.js +1 -0
- package/dist/number-field-CqxEnwiS.js +581 -0
- package/dist/number-field-CqxEnwiS.js.map +1 -0
- package/dist/number-field.d.ts +4 -0
- package/dist/number-field.js +1 -0
- package/dist/otp-field-DIDuypLU.js +420 -0
- package/dist/otp-field-DIDuypLU.js.map +1 -0
- package/dist/otp-field.d.ts +4 -0
- package/dist/otp-field.js +1 -0
- package/dist/overlay-handle-DUptsQOb.js +42 -0
- package/dist/overlay-handle-DUptsQOb.js.map +1 -0
- package/dist/overlay-handle-DzC9LJQo.d.ts +16 -0
- package/dist/overlay-portal-Cmn7Dt7E.d.ts +30 -0
- package/dist/overlay-portal-ZNtXmoFd.js +32 -0
- package/dist/overlay-portal-ZNtXmoFd.js.map +1 -0
- package/dist/pagination-BNUjFYxK.js +264 -0
- package/dist/pagination-BNUjFYxK.js.map +1 -0
- package/dist/pagination.d.ts +4 -0
- package/dist/pagination.js +1 -0
- package/dist/parts--mC44S1N.js +1023 -0
- package/dist/parts--mC44S1N.js.map +1 -0
- package/dist/parts-BP00C3Q5.js +874 -0
- package/dist/parts-BP00C3Q5.js.map +1 -0
- package/dist/parts-CMh29O5y.js +14 -0
- package/dist/parts-CMh29O5y.js.map +1 -0
- package/dist/parts-CZqNGRqe.js +20 -0
- package/dist/parts-CZqNGRqe.js.map +1 -0
- package/dist/parts-DMy2yQZs.js +254 -0
- package/dist/parts-DMy2yQZs.js.map +1 -0
- package/dist/parts-DVv0aov9.js +14 -0
- package/dist/parts-DVv0aov9.js.map +1 -0
- package/dist/parts-M3ThgZzl.js +489 -0
- package/dist/parts-M3ThgZzl.js.map +1 -0
- package/dist/parts-stPOp8dr.js +451 -0
- package/dist/parts-stPOp8dr.js.map +1 -0
- package/dist/parts-uxRkRrFr.js +668 -0
- package/dist/parts-uxRkRrFr.js.map +1 -0
- package/dist/password-input-DC39W-do.js +231 -0
- package/dist/password-input-DC39W-do.js.map +1 -0
- package/dist/password-input.d.ts +4 -0
- package/dist/password-input.js +1 -0
- package/dist/popover-BaQTGAYJ.js +328 -0
- package/dist/popover-BaQTGAYJ.js.map +1 -0
- package/dist/popover.d.ts +9 -0
- package/dist/popover.js +1 -0
- package/dist/progress-DH1Xrj73.js +219 -0
- package/dist/progress-DH1Xrj73.js.map +1 -0
- package/dist/progress.d.ts +3 -0
- package/dist/progress.js +1 -0
- package/dist/public-component-AV8E7mGp.js +8 -0
- package/dist/public-component-AV8E7mGp.js.map +1 -0
- package/dist/public-component-DYpU9aDh.d.ts +33 -0
- package/dist/radio-B9YCSnFs.js +159 -0
- package/dist/radio-B9YCSnFs.js.map +1 -0
- package/dist/radio-group-CmSF4FTc.js +173 -0
- package/dist/radio-group-CmSF4FTc.js.map +1 -0
- package/dist/radio-group-context-C196JZ9D.js +5 -0
- package/dist/radio-group-context-C196JZ9D.js.map +1 -0
- package/dist/radio-group.d.ts +4 -0
- package/dist/radio-group.js +1 -0
- package/dist/radio.d.ts +3 -0
- package/dist/radio.js +1 -0
- package/dist/range-calendar-BDbNdL75.js +20 -0
- package/dist/range-calendar-BDbNdL75.js.map +1 -0
- package/dist/range-calendar.d.ts +5 -0
- package/dist/range-calendar.js +1 -0
- package/dist/rating-oC2t52av.js +351 -0
- package/dist/rating-oC2t52av.js.map +1 -0
- package/dist/rating.d.ts +4 -0
- package/dist/rating.js +1 -0
- package/dist/render-part-B5XVbHaS.js +36 -0
- package/dist/render-part-B5XVbHaS.js.map +1 -0
- package/dist/render-part-BaTKiWBp.d.ts +28 -0
- package/dist/render.d.ts +3 -0
- package/dist/render.js +3 -0
- package/dist/roving-context-LyHQFJqZ.js +32 -0
- package/dist/roving-context-LyHQFJqZ.js.map +1 -0
- package/dist/scroll-area-_EApTP33.js +328 -0
- package/dist/scroll-area-_EApTP33.js.map +1 -0
- package/dist/scroll-area.d.ts +3 -0
- package/dist/scroll-area.js +1 -0
- package/dist/search-field-DJIr926A.js +221 -0
- package/dist/search-field-DJIr926A.js.map +1 -0
- package/dist/search-field.d.ts +4 -0
- package/dist/search-field.js +1 -0
- package/dist/segmented-control-BMvmqBpR.js +389 -0
- package/dist/segmented-control-BMvmqBpR.js.map +1 -0
- package/dist/segmented-control.d.ts +4 -0
- package/dist/segmented-control.js +1 -0
- package/dist/select-virtual-BwZrX4bh.js +53 -0
- package/dist/select-virtual-BwZrX4bh.js.map +1 -0
- package/dist/select-virtual.d.ts +3 -0
- package/dist/select-virtual.js +3 -0
- package/dist/select.d.ts +6 -0
- package/dist/select.js +1 -0
- package/dist/separator-SgHyzEHB.js +42 -0
- package/dist/separator-SgHyzEHB.js.map +1 -0
- package/dist/separator.d.ts +3 -0
- package/dist/separator.js +1 -0
- package/dist/slider-DU5Cx7yj.js +539 -0
- package/dist/slider-DU5Cx7yj.js.map +1 -0
- package/dist/slider.d.ts +4 -0
- package/dist/slider.js +1 -0
- package/dist/state-attributes-DhboDeMS.js +14 -0
- package/dist/state-attributes-DhboDeMS.js.map +1 -0
- package/dist/steps-Dl_mMqRB.js +363 -0
- package/dist/steps-Dl_mMqRB.js.map +1 -0
- package/dist/steps.d.ts +4 -0
- package/dist/steps.js +1 -0
- package/dist/switch-CT9QBKOs.js +183 -0
- package/dist/switch-CT9QBKOs.js.map +1 -0
- package/dist/switch.d.ts +4 -0
- package/dist/switch.js +1 -0
- package/dist/tabs-BhVbQ7AV.js +369 -0
- package/dist/tabs-BhVbQ7AV.js.map +1 -0
- package/dist/tabs.d.ts +4 -0
- package/dist/tabs.js +1 -0
- package/dist/tag-group-DdpjWmzb.js +422 -0
- package/dist/tag-group-DdpjWmzb.js.map +1 -0
- package/dist/tag-group.d.ts +4 -0
- package/dist/tag-group.js +1 -0
- package/dist/tags-input-Iw3mST3A.js +627 -0
- package/dist/tags-input-Iw3mST3A.js.map +1 -0
- package/dist/tags-input.d.ts +4 -0
- package/dist/tags-input.js +1 -0
- package/dist/time-field-5Ghk_4SZ.js +76 -0
- package/dist/time-field-5Ghk_4SZ.js.map +1 -0
- package/dist/time-field.d.ts +4 -0
- package/dist/time-field.js +1 -0
- package/dist/time-range-field-DNOZQK4F.js +77 -0
- package/dist/time-range-field-DNOZQK4F.js.map +1 -0
- package/dist/time-range-field.d.ts +4 -0
- package/dist/time-range-field.js +1 -0
- package/dist/toast-DBKxX79M.js +426 -0
- package/dist/toast-DBKxX79M.js.map +1 -0
- package/dist/toast.d.ts +3 -0
- package/dist/toast.js +1 -0
- package/dist/toggle-Cca0PFQv.js +101 -0
- package/dist/toggle-Cca0PFQv.js.map +1 -0
- package/dist/toggle-group-DTUrLX_H.js +102 -0
- package/dist/toggle-group-DTUrLX_H.js.map +1 -0
- package/dist/toggle-group-context-gMEC8r-Z.js +5 -0
- package/dist/toggle-group-context-gMEC8r-Z.js.map +1 -0
- package/dist/toggle-group.d.ts +4 -0
- package/dist/toggle-group.js +1 -0
- package/dist/toggle.d.ts +4 -0
- package/dist/toggle.js +1 -0
- package/dist/toolbar-WU8JwFd0.js +272 -0
- package/dist/toolbar-WU8JwFd0.js.map +1 -0
- package/dist/toolbar.d.ts +3 -0
- package/dist/toolbar.js +1 -0
- package/dist/tooltip-C1kKsTSh.js +358 -0
- package/dist/tooltip-C1kKsTSh.js.map +1 -0
- package/dist/tooltip.d.ts +9 -0
- package/dist/tooltip.js +1 -0
- package/dist/use-color-picker-binding-BrG-whys.js +32 -0
- package/dist/use-color-picker-binding-BrG-whys.js.map +1 -0
- package/dist/use-controllable-B46G4v0A.js +30 -0
- package/dist/use-controllable-B46G4v0A.js.map +1 -0
- package/dist/use-field-control-CdYqr0dK.js +109 -0
- package/dist/use-field-control-CdYqr0dK.js.map +1 -0
- package/dist/use-overlay-root-BkyTQIsX.js +296 -0
- package/dist/use-overlay-root-BkyTQIsX.js.map +1 -0
- package/dist/use-overlay-trigger-D9OXZ_6K.d.ts +12 -0
- package/dist/use-overlay-trigger-KM35pX0a.js +61 -0
- package/dist/use-overlay-trigger-KM35pX0a.js.map +1 -0
- package/dist/use-panel-transition-DF7f1nmF.js +112 -0
- package/dist/use-panel-transition-DF7f1nmF.js.map +1 -0
- package/dist/use-panel-transition-r_BlVRob.d.ts +2 -0
- package/dist/use-positioner-BD24G6q1.js +73 -0
- package/dist/use-positioner-BD24G6q1.js.map +1 -0
- package/dist/use-positioner-D98pYl_K.d.ts +12 -0
- package/dist/use-presence-BcvBOTDI.d.ts +3 -0
- package/dist/use-required-context-CPpEkr4Q.js +11 -0
- package/dist/use-required-context-CPpEkr4Q.js.map +1 -0
- package/dist/use-roving-composite-CW0mE_VU.js +71 -0
- package/dist/use-roving-composite-CW0mE_VU.js.map +1 -0
- package/dist/use-roving-item-B9Cil5Rq.js +42 -0
- package/dist/use-roving-item-B9Cil5Rq.js.map +1 -0
- package/dist/use-segment-group-CAlwM3KP.js +304 -0
- package/dist/use-segment-group-CAlwM3KP.js.map +1 -0
- package/dist/use-virtual-rows-DesBexmk.js +142 -0
- package/dist/use-virtual-rows-DesBexmk.js.map +1 -0
- package/dist/virtual-list-BNvYqnFf.js +49 -0
- package/dist/virtual-list-BNvYqnFf.js.map +1 -0
- package/dist/year-calendar-cYl3WHEM.js +18 -0
- package/dist/year-calendar-cYl3WHEM.js.map +1 -0
- package/dist/year-calendar.d.ts +5 -0
- package/dist/year-calendar.js +3 -0
- package/dist/year-picker-DYQZbF1h.js +15 -0
- package/dist/year-picker-DYQZbF1h.js.map +1 -0
- package/dist/year-picker.d.ts +8 -0
- package/dist/year-picker.js +3 -0
- package/dist/year-range-calendar-ODgfmdiv.js +18 -0
- package/dist/year-range-calendar-ODgfmdiv.js.map +1 -0
- package/dist/year-range-calendar.d.ts +5 -0
- package/dist/year-range-calendar.js +3 -0
- package/dist/year-range-picker-DKXlcy7I.js +15 -0
- package/dist/year-range-picker-DKXlcy7I.js.map +1 -0
- package/dist/year-range-picker.d.ts +8 -0
- package/dist/year-range-picker.js +3 -0
- package/package.json +548 -3
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { t as useControllable } from "./use-controllable-B46G4v0A.js";
|
|
2
|
+
import { t as useRovingComposite } from "./use-roving-composite-CW0mE_VU.js";
|
|
3
|
+
import { t as publicComponent } from "./public-component-AV8E7mGp.js";
|
|
4
|
+
import { n as renderPart, t as asProp } from "./render-part-B5XVbHaS.js";
|
|
5
|
+
import { n as forwardingScope, r as scopeOfElement, t as RovingKey } from "./roving-context-LyHQFJqZ.js";
|
|
6
|
+
import { t as stateAttributes } from "./state-attributes-DhboDeMS.js";
|
|
7
|
+
import { t as ToggleGroupKey } from "./toggle-group-context-gMEC8r-Z.js";
|
|
8
|
+
import { defineComponent, inject, provide } from "vue";
|
|
9
|
+
// src/components/toggle-group/toggle-group.ts
|
|
10
|
+
/**
|
|
11
|
+
* Toggles sharing one value (`v-model:value`; spec/toggle-group.md, Base UI's ToggleGroup with
|
|
12
|
+
* the APG toolbar's keys): one tab stop, the arrows move the focus. Inside a Toolbar it opens no
|
|
13
|
+
* roving focus of its own: its Toggles are the toolbar's items (spec/toolbar.md, "Nested
|
|
14
|
+
* composites").
|
|
15
|
+
*/
|
|
16
|
+
const ToggleGroup = publicComponent(defineComponent({
|
|
17
|
+
name: "ToggleGroup",
|
|
18
|
+
inheritAttrs: false,
|
|
19
|
+
props: {
|
|
20
|
+
...asProp,
|
|
21
|
+
value: {
|
|
22
|
+
type: Array,
|
|
23
|
+
default: void 0
|
|
24
|
+
},
|
|
25
|
+
defaultValue: {
|
|
26
|
+
type: Array,
|
|
27
|
+
default: () => []
|
|
28
|
+
},
|
|
29
|
+
multiple: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: false
|
|
32
|
+
},
|
|
33
|
+
disabled: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: false
|
|
36
|
+
},
|
|
37
|
+
orientation: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: "horizontal"
|
|
40
|
+
},
|
|
41
|
+
loopFocus: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: true
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
emits: {
|
|
47
|
+
"update:value": (_value) => true,
|
|
48
|
+
valueChange: (_value, _details) => true
|
|
49
|
+
},
|
|
50
|
+
setup(props, { attrs, slots, emit }) {
|
|
51
|
+
const own = useControllable(() => props.value, props.defaultValue, (next, details) => {
|
|
52
|
+
emit("update:value", [...next]);
|
|
53
|
+
emit("valueChange", [...next], details);
|
|
54
|
+
});
|
|
55
|
+
const around = inject(RovingKey, null);
|
|
56
|
+
const composite = useRovingComposite({
|
|
57
|
+
orientation: () => props.orientation,
|
|
58
|
+
loopFocus: () => props.loopFocus,
|
|
59
|
+
disabled: () => false
|
|
60
|
+
});
|
|
61
|
+
const outer = () => scopeOfElement(around, composite.scope.root());
|
|
62
|
+
const disabled = () => props.disabled || (outer()?.disabled() ?? false);
|
|
63
|
+
const orientation = () => outer()?.orientation() ?? props.orientation;
|
|
64
|
+
provide(RovingKey, forwardingScope(() => outer() ?? composite.scope));
|
|
65
|
+
provide(ToggleGroupKey, {
|
|
66
|
+
value: () => own.value.value,
|
|
67
|
+
disabled,
|
|
68
|
+
setPressed: (item, pressed, details) => {
|
|
69
|
+
const others = own.value.value.filter((entry) => entry !== item);
|
|
70
|
+
const next = pressed ? props.multiple ? [...others, item] : [item] : others;
|
|
71
|
+
own.set(next, details);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
return () => {
|
|
75
|
+
const isDisabled = disabled();
|
|
76
|
+
const { multiple } = props;
|
|
77
|
+
const currentOrientation = orientation();
|
|
78
|
+
return renderPart("div", {
|
|
79
|
+
attrs,
|
|
80
|
+
slots
|
|
81
|
+
}, props.as, {
|
|
82
|
+
value: [...own.value.value],
|
|
83
|
+
disabled: isDisabled,
|
|
84
|
+
multiple,
|
|
85
|
+
orientation: currentOrientation
|
|
86
|
+
}, {
|
|
87
|
+
role: "group",
|
|
88
|
+
"data-primitives-part": "toggle-group-root",
|
|
89
|
+
...stateAttributes({
|
|
90
|
+
orientation: currentOrientation,
|
|
91
|
+
multiple,
|
|
92
|
+
disabled: isDisabled
|
|
93
|
+
}),
|
|
94
|
+
onKeydown: outer() === null ? composite.onKeydown : void 0,
|
|
95
|
+
ref: composite.ref
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
}));
|
|
100
|
+
export { ToggleGroup as t };
|
|
101
|
+
|
|
102
|
+
//# sourceMappingURL=toggle-group-DTUrLX_H.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle-group-DTUrLX_H.js","names":[],"sources":["../src/components/toggle-group/toggle-group.ts"],"sourcesContent":["import type { RovingOrientation } from \"@fragiola/primitives/collection\";\nimport { defineComponent, inject, type PropType, provide } from \"vue\";\nimport { useControllable } from \"../../composables/use-controllable.ts\";\nimport { useRovingComposite } from \"../../composables/use-roving-composite.ts\";\nimport type { ChangeDetails } from \"../../utils/change-details.ts\";\nimport {\n type PartComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { asProp, renderPart } from \"../../utils/render-part.ts\";\nimport {\n forwardingScope,\n RovingKey,\n scopeOfElement,\n} from \"../../utils/roving-context.ts\";\nimport { stateAttributes } from \"../../utils/state-attributes.ts\";\nimport { ToggleGroupKey } from \"../toggle/toggle-group-context.ts\";\n\nexport interface ToggleGroupState {\n value: string[];\n disabled: boolean;\n multiple: boolean;\n orientation: RovingOrientation;\n}\n\nexport interface ToggleGroupProps {\n /** The values of the pressed toggles (controlled). */\n value?: readonly string[];\n /** The values pressed at first (default `[]`). */\n defaultValue?: readonly string[];\n /** Several toggles may be pressed (default `false`). */\n multiple?: boolean;\n /** Every toggle is disabled. */\n disabled?: boolean;\n /** The arrow keys' axis (default `\"horizontal\"`); a Toolbar's inside one. */\n orientation?: RovingOrientation;\n /** The arrows wrap from the last toggle to the first and back (default `true`). */\n loopFocus?: boolean;\n}\n\nexport type ToggleGroupEmits = {\n /** The values of the pressed toggles (`v-model:value`). */\n \"update:value\": (value: string[]) => true;\n /** Every change of the pressed values (reason `none`). */\n valueChange: (value: string[], details: ChangeDetails) => true;\n};\n\n/**\n * Toggles sharing one value (`v-model:value`; spec/toggle-group.md, Base UI's ToggleGroup with\n * the APG toolbar's keys): one tab stop, the arrows move the focus. Inside a Toolbar it opens no\n * roving focus of its own: its Toggles are the toolbar's items (spec/toolbar.md, \"Nested\n * composites\").\n */\nexport const ToggleGroup: PartComponent<\n ToggleGroupProps,\n ToggleGroupState,\n ToggleGroupEmits\n> = publicComponent(\n defineComponent({\n name: \"ToggleGroup\",\n inheritAttrs: false,\n props: {\n ...asProp,\n value: {\n type: Array as PropType<readonly string[]>,\n default: undefined,\n },\n defaultValue: {\n type: Array as PropType<readonly string[]>,\n default: () => [],\n },\n multiple: { type: Boolean, default: false },\n disabled: { type: Boolean, default: false },\n orientation: {\n type: String as PropType<RovingOrientation>,\n default: \"horizontal\",\n },\n loopFocus: { type: Boolean, default: true },\n },\n emits: {\n \"update:value\": (_value: string[]) => true,\n valueChange: (_value: string[], _details: ChangeDetails) => true,\n },\n setup(props, { attrs, slots, emit }) {\n const own = useControllable<readonly string[], ChangeDetails>(\n () => props.value,\n props.defaultValue,\n (next, details) => {\n emit(\"update:value\", [...next]);\n emit(\"valueChange\", [...next], details);\n },\n );\n const around = inject(RovingKey, null);\n const composite = useRovingComposite({\n orientation: () => props.orientation,\n loopFocus: () => props.loopFocus,\n disabled: () => false,\n });\n // a Toolbar's scope around it, unless the group is outside the toolbar's element (in\n // a popup a Teleport renders from the toolbar: \"Nested composites\", 6)\n const outer = () => scopeOfElement(around, composite.scope.root());\n const disabled = () =>\n props.disabled || (outer()?.disabled() ?? false);\n const orientation = () =>\n outer()?.orientation() ?? props.orientation;\n provide(\n RovingKey,\n forwardingScope(() => outer() ?? composite.scope),\n );\n provide(ToggleGroupKey, {\n value: () => own.value.value,\n disabled,\n setPressed: (item, pressed, details) => {\n const others = own.value.value.filter(\n (entry: string) => entry !== item,\n );\n const next = pressed\n ? props.multiple\n ? [...others, item]\n : [item]\n : others;\n own.set(next, details);\n },\n });\n return () => {\n const isDisabled = disabled();\n const { multiple } = props;\n const currentOrientation = orientation();\n return renderPart(\n \"div\",\n { attrs, slots },\n props.as,\n {\n value: [...own.value.value],\n disabled: isDisabled,\n multiple,\n orientation: currentOrientation,\n },\n {\n role: \"group\",\n \"data-primitives-part\": \"toggle-group-root\",\n ...stateAttributes({\n orientation: currentOrientation,\n multiple,\n disabled: isDisabled,\n }),\n // inside a Toolbar, the toolbar's root handles the keys\n onKeydown:\n outer() === null ? composite.onKeydown : undefined,\n ref: composite.ref,\n },\n );\n };\n },\n }),\n);\n"],"mappings":";;;;;;;;;;;;;;;AAqDA,MAAa,cAIT,gBACA,gBAAgB;CACZ,MAAM;CACN,cAAc;CACd,OAAO;EACH,GAAG;EACH,OAAO;GACH,MAAM;GACN,SAAS,KAAA;EACb;EACA,cAAc;GACV,MAAM;GACN,eAAe,CAAC;EACpB;EACA,UAAU;GAAE,MAAM;GAAS,SAAS;EAAM;EAC1C,UAAU;GAAE,MA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AM;IACN,wBAAwB;IACxB,GAAG,gBAAgB;KACf,aAAa;KACb;KACA,UAAU;IACd,CAAC;IAED,WACI,MAAM,MAAM,OAAO,UAAU,YAAY,KAAA;IAC7C,KAAK,UAAU;GACnB,CACJ;EACJ;CACJ;AACJ,CAAC,CACL"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle-group-context-gMEC8r-Z.js","names":[],"sources":["../src/components/toggle/toggle-group-context.ts"],"sourcesContent":["import type { InjectionKey } from \"vue\";\nimport type { ChangeDetails } from \"../../utils/change-details.ts\";\n\n/**\n * What a ToggleGroup gives its Toggles (spec/toggle-group.md). It lives in the Toggle's folder, so\n * a Toggle alone ships no ToggleGroup code; `/toggle-group` is built on `/toggle`\n * (`ENTRY_DEPENDENCIES`).\n */\nexport interface ToggleGroupContext {\n /** The values of the pressed toggles. */\n value: () => readonly string[];\n disabled: () => boolean;\n /** A Toggle of the group was pressed or released. */\n setPressed: (\n value: string,\n pressed: boolean,\n details: ChangeDetails,\n ) => void;\n}\n\nexport const ToggleGroupKey: InjectionKey<ToggleGroupContext> =\n Symbol(\"ToggleGroup\");\n"],"mappings":";AAoBA,MAAa,iBACT,OAAO,aAAa"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { n as ChangeReason, t as ChangeDetails } from "./change-details-Bc4-Xzdm.js";
|
|
2
|
+
import { n as RenderSlotProps } from "./render-part-BaTKiWBp.js";
|
|
3
|
+
import { a as ToggleGroupState, i as ToggleGroupProps, n as ToggleGroup, r as ToggleGroupEmits, t as RovingOrientation } from "./index-KASc7z5u.js";
|
|
4
|
+
export { type ChangeDetails, type ChangeReason, type RenderSlotProps, type RovingOrientation, ToggleGroup, type ToggleGroupEmits, type ToggleGroupProps, type ToggleGroupState };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as ToggleGroup } from "./toggle-group-DTUrLX_H.js";
|
package/dist/toggle.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { n as ChangeReason, t as ChangeDetails } from "./change-details-Bc4-Xzdm.js";
|
|
2
|
+
import { n as RenderSlotProps } from "./render-part-BaTKiWBp.js";
|
|
3
|
+
import { i as ToggleState, n as ToggleEmits, r as ToggleProps, t as Toggle } from "./index-5eBkkEtv.js";
|
|
4
|
+
export { type ChangeDetails, type ChangeReason, type RenderSlotProps, Toggle, type ToggleEmits, type ToggleProps, type ToggleState };
|
package/dist/toggle.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as Toggle } from "./toggle-Cca0PFQv.js";
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
import { t as useRequiredContext } from "./use-required-context-CPpEkr4Q.js";
|
|
2
|
+
import { t as useRovingItem } from "./use-roving-item-B9Cil5Rq.js";
|
|
3
|
+
import { t as buttonAttributes } from "./button-attributes-Ue6sUse5.js";
|
|
4
|
+
import { t as publicComponent } from "./public-component-AV8E7mGp.js";
|
|
5
|
+
import { n as renderPart, t as asProp } from "./render-part-B5XVbHaS.js";
|
|
6
|
+
import { t as stateAttributes } from "./state-attributes-DhboDeMS.js";
|
|
7
|
+
import { t as RovingKey } from "./roving-context-LyHQFJqZ.js";
|
|
8
|
+
import { t as useRovingComposite } from "./use-roving-composite-CW0mE_VU.js";
|
|
9
|
+
import { defineComponent, inject, provide } from "vue";
|
|
10
|
+
// src/components/toolbar/toolbar-context.ts
|
|
11
|
+
const ToolbarKey = Symbol("Toolbar");
|
|
12
|
+
// src/components/toolbar/toolbar-button.ts
|
|
13
|
+
/** A button of a toolbar (spec/toolbar.md): Button's behaviour, an item of the toolbar's focus. */
|
|
14
|
+
const ToolbarButton = publicComponent(defineComponent({
|
|
15
|
+
name: "ToolbarButton",
|
|
16
|
+
inheritAttrs: false,
|
|
17
|
+
props: {
|
|
18
|
+
...asProp,
|
|
19
|
+
disabled: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: false
|
|
22
|
+
},
|
|
23
|
+
focusableWhenDisabled: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: false
|
|
26
|
+
},
|
|
27
|
+
nativeButton: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: true
|
|
30
|
+
},
|
|
31
|
+
type: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: void 0
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
setup(props, { attrs, slots }) {
|
|
37
|
+
const toolbar = useRequiredContext(ToolbarKey, "Toolbar.Button");
|
|
38
|
+
const item = useRovingItem(() => !disabled() || props.focusableWhenDisabled);
|
|
39
|
+
const disabled = () => props.disabled || (item?.scope()?.disabled() ?? false);
|
|
40
|
+
const onFocus = () => item?.onFocus();
|
|
41
|
+
return () => {
|
|
42
|
+
const orientation = toolbar.orientation();
|
|
43
|
+
const isDisabled = disabled();
|
|
44
|
+
const { rest, internal } = buttonAttributes({
|
|
45
|
+
disabled: isDisabled,
|
|
46
|
+
focusableWhenDisabled: props.focusableWhenDisabled,
|
|
47
|
+
nativeButton: props.nativeButton,
|
|
48
|
+
type: props.type,
|
|
49
|
+
tabIndex: item?.tabIndex(),
|
|
50
|
+
composite: true
|
|
51
|
+
}, attrs);
|
|
52
|
+
return renderPart("button", {
|
|
53
|
+
attrs: rest,
|
|
54
|
+
slots
|
|
55
|
+
}, props.as, {
|
|
56
|
+
orientation,
|
|
57
|
+
disabled: isDisabled
|
|
58
|
+
}, {
|
|
59
|
+
...internal,
|
|
60
|
+
"data-primitives-part": "toolbar-button",
|
|
61
|
+
...stateAttributes({
|
|
62
|
+
orientation,
|
|
63
|
+
disabled: isDisabled
|
|
64
|
+
}),
|
|
65
|
+
onFocus,
|
|
66
|
+
...item === null ? {} : { ref: item.ref }
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
}));
|
|
71
|
+
// src/components/toolbar/toolbar-group.ts
|
|
72
|
+
/**
|
|
73
|
+
* A group of a toolbar's items (spec/toolbar.md): no focus of its own; it passes its `disabled`
|
|
74
|
+
* on to the items inside it through the toolbar's roving scope ("Nested composites").
|
|
75
|
+
*/
|
|
76
|
+
const ToolbarGroup = publicComponent(defineComponent({
|
|
77
|
+
name: "ToolbarGroup",
|
|
78
|
+
inheritAttrs: false,
|
|
79
|
+
props: {
|
|
80
|
+
...asProp,
|
|
81
|
+
disabled: {
|
|
82
|
+
type: Boolean,
|
|
83
|
+
default: false
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
setup(props, { attrs, slots }) {
|
|
87
|
+
const toolbar = useRequiredContext(ToolbarKey, "Toolbar.Group");
|
|
88
|
+
const scope = inject(RovingKey, null);
|
|
89
|
+
const disabled = () => props.disabled || (scope?.disabled() ?? false);
|
|
90
|
+
if (scope !== null) provide(RovingKey, {
|
|
91
|
+
...scope,
|
|
92
|
+
disabled
|
|
93
|
+
});
|
|
94
|
+
return () => {
|
|
95
|
+
const orientation = toolbar.orientation();
|
|
96
|
+
const isDisabled = disabled();
|
|
97
|
+
return renderPart("div", {
|
|
98
|
+
attrs,
|
|
99
|
+
slots
|
|
100
|
+
}, props.as, {
|
|
101
|
+
orientation,
|
|
102
|
+
disabled: isDisabled
|
|
103
|
+
}, {
|
|
104
|
+
role: "group",
|
|
105
|
+
"data-primitives-part": "toolbar-group",
|
|
106
|
+
...stateAttributes({
|
|
107
|
+
orientation,
|
|
108
|
+
disabled: isDisabled
|
|
109
|
+
})
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
}));
|
|
114
|
+
// src/components/toolbar/toolbar-input.ts
|
|
115
|
+
/**
|
|
116
|
+
* A text input of a toolbar (spec/toolbar.md): an item of the toolbar's focus that keeps its caret
|
|
117
|
+
* keys until the caret reaches the text's edge.
|
|
118
|
+
*/
|
|
119
|
+
const ToolbarInput = publicComponent(defineComponent({
|
|
120
|
+
name: "ToolbarInput",
|
|
121
|
+
inheritAttrs: false,
|
|
122
|
+
props: {
|
|
123
|
+
...asProp,
|
|
124
|
+
disabled: {
|
|
125
|
+
type: Boolean,
|
|
126
|
+
default: false
|
|
127
|
+
},
|
|
128
|
+
focusableWhenDisabled: {
|
|
129
|
+
type: Boolean,
|
|
130
|
+
default: false
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
setup(props, { attrs, slots }) {
|
|
134
|
+
const toolbar = useRequiredContext(ToolbarKey, "Toolbar.Input");
|
|
135
|
+
const item = useRovingItem(() => !disabled() || props.focusableWhenDisabled);
|
|
136
|
+
const disabled = () => props.disabled || (item?.scope()?.disabled() ?? false);
|
|
137
|
+
const preventWhenDisabled = (event) => {
|
|
138
|
+
if (disabled()) event.preventDefault();
|
|
139
|
+
};
|
|
140
|
+
const onFocus = () => item?.onFocus();
|
|
141
|
+
return () => {
|
|
142
|
+
const orientation = toolbar.orientation();
|
|
143
|
+
const isDisabled = disabled();
|
|
144
|
+
const { focusableWhenDisabled } = props;
|
|
145
|
+
return renderPart("input", {
|
|
146
|
+
attrs,
|
|
147
|
+
slots
|
|
148
|
+
}, props.as, {
|
|
149
|
+
orientation,
|
|
150
|
+
disabled: isDisabled
|
|
151
|
+
}, {
|
|
152
|
+
disabled: isDisabled && !focusableWhenDisabled ? true : void 0,
|
|
153
|
+
"aria-disabled": isDisabled && focusableWhenDisabled ? "true" : void 0,
|
|
154
|
+
readonly: isDisabled && focusableWhenDisabled ? true : void 0,
|
|
155
|
+
tabindex: item?.tabIndex(),
|
|
156
|
+
"data-primitives-part": "toolbar-input",
|
|
157
|
+
...stateAttributes({
|
|
158
|
+
orientation,
|
|
159
|
+
disabled: isDisabled
|
|
160
|
+
}),
|
|
161
|
+
onClick: preventWhenDisabled,
|
|
162
|
+
onPointerdown: preventWhenDisabled,
|
|
163
|
+
onFocus,
|
|
164
|
+
...item === null ? {} : { ref: item.ref }
|
|
165
|
+
});
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
}));
|
|
169
|
+
// src/components/toolbar/toolbar-link.ts
|
|
170
|
+
/** A link of a toolbar (spec/toolbar.md): an item of the toolbar's focus; it cannot be disabled. */
|
|
171
|
+
const ToolbarLink = publicComponent(defineComponent({
|
|
172
|
+
name: "ToolbarLink",
|
|
173
|
+
inheritAttrs: false,
|
|
174
|
+
props: asProp,
|
|
175
|
+
setup(props, { attrs, slots }) {
|
|
176
|
+
const toolbar = useRequiredContext(ToolbarKey, "Toolbar.Link");
|
|
177
|
+
const item = useRovingItem(() => true);
|
|
178
|
+
const onFocus = () => item?.onFocus();
|
|
179
|
+
return () => {
|
|
180
|
+
const orientation = toolbar.orientation();
|
|
181
|
+
return renderPart("a", {
|
|
182
|
+
attrs,
|
|
183
|
+
slots
|
|
184
|
+
}, props.as, { orientation }, {
|
|
185
|
+
tabindex: item?.tabIndex(),
|
|
186
|
+
"data-primitives-part": "toolbar-link",
|
|
187
|
+
...stateAttributes({ orientation }),
|
|
188
|
+
onFocus,
|
|
189
|
+
...item === null ? {} : { ref: item.ref }
|
|
190
|
+
});
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
}));
|
|
194
|
+
// src/components/toolbar/parts.ts
|
|
195
|
+
/** spec/toolbar.md */
|
|
196
|
+
const Toolbar = {
|
|
197
|
+
Root: publicComponent(defineComponent({
|
|
198
|
+
name: "ToolbarRoot",
|
|
199
|
+
inheritAttrs: false,
|
|
200
|
+
props: {
|
|
201
|
+
...asProp,
|
|
202
|
+
orientation: {
|
|
203
|
+
type: String,
|
|
204
|
+
default: "horizontal"
|
|
205
|
+
},
|
|
206
|
+
loopFocus: {
|
|
207
|
+
type: Boolean,
|
|
208
|
+
default: true
|
|
209
|
+
},
|
|
210
|
+
disabled: {
|
|
211
|
+
type: Boolean,
|
|
212
|
+
default: false
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
setup(props, { attrs, slots }) {
|
|
216
|
+
const { scope, onKeydown, ref } = useRovingComposite({
|
|
217
|
+
orientation: () => props.orientation,
|
|
218
|
+
loopFocus: () => props.loopFocus,
|
|
219
|
+
disabled: () => props.disabled
|
|
220
|
+
});
|
|
221
|
+
provide(RovingKey, scope);
|
|
222
|
+
provide(ToolbarKey, { orientation: () => props.orientation });
|
|
223
|
+
return () => {
|
|
224
|
+
const { orientation, disabled } = props;
|
|
225
|
+
return renderPart("div", {
|
|
226
|
+
attrs,
|
|
227
|
+
slots
|
|
228
|
+
}, props.as, {
|
|
229
|
+
orientation,
|
|
230
|
+
disabled
|
|
231
|
+
}, {
|
|
232
|
+
role: "toolbar",
|
|
233
|
+
"aria-orientation": orientation,
|
|
234
|
+
"data-primitives-part": "toolbar-root",
|
|
235
|
+
...stateAttributes({
|
|
236
|
+
orientation,
|
|
237
|
+
disabled
|
|
238
|
+
}),
|
|
239
|
+
onKeydown,
|
|
240
|
+
ref
|
|
241
|
+
});
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
})),
|
|
245
|
+
Button: ToolbarButton,
|
|
246
|
+
Link: ToolbarLink,
|
|
247
|
+
Input: ToolbarInput,
|
|
248
|
+
Group: ToolbarGroup,
|
|
249
|
+
Separator: publicComponent(defineComponent({
|
|
250
|
+
name: "ToolbarSeparator",
|
|
251
|
+
inheritAttrs: false,
|
|
252
|
+
props: asProp,
|
|
253
|
+
setup(props, { attrs, slots }) {
|
|
254
|
+
const toolbar = useRequiredContext(ToolbarKey, "Toolbar.Separator");
|
|
255
|
+
return () => {
|
|
256
|
+
const orientation = toolbar.orientation() === "horizontal" ? "vertical" : "horizontal";
|
|
257
|
+
return renderPart("div", {
|
|
258
|
+
attrs,
|
|
259
|
+
slots
|
|
260
|
+
}, props.as, { orientation }, {
|
|
261
|
+
role: "separator",
|
|
262
|
+
"aria-orientation": orientation,
|
|
263
|
+
"data-primitives-part": "toolbar-separator",
|
|
264
|
+
...stateAttributes({ orientation })
|
|
265
|
+
});
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
}))
|
|
269
|
+
};
|
|
270
|
+
export { Toolbar as t };
|
|
271
|
+
|
|
272
|
+
//# sourceMappingURL=toolbar-WU8JwFd0.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolbar-WU8JwFd0.js","names":[],"sources":["../src/components/toolbar/toolbar-context.ts","../src/components/toolbar/toolbar-button.ts","../src/components/toolbar/toolbar-group.ts","../src/components/toolbar/toolbar-input.ts","../src/components/toolbar/toolbar-link.ts","../src/components/toolbar/toolbar-root.ts","../src/components/toolbar/toolbar-separator.ts","../src/components/toolbar/parts.ts"],"sourcesContent":["import type { RovingOrientation } from \"@fragiola/primitives/collection\";\nimport type { InjectionKey } from \"vue\";\n\n/** What a Toolbar.Root gives its parts (spec/toolbar.md); its items register with its roving scope. */\nexport interface ToolbarContext {\n orientation: () => RovingOrientation;\n}\n\nexport const ToolbarKey: InjectionKey<ToolbarContext> = Symbol(\"Toolbar\");\n\n/** The parts' state: the toolbar's orientation, and whether the part is disabled. */\nexport interface ToolbarItemState {\n orientation: RovingOrientation;\n disabled: boolean;\n}\n","import { defineComponent, type PropType } from \"vue\";\nimport { useRequiredContext } from \"../../composables/use-required-context.ts\";\nimport { useRovingItem } from \"../../composables/use-roving-item.ts\";\nimport { buttonAttributes } from \"../../utils/button-attributes.ts\";\nimport {\n type PartComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { asProp, renderPart } from \"../../utils/render-part.ts\";\nimport { stateAttributes } from \"../../utils/state-attributes.ts\";\nimport { type ToolbarItemState, ToolbarKey } from \"./toolbar-context.ts\";\n\nexport interface ToolbarButtonProps {\n /** The button ignores presses and keys. */\n disabled?: boolean;\n /** A disabled button the arrows still reach (spec/toolbar.md, \"Disabled items\"). */\n focusableWhenDisabled?: boolean;\n /** Whether the rendered element is a native `<button>` (default `true`), as Button's. */\n nativeButton?: boolean;\n /** Forwarded; a native button is `type=\"button\"` unless given. */\n type?: \"button\" | \"submit\" | \"reset\";\n}\n\n/** A button of a toolbar (spec/toolbar.md): Button's behaviour, an item of the toolbar's focus. */\nexport const ToolbarButton: PartComponent<\n ToolbarButtonProps,\n ToolbarItemState\n> = publicComponent(\n defineComponent({\n name: \"ToolbarButton\",\n inheritAttrs: false,\n props: {\n ...asProp,\n disabled: { type: Boolean, default: false },\n focusableWhenDisabled: { type: Boolean, default: false },\n nativeButton: { type: Boolean, default: true },\n type: {\n type: String as PropType<\"button\" | \"submit\" | \"reset\">,\n default: undefined,\n },\n },\n setup(props, { attrs, slots }) {\n const toolbar = useRequiredContext(ToolbarKey, \"Toolbar.Button\");\n const item = useRovingItem(\n () => !disabled() || props.focusableWhenDisabled,\n );\n const disabled = () =>\n props.disabled || (item?.scope()?.disabled() ?? false);\n const onFocus = () => item?.onFocus();\n return () => {\n const orientation = toolbar.orientation();\n const isDisabled = disabled();\n const { rest, internal } = buttonAttributes(\n {\n disabled: isDisabled,\n focusableWhenDisabled: props.focusableWhenDisabled,\n nativeButton: props.nativeButton,\n type: props.type,\n tabIndex: item?.tabIndex(),\n composite: true,\n },\n attrs,\n );\n return renderPart(\n \"button\",\n { attrs: rest, slots },\n props.as,\n { orientation, disabled: isDisabled },\n {\n ...internal,\n \"data-primitives-part\": \"toolbar-button\",\n ...stateAttributes({\n orientation,\n disabled: isDisabled,\n }),\n onFocus,\n ...(item === null ? {} : { ref: item.ref }),\n },\n );\n };\n },\n }),\n);\n","import { defineComponent, inject, provide } from \"vue\";\nimport { useRequiredContext } from \"../../composables/use-required-context.ts\";\nimport {\n type PartComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { asProp, renderPart } from \"../../utils/render-part.ts\";\nimport { RovingKey } from \"../../utils/roving-context.ts\";\nimport { stateAttributes } from \"../../utils/state-attributes.ts\";\nimport { type ToolbarItemState, ToolbarKey } from \"./toolbar-context.ts\";\n\nexport interface ToolbarGroupProps {\n /** Every item in it is disabled. */\n disabled?: boolean;\n}\n\n/**\n * A group of a toolbar's items (spec/toolbar.md): no focus of its own; it passes its `disabled`\n * on to the items inside it through the toolbar's roving scope (\"Nested composites\").\n */\nexport const ToolbarGroup: PartComponent<ToolbarGroupProps, ToolbarItemState> =\n publicComponent(\n defineComponent({\n name: \"ToolbarGroup\",\n inheritAttrs: false,\n props: {\n ...asProp,\n disabled: { type: Boolean, default: false },\n },\n setup(props, { attrs, slots }) {\n const toolbar = useRequiredContext(ToolbarKey, \"Toolbar.Group\");\n const scope = inject(RovingKey, null);\n const disabled = () =>\n props.disabled || (scope?.disabled() ?? false);\n if (scope !== null) {\n provide(RovingKey, { ...scope, disabled });\n }\n return () => {\n const orientation = toolbar.orientation();\n const isDisabled = disabled();\n return renderPart(\n \"div\",\n { attrs, slots },\n props.as,\n { orientation, disabled: isDisabled },\n {\n role: \"group\",\n \"data-primitives-part\": \"toolbar-group\",\n ...stateAttributes({\n orientation,\n disabled: isDisabled,\n }),\n },\n );\n };\n },\n }),\n );\n","import { defineComponent } from \"vue\";\nimport { useRequiredContext } from \"../../composables/use-required-context.ts\";\nimport { useRovingItem } from \"../../composables/use-roving-item.ts\";\nimport {\n type PartComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { asProp, renderPart } from \"../../utils/render-part.ts\";\nimport { stateAttributes } from \"../../utils/state-attributes.ts\";\nimport { type ToolbarItemState, ToolbarKey } from \"./toolbar-context.ts\";\n\nexport interface ToolbarInputProps {\n /** The input ignores presses and typing. */\n disabled?: boolean;\n /** A disabled input the arrows still reach: `aria-disabled` and `readonly` (spec/toolbar.md). */\n focusableWhenDisabled?: boolean;\n}\n\n/**\n * A text input of a toolbar (spec/toolbar.md): an item of the toolbar's focus that keeps its caret\n * keys until the caret reaches the text's edge.\n */\nexport const ToolbarInput: PartComponent<ToolbarInputProps, ToolbarItemState> =\n publicComponent(\n defineComponent({\n name: \"ToolbarInput\",\n inheritAttrs: false,\n props: {\n ...asProp,\n disabled: { type: Boolean, default: false },\n focusableWhenDisabled: { type: Boolean, default: false },\n },\n setup(props, { attrs, slots }) {\n const toolbar = useRequiredContext(ToolbarKey, \"Toolbar.Input\");\n const item = useRovingItem(\n () => !disabled() || props.focusableWhenDisabled,\n );\n const disabled = () =>\n props.disabled || (item?.scope()?.disabled() ?? false);\n const preventWhenDisabled = (event: Event) => {\n if (disabled()) {\n event.preventDefault();\n }\n };\n const onFocus = () => item?.onFocus();\n return () => {\n const orientation = toolbar.orientation();\n const isDisabled = disabled();\n const { focusableWhenDisabled } = props;\n return renderPart(\n \"input\",\n { attrs, slots },\n props.as,\n { orientation, disabled: isDisabled },\n {\n disabled:\n isDisabled && !focusableWhenDisabled\n ? true\n : undefined,\n \"aria-disabled\":\n isDisabled && focusableWhenDisabled\n ? \"true\"\n : undefined,\n readonly:\n isDisabled && focusableWhenDisabled\n ? true\n : undefined,\n tabindex: item?.tabIndex(),\n \"data-primitives-part\": \"toolbar-input\",\n ...stateAttributes({\n orientation,\n disabled: isDisabled,\n }),\n onClick: preventWhenDisabled,\n onPointerdown: preventWhenDisabled,\n onFocus,\n ...(item === null ? {} : { ref: item.ref }),\n },\n );\n };\n },\n }),\n );\n","import type { RovingOrientation } from \"@fragiola/primitives/collection\";\nimport { defineComponent } from \"vue\";\nimport { useRequiredContext } from \"../../composables/use-required-context.ts\";\nimport { useRovingItem } from \"../../composables/use-roving-item.ts\";\nimport {\n type PartComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { asProp, renderPart } from \"../../utils/render-part.ts\";\nimport { stateAttributes } from \"../../utils/state-attributes.ts\";\nimport { ToolbarKey } from \"./toolbar-context.ts\";\n\nexport interface ToolbarLinkState {\n orientation: RovingOrientation;\n}\n\n/** A link of a toolbar (spec/toolbar.md): an item of the toolbar's focus; it cannot be disabled. */\nexport const ToolbarLink: PartComponent<\n Record<never, never>,\n ToolbarLinkState\n> = publicComponent(\n defineComponent({\n name: \"ToolbarLink\",\n inheritAttrs: false,\n props: asProp,\n setup(props, { attrs, slots }) {\n const toolbar = useRequiredContext(ToolbarKey, \"Toolbar.Link\");\n const item = useRovingItem(() => true);\n const onFocus = () => item?.onFocus();\n return () => {\n const orientation = toolbar.orientation();\n return renderPart(\n \"a\",\n { attrs, slots },\n props.as,\n { orientation },\n {\n tabindex: item?.tabIndex(),\n \"data-primitives-part\": \"toolbar-link\",\n ...stateAttributes({ orientation }),\n onFocus,\n ...(item === null ? {} : { ref: item.ref }),\n },\n );\n };\n },\n }),\n);\n","import type { RovingOrientation } from \"@fragiola/primitives/collection\";\nimport { defineComponent, type PropType, provide } from \"vue\";\nimport { useRovingComposite } from \"../../composables/use-roving-composite.ts\";\nimport {\n type PartComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { asProp, renderPart } from \"../../utils/render-part.ts\";\nimport { RovingKey } from \"../../utils/roving-context.ts\";\nimport { stateAttributes } from \"../../utils/state-attributes.ts\";\nimport { ToolbarKey } from \"./toolbar-context.ts\";\n\nexport interface ToolbarRootState {\n orientation: RovingOrientation;\n disabled: boolean;\n}\n\nexport interface ToolbarRootProps {\n /** The arrow keys' axis (default `\"horizontal\"`). */\n orientation?: RovingOrientation;\n /** The arrows wrap from the last item to the first and back (default `true`). */\n loopFocus?: boolean;\n /** Every Button, Input, Toggle and ToggleGroup in it is disabled. */\n disabled?: boolean;\n}\n\n/**\n * A set of controls that is one tab stop (spec/toolbar.md, the APG toolbar): the roving-focus\n * scope every item inside registers with, a ToggleGroup's Toggles included (\"Nested composites\").\n */\nexport const ToolbarRoot: PartComponent<ToolbarRootProps, ToolbarRootState> =\n publicComponent(\n defineComponent({\n name: \"ToolbarRoot\",\n inheritAttrs: false,\n props: {\n ...asProp,\n orientation: {\n type: String as PropType<RovingOrientation>,\n default: \"horizontal\",\n },\n loopFocus: { type: Boolean, default: true },\n disabled: { type: Boolean, default: false },\n },\n setup(props, { attrs, slots }) {\n const { scope, onKeydown, ref } = useRovingComposite({\n orientation: () => props.orientation,\n loopFocus: () => props.loopFocus,\n disabled: () => props.disabled,\n });\n provide(RovingKey, scope);\n provide(ToolbarKey, { orientation: () => props.orientation });\n return () => {\n const { orientation, disabled } = props;\n return renderPart(\n \"div\",\n { attrs, slots },\n props.as,\n { orientation, disabled },\n {\n role: \"toolbar\",\n \"aria-orientation\": orientation,\n \"data-primitives-part\": \"toolbar-root\",\n ...stateAttributes({ orientation, disabled }),\n onKeydown,\n ref,\n },\n );\n };\n },\n }),\n );\n","import { defineComponent } from \"vue\";\nimport { useRequiredContext } from \"../../composables/use-required-context.ts\";\nimport {\n type PartComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { asProp, renderPart } from \"../../utils/render-part.ts\";\nimport { stateAttributes } from \"../../utils/state-attributes.ts\";\nimport { ToolbarKey } from \"./toolbar-context.ts\";\n\nexport interface ToolbarSeparatorState {\n /** Across the toolbar's: `\"vertical\"` in a horizontal toolbar. */\n orientation: \"horizontal\" | \"vertical\";\n}\n\n/** A separator across a toolbar's orientation (spec/toolbar.md), not focusable. */\nexport const ToolbarSeparator: PartComponent<\n Record<never, never>,\n ToolbarSeparatorState\n> = publicComponent(\n defineComponent({\n name: \"ToolbarSeparator\",\n inheritAttrs: false,\n props: asProp,\n setup(props, { attrs, slots }) {\n const toolbar = useRequiredContext(ToolbarKey, \"Toolbar.Separator\");\n return () => {\n const orientation =\n toolbar.orientation() === \"horizontal\"\n ? \"vertical\"\n : \"horizontal\";\n return renderPart(\n \"div\",\n { attrs, slots },\n props.as,\n { orientation },\n {\n role: \"separator\",\n \"aria-orientation\": orientation,\n \"data-primitives-part\": \"toolbar-separator\",\n ...stateAttributes({ orientation }),\n },\n );\n };\n },\n }),\n);\n","import { ToolbarButton } from \"./toolbar-button.ts\";\nimport { ToolbarGroup } from \"./toolbar-group.ts\";\nimport { ToolbarInput } from \"./toolbar-input.ts\";\nimport { ToolbarLink } from \"./toolbar-link.ts\";\nimport { ToolbarRoot } from \"./toolbar-root.ts\";\nimport { ToolbarSeparator } from \"./toolbar-separator.ts\";\n\n/** spec/toolbar.md */\nexport const Toolbar = {\n Root: ToolbarRoot,\n Button: ToolbarButton,\n Link: ToolbarLink,\n Input: ToolbarInput,\n Group: ToolbarGroup,\n Separator: ToolbarSeparator,\n};\n"],"mappings":";;;;;;;;;;AA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,GACxB;KACI,MAAM;KACN,oBAAoB;KACpB,wBAAwB;KACxB,GAAG,gBAAgB;MAAE;MAAa;KAAS,CAAC;KAC5C;KACA;IACJ,CACJ;GACJ;EACJ;CACJ,CAAC,CE7DC;CACN,QAAQ;CACR,MAAM;CACN,OAAO;CACP,OAAO;CACP,WDKA,gBACA,gBAAgB;EACZ,MAAM;EACN,cAAc;EACd,OAAO;EACP,MAAM,OAAO,EAAE,OAAO,SAAS;GAC3B,MAAM,UAAU,mBAAmB,YAAY,mBAAmB;GAClE,aAAa;IACT,MAAM,cACF,QAAQ,YAAY,MAAM,eACpB,aACA;IACV,OAAO,WACH,OACA;KAAE;KAAO;IAAM,GACf,MAAM,IACN,EAAE,YAAY,GACd;KACI,MAAM;KACN,oBAAoB;KACpB,wBAAwB;KACxB,GAAG,gBAAgB,EAAE,YAAY,CAAC;IACtC,CACJ;GACJ;EACJ;CACJ,CAAC,CC/BU;AACf"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { n as RenderSlotProps } from "./render-part-BaTKiWBp.js";
|
|
2
|
+
import { a as ToolbarInputProps, c as ToolbarItemState, i as ToolbarGroupProps, l as ToolbarRootProps, n as Toolbar, o as ToolbarLinkState, r as ToolbarSeparatorState, s as ToolbarButtonProps, t as RovingOrientation, u as ToolbarRootState } from "./index-NdY27G_d.js";
|
|
3
|
+
export { type RenderSlotProps, type RovingOrientation, Toolbar, type ToolbarButtonProps, type ToolbarGroupProps, type ToolbarInputProps, type ToolbarItemState, type ToolbarLinkState, type ToolbarRootProps, type ToolbarRootState, type ToolbarSeparatorState };
|
package/dist/toolbar.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as Toolbar } from "./toolbar-WU8JwFd0.js";
|