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