@splunk/react-ui 4.27.0 → 4.28.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 (53) hide show
  1. package/Box.js +45 -44
  2. package/Button.js +1 -2
  3. package/ButtonSimple.js +145 -147
  4. package/CHANGELOG.md +28 -2
  5. package/CollapsiblePanel.js +1 -0
  6. package/JSONTree.js +1311 -629
  7. package/Markdown.js +521 -222
  8. package/Modal.js +11 -4
  9. package/Multiselect.js +844 -804
  10. package/Paginator.js +593 -271
  11. package/TabBar.js +487 -312
  12. package/Table.js +5 -3
  13. package/TextArea.js +368 -344
  14. package/Tree.js +607 -519
  15. package/package.json +1 -1
  16. package/types/src/Box/Box.d.ts +3 -2
  17. package/types/src/File/docs/examples/FullScreen.d.ts +1 -14
  18. package/types/src/JSONTree/JSONTreeItem.d.ts +45 -0
  19. package/types/src/JSONTree/renderTreeItems.d.ts +17 -0
  20. package/types/src/Markdown/renderers/MarkdownAnchorHeading.d.ts +1 -1
  21. package/types/src/Markdown/renderers/MarkdownBlockquote.d.ts +1 -1
  22. package/types/src/Markdown/renderers/MarkdownCode.d.ts +1 -1
  23. package/types/src/Markdown/renderers/MarkdownCodeBlock.d.ts +1 -1
  24. package/types/src/Markdown/renderers/MarkdownHeading.d.ts +1 -1
  25. package/types/src/Markdown/renderers/MarkdownImage.d.ts +1 -1
  26. package/types/src/Markdown/renderers/MarkdownItem.d.ts +1 -1
  27. package/types/src/Markdown/renderers/MarkdownList.d.ts +1 -1
  28. package/types/src/Markdown/renderers/MarkdownParagraph.d.ts +1 -1
  29. package/types/src/Modal/Modal.d.ts +4 -5
  30. package/types/src/Multiselect/Normal.d.ts +1 -0
  31. package/types/src/Paginator/Button.d.ts +8 -3
  32. package/types/src/Paginator/Compact.d.ts +50 -0
  33. package/types/src/Paginator/PageControl.d.ts +37 -0
  34. package/types/src/Paginator/PageSelect.d.ts +32 -0
  35. package/types/src/Paginator/Paginator.d.ts +9 -4
  36. package/types/src/Paginator/docs/examples/Compact.d.ts +2 -0
  37. package/types/src/Paginator/docs/examples/CompactCustomLabel.d.ts +2 -0
  38. package/types/src/Paginator/docs/examples/CompactWithLabel.d.ts +2 -0
  39. package/types/src/Paginator/docs/examples/Labelled.d.ts +2 -0
  40. package/types/src/Paginator/docs/examples/PageControl.d.ts +2 -0
  41. package/types/src/Paginator/icons/ChevronLeft.d.ts +5 -0
  42. package/types/src/Paginator/icons/ChevronRight.d.ts +5 -0
  43. package/types/src/SlidingPanels/docs/examples/Modal.d.ts +1 -13
  44. package/types/src/TabBar/Tab.d.ts +12 -2
  45. package/types/src/TabBar/TabBar.d.ts +4 -3
  46. package/types/src/TabBar/TabBarContext.d.ts +6 -1
  47. package/types/src/TextArea/TextArea.d.ts +3 -2
  48. package/types/src/TextArea/icons/ClearButton.d.ts +3 -0
  49. package/types/src/TextArea/icons/SearchIcon.d.ts +1 -0
  50. package/types/src/Tree/TreeContext.d.ts +2 -1
  51. package/types/src/Tree/TreeItem.d.ts +18 -5
  52. package/types/src/JSONTree/JSONTreeContext.d.ts +0 -7
  53. package/types/src/JSONTree/TreeNode.d.ts +0 -44
package/TextArea.js CHANGED
@@ -61,7 +61,7 @@
61
61
  e.r(t);
62
62
  // EXPORTS
63
63
  e.d(t, {
64
- default: () => /* reexport */ Pe
64
+ default: () => /* reexport */ De
65
65
  });
66
66
  // CONCATENATED MODULE: external "react"
67
67
  const r = require("react");
@@ -76,8 +76,8 @@
76
76
  const s = require("lodash/has");
77
77
  var c = e.n(s);
78
78
  // CONCATENATED MODULE: external "lodash/keys"
79
- const d = require("lodash/keys");
80
- var p = e.n(d);
79
+ const p = require("lodash/keys");
80
+ var d = e.n(p);
81
81
  // CONCATENATED MODULE: external "lodash/noop"
82
82
  const u = require("lodash/noop");
83
83
  var f = e.n(u);
@@ -92,199 +92,189 @@
92
92
  var g = e.n(y);
93
93
  // CONCATENATED MODULE: external "@splunk/react-ui/ControlGroup"
94
94
  const x = require("@splunk/react-ui/ControlGroup");
95
- // CONCATENATED MODULE: external "@splunk/react-icons/Cross"
96
- const w = require("@splunk/react-icons/Cross");
97
- var C = e.n(w);
98
- // CONCATENATED MODULE: external "@splunk/react-icons/enterprise/Close"
99
- const k = require("@splunk/react-icons/enterprise/Close");
100
- var S = e.n(k);
101
- // CONCATENATED MODULE: external "@splunk/react-icons/enterprise/Search"
102
- const A = require("@splunk/react-icons/enterprise/Search");
103
- var O = e.n(A);
104
95
  // CONCATENATED MODULE: external "@splunk/react-ui/EventListener"
105
- const I = require("@splunk/react-ui/EventListener");
106
- var j = e.n(I);
107
- // CONCATENATED MODULE: external "@splunk/react-icons/Magnifier"
108
- const E = require("@splunk/react-icons/Magnifier");
109
- var T = e.n(E);
110
- // CONCATENATED MODULE: external "@splunk/ui-utils/style"
111
- const M = require("@splunk/ui-utils/style");
96
+ const w = require("@splunk/react-ui/EventListener");
97
+ var C = e.n(w);
112
98
  // CONCATENATED MODULE: external "@splunk/themes"
113
- const $ = require("@splunk/themes");
99
+ const k = require("@splunk/themes");
114
100
  // CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
115
- const P = require("@splunk/ui-utils/i18n");
101
+ const S = require("@splunk/ui-utils/i18n");
102
+ // CONCATENATED MODULE: external "@splunk/ui-utils/style"
103
+ const A = require("@splunk/ui-utils/style");
104
+ // CONCATENATED MODULE: external "@splunk/react-icons/Cross"
105
+ const O = require("@splunk/react-icons/Cross");
106
+ var I = e.n(O);
107
+ // CONCATENATED MODULE: external "@splunk/react-icons/enterprise/Close"
108
+ const j = require("@splunk/react-icons/enterprise/Close");
109
+ var E = e.n(j);
116
110
  // CONCATENATED MODULE: external "styled-components"
117
- const _ = require("styled-components");
118
- var D = e.n(_);
111
+ const T = require("styled-components");
112
+ var M = e.n(T);
119
113
  // CONCATENATED MODULE: external "@splunk/react-ui/Box"
120
- const R = require("@splunk/react-ui/Box");
121
- var q = e.n(R);
114
+ const P = require("@splunk/react-ui/Box");
115
+ var $ = e.n(P);
122
116
  // CONCATENATED MODULE: external "@splunk/react-ui/Button"
123
- const N = require("@splunk/react-ui/Button");
124
- var W = e.n(N);
117
+ const _ = require("@splunk/react-ui/Button");
118
+ var D = e.n(_);
125
119
  // CONCATENATED MODULE: ./src/TextArea/TextAreaStyles.ts
