@hero-design/rn 7.28.0 → 7.29.0
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/.eslintrc.js +2 -1
- package/.turbo/turbo-build.log +9 -9
- package/es/index.js +119 -95
- package/lib/index.js +119 -95
- package/package.json +5 -4
- package/src/components/Alert/index.tsx +1 -0
- package/src/components/BottomSheet/Header.tsx +1 -1
- package/src/components/BottomSheet/StyledBottomSheet.tsx +1 -2
- package/src/components/BottomSheet/__tests__/__snapshots__/index.spec.tsx.snap +12 -14
- package/src/components/DatePicker/DatePickerIOS.tsx +5 -11
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +1 -0
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +35 -16
- package/src/components/Empty/StyledEmpty.tsx +1 -1
- package/src/components/Empty/__tests__/__snapshots__/index.spec.tsx.snap +10 -10
- package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
- package/src/components/FAB/ActionGroup/index.tsx +1 -1
- package/src/components/List/ListItem.tsx +2 -2
- package/src/components/Progress/ProgressCircle.tsx +1 -1
- package/src/components/Select/{StyledOptionList.tsx → BaseOptionList.tsx} +6 -6
- package/src/components/Select/Footer.tsx +2 -7
- package/src/components/Select/MultiSelect/Option.tsx +24 -11
- package/src/components/Select/MultiSelect/OptionList.tsx +3 -2
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/Option.spec.tsx.snap +3 -2
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +47 -21
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +204 -107
- package/src/components/Select/MultiSelect/index.tsx +16 -0
- package/src/components/Select/SingleSelect/Option.tsx +12 -12
- package/src/components/Select/SingleSelect/OptionList.tsx +3 -2
- package/src/components/Select/SingleSelect/StyledSingleSelect.tsx +6 -0
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/Option.spec.tsx.snap +0 -1
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +32 -16
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +70 -54
- package/src/components/Select/SingleSelect/index.tsx +16 -0
- package/src/components/Select/StyledSelect.tsx +6 -7
- package/src/components/Select/types.ts +1 -0
- package/src/components/Tabs/ScrollableTabs.tsx +1 -1
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +9 -3
- package/src/components/Tag/index.tsx +2 -2
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +12 -0
- package/src/components/TextInput/__tests__/index.spec.tsx +4 -2
- package/src/components/TextInput/index.tsx +7 -1
- package/src/components/TimePicker/TimePickerIOS.tsx +5 -11
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +1 -0
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +35 -16
- package/src/components/Toast/ToastContainer.tsx +1 -1
- package/src/components/Toast/ToastProvider.tsx +10 -1
- package/src/components/Toast/__tests__/ToastContainer.spec.tsx +5 -5
- package/src/components/Toast/__tests__/__snapshots__/ToastContainer.spec.tsx.snap +4 -4
- package/src/components/Typography/Text/StyledText.tsx +2 -1
- package/src/components/Typography/Text/index.tsx +2 -1
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +19 -15
- package/src/theme/components/bottomSheet.ts +4 -5
- package/src/theme/components/empty.ts +6 -5
- package/src/theme/components/fab.ts +1 -1
- package/src/theme/components/select.ts +4 -6
- package/src/theme/components/typography.ts +2 -0
- package/src/theme/global/colors/global.ts +1 -0
- package/src/theme/global/colors/types.ts +1 -0
- package/src/theme/global/typography.ts +4 -1
- package/types/components/Alert/index.d.ts +1 -0
- package/types/components/List/ListItem.d.ts +2 -2
- package/types/components/Select/{StyledOptionList.d.ts → BaseOptionList.d.ts} +3 -3
- package/types/components/Select/MultiSelect/Option.d.ts +2 -1
- package/types/components/Select/SingleSelect/Option.d.ts +2 -1
- package/types/components/Select/SingleSelect/StyledSingleSelect.d.ts +1 -0
- package/types/components/Select/StyledSelect.d.ts +3 -6
- package/types/components/Select/types.d.ts +1 -0
- package/types/components/Toast/ToastProvider.d.ts +1 -1
- package/types/components/Toast/index.d.ts +1 -1
- package/types/components/Typography/Text/StyledText.d.ts +1 -1
- package/types/components/Typography/Text/index.d.ts +1 -1
- package/types/theme/components/bottomSheet.d.ts +0 -1
- package/types/theme/components/empty.d.ts +1 -0
- package/types/theme/components/select.d.ts +3 -4
- package/types/theme/components/typography.d.ts +2 -0
- package/types/theme/global/colors/types.d.ts +1 -0
- package/types/theme/global/index.d.ts +1 -0
- package/types/theme/global/typography.d.ts +1 -0
- package/src/components/Select/__tests__/StyledSelect.spec.tsx +0 -14
- package/src/components/Select/__tests__/__snapshots__/StyledSelect.spec.tsx.snap +0 -29
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
|
-
declare const Option: ({ text, disabled, selected, onPress, }: {
|
|
2
|
+
declare const Option: ({ text, disabled, selected, onPress, highlighted, }: {
|
|
3
3
|
text: string | ReactElement;
|
|
4
4
|
disabled?: boolean | undefined;
|
|
5
5
|
selected: boolean;
|
|
6
6
|
onPress: () => void;
|
|
7
|
+
highlighted?: boolean | undefined;
|
|
7
8
|
}) => JSX.Element;
|
|
8
9
|
export default Option;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const StyledOptionList: <V, T extends import("../types").OptionType<V>>({ keyExtractor, loading, onEndReached, onQueryChange, sections, renderItem, sectionListRef, }: import("../BaseOptionList").BaseOptionListProps<V, T>) => JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { View } from 'react-native';
|
|
1
|
+
import { SectionList, View } from 'react-native';
|
|
2
2
|
declare const SectionSpacer: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
3
3
|
theme?: import("@emotion/react").Theme | undefined;
|
|
4
4
|
as?: import("react").ElementType<any> | undefined;
|
|
@@ -11,14 +11,11 @@ declare const OptionSpacer: import("@emotion/native").StyledComponent<import("re
|
|
|
11
11
|
}, {}, {
|
|
12
12
|
ref?: import("react").Ref<View> | undefined;
|
|
13
13
|
}>;
|
|
14
|
-
declare const FooterText: import("@emotion/native").StyledComponent<import("../Typography/Text").TextProps & {
|
|
15
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
16
|
-
as?: import("react").ElementType<any> | undefined;
|
|
17
|
-
}, {}, {}>;
|
|
18
14
|
declare const StyledSearchBar: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
19
15
|
theme?: import("@emotion/react").Theme | undefined;
|
|
20
16
|
as?: import("react").ElementType<any> | undefined;
|
|
21
17
|
}, {}, {
|
|
22
18
|
ref?: import("react").Ref<View> | undefined;
|
|
23
19
|
}>;
|
|
24
|
-
|
|
20
|
+
declare const StyledSectionList: typeof SectionList;
|
|
21
|
+
export { SectionSpacer, OptionSpacer, StyledSearchBar, StyledSectionList };
|
|
@@ -6,5 +6,5 @@ declare type ToastProviderProps = {
|
|
|
6
6
|
*/
|
|
7
7
|
children?: ReactNode;
|
|
8
8
|
} & ToastContainerProps;
|
|
9
|
-
declare const ToastProvider: ({ children, displayType, position, }: ToastProviderProps) => JSX.Element;
|
|
9
|
+
declare const ToastProvider: ({ children, displayType, position: _position, }: ToastProviderProps) => JSX.Element;
|
|
10
10
|
export default ToastProvider;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const Toast: {
|
|
2
|
-
Provider: ({ children, displayType, position, }: {
|
|
2
|
+
Provider: ({ children, displayType, position: _position, }: {
|
|
3
3
|
children?: import("react").ReactNode;
|
|
4
4
|
} & import("./types").ToastContainerProps) => JSX.Element;
|
|
5
5
|
Container: import("react").ForwardRefExoticComponent<import("./types").ToastContainerProps & import("react").RefAttributes<import("./ToastContext").ToastControllerContextType>>;
|
|
@@ -3,7 +3,7 @@ declare const StyledText: import("@emotion/native").StyledComponent<import("reac
|
|
|
3
3
|
theme?: import("@emotion/react").Theme | undefined;
|
|
4
4
|
as?: import("react").ElementType<any> | undefined;
|
|
5
5
|
} & {
|
|
6
|
-
themeFontSize: 'small' | 'medium' | 'large' | 'xlarge' | 'xxxlarge' | 'xxxxxlarge';
|
|
6
|
+
themeFontSize: 'small' | 'medium' | 'large' | 'xlarge' | 'xxxlarge' | 'xxxxxlarge' | '7xlarge';
|
|
7
7
|
themeFontWeight: 'light' | 'regular' | 'semi-bold';
|
|
8
8
|
themeIntent: 'body' | 'subdued' | 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'danger' | 'inverted';
|
|
9
9
|
themeTypeface: 'neutral' | 'playful';
|
|
@@ -8,7 +8,7 @@ export interface TextProps extends NativeTextProps {
|
|
|
8
8
|
/**
|
|
9
9
|
* Size of the text.
|
|
10
10
|
*/
|
|
11
|
-
fontSize?: 'small' | 'medium' | 'large' | 'xlarge' | 'xxxlarge' | 'xxxxxlarge';
|
|
11
|
+
fontSize?: 'small' | 'medium' | 'large' | 'xlarge' | 'xxxlarge' | 'xxxxxlarge' | '7xlarge';
|
|
12
12
|
/**
|
|
13
13
|
* Font weight of the text.
|
|
14
14
|
*/
|
|
@@ -4,13 +4,12 @@ declare const getSelectTheme: (theme: GlobalTheme) => {
|
|
|
4
4
|
minimumOptionListHeight: number;
|
|
5
5
|
sectionSpacing: number;
|
|
6
6
|
optionSpacing: number;
|
|
7
|
-
|
|
7
|
+
optionListHorizontalPadding: number;
|
|
8
8
|
searchBarMarginTopSpacing: number;
|
|
9
9
|
searchBarHorizontalSpacing: number;
|
|
10
10
|
searchBarBottomSpacing: number;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
footerText: string;
|
|
11
|
+
singleSelectContentPaddingBottom: number;
|
|
12
|
+
suffixMarginRight: number;
|
|
14
13
|
};
|
|
15
14
|
radii: {
|
|
16
15
|
option: number;
|
|
@@ -19,6 +19,7 @@ declare const getTypographyTheme: (theme: GlobalTheme) => {
|
|
|
19
19
|
xlarge: number;
|
|
20
20
|
xxxlarge: number;
|
|
21
21
|
xxxxxlarge: number;
|
|
22
|
+
'7xlarge': number;
|
|
22
23
|
};
|
|
23
24
|
lineHeights: {
|
|
24
25
|
small: number;
|
|
@@ -27,6 +28,7 @@ declare const getTypographyTheme: (theme: GlobalTheme) => {
|
|
|
27
28
|
xlarge: number;
|
|
28
29
|
xxxlarge: number;
|
|
29
30
|
xxxxxlarge: number;
|
|
31
|
+
'7xlarge': number;
|
|
30
32
|
};
|
|
31
33
|
};
|
|
32
34
|
export default getTypographyTheme;
|
|
@@ -63,6 +63,7 @@ declare const getGlobalTheme: (scale: Scale, systemPalette: SystemPalette) => {
|
|
|
63
63
|
disabledOnDefaultGlobalSurface: string;
|
|
64
64
|
darkGlobalSurface: string;
|
|
65
65
|
onDarkGlobalSurface: string;
|
|
66
|
+
overlayGlobalSurface: string;
|
|
66
67
|
primaryOutline: string;
|
|
67
68
|
secondaryOutline: string;
|
|
68
69
|
inactiveOutline: string;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import renderWithTheme from '../../../testHelpers/renderWithTheme';
|
|
3
|
-
import { FooterText } from '../StyledSelect';
|
|
4
|
-
|
|
5
|
-
describe('FooterText', () => {
|
|
6
|
-
it('has correct style', () => {
|
|
7
|
-
const { toJSON, getByText } = renderWithTheme(
|
|
8
|
-
<FooterText>Confirm</FooterText>
|
|
9
|
-
);
|
|
10
|
-
|
|
11
|
-
expect(getByText('Confirm')).toBeDefined();
|
|
12
|
-
expect(toJSON()).toMatchSnapshot();
|
|
13
|
-
});
|
|
14
|
-
});
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`FooterText has correct style 1`] = `
|
|
4
|
-
<Text
|
|
5
|
-
style={
|
|
6
|
-
Array [
|
|
7
|
-
Object {
|
|
8
|
-
"color": "#001f23",
|
|
9
|
-
"fontFamily": "BeVietnamPro-Regular",
|
|
10
|
-
"fontSize": 14,
|
|
11
|
-
"letterSpacing": 0.42,
|
|
12
|
-
"lineHeight": 22,
|
|
13
|
-
},
|
|
14
|
-
Array [
|
|
15
|
-
Object {
|
|
16
|
-
"color": "#795e90",
|
|
17
|
-
},
|
|
18
|
-
undefined,
|
|
19
|
-
],
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
themeFontSize="medium"
|
|
23
|
-
themeFontWeight="regular"
|
|
24
|
-
themeIntent="body"
|
|
25
|
-
themeTypeface="neutral"
|
|
26
|
-
>
|
|
27
|
-
Confirm
|
|
28
|
-
</Text>
|
|
29
|
-
`;
|