@hero-design/rn 8.103.3 → 8.103.4

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 (43) hide show
  1. package/.turbo/turbo-build.log +3 -3
  2. package/CHANGELOG.md +8 -0
  3. package/es/index.js +43 -21
  4. package/lib/index.js +43 -21
  5. package/package.json +3 -3
  6. package/src/components/DatePicker/DatePicker.tsx +38 -0
  7. package/src/components/DatePicker/DatePickerAndroid.tsx +6 -3
  8. package/src/components/DatePicker/DatePickerCalendar.tsx +6 -3
  9. package/src/components/DatePicker/DatePickerIOS.tsx +6 -3
  10. package/src/components/DatePicker/Dialog/IOSDialog.tsx +6 -1
  11. package/src/components/DatePicker/Dialog.tsx +15 -0
  12. package/src/components/DatePicker/index.internal.tsx +10 -0
  13. package/src/components/DatePicker/index.tsx +6 -29
  14. package/src/components/DatePicker/types.ts +6 -0
  15. package/src/components/TimePicker/TimePicker.tsx +15 -0
  16. package/src/components/TimePicker/TimePickerAndroid.tsx +6 -3
  17. package/src/components/TimePicker/TimePickerIOS.tsx +6 -3
  18. package/src/components/TimePicker/index.internal.tsx +9 -0
  19. package/src/components/TimePicker/index.tsx +4 -13
  20. package/src/components/TimePicker/types.ts +6 -0
  21. package/src/index.internal.ts +3 -1
  22. package/src/types.internal.ts +9 -1
  23. package/src/types.ts +4 -0
  24. package/stats/8.103.3/rn-stats.html +0 -2
  25. package/stats/8.103.4/rn-stats.html +4844 -0
  26. package/types/components/Calendar/CalendarRowItem.d.ts +1 -1
  27. package/types/components/DatePicker/DatePicker.d.ts +4 -0
  28. package/types/components/DatePicker/DatePickerAndroid.d.ts +3 -3
  29. package/types/components/DatePicker/DatePickerCalendar.d.ts +2 -2
  30. package/types/components/DatePicker/DatePickerIOS.d.ts +3 -3
  31. package/types/components/DatePicker/Dialog.d.ts +4 -0
  32. package/types/components/DatePicker/index.d.ts +4 -5
  33. package/types/components/DatePicker/index.internal.d.ts +7 -0
  34. package/types/components/DatePicker/types.d.ts +4 -0
  35. package/types/components/TimePicker/TimePicker.d.ts +4 -0
  36. package/types/components/TimePicker/TimePickerAndroid.d.ts +2 -2
  37. package/types/components/TimePicker/TimePickerIOS.d.ts +2 -2
  38. package/types/components/TimePicker/index.d.ts +3 -3
  39. package/types/components/TimePicker/index.internal.d.ts +5 -0
  40. package/types/components/TimePicker/types.d.ts +4 -0
  41. package/types/index.internal.d.ts +3 -1
  42. package/types/types.d.ts +3 -1
  43. package/types/types.internal.d.ts +3 -1
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- export declare const getCellVariant: (isSelected?: boolean, isCurrent?: boolean, isHighlighted?: boolean) => "default" | "current" | "selected" | "highlighted";
2
+ export declare const getCellVariant: (isSelected?: boolean, isCurrent?: boolean, isHighlighted?: boolean) => "default" | "highlighted" | "current" | "selected";
3
3
  export interface CalendarRowItemProps {
4
4
  date?: Date;
5
5
  onPress?: () => void;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { InternalDatePickerProps } from './types';
3
+ declare const DatePicker: ({ variant, TextInputComponent, ...props }: InternalDatePickerProps) => React.JSX.Element;
4
+ export default DatePicker;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import type { DatePickerProps } from './types';
3
- type DatePickerAndroidProps = Omit<DatePickerProps, 'variant' | 'monthPickerConfirmLabel' | 'monthPickerCancelLabel'> & {
2
+ import type { InternalDatePickerProps } from './types';
3
+ type DatePickerAndroidProps = Omit<InternalDatePickerProps, 'variant' | 'monthPickerConfirmLabel' | 'monthPickerCancelLabel'> & {
4
4
  variant?: 'default' | 'month-year';
5
5
  };
6
- declare const DatePickerAndroid: ({ value, minDate, maxDate, label, placeholder, onChange, displayFormat, disabled, required, error, helpText, style, testID, variant, renderSelectedValue, locale, }: DatePickerAndroidProps) => React.JSX.Element;
6
+ declare const DatePickerAndroid: ({ value, minDate, maxDate, label, placeholder, onChange, displayFormat, disabled, required, error, helpText, style, testID, variant, renderSelectedValue, locale, TextInputComponent, }: DatePickerAndroidProps) => React.JSX.Element;
7
7
  export default DatePickerAndroid;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import type { DatePickerProps } from './types';
3
- declare const DatePickerCalendar: ({ value, minDate, maxDate, label, placeholder, onChange, confirmLabel, displayFormat, disabled, required, error, helpText, style, testID, monthPickerConfirmLabel, monthPickerCancelLabel, supportedOrientations, renderSelectedValue, locale, }: Omit<DatePickerProps, "variant">) => React.JSX.Element;
2
+ import type { InternalDatePickerProps } from './types';
3
+ declare const DatePickerCalendar: ({ value, minDate, maxDate, label, placeholder, onChange, confirmLabel, displayFormat, disabled, required, error, helpText, style, testID, monthPickerConfirmLabel, monthPickerCancelLabel, supportedOrientations, renderSelectedValue, locale, TextInputComponent, }: Omit<InternalDatePickerProps, "variant">) => React.JSX.Element;
4
4
  export default DatePickerCalendar;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import type { DatePickerProps } from './types';
3
- type DatePickerIOSProps = Omit<DatePickerProps, 'variant' | 'monthPickerConfirmLabel' | 'monthPickerCancelLabel'> & {
2
+ import type { InternalDatePickerProps } from './types';
3
+ type DatePickerIOSProps = Omit<InternalDatePickerProps, 'variant' | 'monthPickerConfirmLabel' | 'monthPickerCancelLabel'> & {
4
4
  variant?: 'default' | 'month-year';
5
5
  };
6
- declare const DatePickerIOS: ({ value, minDate, maxDate, label, placeholder, onChange, confirmLabel, displayFormat, disabled, required, error, helpText, style, testID, supportedOrientations, variant, locale, renderSelectedValue, }: DatePickerIOSProps) => React.JSX.Element;
6
+ declare const DatePickerIOS: ({ value, minDate, maxDate, label, placeholder, onChange, confirmLabel, displayFormat, disabled, required, error, helpText, style, testID, supportedOrientations, variant, locale, renderSelectedValue, TextInputComponent, }: DatePickerIOSProps) => React.JSX.Element;
7
7
  export default DatePickerIOS;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { DatePickerDialogProps } from './Dialog/type';
3
+ declare const Dialog: ({ ...props }: DatePickerDialogProps) => React.JSX.Element;
4
+ export default Dialog;
@@ -1,7 +1,6 @@
1
- import React from 'react';
2
- import type { DatePickerProps } from './types';
3
- import { DatePickerDialogProps } from './Dialog/type';
4
- declare const _default: (({ variant, ...props }: DatePickerProps) => React.JSX.Element) & {
5
- Dialog: ({ ...props }: DatePickerDialogProps) => React.JSX.Element;
1
+ import { FunctionComponent } from 'react';
2
+ import { DatePickerProps } from './types';
3
+ declare const _default: FunctionComponent<DatePickerProps> & {
4
+ Dialog: ({ ...props }: import("./Dialog/type").DatePickerDialogProps) => import("react").JSX.Element;
6
5
  };
7
6
  export default _default;
@@ -0,0 +1,7 @@
1
+ import { FunctionComponent } from 'react';
2
+ import { InternalDatePickerProps } from './types';
3
+ export type { InternalDatePickerProps as DatePickerProps };
4
+ declare const _default: FunctionComponent<InternalDatePickerProps> & {
5
+ Dialog: ({ ...props }: import("./Dialog/type").DatePickerDialogProps) => import("react").JSX.Element;
6
+ };
7
+ export default _default;
@@ -1,4 +1,5 @@
1
1
  import type { TextInputProps as NativeTextInputProps, StyleProp, ViewStyle } from 'react-native';
2
+ import { TextInputProps } from '../TextInput';
2
3
  export interface DatePickerProps {
3
4
  /**
4
5
  * Date picker input label.
@@ -92,3 +93,6 @@ export interface DatePickerProps {
92
93
  formattedDateString: string;
93
94
  }, props?: NativeTextInputProps) => React.ReactNode;
94
95
  }
96
+ export interface InternalDatePickerProps extends DatePickerProps {
97
+ TextInputComponent?: React.ComponentType<TextInputProps>;
98
+ }
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { InternalTimePickerProps } from './types';
3
+ declare const TimePicker: (props: InternalTimePickerProps) => React.JSX.Element;
4
+ export default TimePicker;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import type { TimePickerProps } from './types';
3
- declare const TimePickerAndroid: ({ value, label, placeholder, onChange, displayFormat, disabled, required, error, helpText, style, testID, showSuffix, }: TimePickerProps) => React.JSX.Element;
2
+ import type { InternalTimePickerProps } from './types';
3
+ declare const TimePickerAndroid: ({ value, label, placeholder, onChange, displayFormat, disabled, required, error, helpText, style, testID, showSuffix, TextInputComponent, }: InternalTimePickerProps) => React.JSX.Element;
4
4
  export default TimePickerAndroid;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import type { TimePickerProps } from './types';
3
- declare const TimePickerIOS: ({ value, label, placeholder, onChange, confirmLabel, displayFormat, disabled, required, error, helpText, style, testID, showSuffix, supportedOrientations, }: TimePickerProps) => React.JSX.Element;
2
+ import type { InternalTimePickerProps } from './types';
3
+ declare const TimePickerIOS: ({ value, label, placeholder, onChange, confirmLabel, displayFormat, disabled, required, error, helpText, style, testID, showSuffix, supportedOrientations, TextInputComponent, }: InternalTimePickerProps) => React.JSX.Element;
4
4
  export default TimePickerIOS;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { FunctionComponent } from 'react';
2
2
  import type { TimePickerProps } from './types';
3
- declare const TimePicker: (props: TimePickerProps) => React.JSX.Element;
4
- export default TimePicker;
3
+ declare const PublicTimePicker: FunctionComponent<TimePickerProps>;
4
+ export default PublicTimePicker;
@@ -0,0 +1,5 @@
1
+ import { FunctionComponent } from 'react';
2
+ import { InternalTimePickerProps } from './types';
3
+ declare const InternalTimePicker: FunctionComponent<InternalTimePickerProps>;
4
+ export type { InternalTimePickerProps as TimePickerProps };
5
+ export default InternalTimePicker;
@@ -1,4 +1,5 @@
1
1
  import type { StyleProp, ViewStyle } from 'react-native';
2
+ import { TextInputProps } from '../TextInput';
2
3
  export interface TimePickerProps {
3
4
  /**
4
5
  * Time picker input label.
@@ -59,3 +60,6 @@ export interface TimePickerProps {
59
60
  */
60
61
  supportedOrientations?: ('portrait' | 'landscape')[];
61
62
  }
63
+ export interface InternalTimePickerProps extends TimePickerProps {
64
+ TextInputComponent?: React.ComponentType<TextInputProps>;
65
+ }
@@ -1,4 +1,6 @@
1
1
  import Select from './components/Select/index.internal';
2
+ import DatePicker from './components/DatePicker/index.internal';
3
+ import TimePicker from './components/TimePicker/index.internal';
2
4
  export * from '.';
3
- export { Select };
5
+ export { Select, DatePicker, TimePicker };
4
6
  export type { MultiSelectProps, SingleSelectProps } from './types.internal';
package/types/types.d.ts CHANGED
@@ -36,4 +36,6 @@ import { TitleProps } from './components/Typography/Title';
36
36
  import { CarouselData, CarouselImageProps } from './components/Carousel/types';
37
37
  import { PinInputHandler } from './components/PinInput';
38
38
  import { ThemeScale } from './components/Box/types';
39
- 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, };
39
+ import { TimePickerProps } from './components/TimePicker/types';
40
+ import { DatePickerProps } from './components/DatePicker/types';
41
+ 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, };
@@ -1,3 +1,5 @@
1
1
  import type { SingleSelectProps, MultiSelectProps } from './components/Select/index.internal';
2
+ import type { DatePickerProps } from './components/DatePicker/index.internal';
3
+ import type { TimePickerProps } from './components/TimePicker/index.internal';
2
4
  export * from './types';
3
- export { SingleSelectProps, MultiSelectProps };
5
+ export { SingleSelectProps, MultiSelectProps, DatePickerProps, TimePickerProps, };