@sparkle-learning/core 0.0.32 → 0.0.35

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 (611) hide show
  1. package/dist/cjs/PrivateRoute-4abc9d29.js +35 -0
  2. package/dist/cjs/{active-router-eedb3bfe.js → active-router-f9e18bd8.js} +1 -1
  3. package/dist/cjs/{animation-6132e37f.js → animation-ee586546.js} +83 -78
  4. package/dist/cjs/{app-globals-9869bf67.js → app-globals-33c9f31b.js} +1 -1
  5. package/dist/cjs/{PrivateRoute-043bb7d3.js → auth.service-4b584cd7.js} +4 -33
  6. package/dist/cjs/{auth.store-ff3fda09.js → auth.store-1e630a7d.js} +48 -725
  7. package/dist/cjs/compass-svg.cjs.entry.js +1 -1
  8. package/dist/cjs/context-consumer.cjs.entry.js +1 -1
  9. package/dist/cjs/course-select.cjs.entry.js +1 -1
  10. package/dist/cjs/{cubic-bezier-293f4663.js → cubic-bezier-53d26d05.js} +10 -11
  11. package/dist/cjs/dom-utils-b8befdd5.js +63 -0
  12. package/dist/cjs/{facilitator.service-faac5c0c.js → facilitator.service-9e990274.js} +8 -7
  13. package/dist/cjs/{feed.service-66405969.js → feed.service-b4f09441.js} +8 -7
  14. package/dist/cjs/{focus-visible-ad3828a7.js → focus-visible-b0b07ba6.js} +19 -6
  15. package/dist/cjs/{framework-delegate-2470a246.js → framework-delegate-59a98abd.js} +11 -13
  16. package/dist/cjs/{gesture-controller-07c31f70.js → gesture-controller-0eb5579e.js} +1 -1
  17. package/dist/cjs/{haptic-91e86eb7.js → haptic-780f33c4.js} +3 -2
  18. package/dist/cjs/{hardware-back-button-f7b5d99e.js → hardware-back-button-92d97ff8.js} +8 -8
  19. package/dist/cjs/header-mobile-collapse_2.cjs.entry.js +112 -0
  20. package/dist/cjs/{helpers-7e28976c.js → helpers-c2496722.js} +81 -14
  21. package/dist/cjs/httpService-7211d93b.js +685 -0
  22. package/dist/cjs/{icons-80d477f6.js → icons-c61db785.js} +1 -1
  23. package/dist/cjs/{index-43642662.js → index-12082cba.js} +21 -18
  24. package/dist/cjs/{index-459a5fa9.js → index-15ea05f5.js} +19 -28
  25. package/dist/cjs/{index-bae2a754.js → index-51e8292e.js} +18 -11
  26. package/dist/cjs/index-70e63f5b.js +3071 -0
  27. package/dist/cjs/{index-b12edb26.js → index-787d4498.js} +17 -25
  28. package/dist/cjs/{tap-click-1caf1780.js → index-8b5629a6.js} +30 -20
  29. package/dist/cjs/{index-8540d72e.js → index-975586fd.js} +7 -1
  30. package/dist/cjs/index-9c7b27e4.js +140 -0
  31. package/dist/cjs/{index-185f9c5a.js → index-af080b50.js} +9 -8
  32. package/dist/cjs/index-e56e09b8.js +38 -0
  33. package/dist/cjs/index.cjs.js +13 -11
  34. package/dist/cjs/{index.es-ef3efdfb.js → index.es-38cbcdbe.js} +2 -7
  35. package/dist/cjs/injectHistory-7206bbb9.js +9 -0
  36. package/dist/cjs/{input-shims-6c442c9f.js → input-shims-eff63b88.js} +21 -24
  37. package/dist/cjs/ion-accordion-group.cjs.entry.js +17 -9
  38. package/dist/cjs/ion-accordion.cjs.entry.js +19 -23
  39. package/dist/cjs/ion-action-sheet_4.cjs.entry.js +216 -212
  40. package/dist/cjs/ion-app.cjs.entry.js +8 -8
  41. package/dist/cjs/ion-avatar_16.cjs.entry.js +1907 -0
  42. package/dist/cjs/ion-back-button.cjs.entry.js +11 -11
  43. package/dist/cjs/ion-backdrop.cjs.entry.js +4 -4
  44. package/dist/cjs/ion-badge.cjs.entry.js +3 -3
  45. package/dist/cjs/ion-breadcrumb.cjs.entry.js +13 -21
  46. package/dist/cjs/ion-breadcrumbs.cjs.entry.js +12 -14
  47. package/dist/cjs/ion-buttons_3.cjs.entry.js +13 -13
  48. package/dist/cjs/ion-card-header.cjs.entry.js +4 -4
  49. package/dist/cjs/ion-card-subtitle.cjs.entry.js +4 -4
  50. package/dist/cjs/ion-checkbox_4.cjs.entry.js +360 -0
  51. package/dist/cjs/ion-chip.cjs.entry.js +3 -3
  52. package/dist/cjs/ion-col_3.cjs.entry.js +159 -0
  53. package/dist/cjs/ion-content_2.cjs.entry.js +59 -52
  54. package/dist/cjs/ion-datetime-button.cjs.entry.js +312 -0
  55. package/dist/cjs/ion-datetime.cjs.entry.js +752 -1245
  56. package/dist/cjs/ion-fab-button.cjs.entry.js +25 -9
  57. package/dist/cjs/ion-fab-list.cjs.entry.js +4 -4
  58. package/dist/cjs/ion-fab.cjs.entry.js +15 -13
  59. package/dist/cjs/ion-footer.cjs.entry.js +16 -14
  60. package/dist/cjs/ion-img.cjs.entry.js +4 -4
  61. package/dist/cjs/ion-infinite-scroll-content.cjs.entry.js +5 -5
  62. package/dist/cjs/ion-infinite-scroll.cjs.entry.js +13 -15
  63. package/dist/cjs/ion-item-divider.cjs.entry.js +4 -4
  64. package/dist/cjs/ion-item-group.cjs.entry.js +3 -3
  65. package/dist/cjs/ion-item-option.cjs.entry.js +8 -8
  66. package/dist/cjs/ion-item-options.cjs.entry.js +5 -5
  67. package/dist/cjs/ion-item-sliding.cjs.entry.js +41 -46
  68. package/dist/cjs/ion-loading.cjs.entry.js +23 -35
  69. package/dist/cjs/ion-menu-button.cjs.entry.js +13 -13
  70. package/dist/cjs/ion-menu-toggle.cjs.entry.js +7 -7
  71. package/dist/cjs/ion-menu.cjs.entry.js +47 -40
  72. package/dist/cjs/ion-modal.cjs.entry.js +935 -282
  73. package/dist/cjs/ion-nav-link.cjs.entry.js +2 -2
  74. package/dist/cjs/ion-nav.cjs.entry.js +45 -35
  75. package/dist/cjs/ion-picker-column-internal_2.cjs.entry.js +151 -43
  76. package/dist/cjs/ion-picker-column.cjs.entry.js +23 -25
  77. package/dist/cjs/ion-picker.cjs.entry.js +15 -17
  78. package/dist/cjs/ion-progress-bar.cjs.entry.js +6 -8
  79. package/dist/cjs/ion-range.cjs.entry.js +515 -0
  80. package/dist/cjs/ion-refresher-content.cjs.entry.js +6 -12
  81. package/dist/cjs/ion-refresher.cjs.entry.js +68 -50
  82. package/dist/cjs/ion-reorder-group.cjs.entry.js +15 -16
  83. package/dist/cjs/ion-reorder.cjs.entry.js +3 -3
  84. package/dist/cjs/ion-route-redirect.cjs.entry.js +1 -1
  85. package/dist/cjs/ion-route.cjs.entry.js +1 -1
  86. package/dist/cjs/ion-router-link.cjs.entry.js +5 -5
  87. package/dist/cjs/ion-router-outlet.cjs.entry.js +22 -20
  88. package/dist/cjs/ion-router.cjs.entry.js +32 -31
  89. package/dist/cjs/ion-searchbar.cjs.entry.js +14 -16
  90. package/dist/cjs/ion-segment-button.cjs.entry.js +8 -8
  91. package/dist/cjs/ion-segment.cjs.entry.js +24 -26
  92. package/dist/cjs/ion-select_2.cjs.entry.js +59 -56
  93. package/dist/cjs/ion-skeleton-text.cjs.entry.js +4 -4
  94. package/dist/cjs/ion-slide.cjs.entry.js +3 -3
  95. package/dist/cjs/ion-slides.cjs.entry.js +23 -23
  96. package/dist/cjs/ion-split-pane.cjs.entry.js +10 -11
  97. package/dist/cjs/ion-tab-bar.cjs.entry.js +5 -5
  98. package/dist/cjs/ion-tab-button.cjs.entry.js +6 -6
  99. package/dist/cjs/ion-tab.cjs.entry.js +4 -4
  100. package/dist/cjs/ion-tabs.cjs.entry.js +4 -5
  101. package/dist/cjs/ion-text.cjs.entry.js +24 -0
  102. package/dist/cjs/ion-thumbnail.cjs.entry.js +2 -2
  103. package/dist/cjs/ion-toast.cjs.entry.js +23 -43
  104. package/dist/cjs/ion-virtual-scroll.cjs.entry.js +29 -28
  105. package/dist/cjs/{ionic-global-878073d1.js → ionic-global-2cde9d3a.js} +27 -31
  106. package/dist/cjs/{ios.transition-c3bfb096.js → ios.transition-da235483.js} +71 -51
  107. package/dist/cjs/{keyboard-dfd76ac3.js → keyboard-91096619.js} +3 -3
  108. package/dist/cjs/loader.cjs.js +5 -5
  109. package/dist/cjs/match-path-84c9f7ca.js +511 -0
  110. package/dist/cjs/{md.transition-7eb9a1a7.js → md.transition-be429e07.js} +9 -16
  111. package/dist/cjs/{menu-toggle-util-cb549c2c.js → menu-toggle-util-7a01448c.js} +2 -2
  112. package/dist/cjs/{overlays-0a748609.js → overlays-32df265a.js} +29 -29
  113. package/dist/cjs/parse-d0071120.js +1237 -0
  114. package/dist/cjs/{purify-d0ad2883.js → purify-fb9c107e.js} +1 -1
  115. package/dist/cjs/sparkle-animation-player.cjs.entry.js +1 -1
  116. package/dist/cjs/sparkle-card_3.cjs.entry.js +91 -0
  117. package/dist/cjs/sparkle-character-intro.cjs.entry.js +1 -1
  118. package/dist/cjs/sparkle-code.cjs.entry.js +2 -2
  119. package/dist/cjs/sparkle-compass-post.cjs.entry.js +1 -1
  120. package/dist/cjs/sparkle-compass.cjs.entry.js +1 -1
  121. package/dist/cjs/sparkle-core.cjs.js +5 -5
  122. package/dist/cjs/sparkle-course-root.cjs.entry.js +146 -0
  123. package/dist/cjs/sparkle-dropdown.cjs.entry.js +61 -0
  124. package/dist/cjs/sparkle-emoji.cjs.entry.js +1 -1
  125. package/dist/cjs/{header-mobile-collapse_61.cjs.entry.js → sparkle-export-lessons_6.cjs.entry.js} +8865 -17663
  126. package/dist/cjs/sparkle-facilitator-header_19.cjs.entry.js +2130 -0
  127. package/dist/cjs/sparkle-facilitator-notes-form.cjs.entry.js +8 -7
  128. package/dist/cjs/sparkle-feedback.cjs.entry.js +9 -7
  129. package/dist/cjs/sparkle-goal-form.cjs.entry.js +8 -7
  130. package/dist/cjs/sparkle-goal-progress.cjs.entry.js +19 -0
  131. package/dist/cjs/sparkle-gww-comment-list.cjs.entry.js +1 -1
  132. package/dist/cjs/sparkle-gww-graph.cjs.entry.js +1 -1
  133. package/dist/cjs/sparkle-gww-item.cjs.entry.js +74 -0
  134. package/dist/cjs/sparkle-intro.cjs.entry.js +26 -0
  135. package/dist/cjs/sparkle-lower-content-nav.cjs.entry.js +1 -1
  136. package/dist/cjs/sparkle-menu-collapsible.cjs.entry.js +2 -2
  137. package/dist/cjs/sparkle-menu-toggle_3.cjs.entry.js +236 -0
  138. package/dist/cjs/sparkle-modal-image.cjs.entry.js +1 -1
  139. package/dist/cjs/sparkle-notfound-page.cjs.entry.js +1 -1
  140. package/dist/cjs/sparkle-overlay.cjs.entry.js +1 -1
  141. package/dist/cjs/sparkle-poll.cjs.entry.js +1 -1
  142. package/dist/cjs/sparkle-quiz-container.cjs.entry.js +1 -1
  143. package/dist/cjs/sparkle-quiz-feedback_5.cjs.entry.js +1 -1
  144. package/dist/cjs/sparkle-quiz.cjs.entry.js +1 -1
  145. package/dist/cjs/sparkle-select.cjs.entry.js +1 -1
  146. package/dist/cjs/sparkle-sidebar.cjs.entry.js +1 -1
  147. package/dist/cjs/sparkle-tab.cjs.entry.js +1 -1
  148. package/dist/cjs/sparkle-table-of-contents.cjs.entry.js +1 -1
  149. package/dist/cjs/sparkle-tabs.cjs.entry.js +1 -1
  150. package/dist/cjs/sparkle-validation-error.cjs.entry.js +21 -0
  151. package/dist/cjs/sparkle-youtube.cjs.entry.js +1 -1
  152. package/dist/cjs/{spinner-configs-6f6b7ef0.js → spinner-configs-0ac05f2d.js} +43 -43
  153. package/dist/cjs/{status-tap-8697433c.js → status-tap-033befa2.js} +7 -5
  154. package/dist/cjs/stencil-async-content.cjs.entry.js +1 -1
  155. package/dist/cjs/stencil-route-link.cjs.entry.js +77 -0
  156. package/dist/cjs/stencil-route-title.cjs.entry.js +2 -2
  157. package/dist/cjs/stencil-router-prompt.cjs.entry.js +2 -2
  158. package/dist/cjs/stencil-router-redirect.cjs.entry.js +32 -0
  159. package/dist/cjs/student.service-d48f1c99.js +61 -0
  160. package/dist/cjs/{swipe-back-7e08b5e0.js → swipe-back-4a826f9b.js} +5 -5
  161. package/dist/cjs/{theme-4252ac15.js → theme-b0b295c1.js} +6 -5
  162. package/dist/cjs/user.store-8a049c4e.js +21 -0
  163. package/dist/collection/collection-manifest.json +3 -1
  164. package/dist/collection/components/sparkle-feed-post/sparkle-feed-post.css +16 -0
  165. package/dist/collection/components/sparkle-feed-post/sparkle-feed-post.js +197 -3
  166. package/dist/collection/components/sparkle-intro/sparkle-intro.css +15 -0
  167. package/dist/collection/components/sparkle-intro/sparkle-intro.js +35 -0
  168. package/dist/esm/PrivateRoute-530ef873.js +33 -0
  169. package/dist/esm/{active-router-909088d6.js → active-router-9843e205.js} +1 -1
  170. package/dist/esm/{animation-b306f6c2.js → animation-d98d3e81.js} +83 -78
  171. package/dist/esm/{app-globals-5c736ae5.js → app-globals-08edc964.js} +1 -1
  172. package/dist/esm/{PrivateRoute-b9937c45.js → auth.service-79389d86.js} +4 -32
  173. package/dist/esm/{auth.store-3ed2389e.js → auth.store-b812b34b.js} +45 -725
  174. package/dist/esm/compass-svg.entry.js +1 -1
  175. package/dist/esm/context-consumer.entry.js +1 -1
  176. package/dist/esm/course-select.entry.js +1 -1
  177. package/dist/esm/{cubic-bezier-a7ad9c8e.js → cubic-bezier-4c0db14f.js} +10 -11
  178. package/dist/esm/dom-utils-8e73e88b.js +55 -0
  179. package/dist/esm/{facilitator.service-ec0a9739.js → facilitator.service-7babc526.js} +2 -1
  180. package/dist/esm/{feed.service-33b83cb7.js → feed.service-80fbe79d.js} +3 -2
  181. package/dist/esm/{focus-visible-40cda868.js → focus-visible-4e9a0764.js} +19 -6
  182. package/dist/esm/{framework-delegate-3bc58c27.js → framework-delegate-9b329182.js} +11 -13
  183. package/dist/esm/{gesture-controller-686622ba.js → gesture-controller-7be18351.js} +1 -1
  184. package/dist/esm/{haptic-99c9e346.js → haptic-3a76a65c.js} +4 -3
  185. package/dist/esm/{hardware-back-button-b6ccf74a.js → hardware-back-button-fa04d6e9.js} +8 -8
  186. package/dist/esm/header-mobile-collapse_2.entry.js +107 -0
  187. package/dist/esm/{helpers-39367fe1.js → helpers-94a5855b.js} +81 -15
  188. package/dist/esm/httpService-b2b7a1ad.js +683 -0
  189. package/dist/esm/{icons-61dec176.js → icons-16f1a80b.js} +2 -2
  190. package/dist/esm/{index-a12c14bd.js → index-21661af2.js} +22 -19
  191. package/dist/esm/{tap-click-13f1fb0d.js → index-230a26c9.js} +30 -20
  192. package/dist/esm/{index-c26d8655.js → index-478745be.js} +17 -25
  193. package/dist/esm/{index-dc61f152.js → index-4ec6b9c2.js} +5 -2
  194. package/dist/esm/{index-9594837e.js → index-95307148.js} +19 -28
  195. package/dist/esm/{index-5568e3fa.js → index-9db08224.js} +19 -12
  196. package/dist/esm/index-ab1c6a9f.js +3067 -0
  197. package/dist/esm/{index-435af8e6.js → index-be6112f8.js} +9 -8
  198. package/dist/esm/index-c23a1826.js +128 -0
  199. package/dist/esm/index-dad75b83.js +34 -0
  200. package/dist/esm/{index.es-97dd8174.js → index.es-1c3b1ef3.js} +2 -7
  201. package/dist/esm/index.js +9 -7
  202. package/dist/esm/injectHistory-4bfff188.js +7 -0
  203. package/dist/esm/{input-shims-cc98ea92.js → input-shims-ce5c01df.js} +21 -24
  204. package/dist/esm/ion-accordion-group.entry.js +17 -9
  205. package/dist/esm/ion-accordion.entry.js +19 -23
  206. package/dist/esm/ion-action-sheet_4.entry.js +216 -212
  207. package/dist/esm/ion-app.entry.js +8 -8
  208. package/dist/esm/ion-avatar_16.entry.js +1888 -0
  209. package/dist/esm/ion-back-button.entry.js +11 -11
  210. package/dist/esm/ion-backdrop.entry.js +4 -4
  211. package/dist/esm/ion-badge.entry.js +3 -3
  212. package/dist/esm/ion-breadcrumb.entry.js +13 -21
  213. package/dist/esm/ion-breadcrumbs.entry.js +12 -14
  214. package/dist/esm/ion-buttons_3.entry.js +13 -13
  215. package/dist/esm/ion-card-header.entry.js +4 -4
  216. package/dist/esm/ion-card-subtitle.entry.js +4 -4
  217. package/dist/esm/ion-checkbox_4.entry.js +353 -0
  218. package/dist/esm/ion-chip.entry.js +3 -3
  219. package/dist/esm/ion-col_3.entry.js +153 -0
  220. package/dist/esm/ion-content_2.entry.js +59 -52
  221. package/dist/esm/ion-datetime-button.entry.js +308 -0
  222. package/dist/esm/ion-datetime.entry.js +723 -1216
  223. package/dist/esm/ion-fab-button.entry.js +25 -9
  224. package/dist/esm/ion-fab-list.entry.js +4 -4
  225. package/dist/esm/ion-fab.entry.js +15 -13
  226. package/dist/esm/ion-footer.entry.js +16 -14
  227. package/dist/esm/ion-img.entry.js +4 -4
  228. package/dist/esm/ion-infinite-scroll-content.entry.js +5 -5
  229. package/dist/esm/ion-infinite-scroll.entry.js +13 -15
  230. package/dist/esm/ion-item-divider.entry.js +4 -4
  231. package/dist/esm/ion-item-group.entry.js +3 -3
  232. package/dist/esm/ion-item-option.entry.js +8 -8
  233. package/dist/esm/ion-item-options.entry.js +5 -5
  234. package/dist/esm/ion-item-sliding.entry.js +41 -46
  235. package/dist/esm/ion-loading.entry.js +23 -35
  236. package/dist/esm/ion-menu-button.entry.js +13 -13
  237. package/dist/esm/ion-menu-toggle.entry.js +7 -7
  238. package/dist/esm/ion-menu.entry.js +47 -40
  239. package/dist/esm/ion-modal.entry.js +921 -268
  240. package/dist/esm/ion-nav-link.entry.js +2 -2
  241. package/dist/esm/ion-nav.entry.js +45 -35
  242. package/dist/esm/ion-picker-column-internal_2.entry.js +151 -43
  243. package/dist/esm/ion-picker-column.entry.js +23 -25
  244. package/dist/esm/ion-picker.entry.js +15 -17
  245. package/dist/esm/ion-progress-bar.entry.js +6 -8
  246. package/dist/esm/ion-range.entry.js +511 -0
  247. package/dist/esm/ion-refresher-content.entry.js +6 -12
  248. package/dist/esm/ion-refresher.entry.js +68 -50
  249. package/dist/esm/ion-reorder-group.entry.js +15 -16
  250. package/dist/esm/ion-reorder.entry.js +3 -3
  251. package/dist/esm/ion-route-redirect.entry.js +1 -1
  252. package/dist/esm/ion-route.entry.js +1 -1
  253. package/dist/esm/ion-router-link.entry.js +5 -5
  254. package/dist/esm/ion-router-outlet.entry.js +22 -20
  255. package/dist/esm/ion-router.entry.js +32 -31
  256. package/dist/esm/ion-searchbar.entry.js +14 -16
  257. package/dist/esm/ion-segment-button.entry.js +8 -8
  258. package/dist/esm/ion-segment.entry.js +24 -26
  259. package/dist/esm/ion-select_2.entry.js +59 -56
  260. package/dist/esm/ion-skeleton-text.entry.js +4 -4
  261. package/dist/esm/ion-slide.entry.js +3 -3
  262. package/dist/esm/ion-slides.entry.js +23 -23
  263. package/dist/esm/ion-split-pane.entry.js +10 -11
  264. package/dist/esm/ion-tab-bar.entry.js +5 -5
  265. package/dist/esm/ion-tab-button.entry.js +6 -6
  266. package/dist/esm/ion-tab.entry.js +4 -4
  267. package/dist/esm/ion-tabs.entry.js +4 -5
  268. package/dist/esm/ion-text.entry.js +20 -0
  269. package/dist/esm/ion-thumbnail.entry.js +2 -2
  270. package/dist/esm/ion-toast.entry.js +23 -43
  271. package/dist/esm/ion-virtual-scroll.entry.js +29 -28
  272. package/dist/esm/{ionic-global-0939c477.js → ionic-global-293e882b.js} +27 -31
  273. package/dist/esm/{ios.transition-b4ca8a33.js → ios.transition-7cd34deb.js} +71 -51
  274. package/dist/esm/{keyboard-2503e874.js → keyboard-7e8329b3.js} +3 -3
  275. package/dist/esm/loader.js +5 -5
  276. package/dist/esm/match-path-36fdf5c7.js +499 -0
  277. package/dist/esm/{md.transition-ca5e0322.js → md.transition-2589a5b1.js} +9 -16
  278. package/dist/esm/{menu-toggle-util-7fa22c2f.js → menu-toggle-util-f92ba2f0.js} +2 -2
  279. package/dist/esm/{overlays-34cfa9e0.js → overlays-dfa730c8.js} +30 -30
  280. package/dist/esm/parse-1ae3a9bb.js +1196 -0
  281. package/dist/esm/polyfills/css-shim.js +1 -1
  282. package/dist/esm/{purify-ffce2b4c.js → purify-79af871f.js} +1 -1
  283. package/dist/esm/sparkle-animation-player.entry.js +2 -2
  284. package/dist/esm/sparkle-card_3.entry.js +85 -0
  285. package/dist/esm/sparkle-character-intro.entry.js +1 -1
  286. package/dist/esm/sparkle-code.entry.js +2 -2
  287. package/dist/esm/sparkle-compass-post.entry.js +1 -1
  288. package/dist/esm/sparkle-compass.entry.js +1 -1
  289. package/dist/esm/sparkle-core.js +5 -5
  290. package/dist/esm/sparkle-course-root.entry.js +142 -0
  291. package/dist/esm/sparkle-dropdown.entry.js +57 -0
  292. package/dist/esm/sparkle-emoji.entry.js +1 -1
  293. package/dist/esm/{header-mobile-collapse_61.entry.js → sparkle-export-lessons_6.entry.js} +8860 -17603
  294. package/dist/esm/sparkle-facilitator-header_19.entry.js +2108 -0
  295. package/dist/esm/sparkle-facilitator-notes-form.entry.js +8 -7
  296. package/dist/esm/sparkle-feedback.entry.js +9 -7
  297. package/dist/esm/sparkle-goal-form.entry.js +9 -8
  298. package/dist/esm/sparkle-goal-progress.entry.js +15 -0
  299. package/dist/esm/sparkle-gww-comment-list.entry.js +1 -1
  300. package/dist/esm/sparkle-gww-graph.entry.js +1 -1
  301. package/dist/esm/sparkle-gww-item.entry.js +70 -0
  302. package/dist/esm/sparkle-intro.entry.js +22 -0
  303. package/dist/esm/sparkle-lower-content-nav.entry.js +1 -1
  304. package/dist/esm/sparkle-menu-collapsible.entry.js +2 -2
  305. package/dist/esm/sparkle-menu-toggle_3.entry.js +230 -0
  306. package/dist/esm/sparkle-modal-image.entry.js +1 -1
  307. package/dist/esm/sparkle-notfound-page.entry.js +1 -1
  308. package/dist/esm/sparkle-overlay.entry.js +1 -1
  309. package/dist/esm/sparkle-poll.entry.js +1 -1
  310. package/dist/esm/sparkle-quiz-container.entry.js +1 -1
  311. package/dist/esm/sparkle-quiz-feedback_5.entry.js +1 -1
  312. package/dist/esm/sparkle-quiz.entry.js +1 -1
  313. package/dist/esm/sparkle-select.entry.js +1 -1
  314. package/dist/esm/sparkle-sidebar.entry.js +1 -1
  315. package/dist/esm/sparkle-tab.entry.js +1 -1
  316. package/dist/esm/sparkle-table-of-contents.entry.js +1 -1
  317. package/dist/esm/sparkle-tabs.entry.js +1 -1
  318. package/dist/esm/sparkle-validation-error.entry.js +17 -0
  319. package/dist/esm/sparkle-youtube.entry.js +1 -1
  320. package/dist/esm/{spinner-configs-f609a655.js → spinner-configs-a37e628a.js} +43 -43
  321. package/dist/esm/{status-tap-6351a0cb.js → status-tap-79b6199d.js} +7 -5
  322. package/dist/esm/stencil-async-content.entry.js +1 -1
  323. package/dist/esm/stencil-route-link.entry.js +73 -0
  324. package/dist/esm/stencil-route-title.entry.js +2 -2
  325. package/dist/esm/stencil-router-prompt.entry.js +2 -2
  326. package/dist/esm/stencil-router-redirect.entry.js +28 -0
  327. package/dist/esm/{student.service-29b688ba.js → student.service-0caed0f4.js} +3 -18
  328. package/dist/esm/{swipe-back-34251834.js → swipe-back-ad7a0361.js} +5 -5
  329. package/dist/esm/{theme-c336c9d9.js → theme-7ef00c83.js} +6 -5
  330. package/dist/esm/user.store-8477642a.js +19 -0
  331. package/dist/esm/{util-6ef753e9.js → util-a831d09d.js} +1 -1
  332. package/dist/node_modules/@ionic/core/dist/collection/components/content/content.css +8 -1
  333. package/dist/node_modules/@ionic/core/dist/collection/components/datetime/datetime.ios.css +46 -22
  334. package/dist/node_modules/@ionic/core/dist/collection/components/datetime/datetime.md.css +43 -19
  335. package/dist/node_modules/@ionic/core/dist/collection/components/datetime-button/datetime-button.css +60 -0
  336. package/dist/node_modules/@ionic/core/dist/collection/components/item/item.ios.css +2 -1
  337. package/dist/node_modules/@ionic/core/dist/collection/components/item/item.md.css +2 -2
  338. package/dist/node_modules/@ionic/core/dist/collection/components/item-option/item-option.ios.css +6 -6
  339. package/dist/node_modules/@ionic/core/dist/collection/components/item-option/item-option.md.css +6 -6
  340. package/dist/node_modules/@ionic/core/dist/collection/components/label/label.ios.css +3 -3
  341. package/dist/node_modules/@ionic/core/dist/collection/components/loading/loading.ios.css +1 -6
  342. package/dist/node_modules/@ionic/core/dist/collection/components/loading/loading.md.css +1 -6
  343. package/dist/node_modules/@ionic/core/dist/collection/components/menu/menu.ios.css +1 -5
  344. package/dist/node_modules/@ionic/core/dist/collection/components/menu/menu.md.css +1 -5
  345. package/dist/node_modules/@ionic/core/dist/collection/components/modal/modal.ios.css +31 -3
  346. package/dist/node_modules/@ionic/core/dist/collection/components/modal/modal.md.css +29 -1
  347. package/dist/node_modules/@ionic/core/dist/collection/components/picker-column-internal/picker-column-internal.ios.css +24 -1
  348. package/dist/node_modules/@ionic/core/dist/collection/components/picker-column-internal/picker-column-internal.md.css +24 -1
  349. package/dist/node_modules/@ionic/core/dist/collection/components/picker-internal/picker-internal.ios.css +4 -0
  350. package/dist/node_modules/@ionic/core/dist/collection/components/picker-internal/picker-internal.md.css +4 -0
  351. package/dist/node_modules/@ionic/core/dist/collection/components/range/range.ios.css +2 -2
  352. package/dist/node_modules/@ionic/core/dist/collection/components/range/range.md.css +2 -2
  353. package/dist/node_modules/@ionic/core/dist/collection/components/spinner/spinner.css +8 -8
  354. package/dist/node_modules/@ionic/core/dist/collection/components/textarea/textarea.ios.css +34 -17
  355. package/dist/node_modules/@ionic/core/dist/collection/components/textarea/textarea.md.css +34 -17
  356. package/dist/node_modules/@ionic/core/dist/collection/components/toggle/toggle.ios.css +50 -1
  357. package/dist/node_modules/@ionic/core/dist/collection/components/toggle/toggle.md.css +27 -0
  358. package/dist/sparkle-core/index.esm.js +1 -1
  359. package/dist/sparkle-core/p-0127a61a.entry.js +1 -0
  360. package/dist/sparkle-core/p-01743e3e.js +4 -0
  361. package/dist/sparkle-core/p-06af1bc8.entry.js +1 -0
  362. package/dist/sparkle-core/{p-703ca87c.js → p-076f0239.js} +0 -0
  363. package/dist/sparkle-core/p-0798d46a.entry.js +1 -0
  364. package/dist/sparkle-core/p-085eb951.entry.js +4 -0
  365. package/dist/sparkle-core/{p-39e5a90f.entry.js → p-0b92326d.entry.js} +1 -1
  366. package/dist/sparkle-core/{p-5ff6416d.entry.js → p-0c603495.entry.js} +2 -2
  367. package/dist/sparkle-core/{p-6bbabb80.entry.js → p-0d7cceaa.entry.js} +1 -1
  368. package/dist/sparkle-core/p-0d813026.entry.js +1 -0
  369. package/dist/sparkle-core/{p-69e7783d.js → p-0e4de1d0.js} +0 -0
  370. package/dist/sparkle-core/p-11ed6b7f.entry.js +1 -0
  371. package/dist/sparkle-core/p-122427b7.entry.js +1 -0
  372. package/dist/sparkle-core/p-12c4f45c.entry.js +1 -0
  373. package/dist/sparkle-core/p-136b93d5.entry.js +4 -0
  374. package/dist/sparkle-core/{p-e225581a.js → p-1394cbb8.js} +2 -2
  375. package/dist/sparkle-core/{p-c48bbc7c.entry.js → p-14340143.entry.js} +1 -1
  376. package/dist/sparkle-core/p-14a06a91.entry.js +1 -0
  377. package/dist/sparkle-core/{p-a9ee3f6d.entry.js → p-16b7974e.entry.js} +1 -1
  378. package/dist/sparkle-core/p-16c81890.entry.js +1 -0
  379. package/dist/sparkle-core/{p-5c9aa1f9.entry.js → p-1701723e.entry.js} +1 -1
  380. package/dist/sparkle-core/p-1728ead7.js +1 -0
  381. package/dist/sparkle-core/p-17aef6f9.js +1 -0
  382. package/dist/sparkle-core/p-180857a2.entry.js +1 -0
  383. package/dist/sparkle-core/p-1acc7870.entry.js +1 -0
  384. package/dist/sparkle-core/{p-513794b0.js → p-1c2aee9c.js} +1 -1
  385. package/dist/sparkle-core/p-1cd4c3cc.entry.js +1 -0
  386. package/dist/sparkle-core/p-21d9833d.js +1 -0
  387. package/dist/sparkle-core/p-23d713e2.js +1 -0
  388. package/dist/sparkle-core/p-25c13612.entry.js +1 -0
  389. package/dist/sparkle-core/p-2699868a.entry.js +1 -0
  390. package/dist/sparkle-core/p-27075abe.js +4 -0
  391. package/dist/sparkle-core/{p-713590fc.js → p-280e938d.js} +1 -1
  392. package/dist/sparkle-core/p-2bd4c60e.js +1 -0
  393. package/dist/sparkle-core/p-2c89a6c2.entry.js +1 -0
  394. package/dist/sparkle-core/p-308517b3.js +4 -0
  395. package/dist/sparkle-core/p-3227afcb.entry.js +1 -0
  396. package/dist/sparkle-core/{p-173d5461.entry.js → p-34d93a39.entry.js} +1 -1
  397. package/dist/sparkle-core/p-34ebfc8a.entry.js +1 -0
  398. package/dist/sparkle-core/p-351b82a8.entry.js +1 -0
  399. package/dist/sparkle-core/p-363a2d6d.js +4 -0
  400. package/dist/sparkle-core/p-36c48760.entry.js +1 -0
  401. package/dist/sparkle-core/p-3810777d.js +4 -0
  402. package/dist/sparkle-core/p-384911d7.entry.js +1 -0
  403. package/dist/sparkle-core/p-3b618eda.entry.js +1 -0
  404. package/dist/sparkle-core/p-3c752205.entry.js +1 -0
  405. package/dist/sparkle-core/{p-50aac721.entry.js → p-3d2c0e24.entry.js} +2 -2
  406. package/dist/sparkle-core/{p-350adbaa.entry.js → p-3eb56165.entry.js} +1 -1
  407. package/dist/sparkle-core/{p-ed0e9d29.entry.js → p-3ef53ebf.entry.js} +1 -1
  408. package/dist/sparkle-core/{p-fbd7eeca.entry.js → p-3fd92216.entry.js} +1 -1
  409. package/dist/sparkle-core/{p-1df05176.js → p-4338e1e3.js} +2 -2
  410. package/dist/sparkle-core/p-442eadcf.entry.js +1 -0
  411. package/dist/sparkle-core/{p-5f45d206.entry.js → p-4af496a8.entry.js} +1 -1
  412. package/dist/sparkle-core/{p-935e7cfc.js → p-4bd4dab2.js} +1 -1
  413. package/dist/sparkle-core/{p-18e62133.entry.js → p-4c9e010d.entry.js} +1 -1
  414. package/dist/sparkle-core/p-4d0dfbc9.js +1 -0
  415. package/dist/sparkle-core/{p-8c6b6038.js → p-4d4077ea.js} +0 -0
  416. package/dist/sparkle-core/p-4e0502b8.entry.js +4 -0
  417. package/dist/sparkle-core/p-506f3c5f.js +4 -0
  418. package/dist/sparkle-core/p-524a6174.entry.js +1 -0
  419. package/dist/sparkle-core/p-53aac9d7.entry.js +1 -0
  420. package/dist/sparkle-core/{p-0580419b.entry.js → p-56700a40.entry.js} +1 -1
  421. package/dist/sparkle-core/p-5722be24.entry.js +1 -0
  422. package/dist/sparkle-core/p-58389020.entry.js +348 -0
  423. package/dist/sparkle-core/{p-11cf398a.entry.js → p-58f74119.entry.js} +1 -1
  424. package/dist/sparkle-core/p-5979f253.entry.js +1 -0
  425. package/dist/sparkle-core/p-5a3de051.entry.js +4 -0
  426. package/dist/sparkle-core/p-5a850731.entry.js +1 -0
  427. package/dist/sparkle-core/{p-950effe7.entry.js → p-5dcf33fb.entry.js} +1 -1
  428. package/dist/sparkle-core/p-5e8fa1ac.entry.js +1 -0
  429. package/dist/sparkle-core/p-5ef50959.js +1 -0
  430. package/dist/sparkle-core/p-615b8f64.entry.js +1 -0
  431. package/dist/sparkle-core/{p-90389886.entry.js → p-63d8a5b7.entry.js} +1 -1
  432. package/dist/sparkle-core/p-6a337ad1.entry.js +1 -0
  433. package/dist/sparkle-core/p-6a5ace01.js +2 -0
  434. package/dist/sparkle-core/{p-d7baf31e.entry.js → p-6ae9c743.entry.js} +1 -1
  435. package/dist/sparkle-core/p-76206f80.entry.js +1 -0
  436. package/dist/sparkle-core/{p-99b43ee1.entry.js → p-767c9db8.entry.js} +1 -1
  437. package/dist/sparkle-core/p-76a6e202.entry.js +1 -0
  438. package/dist/sparkle-core/{p-ee0d7f19.entry.js → p-785f1879.entry.js} +1 -1
  439. package/dist/sparkle-core/p-788735b9.entry.js +1 -0
  440. package/dist/sparkle-core/{p-057f6a23.entry.js → p-7b21bd70.entry.js} +1 -1
  441. package/dist/sparkle-core/p-7b3d1457.js +1 -0
  442. package/dist/sparkle-core/p-7d8427eb.js +4 -0
  443. package/dist/sparkle-core/{p-5264da79.js → p-7e7ce516.js} +0 -0
  444. package/dist/sparkle-core/{p-838fa86d.entry.js → p-8cbe019a.entry.js} +5 -5
  445. package/dist/sparkle-core/{p-9c1772c3.js → p-8d630960.js} +1 -1
  446. package/dist/sparkle-core/{p-7052c43a.entry.js → p-8e42e634.entry.js} +1 -1
  447. package/dist/sparkle-core/p-8e56f9ee.entry.js +1 -0
  448. package/dist/sparkle-core/p-8ed0cefb.entry.js +1 -0
  449. package/dist/sparkle-core/{p-d4c07aca.js → p-924b2917.js} +0 -0
  450. package/dist/sparkle-core/p-9484e34b.entry.js +1 -0
  451. package/dist/sparkle-core/p-966817ec.js +1 -0
  452. package/dist/sparkle-core/p-969e98e5.entry.js +1 -0
  453. package/dist/sparkle-core/p-98f3925b.js +4 -0
  454. package/dist/sparkle-core/{p-a1cab0f3.js → p-99231c00.js} +2 -2
  455. package/dist/sparkle-core/p-9a383065.entry.js +7 -0
  456. package/dist/sparkle-core/p-9b4979b5.entry.js +4 -0
  457. package/dist/sparkle-core/{p-c69b0a7a.entry.js → p-9cd95e7e.entry.js} +1 -1
  458. package/dist/sparkle-core/p-9dc42d70.entry.js +1 -0
  459. package/dist/sparkle-core/p-9eea81f2.js +1 -0
  460. package/dist/sparkle-core/{p-797c23ed.entry.js → p-9ef14088.entry.js} +1 -1
  461. package/dist/sparkle-core/p-a05871e6.js +1 -0
  462. package/dist/sparkle-core/p-a111c567.entry.js +1 -0
  463. package/dist/sparkle-core/{p-1af044f7.js → p-a19b42f0.js} +1 -1
  464. package/dist/sparkle-core/p-a208ab2d.js +4 -0
  465. package/dist/sparkle-core/p-a2f7c751.entry.js +1 -0
  466. package/dist/sparkle-core/p-a458b415.entry.js +1 -0
  467. package/dist/sparkle-core/p-a6c1a55a.entry.js +5 -0
  468. package/dist/sparkle-core/{p-145e40f5.entry.js → p-ab3a8f5e.entry.js} +1 -1
  469. package/dist/sparkle-core/p-ac0e4d8c.entry.js +1 -0
  470. package/dist/sparkle-core/p-add30d46.js +4 -0
  471. package/dist/sparkle-core/{p-5b40aae5.entry.js → p-b00d0a47.entry.js} +1 -1
  472. package/dist/sparkle-core/p-b2827978.entry.js +1 -0
  473. package/dist/sparkle-core/p-b8ba8164.entry.js +1 -0
  474. package/dist/sparkle-core/{p-6823e6c1.entry.js → p-ba775d8e.entry.js} +1 -1
  475. package/dist/sparkle-core/{p-37c00e39.entry.js → p-bae8cd7d.entry.js} +1 -1
  476. package/dist/sparkle-core/p-bb3e3482.entry.js +1 -0
  477. package/dist/sparkle-core/p-bb575dba.entry.js +1 -0
  478. package/dist/sparkle-core/p-bd2c8e30.entry.js +10 -0
  479. package/dist/sparkle-core/p-c48352cf.js +4 -0
  480. package/dist/sparkle-core/{p-667accac.entry.js → p-c5eb4404.entry.js} +1 -1
  481. package/dist/sparkle-core/p-c8ad5a5b.entry.js +4 -0
  482. package/dist/sparkle-core/p-c9f474d0.js +4 -0
  483. package/dist/sparkle-core/p-ca0edc9b.entry.js +1 -0
  484. package/dist/sparkle-core/{p-680663a2.entry.js → p-cb04b18a.entry.js} +1 -1
  485. package/dist/sparkle-core/{p-b3909012.entry.js → p-d0d0e5e5.entry.js} +1 -1
  486. package/dist/sparkle-core/{p-7d61177b.entry.js → p-d220a642.entry.js} +1 -1
  487. package/dist/sparkle-core/p-d38a2511.entry.js +1 -0
  488. package/dist/sparkle-core/{p-b07a2cf2.entry.js → p-d5b8302f.entry.js} +1 -1
  489. package/dist/sparkle-core/p-d5ba8e80.entry.js +1 -0
  490. package/dist/sparkle-core/{p-3a202a38.entry.js → p-d6637b48.entry.js} +1 -1
  491. package/dist/sparkle-core/p-d6788642.entry.js +1 -0
  492. package/dist/sparkle-core/p-d6a3a639.entry.js +1 -0
  493. package/dist/sparkle-core/p-d86f8633.entry.js +1 -0
  494. package/dist/sparkle-core/{p-9cfdeb18.entry.js → p-defeaa5c.entry.js} +1 -1
  495. package/dist/sparkle-core/p-df5cfa7f.entry.js +1 -0
  496. package/dist/sparkle-core/p-df5efe0d.entry.js +1 -0
  497. package/dist/sparkle-core/p-dff8325e.js +4 -0
  498. package/dist/sparkle-core/p-e09de7ac.js +1 -0
  499. package/dist/sparkle-core/{p-016a7aaf.entry.js → p-e1743d82.entry.js} +1 -1
  500. package/dist/sparkle-core/p-e28a106d.entry.js +1 -0
  501. package/dist/sparkle-core/p-e566c0b3.entry.js +1 -0
  502. package/dist/sparkle-core/{p-bca0e465.entry.js → p-e6d39f6e.entry.js} +1 -1
  503. package/dist/sparkle-core/p-e9431eeb.js +7 -0
  504. package/dist/sparkle-core/p-ea4a9f0d.entry.js +1 -0
  505. package/dist/sparkle-core/p-ea7d7a3b.js +1 -0
  506. package/dist/sparkle-core/p-eaa8bbee.js +4 -0
  507. package/dist/sparkle-core/p-ed3dfd89.js +4 -0
  508. package/dist/sparkle-core/{p-3defe550.entry.js → p-efe37368.entry.js} +1 -1
  509. package/dist/sparkle-core/p-f187d129.entry.js +1 -0
  510. package/dist/sparkle-core/{p-a9ccb0df.js → p-f3cba72a.js} +0 -0
  511. package/dist/sparkle-core/{p-052caa63.js → p-f5e7bfa5.js} +1 -1
  512. package/dist/sparkle-core/{p-ecd39170.entry.js → p-f63a13d8.entry.js} +1 -1
  513. package/dist/sparkle-core/{p-1726da2f.entry.js → p-fdb9a613.entry.js} +1 -1
  514. package/dist/sparkle-core/p-fde96f7c.js +4 -0
  515. package/dist/sparkle-core/{p-aa87c7f0.entry.js → p-fe214d79.entry.js} +1 -1
  516. package/dist/sparkle-core/p-fe3a7bca.js +1 -0
  517. package/dist/sparkle-core/{p-aa9ebc39.entry.js → p-fea20ec2.entry.js} +1 -1
  518. package/dist/sparkle-core/p-ff26d891.entry.js +1 -0
  519. package/dist/sparkle-core/sparkle-core.css +1 -1
  520. package/dist/sparkle-core/sparkle-core.esm.js +1 -1
  521. package/dist/types/components/sparkle-feed-post/sparkle-feed-post.d.ts +16 -0
  522. package/dist/types/components/sparkle-intro/sparkle-intro.d.ts +7 -0
  523. package/dist/types/components.d.ts +73 -11
  524. package/package.json +3 -3
  525. package/dist/cjs/ion-card-title.cjs.entry.js +0 -30
  526. package/dist/cjs/ion-textarea.cjs.entry.js +0 -247
  527. package/dist/cjs/ion-toggle.cjs.entry.js +0 -160
  528. package/dist/cjs/sparkle-feed-post.cjs.entry.js +0 -19
  529. package/dist/cjs/student.service-744c3155.js +0 -77
  530. package/dist/esm/ion-card-title.entry.js +0 -26
  531. package/dist/esm/ion-textarea.entry.js +0 -243
  532. package/dist/esm/ion-toggle.entry.js +0 -156
  533. package/dist/esm/sparkle-feed-post.entry.js +0 -15
  534. package/dist/sparkle-core/p-0187adef.entry.js +0 -1
  535. package/dist/sparkle-core/p-03189863.js +0 -1
  536. package/dist/sparkle-core/p-03ec54a8.entry.js +0 -1
  537. package/dist/sparkle-core/p-04583c51.entry.js +0 -1
  538. package/dist/sparkle-core/p-063cd168.js +0 -4
  539. package/dist/sparkle-core/p-081968cc.entry.js +0 -1
  540. package/dist/sparkle-core/p-0934f5dd.entry.js +0 -1
  541. package/dist/sparkle-core/p-0f899097.entry.js +0 -352
  542. package/dist/sparkle-core/p-1339830f.entry.js +0 -1
  543. package/dist/sparkle-core/p-1b78dea1.entry.js +0 -1
  544. package/dist/sparkle-core/p-1cef8572.js +0 -4
  545. package/dist/sparkle-core/p-21bf4ca0.entry.js +0 -1
  546. package/dist/sparkle-core/p-21db4e8e.entry.js +0 -1
  547. package/dist/sparkle-core/p-23a9f7d1.entry.js +0 -1
  548. package/dist/sparkle-core/p-289a35ed.entry.js +0 -1
  549. package/dist/sparkle-core/p-2ee6a5f9.entry.js +0 -1
  550. package/dist/sparkle-core/p-35a7bd6c.entry.js +0 -1
  551. package/dist/sparkle-core/p-389500fd.js +0 -4
  552. package/dist/sparkle-core/p-45e6db62.entry.js +0 -1
  553. package/dist/sparkle-core/p-48f9b960.entry.js +0 -1
  554. package/dist/sparkle-core/p-4dc3ef96.entry.js +0 -1
  555. package/dist/sparkle-core/p-547b70c6.entry.js +0 -1
  556. package/dist/sparkle-core/p-5598650a.entry.js +0 -1
  557. package/dist/sparkle-core/p-55ae49e1.js +0 -4
  558. package/dist/sparkle-core/p-58e98f89.entry.js +0 -1
  559. package/dist/sparkle-core/p-59f7bf6e.entry.js +0 -1
  560. package/dist/sparkle-core/p-5a3d0e6b.js +0 -4
  561. package/dist/sparkle-core/p-5d2e54ee.entry.js +0 -1
  562. package/dist/sparkle-core/p-62a6c96f.entry.js +0 -1
  563. package/dist/sparkle-core/p-64e72f8f.js +0 -4
  564. package/dist/sparkle-core/p-660e0742.js +0 -1
  565. package/dist/sparkle-core/p-6bf07a28.js +0 -1
  566. package/dist/sparkle-core/p-6c6145cd.js +0 -4
  567. package/dist/sparkle-core/p-6c90bde6.entry.js +0 -5
  568. package/dist/sparkle-core/p-6e88764b.entry.js +0 -4
  569. package/dist/sparkle-core/p-6ee40949.js +0 -1
  570. package/dist/sparkle-core/p-6fbe3ca3.entry.js +0 -1
  571. package/dist/sparkle-core/p-6fd4985d.js +0 -4
  572. package/dist/sparkle-core/p-70b2452c.js +0 -4
  573. package/dist/sparkle-core/p-7493ee15.entry.js +0 -1
  574. package/dist/sparkle-core/p-75572037.js +0 -1
  575. package/dist/sparkle-core/p-768bcc9e.entry.js +0 -1
  576. package/dist/sparkle-core/p-7e61973d.entry.js +0 -7
  577. package/dist/sparkle-core/p-855ca600.js +0 -1
  578. package/dist/sparkle-core/p-857f3696.entry.js +0 -1
  579. package/dist/sparkle-core/p-8fe2e51f.entry.js +0 -4
  580. package/dist/sparkle-core/p-932bfb69.entry.js +0 -1
  581. package/dist/sparkle-core/p-941eaa3a.entry.js +0 -1
  582. package/dist/sparkle-core/p-95004267.entry.js +0 -1
  583. package/dist/sparkle-core/p-996361f9.entry.js +0 -1
  584. package/dist/sparkle-core/p-9a17f2ad.js +0 -4
  585. package/dist/sparkle-core/p-9babd345.js +0 -1
  586. package/dist/sparkle-core/p-a080e768.entry.js +0 -1
  587. package/dist/sparkle-core/p-a7cc0052.entry.js +0 -4
  588. package/dist/sparkle-core/p-ae1f145d.entry.js +0 -1
  589. package/dist/sparkle-core/p-b3e6427d.js +0 -7
  590. package/dist/sparkle-core/p-b49ca0ea.entry.js +0 -1
  591. package/dist/sparkle-core/p-b81e20fe.entry.js +0 -4
  592. package/dist/sparkle-core/p-c1279cc9.entry.js +0 -1
  593. package/dist/sparkle-core/p-c1376096.entry.js +0 -1
  594. package/dist/sparkle-core/p-c3986a52.entry.js +0 -1
  595. package/dist/sparkle-core/p-c3d3d5c4.entry.js +0 -1
  596. package/dist/sparkle-core/p-c5b9bdd6.entry.js +0 -1
  597. package/dist/sparkle-core/p-cbbeed67.entry.js +0 -1
  598. package/dist/sparkle-core/p-d4a435f8.entry.js +0 -1
  599. package/dist/sparkle-core/p-d5b05ece.entry.js +0 -5
  600. package/dist/sparkle-core/p-d8d3524a.js +0 -1
  601. package/dist/sparkle-core/p-e0fced48.entry.js +0 -1
  602. package/dist/sparkle-core/p-e1cba44b.entry.js +0 -4
  603. package/dist/sparkle-core/p-e3fdd0a8.entry.js +0 -1
  604. package/dist/sparkle-core/p-e6b66cef.entry.js +0 -1
  605. package/dist/sparkle-core/p-e72d4450.js +0 -4
  606. package/dist/sparkle-core/p-eb70a23c.entry.js +0 -1
  607. package/dist/sparkle-core/p-f4001fdf.js +0 -4
  608. package/dist/sparkle-core/p-f9b73032.entry.js +0 -1
  609. package/dist/sparkle-core/p-faa912d7.entry.js +0 -1
  610. package/dist/sparkle-core/p-fc933591.entry.js +0 -1
  611. package/dist/sparkle-core/p-fef04ab5.js +0 -4
