@ionic/core 7.7.0 → 7.7.1-dev.11706736578.174d0727

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 (307) hide show
  1. package/components/helpers.js +2 -2
  2. package/components/ion-modal.js +4 -6
  3. package/components/ion-select.js +3 -3
  4. package/components/overlays.js +72 -21
  5. package/dist/cjs/{animation-fdab9de5.js → animation-c2840aea.js} +1 -1
  6. package/dist/cjs/{form-controller-7b90d7b7.js → form-controller-c83330c0.js} +1 -1
  7. package/dist/cjs/{framework-delegate-a3e6d060.js → framework-delegate-e0e13baa.js} +1 -1
  8. package/dist/cjs/{helpers-2e1028fa.js → helpers-da4c0ed1.js} +2 -2
  9. package/dist/cjs/{index-84351d21.js → index-0ccc7b6f.js} +3 -3
  10. package/dist/cjs/{index-10da82ce.js → index-62290fec.js} +1 -1
  11. package/dist/cjs/{index-8c679cbf.js → index-6600c909.js} +2 -2
  12. package/dist/cjs/{index-53d162b2.js → index-bef98850.js} +1 -1
  13. package/dist/cjs/index.cjs.js +8 -8
  14. package/dist/cjs/{input-shims-6f804705.js → input-shims-a9a85bb9.js} +2 -2
  15. package/dist/cjs/{input.utils-d693d18a.js → input.utils-d7dca90f.js} +1 -1
  16. package/dist/cjs/ion-accordion_2.cjs.entry.js +1 -1
  17. package/dist/cjs/ion-action-sheet.cjs.entry.js +4 -4
  18. package/dist/cjs/ion-alert.cjs.entry.js +4 -4
  19. package/dist/cjs/ion-app_8.cjs.entry.js +8 -8
  20. package/dist/cjs/ion-back-button.cjs.entry.js +1 -1
  21. package/dist/cjs/ion-breadcrumb_2.cjs.entry.js +1 -1
  22. package/dist/cjs/ion-button_2.cjs.entry.js +1 -1
  23. package/dist/cjs/ion-card_5.cjs.entry.js +1 -1
  24. package/dist/cjs/ion-checkbox.cjs.entry.js +2 -2
  25. package/dist/cjs/ion-datetime-button.cjs.entry.js +1 -1
  26. package/dist/cjs/ion-datetime_3.cjs.entry.js +4 -4
  27. package/dist/cjs/ion-fab_3.cjs.entry.js +1 -1
  28. package/dist/cjs/ion-img.cjs.entry.js +1 -1
  29. package/dist/cjs/ion-infinite-scroll_2.cjs.entry.js +2 -2
  30. package/dist/cjs/ion-input.cjs.entry.js +4 -4
  31. package/dist/cjs/ion-item-option_3.cjs.entry.js +2 -2
  32. package/dist/cjs/ion-item_8.cjs.entry.js +1 -1
  33. package/dist/cjs/ion-loading.cjs.entry.js +4 -4
  34. package/dist/cjs/ion-menu_3.cjs.entry.js +5 -5
  35. package/dist/cjs/ion-modal.cjs.entry.js +9 -11
  36. package/dist/cjs/ion-nav_2.cjs.entry.js +4 -4
  37. package/dist/cjs/ion-picker-column-internal.cjs.entry.js +1 -1
  38. package/dist/cjs/ion-picker-internal.cjs.entry.js +1 -1
  39. package/dist/cjs/ion-popover.cjs.entry.js +5 -5
  40. package/dist/cjs/ion-progress-bar.cjs.entry.js +1 -1
  41. package/dist/cjs/ion-radio_2.cjs.entry.js +2 -2
  42. package/dist/cjs/ion-range.cjs.entry.js +3 -3
  43. package/dist/cjs/ion-refresher_2.cjs.entry.js +3 -3
  44. package/dist/cjs/ion-reorder_2.cjs.entry.js +2 -2
  45. package/dist/cjs/ion-route_4.cjs.entry.js +1 -1
  46. package/dist/cjs/ion-searchbar.cjs.entry.js +1 -1
  47. package/dist/cjs/ion-segment_2.cjs.entry.js +1 -1
  48. package/dist/cjs/ion-select_3.cjs.entry.js +7 -7
  49. package/dist/cjs/ion-tab-bar_2.cjs.entry.js +1 -1
  50. package/dist/cjs/ion-tab_2.cjs.entry.js +2 -2
  51. package/dist/cjs/ion-textarea.cjs.entry.js +4 -4
  52. package/dist/cjs/ion-toast.cjs.entry.js +4 -4
  53. package/dist/cjs/ion-toggle.cjs.entry.js +2 -2
  54. package/dist/cjs/{ios.transition-8e40c54e.js → ios.transition-810ef802.js} +3 -3
  55. package/dist/cjs/{md.transition-597a2479.js → md.transition-15315952.js} +3 -3
  56. package/dist/cjs/{notch-controller-db0127c4.js → notch-controller-bfbcbb7a.js} +1 -1
  57. package/dist/cjs/{overlays-c50bf3c1.js → overlays-37b51f7b.js} +72 -22
  58. package/dist/cjs/{status-tap-b0bfea34.js → status-tap-d3dcdb3b.js} +2 -2
  59. package/dist/cjs/{swipe-back-8411f044.js → swipe-back-cf8aa1ec.js} +1 -1
  60. package/dist/collection/components/modal/modal.js +4 -6
  61. package/dist/collection/components/modal/test/animations/modal.e2e.js +36 -0
  62. package/dist/collection/components/select/select.js +3 -3
  63. package/dist/collection/utils/helpers.js +1 -1
  64. package/dist/collection/utils/overlays.js +71 -20
  65. package/dist/docs.json +1 -1
  66. package/dist/esm/{animation-60dbdd13.js → animation-6a0c5338.js} +1 -1
  67. package/dist/esm/{form-controller-014aa89f.js → form-controller-21dd62b1.js} +1 -1
  68. package/dist/esm/{framework-delegate-fed7fe7c.js → framework-delegate-ed4ba327.js} +1 -1
  69. package/dist/esm/{helpers-c0b9ca37.js → helpers-be245865.js} +2 -2
  70. package/dist/esm/{index-d64f34ea.js → index-020f5464.js} +1 -1
  71. package/dist/esm/{index-4b98143d.js → index-22b42a9f.js} +3 -3
  72. package/dist/esm/{index-48209844.js → index-aa29e8bf.js} +2 -2
  73. package/dist/esm/{index-eb12ef92.js → index-f3946ac1.js} +1 -1
  74. package/dist/esm/index.js +8 -8
  75. package/dist/esm/{input-shims-b90ca55f.js → input-shims-5329bbe8.js} +2 -2
  76. package/dist/esm/{input.utils-6e9b0046.js → input.utils-a445f677.js} +1 -1
  77. package/dist/esm/ion-accordion_2.entry.js +1 -1
  78. package/dist/esm/ion-action-sheet.entry.js +4 -4
  79. package/dist/esm/ion-alert.entry.js +4 -4
  80. package/dist/esm/ion-app_8.entry.js +8 -8
  81. package/dist/esm/ion-back-button.entry.js +1 -1
  82. package/dist/esm/ion-breadcrumb_2.entry.js +1 -1
  83. package/dist/esm/ion-button_2.entry.js +1 -1
  84. package/dist/esm/ion-card_5.entry.js +1 -1
  85. package/dist/esm/ion-checkbox.entry.js +2 -2
  86. package/dist/esm/ion-datetime-button.entry.js +1 -1
  87. package/dist/esm/ion-datetime_3.entry.js +4 -4
  88. package/dist/esm/ion-fab_3.entry.js +1 -1
  89. package/dist/esm/ion-img.entry.js +1 -1
  90. package/dist/esm/ion-infinite-scroll_2.entry.js +2 -2
  91. package/dist/esm/ion-input.entry.js +4 -4
  92. package/dist/esm/ion-item-option_3.entry.js +2 -2
  93. package/dist/esm/ion-item_8.entry.js +1 -1
  94. package/dist/esm/ion-loading.entry.js +4 -4
  95. package/dist/esm/ion-menu_3.entry.js +5 -5
  96. package/dist/esm/ion-modal.entry.js +9 -11
  97. package/dist/esm/ion-nav_2.entry.js +4 -4
  98. package/dist/esm/ion-picker-column-internal.entry.js +1 -1
  99. package/dist/esm/ion-picker-internal.entry.js +1 -1
  100. package/dist/esm/ion-popover.entry.js +5 -5
  101. package/dist/esm/ion-progress-bar.entry.js +1 -1
  102. package/dist/esm/ion-radio_2.entry.js +2 -2
  103. package/dist/esm/ion-range.entry.js +3 -3
  104. package/dist/esm/ion-refresher_2.entry.js +3 -3
  105. package/dist/esm/ion-reorder_2.entry.js +2 -2
  106. package/dist/esm/ion-route_4.entry.js +1 -1
  107. package/dist/esm/ion-searchbar.entry.js +1 -1
  108. package/dist/esm/ion-segment_2.entry.js +1 -1
  109. package/dist/esm/ion-select_3.entry.js +7 -7
  110. package/dist/esm/ion-tab-bar_2.entry.js +1 -1
  111. package/dist/esm/ion-tab_2.entry.js +2 -2
  112. package/dist/esm/ion-textarea.entry.js +4 -4
  113. package/dist/esm/ion-toast.entry.js +4 -4
  114. package/dist/esm/ion-toggle.entry.js +2 -2
  115. package/dist/esm/{ios.transition-7ff7381d.js → ios.transition-46de8e98.js} +3 -3
  116. package/dist/esm/{md.transition-28a9a26b.js → md.transition-804d9596.js} +3 -3
  117. package/dist/esm/{notch-controller-15d281a4.js → notch-controller-6bd3e0f9.js} +1 -1
  118. package/dist/esm/{overlays-3311e70e.js → overlays-7199c581.js} +73 -22
  119. package/dist/esm/{status-tap-2b335fb7.js → status-tap-d8a80d95.js} +2 -2
  120. package/dist/esm/{swipe-back-c06602f2.js → swipe-back-37a22d34.js} +1 -1
  121. package/dist/esm-es5/{animation-60dbdd13.js → animation-6a0c5338.js} +1 -1
  122. package/dist/esm-es5/{form-controller-014aa89f.js → form-controller-21dd62b1.js} +1 -1
  123. package/dist/esm-es5/{framework-delegate-fed7fe7c.js → framework-delegate-ed4ba327.js} +1 -1
  124. package/dist/esm-es5/helpers-be245865.js +4 -0
  125. package/dist/esm-es5/index-020f5464.js +4 -0
  126. package/dist/esm-es5/{index-4b98143d.js → index-22b42a9f.js} +1 -1
  127. package/dist/esm-es5/{index-48209844.js → index-aa29e8bf.js} +1 -1
  128. package/dist/esm-es5/{index-eb12ef92.js → index-f3946ac1.js} +1 -1
  129. package/dist/esm-es5/index.js +1 -1
  130. package/dist/esm-es5/{input-shims-b90ca55f.js → input-shims-5329bbe8.js} +1 -1
  131. package/dist/esm-es5/{input.utils-6e9b0046.js → input.utils-a445f677.js} +1 -1
  132. package/dist/esm-es5/ion-accordion_2.entry.js +1 -1
  133. package/dist/esm-es5/ion-action-sheet.entry.js +1 -1
  134. package/dist/esm-es5/ion-alert.entry.js +1 -1
  135. package/dist/esm-es5/ion-app_8.entry.js +1 -1
  136. package/dist/esm-es5/ion-back-button.entry.js +1 -1
  137. package/dist/esm-es5/ion-breadcrumb_2.entry.js +1 -1
  138. package/dist/esm-es5/ion-button_2.entry.js +1 -1
  139. package/dist/esm-es5/ion-card_5.entry.js +1 -1
  140. package/dist/esm-es5/ion-checkbox.entry.js +1 -1
  141. package/dist/esm-es5/ion-datetime-button.entry.js +1 -1
  142. package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
  143. package/dist/esm-es5/ion-fab_3.entry.js +1 -1
  144. package/dist/esm-es5/ion-img.entry.js +1 -1
  145. package/dist/esm-es5/ion-infinite-scroll_2.entry.js +1 -1
  146. package/dist/esm-es5/ion-input.entry.js +1 -1
  147. package/dist/esm-es5/ion-item-option_3.entry.js +1 -1
  148. package/dist/esm-es5/ion-item_8.entry.js +1 -1
  149. package/dist/esm-es5/ion-loading.entry.js +1 -1
  150. package/dist/esm-es5/ion-menu_3.entry.js +1 -1
  151. package/dist/esm-es5/ion-modal.entry.js +1 -1
  152. package/dist/esm-es5/ion-nav_2.entry.js +1 -1
  153. package/dist/esm-es5/ion-picker-column-internal.entry.js +1 -1
  154. package/dist/esm-es5/ion-picker-internal.entry.js +1 -1
  155. package/dist/esm-es5/ion-popover.entry.js +1 -1
  156. package/dist/esm-es5/ion-progress-bar.entry.js +1 -1
  157. package/dist/esm-es5/ion-radio_2.entry.js +1 -1
  158. package/dist/esm-es5/ion-range.entry.js +1 -1
  159. package/dist/esm-es5/ion-refresher_2.entry.js +1 -1
  160. package/dist/esm-es5/ion-reorder_2.entry.js +1 -1
  161. package/dist/esm-es5/ion-route_4.entry.js +1 -1
  162. package/dist/esm-es5/ion-searchbar.entry.js +1 -1
  163. package/dist/esm-es5/ion-segment_2.entry.js +1 -1
  164. package/dist/esm-es5/ion-select_3.entry.js +1 -1
  165. package/dist/esm-es5/ion-tab-bar_2.entry.js +1 -1
  166. package/dist/esm-es5/ion-tab_2.entry.js +1 -1
  167. package/dist/esm-es5/ion-textarea.entry.js +1 -1
  168. package/dist/esm-es5/ion-toast.entry.js +1 -1
  169. package/dist/esm-es5/ion-toggle.entry.js +1 -1
  170. package/dist/esm-es5/{ios.transition-7ff7381d.js → ios.transition-46de8e98.js} +1 -1
  171. package/dist/esm-es5/md.transition-804d9596.js +4 -0
  172. package/dist/esm-es5/{notch-controller-15d281a4.js → notch-controller-6bd3e0f9.js} +1 -1
  173. package/dist/esm-es5/overlays-7199c581.js +4 -0
  174. package/dist/esm-es5/{status-tap-2b335fb7.js → status-tap-d8a80d95.js} +1 -1
  175. package/dist/esm-es5/swipe-back-37a22d34.js +4 -0
  176. package/dist/ionic/index.esm.js +1 -1
  177. package/dist/ionic/ionic.esm.js +1 -1
  178. package/dist/ionic/{p-92c7f47f.system.entry.js → p-00b14d2c.system.entry.js} +1 -1
  179. package/dist/ionic/{p-a2ad515b.entry.js → p-05167dc2.entry.js} +1 -1
  180. package/dist/ionic/{p-cfdaf024.system.entry.js → p-089b2b36.system.entry.js} +1 -1
  181. package/dist/ionic/p-0b955124.system.js +1 -1
  182. package/dist/ionic/{p-b4d8fe47.js → p-0c625e5f.js} +1 -1
  183. package/dist/ionic/{p-f88dd429.entry.js → p-0f6a29e7.entry.js} +1 -1
  184. package/dist/ionic/p-1061d7cb.js +4 -0
  185. package/dist/ionic/{p-c3790581.entry.js → p-12627bff.entry.js} +1 -1
  186. package/dist/ionic/{p-b253ad7f.js → p-12a8643e.js} +1 -1
  187. package/dist/ionic/{p-078fd095.system.entry.js → p-12cf5909.system.entry.js} +1 -1
  188. package/dist/ionic/{p-1c531ca2.entry.js → p-186959bb.entry.js} +1 -1
  189. package/dist/ionic/{p-3a98f8db.entry.js → p-1a8bd472.entry.js} +1 -1
  190. package/dist/ionic/{p-b8c685a7.system.js → p-1bc9b5f5.system.js} +1 -1
  191. package/dist/ionic/{p-108f730a.entry.js → p-1e3e8be1.entry.js} +1 -1
  192. package/dist/ionic/{p-92c2178e.system.entry.js → p-1f87e5b2.system.entry.js} +1 -1
  193. package/dist/ionic/{p-dce9bc53.entry.js → p-20253122.entry.js} +1 -1
  194. package/dist/ionic/{p-6f38d0c5.system.entry.js → p-261eb8dc.system.entry.js} +1 -1
  195. package/dist/ionic/{p-0eef8b34.system.entry.js → p-26bfb7aa.system.entry.js} +1 -1
  196. package/dist/ionic/{p-df281664.system.entry.js → p-2b99a589.system.entry.js} +1 -1
  197. package/dist/ionic/{p-94be3ad7.js → p-2c118b1e.js} +1 -1
  198. package/dist/ionic/{p-efe9180b.entry.js → p-2c726979.entry.js} +1 -1
  199. package/dist/ionic/{p-f1cc690e.entry.js → p-2f682b1d.entry.js} +1 -1
  200. package/dist/ionic/{p-2f66e177.system.entry.js → p-2fd6badb.system.entry.js} +1 -1
  201. package/dist/ionic/{p-400574bf.entry.js → p-312e6137.entry.js} +1 -1
  202. package/dist/ionic/{p-44638413.system.entry.js → p-331b4e02.system.entry.js} +1 -1
  203. package/dist/ionic/{p-62a3c609.system.js → p-3362b4a9.system.js} +1 -1
  204. package/dist/ionic/{p-a19f5ae1.entry.js → p-3b1c3be8.entry.js} +1 -1
  205. package/dist/ionic/{p-f85932b8.entry.js → p-3fe26591.entry.js} +1 -1
  206. package/dist/ionic/p-400be8d3.system.js +4 -0
  207. package/dist/ionic/{p-5e60dbc8.entry.js → p-41cbadb1.entry.js} +1 -1
  208. package/dist/ionic/{p-c858f685.js → p-46bcc2f5.js} +1 -1
  209. package/dist/ionic/p-48de5c0d.js +4 -0
  210. package/dist/ionic/p-4c812a54.js +4 -0
  211. package/dist/ionic/{p-dbb4c012.entry.js → p-4f06e44f.entry.js} +1 -1
  212. package/dist/ionic/{p-1d72ecba.system.entry.js → p-523ef897.system.entry.js} +1 -1
  213. package/dist/ionic/{p-31c495c2.js → p-56ee6d9a.js} +1 -1
  214. package/dist/ionic/{p-c6fef62b.system.js → p-5c9652a6.system.js} +1 -1
  215. package/dist/ionic/{p-8a671f16.entry.js → p-5ca6b52b.entry.js} +1 -1
  216. package/dist/ionic/{p-6871553b.system.js → p-62b7320a.system.js} +1 -1
  217. package/dist/ionic/{p-2da0a76c.entry.js → p-639cc7d8.entry.js} +1 -1
  218. package/dist/ionic/p-6444cade.system.js +4 -0
  219. package/dist/ionic/{p-324dafd3.entry.js → p-6482ab9e.entry.js} +1 -1
  220. package/dist/ionic/{p-7c32fb95.system.entry.js → p-6495a18f.system.entry.js} +1 -1
  221. package/dist/ionic/{p-0fd295ef.system.entry.js → p-64ab9cd1.system.entry.js} +1 -1
  222. package/dist/ionic/{p-dd60faa5.system.entry.js → p-67f8a403.system.entry.js} +1 -1
  223. package/dist/ionic/{p-61ba2137.system.js → p-6afef6c1.system.js} +1 -1
  224. package/dist/ionic/{p-0f1f0519.system.entry.js → p-6c6144c7.system.entry.js} +1 -1
  225. package/dist/ionic/{p-70026e8f.system.entry.js → p-6d62875f.system.entry.js} +1 -1
  226. package/dist/ionic/{p-d95c8e90.entry.js → p-740f9972.entry.js} +1 -1
  227. package/dist/ionic/{p-0ae25399.system.entry.js → p-741f045a.system.entry.js} +1 -1
  228. package/dist/ionic/{p-776b144b.system.js → p-74fa0a29.system.js} +1 -1
  229. package/dist/ionic/{p-ce657bb3.entry.js → p-7582a199.entry.js} +1 -1
  230. package/dist/ionic/{p-680f96e8.system.entry.js → p-75b2a402.system.entry.js} +1 -1
  231. package/dist/ionic/{p-a3f572a7.js → p-779aede8.js} +1 -1
  232. package/dist/ionic/{p-51f08a9f.entry.js → p-7c31e803.entry.js} +1 -1
  233. package/dist/ionic/{p-90860bc4.entry.js → p-7d3b78b1.entry.js} +1 -1
  234. package/dist/ionic/{p-8ddc00f7.js → p-7e18aa63.js} +1 -1
  235. package/dist/ionic/{p-0e29919c.system.entry.js → p-7e2dbaa5.system.entry.js} +1 -1
  236. package/dist/ionic/{p-9f5b40c0.system.entry.js → p-7e6e6fb1.system.entry.js} +1 -1
  237. package/dist/ionic/{p-97eca294.entry.js → p-7eface64.entry.js} +1 -1
  238. package/dist/ionic/{p-a1bfaa5c.system.entry.js → p-8350ad89.system.entry.js} +1 -1
  239. package/dist/ionic/p-839ea604.js +4 -0
  240. package/dist/ionic/{p-84879f61.system.entry.js → p-87994b6c.system.entry.js} +1 -1
  241. package/dist/ionic/{p-e68980ff.system.entry.js → p-87a704aa.system.entry.js} +1 -1
  242. package/dist/ionic/{p-5a0c301f.entry.js → p-88a8a783.entry.js} +1 -1
  243. package/dist/ionic/{p-f7b43141.system.entry.js → p-8af431e6.system.entry.js} +1 -1
  244. package/dist/ionic/{p-de5c8a55.entry.js → p-8e9c61d0.entry.js} +1 -1
  245. package/dist/ionic/{p-5a7d5f0d.entry.js → p-9353bb82.entry.js} +1 -1
  246. package/dist/ionic/{p-9f6397ce.entry.js → p-93c936f1.entry.js} +1 -1
  247. package/dist/ionic/{p-9393a49f.js → p-942a9358.js} +1 -1
  248. package/dist/ionic/{p-3c6f02cf.system.js → p-97ca0cb9.system.js} +1 -1
  249. package/dist/ionic/p-987a8848.js +4 -0
  250. package/dist/ionic/{p-5946d7b8.system.entry.js → p-988c8cc8.system.entry.js} +1 -1
  251. package/dist/ionic/{p-c2289cd1.js → p-a1036ce7.js} +1 -1
  252. package/dist/ionic/{p-50a24d93.system.entry.js → p-a11f7f68.system.entry.js} +1 -1
  253. package/dist/ionic/{p-cd055d60.system.entry.js → p-a2dcf935.system.entry.js} +1 -1
  254. package/dist/ionic/{p-3cdbaa49.entry.js → p-a4dd6789.entry.js} +1 -1
  255. package/dist/ionic/{p-5f456b3c.system.entry.js → p-a6500b62.system.entry.js} +1 -1
  256. package/dist/ionic/{p-d74ca358.entry.js → p-a9e22fd4.entry.js} +1 -1
  257. package/dist/ionic/{p-aaa4ffb3.system.entry.js → p-b07ed639.system.entry.js} +1 -1
  258. package/dist/ionic/{p-bc2c03d7.system.entry.js → p-b0b8aa0e.system.entry.js} +1 -1
  259. package/dist/ionic/{p-fd36799d.system.js → p-b15d9cca.system.js} +1 -1
  260. package/dist/ionic/{p-389ff4d2.system.entry.js → p-b4b3edb9.system.entry.js} +1 -1
  261. package/dist/ionic/{p-37c33319.system.js → p-bd313b73.system.js} +1 -1
  262. package/dist/ionic/{p-d7260b87.entry.js → p-c0f97d6b.entry.js} +1 -1
  263. package/dist/ionic/{p-ea8fbf09.entry.js → p-c6d71a70.entry.js} +1 -1
  264. package/dist/ionic/{p-3a54c070.system.entry.js → p-c8f24496.system.entry.js} +1 -1
  265. package/dist/ionic/{p-b37e4ee5.system.entry.js → p-ca339e31.system.entry.js} +1 -1
  266. package/dist/ionic/{p-20f7a91e.system.entry.js → p-cac274ca.system.entry.js} +1 -1
  267. package/dist/ionic/p-cfb4d7e0.js +4 -0
  268. package/dist/ionic/{p-9c8fb374.system.js → p-d29aecf3.system.js} +1 -1
  269. package/dist/ionic/{p-78edc0cd.system.entry.js → p-d55376f1.system.entry.js} +1 -1
  270. package/dist/ionic/{p-a02b2d75.entry.js → p-d5f78403.entry.js} +1 -1
  271. package/dist/ionic/{p-5b6aa59a.entry.js → p-de08fe7d.entry.js} +1 -1
  272. package/dist/ionic/{p-ce2eabd5.entry.js → p-e25ee695.entry.js} +1 -1
  273. package/dist/ionic/{p-2e344096.system.entry.js → p-e2b646df.system.entry.js} +1 -1
  274. package/dist/ionic/{p-4ae1b532.entry.js → p-e9af70cf.entry.js} +1 -1
  275. package/dist/ionic/{p-d6ca603b.entry.js → p-ea737614.entry.js} +1 -1
  276. package/dist/ionic/{p-30d77a91.system.js → p-ebc1ca90.system.js} +1 -1
  277. package/dist/ionic/{p-25b08bc4.system.js → p-ebc6334b.system.js} +1 -1
  278. package/dist/ionic/{p-fd3f475f.entry.js → p-ef609b5e.entry.js} +1 -1
  279. package/dist/ionic/p-f37c8bdb.entry.js +4 -0
  280. package/dist/ionic/{p-8569d759.system.entry.js → p-f536a27f.system.entry.js} +1 -1
  281. package/dist/ionic/{p-df468a8f.entry.js → p-f7f98c4d.entry.js} +1 -1
  282. package/dist/ionic/{p-1f6cdf2c.system.entry.js → p-fad80acc.system.entry.js} +1 -1
  283. package/dist/ionic/p-fbd01db3.system.js +4 -0
  284. package/dist/ionic/p-fc34f652.system.entry.js +4 -0
  285. package/dist/ionic/{p-e2bb92ed.system.js → p-fe320051.system.js} +1 -1
  286. package/dist/types/utils/helpers.d.ts +1 -1
  287. package/dist/types/utils/overlays.d.ts +5 -0
  288. package/hydrate/index.js +76 -27
  289. package/package.json +3 -3
  290. package/dist/esm-es5/helpers-c0b9ca37.js +0 -4
  291. package/dist/esm-es5/index-d64f34ea.js +0 -4
  292. package/dist/esm-es5/md.transition-28a9a26b.js +0 -4
  293. package/dist/esm-es5/overlays-3311e70e.js +0 -4
  294. package/dist/esm-es5/swipe-back-c06602f2.js +0 -4
  295. package/dist/ionic/p-1172fd73.system.entry.js +0 -4
  296. package/dist/ionic/p-3eb2da31.js +0 -4
  297. package/dist/ionic/p-4efac4fd.system.js +0 -4
  298. package/dist/ionic/p-4f777b5e.js +0 -4
  299. package/dist/ionic/p-8dc4a983.entry.js +0 -4
  300. package/dist/ionic/p-8f1ce253.js +0 -4
  301. package/dist/ionic/p-95c44e02.system.js +0 -4
  302. package/dist/ionic/p-ae40d13d.js +0 -4
  303. package/dist/ionic/p-c5c3710c.js +0 -4
  304. package/dist/ionic/p-c80c7e90.system.js +0 -4
  305. package/dist/ionic/p-cdc277a6.js +0 -4
  306. /package/dist/ionic/{p-b5839dc2.js → p-1b3ffb2f.js} +0 -0
  307. /package/dist/ionic/{p-fd8ced99.system.js → p-5fc8d5ef.system.js} +0 -0
