@splunk/react-ui 5.3.0 → 5.4.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 (60) hide show
  1. package/Accordion.js +31 -31
  2. package/Avatar.js +13 -13
  3. package/Breadcrumbs.js +66 -63
  4. package/ButtonSimple.js +52 -52
  5. package/CHANGELOG.md +16 -0
  6. package/CardLayout.js +39 -36
  7. package/Clickable.js +5 -6
  8. package/Code.js +424 -528
  9. package/CollapsiblePanel.js +1 -1
  10. package/Color.js +903 -1025
  11. package/DefinitionList.js +1 -1
  12. package/FormRows.js +13 -11
  13. package/JSONTree.js +682 -1408
  14. package/Link.js +5 -5
  15. package/Markdown.js +9 -5
  16. package/Menu.js +72 -67
  17. package/Multiselect.js +2692 -2780
  18. package/Popover.js +201 -196
  19. package/Resize.js +11 -8
  20. package/ResultsMenu.js +913 -1030
  21. package/ScreenReaderContent.js +86 -130
  22. package/Scroll.js +366 -425
  23. package/Select.js +1741 -1832
  24. package/Slider.js +1 -1
  25. package/SlidingPanels.js +129 -127
  26. package/StepBar.js +123 -97
  27. package/Switch.js +115 -111
  28. package/TabBar.js +10 -10
  29. package/Table.js +1239 -1240
  30. package/TextArea.js +596 -684
  31. package/Tree.js +638 -682
  32. package/package.json +11 -11
  33. package/types/src/Breadcrumbs/Breadcrumbs.d.ts +1 -5
  34. package/types/src/Breadcrumbs/BreadcrumbsContext.d.ts +7 -0
  35. package/types/src/Breadcrumbs/Item.d.ts +1 -1
  36. package/types/src/ButtonSimple/mixin.d.ts +1 -1
  37. package/types/src/JSONTree/JSONTreeItem.d.ts +1 -1
  38. package/types/src/JSONTree/renderTreeItems.d.ts +1 -1
  39. package/types/src/Modal/ModalContext.d.ts +1 -1
  40. package/types/src/Multiselect/Compact.d.ts +2 -2
  41. package/types/src/Multiselect/Normal.d.ts +2 -2
  42. package/types/src/Number/utils.d.ts +1 -1
  43. package/types/src/Popover/getPlacement.d.ts +1 -1
  44. package/types/src/RadioList/Option.d.ts +1 -1
  45. package/types/src/RadioList/RadioListContext.d.ts +1 -1
  46. package/types/src/StepBar/StepBar.d.ts +4 -1
  47. package/types/src/StepBar/StepBarContext.d.ts +1 -0
  48. package/types/src/StepBar/docs/examples/Vertical.d.ts +6 -0
  49. package/types/src/Switch/Switch.d.ts +7 -1
  50. package/types/src/TabBar/Tab.d.ts +3 -1
  51. package/types/src/TabBar/docs/examples/Icons.d.ts +4 -0
  52. package/types/src/TabBar/docs/examples/Tooltips.d.ts +3 -0
  53. package/types/src/TabLayout/Panel.d.ts +2 -0
  54. package/types/src/Table/Head.d.ts +1 -1
  55. package/types/src/Table/Row.d.ts +1 -1
  56. package/types/src/Table/Table.d.ts +1 -0
  57. package/types/src/Tree/TreeContext.d.ts +1 -1
  58. package/useControlled.js +61 -97
  59. package/usePrevious.js +30 -62
  60. package/useResizeObserver.js +95 -127
package/ButtonSimple.js CHANGED
@@ -61,8 +61,8 @@
61
61
  r.r(e);
62
62
  // EXPORTS
63
63
  r.d(e, {
64
- buttonMixin: () => /* reexport */ g,
65
- default: () => /* reexport */ h
64
+ buttonMixin: () => /* reexport */ f,
65
+ default: () => /* reexport */ A
66
66
  });
67
67
  // CONCATENATED MODULE: external "react"
