@hero-design/rn 8.103.6 → 8.103.7

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 (33) hide show
  1. package/.turbo/turbo-build.log +3 -3
  2. package/CHANGELOG.md +6 -0
  3. package/es/index.js +128 -61
  4. package/lib/index.js +128 -61
  5. package/package.json +1 -1
  6. package/src/components/DatePicker/DatePickerAndroid.tsx +18 -4
  7. package/src/components/DatePicker/DatePickerCalendar.tsx +18 -4
  8. package/src/components/DatePicker/DatePickerIOS.tsx +18 -4
  9. package/src/components/DatePicker/StyledDatePicker.tsx +19 -2
  10. package/src/components/DatePicker/__tests__/DatePicker.spec.tsx +102 -1
  11. package/src/components/DatePicker/__tests__/__snapshots__/DatePicker.spec.tsx.snap +3 -0
  12. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +1 -0
  13. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerCalendar.spec.tsx.snap +1 -0
  14. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +2 -0
  15. package/src/components/DatePicker/types.ts +11 -0
  16. package/src/components/TimePicker/StyledTimePicker.tsx +19 -2
  17. package/src/components/TimePicker/TimePickerAndroid.tsx +18 -4
  18. package/src/components/TimePicker/TimePickerIOS.tsx +21 -5
  19. package/src/components/TimePicker/__tests__/TimePicker.spec.tsx +72 -1
  20. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +2 -0
  21. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +2 -0
  22. package/src/components/TimePicker/types.ts +11 -0
  23. package/stats/8.103.6/rn-stats.html +0 -2
  24. package/stats/8.103.7/rn-stats.html +4844 -0
  25. package/types/components/DatePicker/DatePickerAndroid.d.ts +1 -1
  26. package/types/components/DatePicker/DatePickerCalendar.d.ts +1 -1
  27. package/types/components/DatePicker/DatePickerIOS.d.ts +1 -1
  28. package/types/components/DatePicker/StyledDatePicker.d.ts +8 -1
  29. package/types/components/DatePicker/types.d.ts +11 -0
  30. package/types/components/TimePicker/StyledTimePicker.d.ts +8 -1
  31. package/types/components/TimePicker/TimePickerAndroid.d.ts +1 -1
  32. package/types/components/TimePicker/TimePickerIOS.d.ts +1 -1
  33. package/types/components/TimePicker/types.d.ts +11 -0
@@ -3,5 +3,5 @@ import type { InternalDatePickerProps } from './types';
3
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, TextInputComponent, }: 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, inputProps, groupStyleEnabled, }: DatePickerAndroidProps) => React.JSX.Element;
7
7
  export default DatePickerAndroid;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
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;
3
+ declare const DatePickerCalendar: ({ value, minDate, maxDate, label, placeholder, onChange, confirmLabel, displayFormat, disabled, required, error, helpText, style, testID, monthPickerConfirmLabel, monthPickerCancelLabel, supportedOrientations, renderSelectedValue, locale, TextInputComponent, inputProps, groupStyleEnabled, }: Omit<InternalDatePickerProps, "variant">) => React.JSX.Element;
4
4
  export default DatePickerCalendar;
@@ -3,5 +3,5 @@ import type { InternalDatePickerProps } from './types';
3
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, TextInputComponent, }: 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, inputProps, groupStyleEnabled, }: DatePickerIOSProps) => React.JSX.Element;
7
7
  export default DatePickerIOS;
@@ -6,4 +6,11 @@ declare const StyledPickerWrapper: import("@emotion/native").StyledComponent<Vie
6
6
  }, {}, {
7
7
  ref?: import("react").Ref<View> | undefined;
8
8
  }>;
9
- export { StyledPickerWrapper };
9
+ declare const StyledTouchableOpacity: import("@emotion/native").StyledComponent<import("react-native").TouchableOpacityProps & import("react").RefAttributes<View> & {
10
+ theme?: import("@emotion/react").Theme;
11
+ as?: React.ElementType;
12
+ } & {
13
+ themeGroupStyleEnabled: boolean;
14
+ themeHasError: boolean;
15
+ }, {}, {}>;
16
+ export { StyledPickerWrapper, StyledTouchableOpacity };
@@ -94,5 +94,16 @@ export interface DatePickerProps {
94
94
  }, props?: NativeTextInputProps) => React.ReactNode;
95
95
  }
96
96
  export interface InternalDatePickerProps extends DatePickerProps {
97
+ /**
98
+ * Props that are passed to TextInput.
99
+ */
100
+ inputProps?: Pick<TextInputProps, 'loading' | 'numberOfLines'>;
101
+ /**
102
+ * Whether the component is used within a FormGroup for styling purposes.
103
+ */
104
+ groupStyleEnabled?: boolean;
105
+ /**
106
+ * Input component to use instead of the default TextInput.
107
+ */
97
108
  TextInputComponent?: React.ComponentType<TextInputProps>;
98
109
  }
@@ -6,4 +6,11 @@ declare const StyledPickerWrapper: import("@emotion/native").StyledComponent<Vie
6
6
  }, {}, {
7
7
  ref?: import("react").Ref<View> | undefined;
8
8
  }>;
9
- export { StyledPickerWrapper };
9
+ declare const StyledTouchableOpacity: import("@emotion/native").StyledComponent<import("react-native").TouchableOpacityProps & import("react").RefAttributes<View> & {
10
+ theme?: import("@emotion/react").Theme;
11
+ as?: React.ElementType;
12
+ } & {
13
+ themeGroupStyleEnabled: boolean;
14
+ themeHasError: boolean;
15
+ }, {}, {}>;
16
+ export { StyledPickerWrapper, StyledTouchableOpacity };
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
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;
3
+ declare const TimePickerAndroid: ({ value, label, placeholder, onChange, displayFormat, disabled, required, error, helpText, style, testID, showSuffix, TextInputComponent, inputProps, groupStyleEnabled, }: InternalTimePickerProps) => React.JSX.Element;
4
4
  export default TimePickerAndroid;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
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;
3
+ declare const TimePickerIOS: ({ value, label, placeholder, onChange, confirmLabel, displayFormat, disabled, required, error, helpText, style, testID, showSuffix, supportedOrientations, TextInputComponent, inputProps, groupStyleEnabled, }: InternalTimePickerProps) => React.JSX.Element;
4
4
  export default TimePickerIOS;
@@ -61,5 +61,16 @@ export interface TimePickerProps {
61
61
  supportedOrientations?: ('portrait' | 'landscape')[];
62
62
  }
63
63
  export interface InternalTimePickerProps extends TimePickerProps {
64
+ /**
65
+ * Props that are passed to TextInput.
66
+ */
67
+ inputProps?: Pick<TextInputProps, 'loading' | 'numberOfLines'>;
68
+ /**
69
+ * Whether the component is used within a FormGroup for styling purposes.
70
+ */
71
+ groupStyleEnabled?: boolean;
72
+ /**
73
+ * Input component to use instead of the default TextInput.
74
+ */
64
75
  TextInputComponent?: React.ComponentType<TextInputProps>;
65
76
  }