@smart-react-components/ui 2.0.0-alpha-135 → 2.0.0-alpha-136

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/Select/Option.js CHANGED
@@ -23,7 +23,7 @@ const Option = ({ active, children, cursorKey, hasHover, hasWaveEffect, isDisabl
23
23
  }
24
24
  }
25
25
  };
26
- const isActive = () => !Array.isArray(active) ? value === active : active.includes(value);
26
+ const isActive = () => !Array.isArray(active) ? (value !== null && value === active) : active.includes(value);
27
27
  const content = (react_1.default.createElement(DropdownItemElement_1.default, { cursor: `$cursor.${cursorKey}`, hasHover: hasHover, isActive: isActive(), isDisabled: isDisabled, isOutline: isOutline, isSoft: isSoft, palette: palette, onClick: handleOnClick }, children));
28
28
  return hasWaveEffect ? react_1.default.createElement(WaveEffect_1.default, { palette: waveEffectPalette }, content) : content;
29
29
  };
@@ -45,6 +45,7 @@ const SelectBox = react_1.default.forwardRef((props, forwardRef) => {
45
45
  return react_1.default.createElement("div", null, (_a = itemList[String(props.active)]) === null || _a === void 0 ? void 0 : _a.children);
46
46
  }
47
47
  return (react_1.default.createElement(BadgeList_1.default, { palette: props.palette, isSoft: props.isSoft, shape: props.shape, size: props.size, sizeSm: props.sizeSm, sizeMd: props.sizeMd, sizeLg: props.sizeLg, sizeXl: props.sizeXl }, props.active
48
+ .map(item => item)
48
49
  .sort((a, b) => itemList[String(a)].idx < itemList[String(b)].idx ? -1 : 1)
49
50
  .map(item => (react_1.default.createElement(Badge_1.default, { key: String(item), elementProps: { 'data-src-not-clickable': true } },
50
51
  react_1.default.createElement(BadgeIcon_1.default, { onClick: () => handleBadgeClick(item) },
@@ -8,7 +8,7 @@ const useSelectBoxItemList = ({ children }) => {
8
8
  if (typeof item.props.value !== 'undefined' && item.props.value !== null) {
9
9
  arr.push(item.props);
10
10
  }
11
- else if (typeof item.props.children !== 'undefined') {
11
+ else if (typeof item.props.children !== 'undefined' && item.props.value !== null) {
12
12
  collectItems(arr, item.props.children);
13
13
  }
14
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smart-react-components/ui",
3
- "version": "2.0.0-alpha-135",
3
+ "version": "2.0.0-alpha-136",
4
4
  "license": "MIT",
5
5
  "main": "index.js",
6
6
  "description": "SRC UI includes React and Styled components.",