@splunk/react-ui 5.4.0 → 5.6.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 (89) hide show
  1. package/AnchorMenu.d.ts +2 -0
  2. package/AnchorMenu.js +286 -0
  3. package/Badge.d.ts +2 -0
  4. package/Badge.js +154 -0
  5. package/CHANGELOG.md +42 -0
  6. package/Code.js +1097 -500
  7. package/Color.js +142 -141
  8. package/ComboBox.js +6 -5
  9. package/Link.js +74 -44
  10. package/MIGRATION.md +32 -1
  11. package/Menu.js +41 -43
  12. package/Multiselect.js +615 -2156
  13. package/Number.js +3 -3
  14. package/PhoneNumber.d.ts +2 -0
  15. package/PhoneNumber.js +769 -0
  16. package/Popover.js +73 -75
  17. package/RadioList.js +166 -151
  18. package/ResultsMenu.js +27 -29
  19. package/Select.js +179 -1768
  20. package/SelectBase.d.ts +2 -0
  21. package/SelectBase.js +1714 -0
  22. package/Slider.js +358 -302
  23. package/SlidingPanels.js +55 -62
  24. package/Switch.js +42 -27
  25. package/TabBar.js +295 -294
  26. package/TabLayout.js +14 -14
  27. package/Table.js +1087 -1040
  28. package/TransitionOpen.js +65 -58
  29. package/cypress/support/commands.ts +40 -0
  30. package/cypress/support/component.ts +1 -1
  31. package/cypress/support/index.d.ts +22 -0
  32. package/docker-compose.yml +99 -52
  33. package/package.json +9 -5
  34. package/stubs-splunkui.d.ts +0 -86
  35. package/test-runner-jest.config.js +1 -0
  36. package/types/src/AnchorMenu/AnchorMenu.d.ts +36 -0
  37. package/types/src/AnchorMenu/AnchorMenuContext.d.ts +6 -0
  38. package/types/src/AnchorMenu/Item.d.ts +35 -0
  39. package/types/src/AnchorMenu/docs/examples/Basic.d.ts +6 -0
  40. package/types/src/AnchorMenu/index.d.ts +3 -0
  41. package/types/src/Badge/Badge.d.ts +29 -0
  42. package/types/src/Badge/docs/examples/Basic.d.ts +5 -0
  43. package/types/src/Badge/docs/examples/Count.d.ts +6 -0
  44. package/types/src/Badge/docs/examples/CustomColors.d.ts +8 -0
  45. package/types/src/Badge/docs/examples/Icon.d.ts +6 -0
  46. package/types/src/Badge/index.d.ts +2 -0
  47. package/types/src/Code/Code.d.ts +4 -3
  48. package/types/src/Code/index.d.ts +1 -0
  49. package/types/src/Link/Link.d.ts +4 -0
  50. package/types/src/Link/LinkContext.d.ts +14 -0
  51. package/types/src/Link/docs/examples/Visited.d.ts +7 -0
  52. package/types/src/Link/index.d.ts +1 -0
  53. package/types/src/Menu/Item.d.ts +1 -1
  54. package/types/src/Multiselect/Compact.d.ts +8 -1
  55. package/types/src/Multiselect/Multiselect.d.ts +8 -1
  56. package/types/src/PhoneNumber/PhoneNumber.d.ts +139 -0
  57. package/types/src/PhoneNumber/docs/examples/Controlled.d.ts +7 -0
  58. package/types/src/PhoneNumber/docs/examples/DefaultCountry.d.ts +7 -0
  59. package/types/src/PhoneNumber/docs/examples/Disabled.d.ts +6 -0
  60. package/types/src/PhoneNumber/docs/examples/Error.d.ts +6 -0
  61. package/types/src/PhoneNumber/docs/examples/Inline.d.ts +7 -0
  62. package/types/src/PhoneNumber/docs/examples/Uncontrolled.d.ts +7 -0
  63. package/types/src/PhoneNumber/index.d.ts +2 -0
  64. package/types/src/PhoneNumber/utils.d.ts +47 -0
  65. package/types/src/RadioList/Option.d.ts +6 -1
  66. package/types/src/RadioList/docs/examples/Description.d.ts +6 -0
  67. package/types/src/Select/Option.d.ts +8 -3
  68. package/types/src/Select/Select.d.ts +1 -1
  69. package/types/src/{Select → SelectBase}/OptionBase.d.ts +8 -2
  70. package/types/src/{Select → SelectBase}/SelectBase.d.ts +11 -2
  71. package/types/src/SelectBase/index.d.ts +2 -0
  72. package/types/src/Slider/Slider.d.ts +7 -1
  73. package/types/src/Switch/Switch.d.ts +4 -1
  74. package/types/src/Table/Body.d.ts +6 -1
  75. package/types/src/Table/Cell.d.ts +5 -1
  76. package/types/src/Table/Head.d.ts +6 -2
  77. package/types/src/Table/HeadCell.d.ts +5 -1
  78. package/types/src/Table/Row.d.ts +5 -1
  79. package/types/src/Table/Table.d.ts +20 -1
  80. package/types/src/Table/TableContext.d.ts +1 -0
  81. package/types/src/Table/docs/examples/HorizontalOverflowScroll.d.ts +8 -0
  82. package/types/src/Table/docs/examples/PinActionColumn.d.ts +7 -0
  83. package/types/src/TransitionOpen/TransitionOpen.d.ts +3 -1
  84. package/types/src/useResizeObserver/useResizeObserver.d.ts +2 -0
  85. package/types/src/useRovingFocus/useRovingFocus.d.ts +8 -1
  86. package/usePrevious.d.ts +2 -0
  87. package/useResizeObserver.js +59 -92
  88. package/useRovingFocus.js +96 -41
  89. /package/types/src/{Select → SelectBase}/SelectAllOption.d.ts +0 -0