126
- var B = (0, _.css)([ "border-radius:", ";cursor:pointer;font-size:0.83333em;flex-grow:0;", ";&:not([disabled]){color:", ";}" ], (0,
127
- $.pick)({
128
- enterprise: $.variables.borderRadius,
120
+ var q = M()(D()).withConfig({
121
+ displayName: "TextAreaStyles__StyledClearButton",
122
+ componentId: "gfy8yp-0"
123
+ })([ "display:none;visibility:hidden;border-radius:", ";cursor:pointer;font-size:0.83333em;flex-grow:0;", ";&:not([disabled]){color:", ";}" ], (0,
124
+ k.pick)({
125
+ enterprise: k.variables.borderRadius,
129
126
  prisma: "50%"
130
- }), (0, $.pick)({
131
- enterprise: (0, _.css)([ "width:", ";height:", ";" ], $.variables.inputHeight, $.variables.inputHeight),
127
+ }), (0, k.pick)({
128
+ enterprise: (0, T.css)([ "width:", ";height:", ";" ], k.variables.inputHeight, k.variables.inputHeight),
132
129
  prisma: {
133
- comfortable: (0, _.css)([ "width:26px;min-width:26px;min-height:26px;margin:8px;padding:0;" ]),
134
- compact: (0, _.css)([ "width:22px;min-width:22px;min-height:22px;margin:8px;padding:0;" ])
130
+ comfortable: (0, T.css)([ "width:26px;min-width:26px;min-height:26px;margin:8px;padding:0;" ]),
131
+ compact: (0, T.css)([ "width:22px;min-width:22px;min-height:22px;margin:8px;padding:0;" ])
135
132
  }
136
- }), (0, $.pick)({
133
+ }), (0, k.pick)({
137
134
  enterprise: {
138
- light: $.variables.gray60,
139
- dark: $.variables.white
135
+ light: k.variables.gray60,
136
+ dark: k.variables.white
140
137
  },
141
- prisma: $.variables.contentColorMuted
138
+ prisma: k.variables.contentColorMuted
142
139
  }));
143
- var z = D()(W()).withConfig({
144
- displayName: "TextAreaStyles__StyledClearButton",
145
- componentId: "gfy8yp-0"
146
- })([ "display:none;visibility:hidden;", "" ], B);
147
- var F = D().span.withConfig({
140
+ var W = M().span.withConfig({
148
141
  displayName: "TextAreaStyles__StyledSearchIconWrapper",
149
142
  componentId: "gfy8yp-1"
150
- })([ "", ";color:", ";pointer-events:none;padding:", ";", "" ], $.mixins.reset("inline-block"), (0,
151
- $.pick)({
143
+ })([ "", ";color:", ";pointer-events:none;padding:", ";", "" ], k.mixins.reset("inline-block"), (0,
144
+ k.pick)({
152
145
  enterprise: {
153
- light: $.variables.gray60,
154
- dark: $.variables.white
146
+ light: k.variables.gray60,
147
+ dark: k.variables.white
155
148
  },
156
- prisma: $.variables.contentColorMuted
157
- }), (0, $.pick)({
149
+ prisma: k.variables.contentColorMuted
150
+ }), (0, k.pick)({
158
151
  comfortable: "0 8px",
159
152
  compact: "0 6px"
160
153
  }), (function(e) {
161
154
  var t = e.$disabled;
162
- return t && (0, _.css)([ "", "" ], (0, $.pick)({
163
- enterprise: (0, _.css)([ "color:", ";" ], $.variables.textDisabledColor),
164
- prisma: (0, _.css)([ "color:", ";" ], $.variables.contentColorDisabled)
155
+ return t && (0, T.css)([ "", "" ], (0, k.pick)({
156
+ enterprise: (0, T.css)([ "color:", ";" ], k.variables.textDisabledColor),
157
+ prisma: (0, T.css)([ "color:", ";" ], k.variables.contentColorDisabled)
165
158
  }));
166
159
  }));
167
- var H = "230px";
168
- var V = D()(q()).withConfig({
160
+ var N = "230px";
161
+ var R = M()($()).withConfig({
169
162
  displayName: "TextAreaStyles__StyledBox",
170
163
  componentId: "gfy8yp-2"
171
- })([ "display:flex;justify-content:space-between;flex-grow:1;flex-shrink:1;position:relative;&[data-inline]{width:", ";flex-basis:", ";[data-inline] + &{margin-left:", ";}}&:focus-within:not([disabled]){", "{", "}", "{visibility:visible;display:block;}}" ], H, H, $.variables.spacingSmall,
172
- /* sc-sel */
173
- F, (0, $.pick)({
174
- enterprise: (0, _.css)([ "display:none;" ])
164
+ })([ "display:flex;justify-content:space-between;flex-grow:1;flex-shrink:1;position:relative;&[data-inline]{width:", ";flex-basis:", ";[data-inline] + &{margin-left:", ";}}&:focus-within:not([disabled]){", " ", "{visibility:visible;display:block;}}" ], N, N, k.variables.spacingSmall, (0,
165
+ k.pick)({
166
+ enterprise: (0, T.css)([ "", "{display:none;}" ],
167
+ /* sc-sel */
168
+ W)
175
169
  }),
176
170
  /* sc-sel */
177
- z);
178
- var K = 12;
179
- var L = 10;
180
- var G = 0;
181
- var Q = D().span.withConfig({
171
+ q);
172
+ var B = 12;
173
+ var z = 10;
174
+ var F = 0;
175
+ var H = M().span.withConfig({
182
176
  displayName: "TextAreaStyles__StyledTextAreaWrapper",
183
177
  componentId: "gfy8yp-3"
184
- })([ "", " flex-grow:1;min-height:", ";position:relative;overflow:hidden;border:1px solid ", ";border-radius:", ";box-sizing:border-box;background-color:", ";box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);align-items:center;padding:", ";", " ", " &:hover:not([disabled]){border-color:", ";}&:focus-within:not([disabled]){box-shadow:", ";color:", ";}", " ", " ", " ", "" ], $.mixins.reset("inline-flex"), $.variables.inputHeight, (0,
185
- $.pick)({
178
+ })([ "", " flex-grow:1;min-height:", ";position:relative;overflow:hidden;border:1px solid ", ";border-radius:", ";box-sizing:border-box;background-color:", ";box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);align-items:center;padding:", ";", " ", " &:hover:not([disabled]){border-color:", ";}&:focus-within:not([disabled]){box-shadow:", ";color:", ";}", " ", " ", " ", "" ], k.mixins.reset("inline-flex"), k.variables.inputHeight, (0,
179
+ k.pick)({
186
180
  enterprise: {
187
- light: $.variables.gray60,
188
- dark: $.variables.gray20
181
+ light: k.variables.gray60,
182
+ dark: k.variables.gray20
189
183
  },
190
- prisma: $.variables.interactiveColorBorder
191
- }), $.variables.borderRadius, (0, $.pick)({
184
+ prisma: k.variables.interactiveColorBorder
185
+ }), k.variables.borderRadius, (0, k.pick)({
192
186
  enterprise: {
193
- light: $.variables.white,
194
- dark: $.variables.gray22
187
+ light: k.variables.white,
188
+ dark: k.variables.gray22
195
189
  },
196
- prisma: $.variables.transparent
197
- }), (0, $.pick)({
198
- enterprise: "0px ".concat(G, "px 0px ").concat(L, "px"),
199
- prisma: "0px ".concat(K, "px")
190
+ prisma: k.variables.transparent
191
+ }), (0, k.pick)({
192
+ enterprise: "0px ".concat(F, "px 0px ").concat(z, "px"),
193
+ prisma: "0px ".concat(B, "px")
200
194
  }), (function(e) {
201
195
  var t = e.$hasEndAdornment;
202
- return t && (0, _.css)([ "padding-right:0;" ]);
196
+ return t && (0, T.css)([ "padding-right:0;" ]);
203
197
  }), (function(e) {
204
198
  var t = e.$hasStartAdornment;
205
- return t && (0, _.css)([ "padding-left:0;" ]);
206
- }), (0, $.pick)({
199
+ return t && (0, T.css)([ "padding-left:0;" ]);
200
+ }), (0, k.pick)({
207
201
  enterprise: {
208
- light: $.variables.gray60,
209
- dark: $.variables.gray20
202
+ light: k.variables.gray60,
203
+ dark: k.variables.gray20
210
204
  },
211
- prisma: $.variables.interactiveColorBorderHover
212
- }), $.variables.focusShadow, $.variables.contentColorActive, (function(e) {
205
+ prisma: k.variables.interactiveColorBorderHover
206
+ }), k.variables.focusShadow, k.variables.contentColorActive, (function(e) {
213
207
  var t = e.$error;
214
- return t && (0, _.css)([ "&,&:hover:not([disabled]){border-color:", ";}&:focus-within:not([disabled]){box-shadow:", ";color:", ";}" ], $.variables.accentColorNegative, $.variables.focusShadow, $.variables.contentColorActive);
208
+ return t && (0, T.css)([ "&,&:hover:not([disabled]){border-color:", ";}&:focus-within:not([disabled]){box-shadow:", ";color:", ";}" ], k.variables.accentColorNegative, k.variables.focusShadow, k.variables.contentColorActive);
215
209
  }), (function(e) {
216
210
  var t = e.$append;
217
- return t && (0, _.css)([ "margin-right:-1px;border-top-right-radius:0;border-bottom-right-radius:0;border-right:none;" ]);
211
+ return t && (0, T.css)([ "margin-right:-1px;border-top-right-radius:0;border-bottom-right-radius:0;border-right:none;" ]);
218
212
  }), (function(e) {
219
213
  var t = e.$prepend;
220
- return t && (0, _.css)([ "border-top-left-radius:0;border-bottom-left-radius:0;" ]);
214
+ return t && (0, T.css)([ "border-top-left-radius:0;border-bottom-left-radius:0;" ]);
221
215
  }), (function(e) {
222
216
  var t = e.disabled;
223
- return t && (0, _.css)([ "", " box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);" ], (0,
224
- $.pick)({
217
+ return t && (0, T.css)([ "", " box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);" ], (0,
218
+ k.pick)({
225
219
  enterprise: {
226
- light: (0, _.css)([ "background-color:", ";border-color:", ";" ], $.variables.gray96, $.variables.gray92),
227
- dark: (0, _.css)([ "background-color:", ";border-color:", ";" ], $.variables.gray22, $.variables.gray30)
220
+ light: (0, T.css)([ "background-color:", ";border-color:", ";" ], k.variables.gray96, k.variables.gray92),
221
+ dark: (0, T.css)([ "background-color:", ";border-color:", ";" ], k.variables.gray22, k.variables.gray30)
228
222
  },
229
- prisma: (0, _.css)([ "border-color:", ";" ], $.variables.interactiveColorBorderDisabled)
223
+ prisma: (0, T.css)([ "border-color:", ";" ], k.variables.interactiveColorBorderDisabled)
230
224
  }));
231
225
  }));
232
- var U = D().textarea.withConfig({
226
+ var V = M().textarea.withConfig({
233
227
  displayName: "TextAreaStyles__StyledTextArea",
234
228
  componentId: "gfy8yp-4"
235
- })([ "", ";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;}", " ", "" ], $.mixins.reset("inline-flex"), $.variables.contentColorActive, $.variables.sansFontFamily, (0,
236
- $.pick)({
229
+ })([ "", ";outline-style:none;border:0;background:transparent;color:", ";flex-grow:1;font-family:", ";font-size:inherit;line-height:inherit;padding-top:", ";padding-bottom:", ";padding-right:", ";position:relative;resize:none;overflow:auto;white-space:pre-wrap;", " &::placeholder{color:", ";opacity:1;}", " ", "" ], k.mixins.reset("inline-flex"), k.variables.contentColorActive, k.variables.sansFontFamily, (0,
230
+ k.pick)({
237
231
  enterprise: {
238
- comfortable: $.variables.spacingQuarter,
232
+ comfortable: k.variables.spacingQuarter,
239
233
  compact: "3px"
240
234
  },
241
235
  prisma: {
242
- comfortable: $.variables.spacingSmall,
236
+ comfortable: k.variables.spacingSmall,
243
237
  compact: "5px"
244
238
  }
245
- }), (0, $.pick)({
239
+ }), (0, k.pick)({
246
240
  enterprise: {
247
- comfortable: $.variables.spacingQuarter,
241
+ comfortable: k.variables.spacingQuarter,
248
242
  compact: "3px"
249
243
  },
250
244
  prisma: {
251
- comfortable: $.variables.spacingSmall,
245
+ comfortable: k.variables.spacingSmall,
252
246
  compact: "5px"
253
247
  }
254
- }), (0, $.pick)({
248
+ }), (0, k.pick)({
255
249
  enterprise: "10px",
256
250
  prisma: "14px"
257
251
  }), (function(e) {
258
252
  var t = e.$rowsMin;
259
- return t && (0, _.css)([ "height:calc( ", " + (", " * ", ") + ", " );" ], $.variables.inputHeight, t - 1, $.variables.lineHeight, t > 1 ? "-3px" : "-2px");
260
- }), $.variables.contentColorMuted, (function(e) {
253
+ return t && (0, T.css)([ "height:calc( ", " + (", " * ", ") + ", " );" ], k.variables.inputHeight, t - 1, k.variables.lineHeight, t > 1 ? "-3px" : "-2px");
254
+ }), k.variables.contentColorMuted, (function(e) {
261
255
  var t = e.$error;
262
- return t && (0, _.css)([ "color:", ";" ], (0, $.pick)({
256
+ return t && (0, T.css)([ "color:", ";" ], (0, k.pick)({
263
257
  enterprise: {
264
- light: $.variables.errorColorD10,
265
- dark: $.variables.errorColorL20
258
+ light: k.variables.errorColorD10,
259
+ dark: k.variables.errorColorL20
266
260
  },
267
- prisma: $.variables.contentColorActive
261
+ prisma: k.variables.contentColorActive
268
262
  }));
269
263
  }), (function(e) {
270
264
  var t = e.disabled;
271
- return t && (0, _.css)([ "cursor:not-allowed;color:", ";&::placeholder{color:", ";}" ], $.variables.contentColorDisabled, $.variables.contentColorDisabled);
265
+ return t && (0, T.css)([ "cursor:not-allowed;color:", ";&::placeholder{color:", ";}" ], k.variables.contentColorDisabled, k.variables.contentColorDisabled);
272
266
  }));
273
- var J = D()(U).withConfig({
267
+ var K = M()(V).withConfig({
274
268
  displayName: "TextAreaStyles__StyledTextAreaShadow",
275
269
  componentId: "gfy8yp-5"
276
270
  })([ "position:absolute;overflow:hidden;left:-10000px;top:-10000px;visibility:hidden;pointer-events:none;width:", ";" ], (function(e) {
277
271
  var t = e.$startAdornmentWidth, r = e.$endAdornmentWidth;
278
- return (0, _.css)([ "calc(100% - (", "));" ], (0, $.pick)({
279
- prisma: (0, _.css)([ "", "px + ", "px" ], t || K, r || K),
280
- enterprise: (0, _.css)([ "", "px + ", "px" ], t || L, r || G)
272
+ return (0, T.css)([ "calc(100% - (", "));" ], (0, k.pick)({
273
+ prisma: (0, T.css)([ "", "px + ", "px" ], t || B, r || B),
274
+ enterprise: (0, T.css)([ "", "px + ", "px" ], t || z, r || F)
281
275
  }));
282
276
  }));
283
- var X = D()(W()).withConfig({
284
- displayName: "TextAreaStyles__StyledVisibilityToggle",
285
- componentId: "gfy8yp-6"
286
- })([ "", "" ], B);
287
- var Y = (0, $.pick)({
277
+ var L = (0, k.pick)({
288
278
  enterprise: {
289
279
  comfortable: "30px",
290
280
  compact: "26px"
@@ -294,54 +284,113 @@
294
284
  compact: "30px"
295
285
  }
296
286
  });
297
- var Z = (0, $.pick)({
287
+ var G = (0, k.pick)({
298
288
  enterprise: "10px",
299
289
  prisma: "14px"
300
290
  });
301
- var ee = D().span.withConfig({
291
+ var Q = M().span.withConfig({
302
292
  displayName: "TextAreaStyles__StyledPlaceholder",
303
- componentId: "gfy8yp-7"
293
+ componentId: "gfy8yp-6"
304
294
  })([ "pointer-events:none;color:", ";position:absolute;overflow:hidden;height:", ";margin-right:", ";", ";", ";", "" ], (0,
305
- $.pick)({
306
- enterprise: $.variables.textGray,
307
- prisma: $.variables.contentColorMuted
308
- }), $.variables.lineHeight, Z, (function(e) {
295
+ k.pick)({
296
+ enterprise: k.variables.textGray,
297
+ prisma: k.variables.contentColorMuted
298
+ }), k.variables.lineHeight, G, (function(e) {
309
299
  var t = e.$hasStartAdornment, r = e.$startAdornmentWidth;
310
- return t && (r ? (0, _.css)([ "margin-left:", "px;" ], r) : (0, _.css)([ "margin-left:", ";" ], Y));
300
+ return t && (r ? (0, T.css)([ "margin-left:", "px;" ], r) : (0, T.css)([ "margin-left:", ";" ], L));
311
301
  }), (function(e) {
312
302
  var t = e.$hasEndAdornment, r = e.$endAdornmentWidth;
313
- return t && (r ? (0, _.css)([ "max-width:calc(100% - ", " - ", "px);" ], Z, r) : (0,
314
- _.css)([ "max-width:calc(100% - ", " - ", ");" ], Z, Y));
303
+ return t && (r ? (0, T.css)([ "max-width:calc(100% - ", " - ", "px);" ], G, r) : (0,
304
+ T.css)([ "max-width:calc(100% - ", " - ", ");" ], G, L));
315
305
  }), (function(e) {
316
306
  var t = e.$hasBothAdornment, r = e.$endAdornmentWidth, n = e.$startAdornmentWidth;
317
- return t && (0, _.css)([ "max-width:calc(100% - ", "px - ", "px);" ], n, r);
307
+ return t && (0, T.css)([ "max-width:calc(100% - ", "px - ", "px);" ], n, r);
318
308
  }));
319
- var te = D().div.withConfig({
309
+ var U = M().div.withConfig({
320
310
  displayName: "TextAreaStyles__StyledAdornmentSpacer",
321
- componentId: "gfy8yp-8"
322
- })([ "display:inline-flex;align-items:center;justify-content:center;height:", ";pointer-events:none;", ";" ], Y, (function(e) {
311
+ componentId: "gfy8yp-7"
312
+ })([ "display:inline-flex;align-items:center;justify-content:center;height:", ";pointer-events:none;", ";" ], L, (function(e) {
323
313
  var t = e.$width;
324
- return t ? (0, _.css)([ "min-width:", "px;" ], t) : (0, _.css)([ "min-width:", ";" ], Y);
314
+ return t ? (0, T.css)([ "min-width:", "px;" ], t) : (0, T.css)([ "min-width:", ";" ], L);
325
315
  }));
326
- var re = D().div.withConfig({
316
+ var J = M().div.withConfig({
327
317
  displayName: "TextAreaStyles__StyledAdornment",
328
- componentId: "gfy8yp-9"
329
- })([ "display:inline-flex;align-items:center;justify-content:center;position:absolute;pointer-events:none;z-index:1;height:", ";color:", ";", " ", ";", "" ], Y, (0,
330
- $.pick)({
318
+ componentId: "gfy8yp-8"
319
+ })([ "display:inline-flex;align-items:center;justify-content:center;position:absolute;pointer-events:none;z-index:1;height:", ";color:", ";", " ", ";", "" ], L, (0,
320
+ k.pick)({
331
321
  enterprise: {
332
- light: $.variables.gray60,
333
- dark: $.variables.white
322
+ light: k.variables.gray60,
323
+ dark: k.variables.white
334
324
  },
335
- prisma: $.variables.contentColorMuted
336
- }), (0, $.pickVariant)("$position", {
337
- start: (0, _.css)([ "top:1px;left:1px;" ]),
338
- end: (0, _.css)([ "top:1px;right:1px;" ])
325
+ prisma: k.variables.contentColorMuted
326
+ }), (0, k.pickVariant)("$position", {
327
+ start: (0, T.css)([ "top:1px;left:1px;" ]),
328
+ end: (0, T.css)([ "top:1px;right:1px;" ])
339
329
  }), (function(e) {
340
330
  var t = e.disabled;
341
- return t && (0, _.css)([ "cursor:not-allowed;color:", ";" ], $.variables.contentColorDisabled);
342
- }), (0, $.pick)({
343
- enterprise: (0, _.css)([ "margin-left:-1px;margin-right:-1px;" ])
331
+ return t && (0, T.css)([ "cursor:not-allowed;color:", ";" ], k.variables.contentColorDisabled);
332
+ }), (0, k.pick)({
333
+ enterprise: (0, T.css)([ "margin-left:-1px;margin-right:-1px;" ])
344
334
  }));
335
+ // CONCATENATED MODULE: ./src/TextArea/icons/ClearButton.tsx
336
+ function X() {
337
+ X = Object.assign || function(e) {
338
+ for (var t = 1; t < arguments.length; t++) {
339
+ var r = arguments[t];
340
+ for (var n in r) {
341
+ if (Object.prototype.hasOwnProperty.call(r, n)) {
342
+ e[n] = r[n];
343
+ }
344
+ }
345
+ }
346
+ return e;
347
+ };
348
+ return X.apply(this, arguments);
349
+ }
350
+ function Y(e) {
351
+ var t = (0, k.useSplunkTheme)(), r = t.isEnterprise, a = t.isCompact;
352
+ var i = r ? "pill" : "secondary";
353
+ var o = a ? "20px" : "24px";
354
+ var l = r ? n().createElement(E(), {
355
+ size: 1
356
+ }) : n().createElement(I(), {
357
+ width: o,
358
+ height: o
359
+ });
360
+
361
+ return n().createElement(q, X({
362
+ "data-test": "clear",
363
+ icon: l,
364
+ appearance: i,
365
+ inline: false
366
+ }, e));
367
+ }
368
+ // CONCATENATED MODULE: external "@splunk/react-icons/Magnifier"
369
+ const Z = require("@splunk/react-icons/Magnifier");
370
+ var ee = e.n(Z);
371
+ // CONCATENATED MODULE: external "@splunk/react-icons/enterprise/Search"
372
+ const te = require("@splunk/react-icons/enterprise/Search");
373
+ var re = e.n(te);
374
+ // CONCATENATED MODULE: ./src/TextArea/icons/SearchIcon.tsx
375
+ function ne() {
376
+ var e = (0, k.useSplunkTheme)(), t = e.isCompact, r = e.isEnterprise;
377
+ if (r) {
378
+
379
+ return n().createElement(re(), {
380
+ hideDefaultTooltip: true,
381
+ inline: false,
382
+ screenReaderText: "Search",
383
+ size: "16px"
384
+ });
385
+ }
386
+ var a = t ? "20px" : "24px";
387
+
388
+ return n().createElement(ee(), {
389
+ "aria-label": "Search",
390
+ height: a,
391
+ width: a
392
+ });
393
+ }
345
394
  // CONCATENATED MODULE: ./src/TextArea/syncHeightWithShadow.ts
346
395
  // This file was adapted from [Call-Em-All's material-ui](https://github.com/mui-org/material-ui),
347
396
  // which is MIT-licensed:
@@ -363,7 +412,7 @@
363
412
  // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
364
413
  // SOFTWARE.
365
414
  // End of MIT license text.
366
- function ne(e) {
415
+ function ae(e) {
367
416
  var t = e.height, r = e.rowsMax, n = e.rowsMin, a = e.shadow;
368
417
  if (a) {
369
418
  var i = window.getComputedStyle(a);
@@ -375,9 +424,9 @@
375
424
  var l = parseInt(o, 10);
376
425
  var s = parseInt(i.getPropertyValue("padding-top"), 10);
377
426
  var c = parseInt(i.getPropertyValue("padding-bottom"), 10);
378
- var d = parseInt(i.getPropertyValue("border-top-width"), 10);
379
- var p = parseInt(i.getPropertyValue("border-bottom-width"), 10);
380
- var u = a.scrollHeight + d + p + 1;
427
+ var p = parseInt(i.getPropertyValue("border-top-width"), 10);
428
+ var d = parseInt(i.getPropertyValue("border-bottom-width"), 10);
429
+ var u = a.scrollHeight + p + d + 1;
381
430
  // need one extra.
382
431
  /* eslint-disable no-restricted-globals */
383
432
  // Leverage the global `isNaN` here for IE support, rather than Number.isNaN.
@@ -386,11 +435,11 @@
386
435
  return false;
387
436
  }
388
437
  /* eslint-enable no-restricted-globals */ if (r >= n) {
389
- var f = r * l + s + c + d + p + 1;
438
+ var f = r * l + s + c + p + d + 1;
390
439
  // need one extra.
391
440
  u = Math.min(f, u);
392
441
  }
393
- var h = n * l + s + c + d + p + 1;
442
+ var h = n * l + s + c + p + d + 1;
394
443
  // need one extra.
395
444
  u = Math.max(h, u);
396
445
  if (t !== u) {
@@ -406,7 +455,7 @@
406
455
  * @param ref - The React callback or object ref. Can be `null` or `undefined`.
407
456
  * @param current - The new value of the ref.
408
457
  */
409
- function ae(e, t) {
458
+ function ie(e, t) {
410
459
  if (e) {
411
460
  if (typeof e === "function") {
412
461
  e(t);
@@ -419,21 +468,21 @@
419
468
  }
420
469
  }
421
470
  // CONCATENATED MODULE: ./src/TextArea/TextArea.tsx
422
- function ie(e) {
471
+ function oe(e) {
423
472
  "@babel/helpers - typeof";
424
473
  if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
425
- ie = function e(t) {
474
+ oe = function e(t) {
426
475
  return typeof t;
427
476
  };
428
477
  } else {
429
- ie = function e(t) {
478
+ oe = function e(t) {
430
479
  return t && typeof Symbol === "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
431
480
  };
432
481
  }
433
- return ie(e);
482
+ return oe(e);
434
483
  }
435
- function oe() {
436
- oe = Object.assign || function(e) {
484
+ function le() {
485
+ le = Object.assign || function(e) {
437
486
  for (var t = 1; t < arguments.length; t++) {
438
487
  var r = arguments[t];
439
488
  for (var n in r) {
@@ -444,36 +493,36 @@
444
493
  }
445
494
  return e;
446
495
  };
447
- return oe.apply(this, arguments);
496
+ return le.apply(this, arguments);
448
497
  }
449
- function le(e) {
450
- return pe(e) || de(e) || ce(e) || se();
498
+ function se(e) {
499
+ return ue(e) || de(e) || pe(e) || ce();
451
500
  }
452
- function se() {
501
+ function ce() {
453
502
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
454
503
  }
455
- function ce(e, t) {
504
+ function pe(e, t) {
456
505
  if (!e) return;
457
- if (typeof e === "string") return ue(e, t);
506
+ if (typeof e === "string") return fe(e, t);
458
507
  var r = Object.prototype.toString.call(e).slice(8, -1);
459
508
  if (r === "Object" && e.constructor) r = e.constructor.name;
460
509
  if (r === "Map" || r === "Set") return Array.from(e);
461
- if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return ue(e, t);
510
+ if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return fe(e, t);
462
511
  }
463
512
  function de(e) {
464
513
  if (typeof Symbol !== "undefined" && Symbol.iterator in Object(e)) return Array.from(e);
465
514
  }
466
- function pe(e) {
467
- if (Array.isArray(e)) return ue(e);
515
+ function ue(e) {
516
+ if (Array.isArray(e)) return fe(e);
468
517
  }
469
- function ue(e, t) {
518
+ function fe(e, t) {
470
519
  if (t == null || t > e.length) t = e.length;
471
520
  for (var r = 0, n = new Array(t); r < t; r++) {
472
521
  n[r] = e[r];
473
522
  }
474
523
  return n;
475
524
  }
476
- function fe(e, t) {
525
+ function he(e, t) {
477
526
  var r = Object.keys(e);
478
527
  if (Object.getOwnPropertySymbols) {
479
528
  var n = Object.getOwnPropertySymbols(e);
@@ -484,26 +533,26 @@
484
533
  }
485
534
  return r;
486
535
  }
487
- function he(e) {
536
+ function ve(e) {
488
537
  for (var t = 1; t < arguments.length; t++) {
489
538
  var r = arguments[t] != null ? arguments[t] : {};
490
539
  if (t % 2) {
491
- fe(Object(r), true).forEach((function(t) {
492
- Ie(e, t, r[t]);
540
+ he(Object(r), true).forEach((function(t) {
541
+ je(e, t, r[t]);
493
542
  }));
494
543
  } else if (Object.getOwnPropertyDescriptors) {
495
544
  Object.defineProperties(e, Object.getOwnPropertyDescriptors(r));
496
545
  } else {
497
- fe(Object(r)).forEach((function(t) {
546
+ he(Object(r)).forEach((function(t) {
498
547
  Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t));
499
548
  }));
500
549
  }
501
550
  }
502
551
  return e;
503
552
  }
504
- function ve(e, t) {
553
+ function me(e, t) {
505
554
  if (e == null) return {};
506
- var r = me(e, t);
555
+ var r = be(e, t);
507
556
  var n, a;
508
557
  if (Object.getOwnPropertySymbols) {
509
558
  var i = Object.getOwnPropertySymbols(e);
@@ -516,7 +565,7 @@
516
565
  }
517
566
  return r;
518
567
  }
519
- function me(e, t) {
568
+ function be(e, t) {
520
569
  if (e == null) return {};
521
570
  var r = {};
522
571
  var n = Object.keys(e);
@@ -528,12 +577,12 @@
528
577
  }
529
578
  return r;
530
579
  }
531
- function be(e, t) {
580
+ function ye(e, t) {
532
581
  if (!(e instanceof t)) {
533
582
  throw new TypeError("Cannot call a class as a function");
534
583
  }
535
584
  }
536
- function ye(e, t) {
585
+ function ge(e, t) {
537
586
  for (var r = 0; r < t.length; r++) {
538
587
  var n = t[r];
539
588
  n.enumerable = n.enumerable || false;
@@ -542,12 +591,12 @@
542
591
  Object.defineProperty(e, n.key, n);
543
592
  }
544
593
  }
545
- function ge(e, t, r) {
546
- if (t) ye(e.prototype, t);
547
- if (r) ye(e, r);
594
+ function xe(e, t, r) {
595
+ if (t) ge(e.prototype, t);
596
+ if (r) ge(e, r);
548
597
  return e;
549
598
  }
550
- function xe(e, t) {
599
+ function we(e, t) {
551
600
  if (typeof t !== "function" && t !== null) {
552
601
  throw new TypeError("Super expression must either be null or a function");
553
602
  }
@@ -558,41 +607,41 @@
558
607
  configurable: true
559
608
  }
560
609
  });
561
- if (t) we(e, t);
610
+ if (t) Ce(e, t);
562
611
  }
563
- function we(e, t) {
564
- we = Object.setPrototypeOf || function e(t, r) {
612
+ function Ce(e, t) {
613
+ Ce = Object.setPrototypeOf || function e(t, r) {
565
614
  t.__proto__ = r;
566
615
  return t;
567
616
  };
568
- return we(e, t);
617
+ return Ce(e, t);
569
618
  }
570
- function Ce(e) {
571
- var t = Ae();
619
+ function ke(e) {
620
+ var t = Oe();
572
621
  return function r() {
573
- var n = Oe(e), a;
622
+ var n = Ie(e), a;
574
623
  if (t) {
575
- var i = Oe(this).constructor;
624
+ var i = Ie(this).constructor;
576
625
  a = Reflect.construct(n, arguments, i);
577
626
  } else {
578
627
  a = n.apply(this, arguments);
579
628
  }
580
- return ke(this, a);
629
+ return Se(this, a);
581
630
  };
582
631
  }
583
- function ke(e, t) {
584
- if (t && (ie(t) === "object" || typeof t === "function")) {
632
+ function Se(e, t) {
633
+ if (t && (oe(t) === "object" || typeof t === "function")) {
585
634
  return t;
586
635
  }
587
- return Se(e);
636
+ return Ae(e);
588
637
  }
589
- function Se(e) {
638
+ function Ae(e) {
590
639
  if (e === void 0) {
591
640
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
592
641
  }
593
642
  return e;
594
643
  }
595
- function Ae() {
644
+ function Oe() {
596
645
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
597
646
  if (Reflect.construct.sham) return false;
598
647
  if (typeof Proxy === "function") return true;
@@ -603,13 +652,13 @@
603
652
  return false;
604
653
  }
605
654
  }
606
- function Oe(e) {
607
- Oe = Object.setPrototypeOf ? Object.getPrototypeOf : function e(t) {
655
+ function Ie(e) {
656
+ Ie = Object.setPrototypeOf ? Object.getPrototypeOf : function e(t) {
608
657
  return t.__proto__ || Object.getPrototypeOf(t);
609
658
  };
610
- return Oe(e);
659
+ return Ie(e);
611
660
  }
612
- function Ie(e, t, r) {
661
+ function je(e, t, r) {
613
662
  if (t in e) {
614
663
  Object.defineProperty(e, t, {
615
664
  value: r,
@@ -622,7 +671,7 @@
622
671
  }
623
672
  return e;
624
673
  }
625
- /** @public */ var je = {
674
+ /** @public */ var Ee = {
626
675
  appearance: i().oneOf([ "default", "search" ]),
627
676
  append: i().bool,
628
677
  autoCapitalize: i().string,
@@ -666,7 +715,7 @@
666
715
  splunkTheme: i().object,
667
716
  value: i().string
668
717
  };
669
- var Ee = {
718
+ var Te = {
670
719
  appearance: "default",
671
720
  append: false,
672
721
  autoFocus: false,
@@ -680,10 +729,15 @@
680
729
  rowsMin: 2,
681
730
  tabIndex: 0
682
731
  };
683
- /** Note: TextArea places role and aria props onto the input. All other props are placed on the wrapper. */ var Te = function(e) {
684
- xe(r, e);
685
- var t = Ce(r);
686
- ge(r, null, [ {
732
+ var Me = function e(t) {
733
+ var r = t ? t.getBoundingClientRect() : undefined;
734
+ var n = r && Math.round(r.width);
735
+ return n;
736
+ };
737
+ /** Note: TextArea places role and aria props onto the input. All other props are placed on the wrapper. */ var Pe = function(e) {
738
+ we(r, e);
739
+ var t = ke(r);
740
+ xe(r, null, [ {
687
741
  key: "validateRows",
688
742
  // @docs-props-type TextAreaPropsBase
689
743
  value: function e(t) {
@@ -693,40 +747,38 @@
693
747
  } ]);
694
748
  function r(e) {
695
749
  var a;
696
- be(this, r);
750
+ ye(this, r);
697
751
  a = t.call(this, e);
698
- Ie(Se(a), "controlledExternally", void 0);
699
- Ie(Se(a), "input", null);
700
- Ie(Se(a), "shadow", null);
701
- Ie(Se(a), "startAdornment", null);
702
- Ie(Se(a), "endAdornment", null);
703
- Ie(Se(a), "getAdornmentWidth", (function() {
704
- var e = a.startAdornment ? a.startAdornment.getBoundingClientRect() : undefined;
705
- var t = e && Math.round(e.width);
706
- if (a.state.startAdornmentWidth !== t) {
752
+ je(Ae(a), "controlledExternally", void 0);
753
+ je(Ae(a), "input", null);
754
+ je(Ae(a), "shadow", null);
755
+ je(Ae(a), "startAdornment", null);
756
+ je(Ae(a), "endAdornment", null);
757
+ je(Ae(a), "getAdornmentWidth", (function() {
758
+ var e = Me(a.startAdornment);
759
+ if (a.state.startAdornmentWidth !== e) {
707
760
  a.setState({
708
- startAdornmentWidth: t
761
+ startAdornmentWidth: e
709
762
  });
710
763
  }
711
- var r = a.endAdornment ? a.endAdornment.getBoundingClientRect() : undefined;
712
- var n = r && Math.round(r.width);
713
- if (a.state.endAdornmentWidth !== n) {
764
+ var t = Me(a.endAdornment);
765
+ if (a.state.endAdornmentWidth !== t) {
714
766
  a.setState({
715
- endAdornmentWidth: n
767
+ endAdornmentWidth: t
716
768
  });
717
769
  }
718
770
  }));
719
- Ie(Se(a), "handleResize", (function() {
771
+ je(Ae(a), "handleResize", (function() {
720
772
  a.syncHeightWithShadow();
721
773
  }));
722
- Ie(Se(a), "handleInputMount", (function(e) {
774
+ je(Ae(a), "handleInputMount", (function(e) {
723
775
  a.input = e;
724
- ae(a.props.inputRef, e);
776
+ ie(a.props.inputRef, e);
725
777
  }));
726
- Ie(Se(a), "handleShadowMount", (function(e) {
778
+ je(Ae(a), "handleShadowMount", (function(e) {
727
779
  a.shadow = e;
728
780
  }));
729
- Ie(Se(a), "handleInputChange", (function(e) {
781
+ je(Ae(a), "handleInputChange", (function(e) {
730
782
  var t, r;
731
783
  var n = e.target.value;
732
784
  var i = a.props.name;
@@ -740,19 +792,19 @@
740
792
  name: i
741
793
  });
742
794
  }));
743
- Ie(Se(a), "handleInputKeyDown", (function(e) {
795
+ je(Ae(a), "handleInputKeyDown", (function(e) {
744
796
  var t, r;
745
797
  (t = (r = a.props).onKeyDown) === null || t === void 0 ? void 0 : t.call(r, e);
746
798
  }));
747
- Ie(Se(a), "handleInputSelect", (function(e) {
799
+ je(Ae(a), "handleInputSelect", (function(e) {
748
800
  var t, r;
749
801
  (t = (r = a.props).onSelect) === null || t === void 0 ? void 0 : t.call(r, e);
750
802
  }));
751
- Ie(Se(a), "handleInputClick", (function(e) {
803
+ je(Ae(a), "handleInputClick", (function(e) {
752
804
  var t, r;
753
805
  (t = (r = a.props).onInputClick) === null || t === void 0 ? void 0 : t.call(r, e);
754
806
  }));
755
- Ie(Se(a), "handleInputFocus", (function(e) {
807
+ je(Ae(a), "handleInputFocus", (function(e) {
756
808
  var t, r;
757
809
  var n = e.target.value;
758
810
  var i = a.props.name;
@@ -761,7 +813,7 @@
761
813
  name: i
762
814
  });
763
815
  }));
764
- Ie(Se(a), "handleInputBlur", (function(e) {
816
+ je(Ae(a), "handleInputBlur", (function(e) {
765
817
  var t, r;
766
818
  var n = e.target.value;
767
819
  var i = a.props.name;
@@ -770,7 +822,7 @@
770
822
  name: i
771
823
  });
772
824
  }));
773
- Ie(Se(a), "handleClear", (function(e) {
825
+ je(Ae(a), "handleClear", (function(e) {
774
826
  var t, r;
775
827
  e.preventDefault();
776
828
  var n = "";
@@ -786,8 +838,8 @@
786
838
  name: i
787
839
  });
788
840
  }));
789
- Ie(Se(a), "syncHeightWithShadow", (function() {
790
- var e = ne({
841
+ je(Ae(a), "syncHeightWithShadow", (function() {
842
+ var e = ae({
791
843
  height: a.state.height,
792
844
  rowsMax: a.props.rowsMax,
793
845
  rowsMin: a.props.rowsMin,
@@ -799,93 +851,63 @@
799
851
  });
800
852
  }
801
853
  }));
802
- Ie(Se(a), "renderEndAdornment", (function() {
854
+ je(Ae(a), "renderAdornment", (function(e, t) {
855
+ var r = a.props.disabled;
856
+ var i = t === "start" ? function(e) {
857
+ a.startAdornment = e;
858
+ } : function(e) {
859
+ a.endAdornment = e;
860
+ };
861
+ var o = {
862
+ ref: i,
863
+ disabled: r,
864
+ $position: t
865
+ };
866
+
867
+ return n().createElement(J, o, e);
868
+ }));
869
+ je(Ae(a), "renderEndAdornment", (function() {
803
870
  var e;
804
871
  var t = a.props, r = t.appearance, i = t.endAdornment, o = t.disabled, l = t.canClear, s = t.splunkTheme;
805
- var c = s.isPrisma, d = s.isEnterprise, p = s.isCompact;
806
- var u = p ? "20px" : "24px";
807
- var f = {
808
- ref: function e(t) {
809
- a.endAdornment = t;
810
- },
811
- disabled: o,
812
- $position: "end"
813
- };
872
+ var c = s.isPrisma, p = s.isEnterprise;
814
873
  if (i) {
815
-
816
- return n().createElement(re, f, i);
874
+ return a.renderAdornment(i, "end");
817
875
  }
818
- var h = a.context;
819
- var v = (e = h.labelAttrs) === null || e === void 0 ? void 0 : e.text;
820
- var m = v ? (0, P._)("Clear ".concat(v, " text field")) : (0, P._)("Clear text field");
821
- if (!c && r === "search") {
822
-
823
- return n().createElement(re, f, n().createElement(z, {
824
- appearance: "pill",
825
- "data-test": "clear",
826
- inline: false,
827
- icon: n().createElement(S(), {
828
- size: 1,
829
- screenReaderText: m
830
- }),
876
+ var d = a.context;
877
+ var u = (e = d.labelAttrs) === null || e === void 0 ? void 0 : e.text;
878
+ var f = u ? (0, S._)("Clear ".concat(u, " text field")) : (0, S._)("Clear text field");
879
+ if (p && r === "search") {
880
+ /* Both icons are rendered, and StyledBox toggles visibility based on :focus-within */
881
+ return a.renderAdornment( n().createElement(n().Fragment, null, n().createElement(Y, {
882
+ "aria-label": f,
831
883
  onClick: a.handleClear
832
- }), n().createElement(F, {
884
+ }), n().createElement(W, {
833
885
  $disabled: o
834
- }, d ? n().createElement(O(), {
835
- hideDefaultTooltip: true,
836
- inline: false,
837
- screenReaderText: null,
838
- size: "16px"
839
- }) : n().createElement(T(), {
840
- height: u,
841
- width: u
842
- })));
886
+ }, n().createElement(ne, null))), "end");
843
887
  }
844
- var b = a.getDisplayValue();
845
- if (!!b && (c && r === "search" || l)) {
846
-
847
- return n().createElement(re, f, !o && n().createElement(z, {
848
- "data-test": "clear",
849
- appearance: "secondary",
850
- onClick: a.handleClear,
851
- icon: n().createElement(C(), {
852
- "aria-label": m,
853
- inline: false,
854
- width: u,
855
- height: u
856
- })
857
- }));
888
+ var h = !!a.getDisplayValue();
889
+ if (h && (c && r === "search" || l)) {
890
+ return a.renderAdornment( n().createElement(n().Fragment, null, !o && n().createElement(Y, {
891
+ "aria-label": f,
892
+ onClick: a.handleClear
893
+ })), "end");
858
894
  }
859
895
  return undefined;
860
896
  }));
861
- Ie(Se(a), "renderStartAdornment", (function() {
897
+ je(Ae(a), "renderStartAdornment", (function() {
862
898
  var e = a.props, t = e.appearance, r = e.startAdornment, i = e.splunkTheme, o = e.disabled;
863
- var l = i.isPrisma, s = i.isCompact;
864
- var c = s ? "20px" : "24px";
865
- var d = {
866
- ref: function e(t) {
867
- a.startAdornment = t;
868
- },
869
- disabled: o,
870
- $position: "start"
871
- };
899
+ var l = i.isPrisma;
872
900
  if (r) {
873
-
874
- return n().createElement(re, d, r);
901
+ return a.renderAdornment(r, "start");
875
902
  }
876
903
  if (l && t === "search") {
877
-
878
- return n().createElement(re, d, n().createElement(F, {
904
+ return a.renderAdornment( n().createElement(W, {
879
905
  $disabled: o
880
- }, n().createElement(T(), {
881
- "aria-label": "Search",
882
- height: c,
883
- width: c
884
- })));
906
+ }, n().createElement(ne, null)), "start");
885
907
  }
886
908
  return undefined;
887
909
  }));
888
- Ie(Se(a), "getDisplayValue", (function() {
910
+ je(Ae(a), "getDisplayValue", (function() {
889
911
  var e = a.isControlled() ? a.props.value : a.state.value;
890
912
  return e;
891
913
  }));
@@ -900,7 +922,7 @@
900
922
  a.handleResize = g()(a.handleResize, 100);
901
923
  return a;
902
924
  }
903
- ge(r, [ {
925
+ xe(r, [ {
904
926
  key: "componentDidMount",
905
927
  value: function e() {
906
928
  l()(this.syncHeightWithShadow);
@@ -944,23 +966,23 @@
944
966
  }, {
945
967
  key: "render",
946
968
  value: function e() {
947
- var t = this.props, r = t.append, a = t.autoCapitalize, i = t.autoComplete, o = t.autoCorrect, l = t.autoFocus, s = t.children, c = t.className, d = t.classNamePrivate, u = t.disabled, h = t.describedBy, m = t.elementRef, y = t.error, g = t.inline, x = t.inputClassName, w = t.inputId, C = t.labelledBy, k = t.maxLength, S = t.name, A = t.placeholder, O = t.prepend, I = t.required, E = t.rowsMin, T = t.spellCheck, $ = t.tabIndex, P = t.title, _ = ve(t, [ "append", "autoCapitalize", "autoComplete", "autoCorrect", "autoFocus", "children", "className", "classNamePrivate", "disabled", "describedBy", "elementRef", "error", "inline", "inputClassName", "inputId", "labelledBy", "maxLength", "name", "placeholder", "prepend", "required", "rowsMin", "spellCheck", "tabIndex", "title" ]);
948
- var D = he(he({}, b()(_, (function(e, t) {
969
+ var t = this.props, r = t.append, a = t.autoCapitalize, i = t.autoComplete, o = t.autoCorrect, l = t.autoFocus, s = t.children, c = t.className, p = t.classNamePrivate, u = t.disabled, h = t.describedBy, m = t.elementRef, y = t.error, g = t.inline, x = t.inputClassName, w = t.inputId, k = t.labelledBy, S = t.maxLength, O = t.name, I = t.placeholder, j = t.prepend, E = t.required, T = t.rowsMin, M = t.spellCheck, P = t.tabIndex, $ = t.title, _ = me(t, [ "append", "autoCapitalize", "autoComplete", "autoCorrect", "autoFocus", "children", "className", "classNamePrivate", "disabled", "describedBy", "elementRef", "error", "inline", "inputClassName", "inputId", "labelledBy", "maxLength", "name", "placeholder", "prepend", "required", "rowsMin", "spellCheck", "tabIndex", "title" ]);
970
+ var D = ve(ve({}, b()(_, (function(e, t) {
949
971
  return t === "role" || t.indexOf("aria-") === 0;
950
972
  }))), {}, {
951
973
  "aria-describedby": h,
952
- "aria-labelledby": C,
974
+ "aria-labelledby": k,
953
975
  "aria-invalid": y || undefined
954
976
  });
955
- var R = v()(_, [ "inputRef", "onBlur", "onChange", "onFocus", "onKeyDown", "onSelect", "onInputClick" ].concat(le(p()(D))));
956
- var q = this.getDisplayValue();
977
+ var q = v()(_, [ "inputRef", "onBlur", "onChange", "onFocus", "onKeyDown", "onSelect", "onInputClick" ].concat(se(d()(D))));
978
+ var W = this.getDisplayValue();
957
979
  var N = {
958
- className: (0, M.toClassName)(c, x),
980
+ className: (0, A.toClassName)(c, x),
959
981
  $append: r || undefined,
960
982
  $error: y,
961
- $prepend: O || undefined
983
+ $prepend: j || undefined
962
984
  };
963
- var W = he(he({}, D), {}, {
985
+ var B = ve(ve({}, D), {}, {
964
986
  "data-test": "textbox",
965
987
  autoCapitalize: a,
966
988
  autoComplete: i,
@@ -968,9 +990,9 @@
968
990
  autoFocus: l,
969
991
  disabled: u,
970
992
  id: w,
971
- maxLength: k,
972
- placeholder: A,
973
- name: S,
993
+ maxLength: S,
994
+ placeholder: I,
995
+ name: O,
974
996
  onChange: this.handleInputChange,
975
997
  onKeyDown: this.handleInputKeyDown,
976
998
  onSelect: this.handleInputSelect,
@@ -978,34 +1000,36 @@
978
1000
  onFocus: this.handleInputFocus,
979
1001
  onBlur: this.handleInputBlur,
980
1002
  ref: this.handleInputMount,
981
- required: I,
982
- spellCheck: T,
1003
+ required: E,
1004
+ spellCheck: M,
983
1005
  style: {
984
1006
  height: this.state.height
985
1007
  },
986
- tabIndex: $,
987
- title: P,
988
- value: q,
1008
+ tabIndex: P,
1009
+ title: $,
1010
+ value: W,
989
1011
  $error: y
990
1012
  });
991
- var B = !!this.renderEndAdornment();
992
- var z = !!this.renderStartAdornment();
1013
+ var z = this.renderStartAdornment();
1014
+ var F = this.renderEndAdornment();
1015
+ var L = !!z;
1016
+ var G = !!F;
993
1017
 
994
- return n().createElement(V, oe({
1018
+ return n().createElement(R, le({
995
1019
  tabIndex: -1,
996
- className: (0, M.toClassName)(c, d),
1020
+ className: (0, A.toClassName)(c, p),
997
1021
  "data-test": "text-area",
998
- "data-test-value": q,
1022
+ "data-test-value": W,
999
1023
  elementRef: m,
1000
1024
  flex: true,
1001
1025
  inline: g
1002
- }, R), this.renderStartAdornment(), n().createElement(Q, oe({
1003
- $hasEndAdornment: B,
1004
- $hasStartAdornment: z,
1026
+ }, q), z, n().createElement(H, le({
1027
+ $hasEndAdornment: G,
1028
+ $hasStartAdornment: L,
1005
1029
  disabled: u
1006
- }, N), z && n().createElement(te, {
1030
+ }, N), L && n().createElement(U, {
1007
1031
  $width: this.state.startAdornmentWidth
1008
- }), n().createElement(J, {
1032
+ }), n().createElement(K, {
1009
1033
  "aria-hidden": "true",
1010
1034
  onChange: f(),
1011
1035
  $startAdornmentWidth: this.state.startAdornmentWidth,
@@ -1013,31 +1037,31 @@
1013
1037
  tabIndex: -1,
1014
1038
  rows: this.props.rowsMin,
1015
1039
  ref: this.handleShadowMount,
1016
- value: A && !q ? A : q
1017
- }), n().createElement(U, oe({
1018
- $rowsMin: E
1019
- }, W, {
1040
+ value: I && !W ? I : W
1041
+ }), n().createElement(V, le({
1042
+ $rowsMin: T
1043
+ }, B, {
1020
1044
  onClick: this.handleInputClick
1021
- })), n().createElement(j(), {
1045
+ })), n().createElement(C(), {
1022
1046
  target: window,
1023
1047
  eventType: "resize",
1024
1048
  listener: this.handleResize
1025
- }), s, B && n().createElement(te, {
1049
+ }), s, G && n().createElement(U, {
1026
1050
  $width: this.state.endAdornmentWidth
1027
- })), this.renderEndAdornment());
1051
+ })), F);
1028
1052
  }
1029
1053
  } ]);
1030
1054
  return r;
1031
1055
  }(r.Component);
1032
- Ie(Te, "propTypes", je);
1033
- Ie(Te, "defaultProps", Ee);
1034
- Ie(Te, "componentType", "TextArea");
1035
- Ie(Te, "contextType", x.ControlGroupContext);
1036
- var Me = (0, $.withSplunkTheme)(Te);
1037
- var $e = Me;
1038
- $e.propTypes = Te.propTypes;
1039
- $e.componentType = Te.componentType;
1040
- /* harmony default export */ const Pe = $e;
1056
+ je(Pe, "propTypes", Ee);
1057
+ je(Pe, "defaultProps", Te);
1058
+ je(Pe, "componentType", "TextArea");
1059
+ je(Pe, "contextType", x.ControlGroupContext);
1060
+ var $e = (0, k.withSplunkTheme)(Pe);
1061
+ var _e = $e;
1062
+ _e.propTypes = Pe.propTypes;
1063
+ _e.componentType = Pe.componentType;
1064
+ /* harmony default export */ const De = _e;
1041
1065
  // CONCATENATED MODULE: ./src/TextArea/index.ts
1042
1066
  module.exports = t;
1043
1067
  /******/})();