@splunk/react-ui 4.21.0 → 4.22.0

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 (92) hide show
  1. package/Accordion.js +425 -325
  2. package/Anchor.js +147 -117
  3. package/Animation.js +142 -94
  4. package/AnimationToggle.js +197 -193
  5. package/Box.js +145 -118
  6. package/Breadcrumbs.js +288 -206
  7. package/Button.js +488 -465
  8. package/ButtonGroup.js +160 -128
  9. package/ButtonSimple.js +543 -462
  10. package/CHANGELOG.md +24 -3
  11. package/Calendar.js +1111 -1001
  12. package/Card.js +771 -598
  13. package/CardLayout.js +205 -147
  14. package/Chip.js +509 -488
  15. package/Clickable.js +414 -352
  16. package/CloseButton.js +165 -142
  17. package/Code.js +1807 -2084
  18. package/CollapsiblePanel.js +586 -519
  19. package/Color.js +1068 -1068
  20. package/ColumnLayout.js +402 -363
  21. package/ComboBox.js +903 -794
  22. package/Concertina.js +997 -802
  23. package/ControlGroup.js +687 -594
  24. package/Date.js +567 -547
  25. package/DefinitionList.js +308 -234
  26. package/Divider.js +149 -118
  27. package/Dropdown.js +459 -416
  28. package/DualListbox.js +1479 -1541
  29. package/EventListener.js +94 -97
  30. package/File.js +1051 -969
  31. package/FormRows.js +883 -696
  32. package/Heading.js +216 -193
  33. package/Image.js +446 -402
  34. package/JSONTree.js +690 -551
  35. package/Layer.js +437 -410
  36. package/Link.js +336 -255
  37. package/List.js +213 -161
  38. package/Markdown.js +509 -487
  39. package/Menu.js +1104 -1056
  40. package/Message.js +475 -441
  41. package/MessageBar.js +387 -373
  42. package/Modal.js +810 -634
  43. package/ModalLayer.js +326 -243
  44. package/Monogram.js +308 -276
  45. package/Multiselect.js +3564 -3364
  46. package/Number.js +729 -687
  47. package/Paginator.js +510 -449
  48. package/Paragraph.js +145 -112
  49. package/Popover.js +1459 -1432
  50. package/Progress.js +301 -246
  51. package/RadioBar.js +634 -527
  52. package/RadioList.js +483 -444
  53. package/Resize.js +530 -489
  54. package/ResultsMenu.js +479 -455
  55. package/ScreenReaderContent.js +142 -111
  56. package/Scroll.js +595 -456
  57. package/ScrollContainerContext.js +197 -206
  58. package/Search.js +756 -650
  59. package/Select.js +2446 -2345
  60. package/SidePanel.js +390 -284
  61. package/Slider.js +680 -676
  62. package/SlidingPanels.js +639 -503
  63. package/SplitButton.js +464 -367
  64. package/StaticContent.js +161 -133
  65. package/StepBar.js +386 -358
  66. package/Switch.js +710 -640
  67. package/TabBar.js +741 -680
  68. package/TabLayout.js +406 -322
  69. package/Table.js +4974 -4616
  70. package/Text.js +1170 -1138
  71. package/TextArea.js +1102 -1090
  72. package/Tooltip.js +624 -581
  73. package/TransitionOpen.js +489 -422
  74. package/Typography.js +176 -153
  75. package/WaitSpinner.js +230 -206
  76. package/package.json +7 -7
  77. package/types/src/Color/Color.d.ts +0 -1
  78. package/types/src/JSONTree/JSONTreeContext.d.ts +7 -0
  79. package/types/src/JSONTree/TreeNode.d.ts +5 -0
  80. package/types/src/RadioBar/RadioBar.d.ts +1 -0
  81. package/types/src/ResultsMenu/ResultsMenu.d.ts +0 -2
  82. package/types/src/Select/docs/examples/Icons.d.ts +1 -9
  83. package/types/src/Slider/Slider.d.ts +1 -0
  84. package/types/src/TabBar/Tab.d.ts +10 -1
  85. package/types/src/TabBar/TabBar.d.ts +4 -2
  86. package/types/src/Table/Head.d.ts +7 -3
  87. package/types/src/Table/Table.d.ts +3 -2
  88. package/types/src/Table/TableContext.d.ts +2 -0
  89. package/useForceUpdate.js +112 -82
  90. package/useKeyPress.js +74 -71
  91. package/usePrevious.js +65 -65
  92. package/useRovingFocus.js +122 -138
