@hero-design/rn 8.53.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 +10 -0
- package/assets/fonts/hero-icons-mobile.ttf +0 -0
- package/es/index.js +317 -315
- package/lib/assets/fonts/hero-icons-mobile.ttf +0 -0
- package/lib/index.js +317 -315
- package/package.json +2 -2
- package/sonar-project.properties +9 -0
- package/src/components/Drawer/DragableDrawer/index.tsx +2 -2
- package/src/components/Icon/HeroIcon/glyphMap.json +1 -1
- package/src/components/Icon/IconList.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/index.d.ts +1 -1
- 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 +1 -1
- 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/FAB/ActionGroup/index.d.ts +1 -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/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/TextInput/StyledTextInput.d.ts +2 -2
- package/types/components/TextInput/index.d.ts +1 -1
- package/types/components/Toast/ToastContext.d.ts +2 -2
- package/types/components/Toast/ToastProvider.d.ts +1 -1
- package/types/components/Toast/types.d.ts +2 -2
- 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/theme/ThemeSwitcher.d.ts +1 -1
- package/types/theme/components/badge.d.ts +1 -1
- package/types/theme/components/button.d.ts +1 -1
- package/types/theme/components/carousel.d.ts +1 -1
- package/types/theme/components/empty.d.ts +1 -1
- package/types/theme/components/error.d.ts +1 -1
- package/types/theme/components/fab.d.ts +1 -1
- package/types/theme/components/pinInput.d.ts +1 -1
- package/types/theme/components/success.d.ts +1 -1
- package/types/theme/components/tag.d.ts +1 -1
- package/types/theme/getTheme.d.ts +1 -1
- 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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { TouchableHighlight, View } from 'react-native';
|
|
3
|
-
export type Variant = 'full-width' | 'card';
|
|
4
|
-
export type LeadingStatusIntent = 'success' | 'warning' | 'danger' | 'info' | 'archived';
|
|
3
|
+
export declare type Variant = 'full-width' | 'card';
|
|
4
|
+
export declare type LeadingStatusIntent = 'success' | 'warning' | 'danger' | 'info' | 'archived';
|
|
5
5
|
declare const StyledListItemContainer: import("@emotion/native").StyledComponent<import("react-native").TouchableHighlightProps & {
|
|
6
6
|
theme?: import("@emotion/react").Theme | undefined;
|
|
7
7
|
as?: import("react").ElementType<any> | undefined;
|
|
@@ -12,7 +12,7 @@ export declare const StyledPinWrapper: import("@emotion/native").StyledComponent
|
|
|
12
12
|
}, {}, {
|
|
13
13
|
ref?: import("react").Ref<View> | undefined;
|
|
14
14
|
}>;
|
|
15
|
-
export type State = 'default' | 'disabled' | 'error';
|
|
15
|
+
export declare type State = 'default' | 'disabled' | 'error';
|
|
16
16
|
export declare const StyledCell: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
17
17
|
theme?: import("@emotion/react").Theme | undefined;
|
|
18
18
|
as?: import("react").ElementType<any> | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PortalType } from './contexts';
|
|
2
2
|
import type { ActionTypes } from './types';
|
|
3
|
-
type State = Record<string, Array<PortalType>>;
|
|
3
|
+
declare type State = Record<string, Array<PortalType>>;
|
|
4
4
|
export declare const reducer: (state: Record<string, Array<PortalType>>, action: ActionTypes) => State;
|
|
5
5
|
export {};
|
|
@@ -19,4 +19,4 @@ export interface UnregisterHostAction {
|
|
|
19
19
|
type: ACTIONS;
|
|
20
20
|
hostName: string;
|
|
21
21
|
}
|
|
22
|
-
export type ActionTypes = AddUpdatePortalAction | RemovePortalAction | RegisterHostAction | UnregisterHostAction;
|
|
22
|
+
export declare type ActionTypes = AddUpdatePortalAction | RemovePortalAction | RegisterHostAction | UnregisterHostAction;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type ThemeIntent = 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'archived' | 'primary-inverted' | 'success-inverted' | 'warning-inverted' | 'danger-inverted' | 'info-inverted' | 'archived-inverted';
|
|
1
|
+
export declare type ThemeIntent = 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'archived' | 'primary-inverted' | 'success-inverted' | 'warning-inverted' | 'danger-inverted' | 'info-inverted' | 'archived-inverted';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { RefreshControlProps as NativeRefreshControlProps } from 'react-native';
|
|
3
|
-
export type RefreshControlProps = Omit<NativeRefreshControlProps, 'colors' | 'tintColor'>;
|
|
3
|
+
export declare type RefreshControlProps = Omit<NativeRefreshControlProps, 'colors' | 'tintColor'>;
|
|
4
4
|
declare const RefreshControl: ({ ...props }: RefreshControlProps) => React.JSX.Element;
|
|
5
5
|
export default RefreshControl;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type ToolbarButtonName = 'bold' | 'italic' | 'underline' | 'bulletedList' | 'numberedList' | 'headingOne' | 'headingTwo' | '|';
|
|
1
|
+
export declare type ToolbarButtonName = 'bold' | 'italic' | 'underline' | 'bulletedList' | 'numberedList' | 'headingOne' | 'headingTwo' | '|';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { View } from 'react-native';
|
|
3
|
-
type StyledHeadingProps = {
|
|
3
|
+
declare type StyledHeadingProps = {
|
|
4
4
|
themeSize: 'small' | 'medium';
|
|
5
5
|
};
|
|
6
6
|
declare const StyledHeading: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SectionList, SectionListProps } from 'react-native';
|
|
3
3
|
import type { OptionType, SelectProps, SectionType } from './types';
|
|
4
|
-
export type BaseOptionListProps<V, T extends OptionType<V>> = Pick<SelectProps<V, T>, 'keyExtractor' | 'loading' | 'onEndReached' | 'onQueryChange'> & {
|
|
4
|
+
export declare type BaseOptionListProps<V, T extends OptionType<V>> = Pick<SelectProps<V, T>, 'keyExtractor' | 'loading' | 'onEndReached' | 'onQueryChange'> & {
|
|
5
5
|
sectionListRef?: React.RefObject<SectionList<T, SectionType>>;
|
|
6
6
|
} & SectionListProps<T, SectionType>;
|
|
7
7
|
declare const BaseOptionList: <V, T extends OptionType<V>>({ keyExtractor, loading, onEndReached, onQueryChange, sections, renderItem, sectionListRef, ...rest }: BaseOptionListProps<V, T>) => React.JSX.Element;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { BaseOptionListProps } from '../BaseOptionList';
|
|
3
3
|
import type { MultiSelectProps } from '.';
|
|
4
4
|
import type { OptionType } from '../types';
|
|
5
|
-
type OptionListProps<V, T extends OptionType<V>> = Pick<MultiSelectProps<V, T>, 'keyExtractor' | 'loading' | 'onEndReached' | 'onQueryChange' | 'value' | 'renderOption'> & {
|
|
5
|
+
declare type OptionListProps<V, T extends OptionType<V>> = Pick<MultiSelectProps<V, T>, 'keyExtractor' | 'loading' | 'onEndReached' | 'onQueryChange' | 'value' | 'renderOption'> & {
|
|
6
6
|
onPress: (value: V[]) => void;
|
|
7
7
|
} & BaseOptionListProps<V, T>;
|
|
8
8
|
declare const OptionList: <V, T extends OptionType<V>>({ keyExtractor, loading, onEndReached, onPress, onQueryChange, sections, renderOption, value, sectionListRef, ...rest }: OptionListProps<V, T>) => React.JSX.Element;
|
|
@@ -3,7 +3,7 @@ import { SectionList } from 'react-native';
|
|
|
3
3
|
import type { SingleSelectProps } from '.';
|
|
4
4
|
import type { OptionType, SectionType } from '../types';
|
|
5
5
|
import { BaseOptionListProps } from '../BaseOptionList';
|
|
6
|
-
type OptionListProps<V, T extends OptionType<V>> = Pick<SingleSelectProps<V, T>, 'keyExtractor' | 'loading' | 'onEndReached' | 'onQueryChange' | 'value' | 'renderOption'> & {
|
|
6
|
+
declare type OptionListProps<V, T extends OptionType<V>> = Pick<SingleSelectProps<V, T>, 'keyExtractor' | 'loading' | 'onEndReached' | 'onQueryChange' | 'value' | 'renderOption'> & {
|
|
7
7
|
onPress: (value: V | null) => void;
|
|
8
8
|
sectionListRef?: React.RefObject<SectionList<T, SectionType>>;
|
|
9
9
|
} & BaseOptionListProps<V, T>;
|
|
@@ -3,7 +3,7 @@ export declare const getKey: <V, T extends OptionType<V>>(option: T, index: numb
|
|
|
3
3
|
export declare const isSections: <V, T extends OptionType<V>>(options: CombinedOptionsType<V, T>) => options is SectionData<V, T>[];
|
|
4
4
|
export declare const toSections: <V, T extends OptionType<V>>(options: CombinedOptionsType<V, T>) => SectionData<V, T>[];
|
|
5
5
|
export declare const toFlatOptions: <V, T extends OptionType<V>>(options: CombinedOptionsType<V, T>) => OptionType<V>[];
|
|
6
|
-
export type ScrollParams = {
|
|
6
|
+
export declare type ScrollParams = {
|
|
7
7
|
itemIndex: number;
|
|
8
8
|
sectionIndex: number;
|
|
9
9
|
};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
2
|
import type { ListRenderItemInfo, SectionListData, SectionListRenderItemInfo, StyleProp, ViewStyle } from 'react-native';
|
|
3
3
|
import type { TextInputProps } from '../TextInput';
|
|
4
|
-
export type OptionType<V> = {
|
|
4
|
+
export declare type OptionType<V> = {
|
|
5
5
|
value: V;
|
|
6
6
|
text: string;
|
|
7
7
|
key?: string;
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
highlighted?: boolean;
|
|
10
10
|
};
|
|
11
|
-
export type SectionType = {
|
|
11
|
+
export declare type SectionType = {
|
|
12
12
|
category: string;
|
|
13
13
|
};
|
|
14
|
-
export type SectionData<V, T extends OptionType<V>> = SectionListData<T, SectionType>;
|
|
15
|
-
export type CombinedOptionsType<V, T extends OptionType<V>> = T[] | SectionData<V, T>[];
|
|
16
|
-
export type ListRenderOptionInfo<V, T extends OptionType<V>> = ListRenderItemInfo<T> & {
|
|
14
|
+
export declare type SectionData<V, T extends OptionType<V>> = SectionListData<T, SectionType>;
|
|
15
|
+
export declare type CombinedOptionsType<V, T extends OptionType<V>> = T[] | SectionData<V, T>[];
|
|
16
|
+
export declare type ListRenderOptionInfo<V, T extends OptionType<V>> = ListRenderItemInfo<T> & {
|
|
17
17
|
selected: boolean;
|
|
18
18
|
onPress: () => void;
|
|
19
19
|
};
|
|
20
|
-
export type SectionListRenderOptionInfo<V, T extends OptionType<V>> = SectionListRenderItemInfo<T, SectionType> & {
|
|
20
|
+
export declare type SectionListRenderOptionInfo<V, T extends OptionType<V>> = SectionListRenderItemInfo<T, SectionType> & {
|
|
21
21
|
selected: boolean;
|
|
22
22
|
onPress: () => void;
|
|
23
23
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
type ThemeIntent = 'light' | 'dark';
|
|
3
|
-
type ThemeVariant = 'circular' | 'rectangular' | 'rounded';
|
|
2
|
+
declare type ThemeIntent = 'light' | 'dark';
|
|
3
|
+
declare type ThemeVariant = 'circular' | 'rectangular' | 'rounded';
|
|
4
4
|
declare const StyledContainer: import("@emotion/native").StyledComponent<import("../Box").BoxProps & {
|
|
5
5
|
theme?: import("@emotion/react").Theme | undefined;
|
|
6
6
|
as?: import("react").ElementType<any> | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { View } from 'react-native';
|
|
3
|
-
type SuccessVariant = 'full-screen' | 'in-page';
|
|
3
|
+
declare type SuccessVariant = 'full-screen' | 'in-page';
|
|
4
4
|
declare const StyledSuccessContainer: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
5
5
|
theme?: import("@emotion/react").Theme | undefined;
|
|
6
6
|
as?: import("react").ElementType<any> | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { TouchableOpacity } from 'react-native';
|
|
3
|
-
export type ActionIntent = 'primary' | 'success' | 'danger';
|
|
3
|
+
export declare type ActionIntent = 'primary' | 'success' | 'danger';
|
|
4
4
|
export declare const StyledRectButton: import("@emotion/native").StyledComponent<import("react-native").TouchableOpacityProps & {
|
|
5
5
|
theme?: import("@emotion/react").Theme | undefined;
|
|
6
6
|
as?: import("react").ElementType<any> | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { ComponentProps, ReactNode } from 'react';
|
|
2
2
|
import { RectButton, Swipeable as RnghSwipeable } from 'react-native-gesture-handler';
|
|
3
|
-
type State = 'closed' | 'leftOpen' | 'rightOpen';
|
|
4
|
-
type RnghSwipeableProps = ComponentProps<typeof RnghSwipeable>;
|
|
3
|
+
declare type State = 'closed' | 'leftOpen' | 'rightOpen';
|
|
4
|
+
declare type RnghSwipeableProps = ComponentProps<typeof RnghSwipeable>;
|
|
5
5
|
export interface SwipeableProps extends Pick<RnghSwipeableProps, 'enableTrackpadTwoFingerGesture' | 'friction' | 'leftThreshold' | 'rightThreshold' | 'overshootLeft' | 'overshootRight' | 'overshootFriction' | 'useNativeAnimations' | 'containerStyle' | 'childrenContainerStyle'> {
|
|
6
6
|
/**
|
|
7
7
|
* React node that is swipeable.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
3
|
import type { IconName } from '../../Icon';
|
|
4
|
-
type StatusBadgeType = {
|
|
4
|
+
declare type StatusBadgeType = {
|
|
5
5
|
type: 'status';
|
|
6
6
|
};
|
|
7
|
-
export type BadgeConfigType = StatusBadgeType;
|
|
8
|
-
export type OptionType<T> = {
|
|
7
|
+
export declare type BadgeConfigType = StatusBadgeType;
|
|
8
|
+
export declare type OptionType<T> = {
|
|
9
9
|
value: T;
|
|
10
10
|
text: string;
|
|
11
11
|
icon: IconName;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Animated, View } from 'react-native';
|
|
3
|
-
export type Variant = 'checked' | 'unchecked' | 'disabled-checked' | 'disabled-unchecked';
|
|
3
|
+
export declare type Variant = 'checked' | 'unchecked' | 'disabled-checked' | 'disabled-unchecked';
|
|
4
4
|
declare const StyledWrapper: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
5
5
|
theme?: import("@emotion/react").Theme | undefined;
|
|
6
6
|
as?: import("react").ElementType<any> | undefined;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
|
-
export type StatusBadgeType = {
|
|
2
|
+
export declare type StatusBadgeType = {
|
|
3
3
|
type: 'status';
|
|
4
4
|
};
|
|
5
|
-
export type CounterBadgeType = {
|
|
5
|
+
export declare type CounterBadgeType = {
|
|
6
6
|
type: 'counter';
|
|
7
7
|
value: number;
|
|
8
8
|
max?: number;
|
|
9
9
|
};
|
|
10
|
-
export type BadgeConfigType = StatusBadgeType | CounterBadgeType;
|
|
10
|
+
export declare type BadgeConfigType = StatusBadgeType | CounterBadgeType;
|
|
11
11
|
interface TabWithBadgeProps {
|
|
12
12
|
config?: BadgeConfigType;
|
|
13
13
|
tabItem: ReactNode;
|
|
@@ -3,10 +3,10 @@ import React from 'react';
|
|
|
3
3
|
import type { StyleProp, ViewProps, ViewStyle } from 'react-native';
|
|
4
4
|
import { IconName } from '../Icon';
|
|
5
5
|
import type { BadgeConfigType } from './TabWithBadge';
|
|
6
|
-
export type ItemType = string | IconName | ((props: {
|
|
6
|
+
export declare type ItemType = string | IconName | ((props: {
|
|
7
7
|
color: string;
|
|
8
8
|
}) => ReactNode);
|
|
9
|
-
export type TabType = {
|
|
9
|
+
export declare type TabType = {
|
|
10
10
|
key: string;
|
|
11
11
|
activeItem: ItemType;
|
|
12
12
|
inactiveItem?: ItemType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { View } from 'react-native';
|
|
3
|
-
type ThemeIntent = 'primary' | 'info' | 'success' | 'warning' | 'danger' | 'archived';
|
|
3
|
+
declare type ThemeIntent = 'primary' | 'info' | 'success' | 'warning' | 'danger' | 'archived';
|
|
4
4
|
declare const StyledView: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
5
5
|
theme?: import("@emotion/react").Theme | undefined;
|
|
6
6
|
as?: import("react").ElementType<any> | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { TextInput, View, Animated } from 'react-native';
|
|
3
|
-
export type State = 'default' | 'filled' | 'disabled' | 'readonly' | 'error';
|
|
4
|
-
type Variant = 'text' | 'textarea';
|
|
3
|
+
export declare type State = 'default' | 'filled' | 'disabled' | 'readonly' | 'error';
|
|
4
|
+
declare type Variant = 'text' | 'textarea';
|
|
5
5
|
declare const StyledContainer: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
6
6
|
theme?: import("@emotion/react").Theme | undefined;
|
|
7
7
|
as?: import("react").ElementType<any> | undefined;
|
|
@@ -3,7 +3,7 @@ import { TextInput as RNTextInput } from 'react-native';
|
|
|
3
3
|
import type { TextInputProps as NativeTextInputProps, StyleProp, ViewStyle, TextStyle } from 'react-native';
|
|
4
4
|
import type { State } from './StyledTextInput';
|
|
5
5
|
import type { IconName } from '../Icon';
|
|
6
|
-
export type TextInputHandles = Pick<RNTextInput, 'focus' | 'clear' | 'blur' | 'isFocused' | 'setNativeProps'>;
|
|
6
|
+
export declare type TextInputHandles = Pick<RNTextInput, 'focus' | 'clear' | 'blur' | 'isFocused' | 'setNativeProps'>;
|
|
7
7
|
export interface TextInputProps extends NativeTextInputProps {
|
|
8
8
|
/**
|
|
9
9
|
* Field label.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { ToastContainerProps, ToastProps } from './types';
|
|
3
|
-
export type ToastControllerContextType = {
|
|
3
|
+
export declare type ToastControllerContextType = {
|
|
4
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, 'position' | '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,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.
|
|
@@ -66,7 +66,7 @@ export interface ToastContainerProps {
|
|
|
66
66
|
*/
|
|
67
67
|
style?: StyleProp<ViewStyle>;
|
|
68
68
|
}
|
|
69
|
-
export type ToastItemProps = {
|
|
69
|
+
export declare type ToastItemProps = {
|
|
70
70
|
id: string;
|
|
71
71
|
props: Omit<ToastProps, 'position'>;
|
|
72
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';
|
|
@@ -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;
|
|
@@ -30,7 +30,7 @@ declare const getBadgeTheme: (theme: GlobalTheme) => {
|
|
|
30
30
|
default: number;
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
|
-
type GetBadgeThemeReturnType = ReturnType<typeof getBadgeTheme>;
|
|
33
|
+
declare type GetBadgeThemeReturnType = ReturnType<typeof getBadgeTheme>;
|
|
34
34
|
export interface BadgeThemeType extends GetBadgeThemeReturnType {
|
|
35
35
|
/**
|
|
36
36
|
* @deprecated will be removed in v9
|
|
@@ -53,7 +53,7 @@ declare const getButtonTheme: (theme: GlobalTheme) => {
|
|
|
53
53
|
utilityPadding: number;
|
|
54
54
|
};
|
|
55
55
|
};
|
|
56
|
-
type GetButtonThemeReturnType = ReturnType<typeof getButtonTheme>;
|
|
56
|
+
declare type GetButtonThemeReturnType = ReturnType<typeof getButtonTheme>;
|
|
57
57
|
export interface ButtonThemeType extends GetButtonThemeReturnType {
|
|
58
58
|
/**
|
|
59
59
|
* @deprecated will be removed in v9
|
|
@@ -19,7 +19,7 @@ declare const getCarouselTheme: (theme: GlobalTheme) => {
|
|
|
19
19
|
heading: number;
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
-
type GetCarouselThemeReturnType = ReturnType<typeof getCarouselTheme>;
|
|
22
|
+
declare type GetCarouselThemeReturnType = ReturnType<typeof getCarouselTheme>;
|
|
23
23
|
export interface CarouselThemeType extends GetCarouselThemeReturnType {
|
|
24
24
|
/**
|
|
25
25
|
* @deprecated will be removed in v9
|
|
@@ -23,7 +23,7 @@ declare const getEmptyTheme: (theme: GlobalTheme) => {
|
|
|
23
23
|
description: string;
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
|
-
type GetEmptyThemeReturnType = ReturnType<typeof getEmptyTheme>;
|
|
26
|
+
declare type GetEmptyThemeReturnType = ReturnType<typeof getEmptyTheme>;
|
|
27
27
|
export interface EmptyThemeType extends GetEmptyThemeReturnType {
|
|
28
28
|
/**
|
|
29
29
|
* @deprecated will be removed in v9
|
|
@@ -33,7 +33,7 @@ declare const getErrorTheme: (theme: GlobalTheme) => {
|
|
|
33
33
|
description: number;
|
|
34
34
|
};
|
|
35
35
|
};
|
|
36
|
-
type GetErrorThemeReturnType = ReturnType<typeof getErrorTheme>;
|
|
36
|
+
declare type GetErrorThemeReturnType = ReturnType<typeof getErrorTheme>;
|
|
37
37
|
export interface ErrorThemeType extends GetErrorThemeReturnType {
|
|
38
38
|
/**
|
|
39
39
|
* @deprecated will be removed in v9
|
|
@@ -54,7 +54,7 @@ declare const getFABTheme: (theme: GlobalTheme) => {
|
|
|
54
54
|
titleMarginHorizontal: number;
|
|
55
55
|
};
|
|
56
56
|
};
|
|
57
|
-
type GetFABThemeReturnType = ReturnType<typeof getFABTheme>;
|
|
57
|
+
declare type GetFABThemeReturnType = ReturnType<typeof getFABTheme>;
|
|
58
58
|
export interface FABThemeType extends GetFABThemeReturnType {
|
|
59
59
|
/**
|
|
60
60
|
* @deprecated will be removed in v9
|
|
@@ -36,7 +36,7 @@ declare const getPinInputTheme: (theme: GlobalTheme) => {
|
|
|
36
36
|
mask: number;
|
|
37
37
|
};
|
|
38
38
|
};
|
|
39
|
-
type GetPinInputThemeReturnType = ReturnType<typeof getPinInputTheme>;
|
|
39
|
+
declare type GetPinInputThemeReturnType = ReturnType<typeof getPinInputTheme>;
|
|
40
40
|
export interface PinInputThemeType extends GetPinInputThemeReturnType {
|
|
41
41
|
/**
|
|
42
42
|
* @deprecated will be removed in v9
|
|
@@ -29,7 +29,7 @@ declare const getSuccessTheme: (theme: GlobalTheme) => {
|
|
|
29
29
|
description: string;
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
|
-
type GetSuccessThemeReturnType = ReturnType<typeof getSuccessTheme>;
|
|
32
|
+
declare type GetSuccessThemeReturnType = ReturnType<typeof getSuccessTheme>;
|
|
33
33
|
export interface SuccessThemeType extends GetSuccessThemeReturnType {
|
|
34
34
|
/**
|
|
35
35
|
* @deprecated will be removed in v9
|
|
@@ -35,7 +35,7 @@ declare const getTagTheme: (theme: GlobalTheme) => {
|
|
|
35
35
|
default: number;
|
|
36
36
|
};
|
|
37
37
|
};
|
|
38
|
-
type GetTagThemeReturnType = ReturnType<typeof getTagTheme>;
|
|
38
|
+
declare type GetTagThemeReturnType = ReturnType<typeof getTagTheme>;
|
|
39
39
|
export interface TagThemeType extends GetTagThemeReturnType {
|
|
40
40
|
/**
|
|
41
41
|
* @deprecated will be removed in v9
|
|
@@ -45,7 +45,7 @@ import getToastTheme from './components/toast';
|
|
|
45
45
|
import getToolbarTheme from './components/toolbar';
|
|
46
46
|
import getTypographyTheme from './components/typography';
|
|
47
47
|
import type { GlobalTheme, Scale, SystemPalette } from './global';
|
|
48
|
-
type Theme = GlobalTheme & {
|
|
48
|
+
declare type Theme = GlobalTheme & {
|
|
49
49
|
__hd__: {
|
|
50
50
|
accordion: ReturnType<typeof getAccordionTheme>;
|
|
51
51
|
alert: ReturnType<typeof getAlertTheme>;
|
|
@@ -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, };
|