carbon-react 106.2.2 → 106.3.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 (73) hide show
  1. package/esm/__internal__/input/input-presentation.component.js +13 -0
  2. package/esm/__internal__/input/input.component.js +294 -0
  3. package/esm/__internal__/input-behaviour/input-behaviour.component.js +4 -0
  4. package/esm/__internal__/input-behaviour/input-group-behaviour.component.js +5 -0
  5. package/esm/__internal__/validation-message/validation-message.component.js +5 -0
  6. package/esm/__internal__/validations/validation-icon.component.js +41 -1
  7. package/esm/components/alert/alert.component.js +38 -252
  8. package/esm/components/alert/index.d.ts +1 -0
  9. package/esm/components/badge/badge.component.js +20 -60
  10. package/esm/components/button/button.component.js +760 -3310
  11. package/esm/components/carbon-provider/carbon-provider.component.js +48 -106
  12. package/esm/components/date/__internal__/utils.js +1 -1
  13. package/esm/components/date/date.component.js +3 -1
  14. package/esm/components/heading/heading.style.d.ts +2 -2
  15. package/esm/components/hr/hr.component.js +171 -1305
  16. package/esm/components/hr/index.d.ts +1 -0
  17. package/esm/components/inline-inputs/inline-inputs.component.js +35 -90
  18. package/esm/components/link/index.d.ts +1 -0
  19. package/esm/components/link/link.component.js +123 -1228
  20. package/esm/components/navigation-bar/index.d.ts +1 -0
  21. package/esm/components/navigation-bar/navigation-bar.component.js +1018 -10761
  22. package/esm/components/pager/pager.style.d.ts +1 -1
  23. package/esm/components/pod/pod.style.d.ts +1 -1
  24. package/esm/components/progress-tracker/progress-tracker.component.d.ts +4 -1
  25. package/esm/components/progress-tracker/progress-tracker.component.js +25 -2
  26. package/esm/components/progress-tracker/progress-tracker.config.d.ts +0 -1
  27. package/esm/components/progress-tracker/progress-tracker.config.js +1 -1
  28. package/esm/components/progress-tracker/progress-tracker.d.ts +5 -3
  29. package/esm/components/progress-tracker/progress-tracker.style.js +9 -7
  30. package/esm/components/radio-button/radio-button-svg.component.js +16 -29
  31. package/esm/components/text-editor/__internal__/editor-link/editor-link.style.d.ts +1 -1
  32. package/esm/components/tooltip/tooltip.component.js +85 -254
  33. package/esm/components/vertical-divider/index.d.ts +1 -0
  34. package/esm/components/vertical-divider/vertical-divider.component.d.ts +2 -2
  35. package/esm/components/vertical-divider/vertical-divider.component.js +328 -1406
  36. package/esm/components/vertical-divider/vertical-divider.style.d.ts +3 -3
  37. package/lib/__internal__/input/input-presentation.component.js +16 -0
  38. package/lib/__internal__/input/input.component.js +295 -0
  39. package/lib/__internal__/input-behaviour/input-behaviour.component.js +6 -1
  40. package/lib/__internal__/input-behaviour/input-group-behaviour.component.js +7 -1
  41. package/lib/__internal__/validation-message/validation-message.component.js +6 -0
  42. package/lib/__internal__/validations/validation-icon.component.js +39 -0
  43. package/lib/components/alert/alert.component.js +42 -143
  44. package/lib/components/alert/index.d.ts +1 -0
  45. package/lib/components/badge/badge.component.js +24 -50
  46. package/lib/components/button/button.component.js +768 -3378
  47. package/lib/components/carbon-provider/carbon-provider.component.js +54 -110
  48. package/lib/components/date/__internal__/utils.js +1 -1
  49. package/lib/components/date/date.component.js +3 -1
  50. package/lib/components/heading/heading.style.d.ts +2 -2
  51. package/lib/components/hr/hr.component.js +175 -676
  52. package/lib/components/hr/index.d.ts +1 -0
  53. package/lib/components/inline-inputs/inline-inputs.component.js +43 -137
  54. package/lib/components/link/index.d.ts +1 -0
  55. package/lib/components/link/link.component.js +142 -746
  56. package/lib/components/navigation-bar/index.d.ts +1 -0
  57. package/lib/components/navigation-bar/navigation-bar.component.js +1022 -5426
  58. package/lib/components/pager/pager.style.d.ts +1 -1
  59. package/lib/components/pod/pod.style.d.ts +1 -1
  60. package/lib/components/progress-tracker/progress-tracker.component.d.ts +4 -1
  61. package/lib/components/progress-tracker/progress-tracker.component.js +30 -2
  62. package/lib/components/progress-tracker/progress-tracker.config.d.ts +0 -1
  63. package/lib/components/progress-tracker/progress-tracker.config.js +3 -3
  64. package/lib/components/progress-tracker/progress-tracker.d.ts +5 -3
  65. package/lib/components/progress-tracker/progress-tracker.style.js +8 -6
  66. package/lib/components/radio-button/radio-button-svg.component.js +20 -38
  67. package/lib/components/text-editor/__internal__/editor-link/editor-link.style.d.ts +1 -1
  68. package/lib/components/tooltip/tooltip.component.js +98 -215
  69. package/lib/components/vertical-divider/index.d.ts +1 -0
  70. package/lib/components/vertical-divider/vertical-divider.component.d.ts +2 -2
  71. package/lib/components/vertical-divider/vertical-divider.component.js +334 -1457
  72. package/lib/components/vertical-divider/vertical-divider.style.d.ts +3 -3
  73. package/package.json +4 -3
