@splunk/react-ui 4.32.0 → 4.33.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 +42 -45
- package/ButtonSimple.js +372 -336
- package/CHANGELOG.md +23 -0
- package/Clickable.js +21 -19
- package/FormRows.js +229 -207
- package/MIGRATION.mdx +23 -0
- package/Menu.js +1 -1
- package/Modal.js +156 -131
- package/Multiselect.js +47 -33
- package/Select.js +236 -220
- package/TabBar.js +1 -1
- package/Text.js +13 -11
- package/package.json +5 -5
- package/types/src/Button/Button.d.ts +4 -4
- package/types/src/ButtonSimple/ButtonSimple.d.ts +8 -6
- package/types/src/ButtonSimple/mixin.d.ts +2 -2
- package/types/src/Clickable/Clickable.d.ts +3 -2
- package/types/src/Date/Date.d.ts +2 -2
- package/types/src/Menu/Item.d.ts +0 -1
- package/types/src/Number/Number.d.ts +2 -2
- package/types/src/Select/Select.d.ts +6 -2
- package/types/src/Select/SelectBase.d.ts +6 -2
- package/types/src/Slider/Slider.d.ts +2 -2
- package/types/src/Text/docs/examples/Basic.d.ts +1 -9
- package/types/src/Text/docs/examples/Error.d.ts +2 -10
- package/types/src/Text/docs/examples/Inline.d.ts +1 -9
- package/types/src/Text/docs/examples/Multiline.d.ts +1 -9
- package/types/src/Text/docs/examples/Password.d.ts +1 -9
- package/types/src/Text/docs/examples/Search.d.ts +1 -9
- package/types/src/Button/docs/examples/prisma/Basic.d.ts +0 -2
- package/types/src/Button/docs/examples/prisma/Block.d.ts +0 -2
- package/types/src/Button/docs/examples/prisma/Disabled.d.ts +0 -2
- package/types/src/Button/docs/examples/prisma/Icons.d.ts +0 -2
- package/types/src/Button/docs/examples/prisma/Menus.d.ts +0 -2
- package/types/src/Button/docs/examples/prisma/To.d.ts +0 -2
- package/types/src/Button/docs/examples/prisma/Truncated.d.ts +0 -2
- /package/types/src/{Button/docs/examples/prisma → Clickable/docs/examples}/Dimmed.d.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,29 @@
|
|
|
1
1
|
Change Log
|
|
2
2
|
============
|
|
3
3
|
|
|
4
|
+
4.33.0 - July 8, 2024
|
|
5
|
+
----------
|
|
6
|
+
New Features:
|
|
7
|
+
* `Clickable` now supports the `"dimmed"` value for the `disabled` prop (SUI-5819).
|
|
8
|
+
* If set to `"dimmed"`, the component does not respond to mouse events and `aria-disabled` is set to `true`.
|
|
9
|
+
* `Button` now supports `appearance="subtle"` with a visual appearance similar to the Enterprise `"pill"` and Prisma `"secondary"` appearances (SUI-6051).
|
|
10
|
+
* `Button` now sets the `aria-pressed` attribute appropriately when the `selected` prop is provided (SUI-2791).
|
|
11
|
+
* `Select` has a new `toggleContent` prop that specifies whether the children (`"optionChildren"`) or label (`"optionLabel"`) of the matched `Option` are rendered in the toggle button (SUI-6316).
|
|
12
|
+
* `Menu.Item` now supports `descriptionPosition="right"` for Prisma themes (SUI-5664).
|
|
13
|
+
|
|
14
|
+
Bug Fixes:
|
|
15
|
+
* `Modal.Header` uses semantic HTML elements for the `title` and `subtitle` props to improve accessibility.
|
|
16
|
+
* `TabBar.Tab` has a correctly sized active indicator when vertical and the `to` prop is passed (SUI-6205).
|
|
17
|
+
* `Button`'s text is now centered correctly when combining the `icon` and `to` props (SUI-6331).
|
|
18
|
+
* `Button`'s external icon now has the same size as an icon rendered by the `icon` prop (SUI-6255).
|
|
19
|
+
* `Select` now constructs `aria-label` out of the `Option`-s `label`s rather than `children` (SUI-6316).
|
|
20
|
+
|
|
21
|
+
Deprecations:
|
|
22
|
+
* `Button`'s `"flat"`, `"pill"`, and `"toggle"` values of the `appearance` prop have been deprecated and will be removed in the next major version (SUI-6501).
|
|
23
|
+
|
|
24
|
+
Docs:
|
|
25
|
+
* Fixed an issue where `SidePanel`'s Test Hooks content was not shown (SUI-6322).
|
|
26
|
+
|
|
4
27
|
4.32.0 - June 4, 2024
|
|
5
28
|
----------
|
|
6
29
|
New Features:
|
package/Clickable.js
CHANGED
|
@@ -87,12 +87,12 @@
|
|
|
87
87
|
const p = require("styled-components");
|
|
88
88
|
var d = e.n(p);
|
|
89
89
|
// CONCATENATED MODULE: external "@splunk/themes"
|
|
90
|
-
const
|
|
90
|
+
const b = require("@splunk/themes");
|
|
91
91
|
// CONCATENATED MODULE: ./src/Clickable/ClickableStyles.ts
|
|
92
|
-
var
|
|
92
|
+
var v = d().a.withConfig({
|
|
93
93
|
displayName: "ClickableStyles__StyledA",
|
|
94
94
|
componentId: "sc-7al1vw-0"
|
|
95
|
-
})([ "", " cursor:pointer;&[disabled],&[aria-disabled='true']{color:", ";}&::-moz-focus-inner{border:0;padding:0;}" ],
|
|
95
|
+
})([ "", " cursor:pointer;&[disabled],&[aria-disabled='true']{color:", ";}&::-moz-focus-inner{border:0;padding:0;}" ], b.mixins.reset("inline"), b.variables.contentColorDisabled);
|
|
96
96
|
// CONCATENATED MODULE: ./src/Clickable/NavigationProvider.tsx
|
|
97
97
|
/** @public */
|
|
98
98
|
var y = {
|
|
@@ -257,16 +257,16 @@
|
|
|
257
257
|
} else {
|
|
258
258
|
o = r.apply(this, arguments);
|
|
259
259
|
}
|
|
260
|
-
return
|
|
260
|
+
return T(this, o);
|
|
261
261
|
};
|
|
262
262
|
}
|
|
263
|
-
function
|
|
263
|
+
function T(e, t) {
|
|
264
264
|
if (t && (g(t) === "object" || typeof t === "function")) {
|
|
265
265
|
return t;
|
|
266
266
|
}
|
|
267
|
-
return
|
|
267
|
+
return I(e);
|
|
268
268
|
}
|
|
269
|
-
function
|
|
269
|
+
function I(e) {
|
|
270
270
|
if (e === void 0) {
|
|
271
271
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
272
272
|
}
|
|
@@ -315,7 +315,7 @@
|
|
|
315
315
|
/** @private */
|
|
316
316
|
allowDisabledLink: i().bool,
|
|
317
317
|
children: i().node,
|
|
318
|
-
disabled: i().bool,
|
|
318
|
+
disabled: i().oneOfType([ i().bool, i().oneOf([ "dimmed" ]) ]),
|
|
319
319
|
elementRef: i().oneOfType([ i().func, i().object ]),
|
|
320
320
|
onClick: i().func,
|
|
321
321
|
openInNewContext: i().bool,
|
|
@@ -341,12 +341,12 @@
|
|
|
341
341
|
var r;
|
|
342
342
|
x(this, n);
|
|
343
343
|
r = t.call(this, e);
|
|
344
|
-
M(
|
|
345
|
-
M(
|
|
344
|
+
M(I(r), "el", null);
|
|
345
|
+
M(I(r), "handleMount", (function(e) {
|
|
346
346
|
r.el = e;
|
|
347
347
|
k(r.props.elementRef, e);
|
|
348
348
|
}));
|
|
349
|
-
M(
|
|
349
|
+
M(I(r), "createHandleOnClick", (function() {
|
|
350
350
|
var e = r.context, t = e.onClick, n = e.onLinkClick;
|
|
351
351
|
return function(e) {
|
|
352
352
|
if (A(r.props)) {
|
|
@@ -382,7 +382,7 @@
|
|
|
382
382
|
}
|
|
383
383
|
};
|
|
384
384
|
}));
|
|
385
|
-
M(
|
|
385
|
+
M(I(r), "getTransformedUrl", (function(e) {
|
|
386
386
|
var t = r.context.transformUrl;
|
|
387
387
|
return t != null ? t(e, {
|
|
388
388
|
isInternal: z(e),
|
|
@@ -411,7 +411,7 @@
|
|
|
411
411
|
var u = i ? "_blank" : undefined;
|
|
412
412
|
var c = i && z(l) ? "noopener noreferrer" : undefined;
|
|
413
413
|
|
|
414
|
-
return r().createElement(
|
|
414
|
+
return r().createElement(v, C({
|
|
415
415
|
"data-test": "clickable",
|
|
416
416
|
ref: this.handleMount,
|
|
417
417
|
href: this.getTransformedUrl(this.props.to),
|
|
@@ -424,7 +424,7 @@
|
|
|
424
424
|
var s = this.props, p = s.children, d = O(s, [ "children" ]);
|
|
425
425
|
if (this.props.disabled && this.props.to != null) {
|
|
426
426
|
|
|
427
|
-
return r().createElement(
|
|
427
|
+
return r().createElement(v, C({
|
|
428
428
|
"data-test": "clickable",
|
|
429
429
|
ref: this.handleMount,
|
|
430
430
|
role: "link",
|
|
@@ -433,15 +433,17 @@
|
|
|
433
433
|
}
|
|
434
434
|
}
|
|
435
435
|
// button variant
|
|
436
|
-
var
|
|
436
|
+
var b = this.props, y = b.children, h = b.onClick, m = b.disabled, k = b.type, g = O(b, [ "children", "onClick", "disabled", "type" ]);
|
|
437
437
|
|
|
438
|
-
return r().createElement(
|
|
438
|
+
return r().createElement(v, C({
|
|
439
439
|
as: "button",
|
|
440
|
+
"aria-disabled": m === "dimmed" || undefined,
|
|
440
441
|
"data-test": "clickable",
|
|
441
442
|
ref: this.handleMount,
|
|
442
|
-
type:
|
|
443
|
-
|
|
444
|
-
|
|
443
|
+
type: k || "button",
|
|
444
|
+
disabled: m === true,
|
|
445
|
+
onClick: h && !m ? t : undefined
|
|
446
|
+
}, f()(g, "elementRef", "openInNewContext", "to")), y);
|
|
445
447
|
}
|
|
446
448
|
} ]);
|
|
447
449
|
return n;
|