@splunk/react-ui 4.21.0 → 4.22.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 +425 -325
- package/Anchor.js +147 -117
- package/Animation.js +142 -94
- package/AnimationToggle.js +197 -193
- package/Box.js +145 -118
- package/Breadcrumbs.js +288 -206
- package/Button.js +488 -465
- package/ButtonGroup.js +160 -128
- package/ButtonSimple.js +543 -462
- package/CHANGELOG.md +24 -3
- package/Calendar.js +1111 -1001
- package/Card.js +771 -598
- package/CardLayout.js +205 -147
- package/Chip.js +509 -488
- package/Clickable.js +414 -352
- package/CloseButton.js +165 -142
- package/Code.js +1807 -2084
- package/CollapsiblePanel.js +586 -519
- package/Color.js +1068 -1068
- package/ColumnLayout.js +402 -363
- package/ComboBox.js +903 -794
- package/Concertina.js +997 -802
- package/ControlGroup.js +687 -594
- package/Date.js +567 -547
- package/DefinitionList.js +308 -234
- package/Divider.js +149 -118
- package/Dropdown.js +459 -416
- package/DualListbox.js +1479 -1541
- package/EventListener.js +94 -97
- package/File.js +1051 -969
- package/FormRows.js +883 -696
- package/Heading.js +216 -193
- package/Image.js +446 -402
- package/JSONTree.js +690 -551
- package/Layer.js +437 -410
- package/Link.js +336 -255
- package/List.js +213 -161
- package/Markdown.js +509 -487
- package/Menu.js +1104 -1056
- package/Message.js +475 -441
- package/MessageBar.js +387 -373
- package/Modal.js +810 -634
- package/ModalLayer.js +326 -243
- package/Monogram.js +308 -276
- package/Multiselect.js +3564 -3364
- package/Number.js +729 -687
- package/Paginator.js +510 -449
- package/Paragraph.js +145 -112
- package/Popover.js +1459 -1432
- package/Progress.js +301 -246
- package/RadioBar.js +634 -527
- package/RadioList.js +483 -444
- package/Resize.js +530 -489
- package/ResultsMenu.js +479 -455
- package/ScreenReaderContent.js +142 -111
- package/Scroll.js +595 -456
- package/ScrollContainerContext.js +197 -206
- package/Search.js +756 -650
- package/Select.js +2446 -2345
- package/SidePanel.js +390 -284
- package/Slider.js +680 -676
- package/SlidingPanels.js +639 -503
- package/SplitButton.js +464 -367
- package/StaticContent.js +161 -133
- package/StepBar.js +386 -358
- package/Switch.js +710 -640
- package/TabBar.js +741 -680
- package/TabLayout.js +406 -322
- package/Table.js +4974 -4616
- package/Text.js +1170 -1138
- package/TextArea.js +1102 -1090
- package/Tooltip.js +624 -581
- package/TransitionOpen.js +489 -422
- package/Typography.js +176 -153
- package/WaitSpinner.js +230 -206
- package/package.json +7 -7
- package/types/src/Color/Color.d.ts +0 -1
- package/types/src/JSONTree/JSONTreeContext.d.ts +7 -0
- package/types/src/JSONTree/TreeNode.d.ts +5 -0
- package/types/src/RadioBar/RadioBar.d.ts +1 -0
- package/types/src/ResultsMenu/ResultsMenu.d.ts +0 -2
- package/types/src/Select/docs/examples/Icons.d.ts +1 -9
- package/types/src/Slider/Slider.d.ts +1 -0
- package/types/src/TabBar/Tab.d.ts +10 -1
- package/types/src/TabBar/TabBar.d.ts +4 -2
- package/types/src/Table/Head.d.ts +7 -3
- package/types/src/Table/Table.d.ts +3 -2
- package/types/src/Table/TableContext.d.ts +2 -0
- package/useForceUpdate.js +112 -82
- package/useKeyPress.js +74 -71
- package/usePrevious.js +65 -65
- package/useRovingFocus.js +122 -138
package/SidePanel.js
CHANGED
|
@@ -1,287 +1,393 @@
|
|
|
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
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
var
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
var keys_default = /*#__PURE__*/__webpack_require__.n(keys_namespaceObject);
|
|
66
|
-
;// CONCATENATED MODULE: external "lodash/omit"
|
|
67
|
-
const omit_namespaceObject = require("lodash/omit");
|
|
68
|
-
var omit_default = /*#__PURE__*/__webpack_require__.n(omit_namespaceObject);
|
|
69
|
-
;// CONCATENATED MODULE: external "@splunk/react-ui/ModalLayer"
|
|
70
|
-
const ModalLayer_namespaceObject = require("@splunk/react-ui/ModalLayer");
|
|
71
|
-
var ModalLayer_default = /*#__PURE__*/__webpack_require__.n(ModalLayer_namespaceObject);
|
|
72
|
-
;// CONCATENATED MODULE: external "styled-components"
|
|
73
|
-
const external_styled_components_namespaceObject = require("styled-components");
|
|
74
|
-
var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_namespaceObject);
|
|
75
|
-
;// CONCATENATED MODULE: external "@splunk/react-ui/TransitionOpen"
|
|
76
|
-
const TransitionOpen_namespaceObject = require("@splunk/react-ui/TransitionOpen");
|
|
77
|
-
var TransitionOpen_default = /*#__PURE__*/__webpack_require__.n(TransitionOpen_namespaceObject);
|
|
78
|
-
;// CONCATENATED MODULE: external "@splunk/themes"
|
|
79
|
-
const themes_namespaceObject = require("@splunk/themes");
|
|
80
|
-
;// CONCATENATED MODULE: ./src/SidePanel/SidePanelStyles.ts
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
var panel = (0,external_styled_components_namespaceObject.css)(["", " position:fixed;flex-direction:column;box-shadow:", ";background-color:", ";z-index:", ";"], themes_namespaceObject.mixins.reset('flex'), (0,themes_namespaceObject.pick)({
|
|
85
|
-
enterprise: '0 0 12px rgba(0, 0, 0, 0.3)',
|
|
86
|
-
prisma: themes_namespaceObject.variables.overlayShadow
|
|
87
|
-
}), themes_namespaceObject.variables.backgroundColorSidebar, themes_namespaceObject.variables.zindexModal);
|
|
88
|
-
var StyledLeftPanelTransitionOpen = external_styled_components_default()((TransitionOpen_default())).withConfig({
|
|
89
|
-
displayName: "SidePanelStyles__StyledLeftPanelTransitionOpen",
|
|
90
|
-
componentId: "mtbcuz-0"
|
|
91
|
-
})(["", ";top:0;left:0;height:100vh;"], panel);
|
|
92
|
-
var StyledRightPanelTransitionOpen = external_styled_components_default()((TransitionOpen_default())).withConfig({
|
|
93
|
-
displayName: "SidePanelStyles__StyledRightPanelTransitionOpen",
|
|
94
|
-
componentId: "mtbcuz-1"
|
|
95
|
-
})(["", ";right:0;top:0;height:100vh;"], panel);
|
|
96
|
-
var StyledTopPanelTransitionOpen = external_styled_components_default()((TransitionOpen_default())).withConfig({
|
|
97
|
-
displayName: "SidePanelStyles__StyledTopPanelTransitionOpen",
|
|
98
|
-
componentId: "mtbcuz-2"
|
|
99
|
-
})(["", ";top:0;left:0;width:100vw;"], panel);
|
|
100
|
-
var StyledBottomPanelTransitionOpen = external_styled_components_default()((TransitionOpen_default())).withConfig({
|
|
101
|
-
displayName: "SidePanelStyles__StyledBottomPanelTransitionOpen",
|
|
102
|
-
componentId: "mtbcuz-3"
|
|
103
|
-
})(["", ";left:0;bottom:0;width:100vw;"], panel);
|
|
104
|
-
|
|
105
|
-
;// CONCATENATED MODULE: ./src/SidePanel/SidePanel.tsx
|
|
106
|
-
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); }
|
|
107
|
-
|
|
108
|
-
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); }
|
|
109
|
-
|
|
110
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
111
|
-
|
|
112
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
113
|
-
|
|
114
|
-
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); }
|
|
115
|
-
|
|
116
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
|
|
117
|
-
|
|
118
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
119
|
-
|
|
120
|
-
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; }
|
|
121
|
-
|
|
122
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
123
|
-
|
|
124
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
125
|
-
|
|
126
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
127
|
-
|
|
128
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
129
|
-
|
|
130
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
131
|
-
|
|
132
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
133
|
-
|
|
134
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
135
|
-
|
|
136
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
137
|
-
|
|
138
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
139
|
-
|
|
140
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
141
|
-
|
|
142
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
143
|
-
|
|
144
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
145
|
-
|
|
146
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
var propTypes = {
|
|
155
|
-
children: (external_prop_types_default()).node,
|
|
156
|
-
dockPosition: external_prop_types_default().oneOf(['top', 'bottom', 'left', 'right']),
|
|
157
|
-
innerClassName: (external_prop_types_default()).string,
|
|
158
|
-
innerStyle: (external_prop_types_default()).object,
|
|
159
|
-
onAnimationEnd: (external_prop_types_default()).func,
|
|
160
|
-
onRequestClose: (external_prop_types_default()).func,
|
|
161
|
-
open: (external_prop_types_default()).bool,
|
|
162
|
-
outerClassName: (external_prop_types_default()).string,
|
|
163
|
-
outerStyle: (external_prop_types_default()).object,
|
|
164
|
-
useLayerForClickAway: (external_prop_types_default()).bool
|
|
165
|
-
};
|
|
166
|
-
var defaultProps = {
|
|
167
|
-
dockPosition: 'right',
|
|
168
|
-
open: false,
|
|
169
|
-
useLayerForClickAway: true
|
|
170
|
-
};
|
|
171
|
-
var animationMap = {
|
|
172
|
-
left: 'slideFromLeft',
|
|
173
|
-
right: 'slideFromRight',
|
|
174
|
-
top: 'slideFromTop',
|
|
175
|
-
bottom: 'slideFromBottom'
|
|
176
|
-
};
|
|
177
|
-
|
|
178
|
-
var SidePanel = /*#__PURE__*/function (_Component) {
|
|
179
|
-
_inherits(SidePanel, _Component);
|
|
180
|
-
|
|
181
|
-
var _super = _createSuper(SidePanel);
|
|
182
|
-
|
|
183
|
-
// @docs-props-type SidePanelPropsBase
|
|
184
|
-
function SidePanel(props) {
|
|
185
|
-
var _this;
|
|
186
|
-
|
|
187
|
-
_classCallCheck(this, SidePanel);
|
|
188
|
-
|
|
189
|
-
_this = _super.call(this, props);
|
|
190
|
-
|
|
191
|
-
_defineProperty(_assertThisInitialized(_this), "handlePanelAnimationEnd", function () {
|
|
192
|
-
var _this$props$onAnimati, _this$props;
|
|
193
|
-
|
|
194
|
-
_this.setState({
|
|
195
|
-
panelAnimating: false
|
|
196
|
-
});
|
|
197
|
-
|
|
198
|
-
(_this$props$onAnimati = (_this$props = _this.props).onAnimationEnd) === null || _this$props$onAnimati === void 0 ? void 0 : _this$props$onAnimati.call(_this$props);
|
|
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 = t => {
|
|
12
|
+
/******/ var r = t && t.__esModule ?
|
|
13
|
+
/******/ () => t["default"]
|
|
14
|
+
/******/ : () => t
|
|
15
|
+
/******/;
|
|
16
|
+
e.d(r, {
|
|
17
|
+
a: r
|
|
18
|
+
});
|
|
19
|
+
/******/ return r;
|
|
20
|
+
/******/ };
|
|
21
|
+
/******/ })();
|
|
22
|
+
/******/
|
|
23
|
+
/******/ /* webpack/runtime/define property getters */
|
|
24
|
+
/******/ (() => {
|
|
25
|
+
/******/ // define getter functions for harmony exports
|
|
26
|
+
/******/ e.d = (t, r) => {
|
|
27
|
+
/******/ for (var n in r) {
|
|
28
|
+
/******/ if (e.o(r, n) && !e.o(t, n)) {
|
|
29
|
+
/******/ Object.defineProperty(t, n, {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: r[n]
|
|
32
|
+
});
|
|
33
|
+
/******/ }
|
|
34
|
+
/******/ }
|
|
35
|
+
/******/ };
|
|
36
|
+
/******/ })();
|
|
37
|
+
/******/
|
|
38
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
39
|
+
/******/ (() => {
|
|
40
|
+
/******/ e.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t)
|
|
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 t = {};
|
|
60
|
+
// ESM COMPAT FLAG
|
|
61
|
+
e.r(t);
|
|
62
|
+
// EXPORTS
|
|
63
|
+
e.d(t, {
|
|
64
|
+
default: () => /* reexport */ K
|
|
199
65
|
});
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
66
|
+
// CONCATENATED MODULE: external "react"
|
|
67
|
+
const r = require("react");
|
|
68
|
+
var n = e.n(r);
|
|
69
|
+
// CONCATENATED MODULE: external "prop-types"
|
|
70
|
+
const o = require("prop-types");
|
|
71
|
+
var i = e.n(o);
|
|
72
|
+
// CONCATENATED MODULE: external "lodash/keys"
|
|
73
|
+
const a = require("lodash/keys");
|
|
74
|
+
var l = e.n(a);
|
|
75
|
+
// CONCATENATED MODULE: external "lodash/omit"
|
|
76
|
+
const u = require("lodash/omit");
|
|
77
|
+
var c = e.n(u);
|
|
78
|
+
// CONCATENATED MODULE: external "@splunk/react-ui/ModalLayer"
|
|
79
|
+
const s = require("@splunk/react-ui/ModalLayer");
|
|
80
|
+
var f = e.n(s);
|
|
81
|
+
// CONCATENATED MODULE: external "styled-components"
|
|
82
|
+
const p = require("styled-components");
|
|
83
|
+
var y = e.n(p);
|
|
84
|
+
// CONCATENATED MODULE: external "@splunk/react-ui/TransitionOpen"
|
|
85
|
+
const d = require("@splunk/react-ui/TransitionOpen");
|
|
86
|
+
var b = e.n(d);
|
|
87
|
+
// CONCATENATED MODULE: external "@splunk/themes"
|
|
88
|
+
const m = require("@splunk/themes");
|
|
89
|
+
// CONCATENATED MODULE: ./src/SidePanel/SidePanelStyles.ts
|
|
90
|
+
var h = (0, p.css)([ "", " position:fixed;flex-direction:column;box-shadow:", ";background-color:", ";z-index:", ";" ], m.mixins.reset("flex"), (0,
|
|
91
|
+
m.pick)({
|
|
92
|
+
enterprise: "0 0 12px rgba(0, 0, 0, 0.3)",
|
|
93
|
+
prisma: m.variables.overlayShadow
|
|
94
|
+
}), m.variables.backgroundColorSidebar, m.variables.zindexModal);
|
|
95
|
+
var v = y()(b()).withConfig({
|
|
96
|
+
displayName: "SidePanelStyles__StyledLeftPanelTransitionOpen",
|
|
97
|
+
componentId: "mtbcuz-0"
|
|
98
|
+
})([ "", ";top:0;left:0;height:100vh;" ], h);
|
|
99
|
+
var g = y()(b()).withConfig({
|
|
100
|
+
displayName: "SidePanelStyles__StyledRightPanelTransitionOpen",
|
|
101
|
+
componentId: "mtbcuz-1"
|
|
102
|
+
})([ "", ";right:0;top:0;height:100vh;" ], h);
|
|
103
|
+
var O = y()(b()).withConfig({
|
|
104
|
+
displayName: "SidePanelStyles__StyledTopPanelTransitionOpen",
|
|
105
|
+
componentId: "mtbcuz-2"
|
|
106
|
+
})([ "", ";top:0;left:0;width:100vw;" ], h);
|
|
107
|
+
var S = y()(b()).withConfig({
|
|
108
|
+
displayName: "SidePanelStyles__StyledBottomPanelTransitionOpen",
|
|
109
|
+
componentId: "mtbcuz-3"
|
|
110
|
+
})([ "", ";left:0;bottom:0;width:100vw;" ], h);
|
|
111
|
+
// CONCATENATED MODULE: ./src/SidePanel/SidePanel.tsx
|
|
112
|
+
function w(e) {
|
|
113
|
+
"@babel/helpers - typeof";
|
|
114
|
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
115
|
+
w = function e(t) {
|
|
116
|
+
return typeof t;
|
|
117
|
+
};
|
|
118
|
+
} else {
|
|
119
|
+
w = function e(t) {
|
|
120
|
+
return t && typeof Symbol === "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
return w(e);
|
|
124
|
+
}
|
|
125
|
+
function P() {
|
|
126
|
+
P = Object.assign || function(e) {
|
|
127
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
128
|
+
var r = arguments[t];
|
|
129
|
+
for (var n in r) {
|
|
130
|
+
if (Object.prototype.hasOwnProperty.call(r, n)) {
|
|
131
|
+
e[n] = r[n];
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
return e;
|
|
136
|
+
};
|
|
137
|
+
return P.apply(this, arguments);
|
|
138
|
+
}
|
|
139
|
+
function j(e) {
|
|
140
|
+
return k(e) || _(e) || C(e) || A();
|
|
141
|
+
}
|
|
142
|
+
function A() {
|
|
143
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
144
|
+
}
|
|
145
|
+
function C(e, t) {
|
|
146
|
+
if (!e) return;
|
|
147
|
+
if (typeof e === "string") return E(e, t);
|
|
148
|
+
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
149
|
+
if (r === "Object" && e.constructor) r = e.constructor.name;
|
|
150
|
+
if (r === "Map" || r === "Set") return Array.from(e);
|
|
151
|
+
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return E(e, t);
|
|
152
|
+
}
|
|
153
|
+
function _(e) {
|
|
154
|
+
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(e)) return Array.from(e);
|
|
155
|
+
}
|
|
156
|
+
function k(e) {
|
|
157
|
+
if (Array.isArray(e)) return E(e);
|
|
158
|
+
}
|
|
159
|
+
function E(e, t) {
|
|
160
|
+
if (t == null || t > e.length) t = e.length;
|
|
161
|
+
for (var r = 0, n = new Array(t); r < t; r++) {
|
|
162
|
+
n[r] = e[r];
|
|
163
|
+
}
|
|
164
|
+
return n;
|
|
165
|
+
}
|
|
166
|
+
function T(e, t) {
|
|
167
|
+
var r = Object.keys(e);
|
|
168
|
+
if (Object.getOwnPropertySymbols) {
|
|
169
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
170
|
+
if (t) n = n.filter((function(t) {
|
|
171
|
+
return Object.getOwnPropertyDescriptor(e, t).enumerable;
|
|
172
|
+
}));
|
|
173
|
+
r.push.apply(r, n);
|
|
174
|
+
}
|
|
175
|
+
return r;
|
|
176
|
+
}
|
|
177
|
+
function x(e) {
|
|
178
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
179
|
+
var r = arguments[t] != null ? arguments[t] : {};
|
|
180
|
+
if (t % 2) {
|
|
181
|
+
T(Object(r), true).forEach((function(t) {
|
|
182
|
+
U(e, t, r[t]);
|
|
183
|
+
}));
|
|
184
|
+
} else if (Object.getOwnPropertyDescriptors) {
|
|
185
|
+
Object.defineProperties(e, Object.getOwnPropertyDescriptors(r));
|
|
186
|
+
} else {
|
|
187
|
+
T(Object(r)).forEach((function(t) {
|
|
188
|
+
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t));
|
|
189
|
+
}));
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
return e;
|
|
193
|
+
}
|
|
194
|
+
function q(e, t) {
|
|
195
|
+
if (!(e instanceof t)) {
|
|
196
|
+
throw new TypeError("Cannot call a class as a function");
|
|
197
|
+
}
|
|
260
198
|
}
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
199
|
+
function F(e, t) {
|
|
200
|
+
for (var r = 0; r < t.length; r++) {
|
|
201
|
+
var n = t[r];
|
|
202
|
+
n.enumerable = n.enumerable || false;
|
|
203
|
+
n.configurable = true;
|
|
204
|
+
if ("value" in n) n.writable = true;
|
|
205
|
+
Object.defineProperty(e, n.key, n);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
function R(e, t, r) {
|
|
209
|
+
if (t) F(e.prototype, t);
|
|
210
|
+
if (r) F(e, r);
|
|
211
|
+
return e;
|
|
212
|
+
}
|
|
213
|
+
function M(e, t) {
|
|
214
|
+
if (typeof t !== "function" && t !== null) {
|
|
215
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
216
|
+
}
|
|
217
|
+
e.prototype = Object.create(t && t.prototype, {
|
|
218
|
+
constructor: {
|
|
219
|
+
value: e,
|
|
220
|
+
writable: true,
|
|
221
|
+
configurable: true
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
if (t) N(e, t);
|
|
225
|
+
}
|
|
226
|
+
function N(e, t) {
|
|
227
|
+
N = Object.setPrototypeOf || function e(t, r) {
|
|
228
|
+
t.__proto__ = r;
|
|
229
|
+
return t;
|
|
230
|
+
};
|
|
231
|
+
return N(e, t);
|
|
232
|
+
}
|
|
233
|
+
function I(e) {
|
|
234
|
+
var t = z();
|
|
235
|
+
return function r() {
|
|
236
|
+
var n = B(e), o;
|
|
237
|
+
if (t) {
|
|
238
|
+
var i = B(this).constructor;
|
|
239
|
+
o = Reflect.construct(n, arguments, i);
|
|
240
|
+
} else {
|
|
241
|
+
o = n.apply(this, arguments);
|
|
242
|
+
}
|
|
243
|
+
return D(this, o);
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
function D(e, t) {
|
|
247
|
+
if (t && (w(t) === "object" || typeof t === "function")) {
|
|
248
|
+
return t;
|
|
249
|
+
}
|
|
250
|
+
return L(e);
|
|
251
|
+
}
|
|
252
|
+
function L(e) {
|
|
253
|
+
if (e === void 0) {
|
|
254
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
255
|
+
}
|
|
256
|
+
return e;
|
|
257
|
+
}
|
|
258
|
+
function z() {
|
|
259
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
260
|
+
if (Reflect.construct.sham) return false;
|
|
261
|
+
if (typeof Proxy === "function") return true;
|
|
262
|
+
try {
|
|
263
|
+
Date.prototype.toString.call(Reflect.construct(Date, [], (function() {})));
|
|
264
|
+
return true;
|
|
265
|
+
} catch (e) {
|
|
266
|
+
return false;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
function B(e) {
|
|
270
|
+
B = Object.setPrototypeOf ? Object.getPrototypeOf : function e(t) {
|
|
271
|
+
return t.__proto__ || Object.getPrototypeOf(t);
|
|
272
|
+
};
|
|
273
|
+
return B(e);
|
|
274
|
+
}
|
|
275
|
+
function U(e, t, r) {
|
|
276
|
+
if (t in e) {
|
|
277
|
+
Object.defineProperty(e, t, {
|
|
278
|
+
value: r,
|
|
279
|
+
enumerable: true,
|
|
280
|
+
configurable: true,
|
|
281
|
+
writable: true
|
|
282
|
+
});
|
|
283
|
+
} else {
|
|
284
|
+
e[t] = r;
|
|
285
|
+
}
|
|
286
|
+
return e;
|
|
287
|
+
}
|
|
288
|
+
var $ = {
|
|
289
|
+
children: i().node,
|
|
290
|
+
dockPosition: i().oneOf([ "top", "bottom", "left", "right" ]),
|
|
291
|
+
innerClassName: i().string,
|
|
292
|
+
innerStyle: i().object,
|
|
293
|
+
onAnimationEnd: i().func,
|
|
294
|
+
onRequestClose: i().func,
|
|
295
|
+
open: i().bool,
|
|
296
|
+
outerClassName: i().string,
|
|
297
|
+
outerStyle: i().object,
|
|
298
|
+
useLayerForClickAway: i().bool
|
|
299
|
+
};
|
|
300
|
+
var G = {
|
|
301
|
+
dockPosition: "right",
|
|
302
|
+
open: false,
|
|
303
|
+
useLayerForClickAway: true
|
|
304
|
+
};
|
|
305
|
+
var H = {
|
|
306
|
+
left: "slideFromLeft",
|
|
307
|
+
right: "slideFromRight",
|
|
308
|
+
top: "slideFromTop",
|
|
309
|
+
bottom: "slideFromBottom"
|
|
275
310
|
};
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
311
|
+
var J = function(e) {
|
|
312
|
+
M(r, e);
|
|
313
|
+
var t = I(r);
|
|
314
|
+
// @docs-props-type SidePanelPropsBase
|
|
315
|
+
function r(e) {
|
|
316
|
+
var o;
|
|
317
|
+
q(this, r);
|
|
318
|
+
o = t.call(this, e);
|
|
319
|
+
U(L(o), "handlePanelAnimationEnd", (function() {
|
|
320
|
+
var e, t;
|
|
321
|
+
o.setState({
|
|
322
|
+
panelAnimating: false
|
|
323
|
+
});
|
|
324
|
+
(e = (t = o.props).onAnimationEnd) === null || e === void 0 ? void 0 : e.call(t);
|
|
325
|
+
}));
|
|
326
|
+
U(L(o), "renderModal", (function() {
|
|
327
|
+
var e = o.props, t = e.children, i = e.dockPosition, a = e.innerClassName, u = e.innerStyle, s = e.outerClassName, f = e.outerStyle;
|
|
328
|
+
var p = {
|
|
329
|
+
left: v,
|
|
330
|
+
right: g,
|
|
331
|
+
top: O,
|
|
332
|
+
bottom: S
|
|
333
|
+
}[i];
|
|
334
|
+
var y = i === "left" || i === "right" ? {
|
|
335
|
+
height: "100%"
|
|
336
|
+
} : {
|
|
337
|
+
width: "100%"
|
|
338
|
+
};
|
|
339
|
+
|
|
340
|
+
return n().createElement(p, P({
|
|
341
|
+
animateOnMount: true,
|
|
342
|
+
animation: H[i],
|
|
343
|
+
"data-test": "side-panel",
|
|
344
|
+
innerClassName: a,
|
|
345
|
+
innerStyle: x(x({}, y), u),
|
|
346
|
+
onAnimationEnd: o.handlePanelAnimationEnd,
|
|
347
|
+
open: o.props.open,
|
|
348
|
+
outerClassName: s,
|
|
349
|
+
outerStyle: f,
|
|
350
|
+
retainFocus: true,
|
|
351
|
+
role: "dialog",
|
|
352
|
+
tabIndex: -1,
|
|
353
|
+
takeFocus: true
|
|
354
|
+
}, c()(o.props, [].concat(j(l()(r.propTypes)), [ "onAnimationEnd" ]))), t);
|
|
355
|
+
}));
|
|
356
|
+
o.state = {
|
|
357
|
+
panelAnimating: false,
|
|
358
|
+
prevOpen: e.open
|
|
359
|
+
};
|
|
360
|
+
return o;
|
|
361
|
+
}
|
|
362
|
+
R(r, [ {
|
|
363
|
+
key: "render",
|
|
364
|
+
value: function e() {
|
|
365
|
+
var t = this.props, r = t.open, o = t.onRequestClose, i = t.useLayerForClickAway;
|
|
366
|
+
var a = this.state.panelAnimating;
|
|
367
|
+
|
|
368
|
+
return n().createElement(f(), {
|
|
369
|
+
childrenInAnimation: a,
|
|
370
|
+
onRequestClose: o,
|
|
371
|
+
open: r,
|
|
372
|
+
renderModal: this.renderModal,
|
|
373
|
+
useLayerForClickAway: i
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
} ]);
|
|
377
|
+
return r;
|
|
378
|
+
}(r.Component);
|
|
379
|
+
U(J, "propTypes", $);
|
|
380
|
+
U(J, "defaultProps", G);
|
|
381
|
+
U(J, "getDerivedStateFromProps", (function(e, t) {
|
|
382
|
+
if (e.open !== t.prevOpen) {
|
|
383
|
+
return {
|
|
384
|
+
panelAnimating: true,
|
|
385
|
+
prevOpen: e.open
|
|
386
|
+
};
|
|
387
|
+
}
|
|
388
|
+
return null;
|
|
389
|
+
}));
|
|
390
|
+
/* harmony default export */ const K = J;
|
|
391
|
+
// CONCATENATED MODULE: ./src/SidePanel/index.ts
|
|
392
|
+
module.exports = t;
|
|
393
|
+
/******/})();
|