@ionic/core 7.5.7-dev.11701273756.1eb73d4c → 7.5.7-dev.11701896424.13d40ac9

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 (378) hide show
  1. package/components/animation.js +11 -12
  2. package/components/checkbox.js +0 -2
  3. package/components/data.js +64 -14
  4. package/components/index4.js +12 -10
  5. package/components/index5.js +22 -0
  6. package/components/input-shims.js +7 -12
  7. package/components/input.utils.js +2 -3
  8. package/components/ion-datetime.js +38 -19
  9. package/components/ion-input.js +8 -31
  10. package/components/ion-modal.js +2 -2
  11. package/components/ion-range.js +0 -2
  12. package/components/ion-select.js +29 -44
  13. package/components/ion-skeleton-text.js +1 -14
  14. package/components/ion-textarea.js +7 -30
  15. package/components/ion-toast.js +74 -419
  16. package/components/ion-toggle.js +0 -2
  17. package/components/item.js +2 -2
  18. package/components/label.js +2 -2
  19. package/components/overlays.js +1 -2
  20. package/components/picker-column-internal.js +7 -12
  21. package/components/radio-group.js +0 -2
  22. package/components/radio.js +2 -42
  23. package/dist/cjs/{animation-d101aa7a.js → animation-1083855c.js} +12 -13
  24. package/dist/cjs/{button-active-ba107e4e.js → button-active-af897e0e.js} +1 -1
  25. package/dist/cjs/{capacitor-f68447d3.js → capacitor-2ffba62a.js} +1 -1
  26. package/dist/cjs/{data-c8d21093.js → data-912a6f37.js} +64 -14
  27. package/dist/cjs/{haptic-a74c2767.js → haptic-678abc9f.js} +1 -1
  28. package/dist/cjs/index-306a7476.js +32 -0
  29. package/dist/cjs/{index-56d41f51.js → index-573877f3.js} +2 -2
  30. package/dist/cjs/{index-e9634bc9.js → index-9f379eaa.js} +1 -1
  31. package/dist/cjs/{index-4f0c67e1.js → index-d7561763.js} +13 -11
  32. package/dist/cjs/index.cjs.js +8 -8
  33. package/dist/cjs/{input-shims-3e3f35b9.js → input-shims-b0a75a01.js} +10 -15
  34. package/dist/cjs/{input.utils-bdb6953c.js → input.utils-0fe3097c.js} +3 -4
  35. package/dist/cjs/ion-action-sheet.cjs.entry.js +6 -6
  36. package/dist/cjs/ion-alert.cjs.entry.js +6 -6
  37. package/dist/cjs/ion-app_8.cjs.entry.js +8 -8
  38. package/dist/cjs/ion-checkbox.cjs.entry.js +0 -2
  39. package/dist/cjs/ion-datetime-button.cjs.entry.js +1 -1
  40. package/dist/cjs/ion-datetime_3.cjs.entry.js +44 -25
  41. package/dist/cjs/ion-input.cjs.entry.js +11 -34
  42. package/dist/cjs/ion-item_8.cjs.entry.js +4 -17
  43. package/dist/cjs/ion-loading.cjs.entry.js +3 -3
  44. package/dist/cjs/ion-menu_3.cjs.entry.js +5 -5
  45. package/dist/cjs/ion-modal.cjs.entry.js +8 -8
  46. package/dist/cjs/ion-nav_2.cjs.entry.js +1 -1
  47. package/dist/cjs/ion-picker-column-internal.cjs.entry.js +10 -14
  48. package/dist/cjs/ion-popover.cjs.entry.js +4 -4
  49. package/dist/cjs/ion-radio_2.cjs.entry.js +1 -6
  50. package/dist/cjs/ion-range.cjs.entry.js +0 -2
  51. package/dist/cjs/ion-refresher_2.cjs.entry.js +4 -4
  52. package/dist/cjs/ion-reorder_2.cjs.entry.js +3 -3
  53. package/dist/cjs/ion-select_3.cjs.entry.js +35 -51
  54. package/dist/cjs/ion-tab-bar_2.cjs.entry.js +4 -4
  55. package/dist/cjs/ion-textarea.cjs.entry.js +10 -33
  56. package/dist/cjs/ion-toast.cjs.entry.js +92 -434
  57. package/dist/cjs/ion-toggle.cjs.entry.js +3 -5
  58. package/dist/cjs/ionic.cjs.js +1 -1
  59. package/dist/cjs/{ios.transition-f4caf640.js → ios.transition-ac909bc8.js} +3 -3
  60. package/dist/cjs/{keyboard-840107b3.js → keyboard-38f2bb7b.js} +3 -3
  61. package/dist/cjs/{keyboard-controller-019f42df.js → keyboard-controller-50beb83a.js} +2 -2
  62. package/dist/cjs/{keyboard-43df0428.js → keyboard-fd7db491.js} +1 -1
  63. package/dist/cjs/loader.cjs.js +1 -1
  64. package/dist/cjs/{md.transition-33331e93.js → md.transition-907af519.js} +3 -3
  65. package/dist/cjs/{notch-controller-c22d1344.js → notch-controller-f4f6af5d.js} +1 -1
  66. package/dist/cjs/{overlays-4d8897dc.js → overlays-2ffc5f27.js} +1 -3
  67. package/dist/collection/collection-manifest.json +2 -2
  68. package/dist/collection/components/checkbox/checkbox.js +0 -2
  69. package/dist/collection/components/datetime/datetime.ios.css +0 -1
  70. package/dist/collection/components/datetime/datetime.js +36 -17
  71. package/dist/collection/components/datetime/datetime.md.css +0 -1
  72. package/dist/collection/components/datetime/test/manipulation.spec.js +133 -1
  73. package/dist/collection/components/datetime/test/prefer-wheel/datetime.spec.js +27 -0
  74. package/dist/collection/components/datetime/utils/manipulation.js +65 -15
  75. package/dist/collection/components/input/input.ios.css +3 -10
  76. package/dist/collection/components/input/input.js +6 -31
  77. package/dist/collection/components/input/input.md.css +12 -13
  78. package/dist/collection/components/item/item.ios.css +3 -25
  79. package/dist/collection/components/item/item.md.css +3 -25
  80. package/dist/collection/components/item/test/basic/item.e2e.js +1 -1
  81. package/dist/collection/components/item/test/disabled/item.e2e.js +1 -0
  82. package/dist/collection/components/item/test/text/item.e2e.js +14 -0
  83. package/dist/collection/components/label/label.ios.css +3 -14
  84. package/dist/collection/components/label/label.md.css +3 -14
  85. package/dist/collection/components/modal/gestures/swipe-to-close.js +1 -2
  86. package/dist/collection/components/note/test/a11y/note.e2e.js +0 -43
  87. package/dist/collection/components/picker-column-internal/picker-column-internal.ios.css +3 -11
  88. package/dist/collection/components/picker-column-internal/picker-column-internal.js +5 -27
  89. package/dist/collection/components/picker-column-internal/picker-column-internal.md.css +3 -11
  90. package/dist/collection/components/picker-column-internal/test/disabled/picker-column-internal.e2e.js +5 -34
  91. package/dist/collection/components/radio/radio.js +2 -5
  92. package/dist/collection/components/radio-group/radio-group.js +0 -24
  93. package/dist/collection/components/range/range.js +0 -2
  94. package/dist/collection/components/select/select.ios.css +7 -61
  95. package/dist/collection/components/select/select.js +28 -45
  96. package/dist/collection/components/select/select.md.css +19 -64
  97. package/dist/collection/components/select/test/label/select.e2e.js +1 -1
  98. package/dist/collection/components/select/test/legacy/wrapping/select.e2e.js +1 -1
  99. package/dist/collection/components/skeleton-text/skeleton-text.js +0 -39
  100. package/dist/collection/components/textarea/textarea.ios.css +5 -37
  101. package/dist/collection/components/textarea/textarea.js +5 -30
  102. package/dist/collection/components/textarea/textarea.md.css +14 -47
  103. package/dist/collection/components/toast/animations/ios.enter.js +1 -2
  104. package/dist/collection/components/toast/animations/md.enter.js +3 -4
  105. package/dist/collection/components/toast/animations/utils.js +14 -20
  106. package/dist/collection/components/toast/test/toast.spec.js +0 -80
  107. package/dist/collection/components/toast/toast.ios.css +10 -10
  108. package/dist/collection/components/toast/toast.js +1 -104
  109. package/dist/collection/components/toast/toast.md.css +0 -10
  110. package/dist/collection/components/toggle/toggle.js +0 -2
  111. package/dist/collection/utils/animation/animation.js +11 -12
  112. package/dist/collection/utils/animation/test/animation.spec.js +0 -16
  113. package/dist/collection/utils/browser/index.js +22 -0
  114. package/dist/collection/utils/forms/index.js +0 -1
  115. package/dist/collection/utils/input-shims/input-shims.js +6 -12
  116. package/dist/collection/utils/menu-controller/index.js +12 -10
  117. package/dist/collection/utils/overlays.js +0 -1
  118. package/dist/collection/utils/slot-mutation-controller.js +2 -3
  119. package/dist/docs.json +12 -137
  120. package/dist/esm/{animation-cf3dd234.js → animation-8aa13916.js} +12 -13
  121. package/dist/esm/{button-active-47196c40.js → button-active-ce5cba4c.js} +1 -1
  122. package/dist/esm/{capacitor-f1f25364.js → capacitor-b4979570.js} +1 -1
  123. package/dist/esm/{data-44d9e816.js → data-316b33f5.js} +64 -14
  124. package/dist/esm/{haptic-1a66d69f.js → haptic-1243b917.js} +1 -1
  125. package/dist/esm/{index-23c05a55.js → index-0aa6e61f.js} +13 -11
  126. package/dist/esm/{index-702b3cd3.js → index-6a0ccabb.js} +2 -2
  127. package/dist/esm/index-7a14ecec.js +29 -0
  128. package/dist/esm/{index-c9e82353.js → index-f0cc4e14.js} +1 -1
  129. package/dist/esm/index.js +8 -8
  130. package/dist/esm/{input-shims-1d767845.js → input-shims-d0c93e5d.js} +9 -14
  131. package/dist/esm/{input.utils-2cf5e372.js → input.utils-ec063df4.js} +3 -4
  132. package/dist/esm/ion-action-sheet.entry.js +6 -6
  133. package/dist/esm/ion-alert.entry.js +6 -6
  134. package/dist/esm/ion-app_8.entry.js +8 -8
  135. package/dist/esm/ion-checkbox.entry.js +0 -2
  136. package/dist/esm/ion-datetime-button.entry.js +1 -1
  137. package/dist/esm/ion-datetime_3.entry.js +44 -25
  138. package/dist/esm/ion-input.entry.js +11 -34
  139. package/dist/esm/ion-item_8.entry.js +4 -17
  140. package/dist/esm/ion-loading.entry.js +3 -3
  141. package/dist/esm/ion-menu_3.entry.js +5 -5
  142. package/dist/esm/ion-modal.entry.js +8 -8
  143. package/dist/esm/ion-nav_2.entry.js +1 -1
  144. package/dist/esm/ion-picker-column-internal.entry.js +10 -14
  145. package/dist/esm/ion-popover.entry.js +4 -4
  146. package/dist/esm/ion-radio_2.entry.js +1 -6
  147. package/dist/esm/ion-range.entry.js +0 -2
  148. package/dist/esm/ion-refresher_2.entry.js +4 -4
  149. package/dist/esm/ion-reorder_2.entry.js +3 -3
  150. package/dist/esm/ion-select_3.entry.js +31 -47
  151. package/dist/esm/ion-tab-bar_2.entry.js +4 -4
  152. package/dist/esm/ion-textarea.entry.js +10 -33
  153. package/dist/esm/ion-toast.entry.js +75 -417
  154. package/dist/esm/ion-toggle.entry.js +3 -5
  155. package/dist/esm/ionic.js +1 -1
  156. package/dist/esm/{ios.transition-c3e77862.js → ios.transition-1651c430.js} +3 -3
  157. package/dist/esm/{keyboard-b6230bfb.js → keyboard-b063f012.js} +1 -1
  158. package/dist/esm/{keyboard-9f771a04.js → keyboard-b551279d.js} +3 -3
  159. package/dist/esm/{keyboard-controller-3f0faa10.js → keyboard-controller-0c2dce71.js} +2 -2
  160. package/dist/esm/loader.js +1 -1
  161. package/dist/esm/{md.transition-1173eca9.js → md.transition-66f18369.js} +3 -3
  162. package/dist/esm/{notch-controller-3f79197e.js → notch-controller-8c9c0e54.js} +1 -1
  163. package/dist/esm/{overlays-34169295.js → overlays-6c9feb7e.js} +2 -3
  164. package/dist/esm-es5/{animation-cf3dd234.js → animation-8aa13916.js} +1 -1
  165. package/dist/esm-es5/{button-active-47196c40.js → button-active-ce5cba4c.js} +1 -1
  166. package/dist/esm-es5/{capacitor-f1f25364.js → capacitor-b4979570.js} +1 -1
  167. package/dist/esm-es5/data-316b33f5.js +4 -0
  168. package/dist/esm-es5/{haptic-1a66d69f.js → haptic-1243b917.js} +1 -1
  169. package/dist/esm-es5/index-0aa6e61f.js +4 -0
  170. package/dist/esm-es5/{index-702b3cd3.js → index-6a0ccabb.js} +1 -1
  171. package/dist/esm-es5/index-f0cc4e14.js +4 -0
  172. package/dist/esm-es5/index.js +1 -1
  173. package/dist/esm-es5/input-shims-d0c93e5d.js +4 -0
  174. package/dist/esm-es5/input.utils-ec063df4.js +4 -0
  175. package/dist/esm-es5/ion-action-sheet.entry.js +1 -1
  176. package/dist/esm-es5/ion-alert.entry.js +1 -1
  177. package/dist/esm-es5/ion-app_8.entry.js +1 -1
  178. package/dist/esm-es5/ion-checkbox.entry.js +1 -1
  179. package/dist/esm-es5/ion-datetime-button.entry.js +1 -1
  180. package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
  181. package/dist/esm-es5/ion-input.entry.js +1 -1
  182. package/dist/esm-es5/ion-item_8.entry.js +1 -1
  183. package/dist/esm-es5/ion-loading.entry.js +1 -1
  184. package/dist/esm-es5/ion-menu_3.entry.js +1 -1
  185. package/dist/esm-es5/ion-modal.entry.js +1 -1
  186. package/dist/esm-es5/ion-nav_2.entry.js +1 -1
  187. package/dist/esm-es5/ion-picker-column-internal.entry.js +1 -1
  188. package/dist/esm-es5/ion-popover.entry.js +1 -1
  189. package/dist/esm-es5/ion-radio_2.entry.js +1 -1
  190. package/dist/esm-es5/ion-range.entry.js +1 -1
  191. package/dist/esm-es5/ion-refresher_2.entry.js +1 -1
  192. package/dist/esm-es5/ion-reorder_2.entry.js +1 -1
  193. package/dist/esm-es5/ion-select_3.entry.js +1 -1
  194. package/dist/esm-es5/ion-tab-bar_2.entry.js +1 -1
  195. package/dist/esm-es5/ion-textarea.entry.js +1 -1
  196. package/dist/esm-es5/ion-toast.entry.js +1 -1
  197. package/dist/esm-es5/ion-toggle.entry.js +1 -1
  198. package/dist/esm-es5/ionic.js +1 -1
  199. package/dist/esm-es5/{ios.transition-c3e77862.js → ios.transition-1651c430.js} +1 -1
  200. package/dist/esm-es5/{keyboard-b6230bfb.js → keyboard-b063f012.js} +1 -1
  201. package/dist/esm-es5/{keyboard-9f771a04.js → keyboard-b551279d.js} +1 -1
  202. package/dist/esm-es5/{keyboard-controller-3f0faa10.js → keyboard-controller-0c2dce71.js} +1 -1
  203. package/dist/esm-es5/loader.js +1 -1
  204. package/dist/esm-es5/md.transition-66f18369.js +4 -0
  205. package/dist/esm-es5/{notch-controller-3f79197e.js → notch-controller-8c9c0e54.js} +1 -1
  206. package/dist/esm-es5/{overlays-34169295.js → overlays-6c9feb7e.js} +1 -1
  207. package/dist/html.html-data.json +1 -14
  208. package/dist/ionic/index.esm.js +1 -1
  209. package/dist/ionic/ionic.esm.js +1 -1
  210. package/dist/ionic/p-014e8840.system.js +4 -0
  211. package/dist/ionic/{p-83a455fd.system.js → p-09d142b3.system.js} +1 -1
  212. package/dist/ionic/p-0d8e9393.entry.js +4 -0
  213. package/dist/ionic/{p-3abf5b7a.entry.js → p-0dc0d9b5.entry.js} +1 -1
  214. package/dist/ionic/{p-54824705.system.entry.js → p-0e23256e.system.entry.js} +1 -1
  215. package/dist/ionic/{p-e9e5755c.system.js → p-14b4348c.system.js} +1 -1
  216. package/dist/ionic/{p-ea9addc8.system.entry.js → p-18e01b30.system.entry.js} +1 -1
  217. package/dist/ionic/{p-823890d5.system.entry.js → p-1cb5f2f8.system.entry.js} +1 -1
  218. package/dist/ionic/p-1e5165db.system.entry.js +4 -0
  219. package/dist/ionic/p-20cf4994.js +4 -0
  220. package/dist/ionic/p-276afddd.js +4 -0
  221. package/dist/ionic/p-2e8e0045.js +4 -0
  222. package/dist/ionic/{p-d61a2cee.system.entry.js → p-34d2de14.system.entry.js} +1 -1
  223. package/dist/ionic/p-352c0232.system.entry.js +4 -0
  224. package/dist/ionic/p-3602001b.system.js +4 -0
  225. package/dist/ionic/p-3632220b.system.js +4 -0
  226. package/dist/ionic/{p-37c69d34.system.entry.js → p-377c636c.system.entry.js} +1 -1
  227. package/dist/ionic/{p-fce6b76a.system.entry.js → p-39044fe6.system.entry.js} +1 -1
  228. package/dist/ionic/{p-e5fd9f10.js → p-3bad5c1a.js} +1 -1
  229. package/dist/ionic/p-3ce8c3e3.entry.js +4 -0
  230. package/dist/ionic/p-40903d34.system.js +1 -1
  231. package/dist/ionic/{p-958f1c70.system.js → p-41477ad9.system.js} +1 -1
  232. package/dist/ionic/{p-a135e3ba.js → p-419eb426.js} +1 -1
  233. package/dist/ionic/p-4794e0ac.system.entry.js +4 -0
  234. package/dist/ionic/{p-587afb80.system.entry.js → p-4a142496.system.entry.js} +1 -1
  235. package/dist/ionic/p-4cd588b3.system.entry.js +4 -0
  236. package/dist/ionic/p-4dbac22d.entry.js +4 -0
  237. package/dist/ionic/p-4fa201a7.entry.js +4 -0
  238. package/dist/ionic/{p-4c80afe1.system.entry.js → p-587be954.system.entry.js} +1 -1
  239. package/dist/ionic/p-5c299019.entry.js +4 -0
  240. package/dist/ionic/{p-f36112b4.entry.js → p-64296b15.entry.js} +1 -1
  241. package/dist/ionic/{p-1abc74d9.entry.js → p-64ed03a3.entry.js} +1 -1
  242. package/dist/ionic/p-67aab78f.js +4 -0
  243. package/dist/ionic/{p-03ed6107.system.entry.js → p-67e644bd.system.entry.js} +1 -1
  244. package/dist/ionic/{p-cc615985.system.entry.js → p-67ed452a.system.entry.js} +1 -1
  245. package/dist/ionic/p-67eecef4.system.js +4 -0
  246. package/dist/ionic/p-6d812360.system.entry.js +4 -0
  247. package/dist/ionic/{p-67951604.system.js → p-702d85d8.system.js} +1 -1
  248. package/dist/ionic/p-7176cea3.entry.js +4 -0
  249. package/dist/ionic/{p-8b15ca22.entry.js → p-73411c1b.entry.js} +1 -1
  250. package/dist/ionic/p-77e7a9c8.entry.js +4 -0
  251. package/dist/ionic/{p-8ad82eb3.entry.js → p-79e83e0a.entry.js} +1 -1
  252. package/dist/ionic/p-7f85ffa9.js +4 -0
  253. package/dist/ionic/{p-2a41d4d1.js → p-800ef057.js} +1 -1
  254. package/dist/ionic/{p-11cb4e19.js → p-81c818e7.js} +1 -1
  255. package/dist/ionic/p-88980f5f.system.entry.js +4 -0
  256. package/dist/ionic/{p-5885e9af.js → p-8cf94fc1.js} +1 -1
  257. package/dist/ionic/{p-3e655d4c.entry.js → p-8e1bded3.entry.js} +1 -1
  258. package/dist/ionic/p-97c65aa5.js +4 -0
  259. package/dist/ionic/{p-d48872b1.system.js → p-97e31c0a.system.js} +1 -1
  260. package/dist/ionic/p-9ab6f3e6.system.js +4 -0
  261. package/dist/ionic/p-9b89cbde.js +4 -0
  262. package/dist/ionic/{p-fe1f93f2.js → p-a0b6d438.js} +1 -1
  263. package/dist/ionic/p-a21b8d05.entry.js +4 -0
  264. package/dist/ionic/p-a5c1e6ce.entry.js +4 -0
  265. package/dist/ionic/{p-c4de53af.system.js → p-a936d224.system.js} +1 -1
  266. package/dist/ionic/{p-aec8a70a.system.js → p-ab4cff27.system.js} +1 -1
  267. package/dist/ionic/p-b0cee324.entry.js +4 -0
  268. package/dist/ionic/p-b1142133.entry.js +4 -0
  269. package/dist/ionic/p-b203659a.system.entry.js +4 -0
  270. package/dist/ionic/{p-6797887a.entry.js → p-b2a74a72.entry.js} +1 -1
  271. package/dist/ionic/{p-9292fd42.system.js → p-b4b4bb29.system.js} +1 -1
  272. package/dist/ionic/p-b6f8ee31.entry.js +4 -0
  273. package/dist/ionic/{p-31189dae.entry.js → p-b91fe549.entry.js} +1 -1
  274. package/dist/ionic/{p-6a309574.js → p-b923f3d7.js} +1 -1
  275. package/dist/ionic/{p-f9a641fa.system.js → p-bba2ce59.system.js} +1 -1
  276. package/dist/ionic/{p-5e6bc319.system.entry.js → p-bed722c4.system.entry.js} +1 -1
  277. package/dist/ionic/{p-21b4981c.system.js → p-c4042875.system.js} +1 -1
  278. package/dist/ionic/p-cc196b34.js +4 -0
  279. package/dist/ionic/{p-e7d20dfb.system.js → p-ccdcb022.system.js} +1 -1
  280. package/dist/ionic/{p-fcb148dc.system.entry.js → p-cf425ec5.system.entry.js} +1 -1
  281. package/dist/ionic/p-d1de1188.js +4 -0
  282. package/dist/ionic/p-d21bfe66.system.entry.js +4 -0
  283. package/dist/ionic/p-d3952bd5.system.entry.js +4 -0
  284. package/dist/ionic/{p-196f2123.system.entry.js → p-ddfc4ef4.system.entry.js} +1 -1
  285. package/dist/ionic/{p-c1e725db.entry.js → p-deab76dc.entry.js} +1 -1
  286. package/dist/ionic/p-dfa756ed.system.js +4 -0
  287. package/dist/ionic/p-e6b240a0.js +4 -0
  288. package/dist/ionic/{p-64ab3eb3.entry.js → p-f37b4b79.entry.js} +1 -1
  289. package/dist/ionic/{p-7047a40c.system.entry.js → p-f3c82f74.system.entry.js} +1 -1
  290. package/dist/ionic/{p-b673ee9b.entry.js → p-f54ddd19.entry.js} +1 -1
  291. package/dist/ionic/p-ff5a10f9.system.js +4 -0
  292. package/dist/types/components/datetime/utils/manipulation.d.ts +34 -7
  293. package/dist/types/components/input/input.d.ts +0 -2
  294. package/dist/types/components/picker-column-internal/picker-column-internal.d.ts +0 -4
  295. package/dist/types/components/radio-group/radio-group-interface.d.ts +0 -1
  296. package/dist/types/components/radio-group/radio-group.d.ts +1 -8
  297. package/dist/types/components/router/router.d.ts +1 -2
  298. package/dist/types/components/select/select.d.ts +1 -6
  299. package/dist/types/components/skeleton-text/skeleton-text.d.ts +1 -9
  300. package/dist/types/components/textarea/textarea.d.ts +0 -2
  301. package/dist/types/components/toast/animations/utils.d.ts +4 -15
  302. package/dist/types/components/toast/toast-interface.d.ts +0 -2
  303. package/dist/types/components/toast/toast.d.ts +1 -28
  304. package/dist/types/components.d.ts +6 -45
  305. package/dist/types/interface.d.ts +5 -1
  306. package/dist/types/utils/animation/animation-interface.d.ts +4 -4
  307. package/dist/types/utils/browser/index.d.ts +2 -11
  308. package/dist/types/utils/forms/index.d.ts +0 -1
  309. package/dist/types/utils/hardware-back-button.d.ts +0 -4
  310. package/dist/types/utils/overlays.d.ts +0 -1
  311. package/dist/types/utils/slot-mutation-controller.d.ts +2 -2
  312. package/hydrate/index.js +276 -659
  313. package/package.json +1 -1
  314. package/dist/cjs/compare-with-utils-c0444525.js +0 -44
  315. package/dist/cjs/index-c8d52405.js +0 -10
  316. package/dist/collection/components/datetime/test/disabled/datetime.spec.js +0 -33
  317. package/dist/collection/components/input/test/slot/input.e2e.js +0 -51
  318. package/dist/collection/components/radio-group/test/radio-group.spec.js +0 -69
  319. package/dist/collection/components/select/test/slot/select.e2e.js +0 -67
  320. package/dist/collection/components/textarea/test/slot/textarea.e2e.js +0 -51
  321. package/dist/collection/components/toast/gestures/swipe-to-dismiss.js +0 -267
  322. package/dist/collection/components/toast/test/swipe-gesture/toast.e2e.js +0 -84
  323. package/dist/collection/components/toast/test/toast-config.spec.js +0 -25
  324. package/dist/collection/utils/forms/compare-with-utils.js +0 -39
  325. package/dist/esm/compare-with-utils-4928c09d.js +0 -41
  326. package/dist/esm/index-a5d50daf.js +0 -7
  327. package/dist/esm-es5/compare-with-utils-4928c09d.js +0 -4
  328. package/dist/esm-es5/data-44d9e816.js +0 -4
  329. package/dist/esm-es5/index-23c05a55.js +0 -4
  330. package/dist/esm-es5/index-c9e82353.js +0 -4
  331. package/dist/esm-es5/input-shims-1d767845.js +0 -4
  332. package/dist/esm-es5/input.utils-2cf5e372.js +0 -4
  333. package/dist/esm-es5/md.transition-1173eca9.js +0 -4
  334. package/dist/ionic/p-0547e914.entry.js +0 -4
  335. package/dist/ionic/p-131761b4.entry.js +0 -4
  336. package/dist/ionic/p-17240d90.js +0 -4
  337. package/dist/ionic/p-1cf5e8d6.entry.js +0 -4
  338. package/dist/ionic/p-2207f3c2.js +0 -4
  339. package/dist/ionic/p-27eb8a91.system.entry.js +0 -4
  340. package/dist/ionic/p-314c4dee.js +0 -4
  341. package/dist/ionic/p-385c51f8.system.entry.js +0 -4
  342. package/dist/ionic/p-3bc3d880.system.js +0 -4
  343. package/dist/ionic/p-43716898.js +0 -4
  344. package/dist/ionic/p-450a26bf.js +0 -4
  345. package/dist/ionic/p-485668f0.entry.js +0 -4
  346. package/dist/ionic/p-48c59094.system.entry.js +0 -4
  347. package/dist/ionic/p-494e75ad.js +0 -4
  348. package/dist/ionic/p-561cc050.system.js +0 -4
  349. package/dist/ionic/p-671dbd61.js +0 -4
  350. package/dist/ionic/p-70dcf429.js +0 -4
  351. package/dist/ionic/p-710cea83.system.js +0 -4
  352. package/dist/ionic/p-7b44e419.js +0 -4
  353. package/dist/ionic/p-80a9b397.entry.js +0 -4
  354. package/dist/ionic/p-8ddfecbf.entry.js +0 -4
  355. package/dist/ionic/p-9c6787e2.entry.js +0 -4
  356. package/dist/ionic/p-a11c1aff.system.entry.js +0 -4
  357. package/dist/ionic/p-a31099a4.entry.js +0 -4
  358. package/dist/ionic/p-a6bc00ab.entry.js +0 -4
  359. package/dist/ionic/p-ac668fb8.entry.js +0 -4
  360. package/dist/ionic/p-ad4b4f73.system.entry.js +0 -4
  361. package/dist/ionic/p-b8c3f071.system.js +0 -4
  362. package/dist/ionic/p-be0f6600.system.js +0 -4
  363. package/dist/ionic/p-c2db1374.system.js +0 -4
  364. package/dist/ionic/p-c3547c7a.system.js +0 -4
  365. package/dist/ionic/p-c700acef.system.js +0 -4
  366. package/dist/ionic/p-d4fba36b.system.entry.js +0 -4
  367. package/dist/ionic/p-e5b8f2f7.js +0 -4
  368. package/dist/ionic/p-edd07654.system.entry.js +0 -4
  369. package/dist/ionic/p-f43f4102.entry.js +0 -4
  370. package/dist/ionic/p-f5d78105.entry.js +0 -4
  371. package/dist/ionic/p-f7769c83.js +0 -4
  372. package/dist/ionic/p-fcc23f25.system.entry.js +0 -4
  373. package/dist/ionic/p-fdcf04c3.system.entry.js +0 -4
  374. package/dist/types/components/toast/gestures/swipe-to-dismiss.d.ts +0 -9
  375. package/dist/types/utils/forms/compare-with-utils.d.ts +0 -18
  376. /package/dist/esm-es5/{index-a5d50daf.js → index-7a14ecec.js} +0 -0
  377. /package/dist/ionic/{p-792919fd.system.js → p-0e94957a.system.js} +0 -0
  378. /package/dist/ionic/{p-7b30edcc.js → p-b347cfd1.js} +0 -0
