@splunk/react-ui 4.34.0 → 4.35.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 (47) hide show
  1. package/Breadcrumbs.js +20 -29
  2. package/Button.js +1 -1
  3. package/CHANGELOG.md +26 -2
  4. package/Card.js +86 -82
  5. package/Chip.js +73 -76
  6. package/CollapsiblePanel.js +1 -1
  7. package/Color.js +23 -15
  8. package/ComboBox.js +3 -2
  9. package/Concertina.js +136 -135
  10. package/ControlGroup.js +27 -23
  11. package/JSONTree.js +66 -64
  12. package/List.js +9 -13
  13. package/MIGRATION.mdx +24 -0
  14. package/Menu.js +352 -345
  15. package/Message.js +16 -19
  16. package/Monogram.js +140 -94
  17. package/Multiselect.js +9 -10
  18. package/ResultsMenu.js +124 -126
  19. package/Search.js +182 -181
  20. package/Select.js +55 -56
  21. package/StepBar.js +91 -87
  22. package/Switch.js +105 -97
  23. package/Table.js +686 -687
  24. package/Text.js +78 -58
  25. package/package.json +6 -6
  26. package/types/src/Breadcrumbs/Breadcrumbs.d.ts +0 -1
  27. package/types/src/Breadcrumbs/Item.d.ts +0 -1
  28. package/types/src/Card/Header.d.ts +0 -2
  29. package/types/src/Chip/Chip.d.ts +2 -4
  30. package/types/src/Color/Color.d.ts +5 -5
  31. package/types/src/ComboBox/Option.d.ts +0 -1
  32. package/types/src/List/List.d.ts +2 -4
  33. package/types/src/Menu/Heading.d.ts +1 -1
  34. package/types/src/Menu/Item.d.ts +7 -5
  35. package/types/src/Menu/Menu.d.ts +13 -16
  36. package/types/src/Menu/docs/examples/Dimmed.d.ts +2 -0
  37. package/types/src/Monogram/Monogram.d.ts +5 -6
  38. package/types/src/Multiselect/Option.d.ts +0 -1
  39. package/types/src/Progress/Progress.d.ts +4 -1
  40. package/types/src/ResultsMenu/ResultsMenu.d.ts +11 -9
  41. package/types/src/ResultsMenu/VirtualizedResultsMenu/VirtualizedResultsMenu.d.ts +3 -5
  42. package/types/src/Search/Option.d.ts +19 -6
  43. package/types/src/Search/docs/examples/OptionsLinks.d.ts +2 -0
  44. package/types/src/Select/Option.d.ts +0 -1
  45. package/types/src/Select/OptionBase.d.ts +2 -3
  46. package/types/src/Table/DragHandle.d.ts +1 -2
  47. package/types/src/Text/Text.d.ts +2 -0
package/ControlGroup.js CHANGED
@@ -577,8 +577,11 @@
577
577
  var A = r.Children.toArray(i).filter(r.isValidElement);
578
578
  var G = A.length;
579
579
  var B = D;
580
+ var N = typeof a === "string";
581
+ var z = N && a !== "";
582
+ var R = N || a === true;
580
583
  // Clean the Children
581
- var N = function e(n, o) {
584
+ var W = function e(n, o) {
582
585
  var i = {
583
586
  key: n.key || o
584
587
  };
@@ -636,32 +639,35 @@
636
639
  i.id = n.props.id || t.getChildID("id", o);
637
640
  }
638
641
  }
642
+ if (z && n.props.error === true) {
643
+ i["aria-errormessage"] = t.errorId;
644
+ }
639
645
 
640
646
  return (0, r.cloneElement)(n, i);
641
647
  };
642
- var z = A.map(N);
643
- var R = this.getLinkedId(z);
648
+ var F = A.map(W);
649
+ var J = this.getLinkedId(F);
644
650
  if (a) {
645
651
  B["aria-invalid"] = true;
646
652
  }
