@melodicdev/components 2.0.3 → 3.1.0

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 (328) hide show
  1. package/README.md +7 -6
  2. package/assets/melodic-components.js +5681 -4145
  3. package/assets/melodic-components.js.map +1 -1
  4. package/assets/melodic-components.min.js +6573 -5141
  5. package/lib/components/data-display/activity-feed/activity-feed-item.component.d.ts +15 -14
  6. package/lib/components/data-display/activity-feed/activity-feed-item.component.d.ts.map +1 -1
  7. package/lib/components/data-display/activity-feed/activity-feed-item.component.js +36 -16
  8. package/lib/components/data-display/activity-feed/activity-feed-item.styles.d.ts.map +1 -1
  9. package/lib/components/data-display/activity-feed/activity-feed-item.styles.js +4 -0
  10. package/lib/components/data-display/activity-feed/activity-feed-item.template.d.ts.map +1 -1
  11. package/lib/components/data-display/activity-feed/activity-feed-item.template.js +15 -14
  12. package/lib/components/data-display/avatar/avatar.component.d.ts +9 -4
  13. package/lib/components/data-display/avatar/avatar.component.d.ts.map +1 -1
  14. package/lib/components/data-display/avatar/avatar.component.js +12 -3
  15. package/lib/components/data-display/avatar/avatar.template.js +1 -1
  16. package/lib/components/data-display/badge/badge.component.d.ts +2 -3
  17. package/lib/components/data-display/badge/badge.component.d.ts.map +1 -1
  18. package/lib/components/data-display/badge/badge.styles.d.ts.map +1 -1
  19. package/lib/components/data-display/badge/badge.styles.js +56 -35
  20. package/lib/components/data-display/badge/badge.types.d.ts +2 -0
  21. package/lib/components/data-display/badge/badge.types.d.ts.map +1 -1
  22. package/lib/components/data-display/calendar-view/calendar-view.utils.d.ts +10 -0
  23. package/lib/components/data-display/calendar-view/calendar-view.utils.d.ts.map +1 -1
  24. package/lib/components/data-display/calendar-view/calendar-view.utils.js +59 -27
  25. package/lib/components/data-display/data-grid/data-grid.component.d.ts +6 -5
  26. package/lib/components/data-display/data-grid/data-grid.component.d.ts.map +1 -1
  27. package/lib/components/data-display/data-grid/data-grid.component.js +49 -110
  28. package/lib/components/data-display/data-grid/data-grid.template.d.ts.map +1 -1
  29. package/lib/components/data-display/data-grid/data-grid.template.js +2 -6
  30. package/lib/components/data-display/list/list-item.component.d.ts +15 -6
  31. package/lib/components/data-display/list/list-item.component.d.ts.map +1 -1
  32. package/lib/components/data-display/list/list-item.component.js +57 -6
  33. package/lib/components/data-display/list/list-item.styles.d.ts.map +1 -1
  34. package/lib/components/data-display/list/list-item.styles.js +5 -0
  35. package/lib/components/data-display/list/list-item.template.d.ts.map +1 -1
  36. package/lib/components/data-display/list/list-item.template.js +18 -12
  37. package/lib/components/data-display/profile-card/profile-card.component.d.ts +2 -2
  38. package/lib/components/data-display/profile-card/profile-card.component.d.ts.map +1 -1
  39. package/lib/components/data-display/profile-card/profile-card.component.js +17 -15
  40. package/lib/components/data-display/profile-card/profile-card.template.js +1 -1
  41. package/lib/components/data-display/stat-card/stat-card.component.d.ts +6 -6
  42. package/lib/components/data-display/stat-card/stat-card.component.d.ts.map +1 -1
  43. package/lib/components/data-display/stat-card/stat-card.component.js +14 -6
  44. package/lib/components/data-display/stat-card/stat-card.template.js +4 -4
  45. package/lib/components/data-display/table/table.component.d.ts +7 -5
  46. package/lib/components/data-display/table/table.component.d.ts.map +1 -1
  47. package/lib/components/data-display/table/table.component.js +40 -117
  48. package/lib/components/data-display/table/table.template.d.ts.map +1 -1
  49. package/lib/components/data-display/table/table.template.js +1 -6
  50. package/lib/components/data-display/table-core/index.d.ts +3 -0
  51. package/lib/components/data-display/table-core/index.d.ts.map +1 -0
  52. package/lib/components/data-display/table-core/index.js +2 -0
  53. package/lib/components/data-display/table-core/table-core.d.ts +137 -0
  54. package/lib/components/data-display/table-core/table-core.d.ts.map +1 -0
  55. package/lib/components/data-display/table-core/table-core.js +225 -0
  56. package/lib/components/data-display/tag/tag.component.d.ts +14 -7
  57. package/lib/components/data-display/tag/tag.component.d.ts.map +1 -1
  58. package/lib/components/data-display/tag/tag.component.js +29 -5
  59. package/lib/components/data-display/tag/tag.template.js +2 -2
  60. package/lib/components/data-display/tag/tag.types.d.ts +8 -1
  61. package/lib/components/data-display/tag/tag.types.d.ts.map +1 -1
  62. package/lib/components/feedback/alert/alert.component.d.ts +6 -3
  63. package/lib/components/feedback/alert/alert.component.d.ts.map +1 -1
  64. package/lib/components/feedback/alert/alert.component.js +13 -4
  65. package/lib/components/feedback/alert/alert.template.js +1 -1
  66. package/lib/components/feedback/progress/progress.component.d.ts +4 -0
  67. package/lib/components/feedback/progress/progress.component.d.ts.map +1 -1
  68. package/lib/components/feedback/progress/progress.component.js +9 -0
  69. package/lib/components/feedback/progress/progress.template.d.ts.map +1 -1
  70. package/lib/components/feedback/progress/progress.template.js +19 -5
  71. package/lib/components/feedback/toast/toast.component.d.ts +6 -3
  72. package/lib/components/feedback/toast/toast.component.d.ts.map +1 -1
  73. package/lib/components/feedback/toast/toast.component.js +13 -4
  74. package/lib/components/feedback/toast/toast.service.d.ts.map +1 -1
  75. package/lib/components/feedback/toast/toast.service.js +2 -1
  76. package/lib/components/feedback/toast/toast.template.js +1 -1
  77. package/lib/components/forms/autocomplete/autocomplete.component.d.ts +12 -4
  78. package/lib/components/forms/autocomplete/autocomplete.component.d.ts.map +1 -1
  79. package/lib/components/forms/autocomplete/autocomplete.component.js +39 -30
  80. package/lib/components/forms/autocomplete/autocomplete.template.d.ts.map +1 -1
  81. package/lib/components/forms/autocomplete/autocomplete.template.js +14 -0
  82. package/lib/components/forms/button/button.component.d.ts +28 -3
  83. package/lib/components/forms/button/button.component.d.ts.map +1 -1
  84. package/lib/components/forms/button/button.component.js +81 -6
  85. package/lib/components/forms/button/button.template.js +1 -1
  86. package/lib/components/forms/button/button.types.d.ts +8 -1
  87. package/lib/components/forms/button/button.types.d.ts.map +1 -1
  88. package/lib/components/forms/button-group/button-group-item.component.d.ts +2 -2
  89. package/lib/components/forms/button-group/button-group-item.component.d.ts.map +1 -1
  90. package/lib/components/forms/button-group/button-group.component.d.ts +4 -2
  91. package/lib/components/forms/button-group/button-group.component.d.ts.map +1 -1
  92. package/lib/components/forms/button-group/button-group.component.js +3 -1
  93. package/lib/components/forms/button-group/button-group.styles.d.ts.map +1 -1
  94. package/lib/components/forms/button-group/button-group.styles.js +15 -1
  95. package/lib/components/forms/button-group/button-group.template.d.ts.map +1 -1
  96. package/lib/components/forms/button-group/button-group.template.js +4 -2
  97. package/lib/components/forms/checkbox/checkbox.component.d.ts +4 -2
  98. package/lib/components/forms/checkbox/checkbox.component.d.ts.map +1 -1
  99. package/lib/components/forms/checkbox/checkbox.component.js +3 -1
  100. package/lib/components/forms/checkbox/checkbox.styles.d.ts.map +1 -1
  101. package/lib/components/forms/checkbox/checkbox.styles.js +19 -0
  102. package/lib/components/forms/checkbox/checkbox.template.d.ts.map +1 -1
  103. package/lib/components/forms/checkbox/checkbox.template.js +4 -2
  104. package/lib/components/forms/date-picker/calendar.component.js +1 -1
  105. package/lib/components/forms/date-picker/date-picker.component.d.ts +11 -4
  106. package/lib/components/forms/date-picker/date-picker.component.d.ts.map +1 -1
  107. package/lib/components/forms/date-picker/date-picker.component.js +99 -32
  108. package/lib/components/forms/date-picker/date-picker.styles.d.ts.map +1 -1
  109. package/lib/components/forms/date-picker/date-picker.styles.js +0 -10
  110. package/lib/components/forms/date-picker/date-picker.template.d.ts.map +1 -1
  111. package/lib/components/forms/date-picker/date-picker.template.js +3 -4
  112. package/lib/components/forms/file-upload/file-upload-item.component.d.ts +7 -0
  113. package/lib/components/forms/file-upload/file-upload-item.component.d.ts.map +1 -1
  114. package/lib/components/forms/file-upload/file-upload-item.component.js +15 -0
  115. package/lib/components/forms/file-upload/file-upload.component.d.ts +15 -0
  116. package/lib/components/forms/file-upload/file-upload.component.d.ts.map +1 -1
  117. package/lib/components/forms/file-upload/file-upload.component.js +56 -0
  118. package/lib/components/forms/form-field/form-field.component.d.ts +12 -4
  119. package/lib/components/forms/form-field/form-field.component.d.ts.map +1 -1
  120. package/lib/components/forms/form-field/form-field.component.js +50 -31
  121. package/lib/components/forms/form-field/form-field.template.js +1 -1
  122. package/lib/components/forms/input/input.component.d.ts +2 -2
  123. package/lib/components/forms/input/input.component.d.ts.map +1 -1
  124. package/lib/components/forms/radio/radio-group.component.d.ts +6 -0
  125. package/lib/components/forms/radio/radio-group.component.d.ts.map +1 -1
  126. package/lib/components/forms/radio/radio-group.component.js +69 -2
  127. package/lib/components/forms/radio/radio-group.template.js +1 -1
  128. package/lib/components/forms/radio/radio.component.d.ts +7 -2
  129. package/lib/components/forms/radio/radio.component.d.ts.map +1 -1
  130. package/lib/components/forms/radio/radio.component.js +5 -0
  131. package/lib/components/forms/radio/radio.template.d.ts.map +1 -1
  132. package/lib/components/forms/radio/radio.template.js +1 -0
  133. package/lib/components/forms/select/select.component.d.ts +21 -6
  134. package/lib/components/forms/select/select.component.d.ts.map +1 -1
  135. package/lib/components/forms/select/select.component.js +94 -36
  136. package/lib/components/forms/select/select.template.d.ts.map +1 -1
  137. package/lib/components/forms/select/select.template.js +6 -2
  138. package/lib/components/forms/slider/slider.component.d.ts +2 -2
  139. package/lib/components/forms/slider/slider.component.d.ts.map +1 -1
  140. package/lib/components/forms/slider/slider.component.js +5 -1
  141. package/lib/components/forms/textarea/textarea.component.d.ts +2 -2
  142. package/lib/components/forms/textarea/textarea.component.d.ts.map +1 -1
  143. package/lib/components/forms/toggle/toggle.component.d.ts +4 -2
  144. package/lib/components/forms/toggle/toggle.component.d.ts.map +1 -1
  145. package/lib/components/forms/toggle/toggle.component.js +3 -1
  146. package/lib/components/forms/toggle/toggle.styles.d.ts.map +1 -1
  147. package/lib/components/forms/toggle/toggle.styles.js +19 -0
  148. package/lib/components/forms/toggle/toggle.template.d.ts.map +1 -1
  149. package/lib/components/forms/toggle/toggle.template.js +11 -3
  150. package/lib/components/foundation/card/card.component.d.ts +7 -6
  151. package/lib/components/foundation/card/card.component.d.ts.map +1 -1
  152. package/lib/components/foundation/card/card.component.js +18 -7
  153. package/lib/components/foundation/card/card.styles.d.ts.map +1 -1
  154. package/lib/components/foundation/card/card.styles.js +5 -0
  155. package/lib/components/foundation/card/card.template.d.ts.map +1 -1
  156. package/lib/components/foundation/card/card.template.js +16 -11
  157. package/lib/components/foundation/divider/divider.component.d.ts +5 -4
  158. package/lib/components/foundation/divider/divider.component.d.ts.map +1 -1
  159. package/lib/components/foundation/divider/divider.component.js +11 -3
  160. package/lib/components/foundation/divider/divider.styles.d.ts.map +1 -1
  161. package/lib/components/foundation/divider/divider.styles.js +6 -0
  162. package/lib/components/foundation/divider/divider.template.d.ts +5 -0
  163. package/lib/components/foundation/divider/divider.template.d.ts.map +1 -1
  164. package/lib/components/foundation/divider/divider.template.js +9 -6
  165. package/lib/components/general/icon/icon.template.d.ts.map +1 -1
  166. package/lib/components/general/icon/icon.template.js +3 -1
  167. package/lib/components/navigation/pagination/pagination.component.d.ts +5 -0
  168. package/lib/components/navigation/pagination/pagination.component.d.ts.map +1 -1
  169. package/lib/components/navigation/pagination/pagination.component.js +22 -10
  170. package/lib/components/navigation/pagination/pagination.styles.d.ts.map +1 -1
  171. package/lib/components/navigation/pagination/pagination.styles.js +6 -4
  172. package/lib/components/navigation/sidebar/sidebar-item.component.d.ts +4 -4
  173. package/lib/components/navigation/sidebar/sidebar-item.component.d.ts.map +1 -1
  174. package/lib/components/navigation/sidebar/sidebar-item.component.js +11 -4
  175. package/lib/components/navigation/sidebar/sidebar-item.template.js +2 -2
  176. package/lib/components/navigation/sidebar/sidebar.component.d.ts +7 -0
  177. package/lib/components/navigation/sidebar/sidebar.component.d.ts.map +1 -1
  178. package/lib/components/navigation/sidebar/sidebar.component.js +48 -5
  179. package/lib/components/navigation/steps/step-panel.component.d.ts +7 -0
  180. package/lib/components/navigation/steps/step-panel.component.d.ts.map +1 -1
  181. package/lib/components/navigation/steps/step-panel.component.js +7 -0
  182. package/lib/components/navigation/steps/step-panel.template.d.ts +1 -1
  183. package/lib/components/navigation/steps/step-panel.template.d.ts.map +1 -1
  184. package/lib/components/navigation/steps/step-panel.template.js +2 -2
  185. package/lib/components/navigation/steps/step.component.d.ts +2 -2
  186. package/lib/components/navigation/steps/step.component.d.ts.map +1 -1
  187. package/lib/components/navigation/steps/step.component.js +8 -2
  188. package/lib/components/navigation/steps/step.template.js +1 -1
  189. package/lib/components/navigation/steps/steps.component.d.ts +3 -1
  190. package/lib/components/navigation/steps/steps.component.d.ts.map +1 -1
  191. package/lib/components/navigation/steps/steps.component.js +47 -14
  192. package/lib/components/navigation/steps/steps.template.d.ts.map +1 -1
  193. package/lib/components/navigation/steps/steps.template.js +5 -1
  194. package/lib/components/navigation/tabs/tab-panel.component.d.ts +7 -0
  195. package/lib/components/navigation/tabs/tab-panel.component.d.ts.map +1 -1
  196. package/lib/components/navigation/tabs/tab-panel.component.js +7 -0
  197. package/lib/components/navigation/tabs/tab-panel.template.d.ts +1 -1
  198. package/lib/components/navigation/tabs/tab-panel.template.d.ts.map +1 -1
  199. package/lib/components/navigation/tabs/tab-panel.template.js +2 -2
  200. package/lib/components/navigation/tabs/tabs.component.d.ts +5 -3
  201. package/lib/components/navigation/tabs/tabs.component.d.ts.map +1 -1
  202. package/lib/components/navigation/tabs/tabs.component.js +49 -14
  203. package/lib/components/navigation/tabs/tabs.template.d.ts.map +1 -1
  204. package/lib/components/navigation/tabs/tabs.template.js +6 -1
  205. package/lib/components/overlays/dialog/dialog-ref.class.d.ts +17 -2
  206. package/lib/components/overlays/dialog/dialog-ref.class.d.ts.map +1 -1
  207. package/lib/components/overlays/dialog/dialog-ref.class.js +52 -6
  208. package/lib/components/overlays/dialog/dialog.component.d.ts.map +1 -1
  209. package/lib/components/overlays/dialog/dialog.component.js +5 -1
  210. package/lib/components/overlays/dialog/dialog.service.d.ts +2 -2
  211. package/lib/components/overlays/dialog/dialog.service.d.ts.map +1 -1
  212. package/lib/components/overlays/dialog/dialog.service.js +46 -18
  213. package/lib/components/overlays/drawer/drawer.component.d.ts +9 -2
  214. package/lib/components/overlays/drawer/drawer.component.d.ts.map +1 -1
  215. package/lib/components/overlays/drawer/drawer.component.js +34 -4
  216. package/lib/components/overlays/drawer/drawer.styles.d.ts.map +1 -1
  217. package/lib/components/overlays/drawer/drawer.styles.js +4 -0
  218. package/lib/components/overlays/dropdown/dropdown-item.component.d.ts +5 -2
  219. package/lib/components/overlays/dropdown/dropdown-item.component.d.ts.map +1 -1
  220. package/lib/components/overlays/dropdown/dropdown-item.component.js +18 -0
  221. package/lib/components/overlays/dropdown/dropdown-item.template.d.ts.map +1 -1
  222. package/lib/components/overlays/dropdown/dropdown-item.template.js +0 -3
  223. package/lib/components/overlays/dropdown/dropdown.component.d.ts +8 -4
  224. package/lib/components/overlays/dropdown/dropdown.component.d.ts.map +1 -1
  225. package/lib/components/overlays/dropdown/dropdown.component.js +61 -60
  226. package/lib/components/overlays/popover/popover.component.d.ts +6 -4
  227. package/lib/components/overlays/popover/popover.component.d.ts.map +1 -1
  228. package/lib/components/overlays/popover/popover.component.js +37 -51
  229. package/lib/components/overlays/tooltip/tooltip.component.d.ts +29 -4
  230. package/lib/components/overlays/tooltip/tooltip.component.d.ts.map +1 -1
  231. package/lib/components/overlays/tooltip/tooltip.component.js +73 -31
  232. package/lib/components/overlays/tooltip/tooltip.styles.d.ts.map +1 -1
  233. package/lib/components/overlays/tooltip/tooltip.styles.js +22 -10
  234. package/lib/components/overlays/tooltip/tooltip.template.d.ts.map +1 -1
  235. package/lib/components/overlays/tooltip/tooltip.template.js +3 -2
  236. package/lib/components/pages/auth/login-page.component.d.ts +11 -4
  237. package/lib/components/pages/auth/login-page.component.d.ts.map +1 -1
  238. package/lib/components/pages/auth/login-page.component.js +18 -5
  239. package/lib/components/pages/auth/login-page.template.d.ts.map +1 -1
  240. package/lib/components/pages/auth/login-page.template.js +9 -10
  241. package/lib/components/pages/auth/signup-page.component.d.ts +11 -4
  242. package/lib/components/pages/auth/signup-page.component.d.ts.map +1 -1
  243. package/lib/components/pages/auth/signup-page.component.js +18 -5
  244. package/lib/components/pages/auth/signup-page.template.d.ts.map +1 -1
  245. package/lib/components/pages/auth/signup-page.template.js +9 -10
  246. package/lib/components/pages/dashboard/dashboard-page.component.d.ts +18 -11
  247. package/lib/components/pages/dashboard/dashboard-page.component.d.ts.map +1 -1
  248. package/lib/components/pages/dashboard/dashboard-page.component.js +55 -13
  249. package/lib/components/pages/dashboard/dashboard-page.template.js +1 -1
  250. package/lib/components/sections/app-shell/app-shell.component.d.ts +6 -6
  251. package/lib/components/sections/app-shell/app-shell.component.d.ts.map +1 -1
  252. package/lib/components/sections/app-shell/app-shell.component.js +14 -6
  253. package/lib/components/sections/app-shell/app-shell.template.js +3 -3
  254. package/lib/components/sections/hero/hero-section.component.d.ts +6 -3
  255. package/lib/components/sections/hero/hero-section.component.d.ts.map +1 -1
  256. package/lib/components/sections/hero/hero-section.component.js +13 -4
  257. package/lib/components/sections/hero/hero-section.template.js +2 -2
  258. package/lib/components/sections/page-header/page-header.component.d.ts +16 -17
  259. package/lib/components/sections/page-header/page-header.component.d.ts.map +1 -1
  260. package/lib/components/sections/page-header/page-header.component.js +36 -25
  261. package/lib/components/sections/page-header/page-header.styles.d.ts.map +1 -1
  262. package/lib/components/sections/page-header/page-header.styles.js +9 -0
  263. package/lib/components/sections/page-header/page-header.template.d.ts +5 -0
  264. package/lib/components/sections/page-header/page-header.template.d.ts.map +1 -1
  265. package/lib/components/sections/page-header/page-header.template.js +42 -31
  266. package/lib/components/sections/page-section/page-section.component.d.ts +16 -12
  267. package/lib/components/sections/page-section/page-section.component.d.ts.map +1 -1
  268. package/lib/components/sections/page-section/page-section.component.js +34 -12
  269. package/lib/components/sections/page-section/page-section.styles.d.ts.map +1 -1
  270. package/lib/components/sections/page-section/page-section.styles.js +6 -0
  271. package/lib/components/sections/page-section/page-section.template.d.ts +6 -0
  272. package/lib/components/sections/page-section/page-section.template.d.ts.map +1 -1
  273. package/lib/components/sections/page-section/page-section.template.js +26 -15
  274. package/lib/components/sections/page-section/sanitize-href.function.d.ts +12 -0
  275. package/lib/components/sections/page-section/sanitize-href.function.d.ts.map +1 -0
  276. package/lib/components/sections/page-section/sanitize-href.function.js +15 -0
  277. package/lib/directives/tooltip.directive.d.ts +8 -2
  278. package/lib/directives/tooltip.directive.d.ts.map +1 -1
  279. package/lib/directives/tooltip.directive.js +103 -9
  280. package/lib/functions/deprecation.functions.d.ts +21 -0
  281. package/lib/functions/deprecation.functions.d.ts.map +1 -0
  282. package/lib/functions/deprecation.functions.js +44 -0
  283. package/lib/functions/index.d.ts +2 -0
  284. package/lib/functions/index.d.ts.map +1 -1
  285. package/lib/functions/index.js +2 -0
  286. package/lib/functions/watch-slot-presence.function.d.ts +17 -0
  287. package/lib/functions/watch-slot-presence.function.d.ts.map +1 -0
  288. package/lib/functions/watch-slot-presence.function.js +27 -0
  289. package/lib/theme/functions/create-theme.function.d.ts +15 -1
  290. package/lib/theme/functions/create-theme.function.d.ts.map +1 -1
  291. package/lib/theme/functions/create-theme.function.js +57 -11
  292. package/lib/theme/index.d.ts +1 -0
  293. package/lib/theme/index.d.ts.map +1 -1
  294. package/lib/types/index.d.ts +8 -2
  295. package/lib/types/index.d.ts.map +1 -1
  296. package/lib/utils/accessibility/focus-trap.d.ts +19 -1
  297. package/lib/utils/accessibility/focus-trap.d.ts.map +1 -1
  298. package/lib/utils/accessibility/focus-trap.js +77 -8
  299. package/lib/utils/accessibility/index.d.ts +2 -1
  300. package/lib/utils/accessibility/index.d.ts.map +1 -1
  301. package/lib/utils/accessibility/index.js +1 -1
  302. package/lib/utils/accessibility/live-region.d.ts +10 -3
  303. package/lib/utils/accessibility/live-region.d.ts.map +1 -1
  304. package/lib/utils/accessibility/live-region.js +64 -35
  305. package/lib/utils/directives/click-outside.directive.d.ts.map +1 -1
  306. package/lib/utils/directives/click-outside.directive.js +5 -3
  307. package/lib/utils/overlay/index.d.ts +4 -0
  308. package/lib/utils/overlay/index.d.ts.map +1 -0
  309. package/lib/utils/overlay/index.js +2 -0
  310. package/lib/utils/overlay/overlay-positioner.d.ts +54 -0
  311. package/lib/utils/overlay/overlay-positioner.d.ts.map +1 -0
  312. package/lib/utils/overlay/overlay-positioner.js +85 -0
  313. package/lib/utils/overlay/toggle-dismiss-guard.d.ts +24 -0
  314. package/lib/utils/overlay/toggle-dismiss-guard.d.ts.map +1 -0
  315. package/lib/utils/overlay/toggle-dismiss-guard.js +36 -0
  316. package/lib/utils/positioning/auto-update.d.ts.map +1 -1
  317. package/lib/utils/positioning/auto-update.js +3 -0
  318. package/lib/utils/positioning/compute-position.d.ts.map +1 -1
  319. package/lib/utils/positioning/compute-position.js +8 -4
  320. package/lib/utils/positioning/middlewares/flip.middleware.d.ts.map +1 -1
  321. package/lib/utils/positioning/middlewares/flip.middleware.js +10 -3
  322. package/lib/utils/positioning/middlewares/offset.middleware.d.ts +15 -0
  323. package/lib/utils/positioning/middlewares/offset.middleware.d.ts.map +1 -1
  324. package/lib/utils/positioning/middlewares/offset.middleware.js +31 -1
  325. package/lib/utils/positioning/middlewares/shift.middleware.d.ts +13 -3
  326. package/lib/utils/positioning/middlewares/shift.middleware.d.ts.map +1 -1
  327. package/lib/utils/positioning/middlewares/shift.middleware.js +15 -7
  328. package/package.json +6 -2
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
- import { MelodicComponent } from '@melodicdev/core';
7
+ import { Injector, MelodicComponent, RouterService } from '@melodicdev/core';
8
8
  import { stepsTemplate } from './steps.template.js';