@@ -1,800 +1,196 @@
1
1
  "use strict";
2
2
 
3
3
  Object.defineProperty(exports, "__esModule", {
4
- value: true,
4
+ value: true
5
5
  });
6
-
7
6
  exports.default = exports.Link = void 0;
8
7
 
9
8
  var _react = _interopRequireWildcard(require("react"));
9
+
10
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
11
 
12
12
  var _icon = _interopRequireDefault(require("../icon"));
13
13
 
14
- var _events = _interopRequireDefault(
15
- require("../../__internal__/utils/helpers/events")
16
- );
14
+ var _events = _interopRequireDefault(require("../../__internal__/utils/helpers/events"));
17
15
 
18
16
  var _link = require("./link.style");
19
17
 
20
- var _tags = _interopRequireDefault(
21
- require("../../__internal__/utils/helpers/tags/tags")
22
- );
23
-
24
- var _useLocale = _interopRequireDefault(
25
- require("../../hooks/__internal__/useLocale")
26
- );
27
-
28
- function _interopRequireDefault(obj) {
29
- return obj && obj.__esModule ? obj : { default: obj };
30
- }
31
-
32
- function _getRequireWildcardCache() {
33
- if (typeof WeakMap !== "function") return null;
34
- var cache = new WeakMap();
35
- _getRequireWildcardCache = function () {
36
- return cache;
37
- };
38
- return cache;
39
- }
40
-
41
- function _interopRequireWildcard(obj) {
42
- if (obj && obj.__esModule) {
43
- return obj;
44
- }
45
- if (obj === null || (typeof obj !== "object" && typeof obj !== "function")) {
46
- return { default: obj };
47
- }
48
- var cache = _getRequireWildcardCache();
49
- if (cache && cache.has(obj)) {
50
- return cache.get(obj);
51
- }
52
- var newObj = {};
53
- var hasPropertyDescriptor =
54
- Object.defineProperty && Object.getOwnPropertyDescriptor;
55
- for (var key in obj) {
56
- if (Object.prototype.hasOwnProperty.call(obj, key)) {
57
- var desc = hasPropertyDescriptor
58
- ? Object.getOwnPropertyDescriptor(obj, key)
59
- : null;
60
- if (desc && (desc.get || desc.set)) {
61
- Object.defineProperty(newObj, key, desc);
62
- } else {
63
- newObj[key] = obj[key];
64
- }
18
+ var _tags = _interopRequireDefault(require("../../__internal__/utils/helpers/tags/tags"));
19
+
20
+ var _useLocale = _interopRequireDefault(require("../../hooks/__internal__/useLocale"));
21
+
22
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
+
24
+ function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
25
+
26
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
27
+
28
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
29
+
30
+ const Link = /*#__PURE__*/_react.default.forwardRef(({
31
+ children,
32
+ className,
33
+ onKeyDown,
34
+ href,
35
+ onClick,
36
+ onMouseDown,
37
+ icon,
38
+ iconAlign = "left",
39
+ isSkipLink,
40
+ disabled,
41
+ ariaLabel,
42
+ rel,
43
+ tooltipMessage,
44
+ tooltipPosition,
45
+ tabbable = true,
46
+ target,
47
+ ...rest
48
+ }, ref) => {
49
+ const l = (0, _useLocale.default)();
50
+ const tabIndex = tabbable && !disabled ? "0" : "-1";
51
+
52
+ const handleOnKeyDown = ev => {
53
+ if (onKeyDown) {
54
+ onKeyDown(ev);
55
+ } // return early if there is no onClick or there is a href prop
56
+ // or the event is not an enter key
57
+
58
+
59
+ if (href || !_events.default.isEnterKey(ev) && !_events.default.isSpaceKey(ev)) {
60
+ return;
65
61
  }
66
- }
67
- newObj.default = obj;
68
- if (cache) {
69
- cache.set(obj, newObj);
70
- }
71
- return newObj;
72
- }
73
-
74
- function _extends() {
75
- _extends =
76
- Object.assign ||
77
- function (target) {
78
- for (var i = 1; i < arguments.length; i++) {
79
- var source = arguments[i];
80
- for (var key in source) {
81
- if (Object.prototype.hasOwnProperty.call(source, key)) {
82
- target[key] = source[key];
83
- }
84
- }
85
- }
86
- return target;
87
- };
88
- return _extends.apply(this, arguments);
89
- }
90
-
91
- const Link = /*#__PURE__*/ _react.default.forwardRef(
92
- (
93
- {
94
- children,
95
- className,
96
- onKeyDown,
97
- href,
98
- onClick,
99
- onMouseDown,
100
- icon,
101
- iconAlign = "left",
102
- isSkipLink,
103
- disabled,
104
- ariaLabel,
105
- rel,
106
- tooltipMessage,
107
- tooltipPosition,
108
- tabbable = true,
109
- target,
110
- ...rest
111
- },
112
- ref
113
- ) => {
114
- const l = (0, _useLocale.default)();
115
- const tabIndex = tabbable && !disabled ? "0" : "-1";
116
-
117
- const handleOnKeyDown = (ev) => {
118
- if (onKeyDown) {
119
- onKeyDown(ev);
120
- } // return early if there is no onClick or there is a href prop
121
- // or the event is not an enter key
122
-
123
- if (
124
- href ||
125
- (!_events.default.isEnterKey(ev) && !_events.default.isSpaceKey(ev))
126
- ) {
127
- return;
128
- }
129
62
 
130
- if (onClick) {
131
- onClick(ev);
132
- }
133
- };
63
+ if (onClick) {
64
+ onClick(ev);
65
+ }
66
+ };
134
67
 
135
- const renderLinkIcon = (currentAlignment = "left") => {
136
- const hasProperAlignment = icon && iconAlign === currentAlignment;
137
- return hasProperAlignment
138
- ? /*#__PURE__*/ _react.default.createElement(_icon.default, {
139
- type: icon,
140
- bgSize: "extra-small",
141
- color: "--colorsActionMajor500",
142
- disabled: disabled,
143
- ariaLabel: ariaLabel,
144
- tooltipMessage: tooltipMessage,
145
- tooltipPosition: tooltipPosition,
146
- })
147
- : null;
148
- };
68
+ const renderLinkIcon = (currentAlignment = "left") => {
69
+ const hasProperAlignment = icon && iconAlign === currentAlignment;
70
+ return hasProperAlignment ? /*#__PURE__*/_react.default.createElement(_icon.default, {
71
+ type: icon,
72
+ bgSize: "extra-small",
73
+ color: "--colorsActionMajor500",
74
+ disabled: disabled,
75
+ ariaLabel: ariaLabel,
76
+ tooltipMessage: tooltipMessage,
77
+ tooltipPosition: tooltipPosition
78
+ }) : null;
79
+ };
149
80
 
150
- const ariaProps = (0, _react.useMemo)(() => {
151
- const restObject = rest;
152
- return Object.keys(restObject)
153
- .filter((key) => key.startsWith("aria"))
154
- .reduce((obj, key) => {
155
- obj[key] = restObject[key];
156
- return obj;
157
- }, {});
158
- }, [rest]);
159
- const componentProps = {
160
- onKeyDown: handleOnKeyDown,
161
- onMouseDown,
162
- onClick,
163
- disabled,
164
- tabIndex,
165
- target,
166
- ref,
167
- href,
168
- rel,
169
- "aria-label": ariaLabel,
170
- ...ariaProps,
171
- };
81
+ const ariaProps = (0, _react.useMemo)(() => {
82
+ const restObject = rest;
83
+ return Object.keys(restObject).filter(key => key.startsWith("aria")).reduce((obj, key) => {
84
+ obj[key] = restObject[key];
85
+ return obj;
86
+ }, {});
87
+ }, [rest]);
88
+ const componentProps = {
89
+ onKeyDown: handleOnKeyDown,
90
+ onMouseDown,
91
+ onClick,
92
+ disabled,
93
+ tabIndex,
94
+ target,
95
+ ref,
96
+ href,
97
+ rel,
98
+ "aria-label": ariaLabel,
99
+ ...ariaProps
100
+ };
172
101
 
173
- const createLinkBasedOnType = () => {
174
- let type = "a";
102
+ const createLinkBasedOnType = () => {
103
+ let type = "a";
175
104
 
176
- if (onClick && !href) {
177
- type = "button";
178
- }
105
+ if (onClick && !href) {
106
+ type = "button";
107
+ }
179
108
 
180
- return /*#__PURE__*/ _react.default.createElement(
181
- type,
182
- {
183
- ...componentProps,
184
- ...(type === "button" && {
185
- role: "link",
186
- }),
187
- },
188
- /*#__PURE__*/ _react.default.createElement(
189
- _react.default.Fragment,
190
- null,
191
- renderLinkIcon(),
192
- /*#__PURE__*/ _react.default.createElement(
193
- _link.StyledContent,
194
- null,
195
- isSkipLink ? l.link.skipLinkLabel() : children
196
- ),
197
- renderLinkIcon("right")
198
- )
199
- );
200
- };
109
+ return /*#__PURE__*/_react.default.createElement(type, { ...componentProps,
110
+ ...(type === "button" && {
111
+ role: "link"
112
+ })
113
+ }, /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, renderLinkIcon(), /*#__PURE__*/_react.default.createElement(_link.StyledContent, null, isSkipLink ? l.link.skipLinkLabel() : children), renderLinkIcon("right")));
114
+ };
201
115
 
202
- return /*#__PURE__*/ _react.default.createElement(
203
- _link.StyledLink,
204
- _extends(
205
- {
206
- isSkipLink: isSkipLink,
207
- disabled: disabled,
208
- className: className,
209
- iconAlign: iconAlign,
210
- hasContent: Boolean(children),
211
- },
212
- (0, _tags.default)("link", rest),
213
- isSkipLink && {
214
- "data-element": "skip-link",
215
- }
216
- ),
217
- createLinkBasedOnType()
218
- );
219
- }
220
- );
116
+ return /*#__PURE__*/_react.default.createElement(_link.StyledLink, _extends({
117
+ isSkipLink: isSkipLink,
118
+ disabled: disabled,
119
+ className: className,
120
+ iconAlign: iconAlign,
121
+ hasContent: Boolean(children)
122
+ }, (0, _tags.default)("link", rest), isSkipLink && {
123
+ "data-element": "skip-link"
124
+ }), createLinkBasedOnType());
125
+ });
221
126
 
