@ionic/core 7.6.8-dev.11706715287.1950fa40 → 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 (348) hide show
  1. package/components/hardware-back-button.js +47 -3
  2. package/components/helpers.js +3 -3
  3. package/components/ion-app.js +12 -2
  4. package/components/ion-menu.js +9 -3
  5. package/components/ion-select.js +3 -3
  6. package/components/ion-split-pane.js +11 -12
  7. package/components/overlays.js +96 -30
  8. package/dist/cjs/{animation-9b401d39.js → animation-c2840aea.js} +1 -1
  9. package/dist/cjs/{form-controller-7d42a722.js → form-controller-c83330c0.js} +1 -1
  10. package/dist/cjs/{framework-delegate-1c29b14a.js → framework-delegate-e0e13baa.js} +1 -1
  11. package/dist/cjs/{hardware-back-button-76833cac.js → hardware-back-button-d23873bb.js} +48 -2
  12. package/dist/cjs/{helpers-76bb7efb.js → helpers-da4c0ed1.js} +3 -3
  13. package/dist/cjs/{index-fc6d268f.js → index-0ccc7b6f.js} +3 -3
  14. package/dist/cjs/{index-b4f986cd.js → index-62290fec.js} +1 -1
  15. package/dist/cjs/{index-8aef188d.js → index-6600c909.js} +3 -3
  16. package/dist/cjs/{index-da15e99c.js → index-bef98850.js} +1 -1
  17. package/dist/cjs/index.cjs.js +9 -9
  18. package/dist/cjs/{input-shims-a23bb0f4.js → input-shims-a9a85bb9.js} +2 -2
  19. package/dist/cjs/{input.utils-3d0166a2.js → input.utils-d7dca90f.js} +1 -1
  20. package/dist/cjs/ion-accordion_2.cjs.entry.js +1 -1
  21. package/dist/cjs/ion-action-sheet.cjs.entry.js +5 -5
  22. package/dist/cjs/ion-alert.cjs.entry.js +5 -5
  23. package/dist/cjs/ion-app_8.cjs.entry.js +31 -22
  24. package/dist/cjs/ion-back-button.cjs.entry.js +1 -1
  25. package/dist/cjs/ion-breadcrumb_2.cjs.entry.js +1 -1
  26. package/dist/cjs/ion-button_2.cjs.entry.js +1 -1
  27. package/dist/cjs/ion-card_5.cjs.entry.js +1 -1
  28. package/dist/cjs/ion-checkbox.cjs.entry.js +2 -2
  29. package/dist/cjs/ion-datetime-button.cjs.entry.js +1 -1
  30. package/dist/cjs/ion-datetime_3.cjs.entry.js +5 -5
  31. package/dist/cjs/ion-fab_3.cjs.entry.js +1 -1
  32. package/dist/cjs/ion-img.cjs.entry.js +1 -1
  33. package/dist/cjs/ion-infinite-scroll_2.cjs.entry.js +2 -2
  34. package/dist/cjs/ion-input.cjs.entry.js +4 -4
  35. package/dist/cjs/ion-item-option_3.cjs.entry.js +2 -2
  36. package/dist/cjs/ion-item_8.cjs.entry.js +1 -1
  37. package/dist/cjs/ion-loading.cjs.entry.js +5 -5
  38. package/dist/cjs/ion-menu_3.cjs.entry.js +13 -8
  39. package/dist/cjs/ion-modal.cjs.entry.js +7 -7
  40. package/dist/cjs/ion-nav_2.cjs.entry.js +4 -4
  41. package/dist/cjs/ion-picker-column-internal.cjs.entry.js +1 -1
  42. package/dist/cjs/ion-picker-internal.cjs.entry.js +1 -1
  43. package/dist/cjs/ion-popover.cjs.entry.js +6 -6
  44. package/dist/cjs/ion-progress-bar.cjs.entry.js +1 -1
  45. package/dist/cjs/ion-radio_2.cjs.entry.js +2 -2
  46. package/dist/cjs/ion-range.cjs.entry.js +3 -3
  47. package/dist/cjs/ion-refresher_2.cjs.entry.js +3 -3
  48. package/dist/cjs/ion-reorder_2.cjs.entry.js +2 -2
  49. package/dist/cjs/ion-route_4.cjs.entry.js +1 -1
  50. package/dist/cjs/ion-searchbar.cjs.entry.js +1 -1
  51. package/dist/cjs/ion-segment_2.cjs.entry.js +1 -1
  52. package/dist/cjs/ion-select_3.cjs.entry.js +8 -8
  53. package/dist/cjs/ion-split-pane.cjs.entry.js +11 -12
  54. package/dist/cjs/ion-tab-bar_2.cjs.entry.js +1 -1
  55. package/dist/cjs/ion-tab_2.cjs.entry.js +2 -2
  56. package/dist/cjs/ion-textarea.cjs.entry.js +4 -4
  57. package/dist/cjs/ion-toast.cjs.entry.js +5 -5
  58. package/dist/cjs/ion-toggle.cjs.entry.js +2 -2
  59. package/dist/cjs/ionic.cjs.js +1 -1
  60. package/dist/cjs/{ios.transition-2d1cf0c0.js → ios.transition-810ef802.js} +3 -3
  61. package/dist/cjs/loader.cjs.js +1 -1
  62. package/dist/cjs/{md.transition-bb342d2a.js → md.transition-15315952.js} +3 -3
  63. package/dist/cjs/{notch-controller-9735e7ac.js → notch-controller-bfbcbb7a.js} +1 -1
  64. package/dist/cjs/{overlays-62679ec5.js → overlays-37b51f7b.js} +97 -31
  65. package/dist/cjs/{status-tap-5fa2bab5.js → status-tap-d3dcdb3b.js} +2 -2
  66. package/dist/cjs/{swipe-back-2a858bbd.js → swipe-back-cf8aa1ec.js} +1 -1
  67. package/dist/collection/components/app/app.js +12 -2
  68. package/dist/collection/components/menu/menu.js +8 -8
  69. package/dist/collection/components/select/select.js +3 -3
  70. package/dist/collection/components/split-pane/split-pane.js +11 -12
  71. package/dist/collection/utils/hardware-back-button.js +45 -2
  72. package/dist/collection/utils/helpers.js +2 -2
  73. package/dist/collection/utils/overlays.js +96 -29
  74. package/dist/collection/utils/test/hardware-back-button.spec.js +38 -0
  75. package/dist/docs.json +1 -6
  76. package/dist/esm/{animation-dde8cc0d.js → animation-6a0c5338.js} +1 -1
  77. package/dist/esm/{form-controller-548aa79c.js → form-controller-21dd62b1.js} +1 -1
  78. package/dist/esm/{framework-delegate-bc1fd82a.js → framework-delegate-ed4ba327.js} +1 -1
  79. package/dist/esm/{hardware-back-button-b2bc76db.js → hardware-back-button-f42b9c80.js} +48 -3
  80. package/dist/esm/{helpers-ae653409.js → helpers-be245865.js} +3 -3
  81. package/dist/esm/{index-82eeb47f.js → index-020f5464.js} +1 -1
  82. package/dist/esm/{index-8fac11d0.js → index-22b42a9f.js} +3 -3
  83. package/dist/esm/{index-6546f0dd.js → index-aa29e8bf.js} +3 -3
  84. package/dist/esm/{index-b9e742e5.js → index-f3946ac1.js} +1 -1
  85. package/dist/esm/index.js +9 -9
  86. package/dist/esm/{input-shims-6539ce13.js → input-shims-5329bbe8.js} +2 -2
  87. package/dist/esm/{input.utils-a5a2d164.js → input.utils-a445f677.js} +1 -1
  88. package/dist/esm/ion-accordion_2.entry.js +1 -1
  89. package/dist/esm/ion-action-sheet.entry.js +5 -5
  90. package/dist/esm/ion-alert.entry.js +5 -5
  91. package/dist/esm/ion-app_8.entry.js +21 -12
  92. package/dist/esm/ion-back-button.entry.js +1 -1
  93. package/dist/esm/ion-breadcrumb_2.entry.js +1 -1
  94. package/dist/esm/ion-button_2.entry.js +1 -1
  95. package/dist/esm/ion-card_5.entry.js +1 -1
  96. package/dist/esm/ion-checkbox.entry.js +2 -2
  97. package/dist/esm/ion-datetime-button.entry.js +1 -1
  98. package/dist/esm/ion-datetime_3.entry.js +5 -5
  99. package/dist/esm/ion-fab_3.entry.js +1 -1
  100. package/dist/esm/ion-img.entry.js +1 -1
  101. package/dist/esm/ion-infinite-scroll_2.entry.js +2 -2
  102. package/dist/esm/ion-input.entry.js +4 -4
  103. package/dist/esm/ion-item-option_3.entry.js +2 -2
  104. package/dist/esm/ion-item_8.entry.js +1 -1
  105. package/dist/esm/ion-loading.entry.js +5 -5
  106. package/dist/esm/ion-menu_3.entry.js +13 -8
  107. package/dist/esm/ion-modal.entry.js +7 -7
  108. package/dist/esm/ion-nav_2.entry.js +4 -4
  109. package/dist/esm/ion-picker-column-internal.entry.js +1 -1
  110. package/dist/esm/ion-picker-internal.entry.js +1 -1
  111. package/dist/esm/ion-popover.entry.js +6 -6
  112. package/dist/esm/ion-progress-bar.entry.js +1 -1
  113. package/dist/esm/ion-radio_2.entry.js +2 -2
  114. package/dist/esm/ion-range.entry.js +3 -3
  115. package/dist/esm/ion-refresher_2.entry.js +3 -3
  116. package/dist/esm/ion-reorder_2.entry.js +2 -2
  117. package/dist/esm/ion-route_4.entry.js +1 -1
  118. package/dist/esm/ion-searchbar.entry.js +1 -1
  119. package/dist/esm/ion-segment_2.entry.js +1 -1
  120. package/dist/esm/ion-select_3.entry.js +8 -8
  121. package/dist/esm/ion-split-pane.entry.js +11 -12
  122. package/dist/esm/ion-tab-bar_2.entry.js +1 -1
  123. package/dist/esm/ion-tab_2.entry.js +2 -2
  124. package/dist/esm/ion-textarea.entry.js +4 -4
  125. package/dist/esm/ion-toast.entry.js +5 -5
  126. package/dist/esm/ion-toggle.entry.js +2 -2
  127. package/dist/esm/ionic.js +1 -1
  128. package/dist/esm/{ios.transition-968faaad.js → ios.transition-46de8e98.js} +3 -3
  129. package/dist/esm/loader.js +1 -1
  130. package/dist/esm/{md.transition-498898ac.js → md.transition-804d9596.js} +3 -3
  131. package/dist/esm/{notch-controller-fea7f9c5.js → notch-controller-6bd3e0f9.js} +1 -1
  132. package/dist/esm/{overlays-4bb86b9c.js → overlays-7199c581.js} +97 -31
  133. package/dist/esm/{status-tap-06b37f21.js → status-tap-d8a80d95.js} +2 -2
  134. package/dist/esm/{swipe-back-a6f386fc.js → swipe-back-37a22d34.js} +1 -1
  135. package/dist/esm-es5/{animation-dde8cc0d.js → animation-6a0c5338.js} +1 -1
  136. package/dist/esm-es5/{form-controller-548aa79c.js → form-controller-21dd62b1.js} +1 -1
  137. package/dist/esm-es5/{framework-delegate-bc1fd82a.js → framework-delegate-ed4ba327.js} +1 -1
  138. package/dist/esm-es5/hardware-back-button-f42b9c80.js +4 -0
  139. package/dist/esm-es5/helpers-be245865.js +4 -0
  140. package/dist/esm-es5/{index-82eeb47f.js → index-020f5464.js} +1 -1
  141. package/dist/esm-es5/{index-8fac11d0.js → index-22b42a9f.js} +1 -1
  142. package/dist/esm-es5/{index-6546f0dd.js → index-aa29e8bf.js} +1 -1
  143. package/dist/esm-es5/{index-b9e742e5.js → index-f3946ac1.js} +1 -1
  144. package/dist/esm-es5/index.js +1 -1
  145. package/dist/esm-es5/{input-shims-6539ce13.js → input-shims-5329bbe8.js} +1 -1
  146. package/dist/esm-es5/{input.utils-a5a2d164.js → input.utils-a445f677.js} +1 -1
  147. package/dist/esm-es5/ion-accordion_2.entry.js +1 -1
  148. package/dist/esm-es5/ion-action-sheet.entry.js +1 -1
  149. package/dist/esm-es5/ion-alert.entry.js +1 -1
  150. package/dist/esm-es5/ion-app_8.entry.js +1 -1
  151. package/dist/esm-es5/ion-back-button.entry.js +1 -1
  152. package/dist/esm-es5/ion-breadcrumb_2.entry.js +1 -1
  153. package/dist/esm-es5/ion-button_2.entry.js +1 -1
  154. package/dist/esm-es5/ion-card_5.entry.js +1 -1
  155. package/dist/esm-es5/ion-checkbox.entry.js +1 -1
  156. package/dist/esm-es5/ion-datetime-button.entry.js +1 -1
  157. package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
  158. package/dist/esm-es5/ion-fab_3.entry.js +1 -1
  159. package/dist/esm-es5/ion-img.entry.js +1 -1
  160. package/dist/esm-es5/ion-infinite-scroll_2.entry.js +1 -1
  161. package/dist/esm-es5/ion-input.entry.js +1 -1
  162. package/dist/esm-es5/ion-item-option_3.entry.js +1 -1
  163. package/dist/esm-es5/ion-item_8.entry.js +1 -1
  164. package/dist/esm-es5/ion-loading.entry.js +1 -1
  165. package/dist/esm-es5/ion-menu_3.entry.js +1 -1
  166. package/dist/esm-es5/ion-modal.entry.js +1 -1
  167. package/dist/esm-es5/ion-nav_2.entry.js +1 -1
  168. package/dist/esm-es5/ion-picker-column-internal.entry.js +1 -1
  169. package/dist/esm-es5/ion-picker-internal.entry.js +1 -1
  170. package/dist/esm-es5/ion-popover.entry.js +1 -1
  171. package/dist/esm-es5/ion-progress-bar.entry.js +1 -1
  172. package/dist/esm-es5/ion-radio_2.entry.js +1 -1
  173. package/dist/esm-es5/ion-range.entry.js +1 -1
  174. package/dist/esm-es5/ion-refresher_2.entry.js +1 -1
  175. package/dist/esm-es5/ion-reorder_2.entry.js +1 -1
  176. package/dist/esm-es5/ion-route_4.entry.js +1 -1
  177. package/dist/esm-es5/ion-searchbar.entry.js +1 -1
  178. package/dist/esm-es5/ion-segment_2.entry.js +1 -1
  179. package/dist/esm-es5/ion-select_3.entry.js +1 -1
  180. package/dist/esm-es5/ion-split-pane.entry.js +1 -1
  181. package/dist/esm-es5/ion-tab-bar_2.entry.js +1 -1
  182. package/dist/esm-es5/ion-tab_2.entry.js +1 -1
  183. package/dist/esm-es5/ion-textarea.entry.js +1 -1
  184. package/dist/esm-es5/ion-toast.entry.js +1 -1
  185. package/dist/esm-es5/ion-toggle.entry.js +1 -1
  186. package/dist/esm-es5/ionic.js +1 -1
  187. package/dist/esm-es5/{ios.transition-968faaad.js → ios.transition-46de8e98.js} +1 -1
  188. package/dist/esm-es5/loader.js +1 -1
  189. package/dist/esm-es5/md.transition-804d9596.js +4 -0
  190. package/dist/esm-es5/{notch-controller-fea7f9c5.js → notch-controller-6bd3e0f9.js} +1 -1
  191. package/dist/esm-es5/overlays-7199c581.js +4 -0
  192. package/dist/esm-es5/{status-tap-06b37f21.js → status-tap-d8a80d95.js} +1 -1
  193. package/dist/esm-es5/swipe-back-37a22d34.js +4 -0
  194. package/dist/ionic/index.esm.js +1 -1
  195. package/dist/ionic/ionic.esm.js +1 -1
  196. package/dist/ionic/p-001010b6.system.js +4 -0
  197. package/dist/ionic/{p-6aacda17.system.entry.js → p-00b14d2c.system.entry.js} +1 -1
  198. package/dist/ionic/{p-aad00593.entry.js → p-05167dc2.entry.js} +1 -1
  199. package/dist/ionic/{p-ee20243d.system.entry.js → p-089b2b36.system.entry.js} +1 -1
  200. package/dist/ionic/p-0b955124.system.js +1 -1
  201. package/dist/ionic/{p-47bb4958.js → p-0c625e5f.js} +1 -1
  202. package/dist/ionic/{p-7bb1d7dd.entry.js → p-0f6a29e7.entry.js} +1 -1
  203. package/dist/ionic/p-1061d7cb.js +4 -0
  204. package/dist/ionic/{p-b5914ab2.entry.js → p-12627bff.entry.js} +1 -1
  205. package/dist/ionic/{p-66d633fb.js → p-12a8643e.js} +1 -1
  206. package/dist/ionic/{p-f318e213.system.entry.js → p-12cf5909.system.entry.js} +1 -1
  207. package/dist/ionic/{p-b4db67d7.entry.js → p-186959bb.entry.js} +1 -1
  208. package/dist/ionic/{p-5d26143c.entry.js → p-1a8bd472.entry.js} +1 -1
  209. package/dist/ionic/p-1b3ffb2f.js +4 -0
  210. package/dist/ionic/p-1bc9b5f5.system.js +4 -0
  211. package/dist/ionic/{p-9e09d6d3.entry.js → p-1e3e8be1.entry.js} +1 -1
  212. package/dist/ionic/{p-2f9fe497.system.entry.js → p-1f87e5b2.system.entry.js} +1 -1
  213. package/dist/ionic/{p-c1d4b820.entry.js → p-20253122.entry.js} +1 -1
  214. package/dist/ionic/{p-46b0ffa3.system.entry.js → p-261eb8dc.system.entry.js} +1 -1
  215. package/dist/ionic/{p-0274f779.system.entry.js → p-26bfb7aa.system.entry.js} +1 -1
  216. package/dist/ionic/{p-1401bd2e.system.entry.js → p-2b99a589.system.entry.js} +1 -1
  217. package/dist/ionic/{p-3a75d7fd.js → p-2c118b1e.js} +1 -1
  218. package/dist/ionic/p-2c726979.entry.js +4 -0
  219. package/dist/ionic/{p-6c938b0d.entry.js → p-2f682b1d.entry.js} +1 -1
  220. package/dist/ionic/{p-42dd5fb5.system.entry.js → p-2fd6badb.system.entry.js} +1 -1
  221. package/dist/ionic/{p-af9ab3f4.entry.js → p-312e6137.entry.js} +1 -1
  222. package/dist/ionic/{p-a3928153.system.entry.js → p-331b4e02.system.entry.js} +1 -1
  223. package/dist/ionic/{p-408fc801.system.js → p-3362b4a9.system.js} +1 -1
  224. package/dist/ionic/{p-432353dc.entry.js → p-3b1c3be8.entry.js} +1 -1
  225. package/dist/ionic/p-3fe26591.entry.js +4 -0
  226. package/dist/ionic/{p-f06a7c31.system.js → p-400be8d3.system.js} +1 -1
  227. package/dist/ionic/{p-b853da37.entry.js → p-41cbadb1.entry.js} +1 -1
  228. package/dist/ionic/{p-013013a3.js → p-46bcc2f5.js} +1 -1
  229. package/dist/ionic/p-48de5c0d.js +4 -0
  230. package/dist/ionic/p-4b2d5b9c.js +4 -0
  231. package/dist/ionic/p-4c812a54.js +4 -0
  232. package/dist/ionic/{p-4eecabe1.entry.js → p-4f06e44f.entry.js} +1 -1
  233. package/dist/ionic/{p-8642d042.system.entry.js → p-523ef897.system.entry.js} +1 -1
  234. package/dist/ionic/{p-376a6063.js → p-56ee6d9a.js} +1 -1
  235. package/dist/ionic/{p-6ecc011b.system.js → p-5c9652a6.system.js} +1 -1
  236. package/dist/ionic/{p-7e732640.entry.js → p-5ca6b52b.entry.js} +1 -1
  237. package/dist/ionic/p-5fc8d5ef.system.js +4 -0
  238. package/dist/ionic/p-62b7320a.system.js +4 -0
  239. package/dist/ionic/{p-2f7c7dc9.entry.js → p-639cc7d8.entry.js} +1 -1
  240. package/dist/ionic/p-6444cade.system.js +4 -0
  241. package/dist/ionic/p-6482ab9e.entry.js +4 -0
  242. package/dist/ionic/{p-41dc24d3.system.entry.js → p-6495a18f.system.entry.js} +1 -1
  243. package/dist/ionic/{p-70684fef.system.entry.js → p-64ab9cd1.system.entry.js} +1 -1
  244. package/dist/ionic/{p-0c813cbf.system.entry.js → p-67f8a403.system.entry.js} +2 -2
  245. package/dist/ionic/p-6afef6c1.system.js +4 -0
  246. package/dist/ionic/p-6c6144c7.system.entry.js +4 -0
  247. package/dist/ionic/{p-03f18e57.system.entry.js → p-6d62875f.system.entry.js} +1 -1
  248. package/dist/ionic/{p-7288124a.entry.js → p-740f9972.entry.js} +1 -1
  249. package/dist/ionic/{p-42f11f58.system.entry.js → p-741f045a.system.entry.js} +1 -1
  250. package/dist/ionic/p-74fa0a29.system.js +4 -0
  251. package/dist/ionic/{p-805a910b.entry.js → p-7582a199.entry.js} +1 -1
  252. package/dist/ionic/{p-ee463529.system.entry.js → p-75b2a402.system.entry.js} +1 -1
  253. package/dist/ionic/{p-4180a747.js → p-779aede8.js} +1 -1
  254. package/dist/ionic/{p-81b652ad.entry.js → p-7c31e803.entry.js} +1 -1
  255. package/dist/ionic/{p-c44eadec.entry.js → p-7d3b78b1.entry.js} +1 -1
  256. package/dist/ionic/{p-76d39342.js → p-7e18aa63.js} +1 -1
  257. package/dist/ionic/{p-42b4b9a2.system.entry.js → p-7e2dbaa5.system.entry.js} +1 -1
  258. package/dist/ionic/{p-ba0dc6b0.system.entry.js → p-7e6e6fb1.system.entry.js} +1 -1
  259. package/dist/ionic/{p-0f96cac5.entry.js → p-7eface64.entry.js} +1 -1
  260. package/dist/ionic/{p-18d1b47e.system.entry.js → p-8350ad89.system.entry.js} +1 -1
  261. package/dist/ionic/p-839ea604.js +4 -0
  262. package/dist/ionic/{p-4d82a816.system.entry.js → p-87994b6c.system.entry.js} +1 -1
  263. package/dist/ionic/{p-364a12ca.system.entry.js → p-87a704aa.system.entry.js} +1 -1
  264. package/dist/ionic/{p-0d3e389b.entry.js → p-88a8a783.entry.js} +1 -1
  265. package/dist/ionic/{p-a072a420.system.entry.js → p-8af431e6.system.entry.js} +1 -1
  266. package/dist/ionic/{p-3b2ecb7e.entry.js → p-8e9c61d0.entry.js} +1 -1
  267. package/dist/ionic/{p-dbb9820e.entry.js → p-9353bb82.entry.js} +1 -1
  268. package/dist/ionic/{p-0d197ad6.entry.js → p-93c936f1.entry.js} +1 -1
  269. package/dist/ionic/{p-29d03b3a.js → p-942a9358.js} +1 -1
  270. package/dist/ionic/{p-725b4e67.system.js → p-97ca0cb9.system.js} +1 -1
  271. package/dist/ionic/p-987a8848.js +4 -0
  272. package/dist/ionic/{p-2b0a2dac.system.entry.js → p-988c8cc8.system.entry.js} +1 -1
  273. package/dist/ionic/{p-36d187af.js → p-a1036ce7.js} +1 -1
  274. package/dist/ionic/{p-d5824344.system.entry.js → p-a11f7f68.system.entry.js} +1 -1
  275. package/dist/ionic/{p-68a1c901.system.entry.js → p-a2dcf935.system.entry.js} +1 -1
  276. package/dist/ionic/{p-b60b708c.entry.js → p-a4dd6789.entry.js} +1 -1
  277. package/dist/ionic/{p-bf7f57a7.system.entry.js → p-a6500b62.system.entry.js} +1 -1
  278. package/dist/ionic/p-a9e22fd4.entry.js +4 -0
  279. package/dist/ionic/{p-7b8a53a4.system.entry.js → p-b07ed639.system.entry.js} +1 -1
  280. package/dist/ionic/{p-f57f1a9c.system.entry.js → p-b0b8aa0e.system.entry.js} +1 -1
  281. package/dist/ionic/p-b15d9cca.system.js +4 -0
  282. package/dist/ionic/{p-c191ba05.system.entry.js → p-b4b3edb9.system.entry.js} +1 -1
  283. package/dist/ionic/{p-cabad15b.system.js → p-bd313b73.system.js} +1 -1
  284. package/dist/ionic/{p-f20da312.entry.js → p-c0f97d6b.entry.js} +1 -1
  285. package/dist/ionic/{p-82e8d988.entry.js → p-c6d71a70.entry.js} +1 -1
  286. package/dist/ionic/{p-5d843dac.system.entry.js → p-c8f24496.system.entry.js} +1 -1
  287. package/dist/ionic/p-ca339e31.system.entry.js +4 -0
  288. package/dist/ionic/{p-99fe3df1.system.entry.js → p-cac274ca.system.entry.js} +1 -1
  289. package/dist/ionic/p-cfb4d7e0.js +4 -0
  290. package/dist/ionic/{p-195c7203.system.js → p-d29aecf3.system.js} +1 -1
  291. package/dist/ionic/{p-64520a48.system.entry.js → p-d55376f1.system.entry.js} +1 -1
  292. package/dist/ionic/{p-4a1eb087.entry.js → p-d5f78403.entry.js} +1 -1
  293. package/dist/ionic/p-de08fe7d.entry.js +4 -0
  294. package/dist/ionic/{p-a6f57a98.entry.js → p-e25ee695.entry.js} +1 -1
  295. package/dist/ionic/{p-ac19cc2f.system.entry.js → p-e2b646df.system.entry.js} +1 -1
  296. package/dist/ionic/{p-b6e3c96d.system.entry.js → p-e6aaff14.system.entry.js} +1 -1
  297. package/dist/ionic/{p-ca975c93.entry.js → p-e9af70cf.entry.js} +1 -1
  298. package/dist/ionic/{p-a5954d3d.entry.js → p-ea737614.entry.js} +1 -1
  299. package/dist/ionic/p-ebc1ca90.system.js +4 -0
  300. package/dist/ionic/{p-487be9e8.system.js → p-ebc6334b.system.js} +1 -1
  301. package/dist/ionic/{p-2a098168.entry.js → p-ef609b5e.entry.js} +1 -1
  302. package/dist/ionic/{p-fac5d418.entry.js → p-f37c8bdb.entry.js} +1 -1
  303. package/dist/ionic/p-f46775e4.entry.js +4 -0
  304. package/dist/ionic/{p-57cce147.system.entry.js → p-f536a27f.system.entry.js} +1 -1
  305. package/dist/ionic/p-f7f98c4d.entry.js +4 -0
  306. package/dist/ionic/{p-3e273305.system.entry.js → p-fad80acc.system.entry.js} +1 -1
  307. package/dist/ionic/p-fbd01db3.system.js +4 -0
  308. package/dist/ionic/{p-765b4f12.system.entry.js → p-fc34f652.system.entry.js} +1 -1
  309. package/dist/ionic/{p-38f2c6bb.system.js → p-fe320051.system.js} +1 -1
  310. package/dist/types/utils/browser/index.d.ts +22 -1
  311. package/dist/types/utils/config.d.ts +7 -0
  312. package/dist/types/utils/hardware-back-button.d.ts +13 -0
  313. package/dist/types/utils/helpers.d.ts +1 -1
  314. package/dist/types/utils/overlays.d.ts +5 -0
  315. package/hydrate/index.js +125 -51
  316. package/package.json +2 -2
  317. package/dist/esm-es5/hardware-back-button-b2bc76db.js +0 -4
  318. package/dist/esm-es5/helpers-ae653409.js +0 -4
  319. package/dist/esm-es5/md.transition-498898ac.js +0 -4
  320. package/dist/esm-es5/overlays-4bb86b9c.js +0 -4
  321. package/dist/esm-es5/swipe-back-a6f386fc.js +0 -4
  322. package/dist/ionic/p-1902859c.system.js +0 -4
  323. package/dist/ionic/p-1b3fb9c6.system.entry.js +0 -4
  324. package/dist/ionic/p-23a9d086.js +0 -4
  325. package/dist/ionic/p-2afd906c.system.entry.js +0 -4
  326. package/dist/ionic/p-2b9debd4.entry.js +0 -4
  327. package/dist/ionic/p-32ad210f.system.js +0 -4
  328. package/dist/ionic/p-35ce400e.system.js +0 -4
  329. package/dist/ionic/p-38c337e7.system.js +0 -4
  330. package/dist/ionic/p-3d9154f0.entry.js +0 -4
  331. package/dist/ionic/p-40f68333.system.js +0 -4
  332. package/dist/ionic/p-4b3623da.js +0 -4
  333. package/dist/ionic/p-562bc465.js +0 -4
  334. package/dist/ionic/p-5ecb46d2.entry.js +0 -4
  335. package/dist/ionic/p-6a6477b2.js +0 -4
  336. package/dist/ionic/p-7045f570.entry.js +0 -4
  337. package/dist/ionic/p-70e988e8.js +0 -4
  338. package/dist/ionic/p-74d32574.entry.js +0 -4
  339. package/dist/ionic/p-7798c78a.system.js +0 -4
  340. package/dist/ionic/p-790220fd.system.js +0 -4
  341. package/dist/ionic/p-888db766.system.js +0 -4
  342. package/dist/ionic/p-88d5fbd3.js +0 -4
  343. package/dist/ionic/p-8bd50516.js +0 -4
  344. package/dist/ionic/p-a9cff22f.entry.js +0 -4
  345. package/dist/ionic/p-b3bf4958.js +0 -4
  346. package/dist/ionic/p-baf4a4a2.entry.js +0 -4
  347. package/dist/ionic/p-d2827762.system.js +0 -4
  348. package/dist/ionic/p-de6f8b28.system.js +0 -4
