@splunk/react-ui 5.4.0 → 5.5.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 (76) hide show
  1. package/Badge.js +154 -0
  2. package/CHANGELOG.md +27 -0
  3. package/Code.js +1097 -500
  4. package/Color.js +142 -141
  5. package/ComboBox.js +6 -5
  6. package/Link.js +74 -44
  7. package/MIGRATION.md +32 -1
  8. package/Menu.js +41 -43
  9. package/Multiselect.js +596 -2143
  10. package/Number.js +3 -3
  11. package/PhoneNumber.d.ts +2 -0
  12. package/PhoneNumber.js +769 -0
  13. package/Popover.js +73 -75
  14. package/RadioList.js +166 -151
  15. package/ResultsMenu.js +27 -29
  16. package/Select.js +179 -1768
  17. package/SelectBase.d.ts +2 -0
  18. package/SelectBase.js +1681 -0
  19. package/Slider.js +202 -199
  20. package/SlidingPanels.js +55 -62
  21. package/Switch.js +42 -27
  22. package/TabBar.js +295 -294
  23. package/TabLayout.js +14 -14
  24. package/Table.js +1087 -1040
  25. package/TransitionOpen.js +82 -74
  26. package/docker-compose.yml +99 -52
  27. package/package.json +9 -5
  28. package/stubs-splunkui.d.ts +0 -86
  29. package/test-runner-jest.config.js +1 -0
  30. package/types/src/Badge/Badge.d.ts +29 -0
  31. package/types/src/Badge/docs/examples/Basic.d.ts +5 -0
  32. package/types/src/Badge/docs/examples/Count.d.ts +6 -0
  33. package/types/src/Badge/docs/examples/CustomColors.d.ts +8 -0
  34. package/types/src/Badge/docs/examples/Icon.d.ts +6 -0
  35. package/types/src/Badge/index.d.ts +2 -0
  36. package/types/src/Code/Code.d.ts +4 -3
  37. package/types/src/Code/index.d.ts +1 -0
  38. package/types/src/Link/Link.d.ts +4 -0
  39. package/types/src/Link/LinkContext.d.ts +14 -0
  40. package/types/src/Link/docs/examples/Visited.d.ts +7 -0
  41. package/types/src/Link/index.d.ts +1 -0
  42. package/types/src/Multiselect/Compact.d.ts +1 -1
  43. package/types/src/Multiselect/Multiselect.d.ts +1 -1
  44. package/types/src/PhoneNumber/PhoneNumber.d.ts +139 -0
  45. package/types/src/PhoneNumber/docs/examples/Controlled.d.ts +7 -0
  46. package/types/src/PhoneNumber/docs/examples/DefaultCountry.d.ts +7 -0
  47. package/types/src/PhoneNumber/docs/examples/Disabled.d.ts +6 -0
  48. package/types/src/PhoneNumber/docs/examples/Error.d.ts +6 -0
  49. package/types/src/PhoneNumber/docs/examples/Inline.d.ts +7 -0
  50. package/types/src/PhoneNumber/docs/examples/Uncontrolled.d.ts +7 -0
  51. package/types/src/PhoneNumber/index.d.ts +2 -0
  52. package/types/src/PhoneNumber/utils.d.ts +47 -0
  53. package/types/src/RadioList/Option.d.ts +6 -1
  54. package/types/src/RadioList/docs/examples/Description.d.ts +6 -0
  55. package/types/src/Select/Option.d.ts +8 -3
  56. package/types/src/Select/Select.d.ts +1 -1
  57. package/types/src/{Select → SelectBase}/OptionBase.d.ts +8 -2
  58. package/types/src/{Select → SelectBase}/SelectBase.d.ts +3 -1
  59. package/types/src/SelectBase/index.d.ts +2 -0
  60. package/types/src/Switch/Switch.d.ts +3 -0
  61. package/types/src/Table/Body.d.ts +6 -1
  62. package/types/src/Table/Cell.d.ts +5 -1
  63. package/types/src/Table/Head.d.ts +6 -2
  64. package/types/src/Table/HeadCell.d.ts +5 -1
  65. package/types/src/Table/Row.d.ts +5 -1
  66. package/types/src/Table/Table.d.ts +20 -1
  67. package/types/src/Table/TableContext.d.ts +1 -0
  68. package/types/src/Table/docs/examples/HorizontalOverflowScroll.d.ts +8 -0
  69. package/types/src/Table/docs/examples/PinActionColumn.d.ts +7 -0
  70. package/types/src/TransitionOpen/TransitionOpen.d.ts +3 -1
  71. package/types/src/useResizeObserver/useResizeObserver.d.ts +2 -0
  72. package/types/src/useRovingFocus/useRovingFocus.d.ts +8 -1
  73. package/usePrevious.d.ts +2 -0
  74. package/useResizeObserver.js +59 -92
  75. package/useRovingFocus.js +96 -41
  76. /package/types/src/{Select → SelectBase}/SelectAllOption.d.ts +0 -0
