@splunk/react-ui 4.32.0 → 4.34.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/Button.js +59 -65
  2. package/ButtonGroup.js +20 -23
  3. package/ButtonSimple.js +374 -339
  4. package/CHANGELOG.md +54 -0
  5. package/Card.js +56 -44
  6. package/Chip.js +2 -6
  7. package/Clickable.js +21 -19
  8. package/CollapsiblePanel.js +281 -264
  9. package/Color.js +88 -86
  10. package/Concertina.js +7 -7
  11. package/ControlGroup.js +18 -18
  12. package/DualListbox.js +8 -11
  13. package/File.js +25 -30
  14. package/FormRows.js +232 -210
  15. package/Image.js +13 -13
  16. package/JSONTree.js +22 -22
  17. package/MIGRATION.mdx +99 -0
  18. package/Markdown.js +12 -12
  19. package/Menu.js +505 -719
  20. package/Message.js +205 -204
  21. package/MessageBar.js +104 -104
  22. package/Modal.js +158 -133
  23. package/Multiselect.js +81 -70
  24. package/Paginator.js +8 -8
  25. package/Popover.js +53 -54
  26. package/Progress.js +45 -46
  27. package/RadioBar.js +117 -115
  28. package/RadioList.js +8 -5
  29. package/ResultsMenu.js +256 -261
  30. package/Search.js +21 -24
  31. package/Select.js +265 -246
  32. package/Slider.js +9 -9
  33. package/SplitButton.js +1 -4
  34. package/StaticContent.js +1 -1
  35. package/StepBar.js +1 -1
  36. package/Switch.js +169 -171
  37. package/TabBar.js +14 -6
  38. package/Table.js +65 -67
  39. package/Text.js +30 -37
  40. package/TextArea.js +162 -163
  41. package/Tooltip.js +1 -1
  42. package/package.json +9 -9
  43. package/stubs-splunkui.d.ts +11 -0
  44. package/types/src/Button/Button.d.ts +4 -4
  45. package/types/src/ButtonSimple/ButtonSimple.d.ts +8 -6
  46. package/types/src/ButtonSimple/mixin.d.ts +2 -2
  47. package/types/src/Card/Card.d.ts +3 -1
  48. package/types/src/Card/Header.d.ts +22 -3
  49. package/types/src/Clickable/Clickable.d.ts +3 -2
  50. package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +5 -0
  51. package/types/src/CollapsiblePanel/icons/ExpandPanel.d.ts +1 -3
  52. package/types/src/Date/Date.d.ts +2 -2
  53. package/types/src/Menu/Item.d.ts +3 -1
  54. package/types/src/Menu/Menu.d.ts +16 -21
  55. package/types/src/Menu/MenuContext.d.ts +3 -2
  56. package/types/src/Number/Number.d.ts +2 -2
  57. package/types/src/RadioBar/Option.d.ts +4 -1
  58. package/types/src/RadioBar/RadioBar.d.ts +6 -4
  59. package/types/src/RadioBar/docs/examples/MenuBar.d.ts +2 -0
  60. package/types/src/ResultsMenu/ResultsMenu.d.ts +5 -22
  61. package/types/src/Select/Select.d.ts +8 -4
  62. package/types/src/Select/SelectBase.d.ts +8 -4
  63. package/types/src/Slider/Slider.d.ts +2 -2
  64. package/types/src/Table/Body.d.ts +0 -4
  65. package/types/src/Text/docs/examples/Basic.d.ts +1 -9
  66. package/types/src/Text/docs/examples/Error.d.ts +2 -10
  67. package/types/src/Text/docs/examples/Inline.d.ts +1 -9
  68. package/types/src/Text/docs/examples/Multiline.d.ts +1 -9
  69. package/types/src/Text/docs/examples/Password.d.ts +1 -9
  70. package/types/src/Text/docs/examples/Search.d.ts +1 -9
  71. package/useRovingFocus.js +26 -40
  72. package/types/src/Button/docs/examples/prisma/Basic.d.ts +0 -2
  73. package/types/src/Button/docs/examples/prisma/Block.d.ts +0 -2
  74. package/types/src/Button/docs/examples/prisma/Disabled.d.ts +0 -2
  75. package/types/src/Button/docs/examples/prisma/Icons.d.ts +0 -2
  76. package/types/src/Button/docs/examples/prisma/Menus.d.ts +0 -2
  77. package/types/src/Button/docs/examples/prisma/To.d.ts +0 -2
  78. package/types/src/Button/docs/examples/prisma/Truncated.d.ts +0 -2
  79. package/types/src/Select/docs/examples/prisma/Appearance.d.ts +0 -14
  80. /package/types/src/{Button/docs/examples/prisma → Clickable/docs/examples}/Dimmed.d.ts +0 -0
package/File.js CHANGED
@@ -101,8 +101,8 @@
101
101
  const w = require("@splunk/react-icons/enterprise/Close");
102
102
  var L = e.n(w);
