@splunk/react-ui 4.32.0 → 4.34.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/Button.js +59 -65
  2. package/ButtonGroup.js +20 -23
  3. package/ButtonSimple.js +374 -339
  4. package/CHANGELOG.md +54 -0
  5. package/Card.js +56 -44
  6. package/Chip.js +2 -6
  7. package/Clickable.js +21 -19
  8. package/CollapsiblePanel.js +281 -264
  9. package/Color.js +88 -86
  10. package/Concertina.js +7 -7
  11. package/ControlGroup.js +18 -18
  12. package/DualListbox.js +8 -11
  13. package/File.js +25 -30
  14. package/FormRows.js +232 -210
  15. package/Image.js +13 -13
  16. package/JSONTree.js +22 -22
  17. package/MIGRATION.mdx +99 -0
  18. package/Markdown.js +12 -12
  19. package/Menu.js +505 -719
  20. package/Message.js +205 -204
  21. package/MessageBar.js +104 -104
  22. package/Modal.js +158 -133
  23. package/Multiselect.js +81 -70
  24. package/Paginator.js +8 -8
  25. package/Popover.js +53 -54
  26. package/Progress.js +45 -46
  27. package/RadioBar.js +117 -115
  28. package/RadioList.js +8 -5
  29. package/ResultsMenu.js +256 -261
  30. package/Search.js +21 -24
  31. package/Select.js +265 -246
  32. package/Slider.js +9 -9
  33. package/SplitButton.js +1 -4
  34. package/StaticContent.js +1 -1
  35. package/StepBar.js +1 -1
  36. package/Switch.js +169 -171
  37. package/TabBar.js +14 -6
  38. package/Table.js +65 -67
  39. package/Text.js +30 -37
  40. package/TextArea.js +162 -163
  41. package/Tooltip.js +1 -1
  42. package/package.json +9 -9
  43. package/stubs-splunkui.d.ts +11 -0
  44. package/types/src/Button/Button.d.ts +4 -4
  45. package/types/src/ButtonSimple/ButtonSimple.d.ts +8 -6
  46. package/types/src/ButtonSimple/mixin.d.ts +2 -2
  47. package/types/src/Card/Card.d.ts +3 -1
  48. package/types/src/Card/Header.d.ts +22 -3
  49. package/types/src/Clickable/Clickable.d.ts +3 -2
  50. package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +5 -0
  51. package/types/src/CollapsiblePanel/icons/ExpandPanel.d.ts +1 -3
  52. package/types/src/Date/Date.d.ts +2 -2
  53. package/types/src/Menu/Item.d.ts +3 -1
  54. package/types/src/Menu/Menu.d.ts +16 -21
  55. package/types/src/Menu/MenuContext.d.ts +3 -2
  56. package/types/src/Number/Number.d.ts +2 -2
  57. package/types/src/RadioBar/Option.d.ts +4 -1
  58. package/types/src/RadioBar/RadioBar.d.ts +6 -4
  59. package/types/src/RadioBar/docs/examples/MenuBar.d.ts +2 -0
  60. package/types/src/ResultsMenu/ResultsMenu.d.ts +5 -22
  61. package/types/src/Select/Select.d.ts +8 -4
  62. package/types/src/Select/SelectBase.d.ts +8 -4
  63. package/types/src/Slider/Slider.d.ts +2 -2
  64. package/types/src/Table/Body.d.ts +0 -4
  65. package/types/src/Text/docs/examples/Basic.d.ts +1 -9
  66. package/types/src/Text/docs/examples/Error.d.ts +2 -10
  67. package/types/src/Text/docs/examples/Inline.d.ts +1 -9
  68. package/types/src/Text/docs/examples/Multiline.d.ts +1 -9
  69. package/types/src/Text/docs/examples/Password.d.ts +1 -9
  70. package/types/src/Text/docs/examples/Search.d.ts +1 -9
  71. package/useRovingFocus.js +26 -40
  72. package/types/src/Button/docs/examples/prisma/Basic.d.ts +0 -2
  73. package/types/src/Button/docs/examples/prisma/Block.d.ts +0 -2
  74. package/types/src/Button/docs/examples/prisma/Disabled.d.ts +0 -2
  75. package/types/src/Button/docs/examples/prisma/Icons.d.ts +0 -2
  76. package/types/src/Button/docs/examples/prisma/Menus.d.ts +0 -2
  77. package/types/src/Button/docs/examples/prisma/To.d.ts +0 -2
  78. package/types/src/Button/docs/examples/prisma/Truncated.d.ts +0 -2
  79. package/types/src/Select/docs/examples/prisma/Appearance.d.ts +0 -14
  80. /package/types/src/{Button/docs/examples/prisma → Clickable/docs/examples}/Dimmed.d.ts +0 -0
package/TextArea.js CHANGED
@@ -61,7 +61,7 @@
61
61
  e.r(t);
62
62
  // EXPORTS
63
63
  e.d(t, {
64
- default: () => /* reexport */ De
64
+ default: () => /* reexport */ _e
65
65
  });
66
66
  // CONCATENATED MODULE: external "react"
67
67
  const r = require("react");
@@ -76,8 +76,8 @@
76
76
  const s = require("lodash/has");
77
77
  var c = e.n(s);
78
78
  // CONCATENATED MODULE: external "lodash/keys"
79
- const p = require("lodash/keys");
80
- var d = e.n(p);
79
+ const d = require("lodash/keys");
80
+ var p = e.n(d);
81
81
  // CONCATENATED MODULE: external "lodash/noop"
