@splunk/react-ui 5.0.0-beta.4 → 5.0.0-beta.5

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 (74) hide show
  1. package/Button.js +3 -1
  2. package/CHANGELOG.md +4 -1
  3. package/CHANGELOG.v5.mdx +35 -0
  4. package/Card.js +163 -162
  5. package/Chip.js +171 -225
  6. package/Clickable.js +79 -76
  7. package/ComboBox.js +1 -1
  8. package/Date.js +160 -184
  9. package/DualListbox.js +439 -504
  10. package/File.js +449 -324
  11. package/FormRows.js +143 -142
  12. package/JSONTree.js +496 -521
  13. package/Layer.js +162 -97
  14. package/Link.js +20 -13
  15. package/MIGRATION.v5.mdx +47 -0
  16. package/Markdown.js +1 -1
  17. package/Message.js +119 -141
  18. package/MessageBar.js +109 -168
  19. package/Multiselect.js +595 -602
  20. package/Popover.js +194 -190
  21. package/Progress.js +68 -54
  22. package/RadioBar.js +4 -1
  23. package/RadioList.js +67 -65
  24. package/Resize.js +377 -265
  25. package/ResultsMenu.js +573 -661
  26. package/ScrollContainerContext.js +13 -9
  27. package/Search.js +1 -1
  28. package/Select.js +206 -199
  29. package/Slider.js +455 -329
  30. package/StepBar.js +2 -2
  31. package/Switch.js +88 -87
  32. package/TabBar.js +322 -317
  33. package/TabLayout.js +34 -34
  34. package/Table.js +548 -525
  35. package/Text.js +20 -19
  36. package/TextArea.js +278 -152
  37. package/Tooltip.js +173 -177
  38. package/Tree.js +2 -2
  39. package/Typography.js +30 -28
  40. package/WaitSpinner.js +6 -11
  41. package/cypress/support/commands.ts +14 -4
  42. package/cypress/support/index.d.ts +1 -1
  43. package/package.json +5 -5
  44. package/stubs-splunkui.d.ts +0 -4
  45. package/types/src/Card/Card.d.ts +3 -1
  46. package/types/src/Card/Header.d.ts +2 -0
  47. package/types/src/Card/docs/examples/HeadingTitle.d.ts +3 -0
  48. package/types/src/Clickable/Clickable.d.ts +11 -3
  49. package/types/src/Link/Link.d.ts +4 -0
  50. package/types/src/Message/Message.d.ts +1 -1
  51. package/types/src/MessageBar/MessageBar.d.ts +1 -1
  52. package/types/src/Multiselect/Multiselect.d.ts +1 -8
  53. package/types/src/Multiselect/Normal.d.ts +1 -7
  54. package/types/src/Multiselect/docs/examples/Children.d.ts +2 -9
  55. package/types/src/Multiselect/docs/examples/Controlled.d.ts +2 -9
  56. package/types/src/Multiselect/docs/examples/CustomizeSelected.d.ts +2 -9
  57. package/types/src/Multiselect/docs/examples/Disabled.d.ts +2 -9
  58. package/types/src/Multiselect/docs/examples/Error.d.ts +2 -9
  59. package/types/src/Multiselect/docs/examples/Fetching.d.ts +2 -22
  60. package/types/src/Multiselect/docs/examples/Headings.d.ts +2 -1
  61. package/types/src/Multiselect/docs/examples/LoadMoreOnScrollBottom.d.ts +2 -25
  62. package/types/src/Multiselect/docs/examples/NewValues.d.ts +2 -9
  63. package/types/src/Multiselect/docs/examples/TabInput.d.ts +2 -9
  64. package/types/src/ResultsMenu/ResultsMenu.d.ts +23 -34
  65. package/types/src/Select/SelectBase.d.ts +2 -2
  66. package/types/src/TabBar/TabBar.d.ts +8 -5
  67. package/types/src/TabBar/TabBarContext.d.ts +1 -1
  68. package/types/src/TabLayout/TabLayout.d.ts +8 -5
  69. package/types/src/Typography/Typography.d.ts +27 -22
  70. package/types/src/Date/Icon.d.ts +0 -3
  71. package/types/src/TabBar/docs/examples/IconsAbove.d.ts +0 -3
  72. package/types/src/TabBar/docs/examples/VerticalIconsAbove.d.ts +0 -3
  73. /package/types/src/TabBar/docs/examples/{IconsLeft.d.ts → Icons.d.ts} +0 -0
  74. /package/types/src/TabBar/docs/examples/{VerticalIconsLeft.d.ts → VerticalIcons.d.ts} +0 -0
