@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/StaticContent.js CHANGED
@@ -1,219 +1,163 @@
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 = 236);
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
- /***/ 2:
105
- /***/ (function(module, exports) {
106
-
107
- module.exports = require("react");
108
-
109
- /***/ }),
110
-
111
- /***/ 236:
112
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
113
-
114
- "use strict";
115
- // ESM COMPAT FLAG
116
- __webpack_require__.r(__webpack_exports__);
117
-
118
- // EXPORTS
119
- __webpack_require__.d(__webpack_exports__, "default", function() { return /* reexport */ StaticContent_StaticContent; });
120
-
121
- // EXTERNAL MODULE: external "react"
122
- var external_react_ = __webpack_require__(2);
123
- var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
124
-
125
- // EXTERNAL MODULE: external "prop-types"
126
- var external_prop_types_ = __webpack_require__(1);
127
- var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
128
-
129
- // EXTERNAL MODULE: external "styled-components"
130
- var external_styled_components_ = __webpack_require__(3);
131
- var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_);
132
-
133
- // EXTERNAL MODULE: external "@splunk/react-ui/Box"
134
- var Box_ = __webpack_require__(6);
135
- var Box_default = /*#__PURE__*/__webpack_require__.n(Box_);
136
-
137
- // EXTERNAL MODULE: external "@splunk/themes"
138
- var themes_ = __webpack_require__(0);
139
-
140
- // CONCATENATED MODULE: ./src/StaticContent/StaticContentStyles.ts
141
-
142
-
143
-
144
- var StyledBox = external_styled_components_default()(Box_default.a).withConfig({
145
- displayName: "StaticContentStyles__StyledBox",
146
- componentId: "sxqyrp-0"
147
- })(["", ";position:relative;margin:0;font-weight:", ";word-wrap:break-word;min-height:", ";padding:", ";[data-inline] + &[data-inline]{margin-left:", ";}"], themes_["mixins"].reset('flex'), themes_["variables"].fontWeightSemiBold, themes_["variables"].inputHeight, Object(themes_["pick"])({
148
- enterprise: {
149
- comfortable: '6px 7px',
150
- compact: '4px 5px'
151
- },
152
- prisma: {
153
- comfortable: '10px 0',
154
- compact: '6px 0'
155
- }
156
- }), Object(themes_["pick"])({
157
- enterprise: themes_["variables"].spacingQuarter,
158
- prisma: themes_["variables"].spacingLarge
159
- }));
160
-
161
- // CONCATENATED MODULE: ./src/StaticContent/StaticContent.tsx
162
- 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); }
163
-
164
- 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; }
165
-
166
- 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; }
167
-
168
-
169
-
170
-
171
- var propTypes = {
172
- children: external_prop_types_default.a.node,
173
- elementRef: external_prop_types_default.a.oneOfType([external_prop_types_default.a.func, external_prop_types_default.a.object]),
174
- inline: external_prop_types_default.a.bool,
175
- size: external_prop_types_default.a.oneOf(['small', 'medium'])
176
- };
177
-
178
- /**
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 = r => {
12
+ /******/ var t = r && r.__esModule ?
13
+ /******/ () => r["default"]
14
+ /******/ : () => r
15
+ /******/;
16
+ e.d(t, {
17
+ a: t
18
+ });
19
+ /******/ return t;
20
+ /******/ };
21
+ /******/ })();
22
+ /******/
23
+ /******/ /* webpack/runtime/define property getters */
24
+ /******/ (() => {
25
+ /******/ // define getter functions for harmony exports
26
+ /******/ e.d = (r, t) => {
27
+ /******/ for (var n in t) {
28
+ /******/ if (e.o(t, n) && !e.o(r, n)) {
29
+ /******/ Object.defineProperty(r, n, {
30
+ enumerable: true,
31
+ get: t[n]
32
+ });
33
+ /******/ }
34
+ /******/ }
35
+ /******/ };
36
+ /******/ })();
37
+ /******/
38
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
39
+ /******/ (() => {
40
+ /******/ e.o = (e, r) => Object.prototype.hasOwnProperty.call(e, r)
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 r = {};
60
+ // ESM COMPAT FLAG
61
+ e.r(r);
62
+ // EXPORTS
63
+ e.d(r, {
64
+ default: () => /* reexport */ b
65
+ });
66
+ // CONCATENATED MODULE: external "react"
67
+ const t = require("react");
68
+ var n = e.n(t);
69
+ // CONCATENATED MODULE: external "prop-types"
70
+ const i = require("prop-types");
71
+ var o = e.n(i);
72
+ // CONCATENATED MODULE: external "styled-components"
73
+ const a = require("styled-components");
74
+ var l = e.n(a);
75
+ // CONCATENATED MODULE: external "@splunk/react-ui/Box"
76
+ const p = require("@splunk/react-ui/Box");
77
+ var c = e.n(p);
78
+ // CONCATENATED MODULE: external "@splunk/themes"
79
+ const s = require("@splunk/themes");
80
+ // CONCATENATED MODULE: ./src/StaticContent/StaticContentStyles.ts
81
+ var u = l()(c()).withConfig({
82
+ displayName: "StaticContentStyles__StyledBox",
83
+ componentId: "sxqyrp-0"
84
+ })([ "", ";position:relative;margin:0;font-weight:", ";word-wrap:break-word;min-height:", ";padding:", ";[data-inline] + &[data-inline]{margin-left:", ";}" ], s.mixins.reset("flex"), s.variables.fontWeightSemiBold, s.variables.inputHeight, (0,
85
+ s.pick)({
86
+ enterprise: {
87
+ comfortable: "6px 7px",
88
+ compact: "4px 5px"
89
+ },
90
+ prisma: {
91
+ comfortable: "10px 0",
92
+ compact: "6px 0"
93
+ }
94
+ }), (0, s.pick)({
95
+ enterprise: s.variables.spacingQuarter,
96
+ prisma: s.variables.spacingLarge
97
+ }));
98
+ // CONCATENATED MODULE: ./src/StaticContent/StaticContent.tsx
99
+ function f() {
100
+ f = Object.assign || function(e) {
101
+ for (var r = 1; r < arguments.length; r++) {
102
+ var t = arguments[r];
103
+ for (var n in t) {
104
+ if (Object.prototype.hasOwnProperty.call(t, n)) {
105
+ e[n] = t[n];
106
+ }
107
+ }
108
+ }
109
+ return e;
110
+ };
111
+ return f.apply(this, arguments);
112
+ }
113
+ function d(e, r) {
114
+ if (e == null) return {};
115
+ var t = m(e, r);
116
+ var n, i;
117
+ if (Object.getOwnPropertySymbols) {
118
+ var o = Object.getOwnPropertySymbols(e);
119
+ for (i = 0; i < o.length; i++) {
120
+ n = o[i];
121
+ if (r.indexOf(n) >= 0) continue;
122
+ if (!Object.prototype.propertyIsEnumerable.call(e, n)) continue;
123
+ t[n] = e[n];
124
+ }
125
+ }
126
+ return t;
127
+ }
128
+ function m(e, r) {
129
+ if (e == null) return {};
130
+ var t = {};
131
+ var n = Object.keys(e);
132
+ var i, o;
133
+ for (o = 0; o < n.length; o++) {
134
+ i = n[o];
135
+ if (r.indexOf(i) >= 0) continue;
136
+ t[i] = e[i];
137
+ }
138
+ return t;
139
+ }
140
+ var v = {
141
+ children: o().node,
142
+ elementRef: o().oneOfType([ o().func, o().object ]),
143
+ inline: o().bool,
144
+ size: o().oneOf([ "small", "medium" ])
145
+ };
146
+ /**
179
147
  * This component is intended for use in a control group, either to display a static value or
180
148
  * between two controls.
181
- */
182
- function StaticContent(_ref) {
183
- var children = _ref.children,
184
- _ref$inline = _ref.inline,
185
- inline = _ref$inline === void 0 ? false : _ref$inline,
186
- _ref$size = _ref.size,
187
- size = _ref$size === void 0 ? 'medium' : _ref$size,
188
- otherProps = _objectWithoutProperties(_ref, ["children", "inline", "size"]);
189
-
190
- // @docs-props-type StaticContentPropsBase
191
- return /*#__PURE__*/external_react_default.a.createElement(StyledBox, _extends({
192
- "data-test": "static-content",
193
- "data-size": size,
194
- inline: inline
195
- }, otherProps), children);
196
- }
197
-
198
- StaticContent.propTypes = propTypes;
199
- /* harmony default export */ var StaticContent_StaticContent = (StaticContent);
200
- // CONCATENATED MODULE: ./src/StaticContent/index.ts
201
-
202
-
203
- /***/ }),
204
-
205
- /***/ 3:
206
- /***/ (function(module, exports) {
207
-
208
- module.exports = require("styled-components");
209
-
210
- /***/ }),
211
-
212
- /***/ 6:
213
- /***/ (function(module, exports) {
214
-
215
- module.exports = require("@splunk/react-ui/Box");
216
-
217
- /***/ })
218
-
219
- /******/ });
149
+ */ function y(e) {
150
+ var r = e.children, t = e.inline, i = t === void 0 ? false : t, o = e.size, a = o === void 0 ? "medium" : o, l = d(e, [ "children", "inline", "size" ]);
151
+ // @docs-props-type StaticContentPropsBase
152
+
153
+ return n().createElement(u, f({
154
+ "data-test": "static-content",
155
+ "data-size": a,
156
+ inline: i
157
+ }, l), r);
158
+ }
159
+ y.propTypes = v;
160
+ /* harmony default export */ const b = y;
161
+ // CONCATENATED MODULE: ./src/StaticContent/index.ts
162
+ module.exports = r;
163
+ /******/})();