@zohodesk/components 1.0.0-temp-207.2 → 1.0.0-temp-208.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.
Files changed (94) hide show
  1. package/.cli/propValidation_report.html +1 -1
  2. package/README.md +11 -0
  3. package/es/AppContainer/AppContainer.js +11 -7
  4. package/es/AppContainer/props/defaultProps.js +2 -1
  5. package/es/AppContainer/props/propTypes.js +2 -1
  6. package/es/Avatar/Avatar.module.css +175 -175
  7. package/es/AvatarTeam/AvatarTeam.module.css +189 -189
  8. package/es/Button/css/Button.module.css +527 -527
  9. package/es/Buttongroup/Buttongroup.module.css +104 -104
  10. package/es/CheckBox/CheckBox.module.css +157 -157
  11. package/es/DateTime/DateTime.module.css +248 -248
  12. package/es/DropBox/DropBoxElement/css/DropBoxElement.module.css +431 -431
  13. package/es/DropBox/css/DropBox.module.css +58 -58
  14. package/es/DropDown/DropDownHeading.module.css +53 -53
  15. package/es/DropDown/DropDownItem.module.css +94 -94
  16. package/es/Label/Label.module.css +57 -57
  17. package/es/ListItem/ListItem.module.css +205 -205
  18. package/es/PopOver/PopOver.module.css +8 -8
  19. package/es/Radio/Radio.module.css +115 -115
  20. package/es/Ribbon/Ribbon.module.css +499 -499
  21. package/es/Switch/Switch.module.css +127 -127
  22. package/es/Tab/Tabs.js +12 -2
  23. package/es/Tab/Tabs.module.css +2 -2
  24. package/es/Tab/props/defaultProps.js +4 -1
  25. package/es/Tab/props/propTypes.js +5 -1
  26. package/es/Tag/Tag.module.css +253 -253
  27. package/es/TextBox/TextBox.module.css +196 -196
  28. package/es/TextBoxIcon/TextBoxIcon.module.css +79 -79
  29. package/es/Textarea/Textarea.js +24 -152
  30. package/es/Textarea/Textarea.module.css +140 -191
  31. package/es/Textarea/props/defaultProps.js +1 -2
  32. package/es/Textarea/props/propTypes.js +1 -5
  33. package/es/common/customscroll.module.css +141 -141
  34. package/es/v1/DropDown/DropDownSearch.js +1 -1
  35. package/es/v1/MultiSelect/AdvancedGroupMultiSelect.js +4 -0
  36. package/es/v1/Tab/Tabs.js +12 -2
  37. package/es/v1/Tab/props/defaultProps.js +4 -1
  38. package/es/v1/Tab/props/propTypes.js +5 -1
  39. package/es/v1/Tab/v1Tabs.module.css +2 -2
  40. package/lib/AppContainer/AppContainer.js +38 -23
  41. package/lib/AppContainer/props/defaultProps.js +2 -1
  42. package/lib/AppContainer/props/propTypes.js +2 -1
  43. package/lib/Avatar/Avatar.module.css +175 -175
  44. package/lib/AvatarTeam/AvatarTeam.module.css +189 -189
  45. package/lib/Button/css/Button.module.css +527 -527
  46. package/lib/Buttongroup/Buttongroup.module.css +104 -104
  47. package/lib/CheckBox/CheckBox.module.css +157 -157
  48. package/lib/DateTime/DateTime.module.css +248 -248
  49. package/lib/DropBox/DropBoxElement/css/DropBoxElement.module.css +431 -431
  50. package/lib/DropBox/css/DropBox.module.css +58 -58
  51. package/lib/DropDown/DropDownHeading.module.css +53 -53
  52. package/lib/DropDown/DropDownItem.module.css +94 -94
  53. package/lib/Label/Label.module.css +57 -57
  54. package/lib/ListItem/ListItem.module.css +205 -205
  55. package/lib/PopOver/PopOver.module.css +8 -8
  56. package/lib/Radio/Radio.module.css +115 -115
  57. package/lib/Ribbon/Ribbon.module.css +499 -499
  58. package/lib/Switch/Switch.module.css +127 -127
  59. package/lib/Tab/Tabs.js +14 -4
  60. package/lib/Tab/Tabs.module.css +2 -2
  61. package/lib/Tab/props/defaultProps.js +4 -1
  62. package/lib/Tab/props/propTypes.js +5 -1
  63. package/lib/Tag/Tag.module.css +253 -253
  64. package/lib/TextBox/TextBox.module.css +196 -196
  65. package/lib/TextBoxIcon/TextBoxIcon.module.css +79 -79
  66. package/lib/Textarea/Textarea.js +43 -189
  67. package/lib/Textarea/Textarea.module.css +140 -191
  68. package/lib/Textarea/props/defaultProps.js +1 -2
  69. package/lib/Textarea/props/propTypes.js +1 -5
  70. package/lib/common/customscroll.module.css +141 -141
  71. package/lib/v1/DropDown/DropDownSearch.js +1 -1
  72. package/lib/v1/MultiSelect/AdvancedGroupMultiSelect.js +4 -0
  73. package/lib/v1/Tab/Tabs.js +14 -4
  74. package/lib/v1/Tab/props/defaultProps.js +4 -1
  75. package/lib/v1/Tab/props/propTypes.js +5 -1
  76. package/lib/v1/Tab/v1Tabs.module.css +2 -2
  77. package/package.json +4 -4
  78. package/result.json +1 -1
  79. package/es/Textarea/TextareaOne.js +0 -349
  80. package/es/Textarea/utils/calculateNodeHeight.js +0 -58
  81. package/es/Textarea/utils/calculateNodeHeightOne.js +0 -66
  82. package/es/Textarea/utils/debounce.js +0 -24
  83. package/es/Textarea/utils/getSizingData.js +0 -27
  84. package/es/Textarea/utils/ownerDocument.js +0 -5
  85. package/es/Textarea/utils/ownerWindow.js +0 -8
  86. package/es/Textarea/utils/updateState.js +0 -30
  87. package/lib/Textarea/TextareaOne.js +0 -422
  88. package/lib/Textarea/utils/calculateNodeHeight.js +0 -69
  89. package/lib/Textarea/utils/calculateNodeHeightOne.js +0 -74
  90. package/lib/Textarea/utils/debounce.js +0 -33
  91. package/lib/Textarea/utils/getSizingData.js +0 -37
  92. package/lib/Textarea/utils/ownerDocument.js +0 -13
  93. package/lib/Textarea/utils/ownerWindow.js +0 -18
  94. package/lib/Textarea/utils/updateState.js +0 -36
