baseui 0.0.0-next-ecc760f → 0.0.0-next-a340870

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.
@@ -45,7 +45,7 @@ var MAX_SELECTORS = 5;
45
45
 
46
46
  var BottomNavigation = function BottomNavigation(_ref) {
47
47
  var _ref$activeKey = _ref.activeKey,
48
- activeKey = _ref$activeKey === void 0 ? '0' : _ref$activeKey,
48
+ activeKey = _ref$activeKey === void 0 ? 0 : _ref$activeKey,
49
49
  onChange = _ref.onChange,
50
50
  children = _ref.children,
51
51
  _ref$overrides = _ref.overrides,
@@ -118,8 +118,7 @@ var BottomNavigation = function BottomNavigation(_ref) {
118
118
  icon: _icon.Overflow,
119
119
  onChange: function onChange() {
120
120
  return setDisplayOverflow(true);
121
- } // @ts-expect-error todo(ts-migration) TS2365 Operator '>' cannot be applied to types 'Key' and 'number'.
122
- ,
121
+ },
123
122
  isActive: displayOverflow || activeKey > 4,
124
123
  overrides: {
125
124
  Title: overrides.OverflowTitle,
@@ -145,11 +144,11 @@ var BottomNavigation = function BottomNavigation(_ref) {
145
144
  }), displayOverflow && /*#__PURE__*/React.createElement(OverflowPanel, OverflowPanelProps, /*#__PURE__*/React.createElement(_mobileHeader.MobileHeader, {
146
145
  title: "More",
147
146
  expanded: true
148
- }), /*#__PURE__*/React.createElement(OverflowPanelList, OverflowPanelListProps, navItems.slice(MAX_SELECTORS).map(function (navItem, overflowIdx) {
147
+ }), /*#__PURE__*/React.createElement(OverflowPanelList, OverflowPanelListProps, navItems.slice(MAX_SELECTORS - 1).map(function (navItem, overflowIdx) {
149
148
  var _navItem$props = navItem.props,
150
149
  Icon = _navItem$props.icon,
151
150
  title = _navItem$props.title;
152
- var idx = overflowIdx + MAX_SELECTORS;
151
+ var idx = overflowIdx + MAX_SELECTORS - 1;
153
152
  return /*#__PURE__*/React.createElement(_list.ListItem, {
154
153
  artwork: function artwork(props) {
155
154
  return /*#__PURE__*/React.createElement(Icon, props);
@@ -33,11 +33,11 @@ export type NavItemPropsT = {
33
33
  overrides?: NavItemOverridesT,
34
34
  };
35
35
 
36
- export type OnChangeT = (params: { activeKey: React.Key }) => void;
36
+ export type OnChangeT = (params: { activeKey: number }) => void;
37
37
 
38
38
  export type BottomNavigationPropsT = {
39
39
  children?: React.Node,
40
- activeKey?: React.Key,
40
+ activeKey?: number,
41
41
  onChange?: OnChangeT,
42
42
  overrides?: BottomNavigationOverridesT,
43
43
  };
@@ -16,6 +16,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
16
16
  var SELECTOR_LIST_HEIGHT = '64px';
17
17
  var StyledRoot = (0, _styles.styled)('div', {
18
18
  height: '100%',
19
+ width: '100%',
19
20
  display: 'flex',
20
21
  flexDirection: 'column'
21
22
  });
@@ -35,11 +35,11 @@ export type PanelProps = {
35
35
  children: React.ReactNode;
36
36
  };
37
37
  export type OnChange = (params: {
38
- activeKey: React.Key;
38
+ activeKey: number;
39
39
  }) => void;
40
40
  export interface BottomNavigationProps {
41
41
  children?: React.ReactNode;
42
- activeKey?: React.Key;
42
+ activeKey?: number;
43
43
  onChange?: OnChange;
44
44
  overrides?: BottomNavigationOverrides;
45
45
  }
@@ -17,7 +17,7 @@ import { Overflow, ChevronRight } from '../icon';
17
17
  const MAX_SELECTORS = 5;
18
18
 
19
19
  const BottomNavigation = ({
20
- activeKey = '0',
20
+ activeKey = 0,
21
21
  onChange,
22
22
  children,
23
23
  overrides = {}
@@ -64,8 +64,7 @@ const BottomNavigation = ({
64
64
  const OverflowSelector = () => /*#__PURE__*/React.createElement(Selector, {
65
65
  title: "More",
66
66
  icon: Overflow,
67
- onChange: () => setDisplayOverflow(true) // @ts-expect-error todo(ts-migration) TS2365 Operator '>' cannot be applied to types 'Key' and 'number'.
68
- ,
67
+ onChange: () => setDisplayOverflow(true),
69
68
  isActive: displayOverflow || activeKey > 4,
70
69
  overrides: {
71
70
  Title: overrides.OverflowTitle,
@@ -88,12 +87,12 @@ const BottomNavigation = ({
88
87
  }), displayOverflow && /*#__PURE__*/React.createElement(OverflowPanel, OverflowPanelProps, /*#__PURE__*/React.createElement(MobileHeader, {
89
88
  title: "More",
90
89
  expanded: true
91
- }), /*#__PURE__*/React.createElement(OverflowPanelList, OverflowPanelListProps, navItems.slice(MAX_SELECTORS).map((navItem, overflowIdx) => {
90
+ }), /*#__PURE__*/React.createElement(OverflowPanelList, OverflowPanelListProps, navItems.slice(MAX_SELECTORS - 1).map((navItem, overflowIdx) => {
92
91
  const {
93
92
  icon: Icon,
94
93
  title
95
94
  } = navItem.props;
96
- const idx = overflowIdx + MAX_SELECTORS;
95
+ const idx = overflowIdx + MAX_SELECTORS - 1;
97
96
  return /*#__PURE__*/React.createElement(ListItem, {
98
97
  artwork: props => /*#__PURE__*/React.createElement(Icon, props),
99
98
  endEnhancer: () => /*#__PURE__*/React.createElement(ChevronRight, null),
@@ -8,6 +8,7 @@ import { styled } from '../styles';
8
8
  const SELECTOR_LIST_HEIGHT = '64px';
9
9
  export const StyledRoot = styled('div', {
10
10
  height: '100%',
11
+ width: '100%',
11
12
  display: 'flex',
12
13
  flexDirection: 'column'
13
14
  });
@@ -30,7 +30,7 @@ var MAX_SELECTORS = 5;
30
30
 
31
31
  var BottomNavigation = function BottomNavigation(_ref) {
32
32
  var _ref$activeKey = _ref.activeKey,
33
- activeKey = _ref$activeKey === void 0 ? '0' : _ref$activeKey,
33
+ activeKey = _ref$activeKey === void 0 ? 0 : _ref$activeKey,
34
34
  onChange = _ref.onChange,
35
35
  children = _ref.children,
36
36
  _ref$overrides = _ref.overrides,
@@ -103,8 +103,7 @@ var BottomNavigation = function BottomNavigation(_ref) {
103
103
  icon: Overflow,
104
104
  onChange: function onChange() {
105
105
  return setDisplayOverflow(true);
106
- } // @ts-expect-error todo(ts-migration) TS2365 Operator '>' cannot be applied to types 'Key' and 'number'.
107
- ,
106
+ },
108
107
  isActive: displayOverflow || activeKey > 4,
109
108
  overrides: {
110
109
  Title: overrides.OverflowTitle,
@@ -130,11 +129,11 @@ var BottomNavigation = function BottomNavigation(_ref) {
130
129
  }), displayOverflow && /*#__PURE__*/React.createElement(OverflowPanel, OverflowPanelProps, /*#__PURE__*/React.createElement(MobileHeader, {
131
130
  title: "More",
132
131
  expanded: true
133
- }), /*#__PURE__*/React.createElement(OverflowPanelList, OverflowPanelListProps, navItems.slice(MAX_SELECTORS).map(function (navItem, overflowIdx) {
132
+ }), /*#__PURE__*/React.createElement(OverflowPanelList, OverflowPanelListProps, navItems.slice(MAX_SELECTORS - 1).map(function (navItem, overflowIdx) {
134
133
  var _navItem$props = navItem.props,
135
134
  Icon = _navItem$props.icon,
136
135
  title = _navItem$props.title;
137
- var idx = overflowIdx + MAX_SELECTORS;
136
+ var idx = overflowIdx + MAX_SELECTORS - 1;
138
137
  return /*#__PURE__*/React.createElement(ListItem, {
139
138
  artwork: function artwork(props) {
140
139
  return /*#__PURE__*/React.createElement(Icon, props);
@@ -14,6 +14,7 @@ import { styled } from '../styles';
14
14
  var SELECTOR_LIST_HEIGHT = '64px';
15
15
  export var StyledRoot = styled('div', {
16
16
  height: '100%',
17
+ width: '100%',
17
18
  display: 'flex',
18
19
  flexDirection: 'column'
19
20
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "baseui",
3
- "version": "0.0.0-next-ecc760f",
3
+ "version": "0.0.0-next-a340870",
4
4
  "description": "A React Component library implementing the Base design language",
5
5
  "keywords": [
6
6
  "react",