diginet-core-ui 1.3.53 → 1.3.54
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/accordion/index.js +1 -1
- package/components/accordion/summary.js +17 -18
- package/components/form-control/checkbox/index.js +165 -159
- package/components/form-control/dropdown/index.js +44 -34
- package/components/form-control/form-group/index.js +1 -1
- package/components/form-control/input-base/index.js +1 -0
- package/components/form-control/number-input/index2.js +4 -6
- package/components/grid/Col.js +29 -1
- package/components/grid/Row.js +31 -4
- package/components/paging/page-info.js +120 -36
- package/components/popover/index.js +45 -17
- package/components/popup/v2/index.js +240 -260
- package/components/tree-view/css.js +12 -3
- package/package.json +1 -1
- package/readme.md +13 -0
- package/styles/colors.js +2 -2
- package/styles/general.js +4 -0
- package/theme/createBreakpoints.js +13 -13
- package/theme/settings.js +1 -2
- package/utils/string/capitalize.js +4 -3
- package/utils/useInput.js +3 -1
- package/utils/useMediaQuery.js +44 -0
- package/components/popup/v2/danger-popup.js +0 -15
- package/components/popup/v2/info-popup.js +0 -15
- package/components/popup/v2/success-popup.js +0 -15
- package/components/popup/v2/warning-popup.js +0 -15
- package/components/popup/v2/yes-no-popup.js +0 -18
|
@@ -82,7 +82,7 @@ const Accordion = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
82
82
|
display: 'none'
|
|
83
83
|
}
|
|
84
84
|
})));
|
|
85
|
-
}, [id, disabled, className, boxShadow, onClick, children, expanded, onExpand, onCollapse, expandState]);
|
|
85
|
+
}, [id, disabled, className, style, boxShadow, onClick, children, expanded, onExpand, onCollapse, expandState]);
|
|
86
86
|
}));
|
|
87
87
|
const AccordionRootCSS = css`
|
|
88
88
|
${displayBlock};
|
|
@@ -35,26 +35,25 @@ const AccordionSummary = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
35
35
|
const _SummaryRootCSS = SummaryRootCSS(background);
|
|
36
36
|
|
|
37
37
|
const _onClick = e => {
|
|
38
|
-
if (
|
|
39
|
-
|
|
38
|
+
if (disabled) return;
|
|
39
|
+
const target = e.target;
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
if (onClickAccordion) {
|
|
42
|
+
onClickAccordion();
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
if (onClick && (!expandIconRef.current || !expandIconRef.current.contains(target))) {
|
|
47
|
+
onClick(e);
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
51
|
+
if (expandState) {
|
|
52
|
+
if (expanded === undefined) setExpandState(false);
|
|
53
|
+
!!onCollapse && onCollapse(e);
|
|
54
|
+
} else if (!expandState) {
|
|
55
|
+
if (expanded === undefined) setExpandState(true);
|
|
56
|
+
!!onExpand && onExpand(e);
|
|
58
57
|
}
|
|
59
58
|
};
|
|
60
59
|
|
|
@@ -137,7 +136,7 @@ const AccordionSummary = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
137
136
|
}) : jsx("span", {
|
|
138
137
|
className: 'Accordion-Collapse-Icon effect'
|
|
139
138
|
}, collapseIcon)))));
|
|
140
|
-
}, [id, expandIcon, expandIconAt, className, background, children, collapseIcon, expandIconProps, expandState]);
|
|
139
|
+
}, [id, expandIcon, expandIconAt, className, background, children, collapseIcon, expandIconProps, style, expandState, disabled]);
|
|
141
140
|
}));
|
|
142
141
|
AccordionSummary.defaultProps = {
|
|
143
142
|
expandIconAt: 'start',
|
|
@@ -5,7 +5,7 @@ import { css, jsx } from '@emotion/core';
|
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { forwardRef, memo, useEffect, useRef, useState, useImperativeHandle } from 'react';
|
|
7
7
|
import { Typography } from '../..';
|
|
8
|
-
import { alignCenter, alignStart, borderBox, cursorPointer, displayBlock, flexRow, positionAbsolute, positionRelative, cursorNoDrop } from '../../../styles/general';
|
|
8
|
+
import { alignCenter, alignStart, borderBox, cursorPointer, displayBlock, flexRow, positionAbsolute, positionRelative, cursorNoDrop, parseWidthHeight } from '../../../styles/general';
|
|
9
9
|
import { randomString } from '../../../utils';
|
|
10
10
|
import { color as colors } from '../../../styles/colors';
|
|
11
11
|
import theme from '../../../theme/settings';
|
|
@@ -24,6 +24,7 @@ const {
|
|
|
24
24
|
},
|
|
25
25
|
spacing
|
|
26
26
|
} = theme;
|
|
27
|
+
const padding = spacing(0.75);
|
|
27
28
|
const Checkbox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
28
29
|
id,
|
|
29
30
|
className,
|
|
@@ -52,7 +53,6 @@ const Checkbox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
52
53
|
const ref = useRef(null);
|
|
53
54
|
if (typeof width === 'number') width += 'px';
|
|
54
55
|
const [checkedState, setCheckedState] = useState(checked || defaultChecked);
|
|
55
|
-
const padding = spacing(0.5);
|
|
56
56
|
|
|
57
57
|
if (!id) {
|
|
58
58
|
[id] = useState('DGN-UI-' + randomString(10, {
|
|
@@ -62,123 +62,13 @@ const Checkbox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
const clMain = colors[color] || color;
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
height: ${width};
|
|
73
|
-
min-height: ${width};
|
|
74
|
-
background-color: ${white};
|
|
75
|
-
border: 2px solid ${rest};
|
|
76
|
-
border-radius: 2px;
|
|
77
|
-
margin-right: ${spacing(2)}px;
|
|
78
|
-
&.determinate {
|
|
79
|
-
&::after {
|
|
80
|
-
${displayBlock}
|
|
81
|
-
${positionAbsolute}
|
|
82
|
-
content : '';
|
|
83
|
-
height: 7px;
|
|
84
|
-
left: 50%;
|
|
85
|
-
top: 43%;
|
|
86
|
-
transform: translate(-50%, -50%) scale(0) rotate(45deg);
|
|
87
|
-
transition: transform 0.3s;
|
|
88
|
-
width: 12.6px;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
&.indeterminate {
|
|
92
|
-
&::after {
|
|
93
|
-
${flexRow}
|
|
94
|
-
${positionAbsolute}
|
|
95
|
-
content: "";
|
|
96
|
-
background-color: white;
|
|
97
|
-
left: 2px;
|
|
98
|
-
top: 6px;
|
|
99
|
-
width: 10px;
|
|
100
|
-
height: 2px;
|
|
101
|
-
transition: transform 0.3s;
|
|
102
|
-
transform: scale(0);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
&:not(.disabled):not(.read-only) {
|
|
106
|
-
&:hover {
|
|
107
|
-
box-shadow: 0 0 0 3px ${clFillHover};
|
|
108
|
-
background-color: ${clFillHover};
|
|
109
|
-
border-color: ${clMain};
|
|
110
|
-
}
|
|
111
|
-
&:focus,
|
|
112
|
-
&:active {
|
|
113
|
-
box-shadow: 0 0 0 3px ${clFillPressed};
|
|
114
|
-
background-color: ${clFillPressed};
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
&:not(disabled):focus {
|
|
118
|
-
box-shadow: 0 0 0 3px ${clFillPressed};
|
|
119
|
-
background-color: ${clFillPressed};
|
|
120
|
-
}
|
|
121
|
-
&.disabled,
|
|
122
|
-
&.read-only {
|
|
123
|
-
${cursorNoDrop};
|
|
124
|
-
}
|
|
125
|
-
`;
|
|
126
|
-
const CheckBoxInput = css`
|
|
127
|
-
&:checked + label > span.css-${CheckBoxSquare.name} {
|
|
128
|
-
&.determinate {
|
|
129
|
-
&::after {
|
|
130
|
-
transform: translate(-50%, -66%) scale(1) rotate(-45deg);
|
|
131
|
-
background: linear-gradient(${white}, ${white}) left bottom/2px 100%,
|
|
132
|
-
linear-gradient(${white}, ${white}) left bottom/100% 2px;
|
|
133
|
-
background-repeat: no-repeat;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
&.indeterminate {
|
|
137
|
-
&::after {
|
|
138
|
-
transform: scale(1);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
&:checked:not(:disabled) + label > span.css-${CheckBoxSquare.name} {
|
|
143
|
-
background-color: ${clMain} !important;
|
|
144
|
-
border-color: ${clMain} !important;
|
|
145
|
-
}
|
|
146
|
-
&:checked:disabled {
|
|
147
|
-
& + label > span.css-${CheckBoxSquare.name} {
|
|
148
|
-
&:not(.indeterminate) {
|
|
149
|
-
background-color: ${clDisabled} !important;
|
|
150
|
-
}
|
|
151
|
-
&.indeterminate {
|
|
152
|
-
background-color: ${clFormal2} !important;
|
|
153
|
-
border-color: ${clFormal2} !important;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
&:disabled {
|
|
158
|
-
& + label > span.css-${CheckBoxSquare.name} {
|
|
159
|
-
border-color: ${clDisabled};
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
`;
|
|
163
|
-
const CheckBoxLabel = css`
|
|
164
|
-
${flexRow};
|
|
165
|
-
${positionRelative};
|
|
166
|
-
${alignCenter};
|
|
167
|
-
${borderBox};
|
|
168
|
-
margin-bottom: 0 !important;
|
|
169
|
-
`;
|
|
170
|
-
const CheckBoxRoot = css`
|
|
171
|
-
${flexRow};
|
|
172
|
-
${alignStart};
|
|
173
|
-
${borderBox};
|
|
174
|
-
`;
|
|
175
|
-
const CheckboxContainer = css`
|
|
176
|
-
${displayBlock};
|
|
177
|
-
${positionRelative};
|
|
178
|
-
padding: ${padding}px;
|
|
179
|
-
`;
|
|
180
|
-
|
|
181
|
-
const handleChange = () => {
|
|
65
|
+
|
|
66
|
+
const _CheckBoxSquareCSS = CheckBoxSquareCSS(width, clMain);
|
|
67
|
+
|
|
68
|
+
const _CheckBoxInputCSS = CheckBoxInputCSS(_CheckBoxSquareCSS.name, clMain);
|
|
69
|
+
|
|
70
|
+
const handleChange = event => {
|
|
71
|
+
event.stopPropagation();
|
|
182
72
|
if (readOnly || inputProps.readOnly || disabled || inputProps.disabled) return;
|
|
183
73
|
const oldLogicChecked = inputRef.current.checked; //Use for TreeView
|
|
184
74
|
|
|
@@ -225,14 +115,14 @@ const Checkbox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
225
115
|
});
|
|
226
116
|
return jsx("div", {
|
|
227
117
|
id: 'DGN-UI-Checkbox-' + id.replace('DGN-UI-', ''),
|
|
228
|
-
css:
|
|
118
|
+
css: CheckboxContainerCSS,
|
|
229
119
|
className: ['DGN-UI-Checkbox', className].join(' ').trim().replace(/\s+/g, ' '),
|
|
230
120
|
ref: ref,
|
|
231
121
|
...props,
|
|
232
122
|
onClick: handleChange
|
|
233
123
|
}, jsx("div", {
|
|
234
|
-
css:
|
|
235
|
-
className: disabled ? 'disabled' : readOnly ? 'read-only' : ''
|
|
124
|
+
css: CheckBoxRootCSS,
|
|
125
|
+
className: ['DGN-UI-Checkbox-Root', disabled ? 'disabled' : readOnly ? 'read-only' : ''].join(' ').trim().replace(/\s+/g, ' ')
|
|
236
126
|
}, jsx("input", {
|
|
237
127
|
value: value,
|
|
238
128
|
...inputProps,
|
|
@@ -240,7 +130,7 @@ const Checkbox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
240
130
|
readOnly: readOnly || inputProps.readOnly,
|
|
241
131
|
disabled: disabled || inputProps.disabled,
|
|
242
132
|
ref: inputRef,
|
|
243
|
-
css:
|
|
133
|
+
css: _CheckBoxInputCSS,
|
|
244
134
|
id: id,
|
|
245
135
|
name: name,
|
|
246
136
|
type: "checkbox",
|
|
@@ -248,16 +138,136 @@ const Checkbox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
248
138
|
onChange: handleChange,
|
|
249
139
|
hidden: true
|
|
250
140
|
}), jsx("label", {
|
|
251
|
-
css:
|
|
141
|
+
css: CheckBoxLabelCSS
|
|
252
142
|
}, jsx("span", {
|
|
253
143
|
className: [determinate ? 'determinate' : 'indeterminate', readOnly ? 'read-only' : '', disabled ? 'disabled' : ''].join(' '),
|
|
254
|
-
css:
|
|
144
|
+
css: _CheckBoxSquareCSS
|
|
255
145
|
}), (children || label) && jsx(Typography, {
|
|
256
146
|
type: 'p1',
|
|
147
|
+
style: {
|
|
148
|
+
marginLeft: spacing(1)
|
|
149
|
+
},
|
|
257
150
|
color: disabled ? clDisabled : '',
|
|
258
151
|
...labelProps
|
|
259
152
|
}, children || label))));
|
|
260
153
|
}));
|
|
154
|
+
|
|
155
|
+
const CheckBoxSquareCSS = (width, clMain) => css`
|
|
156
|
+
${flexRow};
|
|
157
|
+
${positionRelative};
|
|
158
|
+
${cursorPointer};
|
|
159
|
+
${borderBox};
|
|
160
|
+
${parseWidthHeight(width, width)};
|
|
161
|
+
min-width: ${width};
|
|
162
|
+
min-height: ${width};
|
|
163
|
+
background-color: ${white};
|
|
164
|
+
border: 2px solid ${rest};
|
|
165
|
+
border-radius: 2px;
|
|
166
|
+
margin: ${padding}px;
|
|
167
|
+
&.determinate {
|
|
168
|
+
&::after {
|
|
169
|
+
${displayBlock};
|
|
170
|
+
${positionAbsolute};
|
|
171
|
+
content: '';
|
|
172
|
+
height: 7px;
|
|
173
|
+
left: 50%;
|
|
174
|
+
top: 43%;
|
|
175
|
+
transform: translate(-50%, -50%) scale(0) rotate(45deg);
|
|
176
|
+
transition: transform 0.3s;
|
|
177
|
+
width: 12.6px;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
&.indeterminate {
|
|
181
|
+
&::after {
|
|
182
|
+
${flexRow};
|
|
183
|
+
${positionAbsolute};
|
|
184
|
+
content: '';
|
|
185
|
+
background-color: white;
|
|
186
|
+
left: 2px;
|
|
187
|
+
top: 6px;
|
|
188
|
+
width: 10px;
|
|
189
|
+
height: 2px;
|
|
190
|
+
transition: transform 0.3s;
|
|
191
|
+
transform: scale(0);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
&:not(.disabled):not(.read-only) {
|
|
195
|
+
&:hover {
|
|
196
|
+
box-shadow: 0 0 0 3px ${clFillHover};
|
|
197
|
+
background-color: ${clFillHover};
|
|
198
|
+
border-color: ${clMain};
|
|
199
|
+
}
|
|
200
|
+
&:focus,
|
|
201
|
+
&:active {
|
|
202
|
+
box-shadow: 0 0 0 3px ${clFillPressed};
|
|
203
|
+
background-color: ${clFillPressed};
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
&:not(disabled):focus {
|
|
207
|
+
box-shadow: 0 0 0 3px ${clFillPressed};
|
|
208
|
+
background-color: ${clFillPressed};
|
|
209
|
+
}
|
|
210
|
+
&.disabled,
|
|
211
|
+
&.read-only {
|
|
212
|
+
${cursorNoDrop};
|
|
213
|
+
}
|
|
214
|
+
`;
|
|
215
|
+
|
|
216
|
+
const CheckBoxInputCSS = (CheckBoxSquareCSSName, clMain) => css`
|
|
217
|
+
&:checked + label > span.css-${CheckBoxSquareCSSName} {
|
|
218
|
+
&.determinate {
|
|
219
|
+
&::after {
|
|
220
|
+
transform: translate(-50%, -66%) scale(1) rotate(-45deg);
|
|
221
|
+
background: linear-gradient(${white}, ${white}) left bottom/2px 100%,
|
|
222
|
+
linear-gradient(${white}, ${white}) left bottom/100% 2px;
|
|
223
|
+
background-repeat: no-repeat;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
&.indeterminate {
|
|
227
|
+
&::after {
|
|
228
|
+
transform: scale(1);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
&:checked:not(:disabled) + label > span.css-${CheckBoxSquareCSSName} {
|
|
233
|
+
background-color: ${clMain} !important;
|
|
234
|
+
border-color: ${clMain} !important;
|
|
235
|
+
}
|
|
236
|
+
&:checked:disabled {
|
|
237
|
+
& + label > span.css-${CheckBoxSquareCSSName} {
|
|
238
|
+
&:not(.indeterminate) {
|
|
239
|
+
background-color: ${clDisabled} !important;
|
|
240
|
+
}
|
|
241
|
+
&.indeterminate {
|
|
242
|
+
background-color: ${clFormal2} !important;
|
|
243
|
+
border-color: ${clFormal2} !important;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
&:disabled {
|
|
248
|
+
& + label > span.css-${CheckBoxSquareCSSName} {
|
|
249
|
+
border-color: ${clDisabled};
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
`;
|
|
253
|
+
|
|
254
|
+
const CheckBoxLabelCSS = css`
|
|
255
|
+
${flexRow};
|
|
256
|
+
${positionRelative};
|
|
257
|
+
${alignCenter};
|
|
258
|
+
${borderBox};
|
|
259
|
+
margin-bottom: 0 !important;
|
|
260
|
+
`;
|
|
261
|
+
const CheckBoxRootCSS = css`
|
|
262
|
+
${flexRow};
|
|
263
|
+
${alignStart};
|
|
264
|
+
${borderBox};
|
|
265
|
+
`;
|
|
266
|
+
const CheckboxContainerCSS = css`
|
|
267
|
+
${displayBlock};
|
|
268
|
+
${positionRelative};
|
|
269
|
+
width: fit-content;
|
|
270
|
+
`;
|
|
261
271
|
Checkbox.defaultProps = {
|
|
262
272
|
label: '',
|
|
263
273
|
className: '',
|
|
@@ -271,57 +281,53 @@ Checkbox.defaultProps = {
|
|
|
271
281
|
width: 18
|
|
272
282
|
};
|
|
273
283
|
Checkbox.propTypes = {
|
|
274
|
-
/**
|
|
284
|
+
/** If `true`, the component is checked. */
|
|
275
285
|
checked: PropTypes.bool,
|
|
276
286
|
|
|
277
|
-
/**
|
|
278
|
-
|
|
287
|
+
/** Class for component. */
|
|
288
|
+
className: PropTypes.string,
|
|
279
289
|
|
|
280
|
-
/**
|
|
281
|
-
|
|
290
|
+
/** The main color of the component. ['primary', 'info', 'success', 'warning', 'danger', #hex, rgb(#, #, #)] */
|
|
291
|
+
color: PropTypes.string,
|
|
282
292
|
|
|
283
|
-
/**
|
|
284
|
-
|
|
293
|
+
/** The default checked state. Use when the component is not controlled. */
|
|
294
|
+
defaultChecked: PropTypes.bool,
|
|
285
295
|
|
|
286
|
-
/** display tick or
|
|
296
|
+
/** If `true` display tick or indeterminate if `false`. */
|
|
287
297
|
determinate: PropTypes.bool,
|
|
288
298
|
|
|
289
|
-
/**
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
/** value of input */
|
|
293
|
-
value: PropTypes.string,
|
|
299
|
+
/** If `true`, the component is disabled. */
|
|
300
|
+
disabled: PropTypes.bool,
|
|
294
301
|
|
|
295
|
-
/**
|
|
296
|
-
|
|
302
|
+
/** The id of the component. */
|
|
303
|
+
id: PropTypes.string,
|
|
297
304
|
|
|
298
|
-
/**
|
|
299
|
-
|
|
305
|
+
/** [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element. */
|
|
306
|
+
inputProps: PropTypes.object,
|
|
300
307
|
|
|
301
|
-
/** The name of the Radio is displayed on the interface */
|
|
308
|
+
/** The name of the Radio is displayed on the interface. */
|
|
302
309
|
label: PropTypes.string,
|
|
303
310
|
|
|
304
|
-
/**
|
|
305
|
-
color: PropTypes.string,
|
|
306
|
-
|
|
307
|
-
/** props for Typography of label */
|
|
311
|
+
/** [Props](https://core.diginet.com.vn/ui/?path=/docs/typography--title) applied to the `Typography` label. */
|
|
308
312
|
labelProps: PropTypes.object,
|
|
309
313
|
|
|
310
|
-
/**
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
/** width is a number || string, width of Checkbox default 18 */
|
|
314
|
-
width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
315
|
-
|
|
316
|
-
/** The function will run to return a true or false value of Radio Component */
|
|
317
|
-
onChange: PropTypes.func,
|
|
314
|
+
/** The name of the Checkbox corresponds to the label displayed on the interface. */
|
|
315
|
+
name: PropTypes.string,
|
|
318
316
|
|
|
319
317
|
/**
|
|
320
|
-
*
|
|
318
|
+
* Callback fired when the state is changed.
|
|
321
319
|
*
|
|
322
|
-
*
|
|
323
|
-
* * getChecked: Get check of input
|
|
320
|
+
* You can pull out the new checked state by accessing `event.value` or `event.target.checked` (boolean).
|
|
324
321
|
*/
|
|
325
|
-
|
|
322
|
+
onChange: PropTypes.func,
|
|
323
|
+
|
|
324
|
+
/** If `true`, the component is readonly. */
|
|
325
|
+
readOnly: PropTypes.bool,
|
|
326
|
+
|
|
327
|
+
/** The width of checkbox. */
|
|
328
|
+
width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
329
|
+
|
|
330
|
+
/** The value of input */
|
|
331
|
+
value: PropTypes.any
|
|
326
332
|
};
|
|
327
333
|
export default Checkbox;
|