@splunk/react-ui 5.0.0-beta.2 → 5.0.0-beta.4
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 +185 -243
- package/Animation.js +2 -2
- package/Button.js +4 -4
- package/ButtonGroup.js +10 -11
- package/ButtonSimple.js +48 -42
- package/CHANGELOG.md +26 -0
- package/CHANGELOG.v5.mdx +81 -0
- package/Calendar.js +352 -469
- package/Card.js +178 -321
- package/Chip.js +154 -296
- package/Clickable.js +30 -30
- package/Code.js +64 -49
- package/Color.js +546 -462
- package/ComboBox.js +575 -767
- package/Date.js +144 -136
- package/Divider.js +29 -26
- package/DualListbox.js +441 -444
- package/File.js +707 -981
- package/FormRows.js +260 -286
- package/Image.js +124 -251
- package/JSONTree.js +129 -129
- package/Layout.d.ts +2 -0
- package/Link.js +12 -12
- package/MIGRATION.mdx +22 -1
- package/MIGRATION.v5.mdx +12 -1
- package/Menu.js +76 -76
- package/Message.js +77 -100
- package/MessageBar.js +141 -251
- package/Modal.js +42 -40
- package/ModalLayer.js +12 -12
- package/Multiselect.js +1989 -2362
- package/NonInteractiveCheckbox.js +30 -118
- package/Number.js +75 -73
- package/Popover.js +348 -350
- package/Progress.js +1 -1
- package/RadioBar.js +136 -136
- package/Resize.js +62 -65
- package/Scroll.js +2 -2
- package/Select.js +281 -283
- package/SidePanel.js +53 -55
- package/Slider.js +370 -364
- package/SlidingPanels.js +100 -102
- package/SplitButton.js +170 -343
- package/StaticContent.js +15 -13
- package/StepBar.js +61 -60
- package/Switch.js +150 -164
- package/TabBar.js +544 -417
- package/Table.js +1711 -1540
- package/Text.js +28 -26
- package/TextArea.js +26 -26
- package/Tooltip.js +416 -562
- package/TransitionOpen.js +179 -158
- package/Tree.d.ts +2 -0
- package/WaitSpinner.js +1 -1
- package/package.json +7 -9
- package/types/src/Accordion/Accordion.d.ts +14 -21
- package/types/src/Accordion/AccordionContext.d.ts +0 -1
- package/types/src/Animation/Animation.d.ts +2 -3
- package/types/src/AnimationToggle/docs/examples/Provider.d.ts +2 -2
- package/types/src/AnimationToggle/docs/examples/ToggleComponent.d.ts +2 -2
- package/types/src/AnimationToggle/useAnimationToggle.d.ts +1 -1
- package/types/src/Button/Button.d.ts +2 -2
- package/types/src/ButtonGroup/ButtonGroupContext.d.ts +0 -1
- package/types/src/ButtonSimple/ButtonSimple.d.ts +1 -3
- package/types/src/ButtonSimple/mixin.d.ts +1 -1
- package/types/src/Calendar/Calendar.d.ts +2 -2
- package/types/src/Calendar/{DateTable.d.ts → DateGrid.d.ts} +9 -9
- package/types/src/Calendar/Day.d.ts +8 -4
- package/types/src/Card/Card.d.ts +27 -14
- package/types/src/CardLayout/CardLayoutContext.d.ts +0 -1
- package/types/src/CardLayout/docs/examples/Interactive.d.ts +2 -2
- package/types/src/Clickable/Clickable.d.ts +1 -1
- package/types/src/CollapsiblePanel/SingleOpenPanelGroupContext.d.ts +0 -1
- package/types/src/Color/Color.d.ts +3 -3
- package/types/src/Color/ColorInput.d.ts +27 -0
- package/types/src/Color/Palette.d.ts +11 -18
- package/types/src/Color/Swatch.d.ts +3 -1
- package/types/src/ComboBox/ComboBox.d.ts +46 -50
- package/types/src/ComboBox/Option.d.ts +34 -18
- package/types/src/ControlGroup/docs/examples/CustomizedLabelTarget.d.ts +2 -2
- package/types/src/Date/Date.d.ts +3 -2
- package/types/src/Date/docs/examples/Controlled.d.ts +2 -2
- package/types/src/Date/docs/examples/HighlightToday.d.ts +2 -2
- package/types/src/DefinitionList/DefinitionListContext.d.ts +0 -1
- package/types/src/Divider/Divider.d.ts +14 -6
- package/types/src/Divider/docs/examples/Appearance.d.ts +3 -0
- package/types/src/DualListbox/DualListbox.d.ts +5 -1
- package/types/src/File/File.d.ts +6 -6
- package/types/src/File/FileContext.d.ts +0 -1
- package/types/src/File/Item.d.ts +11 -3
- package/types/src/File/ItemIcon.d.ts +7 -0
- package/types/src/File/docs/examples/Disabled.d.ts +2 -2
- package/types/src/File/docs/examples/DropAnywhere.d.ts +2 -2
- package/types/src/File/docs/examples/Multi.d.ts +2 -2
- package/types/src/File/docs/examples/Single.d.ts +2 -2
- package/types/src/FormRows/FormRows.d.ts +8 -8
- package/types/src/FormRows/FormRowsContext.d.ts +1 -2
- package/types/src/FormRows/Row.d.ts +2 -2
- package/types/src/FormRows/RowInternal.d.ts +1 -1
- package/types/src/FormRows/SortableRow.d.ts +3 -3
- package/types/src/FormRows/docs/examples/Basic.d.ts +2 -2
- package/types/src/FormRows/docs/examples/Header.d.ts +2 -2
- package/types/src/FormRows/docs/examples/Menu.d.ts +2 -2
- package/types/src/FormRows/docs/examples/ReorderOnly.d.ts +2 -2
- package/types/src/Image/Image.d.ts +1 -4
- package/types/src/JSONTree/docs/examples/Events.d.ts +2 -2
- package/types/src/Layout/Layout.d.ts +1 -0
- package/types/src/Link/icons/External.d.ts +1 -2
- package/types/src/Menu/Divider.d.ts +1 -1
- package/types/src/Menu/MenuContext.d.ts +0 -1
- package/types/src/MessageBar/MessageBar.d.ts +5 -1
- package/types/src/Modal/ModalContext.d.ts +0 -1
- package/types/src/Multiselect/Compact.d.ts +49 -21
- package/types/src/Multiselect/Multiselect.d.ts +73 -30
- package/types/src/Multiselect/Normal.d.ts +46 -57
- package/types/src/Multiselect/Option.d.ts +42 -18
- package/types/src/Multiselect/docs/examples/Children.d.ts +2 -2
- package/types/src/Multiselect/docs/examples/Controlled.d.ts +2 -2
- package/types/src/Multiselect/docs/examples/CustomizeSelected.d.ts +2 -2
- package/types/src/Multiselect/docs/examples/Disabled.d.ts +2 -2
- package/types/src/Multiselect/docs/examples/Error.d.ts +2 -2
- package/types/src/Multiselect/docs/examples/Fetching.d.ts +2 -2
- package/types/src/Multiselect/docs/examples/LoadMoreOnScrollBottom.d.ts +2 -2
- package/types/src/Multiselect/docs/examples/NewValues.d.ts +2 -2
- package/types/src/Multiselect/docs/examples/TabInput.d.ts +2 -2
- package/types/src/NonInteractiveCheckbox/NonInteractiveCheckbox.d.ts +9 -8
- package/types/src/Number/Number.d.ts +1 -0
- package/types/src/Number/docs/examples/Basic.d.ts +2 -2
- package/types/src/Number/docs/examples/Limits.d.ts +2 -2
- package/types/src/Number/docs/examples/Locale.d.ts +2 -2
- package/types/src/Popover/Popover.d.ts +1 -1
- package/types/src/Popover/PopoverMenuContext.d.ts +0 -1
- package/types/src/RadioBar/RadioBar.d.ts +1 -1
- package/types/src/RadioBar/RadioBarContext.d.ts +0 -1
- package/types/src/RadioList/RadioListContext.d.ts +0 -1
- package/types/src/Scroll/Inner.d.ts +1 -1
- package/types/src/Scroll/docs/examples/Controlled.d.ts +2 -2
- package/types/src/Search/Search.d.ts +2 -2
- package/types/src/Select/SelectBase.d.ts +2 -2
- package/types/src/SidePanel/SidePanel.d.ts +8 -3
- package/types/src/Slider/Slider.d.ts +1 -1
- package/types/src/Slider/docs/examples/Controlled.d.ts +2 -2
- package/types/src/Slider/docs/examples/CustomLabels.d.ts +2 -2
- package/types/src/Slider/getStepMarksBackground.d.ts +8 -0
- package/types/src/SlidingPanels/Panel.d.ts +2 -2
- package/types/src/SlidingPanels/SlidingPanels.d.ts +2 -2
- package/types/src/SlidingPanels/docs/examples/Basic.d.ts +2 -2
- package/types/src/SlidingPanels/docs/examples/Dropdown.d.ts +2 -2
- package/types/src/SplitButton/Item.d.ts +34 -20
- package/types/src/SplitButton/SplitButton.d.ts +4 -1
- package/types/src/StaticContent/StaticContent.d.ts +3 -1
- package/types/src/StepBar/Step.d.ts +1 -1
- package/types/src/StepBar/StepBar.d.ts +1 -1
- package/types/src/StepBar/StepBarContext.d.ts +0 -1
- package/types/src/Switch/Switch.d.ts +1 -9
- package/types/src/Switch/docs/examples/Basic.d.ts +2 -2
- package/types/src/Switch/docs/examples/Disabled.d.ts +2 -2
- package/types/src/TabBar/Tab.d.ts +12 -5
- package/types/src/TabBar/TabBar.d.ts +4 -3
- package/types/src/TabBar/TabBarContext.d.ts +7 -2
- package/types/src/Table/Head.d.ts +4 -15
- package/types/src/Table/HeadCell.d.ts +23 -25
- package/types/src/Table/HeadDropdownCell.d.ts +23 -26
- package/types/src/Table/HeadInner.d.ts +4 -10
- package/types/src/Table/Row.d.ts +6 -6
- package/types/src/Table/Table.d.ts +3 -8
- package/types/src/Table/TableContext.d.ts +0 -1
- package/types/src/Table/Toggle.d.ts +1 -1
- package/types/src/Text/Text.d.ts +5 -1
- package/types/src/Tooltip/Tooltip.d.ts +26 -58
- package/types/src/Tooltip/docs/examples/Controlled.d.ts +2 -2
- package/types/src/TransitionOpen/TransitionOpen.d.ts +6 -1
- package/types/src/Tree/TreeContext.d.ts +0 -1
- package/types/src/useForceUpdate/useForceUpdate.d.ts +0 -1
- package/types/src/useResizeObserver/useResizeObserver.d.ts +2 -1
- package/types/src/utils/types.d.ts +2 -3
- package/useResizeObserver.js +26 -19
- package/types/src/File/Icon.d.ts +0 -3
- package/types/src/File/IconCloud.d.ts +0 -3
- package/types/src/File/PaperClip.d.ts +0 -3
- package/types/src/File/Retry.d.ts +0 -2
- package/types/src/File/Trash.d.ts +0 -3
- package/types/src/FormRows/icons/FormRowsPlusIcon.d.ts +0 -3
- package/types/src/Image/icons/Cross.d.ts +0 -3
- package/types/src/Multiselect/docs/examples/CompactSelectAll.d.ts +0 -3
- package/types/src/Table/docs/examples/prisma/DockedHeaderScrollbar.d.ts +0 -3
- package/types/src/Tooltip/InfoIcon.d.ts +0 -4
package/SidePanel.js
CHANGED
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
e.r(t);
|
|
62
62
|
// EXPORTS
|
|
63
63
|
e.d(t, {
|
|
64
|
-
default: () => /* reexport */
|
|
64
|
+
default: () => /* reexport */ L
|
|
65
65
|
});
|
|
66
66
|
// CONCATENATED MODULE: external "react"
|
|
67
67
|
const r = require("react");
|
|
@@ -79,29 +79,25 @@
|
|
|
79
79
|
const c = require("styled-components");
|
|
80
80
|
var f = e.n(c);
|
|
81
81
|
// CONCATENATED MODULE: external "@splunk/react-ui/TransitionOpen"
|
|
82
|
-
const
|
|
83
|
-
var
|
|
82
|
+
const y = require("@splunk/react-ui/TransitionOpen");
|
|
83
|
+
var d = e.n(y);
|
|
84
84
|
// CONCATENATED MODULE: external "@splunk/themes"
|
|
85
|
-
const
|
|
85
|
+
const p = require("@splunk/themes");
|
|
86
86
|
// CONCATENATED MODULE: ./src/SidePanel/SidePanelStyles.ts
|
|
87
|
-
var m = (0, c.css)([ "", " position:fixed;flex-direction:column;box-shadow:", ";background-color:", ";z-index:", ";" ],
|
|
88
|
-
d.
|
|
89
|
-
enterprise: "0 0 12px rgba(0, 0, 0, 0.3)",
|
|
90
|
-
prisma: d.variables.overlayShadow
|
|
91
|
-
}), d.variables.backgroundColorSidebar, d.variables.zindexModal);
|
|
92
|
-
var b = f()(y()).withConfig({
|
|
87
|
+
var m = (0, c.css)([ "", " position:fixed;flex-direction:column;box-shadow:", ";background-color:", ";z-index:", ";" ], p.mixins.reset("flex"), p.variables.overlayShadow, p.variables.backgroundColorSidebar, p.variables.zindexModal);
|
|
88
|
+
var b = f()(d()).withConfig({
|
|
93
89
|
displayName: "SidePanelStyles__StyledLeftPanelTransitionOpen",
|
|
94
90
|
componentId: "mtbcuz-0"
|
|
95
91
|
})([ "", ";top:0;left:0;height:100vh;" ], m);
|
|
96
|
-
var v = f()(
|
|
92
|
+
var v = f()(d()).withConfig({
|
|
97
93
|
displayName: "SidePanelStyles__StyledRightPanelTransitionOpen",
|
|
98
94
|
componentId: "mtbcuz-1"
|
|
99
95
|
})([ "", ";right:0;top:0;height:100vh;" ], m);
|
|
100
|
-
var h = f()(
|
|
96
|
+
var h = f()(d()).withConfig({
|
|
101
97
|
displayName: "SidePanelStyles__StyledTopPanelTransitionOpen",
|
|
102
98
|
componentId: "mtbcuz-2"
|
|
103
99
|
})([ "", ";top:0;left:0;width:100vw;" ], m);
|
|
104
|
-
var g = f()(
|
|
100
|
+
var g = f()(d()).withConfig({
|
|
105
101
|
displayName: "SidePanelStyles__StyledBottomPanelTransitionOpen",
|
|
106
102
|
componentId: "mtbcuz-3"
|
|
107
103
|
})([ "", ";left:0;bottom:0;width:100vw;" ], m);
|
|
@@ -169,26 +165,26 @@
|
|
|
169
165
|
return ("string" === t ? String : Number)(e);
|
|
170
166
|
}
|
|
171
167
|
function A(e, t) {
|
|
172
|
-
return _(e) ||
|
|
168
|
+
return _(e) || M(e, t) || T(e, t) || N();
|
|
173
169
|
}
|
|
174
170
|
function N() {
|
|
175
171
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
176
172
|
}
|
|
177
|
-
function
|
|
173
|
+
function T(e, t) {
|
|
178
174
|
if (e) {
|
|
179
|
-
if ("string" == typeof e) return
|
|
175
|
+
if ("string" == typeof e) return E(e, t);
|
|
180
176
|
var r = {}.toString.call(e).slice(8, -1);
|
|
181
|
-
return "Object" === r && e.constructor && (r = e.constructor.name), "Map" === r || "Set" === r ? Array.from(e) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ?
|
|
177
|
+
return "Object" === r && e.constructor && (r = e.constructor.name), "Map" === r || "Set" === r ? Array.from(e) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? E(e, t) : void 0;
|
|
182
178
|
}
|
|
183
179
|
}
|
|
184
|
-
function
|
|
180
|
+
function E(e, t) {
|
|
185
181
|
(null == t || t > e.length) && (t = e.length);
|
|
186
182
|
for (var r = 0, n = Array(t); r < t; r++) {
|
|
187
183
|
n[r] = e[r];
|
|
188
184
|
}
|
|
189
185
|
return n;
|
|
190
186
|
}
|
|
191
|
-
function
|
|
187
|
+
function M(e, t) {
|
|
192
188
|
var r = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
|
|
193
189
|
if (null != r) {
|
|
194
190
|
var n, o, i, a, l = [], u = !0, s = !1;
|
|
@@ -238,6 +234,7 @@
|
|
|
238
234
|
/** @public */ var I = {
|
|
239
235
|
children: i().node,
|
|
240
236
|
dockPosition: i().oneOf([ "top", "bottom", "left", "right" ]),
|
|
237
|
+
elementRef: i().oneOfType([ i().func, i().object ]),
|
|
241
238
|
innerClassName: i().string,
|
|
242
239
|
innerStyle: i().object,
|
|
243
240
|
onAnimationEnd: i().func,
|
|
@@ -247,36 +244,36 @@
|
|
|
247
244
|
outerStyle: i().object,
|
|
248
245
|
useLayerForClickAway: i().bool
|
|
249
246
|
};
|
|
250
|
-
var
|
|
247
|
+
var R = {
|
|
251
248
|
left: "slideFromLeft",
|
|
252
249
|
right: "slideFromRight",
|
|
253
250
|
top: "slideFromTop",
|
|
254
251
|
bottom: "slideFromBottom"
|
|
255
252
|
};
|
|
256
|
-
var
|
|
253
|
+
var F = {
|
|
257
254
|
left: b,
|
|
258
255
|
right: v,
|
|
259
256
|
top: h,
|
|
260
257
|
bottom: g
|
|
261
258
|
};
|
|
262
|
-
function
|
|
263
|
-
var t = e.children, o = e.dockPosition, i = o === void 0 ? "right" : o, a = e.
|
|
259
|
+
function z(e) {
|
|
260
|
+
var t = e.children, o = e.dockPosition, i = o === void 0 ? "right" : o, a = e.elementRef, u = e.innerClassName, c = e.innerStyle, f = e.onAnimationEnd, y = e.onRequestClose, d = e.open, p = e.outerClassName, m = e.outerStyle, b = e.useLayerForClickAway, v = b === void 0 ? true : b, h = q(e, [ "children", "dockPosition", "elementRef", "innerClassName", "innerStyle", "onAnimationEnd", "onRequestClose", "open", "outerClassName", "outerStyle", "useLayerForClickAway" ]);
|
|
264
261
|
// @docs-props-type SidePanelPropsBase
|
|
265
|
-
var
|
|
266
|
-
var
|
|
262
|
+
var g = (0, r.useState)(false), S = A(g, 2), w = S[0], j = S[1];
|
|
263
|
+
var C = s()(d);
|
|
267
264
|
(0, r.useEffect)((function() {
|
|
268
265
|
// prevOpen starts undefined, and we don't want to make the comparison in that situation
|
|
269
|
-
if (
|
|
270
|
-
|
|
266
|
+
if (C != null && d !== C) {
|
|
267
|
+
j(true);
|
|
271
268
|
}
|
|
272
|
-
}), [
|
|
273
|
-
var
|
|
274
|
-
if (
|
|
269
|
+
}), [ d, C ]);
|
|
270
|
+
var k = (0, r.useMemo)((function() {
|
|
271
|
+
if (v) {
|
|
275
272
|
return "interactive";
|
|
276
273
|
}
|
|
277
274
|
return "hidden";
|
|
278
|
-
}), [
|
|
279
|
-
var
|
|
275
|
+
}), [ v ]);
|
|
276
|
+
var N = (0, r.useMemo)((function() {
|
|
280
277
|
if (i === "left" || i === "right") {
|
|
281
278
|
return {
|
|
282
279
|
height: "100%"
|
|
@@ -286,45 +283,46 @@
|
|
|
286
283
|
width: "100%"
|
|
287
284
|
};
|
|
288
285
|
}), [ i ]);
|
|
289
|
-
var
|
|
290
|
-
return P(P({},
|
|
291
|
-
}), [
|
|
286
|
+
var T = (0, r.useMemo)((function() {
|
|
287
|
+
return P(P({}, N), c);
|
|
288
|
+
}), [ N, c ]);
|
|
292
289
|
var E = (0, r.useCallback)((function() {
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
}), [
|
|
290
|
+
j(false);
|
|
291
|
+
f === null || f === void 0 ? void 0 : f();
|
|
292
|
+
}), [ f ]);
|
|
296
293
|
var M = (0, r.useMemo)((function() {
|
|
297
|
-
return
|
|
294
|
+
return F[i];
|
|
298
295
|
}), [ i ]);
|
|
299
|
-
var
|
|
296
|
+
var _ = (0, r.useCallback)((function() {
|
|
300
297
|
|
|
301
298
|
return n().createElement(M, O({
|
|
302
299
|
animateOnMount: true,
|
|
303
|
-
animation:
|
|
300
|
+
animation: R[i],
|
|
304
301
|
"data-test": "side-panel",
|
|
305
|
-
|
|
306
|
-
|
|
302
|
+
elementRef: a,
|
|
303
|
+
innerClassName: u,
|
|
304
|
+
innerStyle: T,
|
|
307
305
|
onAnimationEnd: E,
|
|
308
|
-
open:
|
|
309
|
-
outerClassName:
|
|
310
|
-
outerStyle:
|
|
306
|
+
open: d,
|
|
307
|
+
outerClassName: p,
|
|
308
|
+
outerStyle: m,
|
|
311
309
|
retainFocus: true,
|
|
312
310
|
role: "dialog",
|
|
313
311
|
tabIndex: -1,
|
|
314
312
|
takeFocus: true
|
|
315
|
-
},
|
|
316
|
-
}), [ t, i,
|
|
313
|
+
}, h), t);
|
|
314
|
+
}), [ t, i, a, T, E, u, d, p, m, M, h ]);
|
|
317
315
|
|
|
318
316
|
return n().createElement(l(), {
|
|
319
|
-
childrenInAnimation:
|
|
320
|
-
onRequestClose:
|
|
321
|
-
open:
|
|
322
|
-
renderModal:
|
|
323
|
-
scrim:
|
|
317
|
+
childrenInAnimation: w,
|
|
318
|
+
onRequestClose: y,
|
|
319
|
+
open: d,
|
|
320
|
+
renderModal: _,
|
|
321
|
+
scrim: k
|
|
324
322
|
});
|
|
325
323
|
}
|
|
326
|
-
|
|
327
|
-
/* harmony default export */ const
|
|
324
|
+
z.propTypes = I;
|
|
325
|
+
/* harmony default export */ const L = z;
|
|
328
326
|
// CONCATENATED MODULE: ./src/SidePanel/index.ts
|
|
329
327
|
module.exports = t;
|
|
330
328
|
/******/})();
|