@elliemae/ds-form-input-textarea 3.35.0 → 3.36.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.
- package/dist/cjs/DSControlledLargeTextInput.js +3 -6
- package/dist/cjs/DSControlledLargeTextInput.js.map +1 -1
- package/dist/cjs/styles.js +1 -2
- package/dist/cjs/styles.js.map +1 -1
- package/dist/esm/DSControlledLargeTextInput.js +3 -6
- package/dist/esm/DSControlledLargeTextInput.js.map +1 -1
- package/dist/esm/styles.js +1 -2
- package/dist/esm/styles.js.map +1 -1
- package/package.json +5 -5
|
@@ -56,12 +56,9 @@ const DSControlledLargeTextInput = (props) => {
|
|
|
56
56
|
(0, import_react.useLayoutEffect)(() => {
|
|
57
57
|
if (ghostRef && ghostRef.current) {
|
|
58
58
|
const { offsetHeight, scrollHeight } = ghostRef.current;
|
|
59
|
-
if (rows !== void 0)
|
|
60
|
-
|
|
61
|
-
else
|
|
62
|
-
setCalculatedMinHeight(maxHeight);
|
|
63
|
-
else
|
|
64
|
-
setCalculatedMinHeight(scrollHeight);
|
|
59
|
+
if (rows !== void 0) setCalculatedMinHeight(offsetHeight);
|
|
60
|
+
else if (maxHeight !== void 0 && scrollHeight >= maxHeight) setCalculatedMinHeight(maxHeight);
|
|
61
|
+
else setCalculatedMinHeight(scrollHeight);
|
|
65
62
|
}
|
|
66
63
|
}, [maxHeight, value, rows]);
|
|
67
64
|
const referenceSetter = (0, import_react.useMemo)(() => (0, import_ds_utilities.mergeRefs)(textareaRef, innerRef), [innerRef]);
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSControlledLargeTextInput.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
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 innerRef={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 innerRef={ghostRef}\n value={value}\n style={{\n visibility: 'hidden',\n pointerEvents: 'none',\n position: 'absolute',\n paddingLeft: '9px',\n paddingRight: '9px',\n }}\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>;\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,SA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,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,UAAU;AAAA,YACV,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,UAAU;AAAA,YACV;AAAA,YACA,OAAO;AAAA,cACL,YAAY;AAAA,cACZ,eAAe;AAAA,cACf,UAAU;AAAA,cACV,aAAa;AAAA,cACb,cAAc;AAAA,YAChB;AAAA,YACA,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
|
}
|
package/dist/cjs/styles.js
CHANGED
|
@@ -91,8 +91,7 @@ const StyledTextArea = (0, import_ds_system.styled)("textarea", {
|
|
|
91
91
|
` : ""}
|
|
92
92
|
|
|
93
93
|
${({ rows, $maxHeight }) => {
|
|
94
|
-
if (rows === void 0 && $maxHeight === void 0)
|
|
95
|
-
return "overflow: hidden;";
|
|
94
|
+
if (rows === void 0 && $maxHeight === void 0) return "overflow: hidden;";
|
|
96
95
|
return "";
|
|
97
96
|
}}
|
|
98
97
|
`;
|
package/dist/cjs/styles.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
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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;AAAA;AAAA;AAAA;AAAA,IAOG,CAAC,EAAE,WAAW,MAAO,aAAa,eAAe,UAAU,QAAQ,EAAG;AAAA,IACtE,CAAC,EAAE,WAAW,MAAO,aAAa,eAAe,UAAU,QAAQ,EAAG;AAAA,IACtE,CAAC,EAAE,SAAS,MACZ,WACI;AAAA;AAAA;AAAA;AAAA,MAKA,EAAE;AAAA;AAAA,IAEN,CAAC,EAAE,MAAM,WAAW,MAAM;AAC1B,MAAI,SAAS,UAAa,eAAe,OAAW,QAAO;AAC3D,SAAO;AACT,CAAC;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -28,12 +28,9 @@ const DSControlledLargeTextInput = (props) => {
|
|
|
28
28
|
useLayoutEffect(() => {
|
|
29
29
|
if (ghostRef && ghostRef.current) {
|
|
30
30
|
const { offsetHeight, scrollHeight } = ghostRef.current;
|
|
31
|
-
if (rows !== void 0)
|
|
32
|
-
|
|
33
|
-
else
|
|
34
|
-
setCalculatedMinHeight(maxHeight);
|
|
35
|
-
else
|
|
36
|
-
setCalculatedMinHeight(scrollHeight);
|
|
31
|
+
if (rows !== void 0) setCalculatedMinHeight(offsetHeight);
|
|
32
|
+
else if (maxHeight !== void 0 && scrollHeight >= maxHeight) setCalculatedMinHeight(maxHeight);
|
|
33
|
+
else setCalculatedMinHeight(scrollHeight);
|
|
37
34
|
}
|
|
38
35
|
}, [maxHeight, value, rows]);
|
|
39
36
|
const referenceSetter = useMemo(() => mergeRefs(textareaRef, innerRef), [innerRef]);
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/DSControlledLargeTextInput.tsx"],
|
|
4
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 innerRef={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 innerRef={ghostRef}\n value={value}\n style={{\n visibility: 'hidden',\n pointerEvents: 'none',\n position: 'absolute',\n paddingLeft: '9px',\n paddingRight: '9px',\n }}\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>;\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,OAAm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C1F,wBAAuB,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,UAAU;AAAA,YACV,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,UAAU;AAAA,YACV;AAAA,YACA,OAAO;AAAA,cACL,YAAY;AAAA,cACZ,eAAe;AAAA,cACf,UAAU;AAAA,cACV,aAAa;AAAA,cACb,cAAc;AAAA,YAChB;AAAA,YACA,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
|
}
|
package/dist/esm/styles.js
CHANGED
|
@@ -56,8 +56,7 @@ const StyledTextArea = styled("textarea", {
|
|
|
56
56
|
` : ""}
|
|
57
57
|
|
|
58
58
|
${({ rows, $maxHeight }) => {
|
|
59
|
-
if (rows === void 0 && $maxHeight === void 0)
|
|
60
|
-
return "overflow: hidden;";
|
|
59
|
+
if (rows === void 0 && $maxHeight === void 0) return "overflow: hidden;";
|
|
61
60
|
return "";
|
|
62
61
|
}}
|
|
63
62
|
`;
|
package/dist/esm/styles.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
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
|
-
"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,
|
|
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,EAAE;AAAA,IACN,kBAAkB;AAAA;AAGf,MAAM,gBAAgB,OAAO,KAAK;AAAA,IACrC,CAAC,EAAE,aAAa,MAAM,MACtB,CAAC,cACG;AAAA;AAAA,uBAEe,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,uBAKvB,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAStC,EAAE;AAAA;AAAA;AAAA;AAAA;AAAA,IAKN,CAAC,EAAE,WAAW,MAAM,MAAO,YAAY,qBAAqB,MAAM,OAAO,OAAO,GAAG,CAAC,MAAM,EAAG;AAAA;AAS1F,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,UAAU,QAAQ,EAAG;AAAA,IACtE,CAAC,EAAE,WAAW,MAAO,aAAa,eAAe,UAAU,QAAQ,EAAG;AAAA,IACtE,CAAC,EAAE,SAAS,MACZ,WACI;AAAA;AAAA;AAAA;AAAA,MAKA,EAAE;AAAA;AAAA,IAEN,CAAC,EAAE,MAAM,WAAW,MAAM;AAC1B,MAAI,SAAS,UAAa,eAAe,OAAW,QAAO;AAC3D,SAAO;AACT,CAAC;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.
|
|
3
|
+
"version": "3.36.0-next.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Controlled Form Input Textarea",
|
|
6
6
|
"files": [
|
|
@@ -36,16 +36,16 @@
|
|
|
36
36
|
"indent": 4
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@elliemae/ds-props-helpers": "3.
|
|
40
|
-
"@elliemae/ds-system": "3.
|
|
41
|
-
"@elliemae/ds-utilities": "3.
|
|
39
|
+
"@elliemae/ds-props-helpers": "3.36.0-next.1",
|
|
40
|
+
"@elliemae/ds-system": "3.36.0-next.1",
|
|
41
|
+
"@elliemae/ds-utilities": "3.36.0-next.1"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@elliemae/pui-cli": "~9.0.0-next.31",
|
|
45
45
|
"@elliemae/pui-theme": "~2.9.3",
|
|
46
46
|
"@xstyled/system": "~3.7.3",
|
|
47
47
|
"styled-components": "~5.3.9",
|
|
48
|
-
"@elliemae/ds-monorepo-devops": "3.
|
|
48
|
+
"@elliemae/ds-monorepo-devops": "3.36.0-next.1"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"@elliemae/pui-theme": "~2.9.3",
|