@splunk/react-ui 5.0.0-rc.2 → 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 (104) 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 +380 -0
  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 +129 -121
  16. package/Date.js +148 -146
  17. package/DefinitionList.js +26 -26
  18. package/Dropdown.js +9 -9
  19. package/DualListbox.js +701 -717
  20. package/File.js +403 -403
  21. package/FormRows.js +66 -63
  22. package/Image.js +15 -15
  23. package/JSONTree.js +458 -357
  24. package/Layer.js +60 -72
  25. package/MIGRATION.md +550 -1
  26. package/Markdown.js +66 -66
  27. package/Menu.js +44 -44
  28. package/Message.js +47 -43
  29. package/Modal.js +49 -49
  30. package/ModalLayer.js +21 -17
  31. package/Monogram.js +16 -16
  32. package/Multiselect.js +673 -669
  33. package/Number.js +100 -100
  34. package/Paginator.js +7 -7
  35. package/Popover.js +473 -424
  36. package/Progress.js +12 -12
  37. package/Prose.js +6 -6
  38. package/README.md +6 -6
  39. package/RadioBar.js +180 -166
  40. package/RadioList.js +80 -79
  41. package/ResultsMenu.js +129 -128
  42. package/Scroll.js +50 -50
  43. package/Search.js +148 -164
  44. package/Select.js +674 -674
  45. package/Slider.js +30 -30
  46. package/SlidingPanels.js +24 -24
  47. package/SplitButton.js +50 -50
  48. package/StepBar.js +100 -100
  49. package/Switch.js +45 -45
  50. package/TabBar.js +196 -196
  51. package/TabLayout.js +16 -16
  52. package/Table.js +1207 -1193
  53. package/Text.js +65 -65
  54. package/TextArea.js +108 -93
  55. package/Tooltip.js +203 -197
  56. package/TransitionOpen.js +4 -1
  57. package/Tree.js +464 -366
  58. package/package.json +11 -11
  59. package/stubs-dependencies.d.ts +0 -70
  60. package/stubs-splunkui.d.ts +4 -0
  61. package/types/src/Code/Code.d.ts +17 -1
  62. package/types/src/Code/LineHighlights.d.ts +11 -0
  63. package/types/src/Code/LineNumbers.d.ts +6 -0
  64. package/types/src/Code/docs/examples/LineHighlights.d.ts +3 -0
  65. package/types/src/Code/docs/examples/LineNumbers.d.ts +3 -0
  66. package/types/src/Code/docs/examples/LineNumbersCustomStart.d.ts +3 -0
  67. package/types/src/Date/Date.d.ts +6 -1
  68. package/types/src/DefinitionList/DefinitionList.d.ts +6 -6
  69. package/types/src/Dropdown/Dropdown.d.ts +1 -0
  70. package/types/src/FormRows/FormRows.d.ts +1 -1
  71. package/types/src/JSONTree/JSONTreeItem.d.ts +5 -2
  72. package/types/src/Markdown/Markdown.d.ts +1 -1
  73. package/types/src/Markdown/renderers/MarkdownBlockquote.d.ts +1 -1
  74. package/types/src/Markdown/renderers/MarkdownCodeBlock.d.ts +1 -1
  75. package/types/src/Markdown/renderers/index.d.ts +1 -1
  76. package/types/src/Popover/Popover.d.ts +8 -2
  77. package/types/src/RadioBar/Option.d.ts +1 -1
  78. package/types/src/RadioBar/RadioBar.d.ts +13 -6
  79. package/types/src/RadioBar/RadioBarContext.d.ts +4 -2
  80. package/types/src/RadioList/RadioList.d.ts +2 -1
  81. package/types/src/ResultsMenu/ResultsMenu.d.ts +2 -1
  82. package/types/src/ScreenReaderContent/docs/examples/SkipLink.d.ts +3 -0
  83. package/types/src/Scroll/Inner.d.ts +1 -1
  84. package/types/src/Select/Option.d.ts +1 -1
  85. package/types/src/Select/Select.d.ts +1 -1
  86. package/types/src/Slider/docs/examples/Controlled.d.ts +1 -1
  87. package/types/src/TabLayout/Panel.d.ts +0 -1
  88. package/types/src/Table/Head.d.ts +1 -0
  89. package/types/src/Table/HeadCell.d.ts +2 -3
  90. package/types/src/Table/HeadDropdownCell.d.ts +2 -2
  91. package/types/src/Table/HeadInner.d.ts +4 -4
  92. package/types/src/Table/KeyboardSensor.d.ts +1 -1
  93. package/types/src/Table/RowDragCell.d.ts +1 -1
  94. package/types/src/Tooltip/Tooltip.d.ts +10 -5
  95. package/types/src/Tree/Item.d.ts +63 -0
  96. package/types/src/Tree/Tree.d.ts +13 -6
  97. package/types/src/Tree/TreeContext.d.ts +1 -1
  98. package/types/src/Tree/index.d.ts +1 -1
  99. package/types/src/useControlled/useControlled.d.ts +3 -1
  100. package/useControlled.js +29 -13
  101. package/CHANGELOG.v5.md +0 -354
  102. package/MIGRATION.v5.md +0 -552
  103. package/types/src/Button/docs/examples/Truncated.d.ts +0 -3
  104. 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,