package/Text.js CHANGED
@@ -134,15 +134,15 @@
134
134
  const P = require("@splunk/react-ui/Box");
135
135
  var q = e.n(P);
136
136
  // CONCATENATED MODULE: ./src/Text/TextStyles.ts
137
- var D = "230px";
138
- var $ = B()(b()).withConfig({
137
+ var $ = "230px";
138
+ var D = B()(b()).withConfig({
139
139
  displayName: "TextStyles__StyledClearButton",
140
140
  componentId: "eg7n6t-0"
141
141
  })([ "display:none;visibility:hidden;" ]);
142
142
  var _ = B()(q()).withConfig({
143
143
  displayName: "TextStyles__StyledBox",
144
144
  componentId: "eg7n6t-1"
145
- })([ "display:flex;justify-content:space-between;flex-grow:1;flex-shrink:1;gap:", ";padding-inline:", ";min-height:", ";overflow:hidden;border:", " solid ", ";border-radius:", ";box-sizing:border-box;background-color:", ";box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);align-items:center;cursor:text;&:hover:not([disabled]){border-color:", ";background-color:", "}&:not([disabled]):has(> input:focus){box-shadow:", ";}&:not([disabled]){", "{visibility:visible;display:block;}}", " ", " ", " ", " &[data-inline]{width:", ";flex-basis:", ";}", "" ], k.variables.spacingXSmall, k.variables.spacingSmall, k.variables.inputHeight, k.variables.inputBorderWidth, k.variables.interactiveColorBorder, k.variables.borderRadius, k.variables.interactiveColorBackground, k.variables.interactiveColorBorderHover, k.variables.interactiveColorOverlayHover, k.variables.focusShadow, /* sc-sel */ $, (function(e) {
145
+ })([ "display:flex;justify-content:space-between;flex-grow:1;flex-shrink:1;gap:", ";padding-inline:", ";min-height:", ";overflow:hidden;border:", " solid ", ";border-radius:", ";box-sizing:border-box;background-color:", ";box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);align-items:center;cursor:text;&:hover:not([disabled]){border-color:", ";background-color:", "}&:not([disabled]):has(> input:focus){box-shadow:", ";}&:not([disabled]){", "{visibility:visible;display:block;}}", " ", " ", " ", " &[data-inline]{width:", ";flex-basis:", ";}", "" ], k.variables.spacingXSmall, k.variables.spacingSmall, k.variables.inputHeight, k.variables.inputBorderWidth, k.variables.interactiveColorBorder, k.variables.borderRadius, k.variables.interactiveColorBackground, k.variables.interactiveColorBorderHover, k.variables.interactiveColorOverlayHover, k.variables.focusShadow, /* sc-sel */ D, (function(e) {
146
146
  var r = e.$error;
147
147
  return r && (0, A.css)([ "border-color:", ";&:hover:not([disabled]){border-color:", ";}" ], k.variables.interactiveColorAccentError, k.variables.interactiveColorAccentErrorStrong);
148
148
  }), (function(e) {
@@ -153,15 +153,15 @@
153
153
  return r && (0, A.css)([ "border-top-left-radius:0;border-bottom-left-radius:0;" ]);
154
154
  }), (function(e) {
155
155
  var r = e.$disabled;
156
- return r && (0, A.css)([ "border-color:", ";box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);background-color:", ";" ], k.variables.interactiveColorBorderDisabled, k.variables.interactiveColorBackgroundDisabled);
157
- }), D, D, (function(e) {
156
+ return r && (0, A.css)([ "border-color:", ";box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);background-color:", ";cursor:not-allowed;" ], k.variables.interactiveColorBorderDisabled, k.variables.interactiveColorBackgroundDisabled);
157
+ }), $, $, (function(e) {
158
158
  var r = e.$isTimeInput;
159
- return r && (0, A.css)([ "@media screen and (min--moz-device-pixel-ratio:0){", "{display:none;}}" ], /* sc-sel */ $);
159
+ return r && (0, A.css)([ "@media screen and (min--moz-device-pixel-ratio:0){", "{display:none;}}" ], /* sc-sel */ D);
160
160
  }));
161
161
  /* Some of these need greater specificity than input[type=text] */ var N = B().input.withConfig({
162
162
  displayName: "TextStyles__StyledInput",
163
163
  componentId: "eg7n6t-2"
164
- })([ "", ";", " width:100%;outline-style:none;border:0;background:transparent;flex-grow:1;font-size:inherit;&[type='time']{&::-webkit-calendar-picker-indicator{display:none;}}&::placeholder{color:", ";opacity:1;}&[disabled],&[aria-disabled='true']{cursor:not-allowed;color:", ";&::placeholder{color:", ";}}" ], k.mixins.reset("inline-flex"), k.mixins.typography("body", {
164
+ })([ "", ";", " width:100%;outline-style:none;border:0;background:transparent;flex-grow:1;font-size:inherit;&[type='time']{&::-webkit-calendar-picker-indicator{display:none;}}&::placeholder{color:", ";opacity:1;}&[disabled],&[aria-disabled='true']{color:", ";&::placeholder{color:", ";}}" ], k.mixins.reset("inline-flex"), k.mixins.typography("body", {
165
165
  lineHeight: "single",
166
166
  color: "active"
167
167
  }), k.variables.contentColorMuted, k.variables.contentColorDisabled, k.variables.contentColorDisabled);
@@ -172,7 +172,7 @@
172
172
  return (0, A.css)([ "height:calc(", " - 2px);" ], k.variables.inputHeight);
173
173
  }), (function(e) {
174
174
  var r = e.$disabled;
175
- return r && (0, A.css)([ "cursor:not-allowed;color:", ";" ], k.variables.contentColorDisabled);
175
+ return r && (0, A.css)([ "color:", ";" ], k.variables.contentColorDisabled);
176
176
  }), (0, I.buttonMixin)({
177
177
  borderColor: k.variables.transparent,
178
178
  borderColorHover: k.variables.transparent,
@@ -391,7 +391,7 @@
391
391
  });
392
392
  /** Note: Text places role and aria props onto the input. All other props are placed on the wrapper. */ function le(e) {
393
393
  var r;
394
- var o = e.append, a = o === void 0 ? false : o, i = e.autoCapitalize, u = e.autoComplete, c = e.autoCorrect, v = e.autoFocus, p = v === void 0 ? false : v, f = e.canClear, y = f === void 0 ? false : f, C = e.children, x = e.defaultValue, k = e.disabled, w = k === void 0 ? false : k, O = e.describedBy, j = e.elementRef, E = e.endAdornment, A = e.error, B = A === void 0 ? false : A, I = e.inline, P = I === void 0 ? false : I, q = e.inputClassName, D = e.inputId, H = e.inputRef, z = e.labelledBy, V = e.maxLength, K = e.name, L = e.onBlur, U = e.onChange, W = e.onClick, X = e.onFocus, Y = e.onKeyDown, Z = e.onSelect, ee = e.passwordVisibilityToggle, re = ee === void 0 ? false : ee, te = e.placeholder, oe = e.prepend, ae = oe === void 0 ? false : oe, le = e.required, ue = e.spellCheck, se = e.startAdornment, ce = e.tabIndex, de = ce === void 0 ? 0 : ce, ve = e.title, be = e.type, pe = be === void 0 ? "text" : be, fe = e.value, me = ne(e, [ "append", "autoCapitalize", "autoComplete", "autoCorrect", "autoFocus", "canClear", "children", "defaultValue", "disabled", "describedBy", "elementRef", "endAdornment", "error", "inline", "inputClassName", "inputId", "inputRef", "labelledBy", "maxLength", "name", "onBlur", "onChange", "onClick", "onFocus", "onKeyDown", "onSelect", "passwordVisibilityToggle", "placeholder", "prepend", "required", "spellCheck", "startAdornment", "tabIndex", "title", "type", "value" ]);
394
+ var o = e.append, a = o === void 0 ? false : o, i = e.autoCapitalize, u = e.autoComplete, c = e.autoCorrect, v = e.autoFocus, p = v === void 0 ? false : v, f = e.canClear, y = f === void 0 ? false : f, C = e.children, x = e.defaultValue, k = e.disabled, w = k === void 0 ? false : k, O = e.describedBy, j = e.elementRef, E = e.endAdornment, A = e.error, B = A === void 0 ? false : A, I = e.inline, P = I === void 0 ? false : I, q = e.inputClassName, $ = e.inputId, H = e.inputRef, z = e.labelledBy, V = e.maxLength, K = e.name, L = e.onBlur, U = e.onChange, W = e.onClick, X = e.onFocus, Y = e.onKeyDown, Z = e.onSelect, ee = e.passwordVisibilityToggle, re = ee === void 0 ? false : ee, te = e.placeholder, oe = e.prepend, ae = oe === void 0 ? false : oe, le = e.required, ue = e.spellCheck, se = e.startAdornment, ce = e.tabIndex, de = ce === void 0 ? 0 : ce, ve = e.title, be = e.type, pe = be === void 0 ? "text" : be, fe = e.value, me = ne(e, [ "append", "autoCapitalize", "autoComplete", "autoCorrect", "autoFocus", "canClear", "children", "defaultValue", "disabled", "describedBy", "elementRef", "endAdornment", "error", "inline", "inputClassName", "inputId", "inputRef", "labelledBy", "maxLength", "name", "onBlur", "onChange", "onClick", "onFocus", "onKeyDown", "onSelect", "passwordVisibilityToggle", "placeholder", "prepend", "required", "spellCheck", "startAdornment", "tabIndex", "title", "type", "value" ]);
395
395
  // @docs-props-type TextPropsBase
396
396
  var ye = (0, t.useContext)(m.ControlGroupContext);
397
397
  var ge = g()({
@@ -446,10 +446,10 @@
446
446
  }
447
447
  W === null || W === void 0 ? void 0 : W(e);
448
448
  }), [ W ]);
449
- var De = (0, t.useCallback)((function(e) {
449
+ var $e = (0, t.useCallback)((function(e) {
450
450
  e.stopPropagation();
451
451
  }), []);
452
- var $e = (0, t.useCallback)((function(e) {
452
+ var De = (0, t.useCallback)((function(e) {
453
453
  var r = e.target.value;
454
454
  X === null || X === void 0 ? void 0 : X(e, {
455
455
  value: r,
@@ -479,7 +479,7 @@
479
479
 
480
480
  return n().createElement(R, J({
481
481
  "data-test": "end-adornment",
482
- onClick: De
482
+ onClick: $e
483
483
  }, r), E);
484
484
  }
485
485
  if (re && !w) {
@@ -500,7 +500,7 @@
500
500
  var i = a ? (0, h._)("Clear ".concat(a, " text field")) : (0, h._)("Clear text field");
501
501
  if (!!Te && y) {
502
502
 
503
- return n().createElement(R, r, !w && n().createElement($, {
503
+ return n().createElement(R, r, !w && n().createElement(D, {
504
504
  "data-test": "clear",
505
505
  appearance: "secondary",
506
506
  "aria-label": i,
@@ -509,21 +509,21 @@
509
509
  }));
510
510
  }
511
511
  return undefined;
512
- }), [ y, (r = ye.labelAttrs) === null || r === void 0 ? void 0 : r.text, w, Te, E, De, Ie, Fe, je, re ]);
512
+ }), [ y, (r = ye.labelAttrs) === null || r === void 0 ? void 0 : r.text, w, Te, E, $e, Ie, Fe, je, re ]);
513
513
  var Me = (0, t.useCallback)((function() {
514
514
  var e = {
515
- disabled: !!w,
515
+ $disabled: !!w,
516
516
  $position: "start"
517
517
  };
518
518
  if (se) {
519
519
 
520
520
  return n().createElement(R, J({
521
521
  "data-test": "start-adornment",
522
- onClick: De
522
+ onClick: $e
523
523
  }, e), se);
524
524
  }
525
525
  return undefined;
526
- }), [ w, De, se ]);
526
+ }), [ w, $e, se ]);
527
527
  (0, t.useEffect)((function() {
528
528
  if (false) {}
529
529
  }), [ y, re ]);
@@ -553,14 +553,14 @@
553
553
  autoCorrect: c,
554
554
  autoFocus: p,
555
555
  className: q,
556
- id: D,
556
+ id: $,
557
557
  maxLength: V,
558
558
  name: K,
559
559
  onChange: Be,
560
560
  onKeyDown: _e,
561
561
  onSelect: Re,
562
562
  onClick: Pe,
563
- onFocus: $e,
563
+ onFocus: De,
564
564
  onBlur: Ae,
565
565
  placeholder: te,
566
566
  ref: Ne,
@@ -582,6 +582,7 @@
582
582
  $isTimeInput: We,
583
583
  "data-test": "text",
584
584
  "data-test-value": Ue,
585
+ "data-test-disabled": w === "dimmed" && "dimmed" || w && "disabled" || undefined,
585
586
  elementRef: j,
586
587
  flex: true,
587
588
  inline: P,