@@ -6,8 +6,8 @@
6
6
  const index = require('./index-c8d52405.js');
7
7
  const hardwareBackButton = require('./hardware-back-button-d23873bb.js');
8
8
  const ionicGlobal = require('./ionic-global-7358c23e.js');
9
- const frameworkDelegate = require('./framework-delegate-a3e6d060.js');
10
- const helpers = require('./helpers-2e1028fa.js');
9
+ const frameworkDelegate = require('./framework-delegate-e0e13baa.js');
10
+ const helpers = require('./helpers-da4c0ed1.js');
11
11
  const index$1 = require('./index-5915f9b3.js');
12
12
 
13
13
  let lastOverlayIndex = 0;
@@ -100,32 +100,48 @@ const createOverlay = (tagName, opts) => {
100
100
  * valid usage for the disabled property on ion-button.
101
101
  */
102
102
  const focusableQueryString = '[tabindex]:not([tabindex^="-"]):not([hidden]):not([disabled]), input:not([type=hidden]):not([tabindex^="-"]):not([hidden]):not([disabled]), textarea:not([tabindex^="-"]):not([hidden]):not([disabled]), button:not([tabindex^="-"]):not([hidden]):not([disabled]), select:not([tabindex^="-"]):not([hidden]):not([disabled]), .ion-focusable:not([tabindex^="-"]):not([hidden]):not([disabled]), .ion-focusable[disabled="false"]:not([tabindex^="-"]):not([hidden])';
103
+ const isOverlayHidden = (overlay) => overlay.classList.contains('overlay-hidden');
104
+ /**
105
+ * Focuses the first descendant in an overlay
106
+ * that can receive focus. If none exists,
107
+ * the entire overlay will be focused.
108
+ */
103
109
  const focusFirstDescendant = (ref, overlay) => {
104
- let firstInput = ref.querySelector(focusableQueryString);
105
- const shadowRoot = firstInput === null || firstInput === void 0 ? void 0 : firstInput.shadowRoot;
106
- if (shadowRoot) {
107
- // If there are no inner focusable elements, just focus the host element.
108
- firstInput = shadowRoot.querySelector(focusableQueryString) || firstInput;
109
- }
110
- if (firstInput) {
111
- helpers.focusElement(firstInput);
112
- }
113
- else {
114
- // Focus overlay instead of letting focus escape
115
- overlay.focus();
116
- }
110
+ const firstInput = ref.querySelector(focusableQueryString);
111
+ focusElementInOverlay(firstInput, overlay);
117
112
  };
118
- const isOverlayHidden = (overlay) => overlay.classList.contains('overlay-hidden');
113
+ /**
114
+ * Focuses the last descendant in an overlay
115
+ * that can receive focus. If none exists,
116
+ * the entire overlay will be focused.
117
+ */
119
118
  const focusLastDescendant = (ref, overlay) => {
120
119
  const inputs = Array.from(ref.querySelectorAll(focusableQueryString));
121
- let lastInput = inputs.length > 0 ? inputs[inputs.length - 1] : null;
122
- const shadowRoot = lastInput === null || lastInput === void 0 ? void 0 : lastInput.shadowRoot;
120
+ const lastInput = inputs.length > 0 ? inputs[inputs.length - 1] : null;
121
+ focusElementInOverlay(lastInput, overlay);
122
+ };
123
+ /**
124
+ * Focuses a particular element in an overlay. If the element
125
+ * doesn't have anything focusable associated with it then
126
+ * the overlay itself will be focused.
127
+ * This should be used instead of the focus() method
128
+ * on most elements because the focusable element
129
+ * may not be the host element.
130
+ *
131
+ * For example, if an ion-button should be focused
132
+ * then we should actually focus the native <button>
133
+ * element inside of ion-button's shadow root, not
134
+ * the host element itself.
135
+ */
136
+ const focusElementInOverlay = (hostToFocus, overlay) => {
137
+ let elementToFocus = hostToFocus;
138
+ const shadowRoot = hostToFocus === null || hostToFocus === void 0 ? void 0 : hostToFocus.shadowRoot;
123
139
  if (shadowRoot) {
124
140
  // If there are no inner focusable elements, just focus the host element.
125
- lastInput = shadowRoot.querySelector(focusableQueryString) || lastInput;
141
+ elementToFocus = shadowRoot.querySelector(focusableQueryString) || hostToFocus;
126
142
  }
127
- if (lastInput) {
128
- lastInput.focus();
143
+ if (elementToFocus) {
144
+ helpers.focusVisibleElement(elementToFocus);
129
145
  }
130
146
  else {
131
147
  // Focus overlay instead of letting focus escape
@@ -207,6 +223,21 @@ const trapKeyboardFocus = (ev, doc) => {
207
223
  */
208
224
  if (overlayWrapper.contains(target) || target === overlayRoot.querySelector('ion-backdrop')) {
209
225
  lastOverlay.lastFocus = target;
226
+ /**
227
+ * Toasts can be presented from an overlay.
228
+ * However, focus should still be returned to
229
+ * the overlay when clicking a toast. Normally,
230
+ * focus would be returned to the last focusable
231
+ * descendant in the overlay which may not always be
232
+ * the button that the toast was presented from. In this case,
233
+ * the focus may be returned to an unexpected element.
234
+ * To account for this, we make sure to return focus to the
235
+ * last focused element in the overlay if focus is
236
+ * moved to the toast.
237
+ */
238
+ }
239
+ else if (target.tagName === 'ION-TOAST') {
240
+ focusElementInOverlay(lastOverlay.lastFocus, lastOverlay);
210
241
  }
211
242
  else {
212
243
  /**
@@ -247,6 +278,21 @@ const trapKeyboardFocus = (ev, doc) => {
247
278
  */
248
279
  if (lastOverlay.contains(target)) {
249
280
  lastOverlay.lastFocus = target;
281
+ /**
282
+ * Toasts can be presented from an overlay.
283
+ * However, focus should still be returned to
284
+ * the overlay when clicking a toast. Normally,
285
+ * focus would be returned to the last focusable
286
+ * descendant in the overlay which may not always be
287
+ * the button that the toast was presented from. In this case,
288
+ * the focus may be returned to an unexpected element.
289
+ * To account for this, we make sure to return focus to the
290
+ * last focused element in the overlay if focus is
291
+ * moved to the toast.
292
+ */
293
+ }
294
+ else if (target.tagName === 'ION-TOAST') {
295
+ focusElementInOverlay(lastOverlay.lastFocus, lastOverlay);
250
296
  }
251
297
  else {
252
298
  /**
@@ -275,6 +321,7 @@ const trapKeyboardFocus = (ev, doc) => {
275
321
  * last focus to equal the active element.
276
322
  */
277
323
  if (lastFocus === doc.activeElement) {
324
+ console.log('LAST FOCUS');
278
325
  focusLastDescendant(lastOverlay, lastOverlay);
279
326
  }
280
327
  lastOverlay.lastFocus = doc.activeElement;
@@ -495,6 +542,10 @@ const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnim
495
542
  }
496
543
  overlay.didDismiss.emit({ data, role });
497
544
  (_b = overlay.didDismissShorthand) === null || _b === void 0 ? void 0 : _b.emit({ data, role });
545
+ // Get a reference to all animations currently assigned to this overlay
546
+ // Then tear them down to return the overlay to its initial visual state
547
+ const animations = activeAnimations.get(overlay) || [];
548
+ animations.forEach((ani) => ani.destroy());
498
549
  activeAnimations.delete(overlay);
499
550
  /**
500
551
  * Make overlay hidden again in case it is being reused.
@@ -715,7 +766,6 @@ exports.BACKDROP = BACKDROP;
715
766
  exports.GESTURE = GESTURE;
716
767
  exports.OVERLAY_GESTURE_PRIORITY = OVERLAY_GESTURE_PRIORITY;
717
768
  exports.actionSheetController = actionSheetController;
718
- exports.activeAnimations = activeAnimations;
719
769
  exports.alertController = alertController;
720
770
  exports.createDelegateController = createDelegateController;
721
771
  exports.createTriggerController = createTriggerController;
@@ -4,8 +4,8 @@
4
4
  'use strict';
5
5
 
6
6
  const index = require('./index-5a471146.js');
7
- const index$1 = require('./index-53d162b2.js');
8
- const helpers = require('./helpers-2e1028fa.js');
7
+ const index$1 = require('./index-bef98850.js');
8
+ const helpers = require('./helpers-da4c0ed1.js');
9
9
  require('./index-5915f9b3.js');
10
10
 
11
11
  const startStatusTap = () => {
@@ -3,7 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- const helpers = require('./helpers-2e1028fa.js');
6
+ const helpers = require('./helpers-da4c0ed1.js');
7
7
  const dir = require('./dir-94c21456.js');
8
8
  const index = require('./index-d1b59ffa.js');
9
9
  require('./gesture-controller-c40c045a.js');
@@ -8,7 +8,7 @@ import { raf, inheritAttributes, hasLazyBuild } from "../../utils/helpers";
8
8
  import { createLockController } from "../../utils/lock-controller";
9
9
  import { printIonWarning } from "../../utils/logging/index";
10
10
  import { Style as StatusBarStyle, StatusBar } from "../../utils/native/status-bar";
11
- import { GESTURE, BACKDROP, activeAnimations, dismiss, eventMethod, prepareOverlay, present, createTriggerController, setOverlayId, } from "../../utils/overlays";
11
+ import { GESTURE, BACKDROP, dismiss, eventMethod, prepareOverlay, present, createTriggerController, setOverlayId, } from "../../utils/overlays";
12
12
  import { getClassMap } from "../../utils/theme";
13
13
  import { deepReady, waitForMount } from "../../utils/transition/index";
14
14
  import { config } from "../../global/config";
@@ -432,7 +432,6 @@ export class Modal {
432
432
  window.removeEventListener(KEYBOARD_DID_OPEN, this.keyboardOpenCallback);
433
433
  this.keyboardOpenCallback = undefined;
434
434
  }
435
- const enteringAnimation = activeAnimations.get(this) || [];
436
435
  const dismissed = await dismiss(this, data, role, 'modalLeave', iosLeaveAnimation, mdLeaveAnimation, {
437
436
  presentingEl: presentingElement,
438
437
  currentBreakpoint: (_a = this.currentBreakpoint) !== null && _a !== void 0 ? _a : this.initialBreakpoint,
@@ -448,7 +447,6 @@ export class Modal {
448
447
  if (this.gesture) {
449
448
  this.gesture.destroy();
450
449
  }
451
- enteringAnimation.forEach((ani) => ani.destroy());
452
450
  }
453
451
  this.currentBreakpoint = undefined;
454
452
  this.animation = undefined;
@@ -528,9 +526,9 @@ export class Modal {
528
526
  const mode = getIonMode(this);
529
527
  const isCardModal = presentingElement !== undefined && mode === 'ios';
530
528
  const isHandleCycle = handleBehavior === 'cycle';
531
- return (h(Host, Object.assign({ key: '8c163f4f59429227cab3a1cafb5612994939a629', "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
529
+ return (h(Host, Object.assign({ key: '9a305d82f123283b6200c42d67393b378bb309a8', "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
532
530
  zIndex: `${20000 + this.overlayIndex}`,
533
- }, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, 'overlay-hidden': true }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle }), h("ion-backdrop", { key: '6908bdf9462d940eff6607b626a499eedc66dc9c', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && h("div", { class: "modal-shadow" }), h("div", Object.assign({ key: 'ac224394e19b9e8c7dd902f2836fa25787663455',
531
+ }, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, 'overlay-hidden': true }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle }), h("ion-backdrop", { key: '85e8dc6f19b30fd95db518445929fb0c1d5cdef0', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && h("div", { class: "modal-shadow" }), h("div", Object.assign({ key: '893a0202d91828e60099311442c2677bee5464e2',
534
532
  /*
535
533
  role and aria-modal must be used on the
536
534
  same element. They must also be set inside the
@@ -539,7 +537,7 @@ export class Modal {
539
537
  */
540
538
  role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (h("button", { class: "modal-handle",
541
539
  // Prevents the handle from receiving keyboard focus when it does not cycle
542
- tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle" })), h("slot", { key: '9c3c5ec797b6415110a3275c6ff33277291a6e21' }))));
540
+ tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle" })), h("slot", { key: '25187bf4c69d9022930227b8b8748a294176be5f' }))));
543
541
  }
544
542
  static get is() { return "ion-modal"; }
545
543
  static get encapsulation() { return "shadow"; }
@@ -0,0 +1,36 @@
1
+ /*!
2
+ * (C) Ionic http://ionicframework.com - MIT License
3
+ */
4
+ import { expect } from "@playwright/test";
5
+ import { configs, test } from "../../../../utils/test/playwright/index";
6
+ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ config, title }) => {
7
+ test.describe(title('modal: animations'), () => {
8
+ test.beforeEach(async ({ page }) => {
9
+ await page.setContent(`
10
+ <ion-modal is-open="true" trigger="open-modal"></ion-modal>
11
+ `, config);
12
+ });
13
+ test('card modal should clean up animations on dismiss', async ({ page }, testInfo) => {
14
+ testInfo.annotations.push({
15
+ type: 'issue',
16
+ description: 'https://github.com/ionic-team/ionic-framework/issues/28352',
17
+ });
18
+ const ionModalDidDismiss = await page.spyOnEvent('ionModalDidDismiss');
19
+ const modal = page.locator('ion-modal');
20
+ const initialAnimations = await modal.evaluate((el) => {
21
+ return el.shadowRoot.getAnimations();
22
+ });
23
+ // While the modal is open, it should have animations
24
+ expect(initialAnimations.length).toBeGreaterThan(0);
25
+ await modal.evaluate((el) => {
26
+ el.dismiss();
27
+ });
28
+ await ionModalDidDismiss.next();
29
+ const currentAnimations = await modal.evaluate((el) => {
30
+ return el.shadowRoot.getAnimations();
31
+ });
32
+ // Once the modal has finished closing, there should be no animations
33
+ expect(currentAnimations.length).toBe(0);
34
+ });
35
+ });
36
+ });
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { Host, h, forceUpdate } from "@stencil/core";
5
5
  import { compareOptions, createLegacyFormController, createNotchController, isOptionSelected } from "../../utils/forms/index";
6
- import { findItemLabel, focusElement, getAriaLabel, renderHiddenInput, inheritAttributes } from "../../utils/helpers";
6
+ import { findItemLabel, focusVisibleElement, getAriaLabel, renderHiddenInput, inheritAttributes } from "../../utils/helpers";
7
7
  import { printIonWarning } from "../../utils/logging/index";
8
8
  import { actionSheetController, alertController, popoverController } from "../../utils/overlays";
9
9
  import { isRTL } from "../../utils/rtl/index";
@@ -158,7 +158,7 @@ export class Select {
158
158
  if (indexOfSelected > -1) {
159
159
  const selectedItem = overlay.querySelector(`.select-interface-option:nth-child(${indexOfSelected + 1})`);
160
160
  if (selectedItem) {
161
- focusElement(selectedItem);
161
+ focusVisibleElement(selectedItem);
162
162
  /**
163
163
  * Browsers such as Firefox do not
164
164
  * correctly delegate focus when manually
@@ -182,7 +182,7 @@ export class Select {
182
182
  */
183
183
  const firstEnabledOption = overlay.querySelector('ion-radio:not(.radio-disabled), ion-checkbox:not(.checkbox-disabled)');
184
184
  if (firstEnabledOption) {
185
- focusElement(firstEnabledOption.closest('ion-item'));
185
+ focusVisibleElement(firstEnabledOption.closest('ion-item'));
186
186
  /**
187
187
  * Focus the option for the same reason as we do above.
188
188
  */
@@ -237,7 +237,7 @@ export const findItemLabel = (componentEl) => {
237
237
  }
238
238
  return null;
239
239
  };
240
- export const focusElement = (el) => {
240
+ export const focusVisibleElement = (el) => {
241
241
  el.focus();
242
242
  /**
243
243
  * When programmatically focusing an element,
@@ -7,7 +7,7 @@ import { config } from "../global/config";
7
7
  import { getIonMode } from "../global/ionic-global";
8
8
  import { CoreDelegate } from "./framework-delegate";
9
9
  import { OVERLAY_BACK_BUTTON_PRIORITY } from "./hardware-back-button";
10
- import { addEventListener, componentOnReady, focusElement, getElementRoot, removeEventListener } from "./helpers";
10
+ import { addEventListener, componentOnReady, focusVisibleElement, getElementRoot, removeEventListener, } from "./helpers";
11
11
  import { printIonWarning } from "./logging";
12
12
  let lastOverlayIndex = 0;
13
13
  let lastId = 0;
@@ -99,32 +99,48 @@ export const createOverlay = (tagName, opts) => {
99
99
  * valid usage for the disabled property on ion-button.
100
100
  */
101
101
  const focusableQueryString = '[tabindex]:not([tabindex^="-"]):not([hidden]):not([disabled]), input:not([type=hidden]):not([tabindex^="-"]):not([hidden]):not([disabled]), textarea:not([tabindex^="-"]):not([hidden]):not([disabled]), button:not([tabindex^="-"]):not([hidden]):not([disabled]), select:not([tabindex^="-"]):not([hidden]):not([disabled]), .ion-focusable:not([tabindex^="-"]):not([hidden]):not([disabled]), .ion-focusable[disabled="false"]:not([tabindex^="-"]):not([hidden])';
102
+ const isOverlayHidden = (overlay) => overlay.classList.contains('overlay-hidden');
103
+ /**
104
+ * Focuses the first descendant in an overlay
105
+ * that can receive focus. If none exists,
106
+ * the entire overlay will be focused.
107
+ */
102
108
  export const focusFirstDescendant = (ref, overlay) => {
103
- let firstInput = ref.querySelector(focusableQueryString);
104
- const shadowRoot = firstInput === null || firstInput === void 0 ? void 0 : firstInput.shadowRoot;
105
- if (shadowRoot) {
106
- // If there are no inner focusable elements, just focus the host element.
107
- firstInput = shadowRoot.querySelector(focusableQueryString) || firstInput;
108
- }
109
- if (firstInput) {
110
- focusElement(firstInput);
111
- }
112
- else {
113
- // Focus overlay instead of letting focus escape
114
- overlay.focus();
115
- }
109
+ const firstInput = ref.querySelector(focusableQueryString);
110
+ focusElementInOverlay(firstInput, overlay);
116
111
  };
117
- const isOverlayHidden = (overlay) => overlay.classList.contains('overlay-hidden');
112
+ /**
113
+ * Focuses the last descendant in an overlay
114
+ * that can receive focus. If none exists,
115
+ * the entire overlay will be focused.
116
+ */
118
117
  const focusLastDescendant = (ref, overlay) => {
119
118
  const inputs = Array.from(ref.querySelectorAll(focusableQueryString));
120
- let lastInput = inputs.length > 0 ? inputs[inputs.length - 1] : null;
121
- const shadowRoot = lastInput === null || lastInput === void 0 ? void 0 : lastInput.shadowRoot;
119
+ const lastInput = inputs.length > 0 ? inputs[inputs.length - 1] : null;
120
+ focusElementInOverlay(lastInput, overlay);
121
+ };
122
+ /**
123
+ * Focuses a particular element in an overlay. If the element
124
+ * doesn't have anything focusable associated with it then
125
+ * the overlay itself will be focused.
126
+ * This should be used instead of the focus() method
127
+ * on most elements because the focusable element
128
+ * may not be the host element.
129
+ *
130
+ * For example, if an ion-button should be focused
131
+ * then we should actually focus the native <button>
132
+ * element inside of ion-button's shadow root, not
133
+ * the host element itself.
134
+ */
135
+ const focusElementInOverlay = (hostToFocus, overlay) => {
136
+ let elementToFocus = hostToFocus;
137
+ const shadowRoot = hostToFocus === null || hostToFocus === void 0 ? void 0 : hostToFocus.shadowRoot;
122
138
  if (shadowRoot) {
123
139
  // If there are no inner focusable elements, just focus the host element.
124
- lastInput = shadowRoot.querySelector(focusableQueryString) || lastInput;
140
+ elementToFocus = shadowRoot.querySelector(focusableQueryString) || hostToFocus;
125
141
  }
126
- if (lastInput) {
127
- lastInput.focus();
142
+ if (elementToFocus) {
143
+ focusVisibleElement(elementToFocus);
128
144
  }
129
145
  else {
130
146
  // Focus overlay instead of letting focus escape
@@ -206,6 +222,21 @@ const trapKeyboardFocus = (ev, doc) => {
206
222
  */
207
223
  if (overlayWrapper.contains(target) || target === overlayRoot.querySelector('ion-backdrop')) {
208
224
  lastOverlay.lastFocus = target;
225
+ /**
226
+ * Toasts can be presented from an overlay.
227
+ * However, focus should still be returned to
228
+ * the overlay when clicking a toast. Normally,
229
+ * focus would be returned to the last focusable
230
+ * descendant in the overlay which may not always be
231
+ * the button that the toast was presented from. In this case,
232
+ * the focus may be returned to an unexpected element.
233
+ * To account for this, we make sure to return focus to the
234
+ * last focused element in the overlay if focus is
235
+ * moved to the toast.
236
+ */
237
+ }
238
+ else if (target.tagName === 'ION-TOAST') {
239
+ focusElementInOverlay(lastOverlay.lastFocus, lastOverlay);
209
240
  }
210
241
  else {
211
242
  /**
@@ -246,6 +277,21 @@ const trapKeyboardFocus = (ev, doc) => {
246
277
  */
247
278
  if (lastOverlay.contains(target)) {
248
279
  lastOverlay.lastFocus = target;
280
+ /**
281
+ * Toasts can be presented from an overlay.
282
+ * However, focus should still be returned to
283
+ * the overlay when clicking a toast. Normally,
284
+ * focus would be returned to the last focusable
285
+ * descendant in the overlay which may not always be
286
+ * the button that the toast was presented from. In this case,
287
+ * the focus may be returned to an unexpected element.
288
+ * To account for this, we make sure to return focus to the
289
+ * last focused element in the overlay if focus is
290
+ * moved to the toast.
291
+ */
292
+ }
293
+ else if (target.tagName === 'ION-TOAST') {
294
+ focusElementInOverlay(lastOverlay.lastFocus, lastOverlay);
249
295
  }
250
296
  else {
251
297
  /**
@@ -274,6 +320,7 @@ const trapKeyboardFocus = (ev, doc) => {
274
320
  * last focus to equal the active element.
275
321
  */
276
322
  if (lastFocus === doc.activeElement) {
323
+ console.log('LAST FOCUS');
277
324
  focusLastDescendant(lastOverlay, lastOverlay);
278
325
  }
279
326
  lastOverlay.lastFocus = doc.activeElement;
@@ -494,6 +541,10 @@ export const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLe
494
541
  }
495
542
  overlay.didDismiss.emit({ data, role });
496
543
  (_b = overlay.didDismissShorthand) === null || _b === void 0 ? void 0 : _b.emit({ data, role });
544
+ // Get a reference to all animations currently assigned to this overlay
545
+ // Then tear them down to return the overlay to its initial visual state
546
+ const animations = activeAnimations.get(overlay) || [];
547
+ animations.forEach((ani) => ani.destroy());
497
548
  activeAnimations.delete(overlay);
498
549
  /**
499
550
  * Make overlay hidden again in case it is being reused.
package/dist/docs.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2024-01-31T15:13:30",
2
+ "timestamp": "2024-01-31T21:31:25",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.12.0",
@@ -2,7 +2,7 @@
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
4
  import { w as win } from './index-a5d50daf.js';
5
- import { r as raf } from './helpers-c0b9ca37.js';
5
+ import { r as raf } from './helpers-be245865.js';
6
6
 
7
7
  let animationPrefix;
8
8
  /**
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
- import { h as findItemLabel } from './helpers-c0b9ca37.js';
4
+ import { h as findItemLabel } from './helpers-be245865.js';
5
5
 
6
6
  /**
7
7
  * Creates a controller that tracks whether a form control is using the legacy or modern syntax. This should be removed when the legacy form control syntax is removed.
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
- import { c as componentOnReady } from './helpers-c0b9ca37.js';
4
+ import { c as componentOnReady } from './helpers-be245865.js';
5
5
 
6
6
  // TODO(FW-2832): types
7
7
  const attachComponent = async (delegate, container, component, cssClasses, componentProps, inline) => {
@@ -237,7 +237,7 @@ const findItemLabel = (componentEl) => {
237
237
  }
238
238
  return null;
239
239
  };
240
- const focusElement = (el) => {
240
+ const focusVisibleElement = (el) => {
241
241
  el.focus();
242
242
  /**
243
243
  * When programmatically focusing an element,
@@ -415,4 +415,4 @@ const shallowEqualStringMap = (map1, map2) => {
415
415
  return true;
416
416
  };
417
417
 
418
- export { addEventListener as a, removeEventListener as b, componentOnReady as c, renderHiddenInput as d, getAriaLabel as e, focusElement as f, getElementRoot as g, findItemLabel as h, inheritAriaAttributes as i, debounceEvent as j, inheritAttributes as k, clamp as l, hasLazyBuild as m, hasShadowDom as n, assert as o, isEndSide as p, debounce as q, raf as r, shallowEqualStringMap as s, transitionEndAsync as t, now as u, pointerCoord as v };
418
+ export { addEventListener as a, removeEventListener as b, componentOnReady as c, renderHiddenInput as d, getAriaLabel as e, focusVisibleElement as f, getElementRoot as g, findItemLabel as h, inheritAriaAttributes as i, debounceEvent as j, inheritAttributes as k, clamp as l, hasLazyBuild as m, hasShadowDom as n, assert as o, isEndSide as p, debounce as q, raf as r, shallowEqualStringMap as s, transitionEndAsync as t, now as u, pointerCoord as v };
@@ -2,7 +2,7 @@
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
4
  import { d as doc } from './index-a5d50daf.js';
5
- import { u as now, v as pointerCoord } from './helpers-c0b9ca37.js';
5
+ import { u as now, v as pointerCoord } from './helpers-be245865.js';
6
6
 
7
7
  const startTapClick = (config) => {
8
8
  if (doc === undefined) {
@@ -2,7 +2,7 @@
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
4
  import { w as writeTask, B as Build } from './index-73881b51.js';
5
- import { r as raf } from './helpers-c0b9ca37.js';
5
+ import { r as raf } from './helpers-be245865.js';
6
6
 
7
7
  const LIFECYCLE_WILL_ENTER = 'ionViewWillEnter';
8
8
  const LIFECYCLE_DID_ENTER = 'ionViewDidEnter';
@@ -10,8 +10,8 @@ const LIFECYCLE_WILL_LEAVE = 'ionViewWillLeave';
10
10
  const LIFECYCLE_DID_LEAVE = 'ionViewDidLeave';
11
11
  const LIFECYCLE_WILL_UNLOAD = 'ionViewWillUnload';
12
12
 
13
- const iosTransitionAnimation = () => import('./ios.transition-7ff7381d.js');
14
- const mdTransitionAnimation = () => import('./md.transition-28a9a26b.js');
13
+ const iosTransitionAnimation = () => import('./ios.transition-46de8e98.js');
14
+ const mdTransitionAnimation = () => import('./md.transition-804d9596.js');
15
15
  // TODO(FW-2832): types
16
16
  const transition = (opts) => {
17
17
  return new Promise((resolve, reject) => {
@@ -4,9 +4,9 @@
4
4
  import { d as doc } from './index-a5d50daf.js';
5
5
  import { MENU_BACK_BUTTON_PRIORITY } from './hardware-back-button-f42b9c80.js';
6
6
  import { p as printIonWarning } from './index-9b0d46f4.js';
7
- import { c as componentOnReady } from './helpers-c0b9ca37.js';
7
+ import { c as componentOnReady } from './helpers-be245865.js';
8
8
  import { b as getIonMode } from './ionic-global-778b7863.js';
9
- import { c as createAnimation } from './animation-60dbdd13.js';
9
+ import { c as createAnimation } from './animation-6a0c5338.js';
10
10
 
11
11
  /**
12
12
  * baseAnimation
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
- import { c as componentOnReady } from './helpers-c0b9ca37.js';
4
+ import { c as componentOnReady } from './helpers-be245865.js';
5
5
  import { b as printRequiredElementError } from './index-9b0d46f4.js';
6
6
 
7
7
  const ION_CONTENT_TAG_NAME = 'ION-CONTENT';
package/dist/esm/index.js CHANGED
@@ -1,24 +1,24 @@
1
1
  /*!
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
- export { c as createAnimation } from './animation-60dbdd13.js';
5
- export { a as LIFECYCLE_DID_ENTER, c as LIFECYCLE_DID_LEAVE, L as LIFECYCLE_WILL_ENTER, b as LIFECYCLE_WILL_LEAVE, d as LIFECYCLE_WILL_UNLOAD, g as getIonPageElement } from './index-4b98143d.js';
6
- export { iosTransitionAnimation } from './ios.transition-7ff7381d.js';
7
- export { mdTransitionAnimation } from './md.transition-28a9a26b.js';
4
+ export { c as createAnimation } from './animation-6a0c5338.js';
5
+ export { a as LIFECYCLE_DID_ENTER, c as LIFECYCLE_DID_LEAVE, L as LIFECYCLE_WILL_ENTER, b as LIFECYCLE_WILL_LEAVE, d as LIFECYCLE_WILL_UNLOAD, g as getIonPageElement } from './index-22b42a9f.js';
6
+ export { iosTransitionAnimation } from './ios.transition-46de8e98.js';
7
+ export { mdTransitionAnimation } from './md.transition-804d9596.js';
8
8
  export { g as getTimeGivenProgression } from './cubic-bezier-fe2083dc.js';
9
9
  export { createGesture } from './index-2cf77112.js';
10
10
  export { g as getPlatforms, i as initialize, a as isPlatform } from './ionic-global-778b7863.js';
11
- export { c as componentOnReady } from './helpers-c0b9ca37.js';
11
+ export { c as componentOnReady } from './helpers-be245865.js';
12
12
  export { I as IonicSafeString, g as getMode, s as setupConfig } from './config-49c88215.js';
13
13
  export { o as openURL } from './theme-01f3f29c.js';
14
- export { m as menuController } from './index-48209844.js';
15
- export { b as actionSheetController, a as alertController, l as loadingController, m as modalController, p as pickerController, c as popoverController, t as toastController } from './overlays-3311e70e.js';
14
+ export { m as menuController } from './index-aa29e8bf.js';
15
+ export { b as actionSheetController, a as alertController, l as loadingController, m as modalController, p as pickerController, c as popoverController, t as toastController } from './overlays-7199c581.js';
16
16
  import './index-a5d50daf.js';
17
17
  import './index-73881b51.js';
18
18
  import './gesture-controller-1bf57181.js';
19
19
  import './hardware-back-button-f42b9c80.js';
20
20
  import './index-9b0d46f4.js';
21
- import './framework-delegate-fed7fe7c.js';
21
+ import './framework-delegate-ed4ba327.js';
22
22
 
23
23
  const IonicSlides = (opts) => {
24
24
  const { swiper, extendParams } = opts;
@@ -2,8 +2,8 @@
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
4
  import { w as win, d as doc } from './index-a5d50daf.js';
5
- import { g as getScrollElement, c as scrollByPoint, f as findClosestIonContent } from './index-eb12ef92.js';
6
- import { a as addEventListener, b as removeEventListener, r as raf, c as componentOnReady } from './helpers-c0b9ca37.js';
5
+ import { g as getScrollElement, c as scrollByPoint, f as findClosestIonContent } from './index-f3946ac1.js';
6
+ import { a as addEventListener, b as removeEventListener, r as raf, c as componentOnReady } from './helpers-be245865.js';
7
7
  import { a as KeyboardResize, K as Keyboard } from './keyboard-73175e24.js';
8
8
  import './index-9b0d46f4.js';
9
9
  import './capacitor-59395cbd.js';
@@ -2,7 +2,7 @@
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
4
  import { w as win } from './index-a5d50daf.js';
5
- import { r as raf } from './helpers-c0b9ca37.js';
5
+ import { r as raf } from './helpers-be245865.js';
6
6
  import { a as printIonError } from './index-9b0d46f4.js';
7
7
 
8
8
  /**
@@ -2,7 +2,7 @@
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
4
  import { r as registerInstance, h, H as Host, f as getElement, d as createEvent } from './index-73881b51.js';
5
- import { r as raf, t as transitionEndAsync, a as addEventListener, b as removeEventListener, g as getElementRoot } from './helpers-c0b9ca37.js';
5
+ import { r as raf, t as transitionEndAsync, a as addEventListener, b as removeEventListener, g as getElementRoot } from './helpers-be245865.js';
6
6
  import { l as chevronDown } from './index-f7dc70ba.js';
7
7
  import { c as config, b as getIonMode } from './ionic-global-778b7863.js';
8
8
  import { p as printIonWarning } from './index-9b0d46f4.js';
@@ -3,19 +3,19 @@
3
3
  */
4
4
  import { r as registerInstance, d as createEvent, e as readTask, h, H as Host, f as getElement } from './index-73881b51.js';
5
5
  import { c as createButtonActiveGesture } from './button-active-4bee452c.js';
6
- import { r as raf } from './helpers-c0b9ca37.js';
6
+ import { r as raf } from './helpers-be245865.js';
7
7
  import { c as createLockController } from './lock-controller-316928be.js';
8
- import { d as createDelegateController, e as createTriggerController, B as BACKDROP, i as isCancel, f as present, g as dismiss, h as eventMethod, s as safeCall, j as prepareOverlay, k as setOverlayId } from './overlays-3311e70e.js';
8
+ import { d as createDelegateController, e as createTriggerController, B as BACKDROP, i as isCancel, f as present, g as dismiss, h as eventMethod, s as safeCall, j as prepareOverlay, k as setOverlayId } from './overlays-7199c581.js';
9
9
  import { g as getClassMap } from './theme-01f3f29c.js';
10
10
  import { b as getIonMode } from './ionic-global-778b7863.js';
11
- import { c as createAnimation } from './animation-60dbdd13.js';
11
+ import { c as createAnimation } from './animation-6a0c5338.js';
12
12
  import './haptic-554688a5.js';
13
13
  import './capacitor-59395cbd.js';
14
14
  import './index-a5d50daf.js';
15
15
  import './index-2cf77112.js';
16
16
  import './gesture-controller-1bf57181.js';
17
17
  import './hardware-back-button-f42b9c80.js';
18
- import './framework-delegate-fed7fe7c.js';
18
+ import './framework-delegate-ed4ba327.js';
19
19
  import './index-9b0d46f4.js';
20
20
 
21
21
  /**