@hero-design/rn 8.112.3 → 8.112.5
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 +3 -3
- package/CHANGELOG.md +12 -0
- package/es/index.js +1764 -1372
- package/jest.config.js +1 -1
- package/lib/index.js +1764 -1372
- package/package.json +2 -2
- package/src/components/Accordion/AccordionItem.tsx +1 -1
- package/src/components/AnimatedScroller/AnimatedScrollable.tsx +1 -1
- package/src/components/AnimatedScroller/SectionListWithFAB.tsx +1 -1
- package/src/components/Box/StyledBox.tsx +1 -1
- package/src/components/Button/UtilityButton/index.tsx +1 -1
- package/src/components/Calendar/CalendarRange.tsx +1 -1
- package/src/components/Calendar/CalendarRowItem.tsx +2 -2
- package/src/components/Calendar/index.tsx +1 -1
- package/src/components/Carousel/index.tsx +1 -1
- package/src/components/Chart/Line/Line.tsx +3 -4
- package/src/components/Chart/index.tsx +0 -2
- package/src/components/Chart/shared/ChartHeader.tsx +1 -1
- package/src/components/Chart/shared/hooks/useColorScale.ts +2 -2
- package/src/components/Chart/shared/hooks/useGenerateTicks.ts +2 -2
- package/src/components/Chart/shared/hooks/useScaleBandX.ts +3 -3
- package/src/components/Chart/shared/hooks/useScaleLinearY.ts +3 -4
- package/src/components/Chart/types.ts +0 -8
- package/src/components/Checkbox/utils.ts +1 -1
- package/src/components/Chip/index.tsx +1 -1
- package/src/components/DatePicker/hooks/__tests__/useFormatDate.spec.ts +7 -5
- package/src/components/DatePicker/hooks/useFormatDate.ts +1 -1
- package/src/components/DatePicker/types.ts +1 -1
- package/src/components/FloatingIsland/index.tsx +1 -1
- package/src/components/Illustration/index.tsx +1 -1
- package/src/components/List/BasicListItem.tsx +1 -1
- package/src/components/List/StyledListItem.tsx +2 -2
- package/src/components/LocaleProvider/__tests__/utils.specs.ts +1 -2
- package/src/components/LocaleProvider/index.tsx +1 -1
- package/src/components/LocaleProvider/utils.ts +2 -3
- package/src/components/Portal/index.tsx +1 -1
- package/src/components/Portal/types.tsx +2 -2
- package/src/components/Radio/Radio.tsx +1 -1
- package/src/components/Rate/index.tsx +2 -2
- package/src/components/RefreshControl/index.tsx +1 -1
- package/src/components/RichTextEditor/RichTextEditor.tsx +6 -6
- package/src/components/RichTextEditor/{BaseRichTextEditor.tsx → RichTextEditorInput.tsx} +4 -4
- package/src/components/RichTextEditor/StyledRichTextEditor.ts +0 -5
- package/src/components/RichTextEditor/__tests__/RichTextEditor.spec.tsx +19 -4
- package/src/components/RichTextEditor/index.tsx +3 -3
- package/src/components/RichTextEditor/utils/events.ts +1 -13
- package/src/components/Search/SearchOneLine.tsx +1 -1
- package/src/components/Search/StyledSearch.tsx +1 -1
- package/src/components/SectionHeading/index.tsx +1 -1
- package/src/components/Select/helpers.tsx +1 -18
- package/src/components/Skeleton/index.tsx +1 -1
- package/src/components/Slider/RangeSlider.tsx +1 -1
- package/src/components/StatusScreens/Success/index.tsx +1 -1
- package/src/components/Tabs/ScrollableTabsHeader/ScrollableTabsHeader.tsx +1 -1
- package/src/components/Tabs/StyledTabs.tsx +0 -5
- package/src/components/Tabs/TabWithBadge.tsx +2 -2
- package/src/components/TextInput/index.tsx +3 -3
- package/src/components/TimePicker/TimePickerAndroid.tsx +1 -1
- package/src/components/TimePicker/TimePickerIOS.tsx +1 -1
- package/src/components/TimePicker/types.ts +1 -1
- package/src/components/Toast/ToastContext.ts +1 -1
- package/src/components/Toolbar/index.tsx +1 -1
- package/src/components/Typography/Label/index.tsx +1 -1
- package/src/theme/global/colors/swagSystemPalette.ts +1 -1
- package/src/theme/global/colors/types.ts +1 -1
- package/src/theme/global/shadows/index.ts +0 -3
- package/src/theme/global/shadows/types.ts +1 -1
- package/src/theme/global/sizes.ts +1 -0
- package/src/theme/global/typography.ts +2 -1
- package/src/utils/scale.ts +2 -2
- package/types/components/Accordion/AccordionItem.d.ts +1 -1
- package/types/components/AnimatedScroller/AnimatedScrollable.d.ts +1 -1
- package/types/components/AnimatedScroller/SectionListWithFAB.d.ts +1 -1
- package/types/components/Box/StyledBox.d.ts +0 -5
- package/types/components/Button/UtilityButton/index.d.ts +1 -1
- package/types/components/Calendar/CalendarRowItem.d.ts +1 -2
- package/types/components/Carousel/index.d.ts +0 -1
- package/types/components/Chart/index.d.ts +0 -3
- package/types/components/Chart/shared/ChartHeader.d.ts +1 -1
- package/types/components/Chart/shared/hooks/useScaleBandX.d.ts +2 -3
- package/types/components/Chart/shared/hooks/useScaleLinearY.d.ts +2 -3
- package/types/components/Chart/types.d.ts +1 -7
- package/types/components/Checkbox/utils.d.ts +2 -1
- package/types/components/Chip/index.d.ts +1 -1
- package/types/components/DatePicker/types.d.ts +1 -1
- package/types/components/FloatingIsland/index.d.ts +1 -1
- package/types/components/Illustration/index.d.ts +1 -1
- package/types/components/List/BasicListItem.d.ts +1 -1
- package/types/components/List/StyledListItem.d.ts +2 -2
- package/types/components/LocaleProvider/utils.d.ts +1 -1
- package/types/components/Portal/index.d.ts +1 -1
- package/types/components/Portal/types.d.ts +3 -2
- package/types/components/Radio/Radio.d.ts +1 -1
- package/types/components/Rate/index.d.ts +2 -2
- package/types/components/RefreshControl/index.d.ts +1 -1
- package/types/components/RichTextEditor/RichTextEditor.d.ts +2 -6
- package/types/components/RichTextEditor/{BaseRichTextEditor.d.ts → RichTextEditorInput.d.ts} +3 -3
- package/types/components/RichTextEditor/StyledRichTextEditor.d.ts +0 -7
- package/types/components/RichTextEditor/index.d.ts +2 -2
- package/types/components/RichTextEditor/utils/events.d.ts +2 -3
- package/types/components/Search/SearchOneLine.d.ts +1 -1
- package/types/components/Search/StyledSearch.d.ts +2 -1
- package/types/components/SectionHeading/index.d.ts +1 -1
- package/types/components/Select/helpers.d.ts +2 -2
- package/types/components/Skeleton/index.d.ts +1 -1
- package/types/components/Slider/RangeSlider.d.ts +1 -1
- package/types/components/StatusScreens/Success/index.d.ts +1 -1
- package/types/components/Tabs/ScrollableTabsHeader/ScrollableTabsHeader.d.ts +1 -1
- package/types/components/Tabs/StyledTabs.d.ts +1 -7
- package/types/components/Tabs/TabWithBadge.d.ts +2 -2
- package/types/components/TextInput/index.d.ts +2 -3
- package/types/components/TimePicker/types.d.ts +1 -1
- package/types/components/Toast/ToastContext.d.ts +2 -1
- package/types/components/Toolbar/index.d.ts +1 -1
- package/types/components/Typography/Label/index.d.ts +1 -1
- package/types/theme/components/alert.d.ts +10 -1
- package/types/theme/components/bottomNavigation.d.ts +10 -1
- package/types/theme/components/chip.d.ts +10 -1
- package/types/theme/components/fab.d.ts +10 -1
- package/types/theme/components/floatingIsland.d.ts +10 -1
- package/types/theme/components/list.d.ts +10 -1
- package/types/theme/components/search.d.ts +10 -1
- package/types/theme/components/segmentedControl.d.ts +10 -1
- package/types/theme/components/slider.d.ts +10 -1
- package/types/theme/components/toast.d.ts +10 -1
- package/types/theme/global/colors/swagSystemPalette.d.ts +1 -1
- package/types/theme/global/colors/types.d.ts +2 -1
- package/types/theme/global/index.d.ts +1 -1
- package/types/theme/global/shadows/index.d.ts +0 -2
- package/types/theme/global/shadows/types.d.ts +2 -1
- package/types/theme/global/typography.d.ts +1 -1
- package/types/utils/scale.d.ts +0 -2
- package/.cursor/rules/performance-optimization.mdc +0 -64
- package/.cursor/rules/rn-rules.mdc +0 -165
- package/.cursor/rules/testing-rules.mdc +0 -114
|
@@ -4,23 +4,6 @@ import type {
|
|
|
4
4
|
SelectOptionType,
|
|
5
5
|
} from './types';
|
|
6
6
|
|
|
7
|
-
export const getKey = <V, T extends SelectOptionType<V>>(
|
|
8
|
-
option: T,
|
|
9
|
-
index: number,
|
|
10
|
-
keyExtractor?: (opt: T, i?: number) => string
|
|
11
|
-
) => {
|
|
12
|
-
let key: React.Key = '';
|
|
13
|
-
if (keyExtractor !== undefined) {
|
|
14
|
-
key = keyExtractor(option, index);
|
|
15
|
-
} else if (option.key !== undefined) {
|
|
16
|
-
key = option.key;
|
|
17
|
-
} else {
|
|
18
|
-
key = index;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
return key;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
7
|
export const isSections = <V, T extends SelectOptionType<V>>(
|
|
25
8
|
options: CombinedOptionsType<V, T>
|
|
26
9
|
): options is SectionData<V, T>[] => {
|
|
@@ -52,7 +35,7 @@ export const toFlatOptions = <V, T extends SelectOptionType<V>>(
|
|
|
52
35
|
return options;
|
|
53
36
|
};
|
|
54
37
|
|
|
55
|
-
|
|
38
|
+
type ScrollParams = {
|
|
56
39
|
itemIndex: number;
|
|
57
40
|
sectionIndex: number;
|
|
58
41
|
};
|
|
@@ -12,7 +12,7 @@ import type { Theme } from '../../theme';
|
|
|
12
12
|
import { useTheme } from '../../theme';
|
|
13
13
|
import { StyledContainer, StyledGradientContainer } from './StyledSkeleton';
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
interface SkeletonProps extends ViewProps {
|
|
16
16
|
/**
|
|
17
17
|
* Intent of the component.
|
|
18
18
|
*/
|
|
@@ -24,7 +24,7 @@ import { noop } from '../../../utils/functions';
|
|
|
24
24
|
import type { IllustrationName } from '../../Illustration';
|
|
25
25
|
import Illustration from '../../Illustration';
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
interface SuccessProps extends ViewProps {
|
|
28
28
|
/**
|
|
29
29
|
* Image to be displayed.
|
|
30
30
|
* @deprecated The `image` prop is deprecated and will be removed in the next major version. Use the `icon` prop instead.
|
|
@@ -53,7 +53,7 @@ const getTabItem = ({
|
|
|
53
53
|
return item({ color });
|
|
54
54
|
};
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
interface ScrollableTabHeaderProps extends ViewProps {
|
|
57
57
|
/**
|
|
58
58
|
* Callback which is called on tab press, receiving key of upcoming active Tab.
|
|
59
59
|
*/
|
|
@@ -25,10 +25,6 @@ const HeaderTabItem = styled(View)(({ theme }) => ({
|
|
|
25
25
|
paddingVertical: theme.__hd__.tabs.space.itemVerticalPadding,
|
|
26
26
|
}));
|
|
27
27
|
|
|
28
|
-
const TabScreen = styled(View)({
|
|
29
|
-
flex: 1,
|
|
30
|
-
});
|
|
31
|
-
|
|
32
28
|
const StyledIndicator = styled(Animated.View)<{ themeWidth: number }>(
|
|
33
29
|
({ theme, themeWidth }) => ({
|
|
34
30
|
width: themeWidth,
|
|
@@ -49,7 +45,6 @@ export {
|
|
|
49
45
|
HeaderTabWrapper,
|
|
50
46
|
HeaderTab,
|
|
51
47
|
HeaderTabItem,
|
|
52
|
-
TabScreen,
|
|
53
48
|
StyledIndicator,
|
|
54
49
|
StyledBadgeWrapper,
|
|
55
50
|
};
|
|
@@ -5,11 +5,11 @@ import { View } from 'react-native';
|
|
|
5
5
|
import Badge from '../Badge';
|
|
6
6
|
import { StyledBadgeWrapper } from './StyledTabs';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
type StatusBadgeType = {
|
|
9
9
|
type: 'status';
|
|
10
10
|
};
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
type CounterBadgeType = {
|
|
13
13
|
type: 'counter';
|
|
14
14
|
value: number;
|
|
15
15
|
max?: number;
|
|
@@ -45,7 +45,7 @@ export type TextInputHandles = Pick<
|
|
|
45
45
|
'focus' | 'clear' | 'blur' | 'isFocused' | 'setNativeProps'
|
|
46
46
|
>;
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
type TextInputVariant = 'text' | 'textarea';
|
|
49
49
|
|
|
50
50
|
type NativeTextInputProps = Omit<RNTextInputProps, 'onFocus' | 'onBlur'> & {
|
|
51
51
|
onFocus?: (
|
|
@@ -56,7 +56,7 @@ type NativeTextInputProps = Omit<RNTextInputProps, 'onFocus' | 'onBlur'> & {
|
|
|
56
56
|
) => void | undefined;
|
|
57
57
|
};
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
interface TextInputRef {
|
|
60
60
|
focus: () => void;
|
|
61
61
|
blur: () => void;
|
|
62
62
|
clear: () => void;
|
|
@@ -305,7 +305,7 @@ export const renderMaxLengthMessage = ({
|
|
|
305
305
|
);
|
|
306
306
|
};
|
|
307
307
|
|
|
308
|
-
|
|
308
|
+
const getDisplayText = (value?: string, defaultValue?: string) => {
|
|
309
309
|
return (value !== undefined ? value : defaultValue) ?? '';
|
|
310
310
|
};
|
|
311
311
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import DateTimePicker from '@react-native-community/datetimepicker';
|
|
2
2
|
import React, { useState, useCallback } from 'react';
|
|
3
3
|
import { View } from 'react-native';
|
|
4
|
-
import formatTime from 'date-fns/fp
|
|
4
|
+
import { format as formatTime } from 'date-fns/fp';
|
|
5
5
|
|
|
6
6
|
import TextInput from '../TextInput';
|
|
7
7
|
import { StyledTouchableOpacity } from './StyledTimePicker';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import DateTimePicker from '@react-native-community/datetimepicker';
|
|
2
2
|
import React, { useEffect, useState, useCallback } from 'react';
|
|
3
3
|
import { View } from 'react-native';
|
|
4
|
-
import formatTime from 'date-fns/fp
|
|
4
|
+
import { format as formatTime } from 'date-fns/fp';
|
|
5
5
|
|
|
6
6
|
import BottomSheet from '../BottomSheet';
|
|
7
7
|
import TextInput from '../TextInput';
|
|
@@ -24,7 +24,7 @@ export interface TimePickerProps {
|
|
|
24
24
|
confirmLabel: string;
|
|
25
25
|
/**
|
|
26
26
|
* Time display format of current value presented on the input. Default format is: HH:mm aa.
|
|
27
|
-
* Following date-fns's format (https://date-fns.org/
|
|
27
|
+
* Following date-fns's format (https://date-fns.org/v4.1.0/docs/format).
|
|
28
28
|
* This also change how the time picker display between 24 hour and 12 hour mode.
|
|
29
29
|
*/
|
|
30
30
|
displayFormat?: string;
|
|
@@ -5,7 +5,7 @@ import { ToolbarWrapper } from './StyledToolbar';
|
|
|
5
5
|
import ToolbarGroup from './ToolbarGroup';
|
|
6
6
|
import ToolbarMessage from './ToolbarMessage';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
interface ToolbarProps extends Omit<ViewProps, 'style'> {
|
|
9
9
|
/**
|
|
10
10
|
* Toolbar's content.
|
|
11
11
|
*/
|
package/src/utils/scale.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Dimensions, Platform } from 'react-native';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const BASE_WIDTH = 390; // Based on iPhone 13's viewport size
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
const horizontalScale = (size: number) => {
|
|
6
6
|
if (Platform.OS === 'web') {
|
|
7
7
|
return size;
|
|
8
8
|
}
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import type { ReactElement } from 'react';
|
|
3
3
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
4
4
|
import type { Variant } from './StyledAccordion';
|
|
5
|
-
|
|
5
|
+
type AccordionItemProps = {
|
|
6
6
|
header: string | ReactElement;
|
|
7
7
|
content: ReactElement;
|
|
8
8
|
open?: boolean;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import type { FlatListProps, ScrollViewProps as RnScrollViewProps, SectionListProps } from 'react-native';
|
|
3
3
|
import type { ActionGroupProps } from '../FAB/ActionGroup';
|
|
4
4
|
import type { FABProps } from '../FAB/FAB';
|
|
5
|
-
|
|
5
|
+
interface AnimatedScrollerProps<T> {
|
|
6
6
|
/**
|
|
7
7
|
* Scroll component, it can be ScrollView, FlatList or SectionList.
|
|
8
8
|
*/
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import type { SectionListProps } from 'react-native';
|
|
3
3
|
import type { ActionGroupProps } from '../FAB/ActionGroup';
|
|
4
4
|
import type { FABProps } from '../FAB/FAB';
|
|
5
|
-
|
|
5
|
+
interface SectionListWithFABProps<T> extends SectionListProps<T> {
|
|
6
6
|
/**
|
|
7
7
|
* FAB or FAB.ActionGroup props props.
|
|
8
8
|
*/
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import type { Theme } from '@emotion/react';
|
|
2
2
|
import { View } from 'react-native';
|
|
3
3
|
import type { FlexStyleProps, StyleProps } from './types';
|
|
4
|
-
export declare const getThemeValue: (theme: Theme, key: keyof StyleProps, props: StyleProps) => {
|
|
5
|
-
[x: string]: string | undefined;
|
|
6
|
-
} | {
|
|
7
|
-
[x: string]: number;
|
|
8
|
-
} | undefined;
|
|
9
4
|
declare const StyledBox: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
10
5
|
theme?: Theme;
|
|
11
6
|
as?: React.ElementType;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import type { ReactChild } from 'react';
|
|
3
3
|
import type { ViewProps } from 'react-native';
|
|
4
4
|
import type { IconName } from '../../Icon';
|
|
5
|
-
|
|
5
|
+
interface UtilityButtonProps extends ViewProps {
|
|
6
6
|
/**
|
|
7
7
|
* Places an icon within the button, before the button's text
|
|
8
8
|
*/
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
export interface CalendarRowItemProps {
|
|
2
|
+
interface CalendarRowItemProps {
|
|
4
3
|
date?: Date;
|
|
5
4
|
onPress?: () => void;
|
|
6
5
|
isCurrent?: boolean;
|
|
@@ -40,7 +40,6 @@ interface CarouselProps extends ViewProps {
|
|
|
40
40
|
*/
|
|
41
41
|
pageControlPosition?: 'top' | 'bottom';
|
|
42
42
|
}
|
|
43
|
-
export declare function useStateFromProp<T>(initialValue: T): [T, Dispatch<SetStateAction<T>>];
|
|
44
43
|
declare const _default: (({ items, onItemIndexChange, renderActions, selectedItemIndex, style, shouldShowPagination, testID, pageControlPosition, ...nativeProps }: CarouselProps) => React.JSX.Element) & {
|
|
45
44
|
Card: React.ForwardRefExoticComponent<Omit<import("./CardCarousel").CardCarouselProps, "ref"> & React.RefAttributes<import("./CardCarousel").CardCarouselHandles>>;
|
|
46
45
|
};
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import LineChart from './Line';
|
|
2
|
-
import ColumnChart from './ColumnChart';
|
|
3
1
|
declare const Chart: {
|
|
4
2
|
Column: ({ data, yAxisConfig, xAxisConfig, style, testID, headerConfig, emptyText, onBarPress, styleConfig, }: import("./ColumnChart").ColumnChartProps) => import("react").JSX.Element;
|
|
5
3
|
Line: ({ data, yAxisConfig, xAxisConfig, style, testID, headerConfig, emptyText, styleConfig, }: import("./Line").LineChartProps) => import("react").JSX.Element;
|
|
6
4
|
SelectAction: <V>({ onConfirm, onDismiss, options, disabled, style, testID, value, supportedOrientations, bottomSheetConfig, }: import("./ChartSelect").SingleSelectProps<V>) => import("react").JSX.Element;
|
|
7
5
|
};
|
|
8
|
-
export type { LineChart, ColumnChart };
|
|
9
6
|
export default Chart;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { LayoutChangeEvent } from 'react-native';
|
|
3
3
|
import type { HeaderConfig } from '../types';
|
|
4
|
-
|
|
4
|
+
type ChartHeaderProps = HeaderConfig & {
|
|
5
5
|
onLayout?: (event: LayoutChangeEvent) => void;
|
|
6
6
|
};
|
|
7
7
|
declare const ChartHeader: ({ title, actionsExtra, onLayout }: ChartHeaderProps) => React.JSX.Element;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
export type UseScaleBandXProps = {
|
|
1
|
+
type UseScaleBandXProps = {
|
|
3
2
|
labels: string[];
|
|
4
3
|
xStart: number;
|
|
5
4
|
xEnd: number;
|
|
6
5
|
};
|
|
7
|
-
declare const useScaleBandX: ({ labels, xStart, xEnd }: UseScaleBandXProps) => d3.ScaleBand<string>;
|
|
6
|
+
declare const useScaleBandX: ({ labels, xStart, xEnd }: UseScaleBandXProps) => import("d3-scale").ScaleBand<string>;
|
|
8
7
|
export default useScaleBandX;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
export type UseScaleLinearYProps = {
|
|
1
|
+
type UseScaleLinearYProps = {
|
|
3
2
|
maxValue: number;
|
|
4
3
|
minValue: number;
|
|
5
4
|
yStart: number;
|
|
6
5
|
yEnd: number;
|
|
7
6
|
};
|
|
8
|
-
declare const useScaleLinearY: ({ maxValue, minValue, yStart, yEnd, }: UseScaleLinearYProps) => d3.ScaleLinear<number, number, never>;
|
|
7
|
+
declare const useScaleLinearY: ({ maxValue, minValue, yStart, yEnd, }: UseScaleLinearYProps) => import("d3-scale").ScaleLinear<number, number, never>;
|
|
9
8
|
export default useScaleLinearY;
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
export type AxisSizeConfig = {
|
|
2
|
-
xAxisTextHeight: number;
|
|
3
|
-
setXAxisTextHeight: (height: number) => void;
|
|
4
|
-
yAxisTextWidth: number;
|
|
5
|
-
setYAxisTextWidth: (width: number) => void;
|
|
6
|
-
};
|
|
7
1
|
/**
|
|
8
2
|
* Represents a data series for the chart.
|
|
9
3
|
* @template Data - The type of the data array for the series.
|
|
@@ -94,4 +88,4 @@ type StyleConfig = {
|
|
|
94
88
|
color?: ChartColor;
|
|
95
89
|
}>;
|
|
96
90
|
};
|
|
97
|
-
export type { Series,
|
|
91
|
+
export type { Series, XAxisConfig, YAxisConfig, DataValue, AxisCoordinates, HeaderConfig, StyleConfig, };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
type getStateType = {
|
|
2
2
|
disabled: boolean;
|
|
3
3
|
readonly: boolean;
|
|
4
4
|
checked?: boolean;
|
|
5
5
|
};
|
|
6
6
|
export declare const getThemeState: ({ disabled, readonly, checked, }: getStateType) => "disabled" | "default" | "readonly" | "checked";
|
|
7
|
+
export {};
|
|
@@ -7,7 +7,7 @@ import type { IconName } from '../Icon';
|
|
|
7
7
|
*/
|
|
8
8
|
type DeprecatedVariant = 'outlined' | 'filled';
|
|
9
9
|
type ValidVariant = 'selection' | 'filter' | 'compact' | 'compact-outlined';
|
|
10
|
-
|
|
10
|
+
interface ChipProps extends ViewProps {
|
|
11
11
|
/**
|
|
12
12
|
* The label of the chip.
|
|
13
13
|
*/
|
|
@@ -38,7 +38,7 @@ export interface DatePickerProps {
|
|
|
38
38
|
confirmLabel: string;
|
|
39
39
|
/**
|
|
40
40
|
* Date format. Default format is dd/MM/yyyy.
|
|
41
|
-
* Following date-fns's format (https://date-fns.org/
|
|
41
|
+
* Following date-fns's format (https://date-fns.org/v4.1.0/docs/format).
|
|
42
42
|
*/
|
|
43
43
|
displayFormat?: string;
|
|
44
44
|
/**
|
|
@@ -2,7 +2,7 @@ import type { ReactNode } from 'react';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import type { ViewProps } from 'react-native';
|
|
4
4
|
import type { IconName } from '../Icon';
|
|
5
|
-
|
|
5
|
+
interface FloatingIslandProps extends ViewProps {
|
|
6
6
|
/**
|
|
7
7
|
* Callback that is called when the floating island is pressed.
|
|
8
8
|
*/
|
|
@@ -3,7 +3,7 @@ import type { StyleProp, ViewStyle } from 'react-native';
|
|
|
3
3
|
import { type IllustrationName } from './illustrations';
|
|
4
4
|
export { IllustrationList } from './illustrations';
|
|
5
5
|
export type { IllustrationName } from './illustrations';
|
|
6
|
-
|
|
6
|
+
interface IllustrationProps {
|
|
7
7
|
/**
|
|
8
8
|
* The name of the illustration to display
|
|
9
9
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
3
|
import type { IconName } from '../Icon';
|
|
4
|
-
|
|
4
|
+
interface ListItemProps {
|
|
5
5
|
/**
|
|
6
6
|
* Name of Icon or component to render on the left side of title.
|
|
7
7
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { View } from 'react-native';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
type Variant = 'full-width' | 'card';
|
|
3
|
+
type LeadingStatusIntent = 'success' | 'warning' | 'danger' | 'info' | 'archived';
|
|
4
4
|
declare const StyledListItemContainer: import("@emotion/native").StyledComponent<import("react-native").TouchableHighlightProps & import("react").RefAttributes<View> & {
|
|
5
5
|
theme?: import("@emotion/react").Theme;
|
|
6
6
|
as?: React.ElementType;
|
|
@@ -11,12 +11,13 @@ export interface RemovePortalAction {
|
|
|
11
11
|
hostName: string;
|
|
12
12
|
portalName: string;
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
interface RegisterHostAction {
|
|
15
15
|
type: ACTIONS;
|
|
16
16
|
hostName: string;
|
|
17
17
|
}
|
|
18
|
-
|
|
18
|
+
interface UnregisterHostAction {
|
|
19
19
|
type: ACTIONS;
|
|
20
20
|
hostName: string;
|
|
21
21
|
}
|
|
22
22
|
export type ActionTypes = AddUpdatePortalAction | RemovePortalAction | RegisterHostAction | UnregisterHostAction;
|
|
23
|
+
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ViewProps } from 'react-native';
|
|
3
|
-
|
|
3
|
+
interface RateOption<T extends string | number> {
|
|
4
4
|
value: T;
|
|
5
5
|
}
|
|
6
|
-
|
|
6
|
+
interface RateProps<T extends string | number> extends ViewProps {
|
|
7
7
|
/**
|
|
8
8
|
* Options for rate component.
|
|
9
9
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { RefreshControlProps as NativeRefreshControlProps } from 'react-native';
|
|
3
|
-
|
|
3
|
+
type RefreshControlProps = Omit<NativeRefreshControlProps, 'colors' | 'tintColor'>;
|
|
4
4
|
declare const RefreshControl: ({ ...props }: RefreshControlProps) => React.JSX.Element;
|
|
5
5
|
export default RefreshControl;
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { Ref } from 'react';
|
|
3
|
-
import type {
|
|
4
|
-
export
|
|
5
|
-
type: string;
|
|
6
|
-
children: any;
|
|
7
|
-
}[];
|
|
8
|
-
export interface RichTextEditorProps extends Omit<BaseRichTextEditorProps, 'editorRef'> {
|
|
3
|
+
import type { RichTextEditorInputProps, RichTextEditorRef } from './RichTextEditorInput';
|
|
4
|
+
export interface RichTextEditorProps extends Omit<RichTextEditorInputProps, 'editorRef'> {
|
|
9
5
|
/**
|
|
10
6
|
* Field label
|
|
11
7
|
*/
|
package/types/components/RichTextEditor/{BaseRichTextEditor.d.ts → RichTextEditorInput.d.ts}
RENAMED
|
@@ -11,7 +11,7 @@ export type EditorValue = {
|
|
|
11
11
|
type: string;
|
|
12
12
|
children: any;
|
|
13
13
|
}[];
|
|
14
|
-
export interface
|
|
14
|
+
export interface RichTextEditorInputProps {
|
|
15
15
|
/**
|
|
16
16
|
* If true, the editor will be focused when the user enters the screen
|
|
17
17
|
*/
|
|
@@ -65,5 +65,5 @@ export interface BaseRichTextEditorProps {
|
|
|
65
65
|
*/
|
|
66
66
|
onBlur?: () => void;
|
|
67
67
|
}
|
|
68
|
-
declare const
|
|
69
|
-
export default
|
|
68
|
+
declare const RichTextEditorInput: ({ autoFocus, name, placeholder, onChange, onCursorChange, style, testID, editorRef, value, onFocus, onBlur, }: RichTextEditorInputProps) => ReactElement;
|
|
69
|
+
export default RichTextEditorInput;
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
import { View } from 'react-native';
|
|
2
1
|
import { WebView } from 'react-native-webview';
|
|
3
|
-
export declare const StyledWrapper: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
4
|
-
theme?: import("@emotion/react").Theme;
|
|
5
|
-
as?: React.ElementType;
|
|
6
|
-
}, {}, {
|
|
7
|
-
ref?: import("react").Ref<View> | undefined;
|
|
8
|
-
}>;
|
|
9
2
|
export declare const StyledWebView: import("@emotion/native").StyledComponent<import("react-native-webview/lib/WebViewTypes").IOSWebViewProps & import("react-native-webview/lib/WebViewTypes").AndroidWebViewProps & import("react-native-webview/lib/WebViewTypes").WindowsWebViewProps & {
|
|
10
3
|
theme?: import("@emotion/react").Theme;
|
|
11
4
|
as?: React.ElementType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EditorEvents, ToolbarEvents } from './constants';
|
|
2
2
|
import type { RichTextEditorProps } from './RichTextEditor';
|
|
3
|
-
import type { RichTextEditorRef } from './
|
|
3
|
+
import type { RichTextEditorRef } from './RichTextEditorInput';
|
|
4
4
|
export type { RichTextEditorProps, RichTextEditorRef };
|
|
5
5
|
declare const _default: import("react").ForwardRefExoticComponent<Omit<RichTextEditorProps, "forwardedRef"> & import("react").RefAttributes<RichTextEditorRef>> & {
|
|
6
6
|
Toolbar: ({ name, buttons, testID, }: import("./EditorToolbar").EditorToolbarProps) => import("react").JSX.Element | null;
|
|
@@ -66,6 +66,6 @@ declare const _default: import("react").ForwardRefExoticComponent<Omit<RichTextE
|
|
|
66
66
|
};
|
|
67
67
|
}[TEventName] : void) => void) => () => void;
|
|
68
68
|
};
|
|
69
|
-
Base: ({ autoFocus, name, placeholder, onChange, onCursorChange, style, testID, editorRef, value, onFocus, onBlur, }: import("./
|
|
69
|
+
Base: ({ autoFocus, name, placeholder, onChange, onCursorChange, style, testID, editorRef, value, onFocus, onBlur, }: import("./RichTextEditorInput").RichTextEditorInputProps) => import("react").ReactElement;
|
|
70
70
|
};
|
|
71
71
|
export default _default;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { EventEmitter } from 'events';
|
|
2
|
-
|
|
2
|
+
interface Listener<T> {
|
|
3
3
|
(data: T): void;
|
|
4
4
|
}
|
|
5
|
-
export declare const off: <T>(emitter: EventEmitter, eventName: string, listener: Listener<T>) => void;
|
|
6
5
|
export declare const emit: <T>(emitter: EventEmitter, eventName: string, data: T) => boolean;
|
|
7
|
-
export declare const setMaxListeners: (emitter: EventEmitter, n: number) => void;
|
|
8
6
|
export declare const on: <T>(emitter: EventEmitter, eventName: string, listener: Listener<T>) => () => void;
|
|
7
|
+
export {};
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import type { TextInputProps as NativeTextInputProps, TextInput as RNTextInput, StyleProp, ViewStyle, TextStyle } from 'react-native';
|
|
3
3
|
import type { State } from './StyledSearch';
|
|
4
4
|
import type { IconName } from '../Icon';
|
|
5
|
-
|
|
5
|
+
type SearchOneLineHandles = Pick<RNTextInput, 'focus' | 'clear' | 'blur' | 'isFocused' | 'setNativeProps'>;
|
|
6
6
|
interface SearchOneLineProps extends NativeTextInputProps {
|
|
7
7
|
/**
|
|
8
8
|
* Name of Icon or ReactElement to render on the left side of the input, before the user's cursor.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TextInput, View } from 'react-native';
|
|
2
2
|
export type State = 'default' | 'filled' | 'disabled' | 'readonly';
|
|
3
|
-
|
|
3
|
+
type Variant = 'basic' | 'reversed';
|
|
4
4
|
export declare const StyledContainer: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
5
5
|
theme?: import("@emotion/react").Theme;
|
|
6
6
|
as?: React.ElementType;
|
|
@@ -46,3 +46,4 @@ export declare const StyledBadge: import("@emotion/native").StyledComponent<(imp
|
|
|
46
46
|
theme?: import("@emotion/react").Theme;
|
|
47
47
|
as?: React.ElementType;
|
|
48
48
|
}), {}, {}>;
|
|
49
|
+
export {};
|