@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.
Files changed (91) hide show
  1. package/ButtonGroup.js +1 -3
  2. package/CHANGELOG.md +47 -0
  3. package/Code.js +611 -426
  4. package/ComboBox.js +25 -32
  5. package/Date.js +21 -26
  6. package/Dropdown.js +33 -32
  7. package/JSONTree.js +30 -24
  8. package/Layer.js +115 -97
  9. package/Link.js +19 -21
  10. package/MIGRATION.mdx +48 -53
  11. package/Menu.js +7 -2
  12. package/MessageBar.js +54 -56
  13. package/Multiselect.js +1051 -1035
  14. package/Number.js +424 -395
  15. package/Paginator.js +269 -251
  16. package/Popover.js +595 -526
  17. package/RadioList.js +44 -43
  18. package/Resize.js +61 -61
  19. package/ResultsMenu.d.ts +2 -0
  20. package/ResultsMenu.js +4 -4
  21. package/Scroll.js +482 -475
  22. package/Search.js +56 -65
  23. package/Select.js +532 -513
  24. package/TabBar.js +4 -0
  25. package/Table.js +1519 -1437
  26. package/Text.js +29 -17
  27. package/TextArea.js +37 -37
  28. package/Tooltip.js +300 -207
  29. package/TransitionOpen.js +16 -14
  30. package/Tree.js +20 -14
  31. package/package.json +7 -7
  32. package/types/src/Button/Button.d.ts +1 -0
  33. package/types/src/ButtonGroup/ButtonGroup.d.ts +0 -4
  34. package/types/src/Code/Code.d.ts +1 -1
  35. package/types/src/ComboBox/ComboBox.d.ts +6 -3
  36. package/types/src/Date/Date.d.ts +0 -1
  37. package/types/src/Dropdown/Dropdown.d.ts +2 -1
  38. package/types/src/Dropdown/docs/examples/TooltipButtonToggle.d.ts +2 -0
  39. package/types/src/Layer/Layer.d.ts +2 -1
  40. package/types/src/Link/Link.d.ts +0 -2
  41. package/types/src/Multiselect/Multiselect.d.ts +2 -0
  42. package/types/src/Number/Number.d.ts +11 -10
  43. package/types/src/Number/utils.d.ts +29 -0
  44. package/types/src/Paginator/Paginator.d.ts +15 -2
  45. package/types/src/Paginator/docs/examples/CustomPages.d.ts +2 -0
  46. package/types/src/Popover/Popover.d.ts +18 -12
  47. package/types/src/Popover/PopoverMenuContext.d.ts +6 -0
  48. package/types/src/Popover/PopoverProvider.d.ts +23 -0
  49. package/types/src/Popover/index.d.ts +2 -1
  50. package/types/src/RadioList/RadioList.d.ts +1 -1
  51. package/types/src/Resize/Resize.d.ts +0 -11
  52. package/types/src/Scroll/Inner.d.ts +17 -19
  53. package/types/src/Select/SelectBase.d.ts +7 -5
  54. package/types/src/Select/docs/examples/Appearance.d.ts +1 -11
  55. package/types/src/Select/docs/examples/Basic.d.ts +1 -9
  56. package/types/src/Select/docs/examples/Children.d.ts +1 -9
  57. package/types/src/Select/docs/examples/Descriptions.d.ts +1 -9
  58. package/types/src/Select/docs/examples/Fetching.d.ts +1 -22
  59. package/types/src/Select/docs/examples/Filter.d.ts +1 -9
  60. package/types/src/Select/docs/examples/Headings.d.ts +1 -9
  61. package/types/src/Select/docs/examples/LoadMoreOnScrollBottom.d.ts +1 -24
  62. package/types/src/Select/docs/examples/Prefix.d.ts +1 -9
  63. package/types/src/Select/docs/examples/Truncate.d.ts +1 -9
  64. package/types/src/Table/ExpandButton.d.ts +8 -0
  65. package/types/src/Table/HeadDropdownCell.d.ts +2 -0
  66. package/types/src/Table/HeadInner.d.ts +5 -1
  67. package/types/src/Table/Row.d.ts +8 -2
  68. package/types/src/Table/docs/examples/Click.d.ts +2 -16
  69. package/types/src/Table/docs/examples/ClickRows.d.ts +2 -16
  70. package/types/src/Table/docs/examples/Complex.d.ts +2 -50
  71. package/types/src/Table/docs/examples/FilterColumnValues.d.ts +1 -13
  72. package/types/src/Table/docs/examples/HeadDropdownCell.d.ts +1 -17
  73. package/types/src/Table/docs/examples/ReorderColumns.d.ts +2 -21
  74. package/types/src/Table/docs/examples/ReorderRows.d.ts +2 -21
  75. package/types/src/Table/docs/examples/Resizable.d.ts +2 -23
  76. package/types/src/Table/docs/examples/ResizableFill.d.ts +2 -23
  77. package/types/src/Table/docs/examples/RowActions.d.ts +2 -39
  78. package/types/src/Table/docs/examples/Selectable.d.ts +2 -18
  79. package/types/src/Table/docs/examples/SortableColumns.d.ts +1 -11
  80. package/types/src/Tooltip/Tooltip.d.ts +38 -5
  81. package/types/src/Tooltip/docs/examples/CustomProps.d.ts +2 -0
  82. package/types/src/Tooltip/docs/examples/Toggletip.d.ts +2 -0
  83. package/types/src/useControlled/useControlled.d.ts +5 -4
  84. package/useControlled.js +37 -15
  85. package/usePrevious.js +62 -30
  86. package/useResizeObserver.js +122 -90
  87. package/useRovingFocus.js +5 -4
  88. package/types/src/Dropdown/docs/examples/OtherToggles.d.ts +0 -2
  89. package/types/src/Popover/PopoverContext.d.ts +0 -6
  90. package/types/src/Table/icons/ExpansionRow.d.ts +0 -6
  91. 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 */ b,
