@elliemae/ds-form-input-textarea 3.12.0 → 3.13.0-next.1

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.
@@ -41,11 +41,11 @@ const DSControlledLargeTextInput = (props) => {
41
41
  const { value, onChange, innerRef, resizable, name, id, hasError, maxHeight, ...otherProps } = propsWithDefault;
42
42
  const { className, ...globalAttributes } = (0, import_ds_utilities.useGetGlobalAttributes)(otherProps);
43
43
  const xstyledProps = (0, import_ds_utilities.useGetXstyledProps)(otherProps);
44
- const [calculatedMinHeight, setCalculatedMinHeight] = (0, import_react.useState)();
44
+ const [calculatedMinHeight, setCalculatedMinHeight] = (0, import_react.useState)(void 0);
45
45
  const textareaRef = (0, import_react.useRef)(null);
46
46
  const ghostRef = (0, import_react.useRef)(null);
47
47
  const handleOnChange = (0, import_react.useCallback)(
48
- (e) => onChange(e.currentTarget.value, e),
48
+ (e) => onChange(e.target.value, e),
49
49
  [onChange]
50
50
  );
51
51
  (0, import_react.useLayoutEffect)(() => {
@@ -53,31 +53,23 @@ const DSControlledLargeTextInput = (props) => {
53
53
  ghostRef.current.style.maxHeight = "0px";
54
54
  const { scrollHeight } = ghostRef.current;
55
55
  if (maxHeight !== void 0 && scrollHeight >= maxHeight)
56
- setCalculatedMinHeight(maxHeight);
56
+ setCalculatedMinHeight(`${maxHeight}`);
57
57
  else
58
- setCalculatedMinHeight(scrollHeight);
59
- if (maxHeight)
60
- ghostRef.current.style.maxHeight = `${maxHeight}px`;
58
+ setCalculatedMinHeight(`${scrollHeight}`);
59
+ ghostRef.current.style.maxHeight = `${maxHeight}px`;
61
60
  }
62
61
  }, [maxHeight, value]);
63
- const getReferenceSetter = (0, import_react.useCallback)(() => {
64
- const refToMerge = [textareaRef];
65
- if (innerRef)
66
- refToMerge.push(innerRef);
67
- return (0, import_ds_utilities.mergeRefs)(...refToMerge);
68
- }, [innerRef]);
69
62
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
70
63
  import_styles.StyledContainer,
71
64
  {
72
65
  className,
73
66
  "data-testid": import_exported_related.DSControlledLargetTextInputDatatestids.CONTAINER,
74
- $isDisabled: otherProps.disabled,
75
67
  ...xstyledProps,
76
68
  children: [
77
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.WrapperBorder, { $hasError: hasError, $isDisabled: otherProps.disabled, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
69
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.WrapperBorder, { $hasError: hasError, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
78
70
  import_styles.StyledTextArea,
79
71
  {
80
- ref: getReferenceSetter,
72
+ ref: (0, import_ds_utilities.mergeRefs)(innerRef, textareaRef),
81
73
  "aria-multiline": true,
82
74
  value,
83
75
  $maxHeight: maxHeight,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/DSControlledLargeTextInput.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport React, { useCallback, useRef, useState, useLayoutEffect } from 'react';\nimport {\n describe,\n mergeRefs,\n useValidateTypescriptPropTypes,\n useMemoMergePropsWithDefault,\n useGetGlobalAttributes,\n useGetXstyledProps,\n} from '@elliemae/ds-utilities';\nimport { propTypes, defaultProps } from './react-desc-prop-types';\nimport { StyledTextArea, StyledContainer, WrapperBorder } from './styles';\nimport { DSControlledLargeTextInputName, DSControlledLargetTextInputDatatestids } from './exported-related';\nimport type { DSControlledLargeTextInputT } from './react-desc-prop-types';\n\nconst DSControlledLargeTextInput = (props: DSControlledLargeTextInputT.Props): JSX.Element => {\n useValidateTypescriptPropTypes(props, propTypes, DSControlledLargeTextInputName);\n\n const propsWithDefault = useMemoMergePropsWithDefault<DSControlledLargeTextInputT.Props>(props, defaultProps);\n\n const { value, onChange, innerRef, resizable, name, id, hasError, maxHeight, ...otherProps } = propsWithDefault;\n\n const { className, ...globalAttributes } = useGetGlobalAttributes(otherProps);\n\n const xstyledProps = useGetXstyledProps(otherProps);\n\n const [calculatedMinHeight, setCalculatedMinHeight] = useState<number>();\n\n const textareaRef = useRef<HTMLTextAreaElement | null>(null);\n const ghostRef = useRef<HTMLTextAreaElement | null>(null);\n\n const handleOnChange = useCallback<React.KeyboardEventHandler<HTMLInputElement>>(\n (e) => onChange(e.currentTarget.value, e),\n [onChange],\n );\n\n useLayoutEffect(() => {\n if (ghostRef && ghostRef.current && value !== '') {\n ghostRef.current.style.maxHeight = '0px';\n const { scrollHeight } = ghostRef.current;\n if (maxHeight !== undefined && scrollHeight >= maxHeight) setCalculatedMinHeight(maxHeight);\n else setCalculatedMinHeight(scrollHeight);\n if (maxHeight) ghostRef.current.style.maxHeight = `${maxHeight}px`;\n }\n }, [maxHeight, value]);\n const getReferenceSetter = useCallback(() => {\n const refToMerge = [textareaRef];\n if (innerRef) refToMerge.push(innerRef);\n return mergeRefs(...refToMerge);\n }, [innerRef]);\n\n return (\n <StyledContainer\n className={className}\n data-testid={DSControlledLargetTextInputDatatestids.CONTAINER}\n $isDisabled={otherProps.disabled}\n {...xstyledProps}\n >\n <WrapperBorder $hasError={hasError} $isDisabled={otherProps.disabled}>\n <StyledTextArea\n ref={getReferenceSetter}\n aria-multiline\n value={value}\n $maxHeight={maxHeight}\n $minHeight={calculatedMinHeight}\n onChange={handleOnChange}\n resizable={resizable}\n name={name}\n id={id}\n data-testid={DSControlledLargetTextInputDatatestids.INPUT}\n {...globalAttributes}\n />\n </WrapperBorder>\n <StyledTextArea\n disabled\n ref={ghostRef}\n value={value}\n style={{ visibility: 'hidden', pointerEvents: 'none', position: 'absolute' }}\n $maxHeight={maxHeight}\n />\n </StyledContainer>\n );\n};\n\nDSControlledLargeTextInput.displayName = 'DSControlledLargeTextInput';\nconst DSControlledLargeTextInputWithSchema = describe(DSControlledLargeTextInput);\nDSControlledLargeTextInputWithSchema.propTypes = propTypes as WeakValidationMap<unknown>;\n\nexport { DSControlledLargeTextInput, DSControlledLargeTextInputWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADoDnB;AAnDJ,mBAAsE;AACtE,0BAOO;AACP,mCAAwC;AACxC,oBAA+D;AAC/D,8BAAuF;AAGvF,MAAM,6BAA6B,CAAC,UAA0D;AAC5F,0DAA+B,OAAO,wCAAW,sDAA8B;AAE/E,QAAM,uBAAmB,kDAAgE,OAAO,yCAAY;AAE5G,QAAM,EAAE,OAAO,UAAU,UAAU,WAAW,MAAM,IAAI,UAAU,cAAc,WAAW,IAAI;AAE/F,QAAM,EAAE,cAAc,iBAAiB,QAAI,4CAAuB,UAAU;AAE5E,QAAM,mBAAe,wCAAmB,UAAU;AAElD,QAAM,CAAC,qBAAqB,sBAAsB,QAAI,uBAAiB;AAEvE,QAAM,kBAAc,qBAAmC,IAAI;AAC3D,QAAM,eAAW,qBAAmC,IAAI;AAExD,QAAM,qBAAiB;AAAA,IACrB,CAAC,MAAM,SAAS,EAAE,cAAc,OAAO,CAAC;AAAA,IACxC,CAAC,QAAQ;AAAA,EACX;AAEA,oCAAgB,MAAM;AACpB,QAAI,YAAY,SAAS,WAAW,UAAU,IAAI;AAChD,eAAS,QAAQ,MAAM,YAAY;AACnC,YAAM,EAAE,aAAa,IAAI,SAAS;AAClC,UAAI,cAAc,UAAa,gBAAgB;AAAW,+BAAuB,SAAS;AAAA;AACrF,+BAAuB,YAAY;AACxC,UAAI;AAAW,iBAAS,QAAQ,MAAM,YAAY,GAAG;AAAA,IACvD;AAAA,EACF,GAAG,CAAC,WAAW,KAAK,CAAC;AACrB,QAAM,yBAAqB,0BAAY,MAAM;AAC3C,UAAM,aAAa,CAAC,WAAW;AAC/B,QAAI;AAAU,iBAAW,KAAK,QAAQ;AACtC,eAAO,+BAAU,GAAG,UAAU;AAAA,EAChC,GAAG,CAAC,QAAQ,CAAC;AAEb,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,eAAa,+DAAuC;AAAA,MACpD,aAAa,WAAW;AAAA,MACvB,GAAG;AAAA,MAEJ;AAAA,oDAAC,+BAAc,WAAW,UAAU,aAAa,WAAW,UAC1D;AAAA,UAAC;AAAA;AAAA,YACC,KAAK;AAAA,YACL,kBAAc;AAAA,YACd;AAAA,YACA,YAAY;AAAA,YACZ,YAAY;AAAA,YACZ,UAAU;AAAA,YACV;AAAA,YACA;AAAA,YACA;AAAA,YACA,eAAa,+DAAuC;AAAA,YACnD,GAAG;AAAA;AAAA,QACN,GACF;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,UAAQ;AAAA,YACR,KAAK;AAAA,YACL;AAAA,YACA,OAAO,EAAE,YAAY,UAAU,eAAe,QAAQ,UAAU,WAAW;AAAA,YAC3E,YAAY;AAAA;AAAA,QACd;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,2BAA2B,cAAc;AACzC,MAAM,2CAAuC,8BAAS,0BAA0B;AAChF,qCAAqC,YAAY;",
4
+ "sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport React, { useCallback, useRef, useState, useLayoutEffect } from 'react';\nimport {\n describe,\n mergeRefs,\n useValidateTypescriptPropTypes,\n useMemoMergePropsWithDefault,\n useGetGlobalAttributes,\n useGetXstyledProps,\n} from '@elliemae/ds-utilities';\nimport { propTypes, defaultProps } from './react-desc-prop-types';\nimport { StyledTextArea, StyledContainer, WrapperBorder } from './styles';\nimport { DSControlledLargeTextInputName, DSControlledLargetTextInputDatatestids } from './exported-related';\nimport type { DSControlledLargeTextInputT } from './react-desc-prop-types';\n\nconst DSControlledLargeTextInput = (props: DSControlledLargeTextInputT.Props): JSX.Element => {\n useValidateTypescriptPropTypes(props, propTypes, DSControlledLargeTextInputName);\n\n const propsWithDefault = useMemoMergePropsWithDefault<DSControlledLargeTextInputT.Props>(props, defaultProps);\n\n const { value, onChange, innerRef, resizable, name, id, hasError, maxHeight, ...otherProps } = propsWithDefault;\n\n const { className, ...globalAttributes } = useGetGlobalAttributes(otherProps);\n\n const xstyledProps = useGetXstyledProps(otherProps);\n\n const [calculatedMinHeight, setCalculatedMinHeight] = useState(undefined);\n\n const textareaRef = useRef<HTMLTextAreaElement | null>(null);\n const ghostRef = useRef<HTMLTextAreaElement | null>(null);\n\n const handleOnChange = useCallback(\n (e: React.KeyboardEvent) => onChange((e.target as HTMLInputElement).value, e),\n [onChange],\n );\n\n useLayoutEffect(() => {\n if (ghostRef && ghostRef.current && value !== '') {\n ghostRef.current.style.maxHeight = '0px';\n const { scrollHeight } = ghostRef.current;\n if (maxHeight !== undefined && scrollHeight >= maxHeight) setCalculatedMinHeight(`${maxHeight}`);\n else setCalculatedMinHeight(`${scrollHeight}`);\n ghostRef.current.style.maxHeight = `${maxHeight}px`;\n }\n }, [maxHeight, value]);\n\n return (\n <StyledContainer\n className={className}\n data-testid={DSControlledLargetTextInputDatatestids.CONTAINER}\n {...xstyledProps}\n >\n <WrapperBorder $hasError={hasError}>\n <StyledTextArea\n ref={mergeRefs(innerRef, textareaRef)}\n aria-multiline\n value={value}\n $maxHeight={maxHeight}\n $minHeight={calculatedMinHeight}\n onChange={handleOnChange}\n resizable={resizable}\n name={name}\n id={id}\n data-testid={DSControlledLargetTextInputDatatestids.INPUT}\n {...globalAttributes}\n />\n </WrapperBorder>\n <StyledTextArea\n disabled\n ref={ghostRef}\n value={value}\n style={{ visibility: 'hidden', pointerEvents: 'none', position: 'absolute' }}\n $maxHeight={maxHeight}\n />\n </StyledContainer>\n );\n};\n\nDSControlledLargeTextInput.displayName = 'DSControlledLargeTextInput';\nconst DSControlledLargeTextInputWithSchema = describe(DSControlledLargeTextInput);\nDSControlledLargeTextInputWithSchema.propTypes = propTypes as WeakValidationMap<unknown>;\n\nexport { DSControlledLargeTextInput, DSControlledLargeTextInputWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD+CnB;AA9CJ,mBAAsE;AACtE,0BAOO;AACP,mCAAwC;AACxC,oBAA+D;AAC/D,8BAAuF;AAGvF,MAAM,6BAA6B,CAAC,UAA0D;AAC5F,0DAA+B,OAAO,wCAAW,sDAA8B;AAE/E,QAAM,uBAAmB,kDAAgE,OAAO,yCAAY;AAE5G,QAAM,EAAE,OAAO,UAAU,UAAU,WAAW,MAAM,IAAI,UAAU,cAAc,WAAW,IAAI;AAE/F,QAAM,EAAE,cAAc,iBAAiB,QAAI,4CAAuB,UAAU;AAE5E,QAAM,mBAAe,wCAAmB,UAAU;AAElD,QAAM,CAAC,qBAAqB,sBAAsB,QAAI,uBAAS,MAAS;AAExE,QAAM,kBAAc,qBAAmC,IAAI;AAC3D,QAAM,eAAW,qBAAmC,IAAI;AAExD,QAAM,qBAAiB;AAAA,IACrB,CAAC,MAA2B,SAAU,EAAE,OAA4B,OAAO,CAAC;AAAA,IAC5E,CAAC,QAAQ;AAAA,EACX;AAEA,oCAAgB,MAAM;AACpB,QAAI,YAAY,SAAS,WAAW,UAAU,IAAI;AAChD,eAAS,QAAQ,MAAM,YAAY;AACnC,YAAM,EAAE,aAAa,IAAI,SAAS;AAClC,UAAI,cAAc,UAAa,gBAAgB;AAAW,+BAAuB,GAAG,WAAW;AAAA;AAC1F,+BAAuB,GAAG,cAAc;AAC7C,eAAS,QAAQ,MAAM,YAAY,GAAG;AAAA,IACxC;AAAA,EACF,GAAG,CAAC,WAAW,KAAK,CAAC;AAErB,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,eAAa,+DAAuC;AAAA,MACnD,GAAG;AAAA,MAEJ;AAAA,oDAAC,+BAAc,WAAW,UACxB;AAAA,UAAC;AAAA;AAAA,YACC,SAAK,+BAAU,UAAU,WAAW;AAAA,YACpC,kBAAc;AAAA,YACd;AAAA,YACA,YAAY;AAAA,YACZ,YAAY;AAAA,YACZ,UAAU;AAAA,YACV;AAAA,YACA;AAAA,YACA;AAAA,YACA,eAAa,+DAAuC;AAAA,YACnD,GAAG;AAAA;AAAA,QACN,GACF;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,UAAQ;AAAA,YACR,KAAK;AAAA,YACL;AAAA,YACA,OAAO,EAAE,YAAY,UAAU,eAAe,QAAQ,UAAU,WAAW;AAAA,YAC3E,YAAY;AAAA;AAAA,QACd;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,2BAA2B,cAAc;AACzC,MAAM,2CAAuC,8BAAS,0BAA0B;AAChF,qCAAqC,YAAY;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/exported-related/data-test-ids.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export const DSControlledLargetTextInputDatatestids = {\n CONTAINER: 'ds-controlled-large-text-input-container',\n CHAR_COUNTER: 'ds-controlled-large-text-input-char-counter',\n INPUT: 'ds-controlled-large-text-input',\n} as const;\n", "import * as React from 'react';\nexport { React };\n"],
4
+ "sourcesContent": ["export const DSControlledLargetTextInputDatatestids = {\n CONTAINER: 'ds-controlled-large-text-input-container',\n CHAR_COUNTER: 'ds-controlled-large-text-input-char-counter',\n INPUT: 'ds-controlled-large-text-input',\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,yCAAyC;AAAA,EACpD,WAAW;AAAA,EACX,cAAc;AAAA,EACd,OAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/exported-related/theming.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export const DSControlledLargeTextInputName = 'DSControlledLargeTextInput' as const;\n\nexport const DSControlledLargeTextInputSlots = {\n CONTAINER: 'root',\n INPUT: 'input',\n CHAR_COUNTER: 'char-counter',\n} as const;\n", "import * as React from 'react';\nexport { React };\n"],
4
+ "sourcesContent": ["export const DSControlledLargeTextInputName = 'DSControlledLargeTextInput';\n\nexport const DSControlledLargeTextInputSlots = {\n CONTAINER: 'root',\n INPUT: 'input',\n CHAR_COUNTER: 'char-counter',\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,iCAAiC;AAEvC,MAAM,kCAAkC;AAAA,EAC7C,WAAW;AAAA,EACX,OAAO;AAAA,EACP,cAAc;AAChB;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.ts", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import type {} from '@xstyled/system';\nexport * from './DSControlledLargeTextInput';\nexport * from './exported-related';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADCvB,wBAAc,yCADd;AAEA,wBAAc,+BAFd;",
4
+ "sourcesContent": ["export * from './DSControlledLargeTextInput';\nexport * from './exported-related';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,yCAAd;AACA,wBAAc,+BADd;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/react-desc-prop-types.ts", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import type React from 'react';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-utilities';\n\nconst noop = () => {};\n\nexport declare namespace DSControlledLargeTextInputT {\n export interface DefaultProps {\n value: string;\n onChange: (newVal: string, event: React.SyntheticEvent<HTMLInputElement>) => void;\n resizable: boolean;\n hasError: boolean;\n rows: string;\n }\n\n export interface RequiredProps {\n name: string;\n id: string;\n }\n\n export interface PropsOptional {\n disabled?: boolean;\n readOnly?: boolean;\n maxHeight?: number;\n innerRef?: React.MutableRefObject<HTMLTextAreaElement | null>;\n hasError?: boolean;\n }\n\n export interface Props extends DefaultProps, PropsOptional, RequiredProps {}\n}\n\nexport const defaultProps: DSControlledLargeTextInputT.DefaultProps = {\n rows: '2',\n value: '',\n onChange: noop,\n resizable: false,\n hasError: false,\n};\n\nexport const propTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n value: PropTypes.string.description('Text are value.').defaultValue(''),\n onChange: PropTypes.func.description('OnChange cb.').defaultValue('() => {}'),\n resizable: PropTypes.bool.description('Enables to resize the component.').defaultValue(false),\n rows: PropTypes.string.description(\n 'Sets the number of lines for the default height. Once lines are reached, scroll behavior enables.',\n ),\n id: PropTypes.string.description('Unique id.'),\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).description('Inner ref to the input.'),\n disabled: PropTypes.bool.description('Set disabled state.'),\n readOnly: PropTypes.bool.description('Set readonly state.'),\n maxHeight: PropTypes.number.description('Set max height to recize input text'),\n hasError: PropTypes.bool.description('Set error state.').defaultValue(false),\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,0BAAuE;AAEvE,MAAM,OAAO,MAAM;AAAC;AA2Bb,MAAM,eAAyD;AAAA,EACpE,MAAM;AAAA,EACN,OAAO;AAAA,EACP,UAAU;AAAA,EACV,WAAW;AAAA,EACX,UAAU;AACZ;AAEO,MAAM,YAAY;AAAA,EACvB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,OAAO,8BAAU,OAAO,YAAY,iBAAiB,EAAE,aAAa,EAAE;AAAA,EACtE,UAAU,8BAAU,KAAK,YAAY,cAAc,EAAE,aAAa,UAAU;AAAA,EAC5E,WAAW,8BAAU,KAAK,YAAY,kCAAkC,EAAE,aAAa,KAAK;AAAA,EAC5F,MAAM,8BAAU,OAAO;AAAA,IACrB;AAAA,EACF;AAAA,EACA,IAAI,8BAAU,OAAO,YAAY,YAAY;AAAA,EAC7C,UAAU,8BAAU,UAAU,CAAC,8BAAU,QAAQ,8BAAU,IAAI,CAAC,EAAE,YAAY,yBAAyB;AAAA,EACvG,UAAU,8BAAU,KAAK,YAAY,qBAAqB;AAAA,EAC1D,UAAU,8BAAU,KAAK,YAAY,qBAAqB;AAAA,EAC1D,WAAW,8BAAU,OAAO,YAAY,qCAAqC;AAAA,EAC7E,UAAU,8BAAU,KAAK,YAAY,kBAAkB,EAAE,aAAa,KAAK;AAC7E;",
4
+ "sourcesContent": ["import { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-utilities';\n\nconst noop = () => {};\n\nexport declare namespace DSControlledLargeTextInputT {\n export interface DefaultProps {\n value: string;\n onChange: () => void;\n resizable: boolean;\n hasError: boolean;\n rows: string;\n }\n\n export interface RequiredProps {\n name: string;\n id: string;\n }\n\n export interface PropsOptional {\n disabled?: boolean;\n readOnly?: boolean;\n maxHeight?: number;\n innerRef?: React.MutableRefObject<HTMLTextAreaElement | null>;\n hasError?: boolean;\n }\n\n export interface Props extends DefaultProps, PropsOptional, RequiredProps {}\n}\n\nexport const defaultProps: DSControlledLargeTextInputT.DefaultProps = {\n rows: '2',\n value: '',\n onChange: noop,\n resizable: false,\n hasError: false,\n};\n\nexport const propTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n value: PropTypes.string.description('Text are value.').defaultValue(''),\n onChange: PropTypes.func.description('OnChange cb.').defaultValue('() => {}'),\n resizable: PropTypes.bool.description('Enables to resize the component.').defaultValue(false),\n rows: PropTypes.string.description(\n 'Sets the number of lines for the default height. Once lines are reached, scroll behavior enables.',\n ),\n id: PropTypes.string.description('Unique id.'),\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).description('Inner ref to the input.'),\n disabled: PropTypes.bool.description('Set disabled state.'),\n readOnly: PropTypes.bool.description('Set readonly state.'),\n maxHeight: PropTypes.number.description('Set max height to recize input text'),\n hasError: PropTypes.bool.description('Set error state.').defaultValue(false),\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAAuE;AAEvE,MAAM,OAAO,MAAM;AAAC;AA2Bb,MAAM,eAAyD;AAAA,EACpE,MAAM;AAAA,EACN,OAAO;AAAA,EACP,UAAU;AAAA,EACV,WAAW;AAAA,EACX,UAAU;AACZ;AAEO,MAAM,YAAY;AAAA,EACvB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,OAAO,8BAAU,OAAO,YAAY,iBAAiB,EAAE,aAAa,EAAE;AAAA,EACtE,UAAU,8BAAU,KAAK,YAAY,cAAc,EAAE,aAAa,UAAU;AAAA,EAC5E,WAAW,8BAAU,KAAK,YAAY,kCAAkC,EAAE,aAAa,KAAK;AAAA,EAC5F,MAAM,8BAAU,OAAO;AAAA,IACrB;AAAA,EACF;AAAA,EACA,IAAI,8BAAU,OAAO,YAAY,YAAY;AAAA,EAC7C,UAAU,8BAAU,UAAU,CAAC,8BAAU,QAAQ,8BAAU,IAAI,CAAC,EAAE,YAAY,yBAAyB;AAAA,EACvG,UAAU,8BAAU,KAAK,YAAY,qBAAqB;AAAA,EAC1D,UAAU,8BAAU,KAAK,YAAY,qBAAqB;AAAA,EAC1D,WAAW,8BAAU,OAAO,YAAY,qCAAqC;AAAA,EAC7E,UAAU,8BAAU,KAAK,YAAY,kBAAkB,EAAE,aAAa,KAAK;AAC7E;",
6
6
  "names": []
7
7
  }
@@ -37,31 +37,26 @@ const StyledContainer = (0, import_ds_system.styled)("div", {
37
37
  slot: import_exported_related.DSControlledLargeTextInputSlots.CONTAINER
38
38
  })`
39
39
  display: grid;
40
+ grid-gap: 4px;
40
41
  grid-template-rows: auto auto;
41
42
  grid-template-columns: fit-content;
42
- ${({ $isDisabled }) => $isDisabled ? `
43
- background-color: #EBEDF0;
44
- color: #616b7f;
45
- ` : ``}
46
43
  ${import_ds_system.xStyledCommonProps}
47
44
  `;
48
45
  const WrapperBorder = (0, import_ds_system.styled)("div")`
49
- ${({ $isDisabled, theme }) => !$isDisabled ? `
50
- &:hover {
51
- outline: 1px solid ${theme.colors.brand[700]};
52
- outline-offset: -1px;
53
- }
54
- &:focus,
55
- &:focus-within {
56
- outline: 2px solid ${theme.colors.brand[700]};
57
- outline-offset: -2px;
58
- }
59
- &:hover,
60
- &:focus,
61
- &:focus-within {
62
- border-color: transparent;
63
- }
64
- ` : ``}
46
+ &:hover::after,
47
+ &:focus::after {
48
+ content: ' ';
49
+ position: absolute;
50
+ inset: 0px;
51
+ border: 2px solid brand-700;
52
+ border-radius: inherit;
53
+ pointer-events: none;
54
+ z-index: 1;
55
+ }
56
+ &:hover,
57
+ &:focus {
58
+ border-color: transparent;
59
+ }
65
60
  border: 1px solid neutral-400;
66
61
  border-radius: 2px;
67
62
  position: relative;
@@ -78,12 +73,13 @@ const StyledTextArea = (0, import_ds_system.styled)("textarea", {
78
73
  border: none;
79
74
  padding: 8px;
80
75
  ${({ resizable }) => resizable ? `` : `resize: none;`}
76
+ &:disabled {
77
+ &:hover {
78
+ cursor: not-allowed;
79
+ }
80
+ }
81
81
  ${({ $maxHeight }) => $maxHeight ? `max-height: ${$maxHeight}px;` : ``}
82
82
  ${({ $minHeight }) => $minHeight ? `min-height: ${$minHeight}px;` : ``}
83
- ${({ disabled }) => disabled ? `
84
- overflow: hidden;
85
- background-color: #EBEDF0;
86
- cursor: not-allowed;
87
- ` : ""}
83
+ ${({ disabled }) => disabled ? `overflow: hidden` : ""}
88
84
  `;
89
85
  //# sourceMappingURL=styles.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/styles.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { styled, xStyledCommonProps } from '@elliemae/ds-system';\nimport { DSControlledLargeTextInputName, DSControlledLargeTextInputSlots } from './exported-related';\n\nexport const StyledContainer = styled('div', {\n name: DSControlledLargeTextInputName,\n slot: DSControlledLargeTextInputSlots.CONTAINER,\n})<{ $isDisabled?: boolean }>`\n display: grid;\n grid-template-rows: auto auto;\n grid-template-columns: fit-content;\n ${({ $isDisabled }) =>\n $isDisabled\n ? `\n background-color: #EBEDF0;\n color: #616b7f;\n `\n : ``}\n ${xStyledCommonProps}\n`;\n\nexport const WrapperBorder = styled('div')<{ $hasError?: boolean; $isDisabled?: boolean }>`\n ${({ $isDisabled, theme }) =>\n !$isDisabled\n ? `\n&:hover {\n outline: 1px solid ${theme.colors.brand[700]};\n outline-offset: -1px;\n}\n&:focus,\n&:focus-within {\n outline: 2px solid ${theme.colors.brand[700]};\n outline-offset: -2px;\n}\n&:hover,\n&:focus,\n&:focus-within {\n border-color: transparent;\n} \n`\n : ``}\n border: 1px solid neutral-400;\n border-radius: 2px;\n position: relative;\n box-sizing: content-box;\n ${({ $hasError }) => ($hasError ? `border: 2px solid red;` : ``)}\n`;\n\ninterface StyledTextAreaT {\n resizable?: boolean;\n hasError?: boolean;\n $maxHeight?: number;\n $minHeight?: number;\n}\nexport const StyledTextArea = styled('textarea', {\n name: DSControlledLargeTextInputName,\n slot: DSControlledLargeTextInputSlots.INPUT,\n})<StyledTextAreaT>`\n line-height: 1;\n outline: none;\n width: 100%;\n border: none;\n padding: 8px;\n ${({ resizable }) => (resizable ? `` : `resize: none;`)}\n ${({ $maxHeight }) => ($maxHeight ? `max-height: ${$maxHeight}px;` : ``)}\n ${({ $minHeight }) => ($minHeight ? `min-height: ${$minHeight}px;` : ``)}\n ${({ disabled }) =>\n disabled\n ? `\n overflow: hidden;\n background-color: #EBEDF0;\n cursor: not-allowed;\n `\n : ''}\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAA2C;AAC3C,8BAAgF;AAEzE,MAAM,sBAAkB,yBAAO,OAAO;AAAA,EAC3C,MAAM;AAAA,EACN,MAAM,wDAAgC;AACxC,CAAC;AAAA;AAAA;AAAA;AAAA,IAIG,CAAC,EAAE,YAAY,MACf,cACI;AAAA;AAAA;AAAA,MAIA;AAAA,IACJ;AAAA;AAGG,MAAM,oBAAgB,yBAAO,KAAK;AAAA,IACrC,CAAC,EAAE,aAAa,MAAM,MACtB,CAAC,cACG;AAAA;AAAA,uBAEe,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA,uBAKnB,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASlC;AAAA;AAAA;AAAA;AAAA;AAAA,IAKJ,CAAC,EAAE,UAAU,MAAO,YAAY,2BAA2B;AAAA;AASxD,MAAM,qBAAiB,yBAAO,YAAY;AAAA,EAC/C,MAAM;AAAA,EACN,MAAM,wDAAgC;AACxC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMG,CAAC,EAAE,UAAU,MAAO,YAAY,KAAK;AAAA,IACrC,CAAC,EAAE,WAAW,MAAO,aAAa,eAAe,kBAAkB;AAAA,IACnE,CAAC,EAAE,WAAW,MAAO,aAAa,eAAe,kBAAkB;AAAA,IACnE,CAAC,EAAE,SAAS,MACZ,WACI;AAAA;AAAA;AAAA;AAAA,MAKA;AAAA;",
4
+ "sourcesContent": ["import { styled, xStyledCommonProps } from '@elliemae/ds-system';\nimport { DSControlledLargeTextInputName, DSControlledLargeTextInputSlots } from './exported-related';\n\ninterface StyledTextAreaT {\n resizable: boolean;\n hasError: boolean;\n}\n\nexport const StyledContainer = styled('div', {\n name: DSControlledLargeTextInputName,\n slot: DSControlledLargeTextInputSlots.CONTAINER,\n})`\n display: grid;\n grid-gap: 4px;\n grid-template-rows: auto auto;\n grid-template-columns: fit-content;\n ${xStyledCommonProps}\n`;\n\nexport const WrapperBorder = styled('div')`\n &:hover::after,\n &:focus::after {\n content: ' ';\n position: absolute;\n inset: 0px;\n border: 2px solid brand-700;\n border-radius: inherit;\n pointer-events: none;\n z-index: 1;\n }\n &:hover,\n &:focus {\n border-color: transparent;\n }\n border: 1px solid neutral-400;\n border-radius: 2px;\n position: relative;\n box-sizing: content-box;\n ${({ $hasError }) => ($hasError ? `border: 2px solid red;` : ``)}\n`;\n\nexport const StyledTextArea = styled('textarea', {\n name: DSControlledLargeTextInputName,\n slot: DSControlledLargeTextInputSlots.INPUT,\n})<StyledTextAreaT>`\n line-height: 1;\n outline: none;\n width: 100%;\n border: none;\n padding: 8px;\n ${({ resizable }) => (resizable ? `` : `resize: none;`)}\n &:disabled {\n &:hover {\n cursor: not-allowed;\n }\n }\n ${({ $maxHeight }) => ($maxHeight ? `max-height: ${$maxHeight}px;` : ``)}\n ${({ $minHeight }) => ($minHeight ? `min-height: ${$minHeight}px;` : ``)}\n ${({ disabled }) => (disabled ? `overflow: hidden` : '')}\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAA2C;AAC3C,8BAAgF;AAOzE,MAAM,sBAAkB,yBAAO,OAAO;AAAA,EAC3C,MAAM;AAAA,EACN,MAAM,wDAAgC;AACxC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,IAKG;AAAA;AAGG,MAAM,oBAAgB,yBAAO,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAmBrC,CAAC,EAAE,UAAU,MAAO,YAAY,2BAA2B;AAAA;AAGxD,MAAM,qBAAiB,yBAAO,YAAY;AAAA,EAC/C,MAAM;AAAA,EACN,MAAM,wDAAgC;AACxC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMG,CAAC,EAAE,UAAU,MAAO,YAAY,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMrC,CAAC,EAAE,WAAW,MAAO,aAAa,eAAe,kBAAkB;AAAA,IACnE,CAAC,EAAE,WAAW,MAAO,aAAa,eAAe,kBAAkB;AAAA,IACnE,CAAC,EAAE,SAAS,MAAO,WAAW,qBAAqB;AAAA;",
6
6
  "names": []
7
7
  }
@@ -18,11 +18,11 @@ const DSControlledLargeTextInput = (props) => {
18
18
  const { value, onChange, innerRef, resizable, name, id, hasError, maxHeight, ...otherProps } = propsWithDefault;
19
19
  const { className, ...globalAttributes } = useGetGlobalAttributes(otherProps);
20
20
  const xstyledProps = useGetXstyledProps(otherProps);
21
- const [calculatedMinHeight, setCalculatedMinHeight] = useState();
21
+ const [calculatedMinHeight, setCalculatedMinHeight] = useState(void 0);
22
22
  const textareaRef = useRef(null);
23
23
  const ghostRef = useRef(null);
24
24
  const handleOnChange = useCallback(
25
- (e) => onChange(e.currentTarget.value, e),
25
+ (e) => onChange(e.target.value, e),
26
26
  [onChange]
27
27
  );
28
28
  useLayoutEffect(() => {
@@ -30,31 +30,23 @@ const DSControlledLargeTextInput = (props) => {
30
30
  ghostRef.current.style.maxHeight = "0px";
31
31
  const { scrollHeight } = ghostRef.current;
32
32
  if (maxHeight !== void 0 && scrollHeight >= maxHeight)
33
- setCalculatedMinHeight(maxHeight);
33
+ setCalculatedMinHeight(`${maxHeight}`);
34
34
  else
35
- setCalculatedMinHeight(scrollHeight);
36
- if (maxHeight)
37
- ghostRef.current.style.maxHeight = `${maxHeight}px`;
35
+ setCalculatedMinHeight(`${scrollHeight}`);
36
+ ghostRef.current.style.maxHeight = `${maxHeight}px`;
38
37
  }
39
38
  }, [maxHeight, value]);
40
- const getReferenceSetter = useCallback(() => {
41
- const refToMerge = [textareaRef];
42
- if (innerRef)
43
- refToMerge.push(innerRef);
44
- return mergeRefs(...refToMerge);
45
- }, [innerRef]);
46
39
  return /* @__PURE__ */ jsxs(
47
40
  StyledContainer,
48
41
  {
49
42
  className,
50
43
  "data-testid": DSControlledLargetTextInputDatatestids.CONTAINER,
51
- $isDisabled: otherProps.disabled,
52
44
  ...xstyledProps,
53
45
  children: [
54
- /* @__PURE__ */ jsx(WrapperBorder, { $hasError: hasError, $isDisabled: otherProps.disabled, children: /* @__PURE__ */ jsx(
46
+ /* @__PURE__ */ jsx(WrapperBorder, { $hasError: hasError, children: /* @__PURE__ */ jsx(
55
47
  StyledTextArea,
56
48
  {
57
- ref: getReferenceSetter,
49
+ ref: mergeRefs(innerRef, textareaRef),
58
50
  "aria-multiline": true,
59
51
  value,
60
52
  $maxHeight: maxHeight,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSControlledLargeTextInput.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { WeakValidationMap } from 'react';\nimport React, { useCallback, useRef, useState, useLayoutEffect } from 'react';\nimport {\n describe,\n mergeRefs,\n useValidateTypescriptPropTypes,\n useMemoMergePropsWithDefault,\n useGetGlobalAttributes,\n useGetXstyledProps,\n} from '@elliemae/ds-utilities';\nimport { propTypes, defaultProps } from './react-desc-prop-types';\nimport { StyledTextArea, StyledContainer, WrapperBorder } from './styles';\nimport { DSControlledLargeTextInputName, DSControlledLargetTextInputDatatestids } from './exported-related';\nimport type { DSControlledLargeTextInputT } from './react-desc-prop-types';\n\nconst DSControlledLargeTextInput = (props: DSControlledLargeTextInputT.Props): JSX.Element => {\n useValidateTypescriptPropTypes(props, propTypes, DSControlledLargeTextInputName);\n\n const propsWithDefault = useMemoMergePropsWithDefault<DSControlledLargeTextInputT.Props>(props, defaultProps);\n\n const { value, onChange, innerRef, resizable, name, id, hasError, maxHeight, ...otherProps } = propsWithDefault;\n\n const { className, ...globalAttributes } = useGetGlobalAttributes(otherProps);\n\n const xstyledProps = useGetXstyledProps(otherProps);\n\n const [calculatedMinHeight, setCalculatedMinHeight] = useState<number>();\n\n const textareaRef = useRef<HTMLTextAreaElement | null>(null);\n const ghostRef = useRef<HTMLTextAreaElement | null>(null);\n\n const handleOnChange = useCallback<React.KeyboardEventHandler<HTMLInputElement>>(\n (e) => onChange(e.currentTarget.value, e),\n [onChange],\n );\n\n useLayoutEffect(() => {\n if (ghostRef && ghostRef.current && value !== '') {\n ghostRef.current.style.maxHeight = '0px';\n const { scrollHeight } = ghostRef.current;\n if (maxHeight !== undefined && scrollHeight >= maxHeight) setCalculatedMinHeight(maxHeight);\n else setCalculatedMinHeight(scrollHeight);\n if (maxHeight) ghostRef.current.style.maxHeight = `${maxHeight}px`;\n }\n }, [maxHeight, value]);\n const getReferenceSetter = useCallback(() => {\n const refToMerge = [textareaRef];\n if (innerRef) refToMerge.push(innerRef);\n return mergeRefs(...refToMerge);\n }, [innerRef]);\n\n return (\n <StyledContainer\n className={className}\n data-testid={DSControlledLargetTextInputDatatestids.CONTAINER}\n $isDisabled={otherProps.disabled}\n {...xstyledProps}\n >\n <WrapperBorder $hasError={hasError} $isDisabled={otherProps.disabled}>\n <StyledTextArea\n ref={getReferenceSetter}\n aria-multiline\n value={value}\n $maxHeight={maxHeight}\n $minHeight={calculatedMinHeight}\n onChange={handleOnChange}\n resizable={resizable}\n name={name}\n id={id}\n data-testid={DSControlledLargetTextInputDatatestids.INPUT}\n {...globalAttributes}\n />\n </WrapperBorder>\n <StyledTextArea\n disabled\n ref={ghostRef}\n value={value}\n style={{ visibility: 'hidden', pointerEvents: 'none', position: 'absolute' }}\n $maxHeight={maxHeight}\n />\n </StyledContainer>\n );\n};\n\nDSControlledLargeTextInput.displayName = 'DSControlledLargeTextInput';\nconst DSControlledLargeTextInputWithSchema = describe(DSControlledLargeTextInput);\nDSControlledLargeTextInputWithSchema.propTypes = propTypes as WeakValidationMap<unknown>;\n\nexport { DSControlledLargeTextInput, DSControlledLargeTextInputWithSchema };\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACoDnB,SAOI,KAPJ;AAnDJ,SAAgB,aAAa,QAAQ,UAAU,uBAAuB;AACtE;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,WAAW,oBAAoB;AACxC,SAAS,gBAAgB,iBAAiB,qBAAqB;AAC/D,SAAS,gCAAgC,8CAA8C;AAGvF,MAAM,6BAA6B,CAAC,UAA0D;AAC5F,iCAA+B,OAAO,WAAW,8BAA8B;AAE/E,QAAM,mBAAmB,6BAAgE,OAAO,YAAY;AAE5G,QAAM,EAAE,OAAO,UAAU,UAAU,WAAW,MAAM,IAAI,UAAU,cAAc,WAAW,IAAI;AAE/F,QAAM,EAAE,cAAc,iBAAiB,IAAI,uBAAuB,UAAU;AAE5E,QAAM,eAAe,mBAAmB,UAAU;AAElD,QAAM,CAAC,qBAAqB,sBAAsB,IAAI,SAAiB;AAEvE,QAAM,cAAc,OAAmC,IAAI;AAC3D,QAAM,WAAW,OAAmC,IAAI;AAExD,QAAM,iBAAiB;AAAA,IACrB,CAAC,MAAM,SAAS,EAAE,cAAc,OAAO,CAAC;AAAA,IACxC,CAAC,QAAQ;AAAA,EACX;AAEA,kBAAgB,MAAM;AACpB,QAAI,YAAY,SAAS,WAAW,UAAU,IAAI;AAChD,eAAS,QAAQ,MAAM,YAAY;AACnC,YAAM,EAAE,aAAa,IAAI,SAAS;AAClC,UAAI,cAAc,UAAa,gBAAgB;AAAW,+BAAuB,SAAS;AAAA;AACrF,+BAAuB,YAAY;AACxC,UAAI;AAAW,iBAAS,QAAQ,MAAM,YAAY,GAAG;AAAA,IACvD;AAAA,EACF,GAAG,CAAC,WAAW,KAAK,CAAC;AACrB,QAAM,qBAAqB,YAAY,MAAM;AAC3C,UAAM,aAAa,CAAC,WAAW;AAC/B,QAAI;AAAU,iBAAW,KAAK,QAAQ;AACtC,WAAO,UAAU,GAAG,UAAU;AAAA,EAChC,GAAG,CAAC,QAAQ,CAAC;AAEb,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,eAAa,uCAAuC;AAAA,MACpD,aAAa,WAAW;AAAA,MACvB,GAAG;AAAA,MAEJ;AAAA,4BAAC,iBAAc,WAAW,UAAU,aAAa,WAAW,UAC1D;AAAA,UAAC;AAAA;AAAA,YACC,KAAK;AAAA,YACL,kBAAc;AAAA,YACd;AAAA,YACA,YAAY;AAAA,YACZ,YAAY;AAAA,YACZ,UAAU;AAAA,YACV;AAAA,YACA;AAAA,YACA;AAAA,YACA,eAAa,uCAAuC;AAAA,YACnD,GAAG;AAAA;AAAA,QACN,GACF;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,UAAQ;AAAA,YACR,KAAK;AAAA,YACL;AAAA,YACA,OAAO,EAAE,YAAY,UAAU,eAAe,QAAQ,UAAU,WAAW;AAAA,YAC3E,YAAY;AAAA;AAAA,QACd;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,2BAA2B,cAAc;AACzC,MAAM,uCAAuC,SAAS,0BAA0B;AAChF,qCAAqC,YAAY;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { WeakValidationMap } from 'react';\nimport React, { useCallback, useRef, useState, useLayoutEffect } from 'react';\nimport {\n describe,\n mergeRefs,\n useValidateTypescriptPropTypes,\n useMemoMergePropsWithDefault,\n useGetGlobalAttributes,\n useGetXstyledProps,\n} from '@elliemae/ds-utilities';\nimport { propTypes, defaultProps } from './react-desc-prop-types';\nimport { StyledTextArea, StyledContainer, WrapperBorder } from './styles';\nimport { DSControlledLargeTextInputName, DSControlledLargetTextInputDatatestids } from './exported-related';\nimport type { DSControlledLargeTextInputT } from './react-desc-prop-types';\n\nconst DSControlledLargeTextInput = (props: DSControlledLargeTextInputT.Props): JSX.Element => {\n useValidateTypescriptPropTypes(props, propTypes, DSControlledLargeTextInputName);\n\n const propsWithDefault = useMemoMergePropsWithDefault<DSControlledLargeTextInputT.Props>(props, defaultProps);\n\n const { value, onChange, innerRef, resizable, name, id, hasError, maxHeight, ...otherProps } = propsWithDefault;\n\n const { className, ...globalAttributes } = useGetGlobalAttributes(otherProps);\n\n const xstyledProps = useGetXstyledProps(otherProps);\n\n const [calculatedMinHeight, setCalculatedMinHeight] = useState(undefined);\n\n const textareaRef = useRef<HTMLTextAreaElement | null>(null);\n const ghostRef = useRef<HTMLTextAreaElement | null>(null);\n\n const handleOnChange = useCallback(\n (e: React.KeyboardEvent) => onChange((e.target as HTMLInputElement).value, e),\n [onChange],\n );\n\n useLayoutEffect(() => {\n if (ghostRef && ghostRef.current && value !== '') {\n ghostRef.current.style.maxHeight = '0px';\n const { scrollHeight } = ghostRef.current;\n if (maxHeight !== undefined && scrollHeight >= maxHeight) setCalculatedMinHeight(`${maxHeight}`);\n else setCalculatedMinHeight(`${scrollHeight}`);\n ghostRef.current.style.maxHeight = `${maxHeight}px`;\n }\n }, [maxHeight, value]);\n\n return (\n <StyledContainer\n className={className}\n data-testid={DSControlledLargetTextInputDatatestids.CONTAINER}\n {...xstyledProps}\n >\n <WrapperBorder $hasError={hasError}>\n <StyledTextArea\n ref={mergeRefs(innerRef, textareaRef)}\n aria-multiline\n value={value}\n $maxHeight={maxHeight}\n $minHeight={calculatedMinHeight}\n onChange={handleOnChange}\n resizable={resizable}\n name={name}\n id={id}\n data-testid={DSControlledLargetTextInputDatatestids.INPUT}\n {...globalAttributes}\n />\n </WrapperBorder>\n <StyledTextArea\n disabled\n ref={ghostRef}\n value={value}\n style={{ visibility: 'hidden', pointerEvents: 'none', position: 'absolute' }}\n $maxHeight={maxHeight}\n />\n </StyledContainer>\n );\n};\n\nDSControlledLargeTextInput.displayName = 'DSControlledLargeTextInput';\nconst DSControlledLargeTextInputWithSchema = describe(DSControlledLargeTextInput);\nDSControlledLargeTextInputWithSchema.propTypes = propTypes as WeakValidationMap<unknown>;\n\nexport { DSControlledLargeTextInput, DSControlledLargeTextInputWithSchema };\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;AC+CnB,SAMI,KANJ;AA9CJ,SAAgB,aAAa,QAAQ,UAAU,uBAAuB;AACtE;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,WAAW,oBAAoB;AACxC,SAAS,gBAAgB,iBAAiB,qBAAqB;AAC/D,SAAS,gCAAgC,8CAA8C;AAGvF,MAAM,6BAA6B,CAAC,UAA0D;AAC5F,iCAA+B,OAAO,WAAW,8BAA8B;AAE/E,QAAM,mBAAmB,6BAAgE,OAAO,YAAY;AAE5G,QAAM,EAAE,OAAO,UAAU,UAAU,WAAW,MAAM,IAAI,UAAU,cAAc,WAAW,IAAI;AAE/F,QAAM,EAAE,cAAc,iBAAiB,IAAI,uBAAuB,UAAU;AAE5E,QAAM,eAAe,mBAAmB,UAAU;AAElD,QAAM,CAAC,qBAAqB,sBAAsB,IAAI,SAAS,MAAS;AAExE,QAAM,cAAc,OAAmC,IAAI;AAC3D,QAAM,WAAW,OAAmC,IAAI;AAExD,QAAM,iBAAiB;AAAA,IACrB,CAAC,MAA2B,SAAU,EAAE,OAA4B,OAAO,CAAC;AAAA,IAC5E,CAAC,QAAQ;AAAA,EACX;AAEA,kBAAgB,MAAM;AACpB,QAAI,YAAY,SAAS,WAAW,UAAU,IAAI;AAChD,eAAS,QAAQ,MAAM,YAAY;AACnC,YAAM,EAAE,aAAa,IAAI,SAAS;AAClC,UAAI,cAAc,UAAa,gBAAgB;AAAW,+BAAuB,GAAG,WAAW;AAAA;AAC1F,+BAAuB,GAAG,cAAc;AAC7C,eAAS,QAAQ,MAAM,YAAY,GAAG;AAAA,IACxC;AAAA,EACF,GAAG,CAAC,WAAW,KAAK,CAAC;AAErB,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,eAAa,uCAAuC;AAAA,MACnD,GAAG;AAAA,MAEJ;AAAA,4BAAC,iBAAc,WAAW,UACxB;AAAA,UAAC;AAAA;AAAA,YACC,KAAK,UAAU,UAAU,WAAW;AAAA,YACpC,kBAAc;AAAA,YACd;AAAA,YACA,YAAY;AAAA,YACZ,YAAY;AAAA,YACZ,UAAU;AAAA,YACV;AAAA,YACA;AAAA,YACA;AAAA,YACA,eAAa,uCAAuC;AAAA,YACnD,GAAG;AAAA;AAAA,QACN,GACF;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,UAAQ;AAAA,YACR,KAAK;AAAA,YACL;AAAA,YACA,OAAO,EAAE,YAAY,UAAU,eAAe,QAAQ,UAAU,WAAW;AAAA,YAC3E,YAAY;AAAA;AAAA,QACd;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,2BAA2B,cAAc;AACzC,MAAM,uCAAuC,SAAS,0BAA0B;AAChF,qCAAqC,YAAY;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/exported-related/data-test-ids.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const DSControlledLargetTextInputDatatestids = {\n CONTAINER: 'ds-controlled-large-text-input-container',\n CHAR_COUNTER: 'ds-controlled-large-text-input-char-counter',\n INPUT: 'ds-controlled-large-text-input',\n} as const;\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const DSControlledLargetTextInputDatatestids = {\n CONTAINER: 'ds-controlled-large-text-input-container',\n CHAR_COUNTER: 'ds-controlled-large-text-input-char-counter',\n INPUT: 'ds-controlled-large-text-input',\n};\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACAhB,MAAM,yCAAyC;AAAA,EACpD,WAAW;AAAA,EACX,cAAc;AAAA,EACd,OAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/exported-related/theming.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const DSControlledLargeTextInputName = 'DSControlledLargeTextInput' as const;\n\nexport const DSControlledLargeTextInputSlots = {\n CONTAINER: 'root',\n INPUT: 'input',\n CHAR_COUNTER: 'char-counter',\n} as const;\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const DSControlledLargeTextInputName = 'DSControlledLargeTextInput';\n\nexport const DSControlledLargeTextInputSlots = {\n CONTAINER: 'root',\n INPUT: 'input',\n CHAR_COUNTER: 'char-counter',\n};\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACAhB,MAAM,iCAAiC;AAEvC,MAAM,kCAAkC;AAAA,EAC7C,WAAW;AAAA,EACX,OAAO;AAAA,EACP,cAAc;AAChB;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/index.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type {} from '@xstyled/system';\nexport * from './DSControlledLargeTextInput';\nexport * from './exported-related';\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACCvB,cAAc;AACd,cAAc;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './DSControlledLargeTextInput';\nexport * from './exported-related';\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;AACd,cAAc;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/react-desc-prop-types.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type React from 'react';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-utilities';\n\nconst noop = () => {};\n\nexport declare namespace DSControlledLargeTextInputT {\n export interface DefaultProps {\n value: string;\n onChange: (newVal: string, event: React.SyntheticEvent<HTMLInputElement>) => void;\n resizable: boolean;\n hasError: boolean;\n rows: string;\n }\n\n export interface RequiredProps {\n name: string;\n id: string;\n }\n\n export interface PropsOptional {\n disabled?: boolean;\n readOnly?: boolean;\n maxHeight?: number;\n innerRef?: React.MutableRefObject<HTMLTextAreaElement | null>;\n hasError?: boolean;\n }\n\n export interface Props extends DefaultProps, PropsOptional, RequiredProps {}\n}\n\nexport const defaultProps: DSControlledLargeTextInputT.DefaultProps = {\n rows: '2',\n value: '',\n onChange: noop,\n resizable: false,\n hasError: false,\n};\n\nexport const propTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n value: PropTypes.string.description('Text are value.').defaultValue(''),\n onChange: PropTypes.func.description('OnChange cb.').defaultValue('() => {}'),\n resizable: PropTypes.bool.description('Enables to resize the component.').defaultValue(false),\n rows: PropTypes.string.description(\n 'Sets the number of lines for the default height. Once lines are reached, scroll behavior enables.',\n ),\n id: PropTypes.string.description('Unique id.'),\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).description('Inner ref to the input.'),\n disabled: PropTypes.bool.description('Set disabled state.'),\n readOnly: PropTypes.bool.description('Set readonly state.'),\n maxHeight: PropTypes.number.description('Set max height to recize input text'),\n hasError: PropTypes.bool.description('Set error state.').defaultValue(false),\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,WAAW,2BAA2B,wBAAwB;AAEvE,MAAM,OAAO,MAAM;AAAC;AA2Bb,MAAM,eAAyD;AAAA,EACpE,MAAM;AAAA,EACN,OAAO;AAAA,EACP,UAAU;AAAA,EACV,WAAW;AAAA,EACX,UAAU;AACZ;AAEO,MAAM,YAAY;AAAA,EACvB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,OAAO,UAAU,OAAO,YAAY,iBAAiB,EAAE,aAAa,EAAE;AAAA,EACtE,UAAU,UAAU,KAAK,YAAY,cAAc,EAAE,aAAa,UAAU;AAAA,EAC5E,WAAW,UAAU,KAAK,YAAY,kCAAkC,EAAE,aAAa,KAAK;AAAA,EAC5F,MAAM,UAAU,OAAO;AAAA,IACrB;AAAA,EACF;AAAA,EACA,IAAI,UAAU,OAAO,YAAY,YAAY;AAAA,EAC7C,UAAU,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,IAAI,CAAC,EAAE,YAAY,yBAAyB;AAAA,EACvG,UAAU,UAAU,KAAK,YAAY,qBAAqB;AAAA,EAC1D,UAAU,UAAU,KAAK,YAAY,qBAAqB;AAAA,EAC1D,WAAW,UAAU,OAAO,YAAY,qCAAqC;AAAA,EAC7E,UAAU,UAAU,KAAK,YAAY,kBAAkB,EAAE,aAAa,KAAK;AAC7E;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-utilities';\n\nconst noop = () => {};\n\nexport declare namespace DSControlledLargeTextInputT {\n export interface DefaultProps {\n value: string;\n onChange: () => void;\n resizable: boolean;\n hasError: boolean;\n rows: string;\n }\n\n export interface RequiredProps {\n name: string;\n id: string;\n }\n\n export interface PropsOptional {\n disabled?: boolean;\n readOnly?: boolean;\n maxHeight?: number;\n innerRef?: React.MutableRefObject<HTMLTextAreaElement | null>;\n hasError?: boolean;\n }\n\n export interface Props extends DefaultProps, PropsOptional, RequiredProps {}\n}\n\nexport const defaultProps: DSControlledLargeTextInputT.DefaultProps = {\n rows: '2',\n value: '',\n onChange: noop,\n resizable: false,\n hasError: false,\n};\n\nexport const propTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n value: PropTypes.string.description('Text are value.').defaultValue(''),\n onChange: PropTypes.func.description('OnChange cb.').defaultValue('() => {}'),\n resizable: PropTypes.bool.description('Enables to resize the component.').defaultValue(false),\n rows: PropTypes.string.description(\n 'Sets the number of lines for the default height. Once lines are reached, scroll behavior enables.',\n ),\n id: PropTypes.string.description('Unique id.'),\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).description('Inner ref to the input.'),\n disabled: PropTypes.bool.description('Set disabled state.'),\n readOnly: PropTypes.bool.description('Set readonly state.'),\n maxHeight: PropTypes.number.description('Set max height to recize input text'),\n hasError: PropTypes.bool.description('Set error state.').defaultValue(false),\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,WAAW,2BAA2B,wBAAwB;AAEvE,MAAM,OAAO,MAAM;AAAC;AA2Bb,MAAM,eAAyD;AAAA,EACpE,MAAM;AAAA,EACN,OAAO;AAAA,EACP,UAAU;AAAA,EACV,WAAW;AAAA,EACX,UAAU;AACZ;AAEO,MAAM,YAAY;AAAA,EACvB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,OAAO,UAAU,OAAO,YAAY,iBAAiB,EAAE,aAAa,EAAE;AAAA,EACtE,UAAU,UAAU,KAAK,YAAY,cAAc,EAAE,aAAa,UAAU;AAAA,EAC5E,WAAW,UAAU,KAAK,YAAY,kCAAkC,EAAE,aAAa,KAAK;AAAA,EAC5F,MAAM,UAAU,OAAO;AAAA,IACrB;AAAA,EACF;AAAA,EACA,IAAI,UAAU,OAAO,YAAY,YAAY;AAAA,EAC7C,UAAU,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,IAAI,CAAC,EAAE,YAAY,yBAAyB;AAAA,EACvG,UAAU,UAAU,KAAK,YAAY,qBAAqB;AAAA,EAC1D,UAAU,UAAU,KAAK,YAAY,qBAAqB;AAAA,EAC1D,WAAW,UAAU,OAAO,YAAY,qCAAqC;AAAA,EAC7E,UAAU,UAAU,KAAK,YAAY,kBAAkB,EAAE,aAAa,KAAK;AAC7E;",
6
6
  "names": []
7
7
  }
@@ -6,31 +6,26 @@ const StyledContainer = styled("div", {
6
6
  slot: DSControlledLargeTextInputSlots.CONTAINER
7
7
  })`
8
8
  display: grid;
9
+ grid-gap: 4px;
9
10
  grid-template-rows: auto auto;
10
11
  grid-template-columns: fit-content;
11
- ${({ $isDisabled }) => $isDisabled ? `
12
- background-color: #EBEDF0;
13
- color: #616b7f;
14
- ` : ``}
15
12
  ${xStyledCommonProps}
16
13
  `;
17
14
  const WrapperBorder = styled("div")`
18
- ${({ $isDisabled, theme }) => !$isDisabled ? `
19
- &:hover {
20
- outline: 1px solid ${theme.colors.brand[700]};
21
- outline-offset: -1px;
22
- }
23
- &:focus,
24
- &:focus-within {
25
- outline: 2px solid ${theme.colors.brand[700]};
26
- outline-offset: -2px;
27
- }
28
- &:hover,
29
- &:focus,
30
- &:focus-within {
31
- border-color: transparent;
32
- }
33
- ` : ``}
15
+ &:hover::after,
16
+ &:focus::after {
17
+ content: ' ';
18
+ position: absolute;
19
+ inset: 0px;
20
+ border: 2px solid brand-700;
21
+ border-radius: inherit;
22
+ pointer-events: none;
23
+ z-index: 1;
24
+ }
25
+ &:hover,
26
+ &:focus {
27
+ border-color: transparent;
28
+ }
34
29
  border: 1px solid neutral-400;
35
30
  border-radius: 2px;
36
31
  position: relative;
@@ -47,13 +42,14 @@ const StyledTextArea = styled("textarea", {
47
42
  border: none;
48
43
  padding: 8px;
49
44
  ${({ resizable }) => resizable ? `` : `resize: none;`}
45
+ &:disabled {
46
+ &:hover {
47
+ cursor: not-allowed;
48
+ }
49
+ }
50
50
  ${({ $maxHeight }) => $maxHeight ? `max-height: ${$maxHeight}px;` : ``}
51
51
  ${({ $minHeight }) => $minHeight ? `min-height: ${$minHeight}px;` : ``}
52
- ${({ disabled }) => disabled ? `
53
- overflow: hidden;
54
- background-color: #EBEDF0;
55
- cursor: not-allowed;
56
- ` : ""}
52
+ ${({ disabled }) => disabled ? `overflow: hidden` : ""}
57
53
  `;
58
54
  export {
59
55
  StyledContainer,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/styles.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled, xStyledCommonProps } from '@elliemae/ds-system';\nimport { DSControlledLargeTextInputName, DSControlledLargeTextInputSlots } from './exported-related';\n\nexport const StyledContainer = styled('div', {\n name: DSControlledLargeTextInputName,\n slot: DSControlledLargeTextInputSlots.CONTAINER,\n})<{ $isDisabled?: boolean }>`\n display: grid;\n grid-template-rows: auto auto;\n grid-template-columns: fit-content;\n ${({ $isDisabled }) =>\n $isDisabled\n ? `\n background-color: #EBEDF0;\n color: #616b7f;\n `\n : ``}\n ${xStyledCommonProps}\n`;\n\nexport const WrapperBorder = styled('div')<{ $hasError?: boolean; $isDisabled?: boolean }>`\n ${({ $isDisabled, theme }) =>\n !$isDisabled\n ? `\n&:hover {\n outline: 1px solid ${theme.colors.brand[700]};\n outline-offset: -1px;\n}\n&:focus,\n&:focus-within {\n outline: 2px solid ${theme.colors.brand[700]};\n outline-offset: -2px;\n}\n&:hover,\n&:focus,\n&:focus-within {\n border-color: transparent;\n} \n`\n : ``}\n border: 1px solid neutral-400;\n border-radius: 2px;\n position: relative;\n box-sizing: content-box;\n ${({ $hasError }) => ($hasError ? `border: 2px solid red;` : ``)}\n`;\n\ninterface StyledTextAreaT {\n resizable?: boolean;\n hasError?: boolean;\n $maxHeight?: number;\n $minHeight?: number;\n}\nexport const StyledTextArea = styled('textarea', {\n name: DSControlledLargeTextInputName,\n slot: DSControlledLargeTextInputSlots.INPUT,\n})<StyledTextAreaT>`\n line-height: 1;\n outline: none;\n width: 100%;\n border: none;\n padding: 8px;\n ${({ resizable }) => (resizable ? `` : `resize: none;`)}\n ${({ $maxHeight }) => ($maxHeight ? `max-height: ${$maxHeight}px;` : ``)}\n ${({ $minHeight }) => ($minHeight ? `min-height: ${$minHeight}px;` : ``)}\n ${({ disabled }) =>\n disabled\n ? `\n overflow: hidden;\n background-color: #EBEDF0;\n cursor: not-allowed;\n `\n : ''}\n`;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,QAAQ,0BAA0B;AAC3C,SAAS,gCAAgC,uCAAuC;AAEzE,MAAM,kBAAkB,OAAO,OAAO;AAAA,EAC3C,MAAM;AAAA,EACN,MAAM,gCAAgC;AACxC,CAAC;AAAA;AAAA;AAAA;AAAA,IAIG,CAAC,EAAE,YAAY,MACf,cACI;AAAA;AAAA;AAAA,MAIA;AAAA,IACJ;AAAA;AAGG,MAAM,gBAAgB,OAAO,KAAK;AAAA,IACrC,CAAC,EAAE,aAAa,MAAM,MACtB,CAAC,cACG;AAAA;AAAA,uBAEe,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA,uBAKnB,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASlC;AAAA;AAAA;AAAA;AAAA;AAAA,IAKJ,CAAC,EAAE,UAAU,MAAO,YAAY,2BAA2B;AAAA;AASxD,MAAM,iBAAiB,OAAO,YAAY;AAAA,EAC/C,MAAM;AAAA,EACN,MAAM,gCAAgC;AACxC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMG,CAAC,EAAE,UAAU,MAAO,YAAY,KAAK;AAAA,IACrC,CAAC,EAAE,WAAW,MAAO,aAAa,eAAe,kBAAkB;AAAA,IACnE,CAAC,EAAE,WAAW,MAAO,aAAa,eAAe,kBAAkB;AAAA,IACnE,CAAC,EAAE,SAAS,MACZ,WACI;AAAA;AAAA;AAAA;AAAA,MAKA;AAAA;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled, xStyledCommonProps } from '@elliemae/ds-system';\nimport { DSControlledLargeTextInputName, DSControlledLargeTextInputSlots } from './exported-related';\n\ninterface StyledTextAreaT {\n resizable: boolean;\n hasError: boolean;\n}\n\nexport const StyledContainer = styled('div', {\n name: DSControlledLargeTextInputName,\n slot: DSControlledLargeTextInputSlots.CONTAINER,\n})`\n display: grid;\n grid-gap: 4px;\n grid-template-rows: auto auto;\n grid-template-columns: fit-content;\n ${xStyledCommonProps}\n`;\n\nexport const WrapperBorder = styled('div')`\n &:hover::after,\n &:focus::after {\n content: ' ';\n position: absolute;\n inset: 0px;\n border: 2px solid brand-700;\n border-radius: inherit;\n pointer-events: none;\n z-index: 1;\n }\n &:hover,\n &:focus {\n border-color: transparent;\n }\n border: 1px solid neutral-400;\n border-radius: 2px;\n position: relative;\n box-sizing: content-box;\n ${({ $hasError }) => ($hasError ? `border: 2px solid red;` : ``)}\n`;\n\nexport const StyledTextArea = styled('textarea', {\n name: DSControlledLargeTextInputName,\n slot: DSControlledLargeTextInputSlots.INPUT,\n})<StyledTextAreaT>`\n line-height: 1;\n outline: none;\n width: 100%;\n border: none;\n padding: 8px;\n ${({ resizable }) => (resizable ? `` : `resize: none;`)}\n &:disabled {\n &:hover {\n cursor: not-allowed;\n }\n }\n ${({ $maxHeight }) => ($maxHeight ? `max-height: ${$maxHeight}px;` : ``)}\n ${({ $minHeight }) => ($minHeight ? `min-height: ${$minHeight}px;` : ``)}\n ${({ disabled }) => (disabled ? `overflow: hidden` : '')}\n`;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,QAAQ,0BAA0B;AAC3C,SAAS,gCAAgC,uCAAuC;AAOzE,MAAM,kBAAkB,OAAO,OAAO;AAAA,EAC3C,MAAM;AAAA,EACN,MAAM,gCAAgC;AACxC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,IAKG;AAAA;AAGG,MAAM,gBAAgB,OAAO,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAmBrC,CAAC,EAAE,UAAU,MAAO,YAAY,2BAA2B;AAAA;AAGxD,MAAM,iBAAiB,OAAO,YAAY;AAAA,EAC/C,MAAM;AAAA,EACN,MAAM,gCAAgC;AACxC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMG,CAAC,EAAE,UAAU,MAAO,YAAY,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMrC,CAAC,EAAE,WAAW,MAAO,aAAa,eAAe,kBAAkB;AAAA,IACnE,CAAC,EAAE,WAAW,MAAO,aAAa,eAAe,kBAAkB;AAAA,IACnE,CAAC,EAAE,SAAS,MAAO,WAAW,qBAAqB;AAAA;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-form-input-textarea",
3
- "version": "3.12.0",
3
+ "version": "3.13.0-next.1",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Controlled Form Input Textarea",
6
6
  "files": [
@@ -35,8 +35,8 @@
35
35
  "indent": 4
36
36
  },
37
37
  "dependencies": {
38
- "@elliemae/ds-system": "3.12.0",
39
- "@elliemae/ds-utilities": "3.12.0"
38
+ "@elliemae/ds-system": "3.13.0-next.1",
39
+ "@elliemae/ds-utilities": "3.13.0-next.1"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@elliemae/pui-theme": "~2.6.0",
@@ -44,12 +44,10 @@
44
44
  "@testing-library/jest-dom": "~5.16.4",
45
45
  "@testing-library/react": "~12.1.3",
46
46
  "@testing-library/user-event": "~13.5.0",
47
- "@xstyled/system": "~3.7.0",
48
47
  "styled-components": "~5.3.6"
49
48
  },
50
49
  "peerDependencies": {
51
50
  "@elliemae/pui-theme": "~2.6.0",
52
- "@xstyled/system": "~3.7.0",
53
51
  "react": "^17.0.2",
54
52
  "react-dom": "^17.0.2",
55
53
  "styled-components": "~5.3.6",