@splunk/react-ui 4.30.0 → 4.31.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/CHANGELOG.md +8 -0
- package/Divider.js +96 -45
- package/Link.js +14 -14
- package/ModalLayer.js +2 -1
- package/SidePanel.js +1 -1
- package/package.json +3 -3
- package/types/src/Divider/Divider.d.ts +7 -2
- package/types/src/Divider/docs/examples/Decorative.d.ts +2 -0
- package/types/src/Divider/docs/examples/AriaHidden.d.ts +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
Change Log
|
|
2
2
|
============
|
|
3
3
|
|
|
4
|
+
4.31.0 - May 16, 2024
|
|
5
|
+
----------
|
|
6
|
+
New Features:
|
|
7
|
+
* `Divider` has a new `decorative` prop for disabling the default semantics of `role="separator"`.
|
|
8
|
+
|
|
9
|
+
Bug Fixes:
|
|
10
|
+
* `SidePanel` incorrectly rendered the overlay mask when `useLayerForClickAway={false}`. This has been fixed (SUI-6260).
|
|
11
|
+
|
|
4
12
|
4.30.0 - May 6, 2024
|
|
5
13
|
----------
|
|
6
14
|
New Features:
|
package/Divider.js
CHANGED
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
/******/ (() => {
|
|
25
25
|
/******/ // define getter functions for harmony exports
|
|
26
26
|
/******/ e.d = (r, t) => {
|
|
27
|
-
/******/ for (var
|
|
28
|
-
/******/ if (e.o(t,
|
|
29
|
-
/******/ Object.defineProperty(r,
|
|
27
|
+
/******/ for (var n in t) {
|
|
28
|
+
/******/ if (e.o(t, n) && !e.o(r, n)) {
|
|
29
|
+
/******/ Object.defineProperty(r, n, {
|
|
30
30
|
enumerable: true,
|
|
31
|
-
get: t[
|
|
31
|
+
get: t[n]
|
|
32
32
|
});
|
|
33
33
|
/******/ }
|
|
34
34
|
/******/ }
|
|
@@ -61,89 +61,140 @@
|
|
|
61
61
|
e.r(r);
|
|
62
62
|
// EXPORTS
|
|
63
63
|
e.d(r, {
|
|
64
|
-
default: () => /* reexport */
|
|
64
|
+
default: () => /* reexport */ j
|
|
65
65
|
});
|
|
66
66
|
// CONCATENATED MODULE: external "react"
|
|
67
67
|
const t = require("react");
|
|
68
|
-
var
|
|
68
|
+
var n = e.n(t);
|
|
69
69
|
// CONCATENATED MODULE: external "prop-types"
|
|
70
|
-
const
|
|
71
|
-
var i = e.n(
|
|
70
|
+
const o = require("prop-types");
|
|
71
|
+
var i = e.n(o);
|
|
72
72
|
// CONCATENATED MODULE: external "styled-components"
|
|
73
73
|
const a = require("styled-components");
|
|
74
74
|
var l = e.n(a);
|
|
75
75
|
// CONCATENATED MODULE: external "@splunk/themes"
|
|
76
|
-
const
|
|
76
|
+
const c = require("@splunk/themes");
|
|
77
77
|
// CONCATENATED MODULE: ./src/Divider/DividerStyles.ts
|
|
78
|
-
var
|
|
78
|
+
var u = l().hr.withConfig({
|
|
79
79
|
displayName: "DividerStyles__StyledRule",
|
|
80
80
|
componentId: "gl6kyz-0"
|
|
81
|
-
})([ "", ";", ";border-color:", ";" ],
|
|
81
|
+
})([ "", ";", ";border-color:", ";" ], c.mixins.reset("block"), (0, c.pickVariant)("$orientation", {
|
|
82
82
|
horizontal: (0, a.css)([ "border-top-style:solid;border-width:1px;" ]),
|
|
83
83
|
vertical: (0, a.css)([ "display:inline;border-left-style:solid;border-width:1px;" ])
|
|
84
|
-
}), (0,
|
|
85
|
-
enterprise:
|
|
86
|
-
prisma:
|
|
84
|
+
}), (0, c.pick)({
|
|
85
|
+
enterprise: c.variables.borderColor,
|
|
86
|
+
prisma: c.variables.neutral200
|
|
87
87
|
}));
|
|
88
88
|
// CONCATENATED MODULE: ./src/Divider/Divider.tsx
|
|
89
|
-
function
|
|
90
|
-
|
|
89
|
+
function s() {
|
|
90
|
+
s = Object.assign || function(e) {
|
|
91
91
|
for (var r = 1; r < arguments.length; r++) {
|
|
92
92
|
var t = arguments[r];
|
|
93
|
-
for (var
|
|
94
|
-
if (Object.prototype.hasOwnProperty.call(t,
|
|
95
|
-
e[
|
|
93
|
+
for (var n in t) {
|
|
94
|
+
if (Object.prototype.hasOwnProperty.call(t, n)) {
|
|
95
|
+
e[n] = t[n];
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
return e;
|
|
100
100
|
};
|
|
101
|
-
return
|
|
101
|
+
return s.apply(this, arguments);
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function f(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 p(e) {
|
|
115
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
116
|
+
var t = arguments[r] != null ? arguments[r] : {};
|
|
117
|
+
if (r % 2) {
|
|
118
|
+
f(Object(t), true).forEach((function(r) {
|
|
119
|
+
b(e, r, t[r]);
|
|
120
|
+
}));
|
|
121
|
+
} else if (Object.getOwnPropertyDescriptors) {
|
|
122
|
+
Object.defineProperties(e, Object.getOwnPropertyDescriptors(t));
|
|
123
|
+
} else {
|
|
124
|
+
f(Object(t)).forEach((function(r) {
|
|
125
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
126
|
+
}));
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return e;
|
|
130
|
+
}
|
|
131
|
+
function b(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 d(e, r) {
|
|
104
145
|
if (e == null) return {};
|
|
105
|
-
var t =
|
|
106
|
-
var
|
|
146
|
+
var t = y(e, r);
|
|
147
|
+
var n, o;
|
|
107
148
|
if (Object.getOwnPropertySymbols) {
|
|
108
149
|
var i = Object.getOwnPropertySymbols(e);
|
|
109
|
-
for (
|
|
110
|
-
|
|
111
|
-
if (r.indexOf(
|
|
112
|
-
if (!Object.prototype.propertyIsEnumerable.call(e,
|
|
113
|
-
t[
|
|
150
|
+
for (o = 0; o < i.length; o++) {
|
|
151
|
+
n = i[o];
|
|
152
|
+
if (r.indexOf(n) >= 0) continue;
|
|
153
|
+
if (!Object.prototype.propertyIsEnumerable.call(e, n)) continue;
|
|
154
|
+
t[n] = e[n];
|
|
114
155
|
}
|
|
115
156
|
}
|
|
116
157
|
return t;
|
|
117
158
|
}
|
|
118
|
-
function
|
|
159
|
+
function y(e, r) {
|
|
119
160
|
if (e == null) return {};
|
|
120
161
|
var t = {};
|
|
121
|
-
var
|
|
122
|
-
var
|
|
123
|
-
for (i = 0; i <
|
|
124
|
-
|
|
125
|
-
if (r.indexOf(
|
|
126
|
-
t[
|
|
162
|
+
var n = Object.keys(e);
|
|
163
|
+
var o, i;
|
|
164
|
+
for (i = 0; i < n.length; i++) {
|
|
165
|
+
o = n[i];
|
|
166
|
+
if (r.indexOf(o) >= 0) continue;
|
|
167
|
+
t[o] = e[o];
|
|
127
168
|
}
|
|
128
169
|
return t;
|
|
129
170
|
}
|
|
130
|
-
var
|
|
171
|
+
var v = {
|
|
131
172
|
elementRef: i().oneOfType([ i().func, i().object ]),
|
|
173
|
+
decorative: i().bool,
|
|
132
174
|
orientation: i().oneOf([ "horizontal", "vertical" ])
|
|
133
175
|
};
|
|
134
|
-
function
|
|
135
|
-
var r = e.elementRef, t = e.
|
|
176
|
+
function O(e) {
|
|
177
|
+
var r = e.elementRef, t = e.decorative, o = t === void 0 ? false : t, i = e.orientation, a = i === void 0 ? "horizontal" : i, l = d(e, [ "elementRef", "decorative", "orientation" ]);
|
|
136
178
|
// @docs-props-type DividerPropsBase
|
|
137
|
-
|
|
138
|
-
return o().createElement(c, u({
|
|
179
|
+
var c = p({
|
|
139
180
|
"data-test": "divider",
|
|
140
181
|
ref: r,
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
182
|
+
$orientation: a
|
|
183
|
+
}, l);
|
|
184
|
+
// aria-orientation is not needed when decorative and div is used to have no semantics
|
|
185
|
+
if (o) {
|
|
186
|
+
|
|
187
|
+
return n().createElement(u, s({
|
|
188
|
+
as: "div"
|
|
189
|
+
}, c));
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
return n().createElement(u, s({
|
|
193
|
+
"aria-orientation": a
|
|
194
|
+
}, c));
|
|
144
195
|
}
|
|
145
|
-
|
|
146
|
-
/* harmony default export */ const
|
|
196
|
+
O.propTypes = v;
|
|
197
|
+
/* harmony default export */ const j = O;
|
|
147
198
|
// CONCATENATED MODULE: ./src/Divider/index.ts
|
|
148
199
|
module.exports = r;
|
|
149
200
|
/******/})();
|
package/Link.js
CHANGED
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
var k = f()(S()).withConfig({
|
|
112
112
|
displayName: "LinkStyles__StyledClickable",
|
|
113
113
|
componentId: "sc-1hhltcf-0"
|
|
114
|
-
})([ "", ";color:", ";text-decoration:none;font-size:inherit;font-weight:inherit;line-height:inherit;border-radius:", ";&:not([disabled],[aria-disabled='true']){cursor:pointer;", ";&:focus{box-shadow:", ";outline:0;&:active{box-shadow:none;}}}&[disabled],&[aria-disabled='true']{color:", ";}
|
|
114
|
+
})([ "", ";color:", ";text-decoration:none;font-size:inherit;font-weight:inherit;line-height:inherit;border-radius:", ";&:not([disabled],[aria-disabled='true']){cursor:pointer;", ";&:focus{box-shadow:", ";outline:0;&:active{box-shadow:none;}}}&[disabled],&[aria-disabled='true']{color:", ";}" ], v.mixins.reset("inline"), (0,
|
|
115
115
|
v.pick)({
|
|
116
116
|
enterprise: v.variables.linkColor,
|
|
117
117
|
prisma: v.variables.interactiveColorPrimary
|
|
@@ -217,11 +217,11 @@
|
|
|
217
217
|
return I(e, t);
|
|
218
218
|
}
|
|
219
219
|
function N(e) {
|
|
220
|
-
var t =
|
|
220
|
+
var t = A();
|
|
221
221
|
return function n() {
|
|
222
|
-
var r =
|
|
222
|
+
var r = L(e), o;
|
|
223
223
|
if (t) {
|
|
224
|
-
var i =
|
|
224
|
+
var i = L(this).constructor;
|
|
225
225
|
o = Reflect.construct(r, arguments, i);
|
|
226
226
|
} else {
|
|
227
227
|
o = r.apply(this, arguments);
|
|
@@ -241,7 +241,7 @@
|
|
|
241
241
|
}
|
|
242
242
|
return e;
|
|
243
243
|
}
|
|
244
|
-
function
|
|
244
|
+
function A() {
|
|
245
245
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
246
246
|
if (Reflect.construct.sham) return false;
|
|
247
247
|
if (typeof Proxy === "function") return true;
|
|
@@ -252,13 +252,13 @@
|
|
|
252
252
|
return false;
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
|
-
function
|
|
256
|
-
|
|
255
|
+
function L(e) {
|
|
256
|
+
L = Object.setPrototypeOf ? Object.getPrototypeOf : function e(t) {
|
|
257
257
|
return t.__proto__ || Object.getPrototypeOf(t);
|
|
258
258
|
};
|
|
259
|
-
return
|
|
259
|
+
return L(e);
|
|
260
260
|
}
|
|
261
|
-
function
|
|
261
|
+
function z(e, t, n) {
|
|
262
262
|
if (t in e) {
|
|
263
263
|
Object.defineProperty(e, t, {
|
|
264
264
|
value: n,
|
|
@@ -298,8 +298,8 @@
|
|
|
298
298
|
o[i] = arguments[i];
|
|
299
299
|
}
|
|
300
300
|
e = t.call.apply(t, [ this ].concat(o));
|
|
301
|
-
|
|
302
|
-
|
|
301
|
+
z(D(e), "component", null);
|
|
302
|
+
z(D(e), "handleMount", (function(t) {
|
|
303
303
|
e.component = t;
|
|
304
304
|
}));
|
|
305
305
|
return e;
|
|
@@ -333,9 +333,9 @@
|
|
|
333
333
|
} ]);
|
|
334
334
|
return n;
|
|
335
335
|
}(n.Component);
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
336
|
+
z(H, "propTypes", B);
|
|
337
|
+
z(H, "defaultProps", F);
|
|
338
|
+
z(H, u.legacyRefMode, true);
|
|
339
339
|
/* harmony default export */ const J = H;
|
|
340
340
|
// CONCATENATED MODULE: ./src/Link/index.ts
|
|
341
341
|
module.exports = t;
|
package/ModalLayer.js
CHANGED
|
@@ -262,6 +262,7 @@
|
|
|
262
262
|
R(k(o), "renderLayer", (function() {
|
|
263
263
|
var e = o.props, t = e.getDefaultMotionStyle, n = e.getMotionStyle, i = e.renderModal, c = e.scrim;
|
|
264
264
|
var l = o.props.open || o.state.animating;
|
|
265
|
+
var u = l && c !== "hidden";
|
|
265
266
|
|
|
266
267
|
return r().createElement(a.Spring, {
|
|
267
268
|
from: m(m({}, t === null || t === void 0 ? void 0 : t()), {}, {
|
|
@@ -277,7 +278,7 @@
|
|
|
277
278
|
|
|
278
279
|
return r().createElement("div", null,
|
|
279
280
|
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
280
|
-
i(e),
|
|
281
|
+
i(e), u && r().createElement(d, {
|
|
281
282
|
"data-test": "modal-overlay",
|
|
282
283
|
onMouseDown: c === "interactive" ? o.handleClickAway : undefined,
|
|
283
284
|
key: "clickAway",
|
package/SidePanel.js
CHANGED
|
@@ -364,7 +364,7 @@
|
|
|
364
364
|
value: function e() {
|
|
365
365
|
var t = this.props, r = t.open, o = t.onRequestClose, i = t.useLayerForClickAway;
|
|
366
366
|
var a = this.state.panelAnimating;
|
|
367
|
-
var l = i ? "interactive" : "
|
|
367
|
+
var l = i ? "interactive" : "hidden";
|
|
368
368
|
|
|
369
369
|
return n().createElement(f(), {
|
|
370
370
|
childrenInAnimation: a,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@splunk/react-ui",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.31.0",
|
|
4
4
|
"description": "Library of React components that implement the Splunk design language",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Splunk Inc.",
|
|
@@ -61,9 +61,9 @@
|
|
|
61
61
|
"@babel/core": "^7.2.0",
|
|
62
62
|
"@babel/plugin-transform-runtime": "^7.18.6",
|
|
63
63
|
"@splunk/babel-preset": "^4.0.0",
|
|
64
|
-
"@splunk/docs-gen": "1.0.0-beta.
|
|
64
|
+
"@splunk/docs-gen": "1.0.0-beta.10",
|
|
65
65
|
"@splunk/eslint-config": "^4.0.0",
|
|
66
|
-
"@splunk/react-docs": "1.0.0-beta.
|
|
66
|
+
"@splunk/react-docs": "1.0.0-beta.14",
|
|
67
67
|
"@splunk/stylelint-config": "^4.0.0",
|
|
68
68
|
"@splunk/test-runner-utils": "^0.4.1",
|
|
69
69
|
"@splunk/webpack-configs": "^7.0.2",
|
|
@@ -8,12 +8,17 @@ interface DividerPropsBase {
|
|
|
8
8
|
elementRef?: React.Ref<HTMLHRElement>;
|
|
9
9
|
/** Sets the orientation of this `Divider`. */
|
|
10
10
|
orientation?: 'horizontal' | 'vertical';
|
|
11
|
+
/**
|
|
12
|
+
* Remove semantics of the divider.
|
|
13
|
+
*/
|
|
14
|
+
decorative?: boolean;
|
|
11
15
|
}
|
|
12
|
-
type DividerProps = ComponentProps<DividerPropsBase, 'hr'>;
|
|
13
|
-
declare function Divider({ elementRef, orientation, ...otherProps }: DividerProps): JSX.Element;
|
|
16
|
+
type DividerProps = ComponentProps<DividerPropsBase, 'hr' | 'div'>;
|
|
17
|
+
declare function Divider({ elementRef, decorative, orientation, ...otherProps }: DividerProps): JSX.Element;
|
|
14
18
|
declare namespace Divider {
|
|
15
19
|
var propTypes: {
|
|
16
20
|
elementRef: PropTypes.Requireable<object>;
|
|
21
|
+
decorative: PropTypes.Requireable<boolean>;
|
|
17
22
|
orientation: PropTypes.Requireable<string>;
|
|
18
23
|
};
|
|
19
24
|
}
|