@splunk/react-ui 5.2.0 → 5.3.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 (77) hide show
  1. package/Avatar.js +57 -52
  2. package/Box.js +2 -1
  3. package/CHANGELOG.md +31 -0
  4. package/Calendar.js +8 -4
  5. package/Checkbox.d.ts +2 -0
  6. package/Checkbox.js +350 -0
  7. package/Code.js +151 -132
  8. package/CollapsiblePanel.js +184 -210
  9. package/Color.js +4 -2
  10. package/ControlGroup.js +2 -1
  11. package/Date.js +123 -119
  12. package/DefinitionList.js +100 -77
  13. package/Dropdown.js +2 -2
  14. package/DualListbox.js +409 -353
  15. package/File.js +102 -99
  16. package/JSONTree.js +317 -303
  17. package/Link.js +11 -11
  18. package/MIGRATION.md +27 -0
  19. package/Markdown.js +162 -151
  20. package/Menu.js +44 -42
  21. package/Modal.js +3 -3
  22. package/Multiselect.js +454 -435
  23. package/Paginator.js +2 -1
  24. package/ResultsMenu.js +2 -1
  25. package/Scroll.js +2 -1
  26. package/Search.js +131 -127
  27. package/Select.js +3 -2
  28. package/Switch.js +197 -229
  29. package/Table.js +24 -16
  30. package/Text.js +180 -206
  31. package/TextArea.js +233 -224
  32. package/Tooltip.js +144 -139
  33. package/package.json +9 -10
  34. package/tsconfig.check-docs.json +8 -0
  35. package/types/src/Avatar/docs/examples/Basic.d.ts +1 -1
  36. package/types/src/Checkbox/Checkbox.d.ts +90 -0
  37. package/types/src/Checkbox/docs/examples/Basic.d.ts +7 -0
  38. package/types/src/Checkbox/docs/examples/Disabled.d.ts +6 -0
  39. package/types/src/Checkbox/docs/examples/Error.d.ts +6 -0
  40. package/types/src/Checkbox/docs/examples/Uncontrolled.d.ts +7 -0
  41. package/types/src/Checkbox/index.d.ts +2 -0
  42. package/types/src/Code/Code.d.ts +4 -1
  43. package/types/src/Code/LineHighlights.d.ts +1 -0
  44. package/types/src/Code/LineNumbers.d.ts +2 -1
  45. package/types/src/Code/docs/examples/CustomizeContainer.d.ts +7 -0
  46. package/types/src/ControlGroup/docs/examples/CustomizedLabelTarget.d.ts +3 -3
  47. package/types/src/Date/Date.d.ts +7 -1
  48. package/types/src/DefinitionList/DefinitionList.d.ts +7 -2
  49. package/types/src/DefinitionList/DefinitionListContext.d.ts +1 -1
  50. package/types/src/DefinitionList/docs/examples/StackedLayout.d.ts +6 -0
  51. package/types/src/DualListbox/DualListbox.d.ts +1 -1
  52. package/types/src/DualListbox/Label.d.ts +7 -7
  53. package/types/src/DualListbox/Listbox.d.ts +2 -2
  54. package/types/src/DualListbox/ListboxContext.d.ts +1 -1
  55. package/types/src/File/File.d.ts +7 -1
  56. package/types/src/JSONTree/JSONTreeItem.d.ts +4 -2
  57. package/types/src/JSONTree/renderTreeItems.d.ts +2 -1
  58. package/types/src/Markdown/renderers/MarkdownCodeBlock.d.ts +2 -1
  59. package/types/src/Menu/docs/examples/Dimmed.d.ts +1 -1
  60. package/types/src/Menu/docs/examples/Disabled.d.ts +1 -0
  61. package/types/src/Multiselect/Compact.d.ts +7 -1
  62. package/types/src/Multiselect/Multiselect.d.ts +7 -1
  63. package/types/src/Multiselect/Normal.d.ts +7 -1
  64. package/types/src/Search/Search.d.ts +5 -1
  65. package/types/src/Switch/Switch.d.ts +7 -1
  66. package/types/src/Switch/docs/examples/Basic.d.ts +2 -10
  67. package/types/src/Switch/docs/examples/Disabled.d.ts +2 -9
  68. package/types/src/Table/ExpandButton.d.ts +1 -1
  69. package/types/src/Tooltip/Tooltip.d.ts +14 -1
  70. package/NonInteractiveCheckbox.js +0 -101
  71. package/types/src/CollapsiblePanel/icons/ExpandPanel.d.ts +0 -12
  72. package/types/src/NonInteractiveCheckbox/NonInteractiveCheckbox.d.ts +0 -22
  73. package/types/src/NonInteractiveCheckbox/index.d.ts +0 -1
  74. package/types/src/Switch/docs/examples/Error.d.ts +0 -6
  75. package/types/src/Text/IconOutlinedHide.d.ts +0 -3
  76. package/types/src/Text/IconOutlinedView.d.ts +0 -3
  77. /package/cypress/{tsconfig.cypress.json → tsconfig.check-cypress.json} +0 -0
