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AAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,SAAS,EAChB,OAAO,EAAE,OAAO,GACf,CACG,CACN,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,eAAe,QAAQ,CAAC","sourcesContent":["import { create, tsx } from '@dojo/framework/core/vdom';\nimport Label from '../label/index';\nimport { formatAriaProperties, isRenderResult } from '../common/util';\nimport * as css from '../theme/default/text-area.m.css';\nimport * as labelCss from '../theme/default/label.m.css';\nimport HelperText from '../helper-text/index';\nimport { createICacheMiddleware } from '@dojo/framework/core/middleware/icache';\nimport theme from '../middleware/theme';\nimport focus from '@dojo/framework/core/middleware/focus';\nimport validity from '@dojo/framework/core/middleware/validity';\nimport dimensions from '@dojo/framework/core/middleware/dimensions';\nimport { RenderResult } from '@dojo/framework/core/interfaces';\n\nexport interface TextAreaProperties {\n\t/** Custom aria attributes */\n\taria?: { [key: string]: string | null };\n\t/** Number of columns, controls the width of the textarea */\n\tcolumns?: number;\n\t/** Custom validator used to validate the contents of the TextArea */\n\tcustomValidator?: (value: string) => { valid?: boolean; message?: string } | void;\n\t/** Set the disabled property of the control */\n\tdisabled?: boolean;\n\t/** Renders helper text to the user */\n\thelperText?: string;\n\t/** Hides the label from view while still remaining accessible for screen readers */\n\tlabelHidden?: boolean;\n\t/** Maximum number of characters allowed in the input */\n\tmaxLength?: number | string;\n\t/** Minimum number of characters allowed in the input */\n\tminLength?: number | string;\n\t/** The name of the field */\n\tname?: string;\n\n\t/** Handler for when the element is blurred */\n\tonBlur?(): void;\n\n\t/** Handler of when the element is clicked */\n\tonClick?(): void;\n\n\t/** Handler for when the element is focused */\n\tonFocus?(): void;\n\n\t/** Handler for when a key is depressed in the element */\n\tonKeyDown?(key: number, preventDefault: () => void): void;\n\n\t/** Handler for when a key is released in the element */\n\tonKeyUp?(key: number, preventDefault: () => void): void;\n\n\t/** Handler for when the pointer moves out of the element */\n\tonOut?(): void;\n\n\t/** Handler for when the pointer moves over the element */\n\tonOver?(): void;\n\n\t/** Called when TextArea's state is validated */\n\tonValidate?: (valid: boolean | undefined, message: string) => void;\n\n\t/** Handler for when the value of the widget changes */\n\tonValue?(value?: string): void;\n\n\t/** Placeholder text displayed in an empty TextArea */\n\tplaceholder?: string;\n\t/** Makes the field readonly (it may be focused but not changed) */\n\treadOnly?: boolean;\n\t/** Sets the input as required to complete the form */\n\trequired?: boolean;\n\t/** Number of rows, controls the height of the textarea */\n\trows?: number;\n\t/** If the field is valid and optionally display a message */\n\tvalid?: { valid?: boolean; message?: string } | boolean;\n\t/** The initial value */\n\tinitialValue?: string;\n\t/** Controlled value property */\n\tvalue?: string;\n\t/** The id used for the form input element */\n\twidgetId?: string;\n\t/** Controls text wrapping. Can be \"hard\", \"soft\", or \"off\" */\n\twrapText?: 'hard' | 'soft' | 'off';\n\t/** The kind of text area */\n\tkind?: 'outlined' | 'filled';\n}\n\nexport interface TextAreaChildren {\n\tlabel?: RenderResult;\n}\n\nexport interface TextAreaICache {\n\tdirty: boolean;\n\tvalue?: string;\n\tinitialValue?: string;\n}\n\nconst factory = create({\n\ticache: createICacheMiddleware<TextAreaICache>(),\n\ttheme,\n\tfocus,\n\tvalidity,\n\tdimensions\n})\n\t.properties<TextAreaProperties>()\n\t.children<TextAreaChildren | RenderResult | undefined>();\nexport const TextArea = factory(function TextArea({\n\tid,\n\tmiddleware: { icache, theme, focus, validity, dimensions },\n\tproperties,\n\tchildren\n}) {\n\tconst themeCss = theme.classes(css);\n\n\tfunction callOnValidate(valid: boolean | undefined, message: string) {\n\t\tlet { valid: previousValid, onValidate } = properties();\n\t\tlet previousMessage: string | undefined;\n\n\t\tif (typeof previousValid === 'object') {\n\t\t\tpreviousMessage = previousValid.message;\n\t\t\tpreviousValid = previousValid.valid;\n\t\t}\n\n\t\tif (valid !== previousValid || message !== previousMessage) {\n\t\t\tonValidate && onValidate(valid, message);\n\t\t}\n\t}\n\n\tfunction validate() {\n\t\tconst { customValidator, value = icache.get('value') || '' } = properties();\n\t\tconst dirty = icache.getOrSet('dirty', false);\n\n\t\tif (value === '' && !dirty) {\n\t\t\tcallOnValidate(undefined, '');\n\t\t\treturn;\n\t\t}\n\n\t\ticache.set('dirty', true);\n\n\t\tlet { valid, message = '' } = validity.get('input', value || '');\n\t\tif (valid && customValidator) {\n\t\t\tconst customValid = customValidator(value);\n\t\t\tif (customValid) {\n\t\t\t\tvalid = customValid.valid;\n\t\t\t\tmessage = customValid.message || '';\n\t\t\t}\n\t\t}\n\n\t\tcallOnValidate(valid, message);\n\t}\n\n\tfunction getValidity() {\n\t\tconst { valid = { valid: undefined, message: undefined } } = properties();\n\n\t\tif (typeof valid === 'boolean') {\n\t\t\treturn { valid, message: undefined };\n\t\t}\n\n\t\treturn {\n\t\t\tvalid: valid.valid,\n\t\t\tmessage: valid.message\n\t\t};\n\t}\n\n\tconst {\n\t\taria = {},\n\t\tcolumns = 20,\n\t\tdisabled,\n\t\twidgetId = `textarea-${id}`,\n\t\tmaxLength,\n\t\tminLength,\n\t\tname,\n\t\tplaceholder,\n\t\treadOnly,\n\t\trequired,\n\t\trows = 2,\n\t\tinitialValue,\n\t\twrapText,\n\t\ttheme: themeProp,\n\t\tclasses,\n\t\tlabelHidden,\n\t\thelperText,\n\t\tonValidate,\n\t\tvariant,\n\t\tkind = 'filled'\n\t} = properties();\n\n\tlet { value } = properties();\n\n\tif (value === undefined) {\n\t\tvalue = icache.get('value');\n\t\tconst existingInitialValue = icache.get('initialValue');\n\n\t\tif (initialValue !== existingInitialValue) {\n\t\t\ticache.set('value', initialValue);\n\t\t\ticache.set('initialValue', initialValue);\n\t\t\tvalue = initialValue;\n\t\t}\n\t}\n\n\tonValidate && validate();\n\tconst { valid, message } = getValidity();\n\n\tconst computedHelperText = (valid === false && message) || helperText;\n\tconst inputFocused = focus.isFocused('input');\n\tconst [labelChild] = children();\n\tconst label = isRenderResult(labelChild) ? labelChild : labelChild.label;\n\n\tfunction _renderLabel() {\n\t\tconst labelActive = !!value || inputFocused;\n\n\t\tconst renderedLabel = (\n\t\t\t<Label\n\t\t\t\ttheme={theme.compose(\n\t\t\t\t\tlabelCss,\n\t\t\t\t\tcss,\n\t\t\t\t\t'label'\n\t\t\t\t)}\n\t\t\t\tclasses={{\n\t\t\t\t\t...classes,\n\t\t\t\t\t'@dojo/widgets/label': {\n\t\t\t\t\t\t...(classes ? classes['@dojo/widgets/label'] : {}),\n\t\t\t\t\t\tactive: kind === 'outlined' ? [themeCss.outlinedLabelActive] : []\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\tvariant={variant}\n\t\t\t\tdisabled={disabled}\n\t\t\t\tvalid={valid}\n\t\t\t\tfocused={inputFocused}\n\t\t\t\treadOnly={readOnly}\n\t\t\t\trequired={required}\n\t\t\t\thidden={labelHidden}\n\t\t\t\tforId={widgetId}\n\t\t\t\tactive={labelActive}\n\t\t\t>\n\t\t\t\t{label}\n\t\t\t</Label>\n\t\t);\n\n\t\treturn kind === 'outlined' ? (\n\t\t\t<div classes={[themeCss.notchedOutline, labelActive && themeCss.notchedOutlineNotched]}>\n\t\t\t\t<div classes={themeCss.notchedOutlineLeading} />\n\t\t\t\t{label && (\n\t\t\t\t\t<div classes={themeCss.notchedOutlineNotch}>\n\t\t\t\t\t\t<span key=\"label\">{renderedLabel}</span>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t<div classes={themeCss.notchedOutlineTrailing} />\n\t\t\t</div>\n\t\t) : (\n\t\t\tlabel && renderedLabel\n\t\t);\n\t}\n\n\treturn (\n\t\t<div key=\"root\" classes={[theme.variant(), themeCss.root]}>\n\t\t\t<div\n\t\t\t\tkey=\"wrapper\"\n\t\t\t\tclasses={[\n\t\t\t\t\tthemeCss.wrapper,\n\t\t\t\t\tdisabled ? themeCss.disabled : null,\n\t\t\t\t\tvalid === false ? themeCss.invalid : null,\n\t\t\t\t\tvalid === true ? themeCss.valid : null,\n\t\t\t\t\treadOnly ? themeCss.readonly : null,\n\t\t\t\t\trequired ? themeCss.required : null,\n\t\t\t\t\tinputFocused ? themeCss.focused : null,\n\t\t\t\t\t!label || labelHidden ? themeCss.noLabel : null,\n\t\t\t\t\tkind === 'outlined' ? themeCss.outlinedKind : null,\n\t\t\t\t\tkind === 'filled' ? themeCss.defaultKind : null,\n\t\t\t\t\tkind === 'filled' && inputFocused ? themeCss.defaultKindFocused : null\n\t\t\t\t]}\n\t\t\t>\n\t\t\t\t{_renderLabel()}\n\t\t\t\t<div classes={themeCss.inputWrapper}>\n\t\t\t\t\t{kind === 'filled' && <span classes={themeCss.ripple} />}\n\t\t\t\t\t<textarea\n\t\t\t\t\t\tid={widgetId}\n\t\t\t\t\t\tkey=\"input\"\n\t\t\t\t\t\t{...formatAriaProperties(aria)}\n\t\t\t\t\t\tclasses={themeCss.input}\n\t\t\t\t\t\tcols={columns}\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\tfocus={focus.shouldFocus}\n\t\t\t\t\t\taria-invalid={valid === false ? 'true' : undefined}\n\t\t\t\t\t\tmaxlength={maxLength ? `${maxLength}` : null}\n\t\t\t\t\t\tminlength={minLength ? `${minLength}` : null}\n\t\t\t\t\t\tname={name}\n\t\t\t\t\t\tplaceholder={placeholder}\n\t\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\t\taria-readonly={readOnly ? 'true' : undefined}\n\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\trows={rows}\n\t\t\t\t\t\tvalue={value}\n\t\t\t\t\t\twrap={wrapText}\n\t\t\t\t\t\tonblur={() => {\n\t\t\t\t\t\t\tconst { onBlur } = properties();\n\t\t\t\t\t\t\tonBlur && onBlur();\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tonfocus={() => {\n\t\t\t\t\t\t\tconst { onFocus } = properties();\n\t\t\t\t\t\t\tonFocus && onFocus();\n\t\t\t\t\t\t}}\n\t\t\t\t\t\toninput={(event: Event) => {\n\t\t\t\t\t\t\tconst { onValue } = properties();\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t\tconst value = (event.target as HTMLInputElement).value;\n\t\t\t\t\t\t\ticache.set('value', value);\n\t\t\t\t\t\t\tonValue && onValue(value);\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tonkeydown={(event: KeyboardEvent) => {\n\t\t\t\t\t\t\tconst { onKeyDown } = properties();\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t\tonKeyDown &&\n\t\t\t\t\t\t\t\tonKeyDown(event.which, () => {\n\t\t\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tonkeyup={(event: KeyboardEvent) => {\n\t\t\t\t\t\t\tconst { onKeyUp } = properties();\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t\tonKeyUp &&\n\t\t\t\t\t\t\t\tonKeyUp(event.which, () => {\n\t\t\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tonclick={() => {\n\t\t\t\t\t\t\tconst { onClick } = properties();\n\t\t\t\t\t\t\tonClick && onClick();\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tonpointerenter={() => {\n\t\t\t\t\t\t\tconst { onOver } = properties();\n\t\t\t\t\t\t\tonOver && onOver();\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tonpointerleave={() => {\n\t\t\t\t\t\t\tconst { onOut } = properties();\n\t\t\t\t\t\t\tonOut && onOut();\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t\t{kind === 'filled' && (\n\t\t\t\t\t\t<span\n\t\t\t\t\t\t\tclasses={[\n\t\t\t\t\t\t\t\tthemeCss.lineRipple,\n\t\t\t\t\t\t\t\tinputFocused ? themeCss.defaultKindLineRippleFocused : null\n\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<HelperText\n\t\t\t\ttext={computedHelperText}\n\t\t\t\tvalid={valid}\n\t\t\t\tclasses={classes}\n\t\t\t\ttheme={themeProp}\n\t\t\t\tvariant={variant}\n\t\t\t/>\n\t\t</div>\n\t);\n});\n\nexport default TextArea;\n"]}