@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.
Files changed (135) hide show
  1. package/.turbo/turbo-build.log +3 -3
  2. package/CHANGELOG.md +12 -0
  3. package/es/index.js +1764 -1372
  4. package/jest.config.js +1 -1
  5. package/lib/index.js +1764 -1372
  6. package/package.json +2 -2
  7. package/src/components/Accordion/AccordionItem.tsx +1 -1
  8. package/src/components/AnimatedScroller/AnimatedScrollable.tsx +1 -1
  9. package/src/components/AnimatedScroller/SectionListWithFAB.tsx +1 -1
  10. package/src/components/Box/StyledBox.tsx +1 -1
  11. package/src/components/Button/UtilityButton/index.tsx +1 -1
  12. package/src/components/Calendar/CalendarRange.tsx +1 -1
  13. package/src/components/Calendar/CalendarRowItem.tsx +2 -2
  14. package/src/components/Calendar/index.tsx +1 -1
  15. package/src/components/Carousel/index.tsx +1 -1
  16. package/src/components/Chart/Line/Line.tsx +3 -4
  17. package/src/components/Chart/index.tsx +0 -2
  18. package/src/components/Chart/shared/ChartHeader.tsx +1 -1
  19. package/src/components/Chart/shared/hooks/useColorScale.ts +2 -2
  20. package/src/components/Chart/shared/hooks/useGenerateTicks.ts +2 -2
  21. package/src/components/Chart/shared/hooks/useScaleBandX.ts +3 -3
  22. package/src/components/Chart/shared/hooks/useScaleLinearY.ts +3 -4
  23. package/src/components/Chart/types.ts +0 -8
  24. package/src/components/Checkbox/utils.ts +1 -1
  25. package/src/components/Chip/index.tsx +1 -1
  26. package/src/components/DatePicker/hooks/__tests__/useFormatDate.spec.ts +7 -5
  27. package/src/components/DatePicker/hooks/useFormatDate.ts +1 -1
  28. package/src/components/DatePicker/types.ts +1 -1
  29. package/src/components/FloatingIsland/index.tsx +1 -1
  30. package/src/components/Illustration/index.tsx +1 -1
  31. package/src/components/List/BasicListItem.tsx +1 -1
  32. package/src/components/List/StyledListItem.tsx +2 -2
  33. package/src/components/LocaleProvider/__tests__/utils.specs.ts +1 -2
  34. package/src/components/LocaleProvider/index.tsx +1 -1
  35. package/src/components/LocaleProvider/utils.ts +2 -3
  36. package/src/components/Portal/index.tsx +1 -1
  37. package/src/components/Portal/types.tsx +2 -2
  38. package/src/components/Radio/Radio.tsx +1 -1
  39. package/src/components/Rate/index.tsx +2 -2
  40. package/src/components/RefreshControl/index.tsx +1 -1
  41. package/src/components/RichTextEditor/RichTextEditor.tsx +6 -6
  42. package/src/components/RichTextEditor/{BaseRichTextEditor.tsx → RichTextEditorInput.tsx} +4 -4
  43. package/src/components/RichTextEditor/StyledRichTextEditor.ts +0 -5
  44. package/src/components/RichTextEditor/__tests__/RichTextEditor.spec.tsx +19 -4
  45. package/src/components/RichTextEditor/index.tsx +3 -3
  46. package/src/components/RichTextEditor/utils/events.ts +1 -13
  47. package/src/components/Search/SearchOneLine.tsx +1 -1
  48. package/src/components/Search/StyledSearch.tsx +1 -1
  49. package/src/components/SectionHeading/index.tsx +1 -1
  50. package/src/components/Select/helpers.tsx +1 -18
  51. package/src/components/Skeleton/index.tsx +1 -1
  52. package/src/components/Slider/RangeSlider.tsx +1 -1
  53. package/src/components/StatusScreens/Success/index.tsx +1 -1
  54. package/src/components/Tabs/ScrollableTabsHeader/ScrollableTabsHeader.tsx +1 -1
  55. package/src/components/Tabs/StyledTabs.tsx +0 -5
  56. package/src/components/Tabs/TabWithBadge.tsx +2 -2
  57. package/src/components/TextInput/index.tsx +3 -3
  58. package/src/components/TimePicker/TimePickerAndroid.tsx +1 -1
  59. package/src/components/TimePicker/TimePickerIOS.tsx +1 -1
  60. package/src/components/TimePicker/types.ts +1 -1
  61. package/src/components/Toast/ToastContext.ts +1 -1
  62. package/src/components/Toolbar/index.tsx +1 -1
  63. package/src/components/Typography/Label/index.tsx +1 -1
  64. package/src/theme/global/colors/swagSystemPalette.ts +1 -1
  65. package/src/theme/global/colors/types.ts +1 -1
  66. package/src/theme/global/shadows/index.ts +0 -3
  67. package/src/theme/global/shadows/types.ts +1 -1
  68. package/src/theme/global/sizes.ts +1 -0
  69. package/src/theme/global/typography.ts +2 -1
  70. package/src/utils/scale.ts +2 -2
  71. package/types/components/Accordion/AccordionItem.d.ts +1 -1
  72. package/types/components/AnimatedScroller/AnimatedScrollable.d.ts +1 -1
  73. package/types/components/AnimatedScroller/SectionListWithFAB.d.ts +1 -1
  74. package/types/components/Box/StyledBox.d.ts +0 -5
  75. package/types/components/Button/UtilityButton/index.d.ts +1 -1
  76. package/types/components/Calendar/CalendarRowItem.d.ts +1 -2
  77. package/types/components/Carousel/index.d.ts +0 -1
  78. package/types/components/Chart/index.d.ts +0 -3
  79. package/types/components/Chart/shared/ChartHeader.d.ts +1 -1
  80. package/types/components/Chart/shared/hooks/useScaleBandX.d.ts +2 -3
  81. package/types/components/Chart/shared/hooks/useScaleLinearY.d.ts +2 -3
  82. package/types/components/Chart/types.d.ts +1 -7
  83. package/types/components/Checkbox/utils.d.ts +2 -1
  84. package/types/components/Chip/index.d.ts +1 -1
  85. package/types/components/DatePicker/types.d.ts +1 -1
  86. package/types/components/FloatingIsland/index.d.ts +1 -1
  87. package/types/components/Illustration/index.d.ts +1 -1
  88. package/types/components/List/BasicListItem.d.ts +1 -1
  89. package/types/components/List/StyledListItem.d.ts +2 -2
  90. package/types/components/LocaleProvider/utils.d.ts +1 -1
  91. package/types/components/Portal/index.d.ts +1 -1
  92. package/types/components/Portal/types.d.ts +3 -2
  93. package/types/components/Radio/Radio.d.ts +1 -1
  94. package/types/components/Rate/index.d.ts +2 -2
  95. package/types/components/RefreshControl/index.d.ts +1 -1
  96. package/types/components/RichTextEditor/RichTextEditor.d.ts +2 -6
  97. package/types/components/RichTextEditor/{BaseRichTextEditor.d.ts → RichTextEditorInput.d.ts} +3 -3
  98. package/types/components/RichTextEditor/StyledRichTextEditor.d.ts +0 -7
  99. package/types/components/RichTextEditor/index.d.ts +2 -2
  100. package/types/components/RichTextEditor/utils/events.d.ts +2 -3
  101. package/types/components/Search/SearchOneLine.d.ts +1 -1
  102. package/types/components/Search/StyledSearch.d.ts +2 -1
  103. package/types/components/SectionHeading/index.d.ts +1 -1
  104. package/types/components/Select/helpers.d.ts +2 -2
  105. package/types/components/Skeleton/index.d.ts +1 -1
  106. package/types/components/Slider/RangeSlider.d.ts +1 -1
  107. package/types/components/StatusScreens/Success/index.d.ts +1 -1
  108. package/types/components/Tabs/ScrollableTabsHeader/ScrollableTabsHeader.d.ts +1 -1
  109. package/types/components/Tabs/StyledTabs.d.ts +1 -7
  110. package/types/components/Tabs/TabWithBadge.d.ts +2 -2
  111. package/types/components/TextInput/index.d.ts +2 -3
  112. package/types/components/TimePicker/types.d.ts +1 -1
  113. package/types/components/Toast/ToastContext.d.ts +2 -1
  114. package/types/components/Toolbar/index.d.ts +1 -1
  115. package/types/components/Typography/Label/index.d.ts +1 -1
  116. package/types/theme/components/alert.d.ts +10 -1
  117. package/types/theme/components/bottomNavigation.d.ts +10 -1
  118. package/types/theme/components/chip.d.ts +10 -1
  119. package/types/theme/components/fab.d.ts +10 -1
  120. package/types/theme/components/floatingIsland.d.ts +10 -1
  121. package/types/theme/components/list.d.ts +10 -1
  122. package/types/theme/components/search.d.ts +10 -1
  123. package/types/theme/components/segmentedControl.d.ts +10 -1
  124. package/types/theme/components/slider.d.ts +10 -1
  125. package/types/theme/components/toast.d.ts +10 -1
  126. package/types/theme/global/colors/swagSystemPalette.d.ts +1 -1
  127. package/types/theme/global/colors/types.d.ts +2 -1
  128. package/types/theme/global/index.d.ts +1 -1
  129. package/types/theme/global/shadows/index.d.ts +0 -2
  130. package/types/theme/global/shadows/types.d.ts +2 -1
  131. package/types/theme/global/typography.d.ts +1 -1
  132. package/types/utils/scale.d.ts +0 -2
  133. package/.cursor/rules/performance-optimization.mdc +0 -64
  134. package/.cursor/rules/rn-rules.mdc +0 -165
  135. 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