9
9
  import { stepsStyles } from './steps.styles.js';
10
10
  /**
@@ -75,20 +75,26 @@ let StepsComponent = class StepsComponent {
75
75
  if (step?.disabled)
76
76
  return;
77
77
  if (this.routed && href) {
78
- window.history.pushState({}, '', href);
79
- window.dispatchEvent(new PopStateEvent('popstate'));
78
+ // Route through the router pipeline (guards → resolvers → commit)
79
+ // instead of a raw pushState + synthetic popstate, and only activate
80
+ // the step when the navigation actually commits — a guard-blocked
81
+ // navigation must not advance the wizard.
82
+ void Injector.get(RouterService)
83
+ .navigate(href)
84
+ .then((result) => {
85
+ if (result.success) {
86
+ this.activateStep(stepValue);
87
+ }
88
+ });
89
+ return;
80
90
  }
81
- this.active = stepValue;
82
- this.updateSlottedStepStates();
83
- this.updatePanelVisibility();
84
- this.elementRef.dispatchEvent(new CustomEvent('ml:change', {
85
- bubbles: true,
86
- composed: true,
87
- detail: { value: stepValue }
88
- }));
91
+ this.activateStep(stepValue);
89
92
  };
90
93
  /** Handle slotted step click event */
91
94
  this.handleSlottedStepClick = (event) => {
95
+ // ml:step-click is internal step→steps coordination; consumers get
96
+ // ml:change. Stop it here so it never escapes the ml-steps host.
97
+ event.stopPropagation();
92
98
  const { value, href } = event.detail;
93
99
  this.handleStepClick(value, href);
94
100
  };
