@zohodesk/components 1.0.0-temp-199.10 → 1.0.0-temp-199.12
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/README.md +18 -0
- package/assets/Appearance/dark/mode/Component_DarkMode.module.css +8 -0
- package/assets/Appearance/light/mode/Component_LightMode.module.css +8 -0
- package/assets/Appearance/pureDark/mode/Component_PureDarkMode.module.css +8 -0
- package/es/Button/__tests__/__snapshots__/Button.spec.js.snap +2 -2
- package/es/Button/css/Button.module.css +57 -10
- package/es/Button/css/cssJSLogic.js +1 -1
- package/es/Button/props/propTypes.js +1 -1
- package/es/ListItem/ListContainer.js +3 -2
- package/es/ListItem/ListItem.js +3 -2
- package/es/ListItem/ListItem.module.css +4 -7
- package/es/ListItem/ListItemWithAvatar.js +1 -1
- package/es/ListItem/ListItemWithIcon.js +2 -1
- package/es/ListItem/props/defaultProps.js +2 -1
- package/es/ListItem/props/propTypes.js +2 -1
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +2 -2
- package/es/MultiSelect/MultiSelect.js +2 -2
- package/es/MultiSelect/Suggestions.js +5 -7
- package/es/MultiSelect/props/defaultProps.js +1 -3
- package/es/MultiSelect/props/propTypes.js +4 -2
- package/es/RippleEffect/RippleEffect.module.css +16 -0
- package/es/RippleEffect/props/propTypes.js +1 -1
- package/es/Select/GroupSelect.js +2 -2
- package/es/Select/SelectWithAvatar.js +2 -2
- package/es/Select/SelectWithIcon.js +2 -2
- package/es/Select/props/propTypes.js +6 -3
- package/es/Tag/Tag.js +1 -1
- package/es/Textarea/Textarea.js +9 -3
- package/es/Textarea/Textarea.module.css +11 -3
- package/es/Textarea/__tests__/Textarea.spec.js +38 -0
- package/es/Textarea/__tests__/__snapshots__/Textarea.spec.js.snap +90 -41
- package/es/Textarea/props/defaultProps.js +2 -1
- package/es/Textarea/props/propTypes.js +5 -2
- package/es/common/common.module.css +2 -2
- package/es/v1/ListItem/ListItem.js +1 -1
- package/es/v1/MultiSelect/AdvancedMultiSelect.js +1 -2
- package/es/v1/MultiSelect/MultiSelect.js +2 -7
- package/es/v1/MultiSelect/Suggestions.js +4 -8
- package/es/v1/MultiSelect/props/defaultProps.js +2 -4
- package/es/v1/MultiSelect/props/propTypes.js +2 -6
- package/es/v1/Select/GroupSelect.js +2 -7
- package/es/v1/Select/SelectWithAvatar.js +2 -7
- package/es/v1/Select/props/defaultProps.js +2 -4
- package/es/v1/Select/props/propTypes.js +2 -6
- package/lib/Button/__tests__/__snapshots__/Button.spec.js.snap +2 -2
- package/lib/Button/css/Button.module.css +57 -10
- package/lib/Button/css/cssJSLogic.js +1 -1
- package/lib/Button/props/propTypes.js +1 -1
- package/lib/ListItem/ListContainer.js +3 -2
- package/lib/ListItem/ListItem.js +3 -2
- package/lib/ListItem/ListItem.module.css +4 -7
- package/lib/ListItem/ListItemWithAvatar.js +1 -1
- package/lib/ListItem/ListItemWithIcon.js +2 -1
- package/lib/ListItem/props/defaultProps.js +2 -1
- package/lib/ListItem/props/propTypes.js +2 -1
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +3 -2
- package/lib/MultiSelect/MultiSelect.js +3 -3
- package/lib/MultiSelect/Suggestions.js +7 -8
- package/lib/MultiSelect/props/defaultProps.js +1 -3
- package/lib/MultiSelect/props/propTypes.js +4 -2
- package/lib/RippleEffect/RippleEffect.module.css +16 -0
- package/lib/RippleEffect/props/propTypes.js +1 -1
- package/lib/Select/GroupSelect.js +3 -3
- package/lib/Select/SelectWithAvatar.js +3 -3
- package/lib/Select/SelectWithIcon.js +3 -3
- package/lib/Select/props/propTypes.js +6 -3
- package/lib/Tag/Tag.js +1 -1
- package/lib/Textarea/Textarea.js +9 -4
- package/lib/Textarea/Textarea.module.css +11 -3
- package/lib/Textarea/__tests__/Textarea.spec.js +38 -0
- package/lib/Textarea/__tests__/__snapshots__/Textarea.spec.js.snap +90 -41
- package/lib/Textarea/props/defaultProps.js +2 -1
- package/lib/Textarea/props/propTypes.js +5 -2
- package/lib/common/common.module.css +2 -2
- package/lib/v1/ListItem/ListItem.js +1 -1
- package/lib/v1/MultiSelect/AdvancedMultiSelect.js +1 -3
- package/lib/v1/MultiSelect/MultiSelect.js +3 -8
- package/lib/v1/MultiSelect/Suggestions.js +4 -8
- package/lib/v1/MultiSelect/props/defaultProps.js +2 -4
- package/lib/v1/MultiSelect/props/propTypes.js +2 -6
- package/lib/v1/Select/GroupSelect.js +3 -8
- package/lib/v1/Select/SelectWithAvatar.js +3 -8
- package/lib/v1/Select/props/defaultProps.js +2 -4
- package/lib/v1/Select/props/propTypes.js +2 -6
- package/package.json +6 -6
- package/result.json +1 -1
|
@@ -178,7 +178,7 @@ export const GroupSelect_propTypes = {
|
|
|
178
178
|
customProps: PropTypes.shape({
|
|
179
179
|
TextBoxProps: PropTypes.object,
|
|
180
180
|
TextBoxIconProps: PropTypes.object,
|
|
181
|
-
|
|
181
|
+
SuggestionsProps: PropTypes.object
|
|
182
182
|
})
|
|
183
183
|
};
|
|
184
184
|
export const SelectWithAvatar_propTypes = { ...Select_propTypes,
|
|
@@ -241,7 +241,9 @@ export const SelectWithAvatar_propTypes = { ...Select_propTypes,
|
|
|
241
241
|
needEffect: PropTypes.bool,
|
|
242
242
|
isLoading: PropTypes.bool,
|
|
243
243
|
dataSelectorId: PropTypes.string,
|
|
244
|
-
customProps: PropTypes.
|
|
244
|
+
customProps: PropTypes.shape({
|
|
245
|
+
SuggestionsProps: PropTypes.object
|
|
246
|
+
})
|
|
245
247
|
};
|
|
246
248
|
export const SelectWithIcon_propTypes = {
|
|
247
249
|
animationStyle: PropTypes.oneOf(['default', 'bounce']),
|
|
@@ -303,6 +305,7 @@ export const SelectWithIcon_propTypes = {
|
|
|
303
305
|
customProps: PropTypes.shape({
|
|
304
306
|
TextBoxProps: PropTypes.object,
|
|
305
307
|
DropdownSearchTextBoxProps: PropTypes.object,
|
|
306
|
-
TextBoxIconProps: PropTypes.object
|
|
308
|
+
TextBoxIconProps: PropTypes.object,
|
|
309
|
+
ListItemProps: PropTypes.object
|
|
307
310
|
})
|
|
308
311
|
};
|
package/es/Tag/Tag.js
CHANGED
|
@@ -47,7 +47,7 @@ export default class Tag extends PureComponent {
|
|
|
47
47
|
e && e.preventDefault();
|
|
48
48
|
e.stopPropagation && e.stopPropagation();
|
|
49
49
|
e.nativeEvent.stopImmediatePropagation && e.nativeEvent.stopImmediatePropagation();
|
|
50
|
-
onRemove && onRemove(id);
|
|
50
|
+
onRemove && onRemove(id, e);
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
getRef(el) {
|
package/es/Textarea/Textarea.js
CHANGED
|
@@ -59,7 +59,10 @@ export default class Textarea extends React.Component {
|
|
|
59
59
|
htmlId,
|
|
60
60
|
a11y,
|
|
61
61
|
customClass,
|
|
62
|
-
isFocus
|
|
62
|
+
isFocus,
|
|
63
|
+
rows,
|
|
64
|
+
cols,
|
|
65
|
+
customAttributes
|
|
63
66
|
} = this.props;
|
|
64
67
|
let {
|
|
65
68
|
ariaLabel,
|
|
@@ -86,7 +89,7 @@ export default class Textarea extends React.Component {
|
|
|
86
89
|
}
|
|
87
90
|
|
|
88
91
|
const isEditable = !(isReadOnly || isDisabled);
|
|
89
|
-
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} ${isEditable && isFocus ? style.active : ''}` : `${style.basic}`;
|
|
92
|
+
let classList = needAppearance ? `${style.container} ${size !== 'default' ? style[size] : ''} ${!rows && size === 'default' ? style.defaultHeight : ''} ${!cols ? style.defaultWidth : ''} ${style[variant]} ${needBorder ? style.needBorder : style.noBorder} ${resize ? style[resizes[resize]] : style[resizes.none]} ${animated && size !== 'default' ? `${style[`${size}animated`]}` : ''} ${isDisabled && !needEffect || isReadOnly && !needEffect ? '' : style.effect} ${isEditable && isFocus ? style.active : ''}` : `${style.basic}`;
|
|
90
93
|
return /*#__PURE__*/React.createElement("textarea", {
|
|
91
94
|
"aria-label": ariaLabel,
|
|
92
95
|
"aria-labelledby": ariaLabelledby,
|
|
@@ -103,7 +106,10 @@ export default class Textarea extends React.Component {
|
|
|
103
106
|
ref: getRef,
|
|
104
107
|
value: text,
|
|
105
108
|
id: htmlId,
|
|
106
|
-
"data-selector-id": dataSelectorId
|
|
109
|
+
"data-selector-id": dataSelectorId,
|
|
110
|
+
rows: rows,
|
|
111
|
+
cols: cols,
|
|
112
|
+
...customAttributes
|
|
107
113
|
});
|
|
108
114
|
}
|
|
109
115
|
|
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
--textarea_font_size: var(--zd_font_size14);
|
|
8
8
|
--textarea_line_height: 1.5712;
|
|
9
9
|
--textarea_padding: var(--zd_size2) 0;
|
|
10
|
-
--textarea_height:
|
|
10
|
+
--textarea_height: auto;
|
|
11
|
+
--textarea_width: auto;
|
|
11
12
|
|
|
12
13
|
/* textarea placeholder default variable */
|
|
13
14
|
--textarea_placeholder_text_color: var(--zdt_textarea_placeholder_text);
|
|
@@ -63,7 +64,7 @@
|
|
|
63
64
|
height var(--zd_transition2) linear 0s;
|
|
64
65
|
-moz-transition: border var(--zd_transition2) linear 0s,
|
|
65
66
|
height var(--zd_transition2) linear 0s;
|
|
66
|
-
width:
|
|
67
|
+
width: var(--textarea_width);
|
|
67
68
|
max-width: 100% ;
|
|
68
69
|
min-width: var(--zd_size100) ;
|
|
69
70
|
font-size: var(--textarea_font_size);
|
|
@@ -91,6 +92,13 @@
|
|
|
91
92
|
.effect:focus,.effect.active {
|
|
92
93
|
--textarea_border_color: var(--zdt_textarea_focus_border);
|
|
93
94
|
}
|
|
95
|
+
|
|
96
|
+
.defaultHeight{
|
|
97
|
+
--textarea_height: var(--zd_size30);
|
|
98
|
+
}
|
|
99
|
+
.defaultWidth {
|
|
100
|
+
--textarea_width: 100%;
|
|
101
|
+
}
|
|
94
102
|
.xsmall,
|
|
95
103
|
.xmedium {
|
|
96
104
|
vertical-align: middle;
|
|
@@ -107,7 +115,7 @@
|
|
|
107
115
|
--textarea_height: var(--zd_size25);
|
|
108
116
|
--textarea_line_height: 1.3077;
|
|
109
117
|
}
|
|
110
|
-
.small
|
|
118
|
+
.small{
|
|
111
119
|
--textarea_height: var(--zd_size30);
|
|
112
120
|
--textarea_padding: var(--zd_size2) 0;
|
|
113
121
|
}
|
|
@@ -225,4 +225,42 @@ describe('Textarea component', () => {
|
|
|
225
225
|
}));
|
|
226
226
|
expect(asFragment()).toMatchSnapshot();
|
|
227
227
|
});
|
|
228
|
+
test('Should be render rows and cols ', () => {
|
|
229
|
+
const {
|
|
230
|
+
asFragment
|
|
231
|
+
} = render( /*#__PURE__*/React.createElement(Textarea, {
|
|
232
|
+
size: "default",
|
|
233
|
+
rows: "3",
|
|
234
|
+
cols: "3"
|
|
235
|
+
}));
|
|
236
|
+
expect(asFragment()).toMatchSnapshot();
|
|
237
|
+
});
|
|
238
|
+
test('Should be render rows only ', () => {
|
|
239
|
+
const {
|
|
240
|
+
asFragment
|
|
241
|
+
} = render( /*#__PURE__*/React.createElement(Textarea, {
|
|
242
|
+
size: "default",
|
|
243
|
+
rows: "3"
|
|
244
|
+
}));
|
|
245
|
+
expect(asFragment()).toMatchSnapshot();
|
|
246
|
+
});
|
|
247
|
+
test('Should be render cols only ', () => {
|
|
248
|
+
const {
|
|
249
|
+
asFragment
|
|
250
|
+
} = render( /*#__PURE__*/React.createElement(Textarea, {
|
|
251
|
+
size: "default",
|
|
252
|
+
cols: "3"
|
|
253
|
+
}));
|
|
254
|
+
expect(asFragment()).toMatchSnapshot();
|
|
255
|
+
});
|
|
256
|
+
test('Should be render custom Attributes ', () => {
|
|
257
|
+
const {
|
|
258
|
+
asFragment
|
|
259
|
+
} = render( /*#__PURE__*/React.createElement(Textarea, {
|
|
260
|
+
customAttributes: {
|
|
261
|
+
disabled: true
|
|
262
|
+
}
|
|
263
|
+
}));
|
|
264
|
+
expect(asFragment()).toMatchSnapshot();
|
|
265
|
+
});
|
|
228
266
|
});
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
+
exports[`Textarea component Should be render cols only 1`] = `
|
|
4
|
+
<DocumentFragment>
|
|
5
|
+
<textarea
|
|
6
|
+
class=" container defaultHeight default needBorder noresize effect borderColor_default"
|
|
7
|
+
cols="3"
|
|
8
|
+
data-id="TextareaComp"
|
|
9
|
+
data-selector-id="textarea"
|
|
10
|
+
data-test-id="TextareaComp"
|
|
11
|
+
/>
|
|
12
|
+
</DocumentFragment>
|
|
13
|
+
`;
|
|
14
|
+
|
|
3
15
|
exports[`Textarea component Should be render autofocus true 1`] = `
|
|
4
16
|
<DocumentFragment>
|
|
5
17
|
<textarea
|
|
6
|
-
class=" container small default needBorder noresize effect borderColor_default"
|
|
18
|
+
class=" container small defaultWidth default needBorder noresize effect borderColor_default"
|
|
7
19
|
data-id="TextareaComp"
|
|
8
20
|
data-selector-id="textarea"
|
|
9
21
|
data-test-id="TextareaComp"
|
|
@@ -11,10 +23,22 @@ exports[`Textarea component Should be render autofocus true 1`] = `
|
|
|
11
23
|
</DocumentFragment>
|
|
12
24
|
`;
|
|
13
25
|
|
|
26
|
+
exports[`Textarea component Should be render custom Attributes 1`] = `
|
|
27
|
+
<DocumentFragment>
|
|
28
|
+
<textarea
|
|
29
|
+
class=" container small defaultWidth default needBorder noresize effect borderColor_default"
|
|
30
|
+
data-id="TextareaComp"
|
|
31
|
+
data-selector-id="textarea"
|
|
32
|
+
data-test-id="TextareaComp"
|
|
33
|
+
disabled=""
|
|
34
|
+
/>
|
|
35
|
+
</DocumentFragment>
|
|
36
|
+
`;
|
|
37
|
+
|
|
14
38
|
exports[`Textarea component Should be render customClass 1`] = `
|
|
15
39
|
<DocumentFragment>
|
|
16
40
|
<textarea
|
|
17
|
-
class="textAreaCustomClass container small default needBorder noresize effect borderColor_default"
|
|
41
|
+
class="textAreaCustomClass container small defaultWidth default needBorder noresize effect borderColor_default"
|
|
18
42
|
data-id="TextareaComp"
|
|
19
43
|
data-selector-id="textarea"
|
|
20
44
|
data-test-id="TextareaComp"
|
|
@@ -25,7 +49,7 @@ exports[`Textarea component Should be render customClass 1`] = `
|
|
|
25
49
|
exports[`Textarea component Should be render htmlId 1`] = `
|
|
26
50
|
<DocumentFragment>
|
|
27
51
|
<textarea
|
|
28
|
-
class=" container small default needBorder noresize effect borderColor_default"
|
|
52
|
+
class=" container small defaultWidth default needBorder noresize effect borderColor_default"
|
|
29
53
|
data-id="TextareaComp"
|
|
30
54
|
data-selector-id="textarea"
|
|
31
55
|
data-test-id="TextareaComp"
|
|
@@ -37,7 +61,7 @@ exports[`Textarea component Should be render htmlId 1`] = `
|
|
|
37
61
|
exports[`Textarea component Should be render isDisabled is false and needEffect is false 1`] = `
|
|
38
62
|
<DocumentFragment>
|
|
39
63
|
<textarea
|
|
40
|
-
class=" container small default needBorder noresize effect borderColor_default"
|
|
64
|
+
class=" container small defaultWidth default needBorder noresize effect borderColor_default"
|
|
41
65
|
data-id="TextareaComp"
|
|
42
66
|
data-selector-id="textarea"
|
|
43
67
|
data-test-id="TextareaComp"
|
|
@@ -48,7 +72,7 @@ exports[`Textarea component Should be render isDisabled is false and needEffect
|
|
|
48
72
|
exports[`Textarea component Should be render isDisabled is true 1`] = `
|
|
49
73
|
<DocumentFragment>
|
|
50
74
|
<textarea
|
|
51
|
-
class=" container small default needBorder noresize borderColor_default"
|
|
75
|
+
class=" container small defaultWidth default needBorder noresize borderColor_default"
|
|
52
76
|
data-id="TextareaComp"
|
|
53
77
|
data-selector-id="textarea"
|
|
54
78
|
data-test-id="TextareaComp"
|
|
@@ -60,7 +84,7 @@ exports[`Textarea component Should be render isDisabled is true 1`] = `
|
|
|
60
84
|
exports[`Textarea component Should be render isDisabled is true and needEffect is false 1`] = `
|
|
61
85
|
<DocumentFragment>
|
|
62
86
|
<textarea
|
|
63
|
-
class=" container small default needBorder noresize borderColor_default"
|
|
87
|
+
class=" container small defaultWidth default needBorder noresize borderColor_default"
|
|
64
88
|
data-id="TextareaComp"
|
|
65
89
|
data-selector-id="textarea"
|
|
66
90
|
data-test-id="TextareaComp"
|
|
@@ -72,7 +96,7 @@ exports[`Textarea component Should be render isDisabled is true and needEffect i
|
|
|
72
96
|
exports[`Textarea component Should be render isDisabled is true and needEffect is true 1`] = `
|
|
73
97
|
<DocumentFragment>
|
|
74
98
|
<textarea
|
|
75
|
-
class=" container small default needBorder noresize effect borderColor_default"
|
|
99
|
+
class=" container small defaultWidth default needBorder noresize effect borderColor_default"
|
|
76
100
|
data-id="TextareaComp"
|
|
77
101
|
data-selector-id="textarea"
|
|
78
102
|
data-test-id="TextareaComp"
|
|
@@ -84,7 +108,7 @@ exports[`Textarea component Should be render isDisabled is true and needEffect i
|
|
|
84
108
|
exports[`Textarea component Should be render isReadOnly is false and needEffect is false 1`] = `
|
|
85
109
|
<DocumentFragment>
|
|
86
110
|
<textarea
|
|
87
|
-
class=" container small default needBorder noresize effect borderColor_default"
|
|
111
|
+
class=" container small defaultWidth default needBorder noresize effect borderColor_default"
|
|
88
112
|
data-id="TextareaComp"
|
|
89
113
|
data-selector-id="textarea"
|
|
90
114
|
data-test-id="TextareaComp"
|
|
@@ -95,7 +119,7 @@ exports[`Textarea component Should be render isReadOnly is false and needEffect
|
|
|
95
119
|
exports[`Textarea component Should be render isReadOnly is true and needEffect is false 1`] = `
|
|
96
120
|
<DocumentFragment>
|
|
97
121
|
<textarea
|
|
98
|
-
class=" readonly container small default needBorder noresize borderColor_default"
|
|
122
|
+
class=" readonly container small defaultWidth default needBorder noresize borderColor_default"
|
|
99
123
|
data-id="TextareaComp"
|
|
100
124
|
data-selector-id="textarea"
|
|
101
125
|
data-test-id="TextareaComp"
|
|
@@ -107,7 +131,7 @@ exports[`Textarea component Should be render isReadOnly is true and needEffect i
|
|
|
107
131
|
exports[`Textarea component Should be render isReadOnly is true and needEffect is true 1`] = `
|
|
108
132
|
<DocumentFragment>
|
|
109
133
|
<textarea
|
|
110
|
-
class=" readonly container small default needBorder noresize effect borderColor_default"
|
|
134
|
+
class=" readonly container small defaultWidth default needBorder noresize effect borderColor_default"
|
|
111
135
|
data-id="TextareaComp"
|
|
112
136
|
data-selector-id="textarea"
|
|
113
137
|
data-test-id="TextareaComp"
|
|
@@ -119,7 +143,7 @@ exports[`Textarea component Should be render isReadOnly is true and needEffect i
|
|
|
119
143
|
exports[`Textarea component Should be render maxLength in number 1`] = `
|
|
120
144
|
<DocumentFragment>
|
|
121
145
|
<textarea
|
|
122
|
-
class=" container small default needBorder noresize effect borderColor_default"
|
|
146
|
+
class=" container small defaultWidth default needBorder noresize effect borderColor_default"
|
|
123
147
|
data-id="TextareaComp"
|
|
124
148
|
data-selector-id="textarea"
|
|
125
149
|
data-test-id="TextareaComp"
|
|
@@ -131,7 +155,7 @@ exports[`Textarea component Should be render maxLength in number 1`] = `
|
|
|
131
155
|
exports[`Textarea component Should be render maxLength in string 1`] = `
|
|
132
156
|
<DocumentFragment>
|
|
133
157
|
<textarea
|
|
134
|
-
class=" container small default needBorder noresize effect borderColor_default"
|
|
158
|
+
class=" container small defaultWidth default needBorder noresize effect borderColor_default"
|
|
135
159
|
data-id="TextareaComp"
|
|
136
160
|
data-selector-id="textarea"
|
|
137
161
|
data-test-id="TextareaComp"
|
|
@@ -154,7 +178,7 @@ exports[`Textarea component Should be render needAppearance is false 1`] = `
|
|
|
154
178
|
exports[`Textarea component Should be render needBorder is false 1`] = `
|
|
155
179
|
<DocumentFragment>
|
|
156
180
|
<textarea
|
|
157
|
-
class=" container small default noBorder noresize effect borderColor_default"
|
|
181
|
+
class=" container small defaultWidth default noBorder noresize effect borderColor_default"
|
|
158
182
|
data-id="TextareaComp"
|
|
159
183
|
data-selector-id="textarea"
|
|
160
184
|
data-test-id="TextareaComp"
|
|
@@ -165,7 +189,7 @@ exports[`Textarea component Should be render needBorder is false 1`] = `
|
|
|
165
189
|
exports[`Textarea component Should be render needReadOnlyStyle is false 1`] = `
|
|
166
190
|
<DocumentFragment>
|
|
167
191
|
<textarea
|
|
168
|
-
class=" container small default needBorder noresize effect borderColor_default"
|
|
192
|
+
class=" container small defaultWidth default needBorder noresize effect borderColor_default"
|
|
169
193
|
data-id="TextareaComp"
|
|
170
194
|
data-selector-id="textarea"
|
|
171
195
|
data-test-id="TextareaComp"
|
|
@@ -176,7 +200,7 @@ exports[`Textarea component Should be render needReadOnlyStyle is false 1`] = `
|
|
|
176
200
|
exports[`Textarea component Should be render placeholder 1`] = `
|
|
177
201
|
<DocumentFragment>
|
|
178
202
|
<textarea
|
|
179
|
-
class=" container small default needBorder noresize effect borderColor_default"
|
|
203
|
+
class=" container small defaultWidth default needBorder noresize effect borderColor_default"
|
|
180
204
|
data-id="TextareaComp"
|
|
181
205
|
data-selector-id="textarea"
|
|
182
206
|
data-test-id="TextareaComp"
|
|
@@ -185,10 +209,35 @@ exports[`Textarea component Should be render placeholder 1`] = `
|
|
|
185
209
|
</DocumentFragment>
|
|
186
210
|
`;
|
|
187
211
|
|
|
212
|
+
exports[`Textarea component Should be render rows and cols 1`] = `
|
|
213
|
+
<DocumentFragment>
|
|
214
|
+
<textarea
|
|
215
|
+
class=" container default needBorder noresize effect borderColor_default"
|
|
216
|
+
cols="3"
|
|
217
|
+
data-id="TextareaComp"
|
|
218
|
+
data-selector-id="textarea"
|
|
219
|
+
data-test-id="TextareaComp"
|
|
220
|
+
rows="3"
|
|
221
|
+
/>
|
|
222
|
+
</DocumentFragment>
|
|
223
|
+
`;
|
|
224
|
+
|
|
225
|
+
exports[`Textarea component Should be render rows only 1`] = `
|
|
226
|
+
<DocumentFragment>
|
|
227
|
+
<textarea
|
|
228
|
+
class=" container defaultWidth default needBorder noresize effect borderColor_default"
|
|
229
|
+
data-id="TextareaComp"
|
|
230
|
+
data-selector-id="textarea"
|
|
231
|
+
data-test-id="TextareaComp"
|
|
232
|
+
rows="3"
|
|
233
|
+
/>
|
|
234
|
+
</DocumentFragment>
|
|
235
|
+
`;
|
|
236
|
+
|
|
188
237
|
exports[`Textarea component Should be render text 1`] = `
|
|
189
238
|
<DocumentFragment>
|
|
190
239
|
<textarea
|
|
191
|
-
class=" container small default needBorder noresize effect borderColor_default"
|
|
240
|
+
class=" container small defaultWidth default needBorder noresize effect borderColor_default"
|
|
192
241
|
data-id="TextareaComp"
|
|
193
242
|
data-selector-id="textarea"
|
|
194
243
|
data-test-id="TextareaComp"
|
|
@@ -201,7 +250,7 @@ exports[`Textarea component Should be render text 1`] = `
|
|
|
201
250
|
exports[`Textarea component Should be render with the basic set of default props 1`] = `
|
|
202
251
|
<DocumentFragment>
|
|
203
252
|
<textarea
|
|
204
|
-
class=" container small default needBorder noresize effect borderColor_default"
|
|
253
|
+
class=" container small defaultWidth default needBorder noresize effect borderColor_default"
|
|
205
254
|
data-id="TextareaComp"
|
|
206
255
|
data-selector-id="textarea"
|
|
207
256
|
data-test-id="TextareaComp"
|
|
@@ -212,7 +261,7 @@ exports[`Textarea component Should be render with the basic set of default props
|
|
|
212
261
|
exports[`Textarea component Should render Varient - default 1`] = `
|
|
213
262
|
<DocumentFragment>
|
|
214
263
|
<textarea
|
|
215
|
-
class=" container small default needBorder noresize effect borderColor_default"
|
|
264
|
+
class=" container small defaultWidth default needBorder noresize effect borderColor_default"
|
|
216
265
|
data-id="TextareaComp"
|
|
217
266
|
data-selector-id="textarea"
|
|
218
267
|
data-test-id="TextareaComp"
|
|
@@ -223,7 +272,7 @@ exports[`Textarea component Should render Varient - default 1`] = `
|
|
|
223
272
|
exports[`Textarea component Should render Varient - primary 1`] = `
|
|
224
273
|
<DocumentFragment>
|
|
225
274
|
<textarea
|
|
226
|
-
class=" container small primary needBorder noresize effect borderColor_default"
|
|
275
|
+
class=" container small defaultWidth primary needBorder noresize effect borderColor_default"
|
|
227
276
|
data-id="TextareaComp"
|
|
228
277
|
data-selector-id="textarea"
|
|
229
278
|
data-test-id="TextareaComp"
|
|
@@ -234,7 +283,7 @@ exports[`Textarea component Should render Varient - primary 1`] = `
|
|
|
234
283
|
exports[`Textarea component Should render animated is false - large 1`] = `
|
|
235
284
|
<DocumentFragment>
|
|
236
285
|
<textarea
|
|
237
|
-
class=" container large default needBorder noresize effect borderColor_default"
|
|
286
|
+
class=" container large defaultWidth default needBorder noresize effect borderColor_default"
|
|
238
287
|
data-id="TextareaComp"
|
|
239
288
|
data-selector-id="textarea"
|
|
240
289
|
data-test-id="TextareaComp"
|
|
@@ -245,7 +294,7 @@ exports[`Textarea component Should render animated is false - large 1`] = `
|
|
|
245
294
|
exports[`Textarea component Should render animated is false - medium 1`] = `
|
|
246
295
|
<DocumentFragment>
|
|
247
296
|
<textarea
|
|
248
|
-
class=" container medium default needBorder noresize effect borderColor_default"
|
|
297
|
+
class=" container medium defaultWidth default needBorder noresize effect borderColor_default"
|
|
249
298
|
data-id="TextareaComp"
|
|
250
299
|
data-selector-id="textarea"
|
|
251
300
|
data-test-id="TextareaComp"
|
|
@@ -256,7 +305,7 @@ exports[`Textarea component Should render animated is false - medium 1`] = `
|
|
|
256
305
|
exports[`Textarea component Should render animated is false - small 1`] = `
|
|
257
306
|
<DocumentFragment>
|
|
258
307
|
<textarea
|
|
259
|
-
class=" container small default needBorder noresize effect borderColor_default"
|
|
308
|
+
class=" container small defaultWidth default needBorder noresize effect borderColor_default"
|
|
260
309
|
data-id="TextareaComp"
|
|
261
310
|
data-selector-id="textarea"
|
|
262
311
|
data-test-id="TextareaComp"
|
|
@@ -267,7 +316,7 @@ exports[`Textarea component Should render animated is false - small 1`] = `
|
|
|
267
316
|
exports[`Textarea component Should render animated is false - xmedium 1`] = `
|
|
268
317
|
<DocumentFragment>
|
|
269
318
|
<textarea
|
|
270
|
-
class=" container xmedium default needBorder noresize effect borderColor_default"
|
|
319
|
+
class=" container xmedium defaultWidth default needBorder noresize effect borderColor_default"
|
|
271
320
|
data-id="TextareaComp"
|
|
272
321
|
data-selector-id="textarea"
|
|
273
322
|
data-test-id="TextareaComp"
|
|
@@ -278,7 +327,7 @@ exports[`Textarea component Should render animated is false - xmedium 1`] = `
|
|
|
278
327
|
exports[`Textarea component Should render animated is false - xsmall 1`] = `
|
|
279
328
|
<DocumentFragment>
|
|
280
329
|
<textarea
|
|
281
|
-
class=" container xsmall default needBorder noresize effect borderColor_default"
|
|
330
|
+
class=" container xsmall defaultWidth default needBorder noresize effect borderColor_default"
|
|
282
331
|
data-id="TextareaComp"
|
|
283
332
|
data-selector-id="textarea"
|
|
284
333
|
data-test-id="TextareaComp"
|
|
@@ -289,7 +338,7 @@ exports[`Textarea component Should render animated is false - xsmall 1`] = `
|
|
|
289
338
|
exports[`Textarea component Should render animated is true - large 1`] = `
|
|
290
339
|
<DocumentFragment>
|
|
291
340
|
<textarea
|
|
292
|
-
class=" container large default needBorder noresize largeanimated effect borderColor_default"
|
|
341
|
+
class=" container large defaultWidth default needBorder noresize largeanimated effect borderColor_default"
|
|
293
342
|
data-id="TextareaComp"
|
|
294
343
|
data-selector-id="textarea"
|
|
295
344
|
data-test-id="TextareaComp"
|
|
@@ -300,7 +349,7 @@ exports[`Textarea component Should render animated is true - large 1`] = `
|
|
|
300
349
|
exports[`Textarea component Should render animated is true - medium 1`] = `
|
|
301
350
|
<DocumentFragment>
|
|
302
351
|
<textarea
|
|
303
|
-
class=" container medium default needBorder noresize undefined effect borderColor_default"
|
|
352
|
+
class=" container medium defaultWidth default needBorder noresize undefined effect borderColor_default"
|
|
304
353
|
data-id="TextareaComp"
|
|
305
354
|
data-selector-id="textarea"
|
|
306
355
|
data-test-id="TextareaComp"
|
|
@@ -311,7 +360,7 @@ exports[`Textarea component Should render animated is true - medium 1`] = `
|
|
|
311
360
|
exports[`Textarea component Should render animated is true - small 1`] = `
|
|
312
361
|
<DocumentFragment>
|
|
313
362
|
<textarea
|
|
314
|
-
class=" container small default needBorder noresize smallanimated effect borderColor_default"
|
|
363
|
+
class=" container small defaultWidth default needBorder noresize smallanimated effect borderColor_default"
|
|
315
364
|
data-id="TextareaComp"
|
|
316
365
|
data-selector-id="textarea"
|
|
317
366
|
data-test-id="TextareaComp"
|
|
@@ -322,7 +371,7 @@ exports[`Textarea component Should render animated is true - small 1`] = `
|
|
|
322
371
|
exports[`Textarea component Should render animated is true - xmedium 1`] = `
|
|
323
372
|
<DocumentFragment>
|
|
324
373
|
<textarea
|
|
325
|
-
class=" container xmedium default needBorder noresize xmediumanimated effect borderColor_default"
|
|
374
|
+
class=" container xmedium defaultWidth default needBorder noresize xmediumanimated effect borderColor_default"
|
|
326
375
|
data-id="TextareaComp"
|
|
327
376
|
data-selector-id="textarea"
|
|
328
377
|
data-test-id="TextareaComp"
|
|
@@ -333,7 +382,7 @@ exports[`Textarea component Should render animated is true - xmedium 1`] = `
|
|
|
333
382
|
exports[`Textarea component Should render animated is true - xsmall 1`] = `
|
|
334
383
|
<DocumentFragment>
|
|
335
384
|
<textarea
|
|
336
|
-
class=" container xsmall default needBorder noresize xsmallanimated effect borderColor_default"
|
|
385
|
+
class=" container xsmall defaultWidth default needBorder noresize xsmallanimated effect borderColor_default"
|
|
337
386
|
data-id="TextareaComp"
|
|
338
387
|
data-selector-id="textarea"
|
|
339
388
|
data-test-id="TextareaComp"
|
|
@@ -344,7 +393,7 @@ exports[`Textarea component Should render animated is true - xsmall 1`] = `
|
|
|
344
393
|
exports[`Textarea component Should render borderColor - default 1`] = `
|
|
345
394
|
<DocumentFragment>
|
|
346
395
|
<textarea
|
|
347
|
-
class=" container small default needBorder noresize effect borderColor_default"
|
|
396
|
+
class=" container small defaultWidth default needBorder noresize effect borderColor_default"
|
|
348
397
|
data-id="TextareaComp"
|
|
349
398
|
data-selector-id="textarea"
|
|
350
399
|
data-test-id="TextareaComp"
|
|
@@ -355,7 +404,7 @@ exports[`Textarea component Should render borderColor - default 1`] = `
|
|
|
355
404
|
exports[`Textarea component Should render borderColor - transparent 1`] = `
|
|
356
405
|
<DocumentFragment>
|
|
357
406
|
<textarea
|
|
358
|
-
class=" container small default needBorder noresize effect borderColor_transparent"
|
|
407
|
+
class=" container small defaultWidth default needBorder noresize effect borderColor_transparent"
|
|
359
408
|
data-id="TextareaComp"
|
|
360
409
|
data-selector-id="textarea"
|
|
361
410
|
data-test-id="TextareaComp"
|
|
@@ -366,7 +415,7 @@ exports[`Textarea component Should render borderColor - transparent 1`] = `
|
|
|
366
415
|
exports[`Textarea component Should render resize - both 1`] = `
|
|
367
416
|
<DocumentFragment>
|
|
368
417
|
<textarea
|
|
369
|
-
class=" container small default needBorder resizeboth effect borderColor_default"
|
|
418
|
+
class=" container small defaultWidth default needBorder resizeboth effect borderColor_default"
|
|
370
419
|
data-id="TextareaComp"
|
|
371
420
|
data-selector-id="textarea"
|
|
372
421
|
data-test-id="TextareaComp"
|
|
@@ -377,7 +426,7 @@ exports[`Textarea component Should render resize - both 1`] = `
|
|
|
377
426
|
exports[`Textarea component Should render resize - horizontal 1`] = `
|
|
378
427
|
<DocumentFragment>
|
|
379
428
|
<textarea
|
|
380
|
-
class=" container small default needBorder resizeX effect borderColor_default"
|
|
429
|
+
class=" container small defaultWidth default needBorder resizeX effect borderColor_default"
|
|
381
430
|
data-id="TextareaComp"
|
|
382
431
|
data-selector-id="textarea"
|
|
383
432
|
data-test-id="TextareaComp"
|
|
@@ -388,7 +437,7 @@ exports[`Textarea component Should render resize - horizontal 1`] = `
|
|
|
388
437
|
exports[`Textarea component Should render resize - none 1`] = `
|
|
389
438
|
<DocumentFragment>
|
|
390
439
|
<textarea
|
|
391
|
-
class=" container small default needBorder noresize effect borderColor_default"
|
|
440
|
+
class=" container small defaultWidth default needBorder noresize effect borderColor_default"
|
|
392
441
|
data-id="TextareaComp"
|
|
393
442
|
data-selector-id="textarea"
|
|
394
443
|
data-test-id="TextareaComp"
|
|
@@ -399,7 +448,7 @@ exports[`Textarea component Should render resize - none 1`] = `
|
|
|
399
448
|
exports[`Textarea component Should render resize - vertical 1`] = `
|
|
400
449
|
<DocumentFragment>
|
|
401
450
|
<textarea
|
|
402
|
-
class=" container small default needBorder resizeY effect borderColor_default"
|
|
451
|
+
class=" container small defaultWidth default needBorder resizeY effect borderColor_default"
|
|
403
452
|
data-id="TextareaComp"
|
|
404
453
|
data-selector-id="textarea"
|
|
405
454
|
data-test-id="TextareaComp"
|
|
@@ -410,7 +459,7 @@ exports[`Textarea component Should render resize - vertical 1`] = `
|
|
|
410
459
|
exports[`Textarea component Should render size - large 1`] = `
|
|
411
460
|
<DocumentFragment>
|
|
412
461
|
<textarea
|
|
413
|
-
class=" container large default needBorder noresize largeanimated effect borderColor_default"
|
|
462
|
+
class=" container large defaultWidth default needBorder noresize largeanimated effect borderColor_default"
|
|
414
463
|
data-id="TextareaComp"
|
|
415
464
|
data-selector-id="textarea"
|
|
416
465
|
data-test-id="TextareaComp"
|
|
@@ -421,7 +470,7 @@ exports[`Textarea component Should render size - large 1`] = `
|
|
|
421
470
|
exports[`Textarea component Should render size - medium 1`] = `
|
|
422
471
|
<DocumentFragment>
|
|
423
472
|
<textarea
|
|
424
|
-
class=" container medium default needBorder noresize undefined effect borderColor_default"
|
|
473
|
+
class=" container medium defaultWidth default needBorder noresize undefined effect borderColor_default"
|
|
425
474
|
data-id="TextareaComp"
|
|
426
475
|
data-selector-id="textarea"
|
|
427
476
|
data-test-id="TextareaComp"
|
|
@@ -432,7 +481,7 @@ exports[`Textarea component Should render size - medium 1`] = `
|
|
|
432
481
|
exports[`Textarea component Should render size - small 1`] = `
|
|
433
482
|
<DocumentFragment>
|
|
434
483
|
<textarea
|
|
435
|
-
class=" container small default needBorder noresize smallanimated effect borderColor_default"
|
|
484
|
+
class=" container small defaultWidth default needBorder noresize smallanimated effect borderColor_default"
|
|
436
485
|
data-id="TextareaComp"
|
|
437
486
|
data-selector-id="textarea"
|
|
438
487
|
data-test-id="TextareaComp"
|
|
@@ -443,7 +492,7 @@ exports[`Textarea component Should render size - small 1`] = `
|
|
|
443
492
|
exports[`Textarea component Should render size - xmedium 1`] = `
|
|
444
493
|
<DocumentFragment>
|
|
445
494
|
<textarea
|
|
446
|
-
class=" container xmedium default needBorder noresize xmediumanimated effect borderColor_default"
|
|
495
|
+
class=" container xmedium defaultWidth default needBorder noresize xmediumanimated effect borderColor_default"
|
|
447
496
|
data-id="TextareaComp"
|
|
448
497
|
data-selector-id="textarea"
|
|
449
498
|
data-test-id="TextareaComp"
|
|
@@ -454,7 +503,7 @@ exports[`Textarea component Should render size - xmedium 1`] = `
|
|
|
454
503
|
exports[`Textarea component Should render size - xsmall 1`] = `
|
|
455
504
|
<DocumentFragment>
|
|
456
505
|
<textarea
|
|
457
|
-
class=" container xsmall default needBorder noresize xsmallanimated effect borderColor_default"
|
|
506
|
+
class=" container xsmall defaultWidth default needBorder noresize xsmallanimated effect borderColor_default"
|
|
458
507
|
data-id="TextareaComp"
|
|
459
508
|
data-selector-id="textarea"
|
|
460
509
|
data-test-id="TextareaComp"
|
|
@@ -467,7 +516,7 @@ exports[`Textarea component rendering ally clearLabel 1`] = `
|
|
|
467
516
|
<textarea
|
|
468
517
|
aria-label="TextAreaAriaLabel"
|
|
469
518
|
aria-labelledby="TexareaAriaLabelledby"
|
|
470
|
-
class=" container small default needBorder noresize effect borderColor_default"
|
|
519
|
+
class=" container small defaultWidth default needBorder noresize effect borderColor_default"
|
|
471
520
|
data-id="TextareaComp"
|
|
472
521
|
data-selector-id="textarea"
|
|
473
522
|
data-test-id="TextareaComp"
|
|
@@ -20,7 +20,7 @@ export const propTypes = {
|
|
|
20
20
|
onKeyDown: PropTypes.func,
|
|
21
21
|
placeHolder: PropTypes.string,
|
|
22
22
|
resize: PropTypes.oneOf(['horizontal', 'vertical', 'both', 'none']),
|
|
23
|
-
size: PropTypes.oneOf(['xsmall', 'small', 'xmedium', 'medium', 'large']),
|
|
23
|
+
size: PropTypes.oneOf(['xsmall', 'small', 'xmedium', 'medium', 'large', 'default']),
|
|
24
24
|
text: PropTypes.string,
|
|
25
25
|
variant: PropTypes.oneOf(['default', 'primary']),
|
|
26
26
|
customClass: PropTypes.string,
|
|
@@ -28,5 +28,8 @@ export const propTypes = {
|
|
|
28
28
|
ariaLabel: PropTypes.string,
|
|
29
29
|
ariaLabelledby: PropTypes.string
|
|
30
30
|
}),
|
|
31
|
-
isFocus: PropTypes.bool
|
|
31
|
+
isFocus: PropTypes.bool,
|
|
32
|
+
rows: PropTypes.number,
|
|
33
|
+
cols: PropTypes.number,
|
|
34
|
+
customAttributes: PropTypes.object
|
|
32
35
|
};
|
|
@@ -81,7 +81,7 @@ const ListItem = props => {
|
|
|
81
81
|
autoHover: autoHover,
|
|
82
82
|
needTick: needTick,
|
|
83
83
|
needBorder: needBorder,
|
|
84
|
-
customClass:
|
|
84
|
+
customClass: customListItem,
|
|
85
85
|
dataId: dataIdString,
|
|
86
86
|
dataSelectorId: `${dataSelectorId}`,
|
|
87
87
|
isLink: isLink,
|
|
@@ -549,8 +549,7 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
|
|
|
549
549
|
role: 'option'
|
|
550
550
|
},
|
|
551
551
|
dataId: `${dataIdMultiSelectComp}_Options`,
|
|
552
|
-
...SuggestionsProps
|
|
553
|
-
needMultiLineText: true
|
|
552
|
+
...SuggestionsProps
|
|
554
553
|
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
555
554
|
isLoading: isFetchingOptions,
|
|
556
555
|
options: options,
|
|
@@ -1002,12 +1002,8 @@ export class MultiSelectComponent extends React.Component {
|
|
|
1002
1002
|
boxSize,
|
|
1003
1003
|
isLoading,
|
|
1004
1004
|
selectAllText,
|
|
1005
|
-
needSelectAll
|
|
1006
|
-
customProps
|
|
1005
|
+
needSelectAll
|
|
1007
1006
|
} = this.props;
|
|
1008
|
-
const {
|
|
1009
|
-
suggestionsProps = {}
|
|
1010
|
-
} = customProps;
|
|
1011
1007
|
const {
|
|
1012
1008
|
selectedOptions,
|
|
1013
1009
|
searchStr,
|
|
@@ -1097,8 +1093,7 @@ export class MultiSelectComponent extends React.Component {
|
|
|
1097
1093
|
selectedOptions: selectedOptionIds,
|
|
1098
1094
|
a11y: {
|
|
1099
1095
|
role: 'option'
|
|
1100
|
-
}
|
|
1101
|
-
...suggestionsProps
|
|
1096
|
+
}
|
|
1102
1097
|
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
1103
1098
|
isLoading: isFetchingOptions,
|
|
1104
1099
|
options: options,
|