@artemy-tech/datepicker 0.2.0 → 0.4.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,50 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+ import { DateRange } from 'react-day-picker';
4
+
5
+ type DatePickerSize = 's' | 'm' | 'l';
6
+ type DatePickerShowTime = boolean | {
7
+ format: 'HH:mm' | 'HH:mm:ss';
8
+ };
9
+ interface DatePickerProps {
10
+ value?: Date;
11
+ defaultValue?: Date;
12
+ onChange?: (date: Date | undefined) => void;
13
+ label?: string;
14
+ placeholder?: string;
15
+ fromDate?: Date;
16
+ toDate?: Date;
17
+ disabled?: boolean;
18
+ failed?: boolean;
19
+ loading?: boolean;
20
+ size?: DatePickerSize;
21
+ noCalendar?: boolean;
22
+ showTime?: DatePickerShowTime;
23
+ icon?: ReactNode | false;
24
+ iconPosition?: 'start' | 'end';
25
+ className?: string;
26
+ }
27
+ declare function DatePicker({ value, defaultValue, onChange, label, placeholder, fromDate, toDate, disabled, failed, loading, size, noCalendar, showTime, icon, iconPosition, className, }: DatePickerProps): react_jsx_runtime.JSX.Element;
28
+
29
+ type DateRangePickerSize = 's' | 'm' | 'l';
30
+ type DateRangePickerCalendarLayout = 'vertical' | 'horizontal';
31
+ interface DateRangePickerProps {
32
+ value?: DateRange;
33
+ defaultValue?: DateRange;
34
+ onChange?: (range: DateRange | undefined) => void;
35
+ label?: string;
36
+ fromDate?: Date;
37
+ toDate?: Date;
38
+ disabled?: boolean;
39
+ failed?: boolean;
40
+ loading?: boolean;
41
+ size?: DateRangePickerSize;
42
+ calendarLayout?: DateRangePickerCalendarLayout;
43
+ showTime?: DatePickerShowTime;
44
+ icon?: ReactNode | false;
45
+ iconPosition?: 'start' | 'end';
46
+ className?: string;
47
+ }
48
+ declare function DateRangePicker({ value, defaultValue, onChange, label, fromDate: fromConstraint, toDate: toConstraint, disabled, failed, loading, size, calendarLayout, showTime, icon, iconPosition, className, }: DateRangePickerProps): react_jsx_runtime.JSX.Element;
49
+
50
+ export { DatePicker as D, type DatePickerProps as a, type DatePickerShowTime as b, DateRangePicker as c, type DateRangePickerProps as d };
@@ -0,0 +1,50 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+ import { DateRange } from 'react-day-picker';
4
+
5
+ type DatePickerSize = 's' | 'm' | 'l';
6
+ type DatePickerShowTime = boolean | {
7
+ format: 'HH:mm' | 'HH:mm:ss';
8
+ };
9
+ interface DatePickerProps {
10
+ value?: Date;
11
+ defaultValue?: Date;
12
+ onChange?: (date: Date | undefined) => void;
13
+ label?: string;
14
+ placeholder?: string;
15
+ fromDate?: Date;
16
+ toDate?: Date;
17
+ disabled?: boolean;
18
+ failed?: boolean;
19
+ loading?: boolean;
20
+ size?: DatePickerSize;
21
+ noCalendar?: boolean;
22
+ showTime?: DatePickerShowTime;
23
+ icon?: ReactNode | false;
24
+ iconPosition?: 'start' | 'end';
25
+ className?: string;
26
+ }
27
+ declare function DatePicker({ value, defaultValue, onChange, label, placeholder, fromDate, toDate, disabled, failed, loading, size, noCalendar, showTime, icon, iconPosition, className, }: DatePickerProps): react_jsx_runtime.JSX.Element;
28
+
29
+ type DateRangePickerSize = 's' | 'm' | 'l';
30
+ type DateRangePickerCalendarLayout = 'vertical' | 'horizontal';
31
+ interface DateRangePickerProps {
32
+ value?: DateRange;
33
+ defaultValue?: DateRange;
34
+ onChange?: (range: DateRange | undefined) => void;
35
+ label?: string;
36
+ fromDate?: Date;
37
+ toDate?: Date;
38
+ disabled?: boolean;
39
+ failed?: boolean;
40
+ loading?: boolean;
41
+ size?: DateRangePickerSize;
42
+ calendarLayout?: DateRangePickerCalendarLayout;
43
+ showTime?: DatePickerShowTime;
44
+ icon?: ReactNode | false;
45
+ iconPosition?: 'start' | 'end';
46
+ className?: string;
47
+ }
48
+ declare function DateRangePicker({ value, defaultValue, onChange, label, fromDate: fromConstraint, toDate: toConstraint, disabled, failed, loading, size, calendarLayout, showTime, icon, iconPosition, className, }: DateRangePickerProps): react_jsx_runtime.JSX.Element;
49
+
50
+ export { DatePicker as D, type DatePickerProps as a, type DatePickerShowTime as b, DateRangePicker as c, type DateRangePickerProps as d };