@@ -1,92 +1,77 @@
1
- import { r as registerInstance, i as createEvent, w as writeTask, h, H as Host, e as getElement } from './index-5568e3fa.js';
2
- import { g as getIonMode, c as config } from './ionic-global-0939c477.js';
3
- import { C as CoreDelegate, a as attachComponent, d as detachComponent } from './framework-delegate-3bc58c27.js';
4
- import { l as clamp, g as getElementRoot, k as raf } from './helpers-39367fe1.js';
5
- import { KEYBOARD_DID_OPEN } from './keyboard-2503e874.js';
6
- import { B as BACKDROP, p as prepareOverlay, b as present, c as activeAnimations, d as dismiss, e as eventMethod } from './overlays-34cfa9e0.js';
7
- import { g as getClassMap } from './theme-c336c9d9.js';
8
- import { d as deepReady } from './index-c26d8655.js';
9
- import { c as createAnimation } from './animation-b306f6c2.js';
10
- import { g as getTimeGivenProgression } from './cubic-bezier-a7ad9c8e.js';
11
- import { createGesture } from './index-a12c14bd.js';
12
- import './hardware-back-button-b6ccf74a.js';
13
- import './gesture-controller-686622ba.js';
1
+ import { r as registerInstance, e as createEvent, w as writeTask, h, H as Host, i as getElement } from './index-9db08224.js';
2
+ import { g as getIonMode, c as config } from './ionic-global-293e882b.js';
3
+ import { a as findClosestIonContent, i as isIonContent, d as disableContentScrollY, r as resetContentScrollY, f as findIonContent, p as printIonContentErrorMsg } from './index-c23a1826.js';
4
+ import { C as CoreDelegate, a as attachComponent, d as detachComponent } from './framework-delegate-9b329182.js';
5
+ import { g as getElementRoot, m as clamp, j as raf } from './helpers-94a5855b.js';
6
+ import { KEYBOARD_DID_OPEN } from './keyboard-7e8329b3.js';
7
+ import { a as printIonWarning } from './index-dad75b83.js';
8
+ import { B as BACKDROP, p as prepareOverlay, a as present, b as activeAnimations, d as dismiss, e as eventMethod } from './overlays-dfa730c8.js';
9
+ import { g as getClassMap } from './theme-7ef00c83.js';
10
+ import { d as deepReady } from './index-478745be.js';
11
+ import { c as createAnimation } from './animation-d98d3e81.js';
12
+ import { g as getTimeGivenProgression } from './cubic-bezier-4c0db14f.js';
13
+ import { createGesture } from './index-21661af2.js';
14
+ import './hardware-back-button-fa04d6e9.js';
15
+ import './gesture-controller-7be18351.js';
14
16
 
