@mono-lit/helper 0.0.0-stage → 0.0.2
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 +35 -3
- 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-source-controller-B_rgHCjw.js +241 -0
- package/dist/data-source-controller-Dbb4fd8I.js +241 -0
- package/dist/data-source-options-CP-X62Pa.js +535 -0
- package/dist/data-source-options-Jqj7LU3Z.js +537 -0
- package/dist/data-source-read-B4DGp6UQ.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-BiGVyxt6.js +2302 -0
- package/dist/export.d.ts +1 -0
- package/dist/export.js +2302 -0
- package/dist/field-icons-DELrSdqJ.js +86 -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-BIqEGehH.js +396 -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-simcTQdW.js +873 -0
- package/dist/mono-button.shadow-B_rKOY9N.js +784 -0
- package/dist/mono-data-chart-CEv29_NS.js +779 -0
- package/dist/mono-data-dropdown-Wnoke6zO.js +357 -0
- package/dist/mono-data-grid-CjkEqxgE.js +3913 -0
- package/dist/mono-data-grid-YjR3n9Ar.js +3915 -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/normalize-error-Gcgmgh5i.js +871 -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-D3EERqgO.js +47 -0
- package/dist/reactive-Di3mTMnV.js +1087 -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 +75 -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 +356 -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 +284 -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 +420 -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 +113 -0
- package/dist/src/composables/element-props.d.ts +46 -0
- package/dist/src/composables/field-icons.d.ts +15 -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 +90 -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-DQqNpqk2.js +795 -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 +524 -0
- package/dist/ui/chart.d.ts +1 -0
- package/dist/ui/chart.js +885 -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 +21989 -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 +996 -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 +2200 -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 +538 -0
- package/dist/ui/shadow/chart.js +1685 -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 +1194 -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 +2167 -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 +2974 -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 +2947 -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,819 @@
|
|
|
1
|
+
import { l as monoHostChildNodes } from "../mono-ui-CPV7rrdo.js";
|
|
2
|
+
import { t as customElement } from "../mono-element-B0kP_96P.js";
|
|
3
|
+
import { a as defineHybridPropAliases, r as booleanStringConverter, t as __decorate } from "../decorate-DEXtNagw.js";
|
|
4
|
+
import { t as dispatchMonoEvent } from "../mono-event-Bi1qP9uN.js";
|
|
5
|
+
import { s as placeSlotNode } from "../light-slots-DW1WgfgT.js";
|
|
6
|
+
import { t as buildSizeStyle } from "../css-size-DhHSVZJK.js";
|
|
7
|
+
import { t as MonoFormControlCore } from "../form-control-core-eeRr0zLU.js";
|
|
8
|
+
import { LitElement, html, isServer, nothing, unsafeCSS } from "lit";
|
|
9
|
+
import { property, query, state } from "lit/decorators.js";
|
|
10
|
+
import { ifDefined } from "lit/directives/if-defined.js";
|
|
11
|
+
import { styleMap } from "lit/directives/style-map.js";
|
|
12
|
+
//#region src/components/textarea/textarea-core.ts
|
|
13
|
+
var numberStringConverter = {
|
|
14
|
+
fromAttribute(value) {
|
|
15
|
+
if (value === null || value === "") return void 0;
|
|
16
|
+
const parsed = Number(value);
|
|
17
|
+
return Number.isFinite(parsed) ? parsed : void 0;
|
|
18
|
+
},
|
|
19
|
+
toAttribute(value) {
|
|
20
|
+
if (value === void 0 || value === null) return null;
|
|
21
|
+
return String(value);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* `MonoTextareaCore` — render-mode-agnostic logic for `mono-textarea` (props,
|
|
26
|
+
* hybrid aliases, value/model sync, validation, char counter, auto-resize, and
|
|
27
|
+
* the full `render()`). SSR-safe: the only DOM/`window` access (`_syncAutoResize`)
|
|
28
|
+
* is `isServer`-guarded. Each build supplies `createRenderRoot()` + `static styles`
|
|
29
|
+
* and the slot strategy via the `_slotOutlet` hook (light: `data-mono-slot`
|
|
30
|
+
* placeholders; shadow: native `<slot>`). Mirrors `switch-core`/`select-core`.
|
|
31
|
+
*/
|
|
32
|
+
var MonoTextareaCore = (superClass) => {
|
|
33
|
+
class MonoTextareaCoreClass extends MonoFormControlCore(superClass) {
|
|
34
|
+
constructor(...args) {
|
|
35
|
+
super(...args);
|
|
36
|
+
this.size = "md";
|
|
37
|
+
this.color = "primary";
|
|
38
|
+
this.variant = "outlined";
|
|
39
|
+
this.modelValue = "";
|
|
40
|
+
this.value = "";
|
|
41
|
+
this.name = "";
|
|
42
|
+
this.placeholder = "";
|
|
43
|
+
this.label = "";
|
|
44
|
+
this.helperText = "";
|
|
45
|
+
this.validationState = "default";
|
|
46
|
+
this.validationMessage = "";
|
|
47
|
+
this.errorMessage = "";
|
|
48
|
+
this.successMessage = "";
|
|
49
|
+
this.disabled = false;
|
|
50
|
+
this.readonly = false;
|
|
51
|
+
this.required = false;
|
|
52
|
+
this.autofocus = false;
|
|
53
|
+
this.autoResize = false;
|
|
54
|
+
this.showCounter = false;
|
|
55
|
+
this.cssClass = {};
|
|
56
|
+
this.cssClassName = "";
|
|
57
|
+
this._hasLabelSlotState = false;
|
|
58
|
+
this._hasHelperSlotState = false;
|
|
59
|
+
this._textareaId = `mono-textarea-${Math.random().toString(36).slice(2)}`;
|
|
60
|
+
this._messageId = `${this._textareaId}-message`;
|
|
61
|
+
this._lastAutoResizeWidth = -1;
|
|
62
|
+
defineHybridPropAliases(this, [
|
|
63
|
+
"modelValue",
|
|
64
|
+
"helperText",
|
|
65
|
+
"validationState",
|
|
66
|
+
"validationMessage",
|
|
67
|
+
"errorMessage",
|
|
68
|
+
"successMessage",
|
|
69
|
+
"autoResize",
|
|
70
|
+
"minRows",
|
|
71
|
+
"maxRows",
|
|
72
|
+
"minLength",
|
|
73
|
+
"maxLength",
|
|
74
|
+
"showCounter",
|
|
75
|
+
"ariaLabelText",
|
|
76
|
+
"cssClass",
|
|
77
|
+
"minWidth",
|
|
78
|
+
"maxWidth",
|
|
79
|
+
"minHeight",
|
|
80
|
+
"maxHeight"
|
|
81
|
+
]);
|
|
82
|
+
/**
|
|
83
|
+
* Vue support:
|
|
84
|
+
*
|
|
85
|
+
* <mono-textarea :cssClass="{}" />
|
|
86
|
+
* <mono-textarea :css-class="{}" />
|
|
87
|
+
* <mono-textarea :cssclass="{}" />
|
|
88
|
+
*/
|
|
89
|
+
Object.defineProperty(this, "css-class", {
|
|
90
|
+
get: () => this.cssClass,
|
|
91
|
+
set: (value) => {
|
|
92
|
+
this._setCssClass(value);
|
|
93
|
+
},
|
|
94
|
+
configurable: true,
|
|
95
|
+
enumerable: false
|
|
96
|
+
});
|
|
97
|
+
Object.defineProperty(this, "cssclass", {
|
|
98
|
+
get: () => this.cssClass,
|
|
99
|
+
set: (value) => {
|
|
100
|
+
this._setCssClass(value);
|
|
101
|
+
},
|
|
102
|
+
configurable: true,
|
|
103
|
+
enumerable: false
|
|
104
|
+
});
|
|
105
|
+
Object.defineProperty(this, "ariaLabel", {
|
|
106
|
+
get: () => this.ariaLabelText,
|
|
107
|
+
set: (value) => {
|
|
108
|
+
this.ariaLabelText = value == null ? void 0 : String(value);
|
|
109
|
+
},
|
|
110
|
+
configurable: true,
|
|
111
|
+
enumerable: false
|
|
112
|
+
});
|
|
113
|
+
Object.defineProperty(this, "aria-label", {
|
|
114
|
+
get: () => this.ariaLabelText,
|
|
115
|
+
set: (value) => {
|
|
116
|
+
this.ariaLabelText = value == null ? void 0 : String(value);
|
|
117
|
+
},
|
|
118
|
+
configurable: true,
|
|
119
|
+
enumerable: false
|
|
120
|
+
});
|
|
121
|
+
Object.defineProperty(this, "arialabel", {
|
|
122
|
+
get: () => this.ariaLabelText,
|
|
123
|
+
set: (value) => {
|
|
124
|
+
this.ariaLabelText = value == null ? void 0 : String(value);
|
|
125
|
+
},
|
|
126
|
+
configurable: true,
|
|
127
|
+
enumerable: false
|
|
128
|
+
});
|
|
129
|
+
Object.defineProperty(this, "maxlength", {
|
|
130
|
+
get: () => this.maxLength,
|
|
131
|
+
set: (value) => {
|
|
132
|
+
this.maxLength = this._toOptionalNumber(value);
|
|
133
|
+
},
|
|
134
|
+
configurable: true,
|
|
135
|
+
enumerable: false
|
|
136
|
+
});
|
|
137
|
+
Object.defineProperty(this, "minlength", {
|
|
138
|
+
get: () => this.minLength,
|
|
139
|
+
set: (value) => {
|
|
140
|
+
this.minLength = this._toOptionalNumber(value);
|
|
141
|
+
},
|
|
142
|
+
configurable: true,
|
|
143
|
+
enumerable: false
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
static get observedAttributes() {
|
|
147
|
+
return [
|
|
148
|
+
...super.observedAttributes ?? [],
|
|
149
|
+
"modelvalue",
|
|
150
|
+
"helpertext",
|
|
151
|
+
"validationstate",
|
|
152
|
+
"validationmessage",
|
|
153
|
+
"errormessage",
|
|
154
|
+
"successmessage",
|
|
155
|
+
"autoresize",
|
|
156
|
+
"minrows",
|
|
157
|
+
"maxrows",
|
|
158
|
+
"minlength",
|
|
159
|
+
"maxlength",
|
|
160
|
+
"showcounter",
|
|
161
|
+
"arialabeltext",
|
|
162
|
+
"arialabel",
|
|
163
|
+
"css-class",
|
|
164
|
+
"cssclass"
|
|
165
|
+
];
|
|
166
|
+
}
|
|
167
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
168
|
+
super.attributeChangedCallback(name, oldValue, newValue);
|
|
169
|
+
if (oldValue === newValue) return;
|
|
170
|
+
if (name === "modelvalue") {
|
|
171
|
+
this.modelValue = newValue ?? "";
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
if (name === "helpertext") {
|
|
175
|
+
this.helperText = newValue ?? "";
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
if (name === "validationstate") {
|
|
179
|
+
this.validationState = newValue ?? "default";
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
if (name === "validationmessage") {
|
|
183
|
+
this.validationMessage = newValue ?? "";
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
if (name === "errormessage") {
|
|
187
|
+
this.errorMessage = newValue ?? "";
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
if (name === "successmessage") {
|
|
191
|
+
this.successMessage = newValue ?? "";
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
if (name === "autoresize") {
|
|
195
|
+
this.autoResize = this._toBoolean(newValue);
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
if (name === "minrows") {
|
|
199
|
+
this.minRows = this._toOptionalNumber(newValue);
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
if (name === "maxrows") {
|
|
203
|
+
this.maxRows = this._toOptionalNumber(newValue);
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
if (name === "minlength") {
|
|
207
|
+
this.minLength = this._toOptionalNumber(newValue);
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
if (name === "maxlength") {
|
|
211
|
+
this.maxLength = this._toOptionalNumber(newValue);
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
if (name === "showcounter") {
|
|
215
|
+
this.showCounter = this._toBoolean(newValue);
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
if (name === "arialabeltext" || name === "arialabel") {
|
|
219
|
+
this.ariaLabelText = newValue ?? void 0;
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
if (name === "css-class" || name === "cssclass") this._setCssClass(newValue);
|
|
223
|
+
}
|
|
224
|
+
willUpdate(changed) {
|
|
225
|
+
for (const key of [
|
|
226
|
+
"disabled",
|
|
227
|
+
"readonly",
|
|
228
|
+
"required",
|
|
229
|
+
"autofocus",
|
|
230
|
+
"autoResize",
|
|
231
|
+
"showCounter"
|
|
232
|
+
]) {
|
|
233
|
+
const v = this[key];
|
|
234
|
+
if (typeof v !== "boolean") this[key] = this._toBoolean(v);
|
|
235
|
+
}
|
|
236
|
+
if (changed.has("modelValue") && this.value !== this.modelValue) this.value = this.modelValue ?? "";
|
|
237
|
+
if (changed.has("value") && this.modelValue !== this.value) this.modelValue = String(this.value ?? "");
|
|
238
|
+
}
|
|
239
|
+
connectedCallback() {
|
|
240
|
+
super.connectedCallback();
|
|
241
|
+
if (isServer) return;
|
|
242
|
+
this._setupAutoResizeObserver();
|
|
243
|
+
this._syncAutoResize();
|
|
244
|
+
}
|
|
245
|
+
disconnectedCallback() {
|
|
246
|
+
this._teardownAutoResizeObserver();
|
|
247
|
+
super.disconnectedCallback();
|
|
248
|
+
}
|
|
249
|
+
firstUpdated() {
|
|
250
|
+
if (isServer) return;
|
|
251
|
+
if (this.autofocus) this.focus();
|
|
252
|
+
this._syncAutoResize();
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Recompute the height when the element's WIDTH changes.
|
|
256
|
+
*
|
|
257
|
+
* The reconnect hook above only covers being moved; the same staleness happens on a
|
|
258
|
+
* window resize, a sidebar opening, or any layout shift that renarrows the column.
|
|
259
|
+
* Width is the real input to the height calculation, so watch it directly.
|
|
260
|
+
*/
|
|
261
|
+
_setupAutoResizeObserver() {
|
|
262
|
+
if (isServer || this._autoResizeRo) return;
|
|
263
|
+
if (typeof ResizeObserver === "undefined") return;
|
|
264
|
+
this._autoResizeRo = new ResizeObserver(() => {
|
|
265
|
+
if (!this.autoResize) return;
|
|
266
|
+
const width = this.getBoundingClientRect().width;
|
|
267
|
+
if (width === this._lastAutoResizeWidth) return;
|
|
268
|
+
this._lastAutoResizeWidth = width;
|
|
269
|
+
this._syncAutoResize();
|
|
270
|
+
});
|
|
271
|
+
this._autoResizeRo.observe(this);
|
|
272
|
+
}
|
|
273
|
+
_teardownAutoResizeObserver() {
|
|
274
|
+
this._autoResizeRo?.disconnect();
|
|
275
|
+
this._autoResizeRo = void 0;
|
|
276
|
+
this._lastAutoResizeWidth = -1;
|
|
277
|
+
}
|
|
278
|
+
updated(changed) {
|
|
279
|
+
super.updated(changed);
|
|
280
|
+
if (isServer) return;
|
|
281
|
+
if (changed.has("value") || changed.has("modelValue") || changed.has("autoResize") || changed.has("minRows") || changed.has("maxRows")) this._syncAutoResize();
|
|
282
|
+
}
|
|
283
|
+
_setCssClass(value) {
|
|
284
|
+
if (value == null) {
|
|
285
|
+
this.cssClass = {};
|
|
286
|
+
this.cssClassName = "";
|
|
287
|
+
return;
|
|
288
|
+
}
|
|
289
|
+
if (typeof value === "object") {
|
|
290
|
+
this.cssClass = value;
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
if (typeof value === "string") {
|
|
294
|
+
const trimmed = value.trim();
|
|
295
|
+
if (!trimmed) {
|
|
296
|
+
this.cssClass = {};
|
|
297
|
+
this.cssClassName = "";
|
|
298
|
+
return;
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Optional HTML object support:
|
|
302
|
+
*
|
|
303
|
+
* <mono-textarea css-class='{"root":"...", "field":"..."}'></mono-textarea>
|
|
304
|
+
*/
|
|
305
|
+
if (trimmed.startsWith("{") && trimmed.endsWith("}")) try {
|
|
306
|
+
this.cssClass = JSON.parse(trimmed);
|
|
307
|
+
return;
|
|
308
|
+
} catch {}
|
|
309
|
+
this.cssClassName = trimmed;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
_toBoolean(value) {
|
|
313
|
+
if (typeof value === "boolean") return value;
|
|
314
|
+
if (typeof value === "string") {
|
|
315
|
+
const normalized = value.toLowerCase().trim();
|
|
316
|
+
return normalized === "" || normalized === "true";
|
|
317
|
+
}
|
|
318
|
+
return Boolean(value);
|
|
319
|
+
}
|
|
320
|
+
_toOptionalNumber(value) {
|
|
321
|
+
if (value === void 0 || value === null || value === "") return void 0;
|
|
322
|
+
const parsed = Number(value);
|
|
323
|
+
return Number.isFinite(parsed) ? parsed : void 0;
|
|
324
|
+
}
|
|
325
|
+
_cls(base, key) {
|
|
326
|
+
const extra = this.cssClass?.[key];
|
|
327
|
+
return extra ? `${base} ${extra}` : base;
|
|
328
|
+
}
|
|
329
|
+
get _hasLabelSlot() {
|
|
330
|
+
return this._hasLabelSlotState;
|
|
331
|
+
}
|
|
332
|
+
get _hasHelperSlot() {
|
|
333
|
+
return this._hasHelperSlotState;
|
|
334
|
+
}
|
|
335
|
+
get _resolvedValidationState() {
|
|
336
|
+
if (this.validationState && this.validationState !== "default") return this.validationState;
|
|
337
|
+
if (this.errorMessage) return "invalid";
|
|
338
|
+
if (this.successMessage) return "valid";
|
|
339
|
+
return "default";
|
|
340
|
+
}
|
|
341
|
+
get _wrapperClasses() {
|
|
342
|
+
return [
|
|
343
|
+
"mono-textarea",
|
|
344
|
+
this.size,
|
|
345
|
+
this.color,
|
|
346
|
+
this.variant,
|
|
347
|
+
this.disabled ? "disabled" : "",
|
|
348
|
+
this.readonly ? "readonly" : "",
|
|
349
|
+
this._resolvedValidationState !== "default" ? `is-${this._resolvedValidationState}` : "",
|
|
350
|
+
this.value ? "has-value" : "",
|
|
351
|
+
this.autoResize ? "auto-resize" : "",
|
|
352
|
+
this.cssClassName,
|
|
353
|
+
this.cssClass?.root
|
|
354
|
+
].filter(Boolean).join(" ");
|
|
355
|
+
}
|
|
356
|
+
get _fieldClasses() {
|
|
357
|
+
return [
|
|
358
|
+
this._cls("mono-textarea-field", "field"),
|
|
359
|
+
this.size,
|
|
360
|
+
this.color,
|
|
361
|
+
this.variant
|
|
362
|
+
].filter(Boolean).join(" ");
|
|
363
|
+
}
|
|
364
|
+
/** `near` at 85% of the cap, `over` past it — the attribute twin of the class. */
|
|
365
|
+
get _counterState() {
|
|
366
|
+
const max = this.maxLength;
|
|
367
|
+
if (max === void 0) return "default";
|
|
368
|
+
const length = this.value.length;
|
|
369
|
+
if (length > max) return "over";
|
|
370
|
+
if (length >= Math.floor(max * .85)) return "near";
|
|
371
|
+
return "default";
|
|
372
|
+
}
|
|
373
|
+
get _counterClass() {
|
|
374
|
+
const length = this.value.length;
|
|
375
|
+
const max = this.maxLength;
|
|
376
|
+
if (max !== void 0 && length > max) return `${this._cls("mono-textarea-counter", "counter")} over`;
|
|
377
|
+
if (max !== void 0 && length >= Math.floor(max * .85)) return `${this._cls("mono-textarea-counter", "counter")} near`;
|
|
378
|
+
return this._cls("mono-textarea-counter", "counter");
|
|
379
|
+
}
|
|
380
|
+
get _shouldShowFooter() {
|
|
381
|
+
return Boolean(this.validationMessage || this.errorMessage || this.successMessage || this.helperText || this._hasHelperSlot || this.showCounter);
|
|
382
|
+
}
|
|
383
|
+
_createModelDetail(args) {
|
|
384
|
+
return {
|
|
385
|
+
modelValue: args.modelValue,
|
|
386
|
+
currentValue: args.modelValue,
|
|
387
|
+
oldValue: args.oldValue,
|
|
388
|
+
value: args.modelValue,
|
|
389
|
+
name: this.name,
|
|
390
|
+
sourceEvent: args.sourceEvent
|
|
391
|
+
};
|
|
392
|
+
}
|
|
393
|
+
_emitInput(detail) {
|
|
394
|
+
dispatchMonoEvent(this, "input", detail);
|
|
395
|
+
}
|
|
396
|
+
_emitChange(detail) {
|
|
397
|
+
dispatchMonoEvent(this, "change", detail);
|
|
398
|
+
}
|
|
399
|
+
_handleInput(event) {
|
|
400
|
+
if (this.disabled || this.readonly) return;
|
|
401
|
+
const textarea = event.currentTarget;
|
|
402
|
+
const oldValue = this.modelValue;
|
|
403
|
+
const nextValue = textarea.value;
|
|
404
|
+
this.value = nextValue;
|
|
405
|
+
this.modelValue = nextValue;
|
|
406
|
+
const detail = this._createModelDetail({
|
|
407
|
+
modelValue: nextValue,
|
|
408
|
+
oldValue,
|
|
409
|
+
sourceEvent: event
|
|
410
|
+
});
|
|
411
|
+
this._emitInput(detail);
|
|
412
|
+
this._syncAutoResize();
|
|
413
|
+
}
|
|
414
|
+
_handleChange(event) {
|
|
415
|
+
if (this.disabled || this.readonly) return;
|
|
416
|
+
const textarea = event.currentTarget;
|
|
417
|
+
const oldValue = this.modelValue;
|
|
418
|
+
const nextValue = textarea.value;
|
|
419
|
+
this.value = nextValue;
|
|
420
|
+
this.modelValue = nextValue;
|
|
421
|
+
const detail = this._createModelDetail({
|
|
422
|
+
modelValue: nextValue,
|
|
423
|
+
oldValue,
|
|
424
|
+
sourceEvent: event
|
|
425
|
+
});
|
|
426
|
+
this._emitChange(detail);
|
|
427
|
+
}
|
|
428
|
+
_syncAutoResize() {
|
|
429
|
+
if (isServer) return;
|
|
430
|
+
if (!this.autoResize || !this._textareaEl) return;
|
|
431
|
+
const textarea = this._textareaEl;
|
|
432
|
+
const computed = window.getComputedStyle(textarea);
|
|
433
|
+
const lineHeight = Number.parseFloat(computed.lineHeight) || 20;
|
|
434
|
+
const paddingTop = Number.parseFloat(computed.paddingTop) || 0;
|
|
435
|
+
const paddingBottom = Number.parseFloat(computed.paddingBottom) || 0;
|
|
436
|
+
const borderTop = Number.parseFloat(computed.borderTopWidth) || 0;
|
|
437
|
+
const borderBottom = Number.parseFloat(computed.borderBottomWidth) || 0;
|
|
438
|
+
const minRows = this.minRows ?? this.rows;
|
|
439
|
+
const maxRows = this.maxRows;
|
|
440
|
+
const minHeight = minRows !== void 0 ? lineHeight * minRows + paddingTop + paddingBottom + borderTop + borderBottom : void 0;
|
|
441
|
+
const maxHeight = maxRows !== void 0 ? lineHeight * maxRows + paddingTop + paddingBottom + borderTop + borderBottom : void 0;
|
|
442
|
+
textarea.style.height = "auto";
|
|
443
|
+
let nextHeight = textarea.scrollHeight;
|
|
444
|
+
if (minHeight !== void 0) nextHeight = Math.max(nextHeight, minHeight);
|
|
445
|
+
if (maxHeight !== void 0) {
|
|
446
|
+
nextHeight = Math.min(nextHeight, maxHeight);
|
|
447
|
+
textarea.style.overflowY = textarea.scrollHeight > maxHeight ? "auto" : "hidden";
|
|
448
|
+
} else textarea.style.overflowY = "hidden";
|
|
449
|
+
textarea.style.height = `${nextHeight}px`;
|
|
450
|
+
}
|
|
451
|
+
_renderLabel() {
|
|
452
|
+
const hasContent = !!this.label || this._hasLabelSlotState;
|
|
453
|
+
if (!hasContent && !this._slotsAlwaysRender) return nothing;
|
|
454
|
+
return html`
|
|
455
|
+
<label
|
|
456
|
+
class=${this._cls("mono-textarea-label", "label")}
|
|
457
|
+
mono-label
|
|
458
|
+
for=${this._textareaId}
|
|
459
|
+
?mono-empty=${!hasContent}
|
|
460
|
+
>
|
|
461
|
+
${this._slotOutlet("label", this.label)}
|
|
462
|
+
|
|
463
|
+
${this.required ? html`
|
|
464
|
+
<span class=${this._cls("mono-textarea-required", "required")} mono-required-mark>
|
|
465
|
+
*
|
|
466
|
+
</span>
|
|
467
|
+
` : nothing}
|
|
468
|
+
</label>
|
|
469
|
+
`;
|
|
470
|
+
}
|
|
471
|
+
_renderMessage() {
|
|
472
|
+
if (this.validationMessage) return html`
|
|
473
|
+
<div
|
|
474
|
+
class=${`${this._cls("mono-textarea-message", "message")} ${this._resolvedValidationState}`}
|
|
475
|
+
mono-message=${this._resolvedValidationState}
|
|
476
|
+
>
|
|
477
|
+
${this.validationMessage}
|
|
478
|
+
</div>
|
|
479
|
+
`;
|
|
480
|
+
if (this.errorMessage) return html`
|
|
481
|
+
<div class=${`${this._cls("mono-textarea-message", "message")} invalid`} mono-message="invalid">
|
|
482
|
+
${this.errorMessage}
|
|
483
|
+
</div>
|
|
484
|
+
`;
|
|
485
|
+
if (this.successMessage) return html`
|
|
486
|
+
<div class=${`${this._cls("mono-textarea-message", "message")} valid`} mono-message="valid">
|
|
487
|
+
${this.successMessage}
|
|
488
|
+
</div>
|
|
489
|
+
`;
|
|
490
|
+
if (this.helperText || this._hasHelperSlot || this._slotsAlwaysRender) return html`
|
|
491
|
+
<div
|
|
492
|
+
class=${`${this._cls("mono-textarea-message", "message")} helper`}
|
|
493
|
+
mono-message="helper"
|
|
494
|
+
?mono-empty=${!this.helperText && !this._hasHelperSlot}
|
|
495
|
+
>
|
|
496
|
+
${this._slotOutlet("helper", this.helperText)}
|
|
497
|
+
</div>
|
|
498
|
+
`;
|
|
499
|
+
return nothing;
|
|
500
|
+
}
|
|
501
|
+
_renderCounter() {
|
|
502
|
+
if (!this.showCounter) return nothing;
|
|
503
|
+
const max = this.maxLength;
|
|
504
|
+
const length = this.value.length;
|
|
505
|
+
return html`
|
|
506
|
+
<div
|
|
507
|
+
class=${this._counterClass}
|
|
508
|
+
mono-counter
|
|
509
|
+
?mono-near=${this._counterState === "near"}
|
|
510
|
+
?mono-over=${this._counterState === "over"}
|
|
511
|
+
>
|
|
512
|
+
${max !== void 0 ? `${length}/${max}` : length}
|
|
513
|
+
</div>
|
|
514
|
+
`;
|
|
515
|
+
}
|
|
516
|
+
_renderFooter() {
|
|
517
|
+
if (!this._shouldShowFooter && !this._slotsAlwaysRender) return nothing;
|
|
518
|
+
return html`
|
|
519
|
+
<div
|
|
520
|
+
class=${this._cls("mono-textarea-footer", "footer")}
|
|
521
|
+
mono-footer
|
|
522
|
+
?mono-empty=${!this._shouldShowFooter}
|
|
523
|
+
>
|
|
524
|
+
<div class=${this.cssClass?.messageWrap ?? ""} mono-message-wrap>
|
|
525
|
+
${this._renderMessage()}
|
|
526
|
+
</div>
|
|
527
|
+
|
|
528
|
+
${this._renderCounter()}
|
|
529
|
+
</div>
|
|
530
|
+
`;
|
|
531
|
+
}
|
|
532
|
+
/** Inline sizing applied to the root wrapper. */
|
|
533
|
+
_sizeStyle() {
|
|
534
|
+
return buildSizeStyle(this);
|
|
535
|
+
}
|
|
536
|
+
render() {
|
|
537
|
+
const describedBy = this._shouldShowFooter ? this._messageId : void 0;
|
|
538
|
+
const ariaLabel = this.ariaLabelText || this.label || this.placeholder || void 0;
|
|
539
|
+
return html`
|
|
540
|
+
<div
|
|
541
|
+
class=${this._wrapperClasses}
|
|
542
|
+
style=${styleMap(this._sizeStyle())}
|
|
543
|
+
mono-textarea
|
|
544
|
+
mono-size=${this.size === "md" ? nothing : this.size}
|
|
545
|
+
mono-color=${this.color === "primary" ? nothing : this.color}
|
|
546
|
+
mono-variant=${this.variant === "outlined" ? nothing : this.variant}
|
|
547
|
+
mono-validation-state=${this._resolvedValidationState === "default" ? nothing : this._resolvedValidationState}
|
|
548
|
+
?mono-disabled=${this.disabled}
|
|
549
|
+
?mono-readonly=${this.readonly}
|
|
550
|
+
?mono-required=${this.required}
|
|
551
|
+
?mono-auto-resize=${this.autoResize}
|
|
552
|
+
>
|
|
553
|
+
${this._renderLabel()}
|
|
554
|
+
|
|
555
|
+
<textarea
|
|
556
|
+
id=${this._textareaId}
|
|
557
|
+
class=${this._fieldClasses}
|
|
558
|
+
mono-native
|
|
559
|
+
.value=${this.value}
|
|
560
|
+
name=${ifDefined(this.name || void 0)}
|
|
561
|
+
placeholder=${ifDefined(this.placeholder || void 0)}
|
|
562
|
+
rows=${ifDefined(this.rows)}
|
|
563
|
+
minlength=${ifDefined(this.minLength)}
|
|
564
|
+
maxlength=${ifDefined(this.maxLength)}
|
|
565
|
+
?disabled=${this.disabled}
|
|
566
|
+
?readonly=${this.readonly}
|
|
567
|
+
?required=${this.required}
|
|
568
|
+
aria-label=${ifDefined(ariaLabel)}
|
|
569
|
+
aria-invalid=${this._resolvedValidationState === "invalid" ? "true" : "false"}
|
|
570
|
+
aria-describedby=${ifDefined(describedBy)}
|
|
571
|
+
@input=${this._handleInput}
|
|
572
|
+
@change=${this._handleChange}
|
|
573
|
+
></textarea>
|
|
574
|
+
|
|
575
|
+
<div id=${this._messageId} mono-message-outlet>
|
|
576
|
+
${this._renderFooter()}
|
|
577
|
+
</div>
|
|
578
|
+
</div>
|
|
579
|
+
`;
|
|
580
|
+
}
|
|
581
|
+
focus(options) {
|
|
582
|
+
this._textareaEl?.focus(options);
|
|
583
|
+
}
|
|
584
|
+
blur() {
|
|
585
|
+
this._textareaEl?.blur();
|
|
586
|
+
}
|
|
587
|
+
select() {
|
|
588
|
+
this._textareaEl?.select();
|
|
589
|
+
}
|
|
590
|
+
setSelectionRange(start, end, direction) {
|
|
591
|
+
this._textareaEl?.setSelectionRange(start, end, direction);
|
|
592
|
+
}
|
|
593
|
+
/** Whether the slot regions render even when empty. Light: no. Shadow: yes —
|
|
594
|
+
* the native `<slot>`s must exist to project DSD content + be scanned
|
|
595
|
+
* (hidden via `[data-empty]` when empty). */
|
|
596
|
+
get _slotsAlwaysRender() {
|
|
597
|
+
return false;
|
|
598
|
+
}
|
|
599
|
+
_hasSlot(name) {
|
|
600
|
+
return name === "label" ? this._hasLabelSlotState : this._hasHelperSlotState;
|
|
601
|
+
}
|
|
602
|
+
_setSlotState(name, has) {
|
|
603
|
+
if (name === "label") this._hasLabelSlotState = has;
|
|
604
|
+
else this._hasHelperSlotState = has;
|
|
605
|
+
}
|
|
606
|
+
/**
|
|
607
|
+
* Slot outlet. Light build (default): a `data-mono-slot` placeholder the
|
|
608
|
+
* captured light-DOM nodes are re-parented into when present, else the prop
|
|
609
|
+
* `fallback`. Shadow build overrides this with a native `<slot name>`.
|
|
610
|
+
*/
|
|
611
|
+
_slotOutlet(name, fallback = nothing) {
|
|
612
|
+
return this._hasSlot(name) ? html`<span data-mono-slot=${name}></span>` : html`${fallback}`;
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
__decorate([property({ type: String })], MonoTextareaCoreClass.prototype, "size", void 0);
|
|
616
|
+
__decorate([property({ type: String })], MonoTextareaCoreClass.prototype, "color", void 0);
|
|
617
|
+
__decorate([property({ type: String })], MonoTextareaCoreClass.prototype, "variant", void 0);
|
|
618
|
+
__decorate([property({
|
|
619
|
+
type: String,
|
|
620
|
+
attribute: "model-value",
|
|
621
|
+
reflect: true
|
|
622
|
+
})], MonoTextareaCoreClass.prototype, "modelValue", void 0);
|
|
623
|
+
__decorate([property({ type: String })], MonoTextareaCoreClass.prototype, "value", void 0);
|
|
624
|
+
__decorate([property({ type: String })], MonoTextareaCoreClass.prototype, "name", void 0);
|
|
625
|
+
__decorate([property({ type: String })], MonoTextareaCoreClass.prototype, "placeholder", void 0);
|
|
626
|
+
__decorate([property({ type: String })], MonoTextareaCoreClass.prototype, "label", void 0);
|
|
627
|
+
__decorate([property({
|
|
628
|
+
type: String,
|
|
629
|
+
attribute: "helper-text"
|
|
630
|
+
})], MonoTextareaCoreClass.prototype, "helperText", void 0);
|
|
631
|
+
__decorate([property({
|
|
632
|
+
type: String,
|
|
633
|
+
attribute: "validation-state"
|
|
634
|
+
})], MonoTextareaCoreClass.prototype, "validationState", void 0);
|
|
635
|
+
__decorate([property({
|
|
636
|
+
type: String,
|
|
637
|
+
attribute: "validation-message"
|
|
638
|
+
})], MonoTextareaCoreClass.prototype, "validationMessage", void 0);
|
|
639
|
+
__decorate([property({
|
|
640
|
+
type: String,
|
|
641
|
+
attribute: "error-message"
|
|
642
|
+
})], MonoTextareaCoreClass.prototype, "errorMessage", void 0);
|
|
643
|
+
__decorate([property({
|
|
644
|
+
type: String,
|
|
645
|
+
attribute: "success-message"
|
|
646
|
+
})], MonoTextareaCoreClass.prototype, "successMessage", void 0);
|
|
647
|
+
__decorate([property({
|
|
648
|
+
type: String,
|
|
649
|
+
attribute: "aria-label"
|
|
650
|
+
})], MonoTextareaCoreClass.prototype, "ariaLabelText", void 0);
|
|
651
|
+
__decorate([property({
|
|
652
|
+
reflect: true,
|
|
653
|
+
converter: booleanStringConverter
|
|
654
|
+
})], MonoTextareaCoreClass.prototype, "disabled", void 0);
|
|
655
|
+
__decorate([property({
|
|
656
|
+
reflect: true,
|
|
657
|
+
converter: booleanStringConverter
|
|
658
|
+
})], MonoTextareaCoreClass.prototype, "readonly", void 0);
|
|
659
|
+
__decorate([property({
|
|
660
|
+
reflect: true,
|
|
661
|
+
converter: booleanStringConverter
|
|
662
|
+
})], MonoTextareaCoreClass.prototype, "required", void 0);
|
|
663
|
+
__decorate([property({
|
|
664
|
+
reflect: true,
|
|
665
|
+
converter: booleanStringConverter
|
|
666
|
+
})], MonoTextareaCoreClass.prototype, "autofocus", void 0);
|
|
667
|
+
__decorate([property({
|
|
668
|
+
attribute: "auto-resize",
|
|
669
|
+
reflect: true,
|
|
670
|
+
converter: booleanStringConverter
|
|
671
|
+
})], MonoTextareaCoreClass.prototype, "autoResize", void 0);
|
|
672
|
+
__decorate([property({
|
|
673
|
+
attribute: "show-counter",
|
|
674
|
+
reflect: true,
|
|
675
|
+
converter: booleanStringConverter
|
|
676
|
+
})], MonoTextareaCoreClass.prototype, "showCounter", void 0);
|
|
677
|
+
__decorate([property({ converter: numberStringConverter })], MonoTextareaCoreClass.prototype, "rows", void 0);
|
|
678
|
+
__decorate([property({
|
|
679
|
+
attribute: "min-rows",
|
|
680
|
+
converter: numberStringConverter
|
|
681
|
+
})], MonoTextareaCoreClass.prototype, "minRows", void 0);
|
|
682
|
+
__decorate([property({
|
|
683
|
+
attribute: "max-rows",
|
|
684
|
+
converter: numberStringConverter
|
|
685
|
+
})], MonoTextareaCoreClass.prototype, "maxRows", void 0);
|
|
686
|
+
__decorate([property({
|
|
687
|
+
attribute: "min-length",
|
|
688
|
+
converter: numberStringConverter
|
|
689
|
+
})], MonoTextareaCoreClass.prototype, "minLength", void 0);
|
|
690
|
+
__decorate([property({
|
|
691
|
+
attribute: "max-length",
|
|
692
|
+
converter: numberStringConverter
|
|
693
|
+
})], MonoTextareaCoreClass.prototype, "maxLength", void 0);
|
|
694
|
+
__decorate([property({ attribute: false })], MonoTextareaCoreClass.prototype, "cssClass", void 0);
|
|
695
|
+
__decorate([property({ attribute: false })], MonoTextareaCoreClass.prototype, "cssClassName", void 0);
|
|
696
|
+
__decorate([state()], MonoTextareaCoreClass.prototype, "_hasLabelSlotState", void 0);
|
|
697
|
+
__decorate([state()], MonoTextareaCoreClass.prototype, "_hasHelperSlotState", void 0);
|
|
698
|
+
__decorate([query(".mono-textarea-field")], MonoTextareaCoreClass.prototype, "_textareaEl", void 0);
|
|
699
|
+
__decorate([property({ type: String })], MonoTextareaCoreClass.prototype, "width", void 0);
|
|
700
|
+
__decorate([property({ type: String })], MonoTextareaCoreClass.prototype, "height", void 0);
|
|
701
|
+
__decorate([property({
|
|
702
|
+
type: String,
|
|
703
|
+
attribute: "min-width"
|
|
704
|
+
})], MonoTextareaCoreClass.prototype, "minWidth", void 0);
|
|
705
|
+
__decorate([property({
|
|
706
|
+
type: String,
|
|
707
|
+
attribute: "max-width"
|
|
708
|
+
})], MonoTextareaCoreClass.prototype, "maxWidth", void 0);
|
|
709
|
+
__decorate([property({
|
|
710
|
+
type: String,
|
|
711
|
+
attribute: "min-height"
|
|
712
|
+
})], MonoTextareaCoreClass.prototype, "minHeight", void 0);
|
|
713
|
+
__decorate([property({
|
|
714
|
+
type: String,
|
|
715
|
+
attribute: "max-height"
|
|
716
|
+
})], MonoTextareaCoreClass.prototype, "maxHeight", void 0);
|
|
717
|
+
return MonoTextareaCoreClass;
|
|
718
|
+
};
|
|
719
|
+
//#endregion
|
|
720
|
+
//#region src/components/textarea/textarea.css?raw
|
|
721
|
+
var textarea_default = "/* =========================================================================\r\n mono-textarea — a port of Basecoat's `.textarea` inside a `.field`\r\n (basecoat-css@1.0.2, vega style).\r\n\r\n Styled by ATTRIBUTE, like Basecoat — and the attributes mirror the element's\r\n props one for one, so hand-written markup reads like the Lit / Vue tag:\r\n\r\n <mono-textarea size=\"sm\" color=\"danger\" label=\"Notes\" placeholder=\"…\">\r\n <div mono-textarea mono-size=\"sm\" mono-color=\"danger\">\r\n <label mono-label>Notes</label>\r\n <textarea mono-native placeholder=\"…\"></textarea>\r\n <div mono-message-wrap><div mono-message=\"helper\">…</div></div>\r\n </div>\r\n\r\n An absent attribute is the prop's default (`:not([mono-size])` = md,\r\n `:not([mono-color])` = primary, `:not([mono-variant])` = outlined). The\r\n element renders these on its root (both builds) plus the states\r\n `mono-disabled` / `mono-readonly` / `mono-required` / `mono-auto-resize` and\r\n `mono-validation-state=\"valid|invalid|warning\"`. The old classes\r\n (`.mono-textarea.md.primary.outlined`) are still emitted as inert hooks until\r\n 2.0 but no rule here reads them.\r\n\r\n Selector map (ours ≡ upstream):\r\n [mono-textarea] ≡ .field (flex w-full flex-col gap-3)\r\n [mono-textarea] > [mono-label] ≡ .field > label / .label\r\n [mono-native] ≡ .field > textarea / .textarea\r\n (field-sizing-content min-h-16 w-full rounded-md\r\n border-input bg-transparent px-2.5 py-2 shadow-xs\r\n text-base md:text-sm, focus ring-3 ring-ring/50)\r\n [mono-message-wrap] > [mono-message=\"…\"] ≡ .field > p / .field [role='alert']\r\n [mono-validation-state=\"invalid\"] ≡ aria-invalid:border-destructive aria-invalid:ring-destructive/20\r\n [mono-validation-state=\"valid|warning\"] ≡ EXTENSION (the same treatment in --success / --warning)\r\n [mono-size=\"xs|sm|lg|xl|xxl\"] ≡ EXTENSION (Basecoat sizes only the select; the\r\n ladder is --mono-control-height-*)\r\n [mono-variant=\"filled\"] ≡ EXTENSION (luma/mira/rhea's textarea: bg-input/50, no shadow)\r\n [mono-variant=\"underlined\"] ≡ EXTENSION (sera's: border-transparent border-b-input,\r\n rounded-none px-0, the ring on the bottom edge only)\r\n [mono-counter], [mono-footer] ≡ EXTENSION (the character counter row)\r\n\r\n A textarea must NOT be --mono-control-height-* tall — it is multi-line — but\r\n its metrics DERIVE from that token, or retuning the ladder leaves it behind:\r\n\r\n padY = (T - L) / 2 - B\r\n min-height = ROWS x L + 2*padY + 2*B = T + (ROWS - 1) x L\r\n\r\n with T the control height, L one text line (font x line-height) and B the\r\n border. The first puts the textarea's FIRST line box at the same offset as an\r\n input's single line, so the two start their text on the same baseline side by\r\n side; the second reads as \"one input tall, plus N-1 lines\". ROWS is the only\r\n per-size literal. (Upstream's own `min-h-16` is a flat 64px; the derivation is\r\n mono's, and `field-sizing: content` still grows the box from there.)\r\n\r\n Specificity contract (same as the pre-port class sheet): a part's RESTING rule\r\n is exactly one attribute strong — `:where([mono-textarea]) [mono-native]` =\r\n (0,1,0) — so a utility class handed in through `cssClass` wins by source\r\n order, while the prop and state rules stay heavier and win over it.\r\n\r\n Inner parts: [mono-label] (+ [mono-required-mark]), [mono-native],\r\n [mono-footer] > [mono-message-wrap] > [mono-message=\"helper|valid|invalid|\r\n warning\"] / [mono-counter] (+ [mono-near], [mono-over]). The shadow build\r\n marks an unassigned slot wrapper [mono-empty].\r\n\r\n FLAVORS set `--mono-textarea-{radius,padding-x-<size>,padding-y-<size>,\r\n font-<size>,line-height,ring-width,ring-alpha,gap,resize,bg,border-color,\r\n shadow}` and the outline-scoped `--mono-textarea-outline-*`; every fallback\r\n here is vega's value\r\n (`node scripts/basecoat-styles.mjs --varying \"textarea\"`).\r\n ========================================================================= */\r\n\r\nmono-textarea {\r\n display: block;\r\n}\r\n\r\n[mono-textarea] {\r\n /* ── palette: each slot is a public knob over a Basecoat token ─────────── */\r\n --_mono-textarea-text: var(--mono-textarea-color, var(--mono-textarea-text, var(--foreground)));\r\n --_mono-textarea-placeholder: var(--mono-textarea-placeholder, var(--muted-foreground));\r\n --_mono-textarea-muted: var(--mono-textarea-muted, var(--muted-foreground));\r\n /* the `color` prop picks the FOCUS colour; primary is Basecoat's `--ring` */\r\n --_mono-textarea-primary: var(--mono-textarea-primary, var(--ring));\r\n --_mono-textarea-secondary: var(--mono-textarea-secondary, var(--muted-foreground));\r\n --_mono-textarea-success: var(--mono-textarea-success, var(--success));\r\n --_mono-textarea-danger: var(--mono-textarea-danger, var(--destructive));\r\n --_mono-textarea-warning: var(--mono-textarea-warning, var(--warning));\r\n --_mono-textarea-info: var(--mono-textarea-info, var(--info));\r\n --_mono-textarea-teal: var(--mono-textarea-teal, var(--teal));\r\n --_mono-textarea-purple: var(--mono-textarea-purple, var(--purple));\r\n --_mono-textarea-neutral: var(--mono-textarea-neutral, var(--neutral));\r\n --_mono-textarea-dark: var(--mono-textarea-dark, var(--dark));\r\n --_mono-textarea-valid: var(--mono-textarea-valid, var(--success));\r\n --_mono-textarea-invalid: var(--mono-textarea-invalid, var(--destructive));\r\n\r\n /* ── the painted result — three tiers, base = vega's .textarea ─────────── */\r\n --_mono-textarea-ring-color: var(--mono-textarea-ring-color, var(--mono-textarea-focus-color, var(--_mono-textarea-ring-color-preset, var(--_mono-textarea-primary))));\r\n --_mono-textarea-ring-width: var(--mono-textarea-ring-width, var(--_mono-textarea-ring-width-preset, var(--mono-ring-width)));\r\n --_mono-textarea-ring-alpha: var(--mono-textarea-ring-alpha, var(--mono-ring-alpha));\r\n --_mono-textarea-border-color: var(--mono-textarea-rest-border, var(--mono-textarea-border-color, var(--_mono-textarea-border-color-preset, var(--input))));\r\n --_mono-textarea-side-border-color: var(--_mono-textarea-side-border-color-preset, var(--_mono-textarea-border-color));\r\n --_mono-textarea-bg: var(--mono-textarea-bg, var(--mono-textarea-surface, var(--_mono-textarea-bg-preset, var(--mono-mode-surface))));\r\n --_mono-textarea-shadow: var(--mono-textarea-shadow, var(--_mono-textarea-shadow-preset, var(--mono-shadow-xs)));\r\n --_mono-textarea-border-width: var(--mono-textarea-border-width, var(--mono-border-width));\r\n --_mono-textarea-radius: var(--mono-textarea-radius, var(--_mono-textarea-radius-preset, var(--mono-radius-md)));\r\n\r\n /* ── md metrics live on the unqualified root ON PURPOSE: hand-written\r\n `<div mono-textarea>` that names no size renders exactly like size=\"md\".\r\n basecoat@1.0.2 styles/vega.css .textarea — px-2.5 py-2 text-base md:text-sm ── */\r\n --_mono-textarea-height: var(--mono-textarea-height-md, var(--mono-control-height-md));\r\n --_mono-textarea-padding-x: var(--mono-textarea-padding-x-md, var(--_mono-textarea-padding-x-preset, calc(var(--mono-spacing) * 2.5)));\r\n --_mono-textarea-font-size: var(--mono-textarea-font-md, var(--mono-text-sm));\r\n --_mono-textarea-line-height: var(--mono-textarea-line-height, var(--mono-textarea-line-height-md, var(--mono-leading-normal)));\r\n --_mono-textarea-rows: var(--mono-textarea-rows, var(--mono-textarea-rows-md, 4));\r\n\r\n /* one text line, and the two derived metrics that hang off it */\r\n --_mono-textarea-line: calc(var(--_mono-textarea-font-size) * var(--_mono-textarea-line-height));\r\n --_mono-textarea-padding-y: var(\r\n --mono-textarea-padding-y,\r\n max(0px, calc((var(--_mono-textarea-height) - var(--_mono-textarea-line)) / 2 - var(--_mono-textarea-border-width)))\r\n );\r\n --_mono-textarea-min-height: var(\r\n --mono-textarea-min-height,\r\n calc(var(--_mono-textarea-height) + (var(--_mono-textarea-rows) - 1) * var(--_mono-textarea-line))\r\n );\r\n\r\n /* basecoat@1.0.2 styles/vega.css .field — flex w-full flex-col gap-3 */\r\n display: flex;\r\n flex-direction: column;\r\n gap: var(--mono-textarea-gap, calc(var(--mono-spacing) * 3));\r\n width: 100%;\r\n min-width: 0;\r\n color: var(--_mono-textarea-text);\r\n font-family: inherit;\r\n}\r\n\r\n[mono-textarea],\r\n:where([mono-textarea]) *,\r\n:where([mono-textarea]) *::before,\r\n:where([mono-textarea]) *::after {\r\n box-sizing: border-box;\r\n}\r\n\r\n/* The element wraps the footer in an aria-describedby outlet; hand-written markup\r\n has no such wrapper. It is a flex child either way, so an EMPTY outlet still\r\n paid the root's `gap` and made the element stand taller than the same raw\r\n markup. The shadow build always RENDERS the footer and marks it empty, so the\r\n test is for a footer that is actually showing. */\r\n[mono-textarea] > [mono-message-outlet]:not(:has([mono-footer]:not([mono-empty]))) {\r\n display: none;\r\n}\r\n\r\n/* the shadow build renders every region and marks the empty ones; the light\r\n build renders only what exists. Out-specifies the region rules on purpose —\r\n a zero-weight hide would tie with them and lose on source order. */\r\n[mono-textarea] :is([mono-label], [mono-message], [mono-footer], [mono-counter])[mono-empty] {\r\n display: none;\r\n}\r\n\r\n/* =========================================\r\n Sizes — EXTENSION: Basecoat sizes only the select, so the ladder is\r\n --mono-control-height-* and the derivation above\r\n ========================================= */\r\n\r\n[mono-textarea][mono-size=\"xs\"] {\r\n --_mono-textarea-height: var(--mono-textarea-height-xs, var(--mono-control-height-xs));\r\n --_mono-textarea-padding-x: var(--mono-textarea-padding-x-xs, var(--_mono-textarea-padding-x-preset, calc(var(--mono-spacing) * 2)));\r\n --_mono-textarea-font-size: var(--mono-textarea-font-xs, var(--mono-text-xs));\r\n --_mono-textarea-rows: var(--mono-textarea-rows, var(--mono-textarea-rows-xs, 3));\r\n}\r\n\r\n[mono-textarea][mono-size=\"sm\"] {\r\n --_mono-textarea-height: var(--mono-textarea-height-sm, var(--mono-control-height-sm));\r\n --_mono-textarea-padding-x: var(--mono-textarea-padding-x-sm, var(--_mono-textarea-padding-x-preset, calc(var(--mono-spacing) * 2.5)));\r\n --_mono-textarea-font-size: var(--mono-textarea-font-sm, var(--mono-textarea-font-md, var(--mono-text-sm)));\r\n --_mono-textarea-rows: var(--mono-textarea-rows, var(--mono-textarea-rows-sm, 3));\r\n}\r\n\r\n[mono-textarea][mono-size=\"lg\"] {\r\n --_mono-textarea-height: var(--mono-textarea-height-lg, var(--mono-control-height-lg));\r\n --_mono-textarea-padding-x: var(--mono-textarea-padding-x-lg, var(--_mono-textarea-padding-x-preset, calc(var(--mono-spacing) * 2.5)));\r\n --_mono-textarea-font-size: var(--mono-textarea-font-lg, var(--mono-textarea-font-md, var(--mono-text-sm)));\r\n --_mono-textarea-rows: var(--mono-textarea-rows, var(--mono-textarea-rows-lg, 4));\r\n}\r\n\r\n[mono-textarea][mono-size=\"xl\"] {\r\n --_mono-textarea-height: var(--mono-textarea-height-xl, var(--mono-control-height-xl));\r\n --_mono-textarea-padding-x: var(--mono-textarea-padding-x-xl, var(--_mono-textarea-padding-x-preset, calc(var(--mono-spacing) * 3)));\r\n --_mono-textarea-font-size: var(--mono-textarea-font-xl, var(--mono-text-base));\r\n --_mono-textarea-rows: var(--mono-textarea-rows, var(--mono-textarea-rows-xl, 5));\r\n}\r\n\r\n[mono-textarea][mono-size=\"xxl\"] {\r\n --_mono-textarea-height: var(--mono-textarea-height-xxl, var(--mono-control-height-xxl));\r\n --_mono-textarea-padding-x: var(--mono-textarea-padding-x-xxl, var(--_mono-textarea-padding-x-preset, calc(var(--mono-spacing) * 3)));\r\n --_mono-textarea-font-size: var(--mono-textarea-font-xxl, var(--mono-text-base));\r\n --_mono-textarea-rows: var(--mono-textarea-rows, var(--mono-textarea-rows-xxl, 5));\r\n}\r\n\r\n/* =========================================\r\n Colours — EXTENSION: the `color` prop is the FOCUS colour, nothing else\r\n ========================================= */\r\n\r\n[mono-textarea][mono-color=\"secondary\"] {\r\n --_mono-textarea-ring-color-preset: var(--_mono-textarea-secondary);\r\n}\r\n[mono-textarea][mono-color=\"success\"] {\r\n --_mono-textarea-ring-color-preset: var(--_mono-textarea-success);\r\n}\r\n[mono-textarea][mono-color=\"danger\"] {\r\n --_mono-textarea-ring-color-preset: var(--_mono-textarea-danger);\r\n}\r\n[mono-textarea][mono-color=\"warning\"] {\r\n --_mono-textarea-ring-color-preset: var(--_mono-textarea-warning);\r\n}\r\n[mono-textarea][mono-color=\"info\"] {\r\n --_mono-textarea-ring-color-preset: var(--_mono-textarea-info);\r\n}\r\n[mono-textarea][mono-color=\"teal\"] {\r\n --_mono-textarea-ring-color-preset: var(--_mono-textarea-teal);\r\n}\r\n[mono-textarea][mono-color=\"purple\"] {\r\n --_mono-textarea-ring-color-preset: var(--_mono-textarea-purple);\r\n}\r\n[mono-textarea][mono-color=\"neutral\"] {\r\n --_mono-textarea-ring-color-preset: var(--_mono-textarea-neutral);\r\n}\r\n[mono-textarea][mono-color=\"dark\"] {\r\n --_mono-textarea-ring-color-preset: var(--_mono-textarea-dark);\r\n}\r\n\r\n/* =========================================\r\n Label\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 styles/vega.css .field > label, .label\r\n — text-sm leading-snug font-medium */\r\n:where([mono-textarea]) > [mono-label] {\r\n display: flex;\r\n align-items: center;\r\n gap: calc(var(--mono-spacing) * 1);\r\n font-size: var(--mono-textarea-label-font-size, var(--mono-text-sm));\r\n line-height: var(--mono-textarea-label-line-height, var(--mono-leading-snug));\r\n font-weight: var(--mono-textarea-label-font-weight, var(--mono-label-font-weight, var(--mono-font-weight-medium)));\r\n color: var(--mono-textarea-label-color, var(--_mono-textarea-text));\r\n}\r\n\r\n[mono-textarea][mono-validation-state=\"invalid\"] > [mono-label] {\r\n color: var(--mono-textarea-label-color, var(--_mono-textarea-invalid));\r\n}\r\n\r\n:where([mono-textarea]) [mono-required-mark] {\r\n color: var(--mono-textarea-required-color, var(--destructive));\r\n}\r\n\r\n/* =========================================\r\n The field\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 components/textarea.css .field > textarea, .textarea\r\n — flex field-sizing-content min-h-16 w-full outline-none\r\n placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50 */\r\n/* basecoat@1.0.2 styles/vega.css .field > textarea, .textarea\r\n — rounded-md border border-input bg-transparent px-2.5 py-2 text-base md:text-sm\r\n shadow-xs transition-[color,box-shadow] (dark:bg-input/30 via --mono-mode-surface);\r\n mono: `--tw-ring-*` flattened to the ring + shadow slots, and the height is\r\n derived from the control step rather than upstream's flat min-h-16 */\r\n:where([mono-textarea]) [mono-native] {\r\n --_mono-textarea-ring: 0 0 #0000;\r\n display: block;\r\n width: 100%;\r\n min-width: 0;\r\n min-height: var(--_mono-textarea-min-height);\r\n padding: var(--_mono-textarea-padding-y) var(--_mono-textarea-padding-x);\r\n border: var(--_mono-textarea-border-width) solid var(--_mono-textarea-border-color);\r\n border-radius: var(--_mono-textarea-radius);\r\n background-color: var(--_mono-textarea-bg);\r\n color: var(--_mono-textarea-text);\r\n font-family: inherit;\r\n font-size: var(--_mono-textarea-font-size);\r\n line-height: var(--_mono-textarea-line-height);\r\n resize: var(--mono-textarea-resize, vertical);\r\n outline: none;\r\n box-shadow: var(--_mono-textarea-ring), var(--_mono-textarea-shadow);\r\n transition-property: color, background-color, border-color, box-shadow;\r\n transition-timing-function: var(--mono-ease);\r\n transition-duration: var(--mono-duration);\r\n}\r\n\r\n/* Upstream grows the box with `field-sizing: content`, which has no ceiling.\r\n mono's `auto-resize` is a JS height instead, BECAUSE it honours `min-rows` and\r\n `max-rows` — so this rule must not hand the sizing back to the browser, or the\r\n two fight over the height. All the attribute does here is drop the manual grip:\r\n a box that resizes itself should not also offer one. */\r\n[mono-textarea][mono-auto-resize] > [mono-native] {\r\n resize: var(--mono-textarea-resize, none);\r\n}\r\n\r\n/* placeholder:text-muted-foreground */\r\n:where([mono-textarea]) [mono-native]::placeholder {\r\n color: var(--_mono-textarea-placeholder);\r\n opacity: 1;\r\n}\r\n\r\n/* focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 */\r\n:where([mono-textarea]) [mono-native]:focus-visible,\r\n:where([mono-textarea]) [mono-native]:focus {\r\n border-color: var(--_mono-textarea-ring-color);\r\n --_mono-textarea-ring: 0 0 0 var(--_mono-textarea-ring-width) color-mix(in oklab, var(--_mono-textarea-ring-color) var(--_mono-textarea-ring-alpha), transparent);\r\n}\r\n\r\n/* aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20\r\n (dark: /50 and /40, carried by the mode tokens) */\r\n[mono-textarea][mono-validation-state=\"invalid\"] > [mono-native],\r\n:where([mono-textarea]) [mono-native][aria-invalid=\"true\"] {\r\n --_mono-textarea-border-color: var(--mono-mode-invalid-border);\r\n --_mono-textarea-ring: 0 0 0 var(--_mono-textarea-ring-width) var(--mono-mode-invalid-ring);\r\n}\r\n\r\n/* EXTENSION — the same treatment in the success / warning roles */\r\n[mono-textarea][mono-validation-state=\"valid\"] > [mono-native] {\r\n --_mono-textarea-border-color: color-mix(in oklab, var(--_mono-textarea-valid) var(--mono-mode-state-border-alpha), transparent);\r\n --_mono-textarea-ring: 0 0 0 var(--_mono-textarea-ring-width) color-mix(in oklab, var(--_mono-textarea-valid) var(--mono-mode-state-ring-alpha), transparent);\r\n}\r\n\r\n[mono-textarea][mono-validation-state=\"warning\"] > [mono-native] {\r\n --_mono-textarea-border-color: color-mix(in oklab, var(--_mono-textarea-warning) var(--mono-mode-state-border-alpha), transparent);\r\n --_mono-textarea-ring: 0 0 0 var(--_mono-textarea-ring-width) color-mix(in oklab, var(--_mono-textarea-warning) var(--mono-mode-state-ring-alpha), transparent);\r\n}\r\n\r\n/* disabled:cursor-not-allowed disabled:opacity-50 */\r\n[mono-textarea][mono-disabled] > [mono-native],\r\n:where([mono-textarea]) [mono-native]:disabled {\r\n cursor: not-allowed;\r\n opacity: 0.5;\r\n background-color: var(--mono-textarea-disabled-bg, var(--_mono-textarea-bg));\r\n}\r\n\r\n/* EXTENSION — readonly is legible, not dimmed: a muted surface and no caret */\r\n[mono-textarea][mono-readonly] > [mono-native],\r\n:where([mono-textarea]) [mono-native]:read-only:not(:disabled) {\r\n background-color: var(--mono-textarea-readonly-bg, var(--muted));\r\n cursor: default;\r\n}\r\n\r\n/* =========================================\r\n Variants — EXTENSION: the two other looks Basecoat's styles ship\r\n ========================================= */\r\n\r\n/* `outlined` is the default and IS vega's textarea. The `--mono-textarea-outline-*`\r\n knobs are how a FLAVOR restyles this variant alone: writing the shared\r\n `--mono-textarea-bg` would repaint `filled` and `underlined` too (the public\r\n tier out-ranks a variant's preset), which is exactly what made every style's\r\n underlined textarea come out as a filled box. */\r\n[mono-textarea]:is(:not([mono-variant]), [mono-variant=\"outlined\"]) {\r\n --_mono-textarea-bg-preset: var(--mono-textarea-outline-bg);\r\n --_mono-textarea-border-color-preset: var(--mono-textarea-outline-border-color);\r\n --_mono-textarea-side-border-color-preset: var(--mono-textarea-outline-side-border-color);\r\n --_mono-textarea-shadow-preset: var(--mono-textarea-outline-shadow, var(--mono-shadow-xs));\r\n --_mono-textarea-radius-preset: var(--mono-textarea-outline-radius);\r\n --_mono-textarea-padding-x-preset: var(--mono-textarea-outline-padding-x);\r\n --_mono-textarea-ring-width-preset: var(--mono-textarea-outline-ring-width);\r\n}\r\n\r\n/* `filled` ≡ luma / mira / rhea's textarea: a tinted surface, no border, no shadow */\r\n[mono-textarea][mono-variant=\"filled\"] {\r\n --_mono-textarea-bg-preset: var(--mono-textarea-filled-bg, color-mix(in oklab, var(--input) 50%, transparent));\r\n --_mono-textarea-border-color-preset: transparent;\r\n --_mono-textarea-shadow-preset: 0 0 #0000;\r\n}\r\n\r\n/* `underlined` ≡ sera's: square, the bottom edge only, and the ring rides that\r\n edge instead of wrapping the box (never `box-shadow: none` — the resting slot\r\n is neutralised so a focus rule can still fill it) */\r\n[mono-textarea][mono-variant=\"underlined\"] {\r\n --_mono-textarea-radius-preset: 0;\r\n --_mono-textarea-bg-preset: transparent;\r\n /* the bottom edge keeps --_mono-textarea-border-color; only the other three\r\n sides are cleared, through the side slot */\r\n --_mono-textarea-side-border-color-preset: transparent;\r\n --_mono-textarea-shadow-preset: 0 0 #0000;\r\n --_mono-textarea-padding-x-preset: 0px;\r\n --_mono-textarea-ring-width-preset: 0px;\r\n}\r\n\r\n[mono-textarea][mono-variant=\"underlined\"] > [mono-native],\r\n[mono-textarea]:is(:not([mono-variant]), [mono-variant=\"outlined\"]) > [mono-native] {\r\n border-color: var(--_mono-textarea-side-border-color);\r\n border-bottom-color: var(--_mono-textarea-border-color);\r\n}\r\n\r\n[mono-textarea][mono-variant=\"underlined\"] > [mono-native]:is(:focus, :focus-visible) {\r\n border-color: var(--_mono-textarea-side-border-color);\r\n border-bottom-color: var(--_mono-textarea-ring-color);\r\n}\r\n\r\n/* =========================================\r\n Footer — EXTENSION: the message row and the character counter\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 styles/vega.css .fieldset legend + p, .field > p, .field section > p\r\n — text-sm text-muted-foreground leading-normal font-normal */\r\n:where([mono-textarea]) > [mono-footer] {\r\n display: flex;\r\n align-items: flex-start;\r\n justify-content: space-between;\r\n gap: calc(var(--mono-spacing) * 2);\r\n}\r\n\r\n:where([mono-textarea]) [mono-message-wrap] {\r\n flex: 1 1 auto;\r\n min-width: 0;\r\n}\r\n\r\n:where([mono-textarea]) [mono-message] {\r\n font-size: var(--mono-textarea-message-font-size, var(--mono-text-sm));\r\n line-height: var(--mono-textarea-message-line-height, var(--mono-leading-normal));\r\n color: var(--_mono-textarea-muted);\r\n}\r\n\r\n/* .field [role='alert'] — the invalid message is the destructive one */\r\n:where([mono-textarea]) [mono-message=\"invalid\"] {\r\n color: var(--_mono-textarea-invalid);\r\n}\r\n\r\n:where([mono-textarea]) [mono-message=\"valid\"] {\r\n color: var(--_mono-textarea-valid);\r\n}\r\n\r\n:where([mono-textarea]) [mono-message=\"warning\"] {\r\n color: var(--_mono-textarea-warning);\r\n}\r\n\r\n:where([mono-textarea]) [mono-counter] {\r\n flex: 0 0 auto;\r\n font-size: var(--mono-textarea-counter-font-size, var(--mono-text-xs));\r\n line-height: var(--mono-leading-normal);\r\n font-variant-numeric: tabular-nums;\r\n color: var(--_mono-textarea-muted);\r\n}\r\n\r\n:where([mono-textarea]) [mono-counter][mono-near] {\r\n color: var(--_mono-textarea-warning);\r\n}\r\n\r\n:where([mono-textarea]) [mono-counter][mono-over] {\r\n color: var(--_mono-textarea-invalid);\r\n font-weight: var(--mono-font-weight-medium);\r\n}\r\n\r\n@media (prefers-reduced-motion: reduce) {\r\n :where([mono-textarea]) [mono-native] {\r\n transition: none;\r\n }\r\n}\r\n";
|
|
722
|
+
//#endregion
|
|
723
|
+
//#region src/components/textarea/mono-textarea.ts
|
|
724
|
+
var MonoTextarea = class MonoTextarea extends MonoTextareaCore(LitElement) {
|
|
725
|
+
constructor(..._args) {
|
|
726
|
+
super(..._args);
|
|
727
|
+
this._slotsCaptured = false;
|
|
728
|
+
this._slotLabel = [];
|
|
729
|
+
this._slotHelper = [];
|
|
730
|
+
}
|
|
731
|
+
static {
|
|
732
|
+
this.styles = [unsafeCSS(textarea_default)];
|
|
733
|
+
}
|
|
734
|
+
createRenderRoot() {
|
|
735
|
+
return this;
|
|
736
|
+
}
|
|
737
|
+
connectedCallback() {
|
|
738
|
+
super.connectedCallback();
|
|
739
|
+
this._captureSlots();
|
|
740
|
+
if (this.isConnected) this.performUpdate();
|
|
741
|
+
}
|
|
742
|
+
updated(changed) {
|
|
743
|
+
super.updated(changed);
|
|
744
|
+
this._placeSlot("label", this._slotLabel);
|
|
745
|
+
this._placeSlot("helper", this._slotHelper);
|
|
746
|
+
}
|
|
747
|
+
_captureSlots() {
|
|
748
|
+
if (this._slotsCaptured) return;
|
|
749
|
+
this._slotsCaptured = true;
|
|
750
|
+
const captured = monoHostChildNodes(this);
|
|
751
|
+
const capturedSlotNodes = /* @__PURE__ */ new Set();
|
|
752
|
+
for (const node of captured) {
|
|
753
|
+
if (!(node instanceof Element)) continue;
|
|
754
|
+
const slotName = node.getAttribute("slot");
|
|
755
|
+
if (slotName === "label") {
|
|
756
|
+
node.removeAttribute("slot");
|
|
757
|
+
this._slotLabel.push(node);
|
|
758
|
+
capturedSlotNodes.add(node);
|
|
759
|
+
}
|
|
760
|
+
if (slotName === "helper") {
|
|
761
|
+
node.removeAttribute("slot");
|
|
762
|
+
this._slotHelper.push(node);
|
|
763
|
+
capturedSlotNodes.add(node);
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
this._hasLabelSlotState = this._slotLabel.length > 0;
|
|
767
|
+
this._hasHelperSlotState = this._slotHelper.length > 0;
|
|
768
|
+
for (const node of capturedSlotNodes) if (node.parentNode === this) this.removeChild(node);
|
|
769
|
+
}
|
|
770
|
+
_placeSlot(name, nodes) {
|
|
771
|
+
if (!nodes.length) return;
|
|
772
|
+
const target = this.querySelector(`[data-mono-slot="${name}"]`);
|
|
773
|
+
if (!target) return;
|
|
774
|
+
for (const node of nodes) placeSlotNode(target, node);
|
|
775
|
+
}
|
|
776
|
+
};
|
|
777
|
+
MonoTextarea = __decorate([customElement("mono-textarea")], MonoTextarea);
|
|
778
|
+
//#endregion
|
|
779
|
+
//#region src/components/textarea/textarea-utils.ts
|
|
780
|
+
function validateTextareaProps(props) {
|
|
781
|
+
const validSizes = [
|
|
782
|
+
"xs",
|
|
783
|
+
"sm",
|
|
784
|
+
"md",
|
|
785
|
+
"lg",
|
|
786
|
+
"xl",
|
|
787
|
+
"xxl"
|
|
788
|
+
];
|
|
789
|
+
const validColors = [
|
|
790
|
+
"primary",
|
|
791
|
+
"secondary",
|
|
792
|
+
"success",
|
|
793
|
+
"danger",
|
|
794
|
+
"warning",
|
|
795
|
+
"info",
|
|
796
|
+
"teal",
|
|
797
|
+
"purple",
|
|
798
|
+
"neutral",
|
|
799
|
+
"dark"
|
|
800
|
+
];
|
|
801
|
+
const validVariants = [
|
|
802
|
+
"outlined",
|
|
803
|
+
"filled",
|
|
804
|
+
"underlined"
|
|
805
|
+
];
|
|
806
|
+
const validStates = [
|
|
807
|
+
"default",
|
|
808
|
+
"valid",
|
|
809
|
+
"invalid",
|
|
810
|
+
"warning"
|
|
811
|
+
];
|
|
812
|
+
if (props.size && !validSizes.includes(props.size)) return false;
|
|
813
|
+
if (props.color && !validColors.includes(props.color)) return false;
|
|
814
|
+
if (props.variant && !validVariants.includes(props.variant)) return false;
|
|
815
|
+
if (props.validationState && !validStates.includes(props.validationState)) return false;
|
|
816
|
+
return true;
|
|
817
|
+
}
|
|
818
|
+
//#endregion
|
|
819
|
+
export { MonoTextarea, validateTextareaProps };
|