@elliemae/ds-form-input-textarea 3.16.0-next.2 → 3.16.0-next.4
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 +6 -5
- package/dist/cjs/DSControlledLargeTextInput.js.map +2 -2
- package/dist/cjs/package.json +7 -0
- package/dist/cjs/react-desc-prop-types.js +13 -13
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/esm/DSControlledLargeTextInput.js +2 -2
- package/dist/esm/DSControlledLargeTextInput.js.map +2 -2
- package/dist/esm/package.json +7 -0
- package/dist/esm/react-desc-prop-types.js +1 -1
- package/dist/esm/react-desc-prop-types.js.map +1 -1
- package/dist/types/DSControlledLargeTextInput.d.ts +1 -1
- package/dist/types/react-desc-prop-types.d.ts +446 -446
- package/package.json +5 -4
|
@@ -31,16 +31,17 @@ module.exports = __toCommonJS(DSControlledLargeTextInput_exports);
|
|
|
31
31
|
var React = __toESM(require("react"));
|
|
32
32
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
33
33
|
var import_react = require("react");
|
|
34
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
34
35
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
35
36
|
var import_react_desc_prop_types = require("./react-desc-prop-types");
|
|
36
37
|
var import_styles = require("./styles");
|
|
37
38
|
var import_exported_related = require("./exported-related");
|
|
38
39
|
const DSControlledLargeTextInput = (props) => {
|
|
39
|
-
(0,
|
|
40
|
-
const propsWithDefault = (0,
|
|
40
|
+
(0, import_ds_props_helpers.useValidateTypescriptPropTypes)(props, import_react_desc_prop_types.propTypes, import_exported_related.DSControlledLargeTextInputName);
|
|
41
|
+
const propsWithDefault = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.defaultProps);
|
|
41
42
|
const { value, onChange, innerRef, resizable, name, id, hasError, maxHeight, ...otherProps } = propsWithDefault;
|
|
42
|
-
const { className, ...globalAttributes } = (0,
|
|
43
|
-
const xstyledProps = (0,
|
|
43
|
+
const { className, ...globalAttributes } = (0, import_ds_props_helpers.useGetGlobalAttributes)(otherProps);
|
|
44
|
+
const xstyledProps = (0, import_ds_props_helpers.useGetXstyledProps)(otherProps);
|
|
44
45
|
const [calculatedMinHeight, setCalculatedMinHeight] = (0, import_react.useState)();
|
|
45
46
|
const textareaRef = (0, import_react.useRef)(null);
|
|
46
47
|
const ghostRef = (0, import_react.useRef)(null);
|
|
@@ -105,6 +106,6 @@ const DSControlledLargeTextInput = (props) => {
|
|
|
105
106
|
);
|
|
106
107
|
};
|
|
107
108
|
DSControlledLargeTextInput.displayName = "DSControlledLargeTextInput";
|
|
108
|
-
const DSControlledLargeTextInputWithSchema = (0,
|
|
109
|
+
const DSControlledLargeTextInputWithSchema = (0, import_ds_props_helpers.describe)(DSControlledLargeTextInput);
|
|
109
110
|
DSControlledLargeTextInputWithSchema.propTypes = import_react_desc_prop_types.propTypes;
|
|
110
111
|
//# sourceMappingURL=DSControlledLargeTextInput.js.map
|
|
@@ -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
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADoDnB;AAnDJ,mBAAsE;AACtE,
|
|
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';\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.InternalProps>(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,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,WAAW,MAAM,IAAI,UAAU,cAAc,WAAW,IAAI;AAE/F,QAAM,EAAE,cAAc,iBAAiB,QAAI,gDAAuB,UAAU;AAE5E,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,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,kCAAS,0BAA0B;AAChF,qCAAqC,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -29,7 +29,7 @@ __export(react_desc_prop_types_exports, {
|
|
|
29
29
|
});
|
|
30
30
|
module.exports = __toCommonJS(react_desc_prop_types_exports);
|
|
31
31
|
var React = __toESM(require("react"));
|
|
32
|
-
var
|
|
32
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
33
33
|
const noop = () => {
|
|
34
34
|
};
|
|
35
35
|
const defaultProps = {
|
|
@@ -40,19 +40,19 @@ const defaultProps = {
|
|
|
40
40
|
hasError: false
|
|
41
41
|
};
|
|
42
42
|
const propTypes = {
|
|
43
|
-
...
|
|
44
|
-
...
|
|
45
|
-
value:
|
|
46
|
-
onChange:
|
|
47
|
-
resizable:
|
|
48
|
-
rows:
|
|
43
|
+
...import_ds_props_helpers.globalAttributesPropTypes,
|
|
44
|
+
...import_ds_props_helpers.xstyledPropTypes,
|
|
45
|
+
value: import_ds_props_helpers.PropTypes.string.description("Text are value.").defaultValue(""),
|
|
46
|
+
onChange: import_ds_props_helpers.PropTypes.func.description("OnChange cb.").defaultValue("() => {}"),
|
|
47
|
+
resizable: import_ds_props_helpers.PropTypes.bool.description("Enables to resize the component.").defaultValue(false),
|
|
48
|
+
rows: import_ds_props_helpers.PropTypes.string.description(
|
|
49
49
|
"Sets the number of lines for the default height. Once lines are reached, scroll behavior enables."
|
|
50
50
|
),
|
|
51
|
-
id:
|
|
52
|
-
innerRef:
|
|
53
|
-
disabled:
|
|
54
|
-
readOnly:
|
|
55
|
-
maxHeight:
|
|
56
|
-
hasError:
|
|
51
|
+
id: import_ds_props_helpers.PropTypes.string.description("Unique id."),
|
|
52
|
+
innerRef: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.object, import_ds_props_helpers.PropTypes.func]).description("Inner ref to the input."),
|
|
53
|
+
disabled: import_ds_props_helpers.PropTypes.bool.description("Set disabled state."),
|
|
54
|
+
readOnly: import_ds_props_helpers.PropTypes.bool.description("Set readonly state."),
|
|
55
|
+
maxHeight: import_ds_props_helpers.PropTypes.number.description("Set max height to recize input text"),
|
|
56
|
+
hasError: import_ds_props_helpers.PropTypes.bool.description("Set error state.").defaultValue(false)
|
|
57
57
|
};
|
|
58
58
|
//# sourceMappingURL=react-desc-prop-types.js.map
|
|
@@ -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-
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,
|
|
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<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 }\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 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,8BAAuE;AAEvE,MAAM,OAAO,MAAM;AAAC;AA4Bb,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,kCAAU,OAAO,YAAY,iBAAiB,EAAE,aAAa,EAAE;AAAA,EACtE,UAAU,kCAAU,KAAK,YAAY,cAAc,EAAE,aAAa,UAAU;AAAA,EAC5E,WAAW,kCAAU,KAAK,YAAY,kCAAkC,EAAE,aAAa,KAAK;AAAA,EAC5F,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": []
|
|
7
7
|
}
|
|
@@ -3,12 +3,12 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { useCallback, useRef, useState, useLayoutEffect } from "react";
|
|
4
4
|
import {
|
|
5
5
|
describe,
|
|
6
|
-
mergeRefs,
|
|
7
6
|
useValidateTypescriptPropTypes,
|
|
8
7
|
useMemoMergePropsWithDefault,
|
|
9
8
|
useGetGlobalAttributes,
|
|
10
9
|
useGetXstyledProps
|
|
11
|
-
} from "@elliemae/ds-
|
|
10
|
+
} from "@elliemae/ds-props-helpers";
|
|
11
|
+
import { mergeRefs } from "@elliemae/ds-utilities";
|
|
12
12
|
import { propTypes, defaultProps } from "./react-desc-prop-types";
|
|
13
13
|
import { StyledTextArea, StyledContainer, WrapperBorder } from "./styles";
|
|
14
14
|
import { DSControlledLargeTextInputName, DSControlledLargetTextInputDatatestids } from "./exported-related";
|
|
@@ -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
|
|
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,
|
|
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';\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.InternalProps>(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,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,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;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from "@elliemae/ds-
|
|
2
|
+
import { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from "@elliemae/ds-props-helpers";
|
|
3
3
|
const noop = () => {
|
|
4
4
|
};
|
|
5
5
|
const defaultProps = {
|
|
@@ -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-
|
|
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<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 }\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 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
5
|
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,WAAW,2BAA2B,wBAAwB;AAEvE,MAAM,OAAO,MAAM;AAAC;AA4Bb,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
|
}
|
|
@@ -3,5 +3,5 @@ declare const DSControlledLargeTextInput: {
|
|
|
3
3
|
(props: DSControlledLargeTextInputT.Props): JSX.Element;
|
|
4
4
|
displayName: string;
|
|
5
5
|
};
|
|
6
|
-
declare const DSControlledLargeTextInputWithSchema: import("@elliemae/ds-
|
|
6
|
+
declare const DSControlledLargeTextInputWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").DocumentedReactComponent<DSControlledLargeTextInputT.Props>;
|
|
7
7
|
export { DSControlledLargeTextInput, DSControlledLargeTextInputWithSchema };
|