@splunk/react-ui 5.0.0-rc.2 → 5.1.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 (104) hide show
  1. package/Accordion.js +59 -59
  2. package/Avatar.js +20 -20
  3. package/Breadcrumbs.js +46 -46
  4. package/Button.js +24 -24
  5. package/CHANGELOG.md +380 -0
  6. package/Calendar.js +69 -69
  7. package/Card.js +68 -68
  8. package/Chip.js +16 -16
  9. package/Clickable.js +29 -29
  10. package/Code.js +654 -519
  11. package/CollapsiblePanel.js +112 -112
  12. package/Color.js +107 -107
  13. package/ColumnLayout.js +35 -35
  14. package/ComboBox.js +190 -206
  15. package/ControlGroup.js +129 -121
  16. package/Date.js +148 -146
  17. package/DefinitionList.js +26 -26
  18. package/Dropdown.js +9 -9
  19. package/DualListbox.js +701 -717
  20. package/File.js +403 -403
  21. package/FormRows.js +66 -63
  22. package/Image.js +15 -15
  23. package/JSONTree.js +458 -357
  24. package/Layer.js +60 -72
  25. package/MIGRATION.md +550 -1
  26. package/Markdown.js +66 -66
  27. package/Menu.js +44 -44
  28. package/Message.js +47 -43
  29. package/Modal.js +49 -49
  30. package/ModalLayer.js +21 -17
  31. package/Monogram.js +16 -16
  32. package/Multiselect.js +673 -669
  33. package/Number.js +100 -100
  34. package/Paginator.js +7 -7
  35. package/Popover.js +473 -424
  36. package/Progress.js +12 -12
  37. package/Prose.js +6 -6
  38. package/README.md +6 -6
  39. package/RadioBar.js +180 -166
  40. package/RadioList.js +80 -79
  41. package/ResultsMenu.js +129 -128
  42. package/Scroll.js +50 -50
  43. package/Search.js +148 -164
  44. package/Select.js +674 -674
  45. package/Slider.js +30 -30
  46. package/SlidingPanels.js +24 -24
  47. package/SplitButton.js +50 -50
  48. package/StepBar.js +100 -100
  49. package/Switch.js +45 -45
  50. package/TabBar.js +196 -196
  51. package/TabLayout.js +16 -16
  52. package/Table.js +1207 -1193
  53. package/Text.js +65 -65
  54. package/TextArea.js +108 -93
  55. package/Tooltip.js +203 -197
  56. package/TransitionOpen.js +4 -1
  57. package/Tree.js +464 -366
  58. package/package.json +11 -11
  59. package/stubs-dependencies.d.ts +0 -70
  60. package/stubs-splunkui.d.ts +4 -0
  61. package/types/src/Code/Code.d.ts +17 -1
  62. package/types/src/Code/LineHighlights.d.ts +11 -0
  63. package/types/src/Code/LineNumbers.d.ts +6 -0
  64. package/types/src/Code/docs/examples/LineHighlights.d.ts +3 -0
  65. package/types/src/Code/docs/examples/LineNumbers.d.ts +3 -0
  66. package/types/src/Code/docs/examples/LineNumbersCustomStart.d.ts +3 -0
  67. package/types/src/Date/Date.d.ts +6 -1
  68. package/types/src/DefinitionList/DefinitionList.d.ts +6 -6
  69. package/types/src/Dropdown/Dropdown.d.ts +1 -0
  70. package/types/src/FormRows/FormRows.d.ts +1 -1
  71. package/types/src/JSONTree/JSONTreeItem.d.ts +5 -2
  72. package/types/src/Markdown/Markdown.d.ts +1 -1
  73. package/types/src/Markdown/renderers/MarkdownBlockquote.d.ts +1 -1
  74. package/types/src/Markdown/renderers/MarkdownCodeBlock.d.ts +1 -1
  75. package/types/src/Markdown/renderers/index.d.ts +1 -1
  76. package/types/src/Popover/Popover.d.ts +8 -2
  77. package/types/src/RadioBar/Option.d.ts +1 -1
  78. package/types/src/RadioBar/RadioBar.d.ts +13 -6
  79. package/types/src/RadioBar/RadioBarContext.d.ts +4 -2
  80. package/types/src/RadioList/RadioList.d.ts +2 -1
  81. package/types/src/ResultsMenu/ResultsMenu.d.ts +2 -1
  82. package/types/src/ScreenReaderContent/docs/examples/SkipLink.d.ts +3 -0
  83. package/types/src/Scroll/Inner.d.ts +1 -1
  84. package/types/src/Select/Option.d.ts +1 -1
  85. package/types/src/Select/Select.d.ts +1 -1
  86. package/types/src/Slider/docs/examples/Controlled.d.ts +1 -1
  87. package/types/src/TabLayout/Panel.d.ts +0 -1
  88. package/types/src/Table/Head.d.ts +1 -0
  89. package/types/src/Table/HeadCell.d.ts +2 -3
  90. package/types/src/Table/HeadDropdownCell.d.ts +2 -2
  91. package/types/src/Table/HeadInner.d.ts +4 -4
  92. package/types/src/Table/KeyboardSensor.d.ts +1 -1
  93. package/types/src/Table/RowDragCell.d.ts +1 -1
  94. package/types/src/Tooltip/Tooltip.d.ts +10 -5
  95. package/types/src/Tree/Item.d.ts +63 -0
  96. package/types/src/Tree/Tree.d.ts +13 -6
  97. package/types/src/Tree/TreeContext.d.ts +1 -1
  98. package/types/src/Tree/index.d.ts +1 -1
  99. package/types/src/useControlled/useControlled.d.ts +3 -1
  100. package/useControlled.js +29 -13
  101. package/CHANGELOG.v5.md +0 -354
  102. package/MIGRATION.v5.md +0 -552
  103. package/types/src/Button/docs/examples/Truncated.d.ts +0 -3
  104. package/types/src/Tree/TreeItem.d.ts +0 -44
