@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.
Files changed (538) hide show
  1. package/LICENSE.md +55 -0
  2. package/README.md +34 -2
  3. package/dist/breakpoints-CAbhDUht.js +84 -0
  4. package/dist/checkbox-Cqpie9Ap.js +4 -0
  5. package/dist/chip-DBUUa2eB.js +4 -0
  6. package/dist/chip-limits-BMoO31JM.js +213 -0
  7. package/dist/chip-strip-Cw3gyz0q.js +213 -0
  8. package/dist/color-DHYrfXsX.js +253 -0
  9. package/dist/css-class-BRKRzHx-.js +60 -0
  10. package/dist/css-size-DhHSVZJK.js +37 -0
  11. package/dist/data/theme/presets.json.d.ts +140 -0
  12. package/dist/data-search-Bwo5bg8K.js +573 -0
  13. package/dist/data-source-controller-C50Qyfzh.js +178 -0
  14. package/dist/data-source-options-BTpfrOZ_.js +535 -0
  15. package/dist/data-source-options-CQSTZHPE.js +537 -0
  16. package/dist/data-source-read-CUX-lgrQ.js +216 -0
  17. package/dist/data-source-read-DL88aH8t.js +217 -0
  18. package/dist/decorate-DEXtNagw.js +141 -0
  19. package/dist/element-props-CLB6yvbm.js +114 -0
  20. package/dist/esm-Ptok4SQZ.js +2026 -0
  21. package/dist/excel-CY6zGkcx.js +608 -0
  22. package/dist/excel-DopRbEMK.js +608 -0
  23. package/dist/export-BvlBx_GZ.js +2302 -0
  24. package/dist/export.d.ts +1 -0
  25. package/dist/export.js +2302 -0
  26. package/dist/field-icons-BoOG6KrL.js +51 -0
  27. package/dist/field-path-C92eGLg3.js +251 -0
  28. package/dist/filter-builder-Bke3qOgJ.js +205 -0
  29. package/dist/filter-builder-CE4zE0V5.js +205 -0
  30. package/dist/filter-eval-DIfU2EAn.js +173 -0
  31. package/dist/filter-odata-C1vSGZaY.js +591 -0
  32. package/dist/form-control-core-B8d7k6vk.js +223 -0
  33. package/dist/form-control-core-eeRr0zLU.js +223 -0
  34. package/dist/hydration-flush-RB5Tz5nl.js +1001 -0
  35. package/dist/icon-CJkTlmTb.js +55 -0
  36. package/dist/icon-dVhYJUIH.js +17 -0
  37. package/dist/import-BgJdkwBI.js +606 -0
  38. package/dist/import.d.ts +1 -0
  39. package/dist/import.js +606 -0
  40. package/dist/index.d.ts +1 -0
  41. package/dist/index.js +16 -0
  42. package/dist/index.node-DjvYOL-J.js +395 -0
  43. package/dist/index.node.d.ts +1 -0
  44. package/dist/index.node.js +16 -0
  45. package/dist/input-zGOULADt.js +4 -0
  46. package/dist/layout-var-CZnzMC0s.js +73 -0
  47. package/dist/light-slots-BVJwyg_2.js +244 -0
  48. package/dist/light-slots-DW1WgfgT.js +254 -0
  49. package/dist/markdown-DfqrfOJN.js +20146 -0
  50. package/dist/mono-button-CoVnBLav.js +873 -0
  51. package/dist/mono-button.shadow-FfP_hMH4.js +784 -0
  52. package/dist/mono-data-chart-ChU4Ii3p.js +738 -0
  53. package/dist/mono-data-dropdown-BAUl58kW.js +357 -0
  54. package/dist/mono-data-grid-CLBK8clE.js +4140 -0
  55. package/dist/mono-data-grid-Db80FzdZ.js +4142 -0
  56. package/dist/mono-element-B0kP_96P.js +232 -0
  57. package/dist/mono-event-Bi1qP9uN.js +129 -0
  58. package/dist/mono-form-controller-5PfsU4qa.js +409 -0
  59. package/dist/mono-modal-controller-BMO3n3rP.js +223 -0
  60. package/dist/mono-ui-CPV7rrdo.js +358 -0
  61. package/dist/notifier-CE4yxMUQ.js +88 -0
  62. package/dist/nuxt.d.ts +1 -0
  63. package/dist/nuxt.js +130 -0
  64. package/dist/popup-portal-BziRX1yG.js +465 -0
  65. package/dist/popup-stack-CEEMib__.js +189 -0
  66. package/dist/rate-limit-BBa2PO79.js +521 -0
  67. package/dist/reactive-BHsqVjRh.js +789 -0
  68. package/dist/reactive-D3EERqgO.js +47 -0
  69. package/dist/search.d.ts +1 -0
  70. package/dist/search.js +97 -0
  71. package/dist/src/components/accordion/accordion-core.d.ts +62 -0
  72. package/dist/src/components/accordion/accordion-types.d.ts +62 -0
  73. package/dist/src/components/accordion/index.d.ts +3 -0
  74. package/dist/src/components/accordion/index.shadow.d.ts +5 -0
  75. package/dist/src/components/accordion/mono-accordion.d.ts +55 -0
  76. package/dist/src/components/accordion/mono-accordion.shadow.d.ts +56 -0
  77. package/dist/src/components/alert/alert-core.d.ts +46 -0
  78. package/dist/src/components/alert/alert-types.d.ts +44 -0
  79. package/dist/src/components/alert/index.d.ts +3 -0
  80. package/dist/src/components/alert/index.shadow.d.ts +5 -0
  81. package/dist/src/components/alert/mono-alert.d.ts +44 -0
  82. package/dist/src/components/alert/mono-alert.shadow.d.ts +34 -0
  83. package/dist/src/components/breadcrumb/breadcrumb-core.d.ts +61 -0
  84. package/dist/src/components/breadcrumb/breadcrumb-list-core.d.ts +49 -0
  85. package/dist/src/components/breadcrumb/breadcrumb-render.d.ts +31 -0
  86. package/dist/src/components/breadcrumb/breadcrumb-types.d.ts +117 -0
  87. package/dist/src/components/breadcrumb/breadcrumb-utils.d.ts +43 -0
  88. package/dist/src/components/breadcrumb/index.d.ts +6 -0
  89. package/dist/src/components/breadcrumb/index.shadow.d.ts +8 -0
  90. package/dist/src/components/breadcrumb/mono-breadcrumb-list.d.ts +29 -0
  91. package/dist/src/components/breadcrumb/mono-breadcrumb-list.shadow.d.ts +48 -0
  92. package/dist/src/components/breadcrumb/mono-breadcrumb.d.ts +38 -0
  93. package/dist/src/components/breadcrumb/mono-breadcrumb.shadow.d.ts +73 -0
  94. package/dist/src/components/button/button-core.d.ts +90 -0
  95. package/dist/src/components/button/button-dropdown-core.d.ts +57 -0
  96. package/dist/src/components/button/button-dropdown-types.d.ts +129 -0
  97. package/dist/src/components/button/button-types.d.ts +219 -0
  98. package/dist/src/components/button/button-utils.d.ts +18 -0
  99. package/dist/src/components/button/index.button-dropdown.d.ts +4 -0
  100. package/dist/src/components/button/index.button-dropdown.shadow.d.ts +4 -0
  101. package/dist/src/components/button/index.d.ts +8 -0
  102. package/dist/src/components/button/index.shadow.d.ts +5 -0
  103. package/dist/src/components/button/mono-button-dropdown.d.ts +35 -0
  104. package/dist/src/components/button/mono-button-dropdown.shadow.d.ts +45 -0
  105. package/dist/src/components/button/mono-button.d.ts +123 -0
  106. package/dist/src/components/button/mono-button.shadow.d.ts +56 -0
  107. package/dist/src/components/card/card-core.d.ts +74 -0
  108. package/dist/src/components/card/card-types.d.ts +137 -0
  109. package/dist/src/components/card/card-utils.d.ts +23 -0
  110. package/dist/src/components/card/index.d.ts +4 -0
  111. package/dist/src/components/card/index.shadow.d.ts +6 -0
  112. package/dist/src/components/card/mono-card.d.ts +56 -0
  113. package/dist/src/components/card/mono-card.shadow.d.ts +52 -0
  114. package/dist/src/components/chart/chart-core.d.ts +43 -0
  115. package/dist/src/components/chart/chart-odata.d.ts +52 -0
  116. package/dist/src/components/chart/chart-types.d.ts +337 -0
  117. package/dist/src/components/chart/index.d.ts +8 -0
  118. package/dist/src/components/chart/index.shadow.d.ts +7 -0
  119. package/dist/src/components/chart/mono-chart-presets.d.ts +43 -0
  120. package/dist/src/components/chart/mono-chart-presets.shadow.d.ts +43 -0
  121. package/dist/src/components/chart/mono-chart.d.ts +30 -0
  122. package/dist/src/components/chart/mono-chart.shadow.d.ts +22 -0
  123. package/dist/src/components/chart/mono-data-chart.d.ts +27 -0
  124. package/dist/src/components/checkbox/checkbox-core.d.ts +53 -0
  125. package/dist/src/components/checkbox/checkbox-types.d.ts +69 -0
  126. package/dist/src/components/checkbox/checkbox-utils.d.ts +35 -0
  127. package/dist/src/components/checkbox/index.d.ts +4 -0
  128. package/dist/src/components/checkbox/index.shadow.d.ts +5 -0
  129. package/dist/src/components/checkbox/mono-checkbox.d.ts +34 -0
  130. package/dist/src/components/checkbox/mono-checkbox.shadow.d.ts +45 -0
  131. package/dist/src/components/chip/chip-core.d.ts +58 -0
  132. package/dist/src/components/chip/chip-types.d.ts +142 -0
  133. package/dist/src/components/chip/chip-utils.d.ts +24 -0
  134. package/dist/src/components/chip/index.d.ts +8 -0
  135. package/dist/src/components/chip/index.shadow.d.ts +6 -0
  136. package/dist/src/components/chip/mono-chip.d.ts +48 -0
  137. package/dist/src/components/chip/mono-chip.shadow.d.ts +33 -0
  138. package/dist/src/components/chip/mono-status-dot.d.ts +34 -0
  139. package/dist/src/components/date/date-core.d.ts +80 -0
  140. package/dist/src/components/date/date-types.d.ts +163 -0
  141. package/dist/src/components/date/index.d.ts +3 -0
  142. package/dist/src/components/date/index.shadow.d.ts +4 -0
  143. package/dist/src/components/date/mono-date.d.ts +22 -0
  144. package/dist/src/components/date/mono-date.shadow.d.ts +31 -0
  145. package/dist/src/components/drawer/drawer-core.d.ts +99 -0
  146. package/dist/src/components/drawer/drawer-types.d.ts +153 -0
  147. package/dist/src/components/drawer/index.d.ts +3 -0
  148. package/dist/src/components/drawer/index.shadow.d.ts +4 -0
  149. package/dist/src/components/drawer/mono-drawer.d.ts +45 -0
  150. package/dist/src/components/drawer/mono-drawer.shadow.d.ts +46 -0
  151. package/dist/src/components/dropdown/dropdown-core.d.ts +33 -0
  152. package/dist/src/components/dropdown/dropdown-types.d.ts +88 -0
  153. package/dist/src/components/dropdown/index.d.ts +3 -0
  154. package/dist/src/components/dropdown/index.shadow.d.ts +4 -0
  155. package/dist/src/components/dropdown/mono-dropdown.d.ts +34 -0
  156. package/dist/src/components/dropdown/mono-dropdown.shadow.d.ts +28 -0
  157. package/dist/src/components/dropdown-table/dropdown-table-core.d.ts +65 -0
  158. package/dist/src/components/dropdown-table/dropdown-table-types.d.ts +278 -0
  159. package/dist/src/components/dropdown-table/index.d.ts +5 -0
  160. package/dist/src/components/dropdown-table/index.shadow.d.ts +6 -0
  161. package/dist/src/components/dropdown-table/mono-data-dropdown.d.ts +152 -0
  162. package/dist/src/components/dropdown-table/mono-dropdown-table.d.ts +46 -0
  163. package/dist/src/components/dropdown-table/mono-dropdown-table.shadow.d.ts +22 -0
  164. package/dist/src/components/file-upload/file-upload-core.d.ts +60 -0
  165. package/dist/src/components/file-upload/file-upload-types.d.ts +145 -0
  166. package/dist/src/components/file-upload/file-upload-utils.d.ts +16 -0
  167. package/dist/src/components/file-upload/index.d.ts +4 -0
  168. package/dist/src/components/file-upload/index.shadow.d.ts +5 -0
  169. package/dist/src/components/file-upload/mono-file-upload.d.ts +33 -0
  170. package/dist/src/components/file-upload/mono-file-upload.shadow.d.ts +50 -0
  171. package/dist/src/components/filter/filter-builder-core.d.ts +36 -0
  172. package/dist/src/components/filter/filter-builder.d.ts +23 -0
  173. package/dist/src/components/filter/filter-odata.d.ts +27 -0
  174. package/dist/src/components/filter/filter-operators.d.ts +13 -0
  175. package/dist/src/components/filter/filter-types.d.ts +253 -0
  176. package/dist/src/components/filter/index.d.ts +6 -0
  177. package/dist/src/components/filter/index.shadow.d.ts +7 -0
  178. package/dist/src/components/filter/mono-filter-builder.d.ts +21 -0
  179. package/dist/src/components/filter/mono-filter-builder.shadow.d.ts +17 -0
  180. package/dist/src/components/form/form-control-core.d.ts +37 -0
  181. package/dist/src/components/form/form-rules.d.ts +25 -0
  182. package/dist/src/components/form/form-types.d.ts +307 -0
  183. package/dist/src/components/form/index.d.ts +6 -0
  184. package/dist/src/components/form/mono-form-controller.d.ts +16 -0
  185. package/dist/src/components/input/index.d.ts +6 -0
  186. package/dist/src/components/input/index.shadow.d.ts +8 -0
  187. package/dist/src/components/input/input-core.d.ts +91 -0
  188. package/dist/src/components/input/input-format.d.ts +118 -0
  189. package/dist/src/components/input/input-types.d.ts +179 -0
  190. package/dist/src/components/input/input-utils.d.ts +10 -0
  191. package/dist/src/components/input/mono-input.d.ts +46 -0
  192. package/dist/src/components/input/mono-input.shadow.d.ts +34 -0
  193. package/dist/src/components/menu/index.d.ts +6 -0
  194. package/dist/src/components/menu/index.shadow.d.ts +7 -0
  195. package/dist/src/components/menu/menu-core.d.ts +65 -0
  196. package/dist/src/components/menu/menu-render.d.ts +55 -0
  197. package/dist/src/components/menu/menu-types.d.ts +195 -0
  198. package/dist/src/components/menu/menu-utils.d.ts +53 -0
  199. package/dist/src/components/menu/mono-menu-list.d.ts +118 -0
  200. package/dist/src/components/menu/mono-menu.d.ts +39 -0
  201. package/dist/src/components/menu/mono-menu.shadow.d.ts +40 -0
  202. package/dist/src/components/modal/index.d.ts +4 -0
  203. package/dist/src/components/modal/index.shadow.d.ts +5 -0
  204. package/dist/src/components/modal/modal-core.d.ts +110 -0
  205. package/dist/src/components/modal/modal-types.d.ts +304 -0
  206. package/dist/src/components/modal/mono-modal-controller.d.ts +4 -0
  207. package/dist/src/components/modal/mono-modal.d.ts +45 -0
  208. package/dist/src/components/modal/mono-modal.shadow.d.ts +50 -0
  209. package/dist/src/components/nav/index.d.ts +4 -0
  210. package/dist/src/components/nav/index.shadow.d.ts +6 -0
  211. package/dist/src/components/nav/mono-nav.d.ts +41 -0
  212. package/dist/src/components/nav/mono-nav.shadow.d.ts +21 -0
  213. package/dist/src/components/nav/nav-core.d.ts +34 -0
  214. package/dist/src/components/nav/nav-types.d.ts +48 -0
  215. package/dist/src/components/nav/nav-utils.d.ts +12 -0
  216. package/dist/src/components/radio/index.d.ts +4 -0
  217. package/dist/src/components/radio/index.shadow.d.ts +5 -0
  218. package/dist/src/components/radio/mono-radio.d.ts +31 -0
  219. package/dist/src/components/radio/mono-radio.shadow.d.ts +35 -0
  220. package/dist/src/components/radio/radio-core.d.ts +45 -0
  221. package/dist/src/components/radio/radio-types.d.ts +58 -0
  222. package/dist/src/components/radio/radio-utils.d.ts +12 -0
  223. package/dist/src/components/rich-text-editor/index.d.ts +5 -0
  224. package/dist/src/components/rich-text-editor/index.shadow.d.ts +6 -0
  225. package/dist/src/components/rich-text-editor/mono-rich-text-editor.d.ts +31 -0
  226. package/dist/src/components/rich-text-editor/mono-rich-text-editor.shadow.d.ts +34 -0
  227. package/dist/src/components/rich-text-editor/rich-text-editor-core.d.ts +100 -0
  228. package/dist/src/components/rich-text-editor/rich-text-editor-loader.d.ts +17 -0
  229. package/dist/src/components/rich-text-editor/rich-text-editor-toolbar.d.ts +65 -0
  230. package/dist/src/components/rich-text-editor/rich-text-editor-types.d.ts +231 -0
  231. package/dist/src/components/select/index.d.ts +4 -0
  232. package/dist/src/components/select/index.shadow.d.ts +5 -0
  233. package/dist/src/components/select/mono-select.d.ts +69 -0
  234. package/dist/src/components/select/mono-select.shadow.d.ts +48 -0
  235. package/dist/src/components/select/select-core.d.ts +98 -0
  236. package/dist/src/components/select/select-types.d.ts +258 -0
  237. package/dist/src/components/select/select-utils.d.ts +7 -0
  238. package/dist/src/components/sidebar/index.d.ts +4 -0
  239. package/dist/src/components/sidebar/index.shadow.d.ts +6 -0
  240. package/dist/src/components/sidebar/mono-sidebar.d.ts +34 -0
  241. package/dist/src/components/sidebar/mono-sidebar.shadow.d.ts +27 -0
  242. package/dist/src/components/sidebar/sidebar-core.d.ts +51 -0
  243. package/dist/src/components/sidebar/sidebar-types.d.ts +119 -0
  244. package/dist/src/components/sidebar/sidebar-utils.d.ts +55 -0
  245. package/dist/src/components/switch/index.d.ts +4 -0
  246. package/dist/src/components/switch/index.shadow.d.ts +5 -0
  247. package/dist/src/components/switch/mono-switch.d.ts +31 -0
  248. package/dist/src/components/switch/mono-switch.shadow.d.ts +36 -0
  249. package/dist/src/components/switch/switch-core.d.ts +49 -0
  250. package/dist/src/components/switch/switch-types.d.ts +64 -0
  251. package/dist/src/components/switch/switch-utils.d.ts +12 -0
  252. package/dist/src/components/table/array-source.d.ts +44 -0
  253. package/dist/src/components/table/date-filter-tree.d.ts +93 -0
  254. package/dist/src/components/table/grouping.d.ts +55 -0
  255. package/dist/src/components/table/index.d.ts +33 -0
  256. package/dist/src/components/table/index.shadow.d.ts +47 -0
  257. package/dist/src/components/table/mono-data-grid.d.ts +1756 -0
  258. package/dist/src/components/table/mono-table-checkbox-core.d.ts +76 -0
  259. package/dist/src/components/table/mono-table-checkbox.d.ts +34 -0
  260. package/dist/src/components/table/mono-table-checkbox.shadow.d.ts +26 -0
  261. package/dist/src/components/table/mono-table-detail-core.d.ts +87 -0
  262. package/dist/src/components/table/mono-table-detail.d.ts +32 -0
  263. package/dist/src/components/table/mono-table-detail.shadow.d.ts +31 -0
  264. package/dist/src/components/table/mono-table-empty-core.d.ts +60 -0
  265. package/dist/src/components/table/mono-table-empty.d.ts +35 -0
  266. package/dist/src/components/table/mono-table-empty.shadow.d.ts +40 -0
  267. package/dist/src/components/table/mono-table-error-core.d.ts +84 -0
  268. package/dist/src/components/table/mono-table-error.d.ts +28 -0
  269. package/dist/src/components/table/mono-table-error.shadow.d.ts +21 -0
  270. package/dist/src/components/table/mono-table-info-core.d.ts +13 -0
  271. package/dist/src/components/table/mono-table-info.d.ts +19 -0
  272. package/dist/src/components/table/mono-table-info.shadow.d.ts +14 -0
  273. package/dist/src/components/table/mono-table-loading-core.d.ts +41 -0
  274. package/dist/src/components/table/mono-table-loading.d.ts +50 -0
  275. package/dist/src/components/table/mono-table-loading.shadow.d.ts +14 -0
  276. package/dist/src/components/table/mono-table-page-size-core.d.ts +14 -0
  277. package/dist/src/components/table/mono-table-page-size.d.ts +16 -0
  278. package/dist/src/components/table/mono-table-page-size.shadow.d.ts +11 -0
  279. package/dist/src/components/table/mono-table-paging-core.d.ts +22 -0
  280. package/dist/src/components/table/mono-table-paging-group-core.d.ts +18 -0
  281. package/dist/src/components/table/mono-table-paging-group.d.ts +20 -0
  282. package/dist/src/components/table/mono-table-paging-group.shadow.d.ts +13 -0
  283. package/dist/src/components/table/mono-table-paging.d.ts +16 -0
  284. package/dist/src/components/table/mono-table-paging.shadow.d.ts +11 -0
  285. package/dist/src/components/table/mono-table-search-core.d.ts +74 -0
  286. package/dist/src/components/table/mono-table-search.d.ts +34 -0
  287. package/dist/src/components/table/mono-table-search.shadow.d.ts +21 -0
  288. package/dist/src/components/table/mono-table-sort-core.d.ts +35 -0
  289. package/dist/src/components/table/mono-table-sort.d.ts +38 -0
  290. package/dist/src/components/table/mono-table-sort.shadow.d.ts +20 -0
  291. package/dist/src/components/table/mono-table-summary-core.d.ts +26 -0
  292. package/dist/src/components/table/mono-table-summary.d.ts +24 -0
  293. package/dist/src/components/table/mono-table-summary.shadow.d.ts +14 -0
  294. package/dist/src/components/table/mono-table-th-core.d.ts +56 -0
  295. package/dist/src/components/table/mono-table-th.d.ts +41 -0
  296. package/dist/src/components/table/mono-table-th.shadow.d.ts +19 -0
  297. package/dist/src/components/table/store-group-source.d.ts +24 -0
  298. package/dist/src/components/table/table-controller-core.d.ts +40 -0
  299. package/dist/src/components/table/table-filter-icons.d.ts +3 -0
  300. package/dist/src/components/table/table-menu-core.d.ts +65 -0
  301. package/dist/src/components/table/table-overlay.d.ts +165 -0
  302. package/dist/src/components/table/table-sort-icons.d.ts +4 -0
  303. package/dist/src/components/table/table-sort-utils.d.ts +20 -0
  304. package/dist/src/components/table/table-types.d.ts +475 -0
  305. package/dist/src/components/tabs/index.d.ts +3 -0
  306. package/dist/src/components/tabs/index.shadow.d.ts +4 -0
  307. package/dist/src/components/tabs/mono-tabs.d.ts +33 -0
  308. package/dist/src/components/tabs/mono-tabs.shadow.d.ts +37 -0
  309. package/dist/src/components/tabs/tabs-core.d.ts +57 -0
  310. package/dist/src/components/tabs/tabs-types.d.ts +65 -0
  311. package/dist/src/components/tag-input/index.d.ts +4 -0
  312. package/dist/src/components/tag-input/index.shadow.d.ts +5 -0
  313. package/dist/src/components/tag-input/mono-tag-input.d.ts +66 -0
  314. package/dist/src/components/tag-input/mono-tag-input.shadow.d.ts +40 -0
  315. package/dist/src/components/tag-input/tag-input-core.d.ts +108 -0
  316. package/dist/src/components/tag-input/tag-input-types.d.ts +394 -0
  317. package/dist/src/components/tag-input/tag-input-utils.d.ts +8 -0
  318. package/dist/src/components/textarea/index.d.ts +4 -0
  319. package/dist/src/components/textarea/index.shadow.d.ts +5 -0
  320. package/dist/src/components/textarea/mono-textarea.d.ts +29 -0
  321. package/dist/src/components/textarea/mono-textarea.shadow.d.ts +31 -0
  322. package/dist/src/components/textarea/textarea-core.d.ts +60 -0
  323. package/dist/src/components/textarea/textarea-types.d.ts +131 -0
  324. package/dist/src/components/textarea/textarea-utils.d.ts +7 -0
  325. package/dist/src/components/tooltip/control-tooltip.d.ts +36 -0
  326. package/dist/src/components/tooltip/index.d.ts +6 -0
  327. package/dist/src/components/tooltip/tooltip-config.d.ts +27 -0
  328. package/dist/src/components/tooltip/tooltip-declarative.d.ts +41 -0
  329. package/dist/src/components/tooltip/tooltip-loader.d.ts +1 -0
  330. package/dist/src/components/tooltip/tooltip-types.d.ts +110 -0
  331. package/dist/src/composables/breakpoints.d.ts +59 -0
  332. package/dist/src/composables/chip-limits.d.ts +48 -0
  333. package/dist/src/composables/chip-strip.d.ts +93 -0
  334. package/dist/src/composables/color.d.ts +103 -0
  335. package/dist/src/composables/css-class.d.ts +27 -0
  336. package/dist/src/composables/css-size.d.ts +40 -0
  337. package/dist/src/composables/data-source-controller.d.ts +84 -0
  338. package/dist/src/composables/element-props.d.ts +46 -0
  339. package/dist/src/composables/field-icons.d.ts +7 -0
  340. package/dist/src/composables/hybird-prop.d.ts +79 -0
  341. package/dist/src/composables/hydration-flush.d.ts +34 -0
  342. package/dist/src/composables/icon.d.ts +17 -0
  343. package/dist/src/composables/layout-var.d.ts +34 -0
  344. package/dist/src/composables/light-slots.d.ts +133 -0
  345. package/dist/src/composables/mdi-glyphs.d.ts +4 -0
  346. package/dist/src/composables/mono-element.d.ts +9 -0
  347. package/dist/src/composables/mono-event.d.ts +55 -0
  348. package/dist/src/composables/mono-pending.d.ts +8 -0
  349. package/dist/src/composables/mono-skeleton.d.ts +193 -0
  350. package/dist/src/composables/mono-ui.d.ts +58 -0
  351. package/dist/src/composables/notifier.d.ts +46 -0
  352. package/dist/src/composables/popup-portal.d.ts +226 -0
  353. package/dist/src/composables/popup-stack.d.ts +70 -0
  354. package/dist/src/composables/rate-limit.d.ts +108 -0
  355. package/dist/src/composables/reactive.d.ts +53 -0
  356. package/dist/src/composables/shadow-css.d.ts +42 -0
  357. package/dist/src/composables/visibility.d.ts +36 -0
  358. package/dist/src/data/theme/index.d.ts +30 -0
  359. package/dist/src/data/theme/presets.d.ts +94 -0
  360. package/dist/src/entries/index.d.ts +2 -0
  361. package/dist/src/entries/index.node.d.ts +42 -0
  362. package/dist/src/entries/search.d.ts +3 -0
  363. package/dist/src/export/detail.d.ts +29 -0
  364. package/dist/src/export/download.d.ts +9 -0
  365. package/dist/src/export/excel/index.d.ts +27 -0
  366. package/dist/src/export/excel/nodes.d.ts +123 -0
  367. package/dist/src/export/expression.d.ts +36 -0
  368. package/dist/src/export/helpers.d.ts +6 -0
  369. package/dist/src/export/index.d.ts +13 -0
  370. package/dist/src/export/markdown.d.ts +52 -0
  371. package/dist/src/export/resolve-data.d.ts +31 -0
  372. package/dist/src/export/sentinel.d.ts +97 -0
  373. package/dist/src/export/sheet-name.d.ts +45 -0
  374. package/dist/src/export/styles.d.ts +33 -0
  375. package/dist/src/export/template.d.ts +10 -0
  376. package/dist/src/export/types.d.ts +259 -0
  377. package/dist/src/import/coerce.d.ts +38 -0
  378. package/dist/src/import/index.d.ts +16 -0
  379. package/dist/src/import/match.d.ts +54 -0
  380. package/dist/src/import/parse.d.ts +15 -0
  381. package/dist/src/import/types.d.ts +153 -0
  382. package/dist/src/nuxt/index.d.ts +94 -0
  383. package/dist/src/search/data-search.d.ts +207 -0
  384. package/dist/src/search/field-path.d.ts +107 -0
  385. package/dist/src/search/filter-eval.d.ts +30 -0
  386. package/dist/src/search/index.d.ts +22 -0
  387. package/dist/src/search/odata-search.d.ts +18 -0
  388. package/dist/src/search/search-expr.d.ts +160 -0
  389. package/dist/src/utils/data-source-apply.d.ts +97 -0
  390. package/dist/src/utils/data-source-options.d.ts +116 -0
  391. package/dist/src/utils/data-source-read.d.ts +85 -0
  392. package/dist/src/utils/data-source-summary.d.ts +55 -0
  393. package/dist/src/utils/normalize-error.d.ts +60 -0
  394. package/dist/src/vite/index.d.ts +48 -0
  395. package/dist/src/vite/mono-client-only.d.ts +35 -0
  396. package/dist/src/vite/mono-ssr-stub.d.ts +20 -0
  397. package/dist/src/vite/shadow-manifest.d.ts +8 -0
  398. package/dist/styles-BIJ31TM4.js +20146 -0
  399. package/dist/tooltip-CysgRgBi.js +760 -0
  400. package/dist/tooltip.d.ts +1 -0
  401. package/dist/tooltip.js +2 -0
  402. package/dist/ui/accordion.d.ts +1 -0
  403. package/dist/ui/accordion.js +466 -0
  404. package/dist/ui/alert.d.ts +1 -0
  405. package/dist/ui/alert.js +221 -0
  406. package/dist/ui/breadcrumb.d.ts +1 -0
  407. package/dist/ui/breadcrumb.js +902 -0
  408. package/dist/ui/button-dropdown.d.ts +1 -0
  409. package/dist/ui/button-dropdown.js +679 -0
  410. package/dist/ui/button.d.ts +1 -0
  411. package/dist/ui/button.js +63 -0
  412. package/dist/ui/card.d.ts +1 -0
  413. package/dist/ui/card.js +511 -0
  414. package/dist/ui/chart.d.ts +1 -0
  415. package/dist/ui/chart.js +808 -0
  416. package/dist/ui/checkbox.d.ts +1 -0
  417. package/dist/ui/checkbox.js +413 -0
  418. package/dist/ui/chip.d.ts +1 -0
  419. package/dist/ui/chip.js +558 -0
  420. package/dist/ui/date.d.ts +1 -0
  421. package/dist/ui/date.js +686 -0
  422. package/dist/ui/drawer.d.ts +1 -0
  423. package/dist/ui/drawer.js +901 -0
  424. package/dist/ui/dropdown-table.d.ts +1 -0
  425. package/dist/ui/dropdown-table.js +1291 -0
  426. package/dist/ui/dropdown.d.ts +1 -0
  427. package/dist/ui/dropdown.js +586 -0
  428. package/dist/ui/file-upload.d.ts +1 -0
  429. package/dist/ui/file-upload.js +688 -0
  430. package/dist/ui/filter.d.ts +1 -0
  431. package/dist/ui/filter.js +400 -0
  432. package/dist/ui/font/files/geist-47c091c9.woff2 +0 -0
  433. package/dist/ui/font/files/geist-8dd77544.woff2 +0 -0
  434. package/dist/ui/font/files/geist-b9248b1e.woff2 +0 -0
  435. package/dist/ui/font/files/geist-d40d74b4.woff2 +0 -0
  436. package/dist/ui/font/files/geist-f493429a.woff2 +0 -0
  437. package/dist/ui/font/files/geistmono-03737868.woff2 +0 -0
  438. package/dist/ui/font/files/geistmono-421a7e38.woff2 +0 -0
  439. package/dist/ui/font/files/geistmono-48ef518d.woff2 +0 -0
  440. package/dist/ui/font/files/geistmono-5df35d39.woff2 +0 -0
  441. package/dist/ui/font/files/geistmono-7de289a4.woff2 +0 -0
  442. package/dist/ui/font/files/geistmono-e976128f.woff2 +0 -0
  443. package/dist/ui/font/files/inter-05cf802c.woff2 +0 -0
  444. package/dist/ui/font/files/inter-2b2f25a4.woff2 +0 -0
  445. package/dist/ui/font/files/inter-467acc7a.woff2 +0 -0
  446. package/dist/ui/font/files/inter-6e85163c.woff2 +0 -0
  447. package/dist/ui/font/files/inter-7048add3.woff2 +0 -0
  448. package/dist/ui/font/files/inter-9be0371e.woff2 +0 -0
  449. package/dist/ui/font/files/inter-a28b7e31.woff2 +0 -0
  450. package/dist/ui/font/files/poppins-054df55a.woff2 +0 -0
  451. package/dist/ui/font/files/poppins-0ee5dc9a.woff2 +0 -0
  452. package/dist/ui/font/files/poppins-0f44cb18.woff2 +0 -0
  453. package/dist/ui/font/files/poppins-0ff0d30c.woff2 +0 -0
  454. package/dist/ui/font/files/poppins-13045147.woff2 +0 -0
  455. package/dist/ui/font/files/poppins-1db57cd9.woff2 +0 -0
  456. package/dist/ui/font/files/poppins-2cf2a902.woff2 +0 -0
  457. package/dist/ui/font/files/poppins-39e7f079.woff2 +0 -0
  458. package/dist/ui/font/files/poppins-9607042d.woff2 +0 -0
  459. package/dist/ui/font/files/poppins-9a88fc1f.woff2 +0 -0
  460. package/dist/ui/font/files/poppins-b8f4f752.woff2 +0 -0
  461. package/dist/ui/font/files/poppins-f5e57db4.woff2 +0 -0
  462. package/dist/ui/font/geist-mono.css +104 -0
  463. package/dist/ui/font/geist.css +168 -0
  464. package/dist/ui/font/inter.css +232 -0
  465. package/dist/ui/font/poppins.css +104 -0
  466. package/dist/ui/form.d.ts +1 -0
  467. package/dist/ui/form.js +3 -0
  468. package/dist/ui/index.css +21826 -0
  469. package/dist/ui/input.d.ts +1 -0
  470. package/dist/ui/input.js +1176 -0
  471. package/dist/ui/menu.d.ts +1 -0
  472. package/dist/ui/menu.js +1289 -0
  473. package/dist/ui/modal.d.ts +1 -0
  474. package/dist/ui/modal.js +995 -0
  475. package/dist/ui/nav.d.ts +1 -0
  476. package/dist/ui/nav.js +295 -0
  477. package/dist/ui/radio.d.ts +1 -0
  478. package/dist/ui/radio.js +379 -0
  479. package/dist/ui/rich-text-editor.d.ts +1 -0
  480. package/dist/ui/rich-text-editor.js +1338 -0
  481. package/dist/ui/select.d.ts +1 -0
  482. package/dist/ui/select.js +2066 -0
  483. package/dist/ui/shadow/accordion.js +442 -0
  484. package/dist/ui/shadow/alert.js +218 -0
  485. package/dist/ui/shadow/breadcrumb.js +919 -0
  486. package/dist/ui/shadow/button-dropdown.js +696 -0
  487. package/dist/ui/shadow/button.js +63 -0
  488. package/dist/ui/shadow/card.js +524 -0
  489. package/dist/ui/shadow/chart.js +1569 -0
  490. package/dist/ui/shadow/checkbox.js +457 -0
  491. package/dist/ui/shadow/chip.js +559 -0
  492. package/dist/ui/shadow/date.js +712 -0
  493. package/dist/ui/shadow/drawer.js +869 -0
  494. package/dist/ui/shadow/dropdown-table.js +1620 -0
  495. package/dist/ui/shadow/dropdown.js +547 -0
  496. package/dist/ui/shadow/file-upload.js +731 -0
  497. package/dist/ui/shadow/filter.js +402 -0
  498. package/dist/ui/shadow/input.js +1150 -0
  499. package/dist/ui/shadow/menu.js +899 -0
  500. package/dist/ui/shadow/modal.js +1193 -0
  501. package/dist/ui/shadow/nav.js +240 -0
  502. package/dist/ui/shadow/radio.js +408 -0
  503. package/dist/ui/shadow/rich-text-editor.js +1344 -0
  504. package/dist/ui/shadow/select.js +2033 -0
  505. package/dist/ui/shadow/sidebar.js +606 -0
  506. package/dist/ui/shadow/switch.js +428 -0
  507. package/dist/ui/shadow/table.js +4755 -0
  508. package/dist/ui/shadow/tabs.js +372 -0
  509. package/dist/ui/shadow/tag-input.js +2846 -0
  510. package/dist/ui/shadow/textarea.js +816 -0
  511. package/dist/ui/sidebar.d.ts +1 -0
  512. package/dist/ui/sidebar.js +659 -0
  513. package/dist/ui/switch.d.ts +1 -0
  514. package/dist/ui/switch.js +398 -0
  515. package/dist/ui/table.d.ts +1 -0
  516. package/dist/ui/table.js +4654 -0
  517. package/dist/ui/tabs.d.ts +1 -0
  518. package/dist/ui/tabs.js +379 -0
  519. package/dist/ui/tag-input.d.ts +1 -0
  520. package/dist/ui/tag-input.js +2819 -0
  521. package/dist/ui/textarea.d.ts +1 -0
  522. package/dist/ui/textarea.js +819 -0
  523. package/dist/ui/theme/legacy.css +293 -0
  524. package/dist/ui/theme/luma.css +743 -0
  525. package/dist/ui/theme/lyra.css +754 -0
  526. package/dist/ui/theme/maia.css +673 -0
  527. package/dist/ui/theme/mira.css +802 -0
  528. package/dist/ui/theme/nova.css +662 -0
  529. package/dist/ui/theme/one.css +699 -0
  530. package/dist/ui/theme/rhea.css +742 -0
  531. package/dist/ui/theme/sera.css +845 -0
  532. package/dist/ui/theme/tokens.css +261 -0
  533. package/dist/ui/theme/vega.css +467 -0
  534. package/dist/vite-C5iUK7so.js +329 -0
  535. package/dist/vite.d.ts +1 -0
  536. package/dist/vite.js +2 -0
  537. package/dist/vue.d.ts +282 -0
  538. package/package.json +411 -3
