@splunk/react-ui 4.21.0 → 4.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +7 -2
- 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 +1808 -2084
- package/Code.js.LICENSE.txt +8 -0
- package/CollapsiblePanel.js +586 -519
- package/Color.js +1066 -1069
- package/ColumnLayout.js +402 -363
- package/ComboBox.js +891 -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 +1105 -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 +3550 -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 +610 -527
- package/RadioList.js +483 -444
- package/Resize.js +530 -489
- package/ResultsMenu.js +494 -455
- package/ScreenReaderContent.js +142 -111
- package/Scroll.js +595 -456
- package/ScrollContainerContext.js +197 -206
- package/Search.js +744 -650
- package/Select.js +2442 -2345
- package/SidePanel.js +390 -284
- package/Slider.js +669 -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 +726 -680
- package/TabLayout.js +406 -322
- package/Table.js +4842 -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 +5 -5
- package/types/src/JSONTree/JSONTreeContext.d.ts +7 -0
- package/types/src/JSONTree/TreeNode.d.ts +5 -0
- package/useForceUpdate.js +112 -82
- package/useKeyPress.js +74 -71
- package/usePrevious.js +65 -65
- package/useRovingFocus.js +122 -138
package/WaitSpinner.js
CHANGED
|
@@ -1,206 +1,230 @@
|
|
|
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
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
const
|
|
71
|
-
var
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
var
|
|
81
|
-
|
|
82
|
-
var
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
})(["", "
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
var
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
})
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
});
|
|
114
|
-
var
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
})(["
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
});
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
}))
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
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 i in r) {
|
|
28
|
+
/******/ if (e.o(r, i) && !e.o(t, i)) {
|
|
29
|
+
/******/ Object.defineProperty(t, i, {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: r[i]
|
|
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 */ _
|
|
65
|
+
});
|
|
66
|
+
// CONCATENATED MODULE: external "react"
|
|
67
|
+
const r = require("react");
|
|
68
|
+
var i = e.n(r);
|
|
69
|
+
// CONCATENATED MODULE: external "prop-types"
|
|
70
|
+
const a = require("prop-types");
|
|
71
|
+
var n = e.n(a);
|
|
72
|
+
// CONCATENATED MODULE: external "@splunk/react-ui/AnimationToggle"
|
|
73
|
+
const s = require("@splunk/react-ui/AnimationToggle");
|
|
74
|
+
// CONCATENATED MODULE: external "@splunk/themes"
|
|
75
|
+
const o = require("@splunk/themes");
|
|
76
|
+
// CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
|
|
77
|
+
const l = require("@splunk/ui-utils/i18n");
|
|
78
|
+
// CONCATENATED MODULE: external "styled-components"
|
|
79
|
+
const c = require("styled-components");
|
|
80
|
+
var m = e.n(c);
|
|
81
|
+
// CONCATENATED MODULE: ./src/WaitSpinner/WaitSpinnerStyles.ts
|
|
82
|
+
var p = m().div.withConfig({
|
|
83
|
+
displayName: "WaitSpinnerStyles__Styled",
|
|
84
|
+
componentId: "sc-1nu971z-0"
|
|
85
|
+
})([ "", ";align-items:center;" ], o.mixins.reset("inline-flex"));
|
|
86
|
+
var f = (0, c.keyframes)([ "100%{transform:rotate(360deg);}" ]);
|
|
87
|
+
var d = (0, c.keyframes)([ "0%{transform:scale(0);opacity:0;}100%{transform:scale(1);opacity:1;}" ]);
|
|
88
|
+
var u = "2.07s";
|
|
89
|
+
var y = m().svg.withConfig({
|
|
90
|
+
displayName: "WaitSpinnerStyles__StyledSvg",
|
|
91
|
+
componentId: "sc-1nu971z-1"
|
|
92
|
+
})([ "", " ", "" ], (0, o.pickVariant)("$size", {
|
|
93
|
+
small: {
|
|
94
|
+
enterprise: (0, c.css)([ "width:14px;height:14px;" ]),
|
|
95
|
+
prisma: (0, c.css)([ "width:16px;height:16px;" ])
|
|
96
|
+
},
|
|
97
|
+
medium: {
|
|
98
|
+
enterprise: (0, c.css)([ "width:19px;height:19px;" ]),
|
|
99
|
+
prisma: (0, c.css)([ "width:24px;height:24px;" ])
|
|
100
|
+
},
|
|
101
|
+
large: {
|
|
102
|
+
enterprise: (0, c.css)([ "width:19px;height:19px;" ]),
|
|
103
|
+
prisma: (0, c.css)([ "width:40px;height:40px;" ])
|
|
104
|
+
}
|
|
105
|
+
}), (function(e) {
|
|
106
|
+
var t = e.$animated;
|
|
107
|
+
return t && (0, o.pick)({
|
|
108
|
+
enterprise: (0, c.css)([ "transform-origin:center;animation:", " 1.2s steps(64) infinite;" ], f),
|
|
109
|
+
prisma: (0, c.css)([ "animation:", " ", " infinite linear,", " 500ms cubic-bezier(0.01,0,0,1);" ], f, u, d)
|
|
110
|
+
});
|
|
111
|
+
}));
|
|
112
|
+
var h = (0, c.keyframes)([ "0%{stroke-dasharray:110 10;stroke-dashoffset:-5.5;animation-timing-function:cubic-bezier(0.8,0,0.83,1);}50%{stroke-dasharray:26 94;stroke-dashoffset:-152;}100%{stroke-dasharray:110 10;stroke-dashoffset:-246.5;animation-timing-function:cubic-bezier(0.33,0,0.67,1);}" ]);
|
|
113
|
+
var v = (0, c.keyframes)([ "0%{stroke-dasharray:7 113;stroke-dashoffset:3;animation-timing-function:cubic-bezier(0.8,0,0.83,1);}50%{stroke-dasharray:90 30;stroke-dashoffset:-60;}100%{stroke-dasharray:7 113;stroke-dashoffset:-238;animation-timing-function:cubic-bezier(0.33,0,0.67,1);}" ]);
|
|
114
|
+
var g = m().circle.withConfig({
|
|
115
|
+
displayName: "WaitSpinnerStyles__StyledPrismaBasePath",
|
|
116
|
+
componentId: "sc-1nu971z-2"
|
|
117
|
+
})([ "stroke:", ";stroke-width:2;fill:transparent;", " stroke-dasharray:110 10;stroke-dashoffset:-5.5;" ], o.variables.contentColorDisabled, (function(e) {
|
|
118
|
+
var t = e.$animated;
|
|
119
|
+
return t && (0, c.css)([ "animation:", " ", " infinite;animation-fill-mode:backwards;" ], h, u);
|
|
120
|
+
}));
|
|
121
|
+
var k = m().circle.withConfig({
|
|
122
|
+
displayName: "WaitSpinnerStyles__StyledPrismaFillPath",
|
|
123
|
+
componentId: "sc-1nu971z-3"
|
|
124
|
+
})([ "fill:transparent;stroke-width:2;stroke:", ";stroke-dasharray:7 113;stroke-dashoffset:3;", "" ], (0,
|
|
125
|
+
o.pickVariant)("$size", {
|
|
126
|
+
small: o.variables.contentColorDefault,
|
|
127
|
+
medium: o.variables.contentColorDefault,
|
|
128
|
+
large: o.variables.interactiveColorPrimary
|
|
129
|
+
}), (function(e) {
|
|
130
|
+
var t = e.$animated;
|
|
131
|
+
return t && (0, c.css)([ "animation:", " ", " infinite;" ], v, u);
|
|
132
|
+
}));
|
|
133
|
+
var b = m().circle.withConfig({
|
|
134
|
+
displayName: "WaitSpinnerStyles__StyledEnterpriseCircle",
|
|
135
|
+
componentId: "sc-1nu971z-4"
|
|
136
|
+
})([ "fill:transparent;stroke:", ";stroke-width:2px;", "" ], (0, o.pick)({
|
|
137
|
+
enterprise: {
|
|
138
|
+
dark: o.variables.white,
|
|
139
|
+
light: o.variables.gray60
|
|
140
|
+
},
|
|
141
|
+
prisma: o.variables.contentColorMuted
|
|
142
|
+
}), (0, o.pick)({
|
|
143
|
+
enterprise: (0, c.css)([ "stroke-dasharray:34 19;" ])
|
|
144
|
+
}));
|
|
145
|
+
// CONCATENATED MODULE: ./src/WaitSpinner/WaitSpinner.tsx
|
|
146
|
+
function w() {
|
|
147
|
+
w = Object.assign || function(e) {
|
|
148
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
149
|
+
var r = arguments[t];
|
|
150
|
+
for (var i in r) {
|
|
151
|
+
if (Object.prototype.hasOwnProperty.call(r, i)) {
|
|
152
|
+
e[i] = r[i];
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
return e;
|
|
157
|
+
};
|
|
158
|
+
return w.apply(this, arguments);
|
|
159
|
+
}
|
|
160
|
+
function x(e, t) {
|
|
161
|
+
if (e == null) return {};
|
|
162
|
+
var r = S(e, t);
|
|
163
|
+
var i, a;
|
|
164
|
+
if (Object.getOwnPropertySymbols) {
|
|
165
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
166
|
+
for (a = 0; a < n.length; a++) {
|
|
167
|
+
i = n[a];
|
|
168
|
+
if (t.indexOf(i) >= 0) continue;
|
|
169
|
+
if (!Object.prototype.propertyIsEnumerable.call(e, i)) continue;
|
|
170
|
+
r[i] = e[i];
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
return r;
|
|
174
|
+
}
|
|
175
|
+
function S(e, t) {
|
|
176
|
+
if (e == null) return {};
|
|
177
|
+
var r = {};
|
|
178
|
+
var i = Object.keys(e);
|
|
179
|
+
var a, n;
|
|
180
|
+
for (n = 0; n < i.length; n++) {
|
|
181
|
+
a = i[n];
|
|
182
|
+
if (t.indexOf(a) >= 0) continue;
|
|
183
|
+
r[a] = e[a];
|
|
184
|
+
}
|
|
185
|
+
return r;
|
|
186
|
+
}
|
|
187
|
+
var z = {
|
|
188
|
+
elementRef: n().oneOfType([ n().func, n().object ]),
|
|
189
|
+
screenReaderText: n().string,
|
|
190
|
+
size: n().oneOf([ "small", "medium", "large" ])
|
|
191
|
+
};
|
|
192
|
+
function O(e) {
|
|
193
|
+
var t = e.elementRef, r = e.screenReaderText, a = r === void 0 ? (0, l._)("Waiting") : r, n = e.size, c = n === void 0 ? "small" : n, m = x(e, [ "elementRef", "screenReaderText", "size" ]);
|
|
194
|
+
// @docs-props-type WaitSpinnerPropsBase
|
|
195
|
+
var f = (0, s.useAnimationToggle)() === "on";
|
|
196
|
+
var d = (0, o.useSplunkTheme)(), u = d.isPrisma;
|
|
197
|
+
var h = u ? "0 0 40 40" : "0 0 19 19";
|
|
198
|
+
|
|
199
|
+
return i().createElement(p, w({
|
|
200
|
+
"data-test": "wait-spinner"
|
|
201
|
+
}, m), i().createElement(y, {
|
|
202
|
+
viewBox: h,
|
|
203
|
+
version: "1.1",
|
|
204
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
205
|
+
ref: t,
|
|
206
|
+
$animated: f,
|
|
207
|
+
$size: c
|
|
208
|
+
}, a && i().createElement("title", null, a), i().createElement("g", null, u ? i().createElement(i().Fragment, null, i().createElement(g, {
|
|
209
|
+
r: "19",
|
|
210
|
+
cx: "20",
|
|
211
|
+
cy: "20",
|
|
212
|
+
$animated: f,
|
|
213
|
+
$size: c
|
|
214
|
+
}), i().createElement(k, {
|
|
215
|
+
r: "19",
|
|
216
|
+
cx: "20",
|
|
217
|
+
cy: "20",
|
|
218
|
+
$animated: f,
|
|
219
|
+
$size: c
|
|
220
|
+
})) : i().createElement(b, {
|
|
221
|
+
cx: "9.5",
|
|
222
|
+
cy: "9.5",
|
|
223
|
+
r: "8.5"
|
|
224
|
+
}))));
|
|
225
|
+
}
|
|
226
|
+
O.propTypes = z;
|
|
227
|
+
/* harmony default export */ const _ = O;
|
|
228
|
+
// CONCATENATED MODULE: ./src/WaitSpinner/index.ts
|
|
229
|
+
module.exports = t;
|
|
230
|
+
/******/})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@splunk/react-ui",
|
|
3
|
-
"version": "4.21.
|
|
3
|
+
"version": "4.21.1",
|
|
4
4
|
"description": "Library of React components that implement the Splunk design language",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Splunk Inc.",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@dnd-kit/sortable": "7.0.2",
|
|
43
43
|
"@dnd-kit/utilities": "3.2.1",
|
|
44
44
|
"@splunk/react-icons": "^4.0.2",
|
|
45
|
-
"@splunk/themes": "^0.16.
|
|
45
|
+
"@splunk/themes": "^0.16.3",
|
|
46
46
|
"@splunk/ui-utils": "^1.6.0",
|
|
47
47
|
"@types/commonmark": "^0.27.6",
|
|
48
48
|
"@types/lodash": "^4.14.156",
|
|
@@ -66,12 +66,12 @@
|
|
|
66
66
|
"@babel/core": "^7.2.0",
|
|
67
67
|
"@babel/plugin-transform-runtime": "^7.18.6",
|
|
68
68
|
"@splunk/babel-preset": "^4.0.0",
|
|
69
|
-
"@splunk/docs-gen": "1.0.0-beta.
|
|
69
|
+
"@splunk/docs-gen": "1.0.0-beta.8",
|
|
70
70
|
"@splunk/eslint-config": "^4.0.0",
|
|
71
|
-
"@splunk/react-docs": "1.0.0-beta.
|
|
71
|
+
"@splunk/react-docs": "1.0.0-beta.8",
|
|
72
72
|
"@splunk/stylelint-config": "^4.0.0",
|
|
73
73
|
"@splunk/test-runner-utils": "^0.4.1",
|
|
74
|
-
"@splunk/webpack-configs": "^7.0.
|
|
74
|
+
"@splunk/webpack-configs": "^7.0.1",
|
|
75
75
|
"@storybook/addon-a11y": "^6.5.9",
|
|
76
76
|
"@storybook/addon-essentials": "^6.5.9",
|
|
77
77
|
"@storybook/addon-interactions": "^6.5.9",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import { JSONElement, JSONTreeClickValueHandler, JSONTreeClickKeyHandler } from './JSONTree';
|
|
3
|
+
import JSONTreeContext from './JSONTreeContext';
|
|
3
4
|
import { ClassComponentProps } from '../utils/types';
|
|
4
5
|
interface JSONTreeNodePropsBase {
|
|
5
6
|
path?: (string | number)[];
|
|
@@ -11,6 +12,7 @@ interface JSONTreeNodePropsBase {
|
|
|
11
12
|
onClickKey?: JSONTreeClickKeyHandler;
|
|
12
13
|
onClickValue?: JSONTreeClickValueHandler;
|
|
13
14
|
overflow?: 'wrap' | 'scroll';
|
|
15
|
+
shift?: boolean;
|
|
14
16
|
}
|
|
15
17
|
declare const defaultProps: Required<Pick<JSONTreeNodePropsBase, 'path' | 'defaultOpen' | 'expandChildren' | 'indent' | 'indentLevel' | 'overflow'>>;
|
|
16
18
|
declare type JSONTreeNodeProps = ClassComponentProps<JSONTreeNodePropsBase, typeof defaultProps, 'span'>;
|
|
@@ -23,6 +25,9 @@ interface JSONTreeNodeState {
|
|
|
23
25
|
declare class JSONTreeNode extends Component<JSONTreeNodeProps, JSONTreeNodeState> {
|
|
24
26
|
private regularIndent;
|
|
25
27
|
private closingIndent;
|
|
28
|
+
private mutableShift;
|
|
29
|
+
context: React.ContextType<typeof JSONTreeContext>;
|
|
30
|
+
static contextType: React.Context<JSONTreeContext>;
|
|
26
31
|
static propTypes: React.WeakValidationMap<ClassComponentProps<JSONTreeNodePropsBase, Required<Pick<JSONTreeNodePropsBase, "path" | "overflow" | "defaultOpen" | "expandChildren" | "indent" | "indentLevel">>, "span", never>>;
|
|
27
32
|
static defaultProps: Required<Pick<JSONTreeNodePropsBase, "path" | "overflow" | "defaultOpen" | "expandChildren" | "indent" | "indentLevel">>;
|
|
28
33
|
constructor(props: JSONTreeNodeProps);
|