@ntbjs/react-components 2.0.2-rc.2 → 2.0.2-rc.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. package/build/inputs/ActionButton/ActionButton.js +9 -5
  2. package/build/inputs/ActionButton/ActionButton.js.map +1 -1
  3. package/build/inputs/ActionButton/ActionButton.styled.js +16 -13
  4. package/build/inputs/ActionButton/ActionButton.styled.js.map +1 -1
  5. package/build/inputs/CompactTextInput/CompactTextInput.js +59 -72
  6. package/build/inputs/CompactTextInput/CompactTextInput.js.map +1 -1
  7. package/build/inputs/CompactTextInput/CompactTextInput.styled.js +141 -226
  8. package/build/inputs/CompactTextInput/CompactTextInput.styled.js.map +1 -1
  9. package/build/inputs/TextArea/TextArea.js +67 -77
  10. package/build/inputs/TextArea/TextArea.js.map +1 -1
  11. package/build/inputs/TextArea/TextArea.styled.js +179 -220
  12. package/build/inputs/TextArea/TextArea.styled.js.map +1 -1
  13. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.js +20 -26
  14. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.js.map +1 -1
  15. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.styled.js +19 -15
  16. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.styled.js.map +1 -1
  17. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.js +18 -16
  18. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.js.map +1 -1
  19. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.styled.js +75 -34
  20. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.styled.js.map +1 -1
  21. package/build/widgets/Instructions/Instructions.js +0 -9
  22. package/build/widgets/Instructions/Instructions.js.map +1 -1
  23. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
2
- import React__default, { useRef, useState, useMemo, useEffect, useCallback } from 'react';
2
+ import React__default, { useRef, useState, useEffect, useCallback, useMemo, memo } from 'react';
3
3
  import { isEmpty } from 'lodash';
4
4
  import useMergedRefs from '@restart/hooks/useMergedRefs';
5
5
  import { nanoid } from 'nanoid';
@@ -12,7 +12,7 @@ import '../../data/Tabs/Tabs.js';
12
12
  import Tooltip from '../../data/Tooltip/Tooltip.js';
13
13
  import '../../data/VerificationStatusIcon/VerificationStatusIcon.js';
14
14
  import { ReactComponent as SvgEditNote } from '../../icons/edit-note.svg.js';
15
- import { TextAreaContainter, Label, SuccessContainerLabel, TextInput, TextInputFieldIconAlert, TextInputField, SuccessContainer, InputIconContainer, TextInputLabel, Description } from './TextArea.styled.js';
15
+ import { TextInputField, TextAreaContainter, Label, SuccessContainerLabel, TextInput, TextInputFieldIconAlert, SuccessContainer, InputIconContainer, TextInputLabel, Description } from './TextArea.styled.js';
16
16
 
