@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,1150 @@
1
+ import { a as __decorate, f as customElement, i as withShadowUtilityStyles, l as defineHybridPropAliases, r as toShadowCss, s as booleanStringConverter, t as flushSsrHydration } from "../../hydration-flush-RB5Tz5nl.js";
2
+ import { t as dispatchMonoEvent } from "../../mono-event-Bi1qP9uN.js";
3
+ import { n as cssPart } from "../../css-class-BRKRzHx-.js";
4
+ import { t as buildSizeStyle } from "../../css-size-DhHSVZJK.js";
5
+ import { t as MonoFormControlCore } from "../../form-control-core-B8d7k6vk.js";
6
+ import { t as input_default } from "../../input-zGOULADt.js";
7
+ import { LitElement, html, isServer, nothing, unsafeCSS } from "lit";
8
+ import { property, query, state } from "lit/decorators.js";
9
+ import { ifDefined } from "lit/directives/if-defined.js";
10
+ import { styleMap } from "lit/directives/style-map.js";
11
+ //#region src/components/input/input-format.ts
12
+ var SEPARATOR_CACHE = /* @__PURE__ */ new Map();
13
+ /**
14
+ * Ask `Intl` which characters this locale uses, rather than assuming `,` and `.`.
15
+ *
16
+ * Several locales use neither — `fr-FR` groups with a narrow no-break space, `de-CH` with an
17
+ * apostrophe — and a hardcoded pair would silently mangle them.
18
+ */
19
+ function localeSeparators(locale) {
20
+ const key = locale ?? "";
21
+ const cached = SEPARATOR_CACHE.get(key);
22
+ if (cached) return cached;
23
+ let separators = {
24
+ group: ",",
25
+ decimal: "."
26
+ };
27
+ try {
28
+ const parts = new Intl.NumberFormat(locale || void 0, {
29
+ useGrouping: true,
30
+ minimumFractionDigits: 1
31
+ }).formatToParts(12345.6);
32
+ separators = {
33
+ group: parts.find((p) => p.type === "group")?.value ?? ",",
34
+ decimal: parts.find((p) => p.type === "decimal")?.value ?? "."
35
+ };
36
+ } catch {}
37
+ SEPARATOR_CACHE.set(key, separators);
38
+ return separators;
39
+ }
40
+ /**
41
+ * Parse a pattern string into a descriptor, or `null` when it is not a pattern we understand.
42
+ *
43
+ * `null` is deliberately not an error: an unparseable pattern leaves the field an ordinary
44
+ * unformatted input rather than blanking it or throwing mid-keystroke.
45
+ */
46
+ function parseFormat(pattern) {
47
+ const raw = String(pattern ?? "");
48
+ if (!raw) return null;
49
+ const hole = raw.indexOf("{}");
50
+ if (hole !== -1) return {
51
+ kind: "template",
52
+ before: raw.slice(0, hole),
53
+ after: raw.slice(hole + 2)
54
+ };
55
+ let body = raw;
56
+ let prefix = "";
57
+ let suffix = "";
58
+ const leading = body.match(/^"([^"]*)"/);
59
+ if (leading) {
60
+ prefix = leading[1] ?? "";
61
+ body = body.slice(leading[0].length);
62
+ }
63
+ const trailing = body.match(/"([^"]*)"$/);
64
+ if (trailing) {
65
+ suffix = trailing[1] ?? "";
66
+ body = body.slice(0, body.length - trailing[0].length);
67
+ }
68
+ if (!body || !/^[#0,]*(?:\.[#0]*)?$/.test(body)) return null;
69
+ if (!/[#0]/.test(body)) return null;
70
+ const [intPart = "", fracPart] = body.split(".");
71
+ return {
72
+ kind: "number",
73
+ grouping: intPart.includes(","),
74
+ minFraction: fracPart ? (fracPart.match(/0/g) ?? []).length : 0,
75
+ maxFraction: fracPart ? fracPart.length : 0,
76
+ prefix,
77
+ suffix
78
+ };
79
+ }
80
+ /**
81
+ * Strip a formatted string back to its raw value.
82
+ *
83
+ * For numbers the result is always canonical — digits, an optional leading `-`, and `.` as the
84
+ * decimal point — whatever the locale draws with, so it is safe to hand to `Number()`.
85
+ */
86
+ /**
87
+ * Decide whether a GROUP character in the text is really the decimal point the user typed.
88
+ *
89
+ * It exists because the two roles collide: in `id-ID` the grouping character is `.`, so typing
90
+ * `0.9` produced `09` — the strip deleted the point before anything could read it as one. Yet
91
+ * `1.000` typed in the same field must keep meaning a thousand, and that is not a matter of
92
+ * guessing intent: the field re-strips its OWN formatted text on every keystroke, and
93
+ * `addGrouping` only ever emits runs of exactly three digits.
94
+ *
95
+ * So a group character is the decimal point when
96
+ * · the pattern has a fraction at all,
97
+ * · the locale's real decimal character is nowhere in the text (an explicit `1.000,5` wins), and
98
+ * · the digits after the LAST group character number at most `maxFraction` and are not exactly 3.
99
+ *
100
+ * A run of length ZERO qualifies deliberately: a trailing `0.` must survive, or the point is
101
+ * deleted the instant it is typed and `0.9` can never be reached left to right — `applyFormat`
102
+ * carries the matching rule that keeps a lone trailing point on screen.
103
+ *
104
+ * The consequence, and it is documented rather than worked around: under a dot-grouping locale a
105
+ * THREE-digit fraction (`0.123`) is unreachable by dot and has to be typed `0,123`.
106
+ *
107
+ * Returns the split, or `null` when every group character is grouping. Works for either locale
108
+ * shape — under `en-US` the roles are simply swapped and a typed `,` is promoted the same way.
109
+ */
110
+ function decimalGroupSplit(text, descriptor, group, decimal) {
111
+ if (descriptor.maxFraction <= 0) return null;
112
+ if (!group || group === decimal) return null;
113
+ if (text.includes(decimal)) return null;
114
+ const at = text.lastIndexOf(group);
115
+ if (at === -1) return null;
116
+ const tail = text.slice(at + group.length);
117
+ if (tail.length > descriptor.maxFraction || tail.length === 3) return null;
118
+ if (tail && !/^\d+$/.test(tail)) return null;
119
+ return {
120
+ head: text.slice(0, at),
121
+ tail
122
+ };
123
+ }
124
+ function stripFormat(text, descriptor, locale) {
125
+ const value = String(text ?? "");
126
+ if (!descriptor) return value;
127
+ if (descriptor.kind === "template") {
128
+ let out = value;
129
+ if (descriptor.before && out.startsWith(descriptor.before)) out = out.slice(descriptor.before.length);
130
+ if (descriptor.after && out.endsWith(descriptor.after)) out = out.slice(0, out.length - descriptor.after.length);
131
+ return out;
132
+ }
133
+ const { group, decimal } = localeSeparators(locale);
134
+ let out = value;
135
+ if (descriptor.prefix) out = out.split(descriptor.prefix).join("");
136
+ if (descriptor.suffix) out = out.split(descriptor.suffix).join("");
137
+ const promoted = decimalGroupSplit(out, descriptor, group, decimal);
138
+ if (promoted) out = `${promoted.head.split(group).join("")}.${promoted.tail}`;
139
+ else {
140
+ out = out.split(group).join("");
141
+ if (decimal !== ".") out = out.split(decimal).join(".");
142
+ }
143
+ const negative = out.trimStart().startsWith("-");
144
+ out = out.replace(/[^\d.]/g, "");
145
+ const first = out.indexOf(".");
146
+ if (first !== -1) out = out.slice(0, first + 1) + out.slice(first + 1).replace(/\./g, "");
147
+ if (descriptor.maxFraction === 0) out = out.split(".")[0] ?? "";
148
+ return negative && out ? `-${out}` : out;
149
+ }
150
+ /**
151
+ * Render a raw value for DISPLAY.
152
+ *
153
+ * The number branch deliberately does NOT hand the whole string to `Intl`: a value being typed is
154
+ * usually not yet a finished number, and `Intl` would tidy away exactly the characters the user is
155
+ * in the middle of writing — a trailing decimal point (`10000.`) and trailing fraction zeros
156
+ * (`10.50`) both vanish, which makes the field fight the person using it. Only the INTEGER part is
157
+ * grouped; the fraction is carried through verbatim, clamped to the pattern's ceiling.
158
+ */
159
+ function applyFormat(raw, descriptor, locale, opts = {}) {
160
+ const value = String(raw ?? "");
161
+ if (!descriptor) return value;
162
+ if (descriptor.kind === "template") {
163
+ if (!value) return "";
164
+ return `${descriptor.before}${value}${descriptor.after}`;
165
+ }
166
+ if (!value || value === "-") return value;
167
+ const negative = value.startsWith("-");
168
+ const unsigned = negative ? value.slice(1) : value;
169
+ const [intRaw = "", fracRaw] = unsigned.split(".");
170
+ const hasPoint = unsigned.includes(".");
171
+ const { group, decimal } = localeSeparators(locale);
172
+ const digits = intRaw.replace(/\D/g, "").replace(/^0+(?=\d)/, "");
173
+ const grouped = descriptor.grouping ? addGrouping(digits, group) : digits;
174
+ let fraction = (fracRaw ?? "").replace(/\D/g, "").slice(0, descriptor.maxFraction);
175
+ if (opts.pad && descriptor.minFraction > 0) fraction = fraction.padEnd(descriptor.minFraction, "0");
176
+ let out = grouped || (hasPoint ? "0" : "");
177
+ if (fraction) out += decimal + fraction;
178
+ else if (hasPoint && descriptor.maxFraction > 0 && !opts.pad) out += decimal;
179
+ if (!out) return "";
180
+ return `${descriptor.prefix}${negative ? "-" : ""}${out}${descriptor.suffix}`;
181
+ }
182
+ /** Group a digit string from the right. */
183
+ function addGrouping(digits, separator) {
184
+ if (digits.length < 4) return digits;
185
+ let out = "";
186
+ for (let i = 0; i < digits.length; i++) {
187
+ if (i > 0 && (digits.length - i) % 3 === 0) out += separator;
188
+ out += digits[i];
189
+ }
190
+ return out;
191
+ }
192
+ /**
193
+ * Normalise a raw value for the VALUE side.
194
+ *
195
+ * A number pattern yields a canonical numeric string (`"10000000.25"`) rather than the formatted
196
+ * text, so `Number(v)` works and a store that does arithmetic on it does not have to know a format
197
+ * was ever involved. A template yields the assembled string, because there the decoration IS the
198
+ * value — an email is not an email without its domain.
199
+ */
200
+ function normaliseValue(raw, descriptor) {
201
+ const value = String(raw ?? "");
202
+ if (!descriptor) return value;
203
+ if (descriptor.kind === "template") return value ? `${descriptor.before}${value}${descriptor.after}` : "";
204
+ if (!value || value === "-") return "";
205
+ const negative = value.startsWith("-");
206
+ const [intRaw = "", fracRaw] = (negative ? value.slice(1) : value).split(".");
207
+ const digits = intRaw.replace(/\D/g, "");
208
+ const fraction = (fracRaw ?? "").replace(/\D/g, "").slice(0, descriptor.maxFraction);
209
+ let out = digits.replace(/^0+(?=\d)/, "");
210
+ if (!out) out = digits ? "0" : "";
211
+ if (!out && !fraction) return "";
212
+ if (fraction) out = `${out || "0"}.${fraction}`;
213
+ return negative && out ? `-${out}` : out;
214
+ }
215
+ /**
216
+ * Where the caret belongs after the text was reformatted.
217
+ *
218
+ * Reformatting rewrites the whole field, and the browser then parks the caret at the end — so
219
+ * inserting a digit in the middle of a number would throw you to the end on every keystroke. The
220
+ * fix is to count in SIGNIFICANT characters (the ones the user actually typed) rather than in
221
+ * string offsets: count how many sit left of the caret before, then walk the new text until the
222
+ * same number have gone by.
223
+ */
224
+ function caretAfterFormat(next, caretInPrev, prev, isSignificant) {
225
+ let typed = 0;
226
+ for (let i = 0; i < Math.min(caretInPrev, prev.length); i++) if (isSignificant(prev[i])) typed++;
227
+ if (typed === 0) {
228
+ let i = 0;
229
+ while (i < next.length && !isSignificant(next[i])) i++;
230
+ return i;
231
+ }
232
+ let seen = 0;
233
+ for (let i = 0; i < next.length; i++) if (isSignificant(next[i])) {
234
+ seen++;
235
+ if (seen === typed) return i + 1;
236
+ }
237
+ return next.length;
238
+ }
239
+ /**
240
+ * Which characters count as "typed" for caret purposes — everything the format did NOT insert.
241
+ */
242
+ function significantFor(descriptor, locale) {
243
+ if (!descriptor || descriptor.kind === "template") return () => true;
244
+ const { decimal } = localeSeparators(locale);
245
+ return (ch) => /\d/.test(ch) || ch === decimal || ch === "-";
246
+ }
247
+ /** Resolve either form of a format prop to its finished text. */
248
+ function resolveFormat(format, raw, ctx, mode) {
249
+ if (format == null || format === "") return null;
250
+ if (typeof format === "function") return String(format({
251
+ value: raw,
252
+ type: ctx.type,
253
+ locale: ctx.locale
254
+ }) ?? "");
255
+ const descriptor = parseFormat(format);
256
+ if (!descriptor) return null;
257
+ return mode === "display" ? applyFormat(raw, descriptor, ctx.locale) : normaliseValue(raw, descriptor);
258
+ }
259
+ //#endregion
260
+ //#region src/components/input/input-core.ts
261
+ var numberStringConverter = {
262
+ fromAttribute(value) {
263
+ if (value === null || value === "") return void 0;
264
+ const parsed = Number(value);
265
+ return Number.isFinite(parsed) ? parsed : void 0;
266
+ },
267
+ toAttribute(value) {
268
+ if (value === void 0 || value === null) return null;
269
+ return String(value);
270
+ }
271
+ };
272
+ /**
273
+ * `MonoInputCore` — all render-mode-agnostic logic for `mono-input`: reactive
274
+ * props, hybrid prop aliases (camelCase ↔ kebab ↔ lowercase), attribute
275
+ * observation, value/model two-way sync, events, validation/class computation,
276
+ * sizing, and imperative focus/blur/select.
277
+ *
278
+ * It deliberately leaves out:
279
+ * - `createRenderRoot()` (light vs shadow) — set by each wrapper.
280
+ * - the slot strategy + `render()` — light uses a capture/`data-mono-slot`
281
+ * hack; shadow uses native `<slot>` with slotchange-driven presence. The
282
+ * shared `_hasXxxSlotState` `@state` fields back both strategies and feed the
283
+ * class getters.
284
+ */
285
+ var MonoInputCore = (superClass) => {
286
+ class MonoInputCoreClass extends MonoFormControlCore(superClass) {
287
+ constructor(...args) {
288
+ super(...args);
289
+ this.cssClass = {};
290
+ this.cssClassName = "";
291
+ this.type = "text";
292
+ this.size = "md";
293
+ this.color = "primary";
294
+ this.variant = "outlined";
295
+ this.modelValue = "";
296
+ this.value = "";
297
+ this.formatOn = "input";
298
+ this.name = "";
299
+ this.placeholder = "";
300
+ this.label = "";
301
+ this.helperText = "";
302
+ this.validationState = "default";
303
+ this.validationMessage = "";
304
+ this.error = false;
305
+ this.errorMessage = "";
306
+ this.success = false;
307
+ this.successMessage = "";
308
+ this.pattern = "";
309
+ this.autocomplete = "";
310
+ this.inputmode = "";
311
+ this.disabled = false;
312
+ this.readonly = false;
313
+ this.required = false;
314
+ this.clearable = false;
315
+ this.autofocus = false;
316
+ this._display = "";
317
+ this._focused = false;
318
+ this._internalWrite = false;
319
+ this._hasPrefixSlotState = false;
320
+ this._hasSuffixSlotState = false;
321
+ this._hasLabelSlotState = false;
322
+ this._hasHelperSlotState = false;
323
+ this._inputId = `mono-input-${Math.random().toString(36).slice(2)}`;
324
+ this._messageId = `${this._inputId}-message`;
325
+ defineHybridPropAliases(this, [
326
+ "modelValue",
327
+ "formatDisplay",
328
+ "formatValue",
329
+ "formatOn",
330
+ "formatLocale",
331
+ "helperText",
332
+ "validationState",
333
+ "validationMessage",
334
+ "errorMessage",
335
+ "successMessage",
336
+ "ariaLabelText",
337
+ "minLength",
338
+ "maxLength",
339
+ "cssClass",
340
+ "minWidth",
341
+ "maxWidth",
342
+ "minHeight",
343
+ "maxHeight"
344
+ ]);
345
+ for (const alias of [
346
+ "ariaLabel",
347
+ "aria-label",
348
+ "arialabel"
349
+ ]) Object.defineProperty(this, alias, {
350
+ get: () => this.ariaLabelText,
351
+ set: (value) => {
352
+ this.ariaLabelText = value == null ? void 0 : String(value);
353
+ },
354
+ configurable: true,
355
+ enumerable: false
356
+ });
357
+ Object.defineProperty(this, "maxlength", {
358
+ get: () => this.maxLength,
359
+ set: (value) => {
360
+ this.maxLength = this._toOptionalNumber(value);
361
+ },
362
+ configurable: true,
363
+ enumerable: false
364
+ });
365
+ Object.defineProperty(this, "minlength", {
366
+ get: () => this.minLength,
367
+ set: (value) => {
368
+ this.minLength = this._toOptionalNumber(value);
369
+ },
370
+ configurable: true,
371
+ enumerable: false
372
+ });
373
+ }
374
+ static get observedAttributes() {
375
+ return [
376
+ ...super.observedAttributes ?? [],
377
+ "modelvalue",
378
+ "helpertext",
379
+ "validationstate",
380
+ "validationmessage",
381
+ "errormessage",
382
+ "successmessage",
383
+ "arialabeltext",
384
+ "arialabel",
385
+ "minlength",
386
+ "maxlength",
387
+ "css-class",
388
+ "cssclass",
389
+ "formatdisplay",
390
+ "format-display",
391
+ "formatvalue",
392
+ "format-value",
393
+ "formaton",
394
+ "formatlocale"
395
+ ];
396
+ }
397
+ attributeChangedCallback(name, oldValue, newValue) {
398
+ super.attributeChangedCallback(name, oldValue, newValue);
399
+ if (oldValue === newValue) return;
400
+ switch (name) {
401
+ case "css-class":
402
+ case "cssclass":
403
+ this.cssClassName = newValue ?? "";
404
+ return;
405
+ case "formatdisplay":
406
+ case "format-display":
407
+ this._setFormatFromAttribute("formatDisplay", newValue);
408
+ return;
409
+ case "formatvalue":
410
+ case "format-value":
411
+ this._setFormatFromAttribute("formatValue", newValue);
412
+ return;
413
+ case "formaton":
414
+ this.formatOn = newValue ?? "input";
415
+ return;
416
+ case "formatlocale":
417
+ this.formatLocale = newValue ?? void 0;
418
+ return;
419
+ case "modelvalue":
420
+ this.modelValue = newValue ?? "";
421
+ return;
422
+ case "helpertext":
423
+ this.helperText = newValue ?? "";
424
+ return;
425
+ case "validationstate":
426
+ this.validationState = newValue ?? "default";
427
+ return;
428
+ case "validationmessage":
429
+ this.validationMessage = newValue ?? "";
430
+ return;
431
+ case "errormessage":
432
+ this.errorMessage = newValue ?? "";
433
+ return;
434
+ case "successmessage":
435
+ this.successMessage = newValue ?? "";
436
+ return;
437
+ case "arialabeltext":
438
+ case "arialabel":
439
+ this.ariaLabelText = newValue ?? void 0;
440
+ return;
441
+ case "minlength":
442
+ this.minLength = this._toOptionalNumber(newValue);
443
+ return;
444
+ case "maxlength":
445
+ this.maxLength = this._toOptionalNumber(newValue);
446
+ return;
447
+ }
448
+ }
449
+ willUpdate(changed) {
450
+ if (changed.has("modelValue") && this.value !== this.modelValue) this.value = this.modelValue ?? "";
451
+ if (changed.has("value") && this.modelValue !== this.value) this.modelValue = String(this.value ?? "");
452
+ if (!this._internalWrite && !this._focused && (changed.has("value") || changed.has("modelValue") || changed.has("formatDisplay"))) this._syncDisplayFromValue();
453
+ this._internalWrite = false;
454
+ }
455
+ firstUpdated() {
456
+ if (this.autofocus) this.focus();
457
+ }
458
+ _toOptionalNumber(value) {
459
+ if (value === void 0 || value === null || value === "") return void 0;
460
+ if (typeof value === "number") return Number.isFinite(value) ? value : void 0;
461
+ if (typeof value === "string") {
462
+ const parsed = Number(value);
463
+ return Number.isFinite(parsed) ? parsed : void 0;
464
+ }
465
+ }
466
+ get _hasPrefixSlot() {
467
+ return this._hasPrefixSlotState;
468
+ }
469
+ get _hasSuffixSlot() {
470
+ return this._hasSuffixSlotState;
471
+ }
472
+ get _hasLabelSlot() {
473
+ return this._hasLabelSlotState;
474
+ }
475
+ get _hasHelperSlot() {
476
+ return this._hasHelperSlotState;
477
+ }
478
+ get _resolvedValidationState() {
479
+ if (this.validationState && this.validationState !== "default") return this.validationState;
480
+ if (this.error || this.errorMessage) return "invalid";
481
+ if (this.success || this.successMessage) return "valid";
482
+ return "default";
483
+ }
484
+ _cls(base, key) {
485
+ return cssPart(this.cssClass, base, key);
486
+ }
487
+ get _wrapperClasses() {
488
+ return [
489
+ "mono-input",
490
+ this.size,
491
+ this.color,
492
+ this.variant,
493
+ this.disabled ? "disabled" : "",
494
+ this.readonly ? "readonly" : "",
495
+ this._resolvedValidationState !== "default" ? `is-${this._resolvedValidationState}` : "",
496
+ this._hasPrefixSlot ? "has-prefix" : "",
497
+ this._hasSuffixSlot || this.clearable ? "has-suffix" : "",
498
+ this.value ? "has-value" : "",
499
+ this.cssClassName,
500
+ this.cssClass?.root
501
+ ].filter(Boolean).join(" ");
502
+ }
503
+ get _fieldClasses() {
504
+ return [
505
+ this._cls("mono-input-field", "field"),
506
+ this.size,
507
+ this.color,
508
+ this.variant,
509
+ this.disabled ? "disabled" : "",
510
+ this.readonly ? "readonly" : "",
511
+ this._resolvedValidationState !== "default" ? `is-${this._resolvedValidationState}` : "",
512
+ this._hasPrefixSlot ? "has-prefix" : "",
513
+ this._hasSuffixSlot || this.clearable ? "has-suffix" : "",
514
+ this.value ? "has-value" : ""
515
+ ].filter(Boolean).join(" ");
516
+ }
517
+ _createModelDetail(args) {
518
+ return {
519
+ modelValue: args.modelValue,
520
+ currentValue: args.modelValue,
521
+ oldValue: args.oldValue,
522
+ value: args.modelValue,
523
+ displayValue: this._display,
524
+ name: this.name,
525
+ sourceEvent: args.sourceEvent
526
+ };
527
+ }
528
+ _emitInput(detail) {
529
+ dispatchMonoEvent(this, "input", detail);
530
+ }
531
+ _emitChange(detail) {
532
+ dispatchMonoEvent(this, "change", detail);
533
+ }
534
+ _emitClear(detail) {
535
+ dispatchMonoEvent(this, "clear", detail);
536
+ }
537
+ /**
538
+ * Take a format from an ATTRIBUTE.
539
+ *
540
+ * Both format props are `attribute: false`, because a function cannot cross an attribute —
541
+ * so Lit ignores the markup form entirely and this is what puts it back. Two guards, both
542
+ * borrowed from `mono-select`'s `displayValue`, which has exactly this shape:
543
+ *
544
+ * - a function already set through `.prop` is never overwritten by an attribute;
545
+ * - Vue stringifies non-primitive props when it also mirrors them as attributes, so a value
546
+ * that merely LOOKS like a serialized function is skipped — otherwise the real function,
547
+ * arriving a tick later, would be clobbered by its own `String()` form.
548
+ */
549
+ _setFormatFromAttribute(key, next) {
550
+ if (typeof this[key] === "function") return;
551
+ const value = next ?? "";
552
+ if (this._looksLikeSerializedFunction(value)) return;
553
+ this[key] = value;
554
+ }
555
+ _looksLikeSerializedFunction(value) {
556
+ const trimmed = value.trim();
557
+ if (!trimmed) return false;
558
+ return /^(?:asyncs+)?(?:function|([^)]*)s*=>|[A-Za-z_$][w$]*s*=>)/.test(trimmed);
559
+ }
560
+ /** Is either format prop set? Everything below short-circuits when not. */
561
+ get _hasFormat() {
562
+ return !!(this.formatDisplay || this.formatValue);
563
+ }
564
+ /** The display pattern parsed once per read — used for stripping and for caret significance. */
565
+ get _displayDescriptor() {
566
+ const format = this.formatDisplay ?? this.formatValue;
567
+ return typeof format === "string" && format ? parseFormat(format) : null;
568
+ }
569
+ /**
570
+ * The text in the field, reduced to what the user actually typed.
571
+ *
572
+ * A function format has no inverse, so there is nothing to strip — the typed text IS the raw
573
+ * value, and a caller using a function owns both directions.
574
+ */
575
+ _rawFromDisplay(text) {
576
+ return stripFormat(text, this._displayDescriptor, this.formatLocale);
577
+ }
578
+ /** Re-render the display from the current value. Skipped while focused — see the call site. */
579
+ _syncDisplayFromValue() {
580
+ const raw = this._rawFromDisplay(String(this.value ?? ""));
581
+ this._display = this._formatDisplay(raw, { pad: true });
582
+ }
583
+ _formatDisplay(raw, opts = {}) {
584
+ if (!this.formatDisplay) return raw;
585
+ if (typeof this.formatDisplay === "function") return String(this.formatDisplay({
586
+ value: raw,
587
+ type: this.type,
588
+ locale: this.formatLocale
589
+ }) ?? "");
590
+ const descriptor = parseFormat(this.formatDisplay);
591
+ if (!descriptor) return raw;
592
+ return applyFormat(raw, descriptor, this.formatLocale, opts);
593
+ }
594
+ _formatValue(raw) {
595
+ if (!this.formatValue) return raw;
596
+ if (typeof this.formatValue === "function") return String(this.formatValue({
597
+ value: raw,
598
+ type: this.type,
599
+ locale: this.formatLocale
600
+ }) ?? "");
601
+ const descriptor = parseFormat(this.formatValue);
602
+ if (!descriptor) return raw;
603
+ return normaliseValue(raw, descriptor);
604
+ }
605
+ /**
606
+ * Hold a formatted numeric value inside `min` / `max`.
607
+ *
608
+ * Those two are otherwise INERT on this component. They are forwarded to the native input, and
609
+ * the platform only honours them on `number`, `range` and the date types — while a numeric
610
+ * format REQUIRES `type="text"`, because a native number input blanks itself the moment a
611
+ * grouping separator appears. So `max="100"` on a formatted field did exactly nothing, which
612
+ * is the opposite of what it reads like. This is what gives it meaning.
613
+ *
614
+ * Only the number-pattern path clamps. Everywhere else `min` / `max` keep their native
615
+ * meaning and are simply passed through, so a plain `type="text"` field is untouched —
616
+ * clamping arbitrary text against a number would be nonsense.
617
+ *
618
+ * `max` applies WHILE TYPING; `min` only on commit. The asymmetry is deliberate: a lower
619
+ * bound is crossed on the way to almost every legal value — with `min="10"`, clamping live
620
+ * would rewrite the first `1` to `10` and `15` could never be typed — whereas an upper bound
621
+ * is only ever crossed by overshooting, which is precisely when it should cut.
622
+ *
623
+ * A part-typed value is left alone. `''` and a lone `-` return early, and a trailing decimal
624
+ * point parses to the integer before it, so `"2."` under `max="100"` keeps its point instead
625
+ * of having it deleted from under the caret.
626
+ *
627
+ * Values arriving from OUTSIDE — a `modelValue` binding, a form write-back — are deliberately
628
+ * not clamped: this bounds what a person types, and silently rewriting data handed to the
629
+ * field would hide a mismatch rather than surface it.
630
+ */
631
+ _clampRaw(raw, opts = {}) {
632
+ if (this._displayDescriptor?.kind !== "number") return raw;
633
+ if (!raw || raw === "-") return raw;
634
+ const n = Number(raw);
635
+ if (!Number.isFinite(n)) return raw;
636
+ const max = this._toOptionalNumber(this.max);
637
+ if (max != null && n > max) return String(max);
638
+ const min = this._toOptionalNumber(this.min);
639
+ if (opts.commit && min != null && n < min) return String(min);
640
+ return raw;
641
+ }
642
+ /**
643
+ * Rewrite the field and put the caret back where the user left it.
644
+ *
645
+ * Written IMPERATIVELY rather than through `this._display` alone, and that is the whole trick:
646
+ * lit commits `.value` in a microtask AFTER this handler returns, and the browser parks the
647
+ * caret at the end of any value it is handed. Writing here — synchronously, inside the input
648
+ * event — means the caret can be restored in the same breath, and setting `_display` to the
649
+ * same string afterwards leaves lit's committed value already matching, so it never writes
650
+ * again and never gets the chance to move it.
651
+ */
652
+ _applyDisplay(input, next, caretBefore) {
653
+ const prev = input.value;
654
+ if (prev === next) {
655
+ this._display = next;
656
+ return;
657
+ }
658
+ input.value = next;
659
+ this._display = next;
660
+ if (caretBefore == null) return;
661
+ const caret = caretAfterFormat(next, caretBefore, prev, significantFor(this._displayDescriptor, this.formatLocale));
662
+ try {
663
+ input.setSelectionRange(caret, caret);
664
+ } catch {}
665
+ }
666
+ _handleInput(event) {
667
+ if (this.disabled || this.readonly) return;
668
+ this._internalWrite = true;
669
+ const input = event.currentTarget;
670
+ const oldValue = this.modelValue;
671
+ if (!this._hasFormat) {
672
+ const nextValue = input.value;
673
+ this.value = nextValue;
674
+ this.modelValue = nextValue;
675
+ this._display = nextValue;
676
+ this._emitInput(this._createModelDetail({
677
+ modelValue: nextValue,
678
+ oldValue,
679
+ sourceEvent: event
680
+ }));
681
+ return;
682
+ }
683
+ const caret = input.selectionStart;
684
+ const raw = this._clampRaw(this._rawFromDisplay(input.value));
685
+ const nextValue = this._formatValue(raw);
686
+ if (this.formatOn === "input") this._applyDisplay(input, this._formatDisplay(raw), caret);
687
+ else this._display = input.value;
688
+ this.value = nextValue;
689
+ this.modelValue = nextValue;
690
+ this._emitInput(this._createModelDetail({
691
+ modelValue: nextValue,
692
+ oldValue,
693
+ sourceEvent: event
694
+ }));
695
+ }
696
+ _handleChange(event) {
697
+ if (this.disabled || this.readonly) return;
698
+ this._internalWrite = true;
699
+ const input = event.currentTarget;
700
+ const oldValue = this.modelValue;
701
+ if (!this._hasFormat) {
702
+ const nextValue = input.value;
703
+ this.value = nextValue;
704
+ this.modelValue = nextValue;
705
+ this._display = nextValue;
706
+ this._emitChange(this._createModelDetail({
707
+ modelValue: nextValue,
708
+ oldValue,
709
+ sourceEvent: event
710
+ }));
711
+ return;
712
+ }
713
+ const raw = this._clampRaw(this._rawFromDisplay(input.value), { commit: true });
714
+ const nextValue = this._formatValue(raw);
715
+ this._applyDisplay(input, this._formatDisplay(raw, { pad: true }), null);
716
+ this.value = nextValue;
717
+ this.modelValue = nextValue;
718
+ this._emitChange(this._createModelDetail({
719
+ modelValue: nextValue,
720
+ oldValue,
721
+ sourceEvent: event
722
+ }));
723
+ }
724
+ _handleFocus() {
725
+ this._focused = true;
726
+ }
727
+ _handleBlur() {
728
+ this._focused = false;
729
+ if (this._hasFormat) this._syncDisplayFromValue();
730
+ }
731
+ _handleClear() {
732
+ if (this.disabled || this.readonly) return;
733
+ this._internalWrite = true;
734
+ const oldValue = this.modelValue;
735
+ const nextValue = "";
736
+ this.value = nextValue;
737
+ this.modelValue = nextValue;
738
+ this._display = nextValue;
739
+ if (this._inputEl) {
740
+ this._inputEl.value = nextValue;
741
+ this._inputEl.focus();
742
+ }
743
+ const detail = this._createModelDetail({
744
+ modelValue: nextValue,
745
+ oldValue
746
+ });
747
+ this._emitInput(detail);
748
+ this._emitClear(detail);
749
+ }
750
+ /** Inline sizing applied to the root wrapper. */
751
+ _sizeStyle() {
752
+ return buildSizeStyle(this);
753
+ }
754
+ /**
755
+ * The root wrapper, shared by both builds. Its `mono-*` attributes mirror the
756
+ * props one for one and are what input.css styles (`[mono-input][mono-size="sm"]`);
757
+ * a prop at its default emits NO attribute, so the DOM reads exactly like the
758
+ * hand-written CSS-tab markup. The classes stay as inert hooks until 2.0.
759
+ */
760
+ _renderWrapper(inner) {
761
+ const state = this._resolvedValidationState;
762
+ return html`<div
763
+ class=${this._wrapperClasses}
764
+ style=${styleMap(this._sizeStyle())}
765
+ mono-input
766
+ mono-size=${this.size === "md" ? nothing : this.size}
767
+ mono-color=${this.color === "primary" ? nothing : this.color}
768
+ mono-variant=${this.variant === "outlined" ? nothing : this.variant}
769
+ mono-validation-state=${state === "default" ? nothing : state}
770
+ ?mono-disabled=${this.disabled}
771
+ ?mono-readonly=${this.readonly}
772
+ ?mono-required=${this.required}
773
+ ?mono-clearable=${this.clearable}
774
+ >${inner}</div>`;
775
+ }
776
+ /** Computed aria-label fallback chain (shared by both builds' render()). */
777
+ get _ariaLabel() {
778
+ return this.ariaLabelText || this.label || this.placeholder || void 0;
779
+ }
780
+ /** id referenced by aria-describedby when a message is shown. */
781
+ get _describedBy() {
782
+ return this.validationMessage || this.errorMessage || this.successMessage || this.helperText || this._hasHelperSlot ? this._messageId : void 0;
783
+ }
784
+ /** The native <input>, shared by both builds' render(). */
785
+ _renderNative() {
786
+ return html`
787
+ <input
788
+ id=${this._inputId}
789
+ class=${`${this._cls("mono-input-native", "native")} ${this.size}`}
790
+ mono-native
791
+ type=${this.type}
792
+ .value=${this._display}
793
+ name=${ifDefined(this.name || void 0)}
794
+ placeholder=${ifDefined(this.placeholder || void 0)}
795
+ pattern=${ifDefined(this.pattern || void 0)}
796
+ autocomplete=${ifDefined(this.autocomplete || void 0)}
797
+ inputmode=${ifDefined(this.inputmode || void 0)}
798
+ minlength=${ifDefined(this.minLength)}
799
+ maxlength=${ifDefined(this.maxLength)}
800
+ min=${ifDefined(this.min)}
801
+ max=${ifDefined(this.max)}
802
+ step=${ifDefined(this.step)}
803
+ ?disabled=${this.disabled}
804
+ ?readonly=${this.readonly}
805
+ ?required=${this.required}
806
+ aria-label=${ifDefined(this._ariaLabel)}
807
+ aria-invalid=${this._resolvedValidationState === "invalid" ? "true" : "false"}
808
+ aria-describedby=${ifDefined(this._describedBy)}
809
+ @focus=${this._handleFocus}
810
+ @blur=${this._handleBlur}
811
+ @input=${this._handleInput}
812
+ @change=${this._handleChange}
813
+ />
814
+ `;
815
+ }
816
+ /** The clear button (uses the build-specific icon). */
817
+ _renderClear() {
818
+ if (!(this.clearable && this.value && !this.disabled && !this.readonly)) return nothing;
819
+ return html`
820
+ <button
821
+ type="button"
822
+ class=${this._cls("mono-input-clear", "clear")}
823
+ mono-clear
824
+ aria-label="Clear input"
825
+ @click=${this._handleClear}
826
+ >
827
+ ${this.renderIcon("close")}
828
+ </button>
829
+ `;
830
+ }
831
+ /**
832
+ * Icon hook — overridden per build. Light: global `.mono-icon`/`i-mdi-*`
833
+ * UnoCSS icon. Shadow: inline SVG (global icon CSS can't reach a shadow root).
834
+ */
835
+ renderIcon(_name) {
836
+ return html``;
837
+ }
838
+ focus(options) {
839
+ this._inputEl?.focus(options);
840
+ }
841
+ blur() {
842
+ this._inputEl?.blur();
843
+ }
844
+ select() {
845
+ this._inputEl?.select();
846
+ }
847
+ }
848
+ __decorate([property({ attribute: false })], MonoInputCoreClass.prototype, "cssClass", void 0);
849
+ __decorate([property({
850
+ type: String,
851
+ attribute: "css-class"
852
+ })], MonoInputCoreClass.prototype, "cssClassName", void 0);
853
+ __decorate([property({ type: String })], MonoInputCoreClass.prototype, "type", void 0);
854
+ __decorate([property({ type: String })], MonoInputCoreClass.prototype, "size", void 0);
855
+ __decorate([property({ type: String })], MonoInputCoreClass.prototype, "color", void 0);
856
+ __decorate([property({ type: String })], MonoInputCoreClass.prototype, "variant", void 0);
857
+ __decorate([property({
858
+ type: String,
859
+ attribute: "model-value",
860
+ reflect: true
861
+ })], MonoInputCoreClass.prototype, "modelValue", void 0);
862
+ __decorate([property({ type: String })], MonoInputCoreClass.prototype, "value", void 0);
863
+ __decorate([property({ attribute: false })], MonoInputCoreClass.prototype, "formatDisplay", void 0);
864
+ __decorate([property({ attribute: false })], MonoInputCoreClass.prototype, "formatValue", void 0);
865
+ __decorate([property({ attribute: "format-on" })], MonoInputCoreClass.prototype, "formatOn", void 0);
866
+ __decorate([property({ attribute: "format-locale" })], MonoInputCoreClass.prototype, "formatLocale", void 0);
867
+ __decorate([property({ type: String })], MonoInputCoreClass.prototype, "name", void 0);
868
+ __decorate([property({ type: String })], MonoInputCoreClass.prototype, "placeholder", void 0);
869
+ __decorate([property({ type: String })], MonoInputCoreClass.prototype, "label", void 0);
870
+ __decorate([property({
871
+ type: String,
872
+ attribute: "helper-text"
873
+ })], MonoInputCoreClass.prototype, "helperText", void 0);
874
+ __decorate([property({
875
+ type: String,
876
+ attribute: "validation-state"
877
+ })], MonoInputCoreClass.prototype, "validationState", void 0);
878
+ __decorate([property({
879
+ type: String,
880
+ attribute: "validation-message"
881
+ })], MonoInputCoreClass.prototype, "validationMessage", void 0);
882
+ __decorate([property({
883
+ reflect: true,
884
+ converter: booleanStringConverter
885
+ })], MonoInputCoreClass.prototype, "error", void 0);
886
+ __decorate([property({
887
+ type: String,
888
+ attribute: "error-message"
889
+ })], MonoInputCoreClass.prototype, "errorMessage", void 0);
890
+ __decorate([property({
891
+ reflect: true,
892
+ converter: booleanStringConverter
893
+ })], MonoInputCoreClass.prototype, "success", void 0);
894
+ __decorate([property({
895
+ type: String,
896
+ attribute: "success-message"
897
+ })], MonoInputCoreClass.prototype, "successMessage", void 0);
898
+ __decorate([property({ type: String })], MonoInputCoreClass.prototype, "pattern", void 0);
899
+ __decorate([property({ type: String })], MonoInputCoreClass.prototype, "autocomplete", void 0);
900
+ __decorate([property({ type: String })], MonoInputCoreClass.prototype, "inputmode", void 0);
901
+ __decorate([property({
902
+ type: String,
903
+ attribute: "aria-label"
904
+ })], MonoInputCoreClass.prototype, "ariaLabelText", void 0);
905
+ __decorate([property({
906
+ attribute: "min-length",
907
+ converter: numberStringConverter
908
+ })], MonoInputCoreClass.prototype, "minLength", void 0);
909
+ __decorate([property({
910
+ attribute: "max-length",
911
+ converter: numberStringConverter
912
+ })], MonoInputCoreClass.prototype, "maxLength", void 0);
913
+ __decorate([property({ type: Number })], MonoInputCoreClass.prototype, "min", void 0);
914
+ __decorate([property({ type: Number })], MonoInputCoreClass.prototype, "max", void 0);
915
+ __decorate([property({ type: Number })], MonoInputCoreClass.prototype, "step", void 0);
916
+ __decorate([property({
917
+ reflect: true,
918
+ converter: booleanStringConverter
919
+ })], MonoInputCoreClass.prototype, "disabled", void 0);
920
+ __decorate([property({
921
+ reflect: true,
922
+ converter: booleanStringConverter
923
+ })], MonoInputCoreClass.prototype, "readonly", void 0);
924
+ __decorate([property({
925
+ reflect: true,
926
+ converter: booleanStringConverter
927
+ })], MonoInputCoreClass.prototype, "required", void 0);
928
+ __decorate([property({
929
+ reflect: true,
930
+ converter: booleanStringConverter
931
+ })], MonoInputCoreClass.prototype, "clearable", void 0);
932
+ __decorate([property({
933
+ reflect: true,
934
+ converter: booleanStringConverter
935
+ })], MonoInputCoreClass.prototype, "autofocus", void 0);
936
+ __decorate([property({ type: String })], MonoInputCoreClass.prototype, "width", void 0);
937
+ __decorate([property({ type: String })], MonoInputCoreClass.prototype, "height", void 0);
938
+ __decorate([property({
939
+ type: String,
940
+ attribute: "min-width"
941
+ })], MonoInputCoreClass.prototype, "minWidth", void 0);
942
+ __decorate([property({
943
+ type: String,
944
+ attribute: "max-width"
945
+ })], MonoInputCoreClass.prototype, "maxWidth", void 0);
946
+ __decorate([property({
947
+ type: String,
948
+ attribute: "min-height"
949
+ })], MonoInputCoreClass.prototype, "minHeight", void 0);
950
+ __decorate([property({
951
+ type: String,
952
+ attribute: "max-height"
953
+ })], MonoInputCoreClass.prototype, "maxHeight", void 0);
954
+ __decorate([query(".mono-input-native")], MonoInputCoreClass.prototype, "_inputEl", void 0);
955
+ __decorate([state()], MonoInputCoreClass.prototype, "_display", void 0);
956
+ __decorate([state()], MonoInputCoreClass.prototype, "_focused", void 0);
957
+ __decorate([state()], MonoInputCoreClass.prototype, "_hasPrefixSlotState", void 0);
958
+ __decorate([state()], MonoInputCoreClass.prototype, "_hasSuffixSlotState", void 0);
959
+ __decorate([state()], MonoInputCoreClass.prototype, "_hasLabelSlotState", void 0);
960
+ __decorate([state()], MonoInputCoreClass.prototype, "_hasHelperSlotState", void 0);
961
+ return MonoInputCoreClass;
962
+ };
963
+ //#endregion
964
+ //#region src/components/input/mono-input.shadow.ts
965
+ var SHADOW_EXTRA_CSS = "";
966
+ var MonoInputShadow = class MonoInputShadow extends withShadowUtilityStyles(MonoInputCore(LitElement)) {
967
+ static {
968
+ this.disableWarning?.("change-in-update");
969
+ }
970
+ static {
971
+ this.styles = [unsafeCSS(toShadowCss(input_default, {
972
+ host: "mono-input",
973
+ append: SHADOW_EXTRA_CSS
974
+ }))];
975
+ }
976
+ firstUpdated(changed) {
977
+ super.firstUpdated(changed);
978
+ for (const name of [
979
+ "prefix",
980
+ "suffix",
981
+ "label",
982
+ "helper"
983
+ ]) {
984
+ const slot = this.renderRoot.querySelector(`slot[name="${name}"]`);
985
+ this._setSlotState(name, this._slotHasContent(slot));
986
+ }
987
+ }
988
+ _slotHasContent(slot) {
989
+ return !!slot && slot.assignedNodes({ flatten: true }).some((n) => n.nodeType === Node.ELEMENT_NODE || !!(n.textContent ?? "").trim());
990
+ }
991
+ _setSlotState(name, has) {
992
+ if (name === "prefix") this._hasPrefixSlotState = has;
993
+ else if (name === "suffix") this._hasSuffixSlotState = has;
994
+ else if (name === "label") this._hasLabelSlotState = has;
995
+ else if (name === "helper") this._hasHelperSlotState = has;
996
+ }
997
+ _onSlotChange(name, event) {
998
+ this._setSlotState(name, this._slotHasContent(event.target));
999
+ }
1000
+ renderIcon(_name) {
1001
+ return html`
1002
+ <svg viewBox="0 0 24 24" mono-icon fill="currentColor" aria-hidden="true">
1003
+ <path d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" />
1004
+ </svg>
1005
+ `;
1006
+ }
1007
+ _renderLabel() {
1008
+ return html`
1009
+ <label
1010
+ class=${this._cls("mono-input-label", "label")}
1011
+ mono-label
1012
+ for=${this._inputId}
1013
+ ?mono-empty=${!this.label && !this._hasLabelSlot}
1014
+ >
1015
+ <slot name="label" @slotchange=${(e) => this._onSlotChange("label", e)}>${this.label}</slot>
1016
+ ${this.required ? html`<span class=${this._cls("mono-input-required", "required")} mono-required-mark>*</span>` : nothing}
1017
+ </label>
1018
+ `;
1019
+ }
1020
+ _renderHelper() {
1021
+ const base = this._cls("mono-input-message", "message");
1022
+ if (this.validationMessage) {
1023
+ const state = this._resolvedValidationState;
1024
+ return html`<div class=${`${base} ${state}`} mono-message=${state} role=${state === "invalid" ? "alert" : nothing}>${this.validationMessage}</div>`;
1025
+ }
1026
+ if (this.errorMessage) return html`<div class=${`${base} invalid`} mono-message="invalid" role="alert">${this.errorMessage}</div>`;
1027
+ if (this.successMessage) return html`<div class=${`${base} valid`} mono-message="valid">${this.successMessage}</div>`;
1028
+ return html`
1029
+ <div
1030
+ class=${`${base} helper`}
1031
+ mono-message="helper"
1032
+ ?mono-empty=${!this.helperText && !this._hasHelperSlot}
1033
+ >
1034
+ <slot name="helper" @slotchange=${(e) => this._onSlotChange("helper", e)}>${this.helperText}</slot>
1035
+ </div>
1036
+ `;
1037
+ }
1038
+ render() {
1039
+ return this._renderWrapper(html`
1040
+ ${this._renderLabel()}
1041
+ <div class=${this._fieldClasses} mono-field>
1042
+ <span class=${this._cls("mono-input-prefix", "prefix")} mono-prefix ?mono-empty=${!this._hasPrefixSlot}>
1043
+ <slot name="prefix" @slotchange=${(e) => this._onSlotChange("prefix", e)}></slot>
1044
+ </span>
1045
+ ${this._renderNative()}
1046
+ ${this._renderClear()}
1047
+ <span class=${this._cls("mono-input-suffix", "suffix")} mono-suffix ?mono-empty=${!this._hasSuffixSlot}>
1048
+ <slot name="suffix" @slotchange=${(e) => this._onSlotChange("suffix", e)}></slot>
1049
+ </span>
1050
+ </div>
1051
+ <div id=${this._messageId} class=${this.cssClass?.messageWrap ?? ""} mono-message-wrap>
1052
+ ${this._renderHelper()}
1053
+ </div>
1054
+ `);
1055
+ }
1056
+ connectedCallback() {
1057
+ super.connectedCallback();
1058
+ if (isServer) return;
1059
+ flushSsrHydration(this);
1060
+ }
1061
+ };
1062
+ MonoInputShadow = __decorate([customElement("mono-shadow-input")], MonoInputShadow);
1063
+ //#endregion
1064
+ //#region src/components/input/input-utils.ts
1065
+ function validateInputProps(props) {
1066
+ const validTypes = [
1067
+ "text",
1068
+ "email",
1069
+ "password",
1070
+ "number",
1071
+ "tel",
1072
+ "url",
1073
+ "date",
1074
+ "time",
1075
+ "month",
1076
+ "week",
1077
+ "search"
1078
+ ];
1079
+ const validSizes = [
1080
+ "xs",
1081
+ "sm",
1082
+ "md",
1083
+ "lg",
1084
+ "xl",
1085
+ "xxl"
1086
+ ];
1087
+ const validColors = [
1088
+ "primary",
1089
+ "secondary",
1090
+ "success",
1091
+ "danger",
1092
+ "warning",
1093
+ "info",
1094
+ "teal",
1095
+ "purple",
1096
+ "neutral",
1097
+ "dark"
1098
+ ];
1099
+ const validVariants = [
1100
+ "outlined",
1101
+ "filled",
1102
+ "underlined"
1103
+ ];
1104
+ if (props.type && !validTypes.includes(props.type)) return false;
1105
+ if (props.size && !validSizes.includes(props.size)) return false;
1106
+ if (props.color && !validColors.includes(props.color)) return false;
1107
+ if (props.variant && !validVariants.includes(props.variant)) return false;
1108
+ return true;
1109
+ }
1110
+ function generateInputAttributes(type, disabled, readonly, required, pattern, min, max, step, placeholder) {
1111
+ return {
1112
+ type,
1113
+ disabled: disabled || void 0,
1114
+ readonly: readonly || void 0,
1115
+ required: required || void 0,
1116
+ pattern: pattern || void 0,
1117
+ min,
1118
+ max,
1119
+ step,
1120
+ placeholder: placeholder || void 0
1121
+ };
1122
+ }
1123
+ function generateInputAriaAttributes(disabled, readonly, required, hasError, label, errorMessage) {
1124
+ return {
1125
+ "aria-disabled": disabled ? "true" : void 0,
1126
+ "aria-readonly": readonly ? "true" : void 0,
1127
+ "aria-required": required ? "true" : void 0,
1128
+ "aria-invalid": hasError ? "true" : void 0,
1129
+ "aria-label": label || void 0,
1130
+ "aria-errormessage": hasError ? errorMessage || void 0 : void 0
1131
+ };
1132
+ }
1133
+ function getInputIcon(type) {
1134
+ const iconMap = {
1135
+ text: "M4 6h16M4 12h16M4 18h10",
1136
+ email: "M4 6h16v12H4z M4 7l8 6 8-6",
1137
+ password: "M12 17a2 2 0 1 0 0-4a2 2 0 0 0 0 4zm6-7V8a6 6 0 1 0-12 0v2",
1138
+ number: "M8 4v16M16 4v16M5 9h14M5 15h14",
1139
+ 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",
1140
+ 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",
1141
+ date: "M7 3v3M17 3v3M4 8h16M5 5h14v16H5z",
1142
+ time: "M12 7v5l3 3M12 22a10 10 0 1 0 0-20a10 10 0 0 0 0 20z",
1143
+ month: "M7 3v3M17 3v3M5 5h14v14H5zM8 11h8",
1144
+ week: "M7 3v3M17 3v3M5 5h14v16H5zM9 11h6M9 15h4",
1145
+ 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"
1146
+ };
1147
+ return iconMap[type] ?? iconMap.text;
1148
+ }
1149
+ //#endregion
1150
+ export { MonoInputCore, MonoInputShadow, applyFormat, caretAfterFormat, generateInputAriaAttributes, generateInputAttributes, getInputIcon, localeSeparators, normaliseValue, parseFormat, resolveFormat, significantFor, stripFormat, validateInputProps };