@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,1620 @@
1
+ import { a as __decorate, c as defineHybridPropAlias, d as optionalNumberConverter, f as customElement, i as withShadowUtilityStyles, l as defineHybridPropAliases, r as toShadowCss, s as booleanStringConverter, t as flushSsrHydration, u as numberStringConverter, v as monoPendingGrace } from "../../hydration-flush-RB5Tz5nl.js";
2
+ import { t as dispatchMonoEvent } from "../../mono-event-Bi1qP9uN.js";
3
+ import { n as toCssSize, t as buildSizeStyle } from "../../css-size-DhHSVZJK.js";
4
+ import { n as detachEventHandlers, t as applyProps } from "../../element-props-CLB6yvbm.js";
5
+ import { t as MonoFormControlCore } from "../../form-control-core-B8d7k6vk.js";
6
+ import { n as applyPopupPlacement, r as computePopupPlacement, t as PopupPortalController } from "../../popup-portal-BziRX1yG.js";
7
+ import { t as createNotifier } from "../../notifier-CE4yxMUQ.js";
8
+ import { t as monoDataGrid } from "../../mono-data-grid-CLBK8clE.js";
9
+ import { n as resolveChipLimit, r as visibleChipCap, t as ChipStripController } from "../../chip-strip-Cw3gyz0q.js";
10
+ import { n as chevronIcon, r as closeIcon, t as caretIcon } from "../../field-icons-BoOG6KrL.js";
11
+ import { LitElement, html, isServer, nothing, unsafeCSS } from "lit";
12
+ import { property } from "lit/decorators.js";
13
+ import { ifDefined } from "lit/directives/if-defined.js";
14
+ import { styleMap } from "lit/directives/style-map.js";
15
+ //#region src/components/dropdown-table/dropdown-table-core.ts
16
+ /** Sentinel so an initial `model-value === our last emit` guard never matches by accident. */
17
+ var SYMBOL_INIT = Symbol("init");
18
+ /**
19
+ * `MonoDropdownTableCore` — the field + popup shell for `<mono-dropdown-table>`. The
20
+ * FIELD mirrors `<mono-select>` (same size/color/variant/validation/label props and
21
+ * an identical look); the selection/value/display magic lives in the bound
22
+ * {@link MonoDropdownController} (`monoDataDropdown`). The consumer's native `<table>`
23
+ * + `mono-table-*` are slotted into the body-portaled panel; row clicks delegate to
24
+ * `dd.toggleRow`. The panel is sized independently of the field via the `dropdown`
25
+ * object (`matchWidth` is intentionally off). Reuses `PopupPortalController`,
26
+ * `buildSizeStyle`, and the global `.mono-chip` classes.
27
+ */
28
+ var MonoDropdownTableCore = (superClass) => {
29
+ class MonoDropdownTableCoreClass extends MonoFormControlCore(superClass) {
30
+ static {
31
+ this.monoPendingAuto = "data";
32
+ }
33
+ _monoPendingReady() {
34
+ const grid = this._dd?.grid;
35
+ if (!grid) return monoPendingGrace(this);
36
+ if (grid.hasLoaded || grid.error) return true;
37
+ return monoPendingGrace(this) && !grid.loading;
38
+ }
39
+ constructor(...args) {
40
+ super(...args);
41
+ this.size = "md";
42
+ this.color = "primary";
43
+ this.variant = "outlined";
44
+ this.label = "";
45
+ this.placeholder = "Select…";
46
+ this.helperText = "";
47
+ this.validationState = "default";
48
+ this.validationMessage = "";
49
+ this.errorMessage = "";
50
+ this.successMessage = "";
51
+ this.required = false;
52
+ this.disabled = false;
53
+ this.readonly = false;
54
+ this.clearable = false;
55
+ this.multiple = false;
56
+ this.maxVisible = 5;
57
+ this.chip = {};
58
+ this.modelValue = void 0;
59
+ this.placement = "bottom-start";
60
+ this.flip = true;
61
+ this.shift = true;
62
+ this.offset = 6;
63
+ this.autoFocusSearch = true;
64
+ this.stayOpen = false;
65
+ this.cssClass = {};
66
+ this.cssClassName = "";
67
+ this._moreOpen = false;
68
+ this._resolvedSide = "bottom";
69
+ this._lastEmitted = SYMBOL_INIT;
70
+ this._chipStrip = new ChipStripController(this, {
71
+ strip: () => this.renderRoot?.querySelector(".mono-dropdown-table-chip-strip"),
72
+ enabled: () => this._inlineChips
73
+ });
74
+ this._popup = new PopupPortalController(this, {
75
+ getPanel: () => this.renderRoot.querySelector(".mono-dropdown-table-panel"),
76
+ getAnchor: () => this.renderRoot.querySelector(".mono-dropdown-table-trigger"),
77
+ getStyleScope: () => this.renderRoot.querySelector(".mono-dropdown-table"),
78
+ isOpen: () => this._isOpen,
79
+ matchWidth: false,
80
+ ...this._placementOpts(),
81
+ onSideResolved: (side) => {
82
+ this._resolvedSide = side;
83
+ this._applySideClass();
84
+ }
85
+ });
86
+ this._morePopup = new PopupPortalController(this, {
87
+ getPanel: () => this.renderRoot.querySelector(".mono-dropdown-table-more"),
88
+ getAnchor: () => this.renderRoot.querySelector(".mono-dropdown-table-more-chip"),
89
+ getStyleScope: () => this.renderRoot.querySelector(".mono-dropdown-table"),
90
+ isOpen: () => this._moreOpen,
91
+ matchWidth: false,
92
+ ...this._morePlacementOpts()
93
+ });
94
+ this._ddPropsQueued = false;
95
+ this._onTriggerKeydown = (e) => {
96
+ if (e.key === "Enter" || e.key === " " || e.key === "ArrowDown") {
97
+ e.preventDefault();
98
+ this.open();
99
+ } else if (e.key === "Escape" && this._isOpen) {
100
+ e.preventDefault();
101
+ this.close();
102
+ }
103
+ };
104
+ this._onDocPointer = (e) => {
105
+ if (this.stayOpen) return;
106
+ if (!this._isOpen && !this._moreOpen) return;
107
+ const path = e.composedPath();
108
+ if (path.includes(this)) return;
109
+ if (this._popup.containsInPath(path)) return;
110
+ if (this._morePopup.containsInPath(path)) return;
111
+ this.close();
112
+ };
113
+ this._onDocKey = (e) => {
114
+ if (e.key !== "Escape") return;
115
+ if (!this._isOpen && !this._moreOpen) return;
116
+ if (this._popup.ownsNestedInPath(e.composedPath())) return;
117
+ this.close();
118
+ };
119
+ this._onPanelClick = (e) => {
120
+ if (this.disabled || this.readonly) return;
121
+ const path = e.composedPath();
122
+ if (path.some((n) => n?.matches?.("mono-table-checkbox, mono-shadow-table-checkbox, mono-checkbox, mono-shadow-checkbox, .mono-checkbox, input, button, a, select, textarea"))) return;
123
+ const row = path.find((n) => n?.matches?.("[data-row-key]"));
124
+ if (!row) return;
125
+ const key = row.getAttribute("data-row-key");
126
+ if (key == null) return;
127
+ this._activeRowKey = key;
128
+ this._focusZone = "list";
129
+ this._dd?.toggleRow(key);
130
+ this._reflectSelection();
131
+ };
132
+ this._onViewportChange = () => {
133
+ if (this._isOpen) this._positionPanel();
134
+ if (this._moreOpen) this._positionMorePanel();
135
+ };
136
+ this._wasOpen = false;
137
+ this._lastSelectedCount = 0;
138
+ this._searchFocused = false;
139
+ this._focusZone = "search";
140
+ this._activeRowKey = null;
141
+ this._panelTabHeld = false;
142
+ this._panelTabConsumed = false;
143
+ this._onPanelKeydown = (e) => {
144
+ if (this.disabled || this.readonly || !this._isOpen) return;
145
+ if (e.key === "Tab") {
146
+ if (!this._searchEl()) return;
147
+ e.preventDefault();
148
+ if (!e.repeat) {
149
+ this._panelTabHeld = true;
150
+ this._panelTabConsumed = false;
151
+ }
152
+ return;
153
+ }
154
+ if (this._panelTabHeld && (e.key === "ArrowDown" || e.key === "ArrowUp")) {
155
+ e.preventDefault();
156
+ this._panelTabConsumed = true;
157
+ if (e.key === "ArrowDown") this._enterList();
158
+ else this._enterSearch();
159
+ return;
160
+ }
161
+ if (e.key === "ArrowDown" || e.key === "ArrowUp") {
162
+ if (this._focusZone !== "list") return;
163
+ e.preventDefault();
164
+ this._moveActiveRow(e.key === "ArrowDown" ? 1 : -1);
165
+ return;
166
+ }
167
+ if (e.key === "Enter" && this._focusZone === "list") {
168
+ e.preventDefault();
169
+ this._selectActiveRow();
170
+ }
171
+ };
172
+ this._onPanelKeyup = (e) => {
173
+ if (e.key !== "Tab" || !this._panelTabHeld) return;
174
+ this._panelTabHeld = false;
175
+ if (this._panelTabConsumed) return;
176
+ if (this._focusZone === "search") this._enterList();
177
+ else this._enterSearch();
178
+ };
179
+ defineHybridPropAliases(this, [
180
+ "dataDropdown",
181
+ "modelValue",
182
+ "cssClass",
183
+ "autoFocusSearch",
184
+ "stayOpen",
185
+ "maxVisible",
186
+ "minVisible"
187
+ ]);
188
+ defineHybridPropAlias(this, "controlDataDropdown", "dataDropdown");
189
+ for (const alias of ["css-class", "cssclass"]) Object.defineProperty(this, alias, {
190
+ get: () => this.cssClass,
191
+ set: (value) => this._setCssClass(value),
192
+ configurable: true,
193
+ enumerable: false
194
+ });
195
+ }
196
+ /** Normalize an object | JSON string | plain-string `css-class` value. */
197
+ _setCssClass(value) {
198
+ if (value == null) {
199
+ this.cssClass = {};
200
+ this.cssClassName = "";
201
+ return;
202
+ }
203
+ if (typeof value === "object") {
204
+ this.cssClass = value;
205
+ return;
206
+ }
207
+ if (typeof value === "string") {
208
+ const trimmed = value.trim();
209
+ if (!trimmed) {
210
+ this.cssClass = {};
211
+ this.cssClassName = "";
212
+ return;
213
+ }
214
+ if (trimmed.startsWith("{") && trimmed.endsWith("}")) try {
215
+ this.cssClass = JSON.parse(trimmed);
216
+ return;
217
+ } catch {}
218
+ this.cssClassName = trimmed;
219
+ }
220
+ }
221
+ /** Append the consumer's per-part override to a built-in class. */
222
+ _cls(base, key) {
223
+ const extra = this.cssClass?.[key];
224
+ return extra ? `${base} ${extra}` : base;
225
+ }
226
+ /**
227
+ * `chip` is an object prop, so the real binding is `:chip.prop="{…}"`. This
228
+ * covers the two ways a *string* can arrive: a hand-written JSON attribute
229
+ * (`chip='{"size":"md"}'`, incl. DSD/SSR), and Vue's `String(value)` mirror
230
+ * of a plain `:chip="{…}"` binding — which yields `"[object Object]"` and
231
+ * must be ignored, or it would wipe the property set moments later.
232
+ */
233
+ _setChip(value) {
234
+ if (value == null) {
235
+ this.chip = {};
236
+ return;
237
+ }
238
+ if (typeof value === "object") {
239
+ this.chip = value;
240
+ return;
241
+ }
242
+ if (typeof value !== "string") return;
243
+ const trimmed = value.trim();
244
+ if (!trimmed) {
245
+ this.chip = {};
246
+ return;
247
+ }
248
+ if (!trimmed.startsWith("{") || !trimmed.endsWith("}")) return;
249
+ try {
250
+ this.chip = JSON.parse(trimmed);
251
+ } catch {}
252
+ }
253
+ static get observedAttributes() {
254
+ return [
255
+ ...super.observedAttributes ?? [],
256
+ "css-class",
257
+ "cssclass",
258
+ "chip"
259
+ ];
260
+ }
261
+ attributeChangedCallback(name, old, value) {
262
+ super.attributeChangedCallback(name, old, value);
263
+ if (name === "css-class" || name === "cssclass") this._setCssClass(value);
264
+ if (name === "chip") this._setChip(value);
265
+ }
266
+ /** Imperatively sync the `is-<side>` class — see `_resolvedSide`. */
267
+ _applySideClass() {
268
+ const root = this.renderRoot.querySelector(".mono-dropdown-table");
269
+ if (!root) return;
270
+ root.classList.toggle("is-top", this._resolvedSide === "top");
271
+ root.classList.toggle("is-bottom", this._resolvedSide === "bottom");
272
+ root.classList.toggle("is-left", this._resolvedSide === "left");
273
+ root.classList.toggle("is-right", this._resolvedSide === "right");
274
+ if (root.getAttribute("mono-side") !== this._resolvedSide) root.setAttribute("mono-side", this._resolvedSide);
275
+ }
276
+ /** Shared by the light path (the controller) and the shadow path (`_positionMorePanel`). */
277
+ _morePlacementOpts() {
278
+ return {
279
+ side: () => "bottom",
280
+ align: () => "start",
281
+ offset: () => 4,
282
+ flip: () => true,
283
+ shift: () => true,
284
+ constrainSize: () => true
285
+ };
286
+ }
287
+ /**
288
+ * Placement options shared by the light path (the controller) and the shadow
289
+ * path (`_positionPanel`), so both run the identical algorithm.
290
+ *
291
+ * `constrainSize` is on: a field low in a dense grid can have less room than
292
+ * the panel wants on BOTH sides, so flipping alone isn't enough — the panel
293
+ * also has to shrink and scroll internally (see dropdown-table.css).
294
+ */
295
+ _placementOpts() {
296
+ return {
297
+ side: () => this._sideFromPlacement(this.placement),
298
+ align: () => this._alignFromPlacement(this.placement),
299
+ offset: () => this.offset,
300
+ flip: () => this.flip,
301
+ shift: () => this.shift,
302
+ constrainSize: () => true
303
+ };
304
+ }
305
+ _sideFromPlacement(p) {
306
+ if (p.startsWith("top")) return "top";
307
+ if (p.startsWith("left")) return "left";
308
+ if (p.startsWith("right")) return "right";
309
+ return "bottom";
310
+ }
311
+ _alignFromPlacement(p) {
312
+ if (p.endsWith("-start")) return "start";
313
+ if (p.endsWith("-end")) return "end";
314
+ return "center";
315
+ }
316
+ get _dd() {
317
+ return this.dataDropdown;
318
+ }
319
+ get _isOpen() {
320
+ return !!this._dd?.open;
321
+ }
322
+ get _multi() {
323
+ return this.multiple || !!this._dd?.multiple;
324
+ }
325
+ get _hasValue() {
326
+ const v = this._dd?.value;
327
+ return this._multi ? Array.isArray(v) && v.length > 0 : v != null;
328
+ }
329
+ /** Resolve the effective validation state (message props force it). */
330
+ get _validationState() {
331
+ if (this.validationState && this.validationState !== "default") return this.validationState;
332
+ if (this.errorMessage) return "invalid";
333
+ if (this.successMessage) return "valid";
334
+ return "default";
335
+ }
336
+ get _wrapperClasses() {
337
+ const v = this._validationState;
338
+ return [
339
+ "mono-dropdown-table",
340
+ this.size,
341
+ this.color,
342
+ this.variant,
343
+ `is-${this._resolvedSide}`,
344
+ this._isOpen ? "open" : "",
345
+ this._moreOpen ? "more-open" : "",
346
+ this.disabled ? "disabled" : "",
347
+ this.readonly ? "readonly" : "",
348
+ v !== "default" ? `is-${v}` : "",
349
+ this._hasValue ? "has-value" : "",
350
+ this._multi ? "multiple" : "",
351
+ this.cssClassName,
352
+ this.cssClass?.root
353
+ ].filter(Boolean).join(" ");
354
+ }
355
+ get _triggerClasses() {
356
+ return [
357
+ "mono-dropdown-table-trigger",
358
+ this.size,
359
+ this.color,
360
+ this.variant,
361
+ this.disabled ? "disabled" : "",
362
+ this.readonly ? "readonly" : "",
363
+ this.cssClass?.trigger
364
+ ].filter(Boolean).join(" ");
365
+ }
366
+ connectedCallback() {
367
+ super.connectedCallback();
368
+ this._subscribe();
369
+ this._wireDropdown();
370
+ if (!isServer) {
371
+ document.addEventListener("pointerdown", this._onDocPointer, true);
372
+ document.addEventListener("keydown", this._onDocKey, true);
373
+ if (this._isShadowHost) {
374
+ window.addEventListener("scroll", this._onViewportChange, true);
375
+ window.addEventListener("resize", this._onViewportChange);
376
+ }
377
+ }
378
+ }
379
+ disconnectedCallback() {
380
+ this._off?.();
381
+ this._off = void 0;
382
+ this._panelObserver?.disconnect();
383
+ this._panelObserver = void 0;
384
+ if (this._dropdownWired) this._dropdownWired.onValueChange = null;
385
+ if (!isServer) {
386
+ document.removeEventListener("pointerdown", this._onDocPointer, true);
387
+ document.removeEventListener("keydown", this._onDocKey, true);
388
+ window.removeEventListener("scroll", this._onViewportChange, true);
389
+ window.removeEventListener("resize", this._onViewportChange);
390
+ }
391
+ super.disconnectedCallback();
392
+ }
393
+ willUpdate(changed) {
394
+ if (changed.has("dataDropdown")) {
395
+ this._subscribe();
396
+ this._wireDropdown();
397
+ }
398
+ if (changed.has("modelValue")) this._pushModelToDd();
399
+ if (changed.has("dataDropdown") || changed.has("max") || changed.has("min") || changed.has("chip")) this._pushLimits();
400
+ super.willUpdate?.(changed);
401
+ }
402
+ /**
403
+ * Second entry point for the props apply. `MonoFormControlCore` (composed
404
+ * below this core) also overrides `update`, so chain `super`.
405
+ */
406
+ update(changed) {
407
+ this._scheduleApplyDropdownProps();
408
+ super.update(changed);
409
+ }
410
+ _subscribe() {
411
+ this._off?.();
412
+ detachEventHandlers(this);
413
+ this._off = this._dd?.subscribe(() => {
414
+ this._scheduleApplyDropdownProps();
415
+ this.requestUpdate();
416
+ });
417
+ this._scheduleApplyDropdownProps();
418
+ }
419
+ /**
420
+ * Deferred + de-duplicated, and driven from `update()` as well as
421
+ * `_subscribe()` — the same belt-and-braces the table base needed once two
422
+ * cores were found replacing `_subscribe` without chaining `super`. The
423
+ * deferral keeps the reactive writes out of the update cycle, so they can't
424
+ * trip Lit's change-in-update warning.
425
+ */
426
+ _scheduleApplyDropdownProps() {
427
+ if (this._ddPropsQueued) return;
428
+ if (typeof queueMicrotask !== "function") {
429
+ this._applyDropdownProps();
430
+ return;
431
+ }
432
+ this._ddPropsQueued = true;
433
+ queueMicrotask(() => {
434
+ this._ddPropsQueued = false;
435
+ this._applyDropdownProps();
436
+ });
437
+ }
438
+ /**
439
+ * Pull `monoDataDropdown({ props: { dropdownTable } })` onto this element, so
440
+ * the field needs nothing but `:data-dropdown.prop`. The CONTROLLER WINS for
441
+ * keys it declares; the rest stay with the template.
442
+ */
443
+ _applyDropdownProps() {
444
+ const dd = this._dd;
445
+ if (!dd?.props) return;
446
+ applyProps(this, dd.props().dropdownTable);
447
+ }
448
+ _wireDropdown() {
449
+ const dd = this._dd;
450
+ if (this._dropdownWired && this._dropdownWired !== dd) this._dropdownWired.onValueChange = null;
451
+ this._dropdownWired = dd;
452
+ if (!dd) return;
453
+ dd.onValueChange = (v) => {
454
+ this._lastEmitted = v;
455
+ this.modelValue = v;
456
+ this._emitChange(v);
457
+ };
458
+ this._pushModelToDd();
459
+ }
460
+ /**
461
+ * The selection limits the element asks for: `chip.max` / `chip.min` pin,
462
+ * `max` / `min` are the fallback, and `undefined` leaves the controller's own
463
+ * option in force. They are ENFORCED by the controller's check store (the one
464
+ * place a row click, the keyboard, a `<mono-table-checkbox>` and the
465
+ * select-all drain all go through), so the element only forwards them.
466
+ */
467
+ _pushLimits() {
468
+ const chip = this._chipProps;
469
+ this._dd?.setLimits({
470
+ max: resolveChipLimit(chip, "max", this.max),
471
+ min: resolveChipLimit(chip, "min", this.min)
472
+ });
473
+ }
474
+ /** Push an external `model-value` into the controller (guarding our own echo). */
475
+ _pushModelToDd() {
476
+ const dd = this._dd;
477
+ if (!dd || this.modelValue === void 0) return;
478
+ if (this._sameValue(this.modelValue, this._lastEmitted)) return;
479
+ if (this._sameValue(this.modelValue, dd.value)) return;
480
+ dd.setValue(this.modelValue);
481
+ }
482
+ _sameValue(a, b) {
483
+ if (a === b) return true;
484
+ if (Array.isArray(a) && Array.isArray(b)) return a.length === b.length && a.every((x, i) => String(x) === String(b[i]));
485
+ return String(a) === String(b);
486
+ }
487
+ _emitChange(value) {
488
+ const detail = {
489
+ modelValue: value,
490
+ value,
491
+ selectedItems: this._dd?.selectedItems() ?? []
492
+ };
493
+ dispatchMonoEvent(this, "change", detail);
494
+ }
495
+ /** Whether the panel is currently open. */
496
+ get isOpen() {
497
+ return this._isOpen;
498
+ }
499
+ open() {
500
+ if (this.disabled || this.readonly) return;
501
+ this._dd?.setOpen(true);
502
+ }
503
+ close() {
504
+ this._moreOpen = false;
505
+ this._dd?.setOpen(false);
506
+ this.requestUpdate();
507
+ }
508
+ toggle() {
509
+ if (this.disabled || this.readonly) return;
510
+ this._moreOpen = false;
511
+ this._dd?.setOpen(!this._isOpen);
512
+ }
513
+ /**
514
+ * Where the `[data-row-key]` rows live: light = the captured table inside the
515
+ * (portaled) panel; shadow = the SLOTTED table (host's light-DOM children).
516
+ */
517
+ get _rowScope() {
518
+ return this.renderRoot === this ? this._popup.panelRoot : this;
519
+ }
520
+ _reflectSelection() {
521
+ const dd = this._dd;
522
+ const root = this._rowScope;
523
+ if (!dd || !root?.querySelectorAll) return;
524
+ const rows = Array.from(root.querySelectorAll("[data-row-key]"));
525
+ if ((this._focusZone === "list" || this._activeRowKey != null) && rows.length && !rows.some((el) => el.getAttribute("data-row-key") === this._activeRowKey)) this._activeRowKey = rows[0].getAttribute("data-row-key");
526
+ rows.forEach((el) => {
527
+ const key = el.getAttribute("data-row-key");
528
+ const on = key != null && dd.isSelected(key);
529
+ const active = key != null && key === this._activeRowKey;
530
+ el.classList.toggle("mono-dd-row-selected", on);
531
+ el.classList.toggle("mono-dd-row-active", active);
532
+ el.toggleAttribute("mono-selected", on);
533
+ el.toggleAttribute("mono-dd-selected", on);
534
+ el.toggleAttribute("mono-dd-active", active);
535
+ if (on) el.setAttribute("aria-selected", "true");
536
+ else el.removeAttribute("aria-selected");
537
+ });
538
+ }
539
+ /** Re-reflect after the consumer's Vue re-renders rows (paging/search). */
540
+ _observePanel() {
541
+ const root = this._rowScope;
542
+ if (!root || this._panelObserver) return;
543
+ this._panelObserver = new MutationObserver(() => this._reflectSelection());
544
+ this._panelObserver.observe(root, {
545
+ childList: true,
546
+ subtree: true
547
+ });
548
+ }
549
+ /** True for the shadow build — a shadow host keeps its panel in the shadow root. */
550
+ get _isShadowHost() {
551
+ return this.renderRoot !== this;
552
+ }
553
+ /**
554
+ * Position the panel for the SHADOW build (renderRoot ≠ this): the popup
555
+ * controller only portals/positions LIGHT hosts (`_canPortal`), so a shadow
556
+ * host places its own `position:fixed` panel. It runs the SAME shared math as
557
+ * the light path — flip, shift and size-constrain included. Light is untouched.
558
+ */
559
+ _positionPanel() {
560
+ if (isServer || !this._isShadowHost) return;
561
+ if (!this._isOpen) return;
562
+ const root = this.renderRoot;
563
+ const panel = root.querySelector(".mono-dropdown-table-panel");
564
+ const anchor = root.querySelector(".mono-dropdown-table-trigger");
565
+ if (!panel || !anchor) return;
566
+ const o = this._placementOpts();
567
+ const placement = computePopupPlacement(anchor, panel, {
568
+ side: o.side(),
569
+ align: o.align(),
570
+ offset: o.offset(),
571
+ flip: o.flip(),
572
+ shift: o.shift(),
573
+ constrain: true
574
+ });
575
+ applyPopupPlacement(panel, placement, true);
576
+ this._resolvedSide = placement.side;
577
+ this._applySideClass();
578
+ }
579
+ /** The shadow build's in-place placement of the "+N more" panel — see `_positionPanel`. */
580
+ _positionMorePanel() {
581
+ if (isServer || !this._isShadowHost) return;
582
+ if (!this._moreOpen) return;
583
+ const root = this.renderRoot;
584
+ const panel = root.querySelector(".mono-dropdown-table-more");
585
+ const anchor = root.querySelector(".mono-dropdown-table-more-chip");
586
+ if (!panel || !anchor) return;
587
+ const o = this._morePlacementOpts();
588
+ applyPopupPlacement(panel, computePopupPlacement(anchor, panel, {
589
+ side: o.side(),
590
+ align: o.align(),
591
+ offset: o.offset(),
592
+ flip: o.flip(),
593
+ shift: o.shift(),
594
+ constrain: true
595
+ }), true);
596
+ }
597
+ updated(changed) {
598
+ super.updated(changed);
599
+ if (isServer) return;
600
+ if (this._isOpen) {
601
+ this._observePanel();
602
+ this._reflectSelection();
603
+ this._positionPanel();
604
+ } else {
605
+ this._panelObserver?.disconnect();
606
+ this._panelObserver = void 0;
607
+ }
608
+ if (this._moreOpen) if (!this._overflowItems(this._dd?.selectedItems() ?? []).length) {
609
+ this._moreOpen = false;
610
+ this.requestUpdate();
611
+ } else this._positionMorePanel();
612
+ const selectedCount = this._dd?.selectedItems?.()?.length ?? 0;
613
+ const capChanged = changed.has("maxVisible") || changed.has("minVisible") || changed.has("chip");
614
+ if (selectedCount !== this._lastSelectedCount) if (this._isOpen && selectedCount > this._lastSelectedCount && this._inlineChips) this._chipStrip.scrollToEnd();
615
+ else this._chipStrip.invalidate();
616
+ else if (capChanged) this._chipStrip.invalidate();
617
+ this._lastSelectedCount = selectedCount;
618
+ if (this._isOpen !== this._wasOpen) {
619
+ this._wasOpen = this._isOpen;
620
+ if (this._isOpen) this._initPanelFocus();
621
+ else {
622
+ this._activeRowKey = null;
623
+ this._focusZone = "search";
624
+ this._panelTabHeld = false;
625
+ this._restoreTriggerFocus();
626
+ }
627
+ }
628
+ }
629
+ /** The focusable trigger (`tabindex=0`), in both builds. */
630
+ _triggerElement() {
631
+ return this.renderRoot.querySelector(".mono-dropdown-table-trigger");
632
+ }
633
+ /**
634
+ * Delegate focus to the trigger — the host itself isn't focusable. Needed by
635
+ * anything that focuses the component from outside, e.g. the data grid
636
+ * focusing the editor in a clicked cell (`focusRowCell`), which looks for an
637
+ * inner `input/textarea/select/button` and otherwise falls back to calling
638
+ * `focus()` on the element itself.
639
+ */
640
+ focus(options) {
641
+ this._triggerElement()?.focus(options);
642
+ }
643
+ blur() {
644
+ this._triggerElement()?.blur();
645
+ }
646
+ /** The search region's slotted content — light: captured nodes; shadow: `<slot>`. */
647
+ _searchRegionElements() {
648
+ if (this._isShadowHost) {
649
+ const slot = this.renderRoot.querySelector("slot[name=\"search\"]");
650
+ return slot ? slot.assignedElements({ flatten: true }) : [];
651
+ }
652
+ const sel = "[data-mono-slot=\"search\"]";
653
+ const region = this.querySelector(sel) ?? this._popup.panelRoot?.querySelector?.(sel);
654
+ return region ? Array.from(region.children) : [];
655
+ }
656
+ /**
657
+ * Focus the panel's search box once the panel is rendered, placed and (light
658
+ * build) portaled. Deferred a microtask so a slotted element that hasn't
659
+ * rendered its input yet gets a chance to — `updateComplete` on the search
660
+ * element itself, since it updates independently of this host.
661
+ */
662
+ /**
663
+ * The element to focus for "the search box", or null when the panel has no
664
+ * search region. `mono-table-search` / `mono-shadow-table-search` expose
665
+ * `focus()` and delegate to their own input, so neither build needs a DOM
666
+ * reach-in; anything else slotted in its place falls back to its first field.
667
+ */
668
+ _searchEl() {
669
+ for (const el of this._searchRegionElements()) {
670
+ if (el.matches("mono-table-search, mono-shadow-table-search")) return el;
671
+ const sel = "input:not([type=\"hidden\"]), textarea, select";
672
+ const field = el.matches(sel) ? el : el.querySelector(sel) ?? el.shadowRoot?.querySelector(sel);
673
+ if (field) return field;
674
+ }
675
+ return null;
676
+ }
677
+ async _focusSearch() {
678
+ await this.updateComplete;
679
+ if (!this._isOpen) return;
680
+ const el = this._searchEl();
681
+ if (!el) return;
682
+ const pending = el.updateComplete;
683
+ if (pending) await pending;
684
+ if (!this._isOpen) return;
685
+ el.focus({ preventScroll: true });
686
+ this._focusZone = "search";
687
+ this._searchFocused = true;
688
+ }
689
+ _rowEls() {
690
+ const root = this._rowScope;
691
+ if (!root?.querySelectorAll) return [];
692
+ return Array.from(root.querySelectorAll("[data-row-key]"));
693
+ }
694
+ _panelEl() {
695
+ return (this._popup.panelRoot ?? this.renderRoot)?.querySelector?.(".mono-dropdown-table-panel") ?? null;
696
+ }
697
+ _setActiveRow(key, reveal = false) {
698
+ this._activeRowKey = key;
699
+ this._reflectSelection();
700
+ if (!reveal || key == null) return;
701
+ this._rowEls().find((r) => r.getAttribute("data-row-key") === key)?.scrollIntoView?.({ block: "nearest" });
702
+ }
703
+ _moveActiveRow(delta) {
704
+ const keys = this._rowEls().map((r) => r.getAttribute("data-row-key") ?? "");
705
+ if (!keys.length) return;
706
+ const i = this._activeRowKey == null ? -1 : keys.indexOf(this._activeRowKey);
707
+ const next = i < 0 ? delta > 0 ? 0 : keys.length - 1 : Math.min(Math.max(i + delta, 0), keys.length - 1);
708
+ this._setActiveRow(keys[next], true);
709
+ }
710
+ /** Move the keyboard into the row list, highlighting the first row. */
711
+ _enterList() {
712
+ this._focusZone = "list";
713
+ if (this._activeRowKey == null) this._setActiveRow(this._rowEls()[0]?.getAttribute("data-row-key") ?? null, true);
714
+ this._panelEl()?.focus({ preventScroll: true });
715
+ }
716
+ /** Move the keyboard back to the search box (no-op when there isn't one). */
717
+ _enterSearch() {
718
+ const el = this._searchEl();
719
+ if (!el) return;
720
+ this._focusZone = "search";
721
+ el.focus({ preventScroll: true });
722
+ }
723
+ _selectActiveRow() {
724
+ if (this._activeRowKey == null) return;
725
+ this._dd?.toggleRow(this._activeRowKey);
726
+ this._reflectSelection();
727
+ }
728
+ /**
729
+ * Where the keyboard starts when the panel opens: the search box if there is
730
+ * one, otherwise straight into the list with the first row highlighted.
731
+ */
732
+ async _initPanelFocus() {
733
+ await this.updateComplete;
734
+ if (!this._isOpen) return;
735
+ const selected = this._dd?.selectedItems?.() ?? [];
736
+ if (selected.length) this._setActiveRow(String(selected[selected.length - 1].key), true);
737
+ if (this._searchEl()) {
738
+ this._focusZone = "search";
739
+ if (this.autoFocusSearch) this._focusSearch();
740
+ return;
741
+ }
742
+ this._enterList();
743
+ }
744
+ /**
745
+ * Hand focus back to the trigger when a panel that HAD focus closes — hiding
746
+ * the panel blurs its input to `<body>`, which would otherwise strand the
747
+ * keyboard. Covers every close path (Escape, outside pointerdown, a
748
+ * controller-driven auto-close after a single-select pick) because it hangs
749
+ * off the state edge rather than off `close()`.
750
+ */
751
+ _restoreTriggerFocus() {
752
+ if (!this._searchFocused) return;
753
+ this._searchFocused = false;
754
+ const active = document.activeElement;
755
+ const panel = this._popup.panelRoot?.querySelector?.(".mono-dropdown-table-panel");
756
+ if (!(!active || active === document.body || this.contains(active) || !!panel?.contains(active))) return;
757
+ this.focus({ preventScroll: true });
758
+ }
759
+ /** A panel region — light: a `data-mono-slot` capture target; shadow overrides with `<slot>`. */
760
+ _renderRegion(cls, name) {
761
+ return html`<div class="mono-dropdown-table-region ${cls}" mono-dd-region=${cls} data-mono-slot="${name}"></div>`;
762
+ }
763
+ _caretIcon() {
764
+ return caretIcon();
765
+ }
766
+ _chevronIcon(dir) {
767
+ return chevronIcon(dir);
768
+ }
769
+ /**
770
+ * One scroll button. `active` false keeps the box — and therefore the row's
771
+ * width — but hides it (`is-idle` → `visibility: hidden`), so reaching an end
772
+ * of the strip costs no layout. `aria-hidden` keeps the hidden one out of
773
+ * reach of assistive tech; `pointer-events: none` handles the pointer.
774
+ */
775
+ _renderScrollButton(dir, active) {
776
+ const back = dir === -1;
777
+ const base = `mono-dropdown-table-scroll mono-dropdown-table-scroll-${back ? "prev" : "next"}${active ? "" : " is-idle"}`;
778
+ return html`<span
779
+ role="button"
780
+ tabindex="-1"
781
+ class=${this._cls(base, back ? "scrollPrev" : "scrollNext")}
782
+ mono-dd-scroll=${back ? "prev" : "next"}
783
+ ?mono-idle=${!active}
784
+ aria-label=${back ? "Scroll selection backward" : "Scroll selection forward"}
785
+ aria-hidden=${active ? "false" : "true"}
786
+ @mousedown=${(e) => e.preventDefault()}
787
+ @click=${(e) => {
788
+ e.stopPropagation();
789
+ this._chipStrip.page(dir);
790
+ }}
791
+ >${this._chevronIcon(dir)}</span
792
+ >`;
793
+ }
794
+ /** The `chip` prop, always an object (it can be assigned null from a binding). */
795
+ get _chipProps() {
796
+ return this.chip ?? {};
797
+ }
798
+ /** Chip layout: `inline` = one scrolling line, anything else = today's wrap. */
799
+ get _chipBehaviour() {
800
+ return this._chipProps.behaviour === "inline" ? "inline" : "flex";
801
+ }
802
+ /** True where a scrolling strip actually renders: multi, inline, with chips. */
803
+ get _inlineChips() {
804
+ return this._multi && this._hasValue && this._chipBehaviour === "inline";
805
+ }
806
+ /**
807
+ * How many chips to draw for `total` selected rows before the rest collapse
808
+ * into "+N more" — Infinity when uncapped or under the collapse floor.
809
+ * `chip.maxVisible` / `chip.minVisible` pin, the element props are the
810
+ * fallback (`resolveChipLimit`). Applies to `inline` as well: the "+N more"
811
+ * chip then sits in the strip after the visible ones and its panel lists the
812
+ * rest, exactly as in `flex`.
813
+ */
814
+ _visibleCap(total) {
815
+ const chip = this._chipProps;
816
+ return visibleChipCap(total, resolveChipLimit(chip, "maxVisible", this.maxVisible), resolveChipLimit(chip, "minVisible", this.minVisible));
817
+ }
818
+ /** The selection floor in force (element / chip / controller), 0 when none. */
819
+ get _minSelected() {
820
+ return this._dd?.limits().min ?? 0;
821
+ }
822
+ /** A chip can be removed while the selection sits above its floor. */
823
+ get _canRemove() {
824
+ return (this._dd?.selectedItems?.()?.length ?? 0) > this._minSelected;
825
+ }
826
+ /**
827
+ * Chip skin matching the field skin: a `filled` field already tints its own
828
+ * surface, so a soft chip would vanish into it — go solid; `underlined` is
829
+ * minimal, so the chip stays outline. `chip.variant` pins one instead.
830
+ */
831
+ get _chipVariantClass() {
832
+ const pinned = this._chipProps.variant;
833
+ if (pinned) return pinned;
834
+ if (this.variant === "filled") return "solid";
835
+ if (this.variant === "underlined") return "outline";
836
+ return "soft";
837
+ }
838
+ /** Chips wear the control's color unless `chip.color` pins another. */
839
+ get _chipColorClass() {
840
+ return this._chipProps.color ?? this.color;
841
+ }
842
+ /**
843
+ * Classes shared by the selection chips and the "+N more" chip, in
844
+ * `mono-chip`'s own order (`mono-chip <size> <variant>-<color> <shape>`), so
845
+ * chip.css paints them exactly as it paints a real `<mono-chip>`.
846
+ *
847
+ * `mono-dropdown-table-chip` is a marker only — it scopes the `--mono-chip-*`
848
+ * bridge in dropdown-table.css so the bridge never reaches a `<mono-chip>` a
849
+ * consumer slots into the panel. `chip.color` deliberately picks a hue OTHER
850
+ * than the control accent, so it adds the `-pinned` marker that switches the
851
+ * bridge back off.
852
+ */
853
+ get _chipBaseClasses() {
854
+ const chip = this._chipProps;
855
+ return [
856
+ "mono-dropdown-table-chip",
857
+ chip.color ? "mono-dropdown-table-chip-pinned" : "",
858
+ chip.size ?? (this.size === "xs" || this.size === "sm" ? "xs" : "sm"),
859
+ `${this._chipVariantClass}-${this._chipColorClass}`,
860
+ "",
861
+ chip.dot ? "has-dot" : ""
862
+ ].filter(Boolean).join(" ");
863
+ }
864
+ /**
865
+ * Class for one chip part. Both class APIs append: the field-level key
866
+ * (`cssClass.chip` / `.chipLabel` / `.chipRemove`) and the chip-level one
867
+ * (`chip.cssClass.*`, which additionally reaches the parts the field has no
868
+ * key for — `main`, `content`, `dot`).
869
+ */
870
+ _chipCls(base, chipKey, key) {
871
+ return [
872
+ base,
873
+ key ? this.cssClass?.[key] : void 0,
874
+ this._chipProps.cssClass?.[chipKey]
875
+ ].filter(Boolean).join(" ");
876
+ }
877
+ _renderChip(it) {
878
+ const chip = this._chipProps;
879
+ const removable = !this.disabled && !this.readonly && this._canRemove;
880
+ return html`
881
+ <div
882
+ class=${this._chipCls(`${this._chipBaseClasses}${removable ? " removable" : ""}`, "root", "chip")}
883
+ mono-dd-chip
884
+ ?mono-dd-removable=${removable}
885
+ mono-dd-chip-color=${chip.color ?? nothing}
886
+ mono-dd-chip-rounded=${chip.rounded ?? nothing}
887
+ >
888
+ <span class=${ifDefined(chip.cssClass?.main)} mono-dd-chip-main>
889
+ <span class=${this._chipCls("chip-content", "content")} mono-dd-chip-content>
890
+ ${chip.dot ? html`<span class=${this._chipCls("chip-dot", "dot")} mono-dd-chip-dot aria-hidden="true"></span>` : nothing}
891
+ <span class=${this._chipCls("chip-label", "label", "chipLabel")} mono-dd-chip-label>${it.text}</span>
892
+ ${removable ? html`<button
893
+ type="button"
894
+ class=${this._chipCls("chip-close", "close", "chipRemove")}
895
+ mono-dd-chip-close
896
+ aria-label=${chip.closeLabel ?? `Remove ${it.text}`}
897
+ @click=${(e) => {
898
+ e.stopPropagation();
899
+ this._dd?.removeKey(it.key);
900
+ }}
901
+ >
902
+ ${closeIcon()}
903
+ </button>` : nothing}
904
+ </span>
905
+ </span>
906
+ </div>
907
+ `;
908
+ }
909
+ /**
910
+ * The chip region. `flex` returns the chips as bare children of the value
911
+ * span, so they wrap — the historical markup, unchanged. `inline` nests them
912
+ * in one `overflow-x: hidden` strip instead, which is what makes the row
913
+ * scroll as a unit.
914
+ */
915
+ _renderChipRegion(items) {
916
+ const chips = this._renderChips(items);
917
+ if (this._chipBehaviour !== "inline") return chips;
918
+ return html`
919
+ <span class=${this._cls("mono-dropdown-table-chip-strip", "chipStrip")} mono-dd-chip-strip>${chips}</span>
920
+ `;
921
+ }
922
+ _renderChips(items) {
923
+ const max = this._visibleCap(items.length);
924
+ const visible = max === Infinity ? items : items.slice(0, max);
925
+ const overflow = this._overflowItems(items);
926
+ const chips = visible.map((it) => this._renderChip(it));
927
+ if (overflow.length) chips.push(html`
928
+ <div
929
+ class=${this._cls(`${this._chipBaseClasses.replace(" has-dot", "")} clickable mono-dropdown-table-more-chip`, "moreChip")}
930
+ mono-dd-chip
931
+ mono-dd-more
932
+ mono-dd-chip-color=${this._chipProps.color ?? nothing}
933
+ mono-dd-chip-rounded=${this._chipProps.rounded ?? nothing}
934
+ >
935
+ <span
936
+ class=${ifDefined(this._chipProps.cssClass?.main)}
937
+ mono-dd-chip-main
938
+ role="button"
939
+ tabindex="0"
940
+ @mousedown=${(e) => e.preventDefault()}
941
+ @click=${(e) => {
942
+ e.stopPropagation();
943
+ const next = !this._moreOpen;
944
+ this._dd?.setOpen(false);
945
+ this._moreOpen = next;
946
+ this.requestUpdate();
947
+ }}
948
+ >
949
+ <span class=${this._chipCls("chip-content", "content")} mono-dd-chip-content
950
+ ><span class=${this._chipCls("chip-label", "label")} mono-dd-chip-label
951
+ >+${overflow.length} more</span
952
+ ></span
953
+ >
954
+ </span>
955
+ </div>
956
+ `);
957
+ return chips;
958
+ }
959
+ /** Selected rows past the visible cap — empty when uncapped or under the collapse floor. */
960
+ _overflowItems(items) {
961
+ const max = this._visibleCap(items.length);
962
+ return max === Infinity ? [] : items.slice(max);
963
+ }
964
+ /**
965
+ * Always rendered, shown by the root's `more-open` class: the panel lives in
966
+ * a body portal while open and a portaled node cannot be removed by a
967
+ * conditional render (Lit's ChildPart no longer contains it).
968
+ */
969
+ _renderMore(items) {
970
+ return html`<div class="mono-dropdown-table-more" mono-dd-more>${(this._moreOpen ? this._overflowItems(items) : []).map((it) => this._renderChip(it))}</div>`;
971
+ }
972
+ _renderLabel() {
973
+ if (!this.label) return nothing;
974
+ return html`<label class=${this._cls("mono-dropdown-table-label", "label")} mono-dd-label
975
+ >${this.label}${this.required ? html`<span class=${this._cls("mono-dropdown-table-required", "required")} mono-dd-required-mark>*</span>` : nothing}</label
976
+ >`;
977
+ }
978
+ _renderMessage() {
979
+ const base = this._cls("mono-dropdown-table-message", "message");
980
+ if (this.validationMessage) {
981
+ const state = this._validationState;
982
+ return html`<div class="${base} ${state}" mono-dd-message=${state} role=${state === "invalid" ? "alert" : nothing}>
983
+ ${this.validationMessage}
984
+ </div>`;
985
+ }
986
+ if (this.errorMessage) return html`<div class="${base} invalid" mono-dd-message="invalid" role="alert">${this.errorMessage}</div>`;
987
+ if (this.successMessage) return html`<div class="${base} valid" mono-dd-message="valid">${this.successMessage}</div>`;
988
+ if (this.helperText) return html`<div class="${base} helper" mono-dd-message="helper">${this.helperText}</div>`;
989
+ return nothing;
990
+ }
991
+ _renderTrigger(items) {
992
+ const dd = this._dd;
993
+ const hasValue = this._hasValue;
994
+ const inert = this.disabled || this.readonly;
995
+ const canClear = this.clearable && hasValue && !inert && !(this._multi && this._minSelected > 0);
996
+ const inlineChips = this._inlineChips;
997
+ return html`
998
+ <div
999
+ class=${this._triggerClasses}
1000
+ mono-dd-trigger
1001
+ role="combobox"
1002
+ tabindex=${this.disabled ? -1 : 0}
1003
+ aria-expanded=${this._isOpen ? "true" : "false"}
1004
+ @click=${() => this.toggle()}
1005
+ @keydown=${this._onTriggerKeydown}
1006
+ >
1007
+ <span
1008
+ class="${this._cls("mono-dropdown-table-value", "value")}${hasValue ? "" : ` mono-dropdown-table-placeholder${this.cssClass?.placeholder ? ` ${this.cssClass.placeholder}` : ""}`}${inlineChips ? " is-inline" : ""}"
1009
+ mono-dd-value
1010
+ ?mono-dd-placeholder=${!hasValue}
1011
+ ?mono-inline=${inlineChips}
1012
+ >
1013
+ ${this._multi ? hasValue ? this._renderChipRegion(items) : this.placeholder : hasValue ? html`<span>${dd?.displayText()}</span>` : this.placeholder}
1014
+ </span>
1015
+ <span class=${this._cls("mono-dropdown-table-actions", "actions")} mono-dd-actions>
1016
+ ${inlineChips && this._chipStrip.overflowing ? html`${this._renderScrollButton(-1, this._chipStrip.canScrollStart)}
1017
+ ${this._renderScrollButton(1, this._chipStrip.canScrollEnd)}` : nothing}
1018
+ ${canClear ? html`<span
1019
+ role="button"
1020
+ tabindex="-1"
1021
+ class=${this._cls("mono-dropdown-table-clear", "clear")}
1022
+ mono-dd-clear
1023
+ aria-label="Clear"
1024
+ @mousedown=${(e) => e.preventDefault()}
1025
+ @click=${(e) => {
1026
+ e.stopPropagation();
1027
+ this._dd?.clear();
1028
+ this.close();
1029
+ }}
1030
+ >${closeIcon()}</span
1031
+ >` : nothing}
1032
+ ${!inert && !canClear ? html`<span
1033
+ role="button"
1034
+ tabindex="-1"
1035
+ class=${this._cls("mono-dropdown-table-arrow", "arrow")}
1036
+ mono-dd-arrow
1037
+ aria-label="Toggle"
1038
+ aria-expanded=${this._isOpen ? "true" : "false"}
1039
+ @mousedown=${(e) => e.preventDefault()}
1040
+ @click=${(e) => {
1041
+ e.stopPropagation();
1042
+ this.toggle();
1043
+ }}
1044
+ >${this._caretIcon()}</span
1045
+ >` : nothing}
1046
+ </span>
1047
+ </div>
1048
+ `;
1049
+ }
1050
+ /**
1051
+ * Panel-only sizing from the `dropdown` object.
1052
+ *
1053
+ * `maxHeight` is published as the custom property `--_mono-dropdown-table-panel-max-h` rather than a direct
1054
+ * `max-height`: the popup controller also constrains the panel (via `--mono-popup-avail-h`),
1055
+ * and two writers on the same declaration would clobber each other across renders. The CSS
1056
+ * combines both with `min()`. Everything else is a plain declaration.
1057
+ *
1058
+ * `height` is an EXACT height here now. It used to be the cap, because this object had no
1059
+ * `maxHeight`; it does now, and the three popup components share one meaning.
1060
+ */
1061
+ _panelStyle() {
1062
+ const d = this.dropdown;
1063
+ if (!d) return {};
1064
+ const s = {};
1065
+ const w = toCssSize(d.width);
1066
+ const mw = toCssSize(d.minWidth);
1067
+ const xw = toCssSize(d.maxWidth);
1068
+ const h = toCssSize(d.height);
1069
+ const mh = toCssSize(d.minHeight);
1070
+ const xh = toCssSize(d.maxHeight);
1071
+ if (w) s.width = w;
1072
+ if (mw) s["min-width"] = mw;
1073
+ if (xw) s["max-width"] = xw;
1074
+ if (h) s.height = h;
1075
+ if (mh) s["min-height"] = mh;
1076
+ if (xh) s["--_mono-dropdown-table-panel-max-h"] = xh;
1077
+ return s;
1078
+ }
1079
+ render() {
1080
+ const items = this._dd?.selectedItems() ?? [];
1081
+ const state = this._validationState;
1082
+ return html`
1083
+ <div
1084
+ class=${this._wrapperClasses}
1085
+ style=${styleMap(buildSizeStyle(this))}
1086
+ mono-dropdown-table
1087
+ mono-size=${this.size === "md" ? nothing : this.size}
1088
+ mono-color=${this.color === "primary" ? nothing : this.color}
1089
+ mono-variant=${this.variant === "outlined" ? nothing : this.variant}
1090
+ mono-validation-state=${state === "default" ? nothing : state}
1091
+ mono-side=${this._resolvedSide}
1092
+ ?mono-open=${this._isOpen}
1093
+ ?mono-more-open=${this._moreOpen}
1094
+ ?mono-disabled=${this.disabled}
1095
+ ?mono-readonly=${this.readonly}
1096
+ ?mono-required=${this.required}
1097
+ ?mono-clearable=${this.clearable}
1098
+ ?mono-multiple=${this._multi}
1099
+ ?mono-has-value=${this._hasValue}
1100
+ >
1101
+ ${this._renderLabel()}
1102
+ <div
1103
+ class="mono-dropdown-table-control${this._inlineChips ? " is-inline" : ""}"
1104
+ mono-dd-control
1105
+ ?mono-inline=${this._inlineChips}
1106
+ >
1107
+ ${this._renderTrigger(items)} ${this._renderMore(items)}
1108
+ </div>
1109
+ ${this._renderMessage()}
1110
+ <div
1111
+ class="mono-dropdown-table-panel ${this._isOpen ? "open" : ""}"
1112
+ mono-dd-panel
1113
+ role="dialog"
1114
+ tabindex="-1"
1115
+ style=${styleMap(this._panelStyle())}
1116
+ @click=${this._onPanelClick}
1117
+ @keydown=${this._onPanelKeydown}
1118
+ @keyup=${this._onPanelKeyup}
1119
+ >
1120
+ ${this._renderRegion("search", "search")}
1121
+ ${this._renderRegion("body", "body")}
1122
+ ${this._renderRegion("foot", "footer")}
1123
+ </div>
1124
+ </div>
1125
+ `;
1126
+ }
1127
+ }
1128
+ __decorate([property({ attribute: false })], MonoDropdownTableCoreClass.prototype, "dataDropdown", void 0);
1129
+ __decorate([property({ type: String })], MonoDropdownTableCoreClass.prototype, "size", void 0);
1130
+ __decorate([property({ type: String })], MonoDropdownTableCoreClass.prototype, "color", void 0);
1131
+ __decorate([property({ type: String })], MonoDropdownTableCoreClass.prototype, "variant", void 0);
1132
+ __decorate([property({ type: String })], MonoDropdownTableCoreClass.prototype, "label", void 0);
1133
+ __decorate([property({ type: String })], MonoDropdownTableCoreClass.prototype, "placeholder", void 0);
1134
+ __decorate([property({
1135
+ type: String,
1136
+ attribute: "helper-text"
1137
+ })], MonoDropdownTableCoreClass.prototype, "helperText", void 0);
1138
+ __decorate([property({
1139
+ type: String,
1140
+ attribute: "validation-state"
1141
+ })], MonoDropdownTableCoreClass.prototype, "validationState", void 0);
1142
+ __decorate([property({
1143
+ type: String,
1144
+ attribute: "validation-message"
1145
+ })], MonoDropdownTableCoreClass.prototype, "validationMessage", void 0);
1146
+ __decorate([property({
1147
+ type: String,
1148
+ attribute: "error-message"
1149
+ })], MonoDropdownTableCoreClass.prototype, "errorMessage", void 0);
1150
+ __decorate([property({
1151
+ type: String,
1152
+ attribute: "success-message"
1153
+ })], MonoDropdownTableCoreClass.prototype, "successMessage", void 0);
1154
+ __decorate([property({
1155
+ reflect: true,
1156
+ converter: booleanStringConverter
1157
+ })], MonoDropdownTableCoreClass.prototype, "required", void 0);
1158
+ __decorate([property({
1159
+ reflect: true,
1160
+ converter: booleanStringConverter
1161
+ })], MonoDropdownTableCoreClass.prototype, "disabled", void 0);
1162
+ __decorate([property({
1163
+ reflect: true,
1164
+ converter: booleanStringConverter
1165
+ })], MonoDropdownTableCoreClass.prototype, "readonly", void 0);
1166
+ __decorate([property({
1167
+ reflect: true,
1168
+ converter: booleanStringConverter
1169
+ })], MonoDropdownTableCoreClass.prototype, "clearable", void 0);
1170
+ __decorate([property({
1171
+ reflect: true,
1172
+ converter: booleanStringConverter
1173
+ })], MonoDropdownTableCoreClass.prototype, "multiple", void 0);
1174
+ __decorate([property({ converter: optionalNumberConverter })], MonoDropdownTableCoreClass.prototype, "max", void 0);
1175
+ __decorate([property({ converter: optionalNumberConverter })], MonoDropdownTableCoreClass.prototype, "min", void 0);
1176
+ __decorate([property({
1177
+ attribute: "max-visible",
1178
+ converter: optionalNumberConverter
1179
+ })], MonoDropdownTableCoreClass.prototype, "maxVisible", void 0);
1180
+ __decorate([property({
1181
+ attribute: "min-visible",
1182
+ converter: optionalNumberConverter
1183
+ })], MonoDropdownTableCoreClass.prototype, "minVisible", void 0);
1184
+ __decorate([property({ attribute: false })], MonoDropdownTableCoreClass.prototype, "chip", void 0);
1185
+ __decorate([property({ attribute: "model-value" })], MonoDropdownTableCoreClass.prototype, "modelValue", void 0);
1186
+ __decorate([property({ type: String })], MonoDropdownTableCoreClass.prototype, "width", void 0);
1187
+ __decorate([property({ type: String })], MonoDropdownTableCoreClass.prototype, "height", void 0);
1188
+ __decorate([property({
1189
+ type: String,
1190
+ attribute: "min-width"
1191
+ })], MonoDropdownTableCoreClass.prototype, "minWidth", void 0);
1192
+ __decorate([property({
1193
+ type: String,
1194
+ attribute: "max-width"
1195
+ })], MonoDropdownTableCoreClass.prototype, "maxWidth", void 0);
1196
+ __decorate([property({
1197
+ type: String,
1198
+ attribute: "min-height"
1199
+ })], MonoDropdownTableCoreClass.prototype, "minHeight", void 0);
1200
+ __decorate([property({
1201
+ type: String,
1202
+ attribute: "max-height"
1203
+ })], MonoDropdownTableCoreClass.prototype, "maxHeight", void 0);
1204
+ __decorate([property({ attribute: false })], MonoDropdownTableCoreClass.prototype, "dropdown", void 0);
1205
+ __decorate([property({ type: String })], MonoDropdownTableCoreClass.prototype, "placement", void 0);
1206
+ __decorate([property({ converter: booleanStringConverter })], MonoDropdownTableCoreClass.prototype, "flip", void 0);
1207
+ __decorate([property({ converter: booleanStringConverter })], MonoDropdownTableCoreClass.prototype, "shift", void 0);
1208
+ __decorate([property({ converter: numberStringConverter })], MonoDropdownTableCoreClass.prototype, "offset", void 0);
1209
+ __decorate([property({
1210
+ attribute: "auto-focus-search",
1211
+ converter: booleanStringConverter
1212
+ })], MonoDropdownTableCoreClass.prototype, "autoFocusSearch", void 0);
1213
+ __decorate([property({
1214
+ attribute: "stay-open",
1215
+ reflect: true,
1216
+ converter: booleanStringConverter
1217
+ })], MonoDropdownTableCoreClass.prototype, "stayOpen", void 0);
1218
+ __decorate([property({ attribute: false })], MonoDropdownTableCoreClass.prototype, "cssClass", void 0);
1219
+ __decorate([property({ attribute: false })], MonoDropdownTableCoreClass.prototype, "cssClassName", void 0);
1220
+ return MonoDropdownTableCoreClass;
1221
+ };
1222
+ //#endregion
1223
+ //#region src/components/dropdown-table/dropdown-table.css?raw
1224
+ var dropdown_table_default = "/* LEGACY CLASS ALIASES — every `[mono-x]` below is wrapped as `:is([mono-x], .legacy)`\r\n by `scripts/legacy-class-alias.mjs` (`.mono-dropdown-table-region.body`,\r\n `tr.mono-dd-row-selected`, …), so host CSS and hand-written markup on the pre-port\r\n class contract keep painting. Author with the attribute only; re-run the script. */\r\n/* =========================================================================\r\n mono-dropdown-table — a dropdown whose panel is a native `<table>` for\r\n picking row(s). An EXTENSION: Basecoat has no table picker, so the FIELD is\r\n the multi-select combobox's chip box (`.combobox-chips` + `.combobox-chip`,\r\n basecoat-css@1.0.2, vega style) on the `.field` / `.label` chrome, and the\r\n PANEL is the combobox's `[data-popover]` holding a ported `<table mono-table>`\r\n instead of a listbox — so the rows are the table's own rows.\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-dropdown-table size=\"sm\" color=\"danger\" label=\"Owner\" clearable multiple>\r\n <div mono-dropdown-table mono-size=\"sm\" mono-color=\"danger\" mono-clearable mono-multiple>\r\n <label mono-dd-label>Owner</label>\r\n <div mono-dd-control>\r\n <div mono-dd-trigger role=\"combobox\">\r\n <span mono-dd-value>\r\n <div mono-dd-chip mono-dd-removable><span mono-dd-chip-main><span mono-dd-chip-content>\r\n <span mono-dd-chip-label>Ada</span><button mono-dd-chip-close>…</button></span></span></div>\r\n </span>\r\n <span mono-dd-actions><span mono-dd-arrow>…</span></span>\r\n </div>\r\n </div>\r\n <div mono-dd-panel><div mono-dd-region=\"body\"><table mono-table>…</table></div></div>\r\n </div>\r\n\r\n An absent attribute is the prop's default (`:not([mono-size])` = md,\r\n `:not([mono-color])` = primary, `:not([mono-variant])` = outlined). The element\r\n renders these attributes on its wrapper (both builds) plus the STATES\r\n `mono-open` / `mono-more-open` / `mono-has-value` / `mono-side`; the old\r\n classes (`.mono-dropdown-table.sm.open`) are still emitted as inert hooks until\r\n 2.0 but no rule here reads them. The chips are NOT `.mono-chip`s any more: they\r\n are Basecoat combobox chips painted here, and chip.css never sees them.\r\n\r\n THE PARTS ARE FAMILY-UNIQUE (`mono-dd-*`), never the bare `mono-chip` /\r\n `mono-panel` / `mono-actions` the field components use: the panel holds a whole\r\n `<table mono-table>` whose cells may carry a consumer's `<mono-chip>`, and a\r\n `[mono-dropdown-table] [mono-chip]` rule would repaint it.\r\n\r\n Selector map (ours ≡ upstream):\r\n [mono-dropdown-table] ≡ .field (gap-3, as margins) + .combobox (position: relative)\r\n [mono-dropdown-table] > [mono-dd-label] ≡ .field > label / .label\r\n [mono-dd-trigger] ≡ .combobox-chips (min-h-9 gap-1.5 rounded-md border-input px-1.5 py-1.5 text-sm shadow-xs)\r\n [mono-dd-value] ≡ the chip row; EXTENSION: the single value / placeholder text\r\n [mono-dd-chip] > [mono-dd-chip-main] ≡ .combobox-chip (h-5.5 gap-1 rounded-sm bg-muted px-1.5 text-xs font-medium)\r\n [mono-dd-chip] [mono-dd-chip-close] ≡ .combobox-chip-remove (-ms-1 opacity-50 hover:100, svg size-3.5)\r\n [mono-dd-chip][mono-dd-more] ≡ EXTENSION (the \"+N more\" counter chip, same box)\r\n [mono-dd-actions] > [mono-dd-arrow] > svg ≡ .combobox-trigger-icon (size-4 text-muted-foreground)\r\n [mono-dd-actions] > [mono-dd-clear] ≡ .combobox [data-clear] (size-6, painted as .btn[data-variant='ghost'])\r\n [mono-dd-actions] > [mono-dd-scroll] ≡ EXTENSION (the inline strip's ‹ › pager, same box)\r\n [mono-dd-panel] ≡ .combobox [data-popover] (bg-popover ring-1 rounded-md shadow-md); EXTENSION: a flex column of regions\r\n [mono-dd-region=\"search|body|foot\"] ≡ EXTENSION (search box / the scrolling table / the pager)\r\n [mono-dd-more] ≡ [data-popover] holding the overflow chips\r\n [mono-table] tbody tr[mono-selected] ≡ .table tr data-[state=selected] — the TABLE's own rule paints it\r\n [mono-table] tbody tr[mono-dd-active] ≡ .combobox [role='option'].active (bg-muted) — the keyboard cursor\r\n [mono-dd-message=\"…\"] ≡ .field > p / .field [role='alert']\r\n [mono-validation-state=\"invalid\"] ≡ .combobox-chips:has([aria-invalid=true]) + .field[data-invalid]\r\n [mono-validation-state=\"valid|warning\"] ≡ EXTENSION (the invalid pattern in --success / --warning)\r\n [mono-size=\"xs|sm|lg|xl|xxl\"] ≡ EXTENSION (the --mono-control-height-* ladder)\r\n [mono-variant=\"filled\"] ≡ EXTENSION (luma's .combobox-chips)\r\n [mono-variant=\"underlined\"] ≡ EXTENSION (sera's .combobox-chips: bottom edge only, no ring)\r\n\r\n FLAVORS: the field IS the tag-input's chip box and the panel IS its popover, so\r\n every metric here resolves `--mono-dropdown-table-<k>` → `--mono-tag-input-<k>`\r\n → the base, through the SAME per-size chains tag-input.css uses — a flavour\r\n that retunes the tag-input retunes this field for free, and no flavour file\r\n carries a dropdown-table entry. Every fallback is vega's value.\r\n\r\n THE PANELS ARE PORTALED (light build): [mono-dd-panel] and [mono-dd-more]\r\n move into a `<div data-mono-popup-portal>` under <body> while open, and the\r\n portal mirrors the wrapper's class AND mono-* attributes, so every rule here\r\n is scoped under `[mono-dropdown-table]` and never relies on the panel being\r\n inside the field. The shadow build keeps its panel in the shadow root and\r\n SLOTS the consumer's light-DOM `<table>` into it — the row rules therefore\r\n come in two forms: the portaled table, and the slotted one under the host.\r\n ========================================================================= */\r\n\r\nmono-dropdown-table {\r\n display: block;\r\n width: 100%;\r\n}\r\n\r\n:is([mono-dropdown-table],.mono-dropdown-table) {\r\n /* ── palette: each slot is a public knob over the tag-input's, over a Basecoat token ── */\r\n --_mono-dropdown-table-text: var(--mono-dropdown-table-text, var(--mono-tag-input-text, var(--foreground)));\r\n --_mono-dropdown-table-placeholder: var(--mono-dropdown-table-placeholder, var(--mono-tag-input-placeholder, var(--muted-foreground)));\r\n --_mono-dropdown-table-muted: var(--mono-dropdown-table-muted, var(--mono-tag-input-muted, var(--muted-foreground)));\r\n --_mono-dropdown-table-primary: var(--mono-dropdown-table-primary, var(--mono-tag-input-primary, var(--ring)));\r\n --_mono-dropdown-table-secondary: var(--mono-dropdown-table-secondary, var(--mono-tag-input-secondary, var(--muted-foreground)));\r\n --_mono-dropdown-table-success: var(--mono-dropdown-table-success, var(--mono-tag-input-success, var(--success)));\r\n --_mono-dropdown-table-danger: var(--mono-dropdown-table-danger, var(--mono-tag-input-danger, var(--destructive)));\r\n --_mono-dropdown-table-warning: var(--mono-dropdown-table-warning, var(--mono-tag-input-warning, var(--warning)));\r\n --_mono-dropdown-table-info: var(--mono-dropdown-table-info, var(--mono-tag-input-info, var(--info)));\r\n --_mono-dropdown-table-teal: var(--mono-dropdown-table-teal, var(--mono-tag-input-teal, var(--teal)));\r\n --_mono-dropdown-table-purple: var(--mono-dropdown-table-purple, var(--mono-tag-input-purple, var(--purple)));\r\n --_mono-dropdown-table-neutral: var(--mono-dropdown-table-neutral, var(--mono-tag-input-neutral, var(--neutral)));\r\n --_mono-dropdown-table-dark: var(--mono-dropdown-table-dark, var(--mono-tag-input-dark, var(--dark)));\r\n --_mono-dropdown-table-valid: var(--mono-dropdown-table-valid, var(--mono-tag-input-valid, var(--success)));\r\n --_mono-dropdown-table-invalid: var(--mono-dropdown-table-invalid, var(--mono-tag-input-invalid, var(--destructive)));\r\n\r\n /* ── the painted result — three tiers, base = .combobox-chips (vega) ──── */\r\n --_mono-dropdown-table-ring-color: var(--mono-dropdown-table-ring-color, var(--mono-dropdown-table-focus-color, var(--_mono-dropdown-table-ring-color-preset, var(--_mono-dropdown-table-primary))));\r\n --_mono-dropdown-table-ring-width: var(--mono-dropdown-table-ring-width, var(--mono-tag-input-ring-width, var(--_mono-dropdown-table-ring-width-preset, var(--mono-ring-width))));\r\n --_mono-dropdown-table-ring-alpha: var(--mono-dropdown-table-ring-alpha, var(--mono-tag-input-ring-alpha, var(--mono-ring-alpha)));\r\n --_mono-dropdown-table-border-color: var(--mono-dropdown-table-rest-border, var(--mono-dropdown-table-border-color, var(--mono-dropdown-table-border, var(--mono-tag-input-rest-border, var(--mono-tag-input-border-color, var(--mono-tag-input-border, var(--_mono-dropdown-table-border-color-preset, var(--input))))))));\r\n --_mono-dropdown-table-bg: var(--mono-dropdown-table-bg, var(--mono-dropdown-table-surface, var(--mono-tag-input-bg, var(--mono-tag-input-surface, var(--_mono-dropdown-table-bg-preset, var(--mono-mode-surface))))));\r\n --_mono-dropdown-table-shadow: var(--mono-dropdown-table-shadow, var(--mono-tag-input-shadow, var(--_mono-dropdown-table-shadow-preset, 0 0 #0000)));\r\n --_mono-dropdown-table-icon: var(--mono-dropdown-table-icon-size, var(--mono-tag-input-icon-size, calc(var(--mono-spacing) * 4)));\r\n\r\n /* ── md metrics live on the unqualified root ON PURPOSE: hand-written\r\n `<div mono-dropdown-table>` that names no size renders exactly like\r\n size=\"md\". basecoat@1.0.2 styles/vega.css .combobox-chips — min-h-9\r\n gap-1.5 rounded-md px-1.5 py-1.5 text-sm; .combobox-chip h-5.5 ── */\r\n --_mono-dropdown-table-height: var(--mono-dropdown-table-height-md, var(--mono-tag-input-height-md, var(--mono-control-height-md)));\r\n --_mono-dropdown-table-radius: var(--mono-dropdown-table-radius-md, var(--mono-tag-input-radius-md, var(--_mono-dropdown-table-radius-preset, var(--mono-dropdown-table-radius, var(--mono-tag-input-radius, var(--mono-radius-md))))));\r\n --_mono-dropdown-table-padding-x: var(--mono-dropdown-table-padding-x-md, var(--mono-tag-input-padding-x-md, var(--mono-dropdown-table-padding-x, var(--mono-tag-input-padding-x, var(--_mono-dropdown-table-padding-x-preset, calc(var(--mono-spacing) * 1.5))))));\r\n --_mono-dropdown-table-padding-y: var(--mono-dropdown-table-padding-y-md, var(--mono-tag-input-padding-y-md, var(--mono-dropdown-table-padding-y, var(--mono-tag-input-padding-y, calc(var(--mono-spacing) * 1.5)))));\r\n --_mono-dropdown-table-gap: var(--mono-dropdown-table-chip-gap, var(--mono-tag-input-chip-gap, calc(var(--mono-spacing) * 1.5)));\r\n --_mono-dropdown-table-font-size: var(--mono-dropdown-table-font-md, var(--mono-tag-input-font-md, var(--mono-text-sm)));\r\n --_mono-dropdown-table-line-height: var(--mono-dropdown-table-line-height, var(--mono-tag-input-line-height, var(--mono-dropdown-table-line-height-md, var(--mono-tag-input-line-height-md, var(--mono-text-sm--lh)))));\r\n /* Same cap as tag-input's (see tag-input.css): one row of chips never outgrows the field's height. */\r\n --_mono-dropdown-table-chip-fit: calc(var(--_mono-dropdown-table-height) - 2 * var(--_mono-dropdown-table-padding-y) - 2 * var(--mono-border-width));\r\n --_mono-dropdown-table-chip-height: var(--mono-dropdown-table-chip-height-md, var(--mono-tag-input-chip-height-md, min(calc(var(--mono-spacing) * 5.5), var(--_mono-dropdown-table-chip-fit))));\r\n --_mono-dropdown-table-chip-font-size: var(--mono-dropdown-table-chip-font-size, var(--mono-tag-input-chip-font-size, var(--mono-text-xs)));\r\n --_mono-dropdown-table-chip-line-height: var(--mono-dropdown-table-chip-line-height, var(--mono-tag-input-chip-line-height, var(--mono-text-xs--lh)));\r\n --_mono-dropdown-table-action: calc(var(--mono-spacing) * 6);\r\n --_mono-dropdown-table-clear-glyph: calc(var(--mono-spacing) * 3.5);\r\n\r\n /* basecoat@1.0.2 styles/vega.css .field — flex w-full flex-col gap-3; mono:\r\n BLOCK flow with the gap as margins (see tag-input.css) */\r\n --_mono-dropdown-table-gap-y: var(--mono-dropdown-table-gap, var(--mono-tag-input-gap, calc(var(--mono-spacing) * 3)));\r\n position: relative;\r\n display: block;\r\n width: 100%;\r\n font-family: inherit;\r\n color: var(--_mono-dropdown-table-text);\r\n}\r\n\r\n/* The page's global `* { box-sizing: border-box }` does NOT cross the shadow\r\n boundary; without this the trigger's `min-height` would be its CONTENT height\r\n there (40px → 56px). Rewrites to `:host, :host *` in the shadow sheet. */\r\nmono-dropdown-table,\r\nmono-dropdown-table *,\r\n:is([mono-dropdown-table],.mono-dropdown-table),\r\n:is([mono-dropdown-table],.mono-dropdown-table) *,\r\n:is([mono-dropdown-table],.mono-dropdown-table) *::before,\r\n:is([mono-dropdown-table],.mono-dropdown-table) *::after {\r\n box-sizing: border-box;\r\n}\r\n\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is(:is([mono-dd-label],.mono-dropdown-table-label), :is([mono-dd-message],.mono-dropdown-table-message))[mono-empty] {\r\n display: none;\r\n}\r\n\r\n/* =========================================\r\n Sizes — an EMPTY field's painted height IS the token (tests/perf/field-heights);\r\n a second row of chips grows it. The same chains as tag-input.css, one tier up.\r\n ========================================= */\r\n\r\n:is([mono-dropdown-table],.mono-dropdown-table):is([mono-size=\"xs\"],:where(.mono-dropdown-table.xs)) {\r\n --_mono-dropdown-table-height: var(--mono-dropdown-table-height-xs, var(--mono-tag-input-height-xs, var(--mono-control-height-xs)));\r\n --_mono-dropdown-table-radius: var(--mono-dropdown-table-radius-xs, var(--mono-tag-input-radius-xs, var(--_mono-dropdown-table-radius-preset, var(--mono-dropdown-table-radius, var(--mono-tag-input-radius, var(--mono-radius-md))))));\r\n --_mono-dropdown-table-padding-x: var(--mono-dropdown-table-padding-x-xs, var(--mono-tag-input-padding-x-xs, var(--mono-dropdown-table-padding-x, var(--mono-tag-input-padding-x, var(--_mono-dropdown-table-padding-x-preset, var(--mono-spacing))))));\r\n --_mono-dropdown-table-padding-y: var(--mono-dropdown-table-padding-y-xs, var(--mono-tag-input-padding-y-xs, var(--mono-dropdown-table-padding-y, var(--mono-tag-input-padding-y, calc(var(--mono-spacing) * 0.5)))));\r\n --_mono-dropdown-table-gap: var(--mono-dropdown-table-chip-gap, var(--mono-tag-input-chip-gap, var(--mono-spacing)));\r\n --_mono-dropdown-table-font-size: var(--mono-dropdown-table-font-xs, var(--mono-tag-input-font-xs, var(--mono-text-xs)));\r\n --_mono-dropdown-table-line-height: var(--mono-dropdown-table-line-height, var(--mono-tag-input-line-height, var(--mono-dropdown-table-line-height-xs, var(--mono-tag-input-line-height-xs, var(--mono-text-xs--lh)))));\r\n --_mono-dropdown-table-chip-height: var(--mono-dropdown-table-chip-height-xs, var(--mono-tag-input-chip-height-xs, min(calc(var(--mono-spacing) * 4.5), var(--_mono-dropdown-table-chip-fit))));\r\n --_mono-dropdown-table-icon: var(--mono-dropdown-table-icon-size, var(--mono-tag-input-icon-size, calc(var(--mono-spacing) * 3.5)));\r\n --_mono-dropdown-table-action: calc(var(--mono-spacing) * 4);\r\n --_mono-dropdown-table-clear-glyph: calc(var(--mono-spacing) * 3);\r\n}\r\n\r\n:is([mono-dropdown-table],.mono-dropdown-table):is([mono-size=\"sm\"],:where(.mono-dropdown-table.sm)) {\r\n --_mono-dropdown-table-height: var(--mono-dropdown-table-height-sm, var(--mono-tag-input-height-sm, var(--mono-control-height-sm)));\r\n --_mono-dropdown-table-radius: var(--mono-dropdown-table-radius-sm, var(--mono-tag-input-radius-sm, var(--_mono-dropdown-table-radius-preset, var(--mono-dropdown-table-radius, var(--mono-tag-input-radius, var(--mono-radius-md))))));\r\n --_mono-dropdown-table-padding-x: var(--mono-dropdown-table-padding-x-sm, var(--mono-tag-input-padding-x-sm, var(--mono-dropdown-table-padding-x, var(--mono-tag-input-padding-x, var(--_mono-dropdown-table-padding-x-preset, var(--mono-spacing))))));\r\n --_mono-dropdown-table-padding-y: var(--mono-dropdown-table-padding-y-sm, var(--mono-tag-input-padding-y-sm, var(--mono-dropdown-table-padding-y, var(--mono-tag-input-padding-y, var(--mono-spacing)))));\r\n --_mono-dropdown-table-gap: var(--mono-dropdown-table-chip-gap, var(--mono-tag-input-chip-gap, var(--mono-spacing)));\r\n --_mono-dropdown-table-font-size: var(--mono-dropdown-table-font-sm, var(--mono-tag-input-font-sm, var(--mono-dropdown-table-font-md, var(--mono-tag-input-font-md, var(--mono-text-sm)))));\r\n --_mono-dropdown-table-line-height: var(--mono-dropdown-table-line-height, var(--mono-tag-input-line-height, var(--mono-dropdown-table-line-height-sm, var(--mono-tag-input-line-height-sm, var(--mono-text-sm--lh)))));\r\n --_mono-dropdown-table-chip-height: var(--mono-dropdown-table-chip-height-sm, var(--mono-tag-input-chip-height-sm, min(calc(var(--mono-spacing) * 5), var(--_mono-dropdown-table-chip-fit))));\r\n --_mono-dropdown-table-action: calc(var(--mono-spacing) * 5);\r\n}\r\n\r\n:is([mono-dropdown-table],.mono-dropdown-table):is([mono-size=\"lg\"],:where(.mono-dropdown-table.lg)) {\r\n --_mono-dropdown-table-height: var(--mono-dropdown-table-height-lg, var(--mono-tag-input-height-lg, var(--mono-control-height-lg)));\r\n --_mono-dropdown-table-radius: var(--mono-dropdown-table-radius-lg, var(--mono-tag-input-radius-lg, var(--_mono-dropdown-table-radius-preset, var(--mono-dropdown-table-radius, var(--mono-tag-input-radius, var(--mono-radius-md))))));\r\n --_mono-dropdown-table-padding-x: var(--mono-dropdown-table-padding-x-lg, var(--mono-tag-input-padding-x-lg, var(--mono-dropdown-table-padding-x, var(--mono-tag-input-padding-x, var(--_mono-dropdown-table-padding-x-preset, calc(var(--mono-spacing) * 1.5))))));\r\n --_mono-dropdown-table-padding-y: var(--mono-dropdown-table-padding-y-lg, var(--mono-tag-input-padding-y-lg, var(--mono-dropdown-table-padding-y, var(--mono-tag-input-padding-y, calc(var(--mono-spacing) * 1.5)))));\r\n --_mono-dropdown-table-font-size: var(--mono-dropdown-table-font-lg, var(--mono-tag-input-font-lg, var(--mono-dropdown-table-font-md, var(--mono-tag-input-font-md, var(--mono-text-sm)))));\r\n --_mono-dropdown-table-line-height: var(--mono-dropdown-table-line-height, var(--mono-tag-input-line-height, var(--mono-dropdown-table-line-height-lg, var(--mono-tag-input-line-height-lg, var(--mono-text-sm--lh)))));\r\n --_mono-dropdown-table-chip-height: var(--mono-dropdown-table-chip-height-lg, var(--mono-tag-input-chip-height-lg, min(calc(var(--mono-spacing) * 6), var(--_mono-dropdown-table-chip-fit))));\r\n}\r\n\r\n:is([mono-dropdown-table],.mono-dropdown-table):is([mono-size=\"xl\"],:where(.mono-dropdown-table.xl)) {\r\n --_mono-dropdown-table-height: var(--mono-dropdown-table-height-xl, var(--mono-tag-input-height-xl, var(--mono-control-height-xl)));\r\n --_mono-dropdown-table-radius: var(--mono-dropdown-table-radius-xl, var(--mono-tag-input-radius-xl, var(--_mono-dropdown-table-radius-preset, var(--mono-dropdown-table-radius, var(--mono-tag-input-radius, var(--mono-radius-md))))));\r\n --_mono-dropdown-table-padding-x: var(--mono-dropdown-table-padding-x-xl, var(--mono-tag-input-padding-x-xl, var(--mono-dropdown-table-padding-x, var(--mono-tag-input-padding-x, var(--_mono-dropdown-table-padding-x-preset, calc(var(--mono-spacing) * 2))))));\r\n --_mono-dropdown-table-padding-y: var(--mono-dropdown-table-padding-y-xl, var(--mono-tag-input-padding-y-xl, var(--mono-dropdown-table-padding-y, var(--mono-tag-input-padding-y, calc(var(--mono-spacing) * 2)))));\r\n --_mono-dropdown-table-gap: var(--mono-dropdown-table-chip-gap, var(--mono-tag-input-chip-gap, calc(var(--mono-spacing) * 2)));\r\n --_mono-dropdown-table-font-size: var(--mono-dropdown-table-font-xl, var(--mono-tag-input-font-xl, var(--mono-text-base)));\r\n --_mono-dropdown-table-line-height: var(--mono-dropdown-table-line-height, var(--mono-tag-input-line-height, var(--mono-dropdown-table-line-height-xl, var(--mono-tag-input-line-height-xl, var(--mono-text-base--lh)))));\r\n --_mono-dropdown-table-chip-height: var(--mono-dropdown-table-chip-height-xl, var(--mono-tag-input-chip-height-xl, min(calc(var(--mono-spacing) * 6.5), var(--_mono-dropdown-table-chip-fit))));\r\n --_mono-dropdown-table-chip-font-size: var(--mono-dropdown-table-chip-font-size, var(--mono-tag-input-chip-font-size, var(--mono-text-sm)));\r\n --_mono-dropdown-table-chip-line-height: var(--mono-dropdown-table-chip-line-height, var(--mono-tag-input-chip-line-height, var(--mono-text-sm--lh)));\r\n --_mono-dropdown-table-icon: var(--mono-dropdown-table-icon-size, var(--mono-tag-input-icon-size, calc(var(--mono-spacing) * 5)));\r\n --_mono-dropdown-table-action: calc(var(--mono-spacing) * 7);\r\n --_mono-dropdown-table-clear-glyph: calc(var(--mono-spacing) * 4);\r\n}\r\n\r\n:is([mono-dropdown-table],.mono-dropdown-table):is([mono-size=\"xxl\"],:where(.mono-dropdown-table.xxl)) {\r\n --_mono-dropdown-table-height: var(--mono-dropdown-table-height-xxl, var(--mono-tag-input-height-xxl, var(--mono-control-height-xxl)));\r\n --_mono-dropdown-table-radius: var(--mono-dropdown-table-radius-xxl, var(--mono-tag-input-radius-xxl, var(--_mono-dropdown-table-radius-preset, var(--mono-dropdown-table-radius, var(--mono-tag-input-radius, var(--mono-radius-md))))));\r\n --_mono-dropdown-table-padding-x: var(--mono-dropdown-table-padding-x-xxl, var(--mono-tag-input-padding-x-xxl, var(--mono-dropdown-table-padding-x, var(--mono-tag-input-padding-x, var(--_mono-dropdown-table-padding-x-preset, calc(var(--mono-spacing) * 2.5))))));\r\n --_mono-dropdown-table-padding-y: var(--mono-dropdown-table-padding-y-xxl, var(--mono-tag-input-padding-y-xxl, var(--mono-dropdown-table-padding-y, var(--mono-tag-input-padding-y, calc(var(--mono-spacing) * 2)))));\r\n --_mono-dropdown-table-gap: var(--mono-dropdown-table-chip-gap, var(--mono-tag-input-chip-gap, calc(var(--mono-spacing) * 2)));\r\n --_mono-dropdown-table-font-size: var(--mono-dropdown-table-font-xxl, var(--mono-tag-input-font-xxl, var(--mono-text-lg)));\r\n --_mono-dropdown-table-line-height: var(--mono-dropdown-table-line-height, var(--mono-tag-input-line-height, var(--mono-dropdown-table-line-height-xxl, var(--mono-tag-input-line-height-xxl, var(--mono-text-lg--lh)))));\r\n --_mono-dropdown-table-chip-height: var(--mono-dropdown-table-chip-height-xxl, var(--mono-tag-input-chip-height-xxl, min(calc(var(--mono-spacing) * 7), var(--_mono-dropdown-table-chip-fit))));\r\n --_mono-dropdown-table-chip-font-size: var(--mono-dropdown-table-chip-font-size, var(--mono-tag-input-chip-font-size, var(--mono-text-sm)));\r\n --_mono-dropdown-table-chip-line-height: var(--mono-dropdown-table-chip-line-height, var(--mono-tag-input-chip-line-height, var(--mono-text-sm--lh)));\r\n --_mono-dropdown-table-icon: var(--mono-dropdown-table-icon-size, var(--mono-tag-input-icon-size, calc(var(--mono-spacing) * 5)));\r\n --_mono-dropdown-table-action: calc(var(--mono-spacing) * 8);\r\n --_mono-dropdown-table-clear-glyph: calc(var(--mono-spacing) * 4);\r\n}\r\n\r\n/* =========================================\r\n Variants — each writes only `*-preset` slots, read from the dropdown-table's\r\n knob first and the tag-input's second (a flavour writes the latter)\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 styles/vega.css .combobox-chips — rounded-md border border-input\r\n bg-transparent shadow-xs (dark:bg-input/30 via --mono-mode-surface) */\r\n:is([mono-dropdown-table],.mono-dropdown-table):is(:not([mono-variant]), :is([mono-variant=\"outlined\"],:where(.mono-dropdown-table.outlined))) {\r\n --_mono-dropdown-table-bg-preset: var(--mono-dropdown-table-outline-bg, var(--mono-tag-input-outline-bg));\r\n --_mono-dropdown-table-border-color-preset: var(--mono-dropdown-table-outline-border-color, var(--mono-tag-input-outline-border-color));\r\n --_mono-dropdown-table-side-border-color-preset: var(--mono-dropdown-table-outline-side-border-color, var(--mono-tag-input-outline-side-border-color));\r\n --_mono-dropdown-table-shadow-preset: var(--mono-dropdown-table-outline-shadow, var(--mono-tag-input-outline-shadow, var(--mono-shadow-xs)));\r\n --_mono-dropdown-table-ring-width-preset: var(--mono-dropdown-table-outline-ring-width, var(--mono-tag-input-outline-ring-width));\r\n --_mono-dropdown-table-radius-preset: var(--mono-dropdown-table-outline-radius, var(--mono-tag-input-outline-radius));\r\n --_mono-dropdown-table-padding-x-preset: var(--mono-dropdown-table-outline-padding-x, var(--mono-tag-input-outline-padding-x));\r\n}\r\n\r\n/* EXTENSION — filled ≡ basecoat@1.0.2 styles/luma.css .combobox-chips */\r\n:is([mono-dropdown-table],.mono-dropdown-table):is([mono-variant=\"filled\"],:where(.mono-dropdown-table.filled)) {\r\n --_mono-dropdown-table-bg-preset: var(--mono-dropdown-table-filled-bg, var(--mono-tag-input-filled-bg, color-mix(in oklab, var(--input) 50%, transparent)));\r\n --_mono-dropdown-table-border-color-preset: transparent;\r\n --_mono-dropdown-table-shadow-preset: 0 0 #0000;\r\n}\r\n\r\n/* EXTENSION — underlined ≡ basecoat@1.0.2 styles/sera.css .combobox-chips */\r\n:is([mono-dropdown-table],.mono-dropdown-table):is([mono-variant=\"underlined\"],:where(.mono-dropdown-table.underlined)) {\r\n --_mono-dropdown-table-bg-preset: transparent;\r\n --_mono-dropdown-table-side-border-color-preset: transparent;\r\n --_mono-dropdown-table-shadow-preset: 0 0 #0000;\r\n --_mono-dropdown-table-ring-width-preset: 0px;\r\n --_mono-dropdown-table-radius-preset: 0;\r\n --_mono-dropdown-table-padding-x-preset: 0;\r\n}\r\n\r\n/* =========================================\r\n Colours — the `color` prop is the FOCUS colour (ring + focused border)\r\n ========================================= */\r\n\r\n:is([mono-dropdown-table],.mono-dropdown-table):is(:not([mono-color]), :is([mono-color=\"primary\"],:where(.mono-dropdown-table.primary))) {\r\n --_mono-dropdown-table-ring-color-preset: var(--_mono-dropdown-table-primary);\r\n}\r\n:is([mono-dropdown-table],.mono-dropdown-table):is([mono-color=\"secondary\"],:where(.mono-dropdown-table.secondary)) {\r\n --_mono-dropdown-table-ring-color-preset: var(--_mono-dropdown-table-secondary);\r\n}\r\n:is([mono-dropdown-table],.mono-dropdown-table):is([mono-color=\"success\"],:where(.mono-dropdown-table.success)) {\r\n --_mono-dropdown-table-ring-color-preset: var(--_mono-dropdown-table-success);\r\n}\r\n:is([mono-dropdown-table],.mono-dropdown-table):is([mono-color=\"danger\"],:where(.mono-dropdown-table.danger)) {\r\n --_mono-dropdown-table-ring-color-preset: var(--_mono-dropdown-table-danger);\r\n}\r\n:is([mono-dropdown-table],.mono-dropdown-table):is([mono-color=\"warning\"],:where(.mono-dropdown-table.warning)) {\r\n --_mono-dropdown-table-ring-color-preset: var(--_mono-dropdown-table-warning);\r\n}\r\n:is([mono-dropdown-table],.mono-dropdown-table):is([mono-color=\"info\"],:where(.mono-dropdown-table.info)) {\r\n --_mono-dropdown-table-ring-color-preset: var(--_mono-dropdown-table-info);\r\n}\r\n:is([mono-dropdown-table],.mono-dropdown-table):is([mono-color=\"teal\"],:where(.mono-dropdown-table.teal)) {\r\n --_mono-dropdown-table-ring-color-preset: var(--_mono-dropdown-table-teal);\r\n}\r\n:is([mono-dropdown-table],.mono-dropdown-table):is([mono-color=\"purple\"],:where(.mono-dropdown-table.purple)) {\r\n --_mono-dropdown-table-ring-color-preset: var(--_mono-dropdown-table-purple);\r\n}\r\n:is([mono-dropdown-table],.mono-dropdown-table):is([mono-color=\"neutral\"],:where(.mono-dropdown-table.neutral)) {\r\n --_mono-dropdown-table-ring-color-preset: var(--_mono-dropdown-table-neutral);\r\n}\r\n:is([mono-dropdown-table],.mono-dropdown-table):is([mono-color=\"dark\"],:where(.mono-dropdown-table.dark)) {\r\n --_mono-dropdown-table-ring-color-preset: var(--_mono-dropdown-table-dark);\r\n}\r\n\r\n/* =========================================\r\n Label\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 styles/vega.css .field > label, .label — flex items-center\r\n gap-2 text-sm leading-none font-medium select-none w-fit */\r\n:is([mono-dropdown-table],.mono-dropdown-table) > :is([mono-dd-label],.mono-dropdown-table-label) {\r\n display: flex;\r\n align-items: center;\r\n width: fit-content;\r\n margin: 0 0 var(--_mono-dropdown-table-gap-y);\r\n gap: var(--mono-dropdown-table-label-gap, var(--mono-tag-input-label-gap, calc(var(--mono-spacing) * 2)));\r\n font-size: var(--mono-dropdown-table-label-font-size, var(--mono-tag-input-label-font-size, var(--mono-text-sm)));\r\n line-height: var(--mono-dropdown-table-label-line-height, var(--mono-tag-input-label-line-height, 1));\r\n font-weight: var(--mono-dropdown-table-label-font-weight, var(--mono-tag-input-label-font-weight, var(--mono-label-font-weight, var(--mono-font-weight-medium))));\r\n text-transform: var(--mono-dropdown-table-label-text-transform, var(--mono-tag-input-label-text-transform, none));\r\n letter-spacing: var(--mono-dropdown-table-label-letter-spacing, var(--mono-tag-input-label-letter-spacing, normal));\r\n color: var(--_mono-dropdown-table-text);\r\n user-select: none;\r\n}\r\n\r\n:is([mono-dropdown-table],.mono-dropdown-table):is([mono-disabled],.disabled) > :is([mono-dd-label],.mono-dropdown-table-label) {\r\n opacity: 0.5;\r\n pointer-events: none;\r\n}\r\n\r\n/* basecoat@1.0.2 styles/vega.css .field — data-invalid:text-destructive */\r\n:is([mono-dropdown-table],.mono-dropdown-table):is([mono-validation-state=\"invalid\"],:where(.mono-dropdown-table.is-invalid)) > :is([mono-dd-label],.mono-dropdown-table-label) {\r\n color: var(--_mono-dropdown-table-invalid);\r\n}\r\n\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-required-mark],.mono-dropdown-table-required) {\r\n color: var(--_mono-dropdown-table-danger);\r\n}\r\n\r\n/* =========================================\r\n The field — the chip box (role=\"combobox\"; the search box lives in the panel)\r\n ========================================= */\r\n\r\n:is([mono-dropdown-table],.mono-dropdown-table) > :is([mono-dd-control],.mono-dropdown-table-control) {\r\n position: relative;\r\n}\r\n\r\n/* The control is a grid/flex item in a host layout; once the value stops\r\n wrapping (inline strip) its automatic minimum is the full strip — pin it. */\r\n:is([mono-dropdown-table],.mono-dropdown-table) > :is([mono-dd-control],.mono-dropdown-table-control):is([mono-inline],.is-inline) {\r\n min-width: 0;\r\n}\r\n\r\n/* basecoat@1.0.2 components/combobox.css .combobox-chips — flex w-full min-w-0\r\n flex-wrap items-center */\r\n/* basecoat@1.0.2 styles/vega.css .combobox-chips — min-h-9 gap-1.5 rounded-md\r\n border border-input bg-transparent bg-clip-padding px-1.5 py-1.5 text-sm\r\n shadow-xs transition-[color,box-shadow] focus-within:border-ring\r\n focus-within:ring-3 focus-within:ring-ring/50 has-[[aria-invalid=true]]:…;\r\n mono: one row — the value area wraps INSIDE it and the actions stay centred */\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-trigger],.mono-dropdown-table-trigger) {\r\n --_mono-dropdown-table-bc: var(--_mono-dropdown-table-border-color);\r\n --_mono-dropdown-table-side-bc: var(--mono-dropdown-table-side-border-color, var(--mono-tag-input-side-border-color, var(--_mono-dropdown-table-side-border-color-preset, var(--_mono-dropdown-table-bc))));\r\n --_mono-dropdown-table-ring: 0 0 #0000;\r\n\r\n position: relative;\r\n display: flex;\r\n align-items: center;\r\n gap: var(--_mono-dropdown-table-gap);\r\n width: 100%;\r\n min-width: 0;\r\n min-height: var(--_mono-dropdown-table-height);\r\n padding-block: var(--_mono-dropdown-table-padding-y);\r\n padding-inline: var(--_mono-dropdown-table-padding-x);\r\n outline-style: none;\r\n border: var(--mono-border-width) solid var(--_mono-dropdown-table-bc);\r\n border-top-color: var(--_mono-dropdown-table-side-bc);\r\n border-inline-color: var(--_mono-dropdown-table-side-bc);\r\n border-radius: var(--_mono-dropdown-table-radius);\r\n background: var(--_mono-dropdown-table-bg);\r\n background-clip: padding-box;\r\n color: var(--_mono-dropdown-table-text);\r\n box-shadow: var(--_mono-dropdown-table-ring), var(--_mono-dropdown-table-shadow);\r\n font-family: inherit;\r\n font-size: var(--_mono-dropdown-table-font-size);\r\n line-height: var(--_mono-dropdown-table-line-height);\r\n cursor: pointer;\r\n transition-property: color, box-shadow, border-color, background-color;\r\n transition-timing-function: var(--mono-ease);\r\n transition-duration: var(--mono-duration);\r\n}\r\n\r\n/* focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 — and\r\n the OPEN state, which keeps the ring while the keyboard is in the panel */\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-trigger],.mono-dropdown-table-trigger):focus-visible,\r\n:is([mono-dropdown-table],.mono-dropdown-table):is([mono-open],.open) :is([mono-dd-trigger],.mono-dropdown-table-trigger) {\r\n --_mono-dropdown-table-bc: var(--_mono-dropdown-table-ring-color);\r\n --_mono-dropdown-table-ring: 0 0 0 var(--_mono-dropdown-table-ring-width) color-mix(in oklab, var(--_mono-dropdown-table-ring-color) var(--_mono-dropdown-table-ring-alpha), transparent);\r\n}\r\n\r\n/* basecoat@1.0.2 styles/vega.css .combobox-chips — has-[[aria-invalid=true]]:border-destructive\r\n has-[[aria-invalid=true]]:ring-3 has-[[aria-invalid=true]]:ring-destructive/20 */\r\n:is([mono-dropdown-table],.mono-dropdown-table):is([mono-validation-state=\"invalid\"],:where(.mono-dropdown-table.is-invalid)) :is([mono-dd-trigger],.mono-dropdown-table-trigger) {\r\n --_mono-dropdown-table-bc: var(--mono-mode-invalid-border);\r\n --_mono-dropdown-table-ring: 0 0 0 var(--_mono-dropdown-table-ring-width) var(--mono-mode-invalid-ring);\r\n}\r\n\r\n/* EXTENSION — valid / warning are the invalid pattern in the role's colour */\r\n:is([mono-dropdown-table],.mono-dropdown-table):is([mono-validation-state=\"valid\"],:where(.mono-dropdown-table.is-valid)) :is([mono-dd-trigger],.mono-dropdown-table-trigger) {\r\n --_mono-dropdown-table-bc: color-mix(in oklab, var(--_mono-dropdown-table-valid) var(--mono-mode-state-border-alpha), transparent);\r\n --_mono-dropdown-table-ring: 0 0 0 var(--_mono-dropdown-table-ring-width) color-mix(in oklab, var(--_mono-dropdown-table-valid) var(--mono-mode-state-ring-alpha), transparent);\r\n}\r\n:is([mono-dropdown-table],.mono-dropdown-table):is([mono-validation-state=\"warning\"],:where(.mono-dropdown-table.is-warning)) :is([mono-dd-trigger],.mono-dropdown-table-trigger) {\r\n --_mono-dropdown-table-bc: color-mix(in oklab, var(--_mono-dropdown-table-warning) var(--mono-mode-state-border-alpha), transparent);\r\n --_mono-dropdown-table-ring: 0 0 0 var(--_mono-dropdown-table-ring-width) color-mix(in oklab, var(--_mono-dropdown-table-warning) var(--mono-mode-state-ring-alpha), transparent);\r\n}\r\n\r\n/* EXTENSION — readonly: a muted surface */\r\n:is([mono-dropdown-table],.mono-dropdown-table):is([mono-readonly],.readonly) :is([mono-dd-trigger],.mono-dropdown-table-trigger) {\r\n background: var(--mono-dropdown-table-readonly-bg, var(--mono-tag-input-readonly-bg, var(--muted)));\r\n cursor: default;\r\n}\r\n\r\n/* .combobox-chips > input:disabled — opacity-50 (on the box, so the chips fade\r\n with it). The strip's ‹ › pager opts back in so the chips can still be read. */\r\n:is([mono-dropdown-table],.mono-dropdown-table):is([mono-disabled],.disabled) :is([mono-dd-trigger],.mono-dropdown-table-trigger) {\r\n opacity: 0.5;\r\n pointer-events: none;\r\n cursor: not-allowed;\r\n background: var(--mono-dropdown-table-disabled-bg, var(--mono-tag-input-disabled-bg, var(--_mono-dropdown-table-bg)));\r\n}\r\n\r\n:is([mono-dropdown-table],.mono-dropdown-table):is([mono-disabled],.disabled) :is([mono-dd-scroll],.mono-dropdown-table-scroll):not(:is([mono-idle],.is-idle)) {\r\n pointer-events: auto;\r\n cursor: pointer;\r\n}\r\n\r\n/* ── the value area: chips (multi) or one line of text ────────────────── */\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-value],.mono-dropdown-table-value) {\r\n flex: 1 1 auto;\r\n display: flex;\r\n flex-wrap: wrap;\r\n align-items: center;\r\n gap: var(--_mono-dropdown-table-gap);\r\n min-width: 0;\r\n /* the chip row is the box's height; an empty value never exceeds it */\r\n min-height: var(--_mono-dropdown-table-chip-height);\r\n overflow: hidden;\r\n color: var(--_mono-dropdown-table-text);\r\n}\r\n\r\n/* EXTENSION — a text value (single select, or the placeholder) sits where a\r\n `.select` puts its text (px-3), not where a chip does (px-1.5): the inset is\r\n what keeps this field's text in line with a `<mono-select>` beside it. */\r\n:is([mono-dropdown-table],.mono-dropdown-table):not([mono-multiple][mono-has-value]) :is([mono-dd-value],.mono-dropdown-table-value) {\r\n padding-inline-start: var(--mono-dropdown-table-text-inset, calc(var(--mono-spacing) * 1.5));\r\n}\r\n\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-value],.mono-dropdown-table-value):is([mono-dd-placeholder],.mono-dropdown-table-placeholder) {\r\n color: var(--_mono-dropdown-table-placeholder);\r\n white-space: nowrap;\r\n}\r\n\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-value],.mono-dropdown-table-value) > span {\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n}\r\n\r\n/* =========================================\r\n Chips\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 components/combobox.css .combobox-chip — inline-flex w-fit\r\n shrink-0 items-center whitespace-nowrap */\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-chip],.mono-dropdown-table-chip) {\r\n display: inline-flex;\r\n width: fit-content;\r\n max-width: 100%;\r\n flex-shrink: 0;\r\n align-items: center;\r\n white-space: nowrap;\r\n vertical-align: middle;\r\n line-height: 1;\r\n}\r\n\r\n/* basecoat@1.0.2 styles/vega.css .combobox-chip — h-5.5 gap-1 rounded-sm bg-muted\r\n px-1.5 text-xs font-medium text-foreground, has-[>.combobox-chip-remove]:pe-0 */\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-chip],.mono-dropdown-table-chip) > [mono-dd-chip-main] {\r\n display: inline-flex;\r\n align-items: center;\r\n height: var(--_mono-dropdown-table-chip-height);\r\n max-width: 100%;\r\n gap: var(--mono-dropdown-table-chip-content-gap, var(--mono-tag-input-chip-content-gap, var(--mono-spacing)));\r\n margin: 0;\r\n padding-inline: var(--mono-dropdown-table-chip-padding-x, var(--mono-tag-input-chip-padding-x, calc(var(--mono-spacing) * 1.5)));\r\n border: 0;\r\n border-radius: var(--mono-dropdown-table-chip-radius, var(--mono-tag-input-chip-radius, var(--mono-radius-sm)));\r\n background: var(--mono-dropdown-table-chip-bg, var(--mono-tag-input-chip-bg, var(--muted)));\r\n color: var(--mono-dropdown-table-chip-color, var(--mono-tag-input-chip-color, var(--_mono-dropdown-table-text)));\r\n font-family: inherit;\r\n font-size: var(--_mono-dropdown-table-chip-font-size);\r\n line-height: var(--_mono-dropdown-table-chip-line-height);\r\n font-weight: var(--mono-dropdown-table-chip-font-weight, var(--mono-tag-input-chip-font-weight, var(--mono-font-weight-medium)));\r\n text-decoration: none;\r\n cursor: default;\r\n}\r\n\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-chip],.mono-dropdown-table-chip)[mono-dd-removable] > [mono-dd-chip-main] {\r\n padding-inline-end: 0;\r\n}\r\n\r\n/* EXTENSION — `chip.rounded`: the chip's own corner scale over the combobox\r\n chip's rounded-sm (the same words `<mono-chip rounded>` takes) */\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-chip],.mono-dropdown-table-chip)[mono-dd-chip-rounded=\"none\"] > [mono-dd-chip-main] { border-radius: 0; }\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-chip],.mono-dropdown-table-chip)[mono-dd-chip-rounded=\"xs\"] > [mono-dd-chip-main] { border-radius: var(--mono-radius-xs); }\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-chip],.mono-dropdown-table-chip)[mono-dd-chip-rounded=\"sm\"] > [mono-dd-chip-main] { border-radius: var(--mono-radius-sm); }\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-chip],.mono-dropdown-table-chip)[mono-dd-chip-rounded=\"md\"] > [mono-dd-chip-main] { border-radius: var(--mono-radius-md); }\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-chip],.mono-dropdown-table-chip)[mono-dd-chip-rounded=\"lg\"] > [mono-dd-chip-main] { border-radius: var(--mono-radius-lg); }\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-chip],.mono-dropdown-table-chip)[mono-dd-chip-rounded=\"xl\"] > [mono-dd-chip-main] { border-radius: var(--mono-radius-xl); }\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-chip],.mono-dropdown-table-chip)[mono-dd-chip-rounded=\"xxl\"] > [mono-dd-chip-main] { border-radius: var(--mono-radius-2xl); }\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-chip],.mono-dropdown-table-chip)[mono-dd-chip-rounded=\"full\"] > [mono-dd-chip-main] { border-radius: var(--mono-radius-full); }\r\n\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-chip],.mono-dropdown-table-chip) [mono-dd-chip-content] {\r\n display: inline-flex;\r\n align-items: center;\r\n gap: inherit;\r\n min-width: 0;\r\n max-width: 100%;\r\n height: 100%;\r\n}\r\n\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-chip],.mono-dropdown-table-chip) [mono-dd-chip-label] {\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n}\r\n\r\n/* EXTENSION — `chip.dot`: a coloured dot before the label (the badge's dot idiom) */\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-chip],.mono-dropdown-table-chip) [mono-dd-chip-dot] {\r\n flex: 0 0 auto;\r\n width: calc(var(--mono-spacing) * 1.5);\r\n height: calc(var(--mono-spacing) * 1.5);\r\n border-radius: var(--mono-radius-full);\r\n background: currentColor;\r\n}\r\n\r\n/* EXTENSION — `chip.color` pins a hue: the tonal pattern (bg-x/10 text-x, dark 20).\r\n Without one the chips follow the field's `color` — the ring colour — the way\r\n they always did here. */\r\n:is([mono-dropdown-table],.mono-dropdown-table):not(:is(:not([mono-color]), :is([mono-color=\"primary\"],:where(.mono-dropdown-table.primary)))) :is([mono-dd-chip],.mono-dropdown-table-chip):not([mono-dd-chip-color]) > [mono-dd-chip-main] {\r\n background: color-mix(in oklab, var(--_mono-dropdown-table-ring-color) var(--mono-mode-tint), transparent);\r\n color: var(--_mono-dropdown-table-ring-color);\r\n}\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-chip],.mono-dropdown-table-chip)[mono-dd-chip-color=\"primary\"] > [mono-dd-chip-main] { background: color-mix(in oklab, var(--primary) var(--mono-mode-tint), transparent); color: var(--primary); }\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-chip],.mono-dropdown-table-chip)[mono-dd-chip-color=\"secondary\"] > [mono-dd-chip-main] { background: var(--secondary); color: var(--secondary-foreground); }\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-chip],.mono-dropdown-table-chip)[mono-dd-chip-color=\"success\"] > [mono-dd-chip-main] { background: color-mix(in oklab, var(--success) var(--mono-mode-tint), transparent); color: var(--success); }\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-chip],.mono-dropdown-table-chip)[mono-dd-chip-color=\"danger\"] > [mono-dd-chip-main] { background: color-mix(in oklab, var(--destructive) var(--mono-mode-tint), transparent); color: var(--destructive); }\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-chip],.mono-dropdown-table-chip)[mono-dd-chip-color=\"warning\"] > [mono-dd-chip-main] { background: color-mix(in oklab, var(--warning) var(--mono-mode-tint), transparent); color: var(--warning); }\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-chip],.mono-dropdown-table-chip)[mono-dd-chip-color=\"info\"] > [mono-dd-chip-main] { background: color-mix(in oklab, var(--info) var(--mono-mode-tint), transparent); color: var(--info); }\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-chip],.mono-dropdown-table-chip)[mono-dd-chip-color=\"teal\"] > [mono-dd-chip-main] { background: color-mix(in oklab, var(--teal) var(--mono-mode-tint), transparent); color: var(--teal); }\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-chip],.mono-dropdown-table-chip)[mono-dd-chip-color=\"purple\"] > [mono-dd-chip-main] { background: color-mix(in oklab, var(--purple) var(--mono-mode-tint), transparent); color: var(--purple); }\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-chip],.mono-dropdown-table-chip)[mono-dd-chip-color=\"neutral\"] > [mono-dd-chip-main] { background: color-mix(in oklab, var(--neutral) var(--mono-mode-tint), transparent); color: var(--neutral); }\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-chip],.mono-dropdown-table-chip)[mono-dd-chip-color=\"dark\"] > [mono-dd-chip-main] { background: var(--dark); color: var(--dark-foreground); }\r\n\r\n/* basecoat@1.0.2 components/combobox.css .combobox-chip-remove — inline-flex\r\n shrink-0 items-center justify-center */\r\n/* basecoat@1.0.2 styles/vega.css .combobox-chip-remove — -ms-1 opacity-50\r\n hover:opacity-100, svg size-3.5 */\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-chip],.mono-dropdown-table-chip) [mono-dd-chip-close] {\r\n display: inline-flex;\r\n flex-shrink: 0;\r\n align-items: center;\r\n justify-content: center;\r\n /* explicit: the element still carries chip.css's `.chip-close` class as a hook,\r\n which pins a 1rem box — the raw markup has no such class */\r\n width: auto;\r\n height: 100%;\r\n min-width: 0;\r\n margin: 0;\r\n transform: none;\r\n margin-inline-start: calc(var(--mono-spacing) * -1);\r\n padding: 0 var(--mono-spacing);\r\n border: 0;\r\n border-radius: inherit;\r\n background: transparent;\r\n color: inherit;\r\n font: inherit;\r\n line-height: 1;\r\n opacity: 0.5;\r\n cursor: pointer;\r\n outline-style: none;\r\n transition-property: opacity;\r\n transition-timing-function: var(--mono-ease);\r\n transition-duration: var(--mono-duration);\r\n}\r\n\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-chip],.mono-dropdown-table-chip) [mono-dd-chip-close]:focus-visible {\r\n opacity: 1;\r\n}\r\n\r\n@media (hover: hover) {\r\n :is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-chip],.mono-dropdown-table-chip) [mono-dd-chip-close]:hover {\r\n opacity: 1;\r\n }\r\n}\r\n\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-chip],.mono-dropdown-table-chip) [mono-dd-chip-close] > :is(svg, .mono-icon, :is([mono-icon],.mono-icon)) {\r\n display: block;\r\n width: calc(var(--mono-spacing) * 3.5);\r\n height: calc(var(--mono-spacing) * 3.5);\r\n pointer-events: none;\r\n}\r\n\r\n/* EXTENSION — the \"+N more\" counter chip is a control */\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-chip],.mono-dropdown-table-chip):is([mono-dd-more],.mono-dropdown-table-more) > [mono-dd-chip-main] {\r\n cursor: pointer;\r\n outline-style: none;\r\n}\r\n\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-chip],.mono-dropdown-table-chip):is([mono-dd-more],.mono-dropdown-table-more) > [mono-dd-chip-main]:focus-visible {\r\n box-shadow: 0 0 0 var(--_mono-dropdown-table-ring-width) color-mix(in oklab, var(--_mono-dropdown-table-ring-color) var(--_mono-dropdown-table-ring-alpha), transparent);\r\n}\r\n\r\n@media (hover: hover) {\r\n :is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-chip],.mono-dropdown-table-chip):is([mono-dd-more],.mono-dropdown-table-more) > [mono-dd-chip-main]:hover {\r\n background: var(--mono-mode-surface-hover);\r\n }\r\n}\r\n\r\n/* ── the inline chip strip (`chip.behaviour: 'inline'`) ──────────────────\r\n One line that never grows: the value stops wrapping, the chips live in their\r\n own strip, and the strip absorbs the overflow instead of the field.\r\n\r\n `overflow-x: hidden` — NOT `auto` — is the whole scroll contract. Hidden still\r\n honours a programmatic `scrollLeft`, so `ChipStripController` can page the\r\n strip while the browser paints no scrollbar and refuses to scroll it from the\r\n wheel, a click-drag or the arrow keys. */\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-value],.mono-dropdown-table-value):is([mono-inline],.is-inline) {\r\n flex-wrap: nowrap;\r\n}\r\n\r\n/* Two attributes deliberately: the strip is a direct `span` child of the value\r\n area, so the `[mono-dd-value] > span` ellipsis rule above matches it too. */\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-value],.mono-dropdown-table-value) > :is([mono-dd-chip-strip],.mono-dropdown-table-chip-strip) {\r\n display: flex;\r\n flex-wrap: nowrap;\r\n align-items: center;\r\n gap: var(--_mono-dropdown-table-gap);\r\n flex: 0 1 auto;\r\n min-width: 0;\r\n overflow-x: hidden;\r\n overflow-y: hidden;\r\n text-overflow: clip;\r\n /* NO `scroll-behavior: smooth` — see ChipStripController (one scroll event per\r\n frame would reposition every open popup). */\r\n}\r\n\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-chip-strip],.mono-dropdown-table-chip-strip) > * {\r\n flex-shrink: 0;\r\n}\r\n\r\n/* =========================================\r\n Actions — ‹ › pager, clear, caret\r\n ========================================= */\r\n\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-actions],.mono-dropdown-table-actions) {\r\n display: flex;\r\n align-items: center;\r\n gap: var(--mono-spacing);\r\n flex: 0 0 auto;\r\n line-height: 1;\r\n /* The row's buttons are size-6 — 2px taller than a chip — and they sit IN the\r\n flex row (centred beside a wrapping value, unlike tag-input's pinned corner),\r\n so on their own they would floor the field 2px above the token. A negative\r\n block margin folds that back: the row costs exactly one chip height. */\r\n margin-block: calc((var(--_mono-dropdown-table-chip-height) - var(--_mono-dropdown-table-action)) / 2);\r\n}\r\n\r\n/* basecoat@1.0.2 components/combobox.css .combobox [data-clear] — size-6 border-0\r\n bg-transparent p-0 text-current; the caret ≡ .combobox-trigger-icon (size-4\r\n text-muted-foreground), the pager the same box. Painted as .btn[data-variant='ghost']. */\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-clear],.mono-dropdown-table-clear),\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-arrow],.mono-dropdown-table-arrow),\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-scroll],.mono-dropdown-table-scroll) {\r\n display: inline-flex;\r\n align-items: center;\r\n justify-content: center;\r\n flex: 0 0 auto;\r\n width: var(--_mono-dropdown-table-action);\r\n height: var(--_mono-dropdown-table-action);\r\n margin: 0;\r\n padding: 0;\r\n border: 0;\r\n border-radius: var(--mono-dropdown-table-clear-radius, var(--mono-tag-input-clear-radius, calc(var(--radius) - 5px)));\r\n background: transparent;\r\n color: var(--_mono-dropdown-table-muted);\r\n font: inherit;\r\n line-height: 1;\r\n cursor: pointer;\r\n outline-style: none;\r\n transition-property: color, background-color, transform;\r\n transition-timing-function: var(--mono-ease);\r\n transition-duration: var(--mono-duration);\r\n}\r\n\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is(:is([mono-dd-clear],.mono-dropdown-table-clear), :is([mono-dd-arrow],.mono-dropdown-table-arrow), :is([mono-dd-scroll],.mono-dropdown-table-scroll)) > :is(svg, .mono-icon, :is([mono-icon],.mono-icon)) {\r\n display: block;\r\n width: var(--_mono-dropdown-table-icon);\r\n height: var(--_mono-dropdown-table-icon);\r\n pointer-events: none;\r\n transition-property: transform;\r\n transition-timing-function: var(--mono-ease);\r\n transition-duration: var(--mono-duration);\r\n}\r\n\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-clear],.mono-dropdown-table-clear) > :is(svg, .mono-icon, :is([mono-icon],.mono-icon)) {\r\n width: var(--_mono-dropdown-table-clear-glyph);\r\n height: var(--_mono-dropdown-table-clear-glyph);\r\n}\r\n\r\n/* basecoat@1.0.2 styles/vega.css .btn[data-variant='ghost'] — hover:bg-muted hover:text-foreground */\r\n@media (hover: hover) {\r\n :is([mono-dropdown-table],.mono-dropdown-table) :is(:is([mono-dd-clear],.mono-dropdown-table-clear), :is([mono-dd-arrow],.mono-dropdown-table-arrow), :is([mono-dd-scroll],.mono-dropdown-table-scroll)):hover {\r\n background: var(--mono-mode-ghost-hover);\r\n color: var(--_mono-dropdown-table-text);\r\n }\r\n}\r\n\r\n/* EXTENSION — the caret turns while the panel is open */\r\n:is([mono-dropdown-table],.mono-dropdown-table):is([mono-open],.open) :is([mono-dd-arrow],.mono-dropdown-table-arrow) > :is(svg, .mono-icon, :is([mono-icon],.mono-icon)) {\r\n transform: rotate(180deg);\r\n}\r\n\r\n/* At an end of the strip the pager keeps its box but disappears — hiding it with\r\n `display: none` would shrink the row and shove the strip sideways mid-click. */\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-scroll],.mono-dropdown-table-scroll):is([mono-idle],.is-idle) {\r\n visibility: hidden;\r\n pointer-events: none;\r\n}\r\n\r\n/* =========================================\r\n The \"+N more\" overflow panel — a popover holding the overflow chips\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 styles/vega.css .combobox [data-popover] — bg-popover ring-1\r\n ring-foreground/10 rounded-md shadow-md; EXTENSION: p-1.5 gap-1.5 flex-wrap.\r\n Portaled to <body> and placed `fixed` from the \"+N more\" chip by its own\r\n popup controller in the light build; in the shadow build `_positionMorePanel`\r\n runs the same math in place — the absolute rule is the pre-placement fallback. */\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-more],.mono-dropdown-table-more) {\r\n position: absolute;\r\n top: calc(100% + calc(var(--mono-spacing) * 1.5));\r\n left: 0;\r\n z-index: var(--mono-popup-z, 1000);\r\n display: none;\r\n flex-wrap: wrap;\r\n align-items: flex-start;\r\n gap: var(--_mono-dropdown-table-gap);\r\n max-width: 20rem;\r\n /* `--mono-popup-avail-h` = the room left on the side the panel opened on. */\r\n max-height: min(14rem, var(--mono-popup-avail-h, 100vh));\r\n overflow: auto;\r\n /* Portaled + anchored: a chained scroll would drag this panel off-screen. */\r\n overscroll-behavior: contain;\r\n padding: calc(var(--mono-spacing) * 1.5);\r\n border-radius: var(--mono-dropdown-table-dropdown-radius, var(--mono-tag-input-dropdown-radius, var(--mono-radius-md)));\r\n background: var(--mono-dropdown-table-dropdown-bg, var(--mono-tag-input-dropdown-bg, var(--popover)));\r\n color: var(--mono-dropdown-table-dropdown-color, var(--mono-tag-input-dropdown-color, var(--popover-foreground)));\r\n box-shadow: var(--mono-dropdown-table-dropdown-ring, var(--mono-tag-input-dropdown-ring, 0 0 0 1px color-mix(in oklab, var(--foreground) 10%, transparent))), var(--mono-dropdown-table-dropdown-shadow, var(--mono-tag-input-dropdown-shadow, var(--mono-shadow-md)));\r\n}\r\n\r\n:is([mono-dropdown-table],.mono-dropdown-table):is([mono-more-open],.more-open) :is([mono-dd-more],.mono-dropdown-table-more) {\r\n display: flex;\r\n}\r\n\r\n/* =========================================\r\n The panel — sized by the `dropdown` prop, NOT the field\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 components/popover.css [data-popover] — absolute z-50 overflow;\r\n mono: `display: none` while closed, `position: fixed` (the popup controller\r\n sets top/left), `--mono-popup-z` from the shared stack */\r\n/* basecoat@1.0.2 styles/vega.css .combobox [data-popover] — bg-popover\r\n text-popover-foreground ring-foreground/10 rounded-md p-0 shadow-md ring-1;\r\n EXTENSION: a flex column of three regions, the middle one scrolling */\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-panel],.mono-dropdown-table-panel) {\r\n display: none;\r\n position: fixed;\r\n z-index: var(--mono-popup-z, 1000);\r\n flex-direction: column;\r\n width: max-content;\r\n min-width: var(--mono-dropdown-table-dropdown-min-width, 18rem);\r\n max-width: min(90vw, 60rem);\r\n /* Two independent caps, combined so neither can clobber the other:\r\n --_mono-dropdown-table-panel-max-h the consumer's `:dropdown.prop=\"{ maxHeight }\"` (else 60vh)\r\n --mono-popup-avail-h the room actually left between the field and the\r\n viewport edge on the side the panel opened on */\r\n max-height: min(var(--_mono-dropdown-table-panel-max-h, 60vh), var(--mono-popup-avail-h, 100vh));\r\n overflow: hidden;\r\n isolation: isolate;\r\n border-radius: var(--mono-dropdown-table-dropdown-radius, var(--mono-tag-input-dropdown-radius, var(--mono-radius-md)));\r\n background: var(--mono-dropdown-table-dropdown-bg, var(--mono-tag-input-dropdown-bg, var(--popover)));\r\n color: var(--mono-dropdown-table-dropdown-color, var(--mono-tag-input-dropdown-color, var(--popover-foreground)));\r\n box-shadow: var(--mono-dropdown-table-dropdown-ring, var(--mono-tag-input-dropdown-ring, 0 0 0 1px color-mix(in oklab, var(--foreground) 10%, transparent))), var(--mono-dropdown-table-dropdown-shadow, var(--mono-tag-input-dropdown-shadow, var(--mono-shadow-md)));\r\n font-size: var(--_mono-dropdown-table-font-size);\r\n line-height: var(--_mono-dropdown-table-line-height);\r\n outline-style: none;\r\n}\r\n\r\n:is([mono-dropdown-table],.mono-dropdown-table):is([mono-open],.open) :is([mono-dd-panel],.mono-dropdown-table-panel) {\r\n display: flex;\r\n}\r\n\r\n/* The panel is a container; its own ring would just outline the whole popup. */\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-panel],.mono-dropdown-table-panel):focus,\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-panel],.mono-dropdown-table-panel):focus-visible {\r\n outline: none;\r\n}\r\n\r\n/* EXTENSION — the search box above the rows, the pager below, on hairlines */\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-region=\"search\"],:where(.mono-dropdown-table-region.search)) {\r\n flex: 0 0 auto;\r\n padding: var(--mono-dropdown-table-region-padding, calc(var(--mono-spacing) * 2));\r\n border-bottom: var(--mono-border-width) solid var(--border);\r\n}\r\n\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-region=\"body\"],:where(.mono-dropdown-table-region.body)) {\r\n flex: 1 1 auto;\r\n /* `min-height: 0` lets the body shrink below its content height inside the flex\r\n column — without it the region floors at its intrinsic size and the panel\r\n overflows its own max-height instead of scrolling the table. */\r\n min-height: 0;\r\n overflow: auto;\r\n overscroll-behavior: contain;\r\n}\r\n\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-region=\"foot\"],:where(.mono-dropdown-table-region.foot)) {\r\n flex: 0 0 auto;\r\n padding: var(--mono-dropdown-table-region-padding, calc(var(--mono-spacing) * 2));\r\n border-top: var(--mono-border-width) solid var(--border);\r\n}\r\n\r\n/* light: a region with nothing captured is `:empty`; shadow: regions wrap a\r\n `<slot>` (never `:empty`), so the element marks an unassigned one `mono-empty` */\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-region],.mono-dropdown-table-region):empty,\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-region],.mono-dropdown-table-region)[mono-empty] {\r\n display: none;\r\n}\r\n\r\n/* =========================================\r\n The rows — the ported table's own rows, in TWO contexts\r\n -----------------------------------------\r\n light: the captured `<table mono-table>` inside the (portaled) body region;\r\n shadow: the SLOTTED table — a light-DOM child of the host, so the host tag is\r\n the scope (these rules reach it from the page sheet, not the shadow one).\r\n\r\n A picked row is the TABLE's `mono-selected` row (the element sets it, the same\r\n attribute `<mono-table-checkbox>` sets), so the table's own wash + rail paint\r\n it and a flavour that retunes `--mono-table-selected-bg` retunes it here. The\r\n keyboard cursor is Basecoat's `.active` option — the `--muted` row, like hover.\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 styles/vega.css .table tr — hover:bg-muted/50; the table ships\r\n with hover off, the picker turns it on through the table's PUBLIC knob */\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-region=\"body\"],:where(.mono-dropdown-table-region.body)),\r\nmono-shadow-dropdown-table {\r\n --mono-table-hover-bg: var(--mono-dropdown-table-row-hover-bg, color-mix(in oklab, var(--muted) 50%, var(--mono-table-surface, var(--background))));\r\n}\r\n\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-region=\"body\"],:where(.mono-dropdown-table-region.body)) :is([mono-table],.mono-table) tbody tr[data-row-key],\r\nmono-shadow-dropdown-table :is([mono-table],.mono-table) tbody tr[data-row-key] {\r\n cursor: pointer;\r\n}\r\n\r\n/* basecoat@1.0.2 styles/vega.css .select:not(select) [role='option'].active, .select:not(select) [role='option']:focus-visible — bg-muted text-foreground\r\n Written the way table.css asks a row state to be written:\r\n the row-colour variable AND the paint, so a pinned cell follows. */\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-region=\"body\"],:where(.mono-dropdown-table-region.body)) :is([mono-table],.mono-table) tbody tr:is([mono-dd-active],.mono-dd-row-active),\r\nmono-shadow-dropdown-table :is([mono-table],.mono-table) tbody tr:is([mono-dd-active],.mono-dd-row-active) {\r\n --_mono-table-row-bg: var(--mono-dropdown-table-row-active-bg, var(--mono-tag-input-option-active-bg, var(--muted)));\r\n background: var(--_mono-table-row-bg);\r\n}\r\n\r\n:is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-region=\"body\"],:where(.mono-dropdown-table-region.body)) :is([mono-table],.mono-table) tbody tr:is([mono-selected],.mono-dd-row-selected) > td,\r\nmono-shadow-dropdown-table :is([mono-table],.mono-table) tbody tr:is([mono-selected],.mono-dd-row-selected) > td {\r\n font-weight: var(--mono-font-weight-medium);\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:is([mono-dropdown-table],.mono-dropdown-table) > :is([mono-dd-message],.mono-dropdown-table-message) {\r\n display: block;\r\n margin-top: var(--_mono-dropdown-table-gap-y);\r\n font-size: var(--mono-dropdown-table-message-font-size, var(--mono-tag-input-message-font-size, var(--mono-text-sm)));\r\n line-height: var(--mono-dropdown-table-message-line-height, var(--mono-tag-input-message-line-height, var(--mono-leading-normal)));\r\n font-weight: var(--mono-font-weight-normal);\r\n text-align: start;\r\n color: var(--_mono-dropdown-table-muted);\r\n}\r\n\r\n/* basecoat@1.0.2 styles/vega.css .field [role=\"alert\"] — text-destructive text-sm */\r\n:is([mono-dropdown-table],.mono-dropdown-table) > :is([mono-dd-message=\"invalid\"],:where(.mono-dropdown-table-message.invalid)) {\r\n color: var(--_mono-dropdown-table-invalid);\r\n}\r\n\r\n:is([mono-dropdown-table],.mono-dropdown-table) > :is([mono-dd-message=\"valid\"],:where(.mono-dropdown-table-message.valid)) {\r\n color: var(--_mono-dropdown-table-valid);\r\n}\r\n\r\n:is([mono-dropdown-table],.mono-dropdown-table) > :is([mono-dd-message=\"warning\"],:where(.mono-dropdown-table-message.warning)) {\r\n color: var(--_mono-dropdown-table-warning);\r\n}\r\n\r\n@media (prefers-reduced-motion: reduce) {\r\n :is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-trigger],.mono-dropdown-table-trigger),\r\n :is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-clear],.mono-dropdown-table-clear),\r\n :is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-arrow],.mono-dropdown-table-arrow),\r\n :is([mono-dropdown-table],.mono-dropdown-table) :is([mono-dd-scroll],.mono-dropdown-table-scroll),\r\n :is([mono-dropdown-table],.mono-dropdown-table) [mono-dd-chip-close] {\r\n transition: none;\r\n }\r\n}\r\n";
1225
+ //#endregion
1226
+ //#region src/components/dropdown-table/mono-dropdown-table.shadow.ts
1227
+ var MonoDropdownTableShadow = class MonoDropdownTableShadow extends withShadowUtilityStyles(MonoDropdownTableCore(LitElement)) {
1228
+ constructor(..._args) {
1229
+ super(..._args);
1230
+ this._onSlotChange = () => {
1231
+ this._scanRegions();
1232
+ this.requestUpdate();
1233
+ };
1234
+ }
1235
+ static {
1236
+ this.disableWarning?.("change-in-update");
1237
+ }
1238
+ static {
1239
+ this.styles = [unsafeCSS(toShadowCss(dropdown_table_default, { host: "mono-dropdown-table" }))];
1240
+ }
1241
+ connectedCallback() {
1242
+ super.connectedCallback();
1243
+ if (isServer) return;
1244
+ flushSsrHydration(this);
1245
+ }
1246
+ firstUpdated(changed) {
1247
+ super.firstUpdated(changed);
1248
+ if (!isServer) this._scanRegions();
1249
+ }
1250
+ /** Mark a region whose `<slot>` has no assigned content `mono-empty` (light uses `:empty`). */
1251
+ _scanRegions() {
1252
+ if (isServer) return;
1253
+ this.renderRoot.querySelectorAll("[mono-dd-region]").forEach((region) => {
1254
+ const slot = region.querySelector("slot");
1255
+ const has = !!slot && slot.assignedNodes({ flatten: true }).some((n) => n.nodeType === Node.ELEMENT_NODE || !!(n.textContent ?? "").trim());
1256
+ region.toggleAttribute("mono-empty", !has);
1257
+ });
1258
+ }
1259
+ /** Native `<slot>` per region (body = the default unnamed slot for the `<table>`). */
1260
+ _renderRegion(cls, name) {
1261
+ return html`<div class="mono-dropdown-table-region ${cls}" mono-dd-region=${cls}>${name === "body" ? html`<slot @slotchange=${this._onSlotChange}></slot>` : html`<slot name=${name} @slotchange=${this._onSlotChange}></slot>`}</div>`;
1262
+ }
1263
+ };
1264
+ MonoDropdownTableShadow = __decorate([customElement("mono-shadow-dropdown-table")], MonoDropdownTableShadow);
1265
+ //#endregion
1266
+ //#region src/components/dropdown-table/mono-data-dropdown.ts
1267
+ function monoDataDropdown(source = null, opts = {}) {
1268
+ const keyExpr = opts.keyExpr ?? "Id";
1269
+ const displayExpr = opts.displayExpr;
1270
+ const multiple = !!opts.multiple;
1271
+ const { state: _stateRef, max: _optMax, min: _optMin, ...gridOpts } = opts;
1272
+ const grid = monoDataGrid(source, gridOpts);
1273
+ const optionLimits = {
1274
+ max: opts.max,
1275
+ min: opts.min
1276
+ };
1277
+ let elementLimits = {};
1278
+ function effectiveLimits() {
1279
+ return {
1280
+ max: elementLimits.max ?? optionLimits.max,
1281
+ min: elementLimits.min ?? optionLimits.min
1282
+ };
1283
+ }
1284
+ function applyLimits() {
1285
+ const { max, min } = effectiveLimits();
1286
+ grid.check().configure({
1287
+ max: max ?? null,
1288
+ min: min ?? null
1289
+ });
1290
+ }
1291
+ function setLimits(next) {
1292
+ if (next.max === elementLimits.max && next.min === elementLimits.min) return;
1293
+ elementLimits = {
1294
+ max: next.max,
1295
+ min: next.min
1296
+ };
1297
+ applyLimits();
1298
+ notify();
1299
+ }
1300
+ if (multiple) applyLimits();
1301
+ /** The field element's own props — the one slot the inner grid knows nothing about. */
1302
+ const dropdownTableProps = { ...opts.props?.dropdownTable ?? {} };
1303
+ /** Merged element props: the grid's slots plus this dropdown's field slot. */
1304
+ function props() {
1305
+ return {
1306
+ ...grid.props(),
1307
+ dropdownTable: dropdownTableProps
1308
+ };
1309
+ }
1310
+ function propsSnapshot() {
1311
+ const g = grid.props();
1312
+ return {
1313
+ ...g,
1314
+ th: (g.th ?? []).map((c) => ({ ...c })),
1315
+ dropdownTable: { ...dropdownTableProps }
1316
+ };
1317
+ }
1318
+ const notifier = createNotifier({ onFlush: () => {
1319
+ if (opts.state) opts.state.value = propsSnapshot();
1320
+ } });
1321
+ const notify = notifier.notify;
1322
+ let _value = multiple ? [] : null;
1323
+ const cache = /* @__PURE__ */ new Map();
1324
+ const keyStr = (k) => String(k);
1325
+ /** Coerce a key to the source's key type (number vs string), inferred from a row. */
1326
+ function normKey(k) {
1327
+ if (k == null || k === "") return k;
1328
+ if (typeof grid.items[0]?.[keyExpr] === "number" && !Number.isNaN(Number(k))) return Number(k);
1329
+ return k;
1330
+ }
1331
+ function displayOf(row) {
1332
+ if (row == null) return "";
1333
+ if (typeof displayExpr === "function") return String(displayExpr(row) ?? "");
1334
+ if (typeof displayExpr === "string" && displayExpr) return String(row[displayExpr] ?? "");
1335
+ return String(row[keyExpr] ?? "");
1336
+ }
1337
+ function keysOf(v) {
1338
+ if (multiple) return Array.isArray(v) ? v : v == null ? [] : [v];
1339
+ return v == null ? [] : [v];
1340
+ }
1341
+ function cacheRow(key, data) {
1342
+ const nk = normKey(key);
1343
+ cache.set(keyStr(nk), {
1344
+ key: nk,
1345
+ text: displayOf(data),
1346
+ data
1347
+ });
1348
+ }
1349
+ /** Find a currently-loaded row by key (so a clicked row caches its display text). */
1350
+ function findRow(key) {
1351
+ const ks = keyStr(normKey(key));
1352
+ return grid.items.find((r) => keyStr(normKey(r?.[keyExpr])) === ks);
1353
+ }
1354
+ function emitChange() {
1355
+ ctrl.onValueChange?.(multiple ? checkedKeys() : _value);
1356
+ }
1357
+ /**
1358
+ * MULTI-SELECT IS THE GRID'S `check()` STORE — there is not a second one.
1359
+ *
1360
+ * The dropdown used to keep its own `_value` array beside the grid's selection,
1361
+ * which is why `<mono-table-checkbox>` could bind to `dd.table` and tick without
1362
+ * the chips ever moving: it drove the other store. Delegating means every
1363
+ * `mono-table-*` helper works in the panel the same way, and drain / `pending` /
1364
+ * per-page / the drain memo come from the grid instead of being reimplemented.
1365
+ *
1366
+ * `_value` stays the SINGLE-select store only, and remains the shape consumers
1367
+ * bind (`modelValue`): for multi it is derived from the check store on read.
1368
+ */
1369
+ const check = () => grid.check();
1370
+ /**
1371
+ * A row for `check()` to key by. It stores rows, but a selection can name a key
1372
+ * whose row is not loaded (a preset `modelValue`, or a key resolved later), so
1373
+ * fall back to a stub carrying just the key — `rowKeyOf` only reads `keyExpr`.
1374
+ */
1375
+ function rowFor(key, rowData) {
1376
+ const nk = normKey(key);
1377
+ return rowData ?? findRow(nk) ?? cache.get(keyStr(nk))?.data ?? { [keyExpr]: nk };
1378
+ }
1379
+ /** What is selected right now, whichever store owns it. */
1380
+ function currentKeys() {
1381
+ return multiple ? checkedKeys() : keysOf(_value);
1382
+ }
1383
+ /** The multi-select value, derived from the check store (insertion order). */
1384
+ function checkedKeys() {
1385
+ return check().rows().map((row) => normKey(row?.[keyExpr]));
1386
+ }
1387
+ function isSelected(key) {
1388
+ if (multiple) return check().isChecked(keyStr(normKey(key)));
1389
+ const ks = keyStr(normKey(key));
1390
+ return keysOf(_value).some((k) => keyStr(normKey(k)) === ks);
1391
+ }
1392
+ function toggleRow(key, rowData) {
1393
+ const nk = normKey(key);
1394
+ const data = rowData ?? findRow(nk);
1395
+ if (data !== void 0) cacheRow(nk, data);
1396
+ if (multiple) {
1397
+ const on = check().isChecked(keyStr(nk));
1398
+ check().toggle(rowFor(nk, data), !on);
1399
+ } else {
1400
+ _value = nk;
1401
+ setOpen(false);
1402
+ }
1403
+ emitChange();
1404
+ notify();
1405
+ }
1406
+ function removeKey(key) {
1407
+ const nk = normKey(key);
1408
+ if (multiple) check().toggle(rowFor(nk), false);
1409
+ else _value = null;
1410
+ emitChange();
1411
+ notify();
1412
+ }
1413
+ function clear() {
1414
+ if (multiple) check().clear();
1415
+ else _value = null;
1416
+ emitChange();
1417
+ notify();
1418
+ }
1419
+ /**
1420
+ * Rows this controller already holds, indexed by key — the check store first
1421
+ * (it keeps whole row objects, not just keys), then the loaded page.
1422
+ *
1423
+ * Built lazily and ONLY when a key actually missed the cache: after a drain
1424
+ * `check().rows()` can hold thousands of rows, and it allocates a fresh array
1425
+ * on every call, so touching it per render would be a real cost for nothing.
1426
+ */
1427
+ function heldRows() {
1428
+ const index = /* @__PURE__ */ new Map();
1429
+ const add = (row) => {
1430
+ const key = row?.[keyExpr];
1431
+ if (key === void 0 || key === null) return;
1432
+ const ks = keyStr(normKey(key));
1433
+ if (!index.has(ks)) index.set(ks, row);
1434
+ };
1435
+ for (const row of grid.items) add(row);
1436
+ if (multiple) for (const row of check().rows()) add(row);
1437
+ return index;
1438
+ }
1439
+ /**
1440
+ * Selected keys, labelled.
1441
+ *
1442
+ * A cache miss falls back to the rows already in memory before degrading to
1443
+ * `String(key)`. Without that, selecting through the GRID — which is what
1444
+ * `<mono-table-checkbox>` does, since it calls `check.selectAll()` directly
1445
+ * rather than `dd.selectAll()` — showed every chip as its own key: only
1446
+ * `selectAll()` primes the cache, and the grid subscription just notifies.
1447
+ * The row was in `check().rows()` the whole time.
1448
+ */
1449
+ function selectedItems() {
1450
+ const keys = currentKeys();
1451
+ let held;
1452
+ return keys.map((k) => {
1453
+ const nk = normKey(k);
1454
+ const ks = keyStr(nk);
1455
+ const hit = cache.get(ks);
1456
+ if (hit) return hit;
1457
+ held ??= heldRows();
1458
+ const row = held.get(ks);
1459
+ if (row === void 0) return {
1460
+ key: nk,
1461
+ text: String(nk),
1462
+ data: void 0
1463
+ };
1464
+ cacheRow(nk, row);
1465
+ return cache.get(ks) ?? {
1466
+ key: nk,
1467
+ text: displayOf(row),
1468
+ data: row
1469
+ };
1470
+ });
1471
+ }
1472
+ function displayText() {
1473
+ return selectedItems().map((i) => i.text).join(", ");
1474
+ }
1475
+ /**
1476
+ * Seed the display cache from rows you already hold, so `resolveSelected` has
1477
+ * nothing left to fetch. The point of `setValue`'s `rows` argument and of
1478
+ * {@link selectAll}: without it, setting N keys costs N/50 `in` requests to
1479
+ * re-read text that was already in hand.
1480
+ */
1481
+ function primeCache(rows) {
1482
+ if (!rows?.length) return;
1483
+ for (const row of rows) cacheRow(row?.[keyExpr], row);
1484
+ }
1485
+ function setValue(next, rows) {
1486
+ primeCache(rows);
1487
+ if (multiple) check().replace(keysOf(next).map((k) => rowFor(k)));
1488
+ else _value = next;
1489
+ resolveSelected();
1490
+ notify();
1491
+ }
1492
+ /**
1493
+ * Select every row the source can return — the dropdown's answer to the table's
1494
+ * `<mono-table-checkbox type="all" mode="all">`.
1495
+ *
1496
+ * `table.getData()` does the draining (chunked `store.load`, paging left alone)
1497
+ * and honours the live filter + search, so "search, then select all" selects the
1498
+ * matches and nothing else. The drained rows prime the cache, so this costs the
1499
+ * drain and NO display-resolution requests.
1500
+ *
1501
+ * Emits like `toggleRow` rather than going through `setValue`: `setValue` is the
1502
+ * inbound path (the element pushes `modelValue` down it) and deliberately does
1503
+ * not emit, so a silent bulk change would leave the element's `modelValue` stale
1504
+ * and the next push would overwrite the selection with it.
1505
+ */
1506
+ async function selectAll() {
1507
+ if (!multiple) return;
1508
+ await check().selectAll();
1509
+ primeCache(check().rows());
1510
+ emitChange();
1511
+ notify();
1512
+ }
1513
+ function setOpen(next) {
1514
+ if (ctrl.open === next) return;
1515
+ ctrl.open = next;
1516
+ notify();
1517
+ }
1518
+ function hasStore() {
1519
+ const s = grid.dataSource;
1520
+ return typeof s?.store === "function" && !!s.store();
1521
+ }
1522
+ function storeRows(res) {
1523
+ return Array.isArray(res) ? res : res?.data ?? [];
1524
+ }
1525
+ function chunk(arr, size) {
1526
+ const out = [];
1527
+ for (let i = 0; i < arr.length; i += size) out.push(arr.slice(i, i + size));
1528
+ return out;
1529
+ }
1530
+ const selectFields = () => typeof displayExpr === "string" && displayExpr ? [keyExpr, displayExpr] : void 0;
1531
+ async function resolveSelected() {
1532
+ const missing = currentKeys().filter((k) => !cache.has(keyStr(normKey(k))));
1533
+ if (!missing.length) return;
1534
+ const s = grid.dataSource;
1535
+ if (hasStore()) {
1536
+ const store = s.store();
1537
+ let rows = [];
1538
+ try {
1539
+ rows = (await Promise.all(chunk(missing, 50).map((part) => store.load({
1540
+ filter: [
1541
+ keyExpr,
1542
+ "in",
1543
+ part
1544
+ ],
1545
+ select: selectFields()
1546
+ })))).flatMap(storeRows);
1547
+ } catch {
1548
+ const orFilter = (arr) => arr.map((v) => [
1549
+ keyExpr,
1550
+ "=",
1551
+ v
1552
+ ]).reduce((a, b) => a ? [
1553
+ a,
1554
+ "or",
1555
+ b
1556
+ ] : b, null);
1557
+ rows = (await Promise.all(chunk(missing, 15).map((part) => store.load({
1558
+ filter: orFilter(part),
1559
+ select: selectFields()
1560
+ })))).flatMap(storeRows);
1561
+ }
1562
+ for (const row of rows) cacheRow(row?.[keyExpr], row);
1563
+ } else if (typeof s?.data === "function") {
1564
+ const all = s.data();
1565
+ const byKey = new Map(all.map((r) => [keyStr(r?.[keyExpr]), r]));
1566
+ for (const k of missing) {
1567
+ const row = byKey.get(keyStr(normKey(k)));
1568
+ if (row) cacheRow(k, row);
1569
+ }
1570
+ }
1571
+ notify();
1572
+ }
1573
+ const offGrid = grid.subscribe(() => notify());
1574
+ const ctrl = {
1575
+ grid,
1576
+ /** Alias of {@link grid} — the inner `controlMonoTable`. Preferred in new
1577
+ * code (`dd.table.load()` / `:control-table.prop="dd.table"`); `grid` stays. */
1578
+ table: grid,
1579
+ props,
1580
+ multiple,
1581
+ open: false,
1582
+ onValueChange: null,
1583
+ get value() {
1584
+ return multiple ? checkedKeys() : _value;
1585
+ },
1586
+ get selectAllPending() {
1587
+ return multiple ? check().pending : false;
1588
+ },
1589
+ set value(next) {
1590
+ setValue(next);
1591
+ },
1592
+ isSelected,
1593
+ limits: effectiveLimits,
1594
+ setLimits,
1595
+ toggleRow,
1596
+ removeKey,
1597
+ clear,
1598
+ selectAll,
1599
+ selectedItems,
1600
+ displayText,
1601
+ setValue,
1602
+ setOpen,
1603
+ resolveSelected,
1604
+ subscribe: notifier.subscribe,
1605
+ bind(next) {
1606
+ grid.bind(next);
1607
+ cache.clear();
1608
+ resolveSelected();
1609
+ notify();
1610
+ },
1611
+ dispose() {
1612
+ offGrid();
1613
+ notifier.clear();
1614
+ grid.dispose();
1615
+ }
1616
+ };
1617
+ return ctrl;
1618
+ }
1619
+ //#endregion
1620
+ export { MonoDropdownTableCore, MonoDropdownTableShadow, monoDataDropdown };