@splunk/react-ui 4.43.0 → 4.44.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.
- package/ButtonGroup.js +10 -11
- package/ButtonSimple.js +209 -209
- package/CHANGELOG.md +16 -0
- package/Clickable.js +1 -1
- package/Date.js +31 -11
- package/DualListbox.js +1 -1
- package/MIGRATION.mdx +22 -1
- package/Menu.js +1 -1
- package/Number.js +169 -167
- package/Slider.js +17 -13
- package/StaticContent.js +15 -13
- package/Table.js +16 -7
- package/Tree.d.ts +2 -0
- package/package.json +2 -2
- package/types/src/Date/Date.d.ts +3 -2
- package/types/src/Number/Number.d.ts +1 -0
- package/types/src/Slider/Slider.d.ts +1 -1
- package/types/src/StaticContent/StaticContent.d.ts +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
Change Log
|
|
2
2
|
============
|
|
3
3
|
|
|
4
|
+
4.44.0 - April 1, 2025
|
|
5
|
+
----------
|
|
6
|
+
New Features:
|
|
7
|
+
* `Number`'s `onChange` handler now includes a `reason` property in callback data (SUI-7401).
|
|
8
|
+
* `Date` does not render 'Invalid value' for empty strings when controlled (SUI-5993).
|
|
9
|
+
* `Date` does not revert value for empty strings when uncontrolled (SUI-5993).
|
|
10
|
+
|
|
11
|
+
Bug Fixes:
|
|
12
|
+
* `StaticContent` supports new prop `labelledBy` (SUI-5326).
|
|
13
|
+
* `Clickable` now displays the `not-allowed` cursor when disabled (SUI-7297).
|
|
14
|
+
* `Table` now renders dynamically added expansionRows (SUI-7403).
|
|
15
|
+
* `ButtonGroup`'s `role` has changed from `menubar` to `group`. Child `Button`'s `role`s have changed from `menuitem` to `button`. See the migration guide for details (SUI-6551).
|
|
16
|
+
* `Table`'s resize handler no longer triggers sorting or opening dropdown when `enter` key is pressed (SUI-7320).
|
|
17
|
+
* `Slider`'s disabled state now prevents the appearance of thumb focus when active and displays `not-allowed` cursor on the entire input (SUI-7498).
|
|
18
|
+
* `Table`'s stripe rows now extend all the way across the table for rows without actions (SUI-7232).
|
|
19
|
+
|
|
4
20
|
4.43.0 - March 4, 2025
|
|
5
21
|
----------
|
|
6
22
|
New Features:
|
package/Clickable.js
CHANGED
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
var v = d().a.withConfig({
|
|
93
93
|
displayName: "ClickableStyles__StyledA",
|
|
94
94
|
componentId: "sc-7al1vw-0"
|
|
95
|
-
})([ "", " cursor:pointer;&[disabled],&[aria-disabled='true']{color:", ";}&::-moz-focus-inner{border:0;padding:0;}" ], b.mixins.reset("inline"), b.variables.contentColorDisabled);
|
|
95
|
+
})([ "", " cursor:pointer;&[disabled],&[aria-disabled='true']{cursor:not-allowed;color:", ";}&::-moz-focus-inner{border:0;padding:0;}" ], b.mixins.reset("inline"), b.variables.contentColorDisabled);
|
|
96
96
|
// CONCATENATED MODULE: ./src/Clickable/NavigationProvider.tsx
|
|
97
97
|
/** @public */
|
|
98
98
|
var y = {
|
package/Date.js
CHANGED
|
@@ -94,12 +94,12 @@
|
|
|
94
94
|
const m = require("@splunk/themes");
|
|
95
95
|
// CONCATENATED MODULE: external "styled-components"
|
|
96
96
|
const g = require("styled-components");
|
|
97
|
-
var
|
|
97
|
+
var C = e.n(g);
|
|
98
98
|
// CONCATENATED MODULE: external "@splunk/react-ui/Text"
|
|
99
|
-
const
|
|
100
|
-
var x = e.n(
|
|
99
|
+
const O = require("@splunk/react-ui/Text");
|
|
100
|
+
var x = e.n(O);
|
|
101
101
|
// CONCATENATED MODULE: ./src/Date/DateStyles.ts
|
|
102
|
-
var k =
|
|
102
|
+
var k = C()(x()).withConfig({
|
|
103
103
|
displayName: "DateStyles__StyledText",
|
|
104
104
|
componentId: "kacgdc-0"
|
|
105
105
|
})([ "cursor:", ";&[data-inline]{flex-basis:", ";width:", ";}" ], (0, m.pickVariant)("$disabled", {
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
},
|
|
116
116
|
prisma: "150px"
|
|
117
117
|
}));
|
|
118
|
-
var w =
|
|
118
|
+
var w = C().div.withConfig({
|
|
119
119
|
displayName: "DateStyles__IconContainer",
|
|
120
120
|
componentId: "kacgdc-1"
|
|
121
121
|
})([ "align-items:center;color:", ";display:flex;padding:", ";pointer-events:none;" ], (0,
|
|
@@ -322,6 +322,9 @@
|
|
|
322
322
|
* @type string
|
|
323
323
|
*/ var N = "YYYY-MM-DD";
|
|
324
324
|
var Z = function e(t) {
|
|
325
|
+
if (t === "") {
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
325
328
|
if (!p()(t, N).isValid()) {
|
|
326
329
|
// eslint-disable-next-line no-console
|
|
327
330
|
console.error('Invalid date string value "'.concat(t, '" provided to Moment.'));
|
|
@@ -340,10 +343,15 @@
|
|
|
340
343
|
B(F(r), "calendarRef", a().createRef());
|
|
341
344
|
B(F(r), "openWithFocus", false);
|
|
342
345
|
B(F(r), "applyTextChange", (function(e) {
|
|
343
|
-
var t =
|
|
344
|
-
|
|
346
|
+
var t = r.state.tempTextInputDate;
|
|
347
|
+
var n = p()(t, "l", r.props.locale);
|
|
348
|
+
if (t === "") {
|
|
349
|
+
r.handleDateChange(e, {
|
|
350
|
+
value: ""
|
|
351
|
+
}, "textInput");
|
|
352
|
+
} else if (n.isValid()) {
|
|
345
353
|
r.handleDateChange(e, {
|
|
346
|
-
value:
|
|
354
|
+
value: n.format(N)
|
|
347
355
|
}, "textInput");
|
|
348
356
|
} else {
|
|
349
357
|
r.setState({
|
|
@@ -445,7 +453,11 @@
|
|
|
445
453
|
}
|
|
446
454
|
}));
|
|
447
455
|
r.controlledExternally = i()(e, "value");
|
|
448
|
-
|
|
456
|
+
/**
|
|
457
|
+
* TODO(SUI-7412): defaultValue will be set to current if date gets empty string.
|
|
458
|
+
* Changing this would be a breaking change but this should be changed in epic/five
|
|
459
|
+
* to have consistent behavior for empty-string between controlled and uncontrolled
|
|
460
|
+
*/ var o = r.isControlled() ? e.value : e.defaultValue || p()().locale(e.locale).format(N);
|
|
449
461
|
r.state = {
|
|
450
462
|
anchor: null,
|
|
451
463
|
calendarOpen: false,
|
|
@@ -479,7 +491,15 @@
|
|
|
479
491
|
}, {
|
|
480
492
|
key: "getTextInputValue",
|
|
481
493
|
value: function e() {
|
|
482
|
-
|
|
494
|
+
var t = this.state.tempTextInputDate;
|
|
495
|
+
if (t === undefined) {
|
|
496
|
+
var n = this.getValue();
|
|
497
|
+
if (n === undefined || n === "") {
|
|
498
|
+
return "";
|
|
499
|
+
}
|
|
500
|
+
return p()(this.getValue(), N, this.props.locale).format("l");
|
|
501
|
+
}
|
|
502
|
+
return t;
|
|
483
503
|
}
|
|
484
504
|
}, {
|
|
485
505
|
key: "isControlled",
|
|
@@ -521,7 +541,7 @@
|
|
|
521
541
|
highlightToday: r,
|
|
522
542
|
locale: l,
|
|
523
543
|
onChange: this.handleDateChange,
|
|
524
|
-
value: c
|
|
544
|
+
value: c === "" ? undefined : c
|
|
525
545
|
}));
|
|
526
546
|
}
|
|
527
547
|
|
package/DualListbox.js
CHANGED
|
@@ -281,7 +281,7 @@
|
|
|
281
281
|
})),
|
|
282
282
|
prisma: (0, _.css)([ "color:", ";transition:background-image 0.2s,border 0.2s,box-shadow 0.2s,text-decoration 0.2s;&:hover{background-color:", ";border-color:", ";box-shadow:", ";}&:active{background-color:", ";transition:none;}&:focus{&:active{background-color:", ";}}" ], N.variables.contentColorActive, N.variables.interactiveColorOverlayHover, N.variables.interactiveColorBorderHover, N.variables.hoverShadow, N.variables.interactiveColorOverlayActive, N.variables.interactiveColorOverlayActive)
|
|
283
283
|
}),
|
|
284
|
-
true: (0, _.css)([ "border-color:", ";color:", ";
|
|
284
|
+
true: (0, _.css)([ "border-color:", ";color:", ";" ], (0, N.pick)({
|
|
285
285
|
prisma: N.variables.interactiveColorBorderDisabled
|
|
286
286
|
}), (0, N.pick)({
|
|
287
287
|
enterprise: N.variables.textDisabledColor,
|
package/MIGRATION.mdx
CHANGED
|
@@ -5,6 +5,27 @@ import Table from '@splunk/react-ui/Table';
|
|
|
5
5
|
|
|
6
6
|
This document lists migration guidance for new features and breaking changes.
|
|
7
7
|
|
|
8
|
+
## 4.44.0
|
|
9
|
+
|
|
10
|
+
### `ButtonGroup` role changed to `group`
|
|
11
|
+
|
|
12
|
+
### Change
|
|
13
|
+
|
|
14
|
+
`ButtonGroup`'s `role` has changed from `menubar` to `group`.
|
|
15
|
+
Child `Button`'s `role`s have changed from `menuitem` to `button`.
|
|
16
|
+
|
|
17
|
+
#### Context
|
|
18
|
+
|
|
19
|
+
`ButtonGroup` did not implement the correct keyboard behavior for a menu bar.
|
|
20
|
+
This created an unexpected user experience for keyboard and screen reader users.
|
|
21
|
+
|
|
22
|
+
#### Migration steps
|
|
23
|
+
|
|
24
|
+
If `role="group"` is not desired:
|
|
25
|
+
* consider using `RadioBar` which supports `role="menubar"`
|
|
26
|
+
* implement either the [Menubar](https://www.w3.org/WAI/ARIA/apg/patterns/menubar/) or [Toolbar](https://www.w3.org/WAI/ARIA/apg/patterns/toolbar/) pattern according to WCAG guidelines using `ButtonGroup`
|
|
27
|
+
* contact the Design System team to make a feature request based on your use case.
|
|
28
|
+
|
|
8
29
|
## 4.40.0
|
|
9
30
|
|
|
10
31
|
### Deprecated `Select`'s `appearance="primary"` value
|
|
@@ -228,7 +249,7 @@ For Enterprise themes:
|
|
|
228
249
|
|
|
229
250
|
For Prisma themes:
|
|
230
251
|
* the `"flat"` appearance can be replaced by `"secondary"` or `"subtle"` depending on the context in which it appears.
|
|
231
|
-
* the `"toggle"` appearance can be replaced with `"
|
|
252
|
+
* the `"toggle"` appearance can be replaced with `"secondary"`.
|
|
232
253
|
|
|
233
254
|
### Deprecated `CollapsiblePanel`'s `titleWithActions` prop
|
|
234
255
|
|
package/Menu.js
CHANGED
|
@@ -368,7 +368,7 @@
|
|
|
368
368
|
var ce = d()(te()).withConfig({
|
|
369
369
|
displayName: "ItemStyles__StyledClickable",
|
|
370
370
|
componentId: "sc-4kc053-4"
|
|
371
|
-
})([ "display:block;position:relative;cursor:pointer;color:", ";word-wrap:break-word;max-width:100%;width:100%;padding:", ";", " ", " ", " &:not([disabled],[aria-disabled='true']){&:hover{background:", ";", "}", " ", "}&:focus{outline:0;box-shadow:", ";", "}&[disabled],&[aria-disabled='true']{color:", ";
|
|
371
|
+
})([ "display:block;position:relative;cursor:pointer;color:", ";word-wrap:break-word;max-width:100%;width:100%;padding:", ";", " ", " ", " &:not([disabled],[aria-disabled='true']){&:hover{background:", ";", "}", " ", "}&:focus{outline:0;box-shadow:", ";", "}&[disabled],&[aria-disabled='true']{color:", ";", ",", "{color:inherit;}", "{color:", ";}", "}", "" ], (0,
|
|
372
372
|
m.pick)({
|
|
373
373
|
prisma: m.variables.contentColorActive,
|
|
374
374
|
enterprise: {
|