@elliemae/ds-form-input-textarea 3.4.3-rc.1 → 3.4.4-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.
- package/dist/cjs/DSControlledLargeTextInput.js +36 -25
- package/dist/cjs/DSControlledLargeTextInput.js.map +1 -1
- package/dist/cjs/exported-related/data-test-ids.js +4 -1
- package/dist/cjs/exported-related/data-test-ids.js.map +1 -1
- package/dist/cjs/exported-related/index.js +4 -1
- package/dist/cjs/exported-related/index.js.map +1 -1
- package/dist/cjs/exported-related/theming.js +4 -1
- package/dist/cjs/exported-related/theming.js.map +1 -1
- package/dist/cjs/index.js +4 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/react-desc-prop-types.js +7 -2
- package/dist/cjs/react-desc-prop-types.js.map +1 -1
- package/dist/cjs/styles.js +4 -1
- package/dist/cjs/styles.js.map +1 -1
- package/dist/esm/DSControlledLargeTextInput.js +32 -24
- package/dist/esm/DSControlledLargeTextInput.js.map +1 -1
- package/dist/esm/exported-related/data-test-ids.js.map +1 -1
- package/dist/esm/exported-related/index.js.map +1 -1
- package/dist/esm/exported-related/theming.js.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/react-desc-prop-types.js +3 -1
- package/dist/esm/react-desc-prop-types.js.map +1 -1
- package/dist/esm/styles.js.map +1 -1
- package/package.json +3 -3
|
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
21
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
25
|
var DSControlledLargeTextInput_exports = {};
|
|
23
26
|
__export(DSControlledLargeTextInput_exports, {
|
|
@@ -26,7 +29,8 @@ __export(DSControlledLargeTextInput_exports, {
|
|
|
26
29
|
});
|
|
27
30
|
module.exports = __toCommonJS(DSControlledLargeTextInput_exports);
|
|
28
31
|
var React = __toESM(require("react"));
|
|
29
|
-
var
|
|
32
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
33
|
+
var import_react = require("react");
|
|
30
34
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
31
35
|
var import_react_desc_prop_types = require("./react-desc-prop-types");
|
|
32
36
|
var import_styles = require("./styles");
|
|
@@ -40,7 +44,10 @@ const DSControlledLargeTextInput = (props) => {
|
|
|
40
44
|
const [calculatedMinHeight, setCalculatedMinHeight] = (0, import_react.useState)(void 0);
|
|
41
45
|
const textareaRef = (0, import_react.useRef)(null);
|
|
42
46
|
const ghostRef = (0, import_react.useRef)(null);
|
|
43
|
-
const handleOnChange = (0, import_react.useCallback)(
|
|
47
|
+
const handleOnChange = (0, import_react.useCallback)(
|
|
48
|
+
(e) => onChange(e.target.value, e),
|
|
49
|
+
[onChange]
|
|
50
|
+
);
|
|
44
51
|
(0, import_react.useLayoutEffect)(() => {
|
|
45
52
|
if (ghostRef && ghostRef.current && value !== "") {
|
|
46
53
|
ghostRef.current.style.maxHeight = "0px";
|
|
@@ -52,30 +59,34 @@ const DSControlledLargeTextInput = (props) => {
|
|
|
52
59
|
ghostRef.current.style.maxHeight = `${maxHeight}px`;
|
|
53
60
|
}
|
|
54
61
|
}, [maxHeight, value]);
|
|
55
|
-
return /* @__PURE__ */
|
|
62
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styles.StyledContainer, {
|
|
56
63
|
className,
|
|
57
64
|
"data-testid": import_exported_related.DSControlledLargetTextInputDatatestids.CONTAINER,
|
|
58
|
-
...xstyledProps
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
65
|
+
...xstyledProps,
|
|
66
|
+
children: [
|
|
67
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.StyledTextArea, {
|
|
68
|
+
ref: (0, import_ds_utilities.mergeRefs)(innerRef, textareaRef),
|
|
69
|
+
"aria-multiline": true,
|
|
70
|
+
value,
|
|
71
|
+
$maxHeight: maxHeight,
|
|
72
|
+
$minHeight: calculatedMinHeight,
|
|
73
|
+
onChange: handleOnChange,
|
|
74
|
+
resizable,
|
|
75
|
+
name,
|
|
76
|
+
id,
|
|
77
|
+
"data-testid": import_exported_related.DSControlledLargetTextInputDatatestids.INPUT,
|
|
78
|
+
$hasError: hasError,
|
|
79
|
+
...globalAttributes
|
|
80
|
+
}),
|
|
81
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.StyledTextArea, {
|
|
82
|
+
disabled: true,
|
|
83
|
+
ref: ghostRef,
|
|
84
|
+
value,
|
|
85
|
+
style: { visibility: "hidden", pointerEvents: "none", position: "absolute" },
|
|
86
|
+
$maxHeight: maxHeight
|
|
87
|
+
})
|
|
88
|
+
]
|
|
89
|
+
});
|
|
79
90
|
};
|
|
80
91
|
DSControlledLargeTextInput.displayName = "DSControlledLargeTextInput";
|
|
81
92
|
const DSControlledLargeTextInputWithSchema = (0, import_ds_utilities.describe)(DSControlledLargeTextInput);
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSControlledLargeTextInput.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React, { useCallback, WeakValidationMap, 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 } from './styles';\nimport { DSControlledLargetTextInputDatatestids } from './exported-related';\nimport type { DSControlledLargeTextInputT } from './react-desc-prop-types';\n\nconst DSControlledLargeTextInput = (props: DSControlledLargeTextInputT.Props): JSX.Element => {\n useValidateTypescriptPropTypes(props, propTypes);\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 <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 $hasError={hasError}\n {...globalAttributes}\n />\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": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AAAA,mBAAyF;AACzF,0BAOO;AACP,mCAAwC;AACxC,oBAAgD;AAChD,8BAAuD;AAGvD,MAAM,6BAA6B,CAAC,UAA0D;AAC5F,0DAA+B,OAAO,sCAAS;AAE/C,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,6CAAC;AAAA,IACC;AAAA,IACA,eAAa,+DAAuC;AAAA,IACnD,GAAG;AAAA,IAEJ;AAAA,kDAAC;AAAA,QACC,SAAK,+BAAU,UAAU,WAAW;AAAA,QACpC,kBAAc;AAAA,QACd;AAAA,QACA,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,UAAU;AAAA,QACV;AAAA,QACA;AAAA,QACA;AAAA,QACA,eAAa,+DAAuC;AAAA,QACpD,WAAW;AAAA,QACV,GAAG;AAAA,OACN;AAAA,MACA,4CAAC;AAAA,QACC,UAAQ;AAAA,QACR,KAAK;AAAA,QACL;AAAA,QACA,OAAO,EAAE,YAAY,UAAU,eAAe,QAAQ,UAAU,WAAW;AAAA,QAC3E,YAAY;AAAA,OACd;AAAA;AAAA,GACF;AAEJ;AAEA,2BAA2B,cAAc;AACzC,MAAM,2CAAuC,8BAAS,0BAA0B;AAChF,qCAAqC,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
21
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
25
|
var data_test_ids_exports = {};
|
|
23
26
|
__export(data_test_ids_exports, {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
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};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
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
|
}
|
|
@@ -14,7 +14,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
14
14
|
return to;
|
|
15
15
|
};
|
|
16
16
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
17
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
18
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
19
|
+
mod
|
|
20
|
+
));
|
|
18
21
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
22
|
var exported_related_exports = {};
|
|
20
23
|
module.exports = __toCommonJS(exported_related_exports);
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/exported-related/index.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export * from './data-test-ids';\nexport * from './theming';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,qCAAc,4BAAd;AACA,qCAAc,sBADd;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
21
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
25
|
var theming_exports = {};
|
|
23
26
|
__export(theming_exports, {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/exported-related/theming.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export const DSControlledLargeTextInputName = 'DS-ControlledLargeTextInput';\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
|
-
"mappings": "
|
|
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
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -14,7 +14,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
14
14
|
return to;
|
|
15
15
|
};
|
|
16
16
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
17
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
18
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
19
|
+
mod
|
|
20
|
+
));
|
|
18
21
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
22
|
var src_exports = {};
|
|
20
23
|
module.exports = __toCommonJS(src_exports);
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export * from './DSControlledLargeTextInput';\nexport * from './exported-related';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,yCAAd;AACA,wBAAc,+BADd;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
21
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
25
|
var react_desc_prop_types_exports = {};
|
|
23
26
|
__export(react_desc_prop_types_exports, {
|
|
@@ -42,7 +45,9 @@ const propTypes = {
|
|
|
42
45
|
value: import_ds_utilities.PropTypes.string.description("Text are value.").defaultValue(""),
|
|
43
46
|
onChange: import_ds_utilities.PropTypes.func.description("OnChange cb.").defaultValue("() => {}"),
|
|
44
47
|
resizable: import_ds_utilities.PropTypes.bool.description("Enables to resize the component.").defaultValue(false),
|
|
45
|
-
rows: import_ds_utilities.PropTypes.string.description(
|
|
48
|
+
rows: import_ds_utilities.PropTypes.string.description(
|
|
49
|
+
"Sets the number of lines for the default height. Once lines are reached, scroll behavior enables."
|
|
50
|
+
),
|
|
46
51
|
id: import_ds_utilities.PropTypes.string.description("Unique id."),
|
|
47
52
|
innerRef: import_ds_utilities.PropTypes.oneOfType([import_ds_utilities.PropTypes.object, import_ds_utilities.PropTypes.func]).description("Inner ref to the input."),
|
|
48
53
|
disabled: import_ds_utilities.PropTypes.bool.description("Set disabled state."),
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/react-desc-prop-types.ts", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
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": "
|
|
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
|
}
|
package/dist/cjs/styles.js
CHANGED
|
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
21
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
25
|
var styles_exports = {};
|
|
23
26
|
__export(styles_exports, {
|
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, layout, space, sizing } 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 ${layout}\n ${space}\n ${sizing}\n`;\n\nexport const StyledTextArea = styled('textarea', {\n name: DSControlledLargeTextInputName,\n slot: DSControlledLargeTextInputSlots.INPUT,\n})<StyledTextAreaT>`\n &:hover { \n border: 1px solid ${({theme}) => theme.colors.brand[700]};\n }\n width: 100%;\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 ${({ $hasError }) => ($hasError ? `border: 1px solid red;` : ``)}\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAA8C;AAC9C,8BAAgF;AAOzE,MAAM,sBAAkB,yBAAO,OAAO;AAAA,EAC3C,MAAM;AAAA,EACN,MAAM,wDAAgC;AACxC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,IAKG;AAAA,IACA;AAAA,IACA;AAAA;AAGG,MAAM,qBAAiB,yBAAO,YAAY;AAAA,EAC/C,MAAM;AAAA,EACN,MAAM,wDAAgC;AACxC,CAAC;AAAA;AAAA,wBAEuB,CAAC,EAAC,MAAK,MAAM,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA,IAGpD,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,IACnD,CAAC,EAAE,UAAU,MAAO,YAAY,2BAA2B;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useCallback, useRef, useState, useLayoutEffect } from "react";
|
|
3
4
|
import {
|
|
4
5
|
describe,
|
|
5
6
|
mergeRefs,
|
|
@@ -20,7 +21,10 @@ const DSControlledLargeTextInput = (props) => {
|
|
|
20
21
|
const [calculatedMinHeight, setCalculatedMinHeight] = useState(void 0);
|
|
21
22
|
const textareaRef = useRef(null);
|
|
22
23
|
const ghostRef = useRef(null);
|
|
23
|
-
const handleOnChange = useCallback(
|
|
24
|
+
const handleOnChange = useCallback(
|
|
25
|
+
(e) => onChange(e.target.value, e),
|
|
26
|
+
[onChange]
|
|
27
|
+
);
|
|
24
28
|
useLayoutEffect(() => {
|
|
25
29
|
if (ghostRef && ghostRef.current && value !== "") {
|
|
26
30
|
ghostRef.current.style.maxHeight = "0px";
|
|
@@ -32,30 +36,34 @@ const DSControlledLargeTextInput = (props) => {
|
|
|
32
36
|
ghostRef.current.style.maxHeight = `${maxHeight}px`;
|
|
33
37
|
}
|
|
34
38
|
}, [maxHeight, value]);
|
|
35
|
-
return /* @__PURE__ */
|
|
39
|
+
return /* @__PURE__ */ jsxs(StyledContainer, {
|
|
36
40
|
className,
|
|
37
41
|
"data-testid": DSControlledLargetTextInputDatatestids.CONTAINER,
|
|
38
|
-
...xstyledProps
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
42
|
+
...xstyledProps,
|
|
43
|
+
children: [
|
|
44
|
+
/* @__PURE__ */ jsx(StyledTextArea, {
|
|
45
|
+
ref: mergeRefs(innerRef, textareaRef),
|
|
46
|
+
"aria-multiline": true,
|
|
47
|
+
value,
|
|
48
|
+
$maxHeight: maxHeight,
|
|
49
|
+
$minHeight: calculatedMinHeight,
|
|
50
|
+
onChange: handleOnChange,
|
|
51
|
+
resizable,
|
|
52
|
+
name,
|
|
53
|
+
id,
|
|
54
|
+
"data-testid": DSControlledLargetTextInputDatatestids.INPUT,
|
|
55
|
+
$hasError: hasError,
|
|
56
|
+
...globalAttributes
|
|
57
|
+
}),
|
|
58
|
+
/* @__PURE__ */ jsx(StyledTextArea, {
|
|
59
|
+
disabled: true,
|
|
60
|
+
ref: ghostRef,
|
|
61
|
+
value,
|
|
62
|
+
style: { visibility: "hidden", pointerEvents: "none", position: "absolute" },
|
|
63
|
+
$maxHeight: maxHeight
|
|
64
|
+
})
|
|
65
|
+
]
|
|
66
|
+
});
|
|
59
67
|
};
|
|
60
68
|
DSControlledLargeTextInput.displayName = "DSControlledLargeTextInput";
|
|
61
69
|
const DSControlledLargeTextInputWithSchema = describe(DSControlledLargeTextInput);
|
|
@@ -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 React, { useCallback, WeakValidationMap, 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 } from './styles';\nimport { DSControlledLargetTextInputDatatestids } from './exported-related';\nimport type { DSControlledLargeTextInputT } from './react-desc-prop-types';\n\nconst DSControlledLargeTextInput = (props: DSControlledLargeTextInputT.Props): JSX.Element => {\n useValidateTypescriptPropTypes(props, propTypes);\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 <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 $hasError={hasError}\n {...globalAttributes}\n />\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;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,SAAgB,aAAgC,QAAQ,UAAU,uBAAuB;AACzF;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,WAAW,oBAAoB;AACxC,SAAS,gBAAgB,uBAAuB;AAChD,SAAS,8CAA8C;AAGvD,MAAM,6BAA6B,CAAC,UAA0D;AAC5F,iCAA+B,OAAO,SAAS;AAE/C,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,qBAAC;AAAA,IACC;AAAA,IACA,eAAa,uCAAuC;AAAA,IACnD,GAAG;AAAA,IAEJ;AAAA,0BAAC;AAAA,QACC,KAAK,UAAU,UAAU,WAAW;AAAA,QACpC,kBAAc;AAAA,QACd;AAAA,QACA,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,UAAU;AAAA,QACV;AAAA,QACA;AAAA,QACA;AAAA,QACA,eAAa,uCAAuC;AAAA,QACpD,WAAW;AAAA,QACV,GAAG;AAAA,OACN;AAAA,MACA,oBAAC;AAAA,QACC,UAAQ;AAAA,QACR,KAAK;AAAA,QACL;AAAA,QACA,OAAO,EAAE,YAAY,UAAU,eAAe,QAAQ,UAAU,WAAW;AAAA,QAC3E,YAAY;AAAA,OACd;AAAA;AAAA,GACF;AAEJ;AAEA,2BAA2B,cAAc;AACzC,MAAM,uCAAuC,SAAS,0BAA0B;AAChF,qCAAqC,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
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};\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAhB,MAAM,yCAAyC;AAAA,EACpD,WAAW;AAAA,EACX,cAAc;AAAA,EACd,OAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
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';\nexport * from './theming';\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;AACd,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
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 = 'DS-ControlledLargeTextInput';\n\nexport const DSControlledLargeTextInputSlots = {\n CONTAINER: 'root',\n INPUT: 'input',\n CHAR_COUNTER: 'char-counter',\n};\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
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
|
}
|
package/dist/esm/index.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/index.ts"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './DSControlledLargeTextInput';\nexport * from './exported-related';\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;AACd,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -15,7 +15,9 @@ const propTypes = {
|
|
|
15
15
|
value: PropTypes.string.description("Text are value.").defaultValue(""),
|
|
16
16
|
onChange: PropTypes.func.description("OnChange cb.").defaultValue("() => {}"),
|
|
17
17
|
resizable: PropTypes.bool.description("Enables to resize the component.").defaultValue(false),
|
|
18
|
-
rows: PropTypes.string.description(
|
|
18
|
+
rows: PropTypes.string.description(
|
|
19
|
+
"Sets the number of lines for the default height. Once lines are reached, scroll behavior enables."
|
|
20
|
+
),
|
|
19
21
|
id: PropTypes.string.description("Unique id."),
|
|
20
22
|
innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).description("Inner ref to the input."),
|
|
21
23
|
disabled: PropTypes.bool.description("Set disabled state."),
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
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 { 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;
|
|
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
|
}
|
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, layout, space, sizing } 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 ${layout}\n ${space}\n ${sizing}\n`;\n\nexport const StyledTextArea = styled('textarea', {\n name: DSControlledLargeTextInputName,\n slot: DSControlledLargeTextInputSlots.INPUT,\n})<StyledTextAreaT>`\n &:hover { \n border: 1px solid ${({theme}) => theme.colors.brand[700]};\n }\n width: 100%;\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 ${({ $hasError }) => ($hasError ? `border: 1px solid red;` : ``)}\n`;\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,QAAQ,QAAQ,OAAO,cAAc;AAC9C,SAAS,gCAAgC,uCAAuC;AAOzE,MAAM,kBAAkB,OAAO,OAAO;AAAA,EAC3C,MAAM;AAAA,EACN,MAAM,gCAAgC;AACxC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,IAKG;AAAA,IACA;AAAA,IACA;AAAA;AAGG,MAAM,iBAAiB,OAAO,YAAY;AAAA,EAC/C,MAAM;AAAA,EACN,MAAM,gCAAgC;AACxC,CAAC;AAAA;AAAA,wBAEuB,CAAC,EAAC,MAAK,MAAM,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA,IAGpD,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,IACnD,CAAC,EAAE,UAAU,MAAO,YAAY,2BAA2B;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.4.
|
|
3
|
+
"version": "3.4.4-rc.0",
|
|
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.4.
|
|
39
|
-
"@elliemae/ds-utilities": "3.4.
|
|
38
|
+
"@elliemae/ds-system": "3.4.4-rc.0",
|
|
39
|
+
"@elliemae/ds-utilities": "3.4.4-rc.0",
|
|
40
40
|
"@xstyled/styled-components": "~3.6.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|