@splunk/react-ui 4.41.0 → 4.43.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/ButtonGroup.js +1 -3
- package/CHANGELOG.md +47 -0
- package/Code.js +611 -426
- package/ComboBox.js +25 -32
- package/Date.js +21 -26
- package/Dropdown.js +33 -32
- package/JSONTree.js +30 -24
- package/Layer.js +115 -97
- package/Link.js +19 -21
- package/MIGRATION.mdx +48 -53
- package/Menu.js +7 -2
- package/MessageBar.js +54 -56
- package/Multiselect.js +1051 -1035
- package/Number.js +424 -395
- package/Paginator.js +269 -251
- package/Popover.js +595 -526
- package/RadioList.js +44 -43
- package/Resize.js +61 -61
- package/ResultsMenu.d.ts +2 -0
- package/ResultsMenu.js +4 -4
- package/Scroll.js +482 -475
- package/Search.js +56 -65
- package/Select.js +532 -513
- package/TabBar.js +4 -0
- package/Table.js +1519 -1437
- package/Text.js +29 -17
- package/TextArea.js +37 -37
- package/Tooltip.js +300 -207
- package/TransitionOpen.js +16 -14
- package/Tree.js +20 -14
- package/package.json +7 -7
- package/types/src/Button/Button.d.ts +1 -0
- package/types/src/ButtonGroup/ButtonGroup.d.ts +0 -4
- package/types/src/Code/Code.d.ts +1 -1
- package/types/src/ComboBox/ComboBox.d.ts +6 -3
- package/types/src/Date/Date.d.ts +0 -1
- package/types/src/Dropdown/Dropdown.d.ts +2 -1
- package/types/src/Dropdown/docs/examples/TooltipButtonToggle.d.ts +2 -0
- package/types/src/Layer/Layer.d.ts +2 -1
- package/types/src/Link/Link.d.ts +0 -2
- package/types/src/Multiselect/Multiselect.d.ts +2 -0
- package/types/src/Number/Number.d.ts +11 -10
- package/types/src/Number/utils.d.ts +29 -0
- package/types/src/Paginator/Paginator.d.ts +15 -2
- package/types/src/Paginator/docs/examples/CustomPages.d.ts +2 -0
- package/types/src/Popover/Popover.d.ts +18 -12
- package/types/src/Popover/PopoverMenuContext.d.ts +6 -0
- package/types/src/Popover/PopoverProvider.d.ts +23 -0
- package/types/src/Popover/index.d.ts +2 -1
- package/types/src/RadioList/RadioList.d.ts +1 -1
- package/types/src/Resize/Resize.d.ts +0 -11
- package/types/src/Scroll/Inner.d.ts +17 -19
- package/types/src/Select/SelectBase.d.ts +7 -5
- package/types/src/Select/docs/examples/Appearance.d.ts +1 -11
- package/types/src/Select/docs/examples/Basic.d.ts +1 -9
- package/types/src/Select/docs/examples/Children.d.ts +1 -9
- package/types/src/Select/docs/examples/Descriptions.d.ts +1 -9
- package/types/src/Select/docs/examples/Fetching.d.ts +1 -22
- package/types/src/Select/docs/examples/Filter.d.ts +1 -9
- package/types/src/Select/docs/examples/Headings.d.ts +1 -9
- package/types/src/Select/docs/examples/LoadMoreOnScrollBottom.d.ts +1 -24
- package/types/src/Select/docs/examples/Prefix.d.ts +1 -9
- package/types/src/Select/docs/examples/Truncate.d.ts +1 -9
- package/types/src/Table/ExpandButton.d.ts +8 -0
- package/types/src/Table/HeadDropdownCell.d.ts +2 -0
- package/types/src/Table/HeadInner.d.ts +5 -1
- package/types/src/Table/Row.d.ts +8 -2
- package/types/src/Table/docs/examples/Click.d.ts +2 -16
- package/types/src/Table/docs/examples/ClickRows.d.ts +2 -16
- package/types/src/Table/docs/examples/Complex.d.ts +2 -50
- package/types/src/Table/docs/examples/FilterColumnValues.d.ts +1 -13
- package/types/src/Table/docs/examples/HeadDropdownCell.d.ts +1 -17
- package/types/src/Table/docs/examples/ReorderColumns.d.ts +2 -21
- package/types/src/Table/docs/examples/ReorderRows.d.ts +2 -21
- package/types/src/Table/docs/examples/Resizable.d.ts +2 -23
- package/types/src/Table/docs/examples/ResizableFill.d.ts +2 -23
- package/types/src/Table/docs/examples/RowActions.d.ts +2 -39
- package/types/src/Table/docs/examples/Selectable.d.ts +2 -18
- package/types/src/Table/docs/examples/SortableColumns.d.ts +1 -11
- package/types/src/Tooltip/Tooltip.d.ts +38 -5
- package/types/src/Tooltip/docs/examples/CustomProps.d.ts +2 -0
- package/types/src/Tooltip/docs/examples/Toggletip.d.ts +2 -0
- package/types/src/useControlled/useControlled.d.ts +5 -4
- package/useControlled.js +37 -15
- package/usePrevious.js +62 -30
- package/useResizeObserver.js +122 -90
- package/useRovingFocus.js +5 -4
- package/types/src/Dropdown/docs/examples/OtherToggles.d.ts +0 -2
- package/types/src/Popover/PopoverContext.d.ts +0 -6
- package/types/src/Table/icons/ExpansionRow.d.ts +0 -6
- package/types/src/Tooltip/docs/examples/CustomContent.d.ts +0 -2
package/Layer.js
CHANGED
|
@@ -73,10 +73,10 @@
|
|
|
73
73
|
e.r(t);
|
|
74
74
|
// EXPORTS
|
|
75
75
|
e.d(t, {
|
|
76
|
-
LayerContext: () => /* reexport */
|
|
77
|
-
LayerStackContext: () => /* reexport */
|
|
78
|
-
LayerStackGlobalProvider: () => /* reexport */
|
|
79
|
-
default: () => /* reexport */
|
|
76
|
+
LayerContext: () => /* reexport */ h,
|
|
77
|
+
LayerStackContext: () => /* reexport */ v,
|
|
78
|
+
LayerStackGlobalProvider: () => /* reexport */ b,
|
|
79
|
+
default: () => /* reexport */ I
|
|
80
80
|
});
|
|
81
81
|
// CONCATENATED MODULE: external "react"
|
|
82
82
|
const n = require("react");
|
|
@@ -87,27 +87,25 @@
|
|
|
87
87
|
const i = require("prop-types");
|
|
88
88
|
var a = e.n(i);
|
|
89
89
|
// CONCATENATED MODULE: external "lodash/includes"
|
|
90
|
-
const
|
|
91
|
-
var
|
|
90
|
+
const l = require("lodash/includes");
|
|
91
|
+
var c = e.n(l);
|
|
92
92
|
// CONCATENATED MODULE: external "lodash/last"
|
|
93
|
-
const
|
|
94
|
-
var s = e.n(
|
|
93
|
+
const u = require("lodash/last");
|
|
94
|
+
var s = e.n(u);
|
|
95
95
|
// CONCATENATED MODULE: external "lodash/pull"
|
|
96
96
|
const p = require("lodash/pull");
|
|
97
97
|
var f = e.n(p);
|
|
98
|
-
// CONCATENATED MODULE: external "@splunk/ui-utils/keyboard"
|
|
99
|
-
const y = require("@splunk/ui-utils/keyboard");
|
|
100
98
|
// CONCATENATED MODULE: external "@splunk/react-ui/EventListener"
|
|
101
|
-
const
|
|
102
|
-
var
|
|
99
|
+
const y = require("@splunk/react-ui/EventListener");
|
|
100
|
+
var d = e.n(y);
|
|
103
101
|
// CONCATENATED MODULE: ./src/Layer/LayerStack.tsx
|
|
104
102
|
/**
|
|
105
103
|
* `LayerStackContext` is used to manage the array that `Layer` (and components that
|
|
106
104
|
* depend on it, such as `Modal`) uses to determine the order of open layers.
|
|
107
105
|
* @public
|
|
108
106
|
*/
|
|
109
|
-
var
|
|
110
|
-
var
|
|
107
|
+
var v = r().createContext([]);
|
|
108
|
+
var h = r().createContext({});
|
|
111
109
|
var m = {
|
|
112
110
|
children: a().node,
|
|
113
111
|
name: a().string,
|
|
@@ -119,10 +117,10 @@
|
|
|
119
117
|
* A `LayerStackContext` provider that stores a shared layer stack using a global variable.
|
|
120
118
|
* Applications should only use this provider if there's a known need to support multiple
|
|
121
119
|
* instances of this library on the same page.
|
|
122
|
-
*/ function
|
|
123
|
-
var o = t.children, i = t.name, a = i === void 0 ? "__splunkui_layer_instances__" : i,
|
|
124
|
-
if (!
|
|
125
|
-
|
|
120
|
+
*/ function b(t) {
|
|
121
|
+
var o = t.children, i = t.name, a = i === void 0 ? "__splunkui_layer_instances__" : i, l = t.scope, c = l === void 0 ? typeof window !== "undefined" ? window : e.g : l, u = t.separateStackingContexts, s = u === void 0 ? false : u;
|
|
122
|
+
if (!c[a]) {
|
|
123
|
+
c[a] = [];
|
|
126
124
|
// eslint-disable-line no-param-reassign
|
|
127
125
|
}
|
|
128
126
|
var p = (0, n.useMemo)((function() {
|
|
@@ -131,29 +129,29 @@
|
|
|
131
129
|
};
|
|
132
130
|
}), [ s ]);
|
|
133
131
|
|
|
134
|
-
return r().createElement(
|
|
135
|
-
value:
|
|
136
|
-
}, r().createElement(
|
|
132
|
+
return r().createElement(v.Provider, {
|
|
133
|
+
value: c[a]
|
|
134
|
+
}, r().createElement(h.Provider, {
|
|
137
135
|
value: p
|
|
138
136
|
}, o));
|
|
139
137
|
}
|
|
140
|
-
|
|
138
|
+
b.propTypes = m;
|
|
141
139
|
// CONCATENATED MODULE: external "styled-components"
|
|
142
|
-
const
|
|
143
|
-
var g = e.n(
|
|
140
|
+
const w = require("styled-components");
|
|
141
|
+
var g = e.n(w);
|
|
144
142
|
// CONCATENATED MODULE: external "@splunk/themes"
|
|
145
143
|
const C = require("@splunk/themes");
|
|
146
144
|
// CONCATENATED MODULE: ./src/Layer/LayerStyles.ts
|
|
147
|
-
var
|
|
145
|
+
var k = g().div.withConfig({
|
|
148
146
|
displayName: "LayerStyles__StyledLayer",
|
|
149
147
|
componentId: "ii6psl-0"
|
|
150
148
|
})([ "", "" ], (function(e) {
|
|
151
149
|
var t = e.$separateStackingContexts;
|
|
152
|
-
return t && (0,
|
|
150
|
+
return t && (0, w.css)([ "isolation:isolate;z-index:", ";" ], C.variables.zindexLayer);
|
|
153
151
|
}));
|
|
154
152
|
// CONCATENATED MODULE: ./src/utils/ssrDocument.ts
|
|
155
153
|
/* eslint-disable @typescript-eslint/no-empty-function */
|
|
156
|
-
var
|
|
154
|
+
var S = {
|
|
157
155
|
body: {
|
|
158
156
|
appendChild: function e() {
|
|
159
157
|
return [];
|
|
@@ -208,34 +206,34 @@
|
|
|
208
206
|
}
|
|
209
207
|
};
|
|
210
208
|
function E() {
|
|
211
|
-
var e = typeof document !== "undefined" ? document :
|
|
209
|
+
var e = typeof document !== "undefined" ? document : S;
|
|
212
210
|
return e;
|
|
213
211
|
}
|
|
214
212
|
// CONCATENATED MODULE: ./src/Layer/Layer.tsx
|
|
215
|
-
function
|
|
213
|
+
function O(e) {
|
|
216
214
|
"@babel/helpers - typeof";
|
|
217
|
-
return
|
|
215
|
+
return O = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
|
|
218
216
|
return typeof e;
|
|
219
217
|
} : function(e) {
|
|
220
218
|
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
221
|
-
},
|
|
219
|
+
}, O(e);
|
|
222
220
|
}
|
|
223
|
-
function
|
|
221
|
+
function j(e, t) {
|
|
224
222
|
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
|
|
225
223
|
}
|
|
226
|
-
function
|
|
224
|
+
function L(e, t) {
|
|
227
225
|
for (var n = 0; n < t.length; n++) {
|
|
228
226
|
var r = t[n];
|
|
229
227
|
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0),
|
|
230
|
-
Object.defineProperty(e,
|
|
228
|
+
Object.defineProperty(e, A(r.key), r);
|
|
231
229
|
}
|
|
232
230
|
}
|
|
233
|
-
function
|
|
234
|
-
return t &&
|
|
231
|
+
function P(e, t, n) {
|
|
232
|
+
return t && L(e.prototype, t), n && L(e, n), Object.defineProperty(e, "prototype", {
|
|
235
233
|
writable: !1
|
|
236
234
|
}), e;
|
|
237
235
|
}
|
|
238
|
-
function
|
|
236
|
+
function _(e, t) {
|
|
239
237
|
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
|
|
240
238
|
e.prototype = Object.create(t && t.prototype, {
|
|
241
239
|
constructor: {
|
|
@@ -245,103 +243,101 @@
|
|
|
245
243
|
}
|
|
246
244
|
}), Object.defineProperty(e, "prototype", {
|
|
247
245
|
writable: !1
|
|
248
|
-
}), t &&
|
|
246
|
+
}), t && T(e, t);
|
|
249
247
|
}
|
|
250
|
-
function
|
|
251
|
-
return
|
|
248
|
+
function T(e, t) {
|
|
249
|
+
return T = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
|
|
252
250
|
return e.__proto__ = t, e;
|
|
253
|
-
},
|
|
251
|
+
}, T(e, t);
|
|
254
252
|
}
|
|
255
|
-
function
|
|
256
|
-
var t =
|
|
253
|
+
function x(e) {
|
|
254
|
+
var t = D();
|
|
257
255
|
return function() {
|
|
258
|
-
var n, r =
|
|
256
|
+
var n, r = M(e);
|
|
259
257
|
if (t) {
|
|
260
|
-
var o =
|
|
258
|
+
var o = M(this).constructor;
|
|
261
259
|
n = Reflect.construct(r, arguments, o);
|
|
262
260
|
} else n = r.apply(this, arguments);
|
|
263
|
-
return
|
|
261
|
+
return q(this, n);
|
|
264
262
|
};
|
|
265
263
|
}
|
|
266
|
-
function
|
|
267
|
-
if (t && ("object" ==
|
|
264
|
+
function q(e, t) {
|
|
265
|
+
if (t && ("object" == O(t) || "function" == typeof t)) return t;
|
|
268
266
|
if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined");
|
|
269
|
-
return
|
|
267
|
+
return R(e);
|
|
270
268
|
}
|
|
271
|
-
function
|
|
269
|
+
function R(e) {
|
|
272
270
|
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
273
271
|
return e;
|
|
274
272
|
}
|
|
275
|
-
function
|
|
273
|
+
function D() {
|
|
276
274
|
try {
|
|
277
275
|
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
|
|
278
276
|
} catch (e) {}
|
|
279
|
-
return (
|
|
277
|
+
return (D = function t() {
|
|
280
278
|
return !!e;
|
|
281
279
|
})();
|
|
282
280
|
}
|
|
283
|
-
function
|
|
284
|
-
return
|
|
281
|
+
function M(e) {
|
|
282
|
+
return M = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
|
|
285
283
|
return e.__proto__ || Object.getPrototypeOf(e);
|
|
286
|
-
},
|
|
284
|
+
}, M(e);
|
|
287
285
|
}
|
|
288
|
-
function
|
|
289
|
-
return (t =
|
|
286
|
+
function N(e, t, n) {
|
|
287
|
+
return (t = A(t)) in e ? Object.defineProperty(e, t, {
|
|
290
288
|
value: n,
|
|
291
289
|
enumerable: !0,
|
|
292
290
|
configurable: !0,
|
|
293
291
|
writable: !0
|
|
294
292
|
}) : e[t] = n, e;
|
|
295
293
|
}
|
|
296
|
-
function
|
|
297
|
-
var t =
|
|
298
|
-
return "symbol" ==
|
|
294
|
+
function A(e) {
|
|
295
|
+
var t = K(e, "string");
|
|
296
|
+
return "symbol" == O(t) ? t : t + "";
|
|
299
297
|
}
|
|
300
|
-
function
|
|
301
|
-
if ("object" !=
|
|
298
|
+
function K(e, t) {
|
|
299
|
+
if ("object" != O(e) || !e) return e;
|
|
302
300
|
var n = e[Symbol.toPrimitive];
|
|
303
301
|
if (void 0 !== n) {
|
|
304
302
|
var r = n.call(e, t || "default");
|
|
305
|
-
if ("object" !=
|
|
303
|
+
if ("object" != O(r)) return r;
|
|
306
304
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
307
305
|
}
|
|
308
306
|
return ("string" === t ? String : Number)(e);
|
|
309
307
|
}
|
|
310
308
|
/** @public */
|
|
311
|
-
/** @public */ var
|
|
312
|
-
var
|
|
309
|
+
/** @public */ var W = [ "clickAway", "escapeKey" ];
|
|
310
|
+
var F = {
|
|
313
311
|
children: a().node,
|
|
314
|
-
closeReasons: a().arrayOf(a().oneOf(
|
|
312
|
+
closeReasons: a().arrayOf(a().oneOf(W)),
|
|
315
313
|
onRequestClose: a().func,
|
|
316
314
|
open: a().bool
|
|
317
315
|
};
|
|
318
|
-
var
|
|
319
|
-
closeReasons:
|
|
316
|
+
var B = {
|
|
317
|
+
closeReasons: W,
|
|
320
318
|
open: false
|
|
321
319
|
};
|
|
322
|
-
var
|
|
323
|
-
|
|
324
|
-
var t =
|
|
320
|
+
var z = function(e) {
|
|
321
|
+
_(n, e);
|
|
322
|
+
var t = x(n);
|
|
325
323
|
// @docs-props-type LayerPropsBase
|
|
326
324
|
// eslint-disable-next-line react/sort-comp
|
|
327
325
|
// LayerStackContext (an array) keeps track of the current instances of Layer. This is
|
|
328
326
|
// used by Layer#handleKeyDown to determine if the escapeKey event should be handled by
|
|
329
327
|
// the current instance. Only the topmost Layer instance should honor the escapeKey.
|
|
330
|
-
// TODO: enable once this is sorted out within the babel/ts ecosystem
|
|
331
|
-
// declare context: React.ContextType<typeof LayerStackContext>;
|
|
332
328
|
function n(e) {
|
|
333
329
|
var r;
|
|
334
|
-
|
|
330
|
+
j(this, n);
|
|
335
331
|
r = t.call(this, e);
|
|
336
|
-
|
|
337
|
-
|
|
332
|
+
N(R(r), "layerClickEvent", null);
|
|
333
|
+
N(R(r), "handleClickOnLayer", (function(e) {
|
|
338
334
|
var t = e.nativeEvent;
|
|
339
335
|
r.layerClickEvent = t;
|
|
340
336
|
}));
|
|
341
|
-
|
|
337
|
+
N(R(r), "handleClickOnWindow", (function(e) {
|
|
342
338
|
var t, n;
|
|
343
339
|
// clicks inside the layer should not be considered clickAways
|
|
344
|
-
if (!r.props.open || !
|
|
340
|
+
if (!r.props.open || !c()(r.props.closeReasons, "clickAway") || r.layerClickEvent === e) {
|
|
345
341
|
return;
|
|
346
342
|
}
|
|
347
343
|
(t = (n = r.props).onRequestClose) === null || t === void 0 ? void 0 : t.call(n, {
|
|
@@ -349,8 +345,8 @@
|
|
|
349
345
|
reason: "clickAway"
|
|
350
346
|
});
|
|
351
347
|
}));
|
|
352
|
-
|
|
353
|
-
if (r.props.open &&
|
|
348
|
+
N(R(r), "handleKeyDownOnWindow", (function(e) {
|
|
349
|
+
if (r.props.open && e.key === "Escape" && s()(r.getLayerStack()) === R(r) && c()(r.props.closeReasons, "escapeKey")) {
|
|
354
350
|
var t, n;
|
|
355
351
|
(t = (n = r.props).onRequestClose) === null || t === void 0 ? void 0 : t.call(n, {
|
|
356
352
|
event: e,
|
|
@@ -366,7 +362,7 @@
|
|
|
366
362
|
}
|
|
367
363
|
return r;
|
|
368
364
|
}
|
|
369
|
-
|
|
365
|
+
P(n, [ {
|
|
370
366
|
key: "componentDidMount",
|
|
371
367
|
value: function e() {
|
|
372
368
|
if (this.props.open) {
|
|
@@ -392,16 +388,25 @@
|
|
|
392
388
|
value: function e() {
|
|
393
389
|
return this.context;
|
|
394
390
|
}
|
|
395
|
-
|
|
391
|
+
// the fullscreen API does not render elements outside the fullscreen element
|
|
392
|
+
// Layer renders in document.body, which means that anything using Layer will not render in fullscreen
|
|
393
|
+
// this code moves the layer container into the fullscreen element, ensuring that it will render
|
|
394
|
+
}, {
|
|
396
395
|
key: "render",
|
|
397
396
|
value: function e() {
|
|
398
397
|
var t = this;
|
|
399
|
-
var i = this.props, a = i.children,
|
|
400
|
-
|
|
401
|
-
|
|
398
|
+
var i = this.props, a = i.children, l = i.open;
|
|
399
|
+
var c = r().createElement(d(), {
|
|
400
|
+
target: window,
|
|
401
|
+
eventType: "fullscreenchange",
|
|
402
|
+
listener: n.handleFullScreenChange,
|
|
403
|
+
key: "fullScreenChange"
|
|
404
|
+
});
|
|
405
|
+
if (l) {
|
|
406
|
+
var u = (0, o.createPortal)( r().createElement(h.Consumer, null, (function(e) {
|
|
402
407
|
var n = e.separateStackingContexts, o = n === void 0 ? false : n;
|
|
403
408
|
|
|
404
|
-
return r().createElement(
|
|
409
|
+
return r().createElement(k, {
|
|
405
410
|
$separateStackingContexts: o,
|
|
406
411
|
"data-test": "layer",
|
|
407
412
|
onMouseDown: t.handleClickOnLayer,
|
|
@@ -409,17 +414,17 @@
|
|
|
409
414
|
}, a);
|
|
410
415
|
})), n.layerContainer);
|
|
411
416
|
|
|
412
|
-
return r().createElement(r().Fragment, null, r().createElement(
|
|
417
|
+
return r().createElement(r().Fragment, null, r().createElement(d(), {
|
|
413
418
|
target: window,
|
|
414
419
|
eventType: "keydown",
|
|
415
420
|
listener: this.handleKeyDownOnWindow,
|
|
416
421
|
key: "eventListenerKeydown"
|
|
417
|
-
}), r().createElement(
|
|
422
|
+
}), r().createElement(d(), {
|
|
418
423
|
target: window,
|
|
419
424
|
eventType: "mousedown",
|
|
420
425
|
listener: this.handleClickOnWindow,
|
|
421
426
|
key: "eventListenerMouseDown"
|
|
422
|
-
}), r().createElement(
|
|
427
|
+
}), r().createElement(d(), {
|
|
423
428
|
target: window,
|
|
424
429
|
eventType: "touchstart",
|
|
425
430
|
listener: this.handleClickOnWindow,
|
|
@@ -427,19 +432,32 @@
|
|
|
427
432
|
options: {
|
|
428
433
|
passive: true
|
|
429
434
|
}
|
|
430
|
-
}), u);
|
|
435
|
+
}), c, u);
|
|
431
436
|
}
|
|
432
|
-
|
|
437
|
+
// the fragment has to be present to avoid type issues with React 18
|
|
438
|
+
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
439
|
+
|
|
440
|
+
return r().createElement(r().Fragment, null, c);
|
|
433
441
|
}
|
|
434
442
|
} ]);
|
|
435
443
|
return n;
|
|
436
444
|
}(n.Component);
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
445
|
+
N(z, "layerContainer", null);
|
|
446
|
+
N(z, "possibleCloseReasons", W);
|
|
447
|
+
N(z, "propTypes", F);
|
|
448
|
+
N(z, "defaultProps", B);
|
|
449
|
+
N(z, "contextType", v);
|
|
450
|
+
N(z, "handleFullScreenChange", (function() {
|
|
451
|
+
if (z.layerContainer) {
|
|
452
|
+
var e = E();
|
|
453
|
+
if (e.fullscreenElement != null) {
|
|
454
|
+
e.fullscreenElement.appendChild(z.layerContainer);
|
|
455
|
+
} else {
|
|
456
|
+
e.body.appendChild(z.layerContainer);
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
}));
|
|
460
|
+
/* harmony default export */ const I = z;
|
|
443
461
|
// CONCATENATED MODULE: ./src/Layer/index.ts
|
|
444
462
|
module.exports = t;
|
|
445
463
|
/******/})();
|
package/Link.js
CHANGED
|
@@ -61,7 +61,6 @@
|
|
|
61
61
|
e.r(t);
|
|
62
62
|
// EXPORTS
|
|
63
63
|
e.d(t, {
|
|
64
|
-
StyledLink: () => /* reexport */ x,
|
|
65
64
|
default: () => /* reexport */ Q
|
|
66
65
|
});
|
|
67
66
|
// CONCATENATED MODULE: external "react"
|
|
@@ -106,10 +105,10 @@
|
|
|
106
105
|
}
|
|
107
106
|
/* harmony default export */ const O = g;
|
|
108
107
|
// CONCATENATED MODULE: external "@splunk/react-ui/Clickable"
|
|
109
|
-
const
|
|
110
|
-
var
|
|
108
|
+
const j = require("@splunk/react-ui/Clickable");
|
|
109
|
+
var x = e.n(j);
|
|
111
110
|
// CONCATENATED MODULE: ./src/Link/LinkStyles.ts
|
|
112
|
-
var
|
|
111
|
+
var S = p()(x()).withConfig({
|
|
113
112
|
displayName: "LinkStyles__StyledClickable",
|
|
114
113
|
componentId: "sc-1hhltcf-0"
|
|
115
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,
|
|
@@ -198,11 +197,11 @@
|
|
|
198
197
|
}, N(e, t);
|
|
199
198
|
}
|
|
200
199
|
function R(e) {
|
|
201
|
-
var t =
|
|
200
|
+
var t = A();
|
|
202
201
|
return function() {
|
|
203
|
-
var r, n =
|
|
202
|
+
var r, n = B(e);
|
|
204
203
|
if (t) {
|
|
205
|
-
var o =
|
|
204
|
+
var o = B(this).constructor;
|
|
206
205
|
r = Reflect.construct(n, arguments, o);
|
|
207
206
|
} else r = n.apply(this, arguments);
|
|
208
207
|
return M(this, r);
|
|
@@ -217,20 +216,20 @@
|
|
|
217
216
|
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
218
217
|
return e;
|
|
219
218
|
}
|
|
220
|
-
function
|
|
219
|
+
function A() {
|
|
221
220
|
try {
|
|
222
221
|
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
|
|
223
222
|
} catch (e) {}
|
|
224
|
-
return (
|
|
223
|
+
return (A = function t() {
|
|
225
224
|
return !!e;
|
|
226
225
|
})();
|
|
227
226
|
}
|
|
228
|
-
function
|
|
229
|
-
return
|
|
227
|
+
function B(e) {
|
|
228
|
+
return B = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
|
|
230
229
|
return e.__proto__ || Object.getPrototypeOf(e);
|
|
231
|
-
},
|
|
230
|
+
}, B(e);
|
|
232
231
|
}
|
|
233
|
-
function
|
|
232
|
+
function L(e, t, r) {
|
|
234
233
|
return (t = z(t)) in e ? Object.defineProperty(e, t, {
|
|
235
234
|
value: r,
|
|
236
235
|
enumerable: !0,
|
|
@@ -279,8 +278,8 @@
|
|
|
279
278
|
o[i] = arguments[i];
|
|
280
279
|
}
|
|
281
280
|
e = t.call.apply(t, [ this ].concat(o));
|
|
282
|
-
|
|
283
|
-
|
|
281
|
+
L(D(e), "component", null);
|
|
282
|
+
L(D(e), "handleMount", (function(t) {
|
|
284
283
|
e.component = t;
|
|
285
284
|
}));
|
|
286
285
|
return e;
|
|
@@ -307,7 +306,7 @@
|
|
|
307
306
|
u = typeof o === "string" ? o : J;
|
|
308
307
|
}
|
|
309
308
|
|
|
310
|
-
return n().createElement(
|
|
309
|
+
return n().createElement(S, k({
|
|
311
310
|
"data-test": "link",
|
|
312
311
|
ref: this.handleMount,
|
|
313
312
|
openInNewContext: a
|
|
@@ -316,11 +315,10 @@
|
|
|
316
315
|
} ]);
|
|
317
316
|
return r;
|
|
318
317
|
}(r.Component);
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
318
|
+
L(K, "propTypes", H);
|
|
319
|
+
L(K, "defaultProps", G);
|
|
320
|
+
L(K, u.legacyRefMode, true);
|
|
322
321
|
/* harmony default export */ const Q = K;
|
|
323
|
-
//
|
|
324
|
-
// CONCATENATED MODULE: ./src/Link/index.ts
|
|
322
|
+
// CONCATENATED MODULE: ./src/Link/index.ts
|
|
325
323
|
module.exports = t;
|
|
326
324
|
/******/})();
|
package/MIGRATION.mdx
CHANGED
|
@@ -46,6 +46,17 @@ Remove usages of the `iconSize` prop.
|
|
|
46
46
|
|
|
47
47
|
## 4.39.0
|
|
48
48
|
|
|
49
|
+
### Deprecated `Menu.Item`'s `icon` prop
|
|
50
|
+
|
|
51
|
+
#### Change
|
|
52
|
+
`Menu.Item`'s `icon` prop is deprecated and will be removed in a future major version.
|
|
53
|
+
|
|
54
|
+
#### Context
|
|
55
|
+
The `Menu.Item` icon should not be used as `Menu.Item` as that restricted the location of the icon and it is now possible to place an adornment at the start or the end of the `Menu.Item` content.
|
|
56
|
+
|
|
57
|
+
#### Migration steps
|
|
58
|
+
Replace all usage of `Menu.Item`'s `icon` prop with `startAdornment` and/or `endAdornment`.
|
|
59
|
+
|
|
49
60
|
### Deprecated `TabBar` and `TabLayout`'s `appearance` prop
|
|
50
61
|
|
|
51
62
|
#### Change
|
|
@@ -60,7 +71,7 @@ Due to these factors, the `"context"` appearance has poor accessibility on two f
|
|
|
60
71
|
* it makes it difficult to distinguish the tabs from the content
|
|
61
72
|
* it has poor contrast between the selected and unselected tabs
|
|
62
73
|
|
|
63
|
-
The
|
|
74
|
+
The existence of this appearance has also encouraged uses of these components where tabs are not appropriate.
|
|
64
75
|
|
|
65
76
|
Additionally, this appearance has only been supported in Prisma themes, leading to visual inconsistency with Enterprise themes.
|
|
66
77
|
|
|
@@ -98,6 +109,22 @@ There are two possible use cases for a selectable `Button`:
|
|
|
98
109
|
1) If the `Button` was used as part of a `ButtonGroup`, replace it with a `RadioBar`.
|
|
99
110
|
2) If the `Button` was used standalone, replace it with a `Switch` with `appearance="toggle"`.
|
|
100
111
|
|
|
112
|
+
## 4.36.0
|
|
113
|
+
|
|
114
|
+
### Deprecated `ComboBox`, `ControlGroup`, and `StaticContent`'s `size` prop
|
|
115
|
+
|
|
116
|
+
#### Change
|
|
117
|
+
|
|
118
|
+
`ComboBox`, `ControlGroup`, and `StaticContent`'s `size` prop has been deprecated and will be removed in the next major version.
|
|
119
|
+
|
|
120
|
+
#### Context
|
|
121
|
+
|
|
122
|
+
The `size` prop currently does not do anything in `ComboBox`, `ControlGroup`, or `StaticContent`, so it will be removed in the next major version.
|
|
123
|
+
|
|
124
|
+
#### Migration steps
|
|
125
|
+
|
|
126
|
+
Remove all usage of `ComboBox`, `ControlGroup`, and `StaticContent`'s `size` prop. To change the size of components, use the `SplunkThemeProvider`'s `density` prop.
|
|
127
|
+
|
|
101
128
|
## 4.35.0
|
|
102
129
|
|
|
103
130
|
### Deprecated `Menu`'s `retainFocus` prop
|
|
@@ -142,7 +169,7 @@ For Enterprise themes:
|
|
|
142
169
|
* the `"pill"` value can be replaced with `"subtle"` with no other changes.
|
|
143
170
|
|
|
144
171
|
For Prisma themes:
|
|
145
|
-
* the `"flat"` appearance can be replaced
|
|
172
|
+
* the `"flat"` appearance can be replaced with `"subtle"`.
|
|
146
173
|
* the `"toggle"` appearance can be replaced with `"default"`.
|
|
147
174
|
|
|
148
175
|
### Improved `Card.Header` accessibility when rendering actions
|
|
@@ -223,6 +250,21 @@ and move them to the new `actions` prop.
|
|
|
223
250
|
|
|
224
251
|
## 4.30.0
|
|
225
252
|
|
|
253
|
+
### Deprecated `Text`'s `appearance` prop
|
|
254
|
+
|
|
255
|
+
#### Change
|
|
256
|
+
|
|
257
|
+
`Text`'s `appearance` prop has been deprecated and will be removed in the next major version.
|
|
258
|
+
|
|
259
|
+
#### Context
|
|
260
|
+
|
|
261
|
+
`Text`'s `appearance` prop allowed the values "default" and "search".
|
|
262
|
+
With the new `Search` component optimized for user interaction, Text's `appearance` prop has become unnecessary.
|
|
263
|
+
|
|
264
|
+
#### Migration steps
|
|
265
|
+
|
|
266
|
+
Replace all usage of `Text`'s `appearance="search"` value with the `Search` component. Remove all usage of `Text`'s `appearance="default"` value.
|
|
267
|
+
|
|
226
268
|
### Deprecated `NavigationProvider`'s `prefix` prop
|
|
227
269
|
|
|
228
270
|
#### Change
|
|
@@ -397,7 +439,7 @@ const StyledSHeading = styled(Heading)`
|
|
|
397
439
|
})};
|
|
398
440
|
`;
|
|
399
441
|
|
|
400
|
-
<StyledSHeading level={
|
|
442
|
+
<StyledSHeading level={5} variant="title4"/>
|
|
401
443
|
```
|
|
402
444
|
|
|
403
445
|
`level="ss"` styling:
|
|
@@ -410,7 +452,7 @@ const StyledSSHeading = styled(Heading)`
|
|
|
410
452
|
})};
|
|
411
453
|
`;
|
|
412
454
|
|
|
413
|
-
<StyledSHeading level={
|
|
455
|
+
<StyledSHeading level={6} variant="title5"/>
|
|
414
456
|
```
|
|
415
457
|
|
|
416
458
|
*Prisma*
|
|
@@ -423,14 +465,14 @@ const StyledSHeading = styled(Heading)`
|
|
|
423
465
|
color: ${variables.contentColorDefault};
|
|
424
466
|
`;
|
|
425
467
|
|
|
426
|
-
<StyledSHeading level={
|
|
468
|
+
<StyledSHeading level={5} variant="title4"/>
|
|
427
469
|
```
|
|
428
470
|
|
|
429
471
|
`level="ss"` styling:
|
|
430
472
|
|
|
431
473
|
```jsx
|
|
432
474
|
No styling is needed.
|
|
433
|
-
<Heading level="ss"> is equivalent to <StyledSHeading level={
|
|
475
|
+
<Heading level="ss"> is equivalent to <StyledSHeading level={6} variant="title5"/>
|
|
434
476
|
```
|
|
435
477
|
|
|
436
478
|
## 4.17.1
|
|
@@ -724,50 +766,3 @@ Previously, `Tooltip` closed as soon as a user stopped hovering over the toggle.
|
|
|
724
766
|
|
|
725
767
|
#### Migration steps
|
|
726
768
|
Replace all usage of `Popover`’s `pointerEvents` prop with `possibleOpenReasons` and `possibleCloseReasons`.
|
|
727
|
-
|
|
728
|
-
## 4.30.0
|
|
729
|
-
|
|
730
|
-
### Deprecated `Text`'s `appearance` prop
|
|
731
|
-
|
|
732
|
-
#### Change
|
|
733
|
-
|
|
734
|
-
`Text`'s `appearance` prop has been deprecated and will be removed in the next major version.
|
|
735
|
-
|
|
736
|
-
#### Context
|
|
737
|
-
|
|
738
|
-
`Text`'s `appearance` prop allowed the values "default" and "search".
|
|
739
|
-
With the new `Search` component optimized for user interaction, Text's `appearance` prop has become unnecessary.
|
|
740
|
-
|
|
741
|
-
#### Migration steps
|
|
742
|
-
|
|
743
|
-
Replace all usage of `Text`'s `appearance="search"` value with the `Search` component. Remove all usage of `Text`'s `appearance="default"` value.
|
|
744
|
-
|
|
745
|
-
## 4.36.0
|
|
746
|
-
|
|
747
|
-
### Deprecated `ComboBox`, `ControlGroup`, and `StaticContent`'s `size` prop
|
|
748
|
-
|
|
749
|
-
#### Change
|
|
750
|
-
|
|
751
|
-
`ComboBox`, `ControlGroup`, and `StaticContent`'s `size` prop has been deprecated and will be removed in the next major version.
|
|
752
|
-
|
|
753
|
-
#### Context
|
|
754
|
-
|
|
755
|
-
The `size` prop currently does not do anything in `ComboBox`, `ControlGroup`, or `StaticContent`, so it will be removed in the next major version.
|
|
756
|
-
|
|
757
|
-
#### Migration steps
|
|
758
|
-
|
|
759
|
-
Remove all usage of `ComboBox`, `ControlGroup`, and `StaticContent`'s `size` prop. To change the size of components, use the `SplunkThemeProvider`'s `density` prop.
|
|
760
|
-
|
|
761
|
-
## 4.39.0
|
|
762
|
-
|
|
763
|
-
### Deprecated `Menu.Item`'s `icon` prop
|
|
764
|
-
|
|
765
|
-
#### Change
|
|
766
|
-
`Menu.Item`'s `icon` prop is deprecated and will be removed in a future major version.
|
|
767
|
-
|
|
768
|
-
#### Context
|
|
769
|
-
The `Menu.Item` icon should not be used as `Menu.Item` as that restricted the location of the icon and it is now possible to place an adornment at the start or the end of the `Menu.Item` content.
|
|
770
|
-
|
|
771
|
-
#### Migration steps
|
|
772
|
-
Replace all usage of `Menu.Item`'s `icon` prop with `startAdornment` and/or `endAdornment`.
|
|
773
|
-
|