@ionic/core 8.4.4-dev.11738618213.1e9f211b → 8.4.4-dev.11738772061.152d6e09
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/checkbox.js +6 -4
- package/components/index6.js +11 -3
- package/components/ion-select.js +6 -4
- package/components/ion-tab-button.js +1 -1
- package/components/ion-tab.js +6 -2
- package/components/ion-toggle.js +6 -4
- package/components/modal.js +259 -35
- package/components/ripple-effect.js +2 -4
- 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-21dc0f81.js → data-108e531d.js} +1 -1
- package/dist/cjs/{index-5b6a7459.js → index-0d762bba.js} +1 -1
- package/dist/cjs/{index-5915f9b3.js → index-2a46a047.js} +11 -3
- package/dist/cjs/{index-8e789962.js → index-3652c918.js} +1 -1
- package/dist/cjs/{index-f05acd21.js → index-e975c92b.js} +3 -3
- package/dist/cjs/index.cjs.js +6 -6
- package/dist/cjs/{input-shims-9e59ef62.js → input-shims-cd05268a.js} +4 -2
- package/dist/cjs/{input.utils-611cde0b.js → input.utils-ffb2f81b.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 +2 -2
- 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 +5 -4
- 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 +262 -39
- 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-ripple-effect.cjs.entry.js +2 -4
- package/dist/cjs/ion-select-modal.cjs.entry.js +2 -2
- package/dist/cjs/ion-select_3.cjs.entry.js +7 -6
- package/dist/cjs/ion-tab-bar_2.cjs.entry.js +1 -1
- package/dist/cjs/ion-tab_2.cjs.entry.js +6 -2
- 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 +5 -4
- package/dist/cjs/ionic.cjs.js +1 -1
- package/dist/cjs/{ios.transition-cf40433b.js → ios.transition-0e664e88.js} +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{md.transition-ededf99f.js → md.transition-2e8aef2c.js} +2 -2
- package/dist/cjs/{overlays-aa669eb8.js → overlays-65fdaff6.js} +1 -1
- package/dist/cjs/{status-tap-37681226.js → status-tap-d74f1429.js} +3 -2
- package/dist/collection/components/checkbox/checkbox.js +23 -4
- package/dist/collection/components/modal/animations/ios.enter.js +50 -4
- package/dist/collection/components/modal/animations/ios.leave.js +24 -2
- package/dist/collection/components/modal/animations/md.enter.js +52 -5
- package/dist/collection/components/modal/animations/md.leave.js +26 -3
- package/dist/collection/components/modal/animations/sheet.js +11 -2
- package/dist/collection/components/modal/gestures/sheet.js +79 -10
- package/dist/collection/components/modal/modal.ios.css +16 -0
- package/dist/collection/components/modal/modal.js +32 -7
- package/dist/collection/components/modal/modal.md.css +6 -0
- package/dist/collection/components/ripple-effect/ripple-effect.js +2 -4
- package/dist/collection/components/select/select.js +23 -4
- package/dist/collection/components/tab/tab.js +6 -2
- package/dist/collection/components/tab-button/tab-button.js +1 -1
- package/dist/collection/components/toggle/toggle.js +23 -4
- package/dist/collection/components/toolbar/toolbar.js +6 -2
- package/dist/collection/utils/logging/index.js +10 -3
- package/dist/docs.json +115 -2
- package/dist/esm/{data-ae11fd43.js → data-b3284b5e.js} +1 -1
- package/dist/esm/{index-3ad7f18b.js → index-2f7fde3d.js} +3 -3
- package/dist/esm/{index-9b0d46f4.js → index-6ad967f3.js} +11 -3
- package/dist/esm/{index-24b48b06.js → index-cb21eccb.js} +1 -1
- package/dist/esm/{index-5cc724f3.js → index-efb8ecdf.js} +1 -1
- package/dist/esm/index.js +6 -6
- package/dist/esm/{input-shims-0314bbe5.js → input-shims-2fd7c6ef.js} +4 -2
- package/dist/esm/{input.utils-09c71bc7.js → input.utils-961c9f17.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 +2 -2
- 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 +5 -4
- 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 +262 -39
- 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-ripple-effect.entry.js +2 -4
- package/dist/esm/ion-select-modal.entry.js +2 -2
- package/dist/esm/ion-select_3.entry.js +7 -6
- package/dist/esm/ion-tab-bar_2.entry.js +1 -1
- package/dist/esm/ion-tab_2.entry.js +6 -2
- 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 +5 -4
- package/dist/esm/ionic.js +1 -1
- package/dist/esm/{ios.transition-4ee1a3af.js → ios.transition-b1da3753.js} +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{md.transition-5106a0d2.js → md.transition-571b3859.js} +2 -2
- package/dist/esm/{overlays-e7b9d6d9.js → overlays-5deab4de.js} +1 -1
- package/dist/esm/{status-tap-f472b09f.js → status-tap-79eac0ac.js} +3 -2
- package/dist/esm-es5/{data-ae11fd43.js → data-b3284b5e.js} +1 -1
- package/dist/esm-es5/{index-3ad7f18b.js → index-2f7fde3d.js} +1 -1
- package/dist/esm-es5/index-6ad967f3.js +4 -0
- package/dist/esm-es5/{index-24b48b06.js → index-cb21eccb.js} +1 -1
- package/dist/esm-es5/{index-5cc724f3.js → index-efb8ecdf.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/input-shims-2fd7c6ef.js +4 -0
- package/dist/esm-es5/{input.utils-09c71bc7.js → input.utils-961c9f17.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-ripple-effect.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-tab-bar_2.entry.js +1 -1
- package/dist/esm-es5/ion-tab_2.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-4ee1a3af.js → ios.transition-b1da3753.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{md.transition-5106a0d2.js → md.transition-571b3859.js} +1 -1
- package/dist/esm-es5/{overlays-e7b9d6d9.js → overlays-5deab4de.js} +1 -1
- package/dist/esm-es5/status-tap-79eac0ac.js +4 -0
- package/dist/html.html-data.json +16 -0
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-017be83b.entry.js +4 -0
- package/dist/ionic/p-0430c2e0.entry.js +4 -0
- package/dist/ionic/{p-6499df44.system.entry.js → p-05b74e45.system.entry.js} +1 -1
- package/dist/ionic/{p-21e5e7e4.js → p-0af823e1.js} +1 -1
- package/dist/ionic/{p-0c06e09b.system.js → p-0eb35a7f.system.js} +1 -1
- package/dist/ionic/{p-797eeea8.system.entry.js → p-1199e388.system.entry.js} +1 -1
- package/dist/ionic/{p-c9f3a539.entry.js → p-120fb79a.entry.js} +1 -1
- package/dist/ionic/p-147e2d39.system.entry.js +4 -0
- package/dist/ionic/{p-e563a35c.entry.js → p-15d18206.entry.js} +1 -1
- package/dist/ionic/{p-d60342e3.js → p-1a5bc5f7.js} +1 -1
- package/dist/ionic/{p-96cc4814.js → p-1ab13b2b.js} +1 -1
- package/dist/ionic/{p-f1acf541.system.entry.js → p-2346ab53.system.entry.js} +1 -1
- package/dist/ionic/{p-37cb43bd.system.entry.js → p-248318e0.system.entry.js} +1 -1
- package/dist/ionic/{p-a882acef.system.entry.js → p-2507278c.system.entry.js} +1 -1
- package/dist/ionic/{p-e6635685.js → p-28706c6f.js} +1 -1
- package/dist/ionic/{p-6b280620.entry.js → p-2da9c8a7.entry.js} +1 -1
- package/dist/ionic/{p-b335ffed.system.entry.js → p-302b50bb.system.entry.js} +1 -1
- package/dist/ionic/p-322c5fb4.system.js +1 -1
- package/dist/ionic/{p-f687573e.system.js → p-343b6b1d.system.js} +1 -1
- package/dist/ionic/p-4c98e2cf.system.js +4 -0
- package/dist/ionic/p-577bc414.entry.js +4 -0
- package/dist/ionic/{p-66640ff7.system.entry.js → p-585b455c.system.entry.js} +1 -1
- package/dist/ionic/{p-c449820c.system.js → p-5c08627a.system.js} +1 -1
- package/dist/ionic/{p-9ee1e8a6.entry.js → p-5c9eb9af.entry.js} +1 -1
- package/dist/ionic/{p-9e33104d.entry.js → p-61db139d.entry.js} +1 -1
- package/dist/ionic/p-67222c16.system.js +4 -0
- package/dist/ionic/{p-32d44024.system.entry.js → p-6933c482.system.entry.js} +1 -1
- package/dist/ionic/p-6c95736e.entry.js +4 -0
- package/dist/ionic/p-6d32975a.entry.js +4 -0
- package/dist/ionic/{p-12a722b8.system.entry.js → p-6dfb0f39.system.entry.js} +1 -1
- package/dist/ionic/{p-bc36ad98.system.entry.js → p-744c8672.system.entry.js} +1 -1
- package/dist/ionic/{p-5823babc.system.entry.js → p-74e3f0af.system.entry.js} +2 -2
- package/dist/ionic/p-7513b0c4.js +4 -0
- package/dist/ionic/p-783411f1.entry.js +4 -0
- package/dist/ionic/{p-508d024a.entry.js → p-7a02f476.entry.js} +1 -1
- package/dist/ionic/{p-efaffe74.entry.js → p-7a6eaf9e.entry.js} +1 -1
- package/dist/ionic/{p-e7ed4a7f.system.js → p-7de1e42c.system.js} +1 -1
- package/dist/ionic/{p-2fc0dafe.entry.js → p-8694928f.entry.js} +1 -1
- package/dist/ionic/{p-da074ff7.entry.js → p-89bf08c7.entry.js} +1 -1
- package/dist/ionic/{p-69666e8a.system.entry.js → p-8ac07653.system.entry.js} +2 -2
- package/dist/ionic/{p-c29f8157.system.entry.js → p-8cfba7e9.system.entry.js} +1 -1
- package/dist/ionic/{p-a61cba41.entry.js → p-92763d3d.entry.js} +1 -1
- package/dist/ionic/{p-d18ab582.system.entry.js → p-933727f9.system.entry.js} +1 -1
- package/dist/ionic/{p-06e58c4e.js → p-9343a445.js} +1 -1
- package/dist/ionic/{p-45693d7e.entry.js → p-948e6c6a.entry.js} +1 -1
- package/dist/ionic/{p-2799c6d3.system.entry.js → p-9b122e3c.system.entry.js} +1 -1
- package/dist/ionic/{p-4439fc2a.entry.js → p-9b428d25.entry.js} +1 -1
- package/dist/ionic/{p-b2272f51.system.entry.js → p-9f364443.system.entry.js} +1 -1
- package/dist/ionic/{p-ca065903.system.entry.js → p-a090bce8.system.entry.js} +1 -1
- package/dist/ionic/{p-ddaa748a.system.entry.js → p-a0eb506c.system.entry.js} +1 -1
- package/dist/ionic/p-a3db8ee3.js +4 -0
- package/dist/ionic/{p-14e159ea.system.entry.js → p-a4a2420e.system.entry.js} +1 -1
- package/dist/ionic/{p-9ea607bd.system.js → p-a88dec0d.system.js} +2 -2
- package/dist/ionic/{p-942b5e13.entry.js → p-a8f2c254.entry.js} +1 -1
- package/dist/ionic/{p-a49378bb.system.entry.js → p-ab674093.system.entry.js} +1 -1
- package/dist/ionic/{p-0aa833fb.system.js → p-ada36597.system.js} +1 -1
- package/dist/ionic/{p-9fa07aec.entry.js → p-b1eb86fd.entry.js} +1 -1
- package/dist/ionic/{p-a4565eb5.system.js → p-b3c60433.system.js} +1 -1
- package/dist/ionic/{p-d6841eac.js → p-b6efeab8.js} +1 -1
- package/dist/ionic/{p-ebf042e0.system.entry.js → p-bdf2cb2e.system.entry.js} +1 -1
- package/dist/ionic/{p-f9a53abb.system.js → p-c4238c12.system.js} +1 -1
- package/dist/ionic/{p-b82d4cab.js → p-cb13696c.js} +1 -1
- package/dist/ionic/{p-1046866e.system.entry.js → p-cba1f9bc.system.entry.js} +1 -1
- package/dist/ionic/p-d1c5b60e.system.js +4 -0
- package/dist/ionic/{p-5da94421.system.js → p-d22e2a38.system.js} +1 -1
- package/dist/ionic/{p-2bd0ae94.system.entry.js → p-d6eaffb1.system.entry.js} +1 -1
- package/dist/ionic/p-d7dd8fb1.entry.js +4 -0
- package/dist/ionic/{p-19a5be0a.entry.js → p-e06057c9.entry.js} +1 -1
- package/dist/ionic/{p-1e010627.system.entry.js → p-e09d6392.system.entry.js} +2 -2
- package/dist/ionic/p-e3171ff3.entry.js +4 -0
- package/dist/ionic/p-e6376b93.system.entry.js +4 -0
- package/dist/ionic/{p-a43467d8.entry.js → p-e76dae93.entry.js} +1 -1
- package/dist/ionic/p-e8d56122.js +4 -0
- package/dist/ionic/{p-b79ba17c.entry.js → p-eef505e8.entry.js} +1 -1
- package/dist/ionic/{p-61e3f887.entry.js → p-f1060cd8.entry.js} +1 -1
- package/dist/ionic/{p-1fe02220.system.entry.js → p-f1120724.system.entry.js} +1 -1
- package/dist/ionic/{p-88e63c7d.js → p-f1c4dcd4.js} +1 -1
- package/dist/ionic/{p-982315a6.entry.js → p-f63c2d12.entry.js} +1 -1
- package/dist/ionic/{p-e4f69534.system.entry.js → p-fbd41a7e.system.entry.js} +1 -1
- package/dist/ionic/{p-19ec4f42.entry.js → p-fceec762.entry.js} +1 -1
- package/dist/types/components/checkbox/checkbox.d.ts +6 -0
- package/dist/types/components/modal/animations/sheet.d.ts +1 -0
- package/dist/types/components/modal/gestures/sheet.d.ts +1 -1
- package/dist/types/components/modal/modal-interface.d.ts +1 -0
- package/dist/types/components/modal/modal.d.ts +11 -0
- package/dist/types/components/select/select.d.ts +6 -0
- package/dist/types/components/toggle/toggle.d.ts +6 -0
- package/dist/types/components/toolbar/toolbar.d.ts +4 -0
- package/dist/types/components.d.ts +32 -0
- package/dist/types/utils/config.d.ts +9 -0
- package/dist/types/utils/logging/index.d.ts +13 -1
- package/hydrate/index.js +301 -59
- package/hydrate/index.mjs +301 -59
- package/package.json +1 -1
- package/dist/esm-es5/index-9b0d46f4.js +0 -4
- package/dist/esm-es5/input-shims-0314bbe5.js +0 -4
- package/dist/esm-es5/status-tap-f472b09f.js +0 -4
- package/dist/ionic/p-0303d0f8.js +0 -4
- package/dist/ionic/p-06fee233.js +0 -4
- package/dist/ionic/p-17474161.system.js +0 -4
- package/dist/ionic/p-1d8761e6.entry.js +0 -4
- package/dist/ionic/p-2172893e.system.entry.js +0 -4
- package/dist/ionic/p-2690b1de.js +0 -4
- package/dist/ionic/p-2b9b78c7.entry.js +0 -4
- package/dist/ionic/p-4ec778aa.entry.js +0 -4
- package/dist/ionic/p-5ab1b709.entry.js +0 -4
- package/dist/ionic/p-8b8be2fd.entry.js +0 -4
- package/dist/ionic/p-908d6080.entry.js +0 -4
- package/dist/ionic/p-98ff6b32.entry.js +0 -4
- package/dist/ionic/p-dfb78785.system.js +0 -4
- package/dist/ionic/p-e85d901b.system.entry.js +0 -4
- package/dist/ionic/p-eba29931.entry.js +0 -4
- package/dist/ionic/p-ff4b7e40.system.js +0 -4
package/hydrate/index.js
CHANGED
|
@@ -3217,9 +3217,12 @@ let accordionIds = 0;
|
|
|
3217
3217
|
* @param message - The string message to be logged to the console.
|
|
3218
3218
|
*/
|
|
3219
3219
|
const printIonWarning = (message, ...params) => {
|
|
3220
|
-
|
|
3220
|
+
const logLevel = config.get('logLevel', "WARN" /* LogLevel.WARN */);
|
|
3221
|
+
if (["WARN" /* LogLevel.WARN */].includes(logLevel)) {
|
|
3222
|
+
return console.warn(`[Ionic Warning]: ${message}`, ...params);
|
|
3223
|
+
}
|
|
3221
3224
|
};
|
|
3222
|
-
|
|
3225
|
+
/**
|
|
3223
3226
|
* Logs an error to the console with an Ionic prefix
|
|
3224
3227
|
* to indicate the library that is warning the developer.
|
|
3225
3228
|
*
|
|
@@ -3227,7 +3230,10 @@ const printIonWarning = (message, ...params) => {
|
|
|
3227
3230
|
* @param params - Additional arguments to supply to the console.error.
|
|
3228
3231
|
*/
|
|
3229
3232
|
const printIonError = (message, ...params) => {
|
|
3230
|
-
|
|
3233
|
+
const logLevel = config.get('logLevel', "ERROR" /* LogLevel.ERROR */);
|
|
3234
|
+
if (["ERROR" /* LogLevel.ERROR */, "WARN" /* LogLevel.WARN */].includes(logLevel)) {
|
|
3235
|
+
return console.error(`[Ionic Error]: ${message}`, ...params);
|
|
3236
|
+
}
|
|
3231
3237
|
};
|
|
3232
3238
|
/**
|
|
3233
3239
|
* Prints an error informing developers that an implementation requires an element to be used
|
|
@@ -8491,6 +8497,7 @@ class Checkbox {
|
|
|
8491
8497
|
this.labelPlacement = 'start';
|
|
8492
8498
|
this.justify = undefined;
|
|
8493
8499
|
this.alignment = undefined;
|
|
8500
|
+
this.required = false;
|
|
8494
8501
|
}
|
|
8495
8502
|
componentWillLoad() {
|
|
8496
8503
|
this.inheritedAttributes = Object.assign({}, inheritAriaAttributes(this.el));
|
|
@@ -8502,11 +8509,11 @@ class Checkbox {
|
|
|
8502
8509
|
}
|
|
8503
8510
|
}
|
|
8504
8511
|
render() {
|
|
8505
|
-
const { color, checked, disabled, el, getSVGPath, indeterminate, inheritedAttributes, inputId, justify, labelPlacement, name, value, alignment, } = this;
|
|
8512
|
+
const { color, checked, disabled, el, getSVGPath, indeterminate, inheritedAttributes, inputId, justify, labelPlacement, name, value, alignment, required, } = this;
|
|
8506
8513
|
const mode = getIonMode$1(this);
|
|
8507
8514
|
const path = getSVGPath(mode, indeterminate);
|
|
8508
8515
|
renderHiddenInput(true, el, name, checked ? value : '', disabled);
|
|
8509
|
-
return (hAsync(Host, { key: '
|
|
8516
|
+
return (hAsync(Host, { key: '07a5884062dd256b570e856270c74a5a09d2f2a5', "aria-checked": indeterminate ? 'mixed' : `${checked}`, class: createColorClasses$1(color, {
|
|
8510
8517
|
[mode]: true,
|
|
8511
8518
|
'in-item': hostContext('ion-item', el),
|
|
8512
8519
|
'checkbox-checked': checked,
|
|
@@ -8516,10 +8523,10 @@ class Checkbox {
|
|
|
8516
8523
|
[`checkbox-justify-${justify}`]: justify !== undefined,
|
|
8517
8524
|
[`checkbox-alignment-${alignment}`]: alignment !== undefined,
|
|
8518
8525
|
[`checkbox-label-placement-${labelPlacement}`]: true,
|
|
8519
|
-
}), onClick: this.onClick }, hAsync("label", { key: '
|
|
8526
|
+
}), onClick: this.onClick }, hAsync("label", { key: '3439d546e8b60187421db698eab63a0bdd31c973', class: "checkbox-wrapper" }, hAsync("input", Object.assign({ key: '9f45cf7dbdedcf01ec132c11e16979adb1aa102f', type: "checkbox", checked: checked ? true : undefined, disabled: disabled, id: inputId, onChange: this.toggleChecked, onFocus: () => this.onFocus(), onBlur: () => this.onBlur(), ref: (focusEl) => (this.focusEl = focusEl), required: required }, inheritedAttributes)), hAsync("div", { key: '4e882f98939cc4b7c7ab7459c751d3f4bb2023fe', class: {
|
|
8520
8527
|
'label-text-wrapper': true,
|
|
8521
8528
|
'label-text-wrapper-hidden': el.textContent === '',
|
|
8522
|
-
}, part: "label" }, hAsync("slot", { key: '
|
|
8529
|
+
}, part: "label" }, hAsync("slot", { key: '0abda81297a086d02c4a56af75005547971dfcfe' })), hAsync("div", { key: '36489ea3f48a7d0ec46b77c243f9f253ef5c2b3b', class: "native-wrapper" }, hAsync("svg", { key: '4c53b52f5e93752672a34eb6f180b75fa9af9046', class: "checkbox-icon", viewBox: "0 0 24 24", part: "container" }, path)))));
|
|
8523
8530
|
}
|
|
8524
8531
|
getSVGPath(mode, indeterminate) {
|
|
8525
8532
|
let path = indeterminate ? (hAsync("path", { d: "M6 12L18 12", part: "mark" })) : (hAsync("path", { d: "M5.9,12.5l3.8,3.8l8.8-8.8", part: "mark" }));
|
|
@@ -8546,6 +8553,7 @@ class Checkbox {
|
|
|
8546
8553
|
"labelPlacement": [1, "label-placement"],
|
|
8547
8554
|
"justify": [1],
|
|
8548
8555
|
"alignment": [1],
|
|
8556
|
+
"required": [4],
|
|
8549
8557
|
"setFocus": [64]
|
|
8550
8558
|
},
|
|
8551
8559
|
"$listeners$": undefined,
|
|
@@ -19021,7 +19029,7 @@ const computeDuration = (remaining, velocity) => {
|
|
|
19021
19029
|
};
|
|
19022
19030
|
|
|
19023
19031
|
const createSheetEnterAnimation = (opts) => {
|
|
19024
|
-
const { currentBreakpoint, backdropBreakpoint } = opts;
|
|
19032
|
+
const { currentBreakpoint, backdropBreakpoint, expandToScroll } = opts;
|
|
19025
19033
|
/**
|
|
19026
19034
|
* If the backdropBreakpoint is undefined, then the backdrop
|
|
19027
19035
|
* should always fade in. If the backdropBreakpoint came before the
|
|
@@ -19041,7 +19049,16 @@ const createSheetEnterAnimation = (opts) => {
|
|
|
19041
19049
|
{ offset: 0, opacity: 1, transform: 'translateY(100%)' },
|
|
19042
19050
|
{ offset: 1, opacity: 1, transform: `translateY(${100 - currentBreakpoint * 100}%)` },
|
|
19043
19051
|
]);
|
|
19044
|
-
|
|
19052
|
+
/**
|
|
19053
|
+
* This allows the content to be scrollable at any breakpoint.
|
|
19054
|
+
*/
|
|
19055
|
+
const contentAnimation = !expandToScroll
|
|
19056
|
+
? createAnimation('contentAnimation').keyframes([
|
|
19057
|
+
{ offset: 0, opacity: 1, maxHeight: `${(1 - currentBreakpoint) * 100}%` },
|
|
19058
|
+
{ offset: 1, opacity: 1, maxHeight: `${currentBreakpoint * 100}%` },
|
|
19059
|
+
])
|
|
19060
|
+
: undefined;
|
|
19061
|
+
return { wrapperAnimation, backdropAnimation, contentAnimation };
|
|
19045
19062
|
};
|
|
19046
19063
|
const createSheetLeaveAnimation = (opts) => {
|
|
19047
19064
|
const { currentBreakpoint, backdropBreakpoint } = opts;
|
|
@@ -19076,22 +19093,68 @@ const createEnterAnimation$1 = () => {
|
|
|
19076
19093
|
})
|
|
19077
19094
|
.afterClearStyles(['pointer-events']);
|
|
19078
19095
|
const wrapperAnimation = createAnimation().fromTo('transform', 'translateY(100vh)', 'translateY(0vh)');
|
|
19079
|
-
return { backdropAnimation, wrapperAnimation };
|
|
19096
|
+
return { backdropAnimation, wrapperAnimation, contentAnimation: undefined };
|
|
19080
19097
|
};
|
|
19081
19098
|
/**
|
|
19082
19099
|
* iOS Modal Enter Animation for the Card presentation style
|
|
19083
19100
|
*/
|
|
19084
19101
|
const iosEnterAnimation$3 = (baseEl, opts) => {
|
|
19085
|
-
const { presentingEl, currentBreakpoint } = opts;
|
|
19102
|
+
const { presentingEl, currentBreakpoint, expandToScroll } = opts;
|
|
19086
19103
|
const root = getElementRoot(baseEl);
|
|
19087
|
-
const { wrapperAnimation, backdropAnimation } = currentBreakpoint !== undefined ? createSheetEnterAnimation(opts) : createEnterAnimation$1();
|
|
19104
|
+
const { wrapperAnimation, backdropAnimation, contentAnimation } = currentBreakpoint !== undefined ? createSheetEnterAnimation(opts) : createEnterAnimation$1();
|
|
19088
19105
|
backdropAnimation.addElement(root.querySelector('ion-backdrop'));
|
|
19089
19106
|
wrapperAnimation.addElement(root.querySelectorAll('.modal-wrapper, .modal-shadow')).beforeStyles({ opacity: 1 });
|
|
19107
|
+
// The content animation is only added if scrolling is enabled for
|
|
19108
|
+
// all the breakpoints.
|
|
19109
|
+
!expandToScroll && (contentAnimation === null || contentAnimation === void 0 ? void 0 : contentAnimation.addElement(baseEl.querySelector('.ion-page')));
|
|
19090
19110
|
const baseAnimation = createAnimation('entering-base')
|
|
19091
19111
|
.addElement(baseEl)
|
|
19092
19112
|
.easing('cubic-bezier(0.32,0.72,0,1)')
|
|
19093
19113
|
.duration(500)
|
|
19094
|
-
.addAnimation(wrapperAnimation)
|
|
19114
|
+
.addAnimation([wrapperAnimation])
|
|
19115
|
+
.beforeAddWrite(() => {
|
|
19116
|
+
if (expandToScroll) {
|
|
19117
|
+
// Scroll can only be done when the modal is fully expanded.
|
|
19118
|
+
return;
|
|
19119
|
+
}
|
|
19120
|
+
/**
|
|
19121
|
+
* There are some browsers that causes flickering when
|
|
19122
|
+
* dragging the content when scroll is enabled at every
|
|
19123
|
+
* breakpoint. This is due to the wrapper element being
|
|
19124
|
+
* transformed off the screen and having a snap animation.
|
|
19125
|
+
*
|
|
19126
|
+
* A workaround is to clone the footer element and append
|
|
19127
|
+
* it outside of the wrapper element. This way, the footer
|
|
19128
|
+
* is still visible and the drag can be done without
|
|
19129
|
+
* flickering. The original footer is hidden until the modal
|
|
19130
|
+
* is dismissed. This maintains the animation of the footer
|
|
19131
|
+
* when the modal is dismissed.
|
|
19132
|
+
*
|
|
19133
|
+
* The workaround needs to be done before the animation starts
|
|
19134
|
+
* so there are no flickering issues.
|
|
19135
|
+
*/
|
|
19136
|
+
const ionFooter = baseEl.querySelector('ion-footer');
|
|
19137
|
+
/**
|
|
19138
|
+
* This check is needed to prevent more than one footer
|
|
19139
|
+
* from being appended to the shadow root.
|
|
19140
|
+
* Otherwise, iOS and MD enter animations would append
|
|
19141
|
+
* the footer twice.
|
|
19142
|
+
*/
|
|
19143
|
+
const ionFooterAlreadyAppended = baseEl.shadowRoot.querySelector('ion-footer');
|
|
19144
|
+
if (ionFooter && !ionFooterAlreadyAppended) {
|
|
19145
|
+
const footerHeight = ionFooter.clientHeight;
|
|
19146
|
+
const clonedFooter = ionFooter.cloneNode(true);
|
|
19147
|
+
baseEl.shadowRoot.appendChild(clonedFooter);
|
|
19148
|
+
ionFooter.style.setProperty('display', 'none');
|
|
19149
|
+
ionFooter.setAttribute('aria-hidden', 'true');
|
|
19150
|
+
// Padding is added to prevent some content from being hidden.
|
|
19151
|
+
const page = baseEl.querySelector('.ion-page');
|
|
19152
|
+
page.style.setProperty('padding-bottom', `${footerHeight}px`);
|
|
19153
|
+
}
|
|
19154
|
+
});
|
|
19155
|
+
if (contentAnimation) {
|
|
19156
|
+
baseAnimation.addAnimation(contentAnimation);
|
|
19157
|
+
}
|
|
19095
19158
|
if (presentingEl) {
|
|
19096
19159
|
const isMobile = window.innerWidth < 768;
|
|
19097
19160
|
const hasCardModal = presentingEl.tagName === 'ION-MODAL' && presentingEl.presentingElement !== undefined;
|
|
@@ -19169,7 +19232,7 @@ const createLeaveAnimation$1 = () => {
|
|
|
19169
19232
|
* iOS Modal Leave Animation
|
|
19170
19233
|
*/
|
|
19171
19234
|
const iosLeaveAnimation$3 = (baseEl, opts, duration = 500) => {
|
|
19172
|
-
const { presentingEl, currentBreakpoint } = opts;
|
|
19235
|
+
const { presentingEl, currentBreakpoint, expandToScroll } = opts;
|
|
19173
19236
|
const root = getElementRoot(baseEl);
|
|
19174
19237
|
const { wrapperAnimation, backdropAnimation } = currentBreakpoint !== undefined ? createSheetLeaveAnimation(opts) : createLeaveAnimation$1();
|
|
19175
19238
|
backdropAnimation.addElement(root.querySelector('ion-backdrop'));
|
|
@@ -19178,7 +19241,29 @@ const iosLeaveAnimation$3 = (baseEl, opts, duration = 500) => {
|
|
|
19178
19241
|
.addElement(baseEl)
|
|
19179
19242
|
.easing('cubic-bezier(0.32,0.72,0,1)')
|
|
19180
19243
|
.duration(duration)
|
|
19181
|
-
.addAnimation(wrapperAnimation)
|
|
19244
|
+
.addAnimation(wrapperAnimation)
|
|
19245
|
+
.beforeAddWrite(() => {
|
|
19246
|
+
if (expandToScroll) {
|
|
19247
|
+
// Scroll can only be done when the modal is fully expanded.
|
|
19248
|
+
return;
|
|
19249
|
+
}
|
|
19250
|
+
/**
|
|
19251
|
+
* If expandToScroll is disabled, we need to swap
|
|
19252
|
+
* the visibility to the original, so the footer
|
|
19253
|
+
* dismisses with the modal and doesn't stay
|
|
19254
|
+
* until the modal is removed from the DOM.
|
|
19255
|
+
*/
|
|
19256
|
+
const ionFooter = baseEl.querySelector('ion-footer');
|
|
19257
|
+
if (ionFooter) {
|
|
19258
|
+
const clonedFooter = baseEl.shadowRoot.querySelector('ion-footer');
|
|
19259
|
+
ionFooter.style.removeProperty('display');
|
|
19260
|
+
ionFooter.removeAttribute('aria-hidden');
|
|
19261
|
+
clonedFooter.style.setProperty('display', 'none');
|
|
19262
|
+
clonedFooter.setAttribute('aria-hidden', 'true');
|
|
19263
|
+
const page = baseEl.querySelector('.ion-page');
|
|
19264
|
+
page.style.removeProperty('padding-bottom');
|
|
19265
|
+
}
|
|
19266
|
+
});
|
|
19182
19267
|
if (presentingEl) {
|
|
19183
19268
|
const isMobile = window.innerWidth < 768;
|
|
19184
19269
|
const hasCardModal = presentingEl.tagName === 'ION-MODAL' && presentingEl.presentingElement !== undefined;
|
|
@@ -19256,22 +19341,69 @@ const createEnterAnimation = () => {
|
|
|
19256
19341
|
{ offset: 0, opacity: 0.01, transform: 'translateY(40px)' },
|
|
19257
19342
|
{ offset: 1, opacity: 1, transform: `translateY(0px)` },
|
|
19258
19343
|
]);
|
|
19259
|
-
return { backdropAnimation, wrapperAnimation };
|
|
19344
|
+
return { backdropAnimation, wrapperAnimation, contentAnimation: undefined };
|
|
19260
19345
|
};
|
|
19261
19346
|
/**
|
|
19262
19347
|
* Md Modal Enter Animation
|
|
19263
19348
|
*/
|
|
19264
19349
|
const mdEnterAnimation$2 = (baseEl, opts) => {
|
|
19265
|
-
const { currentBreakpoint } = opts;
|
|
19350
|
+
const { currentBreakpoint, expandToScroll } = opts;
|
|
19266
19351
|
const root = getElementRoot(baseEl);
|
|
19267
|
-
const { wrapperAnimation, backdropAnimation } = currentBreakpoint !== undefined ? createSheetEnterAnimation(opts) : createEnterAnimation();
|
|
19352
|
+
const { wrapperAnimation, backdropAnimation, contentAnimation } = currentBreakpoint !== undefined ? createSheetEnterAnimation(opts) : createEnterAnimation();
|
|
19268
19353
|
backdropAnimation.addElement(root.querySelector('ion-backdrop'));
|
|
19269
19354
|
wrapperAnimation.addElement(root.querySelector('.modal-wrapper'));
|
|
19270
|
-
|
|
19355
|
+
// The content animation is only added if scrolling is enabled for
|
|
19356
|
+
// all the breakpoints.
|
|
19357
|
+
expandToScroll && (contentAnimation === null || contentAnimation === void 0 ? void 0 : contentAnimation.addElement(baseEl.querySelector('.ion-page')));
|
|
19358
|
+
const baseAnimation = createAnimation()
|
|
19271
19359
|
.addElement(baseEl)
|
|
19272
19360
|
.easing('cubic-bezier(0.36,0.66,0.04,1)')
|
|
19273
19361
|
.duration(280)
|
|
19274
|
-
.addAnimation([backdropAnimation, wrapperAnimation])
|
|
19362
|
+
.addAnimation([backdropAnimation, wrapperAnimation])
|
|
19363
|
+
.beforeAddWrite(() => {
|
|
19364
|
+
if (expandToScroll) {
|
|
19365
|
+
// Scroll can only be done when the modal is fully expanded.
|
|
19366
|
+
return;
|
|
19367
|
+
}
|
|
19368
|
+
/**
|
|
19369
|
+
* There are some browsers that causes flickering when
|
|
19370
|
+
* dragging the content when scroll is enabled at every
|
|
19371
|
+
* breakpoint. This is due to the wrapper element being
|
|
19372
|
+
* transformed off the screen and having a snap animation.
|
|
19373
|
+
*
|
|
19374
|
+
* A workaround is to clone the footer element and append
|
|
19375
|
+
* it outside of the wrapper element. This way, the footer
|
|
19376
|
+
* is still visible and the drag can be done without
|
|
19377
|
+
* flickering. The original footer is hidden until the modal
|
|
19378
|
+
* is dismissed. This maintains the animation of the footer
|
|
19379
|
+
* when the modal is dismissed.
|
|
19380
|
+
*
|
|
19381
|
+
* The workaround needs to be done before the animation starts
|
|
19382
|
+
* so there are no flickering issues.
|
|
19383
|
+
*/
|
|
19384
|
+
const ionFooter = baseEl.querySelector('ion-footer');
|
|
19385
|
+
/**
|
|
19386
|
+
* This check is needed to prevent more than one footer
|
|
19387
|
+
* from being appended to the shadow root.
|
|
19388
|
+
* Otherwise, iOS and MD enter animations would append
|
|
19389
|
+
* the footer twice.
|
|
19390
|
+
*/
|
|
19391
|
+
const ionFooterAlreadyAppended = baseEl.shadowRoot.querySelector('ion-footer');
|
|
19392
|
+
if (ionFooter && !ionFooterAlreadyAppended) {
|
|
19393
|
+
const footerHeight = ionFooter.clientHeight;
|
|
19394
|
+
const clonedFooter = ionFooter.cloneNode(true);
|
|
19395
|
+
baseEl.shadowRoot.appendChild(clonedFooter);
|
|
19396
|
+
ionFooter.style.setProperty('display', 'none');
|
|
19397
|
+
ionFooter.setAttribute('aria-hidden', 'true');
|
|
19398
|
+
// Padding is added to prevent some content from being hidden.
|
|
19399
|
+
const page = baseEl.querySelector('.ion-page');
|
|
19400
|
+
page.style.setProperty('padding-bottom', `${footerHeight}px`);
|
|
19401
|
+
}
|
|
19402
|
+
});
|
|
19403
|
+
if (contentAnimation) {
|
|
19404
|
+
baseAnimation.addAnimation(contentAnimation);
|
|
19405
|
+
}
|
|
19406
|
+
return baseAnimation;
|
|
19275
19407
|
};
|
|
19276
19408
|
|
|
19277
19409
|
const createLeaveAnimation = () => {
|
|
@@ -19286,18 +19418,41 @@ const createLeaveAnimation = () => {
|
|
|
19286
19418
|
* Md Modal Leave Animation
|
|
19287
19419
|
*/
|
|
19288
19420
|
const mdLeaveAnimation$2 = (baseEl, opts) => {
|
|
19289
|
-
const { currentBreakpoint } = opts;
|
|
19421
|
+
const { currentBreakpoint, expandToScroll } = opts;
|
|
19290
19422
|
const root = getElementRoot(baseEl);
|
|
19291
19423
|
const { wrapperAnimation, backdropAnimation } = currentBreakpoint !== undefined ? createSheetLeaveAnimation(opts) : createLeaveAnimation();
|
|
19292
19424
|
backdropAnimation.addElement(root.querySelector('ion-backdrop'));
|
|
19293
19425
|
wrapperAnimation.addElement(root.querySelector('.modal-wrapper'));
|
|
19294
|
-
|
|
19426
|
+
const baseAnimation = createAnimation()
|
|
19295
19427
|
.easing('cubic-bezier(0.47,0,0.745,0.715)')
|
|
19296
19428
|
.duration(200)
|
|
19297
|
-
.addAnimation([backdropAnimation, wrapperAnimation])
|
|
19429
|
+
.addAnimation([backdropAnimation, wrapperAnimation])
|
|
19430
|
+
.beforeAddWrite(() => {
|
|
19431
|
+
if (expandToScroll) {
|
|
19432
|
+
// Scroll can only be done when the modal is fully expanded.
|
|
19433
|
+
return;
|
|
19434
|
+
}
|
|
19435
|
+
/**
|
|
19436
|
+
* If expandToScroll is disabled, we need to swap
|
|
19437
|
+
* the visibility to the original, so the footer
|
|
19438
|
+
* dismisses with the modal and doesn't stay
|
|
19439
|
+
* until the modal is removed from the DOM.
|
|
19440
|
+
*/
|
|
19441
|
+
const ionFooter = baseEl.querySelector('ion-footer');
|
|
19442
|
+
if (ionFooter) {
|
|
19443
|
+
const clonedFooter = baseEl.shadowRoot.querySelector('ion-footer');
|
|
19444
|
+
ionFooter.style.removeProperty('display');
|
|
19445
|
+
ionFooter.removeAttribute('aria-hidden');
|
|
19446
|
+
clonedFooter.style.setProperty('display', 'none');
|
|
19447
|
+
clonedFooter.setAttribute('aria-hidden', 'true');
|
|
19448
|
+
const page = baseEl.querySelector('.ion-page');
|
|
19449
|
+
page.style.removeProperty('padding-bottom');
|
|
19450
|
+
}
|
|
19451
|
+
});
|
|
19452
|
+
return baseAnimation;
|
|
19298
19453
|
};
|
|
19299
19454
|
|
|
19300
|
-
const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, backdropBreakpoint, animation, breakpoints = [], getCurrentBreakpoint, onDismiss, onBreakpointChange) => {
|
|
19455
|
+
const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, backdropBreakpoint, animation, breakpoints = [], expandToScroll, getCurrentBreakpoint, onDismiss, onBreakpointChange) => {
|
|
19301
19456
|
// Defaults for the sheet swipe animation
|
|
19302
19457
|
const defaultBackdrop = [
|
|
19303
19458
|
{ offset: 0, opacity: 'var(--backdrop-opacity)' },
|
|
@@ -19314,6 +19469,10 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
19314
19469
|
{ offset: 1, transform: 'translateY(100%)' },
|
|
19315
19470
|
],
|
|
19316
19471
|
BACKDROP_KEYFRAMES: backdropBreakpoint !== 0 ? customBackdrop : defaultBackdrop,
|
|
19472
|
+
CONTENT_KEYFRAMES: [
|
|
19473
|
+
{ offset: 0, maxHeight: '100%' },
|
|
19474
|
+
{ offset: 1, maxHeight: '0%' },
|
|
19475
|
+
],
|
|
19317
19476
|
};
|
|
19318
19477
|
const contentEl = baseEl.querySelector('ion-content');
|
|
19319
19478
|
const height = wrapperEl.clientHeight;
|
|
@@ -19321,10 +19480,11 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
19321
19480
|
let offset = 0;
|
|
19322
19481
|
let canDismissBlocksGesture = false;
|
|
19323
19482
|
const canDismissMaxStep = 0.95;
|
|
19324
|
-
const wrapperAnimation = animation.childAnimations.find((ani) => ani.id === 'wrapperAnimation');
|
|
19325
|
-
const backdropAnimation = animation.childAnimations.find((ani) => ani.id === 'backdropAnimation');
|
|
19326
19483
|
const maxBreakpoint = breakpoints[breakpoints.length - 1];
|
|
19327
19484
|
const minBreakpoint = breakpoints[0];
|
|
19485
|
+
const wrapperAnimation = animation.childAnimations.find((ani) => ani.id === 'wrapperAnimation');
|
|
19486
|
+
const backdropAnimation = animation.childAnimations.find((ani) => ani.id === 'backdropAnimation');
|
|
19487
|
+
const contentAnimation = animation.childAnimations.find((ani) => ani.id === 'contentAnimation');
|
|
19328
19488
|
const enableBackdrop = () => {
|
|
19329
19489
|
baseEl.style.setProperty('pointer-events', 'auto');
|
|
19330
19490
|
backdropEl.style.setProperty('pointer-events', 'auto');
|
|
@@ -19347,6 +19507,31 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
19347
19507
|
*/
|
|
19348
19508
|
baseEl.classList.add(FOCUS_TRAP_DISABLE_CLASS);
|
|
19349
19509
|
};
|
|
19510
|
+
/**
|
|
19511
|
+
* Toggles the visible modal footer when `expandToScroll` is disabled.
|
|
19512
|
+
* @param footer The footer to show.
|
|
19513
|
+
*/
|
|
19514
|
+
const swapFooterVisibility = (footer) => {
|
|
19515
|
+
const originalFooter = baseEl.querySelector('ion-footer');
|
|
19516
|
+
if (!originalFooter) {
|
|
19517
|
+
return;
|
|
19518
|
+
}
|
|
19519
|
+
const clonedFooter = wrapperEl.nextElementSibling;
|
|
19520
|
+
const footerToHide = footer === 'original' ? clonedFooter : originalFooter;
|
|
19521
|
+
const footerToShow = footer === 'original' ? originalFooter : clonedFooter;
|
|
19522
|
+
footerToShow.style.removeProperty('display');
|
|
19523
|
+
footerToShow.removeAttribute('aria-hidden');
|
|
19524
|
+
const page = baseEl.querySelector('.ion-page');
|
|
19525
|
+
if (footer === 'original') {
|
|
19526
|
+
page.style.removeProperty('padding-bottom');
|
|
19527
|
+
}
|
|
19528
|
+
else {
|
|
19529
|
+
const pagePadding = footerToShow.clientHeight;
|
|
19530
|
+
page.style.setProperty('padding-bottom', `${pagePadding}px`);
|
|
19531
|
+
}
|
|
19532
|
+
footerToHide.style.setProperty('display', 'none');
|
|
19533
|
+
footerToHide.setAttribute('aria-hidden', 'true');
|
|
19534
|
+
};
|
|
19350
19535
|
/**
|
|
19351
19536
|
* After the entering animation completes,
|
|
19352
19537
|
* we need to set the animation to go from
|
|
@@ -19358,6 +19543,7 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
19358
19543
|
if (wrapperAnimation && backdropAnimation) {
|
|
19359
19544
|
wrapperAnimation.keyframes([...SheetDefaults.WRAPPER_KEYFRAMES]);
|
|
19360
19545
|
backdropAnimation.keyframes([...SheetDefaults.BACKDROP_KEYFRAMES]);
|
|
19546
|
+
contentAnimation === null || contentAnimation === void 0 ? void 0 : contentAnimation.keyframes([...SheetDefaults.CONTENT_KEYFRAMES]);
|
|
19361
19547
|
animation.progressStart(true, 1 - currentBreakpoint);
|
|
19362
19548
|
/**
|
|
19363
19549
|
* If backdrop is not enabled, then content
|
|
@@ -19374,7 +19560,7 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
19374
19560
|
disableBackdrop();
|
|
19375
19561
|
}
|
|
19376
19562
|
}
|
|
19377
|
-
if (contentEl && currentBreakpoint !== maxBreakpoint) {
|
|
19563
|
+
if (contentEl && currentBreakpoint !== maxBreakpoint && expandToScroll) {
|
|
19378
19564
|
contentEl.scrollY = false;
|
|
19379
19565
|
}
|
|
19380
19566
|
const canStart = (detail) => {
|
|
@@ -19388,6 +19574,13 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
19388
19574
|
*/
|
|
19389
19575
|
const contentEl = findClosestIonContent(detail.event.target);
|
|
19390
19576
|
currentBreakpoint = getCurrentBreakpoint();
|
|
19577
|
+
/**
|
|
19578
|
+
* If we have expandToScroll disabled, we should not allow the swipe gesture to start
|
|
19579
|
+
* if the content is being swiped.
|
|
19580
|
+
*/
|
|
19581
|
+
if (!expandToScroll && contentEl) {
|
|
19582
|
+
return false;
|
|
19583
|
+
}
|
|
19391
19584
|
if (currentBreakpoint === 1 && contentEl) {
|
|
19392
19585
|
/**
|
|
19393
19586
|
* The modal should never swipe to close on the content with a refresher.
|
|
@@ -19418,6 +19611,15 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
19418
19611
|
* Remove undefined check
|
|
19419
19612
|
*/
|
|
19420
19613
|
canDismissBlocksGesture = baseEl.canDismiss !== undefined && baseEl.canDismiss !== true && minBreakpoint === 0;
|
|
19614
|
+
/**
|
|
19615
|
+
* If expandToScroll is disabled, we need to swap
|
|
19616
|
+
* the footer visibility to the original, so if the modal
|
|
19617
|
+
* is dismissed, the footer dismisses with the modal
|
|
19618
|
+
* and doesn't stay on the screen after the modal is gone.
|
|
19619
|
+
*/
|
|
19620
|
+
if (!expandToScroll) {
|
|
19621
|
+
swapFooterVisibility('original');
|
|
19622
|
+
}
|
|
19421
19623
|
/**
|
|
19422
19624
|
* If we are pulling down, then it is possible we are pulling on the content.
|
|
19423
19625
|
* We do not want scrolling to happen at the same time as the gesture.
|
|
@@ -19533,6 +19735,19 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
19533
19735
|
opacity: `calc(var(--backdrop-opacity) * ${getBackdropValueForSheet(snapToBreakpoint, backdropBreakpoint)})`,
|
|
19534
19736
|
},
|
|
19535
19737
|
]);
|
|
19738
|
+
if (contentAnimation) {
|
|
19739
|
+
/**
|
|
19740
|
+
* The modal content should scroll at any breakpoint when expandToScroll
|
|
19741
|
+
* is disabled. In order to do this, the content needs to be completely
|
|
19742
|
+
* viewable so scrolling can access everything. Otherwise, the default
|
|
19743
|
+
* behavior would show the content off the screen and only allow
|
|
19744
|
+
* scrolling when the sheet is fully expanded.
|
|
19745
|
+
*/
|
|
19746
|
+
contentAnimation.keyframes([
|
|
19747
|
+
{ offset: 0, maxHeight: `${(1 - breakpointOffset) * 100}%` },
|
|
19748
|
+
{ offset: 1, maxHeight: `${snapToBreakpoint * 100}%` },
|
|
19749
|
+
]);
|
|
19750
|
+
}
|
|
19536
19751
|
animation.progressStep(0);
|
|
19537
19752
|
}
|
|
19538
19753
|
/**
|
|
@@ -19540,6 +19755,14 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
19540
19755
|
* snapping animation completes.
|
|
19541
19756
|
*/
|
|
19542
19757
|
gesture.enable(false);
|
|
19758
|
+
/**
|
|
19759
|
+
* If expandToScroll is disabled, we need to swap
|
|
19760
|
+
* the footer visibility to the cloned one so the footer
|
|
19761
|
+
* doesn't flicker when the sheet's height is animated.
|
|
19762
|
+
*/
|
|
19763
|
+
if (!expandToScroll && shouldRemainOpen) {
|
|
19764
|
+
swapFooterVisibility('cloned');
|
|
19765
|
+
}
|
|
19543
19766
|
if (shouldPreventDismiss) {
|
|
19544
19767
|
handleCanDismiss(baseEl, animation);
|
|
19545
19768
|
}
|
|
@@ -19547,13 +19770,13 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
19547
19770
|
onDismiss();
|
|
19548
19771
|
}
|
|
19549
19772
|
/**
|
|
19550
|
-
*
|
|
19551
|
-
*
|
|
19552
|
-
*
|
|
19553
|
-
*
|
|
19554
|
-
*
|
|
19773
|
+
* Enables scrolling immediately if the sheet is about to fully expand
|
|
19774
|
+
* or if it allows scrolling at any breakpoint. Without this, there would
|
|
19775
|
+
* be a ~500ms delay while the modal animation completes, causing a
|
|
19776
|
+
* noticeable lag. Native iOS allows scrolling as soon as the gesture is
|
|
19777
|
+
* released, so we align with that behavior.
|
|
19555
19778
|
*/
|
|
19556
|
-
if (contentEl && snapToBreakpoint === breakpoints[breakpoints.length - 1]) {
|
|
19779
|
+
if (contentEl && (snapToBreakpoint === breakpoints[breakpoints.length - 1] || !expandToScroll)) {
|
|
19557
19780
|
contentEl.scrollY = true;
|
|
19558
19781
|
}
|
|
19559
19782
|
return new Promise((resolve) => {
|
|
@@ -19571,6 +19794,7 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
19571
19794
|
raf(() => {
|
|
19572
19795
|
wrapperAnimation.keyframes([...SheetDefaults.WRAPPER_KEYFRAMES]);
|
|
19573
19796
|
backdropAnimation.keyframes([...SheetDefaults.BACKDROP_KEYFRAMES]);
|
|
19797
|
+
contentAnimation === null || contentAnimation === void 0 ? void 0 : contentAnimation.keyframes([...SheetDefaults.CONTENT_KEYFRAMES]);
|
|
19574
19798
|
animation.progressStart(true, 1 - snapToBreakpoint);
|
|
19575
19799
|
currentBreakpoint = snapToBreakpoint;
|
|
19576
19800
|
onBreakpointChange(currentBreakpoint);
|
|
@@ -19623,10 +19847,10 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
19623
19847
|
};
|
|
19624
19848
|
};
|
|
19625
19849
|
|
|
19626
|
-
const modalIosCss = ":host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);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);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px;--ion-safe-area-top:0px;--ion-safe-area-bottom:0px;--ion-safe-area-right:0px;--ion-safe-area-left:0px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be));cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:\"\"}:host(.modal-sheet){--height:calc(100% - (var(--ion-safe-area-top) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.4)}:host(.modal-card),:host(.modal-sheet){--border-radius:10px}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:10px}}.modal-wrapper{-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0)}@media screen and (max-width: 767px){@supports (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - max(30px, var(--ion-safe-area-top)) - 10px)}}@supports not (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - 40px)}}:host(.modal-card) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}:host(.modal-card){--backdrop-opacity:0;--width:100%;-ms-flex-align:end;align-items:flex-end}:host(.modal-card) .modal-shadow{display:none}:host(.modal-card) ion-backdrop{pointer-events:none}}@media screen and (min-width: 768px){:host(.modal-card){--width:calc(100% - 120px);--height:calc(100% - (120px + var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));--max-width:720px;--max-height:1000px;--backdrop-opacity:0;--box-shadow:0px 0px 30px 10px rgba(0, 0, 0, 0.1);-webkit-transition:all 0.5s ease-in-out;transition:all 0.5s ease-in-out}:host(.modal-card) .modal-wrapper{-webkit-box-shadow:none;box-shadow:none}:host(.modal-card) .modal-shadow{-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow)}}:host(.modal-sheet) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}";
|
|
19850
|
+
const modalIosCss = ":host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);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);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px;--ion-safe-area-top:0px;--ion-safe-area-bottom:0px;--ion-safe-area-right:0px;--ion-safe-area-left:0px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be));cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:\"\"}:host(.modal-sheet){--height:calc(100% - (var(--ion-safe-area-top) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer{position:absolute;bottom:0;width:var(--width)}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.4)}:host(.modal-card),:host(.modal-sheet){--border-radius:10px}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:10px}}.modal-wrapper{-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0)}@media screen and (max-width: 767px){@supports (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - max(30px, var(--ion-safe-area-top)) - 10px)}}@supports not (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - 40px)}}:host(.modal-card) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}:host(.modal-card){--backdrop-opacity:0;--width:100%;-ms-flex-align:end;align-items:flex-end}:host(.modal-card) .modal-shadow{display:none}:host(.modal-card) ion-backdrop{pointer-events:none}}@media screen and (min-width: 768px){:host(.modal-card){--width:calc(100% - 120px);--height:calc(100% - (120px + var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));--max-width:720px;--max-height:1000px;--backdrop-opacity:0;--box-shadow:0px 0px 30px 10px rgba(0, 0, 0, 0.1);-webkit-transition:all 0.5s ease-in-out;transition:all 0.5s ease-in-out}:host(.modal-card) .modal-wrapper{-webkit-box-shadow:none;box-shadow:none}:host(.modal-card) .modal-shadow{-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow)}}:host(.modal-sheet) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer ion-toolbar:first-of-type{padding-top:6px}";
|
|
19627
19851
|
var IonModalIosStyle0 = modalIosCss;
|
|
19628
19852
|
|
|
19629
|
-
const modalMdCss = ":host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);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);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px;--ion-safe-area-top:0px;--ion-safe-area-bottom:0px;--ion-safe-area-right:0px;--ion-safe-area-left:0px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be));cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:\"\"}:host(.modal-sheet){--height:calc(100% - (var(--ion-safe-area-top) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.32)}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:2px;--box-shadow:0 28px 48px rgba(0, 0, 0, 0.4)}}.modal-wrapper{-webkit-transform:translate3d(0, 40px, 0);transform:translate3d(0, 40px, 0);opacity:0.01}";
|
|
19853
|
+
const modalMdCss = ":host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);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);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px;--ion-safe-area-top:0px;--ion-safe-area-bottom:0px;--ion-safe-area-right:0px;--ion-safe-area-left:0px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be));cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:\"\"}:host(.modal-sheet){--height:calc(100% - (var(--ion-safe-area-top) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer{position:absolute;bottom:0;width:var(--width)}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.32)}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:2px;--box-shadow:0 28px 48px rgba(0, 0, 0, 0.4)}}.modal-wrapper{-webkit-transform:translate3d(0, 40px, 0);transform:translate3d(0, 40px, 0);opacity:0.01}";
|
|
19630
19854
|
var IonModalMdStyle0 = modalMdCss;
|
|
19631
19855
|
|
|
19632
19856
|
// TODO(FW-2832): types
|
|
@@ -19705,6 +19929,7 @@ class Modal {
|
|
|
19705
19929
|
this.enterAnimation = undefined;
|
|
19706
19930
|
this.leaveAnimation = undefined;
|
|
19707
19931
|
this.breakpoints = undefined;
|
|
19932
|
+
this.expandToScroll = true;
|
|
19708
19933
|
this.initialBreakpoint = undefined;
|
|
19709
19934
|
this.backdropBreakpoint = 0;
|
|
19710
19935
|
this.handle = undefined;
|
|
@@ -19920,6 +20145,7 @@ class Modal {
|
|
|
19920
20145
|
presentingEl: presentingElement,
|
|
19921
20146
|
currentBreakpoint: this.initialBreakpoint,
|
|
19922
20147
|
backdropBreakpoint: this.backdropBreakpoint,
|
|
20148
|
+
expandToScroll: this.expandToScroll,
|
|
19923
20149
|
});
|
|
19924
20150
|
/* tslint:disable-next-line */
|
|
19925
20151
|
if (typeof window !== 'undefined') {
|
|
@@ -19970,7 +20196,10 @@ class Modal {
|
|
|
19970
20196
|
// should be in the DOM and referenced by now, except
|
|
19971
20197
|
// for the presenting el
|
|
19972
20198
|
const animationBuilder = this.leaveAnimation || config.get('modalLeave', iosLeaveAnimation$3);
|
|
19973
|
-
const ani = (this.animation = animationBuilder(el, {
|
|
20199
|
+
const ani = (this.animation = animationBuilder(el, {
|
|
20200
|
+
presentingEl: this.presentingElement,
|
|
20201
|
+
expandToScroll: this.expandToScroll,
|
|
20202
|
+
}));
|
|
19974
20203
|
const contentEl = findIonContent(el);
|
|
19975
20204
|
if (!contentEl) {
|
|
19976
20205
|
printIonContentErrorMsg(el);
|
|
@@ -20015,9 +20244,10 @@ class Modal {
|
|
|
20015
20244
|
presentingEl: this.presentingElement,
|
|
20016
20245
|
currentBreakpoint: initialBreakpoint,
|
|
20017
20246
|
backdropBreakpoint,
|
|
20247
|
+
expandToScroll: this.expandToScroll,
|
|
20018
20248
|
}));
|
|
20019
20249
|
ani.progressStart(true, 1);
|
|
20020
|
-
const { gesture, moveSheetToBreakpoint } = createSheetGesture(this.el, this.backdropEl, wrapperEl, initialBreakpoint, backdropBreakpoint, ani, this.sortedBreakpoints, () => { var _a; return (_a = this.currentBreakpoint) !== null && _a !== void 0 ? _a : 0; }, () => this.sheetOnDismiss(), (breakpoint) => {
|
|
20250
|
+
const { gesture, moveSheetToBreakpoint } = createSheetGesture(this.el, this.backdropEl, wrapperEl, initialBreakpoint, backdropBreakpoint, ani, this.sortedBreakpoints, this.expandToScroll, () => { var _a; return (_a = this.currentBreakpoint) !== null && _a !== void 0 ? _a : 0; }, () => this.sheetOnDismiss(), (breakpoint) => {
|
|
20021
20251
|
if (this.currentBreakpoint !== breakpoint) {
|
|
20022
20252
|
this.currentBreakpoint = breakpoint;
|
|
20023
20253
|
this.ionBreakpointDidChange.emit({ breakpoint });
|
|
@@ -20095,6 +20325,7 @@ class Modal {
|
|
|
20095
20325
|
presentingEl: presentingElement,
|
|
20096
20326
|
currentBreakpoint: (_a = this.currentBreakpoint) !== null && _a !== void 0 ? _a : this.initialBreakpoint,
|
|
20097
20327
|
backdropBreakpoint: this.backdropBreakpoint,
|
|
20328
|
+
expandToScroll: this.expandToScroll,
|
|
20098
20329
|
});
|
|
20099
20330
|
if (dismissed) {
|
|
20100
20331
|
const { delegate } = this.getDelegate();
|
|
@@ -20180,23 +20411,23 @@ class Modal {
|
|
|
20180
20411
|
return true;
|
|
20181
20412
|
}
|
|
20182
20413
|
render() {
|
|
20183
|
-
const { handle, isSheetModal, presentingElement, htmlAttributes, handleBehavior, inheritedAttributes, focusTrap } = this;
|
|
20414
|
+
const { handle, isSheetModal, presentingElement, htmlAttributes, handleBehavior, inheritedAttributes, focusTrap, expandToScroll, } = this;
|
|
20184
20415
|
const showHandle = handle !== false && isSheetModal;
|
|
20185
20416
|
const mode = getIonMode$1(this);
|
|
20186
20417
|
const isCardModal = presentingElement !== undefined && mode === 'ios';
|
|
20187
20418
|
const isHandleCycle = handleBehavior === 'cycle';
|
|
20188
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
20419
|
+
return (hAsync(Host, Object.assign({ key: 'ff15df63e72caaeb0a4ad68e9eedeaaa7d3f3bde', "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
|
|
20189
20420
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
20190
|
-
}, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, 'overlay-hidden': true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle }), hAsync("ion-backdrop", { key: '
|
|
20421
|
+
}, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, [`modal-no-expand-scroll`]: isSheetModal && !expandToScroll, 'overlay-hidden': true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle }), hAsync("ion-backdrop", { key: '27a73655779af9d175a829d3d2d29e42fd2a63ee', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && hAsync("div", { key: '406a65080087e7895026ecc2f04e9d707439e86f', class: "modal-shadow" }), hAsync("div", Object.assign({ key: '8e410eb925374158996c82cbbd522f07d741679e',
|
|
20191
20422
|
/*
|
|
20192
20423
|
role and aria-modal must be used on the
|
|
20193
20424
|
same element. They must also be set inside the
|
|
20194
20425
|
shadow DOM otherwise ion-button will not be highlighted
|
|
20195
20426
|
when using VoiceOver: https://bugs.webkit.org/show_bug.cgi?id=247134
|
|
20196
20427
|
*/
|
|
20197
|
-
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (hAsync("button", { key: '
|
|
20428
|
+
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (hAsync("button", { key: '7326c969ebe5a70a35e83b09d3db2bb848c90e47', class: "modal-handle",
|
|
20198
20429
|
// Prevents the handle from receiving keyboard focus when it does not cycle
|
|
20199
|
-
tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle" })), hAsync("slot", { key: '
|
|
20430
|
+
tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle" })), hAsync("slot", { key: '0b65cdb9e337a27edf437b9e754e79f1449c217d' }))));
|
|
20200
20431
|
}
|
|
20201
20432
|
get el() { return getElement(this); }
|
|
20202
20433
|
static get watchers() { return {
|
|
@@ -20218,6 +20449,7 @@ class Modal {
|
|
|
20218
20449
|
"enterAnimation": [16],
|
|
20219
20450
|
"leaveAnimation": [16],
|
|
20220
20451
|
"breakpoints": [16],
|
|
20452
|
+
"expandToScroll": [4, "expand-to-scroll"],
|
|
20221
20453
|
"initialBreakpoint": [2, "initial-breakpoint"],
|
|
20222
20454
|
"backdropBreakpoint": [2, "backdrop-breakpoint"],
|
|
20223
20455
|
"handle": [4],
|
|
@@ -27090,12 +27322,10 @@ class RippleEffect {
|
|
|
27090
27322
|
}; }
|
|
27091
27323
|
}
|
|
27092
27324
|
const removeRipple = (ripple) => {
|
|
27093
|
-
if (!ripple.parentNode)
|
|
27094
|
-
return;
|
|
27095
27325
|
ripple.classList.add('fade-out');
|
|
27096
|
-
|
|
27326
|
+
setTimeout(() => {
|
|
27097
27327
|
ripple.remove();
|
|
27098
|
-
},
|
|
27328
|
+
}, 200);
|
|
27099
27329
|
};
|
|
27100
27330
|
const PADDING = 10;
|
|
27101
27331
|
const INITIAL_ORIGIN_SCALE = 0.5;
|
|
@@ -29663,6 +29893,7 @@ class Select {
|
|
|
29663
29893
|
this.expandedIcon = undefined;
|
|
29664
29894
|
this.shape = undefined;
|
|
29665
29895
|
this.value = undefined;
|
|
29896
|
+
this.required = false;
|
|
29666
29897
|
}
|
|
29667
29898
|
styleChanged() {
|
|
29668
29899
|
this.emitStyle();
|
|
@@ -30147,8 +30378,8 @@ class Select {
|
|
|
30147
30378
|
return renderedLabel;
|
|
30148
30379
|
}
|
|
30149
30380
|
renderListbox() {
|
|
30150
|
-
const { disabled, inputId, isExpanded } = this;
|
|
30151
|
-
return (hAsync("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) }));
|
|
30381
|
+
const { disabled, inputId, isExpanded, required } = this;
|
|
30382
|
+
return (hAsync("button", { disabled: disabled, id: inputId, "aria-label": this.ariaLabel, "aria-haspopup": "dialog", "aria-expanded": `${isExpanded}`, "aria-required": `${required}`, onFocus: this.onFocus, onBlur: this.onBlur, ref: (focusEl) => (this.focusEl = focusEl) }));
|
|
30152
30383
|
}
|
|
30153
30384
|
render() {
|
|
30154
30385
|
const { disabled, el, isExpanded, expandedIcon, labelPlacement, justify, placeholder, fill, shape, name, value } = this;
|
|
@@ -30179,7 +30410,7 @@ class Select {
|
|
|
30179
30410
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
30180
30411
|
*/
|
|
30181
30412
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || isExpanded || hasStartEndSlots));
|
|
30182
|
-
return (hAsync(Host, { key: '
|
|
30413
|
+
return (hAsync(Host, { key: '491cf1b0e3aa31e7c9cfad3e87d83eb54272312a', onClick: this.onClick, class: createColorClasses$1(this.color, {
|
|
30183
30414
|
[mode]: true,
|
|
30184
30415
|
'in-item': inItem,
|
|
30185
30416
|
'in-item-color': hostContext('ion-item.ion-color', el),
|
|
@@ -30195,7 +30426,7 @@ class Select {
|
|
|
30195
30426
|
[`select-justify-${justify}`]: justifyEnabled,
|
|
30196
30427
|
[`select-shape-${shape}`]: shape !== undefined,
|
|
30197
30428
|
[`select-label-placement-${labelPlacement}`]: true,
|
|
30198
|
-
}) }, hAsync("label", { key: '
|
|
30429
|
+
}) }, hAsync("label", { key: '07bf3cb57bd1121383d8c746e3ac49da38300082', class: "select-wrapper", id: "select-label" }, this.renderLabelContainer(), hAsync("div", { key: '884facd18342797576bbacc761d18d83c52762e3', class: "select-wrapper-inner" }, hAsync("slot", { key: 'c4f2a2a7a76f52db15f9a0b806017caea443c47a', name: "start" }), hAsync("div", { key: '235cf383f268cc74412722cd31e246cbd4c2abe5', class: "native-wrapper", ref: (el) => (this.nativeWrapperEl = el), part: "container" }, this.renderSelectText(), this.renderListbox()), hAsync("slot", { key: '1481302e11c494d49dfd80a7aaf743f7e851558f', name: "end" }), !hasFloatingOrStackedLabel && this.renderSelectIcon()), hasFloatingOrStackedLabel && this.renderSelectIcon(), shouldRenderHighlight && hAsync("div", { key: '8a45ea9280651695c8e5435f266c286f3e3f6a18', class: "select-highlight" }))));
|
|
30199
30430
|
}
|
|
30200
30431
|
get el() { return getElement(this); }
|
|
30201
30432
|
static get watchers() { return {
|
|
@@ -30231,6 +30462,7 @@ class Select {
|
|
|
30231
30462
|
"expandedIcon": [1, "expanded-icon"],
|
|
30232
30463
|
"shape": [1],
|
|
30233
30464
|
"value": [1032],
|
|
30465
|
+
"required": [4],
|
|
30234
30466
|
"isExpanded": [32],
|
|
30235
30467
|
"open": [64]
|
|
30236
30468
|
},
|
|
@@ -30770,6 +31002,10 @@ class Tab {
|
|
|
30770
31002
|
}
|
|
30771
31003
|
changeActive(isActive) {
|
|
30772
31004
|
if (isActive) {
|
|
31005
|
+
// ensure tabindex gets updated before setting focus to the element
|
|
31006
|
+
setTimeout(() => {
|
|
31007
|
+
this.el.focus();
|
|
31008
|
+
}, 50);
|
|
30773
31009
|
this.prepareLazyLoaded();
|
|
30774
31010
|
}
|
|
30775
31011
|
}
|
|
@@ -30787,10 +31023,10 @@ class Tab {
|
|
|
30787
31023
|
}
|
|
30788
31024
|
render() {
|
|
30789
31025
|
const { tab, active, component } = this;
|
|
30790
|
-
return (hAsync(Host, { key: '
|
|
31026
|
+
return (hAsync(Host, { key: '30783785d1c744b8a186f0bda7cd21af2742c575', role: "tabpanel", "aria-hidden": !active ? 'true' : null, "aria-labelledby": `tab-button-${tab}`, class: {
|
|
30791
31027
|
'ion-page': component === undefined,
|
|
30792
31028
|
'tab-hidden': !active,
|
|
30793
|
-
} }, hAsync("slot", { key: '
|
|
31029
|
+
}, tabIndex: !active ? '-1' : '0' }, hAsync("slot", { key: '4fde7aa68c3149eae4bc3a5045303f31bf818b0b' })));
|
|
30794
31030
|
}
|
|
30795
31031
|
get el() { return getElement(this); }
|
|
30796
31032
|
static get watchers() { return {
|
|
@@ -30982,7 +31218,7 @@ class TabButton {
|
|
|
30982
31218
|
'ion-activatable': true,
|
|
30983
31219
|
'ion-selectable': true,
|
|
30984
31220
|
'ion-focusable': true,
|
|
30985
|
-
} }, hAsync("a", Object.assign({ key: '
|
|
31221
|
+
} }, hAsync("a", Object.assign({ key: '2f32e70232c7872b14e9ead1d1c31c98ad3577b4' }, attrs, { class: "button-native", part: "native", role: "tab", "aria-selected": selected ? 'true' : null, "aria-disabled": disabled ? 'true' : null, tabindex: disabled ? '-1' : '0' }, inheritedAttributes), hAsync("span", { key: '5c9467b16e36a526a20f460980ec45022f464c3a', class: "button-inner" }, hAsync("slot", { key: 'eefd60fac84ff01366a0f82f6ad71782ee7351e9' })), mode === 'md' && hAsync("ion-ripple-effect", { key: '0d3452ae46e47f2d50c0198668c42e00e1a4d7bf', type: "unbounded" }))));
|
|
30986
31222
|
}
|
|
30987
31223
|
get el() { return getElement(this); }
|
|
30988
31224
|
static get style() { return {
|
|
@@ -32627,6 +32863,7 @@ class Toggle {
|
|
|
32627
32863
|
this.labelPlacement = 'start';
|
|
32628
32864
|
this.justify = undefined;
|
|
32629
32865
|
this.alignment = undefined;
|
|
32866
|
+
this.required = false;
|
|
32630
32867
|
}
|
|
32631
32868
|
disabledChanged() {
|
|
32632
32869
|
if (this.gesture) {
|
|
@@ -32708,12 +32945,12 @@ class Toggle {
|
|
|
32708
32945
|
return this.el.textContent !== '';
|
|
32709
32946
|
}
|
|
32710
32947
|
render() {
|
|
32711
|
-
const { activated, color, checked, disabled, el, justify, labelPlacement, inputId, name, alignment } = this;
|
|
32948
|
+
const { activated, color, checked, disabled, el, justify, labelPlacement, inputId, name, alignment, required } = this;
|
|
32712
32949
|
const mode = getIonMode$1(this);
|
|
32713
32950
|
const value = this.getValue();
|
|
32714
32951
|
const rtl = isRTL$1(el) ? 'rtl' : 'ltr';
|
|
32715
32952
|
renderHiddenInput(true, el, name, checked ? value : '', disabled);
|
|
32716
|
-
return (hAsync(Host, { key: '
|
|
32953
|
+
return (hAsync(Host, { key: 'ed75573caa6e37011f1453dd7f723fb9bd8a3656', onClick: this.onClick, class: createColorClasses$1(color, {
|
|
32717
32954
|
[mode]: true,
|
|
32718
32955
|
'in-item': hostContext('ion-item', el),
|
|
32719
32956
|
'toggle-activated': activated,
|
|
@@ -32723,10 +32960,10 @@ class Toggle {
|
|
|
32723
32960
|
[`toggle-alignment-${alignment}`]: alignment !== undefined,
|
|
32724
32961
|
[`toggle-label-placement-${labelPlacement}`]: true,
|
|
32725
32962
|
[`toggle-${rtl}`]: true,
|
|
32726
|
-
}) }, hAsync("label", { key: '
|
|
32963
|
+
}) }, hAsync("label", { key: '484860e2a33f4d123904edb96159f0e1972d3add', class: "toggle-wrapper" }, hAsync("input", Object.assign({ key: '360b53080aacfd99a9ff60ffb5219816bd4163ee', type: "checkbox", role: "switch", "aria-checked": `${checked}`, checked: checked, disabled: disabled, id: inputId, onFocus: () => this.onFocus(), onBlur: () => this.onBlur(), ref: (focusEl) => (this.focusEl = focusEl), required: required }, this.inheritedAttributes)), hAsync("div", { key: 'f7239fa668fe11257239ea30cf0198e4f3274f6b', class: {
|
|
32727
32964
|
'label-text-wrapper': true,
|
|
32728
32965
|
'label-text-wrapper-hidden': !this.hasLabel,
|
|
32729
|
-
}, part: "label" }, hAsync("slot", { key: '
|
|
32966
|
+
}, part: "label" }, hAsync("slot", { key: '9495a4a39889822ee68e0d89dc5a2f863d1feb3c' })), hAsync("div", { key: '55f1eb08c4b705e94fbcf02220bbe1d292f06155', class: "native-wrapper" }, this.renderToggleControl()))));
|
|
32730
32967
|
}
|
|
32731
32968
|
get el() { return getElement(this); }
|
|
32732
32969
|
static get watchers() { return {
|
|
@@ -32749,6 +32986,7 @@ class Toggle {
|
|
|
32749
32986
|
"labelPlacement": [1, "label-placement"],
|
|
32750
32987
|
"justify": [1],
|
|
32751
32988
|
"alignment": [1],
|
|
32989
|
+
"required": [4],
|
|
32752
32990
|
"activated": [32]
|
|
32753
32991
|
},
|
|
32754
32992
|
"$listeners$": undefined,
|
|
@@ -32780,6 +33018,10 @@ var IonToolbarMdStyle0 = toolbarMdCss;
|
|
|
32780
33018
|
* @slot secondary - Content is placed to the left of the toolbar text in `ios` mode, and directly to the right in `md` mode.
|
|
32781
33019
|
* @slot primary - Content is placed to the right of the toolbar text in `ios` mode, and to the far right in `md` mode.
|
|
32782
33020
|
* @slot end - Content is placed to the right of the toolbar text in LTR, and to the left in RTL.
|
|
33021
|
+
*
|
|
33022
|
+
* @part background - The background of the toolbar, covering the entire area behind the toolbar content.
|
|
33023
|
+
* @part container - The container that wraps all toolbar content, including the default slot and named slot content.
|
|
33024
|
+
* @part content - The container for the default slot, wrapping content provided without a named slot.
|
|
32783
33025
|
*/
|
|
32784
33026
|
class Toolbar {
|
|
32785
33027
|
constructor(hostRef) {
|
|
@@ -32830,10 +33072,10 @@ class Toolbar {
|
|
|
32830
33072
|
this.childrenStyles.forEach((value) => {
|
|
32831
33073
|
Object.assign(childStyles, value);
|
|
32832
33074
|
});
|
|
32833
|
-
return (hAsync(Host, { key: '
|
|
33075
|
+
return (hAsync(Host, { key: '4fdc9ae82a93237cc28ceb95b0ebd8069b62839d', class: Object.assign(Object.assign({}, childStyles), createColorClasses$1(this.color, {
|
|
32834
33076
|
[mode]: true,
|
|
32835
33077
|
'in-toolbar': hostContext('ion-toolbar', this.el),
|
|
32836
|
-
})) }, hAsync("div", { key: '
|
|
33078
|
+
})) }, hAsync("div", { key: '443a216362bbbf1c149ed12140d52b0f0ea2d664', class: "toolbar-background", part: "background" }), hAsync("div", { key: '1df87f4027d605e42757a13d4828df45b90a4fdc', class: "toolbar-container", part: "container" }, hAsync("slot", { key: 'f66f34972be8e3f4915b9c6f5808600dbaedb1ea', name: "start" }), hAsync("slot", { key: '14f38b0975e956f404c4eb3ee56f2055c6615276', name: "secondary" }), hAsync("div", { key: '75ba5953a25c7544793484d2b245792cb0a5af75', class: "toolbar-content", part: "content" }, hAsync("slot", { key: '149dfa58ff7106f318fecb4134e7c69edf8bc231' })), hAsync("slot", { key: '807ab9ad21d7f1d9d427a4086460bcb9e5e8c019', name: "primary" }), hAsync("slot", { key: 'bd2f9da95d2fa8e74dc6e0666587ceecbba99d9f', name: "end" }))));
|
|
32837
33079
|
}
|
|
32838
33080
|
get el() { return getElement(this); }
|
|
32839
33081
|
static get style() { return {
|