@ionic/core 8.4.4-dev.11740658609.11c22eeb → 8.4.4-dev.11740669619.1b5165be
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/alert.js +4 -25
- package/dist/cjs/ion-alert.cjs.entry.js +4 -25
- package/dist/collection/components/alert/alert.js +4 -29
- package/dist/docs.json +1 -5
- package/dist/esm/ion-alert.entry.js +4 -25
- package/dist/esm-es5/ion-alert.entry.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-322c5fb4.system.js +1 -1
- package/dist/ionic/p-b0d8bbee.entry.js +4 -0
- package/dist/ionic/{p-2e4be620.system.entry.js → p-e456ee59.system.entry.js} +1 -1
- package/hydrate/index.js +4 -25
- package/hydrate/index.mjs +4 -25
- package/package.json +1 -1
- package/dist/ionic/p-360ced64.entry.js +0 -4
package/components/alert.js
CHANGED
|
@@ -167,7 +167,6 @@ const Alert = /*@__PURE__*/ proxyCustomElement(class Alert extends HTMLElement {
|
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
169
|
onKeydown(ev) {
|
|
170
|
-
var _a;
|
|
171
170
|
const inputTypes = new Set(this.processedInputs.map((i) => i.type));
|
|
172
171
|
/**
|
|
173
172
|
* Based on keyboard navigation requirements, the
|
|
@@ -177,17 +176,6 @@ const Alert = /*@__PURE__*/ proxyCustomElement(class Alert extends HTMLElement {
|
|
|
177
176
|
ev.preventDefault();
|
|
178
177
|
return;
|
|
179
178
|
}
|
|
180
|
-
/**
|
|
181
|
-
* Ensure when alert container is being focused, and the user presses the tab + shift keys, the focus will be set to the last alert button.
|
|
182
|
-
*/
|
|
183
|
-
if (ev.target.classList.contains('alert-wrapper')) {
|
|
184
|
-
if (ev.key === 'Tab' && ev.shiftKey) {
|
|
185
|
-
ev.preventDefault();
|
|
186
|
-
const lastChildBtn = (_a = this.wrapperEl) === null || _a === void 0 ? void 0 : _a.querySelector('.alert-button:last-child');
|
|
187
|
-
lastChildBtn.focus();
|
|
188
|
-
return;
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
179
|
// The only inputs we want to navigate between using arrow keys are the radios
|
|
192
180
|
// ignore the keydown event if it is not on a radio button
|
|
193
181
|
if (!inputTypes.has('radio') ||
|
|
@@ -319,16 +307,7 @@ const Alert = /*@__PURE__*/ proxyCustomElement(class Alert extends HTMLElement {
|
|
|
319
307
|
async present() {
|
|
320
308
|
const unlock = await this.lockController.lock();
|
|
321
309
|
await this.delegateController.attachViewToDom();
|
|
322
|
-
await present(this, 'alertEnter', iosEnterAnimation, mdEnterAnimation)
|
|
323
|
-
var _a, _b;
|
|
324
|
-
if (this.buttons.length === 1 && this.inputs.length === 0) {
|
|
325
|
-
const queryBtn = (_a = this.wrapperEl) === null || _a === void 0 ? void 0 : _a.querySelector('.alert-button');
|
|
326
|
-
queryBtn.focus();
|
|
327
|
-
}
|
|
328
|
-
else {
|
|
329
|
-
(_b = this.wrapperEl) === null || _b === void 0 ? void 0 : _b.focus();
|
|
330
|
-
}
|
|
331
|
-
});
|
|
310
|
+
await present(this, 'alertEnter', iosEnterAnimation, mdEnterAnimation);
|
|
332
311
|
unlock();
|
|
333
312
|
}
|
|
334
313
|
/**
|
|
@@ -502,8 +481,8 @@ const Alert = /*@__PURE__*/ proxyCustomElement(class Alert extends HTMLElement {
|
|
|
502
481
|
const { overlayIndex, header, subHeader, message, htmlAttributes } = this;
|
|
503
482
|
const mode = getIonMode(this);
|
|
504
483
|
const hdrId = `alert-${overlayIndex}-hdr`;
|
|
505
|
-
const msgId = `alert-${overlayIndex}-msg`;
|
|
506
484
|
const subHdrId = `alert-${overlayIndex}-sub-hdr`;
|
|
485
|
+
const msgId = `alert-${overlayIndex}-msg`;
|
|
507
486
|
const role = this.inputs.length > 0 || this.buttons.length > 0 ? 'alertdialog' : 'alert';
|
|
508
487
|
/**
|
|
509
488
|
* Use both the header and subHeader ids if they are defined.
|
|
@@ -512,9 +491,9 @@ const Alert = /*@__PURE__*/ proxyCustomElement(class Alert extends HTMLElement {
|
|
|
512
491
|
* If neither are defined, do not set aria-labelledby.
|
|
513
492
|
*/
|
|
514
493
|
const ariaLabelledBy = header && subHeader ? `${hdrId} ${subHdrId}` : header ? hdrId : subHeader ? subHdrId : null;
|
|
515
|
-
return (h(Host, { key: '
|
|
494
|
+
return (h(Host, Object.assign({ key: 'ad7e14b4f92a09387aa80abfb718a755e4e889d6', role: role, "aria-modal": "true", "aria-labelledby": ariaLabelledBy, "aria-describedby": message !== undefined ? msgId : null, tabindex: "-1" }, htmlAttributes, { style: {
|
|
516
495
|
zIndex: `${20000 + overlayIndex}`,
|
|
517
|
-
}, 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: '
|
|
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: '4b4693dca3c910aa9a61c4d90295d785ec6cbe3d', tappable: this.backdropDismiss }), h("div", { key: '64fd19b8f1d8246dcc869053f858bc33506def4b', tabindex: "0", "aria-hidden": "true" }), h("div", { key: 'e61ba6f339c3a02cecd37d8b641ee5043018eb29', class: "alert-wrapper ion-overlay-wrapper", ref: (el) => (this.wrapperEl = el) }, h("div", { key: '044e00667ffcb74aa2c5e0d0b42669c4004dbb4f', class: "alert-head" }, header && (h("h2", { key: '1aaae8d58722c4cf5debb1f00415ab7ed0a52bbd', id: hdrId, class: "alert-title" }, header)), subHeader && !header && (h("h2", { key: '9c9854dc3b0ad40f1861a49b76d5636afcae9c74', id: subHdrId, class: "alert-sub-title" }, subHeader)), subHeader && header && (h("h3", { key: '19aaca9912f77cde4ae8079be210eda697ed8de1', id: subHdrId, class: "alert-sub-title" }, subHeader))), this.renderAlertMessage(msgId), this.renderAlertInputs(), this.renderAlertButtons()), h("div", { key: 'a85d27c516f7cdbc85b19f40d2f0bd865490b6a7', tabindex: "0", "aria-hidden": "true" })));
|
|
518
497
|
}
|
|
519
498
|
get el() { return this; }
|
|
520
499
|
static get watchers() { return {
|
|
@@ -176,7 +176,6 @@ const Alert = class {
|
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
178
|
onKeydown(ev) {
|
|
179
|
-
var _a;
|
|
180
179
|
const inputTypes = new Set(this.processedInputs.map((i) => i.type));
|
|
181
180
|
/**
|
|
182
181
|
* Based on keyboard navigation requirements, the
|
|
@@ -186,17 +185,6 @@ const Alert = class {
|
|
|
186
185
|
ev.preventDefault();
|
|
187
186
|
return;
|
|
188
187
|
}
|
|
189
|
-
/**
|
|
190
|
-
* Ensure when alert container is being focused, and the user presses the tab + shift keys, the focus will be set to the last alert button.
|
|
191
|
-
*/
|
|
192
|
-
if (ev.target.classList.contains('alert-wrapper')) {
|
|
193
|
-
if (ev.key === 'Tab' && ev.shiftKey) {
|
|
194
|
-
ev.preventDefault();
|
|
195
|
-
const lastChildBtn = (_a = this.wrapperEl) === null || _a === void 0 ? void 0 : _a.querySelector('.alert-button:last-child');
|
|
196
|
-
lastChildBtn.focus();
|
|
197
|
-
return;
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
188
|
// The only inputs we want to navigate between using arrow keys are the radios
|
|
201
189
|
// ignore the keydown event if it is not on a radio button
|
|
202
190
|
if (!inputTypes.has('radio') ||
|
|
@@ -328,16 +316,7 @@ const Alert = class {
|
|
|
328
316
|
async present() {
|
|
329
317
|
const unlock = await this.lockController.lock();
|
|
330
318
|
await this.delegateController.attachViewToDom();
|
|
331
|
-
await overlays.present(this, 'alertEnter', iosEnterAnimation, mdEnterAnimation)
|
|
332
|
-
var _a, _b;
|
|
333
|
-
if (this.buttons.length === 1 && this.inputs.length === 0) {
|
|
334
|
-
const queryBtn = (_a = this.wrapperEl) === null || _a === void 0 ? void 0 : _a.querySelector('.alert-button');
|
|
335
|
-
queryBtn.focus();
|
|
336
|
-
}
|
|
337
|
-
else {
|
|
338
|
-
(_b = this.wrapperEl) === null || _b === void 0 ? void 0 : _b.focus();
|
|
339
|
-
}
|
|
340
|
-
});
|
|
319
|
+
await overlays.present(this, 'alertEnter', iosEnterAnimation, mdEnterAnimation);
|
|
341
320
|
unlock();
|
|
342
321
|
}
|
|
343
322
|
/**
|
|
@@ -511,8 +490,8 @@ const Alert = class {
|
|
|
511
490
|
const { overlayIndex, header, subHeader, message, htmlAttributes } = this;
|
|
512
491
|
const mode = ionicGlobal.getIonMode(this);
|
|
513
492
|
const hdrId = `alert-${overlayIndex}-hdr`;
|
|
514
|
-
const msgId = `alert-${overlayIndex}-msg`;
|
|
515
493
|
const subHdrId = `alert-${overlayIndex}-sub-hdr`;
|
|
494
|
+
const msgId = `alert-${overlayIndex}-msg`;
|
|
516
495
|
const role = this.inputs.length > 0 || this.buttons.length > 0 ? 'alertdialog' : 'alert';
|
|
517
496
|
/**
|
|
518
497
|
* Use both the header and subHeader ids if they are defined.
|
|
@@ -521,9 +500,9 @@ const Alert = class {
|
|
|
521
500
|
* If neither are defined, do not set aria-labelledby.
|
|
522
501
|
*/
|
|
523
502
|
const ariaLabelledBy = header && subHeader ? `${hdrId} ${subHdrId}` : header ? hdrId : subHeader ? subHdrId : null;
|
|
524
|
-
return (index.h(index.Host, { key: '
|
|
503
|
+
return (index.h(index.Host, Object.assign({ key: 'ad7e14b4f92a09387aa80abfb718a755e4e889d6', role: role, "aria-modal": "true", "aria-labelledby": ariaLabelledBy, "aria-describedby": message !== undefined ? msgId : null, tabindex: "-1" }, htmlAttributes, { style: {
|
|
525
504
|
zIndex: `${20000 + overlayIndex}`,
|
|
526
|
-
}, class: Object.assign(Object.assign({}, theme.getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'alert-translucent': this.translucent }), onIonAlertWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }, index.h("ion-backdrop", { key: '
|
|
505
|
+
}, class: Object.assign(Object.assign({}, theme.getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'alert-translucent': this.translucent }), onIonAlertWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }), index.h("ion-backdrop", { key: '4b4693dca3c910aa9a61c4d90295d785ec6cbe3d', tappable: this.backdropDismiss }), index.h("div", { key: '64fd19b8f1d8246dcc869053f858bc33506def4b', tabindex: "0", "aria-hidden": "true" }), index.h("div", { key: 'e61ba6f339c3a02cecd37d8b641ee5043018eb29', class: "alert-wrapper ion-overlay-wrapper", ref: (el) => (this.wrapperEl = el) }, index.h("div", { key: '044e00667ffcb74aa2c5e0d0b42669c4004dbb4f', class: "alert-head" }, header && (index.h("h2", { key: '1aaae8d58722c4cf5debb1f00415ab7ed0a52bbd', id: hdrId, class: "alert-title" }, header)), subHeader && !header && (index.h("h2", { key: '9c9854dc3b0ad40f1861a49b76d5636afcae9c74', id: subHdrId, class: "alert-sub-title" }, subHeader)), subHeader && header && (index.h("h3", { key: '19aaca9912f77cde4ae8079be210eda697ed8de1', id: subHdrId, class: "alert-sub-title" }, subHeader))), this.renderAlertMessage(msgId), this.renderAlertInputs(), this.renderAlertButtons()), index.h("div", { key: 'a85d27c516f7cdbc85b19f40d2f0bd865490b6a7', tabindex: "0", "aria-hidden": "true" })));
|
|
527
506
|
}
|
|
528
507
|
get el() { return index.getElement(this); }
|
|
529
508
|
static get watchers() { return {
|
|
@@ -72,7 +72,6 @@ export class Alert {
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
onKeydown(ev) {
|
|
75
|
-
var _a;
|
|
76
75
|
const inputTypes = new Set(this.processedInputs.map((i) => i.type));
|
|
77
76
|
/**
|
|
78
77
|
* Based on keyboard navigation requirements, the
|
|
@@ -82,17 +81,6 @@ export class Alert {
|
|
|
82
81
|
ev.preventDefault();
|
|
83
82
|
return;
|
|
84
83
|
}
|
|
85
|
-
/**
|
|
86
|
-
* Ensure when alert container is being focused, and the user presses the tab + shift keys, the focus will be set to the last alert button.
|
|
87
|
-
*/
|
|
88
|
-
if (ev.target.classList.contains('alert-wrapper')) {
|
|
89
|
-
if (ev.key === 'Tab' && ev.shiftKey) {
|
|
90
|
-
ev.preventDefault();
|
|
91
|
-
const lastChildBtn = (_a = this.wrapperEl) === null || _a === void 0 ? void 0 : _a.querySelector('.alert-button:last-child');
|
|
92
|
-
lastChildBtn.focus();
|
|
93
|
-
return;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
84
|
// The only inputs we want to navigate between using arrow keys are the radios
|
|
97
85
|
// ignore the keydown event if it is not on a radio button
|
|
98
86
|
if (!inputTypes.has('radio') ||
|
|
@@ -224,16 +212,7 @@ export class Alert {
|
|
|
224
212
|
async present() {
|
|
225
213
|
const unlock = await this.lockController.lock();
|
|
226
214
|
await this.delegateController.attachViewToDom();
|
|
227
|
-
await present(this, 'alertEnter', iosEnterAnimation, mdEnterAnimation)
|
|
228
|
-
var _a, _b;
|
|
229
|
-
if (this.buttons.length === 1 && this.inputs.length === 0) {
|
|
230
|
-
const queryBtn = (_a = this.wrapperEl) === null || _a === void 0 ? void 0 : _a.querySelector('.alert-button');
|
|
231
|
-
queryBtn.focus();
|
|
232
|
-
}
|
|
233
|
-
else {
|
|
234
|
-
(_b = this.wrapperEl) === null || _b === void 0 ? void 0 : _b.focus();
|
|
235
|
-
}
|
|
236
|
-
});
|
|
215
|
+
await present(this, 'alertEnter', iosEnterAnimation, mdEnterAnimation);
|
|
237
216
|
unlock();
|
|
238
217
|
}
|
|
239
218
|
/**
|
|
@@ -407,8 +386,8 @@ export class Alert {
|
|
|
407
386
|
const { overlayIndex, header, subHeader, message, htmlAttributes } = this;
|
|
408
387
|
const mode = getIonMode(this);
|
|
409
388
|
const hdrId = `alert-${overlayIndex}-hdr`;
|
|
410
|
-
const msgId = `alert-${overlayIndex}-msg`;
|
|
411
389
|
const subHdrId = `alert-${overlayIndex}-sub-hdr`;
|
|
390
|
+
const msgId = `alert-${overlayIndex}-msg`;
|
|
412
391
|
const role = this.inputs.length > 0 || this.buttons.length > 0 ? 'alertdialog' : 'alert';
|
|
413
392
|
/**
|
|
414
393
|
* Use both the header and subHeader ids if they are defined.
|
|
@@ -417,9 +396,9 @@ export class Alert {
|
|
|
417
396
|
* If neither are defined, do not set aria-labelledby.
|
|
418
397
|
*/
|
|
419
398
|
const ariaLabelledBy = header && subHeader ? `${hdrId} ${subHdrId}` : header ? hdrId : subHeader ? subHdrId : null;
|
|
420
|
-
return (h(Host, { key: '
|
|
399
|
+
return (h(Host, Object.assign({ key: 'ad7e14b4f92a09387aa80abfb718a755e4e889d6', role: role, "aria-modal": "true", "aria-labelledby": ariaLabelledBy, "aria-describedby": message !== undefined ? msgId : null, tabindex: "-1" }, htmlAttributes, { style: {
|
|
421
400
|
zIndex: `${20000 + overlayIndex}`,
|
|
422
|
-
}, 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: '
|
|
401
|
+
}, 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: '4b4693dca3c910aa9a61c4d90295d785ec6cbe3d', tappable: this.backdropDismiss }), h("div", { key: '64fd19b8f1d8246dcc869053f858bc33506def4b', tabindex: "0", "aria-hidden": "true" }), h("div", { key: 'e61ba6f339c3a02cecd37d8b641ee5043018eb29', class: "alert-wrapper ion-overlay-wrapper", ref: (el) => (this.wrapperEl = el) }, h("div", { key: '044e00667ffcb74aa2c5e0d0b42669c4004dbb4f', class: "alert-head" }, header && (h("h2", { key: '1aaae8d58722c4cf5debb1f00415ab7ed0a52bbd', id: hdrId, class: "alert-title" }, header)), subHeader && !header && (h("h2", { key: '9c9854dc3b0ad40f1861a49b76d5636afcae9c74', id: subHdrId, class: "alert-sub-title" }, subHeader)), subHeader && header && (h("h3", { key: '19aaca9912f77cde4ae8079be210eda697ed8de1', id: subHdrId, class: "alert-sub-title" }, subHeader))), this.renderAlertMessage(msgId), this.renderAlertInputs(), this.renderAlertButtons()), h("div", { key: 'a85d27c516f7cdbc85b19f40d2f0bd865490b6a7', tabindex: "0", "aria-hidden": "true" })));
|
|
423
402
|
}
|
|
424
403
|
static get is() { return "ion-alert"; }
|
|
425
404
|
static get encapsulation() { return "scoped"; }
|
|
@@ -943,10 +922,6 @@ export class Alert {
|
|
|
943
922
|
"Promise": {
|
|
944
923
|
"location": "global",
|
|
945
924
|
"id": "global::Promise"
|
|
946
|
-
},
|
|
947
|
-
"HTMLButtonElement": {
|
|
948
|
-
"location": "global",
|
|
949
|
-
"id": "global::HTMLButtonElement"
|
|
950
925
|
}
|
|
951
926
|
},
|
|
952
927
|
"return": "Promise<void>"
|
package/dist/docs.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2025-02-
|
|
2
|
+
"timestamp": "2025-02-27T15:22:15",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.20.0",
|
|
@@ -1921,10 +1921,6 @@
|
|
|
1921
1921
|
"Promise": {
|
|
1922
1922
|
"location": "global",
|
|
1923
1923
|
"id": "global::Promise"
|
|
1924
|
-
},
|
|
1925
|
-
"HTMLButtonElement": {
|
|
1926
|
-
"location": "global",
|
|
1927
|
-
"id": "global::HTMLButtonElement"
|
|
1928
1924
|
}
|
|
1929
1925
|
},
|
|
1930
1926
|
"return": "Promise<void>"
|
|
@@ -172,7 +172,6 @@ const Alert = class {
|
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
174
|
onKeydown(ev) {
|
|
175
|
-
var _a;
|
|
176
175
|
const inputTypes = new Set(this.processedInputs.map((i) => i.type));
|
|
177
176
|
/**
|
|
178
177
|
* Based on keyboard navigation requirements, the
|
|
@@ -182,17 +181,6 @@ const Alert = class {
|
|
|
182
181
|
ev.preventDefault();
|
|
183
182
|
return;
|
|
184
183
|
}
|
|
185
|
-
/**
|
|
186
|
-
* Ensure when alert container is being focused, and the user presses the tab + shift keys, the focus will be set to the last alert button.
|
|
187
|
-
*/
|
|
188
|
-
if (ev.target.classList.contains('alert-wrapper')) {
|
|
189
|
-
if (ev.key === 'Tab' && ev.shiftKey) {
|
|
190
|
-
ev.preventDefault();
|
|
191
|
-
const lastChildBtn = (_a = this.wrapperEl) === null || _a === void 0 ? void 0 : _a.querySelector('.alert-button:last-child');
|
|
192
|
-
lastChildBtn.focus();
|
|
193
|
-
return;
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
184
|
// The only inputs we want to navigate between using arrow keys are the radios
|
|
197
185
|
// ignore the keydown event if it is not on a radio button
|
|
198
186
|
if (!inputTypes.has('radio') ||
|
|
@@ -324,16 +312,7 @@ const Alert = class {
|
|
|
324
312
|
async present() {
|
|
325
313
|
const unlock = await this.lockController.lock();
|
|
326
314
|
await this.delegateController.attachViewToDom();
|
|
327
|
-
await present(this, 'alertEnter', iosEnterAnimation, mdEnterAnimation)
|
|
328
|
-
var _a, _b;
|
|
329
|
-
if (this.buttons.length === 1 && this.inputs.length === 0) {
|
|
330
|
-
const queryBtn = (_a = this.wrapperEl) === null || _a === void 0 ? void 0 : _a.querySelector('.alert-button');
|
|
331
|
-
queryBtn.focus();
|
|
332
|
-
}
|
|
333
|
-
else {
|
|
334
|
-
(_b = this.wrapperEl) === null || _b === void 0 ? void 0 : _b.focus();
|
|
335
|
-
}
|
|
336
|
-
});
|
|
315
|
+
await present(this, 'alertEnter', iosEnterAnimation, mdEnterAnimation);
|
|
337
316
|
unlock();
|
|
338
317
|
}
|
|
339
318
|
/**
|
|
@@ -507,8 +486,8 @@ const Alert = class {
|
|
|
507
486
|
const { overlayIndex, header, subHeader, message, htmlAttributes } = this;
|
|
508
487
|
const mode = getIonMode(this);
|
|
509
488
|
const hdrId = `alert-${overlayIndex}-hdr`;
|
|
510
|
-
const msgId = `alert-${overlayIndex}-msg`;
|
|
511
489
|
const subHdrId = `alert-${overlayIndex}-sub-hdr`;
|
|
490
|
+
const msgId = `alert-${overlayIndex}-msg`;
|
|
512
491
|
const role = this.inputs.length > 0 || this.buttons.length > 0 ? 'alertdialog' : 'alert';
|
|
513
492
|
/**
|
|
514
493
|
* Use both the header and subHeader ids if they are defined.
|
|
@@ -517,9 +496,9 @@ const Alert = class {
|
|
|
517
496
|
* If neither are defined, do not set aria-labelledby.
|
|
518
497
|
*/
|
|
519
498
|
const ariaLabelledBy = header && subHeader ? `${hdrId} ${subHdrId}` : header ? hdrId : subHeader ? subHdrId : null;
|
|
520
|
-
return (h(Host, { key: '
|
|
499
|
+
return (h(Host, Object.assign({ key: 'ad7e14b4f92a09387aa80abfb718a755e4e889d6', role: role, "aria-modal": "true", "aria-labelledby": ariaLabelledBy, "aria-describedby": message !== undefined ? msgId : null, tabindex: "-1" }, htmlAttributes, { style: {
|
|
521
500
|
zIndex: `${20000 + overlayIndex}`,
|
|
522
|
-
}, 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: '
|
|
501
|
+
}, 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: '4b4693dca3c910aa9a61c4d90295d785ec6cbe3d', tappable: this.backdropDismiss }), h("div", { key: '64fd19b8f1d8246dcc869053f858bc33506def4b', tabindex: "0", "aria-hidden": "true" }), h("div", { key: 'e61ba6f339c3a02cecd37d8b641ee5043018eb29', class: "alert-wrapper ion-overlay-wrapper", ref: (el) => (this.wrapperEl = el) }, h("div", { key: '044e00667ffcb74aa2c5e0d0b42669c4004dbb4f', class: "alert-head" }, header && (h("h2", { key: '1aaae8d58722c4cf5debb1f00415ab7ed0a52bbd', id: hdrId, class: "alert-title" }, header)), subHeader && !header && (h("h2", { key: '9c9854dc3b0ad40f1861a49b76d5636afcae9c74', id: subHdrId, class: "alert-sub-title" }, subHeader)), subHeader && header && (h("h3", { key: '19aaca9912f77cde4ae8079be210eda697ed8de1', id: subHdrId, class: "alert-sub-title" }, subHeader))), this.renderAlertMessage(msgId), this.renderAlertInputs(), this.renderAlertButtons()), h("div", { key: 'a85d27c516f7cdbc85b19f40d2f0bd865490b6a7', tabindex: "0", "aria-hidden": "true" })));
|
|
523
502
|
}
|
|
524
503
|
get el() { return getElement(this); }
|
|
525
504
|
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,j as forceUpdate,h,f as Host,i as getElement}from"./index-28849c61.js";import{E as ENABLE_HTML_CONTENT_DEFAULT,a as sanitizeDOMString}from"./config-49c88215.js";import{c as createButtonActiveGesture}from"./button-active-f6503382.js";import{r as raf}from"./helpers-9b49d7d2.js";import{c as createLockController}from"./lock-controller-316928be.js";import{d as createDelegateController,e as createTriggerController,B as BACKDROP,i as isCancel,j as prepareOverlay,k as setOverlayId,f as present,g as dismiss,h as eventMethod,s as safeCall}from"./overlays-e3d0d356.js";import{g as getClassMap}from"./theme-01f3f29c.js";import{c as config,b as getIonMode}from"./ionic-global-c81d82ab.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-06ef3c3e.js";import"./framework-delegate-f683816e.js";import"./index-9b0d46f4.js";var iosEnterAnimation=function(t){var e=createAnimation();var r=createAnimation();var i=createAnimation();r.addElement(t.querySelector("ion-backdrop")).fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]);i.addElement(t.querySelector(".alert-wrapper")).keyframes([{offset:0,opacity:"0.01",transform:"scale(1.1)"},{offset:1,opacity:"1",transform:"scale(1)"}]);return e.addElement(t).easing("ease-in-out").duration(200).addAnimation([r,i])};var iosLeaveAnimation=function(t){var e=createAnimation();var r=createAnimation();var i=createAnimation();r.addElement(t.querySelector("ion-backdrop")).fromTo("opacity","var(--backdrop-opacity)",0);i.addElement(t.querySelector(".alert-wrapper")).keyframes([{offset:0,opacity:.99,transform:"scale(1)"},{offset:1,opacity:0,transform:"scale(0.9)"}]);return e.addElement(t).easing("ease-in-out").duration(200).addAnimation([r,i])};var mdEnterAnimation=function(t){var e=createAnimation();var r=createAnimation();var i=createAnimation();r.addElement(t.querySelector("ion-backdrop")).fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]);i.addElement(t.querySelector(".alert-wrapper")).keyframes([{offset:0,opacity:"0.01",transform:"scale(0.9)"},{offset:1,opacity:"1",transform:"scale(1)"}]);return e.addElement(t).easing("ease-in-out").duration(150).addAnimation([r,i])};var mdLeaveAnimation=function(t){var e=createAnimation();var r=createAnimation();var i=createAnimation();r.addElement(t.querySelector("ion-backdrop")).fromTo("opacity","var(--backdrop-opacity)",0);i.addElement(t.querySelector(".alert-wrapper")).fromTo("opacity",.99,0);return e.addElement(t).easing("ease-in-out").duration(150).addAnimation([r,i])};var alertIosCss=".sc-ion-alert-ios-h{--min-width:250px;--width:auto;--min-height:auto;--height:auto;--max-height:90%;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;font-family:var(--ion-font-family, inherit);contain:strict;-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-alert-ios-h{display:none}.alert-top.sc-ion-alert-ios-h{padding-top:50px;-ms-flex-align:start;align-items:flex-start}.alert-wrapper.sc-ion-alert-ios{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;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);background:var(--background);contain:content;opacity:0;z-index:10}.alert-title.sc-ion-alert-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}.alert-sub-title.sc-ion-alert-ios{margin-left:0;margin-right:0;margin-top:5px;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;font-weight:normal}.alert-message.sc-ion-alert-ios,.alert-input-group.sc-ion-alert-ios{-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-overflow-scrolling:touch;overflow-y:auto;overscroll-behavior-y:contain}.alert-checkbox-label.sc-ion-alert-ios,.alert-radio-label.sc-ion-alert-ios{overflow-wrap:anywhere}@media (any-pointer: coarse){.alert-checkbox-group.sc-ion-alert-ios::-webkit-scrollbar,.alert-radio-group.sc-ion-alert-ios::-webkit-scrollbar,.alert-message.sc-ion-alert-ios::-webkit-scrollbar{display:none}}.alert-input.sc-ion-alert-ios{padding-left:0;padding-right:0;padding-top:10px;padding-bottom:10px;width:100%;border:0;background:inherit;font:inherit;-webkit-box-sizing:border-box;box-sizing:border-box}.alert-button-group.sc-ion-alert-ios{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;width:100%}.alert-button-group-vertical.sc-ion-alert-ios{-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.alert-button.sc-ion-alert-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;border:0;font-size:0.875rem;line-height:1.25rem;z-index:0}.alert-button.ion-focused.sc-ion-alert-ios,.alert-tappable.ion-focused.sc-ion-alert-ios{background:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6))}.alert-button-inner.sc-ion-alert-ios{display:-ms-flexbox;display:flex;-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;width:100%;height:100%;min-height:inherit}.alert-input-disabled.sc-ion-alert-ios,.alert-checkbox-button-disabled.sc-ion-alert-ios .alert-button-inner.sc-ion-alert-ios,.alert-radio-button-disabled.sc-ion-alert-ios .alert-button-inner.sc-ion-alert-ios{cursor:default;opacity:0.5;pointer-events:none}.alert-tappable.sc-ion-alert-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;display:-ms-flexbox;display:flex;width:100%;border:0;background:transparent;font-size:inherit;line-height:initial;text-align:start;-webkit-appearance:none;-moz-appearance:none;appearance:none;contain:content}.alert-button.sc-ion-alert-ios,.alert-checkbox.sc-ion-alert-ios,.alert-input.sc-ion-alert-ios,.alert-radio.sc-ion-alert-ios{outline:none}.alert-radio-icon.sc-ion-alert-ios,.alert-checkbox-icon.sc-ion-alert-ios,.alert-checkbox-inner.sc-ion-alert-ios{-webkit-box-sizing:border-box;box-sizing:border-box}textarea.alert-input.sc-ion-alert-ios{min-height:37px;resize:none}.sc-ion-alert-ios-h{--background:var(--ion-overlay-background-color, var(--ion-color-step-100, var(--ion-background-color-step-100, #f9f9f9)));--max-width:clamp(270px, 16.875rem, 324px);--backdrop-opacity:var(--ion-backdrop-opacity, 0.3);font-size:max(14px, 0.875rem)}.alert-wrapper.sc-ion-alert-ios{border-radius:13px;-webkit-box-shadow:none;box-shadow:none;overflow:hidden}.alert-button.sc-ion-alert-ios .alert-button-inner.sc-ion-alert-ios{pointer-events:none}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){.alert-translucent.sc-ion-alert-ios-h .alert-wrapper.sc-ion-alert-ios{background:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.9);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}}.alert-head.sc-ion-alert-ios{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:12px;padding-bottom:7px;text-align:center}.alert-title.sc-ion-alert-ios{margin-top:8px;color:var(--ion-text-color, #000);font-size:max(17px, 1.0625rem);font-weight:600}.alert-sub-title.sc-ion-alert-ios{color:var(--ion-color-step-600, var(--ion-text-color-step-400, #666666));font-size:max(14px, 0.875rem)}.alert-message.sc-ion-alert-ios,.alert-input-group.sc-ion-alert-ios{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:0;padding-bottom:21px;color:var(--ion-text-color, #000);font-size:max(13px, 0.8125rem);text-align:center}.alert-message.sc-ion-alert-ios{max-height:240px}.alert-message.sc-ion-alert-ios:empty{padding-left:0;padding-right:0;padding-top:0;padding-bottom:12px}.alert-input.sc-ion-alert-ios{border-radius:7px;margin-top:10px;-webkit-padding-start:7px;padding-inline-start:7px;-webkit-padding-end:7px;padding-inline-end:7px;padding-top:7px;padding-bottom:7px;border:0.55px solid var(--ion-color-step-250, var(--ion-background-color-step-250, #bfbfbf));background-color:var(--ion-background-color, #fff);-webkit-appearance:none;-moz-appearance:none;appearance:none;font-size:1rem}.alert-input.sc-ion-alert-ios::-webkit-input-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-ios::-moz-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-ios:-ms-input-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-ios::-ms-input-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-ios::placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-ios::-ms-clear{display:none}.alert-input.sc-ion-alert-ios::-webkit-date-and-time-value{height:18px}.alert-radio-group.sc-ion-alert-ios,.alert-checkbox-group.sc-ion-alert-ios{-ms-scroll-chaining:none;overscroll-behavior:contain;max-height:240px;border-top:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2);overflow-y:auto;-webkit-overflow-scrolling:touch}.alert-tappable.sc-ion-alert-ios{min-height:44px}.alert-radio-label.sc-ion-alert-ios{-webkit-padding-start:13px;padding-inline-start:13px;-webkit-padding-end:13px;padding-inline-end:13px;padding-top:13px;padding-bottom:13px;-ms-flex:1;flex:1;-ms-flex-order:0;order:0;color:var(--ion-text-color, #000)}[aria-checked=true].sc-ion-alert-ios .alert-radio-label.sc-ion-alert-ios{color:var(--ion-color-primary, #0054e9)}.alert-radio-icon.sc-ion-alert-ios{position:relative;-ms-flex-order:1;order:1;min-width:30px}[aria-checked=true].sc-ion-alert-ios .alert-radio-inner.sc-ion-alert-ios{top:-7px;position:absolute;width:6px;height:12px;-webkit-transform:rotate(45deg);transform:rotate(45deg);border-width:2px;border-top-width:0;border-left-width:0;border-style:solid;border-color:var(--ion-color-primary, #0054e9)}[aria-checked=true].sc-ion-alert-ios .alert-radio-inner.sc-ion-alert-ios{inset-inline-start:7px}.alert-checkbox-label.sc-ion-alert-ios{-webkit-padding-start:13px;padding-inline-start:13px;-webkit-padding-end:13px;padding-inline-end:13px;padding-top:13px;padding-bottom:13px;-ms-flex:1;flex:1;color:var(--ion-text-color, #000)}.alert-checkbox-icon.sc-ion-alert-ios{border-radius:50%;-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:6px;margin-inline-end:6px;margin-top:10px;margin-bottom:10px;position:relative;width:min(1.375rem, 55.836px);height:min(1.375rem, 55.836px);border-width:0.125rem;border-style:solid;border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-250, var(--ion-background-color-step-250, #c8c7cc))));background-color:var(--ion-item-background, var(--ion-background-color, #fff));contain:strict}[aria-checked=true].sc-ion-alert-ios .alert-checkbox-icon.sc-ion-alert-ios{border-color:var(--ion-color-primary, #0054e9);background-color:var(--ion-color-primary, #0054e9)}[aria-checked=true].sc-ion-alert-ios .alert-checkbox-inner.sc-ion-alert-ios{top:calc(min(1.375rem, 55.836px) / 8);position:absolute;width:calc(min(1.375rem, 55.836px) / 6 + 1px);height:calc(min(1.375rem, 55.836px) * 0.5);-webkit-transform:rotate(45deg);transform:rotate(45deg);border-width:0.125rem;border-top-width:0;border-left-width:0;border-style:solid;border-color:var(--ion-background-color, #fff)}[aria-checked=true].sc-ion-alert-ios .alert-checkbox-inner.sc-ion-alert-ios{inset-inline-start:calc(min(1.375rem, 55.836px) / 3)}.alert-button-group.sc-ion-alert-ios{-webkit-margin-end:-0.55px;margin-inline-end:-0.55px;-ms-flex-wrap:wrap;flex-wrap:wrap}.alert-button-group-vertical.sc-ion-alert-ios .alert-button.sc-ion-alert-ios{border-right:none}[dir=rtl].sc-ion-alert-ios-h .alert-button-group-vertical.sc-ion-alert-ios .alert-button.sc-ion-alert-ios:last-child,[dir=rtl] .sc-ion-alert-ios-h .alert-button-group-vertical.sc-ion-alert-ios .alert-button.sc-ion-alert-ios:last-child{border-right:none}[dir=rtl].sc-ion-alert-ios .alert-button-group-vertical.sc-ion-alert-ios .alert-button.sc-ion-alert-ios:last-child{border-right:none}@supports selector(:dir(rtl)){.alert-button-group-vertical.sc-ion-alert-ios .alert-button.sc-ion-alert-ios:last-child:dir(rtl){border-right:none}}.alert-button.sc-ion-alert-ios{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;border-radius:0;-ms-flex:1 1 auto;flex:1 1 auto;min-width:50%;height:max(44px, 2.75rem);border-top:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2);border-right:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2);background-color:transparent;color:var(--ion-color-primary, #0054e9);font-size:max(17px, 1.0625rem);overflow:hidden}[dir=rtl].sc-ion-alert-ios-h .alert-button.sc-ion-alert-ios:first-child,[dir=rtl] .sc-ion-alert-ios-h .alert-button.sc-ion-alert-ios:first-child{border-right:0}[dir=rtl].sc-ion-alert-ios .alert-button.sc-ion-alert-ios:first-child{border-right:0}@supports selector(:dir(rtl)){.alert-button.sc-ion-alert-ios:first-child:dir(rtl){border-right:0}}.alert-button.sc-ion-alert-ios:last-child{border-right:0;font-weight:bold}[dir=rtl].sc-ion-alert-ios-h .alert-button.sc-ion-alert-ios:last-child,[dir=rtl] .sc-ion-alert-ios-h .alert-button.sc-ion-alert-ios:last-child{border-right:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2)}[dir=rtl].sc-ion-alert-ios .alert-button.sc-ion-alert-ios:last-child{border-right:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2)}@supports selector(:dir(rtl)){.alert-button.sc-ion-alert-ios:last-child:dir(rtl){border-right:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2)}}.alert-button.ion-activated.sc-ion-alert-ios{background-color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.1)}.alert-button-role-destructive.sc-ion-alert-ios,.alert-button-role-destructive.ion-activated.sc-ion-alert-ios,.alert-button-role-destructive.ion-focused.sc-ion-alert-ios{color:var(--ion-color-danger, #c5000f)}";var IonAlertIosStyle0=alertIosCss;var alertMdCss=".sc-ion-alert-md-h{--min-width:250px;--width:auto;--min-height:auto;--height:auto;--max-height:90%;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;font-family:var(--ion-font-family, inherit);contain:strict;-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-alert-md-h{display:none}.alert-top.sc-ion-alert-md-h{padding-top:50px;-ms-flex-align:start;align-items:flex-start}.alert-wrapper.sc-ion-alert-md{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;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);background:var(--background);contain:content;opacity:0;z-index:10}.alert-title.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}.alert-sub-title.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:5px;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;font-weight:normal}.alert-message.sc-ion-alert-md,.alert-input-group.sc-ion-alert-md{-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-overflow-scrolling:touch;overflow-y:auto;overscroll-behavior-y:contain}.alert-checkbox-label.sc-ion-alert-md,.alert-radio-label.sc-ion-alert-md{overflow-wrap:anywhere}@media (any-pointer: coarse){.alert-checkbox-group.sc-ion-alert-md::-webkit-scrollbar,.alert-radio-group.sc-ion-alert-md::-webkit-scrollbar,.alert-message.sc-ion-alert-md::-webkit-scrollbar{display:none}}.alert-input.sc-ion-alert-md{padding-left:0;padding-right:0;padding-top:10px;padding-bottom:10px;width:100%;border:0;background:inherit;font:inherit;-webkit-box-sizing:border-box;box-sizing:border-box}.alert-button-group.sc-ion-alert-md{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;width:100%}.alert-button-group-vertical.sc-ion-alert-md{-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.alert-button.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;border:0;font-size:0.875rem;line-height:1.25rem;z-index:0}.alert-button.ion-focused.sc-ion-alert-md,.alert-tappable.ion-focused.sc-ion-alert-md{background:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6))}.alert-button-inner.sc-ion-alert-md{display:-ms-flexbox;display:flex;-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;width:100%;height:100%;min-height:inherit}.alert-input-disabled.sc-ion-alert-md,.alert-checkbox-button-disabled.sc-ion-alert-md .alert-button-inner.sc-ion-alert-md,.alert-radio-button-disabled.sc-ion-alert-md .alert-button-inner.sc-ion-alert-md{cursor:default;opacity:0.5;pointer-events:none}.alert-tappable.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;display:-ms-flexbox;display:flex;width:100%;border:0;background:transparent;font-size:inherit;line-height:initial;text-align:start;-webkit-appearance:none;-moz-appearance:none;appearance:none;contain:content}.alert-button.sc-ion-alert-md,.alert-checkbox.sc-ion-alert-md,.alert-input.sc-ion-alert-md,.alert-radio.sc-ion-alert-md{outline:none}.alert-radio-icon.sc-ion-alert-md,.alert-checkbox-icon.sc-ion-alert-md,.alert-checkbox-inner.sc-ion-alert-md{-webkit-box-sizing:border-box;box-sizing:border-box}textarea.alert-input.sc-ion-alert-md{min-height:37px;resize:none}.sc-ion-alert-md-h{--background:var(--ion-overlay-background-color, var(--ion-background-color, #fff));--max-width:280px;--backdrop-opacity:var(--ion-backdrop-opacity, 0.32);font-size:0.875rem}.alert-wrapper.sc-ion-alert-md{border-radius:4px;-webkit-box-shadow:0 11px 15px -7px rgba(0, 0, 0, 0.2), 0 24px 38px 3px rgba(0, 0, 0, 0.14), 0 9px 46px 8px rgba(0, 0, 0, 0.12);box-shadow:0 11px 15px -7px rgba(0, 0, 0, 0.2), 0 24px 38px 3px rgba(0, 0, 0, 0.14), 0 9px 46px 8px rgba(0, 0, 0, 0.12)}.alert-head.sc-ion-alert-md{-webkit-padding-start:23px;padding-inline-start:23px;-webkit-padding-end:23px;padding-inline-end:23px;padding-top:20px;padding-bottom:15px;text-align:start}.alert-title.sc-ion-alert-md{color:var(--ion-text-color, #000);font-size:1.25rem;font-weight:500}.alert-sub-title.sc-ion-alert-md{color:var(--ion-text-color, #000);font-size:1rem}.alert-message.sc-ion-alert-md,.alert-input-group.sc-ion-alert-md{-webkit-padding-start:24px;padding-inline-start:24px;-webkit-padding-end:24px;padding-inline-end:24px;padding-top:20px;padding-bottom:20px;color:var(--ion-color-step-550, var(--ion-text-color-step-450, #737373))}.alert-message.sc-ion-alert-md{font-size:1rem}@media screen and (max-width: 767px){.alert-message.sc-ion-alert-md{max-height:266px}}.alert-message.sc-ion-alert-md:empty{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}.alert-head.sc-ion-alert-md+.alert-message.sc-ion-alert-md{padding-top:0}.alert-input.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:5px;margin-bottom:5px;border-bottom:1px solid var(--ion-color-step-150, var(--ion-background-color-step-150, #d9d9d9));color:var(--ion-text-color, #000)}.alert-input.sc-ion-alert-md::-webkit-input-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-md::-moz-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-md:-ms-input-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-md::-ms-input-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-md::placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-md::-ms-clear{display:none}.alert-input.sc-ion-alert-md:focus{margin-bottom:4px;border-bottom:2px solid var(--ion-color-primary, #0054e9)}.alert-radio-group.sc-ion-alert-md,.alert-checkbox-group.sc-ion-alert-md{position:relative;border-top:1px solid var(--ion-color-step-150, var(--ion-background-color-step-150, #d9d9d9));border-bottom:1px solid var(--ion-color-step-150, var(--ion-background-color-step-150, #d9d9d9));overflow:auto}@media screen and (max-width: 767px){.alert-radio-group.sc-ion-alert-md,.alert-checkbox-group.sc-ion-alert-md{max-height:266px}}.alert-tappable.sc-ion-alert-md{position:relative;min-height:48px}.alert-radio-label.sc-ion-alert-md{-webkit-padding-start:52px;padding-inline-start:52px;-webkit-padding-end:26px;padding-inline-end:26px;padding-top:13px;padding-bottom:13px;-ms-flex:1;flex:1;color:var(--ion-color-step-850, var(--ion-text-color-step-150, #262626));font-size:1rem}.alert-radio-icon.sc-ion-alert-md{top:0;border-radius:50%;display:block;position:relative;width:20px;height:20px;border-width:2px;border-style:solid;border-color:var(--ion-color-step-550, var(--ion-background-color-step-550, #737373))}.alert-radio-icon.sc-ion-alert-md{inset-inline-start:26px}.alert-radio-inner.sc-ion-alert-md{top:3px;border-radius:50%;position:absolute;width:10px;height:10px;-webkit-transform:scale3d(0, 0, 0);transform:scale3d(0, 0, 0);-webkit-transition:-webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);background-color:var(--ion-color-primary, #0054e9)}.alert-radio-inner.sc-ion-alert-md{inset-inline-start:3px}[aria-checked=true].sc-ion-alert-md .alert-radio-label.sc-ion-alert-md{color:var(--ion-color-step-850, var(--ion-text-color-step-150, #262626))}[aria-checked=true].sc-ion-alert-md .alert-radio-icon.sc-ion-alert-md{border-color:var(--ion-color-primary, #0054e9)}[aria-checked=true].sc-ion-alert-md .alert-radio-inner.sc-ion-alert-md{-webkit-transform:scale3d(1, 1, 1);transform:scale3d(1, 1, 1)}.alert-checkbox-label.sc-ion-alert-md{-webkit-padding-start:53px;padding-inline-start:53px;-webkit-padding-end:26px;padding-inline-end:26px;padding-top:13px;padding-bottom:13px;-ms-flex:1;flex:1;width:calc(100% - 53px);color:var(--ion-color-step-850, var(--ion-text-color-step-150, #262626));font-size:1rem}.alert-checkbox-icon.sc-ion-alert-md{top:0;border-radius:2px;position:relative;width:16px;height:16px;border-width:2px;border-style:solid;border-color:var(--ion-color-step-550, var(--ion-background-color-step-550, #737373));contain:strict}.alert-checkbox-icon.sc-ion-alert-md{inset-inline-start:26px}[aria-checked=true].sc-ion-alert-md .alert-checkbox-icon.sc-ion-alert-md{border-color:var(--ion-color-primary, #0054e9);background-color:var(--ion-color-primary, #0054e9)}[aria-checked=true].sc-ion-alert-md .alert-checkbox-inner.sc-ion-alert-md{top:0;position:absolute;width:6px;height:10px;-webkit-transform:rotate(45deg);transform:rotate(45deg);border-width:2px;border-top-width:0;border-left-width:0;border-style:solid;border-color:var(--ion-color-primary-contrast, #fff)}[aria-checked=true].sc-ion-alert-md .alert-checkbox-inner.sc-ion-alert-md{inset-inline-start:3px}.alert-button-group.sc-ion-alert-md{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:8px;padding-bottom:8px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-wrap:wrap-reverse;flex-wrap:wrap-reverse;-ms-flex-pack:end;justify-content:flex-end}.alert-button.sc-ion-alert-md{border-radius:2px;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:8px;margin-inline-end:8px;margin-top:0;margin-bottom:0;-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:10px;padding-bottom:10px;position:relative;background-color:transparent;color:var(--ion-color-primary, #0054e9);font-weight:500;text-align:end;text-transform:uppercase;overflow:hidden}.alert-button-inner.sc-ion-alert-md{-ms-flex-pack:end;justify-content:flex-end}@media screen and (min-width: 768px){.sc-ion-alert-md-h{--max-width:min(100vw - 96px, 560px);--max-height:min(100vh - 96px, 560px)}}";var IonAlertMdStyle0=alertMdCss;var Alert=function(){function t(t){var e=this;registerInstance(this,t);this.didPresent=createEvent(this,"ionAlertDidPresent",7);this.willPresent=createEvent(this,"ionAlertWillPresent",7);this.willDismiss=createEvent(this,"ionAlertWillDismiss",7);this.didDismiss=createEvent(this,"ionAlertDidDismiss",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.customHTMLEnabled=config.get("innerHTMLTemplatesEnabled",ENABLE_HTML_CONTENT_DEFAULT);this.processedInputs=[];this.processedButtons=[];this.presented=false;this.onBackdropTap=function(){e.dismiss(undefined,BACKDROP)};this.dispatchCancelHandler=function(t){var r=t.detail.role;if(isCancel(r)){var i=e.processedButtons.find((function(t){return t.role==="cancel"}));e.callButtonHandler(i)}};this.overlayIndex=undefined;this.delegate=undefined;this.hasController=false;this.keyboardClose=true;this.enterAnimation=undefined;this.leaveAnimation=undefined;this.cssClass=undefined;this.header=undefined;this.subHeader=undefined;this.message=undefined;this.buttons=[];this.inputs=[];this.backdropDismiss=true;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,r=t.el,i=t.triggerController;if(e){i.addClickListener(r,e)}};t.prototype.onKeydown=function(t){var e;var r=new Set(this.processedInputs.map((function(t){return t.type})));if(r.has("checkbox")&&t.key==="Enter"){t.preventDefault();return}if(t.target.classList.contains("alert-wrapper")){if(t.key==="Tab"&&t.shiftKey){t.preventDefault();var i=(e=this.wrapperEl)===null||e===void 0?void 0:e.querySelector(".alert-button:last-child");i.focus();return}}if(!r.has("radio")||t.target&&!this.el.contains(t.target)||t.target.classList.contains("alert-button")){return}var o=this.el.querySelectorAll(".alert-radio");var a=Array.from(o).filter((function(t){return!t.disabled}));var n=a.findIndex((function(e){return e.id===t.target.id}));var l;if(["ArrowDown","ArrowRight"].includes(t.key)){l=n===a.length-1?a[0]:a[n+1]}if(["ArrowUp","ArrowLeft"].includes(t.key)){l=n===0?a[a.length-1]:a[n-1]}if(l&&a.includes(l)){var s=this.processedInputs.find((function(t){return t.id===(l===null||l===void 0?void 0:l.id)}));if(s){this.rbClick(s);l.focus()}}};t.prototype.buttonsChanged=function(){var t=this.buttons;this.processedButtons=t.map((function(t){return typeof t==="string"?{text:t,role:t.toLowerCase()==="cancel"?"cancel":undefined}:t}))};t.prototype.inputsChanged=function(){var t=this;var e=this.inputs;var r=e.find((function(t){return!t.disabled}));var i=e.find((function(t){return t.checked&&!t.disabled}));var o=i||r;var a=new Set(e.map((function(t){return t.type})));if(a.has("checkbox")&&a.has("radio")){console.warn("Alert cannot mix input types: ".concat(Array.from(a.values()).join("/"),". Please see alert docs for more info."))}this.inputType=a.values().next().value;this.processedInputs=e.map((function(e,r){var i;return{type:e.type||"text",name:e.name||"".concat(r),placeholder:e.placeholder||"",value:e.value,label:e.label,checked:!!e.checked,disabled:!!e.disabled,id:e.id||"alert-input-".concat(t.overlayIndex,"-").concat(r),handler:e.handler,min:e.min,max:e.max,cssClass:(i=e.cssClass)!==null&&i!==void 0?i:"",attributes:e.attributes||{},tabindex:e.type==="radio"&&e!==o?-1:0}}))};t.prototype.connectedCallback=function(){prepareOverlay(this.el);this.triggerChanged()};t.prototype.componentWillLoad=function(){var t;if(!((t=this.htmlAttributes)===null||t===void 0?void 0:t.id)){setOverlayId(this.el)}this.inputsChanged();this.buttonsChanged()};t.prototype.disconnectedCallback=function(){this.triggerController.removeClickListener();if(this.gesture){this.gesture.destroy();this.gesture=undefined}};t.prototype.componentDidLoad=function(){var t=this;if(!this.gesture&&getIonMode(this)==="ios"&&this.wrapperEl){this.gesture=createButtonActiveGesture(this.wrapperEl,(function(t){return t.classList.contains("alert-button")}));this.gesture.enable(true)}if(this.isOpen===true){raf((function(){return t.present()}))}this.triggerChanged()};t.prototype.present=function(){return __awaiter(this,void 0,void 0,(function(){var t;var e=this;return __generator(this,(function(r){switch(r.label){case 0:return[4,this.lockController.lock()];case 1:t=r.sent();return[4,this.delegateController.attachViewToDom()];case 2:r.sent();return[4,present(this,"alertEnter",iosEnterAnimation,mdEnterAnimation).then((function(){var t,r;if(e.buttons.length===1&&e.inputs.length===0){var i=(t=e.wrapperEl)===null||t===void 0?void 0:t.querySelector(".alert-button");i.focus()}else{(r=e.wrapperEl)===null||r===void 0?void 0:r.focus()}}))];case 3:r.sent();t();return[2]}}))}))};t.prototype.dismiss=function(t,e){return __awaiter(this,void 0,void 0,(function(){var r,i;return __generator(this,(function(o){switch(o.label){case 0:return[4,this.lockController.lock()];case 1:r=o.sent();return[4,dismiss(this,t,e,"alertLeave",iosLeaveAnimation,mdLeaveAnimation)];case 2:i=o.sent();if(i){this.delegateController.removeViewFromDom()}r();return[2,i]}}))}))};t.prototype.onDidDismiss=function(){return eventMethod(this.el,"ionAlertDidDismiss")};t.prototype.onWillDismiss=function(){return eventMethod(this.el,"ionAlertWillDismiss")};t.prototype.rbClick=function(t){for(var e=0,r=this.processedInputs;e<r.length;e++){var i=r[e];i.checked=i===t;i.tabindex=i===t?0:-1}this.activeId=t.id;safeCall(t.handler,t);forceUpdate(this)};t.prototype.cbClick=function(t){t.checked=!t.checked;safeCall(t.handler,t);forceUpdate(this)};t.prototype.buttonClick=function(t){return __awaiter(this,void 0,void 0,(function(){var e,r,i;return __generator(this,(function(o){switch(o.label){case 0:e=t.role;r=this.getValues();if(isCancel(e)){return[2,this.dismiss({values:r},e)]}return[4,this.callButtonHandler(t,r)];case 1:i=o.sent();if(i!==false){return[2,this.dismiss(Object.assign({values:r},i),t.role)]}return[2,false]}}))}))};t.prototype.callButtonHandler=function(t,e){return __awaiter(this,void 0,void 0,(function(){var r;return __generator(this,(function(i){switch(i.label){case 0:if(!(t===null||t===void 0?void 0:t.handler))return[3,2];return[4,safeCall(t.handler,e)];case 1:r=i.sent();if(r===false){return[2,false]}if(typeof r==="object"){return[2,r]}i.label=2;case 2:return[2,{}]}}))}))};t.prototype.getValues=function(){if(this.processedInputs.length===0){return undefined}if(this.inputType==="radio"){var t=this.processedInputs.find((function(t){return!!t.checked}));return t?t.value:undefined}if(this.inputType==="checkbox"){return this.processedInputs.filter((function(t){return t.checked})).map((function(t){return t.value}))}var e={};this.processedInputs.forEach((function(t){e[t.name]=t.value||""}));return e};t.prototype.renderAlertInputs=function(){switch(this.inputType){case"checkbox":return this.renderCheckbox();case"radio":return this.renderRadio();default:return this.renderInput()}};t.prototype.renderCheckbox=function(){var t=this;var e=this.processedInputs;var r=getIonMode(this);if(e.length===0){return null}return h("div",{class:"alert-checkbox-group"},e.map((function(e){return h("button",{type:"button",onClick:function(){return t.cbClick(e)},"aria-checked":"".concat(e.checked),id:e.id,disabled:e.disabled,tabIndex:e.tabindex,role:"checkbox",class:Object.assign(Object.assign({},getClassMap(e.cssClass)),{"alert-tappable":true,"alert-checkbox":true,"alert-checkbox-button":true,"ion-focusable":true,"alert-checkbox-button-disabled":e.disabled||false})},h("div",{class:"alert-button-inner"},h("div",{class:"alert-checkbox-icon"},h("div",{class:"alert-checkbox-inner"})),h("div",{class:"alert-checkbox-label"},e.label)),r==="md"&&h("ion-ripple-effect",null))})))};t.prototype.renderRadio=function(){var t=this;var e=this.processedInputs;if(e.length===0){return null}return h("div",{class:"alert-radio-group",role:"radiogroup","aria-activedescendant":this.activeId},e.map((function(e){return h("button",{type:"button",onClick:function(){return t.rbClick(e)},"aria-checked":"".concat(e.checked),disabled:e.disabled,id:e.id,tabIndex:e.tabindex,class:Object.assign(Object.assign({},getClassMap(e.cssClass)),{"alert-radio-button":true,"alert-tappable":true,"alert-radio":true,"ion-focusable":true,"alert-radio-button-disabled":e.disabled||false}),role:"radio"},h("div",{class:"alert-button-inner"},h("div",{class:"alert-radio-icon"},h("div",{class:"alert-radio-inner"})),h("div",{class:"alert-radio-label"},e.label)))})))};t.prototype.renderInput=function(){var t=this.processedInputs;if(t.length===0){return null}return h("div",{class:"alert-input-group"},t.map((function(t){var e,r,i,o;if(t.type==="textarea"){return h("div",{class:"alert-input-wrapper"},h("textarea",Object.assign({placeholder:t.placeholder,value:t.value,id:t.id,tabIndex:t.tabindex},t.attributes,{disabled:(r=(e=t.attributes)===null||e===void 0?void 0:e.disabled)!==null&&r!==void 0?r:t.disabled,class:inputClass(t),onInput:function(e){var r;t.value=e.target.value;if((r=t.attributes)===null||r===void 0?void 0:r.onInput){t.attributes.onInput(e)}}})))}else{return h("div",{class:"alert-input-wrapper"},h("input",Object.assign({placeholder:t.placeholder,type:t.type,min:t.min,max:t.max,value:t.value,id:t.id,tabIndex:t.tabindex},t.attributes,{disabled:(o=(i=t.attributes)===null||i===void 0?void 0:i.disabled)!==null&&o!==void 0?o:t.disabled,class:inputClass(t),onInput:function(e){var r;t.value=e.target.value;if((r=t.attributes)===null||r===void 0?void 0:r.onInput){t.attributes.onInput(e)}}})))}})))};t.prototype.renderAlertButtons=function(){var t=this;var e=this.processedButtons;var r=getIonMode(this);var i={"alert-button-group":true,"alert-button-group-vertical":e.length>2};return h("div",{class:i},e.map((function(e){return h("button",Object.assign({},e.htmlAttributes,{type:"button",id:e.id,class:buttonClass(e),tabIndex:0,onClick:function(){return t.buttonClick(e)}}),h("span",{class:"alert-button-inner"},e.text),r==="md"&&h("ion-ripple-effect",null))})))};t.prototype.renderAlertMessage=function(t){var e=this,r=e.customHTMLEnabled,i=e.message;if(r){return h("div",{id:t,class:"alert-message",innerHTML:sanitizeDOMString(i)})}return h("div",{id:t,class:"alert-message"},i)};t.prototype.render=function(){var t;var e=this;var r=this,i=r.overlayIndex,o=r.header,a=r.subHeader,n=r.message,l=r.htmlAttributes;var s=getIonMode(this);var d="alert-".concat(i,"-hdr");var c="alert-".concat(i,"-msg");var p="alert-".concat(i,"-sub-hdr");var b=this.inputs.length>0||this.buttons.length>0?"alertdialog":"alert";var u=o&&a?"".concat(d," ").concat(p):o?d:a?p:null;return h(Host,{key:"212b5dc1949c63210c9d135afbe7fe31a16b5638",tabindex:"-1",style:{zIndex:"".concat(2e4+i)},class:Object.assign(Object.assign({},getClassMap(this.cssClass)),(t={},t[s]=true,t["overlay-hidden"]=true,t["alert-translucent"]=this.translucent,t)),onIonAlertWillDismiss:this.dispatchCancelHandler,onIonBackdropTap:this.onBackdropTap},h("ion-backdrop",{key:"ac8351d14850884a4f6865bbf32fb271592eedd9",tappable:this.backdropDismiss}),h("div",{key:"f677da8e719dfef9db8acbfd4fa14b936efb2cd7",tabindex:"0","aria-hidden":"true"}),h("div",Object.assign({key:"00124f7eda90b905c7161af00c25129e6232e387",class:"alert-wrapper ion-overlay-wrapper",role:b,"aria-modal":"true","aria-labelledby":u,"aria-describedby":n!==undefined?c:null,tabindex:"0",ref:function(t){return e.wrapperEl=t}},l),h("div",{key:"441b12e462a6ac83f29e251bea60d4dac273c6f8",class:"alert-head"},o&&h("h2",{key:"d7f185ec5ba61519cd2e5c84ccb884fc711754bf",id:d,class:"alert-title"},o),a&&!o&&h("h2",{key:"8477b1979d040ffbce7b4396b57d5fd197b116a7",id:p,class:"alert-sub-title"},a),a&&o&&h("h3",{key:"ccb22f664465077be6e5f59c1541c13d8071cc30",id:p,class:"alert-sub-title"},a)),this.renderAlertMessage(c),this.renderAlertInputs(),this.renderAlertButtons()),h("div",{key:"33d5f68cb7a0989ecd1bd0abf110b94947e5b091",tabindex:"0","aria-hidden":"true"}))};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"],buttons:["buttonsChanged"],inputs:["inputsChanged"]}},enumerable:false,configurable:true});return t}();var inputClass=function(t){var e,r,i;return Object.assign(Object.assign({"alert-input":true,"alert-input-disabled":((r=(e=t.attributes)===null||e===void 0?void 0:e.disabled)!==null&&r!==void 0?r:t.disabled)||false},getClassMap(t.cssClass)),getClassMap(t.attributes?(i=t.attributes.class)===null||i===void 0?void 0:i.toString():""))};var buttonClass=function(t){var e;return Object.assign((e={"alert-button":true,"ion-focusable":true,"ion-activatable":true},e["alert-button-role-".concat(t.role)]=t.role!==undefined,e),getClassMap(t.cssClass))};Alert.style={ios:IonAlertIosStyle0,md:IonAlertMdStyle0};export{Alert as ion_alert};
|
|
4
|
+
*/import{r as registerInstance,d as createEvent,j as forceUpdate,h,f as Host,i as getElement}from"./index-28849c61.js";import{E as ENABLE_HTML_CONTENT_DEFAULT,a as sanitizeDOMString}from"./config-49c88215.js";import{c as createButtonActiveGesture}from"./button-active-f6503382.js";import{r as raf}from"./helpers-9b49d7d2.js";import{c as createLockController}from"./lock-controller-316928be.js";import{d as createDelegateController,e as createTriggerController,B as BACKDROP,i as isCancel,j as prepareOverlay,k as setOverlayId,f as present,g as dismiss,h as eventMethod,s as safeCall}from"./overlays-e3d0d356.js";import{g as getClassMap}from"./theme-01f3f29c.js";import{c as config,b as getIonMode}from"./ionic-global-c81d82ab.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-06ef3c3e.js";import"./framework-delegate-f683816e.js";import"./index-9b0d46f4.js";var iosEnterAnimation=function(t){var e=createAnimation();var r=createAnimation();var i=createAnimation();r.addElement(t.querySelector("ion-backdrop")).fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]);i.addElement(t.querySelector(".alert-wrapper")).keyframes([{offset:0,opacity:"0.01",transform:"scale(1.1)"},{offset:1,opacity:"1",transform:"scale(1)"}]);return e.addElement(t).easing("ease-in-out").duration(200).addAnimation([r,i])};var iosLeaveAnimation=function(t){var e=createAnimation();var r=createAnimation();var i=createAnimation();r.addElement(t.querySelector("ion-backdrop")).fromTo("opacity","var(--backdrop-opacity)",0);i.addElement(t.querySelector(".alert-wrapper")).keyframes([{offset:0,opacity:.99,transform:"scale(1)"},{offset:1,opacity:0,transform:"scale(0.9)"}]);return e.addElement(t).easing("ease-in-out").duration(200).addAnimation([r,i])};var mdEnterAnimation=function(t){var e=createAnimation();var r=createAnimation();var i=createAnimation();r.addElement(t.querySelector("ion-backdrop")).fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]);i.addElement(t.querySelector(".alert-wrapper")).keyframes([{offset:0,opacity:"0.01",transform:"scale(0.9)"},{offset:1,opacity:"1",transform:"scale(1)"}]);return e.addElement(t).easing("ease-in-out").duration(150).addAnimation([r,i])};var mdLeaveAnimation=function(t){var e=createAnimation();var r=createAnimation();var i=createAnimation();r.addElement(t.querySelector("ion-backdrop")).fromTo("opacity","var(--backdrop-opacity)",0);i.addElement(t.querySelector(".alert-wrapper")).fromTo("opacity",.99,0);return e.addElement(t).easing("ease-in-out").duration(150).addAnimation([r,i])};var alertIosCss=".sc-ion-alert-ios-h{--min-width:250px;--width:auto;--min-height:auto;--height:auto;--max-height:90%;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;font-family:var(--ion-font-family, inherit);contain:strict;-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-alert-ios-h{display:none}.alert-top.sc-ion-alert-ios-h{padding-top:50px;-ms-flex-align:start;align-items:flex-start}.alert-wrapper.sc-ion-alert-ios{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;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);background:var(--background);contain:content;opacity:0;z-index:10}.alert-title.sc-ion-alert-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}.alert-sub-title.sc-ion-alert-ios{margin-left:0;margin-right:0;margin-top:5px;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;font-weight:normal}.alert-message.sc-ion-alert-ios,.alert-input-group.sc-ion-alert-ios{-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-overflow-scrolling:touch;overflow-y:auto;overscroll-behavior-y:contain}.alert-checkbox-label.sc-ion-alert-ios,.alert-radio-label.sc-ion-alert-ios{overflow-wrap:anywhere}@media (any-pointer: coarse){.alert-checkbox-group.sc-ion-alert-ios::-webkit-scrollbar,.alert-radio-group.sc-ion-alert-ios::-webkit-scrollbar,.alert-message.sc-ion-alert-ios::-webkit-scrollbar{display:none}}.alert-input.sc-ion-alert-ios{padding-left:0;padding-right:0;padding-top:10px;padding-bottom:10px;width:100%;border:0;background:inherit;font:inherit;-webkit-box-sizing:border-box;box-sizing:border-box}.alert-button-group.sc-ion-alert-ios{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;width:100%}.alert-button-group-vertical.sc-ion-alert-ios{-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.alert-button.sc-ion-alert-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;border:0;font-size:0.875rem;line-height:1.25rem;z-index:0}.alert-button.ion-focused.sc-ion-alert-ios,.alert-tappable.ion-focused.sc-ion-alert-ios{background:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6))}.alert-button-inner.sc-ion-alert-ios{display:-ms-flexbox;display:flex;-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;width:100%;height:100%;min-height:inherit}.alert-input-disabled.sc-ion-alert-ios,.alert-checkbox-button-disabled.sc-ion-alert-ios .alert-button-inner.sc-ion-alert-ios,.alert-radio-button-disabled.sc-ion-alert-ios .alert-button-inner.sc-ion-alert-ios{cursor:default;opacity:0.5;pointer-events:none}.alert-tappable.sc-ion-alert-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;display:-ms-flexbox;display:flex;width:100%;border:0;background:transparent;font-size:inherit;line-height:initial;text-align:start;-webkit-appearance:none;-moz-appearance:none;appearance:none;contain:content}.alert-button.sc-ion-alert-ios,.alert-checkbox.sc-ion-alert-ios,.alert-input.sc-ion-alert-ios,.alert-radio.sc-ion-alert-ios{outline:none}.alert-radio-icon.sc-ion-alert-ios,.alert-checkbox-icon.sc-ion-alert-ios,.alert-checkbox-inner.sc-ion-alert-ios{-webkit-box-sizing:border-box;box-sizing:border-box}textarea.alert-input.sc-ion-alert-ios{min-height:37px;resize:none}.sc-ion-alert-ios-h{--background:var(--ion-overlay-background-color, var(--ion-color-step-100, var(--ion-background-color-step-100, #f9f9f9)));--max-width:clamp(270px, 16.875rem, 324px);--backdrop-opacity:var(--ion-backdrop-opacity, 0.3);font-size:max(14px, 0.875rem)}.alert-wrapper.sc-ion-alert-ios{border-radius:13px;-webkit-box-shadow:none;box-shadow:none;overflow:hidden}.alert-button.sc-ion-alert-ios .alert-button-inner.sc-ion-alert-ios{pointer-events:none}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){.alert-translucent.sc-ion-alert-ios-h .alert-wrapper.sc-ion-alert-ios{background:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.9);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}}.alert-head.sc-ion-alert-ios{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:12px;padding-bottom:7px;text-align:center}.alert-title.sc-ion-alert-ios{margin-top:8px;color:var(--ion-text-color, #000);font-size:max(17px, 1.0625rem);font-weight:600}.alert-sub-title.sc-ion-alert-ios{color:var(--ion-color-step-600, var(--ion-text-color-step-400, #666666));font-size:max(14px, 0.875rem)}.alert-message.sc-ion-alert-ios,.alert-input-group.sc-ion-alert-ios{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:0;padding-bottom:21px;color:var(--ion-text-color, #000);font-size:max(13px, 0.8125rem);text-align:center}.alert-message.sc-ion-alert-ios{max-height:240px}.alert-message.sc-ion-alert-ios:empty{padding-left:0;padding-right:0;padding-top:0;padding-bottom:12px}.alert-input.sc-ion-alert-ios{border-radius:7px;margin-top:10px;-webkit-padding-start:7px;padding-inline-start:7px;-webkit-padding-end:7px;padding-inline-end:7px;padding-top:7px;padding-bottom:7px;border:0.55px solid var(--ion-color-step-250, var(--ion-background-color-step-250, #bfbfbf));background-color:var(--ion-background-color, #fff);-webkit-appearance:none;-moz-appearance:none;appearance:none;font-size:1rem}.alert-input.sc-ion-alert-ios::-webkit-input-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-ios::-moz-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-ios:-ms-input-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-ios::-ms-input-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-ios::placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-ios::-ms-clear{display:none}.alert-input.sc-ion-alert-ios::-webkit-date-and-time-value{height:18px}.alert-radio-group.sc-ion-alert-ios,.alert-checkbox-group.sc-ion-alert-ios{-ms-scroll-chaining:none;overscroll-behavior:contain;max-height:240px;border-top:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2);overflow-y:auto;-webkit-overflow-scrolling:touch}.alert-tappable.sc-ion-alert-ios{min-height:44px}.alert-radio-label.sc-ion-alert-ios{-webkit-padding-start:13px;padding-inline-start:13px;-webkit-padding-end:13px;padding-inline-end:13px;padding-top:13px;padding-bottom:13px;-ms-flex:1;flex:1;-ms-flex-order:0;order:0;color:var(--ion-text-color, #000)}[aria-checked=true].sc-ion-alert-ios .alert-radio-label.sc-ion-alert-ios{color:var(--ion-color-primary, #0054e9)}.alert-radio-icon.sc-ion-alert-ios{position:relative;-ms-flex-order:1;order:1;min-width:30px}[aria-checked=true].sc-ion-alert-ios .alert-radio-inner.sc-ion-alert-ios{top:-7px;position:absolute;width:6px;height:12px;-webkit-transform:rotate(45deg);transform:rotate(45deg);border-width:2px;border-top-width:0;border-left-width:0;border-style:solid;border-color:var(--ion-color-primary, #0054e9)}[aria-checked=true].sc-ion-alert-ios .alert-radio-inner.sc-ion-alert-ios{inset-inline-start:7px}.alert-checkbox-label.sc-ion-alert-ios{-webkit-padding-start:13px;padding-inline-start:13px;-webkit-padding-end:13px;padding-inline-end:13px;padding-top:13px;padding-bottom:13px;-ms-flex:1;flex:1;color:var(--ion-text-color, #000)}.alert-checkbox-icon.sc-ion-alert-ios{border-radius:50%;-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:6px;margin-inline-end:6px;margin-top:10px;margin-bottom:10px;position:relative;width:min(1.375rem, 55.836px);height:min(1.375rem, 55.836px);border-width:0.125rem;border-style:solid;border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-250, var(--ion-background-color-step-250, #c8c7cc))));background-color:var(--ion-item-background, var(--ion-background-color, #fff));contain:strict}[aria-checked=true].sc-ion-alert-ios .alert-checkbox-icon.sc-ion-alert-ios{border-color:var(--ion-color-primary, #0054e9);background-color:var(--ion-color-primary, #0054e9)}[aria-checked=true].sc-ion-alert-ios .alert-checkbox-inner.sc-ion-alert-ios{top:calc(min(1.375rem, 55.836px) / 8);position:absolute;width:calc(min(1.375rem, 55.836px) / 6 + 1px);height:calc(min(1.375rem, 55.836px) * 0.5);-webkit-transform:rotate(45deg);transform:rotate(45deg);border-width:0.125rem;border-top-width:0;border-left-width:0;border-style:solid;border-color:var(--ion-background-color, #fff)}[aria-checked=true].sc-ion-alert-ios .alert-checkbox-inner.sc-ion-alert-ios{inset-inline-start:calc(min(1.375rem, 55.836px) / 3)}.alert-button-group.sc-ion-alert-ios{-webkit-margin-end:-0.55px;margin-inline-end:-0.55px;-ms-flex-wrap:wrap;flex-wrap:wrap}.alert-button-group-vertical.sc-ion-alert-ios .alert-button.sc-ion-alert-ios{border-right:none}[dir=rtl].sc-ion-alert-ios-h .alert-button-group-vertical.sc-ion-alert-ios .alert-button.sc-ion-alert-ios:last-child,[dir=rtl] .sc-ion-alert-ios-h .alert-button-group-vertical.sc-ion-alert-ios .alert-button.sc-ion-alert-ios:last-child{border-right:none}[dir=rtl].sc-ion-alert-ios .alert-button-group-vertical.sc-ion-alert-ios .alert-button.sc-ion-alert-ios:last-child{border-right:none}@supports selector(:dir(rtl)){.alert-button-group-vertical.sc-ion-alert-ios .alert-button.sc-ion-alert-ios:last-child:dir(rtl){border-right:none}}.alert-button.sc-ion-alert-ios{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;border-radius:0;-ms-flex:1 1 auto;flex:1 1 auto;min-width:50%;height:max(44px, 2.75rem);border-top:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2);border-right:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2);background-color:transparent;color:var(--ion-color-primary, #0054e9);font-size:max(17px, 1.0625rem);overflow:hidden}[dir=rtl].sc-ion-alert-ios-h .alert-button.sc-ion-alert-ios:first-child,[dir=rtl] .sc-ion-alert-ios-h .alert-button.sc-ion-alert-ios:first-child{border-right:0}[dir=rtl].sc-ion-alert-ios .alert-button.sc-ion-alert-ios:first-child{border-right:0}@supports selector(:dir(rtl)){.alert-button.sc-ion-alert-ios:first-child:dir(rtl){border-right:0}}.alert-button.sc-ion-alert-ios:last-child{border-right:0;font-weight:bold}[dir=rtl].sc-ion-alert-ios-h .alert-button.sc-ion-alert-ios:last-child,[dir=rtl] .sc-ion-alert-ios-h .alert-button.sc-ion-alert-ios:last-child{border-right:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2)}[dir=rtl].sc-ion-alert-ios .alert-button.sc-ion-alert-ios:last-child{border-right:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2)}@supports selector(:dir(rtl)){.alert-button.sc-ion-alert-ios:last-child:dir(rtl){border-right:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2)}}.alert-button.ion-activated.sc-ion-alert-ios{background-color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.1)}.alert-button-role-destructive.sc-ion-alert-ios,.alert-button-role-destructive.ion-activated.sc-ion-alert-ios,.alert-button-role-destructive.ion-focused.sc-ion-alert-ios{color:var(--ion-color-danger, #c5000f)}";var IonAlertIosStyle0=alertIosCss;var alertMdCss=".sc-ion-alert-md-h{--min-width:250px;--width:auto;--min-height:auto;--height:auto;--max-height:90%;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;font-family:var(--ion-font-family, inherit);contain:strict;-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-alert-md-h{display:none}.alert-top.sc-ion-alert-md-h{padding-top:50px;-ms-flex-align:start;align-items:flex-start}.alert-wrapper.sc-ion-alert-md{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;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);background:var(--background);contain:content;opacity:0;z-index:10}.alert-title.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}.alert-sub-title.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:5px;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;font-weight:normal}.alert-message.sc-ion-alert-md,.alert-input-group.sc-ion-alert-md{-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-overflow-scrolling:touch;overflow-y:auto;overscroll-behavior-y:contain}.alert-checkbox-label.sc-ion-alert-md,.alert-radio-label.sc-ion-alert-md{overflow-wrap:anywhere}@media (any-pointer: coarse){.alert-checkbox-group.sc-ion-alert-md::-webkit-scrollbar,.alert-radio-group.sc-ion-alert-md::-webkit-scrollbar,.alert-message.sc-ion-alert-md::-webkit-scrollbar{display:none}}.alert-input.sc-ion-alert-md{padding-left:0;padding-right:0;padding-top:10px;padding-bottom:10px;width:100%;border:0;background:inherit;font:inherit;-webkit-box-sizing:border-box;box-sizing:border-box}.alert-button-group.sc-ion-alert-md{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;width:100%}.alert-button-group-vertical.sc-ion-alert-md{-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.alert-button.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;border:0;font-size:0.875rem;line-height:1.25rem;z-index:0}.alert-button.ion-focused.sc-ion-alert-md,.alert-tappable.ion-focused.sc-ion-alert-md{background:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6))}.alert-button-inner.sc-ion-alert-md{display:-ms-flexbox;display:flex;-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;width:100%;height:100%;min-height:inherit}.alert-input-disabled.sc-ion-alert-md,.alert-checkbox-button-disabled.sc-ion-alert-md .alert-button-inner.sc-ion-alert-md,.alert-radio-button-disabled.sc-ion-alert-md .alert-button-inner.sc-ion-alert-md{cursor:default;opacity:0.5;pointer-events:none}.alert-tappable.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;display:-ms-flexbox;display:flex;width:100%;border:0;background:transparent;font-size:inherit;line-height:initial;text-align:start;-webkit-appearance:none;-moz-appearance:none;appearance:none;contain:content}.alert-button.sc-ion-alert-md,.alert-checkbox.sc-ion-alert-md,.alert-input.sc-ion-alert-md,.alert-radio.sc-ion-alert-md{outline:none}.alert-radio-icon.sc-ion-alert-md,.alert-checkbox-icon.sc-ion-alert-md,.alert-checkbox-inner.sc-ion-alert-md{-webkit-box-sizing:border-box;box-sizing:border-box}textarea.alert-input.sc-ion-alert-md{min-height:37px;resize:none}.sc-ion-alert-md-h{--background:var(--ion-overlay-background-color, var(--ion-background-color, #fff));--max-width:280px;--backdrop-opacity:var(--ion-backdrop-opacity, 0.32);font-size:0.875rem}.alert-wrapper.sc-ion-alert-md{border-radius:4px;-webkit-box-shadow:0 11px 15px -7px rgba(0, 0, 0, 0.2), 0 24px 38px 3px rgba(0, 0, 0, 0.14), 0 9px 46px 8px rgba(0, 0, 0, 0.12);box-shadow:0 11px 15px -7px rgba(0, 0, 0, 0.2), 0 24px 38px 3px rgba(0, 0, 0, 0.14), 0 9px 46px 8px rgba(0, 0, 0, 0.12)}.alert-head.sc-ion-alert-md{-webkit-padding-start:23px;padding-inline-start:23px;-webkit-padding-end:23px;padding-inline-end:23px;padding-top:20px;padding-bottom:15px;text-align:start}.alert-title.sc-ion-alert-md{color:var(--ion-text-color, #000);font-size:1.25rem;font-weight:500}.alert-sub-title.sc-ion-alert-md{color:var(--ion-text-color, #000);font-size:1rem}.alert-message.sc-ion-alert-md,.alert-input-group.sc-ion-alert-md{-webkit-padding-start:24px;padding-inline-start:24px;-webkit-padding-end:24px;padding-inline-end:24px;padding-top:20px;padding-bottom:20px;color:var(--ion-color-step-550, var(--ion-text-color-step-450, #737373))}.alert-message.sc-ion-alert-md{font-size:1rem}@media screen and (max-width: 767px){.alert-message.sc-ion-alert-md{max-height:266px}}.alert-message.sc-ion-alert-md:empty{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}.alert-head.sc-ion-alert-md+.alert-message.sc-ion-alert-md{padding-top:0}.alert-input.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:5px;margin-bottom:5px;border-bottom:1px solid var(--ion-color-step-150, var(--ion-background-color-step-150, #d9d9d9));color:var(--ion-text-color, #000)}.alert-input.sc-ion-alert-md::-webkit-input-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-md::-moz-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-md:-ms-input-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-md::-ms-input-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-md::placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-md::-ms-clear{display:none}.alert-input.sc-ion-alert-md:focus{margin-bottom:4px;border-bottom:2px solid var(--ion-color-primary, #0054e9)}.alert-radio-group.sc-ion-alert-md,.alert-checkbox-group.sc-ion-alert-md{position:relative;border-top:1px solid var(--ion-color-step-150, var(--ion-background-color-step-150, #d9d9d9));border-bottom:1px solid var(--ion-color-step-150, var(--ion-background-color-step-150, #d9d9d9));overflow:auto}@media screen and (max-width: 767px){.alert-radio-group.sc-ion-alert-md,.alert-checkbox-group.sc-ion-alert-md{max-height:266px}}.alert-tappable.sc-ion-alert-md{position:relative;min-height:48px}.alert-radio-label.sc-ion-alert-md{-webkit-padding-start:52px;padding-inline-start:52px;-webkit-padding-end:26px;padding-inline-end:26px;padding-top:13px;padding-bottom:13px;-ms-flex:1;flex:1;color:var(--ion-color-step-850, var(--ion-text-color-step-150, #262626));font-size:1rem}.alert-radio-icon.sc-ion-alert-md{top:0;border-radius:50%;display:block;position:relative;width:20px;height:20px;border-width:2px;border-style:solid;border-color:var(--ion-color-step-550, var(--ion-background-color-step-550, #737373))}.alert-radio-icon.sc-ion-alert-md{inset-inline-start:26px}.alert-radio-inner.sc-ion-alert-md{top:3px;border-radius:50%;position:absolute;width:10px;height:10px;-webkit-transform:scale3d(0, 0, 0);transform:scale3d(0, 0, 0);-webkit-transition:-webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);background-color:var(--ion-color-primary, #0054e9)}.alert-radio-inner.sc-ion-alert-md{inset-inline-start:3px}[aria-checked=true].sc-ion-alert-md .alert-radio-label.sc-ion-alert-md{color:var(--ion-color-step-850, var(--ion-text-color-step-150, #262626))}[aria-checked=true].sc-ion-alert-md .alert-radio-icon.sc-ion-alert-md{border-color:var(--ion-color-primary, #0054e9)}[aria-checked=true].sc-ion-alert-md .alert-radio-inner.sc-ion-alert-md{-webkit-transform:scale3d(1, 1, 1);transform:scale3d(1, 1, 1)}.alert-checkbox-label.sc-ion-alert-md{-webkit-padding-start:53px;padding-inline-start:53px;-webkit-padding-end:26px;padding-inline-end:26px;padding-top:13px;padding-bottom:13px;-ms-flex:1;flex:1;width:calc(100% - 53px);color:var(--ion-color-step-850, var(--ion-text-color-step-150, #262626));font-size:1rem}.alert-checkbox-icon.sc-ion-alert-md{top:0;border-radius:2px;position:relative;width:16px;height:16px;border-width:2px;border-style:solid;border-color:var(--ion-color-step-550, var(--ion-background-color-step-550, #737373));contain:strict}.alert-checkbox-icon.sc-ion-alert-md{inset-inline-start:26px}[aria-checked=true].sc-ion-alert-md .alert-checkbox-icon.sc-ion-alert-md{border-color:var(--ion-color-primary, #0054e9);background-color:var(--ion-color-primary, #0054e9)}[aria-checked=true].sc-ion-alert-md .alert-checkbox-inner.sc-ion-alert-md{top:0;position:absolute;width:6px;height:10px;-webkit-transform:rotate(45deg);transform:rotate(45deg);border-width:2px;border-top-width:0;border-left-width:0;border-style:solid;border-color:var(--ion-color-primary-contrast, #fff)}[aria-checked=true].sc-ion-alert-md .alert-checkbox-inner.sc-ion-alert-md{inset-inline-start:3px}.alert-button-group.sc-ion-alert-md{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:8px;padding-bottom:8px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-wrap:wrap-reverse;flex-wrap:wrap-reverse;-ms-flex-pack:end;justify-content:flex-end}.alert-button.sc-ion-alert-md{border-radius:2px;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:8px;margin-inline-end:8px;margin-top:0;margin-bottom:0;-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:10px;padding-bottom:10px;position:relative;background-color:transparent;color:var(--ion-color-primary, #0054e9);font-weight:500;text-align:end;text-transform:uppercase;overflow:hidden}.alert-button-inner.sc-ion-alert-md{-ms-flex-pack:end;justify-content:flex-end}@media screen and (min-width: 768px){.sc-ion-alert-md-h{--max-width:min(100vw - 96px, 560px);--max-height:min(100vh - 96px, 560px)}}";var IonAlertMdStyle0=alertMdCss;var Alert=function(){function t(t){var e=this;registerInstance(this,t);this.didPresent=createEvent(this,"ionAlertDidPresent",7);this.willPresent=createEvent(this,"ionAlertWillPresent",7);this.willDismiss=createEvent(this,"ionAlertWillDismiss",7);this.didDismiss=createEvent(this,"ionAlertDidDismiss",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.customHTMLEnabled=config.get("innerHTMLTemplatesEnabled",ENABLE_HTML_CONTENT_DEFAULT);this.processedInputs=[];this.processedButtons=[];this.presented=false;this.onBackdropTap=function(){e.dismiss(undefined,BACKDROP)};this.dispatchCancelHandler=function(t){var r=t.detail.role;if(isCancel(r)){var i=e.processedButtons.find((function(t){return t.role==="cancel"}));e.callButtonHandler(i)}};this.overlayIndex=undefined;this.delegate=undefined;this.hasController=false;this.keyboardClose=true;this.enterAnimation=undefined;this.leaveAnimation=undefined;this.cssClass=undefined;this.header=undefined;this.subHeader=undefined;this.message=undefined;this.buttons=[];this.inputs=[];this.backdropDismiss=true;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,r=t.el,i=t.triggerController;if(e){i.addClickListener(r,e)}};t.prototype.onKeydown=function(t){var e=new Set(this.processedInputs.map((function(t){return t.type})));if(e.has("checkbox")&&t.key==="Enter"){t.preventDefault();return}if(!e.has("radio")||t.target&&!this.el.contains(t.target)||t.target.classList.contains("alert-button")){return}var r=this.el.querySelectorAll(".alert-radio");var i=Array.from(r).filter((function(t){return!t.disabled}));var o=i.findIndex((function(e){return e.id===t.target.id}));var a;if(["ArrowDown","ArrowRight"].includes(t.key)){a=o===i.length-1?i[0]:i[o+1]}if(["ArrowUp","ArrowLeft"].includes(t.key)){a=o===0?i[i.length-1]:i[o-1]}if(a&&i.includes(a)){var n=this.processedInputs.find((function(t){return t.id===(a===null||a===void 0?void 0:a.id)}));if(n){this.rbClick(n);a.focus()}}};t.prototype.buttonsChanged=function(){var t=this.buttons;this.processedButtons=t.map((function(t){return typeof t==="string"?{text:t,role:t.toLowerCase()==="cancel"?"cancel":undefined}:t}))};t.prototype.inputsChanged=function(){var t=this;var e=this.inputs;var r=e.find((function(t){return!t.disabled}));var i=e.find((function(t){return t.checked&&!t.disabled}));var o=i||r;var a=new Set(e.map((function(t){return t.type})));if(a.has("checkbox")&&a.has("radio")){console.warn("Alert cannot mix input types: ".concat(Array.from(a.values()).join("/"),". Please see alert docs for more info."))}this.inputType=a.values().next().value;this.processedInputs=e.map((function(e,r){var i;return{type:e.type||"text",name:e.name||"".concat(r),placeholder:e.placeholder||"",value:e.value,label:e.label,checked:!!e.checked,disabled:!!e.disabled,id:e.id||"alert-input-".concat(t.overlayIndex,"-").concat(r),handler:e.handler,min:e.min,max:e.max,cssClass:(i=e.cssClass)!==null&&i!==void 0?i:"",attributes:e.attributes||{},tabindex:e.type==="radio"&&e!==o?-1:0}}))};t.prototype.connectedCallback=function(){prepareOverlay(this.el);this.triggerChanged()};t.prototype.componentWillLoad=function(){var t;if(!((t=this.htmlAttributes)===null||t===void 0?void 0:t.id)){setOverlayId(this.el)}this.inputsChanged();this.buttonsChanged()};t.prototype.disconnectedCallback=function(){this.triggerController.removeClickListener();if(this.gesture){this.gesture.destroy();this.gesture=undefined}};t.prototype.componentDidLoad=function(){var t=this;if(!this.gesture&&getIonMode(this)==="ios"&&this.wrapperEl){this.gesture=createButtonActiveGesture(this.wrapperEl,(function(t){return t.classList.contains("alert-button")}));this.gesture.enable(true)}if(this.isOpen===true){raf((function(){return t.present()}))}this.triggerChanged()};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,"alertEnter",iosEnterAnimation,mdEnterAnimation)];case 3:e.sent();t();return[2]}}))}))};t.prototype.dismiss=function(t,e){return __awaiter(this,void 0,void 0,(function(){var r,i;return __generator(this,(function(o){switch(o.label){case 0:return[4,this.lockController.lock()];case 1:r=o.sent();return[4,dismiss(this,t,e,"alertLeave",iosLeaveAnimation,mdLeaveAnimation)];case 2:i=o.sent();if(i){this.delegateController.removeViewFromDom()}r();return[2,i]}}))}))};t.prototype.onDidDismiss=function(){return eventMethod(this.el,"ionAlertDidDismiss")};t.prototype.onWillDismiss=function(){return eventMethod(this.el,"ionAlertWillDismiss")};t.prototype.rbClick=function(t){for(var e=0,r=this.processedInputs;e<r.length;e++){var i=r[e];i.checked=i===t;i.tabindex=i===t?0:-1}this.activeId=t.id;safeCall(t.handler,t);forceUpdate(this)};t.prototype.cbClick=function(t){t.checked=!t.checked;safeCall(t.handler,t);forceUpdate(this)};t.prototype.buttonClick=function(t){return __awaiter(this,void 0,void 0,(function(){var e,r,i;return __generator(this,(function(o){switch(o.label){case 0:e=t.role;r=this.getValues();if(isCancel(e)){return[2,this.dismiss({values:r},e)]}return[4,this.callButtonHandler(t,r)];case 1:i=o.sent();if(i!==false){return[2,this.dismiss(Object.assign({values:r},i),t.role)]}return[2,false]}}))}))};t.prototype.callButtonHandler=function(t,e){return __awaiter(this,void 0,void 0,(function(){var r;return __generator(this,(function(i){switch(i.label){case 0:if(!(t===null||t===void 0?void 0:t.handler))return[3,2];return[4,safeCall(t.handler,e)];case 1:r=i.sent();if(r===false){return[2,false]}if(typeof r==="object"){return[2,r]}i.label=2;case 2:return[2,{}]}}))}))};t.prototype.getValues=function(){if(this.processedInputs.length===0){return undefined}if(this.inputType==="radio"){var t=this.processedInputs.find((function(t){return!!t.checked}));return t?t.value:undefined}if(this.inputType==="checkbox"){return this.processedInputs.filter((function(t){return t.checked})).map((function(t){return t.value}))}var e={};this.processedInputs.forEach((function(t){e[t.name]=t.value||""}));return e};t.prototype.renderAlertInputs=function(){switch(this.inputType){case"checkbox":return this.renderCheckbox();case"radio":return this.renderRadio();default:return this.renderInput()}};t.prototype.renderCheckbox=function(){var t=this;var e=this.processedInputs;var r=getIonMode(this);if(e.length===0){return null}return h("div",{class:"alert-checkbox-group"},e.map((function(e){return h("button",{type:"button",onClick:function(){return t.cbClick(e)},"aria-checked":"".concat(e.checked),id:e.id,disabled:e.disabled,tabIndex:e.tabindex,role:"checkbox",class:Object.assign(Object.assign({},getClassMap(e.cssClass)),{"alert-tappable":true,"alert-checkbox":true,"alert-checkbox-button":true,"ion-focusable":true,"alert-checkbox-button-disabled":e.disabled||false})},h("div",{class:"alert-button-inner"},h("div",{class:"alert-checkbox-icon"},h("div",{class:"alert-checkbox-inner"})),h("div",{class:"alert-checkbox-label"},e.label)),r==="md"&&h("ion-ripple-effect",null))})))};t.prototype.renderRadio=function(){var t=this;var e=this.processedInputs;if(e.length===0){return null}return h("div",{class:"alert-radio-group",role:"radiogroup","aria-activedescendant":this.activeId},e.map((function(e){return h("button",{type:"button",onClick:function(){return t.rbClick(e)},"aria-checked":"".concat(e.checked),disabled:e.disabled,id:e.id,tabIndex:e.tabindex,class:Object.assign(Object.assign({},getClassMap(e.cssClass)),{"alert-radio-button":true,"alert-tappable":true,"alert-radio":true,"ion-focusable":true,"alert-radio-button-disabled":e.disabled||false}),role:"radio"},h("div",{class:"alert-button-inner"},h("div",{class:"alert-radio-icon"},h("div",{class:"alert-radio-inner"})),h("div",{class:"alert-radio-label"},e.label)))})))};t.prototype.renderInput=function(){var t=this.processedInputs;if(t.length===0){return null}return h("div",{class:"alert-input-group"},t.map((function(t){var e,r,i,o;if(t.type==="textarea"){return h("div",{class:"alert-input-wrapper"},h("textarea",Object.assign({placeholder:t.placeholder,value:t.value,id:t.id,tabIndex:t.tabindex},t.attributes,{disabled:(r=(e=t.attributes)===null||e===void 0?void 0:e.disabled)!==null&&r!==void 0?r:t.disabled,class:inputClass(t),onInput:function(e){var r;t.value=e.target.value;if((r=t.attributes)===null||r===void 0?void 0:r.onInput){t.attributes.onInput(e)}}})))}else{return h("div",{class:"alert-input-wrapper"},h("input",Object.assign({placeholder:t.placeholder,type:t.type,min:t.min,max:t.max,value:t.value,id:t.id,tabIndex:t.tabindex},t.attributes,{disabled:(o=(i=t.attributes)===null||i===void 0?void 0:i.disabled)!==null&&o!==void 0?o:t.disabled,class:inputClass(t),onInput:function(e){var r;t.value=e.target.value;if((r=t.attributes)===null||r===void 0?void 0:r.onInput){t.attributes.onInput(e)}}})))}})))};t.prototype.renderAlertButtons=function(){var t=this;var e=this.processedButtons;var r=getIonMode(this);var i={"alert-button-group":true,"alert-button-group-vertical":e.length>2};return h("div",{class:i},e.map((function(e){return h("button",Object.assign({},e.htmlAttributes,{type:"button",id:e.id,class:buttonClass(e),tabIndex:0,onClick:function(){return t.buttonClick(e)}}),h("span",{class:"alert-button-inner"},e.text),r==="md"&&h("ion-ripple-effect",null))})))};t.prototype.renderAlertMessage=function(t){var e=this,r=e.customHTMLEnabled,i=e.message;if(r){return h("div",{id:t,class:"alert-message",innerHTML:sanitizeDOMString(i)})}return h("div",{id:t,class:"alert-message"},i)};t.prototype.render=function(){var t;var e=this;var r=this,i=r.overlayIndex,o=r.header,a=r.subHeader,n=r.message,l=r.htmlAttributes;var s=getIonMode(this);var d="alert-".concat(i,"-hdr");var c="alert-".concat(i,"-sub-hdr");var p="alert-".concat(i,"-msg");var b=this.inputs.length>0||this.buttons.length>0?"alertdialog":"alert";var u=o&&a?"".concat(d," ").concat(c):o?d:a?c:null;return h(Host,Object.assign({key:"ad7e14b4f92a09387aa80abfb718a755e4e889d6",role:b,"aria-modal":"true","aria-labelledby":u,"aria-describedby":n!==undefined?p:null,tabindex:"-1"},l,{style:{zIndex:"".concat(2e4+i)},class:Object.assign(Object.assign({},getClassMap(this.cssClass)),(t={},t[s]=true,t["overlay-hidden"]=true,t["alert-translucent"]=this.translucent,t)),onIonAlertWillDismiss:this.dispatchCancelHandler,onIonBackdropTap:this.onBackdropTap}),h("ion-backdrop",{key:"4b4693dca3c910aa9a61c4d90295d785ec6cbe3d",tappable:this.backdropDismiss}),h("div",{key:"64fd19b8f1d8246dcc869053f858bc33506def4b",tabindex:"0","aria-hidden":"true"}),h("div",{key:"e61ba6f339c3a02cecd37d8b641ee5043018eb29",class:"alert-wrapper ion-overlay-wrapper",ref:function(t){return e.wrapperEl=t}},h("div",{key:"044e00667ffcb74aa2c5e0d0b42669c4004dbb4f",class:"alert-head"},o&&h("h2",{key:"1aaae8d58722c4cf5debb1f00415ab7ed0a52bbd",id:d,class:"alert-title"},o),a&&!o&&h("h2",{key:"9c9854dc3b0ad40f1861a49b76d5636afcae9c74",id:c,class:"alert-sub-title"},a),a&&o&&h("h3",{key:"19aaca9912f77cde4ae8079be210eda697ed8de1",id:c,class:"alert-sub-title"},a)),this.renderAlertMessage(p),this.renderAlertInputs(),this.renderAlertButtons()),h("div",{key:"a85d27c516f7cdbc85b19f40d2f0bd865490b6a7",tabindex:"0","aria-hidden":"true"}))};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"],buttons:["buttonsChanged"],inputs:["inputsChanged"]}},enumerable:false,configurable:true});return t}();var inputClass=function(t){var e,r,i;return Object.assign(Object.assign({"alert-input":true,"alert-input-disabled":((r=(e=t.attributes)===null||e===void 0?void 0:e.disabled)!==null&&r!==void 0?r:t.disabled)||false},getClassMap(t.cssClass)),getClassMap(t.attributes?(i=t.attributes.class)===null||i===void 0?void 0:i.toString():""))};var buttonClass=function(t){var e;return Object.assign((e={"alert-button":true,"ion-focusable":true,"ion-activatable":true},e["alert-button-role-".concat(t.role)]=t.role!==undefined,e),getClassMap(t.cssClass))};Alert.style={ios:IonAlertIosStyle0,md:IonAlertMdStyle0};export{Alert as ion_alert};
|