@splunk/react-ui 4.33.0 → 4.35.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 (80) hide show
  1. package/Breadcrumbs.js +20 -29
  2. package/Button.js +20 -23
  3. package/ButtonGroup.js +20 -23
  4. package/ButtonSimple.js +33 -34
  5. package/CHANGELOG.md +56 -1
  6. package/Card.js +129 -113
  7. package/Chip.js +75 -82
  8. package/CollapsiblePanel.js +281 -264
  9. package/Color.js +103 -93
  10. package/ComboBox.js +3 -2
  11. package/Concertina.js +139 -138
  12. package/ControlGroup.js +43 -39
  13. package/DualListbox.js +8 -11
  14. package/File.js +25 -30
  15. package/FormRows.js +53 -53
  16. package/Image.js +13 -13
  17. package/JSONTree.js +87 -85
  18. package/List.js +9 -13
  19. package/MIGRATION.mdx +100 -0
  20. package/Markdown.js +12 -12
  21. package/Menu.js +492 -699
  22. package/Message.js +192 -194
  23. package/MessageBar.js +104 -104
  24. package/Modal.js +2 -2
  25. package/Monogram.js +140 -94
  26. package/Multiselect.js +45 -49
  27. package/Paginator.js +8 -8
  28. package/Popover.js +53 -54
  29. package/Progress.js +45 -46
  30. package/RadioBar.js +117 -115
  31. package/RadioList.js +8 -5
  32. package/ResultsMenu.js +272 -279
  33. package/Search.js +197 -199
  34. package/Select.js +86 -84
  35. package/Slider.js +9 -9
  36. package/SplitButton.js +1 -4
  37. package/StaticContent.js +1 -1
  38. package/StepBar.js +92 -88
  39. package/Switch.js +217 -211
  40. package/TabBar.js +13 -5
  41. package/Table.js +714 -717
  42. package/Text.js +94 -83
  43. package/TextArea.js +162 -163
  44. package/Tooltip.js +1 -1
  45. package/package.json +8 -8
  46. package/stubs-splunkui.d.ts +11 -0
  47. package/types/src/Breadcrumbs/Breadcrumbs.d.ts +0 -1
  48. package/types/src/Breadcrumbs/Item.d.ts +0 -1
  49. package/types/src/Card/Card.d.ts +3 -1
  50. package/types/src/Card/Header.d.ts +22 -5
  51. package/types/src/Chip/Chip.d.ts +2 -4
  52. package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +5 -0
  53. package/types/src/CollapsiblePanel/icons/ExpandPanel.d.ts +1 -3
  54. package/types/src/Color/Color.d.ts +5 -5
  55. package/types/src/ComboBox/Option.d.ts +0 -1
  56. package/types/src/List/List.d.ts +2 -4
  57. package/types/src/Menu/Heading.d.ts +1 -1
  58. package/types/src/Menu/Item.d.ts +10 -5
  59. package/types/src/Menu/Menu.d.ts +18 -26
  60. package/types/src/Menu/MenuContext.d.ts +3 -2
  61. package/types/src/Menu/docs/examples/Dimmed.d.ts +2 -0
  62. package/types/src/Monogram/Monogram.d.ts +5 -6
  63. package/types/src/Multiselect/Option.d.ts +0 -1
  64. package/types/src/Progress/Progress.d.ts +4 -1
  65. package/types/src/RadioBar/Option.d.ts +4 -1
  66. package/types/src/RadioBar/RadioBar.d.ts +6 -4
  67. package/types/src/RadioBar/docs/examples/MenuBar.d.ts +2 -0
  68. package/types/src/ResultsMenu/ResultsMenu.d.ts +13 -28
  69. package/types/src/ResultsMenu/VirtualizedResultsMenu/VirtualizedResultsMenu.d.ts +3 -5
  70. package/types/src/Search/Option.d.ts +19 -6
  71. package/types/src/Search/docs/examples/OptionsLinks.d.ts +2 -0
  72. package/types/src/Select/Option.d.ts +0 -1
  73. package/types/src/Select/OptionBase.d.ts +2 -3
  74. package/types/src/Select/Select.d.ts +2 -2
  75. package/types/src/Select/SelectBase.d.ts +2 -2
  76. package/types/src/Table/Body.d.ts +0 -4
  77. package/types/src/Table/DragHandle.d.ts +1 -2
  78. package/types/src/Text/Text.d.ts +2 -0
  79. package/useRovingFocus.js +26 -40
  80. package/types/src/Select/docs/examples/prisma/Appearance.d.ts +0 -14
package/Breadcrumbs.js CHANGED
@@ -61,9 +61,9 @@
61
61
  e.r(r);
62
62
  // EXPORTS
63
63
  e.d(r, {
64
- BreadcrumbsContext: () => /* reexport */ E,
65
- Item: () => /* reexport */ O,
66
- default: () => /* reexport */ q
64
+ BreadcrumbsContext: () => /* reexport */ x,
65
+ Item: () => /* reexport */ C,
66
+ default: () => /* reexport */ E
67
67
  });
68
68
  // CONCATENATED MODULE: external "react"
69
69
  const t = require("react");
@@ -143,14 +143,10 @@
143
143
  startAdornment: o().node,
144
144
  to: o().string.isRequired