@@ -0,0 +1,2 @@
1
+ export { default } from './types/src/AnchorMenu';
2
+ export * from './types/src/AnchorMenu';
package/AnchorMenu.js ADDED
@@ -0,0 +1,286 @@
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 t in n) {
28
+ /******/ if (e.o(n, t) && !e.o(r, t)) {
29
+ /******/ Object.defineProperty(r, t, {
30
+ enumerable: true,
31
+ get: n[t]
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 */ $
65
+ });
66
+ // CONCATENATED MODULE: external "react"
67
+ const n = require("react");
68
+ var t = e.n(n);
69
+ // CONCATENATED MODULE: external "prop-types"
70
+ const l = require("prop-types");
71
+ var i = e.n(l);
72
+ // CONCATENATED MODULE: external "@splunk/react-ui/Heading"
73
+ const a = require("@splunk/react-ui/Heading");
74
+ var o = e.n(a);
75
+ // CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
76
+ const c = require("@splunk/ui-utils/i18n");
77
+ // CONCATENATED MODULE: external "@splunk/ui-utils/id"
78
+ const u = require("@splunk/ui-utils/id");
79
+ // CONCATENATED MODULE: ./src/AnchorMenu/AnchorMenuContext.tsx
80
+ var s = (0, n.createContext)({
81
+ hideSpine: false
82
+ });
83
+ /* harmony default export */ const d = s;
84
+ // CONCATENATED MODULE: external "styled-components"
85
+ const f = require("styled-components");
86
+ var p = e.n(f);
87
+ // CONCATENATED MODULE: external "@splunk/react-ui/Menu"
88
+ const v = require("@splunk/react-ui/Menu");
89
+ // CONCATENATED MODULE: external "@splunk/themes"
90
+ const m = require("@splunk/themes");
91
+ // CONCATENATED MODULE: ./src/AnchorMenu/AnchorMenuStyles.ts
92
+ var y = p().nav.withConfig({
93
+ displayName: "AnchorMenuStyles__StyledAnchorMenu",
94
+ componentId: "peh8x9-0"
95
+ })([ "display:flex;flex-direction:column;min-width:200px;gap:", ";" ], m.variables.spacingSmall);
96
+ var b = p()(v.Item).withConfig({
97
+ displayName: "AnchorMenuStyles__StyledItem",
98
+ componentId: "peh8x9-1"
99
+ })([ "display:inline-block;width:100%;&:focus{box-shadow:", ";z-index:1;}color:", ";font-weight:", ";", " &[aria-current]{background:", ";color:", ";border-inline-start:2px solid ", ";}" ], m.variables.focusShadow, m.variables.contentColorDefault, m.variables.fontWeightSemiBold, (function(e) {
100
+ var r = e.$hideSpine;
101
+ return !r ? (0, f.css)([ "border-inline-start:2px solid ", ";" ], m.variables.borderColorWeak) : "";
102
+ }), m.variables.interactiveColorOverlaySelected, m.variables.contentColorActive, m.variables.interactiveColorAccent);
103
+ var h = p().ul.withConfig({
104
+ displayName: "AnchorMenuStyles__StyledAnchorMenuList",
105
+ componentId: "peh8x9-2"
106
+ })([ "--parent-level:0;list-style:none;margin:0;padding:0;" ]);
107
+ var g = p().li.withConfig({
108
+ displayName: "AnchorMenuStyles__StyledAnchorMenuItem",
109
+ componentId: "peh8x9-3"
110
+ })([ "--current-level:calc(var(--parent-level) + 1);& ", "{--parent-level:var(--current-level);}& ", "{padding-inline-start:calc(var(--current-level) * ", ");}" ], h, b, m.variables.spacingLarge);
111
+ // CONCATENATED MODULE: ./src/AnchorMenu/Item.tsx
112
+ function S() {
113
+ return S = Object.assign ? Object.assign.bind() : function(e) {
114
+ for (var r = 1; r < arguments.length; r++) {
115
+ var n = arguments[r];
116
+ for (var t in n) {
117
+ ({}).hasOwnProperty.call(n, t) && (e[t] = n[t]);
118
+ }
119
+ }
120
+ return e;
121
+ }, S.apply(null, arguments);
122
+ }
123
+ function O(e, r) {
124
+ if (null == e) return {};
125
+ var n, t, l = I(e, r);
126
+ if (Object.getOwnPropertySymbols) {
127
+ var i = Object.getOwnPropertySymbols(e);
128
+ for (t = 0; t < i.length; t++) {
129
+ n = i[t], -1 === r.indexOf(n) && {}.propertyIsEnumerable.call(e, n) && (l[n] = e[n]);
130
+ }
131
+ }
132
+ return l;
133
+ }
134
+ function I(e, r) {
135
+ if (null == e) return {};
136
+ var n = {};
137
+ for (var t in e) {
138
+ if ({}.hasOwnProperty.call(e, t)) {
139
+ if (-1 !== r.indexOf(t)) continue;
140
+ n[t] = e[t];
141
+ }
142
+ }
143
+ return n;
144
+ }
145
+ var w = {
146
+ children: i().node,
147
+ elementRef: i().oneOfType([ i().func, i().object ]),
148
+ itemId: i().string,
149
+ label: i().string,
150
+ onClick: i().func,
151
+ to: i().string
152
+ };
153
+ function x(e) {
154
+ var r = e.children, l = e.elementRef, i = e.itemId, a = e.label, o = e.onClick, c = e.to, u = O(e, [ "children", "elementRef", "itemId", "label", "onClick", "to" ]);
155
+ // @docs-props-type AnchorMenuItemPropsBase
156
+ var s = (0, n.useContext)(d), f = s.activeItemId, p = s.hideSpine;
157
+ var v = i !== null && i !== void 0 ? i : c;
158
+ var m = v != null && v === f;
159
+
160
+ return t().createElement(g, S({
161
+ ref: l
162
+ }, u), t().createElement(b, {
163
+ $hideSpine: p,
164
+ "aria-current": m ? true : undefined,
165
+ onClick: o,
166
+ role: "link",
167
+ to: c
168
+ }, a), t().createElement(h, null, r));
169
+ }
170
+ x.propTypes = w;
171
+ /* harmony default export */ const j = x;
172
+ // CONCATENATED MODULE: ./src/AnchorMenu/AnchorMenu.tsx
173
+ function C() {
174
+ return C = Object.assign ? Object.assign.bind() : function(e) {
175
+ for (var r = 1; r < arguments.length; r++) {
176
+ var n = arguments[r];
177
+ for (var t in n) {
178
+ ({}).hasOwnProperty.call(n, t) && (e[t] = n[t]);
179
+ }
180
+ }
181
+ return e;
182
+ }, C.apply(null, arguments);
183
+ }
184
+ function A(e, r) {
185
+ return E(e) || _(e, r) || k(e, r) || M();
186
+ }
187
+ function M() {
188
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
189
+ }
190
+ function k(e, r) {
191
+ if (e) {
192
+ if ("string" == typeof e) return P(e, r);
193
+ var n = {}.toString.call(e).slice(8, -1);
194
+ return "Object" === n && e.constructor && (n = e.constructor.name), "Map" === n || "Set" === n ? Array.from(e) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? P(e, r) : void 0;
195
+ }
196
+ }
197
+ function P(e, r) {
198
+ (null == r || r > e.length) && (r = e.length);
199
+ for (var n = 0, t = Array(r); n < r; n++) {
200
+ t[n] = e[n];
201
+ }
202
+ return t;
203
+ }
204
+ function _(e, r) {
205
+ var n = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
206
+ if (null != n) {
207
+ var t, l, i, a, o = [], c = !0, u = !1;
208
+ try {
209
+ if (i = (n = n.call(e)).next, 0 === r) {
210
+ if (Object(n) !== n) return;
211
+ c = !1;
212
+ } else for (;!(c = (t = i.call(n)).done) && (o.push(t.value), o.length !== r); c = !0) {
213
+ }
214
+ } catch (e) {
215
+ u = !0, l = e;
216
+ } finally {
217
+ try {
218
+ if (!c && null != n["return"] && (a = n["return"](), Object(a) !== a)) return;
219
+ } finally {
220
+ if (u) throw l;
221
+ }
222
+ }
223
+ return o;
224
+ }
225
+ }
226
+ function E(e) {
227
+ if (Array.isArray(e)) return e;
228
+ }
229
+ function q(e, r) {
230
+ if (null == e) return {};
231
+ var n, t, l = T(e, r);
232
+ if (Object.getOwnPropertySymbols) {
233
+ var i = Object.getOwnPropertySymbols(e);
234
+ for (t = 0; t < i.length; t++) {
235
+ n = i[t], -1 === r.indexOf(n) && {}.propertyIsEnumerable.call(e, n) && (l[n] = e[n]);
236
+ }
237
+ }
238
+ return l;
239
+ }
240
+ function T(e, r) {
241
+ if (null == e) return {};
242
+ var n = {};
243
+ for (var t in e) {
244
+ if ({}.hasOwnProperty.call(e, t)) {
245
+ if (-1 !== r.indexOf(t)) continue;
246
+ n[t] = e[t];
247
+ }
248
+ }
249
+ return n;
250
+ }
251
+ var R = {
252
+ activeItemId: i().string,
253
+ children: i().node,
254
+ elementRef: i().oneOfType([ i().func, i().object ]),
255
+ hideSpine: i().bool,
256
+ label: i().string
257
+ };
258
+ var N = (0, c._)("On this page:");
259
+ function D(e) {
260
+ var r = e.activeItemId, l = e.children, i = e.elementRef, a = e.hideSpine, c = e.label, s = c === void 0 ? N : c, f = q(e, [ "activeItemId", "children", "elementRef", "hideSpine", "label" ]);
261
+ // @docs-props-type AnchorMenuPropsBase
262
+ var p = (0, n.useMemo)((function() {
263
+ return {
264
+ activeItemId: r,
265
+ hideSpine: a
266
+ };
267
+ }), [ r, a ]);
268
+ var v = (0, n.useState)((0, u.createDOMID)("anchor-menu-heading")), m = A(v, 1), b = m[0];
269
+
270
+ return t().createElement(y, C({
271
+ "aria-labelledby": b,
272
+ "data-test": "anchor-menu",
273
+ ref: i
274
+ }, f), s && t().createElement(o(), {
275
+ level: 4,
276
+ id: b
277
+ }, s), t().createElement(d.Provider, {
278
+ value: p
279
+ }, t().createElement(h, null, l)));
280
+ }
281
+ D.propTypes = R;
282
+ D.Item = j;
283
+ /* harmony default export */ const $ = D;
284
+ // CONCATENATED MODULE: ./src/AnchorMenu/index.ts
285
+ module.exports = r;
286
+ /******/})();
package/Badge.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export { default } from './types/src/Badge';
2
+ export * from './types/src/Badge';
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,48 @@
1
1
  Change Log
