@ionic/core 8.3.4-dev.11729533091.1ac77a0c → 8.3.4-dev.11729609828.1dc55ac6
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/backdrop.js +1 -1
- package/components/ion-input.js +21 -4
- package/dist/cjs/ion-backdrop.cjs.entry.js +1 -1
- package/dist/cjs/ion-input.cjs.entry.js +21 -4
- package/dist/collection/components/backdrop/backdrop.js +1 -1
- package/dist/collection/components/input/input.js +21 -4
- package/dist/docs.json +1 -1
- package/dist/esm/ion-backdrop.entry.js +1 -1
- package/dist/esm/ion-input.entry.js +21 -4
- package/dist/esm-es5/ion-backdrop.entry.js +1 -1
- package/dist/esm-es5/ion-input.entry.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-322c5fb4.system.js +1 -1
- package/dist/ionic/{p-4b0fedb7.system.entry.js → p-5c8eb6c7.system.entry.js} +1 -1
- package/dist/ionic/{p-53add985.system.entry.js → p-772dacba.system.entry.js} +1 -1
- package/dist/ionic/p-a4aff4e3.entry.js +4 -0
- package/dist/ionic/p-ab8a2ff1.entry.js +4 -0
- package/dist/types/components/input/input.d.ts +1 -0
- package/hydrate/index.js +22 -5
- package/hydrate/index.mjs +22 -5
- package/package.json +1 -1
- package/dist/ionic/p-60cc7986.entry.js +0 -4
- package/dist/ionic/p-bfa2e81c.entry.js +0 -4
package/components/backdrop.js
CHANGED
|
@@ -34,7 +34,7 @@ const Backdrop = /*@__PURE__*/ proxyCustomElement(class Backdrop extends HTMLEle
|
|
|
34
34
|
}
|
|
35
35
|
render() {
|
|
36
36
|
const mode = getIonMode(this);
|
|
37
|
-
return (h(Host, { key: '
|
|
37
|
+
return (h(Host, { key: 'c803b4302c8e722064feb03dafe3cb6e190b4f2b', tabindex: "-1", "aria-hidden": "true", class: {
|
|
38
38
|
[mode]: true,
|
|
39
39
|
'backdrop-hide': !this.visible,
|
|
40
40
|
'backdrop-no-tappable': !this.tappable,
|
package/components/ion-input.js
CHANGED
|
@@ -298,7 +298,20 @@ const Input = /*@__PURE__*/ proxyCustomElement(class Input extends HTMLElement {
|
|
|
298
298
|
*/
|
|
299
299
|
renderHintText() {
|
|
300
300
|
const { helperText, errorText } = this;
|
|
301
|
-
return [
|
|
301
|
+
return [
|
|
302
|
+
h("div", { id: HELPER_TEXT_ID, class: "helper-text" }, helperText),
|
|
303
|
+
h("div", { id: ERROR_TEXT_ID, class: "error-text" }, errorText),
|
|
304
|
+
];
|
|
305
|
+
}
|
|
306
|
+
getHintTextID() {
|
|
307
|
+
const { el, helperText, errorText } = this;
|
|
308
|
+
if (el.classList.contains('ion-touched') && el.classList.contains('ion-invalid') && errorText) {
|
|
309
|
+
return ERROR_TEXT_ID;
|
|
310
|
+
}
|
|
311
|
+
if (helperText) {
|
|
312
|
+
return HELPER_TEXT_ID;
|
|
313
|
+
}
|
|
314
|
+
return undefined;
|
|
302
315
|
}
|
|
303
316
|
renderCounter() {
|
|
304
317
|
const { counter, maxlength, counterFormatter, value } = this;
|
|
@@ -387,6 +400,8 @@ const Input = /*@__PURE__*/ proxyCustomElement(class Input extends HTMLElement {
|
|
|
387
400
|
const clearIconData = clearInputIcon !== null && clearInputIcon !== void 0 ? clearInputIcon : defaultClearIcon;
|
|
388
401
|
const hasValue = this.hasValue();
|
|
389
402
|
const hasStartEndSlots = el.querySelector('[slot="start"], [slot="end"]') !== null;
|
|
403
|
+
console.log('el', this.el);
|
|
404
|
+
console.log('id', this.getHintTextID());
|
|
390
405
|
/**
|
|
391
406
|
* If the label is stacked, it should always sit above the input.
|
|
392
407
|
* For floating labels, the label should move above the input if
|
|
@@ -405,7 +420,7 @@ const Input = /*@__PURE__*/ proxyCustomElement(class Input extends HTMLElement {
|
|
|
405
420
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
406
421
|
*/
|
|
407
422
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));
|
|
408
|
-
return (h(Host, { key: '
|
|
423
|
+
return (h(Host, { key: '6ea1ddbc1c13e2e93686135ee3c1d87c21839ea4', class: createColorClasses(this.color, {
|
|
409
424
|
[mode]: true,
|
|
410
425
|
'has-value': hasValue,
|
|
411
426
|
'has-focus': hasFocus,
|
|
@@ -416,7 +431,7 @@ const Input = /*@__PURE__*/ proxyCustomElement(class Input extends HTMLElement {
|
|
|
416
431
|
'in-item': inItem,
|
|
417
432
|
'in-item-color': hostContext('ion-item.ion-color', this.el),
|
|
418
433
|
'input-disabled': disabled,
|
|
419
|
-
}) }, h("label", { key: '
|
|
434
|
+
}) }, h("label", { key: '37c80eff5361d5d8d14fa59fcab66a2f38d85fd2', class: "input-wrapper", htmlFor: inputId }, this.renderLabelContainer(), h("div", { key: '1bf4e5997beab1c7611d208465d7bec9da62fb54', class: "native-wrapper" }, h("slot", { key: '3b3eec55351462d72f04ab6b5b69f30bbe12b79f', name: "start" }), h("input", Object.assign({ key: '30673d8d272d0c21d2c3996608973c3e740433cd', class: "native-input", ref: (input) => (this.nativeInput = input), id: inputId, disabled: disabled, autoCapitalize: this.autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, min: this.min, max: this.max, minLength: this.minlength, maxLength: this.maxlength, multiple: this.multiple, name: this.name, pattern: this.pattern, placeholder: this.placeholder || '', readOnly: readonly, required: this.required, spellcheck: this.spellcheck, step: this.step, type: this.type, value: value, onInput: this.onInput, onChange: this.onChange, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeydown, onCompositionstart: this.onCompositionStart, onCompositionend: this.onCompositionEnd, "aria-describedby": this.getHintTextID(), "aria-invalid": this.getHintTextID() === ERROR_TEXT_ID }, this.inheritedAttributes)), this.clearInput && !readonly && !disabled && (h("button", { key: '6414d510d72780262baceba2bb2a8c9fa1a48f2b', "aria-label": "reset", type: "button", class: "input-clear-icon", onPointerDown: (ev) => {
|
|
420
435
|
/**
|
|
421
436
|
* This prevents mobile browsers from
|
|
422
437
|
* blurring the input when the clear
|
|
@@ -431,7 +446,7 @@ const Input = /*@__PURE__*/ proxyCustomElement(class Input extends HTMLElement {
|
|
|
431
446
|
* for screen readers as it means users would be unable to swipe past the clear button.
|
|
432
447
|
*/
|
|
433
448
|
ev.stopPropagation();
|
|
434
|
-
}, onClick: this.clearTextInput }, h("ion-icon", { key: '
|
|
449
|
+
}, onClick: this.clearTextInput }, h("ion-icon", { key: '517f2c7cd07fb22996ca2f63838de55346314993', "aria-hidden": "true", icon: clearIconData }))), h("slot", { key: 'ea2f1a12357da90098695c46cbc21d7d33923f9e', name: "end" })), shouldRenderHighlight && h("div", { key: '4a117a1ed80d6ea8e2a42a958509284cdf8b306f', class: "input-highlight" })), this.renderBottomContent()));
|
|
435
450
|
}
|
|
436
451
|
get el() { return this; }
|
|
437
452
|
static get watchers() { return {
|
|
@@ -487,6 +502,8 @@ const Input = /*@__PURE__*/ proxyCustomElement(class Input extends HTMLElement {
|
|
|
487
502
|
"value": ["valueChanged"]
|
|
488
503
|
}]);
|
|
489
504
|
let inputIds = 0;
|
|
505
|
+
const HELPER_TEXT_ID = `${'helper-text-' + inputIds}`;
|
|
506
|
+
const ERROR_TEXT_ID = `${'error-text-' + inputIds}`;
|
|
490
507
|
function defineCustomElement$1() {
|
|
491
508
|
if (typeof customElements === "undefined") {
|
|
492
509
|
return;
|
|
@@ -36,7 +36,7 @@ const Backdrop = class {
|
|
|
36
36
|
}
|
|
37
37
|
render() {
|
|
38
38
|
const mode = ionicGlobal.getIonMode(this);
|
|
39
|
-
return (index.h(index.Host, { key: '
|
|
39
|
+
return (index.h(index.Host, { key: 'c803b4302c8e722064feb03dafe3cb6e190b4f2b', tabindex: "-1", "aria-hidden": "true", class: {
|
|
40
40
|
[mode]: true,
|
|
41
41
|
'backdrop-hide': !this.visible,
|
|
42
42
|
'backdrop-no-tappable': !this.tappable,
|
|
@@ -302,7 +302,20 @@ const Input = class {
|
|
|
302
302
|
*/
|
|
303
303
|
renderHintText() {
|
|
304
304
|
const { helperText, errorText } = this;
|
|
305
|
-
return [
|
|
305
|
+
return [
|
|
306
|
+
index.h("div", { id: HELPER_TEXT_ID, class: "helper-text" }, helperText),
|
|
307
|
+
index.h("div", { id: ERROR_TEXT_ID, class: "error-text" }, errorText),
|
|
308
|
+
];
|
|
309
|
+
}
|
|
310
|
+
getHintTextID() {
|
|
311
|
+
const { el, helperText, errorText } = this;
|
|
312
|
+
if (el.classList.contains('ion-touched') && el.classList.contains('ion-invalid') && errorText) {
|
|
313
|
+
return ERROR_TEXT_ID;
|
|
314
|
+
}
|
|
315
|
+
if (helperText) {
|
|
316
|
+
return HELPER_TEXT_ID;
|
|
317
|
+
}
|
|
318
|
+
return undefined;
|
|
306
319
|
}
|
|
307
320
|
renderCounter() {
|
|
308
321
|
const { counter, maxlength, counterFormatter, value } = this;
|
|
@@ -391,6 +404,8 @@ const Input = class {
|
|
|
391
404
|
const clearIconData = clearInputIcon !== null && clearInputIcon !== void 0 ? clearInputIcon : defaultClearIcon;
|
|
392
405
|
const hasValue = this.hasValue();
|
|
393
406
|
const hasStartEndSlots = el.querySelector('[slot="start"], [slot="end"]') !== null;
|
|
407
|
+
console.log('el', this.el);
|
|
408
|
+
console.log('id', this.getHintTextID());
|
|
394
409
|
/**
|
|
395
410
|
* If the label is stacked, it should always sit above the input.
|
|
396
411
|
* For floating labels, the label should move above the input if
|
|
@@ -409,7 +424,7 @@ const Input = class {
|
|
|
409
424
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
410
425
|
*/
|
|
411
426
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));
|
|
412
|
-
return (index.h(index.Host, { key: '
|
|
427
|
+
return (index.h(index.Host, { key: '6ea1ddbc1c13e2e93686135ee3c1d87c21839ea4', class: theme.createColorClasses(this.color, {
|
|
413
428
|
[mode]: true,
|
|
414
429
|
'has-value': hasValue,
|
|
415
430
|
'has-focus': hasFocus,
|
|
@@ -420,7 +435,7 @@ const Input = class {
|
|
|
420
435
|
'in-item': inItem,
|
|
421
436
|
'in-item-color': theme.hostContext('ion-item.ion-color', this.el),
|
|
422
437
|
'input-disabled': disabled,
|
|
423
|
-
}) }, index.h("label", { key: '
|
|
438
|
+
}) }, index.h("label", { key: '37c80eff5361d5d8d14fa59fcab66a2f38d85fd2', class: "input-wrapper", htmlFor: inputId }, this.renderLabelContainer(), index.h("div", { key: '1bf4e5997beab1c7611d208465d7bec9da62fb54', class: "native-wrapper" }, index.h("slot", { key: '3b3eec55351462d72f04ab6b5b69f30bbe12b79f', name: "start" }), index.h("input", Object.assign({ key: '30673d8d272d0c21d2c3996608973c3e740433cd', class: "native-input", ref: (input) => (this.nativeInput = input), id: inputId, disabled: disabled, autoCapitalize: this.autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, min: this.min, max: this.max, minLength: this.minlength, maxLength: this.maxlength, multiple: this.multiple, name: this.name, pattern: this.pattern, placeholder: this.placeholder || '', readOnly: readonly, required: this.required, spellcheck: this.spellcheck, step: this.step, type: this.type, value: value, onInput: this.onInput, onChange: this.onChange, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeydown, onCompositionstart: this.onCompositionStart, onCompositionend: this.onCompositionEnd, "aria-describedby": this.getHintTextID(), "aria-invalid": this.getHintTextID() === ERROR_TEXT_ID }, this.inheritedAttributes)), this.clearInput && !readonly && !disabled && (index.h("button", { key: '6414d510d72780262baceba2bb2a8c9fa1a48f2b', "aria-label": "reset", type: "button", class: "input-clear-icon", onPointerDown: (ev) => {
|
|
424
439
|
/**
|
|
425
440
|
* This prevents mobile browsers from
|
|
426
441
|
* blurring the input when the clear
|
|
@@ -435,7 +450,7 @@ const Input = class {
|
|
|
435
450
|
* for screen readers as it means users would be unable to swipe past the clear button.
|
|
436
451
|
*/
|
|
437
452
|
ev.stopPropagation();
|
|
438
|
-
}, onClick: this.clearTextInput }, index.h("ion-icon", { key: '
|
|
453
|
+
}, onClick: this.clearTextInput }, index.h("ion-icon", { key: '517f2c7cd07fb22996ca2f63838de55346314993', "aria-hidden": "true", icon: clearIconData }))), index.h("slot", { key: 'ea2f1a12357da90098695c46cbc21d7d33923f9e', name: "end" })), shouldRenderHighlight && index.h("div", { key: '4a117a1ed80d6ea8e2a42a958509284cdf8b306f', class: "input-highlight" })), this.renderBottomContent()));
|
|
439
454
|
}
|
|
440
455
|
get el() { return index.getElement(this); }
|
|
441
456
|
static get watchers() { return {
|
|
@@ -445,6 +460,8 @@ const Input = class {
|
|
|
445
460
|
}; }
|
|
446
461
|
};
|
|
447
462
|
let inputIds = 0;
|
|
463
|
+
const HELPER_TEXT_ID = `${'helper-text-' + inputIds}`;
|
|
464
|
+
const ERROR_TEXT_ID = `${'error-text-' + inputIds}`;
|
|
448
465
|
Input.style = {
|
|
449
466
|
ios: IonInputIosStyle0,
|
|
450
467
|
md: IonInputMdStyle0
|
|
@@ -23,7 +23,7 @@ export class Backdrop {
|
|
|
23
23
|
}
|
|
24
24
|
render() {
|
|
25
25
|
const mode = getIonMode(this);
|
|
26
|
-
return (h(Host, { key: '
|
|
26
|
+
return (h(Host, { key: 'c803b4302c8e722064feb03dafe3cb6e190b4f2b', tabindex: "-1", "aria-hidden": "true", class: {
|
|
27
27
|
[mode]: true,
|
|
28
28
|
'backdrop-hide': !this.visible,
|
|
29
29
|
'backdrop-no-tappable': !this.tappable,
|
|
@@ -292,7 +292,20 @@ export class Input {
|
|
|
292
292
|
*/
|
|
293
293
|
renderHintText() {
|
|
294
294
|
const { helperText, errorText } = this;
|
|
295
|
-
return [
|
|
295
|
+
return [
|
|
296
|
+
h("div", { id: HELPER_TEXT_ID, class: "helper-text" }, helperText),
|
|
297
|
+
h("div", { id: ERROR_TEXT_ID, class: "error-text" }, errorText),
|
|
298
|
+
];
|
|
299
|
+
}
|
|
300
|
+
getHintTextID() {
|
|
301
|
+
const { el, helperText, errorText } = this;
|
|
302
|
+
if (el.classList.contains('ion-touched') && el.classList.contains('ion-invalid') && errorText) {
|
|
303
|
+
return ERROR_TEXT_ID;
|
|
304
|
+
}
|
|
305
|
+
if (helperText) {
|
|
306
|
+
return HELPER_TEXT_ID;
|
|
307
|
+
}
|
|
308
|
+
return undefined;
|
|
296
309
|
}
|
|
297
310
|
renderCounter() {
|
|
298
311
|
const { counter, maxlength, counterFormatter, value } = this;
|
|
@@ -381,6 +394,8 @@ export class Input {
|
|
|
381
394
|
const clearIconData = clearInputIcon !== null && clearInputIcon !== void 0 ? clearInputIcon : defaultClearIcon;
|
|
382
395
|
const hasValue = this.hasValue();
|
|
383
396
|
const hasStartEndSlots = el.querySelector('[slot="start"], [slot="end"]') !== null;
|
|
397
|
+
console.log('el', this.el);
|
|
398
|
+
console.log('id', this.getHintTextID());
|
|
384
399
|
/**
|
|
385
400
|
* If the label is stacked, it should always sit above the input.
|
|
386
401
|
* For floating labels, the label should move above the input if
|
|
@@ -399,7 +414,7 @@ export class Input {
|
|
|
399
414
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
400
415
|
*/
|
|
401
416
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));
|
|
402
|
-
return (h(Host, { key: '
|
|
417
|
+
return (h(Host, { key: '6ea1ddbc1c13e2e93686135ee3c1d87c21839ea4', class: createColorClasses(this.color, {
|
|
403
418
|
[mode]: true,
|
|
404
419
|
'has-value': hasValue,
|
|
405
420
|
'has-focus': hasFocus,
|
|
@@ -410,7 +425,7 @@ export class Input {
|
|
|
410
425
|
'in-item': inItem,
|
|
411
426
|
'in-item-color': hostContext('ion-item.ion-color', this.el),
|
|
412
427
|
'input-disabled': disabled,
|
|
413
|
-
}) }, h("label", { key: '
|
|
428
|
+
}) }, h("label", { key: '37c80eff5361d5d8d14fa59fcab66a2f38d85fd2', class: "input-wrapper", htmlFor: inputId }, this.renderLabelContainer(), h("div", { key: '1bf4e5997beab1c7611d208465d7bec9da62fb54', class: "native-wrapper" }, h("slot", { key: '3b3eec55351462d72f04ab6b5b69f30bbe12b79f', name: "start" }), h("input", Object.assign({ key: '30673d8d272d0c21d2c3996608973c3e740433cd', class: "native-input", ref: (input) => (this.nativeInput = input), id: inputId, disabled: disabled, autoCapitalize: this.autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, min: this.min, max: this.max, minLength: this.minlength, maxLength: this.maxlength, multiple: this.multiple, name: this.name, pattern: this.pattern, placeholder: this.placeholder || '', readOnly: readonly, required: this.required, spellcheck: this.spellcheck, step: this.step, type: this.type, value: value, onInput: this.onInput, onChange: this.onChange, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeydown, onCompositionstart: this.onCompositionStart, onCompositionend: this.onCompositionEnd, "aria-describedby": this.getHintTextID(), "aria-invalid": this.getHintTextID() === ERROR_TEXT_ID }, this.inheritedAttributes)), this.clearInput && !readonly && !disabled && (h("button", { key: '6414d510d72780262baceba2bb2a8c9fa1a48f2b', "aria-label": "reset", type: "button", class: "input-clear-icon", onPointerDown: (ev) => {
|
|
414
429
|
/**
|
|
415
430
|
* This prevents mobile browsers from
|
|
416
431
|
* blurring the input when the clear
|
|
@@ -425,7 +440,7 @@ export class Input {
|
|
|
425
440
|
* for screen readers as it means users would be unable to swipe past the clear button.
|
|
426
441
|
*/
|
|
427
442
|
ev.stopPropagation();
|
|
428
|
-
}, onClick: this.clearTextInput }, h("ion-icon", { key: '
|
|
443
|
+
}, onClick: this.clearTextInput }, h("ion-icon", { key: '517f2c7cd07fb22996ca2f63838de55346314993', "aria-hidden": "true", icon: clearIconData }))), h("slot", { key: 'ea2f1a12357da90098695c46cbc21d7d33923f9e', name: "end" })), shouldRenderHighlight && h("div", { key: '4a117a1ed80d6ea8e2a42a958509284cdf8b306f', class: "input-highlight" })), this.renderBottomContent()));
|
|
429
444
|
}
|
|
430
445
|
static get is() { return "ion-input"; }
|
|
431
446
|
static get encapsulation() { return "scoped"; }
|
|
@@ -1200,3 +1215,5 @@ export class Input {
|
|
|
1200
1215
|
}
|
|
1201
1216
|
}
|
|
1202
1217
|
let inputIds = 0;
|
|
1218
|
+
const HELPER_TEXT_ID = `${'helper-text-' + inputIds}`;
|
|
1219
|
+
const ERROR_TEXT_ID = `${'error-text-' + inputIds}`;
|
package/dist/docs.json
CHANGED
|
@@ -32,7 +32,7 @@ const Backdrop = class {
|
|
|
32
32
|
}
|
|
33
33
|
render() {
|
|
34
34
|
const mode = getIonMode(this);
|
|
35
|
-
return (h(Host, { key: '
|
|
35
|
+
return (h(Host, { key: 'c803b4302c8e722064feb03dafe3cb6e190b4f2b', tabindex: "-1", "aria-hidden": "true", class: {
|
|
36
36
|
[mode]: true,
|
|
37
37
|
'backdrop-hide': !this.visible,
|
|
38
38
|
'backdrop-no-tappable': !this.tappable,
|
|
@@ -298,7 +298,20 @@ const Input = class {
|
|
|
298
298
|
*/
|
|
299
299
|
renderHintText() {
|
|
300
300
|
const { helperText, errorText } = this;
|
|
301
|
-
return [
|
|
301
|
+
return [
|
|
302
|
+
h("div", { id: HELPER_TEXT_ID, class: "helper-text" }, helperText),
|
|
303
|
+
h("div", { id: ERROR_TEXT_ID, class: "error-text" }, errorText),
|
|
304
|
+
];
|
|
305
|
+
}
|
|
306
|
+
getHintTextID() {
|
|
307
|
+
const { el, helperText, errorText } = this;
|
|
308
|
+
if (el.classList.contains('ion-touched') && el.classList.contains('ion-invalid') && errorText) {
|
|
309
|
+
return ERROR_TEXT_ID;
|
|
310
|
+
}
|
|
311
|
+
if (helperText) {
|
|
312
|
+
return HELPER_TEXT_ID;
|
|
313
|
+
}
|
|
314
|
+
return undefined;
|
|
302
315
|
}
|
|
303
316
|
renderCounter() {
|
|
304
317
|
const { counter, maxlength, counterFormatter, value } = this;
|
|
@@ -387,6 +400,8 @@ const Input = class {
|
|
|
387
400
|
const clearIconData = clearInputIcon !== null && clearInputIcon !== void 0 ? clearInputIcon : defaultClearIcon;
|
|
388
401
|
const hasValue = this.hasValue();
|
|
389
402
|
const hasStartEndSlots = el.querySelector('[slot="start"], [slot="end"]') !== null;
|
|
403
|
+
console.log('el', this.el);
|
|
404
|
+
console.log('id', this.getHintTextID());
|
|
390
405
|
/**
|
|
391
406
|
* If the label is stacked, it should always sit above the input.
|
|
392
407
|
* For floating labels, the label should move above the input if
|
|
@@ -405,7 +420,7 @@ const Input = class {
|
|
|
405
420
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
406
421
|
*/
|
|
407
422
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));
|
|
408
|
-
return (h(Host, { key: '
|
|
423
|
+
return (h(Host, { key: '6ea1ddbc1c13e2e93686135ee3c1d87c21839ea4', class: createColorClasses(this.color, {
|
|
409
424
|
[mode]: true,
|
|
410
425
|
'has-value': hasValue,
|
|
411
426
|
'has-focus': hasFocus,
|
|
@@ -416,7 +431,7 @@ const Input = class {
|
|
|
416
431
|
'in-item': inItem,
|
|
417
432
|
'in-item-color': hostContext('ion-item.ion-color', this.el),
|
|
418
433
|
'input-disabled': disabled,
|
|
419
|
-
}) }, h("label", { key: '
|
|
434
|
+
}) }, h("label", { key: '37c80eff5361d5d8d14fa59fcab66a2f38d85fd2', class: "input-wrapper", htmlFor: inputId }, this.renderLabelContainer(), h("div", { key: '1bf4e5997beab1c7611d208465d7bec9da62fb54', class: "native-wrapper" }, h("slot", { key: '3b3eec55351462d72f04ab6b5b69f30bbe12b79f', name: "start" }), h("input", Object.assign({ key: '30673d8d272d0c21d2c3996608973c3e740433cd', class: "native-input", ref: (input) => (this.nativeInput = input), id: inputId, disabled: disabled, autoCapitalize: this.autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, min: this.min, max: this.max, minLength: this.minlength, maxLength: this.maxlength, multiple: this.multiple, name: this.name, pattern: this.pattern, placeholder: this.placeholder || '', readOnly: readonly, required: this.required, spellcheck: this.spellcheck, step: this.step, type: this.type, value: value, onInput: this.onInput, onChange: this.onChange, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeydown, onCompositionstart: this.onCompositionStart, onCompositionend: this.onCompositionEnd, "aria-describedby": this.getHintTextID(), "aria-invalid": this.getHintTextID() === ERROR_TEXT_ID }, this.inheritedAttributes)), this.clearInput && !readonly && !disabled && (h("button", { key: '6414d510d72780262baceba2bb2a8c9fa1a48f2b', "aria-label": "reset", type: "button", class: "input-clear-icon", onPointerDown: (ev) => {
|
|
420
435
|
/**
|
|
421
436
|
* This prevents mobile browsers from
|
|
422
437
|
* blurring the input when the clear
|
|
@@ -431,7 +446,7 @@ const Input = class {
|
|
|
431
446
|
* for screen readers as it means users would be unable to swipe past the clear button.
|
|
432
447
|
*/
|
|
433
448
|
ev.stopPropagation();
|
|
434
|
-
}, onClick: this.clearTextInput }, h("ion-icon", { key: '
|
|
449
|
+
}, onClick: this.clearTextInput }, h("ion-icon", { key: '517f2c7cd07fb22996ca2f63838de55346314993', "aria-hidden": "true", icon: clearIconData }))), h("slot", { key: 'ea2f1a12357da90098695c46cbc21d7d33923f9e', name: "end" })), shouldRenderHighlight && h("div", { key: '4a117a1ed80d6ea8e2a42a958509284cdf8b306f', class: "input-highlight" })), this.renderBottomContent()));
|
|
435
450
|
}
|
|
436
451
|
get el() { return getElement(this); }
|
|
437
452
|
static get watchers() { return {
|
|
@@ -441,6 +456,8 @@ const Input = class {
|
|
|
441
456
|
}; }
|
|
442
457
|
};
|
|
443
458
|
let inputIds = 0;
|
|
459
|
+
const HELPER_TEXT_ID = `${'helper-text-' + inputIds}`;
|
|
460
|
+
const ERROR_TEXT_ID = `${'error-text-' + inputIds}`;
|
|
444
461
|
Input.style = {
|
|
445
462
|
ios: IonInputIosStyle0,
|
|
446
463
|
md: IonInputMdStyle0
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{r as registerInstance,d as createEvent,h,f as Host}from"./index-28849c61.js";import{b as getIonMode}from"./ionic-global-c81d82ab.js";var backdropIosCss=":host{left:0;right:0;top:0;bottom:0;display:block;position:absolute;-webkit-transform:translateZ(0);transform:translateZ(0);contain:strict;cursor:pointer;opacity:0.01;-ms-touch-action:none;touch-action:none;z-index:2}:host(.backdrop-hide){background:transparent}:host(.backdrop-no-tappable){cursor:auto}:host{background-color:var(--ion-backdrop-color, #000)}";var IonBackdropIosStyle0=backdropIosCss;var backdropMdCss=":host{left:0;right:0;top:0;bottom:0;display:block;position:absolute;-webkit-transform:translateZ(0);transform:translateZ(0);contain:strict;cursor:pointer;opacity:0.01;-ms-touch-action:none;touch-action:none;z-index:2}:host(.backdrop-hide){background:transparent}:host(.backdrop-no-tappable){cursor:auto}:host{background-color:var(--ion-backdrop-color, #000)}";var IonBackdropMdStyle0=backdropMdCss;var Backdrop=function(){function o(o){registerInstance(this,o);this.ionBackdropTap=createEvent(this,"ionBackdropTap",7);this.visible=true;this.tappable=true;this.stopPropagation=true}o.prototype.onMouseDown=function(o){this.emitTap(o)};o.prototype.emitTap=function(o){if(this.stopPropagation){o.preventDefault();o.stopPropagation()}if(this.tappable){this.ionBackdropTap.emit()}};o.prototype.render=function(){var o;var t=getIonMode(this);return h(Host,{key:"
|
|
4
|
+
import{r as registerInstance,d as createEvent,h,f as Host}from"./index-28849c61.js";import{b as getIonMode}from"./ionic-global-c81d82ab.js";var backdropIosCss=":host{left:0;right:0;top:0;bottom:0;display:block;position:absolute;-webkit-transform:translateZ(0);transform:translateZ(0);contain:strict;cursor:pointer;opacity:0.01;-ms-touch-action:none;touch-action:none;z-index:2}:host(.backdrop-hide){background:transparent}:host(.backdrop-no-tappable){cursor:auto}:host{background-color:var(--ion-backdrop-color, #000)}";var IonBackdropIosStyle0=backdropIosCss;var backdropMdCss=":host{left:0;right:0;top:0;bottom:0;display:block;position:absolute;-webkit-transform:translateZ(0);transform:translateZ(0);contain:strict;cursor:pointer;opacity:0.01;-ms-touch-action:none;touch-action:none;z-index:2}:host(.backdrop-hide){background:transparent}:host(.backdrop-no-tappable){cursor:auto}:host{background-color:var(--ion-backdrop-color, #000)}";var IonBackdropMdStyle0=backdropMdCss;var Backdrop=function(){function o(o){registerInstance(this,o);this.ionBackdropTap=createEvent(this,"ionBackdropTap",7);this.visible=true;this.tappable=true;this.stopPropagation=true}o.prototype.onMouseDown=function(o){this.emitTap(o)};o.prototype.emitTap=function(o){if(this.stopPropagation){o.preventDefault();o.stopPropagation()}if(this.tappable){this.ionBackdropTap.emit()}};o.prototype.render=function(){var o;var t=getIonMode(this);return h(Host,{key:"c803b4302c8e722064feb03dafe3cb6e190b4f2b",tabindex:"-1","aria-hidden":"true",class:(o={},o[t]=true,o["backdrop-hide"]=!this.visible,o["backdrop-no-tappable"]=!this.tappable,o)})};return o}();Backdrop.style={ios:IonBackdropIosStyle0,md:IonBackdropMdStyle0};export{Backdrop as ion_backdrop};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import{__awaiter,__generator}from"tslib";
|
|
2
2
|
/*!
|
|
3
3
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
4
|
-
*/import{r as registerInstance,d as createEvent,h,f as Host,i as getElement,j as forceUpdate}from"./index-28849c61.js";import{c as createNotchController}from"./notch-controller-55b09e11.js";import{e as debounceEvent,i as inheritAriaAttributes,h as inheritAttributes,c as componentOnReady}from"./helpers-da915de8.js";import{c as createSlotMutationController,g as getCounterText}from"./input.utils-09c71bc7.js";import{h as hostContext,c as createColorClasses}from"./theme-01f3f29c.js";import{b as closeCircle,d as closeSharp}from"./index-e2cf2ceb.js";import{b as getIonMode}from"./ionic-global-c81d82ab.js";import"./index-a5d50daf.js";import"./index-9b0d46f4.js";var inputIosCss=".sc-ion-input-ios-h{--placeholder-color:initial;--placeholder-font-style:initial;--placeholder-font-weight:initial;--placeholder-opacity:var(--ion-placeholder-opacity, 0.6);--padding-top:0px;--padding-end:0px;--padding-bottom:0px;--padding-start:0px;--background:transparent;--color:initial;--border-style:solid;--highlight-color-focused:var(--ion-color-primary, #0054e9);--highlight-color-valid:var(--ion-color-success, #2dd55b);--highlight-color-invalid:var(--ion-color-danger, #c5000f);--highlight-color:var(--highlight-color-focused);display:block;position:relative;width:100%;min-height:44px;padding:0 !important;color:var(--color);font-family:var(--ion-font-family, inherit);z-index:2}ion-item[slot=start].sc-ion-input-ios-h,ion-item [slot=start].sc-ion-input-ios-h,ion-item[slot=end].sc-ion-input-ios-h,ion-item [slot=end].sc-ion-input-ios-h{width:auto}.ion-color.sc-ion-input-ios-h{--highlight-color-focused:var(--ion-color-base)}.input-label-placement-floating.sc-ion-input-ios-h,.input-label-placement-stacked.sc-ion-input-ios-h{min-height:56px}.native-input.sc-ion-input-ios{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;display:inline-block;position:relative;-ms-flex:1;flex:1;width:100%;max-width:100%;max-height:100%;border:0;outline:none;background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;z-index:1}.native-input.sc-ion-input-ios::-webkit-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-input.sc-ion-input-ios::-moz-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-input.sc-ion-input-ios:-ms-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-input.sc-ion-input-ios::-ms-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-input.sc-ion-input-ios::placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-input.sc-ion-input-ios:-webkit-autofill{background-color:transparent}.native-input.sc-ion-input-ios:invalid{-webkit-box-shadow:none;box-shadow:none}.native-input.sc-ion-input-ios::-ms-clear{display:none}.cloned-input.sc-ion-input-ios{top:0;bottom:0;position:absolute;pointer-events:none}.cloned-input.sc-ion-input-ios{inset-inline-start:0}.cloned-input.sc-ion-input-ios:disabled{opacity:1}.input-clear-icon.sc-ion-input-ios{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:auto;margin-bottom:auto;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;background-position:center;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:30px;height:30px;border:0;outline:none;background-color:transparent;background-repeat:no-repeat;color:var(--ion-color-step-600, var(--ion-text-color-step-400, #666666));visibility:hidden;-webkit-appearance:none;-moz-appearance:none;appearance:none}.in-item-color.sc-ion-input-ios-h .input-clear-icon.sc-ion-input-ios{color:inherit}.input-clear-icon.sc-ion-input-ios:focus{opacity:0.5}.has-value.sc-ion-input-ios-h .input-clear-icon.sc-ion-input-ios{visibility:visible}.input-wrapper.sc-ion-input-ios{-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);border-radius:var(--border-radius);display:-ms-flexbox;display:flex;position:relative;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:stretch;align-items:stretch;height:inherit;min-height:inherit;-webkit-transition:background-color 15ms linear;transition:background-color 15ms linear;background:var(--background);line-height:normal}.native-wrapper.sc-ion-input-ios{display:-ms-flexbox;display:flex;position:relative;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;width:100%}.ion-touched.ion-invalid.sc-ion-input-ios-h{--highlight-color:var(--highlight-color-invalid)}.ion-valid.sc-ion-input-ios-h{--highlight-color:var(--highlight-color-valid)}.input-bottom.sc-ion-input-ios{-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:5px;padding-bottom:0;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;border-top:var(--border-width) var(--border-style) var(--border-color);font-size:0.75rem}.has-focus.ion-valid.sc-ion-input-ios-h,.ion-touched.ion-invalid.sc-ion-input-ios-h{--border-color:var(--highlight-color)}.input-bottom.sc-ion-input-ios .error-text.sc-ion-input-ios{display:none;color:var(--highlight-color-invalid)}.input-bottom.sc-ion-input-ios .helper-text.sc-ion-input-ios{display:block;color:var(--ion-color-step-550, var(--ion-text-color-step-450, #737373))}.ion-touched.ion-invalid.sc-ion-input-ios-h .input-bottom.sc-ion-input-ios .error-text.sc-ion-input-ios{display:block}.ion-touched.ion-invalid.sc-ion-input-ios-h .input-bottom.sc-ion-input-ios .helper-text.sc-ion-input-ios{display:none}.input-bottom.sc-ion-input-ios .counter.sc-ion-input-ios{-webkit-margin-start:auto;margin-inline-start:auto;color:var(--ion-color-step-550, var(--ion-text-color-step-450, #737373));white-space:nowrap;-webkit-padding-start:16px;padding-inline-start:16px}.has-focus.sc-ion-input-ios-h input.sc-ion-input-ios{caret-color:var(--highlight-color)}.label-text-wrapper.sc-ion-input-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;max-width:200px;-webkit-transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1), transform 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1), transform 150ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 150ms cubic-bezier(0.4, 0, 0.2, 1);pointer-events:none}.label-text.sc-ion-input-ios,.sc-ion-input-ios-s>[slot=label]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.label-text-wrapper-hidden.sc-ion-input-ios,.input-outline-notch-hidden.sc-ion-input-ios{display:none}.input-wrapper.sc-ion-input-ios input.sc-ion-input-ios{-webkit-transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1)}.input-label-placement-start.sc-ion-input-ios-h .input-wrapper.sc-ion-input-ios{-ms-flex-direction:row;flex-direction:row}.input-label-placement-start.sc-ion-input-ios-h .label-text-wrapper.sc-ion-input-ios{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px;margin-top:0;margin-bottom:0}.input-label-placement-end.sc-ion-input-ios-h .input-wrapper.sc-ion-input-ios{-ms-flex-direction:row-reverse;flex-direction:row-reverse}.input-label-placement-end.sc-ion-input-ios-h .label-text-wrapper.sc-ion-input-ios{-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0;margin-top:0;margin-bottom:0}.input-label-placement-fixed.sc-ion-input-ios-h .label-text-wrapper.sc-ion-input-ios{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px;margin-top:0;margin-bottom:0}.input-label-placement-fixed.sc-ion-input-ios-h .label-text.sc-ion-input-ios{-ms-flex:0 0 100px;flex:0 0 100px;width:100px;min-width:100px;max-width:200px}.input-label-placement-stacked.sc-ion-input-ios-h .input-wrapper.sc-ion-input-ios,.input-label-placement-floating.sc-ion-input-ios-h .input-wrapper.sc-ion-input-ios{-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:start}.input-label-placement-stacked.sc-ion-input-ios-h .label-text-wrapper.sc-ion-input-ios,.input-label-placement-floating.sc-ion-input-ios-h .label-text-wrapper.sc-ion-input-ios{-webkit-transform-origin:left top;transform-origin:left top;max-width:100%;z-index:2}[dir=rtl].sc-ion-input-ios-h -no-combinator.input-label-placement-stacked.sc-ion-input-ios-h .label-text-wrapper.sc-ion-input-ios,[dir=rtl] .sc-ion-input-ios-h -no-combinator.input-label-placement-stacked.sc-ion-input-ios-h .label-text-wrapper.sc-ion-input-ios,[dir=rtl].input-label-placement-stacked.sc-ion-input-ios-h .label-text-wrapper.sc-ion-input-ios,[dir=rtl] .input-label-placement-stacked.sc-ion-input-ios-h .label-text-wrapper.sc-ion-input-ios,[dir=rtl].sc-ion-input-ios-h -no-combinator.input-label-placement-floating.sc-ion-input-ios-h .label-text-wrapper.sc-ion-input-ios,[dir=rtl] .sc-ion-input-ios-h -no-combinator.input-label-placement-floating.sc-ion-input-ios-h .label-text-wrapper.sc-ion-input-ios,[dir=rtl].input-label-placement-floating.sc-ion-input-ios-h .label-text-wrapper.sc-ion-input-ios,[dir=rtl] .input-label-placement-floating.sc-ion-input-ios-h .label-text-wrapper.sc-ion-input-ios{-webkit-transform-origin:right top;transform-origin:right top}@supports selector(:dir(rtl)){.input-label-placement-stacked.sc-ion-input-ios-h:dir(rtl) .label-text-wrapper.sc-ion-input-ios,.input-label-placement-floating.sc-ion-input-ios-h:dir(rtl) .label-text-wrapper.sc-ion-input-ios{-webkit-transform-origin:right top;transform-origin:right top}}.input-label-placement-stacked.sc-ion-input-ios-h input.sc-ion-input-ios,.input-label-placement-floating.sc-ion-input-ios-h input.sc-ion-input-ios{margin-left:0;margin-right:0;margin-top:1px;margin-bottom:0}.input-label-placement-floating.sc-ion-input-ios-h .label-text-wrapper.sc-ion-input-ios{-webkit-transform:translateY(100%) scale(1);transform:translateY(100%) scale(1)}.input-label-placement-floating.sc-ion-input-ios-h input.sc-ion-input-ios{opacity:0}.has-focus.input-label-placement-floating.sc-ion-input-ios-h input.sc-ion-input-ios,.has-value.input-label-placement-floating.sc-ion-input-ios-h input.sc-ion-input-ios{opacity:1}.label-floating.sc-ion-input-ios-h .label-text-wrapper.sc-ion-input-ios{-webkit-transform:translateY(50%) scale(0.75);transform:translateY(50%) scale(0.75);max-width:calc(100% / 0.75)}.sc-ion-input-ios-s>[slot=start]:last-of-type{-webkit-margin-end:16px;margin-inline-end:16px;-webkit-margin-start:0;margin-inline-start:0}.sc-ion-input-ios-s>[slot=end]:first-of-type{-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0}.sc-ion-input-ios-h[disabled].sc-ion-input-ios-s>ion-input-password-toggle,.sc-ion-input-ios-h[disabled] .sc-ion-input-ios-s>ion-input-password-toggle,.sc-ion-input-ios-h[readonly].sc-ion-input-ios-s>ion-input-password-toggle,.sc-ion-input-ios-h[readonly] .sc-ion-input-ios-s>ion-input-password-toggle{display:none}.sc-ion-input-ios-h{--border-width:0.55px;--border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-250, var(--ion-background-color-step-250, #c8c7cc))));--highlight-height:0px;font-size:inherit}.input-clear-icon.sc-ion-input-ios ion-icon.sc-ion-input-ios{width:18px;height:18px}.input-disabled.sc-ion-input-ios-h{opacity:0.3}.sc-ion-input-ios-s>ion-button[slot=start].button-has-icon-only,.sc-ion-input-ios-s>ion-button[slot=end].button-has-icon-only{--border-radius:50%;--padding-start:0;--padding-end:0;--padding-top:0;--padding-bottom:0;aspect-ratio:1}";var IonInputIosStyle0=inputIosCss;var inputMdCss=".sc-ion-input-md-h{--placeholder-color:initial;--placeholder-font-style:initial;--placeholder-font-weight:initial;--placeholder-opacity:var(--ion-placeholder-opacity, 0.6);--padding-top:0px;--padding-end:0px;--padding-bottom:0px;--padding-start:0px;--background:transparent;--color:initial;--border-style:solid;--highlight-color-focused:var(--ion-color-primary, #0054e9);--highlight-color-valid:var(--ion-color-success, #2dd55b);--highlight-color-invalid:var(--ion-color-danger, #c5000f);--highlight-color:var(--highlight-color-focused);display:block;position:relative;width:100%;min-height:44px;padding:0 !important;color:var(--color);font-family:var(--ion-font-family, inherit);z-index:2}ion-item[slot=start].sc-ion-input-md-h,ion-item [slot=start].sc-ion-input-md-h,ion-item[slot=end].sc-ion-input-md-h,ion-item [slot=end].sc-ion-input-md-h{width:auto}.ion-color.sc-ion-input-md-h{--highlight-color-focused:var(--ion-color-base)}.input-label-placement-floating.sc-ion-input-md-h,.input-label-placement-stacked.sc-ion-input-md-h{min-height:56px}.native-input.sc-ion-input-md{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;display:inline-block;position:relative;-ms-flex:1;flex:1;width:100%;max-width:100%;max-height:100%;border:0;outline:none;background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;z-index:1}.native-input.sc-ion-input-md::-webkit-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-input.sc-ion-input-md::-moz-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-input.sc-ion-input-md:-ms-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-input.sc-ion-input-md::-ms-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-input.sc-ion-input-md::placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-input.sc-ion-input-md:-webkit-autofill{background-color:transparent}.native-input.sc-ion-input-md:invalid{-webkit-box-shadow:none;box-shadow:none}.native-input.sc-ion-input-md::-ms-clear{display:none}.cloned-input.sc-ion-input-md{top:0;bottom:0;position:absolute;pointer-events:none}.cloned-input.sc-ion-input-md{inset-inline-start:0}.cloned-input.sc-ion-input-md:disabled{opacity:1}.input-clear-icon.sc-ion-input-md{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:auto;margin-bottom:auto;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;background-position:center;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:30px;height:30px;border:0;outline:none;background-color:transparent;background-repeat:no-repeat;color:var(--ion-color-step-600, var(--ion-text-color-step-400, #666666));visibility:hidden;-webkit-appearance:none;-moz-appearance:none;appearance:none}.in-item-color.sc-ion-input-md-h .input-clear-icon.sc-ion-input-md{color:inherit}.input-clear-icon.sc-ion-input-md:focus{opacity:0.5}.has-value.sc-ion-input-md-h .input-clear-icon.sc-ion-input-md{visibility:visible}.input-wrapper.sc-ion-input-md{-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);border-radius:var(--border-radius);display:-ms-flexbox;display:flex;position:relative;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:stretch;align-items:stretch;height:inherit;min-height:inherit;-webkit-transition:background-color 15ms linear;transition:background-color 15ms linear;background:var(--background);line-height:normal}.native-wrapper.sc-ion-input-md{display:-ms-flexbox;display:flex;position:relative;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;width:100%}.ion-touched.ion-invalid.sc-ion-input-md-h{--highlight-color:var(--highlight-color-invalid)}.ion-valid.sc-ion-input-md-h{--highlight-color:var(--highlight-color-valid)}.input-bottom.sc-ion-input-md{-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:5px;padding-bottom:0;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;border-top:var(--border-width) var(--border-style) var(--border-color);font-size:0.75rem}.has-focus.ion-valid.sc-ion-input-md-h,.ion-touched.ion-invalid.sc-ion-input-md-h{--border-color:var(--highlight-color)}.input-bottom.sc-ion-input-md .error-text.sc-ion-input-md{display:none;color:var(--highlight-color-invalid)}.input-bottom.sc-ion-input-md .helper-text.sc-ion-input-md{display:block;color:var(--ion-color-step-550, var(--ion-text-color-step-450, #737373))}.ion-touched.ion-invalid.sc-ion-input-md-h .input-bottom.sc-ion-input-md .error-text.sc-ion-input-md{display:block}.ion-touched.ion-invalid.sc-ion-input-md-h .input-bottom.sc-ion-input-md .helper-text.sc-ion-input-md{display:none}.input-bottom.sc-ion-input-md .counter.sc-ion-input-md{-webkit-margin-start:auto;margin-inline-start:auto;color:var(--ion-color-step-550, var(--ion-text-color-step-450, #737373));white-space:nowrap;-webkit-padding-start:16px;padding-inline-start:16px}.has-focus.sc-ion-input-md-h input.sc-ion-input-md{caret-color:var(--highlight-color)}.label-text-wrapper.sc-ion-input-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;max-width:200px;-webkit-transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1), transform 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1), transform 150ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 150ms cubic-bezier(0.4, 0, 0.2, 1);pointer-events:none}.label-text.sc-ion-input-md,.sc-ion-input-md-s>[slot=label]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.label-text-wrapper-hidden.sc-ion-input-md,.input-outline-notch-hidden.sc-ion-input-md{display:none}.input-wrapper.sc-ion-input-md input.sc-ion-input-md{-webkit-transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1)}.input-label-placement-start.sc-ion-input-md-h .input-wrapper.sc-ion-input-md{-ms-flex-direction:row;flex-direction:row}.input-label-placement-start.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px;margin-top:0;margin-bottom:0}.input-label-placement-end.sc-ion-input-md-h .input-wrapper.sc-ion-input-md{-ms-flex-direction:row-reverse;flex-direction:row-reverse}.input-label-placement-end.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md{-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0;margin-top:0;margin-bottom:0}.input-label-placement-fixed.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px;margin-top:0;margin-bottom:0}.input-label-placement-fixed.sc-ion-input-md-h .label-text.sc-ion-input-md{-ms-flex:0 0 100px;flex:0 0 100px;width:100px;min-width:100px;max-width:200px}.input-label-placement-stacked.sc-ion-input-md-h .input-wrapper.sc-ion-input-md,.input-label-placement-floating.sc-ion-input-md-h .input-wrapper.sc-ion-input-md{-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:start}.input-label-placement-stacked.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md,.input-label-placement-floating.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md{-webkit-transform-origin:left top;transform-origin:left top;max-width:100%;z-index:2}[dir=rtl].sc-ion-input-md-h -no-combinator.input-label-placement-stacked.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md,[dir=rtl] .sc-ion-input-md-h -no-combinator.input-label-placement-stacked.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md,[dir=rtl].input-label-placement-stacked.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md,[dir=rtl] .input-label-placement-stacked.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md,[dir=rtl].sc-ion-input-md-h -no-combinator.input-label-placement-floating.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md,[dir=rtl] .sc-ion-input-md-h -no-combinator.input-label-placement-floating.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md,[dir=rtl].input-label-placement-floating.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md,[dir=rtl] .input-label-placement-floating.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md{-webkit-transform-origin:right top;transform-origin:right top}@supports selector(:dir(rtl)){.input-label-placement-stacked.sc-ion-input-md-h:dir(rtl) .label-text-wrapper.sc-ion-input-md,.input-label-placement-floating.sc-ion-input-md-h:dir(rtl) .label-text-wrapper.sc-ion-input-md{-webkit-transform-origin:right top;transform-origin:right top}}.input-label-placement-stacked.sc-ion-input-md-h input.sc-ion-input-md,.input-label-placement-floating.sc-ion-input-md-h input.sc-ion-input-md{margin-left:0;margin-right:0;margin-top:1px;margin-bottom:0}.input-label-placement-floating.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md{-webkit-transform:translateY(100%) scale(1);transform:translateY(100%) scale(1)}.input-label-placement-floating.sc-ion-input-md-h input.sc-ion-input-md{opacity:0}.has-focus.input-label-placement-floating.sc-ion-input-md-h input.sc-ion-input-md,.has-value.input-label-placement-floating.sc-ion-input-md-h input.sc-ion-input-md{opacity:1}.label-floating.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md{-webkit-transform:translateY(50%) scale(0.75);transform:translateY(50%) scale(0.75);max-width:calc(100% / 0.75)}.sc-ion-input-md-s>[slot=start]:last-of-type{-webkit-margin-end:16px;margin-inline-end:16px;-webkit-margin-start:0;margin-inline-start:0}.sc-ion-input-md-s>[slot=end]:first-of-type{-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0}.sc-ion-input-md-h[disabled].sc-ion-input-md-s>ion-input-password-toggle,.sc-ion-input-md-h[disabled] .sc-ion-input-md-s>ion-input-password-toggle,.sc-ion-input-md-h[readonly].sc-ion-input-md-s>ion-input-password-toggle,.sc-ion-input-md-h[readonly] .sc-ion-input-md-s>ion-input-password-toggle{display:none}.input-fill-solid.sc-ion-input-md-h{--background:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2));--border-color:var(--ion-color-step-500, var(--ion-background-color-step-500, gray));--border-radius:4px;--padding-start:16px;--padding-end:16px;min-height:56px}.input-fill-solid.sc-ion-input-md-h .input-wrapper.sc-ion-input-md{border-bottom:var(--border-width) var(--border-style) var(--border-color)}.has-focus.input-fill-solid.ion-valid.sc-ion-input-md-h,.input-fill-solid.ion-touched.ion-invalid.sc-ion-input-md-h{--border-color:var(--highlight-color)}.input-fill-solid.sc-ion-input-md-h .input-bottom.sc-ion-input-md{border-top:none}@media (any-hover: hover){.input-fill-solid.sc-ion-input-md-h:hover{--background:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6));--border-color:var(--ion-color-step-750, var(--ion-background-color-step-750, #404040))}}.input-fill-solid.has-focus.sc-ion-input-md-h{--background:var(--ion-color-step-150, var(--ion-background-color-step-150, #d9d9d9));--border-color:var(--ion-color-step-750, var(--ion-background-color-step-750, #404040))}.input-fill-solid.sc-ion-input-md-h .input-wrapper.sc-ion-input-md{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0px;border-end-start-radius:0px}.label-floating.input-fill-solid.input-label-placement-floating.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md{max-width:calc(100% / 0.75)}.input-fill-outline.sc-ion-input-md-h{--border-color:var(--ion-color-step-300, var(--ion-background-color-step-300, #b3b3b3));--border-radius:4px;--padding-start:16px;--padding-end:16px;min-height:56px}.input-fill-outline.input-shape-round.sc-ion-input-md-h{--border-radius:28px;--padding-start:32px;--padding-end:32px}.has-focus.input-fill-outline.ion-valid.sc-ion-input-md-h,.input-fill-outline.ion-touched.ion-invalid.sc-ion-input-md-h{--border-color:var(--highlight-color)}@media (any-hover: hover){.input-fill-outline.sc-ion-input-md-h:hover{--border-color:var(--ion-color-step-750, var(--ion-background-color-step-750, #404040))}}.input-fill-outline.has-focus.sc-ion-input-md-h{--border-width:var(--highlight-height);--border-color:var(--highlight-color)}.input-fill-outline.sc-ion-input-md-h .input-bottom.sc-ion-input-md{border-top:none}.input-fill-outline.sc-ion-input-md-h .input-wrapper.sc-ion-input-md{border-bottom:none}.input-fill-outline.input-label-placement-stacked.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md,.input-fill-outline.input-label-placement-floating.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md{-webkit-transform-origin:left top;transform-origin:left top;position:absolute;max-width:calc(100% - var(--padding-start) - var(--padding-end))}[dir=rtl].sc-ion-input-md-h -no-combinator.input-fill-outline.input-label-placement-stacked.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md,[dir=rtl] .sc-ion-input-md-h -no-combinator.input-fill-outline.input-label-placement-stacked.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md,[dir=rtl].input-fill-outline.input-label-placement-stacked.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md,[dir=rtl] .input-fill-outline.input-label-placement-stacked.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md,[dir=rtl].sc-ion-input-md-h -no-combinator.input-fill-outline.input-label-placement-floating.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md,[dir=rtl] .sc-ion-input-md-h -no-combinator.input-fill-outline.input-label-placement-floating.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md,[dir=rtl].input-fill-outline.input-label-placement-floating.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md,[dir=rtl] .input-fill-outline.input-label-placement-floating.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md{-webkit-transform-origin:right top;transform-origin:right top}@supports selector(:dir(rtl)){.input-fill-outline.input-label-placement-stacked.sc-ion-input-md-h:dir(rtl) .label-text-wrapper.sc-ion-input-md,.input-fill-outline.input-label-placement-floating.sc-ion-input-md-h:dir(rtl) .label-text-wrapper.sc-ion-input-md{-webkit-transform-origin:right top;transform-origin:right top}}.input-fill-outline.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md{position:relative}.label-floating.input-fill-outline.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md{-webkit-transform:translateY(-32%) scale(0.75);transform:translateY(-32%) scale(0.75);margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;max-width:calc((100% - var(--padding-start) - var(--padding-end) - 8px) / 0.75)}.input-fill-outline.input-label-placement-stacked.sc-ion-input-md-h input.sc-ion-input-md,.input-fill-outline.input-label-placement-floating.sc-ion-input-md-h input.sc-ion-input-md{margin-left:0;margin-right:0;margin-top:6px;margin-bottom:6px}.input-fill-outline.sc-ion-input-md-h .input-outline-container.sc-ion-input-md{left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;width:100%;height:100%}.input-fill-outline.sc-ion-input-md-h .input-outline-start.sc-ion-input-md,.input-fill-outline.sc-ion-input-md-h .input-outline-end.sc-ion-input-md{pointer-events:none}.input-fill-outline.sc-ion-input-md-h .input-outline-start.sc-ion-input-md,.input-fill-outline.sc-ion-input-md-h .input-outline-notch.sc-ion-input-md,.input-fill-outline.sc-ion-input-md-h .input-outline-end.sc-ion-input-md{border-top:var(--border-width) var(--border-style) var(--border-color);border-bottom:var(--border-width) var(--border-style) var(--border-color)}.input-fill-outline.sc-ion-input-md-h .input-outline-notch.sc-ion-input-md{max-width:calc(100% - var(--padding-start) - var(--padding-end))}.input-fill-outline.sc-ion-input-md-h .notch-spacer.sc-ion-input-md{-webkit-padding-end:8px;padding-inline-end:8px;font-size:calc(1em * 0.75);opacity:0;pointer-events:none;-webkit-box-sizing:content-box;box-sizing:content-box}.input-fill-outline.sc-ion-input-md-h .input-outline-start.sc-ion-input-md{border-start-start-radius:var(--border-radius);border-start-end-radius:0px;border-end-end-radius:0px;border-end-start-radius:var(--border-radius);-webkit-border-start:var(--border-width) var(--border-style) var(--border-color);border-inline-start:var(--border-width) var(--border-style) var(--border-color);width:calc(var(--padding-start) - 4px)}.input-fill-outline.sc-ion-input-md-h .input-outline-end.sc-ion-input-md{-webkit-border-end:var(--border-width) var(--border-style) var(--border-color);border-inline-end:var(--border-width) var(--border-style) var(--border-color);border-start-start-radius:0px;border-start-end-radius:var(--border-radius);border-end-end-radius:var(--border-radius);border-end-start-radius:0px;-ms-flex-positive:1;flex-grow:1}.label-floating.input-fill-outline.sc-ion-input-md-h .input-outline-notch.sc-ion-input-md{border-top:none}.sc-ion-input-md-h{--border-width:1px;--border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-150, var(--ion-background-color-step-150, rgba(0, 0, 0, 0.13)))));--highlight-height:2px;font-size:inherit}.input-clear-icon.sc-ion-input-md ion-icon.sc-ion-input-md{width:22px;height:22px}.input-disabled.sc-ion-input-md-h{opacity:0.38}.has-focus.ion-valid.sc-ion-input-md-h,.ion-touched.ion-invalid.sc-ion-input-md-h{--border-color:var(--highlight-color)}.input-bottom.sc-ion-input-md .counter.sc-ion-input-md{letter-spacing:0.0333333333em}.input-label-placement-floating.has-focus.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md,.input-label-placement-stacked.has-focus.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md{color:var(--highlight-color)}.has-focus.input-label-placement-floating.ion-valid.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md,.input-label-placement-floating.ion-touched.ion-invalid.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md,.has-focus.input-label-placement-stacked.ion-valid.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md,.input-label-placement-stacked.ion-touched.ion-invalid.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md{color:var(--highlight-color)}.input-highlight.sc-ion-input-md{bottom:-1px;position:absolute;width:100%;height:var(--highlight-height);-webkit-transform:scale(0);transform:scale(0);-webkit-transition:-webkit-transform 200ms;transition:-webkit-transform 200ms;transition:transform 200ms;transition:transform 200ms, -webkit-transform 200ms;background:var(--highlight-color)}.input-highlight.sc-ion-input-md{inset-inline-start:0}.has-focus.sc-ion-input-md-h .input-highlight.sc-ion-input-md{-webkit-transform:scale(1);transform:scale(1)}.in-item.sc-ion-input-md-h .input-highlight.sc-ion-input-md{bottom:0}.in-item.sc-ion-input-md-h .input-highlight.sc-ion-input-md{inset-inline-start:0}.input-shape-round.sc-ion-input-md-h{--border-radius:16px}.sc-ion-input-md-s>ion-button[slot=start].button-has-icon-only,.sc-ion-input-md-s>ion-button[slot=end].button-has-icon-only{--border-radius:50%;--padding-start:8px;--padding-end:8px;--padding-top:8px;--padding-bottom:8px;aspect-ratio:1;min-height:40px}";var IonInputMdStyle0=inputMdCss;var Input=function(){function i(i){var t=this;registerInstance(this,i);this.ionInput=createEvent(this,"ionInput",7);this.ionChange=createEvent(this,"ionChange",7);this.ionBlur=createEvent(this,"ionBlur",7);this.ionFocus=createEvent(this,"ionFocus",7);this.inputId="ion-input-".concat(inputIds++);this.inheritedAttributes={};this.isComposing=false;this.didInputClearOnEdit=false;this.onInput=function(i){var n=i.target;if(n){t.value=n.value||""}t.emitInputChange(i)};this.onChange=function(i){t.emitValueChange(i)};this.onBlur=function(i){t.hasFocus=false;if(t.focusedValue!==t.value){t.emitValueChange(i)}t.didInputClearOnEdit=false;t.ionBlur.emit(i)};this.onFocus=function(i){t.hasFocus=true;t.focusedValue=t.value;t.ionFocus.emit(i)};this.onKeydown=function(i){t.checkClearOnEdit(i)};this.onCompositionStart=function(){t.isComposing=true};this.onCompositionEnd=function(){t.isComposing=false};this.clearTextInput=function(i){if(t.clearInput&&!t.readonly&&!t.disabled&&i){i.preventDefault();i.stopPropagation();t.setFocus()}t.value="";t.emitInputChange(i)};this.hasFocus=false;this.color=undefined;this.autocapitalize="off";this.autocomplete="off";this.autocorrect="off";this.autofocus=false;this.clearInput=false;this.clearInputIcon=undefined;this.clearOnEdit=undefined;this.counter=false;this.counterFormatter=undefined;this.debounce=undefined;this.disabled=false;this.enterkeyhint=undefined;this.errorText=undefined;this.fill=undefined;this.inputmode=undefined;this.helperText=undefined;this.label=undefined;this.labelPlacement="start";this.max=undefined;this.maxlength=undefined;this.min=undefined;this.minlength=undefined;this.multiple=undefined;this.name=this.inputId;this.pattern=undefined;this.placeholder=undefined;this.readonly=false;this.required=false;this.shape=undefined;this.spellcheck=false;this.step=undefined;this.type="text";this.value=""}i.prototype.debounceChanged=function(){var i=this,t=i.ionInput,n=i.debounce,o=i.originalIonInput;this.ionInput=n===undefined?o!==null&&o!==void 0?o:t:debounceEvent(t,n)};i.prototype.onTypeChange=function(){var i=this.el.querySelector("ion-input-password-toggle");if(i){i.type=this.type}};i.prototype.valueChanged=function(){var i=this.nativeInput;var t=this.getValue();if(i&&i.value!==t&&!this.isComposing){i.value=t}};i.prototype.componentWillLoad=function(){this.inheritedAttributes=Object.assign(Object.assign({},inheritAriaAttributes(this.el)),inheritAttributes(this.el,["tabindex","title","data-form-type"]))};i.prototype.connectedCallback=function(){var i=this;var t=this.el;this.slotMutationController=createSlotMutationController(t,["label","start","end"],(function(){return forceUpdate(i)}));this.notchController=createNotchController(t,(function(){return i.notchSpacerEl}),(function(){return i.labelSlot}));this.debounceChanged();{document.dispatchEvent(new CustomEvent("ionInputDidLoad",{detail:this.el}))}};i.prototype.componentDidLoad=function(){this.originalIonInput=this.ionInput;this.onTypeChange();this.debounceChanged()};i.prototype.componentDidRender=function(){var i;(i=this.notchController)===null||i===void 0?void 0:i.calculateNotchWidth()};i.prototype.disconnectedCallback=function(){{document.dispatchEvent(new CustomEvent("ionInputDidUnload",{detail:this.el}))}if(this.slotMutationController){this.slotMutationController.destroy();this.slotMutationController=undefined}if(this.notchController){this.notchController.destroy();this.notchController=undefined}};i.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){if(this.nativeInput){this.nativeInput.focus()}return[2]}))}))};i.prototype.getInputElement=function(){return __awaiter(this,void 0,void 0,(function(){var i=this;return __generator(this,(function(t){switch(t.label){case 0:if(!!this.nativeInput)return[3,2];return[4,new Promise((function(t){return componentOnReady(i.el,t)}))];case 1:t.sent();t.label=2;case 2:return[2,Promise.resolve(this.nativeInput)]}}))}))};i.prototype.emitValueChange=function(i){var t=this.value;var n=t==null?t:t.toString();this.focusedValue=n;this.ionChange.emit({value:n,event:i})};i.prototype.emitInputChange=function(i){var t=this.value;var n=t==null?t:t.toString();this.ionInput.emit({value:n,event:i})};i.prototype.shouldClearOnEdit=function(){var i=this,t=i.type,n=i.clearOnEdit;return n===undefined?t==="password":n};i.prototype.getValue=function(){return typeof this.value==="number"?this.value.toString():(this.value||"").toString()};i.prototype.checkClearOnEdit=function(i){if(!this.shouldClearOnEdit()){return}var t=["Enter","Tab","Shift","Meta","Alt","Control"];var n=t.includes(i.key);if(!this.didInputClearOnEdit&&this.hasValue()&&!n){this.value="";this.emitInputChange(i)}if(!n){this.didInputClearOnEdit=true}};i.prototype.hasValue=function(){return this.getValue().length>0};i.prototype.renderHintText=function(){var i=this,t=i.helperText,n=i.errorText;return[h("div",{class:"helper-text"},t),h("div",{class:"error-text"},n)]};i.prototype.renderCounter=function(){var i=this,t=i.counter,n=i.maxlength,o=i.counterFormatter,e=i.value;if(t!==true||n===undefined){return}return h("div",{class:"counter"},getCounterText(e,n,o))};i.prototype.renderBottomContent=function(){var i=this,t=i.counter,n=i.helperText,o=i.errorText,e=i.maxlength;var r=!!n||!!o;var a=t===true&&e!==undefined;if(!r&&!a){return}return h("div",{class:"input-bottom"},this.renderHintText(),this.renderCounter())};i.prototype.renderLabel=function(){var i=this.label;return h("div",{class:{"label-text-wrapper":true,"label-text-wrapper-hidden":!this.hasLabel}},i===undefined?h("slot",{name:"label"}):h("div",{class:"label-text"},i))};Object.defineProperty(i.prototype,"labelSlot",{get:function(){return this.el.querySelector('[slot="label"]')},enumerable:false,configurable:true});Object.defineProperty(i.prototype,"hasLabel",{get:function(){return this.label!==undefined||this.labelSlot!==null},enumerable:false,configurable:true});i.prototype.renderLabelContainer=function(){var i=this;var t=getIonMode(this);var n=t==="md"&&this.fill==="outline";if(n){return[h("div",{class:"input-outline-container"},h("div",{class:"input-outline-start"}),h("div",{class:{"input-outline-notch":true,"input-outline-notch-hidden":!this.hasLabel}},h("div",{class:"notch-spacer","aria-hidden":"true",ref:function(t){return i.notchSpacerEl=t}},this.label)),h("div",{class:"input-outline-end"})),this.renderLabel()]}return this.renderLabel()};i.prototype.render=function(){var i;var t=this;var n=this,o=n.disabled,e=n.fill,r=n.readonly,a=n.shape,l=n.inputId,s=n.labelPlacement,p=n.el,d=n.hasFocus,c=n.clearInputIcon;var u=getIonMode(this);var m=this.getValue();var b=hostContext("ion-item",this.el);var g=u==="md"&&e!=="outline"&&!b;var f=u==="ios"?closeCircle:closeSharp;var v=c!==null&&c!==void 0?c:f;var x=this.hasValue();var w=p.querySelector('[slot="start"], [slot="end"]')!==null;var y=s==="stacked"||s==="floating"&&(x||d||w);return h(Host,{key:"907ce98a82b5cfae5a08504cd79e00a2330b7444",class:createColorClasses(this.color,(i={},i[u]=true,i["has-value"]=x,i["has-focus"]=d,i["label-floating"]=y,i["input-fill-".concat(e)]=e!==undefined,i["input-shape-".concat(a)]=a!==undefined,i["input-label-placement-".concat(s)]=true,i["in-item"]=b,i["in-item-color"]=hostContext("ion-item.ion-color",this.el),i["input-disabled"]=o,i))},h("label",{key:"59d5bb45d2a5b828bba0ed8687a632a551e2f4d8",class:"input-wrapper",htmlFor:l},this.renderLabelContainer(),h("div",{key:"f93f129d08246d0e9a601c100d718534d6403853",class:"native-wrapper"},h("slot",{key:"54eeb1a6bace662b7eb0d7e27180ea3d7e3a3729",name:"start"}),h("input",Object.assign({key:"b3e0be55bc1a4a539ae3b0fdcf7fc078723cca16",class:"native-input",ref:function(i){return t.nativeInput=i},id:l,disabled:o,autoCapitalize:this.autocapitalize,autoComplete:this.autocomplete,autoCorrect:this.autocorrect,autoFocus:this.autofocus,enterKeyHint:this.enterkeyhint,inputMode:this.inputmode,min:this.min,max:this.max,minLength:this.minlength,maxLength:this.maxlength,multiple:this.multiple,name:this.name,pattern:this.pattern,placeholder:this.placeholder||"",readOnly:r,required:this.required,spellcheck:this.spellcheck,step:this.step,type:this.type,value:m,onInput:this.onInput,onChange:this.onChange,onBlur:this.onBlur,onFocus:this.onFocus,onKeyDown:this.onKeydown,onCompositionstart:this.onCompositionStart,onCompositionend:this.onCompositionEnd},this.inheritedAttributes)),this.clearInput&&!r&&!o&&h("button",{key:"5f6373504a6d0d074bfbf875c794d45ea2748175","aria-label":"reset",type:"button",class:"input-clear-icon",onPointerDown:function(i){i.preventDefault()},onFocusin:function(i){i.stopPropagation()},onClick:this.clearTextInput},h("ion-icon",{key:"230d77973aa83458ceb32bf52e3abe9bc322cfe6","aria-hidden":"true",icon:v})),h("slot",{key:"9d69ac6e8a3c4b2b303dba2478f82695d5755ed2",name:"end"})),g&&h("div",{key:"ac61f16237ce731e0745ab72d0fc3f066252464a",class:"input-highlight"})),this.renderBottomContent())};Object.defineProperty(i.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(i,"watchers",{get:function(){return{debounce:["debounceChanged"],type:["onTypeChange"],value:["valueChanged"]}},enumerable:false,configurable:true});return i}();var inputIds=0;Input.style={ios:IonInputIosStyle0,md:IonInputMdStyle0};export{Input as ion_input};
|
|
4
|
+
*/import{r as registerInstance,d as createEvent,h,f as Host,i as getElement,j as forceUpdate}from"./index-28849c61.js";import{c as createNotchController}from"./notch-controller-55b09e11.js";import{e as debounceEvent,i as inheritAriaAttributes,h as inheritAttributes,c as componentOnReady}from"./helpers-da915de8.js";import{c as createSlotMutationController,g as getCounterText}from"./input.utils-09c71bc7.js";import{h as hostContext,c as createColorClasses}from"./theme-01f3f29c.js";import{b as closeCircle,d as closeSharp}from"./index-e2cf2ceb.js";import{b as getIonMode}from"./ionic-global-c81d82ab.js";import"./index-a5d50daf.js";import"./index-9b0d46f4.js";var inputIosCss=".sc-ion-input-ios-h{--placeholder-color:initial;--placeholder-font-style:initial;--placeholder-font-weight:initial;--placeholder-opacity:var(--ion-placeholder-opacity, 0.6);--padding-top:0px;--padding-end:0px;--padding-bottom:0px;--padding-start:0px;--background:transparent;--color:initial;--border-style:solid;--highlight-color-focused:var(--ion-color-primary, #0054e9);--highlight-color-valid:var(--ion-color-success, #2dd55b);--highlight-color-invalid:var(--ion-color-danger, #c5000f);--highlight-color:var(--highlight-color-focused);display:block;position:relative;width:100%;min-height:44px;padding:0 !important;color:var(--color);font-family:var(--ion-font-family, inherit);z-index:2}ion-item[slot=start].sc-ion-input-ios-h,ion-item [slot=start].sc-ion-input-ios-h,ion-item[slot=end].sc-ion-input-ios-h,ion-item [slot=end].sc-ion-input-ios-h{width:auto}.ion-color.sc-ion-input-ios-h{--highlight-color-focused:var(--ion-color-base)}.input-label-placement-floating.sc-ion-input-ios-h,.input-label-placement-stacked.sc-ion-input-ios-h{min-height:56px}.native-input.sc-ion-input-ios{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;display:inline-block;position:relative;-ms-flex:1;flex:1;width:100%;max-width:100%;max-height:100%;border:0;outline:none;background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;z-index:1}.native-input.sc-ion-input-ios::-webkit-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-input.sc-ion-input-ios::-moz-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-input.sc-ion-input-ios:-ms-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-input.sc-ion-input-ios::-ms-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-input.sc-ion-input-ios::placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-input.sc-ion-input-ios:-webkit-autofill{background-color:transparent}.native-input.sc-ion-input-ios:invalid{-webkit-box-shadow:none;box-shadow:none}.native-input.sc-ion-input-ios::-ms-clear{display:none}.cloned-input.sc-ion-input-ios{top:0;bottom:0;position:absolute;pointer-events:none}.cloned-input.sc-ion-input-ios{inset-inline-start:0}.cloned-input.sc-ion-input-ios:disabled{opacity:1}.input-clear-icon.sc-ion-input-ios{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:auto;margin-bottom:auto;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;background-position:center;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:30px;height:30px;border:0;outline:none;background-color:transparent;background-repeat:no-repeat;color:var(--ion-color-step-600, var(--ion-text-color-step-400, #666666));visibility:hidden;-webkit-appearance:none;-moz-appearance:none;appearance:none}.in-item-color.sc-ion-input-ios-h .input-clear-icon.sc-ion-input-ios{color:inherit}.input-clear-icon.sc-ion-input-ios:focus{opacity:0.5}.has-value.sc-ion-input-ios-h .input-clear-icon.sc-ion-input-ios{visibility:visible}.input-wrapper.sc-ion-input-ios{-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);border-radius:var(--border-radius);display:-ms-flexbox;display:flex;position:relative;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:stretch;align-items:stretch;height:inherit;min-height:inherit;-webkit-transition:background-color 15ms linear;transition:background-color 15ms linear;background:var(--background);line-height:normal}.native-wrapper.sc-ion-input-ios{display:-ms-flexbox;display:flex;position:relative;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;width:100%}.ion-touched.ion-invalid.sc-ion-input-ios-h{--highlight-color:var(--highlight-color-invalid)}.ion-valid.sc-ion-input-ios-h{--highlight-color:var(--highlight-color-valid)}.input-bottom.sc-ion-input-ios{-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:5px;padding-bottom:0;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;border-top:var(--border-width) var(--border-style) var(--border-color);font-size:0.75rem}.has-focus.ion-valid.sc-ion-input-ios-h,.ion-touched.ion-invalid.sc-ion-input-ios-h{--border-color:var(--highlight-color)}.input-bottom.sc-ion-input-ios .error-text.sc-ion-input-ios{display:none;color:var(--highlight-color-invalid)}.input-bottom.sc-ion-input-ios .helper-text.sc-ion-input-ios{display:block;color:var(--ion-color-step-550, var(--ion-text-color-step-450, #737373))}.ion-touched.ion-invalid.sc-ion-input-ios-h .input-bottom.sc-ion-input-ios .error-text.sc-ion-input-ios{display:block}.ion-touched.ion-invalid.sc-ion-input-ios-h .input-bottom.sc-ion-input-ios .helper-text.sc-ion-input-ios{display:none}.input-bottom.sc-ion-input-ios .counter.sc-ion-input-ios{-webkit-margin-start:auto;margin-inline-start:auto;color:var(--ion-color-step-550, var(--ion-text-color-step-450, #737373));white-space:nowrap;-webkit-padding-start:16px;padding-inline-start:16px}.has-focus.sc-ion-input-ios-h input.sc-ion-input-ios{caret-color:var(--highlight-color)}.label-text-wrapper.sc-ion-input-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;max-width:200px;-webkit-transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1), transform 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1), transform 150ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 150ms cubic-bezier(0.4, 0, 0.2, 1);pointer-events:none}.label-text.sc-ion-input-ios,.sc-ion-input-ios-s>[slot=label]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.label-text-wrapper-hidden.sc-ion-input-ios,.input-outline-notch-hidden.sc-ion-input-ios{display:none}.input-wrapper.sc-ion-input-ios input.sc-ion-input-ios{-webkit-transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1)}.input-label-placement-start.sc-ion-input-ios-h .input-wrapper.sc-ion-input-ios{-ms-flex-direction:row;flex-direction:row}.input-label-placement-start.sc-ion-input-ios-h .label-text-wrapper.sc-ion-input-ios{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px;margin-top:0;margin-bottom:0}.input-label-placement-end.sc-ion-input-ios-h .input-wrapper.sc-ion-input-ios{-ms-flex-direction:row-reverse;flex-direction:row-reverse}.input-label-placement-end.sc-ion-input-ios-h .label-text-wrapper.sc-ion-input-ios{-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0;margin-top:0;margin-bottom:0}.input-label-placement-fixed.sc-ion-input-ios-h .label-text-wrapper.sc-ion-input-ios{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px;margin-top:0;margin-bottom:0}.input-label-placement-fixed.sc-ion-input-ios-h .label-text.sc-ion-input-ios{-ms-flex:0 0 100px;flex:0 0 100px;width:100px;min-width:100px;max-width:200px}.input-label-placement-stacked.sc-ion-input-ios-h .input-wrapper.sc-ion-input-ios,.input-label-placement-floating.sc-ion-input-ios-h .input-wrapper.sc-ion-input-ios{-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:start}.input-label-placement-stacked.sc-ion-input-ios-h .label-text-wrapper.sc-ion-input-ios,.input-label-placement-floating.sc-ion-input-ios-h .label-text-wrapper.sc-ion-input-ios{-webkit-transform-origin:left top;transform-origin:left top;max-width:100%;z-index:2}[dir=rtl].sc-ion-input-ios-h -no-combinator.input-label-placement-stacked.sc-ion-input-ios-h .label-text-wrapper.sc-ion-input-ios,[dir=rtl] .sc-ion-input-ios-h -no-combinator.input-label-placement-stacked.sc-ion-input-ios-h .label-text-wrapper.sc-ion-input-ios,[dir=rtl].input-label-placement-stacked.sc-ion-input-ios-h .label-text-wrapper.sc-ion-input-ios,[dir=rtl] .input-label-placement-stacked.sc-ion-input-ios-h .label-text-wrapper.sc-ion-input-ios,[dir=rtl].sc-ion-input-ios-h -no-combinator.input-label-placement-floating.sc-ion-input-ios-h .label-text-wrapper.sc-ion-input-ios,[dir=rtl] .sc-ion-input-ios-h -no-combinator.input-label-placement-floating.sc-ion-input-ios-h .label-text-wrapper.sc-ion-input-ios,[dir=rtl].input-label-placement-floating.sc-ion-input-ios-h .label-text-wrapper.sc-ion-input-ios,[dir=rtl] .input-label-placement-floating.sc-ion-input-ios-h .label-text-wrapper.sc-ion-input-ios{-webkit-transform-origin:right top;transform-origin:right top}@supports selector(:dir(rtl)){.input-label-placement-stacked.sc-ion-input-ios-h:dir(rtl) .label-text-wrapper.sc-ion-input-ios,.input-label-placement-floating.sc-ion-input-ios-h:dir(rtl) .label-text-wrapper.sc-ion-input-ios{-webkit-transform-origin:right top;transform-origin:right top}}.input-label-placement-stacked.sc-ion-input-ios-h input.sc-ion-input-ios,.input-label-placement-floating.sc-ion-input-ios-h input.sc-ion-input-ios{margin-left:0;margin-right:0;margin-top:1px;margin-bottom:0}.input-label-placement-floating.sc-ion-input-ios-h .label-text-wrapper.sc-ion-input-ios{-webkit-transform:translateY(100%) scale(1);transform:translateY(100%) scale(1)}.input-label-placement-floating.sc-ion-input-ios-h input.sc-ion-input-ios{opacity:0}.has-focus.input-label-placement-floating.sc-ion-input-ios-h input.sc-ion-input-ios,.has-value.input-label-placement-floating.sc-ion-input-ios-h input.sc-ion-input-ios{opacity:1}.label-floating.sc-ion-input-ios-h .label-text-wrapper.sc-ion-input-ios{-webkit-transform:translateY(50%) scale(0.75);transform:translateY(50%) scale(0.75);max-width:calc(100% / 0.75)}.sc-ion-input-ios-s>[slot=start]:last-of-type{-webkit-margin-end:16px;margin-inline-end:16px;-webkit-margin-start:0;margin-inline-start:0}.sc-ion-input-ios-s>[slot=end]:first-of-type{-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0}.sc-ion-input-ios-h[disabled].sc-ion-input-ios-s>ion-input-password-toggle,.sc-ion-input-ios-h[disabled] .sc-ion-input-ios-s>ion-input-password-toggle,.sc-ion-input-ios-h[readonly].sc-ion-input-ios-s>ion-input-password-toggle,.sc-ion-input-ios-h[readonly] .sc-ion-input-ios-s>ion-input-password-toggle{display:none}.sc-ion-input-ios-h{--border-width:0.55px;--border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-250, var(--ion-background-color-step-250, #c8c7cc))));--highlight-height:0px;font-size:inherit}.input-clear-icon.sc-ion-input-ios ion-icon.sc-ion-input-ios{width:18px;height:18px}.input-disabled.sc-ion-input-ios-h{opacity:0.3}.sc-ion-input-ios-s>ion-button[slot=start].button-has-icon-only,.sc-ion-input-ios-s>ion-button[slot=end].button-has-icon-only{--border-radius:50%;--padding-start:0;--padding-end:0;--padding-top:0;--padding-bottom:0;aspect-ratio:1}";var IonInputIosStyle0=inputIosCss;var inputMdCss=".sc-ion-input-md-h{--placeholder-color:initial;--placeholder-font-style:initial;--placeholder-font-weight:initial;--placeholder-opacity:var(--ion-placeholder-opacity, 0.6);--padding-top:0px;--padding-end:0px;--padding-bottom:0px;--padding-start:0px;--background:transparent;--color:initial;--border-style:solid;--highlight-color-focused:var(--ion-color-primary, #0054e9);--highlight-color-valid:var(--ion-color-success, #2dd55b);--highlight-color-invalid:var(--ion-color-danger, #c5000f);--highlight-color:var(--highlight-color-focused);display:block;position:relative;width:100%;min-height:44px;padding:0 !important;color:var(--color);font-family:var(--ion-font-family, inherit);z-index:2}ion-item[slot=start].sc-ion-input-md-h,ion-item [slot=start].sc-ion-input-md-h,ion-item[slot=end].sc-ion-input-md-h,ion-item [slot=end].sc-ion-input-md-h{width:auto}.ion-color.sc-ion-input-md-h{--highlight-color-focused:var(--ion-color-base)}.input-label-placement-floating.sc-ion-input-md-h,.input-label-placement-stacked.sc-ion-input-md-h{min-height:56px}.native-input.sc-ion-input-md{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;display:inline-block;position:relative;-ms-flex:1;flex:1;width:100%;max-width:100%;max-height:100%;border:0;outline:none;background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;z-index:1}.native-input.sc-ion-input-md::-webkit-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-input.sc-ion-input-md::-moz-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-input.sc-ion-input-md:-ms-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-input.sc-ion-input-md::-ms-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-input.sc-ion-input-md::placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-input.sc-ion-input-md:-webkit-autofill{background-color:transparent}.native-input.sc-ion-input-md:invalid{-webkit-box-shadow:none;box-shadow:none}.native-input.sc-ion-input-md::-ms-clear{display:none}.cloned-input.sc-ion-input-md{top:0;bottom:0;position:absolute;pointer-events:none}.cloned-input.sc-ion-input-md{inset-inline-start:0}.cloned-input.sc-ion-input-md:disabled{opacity:1}.input-clear-icon.sc-ion-input-md{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:auto;margin-bottom:auto;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;background-position:center;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:30px;height:30px;border:0;outline:none;background-color:transparent;background-repeat:no-repeat;color:var(--ion-color-step-600, var(--ion-text-color-step-400, #666666));visibility:hidden;-webkit-appearance:none;-moz-appearance:none;appearance:none}.in-item-color.sc-ion-input-md-h .input-clear-icon.sc-ion-input-md{color:inherit}.input-clear-icon.sc-ion-input-md:focus{opacity:0.5}.has-value.sc-ion-input-md-h .input-clear-icon.sc-ion-input-md{visibility:visible}.input-wrapper.sc-ion-input-md{-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);border-radius:var(--border-radius);display:-ms-flexbox;display:flex;position:relative;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:stretch;align-items:stretch;height:inherit;min-height:inherit;-webkit-transition:background-color 15ms linear;transition:background-color 15ms linear;background:var(--background);line-height:normal}.native-wrapper.sc-ion-input-md{display:-ms-flexbox;display:flex;position:relative;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;width:100%}.ion-touched.ion-invalid.sc-ion-input-md-h{--highlight-color:var(--highlight-color-invalid)}.ion-valid.sc-ion-input-md-h{--highlight-color:var(--highlight-color-valid)}.input-bottom.sc-ion-input-md{-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:5px;padding-bottom:0;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;border-top:var(--border-width) var(--border-style) var(--border-color);font-size:0.75rem}.has-focus.ion-valid.sc-ion-input-md-h,.ion-touched.ion-invalid.sc-ion-input-md-h{--border-color:var(--highlight-color)}.input-bottom.sc-ion-input-md .error-text.sc-ion-input-md{display:none;color:var(--highlight-color-invalid)}.input-bottom.sc-ion-input-md .helper-text.sc-ion-input-md{display:block;color:var(--ion-color-step-550, var(--ion-text-color-step-450, #737373))}.ion-touched.ion-invalid.sc-ion-input-md-h .input-bottom.sc-ion-input-md .error-text.sc-ion-input-md{display:block}.ion-touched.ion-invalid.sc-ion-input-md-h .input-bottom.sc-ion-input-md .helper-text.sc-ion-input-md{display:none}.input-bottom.sc-ion-input-md .counter.sc-ion-input-md{-webkit-margin-start:auto;margin-inline-start:auto;color:var(--ion-color-step-550, var(--ion-text-color-step-450, #737373));white-space:nowrap;-webkit-padding-start:16px;padding-inline-start:16px}.has-focus.sc-ion-input-md-h input.sc-ion-input-md{caret-color:var(--highlight-color)}.label-text-wrapper.sc-ion-input-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;max-width:200px;-webkit-transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1), transform 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1), transform 150ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 150ms cubic-bezier(0.4, 0, 0.2, 1);pointer-events:none}.label-text.sc-ion-input-md,.sc-ion-input-md-s>[slot=label]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.label-text-wrapper-hidden.sc-ion-input-md,.input-outline-notch-hidden.sc-ion-input-md{display:none}.input-wrapper.sc-ion-input-md input.sc-ion-input-md{-webkit-transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1)}.input-label-placement-start.sc-ion-input-md-h .input-wrapper.sc-ion-input-md{-ms-flex-direction:row;flex-direction:row}.input-label-placement-start.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px;margin-top:0;margin-bottom:0}.input-label-placement-end.sc-ion-input-md-h .input-wrapper.sc-ion-input-md{-ms-flex-direction:row-reverse;flex-direction:row-reverse}.input-label-placement-end.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md{-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0;margin-top:0;margin-bottom:0}.input-label-placement-fixed.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px;margin-top:0;margin-bottom:0}.input-label-placement-fixed.sc-ion-input-md-h .label-text.sc-ion-input-md{-ms-flex:0 0 100px;flex:0 0 100px;width:100px;min-width:100px;max-width:200px}.input-label-placement-stacked.sc-ion-input-md-h .input-wrapper.sc-ion-input-md,.input-label-placement-floating.sc-ion-input-md-h .input-wrapper.sc-ion-input-md{-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:start}.input-label-placement-stacked.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md,.input-label-placement-floating.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md{-webkit-transform-origin:left top;transform-origin:left top;max-width:100%;z-index:2}[dir=rtl].sc-ion-input-md-h -no-combinator.input-label-placement-stacked.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md,[dir=rtl] .sc-ion-input-md-h -no-combinator.input-label-placement-stacked.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md,[dir=rtl].input-label-placement-stacked.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md,[dir=rtl] .input-label-placement-stacked.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md,[dir=rtl].sc-ion-input-md-h -no-combinator.input-label-placement-floating.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md,[dir=rtl] .sc-ion-input-md-h -no-combinator.input-label-placement-floating.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md,[dir=rtl].input-label-placement-floating.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md,[dir=rtl] .input-label-placement-floating.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md{-webkit-transform-origin:right top;transform-origin:right top}@supports selector(:dir(rtl)){.input-label-placement-stacked.sc-ion-input-md-h:dir(rtl) .label-text-wrapper.sc-ion-input-md,.input-label-placement-floating.sc-ion-input-md-h:dir(rtl) .label-text-wrapper.sc-ion-input-md{-webkit-transform-origin:right top;transform-origin:right top}}.input-label-placement-stacked.sc-ion-input-md-h input.sc-ion-input-md,.input-label-placement-floating.sc-ion-input-md-h input.sc-ion-input-md{margin-left:0;margin-right:0;margin-top:1px;margin-bottom:0}.input-label-placement-floating.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md{-webkit-transform:translateY(100%) scale(1);transform:translateY(100%) scale(1)}.input-label-placement-floating.sc-ion-input-md-h input.sc-ion-input-md{opacity:0}.has-focus.input-label-placement-floating.sc-ion-input-md-h input.sc-ion-input-md,.has-value.input-label-placement-floating.sc-ion-input-md-h input.sc-ion-input-md{opacity:1}.label-floating.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md{-webkit-transform:translateY(50%) scale(0.75);transform:translateY(50%) scale(0.75);max-width:calc(100% / 0.75)}.sc-ion-input-md-s>[slot=start]:last-of-type{-webkit-margin-end:16px;margin-inline-end:16px;-webkit-margin-start:0;margin-inline-start:0}.sc-ion-input-md-s>[slot=end]:first-of-type{-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0}.sc-ion-input-md-h[disabled].sc-ion-input-md-s>ion-input-password-toggle,.sc-ion-input-md-h[disabled] .sc-ion-input-md-s>ion-input-password-toggle,.sc-ion-input-md-h[readonly].sc-ion-input-md-s>ion-input-password-toggle,.sc-ion-input-md-h[readonly] .sc-ion-input-md-s>ion-input-password-toggle{display:none}.input-fill-solid.sc-ion-input-md-h{--background:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2));--border-color:var(--ion-color-step-500, var(--ion-background-color-step-500, gray));--border-radius:4px;--padding-start:16px;--padding-end:16px;min-height:56px}.input-fill-solid.sc-ion-input-md-h .input-wrapper.sc-ion-input-md{border-bottom:var(--border-width) var(--border-style) var(--border-color)}.has-focus.input-fill-solid.ion-valid.sc-ion-input-md-h,.input-fill-solid.ion-touched.ion-invalid.sc-ion-input-md-h{--border-color:var(--highlight-color)}.input-fill-solid.sc-ion-input-md-h .input-bottom.sc-ion-input-md{border-top:none}@media (any-hover: hover){.input-fill-solid.sc-ion-input-md-h:hover{--background:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6));--border-color:var(--ion-color-step-750, var(--ion-background-color-step-750, #404040))}}.input-fill-solid.has-focus.sc-ion-input-md-h{--background:var(--ion-color-step-150, var(--ion-background-color-step-150, #d9d9d9));--border-color:var(--ion-color-step-750, var(--ion-background-color-step-750, #404040))}.input-fill-solid.sc-ion-input-md-h .input-wrapper.sc-ion-input-md{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0px;border-end-start-radius:0px}.label-floating.input-fill-solid.input-label-placement-floating.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md{max-width:calc(100% / 0.75)}.input-fill-outline.sc-ion-input-md-h{--border-color:var(--ion-color-step-300, var(--ion-background-color-step-300, #b3b3b3));--border-radius:4px;--padding-start:16px;--padding-end:16px;min-height:56px}.input-fill-outline.input-shape-round.sc-ion-input-md-h{--border-radius:28px;--padding-start:32px;--padding-end:32px}.has-focus.input-fill-outline.ion-valid.sc-ion-input-md-h,.input-fill-outline.ion-touched.ion-invalid.sc-ion-input-md-h{--border-color:var(--highlight-color)}@media (any-hover: hover){.input-fill-outline.sc-ion-input-md-h:hover{--border-color:var(--ion-color-step-750, var(--ion-background-color-step-750, #404040))}}.input-fill-outline.has-focus.sc-ion-input-md-h{--border-width:var(--highlight-height);--border-color:var(--highlight-color)}.input-fill-outline.sc-ion-input-md-h .input-bottom.sc-ion-input-md{border-top:none}.input-fill-outline.sc-ion-input-md-h .input-wrapper.sc-ion-input-md{border-bottom:none}.input-fill-outline.input-label-placement-stacked.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md,.input-fill-outline.input-label-placement-floating.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md{-webkit-transform-origin:left top;transform-origin:left top;position:absolute;max-width:calc(100% - var(--padding-start) - var(--padding-end))}[dir=rtl].sc-ion-input-md-h -no-combinator.input-fill-outline.input-label-placement-stacked.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md,[dir=rtl] .sc-ion-input-md-h -no-combinator.input-fill-outline.input-label-placement-stacked.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md,[dir=rtl].input-fill-outline.input-label-placement-stacked.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md,[dir=rtl] .input-fill-outline.input-label-placement-stacked.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md,[dir=rtl].sc-ion-input-md-h -no-combinator.input-fill-outline.input-label-placement-floating.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md,[dir=rtl] .sc-ion-input-md-h -no-combinator.input-fill-outline.input-label-placement-floating.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md,[dir=rtl].input-fill-outline.input-label-placement-floating.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md,[dir=rtl] .input-fill-outline.input-label-placement-floating.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md{-webkit-transform-origin:right top;transform-origin:right top}@supports selector(:dir(rtl)){.input-fill-outline.input-label-placement-stacked.sc-ion-input-md-h:dir(rtl) .label-text-wrapper.sc-ion-input-md,.input-fill-outline.input-label-placement-floating.sc-ion-input-md-h:dir(rtl) .label-text-wrapper.sc-ion-input-md{-webkit-transform-origin:right top;transform-origin:right top}}.input-fill-outline.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md{position:relative}.label-floating.input-fill-outline.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md{-webkit-transform:translateY(-32%) scale(0.75);transform:translateY(-32%) scale(0.75);margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;max-width:calc((100% - var(--padding-start) - var(--padding-end) - 8px) / 0.75)}.input-fill-outline.input-label-placement-stacked.sc-ion-input-md-h input.sc-ion-input-md,.input-fill-outline.input-label-placement-floating.sc-ion-input-md-h input.sc-ion-input-md{margin-left:0;margin-right:0;margin-top:6px;margin-bottom:6px}.input-fill-outline.sc-ion-input-md-h .input-outline-container.sc-ion-input-md{left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;width:100%;height:100%}.input-fill-outline.sc-ion-input-md-h .input-outline-start.sc-ion-input-md,.input-fill-outline.sc-ion-input-md-h .input-outline-end.sc-ion-input-md{pointer-events:none}.input-fill-outline.sc-ion-input-md-h .input-outline-start.sc-ion-input-md,.input-fill-outline.sc-ion-input-md-h .input-outline-notch.sc-ion-input-md,.input-fill-outline.sc-ion-input-md-h .input-outline-end.sc-ion-input-md{border-top:var(--border-width) var(--border-style) var(--border-color);border-bottom:var(--border-width) var(--border-style) var(--border-color)}.input-fill-outline.sc-ion-input-md-h .input-outline-notch.sc-ion-input-md{max-width:calc(100% - var(--padding-start) - var(--padding-end))}.input-fill-outline.sc-ion-input-md-h .notch-spacer.sc-ion-input-md{-webkit-padding-end:8px;padding-inline-end:8px;font-size:calc(1em * 0.75);opacity:0;pointer-events:none;-webkit-box-sizing:content-box;box-sizing:content-box}.input-fill-outline.sc-ion-input-md-h .input-outline-start.sc-ion-input-md{border-start-start-radius:var(--border-radius);border-start-end-radius:0px;border-end-end-radius:0px;border-end-start-radius:var(--border-radius);-webkit-border-start:var(--border-width) var(--border-style) var(--border-color);border-inline-start:var(--border-width) var(--border-style) var(--border-color);width:calc(var(--padding-start) - 4px)}.input-fill-outline.sc-ion-input-md-h .input-outline-end.sc-ion-input-md{-webkit-border-end:var(--border-width) var(--border-style) var(--border-color);border-inline-end:var(--border-width) var(--border-style) var(--border-color);border-start-start-radius:0px;border-start-end-radius:var(--border-radius);border-end-end-radius:var(--border-radius);border-end-start-radius:0px;-ms-flex-positive:1;flex-grow:1}.label-floating.input-fill-outline.sc-ion-input-md-h .input-outline-notch.sc-ion-input-md{border-top:none}.sc-ion-input-md-h{--border-width:1px;--border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-150, var(--ion-background-color-step-150, rgba(0, 0, 0, 0.13)))));--highlight-height:2px;font-size:inherit}.input-clear-icon.sc-ion-input-md ion-icon.sc-ion-input-md{width:22px;height:22px}.input-disabled.sc-ion-input-md-h{opacity:0.38}.has-focus.ion-valid.sc-ion-input-md-h,.ion-touched.ion-invalid.sc-ion-input-md-h{--border-color:var(--highlight-color)}.input-bottom.sc-ion-input-md .counter.sc-ion-input-md{letter-spacing:0.0333333333em}.input-label-placement-floating.has-focus.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md,.input-label-placement-stacked.has-focus.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md{color:var(--highlight-color)}.has-focus.input-label-placement-floating.ion-valid.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md,.input-label-placement-floating.ion-touched.ion-invalid.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md,.has-focus.input-label-placement-stacked.ion-valid.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md,.input-label-placement-stacked.ion-touched.ion-invalid.sc-ion-input-md-h .label-text-wrapper.sc-ion-input-md{color:var(--highlight-color)}.input-highlight.sc-ion-input-md{bottom:-1px;position:absolute;width:100%;height:var(--highlight-height);-webkit-transform:scale(0);transform:scale(0);-webkit-transition:-webkit-transform 200ms;transition:-webkit-transform 200ms;transition:transform 200ms;transition:transform 200ms, -webkit-transform 200ms;background:var(--highlight-color)}.input-highlight.sc-ion-input-md{inset-inline-start:0}.has-focus.sc-ion-input-md-h .input-highlight.sc-ion-input-md{-webkit-transform:scale(1);transform:scale(1)}.in-item.sc-ion-input-md-h .input-highlight.sc-ion-input-md{bottom:0}.in-item.sc-ion-input-md-h .input-highlight.sc-ion-input-md{inset-inline-start:0}.input-shape-round.sc-ion-input-md-h{--border-radius:16px}.sc-ion-input-md-s>ion-button[slot=start].button-has-icon-only,.sc-ion-input-md-s>ion-button[slot=end].button-has-icon-only{--border-radius:50%;--padding-start:8px;--padding-end:8px;--padding-top:8px;--padding-bottom:8px;aspect-ratio:1;min-height:40px}";var IonInputMdStyle0=inputMdCss;var Input=function(){function i(i){var t=this;registerInstance(this,i);this.ionInput=createEvent(this,"ionInput",7);this.ionChange=createEvent(this,"ionChange",7);this.ionBlur=createEvent(this,"ionBlur",7);this.ionFocus=createEvent(this,"ionFocus",7);this.inputId="ion-input-".concat(inputIds++);this.inheritedAttributes={};this.isComposing=false;this.didInputClearOnEdit=false;this.onInput=function(i){var n=i.target;if(n){t.value=n.value||""}t.emitInputChange(i)};this.onChange=function(i){t.emitValueChange(i)};this.onBlur=function(i){t.hasFocus=false;if(t.focusedValue!==t.value){t.emitValueChange(i)}t.didInputClearOnEdit=false;t.ionBlur.emit(i)};this.onFocus=function(i){t.hasFocus=true;t.focusedValue=t.value;t.ionFocus.emit(i)};this.onKeydown=function(i){t.checkClearOnEdit(i)};this.onCompositionStart=function(){t.isComposing=true};this.onCompositionEnd=function(){t.isComposing=false};this.clearTextInput=function(i){if(t.clearInput&&!t.readonly&&!t.disabled&&i){i.preventDefault();i.stopPropagation();t.setFocus()}t.value="";t.emitInputChange(i)};this.hasFocus=false;this.color=undefined;this.autocapitalize="off";this.autocomplete="off";this.autocorrect="off";this.autofocus=false;this.clearInput=false;this.clearInputIcon=undefined;this.clearOnEdit=undefined;this.counter=false;this.counterFormatter=undefined;this.debounce=undefined;this.disabled=false;this.enterkeyhint=undefined;this.errorText=undefined;this.fill=undefined;this.inputmode=undefined;this.helperText=undefined;this.label=undefined;this.labelPlacement="start";this.max=undefined;this.maxlength=undefined;this.min=undefined;this.minlength=undefined;this.multiple=undefined;this.name=this.inputId;this.pattern=undefined;this.placeholder=undefined;this.readonly=false;this.required=false;this.shape=undefined;this.spellcheck=false;this.step=undefined;this.type="text";this.value=""}i.prototype.debounceChanged=function(){var i=this,t=i.ionInput,n=i.debounce,o=i.originalIonInput;this.ionInput=n===undefined?o!==null&&o!==void 0?o:t:debounceEvent(t,n)};i.prototype.onTypeChange=function(){var i=this.el.querySelector("ion-input-password-toggle");if(i){i.type=this.type}};i.prototype.valueChanged=function(){var i=this.nativeInput;var t=this.getValue();if(i&&i.value!==t&&!this.isComposing){i.value=t}};i.prototype.componentWillLoad=function(){this.inheritedAttributes=Object.assign(Object.assign({},inheritAriaAttributes(this.el)),inheritAttributes(this.el,["tabindex","title","data-form-type"]))};i.prototype.connectedCallback=function(){var i=this;var t=this.el;this.slotMutationController=createSlotMutationController(t,["label","start","end"],(function(){return forceUpdate(i)}));this.notchController=createNotchController(t,(function(){return i.notchSpacerEl}),(function(){return i.labelSlot}));this.debounceChanged();{document.dispatchEvent(new CustomEvent("ionInputDidLoad",{detail:this.el}))}};i.prototype.componentDidLoad=function(){this.originalIonInput=this.ionInput;this.onTypeChange();this.debounceChanged()};i.prototype.componentDidRender=function(){var i;(i=this.notchController)===null||i===void 0?void 0:i.calculateNotchWidth()};i.prototype.disconnectedCallback=function(){{document.dispatchEvent(new CustomEvent("ionInputDidUnload",{detail:this.el}))}if(this.slotMutationController){this.slotMutationController.destroy();this.slotMutationController=undefined}if(this.notchController){this.notchController.destroy();this.notchController=undefined}};i.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){if(this.nativeInput){this.nativeInput.focus()}return[2]}))}))};i.prototype.getInputElement=function(){return __awaiter(this,void 0,void 0,(function(){var i=this;return __generator(this,(function(t){switch(t.label){case 0:if(!!this.nativeInput)return[3,2];return[4,new Promise((function(t){return componentOnReady(i.el,t)}))];case 1:t.sent();t.label=2;case 2:return[2,Promise.resolve(this.nativeInput)]}}))}))};i.prototype.emitValueChange=function(i){var t=this.value;var n=t==null?t:t.toString();this.focusedValue=n;this.ionChange.emit({value:n,event:i})};i.prototype.emitInputChange=function(i){var t=this.value;var n=t==null?t:t.toString();this.ionInput.emit({value:n,event:i})};i.prototype.shouldClearOnEdit=function(){var i=this,t=i.type,n=i.clearOnEdit;return n===undefined?t==="password":n};i.prototype.getValue=function(){return typeof this.value==="number"?this.value.toString():(this.value||"").toString()};i.prototype.checkClearOnEdit=function(i){if(!this.shouldClearOnEdit()){return}var t=["Enter","Tab","Shift","Meta","Alt","Control"];var n=t.includes(i.key);if(!this.didInputClearOnEdit&&this.hasValue()&&!n){this.value="";this.emitInputChange(i)}if(!n){this.didInputClearOnEdit=true}};i.prototype.hasValue=function(){return this.getValue().length>0};i.prototype.renderHintText=function(){var i=this,t=i.helperText,n=i.errorText;return[h("div",{id:HELPER_TEXT_ID,class:"helper-text"},t),h("div",{id:ERROR_TEXT_ID,class:"error-text"},n)]};i.prototype.getHintTextID=function(){var i=this,t=i.el,n=i.helperText,o=i.errorText;if(t.classList.contains("ion-touched")&&t.classList.contains("ion-invalid")&&o){return ERROR_TEXT_ID}if(n){return HELPER_TEXT_ID}return undefined};i.prototype.renderCounter=function(){var i=this,t=i.counter,n=i.maxlength,o=i.counterFormatter,e=i.value;if(t!==true||n===undefined){return}return h("div",{class:"counter"},getCounterText(e,n,o))};i.prototype.renderBottomContent=function(){var i=this,t=i.counter,n=i.helperText,o=i.errorText,e=i.maxlength;var r=!!n||!!o;var a=t===true&&e!==undefined;if(!r&&!a){return}return h("div",{class:"input-bottom"},this.renderHintText(),this.renderCounter())};i.prototype.renderLabel=function(){var i=this.label;return h("div",{class:{"label-text-wrapper":true,"label-text-wrapper-hidden":!this.hasLabel}},i===undefined?h("slot",{name:"label"}):h("div",{class:"label-text"},i))};Object.defineProperty(i.prototype,"labelSlot",{get:function(){return this.el.querySelector('[slot="label"]')},enumerable:false,configurable:true});Object.defineProperty(i.prototype,"hasLabel",{get:function(){return this.label!==undefined||this.labelSlot!==null},enumerable:false,configurable:true});i.prototype.renderLabelContainer=function(){var i=this;var t=getIonMode(this);var n=t==="md"&&this.fill==="outline";if(n){return[h("div",{class:"input-outline-container"},h("div",{class:"input-outline-start"}),h("div",{class:{"input-outline-notch":true,"input-outline-notch-hidden":!this.hasLabel}},h("div",{class:"notch-spacer","aria-hidden":"true",ref:function(t){return i.notchSpacerEl=t}},this.label)),h("div",{class:"input-outline-end"})),this.renderLabel()]}return this.renderLabel()};i.prototype.render=function(){var i;var t=this;var n=this,o=n.disabled,e=n.fill,r=n.readonly,a=n.shape,l=n.inputId,s=n.labelPlacement,p=n.el,d=n.hasFocus,c=n.clearInputIcon;var u=getIonMode(this);var m=this.getValue();var b=hostContext("ion-item",this.el);var f=u==="md"&&e!=="outline"&&!b;var g=u==="ios"?closeCircle:closeSharp;var v=c!==null&&c!==void 0?c:g;var x=this.hasValue();var w=p.querySelector('[slot="start"], [slot="end"]')!==null;console.log("el",this.el);console.log("id",this.getHintTextID());var y=s==="stacked"||s==="floating"&&(x||d||w);return h(Host,{key:"6ea1ddbc1c13e2e93686135ee3c1d87c21839ea4",class:createColorClasses(this.color,(i={},i[u]=true,i["has-value"]=x,i["has-focus"]=d,i["label-floating"]=y,i["input-fill-".concat(e)]=e!==undefined,i["input-shape-".concat(a)]=a!==undefined,i["input-label-placement-".concat(s)]=true,i["in-item"]=b,i["in-item-color"]=hostContext("ion-item.ion-color",this.el),i["input-disabled"]=o,i))},h("label",{key:"37c80eff5361d5d8d14fa59fcab66a2f38d85fd2",class:"input-wrapper",htmlFor:l},this.renderLabelContainer(),h("div",{key:"1bf4e5997beab1c7611d208465d7bec9da62fb54",class:"native-wrapper"},h("slot",{key:"3b3eec55351462d72f04ab6b5b69f30bbe12b79f",name:"start"}),h("input",Object.assign({key:"30673d8d272d0c21d2c3996608973c3e740433cd",class:"native-input",ref:function(i){return t.nativeInput=i},id:l,disabled:o,autoCapitalize:this.autocapitalize,autoComplete:this.autocomplete,autoCorrect:this.autocorrect,autoFocus:this.autofocus,enterKeyHint:this.enterkeyhint,inputMode:this.inputmode,min:this.min,max:this.max,minLength:this.minlength,maxLength:this.maxlength,multiple:this.multiple,name:this.name,pattern:this.pattern,placeholder:this.placeholder||"",readOnly:r,required:this.required,spellcheck:this.spellcheck,step:this.step,type:this.type,value:m,onInput:this.onInput,onChange:this.onChange,onBlur:this.onBlur,onFocus:this.onFocus,onKeyDown:this.onKeydown,onCompositionstart:this.onCompositionStart,onCompositionend:this.onCompositionEnd,"aria-describedby":this.getHintTextID(),"aria-invalid":this.getHintTextID()===ERROR_TEXT_ID},this.inheritedAttributes)),this.clearInput&&!r&&!o&&h("button",{key:"6414d510d72780262baceba2bb2a8c9fa1a48f2b","aria-label":"reset",type:"button",class:"input-clear-icon",onPointerDown:function(i){i.preventDefault()},onFocusin:function(i){i.stopPropagation()},onClick:this.clearTextInput},h("ion-icon",{key:"517f2c7cd07fb22996ca2f63838de55346314993","aria-hidden":"true",icon:v})),h("slot",{key:"ea2f1a12357da90098695c46cbc21d7d33923f9e",name:"end"})),f&&h("div",{key:"4a117a1ed80d6ea8e2a42a958509284cdf8b306f",class:"input-highlight"})),this.renderBottomContent())};Object.defineProperty(i.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(i,"watchers",{get:function(){return{debounce:["debounceChanged"],type:["onTypeChange"],value:["valueChanged"]}},enumerable:false,configurable:true});return i}();var inputIds=0;var HELPER_TEXT_ID="".concat("helper-text-"+inputIds);var ERROR_TEXT_ID="".concat("error-text-"+inputIds);Input.style={ios:IonInputIosStyle0,md:IonInputMdStyle0};export{Input as ion_input};
|