Skip to content

Commit ae6109c

Browse files
committed
All props are now commented
1 parent 10b69b5 commit ae6109c

File tree

53 files changed

+4259
-18
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+4259
-18
lines changed

components/checkbox/index.d.ts

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,62 @@
11
import __ReactToolbox from "../index.d.ts";
22

33
export interface CheckboxTheme {
4+
/**
5+
* Used as root in the check element.
6+
*/
47
check?: string;
8+
/**
9+
* Used for the check element when it's checked.
10+
*/
511
checked?: string;
12+
/**
13+
* Used when the component is disabled.
14+
*/
615
disabled?: string;
16+
/**
17+
* Used as the root class of the component.
18+
*/
719
field?: string;
20+
/**
21+
* Used for the input element.
22+
*/
823
input?: string;
24+
/**
25+
* Used for the ripple component.
26+
*/
927
ripple?: string;
28+
/**
29+
* Used for the text label.
30+
*/
31+
text?: string;
1032
}
1133

1234
interface CheckboxProps extends __ReactToolbox.Props {
35+
/**
36+
* Value for the checkbox, can be true or false.
37+
* @default false
38+
*/
1339
checked?: boolean;
40+
/**
41+
* If true, the checkbox shown as disabled and cannot be modified.
42+
* @default false
43+
*/
1444
disabled?: boolean;
45+
/**
46+
* Text label to attach next to the checkbox element.
47+
*/
1548
label?: __React.ReactNode | string;
49+
/**
50+
* The name of the field to set in the input checkbox.
51+
*/
1652
name?: string;
53+
/**
54+
* Callback called when the checkbox is blurred.
55+
*/
56+
onBlur?: __React.FocusEventHandler;
57+
/**
58+
* Callback called when the checkbox value is changed.
59+
*/
1760
onChange?: __React.MouseEventHandler;
1861
/**
1962
* Classnames object defining the component style.

components/chip/index.d.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,29 @@
11
import __ReactToolbox from "../index.d.ts";
22

33
export interface ChipTheme {
4+
/**
5+
* Added to the root element when the component includes an avatar.
6+
*/
47
avatar?: string;
8+
/**
9+
* Used for the root element.
10+
*/
511
chip?: string;
12+
/**
13+
* Added to the root element when the component is deletable.
14+
*/
615
deletable?: string;
16+
/**
17+
* Used for the delete element wrapper.
18+
*/
719
delete?: string;
20+
/**
21+
* Used for the delete icon.
22+
*/
823
deleteIcon?: string;
24+
/**
25+
* Used for the delete svg inner layer.
26+
*/
927
deleteX?: string;
1028
}
1129

@@ -14,7 +32,14 @@ interface ChipProps extends __ReactToolbox.Props {
1432
* Children to pass through the component.
1533
*/
1634
children?: __React.ReactNode;
35+
/**
36+
* If true, the chip will be rendered with a delete icon.
37+
* @default false
38+
*/
1739
deleteable?: boolean;
40+
/**
41+
* Callback to be invoked when the delete icon is clicked.
42+
*/
1843
onDeleteClick?: __React.MouseEventHandler;
1944
/**
2045
* Classnames object defining the component style.

components/date_picker/index.d.ts

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,145 @@
11
import __ReactToolbox from "../index.d.ts";
22

33
export interface DatePickerTheme {
4+
/**
5+
* Used for the active day and year.
6+
*/
47
active?: string;
8+
/**
9+
* Used for the buttons in the dialog.
10+
*/
511
button?: string;
12+
/**
13+
* Used for the calendar root element.
14+
*/
615
calendar?: string;
16+
/**
17+
* Used as wrapper for the calendar component inside dialog.
18+
*/
719
calendarWrapper?: string;
20+
/**
21+
* Used for the date element inside header.
22+
*/
823
date?: string;
24+
/**
25+
* Used for the day element inside the calendar.
26+
*/
927
day?: string;
28+
/**
29+
* Used for the list of days inside a month.
30+
*/
1031
days?: string;
32+
/**
33+
* Used for the dialog component.
34+
*/
1135
dialog?: string;
36+
/**
37+
* Added to day element when day is disabled.
38+
*/
1239
disabled?: string;
40+
/**
41+
* Used for the dialog header,.
42+
*/
1343
header?: string;
44+
/**
45+
* Used for Input element that opens the picker.
46+
*/
1447
input?: string;
48+
/**
49+
* Used for the month root element.
50+
*/
1551
month?: string;
52+
/**
53+
* Added to the root dialog when months are displayed.
54+
*/
1655
monthsDisplay?: string;
56+
/**
57+
* Used for the next month icon.
58+
*/
1759
next?: string;
60+
/**
61+
* Used for the prev month icon.
62+
*/
1863
prev?: string;
64+
/**
65+
* Used for the month title element.
66+
*/
1967
title?: string;
68+
/**
69+
* Used for the weekdays wrapper.
70+
*/
2071
week?: string;
72+
/**
73+
* Used for the year element inside header.
74+
*/
2175
year?: string;
76+
/**
77+
* Used for the years list in years view.
78+
*/
2279
years?: string;
80+
/**
81+
* Added to the root dialog when years are displayed.
82+
*/
2383
yearsDisplay?: string;
2484
}
2585

