carbon-react 111.12.0 → 111.12.2

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.
Files changed (31) hide show
  1. package/esm/components/accordion/accordion.style.js +1 -1
  2. package/esm/components/switch/__internal__/switch-slider-panel.style.d.ts +7 -0
  3. package/esm/components/switch/__internal__/switch-slider-panel.style.js +0 -5
  4. package/esm/components/switch/__internal__/switch-slider.component.d.ts +11 -0
  5. package/esm/components/switch/__internal__/switch-slider.component.js +8 -8
  6. package/esm/components/switch/__internal__/switch-slider.style.d.ts +6 -0
  7. package/esm/components/switch/__internal__/switch-slider.style.js +0 -9
  8. package/esm/components/switch/index.d.ts +2 -1
  9. package/esm/components/switch/switch.component.d.ts +31 -0
  10. package/esm/components/switch/switch.component.js +522 -124
  11. package/esm/components/switch/switch.style.d.ts +4 -0
  12. package/esm/components/switch/switch.style.js +0 -8
  13. package/esm/components/toast/toast.component.js +9 -4
  14. package/esm/components/toast/toast.style.js +5 -2
  15. package/lib/components/accordion/accordion.style.js +1 -1
  16. package/lib/components/switch/__internal__/switch-slider-panel.style.d.ts +7 -0
  17. package/lib/components/switch/__internal__/switch-slider-panel.style.js +0 -6
  18. package/lib/components/switch/__internal__/switch-slider.component.d.ts +11 -0
  19. package/lib/components/switch/__internal__/switch-slider.component.js +8 -8
  20. package/lib/components/switch/__internal__/switch-slider.style.d.ts +6 -0
  21. package/lib/components/switch/__internal__/switch-slider.style.js +0 -10
  22. package/lib/components/switch/index.d.ts +2 -1
  23. package/lib/components/switch/switch.component.d.ts +31 -0
  24. package/lib/components/switch/switch.component.js +523 -127
  25. package/lib/components/switch/switch.style.d.ts +4 -0
  26. package/lib/components/switch/switch.style.js +0 -9
  27. package/lib/components/toast/toast.component.js +8 -3
  28. package/lib/components/toast/toast.style.js +5 -2
  29. package/package.json +1 -1
  30. package/esm/components/switch/switch.d.ts +0 -37
  31. package/lib/components/switch/switch.d.ts +0 -37
@@ -1,13 +1,11 @@
1
1
  import React, { useState, useCallback } from "react";
2
2
  import PropTypes from "prop-types";
3
- import styledSystemPropTypes from "@styled-system/prop-types";
4
3
  import SwitchStyle from "./switch.style";
5
4
  import CheckableInput from "../../__internal__/checkable-input";
6
5
  import SwitchSlider from "./__internal__/switch-slider.component";
7
6
  import useIsAboveBreakpoint from "../../hooks/__internal__/useIsAboveBreakpoint";
8
7
  import { TooltipProvider } from "../../__internal__/tooltip-provider";
9
8
  import { filterStyledSystemMarginProps } from "../../style/utils";
10
- const marginPropTypes = filterStyledSystemMarginProps(styledSystemPropTypes.space);
11
9
 
