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