2
2
  ============
3
3
 
4
+ 5.6.0 - December 3, 2025
5
+ ----------
6
+ New Features:
7
+ * New `AnchorMenu` component (SUI-8367).
8
+ * `Menu.Item` now supports `role="link" (SUI-8393).
9
+
10
+ Bug Fixes:
11
+ * `Multiselect` now retains new values when select all is used (SUI-8402).
12
+ * `Slider` now receives focus when an associated label is clicked (SUI-8424).
13
+ * `Slider` now handles thumb position with a large number of steps smoothly (SUI-8423).
14
+ * `Select` and `Multiselect` with `compact` now have improved performance for large numbers of items (SUI-5921).
15
+
16
+ Typescript:
17
+ * `Badge` now exports type definitions (SUI-8426).
18
+
19
+ 5.5.0 - November 4, 2025
20
+ ----------
21
+ New Features:
22
+ * `RadioList.Option` supports new `description` prop (SUI-8197).
23
+ * `Table` supports new `horizontalOverflow` prop. See the migration guide for details (SUI-8063).
24
+ * `Link` components can now display visited styling through the new `LinkProvider` component and its `enableVisitedStyling` prop (SUI-8244).
25
+ * New `Badge` component (SUI-8288).
26
+ * `Table` supports new `pinnedColumns` prop to pin the actions column to the end of the table (SUI-8100).
27
+ * `TransitionOpen` now supports new `onAnimationStart` prop (SUI-8368).
28
+ * New `PhoneNumber` component (SUI-8102).
29
+ * `Code`'s `language` prop now supports 'c', 'cpp', 'csharp', 'powershell' and 'python' (SUI-8382).
30
+
31
+ Bug Fixes:
32
+ * `Select` and `Multiselect` filter placeholder is now capitalized ("Filter" instead of "filter") (SUI-5125).
33
+ * `Link` with the `disabled` prop is now the correct color in Enterprise themes (SUI-8244).
34
+ * `TabLayout` no longer incorrectly sets a value for its top margin (SUI-8364).
35
+ * `Slider`'s thumb now respects bar bounds in min and max position (SUI-8363).
36
+ * `SlidingPanel`'s contents should no longer lose focus when state updates in the parent component cause a re-render (SUI-8342).
37
+ * `Table` now respects the width of expandable or selectable cells when `Table` is smaller than the viewport's width (SUI-8357).
38
+ * `Color` swatch buttons now use valid CSS for their background color (SUI-8315).
39
+ * `TransitionOpen` no longer sometimes flickers at the start of the animation (SUI-8320).
40
+ * `Code` no longer warns if optional `language` prop is not provided (SUI-8382).
41
+ * `Number` now cals the `onChange` handler when removing and re-inputting the same value in controlled mode (SUI-8285).
42
+
43
+ Deprecations:
44
+ * `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).
45
+
4
46
  5.4.0 - October 7, 2025
5
47
  ----------
6
48
  New Features: