@zohodesk/components 1.0.0-temp-217.5 → 1.0.0-temp-199.9
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 +9 -0
- package/es/DropBox/DropBoxElement/DropBoxElement.js +3 -1
- package/es/DropBox/DropBoxElement/__tests__/__snapshots__/DropBoxElement.spec.js.snap +4 -2
- package/es/DropBox/DropBoxElement/css/DropBoxElement.module.css +56 -53
- package/es/DropBox/DropBoxElement/css/cssJSLogic.js +4 -4
- package/es/DropBox/__tests__/__snapshots__/DropBox.spec.js.snap +4 -2
- package/es/DropDown/__tests__/__snapshots__/DropDown.spec.js.snap +3 -1
- package/es/ListItem/ListItem.js +2 -2
- package/es/ListItem/ListItem.module.css +15 -2
- package/es/ListItem/ListItemWithAvatar.js +3 -3
- package/es/ListItem/ListItemWithIcon.js +2 -2
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +7 -2
- package/es/MultiSelect/MultiSelect.js +7 -2
- package/es/MultiSelect/Suggestions.js +14 -5
- package/es/MultiSelect/props/defaultProps.js +9 -4
- package/es/MultiSelect/props/propTypes.js +9 -3
- package/es/Popup/Popup.js +232 -83
- package/es/ResponsiveDropBox/__tests__/__snapshots__/ResponsiveDropBox.spec.js.snap +4 -2
- package/es/Select/GroupSelect.js +5 -1
- 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/common/common.module.css +5 -0
- package/es/utils/Common.js +2 -1
- 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/DropBox/DropBoxElement/DropBoxElement.js +3 -1
- package/lib/DropBox/DropBoxElement/__tests__/__snapshots__/DropBoxElement.spec.js.snap +4 -2
- package/lib/DropBox/DropBoxElement/css/DropBoxElement.module.css +56 -53
- package/lib/DropBox/DropBoxElement/css/cssJSLogic.js +2 -2
- package/lib/DropBox/__tests__/__snapshots__/DropBox.spec.js.snap +4 -2
- package/lib/DropDown/__tests__/__snapshots__/DropDown.spec.js.snap +3 -1
- package/lib/ListItem/ListItem.js +2 -2
- package/lib/ListItem/ListItem.module.css +15 -2
- 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 +6 -3
- package/lib/MultiSelect/Suggestions.js +12 -5
- package/lib/MultiSelect/props/defaultProps.js +9 -4
- package/lib/MultiSelect/props/propTypes.js +8 -3
- package/lib/Popup/Popup.js +282 -114
- package/lib/ResponsiveDropBox/__tests__/__snapshots__/ResponsiveDropBox.spec.js.snap +4 -2
- package/lib/Select/GroupSelect.js +4 -2
- 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/common/common.module.css +5 -0
- package/lib/utils/Common.js +5 -1
- 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 +2 -2
- package/result.json +1 -1
- package/assets/Appearance/dark/mode/Component_v2_DarkMode.module.css +0 -10
- package/assets/Appearance/light/mode/Component_v2_LightMode.module.css +0 -10
- package/assets/Appearance/pureDark/mode/Component_v2_PureDarkMode.module.css +0 -10
- package/es/components-v2/Switch/Switch.js +0 -124
- package/es/components-v2/Switch/contants/index.js +0 -10
- package/es/components-v2/Switch/css/Switch_v2.module.css +0 -121
- package/es/components-v2/Switch/css/cssJSLogic.js +0 -45
- package/es/components-v2/Switch/props/defaultProps.js +0 -19
- package/es/components-v2/Switch/props/propTypes.js +0 -27
- package/lib/components-v2/Switch/Switch.js +0 -138
- package/lib/components-v2/Switch/contants/index.js +0 -18
- package/lib/components-v2/Switch/css/Switch_v2.module.css +0 -121
- package/lib/components-v2/Switch/css/cssJSLogic.js +0 -36
- package/lib/components-v2/Switch/props/defaultProps.js +0 -26
- package/lib/components-v2/Switch/props/propTypes.js +0 -38
|
@@ -147,7 +147,7 @@ var ListItemWithIcon = /*#__PURE__*/function (_React$Component) {
|
|
|
147
147
|
autoHover: autoHover,
|
|
148
148
|
needTick: needTick,
|
|
149
149
|
needBorder: needBorder,
|
|
150
|
-
customClass: customClass,
|
|
150
|
+
customClass: "".concat(needMultiLineText ? _ListItemModule["default"].autoHeight : '', " ").concat(needMultiLineText && iconClass && !iconName ? _ListItemModule["default"].txtAlignBaseLine : '', " ").concat(customClass),
|
|
151
151
|
dataId: dataIdString,
|
|
152
152
|
dataSelectorId: dataSelectorId,
|
|
153
153
|
isLink: isLink,
|
|
@@ -176,7 +176,7 @@ var ListItemWithIcon = /*#__PURE__*/function (_React$Component) {
|
|
|
176
176
|
"data-title": isDisabled ? null : title,
|
|
177
177
|
dataId: "".concat(dataIdString, "_Text")
|
|
178
178
|
}, value), needTick && active ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
179
|
-
className: _ListItemModule["default"].tickIcon,
|
|
179
|
+
className: "".concat(_ListItemModule["default"].tickIcon, " ").concat(needMultiLineText ? _ListItemModule["default"].tickIconCenter : ''),
|
|
180
180
|
"aria-hidden": ariaHidden,
|
|
181
181
|
dataId: "".concat(dataIdString, "_tickIcon"),
|
|
182
182
|
dataSelectorId: "".concat(dataSelectorId, "_tickIcon")
|
|
@@ -53,6 +53,8 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
53
53
|
|
|
54
54
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
55
55
|
|
|
56
|
+
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); }
|
|
57
|
+
|
|
56
58
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
57
59
|
|
|
58
60
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -966,7 +968,9 @@ var AdvancedGroupMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
966
968
|
needEffect = _this$props8.needEffect,
|
|
967
969
|
autoComplete = _this$props8.autoComplete,
|
|
968
970
|
getTargetRef = _this$props8.getTargetRef,
|
|
969
|
-
isFocus = _this$props8.isFocus
|
|
971
|
+
isFocus = _this$props8.isFocus,
|
|
972
|
+
customProps = _this$props8.customProps;
|
|
973
|
+
var suggestionsProps = customProps.suggestionsProps;
|
|
970
974
|
var _i18nKeys = i18nKeys,
|
|
971
975
|
_i18nKeys$clearText = _i18nKeys.clearText,
|
|
972
976
|
clearText = _i18nKeys$clearText === void 0 ? 'Clear all' : _i18nKeys$clearText;
|
|
@@ -1130,7 +1134,7 @@ var AdvancedGroupMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
1130
1134
|
a11y: {
|
|
1131
1135
|
role: 'heading'
|
|
1132
1136
|
}
|
|
1133
|
-
})), /*#__PURE__*/_react["default"].createElement(_Suggestions["default"], {
|
|
1137
|
+
})), /*#__PURE__*/_react["default"].createElement(_Suggestions["default"], _extends({
|
|
1134
1138
|
suggestions: suggestions,
|
|
1135
1139
|
selectedOptions: selectedOptionIds,
|
|
1136
1140
|
getRef: _this5.suggestionItemRef,
|
|
@@ -1143,7 +1147,7 @@ var AdvancedGroupMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
1143
1147
|
role: 'option'
|
|
1144
1148
|
},
|
|
1145
1149
|
dataId: "".concat(dataId, "_Options")
|
|
1146
|
-
}));
|
|
1150
|
+
}, suggestionsProps)));
|
|
1147
1151
|
}) : /*#__PURE__*/_react["default"].createElement(_EmptyState["default"], {
|
|
1148
1152
|
options: revampedGroups,
|
|
1149
1153
|
searchString: searchStr,
|
|
@@ -1089,7 +1089,10 @@ var MultiSelectComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
1089
1089
|
boxSize = _this$props15.boxSize,
|
|
1090
1090
|
isLoading = _this$props15.isLoading,
|
|
1091
1091
|
selectAllText = _this$props15.selectAllText,
|
|
1092
|
-
needSelectAll = _this$props15.needSelectAll
|
|
1092
|
+
needSelectAll = _this$props15.needSelectAll,
|
|
1093
|
+
customProps = _this$props15.customProps;
|
|
1094
|
+
var _customProps$suggesti = customProps.suggestionsProps,
|
|
1095
|
+
suggestionsProps = _customProps$suggesti === void 0 ? {} : _customProps$suggesti;
|
|
1093
1096
|
var _this$state9 = this.state,
|
|
1094
1097
|
selectedOptions = _this$state9.selectedOptions,
|
|
1095
1098
|
searchStr = _this$state9.searchStr,
|
|
@@ -1166,7 +1169,7 @@ var MultiSelectComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
1166
1169
|
eleRef: this.suggestionContainerRef
|
|
1167
1170
|
}, isSearching ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
1168
1171
|
className: _MultiSelectModule["default"][palette]
|
|
1169
|
-
}, searchText) : suggestions.length ? /*#__PURE__*/_react["default"].createElement(_Suggestions["default"], {
|
|
1172
|
+
}, searchText) : suggestions.length ? /*#__PURE__*/_react["default"].createElement(_Suggestions["default"], _extends({
|
|
1170
1173
|
suggestions: suggestions,
|
|
1171
1174
|
getRef: this.suggestionItemRef,
|
|
1172
1175
|
hoverOption: hoverOption,
|
|
@@ -1179,7 +1182,7 @@ var MultiSelectComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
1179
1182
|
a11y: {
|
|
1180
1183
|
role: 'option'
|
|
1181
1184
|
}
|
|
1182
|
-
}) : /*#__PURE__*/_react["default"].createElement(_EmptyState["default"], {
|
|
1185
|
+
}, suggestionsProps)) : /*#__PURE__*/_react["default"].createElement(_EmptyState["default"], {
|
|
1183
1186
|
isLoading: isFetchingOptions,
|
|
1184
1187
|
options: options,
|
|
1185
1188
|
searchString: searchStr,
|
|
@@ -83,15 +83,19 @@ var Suggestions = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
83
83
|
avatarPalette = _this$props.avatarPalette,
|
|
84
84
|
palette = _this$props.palette,
|
|
85
85
|
htmlId = _this$props.htmlId,
|
|
86
|
-
a11y = _this$props.a11y
|
|
86
|
+
a11y = _this$props.a11y,
|
|
87
|
+
customClass = _this$props.customClass,
|
|
88
|
+
needMultiLineText = _this$props.needMultiLineText;
|
|
87
89
|
var ariaParentRole = a11y.ariaParentRole,
|
|
88
90
|
ariaMultiselectable = a11y.ariaMultiselectable;
|
|
91
|
+
var containerClass = customClass.containerClass;
|
|
89
92
|
return /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
90
93
|
isCover: false,
|
|
91
94
|
role: ariaParentRole,
|
|
92
95
|
id: htmlId,
|
|
93
96
|
tabindex: "0",
|
|
94
|
-
"aria-multiselectable": ariaMultiselectable
|
|
97
|
+
"aria-multiselectable": ariaMultiselectable,
|
|
98
|
+
className: containerClass
|
|
95
99
|
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
96
100
|
dataId: "".concat(dataId),
|
|
97
101
|
className: className ? className : ''
|
|
@@ -143,7 +147,8 @@ var Suggestions = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
143
147
|
size: listItemSize,
|
|
144
148
|
avatarPalette: avatarPalette,
|
|
145
149
|
palette: palette,
|
|
146
|
-
a11y: list_a11y
|
|
150
|
+
a11y: list_a11y,
|
|
151
|
+
needMultiLineText: needMultiLineText
|
|
147
152
|
}));
|
|
148
153
|
} else if (optionType === 'icon') {
|
|
149
154
|
return /*#__PURE__*/_react["default"].createElement(_ListItemWithIcon["default"], _extends({}, commonProps, {
|
|
@@ -163,7 +168,8 @@ var Suggestions = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
163
168
|
iconSize: iconSize,
|
|
164
169
|
size: listItemSize,
|
|
165
170
|
palette: palette,
|
|
166
|
-
a11y: list_a11y
|
|
171
|
+
a11y: list_a11y,
|
|
172
|
+
needMultiLineText: needMultiLineText
|
|
167
173
|
}));
|
|
168
174
|
}
|
|
169
175
|
|
|
@@ -182,7 +188,8 @@ var Suggestions = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
182
188
|
active: isActive,
|
|
183
189
|
size: listItemSize,
|
|
184
190
|
palette: palette,
|
|
185
|
-
a11y: list_a11y
|
|
191
|
+
a11y: list_a11y,
|
|
192
|
+
needMultiLineText: needMultiLineText
|
|
186
193
|
}));
|
|
187
194
|
})));
|
|
188
195
|
}
|
|
@@ -45,7 +45,8 @@ var AdvancedGroupMultiSelect_defaultProps = {
|
|
|
45
45
|
needEffect: true,
|
|
46
46
|
palette: 'default',
|
|
47
47
|
isLoading: false,
|
|
48
|
-
dataSelectorId: 'advancedGroupMultiSelect'
|
|
48
|
+
dataSelectorId: 'advancedGroupMultiSelect',
|
|
49
|
+
customProps: {}
|
|
49
50
|
};
|
|
50
51
|
exports.AdvancedGroupMultiSelect_defaultProps = AdvancedGroupMultiSelect_defaultProps;
|
|
51
52
|
var AdvancedMultiSelect_defaultProps = {
|
|
@@ -167,8 +168,8 @@ var MultiSelectWithAvatar_defaultProps = {
|
|
|
167
168
|
isLoading: false,
|
|
168
169
|
dataSelectorId: 'multiSelectWithAvatar',
|
|
169
170
|
keepSelectedOptions: false,
|
|
170
|
-
|
|
171
|
-
|
|
171
|
+
needResponsive: true,
|
|
172
|
+
customProps: {}
|
|
172
173
|
};
|
|
173
174
|
exports.MultiSelectWithAvatar_defaultProps = MultiSelectWithAvatar_defaultProps;
|
|
174
175
|
var SelectedOptions_defaultProps = {
|
|
@@ -177,6 +178,10 @@ var SelectedOptions_defaultProps = {
|
|
|
177
178
|
};
|
|
178
179
|
exports.SelectedOptions_defaultProps = SelectedOptions_defaultProps;
|
|
179
180
|
var Suggestions_defaultProps = {
|
|
180
|
-
a11y: {}
|
|
181
|
+
a11y: {},
|
|
182
|
+
customClass: {
|
|
183
|
+
containerClass: ''
|
|
184
|
+
},
|
|
185
|
+
needMultiLineText: false
|
|
181
186
|
};
|
|
182
187
|
exports.Suggestions_defaultProps = Suggestions_defaultProps;
|
|
@@ -129,7 +129,8 @@ var MultiSelect_propTypes = {
|
|
|
129
129
|
setAriaId: _propTypes["default"].string,
|
|
130
130
|
ariaErrorId: _propTypes["default"].string,
|
|
131
131
|
customProps: _propTypes["default"].shape({
|
|
132
|
-
TextBoxIconProps: _propTypes["default"].object
|
|
132
|
+
TextBoxIconProps: _propTypes["default"].object,
|
|
133
|
+
suggestionsProps: _propTypes["default"].object
|
|
133
134
|
}),
|
|
134
135
|
isFocus: _propTypes["default"].bool
|
|
135
136
|
};
|
|
@@ -201,7 +202,11 @@ var Suggestions_propTypes = {
|
|
|
201
202
|
logo: _propTypes["default"].string,
|
|
202
203
|
optionType: _propTypes["default"].string,
|
|
203
204
|
listItemProps: _propTypes["default"].object
|
|
204
|
-
}))
|
|
205
|
+
})),
|
|
206
|
+
customClass: _propTypes["default"].shape({
|
|
207
|
+
containerClass: _propTypes["default"].string
|
|
208
|
+
}),
|
|
209
|
+
needMultiLineText: _propTypes["default"].bool
|
|
205
210
|
};
|
|
206
211
|
exports.Suggestions_propTypes = Suggestions_propTypes;
|
|
207
212
|
var AdvancedGroupMultiSelect_propTypes = (_AdvancedGroupMultiSe = {
|
|
@@ -272,7 +277,7 @@ var AdvancedGroupMultiSelect_propTypes = (_AdvancedGroupMultiSe = {
|
|
|
272
277
|
needToCloseOnSelect: _propTypes["default"].func,
|
|
273
278
|
searchStr: _propTypes["default"].string,
|
|
274
279
|
children: _propTypes["default"].node
|
|
275
|
-
}, _defineProperty(_AdvancedGroupMultiSe, "dataSelectorId", _propTypes["default"].string), _defineProperty(_AdvancedGroupMultiSe, "isFocus", _propTypes["default"].bool), _AdvancedGroupMultiSe);
|
|
280
|
+
}, _defineProperty(_AdvancedGroupMultiSe, "dataSelectorId", _propTypes["default"].string), _defineProperty(_AdvancedGroupMultiSe, "isFocus", _propTypes["default"].bool), _defineProperty(_AdvancedGroupMultiSe, "customProps", _propTypes["default"].object), _AdvancedGroupMultiSe);
|
|
276
281
|
exports.AdvancedGroupMultiSelect_propTypes = AdvancedGroupMultiSelect_propTypes;
|
|
277
282
|
|
|
278
283
|
var AdvancedMultiSelect_propTypes = _objectSpread(_objectSpread({}, MultiSelect_propTypes), {}, {
|