@splunk/react-ui 4.11.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 (100) hide show
  1. package/Accordion.js +2 -2
  2. package/Anchor.js +2 -2
  3. package/Animation.js +4 -4
  4. package/Box.js +2 -2
  5. package/Button.js +23 -23
  6. package/ButtonGroup.js +2 -2
  7. package/CHANGELOG.md +28 -0
  8. package/Calendar.js +20 -20
  9. package/Card.js +17 -17
  10. package/CardLayout.js +2 -2
  11. package/Chip.js +17 -17
  12. package/Clickable.js +7 -7
  13. package/CloseButton.js +15 -15
  14. package/Code.js +4 -4
  15. package/CollapsiblePanel.js +4 -4
  16. package/Color.js +17 -17
  17. package/ColumnLayout.js +7 -7
  18. package/ComboBox.js +12 -11
  19. package/Concertina.js +11 -11
  20. package/ControlGroup.js +4 -4
  21. package/Date.js +8 -8
  22. package/DefinitionList.js +2 -2
  23. package/Dropdown.js +4 -4
  24. package/EventListener.js +4 -4
  25. package/File.js +25 -25
  26. package/FormRows.js +10 -10
  27. package/Heading.js +2 -2
  28. package/Image.js +19 -19
  29. package/Layer.js +8 -8
  30. package/Link.js +9 -9
  31. package/List.js +2 -2
  32. package/Markdown.js +17 -17
  33. package/Menu.js +33 -33
  34. package/Message.js +31 -31
  35. package/MessageBar.js +32 -32
  36. package/Modal.js +8 -8
  37. package/ModalLayer.js +4 -4
  38. package/Monogram.js +2 -2
  39. package/Multiselect.js +93 -89
  40. package/Number.js +4 -4
  41. package/Paginator.js +20 -20
  42. package/Paragraph.js +2 -2
  43. package/Popover.js +6 -6
  44. package/Progress.js +8 -8
  45. package/RadioBar.js +4 -4
  46. package/RadioList.js +2 -2
  47. package/Resize.js +2 -2
  48. package/ResultsMenu.js +60 -39
  49. package/ScreenReaderContent.js +2 -2
  50. package/Scroll.js +4 -4
  51. package/ScrollContainerContext.js +2 -2
  52. package/Search.js +17 -16
  53. package/Select.js +86 -84
  54. package/SidePanel.js +4 -4
  55. package/Slider.js +8 -8
  56. package/SlidingPanels.js +2 -2
  57. package/StaticContent.js +2 -2
  58. package/StepBar.js +8 -8
  59. package/Switch.js +6 -6
  60. package/TabBar.js +6 -6
  61. package/TabLayout.js +4 -4
  62. package/Table.js +114 -82
  63. package/Text.js +109 -236
  64. package/TextArea.js +1444 -0
  65. package/Tooltip.js +4 -4
  66. package/TransitionOpen.js +8 -7
  67. package/Typography.js +225 -0
  68. package/WaitSpinner.js +4 -4
  69. package/cypress.json +1 -0
  70. package/package.json +12 -2
  71. package/test-runner-jest.config.js +38 -0
  72. package/types/src/ComboBox/ComboBox.d.ts +13 -4
  73. package/types/src/Multiselect/Compact.d.ts +11 -4
  74. package/types/src/Multiselect/Multiselect.d.ts +14 -5
  75. package/types/src/Multiselect/Normal.d.ts +11 -4
  76. package/types/src/ResultsMenu/ResultsMenu.d.ts +8 -2
  77. package/types/src/Search/Search.d.ts +4 -0
  78. package/types/src/Select/Select.d.ts +13 -4
  79. package/types/src/Select/SelectBase.d.ts +12 -4
  80. package/types/src/SidePanel/SidePanel.d.ts +2 -1
  81. package/types/src/Table/HeadCell.d.ts +7 -3
  82. package/types/src/Table/Table.d.ts +2 -3
  83. package/types/src/Table/TableContext.d.ts +5 -0
  84. package/types/src/Text/Text.d.ts +21 -12
  85. package/types/src/TextArea/TextArea.d.ts +190 -0
  86. package/types/src/TextArea/docs/examples/Basic.d.ts +2 -0
  87. package/types/src/TextArea/docs/examples/Disabled.d.ts +2 -0
  88. package/types/src/TextArea/docs/examples/Error.d.ts +2 -0
  89. package/types/src/TextArea/docs/examples/Inline.d.ts +2 -0
  90. package/types/src/TextArea/docs/examples/Uncontrolled.d.ts +2 -0
  91. package/types/src/TextArea/index.d.ts +2 -0
  92. package/types/src/{Text → TextArea}/syncHeightWithShadow.d.ts +1 -2
  93. package/types/src/TransitionOpen/TransitionOpen.d.ts +1 -0
  94. package/types/src/TransitionOpen/index.d.ts +1 -0
  95. package/types/src/Typography/Typography.d.ts +78 -0
  96. package/types/src/Typography/docs/examples/Basic.d.ts +2 -0
  97. package/types/src/Typography/docs/examples/Variants.d.ts +2 -0
  98. package/types/src/Typography/index.d.ts +2 -0
  99. package/types/src/Typography/test/Typography.unit.d.ts +1 -0
  100. package/usePrevious.js +2 -2
