carbon-react 110.2.2 → 110.2.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/esm/__internal__/checkable-input/checkable-input-svg-wrapper.style.d.ts +1 -1
- package/esm/__internal__/checkable-input/checkable-input.component.d.ts +50 -0
- package/esm/__internal__/checkable-input/checkable-input.component.js +360 -98
- package/esm/__internal__/checkable-input/checkable-input.style.d.ts +11 -2
- package/esm/__internal__/checkable-input/checkable-input.style.js +0 -7
- package/esm/__internal__/checkable-input/hidden-checkable-input.component.d.ts +31 -0
- package/esm/__internal__/checkable-input/hidden-checkable-input.component.js +301 -45
- package/esm/__internal__/checkable-input/hidden-checkable-input.style.d.ts +1 -1
- package/esm/__internal__/checkable-input/index.d.ts +2 -5
- package/esm/__internal__/input/input-presentation.style.d.ts +1 -1
- package/esm/__internal__/input/input.style.d.ts +1 -1
- package/esm/components/flat-table/flat-table-row/flat-table-row.style.js +1 -0
- package/lib/__internal__/checkable-input/checkable-input-svg-wrapper.style.d.ts +1 -1
- package/lib/__internal__/checkable-input/checkable-input.component.d.ts +50 -0
- package/lib/__internal__/checkable-input/checkable-input.component.js +360 -98
- package/lib/__internal__/checkable-input/checkable-input.style.d.ts +11 -2
- package/lib/__internal__/checkable-input/checkable-input.style.js +1 -9
- package/lib/__internal__/checkable-input/hidden-checkable-input.component.d.ts +31 -0
- package/lib/__internal__/checkable-input/hidden-checkable-input.component.js +301 -45
- package/lib/__internal__/checkable-input/hidden-checkable-input.style.d.ts +1 -1
- package/lib/__internal__/checkable-input/index.d.ts +2 -5
- package/lib/__internal__/input/input-presentation.style.d.ts +1 -1
- package/lib/__internal__/input/input.style.d.ts +1 -1
- package/lib/components/flat-table/flat-table-row/flat-table-row.style.js +1 -0
- package/package.json +1 -1
- package/esm/__internal__/checkable-input/checkable-input.d.ts +0 -55
- package/esm/__internal__/checkable-input/hidden-checkable-input.d.ts +0 -42
- package/lib/__internal__/checkable-input/checkable-input.d.ts +0 -55
- package/lib/__internal__/checkable-input/hidden-checkable-input.d.ts +0 -42
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CommonHiddenCheckableInputProps } from "./hidden-checkable-input.component";
|
|
3
|
+
import { ValidationProps } from "../validations";
|
|
4
|
+
export interface CommonCheckableInputProps extends ValidationProps, CommonHiddenCheckableInputProps {
|
|
5
|
+
/** If true, the component will be disabled */
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
/** Help content to be displayed under an input */
|
|
8
|
+
fieldHelp?: React.ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* If true, the FieldHelp will be displayed inline
|
|
11
|
+
* To be used with labelInline prop set to true
|
|
12
|
+
*/
|
|
13
|
+
fieldHelpInline?: boolean;
|
|
14
|
+
/** Unique Identifier for the input. Will use a randomly generated GUID if none is provided */
|
|
15
|
+
id?: string;
|
|
16
|
+
/** Sets percentage-based input width */
|
|
17
|
+
inputWidth?: number;
|
|
18
|
+
/** Label content */
|
|
19
|
+
label?: React.ReactNode;
|
|
20
|
+
/** The content for the help tooltip, to appear next to the Label */
|
|
21
|
+
labelHelp?: React.ReactNode;
|
|
22
|
+
/** Spacing between label and a field for inline label, given number will be multiplied by base spacing unit (8) */
|
|
23
|
+
labelSpacing?: 1 | 2;
|
|
24
|
+
/** Label width */
|
|
25
|
+
labelWidth?: number;
|
|
26
|
+
/** Flag to configure component as mandatory */
|
|
27
|
+
required?: boolean;
|
|
28
|
+
/** If true the label switches position with the input */
|
|
29
|
+
reverse?: boolean;
|
|
30
|
+
/** Size of the component */
|
|
31
|
+
size?: "small" | "large";
|
|
32
|
+
/** The id of the element that labels the input */
|
|
33
|
+
ariaLabelledBy?: string;
|
|
34
|
+
/** When true, displays validation icon on label */
|
|
35
|
+
validationOnLabel?: boolean;
|
|
36
|
+
}
|
|
37
|
+
export interface CheckableInputProps extends CommonCheckableInputProps {
|
|
38
|
+
/** Used to set the visible aspect of the input (i.e. the checkbox sprite, input slider etc) */
|
|
39
|
+
children?: React.ReactNode;
|
|
40
|
+
/** HTML type attribute of the input */
|
|
41
|
+
type: string;
|
|
42
|
+
/** Value passed to the input */
|
|
43
|
+
value?: string;
|
|
44
|
+
/** Text alignment of the label */
|
|
45
|
+
labelAlign?: "left" | "right";
|
|
46
|
+
/** When true label is inline */
|
|
47
|
+
labelInline?: boolean;
|
|
48
|
+
}
|
|
49
|
+
declare const CheckableInput: ({ ariaLabelledBy: externalAriaLabelledBy, autoFocus, checked, children, disabled, error, fieldHelp, fieldHelpInline, info, id: inputId, inputRef, type, value, inputWidth, label, labelAlign, labelHelp, labelInline, labelSpacing, labelWidth, name, onBlur, onChange, onFocus, required, reverse, validationOnLabel, warning, ...props }: CheckableInputProps) => JSX.Element;
|
|
50
|
+
export default CheckableInput;
|
|
@@ -25,15 +25,15 @@ const CheckableInput = ({
|
|
|
25
25
|
label,
|
|
26
26
|
labelAlign,
|
|
27
27
|
labelHelp,
|
|
28
|
-
labelInline,
|
|
29
|
-
labelSpacing,
|
|
28
|
+
labelInline = true,
|
|
29
|
+
labelSpacing = 1,
|
|
30
30
|
labelWidth,
|
|
31
31
|
name,
|
|
32
32
|
onBlur,
|
|
33
33
|
onChange,
|
|
34
34
|
onFocus,
|
|
35
35
|
required,
|
|
36
|
-
reverse,
|
|
36
|
+
reverse = false,
|
|
37
37
|
validationOnLabel,
|
|
38
38
|
warning,
|
|
39
39
|
...props
|
|
@@ -109,101 +109,363 @@ const CheckableInput = ({
|
|
|
109
109
|
};
|
|
110
110
|
|
|
111
111
|
CheckableInput.propTypes = {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
112
|
+
"about": PropTypes.string,
|
|
113
|
+
"accept": PropTypes.string,
|
|
114
|
+
"accessKey": PropTypes.string,
|
|
115
|
+
"alt": PropTypes.string,
|
|
116
|
+
"aria-activedescendant": PropTypes.string,
|
|
117
|
+
"aria-atomic": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
|
|
118
|
+
"aria-autocomplete": PropTypes.oneOf(["both", "inline", "list", "none"]),
|
|
119
|
+
"aria-busy": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
|
|
120
|
+
"aria-checked": PropTypes.oneOfType([PropTypes.oneOf(["false", "mixed", "true"]), PropTypes.bool]),
|
|
121
|
+
"aria-colcount": PropTypes.number,
|
|
122
|
+
"aria-colindex": PropTypes.number,
|
|
123
|
+
"aria-colspan": PropTypes.number,
|
|
124
|
+
"aria-controls": PropTypes.string,
|
|
125
|
+
"aria-current": PropTypes.oneOfType([PropTypes.oneOf(["date", "false", "location", "page", "step", "time", "true"]), PropTypes.bool]),
|
|
126
|
+
"aria-describedby": PropTypes.string,
|
|
127
|
+
"aria-details": PropTypes.string,
|
|
128
|
+
"aria-disabled": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
|
|
129
|
+
"aria-dropeffect": PropTypes.oneOf(["copy", "execute", "link", "move", "none", "popup"]),
|
|
130
|
+
"aria-errormessage": PropTypes.string,
|
|
131
|
+
"aria-expanded": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
|
|
132
|
+
"aria-flowto": PropTypes.string,
|
|
133
|
+
"aria-grabbed": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
|
|
134
|
+
"aria-haspopup": PropTypes.oneOfType([PropTypes.oneOf(["dialog", "false", "grid", "listbox", "menu", "tree", "true"]), PropTypes.bool]),
|
|
135
|
+
"aria-hidden": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
|
|
136
|
+
"aria-invalid": PropTypes.oneOfType([PropTypes.oneOf(["false", "grammar", "spelling", "true"]), PropTypes.bool]),
|
|
137
|
+
"aria-keyshortcuts": PropTypes.string,
|
|
138
|
+
"aria-label": PropTypes.string,
|
|
139
|
+
"aria-labelledby": PropTypes.string,
|
|
140
|
+
"aria-level": PropTypes.number,
|
|
141
|
+
"aria-live": PropTypes.oneOf(["assertive", "off", "polite"]),
|
|
142
|
+
"aria-modal": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
|
|
143
|
+
"aria-multiline": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
|
|
144
|
+
"aria-multiselectable": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
|
|
145
|
+
"aria-orientation": PropTypes.oneOf(["horizontal", "vertical"]),
|
|
146
|
+
"aria-owns": PropTypes.string,
|
|
147
|
+
"aria-placeholder": PropTypes.string,
|
|
148
|
+
"aria-posinset": PropTypes.number,
|
|
149
|
+
"aria-pressed": PropTypes.oneOfType([PropTypes.oneOf(["false", "mixed", "true"]), PropTypes.bool]),
|
|
150
|
+
"aria-readonly": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
|
|
151
|
+
"aria-relevant": PropTypes.oneOf(["additions removals", "additions text", "additions", "all", "removals additions", "removals text", "removals", "text additions", "text removals", "text"]),
|
|
152
|
+
"aria-required": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
|
|
153
|
+
"aria-roledescription": PropTypes.string,
|
|
154
|
+
"aria-rowcount": PropTypes.number,
|
|
155
|
+
"aria-rowindex": PropTypes.number,
|
|
156
|
+
"aria-rowspan": PropTypes.number,
|
|
157
|
+
"aria-selected": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
|
|
158
|
+
"aria-setsize": PropTypes.number,
|
|
159
|
+
"aria-sort": PropTypes.oneOf(["ascending", "descending", "none", "other"]),
|
|
160
|
+
"aria-valuemax": PropTypes.number,
|
|
161
|
+
"aria-valuemin": PropTypes.number,
|
|
162
|
+
"aria-valuenow": PropTypes.number,
|
|
163
|
+
"aria-valuetext": PropTypes.string,
|
|
164
|
+
"ariaLabelledBy": PropTypes.string,
|
|
165
|
+
"autoCapitalize": PropTypes.string,
|
|
166
|
+
"autoComplete": PropTypes.string,
|
|
167
|
+
"autoCorrect": PropTypes.string,
|
|
168
|
+
"autoFocus": PropTypes.bool,
|
|
169
|
+
"autoSave": PropTypes.string,
|
|
170
|
+
"capture": PropTypes.oneOfType([PropTypes.oneOf(["environment", "user"]), PropTypes.bool]),
|
|
171
|
+
"checked": PropTypes.bool,
|
|
172
|
+
"children": PropTypes.node,
|
|
173
|
+
"className": PropTypes.string,
|
|
174
|
+
"color": PropTypes.string,
|
|
175
|
+
"contentEditable": PropTypes.oneOfType([PropTypes.oneOf(["false", "inherit", "true"]), PropTypes.bool]),
|
|
176
|
+
"contextMenu": PropTypes.string,
|
|
177
|
+
"crossOrigin": PropTypes.string,
|
|
178
|
+
"css": PropTypes.oneOfType([PropTypes.func, PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
179
|
+
"__emotion_styles": PropTypes.any.isRequired
|
|
180
|
+
}), PropTypes.string, PropTypes.bool]),
|
|
181
|
+
"dangerouslySetInnerHTML": PropTypes.shape({
|
|
182
|
+
"__html": PropTypes.string.isRequired
|
|
183
|
+
}),
|
|
184
|
+
"datatype": PropTypes.string,
|
|
185
|
+
"defaultChecked": PropTypes.bool,
|
|
186
|
+
"defaultValue": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.number, PropTypes.string]),
|
|
187
|
+
"dir": PropTypes.string,
|
|
188
|
+
"disabled": PropTypes.bool,
|
|
189
|
+
"draggable": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
|
|
190
|
+
"enterKeyHint": PropTypes.oneOf(["done", "enter", "go", "next", "previous", "search", "send"]),
|
|
191
|
+
"error": PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
|
|
192
|
+
"fieldHelp": PropTypes.node,
|
|
193
|
+
"fieldHelpInline": PropTypes.bool,
|
|
194
|
+
"form": PropTypes.string,
|
|
195
|
+
"formAction": PropTypes.string,
|
|
196
|
+
"formEncType": PropTypes.string,
|
|
197
|
+
"formMethod": PropTypes.string,
|
|
198
|
+
"formNoValidate": PropTypes.bool,
|
|
199
|
+
"formTarget": PropTypes.string,
|
|
200
|
+
"height": PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
201
|
+
"hidden": PropTypes.bool,
|
|
202
|
+
"id": PropTypes.string,
|
|
203
|
+
"info": PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
|
|
204
|
+
"inlist": PropTypes.any,
|
|
205
|
+
"inputMode": PropTypes.oneOf(["decimal", "email", "none", "numeric", "search", "tel", "text", "url"]),
|
|
206
|
+
"inputRef": PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
207
|
+
"current": PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.object]).isRequired
|
|
196
208
|
})]),
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
labelInline:
|
|
209
|
+
"inputWidth": PropTypes.number,
|
|
210
|
+
"is": PropTypes.string,
|
|
211
|
+
"itemID": PropTypes.string,
|
|
212
|
+
"itemProp": PropTypes.string,
|
|
213
|
+
"itemRef": PropTypes.string,
|
|
214
|
+
"itemScope": PropTypes.bool,
|
|
215
|
+
"itemType": PropTypes.string,
|
|
216
|
+
"label": PropTypes.node,
|
|
217
|
+
"labelAlign": PropTypes.oneOf(["left", "right"]),
|
|
218
|
+
"labelHelp": PropTypes.node,
|
|
219
|
+
"labelInline": PropTypes.bool,
|
|
220
|
+
"labelSpacing": PropTypes.oneOf([1, 2]),
|
|
221
|
+
"labelWidth": PropTypes.number,
|
|
222
|
+
"lang": PropTypes.string,
|
|
223
|
+
"list": PropTypes.string,
|
|
224
|
+
"max": PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
225
|
+
"maxLength": PropTypes.number,
|
|
226
|
+
"min": PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
227
|
+
"minLength": PropTypes.number,
|
|
228
|
+
"multiple": PropTypes.bool,
|
|
229
|
+
"name": PropTypes.string,
|
|
230
|
+
"onAbort": PropTypes.func,
|
|
231
|
+
"onAbortCapture": PropTypes.func,
|
|
232
|
+
"onAnimationEnd": PropTypes.func,
|
|
233
|
+
"onAnimationEndCapture": PropTypes.func,
|
|
234
|
+
"onAnimationIteration": PropTypes.func,
|
|
235
|
+
"onAnimationIterationCapture": PropTypes.func,
|
|
236
|
+
"onAnimationStart": PropTypes.func,
|
|
237
|
+
"onAnimationStartCapture": PropTypes.func,
|
|
238
|
+
"onAuxClick": PropTypes.func,
|
|
239
|
+
"onAuxClickCapture": PropTypes.func,
|
|
240
|
+
"onBeforeInput": PropTypes.func,
|
|
241
|
+
"onBeforeInputCapture": PropTypes.func,
|
|
242
|
+
"onBlur": PropTypes.func,
|
|
243
|
+
"onBlurCapture": PropTypes.func,
|
|
244
|
+
"onCanPlay": PropTypes.func,
|
|
245
|
+
"onCanPlayCapture": PropTypes.func,
|
|
246
|
+
"onCanPlayThrough": PropTypes.func,
|
|
247
|
+
"onCanPlayThroughCapture": PropTypes.func,
|
|
248
|
+
"onChange": PropTypes.func,
|
|
249
|
+
"onChangeCapture": PropTypes.func,
|
|
250
|
+
"onClick": PropTypes.func,
|
|
251
|
+
"onClickCapture": PropTypes.func,
|
|
252
|
+
"onCompositionEnd": PropTypes.func,
|
|
253
|
+
"onCompositionEndCapture": PropTypes.func,
|
|
254
|
+
"onCompositionStart": PropTypes.func,
|
|
255
|
+
"onCompositionStartCapture": PropTypes.func,
|
|
256
|
+
"onCompositionUpdate": PropTypes.func,
|
|
257
|
+
"onCompositionUpdateCapture": PropTypes.func,
|
|
258
|
+
"onContextMenu": PropTypes.func,
|
|
259
|
+
"onContextMenuCapture": PropTypes.func,
|
|
260
|
+
"onCopy": PropTypes.func,
|
|
261
|
+
"onCopyCapture": PropTypes.func,
|
|
262
|
+
"onCut": PropTypes.func,
|
|
263
|
+
"onCutCapture": PropTypes.func,
|
|
264
|
+
"onDoubleClick": PropTypes.func,
|
|
265
|
+
"onDoubleClickCapture": PropTypes.func,
|
|
266
|
+
"onDrag": PropTypes.func,
|
|
267
|
+
"onDragCapture": PropTypes.func,
|
|
268
|
+
"onDragEnd": PropTypes.func,
|
|
269
|
+
"onDragEndCapture": PropTypes.func,
|
|
270
|
+
"onDragEnter": PropTypes.func,
|
|
271
|
+
"onDragEnterCapture": PropTypes.func,
|
|
272
|
+
"onDragExit": PropTypes.func,
|
|
273
|
+
"onDragExitCapture": PropTypes.func,
|
|
274
|
+
"onDragLeave": PropTypes.func,
|
|
275
|
+
"onDragLeaveCapture": PropTypes.func,
|
|
276
|
+
"onDragOver": PropTypes.func,
|
|
277
|
+
"onDragOverCapture": PropTypes.func,
|
|
278
|
+
"onDragStart": PropTypes.func,
|
|
279
|
+
"onDragStartCapture": PropTypes.func,
|
|
280
|
+
"onDrop": PropTypes.func,
|
|
281
|
+
"onDropCapture": PropTypes.func,
|
|
282
|
+
"onDurationChange": PropTypes.func,
|
|
283
|
+
"onDurationChangeCapture": PropTypes.func,
|
|
284
|
+
"onEmptied": PropTypes.func,
|
|
285
|
+
"onEmptiedCapture": PropTypes.func,
|
|
286
|
+
"onEncrypted": PropTypes.func,
|
|
287
|
+
"onEncryptedCapture": PropTypes.func,
|
|
288
|
+
"onEnded": PropTypes.func,
|
|
289
|
+
"onEndedCapture": PropTypes.func,
|
|
290
|
+
"onError": PropTypes.func,
|
|
291
|
+
"onErrorCapture": PropTypes.func,
|
|
292
|
+
"onFocus": PropTypes.func,
|
|
293
|
+
"onFocusCapture": PropTypes.func,
|
|
294
|
+
"onGotPointerCapture": PropTypes.func,
|
|
295
|
+
"onGotPointerCaptureCapture": PropTypes.func,
|
|
296
|
+
"onInput": PropTypes.func,
|
|
297
|
+
"onInputCapture": PropTypes.func,
|
|
298
|
+
"onInvalid": PropTypes.func,
|
|
299
|
+
"onInvalidCapture": PropTypes.func,
|
|
300
|
+
"onKeyDown": PropTypes.func,
|
|
301
|
+
"onKeyDownCapture": PropTypes.func,
|
|
302
|
+
"onKeyPress": PropTypes.func,
|
|
303
|
+
"onKeyPressCapture": PropTypes.func,
|
|
304
|
+
"onKeyUp": PropTypes.func,
|
|
305
|
+
"onKeyUpCapture": PropTypes.func,
|
|
306
|
+
"onLoad": PropTypes.func,
|
|
307
|
+
"onLoadCapture": PropTypes.func,
|
|
308
|
+
"onLoadedData": PropTypes.func,
|
|
309
|
+
"onLoadedDataCapture": PropTypes.func,
|
|
310
|
+
"onLoadedMetadata": PropTypes.func,
|
|
311
|
+
"onLoadedMetadataCapture": PropTypes.func,
|
|
312
|
+
"onLoadStart": PropTypes.func,
|
|
313
|
+
"onLoadStartCapture": PropTypes.func,
|
|
314
|
+
"onLostPointerCapture": PropTypes.func,
|
|
315
|
+
"onLostPointerCaptureCapture": PropTypes.func,
|
|
316
|
+
"onMouseDown": PropTypes.func,
|
|
317
|
+
"onMouseDownCapture": PropTypes.func,
|
|
318
|
+
"onMouseEnter": PropTypes.func,
|
|
319
|
+
"onMouseLeave": PropTypes.func,
|
|
320
|
+
"onMouseMove": PropTypes.func,
|
|
321
|
+
"onMouseMoveCapture": PropTypes.func,
|
|
322
|
+
"onMouseOut": PropTypes.func,
|
|
323
|
+
"onMouseOutCapture": PropTypes.func,
|
|
324
|
+
"onMouseOver": PropTypes.func,
|
|
325
|
+
"onMouseOverCapture": PropTypes.func,
|
|
326
|
+
"onMouseUp": PropTypes.func,
|
|
327
|
+
"onMouseUpCapture": PropTypes.func,
|
|
328
|
+
"onPaste": PropTypes.func,
|
|
329
|
+
"onPasteCapture": PropTypes.func,
|
|
330
|
+
"onPause": PropTypes.func,
|
|
331
|
+
"onPauseCapture": PropTypes.func,
|
|
332
|
+
"onPlay": PropTypes.func,
|
|
333
|
+
"onPlayCapture": PropTypes.func,
|
|
334
|
+
"onPlaying": PropTypes.func,
|
|
335
|
+
"onPlayingCapture": PropTypes.func,
|
|
336
|
+
"onPointerCancel": PropTypes.func,
|
|
337
|
+
"onPointerCancelCapture": PropTypes.func,
|
|
338
|
+
"onPointerDown": PropTypes.func,
|
|
339
|
+
"onPointerDownCapture": PropTypes.func,
|
|
340
|
+
"onPointerEnter": PropTypes.func,
|
|
341
|
+
"onPointerEnterCapture": PropTypes.func,
|
|
342
|
+
"onPointerLeave": PropTypes.func,
|
|
343
|
+
"onPointerLeaveCapture": PropTypes.func,
|
|
344
|
+
"onPointerMove": PropTypes.func,
|
|
345
|
+
"onPointerMoveCapture": PropTypes.func,
|
|
346
|
+
"onPointerOut": PropTypes.func,
|
|
347
|
+
"onPointerOutCapture": PropTypes.func,
|
|
348
|
+
"onPointerOver": PropTypes.func,
|
|
349
|
+
"onPointerOverCapture": PropTypes.func,
|
|
350
|
+
"onPointerUp": PropTypes.func,
|
|
351
|
+
"onPointerUpCapture": PropTypes.func,
|
|
352
|
+
"onProgress": PropTypes.func,
|
|
353
|
+
"onProgressCapture": PropTypes.func,
|
|
354
|
+
"onRateChange": PropTypes.func,
|
|
355
|
+
"onRateChangeCapture": PropTypes.func,
|
|
356
|
+
"onReset": PropTypes.func,
|
|
357
|
+
"onResetCapture": PropTypes.func,
|
|
358
|
+
"onScroll": PropTypes.func,
|
|
359
|
+
"onScrollCapture": PropTypes.func,
|
|
360
|
+
"onSeeked": PropTypes.func,
|
|
361
|
+
"onSeekedCapture": PropTypes.func,
|
|
362
|
+
"onSeeking": PropTypes.func,
|
|
363
|
+
"onSeekingCapture": PropTypes.func,
|
|
364
|
+
"onSelect": PropTypes.func,
|
|
365
|
+
"onSelectCapture": PropTypes.func,
|
|
366
|
+
"onStalled": PropTypes.func,
|
|
367
|
+
"onStalledCapture": PropTypes.func,
|
|
368
|
+
"onSubmit": PropTypes.func,
|
|
369
|
+
"onSubmitCapture": PropTypes.func,
|
|
370
|
+
"onSuspend": PropTypes.func,
|
|
371
|
+
"onSuspendCapture": PropTypes.func,
|
|
372
|
+
"onTimeUpdate": PropTypes.func,
|
|
373
|
+
"onTimeUpdateCapture": PropTypes.func,
|
|
374
|
+
"onTouchCancel": PropTypes.func,
|
|
375
|
+
"onTouchCancelCapture": PropTypes.func,
|
|
376
|
+
"onTouchEnd": PropTypes.func,
|
|
377
|
+
"onTouchEndCapture": PropTypes.func,
|
|
378
|
+
"onTouchMove": PropTypes.func,
|
|
379
|
+
"onTouchMoveCapture": PropTypes.func,
|
|
380
|
+
"onTouchStart": PropTypes.func,
|
|
381
|
+
"onTouchStartCapture": PropTypes.func,
|
|
382
|
+
"onTransitionEnd": PropTypes.func,
|
|
383
|
+
"onTransitionEndCapture": PropTypes.func,
|
|
384
|
+
"onVolumeChange": PropTypes.func,
|
|
385
|
+
"onVolumeChangeCapture": PropTypes.func,
|
|
386
|
+
"onWaiting": PropTypes.func,
|
|
387
|
+
"onWaitingCapture": PropTypes.func,
|
|
388
|
+
"onWheel": PropTypes.func,
|
|
389
|
+
"onWheelCapture": PropTypes.func,
|
|
390
|
+
"pattern": PropTypes.string,
|
|
391
|
+
"placeholder": PropTypes.string,
|
|
392
|
+
"prefix": PropTypes.string,
|
|
393
|
+
"property": PropTypes.string,
|
|
394
|
+
"radioGroup": PropTypes.string,
|
|
395
|
+
"readOnly": PropTypes.bool,
|
|
396
|
+
"required": PropTypes.bool,
|
|
397
|
+
"resource": PropTypes.string,
|
|
398
|
+
"results": PropTypes.number,
|
|
399
|
+
"reverse": PropTypes.bool,
|
|
400
|
+
"role": PropTypes.oneOfType([PropTypes.oneOf(["alert", "alertdialog", "application", "article", "banner", "button", "cell", "checkbox", "columnheader", "combobox", "complementary", "contentinfo", "definition", "dialog", "directory", "document", "feed", "figure", "form", "grid", "gridcell", "group", "heading", "img", "link", "list", "listbox", "listitem", "log", "main", "marquee", "math", "menu", "menubar", "menuitem", "menuitemcheckbox", "menuitemradio", "navigation", "none", "note", "option", "presentation", "progressbar", "radio", "radiogroup", "region", "row", "rowgroup", "rowheader", "scrollbar", "search", "searchbox", "separator", "slider", "spinbutton", "status", "switch", "tab", "table", "tablist", "tabpanel", "term", "textbox", "timer", "toolbar", "tooltip", "tree", "treegrid", "treeitem"]), PropTypes.shape({
|
|
401
|
+
"__@iterator": PropTypes.func.isRequired,
|
|
402
|
+
"anchor": PropTypes.func.isRequired,
|
|
403
|
+
"big": PropTypes.func.isRequired,
|
|
404
|
+
"blink": PropTypes.func.isRequired,
|
|
405
|
+
"bold": PropTypes.func.isRequired,
|
|
406
|
+
"charAt": PropTypes.func.isRequired,
|
|
407
|
+
"charCodeAt": PropTypes.func.isRequired,
|
|
408
|
+
"codePointAt": PropTypes.func.isRequired,
|
|
409
|
+
"concat": PropTypes.func.isRequired,
|
|
410
|
+
"endsWith": PropTypes.func.isRequired,
|
|
411
|
+
"fixed": PropTypes.func.isRequired,
|
|
412
|
+
"fontcolor": PropTypes.func.isRequired,
|
|
413
|
+
"fontsize": PropTypes.func.isRequired,
|
|
414
|
+
"includes": PropTypes.func.isRequired,
|
|
415
|
+
"indexOf": PropTypes.func.isRequired,
|
|
416
|
+
"italics": PropTypes.func.isRequired,
|
|
417
|
+
"lastIndexOf": PropTypes.func.isRequired,
|
|
418
|
+
"length": PropTypes.number.isRequired,
|
|
419
|
+
"link": PropTypes.func.isRequired,
|
|
420
|
+
"localeCompare": PropTypes.func.isRequired,
|
|
421
|
+
"match": PropTypes.func.isRequired,
|
|
422
|
+
"matchAll": PropTypes.func.isRequired,
|
|
423
|
+
"normalize": PropTypes.func.isRequired,
|
|
424
|
+
"padEnd": PropTypes.func.isRequired,
|
|
425
|
+
"padStart": PropTypes.func.isRequired,
|
|
426
|
+
"repeat": PropTypes.func.isRequired,
|
|
427
|
+
"replace": PropTypes.func.isRequired,
|
|
428
|
+
"search": PropTypes.func.isRequired,
|
|
429
|
+
"slice": PropTypes.func.isRequired,
|
|
430
|
+
"small": PropTypes.func.isRequired,
|
|
431
|
+
"split": PropTypes.func.isRequired,
|
|
432
|
+
"startsWith": PropTypes.func.isRequired,
|
|
433
|
+
"strike": PropTypes.func.isRequired,
|
|
434
|
+
"sub": PropTypes.func.isRequired,
|
|
435
|
+
"substr": PropTypes.func.isRequired,
|
|
436
|
+
"substring": PropTypes.func.isRequired,
|
|
437
|
+
"sup": PropTypes.func.isRequired,
|
|
438
|
+
"toLocaleLowerCase": PropTypes.func.isRequired,
|
|
439
|
+
"toLocaleUpperCase": PropTypes.func.isRequired,
|
|
440
|
+
"toLowerCase": PropTypes.func.isRequired,
|
|
441
|
+
"toString": PropTypes.func.isRequired,
|
|
442
|
+
"toUpperCase": PropTypes.func.isRequired,
|
|
443
|
+
"trim": PropTypes.func.isRequired,
|
|
444
|
+
"trimEnd": PropTypes.func.isRequired,
|
|
445
|
+
"trimLeft": PropTypes.func.isRequired,
|
|
446
|
+
"trimRight": PropTypes.func.isRequired,
|
|
447
|
+
"trimStart": PropTypes.func.isRequired,
|
|
448
|
+
"valueOf": PropTypes.func.isRequired
|
|
449
|
+
})]),
|
|
450
|
+
"security": PropTypes.string,
|
|
451
|
+
"size": PropTypes.oneOf(["large", "small"]),
|
|
452
|
+
"slot": PropTypes.string,
|
|
453
|
+
"spellCheck": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
|
|
454
|
+
"src": PropTypes.string,
|
|
455
|
+
"step": PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
456
|
+
"style": PropTypes.object,
|
|
457
|
+
"suppressContentEditableWarning": PropTypes.bool,
|
|
458
|
+
"suppressHydrationWarning": PropTypes.bool,
|
|
459
|
+
"tabIndex": PropTypes.number,
|
|
460
|
+
"title": PropTypes.string,
|
|
461
|
+
"translate": PropTypes.oneOf(["no", "yes"]),
|
|
462
|
+
"type": PropTypes.string.isRequired,
|
|
463
|
+
"typeof": PropTypes.string,
|
|
464
|
+
"unselectable": PropTypes.oneOf(["off", "on"]),
|
|
465
|
+
"validationOnLabel": PropTypes.bool,
|
|
466
|
+
"value": PropTypes.string,
|
|
467
|
+
"vocab": PropTypes.string,
|
|
468
|
+
"warning": PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
|
|
469
|
+
"width": PropTypes.oneOfType([PropTypes.number, PropTypes.string])
|
|
208
470
|
};
|
|
209
471
|
export default CheckableInput;
|
|
@@ -1,2 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
declare const StyledCheckableInput: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export interface StyledCheckableInputWrapperProps {
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
fieldHelpInline?: boolean;
|
|
5
|
+
inputWidth?: number | string;
|
|
6
|
+
labelWidth?: number;
|
|
7
|
+
labelInline?: boolean;
|
|
8
|
+
reverse?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const StyledCheckableInputWrapper: import("styled-components").StyledComponent<"div", any, StyledCheckableInputWrapperProps, never>;
|
|
11
|
+
export { StyledCheckableInput, StyledCheckableInputWrapper };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
|
-
import PropTypes from "prop-types";
|
|
3
2
|
import FieldHelpStyle from "../field-help/field-help.style";
|
|
4
3
|
import { FieldLineStyle } from "../form-field/form-field.style";
|
|
5
4
|
import HiddenCheckableInputStyle from "./hidden-checkable-input.style";
|
|
@@ -97,10 +96,4 @@ const StyledCheckableInputWrapper = styled.div`
|
|
|
97
96
|
`}
|
|
98
97
|
`}
|
|
99
98
|
`;
|
|
100
|
-
StyledCheckableInputWrapper.propTypes = {
|
|
101
|
-
disabled: PropTypes.bool,
|
|
102
|
-
fieldHelpInline: PropTypes.bool,
|
|
103
|
-
inputWidth: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
104
|
-
labelWidth: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
|
|
105
|
-
};
|
|
106
99
|
export { StyledCheckableInput, StyledCheckableInputWrapper };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface CommonHiddenCheckableInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "size" | "type"> {
|
|
3
|
+
/** If true the Component will be focused when page load */
|
|
4
|
+
autoFocus?: boolean;
|
|
5
|
+
/** Checked state of the input */
|
|
6
|
+
checked?: boolean;
|
|
7
|
+
/** Input name */
|
|
8
|
+
name?: string;
|
|
9
|
+
/** OnChange event handler */
|
|
10
|
+
onChange?: (ev: React.ChangeEvent<HTMLInputElement>) => void;
|
|
11
|
+
/** OnFocus event handler */
|
|
12
|
+
onFocus?: (ev: React.FocusEvent<HTMLInputElement>) => void;
|
|
13
|
+
/** Blur event handler */
|
|
14
|
+
onBlur?: (ev: React.FocusEvent<HTMLInputElement>) => void;
|
|
15
|
+
/** OnMouseLeave event handler */
|
|
16
|
+
onMouseLeave?: (ev: React.MouseEvent<HTMLInputElement>) => void;
|
|
17
|
+
/** OnMouseEnter event handler */
|
|
18
|
+
onMouseEnter?: (ev: React.MouseEvent<HTMLInputElement>) => void;
|
|
19
|
+
/** Value of the input */
|
|
20
|
+
value?: string;
|
|
21
|
+
/** A callback to retrieve the input reference */
|
|
22
|
+
inputRef?: React.Ref<HTMLInputElement>;
|
|
23
|
+
}
|
|
24
|
+
export interface HiddenCheckableInputProps extends CommonHiddenCheckableInputProps {
|
|
25
|
+
/** HTML type attribute of the input */
|
|
26
|
+
type: string;
|
|
27
|
+
/** Role attribute of the input */
|
|
28
|
+
role?: string;
|
|
29
|
+
}
|
|
30
|
+
declare const _default: React.MemoExoticComponent<({ name, checked, type, value, inputRef, onChange, autoFocus, role, ...props }: HiddenCheckableInputProps) => JSX.Element>;
|
|
31
|
+
export default _default;
|