@hero-design/rn 8.96.0 → 8.97.0

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.
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { DatePickerDialogProps } from './type';
3
+ export type AndroidDatePickerDialogProps = Omit<DatePickerDialogProps, 'supportedOrientations' | 'confirmLabel' | 'label' | 'locale'>;
4
+ declare const AndroidDatePickerDialog: ({ open, onClose, value, minDate, maxDate, onChange, testID, variant, }: AndroidDatePickerDialogProps) => React.JSX.Element | null;
5
+ export default AndroidDatePickerDialog;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { DatePickerDialogProps } from './type';
3
+ declare const IOSDatePickerDialog: ({ label, open, onClose, confirmLabel, locale, value, minDate, maxDate, onChange, testID, variant, supportedOrientations, }: DatePickerDialogProps) => React.JSX.Element;
4
+ export default IOSDatePickerDialog;
@@ -0,0 +1,50 @@
1
+ export interface DatePickerDialogProps {
2
+ /**
3
+ * The value of the date picker.
4
+ */
5
+ value?: Date;
6
+ /**
7
+ * The minimum date of the date picker.
8
+ */
9
+ minDate?: Date;
10
+ /**
11
+ * The maximum date of the date picker.
12
+ */
13
+ maxDate?: Date;
14
+ /**
15
+ * The function to call when the date is changed.
16
+ */
17
+ onChange: (date: Date) => void;
18
+ /**
19
+ * The test ID of the date picker.
20
+ */
21
+ testID?: string;
22
+ /**
23
+ * Whether the dialog is open
24
+ */
25
+ open: boolean;
26
+ /**
27
+ * The function to call when the dialog is closed.
28
+ */
29
+ onClose: () => void;
30
+ /**
31
+ * The variant of the date picker.
32
+ */
33
+ variant?: 'default' | 'month-year';
34
+ /**
35
+ * [iOS only] The label of the DatePicker bottom sheet.
36
+ */
37
+ label: string;
38
+ /**
39
+ * [iOS only] The confirm label of the date picker bottom sheet.
40
+ */
41
+ confirmLabel: string;
42
+ /**
43
+ * [iOS only] The supported orientations of the date picker.
44
+ */
45
+ supportedOrientations?: ('portrait' | 'landscape')[];
46
+ /**
47
+ * [iOS only] The locale of the date picker.
48
+ */
49
+ locale?: string;
50
+ }
@@ -1,4 +1,7 @@
1
1
  import React from 'react';
2
2
  import type { DatePickerProps } from './types';
3
- declare const DatePicker: ({ variant, ...props }: DatePickerProps) => React.JSX.Element;
4
- export default DatePicker;
3
+ import { DatePickerDialogProps } from './Dialog/type';
4
+ declare const _default: (({ variant, ...props }: DatePickerProps) => React.JSX.Element) & {
5
+ Dialog: ({ ...props }: DatePickerDialogProps) => React.JSX.Element;
6
+ };
7
+ export default _default;