@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,731 @@
1
+ import { a as __decorate, c as defineHybridPropAlias, f as customElement, i as withShadowUtilityStyles, l as defineHybridPropAliases, o as arrayHasChanged, 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 mdiGlyph, t as isIconifyClass } from "../../icon-CJkTlmTb.js";
4
+ import { t as MonoFormControlCore } from "../../form-control-core-B8d7k6vk.js";
5
+ import { LitElement, html, isServer, nothing, unsafeCSS } from "lit";
6
+ import { property, query, state } from "lit/decorators.js";
7
+ import { ifDefined } from "lit/directives/if-defined.js";
8
+ //#region src/components/file-upload/file-upload-utils.ts
9
+ function validateFileUploadProps(props) {
10
+ const validVariants = ["default", "compact"];
11
+ const validStates = [
12
+ "default",
13
+ "valid",
14
+ "invalid",
15
+ "warning"
16
+ ];
17
+ if (props.variant && !validVariants.includes(props.variant)) return false;
18
+ if (props.validationState && !validStates.includes(props.validationState)) return false;
19
+ return true;
20
+ }
21
+ function formatFileSize(size) {
22
+ if (size < 1024) return `${size} B`;
23
+ if (size < 1024 * 1024) return `${Math.round(size / 1024)} KB`;
24
+ return `${(size / (1024 * 1024)).toFixed(1)} MB`;
25
+ }
26
+ /**
27
+ * Pick a default file-type icon. Returns an MDI iconify utility class
28
+ * (`i-mdi-*`, resolved by UnoCSS preset-icons) — see
29
+ * https://icon-sets.iconify.design/mdi/ . The render layer paints these as a
30
+ * masked SVG via {@link isIconifyClass}. The full set is safelisted in
31
+ * `uno.config.ts` so the CSS ships in `dist/ui/index.css`.
32
+ */
33
+ function getFileIcon(type, name) {
34
+ const ext = name.split(".").pop()?.toLowerCase() ?? "";
35
+ if (type.startsWith("image/")) return "i-mdi-file-image";
36
+ if (type.includes("pdf") || ext === "pdf") return "i-mdi-file-pdf-box";
37
+ if (type.includes("sheet") || [
38
+ "xls",
39
+ "xlsx",
40
+ "csv"
41
+ ].includes(ext)) return "i-mdi-file-excel";
42
+ if (type.includes("word") || ["doc", "docx"].includes(ext)) return "i-mdi-file-word";
43
+ if (type.includes("zip") || [
44
+ "zip",
45
+ "rar",
46
+ "7z"
47
+ ].includes(ext)) return "i-mdi-zip-box";
48
+ if (type.includes("video/")) return "i-mdi-file-video";
49
+ if (type.includes("audio/")) return "i-mdi-file-music";
50
+ return "i-mdi-file";
51
+ }
52
+ function createUploadItem(file) {
53
+ const isImage = file.type.startsWith("image/");
54
+ return {
55
+ id: `${file.name}-${file.size}-${file.lastModified}`,
56
+ file,
57
+ name: file.name,
58
+ size: file.size,
59
+ type: file.type,
60
+ previewUrl: isImage ? URL.createObjectURL(file) : void 0
61
+ };
62
+ }
63
+ //#endregion
64
+ //#region src/components/file-upload/file-upload-core.ts
65
+ var numberStringConverter = {
66
+ fromAttribute(value) {
67
+ if (value === null || value === "") return 0;
68
+ const parsed = Number(value);
69
+ return Number.isFinite(parsed) ? parsed : 0;
70
+ },
71
+ toAttribute(value) {
72
+ if (value === void 0 || value === null) return null;
73
+ return String(value);
74
+ }
75
+ };
76
+ /**
77
+ * `MonoFileUploadCore` — all render-mode-agnostic logic for `mono-file-upload`:
78
+ * reactive props (incl. SSR boolean + modelValue-array coercion), hybrid aliases,
79
+ * camelCase attribute fallbacks, the file pipeline (validate / add / drag-drop /
80
+ * remove / clear), the `mno-change`/`mno-remove`/`mno-error` events, and the
81
+ * dropzone/list/message `render()`. Icon rendering goes through overridable hooks
82
+ * (`_renderDropzoneIcon`/`_renderDefaultGlyph`/`_renderRemoveIcon`/
83
+ * `_renderThumbGlyph`) — the light build keeps `data-mono-slot` + `i-mdi-*` iconify
84
+ * classes; the shadow build uses native `<slot>` + inline SVG (iconify can't paint
85
+ * inside a shadow root).
86
+ *
87
+ * SSR-safe: no `document`/`window` access at module/ctor scope; the file pipeline
88
+ * and `_inputEl` (`@query`) only run client-side from user interaction.
89
+ */
90
+ var MonoFileUploadCore = (superClass) => {
91
+ class MonoFileUploadCoreClass extends MonoFormControlCore(superClass) {
92
+ constructor(...args) {
93
+ super(...args);
94
+ this.label = "";
95
+ this.helperText = "";
96
+ this.icon = "";
97
+ this.removeIcon = "";
98
+ this.accept = "";
99
+ this.multiple = false;
100
+ this.disabled = false;
101
+ this.required = false;
102
+ this.dragdrop = true;
103
+ this.maxFileSize = 0;
104
+ this.maxFiles = 0;
105
+ this.modelValue = [];
106
+ this.cssClass = {};
107
+ this.variant = "default";
108
+ this.validationState = "default";
109
+ this.validationMessage = "";
110
+ this._dragOver = false;
111
+ this._hasIconSlot = false;
112
+ this._hasTitleSlot = false;
113
+ this._hasSubtitleSlot = false;
114
+ this._previewsRevoked = false;
115
+ defineHybridPropAliases(this, [
116
+ "helperText",
117
+ "maxFileSize",
118
+ "maxFiles",
119
+ "modelValue",
120
+ "validationState",
121
+ "validationMessage",
122
+ "cssClass",
123
+ "removeIcon"
124
+ ]);
125
+ defineHybridPropAlias(this, "placeholder", "title");
126
+ defineHybridPropAlias(this, "subtext", "subtitle");
127
+ this.title = "Klik atau seret file ke sini";
128
+ this.subtitle = "Pilih file untuk diunggah";
129
+ }
130
+ static get observedAttributes() {
131
+ return [
132
+ ...super.observedAttributes ?? [],
133
+ "helpertext",
134
+ "maxfilesize",
135
+ "maxfiles",
136
+ "modelvalue",
137
+ "validationstate",
138
+ "validationmessage",
139
+ "removeicon",
140
+ "remove-icon",
141
+ "placeholder",
142
+ "subtext"
143
+ ];
144
+ }
145
+ attributeChangedCallback(name, oldValue, newValue) {
146
+ super.attributeChangedCallback(name, oldValue, newValue);
147
+ if (oldValue === newValue) return;
148
+ if (name === "helpertext") {
149
+ this.helperText = newValue ?? "";
150
+ return;
151
+ }
152
+ if (name === "maxfilesize") {
153
+ this.maxFileSize = this._toNumber(newValue);
154
+ return;
155
+ }
156
+ if (name === "maxfiles") {
157
+ this.maxFiles = this._toNumber(newValue);
158
+ return;
159
+ }
160
+ if (name === "modelvalue") {
161
+ this.modelValue = this._toFileUploadItems(newValue);
162
+ return;
163
+ }
164
+ if (name === "validationstate") {
165
+ this.validationState = newValue ?? "default";
166
+ return;
167
+ }
168
+ if (name === "validationmessage") {
169
+ this.validationMessage = newValue ?? "";
170
+ return;
171
+ }
172
+ if (name === "removeicon" || name === "remove-icon") {
173
+ this.removeIcon = newValue ?? "";
174
+ return;
175
+ }
176
+ if (name === "placeholder") {
177
+ this.title = newValue ?? "";
178
+ return;
179
+ }
180
+ if (name === "subtext") this.subtitle = newValue ?? "";
181
+ }
182
+ willUpdate(changed) {
183
+ for (const key of [
184
+ "multiple",
185
+ "disabled",
186
+ "required",
187
+ "dragdrop"
188
+ ]) if (typeof this[key] === "string") {
189
+ const normalized = this[key].toLowerCase().trim();
190
+ this[key] = normalized === "" || normalized === "true";
191
+ }
192
+ if (typeof this.modelValue === "string") this.modelValue = this._toFileUploadItems(this.modelValue);
193
+ super.willUpdate?.(changed);
194
+ }
195
+ connectedCallback() {
196
+ super.connectedCallback?.();
197
+ this._restorePreviews();
198
+ }
199
+ disconnectedCallback() {
200
+ this._revokePreviews();
201
+ this._previewsRevoked = true;
202
+ super.disconnectedCallback();
203
+ }
204
+ /**
205
+ * Re-create the object URLs that `disconnectedCallback` revoked.
206
+ *
207
+ * Revoking on unmount is right — a blob URL pins the whole file in memory — but
208
+ * the files SURVIVE a reconnect (a `v-if` toggle, `<KeepAlive>`, Vue moving the
209
+ * node), and nothing re-created their previews. `modelValue` kept the same
210
+ * `previewUrl` STRING pointing at a dead URL, so every thumbnail was broken from
211
+ * then on. It hid well: an `<img>` already decoded before the unmount keeps
212
+ * painting, so the damage only surfaced once a later re-render built a fresh
213
+ * `<img>` from the same src.
214
+ *
215
+ * Only the disconnect path restores. `clear()` and the single-select replace also
216
+ * revoke, but those files are gone for good and must NOT come back.
217
+ *
218
+ * Mutates the items in place rather than rebuilding `modelValue`: the consumer
219
+ * holds these same object references, so an in-place write keeps both sides on
220
+ * one live URL and avoids emitting a change event for what was never a user edit.
221
+ */
222
+ _restorePreviews() {
223
+ if (isServer || !this._previewsRevoked) return;
224
+ this._previewsRevoked = false;
225
+ let restored = false;
226
+ for (const item of this.modelValue) {
227
+ if (!item.file || !item.previewUrl) continue;
228
+ item.previewUrl = URL.createObjectURL(item.file);
229
+ restored = true;
230
+ }
231
+ if (restored) this.requestUpdate();
232
+ }
233
+ _toNumber(value) {
234
+ if (typeof value === "number") return Number.isFinite(value) ? value : 0;
235
+ if (typeof value === "string") {
236
+ const parsed = Number(value);
237
+ return Number.isFinite(parsed) ? parsed : 0;
238
+ }
239
+ return 0;
240
+ }
241
+ _toFileUploadItems(value) {
242
+ if (Array.isArray(value)) return value;
243
+ if (typeof value === "string") {
244
+ if (!value.trim()) return [];
245
+ try {
246
+ const parsed = JSON.parse(value);
247
+ return Array.isArray(parsed) ? parsed : [];
248
+ } catch {
249
+ return [];
250
+ }
251
+ }
252
+ return [];
253
+ }
254
+ get _wrapperClasses() {
255
+ return [
256
+ "mono-file-upload",
257
+ this.variant,
258
+ this.disabled ? "disabled" : "",
259
+ this._dragOver ? "dragover" : "",
260
+ this.validationState !== "default" ? this.validationState : "",
261
+ this.cssClass?.root ?? ""
262
+ ].filter(Boolean).join(" ");
263
+ }
264
+ _cls(base, key) {
265
+ const extra = this.cssClass?.[key];
266
+ return extra ? `${base} ${extra}` : base;
267
+ }
268
+ _cloneValue(value) {
269
+ return [...value];
270
+ }
271
+ _createModelDetail(args) {
272
+ const currentValue = this._cloneValue(args.modelValue);
273
+ return {
274
+ modelValue: currentValue,
275
+ currentValue,
276
+ oldValue: this._cloneValue(args.oldValue),
277
+ files: currentValue,
278
+ addedFiles: args.addedFiles ? this._cloneValue(args.addedFiles) : [],
279
+ removedFile: args.removedFile,
280
+ action: args.action,
281
+ sourceEvent: args.sourceEvent
282
+ };
283
+ }
284
+ _emitChange(detail) {
285
+ dispatchMonoEvent(this, "change", detail);
286
+ }
287
+ _emitRemove(detail) {
288
+ dispatchMonoEvent(this, "remove", detail);
289
+ }
290
+ _emitError(detail) {
291
+ dispatchMonoEvent(this, "error", detail);
292
+ }
293
+ _emitValueEvents(detail) {
294
+ this._emitChange(detail);
295
+ }
296
+ _revokePreviews(files = this.modelValue) {
297
+ files.forEach((item) => {
298
+ if (item.previewUrl) URL.revokeObjectURL(item.previewUrl);
299
+ });
300
+ }
301
+ _openPicker() {
302
+ if (this.disabled) return;
303
+ this._inputEl?.click();
304
+ }
305
+ _validateFiles(files, sourceEvent) {
306
+ let nextFiles = files;
307
+ if (this.maxFileSize > 0) {
308
+ const oversized = nextFiles.find((file) => file.size > this.maxFileSize);
309
+ if (oversized) {
310
+ this._emitError({
311
+ message: `File "${oversized.name}" exceeds the maximum size limit.`,
312
+ reason: "max-file-size",
313
+ file: oversized,
314
+ maxFileSize: this.maxFileSize,
315
+ sourceEvent
316
+ });
317
+ nextFiles = nextFiles.filter((file) => file.size <= this.maxFileSize);
318
+ }
319
+ }
320
+ if (this.maxFiles > 0) {
321
+ const existingCount = this.multiple ? this.modelValue.length : 0;
322
+ const allowed = Math.max(this.maxFiles - existingCount, 0);
323
+ if (nextFiles.length > allowed) {
324
+ this._emitError({
325
+ message: `Only ${this.maxFiles} file(s) are allowed.`,
326
+ reason: "max-files",
327
+ maxFiles: this.maxFiles,
328
+ sourceEvent
329
+ });
330
+ nextFiles = nextFiles.slice(0, allowed);
331
+ }
332
+ }
333
+ return nextFiles;
334
+ }
335
+ _addFiles(files, sourceEvent) {
336
+ if (!files.length) return;
337
+ const validFiles = this._validateFiles(files, sourceEvent);
338
+ if (!validFiles.length) return;
339
+ const oldValue = this._cloneValue(this.modelValue);
340
+ const addedFiles = validFiles.map((file) => createUploadItem(file));
341
+ let action = "add";
342
+ if (this.multiple) this.modelValue = [...this.modelValue, ...addedFiles];
343
+ else {
344
+ const replacedFiles = this._cloneValue(this.modelValue);
345
+ this._revokePreviews(replacedFiles);
346
+ this.modelValue = addedFiles.slice(0, 1);
347
+ action = oldValue.length ? "replace" : "add";
348
+ }
349
+ const detail = this._createModelDetail({
350
+ modelValue: this.modelValue,
351
+ oldValue,
352
+ addedFiles,
353
+ action,
354
+ sourceEvent
355
+ });
356
+ this._emitValueEvents(detail);
357
+ }
358
+ _handleInputChange(event) {
359
+ const input = event.currentTarget;
360
+ const files = Array.from(input.files ?? []);
361
+ this._addFiles(files, event);
362
+ input.value = "";
363
+ }
364
+ _handleDragOver(event) {
365
+ if (!this.dragdrop || this.disabled) return;
366
+ event.preventDefault();
367
+ this._dragOver = true;
368
+ }
369
+ _handleDragLeave() {
370
+ this._dragOver = false;
371
+ }
372
+ _handleDrop(event) {
373
+ if (!this.dragdrop || this.disabled) return;
374
+ event.preventDefault();
375
+ this._dragOver = false;
376
+ const files = Array.from(event.dataTransfer?.files ?? []);
377
+ this._addFiles(files, event);
378
+ }
379
+ _removeFile(id, sourceEvent) {
380
+ const removedFile = this.modelValue.find((file) => file.id === id);
381
+ if (!removedFile) return;
382
+ const oldValue = this._cloneValue(this.modelValue);
383
+ if (removedFile.previewUrl) URL.revokeObjectURL(removedFile.previewUrl);
384
+ this.modelValue = this.modelValue.filter((file) => file.id !== id);
385
+ const detail = this._createModelDetail({
386
+ modelValue: this.modelValue,
387
+ oldValue,
388
+ removedFile,
389
+ action: "remove",
390
+ sourceEvent
391
+ });
392
+ this._emitRemove({
393
+ ...detail,
394
+ removedFile,
395
+ action: "remove"
396
+ });
397
+ this._emitValueEvents(detail);
398
+ }
399
+ clear() {
400
+ if (!this.modelValue.length) return;
401
+ const oldValue = this._cloneValue(this.modelValue);
402
+ this._revokePreviews();
403
+ this.modelValue = [];
404
+ const detail = this._createModelDetail({
405
+ modelValue: this.modelValue,
406
+ oldValue,
407
+ action: "clear"
408
+ });
409
+ this._emitValueEvents(detail);
410
+ }
411
+ /** Shadow build returns true to render the icon via a native `<slot>`. */
412
+ _useIconSlots() {
413
+ return false;
414
+ }
415
+ /** Default dropzone glyph. Shadow build overrides with an inline SVG. */
416
+ _renderDefaultGlyph() {
417
+ return html`<span
418
+ class="mono-file-upload-default-icon i-mdi-cloud-upload-outline"
419
+ mono-glyph
420
+ aria-hidden="true"
421
+ ></span>`;
422
+ }
423
+ _renderDropzoneIcon() {
424
+ const cls = this._cls("mono-file-upload-icon", "icon");
425
+ if (this._hasIconSlot) return html`<div class=${cls} mono-icon aria-hidden="true"><span data-mono-slot="icon"></span></div>`;
426
+ if (this.icon && isIconifyClass(this.icon)) return html`<div class=${cls} mono-icon aria-hidden="true"><span class=${`mono-file-upload-iconify ${this.icon}`} mono-glyph></span></div>`;
427
+ if (this.icon) return html`<div class=${cls} mono-icon aria-hidden="true">${this.icon}</div>`;
428
+ return html`<div class=${cls} mono-icon aria-hidden="true">${this._renderDefaultGlyph()}</div>`;
429
+ }
430
+ /** Classes of the secondary line — the new `subtitle` key and the old `subtext` one. */
431
+ get _subtitleClasses() {
432
+ return [
433
+ "mono-file-upload-subtitle",
434
+ "mono-file-upload-subtext",
435
+ this.cssClass?.subtitle ?? "",
436
+ this.cssClass?.subtext ?? ""
437
+ ].filter(Boolean).join(" ");
438
+ }
439
+ /**
440
+ * Dropzone headline. A `slot="title"` child beats the prop: the light build
441
+ * renders an empty `[data-mono-slot]` region it re-parents the captured node
442
+ * into; the shadow build overrides this with a native `<slot>` whose fallback
443
+ * is the prop text. (A separate template per branch — Lit's trailing child
444
+ * part would otherwise clear nodes appended after it.)
445
+ */
446
+ _renderTitle() {
447
+ const cls = this._cls("mono-file-upload-title", "title");
448
+ if (this._hasTitleSlot) return html`<div class=${cls} mono-title data-mono-slot="title"></div>`;
449
+ return html`<div class=${cls} mono-title ?mono-empty=${!this.title}>${this.title}</div>`;
450
+ }
451
+ /** Dropzone secondary line — `mono-subtitle`, plus the old `mono-subtext` hook. */
452
+ _renderSubtitle() {
453
+ const cls = this._subtitleClasses;
454
+ if (this._hasSubtitleSlot) return html`<div class=${cls} mono-subtitle mono-subtext data-mono-slot="subtitle"></div>`;
455
+ return html`<div class=${cls} mono-subtitle mono-subtext ?mono-empty=${!this.subtitle}>${this.subtitle}</div>`;
456
+ }
457
+ _renderRemoveIcon() {
458
+ if (this.removeIcon && isIconifyClass(this.removeIcon)) return html`<span class=${`mono-file-upload-iconify ${this.removeIcon}`} mono-glyph></span>`;
459
+ if (this.removeIcon) return html`${this.removeIcon}`;
460
+ return html`<span class="mono-file-upload-iconify mono-icon i-mdi-close" mono-glyph aria-hidden="true"></span>`;
461
+ }
462
+ /** File-type thumb glyph (non-image). Shadow build overrides with an inline SVG. */
463
+ _renderThumbGlyph(item) {
464
+ const icon = getFileIcon(item.type, item.name);
465
+ return isIconifyClass(icon) ? html`<span class=${`mono-file-upload-iconify ${icon}`} mono-glyph aria-hidden="true"></span>` : html`${icon}`;
466
+ }
467
+ _renderMessage() {
468
+ const extra = this.cssClass?.message ?? "";
469
+ if (this.validationMessage) return html`
470
+ <div
471
+ class="mono-file-upload-message ${this.validationState} ${extra}"
472
+ mono-message=${this.validationState}
473
+ role=${this.validationState === "invalid" ? "alert" : nothing}
474
+ >
475
+ ${this.validationMessage}
476
+ </div>
477
+ `;
478
+ if (this.helperText) return html`
479
+ <div class="mono-file-upload-message helper ${extra}" mono-message="helper">${this.helperText}</div>
480
+ `;
481
+ return nothing;
482
+ }
483
+ _renderList() {
484
+ if (!this.modelValue.length) return nothing;
485
+ return html`
486
+ <div class=${this._cls("mono-file-upload-list", "list")} mono-list>
487
+ ${this.modelValue.map((item) => html`
488
+ <div class=${this._cls("mono-file-upload-item", "item")} mono-item>
489
+ <div class=${this._cls("mono-file-upload-thumb", "thumb")} mono-thumb>
490
+ ${item.previewUrl ? html`<img src=${item.previewUrl} alt=${item.name} />` : this._renderThumbGlyph(item)}
491
+ </div>
492
+
493
+ <div class=${this._cls("mono-file-upload-file", "file")} mono-file>
494
+ <div class=${this._cls("mono-file-upload-name", "name")} mono-name>${item.name}</div>
495
+ <div class=${this._cls("mono-file-upload-meta", "meta")} mono-meta>${formatFileSize(item.size)}</div>
496
+ </div>
497
+
498
+ <button
499
+ type="button"
500
+ class=${this._cls("mono-file-upload-remove", "remove")}
501
+ mono-remove
502
+ aria-label=${ifDefined(`Remove ${item.name}`)}
503
+ @click=${(event) => this._removeFile(item.id, event)}
504
+ >
505
+ ${this._renderRemoveIcon()}
506
+ </button>
507
+ </div>
508
+ `)}
509
+ </div>
510
+ `;
511
+ }
512
+ render() {
513
+ return html`
514
+ <div
515
+ class=${this._wrapperClasses}
516
+ mono-file-upload
517
+ mono-variant=${this.variant === "default" ? nothing : this.variant}
518
+ mono-validation-state=${this.validationState === "default" ? nothing : this.validationState}
519
+ ?mono-disabled=${this.disabled}
520
+ ?mono-required=${this.required}
521
+ ?mono-multiple=${this.multiple}
522
+ ?mono-no-dragdrop=${!this.dragdrop}
523
+ ?mono-dragover=${this._dragOver}
524
+ title=""
525
+ >
526
+ ${this.label ? html`
527
+ <label class=${this._cls("mono-file-upload-label", "label")} mono-label>
528
+ ${this.label}
529
+ ${this.required ? html`<span class=${this._cls("mono-file-upload-required", "required")} mono-required-mark>*</span>` : nothing}
530
+ </label>
531
+ ` : nothing}
532
+
533
+ <div
534
+ class=${this._cls("mono-file-upload-dropzone", "dropzone")}
535
+ mono-dropzone
536
+ @click=${this._openPicker}
537
+ @dragover=${this._handleDragOver}
538
+ @dragleave=${this._handleDragLeave}
539
+ @drop=${this._handleDrop}
540
+ >
541
+ ${this._renderDropzoneIcon()}
542
+ ${this._renderTitle()}
543
+ ${this._renderSubtitle()}
544
+
545
+ <input
546
+ class=${this._cls("mono-file-upload-input", "input")}
547
+ mono-native
548
+ type="file"
549
+ accept=${ifDefined(this.accept || void 0)}
550
+ ?multiple=${this.multiple}
551
+ ?disabled=${this.disabled}
552
+ @change=${this._handleInputChange}
553
+ />
554
+ </div>
555
+
556
+ ${this._renderList()}
557
+ ${this._renderMessage()}
558
+ </div>
559
+ `;
560
+ }
561
+ }
562
+ __decorate([property({ type: String })], MonoFileUploadCoreClass.prototype, "label", void 0);
563
+ __decorate([property({
564
+ type: String,
565
+ attribute: "helper-text"
566
+ })], MonoFileUploadCoreClass.prototype, "helperText", void 0);
567
+ __decorate([property({ type: String })], MonoFileUploadCoreClass.prototype, "title", void 0);
568
+ __decorate([property({ type: String })], MonoFileUploadCoreClass.prototype, "subtitle", void 0);
569
+ __decorate([property({ type: String })], MonoFileUploadCoreClass.prototype, "icon", void 0);
570
+ __decorate([property({
571
+ type: String,
572
+ attribute: "remove-icon"
573
+ })], MonoFileUploadCoreClass.prototype, "removeIcon", void 0);
574
+ __decorate([property({ type: String })], MonoFileUploadCoreClass.prototype, "accept", void 0);
575
+ __decorate([property({
576
+ reflect: true,
577
+ converter: booleanStringConverter
578
+ })], MonoFileUploadCoreClass.prototype, "multiple", void 0);
579
+ __decorate([property({
580
+ reflect: true,
581
+ converter: booleanStringConverter
582
+ })], MonoFileUploadCoreClass.prototype, "disabled", void 0);
583
+ __decorate([property({
584
+ reflect: true,
585
+ converter: booleanStringConverter
586
+ })], MonoFileUploadCoreClass.prototype, "required", void 0);
587
+ __decorate([property({
588
+ reflect: true,
589
+ converter: booleanStringConverter
590
+ })], MonoFileUploadCoreClass.prototype, "dragdrop", void 0);
591
+ __decorate([property({
592
+ attribute: "max-file-size",
593
+ converter: numberStringConverter
594
+ })], MonoFileUploadCoreClass.prototype, "maxFileSize", void 0);
595
+ __decorate([property({
596
+ attribute: "max-files",
597
+ converter: numberStringConverter
598
+ })], MonoFileUploadCoreClass.prototype, "maxFiles", void 0);
599
+ __decorate([property({
600
+ attribute: false,
601
+ hasChanged: arrayHasChanged
602
+ })], MonoFileUploadCoreClass.prototype, "modelValue", void 0);
603
+ __decorate([property({ attribute: false })], MonoFileUploadCoreClass.prototype, "cssClass", void 0);
604
+ __decorate([property({ type: String })], MonoFileUploadCoreClass.prototype, "variant", void 0);
605
+ __decorate([property({
606
+ type: String,
607
+ attribute: "validation-state"
608
+ })], MonoFileUploadCoreClass.prototype, "validationState", void 0);
609
+ __decorate([property({
610
+ type: String,
611
+ attribute: "validation-message"
612
+ })], MonoFileUploadCoreClass.prototype, "validationMessage", void 0);
613
+ __decorate([state()], MonoFileUploadCoreClass.prototype, "_dragOver", void 0);
614
+ __decorate([state()], MonoFileUploadCoreClass.prototype, "_hasIconSlot", void 0);
615
+ __decorate([state()], MonoFileUploadCoreClass.prototype, "_hasTitleSlot", void 0);
616
+ __decorate([state()], MonoFileUploadCoreClass.prototype, "_hasSubtitleSlot", void 0);
617
+ __decorate([query(".mono-file-upload-input")], MonoFileUploadCoreClass.prototype, "_inputEl", void 0);
618
+ return MonoFileUploadCoreClass;
619
+ };
620
+ //#endregion
621
+ //#region src/components/file-upload/file-upload.css?raw
622
+ var file_upload_default = "/* =========================================================================\r\n mono-file-upload — a port of Basecoat's `.empty` (the dropzone) and `.item`\r\n (the file rows) inside a `.field` (basecoat-css@1.0.2, vega style).\r\n\r\n Styled by ATTRIBUTE, like Basecoat — and the attributes mirror the element's\r\n props one for one, so hand-written markup reads like the Lit / Vue tag:\r\n\r\n <mono-file-upload variant=\"compact\" label=\"Docs\" title=\"Drop here\" subtitle=\"PDF, DOCX\">\r\n <div mono-file-upload mono-variant=\"compact\">\r\n <label mono-label>Docs</label>\r\n <label mono-dropzone>\r\n <span mono-icon><span mono-glyph class=\"i-mdi-cloud-upload-outline\"></span></span>\r\n <span mono-title>Drop here</span>\r\n <span mono-subtitle>PDF, DOCX</span>\r\n <input mono-native type=\"file\" />\r\n </label>\r\n <div mono-list>\r\n <div mono-item>\r\n <span mono-thumb>…</span>\r\n <span mono-file><span mono-name>a.pdf</span><span mono-meta>12 KB</span></span>\r\n <button mono-remove type=\"button\">…</button>\r\n </div>\r\n </div>\r\n <div mono-message=\"helper\">…</div>\r\n </div>\r\n\r\n An absent attribute is the prop's default (`:not([mono-variant])` = default,\r\n no `mono-validation-state` = default). The element renders these on its root\r\n (both builds) plus the states `mono-disabled` / `mono-required` /\r\n `mono-multiple` / `mono-no-dragdrop` (drag-drop is ON by default, so the\r\n attribute marks the exception) and the live `mono-dragover`. The old\r\n classes (`.mono-file-upload.compact.invalid`) are still emitted as inert\r\n hooks until 2.0 but no rule here reads them.\r\n\r\n Selector map (ours ≡ upstream):\r\n [mono-file-upload] ≡ .field (flex w-full flex-col gap-3)\r\n [mono-label] ≡ .field > label / .label (text-sm leading-snug font-medium)\r\n [mono-dropzone] ≡ .empty (flex flex-col items-center justify-center text-center\r\n text-balance, gap-4 rounded-lg border-dashed p-12) — the border\r\n WIDTH is the `border` utility upstream puts in the markup, and\r\n the gap is `.empty > header`'s gap-2 because our title and\r\n subtext are flat siblings, not a nested <header>\r\n [mono-icon] ≡ .empty figure + .empty figure:has(> svg:only-child)\r\n (mb-2, bg-muted text-foreground size-10 rounded-lg, glyph size-6)\r\n [mono-title] ≡ .empty :is(h2, h3, h4) (text-lg font-medium tracking-tight)\r\n [mono-subtitle]/[mono-subtext] ≡ .empty > header > p (text-sm/relaxed text-muted-foreground)\r\n [mono-native] ≡ .field > input[type='file'] — HIDDEN here: the whole dropzone\r\n is the picker, so the native control never shows\r\n [mono-list] ≡ .item-group (flex w-full flex-col, gap-2.5 beside sm items)\r\n [mono-item] ≡ .item[data-variant='outline'][data-size='sm']\r\n (flex flex-wrap items-center border-border rounded-md text-sm,\r\n gap-2.5 px-3 py-2.5, transition-colors)\r\n [mono-thumb] ≡ .item > figure:has(> img) at sm (size-8 rounded-sm overflow-hidden,\r\n img size-full object-cover) + figure:has(> svg:only-child) (glyph size-4)\r\n [mono-file] ≡ .item > section (flex flex-1 flex-col gap-1)\r\n [mono-name] ≡ .item :is(h2, h3, h4) (line-clamp-1 text-sm/snug font-medium)\r\n [mono-meta] ≡ .item p (text-sm/normal text-muted-foreground line-clamp-2)\r\n [mono-remove] ≡ .btn[data-variant='ghost'][data-size='icon-sm']\r\n (size-8 rounded-[min(radius-md,10px)] hover:bg-muted, glyph size-4)\r\n [mono-message=\"…\"] ≡ .field > p / .field [role='alert'] (text-sm, destructive when invalid)\r\n [mono-validation-state=\"invalid\"] ≡ aria-invalid:border-destructive aria-invalid:ring-destructive/20\r\n [mono-validation-state=\"valid|warning\"] ≡ EXTENSION (the same treatment in --success / --warning)\r\n [mono-variant=\"compact\"] ≡ the `.empty` + `.item` metrics the COMPACT styles use\r\n (nova/lyra/mira: .empty p-6, figure size-8 with a size-4 glyph,\r\n title text-sm; rows drop to .item[data-size='xs'])\r\n [mono-dragover] ≡ EXTENSION (the .item focus-visible treatment: border-ring +\r\n ring-[3px] ring-ring/50, plus an accent tint)\r\n [mono-disabled] ≡ .btn disabled:opacity-50\r\n\r\n Upstream's dropzone is genuinely large — `.empty` is `p-12` — so this port is\r\n TALLER than the pre-Basecoat uploader (which padded 1.2rem). `compact` is the\r\n short one, and `--mono-file-upload-dropzone-padding` is one line either way.\r\n\r\n Specificity contract (same as the pre-port class sheet): a part's RESTING rule\r\n is exactly one attribute strong — `:where([mono-file-upload]) [mono-item]` =\r\n (0,1,0) — so a utility class handed in through `cssClass` wins by source\r\n order, while the prop and state rules stay heavier and win over it.\r\n\r\n The two variants own SEPARATE public knobs (`-dropzone-padding` vs\r\n `-compact-padding`, `-item-padding-x` vs `-compact-item-padding-x`, …): a\r\n flavor writing one shared knob would repaint both looks at once, which is the\r\n bug that made every style's `underlined` textarea come out filled.\r\n\r\n FLAVORS set `--mono-file-upload-{radius,dropzone-padding,dropzone-gap,\r\n icon-offset,icon-size,icon-glyph-size,icon-radius,title-font-size,\r\n title-transform,item-radius,item-padding-*,item-gap,list-gap,thumb-size,\r\n thumb-radius,…}` — the DEFAULT variant's set; `compact` has its own\r\n `--mono-file-upload-compact-*` twins so one look never repaints the other; every fallback\r\n here is vega's value\r\n (`node scripts/basecoat-styles.mjs --varying \"^\\.(empty|item)\"`).\r\n ========================================================================= */\r\n\r\nmono-file-upload {\r\n display: block;\r\n}\r\n\r\n[mono-file-upload] {\r\n /* ── palette: each slot is a public knob over a Basecoat token ─────────── */\r\n --_mono-file-upload-text: var(--mono-file-upload-text, var(--foreground));\r\n --_mono-file-upload-muted: var(--mono-file-upload-muted, var(--muted-foreground));\r\n /* the accent: the dropzone glyph, and the ring the dragover state paints */\r\n --_mono-file-upload-primary: var(--mono-file-upload-primary, var(--primary));\r\n --_mono-file-upload-success: var(--mono-file-upload-success, var(--success));\r\n --_mono-file-upload-danger: var(--mono-file-upload-danger, var(--destructive));\r\n --_mono-file-upload-warning: var(--mono-file-upload-warning, var(--warning));\r\n\r\n /* `-border` is the pre-Basecoat public name for the dropzone edge — kept as\r\n the fallback so a consumer that set it keeps working */\r\n --_mono-file-upload-border-color: var(--mono-file-upload-border-color, var(--mono-file-upload-border, var(--border)));\r\n --_mono-file-upload-border-width: var(--mono-file-upload-border-width, var(--mono-border-width));\r\n --_mono-file-upload-border-style: var(--mono-file-upload-border-style, dashed);\r\n /* .empty has no fill of its own; `-background` is the pre-Basecoat name */\r\n --_mono-file-upload-dropzone-bg: var(--mono-file-upload-dropzone-bg, var(--mono-file-upload-background, transparent));\r\n /* hover: the ghost treatment (bg-muted, dark:bg-muted/50) */\r\n --_mono-file-upload-dropzone-hover-bg: var(--mono-file-upload-dropzone-hover-bg, var(--mono-mode-ghost-hover));\r\n --_mono-file-upload-radius: var(--mono-file-upload-radius, var(--mono-radius-lg));\r\n\r\n --_mono-file-upload-ring-color: var(--mono-file-upload-ring-color, var(--ring));\r\n --_mono-file-upload-ring-width: var(--mono-file-upload-ring-width, var(--mono-ring-width));\r\n --_mono-file-upload-ring-alpha: var(--mono-file-upload-ring-alpha, var(--mono-ring-alpha));\r\n\r\n /* the icon plate — .empty figure:has(> svg:only-child) is a muted square */\r\n --_mono-file-upload-icon-bg: var(--mono-file-upload-icon-bg, var(--muted));\r\n --_mono-file-upload-icon-color: var(--mono-file-upload-icon-color, var(--_mono-file-upload-text));\r\n --_mono-file-upload-icon-radius: var(--mono-file-upload-icon-radius, var(--mono-radius-lg));\r\n\r\n /* the file rows — .item[data-variant='outline'] rings, it does not fill.\r\n `-surface` is the pre-Basecoat name for the row background. */\r\n --_mono-file-upload-item-bg: var(--mono-file-upload-item-bg, var(--mono-file-upload-surface, transparent));\r\n --_mono-file-upload-item-border-color: var(--mono-file-upload-item-border-color, var(--border));\r\n --_mono-file-upload-item-border-width: var(--mono-file-upload-item-border-width, var(--mono-border-width));\r\n --_mono-file-upload-item-radius: var(--mono-file-upload-item-radius, var(--mono-radius-md));\r\n --_mono-file-upload-thumb-bg: var(--mono-file-upload-thumb-bg, var(--muted));\r\n --_mono-file-upload-thumb-radius: var(--mono-file-upload-thumb-radius, var(--mono-radius-sm));\r\n\r\n /* ── the DEFAULT variant's metrics; `compact` re-points every preset ───────\r\n basecoat@1.0.2 styles/vega.css .empty — gap-4 rounded-lg border-dashed p-12;\r\n .empty figure — mb-2; .empty figure:has(> svg:only-child) — size-10 rounded-lg\r\n with a size-6 glyph; .empty :is(h2,h3,h4) — text-lg; .item[data-size='sm'] —\r\n gap-2.5 px-3 py-2.5 with a size-8 image figure; .item-group — gap-2.5 */\r\n --_mono-file-upload-dropzone-padding: var(--_mono-file-upload-dropzone-padding-preset, calc(var(--mono-spacing) * 12));\r\n --_mono-file-upload-dropzone-gap: var(--_mono-file-upload-dropzone-gap-preset, calc(var(--mono-spacing) * 2));\r\n --_mono-file-upload-icon-offset: var(--_mono-file-upload-icon-offset-preset, calc(var(--mono-spacing) * 4));\r\n --_mono-file-upload-icon-size: var(--_mono-file-upload-icon-size-preset, calc(var(--mono-spacing) * 10));\r\n --_mono-file-upload-icon-glyph-size: var(--_mono-file-upload-icon-glyph-size-preset, calc(var(--mono-spacing) * 6));\r\n --_mono-file-upload-title-font-size: var(--_mono-file-upload-title-font-size-preset, var(--mono-text-lg));\r\n --_mono-file-upload-title-line-height: var(--_mono-file-upload-title-line-height-preset, var(--mono-text-lg--lh));\r\n --_mono-file-upload-list-gap: var(--_mono-file-upload-list-gap-preset, calc(var(--mono-spacing) * 2.5));\r\n --_mono-file-upload-item-gap: var(--_mono-file-upload-item-gap-preset, calc(var(--mono-spacing) * 2.5));\r\n --_mono-file-upload-item-padding-x: var(--_mono-file-upload-item-padding-x-preset, calc(var(--mono-spacing) * 3));\r\n --_mono-file-upload-item-padding-y: var(--_mono-file-upload-item-padding-y-preset, calc(var(--mono-spacing) * 2.5));\r\n --_mono-file-upload-file-gap: var(--_mono-file-upload-file-gap-preset, var(--mono-spacing));\r\n --_mono-file-upload-thumb-size: var(--_mono-file-upload-thumb-size-preset, calc(var(--mono-spacing) * 8));\r\n --_mono-file-upload-meta-font-size: var(--_mono-file-upload-meta-font-size-preset, var(--mono-text-sm));\r\n\r\n /* basecoat@1.0.2 components/field.css .field — flex w-full flex-col;\r\n styles/vega.css .field — gap-3 */\r\n display: flex;\r\n flex-direction: column;\r\n width: 100%;\r\n box-sizing: border-box;\r\n gap: var(--mono-file-upload-gap, calc(var(--mono-spacing) * 3));\r\n color: var(--_mono-file-upload-text);\r\n font-family: inherit;\r\n}\r\n\r\n[mono-file-upload] *,\r\n[mono-file-upload] *::before,\r\n[mono-file-upload] *::after {\r\n box-sizing: border-box;\r\n}\r\n\r\n/* The shadow build renders every region and marks the empty ones; this hides\r\n them. It must out-specify the region rules below, hence the root attribute. */\r\n[mono-file-upload] :is([mono-label], [mono-icon], [mono-title], [mono-subtitle], [mono-subtext], [mono-list], [mono-message])[mono-empty] {\r\n display: none;\r\n}\r\n\r\n/* =========================================\r\n Variants — the DEFAULT look, and the compact one\r\n ========================================= */\r\n\r\n/* `default` is vega's `.empty` + `.item[data-size='sm']`. The knobs are scoped\r\n to the variant so a flavor can restyle one look without touching the other. */\r\n[mono-file-upload]:not([mono-variant=\"compact\"]) {\r\n --_mono-file-upload-dropzone-padding-preset: var(--mono-file-upload-dropzone-padding);\r\n --_mono-file-upload-dropzone-gap-preset: var(--mono-file-upload-dropzone-gap);\r\n --_mono-file-upload-icon-offset-preset: var(--mono-file-upload-icon-offset);\r\n --_mono-file-upload-icon-size-preset: var(--mono-file-upload-icon-size);\r\n --_mono-file-upload-icon-glyph-size-preset: var(--mono-file-upload-icon-glyph-size);\r\n --_mono-file-upload-title-font-size-preset: var(--mono-file-upload-title-font-size);\r\n --_mono-file-upload-title-line-height-preset: var(--mono-file-upload-title-line-height);\r\n --_mono-file-upload-list-gap-preset: var(--mono-file-upload-list-gap);\r\n --_mono-file-upload-item-gap-preset: var(--mono-file-upload-item-gap);\r\n --_mono-file-upload-item-padding-x-preset: var(--mono-file-upload-item-padding-x);\r\n --_mono-file-upload-item-padding-y-preset: var(--mono-file-upload-item-padding-y);\r\n --_mono-file-upload-file-gap-preset: var(--mono-file-upload-file-gap);\r\n --_mono-file-upload-thumb-size-preset: var(--mono-file-upload-thumb-size);\r\n --_mono-file-upload-meta-font-size-preset: var(--mono-file-upload-meta-font-size);\r\n}\r\n\r\n/* basecoat@1.0.2 styles/nova.css .empty — rounded-xl p-6;\r\n styles/nova.css .empty figure:has(> svg:only-child) — size-8 with a size-4 glyph;\r\n styles/nova.css .empty :is(h2, h3, h4) — text-sm;\r\n styles/vega.css .item[data-size='xs'] — gap-2 px-2.5 py-2;\r\n styles/vega.css .item[data-size='xs'] > section — gap-0;\r\n styles/vega.css .item[data-size='xs'] p — text-xs;\r\n styles/vega.css .item[data-size='xs'] > figure:has(> img) — size-6;\r\n styles/vega.css .item-group:has(> .item[data-size='xs']) — gap-2\r\n — DEVIATION: the radius stays the default variant's (a flavor owns that axis). */\r\n[mono-file-upload][mono-variant=\"compact\"] {\r\n --_mono-file-upload-dropzone-padding-preset: var(--mono-file-upload-compact-padding, calc(var(--mono-spacing) * 6));\r\n --_mono-file-upload-dropzone-gap-preset: var(--mono-file-upload-compact-gap, var(--mono-spacing));\r\n --_mono-file-upload-icon-offset-preset: var(--mono-file-upload-compact-icon-offset, calc(var(--mono-spacing) * 3));\r\n --_mono-file-upload-icon-size-preset: var(--mono-file-upload-compact-icon-size, calc(var(--mono-spacing) * 8));\r\n --_mono-file-upload-icon-glyph-size-preset: var(--mono-file-upload-compact-icon-glyph-size, calc(var(--mono-spacing) * 4));\r\n --_mono-file-upload-title-font-size-preset: var(--mono-file-upload-compact-title-font-size, var(--mono-text-sm));\r\n --_mono-file-upload-title-line-height-preset: var(--mono-file-upload-compact-title-line-height, var(--mono-leading-snug));\r\n --_mono-file-upload-list-gap-preset: var(--mono-file-upload-compact-list-gap, calc(var(--mono-spacing) * 2));\r\n --_mono-file-upload-item-gap-preset: var(--mono-file-upload-compact-item-gap, calc(var(--mono-spacing) * 2));\r\n --_mono-file-upload-item-padding-x-preset: var(--mono-file-upload-compact-item-padding-x, calc(var(--mono-spacing) * 2.5));\r\n --_mono-file-upload-item-padding-y-preset: var(--mono-file-upload-compact-item-padding-y, calc(var(--mono-spacing) * 2));\r\n --_mono-file-upload-file-gap-preset: var(--mono-file-upload-compact-file-gap, 0px);\r\n --_mono-file-upload-thumb-size-preset: var(--mono-file-upload-compact-thumb-size, calc(var(--mono-spacing) * 6));\r\n --_mono-file-upload-meta-font-size-preset: var(--mono-file-upload-compact-meta-font-size, var(--mono-text-xs));\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 — text-sm leading-snug font-medium */\r\n:where([mono-file-upload]) > [mono-label] {\r\n display: inline-flex;\r\n align-items: center;\r\n width: fit-content;\r\n gap: calc(var(--mono-spacing) * 1);\r\n font-size: var(--mono-file-upload-label-font-size, var(--mono-text-sm));\r\n line-height: var(--mono-file-upload-label-line-height, var(--mono-leading-snug));\r\n font-weight: var(--mono-file-upload-label-font-weight, var(--mono-label-font-weight, var(--mono-font-weight-medium)));\r\n color: var(--mono-file-upload-label-color, var(--_mono-file-upload-text));\r\n}\r\n\r\n[mono-file-upload][mono-validation-state=\"invalid\"] > [mono-label] {\r\n color: var(--mono-file-upload-label-color, var(--_mono-file-upload-danger));\r\n}\r\n\r\n:where([mono-file-upload]) [mono-required-mark] {\r\n color: var(--mono-file-upload-required-color, var(--destructive));\r\n}\r\n\r\n/* =========================================\r\n Dropzone — `.empty`\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 components/empty.css .empty — flex w-full min-w-0 flex-col\r\n items-center justify-center text-center text-balance;\r\n styles/vega.css .empty — gap-4 rounded-lg border-dashed p-12\r\n — the border WIDTH comes from the `border` utility upstream writes in markup,\r\n so it is a knob here; `transition-[color,box-shadow]` is the field treatment. */\r\n:where([mono-file-upload]) [mono-dropzone] {\r\n display: flex;\r\n width: 100%;\r\n min-width: 0;\r\n flex-direction: column;\r\n align-items: center;\r\n justify-content: center;\r\n text-align: center;\r\n text-wrap: balance;\r\n gap: var(--_mono-file-upload-dropzone-gap);\r\n padding: var(--_mono-file-upload-dropzone-padding);\r\n border: var(--_mono-file-upload-border-width) var(--_mono-file-upload-border-style)\r\n var(--_mono-file-upload-border-color);\r\n border-radius: var(--_mono-file-upload-radius);\r\n background-color: var(--_mono-file-upload-dropzone-bg);\r\n cursor: pointer;\r\n transition:\r\n color var(--mono-duration) var(--mono-ease),\r\n background-color var(--mono-duration) var(--mono-ease),\r\n border-color var(--mono-duration) var(--mono-ease),\r\n box-shadow var(--mono-duration) var(--mono-ease);\r\n /* the two-slot stack the ports share: the ring is written by a state rule */\r\n box-shadow: var(--_mono-file-upload-ring, 0 0 #0000);\r\n}\r\n\r\n/* basecoat@1.0.2 styles/vega.css .btn[data-variant='ghost'] — hover:bg-muted\r\n (dark:hover:bg-muted/50), carried by --mono-mode-ghost-hover */\r\n@media (hover: hover) {\r\n [mono-file-upload]:not([mono-disabled]) [mono-dropzone]:hover {\r\n border-color: var(--mono-file-upload-hover-border-color, var(--_mono-file-upload-primary));\r\n background-color: var(--_mono-file-upload-dropzone-hover-bg);\r\n }\r\n}\r\n\r\n/* EXTENSION — the drag-over state wears the `.item` focus treatment\r\n (basecoat@1.0.2 components/item.css .item — focus-visible:border-ring\r\n focus-visible:ring-[3px] focus-visible:ring-ring/50) in the accent colour */\r\n[mono-file-upload][mono-dragover] [mono-dropzone] {\r\n border-color: var(--_mono-file-upload-primary);\r\n border-style: solid;\r\n background-color: color-mix(in oklab, var(--_mono-file-upload-primary) var(--mono-mode-tint), transparent);\r\n --_mono-file-upload-ring: 0 0 0 var(--_mono-file-upload-ring-width)\r\n color-mix(in oklab, var(--_mono-file-upload-primary) var(--_mono-file-upload-ring-alpha), transparent);\r\n}\r\n\r\n/* basecoat@1.0.2 components/button.css .btn — disabled:pointer-events-none disabled:opacity-50 */\r\n[mono-file-upload][mono-disabled] [mono-dropzone] {\r\n opacity: 0.5;\r\n cursor: not-allowed;\r\n pointer-events: none;\r\n}\r\n\r\n/* basecoat@1.0.2 styles/vega.css .field > textarea, .textarea —\r\n aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:ring-3\r\n (dark: destructive/50 and /40, carried by the mode tokens) */\r\n[mono-file-upload][mono-validation-state=\"invalid\"] [mono-dropzone] {\r\n border-color: var(--mono-file-upload-invalid-border-color, var(--mono-mode-invalid-border));\r\n --_mono-file-upload-ring: 0 0 0 var(--_mono-file-upload-ring-width) var(--mono-mode-invalid-ring);\r\n}\r\n\r\n/* EXTENSION — the same treatment in --success / --warning */\r\n[mono-file-upload][mono-validation-state=\"valid\"] [mono-dropzone] {\r\n border-color: var(--_mono-file-upload-success);\r\n --_mono-file-upload-ring: 0 0 0 var(--_mono-file-upload-ring-width)\r\n color-mix(in oklab, var(--_mono-file-upload-success) var(--mono-mode-state-ring-alpha), transparent);\r\n}\r\n\r\n[mono-file-upload][mono-validation-state=\"warning\"] [mono-dropzone] {\r\n border-color: var(--_mono-file-upload-warning);\r\n --_mono-file-upload-ring: 0 0 0 var(--_mono-file-upload-ring-width)\r\n color-mix(in oklab, var(--_mono-file-upload-warning) var(--mono-mode-state-ring-alpha), transparent);\r\n}\r\n\r\n/* =========================================\r\n Dropzone contents — figure, title, subtext\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 styles/vega.css .empty figure — mb-2;\r\n styles/vega.css .empty figure:has(> svg:only-child) — bg-muted text-foreground\r\n flex size-10 shrink-0 items-center justify-center rounded-lg\r\n — DEVIATION: keyed off the part attribute, not `:has(> svg:only-child)`: the\r\n light build paints the glyph with an `i-*` MASK span and the shadow build with\r\n an inline <svg>, so a shape test would style one build and not the other. */\r\n:where([mono-file-upload]) [mono-icon] {\r\n display: flex;\r\n flex-shrink: 0;\r\n align-items: center;\r\n justify-content: center;\r\n width: var(--_mono-file-upload-icon-size);\r\n height: var(--_mono-file-upload-icon-size);\r\n margin-bottom: var(--_mono-file-upload-icon-offset);\r\n border-radius: var(--_mono-file-upload-icon-radius);\r\n background-color: var(--_mono-file-upload-icon-bg);\r\n color: var(--_mono-file-upload-icon-color);\r\n font-size: var(--_mono-file-upload-icon-glyph-size);\r\n line-height: 1;\r\n overflow: hidden;\r\n}\r\n\r\n/* `[&_svg:not([class*='size-'])]:size-6` — our glyph is a mask span (light) or an\r\n inline SVG (shadow); both are sized by the same box. Only [mono-glyph] is\r\n touched: a slotted custom icon is light DOM in BOTH builds, so a bare `svg`\r\n descendant rule would reach it in light and not in shadow. */\r\n:where([mono-file-upload]) [mono-icon] [mono-glyph] {\r\n display: block;\r\n width: var(--_mono-file-upload-icon-glyph-size);\r\n height: var(--_mono-file-upload-icon-glyph-size);\r\n flex-shrink: 0;\r\n color: inherit;\r\n}\r\n\r\n:where([mono-file-upload]) [mono-icon] [mono-glyph] > svg {\r\n display: block;\r\n width: 100%;\r\n height: 100%;\r\n}\r\n\r\n/* basecoat@1.0.2 styles/vega.css .empty :is(h2, h3, h4) — text-lg font-medium tracking-tight */\r\n:where([mono-file-upload]) [mono-title] {\r\n font-size: var(--_mono-file-upload-title-font-size);\r\n line-height: var(--_mono-file-upload-title-line-height);\r\n font-weight: var(--mono-file-upload-title-font-weight, var(--mono-font-weight-medium));\r\n letter-spacing: var(--mono-file-upload-title-tracking, var(--mono-tracking-tight));\r\n text-transform: var(--mono-file-upload-title-transform, none);\r\n color: var(--_mono-file-upload-text);\r\n}\r\n\r\n/* basecoat@1.0.2 styles/vega.css .empty > header > p — text-muted-foreground text-sm/relaxed\r\n `mono-subtitle` is the current part name; the element still emits the old\r\n `mono-subtext` beside it, and hand-written markup may use either. The CSS vars\r\n keep their `-subtext-` names. */\r\n:where([mono-file-upload]) :is([mono-subtitle], [mono-subtext]) {\r\n font-size: var(--mono-file-upload-subtext-font-size, var(--mono-text-sm));\r\n line-height: var(--mono-file-upload-subtext-line-height, var(--mono-leading-relaxed));\r\n color: var(--mono-file-upload-subtext-color, var(--_mono-file-upload-muted));\r\n}\r\n\r\n/* The whole dropzone IS the picker — the native control never shows. */\r\n:where([mono-file-upload]) [mono-native] {\r\n display: none;\r\n}\r\n\r\n/* =========================================\r\n File list — `.item-group` and `.item`\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 components/item.css .item-group — flex w-full flex-col;\r\n styles/vega.css .item-group:has(> .item[data-size='sm']) — gap-2.5 */\r\n:where([mono-file-upload]) [mono-list] {\r\n display: flex;\r\n width: 100%;\r\n flex-direction: column;\r\n gap: var(--_mono-file-upload-list-gap);\r\n}\r\n\r\n/* basecoat@1.0.2 components/item.css .item — flex w-full flex-wrap items-center\r\n border transition-colors duration-100 outline-none;\r\n styles/vega.css .item — rounded-md border text-sm;\r\n styles/vega.css .item[data-variant='outline'] — border-border;\r\n styles/vega.css .item[data-size='sm'] — gap-2.5 px-3 py-2.5 */\r\n:where([mono-file-upload]) [mono-item] {\r\n display: flex;\r\n width: 100%;\r\n flex-wrap: wrap;\r\n align-items: center;\r\n gap: var(--_mono-file-upload-item-gap);\r\n padding-inline: var(--_mono-file-upload-item-padding-x);\r\n padding-block: var(--_mono-file-upload-item-padding-y);\r\n border: var(--_mono-file-upload-item-border-width) solid var(--_mono-file-upload-item-border-color);\r\n border-radius: var(--_mono-file-upload-item-radius);\r\n background-color: var(--_mono-file-upload-item-bg);\r\n font-size: var(--mono-file-upload-item-font-size, var(--mono-text-sm));\r\n transition:\r\n background-color 100ms var(--mono-ease),\r\n border-color 100ms var(--mono-ease);\r\n outline: none;\r\n}\r\n\r\n/* basecoat@1.0.2 styles/vega.css .item[data-size='sm'] > figure:has(> img) — size-8;\r\n styles/vega.css .item > figure:has(> img) — overflow-hidden rounded-sm;\r\n components/item.css .item > figure:has(> img) — [&_img]:size-full [&_img]:object-cover;\r\n styles/vega.css .item > figure:has(> svg:only-child) — a size-4 glyph */\r\n:where([mono-file-upload]) [mono-thumb] {\r\n display: inline-flex;\r\n flex-shrink: 0;\r\n align-items: center;\r\n justify-content: center;\r\n width: var(--_mono-file-upload-thumb-size);\r\n height: var(--_mono-file-upload-thumb-size);\r\n overflow: hidden;\r\n border-radius: var(--_mono-file-upload-thumb-radius);\r\n background-color: var(--_mono-file-upload-thumb-bg);\r\n color: var(--mono-file-upload-thumb-color, var(--_mono-file-upload-muted));\r\n font-size: calc(var(--mono-spacing) * 4);\r\n line-height: 1;\r\n}\r\n\r\n:where([mono-file-upload]) [mono-thumb] > img {\r\n width: 100%;\r\n height: 100%;\r\n object-fit: cover;\r\n}\r\n\r\n:where([mono-file-upload]) [mono-thumb] [mono-glyph] {\r\n display: block;\r\n width: calc(var(--mono-spacing) * 4);\r\n height: calc(var(--mono-spacing) * 4);\r\n flex-shrink: 0;\r\n}\r\n\r\n:where([mono-file-upload]) [mono-thumb] [mono-glyph] > svg {\r\n width: 100%;\r\n height: 100%;\r\n}\r\n\r\n/* basecoat@1.0.2 components/item.css .item > section — flex flex-1 flex-col;\r\n styles/vega.css .item > section — gap-1 (gap-0 at data-size='xs') */\r\n:where([mono-file-upload]) [mono-file] {\r\n display: flex;\r\n flex: 1 1 auto;\r\n min-width: 0;\r\n flex-direction: column;\r\n gap: var(--_mono-file-upload-file-gap);\r\n}\r\n\r\n/* basecoat@1.0.2 components/item.css .item :is(h2, h3, h4) — line-clamp-1 flex\r\n w-fit items-center;\r\n styles/vega.css .item :is(h2, h3, h4) — text-sm leading-snug font-medium\r\n — DEVIATION: one line ellipsised with `text-overflow`, not `line-clamp-1`: a\r\n file name is a single line and must truncate mid-word, which the WebKit box\r\n clamp does not do. */\r\n:where([mono-file-upload]) [mono-name] {\r\n max-width: 100%;\r\n font-size: var(--mono-file-upload-name-font-size, var(--mono-text-sm));\r\n line-height: var(--mono-file-upload-name-line-height, var(--mono-leading-snug));\r\n font-weight: var(--mono-file-upload-name-font-weight, var(--mono-font-weight-medium));\r\n color: var(--_mono-file-upload-text);\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n}\r\n\r\n/* basecoat@1.0.2 components/item.css .item p — text-muted-foreground line-clamp-2\r\n text-start font-normal;\r\n styles/vega.css .item p — text-sm leading-normal (text-xs at data-size='xs') */\r\n:where([mono-file-upload]) [mono-meta] {\r\n font-size: var(--_mono-file-upload-meta-font-size);\r\n line-height: var(--mono-file-upload-meta-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-file-upload-meta-color, var(--_mono-file-upload-muted));\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);\r\n styles/vega.css .btn[data-size='icon-sm'] — size-8 rounded-[min(var(--radius-md),10px)]\r\n — DEVIATION: the hover ink is the DANGER role, not `--foreground`: this ghost\r\n button deletes the row it sits in. */\r\n:where([mono-file-upload]) [mono-remove] {\r\n display: inline-flex;\r\n flex-shrink: 0;\r\n align-items: center;\r\n justify-content: center;\r\n width: var(--mono-file-upload-remove-size, calc(var(--mono-spacing) * 8));\r\n height: var(--mono-file-upload-remove-size, calc(var(--mono-spacing) * 8));\r\n padding: 0;\r\n border: 0;\r\n border-radius: var(--mono-file-upload-remove-radius, min(var(--mono-radius-md), 10px));\r\n background: transparent;\r\n color: var(--_mono-file-upload-muted);\r\n font: inherit;\r\n font-size: calc(var(--mono-spacing) * 4);\r\n line-height: 1;\r\n cursor: pointer;\r\n transition:\r\n color var(--mono-duration) var(--mono-ease),\r\n background-color var(--mono-duration) var(--mono-ease),\r\n box-shadow var(--mono-duration) var(--mono-ease);\r\n box-shadow: var(--_mono-file-upload-remove-ring, 0 0 #0000);\r\n}\r\n\r\n@media (hover: hover) {\r\n :where([mono-file-upload]) [mono-remove]:hover {\r\n background-color: var(--mono-mode-ghost-hover);\r\n color: var(--_mono-file-upload-danger);\r\n }\r\n}\r\n\r\n/* basecoat@1.0.2 components/item.css .item — focus-visible:border-ring\r\n focus-visible:ring-[3px] focus-visible:ring-ring/50 */\r\n:where([mono-file-upload]) [mono-remove]:focus-visible {\r\n outline: none;\r\n color: var(--_mono-file-upload-text);\r\n --_mono-file-upload-remove-ring: 0 0 0 var(--_mono-file-upload-ring-width)\r\n color-mix(in oklab, var(--_mono-file-upload-ring-color) var(--_mono-file-upload-ring-alpha), transparent);\r\n}\r\n\r\n:where([mono-file-upload]) [mono-remove] [mono-glyph] {\r\n display: block;\r\n width: calc(var(--mono-spacing) * 4);\r\n height: calc(var(--mono-spacing) * 4);\r\n flex-shrink: 0;\r\n color: inherit;\r\n}\r\n\r\n:where([mono-file-upload]) [mono-remove] [mono-glyph] > svg {\r\n width: 100%;\r\n height: 100%;\r\n}\r\n\r\n[mono-file-upload][mono-disabled] [mono-remove] {\r\n opacity: 0.5;\r\n pointer-events: none;\r\n}\r\n\r\n/* =========================================\r\n Message\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 styles/vega.css .fieldset legend + p, .field > p, .field section > p\r\n — text-sm text-muted-foreground leading-normal font-normal */\r\n:where([mono-file-upload]) [mono-message] {\r\n font-size: var(--mono-file-upload-message-font-size, var(--mono-text-sm));\r\n line-height: var(--mono-file-upload-message-line-height, var(--mono-leading-normal));\r\n color: var(--mono-file-upload-message-color, var(--_mono-file-upload-muted));\r\n}\r\n\r\n/* basecoat@1.0.2 components/field.css .field >> [role='alert'] — the invalid message\r\n is the destructive one (styles/vega.css gives it text-sm) */\r\n:where([mono-file-upload]) [mono-message=\"invalid\"] {\r\n color: var(--_mono-file-upload-danger);\r\n}\r\n\r\n:where([mono-file-upload]) [mono-message=\"valid\"] {\r\n color: var(--_mono-file-upload-success);\r\n}\r\n\r\n:where([mono-file-upload]) [mono-message=\"warning\"] {\r\n color: var(--_mono-file-upload-warning);\r\n}\r\n\r\n@media (prefers-reduced-motion: reduce) {\r\n :where([mono-file-upload]) :is([mono-dropzone], [mono-item], [mono-remove]) {\r\n transition: none;\r\n }\r\n}\r\n";
623
+ //#endregion
624
+ //#region src/components/file-upload/mono-file-upload.shadow.ts
625
+ /** The glyphs this build draws itself — the light build's defaults, verbatim. */
626
+ var DEFAULT_ICON = "i-mdi-cloud-upload-outline";
627
+ var REMOVE_ICON = "i-mdi-close";
628
+ var FALLBACK_FILE_ICON = "i-mdi-file";
629
+ var SHADOW_EXTRA_CSS = `
630
+ [mono-icon] slot[name="icon"] { display: contents; }
631
+ `;
632
+ var MonoFileUploadShadow = class MonoFileUploadShadow extends withShadowUtilityStyles(MonoFileUploadCore(LitElement)) {
633
+ static {
634
+ this.disableWarning?.("change-in-update");
635
+ }
636
+ static {
637
+ this.styles = [unsafeCSS(toShadowCss(file_upload_default, {
638
+ host: "mono-file-upload",
639
+ append: SHADOW_EXTRA_CSS
640
+ }))];
641
+ }
642
+ connectedCallback() {
643
+ super.connectedCallback();
644
+ if (isServer) return;
645
+ flushSsrHydration(this);
646
+ }
647
+ firstUpdated(changed) {
648
+ super.firstUpdated?.(changed);
649
+ if (isServer) return;
650
+ this._scanSlots();
651
+ }
652
+ updated(changed) {
653
+ super.updated?.(changed);
654
+ if (!isServer) this._scanSlots();
655
+ }
656
+ /**
657
+ * Slot presence from `assignedNodes()` (DSD assigns slotted content at parse
658
+ * time, so `slotchange` may never fire after upgrade). Only ASSIGNED nodes
659
+ * count — `flatten` would return the prop fallback for an empty slot.
660
+ */
661
+ _slotHas(name) {
662
+ const slot = this.renderRoot.querySelector(`slot[name="${name}"]`);
663
+ return !!slot && slot.assignedNodes().some((n) => n.nodeType === Node.ELEMENT_NODE || !!(n.textContent ?? "").trim());
664
+ }
665
+ _scanSlots() {
666
+ const icon = this._slotHas("icon");
667
+ if (icon !== this._hasIconSlot) this._hasIconSlot = icon;
668
+ const title = this._slotHas("title");
669
+ if (title !== this._hasTitleSlot) this._hasTitleSlot = title;
670
+ const subtitle = this._slotHas("subtitle");
671
+ if (subtitle !== this._hasSubtitleSlot) this._hasSubtitleSlot = subtitle;
672
+ }
673
+ _useIconSlots() {
674
+ return true;
675
+ }
676
+ /** Native slot; the `title` prop is its fallback content (paints with no JS). */
677
+ _renderTitle() {
678
+ return html`<div
679
+ class=${this._cls("mono-file-upload-title", "title")}
680
+ mono-title
681
+ ?mono-empty=${!this._hasTitleSlot && !this.title}
682
+ ><slot name="title" @slotchange=${this._scanSlots}>${this.title || nothing}</slot></div>`;
683
+ }
684
+ /** Native slot; the `subtitle` prop is its fallback content. */
685
+ _renderSubtitle() {
686
+ return html`<div
687
+ class=${this._subtitleClasses}
688
+ mono-subtitle
689
+ mono-subtext
690
+ ?mono-empty=${!this._hasSubtitleSlot && !this.subtitle}
691
+ ><slot name="subtitle" @slotchange=${this._scanSlots}>${this.subtitle || nothing}</slot></div>`;
692
+ }
693
+ _renderDropzoneIcon() {
694
+ return html`<div class=${this._cls("mono-file-upload-icon", "icon")} mono-icon aria-hidden="true">
695
+ <slot name="icon">${this.icon && !isIconifyClass(this.icon) ? html`${this.icon}` : this._renderIconifyGlyph(this.icon) ?? this._renderDefaultGlyph()}</slot>
696
+ </div>`;
697
+ }
698
+ _renderDefaultGlyph() {
699
+ return html`<span class="mono-file-upload-default-icon" mono-glyph aria-hidden="true">
700
+ ${mdiGlyph(DEFAULT_ICON)}
701
+ </span>`;
702
+ }
703
+ _renderRemoveIcon() {
704
+ if (this.removeIcon && !isIconifyClass(this.removeIcon)) return html`${this.removeIcon}`;
705
+ return this._renderIconifyGlyph(this.removeIcon) ?? html`<span class="mono-file-upload-iconify" mono-glyph aria-hidden="true">
706
+ ${mdiGlyph(REMOVE_ICON)}
707
+ </span>`;
708
+ }
709
+ _renderThumbGlyph(item) {
710
+ const icon = getFileIcon(item.type, item.name);
711
+ return this._renderIconifyGlyph(icon) ?? html`<span class="mono-file-upload-iconify" mono-glyph aria-hidden="true">
712
+ ${mdiGlyph(FALLBACK_FILE_ICON)}
713
+ </span>`;
714
+ }
715
+ /**
716
+ * An `i-mdi-*` class as inline SVG, or `undefined` when that glyph is not
717
+ * bundled (`scripts/mdi-glyphs.mjs` lists what is). The light build masks the
718
+ * class through the page's UnoCSS, which cannot cross the shadow boundary.
719
+ */
720
+ _renderIconifyGlyph(icon) {
721
+ if (!icon || !isIconifyClass(icon)) return void 0;
722
+ const glyph = mdiGlyph(icon);
723
+ if (!glyph) return void 0;
724
+ return html`<span class=${`mono-file-upload-iconify ${icon}`} mono-glyph aria-hidden="true">
725
+ ${glyph}
726
+ </span>`;
727
+ }
728
+ };
729
+ MonoFileUploadShadow = __decorate([customElement("mono-shadow-file-upload")], MonoFileUploadShadow);
730
+ //#endregion
731
+ export { MonoFileUploadCore, MonoFileUploadShadow, createUploadItem, formatFileSize, getFileIcon, validateFileUploadProps };