@splunk/react-ui 4.38.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/Accordion.js +131 -153
- package/Anchor.js +50 -58
- package/Animation.js +64 -59
- package/AnimationToggle.js +59 -61
- package/Box.js +59 -67
- package/Breadcrumbs.js +113 -127
- package/Button.js +151 -169
- package/ButtonGroup.js +41 -49
- package/ButtonSimple.js +264 -295
- package/CHANGELOG.md +49 -0
- package/Calendar.js +353 -414
- package/Card.js +186 -244
- package/CardLayout.js +86 -83
- package/Chip.js +136 -146
- package/Clickable.js +180 -198
- package/CloseButton.js +52 -60
- package/Code.js +24 -31
- package/CollapsiblePanel.js +172 -202
- package/Color.js +371 -412
- package/ColumnLayout.js +72 -96
- package/ComboBox.js +266 -303
- package/Concertina.js +406 -454
- package/ControlGroup.js +178 -210
- package/Date.js +116 -131
- package/DefinitionList.js +125 -149
- package/Divider.js +81 -79
- package/Dropdown.js +226 -237
- package/DualListbox.js +150 -186
- package/EventListener.js +4 -1
- package/File.js +1032 -955
- package/FormRows.js +281 -334
- package/Heading.js +27 -35
- package/Image.js +101 -116
- package/JSONTree.js +301 -344
- package/Layer.js +118 -126
- package/Link.js +141 -159
- package/List.js +61 -77
- package/MIGRATION.mdx +123 -38
- package/Markdown.js +288 -347
- package/Menu.js +506 -532
- package/Message.js +197 -207
- package/MessageBar.js +58 -66
- package/Modal.js +241 -290
- package/ModalLayer.js +130 -148
- package/Monogram.js +138 -138
- package/Multiselect.js +3137 -3433
- package/Number.js +164 -178
- package/Paginator.js +296 -335
- package/Paragraph.js +24 -32
- package/Popover.js +450 -442
- package/Progress.js +65 -75
- package/RadioBar.js +301 -303
- package/RadioList.js +77 -119
- package/Resize.js +105 -127
- package/ResultsMenu.js +373 -385
- package/ScreenReaderContent.js +50 -58
- package/Scroll.js +209 -244
- package/Search.js +379 -391
- package/Select.js +2085 -2345
- package/SidePanel.js +122 -142
- package/Slider.js +132 -145
- package/SlidingPanels.js +238 -270
- package/SplitButton.d.ts +2 -0
- package/SplitButton.js +222 -245
- package/StaticContent.js +68 -76
- package/StepBar.js +206 -205
- package/Switch.js +176 -205
- package/TabBar.js +235 -268
- package/TabLayout.js +122 -141
- package/Table.js +2103 -2261
- package/Text.js +379 -493
- package/TextArea.js +411 -441
- package/Tooltip.js +116 -132
- package/TransitionOpen.js +160 -178
- package/Tree.js +268 -287
- package/Typography.js +48 -52
- package/WaitSpinner.js +61 -69
- package/cypress/support/commands.ts +9 -0
- package/cypress/support/index.d.ts +6 -0
- package/cypress/tsconfig.cypress.json +1 -0
- package/docker-compose.yml +0 -1
- package/package.json +15 -15
- package/types/src/Button/Button.d.ts +5 -1
- package/types/src/ButtonSimple/ButtonSimple.d.ts +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/CollapsiblePanel/CollapsiblePanel.d.ts +1 -1
- package/types/src/Color/Color.d.ts +2 -2
- package/types/src/Color/Palette.d.ts +4 -2
- package/types/src/ComboBox/ComboBox.d.ts +1 -1
- package/types/src/ComboBox/Option.d.ts +1 -1
- package/types/src/ControlGroup/ControlGroup.d.ts +1 -2
- package/types/src/Date/Date.d.ts +2 -2
- package/types/src/File/File.d.ts +2 -3
- package/types/src/File/Retry.d.ts +1 -2
- package/types/src/Menu/Item.d.ts +18 -5
- package/types/src/Menu/Menu.d.ts +3 -3
- package/types/src/Menu/docs/examples/Adornments.d.ts +2 -0
- package/types/src/Menu/docs/examples/SelectableWithAdornments.d.ts +2 -0
- package/types/src/ModalLayer/ModalLayer.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/Multiselect/Option.d.ts +2 -0
- package/types/src/Number/Number.d.ts +3 -3
- package/types/src/Popover/Popover.d.ts +3 -4
- package/types/src/RadioBar/RadioBar.d.ts +2 -2
- package/types/src/ResultsMenu/VirtualizedResultsMenu/VirtualizedResultsMenu.d.ts +1 -1
- package/types/src/ScrollContainerContext/ScrollContainerContext.d.ts +2 -2
- package/types/src/Search/Option.d.ts +9 -3
- package/types/src/Select/Option.d.ts +3 -1
- package/types/src/Select/OptionBase.d.ts +7 -5
- package/types/src/Select/Select.d.ts +4 -2
- package/types/src/Select/SelectAllOption.d.ts +4 -4
- package/types/src/Select/SelectBase.d.ts +104 -66
- package/types/src/Select/docs/examples/Appearance.d.ts +0 -2
- package/types/src/SidePanel/SidePanel.d.ts +1 -1
- package/types/src/Slider/Slider.d.ts +2 -2
- package/types/src/SlidingPanels/SlidingPanels.d.ts +1 -1
- package/types/src/StepBar/Step.d.ts +1 -2
- package/types/src/Switch/Switch.d.ts +0 -1
- package/types/src/TabBar/Tab.d.ts +1 -1
- package/types/src/TabBar/TabBar.d.ts +3 -1
- package/types/src/TabLayout/TabLayout.d.ts +2 -0
- package/types/src/Table/Cell.d.ts +0 -2
- package/types/src/Table/HeadDropdownCell.d.ts +2 -0
- package/types/src/Table/HeadInner.d.ts +5 -1
- package/types/src/Table/Table.d.ts +0 -1
- package/types/src/Table/docs/examples/StripeRows.d.ts +2 -0
- package/types/src/Text/IconOutlinedHide.d.ts +1 -2
- package/types/src/Text/IconOutlinedView.d.ts +1 -2
- package/types/src/Text/Text.d.ts +2 -2
- package/types/src/TextArea/TextArea.d.ts +2 -2
- package/types/src/Tooltip/Tooltip.d.ts +4 -4
- package/types/src/TransitionOpen/TransitionOpen.d.ts +1 -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/useForceUpdate.js +30 -32
- package/useKeyPress.d.ts +2 -0
- package/useKeyPress.js +1 -1
- package/useResizeObserver.d.ts +2 -0
- package/useResizeObserver.js +137 -0
- package/types/src/ButtonGroup/docs/examples/prisma/Basic.d.ts +0 -1
- 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/File/docs/examples/prisma/Error.d.ts +0 -1
- package/types/src/Menu/docs/examples/Icons.d.ts +0 -2
- package/types/src/Menu/docs/examples/SelectableWithIcons.d.ts +0 -2
- package/types/src/Message/docs/examples/prisma/Title.d.ts +0 -2
- package/types/src/TabBar/docs/examples/prisma/Context.d.ts +0 -2
- package/types/src/TabLayout/docs/examples/prisma/Context.d.ts +0 -2
- package/types/src/Table/docs/examples/prisma/Basic.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/types/src/StepBar/docs/examples/{prisma/Error.d.ts → Error.d.ts} +0 -0
- /package/types/src/TabBar/docs/examples/{prisma/Disabled.d.ts → Disabled.d.ts} +0 -0
package/Message.js
CHANGED
|
@@ -62,20 +62,20 @@
|
|
|
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");
|
|
69
69
|
var n = e.n(a);
|
|
70
70
|
// CONCATENATED MODULE: external "prop-types"
|
|
71
71
|
const i = require("prop-types");
|
|
72
|
-
var
|
|
72
|
+
var s = e.n(i);
|
|
73
73
|
// CONCATENATED MODULE: external "@splunk/react-icons/CheckCircle"
|
|
74
|
-
const
|
|
75
|
-
var
|
|
74
|
+
const o = require("@splunk/react-icons/CheckCircle");
|
|
75
|
+
var t = e.n(o);
|
|
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);
|
|
@@ -98,18 +98,18 @@
|
|
|
98
98
|
const x = require("@splunk/react-icons/enterprise/Success");
|
|
99
99
|
var w = e.n(x);
|
|
100
100
|
// CONCATENATED MODULE: external "@splunk/react-icons/enterprise/Warning"
|
|
101
|
-
const
|
|
102
|
-
var
|
|
101
|
+
const S = require("@splunk/react-icons/enterprise/Warning");
|
|
102
|
+
var O = e.n(S);
|
|
103
103
|
// CONCATENATED MODULE: external "@splunk/react-ui/MessageBar"
|
|
104
|
-
const
|
|
105
|
-
var
|
|
104
|
+
const q = require("@splunk/react-ui/MessageBar");
|
|
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
|
-
const
|
|
112
|
+
const I = require("@splunk/ui-utils/i18n");
|
|
113
113
|
// CONCATENATED MODULE: external "styled-components"
|
|
114
114
|
const R = require("styled-components");
|
|
115
115
|
var T = e.n(R);
|
|
@@ -123,37 +123,32 @@
|
|
|
123
123
|
})([ "" ]);
|
|
124
124
|
// CONCATENATED MODULE: ./src/Message/Link.tsx
|
|
125
125
|
function A(e, r) {
|
|
126
|
-
if (
|
|
127
|
-
var a = N(e, r);
|
|
128
|
-
var n, i;
|
|
126
|
+
if (null == e) return {};
|
|
127
|
+
var a, n, i = N(e, r);
|
|
129
128
|
if (Object.getOwnPropertySymbols) {
|
|
130
|
-
var
|
|
131
|
-
for (
|
|
132
|
-
|
|
133
|
-
if (r.indexOf(n) >= 0) continue;
|
|
134
|
-
if (!Object.prototype.propertyIsEnumerable.call(e, n)) continue;
|
|
135
|
-
a[n] = e[n];
|
|
129
|
+
var s = Object.getOwnPropertySymbols(e);
|
|
130
|
+
for (n = 0; n < s.length; n++) {
|
|
131
|
+
a = s[n], r.includes(a) || {}.propertyIsEnumerable.call(e, a) && (i[a] = e[a]);
|
|
136
132
|
}
|
|
137
133
|
}
|
|
138
|
-
return
|
|
134
|
+
return i;
|
|
139
135
|
}
|
|
140
136
|
function N(e, r) {
|
|
141
|
-
if (
|
|
137
|
+
if (null == e) return {};
|
|
142
138
|
var a = {};
|
|
143
|
-
var n
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
a[i] = e[i];
|
|
139
|
+
for (var n in e) {
|
|
140
|
+
if ({}.hasOwnProperty.call(e, n)) {
|
|
141
|
+
if (r.includes(n)) continue;
|
|
142
|
+
a[n] = e[n];
|
|
143
|
+
}
|
|
149
144
|
}
|
|
150
145
|
return a;
|
|
151
146
|
}
|
|
152
147
|
var W = {
|
|
153
|
-
children:
|
|
154
|
-
elementRef:
|
|
155
|
-
openInNewContext:
|
|
156
|
-
to:
|
|
148
|
+
children: s().node,
|
|
149
|
+
elementRef: s().oneOfType([ s().func, s().object ]),
|
|
150
|
+
openInNewContext: s().bool,
|
|
151
|
+
to: s().string
|
|
157
152
|
};
|
|
158
153
|
/**
|
|
159
154
|
* @deprecated `Message.Link` is deprecated and will be removed in a future major version. Use `Link` instead.
|
|
@@ -178,242 +173,228 @@
|
|
|
178
173
|
var F = T().p.withConfig({
|
|
179
174
|
displayName: "TitleStyles__StyledTitle",
|
|
180
175
|
componentId: "sc-6gbjha-0"
|
|
181
|
-
})([ "", " ", "" ],
|
|
176
|
+
})([ "", " ", "" ], j.mixins.reset("block"), (0, j.pick)({
|
|
182
177
|
prisma: (0, R.css)([ "font-size:14px;line-height:20px;" ])
|
|
183
178
|
}));
|
|
184
179
|
// CONCATENATED MODULE: ./src/Message/MessageStyles.ts
|
|
185
180
|
var G = T().div.withConfig({
|
|
186
181
|
displayName: "MessageStyles__StyledContent",
|
|
187
182
|
componentId: "eg66af-0"
|
|
188
|
-
})([ "
|
|
189
|
-
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),
|
|
190
185
|
enterprise: (0, R.css)([ "padding:12px 0;" ])
|
|
191
|
-
}), (0,
|
|
192
|
-
prisma: (0, R.css)([ "padding-left:", ";" ],
|
|
186
|
+
}), (0, j.pick)({
|
|
187
|
+
prisma: (0, R.css)([ "padding-left:", ";" ], j.variables.spacingXSmall),
|
|
193
188
|
enterprise: (0, R.css)([ "padding-left:15px;" ])
|
|
194
189
|
}), (function(e) {
|
|
195
190
|
var r = e.$fillStyle;
|
|
196
|
-
return r && (0,
|
|
197
|
-
prisma: (0, R.css)([ "padding-left:", ";" ],
|
|
191
|
+
return r && (0, j.pick)({
|
|
192
|
+
prisma: (0, R.css)([ "padding-left:", ";" ], j.variables.spacingMedium)
|
|
198
193
|
});
|
|
199
194
|
}));
|
|
200
|
-
var J = T()
|
|
201
|
-
displayName: "
|
|
195
|
+
var J = T().div.withConfig({
|
|
196
|
+
displayName: "MessageStyles__StyledWrapper",
|
|
202
197
|
componentId: "eg66af-1"
|
|
203
|
-
})([ "
|
|
204
|
-
|
|
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)({
|
|
205
204
|
prisma: "50%",
|
|
206
|
-
enterprise:
|
|
207
|
-
}), (0,
|
|
208
|
-
prisma:
|
|
205
|
+
enterprise: j.variables.borderRadius
|
|
206
|
+
}), (0, j.pick)({
|
|
207
|
+
prisma: j.variables.contentColorMuted,
|
|
209
208
|
enterprise: {
|
|
210
|
-
dark:
|
|
211
|
-
light:
|
|
209
|
+
dark: j.variables.gray96,
|
|
210
|
+
light: j.variables.gray45
|
|
212
211
|
}
|
|
213
212
|
}), (function(e) {
|
|
214
213
|
var r = e.$appearance;
|
|
215
|
-
return r === "banner" && (0,
|
|
216
|
-
prisma: (0, R.css)([ "color:", ";" ],
|
|
214
|
+
return r === "banner" && (0, j.pick)({
|
|
215
|
+
prisma: (0, R.css)([ "color:", ";" ], j.variables.contentColorInverted)
|
|
217
216
|
});
|
|
218
|
-
}), (0,
|
|
217
|
+
}), (0, j.pick)({
|
|
219
218
|
prisma: (0, R.css)([ "top:3px;right:2px;" ]),
|
|
220
219
|
enterprise: (0, R.css)([ "top:8px;right:8px;" ])
|
|
221
|
-
}), (0,
|
|
222
|
-
prisma:
|
|
220
|
+
}), (0, j.pick)({
|
|
221
|
+
prisma: j.variables.interactiveColorOverlayHover,
|
|
223
222
|
enterprise: {
|
|
224
|
-
dark:
|
|
225
|
-
light:
|
|
223
|
+
dark: j.variables.gray30,
|
|
224
|
+
light: j.variables.gray92
|
|
226
225
|
}
|
|
227
|
-
}), (0,
|
|
226
|
+
}), (0, j.pick)({
|
|
228
227
|
enterprise: {
|
|
229
|
-
dark:
|
|
230
|
-
light:
|
|
228
|
+
dark: j.variables.gray96,
|
|
229
|
+
light: j.variables.linkColor
|
|
231
230
|
},
|
|
232
|
-
prisma:
|
|
233
|
-
}), (0,
|
|
234
|
-
prisma: (0, R.css)([ "background:", ";" ],
|
|
235
|
-
enterprise: (0, R.css)([ "box-shadow:", ";" ],
|
|
236
|
-
}), (0,
|
|
237
|
-
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)
|
|
238
237
|
}));
|
|
239
|
-
var
|
|
238
|
+
var Q = T().span.withConfig({
|
|
240
239
|
displayName: "MessageStyles__StyledIconWrapper",
|
|
241
|
-
componentId: "eg66af-
|
|
240
|
+
componentId: "eg66af-3"
|
|
242
241
|
})([ "position:relative;min-width:", ";text-align:center;color:", ";", " ", "" ], (0,
|
|
243
|
-
|
|
244
|
-
prisma:
|
|
242
|
+
j.pick)({
|
|
243
|
+
prisma: j.variables.spacingXLarge,
|
|
245
244
|
enterprise: "25px"
|
|
246
|
-
}),
|
|
245
|
+
}), j.variables.white, (0, j.pick)({
|
|
247
246
|
enterprise: (0, R.css)([ "top:-2px;" ]),
|
|
248
247
|
prisma: (0, R.css)([ "top:-1.8px;" ])
|
|
249
|
-
}), (0,
|
|
250
|
-
info: (0, R.css)([ "color:", ";" ], (0,
|
|
251
|
-
prisma:
|
|
252
|
-
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
|
|
253
252
|
})),
|
|
254
|
-
success: (0, R.css)([ "color:", ";" ],
|
|
255
|
-
warning: (0, R.css)([ "color:", ";" ],
|
|
256
|
-
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)
|
|
257
256
|
}));
|
|
258
|
-
var
|
|
257
|
+
var U = T()(B()).withConfig({
|
|
259
258
|
displayName: "MessageStyles__StyledBox",
|
|
260
|
-
componentId: "eg66af-
|
|
261
|
-
})([ "", ";align-items:baseline;position:relative;border-radius:", ";margin-bottom:", ";", " word-wrap:break-word;", " ", "" ],
|
|
262
|
-
|
|
263
|
-
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,
|
|
264
263
|
enterprise: "5px"
|
|
265
|
-
}),
|
|
264
|
+
}), j.variables.spacingSmall, (0, j.pickVariant)("$hasRemoveIcon", {
|
|
266
265
|
true: {
|
|
267
|
-
prisma: (0, R.css)([ "padding-right:", ";" ],
|
|
268
|
-
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)
|
|
269
268
|
},
|
|
270
|
-
false: (0, R.css)([ "padding-right:", ";" ],
|
|
269
|
+
false: (0, R.css)([ "padding-right:", ";" ], j.variables.spacingSmall)
|
|
271
270
|
}), (function(e) {
|
|
272
271
|
var r = e.$fillStyle;
|
|
273
|
-
return r && (0,
|
|
274
|
-
enterprise: (0, R.css)([ "& > ", "{left:", ";}", "" ],
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
dark: (0, R.css)([ "background-color:", ";" ], I.mixins.colorWithAlpha(I.variables.infoColor, .5))
|
|
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))
|
|
280
278
|
})),
|
|
281
|
-
success: (0, R.css)([ "", "" ], (0,
|
|
282
|
-
light: (0, R.css)([ "background-color:", ";border:1px solid ", ";" ],
|
|
283
|
-
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))
|
|
284
282
|
})),
|
|
285
|
-
warning: (0, R.css)([ "", "" ], (0,
|
|
286
|
-
light: (0, R.css)([ "background-color:", ";border:1px solid ", ";" ],
|
|
287
|
-
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))
|
|
288
286
|
})),
|
|
289
|
-
error: (0, R.css)([ "", "" ], (0,
|
|
290
|
-
light: (0, R.css)([ "background-color:", ";border:1px solid ", ";" ],
|
|
291
|
-
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))
|
|
292
290
|
}))
|
|
293
291
|
})),
|
|
294
292
|
prisma: (0, R.css)([ "", ";box-shadow:", ";& > ", "{color:", ";}" ], (function(e) {
|
|
295
293
|
var r = e.$type;
|
|
296
294
|
var a = {
|
|
297
|
-
info:
|
|
298
|
-
success:
|
|
299
|
-
warning:
|
|
300
|
-
error:
|
|
295
|
+
info: j.variables.contentColorActive,
|
|
296
|
+
success: j.variables.accentColorPositive,
|
|
297
|
+
warning: j.variables.accentColorWarning,
|
|
298
|
+
error: j.variables.accentColorNegative
|
|
301
299
|
};
|
|
302
300
|
var n = a[r];
|
|
303
|
-
return (0, R.css)([ "background:linear-gradient( to right,", " 0,", " ", ",", " ", ",", " 100% );" ], n, n,
|
|
304
|
-
}),
|
|
305
|
-
/* sc-sel */
|
|
306
|
-
K, I.variables.backgroundColorPopup)
|
|
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)
|
|
307
303
|
});
|
|
308
|
-
}), (0,
|
|
309
|
-
prisma: (0, R.css)([ "& ", "{color:", ";}" ],
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
error: I.variables.accentColorNegative,
|
|
315
|
-
success: I.variables.accentColorPositive
|
|
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
|
|
316
310
|
}))
|
|
317
311
|
}));
|
|
318
312
|
// CONCATENATED MODULE: ./src/Message/Title.tsx
|
|
319
|
-
function
|
|
320
|
-
if (
|
|
321
|
-
var a =
|
|
322
|
-
var n, i;
|
|
313
|
+
function Y(e, r) {
|
|
314
|
+
if (null == e) return {};
|
|
315
|
+
var a, n, i = Z(e, r);
|
|
323
316
|
if (Object.getOwnPropertySymbols) {
|
|
324
|
-
var
|
|
325
|
-
for (
|
|
326
|
-
|
|
327
|
-
if (r.indexOf(n) >= 0) continue;
|
|
328
|
-
if (!Object.prototype.propertyIsEnumerable.call(e, n)) continue;
|
|
329
|
-
a[n] = e[n];
|
|
317
|
+
var s = Object.getOwnPropertySymbols(e);
|
|
318
|
+
for (n = 0; n < s.length; n++) {
|
|
319
|
+
a = s[n], r.includes(a) || {}.propertyIsEnumerable.call(e, a) && (i[a] = e[a]);
|
|
330
320
|
}
|
|
331
321
|
}
|
|
332
|
-
return
|
|
322
|
+
return i;
|
|
333
323
|
}
|
|
334
|
-
function
|
|
335
|
-
if (
|
|
324
|
+
function Z(e, r) {
|
|
325
|
+
if (null == e) return {};
|
|
336
326
|
var a = {};
|
|
337
|
-
var n
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
a[i] = e[i];
|
|
327
|
+
for (var n in e) {
|
|
328
|
+
if ({}.hasOwnProperty.call(e, n)) {
|
|
329
|
+
if (r.includes(n)) continue;
|
|
330
|
+
a[n] = e[n];
|
|
331
|
+
}
|
|
343
332
|
}
|
|
344
333
|
return a;
|
|
345
334
|
}
|
|
346
|
-
var
|
|
347
|
-
children:
|
|
335
|
+
var ee = {
|
|
336
|
+
children: s().node
|
|
348
337
|
};
|
|
349
338
|
/**
|
|
350
339
|
* A title component for use in `Message`.
|
|
351
|
-
*/ function
|
|
352
|
-
var r = e.children, a =
|
|
340
|
+
*/ function re(e) {
|
|
341
|
+
var r = e.children, a = Y(e, [ "children" ]);
|
|
353
342
|
// @docs-props-type TitleProps
|
|
354
343
|
|
|
355
344
|
return n().createElement(F, a, r);
|
|
356
345
|
}
|
|
357
|
-
|
|
358
|
-
/* harmony default export */ const
|
|
346
|
+
re.propTypes = ee;
|
|
347
|
+
/* harmony default export */ const ae = re;
|
|
359
348
|
// CONCATENATED MODULE: ./src/Message/Message.tsx
|
|
360
|
-
function
|
|
361
|
-
|
|
349
|
+
function ne() {
|
|
350
|
+
return ne = Object.assign ? Object.assign.bind() : function(e) {
|
|
362
351
|
for (var r = 1; r < arguments.length; r++) {
|
|
363
352
|
var a = arguments[r];
|
|
364
353
|
for (var n in a) {
|
|
365
|
-
|
|
366
|
-
e[n] = a[n];
|
|
367
|
-
}
|
|
354
|
+
({}).hasOwnProperty.call(a, n) && (e[n] = a[n]);
|
|
368
355
|
}
|
|
369
356
|
}
|
|
370
357
|
return e;
|
|
371
|
-
};
|
|
372
|
-
return ae.apply(this, arguments);
|
|
358
|
+
}, ne.apply(null, arguments);
|
|
373
359
|
}
|
|
374
|
-
function
|
|
375
|
-
if (
|
|
376
|
-
var a =
|
|
377
|
-
var n, i;
|
|
360
|
+
function ie(e, r) {
|
|
361
|
+
if (null == e) return {};
|
|
362
|
+
var a, n, i = se(e, r);
|
|
378
363
|
if (Object.getOwnPropertySymbols) {
|
|
379
|
-
var
|
|
380
|
-
for (
|
|
381
|
-
|
|
382
|
-
if (r.indexOf(n) >= 0) continue;
|
|
383
|
-
if (!Object.prototype.propertyIsEnumerable.call(e, n)) continue;
|
|
384
|
-
a[n] = e[n];
|
|
364
|
+
var s = Object.getOwnPropertySymbols(e);
|
|
365
|
+
for (n = 0; n < s.length; n++) {
|
|
366
|
+
a = s[n], r.includes(a) || {}.propertyIsEnumerable.call(e, a) && (i[a] = e[a]);
|
|
385
367
|
}
|
|
386
368
|
}
|
|
387
|
-
return
|
|
369
|
+
return i;
|
|
388
370
|
}
|
|
389
|
-
function
|
|
390
|
-
if (
|
|
371
|
+
function se(e, r) {
|
|
372
|
+
if (null == e) return {};
|
|
391
373
|
var a = {};
|
|
392
|
-
var n
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
a[i] = e[i];
|
|
374
|
+
for (var n in e) {
|
|
375
|
+
if ({}.hasOwnProperty.call(e, n)) {
|
|
376
|
+
if (r.includes(n)) continue;
|
|
377
|
+
a[n] = e[n];
|
|
378
|
+
}
|
|
398
379
|
}
|
|
399
380
|
return a;
|
|
400
381
|
}
|
|
401
382
|
var oe = {
|
|
402
|
-
appearance:
|
|
403
|
-
children:
|
|
404
|
-
elementRef:
|
|
405
|
-
onRequestRemove:
|
|
406
|
-
type:
|
|
383
|
+
appearance: s().oneOf([ "default", "fill", "banner" ]),
|
|
384
|
+
children: s().node,
|
|
385
|
+
elementRef: s().oneOfType([ s().func, s().object ]),
|
|
386
|
+
onRequestRemove: s().func,
|
|
387
|
+
type: s().oneOf([ "info", "success", "warning", "error" ])
|
|
407
388
|
};
|
|
408
389
|
var te = Object.freeze({
|
|
409
|
-
info: (0,
|
|
410
|
-
warning: (0,
|
|
411
|
-
error: (0,
|
|
412
|
-
success: (0,
|
|
390
|
+
info: (0, I._)("Info"),
|
|
391
|
+
warning: (0, I._)("Warning"),
|
|
392
|
+
error: (0, I._)("Alert"),
|
|
393
|
+
success: (0, I._)("Success")
|
|
413
394
|
});
|
|
414
|
-
var
|
|
395
|
+
var le = Object.freeze({
|
|
415
396
|
info: C(),
|
|
416
|
-
warning:
|
|
397
|
+
warning: O(),
|
|
417
398
|
error: k(),
|
|
418
399
|
success: w()
|
|
419
400
|
});
|
|
@@ -421,40 +402,49 @@
|
|
|
421
402
|
info: f(),
|
|
422
403
|
warning: m(),
|
|
423
404
|
error: d(),
|
|
424
|
-
success:
|
|
405
|
+
success: t()
|
|
425
406
|
});
|
|
426
|
-
function
|
|
427
|
-
var r = e.appearance, i = r === void 0 ? "default" : r,
|
|
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" ]);
|
|
428
409
|
// @docs-props-type MessagePropsBase
|
|
429
|
-
var v = (0,
|
|
410
|
+
var v = (0, j.useSplunkTheme)(), d = v.isEnterprise;
|
|
430
411
|
if (false) {}
|
|
431
|
-
|
|
412
|
+
// double check this can only be button
|
|
432
413
|
var b = (0, a.useCallback)((function(e) {
|
|
433
|
-
|
|
434
|
-
}), [
|
|
414
|
+
l === null || l === void 0 ? void 0 : l(e);
|
|
415
|
+
}), [ l ]);
|
|
435
416
|
if (i === "banner") {
|
|
436
417
|
|
|
437
|
-
return n().createElement(
|
|
438
|
-
type:
|
|
418
|
+
return n().createElement(_(), ne({
|
|
419
|
+
type: t,
|
|
439
420
|
"data-test": "banner",
|
|
440
421
|
onRequestClose: b
|
|
441
|
-
}, p),
|
|
422
|
+
}, p), s);
|
|
442
423
|
}
|
|
443
|
-
var f = d ?
|
|
444
|
-
var g = f[
|
|
424
|
+
var f = d ? le : ce;
|
|
425
|
+
var g = f[t];
|
|
445
426
|
var m = i === "fill";
|
|
446
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
|
+
}));
|
|
447
437
|
|
|
448
|
-
return n().createElement(
|
|
438
|
+
return n().createElement(U, ne({
|
|
449
439
|
$appearance: i,
|
|
450
440
|
$fillStyle: m,
|
|
451
|
-
$hasRemoveIcon: !!
|
|
452
|
-
$type:
|
|
453
|
-
"data-test-type":
|
|
441
|
+
$hasRemoveIcon: !!l,
|
|
442
|
+
$type: t,
|
|
443
|
+
"data-test-type": t,
|
|
454
444
|
"data-test": "message"
|
|
455
|
-
}, p), y && n().createElement(
|
|
445
|
+
}, p), y && n().createElement(Q, {
|
|
456
446
|
$fillStyle: m,
|
|
457
|
-
$type:
|
|
447
|
+
$type: t
|
|
458
448
|
}, d ? n().createElement(g, {
|
|
459
449
|
height: "24px",
|
|
460
450
|
width: "24px",
|
|
@@ -462,10 +452,10 @@
|
|
|
462
452
|
screenReaderText: null
|
|
463
453
|
}) : n().createElement(g, {
|
|
464
454
|
variant: "filled"
|
|
465
|
-
}), n().createElement(
|
|
455
|
+
}), n().createElement(P(), null, te[t])), n().createElement(G, {
|
|
466
456
|
"data-test": "content",
|
|
467
457
|
$fillStyle: m
|
|
468
|
-
},
|
|
458
|
+
}, k, n().createElement(J, null, h)), l && n().createElement(K, {
|
|
469
459
|
"data-test": "remove",
|
|
470
460
|
onClick: b,
|
|
471
461
|
$appearance: i
|
|
@@ -474,15 +464,15 @@
|
|
|
474
464
|
hideDefaultTooltip: true,
|
|
475
465
|
screenReaderText: null,
|
|
476
466
|
width: "12px"
|
|
477
|
-
}) : n().createElement(
|
|
467
|
+
}) : n().createElement(c(), {
|
|
478
468
|
height: "20px",
|
|
479
469
|
width: "20px"
|
|
480
470
|
})));
|
|
481
471
|
}
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
/* harmony default export */ const
|
|
472
|
+
pe.propTypes = oe;
|
|
473
|
+
pe.Title = ae;
|
|
474
|
+
pe.Link = z;
|
|
475
|
+
/* harmony default export */ const ue = pe;
|
|
486
476
|
// CONCATENATED MODULE: ./src/Message/index.ts
|
|
487
477
|
module.exports = r;
|
|
488
478
|
/******/})();
|