@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
@@ -1,58 +1,3 @@
1
- /**
2
- * A heuristic that applies CSS to tablet
3
- * viewports.
4
- *
5
- * Usage:
6
- * @include tablet-viewport() {
7
- * :host {
8
- * background-color: green;
9
- * }
10
- * }
11
- */
12
- /**
13
- * A heuristic that applies CSS to mobile
14
- * viewports (i.e. phones, not tablets).
15
- *
16
- * Usage:
17
- * @include mobile-viewport() {
18
- * :host {
19
- * background-color: blue;
20
- * }
21
- * }
22
- */
23
- /**
24
- * Convert a font size to a dynamic font size.
25
- * Fonts that participate in Dynamic Type should use
26
- * dynamic font sizes.
27
- * @param size - The initial font size including the unit (i.e. px or pt)
28
- * @param unit (optional) - The unit to convert to. Use this if you want to
29
- * convert to a unit other than $baselineUnit.
30
- */
31
- /**
32
- * Convert a font size to a dynamic font size but impose
33
- * a maximum font size.
34
- * @param size - The initial font size including the unit (i.e. px or pt)
35
- * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
36
- * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
37
- * convert to a unit other than $baselineUnit.
38
- */
39
- /**
40
- * Convert a font size to a dynamic font size but impose
41
- * a minimum font size.
42
- * @param size - The initial font size including the unit (i.e. px or pt)
43
- * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
44
- * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
45
- * convert to a unit other than $baselineUnit.
46
- */
47
- /**
48
- * Convert a font size to a dynamic font size but impose
49
- * maximum and minimum font sizes.
50
- * @param size - The initial font size including the unit (i.e. px or pt)
51
- * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
52
- * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
53
- * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
54
- * convert to a unit other than $baselineUnit.
55
- */
56
1
  /**
57
2
  * Convert a pixels given value into rem
58
3
  *
@@ -349,34 +294,6 @@ textarea.alert-input {
349
294
  resize: none;
350
295
  }
351
296
 
352
- .alert-radio-label,
353
- .alert-checkbox-label {
354
- display: flex;
355
- align-items: center;
356
- }
357
-
358
- .select-option-content {
359
- flex: 1;
360
- }
361
-
362
- .select-option-description {
363
- display: block;
364
- }
365
-
366
- .alert-radio-label,
367
- .alert-checkbox-label {
368
- gap: 12px;
369
- }
370
-
371
- .select-option-description {
372
- padding-left: 0;
373
- padding-right: 0;
374
- padding-top: 5px;
375
- padding-bottom: 0;
376
- color: var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));
377
- font-size: 0.75rem;
378
- }
379
-
380
297
  /**
381
298
  * Convert a pixels given value into rem
382
299
  *
@@ -9,10 +9,10 @@ import { createLockController } from "../../utils/lock-controller";
9
9
  import { printIonWarning } from "../../utils/logging/index";
10
10
  import { createDelegateController, createTriggerController, BACKDROP, dismiss, eventMethod, isCancel, prepareOverlay, present, safeCall, setOverlayId, } from "../../utils/overlays";
11
11
  import { sanitizeDOMString } from "../../utils/sanitization/index";
12
- import { renderOptionLabel } from "../../utils/select-option-render";
13
12
  import { getClassMap } from "../../utils/theme";
14
13
  import { config } from "../../global/config";
15
14
  import { getIonMode, getIonTheme } from "../../global/ionic-global";
15
+ import { ionicEnterAnimation } from "./animations/ionic.enter";
16
16
  import { iosEnterAnimation } from "./animations/ios.enter";
17
17
  import { iosLeaveAnimation } from "./animations/ios.leave";
18
18
  import { mdEnterAnimation } from "./animations/md.enter";
@@ -188,9 +188,6 @@ export class Alert {
188
188
  cssClass: (_a = i.cssClass) !== null && _a !== void 0 ? _a : '',
189
189
  attributes: i.attributes || {},
190
190
  tabindex: i.type === 'radio' && i !== focusable ? -1 : 0,
191
- startContent: i.startContent,
192
- endContent: i.endContent,
193
- description: i.description,
194
191
  });
195
192
  });
196
193
  }
@@ -248,7 +245,7 @@ export class Alert {
248
245
  async present() {
249
246
  const unlock = await this.lockController.lock();
250
247
  await this.delegateController.attachViewToDom();
251
- await present(this, 'alertEnter', iosEnterAnimation, mdEnterAnimation).then(() => {
248
+ await present(this, 'alertEnter', iosEnterAnimation, mdEnterAnimation, ionicEnterAnimation).then(() => {
252
249
  var _a, _b;
253
250
  /**
254
251
  * Check if alert has only one button and no inputs.
@@ -379,32 +376,14 @@ export class Alert {
379
376
  if (inputs.length === 0) {
380
377
  return null;
381
378
  }
382
- return (h("div", { class: "alert-checkbox-group" }, inputs.map((i) => {
383
- const optionLabelOptions = {
384
- id: i.id,
385
- label: i.label,
386
- startContent: i.startContent,
387
- endContent: i.endContent,
388
- description: i.description,
389
- };
390
- return (h("button", { type: "button", onClick: () => this.cbClick(i), "aria-checked": `${i.checked}`, id: i.id, disabled: i.disabled, tabIndex: i.tabindex, role: "checkbox", class: Object.assign(Object.assign({}, getClassMap(i.cssClass)), { 'alert-tappable': true, 'alert-checkbox': true, 'alert-checkbox-button': true, 'ion-focusable': true, 'alert-checkbox-button-disabled': i.disabled || false }) }, h("div", { class: "alert-button-inner" }, h("div", { class: "alert-checkbox-icon" }, h("div", { class: "alert-checkbox-inner" })), renderOptionLabel(optionLabelOptions, 'alert-checkbox-label')), theme === 'md' && h("ion-ripple-effect", null)));
391
- })));
379
+ return (h("div", { class: "alert-checkbox-group" }, inputs.map((i) => (h("button", { type: "button", onClick: () => this.cbClick(i), "aria-checked": `${i.checked}`, id: i.id, disabled: i.disabled, tabIndex: i.tabindex, role: "checkbox", class: Object.assign(Object.assign({}, getClassMap(i.cssClass)), { 'alert-tappable': true, 'alert-checkbox': true, 'alert-checkbox-button': true, 'ion-focusable': true, 'alert-checkbox-button-disabled': i.disabled || false }) }, h("div", { class: "alert-button-inner" }, h("div", { class: "alert-checkbox-icon" }, h("div", { class: "alert-checkbox-inner" })), h("div", { class: "alert-checkbox-label" }, i.label)), theme === 'md' && h("ion-ripple-effect", null))))));
392
380
  }
393
381
  renderRadio() {
394
382
  const inputs = this.processedInputs;
395
383
  if (inputs.length === 0) {
396
384
  return null;
397
385
  }
398
- return (h("div", { class: "alert-radio-group", role: "radiogroup", "aria-activedescendant": this.activeId }, inputs.map((i) => {
399
- const optionLabelOptions = {
400
- id: i.id,
401
- label: i.label,
402
- startContent: i.startContent,
403
- endContent: i.endContent,
404
- description: i.description,
405
- };
406
- return (h("button", { type: "button", onClick: () => this.rbClick(i), "aria-checked": `${i.checked}`, disabled: i.disabled, id: i.id, tabIndex: i.tabindex, class: Object.assign(Object.assign({}, getClassMap(i.cssClass)), { 'alert-radio-button': true, 'alert-tappable': true, 'alert-radio': true, 'ion-focusable': true, 'alert-radio-button-disabled': i.disabled || false }), role: "radio" }, h("div", { class: "alert-button-inner" }, h("div", { class: "alert-radio-icon" }, h("div", { class: "alert-radio-inner" })), renderOptionLabel(optionLabelOptions, 'alert-radio-label'))));
407
- })));
386
+ return (h("div", { class: "alert-radio-group", role: "radiogroup", "aria-activedescendant": this.activeId }, inputs.map((i) => (h("button", { type: "button", onClick: () => this.rbClick(i), "aria-checked": `${i.checked}`, disabled: i.disabled, id: i.id, tabIndex: i.tabindex, class: Object.assign(Object.assign({}, getClassMap(i.cssClass)), { 'alert-radio-button': true, 'alert-tappable': true, 'alert-radio': true, 'ion-focusable': true, 'alert-radio-button-disabled': i.disabled || false }), role: "radio" }, h("div", { class: "alert-button-inner" }, h("div", { class: "alert-radio-icon" }, h("div", { class: "alert-radio-inner" })), h("div", { class: "alert-radio-label" }, i.label)))))));
408
387
  }
409
388
  renderInput() {
410
389
  const inputs = this.processedInputs;
@@ -463,9 +442,9 @@ export class Alert {
463
442
  * If neither are defined, do not set aria-labelledby.
464
443
  */
