1 line
23 KiB
Plaintext
1 line
23 KiB
Plaintext
{"version":3,"sources":["webpack:///node_modules/@ionic/core/dist/esm/ion-textarea.entry.js"],"names":["textareaIosCss","textareaMdCss","Textarea","hostRef","ionChange","ionInput","ionStyle","ionBlur","ionFocus","inputId","textareaIds","didBlurAfterEdit","fireFocusEvents","hasFocus","autocapitalize","autofocus","clearOnEdit","debounce","disabled","name","readonly","required","spellcheck","autoGrow","value","onInput","ev","nativeInput","emitStyle","emit","onFocus","focusChange","onBlur","onKeyDown","checkClearOnEdit","getValue","runAutoGrow","debounceChanged","document","dispatchEvent","CustomEvent","detail","el","style","height","scrollHeight","textareaWrapper","focus","blur","Promise","resolve","placeholder","hasValue","mode","labelId","label","id","color","ref","autoCapitalize","autoFocus","enterKeyHint","enterkeyhint","inputMode","inputmode","maxLength","maxlength","minLength","minlength","readOnly","cols","rows","wrap","ios","md"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;;AAKA,UAAMA,cAAc,GAAG,kmIAAvB;AAEA,UAAMC,aAAa,GAAG,+nIAAtB;;AAEA,UAAMC,QAAQ;AACV,0BAAYC,OAAZ,EAAqB;AAAA;;AAAA;;AACjB,uEAAiB,IAAjB,EAAuBA,OAAvB;AACA,eAAKC,SAAL,GAAiB,6DAAY,IAAZ,EAAkB,WAAlB,EAA+B,CAA/B,CAAjB;AACA,eAAKC,QAAL,GAAgB,6DAAY,IAAZ,EAAkB,UAAlB,EAA8B,CAA9B,CAAhB;AACA,eAAKC,QAAL,GAAgB,6DAAY,IAAZ,EAAkB,UAAlB,EAA8B,CAA9B,CAAhB;AACA,eAAKC,OAAL,GAAe,6DAAY,IAAZ,EAAkB,SAAlB,EAA6B,CAA7B,CAAf;AACA,eAAKC,QAAL,GAAgB,6DAAY,IA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G,EAAEzE,cADQ;AAEb0E,UAAE,EAAEzE;AAFS,OAAjB","file":"39-es5.js","sourcesContent":["import { r as registerInstance, e as createEvent, f as readTask, h, H as Host, i as getElement } from './index-92848855.js';\nimport { b as getIonMode } from './ionic-global-23e7365a.js';\nimport { d as debounceEvent, r as raf, f as findItemLabel } from './helpers-5c745fbd.js';\nimport { c as createColorClasses } from './theme-5641d27f.js';\n\nconst textareaIosCss = \".sc-ion-textarea-ios-h{--background:initial;--color:initial;--placeholder-color:initial;--placeholder-font-style:initial;--placeholder-font-weight:initial;--placeholder-opacity:.5;--padding-top:0;--padding-end:0;--padding-bottom:0;--padding-start:0;--border-radius:0;display:block;position:relative;-ms-flex:1;flex:1;width:100%;background:var(--background);color:var(--color);font-family:var(--ion-font-family, inherit);white-space:pre-wrap;z-index:2;-webkit-box-sizing:border-box;box-sizing:border-box}.ion-color.sc-ion-textarea-ios-h{background:initial}.ion-color.sc-ion-textarea-ios-h{color:var(--ion-color-base)}ion-item.sc-ion-textarea-ios-h,ion-item .sc-ion-textarea-ios-h{-ms-flex-item-align:baseline;align-self:baseline}ion-item.sc-ion-textarea-ios-h:not(.item-label),ion-item:not(.item-label) .sc-ion-textarea-ios-h{--padding-start:0}.textarea-wrapper.sc-ion-textarea-ios{min-width:inherit;max-width:inherit;min-height:inherit;max-height:inherit}.native-textarea.sc-ion-textarea-ios{border-radius:var(--border-radius);margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);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:block;width:100%;max-width:100%;max-height:100%;border:0;outline:none;background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;resize:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.native-textarea.sc-ion-textarea-ios{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}.native-textarea.sc-ion-textarea-ios::-webkit-input-placeholder{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-textarea.sc-ion-textarea-ios::-moz-placeholder{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-textarea.sc-ion-textarea-ios:-ms-input-placeholder{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-textarea.sc-ion-textarea-ios::-ms-input-placeholder{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-textarea.sc-ion-textarea-ios::placeholder{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-textarea[disabled].sc-ion-textarea-ios{opacity:0.4}.cloned-input.sc-ion-textarea-ios{left:0;top:0;position:absolute;pointer-events:none}[dir=rtl].sc-ion-textarea-ios .cloned-input.sc-ion-textarea-ios,[dir=rtl].sc-ion-textarea-ios-h .cloned-input.sc-ion-textarea-ios,[dir=rtl] .sc-ion-textarea-ios-h .cloned-input.sc-ion-textarea-ios{left:unset;right:unset;right:0}.sc-ion-textarea-ios-h{--padding-top:10px;--padding-end:10px;--padding-bottom:10px;--padding-start:0;font-size:inherit}.item-label-stacked.sc-ion-textarea-ios-h,.item-label-stacked .sc-ion-textarea-ios-h,.item-label-floating.sc-ion-textarea-ios-h,.item-label-floating .sc-ion-textarea-ios-h{--padding-top:8px;--padding-bottom:8px;--padding-start:0px}\";\n\nconst textareaMdCss = \".sc-ion-textarea-md-h{--background:initial;--color:initial;--placeholder-color:initial;--placeholder-font-style:initial;--placeholder-font-weight:initial;--placeholder-opacity:.5;--padding-top:0;--padding-end:0;--padding-bottom:0;--padding-start:0;--border-radius:0;display:block;position:relative;-ms-flex:1;flex:1;width:100%;background:var(--background);color:var(--color);font-family:var(--ion-font-family, inherit);white-space:pre-wrap;z-index:2;-webkit-box-sizing:border-box;box-sizing:border-box}.ion-color.sc-ion-textarea-md-h{background:initial}.ion-color.sc-ion-textarea-md-h{color:var(--ion-color-base)}ion-item.sc-ion-textarea-md-h,ion-item .sc-ion-textarea-md-h{-ms-flex-item-align:baseline;align-self:baseline}ion-item.sc-ion-textarea-md-h:not(.item-label),ion-item:not(.item-label) .sc-ion-textarea-md-h{--padding-start:0}.textarea-wrapper.sc-ion-textarea-md{min-width:inherit;max-width:inherit;min-height:inherit;max-height:inherit}.native-textarea.sc-ion-textarea-md{border-radius:var(--border-radius);margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);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:block;width:100%;max-width:100%;max-height:100%;border:0;outline:none;background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;resize:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.native-textarea.sc-ion-textarea-md{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}.native-textarea.sc-ion-textarea-md::-webkit-input-placeholder{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-textarea.sc-ion-textarea-md::-moz-placeholder{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-textarea.sc-ion-textarea-md:-ms-input-placeholder{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-textarea.sc-ion-textarea-md::-ms-input-placeholder{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-textarea.sc-ion-textarea-md::placeholder{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-textarea[disabled].sc-ion-textarea-md{opacity:0.4}.cloned-input.sc-ion-textarea-md{left:0;top:0;position:absolute;pointer-events:none}[dir=rtl].sc-ion-textarea-md .cloned-input.sc-ion-textarea-md,[dir=rtl].sc-ion-textarea-md-h .cloned-input.sc-ion-textarea-md,[dir=rtl] .sc-ion-textarea-md-h .cloned-input.sc-ion-textarea-md{left:unset;right:unset;right:0}.sc-ion-textarea-md-h{--padding-top:10px;--padding-end:0;--padding-bottom:11px;--padding-start:8px;margin-left:0;margin-right:0;margin-top:8px;margin-bottom:0;font-size:inherit}.item-label-stacked.sc-ion-textarea-md-h,.item-label-stacked .sc-ion-textarea-md-h,.item-label-floating.sc-ion-textarea-md-h,.item-label-floating .sc-ion-textarea-md-h{--padding-top:8px;--padding-bottom:8px;--padding-start:0}\";\n\nconst Textarea = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.ionChange = createEvent(this, \"ionChange\", 7);\n this.ionInput = createEvent(this, \"ionInput\", 7);\n this.ionStyle = createEvent(this, \"ionStyle\", 7);\n this.ionBlur = createEvent(this, \"ionBlur\", 7);\n this.ionFocus = createEvent(this, \"ionFocus\", 7);\n this.inputId = `ion-textarea-${textareaIds++}`;\n this.didBlurAfterEdit = false;\n /**\n * This is required for a WebKit bug which requires us to\n * blur and focus an input to properly focus the input in\n * an item with delegatesFocus. It will no longer be needed\n * with iOS 14.\n *\n * @internal\n */\n this.fireFocusEvents = true;\n this.hasFocus = false;\n /**\n * Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user.\n */\n this.autocapitalize = 'none';\n /**\n * This Boolean attribute lets you specify that a form control should have input focus when the page loads.\n */\n this.autofocus = false;\n /**\n * If `true`, the value will be cleared after focus upon edit. Defaults to `true` when `type` is `\"password\"`, `false` for all other types.\n */\n this.clearOnEdit = false;\n /**\n * Set the amount of time, in milliseconds, to wait to trigger the `ionChange` event after each keystroke.\n */\n this.debounce = 0;\n /**\n * If `true`, the user cannot interact with the textarea.\n */\n this.disabled = false;\n /**\n * The name of the control, which is submitted with the form data.\n */\n this.name = this.inputId;\n /**\n * If `true`, the user cannot modify the value.\n */\n this.readonly = false;\n /**\n * If `true`, the user must fill in a value before submitting a form.\n */\n this.required = false;\n /**\n * If `true`, the element will have its spelling and grammar checked.\n */\n this.spellcheck = false;\n /**\n * If `true`, the element height will increase based on the value.\n */\n this.autoGrow = false;\n /**\n * The value of the textarea.\n */\n this.value = '';\n this.onInput = (ev) => {\n if (this.nativeInput) {\n this.value = this.nativeInput.value;\n }\n this.emitStyle();\n this.ionInput.emit(ev);\n };\n this.onFocus = (ev) => {\n this.hasFocus = true;\n this.focusChange();\n if (this.fireFocusEvents) {\n this.ionFocus.emit(ev);\n }\n };\n this.onBlur = (ev) => {\n this.hasFocus = false;\n this.focusChange();\n if (this.fireFocusEvents) {\n this.ionBlur.emit(ev);\n }\n };\n this.onKeyDown = () => {\n this.checkClearOnEdit();\n };\n }\n debounceChanged() {\n this.ionChange = debounceEvent(this.ionChange, this.debounce);\n }\n disabledChanged() {\n this.emitStyle();\n }\n /**\n * Update the native input element when the value changes\n */\n valueChanged() {\n const nativeInput = this.nativeInput;\n const value = this.getValue();\n if (nativeInput && nativeInput.value !== value) {\n nativeInput.value = value;\n }\n this.runAutoGrow();\n this.emitStyle();\n this.ionChange.emit({ value });\n }\n connectedCallback() {\n this.emitStyle();\n this.debounceChanged();\n {\n document.dispatchEvent(new CustomEvent('ionInputDidLoad', {\n detail: this.el\n }));\n }\n }\n disconnectedCallback() {\n {\n document.dispatchEvent(new CustomEvent('ionInputDidUnload', {\n detail: this.el\n }));\n }\n }\n componentDidLoad() {\n raf(() => this.runAutoGrow());\n }\n runAutoGrow() {\n const nativeInput = this.nativeInput;\n if (nativeInput && this.autoGrow) {\n readTask(() => {\n nativeInput.style.height = 'auto';\n nativeInput.style.height = nativeInput.scrollHeight + 'px';\n if (this.textareaWrapper) {\n this.textareaWrapper.style.height = nativeInput.scrollHeight + 'px';\n }\n });\n }\n }\n /**\n * Sets focus on the native `textarea` in `ion-textarea`. Use this method instead of the global\n * `textarea.focus()`.\n */\n async setFocus() {\n if (this.nativeInput) {\n this.nativeInput.focus();\n }\n }\n /**\n * Sets blur on the native `textarea` in `ion-textarea`. Use this method instead of the global\n * `textarea.blur()`.\n * @internal\n */\n async setBlur() {\n if (this.nativeInput) {\n this.nativeInput.blur();\n }\n }\n /**\n * Returns the native `<textarea>` element used under the hood.\n */\n getInputElement() {\n return Promise.resolve(this.nativeInput);\n }\n emitStyle() {\n this.ionStyle.emit({\n 'interactive': true,\n 'textarea': true,\n 'input': true,\n 'interactive-disabled': this.disabled,\n 'has-placeholder': this.placeholder != null,\n 'has-value': this.hasValue(),\n 'has-focus': this.hasFocus\n });\n }\n /**\n * Check if we need to clear the text input if clearOnEdit is enabled\n */\n checkClearOnEdit() {\n if (!this.clearOnEdit) {\n return;\n }\n // Did the input value change after it was blurred and edited?\n if (this.didBlurAfterEdit && this.hasValue()) {\n // Clear the input\n this.value = '';\n }\n // Reset the flag\n this.didBlurAfterEdit = false;\n }\n focusChange() {\n // If clearOnEdit is enabled and the input blurred but has a value, set a flag\n if (this.clearOnEdit && !this.hasFocus && this.hasValue()) {\n this.didBlurAfterEdit = true;\n }\n this.emitStyle();\n }\n hasValue() {\n return this.getValue() !== '';\n }\n getValue() {\n return this.value || '';\n }\n render() {\n const mode = getIonMode(this);\n const value = this.getValue();\n const labelId = this.inputId + '-lbl';\n const label = findItemLabel(this.el);\n if (label) {\n label.id = labelId;\n }\n return (h(Host, { \"aria-disabled\": this.disabled ? 'true' : null, class: createColorClasses(this.color, {\n [mode]: true,\n }) }, h(\"div\", { class: \"textarea-wrapper\", ref: el => this.textareaWrapper = el }, h(\"textarea\", { class: \"native-textarea\", \"aria-labelledby\": labelId, ref: el => this.nativeInput = el, autoCapitalize: this.autocapitalize, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, disabled: this.disabled, maxLength: this.maxlength, minLength: this.minlength, name: this.name, placeholder: this.placeholder || '', readOnly: this.readonly, required: this.required, spellcheck: this.spellcheck, cols: this.cols, rows: this.rows, wrap: this.wrap, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeyDown }, value))));\n }\n get el() { return getElement(this); }\n static get watchers() { return {\n \"debounce\": [\"debounceChanged\"],\n \"disabled\": [\"disabledChanged\"],\n \"value\": [\"valueChanged\"]\n }; }\n};\nlet textareaIds = 0;\nTextarea.style = {\n ios: textareaIosCss,\n md: textareaMdCss\n};\n\nexport { Textarea as ion_textarea };\n"]} |