@salutejs/plasma-new-hope 0.122.0-canary.1349.10341555928.0 → 0.122.0-canary.1349.10342023596.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Pagination/Pagination.css +8 -8
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +8 -8
- package/cjs/components/Select/Select.css +8 -8
- package/cjs/components/Select/Select.js +1 -3
- package/cjs/components/Select/Select.js.map +1 -1
- package/cjs/components/Select/ui/Inner/Inner.css +8 -8
- package/cjs/components/Select/ui/Inner/ui/Item/Item.css +8 -8
- package/cjs/components/Select/ui/Inner/ui/Item/Item.js +11 -4
- package/cjs/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
- package/cjs/components/Select/ui/Inner/ui/Item/Item.styles.js +15 -6
- package/cjs/components/Select/ui/Inner/ui/Item/Item.styles.js.map +1 -1
- package/cjs/components/Select/ui/Inner/ui/Item/{Item.styles_y3jg1m.css → Item.styles_baxa65.css} +1 -1
- package/cjs/components/Select/ui/Target/ui/Button/Button.js +2 -4
- package/cjs/components/Select/ui/Target/ui/Button/Button.js.map +1 -1
- package/cjs/components/Select/utils/getButtonLabel.js +2 -3
- package/cjs/components/Select/utils/getButtonLabel.js.map +1 -1
- package/cjs/index.css +8 -8
- package/cjs/utils/isEmpty.js +4 -0
- package/cjs/utils/isEmpty.js.map +1 -1
- package/emotion/cjs/components/Select/Select.js +1 -2
- package/emotion/cjs/components/Select/ui/Inner/ui/Item/Item.js +11 -4
- package/emotion/cjs/components/Select/ui/Inner/ui/Item/Item.styles.js +14 -11
- package/emotion/cjs/components/Select/ui/Target/ui/Button/Button.js +2 -4
- package/emotion/cjs/components/Select/utils/getButtonLabel.js +2 -3
- package/emotion/cjs/utils/isEmpty.js +5 -1
- package/emotion/es/components/Select/Select.js +1 -2
- package/emotion/es/components/Select/ui/Inner/ui/Item/Item.js +11 -4
- package/emotion/es/components/Select/ui/Inner/ui/Item/Item.styles.js +14 -11
- package/emotion/es/components/Select/ui/Target/ui/Button/Button.js +2 -4
- package/emotion/es/components/Select/utils/getButtonLabel.js +2 -3
- package/emotion/es/utils/isEmpty.js +5 -1
- package/es/components/Pagination/Pagination.css +8 -8
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +8 -8
- package/es/components/Select/Select.css +8 -8
- package/es/components/Select/Select.js +1 -3
- package/es/components/Select/Select.js.map +1 -1
- package/es/components/Select/ui/Inner/Inner.css +8 -8
- package/es/components/Select/ui/Inner/ui/Item/Item.css +8 -8
- package/es/components/Select/ui/Inner/ui/Item/Item.js +11 -4
- package/es/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
- package/es/components/Select/ui/Inner/ui/Item/Item.styles.js +15 -6
- package/es/components/Select/ui/Inner/ui/Item/Item.styles.js.map +1 -1
- package/es/components/Select/ui/Inner/ui/Item/{Item.styles_y3jg1m.css → Item.styles_baxa65.css} +1 -1
- package/es/components/Select/ui/Target/ui/Button/Button.js +2 -4
- package/es/components/Select/ui/Target/ui/Button/Button.js.map +1 -1
- package/es/components/Select/utils/getButtonLabel.js +2 -3
- package/es/components/Select/utils/getButtonLabel.js.map +1 -1
- package/es/index.css +8 -8
- package/es/utils/isEmpty.js +4 -0
- package/es/utils/isEmpty.js.map +1 -1
- package/package.json +2 -2
- package/styled-components/cjs/components/Select/Select.js +1 -2
- package/styled-components/cjs/components/Select/ui/Inner/ui/Item/Item.js +11 -4
- package/styled-components/cjs/components/Select/ui/Inner/ui/Item/Item.styles.js +6 -3
- package/styled-components/cjs/components/Select/ui/Target/ui/Button/Button.js +2 -4
- package/styled-components/cjs/components/Select/utils/getButtonLabel.js +2 -3
- package/styled-components/cjs/utils/isEmpty.js +5 -1
- package/styled-components/es/components/Select/Select.js +1 -2
- package/styled-components/es/components/Select/ui/Inner/ui/Item/Item.js +11 -4
- package/styled-components/es/components/Select/ui/Inner/ui/Item/Item.styles.js +6 -3
- package/styled-components/es/components/Select/ui/Target/ui/Button/Button.js +2 -4
- package/styled-components/es/components/Select/utils/getButtonLabel.js +2 -3
- package/styled-components/es/utils/isEmpty.js +5 -1
- package/types/components/Select/Select.d.ts.map +1 -1
- package/types/components/Select/ui/Inner/ui/Item/Item.d.ts.map +1 -1
- package/types/components/Select/ui/Inner/ui/Item/Item.styles.d.ts +3 -1
- package/types/components/Select/ui/Inner/ui/Item/Item.styles.d.ts.map +1 -1
- package/types/components/Select/ui/Target/ui/Button/Button.d.ts.map +1 -1
- package/types/components/Select/ui/Target/ui/Button/Button.types.d.ts +1 -1
- package/types/components/Select/ui/Target/ui/Button/Button.types.d.ts.map +1 -1
- package/types/components/Select/utils/getButtonLabel.d.ts +1 -1
- package/types/components/Select/utils/getButtonLabel.d.ts.map +1 -1
- package/types/utils/isEmpty.d.ts.map +1 -1
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@salutejs/plasma-new-hope",
|
3
|
-
"version": "0.122.0-canary.1349.
|
3
|
+
"version": "0.122.0-canary.1349.10342023596.0",
|
4
4
|
"description": "Salute Design System blueprint",
|
5
5
|
"main": "cjs/index.js",
|
6
6
|
"module": "es/index.js",
|
@@ -118,5 +118,5 @@
|
|
118
118
|
"react-popper": "2.3.0",
|
119
119
|
"storeon": "3.1.5"
|
120
120
|
},
|
121
|
-
"gitHead": "
|
121
|
+
"gitHead": "35e21e5159f71943d5af6ca6588991be0a3304de"
|
122
122
|
}
|
@@ -272,8 +272,7 @@ var selectRoot = exports.selectRoot = function selectRoot(Root) {
|
|
272
272
|
size: size,
|
273
273
|
contentLeft: contentLeft,
|
274
274
|
disabled: disabled,
|
275
|
-
renderValue: renderValue
|
276
|
-
separator: separator
|
275
|
+
renderValue: renderValue
|
277
276
|
}),
|
278
277
|
preventOverflow: false,
|
279
278
|
closeOnOverlayClick: true
|
@@ -27,6 +27,8 @@ var Item = exports.Item = function Item(_ref) {
|
|
27
27
|
var value = item.value,
|
28
28
|
label = item.label,
|
29
29
|
disabled = item.disabled,
|
30
|
+
isDisabled = item.isDisabled,
|
31
|
+
color = item.color,
|
30
32
|
contentLeft = item.contentLeft,
|
31
33
|
contentRight = item.contentRight;
|
32
34
|
var ref = (0, _react.useRef)(null);
|
@@ -40,7 +42,7 @@ var Item = exports.Item = function Item(_ref) {
|
|
40
42
|
variant = _useContext.variant,
|
41
43
|
renderItem = _useContext.renderItem,
|
42
44
|
valueToItemMap = _useContext.valueToItemMap;
|
43
|
-
var isDisabledClassName = disabled ? _Select.classes.dropdownItemIsDisabled : undefined;
|
45
|
+
var isDisabledClassName = disabled || isDisabled ? _Select.classes.dropdownItemIsDisabled : undefined;
|
44
46
|
var focusedClass = currentLevel === focusedPath.length - 1 && index === (focusedPath === null || focusedPath === void 0 ? void 0 : focusedPath[currentLevel]) ? _Select.classes.dropdownItemIsFocused : undefined;
|
45
47
|
var activeClass = value === (path === null || path === void 0 ? void 0 : path[currentLevel + 1]) ? _Select.classes.dropdownItemIsActive : undefined;
|
46
48
|
(0, _react.useEffect)(function () {
|
@@ -53,12 +55,15 @@ var Item = exports.Item = function Item(_ref) {
|
|
53
55
|
}
|
54
56
|
}, [focusedClass]);
|
55
57
|
var handleChange = function handleChange(e) {
|
56
|
-
if (disabled) return;
|
58
|
+
if (disabled || isDisabled) return;
|
57
59
|
e.stopPropagation();
|
58
60
|
handleCheckboxChange(item);
|
59
61
|
};
|
60
62
|
var handleClick = function handleClick(e) {
|
61
|
-
if (disabled)
|
63
|
+
if (disabled || isDisabled) {
|
64
|
+
e.stopPropagation();
|
65
|
+
return;
|
66
|
+
}
|
62
67
|
handleItemClick(item, e);
|
63
68
|
};
|
64
69
|
return /*#__PURE__*/_react["default"].createElement(_Item.Wrapper, {
|
@@ -89,7 +94,9 @@ var Item = exports.Item = function Item(_ref) {
|
|
89
94
|
}))), !multiselect && checked.get(item.value) === 'done' && /*#__PURE__*/_react["default"].createElement(_Icon.IconDone, {
|
90
95
|
size: (0, _utils.sizeToIconSize)(size, variant),
|
91
96
|
color: "inherit"
|
92
|
-
})), contentLeft && /*#__PURE__*/_react["default"].createElement(_Item.StyledContentLeft, null, contentLeft), /*#__PURE__*/_react["default"].createElement(_Item.StyledText,
|
97
|
+
})), contentLeft && /*#__PURE__*/_react["default"].createElement(_Item.StyledContentLeft, null, contentLeft), /*#__PURE__*/_react["default"].createElement(_Item.StyledText, {
|
98
|
+
color: color
|
99
|
+
}, renderItem && renderItem(valueToItemMap.get(value)) || label), contentRight && /*#__PURE__*/_react["default"].createElement(_Item.StyledContentRight, null, contentRight), !(0, _utils2.isEmpty)(item.items) && /*#__PURE__*/_react["default"].createElement(_Item.DisclosureIconWrapper, null, /*#__PURE__*/_react["default"].createElement(_Icon.IconDisclosureRightCentered, {
|
93
100
|
size: (0, _utils.sizeToIconSize)(size, variant),
|
94
101
|
color: "inherit"
|
95
102
|
})));
|
@@ -47,11 +47,14 @@ var IconWrapper = exports.IconWrapper = /*#__PURE__*/_styledComponents["default"
|
|
47
47
|
});
|
48
48
|
var StyledText = exports.StyledText = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
49
49
|
componentId: "plasma-new-hope__sc-fr2h0y-6"
|
50
|
-
})(["", ";flex:1;"], /*#__PURE__*/(0, _mixins.applyEllipsis)())
|
50
|
+
})(["", ";flex:1;color:", ";"], /*#__PURE__*/(0, _mixins.applyEllipsis)(), function (_ref5) {
|
51
|
+
var color = _ref5.color;
|
52
|
+
return color || 'inherit';
|
53
|
+
});
|
51
54
|
var Wrapper = exports.Wrapper = /*#__PURE__*/_styledComponents["default"].li.withConfig({
|
52
55
|
componentId: "plasma-new-hope__sc-fr2h0y-7"
|
53
|
-
})(["display:flex;align-items:center;min-height:var(", ");margin:0;box-sizing:content-box;padding:", ";font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");background:var(", ");color:var(--text-primary);border-radius:var(", ");user-select:none;&:hover:not(.", "){cursor:pointer;background:var(", ");}&.", "{background:var(", ");}&.", "{opacity:", ";cursor:not-allowed;}:focus{outline:none;}", ";"], _Select.tokens.itemHeight, function (
|
54
|
-
var variant =
|
56
|
+
})(["display:flex;align-items:center;min-height:var(", ");margin:0;box-sizing:content-box;padding:", ";font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");background:var(", ");color:var(--text-primary);border-radius:var(", ");user-select:none;&:hover:not(.", "){cursor:pointer;background:var(", ");}&.", "{background:var(", ");}&.", "{opacity:", ";cursor:not-allowed;}:focus{outline:none;}", ";"], _Select.tokens.itemHeight, function (_ref6) {
|
57
|
+
var variant = _ref6.variant;
|
55
58
|
return "var(".concat(variant === 'tight' ? _Select.tokens.itemPaddingTight : _Select.tokens.itemPadding, ")");
|
56
59
|
}, _Select.tokens.fontFamily, _Select.tokens.fontSize, _Select.tokens.fontStyle, _Select.tokens.fontWeight, _Select.tokens.fontLetterSpacing, _Select.tokens.fontLineHeight, _Select.constants.itemBackground, _Select.tokens.itemBorderRadius, _Select.classes.dropdownItemIsDisabled, _Select.constants.itemBackgroundHover, _Select.classes.dropdownItemIsActive, _Select.constants.itemBackgroundHover, _Select.classes.dropdownItemIsDisabled, _Select.constants.opacity, /*#__PURE__*/(0, _mixins.addFocus)({
|
57
60
|
outlineSize: '0.0625rem',
|
@@ -21,8 +21,7 @@ var Button = exports.Button = function Button(_ref) {
|
|
21
21
|
renderValue = _ref.renderValue,
|
22
22
|
focusedPath = _ref.focusedPath,
|
23
23
|
focusedToValueMap = _ref.focusedToValueMap,
|
24
|
-
selectProps = _ref.selectProps
|
25
|
-
separator = _ref.separator;
|
24
|
+
selectProps = _ref.selectProps;
|
26
25
|
var withArrowInverse = opened ? _Select.classes.arrowInverse : undefined;
|
27
26
|
var getActiveDescendant = function getActiveDescendant() {
|
28
27
|
var _focusedToValueMap$ge;
|
@@ -54,7 +53,6 @@ var Button = exports.Button = function Button(_ref) {
|
|
54
53
|
valueToItemMap: valueToItemMap,
|
55
54
|
label: label,
|
56
55
|
renderValue: renderValue,
|
57
|
-
selectProps: selectProps
|
58
|
-
separator: separator
|
56
|
+
selectProps: selectProps
|
59
57
|
}))));
|
60
58
|
};
|
@@ -18,8 +18,7 @@ var getButtonLabel = exports.getButtonLabel = function getButtonLabel(_ref3) {
|
|
18
18
|
valueToItemMap = _ref3.valueToItemMap,
|
19
19
|
label = _ref3.label,
|
20
20
|
renderValue = _ref3.renderValue,
|
21
|
-
selectProps = _ref3.selectProps
|
22
|
-
separator = _ref3.separator;
|
21
|
+
selectProps = _ref3.selectProps;
|
23
22
|
if ((0, _utils.isEmpty)(value)) {
|
24
23
|
return label || '';
|
25
24
|
}
|
@@ -33,7 +32,7 @@ var getButtonLabel = exports.getButtonLabel = function getButtonLabel(_ref3) {
|
|
33
32
|
valueToItemMap: valueToItemMap,
|
34
33
|
renderValue: renderValue
|
35
34
|
});
|
36
|
-
}).join(
|
35
|
+
}).join(', ');
|
37
36
|
}
|
38
37
|
return getLabel({
|
39
38
|
value: value.toString(),
|
@@ -11,6 +11,9 @@ var isEmpty = exports.isEmpty = function isEmpty(obj) {
|
|
11
11
|
if (obj == null) {
|
12
12
|
return true;
|
13
13
|
}
|
14
|
+
if (typeof obj === 'number') {
|
15
|
+
return false;
|
16
|
+
}
|
14
17
|
|
15
18
|
// Assume if it has a length property with a non-zero value
|
16
19
|
// that that property is correct.
|
@@ -44,4 +47,5 @@ var isEmpty = exports.isEmpty = function isEmpty(obj) {
|
|
44
47
|
// '{}' true
|
45
48
|
// '[]' true
|
46
49
|
// '123' false
|
47
|
-
// '[123]' false
|
50
|
+
// '[123]' false
|
51
|
+
// 123 false
|
@@ -263,8 +263,7 @@ export var selectRoot = function selectRoot(Root) {
|
|
263
263
|
size: size,
|
264
264
|
contentLeft: contentLeft,
|
265
265
|
disabled: disabled,
|
266
|
-
renderValue: renderValue
|
267
|
-
separator: separator
|
266
|
+
renderValue: renderValue
|
268
267
|
}),
|
269
268
|
preventOverflow: false,
|
270
269
|
closeOnOverlayClick: true
|
@@ -18,6 +18,8 @@ export var Item = function Item(_ref) {
|
|
18
18
|
var value = item.value,
|
19
19
|
label = item.label,
|
20
20
|
disabled = item.disabled,
|
21
|
+
isDisabled = item.isDisabled,
|
22
|
+
color = item.color,
|
21
23
|
contentLeft = item.contentLeft,
|
22
24
|
contentRight = item.contentRight;
|
23
25
|
var ref = useRef(null);
|
@@ -31,7 +33,7 @@ export var Item = function Item(_ref) {
|
|
31
33
|
variant = _useContext.variant,
|
32
34
|
renderItem = _useContext.renderItem,
|
33
35
|
valueToItemMap = _useContext.valueToItemMap;
|
34
|
-
var isDisabledClassName = disabled ? classes.dropdownItemIsDisabled : undefined;
|
36
|
+
var isDisabledClassName = disabled || isDisabled ? classes.dropdownItemIsDisabled : undefined;
|
35
37
|
var focusedClass = currentLevel === focusedPath.length - 1 && index === (focusedPath === null || focusedPath === void 0 ? void 0 : focusedPath[currentLevel]) ? classes.dropdownItemIsFocused : undefined;
|
36
38
|
var activeClass = value === (path === null || path === void 0 ? void 0 : path[currentLevel + 1]) ? classes.dropdownItemIsActive : undefined;
|
37
39
|
useEffect(function () {
|
@@ -44,12 +46,15 @@ export var Item = function Item(_ref) {
|
|
44
46
|
}
|
45
47
|
}, [focusedClass]);
|
46
48
|
var handleChange = function handleChange(e) {
|
47
|
-
if (disabled) return;
|
49
|
+
if (disabled || isDisabled) return;
|
48
50
|
e.stopPropagation();
|
49
51
|
handleCheckboxChange(item);
|
50
52
|
};
|
51
53
|
var handleClick = function handleClick(e) {
|
52
|
-
if (disabled)
|
54
|
+
if (disabled || isDisabled) {
|
55
|
+
e.stopPropagation();
|
56
|
+
return;
|
57
|
+
}
|
53
58
|
handleItemClick(item, e);
|
54
59
|
};
|
55
60
|
return /*#__PURE__*/React.createElement(Wrapper, {
|
@@ -80,7 +85,9 @@ export var Item = function Item(_ref) {
|
|
80
85
|
}))), !multiselect && checked.get(item.value) === 'done' && /*#__PURE__*/React.createElement(IconDone, {
|
81
86
|
size: sizeToIconSize(size, variant),
|
82
87
|
color: "inherit"
|
83
|
-
})), contentLeft && /*#__PURE__*/React.createElement(StyledContentLeft, null, contentLeft), /*#__PURE__*/React.createElement(StyledText,
|
88
|
+
})), contentLeft && /*#__PURE__*/React.createElement(StyledContentLeft, null, contentLeft), /*#__PURE__*/React.createElement(StyledText, {
|
89
|
+
color: color
|
90
|
+
}, renderItem && renderItem(valueToItemMap.get(value)) || label), contentRight && /*#__PURE__*/React.createElement(StyledContentRight, null, contentRight), !isEmpty(item.items) && /*#__PURE__*/React.createElement(DisclosureIconWrapper, null, /*#__PURE__*/React.createElement(IconDisclosureRightCentered, {
|
84
91
|
size: sizeToIconSize(size, variant),
|
85
92
|
color: "inherit"
|
86
93
|
})));
|
@@ -40,11 +40,14 @@ export var IconWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
40
40
|
});
|
41
41
|
export var StyledText = /*#__PURE__*/styled.div.withConfig({
|
42
42
|
componentId: "plasma-new-hope__sc-fr2h0y-6"
|
43
|
-
})(["", ";flex:1;"], /*#__PURE__*/applyEllipsis())
|
43
|
+
})(["", ";flex:1;color:", ";"], /*#__PURE__*/applyEllipsis(), function (_ref5) {
|
44
|
+
var color = _ref5.color;
|
45
|
+
return color || 'inherit';
|
46
|
+
});
|
44
47
|
export var Wrapper = /*#__PURE__*/styled.li.withConfig({
|
45
48
|
componentId: "plasma-new-hope__sc-fr2h0y-7"
|
46
|
-
})(["display:flex;align-items:center;min-height:var(", ");margin:0;box-sizing:content-box;padding:", ";font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");background:var(", ");color:var(--text-primary);border-radius:var(", ");user-select:none;&:hover:not(.", "){cursor:pointer;background:var(", ");}&.", "{background:var(", ");}&.", "{opacity:", ";cursor:not-allowed;}:focus{outline:none;}", ";"], tokens.itemHeight, function (
|
47
|
-
var variant =
|
49
|
+
})(["display:flex;align-items:center;min-height:var(", ");margin:0;box-sizing:content-box;padding:", ";font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");background:var(", ");color:var(--text-primary);border-radius:var(", ");user-select:none;&:hover:not(.", "){cursor:pointer;background:var(", ");}&.", "{background:var(", ");}&.", "{opacity:", ";cursor:not-allowed;}:focus{outline:none;}", ";"], tokens.itemHeight, function (_ref6) {
|
50
|
+
var variant = _ref6.variant;
|
48
51
|
return "var(".concat(variant === 'tight' ? tokens.itemPaddingTight : tokens.itemPadding, ")");
|
49
52
|
}, tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.fontLetterSpacing, tokens.fontLineHeight, constants.itemBackground, tokens.itemBorderRadius, classes.dropdownItemIsDisabled, constants.itemBackgroundHover, classes.dropdownItemIsActive, constants.itemBackgroundHover, classes.dropdownItemIsDisabled, constants.opacity, /*#__PURE__*/addFocus({
|
50
53
|
outlineSize: '0.0625rem',
|
@@ -14,8 +14,7 @@ export var Button = function Button(_ref) {
|
|
14
14
|
renderValue = _ref.renderValue,
|
15
15
|
focusedPath = _ref.focusedPath,
|
16
16
|
focusedToValueMap = _ref.focusedToValueMap,
|
17
|
-
selectProps = _ref.selectProps
|
18
|
-
separator = _ref.separator;
|
17
|
+
selectProps = _ref.selectProps;
|
19
18
|
var withArrowInverse = opened ? classes.arrowInverse : undefined;
|
20
19
|
var getActiveDescendant = function getActiveDescendant() {
|
21
20
|
var _focusedToValueMap$ge;
|
@@ -47,7 +46,6 @@ export var Button = function Button(_ref) {
|
|
47
46
|
valueToItemMap: valueToItemMap,
|
48
47
|
label: label,
|
49
48
|
renderValue: renderValue,
|
50
|
-
selectProps: selectProps
|
51
|
-
separator: separator
|
49
|
+
selectProps: selectProps
|
52
50
|
}))));
|
53
51
|
};
|
@@ -12,8 +12,7 @@ export var getButtonLabel = function getButtonLabel(_ref3) {
|
|
12
12
|
valueToItemMap = _ref3.valueToItemMap,
|
13
13
|
label = _ref3.label,
|
14
14
|
renderValue = _ref3.renderValue,
|
15
|
-
selectProps = _ref3.selectProps
|
16
|
-
separator = _ref3.separator;
|
15
|
+
selectProps = _ref3.selectProps;
|
17
16
|
if (isEmpty(value)) {
|
18
17
|
return label || '';
|
19
18
|
}
|
@@ -27,7 +26,7 @@ export var getButtonLabel = function getButtonLabel(_ref3) {
|
|
27
26
|
valueToItemMap: valueToItemMap,
|
28
27
|
renderValue: renderValue
|
29
28
|
});
|
30
|
-
}).join(
|
29
|
+
}).join(', ');
|
31
30
|
}
|
32
31
|
return getLabel({
|
33
32
|
value: value.toString(),
|
@@ -5,6 +5,9 @@ var isEmpty = function isEmpty(obj) {
|
|
5
5
|
if (obj == null) {
|
6
6
|
return true;
|
7
7
|
}
|
8
|
+
if (typeof obj === 'number') {
|
9
|
+
return false;
|
10
|
+
}
|
8
11
|
|
9
12
|
// Assume if it has a length property with a non-zero value
|
10
13
|
// that that property is correct.
|
@@ -39,4 +42,5 @@ export { isEmpty };
|
|
39
42
|
// '{}' true
|
40
43
|
// '[]' true
|
41
44
|
// '123' false
|
42
|
-
// '[123]' false
|
45
|
+
// '[123]' false
|
46
|
+
// 123 false
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoF,MAAM,OAAO,CAAC;AAEzG,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAU1C,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAKrE,eAAO,MAAM,OAAO,4BAAgD,CAAC;AAErE;;GAEG;AACH,eAAO,MAAM,UAAU,SAAU,UAAU,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,OAAO,CAAC,CAAC,
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoF,MAAM,OAAO,CAAC;AAEzG,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAU1C,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAKrE,eAAO,MAAM,OAAO,4BAAgD,CAAC;AAErE;;GAEG;AACH,eAAO,MAAM,UAAU,SAAU,UAAU,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,OAAO,CAAC,CAAC,qGAqRzF,CAAC;AAEP,eAAO,MAAM,YAAY;;;mBAvRQ,UAAU,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,OAAO,CAAC,CAAC;;;;;;;;;;;;;;;CAyS9F,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Item.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Select/ui/Inner/ui/Item/Item.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAqB,EAAE,EAAc,MAAM,OAAO,CAAC;AAQjE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAazC,eAAO,MAAM,IAAI,EAAE,EAAE,CAAC,SAAS,
|
1
|
+
{"version":3,"file":"Item.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Select/ui/Inner/ui/Item/Item.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAqB,EAAE,EAAc,MAAM,OAAO,CAAC;AAQjE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAazC,eAAO,MAAM,IAAI,EAAE,EAAE,CAAC,SAAS,CAwG9B,CAAC"}
|
@@ -11,7 +11,9 @@ export declare const DisclosureIconWrapper: import("@linaria/react").StyledCompo
|
|
11
11
|
export declare const IconWrapper: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
12
12
|
variant: SelectProps['variant'];
|
13
13
|
}>;
|
14
|
-
export declare const StyledText: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> &
|
14
|
+
export declare const StyledText: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
15
|
+
color?: string | undefined;
|
16
|
+
}>;
|
15
17
|
export declare const Wrapper: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLLIElement> & import("react").LiHTMLAttributes<HTMLLIElement> & {
|
16
18
|
variant: SelectProps['variant'];
|
17
19
|
}>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Item.styles.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Select/ui/Inner/ui/Item/Item.styles.ts"],"names":[],"mappings":";AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAK5D,eAAO,MAAM,cAAc,qSAM1B,CAAC;AAKF,eAAO,MAAM,eAAe;;;kDAG3B,CAAC;AAEF,eAAO,MAAM,iBAAiB,qKAE7B,CAAC;AAEF,eAAO,MAAM,kBAAkB,qKAG9B,CAAC;AAEF,eAAO,MAAM,qBAAqB,qKAOjC,CAAC;AAEF,eAAO,MAAM,WAAW;aAAyB,WAAW,CAAC,SAAS,CAAC;EAkBtE,CAAC;AAEF,eAAO,MAAM,UAAU,
|
1
|
+
{"version":3,"file":"Item.styles.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Select/ui/Inner/ui/Item/Item.styles.ts"],"names":[],"mappings":";AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAK5D,eAAO,MAAM,cAAc,qSAM1B,CAAC;AAKF,eAAO,MAAM,eAAe;;;kDAG3B,CAAC;AAEF,eAAO,MAAM,iBAAiB,qKAE7B,CAAC;AAEF,eAAO,MAAM,kBAAkB,qKAG9B,CAAC;AAEF,eAAO,MAAM,qBAAqB,qKAOjC,CAAC;AAEF,eAAO,MAAM,WAAW;aAAyB,WAAW,CAAC,SAAS,CAAC;EAkBtE,CAAC;AAEF,eAAO,MAAM,UAAU;;EAItB,CAAC;AAEF,eAAO,MAAM,OAAO;aAAwB,WAAW,CAAC,SAAS,CAAC;EAiDjE,CAAC;AAEF,eAAO,MAAM,qBAAqB,uKAAgB,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Select/ui/Target/ui/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Select/ui/Target/ui/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA+DxC,CAAC"}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import { TargetProps } from '../../Target.types';
|
2
2
|
export declare type ButtonProps = Omit<TargetProps, 'target' | 'onChipClick' | 'labelPlacement' | 'helperText' | 'focusedChipIndex' | 'contentLeft' | 'placeholder'>;
|
3
|
-
export declare type GetButtonLabelProps = Pick<ButtonProps, 'value' | 'valueToItemMap' | 'label' | 'renderValue' | 'selectProps'
|
3
|
+
export declare type GetButtonLabelProps = Pick<ButtonProps, 'value' | 'valueToItemMap' | 'label' | 'renderValue' | 'selectProps'>;
|
4
4
|
//# sourceMappingURL=Button.types.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Button.types.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Select/ui/Target/ui/Button/Button.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,oBAAY,WAAW,GAAG,IAAI,CAC1B,WAAW,EACX,QAAQ,GAAG,aAAa,GAAG,gBAAgB,GAAG,YAAY,GAAG,kBAAkB,GAAG,aAAa,GAAG,aAAa,CAClH,CAAC;AAEF,oBAAY,mBAAmB,GAAG,IAAI,CAClC,WAAW,EACX,OAAO,GAAG,gBAAgB,GAAG,OAAO,GAAG,aAAa,GAAG,aAAa,
|
1
|
+
{"version":3,"file":"Button.types.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Select/ui/Target/ui/Button/Button.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,oBAAY,WAAW,GAAG,IAAI,CAC1B,WAAW,EACX,QAAQ,GAAG,aAAa,GAAG,gBAAgB,GAAG,YAAY,GAAG,kBAAkB,GAAG,aAAa,GAAG,aAAa,CAClH,CAAC;AAEF,oBAAY,mBAAmB,GAAG,IAAI,CAClC,WAAW,EACX,OAAO,GAAG,gBAAgB,GAAG,OAAO,GAAG,aAAa,GAAG,aAAa,CACvE,CAAC"}
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { GetButtonLabelProps } from '../ui/Target/ui/Button/Button.types';
|
2
|
-
export declare const getButtonLabel: ({ value, valueToItemMap, label, renderValue, selectProps,
|
2
|
+
export declare const getButtonLabel: ({ value, valueToItemMap, label, renderValue, selectProps, }: GetButtonLabelProps) => string;
|
3
3
|
//# sourceMappingURL=getButtonLabel.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getButtonLabel.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/utils/getButtonLabel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAa1E,eAAO,MAAM,cAAc,
|
1
|
+
{"version":3,"file":"getButtonLabel.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/utils/getButtonLabel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAa1E,eAAO,MAAM,cAAc,gEAMxB,mBAAmB,KAAG,MA0BxB,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"isEmpty.d.ts","sourceRoot":"","sources":["../../src/utils/isEmpty.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,OAAO,QAAS,GAAG,KAAG,
|
1
|
+
{"version":3,"file":"isEmpty.d.ts","sourceRoot":"","sources":["../../src/utils/isEmpty.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,OAAO,QAAS,GAAG,KAAG,OAoC3B,CAAC;AAEF,OAAO,EAAE,OAAO,EAAE,CAAC"}
|