@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,129 @@
|
|
|
1
|
+
import { DropdownPlacement, DropdownSource } from '../dropdown/dropdown-types.js';
|
|
2
|
+
import { ButtonEvents, ButtonProps } from './button-types.js';
|
|
3
|
+
import { MonoEventProps } from '../../composables/element-props.js';
|
|
4
|
+
export type { DropdownPlacement as ButtonDropdownPlacement };
|
|
5
|
+
/**
|
|
6
|
+
* One entry in `buttons`.
|
|
7
|
+
*
|
|
8
|
+
* Extends the full `<mono-button>` prop surface, because that is exactly what
|
|
9
|
+
* each entry renders — `loading`, `disabled`, `throttle`, `badge`, `variant` and
|
|
10
|
+
* everything else behave as they would on a standalone button.
|
|
11
|
+
*/
|
|
12
|
+
export interface ButtonDropdownItem extends ButtonProps, Omit<MonoEventProps<ButtonEvents>, 'onClick'> {
|
|
13
|
+
/** Text of the button (and of its row in the menu). */
|
|
14
|
+
label?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Icon class placed in the button's icon slot, e.g. `'i-mdi-pencil'`.
|
|
17
|
+
* `iconPosition` (inherited from `ButtonProps`) decides which side it sits on.
|
|
18
|
+
*/
|
|
19
|
+
icon?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Runs when this entry is clicked, before the element's own `click`.
|
|
22
|
+
* Bind the array with `.prop` — a function can't survive an attribute.
|
|
23
|
+
*/
|
|
24
|
+
onClick?: (event: MouseEvent) => void;
|
|
25
|
+
/** Extra class on this entry's button. */
|
|
26
|
+
className?: string;
|
|
27
|
+
}
|
|
28
|
+
/** Detail shared by `click` / `open` / `close`. */
|
|
29
|
+
export interface ButtonDropdownClickEventDetail {
|
|
30
|
+
/** The entry that was activated (absent for open/close). */
|
|
31
|
+
item?: ButtonDropdownItem;
|
|
32
|
+
/** Its index in `buttons` (absent for open/close). */
|
|
33
|
+
index?: number;
|
|
34
|
+
/** Whether the menu is open after this event. */
|
|
35
|
+
modelValue: boolean;
|
|
36
|
+
/** Whether the entries are currently collapsed behind the trigger. */
|
|
37
|
+
collapsed: boolean;
|
|
38
|
+
source: DropdownSource;
|
|
39
|
+
sourceEvent?: Event;
|
|
40
|
+
}
|
|
41
|
+
export type ButtonDropdownClickEvent = CustomEvent<ButtonDropdownClickEventDetail>;
|
|
42
|
+
export type ButtonDropdownOpenEvent = CustomEvent<ButtonDropdownClickEventDetail>;
|
|
43
|
+
export type ButtonDropdownCloseEvent = CustomEvent<ButtonDropdownClickEventDetail>;
|
|
44
|
+
/**
|
|
45
|
+
* Events emitted by `<mono-button-dropdown>`. Each name is listed twice — kebab
|
|
46
|
+
* and camel — because `dispatchMonoEvent` emits both spellings.
|
|
47
|
+
*/
|
|
48
|
+
export interface ButtonDropdownEvents {
|
|
49
|
+
click: ButtonDropdownClickEvent;
|
|
50
|
+
open: ButtonDropdownOpenEvent;
|
|
51
|
+
close: ButtonDropdownCloseEvent;
|
|
52
|
+
'mno-click': ButtonDropdownClickEvent;
|
|
53
|
+
mnoClick: ButtonDropdownClickEvent;
|
|
54
|
+
'mno-open': ButtonDropdownOpenEvent;
|
|
55
|
+
mnoOpen: ButtonDropdownOpenEvent;
|
|
56
|
+
'mno-close': ButtonDropdownCloseEvent;
|
|
57
|
+
mnoClose: ButtonDropdownCloseEvent;
|
|
58
|
+
}
|
|
59
|
+
/** Per-part class overrides. */
|
|
60
|
+
export interface ButtonDropdownCssClass {
|
|
61
|
+
root?: string;
|
|
62
|
+
/** The inline row rendered when the entries are NOT collapsed. */
|
|
63
|
+
row?: string;
|
|
64
|
+
/** The `⋮` trigger button. */
|
|
65
|
+
trigger?: string;
|
|
66
|
+
/** The floating panel. */
|
|
67
|
+
panel?: string;
|
|
68
|
+
/** The `<ul>` inside the panel. */
|
|
69
|
+
list?: string;
|
|
70
|
+
/** Each `<li>`. */
|
|
71
|
+
item?: string;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Props for `<mono-button-dropdown>`.
|
|
75
|
+
*
|
|
76
|
+
* `buttons`, `trigger` and `cssClass` are objects/arrays, so bind them with the
|
|
77
|
+
* `.prop` modifier (`:buttons.prop="actions"`); a plain attribute would only ever
|
|
78
|
+
* carry a stringified value.
|
|
79
|
+
*/
|
|
80
|
+
export interface ButtonDropdownProps {
|
|
81
|
+
/** The actions. Each entry takes every `<mono-button>` prop. */
|
|
82
|
+
buttons?: ButtonDropdownItem[];
|
|
83
|
+
/**
|
|
84
|
+
* How many entries may render inline. While `buttons.length <= min` they are
|
|
85
|
+
* all shown as plain buttons; past that, ALL of them move into the dropdown and
|
|
86
|
+
* only the trigger remains. Default `1`.
|
|
87
|
+
*/
|
|
88
|
+
min?: number;
|
|
89
|
+
/**
|
|
90
|
+
* Colors the `⋮` trigger. Entries are deliberately NOT colored inside the menu
|
|
91
|
+
* — an entry's own `color` tints its ICON there instead, since a list of
|
|
92
|
+
* differently-coloured buttons reads as noise. Outside the menu (inline, when
|
|
93
|
+
* the list is short enough) entries keep their real button styling.
|
|
94
|
+
*/
|
|
95
|
+
color?: ButtonProps['color'];
|
|
96
|
+
/** Visual style of the `⋮` trigger — same values `<mono-button>` takes. */
|
|
97
|
+
variant?: ButtonProps['variant'];
|
|
98
|
+
/** Size of the `⋮` trigger. */
|
|
99
|
+
size?: ButtonProps['size'];
|
|
100
|
+
/** Corner radius of the `⋮` trigger — the same scale `<mono-button>` takes. */
|
|
101
|
+
rounded?: ButtonProps['rounded'];
|
|
102
|
+
/** Where the panel opens relative to the trigger. Default `'bottom-end'`. */
|
|
103
|
+
placement?: DropdownPlacement;
|
|
104
|
+
/** Gap in px between trigger and panel. Default `4`. */
|
|
105
|
+
offset?: number;
|
|
106
|
+
/**
|
|
107
|
+
* Props for the `⋮` trigger button — same shape as an entry, minus the click.
|
|
108
|
+
* The button's events are accepted as `on<Event>` keys (`onLoadingChange`, …).
|
|
109
|
+
*/
|
|
110
|
+
trigger?: ButtonProps & MonoEventProps<ButtonEvents> & {
|
|
111
|
+
label?: string;
|
|
112
|
+
icon?: string;
|
|
113
|
+
};
|
|
114
|
+
/** Open state. Two-way is opt-in: listen for `open` / `close`. */
|
|
115
|
+
modelValue?: boolean;
|
|
116
|
+
'model-value'?: boolean;
|
|
117
|
+
/** Disables the trigger and every entry. */
|
|
118
|
+
disabled?: boolean;
|
|
119
|
+
/** Close when a menu entry is clicked. Default `true`. */
|
|
120
|
+
closeOnSelect?: boolean;
|
|
121
|
+
'close-on-select'?: boolean;
|
|
122
|
+
closeOnOutsideClick?: boolean;
|
|
123
|
+
'close-on-outside-click'?: boolean;
|
|
124
|
+
closeOnEscape?: boolean;
|
|
125
|
+
'close-on-escape'?: boolean;
|
|
126
|
+
cssClass?: ButtonDropdownCssClass;
|
|
127
|
+
'css-class'?: ButtonDropdownCssClass | string;
|
|
128
|
+
cssClassName?: string;
|
|
129
|
+
}
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { DebounceConfig, RateLimitOption, RateLimitPhase, ThrottleConfig } from '../../composables/rate-limit';
|
|
2
|
+
export type { DebounceConfig, RateLimitPhase, ThrottleConfig };
|
|
3
|
+
export type ButtonSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
4
|
+
export type ButtonColor = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'teal' | 'purple' | 'neutral' | 'dark' | 'light';
|
|
5
|
+
/**
|
|
6
|
+
* `solid` fills with the colour, `outline` borders in it, `tonal` lays a
|
|
7
|
+
* translucent tint under coloured text, `text` is bare at rest. Each maps onto
|
|
8
|
+
* a Basecoat `.btn[data-variant]` (primary / outline / destructive / ghost).
|
|
9
|
+
* The old `gradient` variant is gone — Basecoat paints flat token colours.
|
|
10
|
+
*/
|
|
11
|
+
export type ButtonVariant = 'solid' | 'outline' | 'tonal' | 'text';
|
|
12
|
+
/**
|
|
13
|
+
* Corner radius steps.
|
|
14
|
+
*
|
|
15
|
+
* A FIXED radius per step, not one scaled by the button's size: naming a step is
|
|
16
|
+
* an instruction, so `rounded="md"` is the same corner on an `xs` button as on an
|
|
17
|
+
* `xxl` one. Leave it unset to keep the per-size radius the theme defines.
|
|
18
|
+
*
|
|
19
|
+
* `none` is a real `0` that beats that per-size radius — the one thing the old
|
|
20
|
+
* `shape="square"` could never do, since it emitted a class with no rule behind
|
|
21
|
+
* it. `full` is a pill on a wide button and a circle on a square one, which is
|
|
22
|
+
* what replaced the old `circle` / `round` / `fab` trio.
|
|
23
|
+
*/
|
|
24
|
+
export type ButtonRounded = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl' | 'full';
|
|
25
|
+
export type ButtonIconPosition = 'left' | 'right';
|
|
26
|
+
export type ButtonBadgeColor = 'red' | 'green' | 'orange' | 'cobalt';
|
|
27
|
+
/**
|
|
28
|
+
* Per-element class overrides. Each key maps to one of the rendered internal
|
|
29
|
+
* elements; the supplied class string is appended to the element's base class.
|
|
30
|
+
*/
|
|
31
|
+
export interface ButtonCssClass {
|
|
32
|
+
root?: string;
|
|
33
|
+
/** The leading affix zone (`slot="prepend"`). */
|
|
34
|
+
prepend?: string;
|
|
35
|
+
main?: string;
|
|
36
|
+
content?: string;
|
|
37
|
+
text?: string;
|
|
38
|
+
icon?: string;
|
|
39
|
+
badge?: string;
|
|
40
|
+
/** The trailing affix zone (`slot="append"`). */
|
|
41
|
+
append?: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Configuration for one affix zone — the `slot="prepend"` / `slot="append"`
|
|
45
|
+
* regions that sit BESIDE the button rather than inside it.
|
|
46
|
+
*
|
|
47
|
+
* They are siblings of the native control on purpose. A `<button>` may not
|
|
48
|
+
* contain interactive content: the HTML parser closes an open `<button>` at a
|
|
49
|
+
* nested one (so DSD/SSR and `innerHTML` would silently restructure), clicks from
|
|
50
|
+
* inside bubble into the button's own handler, and `disabled` plus
|
|
51
|
+
* `pointer-events: none` would kill the affix exactly when the button is busy.
|
|
52
|
+
* Sitting outside is what lets an affix hold a real control and be clicked
|
|
53
|
+
* without firing the button.
|
|
54
|
+
*
|
|
55
|
+
* Bind as a property (`:append.prop="{ divider: true }"`); a JSON attribute
|
|
56
|
+
* (`append='{"divider":true}'`) also works for static HTML.
|
|
57
|
+
*/
|
|
58
|
+
export interface ButtonAffixProps {
|
|
59
|
+
/**
|
|
60
|
+
* Draw a divider between this affix and the button body. Per side, so a
|
|
61
|
+
* leading icon can sit flush while a trailing caret is fenced off.
|
|
62
|
+
*/
|
|
63
|
+
divider?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Disable just this affix. Defaults to the button's own `disabled`.
|
|
66
|
+
*
|
|
67
|
+
* Deliberately NOT tied to `loading`: a busy main action with a still-live
|
|
68
|
+
* trailing menu is the useful case, and it is the one thing slotted content
|
|
69
|
+
* cannot express for itself.
|
|
70
|
+
*/
|
|
71
|
+
disabled?: boolean;
|
|
72
|
+
}
|
|
73
|
+
export interface ButtonProps {
|
|
74
|
+
/** Visual size of the button. */
|
|
75
|
+
size?: ButtonSize;
|
|
76
|
+
/** Color theme of the button. */
|
|
77
|
+
color?: ButtonColor;
|
|
78
|
+
/**
|
|
79
|
+
* Visual style variant (solid, outline, tonal, text).
|
|
80
|
+
*
|
|
81
|
+
* `text` has no background and no border at rest — just the coloured label —
|
|
82
|
+
* and takes the tonal look on hover or keyboard focus.
|
|
83
|
+
*/
|
|
84
|
+
variant?: ButtonVariant;
|
|
85
|
+
/**
|
|
86
|
+
* Corner radius — `none`, the `xs`…`xxl` scale, or `full`. Unset follows the
|
|
87
|
+
* theme's per-size radius.
|
|
88
|
+
*/
|
|
89
|
+
rounded?: ButtonRounded;
|
|
90
|
+
/** Disables interaction and dims the button. */
|
|
91
|
+
disabled?: boolean;
|
|
92
|
+
/** Shows a loading state and blocks clicks. */
|
|
93
|
+
loading?: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Explicit sizing. Each accepts a CSS length string (`"220px"`, `"80%"`) or a
|
|
96
|
+
* number (interpreted as px). Use `width="100%"` for a full-width button.
|
|
97
|
+
*/
|
|
98
|
+
width?: string | number;
|
|
99
|
+
height?: string | number;
|
|
100
|
+
minWidth?: string | number;
|
|
101
|
+
'min-width'?: string | number;
|
|
102
|
+
maxWidth?: string | number;
|
|
103
|
+
'max-width'?: string | number;
|
|
104
|
+
minHeight?: string | number;
|
|
105
|
+
'min-height'?: string | number;
|
|
106
|
+
maxHeight?: string | number;
|
|
107
|
+
'max-height'?: string | number;
|
|
108
|
+
/** Renders the button as an anchor with this URL. */
|
|
109
|
+
href?: string;
|
|
110
|
+
/** Anchor target window when href is set. */
|
|
111
|
+
target?: string;
|
|
112
|
+
/** Native button type attribute. */
|
|
113
|
+
type?: 'button' | 'submit' | 'reset';
|
|
114
|
+
/** Placement of the icon relative to the text. */
|
|
115
|
+
iconPosition?: ButtonIconPosition;
|
|
116
|
+
'icon-position'?: ButtonIconPosition;
|
|
117
|
+
iconposition?: ButtonIconPosition;
|
|
118
|
+
/**
|
|
119
|
+
* Config for the leading affix (`<span slot="prepend">`). The slot supplies the
|
|
120
|
+
* content; this only says how the zone behaves. Bind with `.prop`.
|
|
121
|
+
*
|
|
122
|
+
* NOTE: this name deliberately SHADOWS `ParentNode.prepend()` on the element.
|
|
123
|
+
* `monoButtonEl.prepend(node)` therefore stops being callable — reading it
|
|
124
|
+
* returns this config object instead of the DOM method. Nothing inside the
|
|
125
|
+
* library calls it (slot placement uses `appendChild`), but consumer code and
|
|
126
|
+
* third-party helpers that do will break on a `<mono-button>`.
|
|
127
|
+
*/
|
|
128
|
+
prepend?: ButtonAffixProps | string;
|
|
129
|
+
/**
|
|
130
|
+
* Config for the trailing affix (`<span slot="append">`). Bind with `.prop`.
|
|
131
|
+
* Shadows `ParentNode.append()` — see the note on `prepend`.
|
|
132
|
+
*/
|
|
133
|
+
append?: ButtonAffixProps | string;
|
|
134
|
+
/** Badge text shown on the button. */
|
|
135
|
+
badge?: string;
|
|
136
|
+
/** Color of the badge. */
|
|
137
|
+
badgeColor?: ButtonBadgeColor;
|
|
138
|
+
'badge-color'?: ButtonBadgeColor;
|
|
139
|
+
badgecolor?: ButtonBadgeColor;
|
|
140
|
+
/** Renders an icon-only button without text. */
|
|
141
|
+
iconOnly?: boolean;
|
|
142
|
+
'icon-only'?: boolean;
|
|
143
|
+
icononly?: boolean;
|
|
144
|
+
/** Applies a translucent glass effect. */
|
|
145
|
+
glass?: boolean;
|
|
146
|
+
/** Tooltip text shown on hover. */
|
|
147
|
+
tooltip?: string;
|
|
148
|
+
/** Accessible label text for screen readers. */
|
|
149
|
+
ariaLabelText?: string;
|
|
150
|
+
'aria-label-text'?: string;
|
|
151
|
+
arialabeltext?: string;
|
|
152
|
+
/** Per-element class overrides. */
|
|
153
|
+
cssClass?: ButtonCssClass;
|
|
154
|
+
'css-class'?: ButtonCssClass;
|
|
155
|
+
/**
|
|
156
|
+
* Rate-limit clicks: at most `limit` executions per `interval` ms, the rest
|
|
157
|
+
* queued and replayed rather than dropped. A bare number is the interval.
|
|
158
|
+
* Emits `throttle` per execution.
|
|
159
|
+
*/
|
|
160
|
+
throttle?: RateLimitOption<ThrottleConfig>;
|
|
161
|
+
/**
|
|
162
|
+
* Collapse a burst of clicks into one execution, `wait` ms after the last.
|
|
163
|
+
* A bare number is the wait. Emits `debounce` per execution.
|
|
164
|
+
*/
|
|
165
|
+
debounce?: RateLimitOption<DebounceConfig>;
|
|
166
|
+
/**
|
|
167
|
+
* The work a click performs. Bind as a property (`:handler.prop="save"`) —
|
|
168
|
+
* it's what gets throttled/debounced, and its promise drives the spinner.
|
|
169
|
+
*/
|
|
170
|
+
handler?: ButtonHandler;
|
|
171
|
+
/** Opt out of the self-driven spinner; `loading` stays fully consumer-controlled. */
|
|
172
|
+
noAutoLoading?: boolean;
|
|
173
|
+
'no-auto-loading'?: boolean;
|
|
174
|
+
noautoloading?: boolean;
|
|
175
|
+
}
|
|
176
|
+
/** A click's work. Its promise defines how long the button shows as loading. */
|
|
177
|
+
export type ButtonHandler = (event: MouseEvent) => unknown | Promise<unknown>;
|
|
178
|
+
export interface ButtonClickEventDetail {
|
|
179
|
+
originalEvent: MouseEvent;
|
|
180
|
+
/** The handler's resolved value; `undefined` on `click` (it fires first). */
|
|
181
|
+
result?: unknown;
|
|
182
|
+
/**
|
|
183
|
+
* Extend the button's loading window over your own async work — the
|
|
184
|
+
* listener-side equivalent of binding `handler`:
|
|
185
|
+
*
|
|
186
|
+
* `@click="e => e.detail.waitUntil(save())"`
|
|
187
|
+
*/
|
|
188
|
+
waitUntil(promise: Promise<unknown>): void;
|
|
189
|
+
}
|
|
190
|
+
/** Detail of `throttle` / `debounce`. Same shape, `result` populated. */
|
|
191
|
+
export type ButtonRateLimitEventDetail = ButtonClickEventDetail;
|
|
192
|
+
export interface ButtonLoadingChangeEventDetail {
|
|
193
|
+
/** Whether the button is currently self-driving a loading state. */
|
|
194
|
+
loading: boolean;
|
|
195
|
+
/** `pending` = waiting out the debounce/throttle, `running` = work in flight. */
|
|
196
|
+
phase: RateLimitPhase;
|
|
197
|
+
}
|
|
198
|
+
export type ButtonClickEvent = CustomEvent<ButtonClickEventDetail>;
|
|
199
|
+
export type ButtonRateLimitEvent = CustomEvent<ButtonRateLimitEventDetail>;
|
|
200
|
+
export type ButtonLoadingChangeEvent = CustomEvent<ButtonLoadingChangeEventDetail>;
|
|
201
|
+
export interface ButtonEvents {
|
|
202
|
+
click: ButtonClickEvent;
|
|
203
|
+
throttle: ButtonRateLimitEvent;
|
|
204
|
+
debounce: ButtonRateLimitEvent;
|
|
205
|
+
'loading-change': ButtonLoadingChangeEvent;
|
|
206
|
+
loadingChange: ButtonLoadingChangeEvent;
|
|
207
|
+
'mno-click': ButtonClickEvent;
|
|
208
|
+
mnoClick: ButtonClickEvent;
|
|
209
|
+
'mno-throttle': ButtonRateLimitEvent;
|
|
210
|
+
mnoThrottle: ButtonRateLimitEvent;
|
|
211
|
+
'mno-debounce': ButtonRateLimitEvent;
|
|
212
|
+
mnoDebounce: ButtonRateLimitEvent;
|
|
213
|
+
'mno-loading-change': ButtonLoadingChangeEvent;
|
|
214
|
+
mnoLoadingChange: ButtonLoadingChangeEvent;
|
|
215
|
+
}
|
|
216
|
+
export interface IconProps {
|
|
217
|
+
size?: number;
|
|
218
|
+
class?: string;
|
|
219
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ButtonSize, ButtonColor, ButtonVariant, ButtonRounded, ButtonBadgeColor } from './button-types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Generate badge CSS classes
|
|
4
|
+
*/
|
|
5
|
+
export declare function generateBadgeClasses(badgeColor?: ButtonBadgeColor): string;
|
|
6
|
+
/**
|
|
7
|
+
* Process SVG icon content
|
|
8
|
+
*/
|
|
9
|
+
export declare function processIconContent(icon: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* Validate button props
|
|
12
|
+
*/
|
|
13
|
+
export declare function validateButtonProps(props: {
|
|
14
|
+
size?: ButtonSize;
|
|
15
|
+
color?: ButtonColor;
|
|
16
|
+
variant?: ButtonVariant;
|
|
17
|
+
rounded?: ButtonRounded;
|
|
18
|
+
}): boolean;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference path="../../../vue.d.ts" />
|
|
2
|
+
export { MonoButtonDropdown } from './mono-button-dropdown.js';
|
|
3
|
+
export { MonoButtonDropdownCore } from './button-dropdown-core.js';
|
|
4
|
+
export type { ButtonDropdownItem, ButtonDropdownProps, ButtonDropdownEvents, ButtonDropdownCssClass, ButtonDropdownPlacement, ButtonDropdownClickEventDetail, ButtonDropdownClickEvent, ButtonDropdownOpenEvent, ButtonDropdownCloseEvent, } from './button-dropdown-types.js';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference path="../../../vue.d.ts" />
|
|
2
|
+
export { MonoButtonDropdownShadow } from './mono-button-dropdown.shadow.js';
|
|
3
|
+
export { MonoButtonDropdownCore } from './button-dropdown-core.js';
|
|
4
|
+
export type { ButtonDropdownItem, ButtonDropdownProps, ButtonDropdownEvents, ButtonDropdownCssClass, ButtonDropdownPlacement, ButtonDropdownClickEventDetail, ButtonDropdownClickEvent, ButtonDropdownOpenEvent, ButtonDropdownCloseEvent, } from './button-dropdown-types.js';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference path="../../../vue.d.ts" />
|
|
2
|
+
/**
|
|
3
|
+
* Button Component Exports
|
|
4
|
+
* Exports all button components, types, and utilities
|
|
5
|
+
*/
|
|
6
|
+
export { MonoButton } from './mono-button.js';
|
|
7
|
+
export type { ButtonSize, ButtonColor, ButtonVariant, ButtonRounded, ButtonIconPosition, ButtonBadgeColor, ButtonProps, ButtonAffixProps, ButtonEvents, IconProps, } from './button-types.js';
|
|
8
|
+
export { generateBadgeClasses, processIconContent, validateButtonProps, } from './button-utils.js';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference path="../../../vue.d.ts" />
|
|
2
|
+
export { MonoButtonShadow } from './mono-button.shadow.js';
|
|
3
|
+
export { MonoButtonCore } from './button-core.js';
|
|
4
|
+
export type { ButtonSize, ButtonColor, ButtonVariant, ButtonRounded, ButtonIconPosition, ButtonBadgeColor, ButtonProps, ButtonAffixProps, ButtonEvents, IconProps, } from './button-types.js';
|
|
5
|
+
export { generateBadgeClasses, processIconContent, validateButtonProps, } from './button-utils.js';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { LitElement, TemplateResult } from 'lit';
|
|
2
|
+
declare const MonoButtonDropdown_base: import('../../composables/hybird-prop').Constructor<import('./button-dropdown-core.js').MonoButtonDropdownCoreInterface> & typeof LitElement;
|
|
3
|
+
/**
|
|
4
|
+
* Light-DOM `mono-button-dropdown` (default build,
|
|
5
|
+
* `@mono-lit/helper/ui/button-dropdown`).
|
|
6
|
+
*
|
|
7
|
+
* Renders into the host (`createRenderRoot`→`this`, styled by the global
|
|
8
|
+
* `dist/ui/index.css`). Unlike most components here it takes no slots: the whole
|
|
9
|
+
* surface is the `buttons` array, so there is nothing to capture and none of the
|
|
10
|
+
* light-DOM slot machinery is needed.
|
|
11
|
+
*
|
|
12
|
+
* All render-mode-agnostic logic lives in `MonoButtonDropdownCore`; the shadow
|
|
13
|
+
* build shares it and only swaps the embedded button's tag.
|
|
14
|
+
*/
|
|
15
|
+
export declare class MonoButtonDropdown extends MonoButtonDropdown_base {
|
|
16
|
+
static styles: import('lit').CSSResult[];
|
|
17
|
+
protected createRenderRoot(): HTMLElement;
|
|
18
|
+
/**
|
|
19
|
+
* The panel is a STATIC element here, not something a helper returns.
|
|
20
|
+
*
|
|
21
|
+
* `PopupPortalController` moves it into a `<body>` portal on open and never
|
|
22
|
+
* moves it back. A node produced inside a `${}` expression sits in a
|
|
23
|
+
* `ChildPart` range, and ejecting it from that range breaks Lit on the next
|
|
24
|
+
* render ("this `ChildPart` has no `parentNode`"). As a fixed template node it
|
|
25
|
+
* has no range to leave — which is exactly why `mono-dropdown` is shaped this
|
|
26
|
+
* way too.
|
|
27
|
+
*/
|
|
28
|
+
protected render(): TemplateResult;
|
|
29
|
+
}
|
|
30
|
+
declare global {
|
|
31
|
+
interface HTMLElementTagNameMap {
|
|
32
|
+
'mono-button-dropdown': MonoButtonDropdown;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { LitElement, TemplateResult } from 'lit';
|
|
2
|
+
declare const MonoButtonDropdownShadow_base: import('../../composables/hybird-prop').Constructor<import('./button-dropdown-core.js').MonoButtonDropdownCoreInterface> & typeof LitElement;
|
|
3
|
+
/**
|
|
4
|
+
* Shadow-DOM `mono-button-dropdown` — `@mono-lit/helper/ui/shadow/button-dropdown`,
|
|
5
|
+
* registered as the DISTINCT tag `mono-shadow-button-dropdown` so it can coexist
|
|
6
|
+
* with the light build in one document.
|
|
7
|
+
*
|
|
8
|
+
* Shares every behaviour with the light build through `MonoButtonDropdownCore`;
|
|
9
|
+
* the only difference is `_buttonTag()`, which points the entries at
|
|
10
|
+
* `mono-shadow-button` instead of `mono-button`.
|
|
11
|
+
*
|
|
12
|
+
* The panel is NOT portaled out of the shadow root — `PopupPortalController`
|
|
13
|
+
* positions it in place for shadow builds — so it inherits these styles normally.
|
|
14
|
+
*/
|
|
15
|
+
export declare class MonoButtonDropdownShadow extends MonoButtonDropdownShadow_base {
|
|
16
|
+
static styles: import('lit').CSSResult[];
|
|
17
|
+
protected _buttonTag(): string;
|
|
18
|
+
/**
|
|
19
|
+
* Shadow buttons project through a native `<slot>` — they never relocate their
|
|
20
|
+
* children — so entry content can stay a Lit template here, which also keeps
|
|
21
|
+
* this build SSR-safe (no `document.createElement` at render time).
|
|
22
|
+
*/
|
|
23
|
+
protected _declarativeItems(): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* `buttons[].icon` is DATA-driven, so the icon element is created inside this
|
|
26
|
+
* shadow root — where the page's `i-mdi-*` utilities don't reach, leaving the
|
|
27
|
+
* entries icon-less. `withShadowUtilityStyles` can't cover it: that path
|
|
28
|
+
* deliberately excludes icon selectors so the two strategies don't collide.
|
|
29
|
+
*
|
|
30
|
+
* `adoptIconStyles` is the matching mechanism — one shared, LIVE constructable
|
|
31
|
+
* sheet that keeps repopulating until it has captured real `.i-…` glyph rules,
|
|
32
|
+
* so adopting early (before UnoCSS has loaded) still paints once it does.
|
|
33
|
+
* Called from both hooks for exactly that reason.
|
|
34
|
+
*/
|
|
35
|
+
protected firstUpdated(changed: Map<string, unknown>): void;
|
|
36
|
+
protected updated(changed: Map<string, unknown>): void;
|
|
37
|
+
/** Panel written statically for the same reason as the light build. */
|
|
38
|
+
protected render(): TemplateResult;
|
|
39
|
+
}
|
|
40
|
+
declare global {
|
|
41
|
+
interface HTMLElementTagNameMap {
|
|
42
|
+
'mono-shadow-button-dropdown': MonoButtonDropdownShadow;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
export {};
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { LitElement, TemplateResult } from 'lit';
|
|
2
|
+
declare const MonoButton_base: import('../../composables/hybird-prop').Constructor<import('./button-core.js').MonoButtonCoreInterface> & typeof LitElement;
|
|
3
|
+
/**
|
|
4
|
+
* Light-DOM `mono-button` (default build, `@mono-lit/helper/ui/button`).
|
|
5
|
+
*
|
|
6
|
+
* Renders into the host (`createRenderRoot`→`this`, styled by the global
|
|
7
|
+
* `dist/ui/index.css`) with the light-DOM slot strategy: `slot="icon"` + default
|
|
8
|
+
* text children are captured in `connectedCallback`, the template renders empty
|
|
9
|
+
* `[data-mono-slot]` targets, and the captured nodes are re-placed in `updated()`.
|
|
10
|
+
* Capture goes through `composables/light-slots`, which carries the consumer
|
|
11
|
+
* framework's positional anchors (Vue's `<!--v-if-->` comments and zero-length
|
|
12
|
+
* Fragment text nodes) instead of deleting them, and the first render is forced
|
|
13
|
+
* **synchronously** from `connectedCallback` so capture→placement is one
|
|
14
|
+
* uninterrupted step — together that's what lets buttons nest freely without
|
|
15
|
+
* crashing the consumer's next patch on a null anchor.
|
|
16
|
+
* Host sizing is applied imperatively in `updated()`. All render-mode-agnostic
|
|
17
|
+
* logic lives in `MonoButtonCore`. The shadow build (`@mono-lit/helper/ui/shadow/button`)
|
|
18
|
+
* shares the mixin but uses native `<slot>`. Both register `mono-button`, so a
|
|
19
|
+
* document loads only one.
|
|
20
|
+
*/
|
|
21
|
+
export declare class MonoButton extends MonoButton_base {
|
|
22
|
+
static styles: import('lit').CSSResult[];
|
|
23
|
+
protected createRenderRoot(): HTMLElement;
|
|
24
|
+
private _buckets;
|
|
25
|
+
private _slotsCaptured;
|
|
26
|
+
private _guardedAffixes;
|
|
27
|
+
/**
|
|
28
|
+
* Capture is one-shot, so a `slot="prepend"` child the consumer appends AFTER
|
|
29
|
+
* connect would never be seen. These re-run it when one turns up — the icon
|
|
30
|
+
* slot never needed it because an icon is written inline with the button, but
|
|
31
|
+
* an affix is exactly the kind of thing a `v-if` reveals later.
|
|
32
|
+
*/
|
|
33
|
+
private _lateAffix;
|
|
34
|
+
/**
|
|
35
|
+
* Light-DOM refinement: `rounded="full"` auto-icon-only only when the default slot is
|
|
36
|
+
* empty. `bucketHasContent` (not a length check) so a bucket holding nothing but
|
|
37
|
+
* framework anchors still counts as empty.
|
|
38
|
+
*/
|
|
39
|
+
protected _defaultIsEmpty(): boolean;
|
|
40
|
+
private _renderBadge;
|
|
41
|
+
/**
|
|
42
|
+
* The `[data-mono-slot]` targets must be **structurally stable** across every
|
|
43
|
+
* re-render.
|
|
44
|
+
*
|
|
45
|
+
* These are light-DOM elements holding nodes the *consumer's* framework
|
|
46
|
+
* created and still tracks. Toggling `loading` used to swap between two
|
|
47
|
+
* template branches, so Lit destroyed the target `<span>` — taking the
|
|
48
|
+
* consumer's nodes with it — and `updated()` re-appended them into a brand-new
|
|
49
|
+
* one. Vue's vnodes then referenced detached nodes, and the next patch died
|
|
50
|
+
* with `TypeError: can't access property "__vnode", el is null`.
|
|
51
|
+
*
|
|
52
|
+
* So visibility is expressed with the existing `.button-icon.hidden` class
|
|
53
|
+
* (`display: none !important`), never by adding or removing the target. With
|
|
54
|
+
* the span stable, `_placeSlot` finds its nodes already in place and mutates
|
|
55
|
+
* nothing at all on a loading toggle.
|
|
56
|
+
*/
|
|
57
|
+
private _renderIconOnlyContent;
|
|
58
|
+
/**
|
|
59
|
+
* Icon slot class, hidden in place while loading rather than unmounted — but
|
|
60
|
+
* only in overlay mode. Inline loading keeps the icon, so the button doesn't
|
|
61
|
+
* reshuffle its contents just to show progress.
|
|
62
|
+
*/
|
|
63
|
+
/**
|
|
64
|
+
* The icon box, which is also where the spinner is drawn.
|
|
65
|
+
*
|
|
66
|
+
* `spinning` paints the ring and hides whatever is slotted inside; `empty` collapses the box
|
|
67
|
+
* when there is neither. The span itself is ALWAYS rendered — see `_renderNormalContent`.
|
|
68
|
+
*/
|
|
69
|
+
private _iconClass;
|
|
70
|
+
private _renderNormalContent;
|
|
71
|
+
private _renderContent;
|
|
72
|
+
protected render(): TemplateResult;
|
|
73
|
+
connectedCallback(): void;
|
|
74
|
+
disconnectedCallback(): void;
|
|
75
|
+
/**
|
|
76
|
+
* Claim a `slot="prepend"` / `slot="append"` child that arrived after connect.
|
|
77
|
+
*
|
|
78
|
+
* Deliberately NOT `captureLightSlots` a second time. This build renders into
|
|
79
|
+
* the host (`createRenderRoot` → `this`), so by now the host's children include
|
|
80
|
+
* Lit's own `<div class="mono-button">` — a re-capture would bucket that as
|
|
81
|
+
* default content and detach it, wiping the rendered button. `LateSlotWatcher`
|
|
82
|
+
* hands back only the direct child carrying the slot name, which is all that is
|
|
83
|
+
* wanted here.
|
|
84
|
+
*/
|
|
85
|
+
private _recaptureAffix;
|
|
86
|
+
/**
|
|
87
|
+
* Stop a nested control's click at the affix boundary — the plain `click`
|
|
88
|
+
* and the `mno-click` / `mnoClick` aliases alike.
|
|
89
|
+
*
|
|
90
|
+
* An affix can hold a whole `<mono-button>` or a dropdown caret. Sibling
|
|
91
|
+
* placement keeps its clicks out of `_handleClick`, but they would still
|
|
92
|
+
* bubble to the HOST, where a consumer's `@click` is this button's action —
|
|
93
|
+
* a split button's caret would run the button's handler. So an affix's click
|
|
94
|
+
* ends here: its own handlers (deeper) and any document-level CAPTURE
|
|
95
|
+
* listener have already run. Same guard `mono-button-dropdown` puts on its
|
|
96
|
+
* embedded buttons.
|
|
97
|
+
*/
|
|
98
|
+
private _guardAffixEvents;
|
|
99
|
+
private _captureSlots;
|
|
100
|
+
/**
|
|
101
|
+
* An affix zone renders only when its slot has content, so an affix-free button
|
|
102
|
+
* keeps byte-identical markup. That conditional is safe here — unlike the icon
|
|
103
|
+
* span, whose target must never unmount — because capture runs BEFORE the
|
|
104
|
+
* synchronous first render in `connectedCallback`, and because the flags only
|
|
105
|
+
* ever go false→true: captured nodes stay captured, so a target that exists
|
|
106
|
+
* once is never taken away from under the consumer's nodes.
|
|
107
|
+
*/
|
|
108
|
+
private _renderAffix;
|
|
109
|
+
/**
|
|
110
|
+
* Apply sizing to the HOST (`mono-button` is inline-block). The `.sized` class
|
|
111
|
+
* makes the wrapper + inner control fill the host, so width/height set here
|
|
112
|
+
* cascade down. Props that aren't set are removed so they don't linger.
|
|
113
|
+
*/
|
|
114
|
+
private _applyHostSize;
|
|
115
|
+
protected updated(changed: Map<string, unknown>): void;
|
|
116
|
+
private _placeSlot;
|
|
117
|
+
}
|
|
118
|
+
declare global {
|
|
119
|
+
interface HTMLElementTagNameMap {
|
|
120
|
+
'mono-button': MonoButton;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { LitElement, TemplateResult } from 'lit';
|
|
2
|
+
declare const MonoButtonShadow_base: import('../../composables/hybird-prop').Constructor<import('./button-core.js').MonoButtonCoreInterface> & typeof LitElement;
|
|
3
|
+
/**
|
|
4
|
+
* Shadow-DOM `mono-button` (the opt-in SSR build, `@mono-lit/helper/ui/shadow/button`).
|
|
5
|
+
*
|
|
6
|
+
* Real shadow root + `static styles`, so `@lit-labs/ssr` serializes it to
|
|
7
|
+
* Declarative Shadow DOM and styles are scoped (`mono-button`→`:host`). Slotting
|
|
8
|
+
* uses native `<slot>`: the default text slot is always visible (DSD projects the
|
|
9
|
+
* label at parse time), and `<slot name="icon">` defaults `data-empty` (hidden)
|
|
10
|
+
* so the server and the first client render match; real icon presence is detected
|
|
11
|
+
* in `firstUpdated()` via `assignedNodes()` (+ `@slotchange` for later changes).
|
|
12
|
+
* The icon side keys off the `iconPosition` prop (not slot presence) so the DOM
|
|
13
|
+
* structure is hydration-stable. Interactivity needs the first client update to
|
|
14
|
+
* flush (so `@click` binds) — hence the defer-hydration poll. Host sizing is
|
|
15
|
+
* applied client-side in `updated()` (progressive; most buttons set none). Shares
|
|
16
|
+
* all logic with the light build via `MonoButtonCore`; both register
|
|
17
|
+
* `mono-button`, so a document loads only one.
|
|
18
|
+
*/
|
|
19
|
+
export declare class MonoButtonShadow extends MonoButtonShadow_base {
|
|
20
|
+
static styles: import('lit').CSSResult[];
|
|
21
|
+
connectedCallback(): void;
|
|
22
|
+
firstUpdated(changed: Map<string, unknown>): void;
|
|
23
|
+
protected updated(changed: Map<string, unknown>): void;
|
|
24
|
+
private _iconSlot;
|
|
25
|
+
private _slotHasContent;
|
|
26
|
+
/**
|
|
27
|
+
* An affix zone. Unlike the light build's conditional target, the wrapper is
|
|
28
|
+
* ALWAYS rendered here: the native `<slot>` has to exist for DSD to project
|
|
29
|
+
* into it and for the scan to see it, so emptiness is a `?data-empty`
|
|
30
|
+
* attribute the shadow-only CSS hides — the same shape the icon region uses.
|
|
31
|
+
*
|
|
32
|
+
* `stopPropagation` on `click` / `mno-click` keeps a nested control's own
|
|
33
|
+
* click from surfacing as this button's action (a split button's caret must
|
|
34
|
+
* not run the button's `@click`); see the light build's `_guardAffixEvents`.
|
|
35
|
+
*/
|
|
36
|
+
private _renderAffix;
|
|
37
|
+
private _affixSlot;
|
|
38
|
+
private _onAffixSlotChange;
|
|
39
|
+
private _onIconSlotChange;
|
|
40
|
+
/** Host sizing (client-only; mirrors the light build's `_applyHostSize`). */
|
|
41
|
+
private _applyHostSize;
|
|
42
|
+
private _renderBadge;
|
|
43
|
+
/**
|
|
44
|
+
* The icon box, which is also where the spinner is drawn.
|
|
45
|
+
*
|
|
46
|
+
* `spinning` paints the ring and hides the slotted icon; `data-empty` collapses the box when
|
|
47
|
+
* there is neither. Matches the light build exactly — the two used to differ here, with light
|
|
48
|
+
* keeping the span and shadow unmounting it.
|
|
49
|
+
*/
|
|
50
|
+
private _iconSpan;
|
|
51
|
+
private _renderIconOnlyContent;
|
|
52
|
+
private _renderNormalContent;
|
|
53
|
+
private _renderContent;
|
|
54
|
+
protected render(): TemplateResult;
|
|
55
|
+
}
|
|
56
|
+
export {};
|