@homecode/ui 4.18.52 → 4.18.53

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.
@@ -8,7 +8,7 @@ import S from './Tabs.styl.js';
8
8
  const isId = id => ['string', 'number'].includes(typeof id);
9
9
  function Tabs(props) {
10
10
  const { size = 'm', className, contentClassName, items, hideTabsIfSingle = false, allowEmpty = false, onChange, renderAll, activeId: initialId, children, ...rest } = props;
11
- const [activeId, setActiveId] = useState(isId(initialId) ? initialId : items[0].id);
11
+ const [activeId, setActiveId] = useState(isId(initialId) ? initialId : allowEmpty ? null : items[0].id);
12
12
  useEffect(() => {
13
13
  if (isId(initialId)) {
14
14
  setActiveId(initialId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homecode/ui",
3
- "version": "4.18.52",
3
+ "version": "4.18.53",
4
4
  "description": "React UI components library",
5
5
  "scripts": {
6
6
  "test": "jest",
@@ -1,11 +0,0 @@
1
- const React = require('react');
2
-
3
- module.exports = {
4
- ReactComponent: function SvgMock(props) {
5
- return React.createElement('svg', {
6
- ...props,
7
- 'data-testid': 'svg-mock'
8
- });
9
- },
10
- default: 'SvgMock'
11
- };