@hero-design/rn 8.118.2-alpha.0 → 8.118.2-alpha.2
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @hero-design/rn
|
|
2
2
|
|
|
3
|
+
## 8.118.2-alpha.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#4706](https://github.com/Thinkei/hero-design/pull/4706) [`82a9532c5364c2dea2ffc96153103522295aa868`](https://github.com/Thinkei/hero-design/commit/82a9532c5364c2dea2ffc96153103522295aa868) Thanks [@tqdungit](https://github.com/tqdungit)! - Trigger alpha release for rn
|
|
8
|
+
|
|
9
|
+
- [#4752](https://github.com/Thinkei/hero-design/pull/4752) [`584274fa4239f511946789b9873f8234ace9bc79`](https://github.com/Thinkei/hero-design/commit/584274fa4239f511946789b9873f8234ace9bc79) Thanks [@vinhphan-eh](https://github.com/vinhphan-eh)! - [BottomNavigation] Update sizing for iOS
|
|
10
|
+
|
|
11
|
+
- [#4728](https://github.com/Thinkei/hero-design/pull/4728) [`61b2bbfe16cf7f59f6255ebc0129abfee11a61e7`](https://github.com/Thinkei/hero-design/commit/61b2bbfe16cf7f59f6255ebc0129abfee11a61e7) Thanks [@ttkien](https://github.com/ttkien)! - add react-native key to fix issue on RN 81
|
|
12
|
+
|
|
13
|
+
## 8.118.2-alpha.1
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [#4706](https://github.com/Thinkei/hero-design/pull/4706) [`82a9532c5364c2dea2ffc96153103522295aa868`](https://github.com/Thinkei/hero-design/commit/82a9532c5364c2dea2ffc96153103522295aa868) Thanks [@tqdungit](https://github.com/tqdungit)! - Trigger alpha release for rn
|
|
18
|
+
|
|
19
|
+
- [#4728](https://github.com/Thinkei/hero-design/pull/4728) [`61b2bbfe16cf7f59f6255ebc0129abfee11a61e7`](https://github.com/Thinkei/hero-design/commit/61b2bbfe16cf7f59f6255ebc0129abfee11a61e7) Thanks [@ttkien](https://github.com/ttkien)! - add react-native key to fix issue on RN 81
|
|
20
|
+
|
|
3
21
|
## 8.118.2-alpha.0
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/es/index.js
CHANGED
|
@@ -5686,13 +5686,19 @@ var getBottomNavigationTheme = function getBottomNavigationTheme(theme) {
|
|
|
5686
5686
|
borderTop: theme.borderWidths.base
|
|
5687
5687
|
};
|
|
5688
5688
|
var sizes = {
|
|
5689
|
-
|
|
5689
|
+
// Android default
|
|
5690
|
+
height: theme.sizes['6xlarge'],
|
|
5691
|
+
// iOS-specific
|
|
5692
|
+
heightIOS: theme.sizes.xxxlarge
|
|
5690
5693
|
};
|
|
5691
5694
|
var shadows = {
|
|
5692
5695
|
wrapper: theme.shadows.medium
|
|
5693
5696
|
};
|
|
5694
5697
|
var space = {
|
|
5695
|
-
titleMarginTop: theme.space.xxsmall
|
|
5698
|
+
titleMarginTop: theme.space.xxsmall,
|
|
5699
|
+
// iOS-specific
|
|
5700
|
+
contentPaddingTopIOS: theme.space.xsmall,
|
|
5701
|
+
contentPaddingBottomIOS: theme.space.xsmall
|
|
5696
5702
|
};
|
|
5697
5703
|
return {
|
|
5698
5704
|
colors: colors,
|
|
@@ -10275,8 +10281,12 @@ var ContentWrapper = index$c(View)({
|
|
|
10275
10281
|
var BottomBarWrapper = index$c(View)(function (_ref2) {
|
|
10276
10282
|
var themeInsets = _ref2.themeInsets,
|
|
10277
10283
|
theme = _ref2.theme;
|
|
10278
|
-
return _objectSpread2({
|
|
10279
|
-
|
|
10284
|
+
return _objectSpread2(_objectSpread2({}, Platform.select({
|
|
10285
|
+
ios: {},
|
|
10286
|
+
"default": {
|
|
10287
|
+
height: theme.__hd__.bottomNavigation.sizes.height + themeInsets.bottom
|
|
10288
|
+
}
|
|
10289
|
+
})), {}, {
|
|
10280
10290
|
paddingBottom: themeInsets.bottom,
|
|
10281
10291
|
paddingLeft: Math.max(themeInsets.left, themeInsets.right),
|
|
10282
10292
|
paddingRight: Math.max(themeInsets.left, themeInsets.right),
|
|
@@ -10285,18 +10295,29 @@ var BottomBarWrapper = index$c(View)(function (_ref2) {
|
|
|
10285
10295
|
borderTopWidth: theme.__hd__.bottomNavigation.borderWidths.borderTop
|
|
10286
10296
|
}, theme.__hd__.bottomNavigation.shadows.wrapper);
|
|
10287
10297
|
});
|
|
10288
|
-
var BottomBar = index$c(View)({
|
|
10289
|
-
|
|
10290
|
-
|
|
10291
|
-
|
|
10292
|
-
|
|
10298
|
+
var BottomBar = index$c(View)(function (_ref3) {
|
|
10299
|
+
var theme = _ref3.theme;
|
|
10300
|
+
return _objectSpread2(_objectSpread2({}, Platform.select({
|
|
10301
|
+
ios: {
|
|
10302
|
+
height: theme.__hd__.bottomNavigation.sizes.heightIOS,
|
|
10303
|
+
paddingTop: theme.__hd__.bottomNavigation.space.contentPaddingTopIOS,
|
|
10304
|
+
paddingBottom: theme.__hd__.bottomNavigation.space.contentPaddingBottomIOS
|
|
10305
|
+
},
|
|
10306
|
+
"default": {
|
|
10307
|
+
flex: 1
|
|
10308
|
+
}
|
|
10309
|
+
})), {}, {
|
|
10310
|
+
flexDirection: 'row',
|
|
10311
|
+
overflow: 'hidden',
|
|
10312
|
+
alignItems: 'center'
|
|
10313
|
+
});
|
|
10293
10314
|
});
|
|
10294
10315
|
var BottomBarItem = index$c(View)({
|
|
10295
10316
|
flex: 1,
|
|
10296
10317
|
alignItems: 'center'
|
|
10297
10318
|
});
|
|
10298
|
-
var StyledBottomBarText = index$c(Typography.Label)(function (
|
|
10299
|
-
var theme =
|
|
10319
|
+
var StyledBottomBarText = index$c(Typography.Label)(function (_ref4) {
|
|
10320
|
+
var theme = _ref4.theme;
|
|
10300
10321
|
return {
|
|
10301
10322
|
marginTop: theme.__hd__.bottomNavigation.space.titleMarginTop
|
|
10302
10323
|
};
|
package/lib/index.js
CHANGED
|
@@ -5715,13 +5715,19 @@ var getBottomNavigationTheme = function getBottomNavigationTheme(theme) {
|
|
|
5715
5715
|
borderTop: theme.borderWidths.base
|
|
5716
5716
|
};
|
|
5717
5717
|
var sizes = {
|
|
5718
|
-
|
|
5718
|
+
// Android default
|
|
5719
|
+
height: theme.sizes['6xlarge'],
|
|
5720
|
+
// iOS-specific
|
|
5721
|
+
heightIOS: theme.sizes.xxxlarge
|
|
5719
5722
|
};
|
|
5720
5723
|
var shadows = {
|
|
5721
5724
|
wrapper: theme.shadows.medium
|
|
5722
5725
|
};
|
|
5723
5726
|
var space = {
|
|
5724
|
-
titleMarginTop: theme.space.xxsmall
|
|
5727
|
+
titleMarginTop: theme.space.xxsmall,
|
|
5728
|
+
// iOS-specific
|
|
5729
|
+
contentPaddingTopIOS: theme.space.xsmall,
|
|
5730
|
+
contentPaddingBottomIOS: theme.space.xsmall
|
|
5725
5731
|
};
|
|
5726
5732
|
return {
|
|
5727
5733
|
colors: colors,
|
|
@@ -10304,8 +10310,12 @@ var ContentWrapper = index$c(reactNative.View)({
|
|
|
10304
10310
|
var BottomBarWrapper = index$c(reactNative.View)(function (_ref2) {
|
|
10305
10311
|
var themeInsets = _ref2.themeInsets,
|
|
10306
10312
|
theme = _ref2.theme;
|
|
10307
|
-
return _objectSpread2({
|
|
10308
|
-
|
|
10313
|
+
return _objectSpread2(_objectSpread2({}, reactNative.Platform.select({
|
|
10314
|
+
ios: {},
|
|
10315
|
+
"default": {
|
|
10316
|
+
height: theme.__hd__.bottomNavigation.sizes.height + themeInsets.bottom
|
|
10317
|
+
}
|
|
10318
|
+
})), {}, {
|
|
10309
10319
|
paddingBottom: themeInsets.bottom,
|
|
10310
10320
|
paddingLeft: Math.max(themeInsets.left, themeInsets.right),
|
|
10311
10321
|
paddingRight: Math.max(themeInsets.left, themeInsets.right),
|
|
@@ -10314,18 +10324,29 @@ var BottomBarWrapper = index$c(reactNative.View)(function (_ref2) {
|
|
|
10314
10324
|
borderTopWidth: theme.__hd__.bottomNavigation.borderWidths.borderTop
|
|
10315
10325
|
}, theme.__hd__.bottomNavigation.shadows.wrapper);
|
|
10316
10326
|
});
|
|
10317
|
-
var BottomBar = index$c(reactNative.View)({
|
|
10318
|
-
|
|
10319
|
-
|
|
10320
|
-
|
|
10321
|
-
|
|
10327
|
+
var BottomBar = index$c(reactNative.View)(function (_ref3) {
|
|
10328
|
+
var theme = _ref3.theme;
|
|
10329
|
+
return _objectSpread2(_objectSpread2({}, reactNative.Platform.select({
|
|
10330
|
+
ios: {
|
|
10331
|
+
height: theme.__hd__.bottomNavigation.sizes.heightIOS,
|
|
10332
|
+
paddingTop: theme.__hd__.bottomNavigation.space.contentPaddingTopIOS,
|
|
10333
|
+
paddingBottom: theme.__hd__.bottomNavigation.space.contentPaddingBottomIOS
|
|
10334
|
+
},
|
|
10335
|
+
"default": {
|
|
10336
|
+
flex: 1
|
|
10337
|
+
}
|
|
10338
|
+
})), {}, {
|
|
10339
|
+
flexDirection: 'row',
|
|
10340
|
+
overflow: 'hidden',
|
|
10341
|
+
alignItems: 'center'
|
|
10342
|
+
});
|
|
10322
10343
|
});
|
|
10323
10344
|
var BottomBarItem = index$c(reactNative.View)({
|
|
10324
10345
|
flex: 1,
|
|
10325
10346
|
alignItems: 'center'
|
|
10326
10347
|
});
|
|
10327
|
-
var StyledBottomBarText = index$c(Typography.Label)(function (
|
|
10328
|
-
var theme =
|
|
10348
|
+
var StyledBottomBarText = index$c(Typography.Label)(function (_ref4) {
|
|
10349
|
+
var theme = _ref4.theme;
|
|
10329
10350
|
return {
|
|
10330
10351
|
marginTop: theme.__hd__.bottomNavigation.space.titleMarginTop
|
|
10331
10352
|
};
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { View } from 'react-native';
|
|
1
|
+
import { Platform, View } from 'react-native';
|
|
2
2
|
import styled from '@emotion/native';
|
|
3
3
|
import Typography from '../Typography';
|
|
4
4
|
|
|
@@ -21,7 +21,12 @@ const ContentWrapper = styled(View)({
|
|
|
21
21
|
const BottomBarWrapper = styled(View)<{
|
|
22
22
|
themeInsets: { top: number; right: number; bottom: number; left: number };
|
|
23
23
|
}>(({ themeInsets, theme }) => ({
|
|
24
|
-
|
|
24
|
+
...Platform.select({
|
|
25
|
+
ios: {},
|
|
26
|
+
default: {
|
|
27
|
+
height: theme.__hd__.bottomNavigation.sizes.height + themeInsets.bottom,
|
|
28
|
+
},
|
|
29
|
+
}),
|
|
25
30
|
paddingBottom: themeInsets.bottom,
|
|
26
31
|
paddingLeft: Math.max(themeInsets.left, themeInsets.right),
|
|
27
32
|
paddingRight: Math.max(themeInsets.left, themeInsets.right),
|
|
@@ -31,12 +36,22 @@ const BottomBarWrapper = styled(View)<{
|
|
|
31
36
|
...theme.__hd__.bottomNavigation.shadows.wrapper,
|
|
32
37
|
}));
|
|
33
38
|
|
|
34
|
-
const BottomBar = styled(View)({
|
|
35
|
-
|
|
39
|
+
const BottomBar = styled(View)(({ theme }) => ({
|
|
40
|
+
...Platform.select({
|
|
41
|
+
ios: {
|
|
42
|
+
height: theme.__hd__.bottomNavigation.sizes.heightIOS,
|
|
43
|
+
paddingTop: theme.__hd__.bottomNavigation.space.contentPaddingTopIOS,
|
|
44
|
+
paddingBottom:
|
|
45
|
+
theme.__hd__.bottomNavigation.space.contentPaddingBottomIOS,
|
|
46
|
+
},
|
|
47
|
+
default: {
|
|
48
|
+
flex: 1,
|
|
49
|
+
},
|
|
50
|
+
}),
|
|
36
51
|
flexDirection: 'row',
|
|
37
52
|
overflow: 'hidden',
|
|
38
53
|
alignItems: 'center',
|
|
39
|
-
});
|
|
54
|
+
}));
|
|
40
55
|
|
|
41
56
|
const BottomBarItem = styled(View)({
|
|
42
57
|
flex: 1,
|
|
@@ -12,7 +12,10 @@ const getBottomNavigationTheme = (theme: GlobalTheme) => {
|
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
const sizes = {
|
|
15
|
+
// Android default
|
|
15
16
|
height: theme.sizes['6xlarge'],
|
|
17
|
+
// iOS-specific
|
|
18
|
+
heightIOS: theme.sizes.xxxlarge,
|
|
16
19
|
};
|
|
17
20
|
|
|
18
21
|
const shadows = {
|
|
@@ -21,6 +24,9 @@ const getBottomNavigationTheme = (theme: GlobalTheme) => {
|
|
|
21
24
|
|
|
22
25
|
const space = {
|
|
23
26
|
titleMarginTop: theme.space.xxsmall,
|
|
27
|
+
// iOS-specific
|
|
28
|
+
contentPaddingTopIOS: theme.space.xsmall,
|
|
29
|
+
contentPaddingBottomIOS: theme.space.xsmall,
|
|
24
30
|
};
|
|
25
31
|
|
|
26
32
|
return { colors, borderWidths, shadows, sizes, space };
|
|
@@ -22,9 +22,12 @@ declare const getBottomNavigationTheme: (theme: GlobalTheme) => {
|
|
|
22
22
|
};
|
|
23
23
|
sizes: {
|
|
24
24
|
height: number;
|
|
25
|
+
heightIOS: number;
|
|
25
26
|
};
|
|
26
27
|
space: {
|
|
27
28
|
titleMarginTop: number;
|
|
29
|
+
contentPaddingTopIOS: number;
|
|
30
|
+
contentPaddingBottomIOS: number;
|
|
28
31
|
};
|
|
29
32
|
};
|
|
30
33
|
export default getBottomNavigationTheme;
|