@@ -1,33 +1,23 @@
1
- import React from "react";
2
- import ReactDOM from "react-dom";
1
+ import React from 'react';
3
2
  import { defaultProps } from "./props/defaultProps";
4
3
  import { propTypes } from "./props/propTypes";
5
- import debounce from "./utils/debounce";
6
- import calculateNodeHeight from "./utils/calculateNodeHeight";
7
- import ownerWindow from "./utils/ownerWindow";
8
- import updateState from "./utils/updateState";
9
4
  /* eslint css-modules/no-unused-class: [2, { markAsUsed: ['resizeX', 'resizeY', 'noresize', 'resizeboth', 'xsmall', 'small', 'medium', 'large', 'xlarge', 'default', 'primary'] }] */
10
5
 
11
6
  import style from "./Textarea.module.css";
12
7
  export default class Textarea extends React.Component {
13
8
  constructor(props) {
14
9
  super(props);
15
- this.hiddenTextareaRef = /*#__PURE__*/React.createRef();
16
- this.rendersRef = /*#__PURE__*/React.createRef();
17
- this.sizingData = /*#__PURE__*/React.createRef(null);
18
- this.rAF = null;
19
- this.resizeObserver = null;
20
- this.debounceHandleResize = null;
21
- this.onBlur = this.onBlur.bind(this);
22
- this.onKeyDown = this.onKeyDown.bind(this);
23
- this.inputRef = this.inputRef.bind(this);
24
- this.isEmpty = this.isEmpty.bind(this);
25
- this.syncHeight = this.syncHeight.bind(this);
26
10
  this.onChange = this.onChange.bind(this);
27
- this.handleResize = this.handleResize.bind(this);
28
- this.rAFHandleResize = this.rAFHandleResize.bind(this);
29
- this.mountingPhase = this.mountingPhase.bind(this);
30
- this.unMountingPhase = this.unMountingPhase.bind(this);
11
+ this.onKeyDown = this.onKeyDown.bind(this);
12
+ this.onBlur = this.onBlur.bind(this);
13
+ }
14
+
15
+ onChange(e) {
16
+ e && e.preventDefault();
17
+ let {
18
+ onChange
19
+ } = this.props;
20
+ onChange && onChange(e.target.value, e);
31
21
  }
32
22
 
33
23
  onBlur(e) {
@@ -45,116 +35,6 @@ export default class Textarea extends React.Component {
45
35
  onKeyDown && onKeyDown(e);
46
36
  }
47
37
 
48
- inputRef(e) {
49
- let {
50
- getRef
51
- } = this.props;
52
- this.textareaRef = e;
53
- getRef && getRef(e);
54
- }
55
-
56
- isEmpty(obj) {
57
- return obj === undefined || obj === null || Object.keys(obj).length === 0 || obj.height === 0 && !obj.overflow;
58
- }
59
-
60
- syncHeight() {
61
- const {
62
- minRows,
63
- maxRows
64
- } = this.props;
65
- const {
66
- height,
67
- overflow
68
- } = calculateNodeHeight({
69
- minRows: minRows,
70
- maxRows: maxRows,
71
- textareaEle: this.textareaRef,
72
- hiddenTextareaEle: this.hiddenTextareaRef.current
73
- });
74
- const newState = {
75
- height: height,
76
- overflow: overflow
77
- };
78
-
79
- if (this.isEmpty(newState)) {
80
- return;
81
- }
82
-
83
- this.sizingData.current = updateState(this.sizingData.current, newState, this.rendersRef); // this.textareaRef.style.setProperty('height',`${this.sizingData.current.height}px`);
84
-
85
- this.textareaRef.style.height = `${this.sizingData.current.height}px`;
86
- this.textareaRef.style.overflowY = `${this.sizingData.current.overflow ? 'hidden' : 'auto'}`;
87
- }
88
-
89
- onChange(e) {
90
- e && e.preventDefault();
91
- let {
92
- onChange
93
- } = this.props;
94
- this.rendersRef.current = 0;
95
- const value = e.target.value;
96
- requestAnimationFrame(() => {
97
- this.syncHeight();
98
- onChange && onChange(value, e);
99
- });
100
- }
101
-
102
- handleResize() {
103
- this.rendersRef.current = 0;
104
- this.syncHeight();
105
- }
106
-
107
- rAFHandleResize() {
108
- cancelAnimationFrame(this.rAF);
109
- this.rAF = requestAnimationFrame(() => {
110
- this.handleResize();
111
- });
112
- }
113
-
114
- mountingPhase() {
115
- const input = this.textareaRef;
116
- const containerWindow = ownerWindow(input);
117
- this.debounceHandleResize = debounce(this.handleResize);
118
- containerWindow.addEventListener("resize", this.debounceHandleResize);
119
-
120
- if (typeof ResizeObserver !== "undefined") {
121
- this.resizeObserver = new ResizeObserver(this.rAFHandleResize);
122
- this.resizeObserver.observe(input);
123
- }
124
- }
125
-
126
- unMountingPhase() {
127
- const input = this.textareaRef;
128
- const containerWindow = ownerWindow(input);
129
- this.debounceHandleResize.clear();
130
- cancelAnimationFrame(this.rAF);
131
- containerWindow.removeEventListener("resize", this.debounceHandleResize);
132
-
133
- if (this.resizeObserver) {
134
- this.resizeObserver.disconnect();
135
- }
136
- }
137
-
138
- componentDidMount() {
139
- this.sizingData.current = {
140
- height: 0,
141
- overflow: false
142
- };
143
- this.mountingPhase();
144
- }
145
-
146
- componentWillUnmount() {
147
- this.sizingData.current = null;
148
- this.unMountingPhase();
149
- }
150
-
151
- componentDidUpdate(prevProps) {
152
- if (prevProps.text !== this.props.text) {
153
- this.rendersRef.current = 0;
154
- this.syncHeight();
155
- }
156
- }
157
-
158
38
  render() {
159
39
  let {
160
40
  size,
@@ -178,38 +58,37 @@ export default class Textarea extends React.Component {
178
58
  autoFocus,
179
59
  htmlId,
180
60
  a11y,
181
- customClass,
182
- minRows
61
+ customClass
183
62
  } = this.props;
184
63
  let {
185
64
  ariaLabel,
186
65
  ariaLabelledby
187
66
  } = a11y;
188
67
  let resizes = {
189
- horizontal: "resizeX",
190
- vertical: "resizeY",
191
- both: "resizeboth",
192
- none: "noresize"
68
+ horizontal: 'resizeX',
69
+ vertical: 'resizeY',
70
+ both: 'resizeboth',
71
+ none: 'noresize'
193
72
  };
194
73
  let options = {};
195
74
 
196
75
  if (isReadOnly) {
197
- options.readOnly = "readOnly";
76
+ options.readOnly = 'readOnly';
198
77
  }
199
78
 
200
79
  if (isDisabled) {
201
- options.disabled = "disabled";
80
+ options.disabled = 'disabled';
202
81
  }
203
82
 
204
83
  if (autoFocus) {
205
84
  options.autoFocus = true;
206
85
  }
207
86
 
208
- let classList = needAppearance ? `${style.container} ${style[size]} ${style[variant]} ${needBorder ? style.needBorder : style.noBorder} ${resize ? style[resizes[resize]] : style[resizes.none]} ${animated ? `${style[`${size}animated`]}` : ""} ${isDisabled && !needEffect || isReadOnly && !needEffect ? "" : style.effect}` : `${style.basic}`;
209
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("textarea", {
87
+ let classList = needAppearance ? `${style.container} ${style[size]} ${style[variant]} ${needBorder ? style.needBorder : style.noBorder} ${resize ? style[resizes[resize]] : style[resizes.none]} ${animated ? `${style[`${size}animated`]}` : ''} ${isDisabled && !needEffect || isReadOnly && !needEffect ? '' : style.effect}` : `${style.basic}`;
88
+ return /*#__PURE__*/React.createElement("textarea", {
210
89
  "aria-label": ariaLabel,
211
90
  "aria-labelledby": ariaLabelledby,
212
- className: `${customClass} ${isReadOnly && needReadOnlyStyle ? style.readonly : ""} ${classList} ${style[`borderColor_${borderColor}`]}`,
91
+ className: `${customClass} ${isReadOnly && needReadOnlyStyle ? style.readonly : ''} ${classList} ${style[`borderColor_${borderColor}`]}`,
213
92
  placeholder: placeHolder,
214
93
  ...options,
215
94
  "data-id": dataId,
@@ -219,18 +98,11 @@ export default class Textarea extends React.Component {
219
98
  onKeyDown: this.onKeyDown,
220
99
  onFocus: onFocus,
221
100
  onBlur: this.onBlur,
222
- ref: this.inputRef,
101
+ ref: getRef,
223
102
  value: text,
224
103
  id: htmlId,
225
- "data-selector-id": dataSelectorId,
226
- rows: minRows
227
- }), /*#__PURE__*/React.createElement("textarea", {
228
- "aria-hidden": true,
229
- readOnly: true,
230
- ref: this.hiddenTextareaRef,
231
- tabIndex: -1,
232
- className: `${customClass} ${isReadOnly && needReadOnlyStyle ? style.readonly : ""} ${classList} ${style[`borderColor_${borderColor}`]} ${style.forceHiddenStyle}`
233
- }));
104
+ "data-selector-id": dataSelectorId
105
+ });
234
106
  }
235
107
 
236
108
  }
@@ -1,191 +1,140 @@
1
- .varClass {
2
- /* textarea default variables */
3
- --textarea_border_width: 0;
4
- --textarea_border_color: none;
5
- --textarea_cursor: text;
6
- --textarea_text_color: var(--zdt_textarea_default_text);
7
- --textarea_font_size: var(--zd_font_size14);
8
- --textarea_line_height: 1.5712;
9
- --textarea_padding: var(--zd_size2) 0;
10
- --textarea_height: var(--zd_size30);
11
-
12
- /* textarea placeholder default variable */
13
- --textarea_placeholder_text_color: var(--zdt_textarea_placeholder_text);
14
- }
15
-
16
- .basic {
17
- composes: varClass;
18
- -webkit-appearance: none;
19
- -moz-appearance: none;
20
- appearance: none;
21
- outline: 0;
22
- letter-spacing: 0.1px;
23
- color: var(--textarea_text_color);
24
- cursor: var(--textarea_cursor);
25
- }
26
-
27
- .basic, .noBorder {
28
- border-width: var(--textarea_border_width);
29
- }
30
-
31
- .basic::placeholder {
32
- color: var(--textarea_placeholder_text_color);
33
- }
34
-
35
- .basic::-webkit-placeholder {
36
- color: var(--textarea_placeholder_text_color);
37
- }
38
-
39
- .basic::-moz-placeholder {
40
- color: var(--textarea_placeholder_text_color);
41
- }
42
-
43
- .basic::-ms-placeholder {
44
- color: var(--textarea_placeholder_text_color);
45
- }
46
-
47
- .basic:disabled {
48
- --textarea_cursor: not-allowed;
49
- --textarea_text_color: var(--zdt_textarea_default_text);
50
- }
51
-
52
- .readonly {
53
- --textarea_cursor: not-allowed;
54
- }
55
-
56
- .resizeX {
57
- composes: resizeX from '../common/common.module.css';
58
- }
59
-
60
- .resizeY {
61
- composes: resizeY from '../common/common.module.css';
62
- }
63
-
64
- .noresize {
65
- composes: resizenone from '../common/common.module.css';
66
- }
67
-
68
- .resizeboth {
69
- composes: resizeboth from '../common/common.module.css';
70
- }
71
-
72
- /* css:lineheight-validation:ignore */
73
- .container {
74
- composes: basic;
75
- transition: .3s;
76
- /* transition: border var(--zd_transition2) linear 0s,
77
- height var(--zd_transition2) linear 0s;
78
- -webkit-transition: border var(--zd_transition2) linear 0s,
79
- height var(--zd_transition2) linear 0s;
80
- -moz-transition: border var(--zd_transition2) linear 0s,
81
- height var(--zd_transition2) linear 0s; */
82
- width: 100% ;
83
- max-width: 100% ;
84
- min-width: var(--zd_size100) ;
85
- font-size: var(--textarea_font_size);
86
- line-height: var(--textarea_line_height);
87
- height: var(--textarea_height);
88
- border-style: solid;
89
- background-color: var(--zdt_textarea_default_bg);
90
- border-color: var(--textarea_border_color);
91
- padding: var(--textarea_padding);
92
- }
93
-
94
- .needBorder {
95
- --textarea_border_width: 0 0 1px 0;
96
- }
97
-
98
- .borderColor_transparent {
99
- --textarea_border_color: var(--zdt_textarea_transparent_border);
100
- }
101
-
102
- .borderColor_default {
103
- --textarea_border_color: var(--zdt_textarea_default_border);
104
- }
105
-
106
- .effect:hover {
107
- --textarea_border_color: var(--zdt_textarea_hover_border);
108
- }
109
-
110
- .effect:focus {
111
- --textarea_border_color: var(--zdt_textarea_focus_border);
112
- }
113
-
114
- .xsmall,
115
- .xmedium {
116
- vertical-align: middle;
117
- }
118
-
119
- .xsmall {
120
- --textarea_font_size: var(--zd_font_size14);
121
- --textarea_padding: var(--zd_size4) 0 var(--zd_size2);
122
- --textarea_height: var(--zd_size28);
123
- --textarea_line_height: 1.3572;
124
- }
125
-
126
- .xmedium {
127
- --textarea_font_size: var(--zd_font_size13);
128
- --textarea_padding: var(--zd_size4) 0 var(--zd_size2);
129
- --textarea_height: var(--zd_size25);
130
- --textarea_line_height: 1.3077;
131
- }
132
-
133
- .small {
134
- --textarea_height: var(--zd_size30);
135
- --textarea_padding: var(--zd_size2) 0;
136
- }
137
-
138
- .smallanimated:focus,
139
- .xsmallanimated:focus,
140
- .xmediumanimated:focus {
141
- --textarea_height: var(--zd_size70);
142
- }
143
-
144
- .medium {
145
- --textarea_height: var(--zd_size88);
146
- --textarea_padding: var(--zd_size2);
147
- }
148
-
149
- .large {
150
- --textarea_height: var(--zd_size45);
151
- --textarea_padding: var(--zd_size2);
152
- }
153
-
154
- .largeanimated:focus {
155
- --textarea_height: var(--zd_size220);
156
- }
157
-
158
- .xlarge {
159
- --textarea_height: var(--zd_size184);
160
- }
161
-
162
- .default {
163
- font-family: var(--zd_regular);
164
- --textarea_text_color: var(--zdt_textarea_black_text);
165
- }
166
-
167
- .primary {
168
- composes: semibold from '../common/common.module.css';
169
- --textarea_text_color: var(--zdt_textarea_black_text);
170
- }
171
-
172
- .forceHiddenStyle {
173
- /* Visibility needed to hide the extra text area on iPads */
174
- visibility: hidden;
175
- /* Remove from the content flow */
176
- position: absolute;
177
- /* Ignore the scrollbar width */
178
- overflow: hidden;
179
- height: 0 ;
180
- top: 0 ;
181
- /* Create a new layer, increase the isolation of the computed values */
182
- transform: translateZ(0);
183
- }
184
-
185
- [dir=ltr] .forceHiddenStyle {
186
- left: 0 ;
187
- }
188
-
189
- [dir=rtl] .forceHiddenStyle {
190
- right: 0 ;
191
- }
1
+ .varClass {
2
+ /* textarea default variables */
3
+ --textarea_border_width: 0;
4
+ --textarea_border_color: none;
5
+ --textarea_cursor: text;
6
+ --textarea_text_color: var(--zdt_textarea_default_text);
7
+ --textarea_font_size: var(--zd_font_size14);
8
+ --textarea_line_height: 1.5712;
9
+ --textarea_padding: var(--zd_size2) 0;
10
+ --textarea_height: var(--zd_size30);
11
+
12
+ /* textarea placeholder default variable */
13
+ --textarea_placeholder_text_color: var(--zdt_textarea_placeholder_text);
14
+ }
15
+ .basic {
16
+ composes: varClass;
17
+ -webkit-appearance: none;
18
+ -moz-appearance: none;
19
+ appearance: none;
20
+ outline: 0;
21
+ letter-spacing: 0.1px;
22
+ color: var(--textarea_text_color);
23
+ cursor: var(--textarea_cursor);
24
+ }
25
+ .basic, .noBorder {
26
+ border-width: var(--textarea_border_width);
27
+ }
28
+ .basic::placeholder {
29
+ color: var(--textarea_placeholder_text_color);
30
+ }
31
+ .basic::-webkit-placeholder {
32
+ color: var(--textarea_placeholder_text_color);
33
+ }
34
+ .basic::-moz-placeholder {
35
+ color: var(--textarea_placeholder_text_color);
36
+ }
37
+ .basic::-ms-placeholder {
38
+ color: var(--textarea_placeholder_text_color);
39
+ }
40
+ .basic:disabled {
41
+ --textarea_cursor: not-allowed;
42
+ --textarea_text_color: var(--zdt_textarea_default_text);
43
+ }
44
+ .readonly {
45
+ --textarea_cursor: not-allowed;
46
+ }
47
+ .resizeX {
48
+ composes: resizeX from '../common/common.module.css';
49
+ }
50
+ .resizeY {
51
+ composes: resizeY from '../common/common.module.css';
52
+ }
53
+ .noresize {
54
+ composes: resizenone from '../common/common.module.css';
55
+ }
56
+ .resizeboth {
57
+ composes: resizeboth from '../common/common.module.css';
58
+ }
59
+ /* css:lineheight-validation:ignore */
60
+ .container {
61
+ composes: basic;
62
+ transition: border var(--zd_transition2) linear 0s,
63
+ height var(--zd_transition2) linear 0s;
64
+ -moz-transition: border var(--zd_transition2) linear 0s,
65
+ height var(--zd_transition2) linear 0s;
66
+ width: 100% ;
67
+ max-width: 100% ;
68
+ min-width: var(--zd_size100) ;
69
+ font-size: var(--textarea_font_size);
70
+ line-height: var(--textarea_line_height);
71
+ height: var(--textarea_height);
72
+ -webkit-transition: border var(--zd_transition2) linear 0s,
73
+ height var(--zd_transition2) linear 0s;
74
+ border-style: solid;
75
+ background-color: var(--zdt_textarea_default_bg);
76
+ border-color: var(--textarea_border_color);
77
+ padding: var(--textarea_padding);
78
+ }
79
+ .needBorder {
80
+ --textarea_border_width: 0 0 1px 0;
81
+ }
82
+ .borderColor_transparent {
83
+ --textarea_border_color: var(--zdt_textarea_transparent_border);
84
+ }
85
+ .borderColor_default {
86
+ --textarea_border_color: var(--zdt_textarea_default_border);
87
+ }
88
+ .effect:hover {
89
+ --textarea_border_color: var(--zdt_textarea_hover_border);
90
+ }
91
+ .effect:focus {
92
+ --textarea_border_color: var(--zdt_textarea_focus_border);
93
+ }
94
+ .xsmall,
95
+ .xmedium {
96
+ vertical-align: middle;
97
+ }
98
+ .xsmall {
99
+ --textarea_font_size: var(--zd_font_size14);
100
+ --textarea_padding: var(--zd_size4) 0 var(--zd_size2);
101
+ --textarea_height: var(--zd_size28);
102
+ --textarea_line_height: 1.3572;
103
+ }
104
+ .xmedium {
105
+ --textarea_font_size: var(--zd_font_size13);
106
+ --textarea_padding: var(--zd_size4) 0 var(--zd_size2);
107
+ --textarea_height: var(--zd_size25);
108
+ --textarea_line_height: 1.3077;
109
+ }
110
+ .small {
111
+ --textarea_height: var(--zd_size30);
112
+ --textarea_padding: var(--zd_size2) 0;
113
+ }
114
+ .smallanimated:focus,
115
+ .xsmallanimated:focus,
116
+ .xmediumanimated:focus {
117
+ --textarea_height: var(--zd_size70);
118
+ }
119
+ .medium {
120
+ --textarea_height: var(--zd_size88);
121
+ --textarea_padding: var(--zd_size2);
122
+ }
123
+ .large {
124
+ --textarea_height: var(--zd_size45);
125
+ --textarea_padding: var(--zd_size2);
126
+ }
127
+ .largeanimated:focus {
128
+ --textarea_height: var(--zd_size220);
129
+ }
130
+ .xlarge {
131
+ --textarea_height: var(--zd_size184);
132
+ }
133
+ .default {
134
+ font-family: var(--zd_regular);
135
+ --textarea_text_color: var(--zdt_textarea_black_text);
136
+ }
137
+ .primary {
138
+ composes: semibold from '../common/common.module.css';
139
+ --textarea_text_color: var(--zdt_textarea_black_text);
140
+ }
@@ -13,6 +13,5 @@ export const defaultProps = {
13
13
  autoFocus: false,
14
14
  customClass: '',
15
15
  a11y: {},
16
- dataSelectorId: 'textarea',
17
- minRows: 1
16
+ dataSelectorId: 'textarea'
18
17
  };
@@ -27,9 +27,5 @@ export const propTypes = {
27
27
  a11y: PropTypes.shape({
28
28
  ariaLabel: PropTypes.string,
29
29
  ariaLabelledby: PropTypes.string
30
- }),
31
- minRows: PropTypes.number,
32
- // the below props are used in TextareaOne.js
33
- maxRows: PropTypes.number,
34
- inlineStyle: PropTypes.string
30
+ })
35
31
  };