@@ -1,6 +1,22 @@
1
1
  /*!
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
+ import { w as win } from './index5.js';
5
+ import { c as config } from './ionic-global.js';
6
+
7
+ /**
8
+ * CloseWatcher is a newer API that lets
9
+ * use detect the hardware back button event
10
+ * in a web browser: https://caniuse.com/?search=closewatcher
11
+ * However, not every browser supports it yet.
12
+ *
13
+ * This needs to be a function so that we can
14
+ * check the config once it has been set.
15
+ * Otherwise, this code would be evaluated the
16
+ * moment this file is evaluated which could be
17
+ * before the config is set.
18
+ */
19
+ const shoudUseCloseWatcher = () => config.get('experimentalCloseWatcher', false) && win !== undefined && 'CloseWatcher' in win;
4
20
  /**
5
21
  * When hardwareBackButton: false in config,
6
22
  * we need to make sure we also block the default
@@ -17,7 +33,7 @@ const blockHardwareBackButton = () => {
17
33
  const startHardwareBackButton = () => {
18
34
  const doc = document;
19
35
  let busy = false;
20
- doc.addEventListener('backbutton', () => {
36
+ const backButtonCallback = () => {
21
37
  if (busy) {
22
38
  return;
23
39
  }
@@ -63,9 +79,37 @@ const startHardwareBackButton = () => {
63
79
  }
64
80
  };
65
81
  processHandlers();
66
- });
82
+ };
83
+ /**
84
+ * If the CloseWatcher is defined then
85
+ * we don't want to also listen for the native
86
+ * backbutton event otherwise we may get duplicate
87
+ * events firing.
88
+ */
89
+ if (shoudUseCloseWatcher()) {
90
+ let watcher;
91
+ const configureWatcher = () => {
92
+ watcher === null || watcher === void 0 ? void 0 : watcher.destroy();
93
+ watcher = new win.CloseWatcher();
94
+ /**
95
+ * Once a close request happens
96
+ * the watcher gets destroyed.
97
+ * As a result, we need to re-configure
98
+ * the watcher so we can respond to other
99
+ * close requests.
100
+ */
101
+ watcher.onclose = () => {
102
+ backButtonCallback();
103
+ configureWatcher();
104
+ };
105
+ };
106
+ configureWatcher();
107
+ }
108
+ else {
109
+ doc.addEventListener('backbutton', backButtonCallback);
110
+ }
67
111
  };
68
112
  const OVERLAY_BACK_BUTTON_PRIORITY = 100;
69
113
  const MENU_BACK_BUTTON_PRIORITY = 99; // 1 less than overlay priority since menu is displayed behind overlays
70
114
 
71
- export { MENU_BACK_BUTTON_PRIORITY, OVERLAY_BACK_BUTTON_PRIORITY, blockHardwareBackButton, startHardwareBackButton };
115
+ export { MENU_BACK_BUTTON_PRIORITY, OVERLAY_BACK_BUTTON_PRIORITY, blockHardwareBackButton, shoudUseCloseWatcher, startHardwareBackButton };
@@ -34,7 +34,7 @@ const transitionEnd = (el, expectedDuration = 0, callback) => {
34
34
  el.addEventListener('transitionend', onTransitionEnd, opts);
35
35
  animationTimeout = setTimeout(onTransitionEnd, expectedDuration + ANIMATION_FALLBACK_TIMEOUT);
36
36
  unRegTrans = () => {
37
- if (animationTimeout) {
37
+ if (animationTimeout !== undefined) {
38
38
  clearTimeout(animationTimeout);
39
39
  animationTimeout = undefined;
40
40
  }
@@ -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, inheritAttributes as d, renderHiddenInput as e, focusElement as f, getElementRoot as g, hasShadowDom as h, inheritAriaAttributes as i, getAriaLabel as j, findItemLabel as k, hasLazyBuild as l, clamp as m, debounceEvent as n, isEndSide as o, assert 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, inheritAttributes as d, renderHiddenInput as e, focusVisibleElement as f, getElementRoot as g, hasShadowDom as h, inheritAriaAttributes as i, getAriaLabel as j, findItemLabel as k, hasLazyBuild as l, clamp as m, debounceEvent as n, isEndSide as o, assert as p, debounce as q, raf as r, shallowEqualStringMap as s, transitionEndAsync as t, now as u, pointerCoord as v };
@@ -2,6 +2,8 @@
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
4
  import { proxyCustomElement, HTMLElement, Build, h, Host } from '@stencil/core/internal/client';
5
+ import { shoudUseCloseWatcher } from './hardware-back-button.js';
6
+ import { p as printIonWarning } from './index6.js';
5
7
  import { b as getIonMode, c as config, a as isPlatform } from './ionic-global.js';
6
8
 
7
9
  const appCss = "html.plt-mobile ion-app{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}html.plt-mobile ion-app [contenteditable]{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}ion-app.force-statusbar-padding{--ion-safe-area-top:20px}";
@@ -31,10 +33,18 @@ const App = /*@__PURE__*/ proxyCustomElement(class App extends HTMLElement {
31
33
  import('./input-shims.js').then((module) => module.startInputShims(config, platform));
32
34
  }
33
35
  const hardwareBackButtonModule = await import('./hardware-back-button.js');
34
- if (config.getBoolean('hardwareBackButton', isHybrid)) {
36
+ const supportsHardwareBackButtonEvents = isHybrid || shoudUseCloseWatcher();
37
+ if (config.getBoolean('hardwareBackButton', supportsHardwareBackButtonEvents)) {
35
38
  hardwareBackButtonModule.startHardwareBackButton();
36
39
  }
37
40
  else {
41
+ /**
42
+ * If an app sets hardwareBackButton: false and experimentalCloseWatcher: true
43
+ * then the close watcher will not be used.
44
+ */
45
+ if (shoudUseCloseWatcher()) {
46
+ printIonWarning('experimentalCloseWatcher was set to `true`, but hardwareBackButton was set to `false`. Both config options must be `true` for the Close Watcher API to be used.');
47
+ }
38
48
  hardwareBackButtonModule.blockHardwareBackButton();
39
49
  }
40
50
  if (typeof window !== 'undefined') {
@@ -61,7 +71,7 @@ const App = /*@__PURE__*/ proxyCustomElement(class App extends HTMLElement {
61
71
  }
62
72
  render() {
63
73
  const mode = getIonMode(this);
64
- return (h(Host, { key: '56c81f5d59b568ffd4a6de2f9b1c48c9a9456e8b', class: {
74
+ return (h(Host, { key: '3535eb5c0dab78a78011e552524a98599b2b650f', class: {
65
75
  [mode]: true,
66
76
  'ion-page': true,
67
77
  'force-statusbar-padding': config.getBoolean('_forceStatusbarPadding'),
@@ -4,6 +4,7 @@
4
4
  import { proxyCustomElement, HTMLElement, createEvent, Build, h, Host } from '@stencil/core/internal/client';
5
5
  import { g as getTimeGivenProgression } from './cubic-bezier.js';
6
6
  import { G as GESTURE_CONTROLLER } from './gesture-controller.js';
7
+ import { shoudUseCloseWatcher } from './hardware-back-button.js';
7
8
  import { o as isEndSide, i as inheritAriaAttributes, p as assert, m as clamp } from './helpers.js';
8
9
  import { m as menuController } from './index4.js';
9
10
  import { o as getPresentedOverlay } from './overlays.js';
@@ -606,13 +607,18 @@ const Menu = /*@__PURE__*/ proxyCustomElement(class Menu extends HTMLElement {
606
607
  render() {
607
608
  const { type, disabled, isPaneVisible, inheritedAttributes, side } = this;
608
609
  const mode = getIonMode(this);
609
- return (h(Host, { key: '8665a4cec887bb6b0178d1df62e47c8575104ad1', role: "navigation", "aria-label": inheritedAttributes['aria-label'] || 'menu', class: {
610
+ /**
611
+ * If the Close Watcher is enabled then
612
+ * the ionBackButton listener in the menu controller
613
+ * will handle closing the menu when Escape is pressed.
614
+ */
615
+ return (h(Host, { key: 'be7145625a30951e5cc26646f6121ee4fa4c910f', onKeyDown: shoudUseCloseWatcher() ? null : this.onKeydown, role: "navigation", "aria-label": inheritedAttributes['aria-label'] || 'menu', class: {
610
616
  [mode]: true,
611
617
  [`menu-type-${type}`]: true,
612
618
  'menu-enabled': !disabled,
613
619
  [`menu-side-${side}`]: true,
614
620
  'menu-pane-visible': isPaneVisible,
615
- } }, h("div", { key: '37f5797a28f2809cb979272525ef64074b2c9730', class: "menu-inner", part: "container", ref: (el) => (this.menuInnerEl = el) }, h("slot", { key: '718a506b80373deecb1ea5205384839ac222c74e' })), h("ion-backdrop", { key: 'a499b8f60a8aef2ec125a1814b491e8e1a863825', ref: (el) => (this.backdropEl = el), class: "menu-backdrop", tappable: false, stopPropagation: false, part: "backdrop" })));
621
+ } }, h("div", { key: 'ecd6e0641ed67691db270190801f7be365a2d121', class: "menu-inner", part: "container", ref: (el) => (this.menuInnerEl = el) }, h("slot", { key: 'aea3780e259f2b3ea84697a509bb7f13fa9531e9' })), h("ion-backdrop", { key: 'be3253506a34c4c00eb1814621c674196b72db46', ref: (el) => (this.backdropEl = el), class: "menu-backdrop", tappable: false, stopPropagation: false, part: "backdrop" })));
616
622
  }
617
623
  get el() { return this; }
618
624
  static get watchers() { return {
@@ -641,7 +647,7 @@ const Menu = /*@__PURE__*/ proxyCustomElement(class Menu extends HTMLElement {
641
647
  "close": [64],
642
648
  "toggle": [64],
643
649
  "setOpen": [64]
644
- }, [[16, "ionSplitPaneVisible", "onSplitPaneChanged"], [2, "click", "onBackdropClick"], [0, "keydown", "onKeydown"]], {
650
+ }, [[16, "ionSplitPaneVisible", "onSplitPaneChanged"], [2, "click", "onBackdropClick"]], {
645
651
  "type": ["typeChanged"],
646
652
  "disabled": ["disabledChanged"],
647
653
  "side": ["sideChanged"],
@@ -5,7 +5,7 @@ import { proxyCustomElement, HTMLElement, createEvent, h, Host, forceUpdate } fr
5
5
  import { c as createLegacyFormController } from './form-controller.js';
6
6
  import { c as createNotchController } from './notch-controller.js';
7
7
  import { i as isOptionSelected, c as compareOptions, d as defineCustomElement$5 } from './radio.js';
8
- import { d as inheritAttributes, f as focusElement, k as findItemLabel, e as renderHiddenInput, j as getAriaLabel } from './helpers.js';
8
+ import { d as inheritAttributes, f as focusVisibleElement, k as findItemLabel, e as renderHiddenInput, j as getAriaLabel } from './helpers.js';
9
9
  import { p as printIonWarning } from './index6.js';
10
10
  import { c as popoverController, b as actionSheetController, a as alertController } from './overlays.js';
11
11
  import { i as isRTL } from './dir.js';
@@ -176,7 +176,7 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
176
176
  if (indexOfSelected > -1) {
177
177
  const selectedItem = overlay.querySelector(`.select-interface-option:nth-child(${indexOfSelected + 1})`);
178
178
  if (selectedItem) {
179
- focusElement(selectedItem);
179
+ focusVisibleElement(selectedItem);
180
180
  /**
181
181
  * Browsers such as Firefox do not
182
182
  * correctly delegate focus when manually
@@ -200,7 +200,7 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
200
200
  */
201
201
  const firstEnabledOption = overlay.querySelector('ion-radio:not(.radio-disabled), ion-checkbox:not(.checkbox-disabled)');
202
202
  if (firstEnabledOption) {
203
- focusElement(firstEnabledOption.closest('ion-item'));
203
+ focusVisibleElement(firstEnabledOption.closest('ion-item'));
204
204
  /**
205
205
  * Focus the option for the same reason as we do above.
206
206
  */
@@ -77,16 +77,15 @@ const SplitPane = /*@__PURE__*/ proxyCustomElement(class SplitPane extends HTMLE
77
77
  this.visible = false;
78
78
  return;
79
79
  }
80
- if (window.matchMedia) {
81
- // Listen on media query
82
- const callback = (q) => {
83
- this.visible = q.matches;
84
- };
85
- const mediaList = window.matchMedia(mediaQuery);
86
- mediaList.addListener(callback);
87
- this.rmL = () => mediaList.removeListener(callback);
88
- this.visible = mediaList.matches;
89
- }
80
+ // Listen on media query
81
+ const callback = (q) => {
82
+ this.visible = q.matches;
83
+ };
84
+ const mediaList = window.matchMedia(mediaQuery);
85
+ // TODO FW-5869
86
+ mediaList.addListener(callback);
87
+ this.rmL = () => mediaList.removeListener(callback);
88
+ this.visible = mediaList.matches;
90
89
  }
91
90
  isPane(element) {
92
91
  if (!this.visible) {
@@ -120,12 +119,12 @@ const SplitPane = /*@__PURE__*/ proxyCustomElement(class SplitPane extends HTMLE
120
119
  }
121
120
  render() {
122
121
  const mode = getIonMode(this);
123
- return (h(Host, { key: '68f375658524c6b2ecc95f51125f496e76291b99', class: {
122
+ return (h(Host, { key: '3efe241375d23ae12c47927aa1fc1f3f4b4e5807', class: {
124
123
  [mode]: true,
125
124
  // Used internally for styling
126
125
  [`split-pane-${mode}`]: true,
127
126
  'split-pane-visible': this.visible,
128
- } }, h("slot", { key: '606277cb63a5772e421c0dad9d0b4568276d8a7a' })));
127
+ } }, h("slot", { key: 'd5c94319658e2291dcc356e6ed7a9abc1a48a8b9' })));
129
128
  }
130
129
  get el() { return this; }
131
130
  static get watchers() { return {
@@ -2,10 +2,10 @@
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
4
  import { d as doc } from './index5.js';
5
+ import { OVERLAY_BACK_BUTTON_PRIORITY, shoudUseCloseWatcher } from './hardware-back-button.js';
5
6
  import { b as getIonMode, c as config } from './ionic-global.js';
6
7
  import { C as CoreDelegate } from './framework-delegate.js';
7
- import { OVERLAY_BACK_BUTTON_PRIORITY } from './hardware-back-button.js';
8
- import { c as componentOnReady, f as focusElement, a as addEventListener, b as removeEventListener, g as getElementRoot } from './helpers.js';
8
+ import { c as componentOnReady, f as focusVisibleElement, a as addEventListener, b as removeEventListener, g as getElementRoot } from './helpers.js';
9
9
  import { p as printIonWarning } from './index6.js';
10
10
 
11
11
  let lastOverlayIndex = 0;
@@ -98,32 +98,48 @@ const createOverlay = (tagName, opts) => {
98
98
  * valid usage for the disabled property on ion-button.
99
99
  */
100
100
  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])';
101
+ const isOverlayHidden = (overlay) => overlay.classList.contains('overlay-hidden');
102
+ /**
103
+ * Focuses the first descendant in an overlay
104
+ * that can receive focus. If none exists,
105
+ * the entire overlay will be focused.
106
+ */
101
107
  const focusFirstDescendant = (ref, overlay) => {
102
- let firstInput = ref.querySelector(focusableQueryString);
103
- const shadowRoot = firstInput === null || firstInput === void 0 ? void 0 : firstInput.shadowRoot;
104
- if (shadowRoot) {
105
- // If there are no inner focusable elements, just focus the host element.
106
- firstInput = shadowRoot.querySelector(focusableQueryString) || firstInput;
107
- }
108
- if (firstInput) {
109
- focusElement(firstInput);
110
- }
111
- else {
112
- // Focus overlay instead of letting focus escape
113
- overlay.focus();
114
- }
108
+ const firstInput = ref.querySelector(focusableQueryString);
109
+ focusElementInOverlay(firstInput, overlay);
115
110
  };
116
- const isOverlayHidden = (overlay) => overlay.classList.contains('overlay-hidden');
111
+ /**
112
+ * Focuses the last descendant in an overlay
113
+ * that can receive focus. If none exists,
114
+ * the entire overlay will be focused.
115
+ */
117
116
  const focusLastDescendant = (ref, overlay) => {
118
117
  const inputs = Array.from(ref.querySelectorAll(focusableQueryString));
119
- let lastInput = inputs.length > 0 ? inputs[inputs.length - 1] : null;
120
- const shadowRoot = lastInput === null || lastInput === void 0 ? void 0 : lastInput.shadowRoot;
118
+ const lastInput = inputs.length > 0 ? inputs[inputs.length - 1] : null;
119
+ focusElementInOverlay(lastInput, overlay);
120
+ };
121
+ /**
122
+ * Focuses a particular element in an overlay. If the element
123
+ * doesn't have anything focusable associated with it then
124
+ * the overlay itself will be focused.
125
+ * This should be used instead of the focus() method
126
+ * on most elements because the focusable element
127
+ * may not be the host element.
128
+ *
129
+ * For example, if an ion-button should be focused
130
+ * then we should actually focus the native <button>
131
+ * element inside of ion-button's shadow root, not
132
+ * the host element itself.
133
+ */
134
+ const focusElementInOverlay = (hostToFocus, overlay) => {
135
+ let elementToFocus = hostToFocus;
136
+ const shadowRoot = hostToFocus === null || hostToFocus === void 0 ? void 0 : hostToFocus.shadowRoot;
121
137
  if (shadowRoot) {
122
138
  // If there are no inner focusable elements, just focus the host element.
123
- lastInput = shadowRoot.querySelector(focusableQueryString) || lastInput;
139
+ elementToFocus = shadowRoot.querySelector(focusableQueryString) || hostToFocus;
124
140
  }
125
- if (lastInput) {
126
- lastInput.focus();
141
+ if (elementToFocus) {
142
+ focusVisibleElement(elementToFocus);
127
143
  }
128
144
  else {
129
145
  // Focus overlay instead of letting focus escape
@@ -205,6 +221,21 @@ const trapKeyboardFocus = (ev, doc) => {
205
221
  */
206
222
  if (overlayWrapper.contains(target) || target === overlayRoot.querySelector('ion-backdrop')) {
207
223
  lastOverlay.lastFocus = target;
224
+ /**
225
+ * Toasts can be presented from an overlay.
226
+ * However, focus should still be returned to
227
+ * the overlay when clicking a toast. Normally,
228
+ * focus would be returned to the last focusable
229
+ * descendant in the overlay which may not always be
230
+ * the button that the toast was presented from. In this case,
231
+ * the focus may be returned to an unexpected element.
232
+ * To account for this, we make sure to return focus to the
233
+ * last focused element in the overlay if focus is
234
+ * moved to the toast.
235
+ */
236
+ }
237
+ else if (target.tagName === 'ION-TOAST') {
238
+ focusElementInOverlay(lastOverlay.lastFocus, lastOverlay);
208
239
  }
209
240
  else {
210
241
  /**
@@ -245,6 +276,21 @@ const trapKeyboardFocus = (ev, doc) => {
245
276
  */
246
277
  if (lastOverlay.contains(target)) {
247
278
  lastOverlay.lastFocus = target;
279
+ /**
280
+ * Toasts can be presented from an overlay.
281
+ * However, focus should still be returned to
282
+ * the overlay when clicking a toast. Normally,
283
+ * focus would be returned to the last focusable
284
+ * descendant in the overlay which may not always be
285
+ * the button that the toast was presented from. In this case,
286
+ * the focus may be returned to an unexpected element.
287
+ * To account for this, we make sure to return focus to the
288
+ * last focused element in the overlay if focus is
289
+ * moved to the toast.
290
+ */
291
+ }
292
+ else if (target.tagName === 'ION-TOAST') {
293
+ focusElementInOverlay(lastOverlay.lastFocus, lastOverlay);
248
294
  }
249
295
  else {
250
296
  /**
@@ -273,6 +319,7 @@ const trapKeyboardFocus = (ev, doc) => {
273
319
  * last focus to equal the active element.
274
320
  */
275
321
  if (lastFocus === doc.activeElement) {
322
+ console.log('LAST FOCUS');
276
323
  focusLastDescendant(lastOverlay, lastOverlay);
277
324
  }
278
325
  lastOverlay.lastFocus = doc.activeElement;
@@ -296,19 +343,38 @@ const connectListeners = (doc) => {
296
343
  const lastOverlay = getPresentedOverlay(doc);
297
344
  if (lastOverlay === null || lastOverlay === void 0 ? void 0 : lastOverlay.backdropDismiss) {
298
345
  ev.detail.register(OVERLAY_BACK_BUTTON_PRIORITY, () => {
299
- return lastOverlay.dismiss(undefined, BACKDROP);
346
+ /**
347
+ * Do not return this promise otherwise
348
+ * the hardware back button utility will
349
+ * be blocked until the overlay dismisses.
350
+ * This is important for a modal with canDismiss.
351
+ * If the application presents a confirmation alert
352
+ * in the "canDismiss" callback, then it will be impossible
353
+ * to use the hardware back button to dismiss the alert
354
+ * dialog because the hardware back button utility
355
+ * is blocked on waiting for the modal to dismiss.
356
+ */
357
+ lastOverlay.dismiss(undefined, BACKDROP);
300
358
  });
301
359
  }
302
360
  });
303
- // handle ESC to close overlay
304
- doc.addEventListener('keydown', (ev) => {
305
- if (ev.key === 'Escape') {
306
- const lastOverlay = getPresentedOverlay(doc);
307
- if (lastOverlay === null || lastOverlay === void 0 ? void 0 : lastOverlay.backdropDismiss) {
308
- lastOverlay.dismiss(undefined, BACKDROP);
361
+ /**
362
+ * Handle ESC to close overlay.
363
+ * CloseWatcher also handles pressing the Esc
364
+ * key, so if a browser supports CloseWatcher then
365
+ * this behavior will be handled via the ionBackButton
366
+ * event.
367
+ */
368
+ if (!shoudUseCloseWatcher()) {
369
+ doc.addEventListener('keydown', (ev) => {
370
+ if (ev.key === 'Escape') {
371
+ const lastOverlay = getPresentedOverlay(doc);
372
+ if (lastOverlay === null || lastOverlay === void 0 ? void 0 : lastOverlay.backdropDismiss) {
373
+ lastOverlay.dismiss(undefined, BACKDROP);
374
+ }
309
375
  }
310
- }
311
- });
376
+ });
377
+ }
312
378
  }
313
379
  };
314
380
  const dismissOverlay = (doc, data, role, overlayTag, id) => {
@@ -4,7 +4,7 @@
4
4
  'use strict';
5
5
 
6
6
  const index = require('./index-c8d52405.js');
7
- const helpers = require('./helpers-76bb7efb.js');
7
+ const helpers = require('./helpers-da4c0ed1.js');
8
8
 
9
9
  let animationPrefix;
10
10
  /**
@@ -3,7 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- const helpers = require('./helpers-76bb7efb.js');
6
+ const helpers = require('./helpers-da4c0ed1.js');
7
7
 
8
8
  /**
9
9
  * 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.
@@ -3,7 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- const helpers = require('./helpers-76bb7efb.js');
6
+ const helpers = require('./helpers-da4c0ed1.js');
7
7
 
8
8
  // TODO(FW-2832): types
9
9
  const attachComponent = async (delegate, container, component, cssClasses, componentProps, inline) => {
@@ -3,6 +3,23 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
+ const index = require('./index-c8d52405.js');
7
+ const ionicGlobal = require('./ionic-global-7358c23e.js');
8
+ require('./index-5a471146.js');
9
+
10
+ /**
11
+ * CloseWatcher is a newer API that lets
12
+ * use detect the hardware back button event
13
+ * in a web browser: https://caniuse.com/?search=closewatcher
14
+ * However, not every browser supports it yet.
15
+ *
16
+ * This needs to be a function so that we can
17
+ * check the config once it has been set.
18
+ * Otherwise, this code would be evaluated the
19
+ * moment this file is evaluated which could be
20
+ * before the config is set.
21
+ */
22
+ const shoudUseCloseWatcher = () => ionicGlobal.config.get('experimentalCloseWatcher', false) && index.win !== undefined && 'CloseWatcher' in index.win;
6
23
  /**
7
24
  * When hardwareBackButton: false in config,
8
25
  * we need to make sure we also block the default
@@ -19,7 +36,7 @@ const blockHardwareBackButton = () => {
19
36
  const startHardwareBackButton = () => {
20
37
  const doc = document;
21
38
  let busy = false;
22
- doc.addEventListener('backbutton', () => {
39
+ const backButtonCallback = () => {
23
40
  if (busy) {
24
41
  return;
25
42
  }
@@ -65,7 +82,35 @@ const startHardwareBackButton = () => {
65
82
  }
66
83
  };
67
84
  processHandlers();
68
- });
85
+ };
86
+ /**
87
+ * If the CloseWatcher is defined then
88
+ * we don't want to also listen for the native
89
+ * backbutton event otherwise we may get duplicate
90
+ * events firing.
91
+ */
92
+ if (shoudUseCloseWatcher()) {
93
+ let watcher;
94
+ const configureWatcher = () => {
95
+ watcher === null || watcher === void 0 ? void 0 : watcher.destroy();
96
+ watcher = new index.win.CloseWatcher();
97
+ /**
98
+ * Once a close request happens
99
+ * the watcher gets destroyed.
100
+ * As a result, we need to re-configure
101
+ * the watcher so we can respond to other
102
+ * close requests.
103
+ */
104
+ watcher.onclose = () => {
105
+ backButtonCallback();
106
+ configureWatcher();
107
+ };
108
+ };
109
+ configureWatcher();
110
+ }
111
+ else {
112
+ doc.addEventListener('backbutton', backButtonCallback);
113
+ }
69
114
  };
70
115
  const OVERLAY_BACK_BUTTON_PRIORITY = 100;
71
116
  const MENU_BACK_BUTTON_PRIORITY = 99; // 1 less than overlay priority since menu is displayed behind overlays
@@ -73,4 +118,5 @@ const MENU_BACK_BUTTON_PRIORITY = 99; // 1 less than overlay priority since menu
73
118
  exports.MENU_BACK_BUTTON_PRIORITY = MENU_BACK_BUTTON_PRIORITY;
74
119
  exports.OVERLAY_BACK_BUTTON_PRIORITY = OVERLAY_BACK_BUTTON_PRIORITY;
75
120
  exports.blockHardwareBackButton = blockHardwareBackButton;
121
+ exports.shoudUseCloseWatcher = shoudUseCloseWatcher;
76
122
  exports.startHardwareBackButton = startHardwareBackButton;
@@ -36,7 +36,7 @@ const transitionEnd = (el, expectedDuration = 0, callback) => {
36
36
  el.addEventListener('transitionend', onTransitionEnd, opts);
37
37
  animationTimeout = setTimeout(onTransitionEnd, expectedDuration + ANIMATION_FALLBACK_TIMEOUT);
38
38
  unRegTrans = () => {
39
- if (animationTimeout) {
39
+ if (animationTimeout !== undefined) {
40
40
  clearTimeout(animationTimeout);
41
41
  animationTimeout = undefined;
42
42
  }
@@ -239,7 +239,7 @@ const findItemLabel = (componentEl) => {
239
239
  }
240
240
  return null;
241
241
  };
242
- const focusElement = (el) => {
242
+ const focusVisibleElement = (el) => {
243
243
  el.focus();
244
244
  /**
245
245
  * When programmatically focusing an element,
@@ -424,7 +424,7 @@ exports.componentOnReady = componentOnReady;
424
424
  exports.debounce = debounce;
425
425
  exports.debounceEvent = debounceEvent;
426
426
  exports.findItemLabel = findItemLabel;
427
- exports.focusElement = focusElement;
427
+ exports.focusVisibleElement = focusVisibleElement;
428
428
  exports.getAriaLabel = getAriaLabel;
429
429
  exports.getElementRoot = getElementRoot;
430
430
  exports.hasLazyBuild = hasLazyBuild;
@@ -4,7 +4,7 @@
4
4
  'use strict';
5
5
 
6
6
  const index = require('./index-5a471146.js');
7
- const helpers = require('./helpers-76bb7efb.js');
7
+ const helpers = require('./helpers-da4c0ed1.js');
8
8
 
9
9
  const LIFECYCLE_WILL_ENTER = 'ionViewWillEnter';
10
10
  const LIFECYCLE_DID_ENTER = 'ionViewDidEnter';
@@ -12,8 +12,8 @@ const LIFECYCLE_WILL_LEAVE = 'ionViewWillLeave';
12
12
  const LIFECYCLE_DID_LEAVE = 'ionViewDidLeave';
13
13
  const LIFECYCLE_WILL_UNLOAD = 'ionViewWillUnload';
14
14
 
15
- const iosTransitionAnimation = () => Promise.resolve().then(function () { return require('./ios.transition-2d1cf0c0.js'); });
16
- const mdTransitionAnimation = () => Promise.resolve().then(function () { return require('./md.transition-bb342d2a.js'); });
15
+ const iosTransitionAnimation = () => Promise.resolve().then(function () { return require('./ios.transition-810ef802.js'); });
16
+ const mdTransitionAnimation = () => Promise.resolve().then(function () { return require('./md.transition-15315952.js'); });
17
17
  // TODO(FW-2832): types
18
18
  const transition = (opts) => {
19
19
  return new Promise((resolve, reject) => {
@@ -4,7 +4,7 @@
4
4
  'use strict';
5
5
 
6
6
  const index = require('./index-c8d52405.js');
7
- const helpers = require('./helpers-76bb7efb.js');
7
+ const helpers = require('./helpers-da4c0ed1.js');
8
8
 
9
9
  const startTapClick = (config) => {
10
10
  if (index.doc === undefined) {
@@ -4,11 +4,11 @@
4
4
  'use strict';
5
5
 
6
6
  const index$1 = require('./index-c8d52405.js');
7
- const hardwareBackButton = require('./hardware-back-button-76833cac.js');
7
+ const hardwareBackButton = require('./hardware-back-button-d23873bb.js');
8
8
  const index = require('./index-5915f9b3.js');
9
- const helpers = require('./helpers-76bb7efb.js');
9
+ const helpers = require('./helpers-da4c0ed1.js');
10
10
  const ionicGlobal = require('./ionic-global-7358c23e.js');
11
- const animation = require('./animation-9b401d39.js');
11
+ const animation = require('./animation-c2840aea.js');
12
12
 
13
13
  /**
14
14
  * baseAnimation
@@ -3,7 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- const helpers = require('./helpers-76bb7efb.js');
6
+ const helpers = require('./helpers-da4c0ed1.js');
7
7
  const index = require('./index-5915f9b3.js');
8
8
 
9
9
  const ION_CONTENT_TAG_NAME = 'ION-CONTENT';
@@ -5,24 +5,24 @@
5
5
 
6
6
  Object.defineProperty(exports, '__esModule', { value: true });
7
7
 
8
- const animation = require('./animation-9b401d39.js');
9
- const index = require('./index-fc6d268f.js');
10
- const ios_transition = require('./ios.transition-2d1cf0c0.js');
11
- const md_transition = require('./md.transition-bb342d2a.js');
8
+ const animation = require('./animation-c2840aea.js');
9
+ const index = require('./index-0ccc7b6f.js');
10
+ const ios_transition = require('./ios.transition-810ef802.js');
11
+ const md_transition = require('./md.transition-15315952.js');
12
12
  const cubicBezier = require('./cubic-bezier-f2dccc53.js');
13
13
  const index$1 = require('./index-d1b59ffa.js');
14
14
  const ionicGlobal = require('./ionic-global-7358c23e.js');
15
- const helpers = require('./helpers-76bb7efb.js');
15
+ const helpers = require('./helpers-da4c0ed1.js');
16
16
  const config = require('./config-4f60b98a.js');
17
17
  const theme = require('./theme-d1c573d2.js');
18
- const index$2 = require('./index-8aef188d.js');
19
- const overlays = require('./overlays-62679ec5.js');
18
+ const index$2 = require('./index-6600c909.js');
19
+ const overlays = require('./overlays-37b51f7b.js');
20
20
  require('./index-c8d52405.js');
21
21
  require('./index-5a471146.js');
22
22
  require('./gesture-controller-c40c045a.js');
23
- require('./hardware-back-button-76833cac.js');
23
+ require('./hardware-back-button-d23873bb.js');
24
24
  require('./index-5915f9b3.js');
25
- require('./framework-delegate-1c29b14a.js');
25
+ require('./framework-delegate-e0e13baa.js');
26
26
 
27
27
  const IonicSlides = (opts) => {
28
28
  const { swiper, extendParams } = opts;