@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.
Files changed (94) hide show
  1. package/Accordion.js +59 -59
  2. package/Avatar.js +20 -20
  3. package/Breadcrumbs.js +46 -46
  4. package/Button.js +24 -24
  5. package/CHANGELOG.md +21 -2
  6. package/Calendar.js +69 -69
  7. package/Card.js +68 -68
  8. package/Chip.js +16 -16
  9. package/Clickable.js +29 -29
  10. package/Code.js +654 -519
  11. package/CollapsiblePanel.js +112 -112
  12. package/Color.js +107 -107
  13. package/ColumnLayout.js +35 -35
  14. package/ComboBox.js +190 -206
  15. package/ControlGroup.js +128 -120
  16. package/Date.js +148 -146
  17. package/DefinitionList.js +26 -26
  18. package/DualListbox.js +701 -717
  19. package/File.js +403 -403
  20. package/FormRows.js +66 -63
  21. package/Image.js +15 -15
  22. package/JSONTree.js +458 -357
  23. package/Layer.js +60 -72
  24. package/Markdown.js +66 -66
  25. package/Menu.js +44 -44
  26. package/Modal.js +49 -49
  27. package/ModalLayer.js +6 -6
  28. package/Monogram.js +16 -16
  29. package/Multiselect.js +622 -624
  30. package/Number.js +100 -100
  31. package/Paginator.js +7 -7
  32. package/Popover.js +453 -407
  33. package/Progress.js +12 -12
  34. package/Prose.js +6 -6
  35. package/RadioBar.js +180 -166
  36. package/RadioList.js +80 -79
  37. package/ResultsMenu.js +15 -15
  38. package/Scroll.js +50 -50
  39. package/Search.js +148 -164
  40. package/Select.js +668 -670
  41. package/Slider.js +30 -30
  42. package/SlidingPanels.js +24 -24
  43. package/SplitButton.js +50 -50
  44. package/StepBar.js +100 -100
  45. package/Switch.js +45 -45
  46. package/TabBar.js +196 -196
  47. package/TabLayout.js +16 -16
  48. package/Table.js +1207 -1193
  49. package/Text.js +65 -65
  50. package/TextArea.js +108 -93
  51. package/Tooltip.js +203 -197
  52. package/Tree.js +464 -366
  53. package/package.json +6 -6
  54. package/stubs-dependencies.d.ts +0 -70
  55. package/stubs-splunkui.d.ts +4 -0
  56. package/types/src/Code/Code.d.ts +17 -1
  57. package/types/src/Code/LineHighlights.d.ts +11 -0
  58. package/types/src/Code/LineNumbers.d.ts +6 -0
  59. package/types/src/Code/docs/examples/LineHighlights.d.ts +3 -0
  60. package/types/src/Code/docs/examples/LineNumbers.d.ts +3 -0
  61. package/types/src/Code/docs/examples/LineNumbersCustomStart.d.ts +3 -0
  62. package/types/src/Date/Date.d.ts +6 -1
  63. package/types/src/DefinitionList/DefinitionList.d.ts +6 -6
  64. package/types/src/FormRows/FormRows.d.ts +1 -1
  65. package/types/src/JSONTree/JSONTreeItem.d.ts +5 -2
  66. package/types/src/Markdown/Markdown.d.ts +1 -1
  67. package/types/src/Markdown/renderers/MarkdownBlockquote.d.ts +1 -1
  68. package/types/src/Markdown/renderers/MarkdownCodeBlock.d.ts +1 -1
  69. package/types/src/Markdown/renderers/index.d.ts +1 -1
  70. package/types/src/Popover/Popover.d.ts +1 -1
  71. package/types/src/RadioBar/Option.d.ts +1 -1
  72. package/types/src/RadioBar/RadioBar.d.ts +13 -6
  73. package/types/src/RadioBar/RadioBarContext.d.ts +4 -2
  74. package/types/src/RadioList/RadioList.d.ts +2 -1
  75. package/types/src/ScreenReaderContent/docs/examples/SkipLink.d.ts +3 -0
  76. package/types/src/Scroll/Inner.d.ts +1 -1
  77. package/types/src/Select/Option.d.ts +1 -1
  78. package/types/src/Select/Select.d.ts +1 -1
  79. package/types/src/Slider/docs/examples/Controlled.d.ts +1 -1
  80. package/types/src/TabLayout/Panel.d.ts +0 -1
  81. package/types/src/Table/Head.d.ts +1 -0
  82. package/types/src/Table/HeadCell.d.ts +2 -3
  83. package/types/src/Table/HeadDropdownCell.d.ts +2 -2
  84. package/types/src/Table/HeadInner.d.ts +4 -4
  85. package/types/src/Table/KeyboardSensor.d.ts +1 -1
  86. package/types/src/Table/RowDragCell.d.ts +1 -1
  87. package/types/src/Tooltip/Tooltip.d.ts +10 -5
  88. package/types/src/Tree/Item.d.ts +63 -0
  89. package/types/src/Tree/Tree.d.ts +13 -6
  90. package/types/src/Tree/TreeContext.d.ts +1 -1
  91. package/types/src/Tree/index.d.ts +1 -1
  92. package/types/src/useControlled/useControlled.d.ts +3 -1
  93. package/useControlled.js +29 -13
  94. 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 i = require("@splunk/react-ui/TabBar");
77
- var u = e.n(i);
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 c = require("@splunk/react-ui/useControlled");
80
- var s = e.n(c);
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, 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" ]);
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 = s()({
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 : i), w = j(S, 2), A = w[0], q = w[1];
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, o.createGUID)()), _ = j(x, 1), k = _[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 i = {};
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
- i["data-title"] = c;
299
+ u["data-title"] = c;
300
300
  }
301
301
 
302
- return r().createElement(u().Tab, T({
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
- }, i));
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: c,
324
+ ref: u,
325
325
  $layout: v
326
- }, y), r().createElement(u(), {
326
+ }, y), r().createElement(i(), {
327
327
  autoActivate: t,
328
328
  activeTabId: C,
329
329
  iconPosition: d,