@majoo-ui/react 1.54.4 → 1.54.6
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.
- package/components/datePicker/DatePicker.d.ts +4 -0
- package/components/datePicker/InputDatePicker.d.ts +11 -3
- package/components/datePicker/InputDateRangePicker.d.ts +22 -0
- package/components/datePicker/state/reducer.d.ts +5 -1
- package/index.esm.js +493 -131
- package/index.umd.js +523 -147
- package/package.json +2 -2
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
export declare const DEFAULT: "default";
|
|
2
3
|
export declare const SINGLE_PICKER: "single";
|
|
3
4
|
export declare const RANGE_PICKER: "range";
|
|
4
5
|
export declare const ADVANCE_PICKER: "advance";
|
|
6
|
+
export declare const RANGE_CONTROL: "range_control";
|
|
7
|
+
export declare const WEEKLY: "weekly";
|
|
8
|
+
export declare const MONTHLY: "monthly";
|
|
5
9
|
export declare const DatePicker: (props: any) => JSX.Element;
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { ADVANCE_PICKER, RANGE_PICKER, SINGLE_PICKER } from './DatePicker';
|
|
2
|
+
import { ADVANCE_PICKER, RANGE_PICKER, SINGLE_PICKER, DEFAULT, RANGE_CONTROL, WEEKLY, MONTHLY } from './DatePicker';
|
|
3
3
|
import { CSS } from '../../config/stitches.config';
|
|
4
4
|
import { PopoverPlacement } from '../../type/base.types';
|
|
5
5
|
export interface InputDatePickerProps {
|
|
6
6
|
/**
|
|
7
|
-
* Specify the
|
|
7
|
+
* Specify the DatePicker type.
|
|
8
8
|
*/
|
|
9
9
|
type?: typeof SINGLE_PICKER | typeof RANGE_PICKER | typeof ADVANCE_PICKER;
|
|
10
|
+
/**
|
|
11
|
+
* Specify the InputPicker type.
|
|
12
|
+
*/
|
|
13
|
+
inputType?: typeof DEFAULT | typeof RANGE_CONTROL;
|
|
14
|
+
/**
|
|
15
|
+
* Specify the range control type.
|
|
16
|
+
*/
|
|
17
|
+
rangeControl?: typeof WEEKLY | typeof MONTHLY;
|
|
10
18
|
/**
|
|
11
19
|
* Specify the InputDatePicker placeholder.
|
|
12
20
|
*/
|
|
@@ -72,4 +80,4 @@ export interface InputDatePickerProps {
|
|
|
72
80
|
*/
|
|
73
81
|
isInvalid?: boolean;
|
|
74
82
|
}
|
|
75
|
-
export declare function InputDatePicker({ type, placeholder, size, disabled, onChange, defaultValue: defaultDateValue, value: dateValue, defaultDate, date, advanceView, placement, css, showTimePicker, minDate, maxDate, readOnly, isInvalid, }: InputDatePickerProps): JSX.Element;
|
|
83
|
+
export declare function InputDatePicker({ type, inputType, rangeControl, placeholder, size, disabled, onChange, defaultValue: defaultDateValue, value: dateValue, defaultDate, date, advanceView, placement, css, showTimePicker, minDate, maxDate, readOnly, isInvalid, }: InputDatePickerProps): JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CSS } from '../../config/stitches.config';
|
|
3
|
+
interface ContainertRangePickerProps {
|
|
4
|
+
css?: CSS;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
readOnly?: boolean;
|
|
7
|
+
isInvalid?: boolean;
|
|
8
|
+
children: JSX.Element;
|
|
9
|
+
onRangeChange(type: string): void;
|
|
10
|
+
}
|
|
11
|
+
interface InputRangePickerProps {
|
|
12
|
+
value: string;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
size?: 'lg' | 'sm';
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
readOnly?: boolean;
|
|
17
|
+
isInvalid?: boolean;
|
|
18
|
+
onClick(): void;
|
|
19
|
+
}
|
|
20
|
+
export declare function ContainerDateRangePicker(props: ContainertRangePickerProps): JSX.Element;
|
|
21
|
+
export declare function InputDateRangePicker(props: InputRangePickerProps): JSX.Element;
|
|
22
|
+
export {};
|
|
@@ -3,6 +3,10 @@ export declare const TODAY = "TODAY";
|
|
|
3
3
|
export declare const YESTERDAY = "YESTERDAY";
|
|
4
4
|
export declare const LAST_7_DAYS = "LAST_7_DAYS";
|
|
5
5
|
export declare const LAST_WEEK = "LAST_WEEK";
|
|
6
|
+
export declare const PREV_WEEK = "PREV_WEEK";
|
|
7
|
+
export declare const NEXT_WEEK = "NEXT_WEEK";
|
|
8
|
+
export declare const PREV_MONTH = "PREV_MONTH";
|
|
9
|
+
export declare const NEXT_MONTH = "NEXT_MONTH";
|
|
6
10
|
export declare const THIS_WEEK = "THIS_WEEK";
|
|
7
11
|
export declare const LAST_MONTH = "LAST_MONTH";
|
|
8
12
|
export declare const LAST_TWO_MONTHS = "LAST_TWO_MONTH";
|
|
@@ -12,4 +16,4 @@ export declare const advancePickerOptions: {
|
|
|
12
16
|
value: string;
|
|
13
17
|
}[];
|
|
14
18
|
export declare function pickerReducer(state: any, action: any): any;
|
|
15
|
-
export declare function advancePickerDate(type: any): Date[];
|
|
19
|
+
export declare function advancePickerDate(type: any, date: any): Date[];
|