voyager-ionic-core 8.2.5 → 8.2.6
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 +7 -4
- package/components/alert.js +6 -3
- package/components/ion-loading.js +6 -3
- package/components/ion-modal.js +8 -5
- package/components/ion-picker-legacy.js +6 -3
- package/components/ion-toast.js +6 -3
- package/components/popover.js +4 -3
- package/dist/cjs/ion-action-sheet.cjs.entry.js +7 -4
- package/dist/cjs/ion-alert.cjs.entry.js +6 -3
- package/dist/cjs/ion-datetime_3.cjs.entry.js +6 -3
- package/dist/cjs/ion-loading.cjs.entry.js +6 -3
- package/dist/cjs/ion-modal.cjs.entry.js +8 -5
- package/dist/cjs/ion-popover.cjs.entry.js +4 -3
- package/dist/cjs/ion-toast.cjs.entry.js +6 -3
- package/dist/collection/components/action-sheet/action-sheet.js +7 -4
- package/dist/collection/components/alert/alert.js +6 -3
- package/dist/collection/components/loading/loading.js +6 -3
- package/dist/collection/components/modal/modal.js +8 -5
- package/dist/collection/components/picker-legacy/picker.js +6 -3
- package/dist/collection/components/popover/popover.js +4 -3
- package/dist/collection/components/toast/toast.js +6 -3
- package/dist/docs.json +1 -1
- package/dist/esm/ion-action-sheet.entry.js +7 -4
- package/dist/esm/ion-alert.entry.js +6 -3
- package/dist/esm/ion-datetime_3.entry.js +6 -3
- package/dist/esm/ion-loading.entry.js +6 -3
- package/dist/esm/ion-modal.entry.js +8 -5
- package/dist/esm/ion-popover.entry.js +4 -3
- package/dist/esm/ion-toast.entry.js +6 -3
- package/dist/esm-es5/ion-action-sheet.entry.js +1 -1
- package/dist/esm-es5/ion-alert.entry.js +1 -1
- package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
- package/dist/esm-es5/ion-loading.entry.js +1 -1
- package/dist/esm-es5/ion-modal.entry.js +1 -1
- package/dist/esm-es5/ion-popover.entry.js +1 -1
- package/dist/esm-es5/ion-toast.entry.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-9aae0bf3.entry.js → p-096664b8.entry.js} +1 -1
- package/dist/ionic/{p-fed12de8.system.entry.js → p-1924eefd.system.entry.js} +1 -1
- package/dist/ionic/{p-ed8726ad.system.entry.js → p-299a2ccb.system.entry.js} +1 -1
- package/dist/ionic/{p-88c0ff08.system.entry.js → p-2b017e39.system.entry.js} +1 -1
- package/dist/ionic/p-5e17dc69.entry.js +4 -0
- package/dist/ionic/{p-4c06d890.entry.js → p-6c8d40f8.entry.js} +1 -1
- package/dist/ionic/{p-fafa4d9b.entry.js → p-6d32eb3c.entry.js} +1 -1
- package/dist/ionic/{p-057c2f6f.entry.js → p-74890c76.entry.js} +1 -1
- package/dist/ionic/p-767a0d69.system.js +1 -1
- package/dist/ionic/{p-4a3d2f75.system.entry.js → p-978bbfe5.system.entry.js} +1 -1
- package/dist/ionic/{p-4a0db73d.system.entry.js → p-99740380.system.entry.js} +1 -1
- package/dist/ionic/{p-3b11ab95.system.entry.js → p-be9fe750.system.entry.js} +1 -1
- package/dist/ionic/{p-6db3f661.system.entry.js → p-d967f9ce.system.entry.js} +1 -1
- package/dist/ionic/{p-130ce79e.entry.js → p-dc321750.entry.js} +1 -1
- package/dist/ionic/{p-090c318d.entry.js → p-eb988a08.entry.js} +1 -1
- package/hydrate/index.js +43 -24
- package/hydrate/index.mjs +43 -24
- package/package.json +2 -2
- package/dist/ionic/p-57c9689a.entry.js +0 -4
|
@@ -132,6 +132,7 @@ export class Modal {
|
|
|
132
132
|
this.triggerController.removeClickListener();
|
|
133
133
|
}
|
|
134
134
|
componentWillLoad() {
|
|
135
|
+
var _a;
|
|
135
136
|
const { breakpoints, initialBreakpoint, el, htmlAttributes } = this;
|
|
136
137
|
const isSheetModal = (this.isSheetModal = breakpoints !== undefined && initialBreakpoint !== undefined);
|
|
137
138
|
const attributesToInherit = ['aria-label', 'role'];
|
|
@@ -173,7 +174,9 @@ export class Modal {
|
|
|
173
174
|
if (breakpoints !== undefined && initialBreakpoint !== undefined && !breakpoints.includes(initialBreakpoint)) {
|
|
174
175
|
printIonWarning('Your breakpoints array must include the initialBreakpoint value.');
|
|
175
176
|
}
|
|
176
|
-
|
|
177
|
+
if (!((_a = this.htmlAttributes) === null || _a === void 0 ? void 0 : _a.id)) {
|
|
178
|
+
setOverlayId(this.el);
|
|
179
|
+
}
|
|
177
180
|
}
|
|
178
181
|
componentDidLoad() {
|
|
179
182
|
/**
|
|
@@ -563,18 +566,18 @@ export class Modal {
|
|
|
563
566
|
const mode = getIonMode(this);
|
|
564
567
|
const isCardModal = presentingElement !== undefined && mode === 'ios';
|
|
565
568
|
const isHandleCycle = handleBehavior === 'cycle';
|
|
566
|
-
return (h(Host, Object.assign({ key: '
|
|
569
|
+
return (h(Host, Object.assign({ key: '013ba4864ca4d2c1052c512f6a4b0732b8decff7', "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
|
|
567
570
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
568
|
-
}, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, '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 }), h("ion-backdrop", { key: '
|
|
571
|
+
}, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, '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 }), h("ion-backdrop", { key: '498b1c0a03836d6799dcf3b8e9315805c70f6480', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && h("div", { key: 'ce22e4caf1096e87248926fe2477f0d5a4c8a5cf', class: "modal-shadow" }), h("div", Object.assign({ key: '540e47b15d8290166c39b022c725182114a75682',
|
|
569
572
|
/*
|
|
570
573
|
role and aria-modal must be used on the
|
|
571
574
|
same element. They must also be set inside the
|
|
572
575
|
shadow DOM otherwise ion-button will not be highlighted
|
|
573
576
|
when using VoiceOver: https://bugs.webkit.org/show_bug.cgi?id=247134
|
|
574
577
|
*/
|
|
575
|
-
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (h("button", { key: '
|
|
578
|
+
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (h("button", { key: 'f3b352ec9a63a7ec801462aacfd8295b4302d115', class: "modal-handle",
|
|
576
579
|
// Prevents the handle from receiving keyboard focus when it does not cycle
|
|
577
|
-
tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle" })), h("slot", { key: '
|
|
580
|
+
tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle" })), h("slot", { key: '31a3f58f4c733ffdf736523c154200874a96b1d0' }))));
|
|
578
581
|
}
|
|
579
582
|
static get is() { return "ion-modal"; }
|
|
580
583
|
static get encapsulation() { return "shadow"; }
|
|
@@ -69,7 +69,10 @@ export class Picker {
|
|
|
69
69
|
this.triggerController.removeClickListener();
|
|
70
70
|
}
|
|
71
71
|
componentWillLoad() {
|
|
72
|
-
|
|
72
|
+
var _a;
|
|
73
|
+
if (!((_a = this.htmlAttributes) === null || _a === void 0 ? void 0 : _a.id)) {
|
|
74
|
+
setOverlayId(this.el);
|
|
75
|
+
}
|
|
73
76
|
}
|
|
74
77
|
componentDidLoad() {
|
|
75
78
|
printIonWarning('ion-picker-legacy and ion-picker-legacy-column have been deprecated in favor of new versions of the ion-picker and ion-picker-column components. These new components display inline with your page content allowing for more presentation flexibility than before.', this.el);
|
|
@@ -182,11 +185,11 @@ export class Picker {
|
|
|
182
185
|
render() {
|
|
183
186
|
const { htmlAttributes } = this;
|
|
184
187
|
const mode = getIonMode(this);
|
|
185
|
-
return (h(Host, Object.assign({ key: '
|
|
188
|
+
return (h(Host, Object.assign({ key: '3b163ca87354a3a4f302ff016d5affd0dc97bccc', "aria-modal": "true", tabindex: "-1" }, htmlAttributes, { style: {
|
|
186
189
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
187
190
|
}, class: Object.assign({ [mode]: true,
|
|
188
191
|
// Used internally for styling
|
|
189
|
-
[`picker-${mode}`]: true, 'overlay-hidden': true }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonPickerWillDismiss: this.dispatchCancelHandler }), h("ion-backdrop", { key: '
|
|
192
|
+
[`picker-${mode}`]: true, 'overlay-hidden': true }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonPickerWillDismiss: this.dispatchCancelHandler }), h("ion-backdrop", { key: 'da4224447bdbcfbadd1bd63ebe7a7bfdb8aa3129', visible: this.showBackdrop, tappable: this.backdropDismiss }), h("div", { key: '211475c859b7acf4d64556905c45993201d92d43', tabindex: "0" }), h("div", { key: 'c3b3674038155809caea84ae6348ff0d66897a64', class: "picker-wrapper ion-overlay-wrapper", role: "dialog" }, h("div", { key: 'a21757da70dc7864945a5751d9da3ca4bf87897b', class: "picker-toolbar" }, this.buttons.map((b) => (h("div", { class: buttonWrapperClass(b) }, h("button", { type: "button", onClick: () => this.buttonClick(b), class: buttonClass(b) }, b.text))))), h("div", { key: '0220da1854d09ef22d2d9a32eaa3c3b222be5a0a', class: "picker-columns" }, h("div", { key: '55757c165ba9e38e56b4dee76a9b13d3ff8b21e6', class: "picker-above-highlight" }), this.presented && this.columns.map((c) => h("ion-picker-legacy-column", { col: c })), h("div", { key: '160092a46a48287bf75e5dfe3502f1755a2d0c70', class: "picker-below-highlight" }))), h("div", { key: 'e212db6cca7d75fc0eda0baf4312dd51b9b7a4ef', tabindex: "0" })));
|
|
190
193
|
}
|
|
191
194
|
static get is() { return "ion-picker-legacy"; }
|
|
192
195
|
static get encapsulation() { return "scoped"; }
|
|
@@ -133,8 +133,9 @@ export class Popover {
|
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
135
|
componentWillLoad() {
|
|
136
|
+
var _a, _b;
|
|
136
137
|
const { el } = this;
|
|
137
|
-
const popoverId = setOverlayId(el);
|
|
138
|
+
const popoverId = (_b = (_a = this.htmlAttributes) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : setOverlayId(el);
|
|
138
139
|
this.parentPopover = el.closest(`ion-popover:not(#${popoverId})`);
|
|
139
140
|
if (this.alignment === undefined) {
|
|
140
141
|
this.alignment = getIonMode(this) === 'ios' ? 'center' : 'start';
|
|
@@ -337,9 +338,9 @@ export class Popover {
|
|
|
337
338
|
const { onLifecycle, parentPopover, dismissOnSelect, side, arrow, htmlAttributes, focusTrap } = this;
|
|
338
339
|
const desktop = isPlatform('desktop');
|
|
339
340
|
const enableArrow = arrow && !parentPopover;
|
|
340
|
-
return (h(Host, Object.assign({ key: '
|
|
341
|
+
return (h(Host, Object.assign({ key: '3a7c4c39384bab1447c4bd6b9b06d7837a09353b', "aria-modal": "true", "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
|
|
341
342
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
342
|
-
}, 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 && h("ion-backdrop", { key: '
|
|
343
|
+
}, 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 && h("ion-backdrop", { key: '38a1c4ad29238d1e81cab407f099121fa4947cce', tappable: this.backdropDismiss, visible: this.showBackdrop, part: "backdrop" }), h("div", { key: 'f825494c5e3be89d7fcf0229e29b405bccb13edb', class: "popover-wrapper ion-overlay-wrapper", onClick: dismissOnSelect ? () => this.dismiss() : undefined }, enableArrow && h("div", { key: '3acae5a0106389c776c8ffe5bf10f3ff006e0346', class: "popover-arrow", part: "arrow" }), h("div", { key: '2aa73e9f06b1d2ac4c0d36c23186b9164f395079', class: "popover-content", part: "content" }, h("slot", { key: '62f5713414aae47dde6a8aef1f9b69af287534ae' })))));
|
|
343
344
|
}
|
|
344
345
|
static get is() { return "ion-popover"; }
|
|
345
346
|
static get encapsulation() { return "shadow"; }
|
|
@@ -150,7 +150,10 @@ export class Toast {
|
|
|
150
150
|
this.triggerController.removeClickListener();
|
|
151
151
|
}
|
|
152
152
|
componentWillLoad() {
|
|
153
|
-
|
|
153
|
+
var _a;
|
|
154
|
+
if (!((_a = this.htmlAttributes) === null || _a === void 0 ? void 0 : _a.id)) {
|
|
155
|
+
setOverlayId(this.el);
|
|
156
|
+
}
|
|
154
157
|
}
|
|
155
158
|
componentDidLoad() {
|
|
156
159
|
/**
|
|
@@ -388,9 +391,9 @@ export class Toast {
|
|
|
388
391
|
if (layout === 'stacked' && startButtons.length > 0 && endButtons.length > 0) {
|
|
389
392
|
printIonWarning('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);
|
|
390
393
|
}
|
|
391
|
-
return (h(Host, Object.assign({ key: '
|
|
394
|
+
return (h(Host, Object.assign({ key: '68c336f80af04ba484ca9899bae8f40c0d9b7691', tabindex: "-1" }, this.htmlAttributes, { style: {
|
|
392
395
|
zIndex: `${60000 + this.overlayIndex}`,
|
|
393
|
-
}, class: createColorClasses(this.color, Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent })), onIonToastWillDismiss: this.dispatchCancelHandler }), h("div", { key: '
|
|
396
|
+
}, class: createColorClasses(this.color, Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent })), onIonToastWillDismiss: this.dispatchCancelHandler }), h("div", { key: '3483b188f14b700964a123997a60a43a2023a1b6', class: wrapperClass }, h("div", { key: '1b88544a9b87253b364cbec6285625388979b560', class: "toast-container", part: "container" }, this.renderButtons(startButtons, 'start'), this.icon !== undefined && (h("ion-icon", { key: 'bd1c42e3b14af66b880dfe283e3ae910075c0f70', class: "toast-icon", part: "icon", icon: this.icon, lazy: false, "aria-hidden": "true" })), h("div", { key: 'a5ef6cdabc1f7c70d11a5f2a0abf8737fe7550e8', 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')))));
|
|
394
397
|
}
|
|
395
398
|
static get is() { return "ion-toast"; }
|
|
396
399
|
static get encapsulation() { return "shadow"; }
|
package/dist/docs.json
CHANGED
|
@@ -248,7 +248,10 @@ const ActionSheet = class {
|
|
|
248
248
|
this.triggerController.removeClickListener();
|
|
249
249
|
}
|
|
250
250
|
componentWillLoad() {
|
|
251
|
-
|
|
251
|
+
var _a;
|
|
252
|
+
if (!((_a = this.htmlAttributes) === null || _a === void 0 ? void 0 : _a.id)) {
|
|
253
|
+
setOverlayId(this.el);
|
|
254
|
+
}
|
|
252
255
|
}
|
|
253
256
|
componentDidLoad() {
|
|
254
257
|
/**
|
|
@@ -293,12 +296,12 @@ const ActionSheet = class {
|
|
|
293
296
|
const cancelButton = allButtons.find((b) => b.role === 'cancel');
|
|
294
297
|
const buttons = allButtons.filter((b) => b.role !== 'cancel');
|
|
295
298
|
const headerID = `action-sheet-${overlayIndex}-header`;
|
|
296
|
-
return (h(Host, Object.assign({ key: '
|
|
299
|
+
return (h(Host, Object.assign({ key: '7bbd202ca9e19727e7514abbe073687d982f80c3', role: "dialog", "aria-modal": "true", "aria-labelledby": header !== undefined ? headerID : null, tabindex: "-1" }, htmlAttributes, { style: {
|
|
297
300
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
298
|
-
}, 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: '
|
|
301
|
+
}, 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: '23344a9221a2e6720d7b9de5249dc37256cafa7b', tappable: this.backdropDismiss }), h("div", { key: 'd46361bb5cdc32a7922dcf76b566f358a6174bfa', tabindex: "0" }), h("div", { key: '136c3f2e77c8a2eac8e9ae4bb13d735e1d62598d', class: "action-sheet-wrapper ion-overlay-wrapper", ref: (el) => (this.wrapperEl = el) }, h("div", { key: '6168ea8b2be42020b2edeb8ff3a0f3d1254be37a', class: "action-sheet-container" }, h("div", { key: '29b9e6619dc54574733a704d6bf885839151bd84', class: "action-sheet-group", ref: (el) => (this.groupEl = el) }, header !== undefined && (h("div", { key: '536ce764bfddb3816ea3512d90f4acef2ccb8589', id: headerID, class: {
|
|
299
302
|
'action-sheet-title': true,
|
|
300
303
|
'action-sheet-has-sub-title': this.subHeader !== undefined,
|
|
301
|
-
} }, header, this.subHeader && h("div", { key: '
|
|
304
|
+
} }, header, this.subHeader && h("div", { key: '6d888219145824fd36cdfe0d3c8388bbf2769777', 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: '46f98f0ed5a9bdb3e35feb9ae71c4489c17b7d77', class: "action-sheet-group action-sheet-group-cancel" }, h("button", Object.assign({ key: 'e3c457bced8ad5f692e48de26e65f731fd631b4f' }, cancelButton.htmlAttributes, { type: "button", class: buttonClass(cancelButton), onClick: () => this.buttonClick(cancelButton) }), h("span", { key: '4cba6dc559f734ecc852e024959210cd0dd25354', class: "action-sheet-button-inner" }, cancelButton.icon && (h("ion-icon", { key: '9df64989aad1b4d1e75edf4d37ab208965cfe37f', icon: cancelButton.icon, "aria-hidden": "true", lazy: false, class: "action-sheet-icon" })), cancelButton.text), mode === 'md' && h("ion-ripple-effect", { key: '558089275a29177cefdb2e38eefc9b5c8b62872b' })))))), h("div", { key: 'fa4df6e043b00a6e4126dbc71cb344cfc2b2e7bc', tabindex: "0" })));
|
|
302
305
|
}
|
|
303
306
|
get el() { return getElement(this); }
|
|
304
307
|
static get watchers() { return {
|
|
@@ -263,7 +263,10 @@ const Alert = class {
|
|
|
263
263
|
this.triggerChanged();
|
|
264
264
|
}
|
|
265
265
|
componentWillLoad() {
|
|
266
|
-
|
|
266
|
+
var _a;
|
|
267
|
+
if (!((_a = this.htmlAttributes) === null || _a === void 0 ? void 0 : _a.id)) {
|
|
268
|
+
setOverlayId(this.el);
|
|
269
|
+
}
|
|
267
270
|
this.inputsChanged();
|
|
268
271
|
this.buttonsChanged();
|
|
269
272
|
}
|
|
@@ -491,9 +494,9 @@ const Alert = class {
|
|
|
491
494
|
* If neither is defined, don't set aria-labelledby.
|
|
492
495
|
*/
|
|
493
496
|
const ariaLabelledBy = header ? hdrId : subHeader ? subHdrId : null;
|
|
494
|
-
return (h(Host, Object.assign({ key: '
|
|
497
|
+
return (h(Host, Object.assign({ key: 'c7d53f48b359f2bc3480a2e1ba34948fc9378fb0', role: role, "aria-modal": "true", "aria-labelledby": ariaLabelledBy, "aria-describedby": message !== undefined ? msgId : null, tabindex: "-1" }, htmlAttributes, { style: {
|
|
495
498
|
zIndex: `${20000 + overlayIndex}`,
|
|
496
|
-
}, 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: '
|
|
499
|
+
}, 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: '18c7e6b5d63435d9a6a82bda951158e7e1af6e92', tappable: this.backdropDismiss }), h("div", { key: 'e35e1a4b81286976c8a6bab570c986f3196b21f4', tabindex: "0" }), h("div", { key: '9089864c80d96ed834bf723f3de863cf1c4a5b97', class: "alert-wrapper ion-overlay-wrapper", ref: (el) => (this.wrapperEl = el) }, h("div", { key: 'dd600f02c84352059c6cdf98821b9c9a831bcdcb', class: "alert-head" }, header && (h("h2", { key: '11afb605e1ccefc889fbdd2533d491bea8fbf183', id: hdrId, class: "alert-title" }, header)), subHeader && (h("h2", { key: 'e53b0613d09d26e5a2cd7c9c6e63ec2535625ce5', id: subHdrId, class: "alert-sub-title" }, subHeader))), this.renderAlertMessage(msgId), this.renderAlertInputs(), this.renderAlertButtons()), h("div", { key: 'cef60ec8b34c9aec8bc698f16f55324d1ce67c72', tabindex: "0" })));
|
|
497
500
|
}
|
|
498
501
|
get el() { return getElement(this); }
|
|
499
502
|
static get watchers() { return {
|
|
@@ -1910,7 +1910,10 @@ const Picker = class {
|
|
|
1910
1910
|
this.triggerController.removeClickListener();
|
|
1911
1911
|
}
|
|
1912
1912
|
componentWillLoad() {
|
|
1913
|
-
|
|
1913
|
+
var _a;
|
|
1914
|
+
if (!((_a = this.htmlAttributes) === null || _a === void 0 ? void 0 : _a.id)) {
|
|
1915
|
+
setOverlayId(this.el);
|
|
1916
|
+
}
|
|
1914
1917
|
}
|
|
1915
1918
|
componentDidLoad() {
|
|
1916
1919
|
printIonWarning('ion-picker-legacy and ion-picker-legacy-column have been deprecated in favor of new versions of the ion-picker and ion-picker-column components. These new components display inline with your page content allowing for more presentation flexibility than before.', this.el);
|
|
@@ -2023,11 +2026,11 @@ const Picker = class {
|
|
|
2023
2026
|
render() {
|
|
2024
2027
|
const { htmlAttributes } = this;
|
|
2025
2028
|
const mode = getIonMode(this);
|
|
2026
|
-
return (h(Host, Object.assign({ key: '
|
|
2029
|
+
return (h(Host, Object.assign({ key: '3b163ca87354a3a4f302ff016d5affd0dc97bccc', "aria-modal": "true", tabindex: "-1" }, htmlAttributes, { style: {
|
|
2027
2030
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
2028
2031
|
}, class: Object.assign({ [mode]: true,
|
|
2029
2032
|
// Used internally for styling
|
|
2030
|
-
[`picker-${mode}`]: true, 'overlay-hidden': true }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonPickerWillDismiss: this.dispatchCancelHandler }), h("ion-backdrop", { key: '
|
|
2033
|
+
[`picker-${mode}`]: true, 'overlay-hidden': true }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonPickerWillDismiss: this.dispatchCancelHandler }), h("ion-backdrop", { key: 'da4224447bdbcfbadd1bd63ebe7a7bfdb8aa3129', visible: this.showBackdrop, tappable: this.backdropDismiss }), h("div", { key: '211475c859b7acf4d64556905c45993201d92d43', tabindex: "0" }), h("div", { key: 'c3b3674038155809caea84ae6348ff0d66897a64', class: "picker-wrapper ion-overlay-wrapper", role: "dialog" }, h("div", { key: 'a21757da70dc7864945a5751d9da3ca4bf87897b', class: "picker-toolbar" }, this.buttons.map((b) => (h("div", { class: buttonWrapperClass(b) }, h("button", { type: "button", onClick: () => this.buttonClick(b), class: buttonClass(b) }, b.text))))), h("div", { key: '0220da1854d09ef22d2d9a32eaa3c3b222be5a0a', class: "picker-columns" }, h("div", { key: '55757c165ba9e38e56b4dee76a9b13d3ff8b21e6', class: "picker-above-highlight" }), this.presented && this.columns.map((c) => h("ion-picker-legacy-column", { col: c })), h("div", { key: '160092a46a48287bf75e5dfe3502f1755a2d0c70', class: "picker-below-highlight" }))), h("div", { key: 'e212db6cca7d75fc0eda0baf4312dd51b9b7a4ef', tabindex: "0" })));
|
|
2031
2034
|
}
|
|
2032
2035
|
get el() { return getElement(this); }
|
|
2033
2036
|
static get watchers() { return {
|
|
@@ -165,11 +165,14 @@ const Loading = class {
|
|
|
165
165
|
this.triggerChanged();
|
|
166
166
|
}
|
|
167
167
|
componentWillLoad() {
|
|
168
|
+
var _a;
|
|
168
169
|
if (this.spinner === undefined) {
|
|
169
170
|
const mode = getIonMode(this);
|
|
170
171
|
this.spinner = config.get('loadingSpinner', config.get('spinner', mode === 'ios' ? 'lines' : 'crescent'));
|
|
171
172
|
}
|
|
172
|
-
|
|
173
|
+
if (!((_a = this.htmlAttributes) === null || _a === void 0 ? void 0 : _a.id)) {
|
|
174
|
+
setOverlayId(this.el);
|
|
175
|
+
}
|
|
173
176
|
}
|
|
174
177
|
componentDidLoad() {
|
|
175
178
|
/**
|
|
@@ -258,9 +261,9 @@ const Loading = class {
|
|
|
258
261
|
* Otherwise, don't set aria-labelledby.
|
|
259
262
|
*/
|
|
260
263
|
const ariaLabelledBy = message !== undefined ? msgId : null;
|
|
261
|
-
return (h(Host, Object.assign({ key: '
|
|
264
|
+
return (h(Host, Object.assign({ key: 'fb3d2cd7cd0539ed6540d8be50e243c7916b3ca2', role: "dialog", "aria-modal": "true", "aria-labelledby": ariaLabelledBy, tabindex: "-1" }, htmlAttributes, { style: {
|
|
262
265
|
zIndex: `${40000 + this.overlayIndex}`,
|
|
263
|
-
}, onIonBackdropTap: this.onBackdropTap, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'loading-translucent': this.translucent }) }), h("ion-backdrop", { key: '
|
|
266
|
+
}, onIonBackdropTap: this.onBackdropTap, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'loading-translucent': this.translucent }) }), h("ion-backdrop", { key: 'c8bd30782f3040b1b80e88aa924861e439d40754', visible: this.showBackdrop, tappable: this.backdropDismiss }), h("div", { key: '4ebfbb67c92e8eb56c27dd7c199b35bf6be1cf63', tabindex: "0" }), h("div", { key: '9492723cd87f1ef75534e449d4bc2b2deb0cb3cc', class: "loading-wrapper ion-overlay-wrapper" }, spinner && (h("div", { key: 'd9eb42454e48c82704d974a68b80ceb4de990417', class: "loading-spinner" }, h("ion-spinner", { key: 'cdb046bad89872f4208ae466979315652766bf3a', name: spinner, "aria-hidden": "true" }))), message !== undefined && this.renderLoadingMessage(msgId)), h("div", { key: '412d1bb537dafa6e6863d07ddc15f5969fe0617d', tabindex: "0" })));
|
|
264
267
|
}
|
|
265
268
|
get el() { return getElement(this); }
|
|
266
269
|
static get watchers() { return {
|
|
@@ -1222,6 +1222,7 @@ const Modal = class {
|
|
|
1222
1222
|
this.triggerController.removeClickListener();
|
|
1223
1223
|
}
|
|
1224
1224
|
componentWillLoad() {
|
|
1225
|
+
var _a;
|
|
1225
1226
|
const { breakpoints, initialBreakpoint, el, htmlAttributes } = this;
|
|
1226
1227
|
const isSheetModal = (this.isSheetModal = breakpoints !== undefined && initialBreakpoint !== undefined);
|
|
1227
1228
|
const attributesToInherit = ['aria-label', 'role'];
|
|
@@ -1263,7 +1264,9 @@ const Modal = class {
|
|
|
1263
1264
|
if (breakpoints !== undefined && initialBreakpoint !== undefined && !breakpoints.includes(initialBreakpoint)) {
|
|
1264
1265
|
printIonWarning('Your breakpoints array must include the initialBreakpoint value.');
|
|
1265
1266
|
}
|
|
1266
|
-
|
|
1267
|
+
if (!((_a = this.htmlAttributes) === null || _a === void 0 ? void 0 : _a.id)) {
|
|
1268
|
+
setOverlayId(this.el);
|
|
1269
|
+
}
|
|
1267
1270
|
}
|
|
1268
1271
|
componentDidLoad() {
|
|
1269
1272
|
/**
|
|
@@ -1653,18 +1656,18 @@ const Modal = class {
|
|
|
1653
1656
|
const mode = getIonMode(this);
|
|
1654
1657
|
const isCardModal = presentingElement !== undefined && mode === 'ios';
|
|
1655
1658
|
const isHandleCycle = handleBehavior === 'cycle';
|
|
1656
|
-
return (h(Host, Object.assign({ key: '
|
|
1659
|
+
return (h(Host, Object.assign({ key: '013ba4864ca4d2c1052c512f6a4b0732b8decff7', "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
|
|
1657
1660
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
1658
|
-
}, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, '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 }), h("ion-backdrop", { key: '
|
|
1661
|
+
}, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, '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 }), h("ion-backdrop", { key: '498b1c0a03836d6799dcf3b8e9315805c70f6480', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && h("div", { key: 'ce22e4caf1096e87248926fe2477f0d5a4c8a5cf', class: "modal-shadow" }), h("div", Object.assign({ key: '540e47b15d8290166c39b022c725182114a75682',
|
|
1659
1662
|
/*
|
|
1660
1663
|
role and aria-modal must be used on the
|
|
1661
1664
|
same element. They must also be set inside the
|
|
1662
1665
|
shadow DOM otherwise ion-button will not be highlighted
|
|
1663
1666
|
when using VoiceOver: https://bugs.webkit.org/show_bug.cgi?id=247134
|
|
1664
1667
|
*/
|
|
1665
|
-
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (h("button", { key: '
|
|
1668
|
+
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (h("button", { key: 'f3b352ec9a63a7ec801462aacfd8295b4302d115', class: "modal-handle",
|
|
1666
1669
|
// Prevents the handle from receiving keyboard focus when it does not cycle
|
|
1667
|
-
tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle" })), h("slot", { key: '
|
|
1670
|
+
tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle" })), h("slot", { key: '31a3f58f4c733ffdf736523c154200874a96b1d0' }))));
|
|
1668
1671
|
}
|
|
1669
1672
|
get el() { return getElement(this); }
|
|
1670
1673
|
static get watchers() { return {
|
|
@@ -1089,8 +1089,9 @@ const Popover = class {
|
|
|
1089
1089
|
}
|
|
1090
1090
|
}
|
|
1091
1091
|
componentWillLoad() {
|
|
1092
|
+
var _a, _b;
|
|
1092
1093
|
const { el } = this;
|
|
1093
|
-
const popoverId = setOverlayId(el);
|
|
1094
|
+
const popoverId = (_b = (_a = this.htmlAttributes) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : setOverlayId(el);
|
|
1094
1095
|
this.parentPopover = el.closest(`ion-popover:not(#${popoverId})`);
|
|
1095
1096
|
if (this.alignment === undefined) {
|
|
1096
1097
|
this.alignment = getIonMode(this) === 'ios' ? 'center' : 'start';
|
|
@@ -1293,9 +1294,9 @@ const Popover = class {
|
|
|
1293
1294
|
const { onLifecycle, parentPopover, dismissOnSelect, side, arrow, htmlAttributes, focusTrap } = this;
|
|
1294
1295
|
const desktop = isPlatform('desktop');
|
|
1295
1296
|
const enableArrow = arrow && !parentPopover;
|
|
1296
|
-
return (h(Host, Object.assign({ key: '
|
|
1297
|
+
return (h(Host, Object.assign({ key: '3a7c4c39384bab1447c4bd6b9b06d7837a09353b', "aria-modal": "true", "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
|
|
1297
1298
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
1298
|
-
}, 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 && h("ion-backdrop", { key: '
|
|
1299
|
+
}, 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 && h("ion-backdrop", { key: '38a1c4ad29238d1e81cab407f099121fa4947cce', tappable: this.backdropDismiss, visible: this.showBackdrop, part: "backdrop" }), h("div", { key: 'f825494c5e3be89d7fcf0229e29b405bccb13edb', class: "popover-wrapper ion-overlay-wrapper", onClick: dismissOnSelect ? () => this.dismiss() : undefined }, enableArrow && h("div", { key: '3acae5a0106389c776c8ffe5bf10f3ff006e0346', class: "popover-arrow", part: "arrow" }), h("div", { key: '2aa73e9f06b1d2ac4c0d36c23186b9164f395079', class: "popover-content", part: "content" }, h("slot", { key: '62f5713414aae47dde6a8aef1f9b69af287534ae' })))));
|
|
1299
1300
|
}
|
|
1300
1301
|
get el() { return getElement(this); }
|
|
1301
1302
|
static get watchers() { return {
|
|
@@ -587,7 +587,10 @@ const Toast = class {
|
|
|
587
587
|
this.triggerController.removeClickListener();
|
|
588
588
|
}
|
|
589
589
|
componentWillLoad() {
|
|
590
|
-
|
|
590
|
+
var _a;
|
|
591
|
+
if (!((_a = this.htmlAttributes) === null || _a === void 0 ? void 0 : _a.id)) {
|
|
592
|
+
setOverlayId(this.el);
|
|
593
|
+
}
|
|
591
594
|
}
|
|
592
595
|
componentDidLoad() {
|
|
593
596
|
/**
|
|
@@ -825,9 +828,9 @@ const Toast = class {
|
|
|
825
828
|
if (layout === 'stacked' && startButtons.length > 0 && endButtons.length > 0) {
|
|
826
829
|
printIonWarning('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);
|
|
827
830
|
}
|
|
828
|
-
return (h(Host, Object.assign({ key: '
|
|
831
|
+
return (h(Host, Object.assign({ key: '68c336f80af04ba484ca9899bae8f40c0d9b7691', tabindex: "-1" }, this.htmlAttributes, { style: {
|
|
829
832
|
zIndex: `${60000 + this.overlayIndex}`,
|
|
830
|
-
}, class: createColorClasses(this.color, Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent })), onIonToastWillDismiss: this.dispatchCancelHandler }), h("div", { key: '
|
|
833
|
+
}, class: createColorClasses(this.color, Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent })), onIonToastWillDismiss: this.dispatchCancelHandler }), h("div", { key: '3483b188f14b700964a123997a60a43a2023a1b6', class: wrapperClass }, h("div", { key: '1b88544a9b87253b364cbec6285625388979b560', class: "toast-container", part: "container" }, this.renderButtons(startButtons, 'start'), this.icon !== undefined && (h("ion-icon", { key: 'bd1c42e3b14af66b880dfe283e3ae910075c0f70', class: "toast-icon", part: "icon", icon: this.icon, lazy: false, "aria-hidden": "true" })), h("div", { key: 'a5ef6cdabc1f7c70d11a5f2a0abf8737fe7550e8', 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')))));
|
|
831
834
|
}
|
|
832
835
|
get el() { return getElement(this); }
|
|
833
836
|
static get watchers() { return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import{__awaiter,__generator}from"tslib";
|
|
2
2
|
/*!
|
|
3
3
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
4
|
-
*/import{r as registerInstance,d as createEvent,e as readTask,h,f as Host,i as getElement}from"./index-7a952e7a.js";import{c as createButtonActiveGesture}from"./button-active-78f50add.js";import{r as raf}from"./helpers-da915de8.js";import{c as createLockController}from"./lock-controller-316928be.js";import{d as createDelegateController,e as createTriggerController,B as BACKDROP,i as isCancel,f as present,g as dismiss,h as eventMethod,s as safeCall,j as prepareOverlay,k as setOverlayId}from"./overlays-e1bad9cd.js";import{g as getClassMap}from"./theme-01f3f29c.js";import{b as getIonMode}from"./ionic-global-81a1064f.js";import{c as createAnimation}from"./animation-eab5a4ca.js";import"./haptic-ac164e4c.js";import"./capacitor-59395cbd.js";import"./index-a5d50daf.js";import"./index-39782642.js";import"./gesture-controller-314a54f6.js";import"./hardware-back-button-2e99752e.js";import"./framework-delegate-63d1a679.js";import"./index-9b0d46f4.js";var iosEnterAnimation=function(t){var e=createAnimation();var o=createAnimation();var n=createAnimation();o.addElement(t.querySelector("ion-backdrop")).fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]);n.addElement(t.querySelector(".action-sheet-wrapper")).fromTo("transform","translateY(100%)","translateY(0%)");return e.addElement(t).easing("cubic-bezier(.36,.66,.04,1)").duration(400).addAnimation([o,n])};var iosLeaveAnimation=function(t){var e=createAnimation();var o=createAnimation();var n=createAnimation();o.addElement(t.querySelector("ion-backdrop")).fromTo("opacity","var(--backdrop-opacity)",0);n.addElement(t.querySelector(".action-sheet-wrapper")).fromTo("transform","translateY(0%)","translateY(100%)");return e.addElement(t).easing("cubic-bezier(.36,.66,.04,1)").duration(450).addAnimation([o,n])};var mdEnterAnimation=function(t){var e=createAnimation();var o=createAnimation();var n=createAnimation();o.addElement(t.querySelector("ion-backdrop")).fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]);n.addElement(t.querySelector(".action-sheet-wrapper")).fromTo("transform","translateY(100%)","translateY(0%)");return e.addElement(t).easing("cubic-bezier(.36,.66,.04,1)").duration(400).addAnimation([o,n])};var mdLeaveAnimation=function(t){var e=createAnimation();var o=createAnimation();var n=createAnimation();o.addElement(t.querySelector("ion-backdrop")).fromTo("opacity","var(--backdrop-opacity)",0);n.addElement(t.querySelector(".action-sheet-wrapper")).fromTo("transform","translateY(0%)","translateY(100%)");return e.addElement(t).easing("cubic-bezier(.36,.66,.04,1)").duration(450).addAnimation([o,n])};var actionSheetIosCss='.sc-ion-action-sheet-ios-h{--color:initial;--button-color-activated:var(--button-color);--button-color-focused:var(--button-color);--button-color-hover:var(--button-color);--button-color-selected:var(--button-color);--min-width:auto;--width:100%;--max-width:500px;--min-height:auto;--height:auto;--max-height:calc(100% - (var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;right:0;top:0;bottom:0;display:block;position:fixed;outline:none;font-family:var(--ion-font-family, inherit);-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1001}.overlay-hidden.sc-ion-action-sheet-ios-h{display:none}.action-sheet-wrapper.sc-ion-action-sheet-ios{left:0;right:0;bottom:0;-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0);display:block;position:absolute;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);z-index:10;pointer-events:none}.action-sheet-button.sc-ion-action-sheet-ios{display:block;position:relative;width:100%;border:0;outline:none;background:var(--button-background);color:var(--button-color);font-family:inherit;overflow:hidden}.action-sheet-button.sc-ion-action-sheet-ios:disabled{color:var(--button-color-disabled);opacity:0.4}.action-sheet-button-inner.sc-ion-action-sheet-ios{display:-ms-flexbox;display:flex;position:relative;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;pointer-events:none;width:100%;height:100%;z-index:1}.action-sheet-container.sc-ion-action-sheet-ios{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:end;justify-content:flex-end;height:100%;max-height:calc(100vh - (var(--ion-safe-area-top, 0) + var(--ion-safe-area-bottom, 0)));max-height:calc(100dvh - (var(--ion-safe-area-top, 0) + var(--ion-safe-area-bottom, 0)))}.action-sheet-group.sc-ion-action-sheet-ios{-ms-flex-negative:2;flex-shrink:2;overscroll-behavior-y:contain;overflow-y:auto;-webkit-overflow-scrolling:touch;pointer-events:all;background:var(--background)}@media (any-pointer: coarse){.action-sheet-group.sc-ion-action-sheet-ios::-webkit-scrollbar{display:none}}.action-sheet-group-cancel.sc-ion-action-sheet-ios{-ms-flex-negative:0;flex-shrink:0;overflow:hidden}.action-sheet-button.sc-ion-action-sheet-ios::after{left:0;right:0;top:0;bottom:0;position:absolute;content:"";opacity:0}.action-sheet-selected.sc-ion-action-sheet-ios{color:var(--button-color-selected)}.action-sheet-selected.sc-ion-action-sheet-ios::after{background:var(--button-background-selected);opacity:var(--button-background-selected-opacity)}.action-sheet-button.ion-activated.sc-ion-action-sheet-ios{color:var(--button-color-activated)}.action-sheet-button.ion-activated.sc-ion-action-sheet-ios::after{background:var(--button-background-activated);opacity:var(--button-background-activated-opacity)}.action-sheet-button.ion-focused.sc-ion-action-sheet-ios{color:var(--button-color-focused)}.action-sheet-button.ion-focused.sc-ion-action-sheet-ios::after{background:var(--button-background-focused);opacity:var(--button-background-focused-opacity)}@media (any-hover: hover){.action-sheet-button.sc-ion-action-sheet-ios:not(:disabled):hover{color:var(--button-color-hover)}.action-sheet-button.sc-ion-action-sheet-ios:not(:disabled):hover::after{background:var(--button-background-hover);opacity:var(--button-background-hover-opacity)}}.sc-ion-action-sheet-ios-h{--background:var(--ion-overlay-background-color, var(--ion-color-step-100, var(--ion-background-color-step-100, #f9f9f9)));--backdrop-opacity:var(--ion-backdrop-opacity, 0.4);--button-background:linear-gradient(0deg, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08), rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08) 50%, transparent 50%) bottom/100% 1px no-repeat transparent;--button-background-activated:var(--ion-text-color, #000);--button-background-activated-opacity:.08;--button-background-hover:currentColor;--button-background-hover-opacity:.04;--button-background-focused:currentColor;--button-background-focused-opacity:.12;--button-background-selected:var(--ion-color-step-150, var(--ion-background-color-step-150, var(--ion-background-color, #fff)));--button-background-selected-opacity:1;--button-color:var(--ion-color-primary, #0054e9);--button-color-disabled:var(--ion-color-step-850, var(--ion-text-color-step-150, #262626));--color:var(--ion-color-step-400, var(--ion-text-color-step-600, #999999));text-align:center}.action-sheet-wrapper.sc-ion-action-sheet-ios{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:var(--ion-safe-area-top, 0);padding-bottom:var(--ion-safe-area-bottom, 0);-webkit-box-sizing:content-box;box-sizing:content-box}.action-sheet-container.sc-ion-action-sheet-ios{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:0;padding-bottom:0}.action-sheet-group.sc-ion-action-sheet-ios{border-radius:13px;margin-bottom:8px}.action-sheet-group.sc-ion-action-sheet-ios:first-child{margin-top:10px}.action-sheet-group.sc-ion-action-sheet-ios:last-child{margin-bottom:10px}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-group.sc-ion-action-sheet-ios{background-color:transparent;-webkit-backdrop-filter:saturate(280%) blur(20px);backdrop-filter:saturate(280%) blur(20px)}.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-title.sc-ion-action-sheet-ios,.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-button.sc-ion-action-sheet-ios{background-color:transparent;background-image:-webkit-gradient(linear, left bottom, left top, from(rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8)), to(rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8))), -webkit-gradient(linear, left bottom, left top, from(rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.4)), color-stop(50%, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.4)), color-stop(50%, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8)));background-image:linear-gradient(0deg, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8), rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8) 100%), linear-gradient(0deg, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.4), rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.4) 50%, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8) 50%);background-repeat:no-repeat;background-position:top, bottom;background-size:100% calc(100% - 1px), 100% 1px;-webkit-backdrop-filter:saturate(120%);backdrop-filter:saturate(120%)}.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-button.ion-activated.sc-ion-action-sheet-ios{background-color:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.7);background-image:none}.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-cancel.sc-ion-action-sheet-ios{background:var(--button-background-selected)}}.action-sheet-title.sc-ion-action-sheet-ios{background:-webkit-gradient(linear, left bottom, left top, from(rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08)), color-stop(50%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08)), color-stop(50%, transparent)) bottom/100% 1px no-repeat transparent;background:linear-gradient(0deg, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08), rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08) 50%, transparent 50%) bottom/100% 1px no-repeat transparent}.action-sheet-title.sc-ion-action-sheet-ios{-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:14px;padding-bottom:13px;color:var(--color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-size:max(13px, 0.8125rem);font-weight:400;text-align:center}.action-sheet-title.action-sheet-has-sub-title.sc-ion-action-sheet-ios{font-weight:600}.action-sheet-sub-title.sc-ion-action-sheet-ios{padding-left:0;padding-right:0;padding-top:6px;padding-bottom:0;font-size:max(13px, 0.8125rem);font-weight:400}.action-sheet-button.sc-ion-action-sheet-ios{-webkit-padding-start:14px;padding-inline-start:14px;-webkit-padding-end:14px;padding-inline-end:14px;padding-top:14px;padding-bottom:14px;min-height:56px;font-size:max(20px, 1.25rem);contain:content}.action-sheet-button.sc-ion-action-sheet-ios .action-sheet-icon.sc-ion-action-sheet-ios{-webkit-margin-end:0.3em;margin-inline-end:0.3em;font-size:max(28px, 1.75rem);pointer-events:none}.action-sheet-button.sc-ion-action-sheet-ios:last-child{background-image:none}.action-sheet-selected.sc-ion-action-sheet-ios{font-weight:bold}.action-sheet-cancel.sc-ion-action-sheet-ios{font-weight:600}.action-sheet-cancel.sc-ion-action-sheet-ios::after{background:var(--button-background-selected);opacity:var(--button-background-selected-opacity)}.action-sheet-destructive.sc-ion-action-sheet-ios,.action-sheet-destructive.ion-activated.sc-ion-action-sheet-ios,.action-sheet-destructive.ion-focused.sc-ion-action-sheet-ios{color:var(--ion-color-danger, #c5000f)}@media (any-hover: hover){.action-sheet-destructive.sc-ion-action-sheet-ios:hover{color:var(--ion-color-danger, #c5000f)}}';var IonActionSheetIosStyle0=actionSheetIosCss;var actionSheetMdCss='.sc-ion-action-sheet-md-h{--color:initial;--button-color-activated:var(--button-color);--button-color-focused:var(--button-color);--button-color-hover:var(--button-color);--button-color-selected:var(--button-color);--min-width:auto;--width:100%;--max-width:500px;--min-height:auto;--height:auto;--max-height:calc(100% - (var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;right:0;top:0;bottom:0;display:block;position:fixed;outline:none;font-family:var(--ion-font-family, inherit);-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1001}.overlay-hidden.sc-ion-action-sheet-md-h{display:none}.action-sheet-wrapper.sc-ion-action-sheet-md{left:0;right:0;bottom:0;-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0);display:block;position:absolute;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);z-index:10;pointer-events:none}.action-sheet-button.sc-ion-action-sheet-md{display:block;position:relative;width:100%;border:0;outline:none;background:var(--button-background);color:var(--button-color);font-family:inherit;overflow:hidden}.action-sheet-button.sc-ion-action-sheet-md:disabled{color:var(--button-color-disabled);opacity:0.4}.action-sheet-button-inner.sc-ion-action-sheet-md{display:-ms-flexbox;display:flex;position:relative;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;pointer-events:none;width:100%;height:100%;z-index:1}.action-sheet-container.sc-ion-action-sheet-md{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:end;justify-content:flex-end;height:100%;max-height:calc(100vh - (var(--ion-safe-area-top, 0) + var(--ion-safe-area-bottom, 0)));max-height:calc(100dvh - (var(--ion-safe-area-top, 0) + var(--ion-safe-area-bottom, 0)))}.action-sheet-group.sc-ion-action-sheet-md{-ms-flex-negative:2;flex-shrink:2;overscroll-behavior-y:contain;overflow-y:auto;-webkit-overflow-scrolling:touch;pointer-events:all;background:var(--background)}@media (any-pointer: coarse){.action-sheet-group.sc-ion-action-sheet-md::-webkit-scrollbar{display:none}}.action-sheet-group-cancel.sc-ion-action-sheet-md{-ms-flex-negative:0;flex-shrink:0;overflow:hidden}.action-sheet-button.sc-ion-action-sheet-md::after{left:0;right:0;top:0;bottom:0;position:absolute;content:"";opacity:0}.action-sheet-selected.sc-ion-action-sheet-md{color:var(--button-color-selected)}.action-sheet-selected.sc-ion-action-sheet-md::after{background:var(--button-background-selected);opacity:var(--button-background-selected-opacity)}.action-sheet-button.ion-activated.sc-ion-action-sheet-md{color:var(--button-color-activated)}.action-sheet-button.ion-activated.sc-ion-action-sheet-md::after{background:var(--button-background-activated);opacity:var(--button-background-activated-opacity)}.action-sheet-button.ion-focused.sc-ion-action-sheet-md{color:var(--button-color-focused)}.action-sheet-button.ion-focused.sc-ion-action-sheet-md::after{background:var(--button-background-focused);opacity:var(--button-background-focused-opacity)}@media (any-hover: hover){.action-sheet-button.sc-ion-action-sheet-md:not(:disabled):hover{color:var(--button-color-hover)}.action-sheet-button.sc-ion-action-sheet-md:not(:disabled):hover::after{background:var(--button-background-hover);opacity:var(--button-background-hover-opacity)}}.sc-ion-action-sheet-md-h{--background:var(--ion-overlay-background-color, var(--ion-background-color, #fff));--backdrop-opacity:var(--ion-backdrop-opacity, 0.32);--button-background:transparent;--button-background-selected:currentColor;--button-background-selected-opacity:0;--button-background-activated:transparent;--button-background-activated-opacity:0;--button-background-hover:currentColor;--button-background-hover-opacity:.04;--button-background-focused:currentColor;--button-background-focused-opacity:.12;--button-color:var(--ion-color-step-850, var(--ion-text-color-step-150, #262626));--button-color-disabled:var(--button-color);--color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.54)}.action-sheet-wrapper.sc-ion-action-sheet-md{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:var(--ion-safe-area-top, 0);margin-bottom:0}.action-sheet-title.sc-ion-action-sheet-md{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:20px;padding-bottom:17px;min-height:60px;color:var(--color, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.54));font-size:1rem;text-align:start}.action-sheet-sub-title.sc-ion-action-sheet-md{padding-left:0;padding-right:0;padding-top:16px;padding-bottom:0;font-size:0.875rem}.action-sheet-group.sc-ion-action-sheet-md:first-child{padding-top:0}.action-sheet-group.sc-ion-action-sheet-md:last-child{padding-bottom:var(--ion-safe-area-bottom)}.action-sheet-button.sc-ion-action-sheet-md{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:12px;padding-bottom:12px;position:relative;min-height:52px;font-size:1rem;text-align:start;contain:content;overflow:hidden}.action-sheet-icon.sc-ion-action-sheet-md{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:32px;margin-inline-end:32px;margin-top:0;margin-bottom:0;color:var(--color);font-size:1.5rem}.action-sheet-button-inner.sc-ion-action-sheet-md{-ms-flex-pack:start;justify-content:flex-start}.action-sheet-selected.sc-ion-action-sheet-md{font-weight:bold}';var IonActionSheetMdStyle0=actionSheetMdCss;var ActionSheet=function(){function t(t){var e=this;registerInstance(this,t);this.didPresent=createEvent(this,"ionActionSheetDidPresent",7);this.willPresent=createEvent(this,"ionActionSheetWillPresent",7);this.willDismiss=createEvent(this,"ionActionSheetWillDismiss",7);this.didDismiss=createEvent(this,"ionActionSheetDidDismiss",7);this.didPresentShorthand=createEvent(this,"didPresent",7);this.willPresentShorthand=createEvent(this,"willPresent",7);this.willDismissShorthand=createEvent(this,"willDismiss",7);this.didDismissShorthand=createEvent(this,"didDismiss",7);this.delegateController=createDelegateController(this);this.lockController=createLockController();this.triggerController=createTriggerController();this.presented=false;this.onBackdropTap=function(){e.dismiss(undefined,BACKDROP)};this.dispatchCancelHandler=function(t){var o=t.detail.role;if(isCancel(o)){var n=e.getButtons().find((function(t){return t.role==="cancel"}));e.callButtonHandler(n)}};this.overlayIndex=undefined;this.delegate=undefined;this.hasController=false;this.keyboardClose=true;this.enterAnimation=undefined;this.leaveAnimation=undefined;this.buttons=[];this.cssClass=undefined;this.backdropDismiss=true;this.header=undefined;this.subHeader=undefined;this.translucent=false;this.animated=true;this.htmlAttributes=undefined;this.isOpen=false;this.trigger=undefined}t.prototype.onIsOpenChange=function(t,e){if(t===true&&e===false){this.present()}else if(t===false&&e===true){this.dismiss()}};t.prototype.triggerChanged=function(){var t=this,e=t.trigger,o=t.el,n=t.triggerController;if(e){n.addClickListener(o,e)}};t.prototype.present=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:return[4,this.lockController.lock()];case 1:t=e.sent();return[4,this.delegateController.attachViewToDom()];case 2:e.sent();return[4,present(this,"actionSheetEnter",iosEnterAnimation,mdEnterAnimation)];case 3:e.sent();t();return[2]}}))}))};t.prototype.dismiss=function(t,e){return __awaiter(this,void 0,void 0,(function(){var o,n;return __generator(this,(function(i){switch(i.label){case 0:return[4,this.lockController.lock()];case 1:o=i.sent();return[4,dismiss(this,t,e,"actionSheetLeave",iosLeaveAnimation,mdLeaveAnimation)];case 2:n=i.sent();if(n){this.delegateController.removeViewFromDom()}o();return[2,n]}}))}))};t.prototype.onDidDismiss=function(){return eventMethod(this.el,"ionActionSheetDidDismiss")};t.prototype.onWillDismiss=function(){return eventMethod(this.el,"ionActionSheetWillDismiss")};t.prototype.buttonClick=function(t){return __awaiter(this,void 0,void 0,(function(){var e,o;return __generator(this,(function(n){switch(n.label){case 0:e=t.role;if(isCancel(e)){return[2,this.dismiss(t.data,e)]}return[4,this.callButtonHandler(t)];case 1:o=n.sent();if(o){return[2,this.dismiss(t.data,t.role)]}return[2,Promise.resolve()]}}))}))};t.prototype.callButtonHandler=function(t){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(o){switch(o.label){case 0:if(!t)return[3,2];return[4,safeCall(t.handler)];case 1:e=o.sent();if(e===false){return[2,false]}o.label=2;case 2:return[2,true]}}))}))};t.prototype.getButtons=function(){return this.buttons.map((function(t){return typeof t==="string"?{text:t}:t}))};t.prototype.connectedCallback=function(){prepareOverlay(this.el);this.triggerChanged()};t.prototype.disconnectedCallback=function(){if(this.gesture){this.gesture.destroy();this.gesture=undefined}this.triggerController.removeClickListener()};t.prototype.componentWillLoad=function(){setOverlayId(this.el)};t.prototype.componentDidLoad=function(){var t=this;var e=this,o=e.groupEl,n=e.wrapperEl;if(!this.gesture&&getIonMode(this)==="ios"&&n&&o){readTask((function(){var e=o.scrollHeight>o.clientHeight;if(!e){t.gesture=createButtonActiveGesture(n,(function(t){return t.classList.contains("action-sheet-button")}));t.gesture.enable(true)}}))}if(this.isOpen===true){raf((function(){return t.present()}))}this.triggerChanged()};t.prototype.render=function(){var t;var e=this;var o=this,n=o.header,i=o.htmlAttributes,a=o.overlayIndex;var r=getIonMode(this);var c=this.getButtons();var s=c.find((function(t){return t.role==="cancel"}));var d=c.filter((function(t){return t.role!=="cancel"}));var l="action-sheet-".concat(a,"-header");return h(Host,Object.assign({key:"b640e9730af4bd9ec569884cf203c63102e0ea59",role:"dialog","aria-modal":"true","aria-labelledby":n!==undefined?l:null,tabindex:"-1"},i,{style:{zIndex:"".concat(2e4+this.overlayIndex)},class:Object.assign(Object.assign((t={},t[r]=true,t),getClassMap(this.cssClass)),{"overlay-hidden":true,"action-sheet-translucent":this.translucent}),onIonActionSheetWillDismiss:this.dispatchCancelHandler,onIonBackdropTap:this.onBackdropTap}),h("ion-backdrop",{key:"bcfa5b7ffb5c265ef54caa114e697ada11f20c12",tappable:this.backdropDismiss}),h("div",{key:"207ae95b5365ce1d76170a05bdf8c83c3ba5de42",tabindex:"0"}),h("div",{key:"bf2b4e8d57c822a4ea2bbe6c34b1b2f2067e4c02",class:"action-sheet-wrapper ion-overlay-wrapper",ref:function(t){return e.wrapperEl=t}},h("div",{key:"9c4841eb03ca1378c5abc1e3aafbbcfaaa43c345",class:"action-sheet-container"},h("div",{key:"fa438b8663f5d30852e5967da0471489efa783b2",class:"action-sheet-group",ref:function(t){return e.groupEl=t}},n!==undefined&&h("div",{key:"2c600f1cd8314d65137fb1bfa180312b4791121a",id:l,class:{"action-sheet-title":true,"action-sheet-has-sub-title":this.subHeader!==undefined}},n,this.subHeader&&h("div",{key:"a98d6a3f7948733de22a07432e56255f11243b7b",class:"action-sheet-sub-title"},this.subHeader)),d.map((function(t){return h("button",Object.assign({},t.htmlAttributes,{type:"button",id:t.id,class:buttonClass(t),onClick:function(){return e.buttonClick(t)},disabled:t.disabled}),h("span",{class:"action-sheet-button-inner"},t.icon&&h("ion-icon",{icon:t.icon,"aria-hidden":"true",lazy:false,class:"action-sheet-icon"}),t.text),r==="md"&&h("ion-ripple-effect",null))}))),s&&h("div",{key:"5c5abd0e0b3d486ba2bfe437e28a23b2c7c4c955",class:"action-sheet-group action-sheet-group-cancel"},h("button",Object.assign({key:"520a23bbbe6c7436f5bc58bad162d7894b870e54"},s.htmlAttributes,{type:"button",class:buttonClass(s),onClick:function(){return e.buttonClick(s)}}),h("span",{key:"28c90f66786ee82316adc6cfd68d322d2038357d",class:"action-sheet-button-inner"},s.icon&&h("ion-icon",{key:"fd49fcea260c7addc9b07718eeb02d4fa6e4d900",icon:s.icon,"aria-hidden":"true",lazy:false,class:"action-sheet-icon"}),s.text),r==="md"&&h("ion-ripple-effect",{key:"c83f636e171fe77635a4fce2b97161447e10546a"}))))),h("div",{key:"d304920fc7cb006b87542183a3224a7e460abd3d",tabindex:"0"}))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{isOpen:["onIsOpenChange"],trigger:["triggerChanged"]}},enumerable:false,configurable:true});return t}();var buttonClass=function(t){var e;return Object.assign((e={"action-sheet-button":true,"ion-activatable":!t.disabled,"ion-focusable":!t.disabled},e["action-sheet-".concat(t.role)]=t.role!==undefined,e),getClassMap(t.cssClass))};ActionSheet.style={ios:IonActionSheetIosStyle0,md:IonActionSheetMdStyle0};export{ActionSheet as ion_action_sheet};
|
|
4
|
+
*/import{r as registerInstance,d as createEvent,e as readTask,h,f as Host,i as getElement}from"./index-7a952e7a.js";import{c as createButtonActiveGesture}from"./button-active-78f50add.js";import{r as raf}from"./helpers-da915de8.js";import{c as createLockController}from"./lock-controller-316928be.js";import{d as createDelegateController,e as createTriggerController,B as BACKDROP,i as isCancel,f as present,g as dismiss,h as eventMethod,s as safeCall,j as prepareOverlay,k as setOverlayId}from"./overlays-e1bad9cd.js";import{g as getClassMap}from"./theme-01f3f29c.js";import{b as getIonMode}from"./ionic-global-81a1064f.js";import{c as createAnimation}from"./animation-eab5a4ca.js";import"./haptic-ac164e4c.js";import"./capacitor-59395cbd.js";import"./index-a5d50daf.js";import"./index-39782642.js";import"./gesture-controller-314a54f6.js";import"./hardware-back-button-2e99752e.js";import"./framework-delegate-63d1a679.js";import"./index-9b0d46f4.js";var iosEnterAnimation=function(t){var e=createAnimation();var o=createAnimation();var n=createAnimation();o.addElement(t.querySelector("ion-backdrop")).fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]);n.addElement(t.querySelector(".action-sheet-wrapper")).fromTo("transform","translateY(100%)","translateY(0%)");return e.addElement(t).easing("cubic-bezier(.36,.66,.04,1)").duration(400).addAnimation([o,n])};var iosLeaveAnimation=function(t){var e=createAnimation();var o=createAnimation();var n=createAnimation();o.addElement(t.querySelector("ion-backdrop")).fromTo("opacity","var(--backdrop-opacity)",0);n.addElement(t.querySelector(".action-sheet-wrapper")).fromTo("transform","translateY(0%)","translateY(100%)");return e.addElement(t).easing("cubic-bezier(.36,.66,.04,1)").duration(450).addAnimation([o,n])};var mdEnterAnimation=function(t){var e=createAnimation();var o=createAnimation();var n=createAnimation();o.addElement(t.querySelector("ion-backdrop")).fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]);n.addElement(t.querySelector(".action-sheet-wrapper")).fromTo("transform","translateY(100%)","translateY(0%)");return e.addElement(t).easing("cubic-bezier(.36,.66,.04,1)").duration(400).addAnimation([o,n])};var mdLeaveAnimation=function(t){var e=createAnimation();var o=createAnimation();var n=createAnimation();o.addElement(t.querySelector("ion-backdrop")).fromTo("opacity","var(--backdrop-opacity)",0);n.addElement(t.querySelector(".action-sheet-wrapper")).fromTo("transform","translateY(0%)","translateY(100%)");return e.addElement(t).easing("cubic-bezier(.36,.66,.04,1)").duration(450).addAnimation([o,n])};var actionSheetIosCss='.sc-ion-action-sheet-ios-h{--color:initial;--button-color-activated:var(--button-color);--button-color-focused:var(--button-color);--button-color-hover:var(--button-color);--button-color-selected:var(--button-color);--min-width:auto;--width:100%;--max-width:500px;--min-height:auto;--height:auto;--max-height:calc(100% - (var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;right:0;top:0;bottom:0;display:block;position:fixed;outline:none;font-family:var(--ion-font-family, inherit);-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1001}.overlay-hidden.sc-ion-action-sheet-ios-h{display:none}.action-sheet-wrapper.sc-ion-action-sheet-ios{left:0;right:0;bottom:0;-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0);display:block;position:absolute;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);z-index:10;pointer-events:none}.action-sheet-button.sc-ion-action-sheet-ios{display:block;position:relative;width:100%;border:0;outline:none;background:var(--button-background);color:var(--button-color);font-family:inherit;overflow:hidden}.action-sheet-button.sc-ion-action-sheet-ios:disabled{color:var(--button-color-disabled);opacity:0.4}.action-sheet-button-inner.sc-ion-action-sheet-ios{display:-ms-flexbox;display:flex;position:relative;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;pointer-events:none;width:100%;height:100%;z-index:1}.action-sheet-container.sc-ion-action-sheet-ios{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:end;justify-content:flex-end;height:100%;max-height:calc(100vh - (var(--ion-safe-area-top, 0) + var(--ion-safe-area-bottom, 0)));max-height:calc(100dvh - (var(--ion-safe-area-top, 0) + var(--ion-safe-area-bottom, 0)))}.action-sheet-group.sc-ion-action-sheet-ios{-ms-flex-negative:2;flex-shrink:2;overscroll-behavior-y:contain;overflow-y:auto;-webkit-overflow-scrolling:touch;pointer-events:all;background:var(--background)}@media (any-pointer: coarse){.action-sheet-group.sc-ion-action-sheet-ios::-webkit-scrollbar{display:none}}.action-sheet-group-cancel.sc-ion-action-sheet-ios{-ms-flex-negative:0;flex-shrink:0;overflow:hidden}.action-sheet-button.sc-ion-action-sheet-ios::after{left:0;right:0;top:0;bottom:0;position:absolute;content:"";opacity:0}.action-sheet-selected.sc-ion-action-sheet-ios{color:var(--button-color-selected)}.action-sheet-selected.sc-ion-action-sheet-ios::after{background:var(--button-background-selected);opacity:var(--button-background-selected-opacity)}.action-sheet-button.ion-activated.sc-ion-action-sheet-ios{color:var(--button-color-activated)}.action-sheet-button.ion-activated.sc-ion-action-sheet-ios::after{background:var(--button-background-activated);opacity:var(--button-background-activated-opacity)}.action-sheet-button.ion-focused.sc-ion-action-sheet-ios{color:var(--button-color-focused)}.action-sheet-button.ion-focused.sc-ion-action-sheet-ios::after{background:var(--button-background-focused);opacity:var(--button-background-focused-opacity)}@media (any-hover: hover){.action-sheet-button.sc-ion-action-sheet-ios:not(:disabled):hover{color:var(--button-color-hover)}.action-sheet-button.sc-ion-action-sheet-ios:not(:disabled):hover::after{background:var(--button-background-hover);opacity:var(--button-background-hover-opacity)}}.sc-ion-action-sheet-ios-h{--background:var(--ion-overlay-background-color, var(--ion-color-step-100, var(--ion-background-color-step-100, #f9f9f9)));--backdrop-opacity:var(--ion-backdrop-opacity, 0.4);--button-background:linear-gradient(0deg, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08), rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08) 50%, transparent 50%) bottom/100% 1px no-repeat transparent;--button-background-activated:var(--ion-text-color, #000);--button-background-activated-opacity:.08;--button-background-hover:currentColor;--button-background-hover-opacity:.04;--button-background-focused:currentColor;--button-background-focused-opacity:.12;--button-background-selected:var(--ion-color-step-150, var(--ion-background-color-step-150, var(--ion-background-color, #fff)));--button-background-selected-opacity:1;--button-color:var(--ion-color-primary, #0054e9);--button-color-disabled:var(--ion-color-step-850, var(--ion-text-color-step-150, #262626));--color:var(--ion-color-step-400, var(--ion-text-color-step-600, #999999));text-align:center}.action-sheet-wrapper.sc-ion-action-sheet-ios{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:var(--ion-safe-area-top, 0);padding-bottom:var(--ion-safe-area-bottom, 0);-webkit-box-sizing:content-box;box-sizing:content-box}.action-sheet-container.sc-ion-action-sheet-ios{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:0;padding-bottom:0}.action-sheet-group.sc-ion-action-sheet-ios{border-radius:13px;margin-bottom:8px}.action-sheet-group.sc-ion-action-sheet-ios:first-child{margin-top:10px}.action-sheet-group.sc-ion-action-sheet-ios:last-child{margin-bottom:10px}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-group.sc-ion-action-sheet-ios{background-color:transparent;-webkit-backdrop-filter:saturate(280%) blur(20px);backdrop-filter:saturate(280%) blur(20px)}.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-title.sc-ion-action-sheet-ios,.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-button.sc-ion-action-sheet-ios{background-color:transparent;background-image:-webkit-gradient(linear, left bottom, left top, from(rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8)), to(rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8))), -webkit-gradient(linear, left bottom, left top, from(rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.4)), color-stop(50%, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.4)), color-stop(50%, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8)));background-image:linear-gradient(0deg, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8), rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8) 100%), linear-gradient(0deg, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.4), rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.4) 50%, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8) 50%);background-repeat:no-repeat;background-position:top, bottom;background-size:100% calc(100% - 1px), 100% 1px;-webkit-backdrop-filter:saturate(120%);backdrop-filter:saturate(120%)}.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-button.ion-activated.sc-ion-action-sheet-ios{background-color:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.7);background-image:none}.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-cancel.sc-ion-action-sheet-ios{background:var(--button-background-selected)}}.action-sheet-title.sc-ion-action-sheet-ios{background:-webkit-gradient(linear, left bottom, left top, from(rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08)), color-stop(50%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08)), color-stop(50%, transparent)) bottom/100% 1px no-repeat transparent;background:linear-gradient(0deg, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08), rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08) 50%, transparent 50%) bottom/100% 1px no-repeat transparent}.action-sheet-title.sc-ion-action-sheet-ios{-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:14px;padding-bottom:13px;color:var(--color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-size:max(13px, 0.8125rem);font-weight:400;text-align:center}.action-sheet-title.action-sheet-has-sub-title.sc-ion-action-sheet-ios{font-weight:600}.action-sheet-sub-title.sc-ion-action-sheet-ios{padding-left:0;padding-right:0;padding-top:6px;padding-bottom:0;font-size:max(13px, 0.8125rem);font-weight:400}.action-sheet-button.sc-ion-action-sheet-ios{-webkit-padding-start:14px;padding-inline-start:14px;-webkit-padding-end:14px;padding-inline-end:14px;padding-top:14px;padding-bottom:14px;min-height:56px;font-size:max(20px, 1.25rem);contain:content}.action-sheet-button.sc-ion-action-sheet-ios .action-sheet-icon.sc-ion-action-sheet-ios{-webkit-margin-end:0.3em;margin-inline-end:0.3em;font-size:max(28px, 1.75rem);pointer-events:none}.action-sheet-button.sc-ion-action-sheet-ios:last-child{background-image:none}.action-sheet-selected.sc-ion-action-sheet-ios{font-weight:bold}.action-sheet-cancel.sc-ion-action-sheet-ios{font-weight:600}.action-sheet-cancel.sc-ion-action-sheet-ios::after{background:var(--button-background-selected);opacity:var(--button-background-selected-opacity)}.action-sheet-destructive.sc-ion-action-sheet-ios,.action-sheet-destructive.ion-activated.sc-ion-action-sheet-ios,.action-sheet-destructive.ion-focused.sc-ion-action-sheet-ios{color:var(--ion-color-danger, #c5000f)}@media (any-hover: hover){.action-sheet-destructive.sc-ion-action-sheet-ios:hover{color:var(--ion-color-danger, #c5000f)}}';var IonActionSheetIosStyle0=actionSheetIosCss;var actionSheetMdCss='.sc-ion-action-sheet-md-h{--color:initial;--button-color-activated:var(--button-color);--button-color-focused:var(--button-color);--button-color-hover:var(--button-color);--button-color-selected:var(--button-color);--min-width:auto;--width:100%;--max-width:500px;--min-height:auto;--height:auto;--max-height:calc(100% - (var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;right:0;top:0;bottom:0;display:block;position:fixed;outline:none;font-family:var(--ion-font-family, inherit);-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1001}.overlay-hidden.sc-ion-action-sheet-md-h{display:none}.action-sheet-wrapper.sc-ion-action-sheet-md{left:0;right:0;bottom:0;-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0);display:block;position:absolute;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);z-index:10;pointer-events:none}.action-sheet-button.sc-ion-action-sheet-md{display:block;position:relative;width:100%;border:0;outline:none;background:var(--button-background);color:var(--button-color);font-family:inherit;overflow:hidden}.action-sheet-button.sc-ion-action-sheet-md:disabled{color:var(--button-color-disabled);opacity:0.4}.action-sheet-button-inner.sc-ion-action-sheet-md{display:-ms-flexbox;display:flex;position:relative;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;pointer-events:none;width:100%;height:100%;z-index:1}.action-sheet-container.sc-ion-action-sheet-md{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:end;justify-content:flex-end;height:100%;max-height:calc(100vh - (var(--ion-safe-area-top, 0) + var(--ion-safe-area-bottom, 0)));max-height:calc(100dvh - (var(--ion-safe-area-top, 0) + var(--ion-safe-area-bottom, 0)))}.action-sheet-group.sc-ion-action-sheet-md{-ms-flex-negative:2;flex-shrink:2;overscroll-behavior-y:contain;overflow-y:auto;-webkit-overflow-scrolling:touch;pointer-events:all;background:var(--background)}@media (any-pointer: coarse){.action-sheet-group.sc-ion-action-sheet-md::-webkit-scrollbar{display:none}}.action-sheet-group-cancel.sc-ion-action-sheet-md{-ms-flex-negative:0;flex-shrink:0;overflow:hidden}.action-sheet-button.sc-ion-action-sheet-md::after{left:0;right:0;top:0;bottom:0;position:absolute;content:"";opacity:0}.action-sheet-selected.sc-ion-action-sheet-md{color:var(--button-color-selected)}.action-sheet-selected.sc-ion-action-sheet-md::after{background:var(--button-background-selected);opacity:var(--button-background-selected-opacity)}.action-sheet-button.ion-activated.sc-ion-action-sheet-md{color:var(--button-color-activated)}.action-sheet-button.ion-activated.sc-ion-action-sheet-md::after{background:var(--button-background-activated);opacity:var(--button-background-activated-opacity)}.action-sheet-button.ion-focused.sc-ion-action-sheet-md{color:var(--button-color-focused)}.action-sheet-button.ion-focused.sc-ion-action-sheet-md::after{background:var(--button-background-focused);opacity:var(--button-background-focused-opacity)}@media (any-hover: hover){.action-sheet-button.sc-ion-action-sheet-md:not(:disabled):hover{color:var(--button-color-hover)}.action-sheet-button.sc-ion-action-sheet-md:not(:disabled):hover::after{background:var(--button-background-hover);opacity:var(--button-background-hover-opacity)}}.sc-ion-action-sheet-md-h{--background:var(--ion-overlay-background-color, var(--ion-background-color, #fff));--backdrop-opacity:var(--ion-backdrop-opacity, 0.32);--button-background:transparent;--button-background-selected:currentColor;--button-background-selected-opacity:0;--button-background-activated:transparent;--button-background-activated-opacity:0;--button-background-hover:currentColor;--button-background-hover-opacity:.04;--button-background-focused:currentColor;--button-background-focused-opacity:.12;--button-color:var(--ion-color-step-850, var(--ion-text-color-step-150, #262626));--button-color-disabled:var(--button-color);--color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.54)}.action-sheet-wrapper.sc-ion-action-sheet-md{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:var(--ion-safe-area-top, 0);margin-bottom:0}.action-sheet-title.sc-ion-action-sheet-md{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:20px;padding-bottom:17px;min-height:60px;color:var(--color, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.54));font-size:1rem;text-align:start}.action-sheet-sub-title.sc-ion-action-sheet-md{padding-left:0;padding-right:0;padding-top:16px;padding-bottom:0;font-size:0.875rem}.action-sheet-group.sc-ion-action-sheet-md:first-child{padding-top:0}.action-sheet-group.sc-ion-action-sheet-md:last-child{padding-bottom:var(--ion-safe-area-bottom)}.action-sheet-button.sc-ion-action-sheet-md{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:12px;padding-bottom:12px;position:relative;min-height:52px;font-size:1rem;text-align:start;contain:content;overflow:hidden}.action-sheet-icon.sc-ion-action-sheet-md{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:32px;margin-inline-end:32px;margin-top:0;margin-bottom:0;color:var(--color);font-size:1.5rem}.action-sheet-button-inner.sc-ion-action-sheet-md{-ms-flex-pack:start;justify-content:flex-start}.action-sheet-selected.sc-ion-action-sheet-md{font-weight:bold}';var IonActionSheetMdStyle0=actionSheetMdCss;var ActionSheet=function(){function t(t){var e=this;registerInstance(this,t);this.didPresent=createEvent(this,"ionActionSheetDidPresent",7);this.willPresent=createEvent(this,"ionActionSheetWillPresent",7);this.willDismiss=createEvent(this,"ionActionSheetWillDismiss",7);this.didDismiss=createEvent(this,"ionActionSheetDidDismiss",7);this.didPresentShorthand=createEvent(this,"didPresent",7);this.willPresentShorthand=createEvent(this,"willPresent",7);this.willDismissShorthand=createEvent(this,"willDismiss",7);this.didDismissShorthand=createEvent(this,"didDismiss",7);this.delegateController=createDelegateController(this);this.lockController=createLockController();this.triggerController=createTriggerController();this.presented=false;this.onBackdropTap=function(){e.dismiss(undefined,BACKDROP)};this.dispatchCancelHandler=function(t){var o=t.detail.role;if(isCancel(o)){var n=e.getButtons().find((function(t){return t.role==="cancel"}));e.callButtonHandler(n)}};this.overlayIndex=undefined;this.delegate=undefined;this.hasController=false;this.keyboardClose=true;this.enterAnimation=undefined;this.leaveAnimation=undefined;this.buttons=[];this.cssClass=undefined;this.backdropDismiss=true;this.header=undefined;this.subHeader=undefined;this.translucent=false;this.animated=true;this.htmlAttributes=undefined;this.isOpen=false;this.trigger=undefined}t.prototype.onIsOpenChange=function(t,e){if(t===true&&e===false){this.present()}else if(t===false&&e===true){this.dismiss()}};t.prototype.triggerChanged=function(){var t=this,e=t.trigger,o=t.el,n=t.triggerController;if(e){n.addClickListener(o,e)}};t.prototype.present=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:return[4,this.lockController.lock()];case 1:t=e.sent();return[4,this.delegateController.attachViewToDom()];case 2:e.sent();return[4,present(this,"actionSheetEnter",iosEnterAnimation,mdEnterAnimation)];case 3:e.sent();t();return[2]}}))}))};t.prototype.dismiss=function(t,e){return __awaiter(this,void 0,void 0,(function(){var o,n;return __generator(this,(function(i){switch(i.label){case 0:return[4,this.lockController.lock()];case 1:o=i.sent();return[4,dismiss(this,t,e,"actionSheetLeave",iosLeaveAnimation,mdLeaveAnimation)];case 2:n=i.sent();if(n){this.delegateController.removeViewFromDom()}o();return[2,n]}}))}))};t.prototype.onDidDismiss=function(){return eventMethod(this.el,"ionActionSheetDidDismiss")};t.prototype.onWillDismiss=function(){return eventMethod(this.el,"ionActionSheetWillDismiss")};t.prototype.buttonClick=function(t){return __awaiter(this,void 0,void 0,(function(){var e,o;return __generator(this,(function(n){switch(n.label){case 0:e=t.role;if(isCancel(e)){return[2,this.dismiss(t.data,e)]}return[4,this.callButtonHandler(t)];case 1:o=n.sent();if(o){return[2,this.dismiss(t.data,t.role)]}return[2,Promise.resolve()]}}))}))};t.prototype.callButtonHandler=function(t){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(o){switch(o.label){case 0:if(!t)return[3,2];return[4,safeCall(t.handler)];case 1:e=o.sent();if(e===false){return[2,false]}o.label=2;case 2:return[2,true]}}))}))};t.prototype.getButtons=function(){return this.buttons.map((function(t){return typeof t==="string"?{text:t}:t}))};t.prototype.connectedCallback=function(){prepareOverlay(this.el);this.triggerChanged()};t.prototype.disconnectedCallback=function(){if(this.gesture){this.gesture.destroy();this.gesture=undefined}this.triggerController.removeClickListener()};t.prototype.componentWillLoad=function(){var t;if(!((t=this.htmlAttributes)===null||t===void 0?void 0:t.id)){setOverlayId(this.el)}};t.prototype.componentDidLoad=function(){var t=this;var e=this,o=e.groupEl,n=e.wrapperEl;if(!this.gesture&&getIonMode(this)==="ios"&&n&&o){readTask((function(){var e=o.scrollHeight>o.clientHeight;if(!e){t.gesture=createButtonActiveGesture(n,(function(t){return t.classList.contains("action-sheet-button")}));t.gesture.enable(true)}}))}if(this.isOpen===true){raf((function(){return t.present()}))}this.triggerChanged()};t.prototype.render=function(){var t;var e=this;var o=this,n=o.header,i=o.htmlAttributes,a=o.overlayIndex;var r=getIonMode(this);var c=this.getButtons();var s=c.find((function(t){return t.role==="cancel"}));var d=c.filter((function(t){return t.role!=="cancel"}));var l="action-sheet-".concat(a,"-header");return h(Host,Object.assign({key:"7bbd202ca9e19727e7514abbe073687d982f80c3",role:"dialog","aria-modal":"true","aria-labelledby":n!==undefined?l:null,tabindex:"-1"},i,{style:{zIndex:"".concat(2e4+this.overlayIndex)},class:Object.assign(Object.assign((t={},t[r]=true,t),getClassMap(this.cssClass)),{"overlay-hidden":true,"action-sheet-translucent":this.translucent}),onIonActionSheetWillDismiss:this.dispatchCancelHandler,onIonBackdropTap:this.onBackdropTap}),h("ion-backdrop",{key:"23344a9221a2e6720d7b9de5249dc37256cafa7b",tappable:this.backdropDismiss}),h("div",{key:"d46361bb5cdc32a7922dcf76b566f358a6174bfa",tabindex:"0"}),h("div",{key:"136c3f2e77c8a2eac8e9ae4bb13d735e1d62598d",class:"action-sheet-wrapper ion-overlay-wrapper",ref:function(t){return e.wrapperEl=t}},h("div",{key:"6168ea8b2be42020b2edeb8ff3a0f3d1254be37a",class:"action-sheet-container"},h("div",{key:"29b9e6619dc54574733a704d6bf885839151bd84",class:"action-sheet-group",ref:function(t){return e.groupEl=t}},n!==undefined&&h("div",{key:"536ce764bfddb3816ea3512d90f4acef2ccb8589",id:l,class:{"action-sheet-title":true,"action-sheet-has-sub-title":this.subHeader!==undefined}},n,this.subHeader&&h("div",{key:"6d888219145824fd36cdfe0d3c8388bbf2769777",class:"action-sheet-sub-title"},this.subHeader)),d.map((function(t){return h("button",Object.assign({},t.htmlAttributes,{type:"button",id:t.id,class:buttonClass(t),onClick:function(){return e.buttonClick(t)},disabled:t.disabled}),h("span",{class:"action-sheet-button-inner"},t.icon&&h("ion-icon",{icon:t.icon,"aria-hidden":"true",lazy:false,class:"action-sheet-icon"}),t.text),r==="md"&&h("ion-ripple-effect",null))}))),s&&h("div",{key:"46f98f0ed5a9bdb3e35feb9ae71c4489c17b7d77",class:"action-sheet-group action-sheet-group-cancel"},h("button",Object.assign({key:"e3c457bced8ad5f692e48de26e65f731fd631b4f"},s.htmlAttributes,{type:"button",class:buttonClass(s),onClick:function(){return e.buttonClick(s)}}),h("span",{key:"4cba6dc559f734ecc852e024959210cd0dd25354",class:"action-sheet-button-inner"},s.icon&&h("ion-icon",{key:"9df64989aad1b4d1e75edf4d37ab208965cfe37f",icon:s.icon,"aria-hidden":"true",lazy:false,class:"action-sheet-icon"}),s.text),r==="md"&&h("ion-ripple-effect",{key:"558089275a29177cefdb2e38eefc9b5c8b62872b"}))))),h("div",{key:"fa4df6e043b00a6e4126dbc71cb344cfc2b2e7bc",tabindex:"0"}))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{isOpen:["onIsOpenChange"],trigger:["triggerChanged"]}},enumerable:false,configurable:true});return t}();var buttonClass=function(t){var e;return Object.assign((e={"action-sheet-button":true,"ion-activatable":!t.disabled,"ion-focusable":!t.disabled},e["action-sheet-".concat(t.role)]=t.role!==undefined,e),getClassMap(t.cssClass))};ActionSheet.style={ios:IonActionSheetIosStyle0,md:IonActionSheetMdStyle0};export{ActionSheet as ion_action_sheet};
|