@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.
- package/Accordion.js +425 -441
- package/Anchor.js +147 -193
- package/Animation.js +142 -166
- package/AnimationToggle.js +197 -253
- package/Box.js +145 -194
- package/Breadcrumbs.js +288 -298
- package/Button.js +488 -613
- package/ButtonGroup.js +160 -212
- package/ButtonSimple.js +543 -562
- package/CHANGELOG.md +26 -0
- package/Calendar.js +1107 -1195
- package/Card.js +771 -746
- package/CardLayout.js +205 -223
- package/Chip.js +509 -612
- package/Clickable.js +416 -472
- package/CloseButton.js +165 -250
- package/Code.js +1808 -2172
- package/Code.js.LICENSE.txt +8 -0
- package/CollapsiblePanel.js +586 -675
- package/Color.js +1066 -1297
- package/ColumnLayout.js +402 -465
- package/ComboBox.js +892 -969
- package/Concertina.js +998 -963
- package/ControlGroup.js +687 -718
- package/Date.js +567 -697
- package/DefinitionList.js +308 -310
- package/Divider.js +149 -194
- package/Dropdown.js +459 -558
- package/DualListbox.js +1480 -1735
- package/EventListener.js +94 -165
- package/File.js +1051 -1173
- package/FormRows.js +885 -880
- package/Heading.js +216 -263
- package/Image.js +446 -558
- package/JSONTree.js +690 -699
- package/Layer.js +442 -582
- package/Link.js +336 -361
- package/List.js +213 -237
- package/Markdown.js +510 -612
- package/Menu.js +1109 -1331
- package/Message.js +474 -629
- package/MessageBar.js +387 -561
- package/Modal.js +810 -798
- package/ModalLayer.js +326 -343
- package/Monogram.js +308 -368
- package/Multiselect.js +3558 -3998
- package/Number.js +729 -843
- package/Paginator.js +510 -615
- package/Paragraph.js +145 -188
- package/Popover.js +1470 -1693
- package/Progress.js +301 -362
- package/RadioBar.js +610 -651
- package/RadioList.js +483 -544
- package/Resize.js +530 -623
- package/ResultsMenu.js +494 -597
- package/ScreenReaderContent.js +142 -187
- package/Scroll.js +595 -598
- package/ScrollContainerContext.js +197 -278
- package/Search.js +745 -817
- package/Select.js +2441 -2746
- package/SidePanel.js +390 -392
- package/Slider.js +668 -825
- package/SlidingPanels.js +639 -645
- package/SplitButton.js +464 -499
- package/StaticContent.js +161 -217
- package/StepBar.js +386 -466
- package/Switch.js +710 -764
- package/TabBar.js +724 -815
- package/TabLayout.js +406 -438
- package/Table.js +4842 -5121
- package/Text.js +1169 -1351
- package/TextArea.js +1097 -1307
- package/Tooltip.js +624 -721
- package/TransitionOpen.js +489 -546
- package/Typography.js +176 -229
- package/WaitSpinner.js +230 -298
- 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/JSONTree/JSONTreeContext.d.ts +7 -0
- package/types/src/JSONTree/TreeNode.d.ts +5 -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 +112 -146
- package/useKeyPress.js +74 -128
- package/usePrevious.js +65 -129
- package/useRovingFocus.js +122 -218
- 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/useKeyPress.js
CHANGED
|
@@ -1,102 +1,58 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/******/
|
|
4
|
-
/******/
|
|
5
|
-
/******/
|
|
6
|
-
/******/
|
|
7
|
-
|
|
8
|
-
/******/
|
|
9
|
-
/******/
|
|
10
|
-
/******/
|
|
11
|
-
/******/
|
|
12
|
-
/******/
|
|
13
|
-
/******/
|
|
14
|
-
/******/
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
/******/
|
|
19
|
-
/******/
|
|
20
|
-
/******/
|
|
21
|
-
/******/
|
|
22
|
-
/******/
|
|
23
|
-
/******/
|
|
24
|
-
/******/
|
|
25
|
-
/******/
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
/******/
|
|
29
|
-
/******/
|
|
30
|
-
/******/
|
|
31
|
-
/******/
|
|
32
|
-
/******/
|
|
33
|
-
/******/
|
|
34
|
-
/******/
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
/******/
|
|
38
|
-
/******/
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
/******/
|
|
42
|
-
/******/
|
|
43
|
-
/******/
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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 = 169);
|
|
86
|
-
/******/ })
|
|
87
|
-
/************************************************************************/
|
|
88
|
-
/******/ ({
|
|
89
|
-
|
|
90
|
-
/***/ 169:
|
|
91
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
92
|
-
|
|
93
|
-
"use strict";
|
|
94
|
-
__webpack_require__.r(__webpack_exports__);
|
|
95
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useKeyPress", function() { return useKeyPress; });
|
|
96
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
|
97
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
98
|
-
|
|
99
|
-
/**
|
|
1
|
+
/******/ (() => {
|
|
2
|
+
// webpackBootstrap
|
|
3
|
+
/******/ "use strict";
|
|
4
|
+
/******/ // The require scope
|
|
5
|
+
/******/ var e = {};
|
|
6
|
+
/******/
|
|
7
|
+
/************************************************************************/
|
|
8
|
+
/******/ /* webpack/runtime/define property getters */
|
|
9
|
+
/******/ (() => {
|
|
10
|
+
/******/ // define getter functions for harmony exports
|
|
11
|
+
/******/ e.d = (t, r) => {
|
|
12
|
+
/******/ for (var n in r) {
|
|
13
|
+
/******/ if (e.o(r, n) && !e.o(t, n)) {
|
|
14
|
+
/******/ Object.defineProperty(t, n, {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: r[n]
|
|
17
|
+
});
|
|
18
|
+
/******/ }
|
|
19
|
+
/******/ }
|
|
20
|
+
/******/ };
|
|
21
|
+
/******/ })();
|
|
22
|
+
/******/
|
|
23
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
24
|
+
/******/ (() => {
|
|
25
|
+
/******/ e.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t)
|
|
26
|
+
/******/;
|
|
27
|
+
})();
|
|
28
|
+
/******/
|
|
29
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
30
|
+
/******/ (() => {
|
|
31
|
+
/******/ // define __esModule on exports
|
|
32
|
+
/******/ e.r = e => {
|
|
33
|
+
/******/ if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
|
|
34
|
+
/******/ Object.defineProperty(e, Symbol.toStringTag, {
|
|
35
|
+
value: "Module"
|
|
36
|
+
});
|
|
37
|
+
/******/ }
|
|
38
|
+
/******/ Object.defineProperty(e, "__esModule", {
|
|
39
|
+
value: true
|
|
40
|
+
});
|
|
41
|
+
/******/ };
|
|
42
|
+
/******/ })();
|
|
43
|
+
/******/
|
|
44
|
+
/************************************************************************/ var t = {};
|
|
45
|
+
// ESM COMPAT FLAG
|
|
46
|
+
e.r(t);
|
|
47
|
+
// EXPORTS
|
|
48
|
+
e.d(t, {
|
|
49
|
+
default: () => /* binding */ o,
|
|
50
|
+
useKeyPress: () => /* binding */ n
|
|
51
|
+
});
|
|
52
|
+
// CONCATENATED MODULE: external "react"
|
|
53
|
+
const r = require("react");
|
|
54
|
+
// CONCATENATED MODULE: ./src/useKeyPress/index.ts
|
|
55
|
+
/**
|
|
100
56
|
* TargetKey is any key available via event.key: [https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key).
|
|
101
57
|
*
|
|
102
58
|
* This example shows a simple function by pressing the arrow up key.
|
|
@@ -128,33 +84,23 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
128
84
|
* @param {Function} handler - A function invoked when the target key is pressed.
|
|
129
85
|
* @public
|
|
130
86
|
*/
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
87
|
+
function n(e, t) {
|
|
88
|
+
var n = (0, r.useCallback)((function(r) {
|
|
89
|
+
if (r.key === e) {
|
|
90
|
+
t(r);
|
|
91
|
+
r.preventDefault();
|
|
92
|
+
}
|
|
93
|
+
}), [ t, e ]);
|
|
94
|
+
// eslint-disable-next-line consistent-return
|
|
95
|
+
(0, r.useEffect)((function() {
|
|
96
|
+
if (typeof window !== "undefined") {
|
|
97
|
+
window.addEventListener("keyup", n);
|
|
98
|
+
return function() {
|
|
99
|
+
window.removeEventListener("keyup", n);
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
}), [ n ]);
|
|
137
103
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
if (typeof window !== 'undefined') {
|
|
142
|
-
window.addEventListener('keyup', handleKeyUp);
|
|
143
|
-
return function () {
|
|
144
|
-
window.removeEventListener('keyup', handleKeyUp);
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
|
-
}, [handleKeyUp]);
|
|
148
|
-
}
|
|
149
|
-
/* harmony default export */ __webpack_exports__["default"] = (useKeyPress);
|
|
150
|
-
|
|
151
|
-
/***/ }),
|
|
152
|
-
|
|
153
|
-
/***/ 2:
|
|
154
|
-
/***/ (function(module, exports) {
|
|
155
|
-
|
|
156
|
-
module.exports = require("react");
|
|
157
|
-
|
|
158
|
-
/***/ })
|
|
159
|
-
|
|
160
|
-
/******/ });
|
|
104
|
+
/* harmony default export */ const o = n;
|
|
105
|
+
module.exports = t;
|
|
106
|
+
/******/})();
|
package/usePrevious.js
CHANGED
|
@@ -1,115 +1,57 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/******/
|
|
4
|
-
/******/
|
|
5
|
-
/******/
|
|
6
|
-
/******/
|
|
7
|
-
|
|
8
|
-
/******/
|
|
9
|
-
/******/
|
|
10
|
-
/******/
|
|
11
|
-
/******/
|
|
12
|
-
/******/
|
|
13
|
-
/******/
|
|
14
|
-
/******/
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
/******/
|
|
19
|
-
/******/
|
|
20
|
-
/******/
|
|
21
|
-
/******/
|
|
22
|
-
/******/
|
|
23
|
-
/******/
|
|
24
|
-
/******/
|
|
25
|
-
/******/
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
/******/
|
|
29
|
-
/******/
|
|
30
|
-
/******/
|
|
31
|
-
/******/
|
|
32
|
-
/******/
|
|
33
|
-
/******/
|
|
34
|
-
/******/
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
/******/
|
|
38
|
-
/******/
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
/******/
|
|
42
|
-
/******/
|
|
43
|
-
/******/
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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 = 245);
|
|
86
|
-
/******/ })
|
|
87
|
-
/************************************************************************/
|
|
88
|
-
/******/ ({
|
|
89
|
-
|
|
90
|
-
/***/ 2:
|
|
91
|
-
/***/ (function(module, exports) {
|
|
92
|
-
|
|
93
|
-
module.exports = require("react");
|
|
94
|
-
|
|
95
|
-
/***/ }),
|
|
96
|
-
|
|
97
|
-
/***/ 245:
|
|
98
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
99
|
-
|
|
100
|
-
"use strict";
|
|
101
|
-
// ESM COMPAT FLAG
|
|
102
|
-
__webpack_require__.r(__webpack_exports__);
|
|
103
|
-
|
|
104
|
-
// EXPORTS
|
|
105
|
-
__webpack_require__.d(__webpack_exports__, "default", function() { return /* reexport */ usePrevious_usePrevious; });
|
|
106
|
-
|
|
107
|
-
// EXTERNAL MODULE: external "react"
|
|
108
|
-
var external_react_ = __webpack_require__(2);
|
|
109
|
-
|
|
110
|
-
// CONCATENATED MODULE: ./src/usePrevious/usePrevious.tsx
|
|
111
|
-
|
|
112
|
-
/**
|
|
1
|
+
/******/ (() => {
|
|
2
|
+
// webpackBootstrap
|
|
3
|
+
/******/ "use strict";
|
|
4
|
+
/******/ // The require scope
|
|
5
|
+
/******/ var e = {};
|
|
6
|
+
/******/
|
|
7
|
+
/************************************************************************/
|
|
8
|
+
/******/ /* webpack/runtime/define property getters */
|
|
9
|
+
/******/ (() => {
|
|
10
|
+
/******/ // define getter functions for harmony exports
|
|
11
|
+
/******/ e.d = (r, t) => {
|
|
12
|
+
/******/ for (var o in t) {
|
|
13
|
+
/******/ if (e.o(t, o) && !e.o(r, o)) {
|
|
14
|
+
/******/ Object.defineProperty(r, o, {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: t[o]
|
|
17
|
+
});
|
|
18
|
+
/******/ }
|
|
19
|
+
/******/ }
|
|
20
|
+
/******/ };
|
|
21
|
+
/******/ })();
|
|
22
|
+
/******/
|
|
23
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
24
|
+
/******/ (() => {
|
|
25
|
+
/******/ e.o = (e, r) => Object.prototype.hasOwnProperty.call(e, r)
|
|
26
|
+
/******/;
|
|
27
|
+
})();
|
|
28
|
+
/******/
|
|
29
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
30
|
+
/******/ (() => {
|
|
31
|
+
/******/ // define __esModule on exports
|
|
32
|
+
/******/ e.r = e => {
|
|
33
|
+
/******/ if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
|
|
34
|
+
/******/ Object.defineProperty(e, Symbol.toStringTag, {
|
|
35
|
+
value: "Module"
|
|
36
|
+
});
|
|
37
|
+
/******/ }
|
|
38
|
+
/******/ Object.defineProperty(e, "__esModule", {
|
|
39
|
+
value: true
|
|
40
|
+
});
|
|
41
|
+
/******/ };
|
|
42
|
+
/******/ })();
|
|
43
|
+
/******/
|
|
44
|
+
/************************************************************************/ var r = {};
|
|
45
|
+
// ESM COMPAT FLAG
|
|
46
|
+
e.r(r);
|
|
47
|
+
// EXPORTS
|
|
48
|
+
e.d(r, {
|
|
49
|
+
default: () => /* reexport */ n
|
|
50
|
+
});
|
|
51
|
+
// CONCATENATED MODULE: external "react"
|
|
52
|
+
const t = require("react");
|
|
53
|
+
// CONCATENATED MODULE: ./src/usePrevious/usePrevious.tsx
|
|
54
|
+
/**
|
|
113
55
|
* This is a private component not intended for use outside @splunk/react-ui
|
|
114
56
|
*
|
|
115
57
|
* Keeps the previous version of a value. Useful for emulating the "prevState"
|
|
@@ -118,20 +60,14 @@ var external_react_ = __webpack_require__(2);
|
|
|
118
60
|
*
|
|
119
61
|
* @param value - The value to store
|
|
120
62
|
*/
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
/***/ })
|
|
136
|
-
|
|
137
|
-
/******/ });
|
|
63
|
+
function o(e) {
|
|
64
|
+
var r = (0, t.useRef)();
|
|
65
|
+
(0, t.useEffect)((function() {
|
|
66
|
+
r.current = e;
|
|
67
|
+
}), [ e ]);
|
|
68
|
+
return r.current;
|
|
69
|
+
}
|
|
70
|
+
/* harmony default export */ const n = o;
|
|
71
|
+
// CONCATENATED MODULE: ./src/usePrevious/index.ts
|
|
72
|
+
module.exports = r;
|
|
73
|
+
/******/})();
|