@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,307 @@
|
|
|
1
|
+
import { MonoEventProps } from '../../composables/element-props.js';
|
|
2
|
+
import { InputEvents, InputProps } from '../input/input-types.js';
|
|
3
|
+
import { SelectEvents, SelectProps } from '../select/select-types.js';
|
|
4
|
+
import { TextareaEvents, TextareaProps } from '../textarea/textarea-types.js';
|
|
5
|
+
import { RichTextEditorEvents, RichTextEditorProps } from '../rich-text-editor/rich-text-editor-types.js';
|
|
6
|
+
import { DateEvents, DateProps } from '../date/date-types.js';
|
|
7
|
+
import { TagInputEvents, TagInputProps } from '../tag-input/tag-input-types.js';
|
|
8
|
+
import { FileUploadEvents, FileUploadProps } from '../file-upload/file-upload-types.js';
|
|
9
|
+
import { DropdownTableEvents, DropdownTableProps } from '../dropdown-table/dropdown-table-types.js';
|
|
10
|
+
import { CheckboxEvents, CheckboxProps } from '../checkbox/checkbox-types.js';
|
|
11
|
+
import { RadioEvents, RadioProps } from '../radio/radio-types.js';
|
|
12
|
+
import { SwitchEvents, SwitchProps } from '../switch/switch-types.js';
|
|
13
|
+
/**
|
|
14
|
+
* Tag name → its props, so `inputs[key].props` and `setProp()` autocomplete against the
|
|
15
|
+
* component actually being driven. Keyed by the LIGHT tag; the shadow twins
|
|
16
|
+
* (`mono-shadow-*`) share the same prop surface and are accepted at runtime.
|
|
17
|
+
*
|
|
18
|
+
* Each entry also takes the component's events as `on<Event>` keys —
|
|
19
|
+
* `onChange`, `onInput`, `onFocus`, … — which the form attaches to the element
|
|
20
|
+
* as listeners rather than writing them as props.
|
|
21
|
+
*/
|
|
22
|
+
export interface MonoFormComponentProps {
|
|
23
|
+
'mono-input': Partial<InputProps> & MonoEventProps<InputEvents>;
|
|
24
|
+
'mono-select': Partial<SelectProps> & MonoEventProps<SelectEvents>;
|
|
25
|
+
'mono-textarea': Partial<TextareaProps> & MonoEventProps<TextareaEvents>;
|
|
26
|
+
'mono-rich-text-editor': Partial<RichTextEditorProps> & MonoEventProps<RichTextEditorEvents>;
|
|
27
|
+
'mono-date': Partial<DateProps> & MonoEventProps<DateEvents>;
|
|
28
|
+
'mono-tag-input': Partial<TagInputProps> & MonoEventProps<TagInputEvents>;
|
|
29
|
+
'mono-file-upload': Partial<FileUploadProps> & MonoEventProps<FileUploadEvents>;
|
|
30
|
+
'mono-dropdown-table': Partial<DropdownTableProps> & MonoEventProps<DropdownTableEvents>;
|
|
31
|
+
'mono-checkbox': Partial<CheckboxProps> & MonoEventProps<CheckboxEvents>;
|
|
32
|
+
'mono-radio': Partial<RadioProps> & MonoEventProps<RadioEvents>;
|
|
33
|
+
'mono-switch': Partial<SwitchProps> & MonoEventProps<SwitchEvents>;
|
|
34
|
+
}
|
|
35
|
+
/** Every component `monoForm` can drive. */
|
|
36
|
+
export type MonoFormComponent = keyof MonoFormComponentProps;
|
|
37
|
+
/** Props for one component, plus any escape-hatch key the element also accepts. */
|
|
38
|
+
export type MonoFormProps<C extends MonoFormComponent = MonoFormComponent> = MonoFormComponentProps[C] & Record<string, unknown>;
|
|
39
|
+
/**
|
|
40
|
+
* When a rule runs.
|
|
41
|
+
* - `live` — on `input`, i.e. every keystroke.
|
|
42
|
+
* - `change` — on `change`, i.e. commit / blur / select.
|
|
43
|
+
*
|
|
44
|
+
* `form.validate()` runs every rule regardless of timing.
|
|
45
|
+
*/
|
|
46
|
+
export type MonoFormTiming = 'live' | 'change';
|
|
47
|
+
/** Context handed to a `type: 'custom'` rule. */
|
|
48
|
+
export interface MonoFormRuleCtx<V = unknown> {
|
|
49
|
+
value: V;
|
|
50
|
+
values: Record<string, unknown>;
|
|
51
|
+
key: string;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Anything schema-shaped — yup and friends. Duck-typed on purpose: @mono-lit/helper
|
|
55
|
+
* takes no validation dependency, so any object exposing `validateSync` (or an
|
|
56
|
+
* async `validate`) works, and the thrown error's `message` becomes the message.
|
|
57
|
+
*/
|
|
58
|
+
export interface MonoFormSchemaLike {
|
|
59
|
+
validateSync?: (value: unknown, options?: unknown) => unknown;
|
|
60
|
+
validate?: (value: unknown, options?: unknown) => unknown;
|
|
61
|
+
}
|
|
62
|
+
interface MonoFormRuleBase {
|
|
63
|
+
/** Overrides the form-level `validation.type` for this rule only. */
|
|
64
|
+
timing?: MonoFormTiming;
|
|
65
|
+
message?: string;
|
|
66
|
+
/**
|
|
67
|
+
* A schema for this rule. When present it WINS over `type`/`validate`, and its
|
|
68
|
+
* own error message wins over `message`.
|
|
69
|
+
*/
|
|
70
|
+
schema?: MonoFormSchemaLike;
|
|
71
|
+
}
|
|
72
|
+
export type MonoFormRule<V = unknown> = (MonoFormRuleBase & {
|
|
73
|
+
type: 'required';
|
|
74
|
+
}) | (MonoFormRuleBase & {
|
|
75
|
+
type: 'min';
|
|
76
|
+
value: number;
|
|
77
|
+
}) | (MonoFormRuleBase & {
|
|
78
|
+
type: 'max';
|
|
79
|
+
value: number;
|
|
80
|
+
}) | (MonoFormRuleBase & {
|
|
81
|
+
type: 'pattern';
|
|
82
|
+
value: RegExp | string;
|
|
83
|
+
}) | (MonoFormRuleBase & {
|
|
84
|
+
type: 'email';
|
|
85
|
+
}) | (MonoFormRuleBase & {
|
|
86
|
+
type: 'custom';
|
|
87
|
+
/** Return `true` to pass, or a string / `false` to fail. */
|
|
88
|
+
validate: (ctx: MonoFormRuleCtx<V>) => boolean | string;
|
|
89
|
+
})
|
|
90
|
+
/** Schema-only rule — no `type` needed. */
|
|
91
|
+
| (MonoFormRuleBase & {
|
|
92
|
+
type?: undefined;
|
|
93
|
+
schema: MonoFormSchemaLike;
|
|
94
|
+
});
|
|
95
|
+
/** The validation record exposed per field. */
|
|
96
|
+
export interface MonoFormValidation {
|
|
97
|
+
/** `true` when the field passes. */
|
|
98
|
+
success: boolean;
|
|
99
|
+
/** The failure message, or `''` when it passes. */
|
|
100
|
+
message: string;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* One row of a list control's RESOLVED options, as reported onto {@link MonoFormItem.list}.
|
|
104
|
+
*
|
|
105
|
+
* A flat sequence — group headers interleaved with their leaves, in display order — so it is
|
|
106
|
+
* rendered with ONE loop that branches on `type`. It is the shape `mono-tag-input`'s own
|
|
107
|
+
* `_groupRows()` already produces internally.
|
|
108
|
+
*
|
|
109
|
+
* ⚠ The discriminant is `type` here, while `controlMonoTable`'s `displayRows` spells the same idea
|
|
110
|
+
* `kind`. The two are deliberately not unified — do not "tidy" either to match the other.
|
|
111
|
+
*/
|
|
112
|
+
export interface MonoFormListEntry<T = Record<string, unknown>> {
|
|
113
|
+
/** `'row'` for a selectable option, `'group'` for the header above a run of them. */
|
|
114
|
+
type: 'row' | 'group';
|
|
115
|
+
/**
|
|
116
|
+
* A row's key is `item[keyValue]` — the same value `key-value` already resolves for selection, so
|
|
117
|
+
* there is only ever one notion of a key here. A group's key is its own group path.
|
|
118
|
+
*/
|
|
119
|
+
key: string;
|
|
120
|
+
/** The source row. Present on `'row'` entries only. */
|
|
121
|
+
item?: T;
|
|
122
|
+
/** The group's resolved caption. Present on `'group'` entries only. */
|
|
123
|
+
label?: string;
|
|
124
|
+
/** Nesting depth. On a ROW this is the depth of the group it sits IN, so indent by it directly. */
|
|
125
|
+
level: number;
|
|
126
|
+
/** A group's leaves — enough for a count without walking the rest of the list. */
|
|
127
|
+
items?: T[];
|
|
128
|
+
/** Whether this row is currently picked. `'row'` only. */
|
|
129
|
+
selected?: boolean;
|
|
130
|
+
/** Whether the keyboard cursor is on this row. `'row'` only. */
|
|
131
|
+
active?: boolean;
|
|
132
|
+
}
|
|
133
|
+
/** One field's live state, as read through `form.items()`. */
|
|
134
|
+
export interface MonoFormItem<V = unknown> {
|
|
135
|
+
/** The field name — the same string used as `key-form` on the control. */
|
|
136
|
+
key: string;
|
|
137
|
+
/** The value right now. */
|
|
138
|
+
currentValue: V;
|
|
139
|
+
/** The value before the most recent change. */
|
|
140
|
+
oldValue: V;
|
|
141
|
+
/** Current verdict — from the field's rules, or from `setValidation`. */
|
|
142
|
+
validate: MonoFormValidation;
|
|
143
|
+
/** Whether the field has been committed at least once (drives nothing yet; useful to consumers). */
|
|
144
|
+
touched: boolean;
|
|
145
|
+
/** The merged props currently pushed onto the element. */
|
|
146
|
+
props: Record<string, unknown>;
|
|
147
|
+
/**
|
|
148
|
+
* The control's RESOLVED options — after the search box, after the DataSource loaded, after
|
|
149
|
+
* grouping was flattened. Empty for a control that has no list.
|
|
150
|
+
*
|
|
151
|
+
* This is what `slot="list"` is looped over: the raw `items` / `dataSource` you passed in would
|
|
152
|
+
* ignore the search box and desync from what is on screen, which is the whole reason the control
|
|
153
|
+
* reports this back up rather than the consumer reusing its own array.
|
|
154
|
+
*/
|
|
155
|
+
list: MonoFormListEntry[];
|
|
156
|
+
}
|
|
157
|
+
/** A ref-like external input (a Vue `ref` satisfies this). */
|
|
158
|
+
export interface MonoFormRefLike<T = unknown> {
|
|
159
|
+
value: T;
|
|
160
|
+
}
|
|
161
|
+
/** Argument to `setProp` — `component` narrows `props`. */
|
|
162
|
+
export type MonoFormSetProp<C extends MonoFormComponent = MonoFormComponent> = {
|
|
163
|
+
component?: C;
|
|
164
|
+
key: string;
|
|
165
|
+
props: MonoFormProps<C>;
|
|
166
|
+
};
|
|
167
|
+
/** Argument to `setValidation`. */
|
|
168
|
+
export interface MonoFormSetValidation {
|
|
169
|
+
component?: MonoFormComponent;
|
|
170
|
+
key: string;
|
|
171
|
+
validation: Partial<MonoFormValidation>;
|
|
172
|
+
}
|
|
173
|
+
/** Context handed to a field watcher. */
|
|
174
|
+
export interface MonoFormWatcherCtx {
|
|
175
|
+
/** The field this watcher belongs to. */
|
|
176
|
+
selfKey: string;
|
|
177
|
+
/** The field that actually changed (equals `selfKey` for a self change). */
|
|
178
|
+
peerKey: string;
|
|
179
|
+
/** Value of `selfKey`. */
|
|
180
|
+
currentValue: unknown;
|
|
181
|
+
oldValue: unknown;
|
|
182
|
+
/** Value of `peerKey` — the field that changed. */
|
|
183
|
+
peerCurrentValue: unknown;
|
|
184
|
+
peerOldValue: unknown;
|
|
185
|
+
/**
|
|
186
|
+
* The DOM `CustomEvent` (`mno-input` / `mno-change` — same payload as the plain
|
|
187
|
+
* `input` / `change`) that last touched
|
|
188
|
+
* `selfKey`. `undefined` when this field hasn't been edited by hand yet, or
|
|
189
|
+
* when its value was written programmatically via `setValue` / `setValues`.
|
|
190
|
+
*/
|
|
191
|
+
event?: Event;
|
|
192
|
+
/**
|
|
193
|
+
* The DOM `CustomEvent` that caused THIS run — the one that changed `peerKey`.
|
|
194
|
+
* Same object as `event` on a self change. `undefined` for a programmatic write.
|
|
195
|
+
*/
|
|
196
|
+
peerEvent?: Event;
|
|
197
|
+
/** Every field's current value. */
|
|
198
|
+
values: Record<string, unknown>;
|
|
199
|
+
/** Unwrapped `external` refs. */
|
|
200
|
+
external: Record<string, unknown>;
|
|
201
|
+
/**
|
|
202
|
+
* Push props onto any field's control. NOTE: a static `inputs[key].props`
|
|
203
|
+
* declares the same thing and ALWAYS wins over this one.
|
|
204
|
+
*/
|
|
205
|
+
setProp: <C extends MonoFormComponent = MonoFormComponent>(arg: MonoFormSetProp<C>) => void;
|
|
206
|
+
/** Mark any field valid/invalid — the message renders on that control. */
|
|
207
|
+
setValidation: (arg: MonoFormSetValidation) => void;
|
|
208
|
+
/** Set another field's value (runs its rules + fans out again). */
|
|
209
|
+
setValue: (key: string, value: unknown) => void;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* One field's declaration, for ONE component. Consumers use {@link MonoFormInput},
|
|
213
|
+
* which distributes this over the components it is given.
|
|
214
|
+
*/
|
|
215
|
+
export interface MonoFormInputOf<C extends MonoFormComponent = MonoFormComponent, V = unknown> {
|
|
216
|
+
/** Narrows the TS type of `props`. Optional — omit for a loose record. */
|
|
217
|
+
component?: C;
|
|
218
|
+
/**
|
|
219
|
+
* Static props for this field's control that ALWAYS win — over the
|
|
220
|
+
* `setProp()` method and over template bindings. Same name and role as
|
|
221
|
+
* `monoDataGrid({ props })`.
|
|
222
|
+
*/
|
|
223
|
+
props?: MonoFormProps<C>;
|
|
224
|
+
/** Initial value for the field. */
|
|
225
|
+
value?: V;
|
|
226
|
+
/**
|
|
227
|
+
* Rules for this field, checked in order — the FIRST failure is reported,
|
|
228
|
+
* since a control renders one message. Each entry is a built-in `type`, a
|
|
229
|
+
* `type: 'custom'` function, or a `schema` (which wins over both).
|
|
230
|
+
*/
|
|
231
|
+
validates?: MonoFormRule<V>[];
|
|
232
|
+
/**
|
|
233
|
+
* Runs when THIS field changes (`peerKey === selfKey`) and whenever any OTHER
|
|
234
|
+
* field changes (`peerKey` = that field) — which is what lets one field react
|
|
235
|
+
* to another without a separate peer-watcher registry.
|
|
236
|
+
*/
|
|
237
|
+
watcher?: (ctx: MonoFormWatcherCtx) => void;
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* One field's declaration — {@link MonoFormInputOf} DISTRIBUTED over `C`, so
|
|
241
|
+
* `component: 'mono-input'` discriminates the declaration and `props` narrows to
|
|
242
|
+
* that component's props, with its `on<Event>` handlers typed
|
|
243
|
+
* (`onChange: (e) => e.detail.modelValue`). Written as one interface over the
|
|
244
|
+
* union, `props` was the union of every component's props and a handler's
|
|
245
|
+
* `event` fell back to `any`. A declaration without `component` still matches
|
|
246
|
+
* (every member's `component` is optional) and keeps the loose union.
|
|
247
|
+
*/
|
|
248
|
+
export type MonoFormInput<C extends MonoFormComponent = MonoFormComponent, V = unknown> = {
|
|
249
|
+
[K in C]: MonoFormInputOf<K, V>;
|
|
250
|
+
}[C];
|
|
251
|
+
export interface MonoFormOptions {
|
|
252
|
+
/** Default rule timing for the whole form. Defaults to `'change'`. */
|
|
253
|
+
validation?: {
|
|
254
|
+
type?: MonoFormTiming;
|
|
255
|
+
};
|
|
256
|
+
inputs: Record<string, MonoFormInput>;
|
|
257
|
+
/** Ref-like values readable from watchers as `external.<name>`. */
|
|
258
|
+
external?: Record<string, MonoFormRefLike | unknown>;
|
|
259
|
+
/**
|
|
260
|
+
* A ref the form writes a fresh snapshot into on every change, so a Vue
|
|
261
|
+
* template can read `state.Name.validate.message` and re-render without any
|
|
262
|
+
* manual subscription.
|
|
263
|
+
*/
|
|
264
|
+
state?: MonoFormRefLike<Record<string, MonoFormItem> | undefined>;
|
|
265
|
+
}
|
|
266
|
+
/** The controller returned by {@link monoForm}. */
|
|
267
|
+
export interface MonoFormController {
|
|
268
|
+
/** Live state for every field (stable object, mutated in place). */
|
|
269
|
+
items(): Record<string, MonoFormItem>;
|
|
270
|
+
/** Just the values, `{ Name: 'Denis', Age: 18 }`. */
|
|
271
|
+
values(): Record<string, unknown>;
|
|
272
|
+
setValue(key: string, value: unknown): void;
|
|
273
|
+
/** Bulk-set values, e.g. seeding an edit form from a fetched record. */
|
|
274
|
+
setValues(values: Record<string, unknown>): void;
|
|
275
|
+
/** Run EVERY rule on every field regardless of timing. Resolves to overall validity. */
|
|
276
|
+
validate(): Promise<boolean>;
|
|
277
|
+
/** Whether every field currently passes. */
|
|
278
|
+
isValid(): boolean;
|
|
279
|
+
/** Clear values + validation back to the declared defaults. */
|
|
280
|
+
reset(): void;
|
|
281
|
+
/** Push props onto a field's control. `inputs[key].props` still wins over this. */
|
|
282
|
+
setProp<C extends MonoFormComponent = MonoFormComponent>(arg: MonoFormSetProp<C>): void;
|
|
283
|
+
/** Mark any field valid/invalid, e.g. from a server response. */
|
|
284
|
+
setValidation(arg: MonoFormSetValidation): void;
|
|
285
|
+
/** Re-read `external` refs and re-run watchers. */
|
|
286
|
+
refresh(): void;
|
|
287
|
+
/** Write snapshots into `ref` on every change (same as the `state` option). */
|
|
288
|
+
bindRef(ref: MonoFormRefLike<Record<string, MonoFormItem> | undefined>): () => void;
|
|
289
|
+
subscribe(cb: () => void): () => void;
|
|
290
|
+
dispose(): void;
|
|
291
|
+
/** @internal Register an element under `key`; returns an unregister handle. */
|
|
292
|
+
_register(key: string, el: unknown): () => void;
|
|
293
|
+
/**
|
|
294
|
+
* @internal Element reported a value change. `timing` picks which rules run;
|
|
295
|
+
* `event` is the originating `mno-input`/`mno-change` CustomEvent, surfaced to
|
|
296
|
+
* watchers as `event` / `peerEvent`.
|
|
297
|
+
*/
|
|
298
|
+
_report(key: string, value: unknown, timing: MonoFormTiming, event?: Event): void;
|
|
299
|
+
/**
|
|
300
|
+
* @internal A list control publishing its resolved options, so `form.items()[key].list` can be
|
|
301
|
+
* looped from a `slot="list"`. Reference-compared, so a control may call it on every render.
|
|
302
|
+
*/
|
|
303
|
+
_reportList(key: string, entries: MonoFormListEntry[]): void;
|
|
304
|
+
/** @internal The props an element should currently apply (`inputs[key].props` wins). */
|
|
305
|
+
_propsFor(key: string): Record<string, unknown>;
|
|
306
|
+
}
|
|
307
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference path="../../../vue.d.ts" />
|
|
2
|
+
export { monoForm, controlMonoForm } from './mono-form-controller.js';
|
|
3
|
+
export { MonoFormControlCore } from './form-control-core.js';
|
|
4
|
+
export type { MonoFormControlCoreInterface } from './form-control-core.js';
|
|
5
|
+
export { runRule, runRules, isBlank } from './form-rules.js';
|
|
6
|
+
export type { MonoFormOptions, MonoFormController, MonoFormInput, MonoFormInputOf, MonoFormItem, MonoFormRule, MonoFormRuleCtx, MonoFormSchemaLike, MonoFormTiming, MonoFormValidation, MonoFormWatcherCtx, MonoFormComponent, MonoFormComponentProps, MonoFormProps, MonoFormSetProp, MonoFormSetValidation, MonoFormRefLike, } from './form-types.js';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { MonoFormController, MonoFormOptions } from './form-types.js';
|
|
2
|
+
/**
|
|
3
|
+
* `monoForm()` — a headless form controller.
|
|
4
|
+
*
|
|
5
|
+
* The consumer authors the markup by hand and opts each control in with
|
|
6
|
+
* `:data-form="form"` + `key-form="Name"`. The controller owns the value,
|
|
7
|
+
* validation, cross-field reactions and the props pushed onto each element;
|
|
8
|
+
* nothing here touches the DOM, so it is SSR-safe and testable on its own.
|
|
9
|
+
*
|
|
10
|
+
* Mirrors `monoDataGrid`'s controller shape: a plain object with coalesced
|
|
11
|
+
* `subscribe`/`notify`, state mutated in place, and elements re-rendering off
|
|
12
|
+
* the subscription.
|
|
13
|
+
*/
|
|
14
|
+
/** Renamed "control" alias of {@link monoForm} (no breaking change — both work). */
|
|
15
|
+
export { monoForm as controlMonoForm };
|
|
16
|
+
export declare function monoForm(options: MonoFormOptions): MonoFormController;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference path="../../../vue.d.ts" />
|
|
2
|
+
export { MonoInput } from './mono-input.js';
|
|
3
|
+
export type { InputType, InputSize, InputVariant, InputColor, InputProps, InputEvents, } from './input-types.js';
|
|
4
|
+
export { applyFormat, caretAfterFormat, localeSeparators, normaliseValue, parseFormat, resolveFormat, significantFor, stripFormat, } from './input-format.js';
|
|
5
|
+
export type { InputFormat, InputFormatCtx, InputFormatDescriptor, InputFormatOn, } from './input-format.js';
|
|
6
|
+
export { validateInputProps, generateInputAttributes, generateInputAriaAttributes, getInputIcon, } from './input-utils.js';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference path="../../../vue.d.ts" />
|
|
2
|
+
export { MonoInputShadow } from './mono-input.shadow.js';
|
|
3
|
+
export { MonoInputCore } from './input-core.js';
|
|
4
|
+
export type { InputSlotName } from './input-core.js';
|
|
5
|
+
export type { InputType, InputSize, InputVariant, InputColor, InputProps, InputEvents, } from './input-types.js';
|
|
6
|
+
export { applyFormat, caretAfterFormat, localeSeparators, normaliseValue, parseFormat, resolveFormat, significantFor, stripFormat, } from './input-format.js';
|
|
7
|
+
export type { InputFormat, InputFormatCtx, InputFormatDescriptor, InputFormatOn, } from './input-format.js';
|
|
8
|
+
export { validateInputProps, generateInputAttributes, generateInputAriaAttributes, getInputIcon, } from './input-utils.js';
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { LitElement, nothing, TemplateResult } from 'lit';
|
|
2
|
+
import { InputType, InputSize, InputColor, InputVariant, InputValidationState, InputCssClass } from './input-types.js';
|
|
3
|
+
import { InputFormat, InputFormatOn } from './input-format.js';
|
|
4
|
+
import { Constructor } from '../../composables/hybird-prop';
|
|
5
|
+
import { buildSizeStyle, CssSizeValue } from '../../composables/css-size';
|
|
6
|
+
export declare const numberStringConverter: {
|
|
7
|
+
fromAttribute(value: string | null): number | undefined;
|
|
8
|
+
toAttribute(value: number | undefined): string | null;
|
|
9
|
+
};
|
|
10
|
+
export type InputSlotName = 'prefix' | 'suffix' | 'label' | 'helper';
|
|
11
|
+
/** Public surface added by the core mixin (for typing the wrappers + tag map). */
|
|
12
|
+
export declare class MonoInputCoreInterface {
|
|
13
|
+
cssClass: InputCssClass;
|
|
14
|
+
cssClassName: string;
|
|
15
|
+
type: InputType;
|
|
16
|
+
size: InputSize;
|
|
17
|
+
color: InputColor;
|
|
18
|
+
variant: InputVariant;
|
|
19
|
+
modelValue: string;
|
|
20
|
+
formatDisplay?: InputFormat;
|
|
21
|
+
formatValue?: InputFormat;
|
|
22
|
+
formatOn: InputFormatOn;
|
|
23
|
+
formatLocale?: string;
|
|
24
|
+
value: string;
|
|
25
|
+
name: string;
|
|
26
|
+
placeholder: string;
|
|
27
|
+
label: string;
|
|
28
|
+
helperText: string;
|
|
29
|
+
validationState: InputValidationState;
|
|
30
|
+
validationMessage: string;
|
|
31
|
+
error: boolean;
|
|
32
|
+
errorMessage: string;
|
|
33
|
+
success: boolean;
|
|
34
|
+
successMessage: string;
|
|
35
|
+
pattern: string;
|
|
36
|
+
autocomplete: string;
|
|
37
|
+
inputmode: string;
|
|
38
|
+
ariaLabelText?: string;
|
|
39
|
+
minLength?: number;
|
|
40
|
+
maxLength?: number;
|
|
41
|
+
min?: number;
|
|
42
|
+
max?: number;
|
|
43
|
+
step?: number;
|
|
44
|
+
disabled: boolean;
|
|
45
|
+
readonly: boolean;
|
|
46
|
+
required: boolean;
|
|
47
|
+
clearable: boolean;
|
|
48
|
+
autofocus: boolean;
|
|
49
|
+
width?: CssSizeValue;
|
|
50
|
+
height?: CssSizeValue;
|
|
51
|
+
minWidth?: CssSizeValue;
|
|
52
|
+
maxWidth?: CssSizeValue;
|
|
53
|
+
minHeight?: CssSizeValue;
|
|
54
|
+
maxHeight?: CssSizeValue;
|
|
55
|
+
focus(): void;
|
|
56
|
+
blur(): void;
|
|
57
|
+
select(): void;
|
|
58
|
+
protected _hasPrefixSlotState: boolean;
|
|
59
|
+
protected _hasSuffixSlotState: boolean;
|
|
60
|
+
protected _hasLabelSlotState: boolean;
|
|
61
|
+
protected _hasHelperSlotState: boolean;
|
|
62
|
+
protected readonly _hasPrefixSlot: boolean;
|
|
63
|
+
protected readonly _hasSuffixSlot: boolean;
|
|
64
|
+
protected readonly _hasLabelSlot: boolean;
|
|
65
|
+
protected readonly _hasHelperSlot: boolean;
|
|
66
|
+
protected readonly _inputId: string;
|
|
67
|
+
protected readonly _messageId: string;
|
|
68
|
+
protected readonly _resolvedValidationState: InputValidationState;
|
|
69
|
+
protected readonly _wrapperClasses: string;
|
|
70
|
+
protected readonly _fieldClasses: string;
|
|
71
|
+
protected _cls(base: string, key: keyof InputCssClass): string;
|
|
72
|
+
protected _sizeStyle(): ReturnType<typeof buildSizeStyle>;
|
|
73
|
+
protected _renderWrapper(inner: TemplateResult): TemplateResult;
|
|
74
|
+
protected _renderNative(): TemplateResult;
|
|
75
|
+
protected _renderClear(): TemplateResult | typeof nothing;
|
|
76
|
+
protected renderIcon(name: 'close'): TemplateResult;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* `MonoInputCore` — all render-mode-agnostic logic for `mono-input`: reactive
|
|
80
|
+
* props, hybrid prop aliases (camelCase ↔ kebab ↔ lowercase), attribute
|
|
81
|
+
* observation, value/model two-way sync, events, validation/class computation,
|
|
82
|
+
* sizing, and imperative focus/blur/select.
|
|
83
|
+
*
|
|
84
|
+
* It deliberately leaves out:
|
|
85
|
+
* - `createRenderRoot()` (light vs shadow) — set by each wrapper.
|
|
86
|
+
* - the slot strategy + `render()` — light uses a capture/`data-mono-slot`
|
|
87
|
+
* hack; shadow uses native `<slot>` with slotchange-driven presence. The
|
|
88
|
+
* shared `_hasXxxSlotState` `@state` fields back both strategies and feed the
|
|
89
|
+
* class getters.
|
|
90
|
+
*/
|
|
91
|
+
export declare const MonoInputCore: <T extends Constructor<LitElement>>(superClass: T) => Constructor<MonoInputCoreInterface> & T;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `<mono-input>` value formatting — the pattern dialect, and the caret maths that make it usable
|
|
3
|
+
* while typing.
|
|
4
|
+
*
|
|
5
|
+
* Everything here is PURE and DOM-free on purpose: live formatting is easy to get subtly wrong
|
|
6
|
+
* (trailing separators, a caret that jumps to the end, a value that stops parsing), and those are
|
|
7
|
+
* only cheap to test when they are plain functions.
|
|
8
|
+
*
|
|
9
|
+
* ── Two dialects, chosen by content ──
|
|
10
|
+
*
|
|
11
|
+
* A pattern containing `{}` is a TEMPLATE — the typed text goes in the hole and everything else is
|
|
12
|
+
* literal (`"{}@gmail.com"`). Anything else is a NUMBER pattern in the Excel / DevExtreme surface
|
|
13
|
+
* syntax the rest of this codebase already speaks (`#,##0.##`):
|
|
14
|
+
*
|
|
15
|
+
* `#` an optional digit
|
|
16
|
+
* `0` a required digit (pads with zeros)
|
|
17
|
+
* `,` turn on grouping
|
|
18
|
+
* `.` the decimal point
|
|
19
|
+
* `"…"` a literal prefix or suffix (`"Rp"#,##0`)
|
|
20
|
+
*
|
|
21
|
+
* The pattern describes a SHAPE — grouping on, up to two decimals — and the LOCALE decides which
|
|
22
|
+
* characters that shape is drawn with, so `#,##0.##` prints `10,000.25` under `en-US` and
|
|
23
|
+
* `10.000,25` under `id-ID`. Nothing here hand-rolls a separator.
|
|
24
|
+
*
|
|
25
|
+
* ── Why this does not use `parseNumber` from `src/import/coerce.ts` ──
|
|
26
|
+
*
|
|
27
|
+
* That parser exists to read numbers whose locale is UNKNOWN, so it infers the separators from the
|
|
28
|
+
* text — and its rule ("a single `.` with exactly three trailing digits is grouping") is a good
|
|
29
|
+
* guess but still a guess: `1.234` is 1234 while `1.23` is 1.23. Here the locale is declared, so
|
|
30
|
+
* the separators can be derived from `Intl` and the strip is exact rather than inferred. Guessing
|
|
31
|
+
* would be strictly worse when the answer is already known.
|
|
32
|
+
*/
|
|
33
|
+
/** When the display reformats. */
|
|
34
|
+
export type InputFormatOn = 'input' | 'blur';
|
|
35
|
+
/** What a format FUNCTION receives. */
|
|
36
|
+
export interface InputFormatCtx {
|
|
37
|
+
/** The typed text with any formatting removed — the raw value. */
|
|
38
|
+
value: string;
|
|
39
|
+
/** The input's `type`, so one function can serve several fields. */
|
|
40
|
+
type: string;
|
|
41
|
+
/** The resolved locale, when one was given. */
|
|
42
|
+
locale?: string;
|
|
43
|
+
}
|
|
44
|
+
/** A pattern string, or a function that returns the finished text. */
|
|
45
|
+
export type InputFormat = string | ((ctx: InputFormatCtx) => string);
|
|
46
|
+
/** A parsed pattern. */
|
|
47
|
+
export type InputFormatDescriptor = {
|
|
48
|
+
kind: 'number';
|
|
49
|
+
grouping: boolean;
|
|
50
|
+
minFraction: number;
|
|
51
|
+
maxFraction: number;
|
|
52
|
+
prefix: string;
|
|
53
|
+
suffix: string;
|
|
54
|
+
} | {
|
|
55
|
+
kind: 'template';
|
|
56
|
+
before: string;
|
|
57
|
+
after: string;
|
|
58
|
+
};
|
|
59
|
+
/** The characters a locale draws a grouped decimal number with. */
|
|
60
|
+
export interface LocaleSeparators {
|
|
61
|
+
group: string;
|
|
62
|
+
decimal: string;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Ask `Intl` which characters this locale uses, rather than assuming `,` and `.`.
|
|
66
|
+
*
|
|
67
|
+
* Several locales use neither — `fr-FR` groups with a narrow no-break space, `de-CH` with an
|
|
68
|
+
* apostrophe — and a hardcoded pair would silently mangle them.
|
|
69
|
+
*/
|
|
70
|
+
export declare function localeSeparators(locale?: string): LocaleSeparators;
|
|
71
|
+
/**
|
|
72
|
+
* Parse a pattern string into a descriptor, or `null` when it is not a pattern we understand.
|
|
73
|
+
*
|
|
74
|
+
* `null` is deliberately not an error: an unparseable pattern leaves the field an ordinary
|
|
75
|
+
* unformatted input rather than blanking it or throwing mid-keystroke.
|
|
76
|
+
*/
|
|
77
|
+
export declare function parseFormat(pattern: string): InputFormatDescriptor | null;
|
|
78
|
+
export declare function stripFormat(text: string, descriptor: InputFormatDescriptor | null, locale?: string): string;
|
|
79
|
+
/**
|
|
80
|
+
* Render a raw value for DISPLAY.
|
|
81
|
+
*
|
|
82
|
+
* The number branch deliberately does NOT hand the whole string to `Intl`: a value being typed is
|
|
83
|
+
* usually not yet a finished number, and `Intl` would tidy away exactly the characters the user is
|
|
84
|
+
* in the middle of writing — a trailing decimal point (`10000.`) and trailing fraction zeros
|
|
85
|
+
* (`10.50`) both vanish, which makes the field fight the person using it. Only the INTEGER part is
|
|
86
|
+
* grouped; the fraction is carried through verbatim, clamped to the pattern's ceiling.
|
|
87
|
+
*/
|
|
88
|
+
export declare function applyFormat(raw: string, descriptor: InputFormatDescriptor | null, locale?: string, opts?: {
|
|
89
|
+
pad?: boolean;
|
|
90
|
+
}): string;
|
|
91
|
+
/**
|
|
92
|
+
* Normalise a raw value for the VALUE side.
|
|
93
|
+
*
|
|
94
|
+
* A number pattern yields a canonical numeric string (`"10000000.25"`) rather than the formatted
|
|
95
|
+
* text, so `Number(v)` works and a store that does arithmetic on it does not have to know a format
|
|
96
|
+
* was ever involved. A template yields the assembled string, because there the decoration IS the
|
|
97
|
+
* value — an email is not an email without its domain.
|
|
98
|
+
*/
|
|
99
|
+
export declare function normaliseValue(raw: string, descriptor: InputFormatDescriptor | null): string;
|
|
100
|
+
/**
|
|
101
|
+
* Where the caret belongs after the text was reformatted.
|
|
102
|
+
*
|
|
103
|
+
* Reformatting rewrites the whole field, and the browser then parks the caret at the end — so
|
|
104
|
+
* inserting a digit in the middle of a number would throw you to the end on every keystroke. The
|
|
105
|
+
* fix is to count in SIGNIFICANT characters (the ones the user actually typed) rather than in
|
|
106
|
+
* string offsets: count how many sit left of the caret before, then walk the new text until the
|
|
107
|
+
* same number have gone by.
|
|
108
|
+
*/
|
|
109
|
+
export declare function caretAfterFormat(next: string, caretInPrev: number, prev: string, isSignificant: (ch: string) => boolean): number;
|
|
110
|
+
/**
|
|
111
|
+
* Which characters count as "typed" for caret purposes — everything the format did NOT insert.
|
|
112
|
+
*/
|
|
113
|
+
export declare function significantFor(descriptor: InputFormatDescriptor | null, locale?: string): (ch: string) => boolean;
|
|
114
|
+
/** Resolve either form of a format prop to its finished text. */
|
|
115
|
+
export declare function resolveFormat(format: InputFormat | undefined, raw: string, ctx: {
|
|
116
|
+
type: string;
|
|
117
|
+
locale?: string;
|
|
118
|
+
}, mode: 'display' | 'value'): string | null;
|