@splunk/react-ui 4.28.1 → 4.28.2
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/Modal.js +9 -3
- package/ModalLayer.js +84 -84
- package/SidePanel.js +29 -28
- package/Table.js +369 -341
- package/WaitSpinner.js +20 -20
- package/package.json +1 -1
- package/types/src/Modal/Modal.d.ts +8 -3
- package/types/src/ModalLayer/ModalLayer.d.ts +14 -14
- package/types/src/SidePanel/SidePanel.d.ts +2 -2
- package/types/src/WaitSpinner/WaitSpinner.d.ts +1 -1
package/WaitSpinner.js
CHANGED
|
@@ -67,8 +67,8 @@
|
|
|
67
67
|
const r = require("react");
|
|
68
68
|
var i = e.n(r);
|
|
69
69
|
// CONCATENATED MODULE: external "prop-types"
|
|
70
|
-
const
|
|
71
|
-
var
|
|
70
|
+
const n = require("prop-types");
|
|
71
|
+
var a = e.n(n);
|
|
72
72
|
// CONCATENATED MODULE: external "@splunk/react-ui/AnimationToggle"
|
|
73
73
|
const s = require("@splunk/react-ui/AnimationToggle");
|
|
74
74
|
// CONCATENATED MODULE: external "@splunk/themes"
|
|
@@ -160,11 +160,11 @@
|
|
|
160
160
|
function x(e, t) {
|
|
161
161
|
if (e == null) return {};
|
|
162
162
|
var r = S(e, t);
|
|
163
|
-
var i,
|
|
163
|
+
var i, n;
|
|
164
164
|
if (Object.getOwnPropertySymbols) {
|
|
165
|
-
var
|
|
166
|
-
for (
|
|
167
|
-
i = n
|
|
165
|
+
var a = Object.getOwnPropertySymbols(e);
|
|
166
|
+
for (n = 0; n < a.length; n++) {
|
|
167
|
+
i = a[n];
|
|
168
168
|
if (t.indexOf(i) >= 0) continue;
|
|
169
169
|
if (!Object.prototype.propertyIsEnumerable.call(e, i)) continue;
|
|
170
170
|
r[i] = e[i];
|
|
@@ -176,21 +176,21 @@
|
|
|
176
176
|
if (e == null) return {};
|
|
177
177
|
var r = {};
|
|
178
178
|
var i = Object.keys(e);
|
|
179
|
-
var
|
|
180
|
-
for (
|
|
181
|
-
|
|
182
|
-
if (t.indexOf(
|
|
183
|
-
r[
|
|
179
|
+
var n, a;
|
|
180
|
+
for (a = 0; a < i.length; a++) {
|
|
181
|
+
n = i[a];
|
|
182
|
+
if (t.indexOf(n) >= 0) continue;
|
|
183
|
+
r[n] = e[n];
|
|
184
184
|
}
|
|
185
185
|
return r;
|
|
186
186
|
}
|
|
187
|
-
var
|
|
188
|
-
elementRef:
|
|
189
|
-
screenReaderText:
|
|
190
|
-
size:
|
|
187
|
+
var O = {
|
|
188
|
+
elementRef: a().oneOfType([ a().func, a().object ]),
|
|
189
|
+
screenReaderText: a().oneOfType([ a().string, a().oneOf([ "null" ]) ]),
|
|
190
|
+
size: a().oneOf([ "small", "medium", "large" ])
|
|
191
191
|
};
|
|
192
|
-
function
|
|
193
|
-
var t = e.elementRef, r = e.screenReaderText,
|
|
192
|
+
function z(e) {
|
|
193
|
+
var t = e.elementRef, r = e.screenReaderText, n = r === void 0 ? (0, l._)("Waiting") : r, a = e.size, c = a === void 0 ? "small" : a, m = x(e, [ "elementRef", "screenReaderText", "size" ]);
|
|
194
194
|
// @docs-props-type WaitSpinnerPropsBase
|
|
195
195
|
var f = (0, s.useAnimationToggle)() === "on";
|
|
196
196
|
var d = (0, o.useSplunkTheme)(), u = d.isPrisma;
|
|
@@ -205,7 +205,7 @@
|
|
|
205
205
|
ref: t,
|
|
206
206
|
$animated: f,
|
|
207
207
|
$size: c
|
|
208
|
-
},
|
|
208
|
+
}, n && i().createElement("title", null, n), i().createElement("g", null, u ? i().createElement(i().Fragment, null, i().createElement(g, {
|
|
209
209
|
r: "19",
|
|
210
210
|
cx: "20",
|
|
211
211
|
cy: "20",
|
|
@@ -223,8 +223,8 @@
|
|
|
223
223
|
r: "8.5"
|
|
224
224
|
}))));
|
|
225
225
|
}
|
|
226
|
-
|
|
227
|
-
/* harmony default export */ const _ =
|
|
226
|
+
z.propTypes = O;
|
|
227
|
+
/* harmony default export */ const _ = z;
|
|
228
228
|
// CONCATENATED MODULE: ./src/WaitSpinner/index.ts
|
|
229
229
|
module.exports = t;
|
|
230
230
|
/******/})();
|
package/package.json
CHANGED
|
@@ -19,6 +19,11 @@ interface ModalPropsBase {
|
|
|
19
19
|
* `Modal.Header`, `Modal.Body`, and `Modal.Footer`.
|
|
20
20
|
*/
|
|
21
21
|
children?: React.ReactNode;
|
|
22
|
+
/**
|
|
23
|
+
* @private
|
|
24
|
+
* Set to 'true' to enable closing the Modal by clicking outside of it.
|
|
25
|
+
*/
|
|
26
|
+
closeOnClickAway?: boolean;
|
|
22
27
|
/**
|
|
23
28
|
* Show dividers between header, body and footer.
|
|
24
29
|
*/
|
|
@@ -52,7 +57,7 @@ interface ModalPropsBase {
|
|
|
52
57
|
focus: () => void;
|
|
53
58
|
}) | HTMLElement | null> | (() => void);
|
|
54
59
|
}
|
|
55
|
-
declare const defaultProps: Required<Pick<ModalPropsBase, '
|
|
60
|
+
declare const defaultProps: Required<Pick<ModalPropsBase, 'closeOnClickAway' | 'divider' | 'initialFocus' | 'open'>>;
|
|
56
61
|
declare type ModalProps = ClassComponentProps<ModalPropsBase, typeof defaultProps, 'div'>;
|
|
57
62
|
declare class Modal extends Component<ModalProps> {
|
|
58
63
|
private el;
|
|
@@ -60,8 +65,8 @@ declare class Modal extends Component<ModalProps> {
|
|
|
60
65
|
private initialFocus;
|
|
61
66
|
private headerTitleId;
|
|
62
67
|
private headerSubtitleId;
|
|
63
|
-
static propTypes: React.WeakValidationMap<ClassComponentProps<ModalPropsBase, Required<Pick<ModalPropsBase, "open" | "divider" | "initialFocus">>, "div", never>>;
|
|
64
|
-
static defaultProps: Required<Pick<ModalPropsBase, "open" | "divider" | "initialFocus">>;
|
|
68
|
+
static propTypes: React.WeakValidationMap<ClassComponentProps<ModalPropsBase, Required<Pick<ModalPropsBase, "open" | "divider" | "closeOnClickAway" | "initialFocus">>, "div", never>>;
|
|
69
|
+
static defaultProps: Required<Pick<ModalPropsBase, "open" | "divider" | "closeOnClickAway" | "initialFocus">>;
|
|
65
70
|
static Header: typeof Header;
|
|
66
71
|
static Body: typeof Body;
|
|
67
72
|
static Footer: typeof Footer;
|
|
@@ -10,6 +10,11 @@ declare type ModalLayerRequestCloseHandler = (data: {
|
|
|
10
10
|
reason: 'clickAway' | 'escapeKey';
|
|
11
11
|
}) => void;
|
|
12
12
|
interface ModalLayerPropsBase {
|
|
13
|
+
/**
|
|
14
|
+
* Indicate whether the animation of the children is still running.
|
|
15
|
+
* If true, the ModalLayer should not close.
|
|
16
|
+
*/
|
|
17
|
+
childrenInAnimation?: boolean;
|
|
13
18
|
/**
|
|
14
19
|
* A function that returns a default style object for react-spring. The values will be
|
|
15
20
|
* used as initial values.
|
|
@@ -20,32 +25,27 @@ interface ModalLayerPropsBase {
|
|
|
20
25
|
* will be passed to `renderModal`.
|
|
21
26
|
*/
|
|
22
27
|
getMotionStyle?: () => AdditionalInterpolationProperties;
|
|
23
|
-
/**
|
|
24
|
-
* Indicate whether the animation of the children is still running.
|
|
25
|
-
* If true, the ModalLayer should not close.
|
|
26
|
-
*/
|
|
27
|
-
childrenInAnimation?: boolean;
|
|
28
28
|
/**
|
|
29
29
|
* A function that will be called when a close event occurs.
|
|
30
30
|
* The callback will be passed a reason (either 'escapeKey', 'clickAway') and the event.
|
|
31
31
|
*/
|
|
32
32
|
onRequestClose?: ModalLayerRequestCloseHandler;
|
|
33
|
+
/**
|
|
34
|
+
* Indicates whether the modal is currently open.
|
|
35
|
+
*/
|
|
36
|
+
open?: boolean;
|
|
33
37
|
/**
|
|
34
38
|
* Function that renders the modal. It is passed the current style object as interpolated by react-spring,
|
|
35
39
|
* and is expected to return renderable content.
|
|
36
40
|
*/
|
|
37
41
|
renderModal: ModalLayerRenderModalHandler;
|
|
38
42
|
/**
|
|
39
|
-
*
|
|
40
|
-
*
|
|
43
|
+
* The non-hidden overlay mask covers the entire page, blocks other interactions while the Modal is open.
|
|
44
|
+
* If set to `interactive`, clicking on the scrim will close the Modal.
|
|
41
45
|
*/
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Indicates whether the modal is currently open.
|
|
45
|
-
*/
|
|
46
|
-
open?: boolean;
|
|
46
|
+
scrim?: 'visible' | 'hidden' | 'interactive';
|
|
47
47
|
}
|
|
48
|
-
declare const defaultProps: Required<Pick<ModalLayerPropsBase, 'childrenInAnimation' | 'open' | '
|
|
48
|
+
declare const defaultProps: Required<Pick<ModalLayerPropsBase, 'childrenInAnimation' | 'open' | 'scrim'>>;
|
|
49
49
|
declare type ModalLayerProps = ModalLayerPropsBase & typeof defaultProps;
|
|
50
50
|
interface ModalLayerState {
|
|
51
51
|
animating: boolean;
|
|
@@ -53,7 +53,7 @@ interface ModalLayerState {
|
|
|
53
53
|
}
|
|
54
54
|
declare class ModalLayer extends Component<ModalLayerProps, ModalLayerState> {
|
|
55
55
|
static propTypes: React.WeakValidationMap<ModalLayerProps>;
|
|
56
|
-
static defaultProps: Required<Pick<ModalLayerPropsBase, "open" | "childrenInAnimation" | "
|
|
56
|
+
static defaultProps: Required<Pick<ModalLayerPropsBase, "open" | "childrenInAnimation" | "scrim">>;
|
|
57
57
|
static getDerivedStateFromProps: React.GetDerivedStateFromProps<ModalLayerProps, ModalLayerState>;
|
|
58
58
|
private allowAnimationUpdates;
|
|
59
59
|
constructor(props: Readonly<ModalLayerProps>);
|
|
@@ -66,8 +66,8 @@ interface SidePanelState {
|
|
|
66
66
|
prevOpen: boolean;
|
|
67
67
|
}
|
|
68
68
|
declare class SidePanel extends Component<SidePanelProps, SidePanelState> {
|
|
69
|
-
static propTypes: React.WeakValidationMap<ClassComponentProps<SidePanelPropsBase, Required<Pick<SidePanelPropsBase, "open" | "
|
|
70
|
-
static defaultProps: Required<Pick<SidePanelPropsBase, "open" | "
|
|
69
|
+
static propTypes: React.WeakValidationMap<ClassComponentProps<SidePanelPropsBase, Required<Pick<SidePanelPropsBase, "open" | "dockPosition" | "useLayerForClickAway">>, "div", never>>;
|
|
70
|
+
static defaultProps: Required<Pick<SidePanelPropsBase, "open" | "dockPosition" | "useLayerForClickAway">>;
|
|
71
71
|
static getDerivedStateFromProps: React.GetDerivedStateFromProps<SidePanelProps, SidePanelState>;
|
|
72
72
|
constructor(props: Readonly<SidePanelProps>);
|
|
73
73
|
private handlePanelAnimationEnd;
|
|
@@ -9,7 +9,7 @@ interface WaitSpinnerPropsBase {
|
|
|
9
9
|
elementRef?: React.Ref<SVGSVGElement>;
|
|
10
10
|
/** A string to display to screen readers. Set the prop to `null` or an empty string to hide the
|
|
11
11
|
* spinner from screen readers, such as when there is already a text label beside it. */
|
|
12
|
-
screenReaderText?: string;
|
|
12
|
+
screenReaderText?: string | null;
|
|
13
13
|
/**
|
|
14
14
|
* Size of WaitSpinner.
|
|
15
15
|
* `large` is not supported in enterprise themes; falls back to `medium`.
|