@ionic/core 8.8.4-dev.11776184632.103b8351 → 8.8.4-dev.11776246162.138c2737

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 (217) hide show
  1. package/components/index.js +1 -1
  2. package/components/ion-action-sheet.js +1 -1
  3. package/components/ion-alert.js +1 -1
  4. package/components/ion-datetime.js +1 -1
  5. package/components/ion-infinite-scroll-content.js +1 -1
  6. package/components/ion-loading.js +1 -1
  7. package/components/ion-menu.js +1 -1
  8. package/components/ion-modal.js +1 -1
  9. package/components/ion-picker-legacy.js +1 -1
  10. package/components/ion-popover.js +1 -1
  11. package/components/ion-refresher-content.js +1 -1
  12. package/components/ion-select-modal.js +1 -1
  13. package/components/ion-select-option.js +1 -1
  14. package/components/ion-select-popover.js +1 -1
  15. package/components/ion-select.js +1 -1
  16. package/components/ion-skeleton-text.js +1 -1
  17. package/components/ion-spinner.js +1 -1
  18. package/components/ion-split-pane.js +1 -1
  19. package/components/ion-tab-bar.js +1 -1
  20. package/components/ion-tab-button.js +1 -1
  21. package/components/ion-tab.js +1 -1
  22. package/components/ion-tabs.js +1 -1
  23. package/components/ion-text.js +1 -1
  24. package/components/ion-textarea.js +1 -1
  25. package/components/ion-thumbnail.js +1 -1
  26. package/components/ion-title.js +1 -1
  27. package/components/ion-toast.js +1 -1
  28. package/components/ion-toggle.js +1 -1
  29. package/components/ion-toolbar.js +1 -1
  30. package/components/p-B36-MWK0.js +4 -0
  31. package/components/p-BDPU2685.js +4 -0
  32. package/components/p-BrNzoF1U.js +4 -0
  33. package/components/{p-B0orUoaV.js → p-C-_EGKki.js} +1 -1
  34. package/components/{p-qhBzWoOF.js → p-C2cZvGcF.js} +1 -1
  35. package/components/p-CEUppJkx.js +4 -0
  36. package/components/p-CSexRbnt.js +4 -0
  37. package/components/{p-ZRp3l6Dk.js → p-CoarhFWH.js} +1 -1
  38. package/components/p-DNdBtsfu.js +4 -0
  39. package/components/p-Njik5v4C.js +4 -0
  40. package/dist/cjs/index.cjs.js +1 -1
  41. package/dist/cjs/ion-action-sheet.cjs.entry.js +34 -18
  42. package/dist/cjs/ion-alert.cjs.entry.js +35 -32
  43. package/dist/cjs/ion-app_8.cjs.entry.js +4 -4
  44. package/dist/cjs/ion-avatar_3.cjs.entry.js +2 -2
  45. package/dist/cjs/ion-datetime_3.cjs.entry.js +28 -4
  46. package/dist/cjs/ion-item_8.cjs.entry.js +2 -2
  47. package/dist/cjs/ion-loading.cjs.entry.js +29 -4
  48. package/dist/cjs/ion-menu_3.cjs.entry.js +1 -1
  49. package/dist/cjs/ion-modal.cjs.entry.js +176 -79
  50. package/dist/cjs/ion-popover.cjs.entry.js +90 -4
  51. package/dist/cjs/ion-select-modal.cjs.entry.js +27 -46
  52. package/dist/cjs/ion-select_3.cjs.entry.js +48 -177
  53. package/dist/cjs/ion-spinner.cjs.entry.js +1 -1
  54. package/dist/cjs/ion-split-pane.cjs.entry.js +2 -2
  55. package/dist/cjs/ion-tab-bar_2.cjs.entry.js +4 -4
  56. package/dist/cjs/ion-tab_2.cjs.entry.js +3 -3
  57. package/dist/cjs/ion-text.cjs.entry.js +2 -2
  58. package/dist/cjs/ion-textarea.cjs.entry.js +3 -3
  59. package/dist/cjs/ion-toast.cjs.entry.js +32 -4
  60. package/dist/cjs/ion-toggle.cjs.entry.js +3 -3
  61. package/dist/cjs/ionic.cjs.js +1 -1
  62. package/dist/cjs/loader.cjs.js +1 -1
  63. package/dist/cjs/{overlays-Dhoy6v_5.js → overlays-BbhewSIQ.js} +4 -4
  64. package/dist/collection/components/action-sheet/action-sheet.ios.css +0 -84
  65. package/dist/collection/components/action-sheet/action-sheet.js +8 -15
  66. package/dist/collection/components/action-sheet/action-sheet.md.css +0 -84
  67. package/dist/collection/components/action-sheet/animations/ionic.enter.js +27 -0
  68. package/dist/collection/components/action-sheet/animations/ionic.leave.js +21 -0
  69. package/dist/collection/components/alert/alert.ios.css +0 -83
  70. package/dist/collection/components/alert/alert.js +8 -29
  71. package/dist/collection/components/alert/alert.md.css +0 -83
  72. package/dist/collection/components/alert/animations/ionic.enter.js +28 -0
  73. package/dist/collection/components/alert/animations/ionic.leave.js +19 -0
  74. package/dist/collection/components/loading/animations/ionic.enter.js +28 -0
  75. package/dist/collection/components/loading/animations/ionic.leave.js +22 -0
  76. package/dist/collection/components/loading/loading.js +4 -3
  77. package/dist/collection/components/modal/animations/ionic.enter.js +40 -0
  78. package/dist/collection/components/modal/animations/ionic.leave.js +28 -0
  79. package/dist/collection/components/modal/gestures/sheet.js +71 -9
  80. package/dist/collection/components/modal/modal.ionic.css +1 -1
  81. package/dist/collection/components/modal/modal.js +6 -5
  82. package/dist/collection/components/picker-legacy/animations/ionic.enter.js +27 -0
  83. package/dist/collection/components/picker-legacy/animations/ionic.leave.js +23 -0
  84. package/dist/collection/components/picker-legacy/picker.js +4 -3
  85. package/dist/collection/components/popover/animations/ionic.enter.js +91 -0
  86. package/dist/collection/components/popover/animations/ionic.leave.js +29 -0
  87. package/dist/collection/components/popover/popover.js +4 -3
  88. package/dist/collection/components/select/select.ionic.css +0 -31
  89. package/dist/collection/components/select/select.ios.css +0 -31
  90. package/dist/collection/components/select/select.js +14 -125
  91. package/dist/collection/components/select/select.md.css +0 -31
  92. package/dist/collection/components/select-modal/select-modal.ionic.css +0 -24
  93. package/dist/collection/components/select-modal/select-modal.ios.css +0 -77
  94. package/dist/collection/components/select-modal/select-modal.js +23 -42
  95. package/dist/collection/components/select-modal/select-modal.md.css +1 -80
  96. package/dist/collection/components/select-option/select-option.js +2 -21
  97. package/dist/collection/components/select-popover/select-popover.ios.css +0 -77
  98. package/dist/collection/components/select-popover/select-popover.js +26 -45
  99. package/dist/collection/components/select-popover/select-popover.md.css +0 -77
  100. package/dist/collection/components/skeleton-text/skeleton-text.js +2 -2
  101. package/dist/collection/components/spinner/spinner.js +1 -1
  102. package/dist/collection/components/split-pane/split-pane.js +2 -2
  103. package/dist/collection/components/tab/tab.js +2 -2
  104. package/dist/collection/components/tab-bar/tab-bar.js +2 -2
  105. package/dist/collection/components/tab-button/tab-button.js +2 -2
  106. package/dist/collection/components/tabs/tabs.js +1 -1
  107. package/dist/collection/components/text/text.js +2 -2
  108. package/dist/collection/components/textarea/textarea.js +3 -3
  109. package/dist/collection/components/thumbnail/thumbnail.js +2 -2
  110. package/dist/collection/components/title/title.js +2 -2
  111. package/dist/collection/components/toast/animations/ionic.enter.js +33 -0
  112. package/dist/collection/components/toast/animations/ionic.leave.js +16 -0
  113. package/dist/collection/components/toast/toast.js +4 -3
  114. package/dist/collection/components/toggle/toggle.js +3 -3
  115. package/dist/collection/components/toolbar/toolbar.js +2 -2
  116. package/dist/collection/utils/overlays.js +5 -5
  117. package/dist/docs.json +5 -139
  118. package/dist/esm/index.js +1 -1
  119. package/dist/esm/ion-action-sheet.entry.js +34 -18
  120. package/dist/esm/ion-alert.entry.js +35 -32
  121. package/dist/esm/ion-app_8.entry.js +4 -4
  122. package/dist/esm/ion-avatar_3.entry.js +2 -2
  123. package/dist/esm/ion-datetime_3.entry.js +28 -4
  124. package/dist/esm/ion-item_8.entry.js +2 -2
  125. package/dist/esm/ion-loading.entry.js +29 -4
  126. package/dist/esm/ion-menu_3.entry.js +1 -1
  127. package/dist/esm/ion-modal.entry.js +177 -80
  128. package/dist/esm/ion-popover.entry.js +90 -4
  129. package/dist/esm/ion-select-modal.entry.js +27 -46
  130. package/dist/esm/ion-select_3.entry.js +49 -178
  131. package/dist/esm/ion-spinner.entry.js +1 -1
  132. package/dist/esm/ion-split-pane.entry.js +2 -2
  133. package/dist/esm/ion-tab-bar_2.entry.js +4 -4
  134. package/dist/esm/ion-tab_2.entry.js +3 -3
  135. package/dist/esm/ion-text.entry.js +2 -2
  136. package/dist/esm/ion-textarea.entry.js +3 -3
  137. package/dist/esm/ion-toast.entry.js +32 -4
  138. package/dist/esm/ion-toggle.entry.js +3 -3
  139. package/dist/esm/ionic.js +1 -1
  140. package/dist/esm/loader.js +1 -1
  141. package/dist/esm/{overlays-CvFHfO3y.js → overlays-VA-4NWjf.js} +5 -5
  142. package/dist/html.html-data.json +0 -4
  143. package/dist/ionic/index.esm.js +1 -1
  144. package/dist/ionic/ionic.esm.js +1 -1
  145. package/dist/ionic/p-07b129d5.entry.js +4 -0
  146. package/dist/ionic/p-0cb50208.entry.js +4 -0
  147. package/dist/ionic/{p-db4f4eaf.entry.js → p-1efe83c8.entry.js} +1 -1
  148. package/dist/ionic/{p-d2fe6791.entry.js → p-2193e875.entry.js} +1 -1
  149. package/dist/ionic/{p-69033ad6.entry.js → p-2bf931ae.entry.js} +1 -1
  150. package/dist/ionic/{p-26595044.entry.js → p-3bf01c2c.entry.js} +1 -1
  151. package/dist/ionic/p-3d4c8528.entry.js +4 -0
  152. package/dist/ionic/{p-9e71982e.entry.js → p-49799a34.entry.js} +1 -1
  153. package/dist/ionic/p-64341e32.entry.js +4 -0
  154. package/dist/ionic/p-6992d9d6.entry.js +4 -0
  155. package/dist/ionic/{p-aa8c1e64.entry.js → p-6c8c37c2.entry.js} +1 -1
  156. package/dist/ionic/{p-a94016be.entry.js → p-91e242e4.entry.js} +1 -1
  157. package/dist/ionic/{p-96ec9a10.entry.js → p-9b9b1450.entry.js} +1 -1
  158. package/dist/ionic/p-9dd4276b.entry.js +4 -0
  159. package/dist/ionic/p-BExfzy0B.js +4 -0
  160. package/dist/ionic/p-a3d794ba.entry.js +4 -0
  161. package/dist/ionic/p-ba9f8cbb.entry.js +4 -0
  162. package/dist/ionic/{p-2095969c.entry.js → p-bae3ebe5.entry.js} +1 -1
  163. package/dist/ionic/{p-a1c8ba8c.entry.js → p-bc5713f7.entry.js} +1 -1
  164. package/dist/ionic/{p-71f28573.entry.js → p-cdfbe4cc.entry.js} +1 -1
  165. package/dist/ionic/p-fa701753.entry.js +4 -0
  166. package/dist/types/components/action-sheet/action-sheet-interface.d.ts +1 -4
  167. package/dist/types/components/action-sheet/animations/ionic.enter.d.ts +5 -0
  168. package/dist/types/components/action-sheet/animations/ionic.leave.d.ts +5 -0
  169. package/dist/types/components/alert/alert-interface.d.ts +1 -4
  170. package/dist/types/components/alert/animations/ionic.enter.d.ts +5 -0
  171. package/dist/types/components/alert/animations/ionic.leave.d.ts +5 -0
  172. package/dist/types/components/loading/animations/ionic.enter.d.ts +5 -0
  173. package/dist/types/components/loading/animations/ionic.leave.d.ts +5 -0
  174. package/dist/types/components/modal/animations/ionic.enter.d.ts +6 -0
  175. package/dist/types/components/modal/animations/ionic.leave.d.ts +6 -0
  176. package/dist/types/components/modal/gestures/sheet.d.ts +1 -1
  177. package/dist/types/components/picker-legacy/animations/ionic.enter.d.ts +5 -0
  178. package/dist/types/components/picker-legacy/animations/ionic.leave.d.ts +5 -0
  179. package/dist/types/components/popover/animations/ionic.enter.d.ts +5 -0
  180. package/dist/types/components/popover/animations/ionic.leave.d.ts +5 -0
  181. package/dist/types/components/select/select.d.ts +0 -7
  182. package/dist/types/components/select-modal/select-modal-interface.d.ts +1 -4
  183. package/dist/types/components/select-option/select-option.d.ts +0 -4
  184. package/dist/types/components/select-popover/select-popover-interface.d.ts +1 -4
  185. package/dist/types/components/toast/animations/ionic.enter.d.ts +6 -0
  186. package/dist/types/components/toast/animations/ionic.leave.d.ts +5 -0
  187. package/dist/types/components.d.ts +0 -9
  188. package/dist/types/utils/overlays.d.ts +1 -1
  189. package/hydrate/index.js +518 -442
  190. package/hydrate/index.mjs +518 -442
  191. package/package.json +1 -1
  192. package/components/p-B6czg-mf.js +0 -4
  193. package/components/p-BDwab5EM.js +0 -4
  194. package/components/p-BjV_nNDy.js +0 -4
  195. package/components/p-C8Dne7pI.js +0 -4
  196. package/components/p-C9d4LXRu.js +0 -4
  197. package/components/p-CvoKp7OI.js +0 -4
  198. package/components/p-GytrfCp8.js +0 -4
  199. package/components/p-ZeIAjDcZ.js +0 -4
  200. package/dist/cjs/select-option-render-qQf4xz8P.js +0 -67
  201. package/dist/collection/components/action-sheet/action-sheet.ionic.css +0 -834
  202. package/dist/collection/components/alert/alert.ionic.css +0 -1165
  203. package/dist/collection/components/select-popover/select-popover.ionic.css +0 -489
  204. package/dist/collection/utils/select-option-render.js +0 -62
  205. package/dist/esm/select-option-render-BQUT9Aqa.js +0 -65
  206. package/dist/ionic/p-37f895a8.entry.js +0 -4
  207. package/dist/ionic/p-3884bfa4.entry.js +0 -4
  208. package/dist/ionic/p-38897781.entry.js +0 -4
  209. package/dist/ionic/p-63e09af5.entry.js +0 -4
  210. package/dist/ionic/p-6bffc700.entry.js +0 -4
  211. package/dist/ionic/p-6e0ce081.entry.js +0 -4
  212. package/dist/ionic/p-BYtS2rae.js +0 -4
  213. package/dist/ionic/p-Dr3N4o63.js +0 -4
  214. package/dist/ionic/p-a64ae62e.entry.js +0 -4
  215. package/dist/ionic/p-d45b911b.entry.js +0 -4
  216. package/dist/ionic/p-ef0c281a.entry.js +0 -4
  217. package/dist/types/utils/select-option-render.d.ts +0 -26
