@splunk/react-ui 4.26.0 → 4.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Accordion.js +195 -212
- package/CHANGELOG.md +26 -3
- package/CollapsiblePanel.js +554 -325
- package/Color.js +3 -1
- package/ControlGroup.js +1 -0
- package/MIGRATION.mdx +30 -0
- package/Modal.js +15 -6
- package/Table.js +898 -866
- package/Text.js +30 -40
- package/TextArea.js +152 -236
- package/package.json +4 -2
- package/types/src/Accordion/Accordion.d.ts +2 -2
- package/types/src/Accordion/AccordionContext.d.ts +2 -3
- package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +49 -15
- package/types/src/CollapsiblePanel/SingleOpenPanelGroup.d.ts +62 -0
- package/types/src/CollapsiblePanel/SingleOpenPanelGroupContext.d.ts +9 -0
- package/types/src/CollapsiblePanel/docs/examples/MultiControlled.d.ts +2 -2
- package/types/src/CollapsiblePanel/docs/examples/SingleOpenPanelGroupControlled.d.ts +2 -0
- package/types/src/CollapsiblePanel/docs/examples/SingleOpenPanelGroupUncontrolled.d.ts +2 -0
- package/types/src/CollapsiblePanel/icons/ExpandPanel.d.ts +7 -5
- package/types/src/Table/Cell.d.ts +3 -1
- package/types/src/Table/Head.d.ts +2 -2
- package/types/src/Table/HeadCell.d.ts +2 -0
- package/types/src/Table/Row.d.ts +4 -2
- package/types/src/Table/Table.d.ts +1 -1
- package/types/src/Table/Toggle.d.ts +4 -4
- package/types/src/fixtures/text.d.ts +1 -0
- package/types/src/CollapsiblePanel/docs/examples/prisma/BasicControlled.d.ts +0 -2
- package/types/src/CollapsiblePanel/docs/examples/prisma/BasicUncontrolled.d.ts +0 -2
- package/types/src/CollapsiblePanel/docs/examples/prisma/Content.d.ts +0 -1
- package/types/src/CollapsiblePanel/docs/examples/prisma/MultiControlled.d.ts +0 -2
- package/types/src/CollapsiblePanel/docs/examples/prisma/MultiUncontrolled.d.ts +0 -2
package/TextArea.js
CHANGED
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
e.r(t);
|
|
62
62
|
// EXPORTS
|
|
63
63
|
e.d(t, {
|
|
64
|
-
default: () => /* reexport */
|
|
64
|
+
default: () => /* reexport */ Pe
|
|
65
65
|
});
|
|
66
66
|
// CONCATENATED MODULE: external "react"
|
|
67
67
|
const r = require("react");
|
|
@@ -76,8 +76,8 @@
|
|
|
76
76
|
const s = require("lodash/has");
|
|
77
77
|
var c = e.n(s);
|
|
78
78
|
// CONCATENATED MODULE: external "lodash/keys"
|
|
79
|
-
const
|
|
80
|
-
var
|
|
79
|
+
const d = require("lodash/keys");
|
|
80
|
+
var p = e.n(d);
|
|
81
81
|
// CONCATENATED MODULE: external "lodash/noop"
|
|
82
82
|
const u = require("lodash/noop");
|
|
83
83
|
var f = e.n(u);
|
|
@@ -103,109 +103,98 @@
|
|
|
103
103
|
var O = e.n(A);
|
|
104
104
|
// CONCATENATED MODULE: external "@splunk/react-ui/EventListener"
|
|
105
105
|
const I = require("@splunk/react-ui/EventListener");
|
|
106
|
-
var
|
|
106
|
+
var j = e.n(I);
|
|
107
107
|
// CONCATENATED MODULE: external "@splunk/react-icons/Magnifier"
|
|
108
|
-
const
|
|
109
|
-
var T = e.n(
|
|
108
|
+
const E = require("@splunk/react-icons/Magnifier");
|
|
109
|
+
var T = e.n(E);
|
|
110
110
|
// CONCATENATED MODULE: external "@splunk/ui-utils/style"
|
|
111
111
|
const M = require("@splunk/ui-utils/style");
|
|
112
112
|
// CONCATENATED MODULE: external "@splunk/themes"
|
|
113
|
-
const
|
|
113
|
+
const $ = require("@splunk/themes");
|
|
114
114
|
// CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
|
|
115
|
-
const
|
|
115
|
+
const P = require("@splunk/ui-utils/i18n");
|
|
116
116
|
// CONCATENATED MODULE: external "styled-components"
|
|
117
117
|
const _ = require("styled-components");
|
|
118
118
|
var D = e.n(_);
|
|
119
119
|
// CONCATENATED MODULE: external "@splunk/react-ui/Box"
|
|
120
|
-
const
|
|
121
|
-
var
|
|
120
|
+
const R = require("@splunk/react-ui/Box");
|
|
121
|
+
var q = e.n(R);
|
|
122
122
|
// CONCATENATED MODULE: external "@splunk/react-ui/Button"
|
|
123
|
-
const
|
|
124
|
-
var W = e.n(
|
|
123
|
+
const N = require("@splunk/react-ui/Button");
|
|
124
|
+
var W = e.n(N);
|
|
125
125
|
// CONCATENATED MODULE: ./src/TextArea/TextAreaStyles.ts
|
|
126
|
-
var B = (0, _.css)([ "cursor:
|
|
127
|
-
|
|
128
|
-
enterprise:
|
|
129
|
-
prisma: P.variables.contentColorDisabled
|
|
130
|
-
}), (0, P.pick)({
|
|
131
|
-
enterprise: P.variables.textDisabledColor,
|
|
132
|
-
prisma: P.variables.contentColorDisabled
|
|
133
|
-
}));
|
|
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,
|
|
126
|
+
var B = (0, _.css)([ "border-radius:", ";cursor:pointer;font-size:0.83333em;flex-grow:0;", ";&:not([disabled]){color:", ";}" ], (0,
|
|
127
|
+
$.pick)({
|
|
128
|
+
enterprise: $.variables.borderRadius,
|
|
137
129
|
prisma: "50%"
|
|
138
|
-
}), (0,
|
|
139
|
-
enterprise: (0, _.css)([ "width:", ";height:", ";" ],
|
|
130
|
+
}), (0, $.pick)({
|
|
131
|
+
enterprise: (0, _.css)([ "width:", ";height:", ";" ], $.variables.inputHeight, $.variables.inputHeight),
|
|
140
132
|
prisma: {
|
|
141
133
|
comfortable: (0, _.css)([ "width:26px;min-width:26px;min-height:26px;margin:8px;padding:0;" ]),
|
|
142
134
|
compact: (0, _.css)([ "width:22px;min-width:22px;min-height:22px;margin:8px;padding:0;" ])
|
|
143
135
|
}
|
|
144
|
-
}), (0,
|
|
136
|
+
}), (0, $.pick)({
|
|
145
137
|
enterprise: {
|
|
146
|
-
light:
|
|
147
|
-
dark:
|
|
138
|
+
light: $.variables.gray60,
|
|
139
|
+
dark: $.variables.white
|
|
148
140
|
},
|
|
149
|
-
prisma:
|
|
141
|
+
prisma: $.variables.contentColorMuted
|
|
150
142
|
}));
|
|
151
|
-
var
|
|
143
|
+
var z = D()(W()).withConfig({
|
|
152
144
|
displayName: "TextAreaStyles__StyledClearButton",
|
|
153
145
|
componentId: "gfy8yp-0"
|
|
154
|
-
})([ "display:none;visibility:hidden;", "" ],
|
|
146
|
+
})([ "display:none;visibility:hidden;", "" ], B);
|
|
155
147
|
var F = D().span.withConfig({
|
|
156
148
|
displayName: "TextAreaStyles__StyledSearchIconWrapper",
|
|
157
149
|
componentId: "gfy8yp-1"
|
|
158
|
-
})([ "", ";color:", ";pointer-events:none;padding:", ";", "" ],
|
|
159
|
-
|
|
150
|
+
})([ "", ";color:", ";pointer-events:none;padding:", ";", "" ], $.mixins.reset("inline-block"), (0,
|
|
151
|
+
$.pick)({
|
|
160
152
|
enterprise: {
|
|
161
|
-
light:
|
|
162
|
-
dark:
|
|
153
|
+
light: $.variables.gray60,
|
|
154
|
+
dark: $.variables.white
|
|
163
155
|
},
|
|
164
|
-
prisma:
|
|
165
|
-
}), (0,
|
|
156
|
+
prisma: $.variables.contentColorMuted
|
|
157
|
+
}), (0, $.pick)({
|
|
166
158
|
comfortable: "0 8px",
|
|
167
159
|
compact: "0 6px"
|
|
168
160
|
}), (function(e) {
|
|
169
161
|
var t = e.$disabled;
|
|
170
|
-
return t && (0, _.css)([ "", "" ], (0,
|
|
171
|
-
enterprise: (0, _.css)([ "color:", ";" ],
|
|
172
|
-
prisma: (0, _.css)([ "color:", ";" ],
|
|
162
|
+
return t && (0, _.css)([ "", "" ], (0, $.pick)({
|
|
163
|
+
enterprise: (0, _.css)([ "color:", ";" ], $.variables.textDisabledColor),
|
|
164
|
+
prisma: (0, _.css)([ "color:", ";" ], $.variables.contentColorDisabled)
|
|
173
165
|
}));
|
|
174
166
|
}));
|
|
175
|
-
var
|
|
167
|
+
var H = "230px";
|
|
168
|
+
var V = D()(q()).withConfig({
|
|
176
169
|
displayName: "TextAreaStyles__StyledBox",
|
|
177
170
|
componentId: "gfy8yp-2"
|
|
178
|
-
})([ "display:flex;justify-content:space-between;flex-grow:1;flex-shrink:1;position:relative;&[data-inline]{width:
|
|
179
|
-
P.pick)({
|
|
180
|
-
enterprise: P.variables.spacingHalf,
|
|
181
|
-
prisma: P.variables.spacingSmall
|
|
182
|
-
}),
|
|
171
|
+
})([ "display:flex;justify-content:space-between;flex-grow:1;flex-shrink:1;position:relative;&[data-inline]{width:", ";flex-basis:", ";[data-inline] + &{margin-left:", ";}}&:focus-within:not([disabled]){", "{", "}", "{visibility:visible;display:block;}}" ], H, H, $.variables.spacingSmall,
|
|
183
172
|
/* sc-sel */
|
|
184
|
-
F, (0,
|
|
173
|
+
F, (0, $.pick)({
|
|
185
174
|
enterprise: (0, _.css)([ "display:none;" ])
|
|
186
175
|
}),
|
|
187
176
|
/* sc-sel */
|
|
188
|
-
|
|
177
|
+
z);
|
|
189
178
|
var K = 12;
|
|
190
179
|
var L = 10;
|
|
191
180
|
var G = 0;
|
|
192
181
|
var Q = D().span.withConfig({
|
|
193
182
|
displayName: "TextAreaStyles__StyledTextAreaWrapper",
|
|
194
183
|
componentId: "gfy8yp-3"
|
|
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]){", "}", " ", " ", " ", "" ],
|
|
196
|
-
|
|
184
|
+
})([ "", " flex-grow:1;min-height:", ";position:relative;overflow:hidden;border:1px solid ", ";border-radius:", ";box-sizing:border-box;background-color:", ";box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);align-items:center;padding:", ";", " ", " &:hover:not([disabled]){border-color:", ";}&:focus-within:not([disabled]){box-shadow:", ";color:", ";}", " ", " ", " ", "" ], $.mixins.reset("inline-flex"), $.variables.inputHeight, (0,
|
|
185
|
+
$.pick)({
|
|
197
186
|
enterprise: {
|
|
198
|
-
light:
|
|
199
|
-
dark:
|
|
187
|
+
light: $.variables.gray60,
|
|
188
|
+
dark: $.variables.gray20
|
|
200
189
|
},
|
|
201
|
-
prisma:
|
|
202
|
-
}),
|
|
190
|
+
prisma: $.variables.interactiveColorBorder
|
|
191
|
+
}), $.variables.borderRadius, (0, $.pick)({
|
|
203
192
|
enterprise: {
|
|
204
|
-
light:
|
|
205
|
-
dark:
|
|
193
|
+
light: $.variables.white,
|
|
194
|
+
dark: $.variables.gray22
|
|
206
195
|
},
|
|
207
|
-
prisma:
|
|
208
|
-
}), (0,
|
|
196
|
+
prisma: $.variables.transparent
|
|
197
|
+
}), (0, $.pick)({
|
|
209
198
|
enterprise: "0px ".concat(G, "px 0px ").concat(L, "px"),
|
|
210
199
|
prisma: "0px ".concat(K, "px")
|
|
211
200
|
}), (function(e) {
|
|
@@ -214,25 +203,15 @@
|
|
|
214
203
|
}), (function(e) {
|
|
215
204
|
var t = e.$hasStartAdornment;
|
|
216
205
|
return t && (0, _.css)([ "padding-left:0;" ]);
|
|
217
|
-
}), (0,
|
|
206
|
+
}), (0, $.pick)({
|
|
218
207
|
enterprise: {
|
|
219
|
-
light:
|
|
220
|
-
dark:
|
|
208
|
+
light: $.variables.gray60,
|
|
209
|
+
dark: $.variables.gray20
|
|
221
210
|
},
|
|
222
|
-
prisma:
|
|
223
|
-
}),
|
|
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)
|
|
226
|
-
}), (function(e) {
|
|
211
|
+
prisma: $.variables.interactiveColorBorderHover
|
|
212
|
+
}), $.variables.focusShadow, $.variables.contentColorActive, (function(e) {
|
|
227
213
|
var t = e.$error;
|
|
228
|
-
return t && (0, _.css)([ "&,&:hover:not([disabled]){border-color:", ";}&:focus-within:not([disabled]){", "}" ],
|
|
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)
|
|
235
|
-
}));
|
|
214
|
+
return t && (0, _.css)([ "&,&:hover:not([disabled]){border-color:", ";}&:focus-within:not([disabled]){box-shadow:", ";color:", ";}" ], $.variables.accentColorNegative, $.variables.focusShadow, $.variables.contentColorActive);
|
|
236
215
|
}), (function(e) {
|
|
237
216
|
var t = e.$append;
|
|
238
217
|
return t && (0, _.css)([ "margin-right:-1px;border-top-right-radius:0;border-bottom-right-radius:0;border-right:none;" ]);
|
|
@@ -242,64 +221,61 @@
|
|
|
242
221
|
}), (function(e) {
|
|
243
222
|
var t = e.disabled;
|
|
244
223
|
return t && (0, _.css)([ "", " box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);" ], (0,
|
|
245
|
-
|
|
224
|
+
$.pick)({
|
|
246
225
|
enterprise: {
|
|
247
|
-
light: (0, _.css)([ "background-color:", ";border-color:", ";" ],
|
|
248
|
-
dark: (0, _.css)([ "background-color:", ";border-color:", ";" ],
|
|
226
|
+
light: (0, _.css)([ "background-color:", ";border-color:", ";" ], $.variables.gray96, $.variables.gray92),
|
|
227
|
+
dark: (0, _.css)([ "background-color:", ";border-color:", ";" ], $.variables.gray22, $.variables.gray30)
|
|
249
228
|
},
|
|
250
|
-
prisma: (0, _.css)([ "border-color:", ";" ],
|
|
229
|
+
prisma: (0, _.css)([ "border-color:", ";" ], $.variables.interactiveColorBorderDisabled)
|
|
251
230
|
}));
|
|
252
231
|
}));
|
|
253
232
|
var U = D().textarea.withConfig({
|
|
254
233
|
displayName: "TextAreaStyles__StyledTextArea",
|
|
255
234
|
componentId: "gfy8yp-4"
|
|
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;}", " ", "" ],
|
|
257
|
-
|
|
258
|
-
enterprise: P.variables.textColor,
|
|
259
|
-
prisma: P.variables.contentColorActive
|
|
260
|
-
}), P.variables.sansFontFamily, (0, P.pick)({
|
|
235
|
+
})([ "", ";outline-style:none;border:0;background:transparent;color:", ";flex-grow:1;font-family:", ";font-size:inherit;line-height:inherit;padding-top:", ";padding-bottom:", ";padding-right:", ";position:relative;resize:none;overflow:auto;white-space:pre-wrap;", " &::placeholder{color:", ";opacity:1;}", " ", "" ], $.mixins.reset("inline-flex"), $.variables.contentColorActive, $.variables.sansFontFamily, (0,
|
|
236
|
+
$.pick)({
|
|
261
237
|
enterprise: {
|
|
262
|
-
comfortable:
|
|
238
|
+
comfortable: $.variables.spacingQuarter,
|
|
263
239
|
compact: "3px"
|
|
264
240
|
},
|
|
265
241
|
prisma: {
|
|
266
|
-
comfortable:
|
|
242
|
+
comfortable: $.variables.spacingSmall,
|
|
267
243
|
compact: "5px"
|
|
268
244
|
}
|
|
269
|
-
}), (0,
|
|
245
|
+
}), (0, $.pick)({
|
|
270
246
|
enterprise: {
|
|
271
|
-
comfortable:
|
|
247
|
+
comfortable: $.variables.spacingQuarter,
|
|
272
248
|
compact: "3px"
|
|
273
249
|
},
|
|
274
250
|
prisma: {
|
|
275
|
-
comfortable:
|
|
251
|
+
comfortable: $.variables.spacingSmall,
|
|
276
252
|
compact: "5px"
|
|
277
253
|
}
|
|
278
|
-
}), (0,
|
|
254
|
+
}), (0, $.pick)({
|
|
279
255
|
enterprise: "10px",
|
|
280
256
|
prisma: "14px"
|
|
281
257
|
}), (function(e) {
|
|
282
258
|
var t = e.$rowsMin;
|
|
283
|
-
return t && (0, _.css)([ "height:calc( ", " + (", " * ", ") + ", " );" ],
|
|
284
|
-
}),
|
|
259
|
+
return t && (0, _.css)([ "height:calc( ", " + (", " * ", ") + ", " );" ], $.variables.inputHeight, t - 1, $.variables.lineHeight, t > 1 ? "-3px" : "-2px");
|
|
260
|
+
}), $.variables.contentColorMuted, (function(e) {
|
|
285
261
|
var t = e.$error;
|
|
286
|
-
return t && (0, _.css)([ "
|
|
262
|
+
return t && (0, _.css)([ "color:", ";" ], (0, $.pick)({
|
|
287
263
|
enterprise: {
|
|
288
|
-
light:
|
|
289
|
-
dark:
|
|
264
|
+
light: $.variables.errorColorD10,
|
|
265
|
+
dark: $.variables.errorColorL20
|
|
290
266
|
},
|
|
291
|
-
prisma:
|
|
267
|
+
prisma: $.variables.contentColorActive
|
|
292
268
|
}));
|
|
293
269
|
}), (function(e) {
|
|
294
270
|
var t = e.disabled;
|
|
295
|
-
return t &&
|
|
271
|
+
return t && (0, _.css)([ "cursor:not-allowed;color:", ";&::placeholder{color:", ";}" ], $.variables.contentColorDisabled, $.variables.contentColorDisabled);
|
|
296
272
|
}));
|
|
297
273
|
var J = D()(U).withConfig({
|
|
298
274
|
displayName: "TextAreaStyles__StyledTextAreaShadow",
|
|
299
275
|
componentId: "gfy8yp-5"
|
|
300
276
|
})([ "position:absolute;overflow:hidden;left:-10000px;top:-10000px;visibility:hidden;pointer-events:none;width:", ";" ], (function(e) {
|
|
301
277
|
var t = e.$startAdornmentWidth, r = e.$endAdornmentWidth;
|
|
302
|
-
return (0, _.css)([ "calc(100% - (", "));" ], (0,
|
|
278
|
+
return (0, _.css)([ "calc(100% - (", "));" ], (0, $.pick)({
|
|
303
279
|
prisma: (0, _.css)([ "", "px + ", "px" ], t || K, r || K),
|
|
304
280
|
enterprise: (0, _.css)([ "", "px + ", "px" ], t || L, r || G)
|
|
305
281
|
}));
|
|
@@ -307,54 +283,8 @@
|
|
|
307
283
|
var X = D()(W()).withConfig({
|
|
308
284
|
displayName: "TextAreaStyles__StyledVisibilityToggle",
|
|
309
285
|
componentId: "gfy8yp-6"
|
|
310
|
-
})([ "", "" ],
|
|
311
|
-
var Y =
|
|
312
|
-
displayName: "TextAreaStyles__StyledPlaceholder",
|
|
313
|
-
componentId: "gfy8yp-7"
|
|
314
|
-
})([ "pointer-events:none;color:", ";position:absolute;overflow:hidden;font-size:inherit;line-height:inherit;height:", ";margin-right:", ";", ";", ";", "" ], (0,
|
|
315
|
-
P.pick)({
|
|
316
|
-
enterprise: P.variables.textGray,
|
|
317
|
-
prisma: P.variables.contentColorMuted
|
|
318
|
-
}), P.variables.lineHeight, (0, P.pick)({
|
|
319
|
-
enterprise: "10px",
|
|
320
|
-
prisma: "14px"
|
|
321
|
-
}), (function(e) {
|
|
322
|
-
var t = e.$hasStartAdornment, r = e.$startAdornmentWidth;
|
|
323
|
-
return t && (r ? (0, _.css)([ "margin-left:", "px;" ], r) : (0, _.css)([ "margin-left:", ";" ], (0,
|
|
324
|
-
P.pick)({
|
|
325
|
-
enterprise: {
|
|
326
|
-
comfortable: "30px",
|
|
327
|
-
compact: "26px"
|
|
328
|
-
},
|
|
329
|
-
prisma: {
|
|
330
|
-
comfortable: "38px",
|
|
331
|
-
compact: "30px"
|
|
332
|
-
}
|
|
333
|
-
})));
|
|
334
|
-
}), (function(e) {
|
|
335
|
-
var t = e.$hasEndAdornment, r = e.$endAdornmentWidth;
|
|
336
|
-
return t && (r ? (0, _.css)([ "max-width:calc( 100% - ", " - ", "px );" ], (0, P.pick)({
|
|
337
|
-
enterprise: "10px",
|
|
338
|
-
prisma: "14px"
|
|
339
|
-
}), r) : (0, _.css)([ "max-width:calc( 100% - ", " - ", " );" ], (0, P.pick)({
|
|
340
|
-
enterprise: "10px",
|
|
341
|
-
prisma: "14px"
|
|
342
|
-
}), (0, P.pick)({
|
|
343
|
-
enterprise: {
|
|
344
|
-
comfortable: "30px",
|
|
345
|
-
compact: "26px"
|
|
346
|
-
},
|
|
347
|
-
prisma: {
|
|
348
|
-
comfortable: "38px",
|
|
349
|
-
compact: "30px"
|
|
350
|
-
}
|
|
351
|
-
})));
|
|
352
|
-
}), (function(e) {
|
|
353
|
-
var t = e.$hasBothAdornment, r = e.$endAdornmentWidth, n = e.$startAdornmentWidth;
|
|
354
|
-
return t && (0, _.css)([ "max-width:calc(100% - ", "px - ", "px);" ], n, r);
|
|
355
|
-
}));
|
|
356
|
-
var Z = (0, _.css)([ "display:inline-flex;align-items:center;justify-content:center;height:", ";pointer-events:none;" ], (0,
|
|
357
|
-
P.pick)({
|
|
286
|
+
})([ "", "" ], B);
|
|
287
|
+
var Y = (0, $.pick)({
|
|
358
288
|
enterprise: {
|
|
359
289
|
comfortable: "30px",
|
|
360
290
|
compact: "26px"
|
|
@@ -363,67 +293,53 @@
|
|
|
363
293
|
comfortable: "38px",
|
|
364
294
|
compact: "30px"
|
|
365
295
|
}
|
|
366
|
-
})
|
|
367
|
-
var
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
})
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
296
|
+
});
|
|
297
|
+
var Z = (0, $.pick)({
|
|
298
|
+
enterprise: "10px",
|
|
299
|
+
prisma: "14px"
|
|
300
|
+
});
|
|
301
|
+
var ee = D().span.withConfig({
|
|
302
|
+
displayName: "TextAreaStyles__StyledPlaceholder",
|
|
303
|
+
componentId: "gfy8yp-7"
|
|
304
|
+
})([ "pointer-events:none;color:", ";position:absolute;overflow:hidden;height:", ";margin-right:", ";", ";", ";", "" ], (0,
|
|
305
|
+
$.pick)({
|
|
306
|
+
enterprise: $.variables.textGray,
|
|
307
|
+
prisma: $.variables.contentColorMuted
|
|
308
|
+
}), $.variables.lineHeight, Z, (function(e) {
|
|
309
|
+
var t = e.$hasStartAdornment, r = e.$startAdornmentWidth;
|
|
310
|
+
return t && (r ? (0, _.css)([ "margin-left:", "px;" ], r) : (0, _.css)([ "margin-left:", ";" ], Y));
|
|
311
|
+
}), (function(e) {
|
|
312
|
+
var t = e.$hasEndAdornment, r = e.$endAdornmentWidth;
|
|
313
|
+
return t && (r ? (0, _.css)([ "max-width:calc(100% - ", " - ", "px);" ], Z, r) : (0,
|
|
314
|
+
_.css)([ "max-width:calc(100% - ", " - ", ");" ], Z, Y));
|
|
315
|
+
}), (function(e) {
|
|
316
|
+
var t = e.$hasBothAdornment, r = e.$endAdornmentWidth, n = e.$startAdornmentWidth;
|
|
317
|
+
return t && (0, _.css)([ "max-width:calc(100% - ", "px - ", "px);" ], n, r);
|
|
383
318
|
}));
|
|
384
319
|
var te = D().div.withConfig({
|
|
385
|
-
displayName: "
|
|
386
|
-
componentId: "gfy8yp-
|
|
387
|
-
})([ "", "
|
|
320
|
+
displayName: "TextAreaStyles__StyledAdornmentSpacer",
|
|
321
|
+
componentId: "gfy8yp-8"
|
|
322
|
+
})([ "display:inline-flex;align-items:center;justify-content:center;height:", ";pointer-events:none;", ";" ], Y, (function(e) {
|
|
388
323
|
var t = e.$width;
|
|
389
|
-
return t ? (0, _.css)([ "min-width:", "px;" ], t) : (0, _.css)([ "min-width:", ";" ],
|
|
390
|
-
P.pick)({
|
|
391
|
-
enterprise: {
|
|
392
|
-
comfortable: "30px",
|
|
393
|
-
compact: "26px"
|
|
394
|
-
},
|
|
395
|
-
prisma: {
|
|
396
|
-
comfortable: "38px",
|
|
397
|
-
compact: "30px"
|
|
398
|
-
}
|
|
399
|
-
}));
|
|
324
|
+
return t ? (0, _.css)([ "min-width:", "px;" ], t) : (0, _.css)([ "min-width:", ";" ], Y);
|
|
400
325
|
}));
|
|
401
326
|
var re = D().div.withConfig({
|
|
402
327
|
displayName: "TextAreaStyles__StyledAdornment",
|
|
403
|
-
componentId: "gfy8yp-
|
|
404
|
-
})([ "display:inline-flex;align-items:center;justify-content:center;position:absolute;pointer-events:none;z-index:1;height:", ";color:", ";", "
|
|
405
|
-
|
|
406
|
-
enterprise: {
|
|
407
|
-
comfortable: "30px",
|
|
408
|
-
compact: "26px"
|
|
409
|
-
},
|
|
410
|
-
prisma: {
|
|
411
|
-
comfortable: "38px",
|
|
412
|
-
compact: "30px"
|
|
413
|
-
}
|
|
414
|
-
}), (0, P.pick)({
|
|
328
|
+
componentId: "gfy8yp-9"
|
|
329
|
+
})([ "display:inline-flex;align-items:center;justify-content:center;position:absolute;pointer-events:none;z-index:1;height:", ";color:", ";", " ", ";", "" ], Y, (0,
|
|
330
|
+
$.pick)({
|
|
415
331
|
enterprise: {
|
|
416
|
-
light:
|
|
417
|
-
dark:
|
|
332
|
+
light: $.variables.gray60,
|
|
333
|
+
dark: $.variables.white
|
|
418
334
|
},
|
|
419
|
-
prisma:
|
|
420
|
-
}), (
|
|
421
|
-
|
|
422
|
-
|
|
335
|
+
prisma: $.variables.contentColorMuted
|
|
336
|
+
}), (0, $.pickVariant)("$position", {
|
|
337
|
+
start: (0, _.css)([ "top:1px;left:1px;" ]),
|
|
338
|
+
end: (0, _.css)([ "top:1px;right:1px;" ])
|
|
423
339
|
}), (function(e) {
|
|
424
340
|
var t = e.disabled;
|
|
425
|
-
return t &&
|
|
426
|
-
}), (0,
|
|
341
|
+
return t && (0, _.css)([ "cursor:not-allowed;color:", ";" ], $.variables.contentColorDisabled);
|
|
342
|
+
}), (0, $.pick)({
|
|
427
343
|
enterprise: (0, _.css)([ "margin-left:-1px;margin-right:-1px;" ])
|
|
428
344
|
}));
|
|
429
345
|
// CONCATENATED MODULE: ./src/TextArea/syncHeightWithShadow.ts
|
|
@@ -459,9 +375,9 @@
|
|
|
459
375
|
var l = parseInt(o, 10);
|
|
460
376
|
var s = parseInt(i.getPropertyValue("padding-top"), 10);
|
|
461
377
|
var c = parseInt(i.getPropertyValue("padding-bottom"), 10);
|
|
462
|
-
var
|
|
463
|
-
var
|
|
464
|
-
var u = a.scrollHeight +
|
|
378
|
+
var d = parseInt(i.getPropertyValue("border-top-width"), 10);
|
|
379
|
+
var p = parseInt(i.getPropertyValue("border-bottom-width"), 10);
|
|
380
|
+
var u = a.scrollHeight + d + p + 1;
|
|
465
381
|
// need one extra.
|
|
466
382
|
/* eslint-disable no-restricted-globals */
|
|
467
383
|
// Leverage the global `isNaN` here for IE support, rather than Number.isNaN.
|
|
@@ -470,11 +386,11 @@
|
|
|
470
386
|
return false;
|
|
471
387
|
}
|
|
472
388
|
/* eslint-enable no-restricted-globals */ if (r >= n) {
|
|
473
|
-
var f = r * l + s + c +
|
|
389
|
+
var f = r * l + s + c + d + p + 1;
|
|
474
390
|
// need one extra.
|
|
475
391
|
u = Math.min(f, u);
|
|
476
392
|
}
|
|
477
|
-
var h = n * l + s + c +
|
|
393
|
+
var h = n * l + s + c + d + p + 1;
|
|
478
394
|
// need one extra.
|
|
479
395
|
u = Math.max(h, u);
|
|
480
396
|
if (t !== u) {
|
|
@@ -531,7 +447,7 @@
|
|
|
531
447
|
return oe.apply(this, arguments);
|
|
532
448
|
}
|
|
533
449
|
function le(e) {
|
|
534
|
-
return
|
|
450
|
+
return pe(e) || de(e) || ce(e) || se();
|
|
535
451
|
}
|
|
536
452
|
function se() {
|
|
537
453
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
@@ -544,10 +460,10 @@
|
|
|
544
460
|
if (r === "Map" || r === "Set") return Array.from(e);
|
|
545
461
|
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return ue(e, t);
|
|
546
462
|
}
|
|
547
|
-
function
|
|
463
|
+
function de(e) {
|
|
548
464
|
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(e)) return Array.from(e);
|
|
549
465
|
}
|
|
550
|
-
function
|
|
466
|
+
function pe(e) {
|
|
551
467
|
if (Array.isArray(e)) return ue(e);
|
|
552
468
|
}
|
|
553
469
|
function ue(e, t) {
|
|
@@ -706,7 +622,7 @@
|
|
|
706
622
|
}
|
|
707
623
|
return e;
|
|
708
624
|
}
|
|
709
|
-
/** @public */ var
|
|
625
|
+
/** @public */ var je = {
|
|
710
626
|
appearance: i().oneOf([ "default", "search" ]),
|
|
711
627
|
append: i().bool,
|
|
712
628
|
autoCapitalize: i().string,
|
|
@@ -750,7 +666,7 @@
|
|
|
750
666
|
splunkTheme: i().object,
|
|
751
667
|
value: i().string
|
|
752
668
|
};
|
|
753
|
-
var
|
|
669
|
+
var Ee = {
|
|
754
670
|
appearance: "default",
|
|
755
671
|
append: false,
|
|
756
672
|
autoFocus: false,
|
|
@@ -886,8 +802,8 @@
|
|
|
886
802
|
Ie(Se(a), "renderEndAdornment", (function() {
|
|
887
803
|
var e;
|
|
888
804
|
var t = a.props, r = t.appearance, i = t.endAdornment, o = t.disabled, l = t.canClear, s = t.splunkTheme;
|
|
889
|
-
var c = s.isPrisma,
|
|
890
|
-
var u =
|
|
805
|
+
var c = s.isPrisma, d = s.isEnterprise, p = s.isCompact;
|
|
806
|
+
var u = p ? "20px" : "24px";
|
|
891
807
|
var f = {
|
|
892
808
|
ref: function e(t) {
|
|
893
809
|
a.endAdornment = t;
|
|
@@ -901,10 +817,10 @@
|
|
|
901
817
|
}
|
|
902
818
|
var h = a.context;
|
|
903
819
|
var v = (e = h.labelAttrs) === null || e === void 0 ? void 0 : e.text;
|
|
904
|
-
var m = v ? (0,
|
|
820
|
+
var m = v ? (0, P._)("Clear ".concat(v, " text field")) : (0, P._)("Clear text field");
|
|
905
821
|
if (!c && r === "search") {
|
|
906
822
|
|
|
907
|
-
return n().createElement(re, f, n().createElement(
|
|
823
|
+
return n().createElement(re, f, n().createElement(z, {
|
|
908
824
|
appearance: "pill",
|
|
909
825
|
"data-test": "clear",
|
|
910
826
|
inline: false,
|
|
@@ -915,7 +831,7 @@
|
|
|
915
831
|
onClick: a.handleClear
|
|
916
832
|
}), n().createElement(F, {
|
|
917
833
|
$disabled: o
|
|
918
|
-
},
|
|
834
|
+
}, d ? n().createElement(O(), {
|
|
919
835
|
hideDefaultTooltip: true,
|
|
920
836
|
inline: false,
|
|
921
837
|
screenReaderText: null,
|
|
@@ -928,7 +844,7 @@
|
|
|
928
844
|
var b = a.getDisplayValue();
|
|
929
845
|
if (!!b && (c && r === "search" || l)) {
|
|
930
846
|
|
|
931
|
-
return n().createElement(re, f, !o && n().createElement(
|
|
847
|
+
return n().createElement(re, f, !o && n().createElement(z, {
|
|
932
848
|
"data-test": "clear",
|
|
933
849
|
appearance: "secondary",
|
|
934
850
|
onClick: a.handleClear,
|
|
@@ -946,7 +862,7 @@
|
|
|
946
862
|
var e = a.props, t = e.appearance, r = e.startAdornment, i = e.splunkTheme, o = e.disabled;
|
|
947
863
|
var l = i.isPrisma, s = i.isCompact;
|
|
948
864
|
var c = s ? "20px" : "24px";
|
|
949
|
-
var
|
|
865
|
+
var d = {
|
|
950
866
|
ref: function e(t) {
|
|
951
867
|
a.startAdornment = t;
|
|
952
868
|
},
|
|
@@ -955,11 +871,11 @@
|
|
|
955
871
|
};
|
|
956
872
|
if (r) {
|
|
957
873
|
|
|
958
|
-
return n().createElement(re,
|
|
874
|
+
return n().createElement(re, d, r);
|
|
959
875
|
}
|
|
960
876
|
if (l && t === "search") {
|
|
961
877
|
|
|
962
|
-
return n().createElement(re,
|
|
878
|
+
return n().createElement(re, d, n().createElement(F, {
|
|
963
879
|
$disabled: o
|
|
964
880
|
}, n().createElement(T(), {
|
|
965
881
|
"aria-label": "Search",
|
|
@@ -1028,7 +944,7 @@
|
|
|
1028
944
|
}, {
|
|
1029
945
|
key: "render",
|
|
1030
946
|
value: function e() {
|
|
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,
|
|
947
|
+
var t = this.props, r = t.append, a = t.autoCapitalize, i = t.autoComplete, o = t.autoCorrect, l = t.autoFocus, s = t.children, c = t.className, d = t.classNamePrivate, u = t.disabled, h = t.describedBy, m = t.elementRef, y = t.error, g = t.inline, x = t.inputClassName, w = t.inputId, C = t.labelledBy, k = t.maxLength, S = t.name, A = t.placeholder, O = t.prepend, I = t.required, E = t.rowsMin, T = t.spellCheck, $ = t.tabIndex, P = t.title, _ = ve(t, [ "append", "autoCapitalize", "autoComplete", "autoCorrect", "autoFocus", "children", "className", "classNamePrivate", "disabled", "describedBy", "elementRef", "error", "inline", "inputClassName", "inputId", "labelledBy", "maxLength", "name", "placeholder", "prepend", "required", "rowsMin", "spellCheck", "tabIndex", "title" ]);
|
|
1032
948
|
var D = he(he({}, b()(_, (function(e, t) {
|
|
1033
949
|
return t === "role" || t.indexOf("aria-") === 0;
|
|
1034
950
|
}))), {}, {
|
|
@@ -1036,9 +952,9 @@
|
|
|
1036
952
|
"aria-labelledby": C,
|
|
1037
953
|
"aria-invalid": y || undefined
|
|
1038
954
|
});
|
|
1039
|
-
var
|
|
1040
|
-
var
|
|
1041
|
-
var
|
|
955
|
+
var R = v()(_, [ "inputRef", "onBlur", "onChange", "onFocus", "onKeyDown", "onSelect", "onInputClick" ].concat(le(p()(D))));
|
|
956
|
+
var q = this.getDisplayValue();
|
|
957
|
+
var N = {
|
|
1042
958
|
className: (0, M.toClassName)(c, x),
|
|
1043
959
|
$append: r || undefined,
|
|
1044
960
|
$error: y,
|
|
@@ -1067,9 +983,9 @@
|
|
|
1067
983
|
style: {
|
|
1068
984
|
height: this.state.height
|
|
1069
985
|
},
|
|
1070
|
-
tabIndex:
|
|
1071
|
-
title:
|
|
1072
|
-
value:
|
|
986
|
+
tabIndex: $,
|
|
987
|
+
title: P,
|
|
988
|
+
value: q,
|
|
1073
989
|
$error: y
|
|
1074
990
|
});
|
|
1075
991
|
var B = !!this.renderEndAdornment();
|
|
@@ -1077,17 +993,17 @@
|
|
|
1077
993
|
|
|
1078
994
|
return n().createElement(V, oe({
|
|
1079
995
|
tabIndex: -1,
|
|
1080
|
-
className: (0, M.toClassName)(c,
|
|
996
|
+
className: (0, M.toClassName)(c, d),
|
|
1081
997
|
"data-test": "text-area",
|
|
1082
|
-
"data-test-value":
|
|
998
|
+
"data-test-value": q,
|
|
1083
999
|
elementRef: m,
|
|
1084
1000
|
flex: true,
|
|
1085
1001
|
inline: g
|
|
1086
|
-
},
|
|
1002
|
+
}, R), this.renderStartAdornment(), n().createElement(Q, oe({
|
|
1087
1003
|
$hasEndAdornment: B,
|
|
1088
1004
|
$hasStartAdornment: z,
|
|
1089
1005
|
disabled: u
|
|
1090
|
-
},
|
|
1006
|
+
}, N), z && n().createElement(te, {
|
|
1091
1007
|
$width: this.state.startAdornmentWidth
|
|
1092
1008
|
}), n().createElement(J, {
|
|
1093
1009
|
"aria-hidden": "true",
|
|
@@ -1097,12 +1013,12 @@
|
|
|
1097
1013
|
tabIndex: -1,
|
|
1098
1014
|
rows: this.props.rowsMin,
|
|
1099
1015
|
ref: this.handleShadowMount,
|
|
1100
|
-
value: A && !
|
|
1016
|
+
value: A && !q ? A : q
|
|
1101
1017
|
}), n().createElement(U, oe({
|
|
1102
|
-
$rowsMin:
|
|
1018
|
+
$rowsMin: E
|
|
1103
1019
|
}, W, {
|
|
1104
1020
|
onClick: this.handleInputClick
|
|
1105
|
-
})), n().createElement(
|
|
1021
|
+
})), n().createElement(j(), {
|
|
1106
1022
|
target: window,
|
|
1107
1023
|
eventType: "resize",
|
|
1108
1024
|
listener: this.handleResize
|
|
@@ -1113,15 +1029,15 @@
|
|
|
1113
1029
|
} ]);
|
|
1114
1030
|
return r;
|
|
1115
1031
|
}(r.Component);
|
|
1116
|
-
Ie(Te, "propTypes",
|
|
1117
|
-
Ie(Te, "defaultProps",
|
|
1032
|
+
Ie(Te, "propTypes", je);
|
|
1033
|
+
Ie(Te, "defaultProps", Ee);
|
|
1118
1034
|
Ie(Te, "componentType", "TextArea");
|
|
1119
1035
|
Ie(Te, "contextType", x.ControlGroupContext);
|
|
1120
|
-
var Me = (0,
|
|
1121
|
-
var
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
/* harmony default export */ const
|
|
1036
|
+
var Me = (0, $.withSplunkTheme)(Te);
|
|
1037
|
+
var $e = Me;
|
|
1038
|
+
$e.propTypes = Te.propTypes;
|
|
1039
|
+
$e.componentType = Te.componentType;
|
|
1040
|
+
/* harmony default export */ const Pe = $e;
|
|
1125
1041
|
// CONCATENATED MODULE: ./src/TextArea/index.ts
|
|
1126
1042
|
module.exports = t;
|
|
1127
1043
|
/******/})();
|