17
17
  const TextArea = React__default.forwardRef(function TextArea({
18
18
  value,
@@ -46,89 +46,77 @@ const TextArea = React__default.forwardRef(function TextArea({
46
46
  const textInputDomNode = useRef(null);
47
47
  const textInputRef = useMergedRefs(forwardedRef, textInputDomNode);
48
48
  const [inputIsEmpty, setInputIsEmpty] = useState(!(value || defaultValue));
49
- const [autoFocus, setAutoFocus] = useState(false);
50
- const [uniqueId] = useState(nanoid());
51
- const memoizedDescriptionToolTip = useMemo(() => {
52
- return descriptionToolTip;
53
- }, [descriptionToolTip]);
49
+ const [uniqueId] = useState(() => nanoid());
54
50
  useEffect(() => {
55
- setAutoFocus(false);
51
+ setInputIsEmpty(!(value || defaultValue));
56
52
  }, [value, defaultValue]);
57
53
  const onKeyDown = useCallback(event => {
58
54
  if (event.key === 'Enter') {
59
55
  event.stopPropagation();
60
56
  }
61
57
  }, []);
62
- const input = () => {
63
- return React__default.createElement(TextAreaContainter, null, fieldLabel && React__default.createElement(Label, {
64
- htmlFor: uniqueId,
65
- disabled: disabled
66
- }, fieldLabel, React__default.createElement(SuccessContainerLabel, null, type === 'loading' && loadingIcon, type === 'success' && successIcon)), React__default.createElement(TextInput, {
67
- $fieldLabel: !isEmpty(fieldLabel),
68
- disabled: disabled,
69
- readOnly: readOnly,
70
- type: type,
71
- className: className,
72
- style: style
73
- }, React__default.createElement(TextInputFieldIconAlert, {
74
- type: type
75
- }, icon), React__default.createElement(TextInputField, _extends({
76
- autoFocus: autoFocus,
77
- $borderRadius: borderRadius,
78
- ref: textInputRef,
79
- rows: rows,
80
- value: value,
81
- defaultValue: defaultValue,
82
- name: name,
83
- placeholder: placeholder || ' ',
84
- required: required,
85
- readOnly: readOnly,
86
- disabled: disabled,
87
- $edit: edit,
88
- type: type,
89
- autoComplete: autoComplete,
90
- $hasIcon: Boolean(icon),
91
- id: `text-input-${uniqueId}`,
92
- key: uniqueId,
93
- $padding: padding,
94
- onChange: e => {
95
- if (e.target.value) {
96
- setInputIsEmpty(false);
97
- if (!autoFocus) {
98
- setAutoFocus(true);
99
- }
100
- } else {
101
- setInputIsEmpty(true);
102
- if (!autoFocus) {
103
- setAutoFocus(true);
104
- }
105
- }
106
- onChange(e);
107
- },
108
- onKeyDown: onKeyDown,
109
- onBlur: onBlur,
110
- $noBorder: noBorder
111
- }, rest)), !fieldLabel && (type === 'loading' || type === 'success') && React__default.createElement(SuccessContainer, null, type === 'loading' && loadingIcon, type === 'success' && successIcon), !readOnly && noBorder && React__default.createElement(InputIconContainer, {
112
- disabled: disabled
113
- }, React__default.createElement(SvgEditNote, {
114
- className: padding === 'small' ? 'smallPadingIcon' : undefined
115
- })), label && React__default.createElement(TextInputLabel, {
116
- htmlFor: `text-input-${uniqueId}`,
117
- $hasPlaceholder: Boolean(placeholder),
118
- $hasIcon: Boolean(icon),
119
- $inputIsEmpty: inputIsEmpty
120
- }, label, required && ' *'), typeof description === 'string' && description.length > 0 && React__default.createElement(Description, {
121
- type: type
122
- }, description)));
123
- };
58
+ const handleChange = useCallback(e => {
59
+ setInputIsEmpty(!e.target.value);
60
+ onChange(e);
61
+ }, [onChange]);
62
+ const textAreaElement = useMemo(() => React__default.createElement(TextInputField, _extends({
63
+ ref: textInputRef,
64
+ rows: rows,
65
+ value: value,
66
+ defaultValue: defaultValue,
67
+ name: name,
68
+ placeholder: placeholder,
69
+ required: required,
70
+ readOnly: readOnly,
71
+ disabled: disabled,
72
+ $edit: edit,
73
+ $type: type,
74
+ autoComplete: autoComplete,
75
+ $hasIcon: Boolean(icon),
76
+ id: `text-input-${uniqueId}`,
77
+ $padding: padding,
78
+ $borderRadius: borderRadius,
79
+ $noBorder: noBorder,
80
+ onChange: handleChange,
81
+ onKeyDown: onKeyDown,
82
+ onBlur: onBlur
83
+ }, rest)), [textInputRef, rows, value, defaultValue, name, placeholder, required, readOnly, disabled, edit, type, autoComplete, icon, uniqueId, padding, borderRadius, noBorder, handleChange, onKeyDown, onBlur, rest]);
84
+ const wrappedInput = useMemo(() => React__default.createElement(TextAreaContainter, null, fieldLabel && React__default.createElement(Label, {
85
+ htmlFor: uniqueId,
86
+ $disabled: disabled
87
+ }, fieldLabel, React__default.createElement(SuccessContainerLabel, {
88
+ $type: type
89
+ }, type === 'loading' && loadingIcon, type === 'success' && successIcon)), React__default.createElement(TextInput, {
90
+ $fieldLabel: !isEmpty(fieldLabel),
91
+ disabled: disabled,
92
+ readOnly: readOnly,
93
+ $type: type,
94
+ className: className,
95
+ style: style
96
+ }, icon && React__default.createElement(TextInputFieldIconAlert, {
97
+ $type: type
98
+ }, icon), textAreaElement, !fieldLabel && (type === 'loading' || type === 'success') && React__default.createElement(SuccessContainer, {
99
+ $type: type
100
+ }, type === 'loading' && loadingIcon, type === 'success' && successIcon), !readOnly && noBorder && React__default.createElement(InputIconContainer, {
101
+ $disabled: disabled
102
+ }, React__default.createElement(SvgEditNote, {
103
+ className: padding === 'small' ? 'smallPadingIcon' : undefined
104
+ })), label && React__default.createElement(TextInputLabel, {
105
+ htmlFor: `text-input-${uniqueId}`,
106
+ $hasPlaceholder: Boolean(placeholder),
107
+ $hasIcon: Boolean(icon),
108
+ $inputIsEmpty: inputIsEmpty
109
+ }, label, required && ' *'), typeof description === 'string' && description.length > 0 && React__default.createElement(Description, {
110
+ $type: type
111
+ }, description))), [fieldLabel, uniqueId, disabled, type, loadingIcon, successIcon, icon, textAreaElement, readOnly, noBorder, padding, label, placeholder, inputIsEmpty, required, description, className, style]);
124
112
  if (hidden) return null;
125
- return React__default.createElement(React__default.Fragment, null, !memoizedDescriptionToolTip && input(), memoizedDescriptionToolTip && React__default.createElement("div", null, React__default.createElement(Tooltip, {
126
- content: memoizedDescriptionToolTip,
127
- key: "tooltipTextArea1",
113
+ return React__default.createElement(Tooltip, {
114
+ content: descriptionToolTip || '',
128
115
  placement: "bottom-end",
129
- trigger: 'mouseenter',
130
- zIndex: 999999
131
- }, input())));
116
+ trigger: "mouseenter",
117
+ zIndex: 999999,
118
+ disabled: !descriptionToolTip
119
+ }, wrappedInput);
132
120
  });
133
121
  TextArea.defaultProps = {
134
122
  rows: 4,
@@ -164,12 +152,14 @@ TextArea.propTypes = process.env.NODE_ENV !== "production" ? {
164
152
  onChange: PropTypes.func,
165
153
  onBlur: PropTypes.func,
166
154
  noBorder: PropTypes.bool,
155
+ isExpanded: PropTypes.func,
167
156
  type: PropTypes.oneOf(['', 'error', 'error-border', 'warning-border', 'warning', 'loading', 'success']),
168
157
  loadingIcon: PropTypes.element,
169
158
  successIcon: PropTypes.element,
170
159
  descriptionToolTip: PropTypes.string,
171
160
  borderRadius: PropTypes.number
172
161
  } : {};
162
+ var TextArea$1 = memo(TextArea);
173
163
 
174
- export { TextArea as default };
164
+ export { TextArea$1 as default };
175
165
  //# sourceMappingURL=TextArea.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextArea.js","sources":["../../../src/components/inputs/TextArea/TextArea.js"],"sourcesContent":["import React, { useCallback, useEffect, useRef, useState, useMemo } from 'react';\n\nimport { isEmpty } from 'lodash';\nimport useMergedRefs from '@restart/hooks/useMergedRefs';\nimport { nanoid } from 'nanoid';\nimport PropTypes from 'prop-types';\nimport { Tooltip } from '../../data';\n\nimport { ReactComponent as EditNoteIcon } from '../../../icons/edit-note.svg';\nimport * as S from './TextArea.styled';\n\n/**\n * Text areas let users enter and edit text in the UI. They typically appear in forms and dialogs.\n *\n * ### Import\n *\n * ``` js\n * import { TextArea } from '@ntbjs/react-components/inputs'\n * // or\n * import TextArea from '@ntbjs/react-components/inputs/TextArea'\n * ```\n */\nconst TextArea = React.forwardRef(function TextArea(\n {\n value,\n defaultValue,\n name,\n label,\n placeholder,\n required,\n disabled,\n hidden,\n readOnly,\n edit,\n autoComplete,\n description,\n type,\n icon,\n rows,\n className,\n style,\n onChange,\n onBlur,\n noBorder,\n loadingIcon,\n successIcon,\n padding,\n descriptionToolTip,\n borderRadius,\n fieldLabel,\n ...rest\n },\n forwardedRef\n) {\n const textInputDomNode = useRef(null);\n const textInputRef = useMergedRefs(forwardedRef, textInputDomNode);\n\n const [inputIsEmpty, setInputIsEmpty] = useState(!(value || defaultValue));\n const [autoFocus, setAutoFocus] = useState(false);\n\n const [uniqueId] = useState(nanoid());\n\n const memoizedDescriptionToolTip = useMemo(() => {\n return descriptionToolTip;\n }, [descriptionToolTip]);\n\n useEffect(() => {\n setAutoFocus(false);\n }, [value, defaultValue]);\n\n const onKeyDown = useCallback(event => {\n if (event.key === 'Enter') {\n event.stopPropagation();\n }\n }, []);\n\n const input = () => {\n return (\n <S.TextAreaContainter>\n {fieldLabel && (\n <S.Label htmlFor={uniqueId} disabled={disabled}>\n {fieldLabel}\n <S.SuccessContainerLabel>\n {type === 'loading' && loadingIcon}\n {type === 'success' && successIcon}\n </S.SuccessContainerLabel>\n </S.Label>\n )}\n <S.TextInput\n $fieldLabel={!isEmpty(fieldLabel)}\n disabled={disabled}\n readOnly={readOnly}\n type={type}\n className={className}\n style={style}\n >\n <S.TextInputFieldIconAlert type={type}>{icon}</S.TextInputFieldIconAlert>\n <S.TextInputField\n autoFocus={autoFocus}\n $borderRadius={borderRadius}\n ref={textInputRef}\n rows={rows}\n value={value}\n defaultValue={defaultValue}\n name={name}\n placeholder={placeholder || ' '}\n required={required}\n readOnly={readOnly}\n disabled={disabled}\n $edit={edit}\n type={type}\n autoComplete={autoComplete}\n $hasIcon={Boolean(icon)}\n id={`text-input-${uniqueId}`}\n key={uniqueId}\n $padding={padding}\n onChange={e => {\n if (e.target.value) {\n setInputIsEmpty(false);\n if (!autoFocus) {\n setAutoFocus(true);\n }\n } else {\n setInputIsEmpty(true);\n if (!autoFocus) {\n setAutoFocus(true);\n }\n }\n onChange(e);\n }}\n onKeyDown={onKeyDown}\n onBlur={onBlur}\n $noBorder={noBorder}\n {...rest}\n />\n {!fieldLabel && (type === 'loading' || type === 'success') && (\n <S.SuccessContainer>\n {type === 'loading' && loadingIcon}\n {type === 'success' && successIcon}\n </S.SuccessContainer>\n )}\n {!readOnly && noBorder && (\n <S.InputIconContainer disabled={disabled}>\n <EditNoteIcon className={padding === 'small' ? 'smallPadingIcon' : undefined} />\n </S.InputIconContainer>\n )}\n {label && (\n <S.TextInputLabel\n htmlFor={`text-input-${uniqueId}`}\n $hasPlaceholder={Boolean(placeholder)}\n $hasIcon={Boolean(icon)}\n $inputIsEmpty={inputIsEmpty}\n >\n {label}\n {required && ' *'}\n </S.TextInputLabel>\n )}\n {typeof description === 'string' && description.length > 0 && (\n <S.Description type={type}>{description}</S.Description>\n )}\n </S.TextInput>\n </S.TextAreaContainter>\n );\n };\n\n if (hidden) return null;\n\n return (\n <>\n {!memoizedDescriptionToolTip && input()}\n {memoizedDescriptionToolTip && (\n <div>\n <Tooltip\n content={memoizedDescriptionToolTip}\n key=\"tooltipTextArea1\"\n placement=\"bottom-end\"\n trigger={'mouseenter'}\n zIndex={999999}\n >\n {input()}\n </Tooltip>\n </div>\n )}\n </>\n );\n});\n\nTextArea.defaultProps = {\n rows: 4,\n noBorder: false,\n readOnly: false,\n edit: false,\n hidden: false,\n type: '',\n padding: 'medium',\n descriptionToolTip: '',\n onChange: () => {},\n borderRadius: 0\n};\n\nTextArea.propTypes = {\n /**\n * Value to be sent. Typically the content of the text area.\n */\n value: PropTypes.string,\n\n /**\n * Default value/text to be displayed in the text area by default.\n */\n defaultValue: PropTypes.string,\n\n /**\n * Name of the text area (used when sending form data)\n */\n name: PropTypes.string,\n\n /**\n * Label text for the text area. If the text area is empty (no input and no placeholder)\n * and isn't in focus, the label text will be displayed grayed out in the text area itself.\n * Otherwise, the label text will be displayed in the top left corner.\n */\n label: PropTypes.string,\n\n /**\n * Field Label text for the text area field. I\n */\n fieldLabel: PropTypes.string,\n\n /**\n * Placeholder text to be displayed if the text area is empty (no input)\n */\n placeholder: PropTypes.string,\n\n /**\n * Whether the user is required to fill in the text area\n */\n required: PropTypes.bool,\n\n /**\n * Whether the text area is disabled\n */\n disabled: PropTypes.bool,\n /**\n * Whether the component is hidden or visible.\n */\n hidden: PropTypes.bool,\n /**\n * Whether the text area is read-only\n */\n readOnly: PropTypes.bool,\n /**\n * Displays a grey background to show that value is editable\n */\n edit: PropTypes.bool,\n /**\n * ?\n */\n autoComplete: PropTypes.string,\n /**\n * Descriptive text displayed below the text area\n */\n description: PropTypes.string,\n\n /**\n * Optional icon to be displayed left of the text inside the text area\n */\n icon: PropTypes.element,\n /**\n * How many rows/lines of text to be displayed by default\n */\n rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * Add custom class names to the HTML element\n */\n className: PropTypes.string,\n /**\n * Add custom CSS styling\n */\n style: PropTypes.object,\n /**\n * Add padding (small-medium-large)\n */\n padding: PropTypes.oneOf(['small', 'medium', 'large']),\n /**\n * Optional callback function for the `onChange` event\n */\n onChange: PropTypes.func,\n /**\n * Optional callback function for the `onBlur` event\n */\n onBlur: PropTypes.func,\n noBorder: PropTypes.bool,\n // warningAlert: PropTypes.bool,\n // errorAlert: PropTypes.bool,\n /**\n * Define the type based on error,error-border , warning, loading and success.\n */\n type: PropTypes.oneOf([\n '',\n 'error',\n 'error-border',\n 'warning-border',\n 'warning',\n 'loading',\n 'success'\n ]),\n /**\n * Icon element – E.g: `icon={<Spinner />}`\n */\n loadingIcon: PropTypes.element,\n /**\n * Icon element – E.g: `icon={<Check />}`\n */\n successIcon: PropTypes.element,\n /**\n * Description ToolTip text.\n */\n descriptionToolTip: PropTypes.string,\n /**\n * Border Radius for rounded borders.\n */\n borderRadius: PropTypes.number\n};\n\nexport default TextArea;\n"],"names":["TextArea","React","forwardRef","value","defaultValue","name","label","placeholder","required","disabled","hidden","readOnly","edit","autoComplete","description","type","icon","rows","className","style","onChange","onBlur","noBorder","loadingIcon","successIcon","padding","descriptionToolTip","borderRadius","fieldLabel","rest","forwardedRef","textInputDomNode","useRef","textInputRef","useMergedRefs","inputIsEmpty","setInputIsEmpty","useState","autoFocus","setAutoFocus","uniqueId","nanoid","memoizedDescriptionToolTip","useMemo","useEffect","onKeyDown","useCallback","event","key","stopPropagation","input","createElement","S","htmlFor","$fieldLabel","isEmpty","_extends","$borderRadius","ref","$edit","$hasIcon","Boolean","id","$padding","e","target","$noBorder","EditNoteIcon","undefined","$hasPlaceholder","$inputIsEmpty","length","Fragment","Tooltip","content","placement","trigger","zIndex","defaultProps","propTypes","process","env","NODE_ENV","PropTypes","string","bool","element","oneOfType","number","object","oneOf","func"],"mappings":";;;;;;;;;;;;;;;;AAsBMA,MAAAA,QAAQ,GAAGC,cAAK,CAACC,UAAU,CAAC,SAASF,QAAQA,CACjD;EACEG,KAAK;EACLC,YAAY;EACZC,IAAI;EACJC,KAAK;EACLC,WAAW;EACXC,QAAQ;EACRC,QAAQ;EACRC,MAAM;EACNC,QAAQ;EACRC,IAAI;EACJC,YAAY;EACZC,WAAW;EACXC,IAAI;EACJC,IAAI;EACJC,IAAI;EACJC,SAAS;EACTC,KAAK;EACLC,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AACO,KAAK,CAAC,CACpB,EAAE,EACF,OAAO,EACP,cAAc,EACd,gBAAgB,EAChB,SAAS,EACT,SAAS,EACT,SAAS,CACV,CAAC;EAIFnE,WAAW,EAAE4D,SAAS,CAACG,OAAO;EAI9B9D,WAAW,EAAE2D,SAAS,CAACG,OAAO;EAI9B5D,kBAAkB,EAAEyD,SAAS,CAACC,MAAM;EAIpCzD,YAAY,EAAEwD,SAAS,CAACK,MAAAA;AAC1B,CAAC,GAAA,EAAA;;;;"}
1
+ {"version":3,"file":"TextArea.js","sources":["../../../src/components/inputs/TextArea/TextArea.js"],"sourcesContent":["import React, { useCallback, useEffect, useRef, useState, useMemo, memo } from 'react';\nimport { isEmpty } from 'lodash';\nimport useMergedRefs from '@restart/hooks/useMergedRefs';\nimport { nanoid } from 'nanoid';\nimport PropTypes from 'prop-types';\nimport { Tooltip } from '../../data';\n\nimport { ReactComponent as EditNoteIcon } from '../../../icons/edit-note.svg';\nimport * as S from './TextArea.styled';\n\n/**\n * Text areas let users enter and edit text in the UI. They typically appear in forms and dialogs.\n *\n * ### Import\n *\n * ``` js\n * import { TextArea } from '@ntbjs/react-components/inputs'\n * // or\n * import TextArea from '@ntbjs/react-components/inputs/TextArea'\n * ```\n */\nconst TextArea = React.forwardRef(function TextArea(\n {\n value,\n defaultValue,\n name,\n label,\n placeholder,\n required,\n disabled,\n hidden,\n readOnly,\n edit,\n autoComplete,\n description,\n type,\n icon,\n rows,\n className,\n style,\n onChange,\n onBlur,\n noBorder,\n loadingIcon,\n successIcon,\n padding,\n descriptionToolTip,\n borderRadius,\n fieldLabel,\n ...rest\n },\n forwardedRef\n) {\n const textInputDomNode = useRef(null);\n const textInputRef = useMergedRefs(forwardedRef, textInputDomNode);\n\n const [inputIsEmpty, setInputIsEmpty] = useState(!(value || defaultValue));\n const [uniqueId] = useState(() => nanoid());\n\n useEffect(() => {\n setInputIsEmpty(!(value || defaultValue));\n }, [value, defaultValue]);\n\n const onKeyDown = useCallback(event => {\n if (event.key === 'Enter') {\n event.stopPropagation();\n }\n }, []);\n\n const handleChange = useCallback(\n e => {\n setInputIsEmpty(!e.target.value);\n onChange(e);\n },\n [onChange]\n );\n\n const textAreaElement = useMemo(\n () => (\n <S.TextInputField\n ref={textInputRef}\n rows={rows}\n value={value}\n defaultValue={defaultValue}\n name={name}\n placeholder={placeholder}\n required={required}\n readOnly={readOnly}\n disabled={disabled}\n $edit={edit}\n $type={type}\n autoComplete={autoComplete}\n $hasIcon={Boolean(icon)}\n id={`text-input-${uniqueId}`}\n $padding={padding}\n $borderRadius={borderRadius}\n $noBorder={noBorder}\n onChange={handleChange}\n onKeyDown={onKeyDown}\n onBlur={onBlur}\n {...rest}\n />\n ),\n [\n textInputRef,\n rows,\n value,\n defaultValue,\n name,\n placeholder,\n required,\n readOnly,\n disabled,\n edit,\n type,\n autoComplete,\n icon,\n uniqueId,\n padding,\n borderRadius,\n noBorder,\n handleChange,\n onKeyDown,\n onBlur,\n rest\n ]\n );\n\n const wrappedInput = useMemo(\n () => (\n <S.TextAreaContainter>\n {fieldLabel && (\n <S.Label htmlFor={uniqueId} $disabled={disabled}>\n {fieldLabel}\n <S.SuccessContainerLabel $type={type}>\n {type === 'loading' && loadingIcon}\n {type === 'success' && successIcon}\n </S.SuccessContainerLabel>\n </S.Label>\n )}\n <S.TextInput\n $fieldLabel={!isEmpty(fieldLabel)}\n disabled={disabled}\n readOnly={readOnly}\n $type={type}\n className={className}\n style={style}\n >\n {icon && <S.TextInputFieldIconAlert $type={type}>{icon}</S.TextInputFieldIconAlert>}\n {textAreaElement}\n {!fieldLabel && (type === 'loading' || type === 'success') && (\n <S.SuccessContainer $type={type}>\n {type === 'loading' && loadingIcon}\n {type === 'success' && successIcon}\n </S.SuccessContainer>\n )}\n {!readOnly && noBorder && (\n <S.InputIconContainer $disabled={disabled}>\n <EditNoteIcon className={padding === 'small' ? 'smallPadingIcon' : undefined} />\n </S.InputIconContainer>\n )}\n {label && (\n <S.TextInputLabel\n htmlFor={`text-input-${uniqueId}`}\n $hasPlaceholder={Boolean(placeholder)}\n $hasIcon={Boolean(icon)}\n $inputIsEmpty={inputIsEmpty}\n >\n {label}\n {required && ' *'}\n </S.TextInputLabel>\n )}\n {typeof description === 'string' && description.length > 0 && (\n <S.Description $type={type}>{description}</S.Description>\n )}\n </S.TextInput>\n </S.TextAreaContainter>\n ),\n [\n fieldLabel,\n uniqueId,\n disabled,\n type,\n loadingIcon,\n successIcon,\n icon,\n textAreaElement,\n readOnly,\n noBorder,\n padding,\n label,\n placeholder,\n inputIsEmpty,\n required,\n description,\n className,\n style\n ]\n );\n\n if (hidden) return null;\n\n return (\n <Tooltip\n content={descriptionToolTip || ''}\n placement=\"bottom-end\"\n trigger=\"mouseenter\"\n zIndex={999999}\n disabled={!descriptionToolTip}\n >\n {wrappedInput}\n </Tooltip>\n );\n});\n\nTextArea.defaultProps = {\n rows: 4,\n noBorder: false,\n readOnly: false,\n edit: false,\n hidden: false,\n type: '',\n padding: 'medium',\n descriptionToolTip: '',\n onChange: () => {},\n borderRadius: 0\n};\n\nTextArea.propTypes = {\n /**\n * Value to be sent. Typically the content of the text area.\n */\n value: PropTypes.string,\n\n /**\n * Default value/text to be displayed in the text area by default.\n */\n defaultValue: PropTypes.string,\n\n /**\n * Name of the text area (used when sending form data)\n */\n name: PropTypes.string,\n\n /**\n * Label text for the text area. If the text area is empty (no input and no placeholder)\n * and isn't in focus, the label text will be displayed grayed out in the text area itself.\n * Otherwise, the label text will be displayed in the top left corner.\n */\n label: PropTypes.string,\n\n /**\n * Field Label text for the text area field. I\n */\n fieldLabel: PropTypes.string,\n\n /**\n * Placeholder text to be displayed if the text area is empty (no input)\n */\n placeholder: PropTypes.string,\n\n /**\n * Whether the user is required to fill in the text area\n */\n required: PropTypes.bool,\n\n /**\n * Whether the text area is disabled\n */\n disabled: PropTypes.bool,\n /**\n * Whether the component is hidden or visible.\n */\n hidden: PropTypes.bool,\n /**\n * Whether the text area is read-only\n */\n readOnly: PropTypes.bool,\n /**\n * Displays a grey background to show that value is editable\n */\n edit: PropTypes.bool,\n /**\n * ?\n */\n autoComplete: PropTypes.string,\n /**\n * Descriptive text displayed below the text area\n */\n description: PropTypes.string,\n\n /**\n * Optional icon to be displayed left of the text inside the text area\n */\n icon: PropTypes.element,\n /**\n * How many rows/lines of text to be displayed by default\n */\n rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * Add custom class names to the HTML element\n */\n className: PropTypes.string,\n /**\n * Add custom CSS styling\n */\n style: PropTypes.object,\n /**\n * Add padding (small-medium-large)\n */\n padding: PropTypes.oneOf(['small', 'medium', 'large']),\n /**\n * Optional callback function for the `onChange` event\n */\n onChange: PropTypes.func,\n /**\n * Optional callback function for the `onBlur` event\n */\n onBlur: PropTypes.func,\n noBorder: PropTypes.bool,\n // warningAlert: PropTypes.bool,\n // errorAlert: PropTypes.bool,\n isExpanded: PropTypes.func,\n /**\n * Define the type based on error,error-border , warning, loading and success.\n */\n type: PropTypes.oneOf([\n '',\n 'error',\n 'error-border',\n 'warning-border',\n 'warning',\n 'loading',\n 'success'\n ]),\n /**\n * Icon element – E.g: `icon={<Spinner />}`\n */\n loadingIcon: PropTypes.element,\n /**\n * Icon element – E.g: `icon={<Check />}`\n */\n successIcon: PropTypes.element,\n /**\n * Description ToolTip text.\n */\n descriptionToolTip: PropTypes.string,\n /**\n * Border Radius for rounded borders.\n */\n borderRadius: PropTypes.number\n};\n\nexport default memo(TextArea);\n"],"names":["TextArea","React","forwardRef","value","defaultValue","name","label","placeholder","required","disabled","hidden","readOnly","edit","autoComplete","description","type","icon","rows","className","style","onChange","onBlur","noBorder","loadingIcon","successIcon","padding","descriptionToolTip","borderRadius","fieldLabel","rest","forwardedRef","textInputDomNode","useRef","textInputRef","useMergedRefs","inputIsEmpty","setInputIsEmpty","useState","uniqueId","nanoid","useEffect","onKeyDown","useCallback","event","key","stopPropagation","handleChange","e","target","textAreaElement","useMemo","createElement","S","_extends","ref","$edit","$type","$hasIcon","Boolean","id","$padding","$borderRadius","$noBorder","wrappedInput","htmlFor","$disabled","$fieldLabel","isEmpty","EditNoteIcon","undefined","$hasPlaceholder","$inputIsEmpty","length","Tooltip","content","placement","trigger","zIndex","defaultProps","propTypes","process","env","NODE_ENV","PropTypes","string","bool","element","oneOfType","number","object","oneOf","func","isExpanded","memo"],"mappings":";;;;;;;;;;;;;;;;AAqBA,MAAMA,QAAQ,GAAGC,cAAK,CAACC,UAAU,CAAC,SAASF,QAAQA,CACjD;EACEG,KAAK;EACLC,YAAY;EACZC,IAAI;EACJC,KAAK;EACLC,WAAW;EACXC,QAAQ;EACRC,QAAQ;EACRC,MAAM;EACNC,QAAQ;EACRC,IAAI;EACJC,YAAY;EACZC,WAAW;EACXC,IAAI;EACJC,IAAI;EACJC,IAAI;EACJC,SAAS;EACTC,KAAK;EACLC,QAAQ;EACRC,MAAM;EACNC,QAAQ;EACRC,WAAW;EACXC,WAAW;EACXC,OAAO;EACPC,kBAAkB;EAClBC,YAAY;EACZC,UAAU;EACV,GAAGC,IAAAA;AACL,CAAC,EACDC,YAAY,EACZ;AACA,EAAA,MAAMC,gBAAgB,GAAGC,MAAM,CAAC,IAAI,CAAC,CAAA;AACrC,EAAA,MAAMC,YAAY,GAAGC,aAAa,CAACJ,YAAY,EAAEC,gBAAgB,CAAC,CAAA;AAElE,EAAA,MAAM,CAACI,YAAY,EAAEC,eAAe,CAAC,GAAGC,QAAQ,CAAC,EAAElC,KAAK,IAAIC,YAAY,CAAC,CAAC,CAAA;EAC1E,MAAM,CAACkC,QAAQ,CAAC,GAAGD,QAAQ,CAAC,MAAME,MAAM,EAAE,CAAC,CAAA;AAE3CC,EAAAA,SAAS,CAAC,MAAM;AACdJ,IAAAA,eAAe,CAAC,EAAEjC,KAAK,IAAIC,YAAY,CAAC,CAAC,CAAA;AAC3C,GAAC,EAAE,CAACD,KAAK,EAAEC,YAAY,CAAC,CAAC,CAAA;AAEzB,EAAA,MAAMqC,SAAS,GAAGC,WAAW,CAACC,KAA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