@@ -8,7 +8,7 @@ var caretLeft = require('./caret-left-CxZXLRv5.js');
8
8
  var caretRight = require('./caret-right-CRCgv98E.js');
9
9
  var focusVisible = require('./focus-visible-BIj-I3-C.js');
10
10
  var helpers = require('./helpers-DJYxKN5U.js');
11
- var overlays = require('./overlays-Dhoy6v_5.js');
11
+ var overlays = require('./overlays-BbhewSIQ.js');
12
12
  var dir = require('./dir-Cn0z1rJH.js');
13
13
  var theme = require('./theme-IlOsGAz7.js');
14
14
  var index$1 = require('./index-DqmRDbxg.js');
@@ -2045,6 +2045,30 @@ Datetime.style = {
2045
2045
  md: datetimeMdCss()
2046
2046
  };
2047
2047
 
2048
+ /**
2049
+ * Ionic Picker Enter Animation
2050
+ */
2051
+ const ionicEnterAnimation = (baseEl) => {
2052
+ const baseAnimation = animation.createAnimation();
2053
+ const backdropAnimation = animation.createAnimation();
2054
+ const wrapperAnimation = animation.createAnimation();
2055
+ backdropAnimation
2056
+ .addElement(baseEl.querySelector('ion-backdrop'))
2057
+ .fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
2058
+ .beforeStyles({
2059
+ 'pointer-events': 'none',
2060
+ })
2061
+ .afterClearStyles(['pointer-events']);
2062
+ wrapperAnimation
2063
+ .addElement(baseEl.querySelector('.picker-wrapper'))
2064
+ .fromTo('transform', 'translateY(100%)', 'translateY(0%)');
2065
+ return baseAnimation
2066
+ .addElement(baseEl)
2067
+ .easing('cubic-bezier(.36,.66,.04,1)')
2068
+ .duration(400)
2069
+ .addAnimation([backdropAnimation, wrapperAnimation]);
2070
+ };
2071
+
2048
2072
  /**
2049
2073
  * iOS Picker Enter Animation
2050
2074
  */