@@ -0,0 +1,1176 @@
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 { n as cssPart } from "../css-class-BRKRzHx-.js";
9
+ import { LitElement, html, isServer, nothing, unsafeCSS } from "lit";
10
+ import { property, query, state } from "lit/decorators.js";
11
+ import { ifDefined } from "lit/directives/if-defined.js";
12
+ import { styleMap } from "lit/directives/style-map.js";
13
+ //#region src/components/input/input-format.ts
14
+ var SEPARATOR_CACHE = /* @__PURE__ */ new Map();
15
+ /**
16
+ * Ask `Intl` which characters this locale uses, rather than assuming `,` and `.`.
17
+ *
18
+ * Several locales use neither — `fr-FR` groups with a narrow no-break space, `de-CH` with an
19
+ * apostrophe — and a hardcoded pair would silently mangle them.
20
+ */
21
+ function localeSeparators(locale) {
22
+ const key = locale ?? "";
23
+ const cached = SEPARATOR_CACHE.get(key);
24
+ if (cached) return cached;
25
+ let separators = {
26
+ group: ",",
27
+ decimal: "."
28
+ };
29
+ try {
30
+ const parts = new Intl.NumberFormat(locale || void 0, {
31
+ useGrouping: true,
32
+ minimumFractionDigits: 1
33
+ }).formatToParts(12345.6);
34
+ separators = {
35
+ group: parts.find((p) => p.type === "group")?.value ?? ",",
36
+ decimal: parts.find((p) => p.type === "decimal")?.value ?? "."
37
+ };
38
+ } catch {}
39
+ SEPARATOR_CACHE.set(key, separators);
40
+ return separators;
41
+ }
42
+ /**
43
+ * Parse a pattern string into a descriptor, or `null` when it is not a pattern we understand.
44
+ *
45
+ * `null` is deliberately not an error: an unparseable pattern leaves the field an ordinary
46
+ * unformatted input rather than blanking it or throwing mid-keystroke.
47
+ */
48
+ function parseFormat(pattern) {
49
+ const raw = String(pattern ?? "");
50
+ if (!raw) return null;
51
+ const hole = raw.indexOf("{}");
52
+ if (hole !== -1) return {
53
+ kind: "template",
54
+ before: raw.slice(0, hole),
55
+ after: raw.slice(hole + 2)
56
+ };
57
+ let body = raw;
58
+ let prefix = "";
59
+ let suffix = "";
60
+ const leading = body.match(/^"([^"]*)"/);
61
+ if (leading) {
62
+ prefix = leading[1] ?? "";
63
+ body = body.slice(leading[0].length);
64
+ }
65
+ const trailing = body.match(/"([^"]*)"$/);
66
+ if (trailing) {
67
+ suffix = trailing[1] ?? "";
68
+ body = body.slice(0, body.length - trailing[0].length);
69
+ }
70
+ if (!body || !/^[#0,]*(?:\.[#0]*)?$/.test(body)) return null;
71
+ if (!/[#0]/.test(body)) return null;
72
+ const [intPart = "", fracPart] = body.split(".");
73
+ return {
74
+ kind: "number",
75
+ grouping: intPart.includes(","),
76
+ minFraction: fracPart ? (fracPart.match(/0/g) ?? []).length : 0,
77
+ maxFraction: fracPart ? fracPart.length : 0,
78
+ prefix,
79
+ suffix
80
+ };
81
+ }
82
+ /**
83
+ * Strip a formatted string back to its raw value.
84
+ *
85
+ * For numbers the result is always canonical — digits, an optional leading `-`, and `.` as the
86
+ * decimal point — whatever the locale draws with, so it is safe to hand to `Number()`.
87
+ */
88
+ /**
89
+ * Decide whether a GROUP character in the text is really the decimal point the user typed.
90
+ *
91
+ * It exists because the two roles collide: in `id-ID` the grouping character is `.`, so typing
92
+ * `0.9` produced `09` — the strip deleted the point before anything could read it as one. Yet
93
+ * `1.000` typed in the same field must keep meaning a thousand, and that is not a matter of
94
+ * guessing intent: the field re-strips its OWN formatted text on every keystroke, and
95
+ * `addGrouping` only ever emits runs of exactly three digits.
96
+ *
97
+ * So a group character is the decimal point when
98
+ * · the pattern has a fraction at all,
99
+ * · the locale's real decimal character is nowhere in the text (an explicit `1.000,5` wins), and
100
+ * · the digits after the LAST group character number at most `maxFraction` and are not exactly 3.
101
+ *
102
+ * A run of length ZERO qualifies deliberately: a trailing `0.` must survive, or the point is
103
+ * deleted the instant it is typed and `0.9` can never be reached left to right — `applyFormat`
104
+ * carries the matching rule that keeps a lone trailing point on screen.
105
+ *
106
+ * The consequence, and it is documented rather than worked around: under a dot-grouping locale a
107
+ * THREE-digit fraction (`0.123`) is unreachable by dot and has to be typed `0,123`.
108
+ *
109
+ * Returns the split, or `null` when every group character is grouping. Works for either locale
110
+ * shape — under `en-US` the roles are simply swapped and a typed `,` is promoted the same way.
111
+ */
112
+ function decimalGroupSplit(text, descriptor, group, decimal) {
113
+ if (descriptor.maxFraction <= 0) return null;
114
+ if (!group || group === decimal) return null;
115
+ if (text.includes(decimal)) return null;
116
+ const at = text.lastIndexOf(group);
117
+ if (at === -1) return null;
118
+ const tail = text.slice(at + group.length);
119
+ if (tail.length > descriptor.maxFraction || tail.length === 3) return null;
120
+ if (tail && !/^\d+$/.test(tail)) return null;
121
+ return {
122
+ head: text.slice(0, at),
123
+ tail
124
+ };
125
+ }
126
+ function stripFormat(text, descriptor, locale) {
127
+ const value = String(text ?? "");
128
+ if (!descriptor) return value;
129
+ if (descriptor.kind === "template") {
130
+ let out = value;
131
+ if (descriptor.before && out.startsWith(descriptor.before)) out = out.slice(descriptor.before.length);
132
+ if (descriptor.after && out.endsWith(descriptor.after)) out = out.slice(0, out.length - descriptor.after.length);
133
+ return out;
134
+ }
135
+ const { group, decimal } = localeSeparators(locale);
136
+ let out = value;
137
+ if (descriptor.prefix) out = out.split(descriptor.prefix).join("");
138
+ if (descriptor.suffix) out = out.split(descriptor.suffix).join("");
139
+ const promoted = decimalGroupSplit(out, descriptor, group, decimal);
140
+ if (promoted) out = `${promoted.head.split(group).join("")}.${promoted.tail}`;
141
+ else {
142
+ out = out.split(group).join("");
143
+ if (decimal !== ".") out = out.split(decimal).join(".");
144
+ }
145
+ const negative = out.trimStart().startsWith("-");
146
+ out = out.replace(/[^\d.]/g, "");
147
+ const first = out.indexOf(".");
148
+ if (first !== -1) out = out.slice(0, first + 1) + out.slice(first + 1).replace(/\./g, "");
149
+ if (descriptor.maxFraction === 0) out = out.split(".")[0] ?? "";
150
+ return negative && out ? `-${out}` : out;
151
+ }
152
+ /**
153
+ * Render a raw value for DISPLAY.
154
+ *
155
+ * The number branch deliberately does NOT hand the whole string to `Intl`: a value being typed is
156
+ * usually not yet a finished number, and `Intl` would tidy away exactly the characters the user is
157
+ * in the middle of writing — a trailing decimal point (`10000.`) and trailing fraction zeros
158
+ * (`10.50`) both vanish, which makes the field fight the person using it. Only the INTEGER part is
159
+ * grouped; the fraction is carried through verbatim, clamped to the pattern's ceiling.
160
+ */
161
+ function applyFormat(raw, descriptor, locale, opts = {}) {
162
+ const value = String(raw ?? "");
163
+ if (!descriptor) return value;
164
+ if (descriptor.kind === "template") {
165
+ if (!value) return "";
166
+ return `${descriptor.before}${value}${descriptor.after}`;
167
+ }
168
+ if (!value || value === "-") return value;
169
+ const negative = value.startsWith("-");
170
+ const unsigned = negative ? value.slice(1) : value;
171
+ const [intRaw = "", fracRaw] = unsigned.split(".");
172
+ const hasPoint = unsigned.includes(".");
173
+ const { group, decimal } = localeSeparators(locale);
174
+ const digits = intRaw.replace(/\D/g, "").replace(/^0+(?=\d)/, "");
175
+ const grouped = descriptor.grouping ? addGrouping(digits, group) : digits;
176
+ let fraction = (fracRaw ?? "").replace(/\D/g, "").slice(0, descriptor.maxFraction);
177
+ if (opts.pad && descriptor.minFraction > 0) fraction = fraction.padEnd(descriptor.minFraction, "0");
178
+ let out = grouped || (hasPoint ? "0" : "");
179
+ if (fraction) out += decimal + fraction;
180
+ else if (hasPoint && descriptor.maxFraction > 0 && !opts.pad) out += decimal;
181
+ if (!out) return "";
182
+ return `${descriptor.prefix}${negative ? "-" : ""}${out}${descriptor.suffix}`;
183
+ }
184
+ /** Group a digit string from the right. */
185
+ function addGrouping(digits, separator) {
186
+ if (digits.length < 4) return digits;
187
+ let out = "";
188
+ for (let i = 0; i < digits.length; i++) {
189
+ if (i > 0 && (digits.length - i) % 3 === 0) out += separator;
190
+ out += digits[i];
191
+ }
192
+ return out;
193
+ }
194
+ /**
195
+ * Normalise a raw value for the VALUE side.
196
+ *
197
+ * A number pattern yields a canonical numeric string (`"10000000.25"`) rather than the formatted
198
+ * text, so `Number(v)` works and a store that does arithmetic on it does not have to know a format
199
+ * was ever involved. A template yields the assembled string, because there the decoration IS the
200
+ * value — an email is not an email without its domain.
201
+ */
202
+ function normaliseValue(raw, descriptor) {
203
+ const value = String(raw ?? "");
204
+ if (!descriptor) return value;
205
+ if (descriptor.kind === "template") return value ? `${descriptor.before}${value}${descriptor.after}` : "";
206
+ if (!value || value === "-") return "";
207
+ const negative = value.startsWith("-");
208
+ const [intRaw = "", fracRaw] = (negative ? value.slice(1) : value).split(".");
209
+ const digits = intRaw.replace(/\D/g, "");
210
+ const fraction = (fracRaw ?? "").replace(/\D/g, "").slice(0, descriptor.maxFraction);
211
+ let out = digits.replace(/^0+(?=\d)/, "");
212
+ if (!out) out = digits ? "0" : "";
213
+ if (!out && !fraction) return "";
214
+ if (fraction) out = `${out || "0"}.${fraction}`;
215
+ return negative && out ? `-${out}` : out;
216
+ }
217
+ /**
218
+ * Where the caret belongs after the text was reformatted.
219
+ *
220
+ * Reformatting rewrites the whole field, and the browser then parks the caret at the end — so
221
+ * inserting a digit in the middle of a number would throw you to the end on every keystroke. The
222
+ * fix is to count in SIGNIFICANT characters (the ones the user actually typed) rather than in
223
+ * string offsets: count how many sit left of the caret before, then walk the new text until the
224
+ * same number have gone by.
225
+ */
226
+ function caretAfterFormat(next, caretInPrev, prev, isSignificant) {
227
+ let typed = 0;
228
+ for (let i = 0; i < Math.min(caretInPrev, prev.length); i++) if (isSignificant(prev[i])) typed++;
229
+ if (typed === 0) {
230
+ let i = 0;
231
+ while (i < next.length && !isSignificant(next[i])) i++;
232
+ return i;
233
+ }
234
+ let seen = 0;
235
+ for (let i = 0; i < next.length; i++) if (isSignificant(next[i])) {
236
+ seen++;
237
+ if (seen === typed) return i + 1;
238
+ }
239
+ return next.length;
240
+ }
241
+ /**
242
+ * Which characters count as "typed" for caret purposes — everything the format did NOT insert.
243
+ */
244
+ function significantFor(descriptor, locale) {
245
+ if (!descriptor || descriptor.kind === "template") return () => true;
246
+ const { decimal } = localeSeparators(locale);
247
+ return (ch) => /\d/.test(ch) || ch === decimal || ch === "-";
248
+ }
249
+ /** Resolve either form of a format prop to its finished text. */
250
+ function resolveFormat(format, raw, ctx, mode) {
251
+ if (format == null || format === "") return null;
252
+ if (typeof format === "function") return String(format({
253
+ value: raw,
254
+ type: ctx.type,
255
+ locale: ctx.locale
256
+ }) ?? "");
257
+ const descriptor = parseFormat(format);
258
+ if (!descriptor) return null;
259
+ return mode === "display" ? applyFormat(raw, descriptor, ctx.locale) : normaliseValue(raw, descriptor);
260
+ }
261
+ //#endregion
262
+ //#region src/components/input/input-core.ts
263
+ var numberStringConverter = {
264
+ fromAttribute(value) {
265
+ if (value === null || value === "") return void 0;
266
+ const parsed = Number(value);
267
+ return Number.isFinite(parsed) ? parsed : void 0;
268
+ },
269
+ toAttribute(value) {
270
+ if (value === void 0 || value === null) return null;
271
+ return String(value);
272
+ }
273
+ };
274
+ /**
275
+ * `MonoInputCore` — all render-mode-agnostic logic for `mono-input`: reactive
276
+ * props, hybrid prop aliases (camelCase ↔ kebab ↔ lowercase), attribute
277
+ * observation, value/model two-way sync, events, validation/class computation,
278
+ * sizing, and imperative focus/blur/select.
279
+ *
280
+ * It deliberately leaves out:
281
+ * - `createRenderRoot()` (light vs shadow) — set by each wrapper.
282
+ * - the slot strategy + `render()` — light uses a capture/`data-mono-slot`
283
+ * hack; shadow uses native `<slot>` with slotchange-driven presence. The
284
+ * shared `_hasXxxSlotState` `@state` fields back both strategies and feed the
285
+ * class getters.
286
+ */
287
+ var MonoInputCore = (superClass) => {
288
+ class MonoInputCoreClass extends MonoFormControlCore(superClass) {
289
+ constructor(...args) {
290
+ super(...args);
291
+ this.cssClass = {};
292
+ this.cssClassName = "";
293
+ this.type = "text";
294
+ this.size = "md";
295
+ this.color = "primary";
296
+ this.variant = "outlined";
297
+ this.modelValue = "";
298
+ this.value = "";
299
+ this.formatOn = "input";
300
+ this.name = "";
301
+ this.placeholder = "";
302
+ this.label = "";
303
+ this.helperText = "";
304
+ this.validationState = "default";
305
+ this.validationMessage = "";
306
+ this.error = false;
307
+ this.errorMessage = "";
308
+ this.success = false;
309
+ this.successMessage = "";
310
+ this.pattern = "";
311
+ this.autocomplete = "";
312
+ this.inputmode = "";
313
+ this.disabled = false;
314
+ this.readonly = false;
315
+ this.required = false;
316
+ this.clearable = false;
317
+ this.autofocus = false;
318
+ this._display = "";
319
+ this._focused = false;
320
+ this._internalWrite = false;
321
+ this._hasPrefixSlotState = false;
322
+ this._hasSuffixSlotState = false;
323
+ this._hasLabelSlotState = false;
324
+ this._hasHelperSlotState = false;
325
+ this._inputId = `mono-input-${Math.random().toString(36).slice(2)}`;
326
+ this._messageId = `${this._inputId}-message`;
327
+ defineHybridPropAliases(this, [
328
+ "modelValue",
329
+ "formatDisplay",
330
+ "formatValue",
331
+ "formatOn",
332
+ "formatLocale",
333
+ "helperText",
334
+ "validationState",
335
+ "validationMessage",
336
+ "errorMessage",
337
+ "successMessage",
338
+ "ariaLabelText",
339
+ "minLength",
340
+ "maxLength",
341
+ "cssClass",
342
+ "minWidth",
343
+ "maxWidth",
344
+ "minHeight",
345
+ "maxHeight"
346
+ ]);
347
+ for (const alias of [
348
+ "ariaLabel",
349
+ "aria-label",
350
+ "arialabel"
351
+ ]) Object.defineProperty(this, alias, {
352
+ get: () => this.ariaLabelText,
353
+ set: (value) => {
354
+ this.ariaLabelText = value == null ? void 0 : String(value);
355
+ },
356
+ configurable: true,
357
+ enumerable: false
358
+ });
359
+ Object.defineProperty(this, "maxlength", {
360
+ get: () => this.maxLength,
361
+ set: (value) => {
362
+ this.maxLength = this._toOptionalNumber(value);
363
+ },
364
+ configurable: true,
365
+ enumerable: false
366
+ });
367
+ Object.defineProperty(this, "minlength", {
368
+ get: () => this.minLength,
369
+ set: (value) => {
370
+ this.minLength = this._toOptionalNumber(value);
371
+ },
372
+ configurable: true,
373
+ enumerable: false
374
+ });
375
+ }
376
+ static get observedAttributes() {
377
+ return [
378
+ ...super.observedAttributes ?? [],
379
+ "modelvalue",
380
+ "helpertext",
381
+ "validationstate",
382
+ "validationmessage",
383
+ "errormessage",
384
+ "successmessage",
385
+ "arialabeltext",
386
+ "arialabel",
387
+ "minlength",
388
+ "maxlength",
389
+ "css-class",
390
+ "cssclass",
391
+ "formatdisplay",
392
+ "format-display",
393
+ "formatvalue",
394
+ "format-value",
395
+ "formaton",
396
+ "formatlocale"
397
+ ];
398
+ }
399
+ attributeChangedCallback(name, oldValue, newValue) {
400
+ super.attributeChangedCallback(name, oldValue, newValue);
401
+ if (oldValue === newValue) return;
402
+ switch (name) {
403
+ case "css-class":
404
+ case "cssclass":
405
+ this.cssClassName = newValue ?? "";
406
+ return;
407
+ case "formatdisplay":
408
+ case "format-display":
409
+ this._setFormatFromAttribute("formatDisplay", newValue);
410
+ return;
411
+ case "formatvalue":
412
+ case "format-value":
413
+ this._setFormatFromAttribute("formatValue", newValue);
414
+ return;
415
+ case "formaton":
416
+ this.formatOn = newValue ?? "input";
417
+ return;
418
+ case "formatlocale":
419
+ this.formatLocale = newValue ?? void 0;
420
+ return;
421
+ case "modelvalue":
422
+ this.modelValue = newValue ?? "";
423
+ return;
424
+ case "helpertext":
425
+ this.helperText = newValue ?? "";
426
+ return;
427
+ case "validationstate":
428
+ this.validationState = newValue ?? "default";
429
+ return;
430
+ case "validationmessage":
431
+ this.validationMessage = newValue ?? "";
432
+ return;
433
+ case "errormessage":
434
+ this.errorMessage = newValue ?? "";
435
+ return;
436
+ case "successmessage":
437
+ this.successMessage = newValue ?? "";
438
+ return;
439
+ case "arialabeltext":
440
+ case "arialabel":
441
+ this.ariaLabelText = newValue ?? void 0;
442
+ return;
443
+ case "minlength":
444
+ this.minLength = this._toOptionalNumber(newValue);
445
+ return;
446
+ case "maxlength":
447
+ this.maxLength = this._toOptionalNumber(newValue);
448
+ return;
449
+ }
450
+ }
451
+ willUpdate(changed) {
452
+ if (changed.has("modelValue") && this.value !== this.modelValue) this.value = this.modelValue ?? "";
453
+ if (changed.has("value") && this.modelValue !== this.value) this.modelValue = String(this.value ?? "");
454
+ if (!this._internalWrite && !this._focused && (changed.has("value") || changed.has("modelValue") || changed.has("formatDisplay"))) this._syncDisplayFromValue();
455
+ this._internalWrite = false;
456
+ }
457
+ firstUpdated() {
458
+ if (this.autofocus) this.focus();
459
+ }
460
+ _toOptionalNumber(value) {
461
+ if (value === void 0 || value === null || value === "") return void 0;
462
+ if (typeof value === "number") return Number.isFinite(value) ? value : void 0;
463
+ if (typeof value === "string") {
464
+ const parsed = Number(value);
465
+ return Number.isFinite(parsed) ? parsed : void 0;
466
+ }
467
+ }
468
+ get _hasPrefixSlot() {
469
+ return this._hasPrefixSlotState;
470
+ }
471
+ get _hasSuffixSlot() {
472
+ return this._hasSuffixSlotState;
473
+ }
474
+ get _hasLabelSlot() {
475
+ return this._hasLabelSlotState;
476
+ }
477
+ get _hasHelperSlot() {
478
+ return this._hasHelperSlotState;
479
+ }
480
+ get _resolvedValidationState() {
481
+ if (this.validationState && this.validationState !== "default") return this.validationState;
482
+ if (this.error || this.errorMessage) return "invalid";
483
+ if (this.success || this.successMessage) return "valid";
484
+ return "default";
485
+ }
486
+ _cls(base, key) {
487
+ return cssPart(this.cssClass, base, key);
488
+ }
489
+ get _wrapperClasses() {
490
+ return [
491
+ "mono-input",
492
+ this.size,
493
+ this.color,
494
+ this.variant,
495
+ this.disabled ? "disabled" : "",
496
+ this.readonly ? "readonly" : "",
497
+ this._resolvedValidationState !== "default" ? `is-${this._resolvedValidationState}` : "",
498
+ this._hasPrefixSlot ? "has-prefix" : "",
499
+ this._hasSuffixSlot || this.clearable ? "has-suffix" : "",
500
+ this.value ? "has-value" : "",
501
+ this.cssClassName,
502
+ this.cssClass?.root
503
+ ].filter(Boolean).join(" ");
504
+ }
505
+ get _fieldClasses() {
506
+ return [
507
+ this._cls("mono-input-field", "field"),
508
+ this.size,
509
+ this.color,
510
+ this.variant,
511
+ this.disabled ? "disabled" : "",
512
+ this.readonly ? "readonly" : "",
513
+ this._resolvedValidationState !== "default" ? `is-${this._resolvedValidationState}` : "",
514
+ this._hasPrefixSlot ? "has-prefix" : "",
515
+ this._hasSuffixSlot || this.clearable ? "has-suffix" : "",
516
+ this.value ? "has-value" : ""
517
+ ].filter(Boolean).join(" ");
518
+ }
519
+ _createModelDetail(args) {
520
+ return {
521
+ modelValue: args.modelValue,
522
+ currentValue: args.modelValue,
523
+ oldValue: args.oldValue,
524
+ value: args.modelValue,
525
+ displayValue: this._display,
526
+ name: this.name,
527
+ sourceEvent: args.sourceEvent
528
+ };
529
+ }
530
+ _emitInput(detail) {
531
+ dispatchMonoEvent(this, "input", detail);
532
+ }
533
+ _emitChange(detail) {
534
+ dispatchMonoEvent(this, "change", detail);
535
+ }
536
+ _emitClear(detail) {
537
+ dispatchMonoEvent(this, "clear", detail);
538
+ }
539
+ /**
540
+ * Take a format from an ATTRIBUTE.
541
+ *
542
+ * Both format props are `attribute: false`, because a function cannot cross an attribute —
543
+ * so Lit ignores the markup form entirely and this is what puts it back. Two guards, both
544
+ * borrowed from `mono-select`'s `displayValue`, which has exactly this shape:
545
+ *
546
+ * - a function already set through `.prop` is never overwritten by an attribute;
547
+ * - Vue stringifies non-primitive props when it also mirrors them as attributes, so a value
548
+ * that merely LOOKS like a serialized function is skipped — otherwise the real function,
549
+ * arriving a tick later, would be clobbered by its own `String()` form.
550
+ */
551
+ _setFormatFromAttribute(key, next) {
552
+ if (typeof this[key] === "function") return;
553
+ const value = next ?? "";
554
+ if (this._looksLikeSerializedFunction(value)) return;
555
+ this[key] = value;
556
+ }
557
+ _looksLikeSerializedFunction(value) {
558
+ const trimmed = value.trim();
559
+ if (!trimmed) return false;
560
+ return /^(?:asyncs+)?(?:function|([^)]*)s*=>|[A-Za-z_$][w$]*s*=>)/.test(trimmed);
561
+ }
562
+ /** Is either format prop set? Everything below short-circuits when not. */
563
+ get _hasFormat() {
564
+ return !!(this.formatDisplay || this.formatValue);
565
+ }
566
+ /** The display pattern parsed once per read — used for stripping and for caret significance. */
567
+ get _displayDescriptor() {
568
+ const format = this.formatDisplay ?? this.formatValue;
569
+ return typeof format === "string" && format ? parseFormat(format) : null;
570
+ }
571
+ /**
572
+ * The text in the field, reduced to what the user actually typed.
573
+ *
574
+ * A function format has no inverse, so there is nothing to strip — the typed text IS the raw
575
+ * value, and a caller using a function owns both directions.
576
+ */
577
+ _rawFromDisplay(text) {
578
+ return stripFormat(text, this._displayDescriptor, this.formatLocale);
579
+ }
580
+ /** Re-render the display from the current value. Skipped while focused — see the call site. */
581
+ _syncDisplayFromValue() {
582
+ const raw = this._rawFromDisplay(String(this.value ?? ""));
583
+ this._display = this._formatDisplay(raw, { pad: true });
584
+ }
585
+ _formatDisplay(raw, opts = {}) {
586
+ if (!this.formatDisplay) return raw;
587
+ if (typeof this.formatDisplay === "function") return String(this.formatDisplay({
588
+ value: raw,
589
+ type: this.type,
590
+ locale: this.formatLocale
591
+ }) ?? "");
592
+ const descriptor = parseFormat(this.formatDisplay);
593
+ if (!descriptor) return raw;
594
+ return applyFormat(raw, descriptor, this.formatLocale, opts);
595
+ }
596
+ _formatValue(raw) {
597
+ if (!this.formatValue) return raw;
598
+ if (typeof this.formatValue === "function") return String(this.formatValue({
599
+ value: raw,
600
+ type: this.type,
601
+ locale: this.formatLocale
602
+ }) ?? "");
603
+ const descriptor = parseFormat(this.formatValue);
604
+ if (!descriptor) return raw;
605
+ return normaliseValue(raw, descriptor);
606
+ }
607
+ /**
608
+ * Hold a formatted numeric value inside `min` / `max`.
609
+ *
610
+ * Those two are otherwise INERT on this component. They are forwarded to the native input, and
611
+ * the platform only honours them on `number`, `range` and the date types — while a numeric
612
+ * format REQUIRES `type="text"`, because a native number input blanks itself the moment a
613
+ * grouping separator appears. So `max="100"` on a formatted field did exactly nothing, which
614
+ * is the opposite of what it reads like. This is what gives it meaning.
615
+ *
616
+ * Only the number-pattern path clamps. Everywhere else `min` / `max` keep their native
617
+ * meaning and are simply passed through, so a plain `type="text"` field is untouched —
618
+ * clamping arbitrary text against a number would be nonsense.
619
+ *
620
+ * `max` applies WHILE TYPING; `min` only on commit. The asymmetry is deliberate: a lower
621
+ * bound is crossed on the way to almost every legal value — with `min="10"`, clamping live
622
+ * would rewrite the first `1` to `10` and `15` could never be typed — whereas an upper bound
623
+ * is only ever crossed by overshooting, which is precisely when it should cut.
624
+ *
625
+ * A part-typed value is left alone. `''` and a lone `-` return early, and a trailing decimal
626
+ * point parses to the integer before it, so `"2."` under `max="100"` keeps its point instead
627
+ * of having it deleted from under the caret.
628
+ *
629
+ * Values arriving from OUTSIDE — a `modelValue` binding, a form write-back — are deliberately
630
+ * not clamped: this bounds what a person types, and silently rewriting data handed to the
631
+ * field would hide a mismatch rather than surface it.
632
+ */
633
+ _clampRaw(raw, opts = {}) {
634
+ if (this._displayDescriptor?.kind !== "number") return raw;
635
+ if (!raw || raw === "-") return raw;
636
+ const n = Number(raw);
637
+ if (!Number.isFinite(n)) return raw;
638
+ const max = this._toOptionalNumber(this.max);
639
+ if (max != null && n > max) return String(max);
640
+ const min = this._toOptionalNumber(this.min);
641
+ if (opts.commit && min != null && n < min) return String(min);
642
+ return raw;
643
+ }
644
+ /**
645
+ * Rewrite the field and put the caret back where the user left it.
646
+ *
647
+ * Written IMPERATIVELY rather than through `this._display` alone, and that is the whole trick:
648
+ * lit commits `.value` in a microtask AFTER this handler returns, and the browser parks the
649
+ * caret at the end of any value it is handed. Writing here — synchronously, inside the input
650
+ * event — means the caret can be restored in the same breath, and setting `_display` to the
651
+ * same string afterwards leaves lit's committed value already matching, so it never writes
652
+ * again and never gets the chance to move it.
653
+ */
654
+ _applyDisplay(input, next, caretBefore) {
655
+ const prev = input.value;
656
+ if (prev === next) {
657
+ this._display = next;
658
+ return;
659
+ }
660
+ input.value = next;
661
+ this._display = next;
662
+ if (caretBefore == null) return;
663
+ const caret = caretAfterFormat(next, caretBefore, prev, significantFor(this._displayDescriptor, this.formatLocale));
664
+ try {
665
+ input.setSelectionRange(caret, caret);
666
+ } catch {}
667
+ }
668
+ _handleInput(event) {
669
+ if (this.disabled || this.readonly) return;
670
+ this._internalWrite = true;
671
+ const input = event.currentTarget;
672
+ const oldValue = this.modelValue;
673
+ if (!this._hasFormat) {
674
+ const nextValue = input.value;
675
+ this.value = nextValue;
676
+ this.modelValue = nextValue;
677
+ this._display = nextValue;
678
+ this._emitInput(this._createModelDetail({
679
+ modelValue: nextValue,
680
+ oldValue,
681
+ sourceEvent: event
682
+ }));
683
+ return;
684
+ }
685
+ const caret = input.selectionStart;
686
+ const raw = this._clampRaw(this._rawFromDisplay(input.value));
687
+ const nextValue = this._formatValue(raw);
688
+ if (this.formatOn === "input") this._applyDisplay(input, this._formatDisplay(raw), caret);
689
+ else this._display = input.value;
690
+ this.value = nextValue;
691
+ this.modelValue = nextValue;
692
+ this._emitInput(this._createModelDetail({
693
+ modelValue: nextValue,
694
+ oldValue,
695
+ sourceEvent: event
696
+ }));
697
+ }
698
+ _handleChange(event) {
699
+ if (this.disabled || this.readonly) return;
700
+ this._internalWrite = true;
701
+ const input = event.currentTarget;
702
+ const oldValue = this.modelValue;
703
+ if (!this._hasFormat) {
704
+ const nextValue = input.value;
705
+ this.value = nextValue;
706
+ this.modelValue = nextValue;
707
+ this._display = nextValue;
708
+ this._emitChange(this._createModelDetail({
709
+ modelValue: nextValue,
710
+ oldValue,
711
+ sourceEvent: event
712
+ }));
713
+ return;
714
+ }
715
+ const raw = this._clampRaw(this._rawFromDisplay(input.value), { commit: true });
716
+ const nextValue = this._formatValue(raw);
717
+ this._applyDisplay(input, this._formatDisplay(raw, { pad: true }), null);
718
+ this.value = nextValue;
719
+ this.modelValue = nextValue;
720
+ this._emitChange(this._createModelDetail({
721
+ modelValue: nextValue,
722
+ oldValue,
723
+ sourceEvent: event
724
+ }));
725
+ }
726
+ _handleFocus() {
727
+ this._focused = true;
728
+ }
729
+ _handleBlur() {
730
+ this._focused = false;
731
+ if (this._hasFormat) this._syncDisplayFromValue();
732
+ }
733
+ _handleClear() {
734
+ if (this.disabled || this.readonly) return;
735
+ this._internalWrite = true;
736
+ const oldValue = this.modelValue;
737
+ const nextValue = "";
738
+ this.value = nextValue;
739
+ this.modelValue = nextValue;
740
+ this._display = nextValue;
741
+ if (this._inputEl) {
742
+ this._inputEl.value = nextValue;
743
+ this._inputEl.focus();
744
+ }
745
+ const detail = this._createModelDetail({
746
+ modelValue: nextValue,
747
+ oldValue
748
+ });
749
+ this._emitInput(detail);
750
+ this._emitClear(detail);
751
+ }
752
+ /** Inline sizing applied to the root wrapper. */
753
+ _sizeStyle() {
754
+ return buildSizeStyle(this);
755
+ }
756
+ /**
757
+ * The root wrapper, shared by both builds. Its `mono-*` attributes mirror the
758
+ * props one for one and are what input.css styles (`[mono-input][mono-size="sm"]`);
759
+ * a prop at its default emits NO attribute, so the DOM reads exactly like the
760
+ * hand-written CSS-tab markup. The classes stay as inert hooks until 2.0.
761
+ */
762
+ _renderWrapper(inner) {
763
+ const state = this._resolvedValidationState;
764
+ return html`<div
765
+ class=${this._wrapperClasses}
766
+ style=${styleMap(this._sizeStyle())}
767
+ mono-input
768
+ mono-size=${this.size === "md" ? nothing : this.size}
769
+ mono-color=${this.color === "primary" ? nothing : this.color}
770
+ mono-variant=${this.variant === "outlined" ? nothing : this.variant}
771
+ mono-validation-state=${state === "default" ? nothing : state}
772
+ ?mono-disabled=${this.disabled}
773
+ ?mono-readonly=${this.readonly}
774
+ ?mono-required=${this.required}
775
+ ?mono-clearable=${this.clearable}
776
+ >${inner}</div>`;
777
+ }
778
+ /** Computed aria-label fallback chain (shared by both builds' render()). */
779
+ get _ariaLabel() {
780
+ return this.ariaLabelText || this.label || this.placeholder || void 0;
781
+ }
782
+ /** id referenced by aria-describedby when a message is shown. */
783
+ get _describedBy() {
784
+ return this.validationMessage || this.errorMessage || this.successMessage || this.helperText || this._hasHelperSlot ? this._messageId : void 0;
785
+ }
786
+ /** The native <input>, shared by both builds' render(). */
787
+ _renderNative() {
788
+ return html`
789
+ <input
790
+ id=${this._inputId}
791
+ class=${`${this._cls("mono-input-native", "native")} ${this.size}`}
792
+ mono-native
793
+ type=${this.type}
794
+ .value=${this._display}
795
+ name=${ifDefined(this.name || void 0)}
796
+ placeholder=${ifDefined(this.placeholder || void 0)}
797
+ pattern=${ifDefined(this.pattern || void 0)}
798
+ autocomplete=${ifDefined(this.autocomplete || void 0)}
799
+ inputmode=${ifDefined(this.inputmode || void 0)}
800
+ minlength=${ifDefined(this.minLength)}
801
+ maxlength=${ifDefined(this.maxLength)}
802
+ min=${ifDefined(this.min)}
803
+ max=${ifDefined(this.max)}
804
+ step=${ifDefined(this.step)}
805
+ ?disabled=${this.disabled}
806
+ ?readonly=${this.readonly}
807
+ ?required=${this.required}
808
+ aria-label=${ifDefined(this._ariaLabel)}
809
+ aria-invalid=${this._resolvedValidationState === "invalid" ? "true" : "false"}
810
+ aria-describedby=${ifDefined(this._describedBy)}
811
+ @focus=${this._handleFocus}
812
+ @blur=${this._handleBlur}
813
+ @input=${this._handleInput}
814
+ @change=${this._handleChange}
815
+ />
816
+ `;
817
+ }
818
+ /** The clear button (uses the build-specific icon). */
819
+ _renderClear() {
820
+ if (!(this.clearable && this.value && !this.disabled && !this.readonly)) return nothing;
821
+ return html`
822
+ <button
823
+ type="button"
824
+ class=${this._cls("mono-input-clear", "clear")}
825
+ mono-clear
826
+ aria-label="Clear input"
827
+ @click=${this._handleClear}
828
+ >
829
+ ${this.renderIcon("close")}
830
+ </button>
831
+ `;
832
+ }
833
+ /**
834
+ * Icon hook — overridden per build. Light: global `.mono-icon`/`i-mdi-*`
835
+ * UnoCSS icon. Shadow: inline SVG (global icon CSS can't reach a shadow root).
836
+ */
837
+ renderIcon(_name) {
838
+ return html``;
839
+ }
840
+ focus(options) {
841
+ this._inputEl?.focus(options);
842
+ }
843
+ blur() {
844
+ this._inputEl?.blur();
845
+ }
846
+ select() {
847
+ this._inputEl?.select();
848
+ }
849
+ }
850
+ __decorate([property({ attribute: false })], MonoInputCoreClass.prototype, "cssClass", void 0);
851
+ __decorate([property({
852
+ type: String,
853
+ attribute: "css-class"
854
+ })], MonoInputCoreClass.prototype, "cssClassName", void 0);
855
+ __decorate([property({ type: String })], MonoInputCoreClass.prototype, "type", void 0);
856
+ __decorate([property({ type: String })], MonoInputCoreClass.prototype, "size", void 0);
857
+ __decorate([property({ type: String })], MonoInputCoreClass.prototype, "color", void 0);
858
+ __decorate([property({ type: String })], MonoInputCoreClass.prototype, "variant", void 0);
859
+ __decorate([property({
860
+ type: String,
861
+ attribute: "model-value",
862
+ reflect: true
863
+ })], MonoInputCoreClass.prototype, "modelValue", void 0);
864
+ __decorate([property({ type: String })], MonoInputCoreClass.prototype, "value", void 0);
865
+ __decorate([property({ attribute: false })], MonoInputCoreClass.prototype, "formatDisplay", void 0);
866
+ __decorate([property({ attribute: false })], MonoInputCoreClass.prototype, "formatValue", void 0);
867
+ __decorate([property({ attribute: "format-on" })], MonoInputCoreClass.prototype, "formatOn", void 0);
868
+ __decorate([property({ attribute: "format-locale" })], MonoInputCoreClass.prototype, "formatLocale", void 0);
869
+ __decorate([property({ type: String })], MonoInputCoreClass.prototype, "name", void 0);
870
+ __decorate([property({ type: String })], MonoInputCoreClass.prototype, "placeholder", void 0);
871
+ __decorate([property({ type: String })], MonoInputCoreClass.prototype, "label", void 0);
872
+ __decorate([property({
873
+ type: String,
874
+ attribute: "helper-text"
875
+ })], MonoInputCoreClass.prototype, "helperText", void 0);
876
+ __decorate([property({
877
+ type: String,
878
+ attribute: "validation-state"
879
+ })], MonoInputCoreClass.prototype, "validationState", void 0);
880
+ __decorate([property({
881
+ type: String,
882
+ attribute: "validation-message"
883
+ })], MonoInputCoreClass.prototype, "validationMessage", void 0);
884
+ __decorate([property({
885
+ reflect: true,
886
+ converter: booleanStringConverter
887
+ })], MonoInputCoreClass.prototype, "error", void 0);
888
+ __decorate([property({
889
+ type: String,
890
+ attribute: "error-message"
891
+ })], MonoInputCoreClass.prototype, "errorMessage", void 0);
892
+ __decorate([property({
893
+ reflect: true,
894
+ converter: booleanStringConverter
895
+ })], MonoInputCoreClass.prototype, "success", void 0);
896
+ __decorate([property({
897
+ type: String,
898
+ attribute: "success-message"
899
+ })], MonoInputCoreClass.prototype, "successMessage", void 0);
900
+ __decorate([property({ type: String })], MonoInputCoreClass.prototype, "pattern", void 0);
901
+ __decorate([property({ type: String })], MonoInputCoreClass.prototype, "autocomplete", void 0);
902
+ __decorate([property({ type: String })], MonoInputCoreClass.prototype, "inputmode", void 0);
903
+ __decorate([property({
904
+ type: String,
905
+ attribute: "aria-label"
906
+ })], MonoInputCoreClass.prototype, "ariaLabelText", void 0);
907
+ __decorate([property({
908
+ attribute: "min-length",
909
+ converter: numberStringConverter
910
+ })], MonoInputCoreClass.prototype, "minLength", void 0);
911
+ __decorate([property({
912
+ attribute: "max-length",
913
+ converter: numberStringConverter
914
+ })], MonoInputCoreClass.prototype, "maxLength", void 0);
915
+ __decorate([property({ type: Number })], MonoInputCoreClass.prototype, "min", void 0);
916
+ __decorate([property({ type: Number })], MonoInputCoreClass.prototype, "max", void 0);
917
+ __decorate([property({ type: Number })], MonoInputCoreClass.prototype, "step", void 0);
918
+ __decorate([property({
919
+ reflect: true,
920
+ converter: booleanStringConverter
921
+ })], MonoInputCoreClass.prototype, "disabled", void 0);
922
+ __decorate([property({
923
+ reflect: true,
924
+ converter: booleanStringConverter
925
+ })], MonoInputCoreClass.prototype, "readonly", void 0);
926
+ __decorate([property({
927
+ reflect: true,
928
+ converter: booleanStringConverter
929
+ })], MonoInputCoreClass.prototype, "required", void 0);
930
+ __decorate([property({
931
+ reflect: true,
932
+ converter: booleanStringConverter
933
+ })], MonoInputCoreClass.prototype, "clearable", void 0);
934
+ __decorate([property({
935
+ reflect: true,
936
+ converter: booleanStringConverter
937
+ })], MonoInputCoreClass.prototype, "autofocus", void 0);
938
+ __decorate([property({ type: String })], MonoInputCoreClass.prototype, "width", void 0);
939
+ __decorate([property({ type: String })], MonoInputCoreClass.prototype, "height", void 0);
940
+ __decorate([property({
941
+ type: String,
942
+ attribute: "min-width"
943
+ })], MonoInputCoreClass.prototype, "minWidth", void 0);
944
+ __decorate([property({
945
+ type: String,
946
+ attribute: "max-width"
947
+ })], MonoInputCoreClass.prototype, "maxWidth", void 0);
948
+ __decorate([property({
949
+ type: String,
950
+ attribute: "min-height"
951
+ })], MonoInputCoreClass.prototype, "minHeight", void 0);
952
+ __decorate([property({
953
+ type: String,
954
+ attribute: "max-height"
955
+ })], MonoInputCoreClass.prototype, "maxHeight", void 0);
956
+ __decorate([query(".mono-input-native")], MonoInputCoreClass.prototype, "_inputEl", void 0);
957
+ __decorate([state()], MonoInputCoreClass.prototype, "_display", void 0);
958
+ __decorate([state()], MonoInputCoreClass.prototype, "_focused", void 0);
959
+ __decorate([state()], MonoInputCoreClass.prototype, "_hasPrefixSlotState", void 0);
960
+ __decorate([state()], MonoInputCoreClass.prototype, "_hasSuffixSlotState", void 0);
961
+ __decorate([state()], MonoInputCoreClass.prototype, "_hasLabelSlotState", void 0);
962
+ __decorate([state()], MonoInputCoreClass.prototype, "_hasHelperSlotState", void 0);
963
+ return MonoInputCoreClass;
964
+ };
965
+ //#endregion
966
+ //#region src/components/input/input.css?raw
967
+ var input_default = "/* =========================================================================\r\n mono-input — a port of Basecoat's `.field` / `.input-group` / `.label`\r\n (basecoat-css@1.0.2, vega style).\r\n\r\n Styled by ATTRIBUTE, like Basecoat (`.input-group:has([aria-invalid])`) —\r\n and the attributes mirror the element's props one for one, so hand-written\r\n markup reads like the Lit / Vue tag:\r\n\r\n <mono-input size=\"sm\" color=\"danger\" variant=\"filled\" label=\"Name\">\r\n <div mono-input mono-size=\"sm\" mono-color=\"danger\" mono-variant=\"filled\">\r\n <label mono-label>Name</label>\r\n <div mono-field><input mono-native></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,\r\n `:not([mono-validation-state])` = default). The element renders these\r\n attributes on its wrapper (both builds); the old classes\r\n (`.mono-input.sm.danger.filled`) are still emitted as inert hooks for\r\n consumer CSS until 2.0 but no rule here reads them.\r\n\r\n Selector map (ours ≡ upstream):\r\n [mono-input] ≡ .field (flex column, gap-3)\r\n [mono-input] > [mono-label] ≡ .field > label / .label\r\n [mono-input] > [mono-field] ≡ .input-group (the bordered box: h-9 rounded-md border-input shadow-xs)\r\n [mono-field] > [mono-native] ≡ .input-group > input (borderless, px-2.5 text-sm; `.input` for the metrics)\r\n [mono-field] > [mono-prefix|mono-suffix] ≡ .input-group > span[data-align='start'|'end']\r\n [mono-field] > [mono-clear] ≡ .input-group > button[data-align='end']:has(> svg)\r\n [mono-input] > [mono-message-wrap] ≡ .field > p\r\n [mono-message=\"helper\"] ≡ .field > p (text-sm text-muted-foreground)\r\n [mono-message=\"invalid\"] ≡ .field [role='alert']\r\n [mono-validation-state=\"invalid\"] ≡ .input-group:has([aria-invalid=true]) + .field[data-invalid]\r\n [mono-validation-state=\"valid|warning\"] ≡ EXTENSION (the invalid pattern with --success / --warning)\r\n [mono-size=\"xs|sm|lg|xl|xxl\"] ≡ EXTENSION (Basecoat sizes only the select; the ladder is --mono-control-height-*)\r\n [mono-variant=\"filled\"] ≡ EXTENSION (luma's .input-group: border-transparent bg-input/50, ring-ring/30)\r\n [mono-variant=\"underlined\"] ≡ EXTENSION (sera's .input-group: rounded-none border-b-input px-0, no ring)\r\n [mono-disabled] / [mono-native]:disabled ≡ .input-group:has(input:disabled) — opacity-50\r\n [mono-readonly] ≡ EXTENSION (a muted surface)\r\n\r\n Specificity contract (same as the pre-port class sheet, and as checkbox.css):\r\n a part's RESTING rule is written `:where([mono-input]) [mono-part]` = exactly\r\n one attribute, (0,1,0) — so a utility class composed onto the markup (the\r\n `cssClass` prop, or a hand-written class in a css/ demo) wins by source order,\r\n while the prop and state rules ([mono-size], [mono-variant], [mono-disabled],\r\n :focus-within, [aria-invalid], …) stay heavier and still win over it.\r\n\r\n Inner parts are attributes too: [mono-label] (+ [mono-required-mark]),\r\n [mono-field], [mono-prefix] / [mono-suffix] (+ [mono-empty] in the shadow\r\n build for an unassigned slot), [mono-native], [mono-clear] > [mono-icon],\r\n [mono-message-wrap] > [mono-message=\"helper|valid|invalid|warning\"].\r\n\r\n Values are copied from the compiled vendor sheet (vendor/basecoat/basecoat-\r\n vega.cdn.css) through the token layer: `--spacing` → `--mono-spacing`,\r\n `--text-sm` → `--mono-text-sm`, `--radius-md` → `--mono-radius-md`,\r\n `--color-x` → `--x`, Tailwind's `--tw-ring-*` stack → the two-slot\r\n `box-shadow: ring, shadow` below, and every `dark:` variant → a\r\n `--mono-mode-*` token (a selector cannot cross a shadow boundary; an\r\n inherited custom property can).\r\n\r\n FLAVORS (Basecoat's other seven styles, src/data/theme/flavors/*.css) set\r\n the knobs read below — `--mono-input-radius`, `--mono-input-padding-x-<size>`,\r\n `--mono-input-font-<size>`, `--mono-input-line-height`, `--mono-input-ring-width`,\r\n `--mono-input-ring-alpha`, `--mono-input-gap`, `--mono-input-affix-*`,\r\n `--mono-input-label-*`, `--mono-input-message-*`, `--mono-input-clear-radius`,\r\n `--mono-input-disabled-bg`, and the outline-variant set `--mono-input-outline-\r\n {bg,border-color,side-border-color,shadow,ring-width,radius,padding-x,affix-padding}`.\r\n Every fallback here is vega's value\r\n (`node scripts/basecoat-styles.mjs --varying \"^\\.(field|label|input|input-group)\\b\"`).\r\n\r\n The public `--mono-input-*` knobs and the three-tier resolver\r\n (`--mono-input-x` → `--_mono-input-x-preset` → base) are unchanged: a\r\n colour / variant attribute only ever writes a `*-preset` slot, so a\r\n consumer's own `--mono-input-bg` on the host still wins.\r\n ========================================================================= */\r\n\r\nmono-input {\r\n display: block;\r\n}\r\n\r\n[mono-input] {\r\n /* ── palette: each slot is a public knob over a Basecoat token ─────────── */\r\n --_mono-input-text: var(--mono-input-color, var(--mono-input-text, var(--foreground)));\r\n --_mono-input-placeholder: var(--mono-input-placeholder, var(--muted-foreground));\r\n --_mono-input-muted: var(--mono-input-muted, var(--muted-foreground));\r\n /* the `color` prop picks the FOCUS colour; primary is Basecoat's `--ring` */\r\n --_mono-input-primary: var(--mono-input-primary, var(--ring));\r\n --_mono-input-secondary: var(--mono-input-secondary, var(--muted-foreground));\r\n --_mono-input-success: var(--mono-input-success, var(--success));\r\n --_mono-input-danger: var(--mono-input-danger, var(--destructive));\r\n --_mono-input-warning: var(--mono-input-warning, var(--warning));\r\n --_mono-input-info: var(--mono-input-info, var(--info));\r\n --_mono-input-teal: var(--mono-input-teal, var(--teal));\r\n --_mono-input-purple: var(--mono-input-purple, var(--purple));\r\n --_mono-input-neutral: var(--mono-input-neutral, var(--neutral));\r\n --_mono-input-dark: var(--mono-input-dark, var(--dark));\r\n --_mono-input-valid: var(--mono-input-valid, var(--success));\r\n --_mono-input-invalid: var(--mono-input-invalid, var(--destructive));\r\n\r\n /* ── the painted result — three tiers, base = .input-group (vega) ──────── */\r\n --_mono-input-ring-color: var(--mono-input-ring-color, var(--mono-input-focus-color, var(--_mono-input-ring-color-preset, var(--_mono-input-primary))));\r\n --_mono-input-ring-width: var(--mono-input-ring-width, var(--_mono-input-ring-width-preset, var(--mono-ring-width)));\r\n --_mono-input-ring-alpha: var(--mono-input-ring-alpha, var(--mono-ring-alpha));\r\n --_mono-input-border-color: var(--mono-input-rest-border, var(--mono-input-border-color, var(--_mono-input-border-color-preset, var(--input))));\r\n --_mono-input-bg: var(--mono-input-bg, var(--mono-input-surface, var(--_mono-input-bg-preset, var(--mono-mode-surface))));\r\n --_mono-input-shadow: var(--mono-input-shadow, var(--_mono-input-shadow-preset, 0 0 #0000));\r\n --_mono-input-affix-padding: var(--mono-input-affix-padding, var(--_mono-input-affix-padding-preset, calc(var(--mono-spacing) * 2)));\r\n --_mono-input-affix-icon: var(--mono-input-affix-icon-size, calc(var(--mono-spacing) * 4));\r\n\r\n /* ── md metrics live on the unqualified root ON PURPOSE: hand-written\r\n `<div mono-input>` that names no size renders exactly like size=\"md\".\r\n basecoat@1.0.2 styles/vega.css .input-group — h-9 rounded-md; > input px-2.5 text-sm ── */\r\n --_mono-input-height: var(--mono-input-height-md, var(--mono-control-height-md));\r\n --_mono-input-radius: var(--mono-input-radius-md, var(--_mono-input-radius-preset, var(--mono-input-radius, var(--mono-radius-md))));\r\n --_mono-input-padding-x: var(--mono-input-padding-x-md, var(--_mono-input-padding-x-preset, calc(var(--mono-spacing) * 2.5)));\r\n --_mono-input-font-size: var(--mono-input-font-md, var(--mono-text-sm));\r\n --_mono-input-line-height: var(--mono-input-line-height, var(--mono-input-line-height-md, var(--mono-text-sm--lh)));\r\n --_mono-input-clear: calc(var(--mono-spacing) * 6);\r\n --_mono-input-clear-glyph: calc(var(--mono-spacing) * 3.5);\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-input-gap, calc(var(--mono-spacing) * 3));\r\n width: 100%;\r\n font-family: inherit;\r\n color: var(--_mono-input-text);\r\n}\r\n\r\n/* A page-level `* { box-sizing: border-box }` reset does NOT cross a shadow\r\n boundary; scoped here so both builds measure the same. */\r\n[mono-input],\r\n:where([mono-input]) *,\r\n:where([mono-input]) *::before,\r\n:where([mono-input]) *::after {\r\n box-sizing: border-box;\r\n}\r\n\r\n/* The shadow build renders every slot wrapper and marks an unassigned one\r\n `mono-empty`; the light build simply omits it. Inert in the light build. */\r\n:where([mono-input]) :is([mono-label], [mono-prefix], [mono-suffix], [mono-message])[mono-empty] {\r\n display: none;\r\n}\r\n\r\n/* =========================================\r\n Sizes — the field's painted height IS the token (tests/perf/field-heights).\r\n EXTENSION: Basecoat sizes only its select (data-size=sm); the ladder is the\r\n shared --mono-control-height-* scale and the text follows .btn's steps.\r\n ========================================= */\r\n\r\n/* `.input` is text-base under 48rem (no iOS zoom) and md:text-sm above it —\r\n vendor behaviour, kept for the default size only. */\r\n@media (width < 48rem) {\r\n [mono-input]:is(:not([mono-size]), [mono-size=\"md\"]) {\r\n --_mono-input-font-size: var(--mono-input-font-md, var(--mono-text-base));\r\n --_mono-input-line-height: var(--mono-input-line-height, var(--mono-input-line-height-md, var(--mono-text-base--lh)));\r\n }\r\n}\r\n\r\n[mono-input][mono-size=\"xs\"] {\r\n --_mono-input-height: var(--mono-input-height-xs, var(--mono-control-height-xs));\r\n --_mono-input-radius: var(--mono-input-radius-xs, var(--_mono-input-radius-preset, var(--mono-input-radius, var(--mono-radius-md))));\r\n --_mono-input-padding-x: var(--mono-input-padding-x-xs, var(--_mono-input-padding-x-preset, calc(var(--mono-spacing) * 2)));\r\n --_mono-input-font-size: var(--mono-input-font-xs, var(--mono-text-xs));\r\n --_mono-input-line-height: var(--mono-input-line-height, var(--mono-input-line-height-xs, var(--mono-text-xs--lh)));\r\n --_mono-input-affix-icon: var(--mono-input-affix-icon-size, calc(var(--mono-spacing) * 3.5));\r\n --_mono-input-clear: calc(var(--mono-spacing) * 4);\r\n --_mono-input-clear-glyph: calc(var(--mono-spacing) * 3);\r\n}\r\n\r\n[mono-input][mono-size=\"sm\"] {\r\n --_mono-input-height: var(--mono-input-height-sm, var(--mono-control-height-sm));\r\n --_mono-input-radius: var(--mono-input-radius-sm, var(--_mono-input-radius-preset, var(--mono-input-radius, var(--mono-radius-md))));\r\n --_mono-input-padding-x: var(--mono-input-padding-x-sm, var(--_mono-input-padding-x-preset, calc(var(--mono-spacing) * 2.5)));\r\n --_mono-input-font-size: var(--mono-input-font-sm, var(--mono-input-font-md, var(--mono-text-sm)));\r\n --_mono-input-line-height: var(--mono-input-line-height, var(--mono-input-line-height-sm, var(--mono-text-sm--lh)));\r\n --_mono-input-clear: calc(var(--mono-spacing) * 5);\r\n --_mono-input-clear-glyph: calc(var(--mono-spacing) * 3.5);\r\n}\r\n\r\n[mono-input][mono-size=\"lg\"] {\r\n --_mono-input-height: var(--mono-input-height-lg, var(--mono-control-height-lg));\r\n --_mono-input-radius: var(--mono-input-radius-lg, var(--_mono-input-radius-preset, var(--mono-input-radius, var(--mono-radius-md))));\r\n --_mono-input-padding-x: var(--mono-input-padding-x-lg, var(--_mono-input-padding-x-preset, calc(var(--mono-spacing) * 2.5)));\r\n --_mono-input-font-size: var(--mono-input-font-lg, var(--mono-input-font-md, var(--mono-text-sm)));\r\n --_mono-input-line-height: var(--mono-input-line-height, var(--mono-input-line-height-lg, var(--mono-text-sm--lh)));\r\n}\r\n\r\n[mono-input][mono-size=\"xl\"] {\r\n --_mono-input-height: var(--mono-input-height-xl, var(--mono-control-height-xl));\r\n --_mono-input-radius: var(--mono-input-radius-xl, var(--_mono-input-radius-preset, var(--mono-input-radius, var(--mono-radius-md))));\r\n --_mono-input-padding-x: var(--mono-input-padding-x-xl, var(--_mono-input-padding-x-preset, calc(var(--mono-spacing) * 3)));\r\n --_mono-input-font-size: var(--mono-input-font-xl, var(--mono-text-base));\r\n --_mono-input-line-height: var(--mono-input-line-height, var(--mono-input-line-height-xl, var(--mono-text-base--lh)));\r\n --_mono-input-affix-icon: var(--mono-input-affix-icon-size, calc(var(--mono-spacing) * 5));\r\n --_mono-input-clear: calc(var(--mono-spacing) * 7);\r\n --_mono-input-clear-glyph: calc(var(--mono-spacing) * 4);\r\n}\r\n\r\n[mono-input][mono-size=\"xxl\"] {\r\n --_mono-input-height: var(--mono-input-height-xxl, var(--mono-control-height-xxl));\r\n --_mono-input-radius: var(--mono-input-radius-xxl, var(--_mono-input-radius-preset, var(--mono-input-radius, var(--mono-radius-md))));\r\n --_mono-input-padding-x: var(--mono-input-padding-x-xxl, var(--_mono-input-padding-x-preset, calc(var(--mono-spacing) * 4)));\r\n --_mono-input-font-size: var(--mono-input-font-xxl, var(--mono-text-lg));\r\n --_mono-input-line-height: var(--mono-input-line-height, var(--mono-input-line-height-xxl, var(--mono-text-lg--lh)));\r\n --_mono-input-affix-icon: var(--mono-input-affix-icon-size, calc(var(--mono-spacing) * 5));\r\n --_mono-input-clear: calc(var(--mono-spacing) * 8);\r\n --_mono-input-clear-glyph: calc(var(--mono-spacing) * 4);\r\n}\r\n\r\n/* =========================================\r\n Variants — each writes only `*-preset` slots\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 styles/vega.css .input-group — rounded-md border border-input\r\n shadow-xs, bg-transparent (dark:bg-input/30 via --mono-mode-surface). The\r\n `--mono-input-outline-*` knobs are how a flavor restyles THIS variant alone\r\n (maia bg-input/30, luma / rhea border-transparent bg-input/50, sera the\r\n underline) without touching filled / underlined. */\r\n[mono-input]:is(:not([mono-variant]), [mono-variant=\"outlined\"]) {\r\n --_mono-input-bg-preset: var(--mono-input-outline-bg);\r\n --_mono-input-border-color-preset: var(--mono-input-outline-border-color);\r\n --_mono-input-side-border-color-preset: var(--mono-input-outline-side-border-color);\r\n --_mono-input-shadow-preset: var(--mono-input-outline-shadow, var(--mono-shadow-xs));\r\n --_mono-input-ring-width-preset: var(--mono-input-outline-ring-width);\r\n --_mono-input-radius-preset: var(--mono-input-outline-radius);\r\n --_mono-input-padding-x-preset: var(--mono-input-outline-padding-x);\r\n --_mono-input-affix-padding-preset: var(--mono-input-outline-affix-padding);\r\n}\r\n\r\n/* EXTENSION — filled ≡ basecoat@1.0.2 styles/luma.css .input-group:\r\n border-transparent bg-input/50, no shadow-xs (the ring stays) */\r\n[mono-input][mono-variant=\"filled\"] {\r\n --_mono-input-bg-preset: var(--mono-input-filled-bg, color-mix(in oklab, var(--input) 50%, transparent));\r\n --_mono-input-border-color-preset: transparent;\r\n --_mono-input-shadow-preset: 0 0 #0000;\r\n}\r\n\r\n/* EXTENSION — underlined ≡ basecoat@1.0.2 styles/sera.css .input-group:\r\n rounded-none border-transparent border-b-input bg-transparent px-0, no\r\n shadow, no ring, focus-within:border-b-ring, has-[aria-invalid]:border-b-destructive.\r\n Only the bottom edge paints; the sides are transparent in every state. */\r\n[mono-input][mono-variant=\"underlined\"] {\r\n --_mono-input-bg-preset: transparent;\r\n --_mono-input-side-border-color-preset: transparent;\r\n --_mono-input-shadow-preset: 0 0 #0000;\r\n --_mono-input-ring-width-preset: 0px;\r\n --_mono-input-radius-preset: 0;\r\n --_mono-input-padding-x-preset: 0;\r\n --_mono-input-affix-padding-preset: 0;\r\n}\r\n\r\n/* =========================================\r\n Colours — the `color` prop is the FOCUS colour (ring + focused border).\r\n No resting tint: Basecoat fields rest on --input whatever their role.\r\n ========================================= */\r\n\r\n[mono-input]:is(:not([mono-color]), [mono-color=\"primary\"]) {\r\n --_mono-input-ring-color-preset: var(--_mono-input-primary);\r\n}\r\n[mono-input][mono-color=\"secondary\"] {\r\n --_mono-input-ring-color-preset: var(--_mono-input-secondary);\r\n}\r\n[mono-input][mono-color=\"success\"] {\r\n --_mono-input-ring-color-preset: var(--_mono-input-success);\r\n}\r\n[mono-input][mono-color=\"danger\"] {\r\n --_mono-input-ring-color-preset: var(--_mono-input-danger);\r\n}\r\n[mono-input][mono-color=\"warning\"] {\r\n --_mono-input-ring-color-preset: var(--_mono-input-warning);\r\n}\r\n[mono-input][mono-color=\"info\"] {\r\n --_mono-input-ring-color-preset: var(--_mono-input-info);\r\n}\r\n[mono-input][mono-color=\"teal\"] {\r\n --_mono-input-ring-color-preset: var(--_mono-input-teal);\r\n}\r\n[mono-input][mono-color=\"purple\"] {\r\n --_mono-input-ring-color-preset: var(--_mono-input-purple);\r\n}\r\n[mono-input][mono-color=\"neutral\"] {\r\n --_mono-input-ring-color-preset: var(--_mono-input-neutral);\r\n}\r\n[mono-input][mono-color=\"dark\"] {\r\n --_mono-input-ring-color-preset: var(--_mono-input-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 — flex items-center\r\n gap-2 text-sm leading-none font-medium select-none w-fit */\r\n:where([mono-input]) > [mono-label] {\r\n display: flex;\r\n align-items: center;\r\n width: fit-content;\r\n gap: var(--mono-input-label-gap, calc(var(--mono-spacing) * 2));\r\n font-size: var(--mono-input-label-font-size, var(--mono-text-sm));\r\n line-height: var(--mono-input-label-line-height, 1);\r\n font-weight: var(--mono-input-label-font-weight, var(--mono-label-font-weight, var(--mono-font-weight-medium)));\r\n text-transform: var(--mono-input-label-text-transform, none);\r\n letter-spacing: var(--mono-input-label-letter-spacing, normal);\r\n color: var(--_mono-input-text);\r\n user-select: none;\r\n}\r\n\r\n/* in-data-[disabled=true]:opacity-50 / peer-disabled:opacity-50 */\r\n[mono-input][mono-disabled] > [mono-label],\r\n[mono-input]:has(> [mono-field] > [mono-native]:disabled) > [mono-label] {\r\n opacity: 0.5;\r\n pointer-events: none;\r\n}\r\n\r\n/* basecoat@1.0.2 styles/vega.css .field — data-invalid:text-destructive */\r\n[mono-input][mono-validation-state=\"invalid\"] > [mono-label],\r\n[mono-input]:has(> [mono-field] > [mono-native][aria-invalid=\"true\"]) > [mono-label] {\r\n color: var(--_mono-input-invalid);\r\n}\r\n\r\n/* EXTENSION — the required asterisk */\r\n:where([mono-input]) [mono-required-mark] {\r\n color: var(--_mono-input-danger);\r\n}\r\n\r\n/* =========================================\r\n The field — the bordered box\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 components/input-group.css .input-group */\r\n/* basecoat@1.0.2 styles/vega.css .input-group — h-9 rounded-md border\r\n border-input shadow-xs transition-[color,box-shadow] focus-within:border-ring\r\n focus-within:ring-3 focus-within:ring-ring/50; mono: `--tw-ring-*` flattened to\r\n the ring + shadow slots, the height is the control token, and the side\r\n edges read their own slot so a flavor can keep only the bottom one */\r\n:where([mono-input]) > [mono-field] {\r\n --_mono-input-bc: var(--_mono-input-border-color);\r\n --_mono-input-side-bc: var(--mono-input-side-border-color, var(--_mono-input-side-border-color-preset, var(--_mono-input-bc)));\r\n /* The focus / state ring slot — `0 0 #0000` until a state sets it. Kept as a\r\n slot so a variant can neutralise the resting shadow without ever writing\r\n `box-shadow: none` (which would out-specify the ring). */\r\n --_mono-input-ring: 0 0 #0000;\r\n\r\n position: relative;\r\n display: flex;\r\n align-items: center;\r\n width: 100%;\r\n min-width: 0;\r\n min-height: var(--_mono-input-height);\r\n outline-style: none;\r\n border: var(--mono-border-width) solid var(--_mono-input-bc);\r\n border-top-color: var(--_mono-input-side-bc);\r\n border-inline-color: var(--_mono-input-side-bc);\r\n border-radius: var(--_mono-input-radius);\r\n background: var(--_mono-input-bg);\r\n color: var(--_mono-input-text);\r\n box-shadow: var(--_mono-input-ring), var(--_mono-input-shadow);\r\n transition-property: color, box-shadow, border-color, background-color;\r\n transition-timing-function: var(--mono-ease);\r\n transition-duration: var(--mono-duration);\r\n\r\n /* focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 */\r\n &:focus-within {\r\n --_mono-input-bc: var(--_mono-input-ring-color);\r\n --_mono-input-ring: 0 0 0 var(--_mono-input-ring-width) color-mix(in oklab, var(--_mono-input-ring-color) var(--_mono-input-ring-alpha), transparent);\r\n }\r\n}\r\n\r\n/* basecoat@1.0.2 styles/vega.css .input-group — has-[[aria-invalid=true]]:border-destructive\r\n has-[[aria-invalid=true]]:ring-3 has-[[aria-invalid=true]]:ring-destructive/20\r\n (dark: border /50, ring /40 — carried by the mode tokens). The ring is\r\n permanent, and it wins over the focus ring — same as the vendor order. */\r\n[mono-input][mono-validation-state=\"invalid\"] > [mono-field],\r\n:where([mono-input]) > [mono-field]:has(> [mono-native][aria-invalid=\"true\"]) {\r\n --_mono-input-bc: var(--mono-mode-invalid-border);\r\n --_mono-input-ring: 0 0 0 var(--_mono-input-ring-width) var(--mono-mode-invalid-ring);\r\n}\r\n\r\n/* EXTENSION — valid / warning are the invalid pattern in the role's colour */\r\n[mono-input][mono-validation-state=\"valid\"] > [mono-field] {\r\n --_mono-input-bc: color-mix(in oklab, var(--_mono-input-valid) var(--mono-mode-state-border-alpha), transparent);\r\n --_mono-input-ring: 0 0 0 var(--_mono-input-ring-width) color-mix(in oklab, var(--_mono-input-valid) var(--mono-mode-state-ring-alpha), transparent);\r\n}\r\n[mono-input][mono-validation-state=\"warning\"] > [mono-field] {\r\n --_mono-input-bc: color-mix(in oklab, var(--_mono-input-warning) var(--mono-mode-state-border-alpha), transparent);\r\n --_mono-input-ring: 0 0 0 var(--_mono-input-ring-width) color-mix(in oklab, var(--_mono-input-warning) var(--mono-mode-state-ring-alpha), transparent);\r\n}\r\n\r\n/* EXTENSION — readonly: focusable, on a muted surface */\r\n[mono-input][mono-readonly] > [mono-field],\r\n:where([mono-input]) > [mono-field]:has(> [mono-native]:read-only:not(:disabled)) {\r\n background: var(--mono-input-readonly-bg, var(--muted));\r\n}\r\n\r\n/* basecoat@1.0.2 styles/vega.css .input-group:has(> :is(input, textarea, select, [data-control]):disabled) — opacity-50\r\n (`--mono-input-disabled-bg`: nova / lyra add disabled:bg-input/50) */\r\n[mono-input][mono-disabled] > [mono-field],\r\n:where([mono-input]) > [mono-field]:has(> [mono-native]:disabled) {\r\n opacity: 0.5;\r\n cursor: not-allowed;\r\n background: var(--mono-input-disabled-bg, var(--_mono-input-bg));\r\n}\r\n\r\n/* =========================================\r\n The native input\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 components/input-group.css .input-group > :is(input, textarea, select, [data-control]) —\r\n block min-w-0 flex-1 appearance-none rounded-none border-0 bg-transparent\r\n text-foreground shadow-none outline-none placeholder:text-muted-foreground */\r\n/* basecoat@1.0.2 styles/vega.css .input-group > :is(input, select, [data-control])\r\n — px-2.5 py-1 text-sm; mono: no block padding — the FIELD owns the height\r\n (`min-height: token`) and `align-self: stretch` spans the click target */\r\n:where([mono-input]) [mono-native] {\r\n display: block;\r\n flex: 1 1 auto;\r\n width: 100%;\r\n min-width: 0;\r\n align-self: stretch;\r\n appearance: none;\r\n margin: 0;\r\n border: 0;\r\n border-radius: 0;\r\n outline: none;\r\n background: transparent;\r\n box-shadow: none;\r\n color: var(--_mono-input-text);\r\n font-family: inherit;\r\n font-size: var(--_mono-input-font-size);\r\n line-height: var(--_mono-input-line-height);\r\n padding-inline: var(--_mono-input-padding-x);\r\n padding-block: 0;\r\n\r\n &::placeholder {\r\n color: var(--_mono-input-placeholder);\r\n }\r\n\r\n /* .input:disabled — pointer-events-none cursor-not-allowed (the opacity is\r\n on the field so the affixes fade with it) */\r\n &:disabled {\r\n pointer-events: none;\r\n cursor: not-allowed;\r\n }\r\n\r\n &:read-only {\r\n cursor: inherit;\r\n }\r\n\r\n /* Kill the native focus outline in host projects; the field draws the ring. */\r\n &:focus,\r\n &:focus-visible {\r\n outline: none !important;\r\n }\r\n\r\n &[type='number']::-webkit-outer-spin-button,\r\n &[type='number']::-webkit-inner-spin-button {\r\n margin: 0;\r\n }\r\n}\r\n\r\n/* basecoat@1.0.2 styles/vega.css .input-group:not([data-orientation='vertical']):has(> :is([data-align='start'], [data-align='inline-start'])) > :is(input, select, [data-control]) — ps-1.5\r\n (and pe-1.5 for an end affix). The clear button counts as an end affix. */\r\n:where([mono-input]) > [mono-field]:has(> [mono-prefix]:not([mono-empty])) > [mono-native] {\r\n padding-inline-start: var(--mono-input-affix-gap, calc(var(--mono-spacing) * 1.5));\r\n}\r\n:where([mono-input]) > [mono-field]:has(> :is([mono-suffix]:not([mono-empty]), [mono-clear])) > [mono-native] {\r\n padding-inline-end: var(--mono-input-affix-gap, calc(var(--mono-spacing) * 1.5));\r\n}\r\n\r\n/* =========================================\r\n Prefix / suffix\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 styles/vega.css .input-group > :is(span, [role='group'], header, footer), .input-group > :is(svg, kbd, .popover, .dropdown-menu) — gap-2 py-1.5\r\n text-sm font-medium text-muted-foreground select-none, svg size-4;\r\n [data-align='start'] ps-2 / [data-align='end'] pe-2 */\r\n:where([mono-input]) [mono-prefix],\r\n:where([mono-input]) [mono-suffix] {\r\n flex: 0 0 auto;\r\n display: inline-flex;\r\n align-items: center;\r\n gap: calc(var(--mono-spacing) * 2);\r\n font-size: var(--mono-input-affix-font-size, var(--_mono-input-font-size));\r\n line-height: var(--_mono-input-line-height);\r\n font-weight: var(--mono-font-weight-medium);\r\n color: var(--_mono-input-muted);\r\n user-select: none;\r\n}\r\n\r\n:where([mono-input]) [mono-prefix] {\r\n padding-inline-start: var(--_mono-input-affix-padding);\r\n}\r\n\r\n:where([mono-input]) [mono-suffix] {\r\n padding-inline-end: var(--_mono-input-affix-padding);\r\n}\r\n\r\n/* The light build re-appends slotted prefix/suffix content into this\r\n `[data-mono-slot]` placeholder, one level below the inline-flex wrapper.\r\n Make it a flex container too, so an `display: inline` icon span (e.g. a\r\n UnoCSS `i-mdi-*`, which ignores width/height while inline) is blockified\r\n into a flex item and actually renders its box. */\r\n:where([mono-input]) :is([mono-prefix], [mono-suffix]) > [data-mono-slot] {\r\n display: inline-flex;\r\n align-items: center;\r\n gap: inherit;\r\n}\r\n\r\n/* `[&>svg:not([class*='size-'])]:size-4` — our icons are UnoCSS `i-*` mask\r\n spans as often as SVGs, so every glyph in an affix takes the affix size. */\r\n:where([mono-input]) :is([mono-prefix], [mono-suffix]) :is(svg, .mono-icon, [mono-icon]),\r\n:where([mono-input]) :is([mono-prefix], [mono-suffix]) ::slotted(svg),\r\n:where([mono-input]) :is([mono-prefix], [mono-suffix]) ::slotted(.mono-icon),\r\n:where([mono-input]) :is([mono-prefix], [mono-suffix]) ::slotted([mono-icon]) {\r\n display: block;\r\n width: var(--_mono-input-affix-icon);\r\n height: var(--_mono-input-affix-icon);\r\n flex-shrink: 0;\r\n pointer-events: none;\r\n}\r\n\r\n/* =========================================\r\n Clear button — a ghost icon button in the end affix slot\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 styles/vega.css .input-group > :is(button, [role='group'] > button, header > button, footer > button):has(> svg):not(:has(> :not(svg)))\r\n — size-6 rounded-[calc(var(--radius)-5px)] p-0 shadow-none, svg size-3.5;\r\n .input-group > button[data-align='end'] me-1; painted as .btn[data-variant='ghost'] */\r\n:where([mono-input]) [mono-clear] {\r\n flex: 0 0 auto;\r\n display: inline-flex;\r\n align-items: center;\r\n justify-content: center;\r\n width: var(--_mono-input-clear);\r\n height: var(--_mono-input-clear);\r\n padding: 0;\r\n margin: 0;\r\n margin-inline-end: var(--mono-spacing);\r\n border: 0;\r\n border-radius: var(--mono-input-clear-radius, calc(var(--radius) - 5px));\r\n background: transparent;\r\n box-shadow: none;\r\n color: var(--_mono-input-muted);\r\n font: inherit;\r\n line-height: 1;\r\n cursor: pointer;\r\n outline-style: none;\r\n transition-property: color, background-color, box-shadow;\r\n transition-timing-function: var(--mono-ease);\r\n transition-duration: var(--mono-duration);\r\n\r\n &:focus-visible {\r\n box-shadow: 0 0 0 var(--_mono-input-ring-width) color-mix(in oklab, var(--_mono-input-ring-color) var(--_mono-input-ring-alpha), transparent);\r\n }\r\n\r\n &:active {\r\n translate: 0 1px;\r\n }\r\n}\r\n\r\n/* basecoat@1.0.2 styles/vega.css .btn[data-variant='ghost'] — hover:bg-muted\r\n hover:text-foreground (dark:hover:bg-muted/50 via --mono-mode-ghost-hover) */\r\n@media (hover: hover) {\r\n :where([mono-input]) [mono-clear]:hover {\r\n background: var(--mono-mode-ghost-hover);\r\n color: var(--_mono-input-text);\r\n }\r\n}\r\n\r\n:where([mono-input]) [mono-clear] > :is(svg, .mono-icon, [mono-icon]) {\r\n display: block;\r\n width: var(--_mono-input-clear-glyph);\r\n height: var(--_mono-input-clear-glyph);\r\n pointer-events: none;\r\n}\r\n\r\n/* =========================================\r\n Message — helper / validation text under the field\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 styles/vega.css .fieldset legend + p, .field > p, .field section > p — text-sm text-muted-foreground\r\n leading-normal font-normal text-start. The wrapper is always rendered\r\n (aria-describedby points at it); it takes no space until it holds text. */\r\n:where([mono-input]) > [mono-message-wrap] {\r\n display: block;\r\n}\r\n\r\n:where([mono-input]) > [mono-message-wrap]:not(:has([mono-message]:not([mono-empty]))) {\r\n display: none;\r\n}\r\n\r\n:where([mono-input]) [mono-message] {\r\n font-size: var(--mono-input-message-font-size, var(--mono-text-sm));\r\n line-height: var(--mono-input-message-line-height, var(--mono-leading-normal));\r\n font-weight: var(--mono-font-weight-normal);\r\n text-align: start;\r\n color: var(--_mono-input-muted);\r\n}\r\n\r\n/* basecoat@1.0.2 styles/vega.css .field [role=\"alert\"] — text-destructive text-sm */\r\n:where([mono-input]) [mono-message=\"invalid\"] {\r\n color: var(--_mono-input-invalid);\r\n}\r\n\r\n/* EXTENSION — the other two states in their role colour */\r\n:where([mono-input]) [mono-message=\"valid\"] {\r\n color: var(--_mono-input-valid);\r\n}\r\n\r\n:where([mono-input]) [mono-message=\"warning\"] {\r\n color: var(--_mono-input-warning);\r\n}\r\n\r\n@media (prefers-reduced-motion: reduce) {\r\n :where([mono-input]) > [mono-field],\r\n :where([mono-input]) [mono-clear] {\r\n transition: none;\r\n }\r\n}\r\n";
968
+ //#endregion
969
+ //#region src/components/input/mono-input.ts
970
+ var MonoInput = class MonoInput extends MonoInputCore(LitElement) {
971
+ constructor(..._args) {
972
+ super(..._args);
973
+ this._slotPrefix = [];
974
+ this._slotSuffix = [];
975
+ this._slotLabel = [];
976
+ this._slotHelper = [];
977
+ }
978
+ static {
979
+ this.styles = [unsafeCSS(input_default)];
980
+ }
981
+ createRenderRoot() {
982
+ return this;
983
+ }
984
+ /**
985
+ * Capture `slot="…"` light-DOM children into the per-region arrays. Safe to run
986
+ * MORE THAN ONCE: captured nodes have their `slot` attribute removed and are
987
+ * detached from the host, so a re-scan never re-captures them. Re-running lets
988
+ * us pick up children Vue appends AFTER `connectedCallback` (e.g. a client-only
989
+ * `<mono-input>` slotted into the SSR `<mono-nav>`'s shadow `<slot>`, where the
990
+ * `<span slot="prefix">` can arrive late) — the original one-shot capture missed
991
+ * those, so the prefix wrapper was never rendered and the icon never showed.
992
+ */
993
+ _captureSlots() {
994
+ this._slotObserver?.disconnect();
995
+ const captured = monoHostChildNodes(this);
996
+ const capturedSlotNodes = /* @__PURE__ */ new Set();
997
+ for (const node of captured) {
998
+ if (!(node instanceof Element)) continue;
999
+ const slotName = node.getAttribute("slot");
1000
+ if (slotName === "prefix") {
1001
+ node.removeAttribute("slot");
1002
+ this._slotPrefix.push(node);
1003
+ capturedSlotNodes.add(node);
1004
+ } else if (slotName === "suffix") {
1005
+ node.removeAttribute("slot");
1006
+ this._slotSuffix.push(node);
1007
+ capturedSlotNodes.add(node);
1008
+ } else if (slotName === "label") {
1009
+ node.removeAttribute("slot");
1010
+ this._slotLabel.push(node);
1011
+ capturedSlotNodes.add(node);
1012
+ } else if (slotName === "helper") {
1013
+ node.removeAttribute("slot");
1014
+ this._slotHelper.push(node);
1015
+ capturedSlotNodes.add(node);
1016
+ }
1017
+ }
1018
+ if (capturedSlotNodes.size) {
1019
+ this._hasPrefixSlotState = this._slotPrefix.length > 0;
1020
+ this._hasSuffixSlotState = this._slotSuffix.length > 0;
1021
+ this._hasLabelSlotState = this._slotLabel.length > 0;
1022
+ this._hasHelperSlotState = this._slotHelper.length > 0;
1023
+ for (const node of capturedSlotNodes) if (node.parentNode === this) this.removeChild(node);
1024
+ }
1025
+ if (this._slotObserver && this.isConnected) this._slotObserver.observe(this, { childList: true });
1026
+ }
1027
+ connectedCallback() {
1028
+ super.connectedCallback();
1029
+ if (!isServer && !this._slotObserver && typeof MutationObserver !== "undefined") this._slotObserver = new MutationObserver(() => this._captureSlots());
1030
+ this._captureSlots();
1031
+ if (this.isConnected) this.performUpdate();
1032
+ }
1033
+ disconnectedCallback() {
1034
+ this._slotObserver?.disconnect();
1035
+ super.disconnectedCallback();
1036
+ }
1037
+ updated(changed) {
1038
+ super.updated(changed);
1039
+ this._placeSlot("prefix", this._slotPrefix);
1040
+ this._placeSlot("suffix", this._slotSuffix);
1041
+ this._placeSlot("label", this._slotLabel);
1042
+ this._placeSlot("helper", this._slotHelper);
1043
+ }
1044
+ _placeSlot(name, nodes) {
1045
+ if (!nodes.length) return;
1046
+ const target = this.querySelector(`[data-mono-slot="${name}"]`);
1047
+ if (!target) return;
1048
+ for (const node of nodes) placeSlotNode(target, node);
1049
+ }
1050
+ renderIcon(_name) {
1051
+ return html`<span class="mono-icon i-mdi-close" mono-icon aria-hidden="true"></span>`;
1052
+ }
1053
+ _renderLabel() {
1054
+ if (!this.label && !this._hasLabelSlot) return nothing;
1055
+ return html`
1056
+ <label class=${this._cls("mono-input-label", "label")} mono-label for=${this._inputId}>
1057
+ ${this._hasLabelSlot ? html`<span data-mono-slot="label"></span>` : this.label}
1058
+ ${this.required ? html`<span class=${this._cls("mono-input-required", "required")} mono-required-mark>*</span>` : nothing}
1059
+ </label>
1060
+ `;
1061
+ }
1062
+ _renderHelper() {
1063
+ const base = this._cls("mono-input-message", "message");
1064
+ if (this.validationMessage) {
1065
+ const state = this._resolvedValidationState;
1066
+ return html`<div class=${`${base} ${state}`} mono-message=${state} role=${state === "invalid" ? "alert" : nothing}>${this.validationMessage}</div>`;
1067
+ }
1068
+ if (this.errorMessage) return html`<div class=${`${base} invalid`} mono-message="invalid" role="alert">${this.errorMessage}</div>`;
1069
+ if (this.successMessage) return html`<div class=${`${base} valid`} mono-message="valid">${this.successMessage}</div>`;
1070
+ if (this.helperText || this._hasHelperSlot) return html`<div class=${`${base} helper`} mono-message="helper">${this._hasHelperSlot ? html`<span data-mono-slot="helper"></span>` : this.helperText}</div>`;
1071
+ return nothing;
1072
+ }
1073
+ render() {
1074
+ return this._renderWrapper(html`
1075
+ ${this._renderLabel()}
1076
+ <div class=${this._fieldClasses} mono-field>
1077
+ ${this._hasPrefixSlot ? html`<span class=${this._cls("mono-input-prefix", "prefix")} mono-prefix><span data-mono-slot="prefix"></span></span>` : nothing}
1078
+ ${this._renderNative()}
1079
+ ${this._renderClear()}
1080
+ ${this._hasSuffixSlot ? html`<span class=${this._cls("mono-input-suffix", "suffix")} mono-suffix><span data-mono-slot="suffix"></span></span>` : nothing}
1081
+ </div>
1082
+ <div id=${this._messageId} class=${this.cssClass?.messageWrap ?? ""} mono-message-wrap>
1083
+ ${this._renderHelper()}
1084
+ </div>
1085
+ `);
1086
+ }
1087
+ };
1088
+ MonoInput = __decorate([customElement("mono-input")], MonoInput);
1089
+ //#endregion
1090
+ //#region src/components/input/input-utils.ts
1091
+ function validateInputProps(props) {
1092
+ const validTypes = [
1093
+ "text",
1094
+ "email",
1095
+ "password",
1096
+ "number",
1097
+ "tel",
1098
+ "url",
1099
+ "date",
1100
+ "time",
1101
+ "month",
1102
+ "week",
1103
+ "search"
1104
+ ];
1105
+ const validSizes = [
1106
+ "xs",
1107
+ "sm",
1108
+ "md",
1109
+ "lg",
1110
+ "xl",
1111
+ "xxl"
1112
+ ];
1113
+ const validColors = [
1114
+ "primary",
1115
+ "secondary",
1116
+ "success",
1117
+ "danger",
1118
+ "warning",
1119
+ "info",
1120
+ "teal",
1121
+ "purple",
1122
+ "neutral",
1123
+ "dark"
1124
+ ];
1125
+ const validVariants = [
1126
+ "outlined",
1127
+ "filled",
1128
+ "underlined"
1129
+ ];
1130
+ if (props.type && !validTypes.includes(props.type)) return false;
1131
+ if (props.size && !validSizes.includes(props.size)) return false;
1132
+ if (props.color && !validColors.includes(props.color)) return false;
1133
+ if (props.variant && !validVariants.includes(props.variant)) return false;
1134
+ return true;
1135
+ }
1136
+ function generateInputAttributes(type, disabled, readonly, required, pattern, min, max, step, placeholder) {
1137
+ return {
1138
+ type,
1139
+ disabled: disabled || void 0,
1140
+ readonly: readonly || void 0,
1141
+ required: required || void 0,
1142
+ pattern: pattern || void 0,
1143
+ min,
1144
+ max,
1145
+ step,
1146
+ placeholder: placeholder || void 0
1147
+ };
1148
+ }
1149
+ function generateInputAriaAttributes(disabled, readonly, required, hasError, label, errorMessage) {
1150
+ return {
1151
+ "aria-disabled": disabled ? "true" : void 0,
1152
+ "aria-readonly": readonly ? "true" : void 0,
1153
+ "aria-required": required ? "true" : void 0,
1154
+ "aria-invalid": hasError ? "true" : void 0,
1155
+ "aria-label": label || void 0,
1156
+ "aria-errormessage": hasError ? errorMessage || void 0 : void 0
1157
+ };
1158
+ }
1159
+ function getInputIcon(type) {
1160
+ const iconMap = {
1161
+ text: "M4 6h16M4 12h16M4 18h10",
1162
+ email: "M4 6h16v12H4z M4 7l8 6 8-6",
1163
+ password: "M12 17a2 2 0 1 0 0-4a2 2 0 0 0 0 4zm6-7V8a6 6 0 1 0-12 0v2",
1164
+ number: "M8 4v16M16 4v16M5 9h14M5 15h14",
1165
+ tel: "M6.6 10.8a15.5 15.5 0 0 0 6.6 6.6l2.2-2.2a1.5 1.5 0 0 1 1.5-.36a10 10 0 0 0 3.1.5a1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.06a1 1 0 0 1 1 1a10 10 0 0 0 .5 3.1a1.5 1.5 0 0 1-.36 1.5z",
1166
+ url: "M10 14a5 5 0 0 1 0-7l1-1a5 5 0 0 1 7 7l-1 1M14 10a5 5 0 0 1 0 7l-1 1a5 5 0 0 1-7-7l1-1",
1167
+ date: "M7 3v3M17 3v3M4 8h16M5 5h14v16H5z",
1168
+ time: "M12 7v5l3 3M12 22a10 10 0 1 0 0-20a10 10 0 0 0 0 20z",
1169
+ month: "M7 3v3M17 3v3M5 5h14v14H5zM8 11h8",
1170
+ week: "M7 3v3M17 3v3M5 5h14v16H5zM9 11h6M9 15h4",
1171
+ search: "M21 21l-4.35-4.35M10.5 18a7.5 7.5 0 1 1 0-15a7.5 7.5 0 0 1 0 15z"
1172
+ };
1173
+ return iconMap[type] ?? iconMap.text;
1174
+ }
1175
+ //#endregion
1176
+ export { MonoInput, applyFormat, caretAfterFormat, generateInputAriaAttributes, generateInputAttributes, getInputIcon, localeSeparators, normaliseValue, parseFormat, resolveFormat, significantFor, stripFormat, validateInputProps };