@hero-design/rn 8.40.0 → 8.40.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/.turbo/turbo-build.log +1 -1
- package/es/index.js +21 -14
- package/jest-ci.config.js +17 -0
- package/jest.config.js +0 -2
- package/lib/index.js +21 -14
- package/package.json +9 -8
- package/src/components/SectionHeading/StyledHeading.tsx +21 -10
- package/src/components/SectionHeading/__tests__/StyledHeading.spec.tsx +6 -2
- package/src/components/SectionHeading/__tests__/__snapshots__/StyledHeading.spec.tsx.snap +25 -2
- package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +153 -20
- package/src/components/SectionHeading/__tests__/index.spec.tsx +12 -0
- package/src/components/SectionHeading/index.tsx +51 -32
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +48 -40
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +36 -30
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +48 -40
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +24 -20
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +2 -1
- package/src/theme/components/sectionHeading.ts +2 -1
- package/types/components/SectionHeading/StyledHeading.d.ts +4 -1
- package/types/components/SectionHeading/index.d.ts +7 -1
- package/types/theme/components/sectionHeading.d.ts +1 -0
|
@@ -503,11 +503,13 @@ exports[`rendering allows custom renderer 1`] = `
|
|
|
503
503
|
},
|
|
504
504
|
]
|
|
505
505
|
}
|
|
506
|
+
themeSize="medium"
|
|
506
507
|
>
|
|
507
508
|
<View
|
|
508
509
|
style={
|
|
509
510
|
[
|
|
510
511
|
{
|
|
512
|
+
"alignItems": "center",
|
|
511
513
|
"display": "flex",
|
|
512
514
|
"flexDirection": "row",
|
|
513
515
|
},
|
|
@@ -519,7 +521,7 @@ exports[`rendering allows custom renderer 1`] = `
|
|
|
519
521
|
style={
|
|
520
522
|
[
|
|
521
523
|
{
|
|
522
|
-
"marginRight":
|
|
524
|
+
"marginRight": 12,
|
|
523
525
|
},
|
|
524
526
|
undefined,
|
|
525
527
|
]
|
|
@@ -532,17 +534,16 @@ exports[`rendering allows custom renderer 1`] = `
|
|
|
532
534
|
{
|
|
533
535
|
"color": "#001f23",
|
|
534
536
|
"fontFamily": "BeVietnamPro-Regular",
|
|
535
|
-
"fontSize":
|
|
537
|
+
"fontSize": 14,
|
|
536
538
|
"letterSpacing": 0.48,
|
|
537
|
-
"lineHeight":
|
|
539
|
+
"lineHeight": 22,
|
|
538
540
|
},
|
|
539
541
|
undefined,
|
|
540
542
|
]
|
|
541
543
|
}
|
|
542
|
-
themeFontSize="large"
|
|
543
|
-
themeFontWeight="regular"
|
|
544
544
|
themeIntent="body"
|
|
545
545
|
themeTypeface="neutral"
|
|
546
|
+
themeVariant="small"
|
|
546
547
|
>
|
|
547
548
|
D
|
|
548
549
|
</Text>
|
|
@@ -914,11 +915,13 @@ exports[`rendering allows custom renderer 1`] = `
|
|
|
914
915
|
},
|
|
915
916
|
]
|
|
916
917
|
}
|
|
918
|
+
themeSize="medium"
|
|
917
919
|
>
|
|
918
920
|
<View
|
|
919
921
|
style={
|
|
920
922
|
[
|
|
921
923
|
{
|
|
924
|
+
"alignItems": "center",
|
|
922
925
|
"display": "flex",
|
|
923
926
|
"flexDirection": "row",
|
|
924
927
|
},
|
|
@@ -930,7 +933,7 @@ exports[`rendering allows custom renderer 1`] = `
|
|
|
930
933
|
style={
|
|
931
934
|
[
|
|
932
935
|
{
|
|
933
|
-
"marginRight":
|
|
936
|
+
"marginRight": 12,
|
|
934
937
|
},
|
|
935
938
|
undefined,
|
|
936
939
|
]
|
|
@@ -943,17 +946,16 @@ exports[`rendering allows custom renderer 1`] = `
|
|
|
943
946
|
{
|
|
944
947
|
"color": "#001f23",
|
|
945
948
|
"fontFamily": "BeVietnamPro-Regular",
|
|
946
|
-
"fontSize":
|
|
949
|
+
"fontSize": 14,
|
|
947
950
|
"letterSpacing": 0.48,
|
|
948
|
-
"lineHeight":
|
|
951
|
+
"lineHeight": 22,
|
|
949
952
|
},
|
|
950
953
|
undefined,
|
|
951
954
|
]
|
|
952
955
|
}
|
|
953
|
-
themeFontSize="large"
|
|
954
|
-
themeFontWeight="regular"
|
|
955
956
|
themeIntent="body"
|
|
956
957
|
themeTypeface="neutral"
|
|
958
|
+
themeVariant="small"
|
|
957
959
|
>
|
|
958
960
|
J
|
|
959
961
|
</Text>
|
|
@@ -3721,11 +3723,13 @@ exports[`rendering renders correctly when receives sections 1`] = `
|
|
|
3721
3723
|
},
|
|
3722
3724
|
]
|
|
3723
3725
|
}
|
|
3726
|
+
themeSize="medium"
|
|
3724
3727
|
>
|
|
3725
3728
|
<View
|
|
3726
3729
|
style={
|
|
3727
3730
|
[
|
|
3728
3731
|
{
|
|
3732
|
+
"alignItems": "center",
|
|
3729
3733
|
"display": "flex",
|
|
3730
3734
|
"flexDirection": "row",
|
|
3731
3735
|
},
|
|
@@ -3737,7 +3741,7 @@ exports[`rendering renders correctly when receives sections 1`] = `
|
|
|
3737
3741
|
style={
|
|
3738
3742
|
[
|
|
3739
3743
|
{
|
|
3740
|
-
"marginRight":
|
|
3744
|
+
"marginRight": 12,
|
|
3741
3745
|
},
|
|
3742
3746
|
undefined,
|
|
3743
3747
|
]
|
|
@@ -3750,17 +3754,16 @@ exports[`rendering renders correctly when receives sections 1`] = `
|
|
|
3750
3754
|
{
|
|
3751
3755
|
"color": "#001f23",
|
|
3752
3756
|
"fontFamily": "BeVietnamPro-Regular",
|
|
3753
|
-
"fontSize":
|
|
3757
|
+
"fontSize": 14,
|
|
3754
3758
|
"letterSpacing": 0.48,
|
|
3755
|
-
"lineHeight":
|
|
3759
|
+
"lineHeight": 22,
|
|
3756
3760
|
},
|
|
3757
3761
|
undefined,
|
|
3758
3762
|
]
|
|
3759
3763
|
}
|
|
3760
|
-
themeFontSize="large"
|
|
3761
|
-
themeFontWeight="regular"
|
|
3762
3764
|
themeIntent="body"
|
|
3763
3765
|
themeTypeface="neutral"
|
|
3766
|
+
themeVariant="small"
|
|
3764
3767
|
>
|
|
3765
3768
|
A
|
|
3766
3769
|
</Text>
|
|
@@ -3947,11 +3950,13 @@ exports[`rendering renders correctly when receives sections 1`] = `
|
|
|
3947
3950
|
},
|
|
3948
3951
|
]
|
|
3949
3952
|
}
|
|
3953
|
+
themeSize="medium"
|
|
3950
3954
|
>
|
|
3951
3955
|
<View
|
|
3952
3956
|
style={
|
|
3953
3957
|
[
|
|
3954
3958
|
{
|
|
3959
|
+
"alignItems": "center",
|
|
3955
3960
|
"display": "flex",
|
|
3956
3961
|
"flexDirection": "row",
|
|
3957
3962
|
},
|
|
@@ -3963,7 +3968,7 @@ exports[`rendering renders correctly when receives sections 1`] = `
|
|
|
3963
3968
|
style={
|
|
3964
3969
|
[
|
|
3965
3970
|
{
|
|
3966
|
-
"marginRight":
|
|
3971
|
+
"marginRight": 12,
|
|
3967
3972
|
},
|
|
3968
3973
|
undefined,
|
|
3969
3974
|
]
|
|
@@ -3976,17 +3981,16 @@ exports[`rendering renders correctly when receives sections 1`] = `
|
|
|
3976
3981
|
{
|
|
3977
3982
|
"color": "#001f23",
|
|
3978
3983
|
"fontFamily": "BeVietnamPro-Regular",
|
|
3979
|
-
"fontSize":
|
|
3984
|
+
"fontSize": 14,
|
|
3980
3985
|
"letterSpacing": 0.48,
|
|
3981
|
-
"lineHeight":
|
|
3986
|
+
"lineHeight": 22,
|
|
3982
3987
|
},
|
|
3983
3988
|
undefined,
|
|
3984
3989
|
]
|
|
3985
3990
|
}
|
|
3986
|
-
themeFontSize="large"
|
|
3987
|
-
themeFontWeight="regular"
|
|
3988
3991
|
themeIntent="body"
|
|
3989
3992
|
themeTypeface="neutral"
|
|
3993
|
+
themeVariant="small"
|
|
3990
3994
|
>
|
|
3991
3995
|
B
|
|
3992
3996
|
</Text>
|
|
@@ -740,12 +740,13 @@ exports[`theme returns correct theme object 1`] = `
|
|
|
740
740
|
"sectionHeading": {
|
|
741
741
|
"colors": {
|
|
742
742
|
"background": "#f6f6f7",
|
|
743
|
+
"backgroundSmall": "#ccd2d3",
|
|
743
744
|
},
|
|
744
745
|
"space": {
|
|
745
746
|
"headingHorizontalPadding": 16,
|
|
746
747
|
"headingMarginBottom": 16,
|
|
747
748
|
"headingVerticalPadding": 8,
|
|
748
|
-
"iconMarginRight":
|
|
749
|
+
"iconMarginRight": 12,
|
|
749
750
|
},
|
|
750
751
|
},
|
|
751
752
|
"select": {
|
|
@@ -3,13 +3,14 @@ import type { GlobalTheme } from '../global';
|
|
|
3
3
|
const getSectionHeadingTheme = (theme: GlobalTheme) => {
|
|
4
4
|
const colors = {
|
|
5
5
|
background: theme.colors.neutralGlobalSurface,
|
|
6
|
+
backgroundSmall: theme.colors.decorativePrimarySurface,
|
|
6
7
|
};
|
|
7
8
|
|
|
8
9
|
const space = {
|
|
9
10
|
headingVerticalPadding: theme.space.small,
|
|
10
11
|
headingHorizontalPadding: theme.space.medium,
|
|
11
12
|
headingMarginBottom: theme.space.medium,
|
|
12
|
-
iconMarginRight: theme.space.
|
|
13
|
+
iconMarginRight: theme.space.smallMedium,
|
|
13
14
|
};
|
|
14
15
|
|
|
15
16
|
return { colors, space };
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { View } from 'react-native';
|
|
3
|
+
type StyledHeadingProps = {
|
|
4
|
+
themeSize: 'small' | 'medium';
|
|
5
|
+
};
|
|
3
6
|
declare const StyledHeading: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
4
7
|
theme?: import("@emotion/react").Theme | undefined;
|
|
5
8
|
as?: import("react").ElementType<any> | undefined;
|
|
6
|
-
}, {}, {
|
|
9
|
+
} & StyledHeadingProps, {}, {
|
|
7
10
|
ref?: import("react").Ref<View> | undefined;
|
|
8
11
|
}>;
|
|
9
12
|
declare const StyledIconWrapper: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
@@ -15,10 +15,12 @@ export interface SectionHeadingProps extends ViewProps {
|
|
|
15
15
|
*/
|
|
16
16
|
rightChildren?: ReactElement;
|
|
17
17
|
/**
|
|
18
|
+
* @deprecated fontSize will be removed in the next major release.
|
|
18
19
|
* Size of the text.
|
|
19
20
|
*/
|
|
20
21
|
fontSize?: 'small' | 'medium' | 'large' | 'xlarge';
|
|
21
22
|
/**
|
|
23
|
+
* @deprecated fontWeight will be removed in the next major release.
|
|
22
24
|
* Heading's font-weight.
|
|
23
25
|
*/
|
|
24
26
|
fontWeight?: 'light' | 'regular' | 'semi-bold';
|
|
@@ -34,6 +36,10 @@ export interface SectionHeadingProps extends ViewProps {
|
|
|
34
36
|
* Testing id of the component.
|
|
35
37
|
*/
|
|
36
38
|
testID?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Component size.
|
|
41
|
+
*/
|
|
42
|
+
size?: 'small' | 'medium';
|
|
37
43
|
}
|
|
38
|
-
declare const SectionHeading: ({ icon, text, rightChildren, fontSize, intent, fontWeight, style, testID, }: SectionHeadingProps) => ReactElement;
|
|
44
|
+
declare const SectionHeading: ({ icon, text, rightChildren, fontSize, intent, fontWeight, size, style, testID, }: SectionHeadingProps) => ReactElement;
|
|
39
45
|
export default SectionHeading;
|