@splunk/react-ui 4.38.0 → 4.39.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 (136) hide show
  1. package/Accordion.js +131 -153
  2. package/Anchor.js +50 -58
  3. package/Animation.js +64 -59
  4. package/AnimationToggle.js +59 -61
  5. package/Box.js +59 -67
  6. package/Breadcrumbs.js +113 -127
  7. package/Button.js +151 -169
  8. package/ButtonGroup.js +41 -49
  9. package/ButtonSimple.js +264 -295
  10. package/CHANGELOG.md +28 -0
  11. package/Calendar.js +353 -414
  12. package/Card.js +183 -243
  13. package/CardLayout.js +86 -83
  14. package/Chip.js +104 -122
  15. package/Clickable.js +180 -198
  16. package/CloseButton.js +52 -60
  17. package/Code.js +24 -31
  18. package/CollapsiblePanel.js +172 -202
  19. package/Color.js +371 -412
  20. package/ColumnLayout.js +72 -96
  21. package/ComboBox.js +266 -303
  22. package/Concertina.js +406 -454
  23. package/ControlGroup.js +165 -194
  24. package/Date.js +116 -131
  25. package/DefinitionList.js +125 -149
  26. package/Divider.js +81 -79
  27. package/Dropdown.js +226 -237
  28. package/DualListbox.js +150 -186
  29. package/EventListener.js +4 -1
  30. package/File.js +1032 -955
  31. package/FormRows.js +281 -334
  32. package/Heading.js +27 -35
  33. package/Image.js +101 -116
  34. package/JSONTree.js +301 -344
  35. package/Layer.js +118 -126
  36. package/Link.js +141 -159
  37. package/List.js +61 -77
  38. package/MIGRATION.mdx +92 -38
  39. package/Markdown.js +288 -347
  40. package/Menu.js +506 -532
  41. package/Message.js +173 -196
  42. package/MessageBar.js +58 -66
  43. package/Modal.js +241 -290
  44. package/ModalLayer.js +130 -148
  45. package/Monogram.js +138 -138
  46. package/Multiselect.js +1589 -1902
  47. package/Number.js +159 -178
  48. package/Paginator.js +296 -335
  49. package/Paragraph.js +24 -32
  50. package/Popover.js +448 -441
  51. package/Progress.js +65 -75
  52. package/RadioBar.js +301 -303
  53. package/RadioList.js +77 -119
  54. package/Resize.js +105 -127
  55. package/ResultsMenu.js +373 -385
  56. package/ScreenReaderContent.js +50 -58
  57. package/Scroll.js +209 -244
  58. package/Search.js +379 -391
  59. package/Select.js +1077 -1345
  60. package/SidePanel.js +122 -142
  61. package/Slider.js +132 -145
  62. package/SlidingPanels.js +238 -270
  63. package/SplitButton.js +222 -245
  64. package/StaticContent.js +68 -76
  65. package/StepBar.js +206 -205
  66. package/Switch.js +176 -205
  67. package/TabBar.js +222 -258
  68. package/TabLayout.js +114 -139
  69. package/Table.js +2017 -2180
  70. package/Text.js +379 -493
  71. package/TextArea.js +411 -441
  72. package/Tooltip.js +116 -132
  73. package/TransitionOpen.js +160 -178
  74. package/Tree.js +268 -287
  75. package/Typography.js +48 -52
  76. package/WaitSpinner.js +60 -68
  77. package/cypress/support/commands.ts +9 -0
  78. package/cypress/support/index.d.ts +6 -0
  79. package/cypress/tsconfig.cypress.json +1 -0
  80. package/docker-compose.yml +0 -1
  81. package/package.json +14 -14
  82. package/types/src/Button/Button.d.ts +5 -1
  83. package/types/src/ButtonSimple/ButtonSimple.d.ts +2 -2
  84. package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +1 -1
  85. package/types/src/Color/Color.d.ts +2 -2
  86. package/types/src/Color/Palette.d.ts +4 -2
  87. package/types/src/ComboBox/Option.d.ts +1 -1
  88. package/types/src/ControlGroup/ControlGroup.d.ts +1 -2
  89. package/types/src/Date/Date.d.ts +2 -2
  90. package/types/src/File/File.d.ts +2 -3
  91. package/types/src/File/Retry.d.ts +1 -2
  92. package/types/src/Menu/Item.d.ts +18 -5
  93. package/types/src/Menu/Menu.d.ts +3 -3
  94. package/types/src/Menu/docs/examples/Adornments.d.ts +2 -0
  95. package/types/src/Menu/docs/examples/SelectableWithAdornments.d.ts +2 -0
  96. package/types/src/ModalLayer/ModalLayer.d.ts +1 -1
  97. package/types/src/Multiselect/Option.d.ts +2 -0
  98. package/types/src/Number/Number.d.ts +3 -3
  99. package/types/src/Popover/Popover.d.ts +3 -4
  100. package/types/src/RadioBar/RadioBar.d.ts +2 -2
  101. package/types/src/ResultsMenu/VirtualizedResultsMenu/VirtualizedResultsMenu.d.ts +1 -1
  102. package/types/src/ScrollContainerContext/ScrollContainerContext.d.ts +2 -2
  103. package/types/src/Search/Option.d.ts +9 -3
  104. package/types/src/Select/Option.d.ts +3 -1
  105. package/types/src/Select/OptionBase.d.ts +7 -5
  106. package/types/src/Select/Select.d.ts +1 -1
  107. package/types/src/Select/SelectAllOption.d.ts +4 -4
  108. package/types/src/SidePanel/SidePanel.d.ts +1 -1
  109. package/types/src/Slider/Slider.d.ts +2 -2
  110. package/types/src/SlidingPanels/SlidingPanels.d.ts +1 -1
  111. package/types/src/StepBar/Step.d.ts +1 -2
  112. package/types/src/Switch/Switch.d.ts +0 -1
  113. package/types/src/TabBar/Tab.d.ts +1 -1
  114. package/types/src/TabBar/TabBar.d.ts +3 -1
  115. package/types/src/TabLayout/TabLayout.d.ts +2 -0
  116. package/types/src/Table/HeadDropdownCell.d.ts +2 -0
  117. package/types/src/Table/Table.d.ts +0 -1
  118. package/types/src/Table/docs/examples/StripeRows.d.ts +2 -0
  119. package/types/src/Text/IconOutlinedHide.d.ts +1 -2
  120. package/types/src/Text/IconOutlinedView.d.ts +1 -2
  121. package/types/src/Text/Text.d.ts +2 -2
  122. package/types/src/TextArea/TextArea.d.ts +2 -2
  123. package/types/src/Tooltip/Tooltip.d.ts +4 -4
  124. package/types/src/TransitionOpen/TransitionOpen.d.ts +1 -1
  125. package/useForceUpdate.js +30 -32
  126. package/useKeyPress.js +1 -1
  127. package/types/src/ButtonGroup/docs/examples/prisma/Basic.d.ts +0 -1
  128. package/types/src/File/docs/examples/prisma/Error.d.ts +0 -1
  129. package/types/src/Menu/docs/examples/Icons.d.ts +0 -2
  130. package/types/src/Menu/docs/examples/SelectableWithIcons.d.ts +0 -2
  131. package/types/src/TabBar/docs/examples/prisma/Context.d.ts +0 -2
  132. package/types/src/TabLayout/docs/examples/prisma/Context.d.ts +0 -2
  133. package/types/src/Table/docs/examples/prisma/Basic.d.ts +0 -2
  134. /package/types/src/Message/docs/examples/{prisma/Title.d.ts → Title.d.ts} +0 -0
  135. /package/types/src/StepBar/docs/examples/{prisma/Error.d.ts → Error.d.ts} +0 -0
  136. /package/types/src/TabBar/docs/examples/{prisma/Disabled.d.ts → Disabled.d.ts} +0 -0