- export type ScrollParams = {
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
- export interface SkeletonProps extends ViewProps {
15
+ interface SkeletonProps extends ViewProps {
16
16
  /**
17
17
  * Intent of the component.
18
18
  */
@@ -15,7 +15,7 @@ export type SliderRangeValue = {
15
15
  end: number;
16
16
  };
17
17
 
18
- export interface RangeSliderProps {
18
+ interface RangeSliderProps {
19
19
  /**
20
20
  * Minimum value of the slider.
21
21
  */
@@ -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
- export interface SuccessProps extends ViewProps {
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
- export interface ScrollableTabHeaderProps extends ViewProps {
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
- export type StatusBadgeType = {
8
+ type StatusBadgeType = {
9
9
  type: 'status';
10
10
  };
11
11
 
12
- export type CounterBadgeType = {
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
- export type TextInputVariant = 'text' | 'textarea';
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
- export interface TextInputRef {
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
- export const getDisplayText = (value?: string, defaultValue?: string) => {
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/format';
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/format';
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/v2.16.1/docs/format).
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;
@@ -21,7 +21,7 @@ export const ToastContext = createContext<ToastControllerContextType>(
21
21
  fallbackToastControlContext
22
22
  );
23
23
 
24
- export type ToastConfigContextType = Pick<
24
+ type ToastConfigContextType = Pick<
25
25
  ToastContainerProps,
26
26
  'position' | 'displayType'
27
27
  >;
@@ -5,7 +5,7 @@ import { ToolbarWrapper } from './StyledToolbar';
5
5
  import ToolbarGroup from './ToolbarGroup';
6
6
  import ToolbarMessage from './ToolbarMessage';
7
7
 
8
- export interface ToolbarProps extends Omit<ViewProps, 'style'> {
8
+ interface ToolbarProps extends Omit<ViewProps, 'style'> {
9
9
  /**
10
10
  * Toolbar's content.
11
11
  */
@@ -8,7 +8,7 @@ import type {
8
8
  import { StyledLabel } from './StyledLabel';
9
9
  import type { TypographyIntent } from '../types';
10
10
 
11
- export interface LabelProps extends NativeTextProps {
11
+ interface LabelProps extends NativeTextProps {
12
12
  /**
13
13
  * Text content.
14
14
  */
@@ -1,7 +1,7 @@
1
1
  import ehWorkSystemPalette from './ehWork';
2
2
  import type { SystemPalette } from './types';
3
3
 
4
- export const swagSystemPalette: SystemPalette = {
4
+ const swagSystemPalette: SystemPalette = {
5
5
  ...ehWorkSystemPalette,
6
6
  name: 'swagLight',
7
7
  };
@@ -65,7 +65,7 @@ export type BrandSystemPalette = {
65
65
  };
66
66
 
67
67
  export type ThemeMode = 'light' | 'dark';
68
- export type ThemeName =
68
+ type ThemeName =
69
69
  | 'swagLight'
70
70
  | 'swagLightJobs'
71
71
  | 'ehWorkDark'
@@ -21,7 +21,4 @@ const getShadows = (palette: SystemPalette) => {
21
21
  }
22
22
  };
23
23
 
24
- type Shadows = ReturnType<typeof getShadows>;
25
-
26
24
  export { getShadows };
27
- export type { Shadows };
@@ -1,4 +1,4 @@
1
- export type ShadowStyles = {
1
+ type ShadowStyles = {
2
2
  shadowOffset: {
3
3
  width: number;
4
4
  height: number;
@@ -26,4 +26,5 @@ const getSizes = (baseSize: number): Sizes => ({
26
26
  });
27
27
 
28
28
  export { getSizes };
29
+
29
30
  export type { Sizes };
@@ -103,4 +103,5 @@ const getLineHeights = (fontSizes: FontSizes): LineHeights => {
103
103
  };
104
104
 
105
105
  export { getFonts, getFontSizes, getLineHeights };
106
- export type { Fonts, FontSizes, LineHeights };
106
+
107
+ export type { Fonts, FontSizes };
@@ -1,8 +1,8 @@
1
1
  import { Dimensions, Platform } from 'react-native';
2
2
 
3
- export const BASE_WIDTH = 390; // Based on iPhone 13's viewport size
3
+ const BASE_WIDTH = 390; // Based on iPhone 13's viewport size
4
4
 
5
- export const horizontalScale = (size: number) => {
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
- export type AccordionItemProps = {
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
- export interface AnimatedScrollerProps<T> {
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
- export interface SectionListWithFABProps<T> extends SectionListProps<T> {
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
- export interface UtilityButtonProps extends ViewProps {
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
- export declare const getCellVariant: (isSelected?: boolean, isCurrent?: boolean, isHighlighted?: boolean) => "default" | "highlighted" | "current" | "selected";
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
- export type ChartHeaderProps = HeaderConfig & {
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
- import * as d3 from 'd3';
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
- import * as d3 from 'd3';
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, TickConfig, XAxisConfig, YAxisConfig, DataValue, AxisCoordinates, HeaderConfig, StyleConfig, };
91
+ export type { Series, XAxisConfig, YAxisConfig, DataValue, AxisCoordinates, HeaderConfig, StyleConfig, };
@@ -1,6 +1,7 @@
1
- export type getStateType = {
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
- export interface ChipProps extends ViewProps {
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/v2.16.1/docs/format).
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
- export interface FloatingIslandProps extends ViewProps {
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
- export interface IllustrationProps {
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
- export interface ListItemProps {
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
- export type Variant = 'full-width' | 'card';
3
- export type LeadingStatusIntent = 'success' | 'warning' | 'danger' | 'info' | 'archived';
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;
@@ -1,3 +1,3 @@
1
- import type { Locale } from 'date-fns';
1
+ import type { Locale } from 'date-fns/locale';
2
2
  import type { LocaleCode } from '../../locales/types';
3
3
  export declare function getDateFnsLocale(locale: LocaleCode): Locale;
@@ -1,7 +1,7 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import React from 'react';
3
3
  import type { Theme } from '../../theme';
4
- export interface PortalProps {
4
+ interface PortalProps {
5
5
  name?: string;
6
6
  hostName?: string;
7
7
  children?: ReactNode | ReactNode[];
@@ -11,12 +11,13 @@ export interface RemovePortalAction {
11
11
  hostName: string;
12
12
  portalName: string;
13
13
  }
14
- export interface RegisterHostAction {
14
+ interface RegisterHostAction {
15
15
  type: ACTIONS;
16
16
  hostName: string;
17
17
  }
18
- export interface UnregisterHostAction {
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,7 +1,7 @@
1
1
  import type { ReactElement, ReactNode } from 'react';
2
2
  import type { StyleProp, ViewStyle } from 'react-native';
3
3
  import type { IconName } from '../Icon';
4
- export interface RadioProps {
4
+ interface RadioProps {
5
5
  /**
6
6
  * Whether the radio is checked.
7
7
  */
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
2
  import type { ViewProps } from 'react-native';
3
- export interface RateOption<T extends string | number> {
3
+ interface RateOption<T extends string | number> {
4
4
  value: T;
5
5
  }
6
- export interface RateProps<T extends string | number> extends ViewProps {
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
- export type RefreshControlProps = Omit<NativeRefreshControlProps, 'colors' | 'tintColor'>;
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 { BaseRichTextEditorProps, RichTextEditorRef } from './BaseRichTextEditor';
4
- export type EditorValue = {
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
  */
@@ -11,7 +11,7 @@ export type EditorValue = {
11
11
  type: string;
12
12
  children: any;
13
13
  }[];
14
- export interface BaseRichTextEditorProps {
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 BaseRichTextEditor: ({ autoFocus, name, placeholder, onChange, onCursorChange, style, testID, editorRef, value, onFocus, onBlur, }: BaseRichTextEditorProps) => ReactElement;
69
- export default BaseRichTextEditor;
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 './BaseRichTextEditor';
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("./BaseRichTextEditor").BaseRichTextEditorProps) => import("react").ReactElement;
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
- export interface Listener<T> {
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
- export type SearchOneLineHandles = Pick<RNTextInput, 'focus' | 'clear' | 'blur' | 'isFocused' | 'setNativeProps'>;
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
- export type Variant = 'basic' | 'reversed';
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 {};