465
444
  const ariaLabelledBy = header && subHeader ? `${hdrId} ${subHdrId}` : header ? hdrId : subHeader ? subHdrId : null;
466
- return (h(Host, { key: '85f702e645f4a8cad73af4c9dd7af4f86f70d579', tabindex: "-1", style: {
445
+ return (h(Host, { key: '7800d04d1ecc07f7ec37f26b4f217880d9dcc857', tabindex: "-1", style: {
467
446
  zIndex: `${20000 + overlayIndex}`,
468
- }, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [theme]: true, 'overlay-hidden': true, 'alert-translucent': this.translucent }), onIonAlertWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }, h("ion-backdrop", { key: 'd862b41243d5d1cc22720356be2f6384cb82357e', tappable: this.backdropDismiss }), h("div", { key: '4c333dc639c03f51d43d8fe14fa3a87442f0edae', tabindex: "0", "aria-hidden": "true" }), h("div", Object.assign({ key: '1bf38d8254a8275749def00ae89059126571250f', class: "alert-wrapper ion-overlay-wrapper", role: role, "aria-modal": "true", "aria-labelledby": ariaLabelledBy, "aria-describedby": message !== undefined ? msgId : null, tabindex: "0", ref: (el) => (this.wrapperEl = el) }, htmlAttributes), h("div", { key: '6314d4512d9e7c73c6157aeb836c6618194f7b9c', class: "alert-head" }, header && (h("h2", { key: 'bae3316beeecd6cd3973e047b33305b3e70a0edc', id: hdrId, class: "alert-title" }, header)), subHeader && !header && (h("h2", { key: '71909e6abaa42ed24e02db3f53ac4f33b1b12665', id: subHdrId, class: "alert-sub-title" }, subHeader)), subHeader && header && (h("h3", { key: 'a03827699204ae678411e83a72e7bf0af10201f5', id: subHdrId, class: "alert-sub-title" }, subHeader))), this.renderAlertMessage(msgId), this.renderAlertInputs(), this.renderAlertButtons()), h("div", { key: 'd7bbd7c25bf453c329b5fbbd1a5fcddaf98def46', tabindex: "0", "aria-hidden": "true" })));
447
+ }, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [theme]: true, 'overlay-hidden': true, 'alert-translucent': this.translucent }), onIonAlertWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }, h("ion-backdrop", { key: '9084e82a03f3686a5fb894a0044eac4afc011504', tappable: this.backdropDismiss }), h("div", { key: '7cb89e7d38b831b6bb91cdcb4ccc5d7967db7e3c', tabindex: "0", "aria-hidden": "true" }), h("div", Object.assign({ key: 'cbd469199a8740eabe0948fa32fab28f41988fa8', class: "alert-wrapper ion-overlay-wrapper", role: role, "aria-modal": "true", "aria-labelledby": ariaLabelledBy, "aria-describedby": message !== undefined ? msgId : null, tabindex: "0", ref: (el) => (this.wrapperEl = el) }, htmlAttributes), h("div", { key: 'da0a9a21792906edd840a5070f90ca60f07f331d', class: "alert-head" }, header && (h("h2", { key: '9141036580eed67d7e46c4c1c3c2ca149745ea07', id: hdrId, class: "alert-title" }, header)), subHeader && !header && (h("h2", { key: '4cb440d940debe61c2f9c6826dced794b755b11c', id: subHdrId, class: "alert-sub-title" }, subHeader)), subHeader && header && (h("h3", { key: '671bdc7f218653fc59ddf681c9fcbaaa5e2e2177', id: subHdrId, class: "alert-sub-title" }, subHeader))), this.renderAlertMessage(msgId), this.renderAlertInputs(), this.renderAlertButtons()), h("div", { key: 'e84c40927d1d3e8748c9efb6a8c6ec77f70e8e38', tabindex: "0", "aria-hidden": "true" })));
469
448
  }
