@splunk/react-ui 5.0.0-beta.3 → 5.0.0-beta.5
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 -2
- package/ButtonSimple.js +47 -41
- package/CHANGELOG.md +15 -2
- package/CHANGELOG.v5.mdx +73 -0
- package/Calendar.js +352 -469
- package/Card.js +163 -162
- package/Chip.js +171 -356
- package/Clickable.js +79 -76
- package/Code.js +19 -12
- package/Color.js +32 -32
- package/ComboBox.js +9 -7
- package/Date.js +160 -184
- package/DualListbox.js +549 -612
- package/File.js +546 -408
- package/FormRows.js +170 -157
- package/Image.js +124 -251
- package/JSONTree.js +496 -521
- package/Layer.js +162 -97
- package/Layout.d.ts +2 -0
- package/Link.js +20 -13
- package/MIGRATION.v5.mdx +48 -1
- package/Markdown.js +1 -1
- package/Menu.js +1 -1
- package/Message.js +132 -177
- package/MessageBar.js +121 -290
- package/Modal.js +2 -2
- package/ModalLayer.js +12 -12
- package/Multiselect.js +1982 -2334
- package/NonInteractiveCheckbox.js +29 -117
- package/Number.js +114 -114
- package/Popover.js +328 -326
- package/Progress.js +68 -54
- package/RadioBar.js +139 -136
- package/RadioList.js +67 -65
- package/Resize.js +377 -265
- package/ResultsMenu.js +573 -661
- package/Scroll.js +2 -2
- package/ScrollContainerContext.js +13 -9
- package/Search.js +1 -1
- package/Select.js +364 -361
- package/SidePanel.js +17 -21
- package/Slider.js +494 -372
- package/SlidingPanels.js +100 -102
- package/SplitButton.js +39 -25
- package/StepBar.js +3 -3
- package/Switch.js +136 -129
- package/TabBar.js +598 -466
- package/TabLayout.js +34 -34
- package/Table.js +1648 -1479
- package/Text.js +51 -50
- package/TextArea.js +280 -154
- package/Tooltip.js +413 -563
- package/TransitionOpen.js +2 -2
- package/Tree.js +2 -2
- package/Typography.js +30 -28
- package/WaitSpinner.js +6 -11
- package/cypress/support/commands.ts +14 -4
- package/cypress/support/index.d.ts +1 -1
- package/package.json +9 -11
- package/stubs-splunkui.d.ts +0 -4
- 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 +1 -1
- 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 +3 -1
- package/types/src/Card/Header.d.ts +2 -0
- package/types/src/Card/docs/examples/HeadingTitle.d.ts +3 -0
- 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 +12 -4
- package/types/src/CollapsiblePanel/SingleOpenPanelGroupContext.d.ts +0 -1
- package/types/src/ComboBox/ComboBox.d.ts +3 -3
- package/types/src/ControlGroup/docs/examples/CustomizedLabelTarget.d.ts +2 -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/DualListbox/DualListbox.d.ts +5 -1
- package/types/src/File/File.d.ts +4 -4
- 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 +2 -1
- 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 +4 -4
- package/types/src/FormRows/FormRowsContext.d.ts +1 -2
- package/types/src/FormRows/SortableRow.d.ts +1 -1
- 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/Link.d.ts +4 -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/Message/Message.d.ts +1 -1
- package/types/src/MessageBar/MessageBar.d.ts +6 -2
- package/types/src/Modal/ModalContext.d.ts +0 -1
- package/types/src/Multiselect/Compact.d.ts +46 -21
- package/types/src/Multiselect/Multiselect.d.ts +69 -36
- package/types/src/Multiselect/Normal.d.ts +45 -62
- package/types/src/Multiselect/Option.d.ts +42 -18
- package/types/src/Multiselect/docs/examples/Children.d.ts +2 -9
- package/types/src/Multiselect/docs/examples/Controlled.d.ts +2 -9
- package/types/src/Multiselect/docs/examples/CustomizeSelected.d.ts +2 -9
- package/types/src/Multiselect/docs/examples/Disabled.d.ts +2 -9
- package/types/src/Multiselect/docs/examples/Error.d.ts +2 -9
- package/types/src/Multiselect/docs/examples/Fetching.d.ts +2 -22
- package/types/src/Multiselect/docs/examples/Headings.d.ts +2 -1
- package/types/src/Multiselect/docs/examples/LoadMoreOnScrollBottom.d.ts +2 -25
- package/types/src/Multiselect/docs/examples/NewValues.d.ts +2 -9
- package/types/src/Multiselect/docs/examples/TabInput.d.ts +2 -9
- package/types/src/NonInteractiveCheckbox/NonInteractiveCheckbox.d.ts +8 -7
- 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/ResultsMenu/ResultsMenu.d.ts +23 -34
- 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 +4 -4
- 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 +15 -2
- 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/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 +11 -7
- package/types/src/TabBar/TabBarContext.d.ts +8 -3
- package/types/src/TabLayout/TabLayout.d.ts +8 -5
- 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/Tooltip/Tooltip.d.ts +26 -58
- package/types/src/Tooltip/docs/examples/Controlled.d.ts +2 -2
- package/types/src/Tree/TreeContext.d.ts +0 -1
- package/types/src/Typography/Typography.d.ts +27 -22
- 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/Date/Icon.d.ts +0 -3
- package/types/src/Image/icons/Cross.d.ts +0 -3
- package/types/src/TabBar/docs/examples/IconsAbove.d.ts +0 -3
- package/types/src/TabBar/docs/examples/VerticalIconsAbove.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/types/src/TabBar/docs/examples/{IconsLeft.d.ts → Icons.d.ts} +0 -0
- /package/types/src/TabBar/docs/examples/{VerticalIconsLeft.d.ts → VerticalIcons.d.ts} +0 -0
package/TabLayout.js
CHANGED
|
@@ -161,8 +161,8 @@
|
|
|
161
161
|
I.propTypes = O;
|
|
162
162
|
/* harmony default export */ const S = I;
|
|
163
163
|
// CONCATENATED MODULE: ./src/TabLayout/TabLayout.tsx
|
|
164
|
-
function
|
|
165
|
-
return
|
|
164
|
+
function T() {
|
|
165
|
+
return T = Object.assign ? Object.assign.bind() : function(e) {
|
|
166
166
|
for (var t = 1; t < arguments.length; t++) {
|
|
167
167
|
var n = arguments[t];
|
|
168
168
|
for (var r in n) {
|
|
@@ -170,15 +170,15 @@
|
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
172
|
return e;
|
|
173
|
-
},
|
|
173
|
+
}, T.apply(null, arguments);
|
|
174
174
|
}
|
|
175
|
-
function
|
|
176
|
-
return
|
|
175
|
+
function j(e, t) {
|
|
176
|
+
return x(e) || C(e, t) || A(e, t) || w();
|
|
177
177
|
}
|
|
178
|
-
function
|
|
178
|
+
function w() {
|
|
179
179
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
180
180
|
}
|
|
181
|
-
function
|
|
181
|
+
function A(e, t) {
|
|
182
182
|
if (e) {
|
|
183
183
|
if ("string" == typeof e) return q(e, t);
|
|
184
184
|
var n = {}.toString.call(e).slice(8, -1);
|
|
@@ -214,12 +214,12 @@
|
|
|
214
214
|
return i;
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
|
-
function
|
|
217
|
+
function x(e) {
|
|
218
218
|
if (Array.isArray(e)) return e;
|
|
219
219
|
}
|
|
220
|
-
function
|
|
220
|
+
function E(e, t) {
|
|
221
221
|
if (null == e) return {};
|
|
222
|
-
var n, r, a =
|
|
222
|
+
var n, r, a = _(e, t);
|
|
223
223
|
if (Object.getOwnPropertySymbols) {
|
|
224
224
|
var l = Object.getOwnPropertySymbols(e);
|
|
225
225
|
for (r = 0; r < l.length; r++) {
|
|
@@ -228,7 +228,7 @@
|
|
|
228
228
|
}
|
|
229
229
|
return a;
|
|
230
230
|
}
|
|
231
|
-
function
|
|
231
|
+
function _(e, t) {
|
|
232
232
|
if (null == e) return {};
|
|
233
233
|
var n = {};
|
|
234
234
|
for (var r in e) {
|
|
@@ -239,7 +239,7 @@
|
|
|
239
239
|
}
|
|
240
240
|
return n;
|
|
241
241
|
}
|
|
242
|
-
/** @public */ var
|
|
242
|
+
/** @public */ var k = {
|
|
243
243
|
autoActivate: l().bool,
|
|
244
244
|
activePanelId: l().string,
|
|
245
245
|
children: l().node,
|
|
@@ -247,14 +247,14 @@
|
|
|
247
247
|
elementRef: l().oneOfType([ l().func, l().object ]),
|
|
248
248
|
iconPosition: l().oneOf([ "above", "left" ]),
|
|
249
249
|
layout: l().oneOf([ "horizontal", "vertical" ]),
|
|
250
|
-
|
|
251
|
-
|
|
250
|
+
maxTabWidth: l().number,
|
|
251
|
+
onChange: l().func
|
|
252
252
|
};
|
|
253
253
|
/**
|
|
254
254
|
* The `TabLayout` is a group of managed `Panels`. Only one panel can be open at a time.
|
|
255
255
|
* `TabLayout` supports both the controlled and uncontrolled patterns.
|
|
256
|
-
*/ function
|
|
257
|
-
var t = e.autoActivate, a = e.activePanelId, l = e.children, i = e.defaultActivePanelId, c = e.elementRef, d = e.iconPosition, f = e.layout, v = f === void 0 ? "horizontal" : f, p = e.
|
|
256
|
+
*/ function R(e) {
|
|
257
|
+
var t = e.autoActivate, a = e.activePanelId, l = e.children, i = e.defaultActivePanelId, c = e.elementRef, d = e.iconPosition, f = e.layout, v = f === void 0 ? "horizontal" : f, p = e.maxTabWidth, b = e.onChange, y = E(e, [ "autoActivate", "activePanelId", "children", "defaultActivePanelId", "elementRef", "iconPosition", "layout", "maxTabWidth", "onChange" ]);
|
|
258
258
|
// @docs-props-type TabLayoutPropsBase
|
|
259
259
|
var g = s()({
|
|
260
260
|
componentName: "TabLayout",
|
|
@@ -264,28 +264,28 @@
|
|
|
264
264
|
defaultValuePropName: "defaultActivePanelId",
|
|
265
265
|
valuePropName: "activePanelId"
|
|
266
266
|
});
|
|
267
|
-
var h = (0, n.useState)(), P =
|
|
268
|
-
var S = (0, n.useState)(g ? undefined : i),
|
|
267
|
+
var h = (0, n.useState)(), P = j(h, 2), O = P[0], I = P[1];
|
|
268
|
+
var S = (0, n.useState)(g ? undefined : i), w = j(S, 2), A = w[0], q = w[1];
|
|
269
269
|
// Could use activePanelIdProp for isControlled route but chose not to b/c we always favor direct prop access in below logic in that scenario
|
|
270
270
|
var C = (0, n.useMemo)((function() {
|
|
271
|
-
return g ? a :
|
|
272
|
-
}), [ g, a,
|
|
273
|
-
var
|
|
274
|
-
var
|
|
271
|
+
return g ? a : A;
|
|
272
|
+
}), [ g, a, A ]);
|
|
273
|
+
var x = (0, n.useState)((0, o.createGUID)()), _ = j(x, 1), k = _[0];
|
|
274
|
+
var R = (0, n.useCallback)((function(e, t) {
|
|
275
275
|
var n = t.selectedTabId;
|
|
276
276
|
if (!g) {
|
|
277
277
|
q(n);
|
|
278
278
|
}
|
|
279
|
-
|
|
279
|
+
b === null || b === void 0 ? void 0 : b(e, {
|
|
280
280
|
activePanelId: n
|
|
281
281
|
});
|
|
282
|
-
}), [ g,
|
|
282
|
+
}), [ g, b ]);
|
|
283
283
|
var M = (0, n.useMemo)((function() {
|
|
284
284
|
var e = null;
|
|
285
285
|
var t = n.Children.toArray(l).filter(n.isValidElement).map((function(t) {
|
|
286
286
|
var a = t.props;
|
|
287
|
-
var l = "".concat(
|
|
288
|
-
var o = "".concat(
|
|
287
|
+
var l = "".concat(k, "-").concat(a.panelId);
|
|
288
|
+
var o = "".concat(k, "-").concat(a.panelId, "-tab");
|
|
289
289
|
if (a.panelId === C) {
|
|
290
290
|
e = (0, n.cloneElement)(t, {
|
|
291
291
|
"aria-labelledby": o,
|
|
@@ -299,7 +299,7 @@
|
|
|
299
299
|
i["data-title"] = c;
|
|
300
300
|
}
|
|
301
301
|
|
|
302
|
-
return r().createElement(u().Tab,
|
|
302
|
+
return r().createElement(u().Tab, T({
|
|
303
303
|
count: a.count,
|
|
304
304
|
icon: a.icon,
|
|
305
305
|
key: a.panelId,
|
|
@@ -313,12 +313,12 @@
|
|
|
313
313
|
}));
|
|
314
314
|
I(e);
|
|
315
315
|
return t;
|
|
316
|
-
}), [ C, l,
|
|
316
|
+
}), [ C, l, k ]);
|
|
317
317
|
(0, n.useEffect)((function() {
|
|
318
318
|
if (false) {}
|
|
319
319
|
}), [ O ]);
|
|
320
320
|
|
|
321
|
-
return r().createElement(m,
|
|
321
|
+
return r().createElement(m, T({
|
|
322
322
|
"data-test-active-panel-id": C,
|
|
323
323
|
"data-test": "tab-layout",
|
|
324
324
|
ref: c,
|
|
@@ -328,13 +328,13 @@
|
|
|
328
328
|
activeTabId: C,
|
|
329
329
|
iconPosition: d,
|
|
330
330
|
layout: v,
|
|
331
|
-
|
|
332
|
-
|
|
331
|
+
maxTabWidth: p,
|
|
332
|
+
onChange: R
|
|
333
333
|
}, M), O);
|
|
334
334
|
}
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
/* harmony default export */ const M =
|
|
335
|
+
R.Panel = S;
|
|
336
|
+
R.propTypes = k;
|
|
337
|
+
/* harmony default export */ const M = R;
|
|
338
338
|
// CONCATENATED MODULE: ./src/TabLayout/index.ts
|
|
339
339
|
module.exports = t;
|
|
340
340
|
/******/})();
|