@splunk/react-ui 4.33.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 (80) hide show
  1. package/Breadcrumbs.js +20 -29
  2. package/Button.js +20 -23
  3. package/ButtonGroup.js +20 -23
  4. package/ButtonSimple.js +33 -34
  5. package/CHANGELOG.md +56 -1
  6. package/Card.js +129 -113
  7. package/Chip.js +75 -82
  8. package/CollapsiblePanel.js +281 -264
  9. package/Color.js +103 -93
  10. package/ComboBox.js +3 -2
  11. package/Concertina.js +139 -138
  12. package/ControlGroup.js +43 -39
  13. package/DualListbox.js +8 -11
  14. package/File.js +25 -30
  15. package/FormRows.js +53 -53
  16. package/Image.js +13 -13
  17. package/JSONTree.js +87 -85
  18. package/List.js +9 -13
  19. package/MIGRATION.mdx +100 -0
  20. package/Markdown.js +12 -12
  21. package/Menu.js +492 -699
  22. package/Message.js +192 -194
  23. package/MessageBar.js +104 -104
  24. package/Modal.js +2 -2
  25. package/Monogram.js +140 -94
  26. package/Multiselect.js +45 -49
  27. package/Paginator.js +8 -8
  28. package/Popover.js +53 -54
  29. package/Progress.js +45 -46
  30. package/RadioBar.js +117 -115
  31. package/RadioList.js +8 -5
  32. package/ResultsMenu.js +272 -279
  33. package/Search.js +197 -199
  34. package/Select.js +86 -84
  35. package/Slider.js +9 -9
  36. package/SplitButton.js +1 -4
  37. package/StaticContent.js +1 -1
  38. package/StepBar.js +92 -88
  39. package/Switch.js +217 -211
  40. package/TabBar.js +13 -5
  41. package/Table.js +714 -717
  42. package/Text.js +94 -83
  43. package/TextArea.js +162 -163
  44. package/Tooltip.js +1 -1
  45. package/package.json +8 -8
  46. package/stubs-splunkui.d.ts +11 -0
  47. package/types/src/Breadcrumbs/Breadcrumbs.d.ts +0 -1
  48. package/types/src/Breadcrumbs/Item.d.ts +0 -1
  49. package/types/src/Card/Card.d.ts +3 -1
  50. package/types/src/Card/Header.d.ts +22 -5
  51. package/types/src/Chip/Chip.d.ts +2 -4
  52. package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +5 -0
  53. package/types/src/CollapsiblePanel/icons/ExpandPanel.d.ts +1 -3
  54. package/types/src/Color/Color.d.ts +5 -5
  55. package/types/src/ComboBox/Option.d.ts +0 -1
  56. package/types/src/List/List.d.ts +2 -4
  57. package/types/src/Menu/Heading.d.ts +1 -1
  58. package/types/src/Menu/Item.d.ts +10 -5
  59. package/types/src/Menu/Menu.d.ts +18 -26
  60. package/types/src/Menu/MenuContext.d.ts +3 -2
  61. package/types/src/Menu/docs/examples/Dimmed.d.ts +2 -0
  62. package/types/src/Monogram/Monogram.d.ts +5 -6
  63. package/types/src/Multiselect/Option.d.ts +0 -1
  64. package/types/src/Progress/Progress.d.ts +4 -1
  65. package/types/src/RadioBar/Option.d.ts +4 -1
  66. package/types/src/RadioBar/RadioBar.d.ts +6 -4
  67. package/types/src/RadioBar/docs/examples/MenuBar.d.ts +2 -0
  68. package/types/src/ResultsMenu/ResultsMenu.d.ts +13 -28
  69. package/types/src/ResultsMenu/VirtualizedResultsMenu/VirtualizedResultsMenu.d.ts +3 -5
  70. package/types/src/Search/Option.d.ts +19 -6
  71. package/types/src/Search/docs/examples/OptionsLinks.d.ts +2 -0
  72. package/types/src/Select/Option.d.ts +0 -1
  73. package/types/src/Select/OptionBase.d.ts +2 -3
  74. package/types/src/Select/Select.d.ts +2 -2
  75. package/types/src/Select/SelectBase.d.ts +2 -2
  76. package/types/src/Table/Body.d.ts +0 -4
  77. package/types/src/Table/DragHandle.d.ts +1 -2
  78. package/types/src/Text/Text.d.ts +2 -0
  79. package/useRovingFocus.js +26 -40
  80. package/types/src/Select/docs/examples/prisma/Appearance.d.ts +0 -14