82
82
  const u = require("lodash/noop");
83
83
  var f = e.n(u);
@@ -169,13 +169,18 @@
169
169
  }),
170
170
  /* sc-sel */
171
171
  q);
172
- var B = 12;
173
- var z = 10;
174
- var F = 0;
175
- var H = M().span.withConfig({
172
+ var B = (0, k.pick)({
173
+ prisma: "12px",
174
+ enterprise: "10px"
175
+ });
176
+ var z = (0, k.pick)({
177
+ prisma: "12px",
178
+ enterprise: "0"
179
+ });
180
+ var F = M().span.withConfig({
176
181
  displayName: "TextAreaStyles__StyledTextAreaWrapper",
177
182
  componentId: "gfy8yp-3"
178
- })([ "", " flex-grow:1;min-height:", ";position:relative;overflow:hidden;border:1px solid ", ";border-radius:", ";box-sizing:border-box;background-color:", ";box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);align-items:center;padding:", ";", " ", " &:hover:not([disabled]){border-color:", ";}&:focus-within:not([disabled]){box-shadow:", ";color:", ";}", " ", " ", " ", "" ], k.mixins.reset("inline-flex"), k.variables.inputHeight, (0,
183
+ })([ "", " flex-grow:1;min-height:", ";position:relative;overflow:hidden;border:1px solid ", ";border-radius:", ";box-sizing:border-box;background-color:", ";box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);align-items:center;padding:0 ", " 0 ", ";", " ", " &:hover:not([disabled]){border-color:", ";}&:focus-within:not([disabled]){box-shadow:", ";color:", ";}", " ", " ", " ", "" ], k.mixins.reset("inline-flex"), k.variables.inputHeight, (0,
179
184
  k.pick)({
180
185
  enterprise: {
181
186
  light: k.variables.gray60,
@@ -188,10 +193,7 @@
188
193
  dark: k.variables.gray22
189
194
  },
190
195
  prisma: k.variables.transparent
191
- }), (0, k.pick)({
192
- enterprise: "0px ".concat(F, "px 0px ").concat(z, "px"),
193
- prisma: "0px ".concat(B, "px")
194
- }), (function(e) {
196
+ }), z, B, (function(e) {
195
197
  var t = e.$hasEndAdornment;
196
198
  return t && (0, T.css)([ "padding-right:0;" ]);
197
199
  }), (function(e) {
@@ -223,13 +225,13 @@
223
225
  prisma: (0, T.css)([ "border-color:", ";" ], k.variables.interactiveColorBorderDisabled)
224
226
  }));
225
227
  }));