68
68
  const o = require("react");
@@ -79,8 +79,8 @@
79
79
  // CONCATENATED MODULE: external "@splunk/themes"
80
80
  const s = require("@splunk/themes");
81
81
  // CONCATENATED MODULE: external "lodash/merge"
82
- const v = require("lodash/merge");
83
- var b = r.n(v);
82
+ const b = require("lodash/merge");
83
+ var v = r.n(b);
84
84
  // CONCATENATED MODULE: ./src/ButtonSimple/mixin.ts
85
85
  function u(r) {
86
86
  "@babel/helpers - typeof";
@@ -100,9 +100,9 @@
100
100
  var i;
101
101
  var c;
102
102
  var l;
103
- var d = s.variables.contentColorActive;
104
- var v;
105
- var b = s.variables.contentColorDisabled;
103
+ var d = s.variables.actionColorContentSecondary;
104
+ var b;
105
+ var v = s.variables.actionColorContentSecondaryDisabled;
106
106
  var u;
107
107
  switch (r) {
108
108
  case "primary":
@@ -111,8 +111,8 @@
111
111
  o = s.variables.actionColorBackgroundPrimaryActive;
112
112
  a = s.variables.actionColorBackgroundPrimaryDisabled;
113
113
  t = s.variables.actionColorBackgroundPrimaryHover;
114
- d = s.variables.contentColorInverted;
115
- b = s.variables.contentColorInverted;
114
+ d = s.variables.actionColorContentPrimary;
115
+ v = s.variables.actionColorContentPrimaryDisabled;
116
116
  break;
117
117
  }
118
118
 
@@ -122,8 +122,8 @@
122
122
  o = s.variables.actionColorBackgroundDestructiveActive;
123
123
  a = s.variables.actionColorBackgroundDestructiveDisabled;
124
124
  t = s.variables.actionColorBackgroundDestructiveHover;
125
- d = s.variables.contentColorInverted;
126
- b = s.variables.contentColorInverted;
125
+ d = s.variables.actionColorContentDestructive;
126
+ v = s.variables.actionColorContentDestructiveDisabled;
127
127
  break;
128
128
  }
129
129
 
@@ -137,8 +137,8 @@
137
137
  o = s.variables.actionColorBackgroundDestructiveSecondaryActive;
138
138
  a = s.variables.actionColorBackgroundDestructiveSecondaryDisabled;
139
139
  t = s.variables.actionColorBackgroundDestructiveSecondaryHover;
140
- d = s.variables.contentColorNegative;
141
- b = s.variables.contentColorNegativeWeak;
140
+ d = s.variables.actionColorContentDestructiveSecondary;
141
+ v = s.variables.actionColorContentDestructiveSecondaryDisabled;
142
142
  break;
143
143
  }
144
144
 
@@ -153,20 +153,20 @@
153
153
  break;
154
154
 
155
155
  case "subtle":
156
- v = s.variables.contentColorAccentStrong;
157
- u = s.variables.contentColorAccentStrong;
158
156
  o = s.variables.actionColorBackgroundSubtleActive;
159
157
  t = s.variables.actionColorBackgroundSubtleHover;
158
+ b = s.variables.actionColorContentSubtleActive;
159
+ u = s.variables.actionColorContentSubtleHover;
160
160
  break;
161
161
 
162
162
  case "standalone":
163
- d = s.variables.contentColorAccent;
164
- v = s.variables.contentColorAccentStrong;
165
- b = s.variables.contentColorAccentWeak;
166
- u = s.variables.contentColorAccentStrong;
167
163
  e = s.variables.actionColorBackgroundSubtle;
168
164
  o = s.variables.actionColorBackgroundSubtleActive;
169
165
  t = s.variables.actionColorBackgroundSubtleHover;
166
+ d = s.variables.actionColorContentStandalone;
167
+ b = s.variables.actionColorContentStandaloneActive;
168
+ v = s.variables.actionColorContentStandaloneDisabled;
169
+ u = s.variables.actionColorContentStandaloneHover;
170
170
  break;