12
10
  const Switch = ({
13
11
  autoFocus,
@@ -21,9 +19,9 @@ const Switch = ({
21
19
  defaultChecked,
22
20
  disabled,
23
21
  loading,
24
- reverse,
25
- validationOnLabel,
26
- labelInline,
22
+ reverse = true,
23
+ validationOnLabel = false,
24
+ labelInline = false,
27
25
  labelSpacing,
28
26
  labelHelp,
29
27
  fieldHelpInline,
@@ -34,7 +32,7 @@ const Switch = ({
34
32
  error,
35
33
  warning,
36
34
  info,
37
- "data-component": dataComponent,
35
+ "data-component": dataComponent = "switch",
38
36
  "data-element": dataElement,
39
37
  "data-role": dataRole,
40
38
  helpAriaLabel,
@@ -44,7 +42,7 @@ const Switch = ({
44
42
  const [checkedInternal, setCheckedInternal] = useState(defaultChecked || false);
45
43
  const onChangeInternal = useCallback(e => {
46
44
  setCheckedInternal(e.target.checked);
47
- onChange(e);
45
+ onChange === null || onChange === void 0 ? void 0 : onChange(e);
48
46
  }, [setCheckedInternal, onChange]);
49
47
  const largeScreen = useIsAboveBreakpoint(adaptiveLabelBreakpoint);
50
48
  let shouldLabelBeInline = labelInline;
@@ -109,125 +107,525 @@ const Switch = ({
109
107
  };
110
108
 
111
109
  Switch.propTypes = {
112
- /** Filtered styled system margin props */
113
- ...marginPropTypes,
114
-
115
- /** Identifier used for testing purposes, applied to the root element of the component. */
110
+ "about": PropTypes.string,
111
+ "accept": PropTypes.string,
112
+ "accessKey": PropTypes.string,
113
+ "adaptiveLabelBreakpoint": PropTypes.number,
114
+ "alt": PropTypes.string,
115
+ "aria-activedescendant": PropTypes.string,
116
+ "aria-atomic": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
117
+ "aria-autocomplete": PropTypes.oneOf(["both", "inline", "list", "none"]),
118
+ "aria-busy": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
119
+ "aria-checked": PropTypes.oneOfType([PropTypes.oneOf(["false", "mixed", "true"]), PropTypes.bool]),
120
+ "aria-colcount": PropTypes.number,
121
+ "aria-colindex": PropTypes.number,
122
+ "aria-colspan": PropTypes.number,
123
+ "aria-controls": PropTypes.string,
124
+ "aria-current": PropTypes.oneOfType([PropTypes.oneOf(["date", "false", "location", "page", "step", "time", "true"]), PropTypes.bool]),
125
+ "aria-describedby": PropTypes.string,
126
+ "aria-details": PropTypes.string,
127
+ "aria-disabled": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
128
+ "aria-dropeffect": PropTypes.oneOf(["copy", "execute", "link", "move", "none", "popup"]),
129
+ "aria-errormessage": PropTypes.string,
130
+ "aria-expanded": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
131
+ "aria-flowto": PropTypes.string,
132
+ "aria-grabbed": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
133
+ "aria-haspopup": PropTypes.oneOfType([PropTypes.oneOf(["dialog", "false", "grid", "listbox", "menu", "tree", "true"]), PropTypes.bool]),
134
+ "aria-hidden": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
135
+ "aria-invalid": PropTypes.oneOfType([PropTypes.oneOf(["false", "grammar", "spelling", "true"]), PropTypes.bool]),
136
+ "aria-keyshortcuts": PropTypes.string,
137
+ "aria-label": PropTypes.string,
138
+ "aria-labelledby": PropTypes.string,
139
+ "aria-level": PropTypes.number,
140
+ "aria-live": PropTypes.oneOf(["assertive", "off", "polite"]),
141
+ "aria-modal": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
142
+ "aria-multiline": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
143
+ "aria-multiselectable": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
144
+ "aria-orientation": PropTypes.oneOf(["horizontal", "vertical"]),
145
+ "aria-owns": PropTypes.string,
146
+ "aria-placeholder": PropTypes.string,
147
+ "aria-posinset": PropTypes.number,
148
+ "aria-pressed": PropTypes.oneOfType([PropTypes.oneOf(["false", "mixed", "true"]), PropTypes.bool]),
149
+ "aria-readonly": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
150
+ "aria-relevant": PropTypes.oneOf(["additions removals", "additions text", "additions", "all", "removals additions", "removals text", "removals", "text additions", "text removals", "text"]),
151
+ "aria-required": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
152
+ "aria-roledescription": PropTypes.string,
153
+ "aria-rowcount": PropTypes.number,
154
+ "aria-rowindex": PropTypes.number,
155
+ "aria-rowspan": PropTypes.number,
156
+ "aria-selected": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
157
+ "aria-setsize": PropTypes.number,
158
+ "aria-sort": PropTypes.oneOf(["ascending", "descending", "none", "other"]),
159
+ "aria-valuemax": PropTypes.number,
160
+ "aria-valuemin": PropTypes.number,
161
+ "aria-valuenow": PropTypes.number,
162
+ "aria-valuetext": PropTypes.string,
163
+ "ariaLabelledBy": PropTypes.string,
164
+ "autoCapitalize": PropTypes.string,
165
+ "autoComplete": PropTypes.string,
166
+ "autoCorrect": PropTypes.string,
167
+ "autoFocus": PropTypes.bool,
168
+ "autoSave": PropTypes.string,
169
+ "capture": PropTypes.oneOfType([PropTypes.oneOf(["environment", "user"]), PropTypes.bool]),
170
+ "checked": PropTypes.bool,
171
+ "children": PropTypes.node,
172
+ "className": PropTypes.string,
173
+ "color": PropTypes.string,
174
+ "contentEditable": PropTypes.oneOfType([PropTypes.oneOf(["false", "inherit", "true"]), PropTypes.bool]),
175
+ "contextMenu": PropTypes.string,
176
+ "crossOrigin": PropTypes.string,
177
+ "css": PropTypes.oneOfType([PropTypes.func, PropTypes.number, PropTypes.object, PropTypes.shape({
178
+ "__emotion_styles": PropTypes.any.isRequired
179
+ }), PropTypes.string, PropTypes.bool]),
180
+ "dangerouslySetInnerHTML": PropTypes.shape({
181
+ "__html": PropTypes.string.isRequired
182
+ }),
116
183
  "data-component": PropTypes.string,
117
-
118
- /** Identifier used for testing purposes, applied to the root element of the component. */
119
184
  "data-element": PropTypes.string,
120
-
121
- /** Identifier used for testing purposes, applied to the root element of the component. */
122
185
  "data-role": PropTypes.string,
123
-
124
- /** If true the Component will be focused when page load */
125
- autoFocus: PropTypes.bool,
126
-
127
- /** Set the value of the Switch if component is meant to be used as controlled */
128
- checked: PropTypes.bool,
129
-
130
- /** Set the default value of the Switch if component is meant to be used as uncontrolled */
131
- defaultChecked: PropTypes.bool,
132
-
133
- /** Toggles disabling of input */
134
- disabled: PropTypes.bool,
135
-
136
- /** Displays additional information below the input to provide help to the user. */
137
- fieldHelp: PropTypes.string,
138
-
139
- /** Displays fieldHelp inline with the checkbox */
140
- fieldHelpInline: PropTypes.bool,
141
-
142
- /** Unique Identifier for the input. Will use a randomly generated GUID if none is provided */
143
- id: PropTypes.string,
144
-
145
- /** Sets percentage-based input width */
146
- inputWidth: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
147
-
148
- /** The content of the label for the input */
149
- label: PropTypes.string,
150
-
151
- /** Sets label alignment - accepted values: 'left' (default), 'right' */
152
- labelAlign: PropTypes.oneOf(["left", "right"]),
153
-
154
- /** The content for the help tooltip, to appear next to the Label */
155
- labelHelp: PropTypes.node,
156
-
157
- /** Displays label inline with the Switch */
158
- labelInline: PropTypes.bool,
159
-
160
- /** Spacing between label and a field for inline label, given number will be multiplied by base spacing unit (8) */
161
- labelSpacing: PropTypes.oneOf([1, 2]),
162
-
163
- /** Sets percentage-based label width */
164
- labelWidth: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
165
-
166
- /** The name of the the Switch input */
167
- name: PropTypes.string,
168
-
169
- /** Indicate that error has occurred
170
- Pass string to display icon, tooltip and red border
171
- Pass true boolean to only display red border */
172
- error: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
173
-
174
- /** Indicate that warning has occurred
175
- Pass string to display icon, tooltip and orange border
176
- Pass true boolean to only display orange border */
177
- warning: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
178
-
179
- /** Indicate additional information
180
- Pass string to display icon, tooltip and blue border
181
- Pass true boolean to only display blue border */
182
- info: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
183
-
184
- /** When true, validation icon will be placed on label instead of being placed by the input */
185
- validationOnLabel: PropTypes.bool,
186
-
187
- /** Triggers loading animation */
188
- loading: PropTypes.bool,
189
-
190
- /** Accepts a callback function which can be used to update parent state on change */
191
- onChange: PropTypes.func,
192
-
193
- /** Accepts a callback function which is triggered on blur event */
194
- onBlur: PropTypes.func,
195
-
196
- /** Accepts a callback function which is triggered on focus event */
197
- onFocus: PropTypes.func,
198
-
199
- /** Accepts a callback function which is triggered on click event */
200
- onClick: PropTypes.func,
201
-
202
- /** Reverses label and Switch display */
203
- reverse: PropTypes.bool,
204
-
205
- /**
206
- * Set the size of the Switch to 'small' (16x16 - default) or 'large' (24x24).
207
- * No effect when using Classic theme.
208
- */
209
- size: PropTypes.oneOf(["small", "large"]),
210
-
211
- /** the value of the checkbox, passed on form submit */
212
- value: PropTypes.string,
213
-
214
- /** Breakpoint for adaptive label (inline labels change to top aligned). Enables the adaptive behaviour when set */
215
- adaptiveLabelBreakpoint: PropTypes.number,
216
-
217
- /** Flag to configure component as mandatory */
218
- required: PropTypes.bool,
219
-
220
- /** Overrides the default tooltip position */
221
- tooltipPosition: PropTypes.oneOf(["top", "bottom", "left", "right"]),
222
-
223
- /** Aria label for rendered help component */
224
- helpAriaLabel: PropTypes.string
225
- };
226
- Switch.defaultProps = {
227
- labelInline: false,
228
- reverse: true,
229
- validationOnLabel: false,
230
- "data-component": "switch"
186
+ "datatype": PropTypes.string,
187
+ "defaultChecked": PropTypes.bool,
188
+ "defaultValue": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.number, PropTypes.string]),
189
+ "dir": PropTypes.string,
190
+ "disabled": PropTypes.bool,
191
+ "draggable": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
192
+ "enterKeyHint": PropTypes.oneOf(["done", "enter", "go", "next", "previous", "search", "send"]),
193
+ "error": PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
194
+ "fieldHelp": PropTypes.node,
195
+ "fieldHelpInline": PropTypes.bool,
196
+ "form": PropTypes.string,
197
+ "formAction": PropTypes.string,
198
+ "formEncType": PropTypes.string,
199
+ "formMethod": PropTypes.string,
200
+ "formNoValidate": PropTypes.bool,
201
+ "formTarget": PropTypes.string,
202
+ "height": PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
203
+ "helpAriaLabel": PropTypes.string,
204
+ "hidden": PropTypes.bool,
205
+ "id": PropTypes.string,
206
+ "info": PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
207
+ "inlist": PropTypes.any,
208
+ "inputMode": PropTypes.oneOf(["decimal", "email", "none", "numeric", "search", "tel", "text", "url"]),
209
+ "inputRef": PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
210
+ "current": PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.object]).isRequired
211
+ })]),
212
+ "inputWidth": PropTypes.number,
213
+ "is": PropTypes.string,
214
+ "itemID": PropTypes.string,
215
+ "itemProp": PropTypes.string,
216
+ "itemRef": PropTypes.string,
217
+ "itemScope": PropTypes.bool,
218
+ "itemType": PropTypes.string,
219
+ "label": PropTypes.node,
220
+ "labelAlign": PropTypes.oneOf(["left", "right"]),
221
+ "labelHelp": PropTypes.node,
222
+ "labelInline": PropTypes.bool,
223
+ "labelSpacing": PropTypes.oneOf([1, 2]),
224
+ "labelWidth": PropTypes.number,
225
+ "lang": PropTypes.string,
226
+ "list": PropTypes.string,
227
+ "loading": PropTypes.bool,
228
+ "m": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
229
+ "__@toStringTag": PropTypes.string.isRequired,
230
+ "description": PropTypes.string,
231
+ "toString": PropTypes.func.isRequired,
232
+ "valueOf": PropTypes.func.isRequired
233
+ }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
234
+ "__@toStringTag": PropTypes.string.isRequired,
235
+ "description": PropTypes.string,
236
+ "toString": PropTypes.func.isRequired,
237
+ "valueOf": PropTypes.func.isRequired
238
+ }), PropTypes.string]),
239
+ "margin": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
240
+ "__@toStringTag": PropTypes.string.isRequired,
241
+ "description": PropTypes.string,
242
+ "toString": PropTypes.func.isRequired,
243
+ "valueOf": PropTypes.func.isRequired
244
+ }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
245
+ "__@toStringTag": PropTypes.string.isRequired,
246
+ "description": PropTypes.string,
247
+ "toString": PropTypes.func.isRequired,
248
+ "valueOf": PropTypes.func.isRequired
249
+ }), PropTypes.string]),
250
+ "marginBottom": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
251
+ "__@toStringTag": PropTypes.string.isRequired,
252
+ "description": PropTypes.string,
253
+ "toString": PropTypes.func.isRequired,
254
+ "valueOf": PropTypes.func.isRequired
255
+ }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
256
+ "__@toStringTag": PropTypes.string.isRequired,
257
+ "description": PropTypes.string,
258
+ "toString": PropTypes.func.isRequired,
259
+ "valueOf": PropTypes.func.isRequired
260
+ }), PropTypes.string]),
261
+ "marginLeft": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
262
+ "__@toStringTag": PropTypes.string.isRequired,
263
+ "description": PropTypes.string,
264
+ "toString": PropTypes.func.isRequired,
265
+ "valueOf": PropTypes.func.isRequired
266
+ }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
267
+ "__@toStringTag": PropTypes.string.isRequired,
268
+ "description": PropTypes.string,
269
+ "toString": PropTypes.func.isRequired,
270
+ "valueOf": PropTypes.func.isRequired
271
+ }), PropTypes.string]),
272
+ "marginRight": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
273
+ "__@toStringTag": PropTypes.string.isRequired,
274
+ "description": PropTypes.string,
275
+ "toString": PropTypes.func.isRequired,
276
+ "valueOf": PropTypes.func.isRequired
277
+ }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
278
+ "__@toStringTag": PropTypes.string.isRequired,
279
+ "description": PropTypes.string,
280
+ "toString": PropTypes.func.isRequired,
281
+ "valueOf": PropTypes.func.isRequired
282
+ }), PropTypes.string]),
283
+ "marginTop": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
284
+ "__@toStringTag": PropTypes.string.isRequired,
285
+ "description": PropTypes.string,
286
+ "toString": PropTypes.func.isRequired,
287
+ "valueOf": PropTypes.func.isRequired
288
+ }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
289
+ "__@toStringTag": PropTypes.string.isRequired,
290
+ "description": PropTypes.string,
291
+ "toString": PropTypes.func.isRequired,
292
+ "valueOf": PropTypes.func.isRequired
293
+ }), PropTypes.string]),
294
+ "marginX": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
295
+ "__@toStringTag": PropTypes.string.isRequired,
296
+ "description": PropTypes.string,
297
+ "toString": PropTypes.func.isRequired,
298
+ "valueOf": PropTypes.func.isRequired
299
+ }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
300
+ "__@toStringTag": PropTypes.string.isRequired,
301
+ "description": PropTypes.string,
302
+ "toString": PropTypes.func.isRequired,
303
+ "valueOf": PropTypes.func.isRequired
304
+ }), PropTypes.string]),
305
+ "marginY": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
306
+ "__@toStringTag": PropTypes.string.isRequired,
307
+ "description": PropTypes.string,
308
+ "toString": PropTypes.func.isRequired,
309
+ "valueOf": PropTypes.func.isRequired
310
+ }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
311
+ "__@toStringTag": PropTypes.string.isRequired,
312
+ "description": PropTypes.string,
313
+ "toString": PropTypes.func.isRequired,
314
+ "valueOf": PropTypes.func.isRequired
315
+ }), PropTypes.string]),
316
+ "max": PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
317
+ "maxLength": PropTypes.number,
318
+ "mb": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
319
+ "__@toStringTag": PropTypes.string.isRequired,
320
+ "description": PropTypes.string,
321
+ "toString": PropTypes.func.isRequired,
322
+ "valueOf": PropTypes.func.isRequired
323
+ }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
324
+ "__@toStringTag": PropTypes.string.isRequired,
325
+ "description": PropTypes.string,
326
+ "toString": PropTypes.func.isRequired,
327
+ "valueOf": PropTypes.func.isRequired
328
+ }), PropTypes.string]),
329
+ "min": PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
330
+ "minLength": PropTypes.number,
331
+ "ml": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
332
+ "__@toStringTag": PropTypes.string.isRequired,
333
+ "description": PropTypes.string,
334
+ "toString": PropTypes.func.isRequired,
335
+ "valueOf": PropTypes.func.isRequired
336
+ }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
337
+ "__@toStringTag": PropTypes.string.isRequired,
338
+ "description": PropTypes.string,
339
+ "toString": PropTypes.func.isRequired,
340
+ "valueOf": PropTypes.func.isRequired
341
+ }), PropTypes.string]),
342
+ "mr": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
343
+ "__@toStringTag": PropTypes.string.isRequired,
344
+ "description": PropTypes.string,
345
+ "toString": PropTypes.func.isRequired,
346
+ "valueOf": PropTypes.func.isRequired
347
+ }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
348
+ "__@toStringTag": PropTypes.string.isRequired,
349
+ "description": PropTypes.string,
350
+ "toString": PropTypes.func.isRequired,
351
+ "valueOf": PropTypes.func.isRequired
352
+ }), PropTypes.string]),
353
+ "mt": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
354
+ "__@toStringTag": PropTypes.string.isRequired,
355
+ "description": PropTypes.string,
356
+ "toString": PropTypes.func.isRequired,
357
+ "valueOf": PropTypes.func.isRequired
358
+ }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
359
+ "__@toStringTag": PropTypes.string.isRequired,
360
+ "description": PropTypes.string,
361
+ "toString": PropTypes.func.isRequired,
362
+ "valueOf": PropTypes.func.isRequired
363
+ }), PropTypes.string]),
364
+ "multiple": PropTypes.bool,
365
+ "mx": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
366
+ "__@toStringTag": PropTypes.string.isRequired,
367
+ "description": PropTypes.string,
368
+ "toString": PropTypes.func.isRequired,
369
+ "valueOf": PropTypes.func.isRequired
370
+ }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
371
+ "__@toStringTag": PropTypes.string.isRequired,
372
+ "description": PropTypes.string,
373
+ "toString": PropTypes.func.isRequired,
374
+ "valueOf": PropTypes.func.isRequired
375
+ }), PropTypes.string]),
376
+ "my": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
377
+ "__@toStringTag": PropTypes.string.isRequired,
378
+ "description": PropTypes.string,
379
+ "toString": PropTypes.func.isRequired,
380
+ "valueOf": PropTypes.func.isRequired
381
+ }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
382
+ "__@toStringTag": PropTypes.string.isRequired,
383
+ "description": PropTypes.string,
384
+ "toString": PropTypes.func.isRequired,
385
+ "valueOf": PropTypes.func.isRequired
386
+ }), PropTypes.string]),
387
+ "name": PropTypes.string,
388
+ "onAbort": PropTypes.func,
389
+ "onAbortCapture": PropTypes.func,
390
+ "onAnimationEnd": PropTypes.func,
391
+ "onAnimationEndCapture": PropTypes.func,
392
+ "onAnimationIteration": PropTypes.func,
393
+ "onAnimationIterationCapture": PropTypes.func,
394
+ "onAnimationStart": PropTypes.func,
395
+ "onAnimationStartCapture": PropTypes.func,
396
+ "onAuxClick": PropTypes.func,
397
+ "onAuxClickCapture": PropTypes.func,
398
+ "onBeforeInput": PropTypes.func,
399
+ "onBeforeInputCapture": PropTypes.func,
400
+ "onBlur": PropTypes.func,
401
+ "onBlurCapture": PropTypes.func,
402
+ "onCanPlay": PropTypes.func,
403
+ "onCanPlayCapture": PropTypes.func,
404
+ "onCanPlayThrough": PropTypes.func,
405
+ "onCanPlayThroughCapture": PropTypes.func,
406
+ "onChange": PropTypes.func,
407
+ "onChangeCapture": PropTypes.func,
408
+ "onClick": PropTypes.func,
409
+ "onClickCapture": PropTypes.func,
410
+ "onCompositionEnd": PropTypes.func,
411
+ "onCompositionEndCapture": PropTypes.func,
412
+ "onCompositionStart": PropTypes.func,
413
+ "onCompositionStartCapture": PropTypes.func,
414
+ "onCompositionUpdate": PropTypes.func,
415
+ "onCompositionUpdateCapture": PropTypes.func,
416
+ "onContextMenu": PropTypes.func,
417
+ "onContextMenuCapture": PropTypes.func,
418
+ "onCopy": PropTypes.func,
419
+ "onCopyCapture": PropTypes.func,
420
+ "onCut": PropTypes.func,
421
+ "onCutCapture": PropTypes.func,
422
+ "onDoubleClick": PropTypes.func,
423
+ "onDoubleClickCapture": PropTypes.func,
424
+ "onDrag": PropTypes.func,
425
+ "onDragCapture": PropTypes.func,
426
+ "onDragEnd": PropTypes.func,
427
+ "onDragEndCapture": PropTypes.func,
428
+ "onDragEnter": PropTypes.func,
429
+ "onDragEnterCapture": PropTypes.func,
430
+ "onDragExit": PropTypes.func,
431
+ "onDragExitCapture": PropTypes.func,
432
+ "onDragLeave": PropTypes.func,
433
+ "onDragLeaveCapture": PropTypes.func,
434
+ "onDragOver": PropTypes.func,
435
+ "onDragOverCapture": PropTypes.func,
436
+ "onDragStart": PropTypes.func,
437
+ "onDragStartCapture": PropTypes.func,
438
+ "onDrop": PropTypes.func,
439
+ "onDropCapture": PropTypes.func,
440
+ "onDurationChange": PropTypes.func,
441
+ "onDurationChangeCapture": PropTypes.func,
442
+ "onEmptied": PropTypes.func,
443
+ "onEmptiedCapture": PropTypes.func,
444
+ "onEncrypted": PropTypes.func,
445
+ "onEncryptedCapture": PropTypes.func,
446
+ "onEnded": PropTypes.func,
447
+ "onEndedCapture": PropTypes.func,
448
+ "onError": PropTypes.func,
449
+ "onErrorCapture": PropTypes.func,
450
+ "onFocus": PropTypes.func,
451
+ "onFocusCapture": PropTypes.func,
452
+ "onGotPointerCapture": PropTypes.func,
453
+ "onGotPointerCaptureCapture": PropTypes.func,
454
+ "onInput": PropTypes.func,
455
+ "onInputCapture": PropTypes.func,
456
+ "onInvalid": PropTypes.func,
457
+ "onInvalidCapture": PropTypes.func,
458
+ "onKeyDown": PropTypes.func,
459
+ "onKeyDownCapture": PropTypes.func,
460
+ "onKeyPress": PropTypes.func,
461
+ "onKeyPressCapture": PropTypes.func,
462
+ "onKeyUp": PropTypes.func,
463
+ "onKeyUpCapture": PropTypes.func,
464
+ "onLoad": PropTypes.func,
465
+ "onLoadCapture": PropTypes.func,
466
+ "onLoadedData": PropTypes.func,
467
+ "onLoadedDataCapture": PropTypes.func,
468
+ "onLoadedMetadata": PropTypes.func,
469
+ "onLoadedMetadataCapture": PropTypes.func,
470
+ "onLoadStart": PropTypes.func,
471
+ "onLoadStartCapture": PropTypes.func,
472
+ "onLostPointerCapture": PropTypes.func,
473
+ "onLostPointerCaptureCapture": PropTypes.func,
474
+ "onMouseDown": PropTypes.func,
475
+ "onMouseDownCapture": PropTypes.func,
476
+ "onMouseEnter": PropTypes.func,
477
+ "onMouseLeave": PropTypes.func,
478
+ "onMouseMove": PropTypes.func,
479
+ "onMouseMoveCapture": PropTypes.func,
480
+ "onMouseOut": PropTypes.func,
481
+ "onMouseOutCapture": PropTypes.func,
482
+ "onMouseOver": PropTypes.func,
483
+ "onMouseOverCapture": PropTypes.func,
484
+ "onMouseUp": PropTypes.func,
485
+ "onMouseUpCapture": PropTypes.func,
486
+ "onPaste": PropTypes.func,
487
+ "onPasteCapture": PropTypes.func,
488
+ "onPause": PropTypes.func,
489
+ "onPauseCapture": PropTypes.func,
490
+ "onPlay": PropTypes.func,
491
+ "onPlayCapture": PropTypes.func,
492
+ "onPlaying": PropTypes.func,
493
+ "onPlayingCapture": PropTypes.func,
494
+ "onPointerCancel": PropTypes.func,
495
+ "onPointerCancelCapture": PropTypes.func,
496
+ "onPointerDown": PropTypes.func,
497
+ "onPointerDownCapture": PropTypes.func,
498
+ "onPointerEnter": PropTypes.func,
499
+ "onPointerEnterCapture": PropTypes.func,
500
+ "onPointerLeave": PropTypes.func,
501
+ "onPointerLeaveCapture": PropTypes.func,
502
+ "onPointerMove": PropTypes.func,
503
+ "onPointerMoveCapture": PropTypes.func,
504
+ "onPointerOut": PropTypes.func,
505
+ "onPointerOutCapture": PropTypes.func,
506
+ "onPointerOver": PropTypes.func,
507
+ "onPointerOverCapture": PropTypes.func,
508
+ "onPointerUp": PropTypes.func,
509
+ "onPointerUpCapture": PropTypes.func,
510
+ "onProgress": PropTypes.func,
511
+ "onProgressCapture": PropTypes.func,
512
+ "onRateChange": PropTypes.func,
513
+ "onRateChangeCapture": PropTypes.func,
514
+ "onReset": PropTypes.func,
515
+ "onResetCapture": PropTypes.func,
516
+ "onScroll": PropTypes.func,
517
+ "onScrollCapture": PropTypes.func,
518
+ "onSeeked": PropTypes.func,
519
+ "onSeekedCapture": PropTypes.func,
520
+ "onSeeking": PropTypes.func,
521
+ "onSeekingCapture": PropTypes.func,
522
+ "onSelect": PropTypes.func,
523
+ "onSelectCapture": PropTypes.func,
524
+ "onStalled": PropTypes.func,
525
+ "onStalledCapture": PropTypes.func,
526
+ "onSubmit": PropTypes.func,
527
+ "onSubmitCapture": PropTypes.func,
528
+ "onSuspend": PropTypes.func,
529
+ "onSuspendCapture": PropTypes.func,
530
+ "onTimeUpdate": PropTypes.func,
531
+ "onTimeUpdateCapture": PropTypes.func,
532
+ "onTouchCancel": PropTypes.func,
533
+ "onTouchCancelCapture": PropTypes.func,
534
+ "onTouchEnd": PropTypes.func,
535
+ "onTouchEndCapture": PropTypes.func,
536
+ "onTouchMove": PropTypes.func,
537
+ "onTouchMoveCapture": PropTypes.func,
538
+ "onTouchStart": PropTypes.func,
539
+ "onTouchStartCapture": PropTypes.func,
540
+ "onTransitionEnd": PropTypes.func,
541
+ "onTransitionEndCapture": PropTypes.func,
542
+ "onVolumeChange": PropTypes.func,
543
+ "onVolumeChangeCapture": PropTypes.func,
544
+ "onWaiting": PropTypes.func,
545
+ "onWaitingCapture": PropTypes.func,
546
+ "onWheel": PropTypes.func,
547
+ "onWheelCapture": PropTypes.func,
548
+ "pattern": PropTypes.string,
549
+ "placeholder": PropTypes.string,
550
+ "prefix": PropTypes.string,
551
+ "property": PropTypes.string,
552
+ "radioGroup": PropTypes.string,
553
+ "readOnly": PropTypes.bool,
554
+ "required": PropTypes.bool,
555
+ "resource": PropTypes.string,
556
+ "results": PropTypes.number,
557
+ "reverse": PropTypes.bool,
558
+ "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({
559
+ "__@iterator": PropTypes.func.isRequired,
560
+ "anchor": PropTypes.func.isRequired,
561
+ "at": PropTypes.func.isRequired,
562
+ "big": PropTypes.func.isRequired,
563
+ "blink": PropTypes.func.isRequired,
564
+ "bold": PropTypes.func.isRequired,
565
+ "charAt": PropTypes.func.isRequired,
566
+ "charCodeAt": PropTypes.func.isRequired,
567
+ "codePointAt": PropTypes.func.isRequired,
568
+ "concat": PropTypes.func.isRequired,
569
+ "endsWith": PropTypes.func.isRequired,
570
+ "fixed": PropTypes.func.isRequired,
571
+ "fontcolor": PropTypes.func.isRequired,
572
+ "fontsize": PropTypes.func.isRequired,
573
+ "includes": PropTypes.func.isRequired,
574
+ "indexOf": PropTypes.func.isRequired,
575
+ "italics": PropTypes.func.isRequired,
576
+ "lastIndexOf": PropTypes.func.isRequired,
577
+ "length": PropTypes.number.isRequired,
578
+ "link": PropTypes.func.isRequired,
579
+ "localeCompare": PropTypes.func.isRequired,
580
+ "match": PropTypes.func.isRequired,
581
+ "matchAll": PropTypes.func.isRequired,
582
+ "normalize": PropTypes.func.isRequired,
583
+ "padEnd": PropTypes.func.isRequired,
584
+ "padStart": PropTypes.func.isRequired,
585
+ "repeat": PropTypes.func.isRequired,
586
+ "replace": PropTypes.func.isRequired,
587
+ "search": PropTypes.func.isRequired,
588
+ "slice": PropTypes.func.isRequired,
589
+ "small": PropTypes.func.isRequired,
590
+ "split": PropTypes.func.isRequired,
591
+ "startsWith": PropTypes.func.isRequired,
592
+ "strike": PropTypes.func.isRequired,
593
+ "sub": PropTypes.func.isRequired,
594
+ "substr": PropTypes.func.isRequired,
595
+ "substring": PropTypes.func.isRequired,
596
+ "sup": PropTypes.func.isRequired,
597
+ "toLocaleLowerCase": PropTypes.func.isRequired,
598
+ "toLocaleUpperCase": PropTypes.func.isRequired,
599
+ "toLowerCase": PropTypes.func.isRequired,
600
+ "toString": PropTypes.func.isRequired,
601
+ "toUpperCase": PropTypes.func.isRequired,
602
+ "trim": PropTypes.func.isRequired,
603
+ "trimEnd": PropTypes.func.isRequired,
604
+ "trimLeft": PropTypes.func.isRequired,
605
+ "trimRight": PropTypes.func.isRequired,
606
+ "trimStart": PropTypes.func.isRequired,
607
+ "valueOf": PropTypes.func.isRequired
608
+ })]),
609
+ "security": PropTypes.string,
610
+ "size": PropTypes.oneOf(["large", "small"]),
611
+ "slot": PropTypes.string,
612
+ "spellCheck": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
613
+ "src": PropTypes.string,
614
+ "step": PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
615
+ "style": PropTypes.object,
616
+ "suppressContentEditableWarning": PropTypes.bool,
617
+ "suppressHydrationWarning": PropTypes.bool,
618
+ "tabIndex": PropTypes.number,
619
+ "title": PropTypes.string,
620
+ "tooltipPosition": PropTypes.oneOf(["bottom", "left", "right", "top"]),
621
+ "translate": PropTypes.oneOf(["no", "yes"]),
622
+ "typeof": PropTypes.string,
623
+ "unselectable": PropTypes.oneOf(["off", "on"]),
624
+ "validationOnLabel": PropTypes.bool,
625
+ "value": PropTypes.string,
626
+ "vocab": PropTypes.string,
627
+ "warning": PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
628
+ "width": PropTypes.oneOfType([PropTypes.number, PropTypes.string])
231
629
  };
232
- export { Switch as BaseSwitch };
630
+ export { Switch };
233
631
  export default Switch;