@splunk/react-ui 4.19.0 → 4.21.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.
- package/Accordion.js +114 -230
- package/Anchor.js +74 -150
- package/Animation.js +52 -124
- package/AnimationToggle.js +86 -146
- package/Box.js +77 -153
- package/Breadcrumbs.d.ts +2 -0
- package/Breadcrumbs.js +207 -0
- package/Button.js +168 -316
- package/ButtonGroup.js +84 -168
- package/ButtonSimple.js +224 -324
- package/CHANGELOG.md +35 -0
- package/Calendar.js +264 -462
- package/Card.js +223 -371
- package/CardLayout.js +87 -163
- package/Chip.js +199 -323
- package/Clickable.js +132 -248
- package/CloseButton.js +92 -200
- package/Code.js +188 -251
- package/CollapsiblePanel.js +214 -370
- package/Color.js +267 -495
- package/ColumnLayout.js +152 -254
- package/ComboBox.js +197 -371
- package/Concertina.js +214 -374
- package/ControlGroup.js +164 -288
- package/Date.js +154 -304
- package/DefinitionList.js +104 -180
- package/Divider.js +80 -156
- package/Dropdown.js +121 -263
- package/DualListbox.js +408 -601
- package/EventListener.js +70 -138
- package/File.js +343 -547
- package/FormRows.js +232 -414
- package/Heading.js +94 -164
- package/Image.js +167 -323
- package/JSONTree.js +166 -314
- package/Layer.js +221 -388
- package/Link.js +133 -239
- package/List.js +85 -161
- package/Markdown.js +230 -355
- package/Menu.js +396 -647
- package/Message.js +248 -437
- package/MessageBar.js +220 -408
- package/Modal.js +201 -365
- package/ModalLayer.js +96 -196
- package/Monogram.js +112 -204
- package/Multiselect.js +2675 -2807
- package/Number.js +178 -334
- package/Paginator.js +170 -336
- package/Paragraph.js +77 -153
- package/Popover.js +436 -623
- package/Progress.js +139 -255
- package/RadioBar.js +156 -280
- package/RadioList.js +182 -282
- package/Resize.js +173 -307
- package/ResultsMenu.js +183 -304
- package/ScreenReaderContent.js +75 -151
- package/Scroll.js +125 -267
- package/ScrollContainerContext.js +129 -201
- package/Search.js +188 -354
- package/Select.js +1243 -1248
- package/SidePanel.js +106 -214
- package/Slider.js +198 -348
- package/SlidingPanels.js +138 -280
- package/SplitButton.js +141 -273
- package/StaticContent.js +84 -168
- package/StepBar.js +138 -246
- package/Switch.js +261 -385
- package/TabBar.js +261 -398
- package/TabLayout.js +122 -238
- package/Table.js +975 -1447
- package/Text.js +335 -549
- package/TextArea.js +315 -537
- package/Tooltip.js +152 -292
- package/TransitionOpen.js +118 -242
- package/Typography.js +81 -157
- package/WaitSpinner.js +117 -209
- package/package.json +20 -21
- package/stubs-splunkui.d.ts +4 -1
- package/types/src/Breadcrumbs/Breadcrumbs.d.ts +25 -0
- package/types/src/Breadcrumbs/Item.d.ts +42 -0
- package/types/src/Breadcrumbs/docs/examples/Adornments.d.ts +2 -0
- package/types/src/Breadcrumbs/docs/examples/Basic.d.ts +2 -0
- package/types/src/Breadcrumbs/index.d.ts +2 -0
- package/types/src/Code/Code.d.ts +1 -1
- package/types/src/ComboBox/Option.d.ts +1 -1
- package/types/src/Concertina/Concertina.d.ts +4 -0
- package/types/src/Link/Link.d.ts +12 -3
- package/types/src/Link/docs/examples/NewWindow.d.ts +2 -0
- package/types/src/Markdown/Markdown.d.ts +1 -1
- package/types/src/Markdown/renderers/MarkdownHeading.d.ts +1 -1
- package/types/src/Menu/Item.d.ts +1 -1
- package/types/src/Menu/Menu.d.ts +1 -0
- package/types/src/MessageBar/docs/examples/WithActions.d.ts +2 -0
- package/types/src/Multiselect/Compact.d.ts +4 -0
- package/types/src/Multiselect/Multiselect.d.ts +5 -0
- package/types/src/Multiselect/Option.d.ts +1 -1
- package/types/src/Multiselect/docs/examples/CompactSelectAll.d.ts +2 -0
- package/types/src/Search/Option.d.ts +1 -1
- package/types/src/Select/Option.d.ts +1 -1
- package/types/src/Select/OptionBase.d.ts +1 -1
- package/types/src/Select/SelectAllOption.d.ts +14 -0
- package/types/src/Select/SelectBase.d.ts +11 -3
- package/types/src/Table/Table.d.ts +4 -0
- package/types/src/Text/Text.d.ts +3 -3
- package/types/src/TextArea/TextArea.d.ts +3 -3
- package/types/src/fixtures/FetchOptions.d.ts +2 -8
- package/useForceUpdate.js +46 -110
- package/useKeyPress.js +50 -107
- package/usePrevious.js +47 -111
- package/useRovingFocus.js +53 -133
- package/types/src/Link/docs/examples/NewTab.d.ts +0 -2
- package/types/src/Typography/docs/examples/Variants.d.ts +0 -2
- /package/types/src/Table/docs/examples/{DockedHeader.d.ts → DockedHeaderScrollbar.d.ts} +0 -0
- /package/types/src/Table/docs/examples/prisma/{DockedHeader.d.ts → DockedHeaderScrollbar.d.ts} +0 -0
package/Clickable.js
CHANGED
|
@@ -1,201 +1,102 @@
|
|
|
1
|
-
|
|
2
|
-
/******/
|
|
3
|
-
/******/ // The
|
|
4
|
-
/******/ var
|
|
5
|
-
/******/
|
|
6
|
-
|
|
7
|
-
/******/
|
|
8
|
-
/******/
|
|
9
|
-
/******/ //
|
|
10
|
-
/******/
|
|
11
|
-
/******/
|
|
12
|
-
/******/
|
|
13
|
-
/******/
|
|
14
|
-
/******/
|
|
15
|
-
/******/
|
|
16
|
-
/******/
|
|
17
|
-
/******/
|
|
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 });
|
|
18
44
|
/******/ };
|
|
19
|
-
/******/
|
|
20
|
-
/******/
|
|
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 = 196);
|
|
86
|
-
/******/ })
|
|
45
|
+
/******/ })();
|
|
46
|
+
/******/
|
|
87
47
|
/************************************************************************/
|
|
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
|
-
/***/ 10:
|
|
105
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
106
|
-
|
|
107
|
-
"use strict";
|
|
108
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return updateReactRef; });
|
|
109
|
-
/**
|
|
110
|
-
* Updates a React ref. Callback refs and object refs (from `createRef` and `useRef`) are supported.
|
|
111
|
-
*
|
|
112
|
-
* @param ref - The React callback or object ref. Can be `null` or `undefined`.
|
|
113
|
-
* @param current - The new value of the ref.
|
|
114
|
-
*/
|
|
115
|
-
function updateReactRef(ref, current) {
|
|
116
|
-
if (ref) {
|
|
117
|
-
if (typeof ref === 'function') {
|
|
118
|
-
ref(current);
|
|
119
|
-
} else {
|
|
120
|
-
// the public signature of this util uses React.Ref<T> to mirror the way React types refs.
|
|
121
|
-
// the intention here is to signal "we will take care of setting 'current', not you".
|
|
122
|
-
ref.current = current; // eslint-disable-line no-param-reassign
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
/***/ }),
|
|
130
|
-
|
|
131
|
-
/***/ 11:
|
|
132
|
-
/***/ (function(module, exports) {
|
|
133
|
-
|
|
134
|
-
module.exports = require("lodash/has");
|
|
135
|
-
|
|
136
|
-
/***/ }),
|
|
137
|
-
|
|
138
|
-
/***/ 196:
|
|
139
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
140
|
-
|
|
141
|
-
"use strict";
|
|
48
|
+
var __webpack_exports__ = {};
|
|
142
49
|
// ESM COMPAT FLAG
|
|
143
50
|
__webpack_require__.r(__webpack_exports__);
|
|
144
51
|
|
|
145
52
|
// EXPORTS
|
|
146
|
-
__webpack_require__.d(__webpack_exports__,
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
var
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
var
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
var themes_ = __webpack_require__(0);
|
|
179
|
-
|
|
180
|
-
// CONCATENATED MODULE: ./src/Clickable/ClickableStyles.ts
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
var StyledA = external_styled_components_default.a.a.withConfig({
|
|
53
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
54
|
+
NavigationContext: () => (/* reexport */ NavigationContext),
|
|
55
|
+
NavigationProvider: () => (/* reexport */ NavigationProvider),
|
|
56
|
+
"default": () => (/* reexport */ Clickable_Clickable),
|
|
57
|
+
isInternalLink: () => (/* reexport */ isInternalLink)
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
;// CONCATENATED MODULE: external "react"
|
|
61
|
+
const external_react_namespaceObject = require("react");
|
|
62
|
+
var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_namespaceObject);
|
|
63
|
+
;// CONCATENATED MODULE: external "prop-types"
|
|
64
|
+
const external_prop_types_namespaceObject = require("prop-types");
|
|
65
|
+
var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_namespaceObject);
|
|
66
|
+
;// CONCATENATED MODULE: external "lodash/has"
|
|
67
|
+
const has_namespaceObject = require("lodash/has");
|
|
68
|
+
;// CONCATENATED MODULE: external "lodash/isString"
|
|
69
|
+
const isString_namespaceObject = require("lodash/isString");
|
|
70
|
+
var isString_default = /*#__PURE__*/__webpack_require__.n(isString_namespaceObject);
|
|
71
|
+
;// CONCATENATED MODULE: external "lodash/omit"
|
|
72
|
+
const omit_namespaceObject = require("lodash/omit");
|
|
73
|
+
var omit_default = /*#__PURE__*/__webpack_require__.n(omit_namespaceObject);
|
|
74
|
+
;// CONCATENATED MODULE: external "@splunk/react-ui/Dropdown"
|
|
75
|
+
const Dropdown_namespaceObject = require("@splunk/react-ui/Dropdown");
|
|
76
|
+
;// CONCATENATED MODULE: external "styled-components"
|
|
77
|
+
const external_styled_components_namespaceObject = require("styled-components");
|
|
78
|
+
var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_namespaceObject);
|
|
79
|
+
;// CONCATENATED MODULE: external "@splunk/themes"
|
|
80
|
+
const themes_namespaceObject = require("@splunk/themes");
|
|
81
|
+
;// CONCATENATED MODULE: ./src/Clickable/ClickableStyles.ts
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
var StyledA = external_styled_components_default().a.withConfig({
|
|
184
85
|
displayName: "ClickableStyles__StyledA",
|
|
185
86
|
componentId: "sc-7al1vw-0"
|
|
186
|
-
})(["", " cursor:pointer;&[disabled]{
|
|
87
|
+
})(["", " cursor:pointer;&[disabled],&[aria-disabled='true']{color:", ";}&::-moz-focus-inner{border:0;padding:0;}"], themes_namespaceObject.mixins.reset('inline'), themes_namespaceObject.variables.contentColorDisabled);
|
|
187
88
|
|
|
188
|
-
|
|
89
|
+
;// CONCATENATED MODULE: ./src/Clickable/NavigationProvider.tsx
|
|
189
90
|
|
|
190
91
|
|
|
191
92
|
/** @public */
|
|
192
93
|
|
|
193
94
|
var propTypes = {
|
|
194
|
-
children: external_prop_types_default.
|
|
195
|
-
onClick: external_prop_types_default.
|
|
196
|
-
prefix: external_prop_types_default.
|
|
95
|
+
children: (external_prop_types_default()).node,
|
|
96
|
+
onClick: (external_prop_types_default()).func,
|
|
97
|
+
prefix: (external_prop_types_default()).string
|
|
197
98
|
};
|
|
198
|
-
var NavigationContext = /*#__PURE__*/external_react_default.
|
|
99
|
+
var NavigationContext = /*#__PURE__*/external_react_default().createContext({});
|
|
199
100
|
/**
|
|
200
101
|
* Used to provide an override for the `onClick` for links for single page applications so that
|
|
201
102
|
* internal links can navigate without a page reload.
|
|
@@ -206,7 +107,7 @@ function NavigationProvider(_ref) {
|
|
|
206
107
|
onClick = _ref.onClick,
|
|
207
108
|
prefix = _ref.prefix;
|
|
208
109
|
// @docs-props-type NavigationProviderProps
|
|
209
|
-
return /*#__PURE__*/external_react_default.
|
|
110
|
+
return /*#__PURE__*/external_react_default().createElement(NavigationContext.Provider, {
|
|
210
111
|
value: {
|
|
211
112
|
onClick: onClick,
|
|
212
113
|
prefix: prefix
|
|
@@ -216,10 +117,27 @@ function NavigationProvider(_ref) {
|
|
|
216
117
|
|
|
217
118
|
NavigationProvider.propTypes = propTypes;
|
|
218
119
|
|
|
219
|
-
|
|
220
|
-
|
|
120
|
+
;// CONCATENATED MODULE: ./src/utils/updateReactRef.ts
|
|
121
|
+
/**
|
|
122
|
+
* Updates a React ref. Callback refs and object refs (from `createRef` and `useRef`) are supported.
|
|
123
|
+
*
|
|
124
|
+
* @param ref - The React callback or object ref. Can be `null` or `undefined`.
|
|
125
|
+
* @param current - The new value of the ref.
|
|
126
|
+
*/
|
|
127
|
+
function updateReactRef(ref, current) {
|
|
128
|
+
if (ref) {
|
|
129
|
+
if (typeof ref === 'function') {
|
|
130
|
+
ref(current);
|
|
131
|
+
} else {
|
|
132
|
+
// the public signature of this util uses React.Ref<T> to mirror the way React types refs.
|
|
133
|
+
// the intention here is to signal "we will take care of setting 'current', not you".
|
|
134
|
+
ref.current = current; // eslint-disable-line no-param-reassign
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
221
139
|
|
|
222
|
-
|
|
140
|
+
;// CONCATENATED MODULE: ./src/Clickable/Clickable.tsx
|
|
223
141
|
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); }
|
|
224
142
|
|
|
225
143
|
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); }
|
|
@@ -267,14 +185,14 @@ var isInternalLink = function isInternalLink(to) {
|
|
|
267
185
|
};
|
|
268
186
|
var Clickable_propTypes = {
|
|
269
187
|
/** @private */
|
|
270
|
-
allowDisabledLink: external_prop_types_default.
|
|
271
|
-
children: external_prop_types_default.
|
|
272
|
-
disabled: external_prop_types_default.
|
|
273
|
-
elementRef: external_prop_types_default.
|
|
274
|
-
onClick: external_prop_types_default.
|
|
275
|
-
openInNewContext: external_prop_types_default.
|
|
276
|
-
navigationLabel: external_prop_types_default.
|
|
277
|
-
to: external_prop_types_default.
|
|
188
|
+
allowDisabledLink: (external_prop_types_default()).bool,
|
|
189
|
+
children: (external_prop_types_default()).node,
|
|
190
|
+
disabled: (external_prop_types_default()).bool,
|
|
191
|
+
elementRef: external_prop_types_default().oneOfType([(external_prop_types_default()).func, (external_prop_types_default()).object]),
|
|
192
|
+
onClick: (external_prop_types_default()).func,
|
|
193
|
+
openInNewContext: (external_prop_types_default()).bool,
|
|
194
|
+
navigationLabel: (external_prop_types_default()).string,
|
|
195
|
+
to: (external_prop_types_default()).string
|
|
278
196
|
};
|
|
279
197
|
var defaultProps = {
|
|
280
198
|
disabled: false,
|
|
@@ -298,7 +216,7 @@ function getPrefixedURL(to, prefix) {
|
|
|
298
216
|
*/
|
|
299
217
|
|
|
300
218
|
|
|
301
|
-
var
|
|
219
|
+
var Clickable = /*#__PURE__*/function (_Component) {
|
|
302
220
|
_inherits(Clickable, _Component);
|
|
303
221
|
|
|
304
222
|
var _super = _createSuper(Clickable);
|
|
@@ -316,7 +234,7 @@ var Clickable_Clickable = /*#__PURE__*/function (_Component) {
|
|
|
316
234
|
|
|
317
235
|
_defineProperty(_assertThisInitialized(_this), "handleMount", function (el) {
|
|
318
236
|
_this.el = el;
|
|
319
|
-
|
|
237
|
+
updateReactRef(_this.props.elementRef, el);
|
|
320
238
|
});
|
|
321
239
|
|
|
322
240
|
_defineProperty(_assertThisInitialized(_this), "createHandleOnClick", function (providedOnClick) {
|
|
@@ -386,7 +304,7 @@ var Clickable_Clickable = /*#__PURE__*/function (_Component) {
|
|
|
386
304
|
|
|
387
305
|
var target = openInNewContext ? '_blank' : undefined;
|
|
388
306
|
var rel = openInNewContext && isInternalLink(to) ? 'noopener noreferrer' : undefined;
|
|
389
|
-
return /*#__PURE__*/external_react_default.
|
|
307
|
+
return /*#__PURE__*/external_react_default().createElement(StyledA, _extends({
|
|
390
308
|
"data-test": "clickable",
|
|
391
309
|
ref: this.handleMount,
|
|
392
310
|
href: getPrefixedURL(this.props.to, prefix),
|
|
@@ -402,10 +320,12 @@ var Clickable_Clickable = /*#__PURE__*/function (_Component) {
|
|
|
402
320
|
_otherProps2 = _objectWithoutProperties(_ref, ["children"]);
|
|
403
321
|
|
|
404
322
|
if (this.props.disabled && this.props.to != null) {
|
|
405
|
-
return /*#__PURE__*/external_react_default.
|
|
323
|
+
return /*#__PURE__*/external_react_default().createElement(StyledA, _extends({
|
|
406
324
|
"data-test": "clickable",
|
|
407
|
-
ref: this.handleMount
|
|
408
|
-
|
|
325
|
+
ref: this.handleMount,
|
|
326
|
+
role: "link",
|
|
327
|
+
"aria-disabled": "true"
|
|
328
|
+
}, omit_default()(_otherProps2, 'href', 'to', 'elementRef', 'onClick', 'disabled')), _children2);
|
|
409
329
|
}
|
|
410
330
|
} // button variant
|
|
411
331
|
|
|
@@ -415,7 +335,7 @@ var Clickable_Clickable = /*#__PURE__*/function (_Component) {
|
|
|
415
335
|
type = _ref2.type,
|
|
416
336
|
otherProps = _objectWithoutProperties(_ref2, ["children", "type"]);
|
|
417
337
|
|
|
418
|
-
return /*#__PURE__*/external_react_default.
|
|
338
|
+
return /*#__PURE__*/external_react_default().createElement(StyledA, _extends({
|
|
419
339
|
as: "button",
|
|
420
340
|
"data-test": "clickable",
|
|
421
341
|
ref: this.handleMount,
|
|
@@ -426,57 +346,21 @@ var Clickable_Clickable = /*#__PURE__*/function (_Component) {
|
|
|
426
346
|
}]);
|
|
427
347
|
|
|
428
348
|
return Clickable;
|
|
429
|
-
}(
|
|
430
|
-
|
|
431
|
-
_defineProperty(Clickable_Clickable, "contextType", NavigationContext);
|
|
432
|
-
|
|
433
|
-
_defineProperty(Clickable_Clickable, "propTypes", Clickable_propTypes);
|
|
434
|
-
|
|
435
|
-
_defineProperty(Clickable_Clickable, "defaultProps", defaultProps);
|
|
436
|
-
|
|
437
|
-
_defineProperty(Clickable_Clickable, Dropdown_["legacyRefMode"], true);
|
|
438
|
-
|
|
439
|
-
/* harmony default export */ var src_Clickable_Clickable = (Clickable_Clickable);
|
|
440
|
-
// CONCATENATED MODULE: ./src/Clickable/index.ts
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
/***/ }),
|
|
446
|
-
|
|
447
|
-
/***/ 2:
|
|
448
|
-
/***/ (function(module, exports) {
|
|
449
|
-
|
|
450
|
-
module.exports = require("react");
|
|
451
|
-
|
|
452
|
-
/***/ }),
|
|
453
|
-
|
|
454
|
-
/***/ 22:
|
|
455
|
-
/***/ (function(module, exports) {
|
|
456
|
-
|
|
457
|
-
module.exports = require("@splunk/react-ui/Dropdown");
|
|
458
|
-
|
|
459
|
-
/***/ }),
|
|
460
|
-
|
|
461
|
-
/***/ 23:
|
|
462
|
-
/***/ (function(module, exports) {
|
|
463
|
-
|
|
464
|
-
module.exports = require("lodash/isString");
|
|
349
|
+
}(external_react_namespaceObject.Component);
|
|
465
350
|
|
|
466
|
-
|
|
351
|
+
_defineProperty(Clickable, "contextType", NavigationContext);
|
|
467
352
|
|
|
468
|
-
|
|
469
|
-
/***/ (function(module, exports) {
|
|
353
|
+
_defineProperty(Clickable, "propTypes", Clickable_propTypes);
|
|
470
354
|
|
|
471
|
-
|
|
355
|
+
_defineProperty(Clickable, "defaultProps", defaultProps);
|
|
472
356
|
|
|
473
|
-
|
|
357
|
+
_defineProperty(Clickable, Dropdown_namespaceObject.legacyRefMode, true);
|
|
474
358
|
|
|
475
|
-
|
|
476
|
-
|
|
359
|
+
/* harmony default export */ const Clickable_Clickable = (Clickable);
|
|
360
|
+
;// CONCATENATED MODULE: ./src/Clickable/index.ts
|
|
477
361
|
|
|
478
|
-
module.exports = require("lodash/omit");
|
|
479
362
|
|
|
480
|
-
/***/ })
|
|
481
363
|
|
|
482
|
-
|
|
364
|
+
module.exports = __webpack_exports__;
|
|
365
|
+
/******/ })()
|
|
366
|
+
;
|