@splunk/react-ui 4.9.0 → 4.12.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 (143) hide show
  1. package/Accordion.js +4 -4
  2. package/Anchor.js +2 -2
  3. package/Animation.js +4 -4
  4. package/AnimationToggle.js +2 -2
  5. package/Box.js +2 -2
  6. package/Button.js +24 -48
  7. package/ButtonGroup.js +6 -27
  8. package/ButtonSimple.js +4 -4
  9. package/CHANGELOG.md +63 -6
  10. package/Calendar.js +39 -39
  11. package/Card.js +54 -68
  12. package/CardLayout.js +14 -35
  13. package/Chip.js +19 -19
  14. package/Clickable.js +28 -13
  15. package/CloseButton.js +15 -15
  16. package/Code.js +8 -5
  17. package/CollapsiblePanel.js +6 -6
  18. package/Color.js +21 -21
  19. package/ColumnLayout.js +7 -7
  20. package/ComboBox.js +19 -14
  21. package/Concertina.js +13 -13
  22. package/ControlGroup.js +28 -18
  23. package/Date.js +10 -10
  24. package/DefinitionList.js +2 -2
  25. package/Dropdown.js +6 -6
  26. package/EventListener.js +4 -4
  27. package/File.js +31 -31
  28. package/FormRows.js +11 -11
  29. package/Heading.js +2 -2
  30. package/Image.js +21 -21
  31. package/JSONTree.js +40 -22
  32. package/Layer.js +72 -22
  33. package/Link.js +9 -9
  34. package/List.js +2 -2
  35. package/Markdown.js +26 -29
  36. package/Menu.js +53 -53
  37. package/Message.js +33 -33
  38. package/MessageBar.js +46 -39
  39. package/Modal.js +8 -8
  40. package/ModalLayer.js +16 -7
  41. package/Monogram.js +27 -15
  42. package/Multiselect.js +101 -97
  43. package/Number.js +6 -6
  44. package/Paginator.js +46 -49
  45. package/Paragraph.js +2 -2
  46. package/Popover.js +18 -13
  47. package/Progress.js +8 -8
  48. package/RadioBar.js +145 -41
  49. package/RadioList.js +2 -2
  50. package/Resize.js +4 -4
  51. package/ResultsMenu.js +62 -41
  52. package/ScreenReaderContent.js +2 -2
  53. package/Scroll.js +6 -6
  54. package/ScrollContainerContext.js +2 -2
  55. package/Search.js +19 -18
  56. package/Select.js +81 -79
  57. package/SidePanel.js +4 -4
  58. package/Slider.js +8 -8
  59. package/SlidingPanels.js +16 -7
  60. package/StaticContent.js +2 -2
  61. package/StepBar.js +8 -8
  62. package/Switch.js +8 -8
  63. package/TabBar.js +15 -15
  64. package/TabLayout.js +4 -4
  65. package/Table.js +119 -92
  66. package/Text.js +121 -241
  67. package/TextArea.js +1444 -0
  68. package/Tooltip.js +17 -6
  69. package/TransitionOpen.js +20 -10
  70. package/Typography.js +225 -0
  71. package/WaitSpinner.js +4 -4
  72. package/cypress.json +1 -0
  73. package/package.json +21 -8
  74. package/stubs-splunkui.d.ts +13 -0
  75. package/test-runner-jest.config.js +38 -0
  76. package/types/src/Accordion/AccordionContext.d.ts +0 -1
  77. package/types/src/Button/Button.d.ts +0 -2
  78. package/types/src/ButtonGroup/ButtonGroupContext.d.ts +0 -1
  79. package/types/src/Card/Body.d.ts +6 -1
  80. package/types/src/Card/Card.d.ts +0 -2
  81. package/types/src/CardLayout/CardLayoutContext.d.ts +0 -1
  82. package/types/src/Clickable/Clickable.d.ts +5 -0
  83. package/types/src/ComboBox/ComboBox.d.ts +15 -5
  84. package/types/src/Concertina/ConcertinaContext.d.ts +0 -1
  85. package/types/src/ControlGroup/ControlGroup.d.ts +9 -2
  86. package/types/src/Date/Date.d.ts +3 -3
  87. package/types/src/File/FileContext.d.ts +0 -1
  88. package/types/src/FormRows/FormRows.d.ts +1 -1
  89. package/types/src/FormRows/FormRowsContext.d.ts +0 -1
  90. package/types/src/FormRows/Row.d.ts +1 -1
  91. package/types/src/JSONTree/JSONTree.d.ts +2 -2
  92. package/types/src/JSONTree/TreeNode.d.ts +1 -1
  93. package/types/src/JSONTree/docs/examples/WithShiftModifier.d.ts +1 -0
  94. package/types/src/Layer/LayerStack.d.ts +8 -2
  95. package/types/src/Markdown/Markdown.d.ts +2 -3
  96. package/types/src/Menu/MenuContext.d.ts +0 -1
  97. package/types/src/Modal/ModalContext.d.ts +0 -1
  98. package/types/src/ModalLayer/ModalLayer.d.ts +2 -0
  99. package/types/src/Monogram/Monogram.d.ts +2 -2
  100. package/types/src/Multiselect/Compact.d.ts +11 -4
  101. package/types/src/Multiselect/Multiselect.d.ts +14 -5
  102. package/types/src/Multiselect/Normal.d.ts +11 -4
  103. package/types/src/Number/Number.d.ts +3 -3
  104. package/types/src/Popover/Popover.d.ts +1 -0
  105. package/types/src/Popover/PopoverContext.d.ts +0 -1
  106. package/types/src/RadioBar/Option.d.ts +10 -2
  107. package/types/src/RadioBar/RadioBar.d.ts +4 -1
  108. package/types/src/RadioBar/RadioBarContext.d.ts +4 -2
  109. package/types/src/RadioList/RadioListContext.d.ts +0 -1
  110. package/types/src/ResultsMenu/ResultsMenu.d.ts +8 -2
  111. package/types/src/Search/Search.d.ts +4 -0
  112. package/types/src/Select/Select.d.ts +13 -4
  113. package/types/src/Select/SelectBase.d.ts +12 -4
  114. package/types/src/SidePanel/SidePanel.d.ts +2 -1
  115. package/types/src/Slider/Slider.d.ts +3 -3
  116. package/types/src/SlidingPanels/SlidingPanels.d.ts +2 -0
  117. package/types/src/StepBar/StepBarContext.d.ts +0 -1
  118. package/types/src/TabBar/TabBarContext.d.ts +0 -1
  119. package/types/src/Table/HeadCell.d.ts +7 -3
  120. package/types/src/Table/Table.d.ts +2 -3
  121. package/types/src/Table/TableContext.d.ts +5 -0
  122. package/types/src/Text/Text.d.ts +22 -12
  123. package/types/src/TextArea/TextArea.d.ts +190 -0
  124. package/types/src/TextArea/docs/examples/Basic.d.ts +2 -0
  125. package/types/src/TextArea/docs/examples/Disabled.d.ts +2 -0
  126. package/types/src/TextArea/docs/examples/Error.d.ts +2 -0
  127. package/types/src/TextArea/docs/examples/Inline.d.ts +2 -0
  128. package/types/src/TextArea/docs/examples/Uncontrolled.d.ts +2 -0
  129. package/types/src/TextArea/index.d.ts +2 -0
  130. package/types/src/{Text → TextArea}/syncHeightWithShadow.d.ts +1 -2
  131. package/types/src/Tooltip/Tooltip.d.ts +8 -5
  132. package/types/src/TransitionOpen/TransitionOpen.d.ts +3 -0
  133. package/types/src/TransitionOpen/index.d.ts +1 -0
  134. package/types/src/Typography/Typography.d.ts +78 -0
  135. package/types/src/Typography/docs/examples/Basic.d.ts +2 -0
  136. package/types/src/Typography/docs/examples/Variants.d.ts +2 -0
  137. package/types/src/Typography/index.d.ts +2 -0
  138. package/types/src/Typography/test/Typography.unit.d.ts +1 -0
  139. package/types/src/fixtures/FetchOptions.d.ts +82 -2
  140. package/usePrevious.js +2 -2
  141. package/FetchOptions.js +0 -359
  142. package/types/src/FetchOptions/FetchOptions.d.ts +0 -82
  143. package/types/src/FetchOptions/index.d.ts +0 -2
