@hero-design/rn 7.1.3-alpha7 → 7.1.3-alpha8

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.
@@ -62,7 +62,7 @@ const BottomNavigationPlayground = () => {
62
62
 
63
63
  return (
64
64
  <BottomNavigation
65
- onChange={newTabKey => setSelectedTabKey(newTabKey)}
65
+ onTabPress={newTabKey => setSelectedTabKey(newTabKey)}
66
66
  selectedTabKey={selectedTabKey}
67
67
  tabs={tabs}
68
68
  />
@@ -34,7 +34,7 @@ const TabsPlayground = () => {
34
34
 
35
35
  return (
36
36
  <Tabs
37
- onChange={newTabKey => setSelectedTabKey(newTabKey)}
37
+ onTabPress={newTabKey => setSelectedTabKey(newTabKey)}
38
38
  selectedTabKey={selectedTabKey}
39
39
  tabs={tabs}
40
40
  />
@@ -48,7 +48,6 @@ exports[`BottomNavigation renders correctly 1`] = `
48
48
  undefined,
49
49
  ]
50
50
  }
51
- testID="route-screen-home"
52
51
  themeVisibility={true}
53
52
  >
54
53
  <Text>
@@ -8,7 +8,7 @@ import BottomNavigation, { BottomNavigationTabType } from '..';
8
8
  const TestComponent = (
9
9
  props: Omit<
10
10
  ComponentProps<typeof BottomNavigation>,
11
- 'selectedTabKey' | 'onChange' | 'tabs'
11
+ 'selectedTabKey' | 'onTabPress' | 'tabs'
12
12
  >
13
13
  ) => {
14
14
  const [selectedTabKey, setSelectedTabKey] = React.useState('home');
@@ -50,7 +50,7 @@ const TestComponent = (
50
50
  {...props}
51
51
  tabs={tabs}
52
52
  selectedTabKey={selectedTabKey}
53
- onChange={newTabKey => setSelectedTabKey(newTabKey)}
53
+ onTabPress={newTabKey => setSelectedTabKey(newTabKey)}
54
54
  />
55
55
  </SafeAreaProvider>
56
56
  );
@@ -29,9 +29,9 @@ export type BottomNavigationTabType = {
29
29
 
30
30
  interface BottomNavigationProps extends ViewProps {
31
31
  /**
32
- * Callback which is called on tab change, receiving id of upcoming active Tab.
32
+ * Callback which is called on tab press, receiving key of upcoming active Tab.
33
33
  */
34
- onChange: (key: string) => void;
34
+ onTabPress: (key: string) => void;
35
35
  /**
36
36
  * Whether inactive tabs should be removed and unmounted in React.
37
37
  * Defaults to `false`.
@@ -67,7 +67,7 @@ const getInactiveIcon = (icon: IconName): IconName => {
67
67
  };
68
68
 
69
69
  const BottomNavigation = ({
70
- onChange,
70
+ onTabPress,
71
71
  renderActiveTabOnly = false,
72
72
  selectedTabKey,
73
73
  tabs,
@@ -89,7 +89,7 @@ const BottomNavigation = ({
89
89
  <BottomNavigationContainer {...nativeProps}>
90
90
  <ContentWrapper>
91
91
  {tabs.map(tab => {
92
- const { key, component } = tab;
92
+ const { key, component, testID } = tab;
93
93
  const active = selectedTabKey === key;
94
94
 
95
95
  if (renderActiveTabOnly && !active) {
@@ -104,7 +104,7 @@ const BottomNavigation = ({
104
104
  return (
105
105
  <BottomNavigationTab
106
106
  key={key}
107
- testID={`route-screen-${selectedTabKey}`}
107
+ testID={testID ? `route-screen-${testID}` : undefined}
108
108
  pointerEvents={active ? 'auto' : 'none'}
109
109
  accessibilityElementsHidden={!active}
110
110
  importantForAccessibility={
@@ -133,11 +133,7 @@ const BottomNavigation = ({
133
133
  return (
134
134
  <TouchableWithoutFeedback
135
135
  key={key}
136
- onPress={() => {
137
- if (key !== selectedTabKey) {
138
- onChange(key);
139
- }
140
- }}
136
+ onPress={() => onTabPress(key)}
141
137
  testID={testID}
142
138
  >
143
139
  <BottomBarItem>
@@ -309,7 +309,6 @@ exports[`Tabs renders correctly 1`] = `
309
309
  undefined,
310
310
  ]
311
311
  }
312
- testID="tab-screen-work"
313
312
  themeVisibility={true}
314
313
  >
315
314
  <Text>
@@ -8,7 +8,7 @@ import Tabs, { TabType } from '..';
8
8
  const TestTabsComponent = (
9
9
  props: Omit<
10
10
  ComponentProps<typeof Tabs>,
11
- 'selectedTabKey' | 'onChange' | 'tabs'
11
+ 'selectedTabKey' | 'onTabPress' | 'tabs'
12
12
  >
13
13
  ) => {
14
14
  const [selectedTabKey, setSelectedTabKey] = React.useState('work');
@@ -38,7 +38,7 @@ const TestTabsComponent = (
38
38
  {...props}
39
39
  tabs={tabs}
40
40
  selectedTabKey={selectedTabKey}
41
- onChange={newTabKey => setSelectedTabKey(newTabKey)}
41
+ onTabPress={newTabKey => setSelectedTabKey(newTabKey)}
42
42
  />
43
43
  </SafeAreaProvider>
44
44
  );
@@ -30,9 +30,9 @@ export type TabType = {
30
30
 
31
31
  interface TabsProps extends ViewProps {
32
32
  /**
33
- * Callback which is called on tab change, receiving id of upcoming active Tab.
33
+ * Callback which is called on tab press, receiving key of upcoming active Tab.
34
34
  */
35
- onChange: (key: string) => void;
35
+ onTabPress: (key: string) => void;
36
36
  /**
37
37
  * Whether inactive tabs should be removed and unmounted in React.
38
38
  * Defaults to `false`.
@@ -63,7 +63,7 @@ interface TabsProps extends ViewProps {
63
63
  }
64
64
 
65
65
  const Tabs = ({
66
- onChange,
66
+ onTabPress,
67
67
  renderActiveTabOnly = false,
68
68
  selectedTabKey,
69
69
  tabs,
@@ -77,6 +77,18 @@ const Tabs = ({
77
77
  */
78
78
  const [loaded, setLoaded] = React.useState([selectedTabKey]);
79
79
 
80
+ React.useEffect(() => {
81
+ const selectedTabIndex = tabs.findIndex(
82
+ item => item.key === selectedTabKey
83
+ );
84
+ if (selectedTabIndex !== -1) {
85
+ flatListRef.current?.scrollToIndex({
86
+ index: selectedTabIndex,
87
+ viewPosition: 0.5,
88
+ });
89
+ }
90
+ }, [selectedTabKey, tabs]);
91
+
80
92
  if (!loaded.includes(selectedTabKey)) {
81
93
  // Set the current tab to be loaded if it was not loaded before
82
94
  setLoaded(loadedState => [...loadedState, selectedTabKey]);
@@ -101,22 +113,14 @@ const Tabs = ({
101
113
  100
102
114
  );
103
115
  }}
104
- renderItem={({ item: tab, index }) => {
116
+ renderItem={({ item: tab }) => {
105
117
  const { key, icon, title, testID } = tab;
106
118
  const active = selectedTabKey === key;
107
119
 
108
120
  return (
109
121
  <TouchableOpacity
110
122
  key={key}
111
- onPress={() => {
112
- if (key !== selectedTabKey) {
113
- onChange(key);
114
- flatListRef.current?.scrollToIndex({
115
- index,
116
- viewPosition: 0.5,
117
- });
118
- }
119
- }}
123
+ onPress={() => onTabPress(key)}
120
124
  testID={testID}
121
125
  >
122
126
  <HeaderTabItem>
@@ -140,7 +144,7 @@ const Tabs = ({
140
144
  </HeaderTabWrapper>
141
145
  <ContentWrapper>
142
146
  {tabs.map(tab => {
143
- const { key, component } = tab;
147
+ const { key, component, testID } = tab;
144
148
  const active = selectedTabKey === key;
145
149
 
146
150
  if (renderActiveTabOnly && !active) {
@@ -155,7 +159,7 @@ const Tabs = ({
155
159
  return (
156
160
  <TabScreen
157
161
  key={key}
158
- testID={`tab-screen-${selectedTabKey}`}
162
+ testID={testID ? `tab-screen-${testID}` : undefined}
159
163
  pointerEvents={active ? 'auto' : 'none'}
160
164
  accessibilityElementsHidden={!active}
161
165
  importantForAccessibility={
@@ -1,3 +1,9 @@
1
- const borderWidths = { base: 1 };
1
+ interface BorderWidths {
2
+ base: number;
3
+ }
2
4
 
3
- export { borderWidths };
5
+ const getBorderWidths = (baseBorderWidth: number): BorderWidths => ({
6
+ base: baseBorderWidth,
7
+ });
8
+
9
+ export { BorderWidths, getBorderWidths };
@@ -25,4 +25,6 @@ const systemPalette = {
25
25
  outline: palette.greyLight60,
26
26
  };
27
27
 
28
- export { palette, systemPalette };
28
+ type SystemPalette = typeof systemPalette;
29
+
30
+ export { systemPalette, SystemPalette };
@@ -1,21 +1,35 @@
1
- import { systemPalette } from './colors';
2
- import { space } from './space';
3
- import { fonts, fontSizes, lineHeights } from './typography';
4
- import { borderWidths } from './borders';
1
+ import { scale as defaultScale, Scale } from './scale';
2
+ import { systemPalette as defaultSystemPalette, SystemPalette } from './colors';
3
+ import { getFonts, getFontSizes, getLineHeights } from './typography';
4
+ import { getSpace } from './space';
5
+ import { getBorderWidths } from './borders';
5
6
 
6
- const globalTheme = {
7
- colors: {
8
- ...systemPalette,
9
- },
10
- space,
11
- fonts,
12
- fontSizes,
13
- lineHeights,
14
- borderWidths,
15
- };
7
+ const getGlobalTheme = (scale: Scale, systemPalette: SystemPalette) => {
8
+ const fonts = getFonts(scale.font);
9
+ const fontSizes = getFontSizes(scale.fontSize);
10
+ const lineHeights = getLineHeights(fontSizes);
11
+ const borderWidths = getBorderWidths(scale.borderWidth);
12
+ const space = getSpace(scale.space);
16
13
 
17
- type GlobalTheme = typeof globalTheme;
14
+ return {
15
+ colors: {
16
+ ...systemPalette,
17
+ },
18
+ fonts,
19
+ fontSizes,
20
+ lineHeights,
21
+ borderWidths,
22
+ space,
23
+ };
24
+ };
18
25
 
19
- export { GlobalTheme };
26
+ type GlobalTheme = ReturnType<typeof getGlobalTheme>;
20
27
 
21
- export default globalTheme;
28
+ export {
29
+ GlobalTheme,
30
+ Scale,
31
+ SystemPalette,
32
+ getGlobalTheme,
33
+ defaultScale,
34
+ defaultSystemPalette,
35
+ };
@@ -0,0 +1,18 @@
1
+ const BASE_BORDER_WIDTH = 1;
2
+
3
+ const BASE_SPACE = 8;
4
+
5
+ const BASE_FONT = 'BeVietnamPro';
6
+
7
+ const BASE_FONT_SIZE = 10;
8
+
9
+ const scale = {
10
+ borderWidth: BASE_BORDER_WIDTH,
11
+ space: BASE_SPACE,
12
+ font: BASE_FONT,
13
+ fontSize: BASE_FONT_SIZE,
14
+ };
15
+
16
+ type Scale = typeof scale;
17
+
18
+ export { scale, Scale };
@@ -1,17 +1,27 @@
1
1
  import { scale } from '../../utils/scale';
2
2
 
3
- const BASE = 8;
3
+ interface Space {
4
+ large: number;
5
+ medium: number;
6
+ small: number;
7
+ xlarge: number;
8
+ xsmall: number;
9
+ xxlarge: number;
10
+ xxsmall: number;
11
+ xxxlarge: number;
12
+ xxxxlarge: number;
13
+ }
4
14
 
5
- const space = {
6
- xxsmall: scale(BASE * 0.25),
7
- xsmall: scale(BASE * 0.5),
8
- small: scale(BASE),
9
- medium: scale(BASE * 2),
10
- large: scale(BASE * 3),
11
- xlarge: scale(BASE * 4),
12
- xxlarge: scale(BASE * 5),
13
- xxxlarge: scale(BASE * 6),
14
- xxxxlarge: scale(BASE * 7),
15
- };
15
+ const getSpace = (baseSpace: number): Space => ({
16
+ xxsmall: scale(baseSpace * 0.25),
17
+ xsmall: scale(baseSpace * 0.5),
18
+ small: scale(baseSpace),
19
+ medium: scale(baseSpace * 2),
20
+ large: scale(baseSpace * 3),
21
+ xlarge: scale(baseSpace * 4),
22
+ xxlarge: scale(baseSpace * 5),
23
+ xxxlarge: scale(baseSpace * 6),
24
+ xxxxlarge: scale(baseSpace * 7),
25
+ });
16
26
 
17
- export { space };
27
+ export { Space, getSpace };
@@ -1,35 +1,79 @@
1
1
  import { scale } from '../../utils/scale';
2
2
 
3
- const BASE = 16;
3
+ interface Fonts {
4
+ light: string;
5
+ regular: string;
6
+ semiBold: string;
7
+ }
4
8
 
5
- const fonts = {
6
- light: 'BeVietnamPro-Light',
7
- regular: 'BeVietnamPro-Regular',
8
- semiBold: 'BeVietnamPro-SemiBold',
9
- };
9
+ interface FontSizes {
10
+ xxxxxlarge: number;
11
+ xxxxlarge: number;
12
+ xxxlarge: number;
13
+ xxlarge: number;
14
+ xlarge: number;
15
+ large: number;
16
+ medium: number;
17
+ small: number;
18
+ xsmall: number;
19
+ }
20
+
21
+ type LineHeights = FontSizes;
22
+
23
+ // Hero design web typo scale is following
24
+ // https://www.ibm.com/design/language/typography/type-specs-ui#scales
25
+ const genFontSize = (prev: number, at: number): number =>
26
+ prev + Math.floor(Math.abs((at - 2) / 4) + 1) * 2;
10
27
 
11
- const fontSizes = {
12
- xxxxxlarge: scale(BASE * 2), // 32
13
- xxxxlarge: scale(BASE * 1.75), // 28
14
- xxxlarge: scale(BASE * 1.5), // 24
15
- xxlarge: scale(BASE * 1.25), // 20
16
- xlarge: scale(BASE * 1.125), // 18
17
- large: scale(BASE), // 16
18
- medium: scale(BASE * 0.875), // 14
19
- small: scale(BASE * 0.75), // 12
20
- xsmall: scale(BASE * 0.625), // 10
28
+ const getFonts = (baseFont: string): Fonts => ({
29
+ light: `${baseFont}-Light`,
30
+ regular: `${baseFont}-Regular`,
31
+ semiBold: `${baseFont}-SemiBold`,
32
+ });
33
+
34
+ const getFontSizes = (baseFontSize: number): FontSizes => {
35
+ const fontSizes = Array.from(new Array(9));
36
+ fontSizes.forEach((_, index) => {
37
+ if (index === 0) {
38
+ fontSizes[0] = baseFontSize;
39
+ } else {
40
+ fontSizes[index] = genFontSize(fontSizes[index - 1], index);
41
+ }
42
+ return undefined;
43
+ });
44
+ return {
45
+ xxxxxlarge: scale(fontSizes[8]), // 32
46
+ xxxxlarge: scale(fontSizes[7]), // 28
47
+ xxxlarge: scale(fontSizes[6]), // 24
48
+ xxlarge: scale(fontSizes[5]), // 20
49
+ xlarge: scale(fontSizes[4]), // 18
50
+ large: scale(fontSizes[3]), // 16
51
+ medium: scale(fontSizes[2]), // 14
52
+ small: scale(fontSizes[1]), // 12
53
+ xsmall: scale(fontSizes[0]), // 10
54
+ };
21
55
  };
22
56
 
23
- const lineHeights = {
24
- xxxxxlarge: fontSizes.xxxxxlarge + 8,
25
- xxxxlarge: fontSizes.xxxxlarge + 8,
26
- xxxlarge: fontSizes.xxxlarge + 8,
27
- xxlarge: fontSizes.xxlarge + 8,
28
- xlarge: fontSizes.xlarge + 8,
29
- large: fontSizes.large + 8,
30
- medium: fontSizes.medium + 8,
31
- small: fontSizes.small + 8,
32
- xsmall: fontSizes.xsmall + 8,
57
+ const getLineHeights = (fontSizes: FontSizes): LineHeights => {
58
+ const additionalSpace = 8;
59
+ return {
60
+ xxxxxlarge: fontSizes.xxxxxlarge + additionalSpace,
61
+ xxxxlarge: fontSizes.xxxxlarge + additionalSpace,
62
+ xxxlarge: fontSizes.xxxlarge + additionalSpace,
63
+ xxlarge: fontSizes.xxlarge + additionalSpace,
64
+ xlarge: fontSizes.xlarge + additionalSpace,
65
+ large: fontSizes.large + additionalSpace,
66
+ medium: fontSizes.medium + additionalSpace,
67
+ small: fontSizes.small + additionalSpace,
68
+ xsmall: fontSizes.xsmall + additionalSpace,
69
+ };
33
70
  };
34
71
 
35
- export { fonts, fontSizes, lineHeights };
72
+ export {
73
+ Fonts,
74
+ FontSizes,
75
+ LineHeights,
76
+ getFonts,
77
+ getFontSizes,
78
+ getLineHeights,
79
+ };
@@ -1,4 +1,11 @@
1
- import globalTheme, { GlobalTheme } from './global';
1
+ import {
2
+ GlobalTheme,
3
+ Scale,
4
+ SystemPalette,
5
+ getGlobalTheme,
6
+ defaultScale,
7
+ defaultSystemPalette,
8
+ } from './global';
2
9
 
3
10
  import getBadgeTheme from './components/badge';
4
11
  import getBottomNavigationTheme from './components/bottomNavigation';
@@ -22,19 +29,25 @@ type Theme = GlobalTheme & {
22
29
  };
23
30
  };
24
31
 
25
- const getTheme = (theme: GlobalTheme = globalTheme): Theme => ({
26
- ...theme,
27
- __hd__: {
28
- badge: getBadgeTheme(theme),
29
- bottomNavigation: getBottomNavigationTheme(theme),
30
- card: getCardTheme(theme),
31
- divider: getDividerTheme(theme),
32
- icon: getIconTheme(theme),
33
- tabs: getTabsTheme(theme),
34
- typography: getTypographyTheme(theme),
35
- fab: getFABTheme(theme),
36
- },
37
- });
32
+ const getTheme = (
33
+ scale: Scale = defaultScale,
34
+ systemPallete: SystemPalette = defaultSystemPalette
35
+ ): Theme => {
36
+ const globalTheme = getGlobalTheme(scale, systemPallete);
37
+ return {
38
+ ...globalTheme,
39
+ __hd__: {
40
+ badge: getBadgeTheme(globalTheme),
41
+ bottomNavigation: getBottomNavigationTheme(globalTheme),
42
+ card: getCardTheme(globalTheme),
43
+ divider: getDividerTheme(globalTheme),
44
+ icon: getIconTheme(globalTheme),
45
+ tabs: getTabsTheme(globalTheme),
46
+ typography: getTypographyTheme(globalTheme),
47
+ fab: getFABTheme(globalTheme),
48
+ },
49
+ };
50
+ };
38
51
 
39
52
  const theme = getTheme();
40
53
 
@@ -10,9 +10,9 @@ export declare type BottomNavigationTabType = {
10
10
  };
11
11
  interface BottomNavigationProps extends ViewProps {
12
12
  /**
13
- * Callback which is called on tab change, receiving id of upcoming active Tab.
13
+ * Callback which is called on tab press, receiving key of upcoming active Tab.
14
14
  */
15
- onChange: (key: string) => void;
15
+ onTabPress: (key: string) => void;
16
16
  /**
17
17
  * Whether inactive tabs should be removed and unmounted in React.
18
18
  * Defaults to `false`.
@@ -41,5 +41,5 @@ interface BottomNavigationProps extends ViewProps {
41
41
  */
42
42
  testID?: string;
43
43
  }
44
- declare const BottomNavigation: ({ onChange, renderActiveTabOnly, selectedTabKey, tabs, ...nativeProps }: BottomNavigationProps) => JSX.Element;
44
+ declare const BottomNavigation: ({ onTabPress, renderActiveTabOnly, selectedTabKey, tabs, ...nativeProps }: BottomNavigationProps) => JSX.Element;
45
45
  export default BottomNavigation;
@@ -10,9 +10,9 @@ export declare type TabType = {
10
10
  };
11
11
  interface TabsProps extends ViewProps {
12
12
  /**
13
- * Callback which is called on tab change, receiving id of upcoming active Tab.
13
+ * Callback which is called on tab press, receiving key of upcoming active Tab.
14
14
  */
15
- onChange: (key: string) => void;
15
+ onTabPress: (key: string) => void;
16
16
  /**
17
17
  * Whether inactive tabs should be removed and unmounted in React.
18
18
  * Defaults to `false`.
@@ -41,5 +41,5 @@ interface TabsProps extends ViewProps {
41
41
  */
42
42
  testID?: string;
43
43
  }
44
- declare const Tabs: ({ onChange, renderActiveTabOnly, selectedTabKey, tabs, ...nativeProps }: TabsProps) => JSX.Element;
44
+ declare const Tabs: ({ onTabPress, renderActiveTabOnly, selectedTabKey, tabs, ...nativeProps }: TabsProps) => JSX.Element;
45
45
  export default Tabs;
@@ -1,4 +1,5 @@
1
- declare const borderWidths: {
1
+ interface BorderWidths {
2
2
  base: number;
3
- };
4
- export { borderWidths };
3
+ }
4
+ declare const getBorderWidths: (baseBorderWidth: number) => BorderWidths;
5
+ export { BorderWidths, getBorderWidths };
@@ -1,4 +1,3 @@
1
- import { palette } from '@hero-design/colors';
2
1
  declare const systemPalette: {
3
2
  primary: string;
4
3
  primaryLight: string;
@@ -23,4 +22,5 @@ declare const systemPalette: {
23
22
  invertedText: string;
24
23
  outline: string;
25
24
  };
26
- export { palette, systemPalette };
25
+ declare type SystemPalette = typeof systemPalette;
26
+ export { systemPalette, SystemPalette };
@@ -1,4 +1,6 @@
1
- declare const globalTheme: {
1
+ import { scale as defaultScale, Scale } from './scale';
2
+ import { systemPalette as defaultSystemPalette, SystemPalette } from './colors';
3
+ declare const getGlobalTheme: (scale: Scale, systemPalette: SystemPalette) => {
2
4
  colors: {
3
5
  primary: string;
4
6
  primaryLight: string;
@@ -23,48 +25,11 @@ declare const globalTheme: {
23
25
  invertedText: string;
24
26
  outline: string;
25
27
  };
26
- space: {
27
- xxsmall: number;
28
- xsmall: number;
29
- small: number;
30
- medium: number;
31
- large: number;
32
- xlarge: number;
33
- xxlarge: number;
34
- xxxlarge: number;
35
- xxxxlarge: number;
36
- };
37
- fonts: {
38
- light: string;
39
- regular: string;
40
- semiBold: string;
41
- };
42
- fontSizes: {
43
- xxxxxlarge: number;
44
- xxxxlarge: number;
45
- xxxlarge: number;
46
- xxlarge: number;
47
- xlarge: number;
48
- large: number;
49
- medium: number;
50
- small: number;
51
- xsmall: number;
52
- };
53
- lineHeights: {
54
- xxxxxlarge: number;
55
- xxxxlarge: number;
56
- xxxlarge: number;
57
- xxlarge: number;
58
- xlarge: number;
59
- large: number;
60
- medium: number;
61
- small: number;
62
- xsmall: number;
63
- };
64
- borderWidths: {
65
- base: number;
66
- };
28
+ fonts: import("./typography").Fonts;
29
+ fontSizes: import("./typography").FontSizes;
30
+ lineHeights: import("./typography").FontSizes;
31
+ borderWidths: import("./borders").BorderWidths;
32
+ space: import("./space").Space;
67
33
  };
68
- declare type GlobalTheme = typeof globalTheme;
69
- export { GlobalTheme };
70
- export default globalTheme;
34
+ declare type GlobalTheme = ReturnType<typeof getGlobalTheme>;
35
+ export { GlobalTheme, Scale, SystemPalette, getGlobalTheme, defaultScale, defaultSystemPalette, };
@@ -0,0 +1,8 @@
1
+ declare const scale: {
2
+ borderWidth: number;
3
+ space: number;
4
+ font: string;
5
+ fontSize: number;
6
+ };
7
+ declare type Scale = typeof scale;
8
+ export { scale, Scale };
@@ -1,12 +1,13 @@
1
- declare const space: {
2
- xxsmall: number;
3
- xsmall: number;
4
- small: number;
5
- medium: number;
1
+ interface Space {
6
2
  large: number;
3
+ medium: number;
4
+ small: number;
7
5
  xlarge: number;
6
+ xsmall: number;
8
7
  xxlarge: number;
8
+ xxsmall: number;
9
9
  xxxlarge: number;
10
10
  xxxxlarge: number;
11
- };
12
- export { space };
11
+ }
12
+ declare const getSpace: (baseSpace: number) => Space;
13
+ export { Space, getSpace };