@splunk/react-ui 4.43.0 → 4.44.1

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/CHANGELOG.md CHANGED
@@ -1,6 +1,27 @@
1
1
  Change Log
2
2
  ============
3
3
 
4
+ 4.44.1 - April 10, 2025
5
+ ----------
6
+ Bug Fixes:
7
+ * `Combobox` and `Multiselect` no longer call `onOpen` after selecting a value (SUI-7624).
8
+
9
+ 4.44.0 - April 1, 2025
10
+ ----------
11
+ New Features:
12
+ * `Number`'s `onChange` handler now includes a `reason` property in callback data (SUI-7401).
13
+ * `Date` does not render 'Invalid value' for empty strings when controlled (SUI-5993).
14
+ * `Date` does not revert value for empty strings when uncontrolled (SUI-5993).
15
+
16
+ Bug Fixes:
17
+ * `StaticContent` supports new prop `labelledBy` (SUI-5326).
18
+ * `Clickable` now displays the `not-allowed` cursor when disabled (SUI-7297).
19
+ * `Table` now renders dynamically added expansionRows (SUI-7403).
20
+ * `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).
21
+ * `Table`'s resize handler no longer triggers sorting or opening dropdown when `enter` key is pressed (SUI-7320).
22
+ * `Slider`'s disabled state now prevents the appearance of thumb focus when active and displays `not-allowed` cursor on the entire input (SUI-7498).
23
+ * `Table`'s stripe rows now extend all the way across the table for rows without actions (SUI-7232).
24
+
4
25
  4.43.0 - March 4, 2025
5
26
  ----------
6
27
  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/ComboBox.js CHANGED
@@ -654,7 +654,7 @@
654
654
  }));
655
655
  pe(ue(i), "handleInputClick", (function(e) {
656
656
  e.stopPropagation();
657
- if (!i.state.open && !i.props.disabled) {
657
+ if (!i.props.disabled) {
658
658
  i.open();
659
659
  }
660
660
  }));
@@ -807,13 +807,15 @@
807
807
  key: "open",
808
808
  value: function e() {
809
809
  var t = this;
810
- this.setState({
811
- open: true,
812
- activeIndex: 0
813
- }, (function() {
814
- var e, n;
815
- (e = (n = t.props).onOpen) === null || e === void 0 ? void 0 : e.call(n);
816
- }));
810
+ if (!this.state.open) {
811
+ this.setState({
812
+ open: true,
813
+ activeIndex: 0
814
+ }, (function() {
815
+ var e, n;
816
+ (e = (n = t.props).onOpen) === null || e === void 0 ? void 0 : e.call(n);
817
+ }));
818
+ }
817
819
  }
818
820
  }, {
819
821
  key: "close",
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 O = e.n(g);
97
+ var C = e.n(g);
98
98
  // CONCATENATED MODULE: external "@splunk/react-ui/Text"
99
- const C = require("@splunk/react-ui/Text");
100
- var x = e.n(C);
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 = O()(x()).withConfig({
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 = O().div.withConfig({
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 = p()(r.state.tempTextInputDate, "l", r.props.locale);
344
- if (t.isValid()) {
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: t.format(N)
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
- var o = r.isControlled() ? e.value : e.defaultValue || p()().locale(e.locale).format(N);
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
- return this.state.tempTextInputDate === undefined ? p()(this.getValue(), N, this.props.locale).format("l") : this.state.tempTextInputDate;
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:", ";cursor:not-allowed;" ], (0, N.pick)({
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 `"default"`.
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:", ";cursor:not-allowed;", ",", "{color:inherit;}", "{cursor:not-allowed;color:", ";}", "}", "" ], (0,
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: {
package/Multiselect.js CHANGED
@@ -2560,16 +2560,18 @@
2560
2560
  }));
2561
2561
  tn(Yr(a), "open", (function(e) {
2562
2562
  var t = e.resetFilterKeyword;
2563
- a.setState((function(e) {
2564
- return {
2565
- filterKeyword: t ? "" : e.filterKeyword,
2566
- hasFocus: true,
2567
- open: true
2568
- };
2569
- }), (function() {
2570
- var e, t;
2571
- (e = (t = a.props).onOpen) === null || e === void 0 ? void 0 : e.call(t);
2572
- }));
2563
+ if (!a.state.open) {
2564
+ a.setState((function(e) {
2565
+ return {
2566
+ filterKeyword: t ? "" : e.filterKeyword,
2567
+ hasFocus: true,
2568
+ open: true
2569
+ };
2570
+ }), (function() {
2571
+ var e, t;
2572
+ (e = (t = a.props).onOpen) === null || e === void 0 ? void 0 : e.call(t);
2573
+ }));
2574
+ }
2573
2575
  }));
2574
2576
  tn(Yr(a), "handleInputFocus", (function(e) {
2575
2577
  if (a.state.filterKeyword !== "") {