package/Progress.js CHANGED
@@ -66,11 +66,11 @@
66
66
  // CONCATENATED MODULE: external "react"
67
67
  const t = require("react");
68
68
  var n = e.n(t);
69
- // CONCATENATED MODULE: external "prop-types"
70
- const o = require("prop-types");
71
- var i = e.n(o);
72
69
  // CONCATENATED MODULE: external "lodash/isNumber"
73
- const a = require("lodash/isNumber");
70
+ const o = require("lodash/isNumber");
71
+ var i = e.n(o);
72
+ // CONCATENATED MODULE: external "prop-types"
73
+ const a = require("prop-types");
74
74
  var s = e.n(a);
75
75
  // CONCATENATED MODULE: external "@splunk/react-ui/AnimationToggle"
76
76
  const l = require("@splunk/react-ui/AnimationToggle");
@@ -102,7 +102,7 @@
102
102
  var r = e.$animated, t = e.$type;
103
103
  // Animated is only supported for the info type.
104
104
  // This is enforced in the component and duplicating here
105
- return r && t === "info" ? (0, c.css)([ "background:radial-gradient( circle at center,", ",", " 30% );background-size:200% 100%;animation:", " 2500ms infinite cubic-bezier(0.33,0,0.67,1);" ], d.variables.notificationColorInfoWeak, d.variables.notificationColorInfo, b) : (0,
105
+ return r && t === "info" ? (0, c.css)([ "background:radial-gradient( circle at center,", ",", " 30% );background-size:200% 100%;animation:", " 2500ms infinite cubic-bezier(0.33,0,0.67,1);" ], d.variables.notificationColorInfoStrong, d.variables.notificationColorInfo, b) : (0,
106
106
  c.css)([ "background:", ";" ], (0, d.pickVariant)("$type", {
107
107
  info: d.variables.notificationColorInfo,
108
108
  success: d.variables.notificationColorPositive,
@@ -212,13 +212,13 @@
212
212
  return t;
213
213
  }
214
214
  var $ = {
215
- elementRef: i().oneOfType([ i().func, i().object ]),
216
- percentage: i().number,
217
- tooltip: i().node,
218
- type: i().oneOf([ "info", "success", "error" ])
215
+ elementRef: s().oneOfType([ s().func, s().object ]),
216
+ percentage: s().number,
217
+ tooltip: s().node,
218
+ type: s().oneOf([ "info", "success", "error" ])
219
219
  };
220
220
  function I(e) {
221
- var r = e.elementRef, o = e.percentage, i = e.tooltip, a = e.type, c = a === void 0 ? "info" : a, u = j(e, [ "elementRef", "percentage", "tooltip", "type" ]);
221
+ var r = e.elementRef, o = e.percentage, a = e.tooltip, s = e.type, c = s === void 0 ? "info" : s, u = j(e, [ "elementRef", "percentage", "tooltip", "type" ]);
222
222
  // @docs-props-type ProgressPropsBase
223
223
  if (false) {}
224
224
  var f = (0, t.useState)(false), p = S(f, 2), d = p[0], v = p[1];
@@ -229,8 +229,8 @@
229
229
  var k = (0, t.useCallback)((function() {
230
230
  v(false);
231
231
  }), []);
232
- var w = s()(o) ? o : 0;
233
- var C = i || "".concat(w, "%");
232
+ var w = i()(o) ? o : 0;
233
+ var C = a || "".concat(w, "%");
234
234
 
235
235
  return n().createElement(y, h({
236
236
  onMouseEnter: O,
package/Prose.js CHANGED
@@ -75,10 +75,10 @@
75
75
  var c = e.n(l);
76
76
  // CONCATENATED MODULE: external "@splunk/react-ui/Heading"
77
77
  const u = require("@splunk/react-ui/Heading");
78
- // CONCATENATED MODULE: external "@splunk/react-ui/Paragraph"
79
- const a = require("@splunk/react-ui/Paragraph");
80
78
  // CONCATENATED MODULE: external "@splunk/react-ui/List"
81
- const s = require("@splunk/react-ui/List");
79
+ const a = require("@splunk/react-ui/List");
80
+ // CONCATENATED MODULE: external "@splunk/react-ui/Paragraph"
81
+ const s = require("@splunk/react-ui/Paragraph");
82
82
  // CONCATENATED MODULE: external "@splunk/themes/mixins"
83
83
  const f = require("@splunk/themes/mixins");
84
84
  var p = e.n(f);
@@ -168,15 +168,15 @@
168
168
  return ("string" === r ? String : Number)(e);
169
169
  }
170
170
  var j = {
171
- p: a.StyledParagraph,
171
+ p: s.StyledParagraph,
172
172
  h1: u.StyledHeading,
173
173
  h2: u.StyledHeading,
174
174
  h3: u.StyledHeading,
175
175
  h4: u.StyledHeading,
176
176
  h5: u.StyledHeading,
177
177
  h6: u.StyledHeading,
178
- ul: s.StyledList,
179
- ol: s.StyledList
178
+ ul: a.StyledList,
179
+ ol: a.StyledList
180
180
  };
181
181
  var P = c().section.withConfig({
182
182
  displayName: "Prose__StyledProse",
package/README.md CHANGED
@@ -8,7 +8,7 @@ Install the package and its dependencies.
8
8
 
9
9
  1. Install the peer dependencies:
10
10
  ```bash
11
- npm install react@^16 react-dom@^16 styled-components@^5
11
+ npm install react@^18 react-dom@^18 styled-components@^5
12
12
  ```
13
13
  2. Install the package:
14
14
  ```bash
@@ -74,7 +74,7 @@ It is strongly recommended to include only one instance of `@splunk/react-ui` in
74
74
  using multiple instances of this library on the same page is discouraged.
75
75
 
76
76
  ```
77
- | Multiple instances | @splunk/react-ui 4.x | @splunk/react-ui 4.x and 3.x |
77
+ | Multiple instances | @splunk/react-ui 5.x | @splunk/react-ui 5.x and 4.x |
78
78
  | ------------------ | ----------------------- | ---------------------------- |
79
79
  | In the same bundle | Deduplicate | Avoid |
80
80
  | On the same page | Avoid | Avoid |
@@ -84,19 +84,19 @@ using multiple instances of this library on the same page is discouraged.
84
84
 
85
85
  Multiple instances of `@splunk/react-ui` in the same bundle should be avoided.
86
86
  For example, instead of `4.0.0` and `4.1.0` only `4.1.0` should be used.
87
- Multiple versions of `3.x` are not supported.
87
+ Only major bug fixes will be supported in version `4.x`
88
88
  Use a package manager (Yarn or NPM) or a module bundler (Webpack) to deduplicate versions.
89
89
 
90
90
  ##### 1. Yarn or NPM:
91
91
  `yarn` and `npm` resolve dependencies to avoid duplicate versions.
92
92
 
93
93
  Pros:
94
- * Supports `4.x` and `3.x` in the same bundle.
94
+ * Supports `5.x` and `4.x` in the same bundle.
95
95
 
96
96
  Cons:
97
97
  * Extra versions can unexpectedly be added to lock files while updating dependencies.
98
98
  * Upgrades may require rebuilding the lock file.
99
- * All packages must all define their `@splunk/react-ui` dependency with a major version (`@^4.0` or `@^4.1`),
99
+ * All packages must all define their `@splunk/react-ui` dependency with a major version (`@^5.0` or `@^4.1`),
100
100
  not a minor version (`@~4.0`).
101
101
 
102
102
 
@@ -108,7 +108,7 @@ Pros:
108
108
  * Reliably builds with one version of `@splunk/react-ui`.
109
109
 
110
110
  Cons:
111
- * Cannot be used when `3.x` and `4.x` are required by different dependencies.
111
+ * Cannot be used when `5.x` and `4.x` are required by different dependencies.
112
112
  * If dependencies rely on a newer version, unexpected breakages may occur.
113
113
 
114
114
  ### On the same page