@splunk/react-ui 5.0.0-beta.4 → 5.0.0-beta.5
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 +3 -1
- package/CHANGELOG.md +4 -1
- package/CHANGELOG.v5.mdx +35 -0
- package/Card.js +163 -162
- package/Chip.js +171 -225
- package/Clickable.js +79 -76
- package/ComboBox.js +1 -1
- package/Date.js +160 -184
- package/DualListbox.js +439 -504
- package/File.js +449 -324
- package/FormRows.js +143 -142
- package/JSONTree.js +496 -521
- package/Layer.js +162 -97
- package/Link.js +20 -13
- package/MIGRATION.v5.mdx +47 -0
- package/Markdown.js +1 -1
- package/Message.js +119 -141
- package/MessageBar.js +109 -168
- package/Multiselect.js +595 -602
- package/Popover.js +194 -190
- package/Progress.js +68 -54
- package/RadioBar.js +4 -1
- package/RadioList.js +67 -65
- package/Resize.js +377 -265
- package/ResultsMenu.js +573 -661
- package/ScrollContainerContext.js +13 -9
- package/Search.js +1 -1
- package/Select.js +206 -199
- package/Slider.js +455 -329
- package/StepBar.js +2 -2
- package/Switch.js +88 -87
- package/TabBar.js +322 -317
- package/TabLayout.js +34 -34
- package/Table.js +548 -525
- package/Text.js +20 -19
- package/TextArea.js +278 -152
- package/Tooltip.js +173 -177
- package/Tree.js +2 -2
- package/Typography.js +30 -28
- package/WaitSpinner.js +6 -11
- package/cypress/support/commands.ts +14 -4
- package/cypress/support/index.d.ts +1 -1
- package/package.json +5 -5
- package/stubs-splunkui.d.ts +0 -4
- package/types/src/Card/Card.d.ts +3 -1
- package/types/src/Card/Header.d.ts +2 -0
- package/types/src/Card/docs/examples/HeadingTitle.d.ts +3 -0
- package/types/src/Clickable/Clickable.d.ts +11 -3
- package/types/src/Link/Link.d.ts +4 -0
- package/types/src/Message/Message.d.ts +1 -1
- package/types/src/MessageBar/MessageBar.d.ts +1 -1
- package/types/src/Multiselect/Multiselect.d.ts +1 -8
- package/types/src/Multiselect/Normal.d.ts +1 -7
- package/types/src/Multiselect/docs/examples/Children.d.ts +2 -9
- package/types/src/Multiselect/docs/examples/Controlled.d.ts +2 -9
- package/types/src/Multiselect/docs/examples/CustomizeSelected.d.ts +2 -9
- package/types/src/Multiselect/docs/examples/Disabled.d.ts +2 -9
- package/types/src/Multiselect/docs/examples/Error.d.ts +2 -9
- package/types/src/Multiselect/docs/examples/Fetching.d.ts +2 -22
- package/types/src/Multiselect/docs/examples/Headings.d.ts +2 -1
- package/types/src/Multiselect/docs/examples/LoadMoreOnScrollBottom.d.ts +2 -25
- package/types/src/Multiselect/docs/examples/NewValues.d.ts +2 -9
- package/types/src/Multiselect/docs/examples/TabInput.d.ts +2 -9
- package/types/src/ResultsMenu/ResultsMenu.d.ts +23 -34
- package/types/src/Select/SelectBase.d.ts +2 -2
- package/types/src/TabBar/TabBar.d.ts +8 -5
- package/types/src/TabBar/TabBarContext.d.ts +1 -1
- package/types/src/TabLayout/TabLayout.d.ts +8 -5
- package/types/src/Typography/Typography.d.ts +27 -22
- package/types/src/Date/Icon.d.ts +0 -3
- package/types/src/TabBar/docs/examples/IconsAbove.d.ts +0 -3
- package/types/src/TabBar/docs/examples/VerticalIconsAbove.d.ts +0 -3
- /package/types/src/TabBar/docs/examples/{IconsLeft.d.ts → Icons.d.ts} +0 -0
- /package/types/src/TabBar/docs/examples/{VerticalIconsLeft.d.ts → VerticalIcons.d.ts} +0 -0
package/MessageBar.js
CHANGED
|
@@ -9,26 +9,26 @@
|
|
|
9
9
|
/******/ (() => {
|
|
10
10
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
11
11
|
/******/ e.n = r => {
|
|
12
|
-
/******/ var
|
|
12
|
+
/******/ var n = r && r.__esModule ?
|
|
13
13
|
/******/ () => r["default"]
|
|
14
14
|
/******/ : () => r
|
|
15
15
|
/******/;
|
|
16
|
-
e.d(
|
|
17
|
-
a
|
|
16
|
+
e.d(n, {
|
|
17
|
+
a: n
|
|
18
18
|
});
|
|
19
|
-
/******/ return
|
|
19
|
+
/******/ return n;
|
|
20
20
|
/******/ };
|
|
21
21
|
/******/ })();
|
|
22
22
|
/******/
|
|
23
23
|
/******/ /* webpack/runtime/define property getters */
|
|
24
24
|
/******/ (() => {
|
|
25
25
|
/******/ // define getter functions for harmony exports
|
|
26
|
-
/******/ e.d = (r,
|
|
27
|
-
/******/ for (var
|
|
28
|
-
/******/ if (e.o(
|
|
29
|
-
/******/ Object.defineProperty(r,
|
|
26
|
+
/******/ e.d = (r, n) => {
|
|
27
|
+
/******/ for (var t in n) {
|
|
28
|
+
/******/ if (e.o(n, t) && !e.o(r, t)) {
|
|
29
|
+
/******/ Object.defineProperty(r, t, {
|
|
30
30
|
enumerable: true,
|
|
31
|
-
get:
|
|
31
|
+
get: n[t]
|
|
32
32
|
});
|
|
33
33
|
/******/ }
|
|
34
34
|
/******/ }
|
|
@@ -61,214 +61,155 @@
|
|
|
61
61
|
e.r(r);
|
|
62
62
|
// EXPORTS
|
|
63
63
|
e.d(r, {
|
|
64
|
-
default: () => /* reexport */
|
|
64
|
+
default: () => /* reexport */ B
|
|
65
65
|
});
|
|
66
66
|
// CONCATENATED MODULE: external "react"
|
|
67
|
-
const
|
|
68
|
-
var
|
|
67
|
+
const n = require("react");
|
|
68
|
+
var t = e.n(n);
|
|
69
69
|
// CONCATENATED MODULE: external "prop-types"
|
|
70
|
-
const
|
|
71
|
-
var
|
|
70
|
+
const a = require("prop-types");
|
|
71
|
+
var i = e.n(a);
|
|
72
72
|
// CONCATENATED MODULE: external "@splunk/react-icons/CheckCircle"
|
|
73
|
-
const
|
|
74
|
-
var
|
|
73
|
+
const o = require("@splunk/react-icons/CheckCircle");
|
|
74
|
+
var s = e.n(o);
|
|
75
75
|
// CONCATENATED MODULE: external "@splunk/react-icons/Cross"
|
|
76
76
|
const l = require("@splunk/react-icons/Cross");
|
|
77
77
|
var c = e.n(l);
|
|
78
|
-
// CONCATENATED MODULE: external "@splunk/react-icons/ExclamationCircle"
|
|
79
|
-
const p = require("@splunk/react-icons/ExclamationCircle");
|
|
80
|
-
var d = e.n(p);
|
|
81
|
-
// CONCATENATED MODULE: external "@splunk/react-icons/InformationCircle"
|
|
82
|
-
const u = require("@splunk/react-icons/InformationCircle");
|
|
83
|
-
var b = e.n(u);
|
|
84
78
|
// CONCATENATED MODULE: external "@splunk/react-icons/ExclamationTriangle"
|
|
85
|
-
const
|
|
79
|
+
const u = require("@splunk/react-icons/ExclamationTriangle");
|
|
80
|
+
var p = e.n(u);
|
|
81
|
+
// CONCATENATED MODULE: external "@splunk/react-icons/InformationCircle"
|
|
82
|
+
const d = require("@splunk/react-icons/InformationCircle");
|
|
83
|
+
var f = e.n(d);
|
|
84
|
+
// CONCATENATED MODULE: external "@splunk/react-icons/InformationDiamond"
|
|
85
|
+
const v = require("@splunk/react-icons/InformationDiamond");
|
|
86
86
|
var g = e.n(v);
|
|
87
87
|
// CONCATENATED MODULE: external "@splunk/react-ui/ScreenReaderContent"
|
|
88
|
-
const
|
|
89
|
-
var
|
|
88
|
+
const m = require("@splunk/react-ui/ScreenReaderContent");
|
|
89
|
+
var y = e.n(m);
|
|
90
90
|
// CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
|
|
91
|
-
const
|
|
91
|
+
const b = require("@splunk/ui-utils/i18n");
|
|
92
92
|
// CONCATENATED MODULE: external "styled-components"
|
|
93
|
-
const
|
|
94
|
-
var
|
|
95
|
-
// CONCATENATED MODULE: external "@splunk/react-ui/
|
|
96
|
-
const
|
|
97
|
-
var
|
|
93
|
+
const C = require("styled-components");
|
|
94
|
+
var h = e.n(C);
|
|
95
|
+
// CONCATENATED MODULE: external "@splunk/react-ui/Button"
|
|
96
|
+
const w = require("@splunk/react-ui/Button");
|
|
97
|
+
var S = e.n(w);
|
|
98
98
|
// CONCATENATED MODULE: external "@splunk/themes"
|
|
99
|
-
const
|
|
99
|
+
const k = require("@splunk/themes");
|
|
100
100
|
// CONCATENATED MODULE: ./src/MessageBar/MessageBarStyles.ts
|
|
101
|
-
var
|
|
101
|
+
var q = h().div.withConfig({
|
|
102
102
|
displayName: "MessageBarStyles__MessageBarContent",
|
|
103
103
|
componentId: "sc-1uyhzza-0"
|
|
104
|
-
})([ "", ";
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
dark: (0, y.css)([ "box-shadow:0 0 0 2px ", ";" ], C.variables.gray80),
|
|
108
|
-
light: (0, y.css)([ "box-shadow:0 0 0 2px ", ";" ], C.variables.gray25)
|
|
109
|
-
},
|
|
110
|
-
prisma: {
|
|
111
|
-
light: (0, C.pickVariant)("$type", {
|
|
112
|
-
info: (0, y.css)([ "box-shadow:0 0 0 3px ", ";" ], C.variables.black),
|
|
113
|
-
warning: (0, y.css)([ "box-shadow:0 0 0 3px ", ";" ], C.variables.black),
|
|
114
|
-
error: (0, y.css)([ "box-shadow:0 0 0 3px ", ";" ], C.variables.white),
|
|
115
|
-
success: (0, y.css)([ "box-shadow:0 0 0 3px ", ";" ], C.variables.white)
|
|
116
|
-
}),
|
|
117
|
-
dark: (0, y.css)([ "box-shadow:0 0 0 3px ", ";" ], C.variables.black)
|
|
118
|
-
}
|
|
119
|
-
}));
|
|
120
|
-
var q = k()(w()).withConfig({
|
|
121
|
-
displayName: "MessageBarStyles__MessageBarCloseWrapper",
|
|
104
|
+
})([ "", ";", ";grid-column:content;grid-row:1 / -1;max-width:", ";word-wrap:break-word;" ], k.mixins.reset("inline"), k.mixins.typography("body"), k.variables.lineLength);
|
|
105
|
+
var _ = h()(S()).withConfig({
|
|
106
|
+
displayName: "MessageBarStyles__StyledCloseButton",
|
|
122
107
|
componentId: "sc-1uyhzza-1"
|
|
123
|
-
})([ "
|
|
124
|
-
|
|
125
|
-
enterprise: C.variables.spacingXSmall,
|
|
126
|
-
prisma: "3px"
|
|
127
|
-
}), (0, C.pick)({
|
|
128
|
-
enterprise: (0, y.css)([ "margin-top:1px;" ])
|
|
129
|
-
}), (0, C.pick)({
|
|
130
|
-
prisma: C.variables.interactiveColorOverlayHover,
|
|
131
|
-
enterprise: {
|
|
132
|
-
dark: C.variables.gray30,
|
|
133
|
-
light: C.variables.gray92
|
|
134
|
-
}
|
|
135
|
-
}), (0, C.pick)({
|
|
136
|
-
prisma: "inherit",
|
|
137
|
-
enterprise: C.variables.gray80
|
|
138
|
-
}), (0, C.pick)({
|
|
139
|
-
enterprise: {
|
|
140
|
-
dark: C.variables.gray96,
|
|
141
|
-
light: C.variables.contentColorLink
|
|
142
|
-
}
|
|
143
|
-
}), (0, C.pick)({
|
|
144
|
-
prisma: (0, y.css)([ "background:", ";" ], C.variables.interactiveColorOverlayActive),
|
|
145
|
-
enterprise: (0, y.css)([ "box-shadow:", ";" ], C.variables.focusShadow)
|
|
146
|
-
}), (0, C.pick)({
|
|
147
|
-
prisma: (0, y.css)([ "&:focus{border-radius:", ";", ";}" ], C.variables.borderRadius, (0,
|
|
148
|
-
C.pick)({
|
|
149
|
-
light: (0, C.pickVariant)("$type", {
|
|
150
|
-
info: (0, y.css)([ "box-shadow:0 0 0 3px ", ";" ], C.variables.black),
|
|
151
|
-
warning: (0, y.css)([ "box-shadow:0 0 0 3px ", ";" ], C.variables.black),
|
|
152
|
-
error: (0, y.css)([ "box-shadow:0 0 0 3px ", ";" ], C.variables.white),
|
|
153
|
-
success: (0, y.css)([ "box-shadow:0 0 0 3px ", ";" ], C.variables.white)
|
|
154
|
-
}),
|
|
155
|
-
dark: (0, y.css)([ "box-shadow:0 0 0 3px ", ";" ], C.variables.black)
|
|
156
|
-
}))
|
|
157
|
-
}));
|
|
158
|
-
var S = k().span.withConfig({
|
|
108
|
+
})([ "grid-column:close;" ]);
|
|
109
|
+
var O = h().span.withConfig({
|
|
159
110
|
displayName: "MessageBarStyles__StyledIcon",
|
|
160
111
|
componentId: "sc-1uyhzza-2"
|
|
161
|
-
})([ "width:20px;height:20px;margin-left:auto;fill:", ";" ], (0,
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
112
|
+
})([ "width:20px;height:20px;margin-left:auto;fill:", ";grid-row:1;grid-column:icon;" ], (0,
|
|
113
|
+
k.pickVariant)("$type", {
|
|
114
|
+
info: k.variables.notificationColorInfo,
|
|
115
|
+
success: k.variables.notificationColorPositive,
|
|
116
|
+
warning: k.variables.notificationColorCaution,
|
|
117
|
+
error: k.variables.notificationColorNegative
|
|
166
118
|
}));
|
|
167
|
-
var
|
|
119
|
+
var I = h().div.withConfig({
|
|
168
120
|
displayName: "MessageBarStyles__MessageBarWrapper",
|
|
169
121
|
componentId: "sc-1uyhzza-3"
|
|
170
|
-
})([ "", ";
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
warning: C.variables.notificationColorCautionWeak,
|
|
183
|
-
error: C.variables.notificationColorNegativeWeak
|
|
184
|
-
}));
|
|
122
|
+
})([ "", ";grid-template-columns:[icon] 20px ", " [content] fit-content(", ") minmax(", ",1fr) [close] min-content;grid-template-rows:1lh auto;align-items:center;border:1px solid ", ";border-radius:", ";background-color:", ";padding:", " ", ";width:100%;" ], k.mixins.reset("grid"), k.variables.spacingSmall, k.variables.lineLength, k.variables.spacingSmall, (0,
|
|
123
|
+
k.pickVariant)("$type", {
|
|
124
|
+
info: k.variables.notificationColorInfoStrong,
|
|
125
|
+
success: k.variables.notificationColorPositiveStrong,
|
|
126
|
+
warning: k.variables.notificationColorCautionStrong,
|
|
127
|
+
error: k.variables.notificationColorNegativeStrong
|
|
128
|
+
}), k.variables.borderRadius, (0, k.pickVariant)("$type", {
|
|
129
|
+
info: k.variables.notificationColorInfoWeak,
|
|
130
|
+
success: k.variables.notificationColorPositiveWeak,
|
|
131
|
+
warning: k.variables.notificationColorCautionWeak,
|
|
132
|
+
error: k.variables.notificationColorNegativeWeak
|
|
133
|
+
}), k.variables.spacingSmall, k.variables.spacingMedium);
|
|
185
134
|
// CONCATENATED MODULE: ./src/MessageBar/MessageBar.tsx
|
|
186
|
-
function
|
|
187
|
-
return
|
|
135
|
+
function x() {
|
|
136
|
+
return x = Object.assign ? Object.assign.bind() : function(e) {
|
|
188
137
|
for (var r = 1; r < arguments.length; r++) {
|
|
189
|
-
var
|
|
190
|
-
for (var
|
|
191
|
-
({}).hasOwnProperty.call(
|
|
138
|
+
var n = arguments[r];
|
|
139
|
+
for (var t in n) {
|
|
140
|
+
({}).hasOwnProperty.call(n, t) && (e[t] = n[t]);
|
|
192
141
|
}
|
|
193
142
|
}
|
|
194
143
|
return e;
|
|
195
|
-
},
|
|
144
|
+
}, x.apply(null, arguments);
|
|
196
145
|
}
|
|
197
|
-
function
|
|
146
|
+
function P(e, r) {
|
|
198
147
|
if (null == e) return {};
|
|
199
|
-
var
|
|
148
|
+
var n, t, a = j(e, r);
|
|
200
149
|
if (Object.getOwnPropertySymbols) {
|
|
201
|
-
var
|
|
202
|
-
for (
|
|
203
|
-
|
|
150
|
+
var i = Object.getOwnPropertySymbols(e);
|
|
151
|
+
for (t = 0; t < i.length; t++) {
|
|
152
|
+
n = i[t], r.includes(n) || {}.propertyIsEnumerable.call(e, n) && (a[n] = e[n]);
|
|
204
153
|
}
|
|
205
154
|
}
|
|
206
|
-
return
|
|
155
|
+
return a;
|
|
207
156
|
}
|
|
208
|
-
function
|
|
157
|
+
function j(e, r) {
|
|
209
158
|
if (null == e) return {};
|
|
210
|
-
var
|
|
211
|
-
for (var
|
|
212
|
-
if ({}.hasOwnProperty.call(e,
|
|
213
|
-
if (r.includes(
|
|
214
|
-
|
|
159
|
+
var n = {};
|
|
160
|
+
for (var t in e) {
|
|
161
|
+
if ({}.hasOwnProperty.call(e, t)) {
|
|
162
|
+
if (r.includes(t)) continue;
|
|
163
|
+
n[t] = e[t];
|
|
215
164
|
}
|
|
216
165
|
}
|
|
217
|
-
return
|
|
166
|
+
return n;
|
|
218
167
|
}
|
|
219
|
-
var
|
|
220
|
-
children:
|
|
221
|
-
onRequestClose:
|
|
222
|
-
type:
|
|
168
|
+
var z = {
|
|
169
|
+
children: i().node.isRequired,
|
|
170
|
+
onRequestClose: i().func,
|
|
171
|
+
type: i().oneOf([ "info", "success", "warning", "error" ]).isRequired
|
|
223
172
|
};
|
|
224
|
-
var
|
|
225
|
-
info: (0,
|
|
226
|
-
warning: (0,
|
|
227
|
-
error: (0,
|
|
228
|
-
success: (0,
|
|
173
|
+
var M = Object.freeze({
|
|
174
|
+
info: (0, b._)("Info"),
|
|
175
|
+
warning: (0, b._)("Warning"),
|
|
176
|
+
error: (0, b._)("Alert"),
|
|
177
|
+
success: (0, b._)("Success")
|
|
229
178
|
});
|
|
230
|
-
var
|
|
231
|
-
info:
|
|
179
|
+
var E = Object.freeze({
|
|
180
|
+
info: f(),
|
|
232
181
|
warning: g(),
|
|
233
|
-
error:
|
|
234
|
-
success:
|
|
182
|
+
error: p(),
|
|
183
|
+
success: s()
|
|
235
184
|
});
|
|
236
|
-
function
|
|
237
|
-
var r = e.children,
|
|
185
|
+
function R(e) {
|
|
186
|
+
var r = e.children, n = e.elementRef, a = e.onRequestClose, i = e.type, o = P(e, [ "children", "elementRef", "onRequestClose", "type" ]);
|
|
238
187
|
// @docs-props-type MessageBarPropsBase
|
|
239
|
-
var
|
|
240
|
-
var l =
|
|
188
|
+
var s = E[i];
|
|
189
|
+
var l = M[i];
|
|
241
190
|
|
|
242
|
-
return
|
|
243
|
-
ref:
|
|
244
|
-
$type:
|
|
191
|
+
return t().createElement(I, x({
|
|
192
|
+
ref: n,
|
|
193
|
+
$type: i,
|
|
245
194
|
"data-test": "message-bar",
|
|
246
|
-
"data-test-type":
|
|
247
|
-
},
|
|
248
|
-
role: "region"
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
$type: n,
|
|
195
|
+
"data-test-type": i
|
|
196
|
+
}, o, {
|
|
197
|
+
role: "region"
|
|
198
|
+
}), t().createElement(O, {
|
|
199
|
+
as: s,
|
|
200
|
+
$type: i,
|
|
253
201
|
variant: "filled",
|
|
254
202
|
"aria-hidden": true,
|
|
255
203
|
"data-test": "icon"
|
|
256
|
-
}),
|
|
257
|
-
$type: n,
|
|
204
|
+
}), t().createElement(y(), null, l), t().createElement(q, {
|
|
258
205
|
"data-test": "content"
|
|
259
|
-
}, r),
|
|
260
|
-
|
|
261
|
-
onClick:
|
|
262
|
-
},
|
|
263
|
-
height: "19px",
|
|
264
|
-
style: {
|
|
265
|
-
margin: -.5
|
|
266
|
-
},
|
|
267
|
-
width: "19px"
|
|
268
|
-
}), i().createElement(h(), null, (0, x._)("Close"))));
|
|
206
|
+
}, r), a && t().createElement(_, {
|
|
207
|
+
appearance: "subtle",
|
|
208
|
+
onClick: a
|
|
209
|
+
}, t().createElement(c(), null), t().createElement(y(), null, (0, b._)("Close"))));
|
|
269
210
|
}
|
|
270
|
-
|
|
271
|
-
/* harmony default export */ const
|
|
211
|
+
R.propTypes = z;
|
|
212
|
+
/* harmony default export */ const B = R;
|
|
272
213
|
// CONCATENATED MODULE: ./src/MessageBar/index.ts
|
|
273
214
|
module.exports = r;
|
|
274
215
|
/******/})();
|