@ionic/core 7.5.5-dev.11699920122.1b01d13b → 7.5.5-dev.11699973147.133125e8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/action-sheet.js +10 -0
- package/components/alert.js +10 -0
- package/components/ion-loading.js +10 -0
- package/components/ion-modal.js +10 -1
- package/components/ion-picker.js +10 -0
- package/components/ion-toast.js +10 -0
- package/components/popover.js +1 -0
- package/dist/cjs/ion-action-sheet.cjs.entry.js +10 -0
- package/dist/cjs/ion-alert.cjs.entry.js +10 -0
- package/dist/cjs/ion-datetime_3.cjs.entry.js +10 -0
- package/dist/cjs/ion-loading.cjs.entry.js +10 -0
- package/dist/cjs/ion-modal.cjs.entry.js +10 -1
- package/dist/cjs/ion-popover.cjs.entry.js +1 -0
- package/dist/cjs/ion-toast.cjs.entry.js +10 -0
- package/dist/collection/components/action-sheet/action-sheet.js +10 -0
- package/dist/collection/components/alert/alert.js +10 -0
- package/dist/collection/components/loading/loading.js +10 -0
- package/dist/collection/components/modal/modal.js +10 -1
- package/dist/collection/components/picker/picker.js +10 -0
- package/dist/collection/components/popover/popover.js +1 -0
- package/dist/collection/components/toast/toast.js +10 -0
- package/dist/docs.json +1 -1
- package/dist/esm/ion-action-sheet.entry.js +10 -0
- package/dist/esm/ion-alert.entry.js +10 -0
- package/dist/esm/ion-datetime_3.entry.js +10 -0
- package/dist/esm/ion-loading.entry.js +10 -0
- package/dist/esm/ion-modal.entry.js +10 -1
- package/dist/esm/ion-popover.entry.js +1 -0
- package/dist/esm/ion-toast.entry.js +10 -0
- package/dist/esm-es5/ion-action-sheet.entry.js +1 -1
- package/dist/esm-es5/ion-alert.entry.js +1 -1
- package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
- package/dist/esm-es5/ion-loading.entry.js +1 -1
- package/dist/esm-es5/ion-modal.entry.js +1 -1
- package/dist/esm-es5/ion-popover.entry.js +1 -1
- package/dist/esm-es5/ion-toast.entry.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-084413f2.system.entry.js → p-1064b07d.system.entry.js} +1 -1
- package/dist/ionic/p-2c0efcd2.entry.js +4 -0
- package/dist/ionic/p-5c450c05.entry.js +4 -0
- package/dist/ionic/{p-eb5283b6.entry.js → p-67533ca1.entry.js} +1 -1
- package/dist/ionic/p-70220d09.entry.js +4 -0
- package/dist/ionic/{p-60f55715.system.entry.js → p-77b29c4a.system.entry.js} +1 -1
- package/dist/ionic/{p-40c0c580.system.entry.js → p-8973f391.system.entry.js} +1 -1
- package/dist/ionic/{p-a18ba684.entry.js → p-8b3e45d3.entry.js} +1 -1
- package/dist/ionic/{p-da392390.system.entry.js → p-9f72b991.system.entry.js} +1 -1
- package/dist/ionic/p-a29cecc2.entry.js +4 -0
- package/dist/ionic/{p-9a1f6169.system.entry.js → p-af6eaef2.system.entry.js} +1 -1
- package/dist/ionic/{p-cbbefe72.system.entry.js → p-b339a7ab.system.entry.js} +1 -1
- package/dist/ionic/p-c1db8914.system.js +1 -1
- package/dist/ionic/{p-4eb8645b.system.entry.js → p-c5adc430.system.entry.js} +1 -1
- package/dist/ionic/{p-a3545dad.entry.js → p-e3d5192b.entry.js} +1 -1
- package/hydrate/index.js +61 -1
- package/package.json +1 -1
- package/dist/ionic/p-0816f061.entry.js +0 -4
- package/dist/ionic/p-565d1dc5.entry.js +0 -4
- package/dist/ionic/p-a5b3aa82.entry.js +0 -4
- package/dist/ionic/p-e9b44bf1.entry.js +0 -4
|
@@ -265,6 +265,16 @@ const ActionSheet = /*@__PURE__*/ proxyCustomElement(class ActionSheet extends H
|
|
|
265
265
|
if (this.isOpen === true) {
|
|
266
266
|
raf(() => this.present());
|
|
267
267
|
}
|
|
268
|
+
/**
|
|
269
|
+
* When binding values in frameworks such as Angular
|
|
270
|
+
* it is possible for the value to be set after the Web Component
|
|
271
|
+
* initializes but before the value watcher is set up in Stencil.
|
|
272
|
+
* As a result, the watcher callback may not be fired.
|
|
273
|
+
* We work around this by manually calling the watcher
|
|
274
|
+
* callback when the component has loaded and the watcher
|
|
275
|
+
* is configured.
|
|
276
|
+
*/
|
|
277
|
+
this.triggerChanged();
|
|
268
278
|
}
|
|
269
279
|
render() {
|
|
270
280
|
const { header, htmlAttributes, overlayIndex } = this;
|
package/components/alert.js
CHANGED
|
@@ -285,6 +285,16 @@ const Alert = /*@__PURE__*/ proxyCustomElement(class Alert extends HTMLElement {
|
|
|
285
285
|
if (this.isOpen === true) {
|
|
286
286
|
raf(() => this.present());
|
|
287
287
|
}
|
|
288
|
+
/**
|
|
289
|
+
* When binding values in frameworks such as Angular
|
|
290
|
+
* it is possible for the value to be set after the Web Component
|
|
291
|
+
* initializes but before the value watcher is set up in Stencil.
|
|
292
|
+
* As a result, the watcher callback may not be fired.
|
|
293
|
+
* We work around this by manually calling the watcher
|
|
294
|
+
* callback when the component has loaded and the watcher
|
|
295
|
+
* is configured.
|
|
296
|
+
*/
|
|
297
|
+
this.triggerChanged();
|
|
288
298
|
}
|
|
289
299
|
/**
|
|
290
300
|
* Present the alert overlay after it has been created.
|
|
@@ -175,6 +175,16 @@ const Loading = /*@__PURE__*/ proxyCustomElement(class Loading extends HTMLEleme
|
|
|
175
175
|
if (this.isOpen === true) {
|
|
176
176
|
raf(() => this.present());
|
|
177
177
|
}
|
|
178
|
+
/**
|
|
179
|
+
* When binding values in frameworks such as Angular
|
|
180
|
+
* it is possible for the value to be set after the Web Component
|
|
181
|
+
* initializes but before the value watcher is set up in Stencil.
|
|
182
|
+
* As a result, the watcher callback may not be fired.
|
|
183
|
+
* We work around this by manually calling the watcher
|
|
184
|
+
* callback when the component has loaded and the watcher
|
|
185
|
+
* is configured.
|
|
186
|
+
*/
|
|
187
|
+
this.triggerChanged();
|
|
178
188
|
}
|
|
179
189
|
disconnectedCallback() {
|
|
180
190
|
this.triggerController.removeClickListener();
|
package/components/ion-modal.js
CHANGED
|
@@ -1206,7 +1206,6 @@ const Modal = /*@__PURE__*/ proxyCustomElement(class Modal extends HTMLElement {
|
|
|
1206
1206
|
connectedCallback() {
|
|
1207
1207
|
const { el } = this;
|
|
1208
1208
|
prepareOverlay(el);
|
|
1209
|
-
this.triggerChanged();
|
|
1210
1209
|
}
|
|
1211
1210
|
disconnectedCallback() {
|
|
1212
1211
|
this.triggerController.removeClickListener();
|
|
@@ -1232,6 +1231,16 @@ const Modal = /*@__PURE__*/ proxyCustomElement(class Modal extends HTMLElement {
|
|
|
1232
1231
|
raf(() => this.present());
|
|
1233
1232
|
}
|
|
1234
1233
|
this.breakpointsChanged(this.breakpoints);
|
|
1234
|
+
/**
|
|
1235
|
+
* When binding values in frameworks such as Angular
|
|
1236
|
+
* it is possible for the value to be set after the Web Component
|
|
1237
|
+
* initializes but before the value watcher is set up in Stencil.
|
|
1238
|
+
* As a result, the watcher callback may not be fired.
|
|
1239
|
+
* We work around this by manually calling the watcher
|
|
1240
|
+
* callback when the component has loaded and the watcher
|
|
1241
|
+
* is configured.
|
|
1242
|
+
*/
|
|
1243
|
+
this.triggerChanged();
|
|
1235
1244
|
}
|
|
1236
1245
|
/**
|
|
1237
1246
|
* Determines whether or not an overlay
|
package/components/ion-picker.js
CHANGED
|
@@ -134,6 +134,16 @@ const Picker = /*@__PURE__*/ proxyCustomElement(class Picker extends HTMLElement
|
|
|
134
134
|
if (this.isOpen === true) {
|
|
135
135
|
raf(() => this.present());
|
|
136
136
|
}
|
|
137
|
+
/**
|
|
138
|
+
* When binding values in frameworks such as Angular
|
|
139
|
+
* it is possible for the value to be set after the Web Component
|
|
140
|
+
* initializes but before the value watcher is set up in Stencil.
|
|
141
|
+
* As a result, the watcher callback may not be fired.
|
|
142
|
+
* We work around this by manually calling the watcher
|
|
143
|
+
* callback when the component has loaded and the watcher
|
|
144
|
+
* is configured.
|
|
145
|
+
*/
|
|
146
|
+
this.triggerChanged();
|
|
137
147
|
}
|
|
138
148
|
/**
|
|
139
149
|
* Present the picker overlay after it has been created.
|
package/components/ion-toast.js
CHANGED
|
@@ -269,6 +269,16 @@ const Toast = /*@__PURE__*/ proxyCustomElement(class Toast extends HTMLElement {
|
|
|
269
269
|
if (this.isOpen === true) {
|
|
270
270
|
raf(() => this.present());
|
|
271
271
|
}
|
|
272
|
+
/**
|
|
273
|
+
* When binding values in frameworks such as Angular
|
|
274
|
+
* it is possible for the value to be set after the Web Component
|
|
275
|
+
* initializes but before the value watcher is set up in Stencil.
|
|
276
|
+
* As a result, the watcher callback may not be fired.
|
|
277
|
+
* We work around this by manually calling the watcher
|
|
278
|
+
* callback when the component has loaded and the watcher
|
|
279
|
+
* is configured.
|
|
280
|
+
*/
|
|
281
|
+
this.triggerChanged();
|
|
272
282
|
}
|
|
273
283
|
/**
|
|
274
284
|
* Present the toast overlay after it has been created.
|
package/components/popover.js
CHANGED
|
@@ -1107,6 +1107,7 @@ const Popover = /*@__PURE__*/ proxyCustomElement(class Popover extends HTMLEleme
|
|
|
1107
1107
|
this.dismiss(undefined, undefined, false);
|
|
1108
1108
|
});
|
|
1109
1109
|
}
|
|
1110
|
+
this.configureTriggerInteraction();
|
|
1110
1111
|
}
|
|
1111
1112
|
/**
|
|
1112
1113
|
* When opening a popover from a trigger, we should not be
|
|
@@ -273,6 +273,16 @@ const ActionSheet = class {
|
|
|
273
273
|
if (this.isOpen === true) {
|
|
274
274
|
helpers.raf(() => this.present());
|
|
275
275
|
}
|
|
276
|
+
/**
|
|
277
|
+
* When binding values in frameworks such as Angular
|
|
278
|
+
* it is possible for the value to be set after the Web Component
|
|
279
|
+
* initializes but before the value watcher is set up in Stencil.
|
|
280
|
+
* As a result, the watcher callback may not be fired.
|
|
281
|
+
* We work around this by manually calling the watcher
|
|
282
|
+
* callback when the component has loaded and the watcher
|
|
283
|
+
* is configured.
|
|
284
|
+
*/
|
|
285
|
+
this.triggerChanged();
|
|
276
286
|
}
|
|
277
287
|
render() {
|
|
278
288
|
const { header, htmlAttributes, overlayIndex } = this;
|
|
@@ -294,6 +294,16 @@ const Alert = class {
|
|
|
294
294
|
if (this.isOpen === true) {
|
|
295
295
|
helpers.raf(() => this.present());
|
|
296
296
|
}
|
|
297
|
+
/**
|
|
298
|
+
* When binding values in frameworks such as Angular
|
|
299
|
+
* it is possible for the value to be set after the Web Component
|
|
300
|
+
* initializes but before the value watcher is set up in Stencil.
|
|
301
|
+
* As a result, the watcher callback may not be fired.
|
|
302
|
+
* We work around this by manually calling the watcher
|
|
303
|
+
* callback when the component has loaded and the watcher
|
|
304
|
+
* is configured.
|
|
305
|
+
*/
|
|
306
|
+
this.triggerChanged();
|
|
297
307
|
}
|
|
298
308
|
/**
|
|
299
309
|
* Present the alert overlay after it has been created.
|
|
@@ -1857,6 +1857,16 @@ const Picker = class {
|
|
|
1857
1857
|
if (this.isOpen === true) {
|
|
1858
1858
|
helpers.raf(() => this.present());
|
|
1859
1859
|
}
|
|
1860
|
+
/**
|
|
1861
|
+
* When binding values in frameworks such as Angular
|
|
1862
|
+
* it is possible for the value to be set after the Web Component
|
|
1863
|
+
* initializes but before the value watcher is set up in Stencil.
|
|
1864
|
+
* As a result, the watcher callback may not be fired.
|
|
1865
|
+
* We work around this by manually calling the watcher
|
|
1866
|
+
* callback when the component has loaded and the watcher
|
|
1867
|
+
* is configured.
|
|
1868
|
+
*/
|
|
1869
|
+
this.triggerChanged();
|
|
1860
1870
|
}
|
|
1861
1871
|
/**
|
|
1862
1872
|
* Present the picker overlay after it has been created.
|
|
@@ -180,6 +180,16 @@ const Loading = class {
|
|
|
180
180
|
if (this.isOpen === true) {
|
|
181
181
|
helpers.raf(() => this.present());
|
|
182
182
|
}
|
|
183
|
+
/**
|
|
184
|
+
* When binding values in frameworks such as Angular
|
|
185
|
+
* it is possible for the value to be set after the Web Component
|
|
186
|
+
* initializes but before the value watcher is set up in Stencil.
|
|
187
|
+
* As a result, the watcher callback may not be fired.
|
|
188
|
+
* We work around this by manually calling the watcher
|
|
189
|
+
* callback when the component has loaded and the watcher
|
|
190
|
+
* is configured.
|
|
191
|
+
*/
|
|
192
|
+
this.triggerChanged();
|
|
183
193
|
}
|
|
184
194
|
disconnectedCallback() {
|
|
185
195
|
this.triggerController.removeClickListener();
|
|
@@ -1210,7 +1210,6 @@ const Modal = class {
|
|
|
1210
1210
|
connectedCallback() {
|
|
1211
1211
|
const { el } = this;
|
|
1212
1212
|
overlays.prepareOverlay(el);
|
|
1213
|
-
this.triggerChanged();
|
|
1214
1213
|
}
|
|
1215
1214
|
disconnectedCallback() {
|
|
1216
1215
|
this.triggerController.removeClickListener();
|
|
@@ -1236,6 +1235,16 @@ const Modal = class {
|
|
|
1236
1235
|
helpers.raf(() => this.present());
|
|
1237
1236
|
}
|
|
1238
1237
|
this.breakpointsChanged(this.breakpoints);
|
|
1238
|
+
/**
|
|
1239
|
+
* When binding values in frameworks such as Angular
|
|
1240
|
+
* it is possible for the value to be set after the Web Component
|
|
1241
|
+
* initializes but before the value watcher is set up in Stencil.
|
|
1242
|
+
* As a result, the watcher callback may not be fired.
|
|
1243
|
+
* We work around this by manually calling the watcher
|
|
1244
|
+
* callback when the component has loaded and the watcher
|
|
1245
|
+
* is configured.
|
|
1246
|
+
*/
|
|
1247
|
+
this.triggerChanged();
|
|
1239
1248
|
}
|
|
1240
1249
|
/**
|
|
1241
1250
|
* Determines whether or not an overlay
|
|
@@ -271,6 +271,16 @@ const Toast = class {
|
|
|
271
271
|
if (this.isOpen === true) {
|
|
272
272
|
helpers.raf(() => this.present());
|
|
273
273
|
}
|
|
274
|
+
/**
|
|
275
|
+
* When binding values in frameworks such as Angular
|
|
276
|
+
* it is possible for the value to be set after the Web Component
|
|
277
|
+
* initializes but before the value watcher is set up in Stencil.
|
|
278
|
+
* As a result, the watcher callback may not be fired.
|
|
279
|
+
* We work around this by manually calling the watcher
|
|
280
|
+
* callback when the component has loaded and the watcher
|
|
281
|
+
* is configured.
|
|
282
|
+
*/
|
|
283
|
+
this.triggerChanged();
|
|
274
284
|
}
|
|
275
285
|
/**
|
|
276
286
|
* Present the toast overlay after it has been created.
|
|
@@ -169,6 +169,16 @@ export class ActionSheet {
|
|
|
169
169
|
if (this.isOpen === true) {
|
|
170
170
|
raf(() => this.present());
|
|
171
171
|
}
|
|
172
|
+
/**
|
|
173
|
+
* When binding values in frameworks such as Angular
|
|
174
|
+
* it is possible for the value to be set after the Web Component
|
|
175
|
+
* initializes but before the value watcher is set up in Stencil.
|
|
176
|
+
* As a result, the watcher callback may not be fired.
|
|
177
|
+
* We work around this by manually calling the watcher
|
|
178
|
+
* callback when the component has loaded and the watcher
|
|
179
|
+
* is configured.
|
|
180
|
+
*/
|
|
181
|
+
this.triggerChanged();
|
|
172
182
|
}
|
|
173
183
|
render() {
|
|
174
184
|
const { header, htmlAttributes, overlayIndex } = this;
|
|
@@ -192,6 +192,16 @@ export class Alert {
|
|
|
192
192
|
if (this.isOpen === true) {
|
|
193
193
|
raf(() => this.present());
|
|
194
194
|
}
|
|
195
|
+
/**
|
|
196
|
+
* When binding values in frameworks such as Angular
|
|
197
|
+
* it is possible for the value to be set after the Web Component
|
|
198
|
+
* initializes but before the value watcher is set up in Stencil.
|
|
199
|
+
* As a result, the watcher callback may not be fired.
|
|
200
|
+
* We work around this by manually calling the watcher
|
|
201
|
+
* callback when the component has loaded and the watcher
|
|
202
|
+
* is configured.
|
|
203
|
+
*/
|
|
204
|
+
this.triggerChanged();
|
|
195
205
|
}
|
|
196
206
|
/**
|
|
197
207
|
* Present the alert overlay after it has been created.
|
|
@@ -79,6 +79,16 @@ export class Loading {
|
|
|
79
79
|
if (this.isOpen === true) {
|
|
80
80
|
raf(() => this.present());
|
|
81
81
|
}
|
|
82
|
+
/**
|
|
83
|
+
* When binding values in frameworks such as Angular
|
|
84
|
+
* it is possible for the value to be set after the Web Component
|
|
85
|
+
* initializes but before the value watcher is set up in Stencil.
|
|
86
|
+
* As a result, the watcher callback may not be fired.
|
|
87
|
+
* We work around this by manually calling the watcher
|
|
88
|
+
* callback when the component has loaded and the watcher
|
|
89
|
+
* is configured.
|
|
90
|
+
*/
|
|
91
|
+
this.triggerChanged();
|
|
82
92
|
}
|
|
83
93
|
disconnectedCallback() {
|
|
84
94
|
this.triggerController.removeClickListener();
|
|
@@ -125,7 +125,6 @@ export class Modal {
|
|
|
125
125
|
connectedCallback() {
|
|
126
126
|
const { el } = this;
|
|
127
127
|
prepareOverlay(el);
|
|
128
|
-
this.triggerChanged();
|
|
129
128
|
}
|
|
130
129
|
disconnectedCallback() {
|
|
131
130
|
this.triggerController.removeClickListener();
|
|
@@ -151,6 +150,16 @@ export class Modal {
|
|
|
151
150
|
raf(() => this.present());
|
|
152
151
|
}
|
|
153
152
|
this.breakpointsChanged(this.breakpoints);
|
|
153
|
+
/**
|
|
154
|
+
* When binding values in frameworks such as Angular
|
|
155
|
+
* it is possible for the value to be set after the Web Component
|
|
156
|
+
* initializes but before the value watcher is set up in Stencil.
|
|
157
|
+
* As a result, the watcher callback may not be fired.
|
|
158
|
+
* We work around this by manually calling the watcher
|
|
159
|
+
* callback when the component has loaded and the watcher
|
|
160
|
+
* is configured.
|
|
161
|
+
*/
|
|
162
|
+
this.triggerChanged();
|
|
154
163
|
}
|
|
155
164
|
/**
|
|
156
165
|
* Determines whether or not an overlay
|
|
@@ -78,6 +78,16 @@ export class Picker {
|
|
|
78
78
|
if (this.isOpen === true) {
|
|
79
79
|
raf(() => this.present());
|
|
80
80
|
}
|
|
81
|
+
/**
|
|
82
|
+
* When binding values in frameworks such as Angular
|
|
83
|
+
* it is possible for the value to be set after the Web Component
|
|
84
|
+
* initializes but before the value watcher is set up in Stencil.
|
|
85
|
+
* As a result, the watcher callback may not be fired.
|
|
86
|
+
* We work around this by manually calling the watcher
|
|
87
|
+
* callback when the component has loaded and the watcher
|
|
88
|
+
* is configured.
|
|
89
|
+
*/
|
|
90
|
+
this.triggerChanged();
|
|
81
91
|
}
|
|
82
92
|
/**
|
|
83
93
|
* Present the picker overlay after it has been created.
|
|
@@ -96,6 +96,16 @@ export class Toast {
|
|
|
96
96
|
if (this.isOpen === true) {
|
|
97
97
|
raf(() => this.present());
|
|
98
98
|
}
|
|
99
|
+
/**
|
|
100
|
+
* When binding values in frameworks such as Angular
|
|
101
|
+
* it is possible for the value to be set after the Web Component
|
|
102
|
+
* initializes but before the value watcher is set up in Stencil.
|
|
103
|
+
* As a result, the watcher callback may not be fired.
|
|
104
|
+
* We work around this by manually calling the watcher
|
|
105
|
+
* callback when the component has loaded and the watcher
|
|
106
|
+
* is configured.
|
|
107
|
+
*/
|
|
108
|
+
this.triggerChanged();
|
|
99
109
|
}
|
|
100
110
|
/**
|
|
101
111
|
* Present the toast overlay after it has been created.
|
package/dist/docs.json
CHANGED
|
@@ -269,6 +269,16 @@ const ActionSheet = class {
|
|
|
269
269
|
if (this.isOpen === true) {
|
|
270
270
|
raf(() => this.present());
|
|
271
271
|
}
|
|
272
|
+
/**
|
|
273
|
+
* When binding values in frameworks such as Angular
|
|
274
|
+
* it is possible for the value to be set after the Web Component
|
|
275
|
+
* initializes but before the value watcher is set up in Stencil.
|
|
276
|
+
* As a result, the watcher callback may not be fired.
|
|
277
|
+
* We work around this by manually calling the watcher
|
|
278
|
+
* callback when the component has loaded and the watcher
|
|
279
|
+
* is configured.
|
|
280
|
+
*/
|
|
281
|
+
this.triggerChanged();
|
|
272
282
|
}
|
|
273
283
|
render() {
|
|
274
284
|
const { header, htmlAttributes, overlayIndex } = this;
|
|
@@ -290,6 +290,16 @@ const Alert = class {
|
|
|
290
290
|
if (this.isOpen === true) {
|
|
291
291
|
raf(() => this.present());
|
|
292
292
|
}
|
|
293
|
+
/**
|
|
294
|
+
* When binding values in frameworks such as Angular
|
|
295
|
+
* it is possible for the value to be set after the Web Component
|
|
296
|
+
* initializes but before the value watcher is set up in Stencil.
|
|
297
|
+
* As a result, the watcher callback may not be fired.
|
|
298
|
+
* We work around this by manually calling the watcher
|
|
299
|
+
* callback when the component has loaded and the watcher
|
|
300
|
+
* is configured.
|
|
301
|
+
*/
|
|
302
|
+
this.triggerChanged();
|
|
293
303
|
}
|
|
294
304
|
/**
|
|
295
305
|
* Present the alert overlay after it has been created.
|
|
@@ -1853,6 +1853,16 @@ const Picker = class {
|
|
|
1853
1853
|
if (this.isOpen === true) {
|
|
1854
1854
|
raf(() => this.present());
|
|
1855
1855
|
}
|
|
1856
|
+
/**
|
|
1857
|
+
* When binding values in frameworks such as Angular
|
|
1858
|
+
* it is possible for the value to be set after the Web Component
|
|
1859
|
+
* initializes but before the value watcher is set up in Stencil.
|
|
1860
|
+
* As a result, the watcher callback may not be fired.
|
|
1861
|
+
* We work around this by manually calling the watcher
|
|
1862
|
+
* callback when the component has loaded and the watcher
|
|
1863
|
+
* is configured.
|
|
1864
|
+
*/
|
|
1865
|
+
this.triggerChanged();
|
|
1856
1866
|
}
|
|
1857
1867
|
/**
|
|
1858
1868
|
* Present the picker overlay after it has been created.
|
|
@@ -176,6 +176,16 @@ const Loading = class {
|
|
|
176
176
|
if (this.isOpen === true) {
|
|
177
177
|
raf(() => this.present());
|
|
178
178
|
}
|
|
179
|
+
/**
|
|
180
|
+
* When binding values in frameworks such as Angular
|
|
181
|
+
* it is possible for the value to be set after the Web Component
|
|
182
|
+
* initializes but before the value watcher is set up in Stencil.
|
|
183
|
+
* As a result, the watcher callback may not be fired.
|
|
184
|
+
* We work around this by manually calling the watcher
|
|
185
|
+
* callback when the component has loaded and the watcher
|
|
186
|
+
* is configured.
|
|
187
|
+
*/
|
|
188
|
+
this.triggerChanged();
|
|
179
189
|
}
|
|
180
190
|
disconnectedCallback() {
|
|
181
191
|
this.triggerController.removeClickListener();
|
|
@@ -1206,7 +1206,6 @@ const Modal = class {
|
|
|
1206
1206
|
connectedCallback() {
|
|
1207
1207
|
const { el } = this;
|
|
1208
1208
|
prepareOverlay(el);
|
|
1209
|
-
this.triggerChanged();
|
|
1210
1209
|
}
|
|
1211
1210
|
disconnectedCallback() {
|
|
1212
1211
|
this.triggerController.removeClickListener();
|
|
@@ -1232,6 +1231,16 @@ const Modal = class {
|
|
|
1232
1231
|
raf(() => this.present());
|
|
1233
1232
|
}
|
|
1234
1233
|
this.breakpointsChanged(this.breakpoints);
|
|
1234
|
+
/**
|
|
1235
|
+
* When binding values in frameworks such as Angular
|
|
1236
|
+
* it is possible for the value to be set after the Web Component
|
|
1237
|
+
* initializes but before the value watcher is set up in Stencil.
|
|
1238
|
+
* As a result, the watcher callback may not be fired.
|
|
1239
|
+
* We work around this by manually calling the watcher
|
|
1240
|
+
* callback when the component has loaded and the watcher
|
|
1241
|
+
* is configured.
|
|
1242
|
+
*/
|
|
1243
|
+
this.triggerChanged();
|
|
1235
1244
|
}
|
|
1236
1245
|
/**
|
|
1237
1246
|
* Determines whether or not an overlay
|
|
@@ -267,6 +267,16 @@ const Toast = class {
|
|
|
267
267
|
if (this.isOpen === true) {
|
|
268
268
|
raf(() => this.present());
|
|
269
269
|
}
|
|
270
|
+
/**
|
|
271
|
+
* When binding values in frameworks such as Angular
|
|
272
|
+
* it is possible for the value to be set after the Web Component
|
|
273
|
+
* initializes but before the value watcher is set up in Stencil.
|
|
274
|
+
* As a result, the watcher callback may not be fired.
|
|
275
|
+
* We work around this by manually calling the watcher
|
|
276
|
+
* callback when the component has loaded and the watcher
|
|
277
|
+
* is configured.
|
|
278
|
+
*/
|
|
279
|
+
this.triggerChanged();
|
|
270
280
|
}
|
|
271
281
|
/**
|
|
272
282
|
* Present the toast overlay after it has been created.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import{__awaiter,__generator}from"tslib";
|
|
2
2
|
/*!
|
|
3
3
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
4
|
-
*/import{r as registerInstance,d as createEvent,e as readTask,h,H as Host,f as getElement}from"./index-4392ebcb.js";import{c as createButtonActiveGesture}from"./button-active-1fb561b0.js";import{r as raf}from"./helpers-3379ba19.js";import{c as createLockController}from"./lock-controller-e8c6c051.js";import{d as createDelegateController,e as createTriggerController,B as BACKDROP,i as isCancel,f as present,g as dismiss,h as eventMethod,s as safeCall,j as prepareOverlay,k as setOverlayId}from"./overlays-928a4afe.js";import{g as getClassMap}from"./theme-17531cdf.js";import{b as getIonMode}from"./ionic-global-7efdecd0.js";import{c as createAnimation}from"./animation-8aa13916.js";import"./haptic-1243b917.js";import"./capacitor-b4979570.js";import"./index-7a14ecec.js";import"./index-ff313b19.js";import"./gesture-controller-0fa396c4.js";import"./framework-delegate-aa433dea.js";import"./hardware-back-button-39299f84.js";import"./index-595d62c9.js";var iosEnterAnimation=function(t){var e=createAnimation();var o=createAnimation();var n=createAnimation();o.addElement(t.querySelector("ion-backdrop")).fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]);n.addElement(t.querySelector(".action-sheet-wrapper")).fromTo("transform","translateY(100%)","translateY(0%)");return e.addElement(t).easing("cubic-bezier(.36,.66,.04,1)").duration(400).addAnimation([o,n])};var iosLeaveAnimation=function(t){var e=createAnimation();var o=createAnimation();var n=createAnimation();o.addElement(t.querySelector("ion-backdrop")).fromTo("opacity","var(--backdrop-opacity)",0);n.addElement(t.querySelector(".action-sheet-wrapper")).fromTo("transform","translateY(0%)","translateY(100%)");return e.addElement(t).easing("cubic-bezier(.36,.66,.04,1)").duration(450).addAnimation([o,n])};var mdEnterAnimation=function(t){var e=createAnimation();var o=createAnimation();var n=createAnimation();o.addElement(t.querySelector("ion-backdrop")).fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]);n.addElement(t.querySelector(".action-sheet-wrapper")).fromTo("transform","translateY(100%)","translateY(0%)");return e.addElement(t).easing("cubic-bezier(.36,.66,.04,1)").duration(400).addAnimation([o,n])};var mdLeaveAnimation=function(t){var e=createAnimation();var o=createAnimation();var n=createAnimation();o.addElement(t.querySelector("ion-backdrop")).fromTo("opacity","var(--backdrop-opacity)",0);n.addElement(t.querySelector(".action-sheet-wrapper")).fromTo("transform","translateY(0%)","translateY(100%)");return e.addElement(t).easing("cubic-bezier(.36,.66,.04,1)").duration(450).addAnimation([o,n])};var actionSheetIosCss='.sc-ion-action-sheet-ios-h{--color:initial;--button-color-activated:var(--button-color);--button-color-focused:var(--button-color);--button-color-hover:var(--button-color);--button-color-selected:var(--button-color);--min-width:auto;--width:100%;--max-width:500px;--min-height:auto;--height:auto;--max-height:calc(100% - (var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;right:0;top:0;bottom:0;display:block;position:fixed;outline:none;font-family:var(--ion-font-family, inherit);-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1001}.overlay-hidden.sc-ion-action-sheet-ios-h{display:none}.action-sheet-wrapper.sc-ion-action-sheet-ios{left:0;right:0;bottom:0;-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0);display:block;position:absolute;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);z-index:10;pointer-events:none}.action-sheet-button.sc-ion-action-sheet-ios{display:block;position:relative;width:100%;border:0;outline:none;background:var(--button-background);color:var(--button-color);font-family:inherit;overflow:hidden}.action-sheet-button-inner.sc-ion-action-sheet-ios{display:-ms-flexbox;display:flex;position:relative;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;pointer-events:none;width:100%;height:100%;z-index:1}.action-sheet-container.sc-ion-action-sheet-ios{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:end;justify-content:flex-end;height:100%;max-height:calc(100vh - (var(--ion-safe-area-top, 0) + var(--ion-safe-area-bottom, 0)));max-height:calc(100dvh - (var(--ion-safe-area-top, 0) + var(--ion-safe-area-bottom, 0)))}.action-sheet-group.sc-ion-action-sheet-ios{-ms-flex-negative:2;flex-shrink:2;overscroll-behavior-y:contain;overflow-y:auto;-webkit-overflow-scrolling:touch;pointer-events:all;background:var(--background)}@media (any-pointer: coarse){.action-sheet-group.sc-ion-action-sheet-ios::-webkit-scrollbar{display:none}}.action-sheet-group-cancel.sc-ion-action-sheet-ios{-ms-flex-negative:0;flex-shrink:0;overflow:hidden}.action-sheet-button.sc-ion-action-sheet-ios::after{left:0;right:0;top:0;bottom:0;position:absolute;content:"";opacity:0}.action-sheet-selected.sc-ion-action-sheet-ios{color:var(--button-color-selected)}.action-sheet-selected.sc-ion-action-sheet-ios::after{background:var(--button-background-selected);opacity:var(--button-background-selected-opacity)}.action-sheet-button.ion-activated.sc-ion-action-sheet-ios{color:var(--button-color-activated)}.action-sheet-button.ion-activated.sc-ion-action-sheet-ios::after{background:var(--button-background-activated);opacity:var(--button-background-activated-opacity)}.action-sheet-button.ion-focused.sc-ion-action-sheet-ios{color:var(--button-color-focused)}.action-sheet-button.ion-focused.sc-ion-action-sheet-ios::after{background:var(--button-background-focused);opacity:var(--button-background-focused-opacity)}@media (any-hover: hover){.action-sheet-button.sc-ion-action-sheet-ios:hover{color:var(--button-color-hover)}.action-sheet-button.sc-ion-action-sheet-ios:hover::after{background:var(--button-background-hover);opacity:var(--button-background-hover-opacity)}}.sc-ion-action-sheet-ios-h{--background:var(--ion-overlay-background-color, var(--ion-color-step-100, #f9f9f9));--backdrop-opacity:var(--ion-backdrop-opacity, 0.4);--button-background:linear-gradient(0deg, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08), rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08) 50%, transparent 50%) bottom/100% 1px no-repeat transparent;--button-background-activated:var(--ion-text-color, #000);--button-background-activated-opacity:.08;--button-background-hover:currentColor;--button-background-hover-opacity:.04;--button-background-focused:currentColor;--button-background-focused-opacity:.12;--button-background-selected:var(--ion-color-step-150, var(--ion-background-color, #fff));--button-background-selected-opacity:1;--button-color:var(--ion-color-primary, #3880ff);--color:var(--ion-color-step-400, #999999);text-align:center}.action-sheet-wrapper.sc-ion-action-sheet-ios{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:var(--ion-safe-area-top, 0);margin-bottom:var(--ion-safe-area-bottom, 0)}.action-sheet-container.sc-ion-action-sheet-ios{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:0;padding-bottom:0}.action-sheet-group.sc-ion-action-sheet-ios{border-radius:13px;margin-bottom:8px}.action-sheet-group.sc-ion-action-sheet-ios:first-child{margin-top:10px}.action-sheet-group.sc-ion-action-sheet-ios:last-child{margin-bottom:10px}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-group.sc-ion-action-sheet-ios{background-color:transparent;-webkit-backdrop-filter:saturate(280%) blur(20px);backdrop-filter:saturate(280%) blur(20px)}.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-title.sc-ion-action-sheet-ios,.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-button.sc-ion-action-sheet-ios{background-color:transparent;background-image:-webkit-gradient(linear, left bottom, left top, from(rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8)), to(rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8))), -webkit-gradient(linear, left bottom, left top, from(rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.4)), color-stop(50%, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.4)), color-stop(50%, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8)));background-image:linear-gradient(0deg, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8), rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8) 100%), linear-gradient(0deg, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.4), rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.4) 50%, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8) 50%);background-repeat:no-repeat;background-position:top, bottom;background-size:100% calc(100% - 1px), 100% 1px;-webkit-backdrop-filter:saturate(120%);backdrop-filter:saturate(120%)}.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-button.ion-activated.sc-ion-action-sheet-ios{background-color:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.7);background-image:none}.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-cancel.sc-ion-action-sheet-ios{background:var(--button-background-selected)}}.action-sheet-title.sc-ion-action-sheet-ios{background:-webkit-gradient(linear, left bottom, left top, from(rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08)), color-stop(50%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08)), color-stop(50%, transparent)) bottom/100% 1px no-repeat transparent;background:linear-gradient(0deg, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08), rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08) 50%, transparent 50%) bottom/100% 1px no-repeat transparent}.action-sheet-title.sc-ion-action-sheet-ios{-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:14px;padding-bottom:13px;color:var(--color, var(--ion-color-step-400, #999999));font-size:max(13px, 0.8125rem);font-weight:400;text-align:center}.action-sheet-title.action-sheet-has-sub-title.sc-ion-action-sheet-ios{font-weight:600}.action-sheet-sub-title.sc-ion-action-sheet-ios{padding-left:0;padding-right:0;padding-top:6px;padding-bottom:0;font-size:max(13px, 0.8125rem);font-weight:400}.action-sheet-button.sc-ion-action-sheet-ios{-webkit-padding-start:14px;padding-inline-start:14px;-webkit-padding-end:14px;padding-inline-end:14px;padding-top:14px;padding-bottom:14px;min-height:56px;font-size:max(20px, 1.25rem);contain:content}.action-sheet-button.sc-ion-action-sheet-ios .action-sheet-icon.sc-ion-action-sheet-ios{-webkit-margin-end:0.3em;margin-inline-end:0.3em;font-size:max(28px, 1.75rem);pointer-events:none}.action-sheet-button.sc-ion-action-sheet-ios:last-child{background-image:none}.action-sheet-selected.sc-ion-action-sheet-ios{font-weight:bold}.action-sheet-cancel.sc-ion-action-sheet-ios{font-weight:600}.action-sheet-cancel.sc-ion-action-sheet-ios::after{background:var(--button-background-selected);opacity:var(--button-background-selected-opacity)}.action-sheet-destructive.sc-ion-action-sheet-ios,.action-sheet-destructive.ion-activated.sc-ion-action-sheet-ios,.action-sheet-destructive.ion-focused.sc-ion-action-sheet-ios{color:var(--ion-color-danger, #eb445a)}@media (any-hover: hover){.action-sheet-destructive.sc-ion-action-sheet-ios:hover{color:var(--ion-color-danger, #eb445a)}}';var actionSheetMdCss='.sc-ion-action-sheet-md-h{--color:initial;--button-color-activated:var(--button-color);--button-color-focused:var(--button-color);--button-color-hover:var(--button-color);--button-color-selected:var(--button-color);--min-width:auto;--width:100%;--max-width:500px;--min-height:auto;--height:auto;--max-height:calc(100% - (var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;right:0;top:0;bottom:0;display:block;position:fixed;outline:none;font-family:var(--ion-font-family, inherit);-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1001}.overlay-hidden.sc-ion-action-sheet-md-h{display:none}.action-sheet-wrapper.sc-ion-action-sheet-md{left:0;right:0;bottom:0;-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0);display:block;position:absolute;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);z-index:10;pointer-events:none}.action-sheet-button.sc-ion-action-sheet-md{display:block;position:relative;width:100%;border:0;outline:none;background:var(--button-background);color:var(--button-color);font-family:inherit;overflow:hidden}.action-sheet-button-inner.sc-ion-action-sheet-md{display:-ms-flexbox;display:flex;position:relative;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;pointer-events:none;width:100%;height:100%;z-index:1}.action-sheet-container.sc-ion-action-sheet-md{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:end;justify-content:flex-end;height:100%;max-height:calc(100vh - (var(--ion-safe-area-top, 0) + var(--ion-safe-area-bottom, 0)));max-height:calc(100dvh - (var(--ion-safe-area-top, 0) + var(--ion-safe-area-bottom, 0)))}.action-sheet-group.sc-ion-action-sheet-md{-ms-flex-negative:2;flex-shrink:2;overscroll-behavior-y:contain;overflow-y:auto;-webkit-overflow-scrolling:touch;pointer-events:all;background:var(--background)}@media (any-pointer: coarse){.action-sheet-group.sc-ion-action-sheet-md::-webkit-scrollbar{display:none}}.action-sheet-group-cancel.sc-ion-action-sheet-md{-ms-flex-negative:0;flex-shrink:0;overflow:hidden}.action-sheet-button.sc-ion-action-sheet-md::after{left:0;right:0;top:0;bottom:0;position:absolute;content:"";opacity:0}.action-sheet-selected.sc-ion-action-sheet-md{color:var(--button-color-selected)}.action-sheet-selected.sc-ion-action-sheet-md::after{background:var(--button-background-selected);opacity:var(--button-background-selected-opacity)}.action-sheet-button.ion-activated.sc-ion-action-sheet-md{color:var(--button-color-activated)}.action-sheet-button.ion-activated.sc-ion-action-sheet-md::after{background:var(--button-background-activated);opacity:var(--button-background-activated-opacity)}.action-sheet-button.ion-focused.sc-ion-action-sheet-md{color:var(--button-color-focused)}.action-sheet-button.ion-focused.sc-ion-action-sheet-md::after{background:var(--button-background-focused);opacity:var(--button-background-focused-opacity)}@media (any-hover: hover){.action-sheet-button.sc-ion-action-sheet-md:hover{color:var(--button-color-hover)}.action-sheet-button.sc-ion-action-sheet-md:hover::after{background:var(--button-background-hover);opacity:var(--button-background-hover-opacity)}}.sc-ion-action-sheet-md-h{--background:var(--ion-overlay-background-color, var(--ion-background-color, #fff));--backdrop-opacity:var(--ion-backdrop-opacity, 0.32);--button-background:transparent;--button-background-selected:currentColor;--button-background-selected-opacity:0;--button-background-activated:transparent;--button-background-activated-opacity:0;--button-background-hover:currentColor;--button-background-hover-opacity:.04;--button-background-focused:currentColor;--button-background-focused-opacity:.12;--button-color:var(--ion-color-step-850, #262626);--color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.54)}.action-sheet-wrapper.sc-ion-action-sheet-md{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:var(--ion-safe-area-top, 0);margin-bottom:0}.action-sheet-title.sc-ion-action-sheet-md{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:20px;padding-bottom:17px;min-height:60px;color:var(--color, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.54));font-size:1rem;text-align:start}.action-sheet-sub-title.sc-ion-action-sheet-md{padding-left:0;padding-right:0;padding-top:16px;padding-bottom:0;font-size:0.875rem}.action-sheet-group.sc-ion-action-sheet-md:first-child{padding-top:0}.action-sheet-group.sc-ion-action-sheet-md:last-child{padding-bottom:var(--ion-safe-area-bottom)}.action-sheet-button.sc-ion-action-sheet-md{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:12px;padding-bottom:12px;position:relative;min-height:52px;font-size:1rem;text-align:start;contain:content;overflow:hidden}.action-sheet-icon.sc-ion-action-sheet-md{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:32px;margin-inline-end:32px;margin-top:0;margin-bottom:0;color:var(--color);font-size:1.5rem}.action-sheet-button-inner.sc-ion-action-sheet-md{-ms-flex-pack:start;justify-content:flex-start}.action-sheet-selected.sc-ion-action-sheet-md{font-weight:bold}';var ActionSheet=function(){function t(t){var e=this;registerInstance(this,t);this.didPresent=createEvent(this,"ionActionSheetDidPresent",7);this.willPresent=createEvent(this,"ionActionSheetWillPresent",7);this.willDismiss=createEvent(this,"ionActionSheetWillDismiss",7);this.didDismiss=createEvent(this,"ionActionSheetDidDismiss",7);this.didPresentShorthand=createEvent(this,"didPresent",7);this.willPresentShorthand=createEvent(this,"willPresent",7);this.willDismissShorthand=createEvent(this,"willDismiss",7);this.didDismissShorthand=createEvent(this,"didDismiss",7);this.delegateController=createDelegateController(this);this.lockController=createLockController();this.triggerController=createTriggerController();this.presented=false;this.onBackdropTap=function(){e.dismiss(undefined,BACKDROP)};this.dispatchCancelHandler=function(t){var o=t.detail.role;if(isCancel(o)){var n=e.getButtons().find((function(t){return t.role==="cancel"}));e.callButtonHandler(n)}};this.overlayIndex=undefined;this.delegate=undefined;this.hasController=false;this.keyboardClose=true;this.enterAnimation=undefined;this.leaveAnimation=undefined;this.buttons=[];this.cssClass=undefined;this.backdropDismiss=true;this.header=undefined;this.subHeader=undefined;this.translucent=false;this.animated=true;this.htmlAttributes=undefined;this.isOpen=false;this.trigger=undefined}t.prototype.onIsOpenChange=function(t,e){if(t===true&&e===false){this.present()}else if(t===false&&e===true){this.dismiss()}};t.prototype.triggerChanged=function(){var t=this,e=t.trigger,o=t.el,n=t.triggerController;if(e){n.addClickListener(o,e)}};t.prototype.present=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:return[4,this.lockController.lock()];case 1:t=e.sent();return[4,this.delegateController.attachViewToDom()];case 2:e.sent();return[4,present(this,"actionSheetEnter",iosEnterAnimation,mdEnterAnimation)];case 3:e.sent();t();return[2]}}))}))};t.prototype.dismiss=function(t,e){return __awaiter(this,void 0,void 0,(function(){var o,n;return __generator(this,(function(i){switch(i.label){case 0:return[4,this.lockController.lock()];case 1:o=i.sent();return[4,dismiss(this,t,e,"actionSheetLeave",iosLeaveAnimation,mdLeaveAnimation)];case 2:n=i.sent();if(n){this.delegateController.removeViewFromDom()}o();return[2,n]}}))}))};t.prototype.onDidDismiss=function(){return eventMethod(this.el,"ionActionSheetDidDismiss")};t.prototype.onWillDismiss=function(){return eventMethod(this.el,"ionActionSheetWillDismiss")};t.prototype.buttonClick=function(t){return __awaiter(this,void 0,void 0,(function(){var e,o;return __generator(this,(function(n){switch(n.label){case 0:e=t.role;if(isCancel(e)){return[2,this.dismiss(t.data,e)]}return[4,this.callButtonHandler(t)];case 1:o=n.sent();if(o){return[2,this.dismiss(t.data,t.role)]}return[2,Promise.resolve()]}}))}))};t.prototype.callButtonHandler=function(t){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(o){switch(o.label){case 0:if(!t)return[3,2];return[4,safeCall(t.handler)];case 1:e=o.sent();if(e===false){return[2,false]}o.label=2;case 2:return[2,true]}}))}))};t.prototype.getButtons=function(){return this.buttons.map((function(t){return typeof t==="string"?{text:t}:t}))};t.prototype.connectedCallback=function(){prepareOverlay(this.el);this.triggerChanged()};t.prototype.disconnectedCallback=function(){if(this.gesture){this.gesture.destroy();this.gesture=undefined}this.triggerController.removeClickListener()};t.prototype.componentWillLoad=function(){setOverlayId(this.el)};t.prototype.componentDidLoad=function(){var t=this;var e=this,o=e.groupEl,n=e.wrapperEl;if(!this.gesture&&getIonMode(this)==="ios"&&n&&o){readTask((function(){var e=o.scrollHeight>o.clientHeight;if(!e){t.gesture=createButtonActiveGesture(n,(function(t){return t.classList.contains("action-sheet-button")}));t.gesture.enable(true)}}))}if(this.isOpen===true){raf((function(){return t.present()}))}};t.prototype.render=function(){var t;var e=this;var o=this,n=o.header,i=o.htmlAttributes,a=o.overlayIndex;var r=getIonMode(this);var c=this.getButtons();var s=c.find((function(t){return t.role==="cancel"}));var d=c.filter((function(t){return t.role!=="cancel"}));var l="action-sheet-".concat(a,"-header");return h(Host,Object.assign({role:"dialog","aria-modal":"true","aria-labelledby":n!==undefined?l:null,tabindex:"-1"},i,{style:{zIndex:"".concat(2e4+this.overlayIndex)},class:Object.assign(Object.assign((t={},t[r]=true,t),getClassMap(this.cssClass)),{"overlay-hidden":true,"action-sheet-translucent":this.translucent}),onIonActionSheetWillDismiss:this.dispatchCancelHandler,onIonBackdropTap:this.onBackdropTap}),h("ion-backdrop",{tappable:this.backdropDismiss}),h("div",{tabindex:"0"}),h("div",{class:"action-sheet-wrapper ion-overlay-wrapper",ref:function(t){return e.wrapperEl=t}},h("div",{class:"action-sheet-container"},h("div",{class:"action-sheet-group",ref:function(t){return e.groupEl=t}},n!==undefined&&h("div",{id:l,class:{"action-sheet-title":true,"action-sheet-has-sub-title":this.subHeader!==undefined}},n,this.subHeader&&h("div",{class:"action-sheet-sub-title"},this.subHeader)),d.map((function(t){return h("button",Object.assign({},t.htmlAttributes,{type:"button",id:t.id,class:buttonClass(t),onClick:function(){return e.buttonClick(t)}}),h("span",{class:"action-sheet-button-inner"},t.icon&&h("ion-icon",{icon:t.icon,"aria-hidden":"true",lazy:false,class:"action-sheet-icon"}),t.text),r==="md"&&h("ion-ripple-effect",null))}))),s&&h("div",{class:"action-sheet-group action-sheet-group-cancel"},h("button",Object.assign({},s.htmlAttributes,{type:"button",class:buttonClass(s),onClick:function(){return e.buttonClick(s)}}),h("span",{class:"action-sheet-button-inner"},s.icon&&h("ion-icon",{icon:s.icon,"aria-hidden":"true",lazy:false,class:"action-sheet-icon"}),s.text),r==="md"&&h("ion-ripple-effect",null))))),h("div",{tabindex:"0"}))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{isOpen:["onIsOpenChange"],trigger:["triggerChanged"]}},enumerable:false,configurable:true});return t}();var buttonClass=function(t){var e;return Object.assign((e={"action-sheet-button":true,"ion-activatable":true,"ion-focusable":true},e["action-sheet-".concat(t.role)]=t.role!==undefined,e),getClassMap(t.cssClass))};ActionSheet.style={ios:actionSheetIosCss,md:actionSheetMdCss};export{ActionSheet as ion_action_sheet};
|
|
4
|
+
*/import{r as registerInstance,d as createEvent,e as readTask,h,H as Host,f as getElement}from"./index-4392ebcb.js";import{c as createButtonActiveGesture}from"./button-active-1fb561b0.js";import{r as raf}from"./helpers-3379ba19.js";import{c as createLockController}from"./lock-controller-e8c6c051.js";import{d as createDelegateController,e as createTriggerController,B as BACKDROP,i as isCancel,f as present,g as dismiss,h as eventMethod,s as safeCall,j as prepareOverlay,k as setOverlayId}from"./overlays-928a4afe.js";import{g as getClassMap}from"./theme-17531cdf.js";import{b as getIonMode}from"./ionic-global-7efdecd0.js";import{c as createAnimation}from"./animation-8aa13916.js";import"./haptic-1243b917.js";import"./capacitor-b4979570.js";import"./index-7a14ecec.js";import"./index-ff313b19.js";import"./gesture-controller-0fa396c4.js";import"./framework-delegate-aa433dea.js";import"./hardware-back-button-39299f84.js";import"./index-595d62c9.js";var iosEnterAnimation=function(t){var e=createAnimation();var o=createAnimation();var n=createAnimation();o.addElement(t.querySelector("ion-backdrop")).fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]);n.addElement(t.querySelector(".action-sheet-wrapper")).fromTo("transform","translateY(100%)","translateY(0%)");return e.addElement(t).easing("cubic-bezier(.36,.66,.04,1)").duration(400).addAnimation([o,n])};var iosLeaveAnimation=function(t){var e=createAnimation();var o=createAnimation();var n=createAnimation();o.addElement(t.querySelector("ion-backdrop")).fromTo("opacity","var(--backdrop-opacity)",0);n.addElement(t.querySelector(".action-sheet-wrapper")).fromTo("transform","translateY(0%)","translateY(100%)");return e.addElement(t).easing("cubic-bezier(.36,.66,.04,1)").duration(450).addAnimation([o,n])};var mdEnterAnimation=function(t){var e=createAnimation();var o=createAnimation();var n=createAnimation();o.addElement(t.querySelector("ion-backdrop")).fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]);n.addElement(t.querySelector(".action-sheet-wrapper")).fromTo("transform","translateY(100%)","translateY(0%)");return e.addElement(t).easing("cubic-bezier(.36,.66,.04,1)").duration(400).addAnimation([o,n])};var mdLeaveAnimation=function(t){var e=createAnimation();var o=createAnimation();var n=createAnimation();o.addElement(t.querySelector("ion-backdrop")).fromTo("opacity","var(--backdrop-opacity)",0);n.addElement(t.querySelector(".action-sheet-wrapper")).fromTo("transform","translateY(0%)","translateY(100%)");return e.addElement(t).easing("cubic-bezier(.36,.66,.04,1)").duration(450).addAnimation([o,n])};var actionSheetIosCss='.sc-ion-action-sheet-ios-h{--color:initial;--button-color-activated:var(--button-color);--button-color-focused:var(--button-color);--button-color-hover:var(--button-color);--button-color-selected:var(--button-color);--min-width:auto;--width:100%;--max-width:500px;--min-height:auto;--height:auto;--max-height:calc(100% - (var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;right:0;top:0;bottom:0;display:block;position:fixed;outline:none;font-family:var(--ion-font-family, inherit);-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1001}.overlay-hidden.sc-ion-action-sheet-ios-h{display:none}.action-sheet-wrapper.sc-ion-action-sheet-ios{left:0;right:0;bottom:0;-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0);display:block;position:absolute;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);z-index:10;pointer-events:none}.action-sheet-button.sc-ion-action-sheet-ios{display:block;position:relative;width:100%;border:0;outline:none;background:var(--button-background);color:var(--button-color);font-family:inherit;overflow:hidden}.action-sheet-button-inner.sc-ion-action-sheet-ios{display:-ms-flexbox;display:flex;position:relative;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;pointer-events:none;width:100%;height:100%;z-index:1}.action-sheet-container.sc-ion-action-sheet-ios{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:end;justify-content:flex-end;height:100%;max-height:calc(100vh - (var(--ion-safe-area-top, 0) + var(--ion-safe-area-bottom, 0)));max-height:calc(100dvh - (var(--ion-safe-area-top, 0) + var(--ion-safe-area-bottom, 0)))}.action-sheet-group.sc-ion-action-sheet-ios{-ms-flex-negative:2;flex-shrink:2;overscroll-behavior-y:contain;overflow-y:auto;-webkit-overflow-scrolling:touch;pointer-events:all;background:var(--background)}@media (any-pointer: coarse){.action-sheet-group.sc-ion-action-sheet-ios::-webkit-scrollbar{display:none}}.action-sheet-group-cancel.sc-ion-action-sheet-ios{-ms-flex-negative:0;flex-shrink:0;overflow:hidden}.action-sheet-button.sc-ion-action-sheet-ios::after{left:0;right:0;top:0;bottom:0;position:absolute;content:"";opacity:0}.action-sheet-selected.sc-ion-action-sheet-ios{color:var(--button-color-selected)}.action-sheet-selected.sc-ion-action-sheet-ios::after{background:var(--button-background-selected);opacity:var(--button-background-selected-opacity)}.action-sheet-button.ion-activated.sc-ion-action-sheet-ios{color:var(--button-color-activated)}.action-sheet-button.ion-activated.sc-ion-action-sheet-ios::after{background:var(--button-background-activated);opacity:var(--button-background-activated-opacity)}.action-sheet-button.ion-focused.sc-ion-action-sheet-ios{color:var(--button-color-focused)}.action-sheet-button.ion-focused.sc-ion-action-sheet-ios::after{background:var(--button-background-focused);opacity:var(--button-background-focused-opacity)}@media (any-hover: hover){.action-sheet-button.sc-ion-action-sheet-ios:hover{color:var(--button-color-hover)}.action-sheet-button.sc-ion-action-sheet-ios:hover::after{background:var(--button-background-hover);opacity:var(--button-background-hover-opacity)}}.sc-ion-action-sheet-ios-h{--background:var(--ion-overlay-background-color, var(--ion-color-step-100, #f9f9f9));--backdrop-opacity:var(--ion-backdrop-opacity, 0.4);--button-background:linear-gradient(0deg, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08), rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08) 50%, transparent 50%) bottom/100% 1px no-repeat transparent;--button-background-activated:var(--ion-text-color, #000);--button-background-activated-opacity:.08;--button-background-hover:currentColor;--button-background-hover-opacity:.04;--button-background-focused:currentColor;--button-background-focused-opacity:.12;--button-background-selected:var(--ion-color-step-150, var(--ion-background-color, #fff));--button-background-selected-opacity:1;--button-color:var(--ion-color-primary, #3880ff);--color:var(--ion-color-step-400, #999999);text-align:center}.action-sheet-wrapper.sc-ion-action-sheet-ios{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:var(--ion-safe-area-top, 0);margin-bottom:var(--ion-safe-area-bottom, 0)}.action-sheet-container.sc-ion-action-sheet-ios{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:0;padding-bottom:0}.action-sheet-group.sc-ion-action-sheet-ios{border-radius:13px;margin-bottom:8px}.action-sheet-group.sc-ion-action-sheet-ios:first-child{margin-top:10px}.action-sheet-group.sc-ion-action-sheet-ios:last-child{margin-bottom:10px}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-group.sc-ion-action-sheet-ios{background-color:transparent;-webkit-backdrop-filter:saturate(280%) blur(20px);backdrop-filter:saturate(280%) blur(20px)}.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-title.sc-ion-action-sheet-ios,.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-button.sc-ion-action-sheet-ios{background-color:transparent;background-image:-webkit-gradient(linear, left bottom, left top, from(rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8)), to(rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8))), -webkit-gradient(linear, left bottom, left top, from(rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.4)), color-stop(50%, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.4)), color-stop(50%, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8)));background-image:linear-gradient(0deg, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8), rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8) 100%), linear-gradient(0deg, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.4), rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.4) 50%, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8) 50%);background-repeat:no-repeat;background-position:top, bottom;background-size:100% calc(100% - 1px), 100% 1px;-webkit-backdrop-filter:saturate(120%);backdrop-filter:saturate(120%)}.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-button.ion-activated.sc-ion-action-sheet-ios{background-color:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.7);background-image:none}.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-cancel.sc-ion-action-sheet-ios{background:var(--button-background-selected)}}.action-sheet-title.sc-ion-action-sheet-ios{background:-webkit-gradient(linear, left bottom, left top, from(rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08)), color-stop(50%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08)), color-stop(50%, transparent)) bottom/100% 1px no-repeat transparent;background:linear-gradient(0deg, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08), rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08) 50%, transparent 50%) bottom/100% 1px no-repeat transparent}.action-sheet-title.sc-ion-action-sheet-ios{-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:14px;padding-bottom:13px;color:var(--color, var(--ion-color-step-400, #999999));font-size:max(13px, 0.8125rem);font-weight:400;text-align:center}.action-sheet-title.action-sheet-has-sub-title.sc-ion-action-sheet-ios{font-weight:600}.action-sheet-sub-title.sc-ion-action-sheet-ios{padding-left:0;padding-right:0;padding-top:6px;padding-bottom:0;font-size:max(13px, 0.8125rem);font-weight:400}.action-sheet-button.sc-ion-action-sheet-ios{-webkit-padding-start:14px;padding-inline-start:14px;-webkit-padding-end:14px;padding-inline-end:14px;padding-top:14px;padding-bottom:14px;min-height:56px;font-size:max(20px, 1.25rem);contain:content}.action-sheet-button.sc-ion-action-sheet-ios .action-sheet-icon.sc-ion-action-sheet-ios{-webkit-margin-end:0.3em;margin-inline-end:0.3em;font-size:max(28px, 1.75rem);pointer-events:none}.action-sheet-button.sc-ion-action-sheet-ios:last-child{background-image:none}.action-sheet-selected.sc-ion-action-sheet-ios{font-weight:bold}.action-sheet-cancel.sc-ion-action-sheet-ios{font-weight:600}.action-sheet-cancel.sc-ion-action-sheet-ios::after{background:var(--button-background-selected);opacity:var(--button-background-selected-opacity)}.action-sheet-destructive.sc-ion-action-sheet-ios,.action-sheet-destructive.ion-activated.sc-ion-action-sheet-ios,.action-sheet-destructive.ion-focused.sc-ion-action-sheet-ios{color:var(--ion-color-danger, #eb445a)}@media (any-hover: hover){.action-sheet-destructive.sc-ion-action-sheet-ios:hover{color:var(--ion-color-danger, #eb445a)}}';var actionSheetMdCss='.sc-ion-action-sheet-md-h{--color:initial;--button-color-activated:var(--button-color);--button-color-focused:var(--button-color);--button-color-hover:var(--button-color);--button-color-selected:var(--button-color);--min-width:auto;--width:100%;--max-width:500px;--min-height:auto;--height:auto;--max-height:calc(100% - (var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;right:0;top:0;bottom:0;display:block;position:fixed;outline:none;font-family:var(--ion-font-family, inherit);-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1001}.overlay-hidden.sc-ion-action-sheet-md-h{display:none}.action-sheet-wrapper.sc-ion-action-sheet-md{left:0;right:0;bottom:0;-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0);display:block;position:absolute;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);z-index:10;pointer-events:none}.action-sheet-button.sc-ion-action-sheet-md{display:block;position:relative;width:100%;border:0;outline:none;background:var(--button-background);color:var(--button-color);font-family:inherit;overflow:hidden}.action-sheet-button-inner.sc-ion-action-sheet-md{display:-ms-flexbox;display:flex;position:relative;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;pointer-events:none;width:100%;height:100%;z-index:1}.action-sheet-container.sc-ion-action-sheet-md{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:end;justify-content:flex-end;height:100%;max-height:calc(100vh - (var(--ion-safe-area-top, 0) + var(--ion-safe-area-bottom, 0)));max-height:calc(100dvh - (var(--ion-safe-area-top, 0) + var(--ion-safe-area-bottom, 0)))}.action-sheet-group.sc-ion-action-sheet-md{-ms-flex-negative:2;flex-shrink:2;overscroll-behavior-y:contain;overflow-y:auto;-webkit-overflow-scrolling:touch;pointer-events:all;background:var(--background)}@media (any-pointer: coarse){.action-sheet-group.sc-ion-action-sheet-md::-webkit-scrollbar{display:none}}.action-sheet-group-cancel.sc-ion-action-sheet-md{-ms-flex-negative:0;flex-shrink:0;overflow:hidden}.action-sheet-button.sc-ion-action-sheet-md::after{left:0;right:0;top:0;bottom:0;position:absolute;content:"";opacity:0}.action-sheet-selected.sc-ion-action-sheet-md{color:var(--button-color-selected)}.action-sheet-selected.sc-ion-action-sheet-md::after{background:var(--button-background-selected);opacity:var(--button-background-selected-opacity)}.action-sheet-button.ion-activated.sc-ion-action-sheet-md{color:var(--button-color-activated)}.action-sheet-button.ion-activated.sc-ion-action-sheet-md::after{background:var(--button-background-activated);opacity:var(--button-background-activated-opacity)}.action-sheet-button.ion-focused.sc-ion-action-sheet-md{color:var(--button-color-focused)}.action-sheet-button.ion-focused.sc-ion-action-sheet-md::after{background:var(--button-background-focused);opacity:var(--button-background-focused-opacity)}@media (any-hover: hover){.action-sheet-button.sc-ion-action-sheet-md:hover{color:var(--button-color-hover)}.action-sheet-button.sc-ion-action-sheet-md:hover::after{background:var(--button-background-hover);opacity:var(--button-background-hover-opacity)}}.sc-ion-action-sheet-md-h{--background:var(--ion-overlay-background-color, var(--ion-background-color, #fff));--backdrop-opacity:var(--ion-backdrop-opacity, 0.32);--button-background:transparent;--button-background-selected:currentColor;--button-background-selected-opacity:0;--button-background-activated:transparent;--button-background-activated-opacity:0;--button-background-hover:currentColor;--button-background-hover-opacity:.04;--button-background-focused:currentColor;--button-background-focused-opacity:.12;--button-color:var(--ion-color-step-850, #262626);--color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.54)}.action-sheet-wrapper.sc-ion-action-sheet-md{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:var(--ion-safe-area-top, 0);margin-bottom:0}.action-sheet-title.sc-ion-action-sheet-md{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:20px;padding-bottom:17px;min-height:60px;color:var(--color, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.54));font-size:1rem;text-align:start}.action-sheet-sub-title.sc-ion-action-sheet-md{padding-left:0;padding-right:0;padding-top:16px;padding-bottom:0;font-size:0.875rem}.action-sheet-group.sc-ion-action-sheet-md:first-child{padding-top:0}.action-sheet-group.sc-ion-action-sheet-md:last-child{padding-bottom:var(--ion-safe-area-bottom)}.action-sheet-button.sc-ion-action-sheet-md{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:12px;padding-bottom:12px;position:relative;min-height:52px;font-size:1rem;text-align:start;contain:content;overflow:hidden}.action-sheet-icon.sc-ion-action-sheet-md{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:32px;margin-inline-end:32px;margin-top:0;margin-bottom:0;color:var(--color);font-size:1.5rem}.action-sheet-button-inner.sc-ion-action-sheet-md{-ms-flex-pack:start;justify-content:flex-start}.action-sheet-selected.sc-ion-action-sheet-md{font-weight:bold}';var ActionSheet=function(){function t(t){var e=this;registerInstance(this,t);this.didPresent=createEvent(this,"ionActionSheetDidPresent",7);this.willPresent=createEvent(this,"ionActionSheetWillPresent",7);this.willDismiss=createEvent(this,"ionActionSheetWillDismiss",7);this.didDismiss=createEvent(this,"ionActionSheetDidDismiss",7);this.didPresentShorthand=createEvent(this,"didPresent",7);this.willPresentShorthand=createEvent(this,"willPresent",7);this.willDismissShorthand=createEvent(this,"willDismiss",7);this.didDismissShorthand=createEvent(this,"didDismiss",7);this.delegateController=createDelegateController(this);this.lockController=createLockController();this.triggerController=createTriggerController();this.presented=false;this.onBackdropTap=function(){e.dismiss(undefined,BACKDROP)};this.dispatchCancelHandler=function(t){var o=t.detail.role;if(isCancel(o)){var n=e.getButtons().find((function(t){return t.role==="cancel"}));e.callButtonHandler(n)}};this.overlayIndex=undefined;this.delegate=undefined;this.hasController=false;this.keyboardClose=true;this.enterAnimation=undefined;this.leaveAnimation=undefined;this.buttons=[];this.cssClass=undefined;this.backdropDismiss=true;this.header=undefined;this.subHeader=undefined;this.translucent=false;this.animated=true;this.htmlAttributes=undefined;this.isOpen=false;this.trigger=undefined}t.prototype.onIsOpenChange=function(t,e){if(t===true&&e===false){this.present()}else if(t===false&&e===true){this.dismiss()}};t.prototype.triggerChanged=function(){var t=this,e=t.trigger,o=t.el,n=t.triggerController;if(e){n.addClickListener(o,e)}};t.prototype.present=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:return[4,this.lockController.lock()];case 1:t=e.sent();return[4,this.delegateController.attachViewToDom()];case 2:e.sent();return[4,present(this,"actionSheetEnter",iosEnterAnimation,mdEnterAnimation)];case 3:e.sent();t();return[2]}}))}))};t.prototype.dismiss=function(t,e){return __awaiter(this,void 0,void 0,(function(){var o,n;return __generator(this,(function(i){switch(i.label){case 0:return[4,this.lockController.lock()];case 1:o=i.sent();return[4,dismiss(this,t,e,"actionSheetLeave",iosLeaveAnimation,mdLeaveAnimation)];case 2:n=i.sent();if(n){this.delegateController.removeViewFromDom()}o();return[2,n]}}))}))};t.prototype.onDidDismiss=function(){return eventMethod(this.el,"ionActionSheetDidDismiss")};t.prototype.onWillDismiss=function(){return eventMethod(this.el,"ionActionSheetWillDismiss")};t.prototype.buttonClick=function(t){return __awaiter(this,void 0,void 0,(function(){var e,o;return __generator(this,(function(n){switch(n.label){case 0:e=t.role;if(isCancel(e)){return[2,this.dismiss(t.data,e)]}return[4,this.callButtonHandler(t)];case 1:o=n.sent();if(o){return[2,this.dismiss(t.data,t.role)]}return[2,Promise.resolve()]}}))}))};t.prototype.callButtonHandler=function(t){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(o){switch(o.label){case 0:if(!t)return[3,2];return[4,safeCall(t.handler)];case 1:e=o.sent();if(e===false){return[2,false]}o.label=2;case 2:return[2,true]}}))}))};t.prototype.getButtons=function(){return this.buttons.map((function(t){return typeof t==="string"?{text:t}:t}))};t.prototype.connectedCallback=function(){prepareOverlay(this.el);this.triggerChanged()};t.prototype.disconnectedCallback=function(){if(this.gesture){this.gesture.destroy();this.gesture=undefined}this.triggerController.removeClickListener()};t.prototype.componentWillLoad=function(){setOverlayId(this.el)};t.prototype.componentDidLoad=function(){var t=this;var e=this,o=e.groupEl,n=e.wrapperEl;if(!this.gesture&&getIonMode(this)==="ios"&&n&&o){readTask((function(){var e=o.scrollHeight>o.clientHeight;if(!e){t.gesture=createButtonActiveGesture(n,(function(t){return t.classList.contains("action-sheet-button")}));t.gesture.enable(true)}}))}if(this.isOpen===true){raf((function(){return t.present()}))}this.triggerChanged()};t.prototype.render=function(){var t;var e=this;var o=this,n=o.header,i=o.htmlAttributes,a=o.overlayIndex;var r=getIonMode(this);var c=this.getButtons();var s=c.find((function(t){return t.role==="cancel"}));var d=c.filter((function(t){return t.role!=="cancel"}));var l="action-sheet-".concat(a,"-header");return h(Host,Object.assign({role:"dialog","aria-modal":"true","aria-labelledby":n!==undefined?l:null,tabindex:"-1"},i,{style:{zIndex:"".concat(2e4+this.overlayIndex)},class:Object.assign(Object.assign((t={},t[r]=true,t),getClassMap(this.cssClass)),{"overlay-hidden":true,"action-sheet-translucent":this.translucent}),onIonActionSheetWillDismiss:this.dispatchCancelHandler,onIonBackdropTap:this.onBackdropTap}),h("ion-backdrop",{tappable:this.backdropDismiss}),h("div",{tabindex:"0"}),h("div",{class:"action-sheet-wrapper ion-overlay-wrapper",ref:function(t){return e.wrapperEl=t}},h("div",{class:"action-sheet-container"},h("div",{class:"action-sheet-group",ref:function(t){return e.groupEl=t}},n!==undefined&&h("div",{id:l,class:{"action-sheet-title":true,"action-sheet-has-sub-title":this.subHeader!==undefined}},n,this.subHeader&&h("div",{class:"action-sheet-sub-title"},this.subHeader)),d.map((function(t){return h("button",Object.assign({},t.htmlAttributes,{type:"button",id:t.id,class:buttonClass(t),onClick:function(){return e.buttonClick(t)}}),h("span",{class:"action-sheet-button-inner"},t.icon&&h("ion-icon",{icon:t.icon,"aria-hidden":"true",lazy:false,class:"action-sheet-icon"}),t.text),r==="md"&&h("ion-ripple-effect",null))}))),s&&h("div",{class:"action-sheet-group action-sheet-group-cancel"},h("button",Object.assign({},s.htmlAttributes,{type:"button",class:buttonClass(s),onClick:function(){return e.buttonClick(s)}}),h("span",{class:"action-sheet-button-inner"},s.icon&&h("ion-icon",{icon:s.icon,"aria-hidden":"true",lazy:false,class:"action-sheet-icon"}),s.text),r==="md"&&h("ion-ripple-effect",null))))),h("div",{tabindex:"0"}))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{isOpen:["onIsOpenChange"],trigger:["triggerChanged"]}},enumerable:false,configurable:true});return t}();var buttonClass=function(t){var e;return Object.assign((e={"action-sheet-button":true,"ion-activatable":true,"ion-focusable":true},e["action-sheet-".concat(t.role)]=t.role!==undefined,e),getClassMap(t.cssClass))};ActionSheet.style={ios:actionSheetIosCss,md:actionSheetMdCss};export{ActionSheet as ion_action_sheet};
|