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