@splunk/react-ui 4.36.0 → 4.38.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 (39) hide show
  1. package/Button.js +139 -132
  2. package/CHANGELOG.md +32 -0
  3. package/Color.js +1145 -977
  4. package/ComboBox.js +1 -2
  5. package/Date.js +21 -24
  6. package/Menu.js +161 -153
  7. package/Multiselect.js +17 -27
  8. package/Progress.js +202 -149
  9. package/RadioBar.js +18 -14
  10. package/ScreenReaderContent.js +138 -94
  11. package/Search.js +45 -42
  12. package/Select.js +89 -99
  13. package/Slider.js +128 -145
  14. package/Switch.js +123 -119
  15. package/Text.js +202 -199
  16. package/TextArea.js +21 -19
  17. package/package.json +4 -4
  18. package/types/src/Button/Button.d.ts +15 -5
  19. package/types/src/Color/Color.d.ts +3 -0
  20. package/types/src/Color/Palette.d.ts +4 -2
  21. package/types/src/ControlGroup/docs/examples/Error.d.ts +2 -2
  22. package/types/src/Date/Date.d.ts +0 -1
  23. package/types/src/Date/docs/examples/Error.d.ts +2 -0
  24. package/types/src/Link/Link.d.ts +3 -4
  25. package/types/src/Menu/Item.d.ts +6 -3
  26. package/types/src/Progress/Progress.d.ts +1 -1
  27. package/types/src/Search/Option.d.ts +7 -0
  28. package/types/src/Select/Select.d.ts +1 -1
  29. package/types/src/Select/SelectBase.d.ts +0 -1
  30. package/types/src/Slider/Slider.d.ts +0 -1
  31. package/types/src/Slider/docs/examples/Error.d.ts +2 -0
  32. package/types/src/Switch/Switch.d.ts +1 -0
  33. package/types/src/Text/Text.d.ts +6 -4
  34. package/types/src/Text/docs/examples/Dimmed.d.ts +2 -0
  35. package/types/src/TextArea/TextArea.d.ts +2 -2
  36. package/types/src/Button/docs/examples/Selected.d.ts +0 -2
  37. package/types/src/Slider/docs/examples/prisma/Error.d.ts +0 -2
  38. /package/types/src/Date/docs/examples/{prisma/WithoutCalendar.d.ts → WithoutCalendar.d.ts} +0 -0
  39. /package/types/src/Progress/docs/examples/{prisma/Type.d.ts → Type.d.ts} +0 -0
package/ComboBox.js CHANGED
@@ -328,8 +328,7 @@
328
328
  "data-test-value": r
329
329
  }, a, {
330
330
  onClick: this.handleClick,
331
- role: "option",
332
- "aria-selected": false
331
+ role: "option"
333
332
  }), l);
334
333
  }
335
334
  } ]);
package/Date.js CHANGED
@@ -250,16 +250,16 @@
250
250
  } else {
251
251
  o = a.apply(this, arguments);
252
252
  }
253
- return E(this, o);
253
+ return R(this, o);
254
254
  };
255
255
  }
