{"mappings":";;;;;;;;;;;;;;;;;;;;;;AAuBO,MAAM,0DAAkB,CAAA,GAAA,0BAAY,EAAoD,CAAC;AAEhG,IAAI,yCAAmB,CAAC;IACtB,6DAA6D;IAC7D,IAAI,gBAAC,YAAY,iBAAE,aAAa,cAAE,UAAU,EAAE,GAAG,YAAW,GAAG;IAC/D,OAAO;AACT;AAKO,MAAM,0DAAW,CAAA,GAAA,uBAAS,EAAE,SAAS,SAAS,KAAoB,EAAE,GAAsC;IAC/G,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAE3C,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,iCAAO,EAAE;IACvC,IAAI,aAAC,SAAS,kBAAE,cAAc,cAAE,UAAU,EAAC,GAAG,CAAA,GAAA,yCAAW,EAAE;QACzD,aAAa;QACb,WAAW,MAAM,SAAS;IAC5B;IAEA,IAAI,YAAY,CAAC,CAAC,KAAK,CAAC,eAAe,IAAI,KAAK,CAAC,eAAe,KAAK;IACrE,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,QAAQ;uBACN;uBACA;4BACA;YACA,YAAY,MAAM,QAAQ,IAAI;uBAC9B;QACF;QACA,kBAAkB;IACpB;IAEA,qBACE,0DAAC,CAAA,GAAA,6BAAE,EAAE,QAAQ;QACV,GAAG,CAAA,GAAA,qCAAS,EAAE,uCAAiB,QAAQ,YAAY,WAAW;QAC9D,GAAG,WAAW;QACf,KAAK;QACL,gBAAc,aAAa;QAC3B,iBAAe,MAAM,QAAQ,IAAI;QACjC,gBAAc,aAAa;QAC3B,sBAAoB,kBAAkB;QACtC,gBAAc,aAAa;;AAEjC","sources":["packages/react-aria-components/src/TextArea.tsx"],"sourcesContent":["import {\n  ClassNameOrFunction,\n  ContextValue,\n  dom,\n  StyleRenderProps,\n  useContextProps,\n  useRenderProps\n} from './utils';\nimport {HoverEvents} from '@react-types/shared';\nimport {InputRenderProps} from './Input';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport React, {createContext, ForwardedRef, forwardRef, TextareaHTMLAttributes} from 'react';\nimport {useFocusRing} from 'react-aria/useFocusRing';\nimport {useHover} from 'react-aria/useHover';\n\nexport interface TextAreaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'className' | 'style'>, HoverEvents, StyleRenderProps<InputRenderProps, 'textarea'> {\n  /**\n   * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n   * @default 'react-aria-TextArea'\n   */\n  className?: ClassNameOrFunction<InputRenderProps>\n}\n\nexport const TextAreaContext = createContext<ContextValue<TextAreaProps, HTMLTextAreaElement>>({});\n\nlet filterHoverProps = (props: TextAreaProps): TextAreaProps => {\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  let {onHoverStart, onHoverChange, onHoverEnd, ...otherProps} = props;\n  return otherProps;\n};\n\n/**\n * A textarea allows a user to input mult-line text.\n */\nexport const TextArea = forwardRef(function TextArea(props: TextAreaProps, ref: ForwardedRef<HTMLTextAreaElement>) {\n  [props, ref] = useContextProps(props, ref, TextAreaContext);\n\n  let {hoverProps, isHovered} = useHover(props);\n  let {isFocused, isFocusVisible, focusProps} = useFocusRing({\n    isTextInput: true,\n    autoFocus: props.autoFocus\n  });\n\n  let isInvalid = !!props['aria-invalid'] && props['aria-invalid'] !== 'false';\n  let renderProps = useRenderProps({\n    ...props,\n    values: {\n      isHovered,\n      isFocused,\n      isFocusVisible,\n      isDisabled: props.disabled || false,\n      isInvalid\n    },\n    defaultClassName: 'react-aria-TextArea'\n  });\n\n  return (\n    <dom.textarea\n      {...mergeProps(filterHoverProps(props), focusProps, hoverProps)}\n      {...renderProps}\n      ref={ref}\n      data-focused={isFocused || undefined}\n      data-disabled={props.disabled || undefined}\n      data-hovered={isHovered || undefined}\n      data-focus-visible={isFocusVisible || undefined}\n      data-invalid={isInvalid || undefined} />\n  );\n});\n"],"names":[],"version":3,"file":"TextArea.cjs.map"}