package/ControlGroup.js CHANGED
@@ -61,8 +61,8 @@
61
61
  e.r(t);
62
62
  // EXPORTS
63
63
  e.d(t, {
64
- ControlGroupContext: () => /* reexport */ L,
65
- default: () => /* reexport */ se
64
+ ControlGroupContext: () => /* reexport */ T,
65
+ default: () => /* reexport */ ce
66
66
  });
67
67
  // CONCATENATED MODULE: external "react"
68
68
  const r = require("react");
@@ -125,7 +125,7 @@
125
125
  displayName: "ControlGroupStyles__StyledControlsStackBox",
126
126
  componentId: "wjnyif-1"
127
127
  })([ "flex-direction:column;" ]);
128
- var x = m().div.withConfig({
128
+ var w = m().div.withConfig({
129
129
  displayName: "ControlGroupStyles__StyledLabelWrapper",
130
130
  componentId: "wjnyif-2"
131
131
  })([ "display:inline-flex;align-items:center;", " ", "" ], (0, c.pick)({
@@ -138,11 +138,11 @@
138
138
  prisma: (0, h.css)([ "min-height:", ";" ], c.variables.inputHeight)
139
139
  }));
140
140
  }));
141
- var I = m()(x).withConfig({
141
+ var I = m()(w).withConfig({
142
142
  displayName: "ControlGroupStyles__StyledLabelWrapperLeft",
143
143
  componentId: "wjnyif-3"
144
144
  })([ "float:left;" ]);
145
- var C = m().label.withConfig({
145
+ var x = m().label.withConfig({
146
146
  displayName: "ControlGroupStyles__StyledLabel",
147
147
  componentId: "wjnyif-4"
148
148
  })([ "padding:", ";word-wrap:break-word;color:inherit;text-align:", ";" ], (0, c.pick)({
@@ -154,7 +154,7 @@
154
154
  enterprise: "right",
155
155
  prisma: "left"
156
156
  }));
157
- var k = m()(g()).withConfig({
157
+ var C = m()(g()).withConfig({
158
158
  displayName: "ControlGroupStyles__StyledTooltip",
159
159
  componentId: "wjnyif-5"
160
160
  })([ "", "" ], (function(e) {
@@ -163,7 +163,7 @@
163
163
  prisma: (0, h.css)([ "svg{width:20px;height:20px;}padding:4px;" ])
164
164
  }));
165
165
  }));
166
- var w = m().div.withConfig({
166
+ var j = m().div.withConfig({
167
167
  displayName: "ControlGroupStyles__StyledHelp",
168
168
  componentId: "wjnyif-6"
169
169
  })([ "", ";font-size:", ";color:", ";margin-top:", ";", "" ], c.mixins.reset("block"), c.variables.fontSizeSmall, c.variables.contentColorMuted, (0,
@@ -174,7 +174,7 @@
174
174
  var t = e.$error;
175
175
  return t && (0, h.css)([ "color:inherit;" ]);
176
176
  }));
177
- var j = m().div.withConfig({
177
+ var k = m().div.withConfig({
178
178
  displayName: "ControlGroupStyles__StyledErrorText",
179
179
  componentId: "wjnyif-7"
180
180
  })([ "", ";font-size:", ";[aria-invalid] > &{color:inherit;}", "" ], c.mixins.reset("block"), c.variables.fontSizeSmall, (function(e) {
@@ -196,233 +196,204 @@
196
196
  * @public
197
197
  */
198
198
  var _ = n().createContext({});
199
- /* harmony default export */ const L = _;
199
+ /* harmony default export */ const T = _;
200
200
  // CONCATENATED MODULE: ./src/ControlGroup/ControlGroup.tsx
201
- function T(e) {
201
+ function L(e) {
202
202
  "@babel/helpers - typeof";
203
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
204
- T = function e(t) {
205
- return typeof t;
206
- };
207
- } else {
208
- T = function e(t) {
209
- return t && typeof Symbol === "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
210
- };
211
- }
212
- return T(e);
203
+ return L = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
204
+ return typeof e;
205
+ } : function(e) {
206
+ return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
207
+ }, L(e);
213
208
  }
214
209
  function E() {
215
- E = Object.assign || function(e) {
210
+ return E = Object.assign ? Object.assign.bind() : function(e) {
216
211
  for (var t = 1; t < arguments.length; t++) {
217
212
  var r = arguments[t];
218
213
  for (var n in r) {
219
- if (Object.prototype.hasOwnProperty.call(r, n)) {
220
- e[n] = r[n];
221
- }
214
+ ({}).hasOwnProperty.call(r, n) && (e[n] = r[n]);
222
215
  }
223
216
  }
224
217
  return e;
225
- };
226
- return E.apply(this, arguments);
218
+ }, E.apply(null, arguments);
227
219
  }
228
220
  function D(e, t) {
229
221
  var r = Object.keys(e);
230
222
  if (Object.getOwnPropertySymbols) {
231
223
  var n = Object.getOwnPropertySymbols(e);
232
- if (t) n = n.filter((function(t) {
224
+ t && (n = n.filter((function(t) {
233
225
  return Object.getOwnPropertyDescriptor(e, t).enumerable;
234
- }));
235
- r.push.apply(r, n);
226
+ }))), r.push.apply(r, n);
236
227
  }
237
228
  return r;
238
229
  }
239
230
  function q(e) {
240
231
  for (var t = 1; t < arguments.length; t++) {
241
- var r = arguments[t] != null ? arguments[t] : {};
242
- if (t % 2) {
243
- D(Object(r), true).forEach((function(t) {
244
- Z(e, t, r[t]);
245
- }));
246
- } else if (Object.getOwnPropertyDescriptors) {
247
- Object.defineProperties(e, Object.getOwnPropertyDescriptors(r));
248
- } else {
249
- D(Object(r)).forEach((function(t) {
250
- Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t));
251
- }));
252
- }
232
+ var r = null != arguments[t] ? arguments[t] : {};
233
+ t % 2 ? D(Object(r), !0).forEach((function(t) {
234
+ Z(e, t, r[t]);
235
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : D(Object(r)).forEach((function(t) {
236
+ Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t));
237
+ }));
253
238
  }
254
239
  return e;
255
240
  }
256
241
  function M(e, t) {
257
- if (e == null) return {};
258
- var r = V(e, t);
259
- var n, o;
242
+ if (null == e) return {};
243
+ var r, n, o = B(e, t);
260
244
  if (Object.getOwnPropertySymbols) {
261
245
  var i = Object.getOwnPropertySymbols(e);
262
- for (o = 0; o < i.length; o++) {
263
- n = i[o];
264
- if (t.indexOf(n) >= 0) continue;
265
- if (!Object.prototype.propertyIsEnumerable.call(e, n)) continue;
266
- r[n] = e[n];
246
+ for (n = 0; n < i.length; n++) {
247
+ r = i[n], t.includes(r) || {}.propertyIsEnumerable.call(e, r) && (o[r] = e[r]);
267
248
  }
268
249
  }
269
- return r;
250
+ return o;
270
251
  }
271
- function V(e, t) {
272
- if (e == null) return {};
252
+ function B(e, t) {
253
+ if (null == e) return {};
273
254
  var r = {};
274
- var n = Object.keys(e);
275
- var o, i;
276
- for (i = 0; i < n.length; i++) {
277
- o = n[i];
278
- if (t.indexOf(o) >= 0) continue;
279
- r[o] = e[o];
255
+ for (var n in e) {
256
+ if ({}.hasOwnProperty.call(e, n)) {
257
+ if (t.includes(n)) continue;
258
+ r[n] = e[n];
259
+ }
280
260
  }
281
261
  return r;
282
262
  }
283
- function $(e, t) {
284
- return R(e) || N(e, t) || G(e, t) || A();
263
+ function V(e, t) {
264
+ return W(e) || N(e, t) || A(e, t) || $();
285
265
  }
286
- function A() {
266
+ function $() {
287
267
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
288
268
  }
289
- function G(e, t) {
290
- if (!e) return;
291
- if (typeof e === "string") return B(e, t);
292
- var r = Object.prototype.toString.call(e).slice(8, -1);
293
- if (r === "Object" && e.constructor) r = e.constructor.name;
294
- if (r === "Map" || r === "Set") return Array.from(e);
295
- if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return B(e, t);
269
+ function A(e, t) {
270
+ if (e) {
271
+ if ("string" == typeof e) return G(e, t);
272
+ var r = {}.toString.call(e).slice(8, -1);
273
+ return "Object" === r && e.constructor && (r = e.constructor.name), "Map" === r || "Set" === r ? Array.from(e) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? G(e, t) : void 0;
274
+ }
296
275
  }
297
- function B(e, t) {
298
- if (t == null || t > e.length) t = e.length;
299
- for (var r = 0, n = new Array(t); r < t; r++) {
276
+ function G(e, t) {
277
+ (null == t || t > e.length) && (t = e.length);
278
+ for (var r = 0, n = Array(t); r < t; r++) {
300
279
  n[r] = e[r];
301
280
  }
302
281
  return n;
303
282
  }
304
283
  function N(e, t) {
305
- if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(e))) return;
306
- var r = [];
307
- var n = true;
308
- var o = false;
309
- var i = undefined;
310
- try {
311
- for (var l = e[Symbol.iterator](), a; !(n = (a = l.next()).done); n = true) {
312
- r.push(a.value);
313
- if (t && r.length === t) break;
314
- }
315
- } catch (e) {
316
- o = true;
317
- i = e;
318
- } finally {
284
+ var r = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
285
+ if (null != r) {
286
+ var n, o, i, l, a = [], s = !0, p = !1;
319
287
  try {
320
- if (!n && l["return"] != null) l["return"]();
288
+ if (i = (r = r.call(e)).next, 0 === t) {
289
+ if (Object(r) !== r) return;
290
+ s = !1;
291
+ } else for (;!(s = (n = i.call(r)).done) && (a.push(n.value), a.length !== t); s = !0) {
292
+ }
293
+ } catch (e) {
294
+ p = !0, o = e;
321
295
  } finally {
322
- if (o) throw i;
296
+ try {
297
+ if (!s && null != r["return"] && (l = r["return"](), Object(l) !== l)) return;
298
+ } finally {
299
+ if (p) throw o;
300
+ }
323
301
  }
302
+ return a;
324
303
  }
325
- return r;
326
304
  }
327
- function R(e) {
305
+ function W(e) {
328
306
  if (Array.isArray(e)) return e;
329
307
  }
330
- function W(e, t) {
331
- if (!(e instanceof t)) {
332
- throw new TypeError("Cannot call a class as a function");
333
- }
308
+ function R(e, t) {
309
+ if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
334
310
  }
335
311
  function z(e, t) {
336
312
  for (var r = 0; r < t.length; r++) {
337
313
  var n = t[r];
338
- n.enumerable = n.enumerable || false;
339
- n.configurable = true;
340
- if ("value" in n) n.writable = true;
341
- Object.defineProperty(e, n.key, n);
314
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0),
315
+ Object.defineProperty(e, ee(n.key), n);
342
316
  }
343
317
  }
344
318
  function F(e, t, r) {
345
- if (t) z(e.prototype, t);
346
- if (r) z(e, r);
347
- return e;
319
+ return t && z(e.prototype, t), r && z(e, r), Object.defineProperty(e, "prototype", {
320
+ writable: !1
321
+ }), e;
348
322
  }
349
323
  function J(e, t) {
350
- if (typeof t !== "function" && t !== null) {
351
- throw new TypeError("Super expression must either be null or a function");
352
- }
324
+ if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
353
325
  e.prototype = Object.create(t && t.prototype, {
354
326
  constructor: {
355
327
  value: e,
356
- writable: true,
357
- configurable: true
328
+ writable: !0,
329
+ configurable: !0
358
330
  }
359
- });
360
- if (t) H(e, t);
331
+ }), Object.defineProperty(e, "prototype", {
332
+ writable: !1
333
+ }), t && H(e, t);
361
334
  }
362
335
  function H(e, t) {
363
- H = Object.setPrototypeOf || function e(t, r) {
364
- t.__proto__ = r;
365
- return t;
366
- };
367
- return H(e, t);
336
+ return H = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
337
+ return e.__proto__ = t, e;
338
+ }, H(e, t);
368
339
  }
369
340
  function U(e) {
370
341
  var t = Q();
371
- return function r() {
372
- var n = Y(e), o;
342
+ return function() {
343
+ var r, n = Y(e);
373
344
  if (t) {
374
- var i = Y(this).constructor;
375
- o = Reflect.construct(n, arguments, i);
376
- } else {
377
- o = n.apply(this, arguments);
378
- }
379
- return X(this, o);
345
+ var o = Y(this).constructor;
346
+ r = Reflect.construct(n, arguments, o);
347
+ } else r = n.apply(this, arguments);
348
+ return X(this, r);
380
349
  };
381
350
  }
382
351
  function X(e, t) {
383
- if (t && (T(t) === "object" || typeof t === "function")) {
384
- return t;
385
- }
352
+ if (t && ("object" == L(t) || "function" == typeof t)) return t;
353
+ if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined");
386
354
  return K(e);
387
355
  }
388
356
  function K(e) {
389
- if (e === void 0) {
390
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
391
- }
357
+ if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
392
358
  return e;
393
359
  }
394
360
  function Q() {
395
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
396
- if (Reflect.construct.sham) return false;
397
- if (typeof Proxy === "function") return true;
398
361
  try {
399
- Date.prototype.toString.call(Reflect.construct(Date, [], (function() {})));
400
- return true;
401
- } catch (e) {
402
- return false;
403
- }
362
+ var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
363
+ } catch (e) {}
364
+ return (Q = function t() {
365
+ return !!e;
366
+ })();
404
367
  }
405
368
  function Y(e) {
406
- Y = Object.setPrototypeOf ? Object.getPrototypeOf : function e(t) {
407
- return t.__proto__ || Object.getPrototypeOf(t);
408
- };
409
- return Y(e);
369
+ return Y = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
370
+ return e.__proto__ || Object.getPrototypeOf(e);
371
+ }, Y(e);
410
372
  }
411
373
  function Z(e, t, r) {
412
- if (t in e) {
413
- Object.defineProperty(e, t, {
414
- value: r,
415
- enumerable: true,
416
- configurable: true,
417
- writable: true
418
- });
419
- } else {
420
- e[t] = r;
374
+ return (t = ee(t)) in e ? Object.defineProperty(e, t, {
375
+ value: r,
376
+ enumerable: !0,
377
+ configurable: !0,
378
+ writable: !0
379
+ }) : e[t] = r, e;
380
+ }
381
+ function ee(e) {
382
+ var t = te(e, "string");
383
+ return "symbol" == L(t) ? t : t + "";
384
+ }
385
+ function te(e, t) {
386
+ if ("object" != L(e) || !e) return e;
387
+ var r = e[Symbol.toPrimitive];
388
+ if (void 0 !== r) {
389
+ var n = r.call(e, t || "default");
390
+ if ("object" != L(n)) return n;
391
+ throw new TypeError("@@toPrimitive must return a primitive value.");
421
392
  }
422
- return e;
393
+ return ("string" === t ? String : Number)(e);
423
394
  }
424
395
  // props ControlGroup may access and/or override on children
425
- var ee = {
396
+ var re = {
426
397
  children: i().node,
427
398
  controlsLayout: i().oneOf([ "fill", "fillJoin", "none", "stack" ]),
428
399
  elementRef: i().oneOfType([ i().func, i().object ]),
@@ -440,7 +411,7 @@
440
411
  tooltip: i().node,
441
412
  tooltipDefaultPlacement: i().oneOf([ "above", "below", "left", "right", "theme" ])
442
413
  };
443
- var te = {
414
+ var ne = {
444
415
  controlsLayout: "fill",
445
416
  error: false,
446
417
  hideLabel: false,
@@ -449,13 +420,13 @@
449
420
  required: false
450
421
  };
451
422
  // Style cloned onto child elements when fill behavior set.
452
- var re = {
423
+ var oe = {
453
424
  flexGrow: 1
454
425
  };
455
- // Margin bootom values cloned onto child elements when the stacking behavior is needed.
456
- var ne = "0";
457
- var oe = "16px";
458
- var ie = "12px";
426
+ // Margin bootom values cloned onto child elements when the stacking behavior is needed.
427
+ var ie = "0";
428
+ var le = "16px";
429
+ var ae = "12px";
459
430
  /**
460
431
  * `ControlGroup` places a label and optional help text around one or more controls. The `ControlGroup`
461
432
  * will automatically add aria attributes to associate the controls with the labels and help text to
@@ -473,13 +444,13 @@
473
444
  * If the linked child supports an `inputId` prop and it's set, its value is used for the label's `for`
474
445
  * attribute. If `inputId` is supported but not set a generated id is used instead. If `inputId` isn't
475
446
  * supported `id` is used. The `labelFor` prop may be used to override the `for` attribute.
476
- */ var le = function(e) {
447
+ */ var se = function(e) {
477
448
  J(o, e);
478
449
  var t = U(o);
479
450
  // @docs-props-type ControlGroupPropsBase
480
451
  function o(e) {
481
452
  var r;
482
- W(this, o);
453
+ R(this, o);
483
454
  r = t.call(this, e);
484
455
  Z(K(r), "errorId", void 0);
485
456
  Z(K(r), "helpId", void 0);
@@ -499,11 +470,11 @@
499
470
  Z(K(r), "getStackLayoutChildStyle", (function(e, t) {
500
471
  if (e) {
501
472
  if (t) {
502
- r.stackLayoutChildStyle.marginBottom = ie;
473
+ r.stackLayoutChildStyle.marginBottom = ae;
503
474
  }
504
- r.stackLayoutChildStyle.marginBottom = oe;
475
+ r.stackLayoutChildStyle.marginBottom = le;
505
476
  } else {
506
- r.stackLayoutChildStyle.marginBottom = ne;
477
+ r.stackLayoutChildStyle.marginBottom = ie;
507
478
  }
508
479
  return r.stackLayoutChildStyle;
509
480
  }));
@@ -514,12 +485,12 @@
514
485
  if (e.length === 0) {
515
486
  return undefined;
516
487
  }
517
- var t = $(e, 1), n = t[0];
488
+ var t = V(e, 1), n = t[0];
518
489
  var o = a()(e, (function(e) {
519
490
  return e.type && e.type.componentType === "Text";
520
491
  }));
521
492
  var i = r.hasInputId(n);
522
- // see class doc block for details
493
+ // see class doc block for details
523
494
  if (e.length === 1 && n && n.props) {
524
495
  return i ? n.props.inputId : n.props.id;
525
496
  }
@@ -572,16 +543,16 @@
572
543
  key: "render",
573
544
  value: function e() {
574
545
  var t = this;
575
- var o = this.props, i = o.children, l = o.controlsLayout, a = o.error, s = o.help, c = o.hideLabel, u = o.label, f = o.labelFor, y = o.labelPosition, h = o.labelWidth, m = o.required, v = o.splunkTheme, g = o.tooltip, _ = o.tooltipDefaultPlacement, T = M(o, [ "children", "controlsLayout", "error", "help", "hideLabel", "label", "labelFor", "labelPosition", "labelWidth", "required", "splunkTheme", "tooltip", "tooltipDefaultPlacement" ]);
576
- var D = v.isPrisma, V = v.isCompact;
577
- var $ = r.Children.toArray(i).filter(r.isValidElement);
578
- var A = $.length;
579
- var G = T;
580
- var B = typeof a === "string";
581
- var N = B && a !== "";
582
- var R = B || a === true;
583
- // Clean the Children
584
- var W = function e(n, o) {
546
+ var o = this.props, i = o.children, l = o.controlsLayout, a = o.error, s = o.help, c = o.hideLabel, u = o.label, f = o.labelFor, y = o.labelPosition, h = o.labelWidth, m = o.required, v = o.splunkTheme, g = o.tooltip, _ = o.tooltipDefaultPlacement, L = M(o, [ "children", "controlsLayout", "error", "help", "hideLabel", "label", "labelFor", "labelPosition", "labelWidth", "required", "splunkTheme", "tooltip", "tooltipDefaultPlacement" ]);
547
+ var D = v.isPrisma, B = v.isCompact;
548
+ var V = r.Children.toArray(i).filter(r.isValidElement);
549
+ var $ = V.length;
550
+ var A = L;
551
+ var G = typeof a === "string";
552
+ var N = G && a !== "";
553
+ var W = G || a === true;
554
+ // Clean the Children
555
+ var R = function e(n, o) {
585
556
  var i = {
586
557
  key: n.key || o
587
558
  };
@@ -589,21 +560,21 @@
589
560
  if (o > 0) {
590
561
  i.prepend = true;
591
562
  }
592
- if (o < A - 1) {
563
+ if (o < $ - 1) {
593
564
  i.append = true;
594
565
  }
595
566
  if (i.prepend || i.append) {
596
567
  i.inline = false;
597
568
  }
598
569
  }
599
- if (l === "fill" && A > 1) {
570
+ if (l === "fill" && $ > 1) {
600
571
  i.inline = true;
601
572
  }
602
573
  if (l === "stack") {
603
574
  i.inline = false;
604
- if (o < A - 1) {
575
+ if (o < $ - 1) {
605
576
  // The spread operator is used as css styles are not nested, so there is no need for a deep copy.
606
- var a = t.getStackLayoutChildStyle(D, V);
577
+ var a = t.getStackLayoutChildStyle(D, B);
607
578
  i.style = n.props.style ? q(q({}, n.props.style), a) : a;
608
579
  }
609
580
  }
@@ -618,7 +589,7 @@
618
589
  if (t.props.required) {
619
590
  i.required = true;
620
591
  }
621
- // TODO: SUI-3402 refactor so that parent component doesn't have to know what it's child components are
592
+ // TODO: SUI-3402 refactor so that parent component doesn't have to know what it's child components are
622
593
  if (n.type.componentType === "Multiselect") {
623
594
  var s = n;
624
595
  if (s.props.compact === false) {
@@ -627,10 +598,10 @@
627
598
  } else {
628
599
  i.labelText = u;
629
600
  }
630
- if (A === 1 && (l === "fillJoin" || l === "fill")) {
601
+ if ($ === 1 && (l === "fillJoin" || l === "fill")) {
631
602
  // Some controls like Select do not grow by default, so flexGrow is applied
632
603
  // The spread operator is used as css styles are not nested, so there is no need for a deep copy.
633
- i.style = n.props.style ? q(q({}, n.props.style), re) : re;
604
+ i.style = n.props.style ? q(q({}, n.props.style), oe) : oe;
634
605
  }
635
606
  if (!f && n) {
636
607
  if (t.hasInputId(n)) {
@@ -645,10 +616,10 @@
645
616
 
646
617
  return (0, r.cloneElement)(n, i);
647
618
  };
648
- var z = $.map(W);
619
+ var z = V.map(R);
649
620
  var F = this.getLinkedId(z);
650
621
  if (a) {
651
- G["aria-invalid"] = true;
622
+ A["aria-invalid"] = true;
652
623
  }
653
624
  var J = y === "left" ? {
654
625
  width: h
@@ -659,18 +630,18 @@
659
630
  marginLeft: "calc(".concat(H, " + ").concat(U, ")")
660
631
  } : undefined;
661
632
  var K = l === "stack" ? S : d();
662
- var Q = y === "left" ? I : x;
633
+ var Q = y === "left" ? I : w;
663
634
  var Y = n().createElement(Q, {
664
635
  style: J,
665
636
  $labelPosition: y
666
- }, n().createElement(C, {
637
+ }, n().createElement(x, {
667
638
  "data-test": "label",
668
639
  id: this.labelId,
669
640
  htmlFor: f || F,
670
641
  $tooltip: !!g
671
642
  }, m && n().createElement(P, {
672
643
  "aria-hidden": "true"
673
- }, "*"), u, !D && !c && g && n().createElement("span", null, " "), !c && g && n().createElement(b(), null, g)), !c && g && n().createElement(k, {
644
+ }, "*"), u, !D && !c && g && n().createElement("span", null, " "), !c && g && n().createElement(b(), null, g)), !c && g && n().createElement(C, {
674
645
  $labelPosition: y,
675
646
  closeWhen: "notOnClick",
676
647
  content: g,
@@ -681,19 +652,19 @@
681
652
  return n().createElement(O, E({
682
653
  "data-test": "control-group",
683
654
  "data-test-required": m,
684
- $error: R
685
- }, G), n().createElement(L.Provider, {
655
+ $error: W
656
+ }, A), n().createElement(T.Provider, {
686
657
  value: this.getContextValue()
687
658
  }, c ? n().createElement(b(), null, Y) : Y, n().createElement(K, {
688
659
  "data-test": "controls",
689
660
  flex: l !== "none",
690
661
  style: X
691
- }, z), s && n().createElement(w, {
662
+ }, z), s && n().createElement(j, {
692
663
  "data-test": "help",
693
664
  id: this.helpId,
694
665
  style: X,
695
- $error: R && !N
696
- }, s), N && n().createElement(j, {
666
+ $error: W && !N
667
+ }, s), N && n().createElement(k, {
697
668
  "data-test": "error",
698
669
  id: this.errorId,
699
670
  style: X,
@@ -703,11 +674,11 @@
703
674
  } ]);
704
675
  return o;
705
676
  }(r.Component);
706
- Z(le, "propTypes", ee);
707
- Z(le, "defaultProps", te);
708
- var ae = (0, c.withSplunkTheme)(le);
709
- ae.propTypes = le.propTypes;
710
- /* harmony default export */ const se = ae;
677
+ Z(se, "propTypes", re);
678
+ Z(se, "defaultProps", ne);
679
+ var pe = (0, c.withSplunkTheme)(se);
680
+ pe.propTypes = se.propTypes;
681
+ /* harmony default export */ const ce = pe;
711
682
  // CONCATENATED MODULE: ./src/ControlGroup/index.ts
712
683
  module.exports = t;
713
684
  /******/})();