470
449
  static get is() { return "ion-alert"; }
471
450
  static get encapsulation() { return "scoped"; }
@@ -473,14 +452,14 @@ export class Alert {
473
452
  return {
474
453
  "ios": ["alert.ios.scss"],
475
454
  "md": ["alert.md.scss"],
476
- "ionic": ["alert.ionic.scss"]
455
+ "ionic": ["alert.md.scss"]
477
456
  };
478
457
  }
479
458
  static get styleUrls() {
480
459
  return {
481
460
  "ios": ["alert.ios.css"],
482
461
  "md": ["alert.md.css"],
483
- "ionic": ["alert.ionic.css"]
462
+ "ionic": ["alert.md.css"]
484
463
  };
485
464
  }
486
465
  static get properties() {
@@ -1,58 +1,3 @@
1
- /**
2
- * A heuristic that applies CSS to tablet
3
- * viewports.
4
- *
5
- * Usage:
6
- * @include tablet-viewport() {
7
- * :host {
8
- * background-color: green;
9
- * }
10
- * }
11
- */
12
- /**
13
- * A heuristic that applies CSS to mobile
14
- * viewports (i.e. phones, not tablets).
15
- *
16
- * Usage:
17
- * @include mobile-viewport() {
18
- * :host {
19
- * background-color: blue;
20
- * }
21
- * }
22
- */
23
- /**
24
- * Convert a font size to a dynamic font size.
25
- * Fonts that participate in Dynamic Type should use
26
- * dynamic font sizes.
27
- * @param size - The initial font size including the unit (i.e. px or pt)
28
- * @param unit (optional) - The unit to convert to. Use this if you want to
29
- * convert to a unit other than $baselineUnit.
30
- */
31
- /**
32
- * Convert a font size to a dynamic font size but impose
33
- * a maximum font size.
34
- * @param size - The initial font size including the unit (i.e. px or pt)
35
- * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
36
- * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
37
- * convert to a unit other than $baselineUnit.
38
- */
39
- /**
40
- * Convert a font size to a dynamic font size but impose
41
- * a minimum font size.
42
- * @param size - The initial font size including the unit (i.e. px or pt)
43
- * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
44
- * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
45
- * convert to a unit other than $baselineUnit.
46
- */
47
- /**
48
- * Convert a font size to a dynamic font size but impose
49
- * maximum and minimum font sizes.
50
- * @param size - The initial font size including the unit (i.e. px or pt)
51
- * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
52
- * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
53
- * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
54
- * convert to a unit other than $baselineUnit.
55
- */
56
1
  /**
57
2
  * Convert a pixels given value into rem
58
3
  *
@@ -349,34 +294,6 @@ textarea.alert-input {
349
294
  resize: none;
350
295
  }
351
296
 
352
- .alert-radio-label,
353
- .alert-checkbox-label {
354
- display: flex;
355
- align-items: center;
356
- }
357
-
358
- .select-option-content {
359
- flex: 1;
360
- }
361
-
362
- .select-option-description {
363
- display: block;
364
- }
365
-
366
- .alert-radio-label,
367
- .alert-checkbox-label {
368
- gap: 12px;
369
- }
370
-
371
- .select-option-description {
372
- padding-left: 0;
373
- padding-right: 0;
374
- padding-top: 5px;
375
- padding-bottom: 0;
376
- color: var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));
377
- font-size: 0.75rem;
378
- }
379
-
380
297
  /**
381
298
  * Convert a pixels given value into rem
382
299
  *
@@ -0,0 +1,28 @@
1
+ /*!
2
+ * (C) Ionic http://ionicframework.com - MIT License
3
+ */
4
+ import { createAnimation } from "../../../utils/animation/animation";
5
+ /**
6
+ * Ionic Alert Enter Animation
7
+ */
8
+ export const ionicEnterAnimation = (baseEl) => {
9
+ const baseAnimation = createAnimation();
10
+ const backdropAnimation = createAnimation();
11
+ const wrapperAnimation = createAnimation();
12
+ backdropAnimation
13
+ .addElement(baseEl.querySelector('ion-backdrop'))
14
+ .fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
15
+ .beforeStyles({
16
+ 'pointer-events': 'none',
17
+ })
18
+ .afterClearStyles(['pointer-events']);
19
+ wrapperAnimation.addElement(baseEl.querySelector('.alert-wrapper')).keyframes([
20
+ { offset: 0, opacity: '0.01', transform: 'scale(0.9)' },
21
+ { offset: 1, opacity: '1', transform: 'scale(1)' },
22
+ ]);
23
+ return baseAnimation
24
+ .addElement(baseEl)
25
+ .easing('ease-in-out')
26
+ .duration(150)
27
+ .addAnimation([backdropAnimation, wrapperAnimation]);
28
+ };
@@ -0,0 +1,19 @@
1
+ /*!
2
+ * (C) Ionic http://ionicframework.com - MIT License
3
+ */
4
+ import { createAnimation } from "../../../utils/animation/animation";
5
+ /**
6
+ * Md Alert Leave Animation
7
+ */
8
+ export const ionicLeaveAnimation = (baseEl) => {
9
+ const baseAnimation = createAnimation();
10
+ const backdropAnimation = createAnimation();
11
+ const wrapperAnimation = createAnimation();
12
+ backdropAnimation.addElement(baseEl.querySelector('ion-backdrop')).fromTo('opacity', 'var(--backdrop-opacity)', 0);
13
+ wrapperAnimation.addElement(baseEl.querySelector('.alert-wrapper')).fromTo('opacity', 0.99, 0);
14
+ return baseAnimation
15
+ .addElement(baseEl)
16
+ .easing('ease-in-out')
17
+ .duration(150)
18
+ .addAnimation([backdropAnimation, wrapperAnimation]);
19
+ };
@@ -0,0 +1,28 @@
1
+ /*!
2
+ * (C) Ionic http://ionicframework.com - MIT License
3
+ */
4
+ import { createAnimation } from "../../../utils/animation/animation";
5
+ /**
6
+ * Ionic Loading Enter Animation
7
+ */
8
+ export const ionicEnterAnimation = (baseEl) => {
9
+ const baseAnimation = createAnimation();
10
+ const backdropAnimation = createAnimation();
11
+ const wrapperAnimation = createAnimation();
12
+ backdropAnimation
13
+ .addElement(baseEl.querySelector('ion-backdrop'))
14
+ .fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
15
+ .beforeStyles({
16
+ 'pointer-events': 'none',
17
+ })
18
+ .afterClearStyles(['pointer-events']);
19
+ wrapperAnimation.addElement(baseEl.querySelector('.loading-wrapper')).keyframes([
20
+ { offset: 0, opacity: 0.01, transform: 'scale(1.1)' },
21
+ { offset: 1, opacity: 1, transform: 'scale(1)' },
22
+ ]);
23
+ return baseAnimation
24
+ .addElement(baseEl)
25
+ .easing('ease-in-out')
26
+ .duration(200)
27
+ .addAnimation([backdropAnimation, wrapperAnimation]);
28
+ };
@@ -0,0 +1,22 @@
1
+ /*!
2
+ * (C) Ionic http://ionicframework.com - MIT License
3
+ */
4
+ import { createAnimation } from "../../../utils/animation/animation";
5
+ /**
6
+ * Md Loading Leave Animation
7
+ */
8
+ export const ionicLeaveAnimation = (baseEl) => {
9
+ const baseAnimation = createAnimation();
10
+ const backdropAnimation = createAnimation();
11
+ const wrapperAnimation = createAnimation();
12
+ backdropAnimation.addElement(baseEl.querySelector('ion-backdrop')).fromTo('opacity', 'var(--backdrop-opacity)', 0);
13
+ wrapperAnimation.addElement(baseEl.querySelector('.loading-wrapper')).keyframes([
14
+ { offset: 0, opacity: 0.99, transform: 'scale(1)' },
15
+ { offset: 1, opacity: 0, transform: 'scale(0.9)' },
16
+ ]);
17
+ return baseAnimation
18
+ .addElement(baseEl)
19
+ .easing('ease-in-out')
20
+ .duration(200)
21
+ .addAnimation([backdropAnimation, wrapperAnimation]);
22
+ };
@@ -10,6 +10,7 @@ import { sanitizeDOMString } from "../../utils/sanitization/index";
10
10
  import { getClassMap } from "../../utils/theme";
11
11
  import { config } from "../../global/config";
12
12
  import { getIonTheme } from "../../global/ionic-global";
13
+ import { ionicEnterAnimation } from "./animations/ionic.enter";
13
14
  import { iosEnterAnimation } from "./animations/ios.enter";
14
15
  import { iosLeaveAnimation } from "./animations/ios.leave";
15
16
  import { mdEnterAnimation } from "./animations/md.enter";
@@ -122,7 +123,7 @@ export class Loading {
122
123
  async present() {
123
124
  const unlock = await this.lockController.lock();
124
125
  await this.delegateController.attachViewToDom();
125
- await present(this, 'loadingEnter', iosEnterAnimation, mdEnterAnimation);
126
+ await present(this, 'loadingEnter', iosEnterAnimation, mdEnterAnimation, ionicEnterAnimation);
126
127
  if (this.duration > 0) {
127
128
  this.durationTimeout = setTimeout(() => this.dismiss(), this.duration + 10);
128
129
  }
@@ -180,9 +181,9 @@ export class Loading {
180
181
  * Otherwise, don't set aria-labelledby.
181
182
  */
182
183
  const ariaLabelledBy = message !== undefined ? msgId : null;
183
- return (h(Host, Object.assign({ key: '0c475f8e28e680e28e09317557795fc56e0835d8', role: "dialog", "aria-modal": "true", "aria-labelledby": ariaLabelledBy, tabindex: "-1" }, htmlAttributes, { style: {
184
+ return (h(Host, Object.assign({ key: '89d1abcbc147e33c7bfc7bb3ef8f46ae82c12349', role: "dialog", "aria-modal": "true", "aria-labelledby": ariaLabelledBy, tabindex: "-1" }, htmlAttributes, { style: {
184
185
  zIndex: `${40000 + this.overlayIndex}`,
185
- }, onIonBackdropTap: this.onBackdropTap, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [theme]: true, 'overlay-hidden': true, 'loading-translucent': this.translucent }) }), h("ion-backdrop", { key: 'd7e88feb6df8edbc326a84d07b294618f7ce6adc', visible: this.showBackdrop, tappable: this.backdropDismiss }), h("div", { key: 'f9622f45b2d9e913c325b228a1e6ed03cf2b98e8', tabindex: "0", "aria-hidden": "true" }), h("div", { key: 'f4dfdce70c4515878b247d0cc116b5cec2cf79a4', class: "loading-wrapper ion-overlay-wrapper" }, spinner && (h("div", { key: '6d4475e00c444eb3d217813ae8cc1a02a97b969e', class: "loading-spinner" }, h("ion-spinner", { key: 'd9ad8dd56ec7677c18d06936c1a1b21a0a6a87a8', name: spinner, "aria-hidden": "true" }))), message !== undefined && this.renderLoadingMessage(msgId)), h("div", { key: 'bd3159e18f33ec25d3480d47ce33fa7dfd1f1460', tabindex: "0", "aria-hidden": "true" })));
186
+ }, onIonBackdropTap: this.onBackdropTap, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [theme]: true, 'overlay-hidden': true, 'loading-translucent': this.translucent }) }), h("ion-backdrop", { key: '1f30f752a8cd8d6310d22ed4f515f39f8c14c05d', visible: this.showBackdrop, tappable: this.backdropDismiss }), h("div", { key: '5d5be9f63b62499231a605bcaa6ef83c1efaeee1', tabindex: "0", "aria-hidden": "true" }), h("div", { key: '001f8cd91d32c13116309d6bf452acee3fb2e529', class: "loading-wrapper ion-overlay-wrapper" }, spinner && (h("div", { key: '40ce912631c9d3faf60110214a040e496a86a5c8', class: "loading-spinner" }, h("ion-spinner", { key: '7954e5bef56f42c0b80ca420091a2db10484dd74', name: spinner, "aria-hidden": "true" }))), message !== undefined && this.renderLoadingMessage(msgId)), h("div", { key: '86355f8e1eae0c428e63a69c4de1b1090bef2ebc', tabindex: "0", "aria-hidden": "true" })));
186
187
  }