256
- function E(e, t) {
256
+ function R(e, t) {
257
257
  if (t && (w(t) === "object" || typeof t === "function")) {
258
258
  return t;
259
259
  }
260
- return R(e);
260
+ return E(e);
261
261
  }
262
- function R(e) {
262
+ function E(e) {
263
263
  if (e === void 0) {
264
264
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
265
265
  }
@@ -343,12 +343,12 @@
343
343
  var a;
344
344
  j(this, n);
345
345
  a = t.call(this, e);
346
- W(R(a), "controlledExternally", void 0);
347
- W(R(a), "focusCalledInternally", false);
348
- W(R(a), "popoverId", void 0);
349
- W(R(a), "calendar", null);
350
- W(R(a), "openWithFocus", false);
351
- W(R(a), "applyTextChange", (function(e) {
346
+ W(E(a), "controlledExternally", void 0);
347
+ W(E(a), "focusCalledInternally", false);
348
+ W(E(a), "popoverId", void 0);
349
+ W(E(a), "calendar", null);
350
+ W(E(a), "openWithFocus", false);
351
+ W(E(a), "applyTextChange", (function(e) {
352
352
  var t = p()(a.state.tempTextInputDate, "l", a.props.locale);
353
353
  if (t.isValid()) {
354
354
  a.handleDateChange(e, {
@@ -361,7 +361,7 @@
361
361
  });
362
362
  }
363
363
  }));
364
- W(R(a), "handleDateChange", (function(e, t, n) {
364
+ W(E(a), "handleDateChange", (function(e, t, n) {
365
365
  var o = t.value;
366
366
  if (n !== "textInput") {
367
367
  a.focusCalledInternally = true;
@@ -385,7 +385,7 @@
385
385
  });
386
386
  }
387
387
  }));
388
- W(R(a), "handleFocus", (function(e, t) {
388
+ W(E(a), "handleFocus", (function(e, t) {
389
389
  var n, o;
390
390
  if (a.focusCalledInternally) {
391
391
  a.focusCalledInternally = false;
@@ -396,26 +396,23 @@
396
396
  }
397
397
  (n = (o = a.props).onFocus) === null || n === void 0 ? void 0 : n.call(o, e, t);
398
398
  }));
399
- W(R(a), "handleClick", (function(e) {
400
- var t, n, o;
401
- if (document.activeElement !== a.state.input && ((t = a.state.anchor) === null || t === void 0 ? void 0 : t.contains(e.target))) {
402
- a.focus();
403
- }
399
+ W(E(a), "handleClick", (function(e) {
400
+ var t, n;
404
401
  if (!a.props.inputOnly && !a.state.calendarOpen) {
405
402
  a.setState({
406
403
  calendarOpen: true
407
404
  });
408
405
  }
409
- (n = (o = a.props).onClick) === null || n === void 0 ? void 0 : n.call(o, e);
406
+ (t = (n = a.props).onClick) === null || t === void 0 ? void 0 : t.call(n, e);
410
407
  }));
411
- W(R(a), "handleInputChange", (function(e, t) {
408
+ W(E(a), "handleInputChange", (function(e, t) {
412
409
  var n = t.value;
413
410
  a.setState({
414
411
  tempTextInputDate: n,
415
412
  calendarOpen: !a.props.inputOnly
416
413
  });
417
414
  }));
418
- W(R(a), "handleKeyDown", (function(e) {
415
+ W(E(a), "handleKeyDown", (function(e) {
419
416
  var t, n;
420
417
  var o = (0, d.keycode)(e.nativeEvent);
421
418
  if (o === "enter" || o === "tab") {
@@ -439,21 +436,21 @@
439
436
  }
440
437
  (t = (n = a.props).onKeyDown) === null || t === void 0 ? void 0 : t.call(n, e);
441
438
  }));
442
- W(R(a), "handleMount", (function(e) {
439
+ W(E(a), "handleMount", (function(e) {
443
440
  a.setState({
444
441
  anchor: e
445
442
  });
446
443
  S(a.props.elementRef, e);
447
444
  }));
448
- W(R(a), "handleInputMount", (function(e) {
445
+ W(E(a), "handleInputMount", (function(e) {
449
446
  a.setState({
450
447
  input: e
451
448
  });
452
449
  }));
453
- W(R(a), "handleCalendarMount", (function(e) {
450
+ W(E(a), "handleCalendarMount", (function(e) {
454
451
  a.calendar = e;
455
452
  }));
456
- W(R(a), "handleRequestClose", (function(e) {
453
+ W(E(a), "handleRequestClose", (function(e) {
457
454
  var t = e.event, n = e.reason;
458
455
  if ((n === "clickAway" || n === "escapeKey") && t !== undefined && t.target !== a.state.anchor) {
459
456
  a.applyTextChange(t);