@zohodesk/components 1.0.0-temp-207.3 → 1.0.0-temp-208.2
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/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/es/v1/AppContainer/AppContainer.js +0 -6
- 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/lib/v1/AppContainer/AppContainer.js +0 -12
- 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/es/Textarea/Textarea.js
CHANGED
|
@@ -1,33 +1,23 @@
|
|
|
1
|
-
import React from
|
|
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.
|
|
28
|
-
this.
|
|
29
|
-
|
|
30
|
-
|
|
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:
|
|
190
|
-
vertical:
|
|
191
|
-
both:
|
|
192
|
-
none:
|
|
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 =
|
|
76
|
+
options.readOnly = 'readOnly';
|
|
198
77
|
}
|
|
199
78
|
|
|
200
79
|
if (isDisabled) {
|
|
201
|
-
options.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`]}` :
|
|
209
|
-
return /*#__PURE__*/React.createElement(
|
|
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 :
|
|
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:
|
|
101
|
+
ref: getRef,
|
|
223
102
|
value: text,
|
|
224
103
|
id: htmlId,
|
|
225
|
-
"data-selector-id": dataSelectorId
|
|
226
|
-
|
|
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
|
-
|
|
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
|
+
}
|
|
@@ -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
|
};
|