{"version":3,"sources":["../../src/components/Label/Label.base.tsx","../../src/components/Label/Label.tsx","../../src/components/Label/Label.styles.ts","../../src/ie11Detector.ts","../../src/components/TextField/TextField.base.tsx","../../src/controlled.ts","../../src/components/TextField/TextField.styles.tsx","../../src/components/TextField/TextField.ts"],"names":["getClassNames","classNamesFunction","cacheSize","LabelBase","_super","__extends","prototype","render","_a","props","_b","as","RootType","children","className","disabled","styles","required","theme","classNames","React","__assign","getNativeProps","this","divProperties","root","Label","styled","semanticColors","labelFontWeight","FontWeights","semibold","labelColor","bodyText","labelDisabledColor","disabledBodyText","labelRequiredStarColor","errorText","fonts","medium","fontWeight","color","boxSizing","boxShadow","margin","display","padding","wordWrap","overflowWrap","selectors","HighContrastSelector","getHighContrastNoAdjustStyle","content","paddingRight","undefined","scope","isIE11","win","getWindow","navigator","userAgent","indexOf","__browserNeedsRevealButton","TextFieldBase","_this","call","_textElement","_onFocus","ev","onFocus","setState","isFocused","validateOnFocusIn","_validate","value","_onBlur","onBlur","validateOnFocusOut","_onRenderLabel","label","labelStyles","_classNames","subComponentStyles","htmlFor","_id","id","_labelId","_onRenderDescription","description","_onRevealButtonClick","event","prevState","isRevealingPassword","_onInputChange","target","previousValue","_getValue","state","_lastChangeValue","onChange","_isControlled","uncontrolledValue","initializeComponentRef","_async","Async","_fallbackId","getId","_descriptionId","COMPONENT_NAME","_warnControlledUsage","defaultValue","String","errorMessage","_delayedValidate","debounce","deferredValidationTime","_lastValidation","Object","defineProperty","componentDidMount","_adjustInputHeight","validateOnLoad","componentWillUnmount","dispose","getSnapshotBeforeUpdate","prevProps","selection","selectionStart","selectionEnd","componentDidUpdate","snapshot","start","end","multiline","focus","setSelectionRange","prevValue","_shouldValidateAllChanges","borderless","iconProps","inputClassName","underlined","prefix","resizable","suffix","autoAdjustHeight","canRevealPassword","type","onRenderPrefix","_onRenderPrefix","_c","onRenderSuffix","_onRenderSuffix","_d","onRenderLabel","_e","onRenderDescription","_f","_errorMessage","hasRevealButton","isEdge","test","_browserNeedsRevealButton","focused","hasLabel","hasErrorMessage","hasIcon","ref","elementRef","wrapper","fieldGroup","_renderTextArea","_renderInput","Icon","icon","revealButton","onClick","revealSpan","revealIcon","iconName","_isDescriptionAvailable","role","DelayedRender","_renderErrorMessage","current","blur","select","setSelectionStart","setSelectionEnd","_hasWarnedNullValue","warn","valueProp","style","paddingBottom","textAreaProps","textAreaProperties","ariaLabelledBy","onInput","field","ariaLabel","readOnly","inputProps","inputProperties","_latestValidateValue","onGetErrorMessage","result","currentValidation_1","then","_notifyAfterValidate","onNotifyValidationResult","textField","height","scrollHeight","defaultProps","globalClassNames","unresizable","active","getLabelStyles","palette","neutralTertiary","fontSize","marginRight","paddingLeft","lineHeight","TextField","effects","getGlobalClassNames","fieldPrefixSuffix","background","disabledBackground","disabledText","inputPlaceholderText","alignItems","whiteSpace","flexShrink","placeholderStyles","opacity","disabledPlaceholderStyles","normalize","position","borderBottom","inputBorder","width","borderBottomColor","borderColor","inputBorderHovered","getInputFocusStyle","inputFocusBorderAlt","border","borderRadius","roundedCorner2","inputBackground","cursor","flexDirection","minHeight","_g","flex","textAlign","backgroundColor","_h","top","right","inputText","minWidth","textOverflow","outline","_j","getPlaceholderStyles","resize","flexGrow","paddingTop","overflow","_k","_l","pointerEvents","bottom","IconFontSizes","bodySubtext","xSmall","AnimationClassNames","slideDownIn20","small","link","primaryButtonBackgroundHovered","buttonBackgroundHovered","_m"],"mappings":"4KAKMA,EAAgBC,YAAmD,CAIvEC,UAAW,MAGbC,EAAA,SAAAC,GAAA,SAAAD,I,+CAeA,OAf+BE,YAAAF,EAAAC,GACtBD,EAAAG,UAAAC,OAAP,WACQ,IAAAC,EAAA,KAAAC,MAAEC,EAAAF,EAAAG,GAAAC,OAAA,IAAAF,EAAA,QAAAA,EAAwBG,EAAAL,EAAAK,SAAUC,EAAAN,EAAAM,UAAWC,EAAAP,EAAAO,SAAUC,EAAAR,EAAAQ,OAAQC,EAAAT,EAAAS,SAAUC,EAAAV,EAAA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EAAW2H,OAAQqF,GAC5BnF,OAAQ,CAAC7H,EAAW6H,OAAQmF,GAC5BpD,aAAc,CACZ5J,EAAW4J,aACX,YACA,kBACA,CACEoC,OAAQ,GACR+B,MAAO,GACPM,OAAQ,OACR1M,QAAS,UACToN,gBAAiB,cACjBzN,MAAOb,EAAe8P,KACtBzO,UAAW,CACT,SAAU,CACRwN,QAAS,EACThO,MAAOb,EAAe+P,+BACtBzB,gBAAiBtO,EAAegQ,wBAChC3O,WAAS4O,EAAA,GACPA,EAAC3O,KAAuB,CACtBkM,YAAa,YACb3M,MAAO,a,IAIb,SAAU,CAAEgO,QAAS,KAGzBnG,GAAW,CACTuD,YAAa,KAGjB5C,WAAY,CACVpI,QAAS,OACTsK,OAAQ,OACRqB,WAAY,UAEdtD,WAAY,CACVtI,OAAQ,UACRsO,cAAe,OACfC,OAAQ,EACRd,MAAO,EACPD,IAAK,OACLxC,SAAUwD,IAAc7O,OACxBwL,WAAY,IAEd7I,mBAAoB,CAClBH,MAAO0I,EAAehN,YCpcA6C,EAAW,CACrCC,MAAO","file":"static/js/0.42e64234.chunk.js","sourcesContent":["import * as React from 'react';\nimport { divProperties, getNativeProps } from '../../Utilities';\nimport { classNamesFunction } from '../../Utilities';\nimport { ILabelProps, ILabelStyleProps, ILabelStyles } from './Label.types';\n\nconst getClassNames = classNamesFunction<ILabelStyleProps, ILabelStyles>({\n // Label is used a lot by other components.\n // It's likely to see expected cases which pass different className to the Label.\n // Therefore setting a larger cache size.\n cacheSize: 100,\n});\n\nexport class LabelBase extends React.Component<ILabelProps, {}> {\n public render(): JSX.Element {\n const { as: RootType = 'label', children, className, disabled, styles, required, theme } = this.props;\n const classNames = getClassNames(styles, {\n className,\n disabled,\n required,\n theme: theme!,\n });\n return (\n <RootType {...getNativeProps(this.props, divProperties)} className={classNames.root}>\n {children}\n </RootType>\n );\n }\n}\n","import * as React from 'react';\nimport { styled } from '../../Utilities';\nimport { LabelBase } from './Label.base';\nimport { getStyles } from './Label.styles';\nimport { ILabelProps, ILabelStyleProps, ILabelStyles } from './Label.types';\n\nexport const Label: React.FunctionComponent<ILabelProps> = styled<ILabelProps, ILabelStyleProps, ILabelStyles>(\n LabelBase,\n getStyles,\n undefined,\n {\n scope: 'Label',\n },\n);\n","import { HighContrastSelector, FontWeights, getHighContrastNoAdjustStyle } from '../../Styling';\nimport { ILabelStyleProps, ILabelStyles } from './Label.types';\n\nexport const getStyles = (props: ILabelStyleProps): ILabelStyles => {\n const { theme, className, disabled, required } = props;\n const { semanticColors } = theme;\n\n // Tokens\n const labelFontWeight = FontWeights.semibold;\n const labelColor = semanticColors.bodyText;\n const labelDisabledColor = semanticColors.disabledBodyText;\n const labelRequiredStarColor = semanticColors.errorText;\n\n return {\n root: [\n 'ms-Label',\n theme.fonts.medium,\n {\n fontWeight: labelFontWeight,\n color: labelColor,\n boxSizing: 'border-box',\n boxShadow: 'none',\n margin: 0,\n display: 'block',\n padding: '5px 0',\n wordWrap: 'break-word',\n overflowWrap: 'break-word',\n },\n disabled && {\n color: labelDisabledColor,\n selectors: {\n [HighContrastSelector]: {\n color: 'GrayText',\n ...getHighContrastNoAdjustStyle(),\n },\n },\n },\n required && {\n selectors: {\n '::after': {\n content: `' *'`,\n color: labelRequiredStarColor,\n paddingRight: 12,\n },\n },\n },\n className,\n ],\n };\n};\n","import { getWindow } from './dom/getWindow';\n\nexport const isIE11 = (): boolean => {\n const win = getWindow();\n\n if (!win?.navigator?.userAgent) {\n return false;\n }\n\n return win.navigator.userAgent.indexOf('rv:11.0') > -1;\n};\n","import * as React from 'react';\nimport { IProcessedStyleSet } from '../../Styling';\nimport { Label, ILabelStyleProps, ILabelStyles } from '../../Label';\nimport { Icon } from '../../Icon';\nimport {\n Async,\n classNamesFunction,\n DelayedRender,\n getId,\n getNativeProps,\n getWindow,\n IStyleFunctionOrObject,\n initializeComponentRef,\n inputProperties,\n isControlled,\n isIE11,\n textAreaProperties,\n warn,\n warnControlledUsage,\n warnMutuallyExclusive,\n} from '../../Utilities';\nimport { ITextField, ITextFieldProps, ITextFieldStyleProps, ITextFieldStyles } from './TextField.types';\n\nconst getClassNames = classNamesFunction<ITextFieldStyleProps, ITextFieldStyles>();\n\n/** @internal */\nexport interface ITextFieldState {\n /** The currently displayed value if uncontrolled. */\n uncontrolledValue: string | undefined;\n\n /** Is true when the control has focus. */\n isFocused?: boolean;\n\n /**\n * Dynamic error message returned by `onGetErrorMessage`.\n * Use `this._errorMessage` to get the actual current error message.\n */\n errorMessage: string | JSX.Element;\n\n /**\n * Whether this field has `type='password'` and `canRevealPassword=true`, and the password is\n * currently being revealed.\n */\n isRevealingPassword?: boolean;\n}\n\n/** @internal */\nexport interface ITextFieldSnapshot {\n /**\n * If set, the text field is changing between single- and multi-line, so we'll need to reset\n * selection/cursor after the change completes.\n */\n selection?: [number | null, number | null];\n}\n\nconst DEFAULT_STATE_VALUE = '';\nconst COMPONENT_NAME = 'TextField';\n\nconst REVEAL_ICON_NAME = 'RedEye';\nconst HIDE_ICON_NAME = 'Hide';\n\nexport class TextFieldBase extends React.Component<ITextFieldProps, ITextFieldState, ITextFieldSnapshot>\n implements ITextField {\n public static defaultProps: ITextFieldProps = {\n resizable: true,\n deferredValidationTime: 200,\n validateOnLoad: true,\n };\n\n /** Fallback ID if none is provided in props. Access proper value via `this._id`. */\n private _fallbackId: string;\n private _descriptionId: string;\n private _labelId: string;\n private _delayedValidate: (value: string | undefined) => void;\n private _lastValidation: number;\n private _latestValidateValue: string | undefined;\n private _hasWarnedNullValue: boolean | undefined;\n private _textElement = React.createRef<HTMLTextAreaElement | HTMLInputElement>();\n private _classNames: IProcessedStyleSet<ITextFieldStyles>;\n private _async: Async;\n /** Most recent value from a change or input event, to help avoid processing events twice */\n private _lastChangeValue: string | undefined;\n\n public constructor(props: ITextFieldProps) {\n super(props);\n\n initializeComponentRef(this);\n this._async = new Async(this);\n\n if (process.env.NODE_ENV !== 'production') {\n warnMutuallyExclusive(COMPONENT_NAME, props, {\n errorMessage: 'onGetErrorMessage',\n });\n }\n\n this._fallbackId = getId(COMPONENT_NAME);\n this._descriptionId = getId(COMPONENT_NAME + 'Description');\n this._labelId = getId(COMPONENT_NAME + 'Label');\n\n this._warnControlledUsage();\n\n let { defaultValue = DEFAULT_STATE_VALUE } = props;\n if (typeof defaultValue === 'number') {\n // This isn't allowed per the props, but happens anyway.\n defaultValue = String(defaultValue);\n }\n this.state = {\n uncontrolledValue: this._isControlled ? undefined : defaultValue,\n isFocused: false,\n errorMessage: '',\n };\n\n this._delayedValidate = this._async.debounce(this._validate, this.props.deferredValidationTime);\n this._lastValidation = 0;\n }\n\n /**\n * Gets the current value of the text field.\n */\n public get value(): string | undefined {\n return _getValue(this.props, this.state);\n }\n\n public componentDidMount(): void {\n this._adjustInputHeight();\n\n if (this.props.validateOnLoad) {\n this._validate(this.value);\n }\n }\n\n public componentWillUnmount() {\n this._async.dispose();\n }\n\n public getSnapshotBeforeUpdate(prevProps: ITextFieldProps, prevState: ITextFieldState): ITextFieldSnapshot | null {\n return {\n selection: [this.selectionStart, this.selectionEnd],\n };\n }\n\n public componentDidUpdate(\n prevProps: ITextFieldProps,\n prevState: ITextFieldState,\n snapshot: ITextFieldSnapshot,\n ): void {\n const props = this.props;\n const { selection = [null, null] } = snapshot || {};\n const [start, end] = selection;\n\n if (!!prevProps.multiline !== !!props.multiline && prevState.isFocused) {\n // The text field has just changed between single- and multi-line, so we need to reset focus\n // and selection/cursor.\n this.focus();\n if (start !== null && end !== null && start >= 0 && end >= 0) {\n this.setSelectionRange(start, end);\n }\n }\n\n if (prevProps.value !== props.value) {\n // Only if the value in props changed, reset the record of the last value seen by a\n // change/input event (don't do this if the value in state changed, since at least in tests\n // the state update may happen before the second event in a series)\n this._lastChangeValue = undefined;\n }\n\n const prevValue = _getValue(prevProps, prevState);\n const value = this.value;\n if (prevValue !== value) {\n // Handle controlled/uncontrolled warnings and status\n this._warnControlledUsage(prevProps);\n\n // Clear error message if needed\n // TODO: is there any way to do this without an extra render?\n if (this.state.errorMessage && !props.errorMessage) {\n this.setState({ errorMessage: '' });\n }\n\n // Adjust height if needed based on new value\n this._adjustInputHeight();\n\n // TODO: #5875 added logic to trigger validation in componentWillReceiveProps and other places.\n // This seems a bit odd and hard to integrate with the new approach.\n // (Starting to think we should just put the validation logic in a separate wrapper component...?)\n if (_shouldValidateAllChanges(props)) {\n this._delayedValidate(value);\n }\n }\n }\n\n public render(): JSX.Element {\n const {\n borderless,\n className,\n disabled,\n iconProps,\n inputClassName,\n label,\n multiline,\n required,\n underlined,\n prefix,\n resizable,\n suffix,\n theme,\n styles,\n autoAdjustHeight,\n canRevealPassword,\n type,\n onRenderPrefix = this._onRenderPrefix,\n onRenderSuffix = this._onRenderSuffix,\n onRenderLabel = this._onRenderLabel,\n onRenderDescription = this._onRenderDescription,\n } = this.props;\n const { isFocused, isRevealingPassword } = this.state;\n const errorMessage = this._errorMessage;\n\n const hasRevealButton = !!canRevealPassword && type === 'password' && _browserNeedsRevealButton();\n\n const classNames = (this._classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n disabled,\n focused: isFocused,\n required,\n multiline,\n hasLabel: !!label,\n hasErrorMessage: !!errorMessage,\n borderless,\n resizable,\n hasIcon: !!iconProps,\n underlined,\n inputClassName,\n autoAdjustHeight,\n hasRevealButton,\n }));\n\n return (\n // eslint-disable-next-line deprecation/deprecation\n <div ref={this.props.elementRef} className={classNames.root}>\n <div className={classNames.wrapper}>\n {onRenderLabel(this.props, this._onRenderLabel)}\n <div className={classNames.fieldGroup}>\n {(prefix !== undefined || this.props.onRenderPrefix) && (\n <div className={classNames.prefix}>{onRenderPrefix(this.props, this._onRenderPrefix)}</div>\n )}\n {multiline ? this._renderTextArea() : this._renderInput()}\n {iconProps && <Icon className={classNames.icon} {...iconProps} />}\n {hasRevealButton && (\n // Explicitly set type=\"button\" since the default button type within a form is \"submit\"\n <button className={classNames.revealButton} onClick={this._onRevealButtonClick} type=\"button\">\n <span className={classNames.revealSpan}>\n <Icon\n className={classNames.revealIcon}\n iconName={isRevealingPassword ? HIDE_ICON_NAME : REVEAL_ICON_NAME}\n />\n </span>\n </button>\n )}\n {(suffix !== undefined || this.props.onRenderSuffix) && (\n <div className={classNames.suffix}>{onRenderSuffix(this.props, this._onRenderSuffix)}</div>\n )}\n </div>\n </div>\n {this._isDescriptionAvailable && (\n <span id={this._descriptionId}>\n {onRenderDescription(this.props, this._onRenderDescription)}\n {errorMessage && (\n <div role=\"alert\">\n <DelayedRender>{this._renderErrorMessage()}</DelayedRender>\n </div>\n )}\n </span>\n )}\n </div>\n );\n }\n\n /**\n * Sets focus on the text field\n */\n public focus() {\n if (this._textElement.current) {\n this._textElement.current.focus();\n }\n }\n\n /**\n * Blurs the text field.\n */\n public blur() {\n if (this._textElement.current) {\n this._textElement.current.blur();\n }\n }\n\n /**\n * Selects the text field\n */\n public select() {\n if (this._textElement.current) {\n this._textElement.current.select();\n }\n }\n\n /**\n * Sets the selection start of the text field to a specified value\n */\n public setSelectionStart(value: number): void {\n if (this._textElement.current) {\n this._textElement.current.selectionStart = value;\n }\n }\n\n /**\n * Sets the selection end of the text field to a specified value\n */\n public setSelectionEnd(value: number): void {\n if (this._textElement.current) {\n this._textElement.current.selectionEnd = value;\n }\n }\n\n /**\n * Gets the selection start of the text field\n */\n public get selectionStart(): number | null {\n return this._textElement.current ? this._textElement.current.selectionStart : -1;\n }\n\n /**\n * Gets the selection end of the text field\n */\n public get selectionEnd(): number | null {\n return this._textElement.current ? this._textElement.current.selectionEnd : -1;\n }\n\n /**\n * Sets the start and end positions of a selection in a text field.\n * @param start - Index of the start of the selection.\n * @param end - Index of the end of the selection.\n */\n public setSelectionRange(start: number, end: number): void {\n if (this._textElement.current) {\n (this._textElement.current as HTMLInputElement).setSelectionRange(start, end);\n }\n }\n\n private _warnControlledUsage(prevProps?: ITextFieldProps): void {\n // Show warnings if props are being used in an invalid way\n warnControlledUsage({\n componentId: this._id,\n componentName: COMPONENT_NAME,\n props: this.props,\n oldProps: prevProps,\n valueProp: 'value',\n defaultValueProp: 'defaultValue',\n onChangeProp: 'onChange',\n readOnlyProp: 'readOnly',\n });\n\n if (this.props.value === null && !this._hasWarnedNullValue) {\n this._hasWarnedNullValue = true;\n warn(\n `Warning: 'value' prop on '${COMPONENT_NAME}' should not be null. Consider using an ` +\n 'empty string to clear the component or undefined to indicate an uncontrolled component.',\n );\n }\n }\n\n /** Returns `props.id` if available, or a fallback if not. */\n private get _id(): string {\n return this.props.id || this._fallbackId;\n }\n\n private get _isControlled(): boolean {\n return isControlled(this.props, 'value');\n }\n\n private _onFocus = (ev: React.FocusEvent<HTMLInputElement | HTMLTextAreaElement>): void => {\n if (this.props.onFocus) {\n this.props.onFocus(ev);\n }\n\n this.setState({ isFocused: true }, () => {\n if (this.props.validateOnFocusIn) {\n this._validate(this.value);\n }\n });\n };\n\n private _onBlur = (ev: React.FocusEvent<HTMLInputElement | HTMLTextAreaElement>): void => {\n if (this.props.onBlur) {\n this.props.onBlur(ev);\n }\n\n this.setState({ isFocused: false }, () => {\n if (this.props.validateOnFocusOut) {\n this._validate(this.value);\n }\n });\n };\n\n private _onRenderLabel = (props: ITextFieldProps): JSX.Element | null => {\n const { label, required } = props;\n // IProcessedStyleSet definition requires casting for what Label expects as its styles prop\n const labelStyles = this._classNames.subComponentStyles\n ? (this._classNames.subComponentStyles.label as IStyleFunctionOrObject<ILabelStyleProps, ILabelStyles>)\n : undefined;\n\n if (label) {\n return (\n <Label required={required} htmlFor={this._id} styles={labelStyles} disabled={props.disabled} id={this._labelId}>\n {props.label}\n </Label>\n );\n }\n return null;\n };\n\n private _onRenderDescription = (props: ITextFieldProps): JSX.Element | null => {\n if (props.description) {\n return <span className={this._classNames.description}>{props.description}</span>;\n }\n return null;\n };\n\n private _onRenderPrefix(props: ITextFieldProps): JSX.Element {\n const { prefix } = props;\n return <span style={{ paddingBottom: '1px' }}>{prefix}</span>;\n }\n\n private _onRenderSuffix(props: ITextFieldProps): JSX.Element {\n const { suffix } = props;\n return <span style={{ paddingBottom: '1px' }}>{suffix}</span>;\n }\n\n /**\n * Current error message from either `props.errorMessage` or the result of `props.onGetErrorMessage`.\n *\n * - If there is no validation error or we have not validated the input value, errorMessage is an empty string.\n * - If we have done the validation and there is validation error, errorMessage is the validation error message.\n */\n private get _errorMessage(): string | JSX.Element {\n const { errorMessage = this.state.errorMessage } = this.props;\n return errorMessage || '';\n }\n\n /**\n * Renders error message based on the type of the message.\n *\n * - If error message is string, it will render using the built in styles.\n * - If error message is an element, user has full control over how it's rendered.\n */\n private _renderErrorMessage(): JSX.Element | null {\n const errorMessage = this._errorMessage;\n\n return errorMessage ? (\n typeof errorMessage === 'string' ? (\n <p className={this._classNames.errorMessage}>\n <span data-automation-id=\"error-message\">{errorMessage}</span>\n </p>\n ) : (\n <div className={this._classNames.errorMessage} data-automation-id=\"error-message\">\n {errorMessage}\n </div>\n )\n ) : null;\n }\n\n /**\n * If a custom description render function is supplied then treat description as always available.\n * Otherwise defer to the presence of description or error message text.\n */\n private get _isDescriptionAvailable(): boolean {\n const props = this.props;\n return !!(props.onRenderDescription || props.description || this._errorMessage);\n }\n\n private _renderTextArea(): React.ReactElement<React.HTMLAttributes<HTMLAreaElement>> {\n const textAreaProps = getNativeProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>>(\n this.props,\n textAreaProperties,\n ['defaultValue'],\n );\n const ariaLabelledBy = this.props['aria-labelledby'] || (this.props.label ? this._labelId : undefined);\n return (\n <textarea\n id={this._id}\n {...textAreaProps}\n ref={this._textElement as React.RefObject<HTMLTextAreaElement>}\n value={this.value || ''}\n onInput={this._onInputChange}\n onChange={this._onInputChange}\n className={this._classNames.field}\n aria-labelledby={ariaLabelledBy}\n aria-describedby={this._isDescriptionAvailable ? this._descriptionId : this.props['aria-describedby']}\n aria-invalid={!!this._errorMessage}\n aria-label={this.props.ariaLabel}\n readOnly={this.props.readOnly}\n onFocus={this._onFocus}\n onBlur={this._onBlur}\n />\n );\n }\n\n private _renderInput(): React.ReactElement<React.HTMLAttributes<HTMLInputElement>> {\n const inputProps = getNativeProps<React.HTMLAttributes<HTMLInputElement>>(this.props, inputProperties, [\n 'defaultValue',\n 'type',\n ]);\n const ariaLabelledBy = this.props['aria-labelledby'] || (this.props.label ? this._labelId : undefined);\n const type = this.state.isRevealingPassword ? 'text' : this.props.type ?? 'text';\n return (\n <input\n type={type}\n id={this._id}\n aria-labelledby={ariaLabelledBy}\n {...inputProps}\n ref={this._textElement as React.RefObject<HTMLInputElement>}\n value={this.value || ''}\n onInput={this._onInputChange}\n onChange={this._onInputChange}\n className={this._classNames.field}\n aria-label={this.props.ariaLabel}\n aria-describedby={this._isDescriptionAvailable ? this._descriptionId : this.props['aria-describedby']}\n aria-invalid={!!this._errorMessage}\n readOnly={this.props.readOnly}\n onFocus={this._onFocus}\n onBlur={this._onBlur}\n />\n );\n }\n\n private _onRevealButtonClick = (event: React.MouseEvent<HTMLButtonElement>): void => {\n this.setState(prevState => ({ isRevealingPassword: !prevState.isRevealingPassword }));\n };\n\n private _onInputChange = (event: React.FormEvent<HTMLInputElement | HTMLTextAreaElement>): void => {\n // Previously, we needed to call both onInput and onChange due to some weird IE/React issues,\n // which have *probably* been fixed now:\n // - https://github.com/microsoft/fluentui/issues/744 (likely fixed)\n // - https://github.com/microsoft/fluentui/issues/824 (confirmed fixed)\n\n // TODO (Fabric 8?) - Switch to calling only onChange. This switch is pretty disruptive for\n // tests (ours and maybe consumers' too), so it seemed best to do the switch in a major bump.\n\n const element = event.target as HTMLInputElement;\n const value = element.value;\n // Ignore this event if any of the following are true:\n // - the value is undefined (in case one of the IE bugs comes back)\n // - it's a duplicate event (important since onInputChange is called twice per actual user event)\n // - it's the same as the previous value\n const previousValue = _getValue(this.props, this.state) || '';\n if (value === undefined || value === this._lastChangeValue || value === previousValue) {\n this._lastChangeValue = undefined;\n return;\n }\n this._lastChangeValue = value;\n\n this.props.onChange?.(event, value);\n\n if (!this._isControlled) {\n // ONLY if this is an uncontrolled component, update the displayed value.\n // (Controlled components must update the `value` prop from `onChange`.)\n this.setState({ uncontrolledValue: value });\n }\n };\n\n private _validate(value: string | undefined): void {\n // In case _validate is called again while validation promise is executing\n if (this._latestValidateValue === value && _shouldValidateAllChanges(this.props)) {\n return;\n }\n\n this._latestValidateValue = value;\n const onGetErrorMessage = this.props.onGetErrorMessage;\n const result = onGetErrorMessage && onGetErrorMessage(value || '');\n\n if (result !== undefined) {\n if (typeof result === 'string' || !('then' in result)) {\n this.setState({ errorMessage: result });\n this._notifyAfterValidate(value, result);\n } else {\n const currentValidation: number = ++this._lastValidation;\n\n result.then((errorMessage: string | JSX.Element) => {\n if (currentValidation === this._lastValidation) {\n this.setState({ errorMessage });\n }\n this._notifyAfterValidate(value, errorMessage);\n });\n }\n } else {\n this._notifyAfterValidate(value, '');\n }\n }\n\n private _notifyAfterValidate(value: string | undefined, errorMessage: string | JSX.Element): void {\n if (value === this.value && this.props.onNotifyValidationResult) {\n this.props.onNotifyValidationResult(errorMessage, value);\n }\n }\n\n private _adjustInputHeight(): void {\n if (this._textElement.current && this.props.autoAdjustHeight && this.props.multiline) {\n const textField = this._textElement.current;\n textField.style.height = '';\n textField.style.height = textField.scrollHeight + 'px';\n }\n }\n}\n\n/** Get the value from the given state and props (converting from number to string if needed) */\nfunction _getValue(props: ITextFieldProps, state: ITextFieldState): string | undefined {\n const { value = state.uncontrolledValue } = props;\n if (typeof value === 'number') {\n // not allowed per typings, but happens anyway\n return String(value);\n }\n return value;\n}\n\n/**\n * If `validateOnFocusIn` or `validateOnFocusOut` is true, validation should run **only** on that event.\n * Otherwise, validation should run on every change.\n */\nfunction _shouldValidateAllChanges(props: ITextFieldProps): boolean {\n return !(props.validateOnFocusIn || props.validateOnFocusOut);\n}\n\n// Only calculate this once across all TextFields, since will stay the same\nlet __browserNeedsRevealButton: boolean | undefined;\n\nfunction _browserNeedsRevealButton() {\n if (typeof __browserNeedsRevealButton !== 'boolean') {\n const win = getWindow();\n\n if (win?.navigator) {\n // Edge, Chromium Edge\n const isEdge = /Edg/.test(win.navigator.userAgent || '');\n\n __browserNeedsRevealButton = !(isIE11() || isEdge);\n } else {\n __browserNeedsRevealButton = true;\n }\n }\n return __browserNeedsRevealButton;\n}\n","/**\n * Determines whether a component is controlled.\n * @param props - Component props\n * @param valueProp - Prop containing the controlled value\n * @returns true if controlled, false if uncontrolled\n */\nexport function isControlled<P>(props: P, valueProp: keyof P): boolean {\n // React's built-in <input> considers a prop to be provided if its value is non-null/undefined.\n // Mirror that behavior here (rather than checking for just undefined).\n return props[valueProp] !== undefined && props[valueProp] !== null;\n}\n","import {\n AnimationClassNames,\n getGlobalClassNames,\n getInputFocusStyle,\n HighContrastSelector,\n IStyle,\n normalize,\n getPlaceholderStyles,\n IconFontSizes,\n getHighContrastNoAdjustStyle,\n} from '../../Styling';\nimport { ILabelStyles, ILabelStyleProps } from '../../Label';\nimport { ITextFieldStyleProps, ITextFieldStyles } from './TextField.types';\nimport { IStyleFunctionOrObject } from '@fluentui/utilities';\n\nconst globalClassNames = {\n root: 'ms-TextField',\n description: 'ms-TextField-description',\n errorMessage: 'ms-TextField-errorMessage',\n field: 'ms-TextField-field',\n fieldGroup: 'ms-TextField-fieldGroup',\n prefix: 'ms-TextField-prefix',\n suffix: 'ms-TextField-suffix',\n wrapper: 'ms-TextField-wrapper',\n revealButton: 'ms-TextField-reveal',\n\n multiline: 'ms-TextField--multiline',\n borderless: 'ms-TextField--borderless',\n underlined: 'ms-TextField--underlined',\n unresizable: 'ms-TextField--unresizable',\n\n required: 'is-required',\n disabled: 'is-disabled',\n active: 'is-active',\n};\n\nfunction getLabelStyles(props: ITextFieldStyleProps): IStyleFunctionOrObject<ILabelStyleProps, ILabelStyles> {\n const { underlined, disabled, focused, theme } = props;\n const { palette, fonts } = theme;\n\n return () => ({\n root: [\n underlined &&\n disabled && {\n color: palette.neutralTertiary,\n },\n underlined && {\n fontSize: fonts.medium.fontSize,\n marginRight: 8,\n paddingLeft: 12,\n paddingRight: 0,\n lineHeight: '22px',\n height: 32,\n },\n underlined &&\n focused && {\n selectors: {\n [HighContrastSelector]: {\n height: 31, // -1px to prevent jumpiness in HC with the increased border-width to 2px\n },\n },\n },\n ],\n });\n}\n\nexport function getStyles(props: ITextFieldStyleProps): ITextFieldStyles {\n const {\n theme,\n className,\n disabled,\n focused,\n required,\n multiline,\n hasLabel,\n borderless,\n underlined,\n hasIcon,\n resizable,\n hasErrorMessage,\n inputClassName,\n autoAdjustHeight,\n hasRevealButton,\n } = props;\n\n const { semanticColors, effects, fonts } = theme;\n\n const classNames = getGlobalClassNames(globalClassNames, theme);\n\n const fieldPrefixSuffix: IStyle = {\n // Suffix/Prefix are not editable so the disabled slot perfectly fits.\n background: semanticColors.disabledBackground,\n color: !disabled ? semanticColors.inputPlaceholderText : semanticColors.disabledText,\n display: 'flex',\n alignItems: 'center',\n padding: '0 10px',\n lineHeight: 1,\n whiteSpace: 'nowrap',\n flexShrink: 0,\n selectors: {\n [HighContrastSelector]: {\n background: 'Window',\n color: disabled ? 'GrayText' : 'WindowText',\n },\n },\n };\n\n // placeholder style constants\n const placeholderStyles: IStyle = [\n fonts.medium,\n {\n color: semanticColors.inputPlaceholderText,\n opacity: 1,\n selectors: {\n [HighContrastSelector]: {\n color: 'GrayText',\n },\n },\n },\n ];\n\n const disabledPlaceholderStyles: IStyle = {\n color: semanticColors.disabledText,\n selectors: {\n [HighContrastSelector]: {\n color: 'GrayText',\n },\n },\n };\n\n return {\n root: [\n classNames.root,\n fonts.medium,\n required && classNames.required,\n disabled && classNames.disabled,\n focused && classNames.active,\n multiline && classNames.multiline,\n borderless && classNames.borderless,\n underlined && classNames.underlined,\n normalize,\n {\n position: 'relative',\n },\n className,\n ],\n wrapper: [\n classNames.wrapper,\n\n underlined && [\n {\n display: 'flex',\n borderBottom: `1px solid ${!hasErrorMessage ? semanticColors.inputBorder : semanticColors.errorText}`,\n width: '100%',\n },\n disabled && {\n borderBottomColor: semanticColors.disabledBackground,\n selectors: {\n [HighContrastSelector]: {\n borderColor: 'GrayText',\n ...getHighContrastNoAdjustStyle(),\n },\n },\n },\n !disabled && {\n selectors: {\n ':hover': {\n borderBottomColor: !hasErrorMessage ? semanticColors.inputBorderHovered : semanticColors.errorText,\n selectors: {\n [HighContrastSelector]: {\n borderBottomColor: 'Highlight',\n ...getHighContrastNoAdjustStyle(),\n },\n },\n },\n },\n },\n focused && [\n {\n position: 'relative',\n },\n getInputFocusStyle(\n !hasErrorMessage ? semanticColors.inputFocusBorderAlt : semanticColors.errorText,\n 0,\n 'borderBottom',\n ),\n ],\n ],\n ],\n fieldGroup: [\n classNames.fieldGroup,\n normalize,\n {\n border: `1px solid ${semanticColors.inputBorder}`,\n borderRadius: effects.roundedCorner2,\n background: semanticColors.inputBackground,\n cursor: 'text',\n height: 32,\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'stretch',\n position: 'relative',\n },\n multiline && {\n minHeight: '60px',\n height: 'auto',\n display: 'flex',\n },\n\n !focused &&\n !disabled && {\n selectors: {\n ':hover': {\n borderColor: semanticColors.inputBorderHovered,\n selectors: {\n [HighContrastSelector]: {\n borderColor: 'Highlight',\n ...getHighContrastNoAdjustStyle(),\n },\n },\n },\n },\n },\n\n focused &&\n !underlined &&\n getInputFocusStyle(\n !hasErrorMessage ? semanticColors.inputFocusBorderAlt : semanticColors.errorText,\n effects.roundedCorner2,\n ),\n disabled && {\n borderColor: semanticColors.disabledBackground,\n selectors: {\n [HighContrastSelector]: {\n borderColor: 'GrayText',\n ...getHighContrastNoAdjustStyle(),\n },\n },\n\n cursor: 'default',\n },\n borderless && {\n border: 'none',\n },\n borderless &&\n focused && {\n border: 'none',\n selectors: {\n ':after': {\n border: 'none',\n },\n },\n },\n underlined && {\n flex: '1 1 0px',\n border: 'none',\n textAlign: 'left',\n },\n underlined &&\n disabled && {\n backgroundColor: 'transparent',\n },\n\n hasErrorMessage &&\n !underlined && {\n borderColor: semanticColors.errorText,\n selectors: {\n '&:hover': {\n borderColor: semanticColors.errorText,\n },\n },\n },\n !hasLabel &&\n required && {\n selectors: {\n ':before': {\n content: `'*'`,\n color: semanticColors.errorText,\n position: 'absolute',\n top: -5,\n right: -10,\n },\n [HighContrastSelector]: {\n selectors: {\n ':before': {\n color: 'WindowText',\n right: -14, // moving the * 4 pixel to right to alleviate border clipping in HC mode.\n },\n },\n },\n },\n },\n ],\n field: [\n fonts.medium,\n classNames.field,\n normalize,\n {\n borderRadius: 0,\n border: 'none',\n background: 'none',\n backgroundColor: 'transparent',\n color: semanticColors.inputText,\n padding: '0 8px',\n width: '100%',\n minWidth: 0,\n textOverflow: 'ellipsis',\n outline: 0,\n selectors: {\n '&:active, &:focus, &:hover': { outline: 0 },\n '::-ms-clear': {\n display: 'none',\n },\n [HighContrastSelector]: {\n background: 'Window',\n color: disabled ? 'GrayText' : 'WindowText',\n },\n },\n },\n getPlaceholderStyles(placeholderStyles),\n multiline &&\n !resizable && [\n classNames.unresizable,\n {\n resize: 'none',\n },\n ],\n multiline && {\n minHeight: 'inherit',\n lineHeight: 17,\n flexGrow: 1,\n paddingTop: 6,\n paddingBottom: 6,\n overflow: 'auto',\n width: '100%',\n },\n multiline &&\n autoAdjustHeight && {\n overflow: 'hidden',\n },\n hasIcon &&\n !hasRevealButton && {\n paddingRight: 24,\n },\n multiline &&\n hasIcon && {\n paddingRight: 40,\n },\n disabled && [\n {\n backgroundColor: semanticColors.disabledBackground,\n color: semanticColors.disabledText,\n borderColor: semanticColors.disabledBackground,\n },\n getPlaceholderStyles(disabledPlaceholderStyles),\n ],\n underlined && {\n textAlign: 'left',\n },\n focused &&\n !borderless && {\n selectors: {\n [HighContrastSelector]: {\n paddingLeft: 11,\n paddingRight: 11,\n },\n },\n },\n focused &&\n multiline &&\n !borderless && {\n selectors: {\n [HighContrastSelector]: {\n paddingTop: 4, // take into consideration the 2px increased border-width (not when borderless).\n },\n },\n },\n inputClassName,\n ],\n icon: [\n multiline && {\n paddingRight: 24,\n alignItems: 'flex-end',\n },\n {\n pointerEvents: 'none',\n position: 'absolute',\n bottom: 6,\n right: 8,\n top: 'auto',\n fontSize: IconFontSizes.medium,\n lineHeight: 18,\n },\n disabled && {\n color: semanticColors.disabledText,\n },\n ],\n description: [\n classNames.description,\n {\n color: semanticColors.bodySubtext,\n fontSize: fonts.xSmall.fontSize,\n },\n ],\n errorMessage: [\n classNames.errorMessage,\n AnimationClassNames.slideDownIn20,\n fonts.small,\n {\n color: semanticColors.errorText,\n margin: 0,\n paddingTop: 5,\n display: 'flex',\n alignItems: 'center',\n },\n ],\n prefix: [classNames.prefix, fieldPrefixSuffix],\n suffix: [classNames.suffix, fieldPrefixSuffix],\n revealButton: [\n classNames.revealButton,\n 'ms-Button',\n 'ms-Button--icon',\n {\n height: 30,\n width: 32,\n border: 'none',\n padding: '0px 4px',\n backgroundColor: 'transparent',\n color: semanticColors.link,\n selectors: {\n ':hover': {\n outline: 0,\n color: semanticColors.primaryButtonBackgroundHovered,\n backgroundColor: semanticColors.buttonBackgroundHovered,\n selectors: {\n [HighContrastSelector]: {\n borderColor: 'Highlight',\n color: 'Highlight',\n },\n },\n },\n ':focus': { outline: 0 },\n },\n },\n hasIcon && {\n marginRight: 28,\n },\n ],\n revealSpan: {\n display: 'flex',\n height: '100%',\n alignItems: 'center',\n },\n revealIcon: {\n margin: '0px 4px',\n pointerEvents: 'none',\n bottom: 6,\n right: 8,\n top: 'auto',\n fontSize: IconFontSizes.medium,\n lineHeight: 18,\n },\n subComponentStyles: {\n label: getLabelStyles(props),\n },\n };\n}\n","import * as React from 'react';\nimport { styled } from '../../Utilities';\nimport { TextFieldBase } from './TextField.base';\nimport { ITextFieldProps, ITextFieldStyles, ITextFieldStyleProps } from './TextField.types';\nimport { getStyles } from './TextField.styles';\nexport { ITextField } from './TextField.types';\n\nexport const TextField: React.FunctionComponent<ITextFieldProps> = styled<\n ITextFieldProps,\n ITextFieldStyleProps,\n ITextFieldStyles\n>(TextFieldBase, getStyles, undefined, {\n scope: 'TextField',\n});\n"],"sourceRoot":""}