145
145
  };
146
- var g = {
147
- enableCurrentPage: false,
148
- isCurrent: false
149
- };
150
- function C(e) {
146
+ function g(e) {
151
147
  var r = e.enableCurrentPage, a = e.endAdornment, o = e.isCurrent, l = e.label, i = e.onClick, c = e.startAdornment, u = e.to, s = b(e, [ "enableCurrentPage", "endAdornment", "isCurrent", "label", "onClick", "startAdornment", "to" ]);
152
148
  // @docs-props-type ItemPropsBase
153
- var f = (0, t.useContext)(E), v = f.onClick;
149
+ var f = (0, t.useContext)(x), v = f.onClick;
154
150
  var y = {
155
151
  to: u
156
152
  };
@@ -178,19 +174,18 @@
178
174
  "data-test": "item"
179
175
  }, C, y, s), c && c, l, a && a);
180
176
  }
181
- C.propTypes = y;
182
- C.defaultProps = g;
183
- /* harmony default export */ const O = C;
177
+ g.propTypes = y;
178
+ /* harmony default export */ const C = g;
184
179
  // CONCATENATED MODULE: ./src/Breadcrumbs/BreadcrumbsStyles.ts
185
- var h = c().ol.withConfig({
180
+ var O = c().ol.withConfig({
186
181
  displayName: "BreadcrumbsStyles__StyledList",
187
182
  componentId: "sc-1maeyfk-0"
188
183
  })([ "", " flex-wrap:wrap;" ], u.mixins.reset("flex"));
189
- var k = c().li.withConfig({
184
+ var h = c().li.withConfig({
190
185
  displayName: "BreadcrumbsStyles__StyledListItem",
191
186
  componentId: "sc-1maeyfk-1"
192
187
  })([ "display:flex;min-width:max-content;a[aria-current]{font-weight:", ";color:", ";cursor:default;}" ], u.variables.fontWeightSemiBold, u.variables.contentColorActive);
193
- var P = c().span.withConfig({
188
+ var k = c().span.withConfig({
194
189
  displayName: "BreadcrumbsStyles__StyledSeparator",
195
190
  componentId: "sc-1maeyfk-2"
196
191
  })([ "cursor:default;padding:0 ", ";color:", ";" ], u.variables.spacingSmall, u.variables.contentColorDefault);
@@ -236,17 +231,14 @@
236
231
  }
237
232
  return t;
238
233
  }
239
- var x = {
234
+ var P = {
240
235
  children: o().node.isRequired,
241
236
  elementRef: o().oneOfType([ o().func, o().object ]),
242
237
  enableCurrentPage: o().bool,
243
238
  onClick: o().func
244
239
  };
245
- var _ = {
246
- enableCurrentPage: false
247
- };
248
- var E = n().createContext({});
249
- function I(e) {
240
+ var x = n().createContext({});
241
+ function _(e) {
250
242
  var r = e.children, a = e.elementRef, o = e.enableCurrentPage, i = e.onClick, c = S(e, [ "children", "elementRef", "enableCurrentPage", "onClick" ]);
251
243
  // @docs-props-type BreadcrumbsPropsBase
252
244
  var u;
@@ -260,9 +252,9 @@
260
252
  enableCurrentPage: o
261
253
  });
262
254
 
263
- return n().createElement(k, {
255
+ return n().createElement(h, {
264
256
  key: e.props.to
265
- }, i, !l && n().createElement(P, {
257
+ }, i, !l && n().createElement(k, {
266
258
  "aria-hidden": "true"
267
259
  }, "/"));
268
260
  }));
@@ -270,18 +262,17 @@
270
262
  onClick: i
271
263
  };
272
264
 
273
- return n().createElement(E.Provider, {
265
+ return n().createElement(x.Provider, {
274
266
  value: f
275
267
  }, n().createElement("nav", w({
276
268
  "data-test": "breadcrumbs",
277
269
  "aria-label": (0, l._)("Breadcrumbs"),
278
270
  ref: a
279
- }, c), n().createElement(h, null, s)));
271
+ }, c), n().createElement(O, null, s)));
280
272
  }
281
- I.propTypes = x;
282
- I.defaultProps = _;
283
- I.Item = O;
284
- /* harmony default export */ const q = I;
273
+ _.propTypes = P;
274
+ _.Item = C;
275
+ /* harmony default export */ const E = _;
285
276
  // CONCATENATED MODULE: ./src/Breadcrumbs/index.ts
286
277
  module.exports = r;
287
278
  /******/})();
package/Button.js CHANGED
@@ -85,7 +85,7 @@
85
85
  // CONCATENATED MODULE: external "@splunk/themes"
86
86
  const m = require("@splunk/themes");
87
87
  // CONCATENATED MODULE: ./src/Button/ButtonStyles.ts
88
- var v = u().span.withConfig({
88
+ var y = u().span.withConfig({
89
89
  displayName: "ButtonStyles__StyledIcon",
90
90
  componentId: "eqxqs2-0"
91
91
  })([ "display:flex;align-items:center;flex-shrink:0;font-size:", ";", "" ], (0,
@@ -101,10 +101,10 @@
101
101
  prisma: (0, p.css)([ "padding-right:8px;" ])
102
102
  }
103
103
  }));
