@hero-design/rn 8.101.3-alpha.0 → 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 +2 -2
- package/es/index.js +10 -9
- package/lib/index.js +10 -9
- 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/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
- package/src/components/TextInput/__tests__/index.spec.tsx +7 -18
- package/src/components/TextInput/index.tsx +1 -3
- 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
|
|
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,10 +1,10 @@
|
|
|
1
1
|
# @hero-design/rn
|
|
2
2
|
|
|
3
|
-
## 8.101.3
|
|
3
|
+
## 8.101.3
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
- [`
|
|
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
8
|
|
|
9
9
|
## 8.101.2
|
|
10
10
|
|
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) {
|
|
@@ -20175,13 +20177,12 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref8, ref) {
|
|
|
20175
20177
|
}, [style, theme]),
|
|
20176
20178
|
backgroundColor = _useMemo2.backgroundColor,
|
|
20177
20179
|
styleWithoutBackgroundColor = _useMemo2.styleWithoutBackgroundColor;
|
|
20178
|
-
var nativeInputTestIDSuffix = testID ? "-".concat(testID) : '';
|
|
20179
20180
|
var nativeInputProps = _objectSpread2(_objectSpread2({
|
|
20180
20181
|
style: StyleSheet$1.flatten([{
|
|
20181
20182
|
backgroundColor: backgroundColor,
|
|
20182
20183
|
color: theme.__hd__.textInput.colors.text
|
|
20183
20184
|
}, textStyleWithoutBorderStyle]),
|
|
20184
|
-
testID:
|
|
20185
|
+
testID: 'text-input',
|
|
20185
20186
|
accessibilityState: {
|
|
20186
20187
|
disabled: state === 'disabled' || state === 'readonly'
|
|
20187
20188
|
},
|
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) {
|
|
@@ -20204,13 +20206,12 @@ var TextInput = /*#__PURE__*/React.forwardRef(function (_ref8, ref) {
|
|
|
20204
20206
|
}, [style, theme]),
|
|
20205
20207
|
backgroundColor = _useMemo2.backgroundColor,
|
|
20206
20208
|
styleWithoutBackgroundColor = _useMemo2.styleWithoutBackgroundColor;
|
|
20207
|
-
var nativeInputTestIDSuffix = testID ? "-".concat(testID) : '';
|
|
20208
20209
|
var nativeInputProps = _objectSpread2(_objectSpread2({
|
|
20209
20210
|
style: reactNative.StyleSheet.flatten([{
|
|
20210
20211
|
backgroundColor: backgroundColor,
|
|
20211
20212
|
color: theme.__hd__.textInput.colors.text
|
|
20212
20213
|
}, textStyleWithoutBorderStyle]),
|
|
20213
|
-
testID:
|
|
20214
|
+
testID: 'text-input',
|
|
20214
20215
|
accessibilityState: {
|
|
20215
20216
|
disabled: state === 'disabled' || state === 'readonly'
|
|
20216
20217
|
},
|
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
|
],
|
|
@@ -1185,7 +1185,7 @@ exports[`TextInput disabled renders correctly 1`] = `
|
|
|
1185
1185
|
},
|
|
1186
1186
|
]
|
|
1187
1187
|
}
|
|
1188
|
-
testID="text-input
|
|
1188
|
+
testID="text-input"
|
|
1189
1189
|
themeVariant="text"
|
|
1190
1190
|
value="100"
|
|
1191
1191
|
/>
|
|
@@ -2320,7 +2320,7 @@ exports[`TextInput idle renders correctly 1`] = `
|
|
|
2320
2320
|
},
|
|
2321
2321
|
]
|
|
2322
2322
|
}
|
|
2323
|
-
testID="text-input
|
|
2323
|
+
testID="text-input"
|
|
2324
2324
|
themeVariant="text"
|
|
2325
2325
|
/>
|
|
2326
2326
|
</View>
|
|
@@ -54,9 +54,7 @@ describe('TextInput', () => {
|
|
|
54
54
|
expect(toJSON()).toMatchSnapshot();
|
|
55
55
|
expect(getByTestId('idle-text-input')).toBeTruthy();
|
|
56
56
|
expect(
|
|
57
|
-
within(getByTestId('idle-text-input')).queryAllByTestId(
|
|
58
|
-
'text-input-idle-text-input'
|
|
59
|
-
)
|
|
57
|
+
within(getByTestId('idle-text-input')).queryAllByTestId('text-input')
|
|
60
58
|
).toHaveLength(1);
|
|
61
59
|
expect(
|
|
62
60
|
within(getByTestId('idle-text-input')).queryAllByText('Amount (AUD)')
|
|
@@ -71,9 +69,7 @@ describe('TextInput', () => {
|
|
|
71
69
|
within(getByTestId('idle-text-input')).queryAllByTestId('input-suffix')
|
|
72
70
|
).toHaveLength(1);
|
|
73
71
|
|
|
74
|
-
expect(getByTestId('text-input
|
|
75
|
-
' '
|
|
76
|
-
);
|
|
72
|
+
expect(getByTestId('text-input').props.placeholder).toBe(' ');
|
|
77
73
|
});
|
|
78
74
|
|
|
79
75
|
it('should not render input-label if label is empty', () => {
|
|
@@ -108,7 +104,7 @@ describe('TextInput', () => {
|
|
|
108
104
|
);
|
|
109
105
|
|
|
110
106
|
const testInput = within(getByTestId('idle-text-input')).getByTestId(
|
|
111
|
-
'text-input
|
|
107
|
+
'text-input'
|
|
112
108
|
);
|
|
113
109
|
|
|
114
110
|
fireEvent.changeText(testInput, 'Thong Quach');
|
|
@@ -309,18 +305,13 @@ describe('TextInput', () => {
|
|
|
309
305
|
expect(toJSON()).toMatchSnapshot();
|
|
310
306
|
expect(queryAllByText('Amount (AUD)')).toHaveLength(1);
|
|
311
307
|
expect(queryAllByTestId('input-label')).toHaveLength(1);
|
|
312
|
-
expect(queryAllByTestId('text-input
|
|
313
|
-
1
|
|
314
|
-
);
|
|
308
|
+
expect(queryAllByTestId('text-input')).toHaveLength(1);
|
|
315
309
|
expect(getByTestId('disabled-text-input')).toHaveProp(
|
|
316
310
|
'pointerEvents',
|
|
317
311
|
'none'
|
|
318
312
|
);
|
|
319
313
|
|
|
320
|
-
expect(getByTestId('text-input
|
|
321
|
-
'multiline',
|
|
322
|
-
'true'
|
|
323
|
-
);
|
|
314
|
+
expect(getByTestId('text-input')).not.toHaveProp('multiline', 'true');
|
|
324
315
|
});
|
|
325
316
|
});
|
|
326
317
|
|
|
@@ -569,7 +560,7 @@ describe('renderInput', () => {
|
|
|
569
560
|
{renderInput({
|
|
570
561
|
variant: 'textarea',
|
|
571
562
|
nativeInputProps: {
|
|
572
|
-
testID: 'text-input
|
|
563
|
+
testID: 'text-input',
|
|
573
564
|
value: 'text input value',
|
|
574
565
|
},
|
|
575
566
|
theme,
|
|
@@ -577,9 +568,7 @@ describe('renderInput', () => {
|
|
|
577
568
|
</>
|
|
578
569
|
);
|
|
579
570
|
|
|
580
|
-
expect(wrapper.queryAllByTestId('text-input
|
|
581
|
-
1
|
|
582
|
-
);
|
|
571
|
+
expect(wrapper.queryAllByTestId('text-input')).toHaveLength(1);
|
|
583
572
|
expect(wrapper.queryAllByDisplayValue('text input value')).toHaveLength(1);
|
|
584
573
|
});
|
|
585
574
|
});
|
|
@@ -397,8 +397,6 @@ const TextInput = forwardRef<TextInputHandles, TextInputProps>(
|
|
|
397
397
|
};
|
|
398
398
|
}, [style, theme]);
|
|
399
399
|
|
|
400
|
-
const nativeInputTestIDSuffix = testID ? `-${testID}` : '';
|
|
401
|
-
|
|
402
400
|
const nativeInputProps: NativeTextInputProps = {
|
|
403
401
|
style: StyleSheet.flatten([
|
|
404
402
|
{
|
|
@@ -407,7 +405,7 @@ const TextInput = forwardRef<TextInputHandles, TextInputProps>(
|
|
|
407
405
|
},
|
|
408
406
|
textStyleWithoutBorderStyle,
|
|
409
407
|
]),
|
|
410
|
-
testID:
|
|
408
|
+
testID: 'text-input',
|
|
411
409
|
accessibilityState: {
|
|
412
410
|
disabled: state === 'disabled' || state === 'readonly',
|
|
413
411
|
},
|
|
@@ -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
|
};
|