{
  "version": 3,
  "sources": ["../../src/textarea-control/index.tsx"],
  "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport { StyledTextarea } from './styles/textarea-control-styles';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedTextareaControl(props, ref) {\n  const {\n    // Prevent passing this to `textarea`.\n    __nextHasNoMarginBottom: _,\n    label,\n    hideLabelFromVision,\n    value,\n    help,\n    onChange,\n    rows = 4,\n    className,\n    ...additionalProps\n  } = props;\n  const instanceId = useInstanceId(TextareaControl);\n  const id = `inspector-textarea-control-${instanceId}`;\n  const onChangeValue = event => onChange(event.target.value);\n  const classes = clsx('components-textarea-control', className);\n  return /*#__PURE__*/_jsx(BaseControl, {\n    label: label,\n    hideLabelFromVision: hideLabelFromVision,\n    id: id,\n    help: help,\n    className: classes,\n    children: /*#__PURE__*/_jsx(StyledTextarea, {\n      className: \"components-textarea-control__input\",\n      id: id,\n      rows: rows,\n      onChange: onChangeValue,\n      \"aria-describedby\": !!help ? id + '__help' : undefined,\n      value: value,\n      ref: ref,\n      ...additionalProps\n    })\n  });\n}\n\n/**\n * TextareaControls are TextControls that allow for multiple lines of text, and\n * wrap overflow text onto a new line. They are a fixed height and scroll\n * vertically when the cursor reaches the bottom of the field.\n *\n * ```jsx\n * import { TextareaControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyTextareaControl = () => {\n *   const [ text, setText ] = useState( '' );\n *\n *   return (\n *     <TextareaControl\n *       label=\"Text\"\n *       help=\"Enter some text\"\n *       value={ text }\n *       onChange={ ( value ) => setText( value ) }\n *     />\n *   );\n * };\n * ```\n */\nexport const TextareaControl = forwardRef(UnforwardedTextareaControl);\nTextareaControl.displayName = 'TextareaControl';\nexport default TextareaControl;"],
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAKjB,qBAA8B;AAC9B,qBAA2B;AAK3B,0BAAwB;AACxB,qCAA+B;AAC/B,yBAA4B;AAC5B,SAAS,2BAA2B,OAAO,KAAK;AAC9C,QAAM;AAAA;AAAA,IAEJ,yBAAyB;AAAA,IACzB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,iBAAa,8BAAc,eAAe;AAChD,QAAM,KAAK,8BAA8B,UAAU;AACnD,QAAM,gBAAgB,WAAS,SAAS,MAAM,OAAO,KAAK;AAC1D,QAAM,cAAU,YAAAA,SAAK,+BAA+B,SAAS;AAC7D,SAAoB,uCAAAC,KAAK,oBAAAC,SAAa;AAAA,IACpC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW;AAAA,IACX,UAAuB,uCAAAD,KAAK,+CAAgB;AAAA,MAC1C,WAAW;AAAA,MACX;AAAA,MACA;AAAA,MACA,UAAU;AAAA,MACV,oBAAoB,CAAC,CAAC,OAAO,KAAK,WAAW;AAAA,MAC7C;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACL,CAAC;AAAA,EACH,CAAC;AACH;AAyBO,IAAM,sBAAkB,2BAAW,0BAA0B;AACpE,gBAAgB,cAAc;AAC9B,IAAO,2BAAQ;",
  "names": ["clsx", "_jsx", "BaseControl"]
}
