@splunk/react-ui 5.0.0 → 5.1.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 +59 -59
- package/Avatar.js +20 -20
- package/Breadcrumbs.js +46 -46
- package/Button.js +24 -24
- package/CHANGELOG.md +21 -2
- package/Calendar.js +69 -69
- package/Card.js +68 -68
- package/Chip.js +16 -16
- package/Clickable.js +29 -29
- package/Code.js +654 -519
- package/CollapsiblePanel.js +112 -112
- package/Color.js +107 -107
- package/ColumnLayout.js +35 -35
- package/ComboBox.js +190 -206
- package/ControlGroup.js +128 -120
- package/Date.js +148 -146
- package/DefinitionList.js +26 -26
- package/DualListbox.js +701 -717
- package/File.js +403 -403
- package/FormRows.js +66 -63
- package/Image.js +15 -15
- package/JSONTree.js +458 -357
- package/Layer.js +60 -72
- package/Markdown.js +66 -66
- package/Menu.js +44 -44
- package/Modal.js +49 -49
- package/ModalLayer.js +6 -6
- package/Monogram.js +16 -16
- package/Multiselect.js +622 -624
- package/Number.js +100 -100
- package/Paginator.js +7 -7
- package/Popover.js +453 -407
- package/Progress.js +12 -12
- package/Prose.js +6 -6
- package/RadioBar.js +180 -166
- package/RadioList.js +80 -79
- package/ResultsMenu.js +15 -15
- package/Scroll.js +50 -50
- package/Search.js +148 -164
- package/Select.js +668 -670
- package/Slider.js +30 -30
- package/SlidingPanels.js +24 -24
- package/SplitButton.js +50 -50
- package/StepBar.js +100 -100
- package/Switch.js +45 -45
- package/TabBar.js +196 -196
- package/TabLayout.js +16 -16
- package/Table.js +1207 -1193
- package/Text.js +65 -65
- package/TextArea.js +108 -93
- package/Tooltip.js +203 -197
- package/Tree.js +464 -366
- package/package.json +6 -6
- package/stubs-dependencies.d.ts +0 -70
- package/stubs-splunkui.d.ts +4 -0
- package/types/src/Code/Code.d.ts +17 -1
- package/types/src/Code/LineHighlights.d.ts +11 -0
- package/types/src/Code/LineNumbers.d.ts +6 -0
- package/types/src/Code/docs/examples/LineHighlights.d.ts +3 -0
- package/types/src/Code/docs/examples/LineNumbers.d.ts +3 -0
- package/types/src/Code/docs/examples/LineNumbersCustomStart.d.ts +3 -0
- package/types/src/Date/Date.d.ts +6 -1
- package/types/src/DefinitionList/DefinitionList.d.ts +6 -6
- package/types/src/FormRows/FormRows.d.ts +1 -1
- package/types/src/JSONTree/JSONTreeItem.d.ts +5 -2
- package/types/src/Markdown/Markdown.d.ts +1 -1
- package/types/src/Markdown/renderers/MarkdownBlockquote.d.ts +1 -1
- package/types/src/Markdown/renderers/MarkdownCodeBlock.d.ts +1 -1
- package/types/src/Markdown/renderers/index.d.ts +1 -1
- package/types/src/Popover/Popover.d.ts +1 -1
- package/types/src/RadioBar/Option.d.ts +1 -1
- package/types/src/RadioBar/RadioBar.d.ts +13 -6
- package/types/src/RadioBar/RadioBarContext.d.ts +4 -2
- package/types/src/RadioList/RadioList.d.ts +2 -1
- package/types/src/ScreenReaderContent/docs/examples/SkipLink.d.ts +3 -0
- package/types/src/Scroll/Inner.d.ts +1 -1
- package/types/src/Select/Option.d.ts +1 -1
- package/types/src/Select/Select.d.ts +1 -1
- package/types/src/Slider/docs/examples/Controlled.d.ts +1 -1
- package/types/src/TabLayout/Panel.d.ts +0 -1
- package/types/src/Table/Head.d.ts +1 -0
- package/types/src/Table/HeadCell.d.ts +2 -3
- package/types/src/Table/HeadDropdownCell.d.ts +2 -2
- package/types/src/Table/HeadInner.d.ts +4 -4
- package/types/src/Table/KeyboardSensor.d.ts +1 -1
- package/types/src/Table/RowDragCell.d.ts +1 -1
- package/types/src/Tooltip/Tooltip.d.ts +10 -5
- package/types/src/Tree/Item.d.ts +63 -0
- package/types/src/Tree/Tree.d.ts +13 -6
- package/types/src/Tree/TreeContext.d.ts +1 -1
- package/types/src/Tree/index.d.ts +1 -1
- package/types/src/useControlled/useControlled.d.ts +3 -1
- package/useControlled.js +29 -13
- package/types/src/Tree/TreeItem.d.ts +0 -44
package/TabLayout.js
CHANGED
|
@@ -70,14 +70,14 @@
|
|
|
70
70
|
// CONCATENATED MODULE: external "prop-types"
|
|
71
71
|
const a = require("prop-types");
|
|
72
72
|
var l = e.n(a);
|
|
73
|
-
// CONCATENATED MODULE: external "@splunk/ui-utils/id"
|
|
74
|
-
const o = require("@splunk/ui-utils/id");
|
|
75
73
|
// CONCATENATED MODULE: external "@splunk/react-ui/TabBar"
|
|
76
|
-
const
|
|
77
|
-
var
|
|
74
|
+
const o = require("@splunk/react-ui/TabBar");
|
|
75
|
+
var i = e.n(o);
|
|
78
76
|
// CONCATENATED MODULE: external "@splunk/react-ui/useControlled"
|
|
79
|
-
const
|
|
80
|
-
var
|
|
77
|
+
const u = require("@splunk/react-ui/useControlled");
|
|
78
|
+
var c = e.n(u);
|
|
79
|
+
// CONCATENATED MODULE: external "@splunk/ui-utils/id"
|
|
80
|
+
const s = require("@splunk/ui-utils/id");
|
|
81
81
|
// CONCATENATED MODULE: external "lodash/omit"
|
|
82
82
|
const d = require("lodash/omit");
|
|
83
83
|
var f = e.n(d);
|
|
@@ -254,9 +254,9 @@
|
|
|
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
256
|
*/ function R(e) {
|
|
257
|
-
var t = e.autoActivate, a = e.activePanelId, l = e.children,
|
|
257
|
+
var t = e.autoActivate, a = e.activePanelId, l = e.children, o = e.defaultActivePanelId, u = 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
|
-
var g =
|
|
259
|
+
var g = c()({
|
|
260
260
|
componentName: "TabLayout",
|
|
261
261
|
/* eslint-disable-next-line prefer-rest-params */
|
|
262
262
|
componentProps: arguments[0],
|
|
@@ -265,12 +265,12 @@
|
|
|
265
265
|
valuePropName: "activePanelId"
|
|
266
266
|
});
|
|
267
267
|
var h = (0, n.useState)(), P = j(h, 2), O = P[0], I = P[1];
|
|
268
|
-
var S = (0, n.useState)(g ? undefined :
|
|
268
|
+
var S = (0, n.useState)(g ? undefined : o), 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
271
|
return g ? a : A;
|
|
272
272
|
}), [ g, a, A ]);
|
|
273
|
-
var x = (0, n.useState)((0,
|
|
273
|
+
var x = (0, n.useState)((0, s.createGUID)()), _ = j(x, 1), k = _[0];
|
|
274
274
|
var R = (0, n.useCallback)((function(e, t) {
|
|
275
275
|
var n = t.selectedTabId;
|
|
276
276
|
if (!g) {
|
|
@@ -292,14 +292,14 @@
|
|
|
292
292
|
id: l
|
|
293
293
|
});
|
|
294
294
|
}
|
|
295
|
-
var
|
|
295
|
+
var u = {};
|
|
296
296
|
// tell TS that PanelProps can contain `data-title`
|
|
297
297
|
var c = a["data-title"];
|
|
298
298
|
if (c != null) {
|
|
299
|
-
|
|
299
|
+
u["data-title"] = c;
|
|
300
300
|
}
|
|
301
301
|
|
|
302
|
-
return r().createElement(
|
|
302
|
+
return r().createElement(i().Tab, T({
|
|
303
303
|
count: a.count,
|
|
304
304
|
icon: a.icon,
|
|
305
305
|
key: a.panelId,
|
|
@@ -309,7 +309,7 @@
|
|
|
309
309
|
ariaControls: l,
|
|
310
310
|
tooltip: a.tooltip,
|
|
311
311
|
disabled: a.disabled
|
|
312
|
-
},
|
|
312
|
+
}, u));
|
|
313
313
|
}));
|
|
314
314
|
I(e);
|
|
315
315
|
return t;
|
|
@@ -321,9 +321,9 @@
|
|
|
321
321
|
return r().createElement(m, T({
|
|
322
322
|
"data-test-active-panel-id": C,
|
|
323
323
|
"data-test": "tab-layout",
|
|
324
|
-
ref:
|
|
324
|
+
ref: u,
|
|
325
325
|
$layout: v
|
|
326
|
-
}, y), r().createElement(
|
|
326
|
+
}, y), r().createElement(i(), {
|
|
327
327
|
autoActivate: t,
|
|
328
328
|
activeTabId: C,
|
|
329
329
|
iconPosition: d,
|