@mono-lit/helper 0.0.0-stage → 0.0.1
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.md +55 -0
- package/README.md +34 -2
- package/dist/breakpoints-CAbhDUht.js +84 -0
- package/dist/checkbox-Cqpie9Ap.js +4 -0
- package/dist/chip-DBUUa2eB.js +4 -0
- package/dist/chip-limits-BMoO31JM.js +213 -0
- package/dist/chip-strip-Cw3gyz0q.js +213 -0
- package/dist/color-DHYrfXsX.js +253 -0
- package/dist/css-class-BRKRzHx-.js +60 -0
- package/dist/css-size-DhHSVZJK.js +37 -0
- package/dist/data/theme/presets.json.d.ts +140 -0
- package/dist/data-search-Bwo5bg8K.js +573 -0
- package/dist/data-source-controller-C50Qyfzh.js +178 -0
- package/dist/data-source-options-BTpfrOZ_.js +535 -0
- package/dist/data-source-options-CQSTZHPE.js +537 -0
- package/dist/data-source-read-CUX-lgrQ.js +216 -0
- package/dist/data-source-read-DL88aH8t.js +217 -0
- package/dist/decorate-DEXtNagw.js +141 -0
- package/dist/element-props-CLB6yvbm.js +114 -0
- package/dist/esm-Ptok4SQZ.js +2026 -0
- package/dist/excel-CY6zGkcx.js +608 -0
- package/dist/excel-DopRbEMK.js +608 -0
- package/dist/export-BvlBx_GZ.js +2302 -0
- package/dist/export.d.ts +1 -0
- package/dist/export.js +2302 -0
- package/dist/field-icons-BoOG6KrL.js +51 -0
- package/dist/field-path-C92eGLg3.js +251 -0
- package/dist/filter-builder-Bke3qOgJ.js +205 -0
- package/dist/filter-builder-CE4zE0V5.js +205 -0
- package/dist/filter-eval-DIfU2EAn.js +173 -0
- package/dist/filter-odata-C1vSGZaY.js +591 -0
- package/dist/form-control-core-B8d7k6vk.js +223 -0
- package/dist/form-control-core-eeRr0zLU.js +223 -0
- package/dist/hydration-flush-RB5Tz5nl.js +1001 -0
- package/dist/icon-CJkTlmTb.js +55 -0
- package/dist/icon-dVhYJUIH.js +17 -0
- package/dist/import-BgJdkwBI.js +606 -0
- package/dist/import.d.ts +1 -0
- package/dist/import.js +606 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +16 -0
- package/dist/index.node-DjvYOL-J.js +395 -0
- package/dist/index.node.d.ts +1 -0
- package/dist/index.node.js +16 -0
- package/dist/input-zGOULADt.js +4 -0
- package/dist/layout-var-CZnzMC0s.js +73 -0
- package/dist/light-slots-BVJwyg_2.js +244 -0
- package/dist/light-slots-DW1WgfgT.js +254 -0
- package/dist/markdown-DfqrfOJN.js +20146 -0
- package/dist/mono-button-CoVnBLav.js +873 -0
- package/dist/mono-button.shadow-FfP_hMH4.js +784 -0
- package/dist/mono-data-chart-ChU4Ii3p.js +738 -0
- package/dist/mono-data-dropdown-BAUl58kW.js +357 -0
- package/dist/mono-data-grid-CLBK8clE.js +4140 -0
- package/dist/mono-data-grid-Db80FzdZ.js +4142 -0
- package/dist/mono-element-B0kP_96P.js +232 -0
- package/dist/mono-event-Bi1qP9uN.js +129 -0
- package/dist/mono-form-controller-5PfsU4qa.js +409 -0
- package/dist/mono-modal-controller-BMO3n3rP.js +223 -0
- package/dist/mono-ui-CPV7rrdo.js +358 -0
- package/dist/notifier-CE4yxMUQ.js +88 -0
- package/dist/nuxt.d.ts +1 -0
- package/dist/nuxt.js +130 -0
- package/dist/popup-portal-BziRX1yG.js +465 -0
- package/dist/popup-stack-CEEMib__.js +189 -0
- package/dist/rate-limit-BBa2PO79.js +521 -0
- package/dist/reactive-BHsqVjRh.js +789 -0
- package/dist/reactive-D3EERqgO.js +47 -0
- package/dist/search.d.ts +1 -0
- package/dist/search.js +97 -0
- package/dist/src/components/accordion/accordion-core.d.ts +62 -0
- package/dist/src/components/accordion/accordion-types.d.ts +62 -0
- package/dist/src/components/accordion/index.d.ts +3 -0
- package/dist/src/components/accordion/index.shadow.d.ts +5 -0
- package/dist/src/components/accordion/mono-accordion.d.ts +55 -0
- package/dist/src/components/accordion/mono-accordion.shadow.d.ts +56 -0
- package/dist/src/components/alert/alert-core.d.ts +46 -0
- package/dist/src/components/alert/alert-types.d.ts +44 -0
- package/dist/src/components/alert/index.d.ts +3 -0
- package/dist/src/components/alert/index.shadow.d.ts +5 -0
- package/dist/src/components/alert/mono-alert.d.ts +44 -0
- package/dist/src/components/alert/mono-alert.shadow.d.ts +34 -0
- package/dist/src/components/breadcrumb/breadcrumb-core.d.ts +61 -0
- package/dist/src/components/breadcrumb/breadcrumb-list-core.d.ts +49 -0
- package/dist/src/components/breadcrumb/breadcrumb-render.d.ts +31 -0
- package/dist/src/components/breadcrumb/breadcrumb-types.d.ts +117 -0
- package/dist/src/components/breadcrumb/breadcrumb-utils.d.ts +43 -0
- package/dist/src/components/breadcrumb/index.d.ts +6 -0
- package/dist/src/components/breadcrumb/index.shadow.d.ts +8 -0
- package/dist/src/components/breadcrumb/mono-breadcrumb-list.d.ts +29 -0
- package/dist/src/components/breadcrumb/mono-breadcrumb-list.shadow.d.ts +48 -0
- package/dist/src/components/breadcrumb/mono-breadcrumb.d.ts +38 -0
- package/dist/src/components/breadcrumb/mono-breadcrumb.shadow.d.ts +73 -0
- package/dist/src/components/button/button-core.d.ts +90 -0
- package/dist/src/components/button/button-dropdown-core.d.ts +57 -0
- package/dist/src/components/button/button-dropdown-types.d.ts +129 -0
- package/dist/src/components/button/button-types.d.ts +219 -0
- package/dist/src/components/button/button-utils.d.ts +18 -0
- package/dist/src/components/button/index.button-dropdown.d.ts +4 -0
- package/dist/src/components/button/index.button-dropdown.shadow.d.ts +4 -0
- package/dist/src/components/button/index.d.ts +8 -0
- package/dist/src/components/button/index.shadow.d.ts +5 -0
- package/dist/src/components/button/mono-button-dropdown.d.ts +35 -0
- package/dist/src/components/button/mono-button-dropdown.shadow.d.ts +45 -0
- package/dist/src/components/button/mono-button.d.ts +123 -0
- package/dist/src/components/button/mono-button.shadow.d.ts +56 -0
- package/dist/src/components/card/card-core.d.ts +74 -0
- package/dist/src/components/card/card-types.d.ts +137 -0
- package/dist/src/components/card/card-utils.d.ts +23 -0
- package/dist/src/components/card/index.d.ts +4 -0
- package/dist/src/components/card/index.shadow.d.ts +6 -0
- package/dist/src/components/card/mono-card.d.ts +56 -0
- package/dist/src/components/card/mono-card.shadow.d.ts +52 -0
- package/dist/src/components/chart/chart-core.d.ts +43 -0
- package/dist/src/components/chart/chart-odata.d.ts +52 -0
- package/dist/src/components/chart/chart-types.d.ts +337 -0
- package/dist/src/components/chart/index.d.ts +8 -0
- package/dist/src/components/chart/index.shadow.d.ts +7 -0
- package/dist/src/components/chart/mono-chart-presets.d.ts +43 -0
- package/dist/src/components/chart/mono-chart-presets.shadow.d.ts +43 -0
- package/dist/src/components/chart/mono-chart.d.ts +30 -0
- package/dist/src/components/chart/mono-chart.shadow.d.ts +22 -0
- package/dist/src/components/chart/mono-data-chart.d.ts +27 -0
- package/dist/src/components/checkbox/checkbox-core.d.ts +53 -0
- package/dist/src/components/checkbox/checkbox-types.d.ts +69 -0
- package/dist/src/components/checkbox/checkbox-utils.d.ts +35 -0
- package/dist/src/components/checkbox/index.d.ts +4 -0
- package/dist/src/components/checkbox/index.shadow.d.ts +5 -0
- package/dist/src/components/checkbox/mono-checkbox.d.ts +34 -0
- package/dist/src/components/checkbox/mono-checkbox.shadow.d.ts +45 -0
- package/dist/src/components/chip/chip-core.d.ts +58 -0
- package/dist/src/components/chip/chip-types.d.ts +142 -0
- package/dist/src/components/chip/chip-utils.d.ts +24 -0
- package/dist/src/components/chip/index.d.ts +8 -0
- package/dist/src/components/chip/index.shadow.d.ts +6 -0
- package/dist/src/components/chip/mono-chip.d.ts +48 -0
- package/dist/src/components/chip/mono-chip.shadow.d.ts +33 -0
- package/dist/src/components/chip/mono-status-dot.d.ts +34 -0
- package/dist/src/components/date/date-core.d.ts +80 -0
- package/dist/src/components/date/date-types.d.ts +163 -0
- package/dist/src/components/date/index.d.ts +3 -0
- package/dist/src/components/date/index.shadow.d.ts +4 -0
- package/dist/src/components/date/mono-date.d.ts +22 -0
- package/dist/src/components/date/mono-date.shadow.d.ts +31 -0
- package/dist/src/components/drawer/drawer-core.d.ts +99 -0
- package/dist/src/components/drawer/drawer-types.d.ts +153 -0
- package/dist/src/components/drawer/index.d.ts +3 -0
- package/dist/src/components/drawer/index.shadow.d.ts +4 -0
- package/dist/src/components/drawer/mono-drawer.d.ts +45 -0
- package/dist/src/components/drawer/mono-drawer.shadow.d.ts +46 -0
- package/dist/src/components/dropdown/dropdown-core.d.ts +33 -0
- package/dist/src/components/dropdown/dropdown-types.d.ts +88 -0
- package/dist/src/components/dropdown/index.d.ts +3 -0
- package/dist/src/components/dropdown/index.shadow.d.ts +4 -0
- package/dist/src/components/dropdown/mono-dropdown.d.ts +34 -0
- package/dist/src/components/dropdown/mono-dropdown.shadow.d.ts +28 -0
- package/dist/src/components/dropdown-table/dropdown-table-core.d.ts +65 -0
- package/dist/src/components/dropdown-table/dropdown-table-types.d.ts +278 -0
- package/dist/src/components/dropdown-table/index.d.ts +5 -0
- package/dist/src/components/dropdown-table/index.shadow.d.ts +6 -0
- package/dist/src/components/dropdown-table/mono-data-dropdown.d.ts +152 -0
- package/dist/src/components/dropdown-table/mono-dropdown-table.d.ts +46 -0
- package/dist/src/components/dropdown-table/mono-dropdown-table.shadow.d.ts +22 -0
- package/dist/src/components/file-upload/file-upload-core.d.ts +60 -0
- package/dist/src/components/file-upload/file-upload-types.d.ts +145 -0
- package/dist/src/components/file-upload/file-upload-utils.d.ts +16 -0
- package/dist/src/components/file-upload/index.d.ts +4 -0
- package/dist/src/components/file-upload/index.shadow.d.ts +5 -0
- package/dist/src/components/file-upload/mono-file-upload.d.ts +33 -0
- package/dist/src/components/file-upload/mono-file-upload.shadow.d.ts +50 -0
- package/dist/src/components/filter/filter-builder-core.d.ts +36 -0
- package/dist/src/components/filter/filter-builder.d.ts +23 -0
- package/dist/src/components/filter/filter-odata.d.ts +27 -0
- package/dist/src/components/filter/filter-operators.d.ts +13 -0
- package/dist/src/components/filter/filter-types.d.ts +253 -0
- package/dist/src/components/filter/index.d.ts +6 -0
- package/dist/src/components/filter/index.shadow.d.ts +7 -0
- package/dist/src/components/filter/mono-filter-builder.d.ts +21 -0
- package/dist/src/components/filter/mono-filter-builder.shadow.d.ts +17 -0
- package/dist/src/components/form/form-control-core.d.ts +37 -0
- package/dist/src/components/form/form-rules.d.ts +25 -0
- package/dist/src/components/form/form-types.d.ts +307 -0
- package/dist/src/components/form/index.d.ts +6 -0
- package/dist/src/components/form/mono-form-controller.d.ts +16 -0
- package/dist/src/components/input/index.d.ts +6 -0
- package/dist/src/components/input/index.shadow.d.ts +8 -0
- package/dist/src/components/input/input-core.d.ts +91 -0
- package/dist/src/components/input/input-format.d.ts +118 -0
- package/dist/src/components/input/input-types.d.ts +179 -0
- package/dist/src/components/input/input-utils.d.ts +10 -0
- package/dist/src/components/input/mono-input.d.ts +46 -0
- package/dist/src/components/input/mono-input.shadow.d.ts +34 -0
- package/dist/src/components/menu/index.d.ts +6 -0
- package/dist/src/components/menu/index.shadow.d.ts +7 -0
- package/dist/src/components/menu/menu-core.d.ts +65 -0
- package/dist/src/components/menu/menu-render.d.ts +55 -0
- package/dist/src/components/menu/menu-types.d.ts +195 -0
- package/dist/src/components/menu/menu-utils.d.ts +53 -0
- package/dist/src/components/menu/mono-menu-list.d.ts +118 -0
- package/dist/src/components/menu/mono-menu.d.ts +39 -0
- package/dist/src/components/menu/mono-menu.shadow.d.ts +40 -0
- package/dist/src/components/modal/index.d.ts +4 -0
- package/dist/src/components/modal/index.shadow.d.ts +5 -0
- package/dist/src/components/modal/modal-core.d.ts +110 -0
- package/dist/src/components/modal/modal-types.d.ts +304 -0
- package/dist/src/components/modal/mono-modal-controller.d.ts +4 -0
- package/dist/src/components/modal/mono-modal.d.ts +45 -0
- package/dist/src/components/modal/mono-modal.shadow.d.ts +50 -0
- package/dist/src/components/nav/index.d.ts +4 -0
- package/dist/src/components/nav/index.shadow.d.ts +6 -0
- package/dist/src/components/nav/mono-nav.d.ts +41 -0
- package/dist/src/components/nav/mono-nav.shadow.d.ts +21 -0
- package/dist/src/components/nav/nav-core.d.ts +34 -0
- package/dist/src/components/nav/nav-types.d.ts +48 -0
- package/dist/src/components/nav/nav-utils.d.ts +12 -0
- package/dist/src/components/radio/index.d.ts +4 -0
- package/dist/src/components/radio/index.shadow.d.ts +5 -0
- package/dist/src/components/radio/mono-radio.d.ts +31 -0
- package/dist/src/components/radio/mono-radio.shadow.d.ts +35 -0
- package/dist/src/components/radio/radio-core.d.ts +45 -0
- package/dist/src/components/radio/radio-types.d.ts +58 -0
- package/dist/src/components/radio/radio-utils.d.ts +12 -0
- package/dist/src/components/rich-text-editor/index.d.ts +5 -0
- package/dist/src/components/rich-text-editor/index.shadow.d.ts +6 -0
- package/dist/src/components/rich-text-editor/mono-rich-text-editor.d.ts +31 -0
- package/dist/src/components/rich-text-editor/mono-rich-text-editor.shadow.d.ts +34 -0
- package/dist/src/components/rich-text-editor/rich-text-editor-core.d.ts +100 -0
- package/dist/src/components/rich-text-editor/rich-text-editor-loader.d.ts +17 -0
- package/dist/src/components/rich-text-editor/rich-text-editor-toolbar.d.ts +65 -0
- package/dist/src/components/rich-text-editor/rich-text-editor-types.d.ts +231 -0
- package/dist/src/components/select/index.d.ts +4 -0
- package/dist/src/components/select/index.shadow.d.ts +5 -0
- package/dist/src/components/select/mono-select.d.ts +69 -0
- package/dist/src/components/select/mono-select.shadow.d.ts +48 -0
- package/dist/src/components/select/select-core.d.ts +98 -0
- package/dist/src/components/select/select-types.d.ts +258 -0
- package/dist/src/components/select/select-utils.d.ts +7 -0
- package/dist/src/components/sidebar/index.d.ts +4 -0
- package/dist/src/components/sidebar/index.shadow.d.ts +6 -0
- package/dist/src/components/sidebar/mono-sidebar.d.ts +34 -0
- package/dist/src/components/sidebar/mono-sidebar.shadow.d.ts +27 -0
- package/dist/src/components/sidebar/sidebar-core.d.ts +51 -0
- package/dist/src/components/sidebar/sidebar-types.d.ts +119 -0
- package/dist/src/components/sidebar/sidebar-utils.d.ts +55 -0
- package/dist/src/components/switch/index.d.ts +4 -0
- package/dist/src/components/switch/index.shadow.d.ts +5 -0
- package/dist/src/components/switch/mono-switch.d.ts +31 -0
- package/dist/src/components/switch/mono-switch.shadow.d.ts +36 -0
- package/dist/src/components/switch/switch-core.d.ts +49 -0
- package/dist/src/components/switch/switch-types.d.ts +64 -0
- package/dist/src/components/switch/switch-utils.d.ts +12 -0
- package/dist/src/components/table/array-source.d.ts +44 -0
- package/dist/src/components/table/date-filter-tree.d.ts +93 -0
- package/dist/src/components/table/grouping.d.ts +55 -0
- package/dist/src/components/table/index.d.ts +33 -0
- package/dist/src/components/table/index.shadow.d.ts +47 -0
- package/dist/src/components/table/mono-data-grid.d.ts +1756 -0
- package/dist/src/components/table/mono-table-checkbox-core.d.ts +76 -0
- package/dist/src/components/table/mono-table-checkbox.d.ts +34 -0
- package/dist/src/components/table/mono-table-checkbox.shadow.d.ts +26 -0
- package/dist/src/components/table/mono-table-detail-core.d.ts +87 -0
- package/dist/src/components/table/mono-table-detail.d.ts +32 -0
- package/dist/src/components/table/mono-table-detail.shadow.d.ts +31 -0
- package/dist/src/components/table/mono-table-empty-core.d.ts +60 -0
- package/dist/src/components/table/mono-table-empty.d.ts +35 -0
- package/dist/src/components/table/mono-table-empty.shadow.d.ts +40 -0
- package/dist/src/components/table/mono-table-error-core.d.ts +84 -0
- package/dist/src/components/table/mono-table-error.d.ts +28 -0
- package/dist/src/components/table/mono-table-error.shadow.d.ts +21 -0
- package/dist/src/components/table/mono-table-info-core.d.ts +13 -0
- package/dist/src/components/table/mono-table-info.d.ts +19 -0
- package/dist/src/components/table/mono-table-info.shadow.d.ts +14 -0
- package/dist/src/components/table/mono-table-loading-core.d.ts +41 -0
- package/dist/src/components/table/mono-table-loading.d.ts +50 -0
- package/dist/src/components/table/mono-table-loading.shadow.d.ts +14 -0
- package/dist/src/components/table/mono-table-page-size-core.d.ts +14 -0
- package/dist/src/components/table/mono-table-page-size.d.ts +16 -0
- package/dist/src/components/table/mono-table-page-size.shadow.d.ts +11 -0
- package/dist/src/components/table/mono-table-paging-core.d.ts +22 -0
- package/dist/src/components/table/mono-table-paging-group-core.d.ts +18 -0
- package/dist/src/components/table/mono-table-paging-group.d.ts +20 -0
- package/dist/src/components/table/mono-table-paging-group.shadow.d.ts +13 -0
- package/dist/src/components/table/mono-table-paging.d.ts +16 -0
- package/dist/src/components/table/mono-table-paging.shadow.d.ts +11 -0
- package/dist/src/components/table/mono-table-search-core.d.ts +74 -0
- package/dist/src/components/table/mono-table-search.d.ts +34 -0
- package/dist/src/components/table/mono-table-search.shadow.d.ts +21 -0
- package/dist/src/components/table/mono-table-sort-core.d.ts +35 -0
- package/dist/src/components/table/mono-table-sort.d.ts +38 -0
- package/dist/src/components/table/mono-table-sort.shadow.d.ts +20 -0
- package/dist/src/components/table/mono-table-summary-core.d.ts +26 -0
- package/dist/src/components/table/mono-table-summary.d.ts +24 -0
- package/dist/src/components/table/mono-table-summary.shadow.d.ts +14 -0
- package/dist/src/components/table/mono-table-th-core.d.ts +56 -0
- package/dist/src/components/table/mono-table-th.d.ts +41 -0
- package/dist/src/components/table/mono-table-th.shadow.d.ts +19 -0
- package/dist/src/components/table/store-group-source.d.ts +24 -0
- package/dist/src/components/table/table-controller-core.d.ts +40 -0
- package/dist/src/components/table/table-filter-icons.d.ts +3 -0
- package/dist/src/components/table/table-menu-core.d.ts +65 -0
- package/dist/src/components/table/table-overlay.d.ts +165 -0
- package/dist/src/components/table/table-sort-icons.d.ts +4 -0
- package/dist/src/components/table/table-sort-utils.d.ts +20 -0
- package/dist/src/components/table/table-types.d.ts +475 -0
- package/dist/src/components/tabs/index.d.ts +3 -0
- package/dist/src/components/tabs/index.shadow.d.ts +4 -0
- package/dist/src/components/tabs/mono-tabs.d.ts +33 -0
- package/dist/src/components/tabs/mono-tabs.shadow.d.ts +37 -0
- package/dist/src/components/tabs/tabs-core.d.ts +57 -0
- package/dist/src/components/tabs/tabs-types.d.ts +65 -0
- package/dist/src/components/tag-input/index.d.ts +4 -0
- package/dist/src/components/tag-input/index.shadow.d.ts +5 -0
- package/dist/src/components/tag-input/mono-tag-input.d.ts +66 -0
- package/dist/src/components/tag-input/mono-tag-input.shadow.d.ts +40 -0
- package/dist/src/components/tag-input/tag-input-core.d.ts +108 -0
- package/dist/src/components/tag-input/tag-input-types.d.ts +394 -0
- package/dist/src/components/tag-input/tag-input-utils.d.ts +8 -0
- package/dist/src/components/textarea/index.d.ts +4 -0
- package/dist/src/components/textarea/index.shadow.d.ts +5 -0
- package/dist/src/components/textarea/mono-textarea.d.ts +29 -0
- package/dist/src/components/textarea/mono-textarea.shadow.d.ts +31 -0
- package/dist/src/components/textarea/textarea-core.d.ts +60 -0
- package/dist/src/components/textarea/textarea-types.d.ts +131 -0
- package/dist/src/components/textarea/textarea-utils.d.ts +7 -0
- package/dist/src/components/tooltip/control-tooltip.d.ts +36 -0
- package/dist/src/components/tooltip/index.d.ts +6 -0
- package/dist/src/components/tooltip/tooltip-config.d.ts +27 -0
- package/dist/src/components/tooltip/tooltip-declarative.d.ts +41 -0
- package/dist/src/components/tooltip/tooltip-loader.d.ts +1 -0
- package/dist/src/components/tooltip/tooltip-types.d.ts +110 -0
- package/dist/src/composables/breakpoints.d.ts +59 -0
- package/dist/src/composables/chip-limits.d.ts +48 -0
- package/dist/src/composables/chip-strip.d.ts +93 -0
- package/dist/src/composables/color.d.ts +103 -0
- package/dist/src/composables/css-class.d.ts +27 -0
- package/dist/src/composables/css-size.d.ts +40 -0
- package/dist/src/composables/data-source-controller.d.ts +84 -0
- package/dist/src/composables/element-props.d.ts +46 -0
- package/dist/src/composables/field-icons.d.ts +7 -0
- package/dist/src/composables/hybird-prop.d.ts +79 -0
- package/dist/src/composables/hydration-flush.d.ts +34 -0
- package/dist/src/composables/icon.d.ts +17 -0
- package/dist/src/composables/layout-var.d.ts +34 -0
- package/dist/src/composables/light-slots.d.ts +133 -0
- package/dist/src/composables/mdi-glyphs.d.ts +4 -0
- package/dist/src/composables/mono-element.d.ts +9 -0
- package/dist/src/composables/mono-event.d.ts +55 -0
- package/dist/src/composables/mono-pending.d.ts +8 -0
- package/dist/src/composables/mono-skeleton.d.ts +193 -0
- package/dist/src/composables/mono-ui.d.ts +58 -0
- package/dist/src/composables/notifier.d.ts +46 -0
- package/dist/src/composables/popup-portal.d.ts +226 -0
- package/dist/src/composables/popup-stack.d.ts +70 -0
- package/dist/src/composables/rate-limit.d.ts +108 -0
- package/dist/src/composables/reactive.d.ts +53 -0
- package/dist/src/composables/shadow-css.d.ts +42 -0
- package/dist/src/composables/visibility.d.ts +36 -0
- package/dist/src/data/theme/index.d.ts +30 -0
- package/dist/src/data/theme/presets.d.ts +94 -0
- package/dist/src/entries/index.d.ts +2 -0
- package/dist/src/entries/index.node.d.ts +42 -0
- package/dist/src/entries/search.d.ts +3 -0
- package/dist/src/export/detail.d.ts +29 -0
- package/dist/src/export/download.d.ts +9 -0
- package/dist/src/export/excel/index.d.ts +27 -0
- package/dist/src/export/excel/nodes.d.ts +123 -0
- package/dist/src/export/expression.d.ts +36 -0
- package/dist/src/export/helpers.d.ts +6 -0
- package/dist/src/export/index.d.ts +13 -0
- package/dist/src/export/markdown.d.ts +52 -0
- package/dist/src/export/resolve-data.d.ts +31 -0
- package/dist/src/export/sentinel.d.ts +97 -0
- package/dist/src/export/sheet-name.d.ts +45 -0
- package/dist/src/export/styles.d.ts +33 -0
- package/dist/src/export/template.d.ts +10 -0
- package/dist/src/export/types.d.ts +259 -0
- package/dist/src/import/coerce.d.ts +38 -0
- package/dist/src/import/index.d.ts +16 -0
- package/dist/src/import/match.d.ts +54 -0
- package/dist/src/import/parse.d.ts +15 -0
- package/dist/src/import/types.d.ts +153 -0
- package/dist/src/nuxt/index.d.ts +94 -0
- package/dist/src/search/data-search.d.ts +207 -0
- package/dist/src/search/field-path.d.ts +107 -0
- package/dist/src/search/filter-eval.d.ts +30 -0
- package/dist/src/search/index.d.ts +22 -0
- package/dist/src/search/odata-search.d.ts +18 -0
- package/dist/src/search/search-expr.d.ts +160 -0
- package/dist/src/utils/data-source-apply.d.ts +97 -0
- package/dist/src/utils/data-source-options.d.ts +116 -0
- package/dist/src/utils/data-source-read.d.ts +85 -0
- package/dist/src/utils/data-source-summary.d.ts +55 -0
- package/dist/src/utils/normalize-error.d.ts +60 -0
- package/dist/src/vite/index.d.ts +48 -0
- package/dist/src/vite/mono-client-only.d.ts +35 -0
- package/dist/src/vite/mono-ssr-stub.d.ts +20 -0
- package/dist/src/vite/shadow-manifest.d.ts +8 -0
- package/dist/styles-BIJ31TM4.js +20146 -0
- package/dist/tooltip-CysgRgBi.js +760 -0
- package/dist/tooltip.d.ts +1 -0
- package/dist/tooltip.js +2 -0
- package/dist/ui/accordion.d.ts +1 -0
- package/dist/ui/accordion.js +466 -0
- package/dist/ui/alert.d.ts +1 -0
- package/dist/ui/alert.js +221 -0
- package/dist/ui/breadcrumb.d.ts +1 -0
- package/dist/ui/breadcrumb.js +902 -0
- package/dist/ui/button-dropdown.d.ts +1 -0
- package/dist/ui/button-dropdown.js +679 -0
- package/dist/ui/button.d.ts +1 -0
- package/dist/ui/button.js +63 -0
- package/dist/ui/card.d.ts +1 -0
- package/dist/ui/card.js +511 -0
- package/dist/ui/chart.d.ts +1 -0
- package/dist/ui/chart.js +808 -0
- package/dist/ui/checkbox.d.ts +1 -0
- package/dist/ui/checkbox.js +413 -0
- package/dist/ui/chip.d.ts +1 -0
- package/dist/ui/chip.js +558 -0
- package/dist/ui/date.d.ts +1 -0
- package/dist/ui/date.js +686 -0
- package/dist/ui/drawer.d.ts +1 -0
- package/dist/ui/drawer.js +901 -0
- package/dist/ui/dropdown-table.d.ts +1 -0
- package/dist/ui/dropdown-table.js +1291 -0
- package/dist/ui/dropdown.d.ts +1 -0
- package/dist/ui/dropdown.js +586 -0
- package/dist/ui/file-upload.d.ts +1 -0
- package/dist/ui/file-upload.js +688 -0
- package/dist/ui/filter.d.ts +1 -0
- package/dist/ui/filter.js +400 -0
- package/dist/ui/font/files/geist-47c091c9.woff2 +0 -0
- package/dist/ui/font/files/geist-8dd77544.woff2 +0 -0
- package/dist/ui/font/files/geist-b9248b1e.woff2 +0 -0
- package/dist/ui/font/files/geist-d40d74b4.woff2 +0 -0
- package/dist/ui/font/files/geist-f493429a.woff2 +0 -0
- package/dist/ui/font/files/geistmono-03737868.woff2 +0 -0
- package/dist/ui/font/files/geistmono-421a7e38.woff2 +0 -0
- package/dist/ui/font/files/geistmono-48ef518d.woff2 +0 -0
- package/dist/ui/font/files/geistmono-5df35d39.woff2 +0 -0
- package/dist/ui/font/files/geistmono-7de289a4.woff2 +0 -0
- package/dist/ui/font/files/geistmono-e976128f.woff2 +0 -0
- package/dist/ui/font/files/inter-05cf802c.woff2 +0 -0
- package/dist/ui/font/files/inter-2b2f25a4.woff2 +0 -0
- package/dist/ui/font/files/inter-467acc7a.woff2 +0 -0
- package/dist/ui/font/files/inter-6e85163c.woff2 +0 -0
- package/dist/ui/font/files/inter-7048add3.woff2 +0 -0
- package/dist/ui/font/files/inter-9be0371e.woff2 +0 -0
- package/dist/ui/font/files/inter-a28b7e31.woff2 +0 -0
- package/dist/ui/font/files/poppins-054df55a.woff2 +0 -0
- package/dist/ui/font/files/poppins-0ee5dc9a.woff2 +0 -0
- package/dist/ui/font/files/poppins-0f44cb18.woff2 +0 -0
- package/dist/ui/font/files/poppins-0ff0d30c.woff2 +0 -0
- package/dist/ui/font/files/poppins-13045147.woff2 +0 -0
- package/dist/ui/font/files/poppins-1db57cd9.woff2 +0 -0
- package/dist/ui/font/files/poppins-2cf2a902.woff2 +0 -0
- package/dist/ui/font/files/poppins-39e7f079.woff2 +0 -0
- package/dist/ui/font/files/poppins-9607042d.woff2 +0 -0
- package/dist/ui/font/files/poppins-9a88fc1f.woff2 +0 -0
- package/dist/ui/font/files/poppins-b8f4f752.woff2 +0 -0
- package/dist/ui/font/files/poppins-f5e57db4.woff2 +0 -0
- package/dist/ui/font/geist-mono.css +104 -0
- package/dist/ui/font/geist.css +168 -0
- package/dist/ui/font/inter.css +232 -0
- package/dist/ui/font/poppins.css +104 -0
- package/dist/ui/form.d.ts +1 -0
- package/dist/ui/form.js +3 -0
- package/dist/ui/index.css +21826 -0
- package/dist/ui/input.d.ts +1 -0
- package/dist/ui/input.js +1176 -0
- package/dist/ui/menu.d.ts +1 -0
- package/dist/ui/menu.js +1289 -0
- package/dist/ui/modal.d.ts +1 -0
- package/dist/ui/modal.js +995 -0
- package/dist/ui/nav.d.ts +1 -0
- package/dist/ui/nav.js +295 -0
- package/dist/ui/radio.d.ts +1 -0
- package/dist/ui/radio.js +379 -0
- package/dist/ui/rich-text-editor.d.ts +1 -0
- package/dist/ui/rich-text-editor.js +1338 -0
- package/dist/ui/select.d.ts +1 -0
- package/dist/ui/select.js +2066 -0
- package/dist/ui/shadow/accordion.js +442 -0
- package/dist/ui/shadow/alert.js +218 -0
- package/dist/ui/shadow/breadcrumb.js +919 -0
- package/dist/ui/shadow/button-dropdown.js +696 -0
- package/dist/ui/shadow/button.js +63 -0
- package/dist/ui/shadow/card.js +524 -0
- package/dist/ui/shadow/chart.js +1569 -0
- package/dist/ui/shadow/checkbox.js +457 -0
- package/dist/ui/shadow/chip.js +559 -0
- package/dist/ui/shadow/date.js +712 -0
- package/dist/ui/shadow/drawer.js +869 -0
- package/dist/ui/shadow/dropdown-table.js +1620 -0
- package/dist/ui/shadow/dropdown.js +547 -0
- package/dist/ui/shadow/file-upload.js +731 -0
- package/dist/ui/shadow/filter.js +402 -0
- package/dist/ui/shadow/input.js +1150 -0
- package/dist/ui/shadow/menu.js +899 -0
- package/dist/ui/shadow/modal.js +1193 -0
- package/dist/ui/shadow/nav.js +240 -0
- package/dist/ui/shadow/radio.js +408 -0
- package/dist/ui/shadow/rich-text-editor.js +1344 -0
- package/dist/ui/shadow/select.js +2033 -0
- package/dist/ui/shadow/sidebar.js +606 -0
- package/dist/ui/shadow/switch.js +428 -0
- package/dist/ui/shadow/table.js +4755 -0
- package/dist/ui/shadow/tabs.js +372 -0
- package/dist/ui/shadow/tag-input.js +2846 -0
- package/dist/ui/shadow/textarea.js +816 -0
- package/dist/ui/sidebar.d.ts +1 -0
- package/dist/ui/sidebar.js +659 -0
- package/dist/ui/switch.d.ts +1 -0
- package/dist/ui/switch.js +398 -0
- package/dist/ui/table.d.ts +1 -0
- package/dist/ui/table.js +4654 -0
- package/dist/ui/tabs.d.ts +1 -0
- package/dist/ui/tabs.js +379 -0
- package/dist/ui/tag-input.d.ts +1 -0
- package/dist/ui/tag-input.js +2819 -0
- package/dist/ui/textarea.d.ts +1 -0
- package/dist/ui/textarea.js +819 -0
- package/dist/ui/theme/legacy.css +293 -0
- package/dist/ui/theme/luma.css +743 -0
- package/dist/ui/theme/lyra.css +754 -0
- package/dist/ui/theme/maia.css +673 -0
- package/dist/ui/theme/mira.css +802 -0
- package/dist/ui/theme/nova.css +662 -0
- package/dist/ui/theme/one.css +699 -0
- package/dist/ui/theme/rhea.css +742 -0
- package/dist/ui/theme/sera.css +845 -0
- package/dist/ui/theme/tokens.css +261 -0
- package/dist/ui/theme/vega.css +467 -0
- package/dist/vite-C5iUK7so.js +329 -0
- package/dist/vite.d.ts +1 -0
- package/dist/vite.js +2 -0
- package/dist/vue.d.ts +282 -0
- package/package.json +411 -3
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { LitElement, TemplateResult } from 'lit';
|
|
2
|
+
import { MenuItem, MenuBadgeColor, MonoMenuListType } from './menu-types.js';
|
|
3
|
+
export declare class MonoMenuList extends LitElement {
|
|
4
|
+
protected createRenderRoot(): HTMLElement;
|
|
5
|
+
/**
|
|
6
|
+
* For normal list mode:
|
|
7
|
+
* <mono-menu-list :items.prop="items" />
|
|
8
|
+
*
|
|
9
|
+
* For direct single-row mode (one row built from element props):
|
|
10
|
+
* <mono-menu-list type="group" title="Sales" :items.prop="children" />
|
|
11
|
+
*
|
|
12
|
+
* For declarative composition (any depth, any HTML inside):
|
|
13
|
+
* <mono-menu-list type="group" title="Group">
|
|
14
|
+
* <mono-menu-list type="children" title="Item A"></mono-menu-list>
|
|
15
|
+
* <mono-menu-list type="group" title="Subgroup">…</mono-menu-list>
|
|
16
|
+
* </mono-menu-list>
|
|
17
|
+
*
|
|
18
|
+
* In single-row mode, this `items` array becomes the built item's `children`.
|
|
19
|
+
*/
|
|
20
|
+
items: MenuItem[];
|
|
21
|
+
/** New behavior: render exactly one menu row from a full object. */
|
|
22
|
+
item?: MenuItem;
|
|
23
|
+
/** Render mode / declarative MenuItem.type — see header doc. */
|
|
24
|
+
type: MonoMenuListType;
|
|
25
|
+
/** Direct single-row props. Legacy alias for `type` in declarative mode. */
|
|
26
|
+
itemType?: MenuItem['type'];
|
|
27
|
+
title: string;
|
|
28
|
+
subtitle: string;
|
|
29
|
+
icon: string;
|
|
30
|
+
appendIcon: string;
|
|
31
|
+
badge?: string | number;
|
|
32
|
+
badgeColor?: MenuBadgeColor;
|
|
33
|
+
href: string;
|
|
34
|
+
disabled: boolean;
|
|
35
|
+
defaultOpen: boolean;
|
|
36
|
+
private _parent;
|
|
37
|
+
private _parentList;
|
|
38
|
+
private _rootList;
|
|
39
|
+
private _nestedChildren;
|
|
40
|
+
/** Captured DOM children, re-placed into [data-mono-slot="body"] after render. */
|
|
41
|
+
private _capturedChildren;
|
|
42
|
+
/** Idempotency guard — initial capture must run once per element lifetime,
|
|
43
|
+
* not again on reconnect (otherwise Lit's marker comments get hijacked). */
|
|
44
|
+
private _childrenCaptured;
|
|
45
|
+
/** Standalone group-open state — only honored on the root-most list. */
|
|
46
|
+
private _standaloneOpen;
|
|
47
|
+
private _childObserver;
|
|
48
|
+
private readonly _autoId;
|
|
49
|
+
connectedCallback(): void;
|
|
50
|
+
disconnectedCallback(): void;
|
|
51
|
+
willUpdate(changed: Map<PropertyKey, unknown>): void;
|
|
52
|
+
protected updated(_changed: Map<PropertyKey, unknown>): void;
|
|
53
|
+
getMenuItems(): MenuItem[];
|
|
54
|
+
/** @internal called by a nested `<mono-menu-list>` from its connectedCallback. */
|
|
55
|
+
_registerNestedChild(child: MonoMenuList): void;
|
|
56
|
+
/** @internal */
|
|
57
|
+
_unregisterNestedChild(child: MonoMenuList): void;
|
|
58
|
+
/** Standalone (no `<mono-menu>`) group-open queries — root-most list owns the set. */
|
|
59
|
+
isGroupOpenStandalone(id: string): boolean;
|
|
60
|
+
/** Seed a default-open id into the standalone state set. */
|
|
61
|
+
seedStandaloneOpen(id: string): void;
|
|
62
|
+
toggleGroupStandalone(id: string): void;
|
|
63
|
+
private _findRootList;
|
|
64
|
+
private _captureInitialChildren;
|
|
65
|
+
/**
|
|
66
|
+
* Capture external Element children that landed on the host AFTER Lit's
|
|
67
|
+
* most recent render — typically because a framework (Vue/React) inserted
|
|
68
|
+
* nodes via `v-for`, `v-if`, etc. We deliberately skip non-Element nodes
|
|
69
|
+
* (text / comment) because Lit places its own marker comments around the
|
|
70
|
+
* rendered region and stealing those breaks the part graph.
|
|
71
|
+
*/
|
|
72
|
+
private _captureExternalSiblings;
|
|
73
|
+
private _setupChildObserver;
|
|
74
|
+
private _placeBodySlot;
|
|
75
|
+
private _hasCapturedChildren;
|
|
76
|
+
private _hasDirectItemProps;
|
|
77
|
+
/**
|
|
78
|
+
* Declarative mode: `type` describes MenuItem.type and the body is composed
|
|
79
|
+
* from captured DOM children instead of `items`.
|
|
80
|
+
*
|
|
81
|
+
* The order of the checks is the contract. Captured children win outright —
|
|
82
|
+
* they ARE the body. An explicit `items` array comes next, and specifically
|
|
83
|
+
* BEATS direct props: the previous order returned `true` as soon as any direct
|
|
84
|
+
* prop was set, so `<mono-menu-list type="group" title="Sales" :items.prop="kids">`
|
|
85
|
+
* — the single-row form documented in the class header and in `MenuListProps` —
|
|
86
|
+
* landed in declarative mode. `_buildDeclarativeItem()` drops `items` on
|
|
87
|
+
* purpose, so that row rendered an empty `[data-mono-slot="body"]` nothing was
|
|
88
|
+
* ever placed into, and `_buildDirectItem()` (the one branch that does carry
|
|
89
|
+
* `items`) was unreachable.
|
|
90
|
+
*
|
|
91
|
+
* It doubles as a safety net for the element form: a group whose DOM children
|
|
92
|
+
* never made it into `_capturedChildren` now falls back to its `items` array
|
|
93
|
+
* rather than rendering a chevron over an empty body.
|
|
94
|
+
*/
|
|
95
|
+
private _isDeclarativeMode;
|
|
96
|
+
private _typeAsMenuItemType;
|
|
97
|
+
private _normalizeItem;
|
|
98
|
+
private _buildDirectItem;
|
|
99
|
+
private _buildDeclarativeItem;
|
|
100
|
+
private _getEffectiveItems;
|
|
101
|
+
private _seedDefaultOpenIntoParent;
|
|
102
|
+
/**
|
|
103
|
+
* A group is "active" while any descendant row is the selected one.
|
|
104
|
+
* `renderMenuGroup` puts `.mono-menu-group.active` on such a header and
|
|
105
|
+
* menu.css already styles it — the class simply never appeared, because
|
|
106
|
+
* nothing supplied this callback.
|
|
107
|
+
*/
|
|
108
|
+
private _hasSelectedDescendant;
|
|
109
|
+
private _buildContext;
|
|
110
|
+
private _renderSingleRow;
|
|
111
|
+
private _seedDefaultOpenIntoStandalone;
|
|
112
|
+
protected render(): TemplateResult;
|
|
113
|
+
}
|
|
114
|
+
declare global {
|
|
115
|
+
interface HTMLElementTagNameMap {
|
|
116
|
+
'mono-menu-list': MonoMenuList;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { LitElement, TemplateResult } from 'lit';
|
|
2
|
+
declare const MonoMenu_base: import('../../composables/hybird-prop').Constructor<import('./menu-core.js').MonoMenuCoreInterface> & typeof LitElement;
|
|
3
|
+
/**
|
|
4
|
+
* Light-DOM `mono-menu` (`@mono-lit/helper/ui/menu`).
|
|
5
|
+
*
|
|
6
|
+
* Renders into `this` (`createRenderRoot()=>this`) and keeps the full light-DOM
|
|
7
|
+
* feature set: declarative `slot="body"` composition with `<mono-menu-list>`
|
|
8
|
+
* children, per-item `slot="icon-${id}"` slots, and the child registry. All
|
|
9
|
+
* render-mode-agnostic logic (props, selection/open state, events, public API)
|
|
10
|
+
* lives in `MonoMenuCore`.
|
|
11
|
+
*/
|
|
12
|
+
export declare class MonoMenu extends MonoMenu_base {
|
|
13
|
+
static styles: import('lit').CSSResult[];
|
|
14
|
+
protected createRenderRoot(): HTMLElement;
|
|
15
|
+
private _slotsCaptured;
|
|
16
|
+
private _hasBodySlot;
|
|
17
|
+
/** Captured nodes for the whole-body slot — `slot="body"`. */
|
|
18
|
+
private _slotBody;
|
|
19
|
+
private _orphanHolder?;
|
|
20
|
+
connectedCallback(): void;
|
|
21
|
+
private _captureSlots;
|
|
22
|
+
protected updated(changed: Map<string, unknown>): void;
|
|
23
|
+
private _placeIconSlots;
|
|
24
|
+
private _placeBodySlot;
|
|
25
|
+
/**
|
|
26
|
+
* When any prop that influences the rendered content of descendant
|
|
27
|
+
* `<mono-menu-list>` instances changes, ask each registered child to
|
|
28
|
+
* re-render so they stay in lockstep with the parent.
|
|
29
|
+
*/
|
|
30
|
+
private _notifyListChildren;
|
|
31
|
+
/** Light body — declarative `slot="body"` placeholder, else items-driven. */
|
|
32
|
+
protected _renderBody(): TemplateResult;
|
|
33
|
+
}
|
|
34
|
+
declare global {
|
|
35
|
+
interface HTMLElementTagNameMap {
|
|
36
|
+
'mono-menu': MonoMenu;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { LitElement, TemplateResult } from 'lit';
|
|
2
|
+
declare const MonoMenuShadow_base: import('../../composables/hybird-prop').Constructor<import('./menu-core.js').MonoMenuCoreInterface> & typeof LitElement;
|
|
3
|
+
/**
|
|
4
|
+
* Shadow-DOM `mono-menu` (SSR build, `@mono-lit/helper/ui/shadow/menu`).
|
|
5
|
+
*
|
|
6
|
+
* Real shadow root + `static styles`, so `@lit-labs/ssr` serializes it to
|
|
7
|
+
* Declarative Shadow DOM. Renders the WHOLE tree (items + nested groups) from
|
|
8
|
+
* the `items` prop inside this single shadow root — so every menu CSS rule
|
|
9
|
+
* applies, and the active item is server-rendered from the reflected
|
|
10
|
+
* `model-value`.
|
|
11
|
+
*
|
|
12
|
+
* Icons: `i-mdi-…` utility classes can't resolve inside a shadow root, so each
|
|
13
|
+
* item's icon is rendered as a native `<slot name="icon-<id>">` (see
|
|
14
|
+
* `renderMenuIcon` + `iconSlot`), and this element creates the matching
|
|
15
|
+
* LIGHT-DOM `<span slot="icon-<id>" class="i-…">` children itself in `updated()`.
|
|
16
|
+
* Those light spans are styled by the page's GLOBAL UnoCSS (exactly like
|
|
17
|
+
* `mono-input`'s slotted prefix icon), so the real glyphs paint — client-side,
|
|
18
|
+
* after hydration (empty on the server). The group chevron is inline SVG.
|
|
19
|
+
*
|
|
20
|
+
* Shares all logic with the light build via `MonoMenuCore`. Both register
|
|
21
|
+
* `mono-menu`, so a document loads only one build.
|
|
22
|
+
*/
|
|
23
|
+
export declare class MonoMenuShadow extends MonoMenuShadow_base {
|
|
24
|
+
static styles: import('lit').CSSResult[];
|
|
25
|
+
protected _useIconSlots(): boolean;
|
|
26
|
+
/** Inline mdi-chevron-right — the UnoCSS icon class can't resolve in shadow. */
|
|
27
|
+
protected _chevronSvg(): TemplateResult;
|
|
28
|
+
connectedCallback(): void;
|
|
29
|
+
protected firstUpdated(changed: Map<string, unknown>): void;
|
|
30
|
+
protected updated(changed: Map<string, unknown>): void;
|
|
31
|
+
/**
|
|
32
|
+
* Reconcile LIGHT-DOM icon spans (this element's own children) with the items
|
|
33
|
+
* tree. Each becomes a `<span slot="icon-<id>" class="mono-menu-iconify i-…">`
|
|
34
|
+
* that projects into the shadow `<slot name="icon-<id>">` and is styled by the
|
|
35
|
+
* page's global UnoCSS. Client-only — the server has no DOM, so icons paint at
|
|
36
|
+
* hydration (the empty `<slot>` matches the server render → no mismatch).
|
|
37
|
+
*/
|
|
38
|
+
private _syncLightIcons;
|
|
39
|
+
}
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference path="../../../vue.d.ts" />
|
|
2
|
+
export { MonoModal } from './mono-modal.js';
|
|
3
|
+
export { monoModal, controlMonoModal } from './mono-modal-controller.js';
|
|
4
|
+
export type { ModalSize, ModalDimensionPreset, ModalDimension, ModalColor, ModalSource, ModalCssClass, ModalCloseEventDetail, ModalCloseEvent, ModalProps, ModalEvents, MonoDialogButton, MonoDialogButtonCtx, MonoDialogOptions, MonoDialogController, MonoModalOptions, MonoModalController, MonoModalElementLike, } from './modal-types.js';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference path="../../../vue.d.ts" />
|
|
2
|
+
export { MonoModalShadow } from './mono-modal.shadow.js';
|
|
3
|
+
export { MonoModalCore, type ModalSlotName } from './modal-core.js';
|
|
4
|
+
export { monoModal, controlMonoModal } from './mono-modal-controller.js';
|
|
5
|
+
export type { ModalSize, ModalDimensionPreset, ModalDimension, ModalColor, ModalSource, ModalCssClass, ModalCloseEventDetail, ModalCloseEvent, ModalProps, ModalEvents, MonoDialogButton, MonoDialogButtonCtx, MonoDialogOptions, MonoDialogController, MonoModalOptions, MonoModalController, MonoModalElementLike, } from './modal-types.js';
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { LitElement, TemplateResult } from 'lit';
|
|
2
|
+
import { StyleInfo } from 'lit/directives/style-map.js';
|
|
3
|
+
import { ModalSize, ModalColor, ModalSource, ModalCssClass } from './modal-types.js';
|
|
4
|
+
import { Constructor } from '../../composables/hybird-prop';
|
|
5
|
+
import { PopupLayer } from '../../composables/popup-stack';
|
|
6
|
+
import { MonoAutoFullscreen } from '../../composables/breakpoints';
|
|
7
|
+
/**
|
|
8
|
+
* Named slots projected by `mono-modal` (light: captured; shadow: native).
|
|
9
|
+
*
|
|
10
|
+
* These are the INTERNAL region names. Consumers may also write `slot="header"`
|
|
11
|
+
* and `slot="footer"` — the drawer's vocabulary — which alias `head` and `foot`.
|
|
12
|
+
* When both spellings are supplied for the same region **the alias wins**; the
|
|
13
|
+
* losing nodes are parked and never rendered.
|
|
14
|
+
*
|
|
15
|
+
* `head` (`header`) replaces the heading COLUMN — title + subtitle — and beats
|
|
16
|
+
* the `title` / `subtitle` slots and props. The close ✕ always stays.
|
|
17
|
+
*/
|
|
18
|
+
export type ModalSlotName = 'head' | 'title' | 'subtitle' | 'body' | 'foot';
|
|
19
|
+
type ModalSizeValue = string | number | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* `MonoModalCore` — render-mode-agnostic logic for `mono-modal`: props/hybrid
|
|
22
|
+
* aliases, the open/close model (`show`/`hide`/`toggle` + `mno-*` events), the
|
|
23
|
+
* `PopupLayer` surface (shared z-stack / scroll-lock / topmost-Escape via the
|
|
24
|
+
* SSR-safe `popup-stack`), draggable-header logic, sizing, and the shared modal
|
|
25
|
+
* markup (`_renderModalBody`). SSR-safe: `popup-stack` no-ops server-side and the
|
|
26
|
+
* `window`/drag access is `isServer`-guarded.
|
|
27
|
+
*
|
|
28
|
+
* Each build supplies the render root + slot/icon strategy:
|
|
29
|
+
* - light (`mono-modal.ts`): renders into a `<body>` portal that IS the
|
|
30
|
+
* `.mono-modal` root, `data-mono-slot` placeholders, UnoCSS `.i-mdi-close`.
|
|
31
|
+
* - shadow (`mono-modal.shadow.ts`): a real shadow root with an inner
|
|
32
|
+
* `.mono-modal` root, native `<slot>`s, inline-SVG ✕ (mirrors dropdown).
|
|
33
|
+
*/
|
|
34
|
+
export declare const MonoModalCore: <T extends Constructor<LitElement>>(superClass: T) => Constructor<MonoModalCoreInterface> & T;
|
|
35
|
+
/** Public + shared-protected surface added by the core mixin. */
|
|
36
|
+
export declare class MonoModalCoreInterface implements PopupLayer {
|
|
37
|
+
size: ModalSize;
|
|
38
|
+
color: ModalColor;
|
|
39
|
+
title: string;
|
|
40
|
+
subtitle: string;
|
|
41
|
+
modelValue: boolean;
|
|
42
|
+
dismissible: boolean;
|
|
43
|
+
persistent: boolean;
|
|
44
|
+
overlay: boolean;
|
|
45
|
+
closeOnEscape: boolean;
|
|
46
|
+
closeOnOverlay: boolean;
|
|
47
|
+
lockScroll: boolean;
|
|
48
|
+
draggable: boolean;
|
|
49
|
+
stackable: boolean;
|
|
50
|
+
autoFullscreen: MonoAutoFullscreen;
|
|
51
|
+
cssClass: ModalCssClass;
|
|
52
|
+
cssClassName: string;
|
|
53
|
+
width?: ModalSizeValue;
|
|
54
|
+
height?: ModalSizeValue;
|
|
55
|
+
minWidth?: ModalSizeValue;
|
|
56
|
+
maxWidth?: ModalSizeValue;
|
|
57
|
+
minHeight?: ModalSizeValue;
|
|
58
|
+
maxHeight?: ModalSizeValue;
|
|
59
|
+
zIndex?: number;
|
|
60
|
+
show(source?: ModalSource, sourceEvent?: Event): void;
|
|
61
|
+
hide(source?: ModalSource, sourceEvent?: Event): void;
|
|
62
|
+
toggle(source?: ModalSource, sourceEvent?: Event): void;
|
|
63
|
+
get lockBodyScroll(): boolean;
|
|
64
|
+
get hasBackdrop(): boolean;
|
|
65
|
+
get pinnedZ(): number | undefined;
|
|
66
|
+
onStackEscape(event: KeyboardEvent): void;
|
|
67
|
+
setStackZ(z: number, isTopBackdrop: boolean): void;
|
|
68
|
+
protected _slotsCaptured: boolean;
|
|
69
|
+
protected _hasHeadSlotState: boolean;
|
|
70
|
+
protected _hasTitleSlotState: boolean;
|
|
71
|
+
protected _hasSubtitleSlotState: boolean;
|
|
72
|
+
protected get _headingState(): {
|
|
73
|
+
title: boolean;
|
|
74
|
+
subtitle: boolean;
|
|
75
|
+
heading: boolean;
|
|
76
|
+
};
|
|
77
|
+
protected get _headingIdBase(): string;
|
|
78
|
+
protected _headingAria(): {
|
|
79
|
+
labelledby?: string;
|
|
80
|
+
describedby?: string;
|
|
81
|
+
};
|
|
82
|
+
protected _hasBodySlotState: boolean;
|
|
83
|
+
protected _hasFootSlotState: boolean;
|
|
84
|
+
protected _modalZ: number;
|
|
85
|
+
protected get _effectiveZ(): number;
|
|
86
|
+
protected _panelEl?: HTMLElement;
|
|
87
|
+
protected get _isMonoModal(): boolean;
|
|
88
|
+
protected get _isFullscreen(): boolean;
|
|
89
|
+
protected _panelSizeStyle(): StyleInfo;
|
|
90
|
+
protected _computeModalClasses(): string[];
|
|
91
|
+
protected _setCssClass(value: unknown): void;
|
|
92
|
+
protected _cls(base: string, key: keyof ModalCssClass): string;
|
|
93
|
+
protected _computeRootAttrs(): Record<string, string | null>;
|
|
94
|
+
protected _applyRootAttrs(root: HTMLElement | null | undefined): void;
|
|
95
|
+
protected bindRoot: (el: Element | undefined) => void;
|
|
96
|
+
/** The shadow build's inner root, bound by `bindRoot` — it re-applies the
|
|
97
|
+
* state attributes from its own `updated()`. */
|
|
98
|
+
protected _rootEl: HTMLElement | null;
|
|
99
|
+
protected _toBoolean(value: unknown): boolean;
|
|
100
|
+
protected _applyOpenSideEffects(): void;
|
|
101
|
+
protected _releaseSideEffects(): void;
|
|
102
|
+
protected _onHeaderPointerDown: (event: PointerEvent) => void;
|
|
103
|
+
protected _renderModalBody(): TemplateResult;
|
|
104
|
+
protected get _slotsAlwaysRender(): boolean;
|
|
105
|
+
protected _hasSlot(name: ModalSlotName): boolean;
|
|
106
|
+
protected _setSlotState(name: ModalSlotName, has: boolean): void;
|
|
107
|
+
protected _slotOutlet(name: ModalSlotName, fallback?: unknown): TemplateResult;
|
|
108
|
+
protected renderIcon(name: 'close'): TemplateResult;
|
|
109
|
+
}
|
|
110
|
+
export {};
|
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
import { MonoBreakpoint } from '../../composables/breakpoints';
|
|
2
|
+
import { ButtonProps } from '../button/button-types.js';
|
|
3
|
+
import { MonoEventProps } from '../../composables/element-props.js';
|
|
4
|
+
/**
|
|
5
|
+
* Content scale of the modal — header/title font, body font, paddings, close button
|
|
6
|
+
* and corner radius. The same 6-step scale accordion and the form controls use.
|
|
7
|
+
*
|
|
8
|
+
* It does **not** set the panel's width. That is what `width` / `min-width` /
|
|
9
|
+
* `max-width` (and `--mono-modal-width`) are for, so a compact `size="sm"` dialog can
|
|
10
|
+
* still be wide and a roomy `size="xl"` one can still be narrow. Before 2026-08-17
|
|
11
|
+
* `size` was a width preset and did nothing to the type scale.
|
|
12
|
+
*/
|
|
13
|
+
export type ModalSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
14
|
+
/**
|
|
15
|
+
* Named dimension presets accepted by `width`, `height` and the four `min-*` /
|
|
16
|
+
* `max-*` props.
|
|
17
|
+
*
|
|
18
|
+
* The same six tokens as {@link ModalSize}, on a different axis — `size` scales the
|
|
19
|
+
* CONTENT, these name a MEASURE. Widths are `min(90vw, 300px)` … `min(95vw, 1080px)`
|
|
20
|
+
* (`md` = the modal's default `min(90vw, 520px)`); heights are `22vh` … `95vh`
|
|
21
|
+
* (`md` = `50vh`), matching the drawer's ladder.
|
|
22
|
+
*/
|
|
23
|
+
export type ModalDimensionPreset = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
24
|
+
/**
|
|
25
|
+
* A sizing-prop value: a {@link ModalDimensionPreset} token, any CSS length string,
|
|
26
|
+
* or a number / numeric string read as px.
|
|
27
|
+
*
|
|
28
|
+
* The `string & {}` arm keeps the token list in editor autocomplete without
|
|
29
|
+
* narrowing the type — `"32rem"` is still perfectly valid.
|
|
30
|
+
*/
|
|
31
|
+
export type ModalDimension = ModalDimensionPreset | (string & {}) | number;
|
|
32
|
+
export type ModalColor = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'teal' | 'purple' | 'neutral' | 'dark';
|
|
33
|
+
export type ModalSource = 'overlay' | 'close' | 'escape' | 'manual';
|
|
34
|
+
export interface ModalCssClass {
|
|
35
|
+
root?: string;
|
|
36
|
+
overlay?: string;
|
|
37
|
+
panel?: string;
|
|
38
|
+
head?: string;
|
|
39
|
+
/** The heading column inside the head (title + subtitle, or `slot="header"`). */
|
|
40
|
+
heading?: string;
|
|
41
|
+
title?: string;
|
|
42
|
+
subtitle?: string;
|
|
43
|
+
close?: string;
|
|
44
|
+
body?: string;
|
|
45
|
+
foot?: string;
|
|
46
|
+
}
|
|
47
|
+
/** Shared detail for modal `toggle` / `open` / `close` events. */
|
|
48
|
+
export type ModalCloseEventDetail = {
|
|
49
|
+
modelValue: boolean;
|
|
50
|
+
currentValue: boolean;
|
|
51
|
+
oldValue: boolean;
|
|
52
|
+
value: boolean;
|
|
53
|
+
source: ModalSource;
|
|
54
|
+
sourceEvent?: Event;
|
|
55
|
+
};
|
|
56
|
+
/** Alias — the same detail is carried by every modal state-change event. */
|
|
57
|
+
export type ModalChangeEventDetail = ModalCloseEventDetail;
|
|
58
|
+
/** Fired on every state change. */
|
|
59
|
+
export type ModalClickEvent = CustomEvent<ModalChangeEventDetail>;
|
|
60
|
+
/** Fired on the false → true transition only. */
|
|
61
|
+
export type ModalOpenEvent = CustomEvent<ModalChangeEventDetail>;
|
|
62
|
+
/** Fired on the true → false transition only. */
|
|
63
|
+
export type ModalCloseEvent = CustomEvent<ModalCloseEventDetail>;
|
|
64
|
+
export interface ModalProps {
|
|
65
|
+
/** Open state, two-way bound for v-model-style usage. */
|
|
66
|
+
modelValue?: boolean;
|
|
67
|
+
'model-value'?: boolean;
|
|
68
|
+
modelvalue?: boolean;
|
|
69
|
+
/** Width preset of the modal panel. */
|
|
70
|
+
size?: ModalSize;
|
|
71
|
+
/** Theme color applied to accents. */
|
|
72
|
+
color?: ModalColor;
|
|
73
|
+
/** Heading text shown in the modal header. `slot="title"` replaces it. */
|
|
74
|
+
title?: string;
|
|
75
|
+
/**
|
|
76
|
+
* Secondary line under the title — muted and smaller, hidden when empty.
|
|
77
|
+
* `slot="subtitle"` replaces it; `slot="header"` replaces title + subtitle
|
|
78
|
+
* together (the close ✕ stays).
|
|
79
|
+
*/
|
|
80
|
+
subtitle?: string;
|
|
81
|
+
/** Shows the close button and allows dismissal. */
|
|
82
|
+
dismissible?: boolean;
|
|
83
|
+
/** Prevents closing via overlay click or escape. */
|
|
84
|
+
persistent?: boolean;
|
|
85
|
+
/** Renders a backdrop overlay behind the panel. */
|
|
86
|
+
overlay?: boolean;
|
|
87
|
+
/** Closes the modal when the Escape key is pressed. */
|
|
88
|
+
closeOnEscape?: boolean;
|
|
89
|
+
'close-on-escape'?: boolean;
|
|
90
|
+
closeonescape?: boolean;
|
|
91
|
+
/** Closes the modal on a click outside the panel: the overlay, or — with `overlay: false` — the page itself (the click still reaches the page). */
|
|
92
|
+
closeOnOverlay?: boolean;
|
|
93
|
+
'close-on-overlay'?: boolean;
|
|
94
|
+
closeonoverlay?: boolean;
|
|
95
|
+
/** Locks body scroll while the modal is open. */
|
|
96
|
+
lockScroll?: boolean;
|
|
97
|
+
'lock-scroll'?: boolean;
|
|
98
|
+
lockscroll?: boolean;
|
|
99
|
+
/** Allow dragging the modal by its header; it snaps back inside the viewport on drop. */
|
|
100
|
+
draggable?: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* Fill the screen at a breakpoint and below (default `false`). `auto-fullscreen`
|
|
103
|
+
* on its own means Tailwind's `sm` (< 640px); a token moves the boundary, so
|
|
104
|
+
* `auto-fullscreen="lg"` covers everything `lg:` does not match (< 1024px).
|
|
105
|
+
*/
|
|
106
|
+
autoFullscreen?: boolean | MonoBreakpoint;
|
|
107
|
+
'auto-fullscreen'?: boolean | MonoBreakpoint;
|
|
108
|
+
autofullscreen?: boolean | MonoBreakpoint;
|
|
109
|
+
/**
|
|
110
|
+
* Allow this modal to stack on top of others. When false (default) it is
|
|
111
|
+
* exclusive — opening it closes any other open modals.
|
|
112
|
+
*/
|
|
113
|
+
stackable?: boolean;
|
|
114
|
+
/**
|
|
115
|
+
* Explicit panel sizing. Each accepts a preset token (`"xs"`…`"xxl"` — see
|
|
116
|
+
* {@link ModalDimensionPreset}), a CSS length string (`"12px"`, `"12rem"`,
|
|
117
|
+
* `"80%"`), or a number / numeric string (interpreted as px).
|
|
118
|
+
* Set both `width` and `height` to `"100%"` for true full-screen.
|
|
119
|
+
*/
|
|
120
|
+
width?: ModalDimension;
|
|
121
|
+
height?: ModalDimension;
|
|
122
|
+
minWidth?: ModalDimension;
|
|
123
|
+
'min-width'?: ModalDimension;
|
|
124
|
+
minwidth?: ModalDimension;
|
|
125
|
+
maxWidth?: ModalDimension;
|
|
126
|
+
'max-width'?: ModalDimension;
|
|
127
|
+
maxwidth?: ModalDimension;
|
|
128
|
+
minHeight?: ModalDimension;
|
|
129
|
+
'min-height'?: ModalDimension;
|
|
130
|
+
minheight?: ModalDimension;
|
|
131
|
+
maxHeight?: ModalDimension;
|
|
132
|
+
'max-height'?: ModalDimension;
|
|
133
|
+
maxheight?: ModalDimension;
|
|
134
|
+
/**
|
|
135
|
+
* Pin the modal to an explicit stacking level. Unset (the default) lets the
|
|
136
|
+
* shared popup stack assign one so the newest layer is always on top. The value
|
|
137
|
+
* is the overlay's `z-index`; the panel sits one above it.
|
|
138
|
+
*/
|
|
139
|
+
zIndex?: number | string;
|
|
140
|
+
'z-index'?: number | string;
|
|
141
|
+
zindex?: number | string;
|
|
142
|
+
/** Per-part class overrides for internal elements. */
|
|
143
|
+
cssClass?: ModalCssClass;
|
|
144
|
+
cssclass?: ModalCssClass;
|
|
145
|
+
'css-class'?: ModalCssClass | string;
|
|
146
|
+
/** Plain root class string applied to the modal. */
|
|
147
|
+
cssClassName?: string;
|
|
148
|
+
/**
|
|
149
|
+
* The controller (`monoModal()` / `controlMonoModal()`) driving this modal. Bind
|
|
150
|
+
* with `.prop`: `:control-modal.prop="modal"`. `dataModal` is the same field.
|
|
151
|
+
*/
|
|
152
|
+
controlModal?: MonoModalController;
|
|
153
|
+
'control-modal'?: MonoModalController;
|
|
154
|
+
controlmodal?: MonoModalController;
|
|
155
|
+
dataModal?: MonoModalController;
|
|
156
|
+
'data-modal'?: MonoModalController;
|
|
157
|
+
datamodal?: MonoModalController;
|
|
158
|
+
}
|
|
159
|
+
export interface ModalEvents {
|
|
160
|
+
toggle: ModalClickEvent;
|
|
161
|
+
open: ModalOpenEvent;
|
|
162
|
+
close: ModalCloseEvent;
|
|
163
|
+
'mno-click': ModalClickEvent;
|
|
164
|
+
mnoClick: ModalClickEvent;
|
|
165
|
+
'mno-open': ModalOpenEvent;
|
|
166
|
+
mnoOpen: ModalOpenEvent;
|
|
167
|
+
'mno-close': ModalCloseEvent;
|
|
168
|
+
mnoClose: ModalCloseEvent;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* One action of a programmatic dialog: every `<mono-button>` prop plus the
|
|
172
|
+
* dialog wiring. `handler` is deliberately NOT accepted — `onClick` is the one
|
|
173
|
+
* hook, and it already owns the spinner (see below).
|
|
174
|
+
*/
|
|
175
|
+
export interface MonoDialogButton extends Omit<ButtonProps, 'handler'> {
|
|
176
|
+
/** Button text (the button's default slot). */
|
|
177
|
+
label?: string;
|
|
178
|
+
/** Iconify class for the leading icon, e.g. `i-mdi-check`. */
|
|
179
|
+
icon?: string;
|
|
180
|
+
/** Extra class on the button element. */
|
|
181
|
+
className?: string;
|
|
182
|
+
/**
|
|
183
|
+
* The answer this button gives: once `onClick` settles, the dialog closes and
|
|
184
|
+
* `show()` resolves with this value — for when the code AFTER `await show()`
|
|
185
|
+
* decides what happens. Without it the button leaves the dialog open unless
|
|
186
|
+
* `onClick` closes it itself (a "see details" link, say).
|
|
187
|
+
*/
|
|
188
|
+
value?: unknown;
|
|
189
|
+
/**
|
|
190
|
+
* The button's work, run on the click. `ctx.dialog` is the dialog controller;
|
|
191
|
+
* a button that does its own work ends with a bare `dialog.close()` — it
|
|
192
|
+
* already knows it was pressed, so there is nothing to report. Returning a
|
|
193
|
+
* promise keeps the button's spinner on (and defers the `value` close) until
|
|
194
|
+
* it settles; a rejection keeps the dialog open.
|
|
195
|
+
*/
|
|
196
|
+
onClick?: (event: MouseEvent, ctx: MonoDialogButtonCtx) => unknown | Promise<unknown>;
|
|
197
|
+
}
|
|
198
|
+
/** Handed to a dialog button's `onClick`, after the click event. */
|
|
199
|
+
export interface MonoDialogButtonCtx {
|
|
200
|
+
/**
|
|
201
|
+
* The dialog — `close(value?)`, `isOpen`, `element`, `setProps`. The same
|
|
202
|
+
* object as `modal.dialog`.
|
|
203
|
+
*/
|
|
204
|
+
dialog: MonoDialogController;
|
|
205
|
+
/** The `<mono-button>` that was pressed. */
|
|
206
|
+
button: HTMLElement;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* The programmatic dialog: a compact `<mono-modal>` the controller builds by code
|
|
210
|
+
* on every `show()`. It is a QUESTION — the user must answer it — so it cannot be
|
|
211
|
+
* dismissed: no ✕, no overlay click, no Escape. The only way out is a button
|
|
212
|
+
* that answers — through its `value`, or `dialog.close()` from its `onClick` —
|
|
213
|
+
* or `dialog.close()` from code.
|
|
214
|
+
*/
|
|
215
|
+
export interface MonoDialogOptions {
|
|
216
|
+
/** Header text. No header at all when omitted (together with `subtitle`). */
|
|
217
|
+
title?: string;
|
|
218
|
+
/** Secondary line under the title, muted and smaller. */
|
|
219
|
+
subtitle?: string;
|
|
220
|
+
/** The question. A string is rendered as HTML; a Node is appended as-is. */
|
|
221
|
+
body?: string | Node;
|
|
222
|
+
/** The actions, centred under the body. */
|
|
223
|
+
buttons?: MonoDialogButton[];
|
|
224
|
+
/** Which button gets focus once open (index), or `'none'`. Default `0`. */
|
|
225
|
+
focus?: number | 'none';
|
|
226
|
+
/**
|
|
227
|
+
* Overrides for the dialog's own `<mono-modal>` — `color`, `size`, `width`,
|
|
228
|
+
* `zIndex`, `cssClass`… — merged over the compact defaults. The dismissal
|
|
229
|
+
* locks (`persistent`, `dismissible: false`, `closeOnEscape: false`) are applied
|
|
230
|
+
* AFTER this and cannot be overridden. Takes the modal's events as `on<Event>`
|
|
231
|
+
* keys too (`onOpen`, `onClose`, …).
|
|
232
|
+
*/
|
|
233
|
+
props?: Partial<ModalProps> & MonoEventProps<ModalEvents>;
|
|
234
|
+
}
|
|
235
|
+
export interface MonoDialogController {
|
|
236
|
+
/**
|
|
237
|
+
* Build, open and await the dialog. `override` is merged over the options the
|
|
238
|
+
* controller was created with, for this show only. Resolves with the value the
|
|
239
|
+
* answering button supplied — its `value`, or what its `onClick` passed to
|
|
240
|
+
* `dialog.close(value)` — `false` when `close()` is called bare, and `false`
|
|
241
|
+
* when a second `show()` pre-empts it.
|
|
242
|
+
*/
|
|
243
|
+
show<T = boolean>(override?: Partial<MonoDialogOptions>): Promise<T>;
|
|
244
|
+
/** Close the open dialog, resolving its `show()` with `value` (default `false`). */
|
|
245
|
+
close(value?: unknown): void;
|
|
246
|
+
/** Whether a dialog is currently open. */
|
|
247
|
+
readonly isOpen: boolean;
|
|
248
|
+
/** The open dialog's `<mono-modal>` element, or `null`. */
|
|
249
|
+
readonly element: HTMLElement | null;
|
|
250
|
+
/** Merge new defaults for future `show()`s. */
|
|
251
|
+
setProps(patch: Partial<MonoDialogOptions>): void;
|
|
252
|
+
}
|
|
253
|
+
export interface MonoModalOptions {
|
|
254
|
+
/**
|
|
255
|
+
* Props pushed onto every `<mono-modal>` bound with `:control-modal.prop`. They
|
|
256
|
+
* WIN over the same attribute written on the element (matching `monoForm`'s
|
|
257
|
+
* `setProp`). The modal's events are accepted as `on<Event>` keys — `onOpen`,
|
|
258
|
+
* `onClose`, `onToggle`, … — and attached to every bound element as listeners.
|
|
259
|
+
*/
|
|
260
|
+
props?: Partial<ModalProps> & MonoEventProps<ModalEvents>;
|
|
261
|
+
/** Defaults for the programmatic dialog — see {@link MonoDialogOptions}. */
|
|
262
|
+
dialog?: MonoDialogOptions;
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* What `monoModal()` / `controlMonoModal()` returns.
|
|
266
|
+
*
|
|
267
|
+
* Two independent halves: the bound-modal half (`open` / `close` / `setProps`)
|
|
268
|
+
* drives the `<mono-modal>` elements bound to it and never touches the dialog;
|
|
269
|
+
* the `dialog` half builds its own element per `show()` and never touches the
|
|
270
|
+
* bound ones.
|
|
271
|
+
*/
|
|
272
|
+
export interface MonoModalController {
|
|
273
|
+
/** The stable props object every bound element pulls on notify. */
|
|
274
|
+
props(): Partial<ModalProps>;
|
|
275
|
+
/** Merge into `props()` and notify the bound elements. */
|
|
276
|
+
setProps(patch: Partial<ModalProps>): void;
|
|
277
|
+
/** Open the bound modal(s) — `show('manual')`, so `open` fires. */
|
|
278
|
+
open(): void;
|
|
279
|
+
/** Close the bound modal(s) — `hide('manual')`, so `close` fires. */
|
|
280
|
+
close(): void;
|
|
281
|
+
toggle(): void;
|
|
282
|
+
/** Open state of the bound modal; follows user-driven closes (✕, overlay, Escape) too. */
|
|
283
|
+
readonly isOpen: boolean;
|
|
284
|
+
/** The first bound `<mono-modal>`, or `null`. */
|
|
285
|
+
readonly element: HTMLElement | null;
|
|
286
|
+
/** The programmatic dialog. */
|
|
287
|
+
readonly dialog: MonoDialogController;
|
|
288
|
+
/** Called after every state or props change. Returns an unsubscribe. */
|
|
289
|
+
subscribe(cb: () => void): () => void;
|
|
290
|
+
/** Closes an open dialog (resolving `false`), drops subscribers and bindings. */
|
|
291
|
+
dispose(): void;
|
|
292
|
+
/** @internal element plumbing */
|
|
293
|
+
_register(el: MonoModalElementLike): void;
|
|
294
|
+
/** @internal */
|
|
295
|
+
_unregister(el: MonoModalElementLike): void;
|
|
296
|
+
/** @internal the element reports its own open/close transitions */
|
|
297
|
+
_report(open: boolean, source: ModalSource): void;
|
|
298
|
+
}
|
|
299
|
+
/** The slice of a `<mono-modal>` the controller drives. */
|
|
300
|
+
export interface MonoModalElementLike {
|
|
301
|
+
modelValue: boolean;
|
|
302
|
+
show(source?: ModalSource, sourceEvent?: Event): void;
|
|
303
|
+
hide(source?: ModalSource, sourceEvent?: Event): void;
|
|
304
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { MonoModalController, MonoModalOptions } from './modal-types.js';
|
|
2
|
+
/** Renamed "control" alias of {@link monoModal} (no breaking change — both work). */
|
|
3
|
+
export { monoModal as controlMonoModal };
|
|
4
|
+
export declare function monoModal(options?: MonoModalOptions): MonoModalController;
|