package/Badge.js ADDED
@@ -0,0 +1,154 @@
1
+ /******/ (() => {
2
+ // webpackBootstrap
3
+ /******/ "use strict";
4
+ /******/ // The require scope
5
+ /******/ var e = {};
6
+ /******/
7
+ /************************************************************************/
8
+ /******/ /* webpack/runtime/compat get default export */
9
+ /******/ (() => {
10
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
11
+ /******/ e.n = r => {
12
+ /******/ var n = r && r.__esModule ?
13
+ /******/ () => r["default"]
14
+ /******/ : () => r
15
+ /******/;
16
+ e.d(n, {
17
+ a: n
18
+ });
19
+ /******/ return n;
20
+ /******/ };
21
+ /******/ })();
22
+ /******/
23
+ /******/ /* webpack/runtime/define property getters */
24
+ /******/ (() => {
25
+ /******/ // define getter functions for harmony exports
26
+ /******/ e.d = (r, n) => {
27
+ /******/ for (var o in n) {
28
+ /******/ if (e.o(n, o) && !e.o(r, o)) {
29
+ /******/ Object.defineProperty(r, o, {
30
+ enumerable: true,
31
+ get: n[o]
32
+ });
33
+ /******/ }
34
+ /******/ }
35
+ /******/ };
36
+ /******/ })();
37
+ /******/
38
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
39
+ /******/ (() => {
40
+ /******/ e.o = (e, r) => Object.prototype.hasOwnProperty.call(e, r)
41
+ /******/;
42
+ })();
43
+ /******/
44
+ /******/ /* webpack/runtime/make namespace object */
45
+ /******/ (() => {
46
+ /******/ // define __esModule on exports
47
+ /******/ e.r = e => {
48
+ /******/ if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
49
+ /******/ Object.defineProperty(e, Symbol.toStringTag, {
50
+ value: "Module"
51
+ });
52
+ /******/ }
53
+ /******/ Object.defineProperty(e, "__esModule", {
54
+ value: true
55
+ });
56
+ /******/ };
57
+ /******/ })();
58
+ /******/
59
+ /************************************************************************/ var r = {};
60
+ // ESM COMPAT FLAG
61
+ e.r(r);
62
+ // EXPORTS
63
+ e.d(r, {
64
+ default: () => /* reexport */ m
65
+ });
66
+ // CONCATENATED MODULE: external "react"
67
+ const n = require("react");
68
+ var o = e.n(n);
69
+ // CONCATENATED MODULE: external "prop-types"
70
+ const t = require("prop-types");
71
+ var l = e.n(t);
72
+ // CONCATENATED MODULE: external "styled-components"
73
+ const a = require("styled-components");
74
+ var i = e.n(a);
75
+ // CONCATENATED MODULE: external "@splunk/themes"
76
+ const c = require("@splunk/themes");
77
+ // CONCATENATED MODULE: external "@splunk/themes/mixins"
78
+ const s = require("@splunk/themes/mixins");
79
+ var u = e.n(s);
80
+ // CONCATENATED MODULE: ./src/Badge/BadgeStyles.ts
81
+ var d = i().span.withConfig({
82
+ displayName: "BadgeStyles__Styled",
83
+ componentId: "sc-14wnqqw-0"
84
+ })([ "", ";", ";gap:", ";align-items:center;justify-content:center;padding:", " ", ";width:min-content;border-radius:500px;", " ", "" ], u().reset("inline-flex"), u().typography("smallBody", {
85
+ color: "active",
86
+ weight: "semiBold"
87
+ }), c.variables.spacingXSmall, c.variables.spacingXSmall, c.variables.spacingMedium, (function(e) {
88
+ var r = e.$backgroundColor;
89
+ return r ? (0, a.css)([ "background-color:", ";" ], r) : (0, a.css)([ "background-color:", ";" ], c.variables.neutral100);
90
+ }), (function(e) {
91
+ var r = e.$foregroundColor;
92
+ return (0, a.css)([ "color:", ";" ], r);
93
+ }));
94
+ var f = i().div.withConfig({
95
+ displayName: "BadgeStyles__StyledLabel",
96
+ componentId: "sc-14wnqqw-1"
97
+ })([ "", "" ], u().ellipsis());
98
+ // CONCATENATED MODULE: ./src/Badge/Badge.tsx
99
+ function p() {
100
+ return p = Object.assign ? Object.assign.bind() : function(e) {
101
+ for (var r = 1; r < arguments.length; r++) {
102
+ var n = arguments[r];
103
+ for (var o in n) {
104
+ ({}).hasOwnProperty.call(n, o) && (e[o] = n[o]);
105
+ }
106
+ }
107
+ return e;
108
+ }, p.apply(null, arguments);
109
+ }
110
+ function g(e, r) {
111
+ if (null == e) return {};
112
+ var n, o, t = b(e, r);
113
+ if (Object.getOwnPropertySymbols) {
114
+ var l = Object.getOwnPropertySymbols(e);
115
+ for (o = 0; o < l.length; o++) {
116
+ n = l[o], -1 === r.indexOf(n) && {}.propertyIsEnumerable.call(e, n) && (t[n] = e[n]);
117
+ }
118
+ }
119
+ return t;
120
+ }
121
+ function b(e, r) {
122
+ if (null == e) return {};
123
+ var n = {};
124
+ for (var o in e) {
125
+ if ({}.hasOwnProperty.call(e, o)) {
126
+ if (-1 !== r.indexOf(o)) continue;
127
+ n[o] = e[o];
128
+ }
129
+ }
130
+ return n;
131
+ }
132
+ var y = {
133
+ backgroundColor: l().oneOfType([ l().string, l().func ]),
134
+ elementRef: l().oneOfType([ l().func, l().object ]),
135
+ label: l().oneOfType([ l().string ]).isRequired,
136
+ icon: l().node,
137
+ foregroundColor: l().oneOfType([ l().string, l().func ])
138
+ };
139
+ function v(e) {
140
+ var r = e.backgroundColor, n = e.elementRef, t = e.label, l = e.icon, a = e.foregroundColor, i = g(e, [ "backgroundColor", "elementRef", "label", "icon", "foregroundColor" ]);
141
+ // @docs-props-type BadgePropsBase
142
+
143
+ return o().createElement(d, p({
144
+ $backgroundColor: r,
145
+ $foregroundColor: a,
146
+ "data-test": "badge",
147
+ ref: n
148
+ }, i), l, o().createElement(f, null, t));
149
+ }
150
+ v.propTypes = y;
151
+ /* harmony default export */ const m = v;
152
+ // CONCATENATED MODULE: ./src/Badge/index.ts
153
+ module.exports = r;
154
+ /******/})();
package/CHANGELOG.md CHANGED
@@ -1,6 +1,33 @@
1
1
  Change Log