@@ -5,107 +5,18 @@
5
5
 
6
6
  Object.defineProperty(exports, '__esModule', { value: true });
7
7
 
8
- const index$3 = require('./index-c2940dc1.js');
8
+ const index$2 = require('./index-c2940dc1.js');
9
9
  const config = require('./config-d5882735.js');
10
10
  const helpers = require('./helpers-ea4ccbcb.js');
11
11
  const lockController = require('./lock-controller-4ae2eb59.js');
12
12
  const index$1 = require('./index-cc7dfb7c.js');
13
- const overlays = require('./overlays-4d8897dc.js');
13
+ const overlays = require('./overlays-2ffc5f27.js');
14
14
  const theme = require('./theme-fbc56b3b.js');
15
15
  const ionicGlobal = require('./ionic-global-ea2901a3.js');
16
- const animation = require('./animation-d101aa7a.js');
17
- const index = require('./index-c8d52405.js');
18
- const index$2 = require('./index-0ee995e4.js');
16
+ const animation = require('./animation-1083855c.js');
17
+ const index = require('./index-306a7476.js');
19
18
  require('./framework-delegate-c0873a6f.js');
20
19
  require('./hardware-back-button-b67c8e75.js');
21
- require('./gesture-controller-b46721be.js');
22
-
23
- /**
24
- * Calculate the CSS top and bottom position of the toast, to be used
25
- * as starting points for the animation keyframes.
26
- *
27
- * The default animations for both MD and iOS
28
- * use translateY, which calculates from the
29
- * top edge of the screen. This behavior impacts
30
- * how we compute the offset when a toast has
31
- * position='bottom' since we need to calculate from
32
- * the bottom edge of the screen instead.
33
- *
34
- * @param position The value of the toast's position prop.
35
- * @param positionAnchor The element the toast should be anchored to,
36
- * if applicable.
37
- * @param mode The toast component's mode (md, ios, etc).
38
- * @param toast A reference to the toast element itself.
39
- */
40
- function getAnimationPosition(position, positionAnchor, mode, toast) {
41
- /**
42
- * Start with a predefined offset from the edge the toast will be
43
- * positioned relative to, whether on the screen or anchor element.
44
- */
45
- let offset;
46
- if (mode === 'md') {
47
- offset = position === 'top' ? 8 : -8;
48
- }
49
- else {
50
- offset = position === 'top' ? 10 : -10;
51
- }
52
- /**
53
- * If positionAnchor is defined, add in the distance from the target
54
- * screen edge to the target anchor edge. For position="top", the
55
- * bottom anchor edge is targeted. For position="bottom", the top
56
- * anchor edge is targeted.
57
- */
58
- if (positionAnchor && index.win) {
59
- warnIfAnchorIsHidden(positionAnchor, toast);
60
- const box = positionAnchor.getBoundingClientRect();
61
- if (position === 'top') {
62
- offset += box.bottom;
63
- }
64
- else if (position === 'bottom') {
65
- /**
66
- * Just box.top is the distance from the top edge of the screen
67
- * to the top edge of the anchor. We want to calculate from the
68
- * bottom edge of the screen instead.
69
- */
70
- offset -= index.win.innerHeight - box.top;
71
- }
72
- /**
73
- * We don't include safe area here because that should already be
74
- * accounted for when checking the position of the anchor.
75
- */
76
- return {
77
- top: `${offset}px`,
78
- bottom: `${offset}px`,
79
- };
80
- }
81
- else {
82
- return {
83
- top: `calc(${offset}px + var(--ion-safe-area-top, 0px))`,
84
- bottom: `calc(${offset}px - var(--ion-safe-area-bottom, 0px))`,
85
- };
86
- }
87
- }
88
- /**
89
- * If the anchor element is hidden, getBoundingClientRect()
90
- * will return all 0s for it, which can cause unexpected
91
- * results in the position calculation when animating.
92
- */
93
- function warnIfAnchorIsHidden(positionAnchor, toast) {
94
- if (positionAnchor.offsetParent === null) {
95
- index$1.printIonWarning('The positionAnchor element for ion-toast was found in the DOM, but appears to be hidden. This may lead to unexpected positioning of the toast.', toast);
96
- }
97
- }
98
- /**
99
- * Returns the top offset required to place
100
- * the toast in the middle of the screen.
101
- * Only needed when position="toast".
102
- * @param toastHeight - The height of the ion-toast element
103
- * @param wrapperHeight - The height of the .toast-wrapper element
104
- * inside the toast's shadow root.
105
- */
106
- const getOffsetForMiddlePosition = (toastHeight, wrapperHeight) => {
107
- return Math.floor(toastHeight / 2 - wrapperHeight / 2);
108
- };
109
20
 
110
21
  /**
111
22
  * iOS Toast Enter Animation
@@ -122,7 +33,7 @@ const iosEnterAnimation = (baseEl, opts) => {
122
33
  wrapperAnimation.fromTo('transform', 'translateY(-100%)', `translateY(${top})`);
123
34
  break;
124
35
  case 'middle':
125
- const topPosition = getOffsetForMiddlePosition(baseEl.clientHeight, wrapperEl.clientHeight);
36
+ const topPosition = Math.floor(baseEl.clientHeight / 2 - wrapperEl.clientHeight / 2);
126
37
  wrapperEl.style.top = `${topPosition}px`;
127
38
  wrapperAnimation.fromTo('opacity', 0.01, 1);
128
39
  break;
@@ -169,16 +80,16 @@ const mdEnterAnimation = (baseEl, opts) => {
169
80
  wrapperAnimation.addElement(wrapperEl);
170
81
  switch (position) {
171
82
  case 'top':
172
- wrapperEl.style.setProperty('transform', `translateY(${top})`);
83
+ wrapperEl.style.top = top;
173
84
  wrapperAnimation.fromTo('opacity', 0.01, 1);
174
85
  break;
175
86
  case 'middle':
176
- const topPosition = getOffsetForMiddlePosition(baseEl.clientHeight, wrapperEl.clientHeight);
87
+ const topPosition = Math.floor(baseEl.clientHeight / 2 - wrapperEl.clientHeight / 2);
177
88
  wrapperEl.style.top = `${topPosition}px`;
178
89
  wrapperAnimation.fromTo('opacity', 0.01, 1);
179
90
  break;
180
91
  default:
181
- wrapperEl.style.setProperty('transform', `translateY(${bottom})`);
92
+ wrapperEl.style.bottom = bottom;
182
93
  wrapperAnimation.fromTo('opacity', 0.01, 1);
183
94
  break;
184
95
  }
@@ -198,277 +109,101 @@ const mdLeaveAnimation = (baseEl) => {
198
109
  };
199
110
 
200
111
  /**
201
- * Create a gesture that allows the Toast
202
- * to be swiped to dismiss.
203
- * @param el - The Toast element
204
- * @param toastPosition - The last computed position of the Toast. This is computed in the "present" method.
205
- * @param onDismiss - A callback to fire when the Toast was swiped to dismiss.
112
+ * Calculate the CSS top and bottom position of the toast, to be used
113
+ * as starting points for the animation keyframes.
114
+ *
115
+ * Note that MD animates bottom-positioned toasts using style.bottom,
116
+ * which calculates from the bottom edge of the screen, while iOS uses
117
+ * translateY, which calculates from the top edge of the screen. This
118
+ * is why the bottom calculates differ slightly between modes.
119
+ *
120
+ * @param position The value of the toast's position prop.
121
+ * @param positionAnchor The element the toast should be anchored to,
122
+ * if applicable.
123
+ * @param mode The toast component's mode (md, ios, etc).
124
+ * @param toast A reference to the toast element itself.
206
125
  */