104
- var y = u()(d()).withConfig({
104
+ var v = u()(d()).withConfig({
105
105
  displayName: "ButtonStyles__StyledButtonSimple",
106
106
  componentId: "eqxqs2-1"
107
- })([ "text-decoration:none;white-space:nowrap;flex-grow:1;min-width:0;max-width:100%;line-height:", ";min-height:", ";padding:", ";", " ", " &[data-inline]{:where(:not(a)){display:inline-block;}:where(a){display:inline-flex;}vertical-align:middle;", "}[data-inline] + &&[data-inline]{margin-bottom:0;", "}" ], m.variables.lineHeight, m.variables.inputHeight, (0,
107
+ })([ "vertical-align:middle;text-decoration:none;white-space:nowrap;flex-grow:1;min-width:0;max-width:100%;line-height:", ";min-height:", ";padding:", ";", " ", " &[data-inline]{:where(:not(a)){display:inline-block;}:where(a){display:inline-flex;}", "}[data-inline] + &&[data-inline]{margin-bottom:0;", "}" ], m.variables.lineHeight, m.variables.inputHeight, (0,
108
108
  m.pick)({
109
109
  enterprise: {
110
110
  comfortable: "5px 14px",
@@ -125,15 +125,15 @@
125
125
  return !t && !n && !r && (0, p.css)([ "width:100%;" ]);
126
126
  }), (function(e) {
127
127
  var t = e.$isIconOnly;
128
- return t && (0, p.css)([ "box-sizing:border-box;padding:", ";width:", ";min-width:", ";" ], (0,
128
+ return t && (0, p.css)([ "box-sizing:border-box;", ";width:", ";min-width:", ";" ], (0,
129
129
  m.pick)({
130
130
  enterprise: {
131
- comfortable: "0 5px",
132
- compact: "0 2px"
131
+ comfortable: (0, p.css)([ "padding:0 5px;" ]),
132
+ compact: (0, p.css)([ "padding:0 2px;" ])
133
133
  },
134
134
  prisma: {
135
- comfortable: (0, p.css)([ "0px calc(", " / 2 - 1px)" ], m.variables.inputHeight),
136
- compact: (0, p.css)([ "0px calc(", " / 2 - 1px)" ], m.variables.inputHeight)
135
+ comfortable: (0, p.css)([ "padding:0 calc(", " / 2 - 1px);" ], m.variables.inputHeight),
136
+ compact: (0, p.css)([ "padding:0 calc(", " / 2 - 1px);" ], m.variables.inputHeight)
137
137
  }
138
138
  }), m.variables.inputHeight, m.variables.inputHeight);
139
139
  }), (function(e) {
@@ -141,10 +141,7 @@
141
141
  return t ? null : (0, p.css)([ "width:auto;" ]);
142
142
  }), (function(e) {
143
143
  var t = e.prepend;
144
- return !t && (0, p.css)([ "margin-left:", ";" ], (0, m.pick)({
145
- enterprise: m.variables.spacingHalf,
146
- prisma: m.variables.spacingSmall
147
- }));
144
+ return !t && (0, p.css)([ "margin-left:", ";" ], m.variables.spacingSmall);
148
145
  }));
149
146
  var b = u().span.withConfig({
150
147
  displayName: "ButtonStyles__StyledContentWrapper",
@@ -201,9 +198,9 @@
201
198
  true: (0, p.css)([ "color:", ";" ], m.variables.contentColorInverted),
202
199
  false: (0, p.css)([ "color:", ";", ":hover > * > &,", ":active > * > &,{color:", ";}" ], m.variables.contentColorDefault,
203
200
  /* sc-sel */
204
- y,
201
+ v,
205
202
  /* sc-sel */
206
- y, m.variables.contentColorDefault)
203
+ v, m.variables.contentColorDefault)
207
204
  })
208
205
  }
209
206
  }));
@@ -211,13 +208,13 @@
211
208
  const g = require("@splunk/react-icons/CaretSmallDown");
212
209
  var w = e.n(g);
213
210
  // CONCATENATED MODULE: external "@splunk/react-icons/enterprise/Caret"
214
- const k = require("@splunk/react-icons/enterprise/Caret");
215
- var S = e.n(k);
211
+ const S = require("@splunk/react-icons/enterprise/Caret");
212
+ var k = e.n(S);
216
213
  // CONCATENATED MODULE: ./src/Button/icons/CaretSmallDown.tsx