package/Table.js CHANGED
@@ -654,7 +654,7 @@
654
654
  var We = M().div.withConfig({
655
655
  displayName: "HeadInnerStyles__Styled",
656
656
  componentId: "sc-1sa0wng-3"
657
- })([ "", ";", ";", ";position:relative;", " grid-template-rows:1lh auto;align-items:start;flex-grow:1;height:100%;padding-block:", ";padding-inline:", ";justify-content:", ";", " ", " @media print{background-image:none;}", "" ], $.mixins.reset("grid"), $.mixins.clearfix(), $.mixins.typography("body", {
657
+ })([ "", ";", ";", ";position:relative;", " grid-template-rows:1lh 1fr;align-items:start;flex-grow:1;height:100%;padding-block:", ";padding-inline:", ";justify-content:", ";", " ", " @media print{background-image:none;}", "" ], $.mixins.reset("grid"), $.mixins.clearfix(), $.mixins.typography("body", {
658
658
  weight: "bold"
659
659
  }), (function(e) {
660
660
  var n = e.$hasTooltip, t = e.$hasIcon;
@@ -979,7 +979,8 @@
979
979
  });
980
980
  function Tn(e) {
981
981
  var n = e.align, o = n === void 0 ? "left" : n, i = e.clickable, a = e.cellId, l = e.columnId, u = e.elementRef, s = e.focusWithin, c = e.hasTooltip, d = e.index, f = e.isMenu, v = e.label, p = e.onAutosizeColumn, m = e.onRequestResize, b = e.resizable, y = b === void 0 ? true : b, g = e.sortDir, w = e.truncate, C = w === void 0 ? true : w, x = e.variant, O = e.width, k = Sn(e, [ "align", "clickable", "cellId", "columnId", "elementRef", "focusWithin", "hasTooltip", "index", "isMenu", "label", "onAutosizeColumn", "onRequestResize", "resizable", "sortDir", "truncate", "variant", "width" ]);
982
- var R = (0, j._)("Click to open menu");
982
+ // @docs-props-type HeadInnerPropsBase
983
+ var R = (0, j._)("Click to open menu");
983
984
  var E = (0, t.useMemo)((function() {
984
985
  return typeof v === "string" ? v.length : 0;
985
986
  }), [ v ]);
@@ -1415,7 +1416,8 @@
1415
1416
  };
1416
1417
  var rt = function e(n) {
1417
1418
  var t = n.expanded, o = et(n, [ "expanded" ]);
1418
-
1419
+ // @docs-props-type ExpandButtonPropsBase
1420
+
1419
1421
  return r().createElement(Jn, Zn({
1420
1422
  title: t ? (0, j._)("Collapse row") : (0, j._)("Expand row")
1421
1423
  }, o), r().createElement(Qn, {
@@ -1473,7 +1475,8 @@
1473
1475
  };
1474
1476
  function dt(e) {
1475
1477
  var n = e.listeners, t = e.setActivatorNodeRef, o = ut(e, [ "listeners", "setActivatorNodeRef" ]);
1476
-
1478
+ // @docs-props-type RowDragCellPropsBase
1479
+
1477
1480
  return r().createElement(it, {
1478
1481
  "data-helper": true
1479
1482
  }, r().createElement(at, lt({
@@ -1503,19 +1506,19 @@
1503
1506
  var n = e.$clickable;
1504
1507
  return n && (0, z.css)([ "cursor:pointer;&:hover,&:focus{background-color:", ";}" ], $.variables.neutral300);
1505
1508
  }));
1506
- // CONCATENATED MODULE: external "@splunk/react-ui/Clickable"
1507
- const mt = require("@splunk/react-ui/Clickable");
1509
+ // CONCATENATED MODULE: external "@splunk/react-ui/Checkbox"
1510
+ const mt = require("@splunk/react-ui/Checkbox");
1508
1511
  var bt = e.n(mt);
1509
- // CONCATENATED MODULE: external "@splunk/react-ui/NonInteractiveCheckbox"
1510
- const ht = require("@splunk/react-ui/NonInteractiveCheckbox");
1512
+ // CONCATENATED MODULE: external "@splunk/react-ui/Clickable"
1513
+ const ht = require("@splunk/react-ui/Clickable");
1511
1514
  var yt = e.n(ht);
1512
1515
  // CONCATENATED MODULE: ./src/Table/ToggleStyles.ts
1513
- var gt = M()(bt()).withConfig({
1516
+ var gt = M()(yt()).withConfig({
1514
1517
  displayName: "ToggleStyles__StyledClickable",
1515
1518
  componentId: "sc-1x3ikch-0"
1516
1519
  })([ "height:100%;width:100%;display:flex;justify-content:center;&[disabled]{cursor:not-allowed;}" ]);
1517
- var wt = M()(yt()).withConfig({
1518
- displayName: "ToggleStyles__StyledNonInteractiveCheckbox",
1520
+ var wt = M()(bt()).withConfig({
1521
+ displayName: "ToggleStyles__StyledCheckbox",
1519
1522
  componentId: "sc-1x3ikch-1"
1520
1523
  })([ "align-items:flex-start;padding-block:", ";" ], (0, $.pick)({
1521
1524
  comfortable: "8px",
@@ -1562,17 +1565,20 @@
1562
1565
  };
1563
1566
  function kt(e) {
1564
1567
  var n = e.disabled, t = e.onClick, o = e.selected, i = xt(e, [ "disabled", "onClick", "selected" ]);
1565
- var a = n === true ? "disabled" : undefined;
1568
+ // @docs-props-type TogglePropsBase
1569
+ var a = n === true ? "disabled" : undefined;
1566
1570
 
1567
- // Note we use a clickable around the NonInteractiveCheckbox (which can seem ironic) so that the whole table cell is clickable and we cannot use the Cell's onClick itself because of a11y issues we have faced in the past (see SUI-5958).
1571
+ // we use a Clickable around the inert Checkbox (which can seem ironic) so that the whole table cell is clickable
1572
+ // we cannot use the Cell's onClick itself because of a11y issues we have faced in the past (see SUI-5958).
1568
1573
  return r().createElement(gt, Ct({
1569
1574
  "aria-checked": o === "some" ? "mixed" : o,
1570
1575
  disabled: a,
1571
1576
  onClick: t,
1572
1577
  role: "checkbox"
1573
1578
  }, i), r().createElement(wt, {
1579
+ checked: o === "some" ? "indeterminate" : o,
1574
1580
  disabled: !!a,
1575
- selected: o
1581
+ inert: true
1576
1582
  }));
1577
1583
  }
1578
1584
  kt.propTypes = Ot;
@@ -2010,7 +2016,8 @@
2010
2016
  };
2011
2017
  function er(e) {
2012
2018
  var n = e.actions, o = n === void 0 ? [] : n, i = e.actionsColumnWidth, a = e.cellMinWidth, l = a === void 0 ? 60 : a, u = e.children, s = e.elementRef, c = e.hasDragColumn, d = e.hasInfoColumn, f = e.onAutosizeColumn, v = e.onRequestMoveColumn, p = e.onRequestResizeColumn, m = e.onRequestToggleAllRows, b = e.rowSelection, h = Vt(e, [ "actions", "actionsColumnWidth", "cellMinWidth", "children", "elementRef", "hasDragColumn", "hasInfoColumn", "onAutosizeColumn", "onRequestMoveColumn", "onRequestResizeColumn", "onRequestToggleAllRows", "rowSelection" ]);
2013
- var y = (0, t.useContext)(Kt), g = y.headType, w = y.tableContainerWidthWithoutBorders, C = y.resizableFillLayout;
2019
+ // @docs-props-type HeadPropsBase
2020
+ var y = (0, t.useContext)(Kt), g = y.headType, w = y.tableContainerWidthWithoutBorders, C = y.resizableFillLayout;
2014
2021
  var x = (0, t.useRef)(null);
2015
2022
  var S = (0, t.useRef)([]);
2016
2023
  (0, t.useEffect)((function() {
@@ -2632,7 +2639,8 @@
2632
2639
  * then be positioned in different ways outside of the main table.
2633
2640
  */ function Ar(e) {
2634
2641
  var n = e.cellWidths, o = e.elementRef, i = e.hasDragColumn, a = e.hasRowExpansion, l = e.hasRowSelection, u = e.headType, s = e.horizontalOffset, c = s === void 0 ? 0 : s, d = e.isFixedColumn, f = e.tableStyle, v = e.tableWidth, p = e.tHead, m = e.top, b = e.width, y = jr(e, [ "cellWidths", "elementRef", "hasDragColumn", "hasRowExpansion", "hasRowSelection", "headType", "horizontalOffset", "isFixedColumn", "tableStyle", "tableWidth", "tHead", "top", "width" ]);
2635
- var g = u === "docked";
2642
+ // @docs-props-type HeadTablePropsBase
2643
+ var g = u === "docked";
2636
2644
  var w = g ? Er : Ir;
2637
2645
  var C = (0, t.useRef)(null);
2638
2646
  var x = (0, t.useCallback)((function(e) {