187
188
  static get is() { return "ion-loading"; }
188
189
  static get encapsulation() { return "scoped"; }
@@ -0,0 +1,40 @@
1
+ /*!
2
+ * (C) Ionic http://ionicframework.com - MIT License
3
+ */
4
+ import { createAnimation } from "../../../utils/animation/animation";
5
+ import { getElementRoot } from "../../../utils/helpers";
6
+ import { createSheetEnterAnimation } from "./sheet";
7
+ const createEnterAnimation = () => {
8
+ const backdropAnimation = createAnimation()
9
+ .fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
10
+ .beforeStyles({
11
+ 'pointer-events': 'none',
12
+ })
13
+ .afterClearStyles(['pointer-events']);
14
+ const wrapperAnimation = createAnimation().keyframes([
15
+ { offset: 0, opacity: 0.01, transform: 'translateY(40px)' },
16
+ { offset: 1, opacity: 1, transform: `translateY(0px)` },
17
+ ]);
18
+ return { backdropAnimation, wrapperAnimation, contentAnimation: undefined };
19
+ };
20
+ /**
21
+ * Ionic Modal Enter Animation
22
+ */
23
+ export const ionicEnterAnimation = (baseEl, opts) => {
24
+ const { currentBreakpoint, expandToScroll } = opts;
25
+ const root = getElementRoot(baseEl);
26
+ const { wrapperAnimation, backdropAnimation, contentAnimation } = currentBreakpoint !== undefined ? createSheetEnterAnimation(opts) : createEnterAnimation();
27
+ backdropAnimation.addElement(root.querySelector('ion-backdrop'));
28
+ wrapperAnimation.addElement(root.querySelector('.modal-wrapper'));
29
+ // The content animation is only added if scrolling is enabled for
30
+ // all the breakpoints.
31
+ !expandToScroll && (contentAnimation === null || contentAnimation === void 0 ? void 0 : contentAnimation.addElement(baseEl.querySelector('.ion-page')));
32
+ backdropAnimation.duration(300).easing('ease-out');
33
+ wrapperAnimation.duration(400).easing('cubic-bezier(0.32, 0.68, 0, 1)');
34
+ contentAnimation === null || contentAnimation === void 0 ? void 0 : contentAnimation.duration(400).easing('cubic-bezier(0.32, 0.68, 0, 1)');
35
+ const baseAnimation = createAnimation().addElement(baseEl).addAnimation([backdropAnimation, wrapperAnimation]);
36
+ if (contentAnimation) {
37
+ baseAnimation.addAnimation(contentAnimation);
38
+ }
39
+ return baseAnimation;
40
+ };
@@ -0,0 +1,28 @@
1
+ /*!
2
+ * (C) Ionic http://ionicframework.com - MIT License
3
+ */
4
+ import { createAnimation } from "../../../utils/animation/animation";
5
+ import { getElementRoot } from "../../../utils/helpers";
6
+ import { createSheetLeaveAnimation } from "./sheet";
7
+ const createLeaveAnimation = () => {
8
+ const backdropAnimation = createAnimation().fromTo('opacity', 'var(--backdrop-opacity)', 0);
9
+ const wrapperAnimation = createAnimation().keyframes([
10
+ { offset: 0, opacity: 0.99, transform: `translateY(0px)` },
11
+ { offset: 1, opacity: 0, transform: 'translateY(40px)' },
12
+ ]);
13
+ return { backdropAnimation, wrapperAnimation };
14
+ };
15
+ /**
16
+ * Md Modal Leave Animation
17
+ */
18
+ export const ionicLeaveAnimation = (baseEl, opts) => {
19
+ const { currentBreakpoint } = opts;
20
+ const root = getElementRoot(baseEl);
21
+ const { wrapperAnimation, backdropAnimation } = currentBreakpoint !== undefined ? createSheetLeaveAnimation(opts) : createLeaveAnimation();
22
+ backdropAnimation.addElement(root.querySelector('ion-backdrop'));
23
+ wrapperAnimation.addElement(root.querySelector('.modal-wrapper'));
24
+ backdropAnimation.duration(250).easing('ease-in');
25
+ wrapperAnimation.duration(400).easing('cubic-bezier(0.4, 0, 1, 1)');
26
+ const baseAnimation = createAnimation().addElement(baseEl).addAnimation([backdropAnimation, wrapperAnimation]);
27
+ return baseAnimation;
28
+ };
@@ -7,16 +7,16 @@ import { clamp, getElementRoot, raf } from "../../../utils/helpers";
7
7
  import { FOCUS_TRAP_DISABLE_CLASS } from "../../../utils/overlays";
