@fragiola/primitives-vue 0.0.0-stage → 0.0.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/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,329 @@
|
|
|
1
|
+
import { t as useRequiredContext } from "./use-required-context-CPpEkr4Q.js";
|
|
2
|
+
import { t as publicComponent } from "./public-component-AV8E7mGp.js";
|
|
3
|
+
import { n as renderPart, t as asProp } from "./render-part-B5XVbHaS.js";
|
|
4
|
+
import { t as stateAttributes } from "./state-attributes-DhboDeMS.js";
|
|
5
|
+
import { a as useOverlayRoot, i as overlayTriggerRootProps, r as overlayRootProps, s as resolveFocusTarget, t as elementSetter } from "./use-overlay-root-BkyTQIsX.js";
|
|
6
|
+
import { n as defineLabelledPart, t as defineClosePart } from "./labelled-part-DB2rXJFG.js";
|
|
7
|
+
import { n as useOverlayPortal, t as overlayPortalProps } from "./overlay-portal-ZNtXmoFd.js";
|
|
8
|
+
import { n as useAttachHandle, r as useOverlayTrigger, t as overlayTriggerProps } from "./use-overlay-trigger-KM35pX0a.js";
|
|
9
|
+
import { computed, defineComponent, inject, onBeforeUnmount, provide, ref, shallowReactive, shallowRef, watch } from "vue";
|
|
10
|
+
import { focusInitial, trapFocus } from "@fragiola/primitives/focus";
|
|
11
|
+
import { inertOutside } from "@fragiola/primitives/inert";
|
|
12
|
+
import { openOverlaySession } from "@fragiola/primitives/overlay";
|
|
13
|
+
import { lockScroll } from "@fragiola/primitives/scroll-lock";
|
|
14
|
+
// src/components/dialog/dialog-context.ts
|
|
15
|
+
/**
|
|
16
|
+
* The name of the nested attributes of a component's parts: `data-nested-<name>-open` and
|
|
17
|
+
* `--nested-<name>s` (a Drawer's are `drawer`, spec/drawer.md; a Dialog's and an AlertDialog's
|
|
18
|
+
* `dialog`).
|
|
19
|
+
*/
|
|
20
|
+
function nestedName(component) {
|
|
21
|
+
return component === "drawer" ? component : "dialog";
|
|
22
|
+
}
|
|
23
|
+
const DialogKey = Symbol("Dialog");
|
|
24
|
+
const DialogNestingKey = Symbol("DialogNesting");
|
|
25
|
+
// src/components/dialog/dialog-backdrop.ts
|
|
26
|
+
const DialogBackdrop = publicComponent(defineComponent({
|
|
27
|
+
name: "DialogBackdrop",
|
|
28
|
+
inheritAttrs: false,
|
|
29
|
+
props: {
|
|
30
|
+
...asProp,
|
|
31
|
+
forceRender: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: false
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
setup(props, { attrs, slots }) {
|
|
37
|
+
const context = useRequiredContext(DialogKey, "Dialog.Backdrop");
|
|
38
|
+
const setBackdrop = elementSetter(context.backdrop);
|
|
39
|
+
return () => {
|
|
40
|
+
const nested = context.nested;
|
|
41
|
+
if (nested && !props.forceRender) return null;
|
|
42
|
+
const open = context.open.value;
|
|
43
|
+
const status = context.presence.status.value;
|
|
44
|
+
const nestedDialogOpen = context.nestedDialogs.value > 0;
|
|
45
|
+
return renderPart("div", {
|
|
46
|
+
attrs,
|
|
47
|
+
slots
|
|
48
|
+
}, props.as, {
|
|
49
|
+
open,
|
|
50
|
+
nested,
|
|
51
|
+
nestedDialogOpen
|
|
52
|
+
}, {
|
|
53
|
+
"aria-hidden": "true",
|
|
54
|
+
hidden: context.presence.mounted.value ? void 0 : true,
|
|
55
|
+
"data-primitives-part": `${context.component}-backdrop`,
|
|
56
|
+
...stateAttributes({
|
|
57
|
+
open,
|
|
58
|
+
closed: !open,
|
|
59
|
+
nested,
|
|
60
|
+
[`nested-${nestedName(context.component)}-open`]: nestedDialogOpen,
|
|
61
|
+
"starting-style": status === "starting",
|
|
62
|
+
"ending-style": status === "ending"
|
|
63
|
+
}),
|
|
64
|
+
ref: setBackdrop
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
}));
|
|
69
|
+
// src/components/dialog/dialog-close.ts
|
|
70
|
+
/** Closes the dialog (reason `close-press`). */
|
|
71
|
+
const DialogClose = defineClosePart("DialogClose", DialogKey, (c) => `${c.component}-close`);
|
|
72
|
+
// src/components/dialog/dialog-description.ts
|
|
73
|
+
/** Describes the dialog (its id becomes the popup's `aria-describedby`). */
|
|
74
|
+
const DialogDescription = defineLabelledPart("DialogDescription", DialogKey, "p", (c) => `${c.component}-description`, (c) => c.descriptionId);
|
|
75
|
+
// src/components/dialog/dialog-popup.ts
|
|
76
|
+
const RETURNS_FOCUS_UNFOCUSED = /* @__PURE__ */ new Set(["outside-press"]);
|
|
77
|
+
/** An AlertDialog's default initial focus: its first Close (spec/alert-dialog.md, "Focus"). */
|
|
78
|
+
function firstClose(popup, component) {
|
|
79
|
+
return popup.querySelector(`[data-primitives-part="${component}-close"]:not([disabled])`);
|
|
80
|
+
}
|
|
81
|
+
const DialogPopup = publicComponent(defineComponent({
|
|
82
|
+
name: "DialogPopup",
|
|
83
|
+
inheritAttrs: false,
|
|
84
|
+
props: {
|
|
85
|
+
...asProp,
|
|
86
|
+
/** Focused on open (default: the first tabbable element, else the popup). */
|
|
87
|
+
initialFocus: {
|
|
88
|
+
type: [
|
|
89
|
+
Object,
|
|
90
|
+
Boolean,
|
|
91
|
+
Function
|
|
92
|
+
],
|
|
93
|
+
default: void 0
|
|
94
|
+
},
|
|
95
|
+
/** Focused on close (default: the trigger, else the element focused before opening). */
|
|
96
|
+
finalFocus: {
|
|
97
|
+
type: [
|
|
98
|
+
Object,
|
|
99
|
+
Boolean,
|
|
100
|
+
Function
|
|
101
|
+
],
|
|
102
|
+
default: void 0
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
setup(props, { attrs, slots }) {
|
|
106
|
+
const context = useRequiredContext(DialogKey, "Dialog.Popup");
|
|
107
|
+
const setPopup = elementSetter(context.popup);
|
|
108
|
+
const { component } = context;
|
|
109
|
+
const alert = component === "alert-dialog";
|
|
110
|
+
provide(DialogNestingKey, context.nesting);
|
|
111
|
+
watch(() => [
|
|
112
|
+
context.open.value,
|
|
113
|
+
context.popup.value,
|
|
114
|
+
context.backdrop.value,
|
|
115
|
+
context.viewport.value
|
|
116
|
+
], ([open, popup, backdrop, viewport], _, onCleanup) => {
|
|
117
|
+
if (!open || popup === null) return;
|
|
118
|
+
const doc = popup.ownerDocument;
|
|
119
|
+
const previous = doc.activeElement instanceof HTMLElement ? doc.activeElement : null;
|
|
120
|
+
const session = openOverlaySession(doc, {
|
|
121
|
+
elements: () => [popup],
|
|
122
|
+
owner: () => context.triggers.value,
|
|
123
|
+
backdrops: () => [backdrop, viewport],
|
|
124
|
+
modal: true,
|
|
125
|
+
dismiss: (reason, event) => {
|
|
126
|
+
if (alert && reason === "outside-press") return;
|
|
127
|
+
context.setOpen(false, reason, event);
|
|
128
|
+
},
|
|
129
|
+
returnFocus: {
|
|
130
|
+
whenUnfocused: RETURNS_FOCUS_UNFOCUSED,
|
|
131
|
+
reason: () => context.lastReason.current ?? "none",
|
|
132
|
+
to: () => {
|
|
133
|
+
const final = resolveFocusTarget(props.finalFocus);
|
|
134
|
+
return final === false ? false : final ?? context.trigger.value ?? previous;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
const initial = resolveFocusTarget(props.initialFocus);
|
|
139
|
+
focusInitial(popup, initial === false ? popup : initial ?? (alert ? firstClose(popup, component) : null));
|
|
140
|
+
const release = trapFocus(popup, session.elementsAbove, { holdOutsidePress: alert });
|
|
141
|
+
const unlock = lockScroll(doc);
|
|
142
|
+
const restoreInert = inertOutside(backdrop ? [popup, backdrop] : [popup]);
|
|
143
|
+
onCleanup(() => {
|
|
144
|
+
release();
|
|
145
|
+
unlock();
|
|
146
|
+
restoreInert();
|
|
147
|
+
session.end();
|
|
148
|
+
});
|
|
149
|
+
}, {
|
|
150
|
+
flush: "post",
|
|
151
|
+
immediate: true
|
|
152
|
+
});
|
|
153
|
+
return () => {
|
|
154
|
+
const open = context.open.value;
|
|
155
|
+
const status = context.presence.status.value;
|
|
156
|
+
const nested = context.nested;
|
|
157
|
+
const nestedDialogs = context.nestedDialogs.value;
|
|
158
|
+
const nestedDialogOpen = nestedDialogs > 0;
|
|
159
|
+
return renderPart("div", {
|
|
160
|
+
attrs,
|
|
161
|
+
slots
|
|
162
|
+
}, props.as, {
|
|
163
|
+
open,
|
|
164
|
+
nested,
|
|
165
|
+
nestedDialogOpen
|
|
166
|
+
}, {
|
|
167
|
+
id: context.popupId,
|
|
168
|
+
role: alert ? "alertdialog" : "dialog",
|
|
169
|
+
"aria-modal": "true",
|
|
170
|
+
"aria-labelledby": context.titleId.value,
|
|
171
|
+
"aria-describedby": context.descriptionId.value,
|
|
172
|
+
tabindex: -1,
|
|
173
|
+
hidden: context.presence.mounted.value ? void 0 : true,
|
|
174
|
+
style: { [`--nested-${nestedName(component)}s`]: nestedDialogs },
|
|
175
|
+
"data-primitives-part": `${component}-popup`,
|
|
176
|
+
...stateAttributes({
|
|
177
|
+
open,
|
|
178
|
+
closed: !open,
|
|
179
|
+
nested,
|
|
180
|
+
[`nested-${nestedName(context.component)}-open`]: nestedDialogOpen,
|
|
181
|
+
"starting-style": status === "starting",
|
|
182
|
+
"ending-style": status === "ending"
|
|
183
|
+
}),
|
|
184
|
+
ref: setPopup
|
|
185
|
+
});
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
}));
|
|
189
|
+
// src/components/dialog/dialog-portal.ts
|
|
190
|
+
/** Moves the content to `container` (default: the body) while mounted, or always with `keep-mounted`. */
|
|
191
|
+
const DialogPortal = publicComponent(defineComponent({
|
|
192
|
+
name: "DialogPortal",
|
|
193
|
+
props: overlayPortalProps,
|
|
194
|
+
setup(props, { slots }) {
|
|
195
|
+
const context = useRequiredContext(DialogKey, "Dialog.Portal");
|
|
196
|
+
return useOverlayPortal(context.presence.mounted, props, slots);
|
|
197
|
+
}
|
|
198
|
+
}));
|
|
199
|
+
// src/components/dialog/dialog-title.ts
|
|
200
|
+
/** Names the dialog (its id becomes the popup's `aria-labelledby`). */
|
|
201
|
+
const DialogTitle = defineLabelledPart("DialogTitle", DialogKey, "h2", (c) => `${c.component}-title`, (c) => c.titleId);
|
|
202
|
+
// src/components/dialog/dialog-trigger.ts
|
|
203
|
+
const DialogTrigger = publicComponent(defineComponent({
|
|
204
|
+
name: "DialogTrigger",
|
|
205
|
+
inheritAttrs: false,
|
|
206
|
+
props: {
|
|
207
|
+
...asProp,
|
|
208
|
+
...overlayTriggerProps,
|
|
209
|
+
handle: {
|
|
210
|
+
type: Object,
|
|
211
|
+
default: void 0
|
|
212
|
+
},
|
|
213
|
+
disabled: {
|
|
214
|
+
type: Boolean,
|
|
215
|
+
default: false
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
setup(props, { attrs, slots }) {
|
|
219
|
+
const trigger = useOverlayTrigger(DialogKey, "Dialog.Trigger", props);
|
|
220
|
+
const setTrigger = elementSetter(trigger.element);
|
|
221
|
+
return () => {
|
|
222
|
+
const root = trigger.root.value;
|
|
223
|
+
const active = trigger.active.value;
|
|
224
|
+
const component = root?.component ?? props.handle?.component ?? "dialog";
|
|
225
|
+
return renderPart("button", {
|
|
226
|
+
attrs,
|
|
227
|
+
slots
|
|
228
|
+
}, props.as, {
|
|
229
|
+
open: active,
|
|
230
|
+
disabled: props.disabled
|
|
231
|
+
}, {
|
|
232
|
+
type: "button",
|
|
233
|
+
id: trigger.id.value,
|
|
234
|
+
disabled: props.disabled,
|
|
235
|
+
"aria-haspopup": "dialog",
|
|
236
|
+
"aria-expanded": active ? "true" : "false",
|
|
237
|
+
"aria-controls": active ? root?.popupId : void 0,
|
|
238
|
+
"data-primitives-part": `${component}-trigger`,
|
|
239
|
+
...stateAttributes({
|
|
240
|
+
"popup-open": active,
|
|
241
|
+
disabled: props.disabled
|
|
242
|
+
}),
|
|
243
|
+
onClick: (event) => root?.setOpen(!active, "trigger-press", event, event.currentTarget),
|
|
244
|
+
ref: setTrigger
|
|
245
|
+
});
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
}));
|
|
249
|
+
// src/components/dialog/dialog-viewport.ts
|
|
250
|
+
const DialogViewport = publicComponent(defineComponent({
|
|
251
|
+
name: "DialogViewport",
|
|
252
|
+
inheritAttrs: false,
|
|
253
|
+
props: asProp,
|
|
254
|
+
setup(props, { attrs, slots }) {
|
|
255
|
+
const context = useRequiredContext(DialogKey, "Dialog.Viewport");
|
|
256
|
+
const setViewport = elementSetter(context.viewport);
|
|
257
|
+
return () => {
|
|
258
|
+
const open = context.open.value;
|
|
259
|
+
const status = context.presence.status.value;
|
|
260
|
+
const nested = context.nested;
|
|
261
|
+
const nestedDialogOpen = context.nestedDialogs.value > 0;
|
|
262
|
+
return renderPart("div", {
|
|
263
|
+
attrs,
|
|
264
|
+
slots
|
|
265
|
+
}, props.as, {
|
|
266
|
+
open,
|
|
267
|
+
nested,
|
|
268
|
+
nestedDialogOpen
|
|
269
|
+
}, {
|
|
270
|
+
role: "presentation",
|
|
271
|
+
hidden: context.presence.mounted.value ? void 0 : true,
|
|
272
|
+
"data-primitives-part": `${context.component}-viewport`,
|
|
273
|
+
...stateAttributes({
|
|
274
|
+
open,
|
|
275
|
+
closed: !open,
|
|
276
|
+
nested,
|
|
277
|
+
[`nested-${nestedName(context.component)}-open`]: nestedDialogOpen,
|
|
278
|
+
"starting-style": status === "starting",
|
|
279
|
+
"ending-style": status === "ending"
|
|
280
|
+
}),
|
|
281
|
+
ref: setViewport
|
|
282
|
+
});
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
}));
|
|
286
|
+
// src/components/dialog/dialog-root-base.ts
|
|
287
|
+
/** The props a Dialog's and an AlertDialog's Root share (each declares its own `handle`). */
|
|
288
|
+
const dialogRootProps = {
|
|
289
|
+
...overlayRootProps,
|
|
290
|
+
...overlayTriggerRootProps
|
|
291
|
+
};
|
|
292
|
+
/**
|
|
293
|
+
* The setup of a Dialog's or an AlertDialog's Root (spec/alert-dialog.md: built on Dialog's
|
|
294
|
+
* parts), the part attributes of its parts named by `component`; renders no element.
|
|
295
|
+
*/
|
|
296
|
+
function setupDialogRoot(component, props, { emit, slots, expose }, withOpen) {
|
|
297
|
+
const root = useOverlayRoot(props, emit);
|
|
298
|
+
withOpen?.(() => root.open.value);
|
|
299
|
+
const parent = inject(DialogNestingKey, null);
|
|
300
|
+
const chains = shallowReactive(/* @__PURE__ */ new Map());
|
|
301
|
+
const nestedDialogs = computed(() => Math.max(0, ...chains.values()));
|
|
302
|
+
const nesting = { report(id, chain) {
|
|
303
|
+
if (chain === null) chains.delete(id);
|
|
304
|
+
else chains.set(id, chain);
|
|
305
|
+
} };
|
|
306
|
+
if (parent !== null) {
|
|
307
|
+
const id = Symbol("NestedDialog");
|
|
308
|
+
watch(() => root.open.value ? 1 + nestedDialogs.value : 0, (chain) => parent.report(id, chain), { immediate: true });
|
|
309
|
+
onBeforeUnmount(() => parent.report(id, null));
|
|
310
|
+
}
|
|
311
|
+
const context = {
|
|
312
|
+
...root,
|
|
313
|
+
component,
|
|
314
|
+
backdrop: shallowRef(null),
|
|
315
|
+
viewport: shallowRef(null),
|
|
316
|
+
titleId: ref(),
|
|
317
|
+
descriptionId: ref(),
|
|
318
|
+
nested: parent !== null,
|
|
319
|
+
nestedDialogs,
|
|
320
|
+
nesting
|
|
321
|
+
};
|
|
322
|
+
provide(DialogKey, context);
|
|
323
|
+
useAttachHandle(() => props.handle, context);
|
|
324
|
+
expose(root.actions);
|
|
325
|
+
return () => slots.default?.({ payload: root.payload.value });
|
|
326
|
+
}
|
|
327
|
+
export { DialogTitle as a, DialogDescription as c, DialogKey as d, DialogTrigger as i, DialogClose as l, setupDialogRoot as n, DialogPortal as o, DialogViewport as r, DialogPopup as s, dialogRootProps as t, DialogBackdrop as u };
|
|
328
|
+
|
|
329
|
+
//# sourceMappingURL=dialog-root-base-jbZipaoQ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog-root-base-jbZipaoQ.js","names":[],"sources":["../src/components/dialog/dialog-context.ts","../src/components/dialog/dialog-backdrop.ts","../src/components/dialog/dialog-close.ts","../src/components/dialog/dialog-description.ts","../src/components/dialog/dialog-popup.ts","../src/components/dialog/dialog-portal.ts","../src/components/dialog/dialog-title.ts","../src/components/dialog/dialog-trigger.ts","../src/components/dialog/dialog-viewport.ts","../src/components/dialog/dialog-root-base.ts"],"sourcesContent":["import type { ComputedRef, InjectionKey, Ref, ShallowRef } from \"vue\";\nimport type { OverlayRoot } from \"../../composables/use-overlay-root.ts\";\n\n/** The component a dialog's parts belong to: their part attribute's prefix. */\nexport type DialogComponent = \"dialog\" | \"alert-dialog\" | \"drawer\";\n\n/**\n * The name of the nested attributes of a component's parts: `data-nested-<name>-open` and\n * `--nested-<name>s` (a Drawer's are `drawer`, spec/drawer.md; a Dialog's and an AlertDialog's\n * `dialog`).\n */\nexport function nestedName(component: DialogComponent): string {\n return component === \"drawer\" ? component : \"dialog\";\n}\n\nexport interface DialogContext extends OverlayRoot {\n /** `alert-dialog`: never dismissed from outside, focuses its first Close (spec/alert-dialog.md). */\n component: DialogComponent;\n backdrop: ShallowRef<HTMLElement | null>;\n viewport: ShallowRef<HTMLElement | null>;\n titleId: Ref<string | undefined>;\n descriptionId: Ref<string | undefined>;\n /** Whether this dialog sits inside another dialog's Popup (spec/dialog.md, \"Nested dialogs\"). */\n nested: boolean;\n /** The number of open dialogs nested below this one, as a chain (`--nested-dialogs`). */\n nestedDialogs: ComputedRef<number>;\n /** What the Popup gives the dialogs nested in it. */\n nesting: DialogNesting;\n}\n\nexport const DialogKey: InjectionKey<DialogContext> = Symbol(\"Dialog\");\n\n/** What a dialog's Popup gives the dialogs nested in it: where they report their open chain. */\nexport interface DialogNesting {\n /** Reports the open chain below one nested dialog (`null` once it is gone). */\n report: (id: symbol, chain: number | null) => void;\n}\n\nexport const DialogNestingKey: InjectionKey<DialogNesting> =\n Symbol(\"DialogNesting\");\n","import { defineComponent } from \"vue\";\nimport { elementSetter } from \"../../composables/use-overlay-root.ts\";\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 { DialogKey, nestedName } from \"./dialog-context.ts\";\n\nexport interface DialogBackdropState {\n open: boolean;\n nested: boolean;\n nestedDialogOpen: boolean;\n}\n\nexport interface DialogBackdropProps {\n /** A nested dialog's Backdrop renders only with it (default `false`; spec/dialog.md). */\n forceRender?: boolean;\n}\n\nexport const DialogBackdrop: PartComponent<\n DialogBackdropProps,\n DialogBackdropState\n> = publicComponent(\n defineComponent({\n name: \"DialogBackdrop\",\n inheritAttrs: false,\n props: { ...asProp, forceRender: { type: Boolean, default: false } },\n setup(props, { attrs, slots }) {\n const context = useRequiredContext(DialogKey, \"Dialog.Backdrop\");\n const setBackdrop = elementSetter(context.backdrop);\n return () => {\n const nested = context.nested;\n if (nested && !props.forceRender) {\n return null;\n }\n const open = context.open.value;\n const status = context.presence.status.value;\n const nestedDialogOpen = context.nestedDialogs.value > 0;\n return renderPart(\n \"div\",\n { attrs, slots },\n props.as,\n { open, nested, nestedDialogOpen },\n {\n \"aria-hidden\": \"true\",\n hidden: context.presence.mounted.value\n ? undefined\n : true,\n \"data-primitives-part\": `${context.component}-backdrop`,\n ...stateAttributes({\n open,\n closed: !open,\n nested,\n [`nested-${nestedName(context.component)}-open`]:\n nestedDialogOpen,\n \"starting-style\": status === \"starting\",\n \"ending-style\": status === \"ending\",\n }),\n ref: setBackdrop,\n },\n );\n };\n },\n }),\n);\n","import { defineClosePart } from \"../../utils/labelled-part.ts\";\nimport { DialogKey } from \"./dialog-context.ts\";\n\n/** Closes the dialog (reason `close-press`). */\nexport const DialogClose = defineClosePart(\n \"DialogClose\",\n DialogKey,\n (c) => `${c.component}-close`,\n);\n","import { defineLabelledPart } from \"../../utils/labelled-part.ts\";\nimport { DialogKey } from \"./dialog-context.ts\";\n\n/** Describes the dialog (its id becomes the popup's `aria-describedby`). */\nexport const DialogDescription = defineLabelledPart(\n \"DialogDescription\",\n DialogKey,\n \"p\",\n (c) => `${c.component}-description`,\n (c) => c.descriptionId,\n);\n","import { focusInitial, trapFocus } from \"@fragiola/primitives/focus\";\nimport { inertOutside } from \"@fragiola/primitives/inert\";\nimport { openOverlaySession } from \"@fragiola/primitives/overlay\";\nimport { lockScroll } from \"@fragiola/primitives/scroll-lock\";\nimport { defineComponent, type PropType, provide, watch } from \"vue\";\nimport { elementSetter } from \"../../composables/use-overlay-root.ts\";\nimport { useRequiredContext } from \"../../composables/use-required-context.ts\";\nimport {\n type FocusTarget,\n resolveFocusTarget,\n} 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 { stateAttributes } from \"../../utils/state-attributes.ts\";\nimport { DialogKey, DialogNestingKey, nestedName } from \"./dialog-context.ts\";\n\n/** The modal dialog (spec/dialog.md): focus trap, inert page, scroll lock, its own layer. */\nexport interface DialogPopupState {\n open: boolean;\n nested: boolean;\n nestedDialogOpen: boolean;\n}\n\nexport interface DialogPopupProps {\n /**\n * Focused on open (default: the first tabbable element, else the popup; an AlertDialog's\n * first Close first).\n */\n initialFocus?: FocusTarget;\n /** Focused on close (default: the active trigger, else the element focused before opening). */\n finalFocus?: FocusTarget;\n}\n\n// a press on the backdrop or the viewport blurs the page: focus returns once the press has ended\nconst RETURNS_FOCUS_UNFOCUSED = new Set([\"outside-press\"]);\n\n/** An AlertDialog's default initial focus: its first Close (spec/alert-dialog.md, \"Focus\"). */\nfunction firstClose(popup: HTMLElement, component: string): HTMLElement | null {\n return popup.querySelector<HTMLElement>(\n `[data-primitives-part=\"${component}-close\"]:not([disabled])`,\n );\n}\n\nexport const DialogPopup: PartComponent<DialogPopupProps, DialogPopupState> =\n publicComponent(\n defineComponent({\n name: \"DialogPopup\",\n inheritAttrs: false,\n props: {\n ...asProp,\n /** Focused on open (default: the first tabbable element, else the popup). */\n initialFocus: {\n type: [Object, Boolean, Function] as PropType<FocusTarget>,\n default: undefined,\n },\n /** Focused on close (default: the trigger, else the element focused before opening). */\n finalFocus: {\n type: [Object, Boolean, Function] as PropType<FocusTarget>,\n default: undefined,\n },\n },\n setup(props, { attrs, slots }) {\n const context = useRequiredContext(DialogKey, \"Dialog.Popup\");\n const setPopup = elementSetter(context.popup);\n const { component } = context;\n // an alert dialog is never dismissed from outside (spec/alert-dialog.md)\n const alert = component === \"alert-dialog\";\n // the dialogs nested in it report their open chain here\n provide(DialogNestingKey, context.nesting);\n watch(\n () =>\n [\n context.open.value,\n context.popup.value,\n context.backdrop.value,\n context.viewport.value,\n ] as const,\n ([open, popup, backdrop, viewport], _, onCleanup) => {\n if (!open || popup === null) {\n return;\n }\n const doc = popup.ownerDocument;\n const previous =\n doc.activeElement instanceof HTMLElement\n ? doc.activeElement\n : null;\n // the triggers are read when the session needs them: a trigger registered\n // later, or the active one moving, never restarts the session\n const session = openOverlaySession(doc, {\n elements: () => [popup],\n owner: () => context.triggers.value,\n // a press on the backdrop or the viewport is outside this dialog,\n // inside its parent\n backdrops: () => [backdrop, viewport],\n // the page under it is inert: a press outside it lands in the overlay it was opened\n // from, which stays open (spec/dialog.md, \"Dismissal and layering\")\n modal: true,\n dismiss: (reason, event) => {\n if (alert && reason === \"outside-press\") {\n return;\n }\n context.setOpen(false, reason, event);\n },\n returnFocus: {\n whenUnfocused: RETURNS_FOCUS_UNFOCUSED,\n reason: () =>\n context.lastReason.current ?? \"none\",\n to: () => {\n const final = resolveFocusTarget(\n props.finalFocus,\n );\n return final === false\n ? false\n : (final ??\n context.trigger.value ??\n previous);\n },\n },\n });\n const initial = resolveFocusTarget(props.initialFocus);\n focusInitial(\n popup,\n initial === false\n ? popup\n : (initial ??\n (alert\n ? firstClose(popup, component)\n : null)),\n );\n // an alert dialog's outside press keeps the focus where it is\n const release = trapFocus(\n popup,\n session.elementsAbove,\n { holdOutsidePress: alert },\n );\n const unlock = lockScroll(doc);\n const restoreInert = inertOutside(\n backdrop ? [popup, backdrop] : [popup],\n );\n onCleanup(() => {\n release();\n unlock();\n restoreInert();\n session.end();\n });\n },\n { flush: \"post\", immediate: true },\n );\n return () => {\n const open = context.open.value;\n const status = context.presence.status.value;\n const nested = context.nested;\n const nestedDialogs = context.nestedDialogs.value;\n const nestedDialogOpen = nestedDialogs > 0;\n return renderPart(\n \"div\",\n { attrs, slots },\n props.as,\n { open, nested, nestedDialogOpen },\n {\n id: context.popupId,\n role: alert ? \"alertdialog\" : \"dialog\",\n \"aria-modal\": \"true\",\n \"aria-labelledby\": context.titleId.value,\n \"aria-describedby\": context.descriptionId.value,\n tabindex: -1,\n hidden: context.presence.mounted.value\n ? undefined\n : true,\n // the open chain of dialogs nested below it, for a recipe\n // (spec/dialog.md, \"Nested dialogs\")\n style: {\n [`--nested-${nestedName(component)}s`]:\n nestedDialogs,\n },\n \"data-primitives-part\": `${component}-popup`,\n ...stateAttributes({\n open,\n closed: !open,\n nested,\n [`nested-${nestedName(context.component)}-open`]:\n nestedDialogOpen,\n \"starting-style\": status === \"starting\",\n \"ending-style\": status === \"ending\",\n }),\n ref: setPopup,\n },\n );\n };\n },\n }),\n );\n","import { defineComponent } from \"vue\";\nimport { useRequiredContext } from \"../../composables/use-required-context.ts\";\nimport {\n type OverlayPortalProps,\n overlayPortalProps,\n useOverlayPortal,\n} from \"../../utils/overlay-portal.ts\";\nimport {\n type ContentSlots,\n type PublicComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { DialogKey } from \"./dialog-context.ts\";\n\nexport interface DialogPortalProps extends OverlayPortalProps {}\n\n/** Moves the content to `container` (default: the body) while mounted, or always with `keep-mounted`. */\nexport const DialogPortal: PublicComponent<DialogPortalProps, ContentSlots> =\n publicComponent(\n defineComponent({\n name: \"DialogPortal\",\n props: overlayPortalProps,\n setup(props, { slots }) {\n const context = useRequiredContext(DialogKey, \"Dialog.Portal\");\n return useOverlayPortal(context.presence.mounted, props, slots);\n },\n }),\n );\n","import { defineLabelledPart } from \"../../utils/labelled-part.ts\";\nimport { DialogKey } from \"./dialog-context.ts\";\n\n/** Names the dialog (its id becomes the popup's `aria-labelledby`). */\nexport const DialogTitle = defineLabelledPart(\n \"DialogTitle\",\n DialogKey,\n \"h2\",\n (c) => `${c.component}-title`,\n (c) => c.titleId,\n);\n","import { defineComponent, type PropType } from \"vue\";\nimport { elementSetter } from \"../../composables/use-overlay-root.ts\";\nimport {\n type OverlayTriggerProps,\n overlayTriggerProps,\n useOverlayTrigger,\n} from \"../../composables/use-overlay-trigger.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 { DialogKey } from \"./dialog-context.ts\";\nimport type { DialogHandle } from \"./dialog-handle.ts\";\n\nexport interface DialogTriggerState {\n open: boolean;\n disabled: boolean;\n}\n\n/** Opens the dialog; with a `handle`, from anywhere in the page (spec/dialog.md). */\nexport interface DialogTriggerProps\n extends OverlayTriggerProps<DialogHandle, unknown> {\n disabled?: boolean;\n}\n\nexport const DialogTrigger: PartComponent<\n DialogTriggerProps,\n DialogTriggerState\n> = publicComponent(\n defineComponent({\n name: \"DialogTrigger\",\n inheritAttrs: false,\n props: {\n ...asProp,\n ...overlayTriggerProps,\n handle: {\n type: Object as PropType<DialogHandle>,\n default: undefined,\n },\n disabled: { type: Boolean, default: false },\n },\n setup(props, { attrs, slots }) {\n const trigger = useOverlayTrigger(\n DialogKey,\n \"Dialog.Trigger\",\n props,\n );\n const setTrigger = elementSetter(trigger.element);\n return () => {\n const root = trigger.root.value;\n const active = trigger.active.value;\n // named by its Root (an AlertDialog's parts are Dialog's), or its handle before\n // one attaches\n const component =\n root?.component ??\n (props.handle as { component?: string } | undefined)\n ?.component ??\n \"dialog\";\n return renderPart(\n \"button\",\n { attrs, slots },\n props.as,\n { open: active, disabled: props.disabled },\n {\n type: \"button\",\n id: trigger.id.value,\n disabled: props.disabled,\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": active ? \"true\" : \"false\",\n \"aria-controls\": active ? root?.popupId : undefined,\n \"data-primitives-part\": `${component}-trigger`,\n ...stateAttributes({\n \"popup-open\": active,\n disabled: props.disabled,\n }),\n onClick: (event: MouseEvent) =>\n root?.setOpen(\n !active,\n \"trigger-press\",\n event,\n event.currentTarget as HTMLElement,\n ),\n ref: setTrigger,\n },\n );\n };\n },\n }),\n);\n","import { defineComponent } from \"vue\";\nimport { elementSetter } from \"../../composables/use-overlay-root.ts\";\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 { DialogKey, nestedName } from \"./dialog-context.ts\";\n\n/**\n * The container the popup sits in, covering the page (spec/dialog.md, \"Anatomy\"): a press on it\n * outside the popup is an outside press.\n */\nexport interface DialogViewportState {\n open: boolean;\n nested: boolean;\n nestedDialogOpen: boolean;\n}\n\nexport const DialogViewport: PartComponent<\n Record<never, never>,\n DialogViewportState\n> = publicComponent(\n defineComponent({\n name: \"DialogViewport\",\n inheritAttrs: false,\n props: asProp,\n setup(props, { attrs, slots }) {\n const context = useRequiredContext(DialogKey, \"Dialog.Viewport\");\n const setViewport = elementSetter(context.viewport);\n return () => {\n const open = context.open.value;\n const status = context.presence.status.value;\n const nested = context.nested;\n const nestedDialogOpen = context.nestedDialogs.value > 0;\n return renderPart(\n \"div\",\n { attrs, slots },\n props.as,\n { open, nested, nestedDialogOpen },\n {\n role: \"presentation\",\n hidden: context.presence.mounted.value\n ? undefined\n : true,\n \"data-primitives-part\": `${context.component}-viewport`,\n ...stateAttributes({\n open,\n closed: !open,\n nested,\n [`nested-${nestedName(context.component)}-open`]:\n nestedDialogOpen,\n \"starting-style\": status === \"starting\",\n \"ending-style\": status === \"ending\",\n }),\n ref: setViewport,\n },\n );\n };\n },\n }),\n);\n","import {\n computed,\n type ExtractPropTypes,\n inject,\n onBeforeUnmount,\n provide,\n ref,\n type SetupContext,\n shallowReactive,\n shallowRef,\n watch,\n} from \"vue\";\nimport {\n type overlayRootEmits,\n overlayRootProps,\n overlayTriggerRootProps,\n useOverlayRoot,\n} from \"../../composables/use-overlay-root.ts\";\nimport { useAttachHandle } from \"../../composables/use-overlay-trigger.ts\";\nimport type { OverlayHandle } from \"../../utils/overlay-handle.ts\";\nimport {\n type DialogComponent,\n type DialogContext,\n DialogKey,\n type DialogNesting,\n DialogNestingKey,\n} from \"./dialog-context.ts\";\n\n/** The props a Dialog's and an AlertDialog's Root share (each declares its own `handle`). */\nexport const dialogRootProps = {\n ...overlayRootProps,\n ...overlayTriggerRootProps,\n};\n\n/**\n * The setup of a Dialog's or an AlertDialog's Root (spec/alert-dialog.md: built on Dialog's\n * parts), the part attributes of its parts named by `component`; renders no element.\n */\nexport function setupDialogRoot(\n component: DialogComponent,\n props: ExtractPropTypes<typeof dialogRootProps> & {\n handle?: OverlayHandle<never> | undefined;\n },\n {\n emit,\n slots,\n expose,\n }: Pick<SetupContext<typeof overlayRootEmits>, \"emit\" | \"slots\" | \"expose\">,\n /** Reads the open state (a Drawer resets its swipe and snap point on an opening). */\n withOpen?: (open: () => boolean) => void,\n) {\n const root = useOverlayRoot(props, emit);\n withOpen?.(() => root.open.value);\n\n // nested dialogs (spec/dialog.md, \"Nested dialogs\"): a dialog inside another's Popup reports\n // the open chain below it; this one counts the longest chain nested in it\n const parent = inject(DialogNestingKey, null);\n const chains = shallowReactive(new Map<symbol, number>());\n const nestedDialogs = computed(() => Math.max(0, ...chains.values()));\n const nesting: DialogNesting = {\n report(id, chain) {\n if (chain === null) {\n chains.delete(id);\n } else {\n chains.set(id, chain);\n }\n },\n };\n if (parent !== null) {\n const id = Symbol(\"NestedDialog\");\n watch(\n () => (root.open.value ? 1 + nestedDialogs.value : 0),\n (chain) => parent.report(id, chain),\n { immediate: true },\n );\n onBeforeUnmount(() => parent.report(id, null));\n }\n\n const context: DialogContext = {\n ...root,\n component,\n backdrop: shallowRef(null),\n viewport: shallowRef(null),\n titleId: ref(),\n descriptionId: ref(),\n nested: parent !== null,\n nestedDialogs,\n nesting,\n };\n provide(DialogKey, context);\n useAttachHandle(() => props.handle, context);\n expose(root.actions);\n return () => slots.default?.({ payload: root.payload.value });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAWA,SAAgB,WAAW,WAAoC;CAC3D,OAAO,cAAc,WAAW,YAAY;AAChD;AAiBA,MAAa,YAAyC,OAAO,QAAQ;AAQrE,MAAa,mBACT,OAAO,eAAe;;ACjB1B,MAAa,iBAGT,gBACA,gBAAgB;CACZ,MAAM;CACN,cAAc;CACd,OAAO;EAAE,GAAG;EAAQ,aAAa;GAAE,MAAM;GAAS,SAAS;EAAM;CAAE;CACnE,MAAM,OAAO,EAAE,OAAO,SAAS;EAC3B,MAAM,UAAU,mBAAmB,WAAW,iBAAiB;EAC/D,MAAM,cAAc,cAAc,QAAQ,QAAQ;EAClD,aAAa;GACT,MAAM,SAAS,QAAQ;GACvB,IAAI,UAAU,CAAC,MAAM,aACjB,OAAO;GAEX,MAAM,OAAO,QAAQ,KAAK;GAC1B,MAAM,SAAS,QAAQ,SAAS,OAAO;GACvC,MAAM,mBAAmB,QAAQ,cAA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AK;CAIhC,MAAM,SAAS,OAAO,kBAAkB,IAAI;CAC5C,MAAM,SAAS,gCAAgB,IAAI,IAAoB,CAAC;CACxD,MAAM,gBAAgB,eAAe,KAAK,IAAI,GAAG,GAAG,OAAO,OAAO,CAAC,CAAC;CACpE,MAAM,UAAyB,EAC3B,OAAO,IAAI,OAAO;EACd,IAAI,UAAU,MACV,OAAO,OAAO,EAAE;OAEhB,OAAO,IAAI,IAAI,KAAK;CAE5B,EACJ;CACA,IAAI,WAAW,MAAM;EACjB,MAAM,KAAK,OAAO,cAAc;EAChC,YACW,KAAK,KAAK,QAAQ,IAAI,cAAc,QAAQ,IAClD,UAAU,OAAO,OAAO,IAAI,KAAK,GAClC,EAAE,WAAW,KAAK,CACtB;EACA,sBAAsB,OAAO,OAAO,IAAI,IAAI,CAAC;CACjD;CAEA,MAAM,UAAyB;EAC3B,GAAG;EACH;EACA,UAAU,WAAW,IAAI;EACzB,UAAU,WAAW,IAAI;EACzB,SAAS,IAAI;EACb,eAAe,IAAI;EACnB,QAAQ,WAAW;EACnB;EACA;CACJ;CACA,QAAQ,WAAW,OAAO;CAC1B,sBAAsB,MAAM,QAAQ,OAAO;CAC3C,OAAO,KAAK,OAAO;CACnB,aAAa,MAAM,UAAU,EAAE,SAAS,KAAK,QAAQ,MAAM,CAAC;AAChE"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { r as FocusTarget } from "./change-details-Bc4-Xzdm.js";
|
|
2
|
+
import "./public-component-DYpU9aDh.js";
|
|
3
|
+
import { t as OverlayPortalProps } from "./overlay-portal-Cmn7Dt7E.js";
|
|
4
|
+
import { t as OverlayHandle } from "./overlay-handle-DzC9LJQo.js";
|
|
5
|
+
import { t as OverlayTriggerProps } from "./use-overlay-trigger-D9OXZ_6K.js";
|
|
6
|
+
interface DialogBackdropState {
|
|
7
|
+
open: boolean;
|
|
8
|
+
nested: boolean;
|
|
9
|
+
nestedDialogOpen: boolean;
|
|
10
|
+
}
|
|
11
|
+
interface DialogBackdropProps {
|
|
12
|
+
/** A nested dialog's Backdrop renders only with it (default `false`; spec/dialog.md). */
|
|
13
|
+
forceRender?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/** The modal dialog (spec/dialog.md): focus trap, inert page, scroll lock, its own layer. */
|
|
16
|
+
interface DialogPopupState {
|
|
17
|
+
open: boolean;
|
|
18
|
+
nested: boolean;
|
|
19
|
+
nestedDialogOpen: boolean;
|
|
20
|
+
}
|
|
21
|
+
interface DialogPopupProps {
|
|
22
|
+
/**
|
|
23
|
+
* Focused on open (default: the first tabbable element, else the popup; an AlertDialog's
|
|
24
|
+
* first Close first).
|
|
25
|
+
*/
|
|
26
|
+
initialFocus?: FocusTarget;
|
|
27
|
+
/** Focused on close (default: the active trigger, else the element focused before opening). */
|
|
28
|
+
finalFocus?: FocusTarget;
|
|
29
|
+
}
|
|
30
|
+
interface DialogPortalProps extends OverlayPortalProps {}
|
|
31
|
+
/** A Dialog's handle: its detached Triggers and imperative opening (spec/dialog.md). */
|
|
32
|
+
interface DialogHandle<Payload = unknown> extends OverlayHandle<Payload> {
|
|
33
|
+
readonly component: "dialog";
|
|
34
|
+
}
|
|
35
|
+
/** Creates a Dialog handle (`Dialog.createHandle`), for Triggers outside the Root. */
|
|
36
|
+
declare const createDialogHandle: <Payload = unknown>() => DialogHandle<Payload>;
|
|
37
|
+
interface DialogTriggerState {
|
|
38
|
+
open: boolean;
|
|
39
|
+
disabled: boolean;
|
|
40
|
+
}
|
|
41
|
+
/** Opens the dialog; with a `handle`, from anywhere in the page (spec/dialog.md). */
|
|
42
|
+
interface DialogTriggerProps extends OverlayTriggerProps<DialogHandle, unknown> {
|
|
43
|
+
disabled?: boolean;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* The container the popup sits in, covering the page (spec/dialog.md, "Anatomy"): a press on it
|
|
47
|
+
* outside the popup is an outside press.
|
|
48
|
+
*/
|
|
49
|
+
interface DialogViewportState {
|
|
50
|
+
open: boolean;
|
|
51
|
+
nested: boolean;
|
|
52
|
+
nestedDialogOpen: boolean;
|
|
53
|
+
}
|
|
54
|
+
export { createDialogHandle as a, DialogPopupState as c, DialogHandle as i, DialogBackdropProps as l, DialogTriggerProps as n, DialogPortalProps as o, DialogTriggerState as r, DialogPopupProps as s, DialogViewportState as t, DialogBackdropState as u };
|
package/dist/dialog.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { a as OverlayActions, i as OpenChangeDetails, n as ChangeReason, r as FocusTarget, t as ChangeDetails } from "./change-details-Bc4-Xzdm.js";
|
|
2
|
+
import { n as RenderSlotProps } from "./render-part-BaTKiWBp.js";
|
|
3
|
+
import { n as OverlayRootSlots } from "./public-component-DYpU9aDh.js";
|
|
4
|
+
import { i as OverlayTriggerRootProps, n as OverlayRootEmits, r as OverlayRootProps, t as OverlayPortalProps } from "./overlay-portal-Cmn7Dt7E.js";
|
|
5
|
+
import { t as OverlayHandle } from "./overlay-handle-DzC9LJQo.js";
|
|
6
|
+
import { t as OverlayTriggerProps } from "./use-overlay-trigger-D9OXZ_6K.js";
|
|
7
|
+
import { a as createDialogHandle, c as DialogPopupState, i as DialogHandle, l as DialogBackdropProps, n as DialogTriggerProps, o as DialogPortalProps, r as DialogTriggerState, s as DialogPopupProps, t as DialogViewportState, u as DialogBackdropState } from "./dialog-viewport-tYqWTs9Q.js";
|
|
8
|
+
import { n as DialogRootEmits, r as DialogRootProps, t as Dialog } from "./index-BdJFU5tH.js";
|
|
9
|
+
export { type ChangeDetails, type ChangeReason, Dialog, type DialogBackdropProps, type DialogBackdropState, type DialogHandle, type DialogPopupProps, type DialogPopupState, type DialogPortalProps, type DialogRootEmits, type DialogRootProps, type DialogTriggerProps, type DialogTriggerState, type DialogViewportState, type FocusTarget, type OpenChangeDetails, type OverlayActions, type OverlayHandle, type OverlayPortalProps, type OverlayRootEmits, type OverlayRootProps, type OverlayRootSlots, type OverlayTriggerProps, type OverlayTriggerRootProps, type RenderSlotProps, createDialogHandle };
|
package/dist/dialog.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as Dialog, n as createDialogHandle } from "./dialog-MNjIMCfA.js";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { t as publicComponent } from "./public-component-AV8E7mGp.js";
|
|
2
|
+
import { t as DirectionKey } from "./direction-context-D-C_P6Lm.js";
|
|
3
|
+
import { computed, defineComponent, inject, provide } from "vue";
|
|
4
|
+
// src/direction/direction-provider.ts
|
|
5
|
+
/**
|
|
6
|
+
* Gives the components inside it their reading direction (spec/direction.md). Renders only its
|
|
7
|
+
* default slot: no element, no `dir`. A nested provider wins inside it.
|
|
8
|
+
*/
|
|
9
|
+
const DirectionProvider = publicComponent(defineComponent({
|
|
10
|
+
name: "DirectionProvider",
|
|
11
|
+
props: {
|
|
12
|
+
/** The reading direction of everything inside it (default `"ltr"`). */
|
|
13
|
+
direction: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: "ltr"
|
|
16
|
+
} },
|
|
17
|
+
setup(props, { slots }) {
|
|
18
|
+
provide(DirectionKey, () => props.direction);
|
|
19
|
+
return () => slots.default?.();
|
|
20
|
+
}
|
|
21
|
+
}));
|
|
22
|
+
// src/direction/use-direction.ts
|
|
23
|
+
/** The nearest DirectionProvider's direction, or `"ltr"` without one (spec/direction.md). */
|
|
24
|
+
function useDirection() {
|
|
25
|
+
const provided = inject(DirectionKey, null);
|
|
26
|
+
return computed(() => provided?.() ?? "ltr");
|
|
27
|
+
}
|
|
28
|
+
export { DirectionProvider as n, useDirection as t };
|
|
29
|
+
|
|
30
|
+
//# sourceMappingURL=direction-CN_deiZU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"direction-CN_deiZU.js","names":[],"sources":["../src/direction/direction-provider.ts","../src/direction/use-direction.ts"],"sourcesContent":["import type { Direction } from \"@fragiola/primitives/direction\";\nimport { defineComponent, type PropType, provide } from \"vue\";\nimport {\n type ContentSlots,\n type PublicComponent,\n publicComponent,\n} from \"../utils/public-component.ts\";\nimport { DirectionKey } from \"./direction-context.ts\";\n\nexport interface DirectionProviderProps {\n /** The reading direction of everything inside it (default `\"ltr\"`). */\n direction?: Direction;\n}\n\n/**\n * Gives the components inside it their reading direction (spec/direction.md). Renders only its\n * default slot: no element, no `dir`. A nested provider wins inside it.\n */\nexport const DirectionProvider: PublicComponent<\n DirectionProviderProps,\n ContentSlots\n> = publicComponent(\n defineComponent({\n name: \"DirectionProvider\",\n props: {\n /** The reading direction of everything inside it (default `\"ltr\"`). */\n direction: {\n type: String as PropType<Direction>,\n default: \"ltr\",\n },\n },\n setup(props, { slots }) {\n provide(DirectionKey, () => props.direction);\n return () => slots.default?.();\n },\n }),\n);\n","import type { Direction } from \"@fragiola/primitives/direction\";\nimport { type ComputedRef, computed, inject } from \"vue\";\nimport { DirectionKey } from \"./direction-context.ts\";\n\n/** The nearest DirectionProvider's direction, or `\"ltr\"` without one (spec/direction.md). */\nexport function useDirection(): ComputedRef<Direction> {\n const provided = inject(DirectionKey, null);\n return computed(() => provided?.() ?? \"ltr\");\n}\n"],"mappings":";;;;;;;;AAkBA,MAAa,oBAGT,gBACA,gBAAgB;CACZ,MAAM;CACN,OAAO;;AAEH,WAAW;EACP,MAAM;EACN,SAAS;CACb,EACJ;CACA,MAAM,OAAO,EAAE,SAAS;EACpB,QAAQ,oBAAoB,MAAM,SAAS;EAC3C,aAAa,MAAM,UAAU;CACjC;AACJ,CAAC,CACL;;;AC/BA,SAAgB,eAAuC;CACnD,MAAM,WAAW,OAAO,cAAc,IAAI;CAC1C,OAAO,eAAe,WAAW,KAAK,KAAK;AAC/C"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { inject } from "vue";
|
|
2
|
+
// src/direction/direction-context.ts
|
|
3
|
+
/**
|
|
4
|
+
* The direction a DirectionProvider gives (spec/direction.md). The components read it from here,
|
|
5
|
+
* not from the `/direction` entry, which they never import (the bundle guard reads it alone).
|
|
6
|
+
*/
|
|
7
|
+
const DirectionKey = Symbol("Direction");
|
|
8
|
+
/**
|
|
9
|
+
* The enclosing provider's direction, read when it is needed (a key press, a placement), or
|
|
10
|
+
* `null` without a provider: the component then reads its element's computed direction
|
|
11
|
+
* (`getDirection(element, provided())`).
|
|
12
|
+
*/
|
|
13
|
+
function useProvidedDirection() {
|
|
14
|
+
const provided = inject(DirectionKey, null);
|
|
15
|
+
return () => provided?.() ?? null;
|
|
16
|
+
}
|
|
17
|
+
export { useProvidedDirection as n, DirectionKey as t };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=direction-context-D-C_P6Lm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"direction-context-D-C_P6Lm.js","names":[],"sources":["../src/direction/direction-context.ts"],"sourcesContent":["import type { Direction } from \"@fragiola/primitives/direction\";\nimport { type InjectionKey, inject } from \"vue\";\n\n/**\n * The direction a DirectionProvider gives (spec/direction.md). The components read it from here,\n * not from the `/direction` entry, which they never import (the bundle guard reads it alone).\n */\nexport const DirectionKey: InjectionKey<() => Direction> = Symbol(\"Direction\");\n\n/**\n * The enclosing provider's direction, read when it is needed (a key press, a placement), or\n * `null` without a provider: the component then reads its element's computed direction\n * (`getDirection(element, provided())`).\n */\nexport function useProvidedDirection(): () => Direction | null {\n const provided = inject(DirectionKey, null);\n return () => provided?.() ?? null;\n}\n"],"mappings":";;;;;;AAOA,MAAa,eAA8C,OAAO,WAAW;;;;;;AAO7E,SAAgB,uBAA+C;CAC3D,MAAM,WAAW,OAAO,cAAc,IAAI;CAC1C,aAAa,WAAW,KAAK;AACjC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { n as DirectionProvider, t as useDirection } from "./direction-CN_deiZU.js";
|