@splunk/react-ui 4.40.0 → 4.42.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 (88) hide show
  1. package/ButtonGroup.js +1 -3
  2. package/CHANGELOG.md +43 -0
  3. package/Calendar.js +548 -744
  4. package/Date.js +158 -161
  5. package/Dropdown.js +33 -32
  6. package/FormRows.js +93 -97
  7. package/Layer.js +115 -97
  8. package/MIGRATION.mdx +24 -3
  9. package/Menu.js +10 -9
  10. package/MessageBar.js +5 -5
  11. package/Multiselect.js +1498 -1599
  12. package/Number.js +51 -48
  13. package/Popover.js +481 -479
  14. package/RadioBar.js +19 -15
  15. package/Resize.js +61 -61
  16. package/ResultsMenu.js +1208 -1028
  17. package/Scroll.js +482 -475
  18. package/Select.js +949 -1030
  19. package/Slider.js +346 -300
  20. package/SlidingPanels.js +166 -148
  21. package/TabBar.js +187 -172
  22. package/TabLayout.js +8 -8
  23. package/Table.js +1518 -1432
  24. package/Text.js +29 -17
  25. package/TextArea.js +37 -37
  26. package/Tooltip.js +300 -207
  27. package/TransitionOpen.js +44 -65
  28. package/package.json +4 -4
  29. package/types/src/ButtonGroup/ButtonGroup.d.ts +0 -4
  30. package/types/src/ButtonSimple/ButtonSimple.d.ts +1 -1
  31. package/types/src/Calendar/Calendar.d.ts +28 -30
  32. package/types/src/Calendar/MonthHeader.d.ts +12 -22
  33. package/types/src/Color/Color.d.ts +2 -2
  34. package/types/src/Date/Date.d.ts +18 -19
  35. package/types/src/Dropdown/Dropdown.d.ts +2 -1
  36. package/types/src/File/File.d.ts +1 -1
  37. package/types/src/FormRows/FormRows.d.ts +5 -60
  38. package/types/src/FormRows/Row.d.ts +1 -1
  39. package/types/src/Layer/Layer.d.ts +2 -1
  40. package/types/src/Link/Link.d.ts +5 -0
  41. package/types/src/Link/index.d.ts +1 -0
  42. package/types/src/Menu/Item.d.ts +1 -1
  43. package/types/src/Menu/Menu.d.ts +1 -1
  44. package/types/src/Multiselect/Option.d.ts +1 -1
  45. package/types/src/Number/Number.d.ts +10 -2
  46. package/types/src/Popover/Popover.d.ts +1 -4
  47. package/types/src/RadioBar/RadioBar.d.ts +2 -2
  48. package/types/src/Resize/Resize.d.ts +0 -11
  49. package/types/src/ResultsMenu/VirtualizedResultsMenu/VirtualizedResultsMenu.d.ts +1 -1
  50. package/types/src/ResultsMenu/VirtualizedResultsMenu/injectVirtualizedItem.d.ts +2 -0
  51. package/types/src/Scroll/Inner.d.ts +17 -19
  52. package/types/src/Search/Option.d.ts +1 -1
  53. package/types/src/Select/Option.d.ts +5 -1
  54. package/types/src/Select/OptionBase.d.ts +41 -23
  55. package/types/src/Select/SelectAllOption.d.ts +6 -2
  56. package/types/src/Select/SelectBase.d.ts +8 -34
  57. package/types/src/Slider/Slider.d.ts +7 -16
  58. package/types/src/SlidingPanels/SlidingPanels.d.ts +4 -3
  59. package/types/src/TabBar/TabBar.d.ts +10 -2
  60. package/types/src/TabBar/TabBarContext.d.ts +1 -0
  61. package/types/src/TabBar/docs/examples/IconsAbove.d.ts +2 -0
  62. package/types/src/TabBar/docs/examples/IconsLeft.d.ts +2 -0
  63. package/types/src/TabBar/docs/examples/VerticalIconsAbove.d.ts +2 -0
  64. package/types/src/TabBar/docs/examples/VerticalIconsLeft.d.ts +2 -0
  65. package/types/src/TabLayout/TabLayout.d.ts +4 -2
  66. package/types/src/Table/ExpandButton.d.ts +8 -0
  67. package/types/src/Table/HeadDropdownCell.d.ts +2 -0
  68. package/types/src/Table/HeadInner.d.ts +5 -1
  69. package/types/src/Table/Row.d.ts +8 -4
  70. package/types/src/Table/Table.d.ts +0 -2
  71. package/types/src/Table/docs/examples/Complex.d.ts +14 -3
  72. package/types/src/Text/Text.d.ts +2 -2
  73. package/types/src/TextArea/TextArea.d.ts +2 -2
  74. package/types/src/Tooltip/Tooltip.d.ts +38 -5
  75. package/types/src/Tooltip/docs/examples/CustomProps.d.ts +2 -0
  76. package/types/src/Tooltip/docs/examples/Toggletip.d.ts +2 -0
  77. package/types/src/Typography/Typography.d.ts +4 -2
  78. package/types/src/useControlled/useControlled.d.ts +5 -4
  79. package/useControlled.js +37 -15
  80. package/usePrevious.js +62 -30
  81. package/useRovingFocus.js +5 -4
  82. package/types/src/TabBar/docs/examples/IconsInline.d.ts +0 -2
  83. package/types/src/TabBar/docs/examples/IconsSmall.d.ts +0 -2
  84. package/types/src/TabBar/docs/examples/VerticalSmallIcons.d.ts +0 -2
  85. package/types/src/Table/docs/examples/prisma/Complex.d.ts +0 -48
  86. package/types/src/Table/icons/ExpansionRow.d.ts +0 -6
  87. package/types/src/Tooltip/docs/examples/CustomContent.d.ts +0 -2
  88. /package/types/src/Table/docs/examples/{prisma/RowActions.d.ts → RowActions.d.ts} +0 -0
