@ionic/core 8.4.4-dev.11741105335.1f4941f2 → 8.4.4-dev.11741136034.11909e03
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 +25 -4
- package/components/checkbox.js +4 -6
- package/components/index6.js +3 -11
- package/components/ion-select.js +14 -43
- package/components/ion-toggle.js +4 -6
- package/components/modal.js +35 -259
- package/components/toolbar.js +2 -2
- package/css/core.css.map +1 -1
- package/css/ionic.bundle.css.map +1 -1
- package/dist/cjs/{data-108e531d.js → data-21dc0f81.js} +1 -1
- package/dist/cjs/{index-0ff61d0b.js → index-1ae3f40a.js} +1 -1
- package/dist/cjs/{index-26bb7e42.js → index-4e14a46e.js} +3 -3
- package/dist/cjs/{index-2a46a047.js → index-5915f9b3.js} +3 -11
- package/dist/cjs/{index-6770fc00.js → index-c441c903.js} +1 -1
- package/dist/cjs/index.cjs.js +6 -6
- package/dist/cjs/{input-shims-fd997b01.js → input-shims-e748a364.js} +2 -4
- package/dist/cjs/{input.utils-c15a1814.js → input.utils-74e4ec28.js} +1 -1
- package/dist/cjs/ion-accordion_2.cjs.entry.js +1 -1
- package/dist/cjs/ion-action-sheet.cjs.entry.js +2 -2
- package/dist/cjs/ion-alert.cjs.entry.js +27 -6
- package/dist/cjs/ion-app_8.cjs.entry.js +7 -7
- package/dist/cjs/ion-button_2.cjs.entry.js +1 -1
- package/dist/cjs/ion-checkbox.cjs.entry.js +4 -5
- package/dist/cjs/ion-datetime-button.cjs.entry.js +2 -2
- package/dist/cjs/ion-datetime_3.cjs.entry.js +3 -3
- package/dist/cjs/ion-infinite-scroll_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-input-password-toggle.cjs.entry.js +1 -1
- package/dist/cjs/ion-input.cjs.entry.js +2 -2
- package/dist/cjs/ion-item-option_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-loading.cjs.entry.js +2 -2
- package/dist/cjs/ion-menu_3.cjs.entry.js +3 -3
- package/dist/cjs/ion-modal.cjs.entry.js +39 -262
- package/dist/cjs/ion-nav_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-popover.cjs.entry.js +3 -3
- package/dist/cjs/ion-range.cjs.entry.js +2 -2
- package/dist/cjs/ion-refresher_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-reorder_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-select-modal.cjs.entry.js +2 -2
- package/dist/cjs/ion-select_3.cjs.entry.js +15 -43
- package/dist/cjs/ion-textarea.cjs.entry.js +2 -2
- package/dist/cjs/ion-toast.cjs.entry.js +2 -2
- package/dist/cjs/ion-toggle.cjs.entry.js +4 -5
- package/dist/cjs/ionic.cjs.js +1 -1
- package/dist/cjs/{ios.transition-a4f35c55.js → ios.transition-afdec89f.js} +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{md.transition-cdf904e6.js → md.transition-9f0d3db5.js} +2 -2
- package/dist/cjs/{overlays-86695cf1.js → overlays-76b29cd4.js} +1 -1
- package/dist/cjs/{status-tap-1a2485c1.js → status-tap-fb807fad.js} +2 -3
- package/dist/collection/components/alert/alert.js +29 -4
- package/dist/collection/components/checkbox/checkbox.js +4 -23
- package/dist/collection/components/modal/animations/ios.enter.js +4 -50
- package/dist/collection/components/modal/animations/ios.leave.js +2 -24
- package/dist/collection/components/modal/animations/md.enter.js +5 -52
- package/dist/collection/components/modal/animations/md.leave.js +3 -26
- package/dist/collection/components/modal/animations/sheet.js +2 -11
- package/dist/collection/components/modal/gestures/sheet.js +10 -79
- package/dist/collection/components/modal/modal.ios.css +0 -16
- package/dist/collection/components/modal/modal.js +7 -32
- package/dist/collection/components/modal/modal.md.css +0 -6
- package/dist/collection/components/select/select.js +13 -59
- package/dist/collection/components/toggle/toggle.js +4 -23
- package/dist/collection/components/toolbar/toolbar.js +2 -6
- package/dist/collection/utils/logging/index.js +3 -10
- package/dist/docs.json +6 -115
- package/dist/esm/{data-b3284b5e.js → data-ae11fd43.js} +1 -1
- package/dist/esm/{index-dd0f7395.js → index-33f7e3ff.js} +1 -1
- package/dist/esm/{index-6a5baab0.js → index-7ec5519a.js} +3 -3
- package/dist/esm/{index-7105cd59.js → index-8785a9c6.js} +1 -1
- package/dist/esm/{index-6ad967f3.js → index-9b0d46f4.js} +3 -11
- package/dist/esm/index.js +6 -6
- package/dist/esm/{input-shims-dff819a9.js → input-shims-0e65111b.js} +2 -4
- package/dist/esm/{input.utils-2f1029cf.js → input.utils-1ad8dafc.js} +1 -1
- package/dist/esm/ion-accordion_2.entry.js +1 -1
- package/dist/esm/ion-action-sheet.entry.js +2 -2
- package/dist/esm/ion-alert.entry.js +27 -6
- package/dist/esm/ion-app_8.entry.js +7 -7
- package/dist/esm/ion-button_2.entry.js +1 -1
- package/dist/esm/ion-checkbox.entry.js +4 -5
- package/dist/esm/ion-datetime-button.entry.js +2 -2
- package/dist/esm/ion-datetime_3.entry.js +3 -3
- package/dist/esm/ion-infinite-scroll_2.entry.js +2 -2
- package/dist/esm/ion-input-password-toggle.entry.js +1 -1
- package/dist/esm/ion-input.entry.js +2 -2
- package/dist/esm/ion-item-option_3.entry.js +2 -2
- package/dist/esm/ion-loading.entry.js +2 -2
- package/dist/esm/ion-menu_3.entry.js +3 -3
- package/dist/esm/ion-modal.entry.js +39 -262
- package/dist/esm/ion-nav_2.entry.js +2 -2
- package/dist/esm/ion-popover.entry.js +3 -3
- package/dist/esm/ion-range.entry.js +2 -2
- package/dist/esm/ion-refresher_2.entry.js +2 -2
- package/dist/esm/ion-reorder_2.entry.js +2 -2
- package/dist/esm/ion-select-modal.entry.js +2 -2
- package/dist/esm/ion-select_3.entry.js +16 -44
- package/dist/esm/ion-textarea.entry.js +2 -2
- package/dist/esm/ion-toast.entry.js +2 -2
- package/dist/esm/ion-toggle.entry.js +4 -5
- package/dist/esm/ionic.js +1 -1
- package/dist/esm/{ios.transition-314468a2.js → ios.transition-085853ff.js} +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{md.transition-a560e0e2.js → md.transition-33826623.js} +2 -2
- package/dist/esm/{overlays-9a81f230.js → overlays-e3d0d356.js} +1 -1
- package/dist/esm/{status-tap-d07dbc82.js → status-tap-163e8128.js} +2 -3
- package/dist/esm-es5/{data-b3284b5e.js → data-ae11fd43.js} +1 -1
- package/dist/esm-es5/{index-dd0f7395.js → index-33f7e3ff.js} +1 -1
- package/dist/esm-es5/{index-6a5baab0.js → index-7ec5519a.js} +1 -1
- package/dist/esm-es5/{index-7105cd59.js → index-8785a9c6.js} +1 -1
- package/dist/esm-es5/index-9b0d46f4.js +4 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/input-shims-0e65111b.js +4 -0
- package/dist/esm-es5/{input.utils-2f1029cf.js → input.utils-1ad8dafc.js} +1 -1
- package/dist/esm-es5/ion-accordion_2.entry.js +1 -1
- 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-app_8.entry.js +1 -1
- package/dist/esm-es5/ion-button_2.entry.js +1 -1
- package/dist/esm-es5/ion-checkbox.entry.js +1 -1
- package/dist/esm-es5/ion-datetime-button.entry.js +1 -1
- package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
- package/dist/esm-es5/ion-infinite-scroll_2.entry.js +1 -1
- package/dist/esm-es5/ion-input-password-toggle.entry.js +1 -1
- package/dist/esm-es5/ion-input.entry.js +1 -1
- package/dist/esm-es5/ion-item-option_3.entry.js +1 -1
- package/dist/esm-es5/ion-loading.entry.js +1 -1
- package/dist/esm-es5/ion-menu_3.entry.js +1 -1
- package/dist/esm-es5/ion-modal.entry.js +1 -1
- package/dist/esm-es5/ion-nav_2.entry.js +1 -1
- package/dist/esm-es5/ion-popover.entry.js +1 -1
- package/dist/esm-es5/ion-range.entry.js +1 -1
- package/dist/esm-es5/ion-refresher_2.entry.js +1 -1
- package/dist/esm-es5/ion-reorder_2.entry.js +1 -1
- package/dist/esm-es5/ion-select-modal.entry.js +1 -1
- package/dist/esm-es5/ion-select_3.entry.js +1 -1
- package/dist/esm-es5/ion-textarea.entry.js +1 -1
- package/dist/esm-es5/ion-toast.entry.js +1 -1
- package/dist/esm-es5/ion-toggle.entry.js +1 -1
- package/dist/esm-es5/ionic.js +1 -1
- package/dist/esm-es5/{ios.transition-314468a2.js → ios.transition-085853ff.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/md.transition-33826623.js +4 -0
- package/dist/esm-es5/{overlays-9a81f230.js → overlays-e3d0d356.js} +1 -1
- package/dist/esm-es5/status-tap-163e8128.js +4 -0
- package/dist/html.html-data.json +0 -16
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-c935cfc9.js → p-02e1ebd9.js} +1 -1
- package/dist/ionic/{p-037fc3f3.entry.js → p-0397811d.entry.js} +1 -1
- package/dist/ionic/p-06fee233.js +4 -0
- package/dist/ionic/p-075a94bd.js +4 -0
- package/dist/ionic/p-0a59f4fa.entry.js +4 -0
- package/dist/ionic/{p-18e101b7.system.entry.js → p-0c9b6d3a.system.entry.js} +1 -1
- package/dist/ionic/p-0e43be1b.entry.js +4 -0
- package/dist/ionic/p-0ee3b5a2.system.js +4 -0
- package/dist/ionic/p-135e5731.js +4 -0
- package/dist/ionic/{p-990630ca.js → p-13dc21b0.js} +1 -1
- package/dist/ionic/{p-d7bb5325.entry.js → p-14143257.entry.js} +1 -1
- package/dist/ionic/{p-a584c79d.system.entry.js → p-162c8d0c.system.entry.js} +1 -1
- package/dist/ionic/{p-578efda4.system.js → p-1a790eef.system.js} +2 -2
- package/dist/ionic/{p-5010643d.system.entry.js → p-1bbe8665.system.entry.js} +2 -2
- package/dist/ionic/{p-5882bffa.system.entry.js → p-1bc65aec.system.entry.js} +1 -1
- package/dist/ionic/{p-70af0afb.entry.js → p-203633d1.entry.js} +1 -1
- package/dist/ionic/p-25fa1d30.system.entry.js +4 -0
- package/dist/ionic/{p-9de5c787.entry.js → p-26194519.entry.js} +1 -1
- package/dist/ionic/p-2c8798d0.entry.js +4 -0
- package/dist/ionic/p-322c5fb4.system.js +1 -1
- package/dist/ionic/{p-155c2bb0.entry.js → p-32e99b0a.entry.js} +1 -1
- package/dist/ionic/{p-8e407469.system.js → p-340e3f24.system.js} +1 -1
- package/dist/ionic/{p-d821466d.system.entry.js → p-3572f86a.system.entry.js} +1 -1
- package/dist/ionic/{p-63c09585.system.entry.js → p-3df889b3.system.entry.js} +1 -1
- package/dist/ionic/{p-e32557bb.system.entry.js → p-3eaf1444.system.entry.js} +1 -1
- package/dist/ionic/{p-39dd4f62.js → p-42808996.js} +1 -1
- package/dist/ionic/{p-efbf5af5.system.entry.js → p-4346c79d.system.entry.js} +1 -1
- package/dist/ionic/{p-36c448fe.entry.js → p-45de8d2a.entry.js} +1 -1
- package/dist/ionic/{p-acc8399c.system.entry.js → p-48a8d9b4.system.entry.js} +2 -2
- package/dist/ionic/{p-e5849f8d.entry.js → p-4c252070.entry.js} +1 -1
- package/dist/ionic/p-4e131759.entry.js +4 -0
- package/dist/ionic/p-51dec25d.js +4 -0
- package/dist/ionic/{p-484d855b.system.entry.js → p-561ddcd4.system.entry.js} +1 -1
- package/dist/ionic/{p-bc616455.entry.js → p-57379000.entry.js} +1 -1
- package/dist/ionic/{p-a5b31c0f.entry.js → p-57ceead7.entry.js} +1 -1
- package/dist/ionic/{p-97a65908.entry.js → p-5cde8ef3.entry.js} +1 -1
- package/dist/ionic/p-61d044b4.entry.js +4 -0
- package/dist/ionic/p-68dc53a5.js +4 -0
- package/dist/ionic/{p-2cbe5399.entry.js → p-6b1bd0c1.entry.js} +1 -1
- package/dist/ionic/{p-31a6efce.system.entry.js → p-7b96e5c1.system.entry.js} +1 -1
- package/dist/ionic/{p-5fe8b767.entry.js → p-803f0bc2.entry.js} +1 -1
- package/dist/ionic/{p-9962f63f.entry.js → p-82b931e2.entry.js} +1 -1
- package/dist/ionic/{p-8818edd8.entry.js → p-83e68c71.entry.js} +1 -1
- package/dist/ionic/{p-af452fa4.system.js → p-881d9e52.system.js} +1 -1
- package/dist/ionic/p-8a836849.entry.js +4 -0
- package/dist/ionic/{p-af744710.system.entry.js → p-91f17b25.system.entry.js} +2 -2
- package/dist/ionic/{p-d1172fe3.system.entry.js → p-9a1f985d.system.entry.js} +1 -1
- package/dist/ionic/{p-eeb5cb45.system.entry.js → p-9be5f3ee.system.entry.js} +1 -1
- package/dist/ionic/{p-acb30a5c.system.js → p-9eee4de1.system.js} +1 -1
- package/dist/ionic/{p-860eb968.system.js → p-a2b6dd57.system.js} +1 -1
- package/dist/ionic/{p-10327ad2.system.entry.js → p-a3c78186.system.entry.js} +1 -1
- package/dist/ionic/{p-4d413973.system.entry.js → p-a4575db1.system.entry.js} +1 -1
- package/dist/ionic/{p-73897169.system.js → p-aa63b365.system.js} +1 -1
- package/dist/ionic/p-b7433d7d.js +4 -0
- package/dist/ionic/{p-65346408.system.entry.js → p-b91acf8d.system.entry.js} +1 -1
- package/dist/ionic/{p-d99e8644.system.js → p-c1b51537.system.js} +1 -1
- package/dist/ionic/{p-8cfba7e9.system.entry.js → p-c29f8157.system.entry.js} +1 -1
- package/dist/ionic/{p-72ec9a26.entry.js → p-cc700b6b.entry.js} +1 -1
- package/dist/ionic/{p-0bfffa34.system.entry.js → p-d06601eb.system.entry.js} +1 -1
- package/dist/ionic/{p-93e3654c.system.entry.js → p-d192fdf7.system.entry.js} +1 -1
- package/dist/ionic/{p-1a5bc5f7.js → p-d60342e3.js} +1 -1
- package/dist/ionic/{p-89bf08c7.entry.js → p-da074ff7.entry.js} +1 -1
- package/dist/ionic/{p-fec13c57.entry.js → p-e1bbacb7.entry.js} +1 -1
- package/dist/ionic/{p-179bf9d1.system.entry.js → p-e265ae18.system.entry.js} +1 -1
- package/dist/ionic/{p-fbf86e62.system.js → p-e308de5b.system.js} +1 -1
- package/dist/ionic/{p-058e61eb.system.js → p-e8232807.system.js} +1 -1
- package/dist/ionic/{p-655723eb.system.entry.js → p-e8c3fb87.system.entry.js} +1 -1
- package/dist/ionic/{p-80c6d619.entry.js → p-e97a3f44.entry.js} +1 -1
- package/dist/ionic/{p-7ae680ba.system.entry.js → p-f2b8c349.system.entry.js} +1 -1
- package/dist/ionic/{p-f5d6624d.entry.js → p-f42743d1.entry.js} +1 -1
- package/dist/ionic/{p-4d3a5f86.js → p-f5035354.js} +1 -1
- package/dist/ionic/{p-343b6b1d.system.js → p-f687573e.system.js} +1 -1
- package/dist/ionic/p-ff4b7e40.system.js +4 -0
- package/dist/ionic/{p-f56752be.system.entry.js → p-ffc48bc5.system.entry.js} +1 -1
- package/dist/types/components/checkbox/checkbox.d.ts +0 -6
- package/dist/types/components/modal/animations/sheet.d.ts +0 -1
- package/dist/types/components/modal/gestures/sheet.d.ts +1 -1
- package/dist/types/components/modal/modal-interface.d.ts +0 -1
- package/dist/types/components/modal/modal.d.ts +0 -11
- package/dist/types/components/select/select.d.ts +0 -6
- package/dist/types/components/toggle/toggle.d.ts +0 -6
- package/dist/types/components/toolbar/toolbar.d.ts +0 -4
- package/dist/types/components.d.ts +0 -32
- package/dist/types/utils/config.d.ts +0 -9
- package/dist/types/utils/logging/index.d.ts +1 -13
- package/hydrate/index.js +86 -332
- package/hydrate/index.mjs +86 -332
- package/package.json +1 -1
- package/dist/esm-es5/index-6ad967f3.js +0 -4
- package/dist/esm-es5/input-shims-dff819a9.js +0 -4
- package/dist/esm-es5/md.transition-a560e0e2.js +0 -4
- package/dist/esm-es5/status-tap-d07dbc82.js +0 -4
- package/dist/ionic/p-155f4d90.entry.js +0 -4
- package/dist/ionic/p-21227121.js +0 -4
- package/dist/ionic/p-22149a4f.js +0 -4
- package/dist/ionic/p-34479cfb.entry.js +0 -4
- package/dist/ionic/p-346b2baf.js +0 -4
- package/dist/ionic/p-3e99e3e0.entry.js +0 -4
- package/dist/ionic/p-42c9deb1.entry.js +0 -4
- package/dist/ionic/p-52245809.js +0 -4
- package/dist/ionic/p-5c9324c6.js +0 -4
- package/dist/ionic/p-67222c16.system.js +0 -4
- package/dist/ionic/p-712fedc9.entry.js +0 -4
- package/dist/ionic/p-a18470c6.entry.js +0 -4
- package/dist/ionic/p-c3802319.system.js +0 -4
- package/dist/ionic/p-e8d56122.js +0 -4
- package/dist/ionic/p-f2613334.system.entry.js +0 -4
package/components/alert.js
CHANGED
|
@@ -167,6 +167,7 @@ const Alert = /*@__PURE__*/ proxyCustomElement(class Alert extends HTMLElement {
|
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
169
|
onKeydown(ev) {
|
|
170
|
+
var _a;
|
|
170
171
|
const inputTypes = new Set(this.processedInputs.map((i) => i.type));
|
|
171
172
|
/**
|
|
172
173
|
* Based on keyboard navigation requirements, the
|
|
@@ -176,6 +177,17 @@ const Alert = /*@__PURE__*/ proxyCustomElement(class Alert extends HTMLElement {
|
|
|
176
177
|
ev.preventDefault();
|
|
177
178
|
return;
|
|
178
179
|
}
|
|
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
|
+
}
|
|
179
191
|
// The only inputs we want to navigate between using arrow keys are the radios
|
|
180
192
|
// ignore the keydown event if it is not on a radio button
|
|
181
193
|
if (!inputTypes.has('radio') ||
|
|
@@ -307,7 +319,16 @@ const Alert = /*@__PURE__*/ proxyCustomElement(class Alert extends HTMLElement {
|
|
|
307
319
|
async present() {
|
|
308
320
|
const unlock = await this.lockController.lock();
|
|
309
321
|
await this.delegateController.attachViewToDom();
|
|
310
|
-
await present(this, 'alertEnter', iosEnterAnimation, mdEnterAnimation)
|
|
322
|
+
await present(this, 'alertEnter', iosEnterAnimation, mdEnterAnimation).then(() => {
|
|
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
|
+
});
|
|
311
332
|
unlock();
|
|
312
333
|
}
|
|
313
334
|
/**
|
|
@@ -481,8 +502,8 @@ const Alert = /*@__PURE__*/ proxyCustomElement(class Alert extends HTMLElement {
|
|
|
481
502
|
const { overlayIndex, header, subHeader, message, htmlAttributes } = this;
|
|
482
503
|
const mode = getIonMode(this);
|
|
483
504
|
const hdrId = `alert-${overlayIndex}-hdr`;
|
|
484
|
-
const subHdrId = `alert-${overlayIndex}-sub-hdr`;
|
|
485
505
|
const msgId = `alert-${overlayIndex}-msg`;
|
|
506
|
+
const subHdrId = `alert-${overlayIndex}-sub-hdr`;
|
|
486
507
|
const role = this.inputs.length > 0 || this.buttons.length > 0 ? 'alertdialog' : 'alert';
|
|
487
508
|
/**
|
|
488
509
|
* Use both the header and subHeader ids if they are defined.
|
|
@@ -491,9 +512,9 @@ const Alert = /*@__PURE__*/ proxyCustomElement(class Alert extends HTMLElement {
|
|
|
491
512
|
* If neither are defined, do not set aria-labelledby.
|
|
492
513
|
*/
|
|
493
514
|
const ariaLabelledBy = header && subHeader ? `${hdrId} ${subHdrId}` : header ? hdrId : subHeader ? subHdrId : null;
|
|
494
|
-
return (h(Host,
|
|
515
|
+
return (h(Host, { key: 'cf4106a77213c7a9ca510a2b9fda47a179c03844', tabindex: "-1", style: {
|
|
495
516
|
zIndex: `${20000 + overlayIndex}`,
|
|
496
|
-
}, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'alert-translucent': this.translucent }), onIonAlertWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }
|
|
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: '8bd13553c3bc548367a84dba8955940b2a43d782', tappable: this.backdropDismiss }), h("div", { key: '4a89918ab6f0f4eb8be3da4703cffe1469b765c0', tabindex: "0", "aria-hidden": "true" }), h("div", Object.assign({ key: '28fee816801cb7f08d1f0ff7e8f277732cadfd2b', class: "alert-wrapper ion-overlay-wrapper", role: role, "aria-modal": "true", "aria-labelledby": ariaLabelledBy, "aria-describedby": message !== undefined ? msgId : null, tabindex: "0", ref: (el) => (this.wrapperEl = el) }, htmlAttributes), h("div", { key: 'e0f4a19b352fbea1db65ff28fbb9ebfdd8600583', class: "alert-head" }, header && (h("h2", { key: 'e47f9b036c9179d4cea955d97770fed1e58a2ad3', id: hdrId, class: "alert-title" }, header)), subHeader && !header && (h("h2", { key: '95f90fb025f4e29d5e5d78f787733d2321300787', id: subHdrId, class: "alert-sub-title" }, subHeader)), subHeader && header && (h("h3", { key: '73488f2d301d1579e4457fcc8d01e8b6f133b849', id: subHdrId, class: "alert-sub-title" }, subHeader))), this.renderAlertMessage(msgId), this.renderAlertInputs(), this.renderAlertButtons()), h("div", { key: '8c6767195aeadf99da422f6e55d5c47b1d64562a', tabindex: "0", "aria-hidden": "true" })));
|
|
497
518
|
}
|
|
498
519
|
get el() { return this; }
|
|
499
520
|
static get watchers() { return {
|
package/components/checkbox.js
CHANGED
|
@@ -62,7 +62,6 @@ const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends HTMLEle
|
|
|
62
62
|
this.labelPlacement = 'start';
|
|
63
63
|
this.justify = undefined;
|
|
64
64
|
this.alignment = undefined;
|
|
65
|
-
this.required = false;
|
|
66
65
|
}
|
|
67
66
|
componentWillLoad() {
|
|
68
67
|
this.inheritedAttributes = Object.assign({}, inheritAriaAttributes(this.el));
|
|
@@ -74,11 +73,11 @@ const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends HTMLEle
|
|
|
74
73
|
}
|
|
75
74
|
}
|
|
76
75
|
render() {
|
|
77
|
-
const { color, checked, disabled, el, getSVGPath, indeterminate, inheritedAttributes, inputId, justify, labelPlacement, name, value, alignment,
|
|
76
|
+
const { color, checked, disabled, el, getSVGPath, indeterminate, inheritedAttributes, inputId, justify, labelPlacement, name, value, alignment, } = this;
|
|
78
77
|
const mode = getIonMode(this);
|
|
79
78
|
const path = getSVGPath(mode, indeterminate);
|
|
80
79
|
renderHiddenInput(true, el, name, checked ? value : '', disabled);
|
|
81
|
-
return (h(Host, { key: '
|
|
80
|
+
return (h(Host, { key: '6dc787e1100521d08c4900104e1a3e2f594e919f', "aria-checked": indeterminate ? 'mixed' : `${checked}`, class: createColorClasses(color, {
|
|
82
81
|
[mode]: true,
|
|
83
82
|
'in-item': hostContext('ion-item', el),
|
|
84
83
|
'checkbox-checked': checked,
|
|
@@ -88,10 +87,10 @@ const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends HTMLEle
|
|
|
88
87
|
[`checkbox-justify-${justify}`]: justify !== undefined,
|
|
89
88
|
[`checkbox-alignment-${alignment}`]: alignment !== undefined,
|
|
90
89
|
[`checkbox-label-placement-${labelPlacement}`]: true,
|
|
91
|
-
}), onClick: this.onClick }, h("label", { key: '
|
|
90
|
+
}), onClick: this.onClick }, h("label", { key: '68222fb736a5ec3f2e488649b0e2ce0417dcb224', class: "checkbox-wrapper" }, h("input", Object.assign({ key: 'f12962d7e9b19c744cfdbdeccc67ae7f5d080281', type: "checkbox", checked: checked ? true : undefined, disabled: disabled, id: inputId, onChange: this.toggleChecked, onFocus: () => this.onFocus(), onBlur: () => this.onBlur(), ref: (focusEl) => (this.focusEl = focusEl) }, inheritedAttributes)), h("div", { key: 'c72df2699414b1e5a41a1bc267bc634f0c93dcff', class: {
|
|
92
91
|
'label-text-wrapper': true,
|
|
93
92
|
'label-text-wrapper-hidden': el.textContent === '',
|
|
94
|
-
}, part: "label" }, h("slot", { key: '
|
|
93
|
+
}, part: "label" }, h("slot", { key: 'a2a80285178a7e0e3b536fc9ca26b8b444aa4307' })), h("div", { key: 'c2b05e0d1fe8df5dcd72858220b5ff51ecaee4cc', class: "native-wrapper" }, h("svg", { key: 'ee24913fded72258ebd9713654a6dba92a18fcf7', class: "checkbox-icon", viewBox: "0 0 24 24", part: "container" }, path)))));
|
|
95
94
|
}
|
|
96
95
|
getSVGPath(mode, indeterminate) {
|
|
97
96
|
let path = indeterminate ? (h("path", { d: "M6 12L18 12", part: "mark" })) : (h("path", { d: "M5.9,12.5l3.8,3.8l8.8-8.8", part: "mark" }));
|
|
@@ -115,7 +114,6 @@ const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends HTMLEle
|
|
|
115
114
|
"labelPlacement": [1, "label-placement"],
|
|
116
115
|
"justify": [1],
|
|
117
116
|
"alignment": [1],
|
|
118
|
-
"required": [4],
|
|
119
117
|
"setFocus": [64]
|
|
120
118
|
}]);
|
|
121
119
|
let checkboxIds = 0;
|
package/components/index6.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import { c as config } from './ionic-global.js';
|
|
5
|
-
|
|
6
4
|
/**
|
|
7
5
|
* Logs a warning to the console with an Ionic prefix
|
|
8
6
|
* to indicate the library that is warning the developer.
|
|
@@ -10,12 +8,9 @@ import { c as config } from './ionic-global.js';
|
|
|
10
8
|
* @param message - The string message to be logged to the console.
|
|
11
9
|
*/
|
|
12
10
|
const printIonWarning = (message, ...params) => {
|
|
13
|
-
|
|
14
|
-
if (["WARN" /* LogLevel.WARN */].includes(logLevel)) {
|
|
15
|
-
return console.warn(`[Ionic Warning]: ${message}`, ...params);
|
|
16
|
-
}
|
|
11
|
+
return console.warn(`[Ionic Warning]: ${message}`, ...params);
|
|
17
12
|
};
|
|
18
|
-
|
|
13
|
+
/*
|
|
19
14
|
* Logs an error to the console with an Ionic prefix
|
|
20
15
|
* to indicate the library that is warning the developer.
|
|
21
16
|
*
|
|
@@ -23,10 +18,7 @@ const printIonWarning = (message, ...params) => {
|
|
|
23
18
|
* @param params - Additional arguments to supply to the console.error.
|
|
24
19
|
*/
|
|
25
20
|
const printIonError = (message, ...params) => {
|
|
26
|
-
|
|
27
|
-
if (["ERROR" /* LogLevel.ERROR */, "WARN" /* LogLevel.WARN */].includes(logLevel)) {
|
|
28
|
-
return console.error(`[Ionic Error]: ${message}`, ...params);
|
|
29
|
-
}
|
|
21
|
+
return console.error(`[Ionic Error]: ${message}`, ...params);
|
|
30
22
|
};
|
|
31
23
|
/**
|
|
32
24
|
* Prints an error informing developers that an implementation requires an element to be used
|
package/components/ion-select.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host, forceUpdate } from '@stencil/core/internal/client';
|
|
5
5
|
import { c as createNotchController } from './notch-controller.js';
|
|
6
6
|
import { i as isOptionSelected, c as compareOptions, d as defineCustomElement$8 } from './radio.js';
|
|
7
|
-
import { d as inheritAttributes,
|
|
7
|
+
import { d as inheritAttributes, f as focusVisibleElement, e as renderHiddenInput } from './helpers.js';
|
|
8
8
|
import { c as popoverController, b as actionSheetController, a as alertController, m as modalController } from './overlays.js';
|
|
9
9
|
import { i as isRTL } from './dir.js';
|
|
10
10
|
import { h as hostContext, c as createColorClasses } from './theme.js';
|
|
@@ -115,7 +115,6 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
|
|
|
115
115
|
this.expandedIcon = undefined;
|
|
116
116
|
this.shape = undefined;
|
|
117
117
|
this.value = undefined;
|
|
118
|
-
this.required = false;
|
|
119
118
|
}
|
|
120
119
|
styleChanged() {
|
|
121
120
|
this.emitStyle();
|
|
@@ -178,8 +177,15 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
|
|
|
178
177
|
}
|
|
179
178
|
this.isExpanded = true;
|
|
180
179
|
const overlay = (this.overlay = await this.createOverlay(event));
|
|
181
|
-
|
|
182
|
-
|
|
180
|
+
overlay.onDidDismiss().then(() => {
|
|
181
|
+
this.overlay = undefined;
|
|
182
|
+
this.isExpanded = false;
|
|
183
|
+
this.ionDismiss.emit();
|
|
184
|
+
this.setFocus();
|
|
185
|
+
});
|
|
186
|
+
await overlay.present();
|
|
187
|
+
// focus selected option for popovers and modals
|
|
188
|
+
if (this.interface === 'popover' || this.interface === 'modal') {
|
|
183
189
|
const indexOfSelected = this.childOpts.findIndex((o) => o.value === this.value);
|
|
184
190
|
if (indexOfSelected > -1) {
|
|
185
191
|
const selectedItem = overlay.querySelector(`.select-interface-option:nth-child(${indexOfSelected + 1})`);
|
|
@@ -197,7 +203,6 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
|
|
|
197
203
|
*/
|
|
198
204
|
const interactiveEl = selectedItem.querySelector('ion-radio, ion-checkbox');
|
|
199
205
|
if (interactiveEl) {
|
|
200
|
-
selectedItem.scrollIntoView({ block: 'nearest' });
|
|
201
206
|
// Needs to be called before `focusVisibleElement` to prevent issue with focus event bubbling
|
|
202
207
|
// and removing `ion-focused` style
|
|
203
208
|
interactiveEl.setFocus();
|
|
@@ -221,40 +226,7 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
|
|
|
221
226
|
focusVisibleElement(firstEnabledOption.closest('ion-item'));
|
|
222
227
|
}
|
|
223
228
|
}
|
|
224
|
-
};
|
|
225
|
-
// For modals and popovers, we can scroll before they're visible
|
|
226
|
-
if (this.interface === 'modal') {
|
|
227
|
-
overlay.addEventListener('ionModalWillPresent', scrollSelectedIntoView, { once: true });
|
|
228
|
-
}
|
|
229
|
-
else if (this.interface === 'popover') {
|
|
230
|
-
overlay.addEventListener('ionPopoverWillPresent', scrollSelectedIntoView, { once: true });
|
|
231
229
|
}
|
|
232
|
-
else {
|
|
233
|
-
/**
|
|
234
|
-
* For alerts and action sheets, we need to wait a frame after willPresent
|
|
235
|
-
* because these overlays don't have their content in the DOM immediately
|
|
236
|
-
* when willPresent fires. By waiting a frame, we ensure the content is
|
|
237
|
-
* rendered and can be properly scrolled into view.
|
|
238
|
-
*/
|
|
239
|
-
const scrollAfterRender = () => {
|
|
240
|
-
requestAnimationFrame(() => {
|
|
241
|
-
scrollSelectedIntoView();
|
|
242
|
-
});
|
|
243
|
-
};
|
|
244
|
-
if (this.interface === 'alert') {
|
|
245
|
-
overlay.addEventListener('ionAlertWillPresent', scrollAfterRender, { once: true });
|
|
246
|
-
}
|
|
247
|
-
else if (this.interface === 'action-sheet') {
|
|
248
|
-
overlay.addEventListener('ionActionSheetWillPresent', scrollAfterRender, { once: true });
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
overlay.onDidDismiss().then(() => {
|
|
252
|
-
this.overlay = undefined;
|
|
253
|
-
this.isExpanded = false;
|
|
254
|
-
this.ionDismiss.emit();
|
|
255
|
-
this.setFocus();
|
|
256
|
-
});
|
|
257
|
-
await overlay.present();
|
|
258
230
|
return overlay;
|
|
259
231
|
}
|
|
260
232
|
createOverlay(ev) {
|
|
@@ -634,8 +606,8 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
|
|
|
634
606
|
return renderedLabel;
|
|
635
607
|
}
|
|
636
608
|
renderListbox() {
|
|
637
|
-
const { disabled, inputId, isExpanded
|
|
638
|
-
return (h("button", { disabled: disabled, id: inputId, "aria-label": this.ariaLabel, "aria-haspopup": "dialog", "aria-expanded": `${isExpanded}`,
|
|
609
|
+
const { disabled, inputId, isExpanded } = this;
|
|
610
|
+
return (h("button", { disabled: disabled, id: inputId, "aria-label": this.ariaLabel, "aria-haspopup": "dialog", "aria-expanded": `${isExpanded}`, onFocus: this.onFocus, onBlur: this.onBlur, ref: (focusEl) => (this.focusEl = focusEl) }));
|
|
639
611
|
}
|
|
640
612
|
render() {
|
|
641
613
|
const { disabled, el, isExpanded, expandedIcon, labelPlacement, justify, placeholder, fill, shape, name, value } = this;
|
|
@@ -666,7 +638,7 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
|
|
|
666
638
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
667
639
|
*/
|
|
668
640
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || isExpanded || hasStartEndSlots));
|
|
669
|
-
return (h(Host, { key: '
|
|
641
|
+
return (h(Host, { key: '144dfa5c49549a74fe516c65b9b8104a477ac789', onClick: this.onClick, class: createColorClasses(this.color, {
|
|
670
642
|
[mode]: true,
|
|
671
643
|
'in-item': inItem,
|
|
672
644
|
'in-item-color': hostContext('ion-item.ion-color', el),
|
|
@@ -682,7 +654,7 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
|
|
|
682
654
|
[`select-justify-${justify}`]: justifyEnabled,
|
|
683
655
|
[`select-shape-${shape}`]: shape !== undefined,
|
|
684
656
|
[`select-label-placement-${labelPlacement}`]: true,
|
|
685
|
-
}) }, h("label", { key: '
|
|
657
|
+
}) }, h("label", { key: '0edcfcbac575a9dccc77991531b6980d1caebf42', class: "select-wrapper", id: "select-label" }, this.renderLabelContainer(), h("div", { key: '348151d90cb093f5d21c7d4a834264ac4a312c40', class: "select-wrapper-inner" }, h("slot", { key: '8b7708c7f81217435c58276da0c08bba766d9500', name: "start" }), h("div", { key: '10c520a335da0a0d1cf40f9365597beb244d3b48', class: "native-wrapper", ref: (el) => (this.nativeWrapperEl = el), part: "container" }, this.renderSelectText(), this.renderListbox()), h("slot", { key: '0f15c40a5495e98e29d2a21ba21e0bc6f1c0125a', name: "end" }), !hasFloatingOrStackedLabel && this.renderSelectIcon()), hasFloatingOrStackedLabel && this.renderSelectIcon(), shouldRenderHighlight && h("div", { key: 'c87faad2e5ebf7f9453397d7ede43abd64d21294', class: "select-highlight" }))));
|
|
686
658
|
}
|
|
687
659
|
get el() { return this; }
|
|
688
660
|
static get watchers() { return {
|
|
@@ -715,7 +687,6 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
|
|
|
715
687
|
"expandedIcon": [1, "expanded-icon"],
|
|
716
688
|
"shape": [1],
|
|
717
689
|
"value": [1032],
|
|
718
|
-
"required": [4],
|
|
719
690
|
"isExpanded": [32],
|
|
720
691
|
"open": [64]
|
|
721
692
|
}, undefined, {
|
package/components/ion-toggle.js
CHANGED
|
@@ -75,7 +75,6 @@ const Toggle = /*@__PURE__*/ proxyCustomElement(class Toggle extends HTMLElement
|
|
|
75
75
|
this.labelPlacement = 'start';
|
|
76
76
|
this.justify = undefined;
|
|
77
77
|
this.alignment = undefined;
|
|
78
|
-
this.required = false;
|
|
79
78
|
}
|
|
80
79
|
disabledChanged() {
|
|
81
80
|
if (this.gesture) {
|
|
@@ -157,12 +156,12 @@ const Toggle = /*@__PURE__*/ proxyCustomElement(class Toggle extends HTMLElement
|
|
|
157
156
|
return this.el.textContent !== '';
|
|
158
157
|
}
|
|
159
158
|
render() {
|
|
160
|
-
const { activated, color, checked, disabled, el, justify, labelPlacement, inputId, name, alignment
|
|
159
|
+
const { activated, color, checked, disabled, el, justify, labelPlacement, inputId, name, alignment } = this;
|
|
161
160
|
const mode = getIonMode(this);
|
|
162
161
|
const value = this.getValue();
|
|
163
162
|
const rtl = isRTL(el) ? 'rtl' : 'ltr';
|
|
164
163
|
renderHiddenInput(true, el, name, checked ? value : '', disabled);
|
|
165
|
-
return (h(Host, { key: '
|
|
164
|
+
return (h(Host, { key: 'f52195ec3bc14c024647cb41319c32a4cd330e19', onClick: this.onClick, class: createColorClasses(color, {
|
|
166
165
|
[mode]: true,
|
|
167
166
|
'in-item': hostContext('ion-item', el),
|
|
168
167
|
'toggle-activated': activated,
|
|
@@ -172,10 +171,10 @@ const Toggle = /*@__PURE__*/ proxyCustomElement(class Toggle extends HTMLElement
|
|
|
172
171
|
[`toggle-alignment-${alignment}`]: alignment !== undefined,
|
|
173
172
|
[`toggle-label-placement-${labelPlacement}`]: true,
|
|
174
173
|
[`toggle-${rtl}`]: true,
|
|
175
|
-
}) }, h("label", { key: '
|
|
174
|
+
}) }, h("label", { key: 'f8b3a215ad85b2cee611ad63449b584e1640f27f', class: "toggle-wrapper" }, h("input", Object.assign({ key: 'f387b1ea840737a9737917e516834c887be99c09', type: "checkbox", role: "switch", "aria-checked": `${checked}`, checked: checked, disabled: disabled, id: inputId, onFocus: () => this.onFocus(), onBlur: () => this.onBlur(), ref: (focusEl) => (this.focusEl = focusEl) }, this.inheritedAttributes)), h("div", { key: '936af880db59fe377cd2de9101eb28a1c4fb8914', class: {
|
|
176
175
|
'label-text-wrapper': true,
|
|
177
176
|
'label-text-wrapper-hidden': !this.hasLabel,
|
|
178
|
-
}, part: "label" }, h("slot", { key: '
|
|
177
|
+
}, part: "label" }, h("slot", { key: '80a6672e2e792c15011a9496dcd75363cdba31c6' })), h("div", { key: '2b2b318b38ab27b194c0dab4cecd77d9d780f2ca', class: "native-wrapper" }, this.renderToggleControl()))));
|
|
179
178
|
}
|
|
180
179
|
get el() { return this; }
|
|
181
180
|
static get watchers() { return {
|
|
@@ -195,7 +194,6 @@ const Toggle = /*@__PURE__*/ proxyCustomElement(class Toggle extends HTMLElement
|
|
|
195
194
|
"labelPlacement": [1, "label-placement"],
|
|
196
195
|
"justify": [1],
|
|
197
196
|
"alignment": [1],
|
|
198
|
-
"required": [4],
|
|
199
197
|
"activated": [32]
|
|
200
198
|
}, undefined, {
|
|
201
199
|
"disabled": ["disabledChanged"]
|