8
8
  import { getBackdropValueForSheet } from "../utils";
9
9
  import { calculateSpringStep, handleCanDismiss } from "./utils";
10
- export const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, backdropBreakpoint, animation, breakpoints = [], expandToScroll, getCurrentBreakpoint, onDismiss, onBreakpointChange, staticBackdropOpacity, onDragStart, onDragMove, onDragEnd) => {
10
+ export const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, backdropBreakpoint, animation, breakpoints = [], expandToScroll, getCurrentBreakpoint, onDismiss, onBreakpointChange, isIonicTheme, onDragStart, onDragMove, onDragEnd) => {
11
11
  // Defaults for the sheet swipe animation
12
12
  const defaultBackdrop = [
13
13
  { offset: 0, opacity: 'var(--backdrop-opacity)' },
14
- { offset: 1, opacity: staticBackdropOpacity ? 'var(--backdrop-opacity)' : 0.01 },
14
+ { offset: 1, opacity: isIonicTheme ? 'var(--backdrop-opacity)' : 0.01 },
15
15
  ];
16
16
  const customBackdrop = [
17
17
  { offset: 0, opacity: 'var(--backdrop-opacity)' },
18
- { offset: 1 - backdropBreakpoint, opacity: staticBackdropOpacity ? 'var(--backdrop-opacity)' : 0 },
19
- { offset: 1, opacity: staticBackdropOpacity ? 'var(--backdrop-opacity)' : 0 },
18
+ { offset: 1 - backdropBreakpoint, opacity: isIonicTheme ? 'var(--backdrop-opacity)' : 0 },
19
+ { offset: 1, opacity: isIonicTheme ? 'var(--backdrop-opacity)' : 0 },
20
20
  ];
21
21
  const SheetDefaults = {
22
22
  WRAPPER_KEYFRAMES: [
@@ -339,7 +339,9 @@ export const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpo
339
339
  : step;
340
340
  offset = clamp(0.0001, processedStep, maxStep);
341
341
  animation.progressStep(offset);
342
- const snapBreakpoint = calculateSnapBreakpoint(detail.deltaY);
342
+ const snapBreakpoint = isIonicTheme
343
+ ? calculateIonicSnapBreakpoint(detail.deltaY, detail.velocityY, detail.currentY)
344
+ : calculateSnapBreakpoint(detail.deltaY);
343
345
  const eventDetail = {
344
346
  currentY: detail.currentY,
345
347
  deltaY: detail.deltaY,
@@ -350,7 +352,9 @@ export const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpo
350
352
  onDragMove(eventDetail);
351
353
  };
352
354
  const onEnd = (detail) => {
353
- const snapBreakpoint = calculateSnapBreakpoint(detail.deltaY);
355
+ const snapBreakpoint = isIonicTheme
356
+ ? calculateIonicSnapBreakpoint(detail.deltaY, detail.velocityY, detail.currentY)
357
+ : calculateSnapBreakpoint(detail.deltaY);
354
358
  const eventDetail = {
355
359
  currentY: detail.currentY,
356
360
  deltaY: detail.deltaY,
@@ -397,6 +401,14 @@ export const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpo
397
401
  */
398
402
  const shouldPreventDismiss = canDismiss && breakpoint === 0;
399
403
  const snapToBreakpoint = shouldPreventDismiss ? currentBreakpoint : breakpoint;
404
+ /**
405
+ * Detect snap-back behavior: when the snap target is the same as the current breakpoint,
406
+ * the user released before crossing the threshold to a new breakpoint.
407
+ * Apply different timing and easing for snap-back vs. snap-to-new.
408
+ */
409
+ const isSnapBack = snapToBreakpoint === currentBreakpoint;
410
+ const duration = isIonicTheme ? (isSnapBack ? 300 : 400) : 500;
411
+ const easing = isSnapBack ? 'cubic-bezier(0.34, 1.4, 0.64, 1)' : 'cubic-bezier(0.32, 0.68, 0, 1)';
400
412
  const shouldRemainOpen = snapToBreakpoint !== 0;
401
413
  currentBreakpoint = 0;
402
414
  /**
@@ -411,13 +423,13 @@ export const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpo
411
423
  backdropAnimation.keyframes([
412
424
  {
413
425
  offset: 0,
414
- opacity: staticBackdropOpacity
426
+ opacity: isIonicTheme
415
427
  ? 'var(--backdrop-opacity)'
416
428
  : `calc(var(--backdrop-opacity) * ${getBackdropValueForSheet(1 - breakpointOffset, backdropBreakpoint)})`,
417
429
  },
418
430
  {
419
431
  offset: 1,
420
- opacity: staticBackdropOpacity
432
+ opacity: isIonicTheme
421
433
  ? 'var(--backdrop-opacity)'
422
434
  : `calc(var(--backdrop-opacity) * ${getBackdropValueForSheet(snapToBreakpoint, backdropBreakpoint)})`,
423
435
  },
@@ -437,6 +449,12 @@ export const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpo
437
449
  }
438
450
  animation.progressStep(0);
439
451
  }
452
+ /**
453
+ * Apply the appropriate easing curve for this snap behavior.
454
+ */
455
+ if (isIonicTheme) {
456
+ animation.easing(easing);
457
+ }
440
458
  /**
441
459
  * Gesture should remain disabled until the
442
460
  * snapping animation completes.
@@ -526,7 +544,7 @@ export const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpo
526
544
  * be added every time onEnd runs.
527
545
  */
528
546
  }, { oneTimeCallback: true })
529
- .progressEnd(1, 0, animated ? 500 : 0);
547
+ .progressEnd(1, 0, animated ? duration : 0);
530
548
  });
531
549
  };
