@zohodesk/components 1.0.0-temp-219 → 1.0.0-temp-199.6
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/Button/Button.js +2 -10
- package/es/ListItem/ListItem.js +2 -2
- package/es/ListItem/ListItem.module.css +85 -18
- package/es/ListItem/ListItemWithAvatar.js +3 -3
- package/es/ListItem/ListItemWithIcon.js +2 -2
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +7 -2
- package/es/MultiSelect/AdvancedMultiSelect.js +2 -1
- package/es/MultiSelect/MultiSelect.js +7 -2
- package/es/MultiSelect/Suggestions.js +8 -4
- package/es/MultiSelect/props/defaultProps.js +6 -4
- package/es/MultiSelect/props/propTypes.js +6 -3
- package/es/Select/GroupSelect.js +5 -1
- package/es/Select/Select.js +1 -4
- package/es/Select/SelectWithAvatar.js +7 -2
- package/es/Select/SelectWithIcon.js +4 -2
- package/es/Select/props/defaultProps.js +2 -1
- package/es/Select/props/propTypes.js +4 -2
- package/es/Switch/Switch.js +2 -11
- package/es/TextBox/TextBox.js +2 -9
- package/es/v1/ListItem/ListItem.js +1 -1
- package/es/v1/MultiSelect/AdvancedMultiSelect.js +2 -1
- package/es/v1/MultiSelect/MultiSelect.js +7 -2
- package/es/v1/MultiSelect/Suggestions.js +8 -4
- package/es/v1/MultiSelect/props/defaultProps.js +4 -2
- package/es/v1/MultiSelect/props/propTypes.js +6 -2
- package/es/v1/Select/GroupSelect.js +7 -2
- package/es/v1/Select/SelectWithAvatar.js +7 -2
- package/es/v1/Select/props/defaultProps.js +4 -2
- package/es/v1/Select/props/propTypes.js +6 -2
- package/lib/Button/Button.js +2 -12
- package/lib/ListItem/ListItem.js +2 -2
- package/lib/ListItem/ListItem.module.css +85 -18
- package/lib/ListItem/ListItemWithAvatar.js +3 -3
- package/lib/ListItem/ListItemWithIcon.js +2 -2
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +7 -3
- package/lib/MultiSelect/AdvancedMultiSelect.js +3 -1
- package/lib/MultiSelect/MultiSelect.js +6 -3
- package/lib/MultiSelect/Suggestions.js +8 -4
- package/lib/MultiSelect/props/defaultProps.js +6 -4
- package/lib/MultiSelect/props/propTypes.js +5 -3
- package/lib/Select/GroupSelect.js +4 -2
- package/lib/Select/Select.js +1 -7
- package/lib/Select/SelectWithAvatar.js +8 -3
- package/lib/Select/SelectWithIcon.js +5 -3
- package/lib/Select/props/defaultProps.js +2 -1
- package/lib/Select/props/propTypes.js +4 -2
- package/lib/Switch/Switch.js +2 -11
- package/lib/TextBox/TextBox.js +2 -9
- package/lib/v1/ListItem/ListItem.js +1 -1
- package/lib/v1/MultiSelect/AdvancedMultiSelect.js +3 -1
- package/lib/v1/MultiSelect/MultiSelect.js +8 -3
- package/lib/v1/MultiSelect/Suggestions.js +8 -4
- package/lib/v1/MultiSelect/props/defaultProps.js +4 -2
- package/lib/v1/MultiSelect/props/propTypes.js +6 -2
- package/lib/v1/Select/GroupSelect.js +8 -3
- package/lib/v1/Select/SelectWithAvatar.js +8 -3
- package/lib/v1/Select/props/defaultProps.js +4 -2
- package/lib/v1/Select/props/propTypes.js +6 -2
- package/package.json +3 -5
- package/result.json +1 -1
package/es/Button/Button.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { defaultProps } from "./props/defaultProps";
|
|
3
3
|
import { propTypes } from "./props/propTypes";
|
|
4
|
-
import { ComponentCustomizer, PROP_CUSTOMIZE_TYPE } from '@zohodesk/dotkit/es/react/components/ComponentCustomizer';
|
|
5
4
|
import cssJSLogic from "./css/cssJSLogic";
|
|
6
5
|
import { mergeStyle } from '@zohodesk/utils';
|
|
7
6
|
import style from "./css/Button.module.css";
|
|
@@ -13,7 +12,7 @@ toLowerCase check needed?
|
|
|
13
12
|
|
|
14
13
|
/* eslint css-modules/no-unused-class: [2, { markAsUsed: ['small','medium','large','xlarge','button_medium','button_small','primary','primaryfilled','danger','dangerfilled','plainprimary', 'plainsecondary', 'secondary', 'secondaryfilled', 'successFilled','tertiaryFilled'] }] */
|
|
15
14
|
|
|
16
|
-
function Button(props) {
|
|
15
|
+
export default function Button(props) {
|
|
17
16
|
let {
|
|
18
17
|
text,
|
|
19
18
|
disabled,
|
|
@@ -61,17 +60,10 @@ function Button(props) {
|
|
|
61
60
|
className: loaderChildClass
|
|
62
61
|
}))));
|
|
63
62
|
}
|
|
64
|
-
|
|
65
63
|
Button.defaultProps = defaultProps;
|
|
66
64
|
Button.propTypes = propTypes; // if (__DOCS__) {
|
|
67
65
|
// Button.docs = {
|
|
68
66
|
// componentGroup: 'Form Elements',
|
|
69
67
|
// folderName: 'Style Guide'
|
|
70
68
|
// };
|
|
71
|
-
// }
|
|
72
|
-
|
|
73
|
-
export default ComponentCustomizer(Button, {
|
|
74
|
-
name: 'Button',
|
|
75
|
-
type: PROP_CUSTOMIZE_TYPE.excludedProps,
|
|
76
|
-
props: ['text', 'children']
|
|
77
|
-
});
|
|
69
|
+
// }
|
package/es/ListItem/ListItem.js
CHANGED
|
@@ -100,7 +100,7 @@ export default class ListItem extends React.Component {
|
|
|
100
100
|
autoHover: autoHover,
|
|
101
101
|
needTick: needTick,
|
|
102
102
|
needBorder: needBorder,
|
|
103
|
-
customClass: customListItem
|
|
103
|
+
customClass: `${needMultiLineText ? style.txtAlignBaseLine + ' ' + style.autoHeight : ''} ${customListItem}`,
|
|
104
104
|
dataId: dataIdString,
|
|
105
105
|
dataSelectorId: `${dataSelectorId}`,
|
|
106
106
|
isLink: isLink,
|
|
@@ -122,7 +122,7 @@ export default class ListItem extends React.Component {
|
|
|
122
122
|
adjust: true,
|
|
123
123
|
className: style.children
|
|
124
124
|
}, children) : null, needTick && active ? /*#__PURE__*/React.createElement(Box, {
|
|
125
|
-
className: `${style.tickIcon} ${tickIconPalette} ${customTickIcon}`,
|
|
125
|
+
className: `${style.tickIcon} ${tickIconPalette} ${customTickIcon} ${needMultiLineText ? style.tickIconCenter : ''}`,
|
|
126
126
|
"aria-hidden": ariaHidden,
|
|
127
127
|
dataId: `${dataIdString}_tickIcon`,
|
|
128
128
|
dataSelectorId: `${dataSelectorId}_tickIcon`
|
|
@@ -17,8 +17,9 @@
|
|
|
17
17
|
}[dir=ltr] .varClass {
|
|
18
18
|
--listitem_avatar_margin: 0 var(--zd_size15) 0 0;
|
|
19
19
|
}[dir=rtl] .varClass {
|
|
20
|
-
--listitem_avatar_margin: 0
|
|
20
|
+
--listitem_avatar_margin: 0 var(--zd_size15) 0 0;
|
|
21
21
|
}
|
|
22
|
+
|
|
22
23
|
.list {
|
|
23
24
|
composes: varClass;
|
|
24
25
|
position: relative;
|
|
@@ -34,62 +35,84 @@
|
|
|
34
35
|
border-color: var(--listitem_border_color);
|
|
35
36
|
cursor: pointer;
|
|
36
37
|
}
|
|
38
|
+
|
|
37
39
|
.list, .default, .secondary {
|
|
38
40
|
background-color: var(--listitem_bg_color);
|
|
39
41
|
}
|
|
42
|
+
|
|
40
43
|
[dir=ltr] .withBorder {
|
|
41
|
-
--listitem_border_width: 0 0 0 1px
|
|
44
|
+
--listitem_border_width: 0 0 0 1px
|
|
45
|
+
/*rtl: 0 1px 0 0*/
|
|
46
|
+
;
|
|
42
47
|
}
|
|
48
|
+
|
|
43
49
|
[dir=rtl] .withBorder {
|
|
44
|
-
--listitem_border_width: 0
|
|
50
|
+
--listitem_border_width: 0 0 0 1px ;
|
|
45
51
|
}
|
|
52
|
+
|
|
46
53
|
.active {
|
|
47
54
|
--listitem_border_color: var(--zdt_listitem_active_border);
|
|
48
55
|
}
|
|
56
|
+
|
|
49
57
|
[dir=ltr] .small {
|
|
50
58
|
--listitem_padding: var(--zd_size7) var(--zd_size3) var(--zd_size7) var(--zd_size5);
|
|
51
59
|
}
|
|
60
|
+
|
|
52
61
|
[dir=rtl] .small {
|
|
53
|
-
--listitem_padding: var(--zd_size7) var(--
|
|
62
|
+
--listitem_padding: var(--zd_size7) var(--zd_size3) var(--zd_size7) var(--zd_size5);
|
|
54
63
|
}
|
|
64
|
+
|
|
55
65
|
.medium {
|
|
56
66
|
--listitem_padding: var(--zd_size7) var(--zd_size20);
|
|
57
67
|
--listitem_min_height: var(--zd_size35);
|
|
58
68
|
}
|
|
69
|
+
|
|
59
70
|
.large {
|
|
60
71
|
--listitem_height: var(--zd_size48);
|
|
61
72
|
}
|
|
73
|
+
|
|
62
74
|
[dir=ltr] .large {
|
|
63
75
|
--listitem_padding: var(--zd_size10) var(--zd_size3) var(--zd_size10) var(--zd_size25);
|
|
64
76
|
}
|
|
77
|
+
|
|
65
78
|
[dir=rtl] .large {
|
|
66
|
-
--listitem_padding: var(--zd_size10) var(--
|
|
79
|
+
--listitem_padding: var(--zd_size10) var(--zd_size3) var(--zd_size10) var(--zd_size25);
|
|
67
80
|
}
|
|
81
|
+
|
|
68
82
|
.value,
|
|
69
83
|
.children {
|
|
70
84
|
composes: dotted from '../common/common.module.css';
|
|
71
85
|
}
|
|
72
|
-
|
|
86
|
+
|
|
87
|
+
.value {
|
|
73
88
|
line-height: 1.5385;
|
|
74
89
|
}
|
|
75
|
-
|
|
90
|
+
|
|
91
|
+
.multiLineValue {
|
|
92
|
+
line-height: 1.5385;
|
|
76
93
|
word-break: break-word;
|
|
77
|
-
|
|
94
|
+
-webkit-line-clamp: 3;
|
|
95
|
+
composes: clamp from '../common/common.module.css';
|
|
78
96
|
}
|
|
97
|
+
|
|
79
98
|
.iconBox {
|
|
80
99
|
width: var(--zd_size20) ;
|
|
81
100
|
text-align: center;
|
|
82
101
|
}
|
|
102
|
+
|
|
83
103
|
[dir=ltr] .iconBox {
|
|
84
104
|
margin-right: var(--zd_size10) ;
|
|
85
105
|
}
|
|
106
|
+
|
|
86
107
|
[dir=rtl] .iconBox {
|
|
87
108
|
margin-left: var(--zd_size10) ;
|
|
88
109
|
}
|
|
110
|
+
|
|
89
111
|
.iconBox,
|
|
90
112
|
.leftAvatar {
|
|
91
113
|
font-size: 0 ;
|
|
92
114
|
}
|
|
115
|
+
|
|
93
116
|
.leftAvatar {
|
|
94
117
|
margin: var(--listitem_avatar_margin);
|
|
95
118
|
}
|
|
@@ -97,61 +120,78 @@
|
|
|
97
120
|
.defaultHover, .primaryHover, .secondaryHover, .darkHover {
|
|
98
121
|
background-color: var(--listitem_highlight_bg_color);
|
|
99
122
|
}
|
|
123
|
+
|
|
100
124
|
.activewithBorder {
|
|
101
125
|
--listitem_border_color: var(--zdt_listitem_active_border);
|
|
102
126
|
}
|
|
127
|
+
|
|
103
128
|
[dir=ltr] .activewithBorder {
|
|
104
|
-
--listitem_border_width: 0 0 0 1px
|
|
129
|
+
--listitem_border_width: 0 0 0 1px
|
|
130
|
+
/*rtl: 0 1px 0 0*/
|
|
131
|
+
;
|
|
105
132
|
}
|
|
133
|
+
|
|
106
134
|
[dir=rtl] .activewithBorder {
|
|
107
|
-
--listitem_border_width: 0
|
|
135
|
+
--listitem_border_width: 0 0 0 1px ;
|
|
108
136
|
}
|
|
109
137
|
|
|
110
138
|
.defaultHover,
|
|
111
139
|
.defaultEffect:hover
|
|
140
|
+
|
|
112
141
|
/* .defaultEffect:focus */
|
|
113
|
-
{
|
|
142
|
+
{
|
|
114
143
|
--listitem_bg_color: var(--zdt_listitem_highlight_bg);
|
|
115
144
|
}
|
|
145
|
+
|
|
116
146
|
.primaryHover,
|
|
117
147
|
.primaryEffect:hover
|
|
148
|
+
|
|
118
149
|
/* .primaryEffect:focus */
|
|
119
|
-
|
|
150
|
+
{
|
|
120
151
|
--listitem_bg_color: var(--zdt_listitem_primary_bg);
|
|
121
152
|
--listitem_highlight_bg_color: var(--zdt_listitem_primary_bg);
|
|
122
153
|
}
|
|
154
|
+
|
|
123
155
|
.secondaryHover,
|
|
124
156
|
.secondaryEffect:hover
|
|
157
|
+
|
|
125
158
|
/* .secondaryEffect:focus */
|
|
126
|
-
{
|
|
159
|
+
{
|
|
127
160
|
--listitem_bg_color: var(--zdt_listitem_secondary_bg);
|
|
128
161
|
--listitem_highlight_bg_color: var(--zdt_listitem_secondary_bg);
|
|
129
162
|
--listitem_text_color: var(--zdt_listitem_secondary_text);
|
|
130
163
|
}
|
|
164
|
+
|
|
131
165
|
.darkHover,
|
|
132
166
|
.darkEffect:hover
|
|
167
|
+
|
|
133
168
|
/* .darkEffect:focus */
|
|
134
|
-
|
|
169
|
+
{
|
|
135
170
|
--listitem_bg_color: var(--zdt_listitem_dark_effect_bg);
|
|
136
171
|
--listitem_highlight_bg_color: var(--zdt_listitem_dark_effect_bg);
|
|
137
172
|
}
|
|
173
|
+
|
|
138
174
|
.activedefault, .activeprimary, .activesecondary, .activedark {
|
|
139
175
|
background-color: var(--listitem_active_bg_color);
|
|
140
176
|
}
|
|
177
|
+
|
|
141
178
|
.activedefault,
|
|
142
179
|
.activedefault:hover,
|
|
143
180
|
.activeprimary,
|
|
144
181
|
.activeprimary:hover {
|
|
145
182
|
--listitem_active_bg_color: var(--zdt_listitem_primary_bg);
|
|
146
183
|
}
|
|
184
|
+
|
|
147
185
|
.activesecondary {
|
|
148
186
|
--listitem_active_bg_color: var(--zdt_listitem_secondary_bg);
|
|
149
187
|
--listitem_text_color: var(--zdt_listitem_secondary_text);
|
|
150
188
|
}
|
|
189
|
+
|
|
151
190
|
.dark {
|
|
152
191
|
--listitem_bg_color: var(--zdt_listitem_dark_bg);
|
|
153
192
|
--listitem_text_color: var(--zdt_listitem_dark_text);
|
|
154
193
|
}
|
|
194
|
+
|
|
155
195
|
.activedark {
|
|
156
196
|
--listitem_active_bg_color: var(--zdt_listitem_dark_active_bg);
|
|
157
197
|
}
|
|
@@ -170,36 +210,63 @@
|
|
|
170
210
|
[dir=rtl] .tickIcon, [dir=rtl] .defaultTick, [dir=rtl] .darkTick {
|
|
171
211
|
left: var(--zd_size20) ;
|
|
172
212
|
}
|
|
213
|
+
|
|
173
214
|
.defaultTick {
|
|
174
215
|
--listitem_tickicon_color: var(--zdt_listitem_default_tickicon);
|
|
175
216
|
}
|
|
217
|
+
|
|
176
218
|
.darkTick {
|
|
177
219
|
--listitem_tickicon_color: var(--zdt_listitem_dark_tickicon);
|
|
178
220
|
}
|
|
179
|
-
|
|
221
|
+
|
|
222
|
+
.defaultTick>i {
|
|
180
223
|
display: block;
|
|
181
224
|
}
|
|
225
|
+
|
|
182
226
|
[dir=ltr] .smallwithTick {
|
|
183
227
|
--listitem_padding: var(--zd_size7) var(--zd_size39) var(--zd_size7) var(--zd_size5);
|
|
184
228
|
}
|
|
229
|
+
|
|
185
230
|
[dir=rtl] .smallwithTick {
|
|
186
|
-
--listitem_padding: var(--zd_size7) var(--
|
|
231
|
+
--listitem_padding: var(--zd_size7) var(--zd_size39) var(--zd_size7) var(--zd_size5);
|
|
187
232
|
}
|
|
233
|
+
|
|
188
234
|
[dir=ltr] .mediumwithTick {
|
|
189
235
|
--listitem_padding: var(--zd_size7) var(--zd_size39) var(--zd_size7) var(--zd_size20);
|
|
190
236
|
}
|
|
237
|
+
|
|
191
238
|
[dir=rtl] .mediumwithTick {
|
|
192
|
-
--listitem_padding: var(--zd_size7) var(--
|
|
239
|
+
--listitem_padding: var(--zd_size7) var(--zd_size39) var(--zd_size7) var(--zd_size20);
|
|
193
240
|
}
|
|
241
|
+
|
|
194
242
|
[dir=ltr] .largewithTick {
|
|
195
243
|
--listitem_padding: var(--zd_size10) var(--zd_size39) var(--zd_size10) var(--zd_size25);
|
|
196
244
|
}
|
|
245
|
+
|
|
197
246
|
[dir=rtl] .largewithTick {
|
|
198
|
-
--listitem_padding: var(--zd_size10) var(--
|
|
247
|
+
--listitem_padding: var(--zd_size10) var(--zd_size39) var(--zd_size10) var(--zd_size25);
|
|
199
248
|
}
|
|
249
|
+
|
|
200
250
|
.responsiveHeight {
|
|
201
251
|
--listitem_min_height: var(--zd_size45);
|
|
202
252
|
font-size: var(--zd_font_size15) ;
|
|
203
253
|
padding-top: var(--zd_size10) ;
|
|
204
254
|
padding-bottom: var(--zd_size10) ;
|
|
205
255
|
}
|
|
256
|
+
|
|
257
|
+
.autoHeight {
|
|
258
|
+
height: auto ;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.tickIconCenter {
|
|
262
|
+
top: 50% ;
|
|
263
|
+
transform: translateY(-50%);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.txtAlignBaseLine {
|
|
267
|
+
align-items: baseline;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.alignSelfTop {
|
|
271
|
+
align-self: start;
|
|
272
|
+
}
|
|
@@ -107,7 +107,7 @@ export default class ListItemWithAvatar extends React.PureComponent {
|
|
|
107
107
|
autoHover: autoHover,
|
|
108
108
|
needTick: needTick,
|
|
109
109
|
needBorder: needBorder,
|
|
110
|
-
customClass: customListItem
|
|
110
|
+
customClass: `${needMultiLineText ? style.autoHeight : ''} ${customListItem}`,
|
|
111
111
|
dataId: `${dataIdString}_ListItemWithAvatar`,
|
|
112
112
|
dataSelectorId: `${dataSelectorId}`,
|
|
113
113
|
onClick: this.handleClick,
|
|
@@ -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: style.leftAvatar
|
|
121
|
+
className: `${needMultiLineText ? style.alignSelfTop : ''} ${style.leftAvatar}`
|
|
122
122
|
}, isTeam ? /*#__PURE__*/React.createElement(AvatarTeam, {
|
|
123
123
|
name: name,
|
|
124
124
|
size: "small",
|
|
@@ -147,7 +147,7 @@ export default class ListItemWithAvatar extends React.PureComponent {
|
|
|
147
147
|
"data-title": isDisabled ? null : title,
|
|
148
148
|
className: needMultiLineText ? style.multiLineValue : style.value
|
|
149
149
|
}, value) : null, needTick && active ? /*#__PURE__*/React.createElement(Box, {
|
|
150
|
-
className: style.tickIcon
|
|
150
|
+
className: `${style.tickIcon} ${needMultiLineText ? style.tickIconCenter : ''}`,
|
|
151
151
|
"aria-hidden": ariaHidden,
|
|
152
152
|
dataId: `${dataIdString}_tickIcon`,
|
|
153
153
|
dataSelectorId: `${dataSelectorId}_tickIcon`
|
|
@@ -95,7 +95,7 @@ export default class ListItemWithIcon extends React.Component {
|
|
|
95
95
|
autoHover: autoHover,
|
|
96
96
|
needTick: needTick,
|
|
97
97
|
needBorder: needBorder,
|
|
98
|
-
customClass: customClass
|
|
98
|
+
customClass: `${needMultiLineText ? style.autoHeight : ''} ${needMultiLineText && iconClass && !iconName ? style.txtAlignBaseLine : ''} ${customClass}`,
|
|
99
99
|
dataId: dataIdString,
|
|
100
100
|
dataSelectorId: dataSelectorId,
|
|
101
101
|
isLink: isLink,
|
|
@@ -125,7 +125,7 @@ export default class ListItemWithIcon extends React.Component {
|
|
|
125
125
|
"data-title": isDisabled ? null : title,
|
|
126
126
|
dataId: `${dataIdString}_Text`
|
|
127
127
|
}, value), needTick && active ? /*#__PURE__*/React.createElement(Box, {
|
|
128
|
-
className: style.tickIcon
|
|
128
|
+
className: `${style.tickIcon} ${needMultiLineText ? style.tickIconCenter : ''}`,
|
|
129
129
|
"aria-hidden": ariaHidden,
|
|
130
130
|
dataId: `${dataIdString}_tickIcon`,
|
|
131
131
|
dataSelectorId: `${dataSelectorId}_tickIcon`
|
|
@@ -876,8 +876,12 @@ class AdvancedGroupMultiSelect extends React.Component {
|
|
|
876
876
|
needEffect,
|
|
877
877
|
autoComplete,
|
|
878
878
|
getTargetRef,
|
|
879
|
-
isFocus
|
|
879
|
+
isFocus,
|
|
880
|
+
customProps
|
|
880
881
|
} = this.props;
|
|
882
|
+
const {
|
|
883
|
+
suggestionsProps
|
|
884
|
+
} = customProps;
|
|
881
885
|
let {
|
|
882
886
|
clearText = 'Clear all'
|
|
883
887
|
} = i18nKeys;
|
|
@@ -1057,7 +1061,8 @@ class AdvancedGroupMultiSelect extends React.Component {
|
|
|
1057
1061
|
a11y: {
|
|
1058
1062
|
role: 'option'
|
|
1059
1063
|
},
|
|
1060
|
-
dataId: `${dataId}_Options
|
|
1064
|
+
dataId: `${dataId}_Options`,
|
|
1065
|
+
...suggestionsProps
|
|
1061
1066
|
}));
|
|
1062
1067
|
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
1063
1068
|
options: revampedGroups,
|
|
@@ -551,7 +551,8 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
|
|
|
551
551
|
role: 'option'
|
|
552
552
|
},
|
|
553
553
|
dataId: `${dataIdMultiSelectComp}_Options`,
|
|
554
|
-
...SuggestionsProps
|
|
554
|
+
...SuggestionsProps,
|
|
555
|
+
needMultiLineText: true
|
|
555
556
|
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
556
557
|
isLoading: isFetchingOptions,
|
|
557
558
|
options: options,
|
|
@@ -1011,8 +1011,12 @@ export class MultiSelectComponent extends React.Component {
|
|
|
1011
1011
|
boxSize,
|
|
1012
1012
|
isLoading,
|
|
1013
1013
|
selectAllText,
|
|
1014
|
-
needSelectAll
|
|
1014
|
+
needSelectAll,
|
|
1015
|
+
customProps
|
|
1015
1016
|
} = this.props;
|
|
1017
|
+
const {
|
|
1018
|
+
suggestionsProps = {}
|
|
1019
|
+
} = customProps;
|
|
1016
1020
|
const {
|
|
1017
1021
|
selectedOptions,
|
|
1018
1022
|
searchStr,
|
|
@@ -1102,7 +1106,8 @@ export class MultiSelectComponent extends React.Component {
|
|
|
1102
1106
|
selectedOptions: selectedOptionIds,
|
|
1103
1107
|
a11y: {
|
|
1104
1108
|
role: 'option'
|
|
1105
|
-
}
|
|
1109
|
+
},
|
|
1110
|
+
...suggestionsProps
|
|
1106
1111
|
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
1107
1112
|
isLoading: isFetchingOptions,
|
|
1108
1113
|
options: options,
|
|
@@ -27,7 +27,8 @@ export default class Suggestions extends React.PureComponent {
|
|
|
27
27
|
avatarPalette,
|
|
28
28
|
palette,
|
|
29
29
|
htmlId,
|
|
30
|
-
a11y
|
|
30
|
+
a11y,
|
|
31
|
+
needMultiLineText
|
|
31
32
|
} = this.props;
|
|
32
33
|
const {
|
|
33
34
|
ariaParentRole,
|
|
@@ -92,7 +93,8 @@ export default class Suggestions extends React.PureComponent {
|
|
|
92
93
|
size: listItemSize,
|
|
93
94
|
avatarPalette: avatarPalette,
|
|
94
95
|
palette: palette,
|
|
95
|
-
a11y: list_a11y
|
|
96
|
+
a11y: list_a11y,
|
|
97
|
+
needMultiLineText: needMultiLineText
|
|
96
98
|
});
|
|
97
99
|
} else if (optionType === 'icon') {
|
|
98
100
|
return /*#__PURE__*/React.createElement(ListItemWithIcon, { ...commonProps,
|
|
@@ -112,7 +114,8 @@ export default class Suggestions extends React.PureComponent {
|
|
|
112
114
|
iconSize: iconSize,
|
|
113
115
|
size: listItemSize,
|
|
114
116
|
palette: palette,
|
|
115
|
-
a11y: list_a11y
|
|
117
|
+
a11y: list_a11y,
|
|
118
|
+
needMultiLineText: needMultiLineText
|
|
116
119
|
});
|
|
117
120
|
}
|
|
118
121
|
|
|
@@ -131,7 +134,8 @@ export default class Suggestions extends React.PureComponent {
|
|
|
131
134
|
active: isActive,
|
|
132
135
|
size: listItemSize,
|
|
133
136
|
palette: palette,
|
|
134
|
-
a11y: list_a11y
|
|
137
|
+
a11y: list_a11y,
|
|
138
|
+
needMultiLineText: needMultiLineText
|
|
135
139
|
});
|
|
136
140
|
})));
|
|
137
141
|
}
|
|
@@ -37,7 +37,8 @@ export const AdvancedGroupMultiSelect_defaultProps = {
|
|
|
37
37
|
needEffect: true,
|
|
38
38
|
palette: 'default',
|
|
39
39
|
isLoading: false,
|
|
40
|
-
dataSelectorId: 'advancedGroupMultiSelect'
|
|
40
|
+
dataSelectorId: 'advancedGroupMultiSelect',
|
|
41
|
+
customProps: {}
|
|
41
42
|
};
|
|
42
43
|
export const AdvancedMultiSelect_defaultProps = {
|
|
43
44
|
animationStyle: 'bounce',
|
|
@@ -154,13 +155,14 @@ export const MultiSelectWithAvatar_defaultProps = {
|
|
|
154
155
|
isLoading: false,
|
|
155
156
|
dataSelectorId: 'multiSelectWithAvatar',
|
|
156
157
|
keepSelectedOptions: false,
|
|
157
|
-
|
|
158
|
-
|
|
158
|
+
needResponsive: true,
|
|
159
|
+
customProps: {}
|
|
159
160
|
};
|
|
160
161
|
export const SelectedOptions_defaultProps = {
|
|
161
162
|
size: 'medium',
|
|
162
163
|
dataId: 'selectedOptions'
|
|
163
164
|
};
|
|
164
165
|
export const Suggestions_defaultProps = {
|
|
165
|
-
a11y: {}
|
|
166
|
+
a11y: {},
|
|
167
|
+
needMultiLineText: false
|
|
166
168
|
};
|
|
@@ -110,7 +110,8 @@ export const MultiSelect_propTypes = {
|
|
|
110
110
|
setAriaId: PropTypes.string,
|
|
111
111
|
ariaErrorId: PropTypes.string,
|
|
112
112
|
customProps: PropTypes.shape({
|
|
113
|
-
TextBoxIconProps: PropTypes.object
|
|
113
|
+
TextBoxIconProps: PropTypes.object,
|
|
114
|
+
suggestionsProps: PropTypes.object
|
|
114
115
|
}),
|
|
115
116
|
isFocus: PropTypes.bool
|
|
116
117
|
};
|
|
@@ -177,7 +178,8 @@ export const Suggestions_propTypes = {
|
|
|
177
178
|
logo: PropTypes.string,
|
|
178
179
|
optionType: PropTypes.string,
|
|
179
180
|
listItemProps: PropTypes.object
|
|
180
|
-
}))
|
|
181
|
+
})),
|
|
182
|
+
needMultiLineText: PropTypes.bool
|
|
181
183
|
};
|
|
182
184
|
export const AdvancedGroupMultiSelect_propTypes = {
|
|
183
185
|
animationStyle: PropTypes.string,
|
|
@@ -248,7 +250,8 @@ export const AdvancedGroupMultiSelect_propTypes = {
|
|
|
248
250
|
searchStr: PropTypes.string,
|
|
249
251
|
children: PropTypes.node,
|
|
250
252
|
dataSelectorId: PropTypes.string,
|
|
251
|
-
isFocus: PropTypes.bool
|
|
253
|
+
isFocus: PropTypes.bool,
|
|
254
|
+
customProps: PropTypes.string
|
|
252
255
|
};
|
|
253
256
|
export const AdvancedMultiSelect_propTypes = { ...MultiSelect_propTypes,
|
|
254
257
|
selectedOptionDetails: PropTypes.string,
|
package/es/Select/GroupSelect.js
CHANGED
|
@@ -591,6 +591,9 @@ export class GroupSelectComponent extends PureComponent {
|
|
|
591
591
|
dataSelectorId,
|
|
592
592
|
customProps
|
|
593
593
|
} = this.props;
|
|
594
|
+
const {
|
|
595
|
+
suggestionsProps = {}
|
|
596
|
+
} = customProps;
|
|
594
597
|
i18nKeys = Object.assign({}, i18nKeys, {
|
|
595
598
|
emptyText: i18nKeys.emptyText || emptyMessage,
|
|
596
599
|
searchEmptyText: i18nKeys.searchEmptyText || searchEmptyMessage
|
|
@@ -789,7 +792,8 @@ export class GroupSelectComponent extends PureComponent {
|
|
|
789
792
|
ariaParentRole: 'listbox',
|
|
790
793
|
role: 'option'
|
|
791
794
|
},
|
|
792
|
-
dataId: `${dataId}_Options
|
|
795
|
+
dataId: `${dataId}_Options`,
|
|
796
|
+
...suggestionsProps
|
|
793
797
|
}));
|
|
794
798
|
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
795
799
|
options: revampedGroups,
|
package/es/Select/Select.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import React, { Component } from 'react';
|
|
3
3
|
import { Select_defaultProps } from "./props/defaultProps";
|
|
4
4
|
import { Select_propTypes } from "./props/propTypes";
|
|
5
|
-
import { ComponentCustomizer } from '@zohodesk/dotkit/es/react/components/ComponentCustomizer';
|
|
6
5
|
/**** Components ****/
|
|
7
6
|
|
|
8
7
|
import Popup from "../Popup/Popup";
|
|
@@ -965,9 +964,7 @@ let Select = Popup(SelectComponent);
|
|
|
965
964
|
Select.defaultProps = SelectComponent.defaultProps;
|
|
966
965
|
Select.propTypes = Select_propTypes;
|
|
967
966
|
Select.displayName = 'Select';
|
|
968
|
-
export default
|
|
969
|
-
name: 'Select'
|
|
970
|
-
}); // if (__DOCS__) {
|
|
967
|
+
export default Select; // if (__DOCS__) {
|
|
971
968
|
// Select.docs = {
|
|
972
969
|
// componentGroup: 'Form Elements',
|
|
973
970
|
// folderName: 'Style Guide',
|
|
@@ -163,8 +163,12 @@ class SelectWithAvatarComponent extends SelectComponent {
|
|
|
163
163
|
needEffect,
|
|
164
164
|
isLoading,
|
|
165
165
|
dataSelectorId,
|
|
166
|
-
getTargetRef
|
|
166
|
+
getTargetRef,
|
|
167
|
+
customProps
|
|
167
168
|
} = this.props;
|
|
169
|
+
const {
|
|
170
|
+
suggestionsProps = {}
|
|
171
|
+
} = customProps;
|
|
168
172
|
i18nKeys = Object.assign({}, i18nKeys, {
|
|
169
173
|
emptyText: i18nKeys.emptyText || emptyMessage,
|
|
170
174
|
searchEmptyText: i18nKeys.searchEmptyText || searchEmptyMessage
|
|
@@ -321,7 +325,8 @@ class SelectWithAvatarComponent extends SelectComponent {
|
|
|
321
325
|
a11y: {
|
|
322
326
|
ariaParentRole: 'listbox',
|
|
323
327
|
role: 'option'
|
|
324
|
-
}
|
|
328
|
+
},
|
|
329
|
+
...suggestionsProps
|
|
325
330
|
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
326
331
|
isLoading: isFetchingOptions,
|
|
327
332
|
options: options,
|
|
@@ -367,7 +367,8 @@ class SelectWithIcon extends Component {
|
|
|
367
367
|
let {
|
|
368
368
|
TextBoxProps = {},
|
|
369
369
|
DropdownSearchTextBoxProps = {},
|
|
370
|
-
TextBoxIconProps = {}
|
|
370
|
+
TextBoxIconProps = {},
|
|
371
|
+
listItemProps = {}
|
|
371
372
|
} = customProps;
|
|
372
373
|
return /*#__PURE__*/React.createElement("div", {
|
|
373
374
|
className: `${style.container} ${style[`box_${size}`]} ${isReadOnly ? style.readonly : ''} ${borderColor === 'transparent' ? style.transparentContainer : ''}`,
|
|
@@ -530,7 +531,8 @@ class SelectWithIcon extends Component {
|
|
|
530
531
|
role: 'option',
|
|
531
532
|
ariaSelected: selectedId === options[idKey],
|
|
532
533
|
ariaLabel: options[valueKey]
|
|
533
|
-
}
|
|
534
|
+
},
|
|
535
|
+
...listItemProps
|
|
534
536
|
});
|
|
535
537
|
})) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
536
538
|
isLoading: isFetchingOptions,
|
|
@@ -177,7 +177,8 @@ export const GroupSelect_propTypes = {
|
|
|
177
177
|
isDefaultSelectValue: PropTypes.bool,
|
|
178
178
|
customProps: PropTypes.shape({
|
|
179
179
|
TextBoxProps: PropTypes.object,
|
|
180
|
-
TextBoxIconProps: PropTypes.object
|
|
180
|
+
TextBoxIconProps: PropTypes.object,
|
|
181
|
+
suggestionsProps: PropTypes.object
|
|
181
182
|
})
|
|
182
183
|
};
|
|
183
184
|
export const SelectWithAvatar_propTypes = { ...Select_propTypes,
|
|
@@ -239,7 +240,8 @@ export const SelectWithAvatar_propTypes = { ...Select_propTypes,
|
|
|
239
240
|
htmlId: PropTypes.string,
|
|
240
241
|
needEffect: PropTypes.bool,
|
|
241
242
|
isLoading: PropTypes.bool,
|
|
242
|
-
dataSelectorId: PropTypes.string
|
|
243
|
+
dataSelectorId: PropTypes.string,
|
|
244
|
+
customProps: PropTypes.string
|
|
243
245
|
};
|
|
244
246
|
export const SelectWithIcon_propTypes = {
|
|
245
247
|
animationStyle: PropTypes.oneOf(['default', 'bounce']),
|
package/es/Switch/Switch.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { defaultProps } from "./props/defaultProps";
|
|
3
3
|
import { propTypes } from "./props/propTypes";
|
|
4
|
-
import { ComponentCustomizer, PROP_CUSTOMIZE_TYPE } from '@zohodesk/dotkit/es/react/components/ComponentCustomizer';
|
|
5
4
|
import { Container, Box } from "../Layout";
|
|
6
5
|
import Label from "../Label/Label";
|
|
7
6
|
import style from "./Switch.module.css";
|
|
8
|
-
|
|
9
|
-
class Switch extends React.Component {
|
|
7
|
+
export default class Switch extends React.Component {
|
|
10
8
|
constructor(props) {
|
|
11
9
|
super(props);
|
|
12
10
|
this.onChange = this.onChange.bind(this);
|
|
@@ -92,17 +90,10 @@ class Switch extends React.Component {
|
|
|
92
90
|
}
|
|
93
91
|
|
|
94
92
|
}
|
|
95
|
-
|
|
96
93
|
Switch.defaultProps = defaultProps;
|
|
97
94
|
Switch.propTypes = propTypes; // if (__DOCS__) {
|
|
98
95
|
// Switch.docs = {
|
|
99
96
|
// componentGroup: 'Form Elements',
|
|
100
97
|
// folderName: 'Style Guide'
|
|
101
98
|
// };
|
|
102
|
-
// }
|
|
103
|
-
|
|
104
|
-
export default ComponentCustomizer(Switch, {
|
|
105
|
-
name: 'Switch',
|
|
106
|
-
type: PROP_CUSTOMIZE_TYPE.selectedProps,
|
|
107
|
-
propNames: ['size']
|
|
108
|
-
});
|
|
99
|
+
// }
|