226
- var V = M().textarea.withConfig({
228
+ var H = M().textarea.withConfig({
227
229
  displayName: "TextAreaStyles__StyledTextArea",
228
230
  componentId: "gfy8yp-4"
229
231
  })([ "", ";outline-style:none;border:0;background:transparent;color:", ";flex-grow:1;font-family:", ";font-size:inherit;line-height:inherit;padding-top:", ";padding-bottom:", ";padding-right:", ";position:relative;resize:none;overflow:auto;white-space:pre-wrap;", " &::placeholder{color:", ";opacity:1;}", " ", "" ], k.mixins.reset("inline-flex"), k.variables.contentColorActive, k.variables.sansFontFamily, (0,
230
232
  k.pick)({
231
233
  enterprise: {
232
- comfortable: k.variables.spacingQuarter,
234
+ comfortable: k.variables.spacingXSmall,
233
235
  compact: "3px"
234
236
  },
235
237
  prisma: {
@@ -238,7 +240,7 @@
238
240
  }
239
241
  }), (0, k.pick)({
240
242
  enterprise: {
241
- comfortable: k.variables.spacingQuarter,
243
+ comfortable: k.variables.spacingXSmall,
242
244
  compact: "3px"
243
245
  },
244
246
  prisma: {
@@ -264,17 +266,14 @@
264
266
  var t = e.disabled;
265
267
  return t && (0, T.css)([ "cursor:not-allowed;color:", ";&::placeholder{color:", ";}" ], k.variables.contentColorDisabled, k.variables.contentColorDisabled);
266
268
  }));
267
- var K = M()(V).withConfig({
269
+ var V = M()(H).withConfig({
268
270
  displayName: "TextAreaStyles__StyledTextAreaShadow",
269
271
  componentId: "gfy8yp-5"
270
- })([ "position:absolute;overflow:hidden;left:-10000px;top:-10000px;visibility:hidden;pointer-events:none;width:", ";" ], (function(e) {
272
+ })([ "position:absolute;overflow:hidden;left:-10000px;top:-10000px;visibility:hidden;pointer-events:none;", ";" ], (function(e) {
271
273
  var t = e.$startAdornmentWidth, r = e.$endAdornmentWidth;
272
- return (0, T.css)([ "calc(100% - (", "));" ], (0, k.pick)({
273
- prisma: (0, T.css)([ "", "px + ", "px" ], t || B, r || B),
274
- enterprise: (0, T.css)([ "", "px + ", "px" ], t || z, r || F)
275
- }));
274
+ return (0, T.css)([ "width:calc( 100% - ", " - ", " );" ], t || B, r || z);
276
275
  }));
277
- var L = (0, k.pick)({
276
+ var K = (0, k.pick)({
278
277
  enterprise: {
279
278
  comfortable: "30px",
280
279
  compact: "26px"
@@ -284,24 +283,24 @@
284
283
  compact: "30px"
285
284
  }
286
285
  });
287
- var G = (0, k.pick)({
286
+ var L = (0, k.pick)({
288
287
  enterprise: "10px",
289
288
  prisma: "14px"
290
289
  });
291
- var Q = M().span.withConfig({
290
+ var G = M().span.withConfig({
292
291
  displayName: "TextAreaStyles__StyledPlaceholder",
293
292
  componentId: "gfy8yp-6"
294
293
  })([ "pointer-events:none;color:", ";position:absolute;overflow:hidden;height:", ";margin-right:", ";", ";", ";", "" ], (0,
295
294
  k.pick)({
296
295
  enterprise: k.variables.textGray,
297
296
  prisma: k.variables.contentColorMuted
298
- }), k.variables.lineHeight, G, (function(e) {
297
+ }), k.variables.lineHeight, L, (function(e) {
299
298
  var t = e.$hasStartAdornment, r = e.$startAdornmentWidth;
300
- return t && (r ? (0, T.css)([ "margin-left:", "px;" ], r) : (0, T.css)([ "margin-left:", ";" ], L));
299
+ return t && (r ? (0, T.css)([ "margin-left:", "px;" ], r) : (0, T.css)([ "margin-left:", ";" ], K));
301
300
  }), (function(e) {
302
301
  var t = e.$hasEndAdornment, r = e.$endAdornmentWidth;
303
- return t && (r ? (0, T.css)([ "max-width:calc(100% - ", " - ", "px);" ], G, r) : (0,
304
- T.css)([ "max-width:calc(100% - ", " - ", ");" ], G, L));
302
+ return t && (r ? (0, T.css)([ "max-width:calc(100% - ", " - ", "px);" ], L, r) : (0,
303
+ T.css)([ "max-width:calc(100% - ", " - ", ");" ], L, K));
305
304
  }), (function(e) {
306
305
  var t = e.$hasBothAdornment, r = e.$endAdornmentWidth, n = e.$startAdornmentWidth;
307
306
  return t && (0, T.css)([ "max-width:calc(100% - ", "px - ", "px);" ], n, r);
@@ -309,14 +308,14 @@
309
308
  var U = M().div.withConfig({
310
309
  displayName: "TextAreaStyles__StyledAdornmentSpacer",
311
310
  componentId: "gfy8yp-7"
312
- })([ "display:inline-flex;align-items:center;justify-content:center;height:", ";pointer-events:none;", ";" ], L, (function(e) {
311
+ })([ "display:inline-flex;align-items:center;justify-content:center;height:", ";pointer-events:none;", ";" ], K, (function(e) {
313
312
  var t = e.$width;
314
- return t ? (0, T.css)([ "min-width:", "px;" ], t) : (0, T.css)([ "min-width:", ";" ], L);
313
+ return t ? (0, T.css)([ "min-width:", "px;" ], t) : (0, T.css)([ "min-width:", ";" ], K);
315
314
  }));
316
- var J = M().div.withConfig({
315
+ var X = M().div.withConfig({
317
316
  displayName: "TextAreaStyles__StyledAdornment",
318
317
  componentId: "gfy8yp-8"
319
- })([ "display:inline-flex;align-items:center;justify-content:center;position:absolute;pointer-events:none;z-index:1;height:", ";color:", ";", " ", ";", "" ], L, (0,
318
+ })([ "display:inline-flex;align-items:center;justify-content:center;position:absolute;pointer-events:none;z-index:1;height:", ";color:", ";", " ", ";", "" ], K, (0,
320
319
  k.pick)({
321
320
  enterprise: {
322
321
  light: k.variables.gray60,
@@ -333,8 +332,8 @@
333
332
  enterprise: (0, T.css)([ "margin-left:-1px;margin-right:-1px;" ])
334
333
  }));
335
334
  // CONCATENATED MODULE: ./src/TextArea/icons/ClearButton.tsx
336
- function X() {
337
- X = Object.assign || function(e) {
335
+ function J() {
336
+ J = Object.assign || function(e) {
338
337
  for (var t = 1; t < arguments.length; t++) {
339
338
  var r = arguments[t];
340
339
  for (var n in r) {
@@ -345,9 +344,9 @@
345
344
  }
346
345
  return e;
347
346
  };
348
- return X.apply(this, arguments);
347
+ return J.apply(this, arguments);
349
348
  }
350
- function Y(e) {
349
+ function Q(e) {
351
350
  var t = (0, k.useSplunkTheme)(), r = t.isEnterprise, a = t.isCompact;
352
351
  var i = r ? "pill" : "secondary";
353
352
  var o = a ? "20px" : "24px";
@@ -358,7 +357,7 @@
358
357
  height: o
359
358
  });
360
359
 
361
- return n().createElement(q, X({
360
+ return n().createElement(q, J({
362
361
  "data-test": "clear",
363
362
  icon: l,
364
363
  appearance: i,
@@ -366,17 +365,17 @@
366
365
  }, e));
367
366
  }
368
367
  // CONCATENATED MODULE: external "@splunk/react-icons/Magnifier"
369
- const Z = require("@splunk/react-icons/Magnifier");
370
- var ee = e.n(Z);
368
+ const Y = require("@splunk/react-icons/Magnifier");
369
+ var Z = e.n(Y);
371
370
  // CONCATENATED MODULE: external "@splunk/react-icons/enterprise/Search"
372
- const te = require("@splunk/react-icons/enterprise/Search");
373
- var re = e.n(te);
371
+ const ee = require("@splunk/react-icons/enterprise/Search");
372
+ var te = e.n(ee);
374
373
  // CONCATENATED MODULE: ./src/TextArea/icons/SearchIcon.tsx
375
- function ne() {
374
+ function re() {
376
375
  var e = (0, k.useSplunkTheme)(), t = e.isCompact, r = e.isEnterprise;
377
376
  if (r) {
378
377
 
379
- return n().createElement(re(), {
378
+ return n().createElement(te(), {
380
379
  hideDefaultTooltip: true,
381
380
  inline: false,
382
381
  screenReaderText: "Search",
@@ -385,7 +384,7 @@
385
384
  }
386
385
  var a = t ? "20px" : "24px";
387
386
 
388
- return n().createElement(ee(), {
387
+ return n().createElement(Z(), {
389
388
  "aria-label": "Search",
390
389
  height: a,
391
390
  width: a
@@ -412,7 +411,7 @@
412
411
  // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
413
412
  // SOFTWARE.
414
413
  // End of MIT license text.
415
- function ae(e) {
414
+ function ne(e) {
416
415
  var t = e.height, r = e.rowsMax, n = e.rowsMin, a = e.shadow;
417
416
  if (a) {
418
417
  var i = window.getComputedStyle(a);
@@ -424,9 +423,9 @@
424
423
  var l = parseInt(o, 10);
425
424
  var s = parseInt(i.getPropertyValue("padding-top"), 10);
426
425
  var c = parseInt(i.getPropertyValue("padding-bottom"), 10);
427
- var p = parseInt(i.getPropertyValue("border-top-width"), 10);
428
- var d = parseInt(i.getPropertyValue("border-bottom-width"), 10);
429
- var u = a.scrollHeight + p + d + 1;
426
+ var d = parseInt(i.getPropertyValue("border-top-width"), 10);
427
+ var p = parseInt(i.getPropertyValue("border-bottom-width"), 10);
428
+ var u = a.scrollHeight + d + p + 1;
430
429
  // need one extra.
431
430
  /* eslint-disable no-restricted-globals */
432
431
  // Leverage the global `isNaN` here for IE support, rather than Number.isNaN.
@@ -435,11 +434,11 @@
435
434
  return false;
436
435
  }
437
436
  /* eslint-enable no-restricted-globals */ if (r >= n) {
438
- var f = r * l + s + c + p + d + 1;
437
+ var f = r * l + s + c + d + p + 1;
439
438
  // need one extra.
440
439
  u = Math.min(f, u);
441
440
  }
442
- var h = n * l + s + c + p + d + 1;
441
+ var h = n * l + s + c + d + p + 1;
443
442
  // need one extra.
444
443
  u = Math.max(h, u);
445
444
  if (t !== u) {
@@ -455,7 +454,7 @@
455
454
  * @param ref - The React callback or object ref. Can be `null` or `undefined`.
456
455
  * @param current - The new value of the ref.
457
456
  */
458
- function ie(e, t) {
457
+ function ae(e, t) {
459
458
  if (e) {
460
459
  if (typeof e === "function") {
461
460
  e(t);
@@ -468,21 +467,21 @@
468
467
  }
469
468
  }
470
469
  // CONCATENATED MODULE: ./src/TextArea/TextArea.tsx
471
- function oe(e) {
470
+ function ie(e) {
472
471
  "@babel/helpers - typeof";
473
472
  if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
474
- oe = function e(t) {
473
+ ie = function e(t) {
475
474
  return typeof t;
476
475
  };
477
476
  } else {
478
- oe = function e(t) {
477
+ ie = function e(t) {
479
478
  return t && typeof Symbol === "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
480
479
  };
481
480
  }
482
- return oe(e);
481
+ return ie(e);
483
482
  }
484
- function le() {
485
- le = Object.assign || function(e) {
483
+ function oe() {
484
+ oe = Object.assign || function(e) {
486
485
  for (var t = 1; t < arguments.length; t++) {
487
486
  var r = arguments[t];
488
487
  for (var n in r) {
@@ -493,36 +492,36 @@
493
492
  }
494
493
  return e;
495
494
  };
496
- return le.apply(this, arguments);
495
+ return oe.apply(this, arguments);
497
496
  }
498
- function se(e) {
499
- return ue(e) || de(e) || pe(e) || ce();
497
+ function le(e) {
498
+ return pe(e) || de(e) || ce(e) || se();
500
499
  }
501
- function ce() {
500
+ function se() {
502
501
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
503
502
  }
504
- function pe(e, t) {
503
+ function ce(e, t) {
505
504
  if (!e) return;
506
- if (typeof e === "string") return fe(e, t);
505
+ if (typeof e === "string") return ue(e, t);
507
506
  var r = Object.prototype.toString.call(e).slice(8, -1);
508
507
  if (r === "Object" && e.constructor) r = e.constructor.name;
509
508
  if (r === "Map" || r === "Set") return Array.from(e);
510
- if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return fe(e, t);
509
+ if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return ue(e, t);
511
510
  }
512
511
  function de(e) {
513
512
  if (typeof Symbol !== "undefined" && Symbol.iterator in Object(e)) return Array.from(e);
514
513
  }
515
- function ue(e) {
516
- if (Array.isArray(e)) return fe(e);
514
+ function pe(e) {
515
+ if (Array.isArray(e)) return ue(e);
517
516
  }
518
- function fe(e, t) {
517
+ function ue(e, t) {
519
518
  if (t == null || t > e.length) t = e.length;
520
519
  for (var r = 0, n = new Array(t); r < t; r++) {
521
520
  n[r] = e[r];
522
521
  }
523
522
  return n;
524
523
  }
525
- function he(e, t) {
524
+ function fe(e, t) {
526
525
  var r = Object.keys(e);
527
526
  if (Object.getOwnPropertySymbols) {
528
527
  var n = Object.getOwnPropertySymbols(e);
@@ -533,26 +532,26 @@
533
532
  }
534
533
  return r;
535
534
  }
536
- function ve(e) {
535
+ function he(e) {
537
536
  for (var t = 1; t < arguments.length; t++) {
538
537
  var r = arguments[t] != null ? arguments[t] : {};
539
538
  if (t % 2) {
540
- he(Object(r), true).forEach((function(t) {
541
- je(e, t, r[t]);
539
+ fe(Object(r), true).forEach((function(t) {
540
+ Ie(e, t, r[t]);
542
541
  }));
543
542
  } else if (Object.getOwnPropertyDescriptors) {
544
543
  Object.defineProperties(e, Object.getOwnPropertyDescriptors(r));
545
544
  } else {
546
- he(Object(r)).forEach((function(t) {
545
+ fe(Object(r)).forEach((function(t) {
547
546
  Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t));
548
547
  }));
549
548
  }
550
549
  }
551
550
  return e;
552
551
  }
553
- function me(e, t) {
552
+ function ve(e, t) {
554
553
  if (e == null) return {};
555
- var r = be(e, t);
554
+ var r = me(e, t);
556
555
  var n, a;
557
556
  if (Object.getOwnPropertySymbols) {
558
557
  var i = Object.getOwnPropertySymbols(e);
@@ -565,7 +564,7 @@
565
564
  }
566
565
  return r;
567
566
  }
568
- function be(e, t) {
567
+ function me(e, t) {
569
568
  if (e == null) return {};
570
569
  var r = {};
571
570
  var n = Object.keys(e);
@@ -577,12 +576,12 @@
577
576
  }
578
577
  return r;
579
578
  }
580
- function ye(e, t) {
579
+ function be(e, t) {
581
580
  if (!(e instanceof t)) {
582
581
  throw new TypeError("Cannot call a class as a function");
583
582
  }
584
583
  }
585
- function ge(e, t) {
584
+ function ye(e, t) {
586
585
  for (var r = 0; r < t.length; r++) {
587
586
  var n = t[r];
588
587
  n.enumerable = n.enumerable || false;
@@ -591,12 +590,12 @@
591
590
  Object.defineProperty(e, n.key, n);
592
591
  }
593
592
  }
594
- function xe(e, t, r) {
595
- if (t) ge(e.prototype, t);
596
- if (r) ge(e, r);
593
+ function ge(e, t, r) {
594
+ if (t) ye(e.prototype, t);
595
+ if (r) ye(e, r);
597
596
  return e;
598
597
  }
599
- function we(e, t) {
598
+ function xe(e, t) {
600
599
  if (typeof t !== "function" && t !== null) {
601
600
  throw new TypeError("Super expression must either be null or a function");
602
601
  }
@@ -607,41 +606,41 @@
607
606
  configurable: true
608
607
  }
609
608
  });
610
- if (t) Ce(e, t);
609
+ if (t) we(e, t);
611
610
  }
612
- function Ce(e, t) {
613
- Ce = Object.setPrototypeOf || function e(t, r) {
611
+ function we(e, t) {
612
+ we = Object.setPrototypeOf || function e(t, r) {
614
613
  t.__proto__ = r;
615
614
  return t;
616
615
  };
617
- return Ce(e, t);
616
+ return we(e, t);
618
617
  }
619
- function ke(e) {
620
- var t = Oe();
618
+ function Ce(e) {
619
+ var t = Ae();
621
620
  return function r() {
622
- var n = Ie(e), a;
621
+ var n = Oe(e), a;
623
622
  if (t) {
624
- var i = Ie(this).constructor;
623
+ var i = Oe(this).constructor;
625
624
  a = Reflect.construct(n, arguments, i);
626
625
  } else {
627
626
  a = n.apply(this, arguments);
628
627
  }
629
- return Se(this, a);
628
+ return ke(this, a);
630
629
  };
631
630
  }
632
- function Se(e, t) {
633
- if (t && (oe(t) === "object" || typeof t === "function")) {
631
+ function ke(e, t) {
632
+ if (t && (ie(t) === "object" || typeof t === "function")) {
634
633
  return t;
635
634
  }
636
- return Ae(e);
635
+ return Se(e);
637
636
  }
638
- function Ae(e) {
637
+ function Se(e) {
639
638
  if (e === void 0) {
640
639
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
641
640
  }
642
641
  return e;
643
642
  }
644
- function Oe() {
643
+ function Ae() {
645
644
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
646
645
  if (Reflect.construct.sham) return false;
647
646
  if (typeof Proxy === "function") return true;
@@ -652,13 +651,13 @@
652
651
  return false;
653
652
  }
654
653
  }
655
- function Ie(e) {
656
- Ie = Object.setPrototypeOf ? Object.getPrototypeOf : function e(t) {
654
+ function Oe(e) {
655
+ Oe = Object.setPrototypeOf ? Object.getPrototypeOf : function e(t) {
657
656
  return t.__proto__ || Object.getPrototypeOf(t);
658
657
  };
659
- return Ie(e);
658
+ return Oe(e);
660
659
  }
661
- function je(e, t, r) {
660
+ function Ie(e, t, r) {
662
661
  if (t in e) {
663
662
  Object.defineProperty(e, t, {
664
663
  value: r,
@@ -671,7 +670,7 @@
671
670
  }
672
671
  return e;
673
672
  }
674
- /** @public */ var Ee = {
673
+ /** @public */ var je = {
675
674
  appearance: i().oneOf([ "default", "search" ]),
676
675
  append: i().bool,
677
676
  autoCapitalize: i().string,
@@ -715,7 +714,7 @@
715
714
  splunkTheme: i().object,
716
715
  value: i().string
717
716
  };
718
- var Te = {
717
+ var Ee = {
719
718
  appearance: "default",
720
719
  append: false,
721
720
  autoFocus: false,
@@ -729,15 +728,15 @@
729
728
  rowsMin: 2,
730
729
  tabIndex: 0
731
730
  };
732
- var Me = function e(t) {
731
+ var Te = function e(t) {
733
732
  var r = t ? t.getBoundingClientRect() : undefined;
734
733
  var n = r && Math.round(r.width);
735
734
  return n;
736
735
  };
737
- /** Note: TextArea places role and aria props onto the input. All other props are placed on the wrapper. */ var Pe = function(e) {
738
- we(r, e);
739
- var t = ke(r);
740
- xe(r, null, [ {
736
+ /** Note: TextArea places role and aria props onto the input. All other props are placed on the wrapper. */ var Me = function(e) {
737
+ xe(r, e);
738
+ var t = Ce(r);
739
+ ge(r, null, [ {
741
740
  key: "validateRows",
742
741
  // @docs-props-type TextAreaPropsBase
743
742
  value: function e(t) {
@@ -747,38 +746,38 @@
747
746
  } ]);
748
747
  function r(e) {
749
748
  var a;
750
- ye(this, r);
749
+ be(this, r);
751
750
  a = t.call(this, e);
752
- je(Ae(a), "controlledExternally", void 0);
753
- je(Ae(a), "input", null);
754
- je(Ae(a), "shadow", null);
755
- je(Ae(a), "startAdornment", null);
756
- je(Ae(a), "endAdornment", null);
757
- je(Ae(a), "getAdornmentWidth", (function() {
758
- var e = Me(a.startAdornment);
751
+ Ie(Se(a), "controlledExternally", void 0);
752
+ Ie(Se(a), "input", null);
753
+ Ie(Se(a), "shadow", null);
754
+ Ie(Se(a), "startAdornment", null);
755
+ Ie(Se(a), "endAdornment", null);
756
+ Ie(Se(a), "getAdornmentWidth", (function() {
757
+ var e = Te(a.startAdornment);
759
758
  if (a.state.startAdornmentWidth !== e) {
760
759
  a.setState({
761
760
  startAdornmentWidth: e
762
761
  });
763
762
  }
764
- var t = Me(a.endAdornment);
763
+ var t = Te(a.endAdornment);
765
764
  if (a.state.endAdornmentWidth !== t) {
766
765
  a.setState({
767
766
  endAdornmentWidth: t
768
767
  });
769
768
  }
770
769
  }));
771
- je(Ae(a), "handleResize", (function() {
770
+ Ie(Se(a), "handleResize", (function() {
772
771
  a.syncHeightWithShadow();
773
772
  }));
774
- je(Ae(a), "handleInputMount", (function(e) {
773
+ Ie(Se(a), "handleInputMount", (function(e) {
775
774
  a.input = e;
776
- ie(a.props.inputRef, e);
775
+ ae(a.props.inputRef, e);
777
776
  }));
778
- je(Ae(a), "handleShadowMount", (function(e) {
777
+ Ie(Se(a), "handleShadowMount", (function(e) {
779
778
  a.shadow = e;
780
779
  }));
781
- je(Ae(a), "handleInputChange", (function(e) {
780
+ Ie(Se(a), "handleInputChange", (function(e) {
782
781
  var t, r;
783
782
  var n = e.target.value;
784
783
  var i = a.props.name;
@@ -792,19 +791,19 @@
792
791
  name: i
793
792
  });
794
793
  }));
795
- je(Ae(a), "handleInputKeyDown", (function(e) {
794
+ Ie(Se(a), "handleInputKeyDown", (function(e) {
796
795
  var t, r;
797
796
  (t = (r = a.props).onKeyDown) === null || t === void 0 ? void 0 : t.call(r, e);
798
797
  }));
799
- je(Ae(a), "handleInputSelect", (function(e) {
798
+ Ie(Se(a), "handleInputSelect", (function(e) {
800
799
  var t, r;
801
800
  (t = (r = a.props).onSelect) === null || t === void 0 ? void 0 : t.call(r, e);
802
801
  }));
803
- je(Ae(a), "handleInputClick", (function(e) {
802
+ Ie(Se(a), "handleInputClick", (function(e) {
804
803
  var t, r;
805
804
  (t = (r = a.props).onInputClick) === null || t === void 0 ? void 0 : t.call(r, e);
806
805
  }));
807
- je(Ae(a), "handleInputFocus", (function(e) {
806
+ Ie(Se(a), "handleInputFocus", (function(e) {
808
807
  var t, r;
809
808
  var n = e.target.value;
810
809
  var i = a.props.name;
@@ -813,7 +812,7 @@
813
812
  name: i
814
813
  });
815
814
  }));
816
- je(Ae(a), "handleInputBlur", (function(e) {
815
+ Ie(Se(a), "handleInputBlur", (function(e) {
817
816
  var t, r;
818
817
  var n = e.target.value;
819
818
  var i = a.props.name;
@@ -822,7 +821,7 @@
822
821
  name: i
823
822
  });
824
823
  }));
825
- je(Ae(a), "handleClear", (function(e) {
824
+ Ie(Se(a), "handleClear", (function(e) {
826
825
  var t, r;
827
826
  e.preventDefault();
828
827
  var n = "";
@@ -838,8 +837,8 @@
838
837
  name: i
839
838
  });
840
839
  }));
841
- je(Ae(a), "syncHeightWithShadow", (function() {
842
- var e = ae({
840
+ Ie(Se(a), "syncHeightWithShadow", (function() {
841
+ var e = ne({
843
842
  height: a.state.height,
844
843
  rowsMax: a.props.rowsMax,
845
844
  rowsMin: a.props.rowsMin,
@@ -851,7 +850,7 @@
851
850
  });
852
851
  }
853
852
  }));
854
- je(Ae(a), "renderAdornment", (function(e, t) {
853
+ Ie(Se(a), "renderAdornment", (function(e, t) {
855
854
  var r = a.props.disabled;
856
855
  var i = t === "start" ? function(e) {
857
856
  a.startAdornment = e;
@@ -864,37 +863,37 @@
864
863
  $position: t
865
864
  };
866
865
 
867
- return n().createElement(J, o, e);
866
+ return n().createElement(X, o, e);
868
867
  }));
869
- je(Ae(a), "renderEndAdornment", (function() {
868
+ Ie(Se(a), "renderEndAdornment", (function() {
870
869
  var e;
871
870
  var t = a.props, r = t.appearance, i = t.endAdornment, o = t.disabled, l = t.canClear, s = t.splunkTheme;
872
- var c = s.isPrisma, p = s.isEnterprise;
871
+ var c = s.isPrisma, d = s.isEnterprise;
873
872
  if (i) {
874
873
  return a.renderAdornment(i, "end");
875
874
  }
876
- var d = a.context;
877
- var u = (e = d.labelAttrs) === null || e === void 0 ? void 0 : e.text;
875
+ var p = a.context;
876
+ var u = (e = p.labelAttrs) === null || e === void 0 ? void 0 : e.text;
878
877
  var f = u ? (0, S._)("Clear ".concat(u, " text field")) : (0, S._)("Clear text field");
879
- if (p && r === "search") {
878
+ if (d && r === "search") {
880
879
  /* Both icons are rendered, and StyledBox toggles visibility based on :focus-within */
881
- return a.renderAdornment( n().createElement(n().Fragment, null, n().createElement(Y, {
880
+ return a.renderAdornment( n().createElement(n().Fragment, null, n().createElement(Q, {
882
881
  "aria-label": f,
883
882
  onClick: a.handleClear
884
883
  }), n().createElement(W, {
885
884
  $disabled: o
886
- }, n().createElement(ne, null))), "end");
885
+ }, n().createElement(re, null))), "end");
887
886
  }
888
887
  var h = !!a.getDisplayValue();
889
888
  if (h && (c && r === "search" || l)) {
890
- return a.renderAdornment( n().createElement(n().Fragment, null, !o && n().createElement(Y, {
889
+ return a.renderAdornment( n().createElement(n().Fragment, null, !o && n().createElement(Q, {
891
890
  "aria-label": f,
892
891
  onClick: a.handleClear
893
892
  })), "end");
894
893
  }
895
894
  return undefined;
896
895
  }));
897
- je(Ae(a), "renderStartAdornment", (function() {
896
+ Ie(Se(a), "renderStartAdornment", (function() {
898
897
  var e = a.props, t = e.appearance, r = e.startAdornment, i = e.splunkTheme, o = e.disabled;
899
898
  var l = i.isPrisma;
900
899
  if (r) {
@@ -903,11 +902,11 @@
903
902
  if (l && t === "search") {
904
903
  return a.renderAdornment( n().createElement(W, {
905
904
  $disabled: o
906
- }, n().createElement(ne, null)), "start");
905
+ }, n().createElement(re, null)), "start");
907
906
  }
908
907
  return undefined;
909
908
  }));
910
- je(Ae(a), "getDisplayValue", (function() {
909
+ Ie(Se(a), "getDisplayValue", (function() {
911
910
  var e = a.isControlled() ? a.props.value : a.state.value;
912
911
  return e;
913
912
  }));
@@ -922,7 +921,7 @@
922
921
  a.handleResize = g()(a.handleResize, 100);
923
922
  return a;
924
923
  }
925
- xe(r, [ {
924
+ ge(r, [ {
926
925
  key: "componentDidMount",
927
926
  value: function e() {
928
927
  l()(this.syncHeightWithShadow);
@@ -966,15 +965,15 @@
966
965
  }, {
967
966
  key: "render",
968
967
  value: function e() {
969
- var t = this.props, r = t.append, a = t.autoCapitalize, i = t.autoComplete, o = t.autoCorrect, l = t.autoFocus, s = t.children, c = t.className, p = t.classNamePrivate, u = t.disabled, h = t.describedBy, m = t.elementRef, y = t.error, g = t.inline, x = t.inputClassName, w = t.inputId, k = t.labelledBy, S = t.maxLength, O = t.name, I = t.placeholder, j = t.prepend, E = t.required, T = t.rowsMin, M = t.spellCheck, P = t.tabIndex, $ = t.title, _ = me(t, [ "append", "autoCapitalize", "autoComplete", "autoCorrect", "autoFocus", "children", "className", "classNamePrivate", "disabled", "describedBy", "elementRef", "error", "inline", "inputClassName", "inputId", "labelledBy", "maxLength", "name", "placeholder", "prepend", "required", "rowsMin", "spellCheck", "tabIndex", "title" ]);
970
- var D = ve(ve({}, b()(_, (function(e, t) {
968
+ var t = this.props, r = t.append, a = t.autoCapitalize, i = t.autoComplete, o = t.autoCorrect, l = t.autoFocus, s = t.children, c = t.className, d = t.classNamePrivate, u = t.disabled, h = t.describedBy, m = t.elementRef, y = t.error, g = t.inline, x = t.inputClassName, w = t.inputId, k = t.labelledBy, S = t.maxLength, O = t.name, I = t.placeholder, j = t.prepend, E = t.required, T = t.rowsMin, M = t.spellCheck, P = t.tabIndex, $ = t.title, _ = ve(t, [ "append", "autoCapitalize", "autoComplete", "autoCorrect", "autoFocus", "children", "className", "classNamePrivate", "disabled", "describedBy", "elementRef", "error", "inline", "inputClassName", "inputId", "labelledBy", "maxLength", "name", "placeholder", "prepend", "required", "rowsMin", "spellCheck", "tabIndex", "title" ]);
969
+ var D = he(he({}, b()(_, (function(e, t) {
971
970
  return t === "role" || t.indexOf("aria-") === 0;
972
971
  }))), {}, {
973
972
  "aria-describedby": h,
974
973
  "aria-labelledby": k,
975
974
  "aria-invalid": y || undefined
976
975
  });
977
- var q = v()(_, [ "inputRef", "onBlur", "onChange", "onFocus", "onKeyDown", "onSelect", "onInputClick" ].concat(se(d()(D))));
976
+ var q = v()(_, [ "inputRef", "onBlur", "onChange", "onFocus", "onKeyDown", "onSelect", "onInputClick" ].concat(le(p()(D))));
978
977
  var W = this.getDisplayValue();
979
978
  var N = {
980
979
  className: (0, A.toClassName)(c, x),
@@ -982,7 +981,7 @@
982
981
  $error: y,
983
982
  $prepend: j || undefined
984
983
  };
985
- var B = ve(ve({}, D), {}, {
984
+ var B = he(he({}, D), {}, {
986
985
  "data-test": "textbox",
987
986
  autoCapitalize: a,
988
987
  autoComplete: i,
@@ -1011,25 +1010,25 @@
1011
1010
  $error: y
1012
1011
  });
1013
1012
  var z = this.renderStartAdornment();
1014
- var F = this.renderEndAdornment();
1013
+ var K = this.renderEndAdornment();
1015
1014
  var L = !!z;
1016
- var G = !!F;
1015
+ var G = !!K;
1017
1016
 
1018
- return n().createElement(R, le({
1017
+ return n().createElement(R, oe({
1019
1018
  tabIndex: -1,
1020
- className: (0, A.toClassName)(c, p),
1019
+ className: (0, A.toClassName)(c, d),
1021
1020
  "data-test": "text-area",
1022
1021
  "data-test-value": W,
1023
1022
  elementRef: m,
1024
1023
  flex: true,
1025
1024
  inline: g
1026
- }, q), z, n().createElement(H, le({
1025
+ }, q), z, n().createElement(F, oe({
1027
1026
  $hasEndAdornment: G,
1028
1027
  $hasStartAdornment: L,
1029
1028
  disabled: u
1030
1029
  }, N), L && n().createElement(U, {
1031
1030
  $width: this.state.startAdornmentWidth
1032
- }), n().createElement(K, {
1031
+ }), n().createElement(V, {
1033
1032
  "aria-hidden": "true",
1034
1033
  onChange: f(),
1035
1034
  $startAdornmentWidth: this.state.startAdornmentWidth,
@@ -1038,7 +1037,7 @@
1038
1037
  rows: this.props.rowsMin,
1039
1038
  ref: this.handleShadowMount,
1040
1039
  value: I && !W ? I : W
1041
- }), n().createElement(V, le({
1040
+ }), n().createElement(H, oe({
1042
1041
  $rowsMin: T
1043
1042
  }, B, {
1044
1043
  onClick: this.handleInputClick
@@ -1048,20 +1047,20 @@
1048
1047
  listener: this.handleResize
1049
1048
  }), s, G && n().createElement(U, {
1050
1049
  $width: this.state.endAdornmentWidth
1051
- })), F);
1050
+ })), K);
1052
1051
  }
1053
1052
  } ]);
1054
1053
  return r;
1055
1054
  }(r.Component);
1056
- je(Pe, "propTypes", Ee);
1057
- je(Pe, "defaultProps", Te);
1058
- je(Pe, "componentType", "TextArea");
1059
- je(Pe, "contextType", x.ControlGroupContext);
1060
- var $e = (0, k.withSplunkTheme)(Pe);
1061
- var _e = $e;
1062
- _e.propTypes = Pe.propTypes;
1063
- _e.componentType = Pe.componentType;
1064
- /* harmony default export */ const De = _e;
1055
+ Ie(Me, "propTypes", je);
1056
+ Ie(Me, "defaultProps", Ee);
1057
+ Ie(Me, "componentType", "TextArea");
1058
+ Ie(Me, "contextType", x.ControlGroupContext);
1059
+ var Pe = (0, k.withSplunkTheme)(Me);
1060
+ var $e = Pe;
1061
+ $e.propTypes = Me.propTypes;
1062
+ $e.componentType = Me.componentType;
1063
+ /* harmony default export */ const _e = $e;
1065
1064
  // CONCATENATED MODULE: ./src/TextArea/index.ts
1066
1065
  module.exports = t;
1067
1066
  /******/})();