207
- const createSwipeToDismissGesture = (el, toastPosition, onDismiss) => {
208
- /**
209
- * Users should swipe on the visible toast wrapper
210
- * rather than on ion-toast which covers the entire screen.
211
- * When testing the class instance the inner wrapper will not
212
- * be defined. As a result, we use a placeholder element in those environments.
213
- */
214
- const wrapperEl = helpers.getElementRoot(el).querySelector('.toast-wrapper');
215
- const hostElHeight = el.clientHeight;
216
- const wrapperElBox = wrapperEl.getBoundingClientRect();
217
- /**
218
- * The maximum amount that
219
- * the toast can be swiped. This should
220
- * account for the wrapper element's height
221
- * too so the toast can be swiped offscreen
222
- * completely.
223
- */
224
- let MAX_SWIPE_DISTANCE = 0;
225
- /**
226
- * The step value at which a toast
227
- * is eligible for dismissing via gesture.
228
- */
229
- const DISMISS_THRESHOLD = 0.5;
230
- /**
231
- * The middle position Toast starts 50% of the way
232
- * through the animation, so we need to use this
233
- * as the starting point for our step values.
234
- */
235
- const STEP_OFFSET = el.position === 'middle' ? 0.5 : 0;
126
+ function getAnimationPosition(position, positionAnchor, mode, toast) {
236
127
  /**
237
- * When the Toast is at the top users will be
238
- * swiping up. As a result, the delta values will be
239
- * negative numbers which will result in negative steps
240
- * and thresholds. As a result, we need to make those numbers
241
- * positive.
128
+ * Start with a predefined offset from the edge the toast will be
129
+ * positioned relative to, whether on the screen or anchor element.
242
130
  */
243
- const INVERSION_FACTOR = el.position === 'top' ? -1 : 1;
131
+ let offset;
132
+ if (mode === 'md') {
133
+ offset = 8;
134
+ }
135
+ else {
136
+ offset = position === 'top' ? 10 : -10;
137
+ }
244
138
  /**
245
- * The top offset that places the
246
- * toast in the middle of the screen.
247
- * Only needed when position="middle".
139
+ * If positionAnchor is defined, add in the distance from the target
140
+ * screen edge to the target anchor edge. For position="top", the
141
+ * bottom anchor edge is targeted. For position="bottom", the top
142
+ * anchor edge is targeted.
248
143
  */
249
- const topPosition = getOffsetForMiddlePosition(hostElHeight, wrapperElBox.height);
250
- const SWIPE_UP_DOWN_KEYFRAMES = [
251
- { offset: 0, transform: `translateY(-${topPosition + wrapperElBox.height}px)` },
252
- { offset: 0.5, transform: `translateY(0px)` },
253
- { offset: 1, transform: `translateY(${topPosition + wrapperElBox.height}px)` },
254
- ];
255
- const swipeAnimation = animation.createAnimation('toast-swipe-to-dismiss-animation')
256
- .addElement(wrapperEl)
257
- /**
258
- * The specific value here does not actually
259
- * matter. We just need this to be a positive
260
- * value so the animation does not jump
261
- * to the end when the user beings to drag.
262
- */
263
- .duration(100);
264
- switch (el.position) {
265
- case 'middle':
266
- MAX_SWIPE_DISTANCE = hostElHeight + wrapperElBox.height;
267
- swipeAnimation.keyframes(SWIPE_UP_DOWN_KEYFRAMES);
268
- /**
269
- * Toast can be swiped up or down but
270
- * should start in the middle of the screen.
271
- */
272
- swipeAnimation.progressStart(true, 0.5);
273
- break;
274
- case 'top':
275
- /**
276
- * The bottom edge of the wrapper
277
- * includes the distance between the top
278
- * of the screen and the top of the wrapper
279
- * as well as the wrapper height so the wrapper
280
- * can be dragged fully offscreen.
281
- */
282
- MAX_SWIPE_DISTANCE = wrapperElBox.bottom;
283
- swipeAnimation.keyframes([
284
- { offset: 0, transform: `translateY(${toastPosition.top})` },
285
- { offset: 1, transform: 'translateY(-100%)' },
286
- ]);
287
- swipeAnimation.progressStart(true, 0);
288
- break;
289
- case 'bottom':
290
- default:
291
- /**
292
- * This computes the distance between the
293
- * top of the wrapper and the bottom of the
294
- * screen including the height of the wrapper
295
- * element so it can be dragged fully offscreen.
296
- */
297
- MAX_SWIPE_DISTANCE = hostElHeight - wrapperElBox.top;
298
- swipeAnimation.keyframes([
299
- { offset: 0, transform: `translateY(${toastPosition.bottom})` },
300
- { offset: 1, transform: 'translateY(100%)' },
301
- ]);
302
- swipeAnimation.progressStart(true, 0);
303
- break;
304
- }
305
- const computeStep = (delta) => {
306
- return (delta * INVERSION_FACTOR) / MAX_SWIPE_DISTANCE;
307
- };
308
- const onMove = (detail) => {
309
- const step = STEP_OFFSET + computeStep(detail.deltaY);
310
- swipeAnimation.progressStep(step);
311
- };
312
- const onEnd = (detail) => {
313
- const velocity = detail.velocityY;
314
- const threshold = ((detail.deltaY + velocity * 1000) / MAX_SWIPE_DISTANCE) * INVERSION_FACTOR;
315
- /**
316
- * Disable the gesture for the remainder of the animation.
317
- * It will be re-enabled if the toast animates back to
318
- * its initial presented position.
319
- */
320
- gesture.enable(false);
321
- let shouldDismiss = true;
322
- let playTo = 1;
323
- let step = 0;
324
- let remainingDistance = 0;
325
- if (el.position === 'middle') {
326
- /**
327
- * A middle positioned Toast appears
328
- * in the middle of the screen (at animation offset 0.5).
329
- * As a result, the threshold will be calculated relative
330
- * to this starting position. In other words at animation offset 0.5
331
- * the threshold will be 0. We want the middle Toast to be eligible
332
- * for dismiss when the user has swiped either half way up or down the
333
- * screen. As a result, we divide DISMISS_THRESHOLD in half. We also
334
- * consider when the threshold is a negative in the event the
335
- * user drags up (since the deltaY will also be negative).
336
- */
337
- shouldDismiss = threshold >= DISMISS_THRESHOLD / 2 || threshold <= -DISMISS_THRESHOLD / 2;
338
- /**
339
- * Since we are replacing the keyframes
340
- * below the animation always starts from
341
- * the beginning of the new keyframes.
342
- * Similarly, we are always playing to
343
- * the end of the new keyframes.
344
- */
345
- playTo = 1;
346
- step = 0;
347
- /**
348
- * The Toast should animate from wherever its
349
- * current position is to the desired end state.
350
- *
351
- * To begin, we get the current position of the
352
- * Toast for its starting state.
353
- */
354
- const wrapperElBox = wrapperEl.getBoundingClientRect();
355
- const startOffset = wrapperElBox.top - topPosition;
356
- const startPosition = `${startOffset}px`;
357
- /**
358
- * If the deltaY is negative then the user is swiping
359
- * up, so the Toast should animate to the top of the screen.
360
- * If the deltaY is positive then the user is swiping
361
- * down, so the Toast should animate to the bottom of the screen.
362
- * We also account for when the deltaY is 0, but realistically
363
- * that should never happen because it means the user did not drag
364
- * the toast.
365
- */
366
- const offsetFactor = detail.deltaY <= 0 ? -1 : 1;
367
- const endOffset = (topPosition + wrapperElBox.height) * offsetFactor;
368
- /**
369
- * If the Toast should dismiss
370
- * then we need to figure out which edge of
371
- * the screen it should animate towards.
372
- * By default, the Toast will come
373
- * back to its default state in the
374
- * middle of the screen.
375
- */
376
- const endPosition = shouldDismiss ? `${endOffset}px` : '0px';
377
- const KEYFRAMES = [
378
- { offset: 0, transform: `translateY(${startPosition})` },
379
- { offset: 1, transform: `translateY(${endPosition})` },
380
- ];
381
- swipeAnimation.keyframes(KEYFRAMES);
382
- /**
383
- * Compute the remaining amount of pixels the
384
- * toast needs to move to be fully dismissed.
385
- */
386
- remainingDistance = endOffset - startOffset;
144
+ if (positionAnchor && index.win) {
145
+ warnIfAnchorIsHidden(positionAnchor, toast);
146
+ const box = positionAnchor.getBoundingClientRect();
147
+ if (position === 'top') {
148
+ offset += box.bottom;
387
149
  }
388
- else {
389
- shouldDismiss = threshold >= DISMISS_THRESHOLD;
390
- playTo = shouldDismiss ? 1 : 0;
391
- step = computeStep(detail.deltaY);
150
+ else if (position === 'bottom') {
392
151
  /**
393
- * Compute the remaining amount of pixels the
394
- * toast needs to move to be fully dismissed.
152
+ * Just box.top is the distance from the top edge of the screen
153
+ * to the top edge of the anchor. We want to calculate from the
154
+ * bottom edge of the screen instead.
395
155
  */
396
- const remainingStepAmount = shouldDismiss ? 1 - step : step;
397
- remainingDistance = remainingStepAmount * MAX_SWIPE_DISTANCE;
398
- }
399
- /**
400
- * The animation speed should depend on how quickly
401
- * the user flicks the toast across the screen. However,
402
- * it should be no slower than 200ms.
403
- * We use Math.abs on the remainingDistance because that value
404
- * can be negative when swiping up on a middle position toast.
405
- */
406
- const duration = Math.min(Math.abs(remainingDistance) / Math.abs(velocity), 200);
407
- swipeAnimation
408
- .onFinish(() => {
409
- if (shouldDismiss) {
410
- onDismiss();
411
- swipeAnimation.destroy();
156
+ if (mode === 'md') {
157
+ offset += index.win.innerHeight - box.top;
412
158
  }
413
159
  else {
414
- if (el.position === 'middle') {
415
- /**
416
- * If the toast snapped back to
417
- * the middle of the screen we need
418
- * to reset the keyframes
419
- * so the toast can be swiped
420
- * up or down again.
421
- */
422
- swipeAnimation.keyframes(SWIPE_UP_DOWN_KEYFRAMES).progressStart(true, 0.5);
423
- }
424
- else {
425
- swipeAnimation.progressStart(true, 0);
426
- }
427
- /**
428
- * If the toast did not dismiss then
429
- * the user should be able to swipe again.
430
- */
431
- gesture.enable(true);
160
+ offset -= index.win.innerHeight - box.top;
432
161
  }
433
- /**
434
- * This must be a one time callback
435
- * otherwise a new callback will
436
- * be added every time onEnd runs.
437
- */
438
- }, { oneTimeCallback: true })
439
- .progressEnd(playTo, step, duration);
440
- };
441
- const gesture = index$2.createGesture({
442
- el: wrapperEl,
443
- gestureName: 'toast-swipe-to-dismiss',
444
- gesturePriority: overlays.OVERLAY_GESTURE_PRIORITY,
162
+ }
445
163
  /**
446
- * Toast only supports vertical swipes.
447
- * This needs to be updated if we later
448
- * support horizontal swipes.
164
+ * We don't include safe area here because that should already be
165
+ * accounted for when checking the position of the anchor.
449
166
  */
450
- direction: 'y',
451
- onMove,
452
- onEnd,
453
- });
454
- return gesture;
455
- };
167
+ return {
168
+ top: `${offset}px`,
169
+ bottom: `${offset}px`,
170
+ };
171
+ }
172
+ else {
173
+ return {
174
+ top: `calc(${offset}px + var(--ion-safe-area-top, 0px))`,
175
+ bottom: mode === 'md'
176
+ ? `calc(${offset}px + var(--ion-safe-area-bottom, 0px))`
177
+ : `calc(${offset}px - var(--ion-safe-area-bottom, 0px))`,
178
+ };
179
+ }
180
+ }
181
+ /**
182
+ * If the anchor element is hidden, getBoundingClientRect()
183
+ * will return all 0s for it, which can cause unexpected
184
+ * results in the position calculation when animating.
185
+ */
186
+ function warnIfAnchorIsHidden(positionAnchor, toast) {
187
+ if (positionAnchor.offsetParent === null) {
188
+ index$1.printIonWarning('The positionAnchor element for ion-toast was found in the DOM, but appears to be hidden. This may lead to unexpected positioning of the toast.', toast);
189
+ }
190
+ }
456
191
 
457
- const toastIosCss = ":host{--border-width:0;--border-style:none;--border-color:initial;--box-shadow:none;--min-width:auto;--width:auto;--min-height:auto;--height:auto;--max-height:auto;--white-space:normal;top:0;display:block;position:absolute;width:100%;height:100%;outline:none;color:var(--color);font-family:var(--ion-font-family, inherit);contain:strict;z-index:1001;pointer-events:none}@supports (inset-inline-start: 0){:host{inset-inline-start:0}}@supports not (inset-inline-start: 0){:host{left:0}:host-context([dir=rtl]){left:unset;right:unset;right:0}@supports selector(:dir(rtl)){:host(:dir(rtl)){left:unset;right:unset;right:0}}}:host(.overlay-hidden){display:none}:host(.ion-color){--button-color:inherit;color:var(--ion-color-contrast)}:host(.ion-color) .toast-button-cancel{color:inherit}:host(.ion-color) .toast-wrapper{background:var(--ion-color-base)}.toast-wrapper{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow)}@supports (inset-inline-start: 0){.toast-wrapper{inset-inline-start:var(--start);inset-inline-end:var(--end)}}@supports not (inset-inline-start: 0){.toast-wrapper{left:var(--start);right:var(--end)}:host-context([dir=rtl]) .toast-wrapper{left:unset;right:unset;left:var(--end);right:var(--start)}[dir=rtl] .toast-wrapper{left:unset;right:unset;left:var(--end);right:var(--start)}@supports selector(:dir(rtl)){.toast-wrapper:dir(rtl){left:unset;right:unset;left:var(--end);right:var(--start)}}}.toast-wrapper.toast-top{-webkit-transform:translate3d(0, -100%, 0);transform:translate3d(0, -100%, 0);top:0}.toast-wrapper.toast-bottom{-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0);bottom:0}.toast-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;pointer-events:auto;height:inherit;min-height:inherit;max-height:inherit;contain:content}.toast-layout-stacked .toast-container{-ms-flex-wrap:wrap;flex-wrap:wrap}.toast-layout-baseline .toast-content{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center}.toast-icon{-webkit-margin-start:16px;margin-inline-start:16px}.toast-content{min-width:0}.toast-message{-ms-flex:1;flex:1;white-space:var(--white-space)}.toast-button-group{display:-ms-flexbox;display:flex}.toast-layout-stacked .toast-button-group{-ms-flex-pack:end;justify-content:end;width:100%}.toast-button{border:0;outline:none;color:var(--button-color);z-index:0}.toast-icon,.toast-button-icon{font-size:1.4em}.toast-button-inner{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}@media (any-hover: hover){.toast-button:hover{cursor:pointer}}:host{--background:var(--ion-color-step-50, #f2f2f2);--border-radius:14px;--button-color:var(--ion-color-primary, #3880ff);--color:var(--ion-color-step-850, #262626);--max-width:700px;--max-height:478px;--start:10px;--end:10px;font-size:clamp(14px, 0.875rem, 43.4px)}.toast-wrapper{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:auto;margin-bottom:auto;display:block;position:absolute;z-index:10}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){:host(.toast-translucent) .toast-wrapper{background:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}:host(.ion-color.toast-translucent) .toast-wrapper{background:rgba(var(--ion-color-base-rgb), 0.8)}}.toast-wrapper.toast-middle{opacity:0.01}.toast-content{-webkit-padding-start:15px;padding-inline-start:15px;-webkit-padding-end:15px;padding-inline-end:15px;padding-top:15px;padding-bottom:15px}.toast-header{margin-bottom:2px;font-weight:500}.toast-button{-webkit-padding-start:15px;padding-inline-start:15px;-webkit-padding-end:15px;padding-inline-end:15px;padding-top:10px;padding-bottom:10px;min-height:44px;-webkit-transition:background-color, opacity 100ms linear;transition:background-color, opacity 100ms linear;border:0;background-color:transparent;font-family:var(--ion-font-family);font-size:clamp(17px, 1.0625rem, 21.998px);font-weight:500;overflow:hidden}.toast-button.ion-activated{opacity:0.4}@media (any-hover: hover){.toast-button:hover{opacity:0.6}}";
192
+ const toastIosCss = ":host{--border-width:0;--border-style:none;--border-color:initial;--box-shadow:none;--min-width:auto;--width:auto;--min-height:auto;--height:auto;--max-height:auto;--white-space:normal;top:0;display:block;position:absolute;width:100%;height:100%;outline:none;color:var(--color);font-family:var(--ion-font-family, inherit);contain:strict;z-index:1001;pointer-events:none}@supports (inset-inline-start: 0){:host{inset-inline-start:0}}@supports not (inset-inline-start: 0){:host{left:0}:host-context([dir=rtl]){left:unset;right:unset;right:0}@supports selector(:dir(rtl)){:host(:dir(rtl)){left:unset;right:unset;right:0}}}:host(.overlay-hidden){display:none}:host(.ion-color){--button-color:inherit;color:var(--ion-color-contrast)}:host(.ion-color) .toast-button-cancel{color:inherit}:host(.ion-color) .toast-wrapper{background:var(--ion-color-base)}.toast-wrapper{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow)}@supports (inset-inline-start: 0){.toast-wrapper{inset-inline-start:var(--start);inset-inline-end:var(--end)}}@supports not (inset-inline-start: 0){.toast-wrapper{left:var(--start);right:var(--end)}:host-context([dir=rtl]) .toast-wrapper{left:unset;right:unset;left:var(--end);right:var(--start)}[dir=rtl] .toast-wrapper{left:unset;right:unset;left:var(--end);right:var(--start)}@supports selector(:dir(rtl)){.toast-wrapper:dir(rtl){left:unset;right:unset;left:var(--end);right:var(--start)}}}.toast-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;pointer-events:auto;height:inherit;min-height:inherit;max-height:inherit;contain:content}.toast-layout-stacked .toast-container{-ms-flex-wrap:wrap;flex-wrap:wrap}.toast-layout-baseline .toast-content{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center}.toast-icon{-webkit-margin-start:16px;margin-inline-start:16px}.toast-content{min-width:0}.toast-message{-ms-flex:1;flex:1;white-space:var(--white-space)}.toast-button-group{display:-ms-flexbox;display:flex}.toast-layout-stacked .toast-button-group{-ms-flex-pack:end;justify-content:end;width:100%}.toast-button{border:0;outline:none;color:var(--button-color);z-index:0}.toast-icon,.toast-button-icon{font-size:1.4em}.toast-button-inner{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}@media (any-hover: hover){.toast-button:hover{cursor:pointer}}:host{--background:var(--ion-color-step-50, #f2f2f2);--border-radius:14px;--button-color:var(--ion-color-primary, #3880ff);--color:var(--ion-color-step-850, #262626);--max-width:700px;--max-height:478px;--start:10px;--end:10px;font-size:clamp(14px, 0.875rem, 43.4px)}.toast-wrapper{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:auto;margin-bottom:auto;display:block;position:absolute;z-index:10}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){:host(.toast-translucent) .toast-wrapper{background:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}:host(.ion-color.toast-translucent) .toast-wrapper{background:rgba(var(--ion-color-base-rgb), 0.8)}}.toast-wrapper.toast-top{-webkit-transform:translate3d(0, -100%, 0);transform:translate3d(0, -100%, 0);top:0}.toast-wrapper.toast-middle{opacity:0.01}.toast-wrapper.toast-bottom{-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0);bottom:0}.toast-content{-webkit-padding-start:15px;padding-inline-start:15px;-webkit-padding-end:15px;padding-inline-end:15px;padding-top:15px;padding-bottom:15px}.toast-header{margin-bottom:2px;font-weight:500}.toast-button{-webkit-padding-start:15px;padding-inline-start:15px;-webkit-padding-end:15px;padding-inline-end:15px;padding-top:10px;padding-bottom:10px;min-height:44px;-webkit-transition:background-color, opacity 100ms linear;transition:background-color, opacity 100ms linear;border:0;background-color:transparent;font-family:var(--ion-font-family);font-size:clamp(17px, 1.0625rem, 21.998px);font-weight:500;overflow:hidden}.toast-button.ion-activated{opacity:0.4}@media (any-hover: hover){.toast-button:hover{opacity:0.6}}";
458
193
 
459
- const toastMdCss = ":host{--border-width:0;--border-style:none;--border-color:initial;--box-shadow:none;--min-width:auto;--width:auto;--min-height:auto;--height:auto;--max-height:auto;--white-space:normal;top:0;display:block;position:absolute;width:100%;height:100%;outline:none;color:var(--color);font-family:var(--ion-font-family, inherit);contain:strict;z-index:1001;pointer-events:none}@supports (inset-inline-start: 0){:host{inset-inline-start:0}}@supports not (inset-inline-start: 0){:host{left:0}:host-context([dir=rtl]){left:unset;right:unset;right:0}@supports selector(:dir(rtl)){:host(:dir(rtl)){left:unset;right:unset;right:0}}}:host(.overlay-hidden){display:none}:host(.ion-color){--button-color:inherit;color:var(--ion-color-contrast)}:host(.ion-color) .toast-button-cancel{color:inherit}:host(.ion-color) .toast-wrapper{background:var(--ion-color-base)}.toast-wrapper{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow)}@supports (inset-inline-start: 0){.toast-wrapper{inset-inline-start:var(--start);inset-inline-end:var(--end)}}@supports not (inset-inline-start: 0){.toast-wrapper{left:var(--start);right:var(--end)}:host-context([dir=rtl]) .toast-wrapper{left:unset;right:unset;left:var(--end);right:var(--start)}[dir=rtl] .toast-wrapper{left:unset;right:unset;left:var(--end);right:var(--start)}@supports selector(:dir(rtl)){.toast-wrapper:dir(rtl){left:unset;right:unset;left:var(--end);right:var(--start)}}}.toast-wrapper.toast-top{-webkit-transform:translate3d(0, -100%, 0);transform:translate3d(0, -100%, 0);top:0}.toast-wrapper.toast-bottom{-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0);bottom:0}.toast-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;pointer-events:auto;height:inherit;min-height:inherit;max-height:inherit;contain:content}.toast-layout-stacked .toast-container{-ms-flex-wrap:wrap;flex-wrap:wrap}.toast-layout-baseline .toast-content{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center}.toast-icon{-webkit-margin-start:16px;margin-inline-start:16px}.toast-content{min-width:0}.toast-message{-ms-flex:1;flex:1;white-space:var(--white-space)}.toast-button-group{display:-ms-flexbox;display:flex}.toast-layout-stacked .toast-button-group{-ms-flex-pack:end;justify-content:end;width:100%}.toast-button{border:0;outline:none;color:var(--button-color);z-index:0}.toast-icon,.toast-button-icon{font-size:1.4em}.toast-button-inner{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}@media (any-hover: hover){.toast-button:hover{cursor:pointer}}:host{--background:var(--ion-color-step-800, #333333);--border-radius:4px;--box-shadow:0 3px 5px -1px rgba(0, 0, 0, 0.2), 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0, 0, 0, 0.12);--button-color:var(--ion-color-primary, #3880ff);--color:var(--ion-color-step-50, #f2f2f2);--max-width:700px;--start:8px;--end:8px;font-size:0.875rem}.toast-wrapper{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:auto;margin-bottom:auto;display:block;position:absolute;opacity:0.01;z-index:10}.toast-content{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:14px;padding-bottom:14px}.toast-header{margin-bottom:2px;font-weight:500;line-height:1.25rem}.toast-message{line-height:1.25rem}.toast-layout-baseline .toast-button-group-start{-webkit-margin-start:8px;margin-inline-start:8px}.toast-layout-stacked .toast-button-group-start{-webkit-margin-end:8px;margin-inline-end:8px;margin-top:8px}.toast-layout-baseline .toast-button-group-end{-webkit-margin-end:8px;margin-inline-end:8px}.toast-layout-stacked .toast-button-group-end{-webkit-margin-end:8px;margin-inline-end:8px;margin-bottom:8px}.toast-button{-webkit-padding-start:15px;padding-inline-start:15px;-webkit-padding-end:15px;padding-inline-end:15px;padding-top:10px;padding-bottom:10px;position:relative;background-color:transparent;font-family:var(--ion-font-family);font-size:0.875rem;font-weight:500;letter-spacing:0.84px;text-transform:uppercase;overflow:hidden}.toast-button-cancel{color:var(--ion-color-step-100, #e6e6e6)}.toast-button-icon-only{border-radius:50%;-webkit-padding-start:9px;padding-inline-start:9px;-webkit-padding-end:9px;padding-inline-end:9px;padding-top:9px;padding-bottom:9px;width:36px;height:36px}@media (any-hover: hover){.toast-button:hover{background-color:rgba(var(--ion-color-primary-rgb, 56, 128, 255), 0.08)}.toast-button-cancel:hover{background-color:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.08)}}";
194
+ const toastMdCss = ":host{--border-width:0;--border-style:none;--border-color:initial;--box-shadow:none;--min-width:auto;--width:auto;--min-height:auto;--height:auto;--max-height:auto;--white-space:normal;top:0;display:block;position:absolute;width:100%;height:100%;outline:none;color:var(--color);font-family:var(--ion-font-family, inherit);contain:strict;z-index:1001;pointer-events:none}@supports (inset-inline-start: 0){:host{inset-inline-start:0}}@supports not (inset-inline-start: 0){:host{left:0}:host-context([dir=rtl]){left:unset;right:unset;right:0}@supports selector(:dir(rtl)){:host(:dir(rtl)){left:unset;right:unset;right:0}}}:host(.overlay-hidden){display:none}:host(.ion-color){--button-color:inherit;color:var(--ion-color-contrast)}:host(.ion-color) .toast-button-cancel{color:inherit}:host(.ion-color) .toast-wrapper{background:var(--ion-color-base)}.toast-wrapper{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow)}@supports (inset-inline-start: 0){.toast-wrapper{inset-inline-start:var(--start);inset-inline-end:var(--end)}}@supports not (inset-inline-start: 0){.toast-wrapper{left:var(--start);right:var(--end)}:host-context([dir=rtl]) .toast-wrapper{left:unset;right:unset;left:var(--end);right:var(--start)}[dir=rtl] .toast-wrapper{left:unset;right:unset;left:var(--end);right:var(--start)}@supports selector(:dir(rtl)){.toast-wrapper:dir(rtl){left:unset;right:unset;left:var(--end);right:var(--start)}}}.toast-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;pointer-events:auto;height:inherit;min-height:inherit;max-height:inherit;contain:content}.toast-layout-stacked .toast-container{-ms-flex-wrap:wrap;flex-wrap:wrap}.toast-layout-baseline .toast-content{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center}.toast-icon{-webkit-margin-start:16px;margin-inline-start:16px}.toast-content{min-width:0}.toast-message{-ms-flex:1;flex:1;white-space:var(--white-space)}.toast-button-group{display:-ms-flexbox;display:flex}.toast-layout-stacked .toast-button-group{-ms-flex-pack:end;justify-content:end;width:100%}.toast-button{border:0;outline:none;color:var(--button-color);z-index:0}.toast-icon,.toast-button-icon{font-size:1.4em}.toast-button-inner{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}@media (any-hover: hover){.toast-button:hover{cursor:pointer}}:host{--background:var(--ion-color-step-800, #333333);--border-radius:4px;--box-shadow:0 3px 5px -1px rgba(0, 0, 0, 0.2), 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0, 0, 0, 0.12);--button-color:var(--ion-color-primary, #3880ff);--color:var(--ion-color-step-50, #f2f2f2);--max-width:700px;--start:8px;--end:8px;font-size:0.875rem}.toast-wrapper{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:auto;margin-bottom:auto;display:block;position:absolute;opacity:0.01;z-index:10}.toast-content{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:14px;padding-bottom:14px}.toast-header{margin-bottom:2px;font-weight:500;line-height:1.25rem}.toast-message{line-height:1.25rem}.toast-layout-baseline .toast-button-group-start{-webkit-margin-start:8px;margin-inline-start:8px}.toast-layout-stacked .toast-button-group-start{-webkit-margin-end:8px;margin-inline-end:8px;margin-top:8px}.toast-layout-baseline .toast-button-group-end{-webkit-margin-end:8px;margin-inline-end:8px}.toast-layout-stacked .toast-button-group-end{-webkit-margin-end:8px;margin-inline-end:8px;margin-bottom:8px}.toast-button{-webkit-padding-start:15px;padding-inline-start:15px;-webkit-padding-end:15px;padding-inline-end:15px;padding-top:10px;padding-bottom:10px;position:relative;background-color:transparent;font-family:var(--ion-font-family);font-size:0.875rem;font-weight:500;letter-spacing:0.84px;text-transform:uppercase;overflow:hidden}.toast-button-cancel{color:var(--ion-color-step-100, #e6e6e6)}.toast-button-icon-only{border-radius:50%;-webkit-padding-start:9px;padding-inline-start:9px;-webkit-padding-end:9px;padding-inline-end:9px;padding-top:9px;padding-bottom:9px;width:36px;height:36px}@media (any-hover: hover){.toast-button:hover{background-color:rgba(var(--ion-color-primary-rgb, 56, 128, 255), 0.08)}.toast-button-cancel:hover{background-color:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.08)}}";
460
195
 
461
196
  const Toast = class {
462
197
  constructor(hostRef) {
463
- index$3.registerInstance(this, hostRef);
464
- this.didPresent = index$3.createEvent(this, "ionToastDidPresent", 7);
465
- this.willPresent = index$3.createEvent(this, "ionToastWillPresent", 7);
466
- this.willDismiss = index$3.createEvent(this, "ionToastWillDismiss", 7);
467
- this.didDismiss = index$3.createEvent(this, "ionToastDidDismiss", 7);
468
- this.didPresentShorthand = index$3.createEvent(this, "didPresent", 7);
469
- this.willPresentShorthand = index$3.createEvent(this, "willPresent", 7);
470
- this.willDismissShorthand = index$3.createEvent(this, "willDismiss", 7);
471
- this.didDismissShorthand = index$3.createEvent(this, "didDismiss", 7);
198
+ index$2.registerInstance(this, hostRef);
199
+ this.didPresent = index$2.createEvent(this, "ionToastDidPresent", 7);
200
+ this.willPresent = index$2.createEvent(this, "ionToastWillPresent", 7);
201
+ this.willDismiss = index$2.createEvent(this, "ionToastWillDismiss", 7);
202
+ this.didDismiss = index$2.createEvent(this, "ionToastDidDismiss", 7);
203
+ this.didPresentShorthand = index$2.createEvent(this, "didPresent", 7);
204
+ this.willPresentShorthand = index$2.createEvent(this, "willPresent", 7);
205
+ this.willDismissShorthand = index$2.createEvent(this, "willDismiss", 7);
206
+ this.didDismissShorthand = index$2.createEvent(this, "didDismiss", 7);
472
207
  this.delegateController = overlays.createDelegateController(this);
473
208
  this.lockController = lockController.createLockController();
474
209
  this.triggerController = overlays.createTriggerController();
@@ -481,41 +216,6 @@ const Toast = class {
481
216
  this.callButtonHandler(cancelButton);
482
217
  }
483
218
  };
484
- /**
485
- * Create a new swipe gesture so Toast
486
- * can be swiped to dismiss.
487
- */
488
- this.createSwipeGesture = (toastPosition) => {
489
- const gesture = (this.gesture = createSwipeToDismissGesture(this.el, toastPosition, () => {
490
- /**
491
- * If the gesture completed then
492
- * we should dismiss the toast.
493
- */
494
- this.dismiss(undefined, overlays.GESTURE);
495
- }));
496
- gesture.enable(true);
497
- };
498
- /**
499
- * Destroy an existing swipe gesture
500
- * so Toast can no longer be swiped to dismiss.
501
- */
502
- this.destroySwipeGesture = () => {
503
- const { gesture } = this;
504
- if (gesture === undefined) {
505
- return;
506
- }
507
- gesture.destroy();
508
- this.gesture = undefined;
509
- };
510
- /**
511
- * Returns `true` if swipeGesture
512
- * is configured to a value that enables the swipe behavior.
513
- * Returns `false` otherwise.
514
- */
515
- this.prefersSwipeGesture = () => {
516
- const { swipeGesture } = this;
517
- return swipeGesture === 'vertical';
518
- };
519
219
  this.revealContentToScreenReader = false;
520
220
  this.overlayIndex = undefined;
521
221
  this.delegate = undefined;
@@ -536,37 +236,9 @@ const Toast = class {
536
236
  this.animated = true;
537
237
  this.icon = undefined;
538
238
  this.htmlAttributes = undefined;
539
- this.swipeGesture = undefined;
540
239
  this.isOpen = false;
541
240
  this.trigger = undefined;
542
241
  }
543
- swipeGestureChanged() {
544
- /**
545
- * If the Toast is presented, then we need to destroy
546
- * any actives gestures before a new gesture is potentially
547
- * created below.
548
- *
549
- * If the Toast is dismissed, then no gesture should be available
550
- * since the Toast is not visible. This case should never
551
- * happen since the "dismiss" method handles destroying
552
- * any active swipe gestures, but we keep this code
553
- * around to handle the first case.
554
- */
555
- this.destroySwipeGesture();
556
- /**
557
- * A new swipe gesture should only be created
558
- * if the Toast is presented. If the Toast is not
559
- * yet presented then the "present" method will
560
- * handle calling the swipe gesture setup function.
561
- */
562
- if (this.presented && this.prefersSwipeGesture()) {
563
- /**
564
- * If the Toast is presented then
565
- * lastPresentedPosition is defined.
566
- */
567
- this.createSwipeGesture(this.lastPresentedPosition);
568
- }
569
- }
570
242
  onIsOpenChange(newValue, oldValue) {
571
243
  if (newValue === true && oldValue === false) {
572
244
  this.present();
@@ -628,14 +300,6 @@ const Toast = class {
628
300
  if (this.duration > 0) {
629
301
  this.durationTimeout = setTimeout(() => this.dismiss(undefined, 'timeout'), this.duration);
630
302
  }
631
- /**
632
- * If the Toast has a swipe gesture then we can
633
- * create the gesture so users can swipe the
634
- * presented Toast.
635
- */
636
- if (this.prefersSwipeGesture()) {
637
- this.createSwipeGesture(animationPosition);
638
- }
639
303
  unlock();
640
304
  }
641
305
  /**
@@ -670,11 +334,6 @@ const Toast = class {
670
334
  this.revealContentToScreenReader = false;
671
335
  }
672
336
  this.lastPresentedPosition = undefined;
673
- /**
674
- * If the Toast has a swipe gesture then we can
675
- * safely destroy it now that it is dismissed.
676
- */
677
- this.destroySwipeGesture();
678
337
  unlock();
679
338
  return dismissed;
680
339
  }
@@ -773,7 +432,7 @@ const Toast = class {
773
432
  'toast-button-group': true,
774
433
  [`toast-button-group-${side}`]: true,
775
434
  };
776
- return (index$3.h("div", { class: buttonGroupsClasses }, buttons.map((b) => (index$3.h("button", Object.assign({}, b.htmlAttributes, { type: "button", class: buttonClass(b), tabIndex: 0, onClick: () => this.buttonClick(b), part: buttonPart(b) }), index$3.h("div", { class: "toast-button-inner" }, b.icon && (index$3.h("ion-icon", { "aria-hidden": "true", icon: b.icon, slot: b.text === undefined ? 'icon-only' : undefined, class: "toast-button-icon" })), b.text), mode === 'md' && (index$3.h("ion-ripple-effect", { type: b.icon !== undefined && b.text === undefined ? 'unbounded' : 'bounded' })))))));
435
+ return (index$2.h("div", { class: buttonGroupsClasses }, buttons.map((b) => (index$2.h("button", Object.assign({}, b.htmlAttributes, { type: "button", class: buttonClass(b), tabIndex: 0, onClick: () => this.buttonClick(b), part: buttonPart(b) }), index$2.h("div", { class: "toast-button-inner" }, b.icon && (index$2.h("ion-icon", { "aria-hidden": "true", icon: b.icon, slot: b.text === undefined ? 'icon-only' : undefined, class: "toast-button-icon" })), b.text), mode === 'md' && (index$2.h("ion-ripple-effect", { type: b.icon !== undefined && b.text === undefined ? 'unbounded' : 'bounded' })))))));
777
436
  }
778
437
  /**
779
438
  * Render the `message` property.
@@ -783,9 +442,9 @@ const Toast = class {
783
442
  renderToastMessage(key, ariaHidden = null) {
784
443
  const { customHTMLEnabled, message } = this;
785
444
  if (customHTMLEnabled) {
786
- return (index$3.h("div", { key: key, "aria-hidden": ariaHidden, class: "toast-message", part: "message", innerHTML: config.sanitizeDOMString(message) }));
445
+ return (index$2.h("div", { key: key, "aria-hidden": ariaHidden, class: "toast-message", part: "message", innerHTML: config.sanitizeDOMString(message) }));
787
446
  }
788
- return (index$3.h("div", { key: key, "aria-hidden": ariaHidden, class: "toast-message", part: "message" }, message));
447
+ return (index$2.h("div", { key: key, "aria-hidden": ariaHidden, class: "toast-message", part: "message" }, message));
789
448
  }
790
449
  /**
791
450
  * Render the `header` property.
@@ -793,7 +452,7 @@ const Toast = class {
793
452
  * @param ariaHidden - If "true" then content will be hidden from screen readers.
794
453
  */
795
454
  renderHeader(key, ariaHidden = null) {
796
- return (index$3.h("div", { key: key, class: "toast-header", "aria-hidden": ariaHidden, part: "header" }, this.header));
455
+ return (index$2.h("div", { key: key, class: "toast-header", "aria-hidden": ariaHidden, part: "header" }, this.header));
797
456
  }
798
457
  render() {
799
458
  const { layout, el, revealContentToScreenReader, header, message } = this;
@@ -813,13 +472,12 @@ const Toast = class {
813
472
  if (layout === 'stacked' && startButtons.length > 0 && endButtons.length > 0) {
814
473
  index$1.printIonWarning('This toast is using start and end buttons with the stacked toast layout. We recommend following the best practice of using either start or end buttons with the stacked toast layout.', el);
815
474
  }
816
- return (index$3.h(index$3.Host, Object.assign({ tabindex: "-1" }, this.htmlAttributes, { style: {
475
+ return (index$2.h(index$2.Host, Object.assign({ tabindex: "-1" }, this.htmlAttributes, { style: {
817
476
  zIndex: `${60000 + this.overlayIndex}`,
818
- }, class: theme.createColorClasses(this.color, Object.assign(Object.assign({ [mode]: true }, theme.getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent })), onIonToastWillDismiss: this.dispatchCancelHandler }), index$3.h("div", { class: wrapperClass }, index$3.h("div", { class: "toast-container", part: "container" }, this.renderButtons(startButtons, 'start'), this.icon !== undefined && (index$3.h("ion-icon", { class: "toast-icon", part: "icon", icon: this.icon, lazy: false, "aria-hidden": "true" })), index$3.h("div", { class: "toast-content", role: "status", "aria-atomic": "true", "aria-live": "polite" }, !revealContentToScreenReader && header !== undefined && this.renderHeader('oldHeader', 'true'), !revealContentToScreenReader && message !== undefined && this.renderToastMessage('oldMessage', 'true'), revealContentToScreenReader && header !== undefined && this.renderHeader('header'), revealContentToScreenReader && message !== undefined && this.renderToastMessage('header')), this.renderButtons(endButtons, 'end')))));
477
+ }, class: theme.createColorClasses(this.color, Object.assign(Object.assign({ [mode]: true }, theme.getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent })), onIonToastWillDismiss: this.dispatchCancelHandler }), index$2.h("div", { class: wrapperClass }, index$2.h("div", { class: "toast-container", part: "container" }, this.renderButtons(startButtons, 'start'), this.icon !== undefined && (index$2.h("ion-icon", { class: "toast-icon", part: "icon", icon: this.icon, lazy: false, "aria-hidden": "true" })), index$2.h("div", { class: "toast-content", role: "status", "aria-atomic": "true", "aria-live": "polite" }, !revealContentToScreenReader && header !== undefined && this.renderHeader('oldHeader', 'true'), !revealContentToScreenReader && message !== undefined && this.renderToastMessage('oldMessage', 'true'), revealContentToScreenReader && header !== undefined && this.renderHeader('header'), revealContentToScreenReader && message !== undefined && this.renderToastMessage('header')), this.renderButtons(endButtons, 'end')))));
819
478
  }
820
- get el() { return index$3.getElement(this); }
479
+ get el() { return index$2.getElement(this); }
821
480
  static get watchers() { return {
822
- "swipeGesture": ["swipeGestureChanged"],
823
481
  "isOpen": ["onIsOpenChange"],
824
482
  "trigger": ["triggerChanged"]
825
483
  }; }