package/Text.js CHANGED
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 132);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 134);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -101,14 +101,14 @@ module.exports = require("prop-types");
101
101
 
102
102
  /***/ }),
103
103
 
104
- /***/ 111:
104
+ /***/ 108:
105
105
  /***/ (function(module, exports) {
106
106
 
107
- module.exports = require("@splunk/react-ui/ControlGroup");
107
+ module.exports = require("@splunk/react-ui/TextArea");
108
108
 
109
109
  /***/ }),
110
110
 
111
- /***/ 12:
111
+ /***/ 11:
112
112
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
113
113
 
114
114
  "use strict";
@@ -135,7 +135,7 @@ function updateReactRef(ref, current) {
135
135
 
136
136
  /***/ }),
137
137
 
138
- /***/ 132:
138
+ /***/ 134:
139
139
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
140
140
 
141
141
  "use strict";
@@ -157,11 +157,7 @@ var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_pr
157
157
  var external_lodash_ = __webpack_require__(4);
158
158
 
159
159
  // EXTERNAL MODULE: external "@splunk/ui-utils/style"
160
- var style_ = __webpack_require__(40);
161
-
162
- // EXTERNAL MODULE: external "@splunk/react-ui/EventListener"
163
- var EventListener_ = __webpack_require__(15);
164
- var EventListener_default = /*#__PURE__*/__webpack_require__.n(EventListener_);
160
+ var style_ = __webpack_require__(31);
165
161
 
166
162
  // EXTERNAL MODULE: external "@splunk/react-ui/ScreenReaderContent"
167
163
  var ScreenReaderContent_ = __webpack_require__(14);