package/TextArea.js ADDED
@@ -0,0 +1,1444 @@
1
+ module.exports =
2
+ /******/ (function(modules) { // webpackBootstrap
3
+ /******/ // The module cache
4
+ /******/ var installedModules = {};
5
+ /******/
6
+ /******/ // The require function
7
+ /******/ function __webpack_require__(moduleId) {
8
+ /******/
9
+ /******/ // Check if module is in cache
10
+ /******/ if(installedModules[moduleId]) {
11
+ /******/ return installedModules[moduleId].exports;
12
+ /******/ }
13
+ /******/ // Create a new module (and put it into the cache)
14
+ /******/ var module = installedModules[moduleId] = {
15
+ /******/ i: moduleId,
16
+ /******/ l: false,
17
+ /******/ exports: {}
18
+ /******/ };
19
+ /******/
20
+ /******/ // Execute the module function
21
+ /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
22
+ /******/
23
+ /******/ // Flag the module as loaded
24
+ /******/ module.l = true;
25
+ /******/
26
+ /******/ // Return the exports of the module
27
+ /******/ return module.exports;
28
+ /******/ }
29
+ /******/
30
+ /******/
31
+ /******/ // expose the modules object (__webpack_modules__)
32
+ /******/ __webpack_require__.m = modules;
33
+ /******/
34
+ /******/ // expose the module cache
35
+ /******/ __webpack_require__.c = installedModules;
36
+ /******/
37
+ /******/ // define getter function for harmony exports
38
+ /******/ __webpack_require__.d = function(exports, name, getter) {
39
+ /******/ if(!__webpack_require__.o(exports, name)) {
40
+ /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
41
+ /******/ }
42
+ /******/ };
43
+ /******/
44
+ /******/ // define __esModule on exports
45
+ /******/ __webpack_require__.r = function(exports) {
46
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
47
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
48
+ /******/ }
49
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
50
+ /******/ };
51
+ /******/
52
+ /******/ // create a fake namespace object
53
+ /******/ // mode & 1: value is a module id, require it
54
+ /******/ // mode & 2: merge all properties of value into the ns
55
+ /******/ // mode & 4: return value when already ns object
56
+ /******/ // mode & 8|1: behave like require
57
+ /******/ __webpack_require__.t = function(value, mode) {
58
+ /******/ if(mode & 1) value = __webpack_require__(value);
59
+ /******/ if(mode & 8) return value;
60
+ /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
61
+ /******/ var ns = Object.create(null);
62
+ /******/ __webpack_require__.r(ns);
63
+ /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
64
+ /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
65
+ /******/ return ns;
66
+ /******/ };
67
+ /******/
68
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
69
+ /******/ __webpack_require__.n = function(module) {
70
+ /******/ var getter = module && module.__esModule ?
71
+ /******/ function getDefault() { return module['default']; } :
72
+ /******/ function getModuleExports() { return module; };
73
+ /******/ __webpack_require__.d(getter, 'a', getter);
74
+ /******/ return getter;
75
+ /******/ };
76
+ /******/
77
+ /******/ // Object.prototype.hasOwnProperty.call
78
+ /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
79
+ /******/
80
+ /******/ // __webpack_public_path__
81
+ /******/ __webpack_require__.p = "";
82
+ /******/
83
+ /******/
84
+ /******/ // Load entry module and return exports
85
+ /******/ return __webpack_require__(__webpack_require__.s = 145);
86
+ /******/ })
87
+ /************************************************************************/
88
+ /******/ ({
89
+
90
+ /***/ 0:
91
+ /***/ (function(module, exports) {
92
+
93
+ module.exports = require("@splunk/themes");
94
+
95
+ /***/ }),
96
+
97
+ /***/ 1:
98
+ /***/ (function(module, exports) {
99
+
100
+ module.exports = require("prop-types");
101
+
102
+ /***/ }),
103
+
104
+ /***/ 11:
105
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
106
+
107
+ "use strict";
108
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return updateReactRef; });
109
+ /**
110
+ * Updates a React ref. Callback refs and object refs (from `createRef` and `useRef`) are supported.
111
+ *
112
+ * @param ref - The React callback or object ref. Can be `null` or `undefined`.
113
+ * @param current - The new value of the ref.
114
+ */
115
+ function updateReactRef(ref, current) {
116
+ if (ref) {
117
+ if (typeof ref === 'function') {
118
+ ref(current);
119
+ } else {
120
+ // the public signature of this util uses React.Ref<T> to mirror the way React types refs.
121
+ // the intention here is to signal "we will take care of setting 'current', not you".
122
+ ref.current = current; // eslint-disable-line no-param-reassign
123
+ }
124
+ }
125
+ }
126
+
127
+
128
+
129
+ /***/ }),
130
+
131
+ /***/ 145:
132
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
133
+
134
+ "use strict";
135
+ // ESM COMPAT FLAG
136
+ __webpack_require__.r(__webpack_exports__);
137
+
138
+ // EXPORTS
139
+ __webpack_require__.d(__webpack_exports__, "default", function() { return /* reexport */ src_TextArea_TextArea; });
140
+
141
+ // EXTERNAL MODULE: external "react"
142
+ var external_react_ = __webpack_require__(2);
143
+ var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
144
+
145
+ // EXTERNAL MODULE: external "prop-types"
146
+ var external_prop_types_ = __webpack_require__(1);
147
+ var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
148
+
149
+ // EXTERNAL MODULE: external "lodash"
150
+ var external_lodash_ = __webpack_require__(4);
151
+
152
+ // EXTERNAL MODULE: external "@splunk/ui-utils/style"
153
+ var style_ = __webpack_require__(31);
154
+
155
+ // EXTERNAL MODULE: external "@splunk/react-ui/EventListener"
156
+ var EventListener_ = __webpack_require__(15);
157
+ var EventListener_default = /*#__PURE__*/__webpack_require__.n(EventListener_);
158
+
159
+ // EXTERNAL MODULE: external "@splunk/themes"
160
+ var themes_ = __webpack_require__(0);
161
+
162
+ // EXTERNAL MODULE: external "@splunk/react-ui/ControlGroup"
163
+ var ControlGroup_ = __webpack_require__(78);
164
+
165
+ // EXTERNAL MODULE: external "@splunk/ui-utils/i18n"
166
+ var i18n_ = __webpack_require__(5);
167
+
168
+ // EXTERNAL MODULE: ./src/icons/Search.tsx
169
+ var Search = __webpack_require__(34);
170
+
171
+ // EXTERNAL MODULE: ./src/icons/CrossMark.tsx
172
+ var CrossMark = __webpack_require__(19);
173
+
174
+ // CONCATENATED MODULE: ./src/TextArea/syncHeightWithShadow.ts
175
+ // This file was adapted from [Call-Em-All's material-ui](https://github.com/mui-org/material-ui),
176
+ // which is MIT-licensed:
177
+ //
178
+ // The MIT License (MIT)
179
+ //
180
+ // Copyright (c) 2014 Call-Em-All
181
+ //
182
+ // Permission is hereby granted, free of charge, to any person obtaining a copy
183
+ // of this software and associated documentation files (the "Software"), to deal
184
+ // in the Software without restriction, including without limitation the rights
185
+ // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
186
+ // copies of the Software, and to permit persons to whom the Software is
187
+ // furnished to do so, subject to the following conditions:
188
+ //
189
+ // The above copyright notice and this permission notice shall be included in all
190
+ // copies or substantial portions of the Software.
191
+ //
192
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
193
+ // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
194
+ // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
195
+ // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
196
+ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
197
+ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
198
+ // SOFTWARE.
199
+ //
200
+ // End of MIT license text.
201
+ function syncHeightWithShadow(_ref) {
202
+ var height = _ref.height,
203
+ rowsMax = _ref.rowsMax,
204
+ rowsMin = _ref.rowsMin,
205
+ shadow = _ref.shadow;
206
+
207
+ if (shadow) {
208
+ var style = window.getComputedStyle(shadow);
209
+ 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
210
+
211
+ if (lineHeightValue === 'inherit' || lineHeightValue === 'normal') {
212
+ return false;
213
+ }
214
+
215
+ var lineHeight = parseInt(lineHeightValue, 10);
216
+ var paddingTop = parseInt(style.getPropertyValue('padding-top'), 10);
217
+ var paddingBottom = parseInt(style.getPropertyValue('padding-bottom'), 10);
218
+ var borderTop = parseInt(style.getPropertyValue('border-top-width'), 10);
219
+ var borderBottom = parseInt(style.getPropertyValue('border-bottom-width'), 10);
220
+ var newHeight = shadow.scrollHeight + borderTop + borderBottom;
221
+ /* eslint-disable no-restricted-globals */
222
+ // Leverage the global `isNaN` here for IE support, rather than Number.isNaN.
223
+ // We know newHeight is numeric because we parseInt() above, so `isNaN` should be reliable.
224
+
225
+ if (newHeight === undefined || isNaN(newHeight)) {
226
+ return false;
227
+ }
228
+ /* eslint-enable no-restricted-globals */
229
+
230
+
231
+ if (rowsMax >= rowsMin) {
232
+ var maxHeight = rowsMax * lineHeight + paddingTop + paddingBottom + borderTop + borderBottom + 1; // need one extra.
233
+
234
+ newHeight = Math.min(maxHeight, newHeight);
235
+ }
236
+
237
+ var minHeight = rowsMin * lineHeight + paddingTop + paddingBottom + borderTop + borderBottom + 1; // need one extra.
238
+
239
+ newHeight = Math.max(minHeight, newHeight);
240
+
241
+ if (height !== newHeight) {
242
+ return newHeight;
243
+ }
244
+ }
245
+
246
+ return false;
247
+ }
248
+ // EXTERNAL MODULE: ./src/utils/updateReactRef.ts
249
+ var updateReactRef = __webpack_require__(11);
250
+
251
+ // EXTERNAL MODULE: external "styled-components"
252
+ var external_styled_components_ = __webpack_require__(3);
253
+ var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_);
254
+
255
+ // EXTERNAL MODULE: external "@splunk/react-ui/Box"
256
+ var Box_ = __webpack_require__(8);
257
+ var Box_default = /*#__PURE__*/__webpack_require__.n(Box_);
258
+
259
+ // EXTERNAL MODULE: external "@splunk/react-ui/Button"
260
+ var Button_ = __webpack_require__(16);
261
+ var Button_default = /*#__PURE__*/__webpack_require__.n(Button_);
262
+
263
+ // CONCATENATED MODULE: ./src/TextArea/TextAreaStyles.ts
264
+
265
+
266
+
267
+
268
+ var disabledStyles = Object(external_styled_components_["css"])(["cursor:not-allowed;color:", ";&::placeholder{color:", ";}"], Object(themes_["pick"])({
269
+ enterprise: themes_["variables"].textDisabledColor,
270
+ prisma: themes_["variables"].contentColorDisabled
271
+ }), Object(themes_["pick"])({
272
+ enterprise: themes_["variables"].textDisabledColor,
273
+ prisma: themes_["variables"].contentColorDisabled
274
+ }));
275
+ var buttonStyles = Object(external_styled_components_["css"])(["border-radius:", ";cursor:pointer;font-size:0.83333em;flex-grow:0;", ";&:not([disabled]){color:", ";}"], Object(themes_["pick"])({
276
+ enterprise: themes_["variables"].borderRadius,
277
+ prisma: '50%'
278
+ }), Object(themes_["pick"])({
279
+ enterprise: Object(external_styled_components_["css"])(["width:", ";height:", ";"], themes_["variables"].inputHeight, themes_["variables"].inputHeight),
280
+ prisma: {
281
+ comfortable: Object(external_styled_components_["css"])(["width:26px;min-width:26px;min-height:26px;margin:8px;padding:0;"]),
282
+ compact: Object(external_styled_components_["css"])(["width:22px;min-width:22px;min-height:22px;margin:8px;padding:0;"])
283
+ }
284
+ }), Object(themes_["pick"])({
285
+ enterprise: {
286
+ light: themes_["variables"].gray60,
287
+ dark: themes_["variables"].white
288
+ },
289
+ prisma: themes_["variables"].contentColorDefault
290
+ }));
291
+ var StyledClearButton = external_styled_components_default()(Button_default.a).withConfig({
292
+ displayName: "TextAreaStyles__StyledClearButton",
293
+ componentId: "gfy8yp-0"
294
+ })(["display:none;visibility:hidden;", ""], buttonStyles);
295
+ var StyledSearchIconWrapper = external_styled_components_default.a.span.withConfig({
296
+ displayName: "TextAreaStyles__StyledSearchIconWrapper",
297
+ componentId: "gfy8yp-1"
298
+ })(["", ";color:", ";pointer-events:none;padding:", ";&[disabled]{", ";}"], themes_["mixins"].reset('inline-block'), Object(themes_["pick"])({
299
+ enterprise: {
300
+ light: themes_["variables"].gray60,
301
+ dark: themes_["variables"].white
302
+ },
303
+ prisma: themes_["variables"].contentColorMuted
304
+ }), Object(themes_["pick"])({
305
+ comfortable: '0 8px',
306
+ compact: '0 6px'
307
+ }), Object(themes_["pick"])({
308
+ prisma: Object(external_styled_components_["css"])(["color:", ";"], themes_["variables"].contentColorDisabled)
309
+ }));
310
+ var StyledBox = external_styled_components_default()(Box_default.a).withConfig({
311
+ displayName: "TextAreaStyles__StyledBox",
312
+ componentId: "gfy8yp-2"
313
+ })(["display:flex;justify-content:space-between;flex-grow:1;flex-shrink:1;position:relative;&[data-inline]{width:230px;flex-basis:230px;[data-inline] + &{margin-left:", ";}}&:focus-within:not([disabled]){", "{", "}", "{visibility:visible;display:block;}}"], Object(themes_["pick"])({
314
+ enterprise: themes_["variables"].spacingHalf,
315
+ prisma: themes_["variables"].spacingSmall
316
+ }),
317
+ /* sc-sel */
318
+ StyledSearchIconWrapper, Object(themes_["pick"])({
319
+ enterprise: Object(external_styled_components_["css"])(["display:none;"])
320
+ }),
321
+ /* sc-sel */
322
+ StyledClearButton);
323
+ var StyledTextAreaWrapper = external_styled_components_default.a.span.withConfig({
324
+ displayName: "TextAreaStyles__StyledTextAreaWrapper",
325
+ componentId: "gfy8yp-3"
326
+ })(["", " 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);padding:", ";", " ", " &:hover:not([disabled]){border-color:", ";}&:focus-within:not([disabled]){", "}", " ", " ", " ", ""], themes_["mixins"].reset('inline-flex'), themes_["variables"].inputHeight, Object(themes_["pick"])({
327
+ enterprise: {
328
+ light: themes_["variables"].gray60,
329
+ dark: themes_["variables"].gray20
330
+ },
331
+ prisma: themes_["variables"].interactiveColorBorder
332
+ }), themes_["variables"].borderRadius, Object(themes_["pick"])({
333
+ enterprise: {
334
+ light: themes_["variables"].white,
335
+ dark: themes_["variables"].gray22
336
+ },
337
+ prisma: themes_["variables"].transparent
338
+ }), Object(themes_["pick"])({
339
+ enterprise: '0px 10px',
340
+ prisma: '0px 12px'
341
+ }), function (_ref) {
342
+ var $hasEndAdornment = _ref.$hasEndAdornment;
343
+ return $hasEndAdornment && Object(external_styled_components_["css"])(["padding-right:0;"]);
344
+ }, function (_ref2) {
345
+ var $hasStartAdornment = _ref2.$hasStartAdornment;
346
+ return $hasStartAdornment && Object(external_styled_components_["css"])(["padding-left:0;"]);
347
+ }, Object(themes_["pick"])({
348
+ enterprise: {
349
+ light: themes_["variables"].gray60,
350
+ dark: themes_["variables"].gray20
351
+ },
352
+ prisma: themes_["variables"].interactiveColorBorderHover
353
+ }), Object(themes_["pick"])({
354
+ enterprise: Object(external_styled_components_["css"])(["box-shadow:", ";color:", ";"], themes_["variables"].focusShadow, themes_["variables"].textColor),
355
+ prisma: Object(external_styled_components_["css"])(["border-color:", ";color:", ";"], themes_["variables"].interactiveColorPrimary, themes_["variables"].contentColorActive)
356
+ }), function (_ref3) {
357
+ var $error = _ref3.$error;
358
+ return $error && Object(external_styled_components_["css"])(["&,&:hover:not([disabled]){border-color:", ";}&:focus-within:not([disabled]){", "}"], Object(themes_["pick"])({
359
+ enterprise: themes_["variables"].errorColor,
360
+ prisma: themes_["variables"].accentColorNegative
361
+ }), Object(themes_["pick"])({
362
+ enterprise: Object(external_styled_components_["css"])(["box-shadow:", ";color:", ";"], themes_["variables"].focusShadow, themes_["variables"].textColor),
363
+ prisma: Object(external_styled_components_["css"])(["border-color:", ";color:", ";"], themes_["variables"].interactiveColorPrimary, themes_["variables"].contentColorActive)
364
+ }));
365
+ }, function (_ref4) {
366
+ var $append = _ref4.$append;
367
+ return $append && Object(external_styled_components_["css"])(["margin-right:-1px;border-top-right-radius:0;border-bottom-right-radius:0;border-right:none;"]);
368
+ }, function (_ref5) {
369
+ var $prepend = _ref5.$prepend;
370
+ return $prepend && Object(external_styled_components_["css"])(["border-top-left-radius:0;border-bottom-left-radius:0;"]);
371
+ }, function (_ref6) {
372
+ var disabled = _ref6.disabled;
373
+ return disabled && Object(external_styled_components_["css"])(["", " box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);"], Object(themes_["pick"])({
374
+ enterprise: {
375
+ light: Object(external_styled_components_["css"])(["background-color:", ";border-color:", ";"], themes_["variables"].gray96, themes_["variables"].gray92),
376
+ dark: Object(external_styled_components_["css"])(["background-color:", ";border-color:", ";"], themes_["variables"].gray22, themes_["variables"].gray30)
377
+ },
378
+ prisma: Object(external_styled_components_["css"])(["border-color:", ";"], themes_["variables"].interactiveColorBorderDisabled)
379
+ }));
380
+ });
381
+ var StyledTextArea = external_styled_components_default.a.textarea.withConfig({
382
+ displayName: "TextAreaStyles__StyledTextArea",
383
+ componentId: "gfy8yp-4"
384
+ })(["", ";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;}", " ", ""], themes_["mixins"].reset('inline-flex'), Object(themes_["pick"])({
385
+ enterprise: themes_["variables"].textColor,
386
+ prisma: themes_["variables"].contentColorActive
387
+ }), themes_["variables"].sansFontFamily, Object(themes_["pick"])({
388
+ enterprise: {
389
+ comfortable: themes_["variables"].spacingQuarter,
390
+ compact: '3px'
391
+ },
392
+ prisma: {
393
+ comfortable: themes_["variables"].spacingSmall,
394
+ compact: '5px'
395
+ }
396
+ }), Object(themes_["pick"])({
397
+ enterprise: {
398
+ comfortable: themes_["variables"].spacingQuarter,
399
+ compact: '3px'
400
+ },
401
+ prisma: {
402
+ comfortable: themes_["variables"].spacingSmall,
403
+ compact: '5px'
404
+ }
405
+ }), Object(themes_["pick"])({
406
+ enterprise: '10px',
407
+ prisma: '14px'
408
+ }), themes_["variables"].contentColorMuted, function (_ref7) {
409
+ var $error = _ref7.$error;
410
+ return $error && Object(external_styled_components_["css"])(["&,&:hover{color:", ";}"], Object(themes_["pick"])({
411
+ enterprise: {
412
+ light: themes_["variables"].errorColorD10,
413
+ dark: themes_["variables"].errorColorL20
414
+ },
415
+ prisma: themes_["variables"].contentColorActive
416
+ }));
417
+ }, function (_ref8) {
418
+ var disabled = _ref8.disabled;
419
+ return disabled && disabledStyles;
420
+ });
421
+ var StyledVisibilityToggle = external_styled_components_default()(Button_default.a).withConfig({
422
+ displayName: "TextAreaStyles__StyledVisibilityToggle",
423
+ componentId: "gfy8yp-5"
424
+ })(["", ""], buttonStyles);
425
+ var StyledPlaceholder = external_styled_components_default.a.span.withConfig({
426
+ displayName: "TextAreaStyles__StyledPlaceholder",
427
+ componentId: "gfy8yp-6"
428
+ })(["pointer-events:none;color:", ";position:absolute;overflow:hidden;font-size:inherit;line-height:inherit;height:", ";margin-right:", ";", ";", ";", ""], Object(themes_["pick"])({
429
+ enterprise: themes_["variables"].textGray,
430
+ prisma: themes_["variables"].contentColorMuted
431
+ }), themes_["variables"].lineHeight, Object(themes_["pick"])({
432
+ enterprise: '10px',
433
+ prisma: '14px'
434
+ }), function (_ref9) {
435
+ var $hasStartAdornment = _ref9.$hasStartAdornment,
436
+ $startAdornmentWidth = _ref9.$startAdornmentWidth;
437
+ return $hasStartAdornment && ($startAdornmentWidth ? Object(external_styled_components_["css"])(["margin-left:", "px;"], $startAdornmentWidth) : Object(external_styled_components_["css"])(["margin-left:", ";"], Object(themes_["pick"])({
438
+ enterprise: {
439
+ comfortable: '30px',
440
+ compact: '26px'
441
+ },
442
+ prisma: {
443
+ comfortable: '38px',
444
+ compact: '30px'
445
+ }
446
+ })));
447
+ }, function (_ref10) {
448
+ var $hasEndAdornment = _ref10.$hasEndAdornment,
449
+ $endAdornmentWidth = _ref10.$endAdornmentWidth;
450
+ return $hasEndAdornment && ($endAdornmentWidth // calc(100% - padding - adorment width)
451
+ ? Object(external_styled_components_["css"])(["max-width:calc( 100% - ", " - ", "px );"], Object(themes_["pick"])({
452
+ enterprise: '10px',
453
+ prisma: '14px'
454
+ }), $endAdornmentWidth) : Object(external_styled_components_["css"])(["max-width:calc( 100% - ", " - ", " );"], Object(themes_["pick"])({
455
+ enterprise: '10px',
456
+ prisma: '14px'
457
+ }), Object(themes_["pick"])({
458
+ enterprise: {
459
+ comfortable: '30px',
460
+ compact: '26px'
461
+ },
462
+ prisma: {
463
+ comfortable: '38px',
464
+ compact: '30px'
465
+ }
466
+ })));
467
+ }, function (_ref11) {
468
+ var $hasBothAdornment = _ref11.$hasBothAdornment,
469
+ $endAdornmentWidth = _ref11.$endAdornmentWidth,
470
+ $startAdornmentWidth = _ref11.$startAdornmentWidth;
471
+ return $hasBothAdornment && Object(external_styled_components_["css"])(["max-width:calc(100% - ", "px - ", "px);"], $startAdornmentWidth, $endAdornmentWidth);
472
+ });
473
+ var adornmentHolder = Object(external_styled_components_["css"])(["display:inline-flex;align-items:center;justify-content:center;height:", ";pointer-events:none;"], Object(themes_["pick"])({
474
+ enterprise: {
475
+ comfortable: '30px',
476
+ compact: '26px'
477
+ },
478
+ prisma: {
479
+ comfortable: '38px',
480
+ compact: '30px'
481
+ }
482
+ }));
483
+ var StyledStartAdornmentHolder = external_styled_components_default.a.div.withConfig({
484
+ displayName: "TextAreaStyles__StyledStartAdornmentHolder",
485
+ componentId: "gfy8yp-7"
486
+ })(["", " ", ";"], adornmentHolder, function (_ref12) {
487
+ var $width = _ref12.$width;
488
+ return $width ? Object(external_styled_components_["css"])(["min-width:", "px;"], $width) : Object(external_styled_components_["css"])(["min-width:", ";"], Object(themes_["pick"])({
489
+ enterprise: {
490
+ comfortable: '30px',
491
+ compact: '26px'
492
+ },
493
+ prisma: {
494
+ comfortable: '38px',
495
+ compact: '30px'
496
+ }
497
+ }));
498
+ });
499
+ var StyledEndAdornmentHolder = external_styled_components_default.a.div.withConfig({
500
+ displayName: "TextAreaStyles__StyledEndAdornmentHolder",
501
+ componentId: "gfy8yp-8"
502
+ })(["", " ", ";"], adornmentHolder, function (_ref13) {
503
+ var $width = _ref13.$width;
504
+ return $width ? Object(external_styled_components_["css"])(["min-width:", "px;"], $width) : Object(external_styled_components_["css"])(["min-width:", ";"], Object(themes_["pick"])({
505
+ enterprise: {
506
+ comfortable: '30px',
507
+ compact: '26px'
508
+ },
509
+ prisma: {
510
+ comfortable: '38px',
511
+ compact: '30px'
512
+ }
513
+ }));
514
+ });
515
+ var StyledAdornment = external_styled_components_default.a.div.withConfig({
516
+ displayName: "TextAreaStyles__StyledAdornment",
517
+ componentId: "gfy8yp-9"
518
+ })(["display:inline-flex;align-items:center;justify-content:center;position:absolute;pointer-events:none;z-index:1;height:", ";", ";", ";", ""], Object(themes_["pick"])({
519
+ enterprise: {
520
+ comfortable: '30px',
521
+ compact: '26px'
522
+ },
523
+ prisma: {
524
+ comfortable: '38px',
525
+ compact: '30px'
526
+ }
527
+ }), function (_ref14) {
528
+ var $position = _ref14.$position;
529
+ return $position === 'start' ? Object(external_styled_components_["css"])(["top:1px;left:1px;"]) : Object(external_styled_components_["css"])(["top:1px;right:1px;"]);
530
+ }, function (_ref15) {
531
+ var disabled = _ref15.disabled;
532
+ return disabled && disabledStyles;
533
+ }, Object(themes_["pick"])({
534
+ enterprise: Object(external_styled_components_["css"])(["margin-left:-1px;margin-right:-1px;"])
535
+ }));
536
+
537
+ // CONCATENATED MODULE: ./src/TextArea/TextArea.tsx
538
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
539
+
540
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
541
+
542
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
543
+
544
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
545
+
546
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
547
+
548
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
549
+
550
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
551
+
552
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
553
+
554
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
555
+
556
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
557
+
558
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
559
+
560
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
561
+
562
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
563
+
564
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
565
+
566
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
567
+
568
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
569
+
570
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
571
+
572
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
573
+
574
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
575
+
576
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
577
+
578
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
579
+
580
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
581
+
582
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
583
+
584
+
585
+
586
+
587
+
588
+
589
+
590
+
591
+
592
+
593
+
594
+
595
+
596
+
597
+ /** @public */
598
+
599
+ var propTypes = {
600
+ appearance: external_prop_types_default.a.oneOf(['default', 'search']),
601
+ append: external_prop_types_default.a.bool,
602
+ autoCapitalize: external_prop_types_default.a.string,
603
+ autoComplete: external_prop_types_default.a.string,
604
+ autoCorrect: external_prop_types_default.a.string,
605
+ autoFocus: external_prop_types_default.a.bool,
606
+ canClear: external_prop_types_default.a.bool,
607
+ children: external_prop_types_default.a.node,
608
+
609
+ /** @private. */
610
+ classNamePrivate: external_prop_types_default.a.string,
611
+ defaultValue: external_prop_types_default.a.string,
612
+ describedBy: external_prop_types_default.a.string,
613
+ disabled: external_prop_types_default.a.bool,
614
+ elementRef: external_prop_types_default.a.oneOfType([external_prop_types_default.a.func, external_prop_types_default.a.object]),
615
+ endAdornment: external_prop_types_default.a.node,
616
+ error: external_prop_types_default.a.bool,
617
+ inline: external_prop_types_default.a.bool,
618
+
619
+ /** @private. */
620
+ inputClassName: external_prop_types_default.a.string,
621
+ inputId: external_prop_types_default.a.string,
622
+ inputRef: external_prop_types_default.a.oneOfType([external_prop_types_default.a.func, external_prop_types_default.a.object]),
623
+ labelledBy: external_prop_types_default.a.string,
624
+ maxLength: external_prop_types_default.a.number,
625
+ name: external_prop_types_default.a.string,
626
+ onBlur: external_prop_types_default.a.func,
627
+ onChange: external_prop_types_default.a.func,
628
+ onFocus: external_prop_types_default.a.func,
629
+ onKeyDown: external_prop_types_default.a.func,
630
+ onSelect: external_prop_types_default.a.func,
631
+ onInputClick: external_prop_types_default.a.func,
632
+ placeholder: external_prop_types_default.a.string,
633
+ prepend: external_prop_types_default.a.bool,
634
+ rowsMax: external_prop_types_default.a.number,
635
+ rowsMin: external_prop_types_default.a.number,
636
+ spellCheck: external_prop_types_default.a.bool,
637
+ tabIndex: external_prop_types_default.a.number,
638
+ startAdornment: external_prop_types_default.a.node,
639
+
640
+ /** @private */
641
+ splunkTheme: external_prop_types_default.a.object,
642
+ value: external_prop_types_default.a.string
643
+ };
644
+ var defaultProps = {
645
+ appearance: 'default',
646
+ append: false,
647
+ autoFocus: false,
648
+ canClear: false,
649
+ disabled: false,
650
+ error: false,
651
+ inline: false,
652
+ placeholder: '',
653
+ prepend: false,
654
+ rowsMax: 8,
655
+ rowsMin: 2,
656
+ tabIndex: 0
657
+ };
658
+
659
+ /** Note: TextArea places role and aria props onto the input. All other props are placed on the wrapper. */
660
+ var TextArea_TextArea = /*#__PURE__*/function (_Component) {
661
+ _inherits(TextArea, _Component);
662
+
663
+ var _super = _createSuper(TextArea);
664
+
665
+ _createClass(TextArea, null, [{
666
+ key: "validateRows",
667
+ // @docs-props-type TextAreaPropsBase
668
+ value: function validateRows(_ref) {
669
+ var rowsMin = _ref.rowsMin,
670
+ rowsMax = _ref.rowsMax;
671
+
672
+ if (false) {}
673
+ }
674
+ }]);
675
+
676
+ function TextArea(props) {
677
+ var _this;
678
+
679
+ _classCallCheck(this, TextArea);
680
+
681
+ _this = _super.call(this, props);
682
+
683
+ _defineProperty(_assertThisInitialized(_this), "controlledExternally", void 0);
684
+
685
+ _defineProperty(_assertThisInitialized(_this), "input", null);
686
+
687
+ _defineProperty(_assertThisInitialized(_this), "shadow", null);
688
+
689
+ _defineProperty(_assertThisInitialized(_this), "startAdornment", null);
690
+
691
+ _defineProperty(_assertThisInitialized(_this), "endAdornment", null);
692
+
693
+ _defineProperty(_assertThisInitialized(_this), "getAdornmentWidth", function () {
694
+ var startIconRect = _this.startAdornment ? _this.startAdornment.getBoundingClientRect() : undefined;
695
+ var startIconWidth = startIconRect && Math.round(startIconRect.width);
696
+
697
+ if (_this.state.startAdornmentWidth !== startIconWidth) {
698
+ _this.setState({
699
+ startAdornmentWidth: startIconWidth
700
+ });
701
+ }
702
+
703
+ var endIconRect = _this.endAdornment ? _this.endAdornment.getBoundingClientRect() : undefined;
704
+ var endIconWidth = endIconRect && Math.round(endIconRect.width);
705
+
706
+ if (_this.state.endAdornmentWidth !== endIconWidth) {
707
+ _this.setState({
708
+ endAdornmentWidth: endIconWidth
709
+ });
710
+ }
711
+ });
712
+
713
+ _defineProperty(_assertThisInitialized(_this), "handleResize", function () {
714
+ _this.syncHeightWithShadow();
715
+ });
716
+
717
+ _defineProperty(_assertThisInitialized(_this), "handleInputMount", function (el) {
718
+ _this.input = el;
719
+ Object(updateReactRef["a" /* updateReactRef */])(_this.props.inputRef, el);
720
+ });
721
+
722
+ _defineProperty(_assertThisInitialized(_this), "handleInputChange", function (e) {
723
+ var _this$props$onChange, _this$props;
724
+
725
+ var value = e.target.value;
726
+ var name = _this.props.name;
727
+
728
+ if (!_this.isControlled()) {
729
+ _this.setState({
730
+ value: value
731
+ });
732
+ }
733
+
734
+ (_this$props$onChange = (_this$props = _this.props).onChange) === null || _this$props$onChange === void 0 ? void 0 : _this$props$onChange.call(_this$props, e, {
735
+ value: value,
736
+ name: name
737
+ });
738
+ });
739
+
740
+ _defineProperty(_assertThisInitialized(_this), "handleInputKeyDown", function (e) {
741
+ var _this$props$onKeyDown, _this$props2;
742
+
743
+ (_this$props$onKeyDown = (_this$props2 = _this.props).onKeyDown) === null || _this$props$onKeyDown === void 0 ? void 0 : _this$props$onKeyDown.call(_this$props2, e);
744
+ });
745
+
746
+ _defineProperty(_assertThisInitialized(_this), "handleInputSelect", function (e) {
747
+ var _this$props$onSelect, _this$props3;
748
+
749
+ (_this$props$onSelect = (_this$props3 = _this.props).onSelect) === null || _this$props$onSelect === void 0 ? void 0 : _this$props$onSelect.call(_this$props3, e);
750
+ });
751
+
752
+ _defineProperty(_assertThisInitialized(_this), "handleInputClick", function (e) {
753
+ var _this$props$onInputCl, _this$props4;
754
+
755
+ (_this$props$onInputCl = (_this$props4 = _this.props).onInputClick) === null || _this$props$onInputCl === void 0 ? void 0 : _this$props$onInputCl.call(_this$props4, e);
756
+ });
757
+
758
+ _defineProperty(_assertThisInitialized(_this), "handleInputFocus", function (e) {
759
+ var _this$props$onFocus, _this$props5;
760
+
761
+ (_this$props$onFocus = (_this$props5 = _this.props).onFocus) === null || _this$props$onFocus === void 0 ? void 0 : _this$props$onFocus.call(_this$props5, e);
762
+ });
763
+
764
+ _defineProperty(_assertThisInitialized(_this), "handleInputBlur", function (e) {
765
+ var _this$props$onBlur, _this$props6;
766
+
767
+ (_this$props$onBlur = (_this$props6 = _this.props).onBlur) === null || _this$props$onBlur === void 0 ? void 0 : _this$props$onBlur.call(_this$props6, e);
768
+ });
769
+
770
+ _defineProperty(_assertThisInitialized(_this), "handleClear", function (e) {
771
+ var _this$props$onChange2, _this$props7;
772
+
773
+ e.preventDefault();
774
+ var value = '';
775
+ var name = _this.props.name;
776
+
777
+ if (!_this.isControlled()) {
778
+ _this.setState({
779
+ value: value
780
+ });
781
+ }
782
+
783
+ (_this$props$onChange2 = (_this$props7 = _this.props).onChange) === null || _this$props$onChange2 === void 0 ? void 0 : _this$props$onChange2.call(_this$props7, e, {
784
+ value: value,
785
+ name: name
786
+ });
787
+ });
788
+
789
+ _defineProperty(_assertThisInitialized(_this), "syncHeightWithShadow", function () {
790
+ var newHeight = syncHeightWithShadow({
791
+ height: _this.state.height,
792
+ rowsMax: _this.props.rowsMax,
793
+ rowsMin: _this.props.rowsMin,
794
+ shadow: _this.shadow
795
+ });
796
+
797
+ if (newHeight !== false) {
798
+ _this.setState({
799
+ height: newHeight
800
+ });
801
+ }
802
+ });
803
+
804
+ _defineProperty(_assertThisInitialized(_this), "renderEndAdornment", function () {
805
+ var _controlGroupContext$;
806
+
807
+ var _this$props8 = _this.props,
808
+ appearance = _this$props8.appearance,
809
+ endAdornment = _this$props8.endAdornment,
810
+ disabled = _this$props8.disabled,
811
+ canClear = _this$props8.canClear,
812
+ splunkTheme = _this$props8.splunkTheme;
813
+ var isPrisma = splunkTheme.isPrisma;
814
+ var adornmentProps = {
815
+ ref: function ref(el) {
816
+ _this.endAdornment = el;
817
+ },
818
+ disabled: disabled,
819
+ $position: 'end'
820
+ };
821
+
822
+ if (endAdornment) {
823
+ return /*#__PURE__*/external_react_default.a.createElement(StyledAdornment, adornmentProps, endAdornment);
824
+ }
825
+
826
+ var controlGroupContext = _this.context;
827
+ var controlGroupLabel = (_controlGroupContext$ = controlGroupContext.labelAttrs) === null || _controlGroupContext$ === void 0 ? void 0 : _controlGroupContext$.text;
828
+ var clearButtonText = controlGroupLabel ? Object(i18n_["_"])("Clear ".concat(controlGroupLabel, " text field")) : Object(i18n_["_"])('Clear text field');
829
+
830
+ if (!isPrisma && appearance === 'search') {
831
+ return /*#__PURE__*/external_react_default.a.createElement(StyledAdornment, adornmentProps, /*#__PURE__*/external_react_default.a.createElement(StyledClearButton, {
832
+ appearance: isPrisma ? 'secondary' : 'pill',
833
+ "data-test": "clear",
834
+ inline: false,
835
+ icon: /*#__PURE__*/external_react_default.a.createElement(CrossMark["a" /* default */], {
836
+ enterpriseSize: 1,
837
+ screenReaderText: clearButtonText
838
+ }),
839
+ onClick: _this.handleClear
840
+ }), /*#__PURE__*/external_react_default.a.createElement(StyledSearchIconWrapper, {
841
+ $disabled: disabled
842
+ }, /*#__PURE__*/external_react_default.a.createElement(Search["a" /* default */], {
843
+ enterpriseSize: "16px",
844
+ inline: false
845
+ })));
846
+ }
847
+
848
+ var displayValue = _this.getDisplayValue();
849
+
850
+ if (!!displayValue && (isPrisma && appearance === 'search' || canClear)) {
851
+ return /*#__PURE__*/external_react_default.a.createElement(StyledAdornment, adornmentProps, /*#__PURE__*/external_react_default.a.createElement(StyledClearButton, {
852
+ "data-test": "clear",
853
+ appearance: isPrisma ? 'secondary' : 'pill',
854
+ onClick: _this.handleClear,
855
+ icon: /*#__PURE__*/external_react_default.a.createElement(CrossMark["a" /* default */], {
856
+ inline: false,
857
+ enterpriseSize: 1,
858
+ screenReaderText: clearButtonText
859
+ })
860
+ }));
861
+ }
862
+
863
+ return undefined;
864
+ });
865
+
866
+ _defineProperty(_assertThisInitialized(_this), "renderStartAdornment", function () {
867
+ var _this$props9 = _this.props,
868
+ appearance = _this$props9.appearance,
869
+ startAdornment = _this$props9.startAdornment,
870
+ splunkTheme = _this$props9.splunkTheme,
871
+ disabled = _this$props9.disabled;
872
+ var isPrisma = splunkTheme.isPrisma;
873
+ var adornmentProps = {
874
+ ref: function ref(el) {
875
+ _this.startAdornment = el;
876
+ },
877
+ disabled: disabled,
878
+ $position: 'start'
879
+ };
880
+
881
+ if (startAdornment) {
882
+ return /*#__PURE__*/external_react_default.a.createElement(StyledAdornment, adornmentProps, startAdornment);
883
+ }
884
+
885
+ if (isPrisma && appearance === 'search') {
886
+ return /*#__PURE__*/external_react_default.a.createElement(StyledAdornment, adornmentProps, /*#__PURE__*/external_react_default.a.createElement(StyledSearchIconWrapper, {
887
+ $disabled: disabled
888
+ }, /*#__PURE__*/external_react_default.a.createElement(Search["a" /* default */], {
889
+ enterpriseSize: "16px",
890
+ inline: false,
891
+ screenReaderText: "Search"
892
+ })));
893
+ }
894
+
895
+ return undefined;
896
+ });
897
+
898
+ _defineProperty(_assertThisInitialized(_this), "getDisplayValue", function () {
899
+ var displayValue = _this.isControlled() ? _this.props.value : _this.state.value;
900
+ return displayValue;
901
+ });
902
+
903
+ _this.controlledExternally = Object(external_lodash_["has"])(props, 'value');
904
+ _this.state = {
905
+ value: props.defaultValue || ''
906
+ };
907
+
908
+ if (false) {}
909
+
910
+ TextArea.validateRows(props);
911
+ _this.handleResize = Object(external_lodash_["throttle"])(_this.handleResize, 100);
912
+ return _this;
913
+ }
914
+
915
+ _createClass(TextArea, [{
916
+ key: "componentDidMount",
917
+ value: function componentDidMount() {
918
+ Object(external_lodash_["defer"])(this.syncHeightWithShadow); // wait for styles to load
919
+
920
+ this.getAdornmentWidth();
921
+ }
922
+ }, {
923
+ key: "componentDidUpdate",
924
+ value: function componentDidUpdate(prevProps) {
925
+ if (false) {}
926
+
927
+ if (false) {}
928
+
929
+ this.syncHeightWithShadow();
930
+ TextArea.validateRows(this.props);
931
+ this.getAdornmentWidth();
932
+ }
933
+ }, {
934
+ key: "isControlled",
935
+ value: function isControlled() {
936
+ return this.controlledExternally;
937
+ }
938
+ }, {
939
+ key: "blur",
940
+ value: function blur() {
941
+ var _this$input;
942
+
943
+ (_this$input = this.input) === null || _this$input === void 0 ? void 0 : _this$input.blur();
944
+ }
945
+ /**
946
+ * Place focus on the input.
947
+ */
948
+
949
+ }, {
950
+ key: "focus",
951
+ value: function focus() {
952
+ var _this$input2;
953
+
954
+ (_this$input2 = this.input) === null || _this$input2 === void 0 ? void 0 : _this$input2.focus();
955
+ }
956
+ }, {
957
+ key: "select",
958
+ value: function select() {
959
+ var _this$input3;
960
+
961
+ (_this$input3 = this.input) === null || _this$input3 === void 0 ? void 0 : _this$input3.select();
962
+ }
963
+ }, {
964
+ key: "render",
965
+ value: function render() {
966
+ var _this2 = this;
967
+
968
+ var _this$props10 = this.props,
969
+ append = _this$props10.append,
970
+ autoCapitalize = _this$props10.autoCapitalize,
971
+ autoComplete = _this$props10.autoComplete,
972
+ autoCorrect = _this$props10.autoCorrect,
973
+ autoFocus = _this$props10.autoFocus,
974
+ children = _this$props10.children,
975
+ className = _this$props10.className,
976
+ classNamePrivate = _this$props10.classNamePrivate,
977
+ disabled = _this$props10.disabled,
978
+ describedBy = _this$props10.describedBy,
979
+ elementRef = _this$props10.elementRef,
980
+ error = _this$props10.error,
981
+ inline = _this$props10.inline,
982
+ inputClassName = _this$props10.inputClassName,
983
+ inputId = _this$props10.inputId,
984
+ labelledBy = _this$props10.labelledBy,
985
+ maxLength = _this$props10.maxLength,
986
+ name = _this$props10.name,
987
+ placeholder = _this$props10.placeholder,
988
+ prepend = _this$props10.prepend,
989
+ spellCheck = _this$props10.spellCheck,
990
+ tabIndex = _this$props10.tabIndex,
991
+ title = _this$props10.title,
992
+ value = _this$props10.value,
993
+ otherProps = _objectWithoutProperties(_this$props10, ["append", "autoCapitalize", "autoComplete", "autoCorrect", "autoFocus", "children", "className", "classNamePrivate", "disabled", "describedBy", "elementRef", "error", "inline", "inputClassName", "inputId", "labelledBy", "maxLength", "name", "placeholder", "prepend", "spellCheck", "tabIndex", "title", "value"]);
994
+
995
+ var ariaProps = _objectSpread(_objectSpread({}, Object(external_lodash_["pickBy"])(otherProps, function (val, key) {
996
+ return key === 'role' || key.indexOf('aria-') === 0;
997
+ })), {}, {
998
+ 'aria-describedby': describedBy,
999
+ 'aria-labelledby': labelledBy,
1000
+ 'aria-invalid': error || undefined,
1001
+ 'aria-multiline': true
1002
+ });
1003
+
1004
+ var boxProps = Object(external_lodash_["omit"])(otherProps, ['inputRef', 'onBlur', 'onChange', 'onFocus', 'onKeyDown', 'onSelect', 'onInputClick', 'rowsMax', 'rowsMin'].concat(_toConsumableArray(Object(external_lodash_["keys"])(ariaProps))));
1005
+ var displayValue = this.getDisplayValue();
1006
+ var displayProps = {
1007
+ className: Object(style_["toClassName"])(className, inputClassName),
1008
+ $append: append || undefined,
1009
+ $error: error,
1010
+ $prepend: prepend || undefined
1011
+ };
1012
+
1013
+ var inputProps = _objectSpread(_objectSpread({}, ariaProps), {}, {
1014
+ 'data-test': 'textbox',
1015
+ autoCapitalize: autoCapitalize,
1016
+ autoComplete: autoComplete,
1017
+ autoCorrect: autoCorrect,
1018
+ autoFocus: autoFocus,
1019
+ id: inputId,
1020
+ maxLength: maxLength,
1021
+ placeholder: placeholder,
1022
+ name: name,
1023
+ onChange: this.handleInputChange,
1024
+ onKeyDown: this.handleInputKeyDown,
1025
+ onSelect: this.handleInputSelect,
1026
+ onClick: this.handleInputClick,
1027
+ onFocus: this.handleInputFocus,
1028
+ onBlur: this.handleInputBlur,
1029
+ ref: this.handleInputMount,
1030
+ role: 'textbox',
1031
+ spellCheck: spellCheck,
1032
+ style: {
1033
+ height: this.state.height
1034
+ },
1035
+ title: title,
1036
+ tabIndex: tabIndex,
1037
+ value: displayValue,
1038
+ $error: error
1039
+ });
1040
+
1041
+ var hasEndAdornment = !!this.renderEndAdornment();
1042
+ var hasStartAdornment = !!this.renderStartAdornment();
1043
+ return /*#__PURE__*/external_react_default.a.createElement(StyledBox, _extends({
1044
+ tabIndex: -1,
1045
+ className: Object(style_["toClassName"])(className, classNamePrivate),
1046
+ "data-test": "text",
1047
+ "data-test-value": displayValue,
1048
+ elementRef: elementRef,
1049
+ flex: true,
1050
+ inline: inline
1051
+ }, boxProps), this.renderStartAdornment(), /*#__PURE__*/external_react_default.a.createElement(StyledTextAreaWrapper, _extends({
1052
+ $hasEndAdornment: hasEndAdornment,
1053
+ $hasStartAdornment: hasStartAdornment,
1054
+ disabled: disabled
1055
+ }, displayProps), hasStartAdornment && /*#__PURE__*/external_react_default.a.createElement(StyledStartAdornmentHolder, {
1056
+ $width: this.state.startAdornmentWidth
1057
+ }), /*#__PURE__*/external_react_default.a.createElement(StyledTextArea, {
1058
+ "aria-hidden": "true",
1059
+ onChange: external_lodash_["noop"],
1060
+ onClick: this.handleInputClick,
1061
+ style: {
1062
+ width: '100%',
1063
+ position: 'absolute',
1064
+ overflow: 'hidden',
1065
+ left: -10000,
1066
+ top: -10000
1067
+ },
1068
+ tabIndex: -1,
1069
+ ref: function ref(el) {
1070
+ _this2.shadow = el;
1071
+ },
1072
+ value: displayValue
1073
+ }), disabled ? /*#__PURE__*/external_react_default.a.createElement(StyledTextArea, _extends({
1074
+ as: "textarea",
1075
+ className: Object(style_["toClassName"])(className, classNamePrivate),
1076
+ "data-multiline": "true",
1077
+ "data-test": "text",
1078
+ disabled: true,
1079
+ readOnly: true,
1080
+ style: {
1081
+ height: this.state.height
1082
+ },
1083
+ value: displayValue,
1084
+ placeholder: placeholder,
1085
+ ref: function ref(el) {
1086
+ _this2.shadow = el;
1087
+ }
1088
+ }, ariaProps)) : /*#__PURE__*/external_react_default.a.createElement(StyledTextArea, _extends({
1089
+ as: "textarea"
1090
+ }, inputProps, {
1091
+ onClick: this.handleInputClick
1092
+ })), /*#__PURE__*/external_react_default.a.createElement(EventListener_default.a, {
1093
+ target: window,
1094
+ eventType: "resize",
1095
+ listener: this.handleResize
1096
+ }), children, hasEndAdornment && /*#__PURE__*/external_react_default.a.createElement(StyledEndAdornmentHolder, {
1097
+ $width: this.state.endAdornmentWidth
1098
+ })), this.renderEndAdornment());
1099
+ }
1100
+ }]);
1101
+
1102
+ return TextArea;
1103
+ }(external_react_["Component"]);
1104
+
1105
+ _defineProperty(TextArea_TextArea, "propTypes", propTypes);
1106
+
1107
+ _defineProperty(TextArea_TextArea, "defaultProps", defaultProps);
1108
+
1109
+ _defineProperty(TextArea_TextArea, "componentType", 'TextArea');
1110
+
1111
+ _defineProperty(TextArea_TextArea, "contextType", ControlGroup_["ControlGroupContext"]);
1112
+
1113
+ var TextAreaWithThemeBase = Object(themes_["withSplunkTheme"])(TextArea_TextArea);
1114
+ var TextAreaWithTheme = TextAreaWithThemeBase;
1115
+ TextAreaWithTheme.propTypes = TextArea_TextArea.propTypes;
1116
+ TextAreaWithTheme.componentType = TextArea_TextArea.componentType;
1117
+ /* harmony default export */ var src_TextArea_TextArea = (TextAreaWithTheme);
1118
+ // CONCATENATED MODULE: ./src/TextArea/index.ts
1119
+
1120
+
1121
+
1122
+ /***/ }),
1123
+
1124
+ /***/ 15:
1125
+ /***/ (function(module, exports) {
1126
+
1127
+ module.exports = require("@splunk/react-ui/EventListener");
1128
+
1129
+ /***/ }),
1130
+
1131
+ /***/ 16:
1132
+ /***/ (function(module, exports) {
1133
+
1134
+ module.exports = require("@splunk/react-ui/Button");
1135
+
1136
+ /***/ }),
1137
+
1138
+ /***/ 19:
1139
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1140
+
1141
+ "use strict";
1142
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return CrossMark; });
1143
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
1144
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1145
+ /* harmony import */ var _splunk_react_icons_Close__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(21);
1146
+ /* harmony import */ var _splunk_react_icons_Close__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_react_icons_Close__WEBPACK_IMPORTED_MODULE_1__);
1147
+ /* harmony import */ var _ThemedIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
1148
+ /* harmony import */ var _SVG__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6);
1149
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1150
+
1151
+
1152
+
1153
+
1154
+
1155
+
1156
+ function Prisma24(_ref) {
1157
+ var otherProps = _extends({}, _ref);
1158
+
1159
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_SVG__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], _extends({
1160
+ viewBox: "0 0 24 24"
1161
+ }, otherProps), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", {
1162
+ d: "M6.70711 5.29289C6.31658 4.90237 5.68342 4.90237 5.29289 5.29289C4.90237 5.68342 4.90237 6.31658 5.29289 6.70711L10.5858 12L5.2929 17.2929C4.90238 17.6834 4.90238 18.3166 5.2929 18.7071C5.68342 19.0976 6.31659 19.0976 6.70711 18.7071L12 13.4142L17.2929 18.7071C17.6834 19.0976 18.3166 19.0976 18.7071 18.7071C19.0976 18.3166 19.0976 17.6834 18.7071 17.2929L13.4142 12L18.7071 6.70711C19.0976 6.31658 19.0976 5.68342 18.7071 5.29289C18.3166 4.90237 17.6834 4.90237 17.2929 5.29289L12 10.5858L6.70711 5.29289Z",
1163
+ fill: "currentColor"
1164
+ }));
1165
+ }
1166
+
1167
+ function Prisma16(_ref2) {
1168
+ var otherProps = _extends({}, _ref2);
1169
+
1170
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_SVG__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], _extends({
1171
+ viewBox: "0 0 16 16"
1172
+ }, otherProps), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", {
1173
+ d: "M12.2024 2.69009C12.5092 2.38325 13.0067 2.38325 13.3136 2.69009C13.6204 2.99693 13.6204 3.49442 13.3136 3.80126L9.11721 7.99762L13.3114 12.1918C13.6206 12.501 13.6206 13.0023 13.3114 13.3114C13.0023 13.6206 12.501 13.6206 12.1918 13.3114L7.99762 9.11721L3.885 13.2298C3.57816 13.5367 3.08067 13.5367 2.77383 13.2298C2.46699 12.923 2.46699 12.4255 2.77383 12.1187L6.88645 8.00604L2.69183 3.81142C2.38267 3.50226 2.38267 3.001 2.69183 2.69183C3.001 2.38267 3.50226 2.38267 3.81142 2.69183L8.00604 6.88646L12.2024 2.69009Z",
1174
+ fill: "currentColor"
1175
+ }));
1176
+ }
1177
+
1178
+ function CrossMark(props) {
1179
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ThemedIcon__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"], _extends({
1180
+ Enterprise: _splunk_react_icons_Close__WEBPACK_IMPORTED_MODULE_1___default.a,
1181
+ Prisma16: Prisma16,
1182
+ Prisma24: Prisma24
1183
+ }, props));
1184
+ }
1185
+
1186
+ /***/ }),
1187
+
1188
+ /***/ 2:
1189
+ /***/ (function(module, exports) {
1190
+
1191
+ module.exports = require("react");
1192
+
1193
+ /***/ }),
1194
+
1195
+ /***/ 21:
1196
+ /***/ (function(module, exports) {
1197
+
1198
+ module.exports = require("@splunk/react-icons/Close");
1199
+
1200
+ /***/ }),
1201
+
1202
+ /***/ 3:
1203
+ /***/ (function(module, exports) {
1204
+
1205
+ module.exports = require("styled-components");
1206
+
1207
+ /***/ }),
1208
+
1209
+ /***/ 31:
1210
+ /***/ (function(module, exports) {
1211
+
1212
+ module.exports = require("@splunk/ui-utils/style");
1213
+
1214
+ /***/ }),
1215
+
1216
+ /***/ 34:
1217
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1218
+
1219
+ "use strict";
1220
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Search; });
1221
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
1222
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1223
+ /* harmony import */ var _splunk_react_icons_Search__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(41);
1224
+ /* harmony import */ var _splunk_react_icons_Search__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_react_icons_Search__WEBPACK_IMPORTED_MODULE_1__);
1225
+ /* harmony import */ var _ThemedIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
1226
+ /* harmony import */ var _SVG__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6);
1227
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1228
+
1229
+
1230
+
1231
+
1232
+
1233
+
1234
+ function Prisma24(_ref) {
1235
+ var otherProps = _extends({}, _ref);
1236
+
1237
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_SVG__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], _extends({
1238
+ viewBox: "0 0 24 24"
1239
+ }, otherProps), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", {
1240
+ d: "M10.5,3.0015 C14.6421,3.0015 18,6.3593 18,10.5015 C18,12.2112 17.4279,13.7873 16.4647,15.0489 L20.7077,19.292 C21.0983,19.6825 21.0983,20.3156 20.7077,20.7062 C20.3172,21.0967 19.6841,21.0967 19.2935,20.7062 L15.0509,16.4635 C13.7888,17.4283 12.2113,18.0015 10.5,18.0015 C6.3579,18.0015 3,14.6436 3,10.5015 C3,6.3593 6.3579,3.0015 10.5,3.0015 Z M10.5,5.0015 C7.4624,5.0015 5,7.4639 5,10.5015 C5,13.539 7.4624,16.0015 10.5,16.0015 C13.5376,16.0015 16,13.539 16,10.5015 C16,7.4639 13.5376,5.0015 10.5,5.0015 Z",
1241
+ fill: "currentColor"
1242
+ }));
1243
+ }
1244
+
1245
+ function Prisma16(_ref2) {
1246
+ var otherProps = _extends({}, _ref2);
1247
+
1248
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_SVG__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], _extends({
1249
+ viewBox: "0 0 16 16"
1250
+ }, otherProps), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", {
1251
+ d: "M6.85277,2.0015 C9.53288,2.0015 11.7055,4.1741 11.7055,6.8542 C11.7055,7.8463 11.4079,8.7688 10.897,9.5373 L10.9245,9.5098 L14.0018,12.5871 L12.5876,14.0014 L9.51025,10.924 L9.53587,10.8984 C8.76733,11.4093 7.84481,11.707 6.85277,11.707 C4.17266,11.707 2,9.5343 2,6.8542 C2,4.1741 4.17266,2.0015 6.85277,2.0015 Z M6.85277,4.0015 C5.27723,4.0015 4,5.2787 4,6.8542 C4,8.4298 5.27723,9.707 6.85277,9.707 C8.42831,9.707 9.70554,8.4298 9.70554,6.8542 C9.70554,5.2787 8.42831,4.0015 6.85277,4.0015 Z",
1252
+ fill: "currentColor"
1253
+ }));
1254
+ }
1255
+
1256
+ function Search(props) {
1257
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ThemedIcon__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"], _extends({
1258
+ Enterprise: _splunk_react_icons_Search__WEBPACK_IMPORTED_MODULE_1___default.a,
1259
+ Prisma16: Prisma16,
1260
+ Prisma24: Prisma24
1261
+ }, props));
1262
+ }
1263
+
1264
+ /***/ }),
1265
+
1266
+ /***/ 4:
1267
+ /***/ (function(module, exports) {
1268
+
1269
+ module.exports = require("lodash");
1270
+
1271
+ /***/ }),
1272
+
1273
+ /***/ 41:
1274
+ /***/ (function(module, exports) {
1275
+
1276
+ module.exports = require("@splunk/react-icons/Search");
1277
+
1278
+ /***/ }),
1279
+
1280
+ /***/ 5:
1281
+ /***/ (function(module, exports) {
1282
+
1283
+ module.exports = require("@splunk/ui-utils/i18n");
1284
+
1285
+ /***/ }),
1286
+
1287
+ /***/ 6:
1288
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1289
+
1290
+ "use strict";
1291
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SVG; });
1292
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
1293
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1294
+ /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
1295
+ /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_1__);
1296
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1297
+
1298
+
1299
+
1300
+ var Styled = styled_components__WEBPACK_IMPORTED_MODULE_1___default.a.svg.withConfig({
1301
+ displayName: "SVG__Styled",
1302
+ componentId: "sc-1bz0ryh-0"
1303
+ })(["flex:0 0 auto;"]);
1304
+ function SVG(props) {
1305
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Styled, _extends({
1306
+ xmlns: "http://www.w3.org/2000/svg"
1307
+ }, props));
1308
+ }
1309
+
1310
+ /***/ }),
1311
+
1312
+ /***/ 7:
1313
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1314
+
1315
+ "use strict";
1316
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Icon; });
1317
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
1318
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1319
+ /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1);
1320
+ /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
1321
+ /* harmony import */ var _splunk_themes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(0);
1322
+ /* harmony import */ var _splunk_themes__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_splunk_themes__WEBPACK_IMPORTED_MODULE_2__);
1323
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
1324
+
1325
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
1326
+
1327
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1328
+
1329
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1330
+
1331
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
1332
+
1333
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
1334
+
1335
+
1336
+
1337
+
1338
+ var inlineStyles = {
1339
+ display: 'inline-block',
1340
+ flex: '0 0 auto',
1341
+ overflow: 'visible',
1342
+ verticalAlign: 'middle'
1343
+ };
1344
+ var blockStyles = {
1345
+ display: 'block',
1346
+ flex: '0 0 auto',
1347
+ margin: '0 auto',
1348
+ overflow: 'visible'
1349
+ };
1350
+ var propTypes = {
1351
+ Enterprise: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func,
1352
+ enterpriseSize: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string]),
1353
+ enterpriseWidth: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string]),
1354
+ enterpriseHeight: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string]),
1355
+ Prisma24: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func.isRequired,
1356
+ Prisma20: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func,
1357
+ Prisma16: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func,
1358
+ prismaSize: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['medium', 'small']),
1359
+ inline: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,
1360
+ screenReaderText: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string
1361
+ };
1362
+ var defaultProps = {
1363
+ inline: true,
1364
+ prismaSize: 'medium'
1365
+ };
1366
+ function Icon(_ref) {
1367
+ var Enterprise = _ref.Enterprise,
1368
+ Prisma24 = _ref.Prisma24,
1369
+ Prisma20 = _ref.Prisma20,
1370
+ Prisma16 = _ref.Prisma16,
1371
+ prismaSize = _ref.prismaSize,
1372
+ inline = _ref.inline,
1373
+ enterpriseSize = _ref.enterpriseSize,
1374
+ enterpriseWidth = _ref.enterpriseWidth,
1375
+ enterpriseHeight = _ref.enterpriseHeight,
1376
+ screenReaderText = _ref.screenReaderText,
1377
+ otherProps = _objectWithoutProperties(_ref, ["Enterprise", "Prisma24", "Prisma20", "Prisma16", "prismaSize", "inline", "enterpriseSize", "enterpriseWidth", "enterpriseHeight", "screenReaderText"]);
1378
+
1379
+ var _useSplunkTheme = Object(_splunk_themes__WEBPACK_IMPORTED_MODULE_2__["useSplunkTheme"])(),
1380
+ family = _useSplunkTheme.family,
1381
+ density = _useSplunkTheme.density; // Enterprise - all variants
1382
+
1383
+
1384
+ if (family === 'enterprise') {
1385
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Enterprise, _extends({
1386
+ size: enterpriseSize,
1387
+ width: enterpriseWidth,
1388
+ height: enterpriseHeight,
1389
+ screenReaderText: screenReaderText || null,
1390
+ hideDefaultTooltip: true,
1391
+ inline: inline
1392
+ }, otherProps));
1393
+ }
1394
+
1395
+ var prismaProps = _objectSpread({
1396
+ 'aria-label': screenReaderText,
1397
+ style: inline ? inlineStyles : blockStyles
1398
+ }, otherProps); // Prisma - small+compact, small+comfortable
1399
+
1400
+
1401
+ if (prismaSize === 'small') {
1402
+ var SVG = Prisma16 || Prisma24;
1403
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(SVG, _extends({
1404
+ width: "16",
1405
+ height: "16"
1406
+ }, prismaProps));
1407
+ } // Prisma - medium+compact
1408
+
1409
+
1410
+ if (density === 'compact') {
1411
+ var _SVG = Prisma20 || Prisma24;
1412
+
1413
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_SVG, _extends({
1414
+ width: "20",
1415
+ height: "20"
1416
+ }, prismaProps));
1417
+ } // Prisma - medium+comfortable
1418
+
1419
+
1420
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Prisma24, _extends({
1421
+ width: "24",
1422
+ height: "24"
1423
+ }, prismaProps));
1424
+ }
1425
+ Icon.propTypes = propTypes;
1426
+ Icon.defaultProps = defaultProps;
1427
+
1428
+ /***/ }),
1429
+
1430
+ /***/ 78:
1431
+ /***/ (function(module, exports) {
1432
+
1433
+ module.exports = require("@splunk/react-ui/ControlGroup");
1434
+
1435
+ /***/ }),
1436
+
1437
+ /***/ 8:
1438
+ /***/ (function(module, exports) {
1439
+
1440
+ module.exports = require("@splunk/react-ui/Box");
1441
+
1442
+ /***/ })
1443
+
1444
+ /******/ });