217
214
  var O = function e() {
218
215
  var t = (0, m.useSplunkTheme)(), n = t.isEnterprise, i = t.isCompact;
219
216
  var a = i ? "20px" : "24px";
220
- return n ? r().createElement(S(), {
217
+ return n ? r().createElement(k(), {
221
218
  screenReaderText: null,
222
219
  hideDefaultTooltip: true,
223
220
  size: .5
@@ -435,16 +432,16 @@
435
432
  }, {
436
433
  key: "render",
437
434
  value: function e() {
438
- var t = this.props, n = t.action, i = t.appearance, a = t.append, o = t.className, s = t.classNamePrivate, p = t.disabled, u = t.error, f = t.icon, d = t.inline, m = t.isMenu, g = t.onClick, w = t.openInNewContext, k = t.prepend, S = t.to, O = t.value;
435
+ var t = this.props, n = t.action, i = t.appearance, a = t.append, o = t.className, s = t.classNamePrivate, p = t.disabled, u = t.error, f = t.icon, d = t.inline, m = t.isMenu, g = t.onClick, w = t.openInNewContext, S = t.prepend, k = t.to, O = t.value;
439
436
  var q = this.props, $ = q.children, _ = q.label;
440
437
  if (!_ && l()($)) {
441
438
  _ = $;
442
439
  $ = null;
443
440
  }
444
441
  var I = !!(f && !_ && !m && !$);
445
- var E = S && w || m || !!f;
442
+ var E = k && w || m || !!f;
446
443
 
447
- return r().createElement(y, T({
444
+ return r().createElement(v, T({
448
445
  "aria-haspopup": m || undefined,
449
446
  "aria-invalid": u || undefined,
450
447
  "data-test": "button"
@@ -454,7 +451,7 @@
454
451
  "data-inline": d || null,
455
452
  disabled: p,
456
453
  append: a,
457
- prepend: k,
454
+ prepend: S,
458
455
  $inline: d,
459
456
  $hasPrismaIcon: E,
460
457
  $isIconOnly: I,
@@ -467,7 +464,7 @@
467
464
  }), r().createElement(b, {
468
465
  $appearance: i,
469
466
  $error: u
470
- }, f && r().createElement(v, {
467
+ }, f && r().createElement(y, {
471
468
  $isStartIcon: !I
472
469
  }, f), _ && r().createElement(h, {
473
470
  "data-test": "label",
@@ -475,7 +472,7 @@
475
472
  }, _), $, m && r().createElement(x, {
476
473
  $disabled: p,
477
474
  $primary: i === "primary"
478
- }, r().createElement(C, null)), w && r().createElement(v, {
475
+ }, r().createElement(C, null)), w && r().createElement(y, {
479
476
  $isStartIcon: false
480
477
  }, r().createElement(N, null))));
481
478
  }
package/ButtonGroup.js CHANGED
@@ -68,23 +68,20 @@
68
68
  var n = e.n(t);
69
69
  // CONCATENATED MODULE: external "prop-types"
70
70
  const o = require("prop-types");
71
- var i = e.n(o);
71
+ var l = e.n(o);
72
72
  // CONCATENATED MODULE: external "styled-components"
73
- const a = require("styled-components");
74
- var l = e.n(a);
73
+ const i = require("styled-components");
74
+ var a = e.n(i);
75
75
  // CONCATENATED MODULE: external "@splunk/react-ui/Box"
76
76
  const u = require("@splunk/react-ui/Box");
77
77
  var p = e.n(u);
78
78
  // CONCATENATED MODULE: external "@splunk/themes"
79
79
  const c = require("@splunk/themes");
80
80
  // CONCATENATED MODULE: ./src/ButtonGroup/ButtonGroupStyles.ts
81
- var s = l()(p()).withConfig({
81
+ var s = a()(p()).withConfig({
82
82
  displayName: "ButtonGroupStyles__StyledBox",
83
83
  componentId: "sc-14fs2xs-0"
84
- })([ "position:relative;[data-inline] + &{margin-left:", ";}" ], (0, c.pick)({
85
- enterprise: c.variables.spacingHalf,
86
- prisma: c.variables.spacingSmall
87
- }));
84
+ })([ "position:relative;[data-inline] + &{margin-left:", ";}" ], c.variables.spacingSmall);
88
85
  // CONCATENATED MODULE: ./src/ButtonGroup/ButtonGroup.tsx
89
86
  function f() {
90
87
  f = Object.assign || function(e) {
@@ -102,12 +99,12 @@
102
99
  }
103
100
  function d(e, r) {
104
101
  if (e == null) return {};
105
- var t = v(e, r);
102
+ var t = y(e, r);
106
103
  var n, o;
107
104
  if (Object.getOwnPropertySymbols) {
108
- var i = Object.getOwnPropertySymbols(e);
109
- for (o = 0; o < i.length; o++) {
110
- n = i[o];
105
+ var l = Object.getOwnPropertySymbols(e);
106
+ for (o = 0; o < l.length; o++) {
107
+ n = l[o];
111
108
  if (r.indexOf(n) >= 0) continue;
112
109
  if (!Object.prototype.propertyIsEnumerable.call(e, n)) continue;
113
110
  t[n] = e[n];
@@ -115,28 +112,28 @@
115
112
  }
116
113
  return t;
117
114
  }
118
- function v(e, r) {
115
+ function y(e, r) {
119
116
  if (e == null) return {};
120
117
  var t = {};
121
118
  var n = Object.keys(e);
122
- var o, i;
123
- for (i = 0; i < n.length; i++) {
124
- o = n[i];
119
+ var o, l;
120
+ for (l = 0; l < n.length; l++) {
121
+ o = n[l];
125
122
  if (r.indexOf(o) >= 0) continue;
126
123
  t[o] = e[o];
127
124
  }
128
125
  return t;
129
126
  }
130
- var y = {
131
- children: i().node,
132
- elementRef: i().oneOfType([ i().func, i().object ]),
127
+ var v = {
128
+ children: l().node,
129
+ elementRef: l().oneOfType([ l().func, l().object ]),
133
130
  /** @private */
134
- flex: i().bool
131
+ flex: l().bool
135
132
  };
136
133
  function b(e) {
137
134
  var r = e.children, o = d(e, [ "children" ]);
138
135
  // @docs-props-type ButtonGroupPropsBase
139
- var i = t.Children.toArray(r).filter(t.isValidElement).map((function(e, r, n) {
136
+ var l = t.Children.toArray(r).filter(t.isValidElement).map((function(e, r, n) {
140
137
  var o = n.length;
141
138
 
142
139
  return (0, t.cloneElement)(e, {
@@ -152,9 +149,9 @@
152
149
  flex: true,
153
150
  "data-test": "button-group",
154
151
  role: "menubar"
155
- }, o), i);
152
+ }, o), l);
156
153
  }
157
- b.propTypes = y;
154
+ b.propTypes = v;
158
155
  /* harmony default export */ const m = b;
159
156
  // CONCATENATED MODULE: ./src/ButtonGroup/index.ts
160
157
  module.exports = r;
package/ButtonSimple.js CHANGED
@@ -263,7 +263,7 @@
263
263
  var t = b()(i, o), s = t.background, c = t.backgroundActive, d = t.backgroundDisabled, v = t.backgroundDisabledSelected, f = t.backgroundHover, g = t.backgroundSelected, y = t.borderColor, k = t.borderColorDisabled, m = t.color, C = t.colorDisabled;
264
264
  var x = s != null && s !== "transparent";
265
265
  return function() {
266
- return (0, n.css)([ "border-radius:", ";", ";", " ", " cursor:pointer;position:relative;&:focus,&:hover{z-index:3;}&:not([disabled],[aria-disabled='true']){background-color:", ";color:", ";transition:background-color 0.2s,box-shadow 0.2s,text-decoration 0.2s;&:hover{background-color:", ";}&:active{background-color:", ";transition:none;}", "}&:focus{box-shadow:", ";}&[disabled],&[aria-disabled='true']{border-color:", ";color:", ";cursor:not-allowed;", "}" ], l.variables.borderRadius, (function() {
266
+ return (0, n.css)([ "border-radius:", ";", ";", " ", " cursor:pointer;position:relative;&:focus,&:hover{z-index:3;}&:not([disabled],[aria-disabled='true']){background-color:", ";color:", ";transition:background-color 0.2s,box-shadow 0.2s,text-decoration 0.2s;&:hover{background-color:", ";}&:active{background-color:", ";transition:none;}", "}&:not([disabled]){&:focus{box-shadow:", ";}}&[disabled],&[aria-disabled='true']{border-color:", ";color:", ";cursor:not-allowed;", "}" ], l.variables.borderRadius, (function() {
267
267
  return y && (0, n.css)([ "border:1px solid ", ";" ], y);
268
268
  }), (function(r) {
269
269
  var e = r.$append;
@@ -282,8 +282,18 @@
282
282
  }
283
283
  /* harmony default export */ const m = k;
284
284
  // CONCATENATED MODULE: ./src/ButtonSimple/prismaStyles.ts
285
- var C = (0, n.css)([ "", " &:not([disabled],[aria-disabled='true']){&:focus{background-color:", ";}&:hover{border-color:", ";", "}", " ", "}&[disabled],&[aria-disabled='true']{", "}" ], (0,
285
+ var C = (0, n.css)([ "&:not([disabled],[aria-disabled='true']){&:focus{background-color:", ";}&:hover{border-color:", ";", "}", " ", "}", " &[disabled],&[aria-disabled='true']{", "}" ], l.variables.interactiveColorOverlayHover, l.variables.interactiveColorBorderHover, (0,
286
286
  l.pickVariant)("$variant", {
287
+ secondary: (0, n.css)([ "box-shadow:", ";" ], l.variables.hoverShadow),
288
+ default: (0, n.css)([ "box-shadow:", ";" ], l.variables.hoverShadow),
289
+ subtle: (0, n.css)([ "box-shadow:", ";" ], l.variables.hoverShadow)
290
+ }), (function(r) {
291
+ var e = r.$selected;
292
+ return e && (0, n.css)([ "border-color:", ";&:hover{background-color:", ";}" ], l.variables.interactiveColorBorderDisabled, l.mixins.overlayColors(l.variables.interactiveColorOverlaySelected, l.variables.interactiveColorOverlayHover));
293
+ }), (function(r) {
294
+ var e = r.$error;
295
+ return e && (0, n.css)([ "border-color:", ";&:hover{border-color:", ";}" ], l.variables.accentColorNegative, l.variables.accentColorNegative);
296
+ }), (0, l.pickVariant)("$variant", {
287
297
  secondary: (0, n.css)([ "", " font-weight:", ";" ], m("subtle", {
288
298
  color: l.variables.contentColorActive
289
299
  }), l.variables.fontWeightSemiBold),
@@ -296,23 +306,16 @@
296
306
  toggle: (0, n.css)([ "", " font-weight:normal;" ], m("secondary", {
297
307
  background: "transparent"
298
308
  }))
299
- }), l.variables.interactiveColorOverlayHover, l.variables.interactiveColorBorderHover, (0,
300
- l.pickVariant)("$variant", {
301
- secondary: (0, n.css)([ "box-shadow:", ";" ], l.variables.hoverShadow),
302
- default: (0, n.css)([ "box-shadow:", ";" ], l.variables.hoverShadow),
303
- subtle: (0, n.css)([ "box-shadow:", ";" ], l.variables.hoverShadow)
304
- }), (function(r) {
305
- var e = r.$selected;
306
- return e && (0, n.css)([ "border-color:", ";&:hover{background-color:", ";}" ], l.variables.interactiveColorBorderDisabled, l.mixins.overlayColors(l.variables.interactiveColorOverlaySelected, l.variables.interactiveColorOverlayHover));
307
- }), (function(r) {
308
- var e = r.$error;
309
- return e && (0, n.css)([ "border-color:", ";&:hover{border-color:", ";}" ], l.variables.accentColorNegative, l.variables.accentColorNegative);
310
309
  }), (function(r) {
311
310
  var e = r.$selected;
312
311
  return e && (0, n.css)([ "background-color:", ";" ], l.mixins.overlayColors(l.variables.interactiveColorBackgroundDisabled, l.variables.interactiveColorOverlaySelected));
313
312
  }));
314
- var x = (0, n.css)([ "", " font-weight:", ";&:focus{background-color:", ";}&:hover{box-shadow:", ";}" ], (0,
313
+ var x = (0, n.css)([ "&:not([disabled],[aria-disabled='true']){&:focus{background-color:", ";}&:hover{box-shadow:", ";}}", " font-weight:", ";" ], (0,
315
314
  l.pickVariant)("$variant", {
315
+ primary: l.mixins.overlayColors(l.variables.interactiveColorPrimary, l.variables.interactiveColorOverlayHover),
316
+ destructive: l.mixins.overlayColors(l.variables.accentColorNegative, l.variables.interactiveColorOverlayHover),
317
+ flat: l.mixins.overlayColors(l.variables.interactiveColorBackground, l.variables.interactiveColorOverlayHover)
318
+ }), l.variables.hoverShadow, (0, l.pickVariant)("$variant", {
316
319
  primary: m("primary"),
317
320
  destructive: m("destructive"),
318
321
  flat: m({
@@ -323,11 +326,7 @@
323
326
  backgroundHover: l.mixins.overlayColors(l.variables.interactiveColorBackground, l.variables.interactiveColorOverlayHover),
324
327
  backgroundSelected: l.mixins.overlayColors(l.variables.interactiveColorBackground, l.variables.interactiveColorOverlaySelected)
325
328
  })
326
- }), l.variables.fontWeightSemiBold, (0, l.pickVariant)("$variant", {
327
- primary: l.mixins.overlayColors(l.variables.interactiveColorPrimary, l.variables.interactiveColorOverlayHover),
328
- destructive: l.mixins.overlayColors(l.variables.accentColorNegative, l.variables.interactiveColorOverlayHover),
329
- flat: l.mixins.overlayColors(l.variables.interactiveColorBackground, l.variables.interactiveColorOverlayHover)
330
- }), l.variables.hoverShadow);
329
+ }), l.variables.fontWeightSemiBold);
331
330
  // CONCATENATED MODULE: ./src/ButtonSimple/enterpriseStyles.ts
332
331
  var w = "#1A8929";
333
332
  // SUI-2439 to meet WCAG AA compliance
@@ -343,10 +342,10 @@
343
342
  }));
344
343
  var D = "inset 0 -1px 0 rgba(0, 0, 0, 0.1)";
345
344
  var P = "inset 0 1px 0 rgba(0, 0, 0, 0.1)";
346
- var j = (0, n.css)([ "", ";border:", ";", ";font-weight:", ";&:not([disabled],[aria-disabled='true']){background-color:", ";color:", ";transition:background-image 0.2s,border 0.2s,box-shadow 0.2s,text-decoration 0.2s;", ";", " &:hover{background-color:", ";box-shadow:", ";}&:active{transition:none;background-color:", ";border-color:", ";", ";}&:focus{", " ", "}}&:not([disabled]){&:focus{box-shadow:", ",", ";}}&[disabled],&[aria-disabled='true']{cursor:not-allowed;color:", ";background-color:", ";border-color:", ";", "}" ], O, (0,
345
+ var j = (0, n.css)([ "", ";border:1px solid;border-color:", ";", ";font-weight:", ";&:not([disabled],[aria-disabled='true']){background-color:", ";color:", ";transition:background-image 0.2s,border 0.2s,box-shadow 0.2s,text-decoration 0.2s;", ";", " &:hover{background-color:", ";", ";}&:active{transition:none;background-color:", ";border-color:", ";", ";}&:focus{", " ", "}}&:not([disabled]){&:focus{", "}}&[disabled],&[aria-disabled='true']{cursor:not-allowed;color:", ";background-color:", ";border-color:", ";", "}" ], O, (0,
347
346
  l.pick)({
348
- light: (0, n.css)([ "1px solid ", "" ], l.variables.gray60),
349
- dark: l.variables.border
347
+ light: l.variables.gray60,
348
+ dark: l.variables.borderColor
350
349
  }), $, (0, l.pickVariant)("$variant", {
351
350
  default: "normal",
352
351
  secondary: l.variables.fontWeightSemiBold
@@ -361,10 +360,10 @@
361
360
  dark: (0, n.css)([ "box-shadow:inset 0 -1px 0 ", ";" ], l.variables.gray30)
362
361
  }), (function(r) {
363
362
  var e = r.$selected;
364
- return e && (0, n.css)([ "box-shadow:", ";background-color:", ";border-color:", ";" ], (0,
363
+ return e && (0, n.css)([ "", ";background-color:", ";border-color:", ";" ], (0,
365
364
  l.pick)({
366
- light: P,
367
- dark: (0, n.css)([ "inset 0 1px 0 ", "" ], l.variables.black)
365
+ light: (0, n.css)([ "box-shadow:", ";" ], P),
366
+ dark: (0, n.css)([ "box-shadow:inset 0 1px 0 ", ";" ], l.variables.black)
368
367
  }), (0, l.pick)({
369
368
  light: l.variables.gray92,
370
369
  dark: l.variables.gray22
@@ -376,8 +375,8 @@
376
375
  light: "#ebeeef",
377
376
  dark: l.variables.gray30
378
377
  }), (0, l.pick)({
379
- light: D,
380
- dark: (0, n.css)([ "inset 0 -1px 0 ", "" ], l.variables.gray25)
378
+ light: (0, n.css)([ "box-shadow:", ";" ], D),
379
+ dark: (0, n.css)([ "box-shadow:inset 0 -1px 0 ", ";" ], l.variables.gray25)
381
380
  }), (0, l.pick)({
382
381
  light: l.variables.gray92,
383
382
  dark: l.variables.gray22
@@ -388,10 +387,10 @@
388
387
  dark: (0, n.css)([ "box-shadow:inset 0 -1px 0 ", ";" ], l.variables.gray22)
389
388
  }), (function(r) {
390
389
  var e = r.$append;
391
- return e && (0, n.css)([ "box-shadow:", ",", ",inset -1px 0 0 ", ";" ], (0, l.pick)({
392
- light: D,
393
- dark: (0, n.css)([ "inset 0 -1px 0 ", "" ], l.variables.gray30)
394
- }), l.variables.focusShadow, l.variables.borderColor);
390
+ return e && (0, l.pick)({
391
+ light: (0, n.css)([ "box-shadow:", " ", ",inset -1px 0 0 ", ";" ], D, l.variables.focusShadow, l.variables.borderColor),
392
+ dark: (0, n.css)([ "box-shadow:inset 0 -1px 0 ", " ", ",inset -1px 0 0 ", ";" ], l.variables.gray30, l.variables.focusShadow, l.variables.borderColor)
393
+ });
395
394
  }), (function(r) {
396
395
  var e = r.$append, a = r.$selected;
397
396
  return e && a && (0, l.pick)({
@@ -399,9 +398,9 @@
399
398
  dark: (0, n.css)([ "box-shadow:inset 0 1px 0 ", ",", ",inset -1px 0 0 ", ";" ], l.variables.black, l.variables.focusShadow, l.variables.borderColor)
400
399
  });
401
400
  }), (0, l.pick)({
402
- light: D,
403
- dark: (0, n.css)([ "inset 0 -1px 0 ", "" ], l.variables.gray30)
404
- }), l.variables.focusShadow, l.variables.textDisabledColor, (0, l.pick)({
401
+ light: (0, n.css)([ "box-shadow:", ",", ";" ], D, l.variables.focusShadow),
402
+ dark: (0, n.css)([ "box-shadow:inset 0 -1px 0 ", ",", ";" ], l.variables.gray30, l.variables.focusShadow)
403
+ }), l.variables.textDisabledColor, (0, l.pick)({
405
404
  light: l.variables.gray96,
406
405
  dark: l.variables.gray30
407
406
  }), (0, l.pick)({
package/CHANGELOG.md CHANGED
@@ -1,6 +1,60 @@
1
1
  Change Log
2
2
  ============
3
3
 
4
+ 4.35.0 - August 26, 2024
5
+ ----------
6
+ New Features:
7
+ * `Color`'s `hideInput` prop is now supported in Enterprise themes. Defaults to `true` in Enterprise and `false` in Prisma themes, maintaining existing behavior (SUI-6458).
8
+ * `Menu.Item` now supports a new `"dimmed"` value for the `disabled` prop (SUI-5671).
9
+ * `ControlGroup` uses `aria-errormessage` to help associate the input with its error message (SUI-6395).
10
+ * Refactored uses of styled-components `withComponent` functionality to increase compatibility with styled-components v6 where it will no longer be available.
11
+
12
+ Bug Fixes:
13
+ * `Button` with `inline={false}` now aligns correctly with text when set to `display: inline-block` (SUI-6472).
14
+ * `Text`'s border now shows focus when clicked and has a cursor text when hovering over the border now (SUI-5199).
15
+ * `Text`'s nonclickable adornments now shows focus on the input when clicked (SUI-5199).
16
+ * Reverted change to `CollapsiblePanel` focus shadow, now uses inset shadow:
17
+ * Note `@splunk/themes@0.21.0` should be used to ensure contrast requirements are met.
18
+ * `Message`'s remove button styling for focus and hover states has been corrected (SUI-6520).
19
+
20
+ Deprecations:
21
+ * `Progress`'s `type="warning"` value has been deprecated and will be removed in the next major version.
22
+ * `Menu` now supports `focusMode` prop, which specifies how the menu manages focus (SUI-6164).
23
+ * `Menu`'s `retainFocus` prop has been deprecated and will be removed in the next major version. See the migration guide for details (SUI-6164).
24
+
25
+ Docs:
26
+ * `Combobox.Option`, `Multiselect.Option`, `Search.Option` and `Select.Option` no longer incorrectly list `descriptionPosition="right"` as unsupported in Prisma themes (SUI-6568).
27
+
28
+ 4.34.0 - August 7, 2024
29
+ ----------
30
+ New Features:
31
+ * `RadioBar` supports new prop `role` for either `radiogroup` (default) or `menubar` (SUI-6335).
32
+ * `CollapsiblePanel` has a new `actions` prop for rendering the toggle button and interactive elements separate from `title`, reserving the `title` prop for text only (SUI-5999).
33
+ * If using the new `actions` prop, the toggle button supports `aria-labelledby` with the title and the panel body supports `role='region'`.
34
+ * `Select` now supports `appearance="subtle"` with the same visual appearance as the Enterprise `"pill"` and Prisma `"secondary"` appearances (SUI-6440).
35
+ * `Card` has a new `actions` prop for rendering card actions. This should be used to add unambiguous labels to the secondary actions, see the migration guide for details (SUI-5881).
36
+ * `Card` has a new `tag` prop for overriding the default HTML tag (SUI-5881).
37
+
38
+ Bug Fixes:
39
+ * `CollapsiblePanel` now correctly announces its expanded state to a11y tools in Firefox (SUI-5999).
40
+ * `RadioBar` no longer warns about the deprecated `appearance` prop when the default value is used.
41
+ * `Button` now shows focus styling when hovered (SUI-6357).
42
+ * `Button`s with an `appearance` of `primary` or `destructive` no longer have incorrect background colors on focus when `disabled="dimmed"` (SUI-6357).
43
+ * `JSONTree's` active border has been removed to avoid a layout shift (SUI-6324).
44
+ * `CollapsiblePanel`'s focus shadow has been updated to improve contrast (SUI-6340).
45
+ * `Search`'s `role` has been changed from `"textbox"` to `"searchbox"`.
46
+ * `Search`'s default labels have been removed to avoid redundant screen reader output (SUI-6332).
47
+ * `CollapsiblePanel`'s Enterprise dark theme toggle button is now visible when `disabled` (SUI-6425).
48
+ * `Popover` no longer moves focus to the container when no focusable children exist to ensure the focus indicator remains visible (SUI-6446).
49
+ * `Card` uses the `article` tag instead of `div` by default (SUI-5881).
50
+ * `Menu` no longer takes focus when all `Menu.Item` children are disabled (SUI-6268).
51
+ * `Color`'s textbox swatch in the popover palette is now focusable in Enterprise themes (SUI-6401).
52
+ * `Menu`s last `Item` no longer has an incorrect border radius on hover when a `footerMessage` is set (SUI-6450).
53
+
54
+ Deprecations:
55
+ * `CollapsiblePanel`'s `titleWithActions` prop has been deprecated and will be removed in the next major version. Use the new `actions` prop instead to render the toggle button and interactive elements separate from `title` (SUI-5999).
56
+ * `Select`'s `"flat"`, `"pill"`, and `"toggle"` values of the `appearance` prop have been deprecated and will be removed in the next major version. See the migration guide for details (SUI-6440).
57
+
4
58
  4.33.0 - July 8, 2024
5
59
  ----------
6
60
  New Features:
@@ -9,7 +63,7 @@ New Features:
9
63
  * `Button` now supports `appearance="subtle"` with a visual appearance similar to the Enterprise `"pill"` and Prisma `"secondary"` appearances (SUI-6051).
10
64
  * `Button` now sets the `aria-pressed` attribute appropriately when the `selected` prop is provided (SUI-2791).
11
65
  * `Select` has a new `toggleContent` prop that specifies whether the children (`"optionChildren"`) or label (`"optionLabel"`) of the matched `Option` are rendered in the toggle button (SUI-6316).
12
- * `Menu.Item` now supports `descriptionPosition="right"` for Prisma themes (SUI-5664).
66
+ * `Menu.Item`, `Combobox.Option`, `Multiselect.Option`, `Search.Option` and `Select.Option` now support `descriptionPosition="right"` for Prisma themes (SUI-5664).
13
67
 
14
68
  Bug Fixes:
15
69
  * `Modal.Header` uses semantic HTML elements for the `title` and `subtitle` props to improve accessibility.
@@ -17,6 +71,7 @@ Bug Fixes:
17
71
  * `Button`'s text is now centered correctly when combining the `icon` and `to` props (SUI-6331).
18
72
  * `Button`'s external icon now has the same size as an icon rendered by the `icon` prop (SUI-6255).
19
73
  * `Select` now constructs `aria-label` out of the `Option`-s `label`s rather than `children` (SUI-6316).
74
+ * `Search` now allows provided `aria-label` value to override the default `aria-label` value (SUI-6332).
20
75
 
21
76
  Deprecations:
22
77
  * `Button`'s `"flat"`, `"pill"`, and `"toggle"` values of the `appearance` prop have been deprecated and will be removed in the next major version (SUI-6501).