@@ -171,94 +167,23 @@ var ScreenReaderContent_default = /*#__PURE__*/__webpack_require__.n(ScreenReade
171
167
  var themes_ = __webpack_require__(0);
172
168
 
173
169
  // EXTERNAL MODULE: external "@splunk/react-ui/ControlGroup"
174
- var ControlGroup_ = __webpack_require__(111);
170
+ var ControlGroup_ = __webpack_require__(78);
171
+
172
+ // EXTERNAL MODULE: external "@splunk/react-ui/TextArea"
173
+ var TextArea_ = __webpack_require__(108);
174
+ var TextArea_default = /*#__PURE__*/__webpack_require__.n(TextArea_);
175
175
 
176
176
  // EXTERNAL MODULE: external "@splunk/ui-utils/i18n"
177
177
  var i18n_ = __webpack_require__(5);
178
178
 
179
179
  // EXTERNAL MODULE: ./src/icons/Search.tsx
180
- var Search = __webpack_require__(44);
180
+ var Search = __webpack_require__(34);
181
181
 
182
182
  // EXTERNAL MODULE: ./src/icons/CrossMark.tsx
183
- var CrossMark = __webpack_require__(20);
184
-
185
- // CONCATENATED MODULE: ./src/Text/syncHeightWithShadow.ts
186
- // This file was adapted from [Call-Em-All's material-ui](https://github.com/mui-org/material-ui),
187
- // which is MIT-licensed:
188
- //
189
- // The MIT License (MIT)
190
- //
191
- // Copyright (c) 2014 Call-Em-All
192
- //
193
- // Permission is hereby granted, free of charge, to any person obtaining a copy
194
- // of this software and associated documentation files (the "Software"), to deal
195
- // in the Software without restriction, including without limitation the rights
196
- // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
197
- // copies of the Software, and to permit persons to whom the Software is
198
- // furnished to do so, subject to the following conditions:
199
- //
200
- // The above copyright notice and this permission notice shall be included in all
201
- // copies or substantial portions of the Software.
202
- //
203
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
204
- // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
205
- // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
206
- // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
207
- // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
208
- // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
209
- // SOFTWARE.
210
- //
211
- // End of MIT license text.
212
- function syncHeightWithShadow(_ref) {
213
- var height = _ref.height,
214
- multiline = _ref.multiline,
215
- rowsMax = _ref.rowsMax,
216
- rowsMin = _ref.rowsMin,
217
- shadow = _ref.shadow;
218
-
219
- if (multiline && shadow) {
220
- var style = window.getComputedStyle(shadow);
221
- var lineHeightValue = style.getPropertyValue('line-height'); // jsdom does not properly inherit/re-calculate the line-height property so we skip in these cases SUI-1943, SUI-2428
222
-
223
- if (lineHeightValue === 'inherit' || lineHeightValue === 'normal') {
224
- return false;
225
- }
226
-
227
- var lineHeight = parseInt(lineHeightValue, 10);
228
- var paddingTop = parseInt(style.getPropertyValue('padding-top'), 10);
229
- var paddingBottom = parseInt(style.getPropertyValue('padding-bottom'), 10);
230
- var borderTop = parseInt(style.getPropertyValue('border-top-width'), 10);
231
- var borderBottom = parseInt(style.getPropertyValue('border-bottom-width'), 10);
232
- var newHeight = shadow.scrollHeight + borderTop + borderBottom;
233
- /* eslint-disable no-restricted-globals */
234
- // Leverage the global `isNaN` here for IE support, rather than Number.isNaN.
235
- // We know newHeight is numeric because we parseInt() above, so `isNaN` should be reliable.
236
-
237
- if (newHeight === undefined || isNaN(newHeight)) {
238
- return false;
239
- }
240
- /* eslint-enable no-restricted-globals */
241
-
183
+ var CrossMark = __webpack_require__(19);
242
184
 
243
- if (rowsMax >= rowsMin) {
244
- var maxHeight = rowsMax * lineHeight + paddingTop + paddingBottom + borderTop + borderBottom + 1; // need one extra.
245
-
246
- newHeight = Math.min(maxHeight, newHeight);
247
- }
248
-
249
- var minHeight = rowsMin * lineHeight + paddingTop + paddingBottom + borderTop + borderBottom + 1; // need one extra.
250
-
251
- newHeight = Math.max(minHeight, newHeight);
252
-
253
- if (height !== newHeight) {
254
- return newHeight;
255
- }
256
- }
257
-
258
- return false;
259
- }
260
185
  // EXTERNAL MODULE: ./src/utils/updateReactRef.ts
261
- var updateReactRef = __webpack_require__(12);
186
+ var updateReactRef = __webpack_require__(11);
262
187
 
263
188
  // EXTERNAL MODULE: external "@splunk/react-icons/SVG"
264
189
  var SVG_ = __webpack_require__(24);
@@ -383,7 +308,7 @@ var Box_ = __webpack_require__(8);
383
308
  var Box_default = /*#__PURE__*/__webpack_require__.n(Box_);
384
309
 
385
310
  // EXTERNAL MODULE: external "@splunk/react-ui/Button"
386
- var Button_ = __webpack_require__(17);
311
+ var Button_ = __webpack_require__(16);
387
312
  var Button_default = /*#__PURE__*/__webpack_require__.n(Button_);
388
313
 
389
314
  // CONCATENATED MODULE: ./src/Text/TextStyles.ts
@@ -421,7 +346,7 @@ var StyledClearButton = external_styled_components_default()(Button_default.a).w
421
346
  var StyledSearchIconWrapper = external_styled_components_default.a.span.withConfig({
422
347
  displayName: "TextStyles__StyledSearchIconWrapper",
423
348
  componentId: "eg7n6t-1"
424
- })(["", ";color:", ";pointer-events:none;padding:", ";&[disabled]{", ";}"], themes_["mixins"].reset('inline-block'), Object(themes_["pick"])({
349
+ })(["", ";color:", ";pointer-events:none;padding:", ";", ""], themes_["mixins"].reset('inline-block'), Object(themes_["pick"])({
425
350
  enterprise: {
426
351
  light: themes_["variables"].gray60,
427
352
  dark: themes_["variables"].white
@@ -430,9 +355,13 @@ var StyledSearchIconWrapper = external_styled_components_default.a.span.withConf
430
355
  }), Object(themes_["pick"])({
431
356
  comfortable: '0 8px',
432
357
  compact: '0 6px'
433
- }), Object(themes_["pick"])({
434
- prisma: Object(external_styled_components_["css"])(["color:", ";"], themes_["variables"].contentColorDisabled)
435
- }));
358
+ }), function (_ref) {
359
+ var $disabled = _ref.$disabled;
360
+ return $disabled && Object(external_styled_components_["css"])(["", ""], Object(themes_["pick"])({
361
+ enterprise: Object(external_styled_components_["css"])(["color:", ";"], themes_["variables"].textDisabledColor),
362
+ prisma: Object(external_styled_components_["css"])(["color:", ";"], themes_["variables"].contentColorDisabled)
363
+ }));
364
+ });
436
365
  var StyledBox = external_styled_components_default()(Box_default.a).withConfig({
437
366
  displayName: "TextStyles__StyledBox",
438
367
  componentId: "eg7n6t-2"
@@ -445,8 +374,8 @@ StyledSearchIconWrapper, Object(themes_["pick"])({
445
374
  enterprise: Object(external_styled_components_["css"])(["display:none;"])
446
375
  }),
447
376
  /* sc-sel */
448
- StyledClearButton, function (_ref) {
449
- var $isTimeInput = _ref.$isTimeInput;
377
+ StyledClearButton, function (_ref2) {
378
+ var $isTimeInput = _ref2.$isTimeInput;
450
379
  return $isTimeInput && Object(external_styled_components_["css"])(["@media screen and (min--moz-device-pixel-ratio:0){", "{display:none;}}"],
451
380
  /* sc-sel */
452
381
  StyledClearButton);
@@ -468,12 +397,12 @@ var StyledInputWrapper = external_styled_components_default.a.span.withConfig({
468
397
  prisma: themes_["variables"].transparent
469
398
  }), Object(themes_["pick"])({
470
399
  enterprise: '0px 10px',
471
- prisma: '0px 14px'
472
- }), function (_ref2) {
473
- var $hasEndAdornment = _ref2.$hasEndAdornment;
400
+ prisma: '0px 12px'
401
+ }), function (_ref3) {
402
+ var $hasEndAdornment = _ref3.$hasEndAdornment;
474
403
  return $hasEndAdornment && Object(external_styled_components_["css"])(["padding-right:0;"]);
475
- }, function (_ref3) {
476
- var $hasStartAdornment = _ref3.$hasStartAdornment;
404
+ }, function (_ref4) {
405
+ var $hasStartAdornment = _ref4.$hasStartAdornment;
477
406
  return $hasStartAdornment && Object(external_styled_components_["css"])(["padding-left:0;"]);
478
407
  }, Object(themes_["pick"])({
479
408
  enterprise: {
@@ -484,20 +413,23 @@ var StyledInputWrapper = external_styled_components_default.a.span.withConfig({
484
413
  }), Object(themes_["pick"])({
485
414
  enterprise: Object(external_styled_components_["css"])(["box-shadow:", ";color:", ";"], themes_["variables"].focusShadow, themes_["variables"].textColor),
486
415
  prisma: Object(external_styled_components_["css"])(["border-color:", ";color:", ";"], themes_["variables"].interactiveColorPrimary, themes_["variables"].contentColorActive)
487
- }), function (_ref4) {
488
- var $error = _ref4.$error;
489
- return $error && Object(external_styled_components_["css"])(["&,&:hover{border-color:", ";}"], Object(themes_["pick"])({
416
+ }), function (_ref5) {
417
+ var $error = _ref5.$error;
418
+ return $error && Object(external_styled_components_["css"])(["&,&:hover:not([disabled]){border-color:", ";}&:focus-within:not([disabled]){", "}"], Object(themes_["pick"])({
490
419
  enterprise: themes_["variables"].errorColor,
491
420
  prisma: themes_["variables"].accentColorNegative
421
+ }), Object(themes_["pick"])({
422
+ enterprise: Object(external_styled_components_["css"])(["box-shadow:", ";color:", ";"], themes_["variables"].focusShadow, themes_["variables"].textColor),
423
+ prisma: Object(external_styled_components_["css"])(["border-color:", ";color:", ";"], themes_["variables"].interactiveColorPrimary, themes_["variables"].contentColorActive)
492
424
  }));
493
- }, function (_ref5) {
494
- var $append = _ref5.$append;
495
- return $append && Object(external_styled_components_["css"])(["margin-right:-1px;border-top-right-radius:0;border-bottom-right-radius:0;border-right:none;"]);
496
425
  }, function (_ref6) {
497
- var $prepend = _ref6.$prepend;
498
- return $prepend && Object(external_styled_components_["css"])(["border-top-left-radius:0;border-bottom-left-radius:0;"]);
426
+ var $append = _ref6.$append;
427
+ return $append && Object(external_styled_components_["css"])(["margin-right:-1px;border-top-right-radius:0;border-bottom-right-radius:0;border-right:none;"]);
499
428
  }, function (_ref7) {
500
- var disabled = _ref7.disabled;
429
+ var $prepend = _ref7.$prepend;
430
+ return $prepend && Object(external_styled_components_["css"])(["border-top-left-radius:0;border-bottom-left-radius:0;"]);
431
+ }, function (_ref8) {
432
+ var disabled = _ref8.disabled;
501
433
  return disabled && Object(external_styled_components_["css"])(["", " box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);"], Object(themes_["pick"])({
502
434
  enterprise: {
503
435
  light: Object(external_styled_components_["css"])(["background-color:", ";border-color:", ";"], themes_["variables"].gray96, themes_["variables"].gray92),
@@ -505,8 +437,8 @@ var StyledInputWrapper = external_styled_components_default.a.span.withConfig({
505
437
  },
506
438
  prisma: Object(external_styled_components_["css"])(["border-color:", ";"], themes_["variables"].interactiveColorBorderDisabled)
507
439
  }));
508
- }, function (_ref8) {
509
- var $multiline = _ref8.$multiline;
440
+ }, function (_ref9) {
441
+ var $multiline = _ref9.$multiline;
510
442
  return $multiline && Object(themes_["pick"])({
511
443
  enterprise: Object(external_styled_components_["css"])(["padding-right:0;"])
512
444
  });
@@ -528,8 +460,8 @@ var StyledInput = external_styled_components_default.a.input.withConfig({
528
460
  }), Object(themes_["pick"])({
529
461
  enterprise: themes_["variables"].spacingHalf,
530
462
  prisma: '14px'
531
- }), themes_["variables"].contentColorMuted, function (_ref9) {
532
- var $error = _ref9.$error;
463
+ }), themes_["variables"].contentColorMuted, function (_ref10) {
464
+ var $error = _ref10.$error;
533
465
  return $error && Object(external_styled_components_["css"])(["&,&:hover{color:", ";}"], Object(themes_["pick"])({
534
466
  enterprise: {
535
467
  light: themes_["variables"].errorColorD10,
@@ -537,8 +469,8 @@ var StyledInput = external_styled_components_default.a.input.withConfig({
537
469
  },
538
470
  prisma: themes_["variables"].contentColorActive
539
471
  }));
540
- }, function (_ref10) {
541
- var disabled = _ref10.disabled;
472
+ }, function (_ref11) {
473
+ var disabled = _ref11.disabled;
542
474
  return disabled && disabledStyles;
543
475
  }, Object(themes_["pick"])({
544
476
  enterprise: {
@@ -575,9 +507,9 @@ var StyledPlaceholder = external_styled_components_default.a.span.withConfig({
575
507
  }), themes_["variables"].lineHeight, Object(themes_["pick"])({
576
508
  enterprise: '10px',
577
509
  prisma: '14px'
578
- }), function (_ref11) {
579
- var $hasStartAdornment = _ref11.$hasStartAdornment,
580
- $startAdornmentWidth = _ref11.$startAdornmentWidth;
510
+ }), function (_ref12) {
511
+ var $hasStartAdornment = _ref12.$hasStartAdornment,
512
+ $startAdornmentWidth = _ref12.$startAdornmentWidth;
581
513
  return $hasStartAdornment && ($startAdornmentWidth ? Object(external_styled_components_["css"])(["margin-left:", "px;"], $startAdornmentWidth) : Object(external_styled_components_["css"])(["margin-left:", ";"], Object(themes_["pick"])({
582
514
  enterprise: {
583
515
  comfortable: '30px',
@@ -588,9 +520,9 @@ var StyledPlaceholder = external_styled_components_default.a.span.withConfig({
588
520
  compact: '30px'
589
521
  }
590
522
  })));
591
- }, function (_ref12) {
592
- var $hasEndAdornment = _ref12.$hasEndAdornment,
593
- $endAdornmentWidth = _ref12.$endAdornmentWidth;
523
+ }, function (_ref13) {
524
+ var $hasEndAdornment = _ref13.$hasEndAdornment,
525
+ $endAdornmentWidth = _ref13.$endAdornmentWidth;
594
526
  return $hasEndAdornment && ($endAdornmentWidth // calc(100% - padding - adorment width)
595
527
  ? Object(external_styled_components_["css"])(["max-width:calc( 100% - ", " - ", "px );"], Object(themes_["pick"])({
596
528
  enterprise: '10px',
@@ -608,10 +540,10 @@ var StyledPlaceholder = external_styled_components_default.a.span.withConfig({
608
540
  compact: '30px'
609
541
  }
610
542
  })));
611
- }, function (_ref13) {
612
- var $hasBothAdornment = _ref13.$hasBothAdornment,
613
- $endAdornmentWidth = _ref13.$endAdornmentWidth,
614
- $startAdornmentWidth = _ref13.$startAdornmentWidth;
543
+ }, function (_ref14) {
544
+ var $hasBothAdornment = _ref14.$hasBothAdornment,
545
+ $endAdornmentWidth = _ref14.$endAdornmentWidth,
546
+ $startAdornmentWidth = _ref14.$startAdornmentWidth;
615
547
  return $hasBothAdornment && Object(external_styled_components_["css"])(["max-width:calc(100% - ", "px - ", "px);"], $startAdornmentWidth, $endAdornmentWidth);
616
548
  });
617
549
  var adornmentHolder = Object(external_styled_components_["css"])(["display:inline-flex;align-items:center;justify-content:center;height:", ";pointer-events:none;"], Object(themes_["pick"])({
@@ -627,8 +559,8 @@ var adornmentHolder = Object(external_styled_components_["css"])(["display:inlin
627
559
  var StyledStartAdornmentHolder = external_styled_components_default.a.div.withConfig({
628
560
  displayName: "TextStyles__StyledStartAdornmentHolder",
629
561
  componentId: "eg7n6t-7"
630
- })(["", " ", ";"], adornmentHolder, function (_ref14) {
631
- var $width = _ref14.$width;
562
+ })(["", " ", ";"], adornmentHolder, function (_ref15) {
563
+ var $width = _ref15.$width;
632
564
  return $width ? Object(external_styled_components_["css"])(["min-width:", "px;"], $width) : Object(external_styled_components_["css"])(["min-width:", ";"], Object(themes_["pick"])({
633
565
  enterprise: {
634
566
  comfortable: '30px',
@@ -643,8 +575,8 @@ var StyledStartAdornmentHolder = external_styled_components_default.a.div.withCo
643
575
  var StyledEndAdornmentHolder = external_styled_components_default.a.div.withConfig({
644
576
  displayName: "TextStyles__StyledEndAdornmentHolder",
645
577
  componentId: "eg7n6t-8"
646
- })(["", " ", ";"], adornmentHolder, function (_ref15) {
647
- var $width = _ref15.$width;
578
+ })(["", " ", ";"], adornmentHolder, function (_ref16) {
579
+ var $width = _ref16.$width;
648
580
  return $width ? Object(external_styled_components_["css"])(["min-width:", "px;"], $width) : Object(external_styled_components_["css"])(["min-width:", ";"], Object(themes_["pick"])({
649
581
  enterprise: {
650
582
  comfortable: '30px',
@@ -668,11 +600,11 @@ var StyledAdornment = external_styled_components_default.a.div.withConfig({
668
600
  comfortable: '38px',
669
601
  compact: '30px'
670
602
  }
671
- }), function (_ref16) {
672
- var $position = _ref16.$position;
603
+ }), function (_ref17) {
604
+ var $position = _ref17.$position;
673
605
  return $position === 'start' ? Object(external_styled_components_["css"])(["top:1px;left:1px;"]) : Object(external_styled_components_["css"])(["top:1px;right:1px;"]);
674
- }, function (_ref17) {
675
- var disabled = _ref17.disabled;
606
+ }, function (_ref18) {
607
+ var disabled = _ref18.disabled;
676
608
  return disabled && disabledStyles;
677
609
  }, Object(themes_["pick"])({
678
610
  enterprise: Object(external_styled_components_["css"])(["margin-left:-1px;margin-right:-1px;"])
@@ -740,7 +672,6 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
740
672
 
741
673
 
742
674
 
743
-
744
675
  /** @public */
745
676
 
746
677
  var propTypes = {
@@ -838,8 +769,6 @@ var Text_Text = /*#__PURE__*/function (_Component) {
838
769
 
839
770
  _defineProperty(_assertThisInitialized(_this), "input", null);
840
771
 
841
- _defineProperty(_assertThisInitialized(_this), "shadow", null);
842
-
843
772
  _defineProperty(_assertThisInitialized(_this), "startAdornment", null);
844
773
 
845
774
  _defineProperty(_assertThisInitialized(_this), "endAdornment", null);
@@ -864,10 +793,6 @@ var Text_Text = /*#__PURE__*/function (_Component) {
864
793
  }
865
794
  });
866
795
 
867
- _defineProperty(_assertThisInitialized(_this), "handleResize", function () {
868
- _this.syncHeightWithShadow();
869
- });
870
-
871
796
  _defineProperty(_assertThisInitialized(_this), "handleInputMount", function (el) {
872
797
  _this.input = el;
873
798
  Object(updateReactRef["a" /* updateReactRef */])(_this.props.inputRef, el);
@@ -948,22 +873,6 @@ var Text_Text = /*#__PURE__*/function (_Component) {
948
873
  });
949
874
  });
950
875
 
951
- _defineProperty(_assertThisInitialized(_this), "syncHeightWithShadow", function () {
952
- var newHeight = syncHeightWithShadow({
953
- height: _this.state.height,
954
- multiline: _this.props.multiline,
955
- rowsMax: _this.props.rowsMax,
956
- rowsMin: _this.props.rowsMin,
957
- shadow: _this.shadow
958
- });
959
-
960
- if (newHeight !== false) {
961
- _this.setState({
962
- height: newHeight
963
- });
964
- }
965
- });
966
-
967
876
  _defineProperty(_assertThisInitialized(_this), "renderEndAdornment", function () {
968
877
  var _controlGroupContext$;
969
878
 
@@ -1004,7 +913,7 @@ var Text_Text = /*#__PURE__*/function (_Component) {
1004
913
  var clearButtonText = controlGroupLabel ? Object(i18n_["_"])("Clear ".concat(controlGroupLabel, " text field")) : Object(i18n_["_"])('Clear text field');
1005
914
 
1006
915
  if (!isPrisma && appearance === 'search') {
1007
- return /*#__PURE__*/external_react_default.a.createElement(StyledAdornment, adornmentProps, /*#__PURE__*/external_react_default.a.createElement(StyledClearButton, {
916
+ return /*#__PURE__*/external_react_default.a.createElement(StyledAdornment, adornmentProps, !disabled && /*#__PURE__*/external_react_default.a.createElement(StyledClearButton, {
1008
917
  appearance: isPrisma ? 'secondary' : 'pill',
1009
918
  "data-test": "clear",
1010
919
  inline: false,
@@ -1021,8 +930,10 @@ var Text_Text = /*#__PURE__*/function (_Component) {
1021
930
  })));
1022
931
  }
1023
932
 
1024
- if (isPrisma && appearance === 'search' || canClear) {
1025
- return /*#__PURE__*/external_react_default.a.createElement(StyledAdornment, adornmentProps, /*#__PURE__*/external_react_default.a.createElement(StyledClearButton, {
933
+ var displayValue = _this.getDisplayValue();
934
+
935
+ if (!!displayValue && (isPrisma && appearance === 'search' || canClear)) {
936
+ return /*#__PURE__*/external_react_default.a.createElement(StyledAdornment, adornmentProps, !disabled && /*#__PURE__*/external_react_default.a.createElement(StyledClearButton, {
1026
937
  "data-test": "clear",
1027
938
  appearance: isPrisma ? 'secondary' : 'pill',
1028
939
  onClick: _this.handleClear,
@@ -1069,6 +980,11 @@ var Text_Text = /*#__PURE__*/function (_Component) {
1069
980
  return undefined;
1070
981
  });
1071
982
 
983
+ _defineProperty(_assertThisInitialized(_this), "getDisplayValue", function () {
984
+ var displayValue = _this.isControlled() ? _this.props.value : _this.state.value;
985
+ return displayValue;
986
+ });
987
+
1072
988
  _this.controlledExternally = Object(external_lodash_["has"])(props, 'value');
1073
989
  _this.state = {
1074
990
  value: props.defaultValue || '',
@@ -1084,25 +1000,20 @@ var Text_Text = /*#__PURE__*/function (_Component) {
1084
1000
  console.warn("The 'Text' prop 'useSyntheticPlaceholder' has been marked for deprecation.");
1085
1001
  }
1086
1002
 
1003
+ if (false) {}
1004
+
1087
1005
  Text.validateRows(props);
1088
- _this.handleResize = Object(external_lodash_["throttle"])(_this.handleResize, 100);
1089
1006
  return _this;
1090
1007
  }
1091
1008
 
1092
1009
  _createClass(Text, [{
1093
1010
  key: "componentDidMount",
1094
1011
  value: function componentDidMount() {
1095
- Object(external_lodash_["defer"])(this.syncHeightWithShadow); // wait for styles to load
1096
-
1097
1012
  this.getAdornmentWidth();
1098
1013
  }
1099
1014
  }, {
1100
1015
  key: "componentDidUpdate",
1101
1016
  value: function componentDidUpdate(prevProps) {
1102
- if (this.props.multiline) {
1103
- this.syncHeightWithShadow();
1104
- }
1105
-
1106
1017
  if (false) {}
1107
1018
 
1108
1019
  if (false) {}
@@ -1143,8 +1054,6 @@ var Text_Text = /*#__PURE__*/function (_Component) {
1143
1054
  }, {
1144
1055
  key: "render",
1145
1056
  value: function render() {
1146
- var _this2 = this;
1147
-
1148
1057
  var _this$props10 = this.props,
1149
1058
  append = _this$props10.append,
1150
1059
  autoCapitalize = _this$props10.autoCapitalize,
@@ -1181,12 +1090,11 @@ var Text_Text = /*#__PURE__*/function (_Component) {
1181
1090
  })), {}, {
1182
1091
  'aria-describedby': describedBy,
1183
1092
  'aria-labelledby': labelledBy,
1184
- 'aria-invalid': error || undefined,
1185
- 'aria-multiline': multiline
1093
+ 'aria-invalid': error || undefined
1186
1094
  });
1187
1095
 
1188
1096
  var boxProps = Object(external_lodash_["omit"])(otherProps, ['inputRef', 'onBlur', 'onChange', 'onFocus', 'onKeyDown', 'onSelect', 'onInputClick', 'rowsMax', 'rowsMin'].concat(_toConsumableArray(Object(external_lodash_["keys"])(ariaProps))));
1189
- var displayValue = this.isControlled() ? value : this.state.value;
1097
+ var displayValue = this.getDisplayValue();
1190
1098
  var displayProps = {
1191
1099
  className: Object(style_["toClassName"])(className, inputClassName),
1192
1100
  $append: append || undefined,
@@ -1220,7 +1128,7 @@ var Text_Text = /*#__PURE__*/function (_Component) {
1220
1128
  },
1221
1129
  title: title,
1222
1130
  tabIndex: tabIndex,
1223
- type: multiline ? null : computedType,
1131
+ type: computedType,
1224
1132
  value: displayValue,
1225
1133
  $error: error
1226
1134
  });
@@ -1232,6 +1140,11 @@ var Text_Text = /*#__PURE__*/function (_Component) {
1232
1140
  var isTimeInput = type === 'time';
1233
1141
  var hasEndAdornment = !!this.renderEndAdornment();
1234
1142
  var hasStartAdornment = !!this.renderStartAdornment();
1143
+
1144
+ if (multiline) {
1145
+ return /*#__PURE__*/external_react_default.a.createElement(TextArea_default.a, this.props);
1146
+ }
1147
+
1235
1148
  return /*#__PURE__*/external_react_default.a.createElement(StyledBox, Text_extends({
1236
1149
  tabIndex: -1,
1237
1150
  $isTimeInput: isTimeInput,
@@ -1244,53 +1157,20 @@ var Text_Text = /*#__PURE__*/function (_Component) {
1244
1157
  }, boxProps), this.renderStartAdornment(), /*#__PURE__*/external_react_default.a.createElement(StyledInputWrapper, Text_extends({
1245
1158
  $hasEndAdornment: hasEndAdornment,
1246
1159
  $hasStartAdornment: hasStartAdornment,
1247
- $multiline: multiline,
1248
1160
  disabled: disabled
1249
1161
  }, displayProps), hasStartAdornment && /*#__PURE__*/external_react_default.a.createElement(StyledStartAdornmentHolder, {
1250
1162
  $width: this.state.startAdornmentWidth
1251
- }), !disabled && multiline && /*#__PURE__*/external_react_default.a.createElement(StyledInput, {
1252
- as: "textarea",
1253
- "aria-hidden": "true",
1254
- onChange: external_lodash_["noop"],
1255
- onClick: this.handleInputClick,
1256
- style: {
1257
- width: '100%',
1258
- position: 'absolute',
1259
- overflow: 'hidden',
1260
- left: -10000,
1261
- top: -10000
1262
- },
1263
- tabIndex: -1,
1264
- ref: function ref(el) {
1265
- _this2.shadow = el;
1266
- },
1267
- value: displayValue
1268
1163
  }), disabled ? /*#__PURE__*/external_react_default.a.createElement(StyledInput, Text_extends({
1269
- as: multiline ? 'textarea' : undefined,
1270
1164
  className: Object(style_["toClassName"])(className, classNamePrivate),
1271
- "data-multiline": multiline || null,
1272
1165
  "data-test": "textbox",
1273
1166
  disabled: true,
1274
1167
  readOnly: true,
1275
- style: multiline ? {
1276
- height: this.state.height
1277
- } : undefined // @ts-expect-error - accept: type only exists on input (see "as" prop)
1278
- ,
1279
- type: multiline ? undefined : computedType,
1168
+ type: computedType,
1280
1169
  value: displayValue,
1281
- placeholder: placeholder && !useSyntheticPlaceholder ? placeholder : undefined,
1282
- ref: multiline ? function (el) {
1283
- _this2.shadow = el;
1284
- } : undefined
1285
- }, ariaProps)) : /*#__PURE__*/external_react_default.a.createElement(StyledInput, Text_extends({
1286
- as: multiline ? 'textarea' : undefined
1287
- }, inputProps, {
1170
+ placeholder: placeholder && !useSyntheticPlaceholder ? placeholder : undefined
1171
+ }, ariaProps)) : /*#__PURE__*/external_react_default.a.createElement(StyledInput, Text_extends({}, inputProps, {
1288
1172
  onClick: this.handleInputClick
1289
- })), !disabled && multiline && /*#__PURE__*/external_react_default.a.createElement(EventListener_default.a, {
1290
- target: window,
1291
- eventType: "resize",
1292
- listener: this.handleResize
1293
- }), haveSyntheticPlaceholder && /*#__PURE__*/external_react_default.a.createElement(ScreenReaderContent_default.a, null, placeholder), haveSyntheticPlaceholder && /*#__PURE__*/external_react_default.a.createElement(StyledPlaceholder, {
1173
+ })), haveSyntheticPlaceholder && /*#__PURE__*/external_react_default.a.createElement(ScreenReaderContent_default.a, null, placeholder), haveSyntheticPlaceholder && /*#__PURE__*/external_react_default.a.createElement(StyledPlaceholder, {
1294
1174
  $endAdornmentWidth: this.state.endAdornmentWidth,
1295
1175
  $hasBothAdornment: hasStartAdornment && hasEndAdornment // used to calculate the max-width
1296
1176
  ,
@@ -1334,35 +1214,21 @@ module.exports = require("@splunk/react-ui/ScreenReaderContent");
1334
1214
 
1335
1215
  /***/ }),
1336
1216
 
1337
- /***/ 15:
1338
- /***/ (function(module, exports) {
1339
-
1340
- module.exports = require("@splunk/react-ui/EventListener");
1341
-
1342
- /***/ }),
1343
-
1344
- /***/ 17:
1217
+ /***/ 16:
1345
1218
  /***/ (function(module, exports) {
1346
1219
 
1347
1220
  module.exports = require("@splunk/react-ui/Button");
1348
1221
 
1349
1222
  /***/ }),
1350
1223
 
1351
- /***/ 2:
1352
- /***/ (function(module, exports) {
1353
-
1354
- module.exports = require("react");
1355
-
1356
- /***/ }),
1357
-
1358
- /***/ 20:
1224
+ /***/ 19:
1359
1225
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1360
1226
 
1361
1227
  "use strict";
1362
1228
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return CrossMark; });
1363
1229
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
1364
1230
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1365
- /* harmony import */ var _splunk_react_icons_Close__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22);
1231
+ /* harmony import */ var _splunk_react_icons_Close__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(21);
1366
1232
  /* harmony import */ var _splunk_react_icons_Close__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_react_icons_Close__WEBPACK_IMPORTED_MODULE_1__);
1367
1233
  /* harmony import */ var _ThemedIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
1368
1234
  /* harmony import */ var _SVG__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6);
@@ -1405,49 +1271,49 @@ function CrossMark(props) {
1405
1271
 
1406
1272
  /***/ }),
1407
1273
 
1408
- /***/ 22:
1274
+ /***/ 2:
1409
1275
  /***/ (function(module, exports) {
1410
1276
 
1411
- module.exports = require("@splunk/react-icons/Close");
1277
+ module.exports = require("react");
1412
1278
 
1413
1279
  /***/ }),
1414
1280
 
1415
- /***/ 24:
1281
+ /***/ 21:
1416
1282
  /***/ (function(module, exports) {
1417
1283
 
1418
- module.exports = require("@splunk/react-icons/SVG");
1284
+ module.exports = require("@splunk/react-icons/Close");
1419
1285
 
1420
1286
  /***/ }),
1421
1287
 
1422
- /***/ 3:
1288
+ /***/ 24:
1423
1289
  /***/ (function(module, exports) {
1424
1290
 
1425
- module.exports = require("styled-components");
1291
+ module.exports = require("@splunk/react-icons/SVG");
1426
1292
 
1427
1293
  /***/ }),
1428
1294
 
1429
- /***/ 4:
1295
+ /***/ 3:
1430
1296
  /***/ (function(module, exports) {
1431
1297
 
1432
- module.exports = require("lodash");
1298
+ module.exports = require("styled-components");
1433
1299
 
1434
1300
  /***/ }),
1435
1301
 
1436
- /***/ 40:
1302
+ /***/ 31:
1437
1303
  /***/ (function(module, exports) {
1438
1304
 
1439
1305
  module.exports = require("@splunk/ui-utils/style");
1440
1306
 
1441
1307
  /***/ }),
1442
1308
 
1443
- /***/ 44:
1309
+ /***/ 34:
1444
1310
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1445
1311
 
1446
1312
  "use strict";
1447
1313
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Search; });
1448
1314
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
1449
1315
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1450
- /* harmony import */ var _splunk_react_icons_Search__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(51);
1316
+ /* harmony import */ var _splunk_react_icons_Search__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(41);
1451
1317
  /* harmony import */ var _splunk_react_icons_Search__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_react_icons_Search__WEBPACK_IMPORTED_MODULE_1__);
1452
1318
  /* harmony import */ var _ThemedIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
1453
1319
  /* harmony import */ var _SVG__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6);
@@ -1490,20 +1356,27 @@ function Search(props) {
1490
1356
 
1491
1357
  /***/ }),
1492
1358
 
1493
- /***/ 5:
1359
+ /***/ 4:
1494
1360
  /***/ (function(module, exports) {
1495
1361
 
1496
- module.exports = require("@splunk/ui-utils/i18n");
1362
+ module.exports = require("lodash");
1497
1363
 
1498
1364
  /***/ }),
1499
1365
 
1500
- /***/ 51:
1366
+ /***/ 41:
1501
1367
  /***/ (function(module, exports) {
1502
1368
 
1503
1369
  module.exports = require("@splunk/react-icons/Search");
1504
1370
 
1505
1371
  /***/ }),
1506
1372
 
1373
+ /***/ 5:
1374
+ /***/ (function(module, exports) {
1375
+
1376
+ module.exports = require("@splunk/ui-utils/i18n");
1377
+
1378
+ /***/ }),
1379
+
1507
1380
  /***/ 6:
1508
1381
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1509
1382
 
@@ -1647,6 +1520,13 @@ Icon.defaultProps = defaultProps;
1647
1520
 
1648
1521
  /***/ }),
1649
1522
 
1523
+ /***/ 78:
1524
+ /***/ (function(module, exports) {
1525
+
1526
+ module.exports = require("@splunk/react-ui/ControlGroup");
1527
+
1528
+ /***/ }),
1529
+
1650
1530
  /***/ 8:
1651
1531
  /***/ (function(module, exports) {
1652
1532