@zohodesk/components 1.2.24 → 1.2.26
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 +11 -0
- package/es/DropBox/DropBox.js +5 -15
- package/es/DropBox/utils/isMobilePopover.js +17 -0
- package/es/MultiSelect/MultiSelect.js +75 -92
- package/es/MultiSelect/MultiSelectWithAvatar.js +73 -90
- package/es/RippleEffect/RippleEffect.js +3 -2
- package/es/RippleEffect/props/defaultProps.js +1 -0
- package/es/RippleEffect/props/propTypes.js +1 -0
- package/es/Tag/Tag.js +1 -1
- package/es/v1/DropBox/DropBox.js +3 -14
- package/es/v1/DropBox/utils/isMobilePopover.js +17 -0
- package/es/v1/MultiSelect/MultiSelect.js +75 -93
- package/es/v1/MultiSelect/MultiSelectWithAvatar.js +74 -91
- package/es/v1/RippleEffect/RippleEffect.js +3 -2
- package/es/v1/RippleEffect/props/defaultProps.js +1 -0
- package/es/v1/RippleEffect/props/propTypes.js +1 -0
- package/es/v1/Tag/Tag.js +1 -1
- package/lib/DropBox/DropBox.js +3 -13
- package/lib/DropBox/utils/isMobilePopover.js +25 -0
- package/lib/MultiSelect/MultiSelect.js +74 -91
- package/lib/MultiSelect/MultiSelectWithAvatar.js +72 -89
- package/lib/RippleEffect/RippleEffect.js +5 -4
- package/lib/RippleEffect/props/defaultProps.js +1 -0
- package/lib/RippleEffect/props/propTypes.js +1 -0
- package/lib/Tag/Tag.js +1 -1
- package/lib/v1/DropBox/DropBox.js +3 -13
- package/lib/v1/DropBox/utils/isMobilePopover.js +25 -0
- package/lib/v1/MultiSelect/MultiSelect.js +76 -93
- package/lib/v1/MultiSelect/MultiSelectWithAvatar.js +71 -90
- package/lib/v1/RippleEffect/RippleEffect.js +5 -4
- package/lib/v1/RippleEffect/props/defaultProps.js +1 -0
- package/lib/v1/RippleEffect/props/propTypes.js +1 -0
- package/lib/v1/Tag/Tag.js +1 -1
- package/package.json +5 -5
- package/result.json +1 -1
|
@@ -17,8 +17,8 @@ import MultiSelectHeader from './MultiSelectHeader';
|
|
|
17
17
|
import CssProvider from '../../Provider/CssProvider';
|
|
18
18
|
import { getUniqueId } from '../../Provider/IdProvider';
|
|
19
19
|
import ResponsiveDropBox from '../ResponsiveDropBox/ResponsiveDropBox';
|
|
20
|
-
import { ResponsiveReceiver } from '../Responsive/CustomResponsive';
|
|
21
20
|
import Loader from '@zohodesk/svg/lib/Loader/Loader';
|
|
21
|
+
import isMobilePopover from '../DropBox/utils/isMobilePopover';
|
|
22
22
|
/**** Icons ****/
|
|
23
23
|
|
|
24
24
|
import { Icon } from '@zohodesk/icons';
|
|
@@ -28,8 +28,8 @@ import style from '../../MultiSelect/MultiSelect.module.css';
|
|
|
28
28
|
/**** Methods ****/
|
|
29
29
|
|
|
30
30
|
import { debounce, scrollTo, bind, getIsEmptyValue, getSearchString, findScrollEnd } from '../../utils/Common.js';
|
|
31
|
-
import { makeFormatOptions, makeGetMultiSelectFilterSuggestions as makeGetFilterSuggestions, makeGetMultiSelectSelectedOptions as makeGetSelectedOptions, makeObjectConcat, filterSelectedOptions, makeGetIsShowClearIcon } from '../../utils/dropDownUtils';
|
|
32
|
-
|
|
31
|
+
import { makeFormatOptions, makeGetMultiSelectFilterSuggestions as makeGetFilterSuggestions, makeGetMultiSelectSelectedOptions as makeGetSelectedOptions, makeObjectConcat, filterSelectedOptions, makeGetIsShowClearIcon } from '../../utils/dropDownUtils'; // import { getLibraryConfig } from '../../Provider/Config';
|
|
32
|
+
|
|
33
33
|
/* eslint-disable react/forbid-component-props */
|
|
34
34
|
|
|
35
35
|
/* eslint-disable react/no-unused-prop-types */
|
|
@@ -840,17 +840,6 @@ export class MultiSelectComponent extends React.Component {
|
|
|
840
840
|
});
|
|
841
841
|
}
|
|
842
842
|
|
|
843
|
-
responsiveFunc(_ref) {
|
|
844
|
-
let {
|
|
845
|
-
mediaQueryOR
|
|
846
|
-
} = _ref;
|
|
847
|
-
return {
|
|
848
|
-
tabletMode: mediaQueryOR([{
|
|
849
|
-
maxWidth: 700
|
|
850
|
-
}])
|
|
851
|
-
};
|
|
852
|
-
}
|
|
853
|
-
|
|
854
843
|
getSelectionUI() {
|
|
855
844
|
let isResponsive = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
856
845
|
let {
|
|
@@ -1023,6 +1012,7 @@ export class MultiSelectComponent extends React.Component {
|
|
|
1023
1012
|
searchEmptyText: i18nKeys.searchEmptyText || searchEmptyMessage,
|
|
1024
1013
|
noMoreText: i18nKeys.noMoreText || noMoreOptionsMessage
|
|
1025
1014
|
});
|
|
1015
|
+
let isModel = isMobilePopover(needResponsive);
|
|
1026
1016
|
return /*#__PURE__*/React.createElement("div", {
|
|
1027
1017
|
className: `${style.wrapper} ${isDisabled ? style.disabled : ''} ${isReadOnly ? style.readOnly : ''} ${disableAction ? CssProvider('isBlock') : ''} ${borderColor === 'transparent' ? style.transparentContainer : ''} ${needEffect && !(isDisabled || isReadOnly) ? style.effect : ''}`,
|
|
1028
1018
|
"data-id": `${isDisabled ? `${dataId}_disabled` : isReadOnly ? `${dataId}_readOnly` : dataId}`,
|
|
@@ -1030,85 +1020,77 @@ export class MultiSelectComponent extends React.Component {
|
|
|
1030
1020
|
"data-title": isDisabled ? title : null,
|
|
1031
1021
|
onClick: this.handleInputFocus,
|
|
1032
1022
|
"data-selector-id": dataSelectorId
|
|
1033
|
-
}, this.getSelectionUI(), !isReadOnly && !isDisabled && !disableAction && isPopupOpen ? /*#__PURE__*/React.createElement(
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
palette: palette,
|
|
1105
|
-
i18nKeys: i18nKeys,
|
|
1106
|
-
htmlId: ariaErrorId
|
|
1107
|
-
}), isFetchingOptions && /*#__PURE__*/React.createElement(Container, {
|
|
1108
|
-
isCover: false,
|
|
1109
|
-
align: "both"
|
|
1110
|
-
}, /*#__PURE__*/React.createElement(Loader, null))), getFooter ? /*#__PURE__*/React.createElement(CardFooter, null, getFooter()) : null)));
|
|
1111
|
-
}) : null);
|
|
1023
|
+
}, this.getSelectionUI(), !isReadOnly && !isDisabled && !disableAction && isPopupOpen ? /*#__PURE__*/React.createElement(ResponsiveDropBox, {
|
|
1024
|
+
animationStyle: animationStyle,
|
|
1025
|
+
boxPosition: position || `${defaultDropBoxPosition}`,
|
|
1026
|
+
getRef: getContainerRef,
|
|
1027
|
+
isActive: isPopupReady,
|
|
1028
|
+
isAnimate: isAnimate,
|
|
1029
|
+
isArrow: false,
|
|
1030
|
+
onClick: removeClose,
|
|
1031
|
+
needResponsive: needResponsive,
|
|
1032
|
+
isPadding: false,
|
|
1033
|
+
isBoxPaddingNeed: isBoxPaddingNeed,
|
|
1034
|
+
palette: palette,
|
|
1035
|
+
htmlId: setAriaId,
|
|
1036
|
+
a11y: {
|
|
1037
|
+
role: 'listbox',
|
|
1038
|
+
ariaMultiselectable: true
|
|
1039
|
+
},
|
|
1040
|
+
size: boxSize,
|
|
1041
|
+
alignBox: "row",
|
|
1042
|
+
isResponsivePadding: getFooter ? false : true
|
|
1043
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
1044
|
+
flexible: true
|
|
1045
|
+
}, /*#__PURE__*/React.createElement(Card, {
|
|
1046
|
+
customClass: `${style.box} ${style[`${palette}Box`]}`,
|
|
1047
|
+
onScroll: this.handleScroll
|
|
1048
|
+
}, isModel && /*#__PURE__*/React.createElement(MobileHeader, {
|
|
1049
|
+
selectedOptions: selectedOptions,
|
|
1050
|
+
i18nKeys: i18nKeys,
|
|
1051
|
+
onClick: this.handlePopupClose
|
|
1052
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1053
|
+
className: style.effect
|
|
1054
|
+
}, this.getSelectionUI(true))), needSelectAll ? /*#__PURE__*/React.createElement(CardHeader, null, /*#__PURE__*/React.createElement(MultiSelectHeader, {
|
|
1055
|
+
onSelect: this.handleSelectAll,
|
|
1056
|
+
selectAllText: selectAllText,
|
|
1057
|
+
suggestions: suggestions,
|
|
1058
|
+
dataId: dataId
|
|
1059
|
+
})) : null, isLoading ? /*#__PURE__*/React.createElement(Container, {
|
|
1060
|
+
align: "both",
|
|
1061
|
+
className: style.loader
|
|
1062
|
+
}, /*#__PURE__*/React.createElement(Loader, null)) : /*#__PURE__*/React.createElement(CardContent, {
|
|
1063
|
+
shrink: true,
|
|
1064
|
+
customClass: !isModel && dropBoxSize ? style[dropBoxSize] : '',
|
|
1065
|
+
eleRef: this.suggestionContainerRef
|
|
1066
|
+
}, isSearching ? /*#__PURE__*/React.createElement("div", {
|
|
1067
|
+
className: style[palette]
|
|
1068
|
+
}, searchText) : suggestions.length ? /*#__PURE__*/React.createElement(Suggestions, {
|
|
1069
|
+
suggestions: suggestions,
|
|
1070
|
+
getRef: this.suggestionItemRef,
|
|
1071
|
+
hoverOption: hoverOption,
|
|
1072
|
+
onClick: this.handleSelectOption,
|
|
1073
|
+
onMouseEnter: this.handleMouseEnter,
|
|
1074
|
+
needBorder: false,
|
|
1075
|
+
dataId: `${dataId}_Options`,
|
|
1076
|
+
palette: palette,
|
|
1077
|
+
selectedOptions: selectedOptionIds,
|
|
1078
|
+
a11y: {
|
|
1079
|
+
role: 'option'
|
|
1080
|
+
}
|
|
1081
|
+
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
1082
|
+
isLoading: isFetchingOptions,
|
|
1083
|
+
options: options,
|
|
1084
|
+
searchString: searchStr,
|
|
1085
|
+
suggestions: suggestions,
|
|
1086
|
+
dataId: dataId,
|
|
1087
|
+
palette: palette,
|
|
1088
|
+
i18nKeys: i18nKeys,
|
|
1089
|
+
htmlId: ariaErrorId
|
|
1090
|
+
}), isFetchingOptions && /*#__PURE__*/React.createElement(Container, {
|
|
1091
|
+
isCover: false,
|
|
1092
|
+
align: "both"
|
|
1093
|
+
}, /*#__PURE__*/React.createElement(Loader, null))), getFooter ? /*#__PURE__*/React.createElement(CardFooter, null, getFooter()) : null))) : null);
|
|
1112
1094
|
}
|
|
1113
1095
|
|
|
1114
1096
|
}
|
|
@@ -17,12 +17,13 @@ import MobileHeader from './MobileHeader/MobileHeader';
|
|
|
17
17
|
import MultiSelectHeader from './MultiSelectHeader';
|
|
18
18
|
import CssProvider from '../../Provider/CssProvider';
|
|
19
19
|
import { getUniqueId } from '../../Provider/IdProvider';
|
|
20
|
-
import ResponsiveDropBox from '../ResponsiveDropBox/ResponsiveDropBox';
|
|
21
|
-
|
|
20
|
+
import ResponsiveDropBox from '../ResponsiveDropBox/ResponsiveDropBox'; // import { ResponsiveReceiver } from '../Responsive/CustomResponsive';
|
|
21
|
+
|
|
22
22
|
import Loader from '@zohodesk/svg/lib/Loader/Loader';
|
|
23
|
+
import isMobilePopover from '../DropBox/utils/isMobilePopover';
|
|
23
24
|
/**** Icons ****/
|
|
25
|
+
// import { Icon } from '@zohodesk/icons';
|
|
24
26
|
|
|
25
|
-
import { Icon } from '@zohodesk/icons';
|
|
26
27
|
/**** CSS ****/
|
|
27
28
|
|
|
28
29
|
import style from '../../MultiSelect/MultiSelect.module.css';
|
|
@@ -57,17 +58,6 @@ class MultiSelectWithAvatarComponent extends MultiSelectComponent {
|
|
|
57
58
|
});
|
|
58
59
|
}
|
|
59
60
|
|
|
60
|
-
responsiveFunc(_ref) {
|
|
61
|
-
let {
|
|
62
|
-
mediaQueryOR
|
|
63
|
-
} = _ref;
|
|
64
|
-
return {
|
|
65
|
-
tabletMode: mediaQueryOR([{
|
|
66
|
-
maxWidth: 700
|
|
67
|
-
}])
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
|
|
71
61
|
render() {
|
|
72
62
|
let {
|
|
73
63
|
isReadOnly,
|
|
@@ -108,6 +98,7 @@ class MultiSelectWithAvatarComponent extends MultiSelectComponent {
|
|
|
108
98
|
searchEmptyText: i18nKeys.searchEmptyText || searchEmptyMessage,
|
|
109
99
|
noMoreText: i18nKeys.noMoreText || noMoreOptionsMessage
|
|
110
100
|
});
|
|
101
|
+
let isModel = isMobilePopover(needResponsive);
|
|
111
102
|
const {
|
|
112
103
|
selectedOptions,
|
|
113
104
|
searchStr,
|
|
@@ -127,83 +118,75 @@ class MultiSelectWithAvatarComponent extends MultiSelectComponent {
|
|
|
127
118
|
"data-title": isDisabled ? title : null,
|
|
128
119
|
onClick: this.handleInputFocus,
|
|
129
120
|
"data-selector-id": dataSelectorId
|
|
130
|
-
}, this.getSelectionUI(), popUpState ? /*#__PURE__*/React.createElement(
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
palette: palette,
|
|
200
|
-
i18nKeys: i18nKeys,
|
|
201
|
-
htmlId: ariaErrorId
|
|
202
|
-
}), isFetchingOptions && /*#__PURE__*/React.createElement(Container, {
|
|
203
|
-
isCover: false,
|
|
204
|
-
align: "both"
|
|
205
|
-
}, /*#__PURE__*/React.createElement(Loader, null))))));
|
|
206
|
-
}) : null);
|
|
121
|
+
}, this.getSelectionUI(), popUpState ? /*#__PURE__*/React.createElement(ResponsiveDropBox, {
|
|
122
|
+
animationStyle: animationStyle,
|
|
123
|
+
boxPosition: position || `${defaultDropBoxPosition}Center`,
|
|
124
|
+
getRef: getContainerRef,
|
|
125
|
+
isActive: isPopupReady,
|
|
126
|
+
isAnimate: isAnimate,
|
|
127
|
+
isArrow: false,
|
|
128
|
+
onClick: removeClose,
|
|
129
|
+
needResponsive: needResponsive,
|
|
130
|
+
isPadding: false,
|
|
131
|
+
isBoxPaddingNeed: isBoxPaddingNeed,
|
|
132
|
+
palette: palette,
|
|
133
|
+
htmlId: setAriaId,
|
|
134
|
+
a11y: {
|
|
135
|
+
ariaMultiselectable: true,
|
|
136
|
+
role: 'listbox'
|
|
137
|
+
},
|
|
138
|
+
isResponsivePadding: true,
|
|
139
|
+
alignBox: "row"
|
|
140
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
141
|
+
flexible: true
|
|
142
|
+
}, /*#__PURE__*/React.createElement(Card, {
|
|
143
|
+
customClass: `${style.box} ${style[`${palette}Box`]}`,
|
|
144
|
+
onScroll: this.handleScroll
|
|
145
|
+
}, isModel && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(MobileHeader, {
|
|
146
|
+
selectedOptions: selectedOptions,
|
|
147
|
+
i18nKeys: i18nKeys,
|
|
148
|
+
onClick: this.handlePopupClose
|
|
149
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
150
|
+
className: style.effect
|
|
151
|
+
}, this.getSelectionUI(true)))), needSelectAll ? /*#__PURE__*/React.createElement(CardHeader, null, /*#__PURE__*/React.createElement(MultiSelectHeader, {
|
|
152
|
+
onSelect: this.handleSelectAll,
|
|
153
|
+
selectAllText: selectAllText,
|
|
154
|
+
suggestions: suggestions,
|
|
155
|
+
dataId: dataId
|
|
156
|
+
})) : null, isLoading ? /*#__PURE__*/React.createElement(Container, {
|
|
157
|
+
align: "both",
|
|
158
|
+
className: style.loader
|
|
159
|
+
}, /*#__PURE__*/React.createElement(Loader, null)) : /*#__PURE__*/React.createElement(CardContent, {
|
|
160
|
+
shrink: true,
|
|
161
|
+
customClass: !isModel && dropBoxSize ? style[dropBoxSize] : '',
|
|
162
|
+
eleRef: this.suggestionContainerRef
|
|
163
|
+
}, suggestions.length ? /*#__PURE__*/React.createElement(Suggestions, _extends({
|
|
164
|
+
needTick: keepSelectedOptions,
|
|
165
|
+
suggestions: suggestions,
|
|
166
|
+
getRef: this.suggestionItemRef,
|
|
167
|
+
hoverOption: hoverOption,
|
|
168
|
+
onClick: this.handleSelectOption,
|
|
169
|
+
onMouseEnter: this.handleMouseEnter,
|
|
170
|
+
needBorder: false,
|
|
171
|
+
dataId: `${dataId}_Options`,
|
|
172
|
+
palette: palette,
|
|
173
|
+
selectedOptions: selectedOptionIds,
|
|
174
|
+
a11y: {
|
|
175
|
+
role: 'option'
|
|
176
|
+
}
|
|
177
|
+
}, SuggestionsProps)) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
178
|
+
isLoading: isFetchingOptions,
|
|
179
|
+
options: options,
|
|
180
|
+
searchString: searchStr,
|
|
181
|
+
suggestions: suggestions,
|
|
182
|
+
dataId: dataId,
|
|
183
|
+
palette: palette,
|
|
184
|
+
i18nKeys: i18nKeys,
|
|
185
|
+
htmlId: ariaErrorId
|
|
186
|
+
}), isFetchingOptions && /*#__PURE__*/React.createElement(Container, {
|
|
187
|
+
isCover: false,
|
|
188
|
+
align: "both"
|
|
189
|
+
}, /*#__PURE__*/React.createElement(Loader, null)))))) : null);
|
|
207
190
|
}
|
|
208
191
|
|
|
209
192
|
}
|
|
@@ -12,12 +12,13 @@ export default function RippleEffect(props) {
|
|
|
12
12
|
hoverType,
|
|
13
13
|
isNeedEffect,
|
|
14
14
|
needBorder,
|
|
15
|
-
isCopyTextEnabled
|
|
15
|
+
isCopyTextEnabled,
|
|
16
|
+
cssClassPropOfChild
|
|
16
17
|
} = props;
|
|
17
18
|
let className = isNeedEffect ? `${style.effect} ${style[palette]} ${needBorder ? style.border : ''} ${style[`${hoverType}Hover`] ? style[`${hoverType}Hover`] : ''} ${isActive && !isDisabled ? style.active : ''} ${isDisabled ? '' : style.hoverEffect} ${isCopyTextEnabled ? style.notAllowed : isDisabled ? CssProvider('isDisabled') : ''}` : '';
|
|
18
19
|
let child = React.Children.only(children);
|
|
19
20
|
return /*#__PURE__*/React.cloneElement(child, {
|
|
20
|
-
|
|
21
|
+
[cssClassPropOfChild]: `${child.props[cssClassPropOfChild] || ''} ${className}`
|
|
21
22
|
});
|
|
22
23
|
}
|
|
23
24
|
RippleEffect.defaultProps = defaultProps;
|
|
@@ -7,5 +7,6 @@ export const propTypes = {
|
|
|
7
7
|
isNeedEffect: PropTypes.bool,
|
|
8
8
|
needBorder: PropTypes.bool,
|
|
9
9
|
palette: PropTypes.oneOf(['default', 'primary', 'primaryLight', 'primaryFilled', 'primaryDark', 'green', 'danger']),
|
|
10
|
+
cssClassPropOfChild: PropTypes.string,
|
|
10
11
|
isCopyTextEnabled: PropTypes.bool
|
|
11
12
|
};
|
package/es/v1/Tag/Tag.js
CHANGED
|
@@ -115,7 +115,7 @@ function Tag(props) {
|
|
|
115
115
|
${rounded ? style.lgRadiusClose : style.smRadiusClose} ${isDarkPalette ? style.darkTagClose : ''}
|
|
116
116
|
${customTagClose} ${style[`close${closePalette}`]}`,
|
|
117
117
|
dataId: `${dataId}_RemoveTag`,
|
|
118
|
-
|
|
118
|
+
title: closeTitle,
|
|
119
119
|
onClick: handleRemove,
|
|
120
120
|
a11y: {
|
|
121
121
|
ariaLabel: clearLabel
|
package/lib/DropBox/DropBox.js
CHANGED
|
@@ -13,8 +13,6 @@ var _FocusScope = _interopRequireDefault(require("@zohodesk/a11y/es/FocusScope/F
|
|
|
13
13
|
|
|
14
14
|
var _Modal = _interopRequireDefault(require("../Modal/Modal"));
|
|
15
15
|
|
|
16
|
-
var _Config = require("../Provider/Config");
|
|
17
|
-
|
|
18
16
|
var _LibraryContextInit = _interopRequireDefault(require("../Provider/LibraryContextInit"));
|
|
19
17
|
|
|
20
18
|
var _cssJSLogic2 = _interopRequireDefault(require("./css/cssJSLogic"));
|
|
@@ -27,6 +25,8 @@ var _propTypes = require("./props/propTypes");
|
|
|
27
25
|
|
|
28
26
|
var _Common = require("./../utils/Common");
|
|
29
27
|
|
|
28
|
+
var _isMobilePopover = _interopRequireDefault(require("./utils/isMobilePopover"));
|
|
29
|
+
|
|
30
30
|
var _DropBoxModule = _interopRequireDefault(require("./css/DropBox.module.css"));
|
|
31
31
|
|
|
32
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -64,17 +64,7 @@ function DropBox(props) {
|
|
|
64
64
|
var _ref = DropBoxContext || {},
|
|
65
65
|
direction = _ref.direction;
|
|
66
66
|
|
|
67
|
-
var
|
|
68
|
-
mobileWidth = (0, _Config.getLibraryConfig)('mobileWidth'),
|
|
69
|
-
isModel = false;
|
|
70
|
-
|
|
71
|
-
if (needResponsive) {
|
|
72
|
-
windowWidth = window.innerWidth;
|
|
73
|
-
|
|
74
|
-
if (windowWidth <= mobileWidth) {
|
|
75
|
-
isModel = true;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
67
|
+
var isModel = (0, _isMobilePopover["default"])(needResponsive);
|
|
78
68
|
|
|
79
69
|
var _cssJSLogic = (0, _cssJSLogic2["default"])(props),
|
|
80
70
|
zIndexStyle = _cssJSLogic.zIndexStyle;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = isMobilePopover;
|
|
7
|
+
|
|
8
|
+
var _Config = require("../../Provider/Config");
|
|
9
|
+
|
|
10
|
+
function isMobilePopover(needResponsive) {
|
|
11
|
+
// let { needResponsive } = props;
|
|
12
|
+
var windowWidth,
|
|
13
|
+
mobileWidth = (0, _Config.getLibraryConfig)('mobileWidth'),
|
|
14
|
+
isModel = false;
|
|
15
|
+
|
|
16
|
+
if (needResponsive) {
|
|
17
|
+
windowWidth = window.innerWidth;
|
|
18
|
+
|
|
19
|
+
if (windowWidth <= mobileWidth) {
|
|
20
|
+
isModel = true;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return isModel ? true : false;
|
|
25
|
+
}
|