@hero-design/rn 8.131.1 → 8.131.3

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 (52) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/es/index.js +39 -86
  3. package/lib/index.js +38 -85
  4. package/package.json +1 -1
  5. package/src/components/Alert/index.tsx +1 -1
  6. package/src/components/AppCue/index.tsx +1 -1
  7. package/src/components/Attachment/index.tsx +1 -1
  8. package/src/components/BottomNavigation/index.tsx +1 -1
  9. package/src/components/Carousel/index.tsx +1 -1
  10. package/src/components/Chip/index.tsx +1 -1
  11. package/src/components/ContentNavigator/index.tsx +1 -1
  12. package/src/components/Divider/index.tsx +1 -1
  13. package/src/components/Drawer/index.tsx +1 -1
  14. package/src/components/FloatingIsland/index.tsx +1 -1
  15. package/src/components/HeroDesignProvider/index.tsx +1 -1
  16. package/src/components/Icon/index.tsx +0 -2
  17. package/src/components/LocaleProvider/index.tsx +1 -1
  18. package/src/components/PinInput/index.tsx +1 -1
  19. package/src/components/Rate/index.tsx +1 -1
  20. package/src/components/RefreshControl/index.tsx +1 -1
  21. package/src/components/SectionHeading/index.tsx +1 -1
  22. package/src/components/Skeleton/index.tsx +1 -1
  23. package/src/components/Spinner/index.tsx +1 -1
  24. package/src/components/Tabs/ScrollableTabsHeader/hooks/useIndicatorAnimation.ts +68 -62
  25. package/src/components/Tabs/StyledScrollableTabs.tsx +4 -4
  26. package/src/components/Tag/index.tsx +1 -1
  27. package/src/types.ts +99 -99
  28. package/types/components/Alert/index.d.ts +1 -1
  29. package/types/components/AppCue/index.d.ts +1 -1
  30. package/types/components/Attachment/index.d.ts +1 -1
  31. package/types/components/BottomNavigation/StyledBottomNavigation.d.ts +1 -1
  32. package/types/components/BottomNavigation/index.d.ts +1 -1
  33. package/types/components/Carousel/index.d.ts +1 -1
  34. package/types/components/Chip/index.d.ts +1 -1
  35. package/types/components/ContentNavigator/index.d.ts +1 -1
  36. package/types/components/Divider/index.d.ts +1 -1
  37. package/types/components/Drawer/index.d.ts +1 -1
  38. package/types/components/FloatingIsland/index.d.ts +1 -1
  39. package/types/components/HeroDesignProvider/index.d.ts +1 -1
  40. package/types/components/Icon/index.d.ts +0 -2
  41. package/types/components/LocaleProvider/index.d.ts +1 -1
  42. package/types/components/PinInput/index.d.ts +1 -1
  43. package/types/components/Rate/index.d.ts +1 -1
  44. package/types/components/RefreshControl/index.d.ts +1 -1
  45. package/types/components/SectionHeading/index.d.ts +1 -1
  46. package/types/components/Skeleton/index.d.ts +1 -1
  47. package/types/components/Spinner/index.d.ts +1 -1
  48. package/types/components/StatusScreens/Error/StyledError.d.ts +1 -1
  49. package/types/components/StatusScreens/Success/StyledSuccess.d.ts +1 -1
  50. package/types/components/Tabs/ScrollableTabsHeader/hooks/useIndicatorAnimation.d.ts +0 -38
  51. package/types/components/Tag/index.d.ts +1 -1
  52. package/types/types.d.ts +89 -43
@@ -2,7 +2,7 @@ import type { ComponentProps } from 'react';
2
2
  import React from 'react';
3
3
  import type { StyleProp, ViewStyle, TextInput } from 'react-native';
4
4
  import type { State } from './StyledPinInput';