@@ -2210,7 +2234,7 @@ const Picker = class {
2210
2234
  async present() {
2211
2235
  const unlock = await this.lockController.lock();
2212
2236
  await this.delegateController.attachViewToDom();
2213
- await overlays.present(this, 'pickerEnter', iosEnterAnimation, iosEnterAnimation, undefined);
2237
+ await overlays.present(this, 'pickerEnter', iosEnterAnimation, iosEnterAnimation, ionicEnterAnimation, undefined);
2214
2238
  if (this.duration > 0) {
2215
2239
  this.durationTimeout = setTimeout(() => this.dismiss(), this.duration);
2216
2240
  }
@@ -2295,11 +2319,11 @@ const Picker = class {
2295
2319
  render() {
2296
2320
  const { htmlAttributes } = this;
2297
2321
  const theme$1 = ionicGlobal.getIonTheme(this);
2298
- return (index.h(index.Host, Object.assign({ key: 'efcc823fad9cb37c1379bef4f4b84c6461f3a3a6', "aria-modal": "true", tabindex: "-1" }, htmlAttributes, { style: {
2322
+ return (index.h(index.Host, Object.assign({ key: '8db0e1a6cb7697efcc5d5a4a80f3dc3435760c1d', "aria-modal": "true", tabindex: "-1" }, htmlAttributes, { style: {
2299
2323
  zIndex: `${20000 + this.overlayIndex}`,
2300
2324
  }, class: Object.assign({ [theme$1]: true,
2301
2325
  // Used internally for styling
2302
- [`picker-${theme$1}`]: true, 'overlay-hidden': true }, theme.getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonPickerWillDismiss: this.dispatchCancelHandler }), index.h("ion-backdrop", { key: '3f44bf34e039210ae149c590c393ee9f7fb85da0', visible: this.showBackdrop, tappable: this.backdropDismiss }), index.h("div", { key: 'c2a51a89c525b1a22cbc8583cd30f41c3c356d4f', tabindex: "0", "aria-hidden": "true" }), index.h("div", { key: '23837ffe309d0aad9b8ea09d7ac94d21040ef0d7', class: "picker-wrapper ion-overlay-wrapper", role: "dialog" }, index.h("div", { key: '91ba7e553d570768142715ded4bcc27fceedbce4', class: "picker-toolbar" }, this.buttons.map((b) => (index.h("div", { class: buttonWrapperClass(b) }, index.h("button", { type: "button", onClick: () => this.buttonClick(b), class: buttonClass(b) }, b.text))))), index.h("div", { key: '22661cafeb555f1435ec1e0a122404a48136095b', class: "picker-columns" }, index.h("div", { key: '5f3db32468b8c60f63c70d81a27b18cce6f2e259', class: "picker-above-highlight" }), this.presented && this.columns.map((c) => index.h("ion-picker-legacy-column", { col: c })), index.h("div", { key: '1bae6b170125b1671a480506ba73636b42b65909', class: "picker-below-highlight" }))), index.h("div", { key: '91beb94ce537122fbd6cd0c2bd3c00f908d0fefe', tabindex: "0", "aria-hidden": "true" })));
2326
+ [`picker-${theme$1}`]: true, 'overlay-hidden': true }, theme.getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonPickerWillDismiss: this.dispatchCancelHandler }), index.h("ion-backdrop", { key: 'c32c446147dff1e8b53fcf6885bdaa504d134d06', visible: this.showBackdrop, tappable: this.backdropDismiss }), index.h("div", { key: '87c9eeeed6869569b0da65d720289f14f76d0cba', tabindex: "0", "aria-hidden": "true" }), index.h("div", { key: '17a1250e5ce1dc176a39d7480587c56aa11f0247', class: "picker-wrapper ion-overlay-wrapper", role: "dialog" }, index.h("div", { key: '4d4043aae3373d2f271e8e1320ba72f726eb2338', class: "picker-toolbar" }, this.buttons.map((b) => (index.h("div", { class: buttonWrapperClass(b) }, index.h("button", { type: "button", onClick: () => this.buttonClick(b), class: buttonClass(b) }, b.text))))), index.h("div", { key: '954edc5d83380d04025ec8029194ad0f9c6778ff', class: "picker-columns" }, index.h("div", { key: 'f3c7f7bbb784b8076eebe984e7dd057d78c9824f', class: "picker-above-highlight" }), this.presented && this.columns.map((c) => index.h("ion-picker-legacy-column", { col: c })), index.h("div", { key: '63dcf6a252024984cb3eaca133805343b324fdb1', class: "picker-below-highlight" }))), index.h("div", { key: 'e07eb1a59edf5d94fc487114c2d8b923fd768696', tabindex: "0", "aria-hidden": "true" })));
2303
2327
  }
2304
2328
  get el() { return index.getElement(this); }
2305
2329
  static get watchers() { return {
@@ -573,11 +573,11 @@ const SkeletonText = class {
573
573
  const animated = this.animated && index.config.getBoolean('animated', true);
574
574
  const inMedia = theme.hostContext('ion-avatar', this.el) || theme.hostContext('ion-thumbnail', this.el);
575
575
  const theme$1 = ionicGlobal.getIonTheme(this);
576
- return (index.h(index.Host, { key: '7ecf3ae7e75872c65ba0620eecba500c7e75efd9', class: {
576
+ return (index.h(index.Host, { key: '5014563646b6c5213750d503babce3013b66ec96', class: {
577
577
  [theme$1]: true,
578
578
  'skeleton-text-animated': animated,
579
579
  'in-media': inMedia,
580
- } }, index.h("span", { key: '5d0cd4fec873b8874cbc61eeb14cc3332948714c' }, "\u00A0")));
580
+ } }, index.h("span", { key: '4b816883b1c71bb1db66d8b2b084559f7cb489bd' }, "\u00A0")));
581
581
  }
582
582
  get el() { return index.getElement(this); }
583
583
  };
@@ -7,7 +7,7 @@ var index = require('./index-CzcLEdQ5.js');
7
7
  var config = require('./config-B0utyWaD.js');
8
8
  var helpers = require('./helpers-DJYxKN5U.js');
9
9
  var lockController = require('./lock-controller-aDB9wrEf.js');
10
- var overlays = require('./overlays-Dhoy6v_5.js');
10
+ var overlays = require('./overlays-BbhewSIQ.js');
11
11
  var theme = require('./theme-IlOsGAz7.js');
12
12
  var ionicGlobal = require('./ionic-global-CSEbHD_F.js');
13
13
  var animation = require('./animation-DknMeJ3x.js');
@@ -15,6 +15,31 @@ require('./focus-visible-BIj-I3-C.js');
15
15
  require('./framework-delegate-Dx9FrqAC.js');
16
16
  require('./gesture-controller-dtqlP_q4.js');
17
17
 
18
+ /**
19
+ * Ionic Loading Enter Animation
20
+ */
21
+ const ionicEnterAnimation = (baseEl) => {
22
+ const baseAnimation = animation.createAnimation();
23
+ const backdropAnimation = animation.createAnimation();
24
+ const wrapperAnimation = animation.createAnimation();
25
+ backdropAnimation
26
+ .addElement(baseEl.querySelector('ion-backdrop'))
27
+ .fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
28
+ .beforeStyles({
29
+ 'pointer-events': 'none',
30
+ })
31
+ .afterClearStyles(['pointer-events']);
32
+ wrapperAnimation.addElement(baseEl.querySelector('.loading-wrapper')).keyframes([
33
+ { offset: 0, opacity: 0.01, transform: 'scale(1.1)' },
34
+ { offset: 1, opacity: 1, transform: 'scale(1)' },
35
+ ]);
36
+ return baseAnimation
37
+ .addElement(baseEl)
38
+ .easing('ease-in-out')
39
+ .duration(200)
40
+ .addAnimation([backdropAnimation, wrapperAnimation]);
41
+ };
42
+
18
43
  /**
19
44
  * iOS Loading Enter Animation
20
45
  */
@@ -221,7 +246,7 @@ const Loading = class {
221
246
  async present() {
222
247
  const unlock = await this.lockController.lock();
223
248
  await this.delegateController.attachViewToDom();
224
- await overlays.present(this, 'loadingEnter', iosEnterAnimation, mdEnterAnimation);
249
+ await overlays.present(this, 'loadingEnter', iosEnterAnimation, mdEnterAnimation, ionicEnterAnimation);
225
250
  if (this.duration > 0) {
226
251
  this.durationTimeout = setTimeout(() => this.dismiss(), this.duration + 10);
227
252
  }
@@ -279,9 +304,9 @@ const Loading = class {
279
304
  * Otherwise, don't set aria-labelledby.
280
305
  */
281
306
  const ariaLabelledBy = message !== undefined ? msgId : null;
282
- return (index.h(index.Host, Object.assign({ key: '0c475f8e28e680e28e09317557795fc56e0835d8', role: "dialog", "aria-modal": "true", "aria-labelledby": ariaLabelledBy, tabindex: "-1" }, htmlAttributes, { style: {
307
+ return (index.h(index.Host, Object.assign({ key: '89d1abcbc147e33c7bfc7bb3ef8f46ae82c12349', role: "dialog", "aria-modal": "true", "aria-labelledby": ariaLabelledBy, tabindex: "-1" }, htmlAttributes, { style: {
283
308
  zIndex: `${40000 + this.overlayIndex}`,
284
- }, onIonBackdropTap: this.onBackdropTap, class: Object.assign(Object.assign({}, theme.getClassMap(this.cssClass)), { [theme$1]: true, 'overlay-hidden': true, 'loading-translucent': this.translucent }) }), index.h("ion-backdrop", { key: 'd7e88feb6df8edbc326a84d07b294618f7ce6adc', visible: this.showBackdrop, tappable: this.backdropDismiss }), index.h("div", { key: 'f9622f45b2d9e913c325b228a1e6ed03cf2b98e8', tabindex: "0", "aria-hidden": "true" }), index.h("div", { key: 'f4dfdce70c4515878b247d0cc116b5cec2cf79a4', class: "loading-wrapper ion-overlay-wrapper" }, spinner && (index.h("div", { key: '6d4475e00c444eb3d217813ae8cc1a02a97b969e', class: "loading-spinner" }, index.h("ion-spinner", { key: 'd9ad8dd56ec7677c18d06936c1a1b21a0a6a87a8', name: spinner, "aria-hidden": "true" }))), message !== undefined && this.renderLoadingMessage(msgId)), index.h("div", { key: 'bd3159e18f33ec25d3480d47ce33fa7dfd1f1460', tabindex: "0", "aria-hidden": "true" })));
309
+ }, onIonBackdropTap: this.onBackdropTap, class: Object.assign(Object.assign({}, theme.getClassMap(this.cssClass)), { [theme$1]: true, 'overlay-hidden': true, 'loading-translucent': this.translucent }) }), index.h("ion-backdrop", { key: '1f30f752a8cd8d6310d22ed4f515f39f8c14c05d', visible: this.showBackdrop, tappable: this.backdropDismiss }), index.h("div", { key: '5d5be9f63b62499231a605bcaa6ef83c1efaeee1', tabindex: "0", "aria-hidden": "true" }), index.h("div", { key: '001f8cd91d32c13116309d6bf452acee3fb2e529', class: "loading-wrapper ion-overlay-wrapper" }, spinner && (index.h("div", { key: '40ce912631c9d3faf60110214a040e496a86a5c8', class: "loading-spinner" }, index.h("ion-spinner", { key: '7954e5bef56f42c0b80ca420091a2db10484dd74', name: spinner, "aria-hidden": "true" }))), message !== undefined && this.renderLoadingMessage(msgId)), index.h("div", { key: '86355f8e1eae0c428e63a69c4de1b1090bef2ebc', tabindex: "0", "aria-hidden": "true" })));
285
310
  }
286
311
  get el() { return index.getElement(this); }
287
312
  static get watchers() { return {
@@ -5,7 +5,7 @@
5
5
 
6
6
  var index = require('./index-CzcLEdQ5.js');
7
7
  var cubicBezier = require('./cubic-bezier-DAjy1V-e.js');
8
- var overlays = require('./overlays-Dhoy6v_5.js');
8
+ var overlays = require('./overlays-BbhewSIQ.js');
9
9
  var gestureController = require('./gesture-controller-dtqlP_q4.js');
10
10
  var ionicGlobal = require('./ionic-global-CSEbHD_F.js');
11
11
  var helpers = require('./helpers-DJYxKN5U.js');
@@ -9,7 +9,7 @@ var frameworkDelegate = require('./framework-delegate-Dx9FrqAC.js');
9
9
  var helpers = require('./helpers-DJYxKN5U.js');
10
10
  var lockController = require('./lock-controller-aDB9wrEf.js');
11
11
  var capacitor = require('./capacitor-BnRBm_ys.js');
12
- var overlays = require('./overlays-Dhoy6v_5.js');
12
+ var overlays = require('./overlays-BbhewSIQ.js');
13
13
  var theme = require('./theme-IlOsGAz7.js');
14
14
  var index$3 = require('./index-D_mPAIqF.js');
15
15
  var ionicGlobal = require('./ionic-global-CSEbHD_F.js');
@@ -128,6 +128,104 @@ const setCardStatusBarDefault = (defaultStyle = Style.Default) => {
128
128
  StatusBar.setStyle({ style: defaultStyle });
129
129
  };
130
130
 
131
+ const createSheetEnterAnimation = (opts) => {
132
+ const { currentBreakpoint, backdropBreakpoint, expandToScroll, staticBackdropOpacity } = opts;
133
+ /**
134
+ * If the backdropBreakpoint is undefined, then the backdrop
135
+ * should always fade in. If the backdropBreakpoint came before the
136
+ * current breakpoint, then the backdrop should be fading in.
137
+ */
138
+ const shouldShowBackdrop = backdropBreakpoint === undefined || backdropBreakpoint < currentBreakpoint;
139
+ let initialBackdrop = '0';
140
+ if (staticBackdropOpacity) {
141
+ initialBackdrop = 'calc(var(--backdrop-opacity)';
142
+ }
143
+ else if (shouldShowBackdrop) {
144
+ initialBackdrop = `calc(var(--backdrop-opacity) * ${currentBreakpoint})`;
145
+ }
146
+ const backdropAnimation = animation.createAnimation('backdropAnimation').fromTo('opacity', 0, initialBackdrop);
147
+ if (shouldShowBackdrop) {
148
+ backdropAnimation
149
+ .beforeStyles({
150
+ 'pointer-events': 'none',
151
+ })
152
+ .afterClearStyles(['pointer-events']);
153
+ }
154
+ const wrapperAnimation = animation.createAnimation('wrapperAnimation').keyframes([
155
+ { offset: 0, opacity: 1, transform: 'translateY(100%)' },
156
+ { offset: 1, opacity: 1, transform: `translateY(${100 - currentBreakpoint * 100}%)` },
157
+ ]);
158
+ /**
159
+ * This allows the content to be scrollable at any breakpoint.
160
+ */
161
+ const contentAnimation = !expandToScroll
162
+ ? animation.createAnimation('contentAnimation').keyframes([
163
+ { offset: 0, opacity: 1, maxHeight: `${(1 - currentBreakpoint) * 100}%` },
164
+ { offset: 1, opacity: 1, maxHeight: `${currentBreakpoint * 100}%` },
165
+ ])
166
+ : undefined;
167
+ return { wrapperAnimation, backdropAnimation, contentAnimation };
168
+ };
169
+ const createSheetLeaveAnimation = (opts) => {
170
+ const { currentBreakpoint, backdropBreakpoint } = opts;
171
+ /**
172
+ * Backdrop does not always fade in from 0 to 1 if backdropBreakpoint
173
+ * is defined, so we need to account for that offset by figuring out
174
+ * what the current backdrop value should be.
175
+ */
176
+ const backdropValue = `calc(var(--backdrop-opacity) * ${getBackdropValueForSheet(currentBreakpoint, backdropBreakpoint)})`;
177
+ const defaultBackdrop = [
178
+ { offset: 0, opacity: backdropValue },
179
+ { offset: 1, opacity: 0 },
180
+ ];
181
+ const customBackdrop = [
182
+ { offset: 0, opacity: backdropValue },
183
+ { offset: backdropBreakpoint, opacity: 0 },
184
+ { offset: 1, opacity: 0 },
185
+ ];
186
+ const backdropAnimation = animation.createAnimation('backdropAnimation').keyframes(backdropBreakpoint !== 0 ? customBackdrop : defaultBackdrop);
187
+ const wrapperAnimation = animation.createAnimation('wrapperAnimation').keyframes([
188
+ { offset: 0, opacity: 1, transform: `translateY(${100 - currentBreakpoint * 100}%)` },
189
+ { offset: 1, opacity: 1, transform: `translateY(100%)` },
190
+ ]);
191
+ return { wrapperAnimation, backdropAnimation };
192
+ };
193
+
194
+ const createEnterAnimation$2 = () => {
195
+ const backdropAnimation = animation.createAnimation()
196
+ .fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
197
+ .beforeStyles({
198
+ 'pointer-events': 'none',
199
+ })
200
+ .afterClearStyles(['pointer-events']);
201
+ const wrapperAnimation = animation.createAnimation().keyframes([
202
+ { offset: 0, opacity: 0.01, transform: 'translateY(40px)' },
203
+ { offset: 1, opacity: 1, transform: `translateY(0px)` },
204
+ ]);
205
+ return { backdropAnimation, wrapperAnimation, contentAnimation: undefined };
206
+ };
207
+ /**
208
+ * Ionic Modal Enter Animation
209
+ */
210
+ const ionicEnterAnimation = (baseEl, opts) => {
211
+ const { currentBreakpoint, expandToScroll } = opts;
212
+ const root = helpers.getElementRoot(baseEl);
213
+ const { wrapperAnimation, backdropAnimation, contentAnimation } = currentBreakpoint !== undefined ? createSheetEnterAnimation(opts) : createEnterAnimation$2();
214
+ backdropAnimation.addElement(root.querySelector('ion-backdrop'));
215
+ wrapperAnimation.addElement(root.querySelector('.modal-wrapper'));
216
+ // The content animation is only added if scrolling is enabled for
217
+ // all the breakpoints.
218
+ !expandToScroll && (contentAnimation === null || contentAnimation === void 0 ? void 0 : contentAnimation.addElement(baseEl.querySelector('.ion-page')));
219
+ backdropAnimation.duration(300).easing('ease-out');
220
+ wrapperAnimation.duration(400).easing('cubic-bezier(0.32, 0.68, 0, 1)');
221
+ contentAnimation === null || contentAnimation === void 0 ? void 0 : contentAnimation.duration(400).easing('cubic-bezier(0.32, 0.68, 0, 1)');
222
+ const baseAnimation = animation.createAnimation().addElement(baseEl).addAnimation([backdropAnimation, wrapperAnimation]);
223
+ if (contentAnimation) {
224
+ baseAnimation.addAnimation(contentAnimation);
225
+ }
226
+ return baseAnimation;
227
+ };
228
+
131
229
  const handleCanDismiss = async (el, animation) => {
132
230
  /**
133
231
  * If canDismiss is not a function
@@ -554,69 +652,6 @@ const calculateProgress = (el, deltaY) => {
554
652
  return Math.max(0, Math.min(1, roundedProgress));
555
653
  };
556
654
 
557
- const createSheetEnterAnimation = (opts) => {
558
- const { currentBreakpoint, backdropBreakpoint, expandToScroll, staticBackdropOpacity } = opts;
559
- /**
560
- * If the backdropBreakpoint is undefined, then the backdrop
561
- * should always fade in. If the backdropBreakpoint came before the
562
- * current breakpoint, then the backdrop should be fading in.
563
- */
564
- const shouldShowBackdrop = backdropBreakpoint === undefined || backdropBreakpoint < currentBreakpoint;
565
- let initialBackdrop = '0';
566
- if (staticBackdropOpacity) {
567
- initialBackdrop = 'calc(var(--backdrop-opacity)';
568
- }
569
- else if (shouldShowBackdrop) {
570
- initialBackdrop = `calc(var(--backdrop-opacity) * ${currentBreakpoint})`;
571
- }
572
- const backdropAnimation = animation.createAnimation('backdropAnimation').fromTo('opacity', 0, initialBackdrop);
573
- if (shouldShowBackdrop) {
574
- backdropAnimation
575
- .beforeStyles({
576
- 'pointer-events': 'none',
577
- })
578
- .afterClearStyles(['pointer-events']);
579
- }
580
- const wrapperAnimation = animation.createAnimation('wrapperAnimation').keyframes([
581
- { offset: 0, opacity: 1, transform: 'translateY(100%)' },
582
- { offset: 1, opacity: 1, transform: `translateY(${100 - currentBreakpoint * 100}%)` },
583
- ]);
584
- /**
585
- * This allows the content to be scrollable at any breakpoint.
586
- */
587
- const contentAnimation = !expandToScroll
588
- ? animation.createAnimation('contentAnimation').keyframes([
589
- { offset: 0, opacity: 1, maxHeight: `${(1 - currentBreakpoint) * 100}%` },
590
- { offset: 1, opacity: 1, maxHeight: `${currentBreakpoint * 100}%` },
591
- ])
592
- : undefined;
593
- return { wrapperAnimation, backdropAnimation, contentAnimation };
594
- };
595
- const createSheetLeaveAnimation = (opts) => {
596
- const { currentBreakpoint, backdropBreakpoint } = opts;
597
- /**
598
- * Backdrop does not always fade in from 0 to 1 if backdropBreakpoint
599
- * is defined, so we need to account for that offset by figuring out
600
- * what the current backdrop value should be.
601
- */
602
- const backdropValue = `calc(var(--backdrop-opacity) * ${getBackdropValueForSheet(currentBreakpoint, backdropBreakpoint)})`;
603
- const defaultBackdrop = [
604
- { offset: 0, opacity: backdropValue },
605
- { offset: 1, opacity: 0 },
606
- ];
607
- const customBackdrop = [
608
- { offset: 0, opacity: backdropValue },
609
- { offset: backdropBreakpoint, opacity: 0 },
610
- { offset: 1, opacity: 0 },
611
- ];
612
- const backdropAnimation = animation.createAnimation('backdropAnimation').keyframes(backdropBreakpoint !== 0 ? customBackdrop : defaultBackdrop);
613
- const wrapperAnimation = animation.createAnimation('wrapperAnimation').keyframes([
614
- { offset: 0, opacity: 1, transform: `translateY(${100 - currentBreakpoint * 100}%)` },
615
- { offset: 1, opacity: 1, transform: `translateY(100%)` },
616
- ]);
617
- return { wrapperAnimation, backdropAnimation };
618
- };
619
-
620
655
  const createEnterAnimation$1 = () => {
621
656
  const backdropAnimation = animation.createAnimation()
622
657
  .fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
@@ -1007,16 +1042,16 @@ const mdLeaveAnimation = (baseEl, opts) => {
1007
1042
  return baseAnimation;
1008
1043
  };
1009
1044
 
1010
- const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, backdropBreakpoint, animation, breakpoints = [], expandToScroll, getCurrentBreakpoint, onDismiss, onBreakpointChange, staticBackdropOpacity, onDragStart, onDragMove, onDragEnd) => {
1045
+ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, backdropBreakpoint, animation, breakpoints = [], expandToScroll, getCurrentBreakpoint, onDismiss, onBreakpointChange, isIonicTheme, onDragStart, onDragMove, onDragEnd) => {
1011
1046
  // Defaults for the sheet swipe animation
1012
1047
  const defaultBackdrop = [
1013
1048
  { offset: 0, opacity: 'var(--backdrop-opacity)' },
1014
- { offset: 1, opacity: staticBackdropOpacity ? 'var(--backdrop-opacity)' : 0.01 },
1049
+ { offset: 1, opacity: isIonicTheme ? 'var(--backdrop-opacity)' : 0.01 },
1015
1050
  ];
1016
1051
  const customBackdrop = [
1017
1052
  { offset: 0, opacity: 'var(--backdrop-opacity)' },
1018
- { offset: 1 - backdropBreakpoint, opacity: staticBackdropOpacity ? 'var(--backdrop-opacity)' : 0 },
1019
- { offset: 1, opacity: staticBackdropOpacity ? 'var(--backdrop-opacity)' : 0 },
1053
+ { offset: 1 - backdropBreakpoint, opacity: isIonicTheme ? 'var(--backdrop-opacity)' : 0 },
1054
+ { offset: 1, opacity: isIonicTheme ? 'var(--backdrop-opacity)' : 0 },
1020
1055
  ];
1021
1056
  const SheetDefaults = {
1022
1057
  WRAPPER_KEYFRAMES: [
@@ -1339,7 +1374,9 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
1339
1374
  : step;
1340
1375
  offset = helpers.clamp(0.0001, processedStep, maxStep);
1341
1376
  animation.progressStep(offset);
1342
- const snapBreakpoint = calculateSnapBreakpoint(detail.deltaY);
1377
+ const snapBreakpoint = isIonicTheme
1378
+ ? calculateIonicSnapBreakpoint(detail.deltaY, detail.velocityY, detail.currentY)
1379
+ : calculateSnapBreakpoint(detail.deltaY);
1343
1380
  const eventDetail = {
1344
1381
  currentY: detail.currentY,
1345
1382
  deltaY: detail.deltaY,
@@ -1350,7 +1387,9 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
1350
1387
  onDragMove(eventDetail);
1351
1388
  };
1352
1389
  const onEnd = (detail) => {
1353
- const snapBreakpoint = calculateSnapBreakpoint(detail.deltaY);
1390
+ const snapBreakpoint = isIonicTheme
1391
+ ? calculateIonicSnapBreakpoint(detail.deltaY, detail.velocityY, detail.currentY)
1392
+ : calculateSnapBreakpoint(detail.deltaY);
1354
1393
  const eventDetail = {
1355
1394
  currentY: detail.currentY,
1356
1395
  deltaY: detail.deltaY,
@@ -1397,6 +1436,14 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
1397
1436
  */
1398
1437
  const shouldPreventDismiss = canDismiss && breakpoint === 0;
1399
1438
  const snapToBreakpoint = shouldPreventDismiss ? currentBreakpoint : breakpoint;
1439
+ /**
1440
+ * Detect snap-back behavior: when the snap target is the same as the current breakpoint,
1441
+ * the user released before crossing the threshold to a new breakpoint.
1442
+ * Apply different timing and easing for snap-back vs. snap-to-new.
1443
+ */
1444
+ const isSnapBack = snapToBreakpoint === currentBreakpoint;
1445
+ const duration = isIonicTheme ? (isSnapBack ? 300 : 400) : 500;
1446
+ const easing = isSnapBack ? 'cubic-bezier(0.34, 1.4, 0.64, 1)' : 'cubic-bezier(0.32, 0.68, 0, 1)';
1400
1447
  const shouldRemainOpen = snapToBreakpoint !== 0;
1401
1448
  currentBreakpoint = 0;
1402
1449
  /**
@@ -1411,13 +1458,13 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
1411
1458
  backdropAnimation.keyframes([
1412
1459
  {
1413
1460
  offset: 0,
1414
- opacity: staticBackdropOpacity
1461
+ opacity: isIonicTheme
1415
1462
  ? 'var(--backdrop-opacity)'
1416
1463
  : `calc(var(--backdrop-opacity) * ${getBackdropValueForSheet(1 - breakpointOffset, backdropBreakpoint)})`,
1417
1464
  },
1418
1465
  {
1419
1466
  offset: 1,
1420
- opacity: staticBackdropOpacity
1467
+ opacity: isIonicTheme
1421
1468
  ? 'var(--backdrop-opacity)'
1422
1469
  : `calc(var(--backdrop-opacity) * ${getBackdropValueForSheet(snapToBreakpoint, backdropBreakpoint)})`,
1423
1470
  },
@@ -1437,6 +1484,12 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
1437
1484
  }
1438
1485
  animation.progressStep(0);
1439
1486
  }
1487
+ /**
1488
+ * Apply the appropriate easing curve for this snap behavior.
1489
+ */
1490
+ if (isIonicTheme) {
1491
+ animation.easing(easing);
1492
+ }
1440
1493
  /**
1441
1494
  * Gesture should remain disabled until the
1442
1495
  * snapping animation completes.
@@ -1526,7 +1579,7 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
1526
1579
  * be added every time onEnd runs.
1527
1580
  */
1528
1581
  }, { oneTimeCallback: true })
1529
- .progressEnd(1, 0, animated ? 500 : 0);
1582
+ .progressEnd(1, 0, animated ? duration : 0);
1530
1583
  });
1531
1584
  };
1532
1585
  /**
@@ -1557,6 +1610,50 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
1557
1610
  });
1558
1611
  return snapBreakpoint;
1559
1612
  };
1613
+ /**
1614
+ * Calculates the Ionic-specific snap breakpoint using velocity-based logic.
1615
+ * This provides a more intuitive and responsive sheet behavior for the Ionic theme.
1616
+ *
1617
+ * Rules:
1618
+ * 1. Fast downward flick (> 500 px/s) always dismisses, regardless of position
1619
+ * 2. Fast upward flick (> 400 px/s) snaps to the next breakpoint above
1620
+ * 3. If dragged 40% below current snap point without fast upward flick, dismisses
1621
+ * 4. Otherwise, falls back to position-based snap (closest breakpoint)
1622
+ *
1623
+ * @param deltaY The change in Y position since gesture started
1624
+ * @param velocityY The velocity in pixels per millisecond
1625
+ * @param currentY The current Y position of the gesture
1626
+ * @returns The snap breakpoint value
1627
+ */
1628
+ const calculateIonicSnapBreakpoint = (deltaY, velocityY, currentY) => {
1629
+ // Convert velocity from px/ms to px/s for easier threshold comparison
1630
+ const velocityYPerSecond = velocityY * 1000;
1631
+ // Calculate current progress (0 = fully closed, 1 = fully expanded)
1632
+ const currentProgress = calculateProgress(currentY);
1633
+ // Rule 1: Fast downward flick always dismisses
1634
+ if (velocityYPerSecond > 500) {
1635
+ return minBreakpoint;
1636
+ }
1637
+ // Rule 2: Fast upward flick moves to next breakpoint above
1638
+ if (velocityYPerSecond < -400) {
1639
+ // Find next breakpoint above current position
1640
+ const nextBreakpoint = breakpoints.find((bp) => bp > currentProgress);
1641
+ // If no breakpoint above, stay at max breakpoint
1642
+ return nextBreakpoint !== null && nextBreakpoint !== void 0 ? nextBreakpoint : maxBreakpoint;
1643
+ }
1644
+ // Rule 3: 40% dismissal rule (only if not flicking up and 0 breakpoint exists)
1645
+ if (minBreakpoint === 0 && currentBreakpoint > 0) {
1646
+ // Calculate how far we've moved below the current snap point
1647
+ const distanceBelowSnap = currentBreakpoint - currentProgress;
1648
+ const percentageBelowSnap = distanceBelowSnap / currentBreakpoint;
1649
+ // If dragged more than 40% below and not flicking up, dismiss
1650
+ if (percentageBelowSnap > 0.4 && velocityYPerSecond <= 400) {
1651
+ return 0;
1652
+ }
1653
+ }
1654
+ // Rule 4: Fallback to position-based snap (existing logic)
1655
+ return calculateSnapBreakpoint(deltaY);
1656
+ };
1560
1657
  /**
1561
1658
  * Calculates the progress of the swipe gesture.
1562
1659
  *
@@ -1805,7 +1902,7 @@ const clearSafeAreaOverrides = (hostEl) => {
1805
1902
  hostEl.style.removeProperty('--ion-safe-area-right');
1806
1903
  };
1807
1904
 
1808
- const modalIonicCss = () => `:host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-width:0;--border-style:none;--border-color:transparent;--box-shadow:none;right:0;left:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack: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);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-shadow{position:absolute;background:transparent}.modal-handle{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;cursor:pointer;z-index:11}.modal-handle::before{position:absolute;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:""}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer{position:absolute;bottom:0;width:var(--width)}:host{--background:var(--token-bg-surface-default, var(--token-primitives-base-white, #ffffff));--box-shadow:var(--token-elevation-3, 0px 2px 7px 0px rgba(0, 0, 0, 0.05), 0px 6px 32px 0px rgba(0, 0, 0, 0.16));--backdrop-opacity:1;color:var(--token-text-default, var(--token-primitives-neutral-1200, #242424))}:host(.modal-round){--border-radius:var(--token-border-radius-1000, var(--token-scale-1000, 40px))}:host(.modal-soft){--border-radius:var(--token-border-radius-400, var(--token-scale-400, 16px))}:host(.modal-rectangular){--border-radius:var(--token-border-radius-0, var(--token-scale-0, 0px))}:host(.select-modal.modal-default){--max-height:45%;--max-width:calc(100% - (var(--token-space-400, var(--token-scale-400, 16px)) * 2));--min-height:340px}.modal-handle{right:0px;left:0px;top:var(--token-space-300, var(--token-scale-300, 12px));border-radius:var(--token-border-radius-100, var(--token-scale-100, 4px));width:var(--token-scale-1100, 44px);height:var(--token-scale-100, 4px);background-color:var(--token-primitives-neutral-300, #e0e0e0)}.modal-handle::before{-webkit-padding-start:var(--token-space-100, var(--token-scale-100, 4px));padding-inline-start:var(--token-space-100, var(--token-scale-100, 4px));-webkit-padding-end:var(--token-space-100, var(--token-scale-100, 4px));padding-inline-end:var(--token-space-100, var(--token-scale-100, 4px));padding-top:var(--token-space-100, var(--token-scale-100, 4px));padding-bottom:var(--token-space-100, var(--token-scale-100, 4px))}:host(.modal-sheet) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}:host(.modal-sheet){--height:calc(100% - (var(--ion-safe-area-top) + var(--token-scale-250, 10px)))}`;
1905
+ const modalIonicCss = () => `:host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-width:0;--border-style:none;--border-color:transparent;--box-shadow:none;right:0;left:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack: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);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-shadow{position:absolute;background:transparent}.modal-handle{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;cursor:pointer;z-index:11}.modal-handle::before{position:absolute;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:""}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer{position:absolute;bottom:0;width:var(--width)}:host{--background:var(--token-bg-surface-default, var(--token-primitives-base-white, #ffffff));--box-shadow:var(--token-elevation-3, 0px 2px 7px 0px rgba(0, 0, 0, 0.05), 0px 6px 32px 0px rgba(0, 0, 0, 0.16));--backdrop-opacity:0.7;color:var(--token-text-default, var(--token-primitives-neutral-1200, #242424))}:host(.modal-round){--border-radius:var(--token-border-radius-1000, var(--token-scale-1000, 40px))}:host(.modal-soft){--border-radius:var(--token-border-radius-400, var(--token-scale-400, 16px))}:host(.modal-rectangular){--border-radius:var(--token-border-radius-0, var(--token-scale-0, 0px))}:host(.select-modal.modal-default){--max-height:45%;--max-width:calc(100% - (var(--token-space-400, var(--token-scale-400, 16px)) * 2));--min-height:340px}.modal-handle{right:0px;left:0px;top:var(--token-space-300, var(--token-scale-300, 12px));border-radius:var(--token-border-radius-100, var(--token-scale-100, 4px));width:var(--token-scale-1100, 44px);height:var(--token-scale-100, 4px);background-color:var(--token-primitives-neutral-300, #e0e0e0)}.modal-handle::before{-webkit-padding-start:var(--token-space-100, var(--token-scale-100, 4px));padding-inline-start:var(--token-space-100, var(--token-scale-100, 4px));-webkit-padding-end:var(--token-space-100, var(--token-scale-100, 4px));padding-inline-end:var(--token-space-100, var(--token-scale-100, 4px));padding-top:var(--token-space-100, var(--token-scale-100, 4px));padding-bottom:var(--token-space-100, var(--token-scale-100, 4px))}:host(.modal-sheet) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}:host(.modal-sheet){--height:calc(100% - (var(--ion-safe-area-top) + var(--token-scale-250, 10px)))}`;
1809
1906
 
1810
1907
  const modalIosCss = () => `:host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-width:0;--border-style:none;--border-color:transparent;--box-shadow:none;right:0;left:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack: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);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-shadow{position:absolute;background:transparent}.modal-handle{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;cursor:pointer;z-index:11}.modal-handle::before{position:absolute;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:""}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer{position:absolute;bottom:0;width:var(--width)}:host{--background:var(--ion-background-color, #fff);--border-radius:0;--backdrop-opacity:0;color:var(--ion-text-color, #000)}@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{right:0px;left:0px;top:5px;border-radius:8px;width:36px;height:5px;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be))}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;width:36px;height:5px}:host(.modal-sheet){--height:calc(100% - (var(--ion-modal-offset-top, 0px) + 10px))}: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{-webkit-transform:translate3d(0, 100%, 0);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-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}:host(.modal-card){--backdrop-opacity:0;--width:100%;-ms-flex-align:end;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);-webkit-transition:all 0.5s ease-in-out;transition:all 0.5s ease-in-out}:host(.modal-card) .modal-wrapper{-webkit-box-shadow:none;box-shadow:none}:host(.modal-card) .modal-shadow{-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow)}}:host(.modal-sheet) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}`;
1811
1908
 
@@ -2245,7 +2342,7 @@ const Modal = class {
2245
2342
  this.statusBarStyle = await StatusBar.getStyle();
2246
2343
  setCardStatusBarDark();
2247
2344
  }
2248
- await overlays.present(this, 'modalEnter', iosEnterAnimation, mdEnterAnimation, {
2345
+ await overlays.present(this, 'modalEnter', iosEnterAnimation, mdEnterAnimation, ionicEnterAnimation, {
2249
2346
  presentingEl: presentingElement,
2250
2347
  currentBreakpoint: this.initialBreakpoint,
2251
2348
  backdropBreakpoint: this.backdropBreakpoint,
@@ -2932,20 +3029,20 @@ const Modal = class {
2932
3029
  const isHandleCycle = handleBehavior === 'cycle';
2933
3030
  const shape = this.getShape();
2934
3031
  const isSheetModalWithHandle = isSheetModal && showHandle;
2935
- return (index$2.h(index$2.Host, Object.assign({ key: '4b323edb66d28260c34b31fd2af8f4ae53a7ef90', "no-router": true,
3032
+ return (index$2.h(index$2.Host, Object.assign({ key: '3011c8f49c1ccb6c20c01db35b59fe4f6e22ec01', "no-router": true,
2936
3033
  // Allow the modal to be navigable when the handle is focusable
2937
3034
  tabIndex: isHandleCycle && isSheetModalWithHandle ? 0 : -1 }, htmlAttributes, { style: {
2938
3035
  zIndex: `${20000 + this.overlayIndex}`,
2939
- }, class: Object.assign({ [theme$1]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, [`modal-${shape}`]: shape !== undefined, [`modal-no-expand-scroll`]: isSheetModal && !expandToScroll, 'overlay-hidden': true, [overlays.FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false }, theme.getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle, onFocus: this.onModalFocus }), index$2.h("ion-backdrop", { key: '6059e348dc3d020f995577dde1b7949bdb2c0f2f', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), theme$1 === 'ios' && index$2.h("div", { key: '5a08a99dfc3de51ac7516fc76fdba3672f84db71', class: "modal-shadow" }), index$2.h("div", Object.assign({ key: 'a7a841a5b2f740fbf576b82b82782aa235b701ee',
3036
+ }, class: Object.assign({ [theme$1]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, [`modal-${shape}`]: shape !== undefined, [`modal-no-expand-scroll`]: isSheetModal && !expandToScroll, 'overlay-hidden': true, [overlays.FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false }, theme.getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle, onFocus: this.onModalFocus }), index$2.h("ion-backdrop", { key: 'ab99fb4ff1b335b06d5676890012dfe3cd1a1a01', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), theme$1 === 'ios' && index$2.h("div", { key: '95d4c79c4455c6a5ae6d581fa9dfaabdbee8c567', class: "modal-shadow" }), index$2.h("div", Object.assign({ key: '2d7d2406cdb986c69ef52708d33eca67d8a877f8',
2940
3037
  /*
2941
3038
  role and aria-modal must be used on the
2942
3039
  same element. They must also be set inside the
2943
3040
  shadow DOM otherwise ion-button will not be highlighted
2944
3041
  when using VoiceOver: https://bugs.webkit.org/show_bug.cgi?id=247134
2945
3042
  */
2946
- role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (index$2.h("button", { key: 'ca5567e9ab3e9e80b41314d396106faf2da09ffe', class: "modal-handle",
3043
+ role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (index$2.h("button", { key: 'ccec8bfc314763bd6dd868b69fbfdc085f5957c9', class: "modal-handle",
2947
3044
  // Prevents the handle from receiving keyboard focus when it does not cycle
2948
- tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle", ref: (el) => (this.dragHandleEl = el) })), index$2.h("slot", { key: 'da5471ea4292166798d3f949e79e7b3e55a0e83f', onSlotchange: this.onSlotChange }))));
3045
+ tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle", ref: (el) => (this.dragHandleEl = el) })), index$2.h("slot", { key: '38469e3447b46983783627d697e12cadcef614fa', onSlotchange: this.onSlotChange }))));
2949
3046
  }
2950
3047
  get el() { return index$2.getElement(this); }
2951
3048
  static get watchers() { return {