@majoo-ui/react 1.46.2 → 1.46.3-rc.3
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/AdvancedOption.d.ts +12 -0
- package/components/datePicker/DatePicker.d.ts +5 -0
- package/components/datePicker/InputDatePicker.d.ts +64 -0
- package/components/datePicker/components/Calendar.d.ts +24 -0
- package/components/datePicker/components/DateNumber.d.ts +102 -0
- package/components/datePicker/components/MobileCalendar.d.ts +4 -0
- package/components/datePicker/components/index.d.ts +5 -0
- package/components/datePicker/index.d.ts +5 -0
- package/components/datePicker/state/reducer.d.ts +14 -0
- package/components/datePicker/timePicker/index.d.ts +4 -0
- package/components/form/components/InputElement/index.d.ts +1 -0
- package/components/form/components/InputGroup/index.d.ts +1 -0
- package/components/loadingBar/LoadingBar.d.ts +33 -3
- package/components/paragraph/index.d.ts +2 -0
- package/components/separator/index.d.ts +2 -0
- package/components/stepWizard/index.d.ts +2 -0
- package/components/tableOfContent/index.d.ts +57 -0
- package/components/text/index.d.ts +2 -0
- package/index.esm.js +1046 -1532
- package/index.umd.js +1477 -1837
- package/layout/grid/index.d.ts +2 -0
- package/package.json +6 -6
- package/type/base.types.d.ts +2 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type Option = {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
};
|
|
6
|
+
interface AdvancedOptionProps {
|
|
7
|
+
options: Option[];
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
optionHandler: (value: string) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const AdvancedOption: ({ options, disabled, optionHandler }: AdvancedOptionProps) => JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ADVANCE_PICKER, RANGE_PICKER, SINGLE_PICKER } from './DatePicker';
|
|
3
|
+
import { CSS } from '../../config/stitches.config';
|
|
4
|
+
import { PopoverPlacement } from '../../type/base.types';
|
|
5
|
+
export interface InputDatePickerProps {
|
|
6
|
+
/**
|
|
7
|
+
* Specify the InputDatePicker type.
|
|
8
|
+
*/
|
|
9
|
+
type?: typeof SINGLE_PICKER | typeof RANGE_PICKER | typeof ADVANCE_PICKER;
|
|
10
|
+
/**
|
|
11
|
+
* Specify the InputDatePicker placeholder.
|
|
12
|
+
*/
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Specify the InputDatePicker size.
|
|
16
|
+
*/
|
|
17
|
+
size?: 'lg' | 'sm';
|
|
18
|
+
/**
|
|
19
|
+
* Specify whether the InputDatePicker should be disabled, or not
|
|
20
|
+
*/
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Specify an `onChange` handler that is called whenever the InputDatePicker value changes.
|
|
24
|
+
*/
|
|
25
|
+
onChange?: (value: any) => void;
|
|
26
|
+
/**
|
|
27
|
+
* Specify the InputDatePicker value.
|
|
28
|
+
*/
|
|
29
|
+
value?: Date | Date[];
|
|
30
|
+
/**
|
|
31
|
+
* Specify the InputDatePicker default value.
|
|
32
|
+
*/
|
|
33
|
+
defaultValue?: Date | Date[];
|
|
34
|
+
/**
|
|
35
|
+
* Deprecated in v1.46.2. Use 'value' instead.
|
|
36
|
+
*/
|
|
37
|
+
date?: Date | Date[];
|
|
38
|
+
/**
|
|
39
|
+
* Deprecated in v1.46.2. Use 'defaultValue' instead.
|
|
40
|
+
*/
|
|
41
|
+
defaultDate?: Date | Date[];
|
|
42
|
+
/**
|
|
43
|
+
* Specify the 'advance' typed InputDatePicker custom view.
|
|
44
|
+
*/
|
|
45
|
+
advanceView?: React.ReactNode;
|
|
46
|
+
/**
|
|
47
|
+
* Specify the picker popover placement.
|
|
48
|
+
*/
|
|
49
|
+
placement?: PopoverPlacement;
|
|
50
|
+
/**
|
|
51
|
+
* If true, the TimePicker component will be visible.
|
|
52
|
+
*/
|
|
53
|
+
showTimePicker?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Specify the minimum date.
|
|
56
|
+
*/
|
|
57
|
+
minDate?: Date;
|
|
58
|
+
/**
|
|
59
|
+
* Specify the maximum date.
|
|
60
|
+
*/
|
|
61
|
+
maxDate?: Date;
|
|
62
|
+
css?: CSS;
|
|
63
|
+
}
|
|
64
|
+
export declare function InputDatePicker({ type, placeholder, size, disabled, onChange, defaultValue: defaultDateValue, value: dateValue, defaultDate, date, advanceView, placement, css, showTimePicker, minDate, maxDate, }: InputDatePickerProps): JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { RenderProps } from 'dayzed';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { CSS } from '../../../config/stitches.config';
|
|
4
|
+
export declare const DATE_PICKER = 0;
|
|
5
|
+
export declare const MONTH_PICKER = 1;
|
|
6
|
+
export declare const YEAR_PICKER = 2;
|
|
7
|
+
export declare const YEAR_RANGE_PICKER = 3;
|
|
8
|
+
export declare const TIME_PICKER = 4;
|
|
9
|
+
export interface CalendarProps extends RenderProps {
|
|
10
|
+
advanceView?: React.ReactNode;
|
|
11
|
+
onCalendarDateChange: (date: Date) => void;
|
|
12
|
+
onIsMultiDateChange?: (isMultiDate: boolean) => void;
|
|
13
|
+
onUpdate?: () => void;
|
|
14
|
+
onCancel: () => void;
|
|
15
|
+
selected?: Date[];
|
|
16
|
+
containerStyle?: CSS;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
showTimePicker?: boolean;
|
|
19
|
+
renderTimePicker?: () => React.ReactNode;
|
|
20
|
+
minDate?: Date;
|
|
21
|
+
maxDate?: Date;
|
|
22
|
+
}
|
|
23
|
+
declare const CalendarBox: ({ calendars, getDateProps, advanceView, onCalendarDateChange, onIsMultiDateChange, onUpdate, onCancel, selected, containerStyle, disabled, showTimePicker, renderTimePicker, minDate, maxDate, }: CalendarProps) => JSX.Element | null;
|
|
24
|
+
export default CalendarBox;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import type * as Stitches from '@stitches/react';
|
|
2
|
+
declare const DateNumber: import("@stitches/react/types/styled-component").StyledComponent<"div", {
|
|
3
|
+
variant?: "end" | "start" | "default" | "neutral" | "disabled" | "selected" | "road" | undefined;
|
|
4
|
+
size?: "large" | "small" | undefined;
|
|
5
|
+
}, {
|
|
6
|
+
sm: "(min-width: 359px)";
|
|
7
|
+
md: "(min-width: 767px)";
|
|
8
|
+
lg: "(min-width: 1023px)";
|
|
9
|
+
xl: "(min-width: 1199px)";
|
|
10
|
+
'2xl': "(min-width: 1399px)";
|
|
11
|
+
'3xl': "(min-width: 1600px)";
|
|
12
|
+
}, import("@stitches/react/types/css-util").CSS<{
|
|
13
|
+
sm: "(min-width: 359px)";
|
|
14
|
+
md: "(min-width: 767px)";
|
|
15
|
+
lg: "(min-width: 1023px)";
|
|
16
|
+
xl: "(min-width: 1199px)";
|
|
17
|
+
'2xl': "(min-width: 1399px)";
|
|
18
|
+
'3xl': "(min-width: 1600px)";
|
|
19
|
+
}, {
|
|
20
|
+
colors: unknown;
|
|
21
|
+
space: unknown;
|
|
22
|
+
shadows: unknown;
|
|
23
|
+
fontSizes: unknown;
|
|
24
|
+
fonts: unknown;
|
|
25
|
+
lineHeights: unknown;
|
|
26
|
+
letterSpacings: unknown;
|
|
27
|
+
radii: unknown;
|
|
28
|
+
sizes: unknown;
|
|
29
|
+
zIndices: unknown;
|
|
30
|
+
}, import("@stitches/react/types/config").DefaultThemeMap, {
|
|
31
|
+
m: (value: {
|
|
32
|
+
readonly [Stitches.$$ScaleValue]: "space";
|
|
33
|
+
}) => {
|
|
34
|
+
margin: {
|
|
35
|
+
readonly [Stitches.$$ScaleValue]: "space";
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
mt: (value: {
|
|
39
|
+
readonly [Stitches.$$ScaleValue]: "space";
|
|
40
|
+
}) => {
|
|
41
|
+
marginTop: {
|
|
42
|
+
readonly [Stitches.$$ScaleValue]: "space";
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
mr: (value: {
|
|
46
|
+
readonly [Stitches.$$ScaleValue]: "space";
|
|
47
|
+
}) => {
|
|
48
|
+
marginRight: {
|
|
49
|
+
readonly [Stitches.$$ScaleValue]: "space";
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
mb: (value: {
|
|
53
|
+
readonly [Stitches.$$ScaleValue]: "space";
|
|
54
|
+
}) => {
|
|
55
|
+
marginBottom: {
|
|
56
|
+
readonly [Stitches.$$ScaleValue]: "space";
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
ml: (value: {
|
|
60
|
+
readonly [Stitches.$$ScaleValue]: "space";
|
|
61
|
+
}) => {
|
|
62
|
+
marginLeft: {
|
|
63
|
+
readonly [Stitches.$$ScaleValue]: "space";
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
mx: (value: {
|
|
67
|
+
readonly [Stitches.$$ScaleValue]: "space";
|
|
68
|
+
}) => {
|
|
69
|
+
marginLeft: {
|
|
70
|
+
readonly [Stitches.$$ScaleValue]: "space";
|
|
71
|
+
};
|
|
72
|
+
marginRight: {
|
|
73
|
+
readonly [Stitches.$$ScaleValue]: "space";
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
my: (value: {
|
|
77
|
+
readonly [Stitches.$$ScaleValue]: "space";
|
|
78
|
+
}) => {
|
|
79
|
+
marginTop: {
|
|
80
|
+
readonly [Stitches.$$ScaleValue]: "space";
|
|
81
|
+
};
|
|
82
|
+
marginBottom: {
|
|
83
|
+
readonly [Stitches.$$ScaleValue]: "space";
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
size: (value: {
|
|
87
|
+
readonly [Stitches.$$PropertyValue]: "width";
|
|
88
|
+
}) => {
|
|
89
|
+
width: {
|
|
90
|
+
readonly [Stitches.$$PropertyValue]: "width";
|
|
91
|
+
};
|
|
92
|
+
height: {
|
|
93
|
+
readonly [Stitches.$$PropertyValue]: "width";
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
subtleColor: (value: string) => {
|
|
97
|
+
color: string;
|
|
98
|
+
backgroundColor: string;
|
|
99
|
+
};
|
|
100
|
+
}>>;
|
|
101
|
+
export declare type DateNumberVariantProps = Stitches.VariantProps<typeof DateNumber>;
|
|
102
|
+
export default DateNumber;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CalendarProps } from './Calendar';
|
|
3
|
+
declare const MobileCalendarBox: ({ calendars, getDateProps, advanceView, onCalendarDateChange, onIsMultiDateChange, onUpdate, onCancel, selected, containerStyle, disabled, minDate, maxDate, }: CalendarProps) => JSX.Element | null;
|
|
4
|
+
export default MobileCalendarBox;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const UPDATE_PICKER = "UPDATE";
|
|
2
|
+
export declare const TODAY = "TODAY";
|
|
3
|
+
export declare const YESTERDAY = "YESTERDAY";
|
|
4
|
+
export declare const LAST_7_DAYS = "LAST_7_DAYS";
|
|
5
|
+
export declare const LAST_WEEK = "LAST_WEEK";
|
|
6
|
+
export declare const THIS_WEEK = "THIS_WEEK";
|
|
7
|
+
export declare const LAST_MONTH = "LAST_MONTH";
|
|
8
|
+
export declare const LAST_TWO_MONTHS = "LAST_TWO_MONTH";
|
|
9
|
+
export declare const THIS_MONTH = "THIS_MONTH";
|
|
10
|
+
export declare const advancePickerOptions: {
|
|
11
|
+
label: string;
|
|
12
|
+
value: string;
|
|
13
|
+
}[];
|
|
14
|
+
export declare function pickerReducer(state: any, action: any): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { InputRightElement, InputLeftElement } from './InputElement';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { InputGroup } from './InputGroup';
|
|
@@ -1,13 +1,43 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type * as Stitches from '@stitches/react';
|
|
3
3
|
interface LoadingBarProps {
|
|
4
|
+
/**
|
|
5
|
+
* To set the completion percentage.
|
|
6
|
+
*/
|
|
4
7
|
progress: number;
|
|
8
|
+
/**
|
|
9
|
+
* Additional description under progress.
|
|
10
|
+
*/
|
|
5
11
|
description?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Additional styles css.
|
|
14
|
+
*/
|
|
6
15
|
css?: Stitches.CSS;
|
|
16
|
+
/**
|
|
17
|
+
* To only show loading bar only.
|
|
18
|
+
*/
|
|
7
19
|
showProgressOnly?: boolean;
|
|
8
|
-
|
|
20
|
+
/**
|
|
21
|
+
* To make the loading bar automatically display the static percentage.
|
|
22
|
+
*/
|
|
9
23
|
isAuto?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* To show and hide percentage when condition `isAuto`.
|
|
26
|
+
*/
|
|
27
|
+
show?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Event callback when percentage is 100% and condition `isAuto`.
|
|
30
|
+
*/
|
|
10
31
|
onCompleted?: React.ChangeEventHandler;
|
|
11
32
|
}
|
|
12
|
-
|
|
13
|
-
|
|
33
|
+
declare function LoadingBar(props: LoadingBarProps): JSX.Element;
|
|
34
|
+
declare namespace LoadingBar {
|
|
35
|
+
var defaultProps: {
|
|
36
|
+
showProgressOnly: boolean;
|
|
37
|
+
isAuto: boolean;
|
|
38
|
+
show: boolean;
|
|
39
|
+
progress: number;
|
|
40
|
+
description: string;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export default LoadingBar;
|
|
@@ -4,6 +4,7 @@ declare type DataContents = {
|
|
|
4
4
|
title: string;
|
|
5
5
|
withTolltip?: boolean;
|
|
6
6
|
tooltipsContents?: string;
|
|
7
|
+
hidden: boolean;
|
|
7
8
|
};
|
|
8
9
|
declare type Transitions = {
|
|
9
10
|
enterRight?: string;
|
|
@@ -26,6 +27,7 @@ interface IStepWizardProps {
|
|
|
26
27
|
setSw: () => void;
|
|
27
28
|
cssContent: Stitches.CSS;
|
|
28
29
|
scrollTop?: boolean;
|
|
30
|
+
forbidClickNav: boolean;
|
|
29
31
|
}
|
|
30
32
|
declare const StepWizard: (props: IStepWizardProps) => JSX.Element;
|
|
31
33
|
export default StepWizard;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { MutableRefObject, ReactNode } from 'react';
|
|
2
|
+
interface ScrollSpyProps {
|
|
3
|
+
/**
|
|
4
|
+
* Each direct child Element should contain an id.
|
|
5
|
+
*/
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* ref to your navigation container containing items with data-to-scrollspy-id attributes.
|
|
9
|
+
*/
|
|
10
|
+
navContainerRef?: MutableRefObject<HTMLDivElement | null>;
|
|
11
|
+
/**
|
|
12
|
+
* If you want to spy only on a particular scrollable container (Element) then pass its ref to this prop.
|
|
13
|
+
*/
|
|
14
|
+
parentScrollContainerRef?: MutableRefObject<HTMLDivElement | null>;
|
|
15
|
+
/**
|
|
16
|
+
* In milliseconds to throttle the onscroll event. Lower the number, better the response time, higher the performance cost.
|
|
17
|
+
*/
|
|
18
|
+
scrollThrottle?: number;
|
|
19
|
+
/**
|
|
20
|
+
* Executes this function whenever you scroll to a new ScrollSpy child Element, callback returns the id of that Element as well.
|
|
21
|
+
*/
|
|
22
|
+
onUpdateCallback?: (id: string) => void;
|
|
23
|
+
/**
|
|
24
|
+
* Spy will be fired when it has been scrolled offsetTop beyond 50% to the top of the containing element.
|
|
25
|
+
*/
|
|
26
|
+
offsetTop?: number;
|
|
27
|
+
/**
|
|
28
|
+
* Spy will be fired when it has been scrolled offsetBottom beyond 50% to the bottom of the containing element.
|
|
29
|
+
*/
|
|
30
|
+
offsetBottom?: number;
|
|
31
|
+
/**
|
|
32
|
+
* To customize the string after data-.
|
|
33
|
+
*/
|
|
34
|
+
useDataAttribute?: string;
|
|
35
|
+
/**
|
|
36
|
+
* To customize the class added when the Element in view.
|
|
37
|
+
*/
|
|
38
|
+
activeClass?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Set to false if you want your spy to be active only if more than50% of that div is in the viewport.
|
|
41
|
+
*/
|
|
42
|
+
useBoxMethod?: boolean;
|
|
43
|
+
}
|
|
44
|
+
declare const TableOfContentPage: {
|
|
45
|
+
(props: ScrollSpyProps): JSX.Element;
|
|
46
|
+
defaultProps: {
|
|
47
|
+
scrollThrottle: number;
|
|
48
|
+
offsetTop: number;
|
|
49
|
+
offsetBottom: number;
|
|
50
|
+
useDataAttribute: string;
|
|
51
|
+
activeClass: string;
|
|
52
|
+
useBoxMethod: boolean;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
export { default as TableOfContent } from './TableOfContent';
|
|
56
|
+
export * from './TableOfContent';
|
|
57
|
+
export { TableOfContentPage };
|