@ionic/core 8.6.3-dev.11750799190.186437ae → 8.6.3-dev.11751305829.1112929c
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.
- package/components/action-sheet.js +8 -9
- package/components/alert.js +7 -8
- package/components/ion-app.js +3 -1
- package/components/ion-datetime.js +8 -2
- package/components/ion-loading.js +7 -8
- package/components/ion-menu.js +27 -5
- package/components/ion-reorder-group.js +1 -2
- package/components/ion-router.js +1 -0
- package/components/ion-searchbar.js +4 -6
- package/components/ion-toast.js +6 -7
- package/components/modal.js +213 -15
- package/components/popover.js +8 -7
- package/dist/cjs/ion-action-sheet.cjs.entry.js +8 -9
- package/dist/cjs/ion-alert.cjs.entry.js +7 -8
- package/dist/cjs/ion-app_8.cjs.entry.js +3 -1
- package/dist/cjs/ion-datetime_3.cjs.entry.js +8 -2
- package/dist/cjs/ion-loading.cjs.entry.js +7 -8
- package/dist/cjs/ion-menu_3.cjs.entry.js +27 -5
- package/dist/cjs/ion-modal.cjs.entry.js +213 -15
- package/dist/cjs/ion-popover.cjs.entry.js +8 -7
- package/dist/cjs/ion-reorder_2.cjs.entry.js +1 -2
- package/dist/cjs/ion-route_4.cjs.entry.js +1 -0
- package/dist/cjs/ion-searchbar.cjs.entry.js +4 -6
- package/dist/cjs/ion-toast.cjs.entry.js +6 -7
- package/dist/collection/components/action-sheet/action-sheet.js +11 -12
- package/dist/collection/components/alert/alert.js +10 -11
- package/dist/collection/components/app/app.js +8 -3
- package/dist/collection/components/datetime/datetime.js +23 -8
- package/dist/collection/components/loading/loading.js +10 -11
- package/dist/collection/components/menu/menu.js +62 -19
- package/dist/collection/components/modal/animations/ios.enter.js +2 -2
- package/dist/collection/components/modal/animations/ios.leave.js +2 -2
- package/dist/collection/components/modal/animations/ios.transition.js +124 -0
- package/dist/collection/components/modal/modal.js +108 -17
- package/dist/collection/components/popover/popover.js +18 -14
- package/dist/collection/components/reorder-group/reorder-group.js +2 -3
- package/dist/collection/components/router/router.js +5 -1
- package/dist/collection/components/searchbar/searchbar.js +5 -7
- package/dist/collection/components/toast/toast.js +9 -10
- package/dist/docs.json +138 -72
- package/dist/esm/ion-action-sheet.entry.js +8 -9
- package/dist/esm/ion-alert.entry.js +7 -8
- package/dist/esm/ion-app_8.entry.js +3 -1
- package/dist/esm/ion-datetime_3.entry.js +8 -2
- package/dist/esm/ion-loading.entry.js +7 -8
- package/dist/esm/ion-menu_3.entry.js +27 -5
- package/dist/esm/ion-modal.entry.js +213 -15
- package/dist/esm/ion-popover.entry.js +8 -7
- package/dist/esm/ion-reorder_2.entry.js +1 -2
- package/dist/esm/ion-route_4.entry.js +1 -0
- package/dist/esm/ion-searchbar.entry.js +4 -6
- package/dist/esm/ion-toast.entry.js +6 -7
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-96389029.entry.js → p-01123ecf.entry.js} +1 -1
- package/dist/ionic/{p-cb787a4b.entry.js → p-03d21728.entry.js} +1 -1
- package/dist/ionic/{p-9e699d4a.entry.js → p-0d131a02.entry.js} +1 -1
- package/dist/ionic/p-0df5b2a5.entry.js +4 -0
- package/dist/ionic/{p-6b666996.entry.js → p-2d0eccfb.entry.js} +1 -1
- package/dist/ionic/{p-ead42a37.entry.js → p-5f671887.entry.js} +1 -1
- package/dist/ionic/p-69f91268.entry.js +4 -0
- package/dist/ionic/{p-2020aa51.entry.js → p-b758a177.entry.js} +1 -1
- package/dist/ionic/p-b9ba04ca.entry.js +4 -0
- package/dist/ionic/{p-cd12ed1c.entry.js → p-d8429eb4.entry.js} +1 -1
- package/dist/ionic/{p-3a4feac2.entry.js → p-e37d6c67.entry.js} +1 -1
- package/dist/types/components/action-sheet/action-sheet.d.ts +5 -6
- package/dist/types/components/alert/alert.d.ts +5 -6
- package/dist/types/components/app/app.d.ts +2 -0
- package/dist/types/components/datetime/datetime.d.ts +6 -0
- package/dist/types/components/loading/loading.d.ts +5 -6
- package/dist/types/components/menu/menu.d.ts +25 -3
- package/dist/types/components/modal/animations/ios.transition.d.ts +14 -0
- package/dist/types/components/modal/modal.d.ts +20 -6
- package/dist/types/components/popover/popover.d.ts +6 -5
- package/dist/types/components/reorder-group/reorder-group.d.ts +0 -1
- package/dist/types/components/router/router.d.ts +1 -0
- package/dist/types/components/searchbar/searchbar.d.ts +0 -2
- package/dist/types/components/toast/toast.d.ts +4 -5
- package/dist/types/components.d.ts +32 -18
- package/hydrate/index.js +293 -70
- package/hydrate/index.mjs +293 -70
- package/package.json +2 -2
- package/dist/ionic/p-6dd2e493.entry.js +0 -4
- package/dist/ionic/p-7149db7e.entry.js +0 -4
- package/dist/ionic/p-bec79123.entry.js +0 -4
|
@@ -89,16 +89,15 @@ export class ActionSheet {
|
|
|
89
89
|
}
|
|
90
90
|
/**
|
|
91
91
|
* Dismiss the action sheet overlay after it has been presented.
|
|
92
|
+
* This is a no-op if the overlay has not been presented yet. If you want
|
|
93
|
+
* to remove an overlay from the DOM that was never presented, use the
|
|
94
|
+
* [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
|
|
92
95
|
*
|
|
93
96
|
* @param data Any data to emit in the dismiss events.
|
|
94
97
|
* @param role The role of the element that is dismissing the action sheet.
|
|
95
98
|
* This can be useful in a button handler for determining which button was
|
|
96
|
-
* clicked to dismiss the action sheet.
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
* This is a no-op if the overlay has not been presented yet. If you want
|
|
100
|
-
* to remove an overlay from the DOM that was never presented, use the
|
|
101
|
-
* [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
|
|
99
|
+
* clicked to dismiss the action sheet. Some examples include:
|
|
100
|
+
* `"cancel"`, `"destructive"`, `"selected"`, and `"backdrop"`.
|
|
102
101
|
*/
|
|
103
102
|
async dismiss(data, role) {
|
|
104
103
|
const unlock = await this.lockController.lock();
|
|
@@ -210,12 +209,12 @@ export class ActionSheet {
|
|
|
210
209
|
const cancelButton = allButtons.find((b) => b.role === 'cancel');
|
|
211
210
|
const buttons = allButtons.filter((b) => b.role !== 'cancel');
|
|
212
211
|
const headerID = `action-sheet-${overlayIndex}-header`;
|
|
213
|
-
return (h(Host, Object.assign({ key: '
|
|
212
|
+
return (h(Host, Object.assign({ key: '9fef156b2a1f09ca4a6c1fe1f37c374139bde03c', role: "dialog", "aria-modal": "true", "aria-labelledby": header !== undefined ? headerID : null, tabindex: "-1" }, htmlAttributes, { style: {
|
|
214
213
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
215
|
-
}, class: Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'action-sheet-translucent': this.translucent }), onIonActionSheetWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }), h("ion-backdrop", { key: '
|
|
214
|
+
}, class: Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'action-sheet-translucent': this.translucent }), onIonActionSheetWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }), h("ion-backdrop", { key: '81cf3f7d19864e041813987b46d2d115b8466819', tappable: this.backdropDismiss }), h("div", { key: '791c6a976683646fc306a42c15c5078b6f06a45f', tabindex: "0", "aria-hidden": "true" }), h("div", { key: 'a350b489ef7852eab9dc2227ce6d92da27dd9bf9', class: "action-sheet-wrapper ion-overlay-wrapper", ref: (el) => (this.wrapperEl = el) }, h("div", { key: '69ba51ee13510c1a411d87cb4845b11b7302a36f', class: "action-sheet-container" }, h("div", { key: 'bded15b8306c36591e526f0f99e1eeabcbab3915', class: "action-sheet-group", ref: (el) => (this.groupEl = el) }, header !== undefined && (h("div", { key: '06b5147c0f6d9180fe8f12e75c9b4a0310226adc', id: headerID, class: {
|
|
216
215
|
'action-sheet-title': true,
|
|
217
216
|
'action-sheet-has-sub-title': this.subHeader !== undefined,
|
|
218
|
-
} }, header, this.subHeader && h("div", { key: '
|
|
217
|
+
} }, header, this.subHeader && h("div", { key: '54874362a75c679aba803bf4f8768f5404d2dd28', class: "action-sheet-sub-title" }, this.subHeader))), buttons.map((b) => (h("button", Object.assign({}, b.htmlAttributes, { type: "button", id: b.id, class: buttonClass(b), onClick: () => this.buttonClick(b), disabled: b.disabled }), h("span", { class: "action-sheet-button-inner" }, b.icon && h("ion-icon", { icon: b.icon, "aria-hidden": "true", lazy: false, class: "action-sheet-icon" }), b.text), mode === 'md' && h("ion-ripple-effect", null))))), cancelButton && (h("div", { key: '67b0de298eb424f3dea846a841b7a06d70e3930d', class: "action-sheet-group action-sheet-group-cancel" }, h("button", Object.assign({ key: 'e7e3f9a5495eea9b97dbf885ef36944f2e420eff' }, cancelButton.htmlAttributes, { type: "button", class: buttonClass(cancelButton), onClick: () => this.buttonClick(cancelButton) }), h("span", { key: 'f889d29ed6c3d14bbc1d805888351d87f5122377', class: "action-sheet-button-inner" }, cancelButton.icon && (h("ion-icon", { key: '7c05cf424b38c37fd40aaeb42a494387291571fb', icon: cancelButton.icon, "aria-hidden": "true", lazy: false, class: "action-sheet-icon" })), cancelButton.text), mode === 'md' && h("ion-ripple-effect", { key: 'bed927b477dc2708a5123ef560274fca9819b3d6' })))))), h("div", { key: 'c5df1b11dc15a93892d57065d3dd5fbe02e43b39', tabindex: "0", "aria-hidden": "true" })));
|
|
219
218
|
}
|
|
220
219
|
static get is() { return "ion-action-sheet"; }
|
|
221
220
|
static get encapsulation() { return "scoped"; }
|
|
@@ -750,7 +749,7 @@ export class ActionSheet {
|
|
|
750
749
|
}, {
|
|
751
750
|
"name": "role",
|
|
752
751
|
"type": "string | undefined",
|
|
753
|
-
"docs": "The role of the element that is dismissing the action sheet.\nThis can be useful in a button handler for determining which button was\nclicked to dismiss the action sheet
|
|
752
|
+
"docs": "The role of the element that is dismissing the action sheet.\nThis can be useful in a button handler for determining which button was\nclicked to dismiss the action sheet. Some examples include:\n`\"cancel\"`, `\"destructive\"`, `\"selected\"`, and `\"backdrop\"`."
|
|
754
753
|
}],
|
|
755
754
|
"references": {
|
|
756
755
|
"Promise": {
|
|
@@ -761,13 +760,13 @@ export class ActionSheet {
|
|
|
761
760
|
"return": "Promise<boolean>"
|
|
762
761
|
},
|
|
763
762
|
"docs": {
|
|
764
|
-
"text": "Dismiss the action sheet overlay after it has been presented.",
|
|
763
|
+
"text": "Dismiss the action sheet overlay after it has been presented.\nThis is a no-op if the overlay has not been presented yet. If you want\nto remove an overlay from the DOM that was never presented, use the\n[remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.",
|
|
765
764
|
"tags": [{
|
|
766
765
|
"name": "param",
|
|
767
766
|
"text": "data Any data to emit in the dismiss events."
|
|
768
767
|
}, {
|
|
769
768
|
"name": "param",
|
|
770
|
-
"text": "role The role of the element that is dismissing the action sheet.\nThis can be useful in a button handler for determining which button was\nclicked to dismiss the action sheet
|
|
769
|
+
"text": "role The role of the element that is dismissing the action sheet.\nThis can be useful in a button handler for determining which button was\nclicked to dismiss the action sheet. Some examples include:\n`\"cancel\"`, `\"destructive\"`, `\"selected\"`, and `\"backdrop\"`."
|
|
771
770
|
}]
|
|
772
771
|
}
|
|
773
772
|
},
|
|
@@ -262,16 +262,15 @@ export class Alert {
|
|
|
262
262
|
}
|
|
263
263
|
/**
|
|
264
264
|
* Dismiss the alert overlay after it has been presented.
|
|
265
|
+
* This is a no-op if the overlay has not been presented yet. If you want
|
|
266
|
+
* to remove an overlay from the DOM that was never presented, use the
|
|
267
|
+
* [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
|
|
265
268
|
*
|
|
266
269
|
* @param data Any data to emit in the dismiss events.
|
|
267
270
|
* @param role The role of the element that is dismissing the alert.
|
|
268
271
|
* This can be useful in a button handler for determining which button was
|
|
269
|
-
* clicked to dismiss the alert.
|
|
270
|
-
*
|
|
271
|
-
*
|
|
272
|
-
* This is a no-op if the overlay has not been presented yet. If you want
|
|
273
|
-
* to remove an overlay from the DOM that was never presented, use the
|
|
274
|
-
* [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
|
|
272
|
+
* clicked to dismiss the alert. Some examples include:
|
|
273
|
+
* `"cancel"`, `"destructive"`, `"selected"`, and `"backdrop"`.
|
|
275
274
|
*/
|
|
276
275
|
async dismiss(data, role) {
|
|
277
276
|
const unlock = await this.lockController.lock();
|
|
@@ -441,9 +440,9 @@ export class Alert {
|
|
|
441
440
|
* If neither are defined, do not set aria-labelledby.
|
|
442
441
|
*/
|
|
443
442
|
const ariaLabelledBy = header && subHeader ? `${hdrId} ${subHdrId}` : header ? hdrId : subHeader ? subHdrId : null;
|
|
444
|
-
return (h(Host, { key: '
|
|
443
|
+
return (h(Host, { key: '6025440b9cd369d4fac89e7e4296c84a10a0b8e0', tabindex: "-1", style: {
|
|
445
444
|
zIndex: `${20000 + overlayIndex}`,
|
|
446
|
-
}, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'alert-translucent': this.translucent }), onIonAlertWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }, h("ion-backdrop", { key: '
|
|
445
|
+
}, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'alert-translucent': this.translucent }), onIonAlertWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }, h("ion-backdrop", { key: '3cd5ca8b99cb95b11dd22ab41a820d841142896f', tappable: this.backdropDismiss }), h("div", { key: '4cc62ae6e21424057d22aeef1e8fc77011e77cd5', tabindex: "0", "aria-hidden": "true" }), h("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), h("div", { key: '78694e3c0db2d408df3899fb1a90859bcc8d14cc', class: "alert-head" }, header && (h("h2", { key: 'ec88ff3e4e1ea871b5975133fdcf4cac38b05e0f', id: hdrId, class: "alert-title" }, header)), subHeader && !header && (h("h2", { key: '9b09bc8bb68af255ef8b7d22587acc946148e544', id: subHdrId, class: "alert-sub-title" }, subHeader)), subHeader && header && (h("h3", { key: '99abe815f75d2df7f1b77c0df9f3436724fea76f', id: subHdrId, class: "alert-sub-title" }, subHeader))), this.renderAlertMessage(msgId), this.renderAlertInputs(), this.renderAlertButtons()), h("div", { key: 'a43d0c22c0e46b1ef911f92ffeb253d7911b85f7', tabindex: "0", "aria-hidden": "true" })));
|
|
447
446
|
}
|
|
448
447
|
static get is() { return "ion-alert"; }
|
|
449
448
|
static get encapsulation() { return "scoped"; }
|
|
@@ -1032,7 +1031,7 @@ export class Alert {
|
|
|
1032
1031
|
}, {
|
|
1033
1032
|
"name": "role",
|
|
1034
1033
|
"type": "string | undefined",
|
|
1035
|
-
"docs": "The role of the element that is dismissing the alert.\nThis can be useful in a button handler for determining which button was\nclicked to dismiss the alert
|
|
1034
|
+
"docs": "The role of the element that is dismissing the alert.\nThis can be useful in a button handler for determining which button was\nclicked to dismiss the alert. Some examples include:\n`\"cancel\"`, `\"destructive\"`, `\"selected\"`, and `\"backdrop\"`."
|
|
1036
1035
|
}],
|
|
1037
1036
|
"references": {
|
|
1038
1037
|
"Promise": {
|
|
@@ -1043,13 +1042,13 @@ export class Alert {
|
|
|
1043
1042
|
"return": "Promise<boolean>"
|
|
1044
1043
|
},
|
|
1045
1044
|
"docs": {
|
|
1046
|
-
"text": "Dismiss the alert overlay after it has been presented.",
|
|
1045
|
+
"text": "Dismiss the alert overlay after it has been presented.\nThis is a no-op if the overlay has not been presented yet. If you want\nto remove an overlay from the DOM that was never presented, use the\n[remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.",
|
|
1047
1046
|
"tags": [{
|
|
1048
1047
|
"name": "param",
|
|
1049
1048
|
"text": "data Any data to emit in the dismiss events."
|
|
1050
1049
|
}, {
|
|
1051
1050
|
"name": "param",
|
|
1052
|
-
"text": "role The role of the element that is dismissing the alert.\nThis can be useful in a button handler for determining which button was\nclicked to dismiss the alert
|
|
1051
|
+
"text": "role The role of the element that is dismissing the alert.\nThis can be useful in a button handler for determining which button was\nclicked to dismiss the alert. Some examples include:\n`\"cancel\"`, `\"destructive\"`, `\"selected\"`, and `\"backdrop\"`."
|
|
1053
1052
|
}]
|
|
1054
1053
|
}
|
|
1055
1054
|
},
|
|
@@ -56,6 +56,8 @@ export class App {
|
|
|
56
56
|
* a result of another user action. (Ex: We focus the first element
|
|
57
57
|
* inside of a popover when the user presents it, but the popover is not always
|
|
58
58
|
* presented as a result of keyboard action.)
|
|
59
|
+
*
|
|
60
|
+
* @param elements An array of HTML elements to set focus on.
|
|
59
61
|
*/
|
|
60
62
|
async setFocus(elements) {
|
|
61
63
|
if (this.focusVisible) {
|
|
@@ -64,7 +66,7 @@ export class App {
|
|
|
64
66
|
}
|
|
65
67
|
render() {
|
|
66
68
|
const mode = getIonMode(this);
|
|
67
|
-
return (h(Host, { key: '
|
|
69
|
+
return (h(Host, { key: '9be440c65819e4fa67c2c3c6477ab40b3ad3eed3', class: {
|
|
68
70
|
[mode]: true,
|
|
69
71
|
'ion-page': true,
|
|
70
72
|
'force-statusbar-padding': config.getBoolean('_forceStatusbarPadding'),
|
|
@@ -89,7 +91,7 @@ export class App {
|
|
|
89
91
|
"parameters": [{
|
|
90
92
|
"name": "elements",
|
|
91
93
|
"type": "HTMLElement[]",
|
|
92
|
-
"docs": ""
|
|
94
|
+
"docs": "An array of HTML elements to set focus on."
|
|
93
95
|
}],
|
|
94
96
|
"references": {
|
|
95
97
|
"Promise": {
|
|
@@ -105,7 +107,10 @@ export class App {
|
|
|
105
107
|
},
|
|
106
108
|
"docs": {
|
|
107
109
|
"text": "Used to set focus on an element that uses `ion-focusable`.\nDo not use this if focusing the element as a result of a keyboard\nevent as the focus utility should handle this for us. This method\nshould be used when we want to programmatically focus an element as\na result of another user action. (Ex: We focus the first element\ninside of a popover when the user presents it, but the popover is not always\npresented as a result of keyboard action.)",
|
|
108
|
-
"tags": [
|
|
110
|
+
"tags": [{
|
|
111
|
+
"name": "param",
|
|
112
|
+
"text": "elements An array of HTML elements to set focus on."
|
|
113
|
+
}]
|
|
109
114
|
}
|
|
110
115
|
}
|
|
111
116
|
};
|
|
@@ -794,6 +794,8 @@ export class Datetime {
|
|
|
794
794
|
* Confirms the selected datetime value, updates the
|
|
795
795
|
* `value` property, and optionally closes the popover
|
|
796
796
|
* or modal that the datetime was presented in.
|
|
797
|
+
*
|
|
798
|
+
* @param closeOverlay If `true`, closes the parent overlay. Defaults to `false`.
|
|
797
799
|
*/
|
|
798
800
|
async confirm(closeOverlay = false) {
|
|
799
801
|
const { isCalendarPicker, activeParts, preferWheel, workingParts } = this;
|
|
@@ -827,6 +829,8 @@ export class Datetime {
|
|
|
827
829
|
* Resets the internal state of the datetime but does not update the value.
|
|
828
830
|
* Passing a valid ISO-8601 string will reset the state of the component to the provided date.
|
|
829
831
|
* If no value is provided, the internal state will be reset to the clamped value of the min, max and today.
|
|
832
|
+
*
|
|
833
|
+
* @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.
|
|
830
834
|
*/
|
|
831
835
|
async reset(startDate) {
|
|
832
836
|
this.processValue(startDate);
|
|
@@ -836,6 +840,8 @@ export class Datetime {
|
|
|
836
840
|
* optionally closes the popover
|
|
837
841
|
* or modal that the datetime was
|
|
838
842
|
* presented in.
|
|
843
|
+
*
|
|
844
|
+
* @param closeOverlay If `true`, closes the parent overlay. Defaults to `false`.
|
|
839
845
|
*/
|
|
840
846
|
async cancel(closeOverlay = false) {
|
|
841
847
|
this.ionCancel.emit();
|
|
@@ -1649,7 +1655,7 @@ export class Datetime {
|
|
|
1649
1655
|
const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
|
|
1650
1656
|
const hasWheelVariant = hasDatePresentation && preferWheel;
|
|
1651
1657
|
renderHiddenInput(true, el, name, formatValue(value), disabled);
|
|
1652
|
-
return (h(Host, { key: '
|
|
1658
|
+
return (h(Host, { key: '79677f5bc0fb32fb68569636bd76e68238e62eb8', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, createColorClasses(color, {
|
|
1653
1659
|
[mode]: true,
|
|
1654
1660
|
['datetime-readonly']: readonly,
|
|
1655
1661
|
['datetime-disabled']: disabled,
|
|
@@ -1659,7 +1665,7 @@ export class Datetime {
|
|
|
1659
1665
|
[`datetime-size-${size}`]: true,
|
|
1660
1666
|
[`datetime-prefer-wheel`]: hasWheelVariant,
|
|
1661
1667
|
[`datetime-grid`]: isGridStyle,
|
|
1662
|
-
})) }, h("div", { key: '
|
|
1668
|
+
})) }, h("div", { key: 'bf07b1e3c64af6e837663ff470bea93787a6e86f', class: "intersection-tracker", ref: (el) => (this.intersectionTrackerRef = el) }), this.renderDatetime(mode)));
|
|
1663
1669
|
}
|
|
1664
1670
|
static get is() { return "ion-datetime"; }
|
|
1665
1671
|
static get encapsulation() { return "shadow"; }
|
|
@@ -2475,7 +2481,7 @@ export class Datetime {
|
|
|
2475
2481
|
"parameters": [{
|
|
2476
2482
|
"name": "closeOverlay",
|
|
2477
2483
|
"type": "boolean",
|
|
2478
|
-
"docs": ""
|
|
2484
|
+
"docs": "If `true`, closes the parent overlay. Defaults to `false`."
|
|
2479
2485
|
}],
|
|
2480
2486
|
"references": {
|
|
2481
2487
|
"Promise": {
|
|
@@ -2487,7 +2493,10 @@ export class Datetime {
|
|
|
2487
2493
|
},
|
|
2488
2494
|
"docs": {
|
|
2489
2495
|
"text": "Confirms the selected datetime value, updates the\n`value` property, and optionally closes the popover\nor modal that the datetime was presented in.",
|
|
2490
|
-
"tags": [
|
|
2496
|
+
"tags": [{
|
|
2497
|
+
"name": "param",
|
|
2498
|
+
"text": "closeOverlay If `true`, closes the parent overlay. Defaults to `false`."
|
|
2499
|
+
}]
|
|
2491
2500
|
}
|
|
2492
2501
|
},
|
|
2493
2502
|
"reset": {
|
|
@@ -2496,7 +2505,7 @@ export class Datetime {
|
|
|
2496
2505
|
"parameters": [{
|
|
2497
2506
|
"name": "startDate",
|
|
2498
2507
|
"type": "string | undefined",
|
|
2499
|
-
"docs": ""
|
|
2508
|
+
"docs": "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."
|
|
2500
2509
|
}],
|
|
2501
2510
|
"references": {
|
|
2502
2511
|
"Promise": {
|
|
@@ -2508,7 +2517,10 @@ export class Datetime {
|
|
|
2508
2517
|
},
|
|
2509
2518
|
"docs": {
|
|
2510
2519
|
"text": "Resets the internal state of the datetime but does not update the value.\nPassing a valid ISO-8601 string will reset the state of the component to the provided date.\nIf no value is provided, the internal state will be reset to the clamped value of the min, max and today.",
|
|
2511
|
-
"tags": [
|
|
2520
|
+
"tags": [{
|
|
2521
|
+
"name": "param",
|
|
2522
|
+
"text": "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."
|
|
2523
|
+
}]
|
|
2512
2524
|
}
|
|
2513
2525
|
},
|
|
2514
2526
|
"cancel": {
|
|
@@ -2517,7 +2529,7 @@ export class Datetime {
|
|
|
2517
2529
|
"parameters": [{
|
|
2518
2530
|
"name": "closeOverlay",
|
|
2519
2531
|
"type": "boolean",
|
|
2520
|
-
"docs": ""
|
|
2532
|
+
"docs": "If `true`, closes the parent overlay. Defaults to `false`."
|
|
2521
2533
|
}],
|
|
2522
2534
|
"references": {
|
|
2523
2535
|
"Promise": {
|
|
@@ -2529,7 +2541,10 @@ export class Datetime {
|
|
|
2529
2541
|
},
|
|
2530
2542
|
"docs": {
|
|
2531
2543
|
"text": "Emits the ionCancel event and\noptionally closes the popover\nor modal that the datetime was\npresented in.",
|
|
2532
|
-
"tags": [
|
|
2544
|
+
"tags": [{
|
|
2545
|
+
"name": "param",
|
|
2546
|
+
"text": "closeOverlay If `true`, closes the parent overlay. Defaults to `false`."
|
|
2547
|
+
}]
|
|
2533
2548
|
}
|
|
2534
2549
|
}
|
|
2535
2550
|
};
|
|
@@ -129,16 +129,15 @@ export class Loading {
|
|
|
129
129
|
}
|
|
130
130
|
/**
|
|
131
131
|
* Dismiss the loading overlay after it has been presented.
|
|
132
|
+
* This is a no-op if the overlay has not been presented yet. If you want
|
|
133
|
+
* to remove an overlay from the DOM that was never presented, use the
|
|
134
|
+
* [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
|
|
132
135
|
*
|
|
133
136
|
* @param data Any data to emit in the dismiss events.
|
|
134
137
|
* @param role The role of the element that is dismissing the loading.
|
|
135
138
|
* This can be useful in a button handler for determining which button was
|
|
136
|
-
* clicked to dismiss the loading.
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
* This is a no-op if the overlay has not been presented yet. If you want
|
|
140
|
-
* to remove an overlay from the DOM that was never presented, use the
|
|
141
|
-
* [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
|
|
139
|
+
* clicked to dismiss the loading. Some examples include:
|
|
140
|
+
* `"cancel"`, `"destructive"`, `"selected"`, and `"backdrop"`.
|
|
142
141
|
*/
|
|
143
142
|
async dismiss(data, role) {
|
|
144
143
|
const unlock = await this.lockController.lock();
|
|
@@ -180,9 +179,9 @@ export class Loading {
|
|
|
180
179
|
* Otherwise, don't set aria-labelledby.
|
|
181
180
|
*/
|
|
182
181
|
const ariaLabelledBy = message !== undefined ? msgId : null;
|
|
183
|
-
return (h(Host, Object.assign({ key: '
|
|
182
|
+
return (h(Host, Object.assign({ key: '4497183ce220242abe19ae15f328f9a92ccafbbc', role: "dialog", "aria-modal": "true", "aria-labelledby": ariaLabelledBy, tabindex: "-1" }, htmlAttributes, { style: {
|
|
184
183
|
zIndex: `${40000 + this.overlayIndex}`,
|
|
185
|
-
}, onIonBackdropTap: this.onBackdropTap, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'loading-translucent': this.translucent }) }), h("ion-backdrop", { key: '
|
|
184
|
+
}, onIonBackdropTap: this.onBackdropTap, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'loading-translucent': this.translucent }) }), h("ion-backdrop", { key: '231dec84e424a2dc358ce95b84d6035cf43e4dea', visible: this.showBackdrop, tappable: this.backdropDismiss }), h("div", { key: 'c9af29b6e6bb49a217396a5c874bbfb8835a926c', tabindex: "0", "aria-hidden": "true" }), h("div", { key: 'a8659863743cdeccbe1ba810eaabfd3ebfcb86f3', class: "loading-wrapper ion-overlay-wrapper" }, spinner && (h("div", { key: '3b346f39bc71691bd8686556a1e142198a7b12fa', class: "loading-spinner" }, h("ion-spinner", { key: '8dc2bf1556e5138e262827f1516c59ecd09f3520', name: spinner, "aria-hidden": "true" }))), message !== undefined && this.renderLoadingMessage(msgId)), h("div", { key: '054164c0dbae9a0e0973dd3c8e28f5b771820310', tabindex: "0", "aria-hidden": "true" })));
|
|
186
185
|
}
|
|
187
186
|
static get is() { return "ion-loading"; }
|
|
188
187
|
static get encapsulation() { return "scoped"; }
|
|
@@ -744,7 +743,7 @@ export class Loading {
|
|
|
744
743
|
}, {
|
|
745
744
|
"name": "role",
|
|
746
745
|
"type": "string | undefined",
|
|
747
|
-
"docs": "The role of the element that is dismissing the loading.\nThis can be useful in a button handler for determining which button was\nclicked to dismiss the loading
|
|
746
|
+
"docs": "The role of the element that is dismissing the loading.\nThis can be useful in a button handler for determining which button was\nclicked to dismiss the loading. Some examples include:\n`\"cancel\"`, `\"destructive\"`, `\"selected\"`, and `\"backdrop\"`."
|
|
748
747
|
}],
|
|
749
748
|
"references": {
|
|
750
749
|
"Promise": {
|
|
@@ -755,13 +754,13 @@ export class Loading {
|
|
|
755
754
|
"return": "Promise<boolean>"
|
|
756
755
|
},
|
|
757
756
|
"docs": {
|
|
758
|
-
"text": "Dismiss the loading overlay after it has been presented.",
|
|
757
|
+
"text": "Dismiss the loading overlay after it has been presented.\nThis is a no-op if the overlay has not been presented yet. If you want\nto remove an overlay from the DOM that was never presented, use the\n[remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.",
|
|
759
758
|
"tags": [{
|
|
760
759
|
"name": "param",
|
|
761
760
|
"text": "data Any data to emit in the dismiss events."
|
|
762
761
|
}, {
|
|
763
762
|
"name": "param",
|
|
764
|
-
"text": "role The role of the element that is dismissing the loading.\nThis can be useful in a button handler for determining which button was\nclicked to dismiss the loading
|
|
763
|
+
"text": "role The role of the element that is dismissing the loading.\nThis can be useful in a button handler for determining which button was\nclicked to dismiss the loading. Some examples include:\n`\"cancel\"`, `\"destructive\"`, `\"selected\"`, and `\"backdrop\"`."
|
|
765
764
|
}]
|
|
766
765
|
}
|
|
767
766
|
},
|
|
@@ -237,7 +237,7 @@ export class Menu {
|
|
|
237
237
|
return Promise.resolve(this._isOpen);
|
|
238
238
|
}
|
|
239
239
|
/**
|
|
240
|
-
* Returns `true`
|
|
240
|
+
* Returns `true` if the menu is active.
|
|
241
241
|
*
|
|
242
242
|
* A menu is active when it can be opened or closed, meaning it's enabled
|
|
243
243
|
* and it's not part of a `ion-split-pane`.
|
|
@@ -248,6 +248,10 @@ export class Menu {
|
|
|
248
248
|
/**
|
|
249
249
|
* Opens the menu. If the menu is already open or it can't be opened,
|
|
250
250
|
* it returns `false`.
|
|
251
|
+
*
|
|
252
|
+
* @param animated If `true`, the menu will animate when opening.
|
|
253
|
+
* If `false`, the menu will open instantly without animation.
|
|
254
|
+
* Defaults to `true`.
|
|
251
255
|
*/
|
|
252
256
|
open(animated = true) {
|
|
253
257
|
return this.setOpen(true, animated);
|
|
@@ -255,20 +259,38 @@ export class Menu {
|
|
|
255
259
|
/**
|
|
256
260
|
* Closes the menu. If the menu is already closed or it can't be closed,
|
|
257
261
|
* it returns `false`.
|
|
262
|
+
*
|
|
263
|
+
* @param animated If `true`, the menu will animate when closing. If `false`,
|
|
264
|
+
* the menu will close instantly without animation. Defaults to `true`.
|
|
265
|
+
* @param role The role of the element that is closing the menu.
|
|
266
|
+
* This can be useful in a button handler for determining which button was
|
|
267
|
+
* clicked to close the menu. Some examples include:
|
|
268
|
+
* `"cancel"`, `"destructive"`, `"selected"`, and `"backdrop"`.
|
|
258
269
|
*/
|
|
259
270
|
close(animated = true, role) {
|
|
260
271
|
return this.setOpen(false, animated, role);
|
|
261
272
|
}
|
|
262
273
|
/**
|
|
263
|
-
* Toggles the menu. If the menu is already open, it will try to close,
|
|
274
|
+
* Toggles the menu. If the menu is already open, it will try to close,
|
|
275
|
+
* otherwise it will try to open it.
|
|
264
276
|
* If the operation can't be completed successfully, it returns `false`.
|
|
277
|
+
*
|
|
278
|
+
* @param animated If `true`, the menu will animate when opening/closing.
|
|
279
|
+
* If `false`, the menu will open/close instantly without animation.
|
|
280
|
+
* Defaults to `true`.
|
|
265
281
|
*/
|
|
266
282
|
toggle(animated = true) {
|
|
267
283
|
return this.setOpen(!this._isOpen, animated);
|
|
268
284
|
}
|
|
269
285
|
/**
|
|
270
|
-
* Opens or closes the
|
|
286
|
+
* Opens or closes the menu.
|
|
271
287
|
* If the operation can't be completed successfully, it returns `false`.
|
|
288
|
+
*
|
|
289
|
+
* @param shouldOpen If `true`, the menu will open. If `false`, the menu
|
|
290
|
+
* will close.
|
|
291
|
+
* @param animated If `true`, the menu will animate when opening/closing.
|
|
292
|
+
* If `false`, the menu will open/close instantly without animation.
|
|
293
|
+
* @param role The role of the element that is closing the menu.
|
|
272
294
|
*/
|
|
273
295
|
setOpen(shouldOpen, animated = true, role) {
|
|
274
296
|
return menuController._setOpen(this, shouldOpen, animated, role);
|
|
@@ -633,14 +655,14 @@ export class Menu {
|
|
|
633
655
|
* the ionBackButton listener in the menu controller
|
|
634
656
|
* will handle closing the menu when Escape is pressed.
|
|
635
657
|
*/
|
|
636
|
-
return (h(Host, { key: '
|
|
658
|
+
return (h(Host, { key: 'a5c75aa40a34530b56ee3b98d706a5ac5ae300de', onKeyDown: shouldUseCloseWatcher() ? null : this.onKeydown, role: "navigation", "aria-label": inheritedAttributes['aria-label'] || 'menu', class: {
|
|
637
659
|
[mode]: true,
|
|
638
660
|
[`menu-type-${type}`]: true,
|
|
639
661
|
'menu-enabled': !disabled,
|
|
640
662
|
[`menu-side-${side}`]: true,
|
|
641
663
|
'menu-pane-visible': isPaneVisible,
|
|
642
664
|
'split-pane-side': hostContext('ion-split-pane', el),
|
|
643
|
-
} }, h("div", { key: '
|
|
665
|
+
} }, h("div", { key: '3f5f70acd4d3ed6bb445122f4f01d73db738a75f', class: "menu-inner", part: "container", ref: (el) => (this.menuInnerEl = el) }, h("slot", { key: '3161326c9330e7f7441299c428b87a91b31a83e9' })), h("ion-backdrop", { key: '917b50f38489bdf03d0c642af8b4e4e172c7dc4c', ref: (el) => (this.backdropEl = el), class: "menu-backdrop", tappable: false, stopPropagation: false, part: "backdrop" })));
|
|
644
666
|
}
|
|
645
667
|
static get is() { return "ion-menu"; }
|
|
646
668
|
static get encapsulation() { return "shadow"; }
|
|
@@ -946,7 +968,7 @@ export class Menu {
|
|
|
946
968
|
"return": "Promise<boolean>"
|
|
947
969
|
},
|
|
948
970
|
"docs": {
|
|
949
|
-
"text": "Returns `true`
|
|
971
|
+
"text": "Returns `true` if the menu is active.\n\nA menu is active when it can be opened or closed, meaning it's enabled\nand it's not part of a `ion-split-pane`.",
|
|
950
972
|
"tags": []
|
|
951
973
|
}
|
|
952
974
|
},
|
|
@@ -956,7 +978,7 @@ export class Menu {
|
|
|
956
978
|
"parameters": [{
|
|
957
979
|
"name": "animated",
|
|
958
980
|
"type": "boolean",
|
|
959
|
-
"docs": ""
|
|
981
|
+
"docs": "If `true`, the menu will animate when opening.\nIf `false`, the menu will open instantly without animation.\nDefaults to `true`."
|
|
960
982
|
}],
|
|
961
983
|
"references": {
|
|
962
984
|
"Promise": {
|
|
@@ -968,7 +990,10 @@ export class Menu {
|
|
|
968
990
|
},
|
|
969
991
|
"docs": {
|
|
970
992
|
"text": "Opens the menu. If the menu is already open or it can't be opened,\nit returns `false`.",
|
|
971
|
-
"tags": [
|
|
993
|
+
"tags": [{
|
|
994
|
+
"name": "param",
|
|
995
|
+
"text": "animated If `true`, the menu will animate when opening.\nIf `false`, the menu will open instantly without animation.\nDefaults to `true`."
|
|
996
|
+
}]
|
|
972
997
|
}
|
|
973
998
|
},
|
|
974
999
|
"close": {
|
|
@@ -977,11 +1002,11 @@ export class Menu {
|
|
|
977
1002
|
"parameters": [{
|
|
978
1003
|
"name": "animated",
|
|
979
1004
|
"type": "boolean",
|
|
980
|
-
"docs": ""
|
|
1005
|
+
"docs": "If `true`, the menu will animate when closing. If `false`,\nthe menu will close instantly without animation. Defaults to `true`."
|
|
981
1006
|
}, {
|
|
982
1007
|
"name": "role",
|
|
983
1008
|
"type": "string | undefined",
|
|
984
|
-
"docs": ""
|
|
1009
|
+
"docs": "The role of the element that is closing the menu.\nThis can be useful in a button handler for determining which button was\nclicked to close the menu. Some examples include:\n`\"cancel\"`, `\"destructive\"`, `\"selected\"`, and `\"backdrop\"`."
|
|
985
1010
|
}],
|
|
986
1011
|
"references": {
|
|
987
1012
|
"Promise": {
|
|
@@ -993,7 +1018,13 @@ export class Menu {
|
|
|
993
1018
|
},
|
|
994
1019
|
"docs": {
|
|
995
1020
|
"text": "Closes the menu. If the menu is already closed or it can't be closed,\nit returns `false`.",
|
|
996
|
-
"tags": [
|
|
1021
|
+
"tags": [{
|
|
1022
|
+
"name": "param",
|
|
1023
|
+
"text": "animated If `true`, the menu will animate when closing. If `false`,\nthe menu will close instantly without animation. Defaults to `true`."
|
|
1024
|
+
}, {
|
|
1025
|
+
"name": "param",
|
|
1026
|
+
"text": "role The role of the element that is closing the menu.\nThis can be useful in a button handler for determining which button was\nclicked to close the menu. Some examples include:\n`\"cancel\"`, `\"destructive\"`, `\"selected\"`, and `\"backdrop\"`."
|
|
1027
|
+
}]
|
|
997
1028
|
}
|
|
998
1029
|
},
|
|
999
1030
|
"toggle": {
|
|
@@ -1002,7 +1033,7 @@ export class Menu {
|
|
|
1002
1033
|
"parameters": [{
|
|
1003
1034
|
"name": "animated",
|
|
1004
1035
|
"type": "boolean",
|
|
1005
|
-
"docs": ""
|
|
1036
|
+
"docs": "If `true`, the menu will animate when opening/closing.\nIf `false`, the menu will open/close instantly without animation.\nDefaults to `true`."
|
|
1006
1037
|
}],
|
|
1007
1038
|
"references": {
|
|
1008
1039
|
"Promise": {
|
|
@@ -1013,8 +1044,11 @@ export class Menu {
|
|
|
1013
1044
|
"return": "Promise<boolean>"
|
|
1014
1045
|
},
|
|
1015
1046
|
"docs": {
|
|
1016
|
-
"text": "Toggles the menu. If the menu is already open, it will try to close
|
|
1017
|
-
"tags": [
|
|
1047
|
+
"text": "Toggles the menu. If the menu is already open, it will try to close,\notherwise it will try to open it.\nIf the operation can't be completed successfully, it returns `false`.",
|
|
1048
|
+
"tags": [{
|
|
1049
|
+
"name": "param",
|
|
1050
|
+
"text": "animated If `true`, the menu will animate when opening/closing.\nIf `false`, the menu will open/close instantly without animation.\nDefaults to `true`."
|
|
1051
|
+
}]
|
|
1018
1052
|
}
|
|
1019
1053
|
},
|
|
1020
1054
|
"setOpen": {
|
|
@@ -1023,15 +1057,15 @@ export class Menu {
|
|
|
1023
1057
|
"parameters": [{
|
|
1024
1058
|
"name": "shouldOpen",
|
|
1025
1059
|
"type": "boolean",
|
|
1026
|
-
"docs": ""
|
|
1060
|
+
"docs": "If `true`, the menu will open. If `false`, the menu\nwill close."
|
|
1027
1061
|
}, {
|
|
1028
1062
|
"name": "animated",
|
|
1029
1063
|
"type": "boolean",
|
|
1030
|
-
"docs": ""
|
|
1064
|
+
"docs": "If `true`, the menu will animate when opening/closing.\nIf `false`, the menu will open/close instantly without animation."
|
|
1031
1065
|
}, {
|
|
1032
1066
|
"name": "role",
|
|
1033
1067
|
"type": "string | undefined",
|
|
1034
|
-
"docs": ""
|
|
1068
|
+
"docs": "The role of the element that is closing the menu."
|
|
1035
1069
|
}],
|
|
1036
1070
|
"references": {
|
|
1037
1071
|
"Promise": {
|
|
@@ -1042,8 +1076,17 @@ export class Menu {
|
|
|
1042
1076
|
"return": "Promise<boolean>"
|
|
1043
1077
|
},
|
|
1044
1078
|
"docs": {
|
|
1045
|
-
"text": "Opens or closes the
|
|
1046
|
-
"tags": [
|
|
1079
|
+
"text": "Opens or closes the menu.\nIf the operation can't be completed successfully, it returns `false`.",
|
|
1080
|
+
"tags": [{
|
|
1081
|
+
"name": "param",
|
|
1082
|
+
"text": "shouldOpen If `true`, the menu will open. If `false`, the menu\nwill close."
|
|
1083
|
+
}, {
|
|
1084
|
+
"name": "param",
|
|
1085
|
+
"text": "animated If `true`, the menu will animate when opening/closing.\nIf `false`, the menu will open/close instantly without animation."
|
|
1086
|
+
}, {
|
|
1087
|
+
"name": "param",
|
|
1088
|
+
"text": "role The role of the element that is closing the menu."
|
|
1089
|
+
}]
|
|
1047
1090
|
}
|
|
1048
1091
|
}
|
|
1049
1092
|
};
|
|
@@ -36,7 +36,7 @@ export const iosEnterAnimation = (baseEl, opts) => {
|
|
|
36
36
|
baseAnimation.addAnimation(contentAnimation);
|
|
37
37
|
}
|
|
38
38
|
if (presentingEl) {
|
|
39
|
-
const
|
|
39
|
+
const isPortrait = window.innerWidth < 768;
|
|
40
40
|
const hasCardModal = presentingEl.tagName === 'ION-MODAL' && presentingEl.presentingElement !== undefined;
|
|
41
41
|
const presentingElRoot = getElementRoot(presentingEl);
|
|
42
42
|
const presentingAnimation = createAnimation().beforeStyles({
|
|
@@ -45,7 +45,7 @@ export const iosEnterAnimation = (baseEl, opts) => {
|
|
|
45
45
|
overflow: 'hidden',
|
|
46
46
|
});
|
|
47
47
|
const bodyEl = document.body;
|
|
48
|
-
if (
|
|
48
|
+
if (isPortrait) {
|
|
49
49
|
/**
|
|
50
50
|
* Fallback for browsers that does not support `max()` (ex: Firefox)
|
|
51
51
|
* No need to worry about statusbar padding since engines like Gecko
|
|
@@ -25,7 +25,7 @@ export const iosLeaveAnimation = (baseEl, opts, duration = 500) => {
|
|
|
25
25
|
.duration(duration)
|
|
26
26
|
.addAnimation(wrapperAnimation);
|
|
27
27
|
if (presentingEl) {
|
|
28
|
-
const
|
|
28
|
+
const isPortrait = window.innerWidth < 768;
|
|
29
29
|
const hasCardModal = presentingEl.tagName === 'ION-MODAL' && presentingEl.presentingElement !== undefined;
|
|
30
30
|
const presentingElRoot = getElementRoot(presentingEl);
|
|
31
31
|
const presentingAnimation = createAnimation()
|
|
@@ -43,7 +43,7 @@ export const iosLeaveAnimation = (baseEl, opts, duration = 500) => {
|
|
|
43
43
|
}
|
|
44
44
|
});
|
|
45
45
|
const bodyEl = document.body;
|
|
46
|
-
if (
|
|
46
|
+
if (isPortrait) {
|
|
47
47
|
const transformOffset = !CSS.supports('width', 'max(0px, 1px)') ? '30px' : 'max(30px, var(--ion-safe-area-top))';
|
|
48
48
|
const modalTransform = hasCardModal ? '-10px' : transformOffset;
|
|
49
49
|
const toPresentingScale = SwipeToCloseDefaults.MIN_PRESENTING_SCALE;
|