2686
interface DatePickerProps extends __ReactToolbox.Props {
87+
/**
88+
* Automatically selects a date upon clicking on a day
89+
* @default false
90+
*/
2791
autoOk?: boolean;
92+
/**
93+
* Give an error node to display under the field.
94+
*/
2895
error?: string;
96+
/**
97+
* A key to identify an Icon from Material Design Icons or a custom Icon Element.
98+
*/
2999
icon?: __React.ReactNode | string;
100+
/**
101+
* This class will be applied to Input component of DatePicker.
102+
*/
30103
inputClassName?: string;
104+
/**
105+
* Function to format the date displayed on the input.
106+
*/
31107
inputFormat?: Function;
108+
/**
109+
* The text string to use for the floating label element in the input component.
110+
*/
32111
label?: string;
112+
/**
113+
* Date object with the maximum selectable date.
114+
*/
33115
maxDate?: Date;
116+
/**
117+
* Date object with the minimum selectable date.
118+
*/
34119
minDate?: Date;
120+
/**
121+
* Name for the input field.
122+
*/
35123
name?: string;
124+
/**
125+
* Callback called when the picker value is changed.
126+
*/
36127
onChange?: __React.MouseEventHandler;
128+
/**
129+
* Callback called when the ESC key is pressed with the overlay active.
130+
*/
37131
onEscKeyDown?: __React.KeyboardEventHandler;
132+
/**
133+
* Callback to be invoked when the dialog overlay is clicked.
134+
*/
38135
onOverlayClick?: __React.MouseEventHandler;
39136
/**
40137
* Classnames object defining the component style.
41138
*/
42139
theme?: DatePickerTheme;
140+
/**
141+
* Date object with the currently selected date.
142+
*/
43143
value?: Date | string;
44144
}
45145

components/dialog/index.d.ts

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,89 @@
11
import __ReactToolbox from "../index.d.ts";
22

33
export interface DialogTheme {
4+
/**
5+
* Used for the root when the dialog is active.
6+
*/
47
active?: string;
8+
/**
9+
* Used to wrap the dialog body.
10+
*/
511
body?: string;
12+
/**
13+
* Used in buttons when the dialog implements actions.
14+
*/
615
button?: string;
16+
/**
17+
* Used for the root element.
18+
*/
719
dialog?: string;
20+
/**
21+
* Used for the navigation element when it implements actions.
22+
*/
823
navigation?: string;
24+
/**
25+
* Used for the title element of the dialog.
26+
*/
927
title?: string;
1028
}
1129

1230
interface DialogActionProps {
31+
/**
32+
* The text string to use for the name of the button.
33+
*/
1334
label?: string;
35+
/**
36+
* Callback called when the component is clicked.
37+
*/
38+
onClick?: __React.MouseEventHandler;
1439
}
1540

1641
interface DialogProps extends __ReactToolbox.Props {
42+
/**
43+
* A array of objects representing the buttons for the dialog navigation area. The properties will be transferred to the buttons.
44+
*/
1745
actions?: DialogActionProps[];
46+
/**
47+
* If true, the dialog will be active.
48+
* @default false
49+
*/
1850
active?: boolean;
1951
/**
2052
* Children to pass through the component.
2153
*/
2254
children?: __React.ReactNode;
55+
/**
56+
* Callback called when the ESC key is pressed with the overlay active.
57+
*/
2358
onEscKeyDown?: __React.KeyboardEventHandler;
59+
/**
60+
* Callback to be invoked when the dialog overlay is clicked.
61+
*/
2462
onOverlayClick?: __React.MouseEventHandler;
63+
/**
64+
* Callback called when the mouse button is pressed on the overlay.
65+
*/
2566
onOverlayMouseDown?: __React.MouseEventHandler;
67+
/**
68+
* Callback called when the mouse is moving over the overlay.
69+
*/
2670
onOverlayMouseMove?: __React.MouseEventHandler;
71+
/**
72+
* Callback called when the mouse button is released over the overlay.
73+
*/
2774
onOverlayMouseUp?: __React.MouseEventHandler;
2875
/**
2976
* Classnames object defining the component style.
3077
*/
3178
theme?: DialogTheme;
79+
/**
80+
* The text string to use as standar title of the dialog.
81+
*/
3282
title?: string;
83+
/**
84+
* Used to determine the size of the dialog. It can be small, normal or large.
85+
* @default normal
86+
*/
3387
type?: string;
3488
}
3589

components/drawer/index.d.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,50 @@
11
import __ReactToolbox from "../index.d.ts";
22

33
export interface DrawerTheme {
4+
/**
5+
* Used for the root class when the drawer is active.
6+
*/
47
active?: string;
8+
/**
9+
* Used for the drawer content.
10+
*/
511
content?: string;
12+
/**
13+
* Root class.
14+
*/
615
drawer?: string;
16+
/**
17+
* Added to the root class when drawer is to the left.
18+
*/
719
left?: string;
20+
/**
21+
* Added to the root class when drawer is to the right.
22+
*/
823
right?: string;
924
}
1025

1126
interface DrawerProps extends __ReactToolbox.Props {
27+
/**
28+
* If true, the drawer will be visible.
29+
* @default false
30+
*/
1231
active?: boolean;
1332
/**
1433
* Children to pass through the component.
1534
*/
1635
children?: __React.ReactNode;
36+
/**
37+
* Callback function to be invoked when the overlay is clicked.
38+
*/
1739
onOverlayClick?: __React.MouseEventHandler;
1840
/**
1941
* Classnames object defining the component style.
2042
*/
2143
theme?: DrawerTheme;
44+
/**
45+
* Type of drawer. It can be left or right to display the drawer on the left or right side of the screen.
46+
* @default left
47+
*/
2248
type?: "left" | "right";
2349
}
2450

0 commit comments

Comments
 (0)