103
103
  // CONCATENATED MODULE: external "@splunk/react-ui/Progress"
104
- const O = require("@splunk/react-ui/Progress");
105
- var S = e.n(O);
104
+ const S = require("@splunk/react-ui/Progress");
105
+ var O = e.n(S);
106
106
  // CONCATENATED MODULE: external "@splunk/ui-utils/format"
107
107
  const I = require("@splunk/ui-utils/format");
108
108
  // CONCATENATED MODULE: ./src/File/FileContext.tsx
@@ -335,7 +335,7 @@
335
335
  });
336
336
  }));
337
337
  // for Prisma theme only
338
- var Q = F().div.withConfig({
338
+ var J = F().div.withConfig({
339
339
  displayName: "ItemStyles__StyledPaperClipIcon",
340
340
  componentId: "sc-1fsk3kr-5"
341
341
  })([ "color:", ";padding:", ";", "" ], b.variables.neutral400, (0, b.pick)({
@@ -346,12 +346,12 @@
346
346
  return r && (0, M.css)([ "color:", ";cursor:not-allowed;" ], b.variables.contentColorDisabled);
347
347
  }));
348
348
  // for Prisma theme only
349
- var J = F().span.withConfig({
349
+ var K = F().span.withConfig({
350
350
  displayName: "ItemStyles__StyledPercentage",
351
351
  componentId: "sc-1fsk3kr-6"
352
352
  })([ "color:", ";" ], b.variables.contentColorMuted);
353
353
  // for Prisma theme only
354
- var K = F().div.withConfig({
354
+ var Q = F().div.withConfig({
355
355
  displayName: "ItemStyles__StyledProgress",
356
356
  componentId: "sc-1fsk3kr-7"
357
357
  })([ "position:absolute;left:0;top:0;width:", "%;height:100%;background:", ";transition:width 300ms;border-radius:", ";" ], (function(e) {
@@ -426,7 +426,7 @@
426
426
  index: c
427
427
  });
428
428
  }
429
- var O = (0, t.useContext)(_), E = O.onRequestRetry;
429
+ var S = (0, t.useContext)(_), E = S.onRequestRetry;
430
430
  function R(e) {
431
431
  e.preventDefault();
432
432
  E === null || E === void 0 ? void 0 : E({
@@ -450,7 +450,7 @@
450
450
  style: {
451
451
  paddingRight: "4px"
452
452
  }
453
- }, (0, h._)("Uploading ")), a().createElement(J, null, p, "%"));
453
+ }, (0, h._)("Uploading ")), a().createElement(K, null, p, "%"));
454
454
  var A = v && !C()(p) && p > 0 ? H : l;
455
455
  var B = r !== undefined ? r : q;
456
456
 
@@ -462,7 +462,7 @@
462
462
  flex: true,
463
463
  $error: i,
464
464
  $disabled: B
465
- }), v && C()(p) && a().createElement(Q, {
465
+ }), v && C()(p) && a().createElement(J, {
466
466
  "data-test": "paper-clip",
467
467
  $disabled: B
468
468
  }, a().createElement(j, {
@@ -495,14 +495,14 @@
495
495
  "aria-label": F,
496
496
  height: y,
497
497
  width: y
498
- }))), !C()(p) && p > 0 && (v ? a().createElement(K, {
498
+ }))), !C()(p) && p > 0 && (v ? a().createElement(Q, {
499
499
  $uploadPercentage: p,
500
500
  "aria-label": M,
501
501
  role: "progressbar",
502
502
  "aria-valuenow": p,
503
503
  "aria-valuemin": 0,
504
504
  "aria-valuemax": 100
505
- }) : a().createElement(S(), {
505
+ }) : a().createElement(O(), {
506
506
  style: {
507
507
  position: "absolute",
508
508
  left: 0,
@@ -602,11 +602,9 @@
602
602
  var ve = F().div.withConfig({
603
603
  displayName: "FileStyles__StyledWindowText",
604
604
  componentId: "sc-1wyh4cf-5"
605
- })([ "margin-top:", ";margin-bottom:", ";font-size:", ";", "" ], (0, b.pick)({
606
- enterprise: (0, M.css)([ "calc(", " * 4)" ], b.variables.spacing),
607
- prisma: (0, M.css)([ "calc(", " * 4)" ], b.variables.spacingLarge)
608
- }), (0, b.pick)({
609
- enterprise: b.variables.spacingHalf,
605
+ })([ "margin-top:calc(", " * 4);margin-bottom:", ";font-size:", ";", "" ], b.variables.spacingLarge, (0,
606
+ b.pick)({
607
+ enterprise: b.variables.spacingSmall,
610
608
  prisma: b.variables.spacingMedium
611
609
  }), b.variables.fontSizeXLarge, (0, b.pick)({
612
610
  prisma: (0, M.css)([ "color:", ";" ], b.variables.contentColorActive)
@@ -618,10 +616,7 @@
618
616
  var me = F().div.withConfig({
619
617
  displayName: "FileStyles__StyledHelp",
620
618
  componentId: "sc-1wyh4cf-7"
621
- })([ "margin-bottom:", ";" ], (0, b.pick)({
622
- enterprise: b.variables.spacingXLarge,
623
- prisma: (0, M.css)([ "calc(", " * 1.5)" ], b.variables.spacingLarge)
624
- }));
619
+ })([ "margin-bottom:", ";" ], b.variables.spacingXLarge);
625
620
  var be = F().div.withConfig({
626
621
  displayName: "FileStyles__StyledWindowDrop",
627
622
  componentId: "sc-1wyh4cf-8"
@@ -638,7 +633,7 @@
638
633
  enterprise: (0, M.css)([ "line-height:calc(", " - 2px);" ], b.variables.inputHeight)
639
634
  }), (0, b.pick)({
640
635
  enterprise: {
641
- comfortable: (0, M.css)([ "min-height:73px;padding:", ";" ], b.variables.spacingQuarter),
636
+ comfortable: (0, M.css)([ "min-height:73px;padding:", ";" ], b.variables.spacingXSmall),
642
637
  compact: (0, M.css)([ "min-height:63px;padding:3px;" ])
643
638
  }
644
639
  }), (0, b.pick)({
@@ -756,12 +751,12 @@
756
751
  Object.defineProperty(e, a.key, a);
757
752
  }
758
753
  }
759
- function Oe(e, r, t) {
754
+ function Se(e, r, t) {
760
755
  if (r) Le(e.prototype, r);
761
756
  if (t) Le(e, t);
762
757
  return e;
763
758
  }
764
- function Se(e, r) {
759
+ function Oe(e, r) {
765
760
  if (typeof r !== "function" && r !== null) {
766
761
  throw new TypeError("Super expression must either be null or a function");
767
762
  }
@@ -867,7 +862,7 @@
867
862
  * file readers, only a reference to the file. This can be used to post binary content, or
868
863
  * upload using an array buffer.
869
864
  */ var $e = function(e) {
870
- Se(n, e);
865
+ Oe(n, e);
871
866
  var r = _e(n);
872
867
  // @docs-props-type FilePropsBase
873
868
  function n(e) {
@@ -919,7 +914,7 @@
919
914
  t.handleDragLeave = l()(t.handleDragLeave, 300);
920
915
  return t;
921
916
  }
922
- Oe(n, [ {
917
+ Se(n, [ {
923
918
  key: "addFiles",
924
919
  value: function e(r) {
925
920
  var t = this.props.name;
@@ -943,7 +938,7 @@
943
938
  var r = this.props, n = r.accept, i = r.allowMultiple, o = r.children, l = r.disabled, s = r.dropAnywhere, p = r.error, u = r.fullscreen, f = r.help, b = r.name, y = r.onRequestRemove, g = r.onRequestRetry, C = r.required, x = r.splunkTheme, k = xe(r, [ "accept", "allowMultiple", "children", "disabled", "dropAnywhere", "error", "fullscreen", "help", "name", "onRequestRemove", "onRequestRetry", "required", "splunkTheme" ]);
944
939
  var w = x.isPrisma;
945
940
  var L = 0;
946
- var O = t.Children.toArray(o).filter(t.isValidElement).map((function(e, r) {
941
+ var S = t.Children.toArray(o).filter(t.isValidElement).map((function(e, r) {
947
942
  L += 1;
948
943
 
949
944
  return (0, t.cloneElement)(e, {
@@ -951,9 +946,9 @@
951
946
  key: e.key || e.props.itemId || "item-".concat(r)
952
947
  });
953
948
  }));
954
- var S = u || s;
955
- var I = S || l;
956
- var _ = S && !l;
949
+ var O = u || s;
950
+ var I = O || l;
951
+ var _ = O && !l;
957
952
  var R = u ? ye : he;
958
953
  var D = u ? ve : ue;
959
954
  var q = u ? pe : ce;
@@ -1010,7 +1005,7 @@
1010
1005
  $error: p
1011
1006
  }), " ", a().createElement("span", {
1012
1007
  "data-test": "file-label"
1013
- }, !S && !l && (0, h._)("Drop your file here or"), _ && (0, h._)("Drop your file anywhere or"), " ", L === 0 && l && (0,
1008
+ }, !O && !l && (0, h._)("Drop your file here or"), _ && (0, h._)("Drop your file anywhere or"), " ", L === 0 && l && (0,
1014
1009
  h._)("No files selected"), a().createElement(de, {
1015
1010
  htmlFor: this.inputId,
1016
1011
  "data-test": "file-link",
@@ -1046,7 +1041,7 @@
1046
1041
  onRequestRemove: y ? $ : undefined,
1047
1042
  onRequestRetry: g ? T : undefined
1048
1043
  }
1049
- }, O));
1044
+ }, S));
1050
1045
  }
1051
1046
  } ]);
1052
1047
  return n;