@splunk/react-ui 4.14.0 → 4.16.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/.dockerignore +2 -0
- package/Accordion.js +41 -16
- package/Anchor.js +9 -9
- package/Animation.js +6 -6
- package/AnimationToggle.js +2 -2
- package/Box.js +9 -9
- package/Button.js +54 -51
- package/ButtonGroup.js +9 -9
- package/ButtonSimple.js +68 -64
- package/CHANGELOG.md +46 -0
- package/Calendar.js +124 -106
- package/Card.js +68 -68
- package/CardLayout.js +9 -9
- package/Chip.js +22 -22
- package/Clickable.js +38 -14
- package/CloseButton.js +23 -23
- package/Code.js +484 -436
- package/CollapsiblePanel.js +59 -34
- package/Color.js +297 -187
- package/ColumnLayout.js +18 -17
- package/ComboBox.js +81 -32
- package/Concertina.js +88 -27
- package/ControlGroup.js +81 -24
- package/Date.js +54 -36
- package/DefinitionList.js +14 -8
- package/Divider.d.ts +2 -0
- package/Divider.js +9 -9
- package/Dockerfile.enterprise.storybook +7 -0
- package/Dockerfile.prisma.storybook +7 -0
- package/Dockerfile.visual +10 -0
- package/Dropdown.js +78 -18
- package/EventListener.js +17 -17
- package/File.js +108 -46
- package/FormRows.js +38 -37
- package/Heading.js +83 -55
- package/Image.js +63 -38
- package/JSONTree.js +106 -21
- package/Layer.js +59 -34
- package/Link.js +17 -17
- package/List.js +3 -3
- package/MIGRATION.md +21 -0
- package/Markdown.js +71 -65
- package/Menu.js +155 -121
- package/Message.js +129 -129
- package/MessageBar.js +136 -136
- package/Modal.js +57 -32
- package/ModalLayer.js +15 -15
- package/Monogram.js +18 -17
- package/Multiselect.js +2807 -2310
- package/Number.js +74 -37
- package/Paginator.js +96 -83
- package/Paragraph.js +10 -10
- package/Popover.js +191 -54
- package/Progress.js +23 -22
- package/RadioBar.js +32 -14
- package/RadioList.js +17 -11
- package/Resize.js +33 -20
- package/ResultsMenu.js +36 -23
- package/ScreenReaderContent.js +9 -9
- package/Scroll.js +51 -26
- package/ScrollContainerContext.js +48 -48
- package/Search.js +68 -31
- package/Select.js +501 -204
- package/SidePanel.js +37 -24
- package/Slider.js +54 -24
- package/SlidingPanels.js +52 -14
- package/SplitButton.js +23 -22
- package/StaticContent.js +9 -9
- package/StepBar.js +22 -22
- package/Switch.js +18 -13
- package/TabBar.js +22 -22
- package/TabLayout.js +46 -18
- package/Table.js +424 -166
- package/Text.js +91 -49
- package/TextArea.d.ts +2 -0
- package/TextArea.js +127 -49
- package/Tooltip.js +236 -59
- package/TransitionOpen.js +39 -26
- package/Typography.d.ts +2 -0
- package/Typography.js +18 -17
- package/WaitSpinner.js +15 -15
- package/docker-compose.yml +42 -0
- package/package.json +13 -12
- package/test-runner-jest.config.js +11 -6
- package/types/src/Accordion/AccordionContext.d.ts +1 -0
- package/types/src/Button/Button.d.ts +5 -2
- package/types/src/Button/docs/examples/Basic.d.ts +2 -2
- package/types/src/Button/docs/examples/Selected.d.ts +2 -2
- package/types/src/ButtonGroup/ButtonGroupContext.d.ts +1 -0
- package/types/src/ButtonSimple/ButtonSimple.d.ts +10 -11
- package/types/src/Calendar/Calendar.d.ts +2 -0
- package/types/src/CardLayout/CardLayoutContext.d.ts +1 -0
- package/types/src/Concertina/ConcertinaContext.d.ts +1 -0
- package/types/src/ControlGroup/ControlGroup.d.ts +15 -8
- package/types/src/ControlGroup/docs/examples/HelpWithErrorText.d.ts +2 -0
- package/types/src/ControlGroup/docs/examples/Required.d.ts +2 -0
- package/types/src/File/File.d.ts +4 -2
- package/types/src/File/FileContext.d.ts +1 -0
- package/types/src/FormRows/FormRowsContext.d.ts +1 -0
- package/types/src/Markdown/renderers/MarkdownLink.d.ts +1 -1
- package/types/src/Menu/MenuContext.d.ts +1 -0
- package/types/src/Modal/ModalContext.d.ts +1 -0
- package/types/src/Multiselect/Compact.d.ts +14 -1
- package/types/src/Multiselect/Multiselect.d.ts +15 -1
- package/types/src/Multiselect/Normal.d.ts +2 -0
- package/types/src/Popover/Popover.d.ts +25 -5
- package/types/src/Popover/PopoverContext.d.ts +1 -0
- package/types/src/RadioBar/RadioBar.d.ts +5 -3
- package/types/src/RadioBar/RadioBarContext.d.ts +1 -0
- package/types/src/RadioList/RadioList.d.ts +5 -1
- package/types/src/RadioList/RadioListContext.d.ts +1 -0
- package/types/src/Select/Select.d.ts +3 -1
- package/types/src/Select/SelectBase.d.ts +14 -0
- package/types/src/Slider/Slider.d.ts +5 -3
- package/types/src/StepBar/StepBarContext.d.ts +1 -0
- package/types/src/Switch/Switch.d.ts +2 -0
- package/types/src/TabBar/TabBarContext.d.ts +1 -0
- package/types/src/TabLayout/Panel.d.ts +3 -0
- package/types/src/TabLayout/TabLayout.d.ts +2 -0
- package/types/src/Table/Body.d.ts +2 -0
- package/types/src/Table/Head.d.ts +2 -0
- package/types/src/Table/Row.d.ts +11 -3
- package/types/src/Table/Table.d.ts +5 -3
- package/types/src/Table/TableContext.d.ts +1 -0
- package/types/src/Text/Text.d.ts +5 -3
- package/types/src/TextArea/TextArea.d.ts +5 -3
- package/types/src/Tooltip/Tooltip.d.ts +16 -4
- package/types/src/Typography/Typography.d.ts +1 -1
- package/types/src/useForceUpdate/useForceUpdate.d.ts +1 -0
- package/useForceUpdate.js +9 -9
- package/useKeyPress.js +2 -2
- package/usePrevious.js +9 -9
- package/.storybook-visual/config/snapshotResolver.js +0 -29
- package/.storybook-visual/main.js +0 -22
- package/.storybook-visual/preview.jsx +0 -31
- package/.storybook-visual/scripts/test.sh +0 -108
- package/.storybook-visual/test-runner.js +0 -108
package/Popover.js
CHANGED
|
@@ -82,7 +82,7 @@ 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 = 187);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
@@ -102,6 +102,20 @@ module.exports = require("prop-types");
|
|
|
102
102
|
/***/ }),
|
|
103
103
|
|
|
104
104
|
/***/ 10:
|
|
105
|
+
/***/ (function(module, exports) {
|
|
106
|
+
|
|
107
|
+
module.exports = require("lodash/keys");
|
|
108
|
+
|
|
109
|
+
/***/ }),
|
|
110
|
+
|
|
111
|
+
/***/ 11:
|
|
112
|
+
/***/ (function(module, exports) {
|
|
113
|
+
|
|
114
|
+
module.exports = require("lodash/has");
|
|
115
|
+
|
|
116
|
+
/***/ }),
|
|
117
|
+
|
|
118
|
+
/***/ 12:
|
|
105
119
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
106
120
|
|
|
107
121
|
"use strict";
|
|
@@ -128,7 +142,42 @@ function updateReactRef(ref, current) {
|
|
|
128
142
|
|
|
129
143
|
/***/ }),
|
|
130
144
|
|
|
131
|
-
/***/
|
|
145
|
+
/***/ 144:
|
|
146
|
+
/***/ (function(module, exports) {
|
|
147
|
+
|
|
148
|
+
module.exports = require("lodash/clamp");
|
|
149
|
+
|
|
150
|
+
/***/ }),
|
|
151
|
+
|
|
152
|
+
/***/ 145:
|
|
153
|
+
/***/ (function(module, exports) {
|
|
154
|
+
|
|
155
|
+
module.exports = require("lodash/every");
|
|
156
|
+
|
|
157
|
+
/***/ }),
|
|
158
|
+
|
|
159
|
+
/***/ 146:
|
|
160
|
+
/***/ (function(module, exports) {
|
|
161
|
+
|
|
162
|
+
module.exports = require("lodash/intersection");
|
|
163
|
+
|
|
164
|
+
/***/ }),
|
|
165
|
+
|
|
166
|
+
/***/ 17:
|
|
167
|
+
/***/ (function(module, exports) {
|
|
168
|
+
|
|
169
|
+
module.exports = require("@splunk/react-ui/EventListener");
|
|
170
|
+
|
|
171
|
+
/***/ }),
|
|
172
|
+
|
|
173
|
+
/***/ 18:
|
|
174
|
+
/***/ (function(module, exports) {
|
|
175
|
+
|
|
176
|
+
module.exports = require("lodash/includes");
|
|
177
|
+
|
|
178
|
+
/***/ }),
|
|
179
|
+
|
|
180
|
+
/***/ 187:
|
|
132
181
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
133
182
|
|
|
134
183
|
"use strict";
|
|
@@ -148,31 +197,72 @@ var external_prop_types_ = __webpack_require__(1);
|
|
|
148
197
|
var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
|
|
149
198
|
|
|
150
199
|
// EXTERNAL MODULE: external "react-dom"
|
|
151
|
-
var external_react_dom_ = __webpack_require__(
|
|
200
|
+
var external_react_dom_ = __webpack_require__(93);
|
|
201
|
+
|
|
202
|
+
// EXTERNAL MODULE: external "lodash/clamp"
|
|
203
|
+
var clamp_ = __webpack_require__(144);
|
|
204
|
+
var clamp_default = /*#__PURE__*/__webpack_require__.n(clamp_);
|
|
205
|
+
|
|
206
|
+
// EXTERNAL MODULE: external "lodash/defer"
|
|
207
|
+
var defer_ = __webpack_require__(55);
|
|
208
|
+
var defer_default = /*#__PURE__*/__webpack_require__.n(defer_);
|
|
209
|
+
|
|
210
|
+
// EXTERNAL MODULE: external "lodash/every"
|
|
211
|
+
var every_ = __webpack_require__(145);
|
|
212
|
+
var every_default = /*#__PURE__*/__webpack_require__.n(every_);
|
|
213
|
+
|
|
214
|
+
// EXTERNAL MODULE: external "lodash/has"
|
|
215
|
+
var has_ = __webpack_require__(11);
|
|
216
|
+
var has_default = /*#__PURE__*/__webpack_require__.n(has_);
|
|
217
|
+
|
|
218
|
+
// EXTERNAL MODULE: external "lodash/includes"
|
|
219
|
+
var includes_ = __webpack_require__(18);
|
|
220
|
+
var includes_default = /*#__PURE__*/__webpack_require__.n(includes_);
|
|
221
|
+
|
|
222
|
+
// EXTERNAL MODULE: external "lodash/intersection"
|
|
223
|
+
var intersection_ = __webpack_require__(146);
|
|
224
|
+
var intersection_default = /*#__PURE__*/__webpack_require__.n(intersection_);
|
|
225
|
+
|
|
226
|
+
// EXTERNAL MODULE: external "lodash/isFinite"
|
|
227
|
+
var isFinite_ = __webpack_require__(21);
|
|
228
|
+
var isFinite_default = /*#__PURE__*/__webpack_require__.n(isFinite_);
|
|
229
|
+
|
|
230
|
+
// EXTERNAL MODULE: external "lodash/isFunction"
|
|
231
|
+
var isFunction_ = __webpack_require__(68);
|
|
232
|
+
var isFunction_default = /*#__PURE__*/__webpack_require__.n(isFunction_);
|
|
233
|
+
|
|
234
|
+
// EXTERNAL MODULE: external "lodash/keys"
|
|
235
|
+
var keys_ = __webpack_require__(10);
|
|
236
|
+
var keys_default = /*#__PURE__*/__webpack_require__.n(keys_);
|
|
237
|
+
|
|
238
|
+
// EXTERNAL MODULE: external "lodash/omit"
|
|
239
|
+
var omit_ = __webpack_require__(5);
|
|
240
|
+
var omit_default = /*#__PURE__*/__webpack_require__.n(omit_);
|
|
152
241
|
|
|
153
|
-
// EXTERNAL MODULE: external "lodash"
|
|
154
|
-
var
|
|
242
|
+
// EXTERNAL MODULE: external "lodash/throttle"
|
|
243
|
+
var throttle_ = __webpack_require__(31);
|
|
244
|
+
var throttle_default = /*#__PURE__*/__webpack_require__.n(throttle_);
|
|
155
245
|
|
|
156
246
|
// EXTERNAL MODULE: external "@splunk/themes"
|
|
157
247
|
var themes_ = __webpack_require__(0);
|
|
158
248
|
|
|
159
249
|
// EXTERNAL MODULE: external "@splunk/react-ui/Animation"
|
|
160
|
-
var Animation_ = __webpack_require__(
|
|
250
|
+
var Animation_ = __webpack_require__(43);
|
|
161
251
|
|
|
162
252
|
// EXTERNAL MODULE: external "@splunk/react-ui/EventListener"
|
|
163
|
-
var EventListener_ = __webpack_require__(
|
|
253
|
+
var EventListener_ = __webpack_require__(17);
|
|
164
254
|
var EventListener_default = /*#__PURE__*/__webpack_require__.n(EventListener_);
|
|
165
255
|
|
|
166
256
|
// EXTERNAL MODULE: external "@splunk/react-ui/Layer"
|
|
167
|
-
var Layer_ = __webpack_require__(
|
|
257
|
+
var Layer_ = __webpack_require__(82);
|
|
168
258
|
var Layer_default = /*#__PURE__*/__webpack_require__.n(Layer_);
|
|
169
259
|
|
|
170
260
|
// EXTERNAL MODULE: external "@splunk/react-ui/ScrollContainerContext"
|
|
171
|
-
var ScrollContainerContext_ = __webpack_require__(
|
|
261
|
+
var ScrollContainerContext_ = __webpack_require__(50);
|
|
172
262
|
var ScrollContainerContext_default = /*#__PURE__*/__webpack_require__.n(ScrollContainerContext_);
|
|
173
263
|
|
|
174
264
|
// EXTERNAL MODULE: external "@splunk/ui-utils/focus"
|
|
175
|
-
var focus_ = __webpack_require__(
|
|
265
|
+
var focus_ = __webpack_require__(35);
|
|
176
266
|
|
|
177
267
|
// CONCATENATED MODULE: ./src/Popover/getPlacement.ts
|
|
178
268
|
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; }
|
|
@@ -454,7 +544,7 @@ function getPlacement(args) {
|
|
|
454
544
|
var PopoverContext = /*#__PURE__*/Object(external_react_["createContext"])({});
|
|
455
545
|
|
|
456
546
|
// EXTERNAL MODULE: external "react-spring"
|
|
457
|
-
var external_react_spring_ = __webpack_require__(
|
|
547
|
+
var external_react_spring_ = __webpack_require__(26);
|
|
458
548
|
|
|
459
549
|
// EXTERNAL MODULE: external "styled-components"
|
|
460
550
|
var external_styled_components_ = __webpack_require__(3);
|
|
@@ -475,8 +565,11 @@ var Styled = external_styled_components_default()(external_react_spring_["animat
|
|
|
475
565
|
var StyledBox = external_styled_components_default.a.div.withConfig({
|
|
476
566
|
displayName: "PopoverStyles__StyledBox",
|
|
477
567
|
componentId: "sc-1nahsvw-1"
|
|
478
|
-
})(["", ";", ";"], themes_["mixins"].reset('block'), function (_ref) {
|
|
479
|
-
var $
|
|
568
|
+
})(["", ";", ";", ";"], themes_["mixins"].reset('block'), function (_ref) {
|
|
569
|
+
var $open = _ref.$open;
|
|
570
|
+
return !$open && Object(external_styled_components_["css"])(["pointer-events:none;"]);
|
|
571
|
+
}, function (_ref2) {
|
|
572
|
+
var $appearance = _ref2.$appearance;
|
|
480
573
|
return $appearance !== 'none' && Object(external_styled_components_["css"])(["padding:8px;"]);
|
|
481
574
|
});
|
|
482
575
|
var StyledContent = external_styled_components_default.a.div.withConfig({
|
|
@@ -525,10 +618,10 @@ var StyledLowerRightCorner = external_styled_components_default.a.div.withConfig
|
|
|
525
618
|
})(["position:fixed;right:0;bottom:0;"]);
|
|
526
619
|
|
|
527
620
|
// EXTERNAL MODULE: ./src/utils/updateReactRef.ts
|
|
528
|
-
var updateReactRef = __webpack_require__(
|
|
621
|
+
var updateReactRef = __webpack_require__(12);
|
|
529
622
|
|
|
530
623
|
// EXTERNAL MODULE: ./src/utils/ssrWindow.ts
|
|
531
|
-
var ssrWindow = __webpack_require__(
|
|
624
|
+
var ssrWindow = __webpack_require__(20);
|
|
532
625
|
|
|
533
626
|
// CONCATENATED MODULE: ./src/Popover/Popover.tsx
|
|
534
627
|
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); }
|
|
@@ -590,6 +683,16 @@ function Popover_defineProperty(obj, key, value) { if (key in obj) { Object.defi
|
|
|
590
683
|
|
|
591
684
|
|
|
592
685
|
|
|
686
|
+
|
|
687
|
+
|
|
688
|
+
|
|
689
|
+
|
|
690
|
+
|
|
691
|
+
|
|
692
|
+
|
|
693
|
+
|
|
694
|
+
|
|
695
|
+
|
|
593
696
|
|
|
594
697
|
|
|
595
698
|
|
|
@@ -603,6 +706,7 @@ var propTypes = {
|
|
|
603
706
|
align: external_prop_types_default.a.oneOf(['center', 'edge', 'theme', 'end']),
|
|
604
707
|
anchor: external_prop_types_default.a.object,
|
|
605
708
|
animation: external_prop_types_default.a.bool,
|
|
709
|
+
animationConfig: external_prop_types_default.a.object,
|
|
606
710
|
appearance: external_prop_types_default.a.oneOf(['normal', 'inverted', 'none']),
|
|
607
711
|
autoCloseWhenOffScreen: external_prop_types_default.a.bool,
|
|
608
712
|
canCoverAnchor: external_prop_types_default.a.bool,
|
|
@@ -611,8 +715,10 @@ var propTypes = {
|
|
|
611
715
|
defaultPlacement: external_prop_types_default.a.oneOf(['above', 'below', 'left', 'right', 'vertical', 'horizontal']),
|
|
612
716
|
elementRef: external_prop_types_default.a.oneOfType([external_prop_types_default.a.func, external_prop_types_default.a.object]),
|
|
613
717
|
id: external_prop_types_default.a.string,
|
|
718
|
+
onReposition: external_prop_types_default.a.func,
|
|
614
719
|
onRequestClose: external_prop_types_default.a.func,
|
|
615
720
|
open: external_prop_types_default.a.bool,
|
|
721
|
+
outerRef: external_prop_types_default.a.oneOfType([external_prop_types_default.a.func, external_prop_types_default.a.object]),
|
|
616
722
|
pointTo: external_prop_types_default.a.shape({
|
|
617
723
|
x: external_prop_types_default.a.number,
|
|
618
724
|
y: external_prop_types_default.a.number
|
|
@@ -625,6 +731,7 @@ var propTypes = {
|
|
|
625
731
|
var defaultProps = {
|
|
626
732
|
align: 'theme',
|
|
627
733
|
animation: true,
|
|
734
|
+
animationConfig: {},
|
|
628
735
|
appearance: 'normal',
|
|
629
736
|
autoCloseWhenOffScreen: true,
|
|
630
737
|
canCoverAnchor: false,
|
|
@@ -639,8 +746,8 @@ var defaultProps = {
|
|
|
639
746
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
640
747
|
function everyApproxEqual(a, b) {
|
|
641
748
|
var threshold = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
|
|
642
|
-
return !!a && !!b &&
|
|
643
|
-
if (
|
|
749
|
+
return !!a && !!b && every_default()(a, function (val, key) {
|
|
750
|
+
if (isFinite_default()(val)) {
|
|
644
751
|
return Math.abs(b[key] - val) <= threshold;
|
|
645
752
|
}
|
|
646
753
|
|
|
@@ -681,7 +788,7 @@ var Popover_Popover = /*#__PURE__*/function (_Component) {
|
|
|
681
788
|
var maxVertDiff = outerContainerEl.offsetHeight / 2 - 22;
|
|
682
789
|
var minVertDiff = -(outerContainerEl.offsetHeight / 2 - 15);
|
|
683
790
|
var initVertDiff = anchorPos.center - (outerContainerStyle.top + outerContainerEl.offsetHeight / 2) - arrowHeight / 2;
|
|
684
|
-
var vertDiff =
|
|
791
|
+
var vertDiff = clamp_default()(initVertDiff, minVertDiff, maxVertDiff);
|
|
685
792
|
var horizontalDiff = anchorPos.middle - (outerContainerStyle.left + outerContainerEl.offsetWidth / 2) - arrowHeight;
|
|
686
793
|
var transformMetadata = {
|
|
687
794
|
left: {
|
|
@@ -754,8 +861,8 @@ var Popover_Popover = /*#__PURE__*/function (_Component) {
|
|
|
754
861
|
height: anchorEl.offsetHeight
|
|
755
862
|
};
|
|
756
863
|
var pointTo = _this.props.pointTo;
|
|
757
|
-
var pointToHorizontal = pointTo &&
|
|
758
|
-
var pointToVertical = pointTo &&
|
|
864
|
+
var pointToHorizontal = pointTo && has_default()(pointTo, 'x');
|
|
865
|
+
var pointToVertical = pointTo && has_default()(pointTo, 'y');
|
|
759
866
|
a.left = pointToHorizontal ? rect.left + ((pointTo === null || pointTo === void 0 ? void 0 : pointTo.x) || 0) : rect.left;
|
|
760
867
|
a.top = pointToVertical ? rect.top + ((pointTo === null || pointTo === void 0 ? void 0 : pointTo.y) || 0) : rect.top;
|
|
761
868
|
a.right = pointToHorizontal ? a.left + a.width : rect.left + a.width || rect.right;
|
|
@@ -777,6 +884,7 @@ var Popover_Popover = /*#__PURE__*/function (_Component) {
|
|
|
777
884
|
autoCloseWhenOffScreen = _this$props.autoCloseWhenOffScreen,
|
|
778
885
|
canCoverAnchor = _this$props.canCoverAnchor,
|
|
779
886
|
defaultPlacement = _this$props.defaultPlacement,
|
|
887
|
+
onReposition = _this$props.onReposition,
|
|
780
888
|
open = _this$props.open,
|
|
781
889
|
repositionMode = _this$props.repositionMode,
|
|
782
890
|
splunkTheme = _this$props.splunkTheme;
|
|
@@ -833,12 +941,15 @@ var Popover_Popover = /*#__PURE__*/function (_Component) {
|
|
|
833
941
|
|
|
834
942
|
var hasArrow = _this.props.appearance !== 'none' && !isPrisma;
|
|
835
943
|
var baseCheck = everyApproxEqual(anchorPos, state.anchorPos) && everyApproxEqual(outerContainerStyle, state.outerContainerStyle) && placement === state.placement && maxHeight === state.maxHeight && maxWidth === state.maxWidth;
|
|
836
|
-
var arrowCheck = everyApproxEqual(
|
|
944
|
+
var arrowCheck = everyApproxEqual(omit_default()(arrowStyle, 'transform'), omit_default()(state.arrowStyle, 'transform')) && everyApproxEqual(arrowStyleTransformMeta !== null && arrowStyleTransformMeta !== void 0 ? arrowStyleTransformMeta : {}, (_state$arrowStyleTran = state.arrowStyleTransformMeta) !== null && _state$arrowStyleTran !== void 0 ? _state$arrowStyleTran : {}); // If none of the position data has changed, do not set state.
|
|
837
945
|
|
|
838
946
|
if (baseCheck && (!hasArrow || hasArrow && arrowCheck)) {
|
|
839
947
|
return null;
|
|
840
948
|
}
|
|
841
949
|
|
|
950
|
+
onReposition === null || onReposition === void 0 ? void 0 : onReposition({
|
|
951
|
+
placement: placement
|
|
952
|
+
});
|
|
842
953
|
return {
|
|
843
954
|
anchorPos: anchorPos,
|
|
844
955
|
arrowStyle: arrowStyle,
|
|
@@ -875,12 +986,17 @@ var Popover_Popover = /*#__PURE__*/function (_Component) {
|
|
|
875
986
|
_this.innerContainerEl = el;
|
|
876
987
|
|
|
877
988
|
if (el && _this.props.takeFocus) {
|
|
878
|
-
|
|
989
|
+
defer_default()(focus_["takeFocus"], el);
|
|
879
990
|
}
|
|
880
991
|
|
|
881
992
|
Object(updateReactRef["a" /* updateReactRef */])(_this.props.elementRef, el);
|
|
882
993
|
});
|
|
883
994
|
|
|
995
|
+
Popover_defineProperty(_assertThisInitialized(_this), "handleOuterContainerMount", function (el) {
|
|
996
|
+
_this.outerContainerEl = el;
|
|
997
|
+
Object(updateReactRef["a" /* updateReactRef */])(_this.props.outerRef, el);
|
|
998
|
+
});
|
|
999
|
+
|
|
884
1000
|
Popover_defineProperty(_assertThisInitialized(_this), "handleTab", function (e) {
|
|
885
1001
|
if (_this.innerContainerEl) {
|
|
886
1002
|
if (_this.props.retainFocus) {
|
|
@@ -919,6 +1035,7 @@ var Popover_Popover = /*#__PURE__*/function (_Component) {
|
|
|
919
1035
|
Popover_defineProperty(_assertThisInitialized(_this), "renderLayer", function () {
|
|
920
1036
|
var _this$props2 = _this.props,
|
|
921
1037
|
animation = _this$props2.animation,
|
|
1038
|
+
animationConfig = _this$props2.animationConfig,
|
|
922
1039
|
appearance = _this$props2.appearance,
|
|
923
1040
|
children = _this$props2.children,
|
|
924
1041
|
id = _this$props2.id,
|
|
@@ -938,11 +1055,11 @@ var Popover_Popover = /*#__PURE__*/function (_Component) {
|
|
|
938
1055
|
// Accommodate the arrow in the maxHeight and maxWidth.
|
|
939
1056
|
|
|
940
1057
|
if (appearance !== 'none') {
|
|
941
|
-
if (
|
|
1058
|
+
if (isFinite_default()(maxHeight)) {
|
|
942
1059
|
maxHeight -= 20;
|
|
943
1060
|
}
|
|
944
1061
|
|
|
945
|
-
if (
|
|
1062
|
+
if (isFinite_default()(maxWidth)) {
|
|
946
1063
|
maxWidth -= 20;
|
|
947
1064
|
}
|
|
948
1065
|
}
|
|
@@ -966,27 +1083,26 @@ var Popover_Popover = /*#__PURE__*/function (_Component) {
|
|
|
966
1083
|
opacity: animation ? 0 : 1
|
|
967
1084
|
},
|
|
968
1085
|
to: motionStyle,
|
|
969
|
-
config: {
|
|
1086
|
+
config: Popover_objectSpread({
|
|
970
1087
|
tension: 300,
|
|
971
1088
|
friction: 40
|
|
972
|
-
},
|
|
1089
|
+
}, animationConfig),
|
|
973
1090
|
onRest: _this.handleAnimationEnd
|
|
974
1091
|
}, function (interpolatedStyles) {
|
|
975
1092
|
return /*#__PURE__*/external_react_default.a.createElement(Styled, {
|
|
976
1093
|
"data-test": "outer-popover",
|
|
977
1094
|
style: Popover_objectSpread(Popover_objectSpread({}, outerContainerStyle), interpolatedStyles),
|
|
978
|
-
ref:
|
|
979
|
-
_this.outerContainerEl = c;
|
|
980
|
-
}
|
|
1095
|
+
ref: _this.handleOuterContainerMount
|
|
981
1096
|
}, (open || _this.state.animating) && /*#__PURE__*/external_react_default.a.createElement(StyledBox, _extends({
|
|
982
1097
|
$appearance: displayAppearance,
|
|
1098
|
+
$open: open,
|
|
983
1099
|
"data-test": "popover",
|
|
984
1100
|
ref: _this.handleInnerContainerMount,
|
|
985
1101
|
tabIndex: -1,
|
|
986
1102
|
id: id,
|
|
987
1103
|
onKeyDown: _this.handleTab // TODO: remove anchor once prop type generation is fixed
|
|
988
1104
|
|
|
989
|
-
},
|
|
1105
|
+
}, omit_default()(_this.props, ['anchor'].concat(_toConsumableArray(keys_default()(Popover.propTypes))))), /*#__PURE__*/external_react_default.a.createElement(PopoverContext.Provider, {
|
|
990
1106
|
value: {
|
|
991
1107
|
retainFocus: retainFocus
|
|
992
1108
|
}
|
|
@@ -998,7 +1114,7 @@ var Popover_Popover = /*#__PURE__*/function (_Component) {
|
|
|
998
1114
|
style: arrowStyle
|
|
999
1115
|
}), appearance !== 'none' && /*#__PURE__*/external_react_default.a.createElement(StyledContent, {
|
|
1000
1116
|
$appearance: displayAppearance
|
|
1001
|
-
},
|
|
1117
|
+
}, isFunction_default()(children) ? children(childData) : children))), /*#__PURE__*/external_react_default.a.createElement(StyledLowerRightCorner, {
|
|
1002
1118
|
ref: function ref(el) {
|
|
1003
1119
|
_this.windowSizeMeasurementEl = el;
|
|
1004
1120
|
}
|
|
@@ -1007,9 +1123,9 @@ var Popover_Popover = /*#__PURE__*/function (_Component) {
|
|
|
1007
1123
|
/* eslint-enable jsx-a11y/no-static-element-interactions */
|
|
1008
1124
|
});
|
|
1009
1125
|
|
|
1010
|
-
_this.handleScroll =
|
|
1011
|
-
_this.handleWindowScroll =
|
|
1012
|
-
_this.setPlacement =
|
|
1126
|
+
_this.handleScroll = throttle_default()(_this.setPlacement.bind(_assertThisInitialized(_this), true), 0);
|
|
1127
|
+
_this.handleWindowScroll = throttle_default()(_this.setPlacement.bind(_assertThisInitialized(_this), true), 0);
|
|
1128
|
+
_this.setPlacement = throttle_default()(_this.setPlacement, 0, {
|
|
1013
1129
|
leading: false
|
|
1014
1130
|
});
|
|
1015
1131
|
_this.state = {
|
|
@@ -1080,7 +1196,7 @@ var Popover_Popover = /*#__PURE__*/function (_Component) {
|
|
|
1080
1196
|
}, {
|
|
1081
1197
|
key: "requestClose",
|
|
1082
1198
|
value: function requestClose(data) {
|
|
1083
|
-
if (
|
|
1199
|
+
if (includes_default()(this.props.closeReasons, data.reason)) {
|
|
1084
1200
|
var _this$props$onRequest, _this$props3;
|
|
1085
1201
|
|
|
1086
1202
|
(_this$props$onRequest = (_this$props3 = this.props).onRequestClose) === null || _this$props$onRequest === void 0 ? void 0 : _this$props$onRequest.call(_this$props3, data);
|
|
@@ -1117,7 +1233,7 @@ var Popover_Popover = /*#__PURE__*/function (_Component) {
|
|
|
1117
1233
|
},
|
|
1118
1234
|
key: "eventListenerOnWindowScroll"
|
|
1119
1235
|
}), /*#__PURE__*/external_react_default.a.createElement(Layer_default.a, {
|
|
1120
|
-
closeReasons:
|
|
1236
|
+
closeReasons: intersection_default()(this.props.closeReasons.filter(function (reason) {
|
|
1121
1237
|
return reason !== 'offScreen';
|
|
1122
1238
|
}), Layer_default.a.possibleCloseReasons),
|
|
1123
1239
|
open: open,
|
|
@@ -1157,20 +1273,20 @@ PopoverWithTheme.propTypes = Popover_Popover.propTypes;
|
|
|
1157
1273
|
|
|
1158
1274
|
/***/ }),
|
|
1159
1275
|
|
|
1160
|
-
/***/
|
|
1276
|
+
/***/ 2:
|
|
1161
1277
|
/***/ (function(module, exports) {
|
|
1162
1278
|
|
|
1163
|
-
module.exports = require("
|
|
1279
|
+
module.exports = require("react");
|
|
1164
1280
|
|
|
1165
1281
|
/***/ }),
|
|
1166
1282
|
|
|
1167
|
-
/***/
|
|
1283
|
+
/***/ 20:
|
|
1168
1284
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1169
1285
|
|
|
1170
1286
|
"use strict";
|
|
1171
1287
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getWindow; });
|
|
1172
1288
|
/* unused harmony export ssrWindow */
|
|
1173
|
-
/* harmony import */ var _ssrDocument__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
1289
|
+
/* harmony import */ var _ssrDocument__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(28);
|
|
1174
1290
|
/* eslint-disable @typescript-eslint/no-empty-function */
|
|
1175
1291
|
|
|
1176
1292
|
var ssrWindow = {
|
|
@@ -1240,21 +1356,21 @@ function getWindow() {
|
|
|
1240
1356
|
|
|
1241
1357
|
/***/ }),
|
|
1242
1358
|
|
|
1243
|
-
/***/
|
|
1359
|
+
/***/ 21:
|
|
1244
1360
|
/***/ (function(module, exports) {
|
|
1245
1361
|
|
|
1246
|
-
module.exports = require("
|
|
1362
|
+
module.exports = require("lodash/isFinite");
|
|
1247
1363
|
|
|
1248
1364
|
/***/ }),
|
|
1249
1365
|
|
|
1250
|
-
/***/
|
|
1366
|
+
/***/ 26:
|
|
1251
1367
|
/***/ (function(module, exports) {
|
|
1252
1368
|
|
|
1253
1369
|
module.exports = require("react-spring");
|
|
1254
1370
|
|
|
1255
1371
|
/***/ }),
|
|
1256
1372
|
|
|
1257
|
-
/***/
|
|
1373
|
+
/***/ 28:
|
|
1258
1374
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1259
1375
|
|
|
1260
1376
|
"use strict";
|
|
@@ -1325,49 +1441,70 @@ function getDocument() {
|
|
|
1325
1441
|
|
|
1326
1442
|
/***/ }),
|
|
1327
1443
|
|
|
1328
|
-
/***/
|
|
1444
|
+
/***/ 3:
|
|
1329
1445
|
/***/ (function(module, exports) {
|
|
1330
1446
|
|
|
1331
|
-
module.exports = require("
|
|
1447
|
+
module.exports = require("styled-components");
|
|
1332
1448
|
|
|
1333
1449
|
/***/ }),
|
|
1334
1450
|
|
|
1335
|
-
/***/
|
|
1451
|
+
/***/ 31:
|
|
1336
1452
|
/***/ (function(module, exports) {
|
|
1337
1453
|
|
|
1338
|
-
module.exports = require("
|
|
1454
|
+
module.exports = require("lodash/throttle");
|
|
1455
|
+
|
|
1456
|
+
/***/ }),
|
|
1457
|
+
|
|
1458
|
+
/***/ 35:
|
|
1459
|
+
/***/ (function(module, exports) {
|
|
1460
|
+
|
|
1461
|
+
module.exports = require("@splunk/ui-utils/focus");
|
|
1339
1462
|
|
|
1340
1463
|
/***/ }),
|
|
1341
1464
|
|
|
1342
|
-
/***/
|
|
1465
|
+
/***/ 43:
|
|
1343
1466
|
/***/ (function(module, exports) {
|
|
1344
1467
|
|
|
1345
1468
|
module.exports = require("@splunk/react-ui/Animation");
|
|
1346
1469
|
|
|
1347
1470
|
/***/ }),
|
|
1348
1471
|
|
|
1349
|
-
/***/
|
|
1472
|
+
/***/ 5:
|
|
1473
|
+
/***/ (function(module, exports) {
|
|
1474
|
+
|
|
1475
|
+
module.exports = require("lodash/omit");
|
|
1476
|
+
|
|
1477
|
+
/***/ }),
|
|
1478
|
+
|
|
1479
|
+
/***/ 50:
|
|
1350
1480
|
/***/ (function(module, exports) {
|
|
1351
1481
|
|
|
1352
1482
|
module.exports = require("@splunk/react-ui/ScrollContainerContext");
|
|
1353
1483
|
|
|
1354
1484
|
/***/ }),
|
|
1355
1485
|
|
|
1356
|
-
/***/
|
|
1486
|
+
/***/ 55:
|
|
1487
|
+
/***/ (function(module, exports) {
|
|
1488
|
+
|
|
1489
|
+
module.exports = require("lodash/defer");
|
|
1490
|
+
|
|
1491
|
+
/***/ }),
|
|
1492
|
+
|
|
1493
|
+
/***/ 68:
|
|
1357
1494
|
/***/ (function(module, exports) {
|
|
1358
1495
|
|
|
1359
|
-
module.exports = require("lodash");
|
|
1496
|
+
module.exports = require("lodash/isFunction");
|
|
1360
1497
|
|
|
1361
1498
|
/***/ }),
|
|
1362
1499
|
|
|
1363
|
-
/***/
|
|
1500
|
+
/***/ 82:
|
|
1364
1501
|
/***/ (function(module, exports) {
|
|
1365
1502
|
|
|
1366
1503
|
module.exports = require("@splunk/react-ui/Layer");
|
|
1367
1504
|
|
|
1368
1505
|
/***/ }),
|
|
1369
1506
|
|
|
1370
|
-
/***/
|
|
1507
|
+
/***/ 93:
|
|
1371
1508
|
/***/ (function(module, exports) {
|
|
1372
1509
|
|
|
1373
1510
|
module.exports = require("react-dom");
|
package/Progress.js
CHANGED
|
@@ -82,7 +82,7 @@ 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 = 220);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
@@ -101,7 +101,14 @@ module.exports = require("prop-types");
|
|
|
101
101
|
|
|
102
102
|
/***/ }),
|
|
103
103
|
|
|
104
|
-
/***/
|
|
104
|
+
/***/ 2:
|
|
105
|
+
/***/ (function(module, exports) {
|
|
106
|
+
|
|
107
|
+
module.exports = require("react");
|
|
108
|
+
|
|
109
|
+
/***/ }),
|
|
110
|
+
|
|
111
|
+
/***/ 220:
|
|
105
112
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
106
113
|
|
|
107
114
|
"use strict";
|
|
@@ -119,22 +126,23 @@ var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_)
|
|
|
119
126
|
var external_prop_types_ = __webpack_require__(1);
|
|
120
127
|
var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
|
|
121
128
|
|
|
122
|
-
// EXTERNAL MODULE: external "lodash"
|
|
123
|
-
var
|
|
129
|
+
// EXTERNAL MODULE: external "lodash/isNumber"
|
|
130
|
+
var isNumber_ = __webpack_require__(74);
|
|
131
|
+
var isNumber_default = /*#__PURE__*/__webpack_require__.n(isNumber_);
|
|
124
132
|
|
|
125
133
|
// EXTERNAL MODULE: external "@splunk/react-ui/AnimationToggle"
|
|
126
|
-
var AnimationToggle_ = __webpack_require__(
|
|
134
|
+
var AnimationToggle_ = __webpack_require__(48);
|
|
127
135
|
|
|
128
136
|
// EXTERNAL MODULE: external "styled-components"
|
|
129
137
|
var external_styled_components_ = __webpack_require__(3);
|
|
130
138
|
var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_);
|
|
131
139
|
|
|
132
140
|
// EXTERNAL MODULE: external "tinycolor2"
|
|
133
|
-
var external_tinycolor2_ = __webpack_require__(
|
|
141
|
+
var external_tinycolor2_ = __webpack_require__(64);
|
|
134
142
|
var external_tinycolor2_default = /*#__PURE__*/__webpack_require__.n(external_tinycolor2_);
|
|
135
143
|
|
|
136
144
|
// EXTERNAL MODULE: external "@splunk/react-ui/Tooltip"
|
|
137
|
-
var Tooltip_ = __webpack_require__(
|
|
145
|
+
var Tooltip_ = __webpack_require__(67);
|
|
138
146
|
var Tooltip_default = /*#__PURE__*/__webpack_require__.n(Tooltip_);
|
|
139
147
|
|
|
140
148
|
// EXTERNAL MODULE: external "@splunk/react-ui/Box"
|
|
@@ -286,7 +294,7 @@ function Progress(_ref) {
|
|
|
286
294
|
"data-test": "progress",
|
|
287
295
|
onMouseEnter: handleMouseEnter,
|
|
288
296
|
onMouseLeave: handleMouseLeave
|
|
289
|
-
}, otherProps),
|
|
297
|
+
}, otherProps), isNumber_default()(percentage) && /*#__PURE__*/external_react_default.a.createElement(StyledTooltip, {
|
|
290
298
|
inline: false,
|
|
291
299
|
open: tooltipOpen,
|
|
292
300
|
content: content,
|
|
@@ -310,13 +318,6 @@ Progress.propTypes = propTypes;
|
|
|
310
318
|
// CONCATENATED MODULE: ./src/Progress/index.ts
|
|
311
319
|
|
|
312
320
|
|
|
313
|
-
/***/ }),
|
|
314
|
-
|
|
315
|
-
/***/ 2:
|
|
316
|
-
/***/ (function(module, exports) {
|
|
317
|
-
|
|
318
|
-
module.exports = require("react");
|
|
319
|
-
|
|
320
321
|
/***/ }),
|
|
321
322
|
|
|
322
323
|
/***/ 3:
|
|
@@ -326,31 +327,31 @@ module.exports = require("styled-components");
|
|
|
326
327
|
|
|
327
328
|
/***/ }),
|
|
328
329
|
|
|
329
|
-
/***/
|
|
330
|
+
/***/ 48:
|
|
330
331
|
/***/ (function(module, exports) {
|
|
331
332
|
|
|
332
333
|
module.exports = require("@splunk/react-ui/AnimationToggle");
|
|
333
334
|
|
|
334
335
|
/***/ }),
|
|
335
336
|
|
|
336
|
-
/***/
|
|
337
|
+
/***/ 64:
|
|
337
338
|
/***/ (function(module, exports) {
|
|
338
339
|
|
|
339
|
-
module.exports = require("
|
|
340
|
+
module.exports = require("tinycolor2");
|
|
340
341
|
|
|
341
342
|
/***/ }),
|
|
342
343
|
|
|
343
|
-
/***/
|
|
344
|
+
/***/ 67:
|
|
344
345
|
/***/ (function(module, exports) {
|
|
345
346
|
|
|
346
|
-
module.exports = require("
|
|
347
|
+
module.exports = require("@splunk/react-ui/Tooltip");
|
|
347
348
|
|
|
348
349
|
/***/ }),
|
|
349
350
|
|
|
350
|
-
/***/
|
|
351
|
+
/***/ 74:
|
|
351
352
|
/***/ (function(module, exports) {
|
|
352
353
|
|
|
353
|
-
module.exports = require("
|
|
354
|
+
module.exports = require("lodash/isNumber");
|
|
354
355
|
|
|
355
356
|
/***/ }),
|
|
356
357
|
|