@splunk/react-ui 4.39.0 → 4.40.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/CHANGELOG.md +21 -0
- package/Card.js +3 -1
- package/Chip.js +133 -125
- package/ControlGroup.js +27 -30
- package/MIGRATION.mdx +31 -0
- package/Message.js +136 -123
- package/Multiselect.js +3147 -3130
- package/Number.js +23 -18
- package/Popover.js +2 -1
- package/Select.js +2072 -2064
- package/SplitButton.d.ts +2 -0
- package/TabBar.js +15 -12
- package/TabLayout.js +8 -2
- package/Table.js +229 -224
- package/WaitSpinner.js +1 -1
- package/package.json +2 -2
- package/types/src/Card/Card.d.ts +1 -0
- package/types/src/Card/Footer.d.ts +1 -0
- package/types/src/Chip/Chip.d.ts +3 -6
- package/types/src/ComboBox/ComboBox.d.ts +1 -1
- package/types/src/Multiselect/Compact.d.ts +1 -1
- package/types/src/Multiselect/Multiselect.d.ts +1 -1
- package/types/src/Multiselect/Normal.d.ts +1 -1
- package/types/src/Select/Select.d.ts +3 -1
- package/types/src/Select/SelectAllOption.d.ts +2 -2
- package/types/src/Select/SelectBase.d.ts +104 -66
- package/types/src/Select/docs/examples/Appearance.d.ts +0 -2
- package/types/src/Table/Cell.d.ts +0 -2
- package/types/src/Table/HeadInner.d.ts +5 -1
- package/types/src/WaitSpinner/WaitSpinner.d.ts +0 -1
- package/types/src/useControlled/index.d.ts +2 -0
- package/types/src/useControlled/useControlled.d.ts +21 -0
- package/types/src/useResizeObserver/index.d.ts +2 -0
- package/types/src/useResizeObserver/useResizeObserver.d.ts +12 -0
- package/useControlled.js +112 -0
- package/useKeyPress.d.ts +2 -0
- package/useResizeObserver.d.ts +2 -0
- package/useResizeObserver.js +137 -0
- package/types/src/Chip/docs/examples/Basic.d.ts +0 -2
- package/types/src/Chip/docs/examples/prisma/Appearance.d.ts +0 -2
- package/types/src/Color/docs/examples/prisma/Controlled.d.ts +0 -2
- package/types/src/Color/docs/examples/prisma/ThemeVariables.d.ts +0 -1
- package/types/src/Color/docs/examples/prisma/Uncontrolled.d.ts +0 -2
- package/types/src/Dropdown/docs/examples/prisma/Basic.d.ts +0 -2
- package/types/src/Dropdown/docs/examples/prisma/BasicMenu.d.ts +0 -2
- package/types/src/Dropdown/docs/examples/prisma/ControlledDropdown.d.ts +0 -2
- package/types/src/Dropdown/docs/examples/prisma/Dialog.d.ts +0 -2
- package/types/src/Dropdown/docs/examples/prisma/OtherToggles.d.ts +0 -2
- package/types/src/Dropdown/docs/examples/prisma/ScrollingMenu.d.ts +0 -2
- package/types/src/File/docs/examples/prisma/Disabled.d.ts +0 -12
- package/types/src/Message/docs/examples/Title.d.ts +0 -2
- package/types/src/WaitSpinner/docs/examples/prisma/Basic.d.ts +0 -2
- /package/types/src/Color/docs/examples/{prisma/CustomizedPalette.d.ts → CustomizedPalette.d.ts} +0 -0
- /package/types/src/Color/docs/examples/{prisma/HideInput.d.ts → HideInput.d.ts} +0 -0
package/MIGRATION.mdx
CHANGED
|
@@ -5,6 +5,24 @@ import Table from '@splunk/react-ui/Table';
|
|
|
5
5
|
|
|
6
6
|
This document lists migration guidance for new features and breaking changes.
|
|
7
7
|
|
|
8
|
+
## 4.40.0
|
|
9
|
+
|
|
10
|
+
### Deprecated `Select`'s `appearance="primary"` value
|
|
11
|
+
|
|
12
|
+
#### Change
|
|
13
|
+
|
|
14
|
+
`Select`'s `appearance="primary"` value has been deprecated and will be removed in the next major version.
|
|
15
|
+
|
|
16
|
+
#### Context
|
|
17
|
+
|
|
18
|
+
The `primary` appearance is no longer supported as primary actions are generally intended for tasks like submitting a form or page, whereas `Select` should be used to make a choice that then gets submitted with a primary `Button`.
|
|
19
|
+
Including both a primary `Select` and `Button` conflicts with the visual importance and hierarchy of the page.
|
|
20
|
+
|
|
21
|
+
#### Migration steps
|
|
22
|
+
|
|
23
|
+
* If `Select` was being used as a primary action but there are some variants for how that primary action works (e.g. Save vs. Save As), use `SplitButton`.
|
|
24
|
+
* Otherwise use `Select` with the `default` appearance paired with a primary `Button` to submit.
|
|
25
|
+
|
|
8
26
|
## 4.39.0
|
|
9
27
|
|
|
10
28
|
### Deprecated `TabBar` and `TabLayout`'s `appearance` prop
|
|
@@ -719,3 +737,16 @@ The `size` prop currently does not do anything in `ComboBox`, `ControlGroup`, or
|
|
|
719
737
|
|
|
720
738
|
Remove all usage of `ComboBox`, `ControlGroup`, and `StaticContent`'s `size` prop. To change the size of components, use the `SplunkThemeProvider`'s `density` prop.
|
|
721
739
|
|
|
740
|
+
## 4.39.0
|
|
741
|
+
|
|
742
|
+
### Deprecated `Menu.Item`'s `icon` prop
|
|
743
|
+
|
|
744
|
+
#### Change
|
|
745
|
+
`Menu.Item`'s `icon` prop is deprecated and will be removed in a future major version.
|
|
746
|
+
|
|
747
|
+
#### Context
|
|
748
|
+
The `Menu.Item` icon should not be used as `Menu.Item` as that restricted the location of the icon and it is now possible to place an adornment at the start or the end of the `Menu.Item` content.
|
|
749
|
+
|
|
750
|
+
#### Migration steps
|
|
751
|
+
Replace all usage of `Menu.Item`'s `icon` prop with `startAdornment` and/or `endAdornment`.
|
|
752
|
+
|
package/Message.js
CHANGED
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
// EXPORTS
|
|
63
63
|
e.d(r, {
|
|
64
64
|
Link: () => /* reexport */ z,
|
|
65
|
-
default: () => /* reexport */
|
|
65
|
+
default: () => /* reexport */ ue
|
|
66
66
|
});
|
|
67
67
|
// CONCATENATED MODULE: external "react"
|
|
68
68
|
const a = require("react");
|
|
@@ -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);
|
|
@@ -102,12 +102,12 @@
|
|
|
102
102
|
var O = e.n(S);
|
|
103
103
|
// CONCATENATED MODULE: external "@splunk/react-ui/MessageBar"
|
|
104
104
|
const q = require("@splunk/react-ui/MessageBar");
|
|
105
|
-
var
|
|
105
|
+
var _ = e.n(q);
|
|
106
106
|
// CONCATENATED MODULE: external "@splunk/react-ui/ScreenReaderContent"
|
|
107
|
-
const
|
|
108
|
-
var
|
|
107
|
+
const E = require("@splunk/react-ui/ScreenReaderContent");
|
|
108
|
+
var P = e.n(E);
|
|
109
109
|
// CONCATENATED MODULE: external "@splunk/themes"
|
|
110
|
-
const
|
|
110
|
+
const j = require("@splunk/themes");
|
|
111
111
|
// CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
|
|
112
112
|
const I = require("@splunk/ui-utils/i18n");
|
|
113
113
|
// CONCATENATED MODULE: external "styled-components"
|
|
@@ -173,142 +173,146 @@
|
|
|
173
173
|
var F = T().p.withConfig({
|
|
174
174
|
displayName: "TitleStyles__StyledTitle",
|
|
175
175
|
componentId: "sc-6gbjha-0"
|
|
176
|
-
})([ "", " ", "" ],
|
|
176
|
+
})([ "", " ", "" ], j.mixins.reset("block"), (0, j.pick)({
|
|
177
177
|
prisma: (0, R.css)([ "font-size:14px;line-height:20px;" ])
|
|
178
178
|
}));
|
|
179
179
|
// CONCATENATED MODULE: ./src/Message/MessageStyles.ts
|
|
180
180
|
var G = T().div.withConfig({
|
|
181
181
|
displayName: "MessageStyles__StyledContent",
|
|
182
182
|
componentId: "eg66af-0"
|
|
183
|
-
})([ "
|
|
184
|
-
prisma: (0, R.css)([ "padding:", " 0;color:", ";" ],
|
|
183
|
+
})([ "width:100%;", ";", " ", ";" ], (0, j.pick)({
|
|
184
|
+
prisma: (0, R.css)([ "padding:", " 0;color:", ";" ], j.variables.spacingMedium, j.variables.contentColorActive),
|
|
185
185
|
enterprise: (0, R.css)([ "padding:12px 0;" ])
|
|
186
|
-
}), (0,
|
|
187
|
-
prisma: (0, R.css)([ "padding-left:", ";" ],
|
|
186
|
+
}), (0, j.pick)({
|
|
187
|
+
prisma: (0, R.css)([ "padding-left:", ";" ], j.variables.spacingXSmall),
|
|
188
188
|
enterprise: (0, R.css)([ "padding-left:15px;" ])
|
|
189
189
|
}), (function(e) {
|
|
190
190
|
var r = e.$fillStyle;
|
|
191
|
-
return r && (0,
|
|
192
|
-
prisma: (0, R.css)([ "padding-left:", ";" ],
|
|
191
|
+
return r && (0, j.pick)({
|
|
192
|
+
prisma: (0, R.css)([ "padding-left:", ";" ], j.variables.spacingMedium)
|
|
193
193
|
});
|
|
194
194
|
}));
|
|
195
|
-
var J = T()
|
|
196
|
-
displayName: "
|
|
195
|
+
var J = T().div.withConfig({
|
|
196
|
+
displayName: "MessageStyles__StyledWrapper",
|
|
197
197
|
componentId: "eg66af-1"
|
|
198
|
-
})([ "
|
|
199
|
-
|
|
198
|
+
})([ "display:flex;align-items:baseline;flex:1;" ]);
|
|
199
|
+
var K = T()(H()).withConfig({
|
|
200
|
+
displayName: "MessageStyles__StyledRemove",
|
|
201
|
+
componentId: "eg66af-2"
|
|
202
|
+
})([ "", ";border:1px solid transparent;border-radius:", ";color:", ";", ";cursor:pointer;position:absolute;", " padding:8px;&:hover,&:focus{background:", ";color:", ";}&:active{", ";}", "" ], j.mixins.reset("flex"), (0,
|
|
203
|
+
j.pick)({
|
|
200
204
|
prisma: "50%",
|
|
201
|
-
enterprise:
|
|
202
|
-
}), (0,
|
|
203
|
-
prisma:
|
|
205
|
+
enterprise: j.variables.borderRadius
|
|
206
|
+
}), (0, j.pick)({
|
|
207
|
+
prisma: j.variables.contentColorMuted,
|
|
204
208
|
enterprise: {
|
|
205
|
-
dark:
|
|
206
|
-
light:
|
|
209
|
+
dark: j.variables.gray96,
|
|
210
|
+
light: j.variables.gray45
|
|
207
211
|
}
|
|
208
212
|
}), (function(e) {
|
|
209
213
|
var r = e.$appearance;
|
|
210
|
-
return r === "banner" && (0,
|
|
211
|
-
prisma: (0, R.css)([ "color:", ";" ],
|
|
214
|
+
return r === "banner" && (0, j.pick)({
|
|
215
|
+
prisma: (0, R.css)([ "color:", ";" ], j.variables.contentColorInverted)
|
|
212
216
|
});
|
|
213
|
-
}), (0,
|
|
217
|
+
}), (0, j.pick)({
|
|
214
218
|
prisma: (0, R.css)([ "top:3px;right:2px;" ]),
|
|
215
219
|
enterprise: (0, R.css)([ "top:8px;right:8px;" ])
|
|
216
|
-
}), (0,
|
|
217
|
-
prisma:
|
|
220
|
+
}), (0, j.pick)({
|
|
221
|
+
prisma: j.variables.interactiveColorOverlayHover,
|
|
218
222
|
enterprise: {
|
|
219
|
-
dark:
|
|
220
|
-
light:
|
|
223
|
+
dark: j.variables.gray30,
|
|
224
|
+
light: j.variables.gray92
|
|
221
225
|
}
|
|
222
|
-
}), (0,
|
|
226
|
+
}), (0, j.pick)({
|
|
223
227
|
enterprise: {
|
|
224
|
-
dark:
|
|
225
|
-
light:
|
|
228
|
+
dark: j.variables.gray96,
|
|
229
|
+
light: j.variables.linkColor
|
|
226
230
|
},
|
|
227
|
-
prisma:
|
|
228
|
-
}), (0,
|
|
229
|
-
prisma: (0, R.css)([ "background:", ";" ],
|
|
230
|
-
enterprise: (0, R.css)([ "box-shadow:", ";" ],
|
|
231
|
-
}), (0,
|
|
232
|
-
prisma: (0, R.css)([ "&:focus{box-shadow:0 0 0 3px ", ";}" ],
|
|
231
|
+
prisma: j.variables.contentColorActive
|
|
232
|
+
}), (0, j.pick)({
|
|
233
|
+
prisma: (0, R.css)([ "background:", ";" ], j.variables.interactiveColorOverlayActive),
|
|
234
|
+
enterprise: (0, R.css)([ "box-shadow:", ";" ], j.variables.focusShadow)
|
|
235
|
+
}), (0, j.pick)({
|
|
236
|
+
prisma: (0, R.css)([ "&:focus{box-shadow:0 0 0 3px ", ";}" ], j.variables.focusColor)
|
|
233
237
|
}));
|
|
234
|
-
var
|
|
238
|
+
var Q = T().span.withConfig({
|
|
235
239
|
displayName: "MessageStyles__StyledIconWrapper",
|
|
236
|
-
componentId: "eg66af-
|
|
240
|
+
componentId: "eg66af-3"
|
|
237
241
|
})([ "position:relative;min-width:", ";text-align:center;color:", ";", " ", "" ], (0,
|
|
238
|
-
|
|
239
|
-
prisma:
|
|
242
|
+
j.pick)({
|
|
243
|
+
prisma: j.variables.spacingXLarge,
|
|
240
244
|
enterprise: "25px"
|
|
241
|
-
}),
|
|
245
|
+
}), j.variables.white, (0, j.pick)({
|
|
242
246
|
enterprise: (0, R.css)([ "top:-2px;" ]),
|
|
243
247
|
prisma: (0, R.css)([ "top:-1.8px;" ])
|
|
244
|
-
}), (0,
|
|
245
|
-
info: (0, R.css)([ "color:", ";" ], (0,
|
|
246
|
-
prisma:
|
|
247
|
-
enterprise:
|
|
248
|
+
}), (0, j.pickVariant)("$type", {
|
|
249
|
+
info: (0, R.css)([ "color:", ";" ], (0, j.pick)({
|
|
250
|
+
prisma: j.variables.contentColorMuted,
|
|
251
|
+
enterprise: j.variables.infoColor
|
|
248
252
|
})),
|
|
249
|
-
success: (0, R.css)([ "color:", ";" ],
|
|
250
|
-
warning: (0, R.css)([ "color:", ";" ],
|
|
251
|
-
error: (0, R.css)([ "color:", ";" ],
|
|
253
|
+
success: (0, R.css)([ "color:", ";" ], j.variables.accentColorPositive),
|
|
254
|
+
warning: (0, R.css)([ "color:", ";" ], j.variables.accentColorWarning),
|
|
255
|
+
error: (0, R.css)([ "color:", ";" ], j.variables.accentColorNegative)
|
|
252
256
|
}));
|
|
253
|
-
var
|
|
257
|
+
var U = T()(B()).withConfig({
|
|
254
258
|
displayName: "MessageStyles__StyledBox",
|
|
255
|
-
componentId: "eg66af-
|
|
256
|
-
})([ "", ";align-items:baseline;position:relative;border-radius:", ";margin-bottom:", ";", " word-wrap:break-word;", " ", "" ],
|
|
257
|
-
|
|
258
|
-
prisma:
|
|
259
|
+
componentId: "eg66af-4"
|
|
260
|
+
})([ "", ";align-items:baseline;position:relative;border-radius:", ";margin-bottom:", ";", " word-wrap:break-word;", " ", "" ], j.mixins.reset("flex"), (0,
|
|
261
|
+
j.pick)({
|
|
262
|
+
prisma: j.variables.borderRadius,
|
|
259
263
|
enterprise: "5px"
|
|
260
|
-
}),
|
|
264
|
+
}), j.variables.spacingSmall, (0, j.pickVariant)("$hasRemoveIcon", {
|
|
261
265
|
true: {
|
|
262
|
-
prisma: (0, R.css)([ "padding-right:", ";" ],
|
|
263
|
-
enterprise: (0, R.css)([ "padding-right:", ";" ],
|
|
266
|
+
prisma: (0, R.css)([ "padding-right:", ";" ], j.variables.spacingXXXLarge),
|
|
267
|
+
enterprise: (0, R.css)([ "padding-right:", ";" ], j.variables.spacingXXLarge)
|
|
264
268
|
},
|
|
265
|
-
false: (0, R.css)([ "padding-right:", ";" ],
|
|
269
|
+
false: (0, R.css)([ "padding-right:", ";" ], j.variables.spacingSmall)
|
|
266
270
|
}), (function(e) {
|
|
267
271
|
var r = e.$fillStyle;
|
|
268
|
-
return r && (0,
|
|
269
|
-
enterprise: (0, R.css)([ "& > ", "{left:", ";}", "" ], /* sc-sel */
|
|
270
|
-
|
|
271
|
-
info: (0, R.css)([ "", "" ], (0,
|
|
272
|
-
light: (0, R.css)([ "background-color:", ";border:1px solid ", ";" ],
|
|
273
|
-
dark: (0, R.css)([ "background-color:", ";" ],
|
|
272
|
+
return r && (0, j.pick)({
|
|
273
|
+
enterprise: (0, R.css)([ "& > ", "{left:", ";}", "" ], /* sc-sel */ Q, j.variables.spacingXSmall, (0,
|
|
274
|
+
j.pickVariant)("$type", {
|
|
275
|
+
info: (0, R.css)([ "", "" ], (0, j.pick)({
|
|
276
|
+
light: (0, R.css)([ "background-color:", ";border:1px solid ", ";" ], j.variables.infoColorL50, j.variables.infoColor),
|
|
277
|
+
dark: (0, R.css)([ "background-color:", ";" ], j.mixins.colorWithAlpha(j.variables.infoColor, .5))
|
|
274
278
|
})),
|
|
275
|
-
success: (0, R.css)([ "", "" ], (0,
|
|
276
|
-
light: (0, R.css)([ "background-color:", ";border:1px solid ", ";" ],
|
|
277
|
-
dark: (0, R.css)([ "background-color:", ";" ],
|
|
279
|
+
success: (0, R.css)([ "", "" ], (0, j.pick)({
|
|
280
|
+
light: (0, R.css)([ "background-color:", ";border:1px solid ", ";" ], j.variables.successColorL50, j.variables.successColor),
|
|
281
|
+
dark: (0, R.css)([ "background-color:", ";" ], j.mixins.colorWithAlpha(j.variables.successColor, .5))
|
|
278
282
|
})),
|
|
279
|
-
warning: (0, R.css)([ "", "" ], (0,
|
|
280
|
-
light: (0, R.css)([ "background-color:", ";border:1px solid ", ";" ],
|
|
281
|
-
dark: (0, R.css)([ "background-color:", ";" ],
|
|
283
|
+
warning: (0, R.css)([ "", "" ], (0, j.pick)({
|
|
284
|
+
light: (0, R.css)([ "background-color:", ";border:1px solid ", ";" ], j.variables.warningColorL50, j.variables.warningColor),
|
|
285
|
+
dark: (0, R.css)([ "background-color:", ";" ], j.mixins.colorWithAlpha(j.variables.warningColor, .5))
|
|
282
286
|
})),
|
|
283
|
-
error: (0, R.css)([ "", "" ], (0,
|
|
284
|
-
light: (0, R.css)([ "background-color:", ";border:1px solid ", ";" ],
|
|
285
|
-
dark: (0, R.css)([ "background-color:", ";" ],
|
|
287
|
+
error: (0, R.css)([ "", "" ], (0, j.pick)({
|
|
288
|
+
light: (0, R.css)([ "background-color:", ";border:1px solid ", ";" ], j.variables.errorColorL50, j.variables.errorColor),
|
|
289
|
+
dark: (0, R.css)([ "background-color:", ";" ], j.mixins.colorWithAlpha(j.variables.errorColor, .5))
|
|
286
290
|
}))
|
|
287
291
|
})),
|
|
288
292
|
prisma: (0, R.css)([ "", ";box-shadow:", ";& > ", "{color:", ";}" ], (function(e) {
|
|
289
293
|
var r = e.$type;
|
|
290
294
|
var a = {
|
|
291
|
-
info:
|
|
292
|
-
success:
|
|
293
|
-
warning:
|
|
294
|
-
error:
|
|
295
|
+
info: j.variables.contentColorActive,
|
|
296
|
+
success: j.variables.accentColorPositive,
|
|
297
|
+
warning: j.variables.accentColorWarning,
|
|
298
|
+
error: j.variables.accentColorNegative
|
|
295
299
|
};
|
|
296
300
|
var n = a[r];
|
|
297
|
-
return (0, R.css)([ "background:linear-gradient( to right,", " 0,", " ", ",", " ", ",", " 100% );" ], n, n,
|
|
298
|
-
}),
|
|
301
|
+
return (0, R.css)([ "background:linear-gradient( to right,", " 0,", " ", ",", " ", ",", " 100% );" ], n, n, j.variables.spacingXLarge, j.variables.backgroundColorPopup, j.variables.spacingXLarge, j.variables.backgroundColorPopup);
|
|
302
|
+
}), j.variables.embossShadow, /* sc-sel */ Q, j.variables.backgroundColorPopup)
|
|
299
303
|
});
|
|
300
|
-
}), (0,
|
|
301
|
-
prisma: (0, R.css)([ "& ", "{color:", ";}" ], /* sc-sel */ F, (0,
|
|
302
|
-
info:
|
|
303
|
-
warning:
|
|
304
|
-
error:
|
|
305
|
-
success:
|
|
304
|
+
}), (0, j.pick)({
|
|
305
|
+
prisma: (0, R.css)([ "& ", "{color:", ";}" ], /* sc-sel */ F, (0, j.pickVariant)("$type", {
|
|
306
|
+
info: j.variables.contentColorActive,
|
|
307
|
+
warning: j.variables.accentColorWarning,
|
|
308
|
+
error: j.variables.accentColorNegative,
|
|
309
|
+
success: j.variables.accentColorPositive
|
|
306
310
|
}))
|
|
307
311
|
}));
|
|
308
312
|
// CONCATENATED MODULE: ./src/Message/Title.tsx
|
|
309
|
-
function
|
|
313
|
+
function Y(e, r) {
|
|
310
314
|
if (null == e) return {};
|
|
311
|
-
var a, n, i =
|
|
315
|
+
var a, n, i = Z(e, r);
|
|
312
316
|
if (Object.getOwnPropertySymbols) {
|
|
313
317
|
var s = Object.getOwnPropertySymbols(e);
|
|
314
318
|
for (n = 0; n < s.length; n++) {
|
|
@@ -317,7 +321,7 @@
|
|
|
317
321
|
}
|
|
318
322
|
return i;
|
|
319
323
|
}
|
|
320
|
-
function
|
|
324
|
+
function Z(e, r) {
|
|
321
325
|
if (null == e) return {};
|
|
322
326
|
var a = {};
|
|
323
327
|
for (var n in e) {
|
|
@@ -328,22 +332,22 @@
|
|
|
328
332
|
}
|
|
329
333
|
return a;
|
|
330
334
|
}
|
|
331
|
-
var
|
|
335
|
+
var ee = {
|
|
332
336
|
children: s().node
|
|
333
337
|
};
|
|
334
338
|
/**
|
|
335
339
|
* A title component for use in `Message`.
|
|
336
|
-
*/ function
|
|
337
|
-
var r = e.children, a =
|
|
340
|
+
*/ function re(e) {
|
|
341
|
+
var r = e.children, a = Y(e, [ "children" ]);
|
|
338
342
|
// @docs-props-type TitleProps
|
|
339
343
|
|
|
340
344
|
return n().createElement(F, a, r);
|
|
341
345
|
}
|
|
342
|
-
|
|
343
|
-
/* harmony default export */ const
|
|
346
|
+
re.propTypes = ee;
|
|
347
|
+
/* harmony default export */ const ae = re;
|
|
344
348
|
// CONCATENATED MODULE: ./src/Message/Message.tsx
|
|
345
|
-
function
|
|
346
|
-
return
|
|
349
|
+
function ne() {
|
|
350
|
+
return ne = Object.assign ? Object.assign.bind() : function(e) {
|
|
347
351
|
for (var r = 1; r < arguments.length; r++) {
|
|
348
352
|
var a = arguments[r];
|
|
349
353
|
for (var n in a) {
|
|
@@ -351,11 +355,11 @@
|
|
|
351
355
|
}
|
|
352
356
|
}
|
|
353
357
|
return e;
|
|
354
|
-
},
|
|
358
|
+
}, ne.apply(null, arguments);
|
|
355
359
|
}
|
|
356
|
-
function
|
|
360
|
+
function ie(e, r) {
|
|
357
361
|
if (null == e) return {};
|
|
358
|
-
var a, n, i =
|
|
362
|
+
var a, n, i = se(e, r);
|
|
359
363
|
if (Object.getOwnPropertySymbols) {
|
|
360
364
|
var s = Object.getOwnPropertySymbols(e);
|
|
361
365
|
for (n = 0; n < s.length; n++) {
|
|
@@ -364,7 +368,7 @@
|
|
|
364
368
|
}
|
|
365
369
|
return i;
|
|
366
370
|
}
|
|
367
|
-
function
|
|
371
|
+
function se(e, r) {
|
|
368
372
|
if (null == e) return {};
|
|
369
373
|
var a = {};
|
|
370
374
|
for (var n in e) {
|
|
@@ -375,35 +379,35 @@
|
|
|
375
379
|
}
|
|
376
380
|
return a;
|
|
377
381
|
}
|
|
378
|
-
var
|
|
382
|
+
var oe = {
|
|
379
383
|
appearance: s().oneOf([ "default", "fill", "banner" ]),
|
|
380
384
|
children: s().node,
|
|
381
385
|
elementRef: s().oneOfType([ s().func, s().object ]),
|
|
382
386
|
onRequestRemove: s().func,
|
|
383
387
|
type: s().oneOf([ "info", "success", "warning", "error" ])
|
|
384
388
|
};
|
|
385
|
-
var
|
|
389
|
+
var te = Object.freeze({
|
|
386
390
|
info: (0, I._)("Info"),
|
|
387
391
|
warning: (0, I._)("Warning"),
|
|
388
392
|
error: (0, I._)("Alert"),
|
|
389
393
|
success: (0, I._)("Success")
|
|
390
394
|
});
|
|
391
|
-
var
|
|
395
|
+
var le = Object.freeze({
|
|
392
396
|
info: C(),
|
|
393
397
|
warning: O(),
|
|
394
398
|
error: k(),
|
|
395
399
|
success: w()
|
|
396
400
|
});
|
|
397
|
-
var
|
|
398
|
-
info:
|
|
401
|
+
var ce = Object.freeze({
|
|
402
|
+
info: f(),
|
|
399
403
|
warning: m(),
|
|
400
404
|
error: d(),
|
|
401
405
|
success: t()
|
|
402
406
|
});
|
|
403
|
-
function
|
|
404
|
-
var r = e.appearance, i = r === void 0 ? "default" : r, s = e.children, o = e.type, t = o === void 0 ? "warning" : o, l = e.onRequestRemove, p =
|
|
407
|
+
function pe(e) {
|
|
408
|
+
var r = e.appearance, i = r === void 0 ? "default" : r, s = e.children, o = e.type, t = o === void 0 ? "warning" : o, l = e.onRequestRemove, p = ie(e, [ "appearance", "children", "type", "onRequestRemove" ]);
|
|
405
409
|
// @docs-props-type MessagePropsBase
|
|
406
|
-
var v = (0,
|
|
410
|
+
var v = (0, j.useSplunkTheme)(), d = v.isEnterprise;
|
|
407
411
|
if (false) {}
|
|
408
412
|
// double check this can only be button
|
|
409
413
|
var b = (0, a.useCallback)((function(e) {
|
|
@@ -411,38 +415,47 @@
|
|
|
411
415
|
}), [ l ]);
|
|
412
416
|
if (i === "banner") {
|
|
413
417
|
|
|
414
|
-
return n().createElement(
|
|
418
|
+
return n().createElement(_(), ne({
|
|
415
419
|
type: t,
|
|
416
420
|
"data-test": "banner",
|
|
417
421
|
onRequestClose: b
|
|
418
422
|
}, p), s);
|
|
419
423
|
}
|
|
420
|
-
var
|
|
421
|
-
var
|
|
424
|
+
var f = d ? le : ce;
|
|
425
|
+
var g = f[t];
|
|
422
426
|
var m = i === "fill";
|
|
423
427
|
var y = i === "default" || i === "fill";
|
|
428
|
+
// filters out Message.Title from other content
|
|
429
|
+
var k;
|
|
430
|
+
var h = n().Children.toArray(s).filter((function(e) {
|
|
431
|
+
if ( n().isValidElement(e) && e.type === ae) {
|
|
432
|
+
k = e;
|
|
433
|
+
return false;
|
|
434
|
+
}
|
|
435
|
+
return true;
|
|
436
|
+
}));
|
|
424
437
|
|
|
425
|
-
return n().createElement(
|
|
438
|
+
return n().createElement(U, ne({
|
|
426
439
|
$appearance: i,
|
|
427
440
|
$fillStyle: m,
|
|
428
441
|
$hasRemoveIcon: !!l,
|
|
429
442
|
$type: t,
|
|
430
443
|
"data-test-type": t,
|
|
431
444
|
"data-test": "message"
|
|
432
|
-
}, p), y && n().createElement(
|
|
445
|
+
}, p), y && n().createElement(Q, {
|
|
433
446
|
$fillStyle: m,
|
|
434
447
|
$type: t
|
|
435
|
-
}, d ? n().createElement(
|
|
448
|
+
}, d ? n().createElement(g, {
|
|
436
449
|
height: "24px",
|
|
437
450
|
width: "24px",
|
|
438
451
|
hideDefaultTooltip: true,
|
|
439
452
|
screenReaderText: null
|
|
440
|
-
}) : n().createElement(
|
|
453
|
+
}) : n().createElement(g, {
|
|
441
454
|
variant: "filled"
|
|
442
|
-
}), n().createElement(
|
|
455
|
+
}), n().createElement(P(), null, te[t])), n().createElement(G, {
|
|
443
456
|
"data-test": "content",
|
|
444
457
|
$fillStyle: m
|
|
445
|
-
},
|
|
458
|
+
}, k, n().createElement(J, null, h)), l && n().createElement(K, {
|
|
446
459
|
"data-test": "remove",
|
|
447
460
|
onClick: b,
|
|
448
461
|
$appearance: i
|
|
@@ -456,10 +469,10 @@
|
|
|
456
469
|
width: "20px"
|
|
457
470
|
})));
|
|
458
471
|
}
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
/* harmony default export */ const
|
|
472
|
+
pe.propTypes = oe;
|
|
473
|
+
pe.Title = ae;
|
|
474
|
+
pe.Link = z;
|
|
475
|
+
/* harmony default export */ const ue = pe;
|
|
463
476
|
// CONCATENATED MODULE: ./src/Message/index.ts
|
|
464
477
|
module.exports = r;
|
|
465
478
|
/******/})();
|