@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,901 @@
1
+ import { l as monoHostChildNodes } from "../mono-ui-CPV7rrdo.js";
2
+ import { a as unregisterPopupLayer, n as refreshPopupStack, r as registerPopupLayer, t as getOpenPopupLayers } from "../popup-stack-CEEMib__.js";
3
+ import { t as customElement } from "../mono-element-B0kP_96P.js";
4
+ import { a as defineHybridPropAliases, r as booleanStringConverter, s as optionalNumberConverter, t as __decorate } from "../decorate-DEXtNagw.js";
5
+ import { t as dispatchMonoEvent } from "../mono-event-Bi1qP9uN.js";
6
+ import { a as parkDetachedNodes, i as guardHostTextContent, s as placeSlotNode } from "../light-slots-DW1WgfgT.js";
7
+ import { i as pathOwnedBy } from "../popup-portal-BziRX1yG.js";
8
+ import { n as isBelowBreakpoint, r as resolveAutoFullscreen, t as autoFullscreenConverter } from "../breakpoints-CAbhDUht.js";
9
+ import { LitElement, html, isServer, nothing, unsafeCSS } from "lit";
10
+ import { property, query, state } from "lit/decorators.js";
11
+ //#region src/components/drawer/drawer-core.ts
12
+ /** Per-instance id seed for the light build's heading ids (they live in the
13
+ * document, so they must be unique). The shadow build scopes ids to its own
14
+ * root and uses a constant — see `_headingIdBase`. */
15
+ var drawerIdSeq = 0;
16
+ /**
17
+ * Named dimension presets for `width` / `height` — `width="lg"`, `height="sm"`.
18
+ *
19
+ * The same six tokens the `size` prop uses, on a different axis: `size` is the
20
+ * CONTENT scale (padding, type, close icon) and never touches the panel's box, while
21
+ * these name a MEASURE. `size="sm" width="xl"` is a compact, wide drawer.
22
+ *
23
+ * These are the dimensions the drawer has always shipped — `md` reproduces the
24
+ * stylesheet defaults (`420px` / `50vh`) exactly. Only the axis `position` leaves
25
+ * free is ever read, so a token on the pinned axis is simply inert.
26
+ */
27
+ var WIDTH_PRESETS = {
28
+ xs: "220px",
29
+ sm: "280px",
30
+ md: "420px",
31
+ lg: "560px",
32
+ xl: "720px",
33
+ xxl: "900px"
34
+ };
35
+ var HEIGHT_PRESETS = {
36
+ xs: "22vh",
37
+ sm: "30vh",
38
+ md: "50vh",
39
+ lg: "70vh",
40
+ xl: "85vh",
41
+ xxl: "95vh"
42
+ };
43
+ /**
44
+ * Normalize a dimension prop to a CSS length.
45
+ * - a preset token (`"xs"`…`"xxl"`) → the ladder for `axis`
46
+ * - `number` (or a numeric string) → `${n}px`
47
+ * - any other non-empty string → passed through (`"80%"`, `"100vw"`, `"32rem"`)
48
+ * - `null` / `undefined` / `''` → `undefined` ("not set", fall back to the var)
49
+ *
50
+ * Mirrors `toCssSize` in modal-core.ts, ladders included.
51
+ */
52
+ function toCssSize(value, axis) {
53
+ if (value === null || value === void 0) return void 0;
54
+ if (typeof value === "number") return Number.isFinite(value) ? `${value}px` : void 0;
55
+ const trimmed = String(value).trim();
56
+ if (trimmed === "") return void 0;
57
+ const preset = (axis === "width" ? WIDTH_PRESETS : HEIGHT_PRESETS)[trimmed.toLowerCase()];
58
+ if (preset) return preset;
59
+ if (/^-?\d+(\.\d+)?$/.test(trimmed)) return `${trimmed}px`;
60
+ return trimmed;
61
+ }
62
+ /**
63
+ * `MonoDrawerCore` — render-mode-agnostic logic for `mono-drawer`: props/hybrid
64
+ * aliases, the open/close model (`show`/`hide`/`toggle` + `mno-*` events), the
65
+ * `PopupLayer` surface (shared z-stack / scroll-lock / topmost-Escape via the
66
+ * SSR-safe `popup-stack`), resizeable-edge logic, and the shared drawer markup
67
+ * (`_renderDrawerBody`). SSR-safe: `popup-stack` no-ops server-side and the
68
+ * `window`/resize access is `isServer`-guarded. Mirrors `modal-core.ts`.
69
+ *
70
+ * Each build supplies the render root + slot/icon strategy:
71
+ * - light (`mono-drawer.ts`): a `<body>` portal that IS the `.mono-drawer` root,
72
+ * `data-mono-slot` placeholders, UnoCSS `.i-mdi-close`.
73
+ * - shadow (`mono-drawer.shadow.ts`): a real shadow root with an inner
74
+ * `.mono-drawer` root, native `<slot>`s, inline-SVG ✕.
75
+ */
76
+ var MonoDrawerCore = (superClass) => {
77
+ class MonoDrawerCoreClass extends superClass {
78
+ static {
79
+ this.monoPendingAuto = "never";
80
+ }
81
+ constructor(...args) {
82
+ super(...args);
83
+ this.position = "right";
84
+ this.size = "md";
85
+ this.color = "primary";
86
+ this.title = "";
87
+ this.subtitle = "";
88
+ this.modelValue = false;
89
+ this.dismissible = true;
90
+ this.persistent = false;
91
+ this.overlay = true;
92
+ this.closeOnEscape = true;
93
+ this.closeOnOverlay = true;
94
+ this.lockScroll = true;
95
+ this.resizeable = false;
96
+ this.autoFullscreen = false;
97
+ this.stackable = false;
98
+ this.cssClass = {};
99
+ this.cssClassName = "";
100
+ this._slotsCaptured = false;
101
+ this._hasHeaderSlotState = false;
102
+ this._hasTitleSlotState = false;
103
+ this._hasSubtitleSlotState = false;
104
+ this._hasBodySlotState = false;
105
+ this._hasFooterSlotState = false;
106
+ this._hasDrawerAbove = false;
107
+ this._resizing = false;
108
+ this._drawerZ = 9990;
109
+ this._resizeStartX = 0;
110
+ this._resizeStartY = 0;
111
+ this._resizeBaseW = 0;
112
+ this._resizeBaseH = 0;
113
+ this._rootEl = null;
114
+ this.bindRoot = (el) => {
115
+ this._rootEl = el ?? null;
116
+ this._applyRootAttrs(this._rootEl);
117
+ };
118
+ this._outsideBound = false;
119
+ this._outsideArm = null;
120
+ this._openedAt = 0;
121
+ this._onOutsideClick = (event) => {
122
+ if (!this.modelValue || this.overlay) return;
123
+ if (!this.closeOnOverlay || !this.dismissible || this.persistent) return;
124
+ if (event.timeStamp <= this._openedAt) return;
125
+ const layers = getOpenPopupLayers();
126
+ if (layers[layers.length - 1] !== this) return;
127
+ const root = this.renderRoot instanceof Element ? this.renderRoot : null;
128
+ if (pathOwnedBy(event.composedPath(), root ? [this, root] : [this])) return;
129
+ this.hide("overlay", event);
130
+ };
131
+ this._onResizeStart = (event) => {
132
+ if (isServer || typeof window === "undefined") return;
133
+ if (!this.resizeable || event.button !== 0) return;
134
+ if (this._autoFullscreenActive) return;
135
+ event.preventDefault();
136
+ event.stopPropagation();
137
+ const rect = this._panelEl?.getBoundingClientRect();
138
+ this._resizeBaseW = rect?.width ?? 0;
139
+ this._resizeBaseH = rect?.height ?? 0;
140
+ this._resizeStartX = event.clientX;
141
+ this._resizeStartY = event.clientY;
142
+ this._resizing = true;
143
+ window.addEventListener("pointermove", this._onResizeMove);
144
+ window.addEventListener("pointerup", this._onResizeEnd, { once: true });
145
+ window.addEventListener("pointercancel", this._onResizeEnd, { once: true });
146
+ };
147
+ this._onResizeMove = (event) => {
148
+ if (typeof window === "undefined") return;
149
+ const MIN = 200;
150
+ if (this._isHorizontal) {
151
+ const delta = this.position === "right" ? this._resizeStartX - event.clientX : event.clientX - this._resizeStartX;
152
+ const next = Math.max(MIN, Math.min(this._resizeBaseW + delta, window.innerWidth));
153
+ this._setDrawerSizeVar("--mono-drawer-width", `${next}px`);
154
+ } else {
155
+ const delta = this.position === "top" ? event.clientY - this._resizeStartY : this._resizeStartY - event.clientY;
156
+ const next = Math.max(MIN, Math.min(this._resizeBaseH + delta, window.innerHeight));
157
+ this._setDrawerSizeVar("--mono-drawer-height", `${next}px`);
158
+ }
159
+ };
160
+ this._onResizeEnd = () => {
161
+ if (typeof window !== "undefined") window.removeEventListener("pointermove", this._onResizeMove);
162
+ this._resizing = false;
163
+ };
164
+ defineHybridPropAliases(this, [
165
+ "modelValue",
166
+ "cssClass",
167
+ "closeOnEscape",
168
+ "closeOnOverlay",
169
+ "lockScroll",
170
+ "autoFullscreen",
171
+ "zIndex"
172
+ ]);
173
+ Object.defineProperty(this, "css-class", {
174
+ get: () => this.cssClass,
175
+ set: (value) => this._setCssClass(value),
176
+ configurable: true,
177
+ enumerable: false
178
+ });
179
+ Object.defineProperty(this, "cssclass", {
180
+ get: () => this.cssClass,
181
+ set: (value) => this._setCssClass(value),
182
+ configurable: true,
183
+ enumerable: false
184
+ });
185
+ }
186
+ static get observedAttributes() {
187
+ return [
188
+ ...super.observedAttributes ?? [],
189
+ "modelvalue",
190
+ "css-class",
191
+ "cssclass"
192
+ ];
193
+ }
194
+ attributeChangedCallback(name, oldValue, newValue) {
195
+ super.attributeChangedCallback(name, oldValue, newValue);
196
+ if (oldValue === newValue) return;
197
+ if (name === "modelvalue") {
198
+ this.modelValue = booleanStringConverter.fromAttribute(newValue);
199
+ return;
200
+ }
201
+ if (name === "css-class" || name === "cssclass") this._setCssClass(newValue);
202
+ }
203
+ /** Duck-type marker so the exclusive-close logic targets only OTHER drawers in
204
+ * the shared stack (not modals/dropdowns) without an `instanceof` that the
205
+ * light + shadow builds — distinct classes — would each fail. */
206
+ get _isMonoDrawer() {
207
+ return true;
208
+ }
209
+ connectedCallback() {
210
+ super.connectedCallback();
211
+ if (this.modelValue) this._applyOpenSideEffects();
212
+ }
213
+ disconnectedCallback() {
214
+ this._releaseSideEffects();
215
+ this._teardownResize();
216
+ super.disconnectedCallback();
217
+ }
218
+ willUpdate(changed) {
219
+ for (const key of [
220
+ "modelValue",
221
+ "dismissible",
222
+ "persistent",
223
+ "overlay",
224
+ "closeOnEscape",
225
+ "closeOnOverlay",
226
+ "lockScroll",
227
+ "resizeable",
228
+ "stackable"
229
+ ]) if (typeof this[key] === "string") this[key] = this._toBoolean(this[key]);
230
+ if (changed.has("modelValue")) if (this.modelValue) this._applyOpenSideEffects();
231
+ else this._releaseSideEffects();
232
+ super.willUpdate?.(changed);
233
+ }
234
+ updated(changed) {
235
+ super.updated?.(changed);
236
+ if (isServer) return;
237
+ if (changed.has("width") || changed.has("height")) this._applyDimensionProps();
238
+ if (changed.has("zIndex") && this.modelValue) refreshPopupStack();
239
+ if (changed.has("lockScroll") && this.modelValue) refreshPopupStack();
240
+ if (changed.has("overlay") && this.modelValue) {
241
+ this._syncOutsideClick();
242
+ refreshPopupStack();
243
+ }
244
+ }
245
+ /**
246
+ * Publish `width`/`height` as the public sizing vars.
247
+ *
248
+ * Deliberately the same vars the resize handle writes (`_setDrawerSizeVar`) rather
249
+ * than an inline panel style: that keeps one channel for dimensions, so dragging
250
+ * still works and a later prop change simply re-asserts. Clearing a prop removes
251
+ * the var so the stylesheet default comes back.
252
+ */
253
+ _applyDimensionProps() {
254
+ const width = toCssSize(this.width, "width");
255
+ const height = toCssSize(this.height, "height");
256
+ if (width) this._setDrawerSizeVar("--mono-drawer-width", width);
257
+ else this._removeDrawerSizeVar("--mono-drawer-width");
258
+ if (height) this._setDrawerSizeVar("--mono-drawer-height", height);
259
+ else this._removeDrawerSizeVar("--mono-drawer-height");
260
+ }
261
+ /** `auto-fullscreen-<bp>` for the CSS to key its media blocks on, else null. */
262
+ get _autoFullscreenClass() {
263
+ const bp = resolveAutoFullscreen(this.autoFullscreen);
264
+ return bp ? `auto-fullscreen-${bp}` : null;
265
+ }
266
+ /**
267
+ * Whether auto-fullscreen is in force RIGHT NOW. Only for pointer handlers that
268
+ * CSS cannot reach — never for rendering, which would reintroduce the SSR
269
+ * viewport-guess problem the `@media` approach exists to avoid.
270
+ */
271
+ get _autoFullscreenActive() {
272
+ const bp = resolveAutoFullscreen(this.autoFullscreen);
273
+ return !!bp && isBelowBreakpoint(bp);
274
+ }
275
+ /** The state-class list for the `.mono-drawer` root (light: on the portal;
276
+ * shadow: on the inner root). */
277
+ _computeDrawerClasses() {
278
+ return [
279
+ "mono-drawer",
280
+ this.size,
281
+ this.color,
282
+ `position-${this.position}`,
283
+ this.modelValue ? "open" : "closed",
284
+ this.overlay ? null : "no-overlay",
285
+ this.persistent ? "persistent" : null,
286
+ this.dismissible ? null : "no-dismiss",
287
+ this._hasDrawerAbove ? "has-drawer-above" : null,
288
+ this.resizeable ? "resizeable" : null,
289
+ this._autoFullscreenClass,
290
+ this._resizing ? "resizing" : null,
291
+ this.cssClassName || null,
292
+ this.cssClass?.root || null
293
+ ].filter((c) => Boolean(c));
294
+ }
295
+ /**
296
+ * The prop mirrors and the states, for the same root the classes go on — the
297
+ * `<body>` portal in the light build, the inner root in the shadow one. Each
298
+ * is omitted at its default so `:not([mono-size])` means "md" and
299
+ * `:not([mono-position])` means RIGHT for hand-written markup exactly as they
300
+ * do for the element.
301
+ */
302
+ _computeRootAttrs() {
303
+ return {
304
+ "mono-size": this.size === "md" ? null : this.size,
305
+ "mono-color": this.color === "primary" ? null : this.color,
306
+ "mono-position": this.position === "right" ? null : this.position,
307
+ "mono-open": this.modelValue ? "" : null,
308
+ "mono-no-overlay": this.overlay ? null : "",
309
+ "mono-persistent": this.persistent ? "" : null,
310
+ "mono-no-dismiss": this.dismissible ? null : "",
311
+ "mono-has-drawer-above": this._hasDrawerAbove ? "" : null,
312
+ "mono-resizeable": this.resizeable ? "" : null,
313
+ "mono-resizing": this._resizing ? "" : null,
314
+ "mono-auto-fullscreen": this._autoFullscreenClass ? this._autoFullscreenClass.replace("auto-fullscreen-", "") : null
315
+ };
316
+ }
317
+ _applyRootAttrs(root) {
318
+ if (!root) return;
319
+ if (!root.hasAttribute("mono-drawer")) root.setAttribute("mono-drawer", "");
320
+ for (const [name, value] of Object.entries(this._computeRootAttrs())) if (value === null) root.removeAttribute(name);
321
+ else if (root.getAttribute(name) !== value) root.setAttribute(name, value);
322
+ }
323
+ _setCssClass(value) {
324
+ if (value == null) {
325
+ this.cssClass = {};
326
+ this.cssClassName = "";
327
+ return;
328
+ }
329
+ if (typeof value === "object") {
330
+ this.cssClass = value;
331
+ return;
332
+ }
333
+ if (typeof value === "string") {
334
+ const trimmed = value.trim();
335
+ if (!trimmed) {
336
+ this.cssClass = {};
337
+ this.cssClassName = "";
338
+ return;
339
+ }
340
+ if (trimmed.startsWith("{") && trimmed.endsWith("}")) try {
341
+ this.cssClass = JSON.parse(trimmed);
342
+ return;
343
+ } catch {}
344
+ this.cssClassName = trimmed;
345
+ }
346
+ }
347
+ _cls(base, key) {
348
+ const extra = this.cssClass?.[key];
349
+ return extra ? `${base} ${extra}` : base;
350
+ }
351
+ _toBoolean(value) {
352
+ if (typeof value === "boolean") return value;
353
+ if (typeof value === "string") {
354
+ const normalized = value.toLowerCase().trim();
355
+ return normalized === "" || normalized === "true";
356
+ }
357
+ return Boolean(value);
358
+ }
359
+ /**
360
+ * Join the shared stack: assigns z-order, coordinates body-scroll lock, and
361
+ * arms the shared Escape listener. Per-drawer scroll-lock / Escape behaviour
362
+ * is owned by the stack manager so nesting works (see composables/popup-stack).
363
+ */
364
+ _applyOpenSideEffects() {
365
+ if (!this.stackable) {
366
+ for (const other of [...getOpenPopupLayers()]) if (other !== this && other._isMonoDrawer) other.hide?.("manual");
367
+ }
368
+ registerPopupLayer(this);
369
+ this._syncOutsideClick();
370
+ }
371
+ _releaseSideEffects() {
372
+ unregisterPopupLayer(this);
373
+ this._unbindOutsideClick();
374
+ }
375
+ /** Bind when open without an overlay, unbind otherwise — safe to call repeatedly. */
376
+ _syncOutsideClick() {
377
+ if (isServer) return;
378
+ const wanted = this.modelValue && !this.overlay;
379
+ if (wanted && !this._outsideBound && !this._outsideArm) {
380
+ this._openedAt = performance.now();
381
+ this._outsideArm = setTimeout(() => {
382
+ this._outsideArm = null;
383
+ if (!this.modelValue || this.overlay) return;
384
+ document.addEventListener("click", this._onOutsideClick);
385
+ this._outsideBound = true;
386
+ }, 0);
387
+ } else if (!wanted) this._unbindOutsideClick();
388
+ }
389
+ _unbindOutsideClick() {
390
+ if (this._outsideArm) {
391
+ clearTimeout(this._outsideArm);
392
+ this._outsideArm = null;
393
+ }
394
+ if (this._outsideBound) {
395
+ document.removeEventListener("click", this._onOutsideClick);
396
+ this._outsideBound = false;
397
+ }
398
+ }
399
+ /** Body-scroll lock is wanted while this drawer is open and `lockScroll` is set. */
400
+ get lockBodyScroll() {
401
+ return this.lockScroll;
402
+ }
403
+ /**
404
+ * Whether this drawer dims what is beneath it — see `isTopBackdrop` in popup-stack.
405
+ * Only while `overlay` is on: an `overlay="false"` drawer stacked above another
406
+ * dialog used to count as a backdrop, so the one below hid its overlay and
407
+ * nothing dimmed the page at all.
408
+ */
409
+ get hasBackdrop() {
410
+ return this.overlay;
411
+ }
412
+ /** Topmost-only Escape from the shared stack — close unless persistent. */
413
+ onStackEscape(event) {
414
+ if (this.closeOnEscape && !this.persistent) this.hide("escape", event);
415
+ }
416
+ /**
417
+ * Called by the stack manager whenever stack order changes. `z` raises this
418
+ * drawer's overlay + panel above the ones below; when another backdrop layer
419
+ * sits above it (`isTopBackdrop` is false) its own backdrop is hidden so
420
+ * stacked overlays don't compound. An `overlay="false"` modal/drawer above
421
+ * does not count (see `hasBackdrop`). Both builds read `_drawerZ` into the
422
+ * `.mono-drawer` root's `--drawer-z`.
423
+ */
424
+ setStackZ(z, isTopBackdrop) {
425
+ this._drawerZ = z;
426
+ this._hasDrawerAbove = !isTopBackdrop;
427
+ }
428
+ /**
429
+ * PopupLayer hook — the level this drawer pins itself to, or `undefined` to take
430
+ * the stack's slot. The stack reads it so layers opened ABOVE a pinned drawer
431
+ * clear it instead of landing back at the base (see popup-stack).
432
+ *
433
+ * Coerced through `Number` rather than read directly because the prop can arrive
434
+ * as a numeric STRING — a plain `z-index="1500"` attribute goes through the
435
+ * converter, but `el.zIndex = '1500'` (or a framework binding that stringifies)
436
+ * does not.
437
+ *
438
+ * `null` and `''` are screened out FIRST, and that guard is load-bearing:
439
+ * `Number(null)` and `Number('')` are both `0` and both finite, so `:z-index="null"`
440
+ * — Vue's ordinary spelling for "no value" — used to pin the drawer to `z-index: 0`
441
+ * and drop it behind the page. Only the attribute path was safe, because
442
+ * `optionalNumberConverter` maps `''`/`null` to `undefined`; the PROPERTY path,
443
+ * which is what Vue actually uses (the hybrid alias makes `'z-index' in el` true),
444
+ * was not.
445
+ */
446
+ get pinnedZ() {
447
+ const raw = this.zIndex;
448
+ if (raw === null || raw === void 0) return void 0;
449
+ if (typeof raw === "string" && raw.trim() === "") return void 0;
450
+ const manual = Number(raw);
451
+ return Number.isFinite(manual) ? manual : void 0;
452
+ }
453
+ /**
454
+ * The level actually published to CSS: the `zIndex` prop when the consumer set
455
+ * one, otherwise the stack's slot.
456
+ */
457
+ get _effectiveZ() {
458
+ return this.pinnedZ ?? this._drawerZ;
459
+ }
460
+ get _isHorizontal() {
461
+ return this.position === "left" || this.position === "right";
462
+ }
463
+ /**
464
+ * Apply a sizing CSS var to the `.mono-drawer` root. Build hook: light writes
465
+ * to the portal; shadow (default here) writes to the inner root element.
466
+ */
467
+ _setDrawerSizeVar(name, value) {
468
+ this.renderRoot.querySelector(".mono-drawer")?.style.setProperty(name, value);
469
+ }
470
+ /** Counterpart of {@link _setDrawerSizeVar} — same build hook, same root. */
471
+ _removeDrawerSizeVar(name) {
472
+ this.renderRoot.querySelector(".mono-drawer")?.style.removeProperty(name);
473
+ }
474
+ _teardownResize() {
475
+ if (typeof window === "undefined") return;
476
+ window.removeEventListener("pointermove", this._onResizeMove);
477
+ window.removeEventListener("pointerup", this._onResizeEnd);
478
+ window.removeEventListener("pointercancel", this._onResizeEnd);
479
+ }
480
+ /**
481
+ * Every open-state change emits `toggle` (historically `mno-click`, which is
482
+ * kept), then the transition-specific `open` / `close`. `toggle` rather than
483
+ * a plain `click`: a real click from inside the panel already bubbles to the
484
+ * host on its own, and this is not one — it is a state change.
485
+ */
486
+ _emitChange(detail) {
487
+ dispatchMonoEvent(this, "click", detail, { alias: "toggle" });
488
+ if (detail.value && !detail.oldValue) dispatchMonoEvent(this, "open", detail);
489
+ else if (!detail.value && detail.oldValue) dispatchMonoEvent(this, "close", detail);
490
+ }
491
+ show(source = "manual", sourceEvent) {
492
+ if (this.modelValue) return;
493
+ const oldValue = this.modelValue;
494
+ this.modelValue = true;
495
+ this._emitChange({
496
+ modelValue: true,
497
+ currentValue: true,
498
+ oldValue,
499
+ value: true,
500
+ source,
501
+ sourceEvent
502
+ });
503
+ }
504
+ hide(source = "manual", sourceEvent) {
505
+ if (!this.modelValue) return;
506
+ const oldValue = this.modelValue;
507
+ this.modelValue = false;
508
+ this._emitChange({
509
+ modelValue: false,
510
+ currentValue: false,
511
+ oldValue,
512
+ value: false,
513
+ source,
514
+ sourceEvent
515
+ });
516
+ }
517
+ toggle(source = "manual", sourceEvent) {
518
+ if (this.modelValue) this.hide(source, sourceEvent);
519
+ else this.show(source, sourceEvent);
520
+ }
521
+ _handleClose(event) {
522
+ if (!this.dismissible) return;
523
+ this.hide("close", event);
524
+ }
525
+ _handleOverlayClick(event) {
526
+ if (!this.closeOnOverlay || !this.dismissible || this.persistent) return;
527
+ this.hide("overlay", event);
528
+ }
529
+ /** Title / subtitle / heading-column presence, shared by the head render and
530
+ * the dialog's `aria-labelledby` / `aria-describedby`. */
531
+ get _headingState() {
532
+ const title = !!this.title || this._hasTitleSlotState;
533
+ const subtitle = !!this.subtitle || this._hasSubtitleSlotState;
534
+ return {
535
+ title,
536
+ subtitle,
537
+ heading: this._hasHeaderSlotState || title || subtitle
538
+ };
539
+ }
540
+ /**
541
+ * Prefix of the heading ids (`<base>-heading` / `-title` / `-subtitle`). The
542
+ * light build's panel lives in the document, so the ids must be unique per
543
+ * instance; the shadow build overrides this with a constant (ids are scoped to
544
+ * its own root, and a counter would differ between server and client).
545
+ */
546
+ get _headingIdBase() {
547
+ this._idSeq ??= ++drawerIdSeq;
548
+ return `mono-drawer-${this._idSeq}`;
549
+ }
550
+ /** `aria-labelledby` / `aria-describedby` for the `role="dialog"` root. A
551
+ * `slot="header"` labels the dialog with its whole column; otherwise the
552
+ * title labels it and the subtitle describes it. */
553
+ _headingAria() {
554
+ const s = this._headingState;
555
+ const base = this._headingIdBase;
556
+ if (this._hasHeaderSlotState) return { labelledby: `${base}-heading` };
557
+ return {
558
+ labelledby: s.title ? `${base}-title` : void 0,
559
+ describedby: s.subtitle ? `${base}-subtitle` : void 0
560
+ };
561
+ }
562
+ _renderHead() {
563
+ const s = this._headingState;
564
+ const hasContent = s.heading || this.dismissible;
565
+ if (!hasContent && !this._slotsAlwaysRender) return nothing;
566
+ const base = this._headingIdBase;
567
+ const heading = html`
568
+ <div
569
+ class=${this._cls("mono-drawer-title", "title")}
570
+ mono-title
571
+ id=${`${base}-title`}
572
+ ?mono-empty=${!s.title}
573
+ >${this._slotOutlet("title", this.title || nothing)}</div>
574
+ <div
575
+ class=${this._cls("mono-drawer-subtitle", "subtitle")}
576
+ mono-subtitle
577
+ id=${`${base}-subtitle`}
578
+ ?mono-empty=${!s.subtitle}
579
+ >${this._slotOutlet("subtitle", this.subtitle || nothing)}</div>
580
+ `;
581
+ return html`
582
+ <div
583
+ class=${this._cls("mono-drawer-head", "head")}
584
+ mono-header
585
+ ?mono-empty=${!hasContent}
586
+ >
587
+ <div
588
+ class=${this._cls("mono-drawer-heading", "heading")}
589
+ mono-heading
590
+ id=${`${base}-heading`}
591
+ ?mono-empty=${!s.heading}
592
+ >
593
+ ${this._slotOutlet("header", heading)}
594
+ </div>
595
+ ${this.dismissible ? html`
596
+ <button
597
+ type="button"
598
+ class=${this._cls("mono-drawer-close", "close")}
599
+ mono-close
600
+ aria-label="Close drawer"
601
+ @click=${this._handleClose}
602
+ >
603
+ ${this.renderIcon("close")}
604
+ </button>
605
+ ` : nothing}
606
+ </div>
607
+ `;
608
+ }
609
+ _renderFoot() {
610
+ if (!this._hasFooterSlotState && !this._slotsAlwaysRender) return nothing;
611
+ return html`
612
+ <div
613
+ class=${this._cls("mono-drawer-foot", "foot")}
614
+ mono-footer
615
+ ?mono-empty=${!this._hasFooterSlotState}
616
+ >
617
+ ${this._slotOutlet("footer")}
618
+ </div>
619
+ `;
620
+ }
621
+ /** Shared drawer markup (overlay + panel[resizer + head + body + foot]). The
622
+ * light build renders this directly into the portal (which IS `.mono-drawer`);
623
+ * the shadow build wraps it in an inner `.mono-drawer` root. */
624
+ _renderDrawerBody() {
625
+ return html`
626
+ <div
627
+ class=${this._cls("mono-drawer-overlay", "overlay")}
628
+ mono-overlay
629
+ @click=${this._handleOverlayClick}
630
+ ></div>
631
+ <div
632
+ class=${this._cls("mono-drawer-panel", "panel")}
633
+ mono-panel
634
+ role="document"
635
+ @click=${(e) => e.stopPropagation()}
636
+ >
637
+ ${this.resizeable ? html`<div
638
+ class=${this._cls("mono-drawer-resizer", "resizer")}
639
+ mono-resizer
640
+ role="separator"
641
+ aria-orientation=${this._isHorizontal ? "vertical" : "horizontal"}
642
+ @pointerdown=${this._onResizeStart}
643
+ ></div>` : nothing}
644
+ ${this._renderHead()}
645
+ <div class=${this._cls("mono-drawer-body", "body")} mono-body>
646
+ ${this._slotOutlet("body")}
647
+ </div>
648
+ ${this._renderFoot()}
649
+ </div>
650
+ `;
651
+ }
652
+ /** Whether the slot regions render even when empty. Light: no (omit empty
653
+ * regions). Shadow: yes — the native `<slot>`s must exist to project DSD
654
+ * content + be scanned (hidden via `[data-empty]` when empty). */
655
+ get _slotsAlwaysRender() {
656
+ return false;
657
+ }
658
+ _hasSlot(name) {
659
+ return name === "header" ? this._hasHeaderSlotState : name === "title" ? this._hasTitleSlotState : name === "subtitle" ? this._hasSubtitleSlotState : name === "body" ? this._hasBodySlotState : this._hasFooterSlotState;
660
+ }
661
+ _setSlotState(name, has) {
662
+ if (name === "header") this._hasHeaderSlotState = has;
663
+ else if (name === "title") this._hasTitleSlotState = has;
664
+ else if (name === "subtitle") this._hasSubtitleSlotState = has;
665
+ else if (name === "body") this._hasBodySlotState = has;
666
+ else this._hasFooterSlotState = has;
667
+ }
668
+ /**
669
+ * Slot outlet. Light build (default): a `data-mono-slot` placeholder the
670
+ * captured light-DOM nodes are re-parented into when present, else the
671
+ * `fallback`. Shadow build overrides this with a native `<slot name>`.
672
+ */
673
+ _slotOutlet(name, fallback = nothing) {
674
+ return this._hasSlot(name) ? html`<span data-mono-slot=${name}></span>` : html`${fallback}`;
675
+ }
676
+ /** Close ✕. Light (default): UnoCSS icon span. Shadow overrides → inline SVG
677
+ * (global `.i-mdi-close` can't reach a shadow root). */
678
+ renderIcon(_name) {
679
+ return html`<span class="mono-icon i-mdi-close" aria-hidden="true"></span>`;
680
+ }
681
+ }
682
+ __decorate([property({ type: String })], MonoDrawerCoreClass.prototype, "position", void 0);
683
+ __decorate([property({ type: String })], MonoDrawerCoreClass.prototype, "size", void 0);
684
+ __decorate([property({ type: String })], MonoDrawerCoreClass.prototype, "color", void 0);
685
+ __decorate([property({ type: String })], MonoDrawerCoreClass.prototype, "title", void 0);
686
+ __decorate([property({ type: String })], MonoDrawerCoreClass.prototype, "subtitle", void 0);
687
+ __decorate([property({
688
+ attribute: "model-value",
689
+ reflect: true,
690
+ converter: booleanStringConverter
691
+ })], MonoDrawerCoreClass.prototype, "modelValue", void 0);
692
+ __decorate([property({
693
+ reflect: true,
694
+ converter: booleanStringConverter
695
+ })], MonoDrawerCoreClass.prototype, "dismissible", void 0);
696
+ __decorate([property({
697
+ reflect: true,
698
+ converter: booleanStringConverter
699
+ })], MonoDrawerCoreClass.prototype, "persistent", void 0);
700
+ __decorate([property({
701
+ reflect: true,
702
+ converter: booleanStringConverter
703
+ })], MonoDrawerCoreClass.prototype, "overlay", void 0);
704
+ __decorate([property({
705
+ attribute: "close-on-escape",
706
+ converter: booleanStringConverter
707
+ })], MonoDrawerCoreClass.prototype, "closeOnEscape", void 0);
708
+ __decorate([property({
709
+ attribute: "close-on-overlay",
710
+ converter: booleanStringConverter
711
+ })], MonoDrawerCoreClass.prototype, "closeOnOverlay", void 0);
712
+ __decorate([property({
713
+ attribute: "lock-scroll",
714
+ converter: booleanStringConverter
715
+ })], MonoDrawerCoreClass.prototype, "lockScroll", void 0);
716
+ __decorate([property({
717
+ reflect: true,
718
+ converter: booleanStringConverter
719
+ })], MonoDrawerCoreClass.prototype, "resizeable", void 0);
720
+ __decorate([property({
721
+ attribute: "auto-fullscreen",
722
+ converter: autoFullscreenConverter
723
+ })], MonoDrawerCoreClass.prototype, "autoFullscreen", void 0);
724
+ __decorate([property({
725
+ reflect: true,
726
+ converter: booleanStringConverter
727
+ })], MonoDrawerCoreClass.prototype, "stackable", void 0);
728
+ __decorate([property({ type: String })], MonoDrawerCoreClass.prototype, "width", void 0);
729
+ __decorate([property({ type: String })], MonoDrawerCoreClass.prototype, "height", void 0);
730
+ __decorate([property({
731
+ attribute: "z-index",
732
+ converter: optionalNumberConverter
733
+ })], MonoDrawerCoreClass.prototype, "zIndex", void 0);
734
+ __decorate([property({ attribute: false })], MonoDrawerCoreClass.prototype, "cssClass", void 0);
735
+ __decorate([property({ attribute: false })], MonoDrawerCoreClass.prototype, "cssClassName", void 0);
736
+ __decorate([state()], MonoDrawerCoreClass.prototype, "_slotsCaptured", void 0);
737
+ __decorate([state()], MonoDrawerCoreClass.prototype, "_hasHeaderSlotState", void 0);
738
+ __decorate([state()], MonoDrawerCoreClass.prototype, "_hasTitleSlotState", void 0);
739
+ __decorate([state()], MonoDrawerCoreClass.prototype, "_hasSubtitleSlotState", void 0);
740
+ __decorate([state()], MonoDrawerCoreClass.prototype, "_hasBodySlotState", void 0);
741
+ __decorate([state()], MonoDrawerCoreClass.prototype, "_hasFooterSlotState", void 0);
742
+ __decorate([state()], MonoDrawerCoreClass.prototype, "_hasDrawerAbove", void 0);
743
+ __decorate([state()], MonoDrawerCoreClass.prototype, "_resizing", void 0);
744
+ __decorate([state()], MonoDrawerCoreClass.prototype, "_drawerZ", void 0);
745
+ __decorate([query(".mono-drawer-panel")], MonoDrawerCoreClass.prototype, "_panelEl", void 0);
746
+ return MonoDrawerCoreClass;
747
+ };
748
+ //#endregion
749
+ //#region src/components/drawer/drawer.css?raw
750
+ var drawer_default = "/* @unocss-include */\r\n\r\n/* =========================================================================\r\n mono-drawer — a port of Basecoat's `.drawer` (basecoat-css@1.0.2, vega style).\r\n\r\n Styled by ATTRIBUTE, like Basecoat — and the attributes mirror the element's\r\n props one for one, so hand-written markup reads like the Lit / Vue tag:\r\n\r\n <mono-drawer size=\"lg\" color=\"success\" position=\"left\" model-value>\r\n <div mono-drawer mono-size=\"lg\" mono-color=\"success\" mono-position=\"left\"\r\n mono-open role=\"dialog\" aria-modal=\"true\">\r\n <div mono-overlay></div>\r\n <div mono-panel role=\"document\">\r\n <div mono-resizer role=\"separator\"></div>\r\n <div mono-header>\r\n <div mono-heading>\r\n <div mono-title>Filters</div>\r\n <div mono-subtitle>Narrow the results</div>\r\n </div>\r\n <button mono-close type=\"button\" aria-label=\"Close drawer\">…</button>\r\n </div>\r\n <div mono-body>…</div>\r\n <div mono-footer>…</div>\r\n </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-position])` = RIGHT — upstream's\r\n unqualified side is `bottom`, ours is `right`). The element writes them on its\r\n ROOT — the `<body>` portal in the light build, an inner root `<div>` in the\r\n shadow one — along with every state below. The old classes\r\n (`.mono-drawer.md.primary.position-right.open`) are still emitted as inert\r\n hooks until 2.0 but no rule here reads them.\r\n\r\n Selector map (ours ≡ upstream):\r\n [mono-drawer] ≡ .drawer (the <dialog>) — DEVIATION: a var scope, not a\r\n `fixed inset-0` box, because the overlay and the panel\r\n are each `position: fixed` and this component owns its\r\n own layer through `composables/popup-stack`\r\n [mono-overlay] ≡ .drawer::backdrop (bg-black/10 backdrop-blur-xs) — the\r\n fill is `--mono-mode-backdrop`, a token, since a\r\n pseudo-element cannot be reached from a shadow sheet\r\n [mono-panel] ≡ .drawer > * (fixed flex h-auto flex-col\r\n transition-transform duration-500\r\n ease-[cubic-bezier(0.32,0.72,0,1)], bg-popover\r\n text-popover-foreground text-sm), plus the per-side\r\n inset / measure / translate and the ONE rounded edge\r\n and border that face the content\r\n [mono-position=…] ≡ [data-side='…'] (left / right / top / bottom)\r\n [mono-header] ≡ .drawer > * > header (flex flex-col gap-0.5 p-4\r\n text-start, md:gap-1.5) — DEVIATION: a ROW, because\r\n the ✕ lives inside it (see below), and NOT centred on\r\n the top / bottom sides for the same reason\r\n [mono-heading] ≡ upstream's header column itself (flex-col gap-0.5,\r\n md:gap-1.5) — the ✕'s row-mate; `slot=\"header\"`\r\n replaces it\r\n [mono-title] ≡ .drawer > * > header > h2 (text-lg font-semibold\r\n leading-none tracking-tight)\r\n [mono-subtitle] ≡ .drawer > * > header > p (text-muted-foreground\r\n text-sm)\r\n [mono-body] ≡ .drawer > * > section (min-h-0 flex-1 overflow-y-auto)\r\n — DEVIATION: padded. Upstream leaves the section bare\r\n and its own examples pad the content they put in it;\r\n here the body is a SLOT a consumer fills with plain\r\n text, so it brings the `p-4` itself\r\n (`--mono-drawer-body-pad` turns it off)\r\n [mono-footer] ≡ .drawer > * > footer (mt-auto flex flex-col gap-2 p-4)\r\n [mono-close] ≡ EXTENSION (upstream's drawer has no close button)\r\n [mono-resizer] ≡ EXTENSION (the grab bar on the inner edge)\r\n [mono-size]/[mono-color] ≡ EXTENSION (upstream ships one drawer, no colour)\r\n\r\n THE TINTED HEADER IS GONE, exactly as in the modal: `--mono-drawer-header-bg`\r\n and `-footer-bg` remain as knobs, defaulting to transparent, with matching\r\n `-border` / `-border-width` so a consumer who wants the bars back sets them.\r\n\r\n THE FOOTER STACKS. Upstream's drawer footer is a COLUMN — it is the mobile\r\n sheet idiom, where the actions are full-width and stacked — where this\r\n component's was a right-aligned row. `--mono-drawer-footer-direction: row`\r\n restores the row, and ONE sets it, so the default flavor is unchanged.\r\n\r\n PART NAMES ARE PATH-SCOPED. `[mono-panel]`, `[mono-body]` and `[mono-title]`\r\n are also dropdown's, card's and modal's part names, and a drawer BODY is where\r\n consumers put all three. Every rule here is written as an explicit child path\r\n from the root, with `:where()` keeping the resting weight at (0,1,0) so a\r\n `cssClass` utility still wins by source order.\r\n\r\n FLAVORS set `--mono-drawer-{radius,shadow,overlay-*,pad,header-gap,footer-gap,\r\n title-*,body-font,body-line-height,width,height}` (+ the per-size forms), and\r\n the four that float the panel as a card set the `inset` trio as well\r\n (`--mono-drawer-{inset,inset-radius,inset-border-width}` with\r\n `--mono-drawer-panel-pad`). Every fallback here is vega's value\r\n (`node scripts/basecoat-styles.mjs --varying \".drawer\"`).\r\n ========================================================================= */\r\n\r\nmono-drawer {\r\n display: contents;\r\n}\r\n\r\n/* =========================================\r\n Root — the layer\r\n ========================================= */\r\n\r\n[mono-drawer] {\r\n /* ── the six roles, each a public knob over a Basecoat token ───────────── */\r\n --_mono-drawer-primary: var(--mono-drawer-primary, var(--primary));\r\n --_mono-drawer-secondary: var(--mono-drawer-secondary, var(--secondary-foreground));\r\n --_mono-drawer-success: var(--mono-drawer-success, var(--success));\r\n --_mono-drawer-danger: var(--mono-drawer-danger, var(--destructive));\r\n --_mono-drawer-warning: var(--mono-drawer-warning, var(--warning));\r\n --_mono-drawer-info: var(--mono-drawer-info, var(--info));\r\n --_mono-drawer-teal: var(--mono-drawer-teal, var(--teal));\r\n --_mono-drawer-purple: var(--mono-drawer-purple, var(--purple));\r\n --_mono-drawer-neutral: var(--mono-drawer-neutral, var(--neutral));\r\n --_mono-drawer-dark: var(--mono-drawer-dark, var(--dark));\r\n /* the colour in play — `primary` unless a [mono-color] rule re-points it */\r\n --_mono-drawer-accent: var(--mono-drawer-accent, var(--_mono-drawer-accent-preset, var(--_mono-drawer-primary)));\r\n\r\n /* ── panel paint — `bg-popover text-popover-foreground`, one border edge ── */\r\n --_mono-drawer-bg: var(--mono-drawer-bg, var(--mono-drawer-surface, var(--popover)));\r\n --_mono-drawer-text: var(--mono-drawer-text, var(--popover-foreground));\r\n --_mono-drawer-border: var(--mono-drawer-border, var(--border));\r\n --_mono-drawer-border-width: var(--mono-drawer-border-width, var(--mono-border-width));\r\n --_mono-drawer-shadow: var(--mono-drawer-shadow, var(--mono-shadow-lg));\r\n /* a faint halo of the accent under the elevation — nothing until `color` is set */\r\n --_mono-drawer-glow: var(--mono-drawer-glow, 0 0 #0000);\r\n /* maia, mira, luma and rhea float the panel as an INSET card (`before:inset-2`\r\n over a transparent panel); at 0 the card is the panel itself, which is vega. */\r\n --_mono-drawer-inset: var(--mono-drawer-inset, 0px);\r\n --_mono-drawer-panel-pad: var(--mono-drawer-panel-pad, 0px);\r\n /* vega borders the ONE edge that faces the content; an inset card is a free\r\n floating box, so it borders all four (`before:border`). At 0 the per-side\r\n rules below are the only edge, which is vega. */\r\n --_mono-drawer-inset-border-width: var(--mono-drawer-inset-border-width, 0px);\r\n\r\n /* The tinted head / foot bars of the pre-port drawer. Upstream has neither, so\r\n both default to nothing — set the pair (and the `-border-width`) to restore. */\r\n --_mono-drawer-header-bg: var(--mono-drawer-header-bg, var(--mono-drawer-head-bg, transparent));\r\n --_mono-drawer-footer-bg: var(--mono-drawer-footer-bg, var(--mono-drawer-foot-bg, transparent));\r\n --_mono-drawer-header-border: var(--mono-drawer-header-border, transparent);\r\n --_mono-drawer-footer-border: var(--mono-drawer-footer-border, transparent);\r\n --_mono-drawer-header-border-width: var(--mono-drawer-header-border-width, 0);\r\n --_mono-drawer-footer-border-width: var(--mono-drawer-footer-border-width, 0);\r\n\r\n /* ── md metrics live on the unqualified root ON PURPOSE ────────────────────\r\n basecoat@1.0.2 styles/vega.css .drawer > * > header — gap-0.5 p-4 (md:gap-1.5)\r\n basecoat@1.0.2 styles/vega.css .drawer > * > footer — gap-2 p-4 */\r\n --_mono-drawer-radius: var(--mono-drawer-radius, var(--_mono-drawer-radius-preset, var(--mono-drawer-radius-md, var(--mono-radius-xl))));\r\n --_mono-drawer-pad: var(--mono-drawer-pad, var(--_mono-drawer-pad-preset, var(--mono-drawer-pad-md, calc(var(--mono-spacing) * 4))));\r\n --_mono-drawer-header-gap: var(--mono-drawer-header-gap, var(--_mono-drawer-header-gap-preset, var(--mono-drawer-header-gap-md, calc(var(--mono-spacing) * 1.5))));\r\n --_mono-drawer-footer-gap: var(--mono-drawer-footer-gap, var(--_mono-drawer-footer-gap-preset, var(--mono-drawer-footer-gap-md, calc(var(--mono-spacing) * 2))));\r\n --_mono-drawer-font: var(--mono-drawer-font, var(--_mono-drawer-font-preset, var(--mono-drawer-body-font-md, var(--mono-text-sm))));\r\n --_mono-drawer-body-line-height: var(--mono-drawer-body-line-height, var(--_mono-drawer-body-line-height-preset, var(--mono-text-sm--lh)));\r\n /* `text-lg font-semibold leading-none tracking-tight` — the drawer's title is\r\n the loud one; the dialog's is `font-medium` at the panel's own size. */\r\n --_mono-drawer-title-font: var(--mono-drawer-title-font, var(--_mono-drawer-title-font-preset, var(--mono-drawer-title-font-md, var(--mono-text-lg))));\r\n --_mono-drawer-title-weight: var(--mono-drawer-title-weight, var(--mono-font-weight-semibold));\r\n --_mono-drawer-title-tracking: var(--mono-drawer-title-tracking, -0.015em);\r\n --_mono-drawer-title-line-height: var(--mono-drawer-title-line-height, var(--mono-leading-none, 1));\r\n --_mono-drawer-title-transform: var(--mono-drawer-title-transform, none);\r\n --_mono-drawer-title-color: var(--mono-drawer-title-color, var(--_mono-drawer-text));\r\n /* the description line — `text-muted-foreground text-sm`; the font follows the\r\n drawer's per-size body step, which is `text-sm` at md */\r\n --_mono-drawer-subtitle-font: var(--mono-drawer-subtitle-font, var(--_mono-drawer-font));\r\n --_mono-drawer-subtitle-color: var(--mono-drawer-subtitle-color, var(--muted-foreground));\r\n\r\n /* ── the close ✕ — EXTENSION, styled like the dialog's ─────────────────── */\r\n --_mono-drawer-close-size: var(--mono-drawer-close-size, var(--_mono-drawer-close-size-preset, var(--mono-drawer-close-size-md, calc(var(--mono-spacing) * 7))));\r\n --_mono-drawer-close-glyph: var(--mono-drawer-close-glyph, var(--_mono-drawer-icon-size-preset, calc(var(--mono-spacing) * 4)));\r\n --_mono-drawer-close-radius: var(--mono-drawer-close-radius, var(--mono-radius-sm));\r\n --_mono-drawer-close-bg: var(--mono-drawer-close-bg, transparent);\r\n --_mono-drawer-close-color: var(--mono-drawer-close-color, var(--_mono-drawer-text));\r\n --_mono-drawer-close-opacity: var(--mono-drawer-close-opacity, 0.7);\r\n --_mono-drawer-close-hover-opacity: var(--mono-drawer-close-hover-opacity, 1);\r\n --_mono-drawer-close-hover-bg: var(--mono-drawer-close-hover-bg, transparent);\r\n\r\n /* ── the backdrop — `bg-black/10 backdrop-blur-xs` ─────────────────────── */\r\n --_mono-drawer-overlay-bg: var(--mono-drawer-overlay-bg, var(--mono-mode-backdrop));\r\n --_mono-drawer-overlay-backdrop-filter: var(--mono-drawer-overlay-backdrop-filter, blur(var(--mono-blur-xs)));\r\n\r\n --_mono-drawer-z: var(--mono-drawer-z, 9990);\r\n\r\n /* `w-3/4 max-w-sm` on the side drawers; `max-h-[80vh]` with a content height on\r\n the sheet ones. Both are PROPS here (`width` / `height`), so these are the\r\n defaults they override. */\r\n --_mono-drawer-width: var(--mono-drawer-width, min(75%, var(--mono-container-sm)));\r\n --_mono-drawer-height: var(--mono-drawer-height, auto);\r\n --_mono-drawer-max-height: var(--mono-drawer-max-height, 80vh);\r\n\r\n /* ── the slide — `duration-500 ease-[cubic-bezier(0.32,0.72,0,1)]` ────────\r\n Open/close animation duration. One source of truth for the panel's slide AND\r\n the delayed `visibility` / `content-visibility` flips, which have to stay in\r\n lockstep with it. Set `--mono-drawer-duration: 0s` for an instant,\r\n animation-free drawer — worth doing when the drawer body holds a lot of\r\n components, since that is what the open/close frames have to re-measure. */\r\n --_mono-drawer-duration: var(--mono-drawer-duration, 500ms);\r\n --_mono-drawer-ease: var(--mono-drawer-ease, cubic-bezier(0.32, 0.72, 0, 1));\r\n /* The overlay follows the panel unless it is given its own. */\r\n --_mono-drawer-overlay-duration: var(--mono-drawer-duration, 500ms);\r\n\r\n font-family: inherit;\r\n color: var(--_mono-drawer-text);\r\n}\r\n\r\n[mono-drawer],\r\n:where([mono-drawer]) *,\r\n:where([mono-drawer]) *::before,\r\n:where([mono-drawer]) *::after {\r\n box-sizing: border-box;\r\n}\r\n\r\n/* =========================================\r\n Sizes — EXTENSION: `size` is the CONTENT scale, never the measure\r\n ========================================= */\r\n\r\n[mono-drawer][mono-size=\"xs\"] {\r\n --_mono-drawer-radius-preset: var(--mono-drawer-radius-xs, var(--mono-radius-md));\r\n --_mono-drawer-pad-preset: var(--mono-drawer-pad-xs, calc(var(--mono-spacing) * 2));\r\n --_mono-drawer-header-gap-preset: var(--mono-drawer-header-gap-xs, calc(var(--mono-spacing) * 0.5));\r\n --_mono-drawer-footer-gap-preset: var(--mono-drawer-footer-gap-xs, var(--mono-spacing));\r\n --_mono-drawer-font-preset: var(--mono-drawer-body-font-xs, var(--mono-text-xs));\r\n --_mono-drawer-body-line-height-preset: var(--mono-text-xs--lh);\r\n --_mono-drawer-title-font-preset: var(--mono-drawer-title-font-xs, var(--mono-text-sm));\r\n --_mono-drawer-close-size-preset: var(--mono-drawer-close-size-xs, calc(var(--mono-spacing) * 5));\r\n --_mono-drawer-icon-size-preset: calc(var(--mono-spacing) * 3);\r\n}\r\n\r\n[mono-drawer][mono-size=\"sm\"] {\r\n --_mono-drawer-radius-preset: var(--mono-drawer-radius-sm, var(--mono-radius-lg));\r\n --_mono-drawer-pad-preset: var(--mono-drawer-pad-sm, calc(var(--mono-spacing) * 3));\r\n --_mono-drawer-header-gap-preset: var(--mono-drawer-header-gap-sm, var(--mono-spacing));\r\n --_mono-drawer-footer-gap-preset: var(--mono-drawer-footer-gap-sm, calc(var(--mono-spacing) * 1.5));\r\n --_mono-drawer-font-preset: var(--mono-drawer-body-font-sm, var(--mono-text-xs));\r\n --_mono-drawer-body-line-height-preset: var(--mono-text-xs--lh);\r\n --_mono-drawer-title-font-preset: var(--mono-drawer-title-font-sm, var(--mono-text-base));\r\n --_mono-drawer-close-size-preset: var(--mono-drawer-close-size-sm, calc(var(--mono-spacing) * 6));\r\n --_mono-drawer-icon-size-preset: calc(var(--mono-spacing) * 3.5);\r\n}\r\n\r\n[mono-drawer][mono-size=\"lg\"] {\r\n --_mono-drawer-radius-preset: var(--mono-drawer-radius-lg, var(--mono-radius-2xl));\r\n --_mono-drawer-pad-preset: var(--mono-drawer-pad-lg, calc(var(--mono-spacing) * 5));\r\n --_mono-drawer-header-gap-preset: var(--mono-drawer-header-gap-lg, calc(var(--mono-spacing) * 2));\r\n --_mono-drawer-footer-gap-preset: var(--mono-drawer-footer-gap-lg, calc(var(--mono-spacing) * 2.5));\r\n --_mono-drawer-font-preset: var(--mono-drawer-body-font-lg, var(--mono-text-base));\r\n --_mono-drawer-body-line-height-preset: var(--mono-text-base--lh);\r\n --_mono-drawer-title-font-preset: var(--mono-drawer-title-font-lg, var(--mono-text-xl));\r\n --_mono-drawer-close-size-preset: var(--mono-drawer-close-size-lg, calc(var(--mono-spacing) * 8));\r\n --_mono-drawer-icon-size-preset: calc(var(--mono-spacing) * 4.5);\r\n}\r\n\r\n[mono-drawer][mono-size=\"xl\"] {\r\n --_mono-drawer-radius-preset: var(--mono-drawer-radius-xl, var(--mono-radius-2xl));\r\n --_mono-drawer-pad-preset: var(--mono-drawer-pad-xl, calc(var(--mono-spacing) * 6));\r\n --_mono-drawer-header-gap-preset: var(--mono-drawer-header-gap-xl, calc(var(--mono-spacing) * 2.5));\r\n --_mono-drawer-footer-gap-preset: var(--mono-drawer-footer-gap-xl, calc(var(--mono-spacing) * 3));\r\n --_mono-drawer-font-preset: var(--mono-drawer-body-font-xl, var(--mono-text-lg));\r\n --_mono-drawer-body-line-height-preset: var(--mono-text-lg--lh);\r\n --_mono-drawer-title-font-preset: var(--mono-drawer-title-font-xl, var(--mono-text-2xl, 1.5rem));\r\n --_mono-drawer-close-size-preset: var(--mono-drawer-close-size-xl, calc(var(--mono-spacing) * 9));\r\n --_mono-drawer-icon-size-preset: calc(var(--mono-spacing) * 5);\r\n}\r\n\r\n[mono-drawer][mono-size=\"xxl\"] {\r\n --_mono-drawer-radius-preset: var(--mono-drawer-radius-xxl, var(--mono-radius-4xl));\r\n --_mono-drawer-pad-preset: var(--mono-drawer-pad-xxl, calc(var(--mono-spacing) * 7));\r\n --_mono-drawer-header-gap-preset: var(--mono-drawer-header-gap-xxl, calc(var(--mono-spacing) * 3));\r\n --_mono-drawer-footer-gap-preset: var(--mono-drawer-footer-gap-xxl, calc(var(--mono-spacing) * 3.5));\r\n --_mono-drawer-font-preset: var(--mono-drawer-body-font-xxl, var(--mono-text-lg));\r\n --_mono-drawer-body-line-height-preset: var(--mono-text-lg--lh);\r\n --_mono-drawer-title-font-preset: var(--mono-drawer-title-font-xxl, 1.75rem);\r\n --_mono-drawer-close-size-preset: var(--mono-drawer-close-size-xxl, calc(var(--mono-spacing) * 10));\r\n --_mono-drawer-icon-size-preset: calc(var(--mono-spacing) * 5.5);\r\n}\r\n\r\n/* =========================================\r\n Colours — EXTENSION: the role tints the resizer and whatever the consumer\r\n turns back on (the head bar, the close hover)\r\n ========================================= */\r\n\r\n[mono-drawer][mono-color=\"primary\"] { --_mono-drawer-accent-preset: var(--_mono-drawer-primary); }\r\n[mono-drawer][mono-color=\"secondary\"] { --_mono-drawer-accent-preset: var(--_mono-drawer-secondary); }\r\n[mono-drawer][mono-color=\"success\"] { --_mono-drawer-accent-preset: var(--_mono-drawer-success); }\r\n[mono-drawer][mono-color=\"danger\"] { --_mono-drawer-accent-preset: var(--_mono-drawer-danger); }\r\n[mono-drawer][mono-color=\"warning\"] { --_mono-drawer-accent-preset: var(--_mono-drawer-warning); }\r\n[mono-drawer][mono-color=\"info\"] { --_mono-drawer-accent-preset: var(--_mono-drawer-info); }\r\n[mono-drawer][mono-color=\"teal\"] { --_mono-drawer-accent-preset: var(--_mono-drawer-teal); }\r\n[mono-drawer][mono-color=\"purple\"] { --_mono-drawer-accent-preset: var(--_mono-drawer-purple); }\r\n[mono-drawer][mono-color=\"neutral\"] { --_mono-drawer-accent-preset: var(--_mono-drawer-neutral); }\r\n[mono-drawer][mono-color=\"dark\"] { --_mono-drawer-accent-preset: var(--_mono-drawer-dark); }\r\n\r\n/* An explicit `color` shows on the panel itself: its edge (the one border in\r\n vega, the whole inset card in maia / mira / luma / rhea) becomes a thin line\r\n of the accent and a faint halo of it sits under the elevation. Without\r\n `color` the edge stays `--border` and there is no halo. A consumer's\r\n `--mono-drawer-border` / `--mono-drawer-glow` still win. */\r\n[mono-drawer][mono-color] {\r\n --_mono-drawer-border: var(--mono-drawer-border, var(--mono-drawer-accent-border, color-mix(in oklab, var(--_mono-drawer-accent) 35%, var(--border))));\r\n --_mono-drawer-glow: var(--mono-drawer-glow, 0 0 24px -4px color-mix(in oklab, var(--_mono-drawer-accent) 45%, transparent));\r\n}\r\n\r\n/* =========================================\r\n Overlay — `::backdrop`\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 styles/vega.css .drawer::backdrop — bg-black/10 backdrop-blur-xs.\r\n A real `::backdrop` cannot be reached from a shadow sheet and cannot stack with\r\n this component's own layer manager, so it is an element. */\r\n:where([mono-drawer]) > [mono-overlay] {\r\n /* Sized in VIEWPORT units, not `inset: 0`. `inset`/`100%` resolve against the\r\n initial containing block, which a horizontally-overflowing page inflates under\r\n mobile emulation (measured: 481x1041 on a 390x844 screen), so the scrim\r\n overshot the screen. `dvh`/`dvw` also track mobile browser chrome; the plain\r\n `v*` line above each is the pre-2022 fallback. */\r\n position: fixed;\r\n top: 0;\r\n left: 0;\r\n width: 100vw;\r\n width: 100dvw;\r\n height: 100vh;\r\n height: 100dvh;\r\n z-index: var(--_mono-drawer-z);\r\n background: var(--_mono-drawer-overlay-bg);\r\n opacity: 0;\r\n pointer-events: none;\r\n cursor: pointer;\r\n\r\n /* The blur is applied only while open, and its removal is DELAYED by the fade\r\n so the backdrop does not snap sharp while the scrim is still going. */\r\n backdrop-filter: none;\r\n -webkit-backdrop-filter: none;\r\n transition:\r\n opacity var(--_mono-drawer-overlay-duration) var(--_mono-drawer-ease),\r\n backdrop-filter 0s linear var(--_mono-drawer-overlay-duration),\r\n -webkit-backdrop-filter 0s linear var(--_mono-drawer-overlay-duration);\r\n}\r\n\r\n[mono-drawer][mono-open] > [mono-overlay] {\r\n opacity: 1;\r\n pointer-events: auto;\r\n backdrop-filter: var(--_mono-drawer-overlay-backdrop-filter);\r\n -webkit-backdrop-filter: var(--_mono-drawer-overlay-backdrop-filter);\r\n transition:\r\n opacity var(--_mono-drawer-overlay-duration) var(--_mono-drawer-ease),\r\n backdrop-filter 0s linear 0s,\r\n -webkit-backdrop-filter 0s linear 0s;\r\n}\r\n\r\n[mono-drawer][mono-no-overlay] > [mono-overlay] {\r\n display: none;\r\n}\r\n\r\n/* Stacked drawers: when another drawer or modal WITH an overlay is open above\r\n this one, hide this backdrop so dim layers don't compound — the topmost\r\n overlay alone dims everything beneath it. An `overlay=\"false\"` dialog above\r\n does not count, so this one keeps dimming the page. */\r\n[mono-drawer][mono-open][mono-has-drawer-above] > [mono-overlay] {\r\n opacity: 0;\r\n}\r\n\r\n/* =========================================\r\n Panel — `.drawer > *`\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 components/drawer.css .drawer >> > * — fixed z-50 flex h-auto\r\n flex-col transition-transform duration-500 ease-[cubic-bezier(0.32,0.72,0,1)]\r\n will-change-transform outline-hidden */\r\n/* basecoat@1.0.2 styles/vega.css .drawer > * — bg-popover text-popover-foreground text-sm */\r\n:where([mono-drawer]) > [mono-panel] {\r\n position: fixed;\r\n z-index: calc(var(--_mono-drawer-z) + 1);\r\n display: flex;\r\n flex-direction: column;\r\n padding: var(--_mono-drawer-panel-pad);\r\n color: var(--_mono-drawer-text);\r\n font-size: var(--_mono-drawer-font);\r\n outline: none;\r\n pointer-events: auto;\r\n will-change: transform;\r\n\r\n /* Closed state: invisible (hides the shadow halo too) until the slide-in\r\n begins. On close the visibility flip is delayed by the transform duration so\r\n the slide-out animation plays first. */\r\n visibility: hidden;\r\n transition:\r\n transform var(--_mono-drawer-duration) var(--_mono-drawer-ease),\r\n visibility 0s linear var(--_mono-drawer-duration);\r\n}\r\n\r\n/* The panel's PAINT is a layer, not the panel's own box: maia, mira, luma and\r\n rhea float the drawer as a card inset from the viewport edge\r\n (`before:inset-2 before:rounded-4xl before:border`) over a transparent panel.\r\n At `--mono-drawer-inset: 0` the layer is exactly the panel, which is vega. */\r\n[mono-drawer] > [mono-panel]::before {\r\n content: '';\r\n position: absolute;\r\n inset: var(--_mono-drawer-inset);\r\n z-index: -1;\r\n background: var(--_mono-drawer-bg);\r\n /* `inherit` picks up the panel's per-corner radii, which is the vega card.\r\n A flavor that INSETS the layer rounds all four corners instead, so it sets\r\n the radius outright. */\r\n border-radius: var(--mono-drawer-inset-radius, inherit);\r\n border: var(--_mono-drawer-inset-border-width) solid var(--_mono-drawer-border);\r\n box-shadow: var(--_mono-drawer-glow), var(--_mono-drawer-shadow);\r\n pointer-events: none;\r\n}\r\n\r\n[mono-drawer][mono-open] > [mono-panel] {\r\n visibility: visible;\r\n transition:\r\n transform var(--_mono-drawer-duration) var(--_mono-drawer-ease),\r\n visibility 0s linear 0s;\r\n}\r\n\r\n/* =========================================\r\n Positions — `[data-side]`\r\n -----------------------------------------------------------------------------\r\n Each side fixes the two insets it spans, takes its measure from the axis it\r\n grows on, and rounds + borders the ONE edge that faces the content.\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 components/drawer.css .drawer >> &[data-side='right'] > *\r\n — inset-y-0 right-0 w-3/4 max-w-sm translate-x-full */\r\n/* basecoat@1.0.2 styles/vega.css .drawer[data-side='right'] > * — rounded-l-xl border-l\r\n DEVIATION: `right` is this component's DEFAULT side, where upstream's is\r\n `bottom`, so the unqualified root is this one. */\r\n[mono-drawer]:is(:not([mono-position]), [mono-position=\"right\"]) > [mono-panel] {\r\n top: 0;\r\n right: 0;\r\n height: 100vh;\r\n height: 100dvh;\r\n width: var(--_mono-drawer-width);\r\n max-width: 100vw;\r\n max-width: 100dvw;\r\n transform: translateX(100%);\r\n border-start-start-radius: var(--_mono-drawer-radius);\r\n border-end-start-radius: var(--_mono-drawer-radius);\r\n}\r\n\r\n[mono-drawer]:is(:not([mono-position]), [mono-position=\"right\"]) > [mono-panel]::before {\r\n border-left-width: var(--_mono-drawer-border-width);\r\n}\r\n\r\n[mono-drawer][mono-open]:is(:not([mono-position]), [mono-position=\"right\"]) > [mono-panel] {\r\n transform: translateX(0);\r\n}\r\n\r\n/* basecoat@1.0.2 components/drawer.css .drawer >> &[data-side='left'] > *\r\n — inset-y-0 left-0 w-3/4 max-w-sm -translate-x-full */\r\n/* basecoat@1.0.2 styles/vega.css .drawer[data-side='left'] > * — rounded-r-xl border-r */\r\n[mono-drawer][mono-position=\"left\"] > [mono-panel] {\r\n top: 0;\r\n left: 0;\r\n height: 100vh;\r\n height: 100dvh;\r\n width: var(--_mono-drawer-width);\r\n max-width: 100vw;\r\n max-width: 100dvw;\r\n transform: translateX(-100%);\r\n border-start-end-radius: var(--_mono-drawer-radius);\r\n border-end-end-radius: var(--_mono-drawer-radius);\r\n}\r\n\r\n[mono-drawer][mono-position=\"left\"] > [mono-panel]::before {\r\n border-right-width: var(--_mono-drawer-border-width);\r\n}\r\n\r\n[mono-drawer][mono-open][mono-position=\"left\"] > [mono-panel] {\r\n transform: translateX(0);\r\n}\r\n\r\n/* basecoat@1.0.2 components/drawer.css .drawer >> &[data-side='top'] > *\r\n — inset-x-0 top-0 mb-24 max-h-[80vh] -translate-y-full */\r\n/* basecoat@1.0.2 styles/vega.css .drawer[data-side='top'] > * — rounded-b-xl border-b */\r\n[mono-drawer][mono-position=\"top\"] > [mono-panel] {\r\n top: 0;\r\n left: 0;\r\n width: 100vw;\r\n width: 100dvw;\r\n height: var(--_mono-drawer-height);\r\n max-height: var(--_mono-drawer-max-height);\r\n transform: translateY(-100%);\r\n border-end-start-radius: var(--_mono-drawer-radius);\r\n border-end-end-radius: var(--_mono-drawer-radius);\r\n}\r\n\r\n[mono-drawer][mono-position=\"top\"] > [mono-panel]::before {\r\n border-bottom-width: var(--_mono-drawer-border-width);\r\n}\r\n\r\n[mono-drawer][mono-open][mono-position=\"top\"] > [mono-panel] {\r\n transform: translateY(0);\r\n}\r\n\r\n/* basecoat@1.0.2 components/drawer.css .drawer >> &:not([data-side]) > *, &[data-side='bottom'] > *\r\n — inset-x-0 bottom-0 mt-24 max-h-[80vh] translate-y-full */\r\n/* basecoat@1.0.2 styles/vega.css .drawer:not([data-side]) > *, .drawer[data-side='bottom'] > *\r\n — rounded-t-xl border-t */\r\n[mono-drawer][mono-position=\"bottom\"] > [mono-panel] {\r\n bottom: 0;\r\n left: 0;\r\n width: 100vw;\r\n width: 100dvw;\r\n height: var(--_mono-drawer-height);\r\n max-height: var(--_mono-drawer-max-height);\r\n transform: translateY(100%);\r\n border-start-start-radius: var(--_mono-drawer-radius);\r\n border-start-end-radius: var(--_mono-drawer-radius);\r\n}\r\n\r\n[mono-drawer][mono-position=\"bottom\"] > [mono-panel]::before {\r\n border-top-width: var(--_mono-drawer-border-width);\r\n}\r\n\r\n[mono-drawer][mono-open][mono-position=\"bottom\"] > [mono-panel] {\r\n transform: translateY(0);\r\n}\r\n\r\n/* =========================================\r\n Resizer — EXTENSION: a grab bar on the panel's inner edge\r\n ========================================= */\r\n\r\n:where([mono-drawer] > [mono-panel]) > [mono-resizer] {\r\n position: absolute;\r\n z-index: 2;\r\n touch-action: none;\r\n background: transparent;\r\n transition: background-color var(--mono-duration) var(--mono-ease);\r\n}\r\n\r\n[mono-drawer] > [mono-panel] > [mono-resizer]:hover,\r\n[mono-drawer][mono-resizing] > [mono-panel] > [mono-resizer] {\r\n background: color-mix(in oklab, var(--_mono-drawer-accent) 30%, transparent);\r\n}\r\n\r\n[mono-drawer]:is(:not([mono-position]), [mono-position=\"right\"]) > [mono-panel] > [mono-resizer] {\r\n top: 0;\r\n bottom: 0;\r\n left: 0;\r\n width: 6px;\r\n cursor: ew-resize;\r\n}\r\n\r\n[mono-drawer][mono-position=\"left\"] > [mono-panel] > [mono-resizer] {\r\n top: 0;\r\n bottom: 0;\r\n right: 0;\r\n width: 6px;\r\n cursor: ew-resize;\r\n}\r\n\r\n[mono-drawer][mono-position=\"top\"] > [mono-panel] > [mono-resizer] {\r\n left: 0;\r\n right: 0;\r\n bottom: 0;\r\n height: 6px;\r\n cursor: ns-resize;\r\n}\r\n\r\n[mono-drawer][mono-position=\"bottom\"] > [mono-panel] > [mono-resizer] {\r\n left: 0;\r\n right: 0;\r\n top: 0;\r\n height: 6px;\r\n cursor: ns-resize;\r\n}\r\n\r\n/* No lag while dragging the handle. */\r\n[mono-drawer][mono-resizing] > [mono-panel] {\r\n transition: none;\r\n}\r\n\r\n[mono-drawer][mono-resizing] {\r\n user-select: none;\r\n}\r\n\r\n/* =========================================\r\n Header — `> header`\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 components/drawer.css .drawer >> > * > header — flex flex-col */\r\n/* basecoat@1.0.2 styles/vega.css .drawer > * > header — gap-0.5 p-4 text-start\r\n DEVIATIONS: a ROW, because the ✕ lives inside it (upstream's drawer has no\r\n close button and its header is a column of title + description); and NOT\r\n centred on the top / bottom sides for the same reason — a centred title beside\r\n a trailing ✕ reads as a mistake. */\r\n:where([mono-drawer] > [mono-panel]) > [mono-header] {\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n gap: var(--_mono-drawer-header-gap);\r\n flex-shrink: 0;\r\n padding: var(--_mono-drawer-pad);\r\n text-align: start;\r\n border-bottom: var(--_mono-drawer-header-border-width) solid var(--_mono-drawer-header-border);\r\n background: var(--_mono-drawer-header-bg);\r\n}\r\n\r\n/* basecoat@1.0.2 styles/vega.css .drawer > * > header > h2, .drawer > * > [data-title]\r\n — text-lg font-semibold leading-none tracking-tight */\r\n/* basecoat@1.0.2 components/drawer.css .drawer >> > * > header — flex flex-col\r\n (+ vega's gap-0.5 md:gap-1.5): the title / subtitle column beside the ✕. */\r\n:where([mono-drawer] > [mono-panel] > [mono-header]) > [mono-heading] {\r\n flex: 1;\r\n min-width: 0;\r\n display: flex;\r\n flex-direction: column;\r\n gap: var(--mono-drawer-heading-gap, var(--_mono-drawer-header-gap));\r\n}\r\n\r\n:where([mono-drawer] > [mono-panel] > [mono-header]) [mono-title] {\r\n min-width: 0;\r\n font-size: var(--_mono-drawer-title-font);\r\n font-weight: var(--_mono-drawer-title-weight);\r\n line-height: var(--_mono-drawer-title-line-height);\r\n letter-spacing: var(--_mono-drawer-title-tracking);\r\n text-transform: var(--_mono-drawer-title-transform);\r\n color: var(--_mono-drawer-title-color);\r\n}\r\n\r\n/* basecoat@1.0.2 styles/vega.css .drawer > * > header > p, .drawer > * > [data-description]\r\n — text-muted-foreground text-sm */\r\n:where([mono-drawer] > [mono-panel] > [mono-header]) [mono-subtitle] {\r\n min-width: 0;\r\n font-size: var(--_mono-drawer-subtitle-font);\r\n line-height: var(--mono-drawer-subtitle-line-height, var(--mono-leading-normal));\r\n color: var(--_mono-drawer-subtitle-color);\r\n}\r\n\r\n/* Empty regions. The light build omits them; the shadow build always renders\r\n them (its native `<slot>`s must exist to be scanned) and marks them\r\n [mono-empty]. The heading parts are matched as descendants because the shadow\r\n build nests them inside the `header` slot's fallback. */\r\n:where([mono-drawer] > [mono-panel]) > :is([mono-header], [mono-footer])[mono-empty],\r\n:where([mono-drawer] > [mono-panel] > [mono-header]) > [mono-heading][mono-empty],\r\n:where([mono-drawer] > [mono-panel] > [mono-header] > [mono-heading]) :is([mono-title], [mono-subtitle])[mono-empty] {\r\n display: none;\r\n}\r\n\r\n/* =========================================\r\n Close — EXTENSION, styled like the dialog's\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 components/dialog.css .dialog >> > * > :is(button, form[method='dialog'] > button)\r\n — inline-flex items-center justify-center opacity-70 transition-opacity\r\n hover:opacity-100. Upstream's DRAWER has no close button at all; borrowing the\r\n dialog's keeps the two consistent. */\r\n:where([mono-drawer] > [mono-panel] > [mono-header]) [mono-close] {\r\n flex-shrink: 0;\r\n /* stays at the end even when the heading column is empty (hidden) */\r\n margin-inline-start: auto;\r\n display: inline-flex;\r\n align-items: center;\r\n justify-content: center;\r\n width: var(--_mono-drawer-close-size);\r\n height: var(--_mono-drawer-close-size);\r\n padding: 0;\r\n border: none;\r\n border-radius: var(--_mono-drawer-close-radius);\r\n background: var(--_mono-drawer-close-bg);\r\n color: var(--_mono-drawer-close-color);\r\n opacity: var(--_mono-drawer-close-opacity);\r\n cursor: pointer;\r\n appearance: none;\r\n transition:\r\n opacity var(--mono-duration) var(--mono-ease),\r\n background-color var(--mono-duration) var(--mono-ease);\r\n}\r\n\r\n@media (hover: hover) {\r\n [mono-drawer] [mono-close]:hover {\r\n opacity: var(--_mono-drawer-close-hover-opacity);\r\n background: var(--_mono-drawer-close-hover-bg);\r\n }\r\n}\r\n\r\n[mono-drawer] [mono-close]:focus-visible {\r\n outline: none;\r\n box-shadow: 0 0 0 var(--mono-ring-width)\r\n color-mix(in oklab, var(--ring) var(--mono-ring-alpha), transparent);\r\n}\r\n\r\n[mono-drawer] [mono-close] > :is(svg, span) {\r\n display: block;\r\n width: var(--_mono-drawer-close-glyph);\r\n height: var(--_mono-drawer-close-glyph);\r\n}\r\n\r\n/* =========================================\r\n Body — `> section`\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 components/drawer.css .drawer >> > * > section\r\n — min-h-0 flex-1 overflow-y-auto\r\n DEVIATION: padded. Upstream leaves the section bare and pads the content it\r\n puts inside; here the body is a SLOT a consumer fills with plain text, so it\r\n brings the same `p-4` the header and footer use. `--mono-drawer-body-pad: 0`\r\n gives upstream's bare section back. */\r\n:where([mono-drawer] > [mono-panel]) > [mono-body] {\r\n flex: 1;\r\n min-height: 0;\r\n overflow-y: auto;\r\n padding: var(--mono-drawer-body-pad, var(--_mono-drawer-pad));\r\n font-size: var(--_mono-drawer-font);\r\n line-height: var(--_mono-drawer-body-line-height);\r\n}\r\n\r\n/* =========================================\r\n Footer — `> footer`\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 components/drawer.css .drawer >> > * > footer — mt-auto flex flex-col */\r\n/* basecoat@1.0.2 styles/vega.css .alert-dialog > * > footer, .dialog > * > footer — gap-2\r\n basecoat@1.0.2 styles/vega.css .drawer > * > footer — gap-2 p-4\r\n The COLUMN is upstream's: a drawer footer is the mobile-sheet idiom, where the\r\n actions are full-width and stacked. `--mono-drawer-footer-direction: row`\r\n restores the pre-port right-aligned row, and ONE sets it. */\r\n:where([mono-drawer] > [mono-panel]) > [mono-footer] {\r\n display: flex;\r\n flex-direction: var(--mono-drawer-footer-direction, column);\r\n align-items: var(--mono-drawer-footer-align, stretch);\r\n justify-content: var(--mono-drawer-footer-justify, flex-start);\r\n gap: var(--_mono-drawer-footer-gap);\r\n margin-top: auto;\r\n flex-shrink: 0;\r\n padding: var(--_mono-drawer-pad);\r\n border-top: var(--_mono-drawer-footer-border-width) solid var(--_mono-drawer-footer-border);\r\n background: var(--_mono-drawer-footer-bg);\r\n}\r\n\r\n/* The light build re-appends slotted nodes into a `[data-mono-slot]` outlet.\r\n Left inline, that outlet is ONE flex child, so the footer's gap and\r\n justification apply to IT rather than to the buttons inside it — while the\r\n shadow build's `<slot>` is `display: contents` per the UA sheet and the\r\n hand-written markup has no wrapper at all. Dissolving the outlet is what\r\n makes the three agree, and it is what a consumer writing\r\n `<button slot=\"footer\">` twice expects. */\r\n:where([mono-drawer] > [mono-panel] > [mono-footer]) > [data-mono-slot] {\r\n display: contents;\r\n}\r\n\r\n/* =========================================\r\n Closed\r\n ========================================= */\r\n\r\n[mono-drawer]:not([mono-open]) {\r\n pointer-events: none;\r\n}\r\n\r\n[mono-drawer]:not([mono-open]) > [mono-overlay] {\r\n opacity: 0;\r\n pointer-events: none;\r\n}\r\n\r\n/* A closed drawer is hidden with `visibility: hidden`, which skips PAINT but not\r\n LAYOUT — so the panel and everything slotted into it kept generating boxes and\r\n being measured even for a drawer the user never opened.\r\n `content-visibility: hidden` drops the closed subtree entirely.\r\n\r\n Measured alongside the modal (Chromium, ~400-node panels, 10 modal+drawer pairs):\r\n layout objects 12281 → 81, mount layout+style 94.6ms → 14.9ms and flat in the\r\n count. One open+close costs slightly more in exchange, since an opening panel is\r\n laid out from scratch; `--mono-drawer-duration: 0s` removes that if it matters.\r\n\r\n `allow-discrete` is what makes it safe to animate: opening flips the property to\r\n `visible` at 0% so the slide-in has something to composite; closing holds it\r\n `visible` until 100% so the panel slides out instead of vanishing on frame one.\r\n\r\n Gated behind @supports deliberately — `content-visibility … allow-discrete` in the\r\n `transition` SHORTHAND is a parse error without the feature, and one bad entry\r\n drops the WHOLE declaration, which would take the slide with it. Inside the guard\r\n the shorthand is known to parse, so the list is restated in full. Browsers without\r\n support keep exactly the previous behaviour.\r\n\r\n Safe for every position: the side drawers fix `top`/`bottom` and take an explicit\r\n `width`, the sheet ones fix `left`/`right` and cap their height, so size\r\n containment has no content-driven dimension to collapse while closed.\r\n\r\n Must stay ABOVE the reduced-motion block below — @supports adds no specificity, so\r\n source order is what keeps `transition: none` the winner there. */\r\n@supports (transition-behavior: allow-discrete) {\r\n :where([mono-drawer]) > [mono-panel] {\r\n content-visibility: hidden;\r\n contain-intrinsic-size: 0;\r\n transition:\r\n transform var(--_mono-drawer-duration) var(--_mono-drawer-ease),\r\n visibility 0s linear var(--_mono-drawer-duration),\r\n content-visibility var(--_mono-drawer-duration) allow-discrete;\r\n }\r\n\r\n [mono-drawer][mono-open] > [mono-panel] {\r\n content-visibility: visible;\r\n }\r\n}\r\n\r\n@media (prefers-reduced-motion: reduce) {\r\n [mono-drawer] > [mono-panel],\r\n [mono-drawer] > [mono-overlay] {\r\n transition: none;\r\n }\r\n}\r\n\r\n/* =========================================\r\n Auto full-screen (`auto-fullscreen` prop)\r\n =========================================\r\n\r\n Fill the screen at a Tailwind breakpoint and below, keeping the drawer's\r\n `position` — a `right` drawer still slides in from the right, it just covers the\r\n viewport. Boundaries are `<breakpoint> - 0.02px` to match Tailwind's `max-*`\r\n variants (at exactly 640px `sm:` applies, so auto-fullscreen must not).\r\n\r\n No `!important` needed, unlike modal.css: drawer sizing arrives as the\r\n `--mono-drawer-*` custom properties on the ROOT, while the panel's\r\n `width`/`height` come from the position rules above — (0,2,1) selectors that\r\n these, at (0,2,1) and declared AFTER, beat on order. Keep this section last.\r\n*/\r\n\r\n@media (max-width: 639.98px) {\r\n [mono-drawer][mono-auto-fullscreen=\"sm\"] > [mono-panel] {\r\n width: 100vw;\r\n width: 100dvw;\r\n height: 100vh;\r\n height: 100dvh;\r\n max-width: none;\r\n max-height: none;\r\n border-radius: 0;\r\n }\r\n\r\n [mono-drawer][mono-auto-fullscreen=\"sm\"] > [mono-panel]::before {\r\n border-width: 0;\r\n inset: 0;\r\n }\r\n\r\n /* Load-bearing, not cosmetic: the rules above outrank the `--mono-drawer-width`\r\n the resizer writes, so a drag here moves nothing visible YET still records a\r\n width — and the drawer would snap to it the moment the viewport grew back past\r\n the breakpoint. Hiding the handle removes the pointer target so no such drag\r\n can begin (`_onResizeStart` also guards, as belt-and-braces). */\r\n [mono-drawer][mono-auto-fullscreen=\"sm\"] > [mono-panel] > [mono-resizer] {\r\n display: none;\r\n }\r\n}\r\n\r\n@media (max-width: 767.98px) {\r\n [mono-drawer][mono-auto-fullscreen=\"md\"] > [mono-panel] {\r\n width: 100vw;\r\n width: 100dvw;\r\n height: 100vh;\r\n height: 100dvh;\r\n max-width: none;\r\n max-height: none;\r\n border-radius: 0;\r\n }\r\n\r\n [mono-drawer][mono-auto-fullscreen=\"md\"] > [mono-panel]::before {\r\n border-width: 0;\r\n inset: 0;\r\n }\r\n\r\n [mono-drawer][mono-auto-fullscreen=\"md\"] > [mono-panel] > [mono-resizer] {\r\n display: none;\r\n }\r\n}\r\n\r\n@media (max-width: 1023.98px) {\r\n [mono-drawer][mono-auto-fullscreen=\"lg\"] > [mono-panel] {\r\n width: 100vw;\r\n width: 100dvw;\r\n height: 100vh;\r\n height: 100dvh;\r\n max-width: none;\r\n max-height: none;\r\n border-radius: 0;\r\n }\r\n\r\n [mono-drawer][mono-auto-fullscreen=\"lg\"] > [mono-panel]::before {\r\n border-width: 0;\r\n inset: 0;\r\n }\r\n\r\n [mono-drawer][mono-auto-fullscreen=\"lg\"] > [mono-panel] > [mono-resizer] {\r\n display: none;\r\n }\r\n}\r\n\r\n@media (max-width: 1279.98px) {\r\n [mono-drawer][mono-auto-fullscreen=\"xl\"] > [mono-panel] {\r\n width: 100vw;\r\n width: 100dvw;\r\n height: 100vh;\r\n height: 100dvh;\r\n max-width: none;\r\n max-height: none;\r\n border-radius: 0;\r\n }\r\n\r\n [mono-drawer][mono-auto-fullscreen=\"xl\"] > [mono-panel]::before {\r\n border-width: 0;\r\n inset: 0;\r\n }\r\n\r\n [mono-drawer][mono-auto-fullscreen=\"xl\"] > [mono-panel] > [mono-resizer] {\r\n display: none;\r\n }\r\n}\r\n\r\n@media (max-width: 1535.98px) {\r\n [mono-drawer][mono-auto-fullscreen=\"2xl\"] > [mono-panel] {\r\n width: 100vw;\r\n width: 100dvw;\r\n height: 100vh;\r\n height: 100dvh;\r\n max-width: none;\r\n max-height: none;\r\n border-radius: 0;\r\n }\r\n\r\n [mono-drawer][mono-auto-fullscreen=\"2xl\"] > [mono-panel]::before {\r\n border-width: 0;\r\n inset: 0;\r\n }\r\n\r\n [mono-drawer][mono-auto-fullscreen=\"2xl\"] > [mono-panel] > [mono-resizer] {\r\n display: none;\r\n }\r\n}\r\n";
751
+ //#endregion
752
+ //#region src/components/drawer/mono-drawer.ts
753
+ var MonoDrawer = class MonoDrawer extends MonoDrawerCore(LitElement) {
754
+ constructor(..._args) {
755
+ super(..._args);
756
+ this._portal = null;
757
+ this._appliedPortalClasses = /* @__PURE__ */ new Set();
758
+ this._slotHeader = [];
759
+ this._slotTitle = [];
760
+ this._slotSubtitle = [];
761
+ this._slotBody = [];
762
+ this._slotFooter = [];
763
+ }
764
+ static {
765
+ this.styles = [unsafeCSS(drawer_default)];
766
+ }
767
+ createRenderRoot() {
768
+ if (this._portal) return this._portal;
769
+ if (typeof document === "undefined") return this;
770
+ const portal = document.createElement("div");
771
+ portal.setAttribute("data-mono-drawer-portal", "");
772
+ const initialClasses = this._computeDrawerClasses();
773
+ portal.className = initialClasses.join(" ");
774
+ this._appliedPortalClasses = new Set(initialClasses);
775
+ this._portal = portal;
776
+ document.body.appendChild(portal);
777
+ return portal;
778
+ }
779
+ connectedCallback() {
780
+ super.connectedCallback();
781
+ if (this._portal && !this._portal.isConnected && typeof document !== "undefined") document.body.appendChild(this._portal);
782
+ this._captureSlots();
783
+ this._updatePortalClasses();
784
+ this._updatePortalAttributes();
785
+ if (this.isConnected) this.performUpdate();
786
+ }
787
+ disconnectedCallback() {
788
+ if (this._portal && this._portal.parentNode) this._portal.parentNode.removeChild(this._portal);
789
+ super.disconnectedCallback();
790
+ }
791
+ updated(changed) {
792
+ super.updated(changed);
793
+ this._updatePortalClasses();
794
+ this._updatePortalAttributes();
795
+ this._placeSlot("header", this._slotHeader);
796
+ this._placeSlot("title", this._slotTitle);
797
+ this._placeSlot("subtitle", this._slotSubtitle);
798
+ this._placeSlot("body", this._slotBody);
799
+ this._placeSlot("footer", this._slotFooter);
800
+ this._orphanHolder = parkDetachedNodes(this._orphanHolder, [...this._slotTitle, ...this._slotSubtitle]);
801
+ }
802
+ /** Light build: the size-vars live on the portal (the `.mono-drawer` root). */
803
+ _setDrawerSizeVar(name, value) {
804
+ this._portal?.style.setProperty(name, value);
805
+ }
806
+ _removeDrawerSizeVar(name) {
807
+ this._portal?.style.removeProperty(name);
808
+ }
809
+ _updatePortalClasses() {
810
+ if (!this._portal) return;
811
+ const next = new Set(this._computeDrawerClasses());
812
+ for (const cls of this._appliedPortalClasses) if (!next.has(cls)) this._portal.classList.remove(cls);
813
+ for (const cls of next) if (!this._appliedPortalClasses.has(cls)) this._portal.classList.add(cls);
814
+ this._appliedPortalClasses = next;
815
+ }
816
+ _updatePortalAttributes() {
817
+ if (!this._portal) return;
818
+ this._portal.style.setProperty("--mono-drawer-z", String(this._effectiveZ));
819
+ for (let i = 0; i < this.style.length; i++) {
820
+ const prop = this.style.item(i);
821
+ if (prop.startsWith("--mono-drawer-")) this._portal.style.setProperty(prop, this.style.getPropertyValue(prop));
822
+ }
823
+ this._applyRootAttrs(this._portal);
824
+ this._portal.setAttribute("role", "dialog");
825
+ this._portal.setAttribute("title", "");
826
+ const aria = this._headingAria();
827
+ for (const [attr, value] of [["aria-labelledby", aria.labelledby], ["aria-describedby", aria.describedby]]) if (value) this._portal.setAttribute(attr, value);
828
+ else this._portal.removeAttribute(attr);
829
+ this._portal.setAttribute("aria-modal", this.overlay ? "true" : "false");
830
+ this._portal.setAttribute("aria-hidden", this.modelValue ? "false" : "true");
831
+ if (!this._portal.hasAttribute("tabindex")) this._portal.setAttribute("tabindex", "-1");
832
+ }
833
+ render() {
834
+ return this._renderDrawerBody();
835
+ }
836
+ _captureSlots() {
837
+ if (this._slotsCaptured) return;
838
+ this._slotsCaptured = true;
839
+ const captured = monoHostChildNodes(this);
840
+ const capturedSlotNodes = /* @__PURE__ */ new Set();
841
+ let unslottedSeen = false;
842
+ for (const node of captured) {
843
+ if (!(node instanceof Element)) {
844
+ if (node.nodeType === Node.TEXT_NODE && node.textContent?.trim()) {
845
+ this._slotBody.push(node);
846
+ capturedSlotNodes.add(node);
847
+ unslottedSeen = true;
848
+ }
849
+ continue;
850
+ }
851
+ const slotName = node.getAttribute("slot");
852
+ if (slotName === "header" || slotName === "title" || slotName === "subtitle") {
853
+ node.removeAttribute("slot");
854
+ (slotName === "header" ? this._slotHeader : slotName === "title" ? this._slotTitle : this._slotSubtitle).push(node);
855
+ capturedSlotNodes.add(node);
856
+ continue;
857
+ }
858
+ if (slotName === "footer" || slotName === "foot") {
859
+ node.removeAttribute("slot");
860
+ this._slotFooter.push(node);
861
+ capturedSlotNodes.add(node);
862
+ continue;
863
+ }
864
+ if (slotName === "body" || slotName === null) {
865
+ if (slotName === "body") node.removeAttribute("slot");
866
+ this._slotBody.push(node);
867
+ capturedSlotNodes.add(node);
868
+ unslottedSeen = true;
869
+ continue;
870
+ }
871
+ }
872
+ this._hasHeaderSlotState = this._slotHeader.length > 0;
873
+ this._hasTitleSlotState = this._slotTitle.length > 0;
874
+ this._hasSubtitleSlotState = this._slotSubtitle.length > 0;
875
+ this._hasFooterSlotState = this._slotFooter.length > 0;
876
+ this._hasBodySlotState = unslottedSeen && this._slotBody.length > 0;
877
+ for (const node of capturedSlotNodes) if (node.parentNode === this) this.removeChild(node);
878
+ guardHostTextContent(this, new Map([
879
+ ["header", this._slotHeader],
880
+ ["title", this._slotTitle],
881
+ ["subtitle", this._slotSubtitle],
882
+ ["body", this._slotBody],
883
+ ["footer", this._slotFooter]
884
+ ]), {
885
+ fallback: "body",
886
+ onWrite: () => {
887
+ this._hasBodySlotState = this._slotBody.length > 0;
888
+ this.requestUpdate();
889
+ }
890
+ });
891
+ }
892
+ _placeSlot(name, nodes) {
893
+ if (!nodes.length || !this._portal) return;
894
+ const target = this._portal.querySelector(`[data-mono-slot="${name}"]`);
895
+ if (!target) return;
896
+ for (const node of nodes) placeSlotNode(target, node);
897
+ }
898
+ };
899
+ MonoDrawer = __decorate([customElement("mono-drawer")], MonoDrawer);
900
+ //#endregion
901
+ export { MonoDrawer };