@splunk/react-ui 4.24.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/Button.js +8 -7
- package/ButtonSimple.js +40 -39
- package/CHANGELOG.md +11 -0
- package/Code.js +193 -100
- package/Color.js +18 -15
- package/JSONTree.js +1 -1
- package/Modal.js +55 -55
- package/RadioList.js +12 -11
- 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/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 +0 -2
- package/types/src/Modal/Modal.d.ts +1 -0
- 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/unit-test-setup-testing-library.d.ts +1 -0
- package/types/src/Modal/docs/examples/prisma/TypicalUsage.d.ts +0 -2
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,17 @@
|
|
|
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
|
+
|
|
4
15
|
4.24.0 - Jan 9, 2024
|
|
5
16
|
----------
|
|
6
17
|
New Features:
|