package/Link.js CHANGED
@@ -1,259 +1,340 @@
1
- /******/ (() => { // webpackBootstrap
2
- /******/ "use strict";
3
- /******/ // The require scope
4
- /******/ var __webpack_require__ = {};
5
- /******/
6
- /************************************************************************/
7
- /******/ /* webpack/runtime/compat get default export */
8
- /******/ (() => {
9
- /******/ // getDefaultExport function for compatibility with non-harmony modules
10
- /******/ __webpack_require__.n = (module) => {
11
- /******/ var getter = module && module.__esModule ?
12
- /******/ () => (module['default']) :
13
- /******/ () => (module);
14
- /******/ __webpack_require__.d(getter, { a: getter });
15
- /******/ return getter;
16
- /******/ };
17
- /******/ })();
18
- /******/
19
- /******/ /* webpack/runtime/define property getters */
20
- /******/ (() => {
21
- /******/ // define getter functions for harmony exports
22
- /******/ __webpack_require__.d = (exports, definition) => {
23
- /******/ for(var key in definition) {
24
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
25
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
26
- /******/ }
27
- /******/ }
28
- /******/ };
29
- /******/ })();
30
- /******/
31
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
32
- /******/ (() => {
33
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
34
- /******/ })();
35
- /******/
36
- /******/ /* webpack/runtime/make namespace object */
37
- /******/ (() => {
38
- /******/ // define __esModule on exports
39
- /******/ __webpack_require__.r = (exports) => {
40
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
41
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
42
- /******/ }
43
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
44
- /******/ };
45
- /******/ })();
46
- /******/
47
- /************************************************************************/
48
- var __webpack_exports__ = {};
49
- // ESM COMPAT FLAG
50
- __webpack_require__.r(__webpack_exports__);
51
-
52
- // EXPORTS
53
- __webpack_require__.d(__webpack_exports__, {
54
- "default": () => (/* reexport */ Link_Link)
55
- });
56
-
57
- ;// CONCATENATED MODULE: external "react"
58
- const external_react_namespaceObject = require("react");
59
- var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_namespaceObject);
60
- ;// CONCATENATED MODULE: external "prop-types"
61
- const external_prop_types_namespaceObject = require("prop-types");
62
- var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_namespaceObject);
63
- ;// CONCATENATED MODULE: external "@splunk/react-ui/ScreenReaderContent"
64
- const ScreenReaderContent_namespaceObject = require("@splunk/react-ui/ScreenReaderContent");
65
- var ScreenReaderContent_default = /*#__PURE__*/__webpack_require__.n(ScreenReaderContent_namespaceObject);
66
- ;// CONCATENATED MODULE: external "@splunk/react-ui/Dropdown"
67
- const Dropdown_namespaceObject = require("@splunk/react-ui/Dropdown");
68
- ;// CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
69
- const i18n_namespaceObject = require("@splunk/ui-utils/i18n");
70
- ;// CONCATENATED MODULE: external "styled-components"
71
- const external_styled_components_namespaceObject = require("styled-components");
72
- var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_namespaceObject);
73
- ;// CONCATENATED MODULE: external "@splunk/react-icons/ArrowSquareTopRight"
74
- const ArrowSquareTopRight_namespaceObject = require("@splunk/react-icons/ArrowSquareTopRight");
75
- var ArrowSquareTopRight_default = /*#__PURE__*/__webpack_require__.n(ArrowSquareTopRight_namespaceObject);
76
- ;// CONCATENATED MODULE: external "@splunk/react-icons/enterprise/External"
77
- const External_namespaceObject = require("@splunk/react-icons/enterprise/External");
78
- var External_default = /*#__PURE__*/__webpack_require__.n(External_namespaceObject);
79
- ;// CONCATENATED MODULE: external "@splunk/themes"
80
- const themes_namespaceObject = require("@splunk/themes");
81
- ;// CONCATENATED MODULE: ./src/Link/icons/External.tsx
82
-
83
-
84
-
85
-
86
-
87
- var iconStyles = (0,external_styled_components_namespaceObject.css)(["width:0.8em;height:0.8em;vertical-align:baseline;"]);
88
- var StyledEnterprise = external_styled_components_default()((External_default())).withConfig({
89
- displayName: "External__StyledEnterprise",
90
- componentId: "sc-13bdx45-0"
91
- })(["", " margin:0 0 0 3px;"], iconStyles);
92
- var StyledPrisma = external_styled_components_default()((ArrowSquareTopRight_default())).withConfig({
93
- displayName: "External__StyledPrisma",
94
- componentId: "sc-13bdx45-1"
95
- })(["", " margin:0 0 0 4px;"], iconStyles);
96
-
97
- function External() {
98
- var _useSplunkTheme = (0,themes_namespaceObject.useSplunkTheme)(),
99
- isEnterprise = _useSplunkTheme.isEnterprise;
100
-
101
- return isEnterprise ? /*#__PURE__*/external_react_default().createElement(StyledEnterprise, {
102
- screenReaderText: null
103
- }) : /*#__PURE__*/external_react_default().createElement(StyledPrisma, null);
104
- }
105
-
106
- /* harmony default export */ const icons_External = (External);
107
- ;// CONCATENATED MODULE: external "@splunk/react-ui/Clickable"
108
- const Clickable_namespaceObject = require("@splunk/react-ui/Clickable");
109
- var Clickable_default = /*#__PURE__*/__webpack_require__.n(Clickable_namespaceObject);
110
- ;// CONCATENATED MODULE: ./src/Link/LinkStyles.ts
111
-
112
-
113
-
114
- var StyledClickable = external_styled_components_default()((Clickable_default())).withConfig({
115
- displayName: "LinkStyles__StyledClickable",
116
- componentId: "sc-1hhltcf-0"
117
- })(["", ";color:", ";text-decoration:none;font-size:inherit;font-weight:inherit;line-height:inherit;border-radius:", ";&:not([disabled],[aria-disabled='true']){cursor:pointer;", ";&:focus{box-shadow:", ";outline:0;&:active{box-shadow:none;}}}&[disabled],&[aria-disabled='true']{color:", ";}&::-moz-focus-inner{border:0;padding:0;}"], themes_namespaceObject.mixins.reset('inline'), (0,themes_namespaceObject.pick)({
118
- enterprise: themes_namespaceObject.variables.linkColor,
119
- prisma: themes_namespaceObject.variables.interactiveColorPrimary
120
- }), (0,themes_namespaceObject.pick)({
121
- enterprise: 0,
122
- prisma: '1px'
123
- }), (0,themes_namespaceObject.pick)({
124
- enterprise: (0,external_styled_components_namespaceObject.css)(["&:hover{text-decoration:underline;}"]),
125
- prisma: (0,external_styled_components_namespaceObject.css)(["&:hover:not(:focus),&:active{text-decoration:underline;text-underline-position:under;}"])
126
- }), themes_namespaceObject.variables.focusShadow, themes_namespaceObject.variables.contentColorDisabled);
127
-
128
- ;// CONCATENATED MODULE: ./src/Link/Link.tsx
129
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
130
-
131
- 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); }
132
-
133
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
134
-
135
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
136
-
137
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
138
-
139
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
140
-
141
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
142
-
143
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
144
-
145
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
146
-
147
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
148
-
149
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
150
-
151
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
152
-
153
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
154
-
155
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
156
-
157
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
158
-
159
-
160
-
161
-
162
-
163
-
164
-
165
-
166
- var defaultProps = {
167
- disabled: false,
168
- openInNewContext: false
169
- };
170
- var propTypes = {
171
- children: (external_prop_types_default()).node,
172
- disabled: (external_prop_types_default()).bool,
173
- elementRef: external_prop_types_default().oneOfType([(external_prop_types_default()).func, (external_prop_types_default()).object]),
174
- openInNewContext: external_prop_types_default().oneOfType([(external_prop_types_default()).bool, (external_prop_types_default()).string]),
175
- to: (external_prop_types_default()).string
176
- };
177
-
178
- var DEFAULT_EXTERNAL_MESSAGE = (0,i18n_namespaceObject._)('(Opens new window)');
179
- /**
180
- * `Link` is a simple method for configuring `Button` for inline links. For more complex behaviors,
181
- * see the `Button` documentation.
182
- */
183
-
184
-
185
- var Link = /*#__PURE__*/function (_Component) {
186
- _inherits(Link, _Component);
187
-
188
- var _super = _createSuper(Link);
189
-
190
- function Link() {
191
- var _this;
192
-
193
- _classCallCheck(this, Link);
194
-
195
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
196
- args[_key] = arguments[_key];
197
- }
198
-
199
- _this = _super.call.apply(_super, [this].concat(args));
200
-
201
- _defineProperty(_assertThisInitialized(_this), "component", null);
202
-
203
- _defineProperty(_assertThisInitialized(_this), "handleMount", function (comp) {
204
- _this.component = comp;
1
+ /******/ (() => {
2
+ // webpackBootstrap
3
+ /******/ "use strict";
4
+ /******/ // The require scope
5
+ /******/ var e = {};
6
+ /******/
7
+ /************************************************************************/
8
+ /******/ /* webpack/runtime/compat get default export */
9
+ /******/ (() => {
10
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
11
+ /******/ e.n = t => {
12
+ /******/ var r = t && t.__esModule ?
13
+ /******/ () => t["default"]
14
+ /******/ : () => t
15
+ /******/;
16
+ e.d(r, {
17
+ a: r
18
+ });
19
+ /******/ return r;
20
+ /******/ };
21
+ /******/ })();
22
+ /******/
23
+ /******/ /* webpack/runtime/define property getters */
24
+ /******/ (() => {
25
+ /******/ // define getter functions for harmony exports
26
+ /******/ e.d = (t, r) => {
27
+ /******/ for (var n in r) {
28
+ /******/ if (e.o(r, n) && !e.o(t, n)) {
29
+ /******/ Object.defineProperty(t, n, {
30
+ enumerable: true,
31
+ get: r[n]
32
+ });
33
+ /******/ }
34
+ /******/ }
35
+ /******/ };
36
+ /******/ })();
37
+ /******/
38
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
39
+ /******/ (() => {
40
+ /******/ e.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t)
41
+ /******/;
42
+ })();
43
+ /******/
44
+ /******/ /* webpack/runtime/make namespace object */
45
+ /******/ (() => {
46
+ /******/ // define __esModule on exports
47
+ /******/ e.r = e => {
48
+ /******/ if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
49
+ /******/ Object.defineProperty(e, Symbol.toStringTag, {
50
+ value: "Module"
51
+ });
52
+ /******/ }
53
+ /******/ Object.defineProperty(e, "__esModule", {
54
+ value: true
55
+ });
56
+ /******/ };
57
+ /******/ })();
58
+ /******/
59
+ /************************************************************************/ var t = {};
60
+ // ESM COMPAT FLAG
61
+ e.r(t);
62
+ // EXPORTS
63
+ e.d(t, {
64
+ default: () => /* reexport */ J
205
65
  });
206
-
207
- return _this;
208
- }
209
-
210
- _createClass(Link, [{
211
- key: "focus",
212
-
66
+ // CONCATENATED MODULE: external "react"
67
+ const r = require("react");
68
+ var n = e.n(r);
69
+ // CONCATENATED MODULE: external "prop-types"
70
+ const o = require("prop-types");
71
+ var i = e.n(o);
72
+ // CONCATENATED MODULE: external "@splunk/react-ui/ScreenReaderContent"
73
+ const a = require("@splunk/react-ui/ScreenReaderContent");
74
+ var u = e.n(a);
75
+ // CONCATENATED MODULE: external "@splunk/react-ui/Dropdown"
76
+ const l = require("@splunk/react-ui/Dropdown");
77
+ // CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
78
+ const c = require("@splunk/ui-utils/i18n");
79
+ // CONCATENATED MODULE: external "styled-components"
80
+ const s = require("styled-components");
81
+ var f = e.n(s);
82
+ // CONCATENATED MODULE: external "@splunk/react-icons/ArrowSquareTopRight"
83
+ const p = require("@splunk/react-icons/ArrowSquareTopRight");
84
+ var d = e.n(p);
85
+ // CONCATENATED MODULE: external "@splunk/react-icons/enterprise/External"
86
+ const y = require("@splunk/react-icons/enterprise/External");
87
+ var b = e.n(y);
88
+ // CONCATENATED MODULE: external "@splunk/themes"
89
+ const v = require("@splunk/themes");
90
+ // CONCATENATED MODULE: ./src/Link/icons/External.tsx
91
+ var h = (0, s.css)([ "width:0.8em;height:0.8em;vertical-align:baseline;" ]);
92
+ var m = f()(b()).withConfig({
93
+ displayName: "External__StyledEnterprise",
94
+ componentId: "sc-13bdx45-0"
95
+ })([ "", " margin:0 0 0 3px;" ], h);
96
+ var g = f()(d()).withConfig({
97
+ displayName: "External__StyledPrisma",
98
+ componentId: "sc-13bdx45-1"
99
+ })([ "", " margin:0 0 0 4px;" ], h);
100
+ function w() {
101
+ var e = (0, v.useSplunkTheme)(), t = e.isEnterprise;
102
+ return t ? n().createElement(m, {
103
+ screenReaderText: null
104
+ }) : n().createElement(g, null);
105
+ }
106
+ /* harmony default export */ const O = w;
107
+ // CONCATENATED MODULE: external "@splunk/react-ui/Clickable"
108
+ const x = require("@splunk/react-ui/Clickable");
109
+ var S = e.n(x);
110
+ // CONCATENATED MODULE: ./src/Link/LinkStyles.ts
111
+ var k = f()(S()).withConfig({
112
+ displayName: "LinkStyles__StyledClickable",
113
+ componentId: "sc-1hhltcf-0"
114
+ })([ "", ";color:", ";text-decoration:none;font-size:inherit;font-weight:inherit;line-height:inherit;border-radius:", ";&:not([disabled],[aria-disabled='true']){cursor:pointer;", ";&:focus{box-shadow:", ";outline:0;&:active{box-shadow:none;}}}&[disabled],&[aria-disabled='true']{color:", ";}&::-moz-focus-inner{border:0;padding:0;}" ], v.mixins.reset("inline"), (0,
115
+ v.pick)({
116
+ enterprise: v.variables.linkColor,
117
+ prisma: v.variables.interactiveColorPrimary
118
+ }), (0, v.pick)({
119
+ enterprise: 0,
120
+ prisma: "1px"
121
+ }), (0, v.pick)({
122
+ enterprise: (0, s.css)([ "&:hover{text-decoration:underline;}" ]),
123
+ prisma: (0, s.css)([ "&:hover:not(:focus),&:active{text-decoration:underline;text-underline-position:under;}" ])
124
+ }), v.variables.focusShadow, v.variables.contentColorDisabled);
125
+ // CONCATENATED MODULE: ./src/Link/Link.tsx
126
+ function j(e) {
127
+ "@babel/helpers - typeof";
128
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
129
+ j = function e(t) {
130
+ return typeof t;
131
+ };
132
+ } else {
133
+ j = function e(t) {
134
+ return t && typeof Symbol === "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
135
+ };
136
+ }
137
+ return j(e);
138
+ }
139
+ function _() {
140
+ _ = Object.assign || function(e) {
141
+ for (var t = 1; t < arguments.length; t++) {
142
+ var r = arguments[t];
143
+ for (var n in r) {
144
+ if (Object.prototype.hasOwnProperty.call(r, n)) {
145
+ e[n] = r[n];
146
+ }
147
+ }
148
+ }
149
+ return e;
150
+ };
151
+ return _.apply(this, arguments);
152
+ }
153
+ function P(e, t) {
154
+ if (e == null) return {};
155
+ var r = C(e, t);
156
+ var n, o;
157
+ if (Object.getOwnPropertySymbols) {
158
+ var i = Object.getOwnPropertySymbols(e);
159
+ for (o = 0; o < i.length; o++) {
160
+ n = i[o];
161
+ if (t.indexOf(n) >= 0) continue;
162
+ if (!Object.prototype.propertyIsEnumerable.call(e, n)) continue;
163
+ r[n] = e[n];
164
+ }
165
+ }
166
+ return r;
167
+ }
168
+ function C(e, t) {
169
+ if (e == null) return {};
170
+ var r = {};
171
+ var n = Object.keys(e);
172
+ var o, i;
173
+ for (i = 0; i < n.length; i++) {
174
+ o = n[i];
175
+ if (t.indexOf(o) >= 0) continue;
176
+ r[o] = e[o];
177
+ }
178
+ return r;
179
+ }
180
+ function E(e, t) {
181
+ if (!(e instanceof t)) {
182
+ throw new TypeError("Cannot call a class as a function");
183
+ }
184
+ }
185
+ function q(e, t) {
186
+ for (var r = 0; r < t.length; r++) {
187
+ var n = t[r];
188
+ n.enumerable = n.enumerable || false;
189
+ n.configurable = true;
190
+ if ("value" in n) n.writable = true;
191
+ Object.defineProperty(e, n.key, n);
192
+ }
193
+ }
194
+ function R(e, t, r) {
195
+ if (t) q(e.prototype, t);
196
+ if (r) q(e, r);
197
+ return e;
198
+ }
199
+ function T(e, t) {
200
+ if (typeof t !== "function" && t !== null) {
201
+ throw new TypeError("Super expression must either be null or a function");
202
+ }
203
+ e.prototype = Object.create(t && t.prototype, {
204
+ constructor: {
205
+ value: e,
206
+ writable: true,
207
+ configurable: true
208
+ }
209
+ });
210
+ if (t) I(e, t);
211
+ }
212
+ function I(e, t) {
213
+ I = Object.setPrototypeOf || function e(t, r) {
214
+ t.__proto__ = r;
215
+ return t;
216
+ };
217
+ return I(e, t);
218
+ }
219
+ function N(e) {
220
+ var t = z();
221
+ return function r() {
222
+ var n = A(e), o;
223
+ if (t) {
224
+ var i = A(this).constructor;
225
+ o = Reflect.construct(n, arguments, i);
226
+ } else {
227
+ o = n.apply(this, arguments);
228
+ }
229
+ return M(this, o);
230
+ };
231
+ }
232
+ function M(e, t) {
233
+ if (t && (j(t) === "object" || typeof t === "function")) {
234
+ return t;
235
+ }
236
+ return D(e);
237
+ }
238
+ function D(e) {
239
+ if (e === void 0) {
240
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
241
+ }
242
+ return e;
243
+ }
244
+ function z() {
245
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
246
+ if (Reflect.construct.sham) return false;
247
+ if (typeof Proxy === "function") return true;
248
+ try {
249
+ Date.prototype.toString.call(Reflect.construct(Date, [], (function() {})));
250
+ return true;
251
+ } catch (e) {
252
+ return false;
253
+ }
254
+ }
255
+ function A(e) {
256
+ A = Object.setPrototypeOf ? Object.getPrototypeOf : function e(t) {
257
+ return t.__proto__ || Object.getPrototypeOf(t);
258
+ };
259
+ return A(e);
260
+ }
261
+ function F(e, t, r) {
262
+ if (t in e) {
263
+ Object.defineProperty(e, t, {
264
+ value: r,
265
+ enumerable: true,
266
+ configurable: true,
267
+ writable: true
268
+ });
269
+ } else {
270
+ e[t] = r;
271
+ }
272
+ return e;
273
+ }
274
+ var L = {
275
+ disabled: false,
276
+ openInNewContext: false
277
+ };
278
+ var B = {
279
+ children: i().node,
280
+ disabled: i().bool,
281
+ elementRef: i().oneOfType([ i().func, i().object ]),
282
+ openInNewContext: i().oneOfType([ i().bool, i().string ]),
283
+ to: i().string
284
+ };
285
+ var G = (0, c._)("(Opens new window)");
213
286
  /**
287
+ * `Link` is a simple method for configuring `Button` for inline links. For more complex behaviors,
288
+ * see the `Button` documentation.
289
+ */ var H = function(e) {
290
+ T(r, e);
291
+ var t = N(r);
292
+ function r() {
293
+ var e;
294
+ E(this, r);
295
+ for (var n = arguments.length, o = new Array(n), i = 0; i < n; i++) {
296
+ o[i] = arguments[i];
297
+ }
298
+ e = t.call.apply(t, [ this ].concat(o));
299
+ F(D(e), "component", null);
300
+ F(D(e), "handleMount", (function(t) {
301
+ e.component = t;
302
+ }));
303
+ return e;
304
+ }
305
+ R(r, [ {
306
+ key: "focus",
307
+ /**
214
308
  * Place focus on the link.
215
309
  */
216
- value: function focus() {
217
- var _this$component;
218
-
219
- (_this$component = this.component) === null || _this$component === void 0 ? void 0 : _this$component.focus();
220
- }
221
- }, {
222
- key: "render",
223
- value: function render() {
224
- var _this$props = this.props,
225
- children = _this$props.children,
226
- openInNewContext = _this$props.openInNewContext,
227
- otherProps = _objectWithoutProperties(_this$props, ["children", "openInNewContext"]);
228
-
229
- var enableExternalLink = false;
230
- var externalLinkMessage;
231
-
232
- if (openInNewContext) {
233
- enableExternalLink = true;
234
- externalLinkMessage = typeof openInNewContext === 'string' ? openInNewContext : DEFAULT_EXTERNAL_MESSAGE;
235
- }
236
-
237
- return /*#__PURE__*/external_react_default().createElement(StyledClickable, _extends({
238
- "data-test": "link",
239
- ref: this.handleMount,
240
- openInNewContext: enableExternalLink
241
- }, otherProps), children, openInNewContext && /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/external_react_default().createElement(icons_External, null), /*#__PURE__*/external_react_default().createElement((ScreenReaderContent_default()), null, externalLinkMessage)));
242
- }
243
- }]);
244
-
245
- return Link;
246
- }(external_react_namespaceObject.Component);
247
-
248
- _defineProperty(Link, "propTypes", propTypes);
249
-
250
- _defineProperty(Link, "defaultProps", defaultProps);
251
-
252
- _defineProperty(Link, Dropdown_namespaceObject.legacyRefMode, true);
253
-
254
- /* harmony default export */ const Link_Link = (Link);
255
- ;// CONCATENATED MODULE: ./src/Link/index.ts
256
-
257
- module.exports = __webpack_exports__;
258
- /******/ })()
259
- ;
310
+ value: function e() {
311
+ var t;
312
+ (t = this.component) === null || t === void 0 ? void 0 : t.focus();
313
+ }
314
+ }, {
315
+ key: "render",
316
+ value: function e() {
317
+ var t = this.props, r = t.children, o = t.openInNewContext, i = P(t, [ "children", "openInNewContext" ]);
318
+ var a = false;
319
+ var l;
320
+ if (o) {
321
+ a = true;
322
+ l = typeof o === "string" ? o : G;
323
+ }
324
+
325
+ return n().createElement(k, _({
326
+ "data-test": "link",
327
+ ref: this.handleMount,
328
+ openInNewContext: a
329
+ }, i), r, o && n().createElement(n().Fragment, null, n().createElement(O, null), n().createElement(u(), null, l)));
330
+ }
331
+ } ]);
332
+ return r;
333
+ }(r.Component);
334
+ F(H, "propTypes", B);
335
+ F(H, "defaultProps", L);
336
+ F(H, l.legacyRefMode, true);
337
+ /* harmony default export */ const J = H;
338
+ // CONCATENATED MODULE: ./src/Link/index.ts
339
+ module.exports = t;
340
+ /******/})();