@zohodesk/components 1.0.0-temp-207.3 → 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.
- package/.cli/propValidation_report.html +1 -1
- package/es/AppContainer/AppContainer.js +11 -7
- package/es/AppContainer/props/defaultProps.js +2 -1
- package/es/AppContainer/props/propTypes.js +2 -1
- package/es/Avatar/Avatar.module.css +175 -175
- package/es/AvatarTeam/AvatarTeam.module.css +189 -189
- package/es/Button/css/Button.module.css +527 -527
- package/es/Buttongroup/Buttongroup.module.css +104 -104
- package/es/CheckBox/CheckBox.module.css +157 -157
- package/es/DateTime/DateTime.module.css +248 -248
- package/es/DropBox/DropBoxElement/css/DropBoxElement.module.css +431 -431
- package/es/DropBox/css/DropBox.module.css +58 -58
- package/es/DropDown/DropDownHeading.module.css +53 -53
- package/es/DropDown/DropDownItem.module.css +94 -94
- package/es/Label/Label.module.css +57 -57
- package/es/ListItem/ListItem.module.css +205 -205
- package/es/PopOver/PopOver.module.css +8 -8
- package/es/Radio/Radio.module.css +115 -115
- package/es/Ribbon/Ribbon.module.css +499 -499
- package/es/Switch/Switch.module.css +127 -127
- package/es/Tag/Tag.module.css +253 -253
- package/es/TextBox/TextBox.module.css +196 -196
- package/es/TextBoxIcon/TextBoxIcon.module.css +79 -79
- package/es/Textarea/Textarea.js +24 -152
- package/es/Textarea/Textarea.module.css +140 -191
- package/es/Textarea/props/defaultProps.js +1 -2
- package/es/Textarea/props/propTypes.js +1 -5
- package/es/common/customscroll.module.css +141 -141
- package/lib/AppContainer/AppContainer.js +38 -23
- package/lib/AppContainer/props/defaultProps.js +2 -1
- package/lib/AppContainer/props/propTypes.js +2 -1
- package/lib/Avatar/Avatar.module.css +175 -175
- package/lib/AvatarTeam/AvatarTeam.module.css +189 -189
- package/lib/Button/css/Button.module.css +527 -527
- package/lib/Buttongroup/Buttongroup.module.css +104 -104
- package/lib/CheckBox/CheckBox.module.css +157 -157
- package/lib/DateTime/DateTime.module.css +248 -248
- package/lib/DropBox/DropBoxElement/css/DropBoxElement.module.css +431 -431
- package/lib/DropBox/css/DropBox.module.css +58 -58
- package/lib/DropDown/DropDownHeading.module.css +53 -53
- package/lib/DropDown/DropDownItem.module.css +94 -94
- package/lib/Label/Label.module.css +57 -57
- package/lib/ListItem/ListItem.module.css +205 -205
- package/lib/PopOver/PopOver.module.css +8 -8
- package/lib/Radio/Radio.module.css +115 -115
- package/lib/Ribbon/Ribbon.module.css +499 -499
- package/lib/Switch/Switch.module.css +127 -127
- package/lib/Tag/Tag.module.css +253 -253
- package/lib/TextBox/TextBox.module.css +196 -196
- package/lib/TextBoxIcon/TextBoxIcon.module.css +79 -79
- package/lib/Textarea/Textarea.js +43 -189
- package/lib/Textarea/Textarea.module.css +140 -191
- package/lib/Textarea/props/defaultProps.js +1 -2
- package/lib/Textarea/props/propTypes.js +1 -5
- package/lib/common/customscroll.module.css +141 -141
- package/package.json +2 -2
- package/result.json +1 -1
- package/es/Textarea/utils/calculateNodeHeight.js +0 -58
- package/es/Textarea/utils/debounce.js +0 -24
- package/es/Textarea/utils/getSizingData.js +0 -27
- package/es/Textarea/utils/ownerDocument.js +0 -5
- package/es/Textarea/utils/ownerWindow.js +0 -8
- package/es/Textarea/utils/updateState.js +0 -30
- package/lib/Textarea/utils/calculateNodeHeight.js +0 -69
- package/lib/Textarea/utils/debounce.js +0 -33
- package/lib/Textarea/utils/getSizingData.js +0 -37
- package/lib/Textarea/utils/ownerDocument.js +0 -13
- package/lib/Textarea/utils/ownerWindow.js +0 -18
- package/lib/Textarea/utils/updateState.js +0 -36
package/lib/Textarea/Textarea.js
CHANGED
|
@@ -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.
|
|
76
|
-
_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$
|
|
221
|
-
size = _this$
|
|
222
|
-
placeHolder = _this$
|
|
223
|
-
needBorder = _this$
|
|
224
|
-
text = _this$
|
|
225
|
-
isDisabled = _this$
|
|
226
|
-
resize = _this$
|
|
227
|
-
maxLength = _this$
|
|
228
|
-
animated = _this$
|
|
229
|
-
variant = _this$
|
|
230
|
-
getRef = _this$
|
|
231
|
-
onFocus = _this$
|
|
232
|
-
dataId = _this$
|
|
233
|
-
dataSelectorId = _this$
|
|
234
|
-
isReadOnly = _this$
|
|
235
|
-
needAppearance = _this$
|
|
236
|
-
needReadOnlyStyle = _this$
|
|
237
|
-
borderColor = _this$
|
|
238
|
-
needEffect = _this$
|
|
239
|
-
autoFocus = _this$
|
|
240
|
-
htmlId = _this$
|
|
241
|
-
a11y = _this$
|
|
242
|
-
customClass = _this$
|
|
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:
|
|
248
|
-
vertical:
|
|
249
|
-
both:
|
|
250
|
-
none:
|
|
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 =
|
|
116
|
+
options.readOnly = 'readOnly';
|
|
256
117
|
}
|
|
257
118
|
|
|
258
119
|
if (isDisabled) {
|
|
259
|
-
options.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")]) :
|
|
267
|
-
return /*#__PURE__*/_react["default"].createElement(
|
|
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 :
|
|
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:
|
|
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
|
-
|
|
17
|
-
|
|
18
|
-
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
.basic
|
|
32
|
-
color: var(--textarea_placeholder_text_color);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
.
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
.
|
|
57
|
-
composes:
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.
|
|
61
|
-
composes:
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
.
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
.
|
|
99
|
-
--
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
.
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
--
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
.
|
|
111
|
-
--
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
.
|
|
115
|
-
.
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
.
|
|
120
|
-
--
|
|
121
|
-
--textarea_padding: var(--
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
--
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
.
|
|
134
|
-
|
|
135
|
-
--
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.
|
|
139
|
-
|
|
140
|
-
|
|
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
|
+
}
|
|
@@ -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;
|