171
171
 
172
172
  default:
@@ -181,13 +181,13 @@
181
181
  borderColorDisabled: c,
182
182
  borderColorHover: l,
183
183
  color: d,
184
- colorActive: v,
185
- colorDisabled: b,
184
+ colorActive: b,
185
+ colorDisabled: v,
186
186
  colorHover: u
187
187
  };
188
188
  return p;
189
189
  }
190
- function f(r, e) {
190
+ function C(r, e) {
191
191
  var o = typeof r === "string" && p.includes(r) ? r : undefined;
192
192
  var a = {};
193
193
  if (o && e !== undefined) {
@@ -196,50 +196,50 @@
196
196
  a = r;
197
197
  }
198
198
  var t = y(o);
199
- var n = b()(t, a), c = n.background, l = n.backgroundActive, d = n.backgroundDisabled, v = n.backgroundDisabledSelected, f = n.backgroundHover, g = n.borderColor, C = n.borderColorActive, k = n.borderColorDisabled, S = n.borderColorHover, m = n.color, B = n.colorActive, A = n.colorDisabled, D = n.colorHover;
200
- var h = c != null && c !== "transparent";
199
+ var n = v()(t, a), c = n.background, l = n.backgroundActive, d = n.backgroundDisabled, b = n.backgroundDisabledSelected, C = n.backgroundHover, f = n.borderColor, g = n.borderColorActive, S = n.borderColorDisabled, k = n.borderColorHover, m = n.color, D = n.colorActive, B = n.colorDisabled, h = n.colorHover;
200
+ var A = c != null && c !== "transparent";
201
201
  return function() {
202
- return (0, i.css)([ "border:", " solid ", ";border-radius:", ";", " ", " cursor:pointer;position:relative;font-weight:", ";&:focus,&:hover{z-index:3;}&:focus{box-shadow:", ";}&:not([disabled],[aria-disabled='true']){background-color:", ";color:", ";transition:background-color 0.2s,box-shadow 0.2s,text-decoration 0.2s;&:hover{background-color:", ";border-color:", ";color:", ";}&:active{background-color:", ";border-color:", ";color:", ";transition:none;}}&[disabled],&[aria-disabled='true']{border-color:", ";color:", ";", "}" ], s.variables.inputBorderWidth, g, s.variables.borderRadius, (function(r) {
202
+ return (0, i.css)([ "border:", " solid ", ";border-radius:", ";", " ", " cursor:pointer;position:relative;font-weight:", ";&:focus,&:hover{z-index:3;}&:focus{box-shadow:", ";}&:not([disabled],[aria-disabled='true']){background-color:", ";color:", ";transition:background-color 0.2s,box-shadow 0.2s,text-decoration 0.2s;&:hover{background-color:", ";border-color:", ";color:", ";}&:active{background-color:", ";border-color:", ";color:", ";transition:none;}}&[disabled],&[aria-disabled='true']{border-color:", ";color:", ";", "}" ], s.variables.inputBorderWidth, f, s.variables.borderRadius, (function(r) {
203
203
  var e = r.$append;
204
204
  return e && (0, i.css)([ "border-top-right-radius:0.1px;border-bottom-right-radius:0.1px;border-right:none;" ]);
205
205
  }), (function(r) {
206
206
  var e = r.$prepend;
207
207
  return e && (0, i.css)([ "border-top-left-radius:0.1px;border-bottom-left-radius:0.1px;" ]);
208
- }), s.variables.fontWeightSemiBold, s.variables.focusShadow, c, m, f, S, D, l, C, B, k, A, (function(r) {
208
+ }), s.variables.fontWeightSemiBold, s.variables.focusShadow, c, m, C, k, h, l, g, D, S, B, (function(r) {
209
209
  var e = r.$selected;
210
- return h && (0, i.css)([ "background-color:", ";" ], e ? v : d);
210
+ return A && (0, i.css)([ "background-color:", ";" ], e ? b : d);
211
211
  }));
212
212
  };
213
213
  }
214
- /* harmony default export */ const g = f;
214
+ /* harmony default export */ const f = C;
215
215
  // CONCATENATED MODULE: ./src/ButtonSimple/ButtonSimpleStyles.ts
216
- var C = {
216
+ var g = {
217
217
  borderColor: s.variables.interactiveColorAccentError,
218
218
  borderColorActive: s.variables.interactiveColorAccentError,
219
219
  borderColorHover: s.mixins.overlayColors(s.variables.interactiveColorAccentError, s.variables.interactiveColorBorderHover)
220
220
  };
221
- var k = c()(d()).withConfig({
221
+ var S = c()(d()).withConfig({
222
222
  displayName: "ButtonSimpleStyles__StyledClickable",
223
223
  componentId: "vlarwe-0"
224
224
  })([ "", " align-items:center;justify-content:center;&:not([disabled],[aria-disabled='true']){", "}", "" ], s.mixins.reset("flex"), (function(r) {
225
225
  var e = r.$error;
226
226
  return e && (0, i.css)([ "", "" ], (0, s.pickVariant)("$variant", {
227
- default: g("secondary", C),
228
- secondary: g("secondary", C),
229
- subtle: g("subtle", C)
227
+ default: f("secondary", g),
228
+ secondary: f("secondary", g),
229
+ subtle: f("subtle", g)
230
230
  }));
231
231
  }), (0, s.pickVariant)("$variant", {
232
- default: g("secondary"),
233
- primary: g("primary"),
234
- secondary: g("secondary"),
235
- subtle: g("subtle"),
236
- destructive: g("destructive"),
237
- destructiveSecondary: g("destructiveSecondary"),
238
- standalone: g("standalone")
232
+ default: f("secondary"),
233
+ primary: f("primary"),
234
+ secondary: f("secondary"),
235
+ subtle: f("subtle"),
236
+ destructive: f("destructive"),
237
+ destructiveSecondary: f("destructiveSecondary"),
238
+ standalone: f("standalone")
239
239
  }));
240
240
  // CONCATENATED MODULE: ./src/ButtonSimple/ButtonSimple.tsx
241
- function S() {
242
- return S = Object.assign ? Object.assign.bind() : function(r) {
241
+ function k() {
242
+ return k = Object.assign ? Object.assign.bind() : function(r) {
243
243
  for (var e = 1; e < arguments.length; e++) {
244
244
  var o = arguments[e];
245
245
  for (var a in o) {
@@ -247,11 +247,11 @@
247
247
  }
248
248
  }
249
249
  return r;
250
- }, S.apply(null, arguments);
250
+ }, k.apply(null, arguments);
251
251
  }
252
252
  function m(r, e) {
253
253
  if (null == r) return {};
254
- var o, a, t = B(r, e);
254
+ var o, a, t = D(r, e);
255
255
  if (Object.getOwnPropertySymbols) {
256
256
  var n = Object.getOwnPropertySymbols(r);
257
257
  for (a = 0; a < n.length; a++) {
@@ -260,7 +260,7 @@
260
260
  }
261
261
  return t;
262
262
  }
263
- function B(r, e) {
263
+ function D(r, e) {
264
264
  if (null == r) return {};
265
265
  var o = {};
266
266
  for (var a in r) {
@@ -271,7 +271,7 @@
271
271
  }
272
272
  return o;
273
273
  }
274
- var A = {
274
+ var B = {
275
275
  action: n().string,
276
276
  appearance: n().oneOf([ "default", "secondary", "primary", "destructive", "destructiveSecondary", "subtle", "standalone" ]),
277
277
  append: n().bool,
@@ -284,11 +284,11 @@
284
284
  prepend: n().bool,
285
285
  to: n().string
286
286
  };
287
- var D = a().forwardRef((function(r, e) {
288
- var o = r.appearance, t = o === void 0 ? "default" : o, n = r.append, i = r.children, c = r.disabled, l = r.error, d = r.isMenu, s = r.prepend, v = m(r, [ "appearance", "append", "children", "disabled", "error", "isMenu", "prepend" ]);
287
+ var h = a().forwardRef((function(r, e) {
288
+ var o = r.appearance, t = o === void 0 ? "default" : o, n = r.append, i = r.children, c = r.disabled, l = r.error, d = r.isMenu, s = r.prepend, b = m(r, [ "appearance", "append", "children", "disabled", "error", "isMenu", "prepend" ]);
289
289
  // @docs-props-type ButtonSimplePropsBase
290
290
 
291
- return a().createElement(k, S({
291
+ return a().createElement(S, k({
292
292
  "aria-invalid": l,
293
293
  "data-test": "button-simple",
294
294
  disabled: c,
@@ -298,10 +298,10 @@
298
298
  $error: l,
299
299
  $isMenu: d,
300
300
  ref: e
301
- }, v), i);
301
+ }, b), i);
302
302
  }));
303
- D.propTypes = A;
304
- /* harmony default export */ const h = D;
303
+ h.propTypes = B;
304
+ /* harmony default export */ const A = h;
305
305
  // only for styled-components that wrap ButtonSimple
306
306
  // CONCATENATED MODULE: ./src/ButtonSimple/index.ts
307
307
  module.exports = e;
package/CHANGELOG.md CHANGED
@@ -1,6 +1,22 @@
1
1
  Change Log
2
2
  ============
3
3
 
4
+ 5.4.0 - October 7, 2025
5
+ ----------
6
+ New Features:
7
+ * `Switch` supports new `describedBy` prop to associate `ControlGroup`'s help component to the toggle (SUI-6140).
8
+ * `StepBar` now supports vertical layout with new `orientation` prop (SUI-8210).
9
+
10
+ Bug Fixes:
11
+ * `CollapsiblePanel` actions are properly justified to the end (SUI-8173).
12
+ * `Menu.Item` no longer throws invalid prop warning caused by default `selectableAppearance` value (SUI-8195).
13
+ * Table's layout was breaking when any of its `HeadCell`s had a `width` value of `undefined` (SUI-8064).
14
+ * `Popover`'s arrow no longer occasionally separates from the content when the browser is zoomed (SUI-7977).
15
+ * `Avatar`'s initials no longer become misaligned if browser is zoomed in Safari (SUI-8186).
16
+ * `Popover` will no longer briefly render in an incorrect position when resized (SUI-8062).
17
+ * `SlidingPanels` now has animation when rendering in React 16.8 (SUI-8124).
18
+ * `Slider` now shows step marks in minimum value state (SUI-7960).
19
+
4
20
  5.3.0 - September 2, 2025
5
21
  ----------
6
22
  New Features:
package/CardLayout.js CHANGED
@@ -67,21 +67,21 @@
67
67
  const t = require("react");
68
68
  var n = e.n(t);
69
69
  // CONCATENATED MODULE: external "prop-types"
70
- const i = require("prop-types");
71
- var o = e.n(i);
70
+ const o = require("prop-types");
71
+ var i = e.n(o);
72
72
  // CONCATENATED MODULE: external "styled-components"
73
73
  const a = require("styled-components");
74
74
  var c = e.n(a);
75
75
  // CONCATENATED MODULE: external "@splunk/themes"
76
- const l = require("@splunk/themes");
76
+ const u = require("@splunk/themes");
77
77
  // CONCATENATED MODULE: ./src/CardLayout/CardLayoutStyles.ts
78
- var u = c().div.withConfig({
78
+ var l = c().div.withConfig({
79
79
  displayName: "CardLayoutStyles__Styled",
80
80
  componentId: "sc-18kz7zm-0"
81
- })([ "", ";", " ", "" ], l.mixins.reset("flex"), (function(e) {
81
+ })([ "", ";", " ", "" ], u.mixins.reset("flex"), (function(e) {
82
82
  var r = e.$wrapCards;
83
83
  return r && (0, a.css)([ "flex-wrap:wrap;" ]);
84
- }), (0, l.pickVariant)("$alignCards", {
84
+ }), (0, u.pickVariant)("$alignCards", {
85
85
  center: (0, a.css)([ "justify-content:center;" ]),
86
86
  right: (0, a.css)([ "justify-content:flex-end;" ])
87
87
  }));
@@ -94,8 +94,8 @@
94
94
  return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
95
95
  }, f(e);
96
96
  }
97
- function d() {
98
- return d = Object.assign ? Object.assign.bind() : function(e) {
97
+ function s() {
98
+ return s = Object.assign ? Object.assign.bind() : function(e) {
99
99
  for (var r = 1; r < arguments.length; r++) {
100
100
  var t = arguments[r];
101
101
  for (var n in t) {
@@ -103,9 +103,9 @@
103
103
  }
104
104
  }
105
105
  return e;
106
- }, d.apply(null, arguments);
106
+ }, s.apply(null, arguments);
107
107
  }
108
- function s(e, r) {
108
+ function d(e, r) {
109
109
  var t = Object.keys(e);
110
110
  if (Object.getOwnPropertySymbols) {
111
111
  var n = Object.getOwnPropertySymbols(e);
@@ -118,9 +118,9 @@
118
118
  function p(e) {
119
119
  for (var r = 1; r < arguments.length; r++) {
120
120
  var t = null != arguments[r] ? arguments[r] : {};
121
- r % 2 ? s(Object(t), !0).forEach((function(r) {
121
+ r % 2 ? d(Object(t), !0).forEach((function(r) {
122
122
  y(e, r, t[r]);
123
- })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : s(Object(t)).forEach((function(r) {
123
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : d(Object(t)).forEach((function(r) {
124
124
  Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
125
125
  }));
126
126
  }
@@ -148,18 +148,18 @@
148
148
  }
149
149
  return ("string" === r ? String : Number)(e);
150
150
  }
151
- function g(e, r) {
151
+ function v(e, r) {
152
152
  if (null == e) return {};
153
- var t, n, i = v(e, r);
153
+ var t, n, o = g(e, r);
154
154
  if (Object.getOwnPropertySymbols) {
155
- var o = Object.getOwnPropertySymbols(e);
156
- for (n = 0; n < o.length; n++) {
157
- t = o[n], -1 === r.indexOf(t) && {}.propertyIsEnumerable.call(e, t) && (i[t] = e[t]);
155
+ var i = Object.getOwnPropertySymbols(e);
156
+ for (n = 0; n < i.length; n++) {
157
+ t = i[n], -1 === r.indexOf(t) && {}.propertyIsEnumerable.call(e, t) && (o[t] = e[t]);
158
158
  }
159
159
  }
160
- return i;
160
+ return o;
161
161
  }
162
- function v(e, r) {
162
+ function g(e, r) {
163
163
  if (null == e) return {};
164
164
  var t = {};
165
165
  for (var n in e) {
@@ -171,35 +171,38 @@
171
171
  return t;
172
172
  }
173
173
  var O = {
174
- alignCards: o().oneOf([ "left", "center", "right" ]),
175
- cardMaxWidth: o().oneOfType([ o().number, o().string ]),
176
- cardMinWidth: o().oneOfType([ o().number, o().string ]),
177
- cardWidth: o().oneOfType([ o().number, o().string ]),
178
- children: o().node,
179
- elementRef: o().oneOfType([ o().func, o().object ]),
180
- gutterSize: o().number,
181
- wrapCards: o().bool
174
+ alignCards: i().oneOf([ "left", "center", "right" ]),
175
+ cardMaxWidth: i().oneOfType([ i().number, i().string ]),
176
+ cardMinWidth: i().oneOfType([ i().number, i().string ]),
177
+ cardWidth: i().oneOfType([ i().number, i().string ]),
178
+ children: i().node,
179
+ elementRef: i().oneOfType([ i().func, i().object ]),
180
+ gutterSize: i().number,
181
+ wrapCards: i().bool
182
182
  };
183
183
  function h(e) {
184
- var r = e.alignCards, i = r === void 0 ? "left" : r, o = e.cardMaxWidth, a = e.cardMinWidth, c = e.cardWidth, l = e.children, f = e.elementRef, s = e.gutterSize, y = s === void 0 ? 10 : s, b = e.style, m = e.wrapCards, v = m === void 0 ? true : m, O = g(e, [ "alignCards", "cardMaxWidth", "cardMinWidth", "cardWidth", "children", "elementRef", "gutterSize", "style", "wrapCards" ]);
184
+ var r = e.alignCards, o = r === void 0 ? "left" : r, i = e.cardMaxWidth, a = e.cardMinWidth, c = e.cardWidth, u = e.children, f = e.elementRef, d = e.gutterSize, y = d === void 0 ? 10 : d, b = e.style, m = e.wrapCards, g = m === void 0 ? true : m, O = v(e, [ "alignCards", "cardMaxWidth", "cardMinWidth", "cardWidth", "children", "elementRef", "gutterSize", "style", "wrapCards" ]);
185
185
  // @docs-props-type CardLayoutPropsBase
186
- var h = t.Children.toArray(l).filter(t.isValidElement).map((function(e) {
186
+ var h = t.Children.toArray(u).filter(t.isValidElement).map((function(e) {
187
187
 
188
188
  return (0, t.cloneElement)(e, {
189
189
  minWidth: c || a || undefined,
190
- maxWidth: c || o || undefined,
190
+ maxWidth: c || i || undefined,
191
191
  margin: y / 2
192
192
  });
193
193
  }));
194
+ var j = (0, t.useMemo)((function() {
195
+ return p({
196
+ padding: y / 2
197
+ }, b);
198
+ }), [ y, b ]);
194
199
 
195
- return n().createElement(u, d({
200
+ return n().createElement(l, s({
196
201
  "data-test": "card-layout",
197
- $alignCards: i,
198
- $wrapCards: v,
202
+ $alignCards: o,
203
+ $wrapCards: g,
199
204
  ref: f,
200
- style: p({
201
- padding: y / 2
202
- }, b)
205
+ style: j
203
206
  }, O), h);
204
207
  }
205
208
  h.propTypes = O;
package/Clickable.js CHANGED
@@ -190,8 +190,8 @@
190
190
  navigationLabel: c().string,
191
191
  to: c().oneOfType([ c().string, c().oneOf([ undefined ]) ])
192
192
  };
193
- function L(e) {
194
- return e !== undefined;
193
+ function L(e, n) {
194
+ return e !== "button" && n !== undefined;
195
195
  }
196
196
  /**
197
197
  * `Clickable` renders as a `button` element, or as an `a` element if the `to` prop is set
@@ -212,7 +212,7 @@
212
212
  k(n, e);
213
213
  }), [ l, n ]);
214
214
  // memoizing this result causes TS to lose track of the type guard established by isLinkCheck
215
- var j = L(v);
215
+ var j = L(f, v);
216
216
  // ideally we wouldn't need to pass "to" as "toValue" here
217
217
  // but without doing that TS thinks the return value of this is
218
218
  // string | undefined which doesn't work for usages of this function
@@ -253,8 +253,7 @@
253
253
  h === null || h === void 0 ? void 0 : h(e, t);
254
254
  }
255
255
  }), [ i, I, j, u, c, O, h, s, v ]);
256
- // Only set the href attribute when enabled and therefore using an <a> tag
257
- if (j && f !== "button") {
256
+ if (j) {
258
257
  if (a) {
259
258
 
260
259
  return t().createElement(b, C({
@@ -294,7 +293,7 @@
294
293
  ref: x,
295
294
  type: "button",
296
295
  disabled: a === "disabled",
297
- onClick: c && !a ? R : undefined
296
+ onClick: !a ? R : undefined
298
297
  }, d()(p, "disabled")), i);
299
298
  }));
300
299
  I.propTypes = j;