@hero-design/rn 7.25.1 → 7.27.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 +9 -9
- package/assets/fonts/BeVietnamPro-Bold.ttf +0 -0
- package/assets/fonts/{be-vietnam-pro-light.ttf → BeVietnamPro-Light.ttf} +0 -0
- package/assets/fonts/{be-vietnam-pro-regular.ttf → BeVietnamPro-Regular.ttf} +0 -0
- package/assets/fonts/{be-vietnam-pro-semibold.ttf → BeVietnamPro-SemiBold.ttf} +0 -0
- package/assets/fonts/RebondGrotesque-Light.otf +0 -0
- package/assets/fonts/RebondGrotesque-Regular.otf +0 -0
- package/assets/fonts/RebondGrotesque-SemiBold.otf +0 -0
- package/assets/fonts/hero-icons-mobile.ttf +0 -0
- package/es/index.js +9212 -12310
- package/jest.config.js +6 -2
- package/lib/assets/fonts/hero-icons-mobile.ttf +0 -0
- package/lib/index.js +9212 -12309
- package/package.json +4 -4
- package/src/components/Accordion/__tests__/__snapshots__/AccordionItem.spec.tsx.snap +8 -0
- package/src/components/Accordion/__tests__/__snapshots__/index.spec.tsx.snap +12 -0
- package/src/components/Accordion/index.tsx +1 -1
- package/src/components/Alert/__tests__/__snapshots__/index.spec.tsx.snap +11 -0
- package/src/components/Attachment/__tests__/__snapshots__/index.spec.tsx.snap +1 -0
- package/src/components/Avatar/{index.tsx → Avatar.tsx} +33 -18
- package/src/components/Avatar/AvatarStack/StyledAvatarStack.tsx +29 -0
- package/src/components/Avatar/AvatarStack/__tests__/StyledAvatarStack.spec.tsx +33 -0
- package/src/components/Avatar/AvatarStack/__tests__/__snapshots__/StyledAvatarStack.spec.tsx.snap +80 -0
- package/src/components/Avatar/AvatarStack/__tests__/__snapshots__/index.spec.tsx.snap +552 -0
- package/src/components/Avatar/AvatarStack/__tests__/index.spec.tsx +59 -0
- package/src/components/Avatar/AvatarStack/index.tsx +61 -0
- package/src/components/Avatar/AvatarStack/utils.ts +22 -0
- package/src/components/Avatar/StyledAvatar.tsx +6 -25
- package/src/components/Avatar/__tests__/StyledAvatar.spec.tsx +3 -19
- package/src/components/Avatar/__tests__/__snapshots__/StyledAvatar.spec.tsx.snap +3 -24
- package/src/components/Avatar/__tests__/__snapshots__/index.spec.tsx.snap +118 -20
- package/src/components/Avatar/__tests__/index.spec.tsx +25 -8
- package/src/components/Avatar/index.ts +6 -0
- package/src/components/Badge/__tests__/__snapshots__/Status.spec.tsx.snap +1 -0
- package/src/components/BottomNavigation/__tests__/__snapshots__/index.spec.tsx.snap +4 -0
- package/src/components/BottomSheet/__tests__/__snapshots__/index.spec.tsx.snap +2 -0
- package/src/components/Button/UtilityButton/__tests__/__snapshots__/index.spec.tsx.snap +2 -0
- package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +11 -0
- package/src/components/Calendar/__tests__/__snapshots__/CalendarRowItem.spec.tsx.snap +5 -0
- package/src/components/Card/DataCard/__tests__/__snapshots__/StyledDataCard.spec.tsx.snap +1 -1
- package/src/components/Card/DataCard/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
- package/src/components/Card/__tests__/__snapshots__/index.spec.tsx.snap +4 -0
- package/src/components/Card/index.tsx +18 -7
- package/src/components/Checkbox/__tests__/__snapshots__/index.spec.tsx.snap +4 -0
- package/src/components/ContentNavigator/__tests__/__snapshots__/StyledContentNavigator.spec.tsx.snap +1 -0
- package/src/components/ContentNavigator/__tests__/__snapshots__/index.spec.tsx.snap +2 -0
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +1 -0
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +3 -0
- package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +12 -0
- package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +1 -0
- package/src/components/Icon/HeroIcon/glyphMap.json +1 -1
- package/src/components/Icon/IconList.ts +11 -0
- package/src/components/List/__tests__/__snapshots__/BasicListItem.spec.tsx.snap +4 -0
- package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +54 -31
- package/src/components/List/__tests__/__snapshots__/StyledBasicListItem.spec.tsx.snap +4 -0
- package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +5 -1
- package/src/components/Progress/ProgressBar.tsx +19 -2
- package/src/components/Progress/ProgressCircle.tsx +30 -9
- package/src/components/Progress/StyledProgressBar.tsx +14 -7
- package/src/components/Progress/StyledProgressCircle.tsx +35 -24
- package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +337 -30
- package/src/components/Progress/__tests__/index.spec.js +15 -0
- package/src/components/Progress/constants.ts +16 -0
- package/src/components/Progress/types.ts +7 -1
- package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +2 -0
- package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +3 -0
- package/src/components/RichTextEditor/RichTextEditor.tsx +1 -1
- package/src/components/RichTextEditor/__mocks__/heroEditorApp.ts +2 -0
- package/src/components/RichTextEditor/__tests__/RichTextEditor.spec.tsx +36 -25
- package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +8 -4
- package/src/components/RichTextEditor/heroEditorApp.ts +3 -0
- package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +4 -0
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/Option.spec.tsx.snap +1 -0
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +20 -0
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +51 -0
- package/src/components/Select/MultiSelect/__tests__/index.spec.tsx +22 -0
- package/src/components/Select/MultiSelect/index.tsx +40 -15
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/Option.spec.tsx.snap +1 -0
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +20 -0
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +46 -0
- package/src/components/Select/SingleSelect/index.tsx +5 -2
- package/src/components/Select/__tests__/__snapshots__/StyledSelect.spec.tsx.snap +1 -0
- package/src/components/Select/types.ts +15 -6
- package/src/components/Swipeable/__tests__/__snapshots__/SwipeableAction.spec.tsx.snap +3 -0
- package/src/components/Swipeable/__tests__/__snapshots__/index.spec.tsx.snap +1 -0
- package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/Option.spec.tsx.snap +1 -0
- package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/index.spec.tsx.snap +1 -0
- package/src/components/Tabs/ScrollableTabs.tsx +2 -0
- package/src/components/Tabs/__tests__/ScrollableTabs.spec.tsx +1 -1
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +2 -0
- package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +5 -0
- package/src/components/Tabs/__tests__/index.spec.tsx +1 -1
- package/src/components/Tabs/index.tsx +7 -0
- package/src/components/Tag/StyledTag.tsx +42 -11
- package/src/components/Tag/__tests__/Tag.spec.tsx +28 -0
- package/src/components/Tag/__tests__/__snapshots__/Tag.spec.tsx.snap +135 -0
- package/src/components/Tag/index.tsx +15 -3
- package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +22 -0
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +31 -0
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +1 -0
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +3 -0
- package/src/components/Toast/__tests__/__snapshots__/Toast.spec.tsx.snap +13 -0
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarGroup.spec.tsx.snap +6 -0
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarItem.spec.tsx.snap +6 -0
- package/src/components/Typography/Text/StyledText.tsx +6 -2
- package/src/components/Typography/Text/__tests__/StyledText.spec.tsx +22 -0
- package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +63 -0
- package/src/components/Typography/Text/index.tsx +8 -0
- package/src/index.ts +2 -1
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +86 -22
- package/src/theme/components/avatar.ts +29 -5
- package/src/theme/components/badge.ts +1 -1
- package/src/theme/components/button.ts +2 -2
- package/src/theme/components/empty.ts +2 -2
- package/src/theme/components/fab.ts +3 -3
- package/src/theme/components/pinInput.ts +2 -2
- package/src/theme/components/progress.ts +37 -9
- package/src/theme/components/tag.ts +2 -1
- package/src/theme/components/toolbar.ts +1 -1
- package/src/theme/components/typography.ts +1 -7
- package/src/theme/global/colors/global.ts +12 -3
- package/src/theme/global/colors/types.ts +5 -0
- package/src/theme/global/scale.ts +6 -2
- package/src/theme/global/typography.ts +23 -5
- package/src/utils/hooks.ts +18 -1
- package/types/components/Avatar/Avatar.d.ts +33 -0
- package/types/components/Avatar/AvatarStack/StyledAvatarStack.d.ts +17 -0
- package/types/components/Avatar/AvatarStack/index.d.ts +23 -0
- package/types/components/Avatar/AvatarStack/utils.d.ts +4 -0
- package/types/components/Avatar/StyledAvatar.d.ts +2 -12
- package/types/components/Avatar/index.d.ts +6 -25
- package/types/components/Card/index.d.ts +1 -1
- package/types/components/Icon/IconList.d.ts +1 -1
- package/types/components/Icon/index.d.ts +1 -1
- package/types/components/Icon/utils.d.ts +1 -1
- package/types/components/Progress/ProgressBar.d.ts +1 -1
- package/types/components/Progress/ProgressCircle.d.ts +4 -2
- package/types/components/Progress/StyledProgressBar.d.ts +2 -0
- package/types/components/Progress/StyledProgressCircle.d.ts +2 -0
- package/types/components/Progress/constants.d.ts +15 -0
- package/types/components/Progress/index.d.ts +1 -1
- package/types/components/Progress/types.d.ts +1 -1
- package/types/components/RichTextEditor/__mocks__/heroEditorApp.d.ts +2 -0
- package/types/components/RichTextEditor/heroEditorApp.d.ts +2 -0
- package/types/components/Select/MultiSelect/index.d.ts +5 -2
- package/types/components/Select/SingleSelect/index.d.ts +1 -1
- package/types/components/Select/index.d.ts +1 -1
- package/types/components/Select/types.d.ts +15 -3
- package/types/components/Tabs/ScrollableTabs.d.ts +1 -1
- package/types/components/Tabs/index.d.ts +7 -2
- package/types/components/Tag/StyledTag.d.ts +3 -0
- package/types/components/Tag/index.d.ts +7 -2
- package/types/components/Typography/Text/StyledText.d.ts +1 -0
- package/types/components/Typography/Text/index.d.ts +7 -1
- package/types/index.d.ts +2 -2
- package/types/theme/components/avatar.d.ts +4 -2
- package/types/theme/components/progress.d.ts +30 -9
- package/types/theme/components/tag.d.ts +1 -0
- package/types/theme/components/typography.d.ts +1 -5
- package/types/theme/global/colors/types.d.ts +5 -0
- package/types/theme/global/index.d.ts +5 -0
- package/types/theme/global/scale.d.ts +4 -1
- package/types/theme/global/typography.d.ts +9 -2
- package/types/utils/hooks.d.ts +2 -0
- package/src/components/Accordion/utils.tsx +0 -11
- package/types/components/Accordion/utils.d.ts +0 -1
|
@@ -45,12 +45,17 @@ export interface TabsProps extends ViewProps {
|
|
|
45
45
|
* Defaults value is `1`.
|
|
46
46
|
*/
|
|
47
47
|
lazyPreloadDistance?: number;
|
|
48
|
+
/**
|
|
49
|
+
* Boolean indicating whether to enable swipe gestures. Passing `false` will disable swipe gestures, but the user can still switch tabs by pressing the tab bar.
|
|
50
|
+
* Defaults value is `true`.
|
|
51
|
+
*/
|
|
52
|
+
swipeEnabled?: boolean;
|
|
48
53
|
/**
|
|
49
54
|
* Testing id of the component.
|
|
50
55
|
*/
|
|
51
56
|
testID?: string;
|
|
52
57
|
}
|
|
53
|
-
declare const _default: (({ onTabPress, selectedTabKey, tabs, containerStyle, barStyle, lazy, lazyPreloadDistance, testID: componentTestID, }: TabsProps) => JSX.Element) & {
|
|
54
|
-
Scroll: ({ onTabPress, selectedTabKey, tabs, containerStyle, barStyle, lazy, lazyPreloadDistance, testID: componentTestID, }: TabsProps) => JSX.Element;
|
|
58
|
+
declare const _default: (({ onTabPress, selectedTabKey, tabs, containerStyle, barStyle, lazy, lazyPreloadDistance, swipeEnabled, testID: componentTestID, }: TabsProps) => JSX.Element) & {
|
|
59
|
+
Scroll: ({ onTabPress, selectedTabKey, tabs, containerStyle, barStyle, lazy, lazyPreloadDistance, swipeEnabled, testID: componentTestID, }: TabsProps) => JSX.Element;
|
|
55
60
|
};
|
|
56
61
|
export default _default;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { View, Text } from 'react-native';
|
|
2
2
|
declare type ThemeIntent = 'default' | 'primary' | 'info' | 'success' | 'warning' | 'danger' | 'archived';
|
|
3
|
+
declare type ThemeVariant = 'filled' | 'outlined';
|
|
3
4
|
declare const StyledView: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
4
5
|
theme?: import("@emotion/react").Theme | undefined;
|
|
5
6
|
as?: import("react").ElementType<any> | undefined;
|
|
6
7
|
} & {
|
|
7
8
|
themeIntent: ThemeIntent;
|
|
9
|
+
themeVariant: ThemeVariant;
|
|
8
10
|
}, {}, {
|
|
9
11
|
ref?: import("react").Ref<View> | undefined;
|
|
10
12
|
}>;
|
|
@@ -13,6 +15,7 @@ declare const StyledText: import("@emotion/native").StyledComponent<import("reac
|
|
|
13
15
|
as?: import("react").ElementType<any> | undefined;
|
|
14
16
|
} & {
|
|
15
17
|
themeIntent: ThemeIntent;
|
|
18
|
+
themeVariant: ThemeVariant;
|
|
16
19
|
}, {}, {
|
|
17
20
|
ref?: import("react").Ref<Text> | undefined;
|
|
18
21
|
}>;
|
|
@@ -1,13 +1,18 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
1
2
|
import type { StyleProp, ViewStyle, ViewProps } from 'react-native';
|
|
2
3
|
interface TagProps extends ViewProps {
|
|
3
4
|
/**
|
|
4
5
|
* Content of the Tag.
|
|
5
6
|
*/
|
|
6
|
-
content: string;
|
|
7
|
+
content: string | ReactElement;
|
|
7
8
|
/**
|
|
8
9
|
* Visual intent color to apply to Tag.
|
|
9
10
|
*/
|
|
10
11
|
intent?: 'primary' | 'default' | 'info' | 'success' | 'warning' | 'danger' | 'archived';
|
|
12
|
+
/**
|
|
13
|
+
* Tag variant.
|
|
14
|
+
*/
|
|
15
|
+
variant?: 'filled' | 'outlined';
|
|
11
16
|
/**
|
|
12
17
|
* Additional style.
|
|
13
18
|
*/
|
|
@@ -17,5 +22,5 @@ interface TagProps extends ViewProps {
|
|
|
17
22
|
*/
|
|
18
23
|
testID?: string;
|
|
19
24
|
}
|
|
20
|
-
declare const Tag: ({ content, intent, style, testID, ...nativeProps }: TagProps) => JSX.Element;
|
|
25
|
+
declare const Tag: ({ content, variant, intent, style, testID, ...nativeProps }: TagProps) => JSX.Element;
|
|
21
26
|
export default Tag;
|
|
@@ -6,6 +6,7 @@ declare const StyledText: import("@emotion/native").StyledComponent<import("reac
|
|
|
6
6
|
themeFontSize: 'small' | 'medium' | 'large' | 'xlarge' | 'xxxlarge' | 'xxxxxlarge';
|
|
7
7
|
themeFontWeight: 'light' | 'regular' | 'semi-bold';
|
|
8
8
|
themeIntent: 'body' | 'subdued' | 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'danger' | 'inverted';
|
|
9
|
+
themeTypeface: 'neutral' | 'playful';
|
|
9
10
|
}, {}, {
|
|
10
11
|
ref?: import("react").Ref<Text> | undefined;
|
|
11
12
|
}>;
|
|
@@ -25,6 +25,12 @@ export interface TextProps extends NativeTextProps {
|
|
|
25
25
|
* Testing id of the component.
|
|
26
26
|
*/
|
|
27
27
|
testID?: string;
|
|
28
|
+
/**
|
|
29
|
+
* The typeface to render the text in:
|
|
30
|
+
* - `neutral`: The default typeface for the platform.
|
|
31
|
+
* - `playful`: To visualise a playful content.
|
|
32
|
+
*/
|
|
33
|
+
typeface?: 'neutral' | 'playful';
|
|
28
34
|
}
|
|
29
|
-
declare const Text: ({ children, fontSize, fontWeight, intent, ...nativeProps }: TextProps) => JSX.Element;
|
|
35
|
+
declare const Text: ({ children, fontSize, fontWeight, intent, typeface, ...nativeProps }: TextProps) => JSX.Element;
|
|
30
36
|
export default Text;
|
package/types/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { scale } from './utils/scale';
|
|
|
3
3
|
import Accordion from './components/Accordion';
|
|
4
4
|
import Alert from './components/Alert';
|
|
5
5
|
import Attachment from './components/Attachment';
|
|
6
|
-
import Avatar from './components/Avatar';
|
|
6
|
+
import Avatar, { useAvatarColors } from './components/Avatar';
|
|
7
7
|
import Badge from './components/Badge';
|
|
8
8
|
import BottomNavigation from './components/BottomNavigation';
|
|
9
9
|
import BottomSheet from './components/BottomSheet';
|
|
@@ -40,5 +40,5 @@ import Toolbar from './components/Toolbar';
|
|
|
40
40
|
import Typography from './components/Typography';
|
|
41
41
|
import RefreshControl from './components/RefreshControl';
|
|
42
42
|
import RichTextEditor from './components/RichTextEditor';
|
|
43
|
-
export { theme, getTheme, useTheme, scale, ThemeProvider, ThemeSwitcher, swagSystemPalette, workSystemPalette, jobsSystemPalette, walletSystemPalette, eBensSystemPalette, Accordion, Alert, Attachment, Avatar, Badge, BottomNavigation, BottomSheet, Box, Button, Calendar, Card, Collapse, Checkbox, ContentNavigator, DatePicker, Divider, Drawer, Empty, FAB, Icon, Image, List, PinInput, Progress, Slider, Spinner, Swipeable, Radio, SectionHeading, Select, Switch, Tabs, Tag, TextInput, TimePicker, Toast, Toolbar, Typography, RefreshControl, RichTextEditor, };
|
|
43
|
+
export { theme, getTheme, useTheme, scale, ThemeProvider, ThemeSwitcher, swagSystemPalette, workSystemPalette, jobsSystemPalette, walletSystemPalette, eBensSystemPalette, Accordion, Alert, Attachment, Avatar, useAvatarColors, Badge, BottomNavigation, BottomSheet, Box, Button, Calendar, Card, Collapse, Checkbox, ContentNavigator, DatePicker, Divider, Drawer, Empty, FAB, Icon, Image, List, PinInput, Progress, Slider, Spinner, Swipeable, Radio, SectionHeading, Select, Switch, Tabs, Tag, TextInput, TimePicker, Toast, Toolbar, Typography, RefreshControl, RichTextEditor, };
|
|
44
44
|
export * from './types';
|
|
@@ -6,6 +6,8 @@ declare const getAvatarTheme: (theme: GlobalTheme) => {
|
|
|
6
6
|
danger: string;
|
|
7
7
|
success: string;
|
|
8
8
|
warning: string;
|
|
9
|
+
text: string;
|
|
10
|
+
visualisation: string[];
|
|
9
11
|
};
|
|
10
12
|
sizes: {
|
|
11
13
|
small: number;
|
|
@@ -20,8 +22,8 @@ declare const getAvatarTheme: (theme: GlobalTheme) => {
|
|
|
20
22
|
radii: {
|
|
21
23
|
rounded: number;
|
|
22
24
|
};
|
|
23
|
-
|
|
24
|
-
default:
|
|
25
|
+
fonts: {
|
|
26
|
+
default: string;
|
|
25
27
|
};
|
|
26
28
|
fontSizes: {
|
|
27
29
|
small: number;
|
|
@@ -1,17 +1,38 @@
|
|
|
1
1
|
import type { GlobalTheme } from '../global';
|
|
2
2
|
declare const getProgressTheme: (theme: GlobalTheme) => {
|
|
3
3
|
colors: {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
completeness: {
|
|
5
|
+
primary: string;
|
|
6
|
+
success: string;
|
|
7
|
+
warning: string;
|
|
8
|
+
danger: string;
|
|
9
|
+
info: string;
|
|
10
|
+
archived: string;
|
|
11
|
+
primaryInverted: string;
|
|
12
|
+
successInverted: string;
|
|
13
|
+
warningInverted: string;
|
|
14
|
+
dangerInverted: string;
|
|
15
|
+
infoInverted: string;
|
|
16
|
+
archivedInverted: string;
|
|
17
|
+
};
|
|
18
|
+
incompleteness: {
|
|
19
|
+
primary: string;
|
|
20
|
+
success: string;
|
|
21
|
+
warning: string;
|
|
22
|
+
danger: string;
|
|
23
|
+
info: string;
|
|
24
|
+
archived: string;
|
|
25
|
+
primaryInverted: string;
|
|
26
|
+
successInverted: string;
|
|
27
|
+
warningInverted: string;
|
|
28
|
+
dangerInverted: string;
|
|
29
|
+
infoInverted: string;
|
|
30
|
+
archivedInverted: string;
|
|
31
|
+
};
|
|
12
32
|
};
|
|
13
33
|
sizes: {
|
|
14
|
-
|
|
34
|
+
circleDiameter: number;
|
|
35
|
+
circleCompletenessHeight: number;
|
|
15
36
|
barHeight: number;
|
|
16
37
|
};
|
|
17
38
|
radii: {
|
|
@@ -11,11 +11,7 @@ declare const getTypographyTheme: (theme: GlobalTheme) => {
|
|
|
11
11
|
success: string;
|
|
12
12
|
inverted: string;
|
|
13
13
|
};
|
|
14
|
-
fonts:
|
|
15
|
-
light: string;
|
|
16
|
-
regular: string;
|
|
17
|
-
semiBold: string;
|
|
18
|
-
};
|
|
14
|
+
fonts: import("../global/typography").Fonts;
|
|
19
15
|
fontSizes: {
|
|
20
16
|
small: number;
|
|
21
17
|
medium: number;
|
|
@@ -12,18 +12,23 @@ export declare type GlobalSystemPalette = {
|
|
|
12
12
|
inactiveOutline: string;
|
|
13
13
|
disabledOutline: string;
|
|
14
14
|
error: string;
|
|
15
|
+
mutedError: string;
|
|
15
16
|
errorSurface: string;
|
|
16
17
|
onErrorSurface: string;
|
|
17
18
|
warning: string;
|
|
19
|
+
mutedWarning: string;
|
|
18
20
|
warningSurface: string;
|
|
19
21
|
onWarningSurface: string;
|
|
20
22
|
success: string;
|
|
23
|
+
mutedSuccess: string;
|
|
21
24
|
successSurface: string;
|
|
22
25
|
onSuccessSurface: string;
|
|
23
26
|
info: string;
|
|
27
|
+
mutedInfo: string;
|
|
24
28
|
infoSurface: string;
|
|
25
29
|
onInfoSurface: string;
|
|
26
30
|
archived: string;
|
|
31
|
+
mutedArchived: string;
|
|
27
32
|
archivedSurface: string;
|
|
28
33
|
onArchivedSurface: string;
|
|
29
34
|
};
|
|
@@ -68,18 +68,23 @@ declare const getGlobalTheme: (scale: Scale, systemPalette: SystemPalette) => {
|
|
|
68
68
|
inactiveOutline: string;
|
|
69
69
|
disabledOutline: string;
|
|
70
70
|
error: string;
|
|
71
|
+
mutedError: string;
|
|
71
72
|
errorSurface: string;
|
|
72
73
|
onErrorSurface: string;
|
|
73
74
|
warning: string;
|
|
75
|
+
mutedWarning: string;
|
|
74
76
|
warningSurface: string;
|
|
75
77
|
onWarningSurface: string;
|
|
76
78
|
success: string;
|
|
79
|
+
mutedSuccess: string;
|
|
77
80
|
successSurface: string;
|
|
78
81
|
onSuccessSurface: string;
|
|
79
82
|
info: string;
|
|
83
|
+
mutedInfo: string;
|
|
80
84
|
infoSurface: string;
|
|
81
85
|
onInfoSurface: string;
|
|
82
86
|
archived: string;
|
|
87
|
+
mutedArchived: string;
|
|
83
88
|
archivedSurface: string;
|
|
84
89
|
onArchivedSurface: string;
|
|
85
90
|
primary: string;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
interface
|
|
1
|
+
interface FontWeights {
|
|
2
2
|
light: string;
|
|
3
3
|
regular: string;
|
|
4
4
|
semiBold: string;
|
|
5
5
|
}
|
|
6
|
+
interface Fonts {
|
|
7
|
+
neutral: FontWeights;
|
|
8
|
+
playful: FontWeights;
|
|
9
|
+
}
|
|
6
10
|
interface FontSizes {
|
|
7
11
|
xxxxxlarge: number;
|
|
8
12
|
xxxxlarge: number;
|
|
@@ -15,7 +19,10 @@ interface FontSizes {
|
|
|
15
19
|
xsmall: number;
|
|
16
20
|
}
|
|
17
21
|
declare type LineHeights = FontSizes;
|
|
18
|
-
declare const getFonts: (
|
|
22
|
+
declare const getFonts: ({ neutral, playful, }: {
|
|
23
|
+
neutral: string;
|
|
24
|
+
playful: string;
|
|
25
|
+
}) => Fonts;
|
|
19
26
|
declare const getFontSizes: (baseFontSize: number) => FontSizes;
|
|
20
27
|
declare const getLineHeights: (fontSizes: FontSizes) => LineHeights;
|
|
21
28
|
export { getFonts, getFontSizes, getLineHeights };
|
package/types/utils/hooks.d.ts
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
1
|
export declare const usePrevious: <T>(value: T) => T | undefined;
|
|
2
|
+
export declare function usePropsOrInternalState<T>(initialState: T, state: T | undefined, setState: ((val: T) => void) | undefined): [T, (val: T) => void];
|
|
3
|
+
export declare const useDeprecation: (message: string, cond?: boolean) => void;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
export function usePropsOrInternalState<T>(
|
|
4
|
-
initialState: T,
|
|
5
|
-
state: T | undefined,
|
|
6
|
-
setState: ((val: T) => void) | undefined
|
|
7
|
-
): [T, (val: T) => void] {
|
|
8
|
-
const [internalState, setInternalState] = React.useState<T>(initialState);
|
|
9
|
-
|
|
10
|
-
return [state || internalState, setState || setInternalState];
|
|
11
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function usePropsOrInternalState<T>(initialState: T, state: T | undefined, setState: ((val: T) => void) | undefined): [T, (val: T) => void];
|