@ionic/core 8.6.2 → 8.6.3-dev.11750971489.140836b0

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 (80) hide show
  1. package/components/action-sheet.js +8 -9
  2. package/components/alert.js +7 -8
  3. package/components/ion-app.js +3 -1
  4. package/components/ion-datetime.js +8 -2
  5. package/components/ion-loading.js +7 -8
  6. package/components/ion-menu.js +27 -5
  7. package/components/ion-reorder-group.js +1 -2
  8. package/components/ion-router.js +1 -0
  9. package/components/ion-searchbar.js +4 -6
  10. package/components/ion-toast.js +6 -7
  11. package/components/modal.js +26 -10
  12. package/components/popover.js +8 -7
  13. package/dist/cjs/ion-action-sheet.cjs.entry.js +8 -9
  14. package/dist/cjs/ion-alert.cjs.entry.js +7 -8
  15. package/dist/cjs/ion-app_8.cjs.entry.js +3 -1
  16. package/dist/cjs/ion-datetime_3.cjs.entry.js +8 -2
  17. package/dist/cjs/ion-loading.cjs.entry.js +7 -8
  18. package/dist/cjs/ion-menu_3.cjs.entry.js +27 -5
  19. package/dist/cjs/ion-modal.cjs.entry.js +26 -10
  20. package/dist/cjs/ion-popover.cjs.entry.js +8 -7
  21. package/dist/cjs/ion-reorder_2.cjs.entry.js +1 -2
  22. package/dist/cjs/ion-route_4.cjs.entry.js +1 -0
  23. package/dist/cjs/ion-searchbar.cjs.entry.js +4 -6
  24. package/dist/cjs/ion-toast.cjs.entry.js +6 -7
  25. package/dist/collection/components/action-sheet/action-sheet.js +11 -12
  26. package/dist/collection/components/alert/alert.js +10 -11
  27. package/dist/collection/components/app/app.js +8 -3
  28. package/dist/collection/components/datetime/datetime.js +23 -8
  29. package/dist/collection/components/loading/loading.js +10 -11
  30. package/dist/collection/components/menu/menu.js +62 -19
  31. package/dist/collection/components/modal/modal.js +35 -16
  32. package/dist/collection/components/popover/popover.js +18 -14
  33. package/dist/collection/components/reorder-group/reorder-group.js +2 -3
  34. package/dist/collection/components/router/router.js +5 -1
  35. package/dist/collection/components/searchbar/searchbar.js +5 -7
  36. package/dist/collection/components/toast/toast.js +9 -10
  37. package/dist/docs.json +138 -72
  38. package/dist/esm/ion-action-sheet.entry.js +8 -9
  39. package/dist/esm/ion-alert.entry.js +7 -8
  40. package/dist/esm/ion-app_8.entry.js +3 -1
  41. package/dist/esm/ion-datetime_3.entry.js +8 -2
  42. package/dist/esm/ion-loading.entry.js +7 -8
  43. package/dist/esm/ion-menu_3.entry.js +27 -5
  44. package/dist/esm/ion-modal.entry.js +26 -10
  45. package/dist/esm/ion-popover.entry.js +8 -7
  46. package/dist/esm/ion-reorder_2.entry.js +1 -2
  47. package/dist/esm/ion-route_4.entry.js +1 -0
  48. package/dist/esm/ion-searchbar.entry.js +4 -6
  49. package/dist/esm/ion-toast.entry.js +6 -7
  50. package/dist/ionic/ionic.esm.js +1 -1
  51. package/dist/ionic/{p-96389029.entry.js → p-01123ecf.entry.js} +1 -1
  52. package/dist/ionic/{p-cb787a4b.entry.js → p-03d21728.entry.js} +1 -1
  53. package/dist/ionic/{p-9e699d4a.entry.js → p-0d131a02.entry.js} +1 -1
  54. package/dist/ionic/{p-6b666996.entry.js → p-2d0eccfb.entry.js} +1 -1
  55. package/dist/ionic/{p-ead42a37.entry.js → p-5f671887.entry.js} +1 -1
  56. package/dist/ionic/p-69f91268.entry.js +4 -0
  57. package/dist/ionic/p-9e32212d.entry.js +4 -0
  58. package/dist/ionic/{p-2020aa51.entry.js → p-b758a177.entry.js} +1 -1
  59. package/dist/ionic/p-b9ba04ca.entry.js +4 -0
  60. package/dist/ionic/{p-cd12ed1c.entry.js → p-d8429eb4.entry.js} +1 -1
  61. package/dist/ionic/{p-3a4feac2.entry.js → p-e37d6c67.entry.js} +1 -1
  62. package/dist/types/components/action-sheet/action-sheet.d.ts +5 -6
  63. package/dist/types/components/alert/alert.d.ts +5 -6
  64. package/dist/types/components/app/app.d.ts +2 -0
  65. package/dist/types/components/datetime/datetime.d.ts +6 -0
  66. package/dist/types/components/loading/loading.d.ts +5 -6
  67. package/dist/types/components/menu/menu.d.ts +25 -3
  68. package/dist/types/components/modal/modal.d.ts +14 -6
  69. package/dist/types/components/popover/popover.d.ts +6 -5
  70. package/dist/types/components/reorder-group/reorder-group.d.ts +0 -1
  71. package/dist/types/components/router/router.d.ts +1 -0
  72. package/dist/types/components/searchbar/searchbar.d.ts +0 -2
  73. package/dist/types/components/toast/toast.d.ts +4 -5
  74. package/dist/types/components.d.ts +32 -18
  75. package/hydrate/index.js +106 -65
  76. package/hydrate/index.mjs +106 -65
  77. package/package.json +1 -1
  78. package/dist/ionic/p-29759454.entry.js +0 -4
  79. package/dist/ionic/p-7149db7e.entry.js +0 -4
  80. package/dist/ionic/p-bec79123.entry.js +0 -4
package/hydrate/index.mjs CHANGED
@@ -7537,16 +7537,15 @@ class ActionSheet {
7537
7537
  }
7538
7538
  /**
7539
7539
  * Dismiss the action sheet overlay after it has been presented.
7540
+ * This is a no-op if the overlay has not been presented yet. If you want
7541
+ * to remove an overlay from the DOM that was never presented, use the
7542
+ * [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
7540
7543
  *
7541
7544
  * @param data Any data to emit in the dismiss events.
7542
7545
  * @param role The role of the element that is dismissing the action sheet.
7543
7546
  * This can be useful in a button handler for determining which button was
7544
- * clicked to dismiss the action sheet.
7545
- * Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
7546
- *
7547
- * This is a no-op if the overlay has not been presented yet. If you want
7548
- * to remove an overlay from the DOM that was never presented, use the
7549
- * [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
7547
+ * clicked to dismiss the action sheet. Some examples include:
7548
+ * `"cancel"`, `"destructive"`, `"selected"`, and `"backdrop"`.
7550
7549
  */
7551
7550
  async dismiss(data, role) {
7552
7551
  const unlock = await this.lockController.lock();
@@ -7658,12 +7657,12 @@ class ActionSheet {
7658
7657
  const cancelButton = allButtons.find((b) => b.role === 'cancel');
7659
7658
  const buttons = allButtons.filter((b) => b.role !== 'cancel');
7660
7659
  const headerID = `action-sheet-${overlayIndex}-header`;
7661
- return (hAsync(Host, Object.assign({ key: '7bbd202ca9e19727e7514abbe073687d982f80c3', role: "dialog", "aria-modal": "true", "aria-labelledby": header !== undefined ? headerID : null, tabindex: "-1" }, htmlAttributes, { style: {
7660
+ return (hAsync(Host, Object.assign({ key: '9fef156b2a1f09ca4a6c1fe1f37c374139bde03c', role: "dialog", "aria-modal": "true", "aria-labelledby": header !== undefined ? headerID : null, tabindex: "-1" }, htmlAttributes, { style: {
7662
7661
  zIndex: `${20000 + this.overlayIndex}`,
7663
- }, class: Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'action-sheet-translucent': this.translucent }), onIonActionSheetWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }), hAsync("ion-backdrop", { key: '23344a9221a2e6720d7b9de5249dc37256cafa7b', tappable: this.backdropDismiss }), hAsync("div", { key: 'fbc2ba15549c2ab04e759e82df6e177fd80cc0a6', tabindex: "0", "aria-hidden": "true" }), hAsync("div", { key: '748ee5235d0b4cb26d6f1b7589f77af2e37ad28a', class: "action-sheet-wrapper ion-overlay-wrapper", ref: (el) => (this.wrapperEl = el) }, hAsync("div", { key: '7ce5fa236cf75e9b1e49c4725c9a811078706554', class: "action-sheet-container" }, hAsync("div", { key: 'dc2251f3bcee4a93e3449f09621cbd2b65d329e9', class: "action-sheet-group", ref: (el) => (this.groupEl = el) }, header !== undefined && (hAsync("div", { key: '48d325c8a852f56ed57a9ada1a6709d05ba32ee2', id: headerID, class: {
7662
+ }, class: Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'action-sheet-translucent': this.translucent }), onIonActionSheetWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }), hAsync("ion-backdrop", { key: '81cf3f7d19864e041813987b46d2d115b8466819', tappable: this.backdropDismiss }), hAsync("div", { key: '791c6a976683646fc306a42c15c5078b6f06a45f', tabindex: "0", "aria-hidden": "true" }), hAsync("div", { key: 'a350b489ef7852eab9dc2227ce6d92da27dd9bf9', class: "action-sheet-wrapper ion-overlay-wrapper", ref: (el) => (this.wrapperEl = el) }, hAsync("div", { key: '69ba51ee13510c1a411d87cb4845b11b7302a36f', class: "action-sheet-container" }, hAsync("div", { key: 'bded15b8306c36591e526f0f99e1eeabcbab3915', class: "action-sheet-group", ref: (el) => (this.groupEl = el) }, header !== undefined && (hAsync("div", { key: '06b5147c0f6d9180fe8f12e75c9b4a0310226adc', id: headerID, class: {
7664
7663
  'action-sheet-title': true,
7665
7664
  'action-sheet-has-sub-title': this.subHeader !== undefined,
7666
- } }, header, this.subHeader && hAsync("div", { key: '66093728052eb67f37a35f3232761ce4a08896f3', class: "action-sheet-sub-title" }, this.subHeader))), buttons.map((b) => (hAsync("button", Object.assign({}, b.htmlAttributes, { type: "button", id: b.id, class: buttonClass$3(b), onClick: () => this.buttonClick(b), disabled: b.disabled }), hAsync("span", { class: "action-sheet-button-inner" }, b.icon && hAsync("ion-icon", { icon: b.icon, "aria-hidden": "true", lazy: false, class: "action-sheet-icon" }), b.text), mode === 'md' && hAsync("ion-ripple-effect", null))))), cancelButton && (hAsync("div", { key: 'f4eb8e3e2885b85af5080df18d0de0bdd1d719de', class: "action-sheet-group action-sheet-group-cancel" }, hAsync("button", Object.assign({ key: '169f4eb09255aba85062baad49ceb151239fbfb7' }, cancelButton.htmlAttributes, { type: "button", class: buttonClass$3(cancelButton), onClick: () => this.buttonClick(cancelButton) }), hAsync("span", { key: '25fb8a466dd67ea94c79cfb4f9965527e1ce6d42', class: "action-sheet-button-inner" }, cancelButton.icon && (hAsync("ion-icon", { key: 'eb5b071e120a2c86afdf967af6a763a43044d1ca', icon: cancelButton.icon, "aria-hidden": "true", lazy: false, class: "action-sheet-icon" })), cancelButton.text), mode === 'md' && hAsync("ion-ripple-effect", { key: '452ad7e1052b2c681e2d98de8193949755ad4d54' })))))), hAsync("div", { key: 'e1cecf280c987c050d9445e2c458b903f153089b', tabindex: "0", "aria-hidden": "true" })));
7665
+ } }, header, this.subHeader && hAsync("div", { key: '54874362a75c679aba803bf4f8768f5404d2dd28', class: "action-sheet-sub-title" }, this.subHeader))), buttons.map((b) => (hAsync("button", Object.assign({}, b.htmlAttributes, { type: "button", id: b.id, class: buttonClass$3(b), onClick: () => this.buttonClick(b), disabled: b.disabled }), hAsync("span", { class: "action-sheet-button-inner" }, b.icon && hAsync("ion-icon", { icon: b.icon, "aria-hidden": "true", lazy: false, class: "action-sheet-icon" }), b.text), mode === 'md' && hAsync("ion-ripple-effect", null))))), cancelButton && (hAsync("div", { key: '67b0de298eb424f3dea846a841b7a06d70e3930d', class: "action-sheet-group action-sheet-group-cancel" }, hAsync("button", Object.assign({ key: 'e7e3f9a5495eea9b97dbf885ef36944f2e420eff' }, cancelButton.htmlAttributes, { type: "button", class: buttonClass$3(cancelButton), onClick: () => this.buttonClick(cancelButton) }), hAsync("span", { key: 'f889d29ed6c3d14bbc1d805888351d87f5122377', class: "action-sheet-button-inner" }, cancelButton.icon && (hAsync("ion-icon", { key: '7c05cf424b38c37fd40aaeb42a494387291571fb', icon: cancelButton.icon, "aria-hidden": "true", lazy: false, class: "action-sheet-icon" })), cancelButton.text), mode === 'md' && hAsync("ion-ripple-effect", { key: 'bed927b477dc2708a5123ef560274fca9819b3d6' })))))), hAsync("div", { key: 'c5df1b11dc15a93892d57065d3dd5fbe02e43b39', tabindex: "0", "aria-hidden": "true" })));
7667
7666
  }
