@elliemae/ds-form-input-textarea 3.22.0-next.8 → 3.22.0-rc.0

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.
@@ -64,12 +64,7 @@ const DSControlledLargeTextInput = (props) => {
64
64
  setCalculatedMinHeight(scrollHeight);
65
65
  }
66
66
  }, [maxHeight, value, rows]);
67
- const getReferenceSetter = (0, import_react.useCallback)(() => {
68
- const refToMerge = [textareaRef];
69
- if (innerRef)
70
- refToMerge.push(innerRef);
71
- return (0, import_ds_utilities.mergeRefs)(...refToMerge);
72
- }, [innerRef]);
67
+ const referenceSetter = (0, import_react.useMemo)(() => (0, import_ds_utilities.mergeRefs)(textareaRef, innerRef), [innerRef]);
73
68
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
74
69
  import_styles.StyledContainer,
75
70
  {
@@ -81,7 +76,7 @@ const DSControlledLargeTextInput = (props) => {
81
76
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.WrapperBorder, { $hasError: hasError, $isDisabled: otherProps.disabled, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
82
77
  import_styles.StyledTextArea,
83
78
  {
84
- ref: getReferenceSetter,
79
+ ref: referenceSetter,
85
80
  "aria-multiline": true,
86
81
  value,
87
82
  $maxHeight: maxHeight,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 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 useValidateTypescriptPropTypes,\n useMemoMergePropsWithDefault,\n useGetGlobalAttributes,\n useGetXstyledProps,\n} from '@elliemae/ds-props-helpers';\nimport { mergeRefs } from '@elliemae/ds-utilities';\nimport { propTypes, defaultProps } from './react-desc-prop-types.js';\nimport { StyledTextArea, StyledContainer, WrapperBorder } from './styles.js';\nimport { DSControlledLargeTextInputName, DSControlledLargetTextInputDatatestids } from './exported-related/index.js';\nimport type { DSControlledLargeTextInputT } from './react-desc-prop-types.js';\n\nconst DSControlledLargeTextInput = (props: DSControlledLargeTextInputT.Props): JSX.Element => {\n useValidateTypescriptPropTypes(props, propTypes, DSControlledLargeTextInputName);\n\n const propsWithDefault = useMemoMergePropsWithDefault<DSControlledLargeTextInputT.InternalProps>(props, defaultProps);\n\n const { value, onChange, innerRef, name, id, hasError, maxHeight, ...otherProps } = propsWithDefault;\n\n const { className, rows, ...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<HTMLTextAreaElement>>(\n (e) => onChange(e.currentTarget.value, e),\n [onChange],\n );\n\n useLayoutEffect(() => {\n if (ghostRef && ghostRef.current) {\n const { offsetHeight, scrollHeight } = ghostRef.current;\n if (rows !== undefined) setCalculatedMinHeight(offsetHeight);\n else if (maxHeight !== undefined && scrollHeight >= maxHeight) setCalculatedMinHeight(maxHeight);\n else setCalculatedMinHeight(scrollHeight);\n }\n }, [maxHeight, value, rows]);\n\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 name={name}\n id={id}\n data-testid={DSControlledLargetTextInputDatatestids.INPUT}\n rows={rows}\n {...globalAttributes}\n />\n </WrapperBorder>\n <StyledTextArea\n disabled\n aria-label=\"ghost textarea\"\n ref={ghostRef}\n value={value}\n style={{ visibility: 'hidden', pointerEvents: 'none', position: 'absolute' }}\n $maxHeight={maxHeight}\n rows={rows}\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,8BAMO;AACP,0BAA0B;AAC1B,mCAAwC;AACxC,oBAA+D;AAC/D,8BAAuF;AAGvF,MAAM,6BAA6B,CAAC,UAA0D;AAC5F,8DAA+B,OAAO,wCAAW,sDAA8B;AAE/E,QAAM,uBAAmB,sDAAwE,OAAO,yCAAY;AAEpH,QAAM,EAAE,OAAO,UAAU,UAAU,MAAM,IAAI,UAAU,WAAW,GAAG,WAAW,IAAI;AAEpF,QAAM,EAAE,WAAW,MAAM,GAAG,iBAAiB,QAAI,gDAAuB,UAAU;AAElF,QAAM,mBAAe,4CAAmB,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,SAAS;AAChC,YAAM,EAAE,cAAc,aAAa,IAAI,SAAS;AAChD,UAAI,SAAS;AAAW,+BAAuB,YAAY;AAAA,eAClD,cAAc,UAAa,gBAAgB;AAAW,+BAAuB,SAAS;AAAA;AAC1F,+BAAuB,YAAY;AAAA,IAC1C;AAAA,EACF,GAAG,CAAC,WAAW,OAAO,IAAI,CAAC;AAE3B,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,eAAa,+DAAuC;AAAA,YACpD;AAAA,YACC,GAAG;AAAA;AAAA,QACN,GACF;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,UAAQ;AAAA,YACR,cAAW;AAAA,YACX,KAAK;AAAA,YACL;AAAA,YACA,OAAO,EAAE,YAAY,UAAU,eAAe,QAAQ,UAAU,WAAW;AAAA,YAC3E,YAAY;AAAA,YACZ;AAAA;AAAA,QACF;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,2BAA2B,cAAc;AACzC,MAAM,2CAAuC,kCAAS,0BAA0B;AAChF,qCAAqC,YAAY;",
3
+ "sources": ["../../src/DSControlledLargeTextInput.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport React, { useCallback, useMemo, useRef, useState, useLayoutEffect } from 'react';\nimport {\n describe,\n useValidateTypescriptPropTypes,\n useMemoMergePropsWithDefault,\n useGetGlobalAttributes,\n useGetXstyledProps,\n} from '@elliemae/ds-props-helpers';\nimport { mergeRefs } from '@elliemae/ds-utilities';\nimport { propTypes, defaultProps } from './react-desc-prop-types.js';\nimport { StyledTextArea, StyledContainer, WrapperBorder } from './styles.js';\nimport { DSControlledLargeTextInputName, DSControlledLargetTextInputDatatestids } from './exported-related/index.js';\nimport type { DSControlledLargeTextInputT } from './react-desc-prop-types.js';\n\nconst DSControlledLargeTextInput = (props: DSControlledLargeTextInputT.Props): JSX.Element => {\n useValidateTypescriptPropTypes(props, propTypes, DSControlledLargeTextInputName);\n\n const propsWithDefault = useMemoMergePropsWithDefault<DSControlledLargeTextInputT.InternalProps>(props, defaultProps);\n\n const { value, onChange, innerRef, name, id, hasError, maxHeight, ...otherProps } = propsWithDefault;\n\n const { className, rows, ...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<HTMLTextAreaElement>>(\n (e) => onChange(e.currentTarget.value, e),\n [onChange],\n );\n\n useLayoutEffect(() => {\n if (ghostRef && ghostRef.current) {\n const { offsetHeight, scrollHeight } = ghostRef.current;\n if (rows !== undefined) setCalculatedMinHeight(offsetHeight);\n else if (maxHeight !== undefined && scrollHeight >= maxHeight) setCalculatedMinHeight(maxHeight);\n else setCalculatedMinHeight(scrollHeight);\n }\n }, [maxHeight, value, rows]);\n\n const referenceSetter = useMemo(() => mergeRefs(textareaRef, innerRef), [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={referenceSetter}\n aria-multiline\n value={value}\n $maxHeight={maxHeight}\n $minHeight={calculatedMinHeight}\n onChange={handleOnChange}\n name={name}\n id={id}\n data-testid={DSControlledLargetTextInputDatatestids.INPUT}\n rows={rows}\n {...globalAttributes}\n />\n </WrapperBorder>\n <StyledTextArea\n disabled\n aria-label=\"ghost textarea\"\n ref={ghostRef}\n value={value}\n style={{ visibility: 'hidden', pointerEvents: 'none', position: 'absolute' }}\n $maxHeight={maxHeight}\n rows={rows}\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;ADgDnB;AA/CJ,mBAA+E;AAC/E,8BAMO;AACP,0BAA0B;AAC1B,mCAAwC;AACxC,oBAA+D;AAC/D,8BAAuF;AAGvF,MAAM,6BAA6B,CAAC,UAA0D;AAC5F,8DAA+B,OAAO,wCAAW,sDAA8B;AAE/E,QAAM,uBAAmB,sDAAwE,OAAO,yCAAY;AAEpH,QAAM,EAAE,OAAO,UAAU,UAAU,MAAM,IAAI,UAAU,WAAW,GAAG,WAAW,IAAI;AAEpF,QAAM,EAAE,WAAW,MAAM,GAAG,iBAAiB,QAAI,gDAAuB,UAAU;AAElF,QAAM,mBAAe,4CAAmB,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,SAAS;AAChC,YAAM,EAAE,cAAc,aAAa,IAAI,SAAS;AAChD,UAAI,SAAS;AAAW,+BAAuB,YAAY;AAAA,eAClD,cAAc,UAAa,gBAAgB;AAAW,+BAAuB,SAAS;AAAA;AAC1F,+BAAuB,YAAY;AAAA,IAC1C;AAAA,EACF,GAAG,CAAC,WAAW,OAAO,IAAI,CAAC;AAE3B,QAAM,sBAAkB,sBAAQ,UAAM,+BAAU,aAAa,QAAQ,GAAG,CAAC,QAAQ,CAAC;AAElF,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,eAAa,+DAAuC;AAAA,YACpD;AAAA,YACC,GAAG;AAAA;AAAA,QACN,GACF;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,UAAQ;AAAA,YACR,cAAW;AAAA,YACX,KAAK;AAAA,YACL;AAAA,YACA,OAAO,EAAE,YAAY,UAAU,eAAe,QAAQ,UAAU,WAAW;AAAA,YAC3E,YAAY;AAAA,YACZ;AAAA;AAAA,QACF;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,2BAA2B,cAAc;AACzC,MAAM,2CAAuC,kCAAS,0BAA0B;AAChF,qCAAqC,YAAY;",
6
6
  "names": []
7
7
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/exported-related/data-test-ids.ts", "../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../src/exported-related/data-test-ids.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
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"],
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": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/exported-related/index.ts", "../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../src/exported-related/index.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["export * from './data-test-ids.js';\nexport * from './theming.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,qCAAc,+BAAd;AACA,qCAAc,yBADd;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/exported-related/theming.ts", "../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../src/exported-related/theming.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
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"],
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": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/index.ts", "../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../src/index.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import type {} from '@xstyled/system';\nexport * from './DSControlledLargeTextInput.js';\nexport * from './exported-related/index.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADCvB,wBAAc,4CADd;AAEA,wBAAc,wCAFd;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/react-desc-prop-types.ts", "../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../src/react-desc-prop-types.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import type React from 'react';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\n\nconst noop = () => {};\n\nexport declare namespace DSControlledLargeTextInputT {\n export interface DefaultProps {\n value: string;\n onChange: (newVal: string, event: React.SyntheticEvent<HTMLTextAreaElement>) => void;\n hasError: boolean;\n }\n\n export interface RequiredProps {\n name: string;\n id: string;\n }\n\n export interface PropsOptional {\n rows?: string;\n disabled?: boolean;\n readOnly?: boolean;\n maxHeight?: number;\n innerRef?: React.MutableRefObject<HTMLTextAreaElement | null>;\n }\n\n export interface Props extends Partial<DefaultProps>, PropsOptional, RequiredProps {}\n\n export interface InternalProps extends DefaultProps, PropsOptional, RequiredProps {}\n}\n\nexport const defaultProps: DSControlledLargeTextInputT.DefaultProps = {\n value: '',\n onChange: noop,\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 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
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,8BAAuE;AAEvE,MAAM,OAAO,MAAM;AAAC;AA2Bb,MAAM,eAAyD;AAAA,EACpE,OAAO;AAAA,EACP,UAAU;AAAA,EACV,UAAU;AACZ;AAEO,MAAM,YAAY;AAAA,EACvB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,OAAO,kCAAU,OAAO,YAAY,iBAAiB,EAAE,aAAa,EAAE;AAAA,EACtE,UAAU,kCAAU,KAAK,YAAY,cAAc,EAAE,aAAa,UAAU;AAAA,EAC5E,MAAM,kCAAU,OAAO;AAAA,IACrB;AAAA,EACF;AAAA,EACA,IAAI,kCAAU,OAAO,YAAY,YAAY;AAAA,EAC7C,UAAU,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,IAAI,CAAC,EAAE,YAAY,yBAAyB;AAAA,EACvG,UAAU,kCAAU,KAAK,YAAY,qBAAqB;AAAA,EAC1D,UAAU,kCAAU,KAAK,YAAY,qBAAqB;AAAA,EAC1D,WAAW,kCAAU,OAAO,YAAY,qCAAqC;AAAA,EAC7E,UAAU,kCAAU,KAAK,YAAY,kBAAkB,EAAE,aAAa,KAAK;AAC7E;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/styles.tsx", "../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../src/styles.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import { styled, xStyledCommonProps } from '@elliemae/ds-system';\nimport { DSControlledLargeTextInputName, DSControlledLargeTextInputSlots } from './exported-related/index.js';\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, theme }) => ($hasError ? `border: 1px solid ${theme.colors.danger[900]};` : ``)}\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 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 ${({ rows, $maxHeight }) => {\n if (rows === undefined && $maxHeight === undefined) return 'overflow: hidden;';\n return '';\n }}\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
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,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA,uBAKtB,MAAM,OAAO,MAAM,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASrC;AAAA;AAAA;AAAA;AAAA;AAAA,IAKJ,CAAC,EAAE,WAAW,MAAM,MAAO,YAAY,qBAAqB,MAAM,OAAO,OAAO,GAAG,OAAO;AAAA;AASvF,MAAM,qBAAiB,yBAAO,YAAY;AAAA,EAC/C,MAAM;AAAA,EACN,MAAM,wDAAgC;AACxC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOG,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;AAAA,IAEJ,CAAC,EAAE,MAAM,WAAW,MAAM;AAC1B,MAAI,SAAS,UAAa,eAAe;AAAW,WAAO;AAC3D,SAAO;AACT;AAAA;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
- import { useCallback, useRef, useState, useLayoutEffect } from "react";
3
+ import { useCallback, useMemo, useRef, useState, useLayoutEffect } from "react";
4
4
  import {
5
5
  describe,
6
6
  useValidateTypescriptPropTypes,
@@ -36,12 +36,7 @@ const DSControlledLargeTextInput = (props) => {
36
36
  setCalculatedMinHeight(scrollHeight);
37
37
  }
38
38
  }, [maxHeight, value, rows]);
39
- const getReferenceSetter = useCallback(() => {
40
- const refToMerge = [textareaRef];
41
- if (innerRef)
42
- refToMerge.push(innerRef);
43
- return mergeRefs(...refToMerge);
44
- }, [innerRef]);
39
+ const referenceSetter = useMemo(() => mergeRefs(textareaRef, innerRef), [innerRef]);
45
40
  return /* @__PURE__ */ jsxs(
46
41
  StyledContainer,
47
42
  {
@@ -53,7 +48,7 @@ const DSControlledLargeTextInput = (props) => {
53
48
  /* @__PURE__ */ jsx(WrapperBorder, { $hasError: hasError, $isDisabled: otherProps.disabled, children: /* @__PURE__ */ jsx(
54
49
  StyledTextArea,
55
50
  {
56
- ref: getReferenceSetter,
51
+ ref: referenceSetter,
57
52
  "aria-multiline": true,
58
53
  value,
59
54
  $maxHeight: maxHeight,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 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 useValidateTypescriptPropTypes,\n useMemoMergePropsWithDefault,\n useGetGlobalAttributes,\n useGetXstyledProps,\n} from '@elliemae/ds-props-helpers';\nimport { mergeRefs } from '@elliemae/ds-utilities';\nimport { propTypes, defaultProps } from './react-desc-prop-types.js';\nimport { StyledTextArea, StyledContainer, WrapperBorder } from './styles.js';\nimport { DSControlledLargeTextInputName, DSControlledLargetTextInputDatatestids } from './exported-related/index.js';\nimport type { DSControlledLargeTextInputT } from './react-desc-prop-types.js';\n\nconst DSControlledLargeTextInput = (props: DSControlledLargeTextInputT.Props): JSX.Element => {\n useValidateTypescriptPropTypes(props, propTypes, DSControlledLargeTextInputName);\n\n const propsWithDefault = useMemoMergePropsWithDefault<DSControlledLargeTextInputT.InternalProps>(props, defaultProps);\n\n const { value, onChange, innerRef, name, id, hasError, maxHeight, ...otherProps } = propsWithDefault;\n\n const { className, rows, ...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<HTMLTextAreaElement>>(\n (e) => onChange(e.currentTarget.value, e),\n [onChange],\n );\n\n useLayoutEffect(() => {\n if (ghostRef && ghostRef.current) {\n const { offsetHeight, scrollHeight } = ghostRef.current;\n if (rows !== undefined) setCalculatedMinHeight(offsetHeight);\n else if (maxHeight !== undefined && scrollHeight >= maxHeight) setCalculatedMinHeight(maxHeight);\n else setCalculatedMinHeight(scrollHeight);\n }\n }, [maxHeight, value, rows]);\n\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 name={name}\n id={id}\n data-testid={DSControlledLargetTextInputDatatestids.INPUT}\n rows={rows}\n {...globalAttributes}\n />\n </WrapperBorder>\n <StyledTextArea\n disabled\n aria-label=\"ghost textarea\"\n ref={ghostRef}\n value={value}\n style={{ visibility: 'hidden', pointerEvents: 'none', position: 'absolute' }}\n $maxHeight={maxHeight}\n rows={rows}\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,OACK;AACP,SAAS,iBAAiB;AAC1B,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,6BAAwE,OAAO,YAAY;AAEpH,QAAM,EAAE,OAAO,UAAU,UAAU,MAAM,IAAI,UAAU,WAAW,GAAG,WAAW,IAAI;AAEpF,QAAM,EAAE,WAAW,MAAM,GAAG,iBAAiB,IAAI,uBAAuB,UAAU;AAElF,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,SAAS;AAChC,YAAM,EAAE,cAAc,aAAa,IAAI,SAAS;AAChD,UAAI,SAAS;AAAW,+BAAuB,YAAY;AAAA,eAClD,cAAc,UAAa,gBAAgB;AAAW,+BAAuB,SAAS;AAAA;AAC1F,+BAAuB,YAAY;AAAA,IAC1C;AAAA,EACF,GAAG,CAAC,WAAW,OAAO,IAAI,CAAC;AAE3B,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,eAAa,uCAAuC;AAAA,YACpD;AAAA,YACC,GAAG;AAAA;AAAA,QACN,GACF;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,UAAQ;AAAA,YACR,cAAW;AAAA,YACX,KAAK;AAAA,YACL;AAAA,YACA,OAAO,EAAE,YAAY,UAAU,eAAe,QAAQ,UAAU,WAAW;AAAA,YAC3E,YAAY;AAAA,YACZ;AAAA;AAAA,QACF;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,2BAA2B,cAAc;AACzC,MAAM,uCAAuC,SAAS,0BAA0B;AAChF,qCAAqC,YAAY;",
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, useMemo, useRef, useState, useLayoutEffect } from 'react';\nimport {\n describe,\n useValidateTypescriptPropTypes,\n useMemoMergePropsWithDefault,\n useGetGlobalAttributes,\n useGetXstyledProps,\n} from '@elliemae/ds-props-helpers';\nimport { mergeRefs } from '@elliemae/ds-utilities';\nimport { propTypes, defaultProps } from './react-desc-prop-types.js';\nimport { StyledTextArea, StyledContainer, WrapperBorder } from './styles.js';\nimport { DSControlledLargeTextInputName, DSControlledLargetTextInputDatatestids } from './exported-related/index.js';\nimport type { DSControlledLargeTextInputT } from './react-desc-prop-types.js';\n\nconst DSControlledLargeTextInput = (props: DSControlledLargeTextInputT.Props): JSX.Element => {\n useValidateTypescriptPropTypes(props, propTypes, DSControlledLargeTextInputName);\n\n const propsWithDefault = useMemoMergePropsWithDefault<DSControlledLargeTextInputT.InternalProps>(props, defaultProps);\n\n const { value, onChange, innerRef, name, id, hasError, maxHeight, ...otherProps } = propsWithDefault;\n\n const { className, rows, ...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<HTMLTextAreaElement>>(\n (e) => onChange(e.currentTarget.value, e),\n [onChange],\n );\n\n useLayoutEffect(() => {\n if (ghostRef && ghostRef.current) {\n const { offsetHeight, scrollHeight } = ghostRef.current;\n if (rows !== undefined) setCalculatedMinHeight(offsetHeight);\n else if (maxHeight !== undefined && scrollHeight >= maxHeight) setCalculatedMinHeight(maxHeight);\n else setCalculatedMinHeight(scrollHeight);\n }\n }, [maxHeight, value, rows]);\n\n const referenceSetter = useMemo(() => mergeRefs(textareaRef, innerRef), [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={referenceSetter}\n aria-multiline\n value={value}\n $maxHeight={maxHeight}\n $minHeight={calculatedMinHeight}\n onChange={handleOnChange}\n name={name}\n id={id}\n data-testid={DSControlledLargetTextInputDatatestids.INPUT}\n rows={rows}\n {...globalAttributes}\n />\n </WrapperBorder>\n <StyledTextArea\n disabled\n aria-label=\"ghost textarea\"\n ref={ghostRef}\n value={value}\n style={{ visibility: 'hidden', pointerEvents: 'none', position: 'absolute' }}\n $maxHeight={maxHeight}\n rows={rows}\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;ACgDnB,SAOI,KAPJ;AA/CJ,SAAgB,aAAa,SAAS,QAAQ,UAAU,uBAAuB;AAC/E;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,iBAAiB;AAC1B,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,6BAAwE,OAAO,YAAY;AAEpH,QAAM,EAAE,OAAO,UAAU,UAAU,MAAM,IAAI,UAAU,WAAW,GAAG,WAAW,IAAI;AAEpF,QAAM,EAAE,WAAW,MAAM,GAAG,iBAAiB,IAAI,uBAAuB,UAAU;AAElF,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,SAAS;AAChC,YAAM,EAAE,cAAc,aAAa,IAAI,SAAS;AAChD,UAAI,SAAS;AAAW,+BAAuB,YAAY;AAAA,eAClD,cAAc,UAAa,gBAAgB;AAAW,+BAAuB,SAAS;AAAA;AAC1F,+BAAuB,YAAY;AAAA,IAC1C;AAAA,EACF,GAAG,CAAC,WAAW,OAAO,IAAI,CAAC;AAE3B,QAAM,kBAAkB,QAAQ,MAAM,UAAU,aAAa,QAAQ,GAAG,CAAC,QAAQ,CAAC;AAElF,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,eAAa,uCAAuC;AAAA,YACpD;AAAA,YACC,GAAG;AAAA;AAAA,QACN,GACF;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,UAAQ;AAAA,YACR,cAAW;AAAA,YACX,KAAK;AAAA,YACL;AAAA,YACA,OAAO,EAAE,YAAY,UAAU,eAAe,QAAQ,UAAU,WAAW;AAAA,YAC3E,YAAY;AAAA,YACZ;AAAA;AAAA,QACF;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,2BAA2B,cAAc;AACzC,MAAM,uCAAuC,SAAS,0BAA0B;AAChF,qCAAqC,YAAY;",
6
6
  "names": []
7
7
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/exported-related/data-test-ids.ts"],
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/exported-related/data-test-ids.ts"],
4
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"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACAhB,MAAM,yCAAyC;AAAA,EACpD,WAAW;AAAA,EACX,cAAc;AAAA,EACd,OAAO;AACT;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/exported-related/index.ts"],
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/exported-related/index.ts"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './data-test-ids.js';\nexport * from './theming.js';\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;AACd,cAAc;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/exported-related/theming.ts"],
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/exported-related/theming.ts"],
4
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"],
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": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/index.ts"],
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/index.ts"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type {} from '@xstyled/system';\nexport * from './DSControlledLargeTextInput.js';\nexport * from './exported-related/index.js';\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACCvB,cAAc;AACd,cAAc;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/react-desc-prop-types.ts"],
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/react-desc-prop-types.ts"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type React from 'react';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\n\nconst noop = () => {};\n\nexport declare namespace DSControlledLargeTextInputT {\n export interface DefaultProps {\n value: string;\n onChange: (newVal: string, event: React.SyntheticEvent<HTMLTextAreaElement>) => void;\n hasError: boolean;\n }\n\n export interface RequiredProps {\n name: string;\n id: string;\n }\n\n export interface PropsOptional {\n rows?: string;\n disabled?: boolean;\n readOnly?: boolean;\n maxHeight?: number;\n innerRef?: React.MutableRefObject<HTMLTextAreaElement | null>;\n }\n\n export interface Props extends Partial<DefaultProps>, PropsOptional, RequiredProps {}\n\n export interface InternalProps extends DefaultProps, PropsOptional, RequiredProps {}\n}\n\nexport const defaultProps: DSControlledLargeTextInputT.DefaultProps = {\n value: '',\n onChange: noop,\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 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
5
  "mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,WAAW,2BAA2B,wBAAwB;AAEvE,MAAM,OAAO,MAAM;AAAC;AA2Bb,MAAM,eAAyD;AAAA,EACpE,OAAO;AAAA,EACP,UAAU;AAAA,EACV,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,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": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/styles.tsx"],
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/styles.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled, xStyledCommonProps } from '@elliemae/ds-system';\nimport { DSControlledLargeTextInputName, DSControlledLargeTextInputSlots } from './exported-related/index.js';\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, theme }) => ($hasError ? `border: 1px solid ${theme.colors.danger[900]};` : ``)}\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 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 ${({ rows, $maxHeight }) => {\n if (rows === undefined && $maxHeight === undefined) return 'overflow: hidden;';\n return '';\n }}\n`;\n"],
5
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,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA,uBAKtB,MAAM,OAAO,MAAM,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASrC;AAAA;AAAA;AAAA;AAAA;AAAA,IAKJ,CAAC,EAAE,WAAW,MAAM,MAAO,YAAY,qBAAqB,MAAM,OAAO,OAAO,GAAG,OAAO;AAAA;AASvF,MAAM,iBAAiB,OAAO,YAAY;AAAA,EAC/C,MAAM;AAAA,EACN,MAAM,gCAAgC;AACxC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOG,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;AAAA,IAEJ,CAAC,EAAE,MAAM,WAAW,MAAM;AAC1B,MAAI,SAAS,UAAa,eAAe;AAAW,WAAO;AAC3D,SAAO;AACT;AAAA;",
6
6
  "names": []
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { DSControlledLargeTextInputT } from './react-desc-prop-types.js';
2
3
  declare const DSControlledLargeTextInput: {
3
4
  (props: DSControlledLargeTextInputT.Props): JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-form-input-textarea",
3
- "version": "3.22.0-next.8",
3
+ "version": "3.22.0-rc.0",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Controlled Form Input Textarea",
6
6
  "files": [
@@ -35,12 +35,12 @@
35
35
  "indent": 4
36
36
  },
37
37
  "dependencies": {
38
- "@elliemae/ds-props-helpers": "3.22.0-next.8",
39
- "@elliemae/ds-system": "3.22.0-next.8",
40
- "@elliemae/ds-utilities": "3.22.0-next.8"
38
+ "@elliemae/ds-props-helpers": "3.22.0-rc.0",
39
+ "@elliemae/ds-system": "3.22.0-rc.0",
40
+ "@elliemae/ds-utilities": "3.22.0-rc.0"
41
41
  },
42
42
  "devDependencies": {
43
- "@elliemae/pui-cli": "~9.0.0-next.17",
43
+ "@elliemae/pui-cli": "~9.0.0-next.22",
44
44
  "@elliemae/pui-theme": "~2.7.0",
45
45
  "@testing-library/dom": "~8.19.0",
46
46
  "@testing-library/jest-dom": "~5.16.5",
@@ -49,7 +49,7 @@
49
49
  "@xstyled/system": "~3.7.3",
50
50
  "jest-axe": "^7.0.1",
51
51
  "styled-components": "~5.3.9",
52
- "@elliemae/ds-monorepo-devops": "3.22.0-next.8"
52
+ "@elliemae/ds-monorepo-devops": "3.22.0-rc.0"
53
53
  },
54
54
  "peerDependencies": {
55
55
  "@elliemae/pui-theme": "~2.7.0",
@@ -64,14 +64,14 @@
64
64
  "typeSafety": false
65
65
  },
66
66
  "scripts": {
67
- "dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
67
+ "dev": "cross-env NODE_ENV=development node ../../../scripts/build/build.mjs --watch",
68
68
  "test": "pui-cli test --passWithNoTests",
69
- "lint": "node ../../scripts/lint.mjs",
70
- "eslint:fix": "eslint --ext='.js,.jsx,.test.js,.ts,.tsx' --fix --config='../../.eslintrc.js' src/",
71
- "dts": "node ../../scripts/dts.mjs",
72
- "build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs",
69
+ "lint": "node ../../../scripts/lint.mjs",
70
+ "eslint:fix": "eslint --ext='.js,.jsx,.test.js,.ts,.tsx' --fix --config='../../../.eslintrc.js' src/",
71
+ "dts": "node ../../../scripts/dts.mjs",
72
+ "build": "cross-env NODE_ENV=production node ../../../scripts/build/build.mjs",
73
73
  "dev:build": "pnpm --filter {.}... build",
74
74
  "dev:install": "pnpm --filter {.}... i --no-lockfile && pnpm run dev:build",
75
- "checkDeps": "npm exec ../ds-codemods -- check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
75
+ "checkDeps": "npm exec ../../util/ds-codemods -- check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
76
76
  }
77
77
  }