@splunk/react-ui 4.12.1 → 4.13.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 +4 -4
- package/Anchor.js +2 -2
- package/Animation.js +4 -4
- package/AnimationToggle.js +2 -2
- package/Box.js +2 -2
- package/Button.js +9 -9
- package/ButtonGroup.js +2 -2
- package/ButtonSimple.js +7 -7
- package/CHANGELOG.md +18 -0
- package/Calendar.js +31 -31
- package/Card.js +13 -13
- package/CardLayout.js +2 -2
- package/Chip.js +11 -11
- package/Clickable.js +7 -7
- package/CloseButton.js +11 -11
- package/Code.js +4 -4
- package/CollapsiblePanel.js +4 -4
- package/Color.js +21 -21
- package/ColumnLayout.js +4 -4
- package/ComboBox.js +2 -2
- package/Concertina.js +2 -2
- package/ControlGroup.js +4 -4
- package/Date.js +4 -4
- package/DefinitionList.js +2 -2
- package/Dropdown.js +6 -2
- package/EventListener.js +4 -4
- package/File.js +15 -15
- package/FormRows.js +4 -4
- package/Heading.js +2 -2
- package/Image.js +15 -15
- package/JSONTree.js +2 -2
- package/Layer.js +4 -4
- package/Link.js +9 -9
- package/List.js +2 -2
- package/Markdown.js +16 -16
- package/Menu.js +29 -30
- package/Message.js +17 -17
- package/MessageBar.js +15 -15
- package/Modal.js +4 -4
- package/ModalLayer.js +6 -6
- package/Monogram.js +2 -2
- package/Multiselect.js +87 -78
- package/Number.js +2 -2
- package/Paginator.js +39 -39
- package/Paragraph.js +2 -2
- package/Popover.js +16 -7
- package/Progress.js +4 -4
- package/RadioBar.js +2 -2
- package/RadioList.js +2 -2
- package/Resize.js +2 -2
- package/ResultsMenu.js +12 -12
- package/ScreenReaderContent.js +2 -2
- package/Scroll.js +4 -4
- package/ScrollContainerContext.js +2 -2
- package/Search.js +11 -11
- package/Select.js +85 -76
- package/SidePanel.js +4 -4
- package/Slider.js +4 -4
- package/SlidingPanels.js +4 -4
- package/SplitButton.js +511 -0
- package/StaticContent.js +2 -2
- package/StepBar.js +6 -6
- package/Switch.js +2 -2
- package/TabBar.js +2 -2
- package/TabLayout.js +4 -4
- package/Table.js +57 -40
- package/Text.js +29 -21
- package/TextArea.js +21 -13
- package/Tooltip.js +2 -2
- package/TransitionOpen.js +4 -4
- package/Typography.js +4 -4
- package/WaitSpinner.js +68 -2
- package/package.json +3 -3
- package/types/src/Button/Button.d.ts +1 -1
- package/types/src/Dropdown/Dropdown.d.ts +11 -3
- package/types/src/Popover/Popover.d.ts +5 -1
- package/types/src/Popover/getPlacement.d.ts +1 -1
- package/types/src/SplitButton/Item.d.ts +45 -0
- package/types/src/SplitButton/SplitButton.d.ts +41 -0
- package/types/src/SplitButton/docs/examples/Basic.d.ts +1 -0
- package/types/src/SplitButton/docs/examples/ChangeLabel.d.ts +1 -0
- package/types/src/SplitButton/docs/examples/Disabled.d.ts +1 -0
- package/types/src/SplitButton/docs/examples/prisma/Basic.d.ts +1 -0
- package/types/src/SplitButton/docs/examples/prisma/Disabled.d.ts +1 -0
- package/types/src/SplitButton/index.d.ts +2 -0
- package/types/src/Table/HeadCell.d.ts +4 -1
- package/types/src/Table/HeadDropdownCell.d.ts +10 -3
- package/types/src/Text/Text.d.ts +5 -1
- package/types/src/TextArea/TextArea.d.ts +5 -1
- package/types/src/WaitSpinner/WaitSpinner.d.ts +1 -1
- package/types/src/useForceUpdate/index.d.ts +2 -0
- package/types/src/useForceUpdate/useForceUpdate.d.ts +9 -0
- package/types/src/useIsSsr/index.d.ts +2 -0
- package/types/src/useIsSsr/useIsSsr.d.ts +8 -0
- package/useForceUpdate.js +151 -0
- package/useIsSsr.js +153 -0
- package/usePrevious.js +2 -2
package/useIsSsr.js
ADDED
|
@@ -0,0 +1,153 @@
|
|
|
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 = 80);
|
|
86
|
+
/******/ })
|
|
87
|
+
/************************************************************************/
|
|
88
|
+
/******/ ({
|
|
89
|
+
|
|
90
|
+
/***/ 2:
|
|
91
|
+
/***/ (function(module, exports) {
|
|
92
|
+
|
|
93
|
+
module.exports = require("react");
|
|
94
|
+
|
|
95
|
+
/***/ }),
|
|
96
|
+
|
|
97
|
+
/***/ 80:
|
|
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 */ src_useIsSsr_useIsSsr; });
|
|
106
|
+
|
|
107
|
+
// EXTERNAL MODULE: external "react"
|
|
108
|
+
var external_react_ = __webpack_require__(2);
|
|
109
|
+
|
|
110
|
+
// CONCATENATED MODULE: ./src/useIsSsr/useIsSsr.tsx
|
|
111
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
112
|
+
|
|
113
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
114
|
+
|
|
115
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
116
|
+
|
|
117
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
118
|
+
|
|
119
|
+
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
120
|
+
|
|
121
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* This is a private component not intended for use outside @splunk/react-ui
|
|
126
|
+
*
|
|
127
|
+
* Checks if the application is server side rendered and returns boolean
|
|
128
|
+
* to be used in components that utilize "window" or "document" objects.
|
|
129
|
+
*/
|
|
130
|
+
|
|
131
|
+
var useIsSsr_useIsSsr = function useIsSsr() {
|
|
132
|
+
// we always start off in "SSR mode", to ensure our initial browser render
|
|
133
|
+
var _useState = Object(external_react_["useState"])(true),
|
|
134
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
135
|
+
isSsr = _useState2[0],
|
|
136
|
+
setIsSsr = _useState2[1];
|
|
137
|
+
|
|
138
|
+
Object(external_react_["useEffect"])(function () {
|
|
139
|
+
// `useEffect` never runs on the server, so we must be on the client if
|
|
140
|
+
// we hit this block
|
|
141
|
+
setIsSsr(false);
|
|
142
|
+
}, []);
|
|
143
|
+
return isSsr;
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
/* harmony default export */ var src_useIsSsr_useIsSsr = (useIsSsr_useIsSsr);
|
|
147
|
+
// CONCATENATED MODULE: ./src/useIsSsr/index.ts
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
/***/ })
|
|
152
|
+
|
|
153
|
+
/******/ });
|
package/usePrevious.js
CHANGED
|
@@ -82,12 +82,12 @@ module.exports =
|
|
|
82
82
|
/******/
|
|
83
83
|
/******/
|
|
84
84
|
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 184);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
89
89
|
|
|
90
|
-
/***/
|
|
90
|
+
/***/ 184:
|
|
91
91
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
92
92
|
|
|
93
93
|
"use strict";
|