@hero-design/rn 7.22.1 → 7.22.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 +2 -2
- package/es/index.js +309 -284
- package/lib/index.js +309 -284
- package/package.json +4 -4
- package/src/components/Accordion/AccordionItem.tsx +1 -1
- package/src/components/Accordion/__tests__/__snapshots__/AccordionItem.spec.tsx.snap +8 -8
- package/src/components/Accordion/__tests__/__snapshots__/index.spec.tsx.snap +12 -12
- package/src/components/Avatar/__tests__/__snapshots__/StyledAvatar.spec.tsx.snap +3 -3
- package/src/components/Avatar/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
- package/src/components/BottomNavigation/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/StyledLoadingIndicator.spec.tsx.snap +2 -2
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/index.spec.tsx.snap +6 -6
- package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +24 -24
- package/src/components/Calendar/__tests__/__snapshots__/CalendarRowItem.spec.tsx.snap +6 -6
- package/src/components/Card/DataCard/__tests__/__snapshots__/StyledDataCard.spec.tsx.snap +3 -3
- package/src/components/Card/DataCard/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
- package/src/components/Card/__tests__/__snapshots__/StyledCard.spec.tsx.snap +1 -1
- package/src/components/Card/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
- package/src/components/Checkbox/__tests__/__snapshots__/StyledCheckbox.spec.tsx.snap +2 -2
- package/src/components/Checkbox/__tests__/__snapshots__/index.spec.tsx.snap +5 -5
- package/src/components/ContentNavigator/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +4 -18
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +5 -19
- package/src/components/Drawer/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
- package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +10 -10
- package/src/components/Icon/HeroIcon/index.tsx +2 -0
- package/src/components/Icon/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
- package/src/components/Icon/index.tsx +1 -0
- package/src/components/List/StyledBasicListItem.tsx +1 -0
- package/src/components/List/__tests__/BasicListItem.spec.tsx +37 -13
- package/src/components/List/__tests__/__snapshots__/BasicListItem.spec.tsx.snap +163 -2
- package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +12 -12
- package/src/components/List/__tests__/__snapshots__/StyledBasicListItem.spec.tsx.snap +6 -2
- package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +4 -4
- package/src/components/PinInput/__tests__/__snapshots__/PinCell.spec.tsx.snap +6 -6
- package/src/components/PinInput/__tests__/__snapshots__/index.spec.tsx.snap +21 -21
- package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +5 -5
- package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +3 -1
- package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +4 -1
- package/src/components/RichTextEditor/RichTextEditor.tsx +1 -3
- package/src/components/RichTextEditor/__tests__/EditorToolbar.spec.tsx +1 -1
- package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +10 -38
- package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/Option.spec.tsx.snap +2 -1
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +25 -9
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +66 -108
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/Option.spec.tsx.snap +2 -1
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +24 -8
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +57 -99
- package/src/components/Select/__tests__/__snapshots__/StyledSelect.spec.tsx.snap +1 -1
- package/src/components/Slider/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
- package/src/components/Spinner/StyledSpinner.tsx +8 -4
- package/src/components/Spinner/__tests__/__snapshots__/AnimatedSpinner.spec.tsx.snap +8 -4
- package/src/components/Spinner/__tests__/__snapshots__/StyledSpinner.spec.tsx.snap +32 -16
- package/src/components/Spinner/__tests__/__snapshots__/index.spec.tsx.snap +8 -4
- package/src/components/Switch/__tests__/__snapshots__/StyledSwitch.spec.tsx.snap +3 -3
- package/src/components/Tabs/ScrollableTabs.tsx +2 -5
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +1 -1
- package/src/components/Tag/__tests__/__snapshots__/Tag.spec.tsx.snap +1 -1
- package/src/components/TextInput/StyledTextInput.tsx +11 -16
- package/src/components/TextInput/__tests__/StyledTextInput.spec.tsx +3 -3
- package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +28 -46
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +67 -249
- package/src/components/TextInput/index.tsx +27 -27
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +4 -18
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +5 -19
- package/src/components/Toast/ToastProvider.tsx +2 -4
- package/src/components/Toast/__tests__/index.spec.tsx +138 -0
- package/src/components/Toolbar/ToolbarItem.tsx +1 -1
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarGroup.spec.tsx.snap +12 -12
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarItem.spec.tsx.snap +6 -6
- package/src/components/Typography/Text/StyledText.tsx +1 -0
- package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +3 -3
- package/src/components/Typography/Text/index.tsx +1 -0
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +93 -84
- package/src/theme/components/accordion.ts +1 -1
- package/src/theme/components/alert.ts +4 -4
- package/src/theme/components/avatar.ts +2 -2
- package/src/theme/components/badge.ts +6 -6
- package/src/theme/components/bottomNavigation.ts +2 -2
- package/src/theme/components/bottomSheet.ts +3 -3
- package/src/theme/components/button.ts +20 -20
- package/src/theme/components/calendar.ts +4 -4
- package/src/theme/components/card.ts +5 -5
- package/src/theme/components/checkbox.ts +1 -1
- package/src/theme/components/divider.ts +1 -1
- package/src/theme/components/drawer.ts +4 -4
- package/src/theme/components/empty.ts +3 -4
- package/src/theme/components/fab.ts +7 -7
- package/src/theme/components/icon.ts +4 -3
- package/src/theme/components/list.ts +8 -6
- package/src/theme/components/pinInput.ts +4 -4
- package/src/theme/components/progress.ts +3 -3
- package/src/theme/components/richTextEditor.ts +3 -3
- package/src/theme/components/sectionHeading.ts +1 -1
- package/src/theme/components/select.ts +1 -1
- package/src/theme/components/slider.ts +3 -3
- package/src/theme/components/spinner.ts +1 -4
- package/src/theme/components/switch.ts +7 -7
- package/src/theme/components/tabs.ts +5 -5
- package/src/theme/components/tag.ts +12 -12
- package/src/theme/components/textInput.ts +38 -38
- package/src/theme/components/toast.ts +6 -6
- package/src/theme/components/toolbar.ts +3 -2
- package/src/theme/components/typography.ts +4 -3
- package/src/theme/global/colors/global.ts +32 -0
- package/src/theme/global/colors/legacySystemPalette.ts +53 -0
- package/src/theme/global/colors/swag.ts +21 -34
- package/src/theme/global/colors/types.ts +46 -26
- package/src/theme/global/colors/work.ts +10 -9
- package/types/components/Icon/HeroIcon/index.d.ts +1 -1
- package/types/components/Icon/index.d.ts +1 -1
- package/types/components/TextInput/StyledTextInput.d.ts +3 -9
- package/types/components/TextInput/index.d.ts +4 -4
- package/types/components/Toast/__tests__/index.spec.d.ts +1 -0
- package/types/components/Toolbar/ToolbarItem.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/empty.d.ts +0 -1
- package/types/theme/components/icon.d.ts +1 -0
- package/types/theme/components/list.d.ts +1 -0
- package/types/theme/components/spinner.d.ts +1 -4
- package/types/theme/components/toolbar.d.ts +1 -0
- package/types/theme/components/typography.d.ts +1 -0
- package/types/theme/global/colors/global.d.ts +3 -0
- package/types/theme/global/colors/legacySystemPalette.d.ts +3 -0
- package/types/theme/global/colors/types.d.ts +41 -20
- package/types/theme/global/index.d.ts +28 -19
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare type ThemeSize = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
|
|
2
|
-
declare type ThemeIntent = 'text' | 'primary' | 'info' | 'danger' | 'success' | 'warning' | 'disabled-text' | 'text-inverted';
|
|
2
|
+
declare type ThemeIntent = 'text' | 'primary' | 'secondary' | 'info' | 'danger' | 'success' | 'warning' | 'disabled-text' | 'text-inverted';
|
|
3
3
|
declare const StyledHeroIcon: import("@emotion/native").StyledComponent<import("react-native-vector-icons/Icon").IconProps & {
|
|
4
4
|
theme?: import("@emotion/react").Theme;
|
|
5
5
|
as?: import("react").ElementType<any>;
|
|
@@ -9,7 +9,7 @@ export interface IconProps {
|
|
|
9
9
|
/**
|
|
10
10
|
* Intent of the Icon.
|
|
11
11
|
*/
|
|
12
|
-
intent?: 'text' | 'primary' | 'info' | 'danger' | 'success' | 'warning' | 'disabled-text' | 'text-inverted';
|
|
12
|
+
intent?: 'text' | 'primary' | 'secondary' | 'info' | 'danger' | 'success' | 'warning' | 'disabled-text' | 'text-inverted';
|
|
13
13
|
/**
|
|
14
14
|
* Size of the Icon.
|
|
15
15
|
*/
|
|
@@ -3,6 +3,8 @@ export declare type Variant = 'default' | 'filled' | 'focused' | 'disabled' | 'r
|
|
|
3
3
|
declare const StyledContainer: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
4
4
|
theme?: import("@emotion/react").Theme;
|
|
5
5
|
as?: import("react").ElementType<any>;
|
|
6
|
+
} & {
|
|
7
|
+
themeVariant: Variant;
|
|
6
8
|
}, {}, {
|
|
7
9
|
ref?: import("react").Ref<View>;
|
|
8
10
|
}>;
|
|
@@ -68,14 +70,6 @@ declare const StyledTextInput: import("@emotion/native").StyledComponent<import(
|
|
|
68
70
|
}, {}, {
|
|
69
71
|
ref?: import("react").Ref<TextInput>;
|
|
70
72
|
}>;
|
|
71
|
-
declare const StyledBorderBackDrop: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
72
|
-
theme?: import("@emotion/react").Theme;
|
|
73
|
-
as?: import("react").ElementType<any>;
|
|
74
|
-
} & {
|
|
75
|
-
themeVariant: Variant;
|
|
76
|
-
}, {}, {
|
|
77
|
-
ref?: import("react").Ref<View>;
|
|
78
|
-
}>;
|
|
79
73
|
declare const StyledTextInputContainer: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
80
74
|
theme?: import("@emotion/react").Theme;
|
|
81
75
|
as?: import("react").ElementType<any>;
|
|
@@ -100,4 +94,4 @@ declare const StyledErrorAndMaxLengthContainer: import("@emotion/native").Styled
|
|
|
100
94
|
}, {}, {
|
|
101
95
|
ref?: import("react").Ref<View>;
|
|
102
96
|
}>;
|
|
103
|
-
export { StyledTextInputContainer, StyledLabel, StyledLabelContainer, StyledAsteriskLabel, StyledAsteriskLabelInsideTextInput, StyledTextInput, StyledError, StyledMaxLengthMessage, StyledLabelInsideTextInput, StyledContainer, StyledErrorContainer, StyledHelperText, StyledTextInputAndLabelContainer, StyledLabelContainerInsideTextInput, StyledErrorAndHelpTextContainer,
|
|
97
|
+
export { StyledTextInputContainer, StyledLabel, StyledLabelContainer, StyledAsteriskLabel, StyledAsteriskLabelInsideTextInput, StyledTextInput, StyledError, StyledMaxLengthMessage, StyledLabelInsideTextInput, StyledContainer, StyledErrorContainer, StyledHelperText, StyledTextInputAndLabelContainer, StyledLabelContainerInsideTextInput, StyledErrorAndHelpTextContainer, StyledErrorAndMaxLengthContainer, };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import type { TextInputProps as NativeTextInputProps, StyleProp, ViewStyle, TextStyle } from
|
|
3
|
-
import type { Variant } from
|
|
4
|
-
import type { IconName } from
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TextInputProps as NativeTextInputProps, StyleProp, ViewStyle, TextStyle } from 'react-native';
|
|
3
|
+
import type { Variant } from './StyledTextInput';
|
|
4
|
+
import type { IconName } from '../Icon';
|
|
5
5
|
export interface TextInputProps extends NativeTextInputProps {
|
|
6
6
|
/**
|
|
7
7
|
* Field label.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -3,7 +3,7 @@ export interface ToolbarItemProps {
|
|
|
3
3
|
/**
|
|
4
4
|
* Visual intent of the toolbar item.
|
|
5
5
|
*/
|
|
6
|
-
intent?: 'primary' | 'info' | 'success' | 'danger' | 'warning';
|
|
6
|
+
intent?: 'primary' | 'secondary' | 'info' | 'success' | 'danger' | 'warning';
|
|
7
7
|
/**
|
|
8
8
|
* Icon of the toolbar item.
|
|
9
9
|
*/
|
|
@@ -5,7 +5,7 @@ declare const StyledText: import("@emotion/native").StyledComponent<import("reac
|
|
|
5
5
|
} & {
|
|
6
6
|
themeFontSize: 'small' | 'medium' | 'large' | 'xlarge' | 'xxxlarge' | 'xxxxxlarge';
|
|
7
7
|
themeFontWeight: 'light' | 'regular' | 'semi-bold';
|
|
8
|
-
themeIntent: 'body' | 'subdued' | 'primary' | 'success' | 'info' | 'warning' | 'danger' | 'inverted';
|
|
8
|
+
themeIntent: 'body' | 'subdued' | 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'danger' | 'inverted';
|
|
9
9
|
}, {}, {
|
|
10
10
|
ref?: import("react").Ref<Text>;
|
|
11
11
|
}>;
|
|
@@ -16,7 +16,7 @@ export interface TextProps extends NativeTextProps {
|
|
|
16
16
|
/**
|
|
17
17
|
* Visual intent color to apply to the text.
|
|
18
18
|
*/
|
|
19
|
-
intent?: 'body' | 'subdued' | 'primary' | 'success' | 'info' | 'warning' | 'danger' | 'inverted';
|
|
19
|
+
intent?: 'body' | 'subdued' | 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'danger' | 'inverted';
|
|
20
20
|
/**
|
|
21
21
|
* Additional style.
|
|
22
22
|
*/
|
|
@@ -1,4 +1,43 @@
|
|
|
1
|
-
export declare type
|
|
1
|
+
export declare type GlobalSystemPalette = {
|
|
2
|
+
globalPrimary: string;
|
|
3
|
+
mutedGlobalPrimary: string;
|
|
4
|
+
onGlobalPrimary: string;
|
|
5
|
+
globalSecondary: string;
|
|
6
|
+
globalPrimaryOutline: string;
|
|
7
|
+
globalSecondaryOutline: string;
|
|
8
|
+
defaultGlobalSurface: string;
|
|
9
|
+
onDefaultGlobalSurface: string;
|
|
10
|
+
neutralGlobalSurface: string;
|
|
11
|
+
disabledOnDefaultGlobalSurface: string;
|
|
12
|
+
error: string;
|
|
13
|
+
errorSurface: string;
|
|
14
|
+
onErrorSurface: string;
|
|
15
|
+
warning: string;
|
|
16
|
+
warningSurface: string;
|
|
17
|
+
onWarningSurface: string;
|
|
18
|
+
success: string;
|
|
19
|
+
successSurface: string;
|
|
20
|
+
onSuccessSurface: string;
|
|
21
|
+
info: string;
|
|
22
|
+
infoSurface: string;
|
|
23
|
+
onInfoSurface: string;
|
|
24
|
+
archived: string;
|
|
25
|
+
archivedSurface: string;
|
|
26
|
+
onArchivedSurface: string;
|
|
27
|
+
};
|
|
28
|
+
export declare type BrandSystemPalette = {
|
|
29
|
+
primary: string;
|
|
30
|
+
mutedPrimary: string;
|
|
31
|
+
onPrimary: string;
|
|
32
|
+
secondary: string;
|
|
33
|
+
highlightedSecondarySurface: string;
|
|
34
|
+
onSecondary: string;
|
|
35
|
+
mutedSecondary: string;
|
|
36
|
+
disabledSecondary: string;
|
|
37
|
+
highlightedSurface: string;
|
|
38
|
+
lightHighlightedSurface: string;
|
|
39
|
+
};
|
|
40
|
+
export declare type LegacySystemPalette = {
|
|
2
41
|
globalPrimary: string;
|
|
3
42
|
globalPrimaryLight: string;
|
|
4
43
|
globalPrimaryBackground: string;
|
|
@@ -42,23 +81,5 @@ export declare type SystemPalette = {
|
|
|
42
81
|
black: string;
|
|
43
82
|
inactiveBackground: string;
|
|
44
83
|
shadow: string;
|
|
45
|
-
__alpha__globalPrimary: string;
|
|
46
|
-
__alpha__globalSecondary1: string;
|
|
47
|
-
__alpha__globalSecondary4: string;
|
|
48
|
-
__alpha__globalNeutral3: string;
|
|
49
|
-
__alpha__globalLabel1: string;
|
|
50
|
-
__alpha__globalLabel2: string;
|
|
51
|
-
__alpha__globalLabel3: string;
|
|
52
|
-
__alpha__globalLabel4: string;
|
|
53
|
-
__alpha__globalLabel5: string;
|
|
54
|
-
__alpha__globalLabel6: string;
|
|
55
|
-
__alpha__globalLabel7: string;
|
|
56
|
-
__alpha__globalLabel8: string;
|
|
57
|
-
__alpha__globalLabel9: string;
|
|
58
|
-
__alpha__primary1: string;
|
|
59
|
-
__alpha__primary2: string;
|
|
60
|
-
__alpha__secondary1: string;
|
|
61
|
-
__alpha__secondary2: string;
|
|
62
|
-
__alpha__secondary3: string;
|
|
63
|
-
__alpha__secondary4: string;
|
|
64
84
|
};
|
|
85
|
+
export declare type SystemPalette = LegacySystemPalette & GlobalSystemPalette & BrandSystemPalette;
|
|
@@ -48,25 +48,34 @@ declare const getGlobalTheme: (scale: Scale, systemPalette: SystemPalette) => {
|
|
|
48
48
|
black: string;
|
|
49
49
|
inactiveBackground: string;
|
|
50
50
|
shadow: string;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
51
|
+
mutedGlobalPrimary: string;
|
|
52
|
+
onGlobalPrimary: string;
|
|
53
|
+
globalSecondary: string;
|
|
54
|
+
globalPrimaryOutline: string;
|
|
55
|
+
globalSecondaryOutline: string;
|
|
56
|
+
defaultGlobalSurface: string;
|
|
57
|
+
onDefaultGlobalSurface: string;
|
|
58
|
+
neutralGlobalSurface: string;
|
|
59
|
+
disabledOnDefaultGlobalSurface: string;
|
|
60
|
+
error: string;
|
|
61
|
+
errorSurface: string;
|
|
62
|
+
onErrorSurface: string;
|
|
63
|
+
warningSurface: string;
|
|
64
|
+
onWarningSurface: string;
|
|
65
|
+
successSurface: string;
|
|
66
|
+
onSuccessSurface: string;
|
|
67
|
+
infoSurface: string;
|
|
68
|
+
onInfoSurface: string;
|
|
69
|
+
archivedSurface: string;
|
|
70
|
+
onArchivedSurface: string;
|
|
71
|
+
mutedPrimary: string;
|
|
72
|
+
onPrimary: string;
|
|
73
|
+
highlightedSecondarySurface: string;
|
|
74
|
+
onSecondary: string;
|
|
75
|
+
mutedSecondary: string;
|
|
76
|
+
disabledSecondary: string;
|
|
77
|
+
highlightedSurface: string;
|
|
78
|
+
lightHighlightedSurface: string;
|
|
70
79
|
};
|
|
71
80
|
fonts: import("./typography").Fonts;
|
|
72
81
|
fontSizes: import("./typography").FontSizes;
|