package/Menu.js CHANGED
@@ -282,7 +282,7 @@
282
282
  // so we set them to aria-hidden to prevent that
283
283
 
284
284
  return n().createElement(E, {
285
- "aria-hidden": s === "listbox"
285
+ "aria-hidden": s === "listbox" ? true : undefined
286
286
  }, d);
287
287
  }
288
288
  $.propTypes = H;
@@ -294,8 +294,8 @@
294
294
  const L = require("lodash/isString");
295
295
  var z = e.n(L);
296
296
  // CONCATENATED MODULE: external "@splunk/react-icons/ChevronRight"
297
- const K = require("@splunk/react-icons/ChevronRight");
298
- var B = e.n(K);
297
+ const B = require("@splunk/react-icons/ChevronRight");
298
+ var K = e.n(B);
299
299
  // CONCATENATED MODULE: external "@splunk/react-icons/Checkmark"
300
300
  const W = require("@splunk/react-icons/Checkmark");
301
301
  var G = e.n(W);
@@ -668,10 +668,10 @@
668
668
  }) : e[t] = r, e;
669
669
  }
670
670
  function ze(e) {
671
- var t = Ke(e, "string");
671
+ var t = Be(e, "string");
672
672
  return "symbol" == Ee(t) ? t : t + "";
673
673
  }
674
- function Ke(e, t) {
674
+ function Be(e, t) {
675
675
  if ("object" != Ee(e) || !e) return e;
676
676
  var r = e[Symbol.toPrimitive];
677
677
  if (void 0 !== r) {
@@ -681,7 +681,7 @@
681
681
  }
682
682
  return ("string" === t ? String : Number)(e);
683
683
  }
684
- var Be = {
684
+ var Ke = {
685
685
  active: o().bool,
686
686
  children: o().node,
687
687
  description: o().string,
@@ -866,11 +866,12 @@
866
866
  interactive: false,
867
867
  value: "menu-item",
868
868
  selectedLabel: "Selected",
869
- selected: c
869
+ selected: c,
870
+ disabled: Boolean(d)
870
871
  }), o && n().createElement(me, null, S ? n().createElement(Y(), {
871
872
  hideDefaultTooltip: true,
872
873
  screenReaderText: null
873
- }) : n().createElement(B(), null)), T && n().createElement(ae, {
874
+ }) : n().createElement(K(), null)), T && n().createElement(ae, {
874
875
  "data-test": "description"
875
876
  }, u), n().createElement(ue, null, x ? n().createElement(se, null, x) : p && n().createElement(se, null, p), n().createElement(de, {
876
877
  $truncate: y
@@ -886,7 +887,7 @@
886
887
  } ]);
887
888
  return r;
888
889
  }(r.Component);
889
- Le(Ve, "propTypes", Be);
890
+ Le(Ve, "propTypes", Ke);
890
891
  Le(Ve, "defaultProps", We);
891
892
  Le(Ve, "as", void 0);
892
893
  Le(Ve, "contextType", h);
package/MessageBar.js CHANGED
@@ -90,10 +90,10 @@
90
90
  var y = e.n(h);
91
91
  // CONCATENATED MODULE: external "@splunk/react-icons/ExclamationCircle"
92
92
  const m = require("@splunk/react-icons/ExclamationCircle");
93
- var f = e.n(m);
93
+ var k = e.n(m);
94
94
  // CONCATENATED MODULE: external "@splunk/react-icons/InformationCircle"
95
- const k = require("@splunk/react-icons/InformationCircle");
96
- var x = e.n(k);
95
+ const f = require("@splunk/react-icons/InformationCircle");
96
+ var x = e.n(f);
97
97
  // CONCATENATED MODULE: external "@splunk/react-icons/ExclamationTriangle"
98
98
  const C = require("@splunk/react-icons/ExclamationTriangle");
99
99
  var w = e.n(C);
@@ -119,7 +119,7 @@
119
119
  var T = g().div.withConfig({
120
120
  displayName: "MessageBarStyles__MessageBarContent",
121
121
  componentId: "sc-1uyhzza-0"
122
- })([ "", ";color:inherit;padding:0 8px;text-align:center;margin-right:auto;& a{display:inline-block;color:inherit;text-decoration:underline;text-underline-position:under;padding:0 3px 2px 3px;&:not([disabled]):focus{border-radius:", ";outline:0;", ";}}" ], u.mixins.reset("inline"), u.variables.borderRadius, (0,
122
+ })([ "", ";color:inherit;padding:0 8px;text-align:center;margin-right:auto;& a,& button[data-test='link']{display:inline-block;color:inherit;text-decoration:underline;text-underline-position:under;padding:0 3px 2px 3px;&:not([disabled]):focus{border-radius:", ";outline:0;", ";}}" ], u.mixins.reset("inline"), u.variables.borderRadius, (0,
123
123
  u.pick)({
124
124
  enterprise: {
125
125
  dark: (0, b.css)([ "box-shadow:0 0 0 2px ", ";" ], u.variables.gray80),
@@ -178,7 +178,7 @@
178
178
  displayName: "MessageBarStyles__StyledCheckCircleIcon",
179
179
  componentId: "sc-1uyhzza-2"
180
180
  })([ "", "" ], P);
181
- var A = g()(f()).withConfig({
181
+ var A = g()(k()).withConfig({
182
182
  displayName: "MessageBarStyles__StyledExclamationCircleIcon",
183
183
  componentId: "sc-1uyhzza-3"
184
184
  })([ "", "" ], P);