@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
@@ -9,20 +9,10 @@ exports["default"] = void 0;
9
9
 
10
10
  var _react = _interopRequireDefault(require("react"));
11
11
 
12
- var _reactDom = _interopRequireDefault(require("react-dom"));
13
-
14
12
  var _defaultProps = require("./props/defaultProps");
15
13
 
16
14
  var _propTypes = require("./props/propTypes");
17
15
 
18
- var _debounce = _interopRequireDefault(require("./utils/debounce"));
19
-
20
- var _calculateNodeHeight2 = _interopRequireDefault(require("./utils/calculateNodeHeight"));
21
-
22
- var _ownerWindow = _interopRequireDefault(require("./utils/ownerWindow"));
23
-
24
- var _updateState = _interopRequireDefault(require("./utils/updateState"));
25
-
26
16
  var _TextareaModule = _interopRequireDefault(require("./Textarea.module.css"));
27
17
 
28
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -60,26 +50,20 @@ var Textarea = /*#__PURE__*/function (_React$Component) {
60
50
  _classCallCheck(this, Textarea);
61
51
 
62
52
  _this = _super.call(this, props);
63
- _this.hiddenTextareaRef = /*#__PURE__*/_react["default"].createRef();
64
- _this.rendersRef = /*#__PURE__*/_react["default"].createRef();
65
- _this.sizingData = /*#__PURE__*/_react["default"].createRef(null);
66
- _this.rAF = null;
67
- _this.resizeObserver = null;
68
- _this.debounceHandleResize = null;
69
- _this.onBlur = _this.onBlur.bind(_assertThisInitialized(_this));
70
- _this.onKeyDown = _this.onKeyDown.bind(_assertThisInitialized(_this));
71
- _this.inputRef = _this.inputRef.bind(_assertThisInitialized(_this));
72
- _this.isEmpty = _this.isEmpty.bind(_assertThisInitialized(_this));
73
- _this.syncHeight = _this.syncHeight.bind(_assertThisInitialized(_this));
74
53
  _this.onChange = _this.onChange.bind(_assertThisInitialized(_this));
75
- _this.handleResize = _this.handleResize.bind(_assertThisInitialized(_this));
76
- _this.rAFHandleResize = _this.rAFHandleResize.bind(_assertThisInitialized(_this));
77
- _this.mountingPhase = _this.mountingPhase.bind(_assertThisInitialized(_this));
78
- _this.unMountingPhase = _this.unMountingPhase.bind(_assertThisInitialized(_this));
54
+ _this.onKeyDown = _this.onKeyDown.bind(_assertThisInitialized(_this));
55
+ _this.onBlur = _this.onBlur.bind(_assertThisInitialized(_this));
79
56
  return _this;
80
57
  }
81
58
 