2
2
  ============
3
3
 
4
+ 5.5.0 - November 4, 2025
5
+ ----------
6
+ New Features:
7
+ * `RadioList.Option` supports new `description` prop (SUI-8197).
8
+ * `Table` supports new `horizontalOverflow` prop. See the migration guide for details (SUI-8063).
9
+ * `Link` components can now display visited styling through the new `LinkProvider` component and its `enableVisitedStyling` prop (SUI-8244).
10
+ * New `Badge` component (SUI-8288).
11
+ * `Table` supports new `pinnedColumns` prop to pin the actions column to the end of the table (SUI-8100).
12
+ * `TransitionOpen` now supports new `onAnimationStart` prop (SUI-8368).
13
+ * New `PhoneNumber` component (SUI-8102).
14
+ * `Code`'s `language` prop now supports 'c', 'cpp', 'csharp', 'powershell' and 'python' (SUI-8382).
15
+
16
+ Bug Fixes:
17
+ * `Select` and `Multiselect` filter placeholder is now capitalized ("Filter" instead of "filter") (SUI-5125).
18
+ * `Link` with the `disabled` prop is now the correct color in Enterprise themes (SUI-8244).
19
+ * `TabLayout` no longer incorrectly sets a value for its top margin (SUI-8364).
20
+ * `Slider`'s thumb now respects bar bounds in min and max position (SUI-8363).
21
+ * `SlidingPanel`'s contents should no longer lose focus when state updates in the parent component cause a re-render (SUI-8342).
22
+ * `Table` now respects the width of expandable or selectable cells when `Table` is smaller than the viewport's width (SUI-8357).
23
+ * `Color` swatch buttons now use valid CSS for their background color (SUI-8315).
24
+ * `TransitionOpen` no longer sometimes flickers at the start of the animation (SUI-8320).
25
+ * `Code` no longer warns if optional `language` prop is not provided (SUI-8382).
26
+ * `Number` now cals the `onChange` handler when removing and re-inputting the same value in controlled mode (SUI-8285).
27
+
28
+ Deprecations:
29
+ * `Switch`'s `selectedLabel`, `someSelectedLabel`, and `unselectedLabel` props have been deprecated and will be removed in the next major version. See the migration guide for details (SUI-8191).
30
+
4
31
  5.4.0 - October 7, 2025
5
32
  ----------
6
33
  New Features: