@splunk/react-ui 4.23.0 → 4.25.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/Breadcrumbs.js +99 -124
- package/Button.js +8 -7
- package/ButtonSimple.js +40 -39
- package/CHANGELOG.md +22 -0
- package/Code.js +193 -100
- package/Color.js +18 -15
- package/ComboBox.js +49 -37
- package/JSONTree.js +210 -177
- package/Menu.js +643 -472
- package/Modal.js +265 -226
- package/Multiselect.js +634 -620
- package/RadioList.js +12 -11
- package/ResultsMenu.js +863 -148
- package/Search.js +3 -1
- package/Select.js +427 -416
- package/TabBar.js +2 -2
- package/Table.js +2 -2
- package/Tree.js +617 -0
- package/cypress/README.md +11 -0
- package/cypress/support/commands.ts +1 -0
- package/cypress/support/component.ts +0 -1
- package/cypress/tsconfig.cypress.json +14 -0
- package/package.json +12 -12
- package/types/src/Breadcrumbs/Breadcrumbs.d.ts +7 -1
- package/types/src/Breadcrumbs/Item.d.ts +8 -2
- package/types/src/Button/Button.d.ts +4 -2
- package/types/src/Button/docs/examples/Block.d.ts +2 -2
- package/types/src/Button/docs/examples/Dimmed.d.ts +2 -0
- package/types/src/Button/docs/examples/Disabled.d.ts +2 -2
- package/types/src/Button/docs/examples/Icons.d.ts +2 -2
- package/types/src/Button/docs/examples/Menus.d.ts +2 -2
- package/types/src/Button/docs/examples/To.d.ts +2 -2
- package/types/src/Button/docs/examples/Truncated.d.ts +2 -2
- package/types/src/Button/docs/examples/prisma/Basic.d.ts +2 -2
- package/types/src/Button/docs/examples/prisma/Block.d.ts +2 -2
- package/types/src/Button/docs/examples/prisma/Dimmed.d.ts +2 -0
- package/types/src/Button/docs/examples/prisma/Disabled.d.ts +2 -2
- package/types/src/Button/docs/examples/prisma/Menus.d.ts +2 -2
- package/types/src/Button/docs/examples/prisma/To.d.ts +2 -2
- package/types/src/Button/docs/examples/prisma/Truncated.d.ts +2 -2
- package/types/src/ButtonSimple/ButtonSimple.d.ts +4 -2
- package/types/src/Color/Color.d.ts +5 -3
- package/types/src/ComboBox/ComboBox.d.ts +6 -0
- package/types/src/JSONTree/JSONTree.d.ts +3 -2
- package/types/src/Menu/Menu.d.ts +14 -1
- package/types/src/Modal/Header.d.ts +0 -2
- package/types/src/Modal/Modal.d.ts +7 -0
- package/types/src/Modal/ModalContext.d.ts +1 -0
- package/types/src/Multiselect/Compact.d.ts +6 -0
- package/types/src/Multiselect/Multiselect.d.ts +7 -0
- package/types/src/RadioList/RadioList.d.ts +27 -27
- package/types/src/RadioList/RadioListContext.d.ts +5 -4
- package/types/src/ResultsMenu/ResultsMenu.d.ts +53 -1
- package/types/src/ResultsMenu/VirtualizedResultsMenu/VirtualizedItem.d.ts +9 -0
- package/types/src/ResultsMenu/VirtualizedResultsMenu/VirtualizedResultsMenu.d.ts +33 -0
- package/types/src/ResultsMenu/VirtualizedResultsMenu/groupChildren.d.ts +16 -0
- package/types/src/ResultsMenu/VirtualizedResultsMenu/index.d.ts +3 -0
- package/types/src/ResultsMenu/VirtualizedResultsMenu/injectVirtualizedItem.d.ts +21 -0
- package/types/src/ResultsMenu/index.d.ts +2 -1
- package/types/src/Select/Select.d.ts +2 -0
- package/types/src/Select/SelectBase.d.ts +6 -0
- package/types/src/Tree/Tree.d.ts +24 -0
- package/types/src/Tree/TreeContext.d.ts +13 -0
- package/types/src/Tree/TreeItem.d.ts +31 -0
- package/types/src/Tree/index.d.ts +3 -0
- package/types/src/Tree/treeUtils.d.ts +29 -0
- package/types/unit-test-setup-testing-library.d.ts +1 -0
- package/types/src/Modal/docs/examples/prisma/TypicalUsage.d.ts +0 -2
package/Breadcrumbs.js
CHANGED
|
@@ -61,33 +61,33 @@
|
|
|
61
61
|
e.r(r);
|
|
62
62
|
// EXPORTS
|
|
63
63
|
e.d(r, {
|
|
64
|
-
Item: () => /* reexport */
|
|
65
|
-
default: () => /* reexport */
|
|
64
|
+
Item: () => /* reexport */ h,
|
|
65
|
+
default: () => /* reexport */ q
|
|
66
66
|
});
|
|
67
67
|
// CONCATENATED MODULE: external "react"
|
|
68
68
|
const t = require("react");
|
|
69
69
|
var n = e.n(t);
|
|
70
70
|
// CONCATENATED MODULE: external "prop-types"
|
|
71
|
-
const
|
|
72
|
-
var
|
|
71
|
+
const a = require("prop-types");
|
|
72
|
+
var o = e.n(a);
|
|
73
73
|
// CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
|
|
74
|
-
const
|
|
74
|
+
const l = require("@splunk/ui-utils/i18n");
|
|
75
75
|
// CONCATENATED MODULE: external "styled-components"
|
|
76
|
-
const
|
|
77
|
-
var
|
|
76
|
+
const i = require("styled-components");
|
|
77
|
+
var s = e.n(i);
|
|
78
78
|
// CONCATENATED MODULE: external "@splunk/themes"
|
|
79
|
-
const
|
|
79
|
+
const u = require("@splunk/themes");
|
|
80
80
|
// CONCATENATED MODULE: external "@splunk/react-ui/Link"
|
|
81
|
-
const
|
|
82
|
-
var f = e.n(
|
|
81
|
+
const c = require("@splunk/react-ui/Link");
|
|
82
|
+
var f = e.n(c);
|
|
83
83
|
// CONCATENATED MODULE: ./src/Breadcrumbs/ItemStyles.ts
|
|
84
|
-
var
|
|
84
|
+
var d = s()(f()).withConfig({
|
|
85
85
|
displayName: "ItemStyles__StyledLink",
|
|
86
86
|
componentId: "sc-1ywtawf-0"
|
|
87
|
-
})([ "display:flex;align-items:center;gap:", ";white-space:nowrap;color:", ";&:where(:hover,:focus):not([disabled],[aria-disabled='true']){color:", ";}" ],
|
|
87
|
+
})([ "display:flex;align-items:center;gap:", ";white-space:nowrap;color:", ";&:where(:hover,:focus):not([disabled],[aria-disabled='true']){color:", ";}" ], u.variables.spacingXSmall, u.variables.contentColorDefault, u.variables.contentColorActive);
|
|
88
88
|
// CONCATENATED MODULE: ./src/Breadcrumbs/Item.tsx
|
|
89
|
-
function
|
|
90
|
-
|
|
89
|
+
function p() {
|
|
90
|
+
p = Object.assign || function(e) {
|
|
91
91
|
for (var r = 1; r < arguments.length; r++) {
|
|
92
92
|
var t = arguments[r];
|
|
93
93
|
for (var n in t) {
|
|
@@ -98,57 +98,16 @@
|
|
|
98
98
|
}
|
|
99
99
|
return e;
|
|
100
100
|
};
|
|
101
|
-
return
|
|
101
|
+
return p.apply(this, arguments);
|
|
102
102
|
}
|
|
103
103
|
function b(e, r) {
|
|
104
|
-
var t = Object.keys(e);
|
|
105
|
-
if (Object.getOwnPropertySymbols) {
|
|
106
|
-
var n = Object.getOwnPropertySymbols(e);
|
|
107
|
-
if (r) n = n.filter((function(r) {
|
|
108
|
-
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
109
|
-
}));
|
|
110
|
-
t.push.apply(t, n);
|
|
111
|
-
}
|
|
112
|
-
return t;
|
|
113
|
-
}
|
|
114
|
-
function y(e) {
|
|
115
|
-
for (var r = 1; r < arguments.length; r++) {
|
|
116
|
-
var t = arguments[r] != null ? arguments[r] : {};
|
|
117
|
-
if (r % 2) {
|
|
118
|
-
b(Object(t), true).forEach((function(r) {
|
|
119
|
-
m(e, r, t[r]);
|
|
120
|
-
}));
|
|
121
|
-
} else if (Object.getOwnPropertyDescriptors) {
|
|
122
|
-
Object.defineProperties(e, Object.getOwnPropertyDescriptors(t));
|
|
123
|
-
} else {
|
|
124
|
-
b(Object(t)).forEach((function(r) {
|
|
125
|
-
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
126
|
-
}));
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
return e;
|
|
130
|
-
}
|
|
131
|
-
function m(e, r, t) {
|
|
132
|
-
if (r in e) {
|
|
133
|
-
Object.defineProperty(e, r, {
|
|
134
|
-
value: t,
|
|
135
|
-
enumerable: true,
|
|
136
|
-
configurable: true,
|
|
137
|
-
writable: true
|
|
138
|
-
});
|
|
139
|
-
} else {
|
|
140
|
-
e[r] = t;
|
|
141
|
-
}
|
|
142
|
-
return e;
|
|
143
|
-
}
|
|
144
|
-
function v(e, r) {
|
|
145
104
|
if (e == null) return {};
|
|
146
|
-
var t =
|
|
147
|
-
var n,
|
|
105
|
+
var t = m(e, r);
|
|
106
|
+
var n, a;
|
|
148
107
|
if (Object.getOwnPropertySymbols) {
|
|
149
|
-
var
|
|
150
|
-
for (
|
|
151
|
-
n = a
|
|
108
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
109
|
+
for (a = 0; a < o.length; a++) {
|
|
110
|
+
n = o[a];
|
|
152
111
|
if (r.indexOf(n) >= 0) continue;
|
|
153
112
|
if (!Object.prototype.propertyIsEnumerable.call(e, n)) continue;
|
|
154
113
|
t[n] = e[n];
|
|
@@ -156,62 +115,72 @@
|
|
|
156
115
|
}
|
|
157
116
|
return t;
|
|
158
117
|
}
|
|
159
|
-
function
|
|
118
|
+
function m(e, r) {
|
|
160
119
|
if (e == null) return {};
|
|
161
120
|
var t = {};
|
|
162
121
|
var n = Object.keys(e);
|
|
163
|
-
var
|
|
164
|
-
for (
|
|
165
|
-
|
|
166
|
-
if (r.indexOf(
|
|
167
|
-
t[
|
|
122
|
+
var a, o;
|
|
123
|
+
for (o = 0; o < n.length; o++) {
|
|
124
|
+
a = n[o];
|
|
125
|
+
if (r.indexOf(a) >= 0) continue;
|
|
126
|
+
t[a] = e[a];
|
|
168
127
|
}
|
|
169
128
|
return t;
|
|
170
129
|
}
|
|
130
|
+
var v = Object.freeze({
|
|
131
|
+
allowDisabledLink: true,
|
|
132
|
+
disabled: true,
|
|
133
|
+
to: ""
|
|
134
|
+
});
|
|
135
|
+
var y = {
|
|
136
|
+
elementRef: o().oneOfType([ o().func, o().object ]),
|
|
137
|
+
enableCurrentPage: o().bool,
|
|
138
|
+
endAdornment: o().node,
|
|
139
|
+
isCurrent: o().bool,
|
|
140
|
+
label: o().string.isRequired,
|
|
141
|
+
startAdornment: o().node,
|
|
142
|
+
to: o().string.isRequired
|
|
143
|
+
};
|
|
171
144
|
var g = {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
isCurrent: a().bool,
|
|
175
|
-
label: a().string.isRequired,
|
|
176
|
-
startAdornment: a().node,
|
|
177
|
-
to: a().string.isRequired
|
|
145
|
+
enableCurrentPage: false,
|
|
146
|
+
isCurrent: false
|
|
178
147
|
};
|
|
179
|
-
function
|
|
180
|
-
var r = e.
|
|
148
|
+
function O(e) {
|
|
149
|
+
var r = e.enableCurrentPage, t = e.endAdornment, a = e.isCurrent, o = e.label, l = e.startAdornment, i = e.to, s = b(e, [ "enableCurrentPage", "endAdornment", "isCurrent", "label", "startAdornment", "to" ]);
|
|
181
150
|
// @docs-props-type ItemPropsBase
|
|
182
|
-
var
|
|
183
|
-
to:
|
|
151
|
+
var u = {
|
|
152
|
+
to: i
|
|
184
153
|
};
|
|
185
|
-
|
|
186
|
-
"aria-current"
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
}
|
|
191
|
-
var f = o ? y(y({}, s), u) : s;
|
|
154
|
+
if (a) {
|
|
155
|
+
u["aria-current"] = "page";
|
|
156
|
+
if (!r) {
|
|
157
|
+
Object.assign(u, v);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
192
160
|
|
|
193
|
-
return n().createElement(
|
|
161
|
+
return n().createElement(d, p({
|
|
194
162
|
"data-test": "item"
|
|
195
|
-
},
|
|
163
|
+
}, u, s), l && l, o, t && t);
|
|
196
164
|
}
|
|
197
|
-
|
|
198
|
-
|
|
165
|
+
O.propTypes = y;
|
|
166
|
+
O.defaultProps = g;
|
|
167
|
+
/* harmony default export */ const h = O;
|
|
199
168
|
// CONCATENATED MODULE: ./src/Breadcrumbs/BreadcrumbsStyles.ts
|
|
200
|
-
var
|
|
169
|
+
var C = s().ol.withConfig({
|
|
201
170
|
displayName: "BreadcrumbsStyles__StyledList",
|
|
202
171
|
componentId: "sc-1maeyfk-0"
|
|
203
|
-
})([ "", " flex-wrap:wrap;" ],
|
|
204
|
-
var
|
|
172
|
+
})([ "", " flex-wrap:wrap;" ], u.mixins.reset("flex"));
|
|
173
|
+
var w = s().li.withConfig({
|
|
205
174
|
displayName: "BreadcrumbsStyles__StyledListItem",
|
|
206
175
|
componentId: "sc-1maeyfk-1"
|
|
207
|
-
})([ "display:flex;min-width:max-content;a[aria-current]{font-weight:", ";color:", ";cursor:default;}" ],
|
|
208
|
-
var P =
|
|
176
|
+
})([ "display:flex;min-width:max-content;a[aria-current]{font-weight:", ";color:", ";cursor:default;}" ], u.variables.fontWeightSemiBold, u.variables.contentColorActive);
|
|
177
|
+
var P = s().span.withConfig({
|
|
209
178
|
displayName: "BreadcrumbsStyles__StyledSeparator",
|
|
210
179
|
componentId: "sc-1maeyfk-2"
|
|
211
|
-
})([ "cursor:default;padding:0 ", ";color:", ";" ],
|
|
180
|
+
})([ "cursor:default;padding:0 ", ";color:", ";" ], u.variables.spacingSmall, u.variables.contentColorDefault);
|
|
212
181
|
// CONCATENATED MODULE: ./src/Breadcrumbs/Breadcrumbs.tsx
|
|
213
|
-
function
|
|
214
|
-
|
|
182
|
+
function S() {
|
|
183
|
+
S = Object.assign || function(e) {
|
|
215
184
|
for (var r = 1; r < arguments.length; r++) {
|
|
216
185
|
var t = arguments[r];
|
|
217
186
|
for (var n in t) {
|
|
@@ -222,16 +191,16 @@
|
|
|
222
191
|
}
|
|
223
192
|
return e;
|
|
224
193
|
};
|
|
225
|
-
return
|
|
194
|
+
return S.apply(this, arguments);
|
|
226
195
|
}
|
|
227
|
-
function
|
|
196
|
+
function j(e, r) {
|
|
228
197
|
if (e == null) return {};
|
|
229
198
|
var t = _(e, r);
|
|
230
|
-
var n,
|
|
199
|
+
var n, a;
|
|
231
200
|
if (Object.getOwnPropertySymbols) {
|
|
232
|
-
var
|
|
233
|
-
for (
|
|
234
|
-
n = a
|
|
201
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
202
|
+
for (a = 0; a < o.length; a++) {
|
|
203
|
+
n = o[a];
|
|
235
204
|
if (r.indexOf(n) >= 0) continue;
|
|
236
205
|
if (!Object.prototype.propertyIsEnumerable.call(e, n)) continue;
|
|
237
206
|
t[n] = e[n];
|
|
@@ -243,47 +212,53 @@
|
|
|
243
212
|
if (e == null) return {};
|
|
244
213
|
var t = {};
|
|
245
214
|
var n = Object.keys(e);
|
|
246
|
-
var
|
|
247
|
-
for (
|
|
248
|
-
|
|
249
|
-
if (r.indexOf(
|
|
250
|
-
t[
|
|
215
|
+
var a, o;
|
|
216
|
+
for (o = 0; o < n.length; o++) {
|
|
217
|
+
a = n[o];
|
|
218
|
+
if (r.indexOf(a) >= 0) continue;
|
|
219
|
+
t[a] = e[a];
|
|
251
220
|
}
|
|
252
221
|
return t;
|
|
253
222
|
}
|
|
223
|
+
var k = {
|
|
224
|
+
children: o().node.isRequired,
|
|
225
|
+
elementRef: o().oneOfType([ o().func, o().object ]),
|
|
226
|
+
enableCurrentPage: o().bool
|
|
227
|
+
};
|
|
254
228
|
var x = {
|
|
255
|
-
|
|
256
|
-
elementRef: a().oneOfType([ a().func, a().object ])
|
|
229
|
+
enableCurrentPage: false
|
|
257
230
|
};
|
|
258
|
-
function
|
|
259
|
-
var r = e.children,
|
|
231
|
+
function I(e) {
|
|
232
|
+
var r = e.children, a = e.elementRef, o = e.enableCurrentPage, i = j(e, [ "children", "elementRef", "enableCurrentPage" ]);
|
|
260
233
|
// @docs-props-type BreadcrumbsPropsBase
|
|
261
|
-
var
|
|
262
|
-
var
|
|
234
|
+
var s;
|
|
235
|
+
var u = t.Children.toArray(r).filter(t.isValidElement).map((function(e, a) {
|
|
263
236
|
if (false) {}
|
|
264
237
|
if (false) {}
|
|
265
238
|
// Set the last child as the current Breadcrumb.Item
|
|
266
|
-
var
|
|
239
|
+
var l = a === t.Children.count(r) - 1;
|
|
267
240
|
var i = (0, t.cloneElement)(e, {
|
|
268
|
-
isCurrent:
|
|
241
|
+
isCurrent: l,
|
|
242
|
+
enableCurrentPage: o
|
|
269
243
|
});
|
|
270
244
|
|
|
271
|
-
return n().createElement(
|
|
245
|
+
return n().createElement(w, {
|
|
272
246
|
key: e.props.to
|
|
273
|
-
}, i, !
|
|
247
|
+
}, i, !l && n().createElement(P, {
|
|
274
248
|
"aria-hidden": "true"
|
|
275
249
|
}, "/"));
|
|
276
250
|
}));
|
|
277
251
|
|
|
278
|
-
return n().createElement("nav",
|
|
252
|
+
return n().createElement("nav", S({
|
|
279
253
|
"data-test": "breadcrumbs",
|
|
280
|
-
"aria-label": (0,
|
|
281
|
-
ref:
|
|
282
|
-
},
|
|
254
|
+
"aria-label": (0, l._)("Breadcrumb"),
|
|
255
|
+
ref: a
|
|
256
|
+
}, i), n().createElement(C, null, u));
|
|
283
257
|
}
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
258
|
+
I.propTypes = k;
|
|
259
|
+
I.defaultProps = x;
|
|
260
|
+
I.Item = h;
|
|
261
|
+
/* harmony default export */ const q = I;
|
|
287
262
|
// CONCATENATED MODULE: ./src/Breadcrumbs/index.ts
|
|
288
263
|
module.exports = r;
|
|
289
264
|
/******/})();
|
package/Button.js
CHANGED
|
@@ -211,7 +211,7 @@
|
|
|
211
211
|
const k = require("@splunk/react-icons/enterprise/Caret");
|
|
212
212
|
var S = e.n(k);
|
|
213
213
|
// CONCATENATED MODULE: ./src/Button/icons/CaretSmallDown.tsx
|
|
214
|
-
var
|
|
214
|
+
var O = function e() {
|
|
215
215
|
var t = (0, m.useSplunkTheme)(), n = t.isEnterprise, i = t.isCompact;
|
|
216
216
|
var a = i ? "20px" : "24px";
|
|
217
217
|
return n ? r().createElement(S(), {
|
|
@@ -223,7 +223,7 @@
|
|
|
223
223
|
width: a
|
|
224
224
|
});
|
|
225
225
|
};
|
|
226
|
-
/* harmony default export */ const
|
|
226
|
+
/* harmony default export */ const C = O;
|
|
227
227
|
// CONCATENATED MODULE: external "@splunk/react-icons/ArrowSquareTopRightInset"
|
|
228
228
|
const q = require("@splunk/react-icons/ArrowSquareTopRightInset");
|
|
229
229
|
var _ = e.n(q);
|
|
@@ -379,7 +379,7 @@
|
|
|
379
379
|
children: a().node,
|
|
380
380
|
/** @private An additional className to add to the button. */
|
|
381
381
|
classNamePrivate: a().string,
|
|
382
|
-
disabled: a().bool,
|
|
382
|
+
disabled: a().oneOfType([ a().bool, a().oneOf([ "dimmed" ]) ]),
|
|
383
383
|
elementRef: a().oneOfType([ a().func, a().object ]),
|
|
384
384
|
error: a().bool,
|
|
385
385
|
icon: a().node,
|
|
@@ -440,7 +440,7 @@
|
|
|
440
440
|
}, {
|
|
441
441
|
key: "render",
|
|
442
442
|
value: function e() {
|
|
443
|
-
var t = this.props, n = t.action, i = t.appearance, a = t.append, o = t.className, c = t.classNamePrivate, p = t.disabled, u = t.error, f = t.icon, d = t.inline, m = t.isMenu, g = t.onClick, w = t.openInNewContext, k = t.prepend, S = t.to,
|
|
443
|
+
var t = this.props, n = t.action, i = t.appearance, a = t.append, o = t.className, c = t.classNamePrivate, p = t.disabled, u = t.error, f = t.icon, d = t.inline, m = t.isMenu, g = t.onClick, w = t.openInNewContext, k = t.prepend, S = t.to, O = t.value;
|
|
444
444
|
var q = this.props, _ = q.children, $ = q.label;
|
|
445
445
|
if (!$ && l()(_)) {
|
|
446
446
|
$ = _;
|
|
@@ -450,6 +450,7 @@
|
|
|
450
450
|
var E = S && w || m || !!f;
|
|
451
451
|
|
|
452
452
|
return r().createElement(y, T({
|
|
453
|
+
"aria-disabled": p === "dimmed" || undefined,
|
|
453
454
|
"aria-haspopup": m || undefined,
|
|
454
455
|
"aria-invalid": u || undefined,
|
|
455
456
|
"data-test": "button"
|
|
@@ -464,8 +465,8 @@
|
|
|
464
465
|
$hasPrismaIcon: E,
|
|
465
466
|
$isIconOnly: I,
|
|
466
467
|
$isMenu: m,
|
|
467
|
-
value:
|
|
468
|
-
onClick: g ? this.handleClick : undefined,
|
|
468
|
+
value: O,
|
|
469
|
+
onClick: g && !p ? this.handleClick : undefined,
|
|
469
470
|
ref: this.handleMount,
|
|
470
471
|
openInNewContext: w,
|
|
471
472
|
appearance: i
|
|
@@ -480,7 +481,7 @@
|
|
|
480
481
|
}, $), _, m && r().createElement(x, {
|
|
481
482
|
$disabled: p,
|
|
482
483
|
$primary: i === "primary"
|
|
483
|
-
}, r().createElement(
|
|
484
|
+
}, r().createElement(C, null)), w && r().createElement(N, null)));
|
|
484
485
|
}
|
|
485
486
|
} ]);
|
|
486
487
|
return n;
|
package/ButtonSimple.js
CHANGED
|
@@ -70,12 +70,12 @@
|
|
|
70
70
|
const i = require("prop-types");
|
|
71
71
|
var t = r.n(i);
|
|
72
72
|
// CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
|
|
73
|
-
const
|
|
73
|
+
const s = require("@splunk/ui-utils/i18n");
|
|
74
74
|
// CONCATENATED MODULE: external "@splunk/themes"
|
|
75
75
|
const l = require("@splunk/themes");
|
|
76
76
|
// CONCATENATED MODULE: external "@splunk/react-ui/ScreenReaderContent"
|
|
77
|
-
const
|
|
78
|
-
var c = r.n(
|
|
77
|
+
const n = require("@splunk/react-ui/ScreenReaderContent");
|
|
78
|
+
var c = r.n(n);
|
|
79
79
|
// CONCATENATED MODULE: external "styled-components"
|
|
80
80
|
const d = require("styled-components");
|
|
81
81
|
var b = r.n(d);
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
var e = r.$prepend;
|
|
92
92
|
return e && (0, d.css)([ "border-top-left-radius:0.1px;border-bottom-left-radius:0.1px;" ]);
|
|
93
93
|
}));
|
|
94
|
-
var g = (0, d.css)([ "", " ", " ", " &:not([disabled]){color:", ";transition:background-color 0.2s,border 0.2s,box-shadow 0.2s,text-decoration 0.2s;&:hover{background-color:", ";border-color:", ";", "}", " ", " &:active{background-color:", ";transition:none;}&:focus{background-color:", "
|
|
94
|
+
var g = (0, d.css)([ "", " ", " ", " &:not([disabled],[aria-disabled='true']){color:", ";transition:background-color 0.2s,border 0.2s,box-shadow 0.2s,text-decoration 0.2s;&:hover{background-color:", ";border-color:", ";", "}", " ", " &:active{background-color:", ";transition:none;}&:focus{background-color:", ";&:active{background-color:", ";}}}&[disabled],&[aria-disabled='true']{border-color:", ";color:", ";cursor:not-allowed;", "}&:not([disabled]){&:focus{", "}}" ], p, (0,
|
|
95
95
|
l.pickVariant)("$variant", {
|
|
96
96
|
prismaSecondary: (0, d.css)([ "font-weight:", ";" ], l.variables.fontWeightSemiBold),
|
|
97
97
|
prismaDefault: (0, d.css)([ "border:1px solid ", ";font-weight:", ";" ], l.variables.interactiveColorBorder, l.variables.fontWeightSemiBold),
|
|
@@ -106,19 +106,18 @@
|
|
|
106
106
|
}), (function(r) {
|
|
107
107
|
var e = r.$error;
|
|
108
108
|
return e && (0, d.css)([ "border-color:", ";&:hover{border-color:", ";}" ], l.variables.accentColorNegative, l.variables.accentColorNegative);
|
|
109
|
-
}), l.variables.interactiveColorOverlayActive, l.variables.interactiveColorOverlayHover,
|
|
110
|
-
|
|
109
|
+
}), l.variables.interactiveColorOverlayActive, l.variables.interactiveColorOverlayHover, l.variables.interactiveColorOverlayActive, l.variables.interactiveColorBorderDisabled, l.variables.contentColorDisabled, (function(r) {
|
|
110
|
+
var e = r.$selected;
|
|
111
|
+
return e && (0, d.css)([ "background-color:", ";" ], l.mixins.overlayColors(l.variables.interactiveColorBackgroundDisabled, l.variables.interactiveColorOverlaySelected));
|
|
112
|
+
}), (0, l.pickVariant)("$variant", {
|
|
111
113
|
prismaSecondary: (0, d.css)([ "box-shadow:", ";" ], l.variables.focusShadow),
|
|
112
114
|
prismaDefault: (0, d.css)([ "box-shadow:", ";" ], l.variables.focusShadow),
|
|
113
115
|
prismaToggle: (0, d.css)([ "border-color:", ";" ], l.variables.interactiveColorPrimary)
|
|
114
|
-
}), l.variables.interactiveColorOverlayActive, l.variables.interactiveColorBorderDisabled, l.variables.contentColorDisabled, (function(r) {
|
|
115
|
-
var e = r.$selected;
|
|
116
|
-
return e && (0, d.css)([ "background-color:", ";" ], l.mixins.overlayColors(l.variables.interactiveColorBackgroundDisabled, l.variables.interactiveColorOverlaySelected));
|
|
117
116
|
}));
|
|
118
|
-
var y = (0, d.css)([ "&[disabled]{border-color:", ";color:", ";background-color:", ";cursor:not-allowed;", "}" ], l.variables.interactiveColorBorderDisabled, l.variables.contentColorDisabled, l.variables.interactiveColorBackgroundDisabled, (function(r) {
|
|
117
|
+
var y = (0, d.css)([ "&[disabled],&[aria-disabled='true']{border-color:", ";color:", ";background-color:", ";cursor:not-allowed;", "}" ], l.variables.interactiveColorBorderDisabled, l.variables.contentColorDisabled, l.variables.interactiveColorBackgroundDisabled, (function(r) {
|
|
119
118
|
return r && (0, d.css)([ "background-color:", ";" ], l.mixins.overlayColors(l.variables.interactiveColorBackgroundDisabled, l.variables.interactiveColorOverlaySelected));
|
|
120
119
|
}));
|
|
121
|
-
var h = (0, d.css)([ "", " font-weight:", ";border-radius:", ";", " &:not([disabled]){color:", ";transition:background-color 0.2s,box-shadow 0.2s,text-decoration 0.2s;background-color:", ";&:hover,&:focus{background-color:", ";}&:hover{box-shadow:", ";}&:
|
|
120
|
+
var h = (0, d.css)([ "", " font-weight:", ";border-radius:", ";", " &:not([disabled],[aria-disabled='true']){color:", ";transition:background-color 0.2s,box-shadow 0.2s,text-decoration 0.2s;background-color:", ";&:hover,&:focus{background-color:", ";}&:hover{box-shadow:", ";}&:active{background-color:", ";transition:none;}}&:not([disabled]){&:focus{box-shadow:", ";}}", "" ], p, l.variables.fontWeightSemiBold, l.variables.borderRadius, f, l.variables.contentColorInverted, (0,
|
|
122
121
|
l.pickVariant)("$selected", {
|
|
123
122
|
false: (0, l.pickVariant)("$variant", {
|
|
124
123
|
prismaPrimary: l.variables.interactiveColorPrimary,
|
|
@@ -131,13 +130,13 @@
|
|
|
131
130
|
}), (0, l.pickVariant)("$variant", {
|
|
132
131
|
prismaPrimary: l.mixins.overlayColors(l.variables.interactiveColorPrimary, l.variables.interactiveColorOverlayHover),
|
|
133
132
|
prismaDestructive: l.mixins.overlayColors(l.variables.accentColorNegative, l.variables.interactiveColorOverlayHover)
|
|
134
|
-
}), l.variables.hoverShadow,
|
|
133
|
+
}), l.variables.hoverShadow, (0, l.pickVariant)("$variant", {
|
|
135
134
|
prismaPrimary: l.mixins.overlayColors(l.variables.interactiveColorPrimary, l.variables.interactiveColorOverlayActive),
|
|
136
135
|
prismaDestructive: l.mixins.overlayColors(l.variables.accentColorNegative, l.variables.interactiveColorOverlayActive)
|
|
137
|
-
}), y);
|
|
138
|
-
var k = (0, d.css)([ "", " font-weight:", ";border-radius:", ";", " &:not([disabled]){color:", ";background-color:", ";transition:background-color 0.2s,box-shadow 0.2s,text-decoration 0.2s;", " &:hover{background-color:", ";box-shadow:", ";}&:active{background-color:", ";transition:none;}&:focus{
|
|
136
|
+
}), l.variables.focusShadow, y);
|
|
137
|
+
var k = (0, d.css)([ "", " font-weight:", ";border-radius:", ";", " &:not([disabled],[aria-disabled='true']){color:", ";background-color:", ";transition:background-color 0.2s,box-shadow 0.2s,text-decoration 0.2s;", " &:hover{background-color:", ";box-shadow:", ";}&:active{background-color:", ";transition:none;}&:focus{background-color:", ";}}&:not([disabled]){&:focus{box-shadow:", ";}}", "" ], p, l.variables.fontWeightSemiBold, l.variables.borderRadius, f, l.variables.contentColorActive, l.variables.interactiveColorBackground, (function(r) {
|
|
139
138
|
return r && (0, d.css)([ "background-color:", ";" ], l.mixins.overlayColors(l.variables.interactiveColorBackground, l.variables.interactiveColorOverlaySelected));
|
|
140
|
-
}), l.mixins.overlayColors(l.variables.interactiveColorBackground, l.variables.interactiveColorOverlayHover), l.variables.hoverShadow, l.mixins.overlayColors(l.variables.interactiveColorBackground, l.variables.interactiveColorOverlayActive), l.
|
|
139
|
+
}), l.mixins.overlayColors(l.variables.interactiveColorBackground, l.variables.interactiveColorOverlayHover), l.variables.hoverShadow, l.mixins.overlayColors(l.variables.interactiveColorBackground, l.variables.interactiveColorOverlayActive), l.mixins.overlayColors(l.variables.interactiveColorBackground, l.variables.interactiveColorOverlayHover), l.variables.focusShadow, y);
|
|
141
140
|
// CONCATENATED MODULE: ./src/ButtonSimple/enterpriseStyles.ts
|
|
142
141
|
var m = "#1A8929";
|
|
143
142
|
// SUI-2439 to meet WCAG AA compliance
|
|
@@ -153,7 +152,7 @@
|
|
|
153
152
|
}));
|
|
154
153
|
var S = "inset 0 -1px 0 rgba(0, 0, 0, 0.1)";
|
|
155
154
|
var O = "inset 0 1px 0 rgba(0, 0, 0, 0.1)";
|
|
156
|
-
var D = (0, d.css)([ "", ";border:", ";", ";font-weight:", ";&:not([disabled]){background-color:", ";color:", ";transition:background-image 0.2s,border 0.2s,box-shadow 0.2s,text-decoration 0.2s;", ";", " &:hover{background-color:", ";box-shadow:", ";}&:active{transition:none;background-color:", ";border-color:", ";", ";}&:focus{
|
|
155
|
+
var D = (0, d.css)([ "", ";border:", ";", ";font-weight:", ";&:not([disabled],[aria-disabled='true']){background-color:", ";color:", ";transition:background-image 0.2s,border 0.2s,box-shadow 0.2s,text-decoration 0.2s;", ";", " &:hover{background-color:", ";box-shadow:", ";}&:active{transition:none;background-color:", ";border-color:", ";", ";}&:focus{", " ", "}}&:not([disabled]){&:focus{box-shadow:", ",", ";}}&[disabled],&[aria-disabled='true']{cursor:not-allowed;color:", ";background-color:", ";border-color:", ";", "}" ], x, (0,
|
|
157
156
|
l.pick)({
|
|
158
157
|
light: (0, d.css)([ "1px solid ", "" ], l.variables.gray60),
|
|
159
158
|
dark: l.variables.border
|
|
@@ -196,10 +195,7 @@
|
|
|
196
195
|
dark: l.variables.gray20
|
|
197
196
|
}), (0, l.pick)({
|
|
198
197
|
dark: (0, d.css)([ "box-shadow:inset 0 -1px 0 ", ";" ], l.variables.gray22)
|
|
199
|
-
}), (
|
|
200
|
-
light: S,
|
|
201
|
-
dark: (0, d.css)([ "inset 0 -1px 0 ", "" ], l.variables.gray30)
|
|
202
|
-
}), l.variables.focusShadow, (function(r) {
|
|
198
|
+
}), (function(r) {
|
|
203
199
|
var e = r.$append;
|
|
204
200
|
return e && (0, d.css)([ "box-shadow:", ",", ",inset -1px 0 0 ", ";" ], (0, l.pick)({
|
|
205
201
|
light: S,
|
|
@@ -211,7 +207,10 @@
|
|
|
211
207
|
light: (0, d.css)([ "box-shadow:", ",", ",", ",inset -1px 0 0 ", ";" ], S, O, l.variables.focusShadow, l.variables.borderColor),
|
|
212
208
|
dark: (0, d.css)([ "box-shadow:inset 0 1px 0 ", ",", ",inset -1px 0 0 ", ";" ], l.variables.black, l.variables.focusShadow, l.variables.borderColor)
|
|
213
209
|
});
|
|
214
|
-
}),
|
|
210
|
+
}), (0, l.pick)({
|
|
211
|
+
light: S,
|
|
212
|
+
dark: (0, d.css)([ "inset 0 -1px 0 ", "" ], l.variables.gray30)
|
|
213
|
+
}), l.variables.focusShadow, l.variables.textDisabledColor, (0, l.pick)({
|
|
215
214
|
light: l.variables.gray96,
|
|
216
215
|
dark: l.variables.gray30
|
|
217
216
|
}), (0, l.pick)({
|
|
@@ -226,27 +225,27 @@
|
|
|
226
225
|
}));
|
|
227
226
|
var $ = "inset 0 -2px 0 rgba(0, 0, 0, 0.1)";
|
|
228
227
|
var P = "inset 0 2px 0 rgba(0, 0, 0, 0.1)";
|
|
229
|
-
var B = (0, d.css)([ "", ";font-weight:", ";", " &:not([disabled]){background-color:", ";color:", ";box-shadow:", ";transition:background-image 0.2s,border 0.2s,box-shadow 0.2s,text-decoration 0.2s;", " ", " &:hover{background-color:", ";}&:active{background-color:", ";transition:none;}&:focus{
|
|
228
|
+
var B = (0, d.css)([ "", ";font-weight:", ";", " &:not([disabled],[aria-disabled='true']){background-color:", ";color:", ";box-shadow:", ";transition:background-image 0.2s,border 0.2s,box-shadow 0.2s,text-decoration 0.2s;", " ", " &:hover{background-color:", ";}&:active{background-color:", ";transition:none;}&:focus{&:active{background-color:", ";transition:none;}}}&:not([disabled]){&:focus{box-shadow:", ",", ";}}&[disabled],&[aria-disabled='true']{color:", ";background-color:", ";cursor:not-allowed;", "}" ], x, l.variables.fontWeightSemiBold, w, m, l.variables.white, $, (function(r) {
|
|
230
229
|
var e = r.$selected;
|
|
231
230
|
return e && (0, d.css)([ "box-shadow:", ";background-color:", ";" ], P, C);
|
|
232
231
|
}), (function(r) {
|
|
233
232
|
var e = r.$prepend;
|
|
234
233
|
return e && (0, d.css)([ "border-left:1px solid ", ";" ], m);
|
|
235
|
-
}), l.variables.brandColorD50, l.variables.brandColorD30,
|
|
234
|
+
}), l.variables.brandColorD50, l.variables.brandColorD30, l.variables.brandColorD30, $, l.variables.focusShadow, l.variables.brandColorL30, l.variables.brandColorL10, (function(r) {
|
|
236
235
|
var e = r.$selected;
|
|
237
236
|
return e && (0, d.css)([ "box-shadow:", ";background-color:", ";" ], P, l.variables.brandColorD20);
|
|
238
237
|
}));
|
|
239
|
-
var j = (0, d.css)([ "", ";font-weight:", ";", " &:not([disabled]){background-color:", ";color:", ";box-shadow:", ";transition:background-image 0.2s,border 0.2s,box-shadow 0.2s,text-decoration 0.2s;", " ", " &:hover{background-color:", ";}&:active{background-color:", ";transition:none;}&:focus{
|
|
238
|
+
var j = (0, d.css)([ "", ";font-weight:", ";", " &:not([disabled],[aria-disabled='true']){background-color:", ";color:", ";box-shadow:", ";transition:background-image 0.2s,border 0.2s,box-shadow 0.2s,text-decoration 0.2s;", " ", " &:hover{background-color:", ";}&:active{background-color:", ";transition:none;}&:focus{&:active{background-color:", ";transition:none;}}}&:not([disabled]){&:focus{box-shadow:", ",", ";}}&[disabled],&[aria-disabled='true']{color:", ";background-color:", ";cursor:not-allowed;", "}" ], x, l.variables.fontWeightSemiBold, w, l.variables.errorColorD10, l.variables.white, $, (function(r) {
|
|
240
239
|
var e = r.$selected;
|
|
241
240
|
return e && (0, d.css)([ "box-shadow:", ";background-color:", ";" ], P, l.variables.errorColorD30);
|
|
242
241
|
}), (function(r) {
|
|
243
242
|
var e = r.$prepend;
|
|
244
243
|
return e && (0, d.css)([ "border-left:1px solid ", ";" ], l.variables.errorColorD30);
|
|
245
|
-
}), l.variables.errorColorD30, l.variables.errorColorD40,
|
|
244
|
+
}), l.variables.errorColorD30, l.variables.errorColorD40, l.variables.errorColorD40, $, l.variables.focusShadow, l.variables.errorColorL10, l.variables.errorColorD10, (function(r) {
|
|
246
245
|
var e = r.$selected;
|
|
247
246
|
return e && (0, d.css)([ "box-shadow:", ";background-color:", ";" ], P, l.variables.errorColorD40);
|
|
248
247
|
}));
|
|
249
|
-
var T = (0, d.css)([ "", ";color:", ";border:1px solid transparent;&:not([disabled]){transition:background-color 0.2s,border 0.2s,box-shadow 0.2s,text-decoration 0.2s;", " &:hover{color:", ";background-color:", ";border-color:", ";}", " &:focus{color:", ";
|
|
248
|
+
var T = (0, d.css)([ "", ";color:", ";border:1px solid transparent;&:not([disabled],[aria-disabled='true']){transition:background-color 0.2s,border 0.2s,box-shadow 0.2s,text-decoration 0.2s;", " &:hover{color:", ";background-color:", ";border-color:", ";}", " &:focus{color:", ";}&:active,&[aria-expanded='true']{background-color:", ";transition:none;}}&:not([disabled]){&:focus{box-shadow:", ";}}&[disabled],&[aria-disabled='true']{color:", ";cursor:not-allowed;", "}" ], x, (0,
|
|
250
249
|
l.pick)({
|
|
251
250
|
light: l.variables.gray45,
|
|
252
251
|
dark: l.variables.white
|
|
@@ -265,10 +264,10 @@
|
|
|
265
264
|
}), (0, l.pick)({
|
|
266
265
|
light: l.variables.linkColor,
|
|
267
266
|
dark: l.variables.white
|
|
268
|
-
}),
|
|
267
|
+
}), (0, l.pick)({
|
|
269
268
|
light: l.variables.gray92,
|
|
270
269
|
dark: l.variables.gray22
|
|
271
|
-
}), l.variables.textDisabledColor, (function(r) {
|
|
270
|
+
}), l.variables.focusShadow, l.variables.textDisabledColor, (function(r) {
|
|
272
271
|
var e = r.$selected;
|
|
273
272
|
return e && (0, d.css)([ "border-color:", ";" ], l.variables.borderLightColor);
|
|
274
273
|
}));
|
|
@@ -444,7 +443,7 @@
|
|
|
444
443
|
appearance: t().oneOf([ "default", "secondary", "primary", "destructive", "pill", "toggle", "flat" ]),
|
|
445
444
|
append: t().bool,
|
|
446
445
|
children: t().node,
|
|
447
|
-
disabled: t().bool,
|
|
446
|
+
disabled: t().oneOfType([ t().bool, t().oneOf([ "dimmed" ]) ]),
|
|
448
447
|
elementRef: t().oneOfType([ t().func, t().object ]),
|
|
449
448
|
error: t().bool,
|
|
450
449
|
inline: t().bool,
|
|
@@ -516,22 +515,24 @@
|
|
|
516
515
|
}, {
|
|
517
516
|
key: "render",
|
|
518
517
|
value: function r() {
|
|
519
|
-
var e = this.props, o = e.appearance, i = e.append, t = e.children, l = e.error,
|
|
520
|
-
var
|
|
521
|
-
if (
|
|
522
|
-
|
|
518
|
+
var e = this.props, o = e.appearance, i = e.append, t = e.children, l = e.disabled, n = e.error, d = e.prepend, b = e.selected, v = e.splunkTheme, u = A(e, [ "appearance", "append", "children", "disabled", "error", "prepend", "selected", "splunkTheme" ]);
|
|
519
|
+
var p = o;
|
|
520
|
+
if (v.isEnterprise) {
|
|
521
|
+
p = n ? "destructive" : o;
|
|
523
522
|
}
|
|
524
523
|
|
|
525
524
|
return a().createElement(_, V({
|
|
526
|
-
"aria-
|
|
525
|
+
"aria-disabled": l === "dimmed" || undefined,
|
|
526
|
+
"aria-invalid": n,
|
|
527
527
|
"data-test": "button-simple",
|
|
528
|
+
disabled: l === true,
|
|
528
529
|
ref: this.handleMount,
|
|
529
|
-
$variant: U(
|
|
530
|
+
$variant: U(p, v.family),
|
|
530
531
|
$append: i,
|
|
531
|
-
$prepend:
|
|
532
|
-
$selected:
|
|
533
|
-
$error:
|
|
534
|
-
},
|
|
532
|
+
$prepend: d,
|
|
533
|
+
$selected: b,
|
|
534
|
+
$error: n
|
|
535
|
+
}, u), t, b && a().createElement(c(), null, (0, s._)("Selected")));
|
|
535
536
|
}
|
|
536
537
|
} ]);
|
|
537
538
|
return o;
|
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,27 @@
|
|
|
1
1
|
Change Log
|
|
2
2
|
============
|
|
3
3
|
|
|
4
|
+
4.25.0 - Feb 6, 2024
|
|
5
|
+
----------
|
|
6
|
+
New Features:
|
|
7
|
+
* Modal supports `subtitle` and `icon` props in Enterprise themes (SUI-5924).
|
|
8
|
+
* `Button` now supports a new `"dimmed"` value for the `disabled` prop (SUI-5819).
|
|
9
|
+
|
|
10
|
+
Bug Fixes:
|
|
11
|
+
* Modal `subtitle` is used as the accessible description for the dialog (SUI-5264).
|
|
12
|
+
* `Color`'s `required` attribute is correctly applied when inside a `ControlGroup` in Prisma themes (SUI-5386).
|
|
13
|
+
* `RadioList`'s `required` attribute is correctly applied when inside a `ControlGroup` (SUI-5386).
|
|
14
|
+
|
|
15
|
+
4.24.0 - Jan 9, 2024
|
|
16
|
+
----------
|
|
17
|
+
New Features:
|
|
18
|
+
* `Breadcrumbs` now supports `enableCurrentPage` which enables the current page link (SUI-5910).
|
|
19
|
+
|
|
20
|
+
Bug Fixes:
|
|
21
|
+
* Disabled `Option`s for `ComboBox` and `Search` are no longer selectable with keyboard navigation (SUI-5905).
|
|
22
|
+
* Fixed a `styled-components` specificity issue where `Table`'s cursor would incorrectly be set to `pointer` in some cases (SUI-5914).
|
|
23
|
+
* `TabBar` no longer shows a duplicate browser tooltip (SUI-5916).
|
|
24
|
+
|
|
4
25
|
4.23.0 - Dec 5, 2023
|
|
5
26
|
----------
|
|
6
27
|
New Features:
|
|
@@ -8,6 +29,7 @@ New Features:
|
|
|
8
29
|
|
|
9
30
|
Bug Fixes:
|
|
10
31
|
* The system color picker for `Color` no longer closes unexpectedly during color selection in Safari (SUI-5831).
|
|
32
|
+
* `ComboBox`'s options are no longer clickable while closing (SUI-5825).
|
|
11
33
|
|
|
12
34
|
Deprecations:
|
|
13
35
|
* `JSONTree`'s `expandChildren="withShiftModifier"` value has been deprecated and will be removed in a future major version. Use the `expandChildrenOnShiftKey` prop instead (SUI-5771).
|