@splunk/react-ui 4.24.0 → 4.26.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 +65 -42
- package/Button.js +8 -7
- package/ButtonSimple.js +40 -39
- package/CHANGELOG.md +30 -1
- package/Code.js +193 -100
- package/Color.js +18 -15
- package/JSONTree.js +1 -1
- package/MIGRATION.mdx +48 -0
- package/Modal.js +69 -58
- package/RadioList.js +12 -11
- package/Table.js +2330 -2543
- package/TextArea.js +298 -302
- 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 +13 -13
- package/types/src/Breadcrumbs/Breadcrumbs.d.ts +18 -2
- package/types/src/Breadcrumbs/Item.d.ts +7 -1
- package/types/src/Breadcrumbs/docs/examples/CustomizedClick.d.ts +2 -0
- 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/JSONTree/JSONTree.d.ts +1 -1
- package/types/src/Modal/Header.d.ts +6 -7
- package/types/src/Modal/Modal.d.ts +10 -2
- package/types/src/Modal/ModalContext.d.ts +1 -0
- package/types/src/RadioList/RadioList.d.ts +27 -27
- package/types/src/RadioList/RadioListContext.d.ts +5 -4
- package/types/src/Table/Body.d.ts +26 -22
- package/types/src/Table/Row.d.ts +47 -16
- package/types/src/Table/RowDragCell.d.ts +23 -42
- package/types/src/Table/Table.d.ts +28 -78
- package/types/src/TextArea/TextArea.d.ts +1 -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,7 +61,8 @@
|
|
|
61
61
|
e.r(r);
|
|
62
62
|
// EXPORTS
|
|
63
63
|
e.d(r, {
|
|
64
|
-
|
|
64
|
+
BreadcrumbsContext: () => /* reexport */ E,
|
|
65
|
+
Item: () => /* reexport */ O,
|
|
65
66
|
default: () => /* reexport */ q
|
|
66
67
|
});
|
|
67
68
|
// CONCATENATED MODULE: external "react"
|
|
@@ -74,14 +75,14 @@
|
|
|
74
75
|
const l = require("@splunk/ui-utils/i18n");
|
|
75
76
|
// CONCATENATED MODULE: external "styled-components"
|
|
76
77
|
const i = require("styled-components");
|
|
77
|
-
var
|
|
78
|
+
var c = e.n(i);
|
|
78
79
|
// CONCATENATED MODULE: external "@splunk/themes"
|
|
79
80
|
const u = require("@splunk/themes");
|
|
80
81
|
// CONCATENATED MODULE: external "@splunk/react-ui/Link"
|
|
81
|
-
const
|
|
82
|
-
var f = e.n(
|
|
82
|
+
const s = require("@splunk/react-ui/Link");
|
|
83
|
+
var f = e.n(s);
|
|
83
84
|
// CONCATENATED MODULE: ./src/Breadcrumbs/ItemStyles.ts
|
|
84
|
-
var d =
|
|
85
|
+
var d = c()(f()).withConfig({
|
|
85
86
|
displayName: "ItemStyles__StyledLink",
|
|
86
87
|
componentId: "sc-1ywtawf-0"
|
|
87
88
|
})([ "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);
|
|
@@ -102,7 +103,7 @@
|
|
|
102
103
|
}
|
|
103
104
|
function b(e, r) {
|
|
104
105
|
if (e == null) return {};
|
|
105
|
-
var t =
|
|
106
|
+
var t = v(e, r);
|
|
106
107
|
var n, a;
|
|
107
108
|
if (Object.getOwnPropertySymbols) {
|
|
108
109
|
var o = Object.getOwnPropertySymbols(e);
|
|
@@ -115,7 +116,7 @@
|
|
|
115
116
|
}
|
|
116
117
|
return t;
|
|
117
118
|
}
|
|
118
|
-
function
|
|
119
|
+
function v(e, r) {
|
|
119
120
|
if (e == null) return {};
|
|
120
121
|
var t = {};
|
|
121
122
|
var n = Object.keys(e);
|
|
@@ -127,7 +128,7 @@
|
|
|
127
128
|
}
|
|
128
129
|
return t;
|
|
129
130
|
}
|
|
130
|
-
var
|
|
131
|
+
var m = Object.freeze({
|
|
131
132
|
allowDisabledLink: true,
|
|
132
133
|
disabled: true,
|
|
133
134
|
to: ""
|
|
@@ -138,6 +139,7 @@
|
|
|
138
139
|
endAdornment: o().node,
|
|
139
140
|
isCurrent: o().bool,
|
|
140
141
|
label: o().string.isRequired,
|
|
142
|
+
onClick: o().func,
|
|
141
143
|
startAdornment: o().node,
|
|
142
144
|
to: o().string.isRequired
|
|
143
145
|
};
|
|
@@ -145,42 +147,56 @@
|
|
|
145
147
|
enableCurrentPage: false,
|
|
146
148
|
isCurrent: false
|
|
147
149
|
};
|
|
148
|
-
function
|
|
149
|
-
var r = e.enableCurrentPage,
|
|
150
|
+
function C(e) {
|
|
151
|
+
var r = e.enableCurrentPage, a = e.endAdornment, o = e.isCurrent, l = e.label, i = e.onClick, c = e.startAdornment, u = e.to, s = b(e, [ "enableCurrentPage", "endAdornment", "isCurrent", "label", "onClick", "startAdornment", "to" ]);
|
|
150
152
|
// @docs-props-type ItemPropsBase
|
|
151
|
-
var
|
|
152
|
-
|
|
153
|
+
var f = (0, t.useContext)(E), v = f.onClick;
|
|
154
|
+
var y = {
|
|
155
|
+
to: u
|
|
153
156
|
};
|
|
154
|
-
|
|
155
|
-
|
|
157
|
+
var g = (0, t.useCallback)((function(e) {
|
|
158
|
+
i === null || i === void 0 ? void 0 : i(e, {
|
|
159
|
+
label: l,
|
|
160
|
+
to: u
|
|
161
|
+
});
|
|
162
|
+
v === null || v === void 0 ? void 0 : v(e, {
|
|
163
|
+
label: l,
|
|
164
|
+
to: u
|
|
165
|
+
});
|
|
166
|
+
}), [ i, v, l, u ]);
|
|
167
|
+
if (o) {
|
|
168
|
+
y["aria-current"] = "page";
|
|
156
169
|
if (!r) {
|
|
157
|
-
Object.assign(
|
|
170
|
+
Object.assign(y, m);
|
|
158
171
|
}
|
|
159
172
|
}
|
|
173
|
+
var C = i || v ? {
|
|
174
|
+
onClick: g
|
|
175
|
+
} : {};
|
|
160
176
|
|
|
161
177
|
return n().createElement(d, p({
|
|
162
178
|
"data-test": "item"
|
|
163
|
-
},
|
|
179
|
+
}, C, y, s), c && c, l, a && a);
|
|
164
180
|
}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
/* harmony default export */ const
|
|
181
|
+
C.propTypes = y;
|
|
182
|
+
C.defaultProps = g;
|
|
183
|
+
/* harmony default export */ const O = C;
|
|
168
184
|
// CONCATENATED MODULE: ./src/Breadcrumbs/BreadcrumbsStyles.ts
|
|
169
|
-
var
|
|
185
|
+
var h = c().ol.withConfig({
|
|
170
186
|
displayName: "BreadcrumbsStyles__StyledList",
|
|
171
187
|
componentId: "sc-1maeyfk-0"
|
|
172
188
|
})([ "", " flex-wrap:wrap;" ], u.mixins.reset("flex"));
|
|
173
|
-
var
|
|
189
|
+
var k = c().li.withConfig({
|
|
174
190
|
displayName: "BreadcrumbsStyles__StyledListItem",
|
|
175
191
|
componentId: "sc-1maeyfk-1"
|
|
176
192
|
})([ "display:flex;min-width:max-content;a[aria-current]{font-weight:", ";color:", ";cursor:default;}" ], u.variables.fontWeightSemiBold, u.variables.contentColorActive);
|
|
177
|
-
var P =
|
|
193
|
+
var P = c().span.withConfig({
|
|
178
194
|
displayName: "BreadcrumbsStyles__StyledSeparator",
|
|
179
195
|
componentId: "sc-1maeyfk-2"
|
|
180
196
|
})([ "cursor:default;padding:0 ", ";color:", ";" ], u.variables.spacingSmall, u.variables.contentColorDefault);
|
|
181
197
|
// CONCATENATED MODULE: ./src/Breadcrumbs/Breadcrumbs.tsx
|
|
182
|
-
function
|
|
183
|
-
|
|
198
|
+
function w() {
|
|
199
|
+
w = Object.assign || function(e) {
|
|
184
200
|
for (var r = 1; r < arguments.length; r++) {
|
|
185
201
|
var t = arguments[r];
|
|
186
202
|
for (var n in t) {
|
|
@@ -191,11 +207,11 @@
|
|
|
191
207
|
}
|
|
192
208
|
return e;
|
|
193
209
|
};
|
|
194
|
-
return
|
|
210
|
+
return w.apply(this, arguments);
|
|
195
211
|
}
|
|
196
|
-
function
|
|
212
|
+
function S(e, r) {
|
|
197
213
|
if (e == null) return {};
|
|
198
|
-
var t =
|
|
214
|
+
var t = j(e, r);
|
|
199
215
|
var n, a;
|
|
200
216
|
if (Object.getOwnPropertySymbols) {
|
|
201
217
|
var o = Object.getOwnPropertySymbols(e);
|
|
@@ -208,7 +224,7 @@
|
|
|
208
224
|
}
|
|
209
225
|
return t;
|
|
210
226
|
}
|
|
211
|
-
function
|
|
227
|
+
function j(e, r) {
|
|
212
228
|
if (e == null) return {};
|
|
213
229
|
var t = {};
|
|
214
230
|
var n = Object.keys(e);
|
|
@@ -220,44 +236,51 @@
|
|
|
220
236
|
}
|
|
221
237
|
return t;
|
|
222
238
|
}
|
|
223
|
-
var
|
|
239
|
+
var x = {
|
|
224
240
|
children: o().node.isRequired,
|
|
225
241
|
elementRef: o().oneOfType([ o().func, o().object ]),
|
|
226
|
-
enableCurrentPage: o().bool
|
|
242
|
+
enableCurrentPage: o().bool,
|
|
243
|
+
onClick: o().func
|
|
227
244
|
};
|
|
228
|
-
var
|
|
245
|
+
var _ = {
|
|
229
246
|
enableCurrentPage: false
|
|
230
247
|
};
|
|
248
|
+
var E = n().createContext({});
|
|
231
249
|
function I(e) {
|
|
232
|
-
var r = e.children, a = e.elementRef, o = e.enableCurrentPage, i =
|
|
250
|
+
var r = e.children, a = e.elementRef, o = e.enableCurrentPage, i = e.onClick, c = S(e, [ "children", "elementRef", "enableCurrentPage", "onClick" ]);
|
|
233
251
|
// @docs-props-type BreadcrumbsPropsBase
|
|
234
|
-
var
|
|
235
|
-
var
|
|
252
|
+
var u;
|
|
253
|
+
var s = t.Children.toArray(r).filter(t.isValidElement).map((function(e, a) {
|
|
236
254
|
if (false) {}
|
|
237
255
|
if (false) {}
|
|
238
|
-
// Set the last child as the current
|
|
256
|
+
// Set the last child as the current Breadcrumbs.Item
|
|
239
257
|
var l = a === t.Children.count(r) - 1;
|
|
240
258
|
var i = (0, t.cloneElement)(e, {
|
|
241
259
|
isCurrent: l,
|
|
242
260
|
enableCurrentPage: o
|
|
243
261
|
});
|
|
244
262
|
|
|
245
|
-
return n().createElement(
|
|
263
|
+
return n().createElement(k, {
|
|
246
264
|
key: e.props.to
|
|
247
265
|
}, i, !l && n().createElement(P, {
|
|
248
266
|
"aria-hidden": "true"
|
|
249
267
|
}, "/"));
|
|
250
268
|
}));
|
|
269
|
+
var f = {
|
|
270
|
+
onClick: i
|
|
271
|
+
};
|
|
251
272
|
|
|
252
|
-
return n().createElement(
|
|
273
|
+
return n().createElement(E.Provider, {
|
|
274
|
+
value: f
|
|
275
|
+
}, n().createElement("nav", w({
|
|
253
276
|
"data-test": "breadcrumbs",
|
|
254
|
-
"aria-label": (0, l._)("
|
|
277
|
+
"aria-label": (0, l._)("Breadcrumbs"),
|
|
255
278
|
ref: a
|
|
256
|
-
},
|
|
279
|
+
}, c), n().createElement(h, null, s)));
|
|
257
280
|
}
|
|
258
|
-
I.propTypes =
|
|
259
|
-
I.defaultProps =
|
|
260
|
-
I.Item =
|
|
281
|
+
I.propTypes = x;
|
|
282
|
+
I.defaultProps = _;
|
|
283
|
+
I.Item = O;
|
|
261
284
|
/* harmony default export */ const q = I;
|
|
262
285
|
// CONCATENATED MODULE: ./src/Breadcrumbs/index.ts
|
|
263
286
|
module.exports = r;
|
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,34 @@
|
|
|
1
1
|
Change Log
|
|
2
2
|
============
|
|
3
3
|
|
|
4
|
+
4.26.0 - Feb 21, 2024
|
|
5
|
+
----------
|
|
6
|
+
New Features:
|
|
7
|
+
* `Modal` automatically returns focus to the invoking element after close when a ref is provided to the new prop `returnFocus` (SUI-2834).
|
|
8
|
+
* `Breadcrumbs` and `Breadcrumbs.Item` now support `onClick` prop (SUI-5911).
|
|
9
|
+
|
|
10
|
+
Bug Fixes:
|
|
11
|
+
* `TextArea`'s test selector is now `data-test="text-area"` rather than `data-test="text"` (SUI-5964).
|
|
12
|
+
* The icon in `Modal.Header` is now aligned with the top of the title (SUI-5930).
|
|
13
|
+
* `TextArea` renders at the correct size when `minRows={1}` (SUI-6010).
|
|
14
|
+
* `TextArea` has consistent height when rendering rows regardless if value is present.
|
|
15
|
+
* Fixed spurious deprecation warnings for `canClear` and `placeholder` props in `TextArea`.
|
|
16
|
+
* Fixed regression in `TextArea` where placeholder text could be cut off.
|
|
17
|
+
|
|
18
|
+
API Changes:
|
|
19
|
+
* Corrected the type of `Modal`'s `initialFocus` prop to include `React.Component & { focus: () => void }` instead of `React.Component & { focus: () => {} }`.
|
|
20
|
+
|
|
21
|
+
4.25.0 - Feb 6, 2024
|
|
22
|
+
----------
|
|
23
|
+
New Features:
|
|
24
|
+
* `Modal` supports `subtitle` and `icon` props in Enterprise themes (SUI-5924).
|
|
25
|
+
* `Button` now supports a new `"dimmed"` value for the `disabled` prop (SUI-5819).
|
|
26
|
+
|
|
27
|
+
Bug Fixes:
|
|
28
|
+
* `Modal`'s `subtitle` is used as the accessible description for the dialog (SUI-5264).
|
|
29
|
+
* `Color`'s `required` attribute is correctly applied when inside a `ControlGroup` in Prisma themes (SUI-5386).
|
|
30
|
+
* `RadioList`'s `required` attribute is correctly applied when inside a `ControlGroup` (SUI-5386).
|
|
31
|
+
|
|
4
32
|
4.24.0 - Jan 9, 2024
|
|
5
33
|
----------
|
|
6
34
|
New Features:
|
|
@@ -19,6 +47,7 @@ New Features:
|
|
|
19
47
|
Bug Fixes:
|
|
20
48
|
* The system color picker for `Color` no longer closes unexpectedly during color selection in Safari (SUI-5831).
|
|
21
49
|
* `ComboBox`'s options are no longer clickable while closing (SUI-5825).
|
|
50
|
+
* Improved the row drag and drop experience and performance by adopting `@dnd-kit` in `Table` component (SUI-5134).
|
|
22
51
|
|
|
23
52
|
Deprecations:
|
|
24
53
|
* `JSONTree`'s `expandChildren="withShiftModifier"` value has been deprecated and will be removed in a future major version. Use the `expandChildrenOnShiftKey` prop instead (SUI-5771).
|
|
@@ -76,7 +105,7 @@ Docs:
|
|
|
76
105
|
4.20.0 - September 5, 2023
|
|
77
106
|
----------
|
|
78
107
|
New Features:
|
|
79
|
-
* New `
|
|
108
|
+
* New `Breadcrumbs` component (SUI-1819).
|
|
80
109
|
* `Code` now supports `language="splunk-spl"` (SUI-5737).
|
|
81
110
|
|
|
82
111
|
Bug Fixes:
|