@hero-design/rn 8.101.2 → 8.101.3
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/.turbo/turbo-build.log +3 -3
- package/CHANGELOG.md +6 -0
- package/es/index.js +9 -7
- package/lib/index.js +9 -7
- package/package.json +1 -1
- package/src/components/Badge/StyledBadge.tsx +2 -2
- package/src/components/Badge/__tests__/__snapshots__/Count.spec.tsx.snap +21 -21
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +6 -4
- package/src/theme/components/badge.ts +7 -5
- package/src/types.ts +3 -0
- package/stats/8.101.3/rn-stats.html +4844 -0
- package/types/theme/components/badge.d.ts +2 -0
- package/types/types.d.ts +2 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(node:
|
|
1
|
+
(node:3262) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
|
|
2
2
|
(Use `node --trace-warnings ...` to show where the warning was created)
|
|
3
3
|
[36m
|
|
4
4
|
[1msrc/index.ts[22m → [1mlib/index.js, es/index.js[22m...[39m
|
|
@@ -15,9 +15,9 @@ node_modules/d3-selection/src/selection/index.js -> node_modules/d3-selection/sr
|
|
|
15
15
|
[7m [0m [91m ~~~~~~~~~~~~~~~~~~~[0m
|
|
16
16
|
[39m
|
|
17
17
|
[1m[33m(!) [plugin node-resolve] preferring built-in module 'events' over local alternative at '/home/runner/work/hero-design/hero-design/node_modules/events/events.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning.or passing a function to 'preferBuiltins' to provide more fine-grained control over which built-in modules to prefer.[39m[22m
|
|
18
|
-
[32mcreated [1mlib/index.js, es/index.js[22m in [1m1m 10.
|
|
18
|
+
[32mcreated [1mlib/index.js, es/index.js[22m in [1m1m 10.1s[22m[39m
|
|
19
19
|
[36m
|
|
20
20
|
[1m/home/runner/work/hero-design/hero-design/packages/rn/src/locales/en_AU.ts, /home/runner/work/hero-design/hero-design/packages/rn/src/locales/en_CA.ts, /home/runner/work/hero-design/hero-design/packages/rn/src/locales/index.ts, /home/runner/work/hero-design/hero-design/packages/rn/src/locales/types.ts[22m → [1m., .[22m...[39m
|
|
21
21
|
[1m[33m(!) Generated empty chunks[39m[22m
|
|
22
22
|
"locales/types" and "locales/types"
|
|
23
|
-
[32mcreated [1m., .[22m in [
|
|
23
|
+
[32mcreated [1m., .[22m in [1m19.8s[22m[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @hero-design/rn
|
|
2
2
|
|
|
3
|
+
## 8.101.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#3976](https://github.com/Thinkei/hero-design/pull/3976) [`e33210e17116b5510e62076d52c48ec1e9d3be58`](https://github.com/Thinkei/hero-design/commit/e33210e17116b5510e62076d52c48ec1e9d3be58) Thanks [@vinhphan-eh](https://github.com/vinhphan-eh)! - [Badge.Count] Increase text size
|
|
8
|
+
|
|
3
9
|
## 8.101.2
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/es/index.js
CHANGED
|
@@ -2684,15 +2684,15 @@ var getBadgeTheme = function getBadgeTheme(theme) {
|
|
|
2684
2684
|
medium: theme.fontSizes.small,
|
|
2685
2685
|
small: 8
|
|
2686
2686
|
},
|
|
2687
|
-
count:
|
|
2687
|
+
count: 8
|
|
2688
2688
|
};
|
|
2689
2689
|
var lineHeights = {
|
|
2690
2690
|
medium: theme.lineHeights.small,
|
|
2691
2691
|
small: 10,
|
|
2692
2692
|
count: Platform.select({
|
|
2693
|
-
android:
|
|
2693
|
+
android: 14,
|
|
2694
2694
|
// vertical alignment
|
|
2695
|
-
"default":
|
|
2695
|
+
"default": 18
|
|
2696
2696
|
})
|
|
2697
2697
|
};
|
|
2698
2698
|
var radii = {
|
|
@@ -2710,8 +2710,8 @@ var getBadgeTheme = function getBadgeTheme(theme) {
|
|
|
2710
2710
|
statusHeight: theme.sizes.small,
|
|
2711
2711
|
statusWidth: theme.sizes.small,
|
|
2712
2712
|
count: {
|
|
2713
|
-
width: theme.sizes.
|
|
2714
|
-
height: theme.sizes.
|
|
2713
|
+
width: theme.sizes.medium,
|
|
2714
|
+
height: theme.sizes.medium
|
|
2715
2715
|
}
|
|
2716
2716
|
};
|
|
2717
2717
|
var borderWidths = {
|
|
@@ -2726,6 +2726,8 @@ var getBadgeTheme = function getBadgeTheme(theme) {
|
|
|
2726
2726
|
},
|
|
2727
2727
|
statusPositionTop: -theme.space.xxsmall,
|
|
2728
2728
|
statusPositionRight: -theme.space.xxsmall,
|
|
2729
|
+
countPositionTop: -theme.space.xsmall,
|
|
2730
|
+
countPositionRight: -theme.space.xsmall,
|
|
2729
2731
|
countPaddingHorizontal: theme.space.xxsmall
|
|
2730
2732
|
};
|
|
2731
2733
|
return {
|
|
@@ -9724,8 +9726,8 @@ var StyledCount = index$b(View)(function (_ref4) {
|
|
|
9724
9726
|
display: 'flex',
|
|
9725
9727
|
paddingHorizontal: theme.__hd__.badge.space.countPaddingHorizontal,
|
|
9726
9728
|
position: 'absolute',
|
|
9727
|
-
top: theme.__hd__.badge.space.
|
|
9728
|
-
right: theme.__hd__.badge.space.
|
|
9729
|
+
top: theme.__hd__.badge.space.countPositionTop,
|
|
9730
|
+
right: theme.__hd__.badge.space.countPositionRight
|
|
9729
9731
|
};
|
|
9730
9732
|
});
|
|
9731
9733
|
var StyledCountText = index$b(Typography.Text)(function (_ref5) {
|
package/lib/index.js
CHANGED
|
@@ -2713,15 +2713,15 @@ var getBadgeTheme = function getBadgeTheme(theme) {
|
|
|
2713
2713
|
medium: theme.fontSizes.small,
|
|
2714
2714
|
small: 8
|
|
2715
2715
|
},
|
|
2716
|
-
count:
|
|
2716
|
+
count: 8
|
|
2717
2717
|
};
|
|
2718
2718
|
var lineHeights = {
|
|
2719
2719
|
medium: theme.lineHeights.small,
|
|
2720
2720
|
small: 10,
|
|
2721
2721
|
count: reactNative.Platform.select({
|
|
2722
|
-
android:
|
|
2722
|
+
android: 14,
|
|
2723
2723
|
// vertical alignment
|
|
2724
|
-
"default":
|
|
2724
|
+
"default": 18
|
|
2725
2725
|
})
|
|
2726
2726
|
};
|
|
2727
2727
|
var radii = {
|
|
@@ -2739,8 +2739,8 @@ var getBadgeTheme = function getBadgeTheme(theme) {
|
|
|
2739
2739
|
statusHeight: theme.sizes.small,
|
|
2740
2740
|
statusWidth: theme.sizes.small,
|
|
2741
2741
|
count: {
|
|
2742
|
-
width: theme.sizes.
|
|
2743
|
-
height: theme.sizes.
|
|
2742
|
+
width: theme.sizes.medium,
|
|
2743
|
+
height: theme.sizes.medium
|
|
2744
2744
|
}
|
|
2745
2745
|
};
|
|
2746
2746
|
var borderWidths = {
|
|
@@ -2755,6 +2755,8 @@ var getBadgeTheme = function getBadgeTheme(theme) {
|
|
|
2755
2755
|
},
|
|
2756
2756
|
statusPositionTop: -theme.space.xxsmall,
|
|
2757
2757
|
statusPositionRight: -theme.space.xxsmall,
|
|
2758
|
+
countPositionTop: -theme.space.xsmall,
|
|
2759
|
+
countPositionRight: -theme.space.xsmall,
|
|
2758
2760
|
countPaddingHorizontal: theme.space.xxsmall
|
|
2759
2761
|
};
|
|
2760
2762
|
return {
|
|
@@ -9753,8 +9755,8 @@ var StyledCount = index$b(reactNative.View)(function (_ref4) {
|
|
|
9753
9755
|
display: 'flex',
|
|
9754
9756
|
paddingHorizontal: theme.__hd__.badge.space.countPaddingHorizontal,
|
|
9755
9757
|
position: 'absolute',
|
|
9756
|
-
top: theme.__hd__.badge.space.
|
|
9757
|
-
right: theme.__hd__.badge.space.
|
|
9758
|
+
top: theme.__hd__.badge.space.countPositionTop,
|
|
9759
|
+
right: theme.__hd__.badge.space.countPositionRight
|
|
9758
9760
|
};
|
|
9759
9761
|
});
|
|
9760
9762
|
var StyledCountText = index$b(Typography.Text)(function (_ref5) {
|
package/package.json
CHANGED
|
@@ -77,8 +77,8 @@ const StyledCount = styled(View)(({ theme }) => ({
|
|
|
77
77
|
display: 'flex',
|
|
78
78
|
paddingHorizontal: theme.__hd__.badge.space.countPaddingHorizontal,
|
|
79
79
|
position: 'absolute',
|
|
80
|
-
top: theme.__hd__.badge.space.
|
|
81
|
-
right: theme.__hd__.badge.space.
|
|
80
|
+
top: theme.__hd__.badge.space.countPositionTop,
|
|
81
|
+
right: theme.__hd__.badge.space.countPositionRight,
|
|
82
82
|
}));
|
|
83
83
|
|
|
84
84
|
const StyledCountText = styled(Typography.Text)(({ theme }) => ({
|
|
@@ -34,15 +34,15 @@ exports[`BadgeCount displays 1 for content 1 1`] = `
|
|
|
34
34
|
"borderRadius": 999,
|
|
35
35
|
"color": "#ffffff",
|
|
36
36
|
"display": "flex",
|
|
37
|
-
"height":
|
|
37
|
+
"height": 16,
|
|
38
38
|
"justifyContent": "center",
|
|
39
|
-
"minWidth":
|
|
39
|
+
"minWidth": 16,
|
|
40
40
|
"paddingHorizontal": 2,
|
|
41
41
|
"position": "absolute",
|
|
42
|
-
"right": -
|
|
42
|
+
"right": -4,
|
|
43
43
|
"textAlign": "center",
|
|
44
44
|
"textAlignVertical": "center",
|
|
45
|
-
"top": -
|
|
45
|
+
"top": -4,
|
|
46
46
|
},
|
|
47
47
|
undefined,
|
|
48
48
|
]
|
|
@@ -63,9 +63,9 @@ exports[`BadgeCount displays 1 for content 1 1`] = `
|
|
|
63
63
|
[
|
|
64
64
|
{
|
|
65
65
|
"color": "#ffffff",
|
|
66
|
-
"fontSize":
|
|
67
|
-
"height":
|
|
68
|
-
"lineHeight":
|
|
66
|
+
"fontSize": 8,
|
|
67
|
+
"height": 16,
|
|
68
|
+
"lineHeight": 18,
|
|
69
69
|
},
|
|
70
70
|
undefined,
|
|
71
71
|
],
|
|
@@ -137,15 +137,15 @@ exports[`BadgeCount displays 12 for content 12 1`] = `
|
|
|
137
137
|
"borderRadius": 999,
|
|
138
138
|
"color": "#ffffff",
|
|
139
139
|
"display": "flex",
|
|
140
|
-
"height":
|
|
140
|
+
"height": 16,
|
|
141
141
|
"justifyContent": "center",
|
|
142
|
-
"minWidth":
|
|
142
|
+
"minWidth": 16,
|
|
143
143
|
"paddingHorizontal": 2,
|
|
144
144
|
"position": "absolute",
|
|
145
|
-
"right": -
|
|
145
|
+
"right": -4,
|
|
146
146
|
"textAlign": "center",
|
|
147
147
|
"textAlignVertical": "center",
|
|
148
|
-
"top": -
|
|
148
|
+
"top": -4,
|
|
149
149
|
},
|
|
150
150
|
undefined,
|
|
151
151
|
]
|
|
@@ -166,9 +166,9 @@ exports[`BadgeCount displays 12 for content 12 1`] = `
|
|
|
166
166
|
[
|
|
167
167
|
{
|
|
168
168
|
"color": "#ffffff",
|
|
169
|
-
"fontSize":
|
|
170
|
-
"height":
|
|
171
|
-
"lineHeight":
|
|
169
|
+
"fontSize": 8,
|
|
170
|
+
"height": 16,
|
|
171
|
+
"lineHeight": 18,
|
|
172
172
|
},
|
|
173
173
|
undefined,
|
|
174
174
|
],
|
|
@@ -240,15 +240,15 @@ exports[`BadgeCount displays 99+ for content 999 1`] = `
|
|
|
240
240
|
"borderRadius": 999,
|
|
241
241
|
"color": "#ffffff",
|
|
242
242
|
"display": "flex",
|
|
243
|
-
"height":
|
|
243
|
+
"height": 16,
|
|
244
244
|
"justifyContent": "center",
|
|
245
|
-
"minWidth":
|
|
245
|
+
"minWidth": 16,
|
|
246
246
|
"paddingHorizontal": 2,
|
|
247
247
|
"position": "absolute",
|
|
248
|
-
"right": -
|
|
248
|
+
"right": -4,
|
|
249
249
|
"textAlign": "center",
|
|
250
250
|
"textAlignVertical": "center",
|
|
251
|
-
"top": -
|
|
251
|
+
"top": -4,
|
|
252
252
|
},
|
|
253
253
|
undefined,
|
|
254
254
|
]
|
|
@@ -269,9 +269,9 @@ exports[`BadgeCount displays 99+ for content 999 1`] = `
|
|
|
269
269
|
[
|
|
270
270
|
{
|
|
271
271
|
"color": "#ffffff",
|
|
272
|
-
"fontSize":
|
|
273
|
-
"height":
|
|
274
|
-
"lineHeight":
|
|
272
|
+
"fontSize": 8,
|
|
273
|
+
"height": 16,
|
|
274
|
+
"lineHeight": 18,
|
|
275
275
|
},
|
|
276
276
|
undefined,
|
|
277
277
|
],
|
|
@@ -157,7 +157,7 @@ exports[`theme returns correct theme object 1`] = `
|
|
|
157
157
|
"warning": "#ac5d00",
|
|
158
158
|
},
|
|
159
159
|
"fontSizes": {
|
|
160
|
-
"count":
|
|
160
|
+
"count": 8,
|
|
161
161
|
"icon": {
|
|
162
162
|
"medium": 12,
|
|
163
163
|
"small": 8,
|
|
@@ -170,7 +170,7 @@ exports[`theme returns correct theme object 1`] = `
|
|
|
170
170
|
"small": "BeVietnamPro-SemiBold",
|
|
171
171
|
},
|
|
172
172
|
"lineHeights": {
|
|
173
|
-
"count":
|
|
173
|
+
"count": 18,
|
|
174
174
|
"medium": 16,
|
|
175
175
|
"small": 10,
|
|
176
176
|
},
|
|
@@ -179,8 +179,8 @@ exports[`theme returns correct theme object 1`] = `
|
|
|
179
179
|
},
|
|
180
180
|
"sizes": {
|
|
181
181
|
"count": {
|
|
182
|
-
"height":
|
|
183
|
-
"width":
|
|
182
|
+
"height": 16,
|
|
183
|
+
"width": 16,
|
|
184
184
|
},
|
|
185
185
|
"medium": {
|
|
186
186
|
"height": 24,
|
|
@@ -195,6 +195,8 @@ exports[`theme returns correct theme object 1`] = `
|
|
|
195
195
|
},
|
|
196
196
|
"space": {
|
|
197
197
|
"countPaddingHorizontal": 2,
|
|
198
|
+
"countPositionRight": -4,
|
|
199
|
+
"countPositionTop": -4,
|
|
198
200
|
"medium": {
|
|
199
201
|
"horizontalPadding": 8,
|
|
200
202
|
},
|
|
@@ -26,15 +26,15 @@ const getBadgeTheme = (theme: GlobalTheme) => {
|
|
|
26
26
|
medium: theme.fontSizes.small,
|
|
27
27
|
small: 8,
|
|
28
28
|
},
|
|
29
|
-
count:
|
|
29
|
+
count: 8,
|
|
30
30
|
};
|
|
31
31
|
|
|
32
32
|
const lineHeights = {
|
|
33
33
|
medium: theme.lineHeights.small,
|
|
34
34
|
small: 10,
|
|
35
35
|
count: Platform.select({
|
|
36
|
-
android:
|
|
37
|
-
default:
|
|
36
|
+
android: 14, // vertical alignment
|
|
37
|
+
default: 18,
|
|
38
38
|
}),
|
|
39
39
|
};
|
|
40
40
|
|
|
@@ -54,8 +54,8 @@ const getBadgeTheme = (theme: GlobalTheme) => {
|
|
|
54
54
|
statusHeight: theme.sizes.small,
|
|
55
55
|
statusWidth: theme.sizes.small,
|
|
56
56
|
count: {
|
|
57
|
-
width: theme.sizes.
|
|
58
|
-
height: theme.sizes.
|
|
57
|
+
width: theme.sizes.medium,
|
|
58
|
+
height: theme.sizes.medium,
|
|
59
59
|
},
|
|
60
60
|
};
|
|
61
61
|
|
|
@@ -72,6 +72,8 @@ const getBadgeTheme = (theme: GlobalTheme) => {
|
|
|
72
72
|
},
|
|
73
73
|
statusPositionTop: -theme.space.xxsmall,
|
|
74
74
|
statusPositionRight: -theme.space.xxsmall,
|
|
75
|
+
countPositionTop: -theme.space.xsmall,
|
|
76
|
+
countPositionRight: -theme.space.xsmall,
|
|
75
77
|
countPaddingHorizontal: theme.space.xxsmall,
|
|
76
78
|
};
|
|
77
79
|
|
package/src/types.ts
CHANGED
|
@@ -22,6 +22,7 @@ import type { CalendarDateRange } from './components/Calendar/CalendarRange';
|
|
|
22
22
|
import { LocaleCode, LocaleValues, DateTimeFormats } from './locales/types';
|
|
23
23
|
import type { ColumnChartProps } from './components/Chart/ColumnChart';
|
|
24
24
|
import { LineChartProps } from './components/Chart/Line';
|
|
25
|
+
import type { Scale, SystemPalette } from './theme/global';
|
|
25
26
|
|
|
26
27
|
export type {
|
|
27
28
|
BottomNavigationTabType,
|
|
@@ -48,4 +49,6 @@ export type {
|
|
|
48
49
|
DateTimeFormats,
|
|
49
50
|
ColumnChartProps,
|
|
50
51
|
LineChartProps,
|
|
52
|
+
Scale,
|
|
53
|
+
SystemPalette,
|
|
51
54
|
};
|