@zohodesk/components 1.0.0-temp-190.2 → 1.0.0-temp-192
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/PropLessFiles.html +1 -1
- package/.cli/propValidation_report.html +1 -1
- package/README.md +16 -5
- package/es/Avatar/Avatar.module.css +0 -12
- package/es/AvatarTeam/AvatarTeam.module.css +0 -4
- package/es/Button/css/Button.module.css +0 -6
- package/es/Buttongroup/Buttongroup.module.css +0 -2
- package/es/CheckBox/CheckBox.js +10 -0
- package/es/CheckBox/CheckBox.module.css +0 -2
- package/es/CheckBox/props/propTypes.js +1 -0
- package/es/DateTime/DateTime.module.css +0 -1
- package/es/DropBox/DropBoxElement/css/DropBoxElement.module.css +0 -7
- package/es/DropBox/css/DropBox.module.css +0 -1
- package/es/DropDown/DropDownHeading.module.css +0 -6
- package/es/DropDown/DropDownItem.module.css +0 -3
- package/es/Label/Label.module.css +0 -1
- package/es/ListItem/ListItem.js +2 -2
- package/es/ListItem/ListItem.module.css +85 -39
- package/es/ListItem/ListItemWithAvatar.js +3 -3
- package/es/ListItem/ListItemWithIcon.js +2 -2
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +9 -3
- package/es/MultiSelect/MultiSelect.js +9 -3
- package/es/MultiSelect/MultiSelectWithAvatar.js +3 -1
- package/es/MultiSelect/Suggestions.js +8 -4
- package/es/MultiSelect/props/defaultProps.js +9 -3
- package/es/MultiSelect/props/propTypes.js +7 -3
- package/es/PopOver/PopOver.module.css +3 -3
- package/es/Radio/Radio.js +26 -7
- package/es/Radio/Radio.module.css +3 -1
- package/es/Radio/__tests__/__snapshots__/Radio.spec.js.snap +3 -3
- package/es/Radio/props/defaultProps.js +1 -0
- package/es/Radio/props/propTypes.js +7 -0
- package/es/Ribbon/Ribbon.module.css +0 -4
- package/es/Select/GroupSelect.js +9 -3
- package/es/Select/SelectWithAvatar.js +9 -3
- package/es/Select/SelectWithIcon.js +9 -3
- package/es/Select/props/defaultProps.js +6 -3
- package/es/Select/props/propTypes.js +6 -3
- package/es/Switch/Switch.module.css +0 -2
- package/es/Tag/Tag.module.css +0 -6
- package/es/TextBox/TextBox.module.css +1 -21
- package/es/TextBoxIcon/TextBoxIcon.module.css +0 -5
- package/es/Textarea/Textarea.module.css +0 -6
- package/es/common/customscroll.module.css +27 -3
- package/es/v1/Animation/Animation.js +1 -1
- package/es/v1/Card/Card.js +1 -1
- package/es/v1/CheckBox/CheckBox.js +7 -1
- package/es/v1/CheckBox/props/propTypes.js +1 -0
- package/es/v1/DropBox/utils/isMobilePopover.js +1 -1
- package/es/v1/ListItem/ListContainer.js +1 -1
- package/es/v1/MultiSelect/AdvancedGroupMultiSelect.js +1 -1
- package/es/v1/MultiSelect/AdvancedMultiSelect.js +1 -1
- package/es/v1/MultiSelect/MultiSelectWithAvatar.js +1 -1
- package/es/v1/MultiSelect/props/defaultProps.js +5 -3
- package/es/v1/Radio/Radio.js +22 -7
- package/es/v1/Radio/props/defaultProps.js +1 -0
- package/es/v1/Radio/props/propTypes.js +7 -0
- package/es/v1/ResponsiveDropBox/ResponsiveDropBox.js +1 -1
- package/es/v1/Select/GroupSelect.js +1 -1
- package/es/v1/Select/Select.js +1 -1
- package/es/v1/Select/SelectWithAvatar.js +5 -7
- package/es/v1/Select/SelectWithIcon.js +1 -1
- package/es/v1/Select/props/defaultProps.js +1 -1
- package/es/v1/Select/props/propTypes.js +1 -3
- package/es/v1/Tab/Tabs.js +2 -2
- package/es/v1/Tooltip/Tooltip.js +1 -1
- package/lib/Avatar/Avatar.module.css +0 -12
- package/lib/AvatarTeam/AvatarTeam.module.css +0 -4
- package/lib/Button/css/Button.module.css +0 -6
- package/lib/Buttongroup/Buttongroup.module.css +0 -2
- package/lib/CheckBox/CheckBox.js +34 -24
- package/lib/CheckBox/CheckBox.module.css +0 -2
- package/lib/CheckBox/props/propTypes.js +1 -0
- package/lib/DateTime/DateTime.module.css +0 -1
- package/lib/DropBox/DropBoxElement/css/DropBoxElement.module.css +0 -7
- package/lib/DropBox/css/DropBox.module.css +0 -1
- package/lib/DropDown/DropDownHeading.module.css +0 -6
- package/lib/DropDown/DropDownItem.module.css +0 -3
- package/lib/Label/Label.module.css +0 -1
- package/lib/ListItem/ListItem.js +2 -2
- package/lib/ListItem/ListItem.module.css +85 -39
- package/lib/ListItem/ListItemWithAvatar.js +3 -3
- package/lib/ListItem/ListItemWithIcon.js +2 -2
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +7 -3
- package/lib/MultiSelect/MultiSelect.js +8 -3
- package/lib/MultiSelect/MultiSelectWithAvatar.js +3 -1
- package/lib/MultiSelect/Suggestions.js +8 -4
- package/lib/MultiSelect/props/defaultProps.js +9 -3
- package/lib/MultiSelect/props/propTypes.js +9 -6
- package/lib/PopOver/PopOver.module.css +3 -3
- package/lib/Radio/Radio.js +45 -26
- package/lib/Radio/Radio.module.css +3 -1
- package/lib/Radio/__tests__/__snapshots__/Radio.spec.js.snap +3 -3
- package/lib/Radio/props/defaultProps.js +1 -0
- package/lib/Radio/props/propTypes.js +7 -0
- package/lib/Ribbon/Ribbon.module.css +0 -4
- package/lib/Select/GroupSelect.js +8 -3
- package/lib/Select/SelectWithAvatar.js +8 -3
- package/lib/Select/SelectWithIcon.js +8 -3
- package/lib/Select/props/defaultProps.js +5 -3
- package/lib/Select/props/propTypes.js +6 -3
- package/lib/Switch/Switch.module.css +0 -2
- package/lib/Tag/Tag.module.css +0 -6
- package/lib/TextBox/TextBox.module.css +1 -21
- package/lib/TextBoxIcon/TextBoxIcon.module.css +0 -5
- package/lib/Textarea/Textarea.module.css +0 -6
- package/lib/common/customscroll.module.css +27 -3
- package/lib/v1/Animation/Animation.js +1 -1
- package/lib/v1/Card/Card.js +1 -1
- package/lib/v1/CheckBox/CheckBox.js +7 -1
- package/lib/v1/CheckBox/props/propTypes.js +1 -0
- package/lib/v1/DropBox/utils/isMobilePopover.js +1 -1
- package/lib/v1/ListItem/ListContainer.js +1 -1
- package/lib/v1/MultiSelect/AdvancedGroupMultiSelect.js +1 -1
- package/lib/v1/MultiSelect/AdvancedMultiSelect.js +1 -1
- package/lib/v1/MultiSelect/props/defaultProps.js +5 -3
- package/lib/v1/Radio/Radio.js +22 -7
- package/lib/v1/Radio/props/defaultProps.js +1 -0
- package/lib/v1/Radio/props/propTypes.js +7 -0
- package/lib/v1/ResponsiveDropBox/ResponsiveDropBox.js +1 -1
- package/lib/v1/Select/GroupSelect.js +1 -1
- package/lib/v1/Select/Select.js +1 -1
- package/lib/v1/Select/SelectWithAvatar.js +4 -6
- package/lib/v1/Select/SelectWithIcon.js +1 -1
- package/lib/v1/Select/props/defaultProps.js +1 -1
- package/lib/v1/Select/props/propTypes.js +1 -3
- package/lib/v1/Tab/Tabs.js +2 -2
- package/lib/v1/Tooltip/Tooltip.js +1 -1
- package/package.json +10 -10
- package/result.json +1 -1
- package/es/v1/Provider/AvatarSize.js +0 -13
- package/es/v1/Provider/Config.js +0 -18
- package/es/v1/Provider/CssProvider.js +0 -16
- package/es/v1/Provider/IdProvider.js +0 -66
- package/es/v1/Provider/LibraryContext.js +0 -37
- package/es/v1/Provider/LibraryContextInit.js +0 -3
- package/es/v1/Provider/NumberGenerator/NumberGenerator.js +0 -136
- package/es/v1/Provider/ZindexProvider.js +0 -57
- package/es/v1/Provider/index.js +0 -4
- package/es/v1/Responsive/CustomResponsive.js +0 -195
- package/es/v1/Responsive/RefWrapper.js +0 -39
- package/es/v1/Responsive/ResizeComponent.js +0 -197
- package/es/v1/Responsive/ResizeObserver.js +0 -140
- package/es/v1/Responsive/Responsive.js +0 -194
- package/es/v1/Responsive/index.js +0 -9
- package/es/v1/Responsive/props/defaultProps.js +0 -13
- package/es/v1/Responsive/props/propTypes.js +0 -25
- package/lib/v1/Provider/AvatarSize.js +0 -24
- package/lib/v1/Provider/Config.js +0 -27
- package/lib/v1/Provider/CssProvider.js +0 -27
- package/lib/v1/Provider/IdProvider.js +0 -79
- package/lib/v1/Provider/LibraryContext.js +0 -76
- package/lib/v1/Provider/LibraryContextInit.js +0 -15
- package/lib/v1/Provider/NumberGenerator/NumberGenerator.js +0 -174
- package/lib/v1/Provider/ZindexProvider.js +0 -69
- package/lib/v1/Provider/index.js +0 -81
- package/lib/v1/Responsive/CustomResponsive.js +0 -242
- package/lib/v1/Responsive/RefWrapper.js +0 -57
- package/lib/v1/Responsive/ResizeComponent.js +0 -268
- package/lib/v1/Responsive/ResizeObserver.js +0 -168
- package/lib/v1/Responsive/Responsive.js +0 -274
- package/lib/v1/Responsive/index.js +0 -55
- package/lib/v1/Responsive/props/defaultProps.js +0 -23
- package/lib/v1/Responsive/props/propTypes.js +0 -39
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
1
3
|
/**** Libraries ****/
|
|
2
4
|
import React from 'react';
|
|
3
5
|
import { MultiSelect_propTypes } from './props/propTypes';
|
|
@@ -990,8 +992,12 @@ export class MultiSelectComponent extends React.Component {
|
|
|
990
992
|
boxSize,
|
|
991
993
|
isLoading,
|
|
992
994
|
selectAllText,
|
|
993
|
-
needSelectAll
|
|
995
|
+
needSelectAll,
|
|
996
|
+
customProps
|
|
994
997
|
} = this.props;
|
|
998
|
+
const {
|
|
999
|
+
suggestionsProps = {}
|
|
1000
|
+
} = customProps;
|
|
995
1001
|
const {
|
|
996
1002
|
selectedOptions,
|
|
997
1003
|
searchStr,
|
|
@@ -1064,7 +1070,7 @@ export class MultiSelectComponent extends React.Component {
|
|
|
1064
1070
|
eleRef: this.suggestionContainerRef
|
|
1065
1071
|
}, isSearching ? /*#__PURE__*/React.createElement("div", {
|
|
1066
1072
|
className: style[palette]
|
|
1067
|
-
}, searchText) : suggestions.length ? /*#__PURE__*/React.createElement(Suggestions, {
|
|
1073
|
+
}, searchText) : suggestions.length ? /*#__PURE__*/React.createElement(Suggestions, _extends({
|
|
1068
1074
|
suggestions: suggestions,
|
|
1069
1075
|
getRef: this.suggestionItemRef,
|
|
1070
1076
|
hoverOption: hoverOption,
|
|
@@ -1077,7 +1083,7 @@ export class MultiSelectComponent extends React.Component {
|
|
|
1077
1083
|
a11y: {
|
|
1078
1084
|
role: 'option'
|
|
1079
1085
|
}
|
|
1080
|
-
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
1086
|
+
}, suggestionsProps)) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
1081
1087
|
isLoading: isFetchingOptions,
|
|
1082
1088
|
options: options,
|
|
1083
1089
|
searchString: searchStr,
|
|
@@ -85,6 +85,7 @@ class MultiSelectWithAvatarComponent extends MultiSelectComponent {
|
|
|
85
85
|
needEffect,
|
|
86
86
|
isLoading,
|
|
87
87
|
keepSelectedOptions,
|
|
88
|
+
needMultiLineText,
|
|
88
89
|
customProps
|
|
89
90
|
} = this.props;
|
|
90
91
|
let {
|
|
@@ -170,7 +171,8 @@ class MultiSelectWithAvatarComponent extends MultiSelectComponent {
|
|
|
170
171
|
selectedOptions: selectedOptionIds,
|
|
171
172
|
a11y: {
|
|
172
173
|
role: 'option'
|
|
173
|
-
}
|
|
174
|
+
},
|
|
175
|
+
needMultiLineText: needMultiLineText
|
|
174
176
|
}, SuggestionsProps)) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
175
177
|
isLoading: isFetchingOptions,
|
|
176
178
|
options: options,
|
|
@@ -29,7 +29,8 @@ export default class Suggestions extends React.PureComponent {
|
|
|
29
29
|
avatarPalette,
|
|
30
30
|
palette,
|
|
31
31
|
htmlId,
|
|
32
|
-
a11y
|
|
32
|
+
a11y,
|
|
33
|
+
needMultiLineText
|
|
33
34
|
} = this.props;
|
|
34
35
|
const {
|
|
35
36
|
ariaParentRole,
|
|
@@ -94,7 +95,8 @@ export default class Suggestions extends React.PureComponent {
|
|
|
94
95
|
size: listItemSize,
|
|
95
96
|
avatarPalette: avatarPalette,
|
|
96
97
|
palette: palette,
|
|
97
|
-
a11y: list_a11y
|
|
98
|
+
a11y: list_a11y,
|
|
99
|
+
needMultiLineText: needMultiLineText
|
|
98
100
|
}));
|
|
99
101
|
} else if (optionType === 'icon') {
|
|
100
102
|
return /*#__PURE__*/React.createElement(ListItemWithIcon, _extends({}, commonProps, {
|
|
@@ -114,7 +116,8 @@ export default class Suggestions extends React.PureComponent {
|
|
|
114
116
|
iconSize: iconSize,
|
|
115
117
|
size: listItemSize,
|
|
116
118
|
palette: palette,
|
|
117
|
-
a11y: list_a11y
|
|
119
|
+
a11y: list_a11y,
|
|
120
|
+
needMultiLineText: needMultiLineText
|
|
118
121
|
}));
|
|
119
122
|
}
|
|
120
123
|
|
|
@@ -133,7 +136,8 @@ export default class Suggestions extends React.PureComponent {
|
|
|
133
136
|
active: isActive,
|
|
134
137
|
size: listItemSize,
|
|
135
138
|
palette: palette,
|
|
136
|
-
a11y: list_a11y
|
|
139
|
+
a11y: list_a11y,
|
|
140
|
+
needMultiLineText: needMultiLineText
|
|
137
141
|
}));
|
|
138
142
|
})));
|
|
139
143
|
}
|
|
@@ -35,7 +35,8 @@ export const AdvancedGroupMultiSelect_defaultProps = {
|
|
|
35
35
|
needEffect: true,
|
|
36
36
|
palette: 'default',
|
|
37
37
|
isLoading: false,
|
|
38
|
-
dataSelectorId: 'advancedGroupMultiSelect'
|
|
38
|
+
dataSelectorId: 'advancedGroupMultiSelect',
|
|
39
|
+
customProps: {}
|
|
39
40
|
};
|
|
40
41
|
export const AdvancedMultiSelect_defaultProps = {
|
|
41
42
|
animationStyle: 'bounce',
|
|
@@ -109,7 +110,9 @@ export const MultiSelect_defaultProps = {
|
|
|
109
110
|
dataSelectorId: 'multiSelect',
|
|
110
111
|
keepSelectedOptions: false,
|
|
111
112
|
selectedOptionsCount: 0,
|
|
112
|
-
cardHeaderName: ''
|
|
113
|
+
cardHeaderName: '',
|
|
114
|
+
needResponsive: true,
|
|
115
|
+
customProps: {}
|
|
113
116
|
};
|
|
114
117
|
export const MultiSelectHeader_defaultProps = {
|
|
115
118
|
dataId: 'MultiSelectHeader'
|
|
@@ -143,11 +146,14 @@ export const MultiSelectWithAvatar_defaultProps = {
|
|
|
143
146
|
isLoading: false,
|
|
144
147
|
dataSelectorId: 'multiSelectWithAvatar',
|
|
145
148
|
keepSelectedOptions: false,
|
|
149
|
+
needResponsive: true,
|
|
150
|
+
needMultiLineText: false,
|
|
146
151
|
customProps: {}
|
|
147
152
|
};
|
|
148
153
|
export const SelectedOptions_defaultProps = {
|
|
149
154
|
size: 'medium'
|
|
150
155
|
};
|
|
151
156
|
export const Suggestions_defaultProps = {
|
|
152
|
-
a11y: {}
|
|
157
|
+
a11y: {},
|
|
158
|
+
needMultiLineText: false
|
|
153
159
|
};
|
|
@@ -104,7 +104,8 @@ export const MultiSelect_propTypes = {
|
|
|
104
104
|
needSelectAll: PropTypes.bool,
|
|
105
105
|
selectAllText: PropTypes.string,
|
|
106
106
|
setAriaId: PropTypes.string,
|
|
107
|
-
ariaErrorId: PropTypes.string
|
|
107
|
+
ariaErrorId: PropTypes.string,
|
|
108
|
+
customProps: PropTypes.string
|
|
108
109
|
};
|
|
109
110
|
export const MultiSelectHeader_propTypes = {
|
|
110
111
|
dataId: PropTypes.string,
|
|
@@ -119,6 +120,7 @@ export const MultiSelectWithAvatar_propTypes = {
|
|
|
119
120
|
photoURL: PropTypes.string
|
|
120
121
|
}))]).isRequired,
|
|
121
122
|
imageField: PropTypes.string,
|
|
123
|
+
needMultiLineText: PropTypes.string,
|
|
122
124
|
customProps: PropTypes.shape({
|
|
123
125
|
SuggestionsProps: PropTypes.object,
|
|
124
126
|
DropBoxProps: PropTypes.object
|
|
@@ -168,7 +170,8 @@ export const Suggestions_propTypes = {
|
|
|
168
170
|
logo: PropTypes.string,
|
|
169
171
|
optionType: PropTypes.string,
|
|
170
172
|
listItemProps: PropTypes.object
|
|
171
|
-
}))
|
|
173
|
+
})),
|
|
174
|
+
needMultiLineText: PropTypes.bool
|
|
172
175
|
};
|
|
173
176
|
export const AdvancedGroupMultiSelect_propTypes = {
|
|
174
177
|
animationStyle: PropTypes.string,
|
|
@@ -234,7 +237,8 @@ export const AdvancedGroupMultiSelect_propTypes = {
|
|
|
234
237
|
needToCloseOnSelect: PropTypes.func,
|
|
235
238
|
searchStr: PropTypes.string,
|
|
236
239
|
children: PropTypes.node,
|
|
237
|
-
dataSelectorId: PropTypes.string
|
|
240
|
+
dataSelectorId: PropTypes.string,
|
|
241
|
+
customProps: PropTypes.string
|
|
238
242
|
};
|
|
239
243
|
export const AdvancedMultiSelect_propTypes = { ...MultiSelect_propTypes,
|
|
240
244
|
selectedOptionDetails: PropTypes.string,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
.popup {
|
|
2
2
|
position: relative;
|
|
3
|
-
|
|
4
|
-
background-color: var(--dot_white);
|
|
3
|
+
background-color: var(--zdt_popover_default_bg);
|
|
5
4
|
}
|
|
5
|
+
|
|
6
6
|
.target {
|
|
7
7
|
composes: offSelection from '../common/common.module.css';
|
|
8
8
|
cursor: pointer;
|
|
9
|
-
}
|
|
9
|
+
}
|
package/es/Radio/Radio.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
1
3
|
/* eslint css-modules/no-unused-class: [2, { markAsUsed: ['small', 'medium'] }] */
|
|
2
4
|
import React from 'react';
|
|
3
5
|
import { defaultProps } from './props/defaultProps';
|
|
@@ -9,6 +11,7 @@ export default class Radio extends React.Component {
|
|
|
9
11
|
constructor(props) {
|
|
10
12
|
super(props);
|
|
11
13
|
this.onChange = this.onChange.bind(this);
|
|
14
|
+
this.handleGetRef = this.handleGetRef.bind(this);
|
|
12
15
|
}
|
|
13
16
|
|
|
14
17
|
onChange(e) {
|
|
@@ -19,6 +22,14 @@ export default class Radio extends React.Component {
|
|
|
19
22
|
onChange && onChange(value, e);
|
|
20
23
|
}
|
|
21
24
|
|
|
25
|
+
handleGetRef(ele) {
|
|
26
|
+
let {
|
|
27
|
+
getRef,
|
|
28
|
+
value
|
|
29
|
+
} = this.props;
|
|
30
|
+
getRef && getRef(ele, value);
|
|
31
|
+
}
|
|
32
|
+
|
|
22
33
|
render() {
|
|
23
34
|
let {
|
|
24
35
|
id,
|
|
@@ -38,6 +49,8 @@ export default class Radio extends React.Component {
|
|
|
38
49
|
active,
|
|
39
50
|
isFilled,
|
|
40
51
|
customClass,
|
|
52
|
+
customProps,
|
|
53
|
+
children,
|
|
41
54
|
a11y
|
|
42
55
|
} = this.props;
|
|
43
56
|
let {
|
|
@@ -50,12 +63,17 @@ export default class Radio extends React.Component {
|
|
|
50
63
|
let {
|
|
51
64
|
ariaHidden,
|
|
52
65
|
role = 'radio',
|
|
66
|
+
tabIndex,
|
|
53
67
|
ariaChecked = checked,
|
|
54
68
|
ariaLabel,
|
|
55
69
|
ariaLabelledby,
|
|
56
70
|
ariaReadonly = isReadOnly || disabled ? true : false
|
|
57
71
|
} = a11y;
|
|
58
|
-
|
|
72
|
+
let {
|
|
73
|
+
ContainerProps = {},
|
|
74
|
+
LabelProps = {}
|
|
75
|
+
} = customProps;
|
|
76
|
+
return /*#__PURE__*/React.createElement(Container, _extends({
|
|
59
77
|
dataId: value ? value.toLowerCase() : 'RadioComp',
|
|
60
78
|
isCover: false,
|
|
61
79
|
isInline: text ? false : true,
|
|
@@ -65,13 +83,14 @@ export default class Radio extends React.Component {
|
|
|
65
83
|
"data-title": toolTip,
|
|
66
84
|
onClick: !isReadOnly && !disabled ? this.onChange : '',
|
|
67
85
|
"aria-checked": ariaChecked,
|
|
68
|
-
tabindex: isReadOnly || disabled || ariaHidden ? '-1' : '0',
|
|
86
|
+
tabindex: isReadOnly || disabled || ariaHidden ? '-1' : tabIndex || '0',
|
|
87
|
+
eleRef: this.handleGetRef,
|
|
69
88
|
role: role,
|
|
70
89
|
"aria-Hidden": ariaHidden,
|
|
71
90
|
"aria-label": ariaLabel,
|
|
72
91
|
"aria-labelledby": ariaLabelledby,
|
|
73
92
|
"aria-readonly": ariaReadonly
|
|
74
|
-
}, /*#__PURE__*/React.createElement(Box, {
|
|
93
|
+
}, ContainerProps), /*#__PURE__*/React.createElement(Box, {
|
|
75
94
|
className: `${style.radio} ${checked ? `${style[`rdBox${palette}`]}` : ''}
|
|
76
95
|
${isReadOnly || disabled ? '' : `${style[`hover${palette}`]}`} ${style[size]} ${isFilled ? style.filled : ''} ${style[`centerPath${palette}`]} ${customRadio}`
|
|
77
96
|
}, /*#__PURE__*/React.createElement("input", {
|
|
@@ -97,18 +116,18 @@ export default class Radio extends React.Component {
|
|
|
97
116
|
}) : null))), text && /*#__PURE__*/React.createElement(Box, {
|
|
98
117
|
flexible: true,
|
|
99
118
|
className: style.text
|
|
100
|
-
}, /*#__PURE__*/React.createElement(Label, {
|
|
119
|
+
}, /*#__PURE__*/React.createElement(Label, _extends({
|
|
101
120
|
text: text,
|
|
102
|
-
palette:
|
|
121
|
+
palette: labelPalette,
|
|
103
122
|
size: labelSize,
|
|
104
123
|
type: "title",
|
|
105
124
|
clipped: true,
|
|
106
125
|
dataId: `${text}_label`,
|
|
107
126
|
variant: variant,
|
|
108
127
|
title: toolTip ? toolTip : text,
|
|
109
|
-
customClass: `${checked && active
|
|
128
|
+
customClass: `${checked && active ? `${style[`${palette}checkedActive`]}` : ''}
|
|
110
129
|
${style[`${palette}Label`]} ${accessMode} ${customLabel}`
|
|
111
|
-
})));
|
|
130
|
+
}, LabelProps))), children);
|
|
112
131
|
}
|
|
113
132
|
|
|
114
133
|
}
|
|
@@ -21,11 +21,13 @@
|
|
|
21
21
|
.readonly, .disabled {
|
|
22
22
|
cursor: not-allowed;
|
|
23
23
|
}
|
|
24
|
+
.disabled {
|
|
25
|
+
opacity: 0.7
|
|
26
|
+
}
|
|
24
27
|
.radio {
|
|
25
28
|
composes: offSelection from '../common/common.module.css';
|
|
26
29
|
width: var(--radio_width);
|
|
27
30
|
height: var(--radio_height);
|
|
28
|
-
/* css:theme-validation:ignore */
|
|
29
31
|
stroke: var(--radio_stroke_color);
|
|
30
32
|
background: var(--radio_bg_color);
|
|
31
33
|
border-radius: 50%;
|
|
@@ -1145,7 +1145,7 @@ exports[`Radio rendering the accessMode when disabled 1`] = `
|
|
|
1145
1145
|
data-test-id="boxComponent"
|
|
1146
1146
|
>
|
|
1147
1147
|
<label
|
|
1148
|
-
class="label title medium
|
|
1148
|
+
class="label title medium default font_default
|
|
1149
1149
|
dotted cursor
|
|
1150
1150
|
primaryLabel disabled "
|
|
1151
1151
|
data-id="RadioText_label"
|
|
@@ -1505,7 +1505,7 @@ exports[`Radio rendering the disabled is true 1`] = `
|
|
|
1505
1505
|
data-test-id="boxComponent"
|
|
1506
1506
|
>
|
|
1507
1507
|
<label
|
|
1508
|
-
class="label title medium
|
|
1508
|
+
class="label title medium default font_default
|
|
1509
1509
|
dotted cursor
|
|
1510
1510
|
undefined disabled "
|
|
1511
1511
|
data-id="RadioText_label"
|
|
@@ -1567,7 +1567,7 @@ exports[`Radio rendering the disabledTitle 1`] = `
|
|
|
1567
1567
|
data-test-id="boxComponent"
|
|
1568
1568
|
>
|
|
1569
1569
|
<label
|
|
1570
|
-
class="label title medium
|
|
1570
|
+
class="label title medium default font_default
|
|
1571
1571
|
dotted cursor
|
|
1572
1572
|
primaryLabel disabled "
|
|
1573
1573
|
data-id="RadioText_label"
|
|
@@ -4,6 +4,7 @@ export const propTypes = {
|
|
|
4
4
|
checked: PropTypes.bool,
|
|
5
5
|
disabled: PropTypes.bool,
|
|
6
6
|
disabledTitle: PropTypes.string,
|
|
7
|
+
getRef: PropTypes.func,
|
|
7
8
|
id: PropTypes.string,
|
|
8
9
|
isFilled: PropTypes.bool,
|
|
9
10
|
isReadOnly: PropTypes.bool,
|
|
@@ -20,14 +21,20 @@ export const propTypes = {
|
|
|
20
21
|
customRadio: PropTypes.string,
|
|
21
22
|
customLabel: PropTypes.string
|
|
22
23
|
}),
|
|
24
|
+
customProps: PropTypes.exact({
|
|
25
|
+
ContainerProps: PropTypes.object,
|
|
26
|
+
LabelProps: PropTypes.object
|
|
27
|
+
}),
|
|
23
28
|
a11y: PropTypes.shape({
|
|
24
29
|
ariaChecked: PropTypes.bool,
|
|
25
30
|
ariaHidden: PropTypes.bool,
|
|
26
31
|
role: PropTypes.string,
|
|
32
|
+
tabIndex: PropTypes.oneOfType(PropTypes.string, PropTypes.number),
|
|
27
33
|
ariaLabelledby: PropTypes.string,
|
|
28
34
|
ariaLabel: PropTypes.string,
|
|
29
35
|
ariaReadonly: PropTypes.bool
|
|
30
36
|
}),
|
|
37
|
+
children: PropTypes.node,
|
|
31
38
|
onChange: PropTypes.func,
|
|
32
39
|
text: PropTypes.string
|
|
33
40
|
};
|
|
@@ -36,12 +36,9 @@
|
|
|
36
36
|
.basic {
|
|
37
37
|
composes: varClass;
|
|
38
38
|
position: relative;
|
|
39
|
-
/* css:theme-validation:ignore */
|
|
40
39
|
color: var(--ribbon_text_color);
|
|
41
40
|
text-transform: var(--ribbon_text_transform);
|
|
42
41
|
font-size: var(--ribbon_font_size);
|
|
43
|
-
/* css:theme-validation:ignore */
|
|
44
|
-
/* css:theme-validation:ignore */
|
|
45
42
|
line-height: var(--ribbon_line_height);
|
|
46
43
|
padding: var(--ribbon_padding);
|
|
47
44
|
background-color: var(--ribbon_bg_color);
|
|
@@ -368,7 +365,6 @@
|
|
|
368
365
|
position: absolute;
|
|
369
366
|
content: '';
|
|
370
367
|
top: var(--ribbon_tag_before_top);
|
|
371
|
-
/* css:theme-validation:ignore */
|
|
372
368
|
width: var(--ribbon_tag_before_width);
|
|
373
369
|
height: var(--ribbon_tag_before_height);
|
|
374
370
|
background-color: inherit;
|
package/es/Select/GroupSelect.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
1
3
|
/**** Libraries ****/
|
|
2
4
|
import React, { PureComponent } from 'react';
|
|
3
5
|
import { GroupSelect_defaultProps } from './props/defaultProps';
|
|
@@ -584,8 +586,12 @@ export class GroupSelectComponent extends PureComponent {
|
|
|
584
586
|
htmlId,
|
|
585
587
|
iconOnHover,
|
|
586
588
|
isLoading,
|
|
587
|
-
dataSelectorId
|
|
589
|
+
dataSelectorId,
|
|
590
|
+
customProps
|
|
588
591
|
} = this.props;
|
|
592
|
+
const {
|
|
593
|
+
suggestionsProps = {}
|
|
594
|
+
} = customProps;
|
|
589
595
|
i18nKeys = Object.assign({}, i18nKeys, {
|
|
590
596
|
emptyText: i18nKeys.emptyText || emptyMessage,
|
|
591
597
|
searchEmptyText: i18nKeys.searchEmptyText || searchEmptyMessage
|
|
@@ -750,7 +756,7 @@ export class GroupSelectComponent extends PureComponent {
|
|
|
750
756
|
a11y: {
|
|
751
757
|
role: 'heading'
|
|
752
758
|
}
|
|
753
|
-
})), /*#__PURE__*/React.createElement(Suggestions, {
|
|
759
|
+
})), /*#__PURE__*/React.createElement(Suggestions, _extends({
|
|
754
760
|
activeId: selectedId,
|
|
755
761
|
suggestions: options,
|
|
756
762
|
getRef: this.suggestionItemRef,
|
|
@@ -765,7 +771,7 @@ export class GroupSelectComponent extends PureComponent {
|
|
|
765
771
|
ariaParentRole: 'listbox',
|
|
766
772
|
role: 'option'
|
|
767
773
|
}
|
|
768
|
-
}));
|
|
774
|
+
}, suggestionsProps)));
|
|
769
775
|
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
770
776
|
options: revampedGroups,
|
|
771
777
|
searchString: searchStr,
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
1
3
|
/**** Libraries ****/
|
|
2
4
|
import React from 'react';
|
|
3
5
|
import { SelectWithAvatar_defaultProps } from './props/defaultProps';
|
|
@@ -158,8 +160,12 @@ class SelectWithAvatarComponent extends SelectComponent {
|
|
|
158
160
|
htmlId,
|
|
159
161
|
needEffect,
|
|
160
162
|
isLoading,
|
|
161
|
-
dataSelectorId
|
|
163
|
+
dataSelectorId,
|
|
164
|
+
customProps
|
|
162
165
|
} = this.props;
|
|
166
|
+
const {
|
|
167
|
+
suggestionsProps = {}
|
|
168
|
+
} = customProps;
|
|
163
169
|
i18nKeys = Object.assign({}, i18nKeys, {
|
|
164
170
|
emptyText: i18nKeys.emptyText || emptyMessage,
|
|
165
171
|
searchEmptyText: i18nKeys.searchEmptyText || searchEmptyMessage
|
|
@@ -294,7 +300,7 @@ class SelectWithAvatarComponent extends SelectComponent {
|
|
|
294
300
|
a11y: {
|
|
295
301
|
role: 'heading'
|
|
296
302
|
}
|
|
297
|
-
})) : null, suggestions.length ? /*#__PURE__*/React.createElement(Suggestions, {
|
|
303
|
+
})) : null, suggestions.length ? /*#__PURE__*/React.createElement(Suggestions, _extends({
|
|
298
304
|
activeId: selectedId,
|
|
299
305
|
suggestions: suggestions,
|
|
300
306
|
getRef: this.suggestionItemRef,
|
|
@@ -310,7 +316,7 @@ class SelectWithAvatarComponent extends SelectComponent {
|
|
|
310
316
|
ariaParentRole: 'listbox',
|
|
311
317
|
role: 'option'
|
|
312
318
|
}
|
|
313
|
-
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
319
|
+
}, suggestionsProps)) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
314
320
|
isLoading: isFetchingOptions,
|
|
315
321
|
options: options,
|
|
316
322
|
searchString: searchStr,
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
1
3
|
import React, { Component } from 'react';
|
|
2
4
|
import { SelectWithIcon_defaultProps } from './props/defaultProps';
|
|
3
5
|
import { SelectWithIcon_propTypes } from './props/propTypes';
|
|
@@ -345,8 +347,12 @@ class SelectWithIcon extends Component {
|
|
|
345
347
|
i18nKeys,
|
|
346
348
|
htmlId,
|
|
347
349
|
isLoading,
|
|
348
|
-
dataSelectorId
|
|
350
|
+
dataSelectorId,
|
|
351
|
+
customProps
|
|
349
352
|
} = this.props;
|
|
353
|
+
const {
|
|
354
|
+
listItemProps = {}
|
|
355
|
+
} = customProps;
|
|
350
356
|
i18nKeys = Object.assign({}, i18nKeys, {
|
|
351
357
|
emptyText: i18nKeys.emptyText || emptyMessage,
|
|
352
358
|
searchEmptyText: i18nKeys.searchEmptyText || searchEmptyMessage
|
|
@@ -477,7 +483,7 @@ class SelectWithIcon extends Component {
|
|
|
477
483
|
iconSize,
|
|
478
484
|
iconColor
|
|
479
485
|
} = options;
|
|
480
|
-
return /*#__PURE__*/React.createElement(ListItemWithIcon, {
|
|
486
|
+
return /*#__PURE__*/React.createElement(ListItemWithIcon, _extends({
|
|
481
487
|
key: options[idKey],
|
|
482
488
|
value: options[valueKey],
|
|
483
489
|
size: "medium",
|
|
@@ -501,7 +507,7 @@ class SelectWithIcon extends Component {
|
|
|
501
507
|
ariaSelected: selectedId === options[idKey],
|
|
502
508
|
ariaLabel: options[valueKey]
|
|
503
509
|
}
|
|
504
|
-
});
|
|
510
|
+
}, listItemProps));
|
|
505
511
|
})) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
506
512
|
isLoading: isFetchingOptions,
|
|
507
513
|
options: options,
|
|
@@ -66,7 +66,8 @@ export const GroupSelect_defaultProps = {
|
|
|
66
66
|
isSearchClearOnClose: true,
|
|
67
67
|
i18nKeys: {},
|
|
68
68
|
iconOnHover: false,
|
|
69
|
-
isLoading: false
|
|
69
|
+
isLoading: false,
|
|
70
|
+
customProps: {}
|
|
70
71
|
};
|
|
71
72
|
export const SelectWithAvatar_defaultProps = {
|
|
72
73
|
animationStyle: 'bounce',
|
|
@@ -90,7 +91,8 @@ export const SelectWithAvatar_defaultProps = {
|
|
|
90
91
|
isSearchClearOnClose: true,
|
|
91
92
|
i18nKeys: {},
|
|
92
93
|
needEffect: true,
|
|
93
|
-
isLoading: false
|
|
94
|
+
isLoading: false,
|
|
95
|
+
customProps: {}
|
|
94
96
|
};
|
|
95
97
|
export const SelectWithIcon_defaultProps = {
|
|
96
98
|
isReadOnly: false,
|
|
@@ -115,5 +117,6 @@ export const SelectWithIcon_defaultProps = {
|
|
|
115
117
|
needIcon: true,
|
|
116
118
|
iconSize: '14',
|
|
117
119
|
i18nKeys: {},
|
|
118
|
-
isLoading: false
|
|
120
|
+
isLoading: false,
|
|
121
|
+
customProps: {}
|
|
119
122
|
};
|
|
@@ -169,7 +169,8 @@ export const GroupSelect_propTypes = {
|
|
|
169
169
|
}),
|
|
170
170
|
isLoading: PropTypes.bool,
|
|
171
171
|
dataSelectorId: PropTypes.string,
|
|
172
|
-
isDefaultSelectValue: PropTypes.bool
|
|
172
|
+
isDefaultSelectValue: PropTypes.bool,
|
|
173
|
+
customProps: PropTypes.string
|
|
173
174
|
};
|
|
174
175
|
export const SelectWithAvatar_propTypes = { ...Select_propTypes,
|
|
175
176
|
textBoxClass: PropTypes.string,
|
|
@@ -230,7 +231,8 @@ export const SelectWithAvatar_propTypes = { ...Select_propTypes,
|
|
|
230
231
|
htmlId: PropTypes.string,
|
|
231
232
|
needEffect: PropTypes.bool,
|
|
232
233
|
isLoading: PropTypes.bool,
|
|
233
|
-
dataSelectorId: PropTypes.string
|
|
234
|
+
dataSelectorId: PropTypes.string,
|
|
235
|
+
customProps: PropTypes.string
|
|
234
236
|
};
|
|
235
237
|
export const SelectWithIcon_propTypes = {
|
|
236
238
|
animationStyle: PropTypes.oneOf(['default', 'bounce']),
|
|
@@ -284,5 +286,6 @@ export const SelectWithIcon_propTypes = {
|
|
|
284
286
|
searchBoxSize: PropTypes.string,
|
|
285
287
|
needResponsive: PropTypes.bool,
|
|
286
288
|
boxSize: PropTypes.string,
|
|
287
|
-
emptyMessage: PropTypes.string
|
|
289
|
+
emptyMessage: PropTypes.string,
|
|
290
|
+
customProps: PropTypes.string
|
|
288
291
|
};
|
|
@@ -26,7 +26,6 @@
|
|
|
26
26
|
display: inline-block;
|
|
27
27
|
position: relative;
|
|
28
28
|
transition: box-shadow var(--zd_transition3) ease-in-out;
|
|
29
|
-
/* css:theme-validation:ignore */
|
|
30
29
|
background-color: var(--switch_off_bg_color);
|
|
31
30
|
border-radius: 20px;
|
|
32
31
|
cursor: pointer;
|
|
@@ -45,7 +44,6 @@
|
|
|
45
44
|
right: 50% ;
|
|
46
45
|
transition: all var(--zd_transition2);
|
|
47
46
|
box-shadow: var(--switch_cricle_box_shadow);
|
|
48
|
-
/* css:theme-validation:ignore */
|
|
49
47
|
background-color: var(--switch_circle_bg_color);
|
|
50
48
|
border-radius: var(--switch_circle_border_radius);
|
|
51
49
|
}
|
package/es/Tag/Tag.module.css
CHANGED
|
@@ -34,13 +34,10 @@
|
|
|
34
34
|
composes: dInflex alignVertical flexrow from '../common/common.module.css';
|
|
35
35
|
position: relative;
|
|
36
36
|
vertical-align: middle;
|
|
37
|
-
/* css:theme-validation:ignore */
|
|
38
37
|
color: var(--tag_text_color);
|
|
39
|
-
/* css:theme-validation:ignore */
|
|
40
38
|
font-size: var(--tag_font_size);
|
|
41
39
|
letter-spacing: var(--tag_letter_spacing);
|
|
42
40
|
height: var(--tag_height);
|
|
43
|
-
/* css:theme-validation:ignore */
|
|
44
41
|
max-width: 100% ;
|
|
45
42
|
background-color: var(--tag_bg_color);
|
|
46
43
|
border-radius: var(--tag_border_radius);
|
|
@@ -125,13 +122,11 @@
|
|
|
125
122
|
display: block;
|
|
126
123
|
}
|
|
127
124
|
.close {
|
|
128
|
-
/* css:theme-validation:ignore */
|
|
129
125
|
color: var(--tag_closeicon_color);
|
|
130
126
|
display: none;
|
|
131
127
|
position: absolute;
|
|
132
128
|
top: 0 ;
|
|
133
129
|
bottom: 0 ;
|
|
134
|
-
/* css:theme-validation:ignore */
|
|
135
130
|
padding: var(--tag_closeicon_padding);
|
|
136
131
|
cursor: var(--tag_closeicon_cursor);
|
|
137
132
|
border-radius: var(--tag_closeicon_border_radius);
|
|
@@ -229,7 +224,6 @@
|
|
|
229
224
|
}
|
|
230
225
|
|
|
231
226
|
.icon {
|
|
232
|
-
/* css:theme-validation:ignore */
|
|
233
227
|
margin: var(--tag_icon_margin);
|
|
234
228
|
background-color: var(--tag_icon_bg_color);
|
|
235
229
|
}
|