@hero-design/rn 8.52.2-rc2.0 → 8.54.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/.eslintrc.js +0 -1
- package/.turbo/turbo-build.log +2 -2
- package/CHANGELOG.md +11 -13
- package/assets/fonts/hero-icons-mobile.ttf +0 -0
- package/es/index.js +1004 -705
- package/lib/assets/fonts/hero-icons-mobile.ttf +0 -0
- package/lib/index.js +1003 -703
- package/package.json +7 -7
- package/sonar-project.properties +9 -0
- package/src/components/Accordion/__tests__/__snapshots__/AccordionItem.spec.tsx.snap +4 -0
- package/src/components/Accordion/__tests__/__snapshots__/StyledAccordion.spec.tsx.snap +2 -0
- package/src/components/Accordion/__tests__/__snapshots__/index.spec.tsx.snap +3 -0
- package/src/components/Alert/__tests__/__snapshots__/index.spec.tsx.snap +7 -0
- package/src/components/Attachment/__tests__/__snapshots__/index.spec.tsx.snap +1 -0
- package/src/components/Avatar/AvatarStack/__tests__/__snapshots__/StyledAvatarStack.spec.tsx.snap +2 -0
- package/src/components/Avatar/AvatarStack/__tests__/__snapshots__/index.spec.tsx.snap +2 -0
- package/src/components/Avatar/__tests__/__snapshots__/StyledAvatar.spec.tsx.snap +3 -0
- package/src/components/Avatar/__tests__/__snapshots__/index.spec.tsx.snap +3 -0
- package/src/components/Badge/__tests__/__snapshots__/Badge.spec.tsx.snap +6 -0
- package/src/components/Badge/__tests__/__snapshots__/Status.spec.tsx.snap +2 -0
- package/src/components/BottomNavigation/StyledBottomNavigation.tsx +60 -0
- package/src/components/BottomNavigation/__tests__/__snapshots__/index.spec.tsx.snap +413 -0
- package/src/components/BottomNavigation/__tests__/index.spec.tsx +97 -0
- package/src/components/BottomNavigation/index.tsx +166 -0
- package/src/components/BottomSheet/__tests__/__snapshots__/index.spec.tsx.snap +21 -32
- package/src/components/BottomSheet/index.tsx +1 -1
- package/src/components/Box/__tests__/__snapshots__/index.spec.tsx.snap +21 -0
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/StyledLoadingIndicator.spec.tsx.snap +10 -0
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/index.spec.tsx.snap +10 -0
- package/src/components/Button/UtilityButton/__tests__/__snapshots__/index.spec.tsx.snap +2 -0
- package/src/components/Button/__tests__/__snapshots__/Button.spec.tsx.snap +16 -0
- package/src/components/Button/__tests__/__snapshots__/IconButton.spec.tsx.snap +1 -0
- package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +32 -0
- package/src/components/Calendar/__tests__/__snapshots__/CalendarRowItem.spec.tsx.snap +5 -0
- package/src/components/Card/DataCard/__tests__/__snapshots__/StyledDataCard.spec.tsx.snap +7 -0
- package/src/components/Card/DataCard/__tests__/__snapshots__/index.spec.tsx.snap +5 -0
- package/src/components/Card/__tests__/__snapshots__/StyledCard.spec.tsx.snap +1 -0
- package/src/components/Card/__tests__/__snapshots__/index.spec.tsx.snap +6 -0
- package/src/components/Carousel/__tests__/__snapshots__/CardCarousel.spec.tsx.snap +2 -0
- package/src/components/Carousel/__tests__/__snapshots__/StyledCardCarousel.spec.tsx.snap +4 -0
- package/src/components/Carousel/__tests__/__snapshots__/StyledCarousel.spec.tsx.snap +1 -0
- package/src/components/Carousel/__tests__/__snapshots__/index.spec.tsx.snap +803 -1
- package/src/components/Carousel/__tests__/index.spec.tsx +47 -37
- package/src/components/Checkbox/__tests__/__snapshots__/StyledCheckbox.spec.tsx.snap +8 -0
- package/src/components/Checkbox/__tests__/__snapshots__/index.spec.tsx.snap +6 -0
- package/src/components/Checkbox/index.tsx +13 -1
- package/src/components/Chip/__tests__/__snapshots__/index.spec.tsx.snap +12 -0
- package/src/components/Collapse/__tests__/__snapshots__/StyledCollapse.spec.tsx.snap +2 -0
- package/src/components/Collapse/__tests__/__snapshots__/index.spec.tsx.snap +2 -0
- package/src/components/ContentNavigator/__tests__/__snapshots__/StyledContentNavigator.spec.tsx.snap +1 -0
- package/src/components/ContentNavigator/__tests__/__snapshots__/index.spec.tsx.snap +3 -0
- package/src/components/DatePicker/__tests__/__snapshots__/DatePicker.spec.tsx.snap +15 -0
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +1 -0
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerCalendar.spec.tsx.snap +1 -0
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +329 -309
- package/src/components/Divider/__tests__/__snapshots__/StyledDivider.spec.tsx.snap +12 -0
- package/src/components/Drawer/DragableDrawer/__tests__/__snapshots__/index.spec.tsx.snap +1 -0
- package/src/components/Drawer/DragableDrawer/index.tsx +2 -2
- package/src/components/Drawer/__tests__/__snapshots__/index.spec.tsx.snap +3 -0
- package/src/components/Empty/__tests__/__snapshots__/index.spec.tsx.snap +2 -0
- package/src/components/Error/__tests__/__snapshots__/index.spec.tsx.snap +4 -0
- package/src/components/Error/index.tsx +20 -3
- package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +2 -0
- package/src/components/FAB/ActionGroup/index.tsx +14 -1
- package/src/components/FAB/__tests__/__snapshots__/AnimatedFABIcon.spec.tsx.snap +2 -0
- package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +3 -0
- package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +3 -0
- package/src/components/HeroDesignProvider/__tests__/__snapshots__/index.spec.tsx.snap +2 -0
- package/src/components/Icon/HeroIcon/glyphMap.json +1 -1
- package/src/components/Icon/IconList.ts +9 -0
- package/src/components/Icon/__tests__/__snapshots__/index.spec.tsx.snap +4 -0
- package/src/components/Image/__tests__/__snapshots__/index.spec.tsx.snap +4 -0
- package/src/components/List/__tests__/__snapshots__/BasicListItem.spec.tsx.snap +2 -0
- package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +4 -0
- package/src/components/List/__tests__/__snapshots__/StyledBasicListItem.spec.tsx.snap +4 -0
- package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +9 -0
- package/src/components/Modal/__tests__/__snapshots__/index.spec.tsx.snap +2 -0
- package/src/components/PageControl/__tests__/__snapshots__/index.spec.tsx.snap +1 -0
- package/src/components/PinInput/__tests__/__snapshots__/PinCell.spec.tsx.snap +5 -0
- package/src/components/PinInput/__tests__/__snapshots__/index.spec.tsx.snap +4 -0
- package/src/components/Portal/__tests__/__snapshots__/index.spec.tsx.snap +1 -0
- package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +5 -0
- package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +2 -0
- package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +1 -0
- package/src/components/Rate/__tests__/__snapshots__/index.spec.tsx.snap +3 -0
- package/src/components/RefreshControl/__tests__/__snapshots__/index.spec.tsx.snap +3 -0
- package/src/components/RichTextEditor/__tests__/__snapshots__/EditorToolbar.spec.tsx.snap +1 -0
- package/src/components/RichTextEditor/__tests__/__snapshots__/MentionList.spec.tsx.snap +1 -0
- package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +2 -0
- package/src/components/SectionHeading/__tests__/__snapshots__/StyledHeading.spec.tsx.snap +4 -0
- package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +6 -0
- package/src/components/SectionHeading/__tests__/index.spec.tsx +1 -0
- package/src/components/SectionHeading/index.tsx +57 -32
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/Option.spec.tsx.snap +1 -0
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +4 -0
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +42 -128
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/Option.spec.tsx.snap +1 -0
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +4 -0
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +35 -96
- package/src/components/Skeleton/__tests__/__snapshots__/index.spec.tsx.snap +7 -0
- package/src/components/Slider/__tests__/__snapshots__/index.spec.tsx.snap +3 -0
- package/src/components/Spinner/__tests__/__snapshots__/AnimatedSpinner.spec.tsx.snap +1 -0
- package/src/components/Spinner/__tests__/__snapshots__/StyledSpinner.spec.tsx.snap +24 -0
- package/src/components/Spinner/__tests__/__snapshots__/index.spec.tsx.snap +1 -0
- package/src/components/Success/__tests__/__snapshots__/index.spec.tsx.snap +4 -0
- 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 +4 -0
- package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/index.spec.tsx.snap +1 -0
- package/src/components/Switch/__tests__/__snapshots__/StyledSwitch.spec.tsx.snap +5 -0
- package/src/components/Switch/__tests__/__snapshots__/index.spec.tsx.snap +2 -0
- package/src/components/Tabs/__tests__/SceneView.spec.tsx +1 -1
- package/src/components/Tabs/__tests__/__snapshots__/SceneView.spec.tsx.snap +4 -0
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +3 -0
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabsHeader.spec.tsx.snap +1 -0
- package/src/components/Tabs/__tests__/__snapshots__/TabWithBadge.spec.tsx.snap +2 -0
- package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +3 -0
- package/src/components/Tag/__tests__/__snapshots__/Tag.spec.tsx.snap +10 -0
- package/src/components/Tag/index.tsx +12 -0
- package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +21 -0
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +17 -0
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +2 -0
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +330 -309
- package/src/components/Toast/StyledToast.tsx +9 -7
- package/src/components/Toast/Toast.tsx +4 -1
- package/src/components/Toast/ToastContainer.tsx +6 -2
- package/src/components/Toast/ToastContext.ts +5 -2
- package/src/components/Toast/ToastProvider.tsx +19 -2
- package/src/components/Toast/__tests__/ToastContainer.spec.tsx +15 -12
- package/src/components/Toast/__tests__/__snapshots__/Toast.spec.tsx.snap +7 -0
- package/src/components/Toast/__tests__/__snapshots__/ToastContainer.spec.tsx.snap +14 -6
- package/src/components/Toast/types.ts +5 -1
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarGroup.spec.tsx.snap +3 -0
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarItem.spec.tsx.snap +8 -0
- package/src/components/Typography/Body/__tests__/__snapshots__/StyledBody.tsx.snap +16 -0
- package/src/components/Typography/Body/__tests__/__snapshots__/index.spec.tsx.snap +19 -0
- package/src/components/Typography/Caption/__tests__/__snapshots__/StyledCaption.spec.tsx.snap +10 -0
- package/src/components/Typography/Caption/__tests__/__snapshots__/index.spec.tsx.snap +13 -0
- package/src/components/Typography/Label/__tests__/__snapshots__/StyledLabel.tsx.snap +8 -0
- package/src/components/Typography/Label/__tests__/__snapshots__/index.spec.tsx.snap +11 -0
- package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +20 -0
- package/src/components/Typography/Title/__tests__/__snapshots__/StyledTitle.tsx.snap +20 -0
- package/src/components/Typography/Title/__tests__/__snapshots__/index.spec.tsx.snap +23 -0
- package/src/index.ts +2 -0
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +102 -0
- package/src/theme/components/badge.ts +28 -1
- package/src/theme/components/bottomNavigation.ts +27 -0
- package/src/theme/components/button.ts +24 -0
- package/src/theme/components/carousel.ts +28 -1
- package/src/theme/components/empty.ts +23 -1
- package/src/theme/components/error.ts +32 -1
- package/src/theme/components/fab.ts +13 -2
- package/src/theme/components/pinInput.ts +32 -0
- package/src/theme/components/success.ts +23 -1
- package/src/theme/components/tag.ts +28 -1
- package/src/theme/components/textInput.ts +5 -0
- package/src/theme/getTheme.ts +21 -18
- package/src/types.ts +2 -0
- package/types/components/Accordion/AccordionItem.d.ts +1 -1
- package/types/components/Accordion/StyledAccordion.d.ts +1 -1
- package/types/components/Avatar/AvatarStack/StyledAvatarStack.d.ts +1 -1
- package/types/components/Avatar/StyledAvatar.d.ts +2 -2
- package/types/components/Badge/StyledBadge.d.ts +2 -2
- package/types/components/BottomNavigation/StyledBottomNavigation.d.ts +52 -0
- package/types/components/BottomNavigation/index.d.ts +45 -0
- package/types/components/BottomSheet/BottomSheetContext.d.ts +1 -1
- package/types/components/Box/config.d.ts +2 -2
- package/types/components/Box/types.d.ts +3 -3
- package/types/components/Button/LoadingIndicator/StyledLoadingIndicator.d.ts +1 -1
- package/types/components/Button/LoadingIndicator/index.d.ts +1 -1
- package/types/components/Button/StyledButton.d.ts +2 -2
- package/types/components/Carousel/CardCarousel.d.ts +1 -1
- package/types/components/Carousel/types.d.ts +2 -2
- package/types/components/Checkbox/StyledCheckbox.d.ts +1 -1
- package/types/components/Checkbox/index.d.ts +7 -2
- package/types/components/Chip/StyledChip.d.ts +1 -1
- package/types/components/Divider/StyledDivider.d.ts +1 -1
- package/types/components/Drawer/DragableDrawer/helpers.d.ts +1 -1
- package/types/components/Empty/StyledEmpty.d.ts +1 -1
- package/types/components/Error/StyledError.d.ts +1 -1
- package/types/components/Error/index.d.ts +9 -3
- package/types/components/FAB/ActionGroup/index.d.ts +6 -1
- package/types/components/FAB/AnimatedFABIcon.d.ts +1 -1
- package/types/components/FAB/FAB.d.ts +1 -1
- package/types/components/Icon/AnimatedIcon.d.ts +1 -1
- package/types/components/Icon/HeroIcon/index.d.ts +2 -2
- package/types/components/Icon/IconList.d.ts +1 -1
- package/types/components/Icon/index.d.ts +2 -2
- package/types/components/Icon/utils.d.ts +1 -1
- package/types/components/List/StyledListItem.d.ts +2 -2
- package/types/components/PinInput/StyledPinInput.d.ts +1 -1
- package/types/components/Portal/reducer.d.ts +1 -1
- package/types/components/Portal/types.d.ts +1 -1
- package/types/components/Progress/types.d.ts +1 -1
- package/types/components/Radio/types.d.ts +1 -1
- package/types/components/RefreshControl/index.d.ts +1 -1
- package/types/components/RichTextEditor/RichTextEditor.d.ts +1 -1
- package/types/components/RichTextEditor/types.d.ts +1 -1
- package/types/components/SectionHeading/StyledHeading.d.ts +1 -1
- package/types/components/SectionHeading/index.d.ts +11 -1
- package/types/components/Select/BaseOptionList.d.ts +1 -1
- package/types/components/Select/MultiSelect/OptionList.d.ts +1 -1
- package/types/components/Select/SingleSelect/OptionList.d.ts +1 -1
- package/types/components/Select/helpers.d.ts +1 -1
- package/types/components/Select/types.d.ts +6 -6
- package/types/components/Skeleton/StyledSkeleton.d.ts +2 -2
- package/types/components/Success/StyledSuccess.d.ts +1 -1
- package/types/components/Swipeable/StyledSwipeable.d.ts +1 -1
- package/types/components/Swipeable/index.d.ts +2 -2
- package/types/components/Switch/SelectorSwitch/index.d.ts +3 -3
- package/types/components/Switch/StyledSwitch.d.ts +1 -1
- package/types/components/Tabs/TabWithBadge.d.ts +3 -3
- package/types/components/Tabs/index.d.ts +2 -2
- package/types/components/Tag/StyledTag.d.ts +1 -1
- package/types/components/Tag/index.d.ts +6 -1
- package/types/components/TextInput/StyledTextInput.d.ts +2 -2
- package/types/components/TextInput/index.d.ts +1 -1
- package/types/components/Toast/StyledToast.d.ts +2 -0
- package/types/components/Toast/ToastContext.d.ts +3 -3
- package/types/components/Toast/ToastProvider.d.ts +2 -2
- package/types/components/Toast/index.d.ts +1 -1
- package/types/components/Toast/types.d.ts +7 -3
- package/types/components/Typography/Body/StyledBody.d.ts +1 -1
- package/types/components/Typography/Title/StyledTitle.d.ts +1 -1
- package/types/components/Typography/types.d.ts +1 -1
- package/types/index.d.ts +2 -1
- package/types/theme/ThemeSwitcher.d.ts +1 -1
- package/types/theme/components/badge.d.ts +24 -0
- package/types/theme/components/bottomNavigation.d.ts +23 -0
- package/types/theme/components/button.d.ts +20 -0
- package/types/theme/components/carousel.d.ts +24 -0
- package/types/theme/components/empty.d.ts +19 -0
- package/types/theme/components/error.d.ts +27 -0
- package/types/theme/components/fab.d.ts +19 -8
- package/types/theme/components/pinInput.d.ts +27 -0
- package/types/theme/components/success.d.ts +19 -0
- package/types/theme/components/tag.d.ts +24 -0
- package/types/theme/components/textInput.d.ts +5 -0
- package/types/theme/getTheme.d.ts +21 -19
- package/types/theme/global/colors/types.d.ts +3 -3
- package/types/theme/global/index.d.ts +1 -1
- package/types/theme/global/scale.d.ts +1 -1
- package/types/theme/global/shadows.d.ts +1 -1
- package/types/theme/global/typography.d.ts +1 -1
- package/types/types.d.ts +2 -1
|
@@ -5,6 +5,8 @@ import { IntentType } from './types';
|
|
|
5
5
|
declare const ToastContainerWrapper: import("@emotion/native").StyledComponent<ViewProps & {
|
|
6
6
|
theme?: import("@emotion/react").Theme | undefined;
|
|
7
7
|
as?: import("react").ElementType<any> | undefined;
|
|
8
|
+
} & {
|
|
9
|
+
position: 'top' | 'bottom';
|
|
8
10
|
}, {}, {
|
|
9
11
|
ref?: import("react").Ref<View> | undefined;
|
|
10
12
|
}>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { ToastContainerProps, ToastProps } from './types';
|
|
3
|
-
export type ToastControllerContextType = {
|
|
4
|
-
show: (props: ToastProps) => string;
|
|
3
|
+
export declare type ToastControllerContextType = {
|
|
4
|
+
show: (props: Omit<ToastProps, 'position'>) => string;
|
|
5
5
|
hide: (id: string) => void;
|
|
6
6
|
clearAll: () => void;
|
|
7
7
|
};
|
|
8
8
|
export declare const ToastContext: import("react").Context<ToastControllerContextType>;
|
|
9
|
-
export type ToastConfigContextType = Pick<ToastContainerProps, 'displayType'>;
|
|
9
|
+
export declare type ToastConfigContextType = Pick<ToastContainerProps, 'position' | 'displayType'>;
|
|
10
10
|
export declare const ToastConfigContext: import("react").Context<ToastConfigContextType>;
|
|
11
11
|
export declare const useToastConfig: () => ToastConfigContextType;
|
|
12
12
|
export declare const useToast: () => ToastControllerContextType;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
3
|
import type { ToastContainerProps } from './types';
|
|
4
|
-
type ToastProviderProps = {
|
|
4
|
+
declare type ToastProviderProps = {
|
|
5
5
|
/**
|
|
6
6
|
* Content to be wrapped.
|
|
7
7
|
*/
|
|
8
8
|
children?: ReactNode;
|
|
9
9
|
} & ToastContainerProps;
|
|
10
|
-
declare const ToastProvider: ({ children, displayType, }: ToastProviderProps) => React.JSX.Element;
|
|
10
|
+
declare const ToastProvider: ({ children, displayType, position: _position, }: ToastProviderProps) => React.JSX.Element;
|
|
11
11
|
export default ToastProvider;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
declare const Toast: {
|
|
3
|
-
Provider: ({ children, displayType, }: {
|
|
3
|
+
Provider: ({ children, displayType, position: _position, }: {
|
|
4
4
|
children?: import("react").ReactNode;
|
|
5
5
|
} & import("./types").ToastContainerProps) => import("react").JSX.Element;
|
|
6
6
|
Container: import("react").ForwardRefExoticComponent<import("./types").ToastContainerProps & import("react").RefAttributes<import("./ToastContext").ToastControllerContextType>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
2
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
3
|
import type { IconName } from '../Icon';
|
|
4
|
-
export type IntentType = 'success' | 'info' | 'warning' | 'error' | 'notification' | 'snackbar';
|
|
4
|
+
export declare type IntentType = 'success' | 'info' | 'warning' | 'error' | 'notification' | 'snackbar';
|
|
5
5
|
export interface ToastProps {
|
|
6
6
|
/**
|
|
7
7
|
* Toast content.
|
|
@@ -57,12 +57,16 @@ export interface ToastContainerProps {
|
|
|
57
57
|
* Displays multiple toasts at a time or one by one.
|
|
58
58
|
*/
|
|
59
59
|
displayType?: 'single' | 'stack';
|
|
60
|
+
/**
|
|
61
|
+
* Position that the toast message will appear on the screen.
|
|
62
|
+
*/
|
|
63
|
+
position?: 'top' | 'bottom';
|
|
60
64
|
/**
|
|
61
65
|
* Additional style for toasts container.
|
|
62
66
|
*/
|
|
63
67
|
style?: StyleProp<ViewStyle>;
|
|
64
68
|
}
|
|
65
|
-
export type ToastItemProps = {
|
|
69
|
+
export declare type ToastItemProps = {
|
|
66
70
|
id: string;
|
|
67
|
-
props: ToastProps
|
|
71
|
+
props: Omit<ToastProps, 'position'>;
|
|
68
72
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Text } from 'react-native';
|
|
3
3
|
import { ThemeIntent } from '../types';
|
|
4
|
-
type ThemeVariant = 'small' | 'small-bold' | 'regular' | 'regular-bold';
|
|
4
|
+
declare type ThemeVariant = 'small' | 'small-bold' | 'regular' | 'regular-bold';
|
|
5
5
|
declare const StyledBody: import("@emotion/native").StyledComponent<import("react-native").TextProps & {
|
|
6
6
|
theme?: import("@emotion/react").Theme | undefined;
|
|
7
7
|
as?: import("react").ElementType<any> | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Text } from 'react-native';
|
|
3
3
|
import { ThemeIntent } from '../types';
|
|
4
|
-
type ThemeLevel = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
4
|
+
declare type ThemeLevel = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
5
5
|
declare const StyledTitle: import("@emotion/native").StyledComponent<import("react-native").TextProps & {
|
|
6
6
|
theme?: import("@emotion/react").Theme | undefined;
|
|
7
7
|
as?: import("react").ElementType<any> | undefined;
|
|
@@ -3,4 +3,4 @@ export declare const FONTWEIGHT_MAP: {
|
|
|
3
3
|
readonly regular: "regular";
|
|
4
4
|
readonly 'semi-bold': "semiBold";
|
|
5
5
|
};
|
|
6
|
-
export type ThemeIntent = 'body' | 'subdued' | 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'danger' | 'inverted' | 'archived' | 'disabled';
|
|
6
|
+
export declare type ThemeIntent = 'body' | 'subdued' | 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'danger' | 'inverted' | 'archived' | 'disabled';
|
package/types/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import Alert from './components/Alert';
|
|
|
5
5
|
import Attachment from './components/Attachment';
|
|
6
6
|
import Avatar, { useAvatarColors } from './components/Avatar';
|
|
7
7
|
import Badge from './components/Badge';
|
|
8
|
+
import BottomNavigation from './components/BottomNavigation';
|
|
8
9
|
import BottomSheet from './components/BottomSheet';
|
|
9
10
|
import Box from './components/Box';
|
|
10
11
|
import Button from './components/Button';
|
|
@@ -48,5 +49,5 @@ import RefreshControl from './components/RefreshControl';
|
|
|
48
49
|
import RichTextEditor from './components/RichTextEditor';
|
|
49
50
|
import PageControl from './components/PageControl';
|
|
50
51
|
import Portal from './components/Portal';
|
|
51
|
-
export { theme, getTheme, useTheme, scale, ThemeProvider, ThemeSwitcher, withTheme, swagSystemPalette, swagDarkSystemPalette, workSystemPalette, jobsSystemPalette, walletSystemPalette, eBensSystemPalette, Accordion, Alert, Attachment, Avatar, useAvatarColors, Badge, BottomSheet, Box, Button, Calendar, Card, Carousel, Chip, Collapse, Checkbox, ContentNavigator, DatePicker, Divider, Drawer, Empty, Error, FAB, Icon, Image, HeroDesignProvider, List, PinInput, Progress, Portal, PageControl, Skeleton, Slider, Spinner, Swipeable, Radio, SectionHeading, Select, Success, Switch, Tabs, Tag, TextInput, TimePicker, Toast, Toolbar, Typography, Rate, RefreshControl, RichTextEditor, };
|
|
52
|
+
export { theme, getTheme, useTheme, scale, ThemeProvider, ThemeSwitcher, withTheme, swagSystemPalette, swagDarkSystemPalette, workSystemPalette, jobsSystemPalette, walletSystemPalette, eBensSystemPalette, Accordion, Alert, Attachment, Avatar, useAvatarColors, Badge, BottomNavigation, BottomSheet, Box, Button, Calendar, Card, Carousel, Chip, Collapse, Checkbox, ContentNavigator, DatePicker, Divider, Drawer, Empty, Error, FAB, Icon, Image, HeroDesignProvider, List, PinInput, Progress, Portal, PageControl, Skeleton, Slider, Spinner, Swipeable, Radio, SectionHeading, Select, Success, Switch, Tabs, Tag, TextInput, TimePicker, Toast, Toolbar, Typography, Rate, RefreshControl, RichTextEditor, };
|
|
52
53
|
export * from './types';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { PropsWithChildren } from 'react';
|
|
2
|
-
type ThemeName = 'swag' | 'swagDark' | 'work' | 'jobs' | 'wallet' | 'eBens';
|
|
2
|
+
declare type ThemeName = 'swag' | 'swagDark' | 'work' | 'jobs' | 'wallet' | 'eBens';
|
|
3
3
|
declare const ThemeSwitcher: ({ name, children, }: {
|
|
4
4
|
name?: ThemeName | undefined;
|
|
5
5
|
children: React.ReactNode;
|
|
@@ -9,6 +9,12 @@ declare const getBadgeTheme: (theme: GlobalTheme) => {
|
|
|
9
9
|
archived: string;
|
|
10
10
|
text: string;
|
|
11
11
|
};
|
|
12
|
+
fonts: {
|
|
13
|
+
default: string;
|
|
14
|
+
};
|
|
15
|
+
fontSizes: {
|
|
16
|
+
default: number;
|
|
17
|
+
};
|
|
12
18
|
sizes: {
|
|
13
19
|
height: number;
|
|
14
20
|
minWidth: number;
|
|
@@ -20,5 +26,23 @@ declare const getBadgeTheme: (theme: GlobalTheme) => {
|
|
|
20
26
|
statusPositionTop: number;
|
|
21
27
|
statusPositionRight: number;
|
|
22
28
|
};
|
|
29
|
+
lineHeights: {
|
|
30
|
+
default: number;
|
|
31
|
+
};
|
|
23
32
|
};
|
|
33
|
+
declare type GetBadgeThemeReturnType = ReturnType<typeof getBadgeTheme>;
|
|
34
|
+
export interface BadgeThemeType extends GetBadgeThemeReturnType {
|
|
35
|
+
/**
|
|
36
|
+
* @deprecated will be removed in v9
|
|
37
|
+
* */
|
|
38
|
+
fonts: GetBadgeThemeReturnType['fonts'];
|
|
39
|
+
/**
|
|
40
|
+
* @deprecated will be removed in v9
|
|
41
|
+
* */
|
|
42
|
+
fontSizes: GetBadgeThemeReturnType['fontSizes'];
|
|
43
|
+
/**
|
|
44
|
+
* @deprecated will be removed in v9
|
|
45
|
+
* */
|
|
46
|
+
lineHeights: GetBadgeThemeReturnType['lineHeights'];
|
|
47
|
+
}
|
|
24
48
|
export default getBadgeTheme;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { GlobalTheme } from '../global';
|
|
2
|
+
declare const getBottomNavigationTheme: (theme: GlobalTheme) => {
|
|
3
|
+
colors: {
|
|
4
|
+
shadow: string;
|
|
5
|
+
background: string;
|
|
6
|
+
};
|
|
7
|
+
shadows: {
|
|
8
|
+
offset: {
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
};
|
|
12
|
+
opacity: number;
|
|
13
|
+
radius: number;
|
|
14
|
+
elevation: number;
|
|
15
|
+
};
|
|
16
|
+
sizes: {
|
|
17
|
+
height: number;
|
|
18
|
+
};
|
|
19
|
+
space: {
|
|
20
|
+
titleMarginTop: number;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export default getBottomNavigationTheme;
|
|
@@ -6,6 +6,15 @@ declare const getButtonTheme: (theme: GlobalTheme) => {
|
|
|
6
6
|
borderWidth: {
|
|
7
7
|
default: number;
|
|
8
8
|
};
|
|
9
|
+
fonts: {
|
|
10
|
+
default: string;
|
|
11
|
+
utility: string;
|
|
12
|
+
};
|
|
13
|
+
fontSize: {
|
|
14
|
+
default: number;
|
|
15
|
+
utility: number;
|
|
16
|
+
textVariant: number;
|
|
17
|
+
};
|
|
9
18
|
sizes: {
|
|
10
19
|
iconSize: number;
|
|
11
20
|
};
|
|
@@ -44,4 +53,15 @@ declare const getButtonTheme: (theme: GlobalTheme) => {
|
|
|
44
53
|
utilityPadding: number;
|
|
45
54
|
};
|
|
46
55
|
};
|
|
56
|
+
declare type GetButtonThemeReturnType = ReturnType<typeof getButtonTheme>;
|
|
57
|
+
export interface ButtonThemeType extends GetButtonThemeReturnType {
|
|
58
|
+
/**
|
|
59
|
+
* @deprecated will be removed in v9
|
|
60
|
+
* */
|
|
61
|
+
fonts: GetButtonThemeReturnType['fonts'];
|
|
62
|
+
/**
|
|
63
|
+
* @deprecated will be removed in v9
|
|
64
|
+
* */
|
|
65
|
+
fontSize: GetButtonThemeReturnType['fontSize'];
|
|
66
|
+
}
|
|
47
67
|
export default getButtonTheme;
|
|
@@ -9,5 +9,29 @@ declare const getCarouselTheme: (theme: GlobalTheme) => {
|
|
|
9
9
|
pageControlPaddingVertical: number;
|
|
10
10
|
pageControlWrapperHeight: number;
|
|
11
11
|
};
|
|
12
|
+
fonts: {
|
|
13
|
+
heading: string;
|
|
14
|
+
};
|
|
15
|
+
fontSizes: {
|
|
16
|
+
heading: number;
|
|
17
|
+
};
|
|
18
|
+
lineHeights: {
|
|
19
|
+
heading: number;
|
|
20
|
+
};
|
|
12
21
|
};
|
|
22
|
+
declare type GetCarouselThemeReturnType = ReturnType<typeof getCarouselTheme>;
|
|
23
|
+
export interface CarouselThemeType extends GetCarouselThemeReturnType {
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated will be removed in v9
|
|
26
|
+
* */
|
|
27
|
+
fonts: GetCarouselThemeReturnType['fonts'];
|
|
28
|
+
/**
|
|
29
|
+
* @deprecated will be removed in v9
|
|
30
|
+
* */
|
|
31
|
+
fontSizes: GetCarouselThemeReturnType['fontSizes'];
|
|
32
|
+
/**
|
|
33
|
+
* @deprecated will be removed in v9
|
|
34
|
+
* */
|
|
35
|
+
lineHeights: GetCarouselThemeReturnType['lineHeights'];
|
|
36
|
+
}
|
|
13
37
|
export default getCarouselTheme;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { GlobalTheme } from '../global';
|
|
2
2
|
declare const getEmptyTheme: (theme: GlobalTheme) => {
|
|
3
|
+
fontSizes: {
|
|
4
|
+
title: number;
|
|
5
|
+
description: number;
|
|
6
|
+
};
|
|
3
7
|
colors: {
|
|
4
8
|
text: string;
|
|
5
9
|
invertedText: string;
|
|
@@ -14,5 +18,20 @@ declare const getEmptyTheme: (theme: GlobalTheme) => {
|
|
|
14
18
|
imageMargin: number;
|
|
15
19
|
wrapperPadding: number;
|
|
16
20
|
};
|
|
21
|
+
fonts: {
|
|
22
|
+
title: string;
|
|
23
|
+
description: string;
|
|
24
|
+
};
|
|
17
25
|
};
|
|
26
|
+
declare type GetEmptyThemeReturnType = ReturnType<typeof getEmptyTheme>;
|
|
27
|
+
export interface EmptyThemeType extends GetEmptyThemeReturnType {
|
|
28
|
+
/**
|
|
29
|
+
* @deprecated will be removed in v9
|
|
30
|
+
* */
|
|
31
|
+
fonts: GetEmptyThemeReturnType['fonts'];
|
|
32
|
+
/**
|
|
33
|
+
* @deprecated will be removed in v9
|
|
34
|
+
* */
|
|
35
|
+
fontSizes: GetEmptyThemeReturnType['fontSizes'];
|
|
36
|
+
}
|
|
18
37
|
export default getEmptyTheme;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { GlobalTheme } from '../global';
|
|
2
2
|
declare const getErrorTheme: (theme: GlobalTheme) => {
|
|
3
|
+
fontSizes: {
|
|
4
|
+
title: number;
|
|
5
|
+
description: number;
|
|
6
|
+
};
|
|
3
7
|
colors: {
|
|
4
8
|
title: string;
|
|
5
9
|
description: string;
|
|
@@ -20,5 +24,28 @@ declare const getErrorTheme: (theme: GlobalTheme) => {
|
|
|
20
24
|
padding: number;
|
|
21
25
|
};
|
|
22
26
|
};
|
|
27
|
+
fonts: {
|
|
28
|
+
title: string;
|
|
29
|
+
description: string;
|
|
30
|
+
};
|
|
31
|
+
lineHeight: {
|
|
32
|
+
title: number;
|
|
33
|
+
description: number;
|
|
34
|
+
};
|
|
23
35
|
};
|
|
36
|
+
declare type GetErrorThemeReturnType = ReturnType<typeof getErrorTheme>;
|
|
37
|
+
export interface ErrorThemeType extends GetErrorThemeReturnType {
|
|
38
|
+
/**
|
|
39
|
+
* @deprecated will be removed in v9
|
|
40
|
+
* */
|
|
41
|
+
fonts: GetErrorThemeReturnType['fonts'];
|
|
42
|
+
/**
|
|
43
|
+
* @deprecated will be removed in v9
|
|
44
|
+
* */
|
|
45
|
+
fontSizes: GetErrorThemeReturnType['fontSizes'];
|
|
46
|
+
/**
|
|
47
|
+
* @deprecated will be removed in v9
|
|
48
|
+
* */
|
|
49
|
+
lineHeight: GetErrorThemeReturnType['lineHeight'];
|
|
50
|
+
}
|
|
24
51
|
export default getErrorTheme;
|
|
@@ -3,6 +3,14 @@ declare const getFABTheme: (theme: GlobalTheme) => {
|
|
|
3
3
|
radii: {
|
|
4
4
|
actionItem: number;
|
|
5
5
|
};
|
|
6
|
+
fonts: {
|
|
7
|
+
actionItemText: string;
|
|
8
|
+
title: string;
|
|
9
|
+
};
|
|
10
|
+
fontSizes: {
|
|
11
|
+
actionItemText: number;
|
|
12
|
+
title: number;
|
|
13
|
+
};
|
|
6
14
|
colors: {
|
|
7
15
|
buttonBackground: string;
|
|
8
16
|
buttonPressedBackground: string;
|
|
@@ -20,14 +28,6 @@ declare const getFABTheme: (theme: GlobalTheme) => {
|
|
|
20
28
|
iconContainerWidth: number;
|
|
21
29
|
iconContainerHeight: number;
|
|
22
30
|
};
|
|
23
|
-
fonts: {
|
|
24
|
-
actionItemText: string;
|
|
25
|
-
title: string;
|
|
26
|
-
};
|
|
27
|
-
fontSizes: {
|
|
28
|
-
actionItemText: number;
|
|
29
|
-
title: number;
|
|
30
|
-
};
|
|
31
31
|
lineHeights: {
|
|
32
32
|
actionItemText: number;
|
|
33
33
|
title: number;
|
|
@@ -54,4 +54,15 @@ declare const getFABTheme: (theme: GlobalTheme) => {
|
|
|
54
54
|
titleMarginHorizontal: number;
|
|
55
55
|
};
|
|
56
56
|
};
|
|
57
|
+
declare type GetFABThemeReturnType = ReturnType<typeof getFABTheme>;
|
|
58
|
+
export interface FABThemeType extends GetFABThemeReturnType {
|
|
59
|
+
/**
|
|
60
|
+
* @deprecated will be removed in v9
|
|
61
|
+
* */
|
|
62
|
+
fonts: GetFABThemeReturnType['fonts'];
|
|
63
|
+
/**
|
|
64
|
+
* @deprecated will be removed in v9
|
|
65
|
+
* */
|
|
66
|
+
fontSizes: GetFABThemeReturnType['fontSizes'];
|
|
67
|
+
}
|
|
57
68
|
export default getFABTheme;
|
|
@@ -4,12 +4,24 @@ declare const getPinInputTheme: (theme: GlobalTheme) => {
|
|
|
4
4
|
default: number;
|
|
5
5
|
focused: number;
|
|
6
6
|
};
|
|
7
|
+
lineHeights: {
|
|
8
|
+
cellText: number;
|
|
9
|
+
errorMessage: number;
|
|
10
|
+
};
|
|
7
11
|
colors: {
|
|
8
12
|
default: string;
|
|
9
13
|
mask: string;
|
|
10
14
|
error: string;
|
|
11
15
|
disabled: string;
|
|
12
16
|
};
|
|
17
|
+
fonts: {
|
|
18
|
+
cellText: string;
|
|
19
|
+
errorMessage: string;
|
|
20
|
+
};
|
|
21
|
+
fontSizes: {
|
|
22
|
+
cellText: number;
|
|
23
|
+
errorMessage: number;
|
|
24
|
+
};
|
|
13
25
|
sizes: {
|
|
14
26
|
cellWidth: number;
|
|
15
27
|
cellHeight: number;
|
|
@@ -24,4 +36,19 @@ declare const getPinInputTheme: (theme: GlobalTheme) => {
|
|
|
24
36
|
mask: number;
|
|
25
37
|
};
|
|
26
38
|
};
|
|
39
|
+
declare type GetPinInputThemeReturnType = ReturnType<typeof getPinInputTheme>;
|
|
40
|
+
export interface PinInputThemeType extends GetPinInputThemeReturnType {
|
|
41
|
+
/**
|
|
42
|
+
* @deprecated will be removed in v9
|
|
43
|
+
* */
|
|
44
|
+
fonts: GetPinInputThemeReturnType['fonts'];
|
|
45
|
+
/**
|
|
46
|
+
* @deprecated will be removed in v9
|
|
47
|
+
* */
|
|
48
|
+
fontSizes: GetPinInputThemeReturnType['fontSizes'];
|
|
49
|
+
/**
|
|
50
|
+
* @deprecated will be removed in v9
|
|
51
|
+
* */
|
|
52
|
+
lineHeights: GetPinInputThemeReturnType['lineHeights'];
|
|
53
|
+
}
|
|
27
54
|
export default getPinInputTheme;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { GlobalTheme } from '../global';
|
|
2
2
|
declare const getSuccessTheme: (theme: GlobalTheme) => {
|
|
3
|
+
fontSizes: {
|
|
4
|
+
title: number;
|
|
5
|
+
description: number;
|
|
6
|
+
};
|
|
3
7
|
colors: {
|
|
4
8
|
title: string;
|
|
5
9
|
description: string;
|
|
@@ -20,5 +24,20 @@ declare const getSuccessTheme: (theme: GlobalTheme) => {
|
|
|
20
24
|
padding: number;
|
|
21
25
|
};
|
|
22
26
|
};
|
|
27
|
+
fonts: {
|
|
28
|
+
title: string;
|
|
29
|
+
description: string;
|
|
30
|
+
};
|
|
23
31
|
};
|
|
32
|
+
declare type GetSuccessThemeReturnType = ReturnType<typeof getSuccessTheme>;
|
|
33
|
+
export interface SuccessThemeType extends GetSuccessThemeReturnType {
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated will be removed in v9
|
|
36
|
+
* */
|
|
37
|
+
fonts: GetSuccessThemeReturnType['fonts'];
|
|
38
|
+
/**
|
|
39
|
+
* @deprecated will be removed in v9
|
|
40
|
+
* */
|
|
41
|
+
fontSizes: GetSuccessThemeReturnType['fontSizes'];
|
|
42
|
+
}
|
|
24
43
|
export default getSuccessTheme;
|
|
@@ -18,6 +18,12 @@ declare const getTagTheme: (theme: GlobalTheme) => {
|
|
|
18
18
|
archivedBackground: string;
|
|
19
19
|
text: string;
|
|
20
20
|
};
|
|
21
|
+
fonts: {
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
fontSizes: {
|
|
25
|
+
default: number;
|
|
26
|
+
};
|
|
21
27
|
space: {
|
|
22
28
|
horizontalPadding: number;
|
|
23
29
|
verticalPadding: number;
|
|
@@ -25,5 +31,23 @@ declare const getTagTheme: (theme: GlobalTheme) => {
|
|
|
25
31
|
radii: {
|
|
26
32
|
default: number;
|
|
27
33
|
};
|
|
34
|
+
lineHeights: {
|
|
35
|
+
default: number;
|
|
36
|
+
};
|
|
28
37
|
};
|
|
38
|
+
declare type GetTagThemeReturnType = ReturnType<typeof getTagTheme>;
|
|
39
|
+
export interface TagThemeType extends GetTagThemeReturnType {
|
|
40
|
+
/**
|
|
41
|
+
* @deprecated will be removed in v9
|
|
42
|
+
* */
|
|
43
|
+
fonts: GetTagThemeReturnType['fonts'];
|
|
44
|
+
/**
|
|
45
|
+
* @deprecated will be removed in v9
|
|
46
|
+
* */
|
|
47
|
+
fontSizes: GetTagThemeReturnType['fontSizes'];
|
|
48
|
+
/**
|
|
49
|
+
* @deprecated will be removed in v9
|
|
50
|
+
* */
|
|
51
|
+
lineHeights: GetTagThemeReturnType['lineHeights'];
|
|
52
|
+
}
|
|
29
53
|
export default getTagTheme;
|
|
@@ -60,6 +60,11 @@ declare const getTextInputTheme: (theme: GlobalTheme) => {
|
|
|
60
60
|
};
|
|
61
61
|
fontSizes: {
|
|
62
62
|
text: number;
|
|
63
|
+
labelInsideTextInput: number;
|
|
64
|
+
error: number;
|
|
65
|
+
maxLength: number;
|
|
66
|
+
asteriskLabel: number;
|
|
67
|
+
topLabel: number;
|
|
63
68
|
};
|
|
64
69
|
borderWidths: {
|
|
65
70
|
container: {
|
|
@@ -2,12 +2,13 @@ import getAccordionTheme from './components/accordion';
|
|
|
2
2
|
import getAlertTheme from './components/alert';
|
|
3
3
|
import getAttachmentTheme from './components/attachment';
|
|
4
4
|
import getAvatarTheme from './components/avatar';
|
|
5
|
-
import
|
|
5
|
+
import { BadgeThemeType } from './components/badge';
|
|
6
|
+
import getBottomNavigationTheme from './components/bottomNavigation';
|
|
6
7
|
import getBottomSheetTheme from './components/bottomSheet';
|
|
7
|
-
import
|
|
8
|
+
import { ButtonThemeType } from './components/button';
|
|
8
9
|
import getCalendarTheme from './components/calendar';
|
|
9
10
|
import getCardTheme from './components/card';
|
|
10
|
-
import
|
|
11
|
+
import { CarouselThemeType } from './components/carousel';
|
|
11
12
|
import getCardCarouselTheme from './components/cardCarousel';
|
|
12
13
|
import getCheckboxTheme from './components/checkbox';
|
|
13
14
|
import getChipTheme from './components/chip';
|
|
@@ -15,14 +16,14 @@ import getContentNavigatorTheme from './components/contentNavigator';
|
|
|
15
16
|
import getDatePickerTheme from './components/datePicker';
|
|
16
17
|
import getDividerTheme from './components/divider';
|
|
17
18
|
import getDrawerTheme from './components/drawer';
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
19
|
+
import { EmptyThemeType } from './components/empty';
|
|
20
|
+
import { ErrorThemeType } from './components/error';
|
|
21
|
+
import { FABThemeType } from './components/fab';
|
|
21
22
|
import getIconTheme from './components/icon';
|
|
22
23
|
import getImageTheme from './components/image';
|
|
23
24
|
import getListTheme from './components/list';
|
|
24
25
|
import getPageControlTheme from './components/pageControl';
|
|
25
|
-
import
|
|
26
|
+
import { PinInputThemeType } from './components/pinInput';
|
|
26
27
|
import getProgressTheme from './components/progress';
|
|
27
28
|
import getRadioTheme from './components/radio';
|
|
28
29
|
import getRateTheme from './components/rate';
|
|
@@ -33,29 +34,30 @@ import getSelectTheme from './components/select';
|
|
|
33
34
|
import getSkeletonTheme from './components/skeleton';
|
|
34
35
|
import getSliderTheme from './components/slider';
|
|
35
36
|
import getSpinnerTheme from './components/spinner';
|
|
36
|
-
import
|
|
37
|
+
import { SuccessThemeType } from './components/success';
|
|
37
38
|
import getSwipeableTheme from './components/swipeable';
|
|
38
39
|
import getSwitchTheme from './components/switch';
|
|
39
40
|
import getTabsTheme from './components/tabs';
|
|
40
|
-
import
|
|
41
|
+
import { TagThemeType } from './components/tag';
|
|
41
42
|
import getTextInputTheme from './components/textInput';
|
|
42
43
|
import getTimePickerTheme from './components/timePicker';
|
|
43
44
|
import getToastTheme from './components/toast';
|
|
44
45
|
import getToolbarTheme from './components/toolbar';
|
|
45
46
|
import getTypographyTheme from './components/typography';
|
|
46
47
|
import type { GlobalTheme, Scale, SystemPalette } from './global';
|
|
47
|
-
type Theme = GlobalTheme & {
|
|
48
|
+
declare type Theme = GlobalTheme & {
|
|
48
49
|
__hd__: {
|
|
49
50
|
accordion: ReturnType<typeof getAccordionTheme>;
|
|
50
51
|
alert: ReturnType<typeof getAlertTheme>;
|
|
51
52
|
attachment: ReturnType<typeof getAttachmentTheme>;
|
|
52
53
|
avatar: ReturnType<typeof getAvatarTheme>;
|
|
53
|
-
badge:
|
|
54
|
+
badge: BadgeThemeType;
|
|
55
|
+
bottomNavigation: ReturnType<typeof getBottomNavigationTheme>;
|
|
54
56
|
bottomSheet: ReturnType<typeof getBottomSheetTheme>;
|
|
55
|
-
button:
|
|
57
|
+
button: ButtonThemeType;
|
|
56
58
|
calendar: ReturnType<typeof getCalendarTheme>;
|
|
57
59
|
card: ReturnType<typeof getCardTheme>;
|
|
58
|
-
carousel:
|
|
60
|
+
carousel: CarouselThemeType;
|
|
59
61
|
cardCarousel: ReturnType<typeof getCardCarouselTheme>;
|
|
60
62
|
checkbox: ReturnType<typeof getCheckboxTheme>;
|
|
61
63
|
chip: ReturnType<typeof getChipTheme>;
|
|
@@ -63,14 +65,14 @@ type Theme = GlobalTheme & {
|
|
|
63
65
|
datePicker: ReturnType<typeof getDatePickerTheme>;
|
|
64
66
|
divider: ReturnType<typeof getDividerTheme>;
|
|
65
67
|
drawer: ReturnType<typeof getDrawerTheme>;
|
|
66
|
-
empty:
|
|
67
|
-
error:
|
|
68
|
-
fab:
|
|
68
|
+
empty: EmptyThemeType;
|
|
69
|
+
error: ErrorThemeType;
|
|
70
|
+
fab: FABThemeType;
|
|
69
71
|
icon: ReturnType<typeof getIconTheme>;
|
|
70
72
|
image: ReturnType<typeof getImageTheme>;
|
|
71
73
|
list: ReturnType<typeof getListTheme>;
|
|
72
74
|
pageControl: ReturnType<typeof getPageControlTheme>;
|
|
73
|
-
pinInput:
|
|
75
|
+
pinInput: PinInputThemeType;
|
|
74
76
|
progress: ReturnType<typeof getProgressTheme>;
|
|
75
77
|
radio: ReturnType<typeof getRadioTheme>;
|
|
76
78
|
rate: ReturnType<typeof getRateTheme>;
|
|
@@ -81,11 +83,11 @@ type Theme = GlobalTheme & {
|
|
|
81
83
|
skeleton: ReturnType<typeof getSkeletonTheme>;
|
|
82
84
|
slider: ReturnType<typeof getSliderTheme>;
|
|
83
85
|
spinner: ReturnType<typeof getSpinnerTheme>;
|
|
84
|
-
success:
|
|
86
|
+
success: SuccessThemeType;
|
|
85
87
|
swipeable: ReturnType<typeof getSwipeableTheme>;
|
|
86
88
|
switch: ReturnType<typeof getSwitchTheme>;
|
|
87
89
|
tabs: ReturnType<typeof getTabsTheme>;
|
|
88
|
-
tag:
|
|
90
|
+
tag: TagThemeType;
|
|
89
91
|
textInput: ReturnType<typeof getTextInputTheme>;
|
|
90
92
|
timePicker: ReturnType<typeof getTimePickerTheme>;
|
|
91
93
|
toast: ReturnType<typeof getToastTheme>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type GlobalSystemPalette = {
|
|
1
|
+
export declare type GlobalSystemPalette = {
|
|
2
2
|
defaultGlobalSurface: string;
|
|
3
3
|
onDefaultGlobalSurface: string;
|
|
4
4
|
neutralGlobalSurface: string;
|
|
@@ -33,7 +33,7 @@ export type GlobalSystemPalette = {
|
|
|
33
33
|
archivedSurface: string;
|
|
34
34
|
onArchivedSurface: string;
|
|
35
35
|
};
|
|
36
|
-
export type BrandSystemPalette = {
|
|
36
|
+
export declare type BrandSystemPalette = {
|
|
37
37
|
primary: string;
|
|
38
38
|
onPrimary: string;
|
|
39
39
|
secondary: string;
|
|
@@ -44,4 +44,4 @@ export type BrandSystemPalette = {
|
|
|
44
44
|
decorativePrimary: string;
|
|
45
45
|
decorativePrimarySurface: string;
|
|
46
46
|
};
|
|
47
|
-
export type SystemPalette = GlobalSystemPalette & BrandSystemPalette;
|
|
47
|
+
export declare type SystemPalette = GlobalSystemPalette & BrandSystemPalette;
|
|
@@ -72,6 +72,6 @@ declare const getGlobalTheme: (scale: Scale, systemPalette: SystemPalette) => {
|
|
|
72
72
|
};
|
|
73
73
|
};
|
|
74
74
|
};
|
|
75
|
-
type GlobalTheme = ReturnType<typeof getGlobalTheme>;
|
|
75
|
+
declare type GlobalTheme = ReturnType<typeof getGlobalTheme>;
|
|
76
76
|
export type { GlobalTheme, Scale, SystemPalette };
|
|
77
77
|
export { getGlobalTheme, defaultScale, swagSystemPalette, swagDarkSystemPalette, workSystemPalette, jobsSystemPalette, walletSystemPalette, eBensSystemPalette, };
|