@zohodesk/components 1.0.0-temp-199.10 → 1.0.0-temp-199.11
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 +4 -0
- package/es/ListItem/ListContainer.js +3 -2
- package/es/ListItem/ListItem.js +2 -1
- 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 +4 -6
- package/es/MultiSelect/props/propTypes.js +3 -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 +3 -2
- package/es/Textarea/Textarea.js +9 -3
- package/es/Textarea/Textarea.module.css +10 -2
- package/es/Textarea/__tests__/Textarea.spec.js +20 -0
- package/es/Textarea/__tests__/__snapshots__/Textarea.spec.js.snap +25 -0
- 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/ListItem/ListContainer.js +3 -2
- package/lib/ListItem/ListItem.js +2 -1
- 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 +2 -2
- package/lib/MultiSelect/MultiSelect.js +2 -3
- package/lib/MultiSelect/Suggestions.js +5 -7
- package/lib/MultiSelect/props/propTypes.js +3 -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 +3 -2
- package/lib/Textarea/Textarea.js +9 -4
- package/lib/Textarea/Textarea.module.css +10 -2
- package/lib/Textarea/__tests__/Textarea.spec.js +20 -0
- package/lib/Textarea/__tests__/__snapshots__/Textarea.spec.js.snap +25 -0
- 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 +4 -4
- package/result.json +1 -1
|
@@ -31,7 +31,8 @@ const ListContainer = props => {
|
|
|
31
31
|
onClick,
|
|
32
32
|
onMouseEnter,
|
|
33
33
|
onMouseOver,
|
|
34
|
-
eleRef
|
|
34
|
+
eleRef,
|
|
35
|
+
align
|
|
35
36
|
} = props;
|
|
36
37
|
const responsiveFunc = useCallback(_ref => {
|
|
37
38
|
let {
|
|
@@ -77,7 +78,7 @@ const ListContainer = props => {
|
|
|
77
78
|
"aria-selected": ariaSelected,
|
|
78
79
|
"aria-label": ariaLabel,
|
|
79
80
|
isCover: false,
|
|
80
|
-
align:
|
|
81
|
+
align: align,
|
|
81
82
|
alignBox: "row",
|
|
82
83
|
className: `${style.list} ${style[size]} ${mobileToTab && isTouchDevice ? style.responsiveHeight : ''} ${style[palette]} ${active ? style[`active${palette}`] : highlight && !isDisabled ? style[`${palette}Hover`] : ''} ${autoHover && !isDisabled ? style[`${palette}Effect`] : ''} ${needTick ? style[`${size}withTick`] : ''} ${isDisabled ? CssProvider('isDisable') : ''} ${needBorder ? active ? style.activewithBorder : style.withBorder : ''} ${customClass}`,
|
|
83
84
|
dataId: dataId,
|
package/es/ListItem/ListItem.js
CHANGED
|
@@ -100,7 +100,8 @@ export default class ListItem extends React.Component {
|
|
|
100
100
|
autoHover: autoHover,
|
|
101
101
|
needTick: needTick,
|
|
102
102
|
needBorder: needBorder,
|
|
103
|
-
customClass: `${needMultiLineText ? style.
|
|
103
|
+
customClass: `${needMultiLineText ? style.autoHeight : ''} ${customListItem}`,
|
|
104
|
+
align: needMultiLineText ? 'baseline' : 'vertical',
|
|
104
105
|
dataId: dataIdString,
|
|
105
106
|
dataSelectorId: `${dataSelectorId}`,
|
|
106
107
|
isLink: isLink,
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
line-height: 1.5385;
|
|
74
74
|
}
|
|
75
75
|
.multiLineValue{
|
|
76
|
-
composes:
|
|
76
|
+
composes: lineClamp from '../common/common.module.css';
|
|
77
77
|
}
|
|
78
78
|
.iconBox {
|
|
79
79
|
width: var(--zd_size20) ;
|
|
@@ -203,15 +203,12 @@
|
|
|
203
203
|
padding-bottom: var(--zd_size10) ;
|
|
204
204
|
}
|
|
205
205
|
.autoHeight {
|
|
206
|
-
|
|
206
|
+
--listitem_height: auto;
|
|
207
207
|
}
|
|
208
208
|
.tickIconCenter {
|
|
209
209
|
top: 50% ;
|
|
210
210
|
transform: translateY(-50%);
|
|
211
211
|
}
|
|
212
|
-
.
|
|
213
|
-
align-
|
|
214
|
-
}
|
|
215
|
-
.alignSelfTop {
|
|
216
|
-
align-self: start;
|
|
212
|
+
.alignItemBaseline {
|
|
213
|
+
align-self: baseline;
|
|
217
214
|
}
|
|
@@ -118,7 +118,7 @@ export default class ListItemWithAvatar extends React.PureComponent {
|
|
|
118
118
|
customProps: ListItemProps,
|
|
119
119
|
...ContainerProps
|
|
120
120
|
}, name || imgSrc ? /*#__PURE__*/React.createElement(Box, {
|
|
121
|
-
className: `${needMultiLineText ? style.
|
|
121
|
+
className: `${needMultiLineText ? style.alignItemBaseline : ''} ${style.leftAvatar}`
|
|
122
122
|
}, isTeam ? /*#__PURE__*/React.createElement(AvatarTeam, {
|
|
123
123
|
name: name,
|
|
124
124
|
size: "small",
|
|
@@ -95,7 +95,8 @@ export default class ListItemWithIcon extends React.Component {
|
|
|
95
95
|
autoHover: autoHover,
|
|
96
96
|
needTick: needTick,
|
|
97
97
|
needBorder: needBorder,
|
|
98
|
-
customClass: `${needMultiLineText ? style.autoHeight : ''} ${
|
|
98
|
+
customClass: `${needMultiLineText ? style.autoHeight : ''} ${customClass}`,
|
|
99
|
+
align: needMultiLineText && iconClass && !iconName ? 'baseline' : 'vertical',
|
|
99
100
|
dataId: dataIdString,
|
|
100
101
|
dataSelectorId: dataSelectorId,
|
|
101
102
|
isLink: isLink,
|
|
@@ -12,7 +12,8 @@ export const ListContainerDefaultProps = {
|
|
|
12
12
|
customClass: '',
|
|
13
13
|
customProps: {},
|
|
14
14
|
dataSelectorId: 'listContainer',
|
|
15
|
-
needMultiLineText: false
|
|
15
|
+
needMultiLineText: false,
|
|
16
|
+
align: 'vertical'
|
|
16
17
|
};
|
|
17
18
|
export const ListItemDefaultProps = {
|
|
18
19
|
active: false,
|
|
@@ -27,7 +27,8 @@ export const ListContainer_Props = {
|
|
|
27
27
|
}),
|
|
28
28
|
customClass: PropTypes.string,
|
|
29
29
|
customProps: PropTypes.object,
|
|
30
|
-
eleRef: PropTypes.func
|
|
30
|
+
eleRef: PropTypes.func,
|
|
31
|
+
align: PropTypes.string
|
|
31
32
|
};
|
|
32
33
|
export const ListItem_Props = {
|
|
33
34
|
active: PropTypes.bool,
|
|
@@ -880,7 +880,7 @@ class AdvancedGroupMultiSelect extends React.Component {
|
|
|
880
880
|
customProps
|
|
881
881
|
} = this.props;
|
|
882
882
|
const {
|
|
883
|
-
|
|
883
|
+
SuggestionsProps
|
|
884
884
|
} = customProps;
|
|
885
885
|
let {
|
|
886
886
|
clearText = 'Clear all'
|
|
@@ -1062,7 +1062,7 @@ class AdvancedGroupMultiSelect extends React.Component {
|
|
|
1062
1062
|
role: 'option'
|
|
1063
1063
|
},
|
|
1064
1064
|
dataId: `${dataId}_Options`,
|
|
1065
|
-
...
|
|
1065
|
+
...SuggestionsProps
|
|
1066
1066
|
}));
|
|
1067
1067
|
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
1068
1068
|
options: revampedGroups,
|
|
@@ -1015,7 +1015,7 @@ export class MultiSelectComponent extends React.Component {
|
|
|
1015
1015
|
customProps
|
|
1016
1016
|
} = this.props;
|
|
1017
1017
|
const {
|
|
1018
|
-
|
|
1018
|
+
SuggestionsProps
|
|
1019
1019
|
} = customProps;
|
|
1020
1020
|
const {
|
|
1021
1021
|
selectedOptions,
|
|
@@ -1107,7 +1107,7 @@ export class MultiSelectComponent extends React.Component {
|
|
|
1107
1107
|
a11y: {
|
|
1108
1108
|
role: 'option'
|
|
1109
1109
|
},
|
|
1110
|
-
...
|
|
1110
|
+
...SuggestionsProps
|
|
1111
1111
|
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
1112
1112
|
isLoading: isFetchingOptions,
|
|
1113
1113
|
options: options,
|
|
@@ -69,6 +69,7 @@ export default class Suggestions extends React.PureComponent {
|
|
|
69
69
|
});
|
|
70
70
|
const commonProps = {
|
|
71
71
|
isDisabled,
|
|
72
|
+
needMultiLineText: needMultiLineText,
|
|
72
73
|
...listItemCustomProps
|
|
73
74
|
};
|
|
74
75
|
|
|
@@ -98,8 +99,7 @@ export default class Suggestions extends React.PureComponent {
|
|
|
98
99
|
size: listItemSize,
|
|
99
100
|
avatarPalette: avatarPalette,
|
|
100
101
|
palette: palette,
|
|
101
|
-
a11y: list_a11y
|
|
102
|
-
needMultiLineText: needMultiLineText
|
|
102
|
+
a11y: list_a11y
|
|
103
103
|
});
|
|
104
104
|
} else if (optionType === 'icon') {
|
|
105
105
|
return /*#__PURE__*/React.createElement(ListItemWithIcon, { ...commonProps,
|
|
@@ -119,8 +119,7 @@ export default class Suggestions extends React.PureComponent {
|
|
|
119
119
|
iconSize: iconSize,
|
|
120
120
|
size: listItemSize,
|
|
121
121
|
palette: palette,
|
|
122
|
-
a11y: list_a11y
|
|
123
|
-
needMultiLineText: needMultiLineText
|
|
122
|
+
a11y: list_a11y
|
|
124
123
|
});
|
|
125
124
|
}
|
|
126
125
|
|
|
@@ -139,8 +138,7 @@ export default class Suggestions extends React.PureComponent {
|
|
|
139
138
|
active: isActive,
|
|
140
139
|
size: listItemSize,
|
|
141
140
|
palette: palette,
|
|
142
|
-
a11y: list_a11y
|
|
143
|
-
needMultiLineText: needMultiLineText
|
|
141
|
+
a11y: list_a11y
|
|
144
142
|
});
|
|
145
143
|
})));
|
|
146
144
|
}
|
|
@@ -254,7 +254,9 @@ export const AdvancedGroupMultiSelect_propTypes = {
|
|
|
254
254
|
children: PropTypes.node,
|
|
255
255
|
dataSelectorId: PropTypes.string,
|
|
256
256
|
isFocus: PropTypes.bool,
|
|
257
|
-
customProps: PropTypes.
|
|
257
|
+
customProps: PropTypes.shape({
|
|
258
|
+
suggestionsProps: PropTypes.object
|
|
259
|
+
})
|
|
258
260
|
};
|
|
259
261
|
export const AdvancedMultiSelect_propTypes = { ...MultiSelect_propTypes,
|
|
260
262
|
selectedOptionDetails: PropTypes.string,
|
package/es/Select/GroupSelect.js
CHANGED
|
@@ -592,7 +592,7 @@ export class GroupSelectComponent extends PureComponent {
|
|
|
592
592
|
customProps
|
|
593
593
|
} = this.props;
|
|
594
594
|
const {
|
|
595
|
-
|
|
595
|
+
SuggestionsProps = {}
|
|
596
596
|
} = customProps;
|
|
597
597
|
i18nKeys = Object.assign({}, i18nKeys, {
|
|
598
598
|
emptyText: i18nKeys.emptyText || emptyMessage,
|
|
@@ -793,7 +793,7 @@ export class GroupSelectComponent extends PureComponent {
|
|
|
793
793
|
role: 'option'
|
|
794
794
|
},
|
|
795
795
|
dataId: `${dataId}_Options`,
|
|
796
|
-
...
|
|
796
|
+
...SuggestionsProps
|
|
797
797
|
}));
|
|
798
798
|
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
799
799
|
options: revampedGroups,
|
|
@@ -167,7 +167,7 @@ class SelectWithAvatarComponent extends SelectComponent {
|
|
|
167
167
|
customProps
|
|
168
168
|
} = this.props;
|
|
169
169
|
const {
|
|
170
|
-
|
|
170
|
+
SuggestionsProps = {}
|
|
171
171
|
} = customProps;
|
|
172
172
|
i18nKeys = Object.assign({}, i18nKeys, {
|
|
173
173
|
emptyText: i18nKeys.emptyText || emptyMessage,
|
|
@@ -326,7 +326,7 @@ class SelectWithAvatarComponent extends SelectComponent {
|
|
|
326
326
|
ariaParentRole: 'listbox',
|
|
327
327
|
role: 'option'
|
|
328
328
|
},
|
|
329
|
-
...
|
|
329
|
+
...SuggestionsProps
|
|
330
330
|
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
331
331
|
isLoading: isFetchingOptions,
|
|
332
332
|
options: options,
|
|
@@ -368,7 +368,7 @@ class SelectWithIcon extends Component {
|
|
|
368
368
|
TextBoxProps = {},
|
|
369
369
|
DropdownSearchTextBoxProps = {},
|
|
370
370
|
TextBoxIconProps = {},
|
|
371
|
-
|
|
371
|
+
ListItemProps = {}
|
|
372
372
|
} = customProps;
|
|
373
373
|
return /*#__PURE__*/React.createElement("div", {
|
|
374
374
|
className: `${style.container} ${style[`box_${size}`]} ${isReadOnly ? style.readonly : ''} ${borderColor === 'transparent' ? style.transparentContainer : ''}`,
|
|
@@ -532,7 +532,7 @@ class SelectWithIcon extends Component {
|
|
|
532
532
|
ariaSelected: selectedId === options[idKey],
|
|
533
533
|
ariaLabel: options[valueKey]
|
|
534
534
|
},
|
|
535
|
-
...
|
|
535
|
+
...ListItemProps
|
|
536
536
|
});
|
|
537
537
|
})) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
538
538
|
isLoading: isFetchingOptions,
|
|
@@ -241,7 +241,7 @@ 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.object
|
|
245
245
|
};
|
|
246
246
|
export const SelectWithIcon_propTypes = {
|
|
247
247
|
animationStyle: PropTypes.oneOf(['default', 'bounce']),
|
|
@@ -303,6 +303,7 @@ export const SelectWithIcon_propTypes = {
|
|
|
303
303
|
customProps: PropTypes.shape({
|
|
304
304
|
TextBoxProps: PropTypes.object,
|
|
305
305
|
DropdownSearchTextBoxProps: PropTypes.object,
|
|
306
|
-
TextBoxIconProps: PropTypes.object
|
|
306
|
+
TextBoxIconProps: PropTypes.object,
|
|
307
|
+
ListItemProps: PropTypes.object
|
|
307
308
|
})
|
|
308
309
|
};
|
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] : ''} ${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);
|
|
@@ -138,3 +139,10 @@
|
|
|
138
139
|
composes: semibold from '../common/common.module.css';
|
|
139
140
|
--textarea_text_color: var(--zdt_textarea_black_text);
|
|
140
141
|
}
|
|
142
|
+
.xsmall,
|
|
143
|
+
.small,
|
|
144
|
+
.xmedium,
|
|
145
|
+
.medium,
|
|
146
|
+
.large {
|
|
147
|
+
--textarea_width: 100%;
|
|
148
|
+
}
|
|
@@ -225,4 +225,24 @@ 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 custom Attributes ', () => {
|
|
239
|
+
const {
|
|
240
|
+
asFragment
|
|
241
|
+
} = render( /*#__PURE__*/React.createElement(Textarea, {
|
|
242
|
+
customAttributes: {
|
|
243
|
+
disabled: true
|
|
244
|
+
}
|
|
245
|
+
}));
|
|
246
|
+
expect(asFragment()).toMatchSnapshot();
|
|
247
|
+
});
|
|
228
248
|
});
|
|
@@ -11,6 +11,18 @@ exports[`Textarea component Should be render autofocus true 1`] = `
|
|
|
11
11
|
</DocumentFragment>
|
|
12
12
|
`;
|
|
13
13
|
|
|
14
|
+
exports[`Textarea component Should be render custom Attributes 1`] = `
|
|
15
|
+
<DocumentFragment>
|
|
16
|
+
<textarea
|
|
17
|
+
class=" container small default needBorder noresize effect borderColor_default"
|
|
18
|
+
data-id="TextareaComp"
|
|
19
|
+
data-selector-id="textarea"
|
|
20
|
+
data-test-id="TextareaComp"
|
|
21
|
+
disabled=""
|
|
22
|
+
/>
|
|
23
|
+
</DocumentFragment>
|
|
24
|
+
`;
|
|
25
|
+
|
|
14
26
|
exports[`Textarea component Should be render customClass 1`] = `
|
|
15
27
|
<DocumentFragment>
|
|
16
28
|
<textarea
|
|
@@ -185,6 +197,19 @@ exports[`Textarea component Should be render placeholder 1`] = `
|
|
|
185
197
|
</DocumentFragment>
|
|
186
198
|
`;
|
|
187
199
|
|
|
200
|
+
exports[`Textarea component Should be render rows and cols 1`] = `
|
|
201
|
+
<DocumentFragment>
|
|
202
|
+
<textarea
|
|
203
|
+
class=" container default needBorder noresize effect borderColor_default"
|
|
204
|
+
cols="3"
|
|
205
|
+
data-id="TextareaComp"
|
|
206
|
+
data-selector-id="textarea"
|
|
207
|
+
data-test-id="TextareaComp"
|
|
208
|
+
rows="3"
|
|
209
|
+
/>
|
|
210
|
+
</DocumentFragment>
|
|
211
|
+
`;
|
|
212
|
+
|
|
188
213
|
exports[`Textarea component Should be render text 1`] = `
|
|
189
214
|
<DocumentFragment>
|
|
190
215
|
<textarea
|
|
@@ -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,
|
|
@@ -27,8 +27,7 @@ export default class Suggestions extends React.PureComponent {
|
|
|
27
27
|
avatarPalette,
|
|
28
28
|
palette,
|
|
29
29
|
htmlId,
|
|
30
|
-
a11y
|
|
31
|
-
needMultiLineText
|
|
30
|
+
a11y
|
|
32
31
|
} = this.props;
|
|
33
32
|
const {
|
|
34
33
|
ariaParentRole,
|
|
@@ -93,8 +92,7 @@ export default class Suggestions extends React.PureComponent {
|
|
|
93
92
|
size: listItemSize,
|
|
94
93
|
avatarPalette: avatarPalette,
|
|
95
94
|
palette: palette,
|
|
96
|
-
a11y: list_a11y
|
|
97
|
-
needMultiLineText: needMultiLineText
|
|
95
|
+
a11y: list_a11y
|
|
98
96
|
});
|
|
99
97
|
} else if (optionType === 'icon') {
|
|
100
98
|
return /*#__PURE__*/React.createElement(ListItemWithIcon, { ...commonProps,
|
|
@@ -114,8 +112,7 @@ export default class Suggestions extends React.PureComponent {
|
|
|
114
112
|
iconSize: iconSize,
|
|
115
113
|
size: listItemSize,
|
|
116
114
|
palette: palette,
|
|
117
|
-
a11y: list_a11y
|
|
118
|
-
needMultiLineText: needMultiLineText
|
|
115
|
+
a11y: list_a11y
|
|
119
116
|
});
|
|
120
117
|
}
|
|
121
118
|
|
|
@@ -134,8 +131,7 @@ export default class Suggestions extends React.PureComponent {
|
|
|
134
131
|
active: isActive,
|
|
135
132
|
size: listItemSize,
|
|
136
133
|
palette: palette,
|
|
137
|
-
a11y: list_a11y
|
|
138
|
-
needMultiLineText: needMultiLineText
|
|
134
|
+
a11y: list_a11y
|
|
139
135
|
});
|
|
140
136
|
})));
|
|
141
137
|
}
|
|
@@ -117,8 +117,7 @@ export const MultiSelect_defaultProps = {
|
|
|
117
117
|
keepSelectedOptions: false,
|
|
118
118
|
selectedOptionsCount: 0,
|
|
119
119
|
cardHeaderName: '',
|
|
120
|
-
needResponsive: true
|
|
121
|
-
customProps: {}
|
|
120
|
+
needResponsive: true
|
|
122
121
|
};
|
|
123
122
|
export const MultiSelectHeader_defaultProps = {
|
|
124
123
|
dataId: 'MultiSelectHeader'
|
|
@@ -162,6 +161,5 @@ export const SelectedOptions_defaultProps = {
|
|
|
162
161
|
dataId: 'selectedOptions'
|
|
163
162
|
};
|
|
164
163
|
export const Suggestions_defaultProps = {
|
|
165
|
-
a11y: {}
|
|
166
|
-
needMultiLineText: false
|
|
164
|
+
a11y: {}
|
|
167
165
|
};
|
|
@@ -108,10 +108,7 @@ export const MultiSelect_propTypes = {
|
|
|
108
108
|
needSelectAll: PropTypes.bool,
|
|
109
109
|
selectAllText: PropTypes.string,
|
|
110
110
|
setAriaId: PropTypes.string,
|
|
111
|
-
ariaErrorId: PropTypes.string
|
|
112
|
-
customProps: {
|
|
113
|
-
suggestionsProps: PropTypes.object
|
|
114
|
-
}
|
|
111
|
+
ariaErrorId: PropTypes.string
|
|
115
112
|
};
|
|
116
113
|
export const MultiSelectHeader_propTypes = {
|
|
117
114
|
dataId: PropTypes.string,
|
|
@@ -176,8 +173,7 @@ export const Suggestions_propTypes = {
|
|
|
176
173
|
logo: PropTypes.string,
|
|
177
174
|
optionType: PropTypes.string,
|
|
178
175
|
listItemProps: PropTypes.object
|
|
179
|
-
}))
|
|
180
|
-
needMultiLineText: PropTypes.bool
|
|
176
|
+
}))
|
|
181
177
|
};
|
|
182
178
|
export const AdvancedGroupMultiSelect_propTypes = {
|
|
183
179
|
animationStyle: PropTypes.string,
|
|
@@ -590,12 +590,8 @@ export class GroupSelectComponent extends PureComponent {
|
|
|
590
590
|
htmlId,
|
|
591
591
|
iconOnHover,
|
|
592
592
|
isLoading,
|
|
593
|
-
dataSelectorId
|
|
594
|
-
customProps
|
|
593
|
+
dataSelectorId
|
|
595
594
|
} = this.props;
|
|
596
|
-
const {
|
|
597
|
-
suggestionsProps = {}
|
|
598
|
-
} = customProps;
|
|
599
595
|
i18nKeys = Object.assign({}, i18nKeys, {
|
|
600
596
|
emptyText: i18nKeys.emptyText || emptyMessage,
|
|
601
597
|
searchEmptyText: i18nKeys.searchEmptyText || searchEmptyMessage
|
|
@@ -788,8 +784,7 @@ export class GroupSelectComponent extends PureComponent {
|
|
|
788
784
|
ariaParentRole: 'listbox',
|
|
789
785
|
role: 'option'
|
|
790
786
|
},
|
|
791
|
-
dataId: `${dataId}_Options
|
|
792
|
-
...suggestionsProps
|
|
787
|
+
dataId: `${dataId}_Options`
|
|
793
788
|
}));
|
|
794
789
|
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
795
790
|
options: revampedGroups,
|
|
@@ -163,12 +163,8 @@ class SelectWithAvatarComponent extends SelectComponent {
|
|
|
163
163
|
needEffect,
|
|
164
164
|
isLoading,
|
|
165
165
|
dataSelectorId,
|
|
166
|
-
getTargetRef
|
|
167
|
-
customProps
|
|
166
|
+
getTargetRef
|
|
168
167
|
} = this.props;
|
|
169
|
-
const {
|
|
170
|
-
suggestionsProps = {}
|
|
171
|
-
} = customProps;
|
|
172
168
|
i18nKeys = Object.assign({}, i18nKeys, {
|
|
173
169
|
emptyText: i18nKeys.emptyText || emptyMessage,
|
|
174
170
|
searchEmptyText: i18nKeys.searchEmptyText || searchEmptyMessage
|
|
@@ -325,8 +321,7 @@ class SelectWithAvatarComponent extends SelectComponent {
|
|
|
325
321
|
a11y: {
|
|
326
322
|
ariaParentRole: 'listbox',
|
|
327
323
|
role: 'option'
|
|
328
|
-
}
|
|
329
|
-
...suggestionsProps
|
|
324
|
+
}
|
|
330
325
|
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
331
326
|
isLoading: isFetchingOptions,
|
|
332
327
|
options: options,
|
|
@@ -69,8 +69,7 @@ export const GroupSelect_defaultProps = {
|
|
|
69
69
|
isRestrictScroll: false,
|
|
70
70
|
i18nKeys: {},
|
|
71
71
|
iconOnHover: false,
|
|
72
|
-
isLoading: false
|
|
73
|
-
customProps: {}
|
|
72
|
+
isLoading: false
|
|
74
73
|
};
|
|
75
74
|
export const SelectWithAvatar_defaultProps = {
|
|
76
75
|
animationStyle: 'bounce',
|
|
@@ -96,8 +95,7 @@ export const SelectWithAvatar_defaultProps = {
|
|
|
96
95
|
isRestrictScroll: false,
|
|
97
96
|
i18nKeys: {},
|
|
98
97
|
needEffect: true,
|
|
99
|
-
isLoading: false
|
|
100
|
-
customProps: {}
|
|
98
|
+
isLoading: false
|
|
101
99
|
};
|
|
102
100
|
export const SelectWithIcon_defaultProps = {
|
|
103
101
|
isReadOnly: false,
|
|
@@ -174,10 +174,7 @@ export const GroupSelect_propTypes = {
|
|
|
174
174
|
}),
|
|
175
175
|
isLoading: PropTypes.bool,
|
|
176
176
|
dataSelectorId: PropTypes.string,
|
|
177
|
-
isDefaultSelectValue: PropTypes.bool
|
|
178
|
-
customProps: PropTypes.shape({
|
|
179
|
-
suggestionsProps: PropTypes.object
|
|
180
|
-
})
|
|
177
|
+
isDefaultSelectValue: PropTypes.bool
|
|
181
178
|
};
|
|
182
179
|
export const SelectWithAvatar_propTypes = { ...Select_propTypes,
|
|
183
180
|
textBoxClass: PropTypes.string,
|
|
@@ -238,8 +235,7 @@ export const SelectWithAvatar_propTypes = { ...Select_propTypes,
|
|
|
238
235
|
htmlId: PropTypes.string,
|
|
239
236
|
needEffect: PropTypes.bool,
|
|
240
237
|
isLoading: PropTypes.bool,
|
|
241
|
-
dataSelectorId: PropTypes.string
|
|
242
|
-
customProps: PropTypes.object
|
|
238
|
+
dataSelectorId: PropTypes.string
|
|
243
239
|
};
|
|
244
240
|
export const SelectWithIcon_propTypes = {
|
|
245
241
|
animationStyle: PropTypes.oneOf(['default', 'bounce']),
|