5
- interface PinInputProps {
5
+ export interface PinInputProps {
6
6
  /**
7
7
  * The value to show for the input.
8
8
  */
@@ -3,7 +3,7 @@ import type { ViewProps } from 'react-native';
3
3
  interface RateOption<T extends string | number> {
4
4
  value: T;
5
5
  }
6
- interface RateProps<T extends string | number> extends ViewProps {
6
+ export 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
- type RefreshControlProps = Omit<NativeRefreshControlProps, 'colors' | 'tintColor'>;
3
+ export type RefreshControlProps = Omit<NativeRefreshControlProps, 'colors' | 'tintColor'>;
4
4
  declare const RefreshControl: ({ ...props }: RefreshControlProps) => React.JSX.Element;
5
5
  export default RefreshControl;
@@ -1,7 +1,7 @@
1
1
  import type { ReactElement } from 'react';
2
2
  import type { StyleProp, ViewProps, ViewStyle } from 'react-native';
3
3
  import type { IconName, IconProps } from '../Icon';
4
- interface SectionHeadingProps extends ViewProps {
4
+ export interface SectionHeadingProps extends ViewProps {
5
5
  /**
6
6
  * Heading text.
7
7
  */
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { ViewProps } from 'react-native';
3
- interface SkeletonProps extends ViewProps {
3
+ export interface SkeletonProps extends ViewProps {
4
4
  /**
5
5
  * Intent of the component.
6
6
  */
@@ -1,6 +1,6 @@
1
1
  import type { ReactElement } from 'react';
2
2
  import type { ViewProps } from 'react-native';
3
- interface SpinnerProps extends ViewProps {
3
+ export interface SpinnerProps extends ViewProps {
4
4
  /**
5
5
  * Size of Spinner.
6
6
  */
@@ -24,7 +24,7 @@ declare const StyledErrorButtonContainer: import("@emotion/native").StyledCompon
24
24
  }, {}, {
25
25
  ref?: import("react").Ref<View> | undefined;
26
26
  }>;
27
- declare const StyledErrorButtonSecondary: import("@emotion/native").StyledComponent<import("../../Button/Button").ButtonProps & {
27
+ declare const StyledErrorButtonSecondary: import("@emotion/native").StyledComponent<import("../../..").ButtonProps & {
28
28
  theme?: import("@emotion/react").Theme;
29
29
  as?: React.ElementType;
30
30
  }, {}, {}>;
@@ -44,7 +44,7 @@ declare const StyledSuccessButtonContainer: import("@emotion/native").StyledComp
44
44
  }, {}, {
45
45
  ref?: import("react").Ref<View> | undefined;
46
46
  }>;
47
- declare const StyledSuccessButtonSecondary: import("@emotion/native").StyledComponent<import("../../Button/Button").ButtonProps & {
47
+ declare const StyledSuccessButtonSecondary: import("@emotion/native").StyledComponent<import("../../..").ButtonProps & {
48
48
  theme?: import("@emotion/react").Theme;
49
49
  as?: React.ElementType;
50
50
  }, {}, {}>;
@@ -1,43 +1,5 @@
1
1
  import { Animated } from 'react-native';
2
2
  import type { LayoutChangeEvent } from 'react-native';
3
- /**
4
- * Drives two visual layers that slide to the selected tab on every press:
5
- *
6
- * Layer 1 — bottom border / underline (indicatorStyle)
7
- * ─────────────────────────────────────────────────────
8
- * Uses the "width:1 + scaleX" trick: the element has a fixed stylesheet
9
- * width of 1px and scaleX is set to the target pixel width, giving a visual
10
- * width of 1 × scaleX pixels without touching any layout property.
11
- * Both translateX and scaleX are transform properties → native driver.
12
- * Caveat: scaleX also scales border-radius, so this layer has no border-radius.
13
- *
14
- * Layer 2 — pill background (pillLeftStyle / pillBodyStyle / pillRightStyle)
15
- * ─────────────────────────────────────────────────────────────────────────────
16
- * The pill is split into three absolutely-positioned children so that
17
- * border-radius is never distorted by scale:
18
- *
19
- * ┌──────────────────────────────────────────────────────┐
20
- * │ [cap-left 8px] [body width-1 + scaleX] [cap-right 8px] │
21
- * └──────────────────────────────────────────────────────┘
22
- *
23
- * cap-left — fixed 8px wide, borderTopLeftRadius:8, translateX = pillX
24
- * body — width:1 + scaleX trick (scaleX = tabWidth - 16),
25
- * transformOrigin 'left center',
26
- * translateX = pillX + 8 (via Animated.add)
27
- * cap-right — fixed 8px wide, borderTopRightRadius:8,
28
- * translateX = pillX + tabWidth - 8 (via Animated.add)
29
- *
30
- * All four animated values use the native driver (translateX and scaleX are
31
- * transform properties). `width` is never animated, so no JS driver needed.
32
- *
33
- * Driver summary:
34
- * indicatorX native translateX — slides the bottom border
35
- * indicatorScaleX native scaleX — stretches the bottom border
36
- * pillX native translateX — slides all three pill pieces
37
- * pillBodyScaleX native scaleX — stretches the pill body
38
- * pillRightOffsetX native translateX — positions the right cap
39
- * (Animated.add: pillX + tabWidth - 8)
40
- */
41
3
  declare const useIndicatorAnimation: ({ selectedIndex, tabsLength, pillCapWidth, }: {
42
4
  selectedIndex: number | undefined;
43
5
  tabsLength: number;
@@ -1,7 +1,7 @@
1
1
  import type { ReactElement } from 'react';
2
2
  import type { StyleProp, ViewProps, ViewStyle } from 'react-native';
3
3
  import type { IconName } from '../Icon';
4
- interface TagProps extends ViewProps {
4
+ export interface TagProps extends ViewProps {
5
5
  /**
6
6
  * Content of the Tag.
7
7
  */
package/types/types.d.ts CHANGED
@@ -1,43 +1,89 @@
1
- import type { BottomNavigationTabType } from './components/BottomNavigation';
2
- import type { IconName, IconProps } from './components/Icon';
3
- import type { SingleSelectProps, MultiSelectProps } from './components/Select';
4
- import type { TabType } from './components/Tabs';
5
- import type { TextInputProps, TextInputHandles } from './components/TextInput';
6
- import type { RichTextEditorRef, RichTextEditorProps } from './components/RichTextEditor';
7
- import type { Theme } from './theme';
8
- import type { ListRenderOptionInfo, SectionListRenderOptionInfo, SelectOptionType } from './components/Select/types';
9
- import type { SwipeableProps } from './components/Swipeable';
10
- import type { TextProps } from './components/Typography/Text';
11
- import type { CardCarouselHandles } from './components/Carousel/CardCarousel';
12
- import type { FABHandles } from './components/FAB/FAB';
13
- import type { ActionGroupHandles, ActionGroupProps } from './components/FAB/ActionGroup';
14
- import type { ActionItemProps } from './components/FAB/ActionGroup/ActionItem';
15
- import type { SliderRangeValue } from './components/Slider/RangeSlider';
16
- import type { CalendarDateRange } from './components/Calendar/CalendarRange';
17
- import type { LocaleCode, LocaleValues, DateTimeFormats } from './locales/types';
18
- import type { ColumnChartProps } from './components/Chart/ColumnChart';
19
- import type { LineChartProps } from './components/Chart/Line';
20
- import type { Scale, SystemPalette } from './theme/global';
21
- import type { BrandSystemPalette, GlobalSystemPalette } from './theme/global/colors/types';
22
- import type { ToolbarItemProps } from './components/Toolbar/ToolbarItem';
23
- import type { CheckboxProps } from './components/Checkbox';
24
- import type { SwitchOptionType } from './components/Switch/SelectorSwitch';
25
- import type { BoxProps } from './components/Box';
26
- import type { BodyProps } from './components/Typography/Body';
27
- import type { ToolbarButtonName } from './components/RichTextEditor/types';
28
- import type { ListItemProps } from './components/List/ListItem';
29
- import type { IconButtonProps } from './components/Button/IconButton';
30
- import type { BadgeProps } from './components/Badge';
31
- import type { ToastProps } from './components/Toast/types';
32
- import type { Space } from './theme/global/space';
33
- import type { CaptionProps } from './components/Typography/Caption';
34
- import type { Radii } from './theme/global/borders';
35
- import type { TitleProps } from './components/Typography/Title';
36
- import type { CarouselData, CarouselImageProps } from './components/Carousel/types';
37
- import type { PinInputHandler } from './components/PinInput';
38
- import type { ThemeScale } from './components/Box/types';
39
- import type { TimePickerProps } from './components/TimePicker/types';
40
- import type { DatePickerProps } from './components/DatePicker/types';
41
- import type { SegmentedControlItemConfig } from './components/SegmentedControl/types';
42
- import type { ProgressSegmentedBarProps } from './components/Progress/SegmentedBar/types';
43
- export type { Space, CaptionProps, Radii, TitleProps, CarouselData, CarouselImageProps, PinInputHandler, ThemeScale, ToastProps, ActionGroupProps, ToolbarItemProps, BottomNavigationTabType, IconName, SingleSelectProps, MultiSelectProps, ListRenderOptionInfo, SectionListRenderOptionInfo, SelectOptionType, SwipeableProps, RichTextEditorProps, RichTextEditorRef, TabType, TextInputProps, TextProps, TextInputHandles, Theme, CardCarouselHandles, FABHandles, ActionGroupHandles, ActionItemProps, SliderRangeValue, CalendarDateRange, LocaleCode, LocaleValues, DateTimeFormats, ColumnChartProps, LineChartProps, Scale, SystemPalette, BrandSystemPalette, GlobalSystemPalette, IconProps, CheckboxProps, SwitchOptionType, BoxProps, BodyProps, ToolbarButtonName, ListItemProps, IconButtonProps, BadgeProps, TimePickerProps, DatePickerProps, SegmentedControlItemConfig, ProgressSegmentedBarProps, };
1
+ export type { BottomNavigationTabType, BottomNavigationProps, } from './components/BottomNavigation';
2
+ export type { IconName, IconProps } from './components/Icon';
3
+ export type { SingleSelectProps, MultiSelectProps } from './components/Select';
4
+ export type { TabType, TabsHeaderProps, TabsProps } from './components/Tabs';
5
+ export type { TextInputProps, TextInputHandles } from './components/TextInput';
6
+ export type { RichTextEditorRef, RichTextEditorProps, } from './components/RichTextEditor';
7
+ export type { Theme } from './theme';
8
+ export type { ListRenderOptionInfo, SectionListRenderOptionInfo, SelectOptionType, } from './components/Select/types';
9
+ export type { SwipeableProps } from './components/Swipeable';
10
+ export type { TextProps } from './components/Typography/Text';
11
+ export type { CardCarouselHandles, CardCarouselProps, } from './components/Carousel/CardCarousel';
12
+ export type { FABHandles, FABProps } from './components/FAB/FAB';
13
+ export type { ActionGroupHandles, ActionGroupProps, } from './components/FAB/ActionGroup';
14
+ export type { ActionItemProps } from './components/FAB/ActionGroup/ActionItem';
15
+ export type { SliderRangeValue } from './components/Slider/RangeSlider';
16
+ export type { CalendarDateRange } from './components/Calendar/CalendarRange';
17
+ export type { LocaleCode, LocaleValues, DateTimeFormats, } from './locales/types';
18
+ export type { ColumnChartProps } from './components/Chart/ColumnChart';
19
+ export type { LineChartProps } from './components/Chart/Line';
20
+ export type { Scale, SystemPalette } from './theme/global';
21
+ export type { BrandSystemPalette, GlobalSystemPalette, } from './theme/global/colors/types';
22
+ export type { ToolbarItemProps } from './components/Toolbar/ToolbarItem';
23
+ export type { CheckboxProps } from './components/Checkbox';
24
+ export type { SwitchOptionType } from './components/Switch/SelectorSwitch';
25
+ export type { BoxProps } from './components/Box';
26
+ export type { BodyProps } from './components/Typography/Body';
27
+ export type { ToolbarButtonName } from './components/RichTextEditor/types';
28
+ export type { ListItemProps } from './components/List/ListItem';
29
+ export type { IconButtonProps } from './components/Button/IconButton';
30
+ export type { BadgeProps } from './components/Badge';
31
+ export type { ToastProps, ToastContainerProps, ToastItemProps, } from './components/Toast/types';
32
+ export type { Space } from './theme/global/space';
33
+ export type { CaptionProps } from './components/Typography/Caption';
34
+ export type { Radii } from './theme/global/borders';
35
+ export type { TitleProps } from './components/Typography/Title';
36
+ export type { CarouselData, CarouselImageProps, } from './components/Carousel/types';
37
+ export type { PinInputHandler, PinInputProps } from './components/PinInput';
38
+ export type { ThemeScale } from './components/Box/types';
39
+ export type { TimePickerProps } from './components/TimePicker/types';
40
+ export type { DatePickerProps } from './components/DatePicker/types';
41
+ export type { SegmentedControlItemConfig } from './components/SegmentedControl/types';
42
+ export type { ProgressSegmentedBarProps } from './components/Progress/SegmentedBar/types';
43
+ export type { DragableDrawerProps } from './components/Drawer/DragableDrawer';
44
+ export type { DragableScrollViewProps } from './components/Drawer/DragableDrawer/DragableScrollView';
45
+ export type { PortalHostProps } from './components/Portal/PortalHost';
46
+ export type { PortalProviderProps } from './components/Portal/PortalProvider';
47
+ export type { ToolbarGroupProps } from './components/Toolbar/ToolbarGroup';
48
+ export type { InlineCheckboxProps } from './components/Checkbox/InlineCheckBox';
49
+ export type { EditorToolbarProps } from './components/RichTextEditor/EditorToolbar';
50
+ export type { RichTextEditorInputProps } from './components/RichTextEditor/RichTextEditorInput';
51
+ export type { AccordionProps } from './components/Accordion';
52
+ export type { AlertProps } from './components/Alert';
53
+ export type { AppCueProps } from './components/AppCue';
54
+ export type { AttachmentProps } from './components/Attachment';
55
+ export type { AvatarProps } from './components/Avatar/Avatar';
56
+ export type { AvatarStackProps } from './components/Avatar/AvatarStack';
57
+ export type { BottomSheetProps } from './components/BottomSheet';
58
+ export type { ButtonProps } from './components/Button/Button';
59
+ export type { CalendarProps } from './components/Calendar/types';
60
+ export type { CardProps } from './components/Card';
61
+ export type { CarouselProps } from './components/Carousel';
62
+ export type { ChipProps } from './components/Chip';
63
+ export type { CollapseProps } from './components/Collapse';
64
+ export type { ContentNavigatorProps } from './components/ContentNavigator';
65
+ export type { DividerProps } from './components/Divider';
66
+ export type { DrawerProps } from './components/Drawer';
67
+ export type { FilterTriggerProps } from './components/FilterTrigger';
68
+ export type { FloatingIslandProps } from './components/FloatingIsland';
69
+ export type { HeroDesignProviderProps } from './components/HeroDesignProvider';
70
+ export type { ImageProps } from './components/Image';
71
+ export type { InlineLoaderProps } from './components/InlineLoader';
72
+ export type { LabelProps } from './components/Typography/Label';
73
+ export type { LocaleProviderProps } from './components/LocaleProvider';
74
+ export type { MapPinProps } from './components/MapPin/types';
75
+ export type { ModalProps } from './components/Modal';
76
+ export type { PageControlProps } from './components/PageControl';
77
+ export type { ProgressBarProps } from './components/Progress/ProgressBar';
78
+ export type { ProgressCircleProps } from './components/Progress/ProgressCircle';
79
+ export type { ProgressStepProps } from './components/Progress/ProgressStep';
80
+ export type { RadioGroupProps } from './components/Radio/RadioGroup';
81
+ export type { RateProps } from './components/Rate';
82
+ export type { RefreshControlProps } from './components/RefreshControl';
83
+ export type { SectionHeadingProps } from './components/SectionHeading';
84
+ export type { SegmentedControlProps } from './components/SegmentedControl';
85
+ export type { SingleSliderProps } from './components/Slider/SingleSlider';
86
+ export type { SkeletonProps } from './components/Skeleton';
87
+ export type { SpinnerProps } from './components/Spinner';
88
+ export type { SwitchProps } from './components/Switch';
89
+ export type { TagProps } from './components/Tag';