@hero-design/rn 7.17.0 → 7.18.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/.turbo/turbo-build.log +2 -2
- package/es/index.js +3712 -3473
- package/lib/index.js +3716 -3475
- package/package.json +2 -2
- package/src/components/Accordion/__tests__/__snapshots__/AccordionItem.spec.tsx.snap +12 -12
- package/src/components/Accordion/__tests__/__snapshots__/index.spec.tsx.snap +18 -18
- package/src/components/Alert/__tests__/__snapshots__/index.spec.tsx.snap +26 -26
- 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/Badge/__tests__/__snapshots__/Badge.spec.tsx.snap +1 -1
- package/src/components/Badge/__tests__/__snapshots__/Status.spec.tsx.snap +2 -2
- package/src/components/BottomNavigation/__tests__/__snapshots__/index.spec.tsx.snap +9 -9
- package/src/components/BottomNavigation/index.tsx +1 -1
- package/src/components/BottomSheet/__tests__/__snapshots__/index.spec.tsx.snap +12 -12
- package/src/components/Button/Button.tsx +1 -0
- 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/UtilityButton/{styled.tsx → StyledUtilityButton.tsx} +2 -2
- package/src/components/Button/UtilityButton/__tests__/__snapshots__/index.spec.tsx.snap +8 -8
- package/src/components/Button/UtilityButton/index.tsx +5 -1
- package/src/components/Button/__tests__/__snapshots__/IconButton.spec.tsx.snap +1 -1
- package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +69 -69
- package/src/components/Calendar/__tests__/__snapshots__/CalendarRowItem.spec.tsx.snap +12 -12
- package/src/components/Card/__tests__/__snapshots__/StyledCard.spec.tsx.snap +1 -1
- package/src/components/Checkbox/__tests__/__snapshots__/StyledCheckbox.spec.tsx.snap +1 -1
- package/src/components/Checkbox/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
- package/src/components/ContentNavigator/__tests__/__snapshots__/StyledContentNavigator.spec.tsx.snap +1 -1
- package/src/components/ContentNavigator/__tests__/__snapshots__/index.spec.tsx.snap +6 -6
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +6 -5
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +13 -12
- package/src/components/Divider/__tests__/__snapshots__/StyledDivider.spec.tsx.snap +12 -12
- package/src/components/Drawer/DragableDrawer/__tests__/__snapshots__/index.spec.tsx.snap +99 -0
- package/src/components/Drawer/DragableDrawer/__tests__/helpers.spec.ts +39 -0
- package/src/components/Drawer/DragableDrawer/__tests__/index.spec.tsx +24 -0
- package/src/components/Drawer/DragableDrawer/helpers.ts +43 -0
- package/src/components/Drawer/DragableDrawer/index.tsx +205 -0
- package/src/components/Drawer/StyledDrawer.tsx +70 -26
- package/src/components/Drawer/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
- package/src/components/Drawer/index.tsx +4 -1
- package/src/components/Empty/StyledEmpty.tsx +4 -3
- package/src/components/Empty/__tests__/__snapshots__/index.spec.tsx.snap +4 -3
- package/src/components/Empty/index.tsx +2 -2
- package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +28 -28
- package/src/components/FAB/ActionGroup/index.tsx +1 -1
- package/src/components/FAB/__tests__/__snapshots__/AnimatedFABIcon.spec.tsx.snap +2 -2
- package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +3 -3
- package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +9 -9
- package/src/components/Icon/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
- package/src/components/List/ListItem.tsx +1 -1
- package/src/components/List/__tests__/__snapshots__/BasicListItem.spec.tsx.snap +3 -3
- package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +20 -20
- package/src/components/List/__tests__/__snapshots__/StyledBasicListItem.spec.tsx.snap +6 -6
- package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +12 -12
- package/src/components/PinInput/__tests__/__snapshots__/PinCell.spec.tsx.snap +4 -4
- package/src/components/PinInput/__tests__/__snapshots__/index.spec.tsx.snap +22 -22
- package/src/components/Progress/ProgressCircle.tsx +25 -22
- package/src/components/Progress/StyledProgressCircle.tsx +33 -28
- package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +102 -92
- package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +5 -5
- package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +6 -6
- package/src/components/Radio/__tests__/__snapshots__/StyledRadio.spec.tsx.snap +3 -3
- package/src/components/RichTextEditor/__tests__/__snapshots__/EditorToolbar.spec.tsx.snap +11 -11
- package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +8 -6
- package/src/components/SectionHeading/__tests__/__snapshots__/StyledHeading.spec.tsx.snap +1 -1
- package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +9 -9
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/Option.spec.tsx.snap +3 -3
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +42 -42
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +126 -121
- package/src/components/Select/MultiSelect/index.tsx +1 -4
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/Option.spec.tsx.snap +2 -2
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +36 -36
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +99 -94
- package/src/components/Select/SingleSelect/index.tsx +2 -6
- package/src/components/Select/__tests__/__snapshots__/StyledSelect.spec.tsx.snap +2 -2
- package/src/components/Spinner/__tests__/__snapshots__/AnimatedSpinner.spec.tsx.snap +4 -4
- package/src/components/Spinner/__tests__/__snapshots__/StyledSpinner.spec.tsx.snap +8 -8
- package/src/components/Spinner/__tests__/__snapshots__/index.spec.tsx.snap +4 -4
- package/src/components/Switch/__tests__/__snapshots__/StyledHeading.spec.tsx.snap +1 -1
- package/src/components/Switch/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
- package/src/components/Tabs/ScrollableTabs.tsx +1 -1
- package/src/components/Tabs/__tests__/ScrollableTabs.spec.tsx +8 -0
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +85 -6
- package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +87 -8
- package/src/components/Tabs/__tests__/index.spec.tsx +8 -0
- package/src/components/Tabs/index.tsx +8 -3
- package/src/components/Tag/__tests__/__snapshots__/Tag.spec.tsx.snap +9 -9
- package/src/components/TextInput/StyledTextInput.tsx +1 -0
- package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +50 -50
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +100 -87
- package/src/components/TextInput/index.tsx +2 -2
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +6 -5
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +13 -12
- package/src/components/Toast/__tests__/__snapshots__/Toast.spec.tsx.snap +22 -22
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarGroup.spec.tsx.snap +12 -12
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarItem.spec.tsx.snap +8 -8
- package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +13 -13
- package/src/index.ts +9 -1
- package/src/theme/ThemeProvider.ts +19 -0
- package/src/theme/ThemeSwitcher.tsx +27 -0
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +161 -149
- package/src/theme/components/alert.ts +3 -3
- package/src/theme/components/badge.ts +1 -1
- package/src/theme/components/button.ts +9 -8
- package/src/theme/components/card.ts +4 -4
- package/src/theme/components/drawer.ts +14 -2
- package/src/theme/components/empty.ts +3 -2
- package/src/theme/components/list.ts +4 -4
- package/src/theme/components/pinInput.ts +2 -2
- package/src/theme/components/progress.ts +5 -5
- package/src/theme/components/toast.ts +3 -3
- package/src/theme/getTheme.ts +129 -0
- package/src/theme/global/colors/swag.ts +54 -0
- package/src/theme/global/colors/types.ts +45 -0
- package/src/theme/global/colors/work.ts +14 -0
- package/src/theme/global/index.ts +6 -2
- package/src/theme/index.ts +16 -143
- package/src/utils/scale.ts +4 -1
- package/types/components/Button/Button.d.ts +1 -0
- package/types/components/Button/UtilityButton/{styled.d.ts → StyledUtilityButton.d.ts} +0 -0
- package/types/components/Drawer/DragableDrawer/__tests__/helpers.spec.d.ts +1 -0
- package/types/components/Drawer/DragableDrawer/__tests__/index.spec.d.ts +1 -0
- package/types/components/Drawer/DragableDrawer/helpers.d.ts +8 -0
- package/types/components/Drawer/DragableDrawer/index.d.ts +33 -0
- package/types/components/Drawer/StyledDrawer.d.ts +34 -4
- package/types/components/Drawer/index.d.ts +4 -2
- package/types/components/Empty/index.d.ts +1 -1
- package/types/components/Icon/utils.d.ts +1 -1
- package/types/components/Progress/StyledProgressCircle.d.ts +12 -6
- package/types/index.d.ts +2 -2
- package/types/theme/ThemeProvider.d.ts +12 -0
- package/types/theme/ThemeSwitcher.d.ts +7 -0
- package/types/theme/components/button.d.ts +1 -1
- package/types/theme/components/drawer.d.ts +9 -0
- package/types/theme/components/empty.d.ts +3 -2
- package/types/theme/components/progress.d.ts +1 -2
- package/types/theme/getTheme.d.ts +74 -0
- package/types/theme/global/colors/swag.d.ts +3 -0
- package/types/theme/global/{colors.d.ts → colors/types.d.ts} +4 -3
- package/types/theme/global/colors/work.d.ts +3 -0
- package/types/theme/global/index.d.ts +7 -2
- package/types/theme/index.d.ts +7 -84
- package/src/theme/global/colors.ts +0 -50
|
@@ -6,7 +6,7 @@ const getBadgeTheme = (theme: GlobalTheme) => {
|
|
|
6
6
|
info: theme.colors.info,
|
|
7
7
|
success: theme.colors.successDark,
|
|
8
8
|
warning: theme.colors.warningDark,
|
|
9
|
-
archived: theme.colors.
|
|
9
|
+
archived: theme.colors.archivedDark,
|
|
10
10
|
text: theme.colors.invertedText,
|
|
11
11
|
};
|
|
12
12
|
|
|
@@ -3,6 +3,7 @@ import { GlobalTheme } from '../global';
|
|
|
3
3
|
const getButtonTheme = (theme: GlobalTheme) => {
|
|
4
4
|
const fonts = {
|
|
5
5
|
default: theme.fonts.semiBold,
|
|
6
|
+
utility: theme.fonts.regular,
|
|
6
7
|
};
|
|
7
8
|
|
|
8
9
|
const fontSize = {
|
|
@@ -21,9 +22,8 @@ const getButtonTheme = (theme: GlobalTheme) => {
|
|
|
21
22
|
|
|
22
23
|
const space = {
|
|
23
24
|
buttonPadding: theme.space.medium,
|
|
24
|
-
iconPadding: theme.space.
|
|
25
|
+
iconPadding: theme.space.smallMedium,
|
|
25
26
|
utilityPadding: theme.space.small,
|
|
26
|
-
utilityIconPadding: theme.space.smallMedium,
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
const sizes = {
|
|
@@ -36,8 +36,8 @@ const getButtonTheme = (theme: GlobalTheme) => {
|
|
|
36
36
|
};
|
|
37
37
|
|
|
38
38
|
const colors = {
|
|
39
|
-
primary: theme.colors.
|
|
40
|
-
pressedPrimary: theme.colors.
|
|
39
|
+
primary: theme.colors.globalPrimary,
|
|
40
|
+
pressedPrimary: theme.colors.globalPrimaryLight,
|
|
41
41
|
secondary: theme.colors.secondary,
|
|
42
42
|
pressedSecondary: theme.colors.secondaryLight,
|
|
43
43
|
danger: theme.colors.danger,
|
|
@@ -49,16 +49,17 @@ const getButtonTheme = (theme: GlobalTheme) => {
|
|
|
49
49
|
invertedText: theme.colors.invertedText,
|
|
50
50
|
utilityBackground: theme.colors.backgroundLight,
|
|
51
51
|
underlayColors: {
|
|
52
|
-
'filled-primary': theme.colors.
|
|
52
|
+
'filled-primary': theme.colors.globalPrimaryLight,
|
|
53
53
|
'filled-secondary': theme.colors.secondaryLight,
|
|
54
54
|
'filled-danger': theme.colors.dangerLight,
|
|
55
|
-
'outlined-primary': theme.colors.
|
|
55
|
+
'outlined-primary': theme.colors.globalPrimaryBackground,
|
|
56
56
|
'outlined-secondary': theme.colors.secondaryBackground,
|
|
57
|
+
|
|
57
58
|
'outlined-danger': theme.colors.dangerBackground,
|
|
58
|
-
'text-primary': theme.colors.
|
|
59
|
+
'text-primary': theme.colors.globalPrimaryBackground,
|
|
59
60
|
'text-secondary': theme.colors.secondaryBackground,
|
|
60
61
|
'text-danger': theme.colors.dangerBackground,
|
|
61
|
-
'basic-transparent': theme.colors.
|
|
62
|
+
'basic-transparent': theme.colors.globalPrimaryLight,
|
|
62
63
|
},
|
|
63
64
|
};
|
|
64
65
|
|
|
@@ -2,12 +2,12 @@ import { GlobalTheme } from '../global';
|
|
|
2
2
|
|
|
3
3
|
const getCardTheme = (theme: GlobalTheme) => {
|
|
4
4
|
const colors = {
|
|
5
|
-
dataCardIndicator: theme.colors.
|
|
5
|
+
dataCardIndicator: theme.colors.primary,
|
|
6
6
|
indicator: {
|
|
7
7
|
archived: theme.colors.archivedLight,
|
|
8
|
-
info: theme.colors.
|
|
9
|
-
success: theme.colors.
|
|
10
|
-
warning: theme.colors.
|
|
8
|
+
info: theme.colors.infoLight,
|
|
9
|
+
success: theme.colors.success,
|
|
10
|
+
warning: theme.colors.warning,
|
|
11
11
|
danger: theme.colors.dangerMediumLight,
|
|
12
12
|
},
|
|
13
13
|
};
|
|
@@ -1,14 +1,26 @@
|
|
|
1
1
|
import { GlobalTheme } from '../global';
|
|
2
|
+
import { scale } from '../../utils/scale';
|
|
2
3
|
|
|
3
4
|
const getDrawerTheme = (theme: GlobalTheme) => {
|
|
4
5
|
const colors = {
|
|
5
6
|
shadow: theme.colors.backgroundDark,
|
|
6
7
|
background: theme.colors.platformBackground,
|
|
7
8
|
backdrop: theme.colors.backgroundDark,
|
|
9
|
+
handler: theme.colors.backgroundDark,
|
|
8
10
|
};
|
|
9
11
|
|
|
10
12
|
const radii = {
|
|
11
|
-
default:
|
|
13
|
+
default: theme.radii.xlarge,
|
|
14
|
+
handler: theme.radii.base,
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const space = {
|
|
18
|
+
handlerPaddingVertical: theme.space.small,
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const sizes = {
|
|
22
|
+
handlerWidth: scale(56),
|
|
23
|
+
handlerHeight: scale(4),
|
|
12
24
|
};
|
|
13
25
|
|
|
14
26
|
const shadows = {
|
|
@@ -18,7 +30,7 @@ const getDrawerTheme = (theme: GlobalTheme) => {
|
|
|
18
30
|
elevation: 10,
|
|
19
31
|
};
|
|
20
32
|
|
|
21
|
-
return { colors, radii, shadows };
|
|
33
|
+
return { colors, radii, shadows, space, sizes };
|
|
22
34
|
};
|
|
23
35
|
|
|
24
36
|
export default getDrawerTheme;
|
|
@@ -3,8 +3,9 @@ import { GlobalTheme } from '../global';
|
|
|
3
3
|
|
|
4
4
|
const getEmptyTheme = (theme: GlobalTheme) => {
|
|
5
5
|
const space = {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
titleMargin: theme.space.medium,
|
|
7
|
+
illustrationMargin: theme.space.large,
|
|
8
|
+
wrapperPadding: theme.space.medium,
|
|
8
9
|
};
|
|
9
10
|
|
|
10
11
|
const sizes = {
|
|
@@ -6,11 +6,11 @@ const getListTheme = (theme: GlobalTheme) => {
|
|
|
6
6
|
highlightedListItemContainerBackground: theme.colors.primaryBackground,
|
|
7
7
|
listItemContainerBackground: theme.colors.platformBackground,
|
|
8
8
|
leadingStatus: {
|
|
9
|
-
danger: theme.colors.
|
|
9
|
+
danger: theme.colors.dangerMediumLight,
|
|
10
10
|
info: theme.colors.infoLight,
|
|
11
|
-
success: theme.colors.
|
|
12
|
-
warning: theme.colors.
|
|
13
|
-
archived: theme.colors.
|
|
11
|
+
success: theme.colors.success,
|
|
12
|
+
warning: theme.colors.warning,
|
|
13
|
+
archived: theme.colors.archivedLight,
|
|
14
14
|
},
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -8,8 +8,8 @@ const getPinInputTheme = (theme: GlobalTheme) => {
|
|
|
8
8
|
|
|
9
9
|
const colors = {
|
|
10
10
|
default: theme.colors.text,
|
|
11
|
-
mask: theme.colors.subduedText,
|
|
12
|
-
error: theme.colors.danger,
|
|
11
|
+
mask: theme.colors.subduedText,
|
|
12
|
+
error: theme.colors.danger,
|
|
13
13
|
disabled: theme.colors.archivedLight,
|
|
14
14
|
};
|
|
15
15
|
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { scale } from '../../utils/scale';
|
|
1
2
|
import { GlobalTheme } from '../global';
|
|
2
3
|
|
|
3
4
|
const getProgressTheme = (theme: GlobalTheme) => {
|
|
4
5
|
const colors = {
|
|
5
6
|
primary: theme.colors.primary,
|
|
6
|
-
success: theme.colors.success,
|
|
7
|
-
warning: theme.colors.
|
|
7
|
+
success: theme.colors.success, // should be emerald dark 15
|
|
8
|
+
warning: theme.colors.warningDark,
|
|
8
9
|
danger: theme.colors.danger,
|
|
9
10
|
info: theme.colors.info,
|
|
10
11
|
background: theme.colors.outline,
|
|
@@ -12,9 +13,8 @@ const getProgressTheme = (theme: GlobalTheme) => {
|
|
|
12
13
|
};
|
|
13
14
|
|
|
14
15
|
const sizes = {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
barHeight: theme.space.xsmall,
|
|
16
|
+
circleWidth: scale(76),
|
|
17
|
+
barHeight: scale(4),
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
const radii = {
|
|
@@ -5,9 +5,9 @@ const getToastTheme = (theme: GlobalTheme) => {
|
|
|
5
5
|
const colors = {
|
|
6
6
|
success: theme.colors.success,
|
|
7
7
|
warning: theme.colors.warning,
|
|
8
|
-
error: theme.colors.
|
|
9
|
-
info: theme.colors.
|
|
10
|
-
divider: theme.colors.
|
|
8
|
+
error: theme.colors.dangerLight,
|
|
9
|
+
info: theme.colors.infoLight,
|
|
10
|
+
divider: theme.colors.outline,
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
const sizes = {
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import {
|
|
2
|
+
GlobalTheme,
|
|
3
|
+
Scale,
|
|
4
|
+
SystemPalette,
|
|
5
|
+
getGlobalTheme,
|
|
6
|
+
defaultScale,
|
|
7
|
+
swagSystemPalette,
|
|
8
|
+
} from './global';
|
|
9
|
+
|
|
10
|
+
import getAccordionTheme from './components/accordion';
|
|
11
|
+
import getAlertTheme from './components/alert';
|
|
12
|
+
import getAvatarTheme from './components/avatar';
|
|
13
|
+
import getBadgeTheme from './components/badge';
|
|
14
|
+
import getBottomNavigationTheme from './components/bottomNavigation';
|
|
15
|
+
import getBottomSheetTheme from './components/bottomSheet';
|
|
16
|
+
import getButtonTheme from './components/button';
|
|
17
|
+
import getCalendarTheme from './components/calendar';
|
|
18
|
+
import getCardTheme from './components/card';
|
|
19
|
+
import getCheckboxTheme from './components/checkbox';
|
|
20
|
+
import getContentNavigatorTheme from './components/contentNavigator';
|
|
21
|
+
import getDatePickerTheme from './components/datePicker';
|
|
22
|
+
import getDividerTheme from './components/divider';
|
|
23
|
+
import getDrawerTheme from './components/drawer';
|
|
24
|
+
import getEmptyTheme from './components/empty';
|
|
25
|
+
import getFABTheme from './components/fab';
|
|
26
|
+
import getIconTheme from './components/icon';
|
|
27
|
+
import getListTheme from './components/list';
|
|
28
|
+
import getPinInputTheme from './components/pinInput';
|
|
29
|
+
import getProgressTheme from './components/progress';
|
|
30
|
+
import getRadioTheme from './components/radio';
|
|
31
|
+
import getRichTextEditorTheme from './components/richTextEditor';
|
|
32
|
+
import getSectionHeadingTheme from './components/sectionHeading';
|
|
33
|
+
import getSelectTheme from './components/select';
|
|
34
|
+
import getSpinnerTheme from './components/spinner';
|
|
35
|
+
import getSwitchTheme from './components/switch';
|
|
36
|
+
import getTabsTheme from './components/tabs';
|
|
37
|
+
import getTagTheme from './components/tag';
|
|
38
|
+
import getTextInputTheme from './components/textInput';
|
|
39
|
+
import getTimePickerTheme from './components/timePicker';
|
|
40
|
+
import getToastTheme from './components/toast';
|
|
41
|
+
import getToolbarTheme from './components/toolbar';
|
|
42
|
+
import getTypographyTheme from './components/typography';
|
|
43
|
+
|
|
44
|
+
type Theme = GlobalTheme & {
|
|
45
|
+
__hd__: {
|
|
46
|
+
accordion: ReturnType<typeof getAccordionTheme>;
|
|
47
|
+
alert: ReturnType<typeof getAlertTheme>;
|
|
48
|
+
avatar: ReturnType<typeof getAvatarTheme>;
|
|
49
|
+
badge: ReturnType<typeof getBadgeTheme>;
|
|
50
|
+
bottomNavigation: ReturnType<typeof getBottomNavigationTheme>;
|
|
51
|
+
bottomSheet: ReturnType<typeof getBottomSheetTheme>;
|
|
52
|
+
button: ReturnType<typeof getButtonTheme>;
|
|
53
|
+
calendar: ReturnType<typeof getCalendarTheme>;
|
|
54
|
+
card: ReturnType<typeof getCardTheme>;
|
|
55
|
+
checkbox: ReturnType<typeof getCheckboxTheme>;
|
|
56
|
+
contentNavigator: ReturnType<typeof getContentNavigatorTheme>;
|
|
57
|
+
datePicker: ReturnType<typeof getDatePickerTheme>;
|
|
58
|
+
divider: ReturnType<typeof getDividerTheme>;
|
|
59
|
+
drawer: ReturnType<typeof getDrawerTheme>;
|
|
60
|
+
empty: ReturnType<typeof getEmptyTheme>;
|
|
61
|
+
fab: ReturnType<typeof getFABTheme>;
|
|
62
|
+
icon: ReturnType<typeof getIconTheme>;
|
|
63
|
+
list: ReturnType<typeof getListTheme>;
|
|
64
|
+
pinInput: ReturnType<typeof getPinInputTheme>;
|
|
65
|
+
progress: ReturnType<typeof getProgressTheme>;
|
|
66
|
+
radio: ReturnType<typeof getRadioTheme>;
|
|
67
|
+
richTextEditor: ReturnType<typeof getRichTextEditorTheme>;
|
|
68
|
+
sectionHeading: ReturnType<typeof getSectionHeadingTheme>;
|
|
69
|
+
select: ReturnType<typeof getSelectTheme>;
|
|
70
|
+
spinner: ReturnType<typeof getSpinnerTheme>;
|
|
71
|
+
switch: ReturnType<typeof getSwitchTheme>;
|
|
72
|
+
tabs: ReturnType<typeof getTabsTheme>;
|
|
73
|
+
tag: ReturnType<typeof getTagTheme>;
|
|
74
|
+
textInput: ReturnType<typeof getTextInputTheme>;
|
|
75
|
+
timePicker: ReturnType<typeof getTimePickerTheme>;
|
|
76
|
+
toast: ReturnType<typeof getToastTheme>;
|
|
77
|
+
toolbar: ReturnType<typeof getToolbarTheme>;
|
|
78
|
+
typography: ReturnType<typeof getTypographyTheme>;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
const getTheme = (
|
|
83
|
+
scale: Scale = defaultScale,
|
|
84
|
+
systemPallete: SystemPalette = swagSystemPalette
|
|
85
|
+
): Theme => {
|
|
86
|
+
const globalTheme = getGlobalTheme(scale, systemPallete);
|
|
87
|
+
return {
|
|
88
|
+
...globalTheme,
|
|
89
|
+
__hd__: {
|
|
90
|
+
accordion: getAccordionTheme(globalTheme),
|
|
91
|
+
avatar: getAvatarTheme(globalTheme),
|
|
92
|
+
alert: getAlertTheme(globalTheme),
|
|
93
|
+
badge: getBadgeTheme(globalTheme),
|
|
94
|
+
bottomNavigation: getBottomNavigationTheme(globalTheme),
|
|
95
|
+
bottomSheet: getBottomSheetTheme(globalTheme),
|
|
96
|
+
button: getButtonTheme(globalTheme),
|
|
97
|
+
calendar: getCalendarTheme(globalTheme),
|
|
98
|
+
card: getCardTheme(globalTheme),
|
|
99
|
+
checkbox: getCheckboxTheme(globalTheme),
|
|
100
|
+
contentNavigator: getContentNavigatorTheme(globalTheme),
|
|
101
|
+
datePicker: getDatePickerTheme(),
|
|
102
|
+
divider: getDividerTheme(globalTheme),
|
|
103
|
+
drawer: getDrawerTheme(globalTheme),
|
|
104
|
+
empty: getEmptyTheme(globalTheme),
|
|
105
|
+
fab: getFABTheme(globalTheme),
|
|
106
|
+
icon: getIconTheme(globalTheme),
|
|
107
|
+
list: getListTheme(globalTheme),
|
|
108
|
+
pinInput: getPinInputTheme(globalTheme),
|
|
109
|
+
progress: getProgressTheme(globalTheme),
|
|
110
|
+
radio: getRadioTheme(globalTheme),
|
|
111
|
+
richTextEditor: getRichTextEditorTheme(globalTheme),
|
|
112
|
+
sectionHeading: getSectionHeadingTheme(globalTheme),
|
|
113
|
+
select: getSelectTheme(globalTheme),
|
|
114
|
+
spinner: getSpinnerTheme(globalTheme),
|
|
115
|
+
switch: getSwitchTheme(globalTheme),
|
|
116
|
+
tabs: getTabsTheme(globalTheme),
|
|
117
|
+
tag: getTagTheme(globalTheme),
|
|
118
|
+
textInput: getTextInputTheme(globalTheme),
|
|
119
|
+
timePicker: getTimePickerTheme(),
|
|
120
|
+
toast: getToastTheme(globalTheme),
|
|
121
|
+
toolbar: getToolbarTheme(globalTheme),
|
|
122
|
+
typography: getTypographyTheme(globalTheme),
|
|
123
|
+
},
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
export { Theme };
|
|
128
|
+
|
|
129
|
+
export default getTheme;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import {
|
|
2
|
+
defaultMobilePalette as palette,
|
|
3
|
+
swagPalette,
|
|
4
|
+
} from '@hero-design/colors';
|
|
5
|
+
|
|
6
|
+
import { SystemPalette } from './types';
|
|
7
|
+
|
|
8
|
+
const swagSystemPalette: SystemPalette = {
|
|
9
|
+
globalPrimary: palette.maasstrichtBlue,
|
|
10
|
+
globalPrimaryLight: palette.maasstrichtBlueLight50,
|
|
11
|
+
globalPrimaryBackground: palette.maasstrichtBlueLight90,
|
|
12
|
+
primary: swagPalette.violet,
|
|
13
|
+
primaryLight: swagPalette.violetLight50, // no longer needed after revising Button
|
|
14
|
+
primaryDark: swagPalette.scarletGumLight30, // DEPRECATED
|
|
15
|
+
primaryBackground: swagPalette.violetLight90,
|
|
16
|
+
primaryBackgroundDark: palette.maasstrichtBlueLight30,
|
|
17
|
+
secondary: swagPalette.ultramarineBlue, // no longer needed after revising Button
|
|
18
|
+
secondaryLight: swagPalette.vodka, // no longer needed after revising Button
|
|
19
|
+
secondaryBackground: swagPalette.aliceBlue, // no longer needed after revising Button
|
|
20
|
+
info: palette.ultramarineBlue,
|
|
21
|
+
infoMediumLight: palette.vodka, // DEPRECATED, use infoLight instead
|
|
22
|
+
infoLight: palette.vodka,
|
|
23
|
+
infoBackground: palette.aliceBlue,
|
|
24
|
+
success: palette.emerald,
|
|
25
|
+
successLight: palette.emerald, // DEPRECATED, use success instead
|
|
26
|
+
successDark: palette.pineGreen,
|
|
27
|
+
successBackground: palette.honeydew,
|
|
28
|
+
danger: palette.vermilion,
|
|
29
|
+
dangerMediumLight: palette.apple, // should be dangerDark?
|
|
30
|
+
dangerLight: palette.pastelRed,
|
|
31
|
+
dangerBackground: palette.linen,
|
|
32
|
+
warning: palette.mellowApricot,
|
|
33
|
+
warningLight: palette.mellowApricot, // DEPRECATED, use warning instead
|
|
34
|
+
warningDark: palette.deepSaffron,
|
|
35
|
+
warningBackground: palette.seashell,
|
|
36
|
+
platformBackground: palette.white,
|
|
37
|
+
backgroundLight: palette.greyLight90,
|
|
38
|
+
backgroundDark: palette.maasstrichtBlue,
|
|
39
|
+
text: palette.maasstrichtBlue,
|
|
40
|
+
subduedText: palette.maasstrichtBlueLight30, // secondary
|
|
41
|
+
disabledText: palette.maasstrichtBlueLight50, // readonly
|
|
42
|
+
disabledLightText: palette.greyLight30, // disabled
|
|
43
|
+
invertedText: palette.white,
|
|
44
|
+
outline: palette.greyLight75, // divider
|
|
45
|
+
archived: palette.greyLight45, // no usage
|
|
46
|
+
archivedLight: palette.greyLight30,
|
|
47
|
+
archivedDark: palette.sonicSilver, // should replace archived as archived has no usage?
|
|
48
|
+
archivedBackground: palette.greyLight90,
|
|
49
|
+
black: palette.black,
|
|
50
|
+
inactiveBackground: palette.maasstrichtBlueLight50,
|
|
51
|
+
shadow: palette.greyLight45, // waiting for new color
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export default swagSystemPalette;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export type SystemPalette = {
|
|
2
|
+
globalPrimary: string;
|
|
3
|
+
globalPrimaryLight: string;
|
|
4
|
+
globalPrimaryBackground: string;
|
|
5
|
+
primary: string;
|
|
6
|
+
primaryLight: string;
|
|
7
|
+
primaryDark: string;
|
|
8
|
+
primaryBackground: string;
|
|
9
|
+
primaryBackgroundDark: string;
|
|
10
|
+
secondary: string;
|
|
11
|
+
secondaryLight: string;
|
|
12
|
+
secondaryBackground: string;
|
|
13
|
+
info: string;
|
|
14
|
+
infoMediumLight: string;
|
|
15
|
+
infoLight: string;
|
|
16
|
+
infoBackground: string;
|
|
17
|
+
success: string;
|
|
18
|
+
successLight: string;
|
|
19
|
+
successDark: string;
|
|
20
|
+
successBackground: string;
|
|
21
|
+
danger: string;
|
|
22
|
+
dangerMediumLight: string;
|
|
23
|
+
dangerLight: string;
|
|
24
|
+
dangerBackground: string;
|
|
25
|
+
warning: string;
|
|
26
|
+
warningLight: string;
|
|
27
|
+
warningDark: string;
|
|
28
|
+
warningBackground: string;
|
|
29
|
+
platformBackground: string;
|
|
30
|
+
backgroundLight: string;
|
|
31
|
+
backgroundDark: string;
|
|
32
|
+
text: string;
|
|
33
|
+
subduedText: string;
|
|
34
|
+
disabledText: string;
|
|
35
|
+
disabledLightText: string;
|
|
36
|
+
invertedText: string;
|
|
37
|
+
outline: string;
|
|
38
|
+
archived: string;
|
|
39
|
+
archivedLight: string;
|
|
40
|
+
archivedDark: string;
|
|
41
|
+
archivedBackground: string;
|
|
42
|
+
black: string;
|
|
43
|
+
inactiveBackground: string;
|
|
44
|
+
shadow: string;
|
|
45
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { workPalette } from '@hero-design/colors';
|
|
2
|
+
|
|
3
|
+
import { SystemPalette } from './types';
|
|
4
|
+
import swag from './swag';
|
|
5
|
+
|
|
6
|
+
const workSystemPalette: SystemPalette = {
|
|
7
|
+
...swag,
|
|
8
|
+
primary: workPalette.gold,
|
|
9
|
+
primaryLight: workPalette.goldLight50,
|
|
10
|
+
primaryDark: workPalette.goldLight20,
|
|
11
|
+
primaryBackground: workPalette.goldLight90,
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default workSystemPalette;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { scale as defaultScale, Scale } from './scale';
|
|
2
|
-
import {
|
|
2
|
+
import { SystemPalette } from './colors/types';
|
|
3
|
+
import swagSystemPalette from './colors/swag';
|
|
4
|
+
import workSystemPalette from './colors/work';
|
|
5
|
+
|
|
3
6
|
import { getFonts, getFontSizes, getLineHeights } from './typography';
|
|
4
7
|
import { getSpace } from './space';
|
|
5
8
|
import { getBorderWidths, getRadii } from './borders';
|
|
@@ -33,5 +36,6 @@ export {
|
|
|
33
36
|
SystemPalette,
|
|
34
37
|
getGlobalTheme,
|
|
35
38
|
defaultScale,
|
|
36
|
-
|
|
39
|
+
swagSystemPalette,
|
|
40
|
+
workSystemPalette,
|
|
37
41
|
};
|
package/src/theme/index.ts
CHANGED
|
@@ -1,145 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
import getBottomNavigationTheme from './components/bottomNavigation';
|
|
17
|
-
import getBottomSheetTheme from './components/bottomSheet';
|
|
18
|
-
import getButtonTheme from './components/button';
|
|
19
|
-
import getCalendarTheme from './components/calendar';
|
|
20
|
-
import getCardTheme from './components/card';
|
|
21
|
-
import getCheckboxTheme from './components/checkbox';
|
|
22
|
-
import getContentNavigatorTheme from './components/contentNavigator';
|
|
23
|
-
import getDatePickerTheme from './components/datePicker';
|
|
24
|
-
import getDividerTheme from './components/divider';
|
|
25
|
-
import getDrawerTheme from './components/drawer';
|
|
26
|
-
import getEmptyTheme from './components/empty';
|
|
27
|
-
import getFABTheme from './components/fab';
|
|
28
|
-
import getIconTheme from './components/icon';
|
|
29
|
-
import getListTheme from './components/list';
|
|
30
|
-
import getPinInputTheme from './components/pinInput';
|
|
31
|
-
import getProgressTheme from './components/progress';
|
|
32
|
-
import getRadioTheme from './components/radio';
|
|
33
|
-
import getRichTextEditorTheme from './components/richTextEditor';
|
|
34
|
-
import getSectionHeadingTheme from './components/sectionHeading';
|
|
35
|
-
import getSelectTheme from './components/select';
|
|
36
|
-
import getSpinnerTheme from './components/spinner';
|
|
37
|
-
import getSwitchTheme from './components/switch';
|
|
38
|
-
import getTabsTheme from './components/tabs';
|
|
39
|
-
import getTagTheme from './components/tag';
|
|
40
|
-
import getTextInputTheme from './components/textInput';
|
|
41
|
-
import getTimePickerTheme from './components/timePicker';
|
|
42
|
-
import getToastTheme from './components/toast';
|
|
43
|
-
import getToolbarTheme from './components/toolbar';
|
|
44
|
-
import getTypographyTheme from './components/typography';
|
|
45
|
-
|
|
46
|
-
type Theme = GlobalTheme & {
|
|
47
|
-
__hd__: {
|
|
48
|
-
accordion: ReturnType<typeof getAccordionTheme>;
|
|
49
|
-
alert: ReturnType<typeof getAlertTheme>;
|
|
50
|
-
avatar: ReturnType<typeof getAvatarTheme>;
|
|
51
|
-
badge: ReturnType<typeof getBadgeTheme>;
|
|
52
|
-
bottomNavigation: ReturnType<typeof getBottomNavigationTheme>;
|
|
53
|
-
bottomSheet: ReturnType<typeof getBottomSheetTheme>;
|
|
54
|
-
button: ReturnType<typeof getButtonTheme>;
|
|
55
|
-
calendar: ReturnType<typeof getCalendarTheme>;
|
|
56
|
-
card: ReturnType<typeof getCardTheme>;
|
|
57
|
-
checkbox: ReturnType<typeof getCheckboxTheme>;
|
|
58
|
-
contentNavigator: ReturnType<typeof getContentNavigatorTheme>;
|
|
59
|
-
datePicker: ReturnType<typeof getDatePickerTheme>;
|
|
60
|
-
divider: ReturnType<typeof getDividerTheme>;
|
|
61
|
-
drawer: ReturnType<typeof getDrawerTheme>;
|
|
62
|
-
empty: ReturnType<typeof getEmptyTheme>;
|
|
63
|
-
fab: ReturnType<typeof getFABTheme>;
|
|
64
|
-
icon: ReturnType<typeof getIconTheme>;
|
|
65
|
-
list: ReturnType<typeof getListTheme>;
|
|
66
|
-
pinInput: ReturnType<typeof getPinInputTheme>;
|
|
67
|
-
progress: ReturnType<typeof getProgressTheme>;
|
|
68
|
-
radio: ReturnType<typeof getRadioTheme>;
|
|
69
|
-
richTextEditor: ReturnType<typeof getRichTextEditorTheme>;
|
|
70
|
-
sectionHeading: ReturnType<typeof getSectionHeadingTheme>;
|
|
71
|
-
select: ReturnType<typeof getSelectTheme>;
|
|
72
|
-
spinner: ReturnType<typeof getSpinnerTheme>;
|
|
73
|
-
switch: ReturnType<typeof getSwitchTheme>;
|
|
74
|
-
tabs: ReturnType<typeof getTabsTheme>;
|
|
75
|
-
tag: ReturnType<typeof getTagTheme>;
|
|
76
|
-
textInput: ReturnType<typeof getTextInputTheme>;
|
|
77
|
-
timePicker: ReturnType<typeof getTimePickerTheme>;
|
|
78
|
-
toast: ReturnType<typeof getToastTheme>;
|
|
79
|
-
toolbar: ReturnType<typeof getToolbarTheme>;
|
|
80
|
-
typography: ReturnType<typeof getTypographyTheme>;
|
|
81
|
-
};
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
const getTheme = (
|
|
85
|
-
scale: Scale = defaultScale,
|
|
86
|
-
systemPallete: SystemPalette = defaultSystemPalette
|
|
87
|
-
): Theme => {
|
|
88
|
-
const globalTheme = getGlobalTheme(scale, systemPallete);
|
|
89
|
-
return {
|
|
90
|
-
...globalTheme,
|
|
91
|
-
__hd__: {
|
|
92
|
-
accordion: getAccordionTheme(globalTheme),
|
|
93
|
-
avatar: getAvatarTheme(globalTheme),
|
|
94
|
-
alert: getAlertTheme(globalTheme),
|
|
95
|
-
badge: getBadgeTheme(globalTheme),
|
|
96
|
-
bottomNavigation: getBottomNavigationTheme(globalTheme),
|
|
97
|
-
bottomSheet: getBottomSheetTheme(globalTheme),
|
|
98
|
-
button: getButtonTheme(globalTheme),
|
|
99
|
-
calendar: getCalendarTheme(globalTheme),
|
|
100
|
-
card: getCardTheme(globalTheme),
|
|
101
|
-
checkbox: getCheckboxTheme(globalTheme),
|
|
102
|
-
contentNavigator: getContentNavigatorTheme(globalTheme),
|
|
103
|
-
datePicker: getDatePickerTheme(),
|
|
104
|
-
divider: getDividerTheme(globalTheme),
|
|
105
|
-
drawer: getDrawerTheme(globalTheme),
|
|
106
|
-
empty: getEmptyTheme(globalTheme),
|
|
107
|
-
fab: getFABTheme(globalTheme),
|
|
108
|
-
icon: getIconTheme(globalTheme),
|
|
109
|
-
list: getListTheme(globalTheme),
|
|
110
|
-
pinInput: getPinInputTheme(globalTheme),
|
|
111
|
-
progress: getProgressTheme(globalTheme),
|
|
112
|
-
radio: getRadioTheme(globalTheme),
|
|
113
|
-
richTextEditor: getRichTextEditorTheme(globalTheme),
|
|
114
|
-
sectionHeading: getSectionHeadingTheme(globalTheme),
|
|
115
|
-
select: getSelectTheme(globalTheme),
|
|
116
|
-
spinner: getSpinnerTheme(globalTheme),
|
|
117
|
-
switch: getSwitchTheme(globalTheme),
|
|
118
|
-
tabs: getTabsTheme(globalTheme),
|
|
119
|
-
tag: getTagTheme(globalTheme),
|
|
120
|
-
textInput: getTextInputTheme(globalTheme),
|
|
121
|
-
timePicker: getTimePickerTheme(),
|
|
122
|
-
toast: getToastTheme(globalTheme),
|
|
123
|
-
toolbar: getToolbarTheme(globalTheme),
|
|
124
|
-
typography: getTypographyTheme(globalTheme),
|
|
125
|
-
},
|
|
126
|
-
};
|
|
1
|
+
import getTheme, { Theme } from './getTheme';
|
|
2
|
+
import ThemeProvider, { useTheme } from './ThemeProvider';
|
|
3
|
+
import ThemeSwitcher from './ThemeSwitcher';
|
|
4
|
+
import { swagSystemPalette, workSystemPalette } from './global';
|
|
5
|
+
|
|
6
|
+
const defaultTheme = getTheme();
|
|
7
|
+
|
|
8
|
+
export {
|
|
9
|
+
Theme,
|
|
10
|
+
getTheme,
|
|
11
|
+
ThemeProvider,
|
|
12
|
+
ThemeSwitcher,
|
|
13
|
+
useTheme,
|
|
14
|
+
swagSystemPalette,
|
|
15
|
+
workSystemPalette,
|
|
127
16
|
};
|
|
128
17
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
export interface ThemeProviderProps {
|
|
132
|
-
theme: Partial<Theme> | ((outerTheme: Theme) => Theme);
|
|
133
|
-
children: React.ReactNode;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
interface ThemeProviderType {
|
|
137
|
-
(props: ThemeProviderProps): React.ReactElement;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
const ThemeProvider = Emotion.ThemeProvider as ThemeProviderType;
|
|
141
|
-
|
|
142
|
-
const useTheme = Emotion.useTheme as () => Theme;
|
|
143
|
-
export { Theme, getTheme, ThemeProvider, useTheme };
|
|
144
|
-
|
|
145
|
-
export default theme;
|
|
18
|
+
export default defaultTheme;
|
package/src/utils/scale.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { Dimensions } from 'react-native';
|
|
1
|
+
import { Dimensions, Platform } from 'react-native';
|
|
2
2
|
|
|
3
3
|
export const BASE_WIDTH = 390; // Based on iPhone 13's viewport size
|
|
4
4
|
|
|
5
5
|
export const horizontalScale = (size: number) => {
|
|
6
|
+
if (Platform.OS === 'web') {
|
|
7
|
+
return size;
|
|
8
|
+
}
|
|
6
9
|
const { width, height } = Dimensions.get('window');
|
|
7
10
|
const shortDimension = width < height ? width : height;
|
|
8
11
|
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const getOffset: (height: number, percentage: number) => number;
|
|
2
|
+
export declare type SnapPointsData = {
|
|
3
|
+
list: number[];
|
|
4
|
+
minHeightOffset: number;
|
|
5
|
+
maxHeightOffset: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const calculateSnapPointsData: (minimumHeight: number, height: number, snapPoints: number[]) => SnapPointsData;
|
|
8
|
+
export declare const calculateAnimatedToValue: (position: number, heightSnapPoints: number[]) => number;
|