@splunk/react-ui 4.20.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.js +105 -197
- package/Button.js +168 -316
- package/ButtonGroup.js +84 -168
- package/ButtonSimple.js +224 -324
- package/CHANGELOG.md +21 -0
- package/Calendar.js +264 -462
- package/Card.js +223 -371
- package/CardLayout.js +87 -163
- package/Chip.js +199 -323
- package/Clickable.js +128 -246
- package/CloseButton.js +92 -200
- package/Code.js +162 -250
- 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 -354
- package/Menu.js +489 -760
- 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 +1135 -1761
- package/Number.js +178 -334
- package/Paginator.js +170 -336
- package/Paragraph.js +77 -153
- package/Popover.js +370 -620
- package/Progress.js +139 -255
- package/RadioBar.js +156 -280
- package/RadioList.js +182 -282
- package/Resize.js +173 -307
- package/ResultsMenu.js +161 -303
- package/ScreenReaderContent.js +75 -151
- package/Scroll.js +125 -267
- package/ScrollContainerContext.js +129 -201
- package/Search.js +188 -354
- package/Select.js +1028 -1430
- 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 +943 -1448
- 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 +14 -15
- package/stubs-splunkui.d.ts +4 -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 +7 -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/Option.d.ts +1 -1
- 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/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/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/Tooltip.js
CHANGED
|
@@ -1,189 +1,87 @@
|
|
|
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
|
+
/******/ }
|
|
18
28
|
/******/ };
|
|
19
|
-
/******/
|
|
20
|
-
/******/
|
|
21
|
-
/******/
|
|
22
|
-
/******/
|
|
23
|
-
/******/
|
|
24
|
-
/******/
|
|
25
|
-
/******/
|
|
26
|
-
/******/
|
|
27
|
-
/******/
|
|
28
|
-
/******/
|
|
29
|
-
/******/
|
|
30
|
-
/******/
|
|
31
|
-
/******/
|
|
32
|
-
/******/
|
|
33
|
-
/******/
|
|
34
|
-
/******/
|
|
35
|
-
/******/
|
|
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 = 212);
|
|
86
|
-
/******/ })
|
|
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
|
+
/******/
|
|
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
|
-
/***/ 11:
|
|
105
|
-
/***/ (function(module, exports) {
|
|
106
|
-
|
|
107
|
-
module.exports = require("lodash/has");
|
|
108
|
-
|
|
109
|
-
/***/ }),
|
|
110
|
-
|
|
111
|
-
/***/ 12:
|
|
112
|
-
/***/ (function(module, exports) {
|
|
113
|
-
|
|
114
|
-
module.exports = require("@splunk/react-ui/Clickable");
|
|
115
|
-
|
|
116
|
-
/***/ }),
|
|
117
|
-
|
|
118
|
-
/***/ 14:
|
|
119
|
-
/***/ (function(module, exports) {
|
|
120
|
-
|
|
121
|
-
module.exports = require("@splunk/react-ui/ScreenReaderContent");
|
|
122
|
-
|
|
123
|
-
/***/ }),
|
|
124
|
-
|
|
125
|
-
/***/ 2:
|
|
126
|
-
/***/ (function(module, exports) {
|
|
127
|
-
|
|
128
|
-
module.exports = require("react");
|
|
129
|
-
|
|
130
|
-
/***/ }),
|
|
131
|
-
|
|
132
|
-
/***/ 21:
|
|
133
|
-
/***/ (function(module, exports) {
|
|
134
|
-
|
|
135
|
-
module.exports = require("@splunk/react-ui/Popover");
|
|
136
|
-
|
|
137
|
-
/***/ }),
|
|
138
|
-
|
|
139
|
-
/***/ 212:
|
|
140
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
141
|
-
|
|
142
|
-
"use strict";
|
|
48
|
+
var __webpack_exports__ = {};
|
|
143
49
|
// ESM COMPAT FLAG
|
|
144
50
|
__webpack_require__.r(__webpack_exports__);
|
|
145
51
|
|
|
146
52
|
// EXPORTS
|
|
147
|
-
__webpack_require__.d(__webpack_exports__,
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
var has_default = /*#__PURE__*/__webpack_require__.n(
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
var
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
var
|
|
178
|
-
|
|
179
|
-
// EXTERNAL MODULE: external "@splunk/ui-utils/i18n"
|
|
180
|
-
var i18n_ = __webpack_require__(4);
|
|
181
|
-
|
|
182
|
-
// EXTERNAL MODULE: external "@splunk/react-icons/SVGEnterprise"
|
|
183
|
-
var SVGEnterprise_ = __webpack_require__(34);
|
|
184
|
-
var SVGEnterprise_default = /*#__PURE__*/__webpack_require__.n(SVGEnterprise_);
|
|
185
|
-
|
|
186
|
-
// CONCATENATED MODULE: ./src/Tooltip/InfoIcon.tsx
|
|
53
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
54
|
+
"default": () => (/* reexport */ Tooltip_Tooltip)
|
|
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 "lodash/has"
|
|
64
|
+
const has_namespaceObject = require("lodash/has");
|
|
65
|
+
var has_default = /*#__PURE__*/__webpack_require__.n(has_namespaceObject);
|
|
66
|
+
;// CONCATENATED MODULE: external "lodash/throttle"
|
|
67
|
+
const throttle_namespaceObject = require("lodash/throttle");
|
|
68
|
+
var throttle_default = /*#__PURE__*/__webpack_require__.n(throttle_namespaceObject);
|
|
69
|
+
;// CONCATENATED MODULE: external "@splunk/react-ui/Popover"
|
|
70
|
+
const Popover_namespaceObject = require("@splunk/react-ui/Popover");
|
|
71
|
+
var Popover_default = /*#__PURE__*/__webpack_require__.n(Popover_namespaceObject);
|
|
72
|
+
;// CONCATENATED MODULE: external "@splunk/react-ui/ScreenReaderContent"
|
|
73
|
+
const ScreenReaderContent_namespaceObject = require("@splunk/react-ui/ScreenReaderContent");
|
|
74
|
+
var ScreenReaderContent_default = /*#__PURE__*/__webpack_require__.n(ScreenReaderContent_namespaceObject);
|
|
75
|
+
;// CONCATENATED MODULE: external "@splunk/themes"
|
|
76
|
+
const themes_namespaceObject = require("@splunk/themes");
|
|
77
|
+
;// CONCATENATED MODULE: external "@splunk/ui-utils/id"
|
|
78
|
+
const id_namespaceObject = require("@splunk/ui-utils/id");
|
|
79
|
+
;// CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
|
|
80
|
+
const i18n_namespaceObject = require("@splunk/ui-utils/i18n");
|
|
81
|
+
;// CONCATENATED MODULE: external "@splunk/react-icons/SVGEnterprise"
|
|
82
|
+
const SVGEnterprise_namespaceObject = require("@splunk/react-icons/SVGEnterprise");
|
|
83
|
+
var SVGEnterprise_default = /*#__PURE__*/__webpack_require__.n(SVGEnterprise_namespaceObject);
|
|
84
|
+
;// CONCATENATED MODULE: ./src/Tooltip/InfoIcon.tsx
|
|
187
85
|
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); }
|
|
188
86
|
|
|
189
87
|
|
|
@@ -192,22 +90,22 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
192
90
|
|
|
193
91
|
|
|
194
92
|
function InfoCircle(props) {
|
|
195
|
-
var _useSplunkTheme =
|
|
93
|
+
var _useSplunkTheme = (0,themes_namespaceObject.useSplunkTheme)(),
|
|
196
94
|
family = _useSplunkTheme.family,
|
|
197
95
|
density = _useSplunkTheme.density;
|
|
198
96
|
|
|
199
97
|
if (family === 'enterprise') {
|
|
200
|
-
return /*#__PURE__*/external_react_default.
|
|
201
|
-
screenReaderText:
|
|
98
|
+
return /*#__PURE__*/external_react_default().createElement((SVGEnterprise_default()), _extends({
|
|
99
|
+
screenReaderText: (0,i18n_namespaceObject._)('Info Circle'),
|
|
202
100
|
viewBox: "0 0 24 24"
|
|
203
|
-
}, props), /*#__PURE__*/external_react_default.
|
|
101
|
+
}, props), /*#__PURE__*/external_react_default().createElement("path", {
|
|
204
102
|
fill: "currentColor",
|
|
205
103
|
d: "M12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM13.2001 8.1999C13.2001 7.53716 12.6628 6.9999 12.0001 6.9999C11.3373 6.9999 10.8001 7.53716 10.8001 8.1999C10.8001 8.86264 11.3373 9.3999 12.0001 9.3999C12.6628 9.3999 13.2001 8.86264 13.2001 8.1999ZM11.0001 16.0094V11.9999C11.0001 11.4476 11.4478 10.9999 12.0001 10.9999C12.5524 10.9999 13.0001 11.4476 13.0001 11.9999V16.0094C13.0001 16.5617 12.5524 17.0094 12.0001 17.0094C11.4478 17.0094 11.0001 16.5617 11.0001 16.0094Z"
|
|
206
104
|
}));
|
|
207
105
|
}
|
|
208
106
|
|
|
209
107
|
var size = density === 'compact' ? '20' : '24';
|
|
210
|
-
return /*#__PURE__*/external_react_default.
|
|
108
|
+
return /*#__PURE__*/external_react_default().createElement("svg", {
|
|
211
109
|
width: size,
|
|
212
110
|
height: size,
|
|
213
111
|
viewBox: "0 0 24 24",
|
|
@@ -215,76 +113,74 @@ function InfoCircle(props) {
|
|
|
215
113
|
style: {
|
|
216
114
|
display: 'block'
|
|
217
115
|
}
|
|
218
|
-
}, /*#__PURE__*/external_react_default.
|
|
116
|
+
}, /*#__PURE__*/external_react_default().createElement("path", {
|
|
219
117
|
d: "M12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM13.2003 8.1999C13.2003 7.53716 12.663 6.9999 12.0003 6.9999C11.3376 6.9999 10.8003 7.53716 10.8003 8.1999C10.8003 8.86264 11.3376 9.3999 12.0003 9.3999C12.663 9.3999 13.2003 8.86264 13.2003 8.1999ZM11.0005 16.0094V11.9999C11.0005 11.4476 11.4482 10.9999 12.0005 10.9999C12.5528 10.9999 13.0005 11.4476 13.0005 11.9999V16.0094C13.0005 16.5617 12.5528 17.0094 12.0005 17.0094C11.4482 17.0094 11.0005 16.5617 11.0005 16.0094Z",
|
|
220
118
|
fill: "currentColor",
|
|
221
119
|
fillRule: "evenodd"
|
|
222
120
|
}));
|
|
223
121
|
}
|
|
224
122
|
|
|
225
|
-
/* harmony default export */
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
var
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
// CONCATENATED MODULE: ./src/Tooltip/TooltipStyles.ts
|
|
123
|
+
/* harmony default export */ const InfoIcon = (InfoCircle);
|
|
124
|
+
;// CONCATENATED MODULE: external "styled-components"
|
|
125
|
+
const external_styled_components_namespaceObject = require("styled-components");
|
|
126
|
+
var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_namespaceObject);
|
|
127
|
+
;// CONCATENATED MODULE: external "@splunk/react-ui/Clickable"
|
|
128
|
+
const Clickable_namespaceObject = require("@splunk/react-ui/Clickable");
|
|
129
|
+
var Clickable_default = /*#__PURE__*/__webpack_require__.n(Clickable_namespaceObject);
|
|
130
|
+
;// CONCATENATED MODULE: ./src/Tooltip/TooltipStyles.ts
|
|
235
131
|
|
|
236
132
|
|
|
237
133
|
|
|
238
|
-
var
|
|
239
|
-
var Styled = external_styled_components_default.
|
|
134
|
+
var size = '16px';
|
|
135
|
+
var Styled = external_styled_components_default().span.withConfig({
|
|
240
136
|
displayName: "TooltipStyles__Styled",
|
|
241
137
|
componentId: "sc-67fvgm-0"
|
|
242
|
-
})(["", ";position:relative;"],
|
|
243
|
-
var StyledInline = external_styled_components_default.
|
|
138
|
+
})(["", ";position:relative;"], themes_namespaceObject.mixins.reset('block'));
|
|
139
|
+
var StyledInline = external_styled_components_default().span.withConfig({
|
|
244
140
|
displayName: "TooltipStyles__StyledInline",
|
|
245
141
|
componentId: "sc-67fvgm-1"
|
|
246
|
-
})(["", ";position:relative;"],
|
|
247
|
-
var StyledToggle = external_styled_components_default.
|
|
142
|
+
})(["", ";position:relative;"], themes_namespaceObject.mixins.reset('inline-block'));
|
|
143
|
+
var StyledToggle = external_styled_components_default().span.withConfig({
|
|
248
144
|
displayName: "TooltipStyles__StyledToggle",
|
|
249
145
|
componentId: "sc-67fvgm-2"
|
|
250
146
|
})(["display:block;"]);
|
|
251
|
-
var StyledToggleInline = external_styled_components_default.
|
|
147
|
+
var StyledToggleInline = external_styled_components_default().span.withConfig({
|
|
252
148
|
displayName: "TooltipStyles__StyledToggleInline",
|
|
253
149
|
componentId: "sc-67fvgm-3"
|
|
254
150
|
})(["display:inline-block;"]);
|
|
255
|
-
var StyledContent = external_styled_components_default.
|
|
151
|
+
var StyledContent = external_styled_components_default().div.withConfig({
|
|
256
152
|
displayName: "TooltipStyles__StyledContent",
|
|
257
153
|
componentId: "sc-67fvgm-4"
|
|
258
|
-
})(["padding:", ";font-size:", ";line-height:", ";user-select:none;"],
|
|
259
|
-
enterprise:
|
|
260
|
-
prisma:
|
|
154
|
+
})(["padding:", ";font-size:", ";line-height:", ";user-select:none;"], (0,themes_namespaceObject.pick)({
|
|
155
|
+
enterprise: themes_namespaceObject.variables.spacingHalf,
|
|
156
|
+
prisma: (0,themes_namespaceObject.pickVariant)('$isLabel', {
|
|
261
157
|
"false": '12px 16px',
|
|
262
158
|
"true": '4px 8px'
|
|
263
159
|
})
|
|
264
|
-
}),
|
|
265
|
-
enterprise:
|
|
160
|
+
}), (0,themes_namespaceObject.pick)({
|
|
161
|
+
enterprise: themes_namespaceObject.variables.fontSizeSmall,
|
|
266
162
|
prisma: 'inherit'
|
|
267
|
-
}),
|
|
163
|
+
}), (0,themes_namespaceObject.pick)({
|
|
268
164
|
enterprise: '18px',
|
|
269
|
-
prisma:
|
|
165
|
+
prisma: (0,themes_namespaceObject.pickVariant)('$isLabel', {
|
|
270
166
|
"false": 'inherit',
|
|
271
167
|
"true": '18px'
|
|
272
168
|
})
|
|
273
169
|
}));
|
|
274
|
-
var StyledButton = external_styled_components_default()(Clickable_default
|
|
170
|
+
var StyledButton = external_styled_components_default()((Clickable_default())).withConfig({
|
|
275
171
|
displayName: "TooltipStyles__StyledButton",
|
|
276
172
|
componentId: "sc-67fvgm-5"
|
|
277
|
-
})(["cursor:default;", " ", " &:focus{box-shadow:", ";}"],
|
|
278
|
-
enterprise:
|
|
279
|
-
prisma:
|
|
280
|
-
}),
|
|
173
|
+
})(["cursor:default;", " ", " &:focus{box-shadow:", ";}"], (0,themes_namespaceObject.pick)({
|
|
174
|
+
enterprise: (0,external_styled_components_namespaceObject.css)(["display:inline-block;width:", ";height:", ";border:2px solid ", ";border-radius:", ";font-size:", ";font-weight:", ";line-height:calc(", " - 2px);text-align:center;color:", ";vertical-align:baseline;&:not([disabled]){&:hover{text-decoration:none;}}"], size, size, themes_namespaceObject.variables.linkColor, size, themes_namespaceObject.variables.fontSizeSmall, themes_namespaceObject.variables.fontWeightSemiBold, size, themes_namespaceObject.variables.linkColor),
|
|
175
|
+
prisma: (0,external_styled_components_namespaceObject.css)(["color:", ";border-radius:50%;display:inline-block;vertical-align:middle;&:hover,&:focus{color:", ";background:", ";}"], themes_namespaceObject.variables.contentColorMuted, themes_namespaceObject.variables.contentColorActive, themes_namespaceObject.variables.interactiveColorOverlayHover)
|
|
176
|
+
}), (0,themes_namespaceObject.pick)({
|
|
281
177
|
prisma: {
|
|
282
|
-
comfortable:
|
|
283
|
-
compact:
|
|
178
|
+
comfortable: (0,external_styled_components_namespaceObject.css)(["padding:8px;"]),
|
|
179
|
+
compact: (0,external_styled_components_namespaceObject.css)(["padding:6px;"])
|
|
284
180
|
}
|
|
285
|
-
}),
|
|
181
|
+
}), themes_namespaceObject.variables.focusShadow);
|
|
286
182
|
|
|
287
|
-
|
|
183
|
+
;// CONCATENATED MODULE: ./src/Tooltip/Tooltip.tsx
|
|
288
184
|
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); }
|
|
289
185
|
|
|
290
186
|
function Tooltip_extends() { Tooltip_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 Tooltip_extends.apply(this, arguments); }
|
|
@@ -328,24 +224,24 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
328
224
|
|
|
329
225
|
var propTypes = {
|
|
330
226
|
/** @private */
|
|
331
|
-
appearance: external_prop_types_default.
|
|
332
|
-
children: external_prop_types_default.
|
|
333
|
-
closeDelay: external_prop_types_default.
|
|
227
|
+
appearance: (external_prop_types_default()).string,
|
|
228
|
+
children: (external_prop_types_default()).node,
|
|
229
|
+
closeDelay: (external_prop_types_default()).number,
|
|
334
230
|
|
|
335
231
|
/** @private */
|
|
336
|
-
closeWhen: external_prop_types_default.
|
|
337
|
-
content: external_prop_types_default.
|
|
338
|
-
contentRelationship: external_prop_types_default.
|
|
339
|
-
defaultPlacement: external_prop_types_default.
|
|
340
|
-
elementRef: external_prop_types_default.
|
|
341
|
-
inline: external_prop_types_default.
|
|
342
|
-
onRequestClose: external_prop_types_default.
|
|
343
|
-
onRequestOpen: external_prop_types_default.
|
|
344
|
-
open: external_prop_types_default.
|
|
345
|
-
openDelay: external_prop_types_default.
|
|
232
|
+
closeWhen: external_prop_types_default().oneOf(['default', 'notOnClick']),
|
|
233
|
+
content: (external_prop_types_default()).node,
|
|
234
|
+
contentRelationship: external_prop_types_default().oneOf(['label', 'description']),
|
|
235
|
+
defaultPlacement: external_prop_types_default().oneOf(['above', 'below', 'left', 'right', 'theme']),
|
|
236
|
+
elementRef: external_prop_types_default().oneOfType([(external_prop_types_default()).func, (external_prop_types_default()).object]),
|
|
237
|
+
inline: (external_prop_types_default()).bool,
|
|
238
|
+
onRequestClose: (external_prop_types_default()).func,
|
|
239
|
+
onRequestOpen: (external_prop_types_default()).func,
|
|
240
|
+
open: (external_prop_types_default()).bool,
|
|
241
|
+
openDelay: external_prop_types_default().oneOfType([external_prop_types_default().oneOf(['primary', 'secondary']), (external_prop_types_default()).number]),
|
|
346
242
|
|
|
347
243
|
/** @private */
|
|
348
|
-
splunkTheme: external_prop_types_default.
|
|
244
|
+
splunkTheme: (external_prop_types_default()).object
|
|
349
245
|
};
|
|
350
246
|
var defaultProps = {
|
|
351
247
|
appearance: 'inverted',
|
|
@@ -361,7 +257,7 @@ var defaultProps = {
|
|
|
361
257
|
* The Tooltip component wraps arbitrary content to be displayed when the target element is hovered
|
|
362
258
|
* or focused.
|
|
363
259
|
*/
|
|
364
|
-
var
|
|
260
|
+
var Tooltip = /*#__PURE__*/function (_Component) {
|
|
365
261
|
_inherits(Tooltip, _Component);
|
|
366
262
|
|
|
367
263
|
var _super = _createSuper(Tooltip);
|
|
@@ -557,8 +453,8 @@ var Tooltip_Tooltip = /*#__PURE__*/function (_Component) {
|
|
|
557
453
|
});
|
|
558
454
|
|
|
559
455
|
_this.controlledExternally = has_default()(props, 'open');
|
|
560
|
-
_this.popoverId =
|
|
561
|
-
_this.ariaId =
|
|
456
|
+
_this.popoverId = (0,id_namespaceObject.createDOMID)('popover');
|
|
457
|
+
_this.ariaId = (0,id_namespaceObject.createDOMID)('aria-id');
|
|
562
458
|
_this.state = {
|
|
563
459
|
anchorEl: null,
|
|
564
460
|
open: false,
|
|
@@ -630,32 +526,32 @@ var Tooltip_Tooltip = /*#__PURE__*/function (_Component) {
|
|
|
630
526
|
};
|
|
631
527
|
}
|
|
632
528
|
|
|
633
|
-
return /*#__PURE__*/external_react_default.
|
|
529
|
+
return /*#__PURE__*/external_react_default().createElement(StyledComp, Tooltip_extends({
|
|
634
530
|
"data-test": "tooltip",
|
|
635
531
|
"data-test-open": openRender,
|
|
636
532
|
"data-test-popover-id": this.popoverId,
|
|
637
533
|
ref: elementRef
|
|
638
|
-
}, otherProps), /*#__PURE__*/external_react_default.
|
|
534
|
+
}, otherProps), /*#__PURE__*/external_react_default().createElement(StyledToggleComp, {
|
|
639
535
|
onClick: this.handleClick,
|
|
640
536
|
onFocus: this.handleFocus,
|
|
641
537
|
onBlur: this.handleBlur,
|
|
642
538
|
ref: this.handleMount,
|
|
643
539
|
"data-test": "toggle"
|
|
644
|
-
}, hasContent && /*#__PURE__*/
|
|
540
|
+
}, hasContent && /*#__PURE__*/(0,external_react_namespaceObject.isValidElement)(children) ? /*#__PURE__*/(0,external_react_namespaceObject.cloneElement)(children, cloneProps) : children, hasContent && !children && /*#__PURE__*/external_react_default().createElement(StyledButton, {
|
|
645
541
|
"aria-describedby": this.ariaId
|
|
646
|
-
}, isPrisma ? /*#__PURE__*/external_react_default.
|
|
542
|
+
}, isPrisma ? /*#__PURE__*/external_react_default().createElement(InfoIcon, {
|
|
647
543
|
hideDefaultTooltip: true,
|
|
648
|
-
screenReaderText:
|
|
544
|
+
screenReaderText: (0,i18n_namespaceObject._)('More info'),
|
|
649
545
|
style: {
|
|
650
546
|
height: '22px',
|
|
651
547
|
width: '22px'
|
|
652
548
|
}
|
|
653
|
-
}) : /*#__PURE__*/external_react_default.
|
|
549
|
+
}) : /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/external_react_default().createElement("span", {
|
|
654
550
|
"aria-hidden": "true"
|
|
655
|
-
}, "?"), /*#__PURE__*/external_react_default.
|
|
551
|
+
}, "?"), /*#__PURE__*/external_react_default().createElement((ScreenReaderContent_default()), null, (0,i18n_namespaceObject._)('More info')))), hasContent && /*#__PURE__*/external_react_default().createElement((ScreenReaderContent_default()), {
|
|
656
552
|
"aria-hidden": "true",
|
|
657
553
|
id: this.ariaId
|
|
658
|
-
}, content)), /*#__PURE__*/external_react_default.
|
|
554
|
+
}, content)), /*#__PURE__*/external_react_default().createElement((Popover_default()), {
|
|
659
555
|
role: "tooltip",
|
|
660
556
|
align: "center",
|
|
661
557
|
anchor: anchorEl // override Popver's default animation to make it faster
|
|
@@ -674,61 +570,25 @@ var Tooltip_Tooltip = /*#__PURE__*/function (_Component) {
|
|
|
674
570
|
elementRef: this.handlePopoverMount,
|
|
675
571
|
hitAreaRef: this.handleHitAreaMount,
|
|
676
572
|
outerRef: this.handlePopoverOuterMount
|
|
677
|
-
}, /*#__PURE__*/external_react_default.
|
|
573
|
+
}, /*#__PURE__*/external_react_default().createElement(StyledContent, {
|
|
678
574
|
$isLabel: contentRelationship === 'label'
|
|
679
575
|
}, content)));
|
|
680
576
|
}
|
|
681
577
|
}]);
|
|
682
578
|
|
|
683
579
|
return Tooltip;
|
|
684
|
-
}(
|
|
685
|
-
|
|
686
|
-
_defineProperty(Tooltip_Tooltip, "propTypes", propTypes);
|
|
687
|
-
|
|
688
|
-
_defineProperty(Tooltip_Tooltip, "defaultProps", defaultProps);
|
|
689
|
-
|
|
690
|
-
var TooltipWithTheme = Object(themes_["withSplunkTheme"])(Tooltip_Tooltip);
|
|
691
|
-
TooltipWithTheme.propTypes = Tooltip_Tooltip.propTypes;
|
|
692
|
-
/* harmony default export */ var src_Tooltip_Tooltip = (TooltipWithTheme);
|
|
693
|
-
// CONCATENATED MODULE: ./src/Tooltip/index.ts
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
/***/ }),
|
|
698
|
-
|
|
699
|
-
/***/ 3:
|
|
700
|
-
/***/ (function(module, exports) {
|
|
701
|
-
|
|
702
|
-
module.exports = require("styled-components");
|
|
703
|
-
|
|
704
|
-
/***/ }),
|
|
705
|
-
|
|
706
|
-
/***/ 33:
|
|
707
|
-
/***/ (function(module, exports) {
|
|
708
|
-
|
|
709
|
-
module.exports = require("lodash/throttle");
|
|
710
|
-
|
|
711
|
-
/***/ }),
|
|
712
|
-
|
|
713
|
-
/***/ 34:
|
|
714
|
-
/***/ (function(module, exports) {
|
|
715
|
-
|
|
716
|
-
module.exports = require("@splunk/react-icons/SVGEnterprise");
|
|
717
|
-
|
|
718
|
-
/***/ }),
|
|
719
|
-
|
|
720
|
-
/***/ 4:
|
|
721
|
-
/***/ (function(module, exports) {
|
|
722
|
-
|
|
723
|
-
module.exports = require("@splunk/ui-utils/i18n");
|
|
580
|
+
}(external_react_namespaceObject.Component);
|
|
724
581
|
|
|
725
|
-
|
|
582
|
+
_defineProperty(Tooltip, "propTypes", propTypes);
|
|
726
583
|
|
|
727
|
-
|
|
728
|
-
/***/ (function(module, exports) {
|
|
584
|
+
_defineProperty(Tooltip, "defaultProps", defaultProps);
|
|
729
585
|
|
|
730
|
-
|
|
586
|
+
var TooltipWithTheme = (0,themes_namespaceObject.withSplunkTheme)(Tooltip);
|
|
587
|
+
TooltipWithTheme.propTypes = Tooltip.propTypes;
|
|
588
|
+
/* harmony default export */ const Tooltip_Tooltip = (TooltipWithTheme);
|
|
589
|
+
;// CONCATENATED MODULE: ./src/Tooltip/index.ts
|
|
731
590
|
|
|
732
|
-
/***/ })
|
|
733
591
|
|
|
734
|
-
|
|
592
|
+
module.exports = __webpack_exports__;
|
|
593
|
+
/******/ })()
|
|
594
|
+
;
|