@splunk/react-ui 4.20.0 → 4.21.1

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 (101) hide show
  1. package/Accordion.js +425 -441
  2. package/Anchor.js +147 -193
  3. package/Animation.js +142 -166
  4. package/AnimationToggle.js +197 -253
  5. package/Box.js +145 -194
  6. package/Breadcrumbs.js +288 -298
  7. package/Button.js +488 -613
  8. package/ButtonGroup.js +160 -212
  9. package/ButtonSimple.js +543 -562
  10. package/CHANGELOG.md +26 -0
  11. package/Calendar.js +1107 -1195
  12. package/Card.js +771 -746
  13. package/CardLayout.js +205 -223
  14. package/Chip.js +509 -612
  15. package/Clickable.js +416 -472
  16. package/CloseButton.js +165 -250
  17. package/Code.js +1808 -2172
  18. package/Code.js.LICENSE.txt +8 -0
  19. package/CollapsiblePanel.js +586 -675
  20. package/Color.js +1066 -1297
  21. package/ColumnLayout.js +402 -465
  22. package/ComboBox.js +892 -969
  23. package/Concertina.js +998 -963
  24. package/ControlGroup.js +687 -718
  25. package/Date.js +567 -697
  26. package/DefinitionList.js +308 -310
  27. package/Divider.js +149 -194
  28. package/Dropdown.js +459 -558
  29. package/DualListbox.js +1480 -1735
  30. package/EventListener.js +94 -165
  31. package/File.js +1051 -1173
  32. package/FormRows.js +885 -880
  33. package/Heading.js +216 -263
  34. package/Image.js +446 -558
  35. package/JSONTree.js +690 -699
  36. package/Layer.js +442 -582
  37. package/Link.js +336 -361
  38. package/List.js +213 -237
  39. package/Markdown.js +510 -612
  40. package/Menu.js +1109 -1331
  41. package/Message.js +474 -629
  42. package/MessageBar.js +387 -561
  43. package/Modal.js +810 -798
  44. package/ModalLayer.js +326 -343
  45. package/Monogram.js +308 -368
  46. package/Multiselect.js +3558 -3998
  47. package/Number.js +729 -843
  48. package/Paginator.js +510 -615
  49. package/Paragraph.js +145 -188
  50. package/Popover.js +1470 -1693
  51. package/Progress.js +301 -362
  52. package/RadioBar.js +610 -651
  53. package/RadioList.js +483 -544
  54. package/Resize.js +530 -623
  55. package/ResultsMenu.js +494 -597
  56. package/ScreenReaderContent.js +142 -187
  57. package/Scroll.js +595 -598
  58. package/ScrollContainerContext.js +197 -278
  59. package/Search.js +745 -817
  60. package/Select.js +2441 -2746
  61. package/SidePanel.js +390 -392
  62. package/Slider.js +668 -825
  63. package/SlidingPanels.js +639 -645
  64. package/SplitButton.js +464 -499
  65. package/StaticContent.js +161 -217
  66. package/StepBar.js +386 -466
  67. package/Switch.js +710 -764
  68. package/TabBar.js +724 -815
  69. package/TabLayout.js +406 -438
  70. package/Table.js +4842 -5121
  71. package/Text.js +1169 -1351
  72. package/TextArea.js +1097 -1307
  73. package/Tooltip.js +624 -721
  74. package/TransitionOpen.js +489 -546
  75. package/Typography.js +176 -229
  76. package/WaitSpinner.js +230 -298
  77. package/package.json +14 -15
  78. package/stubs-splunkui.d.ts +4 -1
  79. package/types/src/ComboBox/Option.d.ts +1 -1
  80. package/types/src/Concertina/Concertina.d.ts +4 -0
  81. package/types/src/JSONTree/JSONTreeContext.d.ts +7 -0
  82. package/types/src/JSONTree/TreeNode.d.ts +5 -0
  83. package/types/src/Link/Link.d.ts +7 -3
  84. package/types/src/Link/docs/examples/NewWindow.d.ts +2 -0
  85. package/types/src/Markdown/Markdown.d.ts +1 -1
  86. package/types/src/Markdown/renderers/MarkdownHeading.d.ts +1 -1
  87. package/types/src/Menu/Item.d.ts +1 -1
  88. package/types/src/Menu/Menu.d.ts +1 -0
  89. package/types/src/MessageBar/docs/examples/WithActions.d.ts +2 -0
  90. package/types/src/Multiselect/Option.d.ts +1 -1
  91. package/types/src/Search/Option.d.ts +1 -1
  92. package/types/src/Select/Option.d.ts +1 -1
  93. package/types/src/Select/OptionBase.d.ts +1 -1
  94. package/types/src/fixtures/FetchOptions.d.ts +2 -8
  95. package/useForceUpdate.js +112 -146
  96. package/useKeyPress.js +74 -128
  97. package/usePrevious.js +65 -129
  98. package/useRovingFocus.js +122 -218
  99. package/types/src/Link/docs/examples/NewTab.d.ts +0 -2
  100. /package/types/src/Table/docs/examples/{DockedHeader.d.ts → DockedHeaderScrollbar.d.ts} +0 -0
  101. /package/types/src/Table/docs/examples/prisma/{DockedHeader.d.ts → DockedHeaderScrollbar.d.ts} +0 -0
