@splunk/react-ui 4.9.0 → 4.12.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 +24 -48
- package/ButtonGroup.js +6 -27
- package/ButtonSimple.js +4 -4
- package/CHANGELOG.md +63 -6
- package/Calendar.js +39 -39
- package/Card.js +54 -68
- package/CardLayout.js +14 -35
- package/Chip.js +19 -19
- package/Clickable.js +28 -13
- package/CloseButton.js +15 -15
- package/Code.js +8 -5
- package/CollapsiblePanel.js +6 -6
- package/Color.js +21 -21
- package/ColumnLayout.js +7 -7
- package/ComboBox.js +19 -14
- package/Concertina.js +13 -13
- package/ControlGroup.js +28 -18
- package/Date.js +10 -10
- package/DefinitionList.js +2 -2
- package/Dropdown.js +6 -6
- package/EventListener.js +4 -4
- package/File.js +31 -31
- package/FormRows.js +11 -11
- package/Heading.js +2 -2
- package/Image.js +21 -21
- package/JSONTree.js +40 -22
- package/Layer.js +72 -22
- package/Link.js +9 -9
- package/List.js +2 -2
- package/Markdown.js +26 -29
- package/Menu.js +53 -53
- package/Message.js +33 -33
- package/MessageBar.js +46 -39
- package/Modal.js +8 -8
- package/ModalLayer.js +16 -7
- package/Monogram.js +27 -15
- package/Multiselect.js +101 -97
- package/Number.js +6 -6
- package/Paginator.js +46 -49
- package/Paragraph.js +2 -2
- package/Popover.js +18 -13
- package/Progress.js +8 -8
- package/RadioBar.js +145 -41
- package/RadioList.js +2 -2
- package/Resize.js +4 -4
- package/ResultsMenu.js +62 -41
- package/ScreenReaderContent.js +2 -2
- package/Scroll.js +6 -6
- package/ScrollContainerContext.js +2 -2
- package/Search.js +19 -18
- package/Select.js +81 -79
- package/SidePanel.js +4 -4
- package/Slider.js +8 -8
- package/SlidingPanels.js +16 -7
- package/StaticContent.js +2 -2
- package/StepBar.js +8 -8
- package/Switch.js +8 -8
- package/TabBar.js +15 -15
- package/TabLayout.js +4 -4
- package/Table.js +119 -92
- package/Text.js +121 -241
- package/TextArea.js +1444 -0
- package/Tooltip.js +17 -6
- package/TransitionOpen.js +20 -10
- package/Typography.js +225 -0
- package/WaitSpinner.js +4 -4
- package/cypress.json +1 -0
- package/package.json +21 -8
- package/stubs-splunkui.d.ts +13 -0
- package/test-runner-jest.config.js +38 -0
- package/types/src/Accordion/AccordionContext.d.ts +0 -1
- package/types/src/Button/Button.d.ts +0 -2
- package/types/src/ButtonGroup/ButtonGroupContext.d.ts +0 -1
- package/types/src/Card/Body.d.ts +6 -1
- package/types/src/Card/Card.d.ts +0 -2
- package/types/src/CardLayout/CardLayoutContext.d.ts +0 -1
- package/types/src/Clickable/Clickable.d.ts +5 -0
- package/types/src/ComboBox/ComboBox.d.ts +15 -5
- package/types/src/Concertina/ConcertinaContext.d.ts +0 -1
- package/types/src/ControlGroup/ControlGroup.d.ts +9 -2
- package/types/src/Date/Date.d.ts +3 -3
- package/types/src/File/FileContext.d.ts +0 -1
- package/types/src/FormRows/FormRows.d.ts +1 -1
- package/types/src/FormRows/FormRowsContext.d.ts +0 -1
- package/types/src/FormRows/Row.d.ts +1 -1
- package/types/src/JSONTree/JSONTree.d.ts +2 -2
- package/types/src/JSONTree/TreeNode.d.ts +1 -1
- package/types/src/JSONTree/docs/examples/WithShiftModifier.d.ts +1 -0
- package/types/src/Layer/LayerStack.d.ts +8 -2
- package/types/src/Markdown/Markdown.d.ts +2 -3
- package/types/src/Menu/MenuContext.d.ts +0 -1
- package/types/src/Modal/ModalContext.d.ts +0 -1
- package/types/src/ModalLayer/ModalLayer.d.ts +2 -0
- package/types/src/Monogram/Monogram.d.ts +2 -2
- package/types/src/Multiselect/Compact.d.ts +11 -4
- package/types/src/Multiselect/Multiselect.d.ts +14 -5
- package/types/src/Multiselect/Normal.d.ts +11 -4
- package/types/src/Number/Number.d.ts +3 -3
- package/types/src/Popover/Popover.d.ts +1 -0
- package/types/src/Popover/PopoverContext.d.ts +0 -1
- package/types/src/RadioBar/Option.d.ts +10 -2
- package/types/src/RadioBar/RadioBar.d.ts +4 -1
- package/types/src/RadioBar/RadioBarContext.d.ts +4 -2
- package/types/src/RadioList/RadioListContext.d.ts +0 -1
- package/types/src/ResultsMenu/ResultsMenu.d.ts +8 -2
- package/types/src/Search/Search.d.ts +4 -0
- package/types/src/Select/Select.d.ts +13 -4
- package/types/src/Select/SelectBase.d.ts +12 -4
- package/types/src/SidePanel/SidePanel.d.ts +2 -1
- package/types/src/Slider/Slider.d.ts +3 -3
- package/types/src/SlidingPanels/SlidingPanels.d.ts +2 -0
- package/types/src/StepBar/StepBarContext.d.ts +0 -1
- package/types/src/TabBar/TabBarContext.d.ts +0 -1
- package/types/src/Table/HeadCell.d.ts +7 -3
- package/types/src/Table/Table.d.ts +2 -3
- package/types/src/Table/TableContext.d.ts +5 -0
- package/types/src/Text/Text.d.ts +22 -12
- package/types/src/TextArea/TextArea.d.ts +190 -0
- package/types/src/TextArea/docs/examples/Basic.d.ts +2 -0
- package/types/src/TextArea/docs/examples/Disabled.d.ts +2 -0
- package/types/src/TextArea/docs/examples/Error.d.ts +2 -0
- package/types/src/TextArea/docs/examples/Inline.d.ts +2 -0
- package/types/src/TextArea/docs/examples/Uncontrolled.d.ts +2 -0
- package/types/src/TextArea/index.d.ts +2 -0
- package/types/src/{Text → TextArea}/syncHeightWithShadow.d.ts +1 -2
- package/types/src/Tooltip/Tooltip.d.ts +8 -5
- package/types/src/TransitionOpen/TransitionOpen.d.ts +3 -0
- package/types/src/TransitionOpen/index.d.ts +1 -0
- package/types/src/Typography/Typography.d.ts +78 -0
- package/types/src/Typography/docs/examples/Basic.d.ts +2 -0
- package/types/src/Typography/docs/examples/Variants.d.ts +2 -0
- package/types/src/Typography/index.d.ts +2 -0
- package/types/src/Typography/test/Typography.unit.d.ts +1 -0
- package/types/src/fixtures/FetchOptions.d.ts +82 -2
- package/usePrevious.js +2 -2
- package/FetchOptions.js +0 -359
- package/types/src/FetchOptions/FetchOptions.d.ts +0 -82
- package/types/src/FetchOptions/index.d.ts +0 -2
package/Tooltip.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 = 146);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
@@ -108,7 +108,7 @@ module.exports = require("@splunk/ui-utils/id");
|
|
|
108
108
|
|
|
109
109
|
/***/ }),
|
|
110
110
|
|
|
111
|
-
/***/
|
|
111
|
+
/***/ 12:
|
|
112
112
|
/***/ (function(module, exports) {
|
|
113
113
|
|
|
114
114
|
module.exports = require("@splunk/react-ui/Clickable");
|
|
@@ -122,7 +122,7 @@ module.exports = require("@splunk/react-ui/ScreenReaderContent");
|
|
|
122
122
|
|
|
123
123
|
/***/ }),
|
|
124
124
|
|
|
125
|
-
/***/
|
|
125
|
+
/***/ 146:
|
|
126
126
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
127
127
|
|
|
128
128
|
"use strict";
|
|
@@ -144,7 +144,7 @@ var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_pr
|
|
|
144
144
|
var external_lodash_ = __webpack_require__(4);
|
|
145
145
|
|
|
146
146
|
// EXTERNAL MODULE: external "@splunk/react-ui/Popover"
|
|
147
|
-
var Popover_ = __webpack_require__(
|
|
147
|
+
var Popover_ = __webpack_require__(17);
|
|
148
148
|
var Popover_default = /*#__PURE__*/__webpack_require__.n(Popover_);
|
|
149
149
|
|
|
150
150
|
// EXTERNAL MODULE: external "@splunk/react-ui/ScreenReaderContent"
|
|
@@ -209,7 +209,7 @@ var external_styled_components_ = __webpack_require__(3);
|
|
|
209
209
|
var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_);
|
|
210
210
|
|
|
211
211
|
// EXTERNAL MODULE: external "@splunk/react-ui/Clickable"
|
|
212
|
-
var Clickable_ = __webpack_require__(
|
|
212
|
+
var Clickable_ = __webpack_require__(12);
|
|
213
213
|
var Clickable_default = /*#__PURE__*/__webpack_require__.n(Clickable_);
|
|
214
214
|
|
|
215
215
|
// CONCATENATED MODULE: ./src/Tooltip/TooltipStyles.ts
|
|
@@ -417,6 +417,12 @@ var Tooltip_Tooltip = /*#__PURE__*/function (_Component) {
|
|
|
417
417
|
});
|
|
418
418
|
});
|
|
419
419
|
|
|
420
|
+
_defineProperty(_assertThisInitialized(_this), "handleClick", function (e) {
|
|
421
|
+
_this.handleRequestClose(e, {
|
|
422
|
+
reason: 'toggleClick'
|
|
423
|
+
});
|
|
424
|
+
});
|
|
425
|
+
|
|
420
426
|
_defineProperty(_assertThisInitialized(_this), "handleFocus", function (e) {
|
|
421
427
|
_this.handleRequestOpen(e, {
|
|
422
428
|
reason: 'focusToggle'
|
|
@@ -449,6 +455,10 @@ var Tooltip_Tooltip = /*#__PURE__*/function (_Component) {
|
|
|
449
455
|
});
|
|
450
456
|
}
|
|
451
457
|
|
|
458
|
+
_this.setState({
|
|
459
|
+
lastCloseReason: data.reason
|
|
460
|
+
});
|
|
461
|
+
|
|
452
462
|
(_this$props$onRequest = (_this$props = _this.props).onRequestClose) === null || _this$props$onRequest === void 0 ? void 0 : _this$props$onRequest.call(_this$props, e, data);
|
|
453
463
|
}, closeDelay);
|
|
454
464
|
});
|
|
@@ -549,6 +559,7 @@ var Tooltip_Tooltip = /*#__PURE__*/function (_Component) {
|
|
|
549
559
|
"data-test-popover-id": this.popoverId,
|
|
550
560
|
ref: elementRef
|
|
551
561
|
}, otherProps), /*#__PURE__*/external_react_default.a.createElement(StyledToggleComp, {
|
|
562
|
+
onClick: this.handleClick,
|
|
552
563
|
onFocus: this.handleFocus,
|
|
553
564
|
onBlur: this.handleBlur,
|
|
554
565
|
ref: this.handleMount,
|
|
@@ -599,7 +610,7 @@ TooltipWithTheme.propTypes = Tooltip_Tooltip.propTypes;
|
|
|
599
610
|
|
|
600
611
|
/***/ }),
|
|
601
612
|
|
|
602
|
-
/***/
|
|
613
|
+
/***/ 17:
|
|
603
614
|
/***/ (function(module, exports) {
|
|
604
615
|
|
|
605
616
|
module.exports = require("@splunk/react-ui/Popover");
|
package/TransitionOpen.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 = 173);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
@@ -101,7 +101,7 @@ module.exports = require("prop-types");
|
|
|
101
101
|
|
|
102
102
|
/***/ }),
|
|
103
103
|
|
|
104
|
-
/***/
|
|
104
|
+
/***/ 173:
|
|
105
105
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
106
106
|
|
|
107
107
|
"use strict";
|
|
@@ -129,7 +129,7 @@ var Animation_ = __webpack_require__(30);
|
|
|
129
129
|
var focus_ = __webpack_require__(26);
|
|
130
130
|
|
|
131
131
|
// EXTERNAL MODULE: external "@splunk/ui-utils/style"
|
|
132
|
-
var style_ = __webpack_require__(
|
|
132
|
+
var style_ = __webpack_require__(31);
|
|
133
133
|
|
|
134
134
|
// EXTERNAL MODULE: external "react-spring"
|
|
135
135
|
var external_react_spring_ = __webpack_require__(18);
|
|
@@ -234,6 +234,8 @@ var TransitionOpen_TransitionOpen = /*#__PURE__*/function (_Component) {
|
|
|
234
234
|
|
|
235
235
|
_this = _super.call(this, props);
|
|
236
236
|
|
|
237
|
+
_defineProperty(_assertThisInitialized(_this), "allowAnimationUpdates", true);
|
|
238
|
+
|
|
237
239
|
_defineProperty(_assertThisInitialized(_this), "getValue", function (el) {
|
|
238
240
|
var animation = _this.props.animation;
|
|
239
241
|
var value = 0;
|
|
@@ -277,9 +279,11 @@ var TransitionOpen_TransitionOpen = /*#__PURE__*/function (_Component) {
|
|
|
277
279
|
_defineProperty(_assertThisInitialized(_this), "handleRest", function () {
|
|
278
280
|
var _this$props$onAnimati, _this$props;
|
|
279
281
|
|
|
280
|
-
_this.
|
|
281
|
-
|
|
282
|
-
|
|
282
|
+
if (_this.allowAnimationUpdates) {
|
|
283
|
+
_this.setState({
|
|
284
|
+
animating: false
|
|
285
|
+
});
|
|
286
|
+
}
|
|
283
287
|
|
|
284
288
|
(_this$props$onAnimati = (_this$props = _this.props).onAnimationEnd) === null || _this$props$onAnimati === void 0 ? void 0 : _this$props$onAnimati.call(_this$props);
|
|
285
289
|
});
|
|
@@ -420,6 +424,11 @@ var TransitionOpen_TransitionOpen = /*#__PURE__*/function (_Component) {
|
|
|
420
424
|
}); // eslint-disable-line react/no-did-update-set-state
|
|
421
425
|
}
|
|
422
426
|
}
|
|
427
|
+
}, {
|
|
428
|
+
key: "componentWillUnmount",
|
|
429
|
+
value: function componentWillUnmount() {
|
|
430
|
+
this.allowAnimationUpdates = false;
|
|
431
|
+
}
|
|
423
432
|
}, {
|
|
424
433
|
key: "render",
|
|
425
434
|
value: function render() {
|
|
@@ -454,6 +463,7 @@ _defineProperty(TransitionOpen_TransitionOpen, "getDerivedStateFromProps", funct
|
|
|
454
463
|
// CONCATENATED MODULE: ./src/TransitionOpen/index.ts
|
|
455
464
|
|
|
456
465
|
|
|
466
|
+
|
|
457
467
|
/***/ }),
|
|
458
468
|
|
|
459
469
|
/***/ 18:
|
|
@@ -491,17 +501,17 @@ module.exports = require("@splunk/react-ui/Animation");
|
|
|
491
501
|
|
|
492
502
|
/***/ }),
|
|
493
503
|
|
|
494
|
-
/***/
|
|
504
|
+
/***/ 31:
|
|
495
505
|
/***/ (function(module, exports) {
|
|
496
506
|
|
|
497
|
-
module.exports = require("
|
|
507
|
+
module.exports = require("@splunk/ui-utils/style");
|
|
498
508
|
|
|
499
509
|
/***/ }),
|
|
500
510
|
|
|
501
|
-
/***/
|
|
511
|
+
/***/ 4:
|
|
502
512
|
/***/ (function(module, exports) {
|
|
503
513
|
|
|
504
|
-
module.exports = require("
|
|
514
|
+
module.exports = require("lodash");
|
|
505
515
|
|
|
506
516
|
/***/ })
|
|
507
517
|
|
package/Typography.js
ADDED
|
@@ -0,0 +1,225 @@
|
|
|
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 = 179);
|
|
86
|
+
/******/ })
|
|
87
|
+
/************************************************************************/
|
|
88
|
+
/******/ ({
|
|
89
|
+
|
|
90
|
+
/***/ 1:
|
|
91
|
+
/***/ (function(module, exports) {
|
|
92
|
+
|
|
93
|
+
module.exports = require("prop-types");
|
|
94
|
+
|
|
95
|
+
/***/ }),
|
|
96
|
+
|
|
97
|
+
/***/ 179:
|
|
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 */ Typography_Typography; });
|
|
106
|
+
__webpack_require__.d(__webpack_exports__, "Typography", function() { return /* reexport */ Typography; });
|
|
107
|
+
|
|
108
|
+
// EXTERNAL MODULE: external "react"
|
|
109
|
+
var external_react_ = __webpack_require__(2);
|
|
110
|
+
var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
|
|
111
|
+
|
|
112
|
+
// EXTERNAL MODULE: external "prop-types"
|
|
113
|
+
var external_prop_types_ = __webpack_require__(1);
|
|
114
|
+
var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
|
|
115
|
+
|
|
116
|
+
// EXTERNAL MODULE: external "lodash"
|
|
117
|
+
var external_lodash_ = __webpack_require__(4);
|
|
118
|
+
|
|
119
|
+
// EXTERNAL MODULE: external "@splunk/themes/mixins"
|
|
120
|
+
var mixins_ = __webpack_require__(56);
|
|
121
|
+
var mixins_default = /*#__PURE__*/__webpack_require__.n(mixins_);
|
|
122
|
+
|
|
123
|
+
// EXTERNAL MODULE: external "styled-components"
|
|
124
|
+
var external_styled_components_ = __webpack_require__(3);
|
|
125
|
+
var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_);
|
|
126
|
+
|
|
127
|
+
// CONCATENATED MODULE: ./src/Typography/Typography.tsx
|
|
128
|
+
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); }
|
|
129
|
+
|
|
130
|
+
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; }
|
|
131
|
+
|
|
132
|
+
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; }
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
var propTypes = {
|
|
140
|
+
children: external_prop_types_default.a.node.isRequired,
|
|
141
|
+
as: external_prop_types_default.a.string.isRequired,
|
|
142
|
+
elementRef: external_prop_types_default.a.oneOfType([external_prop_types_default.a.func, external_prop_types_default.a.object]),
|
|
143
|
+
family: external_prop_types_default.a.oneOf(['sansSerif', 'monospace']),
|
|
144
|
+
variant: external_prop_types_default.a.oneOf(mixins_["typographyVariants"]),
|
|
145
|
+
size: external_prop_types_default.a.number,
|
|
146
|
+
lineHeight: external_prop_types_default.a.number,
|
|
147
|
+
color: external_prop_types_default.a.oneOf(['active', 'default', 'disabled', 'inverted', 'muted']),
|
|
148
|
+
weight: external_prop_types_default.a.oneOf([300, 400, 500, 600, 700, 800, 900, 'light', 'normal', 'semiBold', 'bold', 'extraBold', 'heavy']),
|
|
149
|
+
withReset: external_prop_types_default.a.bool
|
|
150
|
+
};
|
|
151
|
+
var paramsToExtract = {
|
|
152
|
+
family: true,
|
|
153
|
+
size: true,
|
|
154
|
+
lineHeight: true,
|
|
155
|
+
color: true,
|
|
156
|
+
weight: true,
|
|
157
|
+
withReset: true
|
|
158
|
+
};
|
|
159
|
+
var keys = Object.keys(paramsToExtract);
|
|
160
|
+
var StyledTypography = external_styled_components_default.a.p.withConfig({
|
|
161
|
+
displayName: "Typography__StyledTypography",
|
|
162
|
+
componentId: "cgxs34-0"
|
|
163
|
+
})(["", ""], function (_ref) {
|
|
164
|
+
var $variant = _ref.$variant,
|
|
165
|
+
$typographyParams = _ref.$typographyParams;
|
|
166
|
+
return $variant ? mixins_default.a.typography($variant, $typographyParams) : mixins_default.a.typography($typographyParams);
|
|
167
|
+
});
|
|
168
|
+
/**
|
|
169
|
+
* Typography renders text content with styling based on the Splunk Design System.
|
|
170
|
+
*/
|
|
171
|
+
|
|
172
|
+
function Typography(_ref2) {
|
|
173
|
+
var children = _ref2.children,
|
|
174
|
+
as = _ref2.as,
|
|
175
|
+
elementRef = _ref2.elementRef,
|
|
176
|
+
otherProps = _objectWithoutProperties(_ref2, ["children", "as", "elementRef"]);
|
|
177
|
+
|
|
178
|
+
// @docs-props-type TypographyPropsBase
|
|
179
|
+
var variant = otherProps.variant;
|
|
180
|
+
var typographyParams = Object(external_lodash_["pick"])(otherProps, keys);
|
|
181
|
+
return /*#__PURE__*/external_react_default.a.createElement(StyledTypography, _extends({
|
|
182
|
+
as: as,
|
|
183
|
+
ref: elementRef,
|
|
184
|
+
"data-test": "typography",
|
|
185
|
+
$variant: variant,
|
|
186
|
+
$typographyParams: typographyParams
|
|
187
|
+
}, otherProps), children);
|
|
188
|
+
}
|
|
189
|
+
Typography.propTypes = propTypes;
|
|
190
|
+
/* harmony default export */ var Typography_Typography = (Typography);
|
|
191
|
+
// CONCATENATED MODULE: ./src/Typography/index.ts
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
/***/ }),
|
|
196
|
+
|
|
197
|
+
/***/ 2:
|
|
198
|
+
/***/ (function(module, exports) {
|
|
199
|
+
|
|
200
|
+
module.exports = require("react");
|
|
201
|
+
|
|
202
|
+
/***/ }),
|
|
203
|
+
|
|
204
|
+
/***/ 3:
|
|
205
|
+
/***/ (function(module, exports) {
|
|
206
|
+
|
|
207
|
+
module.exports = require("styled-components");
|
|
208
|
+
|
|
209
|
+
/***/ }),
|
|
210
|
+
|
|
211
|
+
/***/ 4:
|
|
212
|
+
/***/ (function(module, exports) {
|
|
213
|
+
|
|
214
|
+
module.exports = require("lodash");
|
|
215
|
+
|
|
216
|
+
/***/ }),
|
|
217
|
+
|
|
218
|
+
/***/ 56:
|
|
219
|
+
/***/ (function(module, exports) {
|
|
220
|
+
|
|
221
|
+
module.exports = require("@splunk/themes/mixins");
|
|
222
|
+
|
|
223
|
+
/***/ })
|
|
224
|
+
|
|
225
|
+
/******/ });
|
package/WaitSpinner.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 = 174);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
@@ -101,7 +101,7 @@ module.exports = require("prop-types");
|
|
|
101
101
|
|
|
102
102
|
/***/ }),
|
|
103
103
|
|
|
104
|
-
/***/
|
|
104
|
+
/***/ 174:
|
|
105
105
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
106
106
|
|
|
107
107
|
"use strict";
|
|
@@ -120,7 +120,7 @@ var external_prop_types_ = __webpack_require__(1);
|
|
|
120
120
|
var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
|
|
121
121
|
|
|
122
122
|
// EXTERNAL MODULE: external "@splunk/react-ui/AnimationToggle"
|
|
123
|
-
var AnimationToggle_ = __webpack_require__(
|
|
123
|
+
var AnimationToggle_ = __webpack_require__(36);
|
|
124
124
|
|
|
125
125
|
// EXTERNAL MODULE: external "@splunk/themes"
|
|
126
126
|
var themes_ = __webpack_require__(0);
|
|
@@ -281,7 +281,7 @@ module.exports = require("styled-components");
|
|
|
281
281
|
|
|
282
282
|
/***/ }),
|
|
283
283
|
|
|
284
|
-
/***/
|
|
284
|
+
/***/ 36:
|
|
285
285
|
/***/ (function(module, exports) {
|
|
286
286
|
|
|
287
287
|
module.exports = require("@splunk/react-ui/AnimationToggle");
|
package/cypress.json
CHANGED
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@splunk/react-ui",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.12.0",
|
|
4
4
|
"description": "Library of React components that implement the Splunk design language",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Splunk Inc.",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "cross-env NODE_ENV=production webpack && yarn types:build && yarn build-storybook",
|
|
9
9
|
"docs": "NODE_ENV=production webpack --config docs.gen.webpack.config.js",
|
|
10
|
+
"docs:publish": "cicd-publish-docs docs --force",
|
|
10
11
|
"docs:start": "webpack serve --config docs.gen.webpack.config.js",
|
|
11
12
|
"eslint": "eslint src .storybook --ext \".ts,.tsx,.js,.jsx\"",
|
|
12
13
|
"eslint:fix": "yarn run eslint --fix",
|
|
@@ -15,6 +16,8 @@
|
|
|
15
16
|
"lint:ci": "yarn run eslint:ci && yarn run stylelint",
|
|
16
17
|
"start": "cross-env NODE_ENV=development webpack --watch",
|
|
17
18
|
"storybook": "start-storybook -p 6006",
|
|
19
|
+
"storybook:test": "./.storybook/scripts/test.sh",
|
|
20
|
+
"storybook:test:all": "./.storybook/scripts/test.sh --all",
|
|
18
21
|
"storybook:build": "./.storybook/scripts/build.sh",
|
|
19
22
|
"stylelint": "stylelint \"src/**/*.{ts,tsx,js,jsx}\" --config stylelint.config.js",
|
|
20
23
|
"test": "jest",
|
|
@@ -37,8 +40,8 @@
|
|
|
37
40
|
},
|
|
38
41
|
"dependencies": {
|
|
39
42
|
"@splunk/react-icons": "^3.2.0",
|
|
40
|
-
"@splunk/themes": "^0.
|
|
41
|
-
"@splunk/ui-utils": "^1.
|
|
43
|
+
"@splunk/themes": "^0.13.0",
|
|
44
|
+
"@splunk/ui-utils": "^1.5.0",
|
|
42
45
|
"@types/commonmark": "^0.27.0",
|
|
43
46
|
"@types/lodash": "^4.14.156",
|
|
44
47
|
"@types/react": "^16.9.38",
|
|
@@ -46,6 +49,7 @@
|
|
|
46
49
|
"@types/react-resize-detector": "^3.1.1",
|
|
47
50
|
"@types/styled-components": "^5.1.0",
|
|
48
51
|
"@types/tinycolor2": "^1.4.2",
|
|
52
|
+
"axe-html-reporter": "^2.2.3",
|
|
49
53
|
"commonmark": "^0.27.0",
|
|
50
54
|
"commonmark-react-renderer": "^4.3.2",
|
|
51
55
|
"decimal.js-light": "^2.2.3",
|
|
@@ -54,15 +58,17 @@
|
|
|
54
58
|
"prop-types": "^15.6.2",
|
|
55
59
|
"react-resize-detector": "^3.2.1",
|
|
56
60
|
"react-sortable-hoc": "^1.11.0",
|
|
57
|
-
"react-spring": "^9.2.
|
|
61
|
+
"react-spring": "^9.2.4",
|
|
58
62
|
"tinycolor2": "^1.4.1",
|
|
59
63
|
"use-typed-event-listener": "^3.0.0"
|
|
60
64
|
},
|
|
61
65
|
"devDependencies": {
|
|
62
66
|
"@babel/core": "^7.2.0",
|
|
67
|
+
"@babel/plugin-transform-runtime": "^7.18.6",
|
|
63
68
|
"@cypress/react": "^5.12.4",
|
|
64
69
|
"@cypress/webpack-dev-server": "^1.8.2",
|
|
65
70
|
"@splunk/babel-preset": "^3.0.0",
|
|
71
|
+
"@splunk/cicd-tools": "^0.4.0",
|
|
66
72
|
"@splunk/docs-gen": "^0.11.2",
|
|
67
73
|
"@splunk/eslint-config": "^4.0.0",
|
|
68
74
|
"@splunk/react-docs": "^0.11.0",
|
|
@@ -70,11 +76,13 @@
|
|
|
70
76
|
"@splunk/test-runner-utils": "^0.4.0",
|
|
71
77
|
"@splunk/wdio-functional-test-runner": "^10.1.0",
|
|
72
78
|
"@splunk/webpack-configs": "^5.0.0",
|
|
73
|
-
"@storybook/addon-a11y": "^6.
|
|
74
|
-
"@storybook/addon-essentials": "^6.
|
|
79
|
+
"@storybook/addon-a11y": "^6.5.9",
|
|
80
|
+
"@storybook/addon-essentials": "^6.5.9",
|
|
81
|
+
"@storybook/addon-interactions": "^6.5.9",
|
|
75
82
|
"@storybook/csf": "^0.0.1",
|
|
76
|
-
"@storybook/react": "^6.
|
|
77
|
-
"@storybook/
|
|
83
|
+
"@storybook/react": "^6.5.9",
|
|
84
|
+
"@storybook/test-runner": "^0.4.0",
|
|
85
|
+
"@storybook/testing-react": "^1.3.0",
|
|
78
86
|
"@testing-library/cypress": "^8.0.2",
|
|
79
87
|
"@testing-library/jest-dom": "^5.16.1",
|
|
80
88
|
"@testing-library/react": "^12.1.2",
|
|
@@ -90,9 +98,11 @@
|
|
|
90
98
|
"@types/webpack-env": "^1.15.2",
|
|
91
99
|
"@typescript-eslint/eslint-plugin": "^4.8.2",
|
|
92
100
|
"@typescript-eslint/parser": "^4.8.2",
|
|
101
|
+
"axe-playwright": "^1.1.11",
|
|
93
102
|
"babel-loader": "^8.0.4",
|
|
94
103
|
"babel-plugin-istanbul": "^5.1.0",
|
|
95
104
|
"babel-plugin-styled-components": "^1.10.7",
|
|
105
|
+
"babel-plugin-transform-require-context": "^0.1.1",
|
|
96
106
|
"chai": "^3.5.0",
|
|
97
107
|
"core-js": "^3.6.4",
|
|
98
108
|
"cross-env": "^6.0.3",
|
|
@@ -115,8 +125,11 @@
|
|
|
115
125
|
"glob": "^7.1.6",
|
|
116
126
|
"html-webpack-plugin": "^3.2.0",
|
|
117
127
|
"jest": "^25.1.0",
|
|
128
|
+
"jest-image-snapshot": "^5.1.0",
|
|
118
129
|
"jest-junit": "^10.0.0",
|
|
130
|
+
"jest-stare": "^2.4.1",
|
|
119
131
|
"mkdirp": "^0.5.1",
|
|
132
|
+
"playwright": "^1.23.3",
|
|
120
133
|
"prismjs": "^1.25.0",
|
|
121
134
|
"prompt": "^1.0.0",
|
|
122
135
|
"raw-loader": "^0.5.1",
|
package/stubs-splunkui.d.ts
CHANGED
|
@@ -98,3 +98,16 @@ declare module '@splunk/wdio-functional-test-runner/testUtils' {
|
|
|
98
98
|
options?: { click?: boolean }
|
|
99
99
|
);
|
|
100
100
|
}
|
|
101
|
+
|
|
102
|
+
declare module '@splunk/react-docs/DocExample' {
|
|
103
|
+
function getDependencyVersions(
|
|
104
|
+
packageJSON: Record<string, unknown>,
|
|
105
|
+
additionalDependencies?: string[],
|
|
106
|
+
packageVersion?: string
|
|
107
|
+
): Record<string, unknown>;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
declare module '!!raw-loader!*' {
|
|
111
|
+
const contents: string;
|
|
112
|
+
export = contents;
|
|
113
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/* eslint-disable no-undef */
|
|
2
|
+
const { getJestConfig } = require('@storybook/test-runner');
|
|
3
|
+
|
|
4
|
+
// if component is passed to storybook:test then test will run for only that component
|
|
5
|
+
const testMatch = process.env.STORYBOOK_TEST_COMPONENT
|
|
6
|
+
? [
|
|
7
|
+
`**/${process.env.STORYBOOK_TEST_COMPONENT}.stories.[jt]s?(x)`,
|
|
8
|
+
`**/${process.env.STORYBOOK_TEST_COMPONENT}.examples.[jt]s?(x)`,
|
|
9
|
+
]
|
|
10
|
+
: ['**/*.stories.[jt]s?(x)', '**/*.examples.[jt]s?(x)'];
|
|
11
|
+
|
|
12
|
+
module.exports = {
|
|
13
|
+
// The default configuration comes from @storybook/test-runner
|
|
14
|
+
...getJestConfig(),
|
|
15
|
+
testMatch,
|
|
16
|
+
transform: {
|
|
17
|
+
'^.+\\.stories\\.[jt]sx?$': '@storybook/test-runner/playwright/transform',
|
|
18
|
+
'^.+\\.examples\\.[jt]sx?$': '@storybook/test-runner/playwright/transform',
|
|
19
|
+
'^.+\\.tsx?$': 'babel-jest',
|
|
20
|
+
},
|
|
21
|
+
snapshotResolver: '<rootDir>/.storybook/config/snapshotResolver.js',
|
|
22
|
+
reporters: [
|
|
23
|
+
'default',
|
|
24
|
+
[
|
|
25
|
+
'jest-stare',
|
|
26
|
+
{
|
|
27
|
+
resultDir: `./test-reports/${process.env.STORYBOOK_TEST_BROWSER}-${process.env.STORYBOOK_THEME_FAMILY}`,
|
|
28
|
+
reportTitle: `Visual A11y Test Report - ${process.env.STORYBOOK_TEST_BROWSER} ${process.env.STORYBOOK_THEME_FAMILY}`,
|
|
29
|
+
reportHeadline: `Visual A11y Test Report - ${process.env.STORYBOOK_TEST_BROWSER} ${process.env.STORYBOOK_THEME_FAMILY}`,
|
|
30
|
+
hidePending: true,
|
|
31
|
+
resultHtml: `visual-report.html`,
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
],
|
|
35
|
+
globals: {
|
|
36
|
+
__DEV__: true,
|
|
37
|
+
},
|
|
38
|
+
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import { legacyRefMode } from '@splunk/react-ui/Dropdown';
|
|
3
|
-
import { ButtonGroupContext } from '../ButtonGroup/ButtonGroupContext';
|
|
4
3
|
import { ClassComponentProps } from '../utils/types';
|
|
5
4
|
/** @public */
|
|
6
5
|
declare type ButtonClickHandler = (event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>, data: {
|
|
@@ -68,7 +67,6 @@ declare class Button extends Component<ButtonProps> {
|
|
|
68
67
|
private component;
|
|
69
68
|
static propTypes: React.WeakValidationMap<ClassComponentProps<ButtonPropsBase, Required<Pick<ButtonPropsBase, "disabled" | "selected" | "appearance" | "inline" | "error" | "openInNewContext" | "append" | "prepend" | "isMenu">>, "button", never>> | React.WeakValidationMap<ClassComponentProps<ButtonPropsBase, Required<Pick<ButtonPropsBase, "disabled" | "selected" | "appearance" | "inline" | "error" | "openInNewContext" | "append" | "prepend" | "isMenu">>, "a", "href">>;
|
|
70
69
|
static defaultProps: Required<Pick<ButtonPropsBase, "disabled" | "selected" | "appearance" | "inline" | "error" | "openInNewContext" | "append" | "prepend" | "isMenu">>;
|
|
71
|
-
static contextType: React.Context<ButtonGroupContext>;
|
|
72
70
|
static [legacyRefMode]: boolean;
|
|
73
71
|
private handleClick;
|
|
74
72
|
private handleMount;
|
package/types/src/Card/Body.d.ts
CHANGED
|
@@ -7,16 +7,21 @@ interface BodyPropsBase {
|
|
|
7
7
|
* A React ref which is set to the DOM element when the component mounts and null when it unmounts.
|
|
8
8
|
*/
|
|
9
9
|
elementRef?: React.Ref<HTMLDivElement>;
|
|
10
|
+
/**
|
|
11
|
+
* When true renders the `Card.Body` with padding. When false renders the `Card.Body` without padding. Default to true.
|
|
12
|
+
*/
|
|
13
|
+
inset?: boolean;
|
|
10
14
|
}
|
|
11
15
|
declare type BodyProps = ComponentProps<BodyPropsBase, 'div'>;
|
|
12
16
|
/**
|
|
13
17
|
* A styled container for `Card` body content.
|
|
14
18
|
*/
|
|
15
|
-
declare function Body({ children, ...otherProps }: BodyProps): JSX.Element;
|
|
19
|
+
declare function Body({ children, inset, ...otherProps }: BodyProps): JSX.Element;
|
|
16
20
|
declare namespace Body {
|
|
17
21
|
var propTypes: {
|
|
18
22
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
19
23
|
elementRef: PropTypes.Requireable<object>;
|
|
24
|
+
inset: PropTypes.Requireable<boolean>;
|
|
20
25
|
};
|
|
21
26
|
}
|
|
22
27
|
export default Body;
|