127
+ exports.Link = Link;
222
128
  Link.propTypes = {
223
- /**
224
- * Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.
225
- */
226
129
  "aria-activedescendant": _propTypes.default.string,
227
- /**
228
- * Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.
229
- */
230
- "aria-atomic": _propTypes.default.oneOfType([
231
- _propTypes.default.oneOf(["false", "true"]),
232
- _propTypes.default.bool,
233
- ]),
234
- /**
235
- * Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be
236
- * presented if they are made.
237
- */
238
- "aria-autocomplete": _propTypes.default.oneOf([
239
- "both",
240
- "inline",
241
- "list",
242
- "none",
243
- ]),
244
- /**
245
- * Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.
246
- */
247
- "aria-busy": _propTypes.default.oneOfType([
248
- _propTypes.default.oneOf(["false", "true"]),
249
- _propTypes.default.bool,
250
- ]),
251
- /**
252
- * Indicates the current "checked" state of checkboxes, radio buttons, and other widgets.
253
- * @see aria-pressed @see aria-selected.
254
- */
255
- "aria-checked": _propTypes.default.oneOfType([
256
- _propTypes.default.oneOf(["false", "mixed", "true"]),
257
- _propTypes.default.bool,
258
- ]),
259
- /**
260
- * Defines the total number of columns in a table, grid, or treegrid.
261
- * @see aria-colindex.
262
- */
130
+ "aria-atomic": _propTypes.default.oneOfType([_propTypes.default.oneOf(["false", "true"]), _propTypes.default.bool]),
131
+ "aria-autocomplete": _propTypes.default.oneOf(["both", "inline", "list", "none"]),
132
+ "aria-busy": _propTypes.default.oneOfType([_propTypes.default.oneOf(["false", "true"]), _propTypes.default.bool]),
133
+ "aria-checked": _propTypes.default.oneOfType([_propTypes.default.oneOf(["false", "mixed", "true"]), _propTypes.default.bool]),
263
134
  "aria-colcount": _propTypes.default.number,
264
- /**
265
- * Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.
266
- * @see aria-colcount @see aria-colspan.
267
- */
268
135
  "aria-colindex": _propTypes.default.number,
269
- /**
270
- * Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.
271
- * @see aria-colindex @see aria-rowspan.
272
- */
273
136
  "aria-colspan": _propTypes.default.number,
274
- /**
275
- * Identifies the element (or elements) whose contents or presence are controlled by the current element.
276
- * @see aria-owns.
277
- */
278
137
  "aria-controls": _propTypes.default.string,
279
- /**
280
- * Indicates the element that represents the current item within a container or set of related elements.
281
- */
282
- "aria-current": _propTypes.default.oneOfType([
283
- _propTypes.default.oneOf([
284
- "date",
285
- "false",
286
- "location",
287
- "page",
288
- "step",
289
- "time",
290
- "true",
291
- ]),
292
- _propTypes.default.bool,
293
- ]),
294
- /**
295
- * Identifies the element (or elements) that describes the object.
296
- * @see aria-labelledby
297
- */
138
+ "aria-current": _propTypes.default.oneOfType([_propTypes.default.oneOf(["date", "false", "location", "page", "step", "time", "true"]), _propTypes.default.bool]),
298
139
  "aria-describedby": _propTypes.default.string,
299
- /**
300
- * Identifies the element that provides a detailed, extended description for the object.
301
- * @see aria-describedby.
302
- */
303
140
  "aria-details": _propTypes.default.string,
304
- /**
305
- * Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.
306
- * @see aria-hidden @see aria-readonly.
307
- */
308
- "aria-disabled": _propTypes.default.oneOfType([
309
- _propTypes.default.oneOf(["false", "true"]),
310
- _propTypes.default.bool,
311
- ]),
312
- /**
313
- * Indicates what functions can be performed when a dragged object is released on the drop target.
314
- * @deprecated in ARIA 1.1
315
- */
316
- "aria-dropeffect": _propTypes.default.oneOf([
317
- "copy",
318
- "execute",
319
- "link",
320
- "move",
321
- "none",
322
- "popup",
323
- ]),
324
- /**
325
- * Identifies the element that provides an error message for the object.
326
- * @see aria-invalid @see aria-describedby.
327
- */
141
+ "aria-disabled": _propTypes.default.oneOfType([_propTypes.default.oneOf(["false", "true"]), _propTypes.default.bool]),
142
+ "aria-dropeffect": _propTypes.default.oneOf(["copy", "execute", "link", "move", "none", "popup"]),
328
143
  "aria-errormessage": _propTypes.default.string,
329
- /**
330
- * Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.
331
- */
332
- "aria-expanded": _propTypes.default.oneOfType([
333
- _propTypes.default.oneOf(["false", "true"]),
334
- _propTypes.default.bool,
335
- ]),
336
- /**
337
- * Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,
338
- * allows assistive technology to override the general default of reading in document source order.
339
- */
144
+ "aria-expanded": _propTypes.default.oneOfType([_propTypes.default.oneOf(["false", "true"]), _propTypes.default.bool]),
340
145
  "aria-flowto": _propTypes.default.string,
341
- /**
342
- * Indicates an element's "grabbed" state in a drag-and-drop operation.
343
- * @deprecated in ARIA 1.1
344
- */
345
- "aria-grabbed": _propTypes.default.oneOfType([
346
- _propTypes.default.oneOf(["false", "true"]),
347
- _propTypes.default.bool,
348
- ]),
349
- /**
350
- * Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.
351
- */
352
- "aria-haspopup": _propTypes.default.oneOfType([
353
- _propTypes.default.oneOf([
354
- "dialog",
355
- "false",
356
- "grid",
357
- "listbox",
358
- "menu",
359
- "tree",
360
- "true",
361
- ]),
362
- _propTypes.default.bool,
363
- ]),
364
- /**
365
- * Indicates whether the element is exposed to an accessibility API.
366
- * @see aria-disabled.
367
- */
368
- "aria-hidden": _propTypes.default.oneOfType([
369
- _propTypes.default.oneOf(["false", "true"]),
370
- _propTypes.default.bool,
371
- ]),
372
- /**
373
- * Indicates the entered value does not conform to the format expected by the application.
374
- * @see aria-errormessage.
375
- */
376
- "aria-invalid": _propTypes.default.oneOfType([
377
- _propTypes.default.oneOf(["false", "grammar", "spelling", "true"]),
378
- _propTypes.default.bool,
379
- ]),
380
- /**
381
- * Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.
382
- */
146
+ "aria-grabbed": _propTypes.default.oneOfType([_propTypes.default.oneOf(["false", "true"]), _propTypes.default.bool]),
147
+ "aria-haspopup": _propTypes.default.oneOfType([_propTypes.default.oneOf(["dialog", "false", "grid", "listbox", "menu", "tree", "true"]), _propTypes.default.bool]),
148
+ "aria-hidden": _propTypes.default.oneOfType([_propTypes.default.oneOf(["false", "true"]), _propTypes.default.bool]),
149
+ "aria-invalid": _propTypes.default.oneOfType([_propTypes.default.oneOf(["false", "grammar", "spelling", "true"]), _propTypes.default.bool]),
383
150
  "aria-keyshortcuts": _propTypes.default.string,
384
- /**
385
- * Defines a string value that labels the current element.
386
- * @see aria-labelledby.
387
- */
388
151
  "aria-label": _propTypes.default.string,
389
- /**
390
- * Identifies the element (or elements) that labels the current element.
391
- * @see aria-describedby.
392
- */
393
152
  "aria-labelledby": _propTypes.default.string,
394
- /**
395
- * Defines the hierarchical level of an element within a structure.
396
- */
397
153
  "aria-level": _propTypes.default.number,
398
- /**
399
- * Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.
400
- */
401
154
  "aria-live": _propTypes.default.oneOf(["assertive", "off", "polite"]),
402
- /**
403
- * Indicates whether an element is modal when displayed.
404
- */
405
- "aria-modal": _propTypes.default.oneOfType([
406
- _propTypes.default.oneOf(["false", "true"]),
407
- _propTypes.default.bool,
408
- ]),
409
- /**
410
- * Indicates whether a text box accepts multiple lines of input or only a single line.
411
- */
412
- "aria-multiline": _propTypes.default.oneOfType([
413
- _propTypes.default.oneOf(["false", "true"]),
414
- _propTypes.default.bool,
415
- ]),
416
- /**
417
- * Indicates that the user may select more than one item from the current selectable descendants.
418
- */
419
- "aria-multiselectable": _propTypes.default.oneOfType([
420
- _propTypes.default.oneOf(["false", "true"]),
421
- _propTypes.default.bool,
422
- ]),
423
- /**
424
- * Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.
425
- */
155
+ "aria-modal": _propTypes.default.oneOfType([_propTypes.default.oneOf(["false", "true"]), _propTypes.default.bool]),
156
+ "aria-multiline": _propTypes.default.oneOfType([_propTypes.default.oneOf(["false", "true"]), _propTypes.default.bool]),
157
+ "aria-multiselectable": _propTypes.default.oneOfType([_propTypes.default.oneOf(["false", "true"]), _propTypes.default.bool]),
426
158
  "aria-orientation": _propTypes.default.oneOf(["horizontal", "vertical"]),
427
- /**
428
- * Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship
429
- * between DOM elements where the DOM hierarchy cannot be used to represent the relationship.
430
- * @see aria-controls.
431
- */
432
159
  "aria-owns": _propTypes.default.string,
433
- /**
434
- * Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.
435
- * A hint could be a sample value or a brief description of the expected format.
436
- */
437
160
  "aria-placeholder": _propTypes.default.string,
438
- /**
439
- * Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.
440
- * @see aria-setsize.
441
- */
442
161
  "aria-posinset": _propTypes.default.number,
443
- /**
444
- * Indicates the current "pressed" state of toggle buttons.
445
- * @see aria-checked @see aria-selected.
446
- */
447
- "aria-pressed": _propTypes.default.oneOfType([
448
- _propTypes.default.oneOf(["false", "mixed", "true"]),
449
- _propTypes.default.bool,
450
- ]),
451
- /**
452
- * Indicates that the element is not editable, but is otherwise operable.
453
- * @see aria-disabled.
454
- */
455
- "aria-readonly": _propTypes.default.oneOfType([
456
- _propTypes.default.oneOf(["false", "true"]),
457
- _propTypes.default.bool,
458
- ]),
459
- /**
460
- * Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.
461
- * @see aria-atomic.
462
- */
463
- "aria-relevant": _propTypes.default.oneOf([
464
- "additions removals",
465
- "additions text",
466
- "additions",
467
- "all",
468
- "removals additions",
469
- "removals text",
470
- "removals",
471
- "text additions",
472
- "text removals",
473
- "text",
474
- ]),
475
- /**
476
- * Indicates that user input is required on the element before a form may be submitted.
477
- */
478
- "aria-required": _propTypes.default.oneOfType([
479
- _propTypes.default.oneOf(["false", "true"]),
480
- _propTypes.default.bool,
481
- ]),
482
- /**
483
- * Defines a human-readable, author-localized description for the role of an element.
484
- */
162
+ "aria-pressed": _propTypes.default.oneOfType([_propTypes.default.oneOf(["false", "mixed", "true"]), _propTypes.default.bool]),
163
+ "aria-readonly": _propTypes.default.oneOfType([_propTypes.default.oneOf(["false", "true"]), _propTypes.default.bool]),
164
+ "aria-relevant": _propTypes.default.oneOf(["additions removals", "additions text", "additions", "all", "removals additions", "removals text", "removals", "text additions", "text removals", "text"]),
165
+ "aria-required": _propTypes.default.oneOfType([_propTypes.default.oneOf(["false", "true"]), _propTypes.default.bool]),
485
166
  "aria-roledescription": _propTypes.default.string,
486
- /**
487
- * Defines the total number of rows in a table, grid, or treegrid.
488
- * @see aria-rowindex.
489
- */
490
167
  "aria-rowcount": _propTypes.default.number,
491
- /**
492
- * Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.
493
- * @see aria-rowcount @see aria-rowspan.
494
- */
495
168
  "aria-rowindex": _propTypes.default.number,
496
- /**
497
- * Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.
498
- * @see aria-rowindex @see aria-colspan.
499
- */
500
169
  "aria-rowspan": _propTypes.default.number,
501
- /**
502
- * Indicates the current "selected" state of various widgets.
503
- * @see aria-checked @see aria-pressed.
504
- */
505
- "aria-selected": _propTypes.default.oneOfType([
506
- _propTypes.default.oneOf(["false", "true"]),
507
- _propTypes.default.bool,
508
- ]),
509
- /**
510
- * Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.
511
- * @see aria-posinset.
512
- */
170
+ "aria-selected": _propTypes.default.oneOfType([_propTypes.default.oneOf(["false", "true"]), _propTypes.default.bool]),
513
171
  "aria-setsize": _propTypes.default.number,
514
- /**
515
- * Indicates if items in a table or grid are sorted in ascending or descending order.
516
- */
517
- "aria-sort": _propTypes.default.oneOf([
518
- "ascending",
519
- "descending",
520
- "none",
521
- "other",
522
- ]),
523
- /**
524
- * Defines the maximum allowed value for a range widget.
525
- */
172
+ "aria-sort": _propTypes.default.oneOf(["ascending", "descending", "none", "other"]),
526
173
  "aria-valuemax": _propTypes.default.number,
527
- /**
528
- * Defines the minimum allowed value for a range widget.
529
- */
530
174
  "aria-valuemin": _propTypes.default.number,
531
- /**
532
- * Defines the current value for a range widget.
533
- * @see aria-valuetext.
534
- */
535
175
  "aria-valuenow": _propTypes.default.number,
536
- /**
537
- * Defines the human readable text alternative of aria-valuenow for a range widget.
538
- */
539
176
  "aria-valuetext": _propTypes.default.string,
540
- /**
541
- * Aria label for accessibility purposes
542
- */
543
- ariaLabel: _propTypes.default.string,
544
- /**
545
- * Child content to render in the link.
546
- */
547
- children: _propTypes.default.node,
548
- /**
549
- * Classes to apply to the component.
550
- */
551
- className: _propTypes.default.string,
552
- /**
553
- * The disabled state of the link.
554
- */
555
- disabled: _propTypes.default.bool,
556
- /**
557
- * An href for an anchor tag.
558
- */
559
- href: _propTypes.default.string,
560
- /**
561
- * An icon to display next to the link.
562
- */
563
- icon: _propTypes.default.oneOf([
564
- "add",
565
- "alert",
566
- "analysis",
567
- "arrow_down",
568
- "arrow_left_boxed",
569
- "arrow_left_right_small",
570
- "arrow_left_small",
571
- "arrow_left",
572
- "arrow_right_small",
573
- "arrow_right",
574
- "arrow_up",
575
- "attach",
576
- "bank",
577
- "basket_with_squares",
578
- "basket",
579
- "bin",
580
- "block_arrow_right",
581
- "blocked_square",
582
- "blocked",
583
- "bold",
584
- "boxed_shapes",
585
- "bulk_destroy",
586
- "bullet_list_dotted",
587
- "bullet_list_numbers",
588
- "bullet_list",
589
- "business",
590
- "calendar_today",
591
- "calendar",
592
- "call",
593
- "camera",
594
- "card_view",
595
- "caret_down",
596
- "caret_large_down",
597
- "caret_large_left",
598
- "caret_large_right",
599
- "caret_large_up",
600
- "caret_left",
601
- "caret_right",
602
- "caret_up",
603
- "cart",
604
- "chart_bar",
605
- "chart_line",
606
- "chart_pie",
607
- "chat_notes",
608
- "chat",
609
- "chevron_down_thick",
610
- "chevron_down",
611
- "chevron_left_thick",
612
- "chevron_left",
613
- "chevron_right_thick",
614
- "chevron_right",
615
- "chevron_up_thick",
616
- "chevron_up",
617
- "circle_with_dots",
618
- "circles_connection",
619
- "clock",
620
- "close",
621
- "coins",
622
- "collaborate",
623
- "computer_clock",
624
- "connect",
625
- "copy",
626
- "credit_card_slash",
627
- "credit_card",
628
- "cross_circle",
629
- "cross",
630
- "csv",
631
- "delete",
632
- "delivery",
633
- "disconnect",
634
- "disputed",
635
- "document_right_align",
636
- "document_tick",
637
- "document_vertical_lines",
638
- "download",
639
- "draft",
640
- "drag_vertical",
641
- "drag",
642
- "dropdown",
643
- "duplicate",
644
- "edit",
645
- "edited",
646
- "ellipsis_horizontal",
647
- "ellipsis_vertical",
648
- "email_switch",
649
- "email",
650
- "error_square",
651
- "error",
652
- "euro",
653
- "expand",
654
- "factory",
655
- "favourite_lined",
656
- "favourite",
657
- "fax",
658
- "feedback",
659
- "file_excel",
660
- "file_generic",
661
- "file_image",
662
- "file_pdf",
663
- "file_word",
664
- "files_leaning",
665
- "filter_new",
666
- "filter",
667
- "fit_height",
668
- "fit_width",
669
- "flag",
670
- "folder",
671
- "gift",
672
- "graph",
673
- "grid",
674
- "help",
675
- "hide",
676
- "home",
677
- "image",
678
- "in_progress",
679
- "in_transit",
680
- "individual",
681
- "info",
682
- "italic",
683
- "key",
684
- "ledger_arrow_left",
685
- "ledger_arrow_right",
686
- "ledger",
687
- "link",
688
- "list_view",
689
- "location",
690
- "locked",
691
- "logout",
692
- "lookup",
693
- "marker",
694
- "message",
695
- "messages",
696
- "minus_large",
697
- "minus",
698
- "mobile",
699
- "money_bag",
700
- "pause_circle",
701
- "pause",
702
- "pdf",
703
- "people_switch",
704
- "people",
705
- "person_info",
706
- "person_tick",
707
- "person",
708
- "phone",
709
- "play_circle",
710
- "play",
711
- "plus_large",
712
- "plus",
713
- "pound",
714
- "print",
715
- "progress",
716
- "progressed",
717
- "question",
718
- "refresh_clock",
719
- "refresh",
720
- "remove",
721
- "sage_coin",
722
- "save",
723
- "scan",
724
- "search",
725
- "services",
726
- "settings",
727
- "share",
728
- "shop",
729
- "sort_down",
730
- "sort_up",
731
- "spanner",
732
- "split_container",
733
- "split",
734
- "square_dot",
735
- "squares_nine",
736
- "stacked_boxes",
737
- "stacked_squares",
738
- "submitted",
739
- "sync",
740
- "tag",
741
- "three_boxes",
742
- "tick_circle",
743
- "tick",
744
- "unlocked",
745
- "upload",
746
- "uploaded",
747
- "video",
748
- "view",
749
- "warning",
750
- ]),
751
- /**
752
- * Which side of the link to the render the link.
753
- */
754
- iconAlign: _propTypes.default.oneOf(["left", "right"]),
755
- /**
756
- * Allows to create skip link
757
- */
758
- isSkipLink: _propTypes.default.bool,
759
- key: _propTypes.default.oneOfType([
760
- _propTypes.default.number,
761
- _propTypes.default.string,
762
- ]),
763
- /**
764
- * Function called when the mouse is clicked.
765
- */
766
- onClick: _propTypes.default.func,
767
- /**
768
- * Function called when a key is pressed.
769
- */
770
- onKeyDown: _propTypes.default.func,
771
- /**
772
- * Function called when a mouse down event triggers.
773
- */
774
- onMouseDown: _propTypes.default.func,
775
- /**
776
- * allows to set rel property in <a> tag
777
- */
778
- rel: _propTypes.default.string,
779
- /**
780
- * Whether to include the link in the tab order of the page
781
- */
782
- tabbable: _propTypes.default.bool,
783
- /**
784
- * Target property in which link should open ie: _blank, _self, _parent, _top
785
- */
786
- target: _propTypes.default.string,
787
- /**
788
- * A message to display as a tooltip to the link.
789
- */
790
- tooltipMessage: _propTypes.default.string,
791
- /**
792
- * Positions the tooltip with the link.
793
- */
794
- tooltipPosition: _propTypes.default.oneOf(["bottom", "left", "right", "top"]),
177
+ "ariaLabel": _propTypes.default.string,
178
+ "children": _propTypes.default.node,
179
+ "className": _propTypes.default.string,
180
+ "disabled": _propTypes.default.bool,
181
+ "href": _propTypes.default.string,
182
+ "icon": _propTypes.default.oneOf(["add", "alert", "analysis", "arrow_down", "arrow_left_boxed", "arrow_left_right_small", "arrow_left_small", "arrow_left", "arrow_right_small", "arrow_right", "arrow_up", "attach", "bank", "basket_with_squares", "basket", "bin", "block_arrow_right", "blocked_square", "blocked", "bold", "boxed_shapes", "bulk_destroy", "bullet_list_dotted", "bullet_list_numbers", "bullet_list", "business", "calendar_today", "calendar", "call", "camera", "card_view", "caret_down", "caret_large_down", "caret_large_left", "caret_large_right", "caret_large_up", "caret_left", "caret_right", "caret_up", "cart", "chart_bar", "chart_line", "chart_pie", "chat_notes", "chat", "chevron_down_thick", "chevron_down", "chevron_left_thick", "chevron_left", "chevron_right_thick", "chevron_right", "chevron_up_thick", "chevron_up", "circle_with_dots", "circles_connection", "clock", "close", "coins", "collaborate", "computer_clock", "connect", "copy", "credit_card_slash", "credit_card", "cross_circle", "cross", "csv", "delete", "delivery", "disconnect", "disputed", "document_right_align", "document_tick", "document_vertical_lines", "download", "draft", "drag_vertical", "drag", "dropdown", "duplicate", "edit", "edited", "ellipsis_horizontal", "ellipsis_vertical", "email_switch", "email", "error_square", "error", "euro", "expand", "factory", "favourite_lined", "favourite", "fax", "feedback", "file_excel", "file_generic", "file_image", "file_pdf", "file_word", "files_leaning", "filter_new", "filter", "fit_height", "fit_width", "flag", "folder", "gift", "graph", "grid", "help", "hide", "home", "image", "in_progress", "in_transit", "individual", "info", "italic", "key", "ledger_arrow_left", "ledger_arrow_right", "ledger", "link", "list_view", "location", "locked", "logout", "lookup", "marker", "message", "messages", "minus_large", "minus", "mobile", "money_bag", "pause_circle", "pause", "pdf", "people_switch", "people", "person_info", "person_tick", "person", "phone", "play_circle", "play", "plus_large", "plus", "pound", "print", "progress", "progressed", "question", "refresh_clock", "refresh", "remove", "sage_coin", "save", "scan", "search", "services", "settings", "share", "shop", "sort_down", "sort_up", "spanner", "split_container", "split", "square_dot", "squares_nine", "stacked_boxes", "stacked_squares", "submitted", "sync", "tag", "three_boxes", "tick_circle", "tick", "unlocked", "upload", "uploaded", "video", "view", "warning"]),
183
+ "iconAlign": _propTypes.default.oneOf(["left", "right"]),
184
+ "isSkipLink": _propTypes.default.bool,
185
+ "onClick": _propTypes.default.func,
186
+ "onKeyDown": _propTypes.default.func,
187
+ "onMouseDown": _propTypes.default.func,
188
+ "rel": _propTypes.default.string,
189
+ "tabbable": _propTypes.default.bool,
190
+ "target": _propTypes.default.string,
191
+ "tooltipMessage": _propTypes.default.string,
192
+ "tooltipPosition": _propTypes.default.oneOf(["bottom", "left", "right", "top"])
795
193
  };
796
-
797
- exports.Link = Link;
798
194
  Link.displayName = "Link";
799
195
  var _default = Link;
800
- exports.default = _default;
196
+ exports.default = _default;