package/Link.js CHANGED
@@ -1,365 +1,340 @@
1
- module.exports =
2
- /******/ (function(modules) { // webpackBootstrap
3
- /******/ // The module cache
4
- /******/ var installedModules = {};
5
- /******/
6
- /******/ // The require function
7
- /******/ function __webpack_require__(moduleId) {
8
- /******/
9
- /******/ // Check if module is in cache
10
- /******/ if(installedModules[moduleId]) {
11
- /******/ return installedModules[moduleId].exports;
12
- /******/ }
13
- /******/ // Create a new module (and put it into the cache)
14
- /******/ var module = installedModules[moduleId] = {
15
- /******/ i: moduleId,
16
- /******/ l: false,
17
- /******/ exports: {}
18
- /******/ };
19
- /******/
20
- /******/ // Execute the module function
21
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
22
- /******/
23
- /******/ // Flag the module as loaded
24
- /******/ module.l = true;
25
- /******/
26
- /******/ // Return the exports of the module
27
- /******/ return module.exports;
28
- /******/ }
29
- /******/
30
- /******/
31
- /******/ // expose the modules object (__webpack_modules__)
32
- /******/ __webpack_require__.m = modules;
33
- /******/
34
- /******/ // expose the module cache
35
- /******/ __webpack_require__.c = installedModules;
36
- /******/
37
- /******/ // define getter function for harmony exports
38
- /******/ __webpack_require__.d = function(exports, name, getter) {
39
- /******/ if(!__webpack_require__.o(exports, name)) {
40
- /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
41
- /******/ }
42
- /******/ };
43
- /******/
44
- /******/ // define __esModule on exports
45
- /******/ __webpack_require__.r = function(exports) {
46
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
47
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
48
- /******/ }
49
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
50
- /******/ };
51
- /******/
52
- /******/ // create a fake namespace object
53
- /******/ // mode & 1: value is a module id, require it
54
- /******/ // mode & 2: merge all properties of value into the ns
55
- /******/ // mode & 4: return value when already ns object
56
- /******/ // mode & 8|1: behave like require
57
- /******/ __webpack_require__.t = function(value, mode) {
58
- /******/ if(mode & 1) value = __webpack_require__(value);
59
- /******/ if(mode & 8) return value;
60
- /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
61
- /******/ var ns = Object.create(null);
62
- /******/ __webpack_require__.r(ns);
63
- /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
64
- /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
65
- /******/ return ns;
66
- /******/ };
67
- /******/
68
- /******/ // getDefaultExport function for compatibility with non-harmony modules
69
- /******/ __webpack_require__.n = function(module) {
70
- /******/ var getter = module && module.__esModule ?
71
- /******/ function getDefault() { return module['default']; } :
72
- /******/ function getModuleExports() { return module; };
73
- /******/ __webpack_require__.d(getter, 'a', getter);
74
- /******/ return getter;
75
- /******/ };
76
- /******/
77
- /******/ // Object.prototype.hasOwnProperty.call
78
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
79
- /******/
80
- /******/ // __webpack_public_path__
81
- /******/ __webpack_require__.p = "";
82
- /******/
83
- /******/
84
- /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 203);
86
- /******/ })
87
- /************************************************************************/
88
- /******/ ({
89
-
90
- /***/ 0:
91
- /***/ (function(module, exports) {
92
-
93
- module.exports = require("@splunk/themes");
94
-
95
- /***/ }),
96
-
97
- /***/ 1:
98
- /***/ (function(module, exports) {
99
-
100
- module.exports = require("prop-types");
101
-
102
- /***/ }),
103
-
104
- /***/ 12:
105
- /***/ (function(module, exports) {
106
-
107
- module.exports = require("@splunk/react-ui/Clickable");
108
-
109
- /***/ }),
110
-
111
- /***/ 2:
112
- /***/ (function(module, exports) {
113
-
114
- module.exports = require("react");
115
-
116
- /***/ }),
117
-
118
- /***/ 203:
119
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
120
-
121
- "use strict";
122
- // ESM COMPAT FLAG
123
- __webpack_require__.r(__webpack_exports__);
124
-
125
- // EXPORTS
126
- __webpack_require__.d(__webpack_exports__, "default", function() { return /* reexport */ src_Link_Link; });
127
-
128
- // EXTERNAL MODULE: external "react"
129
- var external_react_ = __webpack_require__(2);
130
- var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
131
-
132
- // EXTERNAL MODULE: external "prop-types"
133
- var external_prop_types_ = __webpack_require__(1);
134
- var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
135
-
136
- // EXTERNAL MODULE: external "@splunk/react-ui/Dropdown"
137
- var Dropdown_ = __webpack_require__(22);
138
-
139
- // EXTERNAL MODULE: external "styled-components"
140
- var external_styled_components_ = __webpack_require__(3);
141
- var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_);
142
-
143
- // EXTERNAL MODULE: external "@splunk/react-icons/ArrowSquareTopRight"
144
- var ArrowSquareTopRight_ = __webpack_require__(96);
145
- var ArrowSquareTopRight_default = /*#__PURE__*/__webpack_require__.n(ArrowSquareTopRight_);
146
-
147
- // EXTERNAL MODULE: external "@splunk/react-icons/enterprise/External"
148
- var External_ = __webpack_require__(65);
149
- var External_default = /*#__PURE__*/__webpack_require__.n(External_);
150
-
151
- // EXTERNAL MODULE: external "@splunk/themes"
152
- var themes_ = __webpack_require__(0);
153
-
154
- // EXTERNAL MODULE: external "@splunk/ui-utils/i18n"
155
- var i18n_ = __webpack_require__(4);
156
-
157
- // CONCATENATED MODULE: ./src/Link/icons/External.tsx
158
-
159
-
160
-
161
-
162
-
163
-
164
-
165
- var label = Object(i18n_["_"])('Open externally');
166
-
167
- var iconStyles = Object(external_styled_components_["css"])(["width:0.8em;height:0.8em;vertical-align:baseline;"]);
168
- var StyledEnterprise = external_styled_components_default()(External_default.a).withConfig({
169
- displayName: "External__StyledEnterprise",
170
- componentId: "sc-13bdx45-0"
171
- })(["", " margin:0 0 0 3px;"], iconStyles);
172
- var StyledPrisma = external_styled_components_default()(ArrowSquareTopRight_default.a).withConfig({
173
- displayName: "External__StyledPrisma",
174
- componentId: "sc-13bdx45-1"
175
- })(["", " margin:0 0 0 4px;"], iconStyles);
176
-
177
- function External() {
178
- var _useSplunkTheme = Object(themes_["useSplunkTheme"])(),
179
- isEnterprise = _useSplunkTheme.isEnterprise;
180
-
181
- return isEnterprise ? /*#__PURE__*/external_react_default.a.createElement(StyledEnterprise, {
182
- screenReaderText: label
183
- }) : /*#__PURE__*/external_react_default.a.createElement(StyledPrisma, {
184
- "aria-label": label
185
- }, /*#__PURE__*/external_react_default.a.createElement("title", null, label));
186
- }
187
-
188
- /* harmony default export */ var icons_External = (External);
189
- // EXTERNAL MODULE: external "@splunk/react-ui/Clickable"
190
- var Clickable_ = __webpack_require__(12);
191
- var Clickable_default = /*#__PURE__*/__webpack_require__.n(Clickable_);
192
-
193
- // CONCATENATED MODULE: ./src/Link/LinkStyles.ts
194
-
195
-
196
-
197
- var StyledClickable = external_styled_components_default()(Clickable_default.a).withConfig({
198
- displayName: "LinkStyles__StyledClickable",
199
- componentId: "sc-1hhltcf-0"
200
- })(["", ";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_["mixins"].reset('inline'), Object(themes_["pick"])({
201
- enterprise: themes_["variables"].linkColor,
202
- prisma: themes_["variables"].interactiveColorPrimary
203
- }), Object(themes_["pick"])({
204
- enterprise: 0,
205
- prisma: '1px'
206
- }), Object(themes_["pick"])({
207
- enterprise: Object(external_styled_components_["css"])(["&:hover{text-decoration:underline;}"]),
208
- prisma: Object(external_styled_components_["css"])(["&:hover:not(:focus),&:active{text-decoration:underline;text-underline-position:under;}"])
209
- }), themes_["variables"].focusShadow, themes_["variables"].contentColorDisabled);
210
-
211
- // CONCATENATED MODULE: ./src/Link/Link.tsx
212
- 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); }
213
-
214
- 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); }
215
-
216
- 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; }
217
-
218
- 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; }
219
-
220
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
221
-
222
- 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); } }
223
-
224
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
225
-
226
- 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); }
227
-
228
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
229
-
230
- 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); }; }
231
-
232
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
233
-
234
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
235
-
236
- 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; } }
237
-
238
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
239
-
240
- 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; }
241
-
242
-
243
-
244
-
245
-
246
-
247
- var defaultProps = {
248
- disabled: false,
249
- openInNewContext: false
250
- };
251
- var propTypes = {
252
- children: external_prop_types_default.a.node,
253
- disabled: external_prop_types_default.a.bool,
254
- elementRef: external_prop_types_default.a.oneOfType([external_prop_types_default.a.func, external_prop_types_default.a.object]),
255
- openInNewContext: external_prop_types_default.a.bool,
256
- to: external_prop_types_default.a.string
257
- };
258
- /**
259
- * `Link` is a simple method for configuring `Button` for inline links. For more complex behaviors,
260
- * see the `Button` documentation.
261
- */
262
-
263
- var Link_Link = /*#__PURE__*/function (_Component) {
264
- _inherits(Link, _Component);
265
-
266
- var _super = _createSuper(Link);
267
-
268
- function Link() {
269
- var _this;
270
-
271
- _classCallCheck(this, Link);
272
-
273
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
274
- args[_key] = arguments[_key];
275
- }
276
-
277
- _this = _super.call.apply(_super, [this].concat(args));
278
-
279
- _defineProperty(_assertThisInitialized(_this), "component", null);
280
-
281
- _defineProperty(_assertThisInitialized(_this), "handleMount", function (comp) {
282
- _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
283
65
  });
284
-
285
- return _this;
286
- }
287
-
288
- _createClass(Link, [{
289
- key: "focus",
290
-
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)");
291
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
+ /**
292
308
  * Place focus on the link.
293
309
  */
294
- value: function focus() {
295
- var _this$component;
296
-
297
- (_this$component = this.component) === null || _this$component === void 0 ? void 0 : _this$component.focus();
298
- }
299
- }, {
300
- key: "render",
301
- value: function render() {
302
- var _this$props = this.props,
303
- children = _this$props.children,
304
- openInNewContext = _this$props.openInNewContext,
305
- otherProps = _objectWithoutProperties(_this$props, ["children", "openInNewContext"]);
306
-
307
- return /*#__PURE__*/external_react_default.a.createElement(StyledClickable, _extends({
308
- "data-test": "link",
309
- ref: this.handleMount,
310
- openInNewContext: openInNewContext
311
- }, otherProps), children, openInNewContext && /*#__PURE__*/external_react_default.a.createElement(icons_External, null));
312
- }
313
- }]);
314
-
315
- return Link;
316
- }(external_react_["Component"]);
317
-
318
- _defineProperty(Link_Link, "propTypes", propTypes);
319
-
320
- _defineProperty(Link_Link, "defaultProps", defaultProps);
321
-
322
- _defineProperty(Link_Link, Dropdown_["legacyRefMode"], true);
323
-
324
- /* harmony default export */ var src_Link_Link = (Link_Link);
325
- // CONCATENATED MODULE: ./src/Link/index.ts
326
-
327
-
328
- /***/ }),
329
-
330
- /***/ 22:
331
- /***/ (function(module, exports) {
332
-
333
- module.exports = require("@splunk/react-ui/Dropdown");
334
-
335
- /***/ }),
336
-
337
- /***/ 3:
338
- /***/ (function(module, exports) {
339
-
340
- module.exports = require("styled-components");
341
-
342
- /***/ }),
343
-
344
- /***/ 4:
345
- /***/ (function(module, exports) {
346
-
347
- module.exports = require("@splunk/ui-utils/i18n");
348
-
349
- /***/ }),
350
-
351
- /***/ 65:
352
- /***/ (function(module, exports) {
353
-
354
- module.exports = require("@splunk/react-icons/enterprise/External");
355
-
356
- /***/ }),
357
-
358
- /***/ 96:
359
- /***/ (function(module, exports) {
360
-
361
- module.exports = require("@splunk/react-icons/ArrowSquareTopRight");
362
-
363
- /***/ })
364
-
365
- /******/ });
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
+ /******/})();