@@ -159,6 +165,17 @@ let StepsComponent = class StepsComponent {
159
165
  window.removeEventListener('NavigationEvent', this._handleNavigation);
160
166
  }
161
167
  }
168
+ /** Apply the active step state and notify consumers. */
169
+ activateStep(stepValue) {
170
+ this.active = stepValue;
171
+ this.updateSlottedStepStates();
172
+ this.updatePanelVisibility();
173
+ this.elementRef.dispatchEvent(new CustomEvent('ml:change', {
174
+ bubbles: true,
175
+ composed: true,
176
+ detail: { value: stepValue }
177
+ }));
178
+ }
162
179
  /** Get status for a step based on its position relative to active */
163
180
  getStepStatus(stepValue) {
164
181
  const allSteps = this.getAllSteps();
@@ -219,17 +236,33 @@ let StepsComponent = class StepsComponent {
219
236
  updatePanelVisibility() {
220
237
  if (this.routed)
221
238
  return;
239
+ const steps = this.getAllSteps();
222
240
  const panels = this.elementRef.querySelectorAll('ml-step-panel');
223
241
  panels.forEach((panel) => {
224
- const isActive = panel.getAttribute('value') === this.active;
242
+ const value = panel.getAttribute('value');
243
+ const isActive = value === this.active;
225
244
  panel.style.display = isActive ? '' : 'none';
245
+ // Name the panel after its step. ARIA id references cannot cross
246
+ // shadow-root boundaries, so the association is made by accessible
247
+ // name instead of aria-labelledby/aria-controls (see tabs.component).
248
+ const label = steps.find((s) => s.value === value)?.label;
249
+ if (label) {
250
+ panel.panelLabel = label;
251
+ }
226
252
  });
227
253
  }
228
- /** Focus a specific step button */
254
+ /** Focus a specific step (config-mode shadow element or slotted ml-step) */
229
255
  focusStep(value) {
230
256
  const stepList = this.elementRef.shadowRoot?.querySelector('.ml-steps__list');
231
257
  const button = stepList?.querySelector(`[data-value="${value}"]`);
232
- button?.focus();
258
+ if (button) {
259
+ button.focus();
260
+ return;
261
+ }
262
+ // Slotted mode: the focusable element lives inside the ml-step's shadow root.
263
+ const host = this._slottedSteps.find((step) => step.getAttribute('value') === value);
264
+ const slottedStep = host?.shadowRoot?.querySelector('.ml-step');
265
+ slottedStep?.focus();
233
266
  }
234
267
  /** Sync active step with current route */
235
268
  syncWithRoute() {
@@ -1 +1 @@
1
- {"version":3,"file":"steps.template.d.ts","sourceRoot":"","sources":["../../../../src/components/navigation/steps/steps.template.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAG3D,wBAAgB,aAAa,CAAC,CAAC,EAAE,cAAc,6CAuC9C"}
1
+ {"version":3,"file":"steps.template.d.ts","sourceRoot":"","sources":["../../../../src/components/navigation/steps/steps.template.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAG3D,wBAAgB,aAAa,CAAC,CAAC,EAAE,cAAc,6CA0C9C"}
@@ -18,7 +18,11 @@ export function stepsTemplate(c) {
18
18
  @keydown=${c.handleKeyDown}
19
19
  >
20
20
  ${hasSteps
21
- ? repeat(c.steps, (step) => `${step.value}-${c.active === step.value}`, (step, index) => renderConfigStep(c, step, index))
21
+ ? repeat(c.steps,
22
+ // Key by value ALONE — encoding the active state in the key
23
+ // destroys/recreates the focused step on selection change,
24
+ // dropping keyboard focus to <body> (see tabs.template).
25
+ (step) => step.value, (step, index) => renderConfigStep(c, step, index))
22
26
  : html `<slot name="step" @slotchange=${c.handleStepSlotChange}></slot>`}
23
27
  </div>
24
28
 
@@ -16,5 +16,12 @@ export declare class TabPanelComponent implements IElementRef {
16
16
  elementRef: HTMLElement;
17
17
  /** Panel identifier (must match ml-tab value) */
18
18
  value: string;
19
+ /**
20
+ * Accessible name for the tabpanel, kept in sync with the matching tab's
21
+ * label by the parent ml-tabs. ARIA id references cannot cross shadow-root
22
+ * boundaries, so the tab/panel association is carried by name (aria-label)
23
+ * rather than aria-labelledby.
24
+ */
25
+ panelLabel: string;
19
26
  }
20
27
  //# sourceMappingURL=tab-panel.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tab-panel.component.d.ts","sourceRoot":"","sources":["../../../../src/components/navigation/tabs/tab-panel.component.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAIpD;;;;;;;;;;;;GAYG;AACH,qBAMa,iBAAkB,YAAW,WAAW;IAC7C,UAAU,EAAG,WAAW,CAAC;IAEhC,iDAAiD;IAC1C,KAAK,SAAM;CAClB"}
1
+ {"version":3,"file":"tab-panel.component.d.ts","sourceRoot":"","sources":["../../../../src/components/navigation/tabs/tab-panel.component.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAIpD;;;;;;;;;;;;GAYG;AACH,qBAMa,iBAAkB,YAAW,WAAW;IAC7C,UAAU,EAAG,WAAW,CAAC;IAEhC,iDAAiD;IAC1C,KAAK,SAAM;IAElB;;;;;OAKG;IACI,UAAU,SAAM;CACvB"}
@@ -24,6 +24,13 @@ let TabPanelComponent = class TabPanelComponent {
24
24
  constructor() {
25
25
  /** Panel identifier (must match ml-tab value) */
26
26
  this.value = '';
27
+ /**
28
+ * Accessible name for the tabpanel, kept in sync with the matching tab's
29
+ * label by the parent ml-tabs. ARIA id references cannot cross shadow-root
30
+ * boundaries, so the tab/panel association is carried by name (aria-label)
31
+ * rather than aria-labelledby.
32
+ */
33
+ this.panelLabel = '';
27
34
  }
28
35
  };
29
36
  TabPanelComponent = __decorate([
@@ -1,3 +1,3 @@
1
1
  import type { TabPanelComponent } from './tab-panel.component.js';
2
- export declare function tabPanelTemplate(_c: TabPanelComponent): import("@melodicdev/core").TemplateResult;
2
+ export declare function tabPanelTemplate(c: TabPanelComponent): import("@melodicdev/core").TemplateResult;
3
3
  //# sourceMappingURL=tab-panel.template.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tab-panel.template.d.ts","sourceRoot":"","sources":["../../../../src/components/navigation/tabs/tab-panel.template.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAElE,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,iBAAiB,6CAMrD"}
1
+ {"version":3,"file":"tab-panel.template.d.ts","sourceRoot":"","sources":["../../../../src/components/navigation/tabs/tab-panel.template.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAElE,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,iBAAiB,6CAMpD"}
@@ -1,7 +1,7 @@
1
1
  import { html } from '@melodicdev/core';
2
- export function tabPanelTemplate(_c) {
2
+ export function tabPanelTemplate(c) {
3
3
  return html `
4
- <div class="ml-tab-panel" role="tabpanel">
4
+ <div class="ml-tab-panel" role="tabpanel" aria-label=${c.panelLabel || c.value}>
5
5
  <slot></slot>
6
6
  </div>
7
7
  `;
@@ -1,5 +1,5 @@
1
1
  import type { IElementRef, OnCreate, OnDestroy, OnRender } from '@melodicdev/core';
2
- import type { Size } from '../../../types/index.js';
2
+ import type { ControlSize } from '../../../types/index.js';
3
3
  import type { TabsVariant, TabsOrientation, TabConfig } from './tabs.types.js';
4
4
  /**
5
5
  * ml-tabs - Tabbed interface component with optional router integration
@@ -44,7 +44,7 @@ export declare class TabsComponent implements IElementRef, OnCreate, OnDestroy,
44
44
  /** Visual variant */
45
45
  variant: TabsVariant;
46
46
  /** Size variant */
47
- size: Size;
47
+ size: ControlSize;
48
48
  /** Tab orientation */
49
49
  orientation: TabsOrientation;
50
50
  /** Enable router integration */
@@ -64,6 +64,8 @@ export declare class TabsComponent implements IElementRef, OnCreate, OnDestroy,
64
64
  handleTabSlotChange: (event: Event) => void;
65
65
  /** Handle tab click */
66
66
  handleTabClick: (tabValue: string, href?: string) => void;
67
+ /** Apply the active tab state and notify consumers. */
68
+ private activateTab;
67
69
  /** Handle keyboard navigation */
68
70
  handleKeyDown: (event: KeyboardEvent) => void;
69
71
  /** Get all tabs (from config or slotted) */
@@ -74,7 +76,7 @@ export declare class TabsComponent implements IElementRef, OnCreate, OnDestroy,
74
76
  private updateTabStates;
75
77
  /** Update panel visibility */
76
78
  private updatePanelVisibility;
77
- /** Focus a specific tab */
79
+ /** Focus a specific tab (config-mode shadow button or slotted ml-tab) */
78
80
  private focusTab;
79
81
  /** Sync active tab with current route (for routed mode) */
80
82
  private syncWithRoute;
@@ -1 +1 @@
1
- {"version":3,"file":"tabs.component.d.ts","sourceRoot":"","sources":["../../../../src/components/navigation/tabs/tabs.component.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACnF,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI/E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,qBAMa,aAAc,YAAW,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ;IACxE,UAAU,EAAG,WAAW,CAAC;IAEhC,iCAAiC;IAC1B,KAAK,SAAM;IAElB,qBAAqB;IACd,OAAO,EAAE,WAAW,CAAU;IAErC,mBAAmB;IACZ,I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7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
- import { MelodicComponent } from '@melodicdev/core';
7
+ import { Injector, MelodicComponent, RouterService } from '@melodicdev/core';
8
8
  import { tabsTemplate } from './tabs.template.js';
9
9
  import { tabsStyles } from './tabs.styles.js';
10
10
  /**
@@ -63,6 +63,9 @@ let TabsComponent = class TabsComponent {
63
63
  this._handleNavigation = this.onNavigation.bind(this);
64
64
  /** Listener for ml:tab-click from slotted ml-tab elements */
65
65
  this._handleTabClick = (event) => {
66
+ // ml:tab-click is internal tab→tabs coordination; consumers get ml:change.
67
+ // Stop it here so it never escapes the ml-tabs host.
68
+ event.stopPropagation();
66
69
  const { value, href } = event.detail;
67
70
  this.handleTabClick(value, href);
68
71
  };
@@ -86,17 +89,20 @@ let TabsComponent = class TabsComponent {
86
89
  if (tab?.disabled)
87
90
  return;
88
91
  if (this.routed && href) {
89
- window.history.pushState({}, '', href);
90
- window.dispatchEvent(new PopStateEvent('popstate'));
92
+ // Route through the router pipeline (guards → resolvers → commit)
93
+ // instead of a raw pushState + synthetic popstate, and only activate
94
+ // the tab when the navigation actually commits — a guard-blocked
95
+ // navigation must not flip the active tab.
96
+ void Injector.get(RouterService)
97
+ .navigate(href)
98
+ .then((result) => {
99
+ if (result.success) {
100
+ this.activateTab(tabValue);
101
+ }
102
+ });
103
+ return;
91
104
  }
92
- this.value = tabValue;
93
- this.updateTabStates();
94
- this.updatePanelVisibility();
95
- this.elementRef.dispatchEvent(new CustomEvent('ml:change', {
96
- bubbles: true,
97
- composed: true,
98
- detail: { value: tabValue }
99
- }));
105
+ this.activateTab(tabValue);
100
106
  };
101
107
  /** Handle keyboard navigation */
102
108
  this.handleKeyDown = (event) => {
@@ -150,6 +156,17 @@ let TabsComponent = class TabsComponent {
150
156
  window.removeEventListener('NavigationEvent', this._handleNavigation);
151
157
  }
152
158
  }
159
+ /** Apply the active tab state and notify consumers. */
160
+ activateTab(tabValue) {
161
+ this.value = tabValue;
162
+ this.updateTabStates();
163
+ this.updatePanelVisibility();
164
+ this.elementRef.dispatchEvent(new CustomEvent('ml:change', {
165
+ bubbles: true,
166
+ composed: true,
167
+ detail: { value: tabValue }
168
+ }));
169
+ }
153
170
  /** Get all tabs (from config or slotted) */
154
171
  getAllTabs() {
155
172
  if (this.tabs.length > 0) {
@@ -178,17 +195,35 @@ let TabsComponent = class TabsComponent {
178
195
  updatePanelVisibility() {
179
196
  if (this.routed)
180
197
  return;
198
+ const tabs = this.getAllTabs();
181
199
  const panels = this.elementRef.querySelectorAll('ml-tab-panel');
182
200
  panels.forEach((panel) => {
183
- const isActive = panel.getAttribute('value') === this.value;
201
+ const value = panel.getAttribute('value');
202
+ const isActive = value === this.value;
184
203
  panel.style.display = isActive ? '' : 'none';
204
+ // Name the panel after its tab. ARIA id references cannot cross
205
+ // shadow-root boundaries (the tab's role="tab" element and the
206
+ // panel's role="tabpanel" element live in different shadow trees),
207
+ // so the association is made by accessible name instead of
208
+ // aria-labelledby/aria-controls.
209
+ const label = tabs.find((t) => t.value === value)?.label;
210
+ if (label) {
211
+ panel.panelLabel = label;
212
+ }
185
213
  });
186
214
  }
187
- /** Focus a specific tab */
215
+ /** Focus a specific tab (config-mode shadow button or slotted ml-tab) */
188
216
  focusTab(value) {
189
217
  const tabList = this.elementRef.shadowRoot?.querySelector('.ml-tabs__list');
190
218
  const button = tabList?.querySelector(`[data-value="${value}"]`);
191
- button?.focus();
219
+ if (button) {
220
+ button.focus();
221
+ return;
222
+ }
223
+ // Slotted mode: the focusable button lives inside the ml-tab's shadow root.
224
+ const host = this._slottedTabs.find((tab) => tab.getAttribute('value') === value);
225
+ const slottedButton = host?.shadowRoot?.querySelector('.ml-tab');
226
+ slottedButton?.focus();
192
227
  }
193
228
  /** Sync active tab with current route (for routed mode) */
194
229
  syncWithRoute() {
@@ -1 +1 @@
1
- {"version":3,"file":"tabs.template.d.ts","sourceRoot":"","sources":["../../../../src/components/navigation/tabs/tabs.template.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGzD,wBAAgB,YAAY,CAAC,CAAC,EAAE,aAAa,6CAgC5C"}
1
+ {"version":3,"file":"tabs.template.d.ts","sourceRoot":"","sources":["../../../../src/components/navigation/tabs/tabs.template.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGzD,wBAAgB,YAAY,CAAC,CAAC,EAAE,aAAa,6CAoC5C"}
@@ -17,7 +17,12 @@ export function tabsTemplate(c) {
17
17
  @keydown=${c.handleKeyDown}
18
18
  >
19
19
  ${hasTabs
20
- ? repeat(c.tabs, (tab) => `${tab.value}-${c.value === tab.value}`, (tab) => renderTabButton(c, tab))
20
+ ? repeat(c.tabs,
21
+ // Key by value ALONE — encoding the active state in the key
22
+ // forces repeat to destroy/recreate both the old and new
23
+ // active tab on every selection change, dropping keyboard
24
+ // focus to <body> mid arrow-navigation.
25
+ (tab) => tab.value, (tab) => renderTabButton(c, tab))
21
26
  : html `<slot name="tab" @slotchange=${c.handleTabSlotChange}></slot>`}
22
27
  </div>
23
28
 
@@ -3,12 +3,16 @@ import type { IDialogConfig } from './dialog-config.interface';
3
3
  export declare class DialogRef<TResult = unknown, TData = unknown> {
4
4
  private readonly _dialogID;
5
5
  private readonly _dialogEl;
6
- private _afterOpenedCallback;
7
- private _afterClosedCallback;
6
+ private readonly _afterOpenedCallbacks;
7
+ private readonly _afterClosedCallbacks;
8
8
  private _data;
9
9
  private _disableClose;
10
+ private _pendingResult;
11
+ private _closeNotified;
12
+ private _popoversDismissed;
10
13
  private readonly _handleCancel;
11
14
  private readonly _handleBackdropClick;
15
+ private readonly _handleClose;
12
16
  constructor(_dialogID: UniqueID, _dialogEl: HTMLDialogElement);
13
17
  get dialogID(): UniqueID;
14
18
  get data(): TData | undefined;
@@ -16,10 +20,21 @@ export declare class DialogRef<TResult = unknown, TData = unknown> {
16
20
  applyConfig(config: IDialogConfig<TData>): this;
17
21
  open(): void;
18
22
  close(result?: TResult): void;
23
+ /**
24
+ * Register a callback invoked after the dialog opens. Multiple callbacks
25
+ * accumulate and are invoked in registration order.
26
+ */
19
27
  afterOpened(callback: () => void): void;
28
+ /**
29
+ * Register a callback invoked after the dialog closes — including native
30
+ * dismissals (Escape / backdrop). Multiple callbacks accumulate and are
31
+ * invoked in registration order.
32
+ */
20
33
  afterClosed(callback: (result: TResult | undefined) => void): void;
21
34
  private onCancel;
22
35
  private onBackdropClick;
36
+ private onClose;
37
+ private notifyClosed;
23
38
  private _dismissDescendantPopovers;
24
39
  }
25
40
  //# sourceMappingURL=dialog-ref.class.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dialog-ref.class.d.ts","sourceRoot":"","sources":["../../../../src/components/overlays/dialog/dialog-ref.class.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,qBAAa,SAAS,CAAC,OAAO,GAAG,OAAO,EAAE,KAAK,GAAG,OAAO;IASvD,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,SAAS;IAT3B,OAAO,CAAC,oBAAoB,CAA6B;IACzD,OAAO,CAAC,oBAAoB,CAAwD;IACpF,OAAO,CAAC,KAAK,CAAoB;IACjC,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA4B;IAC1D,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAmC;gBAGtD,SAAS,EAAE,QAAQ,EACnB,SAAS,EAAE,iBAAiB;IAM9C,IAAW,QAAQ,IAAI,QAAQ,CAE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,SAAS,EAAE,QAAQ,EACnB,SAAS,EAAE,iBAAiB;IAS9C,IAAW,QAAQ,IAAI,QAAQ,CAE9B;IAED,IAAW,IAAI,IAAI,KAAK,GAAG,SAAS,CAEnC;IAED,IAAW,YAAY,IAAI,OAAO,CAEjC;IAEM,WAAW,CAAC,MAAM,EAAE,aAAa,CAAC,KAAK,CAAC,GAAG,IAAI;IAyB/C,IAAI,IAAI,IAAI;IASZ,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI;IAWpC;;;OAGG;IACI,WAAW,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI;IAI9C;;;;OAIG;IACI,WAAW,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,OAAO,GAAG,SAAS,KAAK,IAAI,GAAG,IAAI;IAIzE,OAAO,CAAC,QAAQ;IAMhB,OAAO,CAAC,eAAe;IAMvB,OAAO,CAAC,OAAO;IAIf,OAAO,CAAC,YAAY;IAiBpB,OAAO,CAAC,0BAA0B;CAelC"}
@@ -2,13 +2,23 @@ export class DialogRef {
2
2
  constructor(_dialogID, _dialogEl) {
3
3
  this._dialogID = _dialogID;
4
4
  this._dialogEl = _dialogEl;
5
- this._afterOpenedCallback = null;
6
- this._afterClosedCallback = null;
5
+ this._afterOpenedCallbacks = [];
6
+ this._afterClosedCallbacks = [];
7
7
  this._disableClose = false;
8
+ // Guards double-fire when both the programmatic close() fallback and the
9
+ // dialog's native `close` event run for the same close cycle.
10
+ this._closeNotified = false;
11
+ // Tracks whether close() already dismissed descendant popovers this cycle,
12
+ // so the native-close path doesn't dismiss them a second time.
13
+ this._popoversDismissed = false;
8
14
  this._handleCancel = this.onCancel.bind(this);
9
15
  this._handleBackdropClick = this.onBackdropClick.bind(this);
16
+ this._handleClose = this.onClose.bind(this);
10
17
  this._dialogEl.addEventListener('cancel', this._handleCancel);
11
18
  this._dialogEl.addEventListener('click', this._handleBackdropClick);
19
+ // Listen to the native close event so Escape-dismiss (cancel → close)
20
+ // and any other native close path also fire afterClosed callbacks.
21
+ this._dialogEl.addEventListener('close', this._handleClose);
12
22
  }
13
23
  get dialogID() {
14
24
  return this._dialogID;
@@ -39,19 +49,37 @@ export class DialogRef {
39
49
  return this;
40
50
  }
41
51
  open() {
52
+ this._closeNotified = false;
53
+ this._popoversDismissed = false;
54
+ this._pendingResult = undefined;
42
55
  this._dialogEl.showModal();
43
- this._afterOpenedCallback?.();
56
+ this._afterOpenedCallbacks.forEach((callback) => callback());
57
+ this._dialogEl.dispatchEvent(new CustomEvent('ml:open', { bubbles: true, composed: true }));
44
58
  }
45
59
  close(result) {
60
+ this._pendingResult = result;
46
61
  this._dismissDescendantPopovers(this._dialogEl);
62
+ this._popoversDismissed = true;
47
63
  this._dialogEl.close();
48
- this._afterClosedCallback?.(result);
64
+ // The native `close` event may fire synchronously or on a queued task
65
+ // depending on the environment; notifyClosed() is idempotent, so notify
66
+ // here as well to guarantee synchronous afterClosed delivery.
67
+ this.notifyClosed();
49
68
  }
69
+ /**
70
+ * Register a callback invoked after the dialog opens. Multiple callbacks
71
+ * accumulate and are invoked in registration order.
72
+ */
50
73
  afterOpened(callback) {
51
- this._afterOpenedCallback = callback;
74
+ this._afterOpenedCallbacks.push(callback);
52
75
  }
76
+ /**
77
+ * Register a callback invoked after the dialog closes — including native
78
+ * dismissals (Escape / backdrop). Multiple callbacks accumulate and are
79
+ * invoked in registration order.
80
+ */
53
81
  afterClosed(callback) {
54
- this._afterClosedCallback = callback;
82
+ this._afterClosedCallbacks.push(callback);
55
83
  }
56
84
  onCancel(event) {
57
85
  if (this._disableClose) {
@@ -63,6 +91,24 @@ export class DialogRef {
63
91
  this.close();
64
92
  }
65
93
  }
94
+ onClose() {
95
+ this.notifyClosed();
96
+ }
97
+ notifyClosed() {
98
+ if (this._closeNotified)
99
+ return;
100
+ this._closeNotified = true;
101
+ // Escape-dismiss skips close(), so make sure descendant popovers are
102
+ // dismissed on this path too (hidePopover is safe post-close).
103
+ if (!this._popoversDismissed) {
104
+ this._dismissDescendantPopovers(this._dialogEl);
105
+ }
106
+ this._popoversDismissed = false;
107
+ const result = this._pendingResult;
108
+ this._pendingResult = undefined;
109
+ this._afterClosedCallbacks.forEach((callback) => callback(result));
110
+ this._dialogEl.dispatchEvent(new CustomEvent('ml:close', { bubbles: true, composed: true, detail: { result } }));
111
+ }
66
112
  _dismissDescendantPopovers(root) {
67
113
  const children = root.querySelectorAll('*');
68
114
  children.forEach((el) => {
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.component.d.ts","sourceRoot":"","sources":["../../../../src/components/overlays/dialog/dialog.component.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAKzE,qBAMa,eAAgB,YAAW,WAAW,EAAE,QAAQ,EAAE,SAAS;IAChE,UAAU,EAAG,WAAW,CAAC;IAGhC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAiB;IAEhD,OAAO,CAAC,SAAS,CAAqB;IACtC,OAAO,CAAC,SAAS,CAAqB;IACtC,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,WAAW,CAAS;IAErB,QAAQ,IAAI,IAAI;IAIvB,OAAO,CAAC,cAAc;IAaf,SAAS,IAAI,IAAI;IAQjB,IAAI,IAAI,IAAI;IAKZ,KAAK,CAAC,CAAC,GAAG,OAAO,EAAE,MAAM,CAAC,EAAE,CAAC,GAAG,IAAI;IAI3C,OAAO,CAAC,cAAc;CAQtB"}
1
+ {"version":3,"file":"dialog.component.d.ts","sourceRoot":"","sources":["../../../../src/components/overlays/dialog/dialog.component.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAKzE,qBAMa,eAAgB,YAAW,WAAW,EAAE,QAAQ,EAAE,SAAS;IAChE,UAAU,EAAG,WAAW,CAAC;IAGhC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAiB;IAEhD,OAAO,CAAC,SAAS,CAAqB;IACtC,OAAO,CAAC,SAAS,CAAqB;IACtC,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,WAAW,CAAS;IAErB,QAAQ,IAAI,IAAI;IAIvB,OAAO,CAAC,cAAc;IAaf,SAAS,IAAI,IAAI;IAQjB,IAAI,IAAI,IAAI;IASZ,KAAK,CAAC,CAAC,GAAG,OAAO,EAAE,MAAM,CAAC,EAAE,CAAC,GAAG,IAAI;IAI3C,OAAO,CAAC,cAAc;CAQtB"}
@@ -42,10 +42,14 @@ let DialogComponent = class DialogComponent {
42
42
  }
43
43
  open() {
44
44
  this.registerDialog();
45
+ if (!this._dialogRef) {
46
+ console.warn('[ml-dialog] Cannot open: dialog element is not rendered yet.');
47
+ return;
48
+ }
45
49
  this._dialogRef.open();
46
50
  }
47
51
  close(result) {
48
- this._dialogRef.close(result);
52
+ this._dialogRef?.close(result);
49
53
  }
50
54
  createDialogID() {
51
55
  return (this.elementRef
@@ -13,8 +13,8 @@ export declare class DialogService {
13
13
  * re-rendered instance (same id) just created.
14
14
  */
15
15
  removeDialog(dialogID: UniqueID, dialogEl?: HTMLDialogElement): void;
16
- open<TResult = unknown, TData = unknown>(dialogComponent: new (...args: any[]) => any, config?: IDialogConfig<TData>): DialogRef<TResult, TData>;
17
- open<TResult = unknown, TData = unknown>(dialogID: UniqueID): DialogRef<TResult, TData>;
16
+ open<TResult = unknown, TData = unknown>(dialogComponent: new (...args: any[]) => any, config?: IDialogConfig<TData>): DialogRef<TResult, TData> | undefined;
17
+ open<TResult = unknown, TData = unknown>(dialogID: UniqueID): DialogRef<TResult, TData> | undefined;
18
18
  close<T = unknown>(dialogID: UniqueID, result?: T): void;
19
19
  private cleanUpDialog;
20
20
  private mountDialog;
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.service.d.ts","sourceRoot":"","sources":["../../../../src/components/overlays/dialog/dialog.service.ts"],"names":[],"mappings":"AACA,OAAO,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AC,QAAQ,CAAC,QAAQ,CAAwC;IAE1D,SAAS,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,iBAAiB,GAAG,SAAS;IA2B5E;;;;;;;OAOG;IACI,YAAY,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAAE,iBAAiB,GAAG,IAAI;IAcpE,IAAI,CAAC,OAAO,GAAG,OAAO,EAAE,KAAK,GAAG,OAAO,EAAE,eAAe,EAAE,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAAE,MAAM,CAAC,EAAE,aAAa,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC,OAAO,EAAE,KAAK,CAAC,GAAG,SAAS;IAC5J,IAAI,CAAC,OAAO,GAAG,OAAO,EAAE,KAAK,GAAG,OAAO,EAAE,QAAQ,EAAE,QAAQ,GAAG,SAAS,CAAC,OAAO,EAAE,KAAK,CAAC,GAAG,SAAS;IA4CnG,KAAK,CAAC,CAAC,GAAG,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE,CAAC,GAAG,IAAI;IAU/D,OAAO,CAAC,aAAa;IAOrB,OAAO,CAAC,WAAW;IAMnB,OAAO,CAAC,aAAa;CAGrB"}
@@ -11,16 +11,25 @@ let DialogService = class DialogService {
11
11
  this._dialogs = new Map();
12
12
  }
13
13
  addDialog(dialogID, dialogEl) {
14
+ // An inline <ml-dialog> re-render can re-register under the same id with
15
+ // a new element; drop the previous registration's close listener so
16
+ // discarded elements don't accumulate listeners.
17
+ const previous = this._dialogs.get(dialogID);
18
+ if (previous) {
19
+ previous.dialogEl.removeEventListener('close', previous.closeListener);
20
+ }
14
21
  const dialogRef = new DialogRef(dialogID, dialogEl);
22
+ const closeListener = () => {
23
+ const elements = this._dialogs.get(dialogID);
24
+ this.cleanUpDialog(dialogID, elements?.dialogComponent);
25
+ };
15
26
  this._dialogs.set(dialogID, {
16
27
  dialogRef,
17
28
  dialogEl,
18
- dialogComponent: undefined
19
- });
20
- dialogEl.addEventListener('close', () => {
21
- const elements = this._dialogs.get(dialogID);
22
- this.cleanUpDialog(dialogID, elements?.dialogComponent);
29
+ dialogComponent: undefined,
30
+ closeListener
23
31
  });
32
+ dialogEl.addEventListener('close', closeListener);
24
33
  return dialogRef;
25
34
  }
26
35
  /**
@@ -32,23 +41,40 @@ let DialogService = class DialogService {
32
41
  * re-rendered instance (same id) just created.
33
42
  */
34
43
  removeDialog(dialogID, dialogEl) {
35
- if (dialogEl) {
36
- const elements = this._dialogs.get(dialogID);
37
- if (!elements || elements.dialogEl !== dialogEl) {
38
- return;
39
- }
44
+ const elements = this._dialogs.get(dialogID);
45
+ if (!elements) {
46
+ return;
47
+ }
48
+ if (dialogEl && elements.dialogEl !== dialogEl) {
49
+ return;
40
50
  }
51
+ elements.dialogEl.removeEventListener('close', elements.closeListener);
41
52
  this._dialogs.delete(dialogID);
42
53
  }
43
54
  open(dialogComponentOrID, config) {
44
55
  let dialogID = dialogComponentOrID;
45
- let dialogElements = this._dialogs.get(dialogID);
56
+ let dialogComponent;
46
57
  if (typeof dialogComponentOrID !== 'string') {
47
- const dialogComponent = this.mountDialog(dialogComponentOrID);
48
- const mlDialogEl = dialogComponent.shadowRoot?.querySelector('ml-dialog');
49
- const dialogEl = mlDialogEl.shadowRoot?.querySelector('dialog');
58
+ const mounted = this.mountDialog(dialogComponentOrID);
59
+ const mlDialogEl = mounted.shadowRoot?.querySelector('ml-dialog') ?? null;
60
+ const dialogEl = mlDialogEl?.shadowRoot?.querySelector('dialog') ?? null;
61
+ if (!dialogEl) {
62
+ console.warn(`[DialogService] Component "${dialogComponentOrID.selector}" did not render an <ml-dialog>; cannot open.`);
63
+ this.unmountDialog(mounted);
64
+ return undefined;
65
+ }
50
66
  dialogID = dialogEl.id;
51
- dialogElements = this._dialogs.get(dialogID);
67
+ dialogComponent = mounted;
68
+ }
69
+ const dialogElements = this._dialogs.get(dialogID);
70
+ if (!dialogElements) {
71
+ console.warn(`[DialogService] No dialog registered with id "${dialogID}"; open() ignored.`);
72
+ if (dialogComponent) {
73
+ this.unmountDialog(dialogComponent);
74
+ }
75
+ return undefined;
76
+ }
77
+ if (dialogComponent) {
52
78
  dialogElements.dialogComponent = dialogComponent;
53
79
  if (config) {
54
80
  dialogElements.dialogRef.applyConfig(config);
@@ -59,10 +85,12 @@ let DialogService = class DialogService {
59
85
  return dialogElements.dialogRef;
60
86
  }
61
87
  close(dialogID, result) {
62
- if (this._dialogs.has(dialogID)) {
63
- const dialogElements = this._dialogs.get(dialogID);
64
- dialogElements.dialogRef.close(result);
88
+ const dialogElements = this._dialogs.get(dialogID);
89
+ if (!dialogElements) {
90
+ console.warn(`[DialogService] No dialog registered with id "${dialogID}"; close() ignored.`);
91
+ return;
65
92
  }
93
+ dialogElements.dialogRef.close(result);
66
94
  }
67
95
  cleanUpDialog(dialogID, dialogComponent) {
68
96
  if (dialogComponent) {