@elliemae/ds-form-input-textarea 3.2.1-rc.3 → 3.2.1-rc.6

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.
@@ -3,34 +3,8 @@ var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
7
6
  var __getProtoOf = Object.getPrototypeOf;
8
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
10
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11
- var __spreadValues = (a, b) => {
12
- for (var prop in b || (b = {}))
13
- if (__hasOwnProp.call(b, prop))
14
- __defNormalProp(a, prop, b[prop]);
15
- if (__getOwnPropSymbols)
16
- for (var prop of __getOwnPropSymbols(b)) {
17
- if (__propIsEnum.call(b, prop))
18
- __defNormalProp(a, prop, b[prop]);
19
- }
20
- return a;
21
- };
22
- var __objRest = (source, exclude) => {
23
- var target = {};
24
- for (var prop in source)
25
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
26
- target[prop] = source[prop];
27
- if (source != null && __getOwnPropSymbols)
28
- for (var prop of __getOwnPropSymbols(source)) {
29
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
30
- target[prop] = source[prop];
31
- }
32
- return target;
33
- };
34
8
  var __export = (target, all) => {
35
9
  for (var name in all)
36
10
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -60,7 +34,7 @@ var import_exported_related = require("./exported-related");
60
34
  const DSControlledLargeTextInput = (props) => {
61
35
  (0, import_ds_utilities.useValidateTypescriptPropTypes)(props, import_react_desc_prop_types.propTypes);
62
36
  const propsWithDefault = (0, import_ds_utilities.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.defaultProps);
63
- const _a = propsWithDefault, {
37
+ const {
64
38
  maxLength,
65
39
  value,
66
40
  onChange,
@@ -69,25 +43,17 @@ const DSControlledLargeTextInput = (props) => {
69
43
  name,
70
44
  id,
71
45
  withoutCharacterCounter,
72
- hasError
73
- } = _a, otherProps = __objRest(_a, [
74
- "maxLength",
75
- "value",
76
- "onChange",
77
- "innerRef",
78
- "resizable",
79
- "name",
80
- "id",
81
- "withoutCharacterCounter",
82
- "hasError"
83
- ]);
84
- const _b = (0, import_ds_utilities.useGetGlobalAttributes)(otherProps), { className } = _b, globalAttributes = __objRest(_b, ["className"]);
46
+ hasError,
47
+ ...otherProps
48
+ } = propsWithDefault;
49
+ const { className, ...globalAttributes } = (0, import_ds_utilities.useGetGlobalAttributes)(otherProps);
85
50
  const xstyledProps = (0, import_ds_utilities.useGetXstyledProps)(otherProps);
86
51
  const handleOnChange = (0, import_react.useCallback)((e) => onChange(e.target.value, e), [onChange]);
87
- return /* @__PURE__ */ import_react.default.createElement(import_styles.StyledContainer, __spreadValues({
52
+ return /* @__PURE__ */ import_react.default.createElement(import_styles.StyledContainer, {
88
53
  className,
89
- "data-testid": import_exported_related.DSControlledLargetTextInputDatatestids.CONTAINER
90
- }, xstyledProps), /* @__PURE__ */ import_react.default.createElement(import_styles.StyledTextArea, __spreadValues({
54
+ "data-testid": import_exported_related.DSControlledLargetTextInputDatatestids.CONTAINER,
55
+ ...xstyledProps
56
+ }, /* @__PURE__ */ import_react.default.createElement(import_styles.StyledTextArea, {
91
57
  ref: innerRef,
92
58
  maxLength,
93
59
  "aria-multiline": true,
@@ -97,8 +63,9 @@ const DSControlledLargeTextInput = (props) => {
97
63
  name,
98
64
  id,
99
65
  "data-testid": import_exported_related.DSControlledLargetTextInputDatatestids.INPUT,
100
- hasError
101
- }, globalAttributes)), maxLength && !withoutCharacterCounter && /* @__PURE__ */ import_react.default.createElement(import_styles.StyledCharCounter, {
66
+ hasError,
67
+ ...globalAttributes
68
+ }), maxLength && !withoutCharacterCounter && /* @__PURE__ */ import_react.default.createElement(import_styles.StyledCharCounter, {
102
69
  "data-testid": import_exported_related.DSControlledLargetTextInputDatatestids.CHAR_COUNTER
103
70
  }, `${value.length}/${maxLength}`));
104
71
  };
@@ -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 } from 'react';\nimport {\n describe,\n useValidateTypescriptPropTypes,\n useMemoMergePropsWithDefault,\n useGetGlobalAttributes,\n useGetXstyledProps,\n} from '@elliemae/ds-utilities';\nimport { propTypes, defaultProps } from './react-desc-prop-types';\nimport { StyledTextArea, StyledContainer, StyledCharCounter } 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 {\n maxLength,\n value,\n onChange,\n innerRef,\n resizable,\n name,\n id,\n withoutCharacterCounter,\n hasError,\n ...otherProps\n } = propsWithDefault;\n\n const { className, ...globalAttributes } = useGetGlobalAttributes(otherProps);\n\n const xstyledProps = useGetXstyledProps(otherProps);\n\n const handleOnChange = useCallback(\n (e: React.KeyboardEvent) => onChange((e.target as HTMLInputElement).value, e),\n [onChange],\n );\n\n return (\n <StyledContainer\n className={className}\n data-testid={DSControlledLargetTextInputDatatestids.CONTAINER}\n {...xstyledProps}\n >\n <StyledTextArea\n ref={innerRef}\n maxLength={maxLength}\n aria-multiline\n value={value}\n onChange={handleOnChange}\n resizable={resizable}\n name={name}\n id={id}\n data-testid={DSControlledLargetTextInputDatatestids.INPUT}\n hasError={hasError}\n {...globalAttributes}\n />\n {maxLength && !withoutCharacterCounter && (\n <StyledCharCounter\n data-testid={DSControlledLargetTextInputDatatestids.CHAR_COUNTER}\n >{`${value.length}/${maxLength}`}</StyledCharCounter>\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;ADAvB,mBAAsD;AACtD,0BAMO;AACP,mCAAwC;AACxC,oBAAmE;AACnE,8BAAuD;AAGvD,MAAM,6BAA6B,CAAC,UAA0D;AAC5F,0DAA+B,OAAO,sCAAS;AAE/C,QAAM,mBAAmB,sDAAgE,OAAO,yCAAY;AAE5G,QAWI,uBAVF;AAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MAEE,IADC,uBACD,IADC;AAAA,IATH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAIF,QAA2C,qDAAuB,UAAU,GAApE,gBAAmC,IAArB,6BAAqB,IAArB,CAAd;AAER,QAAM,eAAe,4CAAmB,UAAU;AAElD,QAAM,iBAAiB,8BACrB,CAAC,MAA2B,SAAU,EAAE,OAA4B,OAAO,CAAC,GAC5E,CAAC,QAAQ,CACX;AAEA,SACE,mDAAC;AAAA,IACC;AAAA,IACA,eAAa,+DAAuC;AAAA,KAChD,eAEJ,mDAAC;AAAA,IACC,KAAK;AAAA,IACL;AAAA,IACA,kBAAc;AAAA,IACd;AAAA,IACA,UAAU;AAAA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AACzC,MAAM,uCAAuC,kCAAS,0BAA0B;AAChF,qCAAqC,YAAY;",
6
6
  "names": []
7
7
  }
@@ -1,27 +1,10 @@
1
1
  "use strict";
2
2
  var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
- var __defProps = Object.defineProperties;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
8
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
6
  var __getProtoOf = Object.getPrototypeOf;
10
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
11
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
12
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13
- var __spreadValues = (a, b) => {
14
- for (var prop in b || (b = {}))
15
- if (__hasOwnProp.call(b, prop))
16
- __defNormalProp(a, prop, b[prop]);
17
- if (__getOwnPropSymbols)
18
- for (var prop of __getOwnPropSymbols(b)) {
19
- if (__propIsEnum.call(b, prop))
20
- __defNormalProp(a, prop, b[prop]);
21
- }
22
- return a;
23
- };
24
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
25
8
  var __export = (target, all) => {
26
9
  for (var name in all)
27
10
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -53,7 +36,9 @@ const defaultProps = {
53
36
  resizable: false,
54
37
  hasError: false
55
38
  };
56
- const propTypes = __spreadProps(__spreadValues(__spreadValues({}, import_ds_utilities.globalAttributesPropTypes), import_ds_utilities.xstyledPropTypes), {
39
+ const propTypes = {
40
+ ...import_ds_utilities.globalAttributesPropTypes,
41
+ ...import_ds_utilities.xstyledPropTypes,
57
42
  value: import_ds_utilities.PropTypes.string.description("Text are value.").defaultValue(""),
58
43
  onChange: import_ds_utilities.PropTypes.func.description("OnChange cb.").defaultValue("() => {}"),
59
44
  resizable: import_ds_utilities.PropTypes.bool.description("Enables to resize the component.").defaultValue(false),
@@ -65,5 +50,5 @@ const propTypes = __spreadProps(__spreadValues(__spreadValues({}, import_ds_util
65
50
  disabled: import_ds_utilities.PropTypes.bool.description("Set disabled state."),
66
51
  readOnly: import_ds_utilities.PropTypes.bool.description("Set readonly state."),
67
52
  hasError: import_ds_utilities.PropTypes.bool.description("Set error state.").defaultValue(false)
68
- });
53
+ };
69
54
  //# sourceMappingURL=react-desc-prop-types.js.map
@@ -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 withoutCharacterCounter: boolean;\n resizable: boolean;\n hasError: boolean;\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 innerRef?: React.MutableRefObject<HTMLTextAreaElement | null>;\n maxLength?: string;\n rows?: string;\n hasError?: boolean;\n }\n\n export interface Props extends DefaultProps, PropsOptional, RequiredProps {}\n}\n\nexport const defaultProps: DSControlledLargeTextInputT.DefaultProps = {\n value: '',\n onChange: noop,\n withoutCharacterCounter: false,\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 withoutCharacterCounter: PropTypes.bool.description('Removes the character counter.').defaultValue(false),\n id: PropTypes.string.description('Unique id.'),\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).description('Inner ref to the input.'),\n maxLength: PropTypes.string.description('Max characters allowed.'),\n disabled: PropTypes.bool.description('Set disabled state.'),\n readOnly: PropTypes.bool.description('Set readonly state.'),\n hasError: PropTypes.bool.description('Set error state.').defaultValue(false),\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAAuE;AAEvE,MAAM,OAAO,MAAM;AAAC;AA4Bb,MAAM,eAAyD;AAAA,EACpE,OAAO;AAAA,EACP,UAAU;AAAA,EACV,yBAAyB;AAAA,EACzB,WAAW;AAAA,EACX,UAAU;AACZ;AAEO,MAAM,YAAY,gDACpB,gDACA,uCAFoB;AAAA,EAGvB,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,YACrB,mGACF;AAAA,EACA,yBAAyB,8BAAU,KAAK,YAAY,gCAAgC,EAAE,aAAa,KAAK;AAAA,EACxG,IAAI,8BAAU,OAAO,YAAY,YAAY;AAAA,EAC7C,UAAU,8BAAU,UAAU,CAAC,8BAAU,QAAQ,8BAAU,IAAI,CAAC,EAAE,YAAY,yBAAyB;AAAA,EACvG,WAAW,8BAAU,OAAO,YAAY,yBAAyB;AAAA,EACjE,UAAU,8BAAU,KAAK,YAAY,qBAAqB;AAAA,EAC1D,UAAU,8BAAU,KAAK,YAAY,qBAAqB;AAAA,EAC1D,UAAU,8BAAU,KAAK,YAAY,kBAAkB,EAAE,aAAa,KAAK;AAC7E;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAAuE;AAEvE,MAAM,OAAO,MAAM;AAAC;AA4Bb,MAAM,eAAyD;AAAA,EACpE,OAAO;AAAA,EACP,UAAU;AAAA,EACV,yBAAyB;AAAA,EACzB,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,YACrB,mGACF;AAAA,EACA,yBAAyB,8BAAU,KAAK,YAAY,gCAAgC,EAAE,aAAa,KAAK;AAAA,EACxG,IAAI,8BAAU,OAAO,YAAY,YAAY;AAAA,EAC7C,UAAU,8BAAU,UAAU,CAAC,8BAAU,QAAQ,8BAAU,IAAI,CAAC,EAAE,YAAY,yBAAyB;AAAA,EACvG,WAAW,8BAAU,OAAO,YAAY,yBAAyB;AAAA,EACjE,UAAU,8BAAU,KAAK,YAAY,qBAAqB;AAAA,EAC1D,UAAU,8BAAU,KAAK,YAAY,qBAAqB;AAAA,EAC1D,UAAU,8BAAU,KAAK,YAAY,kBAAkB,EAAE,aAAa,KAAK;AAC7E;",
6
6
  "names": []
7
7
  }
@@ -1,32 +1,4 @@
1
1
  "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
6
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7
- var __spreadValues = (a, b) => {
8
- for (var prop in b || (b = {}))
9
- if (__hasOwnProp.call(b, prop))
10
- __defNormalProp(a, prop, b[prop]);
11
- if (__getOwnPropSymbols)
12
- for (var prop of __getOwnPropSymbols(b)) {
13
- if (__propIsEnum.call(b, prop))
14
- __defNormalProp(a, prop, b[prop]);
15
- }
16
- return a;
17
- };
18
- var __objRest = (source, exclude) => {
19
- var target = {};
20
- for (var prop in source)
21
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
22
- target[prop] = source[prop];
23
- if (source != null && __getOwnPropSymbols)
24
- for (var prop of __getOwnPropSymbols(source)) {
25
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
26
- target[prop] = source[prop];
27
- }
28
- return target;
29
- };
30
2
  import * as React from "react";
31
3
  import React2, { useCallback } from "react";
32
4
  import {
@@ -42,7 +14,7 @@ import { DSControlledLargetTextInputDatatestids } from "./exported-related";
42
14
  const DSControlledLargeTextInput = (props) => {
43
15
  useValidateTypescriptPropTypes(props, propTypes);
44
16
  const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);
45
- const _a = propsWithDefault, {
17
+ const {
46
18
  maxLength,
47
19
  value,
48
20
  onChange,
@@ -51,25 +23,17 @@ const DSControlledLargeTextInput = (props) => {
51
23
  name,
52
24
  id,
53
25
  withoutCharacterCounter,
54
- hasError
55
- } = _a, otherProps = __objRest(_a, [
56
- "maxLength",
57
- "value",
58
- "onChange",
59
- "innerRef",
60
- "resizable",
61
- "name",
62
- "id",
63
- "withoutCharacterCounter",
64
- "hasError"
65
- ]);
66
- const _b = useGetGlobalAttributes(otherProps), { className } = _b, globalAttributes = __objRest(_b, ["className"]);
26
+ hasError,
27
+ ...otherProps
28
+ } = propsWithDefault;
29
+ const { className, ...globalAttributes } = useGetGlobalAttributes(otherProps);
67
30
  const xstyledProps = useGetXstyledProps(otherProps);
68
31
  const handleOnChange = useCallback((e) => onChange(e.target.value, e), [onChange]);
69
- return /* @__PURE__ */ React2.createElement(StyledContainer, __spreadValues({
32
+ return /* @__PURE__ */ React2.createElement(StyledContainer, {
70
33
  className,
71
- "data-testid": DSControlledLargetTextInputDatatestids.CONTAINER
72
- }, xstyledProps), /* @__PURE__ */ React2.createElement(StyledTextArea, __spreadValues({
34
+ "data-testid": DSControlledLargetTextInputDatatestids.CONTAINER,
35
+ ...xstyledProps
36
+ }, /* @__PURE__ */ React2.createElement(StyledTextArea, {
73
37
  ref: innerRef,
74
38
  maxLength,
75
39
  "aria-multiline": true,
@@ -79,8 +43,9 @@ const DSControlledLargeTextInput = (props) => {
79
43
  name,
80
44
  id,
81
45
  "data-testid": DSControlledLargetTextInputDatatestids.INPUT,
82
- hasError
83
- }, globalAttributes)), maxLength && !withoutCharacterCounter && /* @__PURE__ */ React2.createElement(StyledCharCounter, {
46
+ hasError,
47
+ ...globalAttributes
48
+ }), maxLength && !withoutCharacterCounter && /* @__PURE__ */ React2.createElement(StyledCharCounter, {
84
49
  "data-testid": DSControlledLargetTextInputDatatestids.CHAR_COUNTER
85
50
  }, `${value.length}/${maxLength}`));
86
51
  };
@@ -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 } from 'react';\nimport {\n describe,\n useValidateTypescriptPropTypes,\n useMemoMergePropsWithDefault,\n useGetGlobalAttributes,\n useGetXstyledProps,\n} from '@elliemae/ds-utilities';\nimport { propTypes, defaultProps } from './react-desc-prop-types';\nimport { StyledTextArea, StyledContainer, StyledCharCounter } 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 {\n maxLength,\n value,\n onChange,\n innerRef,\n resizable,\n name,\n id,\n withoutCharacterCounter,\n hasError,\n ...otherProps\n } = propsWithDefault;\n\n const { className, ...globalAttributes } = useGetGlobalAttributes(otherProps);\n\n const xstyledProps = useGetXstyledProps(otherProps);\n\n const handleOnChange = useCallback(\n (e: React.KeyboardEvent) => onChange((e.target as HTMLInputElement).value, e),\n [onChange],\n );\n\n return (\n <StyledContainer\n className={className}\n data-testid={DSControlledLargetTextInputDatatestids.CONTAINER}\n {...xstyledProps}\n >\n <StyledTextArea\n ref={innerRef}\n maxLength={maxLength}\n aria-multiline\n value={value}\n onChange={handleOnChange}\n resizable={resizable}\n name={name}\n id={id}\n data-testid={DSControlledLargetTextInputDatatestids.INPUT}\n hasError={hasError}\n {...globalAttributes}\n />\n {maxLength && !withoutCharacterCounter && (\n <StyledCharCounter\n data-testid={DSControlledLargetTextInputDatatestids.CHAR_COUNTER}\n >{`${value.length}/${maxLength}`}</StyledCharCounter>\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;ACAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA;AACA;AACA;AAGA,MAAM,6BAA6B,CAAC,UAA0D;AAC5F,iCAA+B,OAAO,SAAS;AAE/C,QAAM,mBAAmB,6BAAgE,OAAO,YAAY;AAE5G,QAWI,uBAVF;AAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MAEE,IADC,uBACD,IADC;AAAA,IATH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;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IACL;AAAA,IACA,kBAAc;AAAA,IACd;AAAA,IACA,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA,eAAa,uCAAuC;AAAA,IACpD;AAAA,IACC,GAAG;AAAA,GACN,GACC,aAAa,CAAC,2BACb,qCAAC;AAAA,IACC,eAAa,uCAAuC;AAAA,KACpD,GAAG,MAAM,UAAU,WAAY,CAErC;AAEJ;AAEA,2BAA2B,cAAc;AACzC,MAAM,uCAAuC,SAAS,0BAA0B;AAChF,qCAAqC,YAAY;",
6
6
  "names": []
7
7
  }
@@ -1,23 +1,4 @@
1
1
  "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __defProps = Object.defineProperties;
4
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
5
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
8
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9
- var __spreadValues = (a, b) => {
10
- for (var prop in b || (b = {}))
11
- if (__hasOwnProp.call(b, prop))
12
- __defNormalProp(a, prop, b[prop]);
13
- if (__getOwnPropSymbols)
14
- for (var prop of __getOwnPropSymbols(b)) {
15
- if (__propIsEnum.call(b, prop))
16
- __defNormalProp(a, prop, b[prop]);
17
- }
18
- return a;
19
- };
20
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
21
2
  import * as React from "react";
22
3
  import { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from "@elliemae/ds-utilities";
23
4
  const noop = () => {
@@ -29,7 +10,9 @@ const defaultProps = {
29
10
  resizable: false,
30
11
  hasError: false
31
12
  };
32
- const propTypes = __spreadProps(__spreadValues(__spreadValues({}, globalAttributesPropTypes), xstyledPropTypes), {
13
+ const propTypes = {
14
+ ...globalAttributesPropTypes,
15
+ ...xstyledPropTypes,
33
16
  value: PropTypes.string.description("Text are value.").defaultValue(""),
34
17
  onChange: PropTypes.func.description("OnChange cb.").defaultValue("() => {}"),
35
18
  resizable: PropTypes.bool.description("Enables to resize the component.").defaultValue(false),
@@ -41,7 +24,7 @@ const propTypes = __spreadProps(__spreadValues(__spreadValues({}, globalAttribut
41
24
  disabled: PropTypes.bool.description("Set disabled state."),
42
25
  readOnly: PropTypes.bool.description("Set readonly state."),
43
26
  hasError: PropTypes.bool.description("Set error state.").defaultValue(false)
44
- });
27
+ };
45
28
  export {
46
29
  defaultProps,
47
30
  propTypes
@@ -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 withoutCharacterCounter: boolean;\n resizable: boolean;\n hasError: boolean;\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 innerRef?: React.MutableRefObject<HTMLTextAreaElement | null>;\n maxLength?: string;\n rows?: string;\n hasError?: boolean;\n }\n\n export interface Props extends DefaultProps, PropsOptional, RequiredProps {}\n}\n\nexport const defaultProps: DSControlledLargeTextInputT.DefaultProps = {\n value: '',\n onChange: noop,\n withoutCharacterCounter: false,\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 withoutCharacterCounter: PropTypes.bool.description('Removes the character counter.').defaultValue(false),\n id: PropTypes.string.description('Unique id.'),\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).description('Inner ref to the input.'),\n maxLength: PropTypes.string.description('Max characters allowed.'),\n disabled: PropTypes.bool.description('Set disabled state.'),\n readOnly: PropTypes.bool.description('Set readonly state.'),\n hasError: PropTypes.bool.description('Set error state.').defaultValue(false),\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;ACAA;AAEA,MAAM,OAAO,MAAM;AAAC;AA4Bb,MAAM,eAAyD;AAAA,EACpE,OAAO;AAAA,EACP,UAAU;AAAA,EACV,yBAAyB;AAAA,EACzB,WAAW;AAAA,EACX,UAAU;AACZ;AAEO,MAAM,YAAY,gDACpB,4BACA,mBAFoB;AAAA,EAGvB,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,YACrB,mGACF;AAAA,EACA,yBAAyB,UAAU,KAAK,YAAY,gCAAgC,EAAE,aAAa,KAAK;AAAA,EACxG,IAAI,UAAU,OAAO,YAAY,YAAY;AAAA,EAC7C,UAAU,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,IAAI,CAAC,EAAE,YAAY,yBAAyB;AAAA,EACvG,WAAW,UAAU,OAAO,YAAY,yBAAyB;AAAA,EACjE,UAAU,UAAU,KAAK,YAAY,qBAAqB;AAAA,EAC1D,UAAU,UAAU,KAAK,YAAY,qBAAqB;AAAA,EAC1D,UAAU,UAAU,KAAK,YAAY,kBAAkB,EAAE,aAAa,KAAK;AAC7E;",
5
+ "mappings": ";AAAA;ACAA;AAEA,MAAM,OAAO,MAAM;AAAC;AA4Bb,MAAM,eAAyD;AAAA,EACpE,OAAO;AAAA,EACP,UAAU;AAAA,EACV,yBAAyB;AAAA,EACzB,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,YACrB,mGACF;AAAA,EACA,yBAAyB,UAAU,KAAK,YAAY,gCAAgC,EAAE,aAAa,KAAK;AAAA,EACxG,IAAI,UAAU,OAAO,YAAY,YAAY;AAAA,EAC7C,UAAU,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,IAAI,CAAC,EAAE,YAAY,yBAAyB;AAAA,EACvG,WAAW,UAAU,OAAO,YAAY,yBAAyB;AAAA,EACjE,UAAU,UAAU,KAAK,YAAY,qBAAqB;AAAA,EAC1D,UAAU,UAAU,KAAK,YAAY,qBAAqB;AAAA,EAC1D,UAAU,UAAU,KAAK,YAAY,kBAAkB,EAAE,aAAa,KAAK;AAC7E;",
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.2.1-rc.3",
3
+ "version": "3.2.1-rc.6",
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.2.1-rc.3",
39
- "@elliemae/ds-utilities": "3.2.1-rc.3",
38
+ "@elliemae/ds-system": "3.2.1-rc.6",
39
+ "@elliemae/ds-utilities": "3.2.1-rc.6",
40
40
  "@xstyled/styled-components": "~3.6.0"
41
41
  },
42
42
  "devDependencies": {