@zohodesk/components 1.0.0-temp-199.21 → 1.0.0-temp-249
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/README.md +12 -0
- package/assets/Appearance/dark/mode/Component_v1_DarkMode.module.css +6 -0
- package/assets/Appearance/light/mode/Component_v1_LightMode.module.css +6 -0
- package/assets/Appearance/pureDark/mode/Component_v1_PureDarkMode.module.css +6 -0
- package/es/ListItem/ListItem.module.css +18 -17
- package/es/ListItem/ListItemWithAvatar.js +2 -4
- package/es/ListItem/ListItemWithCheckBox.js +2 -4
- package/es/ListItem/ListItemWithIcon.js +2 -4
- package/es/ListItem/ListItemWithRadio.js +2 -4
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +2 -6
- package/es/MultiSelect/MultiSelect.js +2 -2
- package/es/MultiSelect/Suggestions.js +2 -7
- package/es/MultiSelect/props/defaultProps.js +0 -2
- package/es/MultiSelect/props/propTypes.js +3 -11
- package/es/Provider/LibraryContext.js +11 -3
- package/es/Select/GroupSelect.js +1 -1
- package/es/Select/SelectWithAvatar.js +3 -3
- package/es/Select/SelectWithIcon.js +3 -10
- package/es/Select/props/defaultProps.js +2 -4
- package/es/Select/props/propTypes.js +3 -11
- package/es/common/common.module.css +1 -1
- package/es/v1/Label/Label.js +94 -33
- package/es/v1/Label/__tests__/Label.spec.js +204 -0
- package/es/v1/Label/__tests__/__snapshots__/Label.spec.js.snap +428 -0
- package/es/v1/Label/constants/index.js +8 -0
- package/es/v1/Label/css/Label_v1.module.css +34 -0
- package/es/v1/Label/css/cssJSLogic.js +44 -0
- package/es/v1/Label/props/defaultProps.js +14 -9
- package/es/v1/Label/props/propTypes.js +34 -14
- package/lib/ListItem/ListItem.module.css +18 -17
- package/lib/ListItem/ListItemWithAvatar.js +3 -5
- package/lib/ListItem/ListItemWithCheckBox.js +2 -4
- package/lib/ListItem/ListItemWithIcon.js +3 -5
- package/lib/ListItem/ListItemWithRadio.js +2 -4
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +3 -8
- package/lib/MultiSelect/MultiSelect.js +2 -2
- package/lib/MultiSelect/Suggestions.js +2 -6
- package/lib/MultiSelect/props/defaultProps.js +0 -2
- package/lib/MultiSelect/props/propTypes.js +5 -13
- package/lib/Provider/LibraryContext.js +11 -3
- package/lib/Select/GroupSelect.js +1 -2
- package/lib/Select/SelectWithAvatar.js +3 -4
- package/lib/Select/SelectWithIcon.js +3 -10
- package/lib/Select/props/defaultProps.js +3 -5
- package/lib/Select/props/propTypes.js +3 -11
- package/lib/common/common.module.css +1 -1
- package/lib/v1/Label/Label.js +102 -36
- package/lib/v1/Label/__tests__/Label.spec.js +211 -0
- package/lib/v1/Label/__tests__/__snapshots__/Label.spec.js.snap +428 -0
- package/lib/v1/Label/constants/index.js +16 -0
- package/lib/v1/Label/css/Label_v1.module.css +34 -0
- package/lib/v1/Label/css/cssJSLogic.js +45 -0
- package/lib/v1/Label/props/defaultProps.js +16 -11
- package/lib/v1/Label/props/propTypes.js +36 -16
- package/package.json +7 -7
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export default {
|
|
2
|
+
customProps: {},
|
|
3
|
+
tagAttributes: {},
|
|
4
|
+
a11yAttributes: {},
|
|
5
|
+
customClass: {},
|
|
6
|
+
shouldHighlightRequired: false,
|
|
7
|
+
isDisabled: false,
|
|
8
|
+
isClipped: false,
|
|
9
|
+
isReadOnly: false,
|
|
10
|
+
requiredType: 'asterisk',
|
|
5
11
|
size: 'medium',
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
dataSelectorId: 'label'
|
|
12
|
+
palette: 'default',
|
|
13
|
+
textWeight: 'regular',
|
|
14
|
+
layout: 'inline',
|
|
15
|
+
i18nKeys: {}
|
|
11
16
|
};
|
|
@@ -1,19 +1,39 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
|
-
export
|
|
3
|
-
clipped: PropTypes.bool,
|
|
4
|
-
dataId: PropTypes.string,
|
|
5
|
-
dataSelectorId: PropTypes.string,
|
|
2
|
+
export default {
|
|
6
3
|
htmlFor: PropTypes.string,
|
|
7
|
-
onClick: PropTypes.func,
|
|
8
|
-
palette: PropTypes.oneOf(['default', 'primary', 'secondary', 'danger', 'mandatory', 'disable', 'dark']),
|
|
9
|
-
size: PropTypes.oneOf(['xsmall', 'small', 'medium', 'large']),
|
|
10
4
|
text: PropTypes.string,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
5
|
+
onClick: PropTypes.func,
|
|
6
|
+
a11yAttributes: PropTypes.shape({
|
|
7
|
+
container: PropTypes.object,
|
|
8
|
+
label: PropTypes.object
|
|
9
|
+
}),
|
|
10
|
+
tagAttributes: PropTypes.shape({
|
|
11
|
+
container: PropTypes.object,
|
|
12
|
+
label: PropTypes.object
|
|
13
|
+
}),
|
|
14
|
+
customProps: PropTypes.shape({
|
|
15
|
+
container: PropTypes.object,
|
|
16
|
+
label: PropTypes.object
|
|
17
|
+
}),
|
|
18
|
+
customId: PropTypes.string,
|
|
19
|
+
testId: PropTypes.string,
|
|
20
|
+
customClass: PropTypes.shape({
|
|
21
|
+
container: PropTypes.string,
|
|
22
|
+
label: PropTypes.string
|
|
23
|
+
}),
|
|
24
|
+
requiredType: PropTypes.oneOf(['asterisk', 'text']),
|
|
25
|
+
shouldHighlightRequired: PropTypes.bool,
|
|
26
|
+
isClipped: PropTypes.bool,
|
|
27
|
+
isRequired: PropTypes.bool,
|
|
28
|
+
isDisabled: PropTypes.bool,
|
|
29
|
+
isReadOnly: PropTypes.bool,
|
|
30
|
+
size: PropTypes.oneOf(['small', 'medium']),
|
|
31
|
+
palette: PropTypes.oneOf(['default', 'secondary']),
|
|
32
|
+
renderLeftPlaceholderNode: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
|
|
33
|
+
renderRightPlaceholderNode: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
|
|
34
|
+
textWeight: PropTypes.oneOf(['regular', 'semibold']),
|
|
35
|
+
i18nKeys: PropTypes.shape({
|
|
36
|
+
requiredText: PropTypes.string
|
|
17
37
|
}),
|
|
18
|
-
|
|
38
|
+
layout: PropTypes.oneOf(['inline', 'block'])
|
|
19
39
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* css:lineheight-validation:ignore */
|
|
2
1
|
.varClass {
|
|
3
2
|
/* listitem default variables */
|
|
4
3
|
--listitem_font_size: var(--zd_font_size13);
|
|
@@ -16,14 +15,9 @@
|
|
|
16
15
|
|
|
17
16
|
/* listitem tick icon default variables */
|
|
18
17
|
--listitem_tickicon_color: var(--zdt_listitem_default_tickicon);
|
|
19
|
-
|
|
20
|
-
/* multiLine value for list item */
|
|
21
|
-
--listitem_multiline_lineheight: 1.5385;
|
|
22
|
-
}
|
|
23
|
-
[dir=ltr] .varClass {
|
|
18
|
+
}[dir=ltr] .varClass {
|
|
24
19
|
--listitem_avatar_margin: 0 var(--zd_size15) 0 0;
|
|
25
|
-
}
|
|
26
|
-
[dir=rtl] .varClass {
|
|
20
|
+
}[dir=rtl] .varClass {
|
|
27
21
|
--listitem_avatar_margin: 0 0 0 var(--zd_size15);
|
|
28
22
|
}
|
|
29
23
|
.list {
|
|
@@ -82,9 +76,8 @@
|
|
|
82
76
|
[dir=rtl] .beforeChild{
|
|
83
77
|
margin-left: var(--zd_size10) ;
|
|
84
78
|
}
|
|
85
|
-
/* css:lineheight-validation:ignore */
|
|
86
79
|
.value, .multiLineValue {
|
|
87
|
-
line-height:
|
|
80
|
+
line-height: 1.5385;
|
|
88
81
|
}
|
|
89
82
|
.multiLineValue,.multiLine{
|
|
90
83
|
composes: lineClamp from '../common/common.module.css';
|
|
@@ -122,18 +115,26 @@
|
|
|
122
115
|
composes: justifyFend from '../common/common.module.css';
|
|
123
116
|
}
|
|
124
117
|
|
|
125
|
-
.contentWrapper {
|
|
126
|
-
composes: dflex flexrow alignVertical from '../common/common.module.css';
|
|
127
|
-
width: 100% ;
|
|
128
|
-
}
|
|
129
118
|
.lhsBox {
|
|
130
119
|
composes: dflex from '../common/common.module.css';
|
|
131
120
|
align-self: stretch;
|
|
132
121
|
}
|
|
133
|
-
.
|
|
134
|
-
|
|
122
|
+
.lhsBox_small,
|
|
123
|
+
.lhsBox_medium,
|
|
124
|
+
.lhsBox_large{
|
|
125
|
+
composes: varClass;
|
|
126
|
+
--listitem_doubleline_content_height: calc(var(--listitem_font_size) * 2 );
|
|
135
127
|
height: 100% ;
|
|
136
|
-
|
|
128
|
+
composes: dflex alignVertical from '../common/common.module.css';
|
|
129
|
+
}
|
|
130
|
+
.lhsBox_small {
|
|
131
|
+
max-height: calc(var(--listitem_doubleline_content_height) + var(--zd_size7)); /* 7px = listitem min-height - (top + bottom padding) - doubleLine content height */
|
|
132
|
+
}
|
|
133
|
+
.lhsBox_medium {
|
|
134
|
+
max-height: calc(var(--listitem_doubleline_content_height) + var(--zd_size8)); /* 8px = listitem min-height - (top + bottom padding) - doubleLine content height */
|
|
135
|
+
}
|
|
136
|
+
.lhsBox_large {
|
|
137
|
+
max-height: calc(var(--listitem_doubleline_content_height) + var(--zd_size15)); /* 15px = listitem min-height - (top + bottom padding) - doubleLine content height */
|
|
137
138
|
}
|
|
138
139
|
.defaultHover, .primaryHover, .dangerHover, .secondaryHover, .darkHover {
|
|
139
140
|
background-color: var(--listitem_highlight_bg_color);
|
|
@@ -178,13 +178,11 @@ var ListItemWithAvatar = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
178
178
|
disableTitle: disableTitle,
|
|
179
179
|
title: null,
|
|
180
180
|
customProps: ListItemProps
|
|
181
|
-
}, ContainerProps), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
182
|
-
className: _ListItemModule["default"].contentWrapper
|
|
183
|
-
}, name || imgSrc ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
181
|
+
}, ContainerProps), name || imgSrc ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
184
182
|
className: "".concat(_ListItemModule["default"].leftAvatar, " ").concat(lhsAlignContent !== 'center' ? "".concat(_ListItemModule["default"].lhsBox) : '')
|
|
185
183
|
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
186
184
|
align: lhsAlignContent,
|
|
187
|
-
className: _ListItemModule["default"].
|
|
185
|
+
className: _ListItemModule["default"]["lhsBox_".concat(size)]
|
|
188
186
|
}, isTeam ? /*#__PURE__*/_react["default"].createElement(_AvatarTeam["default"], _extends({
|
|
189
187
|
name: name,
|
|
190
188
|
size: "small",
|
|
@@ -228,7 +226,7 @@ var ListItemWithAvatar = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
228
226
|
}, /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
|
|
229
227
|
name: "ZD-ticknew",
|
|
230
228
|
size: "8"
|
|
231
|
-
})) : null)
|
|
229
|
+
})) : null);
|
|
232
230
|
}
|
|
233
231
|
}]);
|
|
234
232
|
|
|
@@ -160,13 +160,11 @@ var ListItemWithCheckBox = /*#__PURE__*/function (_React$Component) {
|
|
|
160
160
|
title: null,
|
|
161
161
|
customProps: ListItemProps
|
|
162
162
|
}, ContainerProps), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
163
|
-
className: _ListItemModule["default"].contentWrapper
|
|
164
|
-
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
165
163
|
className: "".concat(_ListItemModule["default"].iconBox, " ").concat(_ListItemModule["default"].lhsBox, " ").concat(_ListItemModule["default"]["lhsJustifyContent_".concat(lhsJustifyContent)]),
|
|
166
164
|
dataId: "".concat(dataId ? dataId : value, "_checkBox")
|
|
167
165
|
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
168
166
|
align: lhsAlignContent,
|
|
169
|
-
className: lhsAlignContent !== 'center' ? _ListItemModule["default"].
|
|
167
|
+
className: lhsAlignContent !== 'center' ? _ListItemModule["default"]["lhsBox_".concat(size)] : ''
|
|
170
168
|
}, /*#__PURE__*/_react["default"].createElement(_CheckBox["default"], {
|
|
171
169
|
checked: checked,
|
|
172
170
|
a11y: {
|
|
@@ -191,7 +189,7 @@ var ListItemWithCheckBox = /*#__PURE__*/function (_React$Component) {
|
|
|
191
189
|
}, (0, _utils.renderNode)(renderValueRightPlaceholderNode)) : null), secondaryValue ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
192
190
|
"data-title": isDisabled ? null : secondaryValue,
|
|
193
191
|
className: "".concat(_ListItemModule["default"].secondaryField, " ").concat(needMultiLineText ? _ListItemModule["default"].multiLine : _ListItemModule["default"].secondaryValue)
|
|
194
|
-
}, secondaryValue) : null))
|
|
192
|
+
}, secondaryValue) : null));
|
|
195
193
|
}
|
|
196
194
|
}]);
|
|
197
195
|
|
|
@@ -166,16 +166,14 @@ var ListItemWithIcon = /*#__PURE__*/function (_React$Component) {
|
|
|
166
166
|
disableTitle: disableTitle,
|
|
167
167
|
title: null,
|
|
168
168
|
customProps: ListItemProps
|
|
169
|
-
}, ContainerProps), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
170
|
-
className: _ListItemModule["default"].contentWrapper
|
|
171
|
-
}, iconName && /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
169
|
+
}, ContainerProps), iconName && /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
172
170
|
"aria-hidden": true,
|
|
173
171
|
align: lhsAlignContent,
|
|
174
172
|
className: "".concat(_ListItemModule["default"].iconBox, " ").concat(_ListItemModule["default"].lhsBox, " ").concat(_ListItemModule["default"]["lhsJustifyContent_".concat(lhsJustifyContent)]),
|
|
175
173
|
dataId: dataId ? "".concat(dataId, "_Icon") : "".concat(value.toLowerCase().replace("'", '_'), "_Icon")
|
|
176
174
|
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
177
175
|
align: lhsAlignContent,
|
|
178
|
-
className: lhsAlignContent !== 'center' ? _ListItemModule["default"].
|
|
176
|
+
className: lhsAlignContent !== 'center' ? _ListItemModule["default"]["lhsBox_".concat(size)] : ''
|
|
179
177
|
}, /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
|
|
180
178
|
iconClass: iconClass,
|
|
181
179
|
name: iconName,
|
|
@@ -206,7 +204,7 @@ var ListItemWithIcon = /*#__PURE__*/function (_React$Component) {
|
|
|
206
204
|
}, /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
|
|
207
205
|
name: "ZD-ticknew",
|
|
208
206
|
size: "8"
|
|
209
|
-
})) : null)
|
|
207
|
+
})) : null);
|
|
210
208
|
}
|
|
211
209
|
}]);
|
|
212
210
|
|
|
@@ -161,14 +161,12 @@ var ListItemWithRadio = /*#__PURE__*/function (_React$Component) {
|
|
|
161
161
|
title: null,
|
|
162
162
|
customProps: ListItemProps
|
|
163
163
|
}, ContainerProps), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
164
|
-
className: _ListItemModule["default"].contentWrapper
|
|
165
|
-
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
166
164
|
align: lhsAlignContent,
|
|
167
165
|
className: "".concat(_ListItemModule["default"].iconBox, " ").concat(_ListItemModule["default"].lhsBox, " ").concat(_ListItemModule["default"]["lhsJustifyContent_".concat(lhsJustifyContent)]),
|
|
168
166
|
dataId: "".concat(dataId, "_radio")
|
|
169
167
|
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
170
168
|
align: lhsAlignContent,
|
|
171
|
-
className: lhsAlignContent !== 'center' ? _ListItemModule["default"].
|
|
169
|
+
className: lhsAlignContent !== 'center' ? _ListItemModule["default"]["lhsBox_".concat(size)] : ''
|
|
172
170
|
}, /*#__PURE__*/_react["default"].createElement(_Radio["default"], {
|
|
173
171
|
checked: checked,
|
|
174
172
|
id: id,
|
|
@@ -194,7 +192,7 @@ var ListItemWithRadio = /*#__PURE__*/function (_React$Component) {
|
|
|
194
192
|
}, (0, _utils.renderNode)(renderValueRightPlaceholderNode)) : null), secondaryValue ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
195
193
|
"data-title": isDisabled ? null : secondaryValue,
|
|
196
194
|
className: "".concat(_ListItemModule["default"].secondaryField, " ").concat(needMultiLineText ? _ListItemModule["default"].multiLine : _ListItemModule["default"].secondaryValue)
|
|
197
|
-
}, secondaryValue) : null))
|
|
195
|
+
}, secondaryValue) : null));
|
|
198
196
|
}
|
|
199
197
|
}]);
|
|
200
198
|
|
|
@@ -55,8 +55,6 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
55
55
|
|
|
56
56
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
57
57
|
|
|
58
|
-
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); }
|
|
59
|
-
|
|
60
58
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
61
59
|
|
|
62
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."); }
|
|
@@ -981,10 +979,7 @@ var AdvancedGroupMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
981
979
|
autoComplete = _this$props9.autoComplete,
|
|
982
980
|
getTargetRef = _this$props9.getTargetRef,
|
|
983
981
|
isFocus = _this$props9.isFocus,
|
|
984
|
-
limit = _this$props9.limit
|
|
985
|
-
customProps = _this$props9.customProps;
|
|
986
|
-
var _customProps$Suggesti = customProps.SuggestionsProps,
|
|
987
|
-
SuggestionsProps = _customProps$Suggesti === void 0 ? {} : _customProps$Suggesti;
|
|
982
|
+
limit = _this$props9.limit;
|
|
988
983
|
var _i18nKeys = i18nKeys,
|
|
989
984
|
_i18nKeys$clearText = _i18nKeys.clearText,
|
|
990
985
|
clearText = _i18nKeys$clearText === void 0 ? _constants.MULTISELECT_I18N_KEYS.clearText : _i18nKeys$clearText,
|
|
@@ -1150,7 +1145,7 @@ var AdvancedGroupMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
1150
1145
|
a11y: {
|
|
1151
1146
|
role: 'heading'
|
|
1152
1147
|
}
|
|
1153
|
-
})), /*#__PURE__*/_react["default"].createElement(_Suggestions["default"],
|
|
1148
|
+
})), /*#__PURE__*/_react["default"].createElement(_Suggestions["default"], {
|
|
1154
1149
|
suggestions: suggestions,
|
|
1155
1150
|
selectedOptions: selectedOptionIds,
|
|
1156
1151
|
getRef: _this5.suggestionItemRef,
|
|
@@ -1165,7 +1160,7 @@ var AdvancedGroupMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
1165
1160
|
limit: limit,
|
|
1166
1161
|
limitReachedMessage: limitReachedMessage,
|
|
1167
1162
|
dataId: "".concat(dataId, "_Options")
|
|
1168
|
-
}))
|
|
1163
|
+
}));
|
|
1169
1164
|
}) : /*#__PURE__*/_react["default"].createElement(_EmptyState["default"], {
|
|
1170
1165
|
options: revampedGroups,
|
|
1171
1166
|
searchString: searchStr,
|
|
@@ -1171,9 +1171,9 @@ var MultiSelectComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
1171
1171
|
isLoading = _this$props15.isLoading,
|
|
1172
1172
|
selectAllText = _this$props15.selectAllText,
|
|
1173
1173
|
needSelectAll = _this$props15.needSelectAll,
|
|
1174
|
+
customProps = _this$props15.customProps,
|
|
1174
1175
|
isVirtualizerEnabled = _this$props15.isVirtualizerEnabled,
|
|
1175
|
-
limit = _this$props15.limit
|
|
1176
|
-
customProps = _this$props15.customProps;
|
|
1176
|
+
limit = _this$props15.limit;
|
|
1177
1177
|
var _this$state9 = this.state,
|
|
1178
1178
|
selectedOptions = _this$state9.selectedOptions,
|
|
1179
1179
|
searchStr = _this$state9.searchStr,
|
|
@@ -247,19 +247,15 @@ var Suggestions = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
247
247
|
htmlId = _this$props2.htmlId,
|
|
248
248
|
a11y = _this$props2.a11y,
|
|
249
249
|
getVirtualizerPublicMethods = _this$props2.getVirtualizerPublicMethods,
|
|
250
|
-
setVirtualizerContainerRefFunction = _this$props2.setVirtualizerContainerRefFunction
|
|
251
|
-
customClass = _this$props2.customClass;
|
|
250
|
+
setVirtualizerContainerRefFunction = _this$props2.setVirtualizerContainerRefFunction;
|
|
252
251
|
var ariaParentRole = a11y.ariaParentRole,
|
|
253
252
|
ariaMultiselectable = a11y.ariaMultiselectable;
|
|
254
|
-
var _customClass$containe = customClass.containerClass,
|
|
255
|
-
containerClass = _customClass$containe === void 0 ? '' : _customClass$containe;
|
|
256
253
|
return /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
257
254
|
isCover: false,
|
|
258
255
|
role: ariaParentRole,
|
|
259
256
|
id: htmlId,
|
|
260
257
|
tabindex: "0",
|
|
261
|
-
"aria-multiselectable": ariaMultiselectable
|
|
262
|
-
className: containerClass
|
|
258
|
+
"aria-multiselectable": ariaMultiselectable
|
|
263
259
|
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
264
260
|
dataId: "".concat(dataId),
|
|
265
261
|
className: className ? className : ''
|
|
@@ -46,7 +46,6 @@ var AdvancedGroupMultiSelect_defaultProps = {
|
|
|
46
46
|
palette: 'default',
|
|
47
47
|
isLoading: false,
|
|
48
48
|
dataSelectorId: 'advancedGroupMultiSelect',
|
|
49
|
-
customProps: {},
|
|
50
49
|
allowValueFallback: true
|
|
51
50
|
};
|
|
52
51
|
exports.AdvancedGroupMultiSelect_defaultProps = AdvancedGroupMultiSelect_defaultProps;
|
|
@@ -185,7 +184,6 @@ exports.SelectedOptions_defaultProps = SelectedOptions_defaultProps;
|
|
|
185
184
|
var Suggestions_defaultProps = {
|
|
186
185
|
a11y: {},
|
|
187
186
|
isVirtualizerEnabled: false,
|
|
188
|
-
customClass: {},
|
|
189
187
|
needMultiLineText: false
|
|
190
188
|
};
|
|
191
189
|
exports.Suggestions_defaultProps = Suggestions_defaultProps;
|
|
@@ -133,8 +133,7 @@ var MultiSelect_propTypes = {
|
|
|
133
133
|
setAriaId: _propTypes["default"].string,
|
|
134
134
|
ariaErrorId: _propTypes["default"].string,
|
|
135
135
|
customProps: _propTypes["default"].shape({
|
|
136
|
-
TextBoxIconProps: _propTypes["default"].object
|
|
137
|
-
SuggestionsProps: _propTypes["default"].object
|
|
136
|
+
TextBoxIconProps: _propTypes["default"].object
|
|
138
137
|
}),
|
|
139
138
|
isFocus: _propTypes["default"].bool,
|
|
140
139
|
allowValueFallback: _propTypes["default"].bool,
|
|
@@ -190,8 +189,7 @@ var SelectedOptions_propTypes = {
|
|
|
190
189
|
limit: _propTypes["default"].number
|
|
191
190
|
};
|
|
192
191
|
exports.SelectedOptions_propTypes = SelectedOptions_propTypes;
|
|
193
|
-
|
|
194
|
-
var Suggestions_propTypes = _defineProperty({
|
|
192
|
+
var Suggestions_propTypes = {
|
|
195
193
|
a11y: _propTypes["default"].shape({
|
|
196
194
|
ariaParentRole: _propTypes["default"].string,
|
|
197
195
|
ariaMultiselectable: _propTypes["default"].bool
|
|
@@ -225,12 +223,8 @@ var Suggestions_propTypes = _defineProperty({
|
|
|
225
223
|
})),
|
|
226
224
|
renderBeforeChildren: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].node]),
|
|
227
225
|
limit: _propTypes["default"].number,
|
|
228
|
-
limitReachedMessage: _propTypes["default"].string
|
|
229
|
-
|
|
230
|
-
containerClass: _propTypes["default"].string
|
|
231
|
-
})
|
|
232
|
-
}, "needMultiLineText", _propTypes["default"].bool);
|
|
233
|
-
|
|
226
|
+
limitReachedMessage: _propTypes["default"].string
|
|
227
|
+
};
|
|
234
228
|
exports.Suggestions_propTypes = Suggestions_propTypes;
|
|
235
229
|
var AdvancedGroupMultiSelect_propTypes = (_AdvancedGroupMultiSe = {
|
|
236
230
|
animationStyle: _propTypes["default"].string,
|
|
@@ -301,9 +295,7 @@ var AdvancedGroupMultiSelect_propTypes = (_AdvancedGroupMultiSe = {
|
|
|
301
295
|
needToCloseOnSelect: _propTypes["default"].func,
|
|
302
296
|
searchStr: _propTypes["default"].string,
|
|
303
297
|
children: _propTypes["default"].node
|
|
304
|
-
}, _defineProperty(_AdvancedGroupMultiSe, "dataSelectorId", _propTypes["default"].string), _defineProperty(_AdvancedGroupMultiSe, "isFocus", _propTypes["default"].bool), _defineProperty(_AdvancedGroupMultiSe, "allowValueFallback", _propTypes["default"].bool), _defineProperty(_AdvancedGroupMultiSe, "limit", _propTypes["default"].number),
|
|
305
|
-
SuggestionsProps: _propTypes["default"].object
|
|
306
|
-
})), _AdvancedGroupMultiSe);
|
|
298
|
+
}, _defineProperty(_AdvancedGroupMultiSe, "dataSelectorId", _propTypes["default"].string), _defineProperty(_AdvancedGroupMultiSe, "isFocus", _propTypes["default"].bool), _defineProperty(_AdvancedGroupMultiSe, "allowValueFallback", _propTypes["default"].bool), _defineProperty(_AdvancedGroupMultiSe, "limit", _propTypes["default"].number), _AdvancedGroupMultiSe);
|
|
307
299
|
exports.AdvancedGroupMultiSelect_propTypes = AdvancedGroupMultiSelect_propTypes;
|
|
308
300
|
|
|
309
301
|
var AdvancedMultiSelect_propTypes = _objectSpread(_objectSpread({}, MultiSelect_propTypes), {}, {
|
|
@@ -46,6 +46,8 @@ var LibraryContextProvider = function LibraryContextProvider(_ref) {
|
|
|
46
46
|
hasTagColorInheritedToText = _ref.hasTagColorInheritedToText,
|
|
47
47
|
shouldIndicateSwitchState = _ref.shouldIndicateSwitchState,
|
|
48
48
|
shouldStrikeThroughDisabledButton = _ref.shouldStrikeThroughDisabledButton,
|
|
49
|
+
labelRequiredType = _ref.labelRequiredType,
|
|
50
|
+
shouldHighlightRequiredLabel = _ref.shouldHighlightRequiredLabel,
|
|
49
51
|
children = _ref.children;
|
|
50
52
|
|
|
51
53
|
var _useState = (0, _react.useState)({
|
|
@@ -54,7 +56,9 @@ var LibraryContextProvider = function LibraryContextProvider(_ref) {
|
|
|
54
56
|
coloredTagVariant: coloredTagVariant,
|
|
55
57
|
hasTagColorInheritedToText: hasTagColorInheritedToText,
|
|
56
58
|
shouldIndicateSwitchState: shouldIndicateSwitchState,
|
|
57
|
-
shouldStrikeThroughDisabledButton: shouldStrikeThroughDisabledButton
|
|
59
|
+
shouldStrikeThroughDisabledButton: shouldStrikeThroughDisabledButton,
|
|
60
|
+
labelRequiredType: labelRequiredType,
|
|
61
|
+
shouldHighlightRequiredLabel: shouldHighlightRequiredLabel
|
|
58
62
|
}),
|
|
59
63
|
_useState2 = _slicedToArray(_useState, 2),
|
|
60
64
|
value = _useState2[0],
|
|
@@ -80,7 +84,9 @@ LibraryContextProvider.propTypes = {
|
|
|
80
84
|
hasTagColorInheritedToText: _propTypes["default"].bool,
|
|
81
85
|
direction: _propTypes["default"].string,
|
|
82
86
|
shouldIndicateSwitchState: _propTypes["default"].bool,
|
|
83
|
-
shouldStrikeThroughDisabledButton: _propTypes["default"].bool
|
|
87
|
+
shouldStrikeThroughDisabledButton: _propTypes["default"].bool,
|
|
88
|
+
labelRequiredType: _propTypes["default"].oneOf(['asterisk', 'text']),
|
|
89
|
+
shouldHighlightRequiredLabel: _propTypes["default"].bool
|
|
84
90
|
};
|
|
85
91
|
LibraryContextProvider.defaultProps = {
|
|
86
92
|
isReducedMotion: (0, _Config.getLibraryConfig)('isReducedMotion'),
|
|
@@ -88,7 +94,9 @@ LibraryContextProvider.defaultProps = {
|
|
|
88
94
|
coloredTagVariant: 'bold',
|
|
89
95
|
hasTagColorInheritedToText: true,
|
|
90
96
|
shouldIndicateSwitchState: false,
|
|
91
|
-
shouldStrikeThroughDisabledButton: false
|
|
97
|
+
shouldStrikeThroughDisabledButton: false,
|
|
98
|
+
labelRequiredType: 'asterisk',
|
|
99
|
+
shouldHighlightRequiredLabel: true
|
|
92
100
|
};
|
|
93
101
|
var _default = LibraryContextProvider;
|
|
94
102
|
exports["default"] = _default;
|
|
@@ -700,8 +700,7 @@ var GroupSelectComponent = /*#__PURE__*/function (_PureComponent) {
|
|
|
700
700
|
TextBoxIconProps = _customProps$TextBoxI === void 0 ? {} : _customProps$TextBoxI,
|
|
701
701
|
_customProps$TextBoxP = customProps.TextBoxProps,
|
|
702
702
|
TextBoxProps = _customProps$TextBoxP === void 0 ? {} : _customProps$TextBoxP,
|
|
703
|
-
|
|
704
|
-
SuggestionsProps = _customProps$Suggesti === void 0 ? {} : _customProps$Suggesti;
|
|
703
|
+
SuggestionsProps = customProps.SuggestionsProps;
|
|
705
704
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
706
705
|
className: "".concat(_SelectModule["default"].container, " ").concat(_SelectModule["default"]["box_".concat(size)], " ").concat(isReadOnly ? _SelectModule["default"].readonly : '', " ").concat(borderColor === 'transparent' ? _SelectModule["default"].transparentContainer : '', " ").concat(iconOnHover && (isReadOnly || isDisabled) ? _SelectModule["default"].iconOnHoverReadonly : iconOnHover && !(isReadOnly || isDisabled) ? _SelectModule["default"].iconOnHoverStyle : ''),
|
|
707
706
|
"data-id": dataIdSlctComp,
|
|
@@ -221,8 +221,8 @@ var SelectWithAvatarComponent = /*#__PURE__*/function (_SelectComponent) {
|
|
|
221
221
|
needEffect = _this$props.needEffect,
|
|
222
222
|
isLoading = _this$props.isLoading,
|
|
223
223
|
dataSelectorId = _this$props.dataSelectorId,
|
|
224
|
-
|
|
225
|
-
|
|
224
|
+
customProps = _this$props.customProps,
|
|
225
|
+
getTargetRef = _this$props.getTargetRef;
|
|
226
226
|
i18nKeys = Object.assign({}, i18nKeys, {
|
|
227
227
|
emptyText: i18nKeys.emptyText || emptyMessage,
|
|
228
228
|
searchEmptyText: i18nKeys.searchEmptyText || searchEmptyMessage
|
|
@@ -245,8 +245,7 @@ var SelectWithAvatarComponent = /*#__PURE__*/function (_SelectComponent) {
|
|
|
245
245
|
var ariaErrorId = this.getNextAriaId();
|
|
246
246
|
var TextBoxProps = customProps.TextBoxProps,
|
|
247
247
|
DropdownSearchTextBoxProps = customProps.DropdownSearchTextBoxProps,
|
|
248
|
-
|
|
249
|
-
SuggestionsProps = _customProps$Suggesti === void 0 ? {} : _customProps$Suggesti;
|
|
248
|
+
SuggestionsProps = customProps.SuggestionsProps;
|
|
250
249
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
251
250
|
className: "".concat(_MultiSelectModule["default"].wrapper, " ").concat(isDisabled ? _MultiSelectModule["default"].disabled : '', " ").concat(isReadOnly ? _MultiSelectModule["default"].readOnly : '', " ").concat(needEffect && !(isDisabled || isReadOnly) ? _MultiSelectModule["default"].effect : '', " ").concat(className ? className : ''),
|
|
252
251
|
"data-id": "".concat(isDisabled ? "".concat(dataId, "_disabled") : isReadOnly ? "".concat(dataId, "_readOnly") : dataId),
|
|
@@ -431,8 +431,7 @@ var SelectWithIcon = /*#__PURE__*/function (_Component) {
|
|
|
431
431
|
htmlId = _this$props7.htmlId,
|
|
432
432
|
isLoading = _this$props7.isLoading,
|
|
433
433
|
dataSelectorId = _this$props7.dataSelectorId,
|
|
434
|
-
customProps = _this$props7.customProps
|
|
435
|
-
customClass = _this$props7.customClass;
|
|
434
|
+
customProps = _this$props7.customProps;
|
|
436
435
|
i18nKeys = Object.assign({}, i18nKeys, {
|
|
437
436
|
emptyText: i18nKeys.emptyText || emptyMessage,
|
|
438
437
|
searchEmptyText: i18nKeys.searchEmptyText || searchEmptyMessage
|
|
@@ -450,10 +449,7 @@ var SelectWithIcon = /*#__PURE__*/function (_Component) {
|
|
|
450
449
|
DropdownSearchTextBoxProps = _customProps$Dropdown === void 0 ? {} : _customProps$Dropdown,
|
|
451
450
|
_customProps$TextBoxI = customProps.TextBoxIconProps,
|
|
452
451
|
TextBoxIconProps = _customProps$TextBoxI === void 0 ? {} : _customProps$TextBoxI,
|
|
453
|
-
|
|
454
|
-
ListItemProps = _customProps$ListItem === void 0 ? {} : _customProps$ListItem;
|
|
455
|
-
var _customClass$dropBoxC = customClass.dropBoxClass,
|
|
456
|
-
dropBoxClass = _customClass$dropBoxC === void 0 ? '' : _customClass$dropBoxC;
|
|
452
|
+
ListItemProps = customProps.ListItemProps;
|
|
457
453
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
458
454
|
className: "".concat(_SelectModule["default"].container, " ").concat(_SelectModule["default"]["box_".concat(size)], " ").concat(isReadOnly ? _SelectModule["default"].readonly : '', " ").concat(borderColor === 'transparent' ? _SelectModule["default"].transparentContainer : ''),
|
|
459
455
|
"data-title": isDisabled ? title : null,
|
|
@@ -546,10 +542,7 @@ var SelectWithIcon = /*#__PURE__*/function (_Component) {
|
|
|
546
542
|
size: boxSize,
|
|
547
543
|
isPadding: false,
|
|
548
544
|
isResponsivePadding: true,
|
|
549
|
-
alignBox: "row"
|
|
550
|
-
customClass: {
|
|
551
|
-
customDropBox: dropBoxClass
|
|
552
|
-
}
|
|
545
|
+
alignBox: "row"
|
|
553
546
|
}, isLoading ? /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
554
547
|
align: "both",
|
|
555
548
|
className: _SelectModule["default"].loader
|
|
@@ -91,8 +91,7 @@ var GroupSelect_defaultProps = {
|
|
|
91
91
|
allowValueFallback: true
|
|
92
92
|
};
|
|
93
93
|
exports.GroupSelect_defaultProps = GroupSelect_defaultProps;
|
|
94
|
-
|
|
95
|
-
var SelectWithAvatar_defaultProps = _defineProperty({
|
|
94
|
+
var SelectWithAvatar_defaultProps = {
|
|
96
95
|
animationStyle: 'bounce',
|
|
97
96
|
defaultDropBoxPosition: 'bottom',
|
|
98
97
|
dropBoxSize: 'small',
|
|
@@ -118,8 +117,7 @@ var SelectWithAvatar_defaultProps = _defineProperty({
|
|
|
118
117
|
customProps: {},
|
|
119
118
|
needEffect: true,
|
|
120
119
|
isLoading: false
|
|
121
|
-
}
|
|
122
|
-
|
|
120
|
+
};
|
|
123
121
|
exports.SelectWithAvatar_defaultProps = SelectWithAvatar_defaultProps;
|
|
124
122
|
var SelectWithIcon_defaultProps = (_SelectWithIcon_defau = {
|
|
125
123
|
isReadOnly: false,
|
|
@@ -130,5 +128,5 @@ var SelectWithIcon_defaultProps = (_SelectWithIcon_defau = {
|
|
|
130
128
|
needListBorder: false,
|
|
131
129
|
needSearch: false,
|
|
132
130
|
boxSize: 'default'
|
|
133
|
-
}, _defineProperty(_SelectWithIcon_defau, "needListBorder", false), _defineProperty(_SelectWithIcon_defau, "needCloseOnSelect", true), _defineProperty(_SelectWithIcon_defau, "borderColor", 'default'), _defineProperty(_SelectWithIcon_defau, "needTick", true), _defineProperty(_SelectWithIcon_defau, "searchBoxSize", 'small'), _defineProperty(_SelectWithIcon_defau, "size", 'medium'), _defineProperty(_SelectWithIcon_defau, "searchFields", []), _defineProperty(_SelectWithIcon_defau, "textBoxSize", 'medium'), _defineProperty(_SelectWithIcon_defau, "textBoxVariant", 'default'), _defineProperty(_SelectWithIcon_defau, "dataId", 'selectWithIcon'), _defineProperty(_SelectWithIcon_defau, "dataSelectorId", 'selectWithIcon'), _defineProperty(_SelectWithIcon_defau, "dropBoxSize", 'small'), _defineProperty(_SelectWithIcon_defau, "needIcon", true), _defineProperty(_SelectWithIcon_defau, "iconSize", '14'), _defineProperty(_SelectWithIcon_defau, "i18nKeys", {}), _defineProperty(_SelectWithIcon_defau, "isLoading", false), _defineProperty(_SelectWithIcon_defau, "isAbsolutePositioningNeeded", true), _defineProperty(_SelectWithIcon_defau, "isRestrictScroll", false), _defineProperty(_SelectWithIcon_defau, "customProps", {}),
|
|
131
|
+
}, _defineProperty(_SelectWithIcon_defau, "needListBorder", false), _defineProperty(_SelectWithIcon_defau, "needCloseOnSelect", true), _defineProperty(_SelectWithIcon_defau, "borderColor", 'default'), _defineProperty(_SelectWithIcon_defau, "needTick", true), _defineProperty(_SelectWithIcon_defau, "searchBoxSize", 'small'), _defineProperty(_SelectWithIcon_defau, "size", 'medium'), _defineProperty(_SelectWithIcon_defau, "searchFields", []), _defineProperty(_SelectWithIcon_defau, "textBoxSize", 'medium'), _defineProperty(_SelectWithIcon_defau, "textBoxVariant", 'default'), _defineProperty(_SelectWithIcon_defau, "dataId", 'selectWithIcon'), _defineProperty(_SelectWithIcon_defau, "dataSelectorId", 'selectWithIcon'), _defineProperty(_SelectWithIcon_defau, "dropBoxSize", 'small'), _defineProperty(_SelectWithIcon_defau, "needIcon", true), _defineProperty(_SelectWithIcon_defau, "iconSize", '14'), _defineProperty(_SelectWithIcon_defau, "i18nKeys", {}), _defineProperty(_SelectWithIcon_defau, "isLoading", false), _defineProperty(_SelectWithIcon_defau, "isAbsolutePositioningNeeded", true), _defineProperty(_SelectWithIcon_defau, "isRestrictScroll", false), _defineProperty(_SelectWithIcon_defau, "customProps", {}), _SelectWithIcon_defau);
|
|
134
132
|
exports.SelectWithIcon_defaultProps = SelectWithIcon_defaultProps;
|
|
@@ -203,8 +203,7 @@ var GroupSelect_propTypes = {
|
|
|
203
203
|
isDefaultSelectValue: _propTypes["default"].bool,
|
|
204
204
|
customProps: _propTypes["default"].shape({
|
|
205
205
|
TextBoxProps: _propTypes["default"].object,
|
|
206
|
-
TextBoxIconProps: _propTypes["default"].object
|
|
207
|
-
SuggestionsProps: _propTypes["default"].object
|
|
206
|
+
TextBoxIconProps: _propTypes["default"].object
|
|
208
207
|
}),
|
|
209
208
|
allowValueFallback: _propTypes["default"].bool
|
|
210
209
|
};
|
|
@@ -269,10 +268,7 @@ var SelectWithAvatar_propTypes = _objectSpread(_objectSpread({}, Select_propType
|
|
|
269
268
|
htmlId: _propTypes["default"].string,
|
|
270
269
|
needEffect: _propTypes["default"].bool,
|
|
271
270
|
isLoading: _propTypes["default"].bool,
|
|
272
|
-
dataSelectorId: _propTypes["default"].string
|
|
273
|
-
customProps: _propTypes["default"].shape({
|
|
274
|
-
SuggestionsProps: _propTypes["default"].object
|
|
275
|
-
})
|
|
271
|
+
dataSelectorId: _propTypes["default"].string
|
|
276
272
|
});
|
|
277
273
|
|
|
278
274
|
exports.SelectWithAvatar_propTypes = SelectWithAvatar_propTypes;
|
|
@@ -339,11 +335,7 @@ var SelectWithIcon_propTypes = {
|
|
|
339
335
|
TextBoxProps: _propTypes["default"].object,
|
|
340
336
|
DropdownSearchTextBoxProps: _propTypes["default"].object,
|
|
341
337
|
SuggestionsProps: _propTypes["default"].object,
|
|
342
|
-
TextBoxIconProps: _propTypes["default"].object
|
|
343
|
-
ListItemProps: _propTypes["default"].object
|
|
344
|
-
}),
|
|
345
|
-
customClass: _propTypes["default"].shape({
|
|
346
|
-
dropBoxClass: _propTypes["default"].string
|
|
338
|
+
TextBoxIconProps: _propTypes["default"].object
|
|
347
339
|
})
|
|
348
340
|
};
|
|
349
341
|
exports.SelectWithIcon_propTypes = SelectWithIcon_propTypes;
|