@splunk/react-ui 4.32.0 → 4.34.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/Button.js +59 -65
- package/ButtonGroup.js +20 -23
- package/ButtonSimple.js +374 -339
- package/CHANGELOG.md +54 -0
- package/Card.js +56 -44
- package/Chip.js +2 -6
- package/Clickable.js +21 -19
- package/CollapsiblePanel.js +281 -264
- package/Color.js +88 -86
- package/Concertina.js +7 -7
- package/ControlGroup.js +18 -18
- package/DualListbox.js +8 -11
- package/File.js +25 -30
- package/FormRows.js +232 -210
- package/Image.js +13 -13
- package/JSONTree.js +22 -22
- package/MIGRATION.mdx +99 -0
- package/Markdown.js +12 -12
- package/Menu.js +505 -719
- package/Message.js +205 -204
- package/MessageBar.js +104 -104
- package/Modal.js +158 -133
- package/Multiselect.js +81 -70
- package/Paginator.js +8 -8
- package/Popover.js +53 -54
- package/Progress.js +45 -46
- package/RadioBar.js +117 -115
- package/RadioList.js +8 -5
- package/ResultsMenu.js +256 -261
- package/Search.js +21 -24
- package/Select.js +265 -246
- package/Slider.js +9 -9
- package/SplitButton.js +1 -4
- package/StaticContent.js +1 -1
- package/StepBar.js +1 -1
- package/Switch.js +169 -171
- package/TabBar.js +14 -6
- package/Table.js +65 -67
- package/Text.js +30 -37
- package/TextArea.js +162 -163
- package/Tooltip.js +1 -1
- package/package.json +9 -9
- package/stubs-splunkui.d.ts +11 -0
- package/types/src/Button/Button.d.ts +4 -4
- package/types/src/ButtonSimple/ButtonSimple.d.ts +8 -6
- package/types/src/ButtonSimple/mixin.d.ts +2 -2
- package/types/src/Card/Card.d.ts +3 -1
- package/types/src/Card/Header.d.ts +22 -3
- package/types/src/Clickable/Clickable.d.ts +3 -2
- package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +5 -0
- package/types/src/CollapsiblePanel/icons/ExpandPanel.d.ts +1 -3
- package/types/src/Date/Date.d.ts +2 -2
- package/types/src/Menu/Item.d.ts +3 -1
- package/types/src/Menu/Menu.d.ts +16 -21
- package/types/src/Menu/MenuContext.d.ts +3 -2
- package/types/src/Number/Number.d.ts +2 -2
- package/types/src/RadioBar/Option.d.ts +4 -1
- package/types/src/RadioBar/RadioBar.d.ts +6 -4
- package/types/src/RadioBar/docs/examples/MenuBar.d.ts +2 -0
- package/types/src/ResultsMenu/ResultsMenu.d.ts +5 -22
- package/types/src/Select/Select.d.ts +8 -4
- package/types/src/Select/SelectBase.d.ts +8 -4
- package/types/src/Slider/Slider.d.ts +2 -2
- package/types/src/Table/Body.d.ts +0 -4
- package/types/src/Text/docs/examples/Basic.d.ts +1 -9
- package/types/src/Text/docs/examples/Error.d.ts +2 -10
- package/types/src/Text/docs/examples/Inline.d.ts +1 -9
- package/types/src/Text/docs/examples/Multiline.d.ts +1 -9
- package/types/src/Text/docs/examples/Password.d.ts +1 -9
- package/types/src/Text/docs/examples/Search.d.ts +1 -9
- package/useRovingFocus.js +26 -40
- package/types/src/Button/docs/examples/prisma/Basic.d.ts +0 -2
- package/types/src/Button/docs/examples/prisma/Block.d.ts +0 -2
- package/types/src/Button/docs/examples/prisma/Disabled.d.ts +0 -2
- package/types/src/Button/docs/examples/prisma/Icons.d.ts +0 -2
- package/types/src/Button/docs/examples/prisma/Menus.d.ts +0 -2
- package/types/src/Button/docs/examples/prisma/To.d.ts +0 -2
- package/types/src/Button/docs/examples/prisma/Truncated.d.ts +0 -2
- package/types/src/Select/docs/examples/prisma/Appearance.d.ts +0 -14
- /package/types/src/{Button/docs/examples/prisma → Clickable/docs/examples}/Dimmed.d.ts +0 -0
package/Message.js
CHANGED
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
/******/ (() => {
|
|
25
25
|
/******/ // define getter functions for harmony exports
|
|
26
26
|
/******/ e.d = (r, a) => {
|
|
27
|
-
/******/ for (var
|
|
28
|
-
/******/ if (e.o(a,
|
|
29
|
-
/******/ Object.defineProperty(r,
|
|
27
|
+
/******/ for (var n in a) {
|
|
28
|
+
/******/ if (e.o(a, n) && !e.o(r, n)) {
|
|
29
|
+
/******/ Object.defineProperty(r, n, {
|
|
30
30
|
enumerable: true,
|
|
31
|
-
get: a[
|
|
31
|
+
get: a[n]
|
|
32
32
|
});
|
|
33
33
|
/******/ }
|
|
34
34
|
/******/ }
|
|
@@ -66,16 +66,16 @@
|
|
|
66
66
|
});
|
|
67
67
|
// CONCATENATED MODULE: external "react"
|
|
68
68
|
const a = require("react");
|
|
69
|
-
var
|
|
69
|
+
var n = e.n(a);
|
|
70
70
|
// CONCATENATED MODULE: external "prop-types"
|
|
71
|
-
const
|
|
72
|
-
var
|
|
71
|
+
const i = require("prop-types");
|
|
72
|
+
var o = e.n(i);
|
|
73
73
|
// CONCATENATED MODULE: external "@splunk/react-icons/CheckCircle"
|
|
74
|
-
const
|
|
75
|
-
var
|
|
74
|
+
const t = require("@splunk/react-icons/CheckCircle");
|
|
75
|
+
var s = e.n(t);
|
|
76
76
|
// CONCATENATED MODULE: external "@splunk/react-icons/Cross"
|
|
77
|
-
const
|
|
78
|
-
var
|
|
77
|
+
const l = require("@splunk/react-icons/Cross");
|
|
78
|
+
var c = e.n(l);
|
|
79
79
|
// CONCATENATED MODULE: external "@splunk/react-icons/enterprise/Close"
|
|
80
80
|
const p = require("@splunk/react-icons/enterprise/Close");
|
|
81
81
|
var u = e.n(p);
|
|
@@ -84,10 +84,10 @@
|
|
|
84
84
|
var d = e.n(v);
|
|
85
85
|
// CONCATENATED MODULE: external "@splunk/react-icons/InformationCircle"
|
|
86
86
|
const b = require("@splunk/react-icons/InformationCircle");
|
|
87
|
-
var
|
|
87
|
+
var f = e.n(b);
|
|
88
88
|
// CONCATENATED MODULE: external "@splunk/react-icons/ExclamationTriangle"
|
|
89
|
-
const
|
|
90
|
-
var m = e.n(
|
|
89
|
+
const g = require("@splunk/react-icons/ExclamationTriangle");
|
|
90
|
+
var m = e.n(g);
|
|
91
91
|
// CONCATENATED MODULE: external "@splunk/react-icons/enterprise/Error"
|
|
92
92
|
const y = require("@splunk/react-icons/enterprise/Error");
|
|
93
93
|
var k = e.n(y);
|
|
@@ -107,17 +107,17 @@
|
|
|
107
107
|
const _ = require("@splunk/react-ui/ScreenReaderContent");
|
|
108
108
|
var E = e.n(_);
|
|
109
109
|
// CONCATENATED MODULE: external "@splunk/themes"
|
|
110
|
-
const
|
|
110
|
+
const I = require("@splunk/themes");
|
|
111
111
|
// CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
|
|
112
|
-
const
|
|
112
|
+
const P = require("@splunk/ui-utils/i18n");
|
|
113
113
|
// CONCATENATED MODULE: external "styled-components"
|
|
114
114
|
const R = require("styled-components");
|
|
115
|
-
var
|
|
115
|
+
var T = e.n(R);
|
|
116
116
|
// CONCATENATED MODULE: external "@splunk/react-ui/Link"
|
|
117
|
-
const
|
|
118
|
-
var
|
|
117
|
+
const $ = require("@splunk/react-ui/Link");
|
|
118
|
+
var L = e.n($);
|
|
119
119
|
// CONCATENATED MODULE: ./src/Message/LinkStyles.ts
|
|
120
|
-
var M =
|
|
120
|
+
var M = T()(L()).withConfig({
|
|
121
121
|
displayName: "LinkStyles__StyledLink",
|
|
122
122
|
componentId: "w06zjv-0"
|
|
123
123
|
})([ "" ]);
|
|
@@ -125,14 +125,14 @@
|
|
|
125
125
|
function A(e, r) {
|
|
126
126
|
if (e == null) return {};
|
|
127
127
|
var a = N(e, r);
|
|
128
|
-
var
|
|
128
|
+
var n, i;
|
|
129
129
|
if (Object.getOwnPropertySymbols) {
|
|
130
|
-
var
|
|
131
|
-
for (
|
|
132
|
-
|
|
133
|
-
if (r.indexOf(
|
|
134
|
-
if (!Object.prototype.propertyIsEnumerable.call(e,
|
|
135
|
-
a[
|
|
130
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
131
|
+
for (i = 0; i < o.length; i++) {
|
|
132
|
+
n = o[i];
|
|
133
|
+
if (r.indexOf(n) >= 0) continue;
|
|
134
|
+
if (!Object.prototype.propertyIsEnumerable.call(e, n)) continue;
|
|
135
|
+
a[n] = e[n];
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
138
|
return a;
|
|
@@ -140,20 +140,20 @@
|
|
|
140
140
|
function N(e, r) {
|
|
141
141
|
if (e == null) return {};
|
|
142
142
|
var a = {};
|
|
143
|
-
var
|
|
144
|
-
var
|
|
145
|
-
for (
|
|
146
|
-
|
|
147
|
-
if (r.indexOf(
|
|
148
|
-
a[
|
|
143
|
+
var n = Object.keys(e);
|
|
144
|
+
var i, o;
|
|
145
|
+
for (o = 0; o < n.length; o++) {
|
|
146
|
+
i = n[o];
|
|
147
|
+
if (r.indexOf(i) >= 0) continue;
|
|
148
|
+
a[i] = e[i];
|
|
149
149
|
}
|
|
150
150
|
return a;
|
|
151
151
|
}
|
|
152
152
|
var W = {
|
|
153
|
-
children:
|
|
154
|
-
elementRef:
|
|
155
|
-
openInNewContext:
|
|
156
|
-
to:
|
|
153
|
+
children: o().node,
|
|
154
|
+
elementRef: o().oneOfType([ o().func, o().object ]),
|
|
155
|
+
openInNewContext: o().bool,
|
|
156
|
+
to: o().string
|
|
157
157
|
};
|
|
158
158
|
/**
|
|
159
159
|
* @deprecated `Message.Link` is deprecated and will be removed in a future major version. Use `Link` instead.
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
// @docs-props-type LinkPropsBase
|
|
165
165
|
if (false) {}
|
|
166
166
|
|
|
167
|
-
return
|
|
167
|
+
return n().createElement(M, a, r);
|
|
168
168
|
}
|
|
169
169
|
X.propTypes = W;
|
|
170
170
|
/* harmony default export */ const z = X;
|
|
@@ -175,160 +175,161 @@
|
|
|
175
175
|
const D = require("@splunk/react-ui/Clickable");
|
|
176
176
|
var H = e.n(D);
|
|
177
177
|
// CONCATENATED MODULE: ./src/Message/TitleStyles.ts
|
|
178
|
-
var F =
|
|
178
|
+
var F = T().p.withConfig({
|
|
179
179
|
displayName: "TitleStyles__StyledTitle",
|
|
180
180
|
componentId: "sc-6gbjha-0"
|
|
181
|
-
})([ "", " ", "" ],
|
|
181
|
+
})([ "", " ", "" ], I.mixins.reset("block"), (0, I.pick)({
|
|
182
182
|
prisma: (0, R.css)([ "font-size:14px;line-height:20px;" ])
|
|
183
183
|
}));
|
|
184
184
|
// CONCATENATED MODULE: ./src/Message/MessageStyles.ts
|
|
185
|
-
var G =
|
|
185
|
+
var G = T().div.withConfig({
|
|
186
186
|
displayName: "MessageStyles__StyledContent",
|
|
187
187
|
componentId: "eg66af-0"
|
|
188
|
-
})([ "display:flex;align-items:baseline;flex:1;", ";", " ", ";" ], (0,
|
|
189
|
-
prisma: (0, R.css)([ "padding:", " 0;color:", ";" ],
|
|
188
|
+
})([ "display:flex;align-items:baseline;flex:1;", ";", " ", ";" ], (0, I.pick)({
|
|
189
|
+
prisma: (0, R.css)([ "padding:", " 0;color:", ";" ], I.variables.spacingMedium, I.variables.contentColorActive),
|
|
190
190
|
enterprise: (0, R.css)([ "padding:12px 0;" ])
|
|
191
|
-
}), (0,
|
|
192
|
-
prisma: (0, R.css)([ "padding-left:", ";" ],
|
|
191
|
+
}), (0, I.pick)({
|
|
192
|
+
prisma: (0, R.css)([ "padding-left:", ";" ], I.variables.spacingXSmall),
|
|
193
193
|
enterprise: (0, R.css)([ "padding-left:15px;" ])
|
|
194
194
|
}), (function(e) {
|
|
195
195
|
var r = e.$fillStyle;
|
|
196
|
-
return r && (0,
|
|
197
|
-
prisma: (0, R.css)([ "padding-left:", ";" ],
|
|
196
|
+
return r && (0, I.pick)({
|
|
197
|
+
prisma: (0, R.css)([ "padding-left:", ";" ], I.variables.spacingMedium)
|
|
198
198
|
});
|
|
199
199
|
}));
|
|
200
|
-
var J =
|
|
200
|
+
var J = T()(H()).withConfig({
|
|
201
201
|
displayName: "MessageStyles__StyledRemove",
|
|
202
202
|
componentId: "eg66af-1"
|
|
203
|
-
})([ "", ";border:1px solid transparent;border-radius:", ";color:", ";", ";cursor:pointer;position:absolute;", " padding:8px;&:hover,&:focus{background:", ";border:", ";color:", ";}&:active{", ";}", "" ],
|
|
204
|
-
|
|
203
|
+
})([ "", ";border:1px solid transparent;border-radius:", ";color:", ";", ";cursor:pointer;position:absolute;", " padding:8px;&:hover,&:focus{background:", ";border:1px solid;border-color:", ";color:", ";}&:active{", ";}", "" ], I.mixins.reset("flex"), (0,
|
|
204
|
+
I.pick)({
|
|
205
205
|
prisma: "50%",
|
|
206
|
-
enterprise:
|
|
207
|
-
}), (0,
|
|
208
|
-
prisma:
|
|
206
|
+
enterprise: I.variables.borderRadius
|
|
207
|
+
}), (0, I.pick)({
|
|
208
|
+
prisma: I.variables.contentColorMuted,
|
|
209
209
|
enterprise: {
|
|
210
|
-
dark:
|
|
211
|
-
light:
|
|
210
|
+
dark: I.variables.gray96,
|
|
211
|
+
light: I.variables.gray45
|
|
212
212
|
}
|
|
213
213
|
}), (function(e) {
|
|
214
214
|
var r = e.$appearance;
|
|
215
|
-
return r === "banner" && (0,
|
|
216
|
-
prisma: (0, R.css)([ "color:", ";" ],
|
|
215
|
+
return r === "banner" && (0, I.pick)({
|
|
216
|
+
prisma: (0, R.css)([ "color:", ";" ], I.variables.contentColorInverted)
|
|
217
217
|
});
|
|
218
|
-
}), (0,
|
|
218
|
+
}), (0, I.pick)({
|
|
219
219
|
prisma: (0, R.css)([ "top:3px;right:2px;" ]),
|
|
220
220
|
enterprise: (0, R.css)([ "top:8px;right:8px;" ])
|
|
221
|
-
}), (0,
|
|
222
|
-
prisma:
|
|
221
|
+
}), (0, I.pick)({
|
|
222
|
+
prisma: I.variables.interactiveColorOverlayHover,
|
|
223
223
|
enterprise: {
|
|
224
|
-
dark:
|
|
225
|
-
light:
|
|
224
|
+
dark: I.variables.gray30,
|
|
225
|
+
light: I.variables.gray92
|
|
226
226
|
}
|
|
227
|
-
}), (0,
|
|
228
|
-
prisma:
|
|
229
|
-
enterprise:
|
|
230
|
-
}), (0,
|
|
227
|
+
}), (0, I.pick)({
|
|
228
|
+
prisma: "inherit",
|
|
229
|
+
enterprise: I.variables.gray80
|
|
230
|
+
}), (0, I.pick)({
|
|
231
231
|
enterprise: {
|
|
232
|
-
dark:
|
|
233
|
-
light:
|
|
232
|
+
dark: I.variables.gray96,
|
|
233
|
+
light: I.variables.linkColor
|
|
234
234
|
},
|
|
235
|
-
prisma:
|
|
236
|
-
}), (0,
|
|
237
|
-
prisma: (0, R.css)([ "background:", ";" ],
|
|
238
|
-
enterprise: (0, R.css)([ "box-shadow:", ";" ],
|
|
239
|
-
}), (0,
|
|
240
|
-
prisma: (0, R.css)([ "&:focus{box-shadow:0 0 0 3px ", ";}" ],
|
|
235
|
+
prisma: I.variables.contentColorActive
|
|
236
|
+
}), (0, I.pick)({
|
|
237
|
+
prisma: (0, R.css)([ "background:", ";" ], I.variables.interactiveColorOverlayActive),
|
|
238
|
+
enterprise: (0, R.css)([ "box-shadow:", ";" ], I.variables.focusShadow)
|
|
239
|
+
}), (0, I.pick)({
|
|
240
|
+
prisma: (0, R.css)([ "&:focus{box-shadow:0 0 0 3px ", ";}" ], I.variables.focusColor)
|
|
241
241
|
}));
|
|
242
|
-
var K =
|
|
242
|
+
var K = T().span.withConfig({
|
|
243
243
|
displayName: "MessageStyles__StyledIconWrapper",
|
|
244
244
|
componentId: "eg66af-2"
|
|
245
245
|
})([ "position:relative;min-width:", ";text-align:center;color:", ";", " ", "" ], (0,
|
|
246
|
-
|
|
247
|
-
prisma:
|
|
246
|
+
I.pick)({
|
|
247
|
+
prisma: I.variables.spacingXLarge,
|
|
248
248
|
enterprise: "25px"
|
|
249
|
-
}),
|
|
249
|
+
}), I.variables.white, (0, I.pick)({
|
|
250
250
|
enterprise: (0, R.css)([ "top:-2px;" ]),
|
|
251
251
|
prisma: (0, R.css)([ "top:-1.8px;" ])
|
|
252
|
-
}), (0,
|
|
253
|
-
info: (0, R.css)([ "color:", ";" ], (0,
|
|
254
|
-
prisma:
|
|
255
|
-
enterprise:
|
|
252
|
+
}), (0, I.pickVariant)("$type", {
|
|
253
|
+
info: (0, R.css)([ "color:", ";" ], (0, I.pick)({
|
|
254
|
+
prisma: I.variables.contentColorMuted,
|
|
255
|
+
enterprise: I.variables.infoColor
|
|
256
256
|
})),
|
|
257
|
-
success: (0, R.css)([ "color:", ";" ],
|
|
258
|
-
warning: (0, R.css)([ "color:", ";" ],
|
|
259
|
-
error: (0, R.css)([ "color:", ";" ],
|
|
257
|
+
success: (0, R.css)([ "color:", ";" ], I.variables.accentColorPositive),
|
|
258
|
+
warning: (0, R.css)([ "color:", ";" ], I.variables.accentColorWarning),
|
|
259
|
+
error: (0, R.css)([ "color:", ";" ], I.variables.accentColorNegative)
|
|
260
260
|
}));
|
|
261
|
-
var Q =
|
|
261
|
+
var Q = T()(B()).withConfig({
|
|
262
262
|
displayName: "MessageStyles__StyledBox",
|
|
263
263
|
componentId: "eg66af-3"
|
|
264
|
-
})([ "", ";align-items:baseline;position:relative;border-radius:", ";margin-bottom:", ";", " word-wrap:break-word;", " ", "" ],
|
|
265
|
-
|
|
266
|
-
prisma:
|
|
264
|
+
})([ "", ";align-items:baseline;position:relative;border-radius:", ";margin-bottom:", ";", " word-wrap:break-word;", " ", "" ], I.mixins.reset("flex"), (0,
|
|
265
|
+
I.pick)({
|
|
266
|
+
prisma: I.variables.borderRadius,
|
|
267
267
|
enterprise: "5px"
|
|
268
|
-
}),
|
|
268
|
+
}), I.variables.spacingSmall, (0, I.pickVariant)("$hasRemoveIcon", {
|
|
269
269
|
true: {
|
|
270
|
-
prisma: (0, R.css)([ "padding-right:", ";" ],
|
|
271
|
-
enterprise: (0, R.css)([ "padding-right:
|
|
270
|
+
prisma: (0, R.css)([ "padding-right:", ";" ], I.variables.spacingXXXLarge),
|
|
271
|
+
enterprise: (0, R.css)([ "padding-right:", ";" ], I.variables.spacingXXLarge)
|
|
272
272
|
},
|
|
273
|
-
false:
|
|
274
|
-
prisma: (0, R.css)([ "padding-right:", ";" ], P.variables.spacingSmall),
|
|
275
|
-
enterprise: (0, R.css)([ "padding-right:", ";" ], P.variables.spacingHalf)
|
|
276
|
-
}
|
|
273
|
+
false: (0, R.css)([ "padding-right:", ";" ], I.variables.spacingSmall)
|
|
277
274
|
}), (function(e) {
|
|
278
275
|
var r = e.$fillStyle;
|
|
279
|
-
return r && (0,
|
|
276
|
+
return r && (0, I.pick)({
|
|
280
277
|
enterprise: (0, R.css)([ "& > ", "{left:", ";}", "" ],
|
|
281
278
|
/* sc-sel */
|
|
282
|
-
K,
|
|
283
|
-
info: (0, R.css)([ "", "" ], (0,
|
|
284
|
-
light: (0, R.css)([ "background-color:", ";border:1px solid ", ";" ],
|
|
285
|
-
dark: (0, R.css)([ "background-color:", ";" ],
|
|
279
|
+
K, I.variables.spacingXSmall, (0, I.pickVariant)("$type", {
|
|
280
|
+
info: (0, R.css)([ "", "" ], (0, I.pick)({
|
|
281
|
+
light: (0, R.css)([ "background-color:", ";border:1px solid ", ";" ], I.variables.infoColorL50, I.variables.infoColor),
|
|
282
|
+
dark: (0, R.css)([ "background-color:", ";" ], I.mixins.colorWithAlpha(I.variables.infoColor, .5))
|
|
286
283
|
})),
|
|
287
|
-
success: (0, R.css)([ "", "" ], (0,
|
|
288
|
-
light: (0, R.css)([ "background-color:", ";border:1px solid ", ";" ],
|
|
289
|
-
dark: (0, R.css)([ "background-color:", ";" ],
|
|
284
|
+
success: (0, R.css)([ "", "" ], (0, I.pick)({
|
|
285
|
+
light: (0, R.css)([ "background-color:", ";border:1px solid ", ";" ], I.variables.successColorL50, I.variables.successColor),
|
|
286
|
+
dark: (0, R.css)([ "background-color:", ";" ], I.mixins.colorWithAlpha(I.variables.successColor, .5))
|
|
290
287
|
})),
|
|
291
|
-
warning: (0, R.css)([ "", "" ], (0,
|
|
292
|
-
light: (0, R.css)([ "background-color:", ";border:1px solid ", ";" ],
|
|
293
|
-
dark: (0, R.css)([ "background-color:", ";" ],
|
|
288
|
+
warning: (0, R.css)([ "", "" ], (0, I.pick)({
|
|
289
|
+
light: (0, R.css)([ "background-color:", ";border:1px solid ", ";" ], I.variables.warningColorL50, I.variables.warningColor),
|
|
290
|
+
dark: (0, R.css)([ "background-color:", ";" ], I.mixins.colorWithAlpha(I.variables.warningColor, .5))
|
|
294
291
|
})),
|
|
295
|
-
error: (0, R.css)([ "", "" ], (0,
|
|
296
|
-
light: (0, R.css)([ "background-color:", ";border:1px solid ", ";" ],
|
|
297
|
-
dark: (0, R.css)([ "background-color:", ";" ],
|
|
292
|
+
error: (0, R.css)([ "", "" ], (0, I.pick)({
|
|
293
|
+
light: (0, R.css)([ "background-color:", ";border:1px solid ", ";" ], I.variables.errorColorL50, I.variables.errorColor),
|
|
294
|
+
dark: (0, R.css)([ "background-color:", ";" ], I.mixins.colorWithAlpha(I.variables.errorColor, .5))
|
|
298
295
|
}))
|
|
299
296
|
})),
|
|
300
|
-
prisma: (0, R.css)([ "
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
297
|
+
prisma: (0, R.css)([ "", ";box-shadow:", ";& > ", "{color:", ";}" ], (function(e) {
|
|
298
|
+
var r = e.$type;
|
|
299
|
+
var a = {
|
|
300
|
+
info: I.variables.contentColorActive,
|
|
301
|
+
success: I.variables.accentColorPositive,
|
|
302
|
+
warning: I.variables.accentColorWarning,
|
|
303
|
+
error: I.variables.accentColorNegative
|
|
304
|
+
};
|
|
305
|
+
var n = a[r];
|
|
306
|
+
return (0, R.css)([ "background:linear-gradient( to right,", " 0,", " ", ",", " ", ",", " 100% );" ], n, n, I.variables.spacingXLarge, I.variables.backgroundColorPopup, I.variables.spacingXLarge, I.variables.backgroundColorPopup);
|
|
307
|
+
}), I.variables.embossShadow,
|
|
307
308
|
/* sc-sel */
|
|
308
|
-
K,
|
|
309
|
+
K, I.variables.backgroundColorPopup)
|
|
309
310
|
});
|
|
310
|
-
}), (0,
|
|
311
|
+
}), (0, I.pick)({
|
|
311
312
|
prisma: (0, R.css)([ "& ", "{color:", ";}" ],
|
|
312
313
|
/* sc-sel */
|
|
313
|
-
F, (0,
|
|
314
|
-
info:
|
|
315
|
-
warning:
|
|
316
|
-
error:
|
|
317
|
-
success:
|
|
314
|
+
F, (0, I.pickVariant)("$type", {
|
|
315
|
+
info: I.variables.contentColorActive,
|
|
316
|
+
warning: I.variables.accentColorWarning,
|
|
317
|
+
error: I.variables.accentColorNegative,
|
|
318
|
+
success: I.variables.accentColorPositive
|
|
318
319
|
}))
|
|
319
320
|
}));
|
|
320
321
|
// CONCATENATED MODULE: ./src/Message/Title.tsx
|
|
321
322
|
function U(e, r) {
|
|
322
323
|
if (e == null) return {};
|
|
323
324
|
var a = Y(e, r);
|
|
324
|
-
var
|
|
325
|
+
var n, i;
|
|
325
326
|
if (Object.getOwnPropertySymbols) {
|
|
326
|
-
var
|
|
327
|
-
for (
|
|
328
|
-
|
|
329
|
-
if (r.indexOf(
|
|
330
|
-
if (!Object.prototype.propertyIsEnumerable.call(e,
|
|
331
|
-
a[
|
|
327
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
328
|
+
for (i = 0; i < o.length; i++) {
|
|
329
|
+
n = o[i];
|
|
330
|
+
if (r.indexOf(n) >= 0) continue;
|
|
331
|
+
if (!Object.prototype.propertyIsEnumerable.call(e, n)) continue;
|
|
332
|
+
a[n] = e[n];
|
|
332
333
|
}
|
|
333
334
|
}
|
|
334
335
|
return a;
|
|
@@ -336,17 +337,17 @@
|
|
|
336
337
|
function Y(e, r) {
|
|
337
338
|
if (e == null) return {};
|
|
338
339
|
var a = {};
|
|
339
|
-
var
|
|
340
|
-
var
|
|
341
|
-
for (
|
|
342
|
-
|
|
343
|
-
if (r.indexOf(
|
|
344
|
-
a[
|
|
340
|
+
var n = Object.keys(e);
|
|
341
|
+
var i, o;
|
|
342
|
+
for (o = 0; o < n.length; o++) {
|
|
343
|
+
i = n[o];
|
|
344
|
+
if (r.indexOf(i) >= 0) continue;
|
|
345
|
+
a[i] = e[i];
|
|
345
346
|
}
|
|
346
347
|
return a;
|
|
347
348
|
}
|
|
348
349
|
var Z = {
|
|
349
|
-
children:
|
|
350
|
+
children: o().node
|
|
350
351
|
};
|
|
351
352
|
/**
|
|
352
353
|
* A title component for use in `Message`.
|
|
@@ -354,7 +355,7 @@
|
|
|
354
355
|
var r = e.children, a = U(e, [ "children" ]);
|
|
355
356
|
// @docs-props-type TitleProps
|
|
356
357
|
|
|
357
|
-
return
|
|
358
|
+
return n().createElement(F, a, r);
|
|
358
359
|
}
|
|
359
360
|
ee.propTypes = Z;
|
|
360
361
|
/* harmony default export */ const re = ee;
|
|
@@ -363,9 +364,9 @@
|
|
|
363
364
|
ae = Object.assign || function(e) {
|
|
364
365
|
for (var r = 1; r < arguments.length; r++) {
|
|
365
366
|
var a = arguments[r];
|
|
366
|
-
for (var
|
|
367
|
-
if (Object.prototype.hasOwnProperty.call(a,
|
|
368
|
-
e[
|
|
367
|
+
for (var n in a) {
|
|
368
|
+
if (Object.prototype.hasOwnProperty.call(a, n)) {
|
|
369
|
+
e[n] = a[n];
|
|
369
370
|
}
|
|
370
371
|
}
|
|
371
372
|
}
|
|
@@ -373,118 +374,118 @@
|
|
|
373
374
|
};
|
|
374
375
|
return ae.apply(this, arguments);
|
|
375
376
|
}
|
|
376
|
-
function
|
|
377
|
+
function ne(e, r) {
|
|
377
378
|
if (e == null) return {};
|
|
378
|
-
var a =
|
|
379
|
-
var
|
|
379
|
+
var a = ie(e, r);
|
|
380
|
+
var n, i;
|
|
380
381
|
if (Object.getOwnPropertySymbols) {
|
|
381
|
-
var
|
|
382
|
-
for (
|
|
383
|
-
|
|
384
|
-
if (r.indexOf(
|
|
385
|
-
if (!Object.prototype.propertyIsEnumerable.call(e,
|
|
386
|
-
a[
|
|
382
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
383
|
+
for (i = 0; i < o.length; i++) {
|
|
384
|
+
n = o[i];
|
|
385
|
+
if (r.indexOf(n) >= 0) continue;
|
|
386
|
+
if (!Object.prototype.propertyIsEnumerable.call(e, n)) continue;
|
|
387
|
+
a[n] = e[n];
|
|
387
388
|
}
|
|
388
389
|
}
|
|
389
390
|
return a;
|
|
390
391
|
}
|
|
391
|
-
function
|
|
392
|
+
function ie(e, r) {
|
|
392
393
|
if (e == null) return {};
|
|
393
394
|
var a = {};
|
|
394
|
-
var
|
|
395
|
-
var
|
|
396
|
-
for (
|
|
397
|
-
|
|
398
|
-
if (r.indexOf(
|
|
399
|
-
a[
|
|
395
|
+
var n = Object.keys(e);
|
|
396
|
+
var i, o;
|
|
397
|
+
for (o = 0; o < n.length; o++) {
|
|
398
|
+
i = n[o];
|
|
399
|
+
if (r.indexOf(i) >= 0) continue;
|
|
400
|
+
a[i] = e[i];
|
|
400
401
|
}
|
|
401
402
|
return a;
|
|
402
403
|
}
|
|
403
|
-
var
|
|
404
|
-
appearance:
|
|
405
|
-
children:
|
|
406
|
-
elementRef:
|
|
407
|
-
onRequestRemove:
|
|
408
|
-
type:
|
|
404
|
+
var oe = {
|
|
405
|
+
appearance: o().oneOf([ "default", "fill", "banner" ]),
|
|
406
|
+
children: o().node,
|
|
407
|
+
elementRef: o().oneOfType([ o().func, o().object ]),
|
|
408
|
+
onRequestRemove: o().func,
|
|
409
|
+
type: o().oneOf([ "info", "success", "warning", "error" ])
|
|
409
410
|
};
|
|
410
|
-
var oe = Object.freeze({
|
|
411
|
-
info: (0, I._)("Info"),
|
|
412
|
-
warning: (0, I._)("Warning"),
|
|
413
|
-
error: (0, I._)("Alert"),
|
|
414
|
-
success: (0, I._)("Success")
|
|
415
|
-
});
|
|
416
411
|
var te = Object.freeze({
|
|
412
|
+
info: (0, P._)("Info"),
|
|
413
|
+
warning: (0, P._)("Warning"),
|
|
414
|
+
error: (0, P._)("Alert"),
|
|
415
|
+
success: (0, P._)("Success")
|
|
416
|
+
});
|
|
417
|
+
var se = Object.freeze({
|
|
417
418
|
info: C(),
|
|
418
419
|
warning: S(),
|
|
419
420
|
error: k(),
|
|
420
421
|
success: w()
|
|
421
422
|
});
|
|
422
|
-
var
|
|
423
|
-
info:
|
|
423
|
+
var le = Object.freeze({
|
|
424
|
+
info: f(),
|
|
424
425
|
warning: m(),
|
|
425
426
|
error: d(),
|
|
426
|
-
success:
|
|
427
|
+
success: s()
|
|
427
428
|
});
|
|
428
|
-
function
|
|
429
|
-
var r = e.appearance,
|
|
429
|
+
function ce(e) {
|
|
430
|
+
var r = e.appearance, i = r === void 0 ? "default" : r, o = e.children, t = e.type, s = t === void 0 ? "warning" : t, l = e.onRequestRemove, p = ne(e, [ "appearance", "children", "type", "onRequestRemove" ]);
|
|
430
431
|
// @docs-props-type MessagePropsBase
|
|
431
|
-
var v = (0,
|
|
432
|
+
var v = (0, I.useSplunkTheme)(), d = v.isEnterprise;
|
|
432
433
|
if (false) {}
|
|
433
434
|
// double check this can only be button
|
|
434
435
|
var b = (0, a.useCallback)((function(e) {
|
|
435
|
-
|
|
436
|
-
}), [
|
|
437
|
-
if (
|
|
436
|
+
l === null || l === void 0 ? void 0 : l(e);
|
|
437
|
+
}), [ l ]);
|
|
438
|
+
if (i === "banner") {
|
|
438
439
|
|
|
439
|
-
return
|
|
440
|
-
type:
|
|
440
|
+
return n().createElement(q(), ae({
|
|
441
|
+
type: s,
|
|
441
442
|
"data-test": "banner",
|
|
442
443
|
onRequestClose: b
|
|
443
|
-
}, p),
|
|
444
|
+
}, p), o);
|
|
444
445
|
}
|
|
445
|
-
var
|
|
446
|
-
var
|
|
447
|
-
var m =
|
|
448
|
-
var y =
|
|
446
|
+
var f = d ? se : le;
|
|
447
|
+
var g = f[s];
|
|
448
|
+
var m = i === "fill";
|
|
449
|
+
var y = i === "default" || i === "fill";
|
|
449
450
|
|
|
450
|
-
return
|
|
451
|
-
$appearance:
|
|
451
|
+
return n().createElement(Q, ae({
|
|
452
|
+
$appearance: i,
|
|
452
453
|
$fillStyle: m,
|
|
453
|
-
$hasRemoveIcon: !!
|
|
454
|
-
$type:
|
|
455
|
-
"data-test-type":
|
|
454
|
+
$hasRemoveIcon: !!l,
|
|
455
|
+
$type: s,
|
|
456
|
+
"data-test-type": s,
|
|
456
457
|
"data-test": "message"
|
|
457
|
-
}, p), y &&
|
|
458
|
+
}, p), y && n().createElement(K, {
|
|
458
459
|
$fillStyle: m,
|
|
459
|
-
$type:
|
|
460
|
-
}, d ?
|
|
460
|
+
$type: s
|
|
461
|
+
}, d ? n().createElement(g, {
|
|
461
462
|
height: "24px",
|
|
462
463
|
width: "24px",
|
|
463
464
|
hideDefaultTooltip: true,
|
|
464
465
|
screenReaderText: null
|
|
465
|
-
}) :
|
|
466
|
+
}) : n().createElement(g, {
|
|
466
467
|
variant: "filled"
|
|
467
|
-
}),
|
|
468
|
+
}), n().createElement(E(), null, te[s])), n().createElement(G, {
|
|
468
469
|
"data-test": "content",
|
|
469
470
|
$fillStyle: m
|
|
470
|
-
},
|
|
471
|
+
}, o), l && n().createElement(J, {
|
|
471
472
|
"data-test": "remove",
|
|
472
473
|
onClick: b,
|
|
473
|
-
$appearance:
|
|
474
|
-
}, d ?
|
|
474
|
+
$appearance: i
|
|
475
|
+
}, d ? n().createElement(u(), {
|
|
475
476
|
height: "12px",
|
|
476
477
|
hideDefaultTooltip: true,
|
|
477
478
|
screenReaderText: null,
|
|
478
479
|
width: "12px"
|
|
479
|
-
}) :
|
|
480
|
+
}) : n().createElement(c(), {
|
|
480
481
|
height: "20px",
|
|
481
482
|
width: "20px"
|
|
482
483
|
})));
|
|
483
484
|
}
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
/* harmony default export */ const pe =
|
|
485
|
+
ce.propTypes = oe;
|
|
486
|
+
ce.Title = re;
|
|
487
|
+
ce.Link = z;
|
|
488
|
+
/* harmony default export */ const pe = ce;
|
|
488
489
|
// CONCATENATED MODULE: ./src/Message/index.ts
|
|
489
490
|
module.exports = r;
|
|
490
491
|
/******/})();
|