@hero-design/rn 8.91.1 → 8.91.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/CHANGELOG.md +16 -0
- package/es/index.js +155 -35
- package/lib/index.js +155 -35
- package/package.json +1 -1
- package/src/components/AnimatedScroller/__tests__/__snapshots__/ScrollablesWithFAB.spec.tsx.snap +6 -6
- package/src/components/Checkbox/StyledCheckbox.tsx +3 -3
- package/src/components/Checkbox/__tests__/__snapshots__/StyledCheckbox.spec.tsx.snap +1 -1
- package/src/components/Checkbox/__tests__/__snapshots__/index.spec.tsx.snap +4 -4
- package/src/components/Checkbox/__tests__/index.spec.tsx +11 -7
- package/src/components/Checkbox/index.tsx +11 -2
- package/src/components/Chip/__tests__/__snapshots__/index.spec.tsx.snap +8 -8
- package/src/components/DatePicker/__tests__/__snapshots__/DatePicker.spec.tsx.snap +63 -3
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +21 -1
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerCalendar.spec.tsx.snap +21 -1
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +42 -2
- package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
- package/src/components/FAB/Pair/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
- package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +2 -2
- package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
- package/src/components/FloatingIsland/__tests__/__snapshots__/index.spec.tsx.snap +4 -4
- package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +3 -2
- package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +2 -2
- package/src/components/MapPin/__tests__/__snapshots__/index.spec.tsx.snap +4 -4
- package/src/components/RichTextEditor/RichTextEditor.tsx +2 -1
- package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +40 -2
- package/src/components/Search/SearchOneLine.tsx +3 -1
- package/src/components/Search/__tests__/__snapshots__/SearchOneLine.spec.tsx.snap +7 -0
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +147 -7
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +126 -6
- package/src/components/Slider/__tests__/__snapshots__/RangeSlider.spec.tsx.snap +2 -2
- package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
- package/src/components/Switch/StyledSwitch.tsx +1 -0
- package/src/components/Switch/__tests__/__snapshots__/StyledSwitch.spec.tsx.snap +8 -4
- package/src/components/Switch/__tests__/__snapshots__/index.spec.tsx.snap +4 -2
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +337 -16
- package/src/components/TextInput/__tests__/index.spec.tsx +2 -0
- package/src/components/TextInput/index.tsx +7 -2
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +42 -2
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +42 -2
- package/src/components/Toast/__tests__/__snapshots__/Toast.spec.tsx.snap +7 -7
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +42 -14
- package/src/theme/components/checkbox.ts +7 -0
- package/src/theme/components/switch.ts +5 -5
- package/src/theme/components/textInput.ts +1 -0
- package/src/theme/global/colors/__tests__/__snapshots__/swagLight.spec.ts.snap +4 -3
- package/src/theme/global/colors/__tests__/__snapshots__/swagLightGlobal.spec.ts.snap +3 -3
- package/src/theme/global/colors/__tests__/__snapshots__/swagLightJobs.spec.ts.snap +4 -3
- package/src/theme/global/colors/ehWorkDark.ts +1 -0
- package/src/theme/global/colors/swagLight.ts +1 -0
- package/src/theme/global/colors/swagLightGlobal.ts +3 -3
- package/src/theme/global/colors/swagLightJobs.ts +3 -1
- package/src/theme/global/colors/types.ts +2 -0
- package/src/theme/global/shadows/__tests__/__snapshots__/ehWorkDark.spec.ts.snap +36 -0
- package/src/theme/global/shadows/__tests__/__snapshots__/swagLight.spec.ts.snap +36 -0
- package/src/theme/global/shadows/__tests__/__snapshots__/swagLightJobs.spec.ts.snap +36 -0
- package/src/theme/global/shadows/__tests__/ehWorkDark.spec.ts +7 -0
- package/src/theme/global/shadows/__tests__/index.spec.ts +24 -0
- package/src/theme/global/shadows/__tests__/swagLight.spec.ts +7 -0
- package/src/theme/global/shadows/__tests__/swagLightJobs.spec.ts +7 -0
- package/src/theme/global/shadows/ehWorkDark.ts +37 -0
- package/src/theme/global/shadows/index.ts +23 -0
- package/src/theme/global/shadows/swagLight.ts +37 -0
- package/src/theme/global/shadows/swagLightJobs.ts +37 -0
- package/src/theme/global/shadows/types.ts +16 -0
- package/stats/8.91.2/rn-stats.html +4842 -0
- package/stats/8.91.3/rn-stats.html +4844 -0
- package/types/components/Checkbox/StyledCheckbox.d.ts +1 -1
- package/types/components/Checkbox/index.d.ts +2 -1
- package/types/components/TextInput/index.d.ts +3 -1
- package/types/theme/components/checkbox.d.ts +7 -0
- package/types/theme/components/chip.d.ts +1 -10
- package/types/theme/components/floatingIsland.d.ts +1 -10
- package/types/theme/components/slider.d.ts +1 -10
- package/types/theme/components/switch.d.ts +1 -1
- package/types/theme/components/textInput.d.ts +1 -0
- package/types/theme/global/colors/swagLightJobs.d.ts +2 -50
- package/types/theme/global/colors/types.d.ts +2 -0
- package/types/theme/global/index.d.ts +2 -12
- package/types/theme/global/shadows/ehWorkDark.d.ts +3 -0
- package/types/theme/global/shadows/index.d.ts +5 -0
- package/types/theme/global/shadows/swagLight.d.ts +3 -0
- package/types/theme/global/shadows/swagLightJobs.d.ts +3 -0
- package/types/theme/global/shadows/types.d.ts +15 -0
- package/src/theme/global/shadows.ts +0 -19
- package/types/theme/global/shadows.d.ts +0 -16
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TouchableOpacity, View } from 'react-native';
|
|
2
|
-
type CheckboxThemeState = 'default' | 'disabled' | 'readonly';
|
|
2
|
+
type CheckboxThemeState = 'default' | 'checked' | 'disabled' | 'readonly';
|
|
3
3
|
export declare const StyledWrapper: import("@emotion/native").StyledComponent<import("react-native").TouchableOpacityProps & {
|
|
4
4
|
theme?: import("@emotion/react").Theme;
|
|
5
5
|
as?: React.ElementType;
|
|
@@ -38,7 +38,8 @@ export interface CheckboxProps {
|
|
|
38
38
|
type getStateType = {
|
|
39
39
|
disabled: boolean;
|
|
40
40
|
readonly: boolean;
|
|
41
|
+
checked?: boolean;
|
|
41
42
|
};
|
|
42
|
-
export declare const getThemeState: ({ disabled, readonly }: getStateType) => "default" | "disabled" | "readonly";
|
|
43
|
+
export declare const getThemeState: ({ disabled, readonly, checked, }: getStateType) => "default" | "disabled" | "checked" | "readonly";
|
|
43
44
|
declare const Checkbox: ({ checked, description, withBorder, disabled, onPress, style, testID, readonly, }: CheckboxProps) => React.JSX.Element;
|
|
44
45
|
export default Checkbox;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TextInput as RNTextInput } from 'react-native';
|
|
3
3
|
import type { TextInputProps as NativeTextInputProps, StyleProp, ViewStyle, TextStyle } from 'react-native';
|
|
4
|
+
import { Theme } from '../../theme';
|
|
4
5
|
import type { State } from './StyledTextInput';
|
|
5
6
|
import type { IconName } from '../Icon';
|
|
6
7
|
export type TextInputHandles = Pick<RNTextInput, 'focus' | 'clear' | 'blur' | 'isFocused' | 'setNativeProps'>;
|
|
@@ -97,12 +98,13 @@ export declare const renderErrorOrHelpText: ({ error, helpText, }: {
|
|
|
97
98
|
error?: string;
|
|
98
99
|
helpText?: string;
|
|
99
100
|
}) => false | React.JSX.Element;
|
|
100
|
-
export declare const renderInput: ({ variant, nativeInputProps, renderInputValue, ref, }: {
|
|
101
|
+
export declare const renderInput: ({ variant, nativeInputProps, renderInputValue, ref, theme, }: {
|
|
101
102
|
variant: TextInputVariant;
|
|
102
103
|
nativeInputProps: NativeTextInputProps;
|
|
103
104
|
multiline?: boolean;
|
|
104
105
|
renderInputValue?: (inputProps: NativeTextInputProps) => React.ReactNode;
|
|
105
106
|
ref?: React.Ref<RNTextInput>;
|
|
107
|
+
theme: Theme;
|
|
106
108
|
}) => string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
|
|
107
109
|
export declare const renderSuffix: ({ state, loading, suffix, }: {
|
|
108
110
|
state: State;
|
|
@@ -3,6 +3,13 @@ declare const getCheckboxTheme: (theme: GlobalTheme) => {
|
|
|
3
3
|
colors: {
|
|
4
4
|
borders: {
|
|
5
5
|
default: string;
|
|
6
|
+
checked: string;
|
|
7
|
+
disabled: string;
|
|
8
|
+
readonly: string;
|
|
9
|
+
};
|
|
10
|
+
checkboxBorder: {
|
|
11
|
+
default: string;
|
|
12
|
+
checked: string;
|
|
6
13
|
disabled: string;
|
|
7
14
|
readonly: string;
|
|
8
15
|
};
|
|
@@ -25,16 +25,7 @@ declare const getChipTheme: (theme: GlobalTheme) => {
|
|
|
25
25
|
outlinedDefaultBorder: number;
|
|
26
26
|
};
|
|
27
27
|
shadows: {
|
|
28
|
-
filledWrapper:
|
|
29
|
-
shadowOffset: {
|
|
30
|
-
width: number;
|
|
31
|
-
height: number;
|
|
32
|
-
};
|
|
33
|
-
shadowColor: string;
|
|
34
|
-
shadowOpacity: number;
|
|
35
|
-
shadowRadius: number;
|
|
36
|
-
elevation: number;
|
|
37
|
-
};
|
|
28
|
+
filledWrapper: import("../global/shadows/types").ShadowStyles;
|
|
38
29
|
};
|
|
39
30
|
fontSizes: {
|
|
40
31
|
icon: number;
|
|
@@ -7,16 +7,7 @@ declare const getFloatingIslandTheme: (theme: GlobalTheme) => {
|
|
|
7
7
|
wrapper: number;
|
|
8
8
|
};
|
|
9
9
|
shadows: {
|
|
10
|
-
wrapper:
|
|
11
|
-
shadowOffset: {
|
|
12
|
-
width: number;
|
|
13
|
-
height: number;
|
|
14
|
-
};
|
|
15
|
-
shadowColor: string;
|
|
16
|
-
shadowOpacity: number;
|
|
17
|
-
shadowRadius: number;
|
|
18
|
-
elevation: number;
|
|
19
|
-
};
|
|
10
|
+
wrapper: import("../global/shadows/types").ShadowStyles;
|
|
20
11
|
};
|
|
21
12
|
space: {
|
|
22
13
|
wrapperPadding: number;
|
|
@@ -9,16 +9,7 @@ declare const getSliderTheme: (theme: GlobalTheme) => {
|
|
|
9
9
|
disabledTrackBackground: string;
|
|
10
10
|
};
|
|
11
11
|
shadows: {
|
|
12
|
-
marker:
|
|
13
|
-
shadowOffset: {
|
|
14
|
-
width: number;
|
|
15
|
-
height: number;
|
|
16
|
-
};
|
|
17
|
-
shadowColor: string;
|
|
18
|
-
shadowOpacity: number;
|
|
19
|
-
shadowRadius: number;
|
|
20
|
-
elevation: number;
|
|
21
|
-
};
|
|
12
|
+
marker: import("../global/shadows/types").ShadowStyles;
|
|
22
13
|
};
|
|
23
14
|
sizes: {
|
|
24
15
|
trackHeight: number;
|
|
@@ -1,51 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
onSecondary: string;
|
|
4
|
-
secondaryHighlightedSurface: string;
|
|
5
|
-
decorativeSecondary: string;
|
|
6
|
-
decorativeSecondarySurface: string;
|
|
7
|
-
defaultGlobalSurface: string;
|
|
8
|
-
onDefaultGlobalSurface: string;
|
|
9
|
-
neutralGlobalSurface: string;
|
|
10
|
-
mutedOnDefaultGlobalSurface: string;
|
|
11
|
-
inactiveOnDefaultGlobalSurface: string;
|
|
12
|
-
disabledOnDefaultGlobalSurface: string;
|
|
13
|
-
darkGlobalSurface: string;
|
|
14
|
-
onDarkGlobalSurface: string;
|
|
15
|
-
overlayGlobalSurface: string;
|
|
16
|
-
primaryOutline: string;
|
|
17
|
-
secondaryOutline: string;
|
|
18
|
-
inactiveOutline: string;
|
|
19
|
-
disabledOutline: string;
|
|
20
|
-
error: string;
|
|
21
|
-
mutedError: string;
|
|
22
|
-
errorSurface: string;
|
|
23
|
-
onErrorSurface: string;
|
|
24
|
-
warning: string;
|
|
25
|
-
mutedWarning: string;
|
|
26
|
-
warningSurface: string;
|
|
27
|
-
onWarningSurface: string;
|
|
28
|
-
success: string;
|
|
29
|
-
mutedSuccess: string;
|
|
30
|
-
successSurface: string;
|
|
31
|
-
onSuccessSurface: string;
|
|
32
|
-
info: string;
|
|
33
|
-
mutedInfo: string;
|
|
34
|
-
infoSurface: string;
|
|
35
|
-
onInfoSurface: string;
|
|
36
|
-
archived: string;
|
|
37
|
-
mutedArchived: string;
|
|
38
|
-
archivedSurface: string;
|
|
39
|
-
onArchivedSurface: string;
|
|
40
|
-
black?: string;
|
|
41
|
-
white?: string;
|
|
42
|
-
primary: string;
|
|
43
|
-
onPrimary: string;
|
|
44
|
-
defaultSurface: string;
|
|
45
|
-
highlightedSurface: string;
|
|
46
|
-
pressedSurface: string;
|
|
47
|
-
decorativePrimary: string;
|
|
48
|
-
decorativePrimarySurface: string;
|
|
49
|
-
themeMode?: import("./types").ThemeMode;
|
|
50
|
-
};
|
|
1
|
+
import { SystemPalette } from './types';
|
|
2
|
+
declare const swagLightJobsSystemPalette: SystemPalette;
|
|
51
3
|
export default swagLightJobsSystemPalette;
|
|
@@ -50,6 +50,8 @@ export type BrandSystemPalette = {
|
|
|
50
50
|
decorativeSecondarySurface?: string;
|
|
51
51
|
};
|
|
52
52
|
export type ThemeMode = 'light' | 'dark';
|
|
53
|
+
export type ThemeName = 'swagLight' | 'swagLightJobs' | 'ehWorkDark';
|
|
53
54
|
export type SystemPalette = GlobalSystemPalette & BrandSystemPalette & {
|
|
54
55
|
themeMode?: ThemeMode;
|
|
56
|
+
name?: ThemeName;
|
|
55
57
|
};
|
|
@@ -60,6 +60,7 @@ declare const getGlobalTheme: (scale: Scale, systemPalette: SystemPalette) => {
|
|
|
60
60
|
decorativeSecondary?: string;
|
|
61
61
|
decorativeSecondarySurface?: string;
|
|
62
62
|
themeMode?: import("./colors/types").ThemeMode;
|
|
63
|
+
name?: import("./colors/types").ThemeName;
|
|
63
64
|
};
|
|
64
65
|
fonts: import("./typography").Fonts;
|
|
65
66
|
fontSizes: import("./typography").FontSizes;
|
|
@@ -68,18 +69,7 @@ declare const getGlobalTheme: (scale: Scale, systemPalette: SystemPalette) => {
|
|
|
68
69
|
space: import("./space").Space;
|
|
69
70
|
sizes: import("./sizes").Sizes;
|
|
70
71
|
radii: import("./borders").Radii;
|
|
71
|
-
shadows:
|
|
72
|
-
default: {
|
|
73
|
-
shadowOffset: {
|
|
74
|
-
width: number;
|
|
75
|
-
height: number;
|
|
76
|
-
};
|
|
77
|
-
shadowColor: string;
|
|
78
|
-
shadowOpacity: number;
|
|
79
|
-
shadowRadius: number;
|
|
80
|
-
elevation: number;
|
|
81
|
-
};
|
|
82
|
-
};
|
|
72
|
+
shadows: import("./shadows/types").ShadowPalette;
|
|
83
73
|
};
|
|
84
74
|
type GlobalTheme = ReturnType<typeof getGlobalTheme>;
|
|
85
75
|
export type { GlobalTheme, Scale, SystemPalette };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type ShadowStyles = {
|
|
2
|
+
shadowOffset: {
|
|
3
|
+
width: number;
|
|
4
|
+
height: number;
|
|
5
|
+
};
|
|
6
|
+
shadowColor: string;
|
|
7
|
+
shadowOpacity: number;
|
|
8
|
+
shadowRadius: number;
|
|
9
|
+
elevation: number;
|
|
10
|
+
};
|
|
11
|
+
export type ShadowPalette = {
|
|
12
|
+
default: ShadowStyles;
|
|
13
|
+
cardDrawer: ShadowStyles;
|
|
14
|
+
tabBar: ShadowStyles;
|
|
15
|
+
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { SystemPalette } from '.';
|
|
2
|
-
|
|
3
|
-
const getShadows = (systemPalette: SystemPalette) => ({
|
|
4
|
-
default: {
|
|
5
|
-
shadowOffset: {
|
|
6
|
-
width: 0,
|
|
7
|
-
height: 2,
|
|
8
|
-
},
|
|
9
|
-
shadowColor: systemPalette.primaryOutline,
|
|
10
|
-
shadowOpacity: 0.12,
|
|
11
|
-
shadowRadius: 4,
|
|
12
|
-
elevation: 3,
|
|
13
|
-
},
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
type Shadows = ReturnType<typeof getShadows>;
|
|
17
|
-
|
|
18
|
-
export { getShadows };
|
|
19
|
-
export type { Shadows };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { SystemPalette } from '.';
|
|
2
|
-
declare const getShadows: (systemPalette: SystemPalette) => {
|
|
3
|
-
default: {
|
|
4
|
-
shadowOffset: {
|
|
5
|
-
width: number;
|
|
6
|
-
height: number;
|
|
7
|
-
};
|
|
8
|
-
shadowColor: string;
|
|
9
|
-
shadowOpacity: number;
|
|
10
|
-
shadowRadius: number;
|
|
11
|
-
elevation: number;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
type Shadows = ReturnType<typeof getShadows>;
|
|
15
|
-
export { getShadows };
|
|
16
|
-
export type { Shadows };
|