15
17
  /*!
16
18
  * (C) Ionic http://ionicframework.com - MIT License
17
19
  */
18
- // Defaults for the card swipe animation
19
- const SwipeToCloseDefaults = {
20
- MIN_PRESENTING_SCALE: 0.93,
21
- };
22
- const createSwipeToCloseGesture = (el, animation, onDismiss) => {
23
- const height = el.offsetHeight;
24
- let isOpen = false;
25
- const canStart = (detail) => {
26
- const target = detail.event.target;
27
- if (target === null ||
28
- !target.closest) {
29
- return true;
30
- }
31
- const contentOrFooter = target.closest('ion-content, ion-footer');
32
- if (contentOrFooter === null) {
33
- return true;
34
- }
35
- // Target is in the content or the footer so do not start the gesture.
36
- // We could be more nuanced here and allow it for content that
37
- // does not need to scroll.
38
- return false;
39
- };
40
- const onStart = () => {
41
- animation.progressStart(true, (isOpen) ? 1 : 0);
42
- };
43
- const onMove = (detail) => {
44
- const step = clamp(0.0001, detail.deltaY / height, 0.9999);
45
- animation.progressStep(step);
46
- };
47
- const onEnd = (detail) => {
48
- const velocity = detail.velocityY;
49
- const step = clamp(0.0001, detail.deltaY / height, 0.9999);
50
- const threshold = (detail.deltaY + velocity * 1000) / height;
51
- const shouldComplete = threshold >= 0.5;
52
- let newStepValue = (shouldComplete) ? -0.001 : 0.001;
53
- if (!shouldComplete) {
54
- animation.easing('cubic-bezier(1, 0, 0.68, 0.28)');
55
- newStepValue += getTimeGivenProgression([0, 0], [1, 0], [0.68, 0.28], [1, 1], step)[0];
56
- }
57
- else {
58
- animation.easing('cubic-bezier(0.32, 0.72, 0, 1)');
59
- newStepValue += getTimeGivenProgression([0, 0], [0.32, 0.72], [0, 1], [1, 1], step)[0];
60
- }
61
- const duration = (shouldComplete) ? computeDuration(step * height, velocity) : computeDuration((1 - step) * height, velocity);
62
- isOpen = shouldComplete;
63
- gesture.enable(false);
64
- animation
65
- .onFinish(() => {
66
- if (!shouldComplete) {
67
- gesture.enable(true);
68
- }
69
- })
70
- .progressEnd((shouldComplete) ? 1 : 0, newStepValue, duration);
71
- if (shouldComplete) {
72
- onDismiss();
20
+ /**
21
+ * When accessing the window, it is important
22
+ * to account for SSR applications where the
23
+ * window is not available. Code that accesses
24
+ * window when it is not available will crash.
25
+ * Even checking if `window === undefined` will cause
26
+ * apps to crash in SSR.
27
+ *
28
+ * Use win below to access an SSR-safe version
29
+ * of the window.
30
+ *
31
+ * Example 1:
32
+ * Before:
33
+ * if (window.innerWidth > 768) { ... }
34
+ *
35
+ * After:
36
+ * import { win } from 'path/to/this/file';
37
+ * if (win?.innerWidth > 768) { ... }
38
+ *
39
+ * Note: Code inside of this if-block will
40
+ * not run in an SSR environment.
41
+ */
42
+ const win = typeof window !== 'undefined' ? window : undefined;
43
+
44
+ /*!
45
+ * (C) Ionic http://ionicframework.com - MIT License
46
+ */
47
+ var Style;
48
+ (function (Style) {
49
+ Style["Dark"] = "DARK";
50
+ Style["Light"] = "LIGHT";
51
+ Style["Default"] = "DEFAULT";
52
+ })(Style || (Style = {}));
53
+ const StatusBar = {
54
+ getEngine() {
55
+ var _a, _b, _c;
56
+ return ((_b = (_a = win) === null || _a === void 0 ? void 0 : _a.Capacitor) === null || _b === void 0 ? void 0 : _b.isPluginAvailable('StatusBar')) && ((_c = win) === null || _c === void 0 ? void 0 : _c.Capacitor.Plugins.StatusBar);
57
+ },
58
+ supportsDefaultStatusBarStyle() {
59
+ var _a, _b;
60
+ /**
61
+ * The 'DEFAULT' status bar style was added
62
+ * to the @capacitor/status-bar plugin in Capacitor 3.
63
+ * PluginHeaders is only supported in Capacitor 3+,
64
+ * so we can use this to detect Capacitor 3.
65
+ */
66
+ return !!((_b = (_a = win) === null || _a === void 0 ? void 0 : _a.Capacitor) === null || _b === void 0 ? void 0 : _b.PluginHeaders);
67
+ },
68
+ setStyle(options) {
69
+ const engine = this.getEngine();
70
+ if (!engine) {
71
+ return;
73
72
  }
74
- };
75
- const gesture = createGesture({
76
- el,
77
- gestureName: 'modalSwipeToClose',
78
- gesturePriority: 40,
79
- direction: 'y',
80
- threshold: 10,
81
- canStart,
82
- onStart,
83
- onMove,
84
- onEnd
85
- });
86
- return gesture;
87
- };
88
- const computeDuration = (remaining, velocity) => {
89
- return clamp(400, remaining / Math.abs(velocity * 1.1), 500);
73
+ engine.setStyle(options);
74
+ },
90
75
  };
91
76
 
92
77
  /*!
@@ -117,7 +102,14 @@ const getBackdropValueForSheet = (x, backdropBreakpoint) => {
117
102
  *
118
103
  * This is simplified from:
119
104
  * m = (1 - 0) / (maxBreakpoint - backdropBreakpoint)
105
+ *
106
+ * If the backdropBreakpoint is 1, we return 0 as the
107
+ * backdrop is completely hidden.
108
+ *
120
109
  */
110
+ if (backdropBreakpoint === 1) {
111
+ return 0;
112
+ }
121
113
  const slope = 1 / (1 - backdropBreakpoint);
122
114
  /**
123
115
  * From here, compute b which is
@@ -138,7 +130,410 @@ const getBackdropValueForSheet = (x, backdropBreakpoint) => {
138
130
  * backdrop offset given an arbitrary
139
131
  * gesture offset.
140
132
  */
141
- return (x * slope) + b;
133
+ return x * slope + b;
134
+ };
135
+ /**
136
+ * The tablet/desktop card modal activates
137
+ * when the window width is >= 768.
138
+ * At that point, the presenting element
139
+ * is not transformed, so we do not need to
140
+ * adjust the status bar color.
141
+ *
142
+ * Note: We check supportsDefaultStatusBarStyle so that
143
+ * Capacitor <= 2 users do not get their status bar
144
+ * stuck in an inconsistent state due to a lack of
145
+ * support for Style.Default.
146
+ */
147
+ const setCardStatusBarDark = () => {
148
+ if (!win || win.innerWidth >= 768 || !StatusBar.supportsDefaultStatusBarStyle()) {
149
+ return;
150
+ }
151
+ StatusBar.setStyle({ style: Style.Dark });
152
+ };
153
+ const setCardStatusBarDefault = () => {
154
+ if (!win || win.innerWidth >= 768 || !StatusBar.supportsDefaultStatusBarStyle()) {
155
+ return;
156
+ }
157
+ StatusBar.setStyle({ style: Style.Default });
158
+ };
159
+
160
+ /*!
161
+ * (C) Ionic http://ionicframework.com - MIT License
162
+ */
163
+ const handleCanDismiss = async (el, animation) => {
164
+ /**
165
+ * If canDismiss is not a function
166
+ * then we can return early. If canDismiss is `true`,
167
+ * then canDismissBlocksGesture is `false` as canDismiss
168
+ * will never interrupt the gesture. As a result,
169
+ * this code block is never reached. If canDismiss is `false`,
170
+ * then we never dismiss.
171
+ */
172
+ if (typeof el.canDismiss !== 'function') {
173
+ return;
174
+ }
175
+ /**
176
+ * Run the canDismiss callback.
177
+ * If the function returns `true`,
178
+ * then we can proceed with dismiss.
179
+ */
180
+ const shouldDismiss = await el.canDismiss();
181
+ if (!shouldDismiss) {
182
+ return;
183
+ }
184
+ /**
185
+ * If canDismiss resolved after the snap
186
+ * back animation finished, we can
187
+ * dismiss immediately.
188
+ *
189
+ * If canDismiss resolved before the snap
190
+ * back animation finished, we need to
191
+ * wait until the snap back animation is
192
+ * done before dismissing.
193
+ */
194
+ if (animation.isRunning()) {
195
+ animation.onFinish(() => {
196
+ el.dismiss(undefined, 'handler');
197
+ }, { oneTimeCallback: true });
198
+ }
199
+ else {
200
+ el.dismiss(undefined, 'handler');
201
+ }
202
+ };
203
+ /**
204
+ * This function lets us simulate a realistic spring-like animation
205
+ * when swiping down on the modal.
206
+ * There are two forces that we need to use to compute the spring physics:
207
+ *
208
+ * 1. Stiffness, k: This is a measure of resistance applied a spring.
209
+ * 2. Dampening, c: This value has the effect of reducing or preventing oscillation.
210
+ *
211
+ * Using these two values, we can calculate the Spring Force and the Dampening Force
212
+ * to compute the total force applied to a spring.
213
+ *
214
+ * Spring Force: This force pulls a spring back into its equilibrium position.
215
+ * Hooke's Law tells us that that spring force (FS) = kX.
216
+ * k is the stiffness of a spring, and X is the displacement of the spring from its
217
+ * equilibrium position. In this case, it is the amount by which the free end
218
+ * of a spring was displaced (stretched/pushed) from its "relaxed" position.
219
+ *
220
+ * Dampening Force: This force slows down motion. Without it, a spring would oscillate forever.
221
+ * The dampening force, FD, can be found via this formula: FD = -cv
222
+ * where c the dampening value and v is velocity.
223
+ *
224
+ * Therefore, the resulting force that is exerted on the block is:
225
+ * F = FS + FD = -kX - cv
226
+ *
227
+ * Newton's 2nd Law tells us that F = ma:
228
+ * ma = -kX - cv.
229
+ *
230
+ * For Ionic's purposes, we can assume that m = 1:
231
+ * a = -kX - cv
232
+ *
233
+ * Imagine a block attached to the end of a spring. At equilibrium
234
+ * the block is at position x = 1.
235
+ * Pressing on the block moves it to position x = 0;
236
+ * So, to calculate the displacement, we need to take the
237
+ * current position and subtract the previous position from it.
238
+ * X = x - x0 = 0 - 1 = -1.
239
+ *
240
+ * For Ionic's purposes, we are only pushing on the spring modal
241
+ * so we have a max position of 1.
242
+ * As a result, we can expand displacement to this formula:
243
+ * X = x - 1
244
+ *
245
+ * a = -k(x - 1) - cv
246
+ *
247
+ * We can represent the motion of something as a function of time: f(t) = x.
248
+ * The derivative of position gives us the velocity: f'(t)
249
+ * The derivative of the velocity gives us the acceleration: f''(t)
250
+ *
251
+ * We can substitute the formula above with these values:
252
+ *
253
+ * f"(t) = -k * (f(t) - 1) - c * f'(t)
254
+ *
255
+ * This is called a differential equation.
256
+ *
257
+ * We know that at t = 0, we are at x = 0 because the modal does not move: f(0) = 0
258
+ * This means our velocity is also zero: f'(0) = 0.
259
+ *
260
+ * We can cheat a bit and plug the formula into Wolfram Alpha.
261
+ * However, we need to pick stiffness and dampening values:
262
+ * k = 0.57
263
+ * c = 15
264
+ *
265
+ * I picked these as they are fairly close to native iOS's spring effect
266
+ * with the modal.
267
+ *
268
+ * What we plug in is this: f(0) = 0; f'(0) = 0; f''(t) = -0.57(f(t) - 1) - 15f'(t)
269
+ *
270
+ * The result is a formula that lets us calculate the acceleration
271
+ * for a given time t.
272
+ * Note: This is the approximate form of the solution. Wolfram Alpha will
273
+ * give you a complex differential equation too.
274
+ */
275
+ const calculateSpringStep = (t) => {
276
+ return 0.00255275 * 2.71828 ** (-14.9619 * t) - 1.00255 * 2.71828 ** (-0.0380968 * t) + 1;
277
+ };
278
+
279
+ /*!
280
+ * (C) Ionic http://ionicframework.com - MIT License
281
+ */
282
+ // Defaults for the card swipe animation
283
+ const SwipeToCloseDefaults = {
284
+ MIN_PRESENTING_SCALE: 0.93,
285
+ };
286
+ const createSwipeToCloseGesture = (el, animation, onDismiss) => {
287
+ /**
288
+ * The step value at which a card modal
289
+ * is eligible for dismissing via gesture.
290
+ */
291
+ const DISMISS_THRESHOLD = 0.5;
292
+ const height = el.offsetHeight;
293
+ let isOpen = false;
294
+ let canDismissBlocksGesture = false;
295
+ let contentEl = null;
296
+ let scrollEl = null;
297
+ const canDismissMaxStep = 0.2;
298
+ let initialScrollY = true;
299
+ let lastStep = 0;
300
+ const getScrollY = () => {
301
+ if (contentEl && isIonContent(contentEl)) {
302
+ return contentEl.scrollY;
303
+ /**
304
+ * Custom scroll containers are intended to be
305
+ * used with virtual scrolling, so we assume
306
+ * there is scrolling in this case.
307
+ */
308
+ }
309
+ else {
310
+ return true;
311
+ }
312
+ };
313
+ const canStart = (detail) => {
314
+ const target = detail.event.target;
315
+ if (target === null || !target.closest) {
316
+ return true;
317
+ }
318
+ /**
319
+ * If we are swiping on the content,
320
+ * swiping should only be possible if
321
+ * the content is scrolled all the way
322
+ * to the top so that we do not interfere
323
+ * with scrolling.
324
+ *
325
+ * We cannot assume that the `ion-content`
326
+ * target will remain consistent between
327
+ * swipes. For example, when using
328
+ * ion-nav within a card modal it is
329
+ * possible to swipe, push a view, and then
330
+ * swipe again. The target content will not
331
+ * be the same between swipes.
332
+ */
333
+ contentEl = findClosestIonContent(target);
334
+ if (contentEl) {
335
+ /**
336
+ * The card should never swipe to close
337
+ * on the content with a refresher.
338
+ * Note: We cannot solve this by making the
339
+ * swipeToClose gesture have a higher priority
340
+ * than the refresher gesture as the iOS native
341
+ * refresh gesture uses a scroll listener in
342
+ * addition to a gesture.
343
+ *
344
+ * Note: Do not use getScrollElement here
345
+ * because we need this to be a synchronous
346
+ * operation, and getScrollElement is
347
+ * asynchronous.
348
+ */
349
+ if (isIonContent(contentEl)) {
350
+ const root = getElementRoot(contentEl);
351
+ scrollEl = root.querySelector('.inner-scroll');
352
+ }
353
+ else {
354
+ scrollEl = contentEl;
355
+ }
356
+ const hasRefresherInContent = !!contentEl.querySelector('ion-refresher');
357
+ return !hasRefresherInContent && scrollEl.scrollTop === 0;
358
+ }
359
+ /**
360
+ * Card should be swipeable on all
361
+ * parts of the modal except for the footer.
362
+ */
363
+ const footer = target.closest('ion-footer');
364
+ if (footer === null) {
365
+ return true;
366
+ }
367
+ return false;
368
+ };
369
+ const onStart = (detail) => {
370
+ const { deltaY } = detail;
371
+ /**
372
+ * Get the initial scrollY value so
373
+ * that we can correctly reset the scrollY
374
+ * prop when the gesture ends.
375
+ */
376
+ initialScrollY = getScrollY();
377
+ /**
378
+ * If canDismiss is anything other than `true`
379
+ * then users should be able to swipe down
380
+ * until a threshold is hit. At that point,
381
+ * the card modal should not proceed any further.
382
+ * TODO (FW-937)
383
+ * Remove undefined check
384
+ */
385
+ canDismissBlocksGesture = el.canDismiss !== undefined && el.canDismiss !== true;
386
+ /**
387
+ * If we are pulling down, then
388
+ * it is possible we are pulling on the
389
+ * content. We do not want scrolling to
390
+ * happen at the same time as the gesture.
391
+ */
392
+ if (deltaY > 0 && contentEl) {
393
+ disableContentScrollY(contentEl);
394
+ }
395
+ animation.progressStart(true, isOpen ? 1 : 0);
396
+ };
397
+ const onMove = (detail) => {
398
+ const { deltaY } = detail;
399
+ /**
400
+ * If we are pulling down, then
401
+ * it is possible we are pulling on the
402
+ * content. We do not want scrolling to
403
+ * happen at the same time as the gesture.
404
+ */
405
+ if (deltaY > 0 && contentEl) {
406
+ disableContentScrollY(contentEl);
407
+ }
408
+ /**
409
+ * If we are swiping on the content
410
+ * then the swipe gesture should only
411
+ * happen if we are pulling down.
412
+ *
413
+ * However, if we pull up and
414
+ * then down such that the scroll position
415
+ * returns to 0, we should be able to swipe
416
+ * the card.
417
+ */
418
+ const step = detail.deltaY / height;
419
+ /**
420
+ * Check if user is swiping down and
421
+ * if we have a canDismiss value that
422
+ * should block the gesture from
423
+ * proceeding,
424
+ */
425
+ const isAttempingDismissWithCanDismiss = step >= 0 && canDismissBlocksGesture;
426
+ /**
427
+ * If we are blocking the gesture from dismissing,
428
+ * set the max step value so that the sheet cannot be
429
+ * completely hidden.
430
+ */
431
+ const maxStep = isAttempingDismissWithCanDismiss ? canDismissMaxStep : 0.9999;
432
+ /**
433
+ * If we are blocking the gesture from
434
+ * dismissing, calculate the spring modifier value
435
+ * this will be added to the starting breakpoint
436
+ * value to give the gesture a spring-like feeling.
437
+ * Note that the starting breakpoint is always 0,
438
+ * so we omit adding 0 to the result.
439
+ */
440
+ const processedStep = isAttempingDismissWithCanDismiss ? calculateSpringStep(step / maxStep) : step;
441
+ const clampedStep = clamp(0.0001, processedStep, maxStep);
442
+ animation.progressStep(clampedStep);
443
+ /**
444
+ * When swiping down half way, the status bar style
445
+ * should be reset to its default value.
446
+ *
447
+ * We track lastStep so that we do not fire these
448
+ * functions on every onMove, only when the user has
449
+ * crossed a certain threshold.
450
+ */
451
+ if (clampedStep >= DISMISS_THRESHOLD && lastStep < DISMISS_THRESHOLD) {
452
+ setCardStatusBarDefault();
453
+ /**
454
+ * However, if we swipe back up, then the
455
+ * status bar style should be set to have light
456
+ * text on a dark background.
457
+ */
458
+ }
459
+ else if (clampedStep < DISMISS_THRESHOLD && lastStep >= DISMISS_THRESHOLD) {
460
+ setCardStatusBarDark();
461
+ }
462
+ lastStep = clampedStep;
463
+ };
464
+ const onEnd = (detail) => {
465
+ const velocity = detail.velocityY;
466
+ const step = detail.deltaY / height;
467
+ const isAttempingDismissWithCanDismiss = step >= 0 && canDismissBlocksGesture;
468
+ const maxStep = isAttempingDismissWithCanDismiss ? canDismissMaxStep : 0.9999;
469
+ const processedStep = isAttempingDismissWithCanDismiss ? calculateSpringStep(step / maxStep) : step;
470
+ const clampedStep = clamp(0.0001, processedStep, maxStep);
471
+ const threshold = (detail.deltaY + velocity * 1000) / height;
472
+ /**
473
+ * If canDismiss blocks
474
+ * the swipe gesture, then the
475
+ * animation can never complete until
476
+ * canDismiss is checked.
477
+ */
478
+ const shouldComplete = !isAttempingDismissWithCanDismiss && threshold >= DISMISS_THRESHOLD;
479
+ let newStepValue = shouldComplete ? -0.001 : 0.001;
480
+ if (!shouldComplete) {
481
+ animation.easing('cubic-bezier(1, 0, 0.68, 0.28)');
482
+ newStepValue += getTimeGivenProgression([0, 0], [1, 0], [0.68, 0.28], [1, 1], clampedStep)[0];
483
+ }
484
+ else {
485
+ animation.easing('cubic-bezier(0.32, 0.72, 0, 1)');
486
+ newStepValue += getTimeGivenProgression([0, 0], [0.32, 0.72], [0, 1], [1, 1], clampedStep)[0];
487
+ }
488
+ const duration = shouldComplete
489
+ ? computeDuration(step * height, velocity)
490
+ : computeDuration((1 - clampedStep) * height, velocity);
491
+ isOpen = shouldComplete;
492
+ gesture.enable(false);
493
+ if (contentEl) {
494
+ resetContentScrollY(contentEl, initialScrollY);
495
+ }
496
+ animation
497
+ .onFinish(() => {
498
+ if (!shouldComplete) {
499
+ gesture.enable(true);
500
+ }
501
+ })
502
+ .progressEnd(shouldComplete ? 1 : 0, newStepValue, duration);
503
+ /**
504
+ * If the canDismiss value blocked the gesture
505
+ * from proceeding, then we should ignore whatever
506
+ * shouldComplete is. Whether or not the modal
507
+ * animation should complete is now determined by
508
+ * canDismiss.
509
+ *
510
+ * If the user swiped >25% of the way
511
+ * to the max step, then we should
512
+ * check canDismiss. 25% was chosen
513
+ * to avoid accidental swipes.
514
+ */
515
+ if (isAttempingDismissWithCanDismiss && clampedStep > maxStep / 4) {
516
+ handleCanDismiss(el, animation);
517
+ }
518
+ else if (shouldComplete) {
519
+ onDismiss();
520
+ }
521
+ };
522
+ const gesture = createGesture({
523
+ el,
524
+ gestureName: 'modalSwipeToClose',
525
+ gesturePriority: 39,
526
+ direction: 'y',
527
+ threshold: 10,
528
+ canStart,
529
+ onStart,
530
+ onMove,
531
+ onEnd,
532
+ });
533
+ return gesture;
534
+ };
535
+ const computeDuration = (remaining, velocity) => {
536
+ return clamp(400, remaining / Math.abs(velocity * 1.1), 500);
142
537
  };
143
538
 
144
539
  /*!
@@ -153,19 +548,17 @@ const createSheetEnterAnimation = (opts) => {
153
548
  */
154
549
  const shouldShowBackdrop = backdropBreakpoint === undefined || backdropBreakpoint < currentBreakpoint;
155
550
  const initialBackdrop = shouldShowBackdrop ? `calc(var(--backdrop-opacity) * ${currentBreakpoint})` : '0';
156
- const backdropAnimation = createAnimation('backdropAnimation')
157
- .fromTo('opacity', 0, initialBackdrop);
551
+ const backdropAnimation = createAnimation('backdropAnimation').fromTo('opacity', 0, initialBackdrop);
158
552
  if (shouldShowBackdrop) {
159
553
  backdropAnimation
160
554
  .beforeStyles({
161
- 'pointer-events': 'none'
555
+ 'pointer-events': 'none',
162
556
  })
163
557
  .afterClearStyles(['pointer-events']);
164
558
  }
165
- const wrapperAnimation = createAnimation('wrapperAnimation')
166
- .keyframes([
559
+ const wrapperAnimation = createAnimation('wrapperAnimation').keyframes([
167
560
  { offset: 0, opacity: 1, transform: 'translateY(100%)' },
168
- { offset: 1, opacity: 1, transform: `translateY(${100 - (currentBreakpoint * 100)}%)` }
561
+ { offset: 1, opacity: 1, transform: `translateY(${100 - currentBreakpoint * 100}%)` },
169
562
  ]);
170
563
  return { wrapperAnimation, backdropAnimation };
171
564
  };
@@ -179,19 +572,17 @@ const createSheetLeaveAnimation = (opts) => {
179
572
  const backdropValue = `calc(var(--backdrop-opacity) * ${getBackdropValueForSheet(currentBreakpoint, backdropBreakpoint)})`;
180
573
  const defaultBackdrop = [
181
574
  { offset: 0, opacity: backdropValue },
182
- { offset: 1, opacity: 0 }
575
+ { offset: 1, opacity: 0 },
183
576
  ];
184
577
  const customBackdrop = [
185
578
  { offset: 0, opacity: backdropValue },
186
579
  { offset: backdropBreakpoint, opacity: 0 },
187
- { offset: 1, opacity: 0 }
580
+ { offset: 1, opacity: 0 },
188
581
  ];
189
- const backdropAnimation = createAnimation('backdropAnimation')
190
- .keyframes(backdropBreakpoint !== 0 ? customBackdrop : defaultBackdrop);
191
- const wrapperAnimation = createAnimation('wrapperAnimation')
192
- .keyframes([
193
- { offset: 0, opacity: 1, transform: `translateY(${100 - (currentBreakpoint * 100)}%)` },
194
- { offset: 1, opacity: 1, transform: `translateY(100%)` }
582
+ const backdropAnimation = createAnimation('backdropAnimation').keyframes(backdropBreakpoint !== 0 ? customBackdrop : defaultBackdrop);
583
+ const wrapperAnimation = createAnimation('wrapperAnimation').keyframes([
584
+ { offset: 0, opacity: 1, transform: `translateY(${100 - currentBreakpoint * 100}%)` },
585
+ { offset: 1, opacity: 1, transform: `translateY(100%)` },
195
586
  ]);
196
587
  return { wrapperAnimation, backdropAnimation };
197
588
  };
@@ -203,11 +594,10 @@ const createEnterAnimation$1 = () => {
203
594
  const backdropAnimation = createAnimation()
204
595
  .fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
205
596
  .beforeStyles({
206
- 'pointer-events': 'none'
597
+ 'pointer-events': 'none',
207
598
  })
208
599
  .afterClearStyles(['pointer-events']);
209
- const wrapperAnimation = createAnimation()
210
- .fromTo('transform', 'translateY(100vh)', 'translateY(0vh)');
600
+ const wrapperAnimation = createAnimation().fromTo('transform', 'translateY(100vh)', 'translateY(0vh)');
211
601
  return { backdropAnimation, wrapperAnimation };
212
602
  };
213
603
  /**
@@ -217,11 +607,8 @@ const iosEnterAnimation = (baseEl, opts) => {
217
607
  const { presentingEl, currentBreakpoint } = opts;
218
608
  const root = getElementRoot(baseEl);
219
609
  const { wrapperAnimation, backdropAnimation } = currentBreakpoint !== undefined ? createSheetEnterAnimation(opts) : createEnterAnimation$1();
220
- backdropAnimation
221
- .addElement(root.querySelector('ion-backdrop'));
222
- wrapperAnimation
223
- .addElement(root.querySelectorAll('.modal-wrapper, .modal-shadow'))
224
- .beforeStyles({ 'opacity': 1 });
610
+ backdropAnimation.addElement(root.querySelector('ion-backdrop'));
611
+ wrapperAnimation.addElement(root.querySelectorAll('.modal-wrapper, .modal-shadow')).beforeStyles({ opacity: 1 });
225
612
  const baseAnimation = createAnimation('entering-base')
226
613
  .addElement(baseEl)
227
614
  .easing('cubic-bezier(0.32,0.72,0,1)')
@@ -229,13 +616,12 @@ const iosEnterAnimation = (baseEl, opts) => {
229
616
  .addAnimation(wrapperAnimation);
230
617
  if (presentingEl) {
231
618
  const isMobile = window.innerWidth < 768;
232
- const hasCardModal = (presentingEl.tagName === 'ION-MODAL' && presentingEl.presentingElement !== undefined);
619
+ const hasCardModal = presentingEl.tagName === 'ION-MODAL' && presentingEl.presentingElement !== undefined;
233
620
  const presentingElRoot = getElementRoot(presentingEl);
234
- const presentingAnimation = createAnimation()
235
- .beforeStyles({
236
- 'transform': 'translateY(0)',
621
+ const presentingAnimation = createAnimation().beforeStyles({
622
+ transform: 'translateY(0)',
237
623
  'transform-origin': 'top center',
238
- 'overflow': 'hidden'
624
+ overflow: 'hidden',
239
625
  });
240
626
  const bodyEl = document.body;
241
627
  if (isMobile) {
@@ -244,19 +630,19 @@ const iosEnterAnimation = (baseEl, opts) => {
244
630
  * No need to worry about statusbar padding since engines like Gecko
245
631
  * are not used as the engine for standalone Cordova/Capacitor apps
246
632
  */
247
- const transformOffset = (!CSS.supports('width', 'max(0px, 1px)')) ? '30px' : 'max(30px, var(--ion-safe-area-top))';
633
+ const transformOffset = !CSS.supports('width', 'max(0px, 1px)') ? '30px' : 'max(30px, var(--ion-safe-area-top))';
248
634
  const modalTransform = hasCardModal ? '-10px' : transformOffset;
249
635
  const toPresentingScale = SwipeToCloseDefaults.MIN_PRESENTING_SCALE;
250
636
  const finalTransform = `translateY(${modalTransform}) scale(${toPresentingScale})`;
251
637
  presentingAnimation
252
638
  .afterStyles({
253
- 'transform': finalTransform
639
+ transform: finalTransform,
254
640
  })
255
641
  .beforeAddWrite(() => bodyEl.style.setProperty('background-color', 'black'))
256
642
  .addElement(presentingEl)
257
643
  .keyframes([
258
644
  { offset: 0, filter: 'contrast(1)', transform: 'translateY(0px) scale(1)', borderRadius: '0px' },
259
- { offset: 1, filter: 'contrast(0.85)', transform: finalTransform, borderRadius: '10px 10px 0 0' }
645
+ { offset: 1, filter: 'contrast(0.85)', transform: finalTransform, borderRadius: '10px 10px 0 0' },
260
646
  ]);
261
647
  baseAnimation.addAnimation(presentingAnimation);
262
648
  }
@@ -266,25 +652,25 @@ const iosEnterAnimation = (baseEl, opts) => {
266
652
  wrapperAnimation.fromTo('opacity', '0', '1');
267
653
  }
268
654
  else {
269
- const toPresentingScale = (hasCardModal) ? SwipeToCloseDefaults.MIN_PRESENTING_SCALE : 1;
655
+ const toPresentingScale = hasCardModal ? SwipeToCloseDefaults.MIN_PRESENTING_SCALE : 1;
270
656
  const finalTransform = `translateY(-10px) scale(${toPresentingScale})`;
271
657
  presentingAnimation
272
658
  .afterStyles({
273
- 'transform': finalTransform
659
+ transform: finalTransform,
274
660
  })
275
661
  .addElement(presentingElRoot.querySelector('.modal-wrapper'))
276
662
  .keyframes([
277
663
  { offset: 0, filter: 'contrast(1)', transform: 'translateY(0) scale(1)' },
278
- { offset: 1, filter: 'contrast(0.85)', transform: finalTransform }
664
+ { offset: 1, filter: 'contrast(0.85)', transform: finalTransform },
279
665
  ]);
280
666
  const shadowAnimation = createAnimation()
281
667
  .afterStyles({
282
- 'transform': finalTransform
668
+ transform: finalTransform,
283
669
  })
284
670
  .addElement(presentingElRoot.querySelector('.modal-shadow'))
285
671
  .keyframes([
286
672
  { offset: 0, opacity: '1', transform: 'translateY(0) scale(1)' },
287
- { offset: 1, opacity: '0', transform: finalTransform }
673
+ { offset: 1, opacity: '0', transform: finalTransform },
288
674
  ]);
289
675
  baseAnimation.addAnimation([presentingAnimation, shadowAnimation]);
290
676
  }
@@ -300,10 +686,8 @@ const iosEnterAnimation = (baseEl, opts) => {
300
686
  * (C) Ionic http://ionicframework.com - MIT License
301
687
  */
302
688
  const createLeaveAnimation$1 = () => {
303
- const backdropAnimation = createAnimation()
304
- .fromTo('opacity', 'var(--backdrop-opacity)', 0);
305
- const wrapperAnimation = createAnimation()
306
- .fromTo('transform', 'translateY(0vh)', 'translateY(100vh)');
689
+ const backdropAnimation = createAnimation().fromTo('opacity', 'var(--backdrop-opacity)', 0);
690
+ const wrapperAnimation = createAnimation().fromTo('transform', 'translateY(0vh)', 'translateY(100vh)');
307
691
  return { backdropAnimation, wrapperAnimation };
308
692
  };
309
693
  /**
@@ -314,9 +698,7 @@ const iosLeaveAnimation = (baseEl, opts, duration = 500) => {
314
698
  const root = getElementRoot(baseEl);
315
699
  const { wrapperAnimation, backdropAnimation } = currentBreakpoint !== undefined ? createSheetLeaveAnimation(opts) : createLeaveAnimation$1();
316
700
  backdropAnimation.addElement(root.querySelector('ion-backdrop'));
317
- wrapperAnimation
318
- .addElement(root.querySelectorAll('.modal-wrapper, .modal-shadow'))
319
- .beforeStyles({ 'opacity': 1 });
701
+ wrapperAnimation.addElement(root.querySelectorAll('.modal-wrapper, .modal-shadow')).beforeStyles({ opacity: 1 });
320
702
  const baseAnimation = createAnimation('leaving-base')
321
703
  .addElement(baseEl)
322
704
  .easing('cubic-bezier(0.32,0.72,0,1)')
@@ -324,33 +706,31 @@ const iosLeaveAnimation = (baseEl, opts, duration = 500) => {
324
706
  .addAnimation(wrapperAnimation);
325
707
  if (presentingEl) {
326
708
  const isMobile = window.innerWidth < 768;
327
- const hasCardModal = (presentingEl.tagName === 'ION-MODAL' && presentingEl.presentingElement !== undefined);
709
+ const hasCardModal = presentingEl.tagName === 'ION-MODAL' && presentingEl.presentingElement !== undefined;
328
710
  const presentingElRoot = getElementRoot(presentingEl);
329
711
  const presentingAnimation = createAnimation()
330
712
  .beforeClearStyles(['transform'])
331
713
  .afterClearStyles(['transform'])
332
- .onFinish(currentStep => {
714
+ .onFinish((currentStep) => {
333
715
  // only reset background color if this is the last card-style modal
334
716
  if (currentStep !== 1) {
335
717
  return;
336
718
  }
337
719
  presentingEl.style.setProperty('overflow', '');
338
- const numModals = Array.from(bodyEl.querySelectorAll('ion-modal')).filter(m => m.presentingElement !== undefined).length;
720
+ const numModals = Array.from(bodyEl.querySelectorAll('ion-modal')).filter((m) => m.presentingElement !== undefined).length;
339
721
  if (numModals <= 1) {
340
722
  bodyEl.style.setProperty('background-color', '');
341
723
  }
342
724
  });
343
725
  const bodyEl = document.body;
344
726
  if (isMobile) {
345
- const transformOffset = (!CSS.supports('width', 'max(0px, 1px)')) ? '30px' : 'max(30px, var(--ion-safe-area-top))';
727
+ const transformOffset = !CSS.supports('width', 'max(0px, 1px)') ? '30px' : 'max(30px, var(--ion-safe-area-top))';
346
728
  const modalTransform = hasCardModal ? '-10px' : transformOffset;
347
729
  const toPresentingScale = SwipeToCloseDefaults.MIN_PRESENTING_SCALE;
348
730
  const finalTransform = `translateY(${modalTransform}) scale(${toPresentingScale})`;
349
- presentingAnimation
350
- .addElement(presentingEl)
351
- .keyframes([
731
+ presentingAnimation.addElement(presentingEl).keyframes([
352
732
  { offset: 0, filter: 'contrast(0.85)', transform: finalTransform, borderRadius: '10px 10px 0 0' },
353
- { offset: 1, filter: 'contrast(1)', transform: 'translateY(0px) scale(1)', borderRadius: '0px' }
733
+ { offset: 1, filter: 'contrast(1)', transform: 'translateY(0px) scale(1)', borderRadius: '0px' },
354
734
  ]);
355
735
  baseAnimation.addAnimation(presentingAnimation);
356
736
  }
@@ -360,25 +740,25 @@ const iosLeaveAnimation = (baseEl, opts, duration = 500) => {
360
740
  wrapperAnimation.fromTo('opacity', '1', '0');
361
741
  }
362
742
  else {
363
- const toPresentingScale = (hasCardModal) ? SwipeToCloseDefaults.MIN_PRESENTING_SCALE : 1;
743
+ const toPresentingScale = hasCardModal ? SwipeToCloseDefaults.MIN_PRESENTING_SCALE : 1;
364
744
  const finalTransform = `translateY(-10px) scale(${toPresentingScale})`;
365
745
  presentingAnimation
366
746
  .addElement(presentingElRoot.querySelector('.modal-wrapper'))
367
747
  .afterStyles({
368
- 'transform': 'translate3d(0, 0, 0)'
748
+ transform: 'translate3d(0, 0, 0)',
369
749
  })
370
750
  .keyframes([
371
751
  { offset: 0, filter: 'contrast(0.85)', transform: finalTransform },
372
- { offset: 1, filter: 'contrast(1)', transform: 'translateY(0) scale(1)' }
752
+ { offset: 1, filter: 'contrast(1)', transform: 'translateY(0) scale(1)' },
373
753
  ]);
374
754
  const shadowAnimation = createAnimation()
375
755
  .addElement(presentingElRoot.querySelector('.modal-shadow'))
376
756
  .afterStyles({
377
- 'transform': 'translateY(0) scale(1)'
757
+ transform: 'translateY(0) scale(1)',
378
758
  })
379
759
  .keyframes([
380
760
  { offset: 0, opacity: '0', transform: finalTransform },
381
- { offset: 1, opacity: '1', transform: 'translateY(0) scale(1)' }
761
+ { offset: 1, opacity: '1', transform: 'translateY(0) scale(1)' },
382
762
  ]);
383
763
  baseAnimation.addAnimation([presentingAnimation, shadowAnimation]);
384
764
  }
@@ -397,13 +777,12 @@ const createEnterAnimation = () => {
397
777
  const backdropAnimation = createAnimation()
398
778
  .fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
399
779
  .beforeStyles({
400
- 'pointer-events': 'none'
780
+ 'pointer-events': 'none',
401
781
  })
402
782
  .afterClearStyles(['pointer-events']);
403
- const wrapperAnimation = createAnimation()
404
- .keyframes([
783
+ const wrapperAnimation = createAnimation().keyframes([
405
784
  { offset: 0, opacity: 0.01, transform: 'translateY(40px)' },
406
- { offset: 1, opacity: 1, transform: `translateY(0px)` }
785
+ { offset: 1, opacity: 1, transform: `translateY(0px)` },
407
786
  ]);
408
787
  return { backdropAnimation, wrapperAnimation };
409
788
  };
@@ -414,10 +793,8 @@ const mdEnterAnimation = (baseEl, opts) => {
414
793
  const { currentBreakpoint } = opts;
415
794
  const root = getElementRoot(baseEl);
416
795
  const { wrapperAnimation, backdropAnimation } = currentBreakpoint !== undefined ? createSheetEnterAnimation(opts) : createEnterAnimation();
417
- backdropAnimation
418
- .addElement(root.querySelector('ion-backdrop'));
419
- wrapperAnimation
420
- .addElement(root.querySelector('.modal-wrapper'));
796
+ backdropAnimation.addElement(root.querySelector('ion-backdrop'));
797
+ wrapperAnimation.addElement(root.querySelector('.modal-wrapper'));
421
798
  return createAnimation()
422
799
  .addElement(baseEl)
423
800
  .easing('cubic-bezier(0.36,0.66,0.04,1)')
@@ -429,12 +806,10 @@ const mdEnterAnimation = (baseEl, opts) => {
429
806
  * (C) Ionic http://ionicframework.com - MIT License
430
807
  */
431
808
  const createLeaveAnimation = () => {
432
- const backdropAnimation = createAnimation()
433
- .fromTo('opacity', 'var(--backdrop-opacity)', 0);
434
- const wrapperAnimation = createAnimation()
435
- .keyframes([
809
+ const backdropAnimation = createAnimation().fromTo('opacity', 'var(--backdrop-opacity)', 0);
810
+ const wrapperAnimation = createAnimation().keyframes([
436
811
  { offset: 0, opacity: 0.99, transform: `translateY(0px)` },
437
- { offset: 1, opacity: 0, transform: 'translateY(40px)' }
812
+ { offset: 1, opacity: 0, transform: 'translateY(40px)' },
438
813
  ]);
439
814
  return { backdropAnimation, wrapperAnimation };
440
815
  };
@@ -456,31 +831,34 @@ const mdLeaveAnimation = (baseEl, opts) => {
456
831
  /*!
457
832
  * (C) Ionic http://ionicframework.com - MIT License
458
833
  */
459
- const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, backdropBreakpoint, animation, breakpoints = [], onDismiss, onBreakpointChange) => {
834
+ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, backdropBreakpoint, animation, breakpoints = [], getCurrentBreakpoint, onDismiss, onBreakpointChange) => {
460
835
  // Defaults for the sheet swipe animation
461
836
  const defaultBackdrop = [
462
837
  { offset: 0, opacity: 'var(--backdrop-opacity)' },
463
- { offset: 1, opacity: 0.01 }
838
+ { offset: 1, opacity: 0.01 },
464
839
  ];
465
840
  const customBackdrop = [
466
841
  { offset: 0, opacity: 'var(--backdrop-opacity)' },
467
842
  { offset: 1 - backdropBreakpoint, opacity: 0 },
468
- { offset: 1, opacity: 0 }
843
+ { offset: 1, opacity: 0 },
469
844
  ];
470
845
  const SheetDefaults = {
471
846
  WRAPPER_KEYFRAMES: [
472
847
  { offset: 0, transform: 'translateY(0%)' },
473
- { offset: 1, transform: 'translateY(100%)' }
848
+ { offset: 1, transform: 'translateY(100%)' },
474
849
  ],
475
- BACKDROP_KEYFRAMES: (backdropBreakpoint !== 0) ? customBackdrop : defaultBackdrop
850
+ BACKDROP_KEYFRAMES: backdropBreakpoint !== 0 ? customBackdrop : defaultBackdrop,
476
851
  };
477
852
  const contentEl = baseEl.querySelector('ion-content');
478
853
  const height = wrapperEl.clientHeight;
479
854
  let currentBreakpoint = initialBreakpoint;
480
855
  let offset = 0;
481
- const wrapperAnimation = animation.childAnimations.find(ani => ani.id === 'wrapperAnimation');
482
- const backdropAnimation = animation.childAnimations.find(ani => ani.id === 'backdropAnimation');
856
+ let canDismissBlocksGesture = false;
857
+ const canDismissMaxStep = 0.95;
858
+ const wrapperAnimation = animation.childAnimations.find((ani) => ani.id === 'wrapperAnimation');
859
+ const backdropAnimation = animation.childAnimations.find((ani) => ani.id === 'backdropAnimation');
483
860
  const maxBreakpoint = breakpoints[breakpoints.length - 1];
861
+ const minBreakpoint = breakpoints[0];
484
862
  const enableBackdrop = () => {
485
863
  baseEl.style.setProperty('pointer-events', 'auto');
486
864
  backdropEl.style.setProperty('pointer-events', 'auto');
@@ -541,12 +919,26 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
541
919
  * allow for scrolling on the content.
542
920
  */
543
921
  const content = detail.event.target.closest('ion-content');
922
+ currentBreakpoint = getCurrentBreakpoint();
544
923
  if (currentBreakpoint === 1 && content) {
545
924
  return false;
546
925
  }
547
926
  return true;
548
927
  };
549
928
  const onStart = () => {
929
+ /**
930
+ * If canDismiss is anything other than `true`
931
+ * then users should be able to swipe down
932
+ * until a threshold is hit. At that point,
933
+ * the card modal should not proceed any further.
934
+ *
935
+ * canDismiss is never fired via gesture if there is
936
+ * no 0 breakpoint. However, it can be fired if the user
937
+ * presses Esc or the hardware back button.
938
+ * TODO (FW-937)
939
+ * Remove undefined check
940
+ */
941
+ canDismissBlocksGesture = baseEl.canDismiss !== undefined && baseEl.canDismiss !== true && minBreakpoint === 0;
550
942
  /**
551
943
  * If swiping on the content
552
944
  * we should disable scrolling otherwise
@@ -571,7 +963,34 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
571
963
  * relative to where the user dragged.
572
964
  */
573
965
  const initialStep = 1 - currentBreakpoint;
574
- offset = clamp(0.0001, initialStep + (detail.deltaY / height), 0.9999);
966
+ const secondToLastBreakpoint = breakpoints.length > 1 ? 1 - breakpoints[1] : undefined;
967
+ const step = initialStep + detail.deltaY / height;
968
+ const isAttemptingDismissWithCanDismiss = secondToLastBreakpoint !== undefined && step >= secondToLastBreakpoint && canDismissBlocksGesture;
969
+ /**
970
+ * If we are blocking the gesture from dismissing,
971
+ * set the max step value so that the sheet cannot be
972
+ * completely hidden.
973
+ */
974
+ const maxStep = isAttemptingDismissWithCanDismiss ? canDismissMaxStep : 0.9999;
975
+ /**
976
+ * If we are blocking the gesture from
977
+ * dismissing, calculate the spring modifier value
978
+ * this will be added to the starting breakpoint
979
+ * value to give the gesture a spring-like feeling.
980
+ * Note that when isAttemptingDismissWithCanDismiss is true,
981
+ * the modifier is always added to the breakpoint that
982
+ * appears right after the 0 breakpoint.
983
+ *
984
+ * Note that this modifier is essentially the progression
985
+ * between secondToLastBreakpoint and maxStep which is
986
+ * why we subtract secondToLastBreakpoint. This lets us get
987
+ * the result as a value from 0 to 1.
988
+ */
989
+ const processedStep = isAttemptingDismissWithCanDismiss && secondToLastBreakpoint !== undefined
990
+ ? secondToLastBreakpoint +
991
+ calculateSpringStep((step - secondToLastBreakpoint) / (maxStep - secondToLastBreakpoint))
992
+ : step;
993
+ offset = clamp(0.0001, processedStep, maxStep);
575
994
  animation.progressStep(offset);
576
995
  };
577
996
  const onEnd = (detail) => {
@@ -585,7 +1004,23 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
585
1004
  const closest = breakpoints.reduce((a, b) => {
586
1005
  return Math.abs(b - diff) < Math.abs(a - diff) ? b : a;
587
1006
  });
588
- const shouldRemainOpen = closest !== 0;
1007
+ moveSheetToBreakpoint({
1008
+ breakpoint: closest,
1009
+ breakpointOffset: offset,
1010
+ canDismiss: canDismissBlocksGesture,
1011
+ });
1012
+ };
1013
+ const moveSheetToBreakpoint = (options) => {
1014
+ const { breakpoint, canDismiss, breakpointOffset } = options;
1015
+ /**
1016
+ * canDismiss should only prevent snapping
1017
+ * when users are trying to dismiss. If canDismiss
1018
+ * is present but the user is trying to swipe upwards,
1019
+ * we should allow that to happen,
1020
+ */
1021
+ const shouldPreventDismiss = canDismiss && breakpoint === 0;
1022
+ const snapToBreakpoint = shouldPreventDismiss ? currentBreakpoint : breakpoint;
1023
+ const shouldRemainOpen = snapToBreakpoint !== 0;
589
1024
  currentBreakpoint = 0;
590
1025
  /**
591
1026
  * Update the animation so that it plays from
@@ -593,12 +1028,18 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
593
1028
  */
594
1029
  if (wrapperAnimation && backdropAnimation) {
595
1030
  wrapperAnimation.keyframes([
596
- { offset: 0, transform: `translateY(${offset * 100}%)` },
597
- { offset: 1, transform: `translateY(${(1 - closest) * 100}%)` }
1031
+ { offset: 0, transform: `translateY(${breakpointOffset * 100}%)` },
1032
+ { offset: 1, transform: `translateY(${(1 - snapToBreakpoint) * 100}%)` },
598
1033
  ]);
599
1034
  backdropAnimation.keyframes([
600
- { offset: 0, opacity: `calc(var(--backdrop-opacity) * ${getBackdropValueForSheet(1 - offset, backdropBreakpoint)})` },
601
- { offset: 1, opacity: `calc(var(--backdrop-opacity) * ${getBackdropValueForSheet(closest, backdropBreakpoint)})` }
1035
+ {
1036
+ offset: 0,
1037
+ opacity: `calc(var(--backdrop-opacity) * ${getBackdropValueForSheet(1 - breakpointOffset, backdropBreakpoint)})`,
1038
+ },
1039
+ {
1040
+ offset: 1,
1041
+ opacity: `calc(var(--backdrop-opacity) * ${getBackdropValueForSheet(snapToBreakpoint, backdropBreakpoint)})`,
1042
+ },
602
1043
  ]);
603
1044
  animation.progressStep(0);
604
1045
  }
@@ -607,58 +1048,68 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
607
1048
  * snapping animation completes.
608
1049
  */
609
1050
  gesture.enable(false);
610
- animation
611
- .onFinish(() => {
612
- if (shouldRemainOpen) {
613
- /**
614
- * Once the snapping animation completes,
615
- * we need to reset the animation to go
616
- * from 0 to 1 so users can swipe in any direction.
617
- * We then set the animation offset to the current
618
- * breakpoint so that it starts at the snapped position.
619
- */
620
- if (wrapperAnimation && backdropAnimation) {
621
- raf(() => {
622
- wrapperAnimation.keyframes([...SheetDefaults.WRAPPER_KEYFRAMES]);
623
- backdropAnimation.keyframes([...SheetDefaults.BACKDROP_KEYFRAMES]);
624
- animation.progressStart(true, 1 - closest);
625
- currentBreakpoint = closest;
626
- onBreakpointChange(currentBreakpoint);
627
- /**
628
- * If the sheet is fully expanded, we can safely
629
- * enable scrolling again.
630
- */
631
- if (contentEl && currentBreakpoint === breakpoints[breakpoints.length - 1]) {
632
- contentEl.scrollY = true;
633
- }
634
- /**
635
- * Backdrop should become enabled
636
- * after the backdropBreakpoint value
637
- */
638
- const shouldEnableBackdrop = currentBreakpoint > backdropBreakpoint;
639
- if (shouldEnableBackdrop) {
640
- enableBackdrop();
641
- }
642
- else {
643
- disableBackdrop();
644
- }
1051
+ if (shouldPreventDismiss) {
1052
+ handleCanDismiss(baseEl, animation);
1053
+ }
1054
+ else if (!shouldRemainOpen) {
1055
+ onDismiss();
1056
+ }
1057
+ return new Promise((resolve) => {
1058
+ animation
1059
+ .onFinish(() => {
1060
+ if (shouldRemainOpen) {
1061
+ /**
1062
+ * Once the snapping animation completes,
1063
+ * we need to reset the animation to go
1064
+ * from 0 to 1 so users can swipe in any direction.
1065
+ * We then set the animation offset to the current
1066
+ * breakpoint so that it starts at the snapped position.
1067
+ */
1068
+ if (wrapperAnimation && backdropAnimation) {
1069
+ raf(() => {
1070
+ wrapperAnimation.keyframes([...SheetDefaults.WRAPPER_KEYFRAMES]);
1071
+ backdropAnimation.keyframes([...SheetDefaults.BACKDROP_KEYFRAMES]);
1072
+ animation.progressStart(true, 1 - snapToBreakpoint);
1073
+ currentBreakpoint = snapToBreakpoint;
1074
+ onBreakpointChange(currentBreakpoint);
1075
+ /**
1076
+ * If the sheet is fully expanded, we can safely
1077
+ * enable scrolling again.
1078
+ */
1079
+ if (contentEl && currentBreakpoint === breakpoints[breakpoints.length - 1]) {
1080
+ contentEl.scrollY = true;
1081
+ }
1082
+ /**
1083
+ * Backdrop should become enabled
1084
+ * after the backdropBreakpoint value
1085
+ */
1086
+ const shouldEnableBackdrop = currentBreakpoint > backdropBreakpoint;
1087
+ if (shouldEnableBackdrop) {
1088
+ enableBackdrop();
1089
+ }
1090
+ else {
1091
+ disableBackdrop();
1092
+ }
1093
+ gesture.enable(true);
1094
+ resolve();
1095
+ });
1096
+ }
1097
+ else {
645
1098
  gesture.enable(true);
646
- });
1099
+ resolve();
1100
+ }
647
1101
  }
648
1102
  else {
649
- gesture.enable(true);
1103
+ resolve();
650
1104
  }
651
- }
652
- /**
653
- * This must be a one time callback
654
- * otherwise a new callback will
655
- * be added every time onEnd runs.
656
- */
657
- }, { oneTimeCallback: true })
658
- .progressEnd(1, 0, 500);
659
- if (!shouldRemainOpen) {
660
- onDismiss();
661
- }
1105
+ /**
1106
+ * This must be a one time callback
1107
+ * otherwise a new callback will
1108
+ * be added every time onEnd runs.
1109
+ */
1110
+ }, { oneTimeCallback: true })
1111
+ .progressEnd(1, 0, 500);
1112
+ });
662
1113
  };
663
1114
  const gesture = createGesture({
664
1115
  el: wrapperEl,
@@ -669,14 +1120,17 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
669
1120
  canStart,
670
1121
  onStart,
671
1122
  onMove,
672
- onEnd
1123
+ onEnd,
673
1124
  });
674
- return gesture;
1125
+ return {
1126
+ gesture,
1127
+ moveSheetToBreakpoint,
1128
+ };
675
1129
  };
676
1130
 
677
- const modalIosCss = ":host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:flex;position:absolute;align-items:center;justify-content:center;outline:none;contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{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);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px;--ion-safe-area-top:0px;--ion-safe-area-bottom:0px;--ion-safe-area-right:0px;--ion-safe-area-left:0px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;margin-left:auto;margin-right:auto;position:absolute;width:36px;height:5px;transform:translateZ(0);background:var(--ion-color-step-350, #c0c0be);z-index:11}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.modal-handle{margin-left:unset;margin-right:unset;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto}}:host(.modal-sheet){--height:calc(100% - (var(--ion-safe-area-top) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.4)}:host(.modal-card),:host(.modal-sheet){--border-radius:10px}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:10px}}.modal-wrapper{transform:translate3d(0, 100%, 0)}@media screen and (max-width: 767px){@supports (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - max(30px, var(--ion-safe-area-top)) - 10px)}}@supports not (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - 40px)}}:host(.modal-card) .modal-wrapper{border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);border-bottom-right-radius:0;border-bottom-left-radius:0}:host-context([dir=rtl]):host(.modal-card) .modal-wrapper,:host-context([dir=rtl]).modal-card .modal-wrapper{border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);border-bottom-right-radius:0;border-bottom-left-radius:0}:host(.modal-card){--backdrop-opacity:0;--width:100%;align-items:flex-end}:host(.modal-card) .modal-shadow{display:none}:host(.modal-card) ion-backdrop{pointer-events:none}}@media screen and (min-width: 768px){:host(.modal-card){--width:calc(100% - 120px);--height:calc(100% - (120px + var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));--max-width:720px;--max-height:1000px;--backdrop-opacity:0;--box-shadow:0px 0px 30px 10px rgba(0, 0, 0, 0.1);transition:all 0.5s ease-in-out}:host(.modal-card) .modal-wrapper{box-shadow:none}:host(.modal-card) .modal-shadow{box-shadow:var(--box-shadow)}}:host(.modal-sheet) .modal-wrapper{border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);border-bottom-right-radius:0;border-bottom-left-radius:0}:host-context([dir=rtl]):host(.modal-sheet) .modal-wrapper,:host-context([dir=rtl]).modal-sheet .modal-wrapper{border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);border-bottom-right-radius:0;border-bottom-left-radius:0}";
1131
+ const modalIosCss = ":host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:flex;position:absolute;align-items:center;justify-content:center;outline:none;contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{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);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px;--ion-safe-area-top:0px;--ion-safe-area-bottom:0px;--ion-safe-area-right:0px;--ion-safe-area-left:0px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;margin-left:auto;margin-right:auto;position:absolute;width:36px;height:5px;transform:translateZ(0);border:0;background:var(--ion-color-step-350, #c0c0be);cursor:pointer;z-index:11}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.modal-handle{margin-left:unset;margin-right:unset;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto}}.modal-handle::before{padding-left:4px;padding-right:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;transform:translate(-50%, -50%);content:\"\"}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.modal-handle::before{padding-left:unset;padding-right:unset;-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px}}:host(.modal-sheet){--height:calc(100% - (var(--ion-safe-area-top) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.4)}:host(.modal-card),:host(.modal-sheet){--border-radius:10px}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:10px}}.modal-wrapper{transform:translate3d(0, 100%, 0)}@media screen and (max-width: 767px){@supports (width: 1px){:host(.modal-card){--height:calc(100% - max(30px, var(--ion-safe-area-top)) - 10px)}}@supports not (width: 1px){:host(.modal-card){--height:calc(100% - 40px)}}:host(.modal-card) .modal-wrapper{border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);border-bottom-right-radius:0;border-bottom-left-radius:0}:host-context([dir=rtl]):host(.modal-card) .modal-wrapper,:host-context([dir=rtl]).modal-card .modal-wrapper{border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);border-bottom-right-radius:0;border-bottom-left-radius:0}:host(.modal-card){--backdrop-opacity:0;--width:100%;align-items:flex-end}:host(.modal-card) .modal-shadow{display:none}:host(.modal-card) ion-backdrop{pointer-events:none}}@media screen and (min-width: 768px){:host(.modal-card){--width:calc(100% - 120px);--height:calc(100% - (120px + var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));--max-width:720px;--max-height:1000px;--backdrop-opacity:0;--box-shadow:0px 0px 30px 10px rgba(0, 0, 0, 0.1);transition:all 0.5s ease-in-out}:host(.modal-card) .modal-wrapper{box-shadow:none}:host(.modal-card) .modal-shadow{box-shadow:var(--box-shadow)}}:host(.modal-sheet) .modal-wrapper{border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);border-bottom-right-radius:0;border-bottom-left-radius:0}:host-context([dir=rtl]):host(.modal-sheet) .modal-wrapper,:host-context([dir=rtl]).modal-sheet .modal-wrapper{border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);border-bottom-right-radius:0;border-bottom-left-radius:0}";
678
1132
 
679
- const modalMdCss = ":host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:flex;position:absolute;align-items:center;justify-content:center;outline:none;contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{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);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px;--ion-safe-area-top:0px;--ion-safe-area-bottom:0px;--ion-safe-area-right:0px;--ion-safe-area-left:0px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;margin-left:auto;margin-right:auto;position:absolute;width:36px;height:5px;transform:translateZ(0);background:var(--ion-color-step-350, #c0c0be);z-index:11}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.modal-handle{margin-left:unset;margin-right:unset;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto}}:host(.modal-sheet){--height:calc(100% - (var(--ion-safe-area-top) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.32)}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:2px;--box-shadow:0 28px 48px rgba(0, 0, 0, 0.4)}}.modal-wrapper{transform:translate3d(0, 40px, 0);opacity:0.01}";
1133
+ const modalMdCss = ":host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:flex;position:absolute;align-items:center;justify-content:center;outline:none;contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{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);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px;--ion-safe-area-top:0px;--ion-safe-area-bottom:0px;--ion-safe-area-right:0px;--ion-safe-area-left:0px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;margin-left:auto;margin-right:auto;position:absolute;width:36px;height:5px;transform:translateZ(0);border:0;background:var(--ion-color-step-350, #c0c0be);cursor:pointer;z-index:11}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.modal-handle{margin-left:unset;margin-right:unset;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto}}.modal-handle::before{padding-left:4px;padding-right:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;transform:translate(-50%, -50%);content:\"\"}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.modal-handle::before{padding-left:unset;padding-right:unset;-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px}}:host(.modal-sheet){--height:calc(100% - (var(--ion-safe-area-top) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.32)}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:2px;--box-shadow:0 28px 48px rgba(0, 0, 0, 0.4)}}.modal-wrapper{transform:translate3d(0, 40px, 0);opacity:0.01}";
680
1134
 
681
1135
  const Modal = class {
682
1136
  constructor(hostRef) {
@@ -685,6 +1139,7 @@ const Modal = class {
685
1139
  this.willPresent = createEvent(this, "ionModalWillPresent", 7);
686
1140
  this.willDismiss = createEvent(this, "ionModalWillDismiss", 7);
687
1141
  this.didDismiss = createEvent(this, "ionModalDidDismiss", 7);
1142
+ this.ionBreakpointDidChange = createEvent(this, "ionBreakpointDidChange", 7);
688
1143
  this.didPresentShorthand = createEvent(this, "didPresent", 7);
689
1144
  this.willPresentShorthand = createEvent(this, "willPresent", 7);
690
1145
  this.willDismissShorthand = createEvent(this, "willDismiss", 7);
@@ -712,12 +1167,26 @@ const Modal = class {
712
1167
  * specified.
713
1168
  */
714
1169
  this.backdropBreakpoint = 0;
1170
+ /**
1171
+ * The interaction behavior for the sheet modal when the handle is pressed.
1172
+ *
1173
+ * Defaults to `"none"`, which means the modal will not change size or position when the handle is pressed.
1174
+ * Set to `"cycle"` to let the modal cycle between available breakpoints when pressed.
1175
+ *
1176
+ * Handle behavior is unavailable when the `handle` property is set to `false` or
1177
+ * when the `breakpoints` property is not set (using a fullscreen or card modal).
1178
+ */
1179
+ this.handleBehavior = 'none';
715
1180
  /**
716
1181
  * If `true`, the modal will be dismissed when the backdrop is clicked.
717
1182
  */
718
1183
  this.backdropDismiss = true;
719
1184
  /**
720
1185
  * If `true`, a backdrop will be displayed behind the modal.
1186
+ * This property controls whether or not the backdrop
1187
+ * darkens the screen when the modal is presented.
1188
+ * It does not control whether or not the backdrop
1189
+ * is active or present in the DOM.
721
1190
  */
722
1191
  this.showBackdrop = true;
723
1192
  /**
@@ -726,6 +1195,7 @@ const Modal = class {
726
1195
  this.animated = true;
727
1196
  /**
728
1197
  * If `true`, the modal can be swiped to dismiss. Only applies in iOS mode.
1198
+ * @deprecated - To prevent modals from dismissing, use canDismiss instead.
729
1199
  */
730
1200
  this.swipeToClose = false;
731
1201
  /**
@@ -736,12 +1206,24 @@ const Modal = class {
736
1206
  * the modal dismisses. You will need to do that in your code.
737
1207
  */
738
1208
  this.isOpen = false;
1209
+ /**
1210
+ * If `true`, the component passed into `ion-modal` will
1211
+ * automatically be mounted when the modal is created. The
1212
+ * component will remain mounted even when the modal is dismissed.
1213
+ * However, the component will be destroyed when the modal is
1214
+ * destroyed. This property is not reactive and should only be
1215
+ * used when initially creating a modal.
1216
+ *
1217
+ * Note: This feature only applies to inline modals in JavaScript
1218
+ * frameworks such as Angular, React, and Vue.
1219
+ */
1220
+ this.keepContentsMounted = false;
739
1221
  this.configureTriggerInteraction = () => {
740
1222
  const { trigger, el, destroyTriggerInteraction } = this;
741
1223
  if (destroyTriggerInteraction) {
742
1224
  destroyTriggerInteraction();
743
1225
  }
744
- const triggerEl = (trigger !== undefined) ? document.getElementById(trigger) : null;
1226
+ const triggerEl = trigger !== undefined ? document.getElementById(trigger) : null;
745
1227
  if (!triggerEl) {
746
1228
  return;
747
1229
  }
@@ -756,14 +1238,31 @@ const Modal = class {
756
1238
  };
757
1239
  this.destroyTriggerInteraction = configureTriggerInteraction(triggerEl, el);
758
1240
  };
1241
+ this.onHandleClick = () => {
1242
+ const { sheetTransition, handleBehavior } = this;
1243
+ if (handleBehavior !== 'cycle' || sheetTransition !== undefined) {
1244
+ /**
1245
+ * The sheet modal should not advance to the next breakpoint
1246
+ * if the handle behavior is not `cycle` or if the handle
1247
+ * is clicked while the sheet is moving to a breakpoint.
1248
+ */
1249
+ return;
1250
+ }
1251
+ this.moveToNextBreakpoint();
1252
+ };
759
1253
  this.onBackdropTap = () => {
1254
+ const { sheetTransition } = this;
1255
+ if (sheetTransition !== undefined) {
1256
+ /**
1257
+ * When the handle is double clicked at the largest breakpoint,
1258
+ * it will start to move to the first breakpoint. While transitioning,
1259
+ * the backdrop will often receive the second click. We prevent the
1260
+ * backdrop from dismissing the modal while moving between breakpoints.
1261
+ */
1262
+ return;
1263
+ }
760
1264
  this.dismiss(undefined, BACKDROP);
761
1265
  };
762
- this.onDismiss = (ev) => {
763
- ev.stopPropagation();
764
- ev.preventDefault();
765
- this.dismiss();
766
- };
767
1266
  this.onLifecycle = (modalEvent) => {
768
1267
  const el = this.usersElement;
769
1268
  const name = LIFECYCLE_MAP[modalEvent.type];
@@ -771,7 +1270,7 @@ const Modal = class {
771
1270
  const ev = new CustomEvent(name, {
772
1271
  bubbles: false,
773
1272
  cancelable: false,
774
- detail: modalEvent.detail
1273
+ detail: modalEvent.detail,
775
1274
  });
776
1275
  el.dispatchEvent(ev);
777
1276
  }
@@ -788,27 +1287,38 @@ const Modal = class {
788
1287
  onTriggerChange() {
789
1288
  this.configureTriggerInteraction();
790
1289
  }
791
- swipeToCloseChanged(enable) {
1290
+ async swipeToCloseChanged(enable) {
792
1291
  if (this.gesture) {
793
1292
  this.gesture.enable(enable);
794
1293
  }
795
1294
  else if (enable) {
796
- this.initSwipeToClose();
1295
+ await this.initSwipeToClose();
1296
+ }
1297
+ }
1298
+ breakpointsChanged(breakpoints) {
1299
+ if (breakpoints !== undefined) {
1300
+ this.sortedBreakpoints = breakpoints.sort((a, b) => a - b);
797
1301
  }
798
1302
  }
799
1303
  connectedCallback() {
800
1304
  prepareOverlay(this.el);
801
1305
  }
802
1306
  componentWillLoad() {
803
- const { breakpoints, initialBreakpoint } = this;
1307
+ const { breakpoints, initialBreakpoint, swipeToClose } = this;
804
1308
  /**
805
1309
  * If user has custom ID set then we should
806
1310
  * not assign the default incrementing ID.
807
1311
  */
808
- this.modalId = (this.el.hasAttribute('id')) ? this.el.getAttribute('id') : `ion-modal-${this.modalIndex}`;
809
- this.isSheetModal = breakpoints !== undefined && initialBreakpoint !== undefined;
1312
+ this.modalId = this.el.hasAttribute('id') ? this.el.getAttribute('id') : `ion-modal-${this.modalIndex}`;
1313
+ const isSheetModal = (this.isSheetModal = breakpoints !== undefined && initialBreakpoint !== undefined);
1314
+ if (isSheetModal) {
1315
+ this.currentBreakpoint = this.initialBreakpoint;
1316
+ }
810
1317
  if (breakpoints !== undefined && initialBreakpoint !== undefined && !breakpoints.includes(initialBreakpoint)) {
811
- console.warn('[Ionic Warning]: Your breakpoints array must include the initialBreakpoint value.');
1318
+ printIonWarning('Your breakpoints array must include the initialBreakpoint value.');
1319
+ }
1320
+ if (swipeToClose) {
1321
+ printIonWarning('swipeToClose has been deprecated in favor of canDismiss.\n\nIf you want a card modal to be swipeable, set canDismiss to `true`. In the next major release of Ionic, swipeToClose will be removed, and all card modals will be swipeable by default.');
812
1322
  }
813
1323
  }
814
1324
  componentDidLoad() {
@@ -819,6 +1329,7 @@ const Modal = class {
819
1329
  if (this.isOpen === true) {
820
1330
  raf(() => this.present());
821
1331
  }
1332
+ this.breakpointsChanged(this.breakpoints);
822
1333
  this.configureTriggerInteraction();
823
1334
  }
824
1335
  /**
@@ -834,7 +1345,7 @@ const Modal = class {
834
1345
  if (this.workingDelegate && !force) {
835
1346
  return {
836
1347
  delegate: this.workingDelegate,
837
- inline: this.inline
1348
+ inline: this.inline,
838
1349
  };
839
1350
  }
840
1351
  /**
@@ -847,10 +1358,29 @@ const Modal = class {
847
1358
  * correct place.
848
1359
  */
849
1360
  const parentEl = this.el.parentNode;
850
- const inline = this.inline = parentEl !== null && !this.hasController;
851
- const delegate = this.workingDelegate = (inline) ? this.delegate || this.coreDelegate : this.delegate;
1361
+ const inline = (this.inline = parentEl !== null && !this.hasController);
1362
+ const delegate = (this.workingDelegate = inline ? this.delegate || this.coreDelegate : this.delegate);
852
1363
  return { inline, delegate };
853
1364
  }
1365
+ /**
1366
+ * Determines whether or not the
1367
+ * modal is allowed to dismiss based
1368
+ * on the state of the canDismiss prop.
1369
+ */
1370
+ async checkCanDismiss() {
1371
+ const { canDismiss } = this;
1372
+ /**
1373
+ * TODO (FW-937) - Remove the following check in
1374
+ * the next major release of Ionic.
1375
+ */
1376
+ if (canDismiss === undefined) {
1377
+ return true;
1378
+ }
1379
+ if (typeof canDismiss === 'function') {
1380
+ return canDismiss();
1381
+ }
1382
+ return canDismiss;
1383
+ }
854
1384
  /**
855
1385
  * Present the modal overlay after it has been created.
856
1386
  */
@@ -869,18 +1399,45 @@ const Modal = class {
869
1399
  if (this.currentTransition !== undefined) {
870
1400
  await this.currentTransition;
871
1401
  }
1402
+ /**
1403
+ * If the modal is presented multiple times (inline modals), we
1404
+ * need to reset the current breakpoint to the initial breakpoint.
1405
+ */
1406
+ this.currentBreakpoint = this.initialBreakpoint;
872
1407
  const data = Object.assign(Object.assign({}, this.componentProps), { modal: this.el });
873
1408
  const { inline, delegate } = this.getDelegate(true);
874
1409
  this.usersElement = await attachComponent(delegate, this.el, this.component, ['ion-page'], data, inline);
875
1410
  await deepReady(this.usersElement);
876
1411
  writeTask(() => this.el.classList.add('show-modal'));
877
- this.currentTransition = present(this, 'modalEnter', iosEnterAnimation, mdEnterAnimation, { presentingEl: this.presentingElement, currentBreakpoint: this.initialBreakpoint, backdropBreakpoint: this.backdropBreakpoint });
1412
+ this.currentTransition = present(this, 'modalEnter', iosEnterAnimation, mdEnterAnimation, {
1413
+ presentingEl: this.presentingElement,
1414
+ currentBreakpoint: this.initialBreakpoint,
1415
+ backdropBreakpoint: this.backdropBreakpoint,
1416
+ });
1417
+ /**
1418
+ * TODO (FW-937) - In the next major release of Ionic, all card modals
1419
+ * will be swipeable by default. canDismiss will be used to determine if the
1420
+ * modal can be dismissed. This check should change to check the presence of
1421
+ * presentingElement instead.
1422
+ *
1423
+ * If we did not do this check, then not using swipeToClose would mean you could
1424
+ * not run canDismiss on swipe as there would be no swipe gesture created.
1425
+ */
1426
+ const hasCardModal = this.swipeToClose || (this.canDismiss !== undefined && this.presentingElement !== undefined);
1427
+ /**
1428
+ * We need to change the status bar at the
1429
+ * start of the animation so that it completes
1430
+ * by the time the card animation is done.
1431
+ */
1432
+ if (hasCardModal && getIonMode(this) === 'ios') {
1433
+ setCardStatusBarDark();
1434
+ }
878
1435
  await this.currentTransition;
879
1436
  if (this.isSheetModal) {
880
1437
  this.initSheetGesture();
881
1438
  }
882
- else if (this.swipeToClose) {
883
- this.initSwipeToClose();
1439
+ else if (hasCardModal) {
1440
+ await this.initSwipeToClose();
884
1441
  }
885
1442
  /* tslint:disable-next-line */
886
1443
  if (typeof window !== 'undefined') {
@@ -911,12 +1468,18 @@ const Modal = class {
911
1468
  if (getIonMode(this) !== 'ios') {
912
1469
  return;
913
1470
  }
1471
+ const { el } = this;
914
1472
  // All of the elements needed for the swipe gesture
915
1473
  // should be in the DOM and referenced by now, except
916
1474
  // for the presenting el
917
1475
  const animationBuilder = this.leaveAnimation || config.get('modalLeave', iosLeaveAnimation);
918
- const ani = this.animation = animationBuilder(this.el, { presentingEl: this.presentingElement });
919
- this.gesture = createSwipeToCloseGesture(this.el, ani, () => {
1476
+ const ani = (this.animation = animationBuilder(el, { presentingEl: this.presentingElement }));
1477
+ const contentEl = findIonContent(el);
1478
+ if (!contentEl) {
1479
+ printIonContentErrorMsg(el);
1480
+ return;
1481
+ }
1482
+ this.gesture = createSwipeToCloseGesture(el, ani, () => {
920
1483
  /**
921
1484
  * While the gesture animation is finishing
922
1485
  * it is possible for a user to tap the backdrop.
@@ -936,36 +1499,46 @@ const Modal = class {
936
1499
  this.gesture.enable(true);
937
1500
  }
938
1501
  initSheetGesture() {
939
- var _a;
940
1502
  const { wrapperEl, initialBreakpoint, backdropBreakpoint } = this;
941
1503
  if (!wrapperEl || initialBreakpoint === undefined) {
942
1504
  return;
943
1505
  }
944
1506
  const animationBuilder = this.enterAnimation || config.get('modalEnter', iosEnterAnimation);
945
- const ani = this.animation = animationBuilder(this.el, { presentingEl: this.presentingElement, currentBreakpoint: initialBreakpoint, backdropBreakpoint });
1507
+ const ani = (this.animation = animationBuilder(this.el, {
1508
+ presentingEl: this.presentingElement,
1509
+ currentBreakpoint: initialBreakpoint,
1510
+ backdropBreakpoint,
1511
+ }));
946
1512
  ani.progressStart(true, 1);
947
- const sortedBreakpoints = ((_a = this.breakpoints) === null || _a === void 0 ? void 0 : _a.sort((a, b) => a - b)) || [];
948
- this.gesture = createSheetGesture(this.el, this.backdropEl, wrapperEl, initialBreakpoint, backdropBreakpoint, ani, sortedBreakpoints, () => {
949
- /**
950
- * While the gesture animation is finishing
951
- * it is possible for a user to tap the backdrop.
952
- * This would result in the dismiss animation
953
- * being played again. Typically this is avoided
954
- * by setting `presented = false` on the overlay
955
- * component; however, we cannot do that here as
956
- * that would prevent the element from being
957
- * removed from the DOM.
958
- */
959
- this.gestureAnimationDismissing = true;
960
- this.animation.onFinish(async () => {
961
- await this.dismiss(undefined, 'gesture');
962
- this.gestureAnimationDismissing = false;
963
- });
964
- }, (breakpoint) => {
965
- this.currentBreakpoint = breakpoint;
1513
+ const { gesture, moveSheetToBreakpoint } = createSheetGesture(this.el, this.backdropEl, wrapperEl, initialBreakpoint, backdropBreakpoint, ani, this.sortedBreakpoints, () => { var _a; return (_a = this.currentBreakpoint) !== null && _a !== void 0 ? _a : 0; }, () => this.sheetOnDismiss(), (breakpoint) => {
1514
+ if (this.currentBreakpoint !== breakpoint) {
1515
+ this.currentBreakpoint = breakpoint;
1516
+ this.ionBreakpointDidChange.emit({ breakpoint });
1517
+ }
966
1518
  });
1519
+ this.gesture = gesture;
1520
+ this.moveSheetToBreakpoint = moveSheetToBreakpoint;
967
1521
  this.gesture.enable(true);
968
1522
  }
1523
+ sheetOnDismiss() {
1524
+ /**
1525
+ * While the gesture animation is finishing
1526
+ * it is possible for a user to tap the backdrop.
1527
+ * This would result in the dismiss animation
1528
+ * being played again. Typically this is avoided
1529
+ * by setting `presented = false` on the overlay
1530
+ * component; however, we cannot do that here as
1531
+ * that would prevent the element from being
1532
+ * removed from the DOM.
1533
+ */
1534
+ this.gestureAnimationDismissing = true;
1535
+ this.animation.onFinish(async () => {
1536
+ this.currentBreakpoint = 0;
1537
+ this.ionBreakpointDidChange.emit({ breakpoint: this.currentBreakpoint });
1538
+ await this.dismiss(undefined, 'gesture');
1539
+ this.gestureAnimationDismissing = false;
1540
+ });
1541
+ }
969
1542
  /**
970
1543
  * Dismiss the modal overlay after it has been presented.
971
1544
  *
@@ -976,6 +1549,24 @@ const Modal = class {
976
1549
  if (this.gestureAnimationDismissing && role !== 'gesture') {
977
1550
  return false;
978
1551
  }
1552
+ /**
1553
+ * If a canDismiss handler is responsible
1554
+ * for calling the dismiss method, we should
1555
+ * not run the canDismiss check again.
1556
+ */
1557
+ if (role !== 'handler' && !(await this.checkCanDismiss())) {
1558
+ return false;
1559
+ }
1560
+ /**
1561
+ * We need to start the status bar change
1562
+ * before the animation so that the change
1563
+ * finishes when the dismiss animation does.
1564
+ * TODO (FW-937)
1565
+ */
1566
+ const hasCardModal = this.swipeToClose || (this.canDismiss !== undefined && this.presentingElement !== undefined);
1567
+ if (hasCardModal && getIonMode(this) === 'ios') {
1568
+ setCardStatusBarDefault();
1569
+ }
979
1570
  /* tslint:disable-next-line */
980
1571
  if (typeof window !== 'undefined' && this.keyboardOpenCallback) {
981
1572
  window.removeEventListener(KEYBOARD_DID_OPEN, this.keyboardOpenCallback);
@@ -992,7 +1583,11 @@ const Modal = class {
992
1583
  await this.currentTransition;
993
1584
  }
994
1585
  const enteringAnimation = activeAnimations.get(this) || [];
995
- this.currentTransition = dismiss(this, data, role, 'modalLeave', iosLeaveAnimation, mdLeaveAnimation, { presentingEl: this.presentingElement, currentBreakpoint: this.currentBreakpoint || this.initialBreakpoint, backdropBreakpoint: this.backdropBreakpoint });
1586
+ this.currentTransition = dismiss(this, data, role, 'modalLeave', iosLeaveAnimation, mdLeaveAnimation, {
1587
+ presentingEl: this.presentingElement,
1588
+ currentBreakpoint: this.currentBreakpoint || this.initialBreakpoint,
1589
+ backdropBreakpoint: this.backdropBreakpoint,
1590
+ });
996
1591
  const dismissed = await this.currentTransition;
997
1592
  if (dismissed) {
998
1593
  const { delegate } = this.getDelegate();
@@ -1004,8 +1599,9 @@ const Modal = class {
1004
1599
  if (this.gesture) {
1005
1600
  this.gesture.destroy();
1006
1601
  }
1007
- enteringAnimation.forEach(ani => ani.destroy());
1602
+ enteringAnimation.forEach((ani) => ani.destroy());
1008
1603
  }
1604
+ this.currentBreakpoint = undefined;
1009
1605
  this.currentTransition = undefined;
1010
1606
  this.animation = undefined;
1011
1607
  return dismissed;
@@ -1022,15 +1618,72 @@ const Modal = class {
1022
1618
  onWillDismiss() {
1023
1619
  return eventMethod(this.el, 'ionModalWillDismiss');
1024
1620
  }
1621
+ /**
1622
+ * Move a sheet style modal to a specific breakpoint. The breakpoint value must
1623
+ * be a value defined in your `breakpoints` array.
1624
+ */
1625
+ async setCurrentBreakpoint(breakpoint) {
1626
+ if (!this.isSheetModal) {
1627
+ printIonWarning('setCurrentBreakpoint is only supported on sheet modals.');
1628
+ return;
1629
+ }
1630
+ if (!this.breakpoints.includes(breakpoint)) {
1631
+ printIonWarning(`Attempted to set invalid breakpoint value ${breakpoint}. Please double check that the breakpoint value is part of your defined breakpoints.`);
1632
+ return;
1633
+ }
1634
+ const { currentBreakpoint, moveSheetToBreakpoint, canDismiss, breakpoints } = this;
1635
+ if (currentBreakpoint === breakpoint) {
1636
+ return;
1637
+ }
1638
+ if (moveSheetToBreakpoint) {
1639
+ this.sheetTransition = moveSheetToBreakpoint({
1640
+ breakpoint,
1641
+ breakpointOffset: 1 - currentBreakpoint,
1642
+ canDismiss: canDismiss !== undefined && canDismiss !== true && breakpoints[0] === 0,
1643
+ });
1644
+ await this.sheetTransition;
1645
+ this.sheetTransition = undefined;
1646
+ }
1647
+ }
1648
+ /**
1649
+ * Returns the current breakpoint of a sheet style modal
1650
+ */
1651
+ async getCurrentBreakpoint() {
1652
+ return this.currentBreakpoint;
1653
+ }
1654
+ async moveToNextBreakpoint() {
1655
+ const { breakpoints, currentBreakpoint } = this;
1656
+ if (!breakpoints || currentBreakpoint == null) {
1657
+ /**
1658
+ * If the modal does not have breakpoints and/or the current
1659
+ * breakpoint is not set, we can't move to the next breakpoint.
1660
+ */
1661
+ return false;
1662
+ }
1663
+ const allowedBreakpoints = breakpoints.filter((b) => b !== 0);
1664
+ const currentBreakpointIndex = allowedBreakpoints.indexOf(currentBreakpoint);
1665
+ const nextBreakpointIndex = (currentBreakpointIndex + 1) % allowedBreakpoints.length;
1666
+ const nextBreakpoint = allowedBreakpoints[nextBreakpointIndex];
1667
+ /**
1668
+ * Sets the current breakpoint to the next available breakpoint.
1669
+ * If the current breakpoint is the last breakpoint, we set the current
1670
+ * breakpoint to the first non-zero breakpoint to avoid dismissing the sheet.
1671
+ */
1672
+ await this.setCurrentBreakpoint(nextBreakpoint);
1673
+ return true;
1674
+ }
1025
1675
  render() {
1026
- const { handle, isSheetModal, presentingElement, htmlAttributes } = this;
1676
+ const { handle, isSheetModal, presentingElement, htmlAttributes, handleBehavior } = this;
1027
1677
  const showHandle = handle !== false && isSheetModal;
1028
1678
  const mode = getIonMode(this);
1029
1679
  const { modalId } = this;
1030
1680
  const isCardModal = presentingElement !== undefined && mode === 'ios';
1681
+ const isHandleCycle = handleBehavior === 'cycle';
1031
1682
  return (h(Host, Object.assign({ "no-router": true, "aria-modal": "true", tabindex: "-1" }, htmlAttributes, { style: {
1032
1683
  zIndex: `${20000 + this.overlayIndex}`,
1033
- }, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, 'overlay-hidden': true }, getClassMap(this.cssClass)), id: modalId, onIonBackdropTap: this.onBackdropTap, onIonDismiss: this.onDismiss, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle }), h("ion-backdrop", { ref: el => this.backdropEl = el, visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && h("div", { class: "modal-shadow" }), h("div", { role: "dialog", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: el => this.wrapperEl = el }, showHandle && h("div", { class: "modal-handle", part: "handle" }), h("slot", null))));
1684
+ }, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, 'overlay-hidden': true }, getClassMap(this.cssClass)), id: modalId, onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle }), h("ion-backdrop", { ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && h("div", { class: "modal-shadow" }), h("div", { role: "dialog", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }, showHandle && (h("button", { class: "modal-handle",
1685
+ // Prevents the handle from receiving keyboard focus when it does not cycle
1686
+ tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle" })), h("slot", null))));
1034
1687
  }
1035
1688
  get el() { return getElement(this); }
1036
1689
  static get watchers() { return {
@@ -1040,10 +1693,10 @@ const Modal = class {
1040
1693
  }; }
1041
1694
  };
1042
1695
  const LIFECYCLE_MAP = {
1043
- 'ionModalDidPresent': 'ionViewDidEnter',
1044
- 'ionModalWillPresent': 'ionViewWillEnter',
1045
- 'ionModalWillDismiss': 'ionViewWillLeave',
1046
- 'ionModalDidDismiss': 'ionViewDidLeave',
1696
+ ionModalDidPresent: 'ionViewDidEnter',
1697
+ ionModalWillPresent: 'ionViewWillEnter',
1698
+ ionModalWillDismiss: 'ionViewWillLeave',
1699
+ ionModalDidDismiss: 'ionViewDidLeave',
1047
1700
  };
1048
1701
  let modalIds = 0;
1049
1702
  Modal.style = {