82
59
  _createClass(Textarea, [{
60
+ key: "onChange",
61
+ value: function onChange(e) {
62
+ e && e.preventDefault();
63
+ var onChange = this.props.onChange;
64
+ onChange && onChange(e.target.value, e);
65
+ }
66
+ }, {
83
67
  key: "onBlur",
84
68
  value: function onBlur(e) {
85
69
  e && e.preventDefault();
@@ -92,182 +76,59 @@ var Textarea = /*#__PURE__*/function (_React$Component) {
92
76
  var onKeyDown = this.props.onKeyDown;
93
77
  onKeyDown && onKeyDown(e);
94
78
  }
95
- }, {
96
- key: "inputRef",
97
- value: function inputRef(e) {
98
- var getRef = this.props.getRef;
99
- this.textareaRef = e;
100
- getRef && getRef(e);
101
- }
102
- }, {
103
- key: "isEmpty",
104
- value: function isEmpty(obj) {
105
- return obj === undefined || obj === null || Object.keys(obj).length === 0 || obj.height === 0 && !obj.overflow;
106
- }
107
- }, {
108
- key: "syncHeight",
109
- value: function syncHeight() {
110
- var _this$props = this.props,
111
- minRows = _this$props.minRows,
112
- maxRows = _this$props.maxRows;
113
-
114
- var _calculateNodeHeight = (0, _calculateNodeHeight2["default"])({
115
- minRows: minRows,
116
- maxRows: maxRows,
117
- textareaEle: this.textareaRef,
118
- hiddenTextareaEle: this.hiddenTextareaRef.current
119
- }),
120
- height = _calculateNodeHeight.height,
121
- overflow = _calculateNodeHeight.overflow;
122
-
123
- var newState = {
124
- height: height,
125
- overflow: overflow
126
- };
127
-
128
- if (this.isEmpty(newState)) {
129
- return;
130
- }
131
-
132
- this.sizingData.current = (0, _updateState["default"])(this.sizingData.current, newState, this.rendersRef); // this.textareaRef.style.setProperty('height',`${this.sizingData.current.height}px`);
133
-
134
- this.textareaRef.style.height = "".concat(this.sizingData.current.height, "px");
135
- this.textareaRef.style.overflowY = "".concat(this.sizingData.current.overflow ? 'hidden' : 'auto');
136
- }
137
- }, {
138
- key: "onChange",
139
- value: function onChange(e) {
140
- var _this2 = this;
141
-
142
- e && e.preventDefault();
143
- var onChange = this.props.onChange;
144
- this.rendersRef.current = 0;
145
- var value = e.target.value;
146
- requestAnimationFrame(function () {
147
- _this2.syncHeight();
148
-
149
- onChange && onChange(value, e);
150
- });
151
- }
152
- }, {
153
- key: "handleResize",
154
- value: function handleResize() {
155
- this.rendersRef.current = 0;
156
- this.syncHeight();
157
- }
158
- }, {
159
- key: "rAFHandleResize",
160
- value: function rAFHandleResize() {
161
- var _this3 = this;
162
-
163
- cancelAnimationFrame(this.rAF);
164
- this.rAF = requestAnimationFrame(function () {
165
- _this3.handleResize();
166
- });
167
- }
168
- }, {
169
- key: "mountingPhase",
170
- value: function mountingPhase() {
171
- var input = this.textareaRef;
172
- var containerWindow = (0, _ownerWindow["default"])(input);
173
- this.debounceHandleResize = (0, _debounce["default"])(this.handleResize);
174
- containerWindow.addEventListener("resize", this.debounceHandleResize);
175
-
176
- if (typeof ResizeObserver !== "undefined") {
177
- this.resizeObserver = new ResizeObserver(this.rAFHandleResize);
178
- this.resizeObserver.observe(input);
179
- }
180
- }
181
- }, {
182
- key: "unMountingPhase",
183
- value: function unMountingPhase() {
184
- var input = this.textareaRef;
185
- var containerWindow = (0, _ownerWindow["default"])(input);
186
- this.debounceHandleResize.clear();
187
- cancelAnimationFrame(this.rAF);
188
- containerWindow.removeEventListener("resize", this.debounceHandleResize);
189
-
190
- if (this.resizeObserver) {
191
- this.resizeObserver.disconnect();
192
- }
193
- }
194
- }, {
195
- key: "componentDidMount",
196
- value: function componentDidMount() {
197
- this.sizingData.current = {
198
- height: 0,
199
- overflow: false
200
- };
201
- this.mountingPhase();
202
- }
203
- }, {
204
- key: "componentWillUnmount",
205
- value: function componentWillUnmount() {
206
- this.sizingData.current = null;
207
- this.unMountingPhase();
208
- }
209
- }, {
210
- key: "componentDidUpdate",
211
- value: function componentDidUpdate(prevProps) {
212
- if (prevProps.text !== this.props.text) {
213
- this.rendersRef.current = 0;
214
- this.syncHeight();
215
- }
216
- }
217
79
  }, {
218
80
  key: "render",
219
81
  value: function render() {
220
- var _this$props2 = this.props,
221
- size = _this$props2.size,
222
- placeHolder = _this$props2.placeHolder,
223
- needBorder = _this$props2.needBorder,
224
- text = _this$props2.text,
225
- isDisabled = _this$props2.isDisabled,
226
- resize = _this$props2.resize,
227
- maxLength = _this$props2.maxLength,
228
- animated = _this$props2.animated,
229
- variant = _this$props2.variant,
230
- getRef = _this$props2.getRef,
231
- onFocus = _this$props2.onFocus,
232
- dataId = _this$props2.dataId,
233
- dataSelectorId = _this$props2.dataSelectorId,
234
- isReadOnly = _this$props2.isReadOnly,
235
- needAppearance = _this$props2.needAppearance,
236
- needReadOnlyStyle = _this$props2.needReadOnlyStyle,
237
- borderColor = _this$props2.borderColor,
238
- needEffect = _this$props2.needEffect,
239
- autoFocus = _this$props2.autoFocus,
240
- htmlId = _this$props2.htmlId,
241
- a11y = _this$props2.a11y,
242
- customClass = _this$props2.customClass,
243
- minRows = _this$props2.minRows;
82
+ var _this$props = this.props,
83
+ size = _this$props.size,
84
+ placeHolder = _this$props.placeHolder,
85
+ needBorder = _this$props.needBorder,
86
+ text = _this$props.text,
87
+ isDisabled = _this$props.isDisabled,
88
+ resize = _this$props.resize,
89
+ maxLength = _this$props.maxLength,
90
+ animated = _this$props.animated,
91
+ variant = _this$props.variant,
92
+ getRef = _this$props.getRef,
93
+ onFocus = _this$props.onFocus,
94
+ dataId = _this$props.dataId,
95
+ dataSelectorId = _this$props.dataSelectorId,
96
+ isReadOnly = _this$props.isReadOnly,
97
+ needAppearance = _this$props.needAppearance,
98
+ needReadOnlyStyle = _this$props.needReadOnlyStyle,
99
+ borderColor = _this$props.borderColor,
100
+ needEffect = _this$props.needEffect,
101
+ autoFocus = _this$props.autoFocus,
102
+ htmlId = _this$props.htmlId,
103
+ a11y = _this$props.a11y,
104
+ customClass = _this$props.customClass;
244
105
  var ariaLabel = a11y.ariaLabel,
245
106
  ariaLabelledby = a11y.ariaLabelledby;
246
107
  var resizes = {
247
- horizontal: "resizeX",
248
- vertical: "resizeY",
249
- both: "resizeboth",
250
- none: "noresize"
108
+ horizontal: 'resizeX',
109
+ vertical: 'resizeY',
110
+ both: 'resizeboth',
111
+ none: 'noresize'
251
112
  };
252
113
  var options = {};
253
114
 
254
115
  if (isReadOnly) {
255
- options.readOnly = "readOnly";
116
+ options.readOnly = 'readOnly';
256
117
  }
257
118
 
258
119
  if (isDisabled) {
259
- options.disabled = "disabled";
120
+ options.disabled = 'disabled';
260
121
  }
261
122
 
262
123
  if (autoFocus) {
263
124
  options.autoFocus = true;
264
125
  }
265
126
 
266
- var classList = needAppearance ? "".concat(_TextareaModule["default"].container, " ").concat(_TextareaModule["default"][size], " ").concat(_TextareaModule["default"][variant], " ").concat(needBorder ? _TextareaModule["default"].needBorder : _TextareaModule["default"].noBorder, " ").concat(resize ? _TextareaModule["default"][resizes[resize]] : _TextareaModule["default"][resizes.none], " ").concat(animated ? "".concat(_TextareaModule["default"]["".concat(size, "animated")]) : "", " ").concat(isDisabled && !needEffect || isReadOnly && !needEffect ? "" : _TextareaModule["default"].effect) : "".concat(_TextareaModule["default"].basic);
267
- return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("textarea", _extends({
127
+ var classList = needAppearance ? "".concat(_TextareaModule["default"].container, " ").concat(_TextareaModule["default"][size], " ").concat(_TextareaModule["default"][variant], " ").concat(needBorder ? _TextareaModule["default"].needBorder : _TextareaModule["default"].noBorder, " ").concat(resize ? _TextareaModule["default"][resizes[resize]] : _TextareaModule["default"][resizes.none], " ").concat(animated ? "".concat(_TextareaModule["default"]["".concat(size, "animated")]) : '', " ").concat(isDisabled && !needEffect || isReadOnly && !needEffect ? '' : _TextareaModule["default"].effect) : "".concat(_TextareaModule["default"].basic);
128
+ return /*#__PURE__*/_react["default"].createElement("textarea", _extends({
268
129
  "aria-label": ariaLabel,
269
130
  "aria-labelledby": ariaLabelledby,
270
- className: "".concat(customClass, " ").concat(isReadOnly && needReadOnlyStyle ? _TextareaModule["default"].readonly : "", " ").concat(classList, " ").concat(_TextareaModule["default"]["borderColor_".concat(borderColor)]),
131
+ className: "".concat(customClass, " ").concat(isReadOnly && needReadOnlyStyle ? _TextareaModule["default"].readonly : '', " ").concat(classList, " ").concat(_TextareaModule["default"]["borderColor_".concat(borderColor)]),
271
132
  placeholder: placeHolder
272
133
  }, options, {
273
134
  "data-id": dataId,
@@ -277,17 +138,10 @@ var Textarea = /*#__PURE__*/function (_React$Component) {
277
138
  onKeyDown: this.onKeyDown,
278
139
  onFocus: onFocus,
279
140
  onBlur: this.onBlur,
280
- ref: this.inputRef,
141
+ ref: getRef,
281
142
  value: text,
282
143
  id: htmlId,
283
- "data-selector-id": dataSelectorId,
284
- rows: minRows
285
- })), /*#__PURE__*/_react["default"].createElement("textarea", {
286
- "aria-hidden": true,
287
- readOnly: true,
288
- ref: this.hiddenTextareaRef,
289
- tabIndex: -1,
290
- className: "".concat(customClass, " ").concat(isReadOnly && needReadOnlyStyle ? _TextareaModule["default"].readonly : "", " ").concat(classList, " ").concat(_TextareaModule["default"]["borderColor_".concat(borderColor)], " ").concat(_TextareaModule["default"].forceHiddenStyle)
144
+ "data-selector-id": dataSelectorId
291
145
  }));
292
146
  }
293
147
  }]);
@@ -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
+ }
@@ -19,7 +19,6 @@ var defaultProps = {
19
19
  autoFocus: false,
20
20
  customClass: '',
21
21
  a11y: {},
22
- dataSelectorId: 'textarea',
23
- minRows: 1
22
+ dataSelectorId: 'textarea'
24
23
  };
25
24
  exports.defaultProps = defaultProps;
@@ -37,10 +37,6 @@ var propTypes = {
37
37
  a11y: _propTypes["default"].shape({
38
38
  ariaLabel: _propTypes["default"].string,
39
39
  ariaLabelledby: _propTypes["default"].string
40
- }),
41
- minRows: _propTypes["default"].number,
42
- // the below props are used in TextareaOne.js
43
- maxRows: _propTypes["default"].number,
44
- inlineStyle: _propTypes["default"].string
40
+ })
45
41
  };
46
42
  exports.propTypes = propTypes;