@ionic/core 8.4.3 → 8.4.4-dev.11738234035.16d5592e
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-toggle.js +6 -4
- package/components/radio-group.js +4 -2
- package/components/toolbar.js +2 -2
- 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 +4 -4
- 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-radio_2.cjs.entry.js +3 -2
- 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 +7 -6
- 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/radio-group/radio-group.js +21 -2
- package/dist/collection/components/select/select.js +23 -4
- 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 +4 -4
- package/dist/esm/ion-nav_2.entry.js +2 -2
- package/dist/esm/ion-popover.entry.js +3 -3
- package/dist/esm/ion-radio_2.entry.js +3 -2
- 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 +7 -6
- 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-radio_2.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-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-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-c9f3a539.entry.js → p-120fb79a.entry.js} +1 -1
- 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-e6635685.js → p-28706c6f.js} +1 -1
- package/dist/ionic/{p-7ddc46c3.system.entry.js → p-29a5d6ed.system.entry.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-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-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-6d6cedc5.entry.js → p-bb5d8e9e.entry.js} +1 -1
- package/dist/ionic/{p-e85d901b.system.entry.js → p-bc64bd27.system.entry.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-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-8b8be2fd.entry.js → p-f55baa37.entry.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/radio-group/radio-group.d.ts +4 -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 +37 -19
- package/hydrate/index.mjs +37 -19
- 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-2690b1de.js +0 -4
- package/dist/ionic/p-2b9b78c7.entry.js +0 -4
- package/dist/ionic/p-5ab1b709.entry.js +0 -4
- package/dist/ionic/p-908d6080.entry.js +0 -4
- package/dist/ionic/p-dfb78785.system.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,
|
|
@@ -24788,6 +24796,7 @@ class RadioGroup {
|
|
|
24788
24796
|
this.allowEmptySelection = false;
|
|
24789
24797
|
this.compareWith = undefined;
|
|
24790
24798
|
this.name = this.inputId;
|
|
24799
|
+
this.required = false;
|
|
24791
24800
|
this.value = undefined;
|
|
24792
24801
|
}
|
|
24793
24802
|
valueChanged(value) {
|
|
@@ -24888,10 +24897,10 @@ class RadioGroup {
|
|
|
24888
24897
|
radioToFocus === null || radioToFocus === void 0 ? void 0 : radioToFocus.setFocus();
|
|
24889
24898
|
}
|
|
24890
24899
|
render() {
|
|
24891
|
-
const { label, labelId, el, name, value } = this;
|
|
24900
|
+
const { label, labelId, el, name, value, required } = this;
|
|
24892
24901
|
const mode = getIonMode$1(this);
|
|
24893
24902
|
renderHiddenInput(true, el, name, value, false);
|
|
24894
|
-
return hAsync(Host, { key: '
|
|
24903
|
+
return hAsync(Host, { key: '1b86c9ba343929ffd5579dd5d1c18ca616b2e9aa', role: "radiogroup", "aria-labelledby": label ? labelId : null, onClick: this.onClick, class: mode, "aria-required": `${required}` });
|
|
24895
24904
|
}
|
|
24896
24905
|
get el() { return getElement(this); }
|
|
24897
24906
|
static get watchers() { return {
|
|
@@ -24904,6 +24913,7 @@ class RadioGroup {
|
|
|
24904
24913
|
"allowEmptySelection": [4, "allow-empty-selection"],
|
|
24905
24914
|
"compareWith": [1, "compare-with"],
|
|
24906
24915
|
"name": [1],
|
|
24916
|
+
"required": [4],
|
|
24907
24917
|
"value": [1032],
|
|
24908
24918
|
"setFocus": [64]
|
|
24909
24919
|
},
|
|
@@ -29661,6 +29671,7 @@ class Select {
|
|
|
29661
29671
|
this.expandedIcon = undefined;
|
|
29662
29672
|
this.shape = undefined;
|
|
29663
29673
|
this.value = undefined;
|
|
29674
|
+
this.required = false;
|
|
29664
29675
|
}
|
|
29665
29676
|
styleChanged() {
|
|
29666
29677
|
this.emitStyle();
|
|
@@ -30145,8 +30156,8 @@ class Select {
|
|
|
30145
30156
|
return renderedLabel;
|
|
30146
30157
|
}
|
|
30147
30158
|
renderListbox() {
|
|
30148
|
-
const { disabled, inputId, isExpanded } = this;
|
|
30149
|
-
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) }));
|
|
30159
|
+
const { disabled, inputId, isExpanded, required } = this;
|
|
30160
|
+
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) }));
|
|
30150
30161
|
}
|
|
30151
30162
|
render() {
|
|
30152
30163
|
const { disabled, el, isExpanded, expandedIcon, labelPlacement, justify, placeholder, fill, shape, name, value } = this;
|
|
@@ -30177,7 +30188,7 @@ class Select {
|
|
|
30177
30188
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
30178
30189
|
*/
|
|
30179
30190
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || isExpanded || hasStartEndSlots));
|
|
30180
|
-
return (hAsync(Host, { key: '
|
|
30191
|
+
return (hAsync(Host, { key: '491cf1b0e3aa31e7c9cfad3e87d83eb54272312a', onClick: this.onClick, class: createColorClasses$1(this.color, {
|
|
30181
30192
|
[mode]: true,
|
|
30182
30193
|
'in-item': inItem,
|
|
30183
30194
|
'in-item-color': hostContext('ion-item.ion-color', el),
|
|
@@ -30193,7 +30204,7 @@ class Select {
|
|
|
30193
30204
|
[`select-justify-${justify}`]: justifyEnabled,
|
|
30194
30205
|
[`select-shape-${shape}`]: shape !== undefined,
|
|
30195
30206
|
[`select-label-placement-${labelPlacement}`]: true,
|
|
30196
|
-
}) }, hAsync("label", { key: '
|
|
30207
|
+
}) }, 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" }))));
|
|
30197
30208
|
}
|
|
30198
30209
|
get el() { return getElement(this); }
|
|
30199
30210
|
static get watchers() { return {
|
|
@@ -30229,6 +30240,7 @@ class Select {
|
|
|
30229
30240
|
"expandedIcon": [1, "expanded-icon"],
|
|
30230
30241
|
"shape": [1],
|
|
30231
30242
|
"value": [1032],
|
|
30243
|
+
"required": [4],
|
|
30232
30244
|
"isExpanded": [32],
|
|
30233
30245
|
"open": [64]
|
|
30234
30246
|
},
|
|
@@ -32625,6 +32637,7 @@ class Toggle {
|
|
|
32625
32637
|
this.labelPlacement = 'start';
|
|
32626
32638
|
this.justify = undefined;
|
|
32627
32639
|
this.alignment = undefined;
|
|
32640
|
+
this.required = false;
|
|
32628
32641
|
}
|
|
32629
32642
|
disabledChanged() {
|
|
32630
32643
|
if (this.gesture) {
|
|
@@ -32706,12 +32719,12 @@ class Toggle {
|
|
|
32706
32719
|
return this.el.textContent !== '';
|
|
32707
32720
|
}
|
|
32708
32721
|
render() {
|
|
32709
|
-
const { activated, color, checked, disabled, el, justify, labelPlacement, inputId, name, alignment } = this;
|
|
32722
|
+
const { activated, color, checked, disabled, el, justify, labelPlacement, inputId, name, alignment, required } = this;
|
|
32710
32723
|
const mode = getIonMode$1(this);
|
|
32711
32724
|
const value = this.getValue();
|
|
32712
32725
|
const rtl = isRTL$1(el) ? 'rtl' : 'ltr';
|
|
32713
32726
|
renderHiddenInput(true, el, name, checked ? value : '', disabled);
|
|
32714
|
-
return (hAsync(Host, { key: '
|
|
32727
|
+
return (hAsync(Host, { key: 'ed75573caa6e37011f1453dd7f723fb9bd8a3656', onClick: this.onClick, class: createColorClasses$1(color, {
|
|
32715
32728
|
[mode]: true,
|
|
32716
32729
|
'in-item': hostContext('ion-item', el),
|
|
32717
32730
|
'toggle-activated': activated,
|
|
@@ -32721,10 +32734,10 @@ class Toggle {
|
|
|
32721
32734
|
[`toggle-alignment-${alignment}`]: alignment !== undefined,
|
|
32722
32735
|
[`toggle-label-placement-${labelPlacement}`]: true,
|
|
32723
32736
|
[`toggle-${rtl}`]: true,
|
|
32724
|
-
}) }, hAsync("label", { key: '
|
|
32737
|
+
}) }, 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: {
|
|
32725
32738
|
'label-text-wrapper': true,
|
|
32726
32739
|
'label-text-wrapper-hidden': !this.hasLabel,
|
|
32727
|
-
}, part: "label" }, hAsync("slot", { key: '
|
|
32740
|
+
}, part: "label" }, hAsync("slot", { key: '9495a4a39889822ee68e0d89dc5a2f863d1feb3c' })), hAsync("div", { key: '55f1eb08c4b705e94fbcf02220bbe1d292f06155', class: "native-wrapper" }, this.renderToggleControl()))));
|
|
32728
32741
|
}
|
|
32729
32742
|
get el() { return getElement(this); }
|
|
32730
32743
|
static get watchers() { return {
|
|
@@ -32747,6 +32760,7 @@ class Toggle {
|
|
|
32747
32760
|
"labelPlacement": [1, "label-placement"],
|
|
32748
32761
|
"justify": [1],
|
|
32749
32762
|
"alignment": [1],
|
|
32763
|
+
"required": [4],
|
|
32750
32764
|
"activated": [32]
|
|
32751
32765
|
},
|
|
32752
32766
|
"$listeners$": undefined,
|
|
@@ -32778,6 +32792,10 @@ var IonToolbarMdStyle0 = toolbarMdCss;
|
|
|
32778
32792
|
* @slot secondary - Content is placed to the left of the toolbar text in `ios` mode, and directly to the right in `md` mode.
|
|
32779
32793
|
* @slot primary - Content is placed to the right of the toolbar text in `ios` mode, and to the far right in `md` mode.
|
|
32780
32794
|
* @slot end - Content is placed to the right of the toolbar text in LTR, and to the left in RTL.
|
|
32795
|
+
*
|
|
32796
|
+
* @part background - The background of the toolbar, covering the entire area behind the toolbar content.
|
|
32797
|
+
* @part container - The container that wraps all toolbar content, including the default slot and named slot content.
|
|
32798
|
+
* @part content - The container for the default slot, wrapping content provided without a named slot.
|
|
32781
32799
|
*/
|
|
32782
32800
|
class Toolbar {
|
|
32783
32801
|
constructor(hostRef) {
|
|
@@ -32828,10 +32846,10 @@ class Toolbar {
|
|
|
32828
32846
|
this.childrenStyles.forEach((value) => {
|
|
32829
32847
|
Object.assign(childStyles, value);
|
|
32830
32848
|
});
|
|
32831
|
-
return (hAsync(Host, { key: '
|
|
32849
|
+
return (hAsync(Host, { key: '4fdc9ae82a93237cc28ceb95b0ebd8069b62839d', class: Object.assign(Object.assign({}, childStyles), createColorClasses$1(this.color, {
|
|
32832
32850
|
[mode]: true,
|
|
32833
32851
|
'in-toolbar': hostContext('ion-toolbar', this.el),
|
|
32834
|
-
})) }, hAsync("div", { key: '
|
|
32852
|
+
})) }, 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" }))));
|
|
32835
32853
|
}
|
|
32836
32854
|
get el() { return getElement(this); }
|
|
32837
32855
|
static get style() { return {
|
package/hydrate/index.mjs
CHANGED
|
@@ -3213,9 +3213,12 @@ let accordionIds = 0;
|
|
|
3213
3213
|
* @param message - The string message to be logged to the console.
|
|
3214
3214
|
*/
|
|
3215
3215
|
const printIonWarning = (message, ...params) => {
|
|
3216
|
-
|
|
3216
|
+
const logLevel = config.get('logLevel', "WARN" /* LogLevel.WARN */);
|
|
3217
|
+
if (["WARN" /* LogLevel.WARN */].includes(logLevel)) {
|
|
3218
|
+
return console.warn(`[Ionic Warning]: ${message}`, ...params);
|
|
3219
|
+
}
|
|
3217
3220
|
};
|
|
3218
|
-
|
|
3221
|
+
/**
|
|
3219
3222
|
* Logs an error to the console with an Ionic prefix
|
|
3220
3223
|
* to indicate the library that is warning the developer.
|
|
3221
3224
|
*
|
|
@@ -3223,7 +3226,10 @@ const printIonWarning = (message, ...params) => {
|
|
|
3223
3226
|
* @param params - Additional arguments to supply to the console.error.
|
|
3224
3227
|
*/
|
|
3225
3228
|
const printIonError = (message, ...params) => {
|
|
3226
|
-
|
|
3229
|
+
const logLevel = config.get('logLevel', "ERROR" /* LogLevel.ERROR */);
|
|
3230
|
+
if (["ERROR" /* LogLevel.ERROR */, "WARN" /* LogLevel.WARN */].includes(logLevel)) {
|
|
3231
|
+
return console.error(`[Ionic Error]: ${message}`, ...params);
|
|
3232
|
+
}
|
|
3227
3233
|
};
|
|
3228
3234
|
/**
|
|
3229
3235
|
* Prints an error informing developers that an implementation requires an element to be used
|
|
@@ -8487,6 +8493,7 @@ class Checkbox {
|
|
|
8487
8493
|
this.labelPlacement = 'start';
|
|
8488
8494
|
this.justify = undefined;
|
|
8489
8495
|
this.alignment = undefined;
|
|
8496
|
+
this.required = false;
|
|
8490
8497
|
}
|
|
8491
8498
|
componentWillLoad() {
|
|
8492
8499
|
this.inheritedAttributes = Object.assign({}, inheritAriaAttributes(this.el));
|
|
@@ -8498,11 +8505,11 @@ class Checkbox {
|
|
|
8498
8505
|
}
|
|
8499
8506
|
}
|
|
8500
8507
|
render() {
|
|
8501
|
-
const { color, checked, disabled, el, getSVGPath, indeterminate, inheritedAttributes, inputId, justify, labelPlacement, name, value, alignment, } = this;
|
|
8508
|
+
const { color, checked, disabled, el, getSVGPath, indeterminate, inheritedAttributes, inputId, justify, labelPlacement, name, value, alignment, required, } = this;
|
|
8502
8509
|
const mode = getIonMode$1(this);
|
|
8503
8510
|
const path = getSVGPath(mode, indeterminate);
|
|
8504
8511
|
renderHiddenInput(true, el, name, checked ? value : '', disabled);
|
|
8505
|
-
return (hAsync(Host, { key: '
|
|
8512
|
+
return (hAsync(Host, { key: '07a5884062dd256b570e856270c74a5a09d2f2a5', "aria-checked": indeterminate ? 'mixed' : `${checked}`, class: createColorClasses$1(color, {
|
|
8506
8513
|
[mode]: true,
|
|
8507
8514
|
'in-item': hostContext('ion-item', el),
|
|
8508
8515
|
'checkbox-checked': checked,
|
|
@@ -8512,10 +8519,10 @@ class Checkbox {
|
|
|
8512
8519
|
[`checkbox-justify-${justify}`]: justify !== undefined,
|
|
8513
8520
|
[`checkbox-alignment-${alignment}`]: alignment !== undefined,
|
|
8514
8521
|
[`checkbox-label-placement-${labelPlacement}`]: true,
|
|
8515
|
-
}), onClick: this.onClick }, hAsync("label", { key: '
|
|
8522
|
+
}), 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: {
|
|
8516
8523
|
'label-text-wrapper': true,
|
|
8517
8524
|
'label-text-wrapper-hidden': el.textContent === '',
|
|
8518
|
-
}, part: "label" }, hAsync("slot", { key: '
|
|
8525
|
+
}, 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)))));
|
|
8519
8526
|
}
|
|
8520
8527
|
getSVGPath(mode, indeterminate) {
|
|
8521
8528
|
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" }));
|
|
@@ -8542,6 +8549,7 @@ class Checkbox {
|
|
|
8542
8549
|
"labelPlacement": [1, "label-placement"],
|
|
8543
8550
|
"justify": [1],
|
|
8544
8551
|
"alignment": [1],
|
|
8552
|
+
"required": [4],
|
|
8545
8553
|
"setFocus": [64]
|
|
8546
8554
|
},
|
|
8547
8555
|
"$listeners$": undefined,
|
|
@@ -24784,6 +24792,7 @@ class RadioGroup {
|
|
|
24784
24792
|
this.allowEmptySelection = false;
|
|
24785
24793
|
this.compareWith = undefined;
|
|
24786
24794
|
this.name = this.inputId;
|
|
24795
|
+
this.required = false;
|
|
24787
24796
|
this.value = undefined;
|
|
24788
24797
|
}
|
|
24789
24798
|
valueChanged(value) {
|
|
@@ -24884,10 +24893,10 @@ class RadioGroup {
|
|
|
24884
24893
|
radioToFocus === null || radioToFocus === void 0 ? void 0 : radioToFocus.setFocus();
|
|
24885
24894
|
}
|
|
24886
24895
|
render() {
|
|
24887
|
-
const { label, labelId, el, name, value } = this;
|
|
24896
|
+
const { label, labelId, el, name, value, required } = this;
|
|
24888
24897
|
const mode = getIonMode$1(this);
|
|
24889
24898
|
renderHiddenInput(true, el, name, value, false);
|
|
24890
|
-
return hAsync(Host, { key: '
|
|
24899
|
+
return hAsync(Host, { key: '1b86c9ba343929ffd5579dd5d1c18ca616b2e9aa', role: "radiogroup", "aria-labelledby": label ? labelId : null, onClick: this.onClick, class: mode, "aria-required": `${required}` });
|
|
24891
24900
|
}
|
|
24892
24901
|
get el() { return getElement(this); }
|
|
24893
24902
|
static get watchers() { return {
|
|
@@ -24900,6 +24909,7 @@ class RadioGroup {
|
|
|
24900
24909
|
"allowEmptySelection": [4, "allow-empty-selection"],
|
|
24901
24910
|
"compareWith": [1, "compare-with"],
|
|
24902
24911
|
"name": [1],
|
|
24912
|
+
"required": [4],
|
|
24903
24913
|
"value": [1032],
|
|
24904
24914
|
"setFocus": [64]
|
|
24905
24915
|
},
|
|
@@ -29657,6 +29667,7 @@ class Select {
|
|
|
29657
29667
|
this.expandedIcon = undefined;
|
|
29658
29668
|
this.shape = undefined;
|
|
29659
29669
|
this.value = undefined;
|
|
29670
|
+
this.required = false;
|
|
29660
29671
|
}
|
|
29661
29672
|
styleChanged() {
|
|
29662
29673
|
this.emitStyle();
|
|
@@ -30141,8 +30152,8 @@ class Select {
|
|
|
30141
30152
|
return renderedLabel;
|
|
30142
30153
|
}
|
|
30143
30154
|
renderListbox() {
|
|
30144
|
-
const { disabled, inputId, isExpanded } = this;
|
|
30145
|
-
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) }));
|
|
30155
|
+
const { disabled, inputId, isExpanded, required } = this;
|
|
30156
|
+
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) }));
|
|
30146
30157
|
}
|
|
30147
30158
|
render() {
|
|
30148
30159
|
const { disabled, el, isExpanded, expandedIcon, labelPlacement, justify, placeholder, fill, shape, name, value } = this;
|
|
@@ -30173,7 +30184,7 @@ class Select {
|
|
|
30173
30184
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
30174
30185
|
*/
|
|
30175
30186
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || isExpanded || hasStartEndSlots));
|
|
30176
|
-
return (hAsync(Host, { key: '
|
|
30187
|
+
return (hAsync(Host, { key: '491cf1b0e3aa31e7c9cfad3e87d83eb54272312a', onClick: this.onClick, class: createColorClasses$1(this.color, {
|
|
30177
30188
|
[mode]: true,
|
|
30178
30189
|
'in-item': inItem,
|
|
30179
30190
|
'in-item-color': hostContext('ion-item.ion-color', el),
|
|
@@ -30189,7 +30200,7 @@ class Select {
|
|
|
30189
30200
|
[`select-justify-${justify}`]: justifyEnabled,
|
|
30190
30201
|
[`select-shape-${shape}`]: shape !== undefined,
|
|
30191
30202
|
[`select-label-placement-${labelPlacement}`]: true,
|
|
30192
|
-
}) }, hAsync("label", { key: '
|
|
30203
|
+
}) }, 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" }))));
|
|
30193
30204
|
}
|
|
30194
30205
|
get el() { return getElement(this); }
|
|
30195
30206
|
static get watchers() { return {
|
|
@@ -30225,6 +30236,7 @@ class Select {
|
|
|
30225
30236
|
"expandedIcon": [1, "expanded-icon"],
|
|
30226
30237
|
"shape": [1],
|
|
30227
30238
|
"value": [1032],
|
|
30239
|
+
"required": [4],
|
|
30228
30240
|
"isExpanded": [32],
|
|
30229
30241
|
"open": [64]
|
|
30230
30242
|
},
|
|
@@ -32621,6 +32633,7 @@ class Toggle {
|
|
|
32621
32633
|
this.labelPlacement = 'start';
|
|
32622
32634
|
this.justify = undefined;
|
|
32623
32635
|
this.alignment = undefined;
|
|
32636
|
+
this.required = false;
|
|
32624
32637
|
}
|
|
32625
32638
|
disabledChanged() {
|
|
32626
32639
|
if (this.gesture) {
|
|
@@ -32702,12 +32715,12 @@ class Toggle {
|
|
|
32702
32715
|
return this.el.textContent !== '';
|
|
32703
32716
|
}
|
|
32704
32717
|
render() {
|
|
32705
|
-
const { activated, color, checked, disabled, el, justify, labelPlacement, inputId, name, alignment } = this;
|
|
32718
|
+
const { activated, color, checked, disabled, el, justify, labelPlacement, inputId, name, alignment, required } = this;
|
|
32706
32719
|
const mode = getIonMode$1(this);
|
|
32707
32720
|
const value = this.getValue();
|
|
32708
32721
|
const rtl = isRTL$1(el) ? 'rtl' : 'ltr';
|
|
32709
32722
|
renderHiddenInput(true, el, name, checked ? value : '', disabled);
|
|
32710
|
-
return (hAsync(Host, { key: '
|
|
32723
|
+
return (hAsync(Host, { key: 'ed75573caa6e37011f1453dd7f723fb9bd8a3656', onClick: this.onClick, class: createColorClasses$1(color, {
|
|
32711
32724
|
[mode]: true,
|
|
32712
32725
|
'in-item': hostContext('ion-item', el),
|
|
32713
32726
|
'toggle-activated': activated,
|
|
@@ -32717,10 +32730,10 @@ class Toggle {
|
|
|
32717
32730
|
[`toggle-alignment-${alignment}`]: alignment !== undefined,
|
|
32718
32731
|
[`toggle-label-placement-${labelPlacement}`]: true,
|
|
32719
32732
|
[`toggle-${rtl}`]: true,
|
|
32720
|
-
}) }, hAsync("label", { key: '
|
|
32733
|
+
}) }, 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: {
|
|
32721
32734
|
'label-text-wrapper': true,
|
|
32722
32735
|
'label-text-wrapper-hidden': !this.hasLabel,
|
|
32723
|
-
}, part: "label" }, hAsync("slot", { key: '
|
|
32736
|
+
}, part: "label" }, hAsync("slot", { key: '9495a4a39889822ee68e0d89dc5a2f863d1feb3c' })), hAsync("div", { key: '55f1eb08c4b705e94fbcf02220bbe1d292f06155', class: "native-wrapper" }, this.renderToggleControl()))));
|
|
32724
32737
|
}
|
|
32725
32738
|
get el() { return getElement(this); }
|
|
32726
32739
|
static get watchers() { return {
|
|
@@ -32743,6 +32756,7 @@ class Toggle {
|
|
|
32743
32756
|
"labelPlacement": [1, "label-placement"],
|
|
32744
32757
|
"justify": [1],
|
|
32745
32758
|
"alignment": [1],
|
|
32759
|
+
"required": [4],
|
|
32746
32760
|
"activated": [32]
|
|
32747
32761
|
},
|
|
32748
32762
|
"$listeners$": undefined,
|
|
@@ -32774,6 +32788,10 @@ var IonToolbarMdStyle0 = toolbarMdCss;
|
|
|
32774
32788
|
* @slot secondary - Content is placed to the left of the toolbar text in `ios` mode, and directly to the right in `md` mode.
|
|
32775
32789
|
* @slot primary - Content is placed to the right of the toolbar text in `ios` mode, and to the far right in `md` mode.
|
|
32776
32790
|
* @slot end - Content is placed to the right of the toolbar text in LTR, and to the left in RTL.
|
|
32791
|
+
*
|
|
32792
|
+
* @part background - The background of the toolbar, covering the entire area behind the toolbar content.
|
|
32793
|
+
* @part container - The container that wraps all toolbar content, including the default slot and named slot content.
|
|
32794
|
+
* @part content - The container for the default slot, wrapping content provided without a named slot.
|
|
32777
32795
|
*/
|
|
32778
32796
|
class Toolbar {
|
|
32779
32797
|
constructor(hostRef) {
|
|
@@ -32824,10 +32842,10 @@ class Toolbar {
|
|
|
32824
32842
|
this.childrenStyles.forEach((value) => {
|
|
32825
32843
|
Object.assign(childStyles, value);
|
|
32826
32844
|
});
|
|
32827
|
-
return (hAsync(Host, { key: '
|
|
32845
|
+
return (hAsync(Host, { key: '4fdc9ae82a93237cc28ceb95b0ebd8069b62839d', class: Object.assign(Object.assign({}, childStyles), createColorClasses$1(this.color, {
|
|
32828
32846
|
[mode]: true,
|
|
32829
32847
|
'in-toolbar': hostContext('ion-toolbar', this.el),
|
|
32830
|
-
})) }, hAsync("div", { key: '
|
|
32848
|
+
})) }, 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" }))));
|
|
32831
32849
|
}
|
|
32832
32850
|
get el() { return getElement(this); }
|
|
32833
32851
|
static get style() { return {
|
package/package.json
CHANGED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{__spreadArray}from"tslib";
|
|
2
|
-
/*!
|
|
3
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
4
|
-
*/var printIonWarning=function(r){var n=[];for(var o=1;o<arguments.length;o++){n[o-1]=arguments[o]}return console.warn.apply(console,__spreadArray(["[Ionic Warning]: ".concat(r)],n,false))};var printIonError=function(r){var n=[];for(var o=1;o<arguments.length;o++){n[o-1]=arguments[o]}return console.error.apply(console,__spreadArray(["[Ionic Error]: ".concat(r)],n,false))};var printRequiredElementError=function(r){var n=[];for(var o=1;o<arguments.length;o++){n[o-1]=arguments[o]}return console.error("<".concat(r.tagName.toLowerCase(),"> must be used inside ").concat(n.join(" or "),"."))};export{printIonError as a,printRequiredElementError as b,printIonWarning as p};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{__awaiter,__generator,__spreadArray}from"tslib";
|
|
2
|
-
/*!
|
|
3
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
4
|
-
*/import{w as win,d as doc}from"./index-a5d50daf.js";import{g as getScrollElement,c as scrollByPoint,f as findClosestIonContent}from"./index-5cc724f3.js";import{a as addEventListener,b as removeEventListener,r as raf,c as componentOnReady}from"./helpers-da915de8.js";import{a as KeyboardResize,K as Keyboard}from"./keyboard-73175e24.js";import"./index-9b0d46f4.js";import"./capacitor-59395cbd.js";var cloneMap=new WeakMap;var relocateInput=function(r,n,e,t,i){if(t===void 0){t=0}if(i===void 0){i=false}if(cloneMap.has(r)===e){return}if(e){addClone(r,n,t,i)}else{removeClone(r,n)}};var isFocused=function(r){return r===r.getRootNode().activeElement};var addClone=function(r,n,e,t){if(t===void 0){t=false}var i=n.parentNode;var o=n.cloneNode(false);o.classList.add("cloned-input");o.tabIndex=-1;if(t){o.disabled=true}i.appendChild(o);cloneMap.set(r,o);var a=r.ownerDocument;var u=a.dir==="rtl"?9999:-9999;r.style.pointerEvents="none";n.style.transform="translate3d(".concat(u,"px,").concat(e,"px,0) scale(0)")};var removeClone=function(r,n){var e=cloneMap.get(r);if(e){cloneMap.delete(r);e.remove()}r.style.pointerEvents="";n.style.transform=""};var SCROLL_AMOUNT_PADDING=50;var enableHideCaretOnScroll=function(r,n,e){if(!e||!n){return function(){return}}var t=function(e){if(isFocused(n)){relocateInput(r,n,e)}};var i=function(){return relocateInput(r,n,false)};var o=function(){return t(true)};var a=function(){return t(false)};addEventListener(e,"ionScrollStart",o);addEventListener(e,"ionScrollEnd",a);n.addEventListener("blur",i);return function(){removeEventListener(e,"ionScrollStart",o);removeEventListener(e,"ionScrollEnd",a);n.removeEventListener("blur",i)}};var SKIP_SELECTOR="input, textarea, [no-blur], [contenteditable]";var enableInputBlurring=function(){var r=true;var n=false;var e=document;var t=function(){n=true};var i=function(){r=true};var o=function(t){if(n){n=false;return}var i=e.activeElement;if(!i){return}if(i.matches(SKIP_SELECTOR)){return}var o=t.target;if(o===i){return}if(o.matches(SKIP_SELECTOR)||o.closest(SKIP_SELECTOR)){return}r=false;setTimeout((function(){if(!r){i.blur()}}),50)};addEventListener(e,"ionScrollStart",t);e.addEventListener("focusin",i,true);e.addEventListener("touchend",o,false);return function(){removeEventListener(e,"ionScrollStart",t,true);e.removeEventListener("focusin",i,true);e.removeEventListener("touchend",o,false)}};var SCROLL_ASSIST_SPEED=.3;var getScrollData=function(r,n,e,t){var i;var o=(i=r.closest("ion-item,[ion-item]"))!==null&&i!==void 0?i:r;return calcScrollData(o.getBoundingClientRect(),n.getBoundingClientRect(),e,t)};var calcScrollData=function(r,n,e,t){var i=r.top;var o=r.bottom;var a=n.top;var u=Math.min(n.bottom,t-e);var c=a+15;var d=u-SCROLL_AMOUNT_PADDING;var f=d-o;var l=c-i;var s=Math.round(f<0?-f:l>0?-l:0);var v=Math.min(s,i-a);var S=Math.abs(v);var _=S/SCROLL_ASSIST_SPEED;var w=Math.min(400,Math.max(150,_));return{scrollAmount:v,scrollDuration:w,scrollPadding:e,inputSafeY:-(i-c)+4}};var PADDING_TIMER_KEY="$ionPaddingTimer";var setScrollPadding=function(r,n,e){var t=r[PADDING_TIMER_KEY];if(t){clearTimeout(t)}if(n>0){r.style.setProperty("--keyboard-offset","".concat(n,"px"))}else{r[PADDING_TIMER_KEY]=setTimeout((function(){r.style.setProperty("--keyboard-offset","0px");if(e){e()}}),120)}};var setClearScrollPaddingListener=function(r,n,e){var t=function(){if(n){setScrollPadding(n,0,e)}};r.addEventListener("focusout",t,{once:true})};var currentPadding=0;var SKIP_SCROLL_ASSIST="data-ionic-skip-scroll-assist";var enableScrollAssist=function(r,n,e,t,i,o,a,u){if(u===void 0){u=false}var c=o&&(a===undefined||a.mode===KeyboardResize.None);var d=false;var f=win!==undefined?win.innerHeight:0;var l=function(i){if(d===false){d=true;return}jsSetFocus(r,n,e,t,i.detail.keyboardHeight,c,u,f,false)};var s=function(){d=false;win===null||win===void 0?void 0:win.removeEventListener("ionKeyboardDidShow",l);r.removeEventListener("focusout",s)};var v=function(){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(o){if(n.hasAttribute(SKIP_SCROLL_ASSIST)){n.removeAttribute(SKIP_SCROLL_ASSIST);return[2]}jsSetFocus(r,n,e,t,i,c,u,f);win===null||win===void 0?void 0:win.addEventListener("ionKeyboardDidShow",l);r.addEventListener("focusout",s);return[2]}))}))};r.addEventListener("focusin",v);return function(){r.removeEventListener("focusin",v);win===null||win===void 0?void 0:win.removeEventListener("ionKeyboardDidShow",l);r.removeEventListener("focusout",s)}};var setManualFocus=function(r){if(document.activeElement===r){return}r.setAttribute(SKIP_SCROLL_ASSIST,"true");r.focus()};var jsSetFocus=function(r,n,e,t,i,o){var a=[];for(var u=6;u<arguments.length;u++){a[u-6]=arguments[u]}return __awaiter(void 0,__spreadArray([r,n,e,t,i,o],a,true),void 0,(function(r,n,e,t,i,o,a,u,c){var d,f,l,s,v,S;if(a===void 0){a=false}if(u===void 0){u=0}if(c===void 0){c=true}return __generator(this,(function(_){switch(_.label){case 0:if(!e&&!t){return[2]}d=getScrollData(r,e||t,i,u);if(e&&Math.abs(d.scrollAmount)<4){setManualFocus(n);if(o&&e!==null){setScrollPadding(e,currentPadding);setClearScrollPaddingListener(n,e,(function(){return currentPadding=0}))}return[2]}relocateInput(r,n,true,d.inputSafeY,a);setManualFocus(n);raf((function(){return r.click()}));if(o&&e){currentPadding=d.scrollPadding;setScrollPadding(e,currentPadding)}if(!(typeof window!=="undefined"))return[3,3];l=function(){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:if(f!==undefined){clearTimeout(f)}window.removeEventListener("ionKeyboardDidShow",s);window.removeEventListener("ionKeyboardDidShow",l);if(!e)return[3,2];return[4,scrollByPoint(e,0,d.scrollAmount,d.scrollDuration)];case 1:t.sent();t.label=2;case 2:relocateInput(r,n,false,d.inputSafeY);setManualFocus(n);if(o){setClearScrollPaddingListener(n,e,(function(){return currentPadding=0}))}return[2]}}))}))};s=function(){window.removeEventListener("ionKeyboardDidShow",s);window.addEventListener("ionKeyboardDidShow",l)};if(!e)return[3,2];return[4,getScrollElement(e)];case 1:v=_.sent();S=v.scrollHeight-v.clientHeight;if(c&&d.scrollAmount>S-v.scrollTop){if(n.type==="password"){d.scrollAmount+=SCROLL_AMOUNT_PADDING;window.addEventListener("ionKeyboardDidShow",s)}else{window.addEventListener("ionKeyboardDidShow",l)}f=setTimeout(l,1e3);return[2]}_.label=2;case 2:l();_.label=3;case 3:return[2]}}))}))};var INPUT_BLURRING=true;var startInputShims=function(r,n){return __awaiter(void 0,void 0,void 0,(function(){var e,t,i,o,a,u,c,d,f,l,s,v,S,_,w,p;return __generator(this,(function(I){switch(I.label){case 0:if(doc===undefined){return[2]}e=n==="ios";t=n==="android";i=r.getNumber("keyboardHeight",290);o=r.getBoolean("scrollAssist",true);a=r.getBoolean("hideCaretOnScroll",e);u=r.getBoolean("inputBlurring",false);c=r.getBoolean("scrollPadding",true);d=Array.from(doc.querySelectorAll("ion-input, ion-textarea"));f=new WeakMap;l=new WeakMap;return[4,Keyboard.getResizeMode()];case 1:s=I.sent();v=function(r){return __awaiter(void 0,void 0,void 0,(function(){var n,e,u,d,v,S,v;return __generator(this,(function(_){switch(_.label){case 0:return[4,new Promise((function(n){return componentOnReady(r,n)}))];case 1:_.sent();n=r.shadowRoot||r;e=n.querySelector("input")||n.querySelector("textarea");u=findClosestIonContent(r);d=!u?r.closest("ion-footer"):null;if(!e){return[2]}if(!!u&&a&&!f.has(r)){v=enableHideCaretOnScroll(r,e,u);f.set(r,v)}S=e.type==="date"||e.type==="datetime-local";if(!S&&(!!u||!!d)&&o&&!l.has(r)){v=enableScrollAssist(r,e,u,d,i,c,s,t);l.set(r,v)}return[2]}}))}))};S=function(r){if(a){var n=f.get(r);if(n){n()}f.delete(r)}if(o){var n=l.get(r);if(n){n()}l.delete(r)}};if(u&&INPUT_BLURRING){enableInputBlurring()}for(_=0,w=d;_<w.length;_++){p=w[_];v(p)}doc.addEventListener("ionInputDidLoad",(function(r){v(r.detail)}));doc.addEventListener("ionInputDidUnload",(function(r){S(r.detail)}));return[2]}}))}))};export{startInputShims};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{__awaiter,__generator}from"tslib";
|
|
2
|
-
/*!
|
|
3
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
4
|
-
*/import{e as readTask,w as writeTask}from"./index-28849c61.js";import{f as findClosestIonContent,s as scrollToTop}from"./index-5cc724f3.js";import{c as componentOnReady}from"./helpers-da915de8.js";import"./index-9b0d46f4.js";var startStatusTap=function(){var t=window;t.addEventListener("statusTap",(function(){readTask((function(){var o=t.innerWidth;var r=t.innerHeight;var n=document.elementFromPoint(o/2,r/2);if(!n){return}var e=findClosestIonContent(n);if(e){new Promise((function(t){return componentOnReady(e,t)})).then((function(){writeTask((function(){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:e.style.setProperty("--overflow","hidden");return[4,scrollToTop(e,300)];case 1:t.sent();e.style.removeProperty("--overflow");return[2]}}))}))}))}))}}))}))};export{startStatusTap};
|
package/dist/ionic/p-0303d0f8.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{e as o,w as s}from"./p-d836d43e.js";import{f as e,s as t}from"./p-06e58c4e.js";import{c as r}from"./p-b51e4004.js";import"./p-06fee233.js";const a=()=>{const a=window;a.addEventListener("statusTap",(()=>{o((()=>{const o=document.elementFromPoint(a.innerWidth/2,a.innerHeight/2);if(!o)return;const n=e(o);n&&new Promise((o=>r(n,o))).then((()=>{s((async()=>{n.style.setProperty("--overflow","hidden"),await t(n,300),n.style.removeProperty("--overflow")}))}))}))}))};export{a as startStatusTap}
|
package/dist/ionic/p-06fee233.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
-
*/
|
|
4
|
-
const o=(o,...s)=>console.warn(`[Ionic Warning]: ${o}`,...s),s=(o,...s)=>console.error(`[Ionic Error]: ${o}`,...s),n=(o,...s)=>console.error(`<${o.tagName.toLowerCase()}> must be used inside ${s.join(" or ")}.`);export{s as a,n as b,o as p}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
-
*/
|
|
4
|
-
System.register(["./p-9146695e.system.js","./p-f9a53abb.system.js","./p-792919fd.system.js","./p-a69b9fc5.system.js","./p-25180df3.system.js","./p-ff4b7e40.system.js","./p-3ad285e3.system.js"],(function(n){"use strict";var t,i;return{setters:[function(n){t=n.c},function(n){i=n.g},function(){},function(){},function(){},function(){},function(){}],execute:function(){var s=n("mdTransitionAnimation",(function(n,s){var a,e,r;var o="40px";var c="0px";var f=s.direction==="back";var u=s.enteringEl;var v=s.leavingEl;var b=i(u);var l=b.querySelector("ion-toolbar");var p=t();p.addElement(b).fill("both").beforeRemoveClass("ion-page-invisible");if(f){p.duration(((a=s.duration)!==null&&a!==void 0?a:0)||200).easing("cubic-bezier(0.47,0,0.745,0.715)")}else{p.duration(((e=s.duration)!==null&&e!==void 0?e:0)||280).easing("cubic-bezier(0.36,0.66,0.04,1)").fromTo("transform","translateY(".concat(o,")"),"translateY(".concat(c,")")).fromTo("opacity",.01,1)}if(l){var m=t();m.addElement(l);p.addAnimation(m)}if(v&&f){p.duration(((r=s.duration)!==null&&r!==void 0?r:0)||200).easing("cubic-bezier(0.47,0,0.745,0.715)");var y=t();y.addElement(i(v)).onFinish((function(n){if(n===1&&y.elements.length>0){y.elements[0].style.setProperty("display","none")}})).fromTo("transform","translateY(".concat(c,")"),"translateY(".concat(o,")")).fromTo("opacity",1,0);p.addAnimation(y)}return p}))}}}));
|
package/dist/ionic/p-2690b1de.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{w as o,d as n}from"./p-7b30edcc.js";import{g as t,c as i,f as e}from"./p-06e58c4e.js";import{a as r,b as a,r as s,c as d}from"./p-b51e4004.js";import{a as c,K as l}from"./p-27281edd.js";import"./p-06fee233.js";import"./p-c61cc894.js";const u=new WeakMap,f=(o,n,t,i=0,e=!1)=>{u.has(o)!==t&&(t?w(o,n,i,e):p(o,n))},w=(o,n,t,i=!1)=>{const e=n.parentNode,r=n.cloneNode(!1);r.classList.add("cloned-input"),r.tabIndex=-1,i&&(r.disabled=!0),e.appendChild(r),u.set(o,r);const a="rtl"===o.ownerDocument.dir?9999:-9999;o.style.pointerEvents="none",n.style.transform=`translate3d(${a}px,${t}px,0) scale(0)`},p=(o,n)=>{const t=u.get(o);t&&(u.delete(o),t.remove()),o.style.pointerEvents="",n.style.transform=""},m="input, textarea, [no-blur], [contenteditable]",b="$ionPaddingTimer",h=(o,n,t)=>{const i=o[b];i&&clearTimeout(i),n>0?o.style.setProperty("--keyboard-offset",`${n}px`):o[b]=setTimeout((()=>{o.style.setProperty("--keyboard-offset","0px"),t&&t()}),120)},y=(o,n,t)=>{o.addEventListener("focusout",(()=>{n&&h(n,0,t)}),{once:!0})};let S=0;const D="data-ionic-skip-scroll-assist",v=o=>{document.activeElement!==o&&(o.setAttribute(D,"true"),o.focus())},K=async(o,n,e,r,a,d,c=!1,l=0,u=!0)=>{if(!e&&!r)return;const w=((o,n,t,i)=>{var e;return((o,n,t,i)=>{const e=o.top,r=o.bottom,a=n.top,s=a+15,d=Math.min(n.bottom,i-t)-50-r,c=s-e,l=Math.round(d<0?-d:c>0?-c:0),u=Math.min(l,e-a),f=Math.abs(u);return{scrollAmount:u,scrollDuration:Math.min(400,Math.max(150,f/.3)),scrollPadding:t,inputSafeY:4-(e-s)}})((null!==(e=o.closest("ion-item,[ion-item]"))&&void 0!==e?e:o).getBoundingClientRect(),n.getBoundingClientRect(),t,i)})(o,e||r,a,l);if(e&&Math.abs(w.scrollAmount)<4)return v(n),void(d&&null!==e&&(h(e,S),y(n,e,(()=>S=0))));if(f(o,n,!0,w.inputSafeY,c),v(n),s((()=>o.click())),d&&e&&(S=w.scrollPadding,h(e,S)),"undefined"!=typeof window){let r;const a=async()=>{void 0!==r&&clearTimeout(r),window.removeEventListener("ionKeyboardDidShow",s),window.removeEventListener("ionKeyboardDidShow",a),e&&await i(e,0,w.scrollAmount,w.scrollDuration),f(o,n,!1,w.inputSafeY),v(n),d&&y(n,e,(()=>S=0))},s=()=>{window.removeEventListener("ionKeyboardDidShow",s),window.addEventListener("ionKeyboardDidShow",a)};if(e){const o=await t(e);if(u&&w.scrollAmount>o.scrollHeight-o.clientHeight-o.scrollTop)return"password"===n.type?(w.scrollAmount+=50,window.addEventListener("ionKeyboardDidShow",s)):window.addEventListener("ionKeyboardDidShow",a),void(r=setTimeout(a,1e3))}a()}},M=async(t,i)=>{if(void 0===n)return;const s="ios"===i,u="android"===i,w=t.getNumber("keyboardHeight",290),p=t.getBoolean("scrollAssist",!0),b=t.getBoolean("hideCaretOnScroll",s),h=t.getBoolean("inputBlurring",!1),y=t.getBoolean("scrollPadding",!0),S=Array.from(n.querySelectorAll("ion-input, ion-textarea")),v=new WeakMap,M=new WeakMap,x=await l.getResizeMode(),k=async n=>{await new Promise((o=>d(n,o)));const t=n.shadowRoot||n,i=t.querySelector("input")||t.querySelector("textarea"),s=e(n),l=s?null:n.closest("ion-footer");if(i){if(s&&b&&!v.has(n)){const o=((o,n,t)=>{if(!t||!n)return()=>{};const i=t=>{var i;(i=n)===i.getRootNode().activeElement&&f(o,n,t)},e=()=>f(o,n,!1),s=()=>i(!0),d=()=>i(!1);return r(t,"ionScrollStart",s),r(t,"ionScrollEnd",d),n.addEventListener("blur",e),()=>{a(t,"ionScrollStart",s),a(t,"ionScrollEnd",d),n.removeEventListener("blur",e)}})(n,i,s);v.set(n,o)}if("date"!==i.type&&"datetime-local"!==i.type&&(s||l)&&p&&!M.has(n)){const t=((n,t,i,e,r,a,s,d=!1)=>{const l=a&&(void 0===s||s.mode===c.None);let u=!1;const f=void 0!==o?o.innerHeight:0,w=o=>{!1!==u?K(n,t,i,e,o.detail.keyboardHeight,l,d,f,!1):u=!0},p=()=>{u=!1,null==o||o.removeEventListener("ionKeyboardDidShow",w),n.removeEventListener("focusout",p)},m=async()=>{t.hasAttribute(D)?t.removeAttribute(D):(K(n,t,i,e,r,l,d,f),null==o||o.addEventListener("ionKeyboardDidShow",w),n.addEventListener("focusout",p))};return n.addEventListener("focusin",m),()=>{n.removeEventListener("focusin",m),null==o||o.removeEventListener("ionKeyboardDidShow",w),n.removeEventListener("focusout",p)}})(n,i,s,l,w,y,x,u);M.set(n,t)}}};h&&(()=>{let o=!0,n=!1;const t=document;r(t,"ionScrollStart",(()=>{n=!0})),t.addEventListener("focusin",(()=>{o=!0}),!0),t.addEventListener("touchend",(i=>{if(n)return void(n=!1);const e=t.activeElement;if(!e)return;if(e.matches(m))return;const r=i.target;r!==e&&(r.matches(m)||r.closest(m)||(o=!1,setTimeout((()=>{o||e.blur()}),50)))}),!1)})();for(const o of S)k(o);n.addEventListener("ionInputDidLoad",(o=>{k(o.detail)})),n.addEventListener("ionInputDidUnload",(o=>{(o=>{if(b){const n=v.get(o);n&&n(),v.delete(o)}if(p){const n=M.get(o);n&&n(),M.delete(o)}})(o.detail)}))};export{M as startInputShims}
|