647
- var W = y === "left" ? {
653
+ var H = y === "left" ? {
648
654
  width: h
649
655
  } : undefined;
650
- var F = p()(h) ? "".concat(h, "px") : h;
651
- var J = V ? "16px" : "20px";
652
- var H = y === "left" ? {
653
- marginLeft: "calc(".concat(F, " + ").concat(J, ")")
656
+ var U = p()(h) ? "".concat(h, "px") : h;
657
+ var X = V ? "16px" : "20px";
658
+ var K = y === "left" ? {
659
+ marginLeft: "calc(".concat(U, " + ").concat(X, ")")
654
660
  } : undefined;
655
- var U = l === "stack" ? S : d();
656
- var X = y === "left" ? I : x;
657
- var K = n().createElement(X, {
658
- style: W,
661
+ var Q = l === "stack" ? S : d();
662
+ var Y = y === "left" ? I : x;
663
+ var Z = n().createElement(Y, {
664
+ style: H,
659
665
  $labelPosition: y
660
666
  }, n().createElement(C, {
661
667
  "data-size": v,
662
668
  "data-test": "label",
663
669
  id: this.labelId,
664
- htmlFor: f || R,
670
+ htmlFor: f || J,
665
671
  $tooltip: !!_
666
672
  }, m && n().createElement(P, {
667
673
  "aria-hidden": "true"
@@ -672,28 +678,26 @@
672
678
  defaultPlacement: T,
673
679
  "aria-hidden": "true"
674
680
  }));
675
- var Q = typeof a === "string" || a === true;
676
- var Y = typeof a === "boolean";
677
681
 
678
682
  return n().createElement(O, E({
679
683
  "data-test": "control-group",
680
684
  "data-test-required": m,
681
- $error: Q
685
+ $error: R
682
686
  }, B), n().createElement(L.Provider, {
683
687
  value: this.getContextValue()
684
- }, c ? n().createElement(b(), null, K) : K, n().createElement(U, {
688
+ }, c ? n().createElement(b(), null, Z) : Z, n().createElement(Q, {
685
689
  "data-test": "controls",
686
690
  flex: l !== "none",
687
- style: H
688
- }, z), s && n().createElement(w, {
691
+ style: K
692
+ }, F), s && n().createElement(w, {
689
693
  "data-test": "help",
690
694
  id: this.helpId,
691
- style: H,
692
- $error: Q && Y
693
- }, s), Q && !Y && n().createElement(j, {
695
+ style: K,
696
+ $error: R && !z
697
+ }, s), z && n().createElement(j, {
694
698
  "data-test": "error",
695
699
  id: this.errorId,
696
- style: H,
700
+ style: K,
697
701
  $help: !!s
698
702
  }, a)));
699
703
  }
package/JSONTree.js CHANGED
@@ -705,7 +705,7 @@
705
705
  n.r(t);
706
706
  // EXPORTS
707
707
  n.d(t, {
708
- default: () => /* reexport */ Se
708
+ default: () => /* reexport */ ke
709
709
  });
710
710
  // EXTERNAL MODULE: external "react"
711
711
  var e = n(9497);
@@ -928,43 +928,45 @@
928
928
  };
929
929
  var X = (0, u.css)([ "word-break:break-word;word-wrap:break-word;" ]);
930
930
  var z = (0, u.css)([ "white-space:nowrap;" ]);
931
- var W = c().span.withConfig({
932
- displayName: "JSONTreeItemStyles__StyledValue",
933
- componentId: "o558h3-0"
934
- })([ "color:", ";", ";" ], (function(e) {
931
+ var W = (0, u.css)([ "color:", ";", ";" ], (function(e) {
935
932
  var r = e.valueType;
936
933
  return H[r];
937
934
  }), (function(e) {
938
935
  var r = e.overflowType;
939
936
  return r === "wrap" ? X : z;
940
937
  }));
941
- var G = c()(W.withComponent(J())).withConfig({
938
+ var G = c().span.withConfig({
939
+ displayName: "JSONTreeItemStyles__StyledValue",
940
+ componentId: "o558h3-0"
941
+ })([ "", "" ], W);
942
+ var Q = c()(J()).withConfig({
942
943
  displayName: "JSONTreeItemStyles__StyledValueInteractiveClickable",
943
944
  componentId: "o558h3-1"
944
- })([ "font-family:inherit;&:focus{box-shadow:0 0 1px 3px ", ";outline:0;&:active{box-shadow:none;}}&:hover{background-color:", ";}" ], f.variables.focusColor, (0,
945
+ })([ "", " font-family:inherit;&:focus{box-shadow:0 0 1px 3px ", ";outline:0;&:active{box-shadow:none;}}&:hover{background-color:", ";}" ], W, f.variables.focusColor, (0,
945
946
  f.pick)({
946
947
  enterprise: f.variables.backgroundColorHover,
947
948
  prisma: f.variables.interactiveColorOverlayHover
948
949
  }));
949
- var Q = c().span.withConfig({
950
- displayName: "JSONTreeItemStyles__StyledProperty",
951
- componentId: "o558h3-2"
952
- })([ "font-weight:bold;color:", ";" ], (0, f.pick)({
950
+ var Y = (0, u.css)([ "font-weight:bold;color:", ";" ], (0, f.pick)({
953
951
  enterprise: {
954
952
  dark: "#ec9f98",
955
953
  light: f.variables.syntaxRed
956
954
  },
957
955
  prisma: f.variables.syntaxRed
958
956
  }));
959
- var Y = c()(Q.withComponent(J())).withConfig({
957
+ var Z = c().span.withConfig({
958
+ displayName: "JSONTreeItemStyles__StyledProperty",
959
+ componentId: "o558h3-2"
960
+ })([ "", "" ], Y);
961
+ var ee = c()(J()).withConfig({
960
962
  displayName: "JSONTreeItemStyles__StyledPropertyInteractiveClickable",
961
963
  componentId: "o558h3-3"
962
- })([ "font-family:inherit;&:focus{box-shadow:0 0 1px 3px ", ";outline:0;&:active{box-shadow:none;}}&:hover{background-color:", ";}" ], f.variables.focusColor, (0,
964
+ })([ "", " font-family:inherit;&:focus{box-shadow:0 0 1px 3px ", ";outline:0;&:active{box-shadow:none;}}&:hover{background-color:", ";}" ], Y, f.variables.focusColor, (0,
963
965
  f.pick)({
964
966
  enterprise: f.variables.backgroundColorHover,
965
967
  prisma: f.variables.interactiveColorOverlayHover
966
968
  }));
967
- var Z = c()(J()).withConfig({
969
+ var re = c()(J()).withConfig({
968
970
  displayName: "JSONTreeItemStyles__StyledExpandLinkClickable",
969
971
  componentId: "o558h3-4"
970
972
  })([ "cursor:pointer;color:", ";font-family:inherit;&:hover{background-color:", ";text-decoration:none;}&:focus{box-shadow:", ";&:active{box-shadow:none;}}", "" ], (0,
@@ -980,52 +982,52 @@
980
982
  }), f.variables.focusShadowInset, (0, f.pick)({
981
983
  prisma: (0, u.css)([ "border-radius:", ";" ], f.variables.borderRadius)
982
984
  }));
983
- var ee = c()(B()).withConfig({
985
+ var ne = c()(B()).withConfig({
984
986
  displayName: "JSONTreeItemStyles__StyledTooltip",
985
987
  componentId: "o558h3-5"
986
988
  })([ "font-family:", ";" ], f.variables.monoFontFamily);
987
989
  // CONCATENATED MODULE: ./src/JSONTree/renderTreeItems.tsx
988
- function re(e) {
990
+ function te(e) {
989
991
  "@babel/helpers - typeof";
990
992
  if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
991
- re = function e(r) {
993
+ te = function e(r) {
992
994
  return typeof r;
993
995
  };
994
996
  } else {
995
- re = function e(r) {
997
+ te = function e(r) {
996
998
  return r && typeof Symbol === "function" && r.constructor === Symbol && r !== Symbol.prototype ? "symbol" : typeof r;
997
999
  };
998
1000
  }
999
- return re(e);
1001
+ return te(e);
1000
1002
  }
1001
- function ne(e) {
1002
- return ie(e) || ae(e) || oe(e) || te();
1003
+ function oe(e) {
1004
+ return ue(e) || le(e) || ie(e) || ae();
1003
1005
  }
1004
- function te() {
1006
+ function ae() {
1005
1007
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1006
1008
  }
1007
- function oe(e, r) {
1009
+ function ie(e, r) {
1008
1010
  if (!e) return;
1009
- if (typeof e === "string") return le(e, r);
1011
+ if (typeof e === "string") return ce(e, r);
1010
1012
  var n = Object.prototype.toString.call(e).slice(8, -1);
1011
1013
  if (n === "Object" && e.constructor) n = e.constructor.name;
1012
1014
  if (n === "Map" || n === "Set") return Array.from(e);
1013
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return le(e, r);
1015
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return ce(e, r);
1014
1016
  }
1015
- function ae(e) {
1017
+ function le(e) {
1016
1018
  if (typeof Symbol !== "undefined" && Symbol.iterator in Object(e)) return Array.from(e);
1017
1019
  }
1018
- function ie(e) {
1019
- if (Array.isArray(e)) return le(e);
1020
+ function ue(e) {
1021
+ if (Array.isArray(e)) return ce(e);
1020
1022
  }
1021
- function le(e, r) {
1023
+ function ce(e, r) {
1022
1024
  if (r == null || r > e.length) r = e.length;
1023
1025
  for (var n = 0, t = new Array(r); n < r; n++) {
1024
1026
  t[n] = e[n];
1025
1027
  }
1026
1028
  return t;
1027
1029
  }
1028
- function ue(n) {
1030
+ function fe(n) {
1029
1031
  var t = n.defaultOpen, o = t === void 0 ? false : t, a = n.expandChildren, i = a === void 0 ? false : a, u = n.expandChildrenOnShiftKey, c = u === void 0 ? false : u, f = n.indent, d = f === void 0 ? 4 : f, v = n.indentLevel, s = v === void 0 ? 1 : v, p = n.obj, b = n.onClickKey, h = n.onClickValue, S = n.overflow, k = S === void 0 ? "scroll" : S, x = n.path, I = x === void 0 ? [] : x, P = n.shift, R = n.updateShift;
1030
1032
  var K = y()(Array(s), j()(" ", d));
1031
1033
  var _;
@@ -1049,7 +1051,7 @@
1049
1051
  var q = function e(r, n) {
1050
1052
  var t, o;
1051
1053
  // When rendering a single value key is not present, here we prevent `[undefined]` in path
1052
- var a = n !== undefined ? [].concat(ne(I), [ n ]) : ne(I);
1054
+ var a = n !== undefined ? [].concat(oe(I), [ n ]) : oe(I);
1053
1055
  var i = ".".concat(a.join("."));
1054
1056
  (t = N) === null || t === void 0 ? void 0 : (o = t.current) === null || o === void 0 ? void 0 : o.focus();
1055
1057
  b === null || b === void 0 ? void 0 : b(r, {
@@ -1060,7 +1062,7 @@
1060
1062
  var V = function e(r, n) {
1061
1063
  var t, o;
1062
1064
  // When rendering a single value key is not present, here we prevent `[undefined]` in path
1063
- var a = n !== undefined ? [].concat(ne(I), [ n ]) : ne(I);
1065
+ var a = n !== undefined ? [].concat(oe(I), [ n ]) : oe(I);
1064
1066
  var i = ".".concat(a.join("."));
1065
1067
  (t = _) === null || t === void 0 ? void 0 : (o = t.current) === null || o === void 0 ? void 0 : o.focus();
1066
1068
  h === null || h === void 0 ? void 0 : h(r, {
@@ -1088,7 +1090,7 @@
1088
1090
  var i = o ? "[-]" : "[+]";
1089
1091
  var l = o ? (0, E._)("Collapse all") : (0, E._)("Shift click to expand all");
1090
1092
  var u = (0, e.useRef)(null);
1091
- var f = r().createElement(Z, {
1093
+ var f = r().createElement(re, {
1092
1094
  elementRef: u,
1093
1095
  tabIndex: -1,
1094
1096
  onClick: function e(r) {
@@ -1099,7 +1101,7 @@
1099
1101
  }, " ", i, " ");
1100
1102
  if (c && a) {
1101
1103
  return {
1102
- expandLink: r().createElement(ee, {
1104
+ expandLink: r().createElement(ne, {
1103
1105
  contentRelationship: "description",
1104
1106
  openDelay: "secondary",
1105
1107
  defaultPlacement: "above",
@@ -1131,7 +1133,7 @@
1131
1133
  // isObject is true for arrays
1132
1134
  u = m()(o) ? "[]" : "{}";
1133
1135
  } else {
1134
- u = ue({
1136
+ u = fe({
1135
1137
  defaultOpen: i === true,
1136
1138
  expandChildren: i,
1137
1139
  expandChildrenOnShiftKey: c,
@@ -1139,7 +1141,7 @@
1139
1141
  onClickValue: h,
1140
1142
  overflow: k,
1141
1143
  obj: o,
1142
- path: a !== undefined ? [].concat(ne(I), [ a ]) : ne(I),
1144
+ path: a !== undefined ? [].concat(oe(I), [ a ]) : oe(I),
1143
1145
  indentLevel: s + 1,
1144
1146
  shift: P,
1145
1147
  updateShift: R
@@ -1147,10 +1149,10 @@
1147
1149
  }
1148
1150
  if (l()(u) || w()(u)) {
1149
1151
  var d = o === null ? "null" : // TS: bigint, function, symbol are prevented by JSONElement type
1150
- re(o);
1152
+ te(o);
1151
1153
  if (h) {
1152
1154
  return {
1153
- representation: r().createElement(G, {
1155
+ representation: r().createElement(Q, {
1154
1156
  elementRef: f,
1155
1157
  valueType: d,
1156
1158
  overflowType: k,
@@ -1167,7 +1169,7 @@
1167
1169
  };
1168
1170
  }
1169
1171
  return {
1170
- representation: r().createElement(W, {
1172
+ representation: r().createElement(G, {
1171
1173
  valueType: d,
1172
1174
  overflowType: k
1173
1175
  }, u)
@@ -1181,7 +1183,7 @@
1181
1183
  var o = (0, e.useRef)(null);
1182
1184
  if (b) {
1183
1185
  return {
1184
- propertyElement: r().createElement("span", null, r().createElement(Y, {
1186
+ propertyElement: r().createElement("span", null, r().createElement(ee, {
1185
1187
  elementRef: o,
1186
1188
  tabIndex: -1,
1187
1189
  onClick: function e(r) {
@@ -1196,7 +1198,7 @@
1196
1198
  };
1197
1199
  }
1198
1200
  return {
1199
- propertyElement: r().createElement("span", null, r().createElement(Q, null, t), ":", " ")
1201
+ propertyElement: r().createElement("span", null, r().createElement(Z, null, t), ":", " ")
1200
1202
  };
1201
1203
  };
1202
1204
  if (O()(p) && !g()(p) || m()(p) && p.length > 0) {
@@ -1264,8 +1266,8 @@
1264
1266
  });
1265
1267
  }
1266
1268
  // CONCATENATED MODULE: ./src/JSONTree/JSONTree.tsx
1267
- function ce() {
1268
- ce = Object.assign || function(e) {
1269
+ function de() {
1270
+ de = Object.assign || function(e) {
1269
1271
  for (var r = 1; r < arguments.length; r++) {
1270
1272
  var n = arguments[r];
1271
1273
  for (var t in n) {
@@ -1276,30 +1278,30 @@
1276
1278
  }
1277
1279
  return e;
1278
1280
  };
1279
- return ce.apply(this, arguments);
1281
+ return de.apply(this, arguments);
1280
1282
  }
1281
- function fe(e, r) {
1282
- return ye(e) || pe(e, r) || ve(e, r) || de();
1283
+ function ve(e, r) {
1284
+ return me(e) || be(e, r) || pe(e, r) || se();
1283
1285
  }
1284
- function de() {
1286
+ function se() {
1285
1287
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1286
1288
  }
1287
- function ve(e, r) {
1289
+ function pe(e, r) {
1288
1290
  if (!e) return;
1289
- if (typeof e === "string") return se(e, r);
1291
+ if (typeof e === "string") return ye(e, r);
1290
1292
  var n = Object.prototype.toString.call(e).slice(8, -1);
1291
1293
  if (n === "Object" && e.constructor) n = e.constructor.name;
1292
1294
  if (n === "Map" || n === "Set") return Array.from(e);
1293
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return se(e, r);
1295
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return ye(e, r);
1294
1296
  }
1295
- function se(e, r) {
1297
+ function ye(e, r) {
1296
1298
  if (r == null || r > e.length) r = e.length;
1297
1299
  for (var n = 0, t = new Array(r); n < r; n++) {
1298
1300
  t[n] = e[n];
1299
1301
  }
1300
1302
  return t;
1301
1303
  }
1302
- function pe(e, r) {
1304
+ function be(e, r) {
1303
1305
  if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(e))) return;
1304
1306
  var n = [];
1305
1307
  var t = true;
@@ -1322,12 +1324,12 @@
1322
1324
  }
1323
1325
  return n;
1324
1326
  }
1325
- function ye(e) {
1327
+ function me(e) {
1326
1328
  if (Array.isArray(e)) return e;
1327
1329
  }
1328
- function be(e, r) {
1330
+ function he(e, r) {
1329
1331
  if (e == null) return {};
1330
- var n = me(e, r);
1332
+ var n = ge(e, r);
1331
1333
  var t, o;
1332
1334
  if (Object.getOwnPropertySymbols) {
1333
1335
  var a = Object.getOwnPropertySymbols(e);
@@ -1340,7 +1342,7 @@
1340
1342
  }
1341
1343
  return n;
1342
1344
  }
1343
- function me(e, r) {
1345
+ function ge(e, r) {
1344
1346
  if (e == null) return {};
1345
1347
  var n = {};
1346
1348
  var t = Object.keys(e);
@@ -1352,7 +1354,7 @@
1352
1354
  }
1353
1355
  return n;
1354
1356
  }
1355
- var he = {
1357
+ var Se = {
1356
1358
  elementRef: a().oneOfType([ a().func, a().object ]),
1357
1359
  expandChildren: a().oneOfType([ a().bool, a().oneOf([ "withShiftModifier" ]) ]),
1358
1360
  indent: a().number,
@@ -1364,24 +1366,24 @@
1364
1366
  };
1365
1367
  /**
1366
1368
  * Used to visualize a JSON string.
1367
- */ function ge(n) {
1368
- var t = n.elementRef, o = n.expandChildren, a = o === void 0 ? false : o, i = n.indent, u = i === void 0 ? 4 : i, c = n.json, f = n.onClickKey, d = n.onClickValue, p = n.overflow, y = p === void 0 ? "scroll" : p, b = n.expandChildrenOnShiftKey, m = b === void 0 ? false : b, h = be(n, [ "elementRef", "expandChildren", "indent", "json", "onClickKey", "onClickValue", "overflow", "expandChildrenOnShiftKey" ]);
1369
+ */ function we(n) {
1370
+ var t = n.elementRef, o = n.expandChildren, a = o === void 0 ? false : o, i = n.indent, u = i === void 0 ? 4 : i, c = n.json, f = n.onClickKey, d = n.onClickValue, p = n.overflow, y = p === void 0 ? "scroll" : p, b = n.expandChildrenOnShiftKey, m = b === void 0 ? false : b, h = he(n, [ "elementRef", "expandChildren", "indent", "json", "onClickKey", "onClickValue", "overflow", "expandChildrenOnShiftKey" ]);
1369
1371
  // @docs-props-type JSONTreePropsBase
1370
1372
  var g = l()(c) ? JSON.parse(c) : c;
1371
1373
  var S = y === "wrap" ? s : v;
1372
- var w = (0, e.useState)(undefined), k = fe(w, 2), O = k[0], x = k[1];
1374
+ var w = (0, e.useState)(undefined), k = ve(w, 2), O = k[0], x = k[1];
1373
1375
  var C = function e(r) {
1374
1376
  x(r);
1375
1377
  };
1376
1378
 
1377
- return r().createElement(S, ce({
1379
+ return r().createElement(S, de({
1378
1380
  "data-language": "language-json",
1379
1381
  "data-test": "json-tree",
1380
1382
  ref: t,
1381
1383
  role: "tree"
1382
1384
  }, h), r().createElement(A["default"], {
1383
1385
  defaultIndent: false
1384
- }, ue({
1386
+ }, fe({
1385
1387
  defaultOpen: true,
1386
1388
  expandChildren: a,
1387
1389
  expandChildrenOnShiftKey: m,
@@ -1394,8 +1396,8 @@
1394
1396
  updateShift: C
1395
1397
  })));
1396
1398
  }
1397
- ge.propTypes = he;
1398
- /* harmony default export */ const Se = ge;
1399
+ we.propTypes = Se;
1400
+ /* harmony default export */ const ke = we;
1399
1401
  }) // CONCATENATED MODULE: ./src/JSONTree/index.ts
1400
1402
  ();
1401
1403
  module.exports = t;
package/List.js CHANGED
@@ -62,7 +62,7 @@
62
62
  // EXPORTS
63
63
  e.d(t, {
64
64
  Item: () => /* reexport */ v,
65
- default: () => /* reexport */ P
65
+ default: () => /* reexport */ S
66
66
  });
67
67
  // CONCATENATED MODULE: external "react"
68
68
  const r = require("react");
@@ -194,26 +194,22 @@
194
194
  ordered: i().bool,
195
195
  type: i().oneOf([ "disc", "decimal", "lower-alpha", "upper-alpha" ])
196
196
  };
197
- var j = {
198
- type: "disc"
199
- };
200
- function S(e) {
201
- var t = e.children, r = e.elementRef, o = e.type, i = e.ordered, l = O(e, [ "children", "elementRef", "type", "ordered" ]);
197
+ function j(e) {
198
+ var t = e.children, r = e.elementRef, o = e.type, i = o === void 0 ? "disc" : o, l = e.ordered, a = O(e, [ "children", "elementRef", "type", "ordered" ]);
202
199
  // @docs-props-type ListPropsBase
203
200
  // Default prop value is "disc", we cannot determine if user or defaultProps is setting the value
204
201
  if (false) {}
205
202
 
206
203
  return n().createElement(f, b({
207
- as: i || o !== "disc" ? "ol" : "ul",
204
+ as: l || i !== "disc" ? "ol" : "ul",
208
205
  "data-test": "list",
209
206
  ref: r,
210
- $listStyleType: i ? "decimal" : o
211
- }, l), t);
207
+ $listStyleType: l ? "decimal" : i
208
+ }, a), t);
212
209
  }
213
- S.propTypes = g;
214
- S.defaultProps = j;
215
- S.Item = v;
216
- /* harmony default export */ const P = S;
210
+ j.propTypes = g;
211
+ j.Item = v;
212
+ /* harmony default export */ const S = j;
217
213
  // CONCATENATED MODULE: ./src/List/index.ts
218
214
  module.exports = t;
219
215
  /******/})();
package/MIGRATION.mdx CHANGED
@@ -5,6 +5,30 @@ import Table from '@splunk/react-ui/Table';
5
5
 
6
6
  This document lists migration guidance for new features and breaking changes.
7
7
 
8
+ ## 4.35.0
9
+
10
+ ### Deprecated `Menu`'s `retainFocus` prop
11
+
12
+ #### Change
13
+
14
+ `Menu`'s `retainFocus` prop is deprecated and will be removed in the next major version.
15
+
16
+ #### Context
17
+
18
+ To provide more control over the focus behavior of `Menu`, including the option to opt out of focus management, a new `focusMode` prop has been introduced with the following values:
19
+ - `never`: The menu will never take focus, and the active menu item will not have a focus-like appearance.
20
+ - `normal`: Opts out of focus management. The menu and its children follow the normal focus order of DOM without any interference (no loop, no arrow keys, multiple tab stops).
21
+ - `roving` (original `retainFocus={false}`): Does not retain focus inside the menu. There is one tab stop of menu. Uses up/down arrow keys to navigate and loop inside the menu.
22
+
23
+ The original `retainFocus={true}` is no longer supported due to its poor user experience and accessibility issues:
24
+ * If the Menu is used standalone, it traps the tab navigation within the Menu, preventing the user from accessing the next element via keyboard navigation.
25
+ * If the Menu is used in a `Dropdown`, it creates multiple tab stops, making navigation inefficient.
26
+
27
+ #### Migration steps
28
+
29
+ * Replace `retainFocus={false}` with `focusMode="roving"`.
30
+ * If `retainFocus={true}` was used, replace it with `focusMode="roving"`. Additionally, convert the corresponding tests with multiple tabs to use arrow key navigation.
31
+
8
32
  ## 4.34.0
9
33
 
10
34
  ### Deprecated `Select`'s `appearance` values of `"flat"`, `"pill"`, and `"toggle"`