77
- LayerStackContext: () => /* reexport */ h,
78
- LayerStackGlobalProvider: () => /* reexport */ w,
79
- default: () => /* reexport */ U
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 c = require("lodash/includes");
91
- var u = e.n(c);
90
+ const l = require("lodash/includes");
91
+ var c = e.n(l);
92
92
  // CONCATENATED MODULE: external "lodash/last"
93
- const l = require("lodash/last");
94
- var s = e.n(l);
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 d = require("@splunk/react-ui/EventListener");
102
- var v = e.n(d);
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 h = r().createContext([]);
110
- var b = r().createContext({});
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 w(t) {
123
- var o = t.children, i = t.name, a = i === void 0 ? "__splunkui_layer_instances__" : i, c = t.scope, u = c === void 0 ? typeof window !== "undefined" ? window : e.g : c, l = t.separateStackingContexts, s = l === void 0 ? false : l;
124
- if (!u[a]) {
125
- u[a] = [];
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(h.Provider, {
135
- value: u[a]
136
- }, r().createElement(b.Provider, {
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
- w.propTypes = m;
138
+ b.propTypes = m;
141
139
  // CONCATENATED MODULE: external "styled-components"
142
- const k = require("styled-components");
143
- var g = e.n(k);
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 S = g().div.withConfig({
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, k.css)([ "isolation:isolate;z-index:", ";" ], C.variables.zindexLayer);
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 O = {
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 : O;
209
+ var e = typeof document !== "undefined" ? document : S;
212
210
  return e;
213
211
  }
214
212
  // CONCATENATED MODULE: ./src/Layer/Layer.tsx
215
- function j(e) {
213
+ function O(e) {
216
214
  "@babel/helpers - typeof";
217
- return j = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
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
- }, j(e);
219
+ }, O(e);
222
220
  }
223
- function L(e, t) {
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 P(e, t) {
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, K(r.key), r);
228
+ Object.defineProperty(e, A(r.key), r);
231
229
  }
232
230
  }
233
- function _(e, t, n) {
234
- return t && P(e.prototype, t), n && P(e, n), Object.defineProperty(e, "prototype", {
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 T(e, t) {
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 && x(e, t);
246
+ }), t && T(e, t);
249
247
  }
250
- function x(e, t) {
251
- return x = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
248
+ function T(e, t) {
249
+ return T = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
252
250
  return e.__proto__ = t, e;
253
- }, x(e, t);
251
+ }, T(e, t);
254
252
  }
255
- function q(e) {
256
- var t = M();
253
+ function x(e) {
254
+ var t = D();
257
255
  return function() {
258
- var n, r = N(e);
256
+ var n, r = M(e);
259
257
  if (t) {
260
- var o = N(this).constructor;
258
+ var o = M(this).constructor;
261
259
  n = Reflect.construct(r, arguments, o);
262
260
  } else n = r.apply(this, arguments);
263
- return R(this, n);
261
+ return q(this, n);
264
262
  };
265
263
  }
266
- function R(e, t) {
267
- if (t && ("object" == j(t) || "function" == typeof t)) return t;
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 D(e);
267
+ return R(e);
270
268
  }
271
- function D(e) {
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 M() {
273
+ function D() {
276
274
  try {
277
275
  var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
278
276
  } catch (e) {}
279
- return (M = function t() {
277
+ return (D = function t() {
280
278
  return !!e;
281
279
  })();
282
280
  }
283
- function N(e) {
284
- return N = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
281
+ function M(e) {
282
+ return M = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
285
283
  return e.__proto__ || Object.getPrototypeOf(e);
286
- }, N(e);
284
+ }, M(e);
287
285
  }
288
- function A(e, t, n) {
289
- return (t = K(t)) in e ? Object.defineProperty(e, 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 K(e) {
297
- var t = W(e, "string");
298
- return "symbol" == j(t) ? t : t + "";
294
+ function A(e) {
295
+ var t = K(e, "string");
296
+ return "symbol" == O(t) ? t : t + "";
299
297
  }
300
- function W(e, t) {
301
- if ("object" != j(e) || !e) return e;
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" != j(r)) return r;
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 B = [ "clickAway", "escapeKey" ];
312
- var z = {
309
+ /** @public */ var W = [ "clickAway", "escapeKey" ];
310
+ var F = {
313
311
  children: a().node,
314
- closeReasons: a().arrayOf(a().oneOf(B)),
312
+ closeReasons: a().arrayOf(a().oneOf(W)),
315
313
  onRequestClose: a().func,
316
314
  open: a().bool
317
315
  };
318
- var F = {
319
- closeReasons: B,
316
+ var B = {
317
+ closeReasons: W,
320
318
  open: false
321
319
  };
322
- var I = function(e) {
323
- T(n, e);
324
- var t = q(n);
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
- L(this, n);
330
+ j(this, n);
335
331
  r = t.call(this, e);
336
- A(D(r), "layerClickEvent", null);
337
- A(D(r), "handleClickOnLayer", (function(e) {
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
- A(D(r), "handleClickOnWindow", (function(e) {
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 || !u()(r.props.closeReasons, "clickAway") || r.layerClickEvent === e) {
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
- A(D(r), "handleKeyDownOnWindow", (function(e) {
353
- if (r.props.open && (0, y.keycode)(e) === "esc" && s()(r.getLayerStack()) === D(r) && u()(r.props.closeReasons, "escapeKey")) {
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
- _(n, [ {
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, c = i.open;
400
- if (c) {
401
- var u = (0, o.createPortal)( r().createElement(b.Consumer, null, (function(e) {
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(S, {
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(v(), {
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(v(), {
422
+ }), r().createElement(d(), {
418
423
  target: window,
419
424
  eventType: "mousedown",
420
425
  listener: this.handleClickOnWindow,
421
426
  key: "eventListenerMouseDown"
422
- }), r().createElement(v(), {
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
- return null;
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
- A(I, "layerContainer", null);
438
- A(I, "possibleCloseReasons", B);
439
- A(I, "propTypes", z);
440
- A(I, "defaultProps", F);
441
- A(I, "contextType", h);
442
- /* harmony default export */ const U = I;
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 S = require("@splunk/react-ui/Clickable");
110
- var j = e.n(S);
108
+ const j = require("@splunk/react-ui/Clickable");
109
+ var x = e.n(j);
111
110
  // CONCATENATED MODULE: ./src/Link/LinkStyles.ts
112
- var x = p()(j()).withConfig({
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 = L();
200
+ var t = A();
202
201
  return function() {
203
- var r, n = A(e);
202
+ var r, n = B(e);
204
203
  if (t) {
205
- var o = A(this).constructor;
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 L() {
219
+ function A() {
221
220
  try {
222
221
  var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
223
222
  } catch (e) {}
224
- return (L = function t() {
223
+ return (A = function t() {
225
224
  return !!e;
226
225
  })();
227
226
  }
228
- function A(e) {
229
- return A = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
227
+ function B(e) {
228
+ return B = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
230
229
  return e.__proto__ || Object.getPrototypeOf(e);
231
- }, A(e);
230
+ }, B(e);
232
231
  }
233
- function B(e, t, r) {
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
- B(D(e), "component", null);
283
- B(D(e), "handleMount", (function(t) {
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(x, k({
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
- B(K, "propTypes", H);
320
- B(K, "defaultProps", G);
321
- B(K, u.legacyRefMode, true);
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
- // exported so that we can style both <a> and <button> tags in MessageBar
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 existance of this appearance has also encouraged uses of these components where tabs are not appropriate.
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 by `"secondary"` or `"subtle"` depending on the context in which it appears.
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={4} variant="title4"/>
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={5} variant="title5"/>
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={4} variant="title4"/>
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={5} variant="title5"/>
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
-