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","inheritedAttributes","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","Object","assign","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;AACZ,0BAAYC,OAAZ,EAAqB;AAAA;;AAAA;;AACnB,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,QAA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AAA;AAAA,8BA4NU;AAAE,mBAAO;AAC7B,0BAAY,CAAC,iBAAD,CADiB;AAE7B,0BAAY,CAAC,iBAAD,CAFiB;AAG7B,uBAAS,CAAC,cAAD;AAHoB,aAAP;AAIpB;AAhOQ;;AAAA;AAAA,SAAd;;AAkOA,UAAIf,WAAW,GAAG,CAAlB;AACAR,cAAQ,CAAC0C,KAAT,GAAiB;AACfgC,WAAG,EAAE5E,cADU;AAEf6E,UAAE,EAAE5E;AAFW,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-e806d1f6.js';\nimport { b as getIonMode } from './ionic-global-9d5c8ee3.js';\nimport { e as debounceEvent, i as inheritAttributes, r as raf, f as findItemLabel } from './helpers-90f46169.js';\nimport { c as createColorClasses } from './theme-ff3fc52f.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 this.inheritedAttributes = {};\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. This also impacts form bindings such as `ngModel` or `v-model`.\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 componentWillLoad() {\n this.inheritedAttributes = inheritAttributes(this.el, ['title']);\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\", Object.assign({ 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 }, this.inheritedAttributes), 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"]} |