532
550
  /**
@@ -557,6 +575,50 @@ export const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpo
557
575
  });
558
576
  return snapBreakpoint;
559
577
  };
578
+ /**
579
+ * Calculates the Ionic-specific snap breakpoint using velocity-based logic.
580
+ * This provides a more intuitive and responsive sheet behavior for the Ionic theme.
581
+ *
582
+ * Rules:
583
+ * 1. Fast downward flick (> 500 px/s) always dismisses, regardless of position
584
+ * 2. Fast upward flick (> 400 px/s) snaps to the next breakpoint above
585
+ * 3. If dragged 40% below current snap point without fast upward flick, dismisses
586
+ * 4. Otherwise, falls back to position-based snap (closest breakpoint)
587
+ *
588
+ * @param deltaY The change in Y position since gesture started
589
+ * @param velocityY The velocity in pixels per millisecond
590
+ * @param currentY The current Y position of the gesture
591
+ * @returns The snap breakpoint value
592
+ */
593
+ const calculateIonicSnapBreakpoint = (deltaY, velocityY, currentY) => {
594
+ // Convert velocity from px/ms to px/s for easier threshold comparison
595
+ const velocityYPerSecond = velocityY * 1000;
596
+ // Calculate current progress (0 = fully closed, 1 = fully expanded)
597
+ const currentProgress = calculateProgress(currentY);
598
+ // Rule 1: Fast downward flick always dismisses
599
+ if (velocityYPerSecond > 500) {
600
+ return minBreakpoint;
601
+ }
602
+ // Rule 2: Fast upward flick moves to next breakpoint above
603
+ if (velocityYPerSecond < -400) {
604
+ // Find next breakpoint above current position
605
+ const nextBreakpoint = breakpoints.find((bp) => bp > currentProgress);
606
+ // If no breakpoint above, stay at max breakpoint
607
+ return nextBreakpoint !== null && nextBreakpoint !== void 0 ? nextBreakpoint : maxBreakpoint;
608
+ }
609
+ // Rule 3: 40% dismissal rule (only if not flicking up and 0 breakpoint exists)
610
+ if (minBreakpoint === 0 && currentBreakpoint > 0) {
611
+ // Calculate how far we've moved below the current snap point
612
+ const distanceBelowSnap = currentBreakpoint - currentProgress;
613
+ const percentageBelowSnap = distanceBelowSnap / currentBreakpoint;
614
+ // If dragged more than 40% below and not flicking up, dismiss
615
+ if (percentageBelowSnap > 0.4 && velocityYPerSecond <= 400) {
616
+ return 0;
617
+ }
618
+ }
619
+ // Rule 4: Fallback to position-based snap (existing logic)
620
+ return calculateSnapBreakpoint(deltaY);
621
+ };
560
622
  /**
561
623
  * Calculates the progress of the swipe gesture.
562
624
  *
@@ -191,7 +191,7 @@ ion-backdrop {
191
191
  :host {
192
192
  --background: var(--token-bg-surface-default, var(--token-primitives-base-white, #ffffff));
193
193
  --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));
194
- --backdrop-opacity: 1;
194
+ --backdrop-opacity: 0.7;
195
195
  color: var(--token-text-default, var(--token-primitives-neutral-1200, #242424));
196
196
  }
197
197