7668
7667
  get el() { return getElement(this); }
7669
7668
  static get watchers() { return {
@@ -8216,16 +8215,15 @@ class Alert {
8216
8215
  }
8217
8216
  /**
8218
8217
  * Dismiss the alert overlay after it has been presented.
8218
+ * This is a no-op if the overlay has not been presented yet. If you want
8219
+ * to remove an overlay from the DOM that was never presented, use the
8220
+ * [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
8219
8221
  *
8220
8222
  * @param data Any data to emit in the dismiss events.
8221
8223
  * @param role The role of the element that is dismissing the alert.
8222
8224
  * This can be useful in a button handler for determining which button was
8223
- * clicked to dismiss the alert.
8224
- * Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
8225
- *
8226
- * This is a no-op if the overlay has not been presented yet. If you want
8227
- * to remove an overlay from the DOM that was never presented, use the
8228
- * [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
8225
+ * clicked to dismiss the alert. Some examples include:
8226
+ * `"cancel"`, `"destructive"`, `"selected"`, and `"backdrop"`.
8229
8227
  */
8230
8228
  async dismiss(data, role) {
8231
8229
  const unlock = await this.lockController.lock();
@@ -8393,9 +8391,9 @@ class Alert {
8393
8391
  * If neither are defined, do not set aria-labelledby.
8394
8392
  */
8395
8393
  const ariaLabelledBy = header && subHeader ? `${hdrId} ${subHdrId}` : header ? hdrId : subHeader ? subHdrId : null;
8396
- return (hAsync(Host, { key: 'f8ee04fe6a97a2585b302c8e1a9eea3b122e3479', tabindex: "-1", style: {
8394
+ return (hAsync(Host, { key: '6025440b9cd369d4fac89e7e4296c84a10a0b8e0', tabindex: "-1", style: {
8397
8395
  zIndex: `${20000 + overlayIndex}`,
8398
- }, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'alert-translucent': this.translucent }), onIonAlertWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }, hAsync("ion-backdrop", { key: 'e9592e879f51c27ef20016beec12c986be632cf3', tappable: this.backdropDismiss }), hAsync("div", { key: '5e9425c3c8acdea6f8006389689c73220e2ce423', tabindex: "0", "aria-hidden": "true" }), hAsync("div", Object.assign({ key: '615465703e357619681fc36ed7276591a6fe3787', 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), hAsync("div", { key: '934eba3759456cd4660e10f274edc7859f908461', class: "alert-head" }, header && (hAsync("h2", { key: '7d5d98d71f81f59a2cba227121b6fa01e6cc53b6', id: hdrId, class: "alert-title" }, header)), subHeader && !header && (hAsync("h2", { key: 'e5f5d35748c58a98ee933eb15cb1dcaf8113e9a7', id: subHdrId, class: "alert-sub-title" }, subHeader)), subHeader && header && (hAsync("h3", { key: 'a5cb89ca02bfa9c4828e694cb0835493a9088b05', id: subHdrId, class: "alert-sub-title" }, subHeader))), this.renderAlertMessage(msgId), this.renderAlertInputs(), this.renderAlertButtons()), hAsync("div", { key: 'cacffc31c911882df73e6845d15c8bb2d4acab56', tabindex: "0", "aria-hidden": "true" })));
8396
+ }, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'alert-translucent': this.translucent }), onIonAlertWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }, hAsync("ion-backdrop", { key: '3cd5ca8b99cb95b11dd22ab41a820d841142896f', tappable: this.backdropDismiss }), hAsync("div", { key: '4cc62ae6e21424057d22aeef1e8fc77011e77cd5', tabindex: "0", "aria-hidden": "true" }), hAsync("div", Object.assign({ key: '364057a69f25aa88904df17bdcf7e5bf714e7830', 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), hAsync("div", { key: '78694e3c0db2d408df3899fb1a90859bcc8d14cc', class: "alert-head" }, header && (hAsync("h2", { key: 'ec88ff3e4e1ea871b5975133fdcf4cac38b05e0f', id: hdrId, class: "alert-title" }, header)), subHeader && !header && (hAsync("h2", { key: '9b09bc8bb68af255ef8b7d22587acc946148e544', id: subHdrId, class: "alert-sub-title" }, subHeader)), subHeader && header && (hAsync("h3", { key: '99abe815f75d2df7f1b77c0df9f3436724fea76f', id: subHdrId, class: "alert-sub-title" }, subHeader))), this.renderAlertMessage(msgId), this.renderAlertInputs(), this.renderAlertButtons()), hAsync("div", { key: 'a43d0c22c0e46b1ef911f92ffeb253d7911b85f7', tabindex: "0", "aria-hidden": "true" })));
8399
8397
  }
8400
8398
  get el() { return getElement(this); }
8401
8399
  static get watchers() { return {
@@ -8464,6 +8462,8 @@ class App {
8464
8462
  * a result of another user action. (Ex: We focus the first element
8465
8463
  * inside of a popover when the user presents it, but the popover is not always
8466
8464
  * presented as a result of keyboard action.)
8465
+ *
8466
+ * @param elements An array of HTML elements to set focus on.
8467
8467
  */
8468
8468
  async setFocus(elements) {
8469
8469
  if (this.focusVisible) {
@@ -8472,7 +8472,7 @@ class App {
8472
8472
  }
8473
8473
  render() {
8474
8474
  const mode = getIonMode$1(this);
8475
- return (hAsync(Host, { key: '03aa892f986330078d112b1e8b010df98fa7e39e', class: {
8475
+ return (hAsync(Host, { key: '9be440c65819e4fa67c2c3c6477ab40b3ad3eed3', class: {
8476
8476
  [mode]: true,
8477
8477
  'ion-page': true,
8478
8478
  'force-statusbar-padding': config.getBoolean('_forceStatusbarPadding'),
@@ -13092,6 +13092,8 @@ class Datetime {
13092
13092
  * Confirms the selected datetime value, updates the
13093
13093
  * `value` property, and optionally closes the popover
13094
13094
  * or modal that the datetime was presented in.
13095
+ *
13096
+ * @param closeOverlay If `true`, closes the parent overlay. Defaults to `false`.
13095
13097
  */
13096
13098
  async confirm(closeOverlay = false) {
13097
13099
  const { isCalendarPicker, activeParts, preferWheel, workingParts } = this;
@@ -13125,6 +13127,8 @@ class Datetime {
13125
13127
  * Resets the internal state of the datetime but does not update the value.
13126
13128
  * Passing a valid ISO-8601 string will reset the state of the component to the provided date.
13127
13129
  * If no value is provided, the internal state will be reset to the clamped value of the min, max and today.
13130
+ *
13131
+ * @param startDate A valid [ISO-8601 string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#date_time_string_format) to reset the datetime state to.
13128
13132
  */
13129
13133
  async reset(startDate) {
13130
13134
  this.processValue(startDate);
@@ -13134,6 +13138,8 @@ class Datetime {
13134
13138
  * optionally closes the popover
13135
13139
  * or modal that the datetime was
13136
13140
  * presented in.
13141
+ *
13142
+ * @param closeOverlay If `true`, closes the parent overlay. Defaults to `false`.
13137
13143
  */
13138
13144
  async cancel(closeOverlay = false) {
13139
13145
  this.ionCancel.emit();
@@ -13947,7 +13953,7 @@ class Datetime {
13947
13953
  const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
13948
13954
  const hasWheelVariant = hasDatePresentation && preferWheel;
13949
13955
  renderHiddenInput(true, el, name, formatValue(value), disabled);
13950
- return (hAsync(Host, { key: '7ea46c27aa5fb01b748dd4d6eb2340ad13f65175', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, createColorClasses$1(color, {
13956
+ return (hAsync(Host, { key: '79677f5bc0fb32fb68569636bd76e68238e62eb8', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, createColorClasses$1(color, {
13951
13957
  [mode]: true,
13952
13958
  ['datetime-readonly']: readonly,
13953
13959
  ['datetime-disabled']: disabled,
@@ -13957,7 +13963,7 @@ class Datetime {
13957
13963
  [`datetime-size-${size}`]: true,
13958
13964
  [`datetime-prefer-wheel`]: hasWheelVariant,
13959
13965
  [`datetime-grid`]: isGridStyle,
13960
- })) }, hAsync("div", { key: '6964378424c58b053e23279d08eaedf28dfcc315', class: "intersection-tracker", ref: (el) => (this.intersectionTrackerRef = el) }), this.renderDatetime(mode)));
13966
+ })) }, hAsync("div", { key: 'bf07b1e3c64af6e837663ff470bea93787a6e86f', class: "intersection-tracker", ref: (el) => (this.intersectionTrackerRef = el) }), this.renderDatetime(mode)));
13961
13967
  }
13962
13968
  get el() { return getElement(this); }
13963
13969
  static get watchers() { return {
@@ -19005,16 +19011,15 @@ class Loading {
19005
19011
  }
19006
19012
  /**
19007
19013
  * Dismiss the loading overlay after it has been presented.
19014
+ * This is a no-op if the overlay has not been presented yet. If you want
19015
+ * to remove an overlay from the DOM that was never presented, use the
19016
+ * [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
19008
19017
  *
19009
19018
  * @param data Any data to emit in the dismiss events.
19010
19019
  * @param role The role of the element that is dismissing the loading.
19011
19020
  * This can be useful in a button handler for determining which button was
19012
- * clicked to dismiss the loading.
19013
- * Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
19014
- *
19015
- * This is a no-op if the overlay has not been presented yet. If you want
19016
- * to remove an overlay from the DOM that was never presented, use the
19017
- * [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
19021
+ * clicked to dismiss the loading. Some examples include:
19022
+ * `"cancel"`, `"destructive"`, `"selected"`, and `"backdrop"`.
19018
19023
  */
19019
19024
  async dismiss(data, role) {
19020
19025
  const unlock = await this.lockController.lock();
@@ -19056,9 +19061,9 @@ class Loading {
19056
19061
  * Otherwise, don't set aria-labelledby.
19057
19062
  */
19058
19063
  const ariaLabelledBy = message !== undefined ? msgId : null;
19059
- return (hAsync(Host, Object.assign({ key: '6369ed244c06c39aa338141bffacf7a861d7da1a', role: "dialog", "aria-modal": "true", "aria-labelledby": ariaLabelledBy, tabindex: "-1" }, htmlAttributes, { style: {
19064
+ return (hAsync(Host, Object.assign({ key: '4497183ce220242abe19ae15f328f9a92ccafbbc', role: "dialog", "aria-modal": "true", "aria-labelledby": ariaLabelledBy, tabindex: "-1" }, htmlAttributes, { style: {
19060
19065
  zIndex: `${40000 + this.overlayIndex}`,
19061
- }, onIonBackdropTap: this.onBackdropTap, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'loading-translucent': this.translucent }) }), hAsync("ion-backdrop", { key: '1fd5fd8581d59eec321e534f9116f3ec0501010a', visible: this.showBackdrop, tappable: this.backdropDismiss }), hAsync("div", { key: 'b4028045b0c8fbb9946136d85d939d55120b867c', tabindex: "0", "aria-hidden": "true" }), hAsync("div", { key: 'b045fb0e61cc28e8163d45be18b431918dc27c80', class: "loading-wrapper ion-overlay-wrapper" }, spinner && (hAsync("div", { key: '2cf9df796f987d1251b3599d10a48ed87a1d0eb9', class: "loading-spinner" }, hAsync("ion-spinner", { key: '371cd41655402326adcb1e2fe1481009a83243b2', name: spinner, "aria-hidden": "true" }))), message !== undefined && this.renderLoadingMessage(msgId)), hAsync("div", { key: '2a5e5e66d22ee4c1cef0c93815ef023d47e7a8eb', tabindex: "0", "aria-hidden": "true" })));
19066
+ }, onIonBackdropTap: this.onBackdropTap, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'loading-translucent': this.translucent }) }), hAsync("ion-backdrop", { key: '231dec84e424a2dc358ce95b84d6035cf43e4dea', visible: this.showBackdrop, tappable: this.backdropDismiss }), hAsync("div", { key: 'c9af29b6e6bb49a217396a5c874bbfb8835a926c', tabindex: "0", "aria-hidden": "true" }), hAsync("div", { key: 'a8659863743cdeccbe1ba810eaabfd3ebfcb86f3', class: "loading-wrapper ion-overlay-wrapper" }, spinner && (hAsync("div", { key: '3b346f39bc71691bd8686556a1e142198a7b12fa', class: "loading-spinner" }, hAsync("ion-spinner", { key: '8dc2bf1556e5138e262827f1516c59ecd09f3520', name: spinner, "aria-hidden": "true" }))), message !== undefined && this.renderLoadingMessage(msgId)), hAsync("div", { key: '054164c0dbae9a0e0973dd3c8e28f5b771820310', tabindex: "0", "aria-hidden": "true" })));
19062
19067
  }
19063
19068
  get el() { return getElement(this); }
19064
19069
  static get watchers() { return {
@@ -19686,7 +19691,7 @@ class Menu {
19686
19691
  return Promise.resolve(this._isOpen);
19687
19692
  }
19688
19693
  /**
19689
- * Returns `true` is the menu is active.
19694
+ * Returns `true` if the menu is active.
19690
19695
  *
19691
19696
  * A menu is active when it can be opened or closed, meaning it's enabled
19692
19697
  * and it's not part of a `ion-split-pane`.
@@ -19697,6 +19702,10 @@ class Menu {
19697
19702
  /**
19698
19703
  * Opens the menu. If the menu is already open or it can't be opened,
19699
19704
  * it returns `false`.
19705
+ *
19706
+ * @param animated If `true`, the menu will animate when opening.
19707
+ * If `false`, the menu will open instantly without animation.
19708
+ * Defaults to `true`.
19700
19709
  */
19701
19710
  open(animated = true) {
19702
19711
  return this.setOpen(true, animated);
@@ -19704,20 +19713,38 @@ class Menu {
19704
19713
  /**
19705
19714
  * Closes the menu. If the menu is already closed or it can't be closed,
19706
19715
  * it returns `false`.
19716
+ *
19717
+ * @param animated If `true`, the menu will animate when closing. If `false`,
19718
+ * the menu will close instantly without animation. Defaults to `true`.
19719
+ * @param role The role of the element that is closing the menu.
19720
+ * This can be useful in a button handler for determining which button was
19721
+ * clicked to close the menu. Some examples include:
19722
+ * `"cancel"`, `"destructive"`, `"selected"`, and `"backdrop"`.
19707
19723
  */
19708
19724
  close(animated = true, role) {
19709
19725
  return this.setOpen(false, animated, role);
19710
19726
  }
19711
19727
  /**
19712
- * Toggles the menu. If the menu is already open, it will try to close, otherwise it will try to open it.
19728
+ * Toggles the menu. If the menu is already open, it will try to close,
19729
+ * otherwise it will try to open it.
19713
19730
  * If the operation can't be completed successfully, it returns `false`.
19731
+ *
19732
+ * @param animated If `true`, the menu will animate when opening/closing.
19733
+ * If `false`, the menu will open/close instantly without animation.
19734
+ * Defaults to `true`.
19714
19735
  */
19715
19736
  toggle(animated = true) {
19716
19737
  return this.setOpen(!this._isOpen, animated);
19717
19738
  }
19718
19739
  /**
19719
- * Opens or closes the button.
19740
+ * Opens or closes the menu.
19720
19741
  * If the operation can't be completed successfully, it returns `false`.
19742
+ *
19743
+ * @param shouldOpen If `true`, the menu will open. If `false`, the menu
19744
+ * will close.
19745
+ * @param animated If `true`, the menu will animate when opening/closing.
19746
+ * If `false`, the menu will open/close instantly without animation.
19747
+ * @param role The role of the element that is closing the menu.
19721
19748
  */
19722
19749
  setOpen(shouldOpen, animated = true, role) {
19723
19750
  return menuController._setOpen(this, shouldOpen, animated, role);
@@ -20082,14 +20109,14 @@ class Menu {
20082
20109
  * the ionBackButton listener in the menu controller
20083
20110
  * will handle closing the menu when Escape is pressed.
20084
20111
  */
20085
- return (hAsync(Host, { key: '9e4ae9476a76781f1d228395c9af9e1c39ec82bb', onKeyDown: shouldUseCloseWatcher() ? null : this.onKeydown, role: "navigation", "aria-label": inheritedAttributes['aria-label'] || 'menu', class: {
20112
+ return (hAsync(Host, { key: 'a5c75aa40a34530b56ee3b98d706a5ac5ae300de', onKeyDown: shouldUseCloseWatcher() ? null : this.onKeydown, role: "navigation", "aria-label": inheritedAttributes['aria-label'] || 'menu', class: {
20086
20113
  [mode]: true,
20087
20114
  [`menu-type-${type}`]: true,
20088
20115
  'menu-enabled': !disabled,
20089
20116
  [`menu-side-${side}`]: true,
20090
20117
  'menu-pane-visible': isPaneVisible,
20091
20118
  'split-pane-side': hostContext('ion-split-pane', el),
20092
- } }, hAsync("div", { key: 'c6153589d872ac7e3fdf5eedfdb858eb64ccd713', class: "menu-inner", part: "container", ref: (el) => (this.menuInnerEl = el) }, hAsync("slot", { key: '9994aac4b22f17db34c9b8b2aa56b8710b9df645' })), hAsync("ion-backdrop", { key: 'f09ac30cc4dd2dcb10628965e659dae5a23baf98', ref: (el) => (this.backdropEl = el), class: "menu-backdrop", tappable: false, stopPropagation: false, part: "backdrop" })));
20119
+ } }, hAsync("div", { key: '3f5f70acd4d3ed6bb445122f4f01d73db738a75f', class: "menu-inner", part: "container", ref: (el) => (this.menuInnerEl = el) }, hAsync("slot", { key: '3161326c9330e7f7441299c428b87a91b31a83e9' })), hAsync("ion-backdrop", { key: '917b50f38489bdf03d0c642af8b4e4e172c7dc4c', ref: (el) => (this.backdropEl = el), class: "menu-backdrop", tappable: false, stopPropagation: false, part: "backdrop" })));
20093
20120
  }
20094
20121
  get el() { return getElement(this); }
20095
20122
  static get watchers() { return {
@@ -22094,6 +22121,17 @@ class Modal {
22094
22121
  el.dispatchEvent(ev);
22095
22122
  }
22096
22123
  };
22124
+ /**
22125
+ * When the modal receives focus directly, pass focus to the handle
22126
+ * if it exists and is focusable, otherwise let the focus trap handle it.
22127
+ */
22128
+ this.onModalFocus = (ev) => {
22129
+ const { dragHandleEl, el } = this;
22130
+ // Only handle focus if the modal itself was focused (not a child element)
22131
+ if (ev.target === el && dragHandleEl && dragHandleEl.tabIndex !== -1) {
22132
+ dragHandleEl.focus();
22133
+ }
22134
+ };
22097
22135
  }
22098
22136
  onIsOpenChange(newValue, oldValue) {
22099
22137
  if (newValue === true && oldValue === false) {
@@ -22425,13 +22463,13 @@ class Modal {
22425
22463
  }
22426
22464
  /**
22427
22465
  * Dismiss the modal overlay after it has been presented.
22428
- *
22429
- * @param data Any data to emit in the dismiss events.
22430
- * @param role The role of the element that is dismissing the modal. For example, 'cancel' or 'backdrop'.
22431
- *
22432
22466
  * This is a no-op if the overlay has not been presented yet. If you want
22433
22467
  * to remove an overlay from the DOM that was never presented, use the
22434
22468
  * [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
22469
+ *
22470
+ * @param data Any data to emit in the dismiss events.
22471
+ * @param role The role of the element that is dismissing the modal.
22472
+ * For example, `cancel` or `backdrop`.
22435
22473
  */
22436
22474
  async dismiss(data, role) {
22437
22475
  var _a;
@@ -22503,8 +22541,10 @@ class Modal {
22503
22541
  return eventMethod(this.el, 'ionModalWillDismiss');
22504
22542
  }
22505
22543
  /**
22506
- * Move a sheet style modal to a specific breakpoint. The breakpoint value must
22507
- * be a value defined in your `breakpoints` array.
22544
+ * Move a sheet style modal to a specific breakpoint.
22545
+ *
22546
+ * @param breakpoint The breakpoint value to move the sheet modal to.
22547
+ * Must be a value defined in your `breakpoints` array.
22508
22548
  */
22509
22549
  async setCurrentBreakpoint(breakpoint) {
22510
22550
  if (!this.isSheetModal) {
@@ -22563,18 +22603,21 @@ class Modal {
22563
22603
  const mode = getIonMode$1(this);
22564
22604
  const isCardModal = presentingElement !== undefined && mode === 'ios';
22565
22605
  const isHandleCycle = handleBehavior === 'cycle';
22566
- return (hAsync(Host, Object.assign({ key: '0bcbdcfcd7d890eb599da3f97f21c317d34f8e0e', "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
22606
+ const isSheetModalWithHandle = isSheetModal && showHandle;
22607
+ return (hAsync(Host, Object.assign({ key: '8add05bb43a2cdb5e3cf180147d31eb85a018fe0', "no-router": true,
22608
+ // Allow the modal to be navigable when the handle is focusable
22609
+ tabIndex: isHandleCycle && isSheetModalWithHandle ? 0 : -1 }, htmlAttributes, { style: {
22567
22610
  zIndex: `${20000 + this.overlayIndex}`,
22568
- }, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, [`modal-no-expand-scroll`]: isSheetModal && !expandToScroll, 'overlay-hidden': true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle }), hAsync("ion-backdrop", { key: 'd72159e73daa5af7349aa9e8f695aa435eb43069', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && hAsync("div", { key: 'fd2d9b13676ae72473881649a397b6eacde03a03', class: "modal-shadow" }), hAsync("div", Object.assign({ key: '908eccb1ad982dcde2dbcff0cbb18b6e60f8ba74',
22611
+ }, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, [`modal-no-expand-scroll`]: isSheetModal && !expandToScroll, 'overlay-hidden': true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle, onFocus: this.onModalFocus }), hAsync("ion-backdrop", { key: '90a6605a9564a699d6f66cf71cf6b506796a2963', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && hAsync("div", { key: 'a97d071395333bf803c0a9347bda000cf7500d8d', class: "modal-shadow" }), hAsync("div", Object.assign({ key: 'e7b7985c7414a13e3ba8dcecf497b76e92edf53e',
22569
22612
  /*
22570
22613
  role and aria-modal must be used on the
22571
22614
  same element. They must also be set inside the
22572
22615
  shadow DOM otherwise ion-button will not be highlighted
22573
22616
  when using VoiceOver: https://bugs.webkit.org/show_bug.cgi?id=247134
22574
22617
  */
22575
- role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (hAsync("button", { key: '332dc0b40363a77c7be62331d9f26def91c790e9', class: "modal-handle",
22618
+ role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (hAsync("button", { key: '8258b65570b11a8ee9c9df2537d6419cd2e34536', class: "modal-handle",
22576
22619
  // Prevents the handle from receiving keyboard focus when it does not cycle
22577
- tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle" })), hAsync("slot", { key: 'c32698350193c450327e97049daf8b8d1fda0d0e' }))));
22620
+ 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) })), hAsync("slot", { key: '394370d0ed03ee03152f8f8abae7ff7664ca5c13' }))));
22578
22621
  }
22579
22622
  get el() { return getElement(this); }
22580
22623
  static get watchers() { return {
@@ -26801,6 +26844,8 @@ class Popover {
26801
26844
  * Developers can pass a mouse, touch, or pointer event
26802
26845
  * to position the popover relative to where that event
26803
26846
  * was dispatched.
26847
+ *
26848
+ * @param event The event to position the popover relative to.
26804
26849
  */
26805
26850
  async present(event) {
26806
26851
  const unlock = await this.lockController.lock();
@@ -26864,15 +26909,14 @@ class Popover {
26864
26909
  }
26865
26910
  /**
26866
26911
  * Dismiss the popover overlay after it has been presented.
26912
+ * This is a no-op if the overlay has not been presented yet. If you want
26913
+ * to remove an overlay from the DOM that was never presented, use the
26914
+ * [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
26867
26915
  *
26868
26916
  * @param data Any data to emit in the dismiss events.
26869
- * @param role The role of the element that is dismissing the popover. For example, 'cancel' or 'backdrop'.
26917
+ * @param role The role of the element that is dismissing the popover. For example, `cancel` or `backdrop`.
26870
26918
  * @param dismissParentPopover If `true`, dismissing this popover will also dismiss
26871
26919
  * a parent popover if this popover is nested. Defaults to `true`.
26872
- *
26873
- * This is a no-op if the overlay has not been presented yet. If you want
26874
- * to remove an overlay from the DOM that was never presented, use the
26875
- * [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
26876
26920
  */
26877
26921
  async dismiss(data, role, dismissParentPopover = true) {
26878
26922
  const unlock = await this.lockController.lock();
@@ -26924,9 +26968,9 @@ class Popover {
26924
26968
  const { onLifecycle, parentPopover, dismissOnSelect, side, arrow, htmlAttributes, focusTrap } = this;
26925
26969
  const desktop = isPlatform('desktop');
26926
26970
  const enableArrow = arrow && !parentPopover;
26927
- return (hAsync(Host, Object.assign({ key: '1de4862099cfcb5035e78008e6dc7c1371846f9a', "aria-modal": "true", "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
26971
+ return (hAsync(Host, Object.assign({ key: '16866c02534968c982cf4730d2936d03a5107c8b', "aria-modal": "true", "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
26928
26972
  zIndex: `${20000 + this.overlayIndex}`,
26929
- }, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'popover-translucent': this.translucent, 'overlay-hidden': true, 'popover-desktop': desktop, [`popover-side-${side}`]: true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false, 'popover-nested': !!parentPopover }), onIonPopoverDidPresent: onLifecycle, onIonPopoverWillPresent: onLifecycle, onIonPopoverWillDismiss: onLifecycle, onIonPopoverDidDismiss: onLifecycle, onIonBackdropTap: this.onBackdropTap }), !parentPopover && hAsync("ion-backdrop", { key: '981aa4e0102cb93312ffbd8243cdf2a0cdc60469', tappable: this.backdropDismiss, visible: this.showBackdrop, part: "backdrop" }), hAsync("div", { key: '1a28ed55e9d34ef78cf0eb0178643301fd2dd75d', class: "popover-wrapper ion-overlay-wrapper", onClick: dismissOnSelect ? () => this.dismiss() : undefined }, enableArrow && hAsync("div", { key: '1c206ea5eb3c0b5883a3d45c34cd22dd5ffe4b65', class: "popover-arrow", part: "arrow" }), hAsync("div", { key: '5ba561486a328c0c7ab825995fdbfb7a196429a4', class: "popover-content", part: "content" }, hAsync("slot", { key: '00fc244ce9dcc2dfc677e6c34b7c8e7a330b2b03' })))));
26973
+ }, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'popover-translucent': this.translucent, 'overlay-hidden': true, 'popover-desktop': desktop, [`popover-side-${side}`]: true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false, 'popover-nested': !!parentPopover }), onIonPopoverDidPresent: onLifecycle, onIonPopoverWillPresent: onLifecycle, onIonPopoverWillDismiss: onLifecycle, onIonPopoverDidDismiss: onLifecycle, onIonBackdropTap: this.onBackdropTap }), !parentPopover && hAsync("ion-backdrop", { key: '0df258601a4d30df3c27aa8234a7d5e056c3ecbb', tappable: this.backdropDismiss, visible: this.showBackdrop, part: "backdrop" }), hAsync("div", { key: 'f94e80ed996b957b5cd09b826472b4f60e8fcc78', class: "popover-wrapper ion-overlay-wrapper", onClick: dismissOnSelect ? () => this.dismiss() : undefined }, enableArrow && hAsync("div", { key: '185ce22f6386e8444a9cc7b8818dbfc16c463c99', class: "popover-arrow", part: "arrow" }), hAsync("div", { key: '206202b299404e110de5397b229678cca18568d3', class: "popover-content", part: "content" }, hAsync("slot", { key: 'ee543a0b92d6e35a837c0a0e4617c7b0fc4ad0b0' })))));
26930
26974
  }
26931
26975
  get el() { return getElement(this); }
26932
26976
  static get watchers() { return {
@@ -29506,7 +29550,6 @@ class ReorderGroup {
29506
29550
  }
29507
29551
  /**
29508
29552
  * Completes the reorder operation. Must be called by the `ionItemReorder` event.
29509
- *
29510
29553
  * If a list of items is passed, the list will be reordered and returned in the
29511
29554
  * proper order.
29512
29555
  *
@@ -29693,7 +29736,7 @@ class ReorderGroup {
29693
29736
  }
29694
29737
  render() {
29695
29738
  const mode = getIonMode$1(this);
29696
- return (hAsync(Host, { key: 'f30613b361c5c3095b7928a92fb4b1e8d6eff600', class: {
29739
+ return (hAsync(Host, { key: 'dfcdc3a6aa1b2fba15f861ec868d6a11e667c9de', class: {
29697
29740
  [mode]: true,
29698
29741
  'reorder-enabled': !this.disabled,
29699
29742
  'reorder-list-active': this.state !== 0 /* ReorderGroupState.Idle */,
@@ -30532,6 +30575,7 @@ class Router {
30532
30575
  *
30533
30576
  * @param path The path to navigate to.
30534
30577
  * @param direction The direction of the animation. Defaults to `"forward"`.
30578
+ * @param animation A custom animation to use for the transition.
30535
30579
  */
30536
30580
  async push(path, direction = 'forward', animation) {
30537
30581
  var _a;
@@ -31261,10 +31305,8 @@ class Searchbar {
31261
31305
  /**
31262
31306
  * Sets focus on the native `input` in `ion-searchbar`. Use this method instead of the global
31263
31307
  * `input.focus()`.
31264
- *
31265
31308
  * Developers who wish to focus an input when a page enters
31266
31309
  * should call `setFocus()` in the `ionViewDidEnter()` lifecycle method.
31267
- *
31268
31310
  * Developers who wish to focus an input when an overlay is presented
31269
31311
  * should call `setFocus` after `didPresent` has resolved.
31270
31312
  *
@@ -31443,8 +31485,8 @@ class Searchbar {
31443
31485
  const clearIcon = this.clearIcon || (mode === 'ios' ? closeCircle : closeSharp);
31444
31486
  const searchIcon = this.searchIcon || (mode === 'ios' ? searchOutline : searchSharp);
31445
31487
  const shouldShowCancelButton = this.shouldShowCancelButton();
31446
- const cancelButton = this.showCancelButton !== 'never' && (hAsync("button", { key: '5835c36fcb0b52aec956538202a783f6c194d853', "aria-label": cancelButtonText, "aria-hidden": shouldShowCancelButton ? undefined : 'true', type: "button", tabIndex: mode === 'ios' && !shouldShowCancelButton ? -1 : undefined, onMouseDown: this.onCancelSearchbar, onTouchStart: this.onCancelSearchbar, class: "searchbar-cancel-button" }, hAsync("div", { key: '85df41676bed611467bd4df0002b08baee4f539c', "aria-hidden": "true" }, mode === 'md' ? (hAsync("ion-icon", { "aria-hidden": "true", mode: mode, icon: this.cancelButtonIcon, lazy: false })) : (cancelButtonText))));
31447
- return (hAsync(Host, { key: 'e1e30cdd79f9f54d5f2d27501012358bc46880e5', role: "search", "aria-disabled": this.disabled ? 'true' : null, class: createColorClasses$1(this.color, {
31488
+ const cancelButton = this.showCancelButton !== 'never' && (hAsync("button", { key: '19e18775856db87daeb4b9e3d7bca0461915a0df', "aria-label": cancelButtonText, "aria-hidden": shouldShowCancelButton ? undefined : 'true', type: "button", tabIndex: mode === 'ios' && !shouldShowCancelButton ? -1 : undefined, onMouseDown: this.onCancelSearchbar, onTouchStart: this.onCancelSearchbar, class: "searchbar-cancel-button" }, hAsync("div", { key: 'b3bbdcc033f3bd3441d619e4a252cef0dad4d07e', "aria-hidden": "true" }, mode === 'md' ? (hAsync("ion-icon", { "aria-hidden": "true", mode: mode, icon: this.cancelButtonIcon, lazy: false })) : (cancelButtonText))));
31489
+ return (hAsync(Host, { key: '074aa60e051bfb3225e87d44bbb6346c59c73574', role: "search", "aria-disabled": this.disabled ? 'true' : null, class: createColorClasses$1(this.color, {
31448
31490
  [mode]: true,
31449
31491
  'searchbar-animated': animated,
31450
31492
  'searchbar-disabled': this.disabled,
@@ -31454,14 +31496,14 @@ class Searchbar {
31454
31496
  'searchbar-has-focus': this.focused,
31455
31497
  'searchbar-should-show-clear': this.shouldShowClearButton(),
31456
31498
  'searchbar-should-show-cancel': this.shouldShowCancelButton(),
31457
- }) }, hAsync("div", { key: '7e9db147282a35bb1e3c9c6125b9a044e81ddde5', class: "searchbar-input-container" }, hAsync("input", Object.assign({ key: '02f08da21326b78d6cd249d54deab96fd8472ba8', "aria-label": "search text", disabled: this.disabled, ref: (el) => (this.nativeInput = el), class: "searchbar-input", inputMode: this.inputmode, enterKeyHint: this.enterkeyhint, name: this.name, onInput: this.onInput, onChange: this.onChange, onBlur: this.onBlur, onFocus: this.onFocus, minLength: this.minlength, maxLength: this.maxlength, placeholder: this.placeholder, type: this.type, value: this.getValue(), autoCapitalize: autocapitalize === 'default' ? undefined : autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, spellcheck: this.spellcheck }, this.inheritedAttributes)), mode === 'md' && cancelButton, hAsync("ion-icon", { key: '048b00348456bd827ae734491c46a67bfb146227', "aria-hidden": "true", mode: mode, icon: searchIcon, lazy: false, class: "searchbar-search-icon" }), hAsync("button", { key: '71f64339bbfd54ebd26a0946c8ee9d726cd89c04', "aria-label": "reset", type: "button", "no-blur": true, class: "searchbar-clear-button", onPointerDown: (ev) => {
31499
+ }) }, hAsync("div", { key: '54f58a79fe36e85d9295157303f1be89c98bbdaf', class: "searchbar-input-container" }, hAsync("input", Object.assign({ key: 'f991a37fcf54d26b7ad10d89084764e03d97b9de', "aria-label": "search text", disabled: this.disabled, ref: (el) => (this.nativeInput = el), class: "searchbar-input", inputMode: this.inputmode, enterKeyHint: this.enterkeyhint, name: this.name, onInput: this.onInput, onChange: this.onChange, onBlur: this.onBlur, onFocus: this.onFocus, minLength: this.minlength, maxLength: this.maxlength, placeholder: this.placeholder, type: this.type, value: this.getValue(), autoCapitalize: autocapitalize === 'default' ? undefined : autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, spellcheck: this.spellcheck }, this.inheritedAttributes)), mode === 'md' && cancelButton, hAsync("ion-icon", { key: '8b44dd90a3292c5cf872ef16a8520675f5673494', "aria-hidden": "true", mode: mode, icon: searchIcon, lazy: false, class: "searchbar-search-icon" }), hAsync("button", { key: '79d9cfed8f01268044f82811a35d323a12dca749', "aria-label": "reset", type: "button", "no-blur": true, class: "searchbar-clear-button", onPointerDown: (ev) => {
31458
31500
  /**
31459
31501
  * This prevents mobile browsers from
31460
31502
  * blurring the input when the clear
31461
31503
  * button is activated.
31462
31504
  */
31463
31505
  ev.preventDefault();
31464
- }, onClick: () => this.onClearInput(true) }, hAsync("ion-icon", { key: '9b1a177b21951c1c95897a468b34bb7bbd63d137', "aria-hidden": "true", mode: mode, icon: clearIcon, lazy: false, class: "searchbar-clear-icon" }))), mode === 'ios' && cancelButton));
31506
+ }, onClick: () => this.onClearInput(true) }, hAsync("ion-icon", { key: 'aa3b9fa8a61f853236783ac7bcd0b113ea65ece2', "aria-hidden": "true", mode: mode, icon: clearIcon, lazy: false, class: "searchbar-clear-icon" }))), mode === 'ios' && cancelButton));
31465
31507
  }
31466
31508
  get el() { return getElement(this); }
31467
31509
  static get watchers() { return {
@@ -35338,16 +35380,15 @@ class Toast {
35338
35380
  }
35339
35381
  /**
35340
35382
  * Dismiss the toast overlay after it has been presented.
35383
+ * This is a no-op if the overlay has not been presented yet. If you want
35384
+ * to remove an overlay from the DOM that was never presented, use the
35385
+ * [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
35341
35386
  *
35342
35387
  * @param data Any data to emit in the dismiss events.
35343
35388
  * @param role The role of the element that is dismissing the toast.
35344
35389
  * This can be useful in a button handler for determining which button was
35345
35390
  * clicked to dismiss the toast.
35346
- * Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
35347
- *
35348
- * This is a no-op if the overlay has not been presented yet. If you want
35349
- * to remove an overlay from the DOM that was never presented, use the
35350
- * [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
35391
+ * Some examples include: `"cancel"`, `"destructive"`, `"selected"`, and `"backdrop"`.
35351
35392
  */
35352
35393
  async dismiss(data, role) {
35353
35394
  var _a, _b;
@@ -35515,9 +35556,9 @@ class Toast {
35515
35556
  if (layout === 'stacked' && startButtons.length > 0 && endButtons.length > 0) {
35516
35557
  printIonWarning('[ion-toast] - This toast is using start and end buttons with the stacked toast layout. We recommend following the best practice of using either start or end buttons with the stacked toast layout.', el);
35517
35558
  }
35518
- return (hAsync(Host, Object.assign({ key: '425be734aee0eeef281ab1609a9f982ce8b5e852', tabindex: "-1" }, this.htmlAttributes, { style: {
35559
+ return (hAsync(Host, Object.assign({ key: 'd1ecd90c87700aad4685e230cdd430aa286b8791', tabindex: "-1" }, this.htmlAttributes, { style: {
35519
35560
  zIndex: `${60000 + this.overlayIndex}`,
35520
- }, class: createColorClasses$1(this.color, Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent })), onIonToastWillDismiss: this.dispatchCancelHandler }), hAsync("div", { key: '7c3ad1a8df9e21fc30fc179c7edebeabcf3c6874', class: wrapperClass }, hAsync("div", { key: 'f950c21e8d7bf92653e0bd52e820ed6b84fa8cf5', class: "toast-container", part: "container" }, this.renderButtons(startButtons, 'start'), this.icon !== undefined && (hAsync("ion-icon", { key: '0266241927dbe16799adb57f9fc11bd5372877b2', class: "toast-icon", part: "icon", icon: this.icon, lazy: false, "aria-hidden": "true" })), hAsync("div", { key: '9ef4b87bad672af6a5b693af61375564daf1eeeb', class: "toast-content", role: "status", "aria-atomic": "true", "aria-live": "polite" }, !revealContentToScreenReader && header !== undefined && this.renderHeader('oldHeader', 'true'), !revealContentToScreenReader && message !== undefined && this.renderToastMessage('oldMessage', 'true'), revealContentToScreenReader && header !== undefined && this.renderHeader('header'), revealContentToScreenReader && message !== undefined && this.renderToastMessage('header')), this.renderButtons(endButtons, 'end')))));
35561
+ }, class: createColorClasses$1(this.color, Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent })), onIonToastWillDismiss: this.dispatchCancelHandler }), hAsync("div", { key: '4bfc863417324de69e222054d5cf9c452038b41e', class: wrapperClass }, hAsync("div", { key: '3417940afec0392e81b7d54c7cb00f3ab6c30d47', class: "toast-container", part: "container" }, this.renderButtons(startButtons, 'start'), this.icon !== undefined && (hAsync("ion-icon", { key: '6bf878fbc85c01e1e5faa9d97d46255a6511a952', class: "toast-icon", part: "icon", icon: this.icon, lazy: false, "aria-hidden": "true" })), hAsync("div", { key: '54b500348a9c37660c3aff37436d9188e4374947', class: "toast-content", role: "status", "aria-atomic": "true", "aria-live": "polite" }, !revealContentToScreenReader && header !== undefined && this.renderHeader('oldHeader', 'true'), !revealContentToScreenReader && message !== undefined && this.renderToastMessage('oldMessage', 'true'), revealContentToScreenReader && header !== undefined && this.renderHeader('header'), revealContentToScreenReader && message !== undefined && this.renderToastMessage('header')), this.renderButtons(endButtons, 'end')))));
35521
35562
  }
35522
35563
  get el() { return getElement(this); }
35523
35564
  static get watchers() { return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ionic/core",
3
- "version": "8.6.2",
3
+ "version": "8.6.3-dev.11750971489.140836b0",
4
4
  "description": "Base components for Ionic",
5
5
  "keywords": [
6
6
  "ionic",
@@ -1,4 +0,0 @@
1
- /*!
2
- * (C) Ionic http://ionicframework.com - MIT License
3
- */
4
- import{r as t,d as o,m as i,w as a,e,l as r,h as n,j as s,k as d}from"./p-B_U9CtaY.js";import{f as p,i as h,d as l,r as c,a as m,p as f}from"./p-QwEXyOze.js";import{C as b,a as u,d as w}from"./p-BhLqfMrf.js";import{e as x,g as v,r as g,b as k,h as y}from"./p-Do-uqmtX.js";import{c as A}from"./p-B-hirT0v.js";import{g as B}from"./p-CIGNaXM1.js";import{G as D,O as Y,F as E,e as S,B as j,j as C,k as M,f as T,g as O,h as $}from"./p-aIxOGKys.js";import{g as P}from"./p-DiVJyqlX.js";import{e as R,w as z}from"./p-BROiNJRB.js";import{KEYBOARD_DID_OPEN as I}from"./p-9eeaBrnk.js";import{c as W}from"./p-bNmY-WfR.js";import{g as L}from"./p-hHmYLOfE.js";import{createGesture as N}from"./p-Cl0B-RWe.js";import{w as H}from"./p-ZjP4CjeZ.js";import"./p-DzH0J0yi.js";import"./p-BTEOs1at.js";import"./p-D13Eaw-8.js";var K;!function(t){t.Dark="DARK",t.Light="LIGHT",t.Default="DEFAULT"}(K||(K={}));const Z={getEngine(){const t=B();if(null==t?void 0:t.isPluginAvailable("StatusBar"))return t.Plugins.StatusBar},setStyle(t){const o=this.getEngine();o&&o.setStyle(t)},getStyle:async function(){const t=this.getEngine();if(!t)return K.Default;const{style:o}=await t.getInfo();return o}},F=(t,o)=>{if(1===o)return 0;const i=1/(1-o);return t*i+-o*i},G=()=>{!H||H.innerWidth>=768||Z.setStyle({style:K.Dark})},V=(t=K.Default)=>{!H||H.innerWidth>=768||Z.setStyle({style:t})},_=async(t,o)=>{"function"==typeof t.canDismiss&&await t.canDismiss(void 0,D)&&(o.isRunning()?o.onFinish((()=>{t.dismiss(void 0,"handler")}),{oneTimeCallback:!0}):t.dismiss(void 0,"handler"))},X=t=>.00255275*2.71828**(-14.9619*t)-1.00255*2.71828**(-.0380968*t)+1,q=.915,J=(t,o)=>x(400,t/Math.abs(1.1*o),500),U=t=>{const{currentBreakpoint:o,backdropBreakpoint:i,expandToScroll:a}=t,e=void 0===i||i<o,r=e?`calc(var(--backdrop-opacity) * ${o})`:"0",n=W("backdropAnimation").fromTo("opacity",0,r);return e&&n.beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),{wrapperAnimation:W("wrapperAnimation").keyframes([{offset:0,opacity:1,transform:"translateY(100%)"},{offset:1,opacity:1,transform:`translateY(${100-100*o}%)`}]),backdropAnimation:n,contentAnimation:a?void 0:W("contentAnimation").keyframes([{offset:0,opacity:1,maxHeight:100*(1-o)+"%"},{offset:1,opacity:1,maxHeight:100*o+"%"}])}},Q=t=>{const{currentBreakpoint:o,backdropBreakpoint:i}=t,a=`calc(var(--backdrop-opacity) * ${F(o,i)})`,e=[{offset:0,opacity:a},{offset:1,opacity:0}],r=[{offset:0,opacity:a},{offset:i,opacity:0},{offset:1,opacity:0}],n=W("backdropAnimation").keyframes(0!==i?r:e);return{wrapperAnimation:W("wrapperAnimation").keyframes([{offset:0,opacity:1,transform:`translateY(${100-100*o}%)`},{offset:1,opacity:1,transform:"translateY(100%)"}]),backdropAnimation:n}},tt=(t,o)=>{const{presentingEl:i,currentBreakpoint:a,expandToScroll:e}=o,r=v(t),{wrapperAnimation:n,backdropAnimation:s,contentAnimation:d}=void 0!==a?U(o):{backdropAnimation:W().fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),wrapperAnimation:W().fromTo("transform","translateY(100vh)","translateY(0vh)"),contentAnimation:void 0};s.addElement(r.querySelector("ion-backdrop")),n.addElement(r.querySelectorAll(".modal-wrapper, .modal-shadow")).beforeStyles({opacity:1}),!e&&(null==d||d.addElement(t.querySelector(".ion-page")));const p=W("entering-base").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(500).addAnimation([n]);if(d&&p.addAnimation(d),i){const t=window.innerWidth<768,o="ION-MODAL"===i.tagName&&void 0!==i.presentingElement,a=v(i),e=W().beforeStyles({transform:"translateY(0)","transform-origin":"top center",overflow:"hidden"}),r=document.body;if(t){const t=CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px",a=`translateY(${o?"-10px":t}) scale(0.915)`;e.afterStyles({transform:a}).beforeAddWrite((()=>r.style.setProperty("background-color","black"))).addElement(i).keyframes([{offset:0,filter:"contrast(1)",transform:"translateY(0px) scale(1)",borderRadius:"0px"},{offset:1,filter:"contrast(0.85)",transform:a,borderRadius:"10px 10px 0 0"}]),p.addAnimation(e)}else if(p.addAnimation(s),o){const t=`translateY(-10px) scale(${o?q:1})`;e.afterStyles({transform:t}).addElement(a.querySelector(".modal-wrapper")).keyframes([{offset:0,filter:"contrast(1)",transform:"translateY(0) scale(1)"},{offset:1,filter:"contrast(0.85)",transform:t}]);const i=W().afterStyles({transform:t}).addElement(a.querySelector(".modal-shadow")).keyframes([{offset:0,opacity:"1",transform:"translateY(0) scale(1)"},{offset:1,opacity:"0",transform:t}]);p.addAnimation([e,i])}else n.fromTo("opacity","0","1")}else p.addAnimation(s);return p},ot=(t,o,i=500)=>{const{presentingEl:a,currentBreakpoint:e}=o,r=v(t),{wrapperAnimation:n,backdropAnimation:s}=void 0!==e?Q(o):{backdropAnimation:W().fromTo("opacity","var(--backdrop-opacity)",0),wrapperAnimation:W().fromTo("transform","translateY(0vh)","translateY(100vh)")};s.addElement(r.querySelector("ion-backdrop")),n.addElement(r.querySelectorAll(".modal-wrapper, .modal-shadow")).beforeStyles({opacity:1});const d=W("leaving-base").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(i).addAnimation(n);if(a){const t=window.innerWidth<768,o="ION-MODAL"===a.tagName&&void 0!==a.presentingElement,i=v(a),e=W().beforeClearStyles(["transform"]).afterClearStyles(["transform"]).onFinish((t=>{1===t&&(a.style.setProperty("overflow",""),Array.from(r.querySelectorAll("ion-modal:not(.overlay-hidden)")).filter((t=>void 0!==t.presentingElement)).length<=1&&r.style.setProperty("background-color",""))})),r=document.body;if(t){const t=CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px",i=`translateY(${o?"-10px":t}) scale(0.915)`;e.addElement(a).keyframes([{offset:0,filter:"contrast(0.85)",transform:i,borderRadius:"10px 10px 0 0"},{offset:1,filter:"contrast(1)",transform:"translateY(0px) scale(1)",borderRadius:"0px"}]),d.addAnimation(e)}else if(d.addAnimation(s),o){const t=`translateY(-10px) scale(${o?q:1})`;e.addElement(i.querySelector(".modal-wrapper")).afterStyles({transform:"translate3d(0, 0, 0)"}).keyframes([{offset:0,filter:"contrast(0.85)",transform:t},{offset:1,filter:"contrast(1)",transform:"translateY(0) scale(1)"}]);const a=W().addElement(i.querySelector(".modal-shadow")).afterStyles({transform:"translateY(0) scale(1)"}).keyframes([{offset:0,opacity:"0",transform:t},{offset:1,opacity:"1",transform:"translateY(0) scale(1)"}]);d.addAnimation([e,a])}else n.fromTo("opacity","1","0")}else d.addAnimation(s);return d},it=(t,o)=>{const{currentBreakpoint:i,expandToScroll:a}=o,e=v(t),{wrapperAnimation:r,backdropAnimation:n,contentAnimation:s}=void 0!==i?U(o):{backdropAnimation:W().fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),wrapperAnimation:W().keyframes([{offset:0,opacity:.01,transform:"translateY(40px)"},{offset:1,opacity:1,transform:"translateY(0px)"}]),contentAnimation:void 0};n.addElement(e.querySelector("ion-backdrop")),r.addElement(e.querySelector(".modal-wrapper")),!a&&(null==s||s.addElement(t.querySelector(".ion-page")));const d=W().addElement(t).easing("cubic-bezier(0.36,0.66,0.04,1)").duration(280).addAnimation([n,r]);return s&&d.addAnimation(s),d},at=(t,o)=>{const{currentBreakpoint:i}=o,a=v(t),{wrapperAnimation:e,backdropAnimation:r}=void 0!==i?Q(o):{backdropAnimation:W().fromTo("opacity","var(--backdrop-opacity)",0),wrapperAnimation:W().keyframes([{offset:0,opacity:.99,transform:"translateY(0px)"},{offset:1,opacity:0,transform:"translateY(40px)"}])};return r.addElement(a.querySelector("ion-backdrop")),e.addElement(a.querySelector(".modal-wrapper")),W().easing("cubic-bezier(0.47,0,0.745,0.715)").duration(200).addAnimation([r,e])},et=class{constructor(i){t(this,i),this.didPresent=o(this,"ionModalDidPresent",7),this.willPresent=o(this,"ionModalWillPresent",7),this.willDismiss=o(this,"ionModalWillDismiss",7),this.didDismiss=o(this,"ionModalDidDismiss",7),this.ionBreakpointDidChange=o(this,"ionBreakpointDidChange",7),this.didPresentShorthand=o(this,"didPresent",7),this.willPresentShorthand=o(this,"willPresent",7),this.willDismissShorthand=o(this,"willDismiss",7),this.didDismissShorthand=o(this,"didDismiss",7),this.ionMount=o(this,"ionMount",7),this.lockController=A(),this.triggerController=S(),this.coreDelegate=b(),this.isSheetModal=!1,this.inheritedAttributes={},this.inline=!1,this.gestureAnimationDismissing=!1,this.presented=!1,this.hasController=!1,this.keyboardClose=!0,this.expandToScroll=!0,this.backdropBreakpoint=0,this.handleBehavior="none",this.backdropDismiss=!0,this.showBackdrop=!0,this.animated=!0,this.isOpen=!1,this.keepContentsMounted=!1,this.focusTrap=!0,this.canDismiss=!0,this.onHandleClick=()=>{const{sheetTransition:t,handleBehavior:o}=this;"cycle"===o&&void 0===t&&this.moveToNextBreakpoint()},this.onBackdropTap=()=>{const{sheetTransition:t}=this;void 0===t&&this.dismiss(void 0,j)},this.onLifecycle=t=>{const o=this.usersElement,i=rt[t.type];if(o&&i){const a=new CustomEvent(i,{bubbles:!1,cancelable:!1,detail:t.detail});o.dispatchEvent(a)}}}onIsOpenChange(t,o){!0===t&&!1===o?this.present():!1===t&&!0===o&&this.dismiss()}triggerChanged(){const{trigger:t,el:o,triggerController:i}=this;t&&i.addClickListener(o,t)}breakpointsChanged(t){void 0!==t&&(this.sortedBreakpoints=t.sort(((t,o)=>t-o)))}connectedCallback(){const{el:t}=this;C(t),this.triggerChanged()}disconnectedCallback(){this.triggerController.removeClickListener()}componentWillLoad(){var t;const{breakpoints:o,initialBreakpoint:a,el:e,htmlAttributes:r}=this,n=this.isSheetModal=void 0!==o&&void 0!==a,s=["aria-label","role"];this.inheritedAttributes=k(e,s),void 0!==r&&s.forEach((t=>{r[t]&&(this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:r[t]}),delete r[t])})),n&&(this.currentBreakpoint=this.initialBreakpoint),void 0===o||void 0===a||o.includes(a)||i("[ion-modal] - Your breakpoints array must include the initialBreakpoint value."),(null===(t=this.htmlAttributes)||void 0===t?void 0:t.id)||M(this.el)}componentDidLoad(){!0===this.isOpen&&g((()=>this.present())),this.breakpointsChanged(this.breakpoints),this.triggerChanged()}getDelegate(t=!1){if(this.workingDelegate&&!t)return{delegate:this.workingDelegate,inline:this.inline};const o=this.inline=null!==this.el.parentNode&&!this.hasController;return{inline:o,delegate:this.workingDelegate=o?this.delegate||this.coreDelegate:this.delegate}}async checkCanDismiss(t,o){const{canDismiss:i}=this;return"function"==typeof i?i(t,o):i}async present(){const t=await this.lockController.lock();if(this.presented)return void t();const{presentingElement:o,el:i}=this;this.currentBreakpoint=this.initialBreakpoint;const{inline:r,delegate:n}=this.getDelegate(!0);this.ionMount.emit(),this.usersElement=await u(n,i,this.component,["ion-page"],this.componentProps,r),y(i)?await R(this.usersElement):this.keepContentsMounted||await z(),a((()=>this.el.classList.add("show-modal")));const s=void 0!==o;s&&"ios"===e(this)&&(this.statusBarStyle=await Z.getStyle(),G()),await T(this,"modalEnter",tt,it,{presentingEl:o,currentBreakpoint:this.initialBreakpoint,backdropBreakpoint:this.backdropBreakpoint,expandToScroll:this.expandToScroll}),"undefined"!=typeof window&&(this.keyboardOpenCallback=()=>{this.gesture&&(this.gesture.enable(!1),g((()=>{this.gesture&&this.gesture.enable(!0)})))},window.addEventListener(I,this.keyboardOpenCallback)),this.isSheetModal?this.initSheetGesture():s&&this.initSwipeToClose(),t()}initSwipeToClose(){var t;if("ios"!==e(this))return;const{el:o}=this,i=this.leaveAnimation||r.get("modalLeave",ot),a=this.animation=i(o,{presentingEl:this.presentingElement,expandToScroll:this.expandToScroll});if(!m(o))return void f(o);const n=null!==(t=this.statusBarStyle)&&void 0!==t?t:K.Default;this.gesture=((t,o,i,a)=>{const e=.5,r=t.offsetHeight;let n=!1,s=!1,d=null,m=null,f=!0,b=0;const u=N({el:t,gestureName:"modalSwipeToClose",gesturePriority:Y,direction:"y",threshold:10,canStart:t=>{const o=t.event.target;if(null===o||!o.closest)return!0;if(d=p(o),d){if(h(d)){const t=v(d);m=t.querySelector(".inner-scroll")}else m=d;return!d.querySelector("ion-refresher")&&0===m.scrollTop}return null===o.closest("ion-footer")},onStart:i=>{const{deltaY:a}=i;f=!d||!h(d)||d.scrollY,s=void 0!==t.canDismiss&&!0!==t.canDismiss,a>0&&d&&l(d),o.progressStart(!0,n?1:0)},onMove:t=>{const{deltaY:a}=t;a>0&&d&&l(d);const n=t.deltaY/r,p=n>=0&&s,h=p?.2:.9999,c=p?X(n/h):n,m=x(1e-4,c,h);o.progressStep(m),m>=e&&b<e?V(i):m<e&&b>=e&&G(),b=m},onEnd:i=>{const p=i.velocityY,h=i.deltaY/r,l=h>=0&&s,m=l?.2:.9999,b=l?X(h/m):h,w=x(1e-4,b,m),v=!l&&(i.deltaY+1e3*p)/r>=e;let g=v?-.001:.001;v?(o.easing("cubic-bezier(0.32, 0.72, 0, 1)"),g+=L([0,0],[.32,.72],[0,1],[1,1],w)[0]):(o.easing("cubic-bezier(1, 0, 0.68, 0.28)"),g+=L([0,0],[1,0],[.68,.28],[1,1],w)[0]);const k=J(v?h*r:(1-w)*r,p);n=v,u.enable(!1),d&&c(d,f),o.onFinish((()=>{v||u.enable(!0)})).progressEnd(v?1:0,g,k),l&&w>m/4?_(t,o):v&&a()}});return u})(o,a,n,(()=>{this.gestureAnimationDismissing=!0,V(this.statusBarStyle),this.animation.onFinish((async()=>{await this.dismiss(void 0,D),this.gestureAnimationDismissing=!1}))})),this.gesture.enable(!0)}initSheetGesture(){const{wrapperEl:t,initialBreakpoint:o,backdropBreakpoint:i}=this;if(!t||void 0===o)return;const a=this.enterAnimation||r.get("modalEnter",tt),e=this.animation=a(this.el,{presentingEl:this.presentingElement,currentBreakpoint:o,backdropBreakpoint:i,expandToScroll:this.expandToScroll});e.progressStart(!0,1);const{gesture:n,moveSheetToBreakpoint:s}=((t,o,i,a,e,r,n=[],s,d,l,c)=>{const m={WRAPPER_KEYFRAMES:[{offset:0,transform:"translateY(0%)"},{offset:1,transform:"translateY(100%)"}],BACKDROP_KEYFRAMES:0!==e?[{offset:0,opacity:"var(--backdrop-opacity)"},{offset:1-e,opacity:0},{offset:1,opacity:0}]:[{offset:0,opacity:"var(--backdrop-opacity)"},{offset:1,opacity:.01}],CONTENT_KEYFRAMES:[{offset:0,maxHeight:"100%"},{offset:1,maxHeight:"0%"}]},f=t.querySelector("ion-content"),b=i.clientHeight;let u=a,w=0,k=!1,y=null,A=null,B=null,D=null;const Y=n[n.length-1],S=n[0],j=r.childAnimations.find((t=>"wrapperAnimation"===t.id)),C=r.childAnimations.find((t=>"backdropAnimation"===t.id)),M=r.childAnimations.find((t=>"contentAnimation"===t.id)),T=()=>{t.style.setProperty("pointer-events","auto"),o.style.setProperty("pointer-events","auto"),t.classList.remove(E)},O=()=>{t.style.setProperty("pointer-events","none"),o.style.setProperty("pointer-events","none"),t.classList.add(E)},$=o=>{if(!A&&(A=Array.from(t.querySelectorAll("ion-footer")),!A.length))return;const i=t.querySelector(".ion-page");if(D=o,"stationary"===o)A.forEach((t=>{t.classList.remove("modal-footer-moving"),t.style.removeProperty("position"),t.style.removeProperty("width"),t.style.removeProperty("height"),t.style.removeProperty("top"),t.style.removeProperty("left"),null==i||i.style.removeProperty("padding-bottom"),null==i||i.appendChild(t)}));else{let o=0;A.forEach(((i,a)=>{const e=i.getBoundingClientRect(),r=document.body.getBoundingClientRect();o+=i.clientHeight;const n=e.top-r.top,s=e.left-r.left;if(i.style.setProperty("--pinned-width",`${i.clientWidth}px`),i.style.setProperty("--pinned-height",`${i.clientHeight}px`),i.style.setProperty("--pinned-top",`${n}px`),i.style.setProperty("--pinned-left",`${s}px`),0===a){B=n;const o=t.querySelector("ion-header");o&&(B-=o.clientHeight)}})),A.forEach((t=>{null==i||i.style.setProperty("padding-bottom",`${o}px`),t.classList.add("modal-footer-moving"),t.style.setProperty("position","absolute"),t.style.setProperty("width","var(--pinned-width)"),t.style.setProperty("height","var(--pinned-height)"),t.style.setProperty("top","var(--pinned-top)"),t.style.setProperty("left","var(--pinned-left)"),document.body.appendChild(t)}))}};j&&C&&(j.keyframes([...m.WRAPPER_KEYFRAMES]),C.keyframes([...m.BACKDROP_KEYFRAMES]),null==M||M.keyframes([...m.CONTENT_KEYFRAMES]),r.progressStart(!0,1-u),u>e?T():O()),f&&u!==Y&&s&&(f.scrollY=!1);const P=o=>{const{breakpoint:i,canDismiss:a,breakpointOffset:d,animated:p}=o,h=a&&0===i,b=h?u:i,w=0!==b;return u=0,j&&C&&(j.keyframes([{offset:0,transform:`translateY(${100*d}%)`},{offset:1,transform:`translateY(${100*(1-b)}%)`}]),C.keyframes([{offset:0,opacity:`calc(var(--backdrop-opacity) * ${F(1-d,e)})`},{offset:1,opacity:`calc(var(--backdrop-opacity) * ${F(b,e)})`}]),M&&M.keyframes([{offset:0,maxHeight:100*(1-d)+"%"},{offset:1,maxHeight:100*b+"%"}]),r.progressStep(0)),R.enable(!1),h?_(t,r):w||l(),!f||b!==n[n.length-1]&&s||(f.scrollY=!0),s||0!==b||$("stationary"),new Promise((t=>{r.onFinish((()=>{w?(s||$("stationary"),j&&C?g((()=>{j.keyframes([...m.WRAPPER_KEYFRAMES]),C.keyframes([...m.BACKDROP_KEYFRAMES]),null==M||M.keyframes([...m.CONTENT_KEYFRAMES]),r.progressStart(!0,1-b),u=b,c(u),u>e?T():O(),R.enable(!0),t()})):(R.enable(!0),t())):t()}),{oneTimeCallback:!0}).progressEnd(1,0,p?500:0)}))},R=N({el:i,gestureName:"modalSheet",gesturePriority:40,direction:"y",threshold:10,canStart:t=>{const o=p(t.event.target);if(u=d(),!s&&o)return 0===(h(o)?v(o).querySelector(".inner-scroll"):o).scrollTop;if(1===u&&o){const t=h(o)?v(o).querySelector(".inner-scroll"):o;return!o.querySelector("ion-refresher")&&0===t.scrollTop}return!0},onStart:o=>{if(k=void 0!==t.canDismiss&&!0!==t.canDismiss&&0===S,!s){const t=p(o.event.target);y=t&&h(t)?v(t).querySelector(".inner-scroll"):t}s||$("moving"),o.deltaY>0&&f&&(f.scrollY=!1),g((()=>{t.focus()})),r.progressStart(!0,1-u)},onMove:t=>{if(s||null===B||null===D||(t.currentY>=B&&"moving"===D?$("stationary"):t.currentY<B&&"stationary"===D&&$("moving")),!s&&t.deltaY<=0&&y)return;t.deltaY>0&&f&&(f.scrollY=!1);const o=n.length>1?1-n[1]:void 0,i=1-u+t.deltaY/b,a=void 0!==o&&i>=o&&k,e=a?.95:.9999,d=a&&void 0!==o?o+X((i-o)/(e-o)):i;w=x(1e-4,d,e),r.progressStep(w)},onEnd:t=>{if(!s&&t.deltaY<=0&&y&&y.scrollTop>0)return void $("stationary");const o=u-(t.deltaY+350*t.velocityY)/b,i=n.reduce(((t,i)=>Math.abs(i-o)<Math.abs(t-o)?i:t));P({breakpoint:i,breakpointOffset:w,canDismiss:k,animated:!0})}});return{gesture:R,moveSheetToBreakpoint:P}})(this.el,this.backdropEl,t,o,i,e,this.sortedBreakpoints,this.expandToScroll,(()=>{var t;return null!==(t=this.currentBreakpoint)&&void 0!==t?t:0}),(()=>this.sheetOnDismiss()),(t=>{this.currentBreakpoint!==t&&(this.currentBreakpoint=t,this.ionBreakpointDidChange.emit({breakpoint:t}))}));this.gesture=n,this.moveSheetToBreakpoint=s,this.gesture.enable(!0)}sheetOnDismiss(){this.gestureAnimationDismissing=!0,this.animation.onFinish((async()=>{this.currentBreakpoint=0,this.ionBreakpointDidChange.emit({breakpoint:this.currentBreakpoint}),await this.dismiss(void 0,D),this.gestureAnimationDismissing=!1}))}async dismiss(t,o){var i;if(this.gestureAnimationDismissing&&o!==D)return!1;const r=await this.lockController.lock();if("handler"!==o&&!await this.checkCanDismiss(t,o))return r(),!1;const{presentingElement:n}=this;void 0!==n&&"ios"===e(this)&&V(this.statusBarStyle),"undefined"!=typeof window&&this.keyboardOpenCallback&&(window.removeEventListener(I,this.keyboardOpenCallback),this.keyboardOpenCallback=void 0);const s=await O(this,t,o,"modalLeave",ot,at,{presentingEl:n,currentBreakpoint:null!==(i=this.currentBreakpoint)&&void 0!==i?i:this.initialBreakpoint,backdropBreakpoint:this.backdropBreakpoint,expandToScroll:this.expandToScroll});if(s){const{delegate:t}=this.getDelegate();await w(t,this.usersElement),a((()=>this.el.classList.remove("show-modal"))),this.animation&&this.animation.destroy(),this.gesture&&this.gesture.destroy()}return this.currentBreakpoint=void 0,this.animation=void 0,r(),s}onDidDismiss(){return $(this.el,"ionModalDidDismiss")}onWillDismiss(){return $(this.el,"ionModalWillDismiss")}async setCurrentBreakpoint(t){if(!this.isSheetModal)return void i("[ion-modal] - setCurrentBreakpoint is only supported on sheet modals.");if(!this.breakpoints.includes(t))return void i(`[ion-modal] - Attempted to set invalid breakpoint value ${t}. Please double check that the breakpoint value is part of your defined breakpoints.`);const{currentBreakpoint:o,moveSheetToBreakpoint:a,canDismiss:e,breakpoints:r,animated:n}=this;o!==t&&a&&(this.sheetTransition=a({breakpoint:t,breakpointOffset:1-o,canDismiss:void 0!==e&&!0!==e&&0===r[0],animated:n}),await this.sheetTransition,this.sheetTransition=void 0)}async getCurrentBreakpoint(){return this.currentBreakpoint}async moveToNextBreakpoint(){const{breakpoints:t,currentBreakpoint:o}=this;if(!t||null==o)return!1;const i=t.filter((t=>0!==t)),a=i.indexOf(o),e=i[(a+1)%i.length];return await this.setCurrentBreakpoint(e),!0}render(){const{handle:t,isSheetModal:o,presentingElement:i,htmlAttributes:a,handleBehavior:r,inheritedAttributes:d,focusTrap:p,expandToScroll:h}=this,l=!1!==t&&o,c=e(this),m=void 0!==i&&"ios"===c,f="cycle"===r;return n(s,Object.assign({key:"0bcbdcfcd7d890eb599da3f97f21c317d34f8e0e","no-router":!0,tabindex:"-1"},a,{style:{zIndex:`${2e4+this.overlayIndex}`},class:Object.assign({[c]:!0,"modal-default":!m&&!o,"modal-card":m,"modal-sheet":o,"modal-no-expand-scroll":o&&!h,"overlay-hidden":!0,[E]:!1===p},P(this.cssClass)),onIonBackdropTap:this.onBackdropTap,onIonModalDidPresent:this.onLifecycle,onIonModalWillPresent:this.onLifecycle,onIonModalWillDismiss:this.onLifecycle,onIonModalDidDismiss:this.onLifecycle}),n("ion-backdrop",{key:"d72159e73daa5af7349aa9e8f695aa435eb43069",ref:t=>this.backdropEl=t,visible:this.showBackdrop,tappable:this.backdropDismiss,part:"backdrop"}),"ios"===c&&n("div",{key:"fd2d9b13676ae72473881649a397b6eacde03a03",class:"modal-shadow"}),n("div",Object.assign({key:"908eccb1ad982dcde2dbcff0cbb18b6e60f8ba74",role:"dialog"},d,{"aria-modal":"true",class:"modal-wrapper ion-overlay-wrapper",part:"content",ref:t=>this.wrapperEl=t}),l&&n("button",{key:"332dc0b40363a77c7be62331d9f26def91c790e9",class:"modal-handle",tabIndex:f?0:-1,"aria-label":"Activate to adjust the size of the dialog overlaying the screen",onClick:f?this.onHandleClick:void 0,part:"handle"}),n("slot",{key:"c32698350193c450327e97049daf8b8d1fda0d0e"})))}get el(){return d(this)}static get watchers(){return{isOpen:["onIsOpenChange"],trigger:["triggerChanged"]}}},rt={ionModalDidPresent:"ionViewDidEnter",ionModalWillPresent:"ionViewWillEnter",ionModalWillDismiss:"ionViewWillLeave",ionModalDidDismiss:"ionViewDidLeave"};et.style={ios:':host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);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}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px;--ion-safe-area-top:0px;--ion-safe-area-bottom:0px;--ion-safe-area-right:0px;--ion-safe-area-left:0px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be));cursor:pointer;z-index:11}.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;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:""}:host(.modal-sheet){--height:calc(100% - (var(--ion-safe-area-top) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer{position:absolute;bottom:0;width:var(--width)}: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}',md:':host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);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}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px;--ion-safe-area-top:0px;--ion-safe-area-bottom:0px;--ion-safe-area-right:0px;--ion-safe-area-left:0px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be));cursor:pointer;z-index:11}.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;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:""}:host(.modal-sheet){--height:calc(100% - (var(--ion-safe-area-top) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer{position:absolute;bottom:0;width:var(--width)}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.32)}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:2px;--box-shadow:0 28px 48px rgba(0, 0, 0, 0.4)}}.modal-wrapper{-webkit-transform:translate3d(0, 40px, 0);transform:translate3d(0, 40px, 0);opacity:0.01}'};export{et as ion_modal}