package/FormRows.js CHANGED
@@ -112,8 +112,8 @@
112
112
  const w = require("@splunk/react-icons/enterprise/Close");
113
113
  var O = e.n(w);
114
114
  // CONCATENATED MODULE: external "styled-components"
115
- const R = require("styled-components");
116
- var S = e.n(R);
115
+ const S = require("styled-components");
116
+ var R = e.n(S);
117
117
  // CONCATENATED MODULE: external "@splunk/react-ui/Box"
118
118
  const j = require("@splunk/react-ui/Box");
119
119
  var k = e.n(j);
@@ -124,58 +124,58 @@
124
124
  const P = require("@splunk/react-ui/ButtonSimple");
125
125
  var q = e.n(P);
126
126
  // CONCATENATED MODULE: ./src/FormRows/FormRowsStyles.ts
127
- var C = S()(k()).withConfig({
127
+ var C = R()(k()).withConfig({
128
128
  displayName: "FormRowsStyles__StyledBox",
129
129
  componentId: "sc-1j4j7h3-0"
130
130
  })([ "", ";" ], s.mixins.reset("block"));
131
- var D = S().div.withConfig({
131
+ var D = R().div.withConfig({
132
132
  displayName: "FormRowsStyles__StyledHeader",
133
133
  componentId: "sc-1j4j7h3-1"
134
134
  })([ "padding-left:", ";", "" ], (0, s.pick)({
135
- enterprise: s.variables.spacingHalf,
135
+ enterprise: s.variables.spacingSmall,
136
136
  prisma: "16px"
137
137
  }), (0, s.pick)({
138
138
  prisma: {
139
- comfortable: (0, R.css)([ "padding-bottom:8px;" ]),
140
- compact: (0, R.css)([ "padding-bottom:6px;" ])
139
+ comfortable: (0, S.css)([ "padding-bottom:8px;" ]),
140
+ compact: (0, S.css)([ "padding-bottom:6px;" ])
141
141
  }
142
142
  }));
143
- var I = S()(_()).withConfig({
143
+ var I = R()(_()).withConfig({
144
144
  displayName: "FormRowsStyles__StyledAddRowButton",
145
145
  componentId: "sc-1j4j7h3-2"
146
146
  })([ "", "" ], (function(e) {
147
147
  var t = e.$sortable;
148
148
  return t && (0, s.pick)({
149
- prisma: (0, R.css)([ "margin-left:16px;" ])
149
+ prisma: (0, S.css)([ "margin-left:16px;" ])
150
150
  });
151
151
  }));
152
- var T = S().div.withConfig({
152
+ var T = R().div.withConfig({
153
153
  displayName: "FormRowsStyles__StyledRows",
154
154
  componentId: "sc-1j4j7h3-3"
155
155
  })([ "position:relative;", "" ], (0, s.pick)({
156
156
  prisma: {
157
- comfortable: (0, R.css)([ "padding-bottom:12px;" ]),
158
- compact: (0, R.css)([ "padding-bottom:10px;" ])
157
+ comfortable: (0, S.css)([ "padding-bottom:12px;" ]),
158
+ compact: (0, S.css)([ "padding-bottom:10px;" ])
159
159
  }
160
160
  }));
161
- var H = S().div.withConfig({
161
+ var A = R().div.withConfig({
162
162
  displayName: "FormRowsStyles__Styled",
163
163
  componentId: "sc-1j4j7h3-4"
164
- })([ "padding:", ";position:relative;&.sorting{z-index:calc(", " + 1);}", " &:focus{outline:0;box-shadow:", ";}" ], (0,
164
+ })([ "", ";position:relative;&.sorting{z-index:calc(", " + 1);}", " &:focus{outline:0;box-shadow:", ";}" ], (0,
165
165
  s.pick)({
166
- enterprise: (0, R.css)([ "3px calc(", " + 3px) 3px 0" ], s.variables.inputHeight),
166
+ enterprise: (0, S.css)([ "padding:3px calc(", " + 3px) 3px 0;" ], s.variables.inputHeight),
167
167
  prisma: {
168
- comfortable: (0, R.css)([ "8px calc(", " + 8px) 8px 0" ], s.variables.inputHeight),
169
- compact: (0, R.css)([ "6px calc(", " + 8px) 6px 0" ], s.variables.inputHeight)
168
+ comfortable: (0, S.css)([ "padding:8px calc(", " + 8px) 8px 0;" ], s.variables.inputHeight),
169
+ compact: (0, S.css)([ "padding:6px calc(", " + 8px) 6px 0;" ], s.variables.inputHeight)
170
170
  }
171
171
  }), s.variables.zindexPopover, (function(e) {
172
172
  var t = e.$sortable;
173
- return t && (0, R.css)([ "padding-left:", ";" ], (0, s.pick)({
174
- enterprise: s.variables.spacingHalf,
173
+ return t && (0, S.css)([ "padding-left:", ";" ], (0, s.pick)({
174
+ enterprise: s.variables.spacingSmall,
175
175
  prisma: "16px"
176
176
  }));
177
177
  }), s.variables.focusShadow);
178
- var A = S().div.withConfig({
178
+ var B = R().div.withConfig({
179
179
  displayName: "FormRowsStyles__StyledButton",
180
180
  componentId: "sc-1j4j7h3-5"
181
181
  })([ "position:absolute;right:0;top:", ";float:right;" ], (0, s.pick)({
@@ -185,11 +185,11 @@
185
185
  compact: "6px"
186
186
  }
187
187
  }));
188
- var B = S()(q()).withConfig({
188
+ var N = R()(q()).withConfig({
189
189
  displayName: "FormRowsStyles__StyledButtonSimple",
190
190
  componentId: "sc-1j4j7h3-6"
191
191
  })([ "float:right;width:", ";height:", ";text-align:center;" ], s.variables.inputHeight, s.variables.inputHeight);
192
- var N = S().div.withConfig({
192
+ var H = R().div.withConfig({
193
193
  displayName: "FormRowsStyles__StyledDrag",
194
194
  componentId: "sc-1j4j7h3-7"
195
195
  })([ "position:absolute;left:0;right:0;content:'';cursor:move;background:", ";width:", ";top:", ";", "" ], s.variables.draggableBackground, (0,
@@ -203,8 +203,8 @@
203
203
  compact: "12px"
204
204
  }
205
205
  }), (0, s.pick)({
206
- enterprise: (0, R.css)([ "bottom:3px;opacity:0.5;" ]),
207
- prisma: (0, R.css)([ "height:20px;" ])
206
+ enterprise: (0, S.css)([ "bottom:3px;opacity:0.5;" ]),
207
+ prisma: (0, S.css)([ "height:20px;" ])
208
208
  }));
209
209
  // CONCATENATED MODULE: ./src/FormRows/RowInternal.tsx
210
210
  function M() {
@@ -260,8 +260,8 @@
260
260
  var o = e.children, i = e.index, l = e.onRequestRemove, u = e.renderDragHandle, f = F(e, [ "children", "index", "onRequestRemove", "renderDragHandle" ]);
261
261
  var p = (0, s.useSplunkTheme)(), d = p.isCompact, v = p.isEnterprise;
262
262
  var y = d ? "20px" : "24px";
263
- var b = (0, r.useContext)(c), m = b.disabledDeleteButton, g = b.hasOnRequestAdd, w = b.onKeyDown, R = b.sortable;
264
- var S = (0, r.useCallback)((function(e) {
263
+ var b = (0, r.useContext)(c), m = b.disabledDeleteButton, g = b.hasOnRequestAdd, w = b.onKeyDown, S = b.sortable;
264
+ var R = (0, r.useCallback)((function(e) {
265
265
  // TODO: this callback doesn't work correctly if index isn't provided SUI-5639
266
266
  w === null || w === void 0 ? void 0 : w(e, {
267
267
  index: i !== null && i !== void 0 ? i : 0
@@ -278,12 +278,12 @@
278
278
  if (false) {}
279
279
  if (false) {}
280
280
 
281
- return n().createElement(H, M({
282
- $sortable: R,
281
+ return n().createElement(A, M({
282
+ $sortable: S,
283
283
  "data-test": "row",
284
284
  ref: t,
285
- onKeyDown: S
286
- }, h()(f, [ "onKeyDown", "onRequestRemove" ])), u && u(), o, k && n().createElement(A, null, n().createElement(B, {
285
+ onKeyDown: R
286
+ }, h()(f, [ "onKeyDown", "onRequestRemove" ])), u && u(), o, k && n().createElement(B, null, n().createElement(N, {
287
287
  appearance: "pill",
288
288
  "aria-label": (0, a._)("Remove Row"),
289
289
  "data-test": "remove",
@@ -378,7 +378,7 @@
378
378
  };
379
379
  var ee = n().forwardRef((function(e, t) {
380
380
 
381
- return n().createElement(N, Y({
381
+ return n().createElement(H, Y({
382
382
  "data-test": "drag-handle",
383
383
  ref: t
384
384
  }, e), n().createElement(Q(), null, (0, a._)("Press arrow up or arrow down to re-order items")));
@@ -627,20 +627,20 @@
627
627
  strategy: V.verticalListSortingStrategy
628
628
  }, l));
629
629
  };
630
- /* harmony default export */ const Re = Oe;
630
+ /* harmony default export */ const Se = Oe;
631
631
  // CONCATENATED MODULE: ./src/FormRows/FormRows.tsx
632
- function Se(e) {
632
+ function Re(e) {
633
633
  "@babel/helpers - typeof";
634
634
  if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
635
- Se = function e(t) {
635
+ Re = function e(t) {
636
636
  return typeof t;
637
637
  };
638
638
  } else {
639
- Se = function e(t) {
639
+ Re = function e(t) {
640
640
  return t && typeof Symbol === "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
641
641
  };
642
642
  }
643
- return Se(e);
643
+ return Re(e);
644
644
  }
645
645
  function je() {
646
646
  je = Object.assign || function(e) {
@@ -723,11 +723,11 @@
723
723
  return De(e, t);
724
724
  }
725
725
  function Ie(e) {
726
- var t = Ae();
726
+ var t = Be();
727
727
  return function r() {
728
- var n = Be(e), o;
728
+ var n = Ne(e), o;
729
729
  if (t) {
730
- var i = Be(this).constructor;
730
+ var i = Ne(this).constructor;
731
731
  o = Reflect.construct(n, arguments, i);
732
732
  } else {
733
733
  o = n.apply(this, arguments);
@@ -736,18 +736,18 @@
736
736
  };
737
737
  }
738
738
  function Te(e, t) {
739
- if (t && (Se(t) === "object" || typeof t === "function")) {
739
+ if (t && (Re(t) === "object" || typeof t === "function")) {
740
740
  return t;
741
741
  }
742
- return He(e);
742
+ return Ae(e);
743
743
  }
744
- function He(e) {
744
+ function Ae(e) {
745
745
  if (e === void 0) {
746
746
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
747
747
  }
748
748
  return e;
749
749
  }
750
- function Ae() {
750
+ function Be() {
751
751
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
752
752
  if (Reflect.construct.sham) return false;
753
753
  if (typeof Proxy === "function") return true;
@@ -758,13 +758,13 @@
758
758
  return false;
759
759
  }
760
760
  }
761
- function Be(e) {
762
- Be = Object.setPrototypeOf ? Object.getPrototypeOf : function e(t) {
761
+ function Ne(e) {
762
+ Ne = Object.setPrototypeOf ? Object.getPrototypeOf : function e(t) {
763
763
  return t.__proto__ || Object.getPrototypeOf(t);
764
764
  };
765
- return Be(e);
765
+ return Ne(e);
766
766
  }
767
- function Ne(e, t, r) {
767
+ function He(e, t, r) {
768
768
  if (t in e) {
769
769
  Object.defineProperty(e, t, {
770
770
  value: r,
@@ -802,7 +802,7 @@
802
802
  i[a] = arguments[a];
803
803
  }
804
804
  e = t.call.apply(t, [ this ].concat(i));
805
- Ne(He(e), "handleKeyDown", (function(t, r) {
805
+ He(Ae(e), "handleKeyDown", (function(t, r) {
806
806
  var o = r.index;
807
807
  if (t.currentTarget !== t.target) {
808
808
  return;
@@ -827,7 +827,7 @@
827
827
  }
828
828
  }
829
829
  }));
830
- Ne(He(e), "handleSortEnd", (function(t) {
830
+ He(Ae(e), "handleSortEnd", (function(t) {
831
831
  var r, n;
832
832
  var o = t.oldIndex, i = t.newIndex;
833
833
  (r = (n = e.props).onRequestMove) === null || r === void 0 ? void 0 : r.call(n, {
@@ -854,7 +854,7 @@
854
854
  hasOnRequestAdd: v,
855
855
  sortable: p
856
856
  }
857
- }, a && n().createElement(d, null, a), n().createElement(T, null, n().createElement(Re, {
857
+ }, a && n().createElement(d, null, a), n().createElement(T, null, n().createElement(Se, {
858
858
  onSortEnd: this.handleSortEnd
859
859
  }, o)), l || v && n().createElement(I, {
860
860
  disabled: i,
@@ -953,9 +953,9 @@
953
953
  } ]);
954
954
  return o;
955
955
  }(r.Component);
956
- Ne(Ke, "propTypes", Me);
957
- Ne(Ke, "defaultProps", Fe);
958
- Ne(Ke, "Row", xe);
956
+ He(Ke, "propTypes", Me);
957
+ He(Ke, "defaultProps", Fe);
958
+ He(Ke, "Row", xe);
959
959
  /* harmony default export */ const Le = Ke;
960
960
  // CONCATENATED MODULE: ./src/FormRows/index.ts
961
961
  module.exports = t;
package/Image.js CHANGED
@@ -61,7 +61,7 @@
61
61
  e.r(r);
62
62
  // EXPORTS
63
63
  e.d(r, {
64
- default: () => /* reexport */ X
64
+ default: () => /* reexport */ V
65
65
  });
66
66
  // CONCATENATED MODULE: external "react"
67
67
  const t = require("react");
@@ -194,7 +194,7 @@
194
194
  displayName: "ImageStyles__StyledErrorMessage",
195
195
  componentId: "sc-16ooypp-5"
196
196
  })([ "margin-top:", ";" ], (0, b.pick)({
197
- enterprise: b.variables.spacingQuarter,
197
+ enterprise: b.variables.spacingXSmall,
198
198
  prisma: "12px"
199
199
  }));
200
200
  // CONCATENATED MODULE: ./src/Image/Image.tsx
@@ -265,7 +265,7 @@
265
265
  return L(e, r);
266
266
  }
267
267
  function B(e) {
268
- var r = W();
268
+ var r = X();
269
269
  return function t() {
270
270
  var a = z(e), o;
271
271
  if (r) {
@@ -281,15 +281,15 @@
281
281
  if (r && (F(r) === "object" || typeof r === "function")) {
282
282
  return r;
283
283
  }
284
- return Q(e);
284
+ return W(e);
285
285
  }
286
- function Q(e) {
286
+ function W(e) {
287
287
  if (e === void 0) {
288
288
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
289
289
  }
290
290
  return e;
291
291
  }
292
- function W() {
292
+ function X() {
293
293
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
294
294
  if (Reflect.construct.sham) return false;
295
295
  if (typeof Proxy === "function") return true;
@@ -339,7 +339,7 @@
339
339
  };
340
340
  /**
341
341
  * Image provides the ability to accept image files and present a preview of the image.
342
- */ var V = function(e) {
342
+ */ var Q = function(e) {
343
343
  N(t, e);
344
344
  var r = B(t);
345
345
  M(t, null, [ {
@@ -355,8 +355,8 @@
355
355
  var a;
356
356
  H(this, t);
357
357
  a = r.call(this, e);
358
- G(Q(a), "fileReader", void 0);
359
- G(Q(a), "handleAddFiles", (function(e) {
358
+ G(W(a), "fileReader", void 0);
359
+ G(W(a), "handleAddFiles", (function(e) {
360
360
  if (e.length > 0) {
361
361
  var r = e[0];
362
362
  if (a.fileReader.readyState === 1) {
@@ -376,7 +376,7 @@
376
376
  a.fileReader.readAsDataURL(r);
377
377
  }
378
378
  }));
379
- G(Q(a), "handleRemoveFile", (function() {
379
+ G(W(a), "handleRemoveFile", (function() {
380
380
  var e, r;
381
381
  if (a.fileReader.readyState === 1) {
382
382
  a.fileReader.abort();
@@ -443,9 +443,9 @@
443
443
  } ]);
444
444
  return t;
445
445
  }(t.Component);
446
- G(V, "propTypes", J);
447
- G(V, "defaultProps", K);
448
- /* harmony default export */ const X = V;
446
+ G(Q, "propTypes", J);
447
+ G(Q, "defaultProps", K);
448
+ /* harmony default export */ const V = Q;
449
449
  // CONCATENATED MODULE: ./src/Image/index.ts
450
450
  module.exports = r;
451
451
  /******/})();