@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/useControlled.js CHANGED
@@ -2,6 +2,10 @@
2
2
  // webpackBootstrap
3
3
  /******/ "use strict";
4
4
  /******/ var e = {
5
+ /***/ 5919:
6
+ /***/ e => {
7
+ e.exports = require("lodash/has");
8
+ /***/ },
5
9
  /***/ 9497:
6
10
  /***/ e => {
7
11
  e.exports = require("react");
@@ -15,25 +19,40 @@
15
19
  /******/ // The require function
16
20
  /******/ function t(o) {
17
21
  /******/ // Check if module is in cache
18
- /******/ var u = r[o];
19
- /******/ if (u !== undefined) {
20
- /******/ return u.exports;
22
+ /******/ var a = r[o];
23
+ /******/ if (a !== undefined) {
24
+ /******/ return a.exports;
21
25
  /******/ }
22
26
  /******/ // Create a new module (and put it into the cache)
23
- /******/ var a = r[o] = {
27
+ /******/ var u = r[o] = {
24
28
  /******/ // no module.id needed
25
29
  /******/ // no module.loaded needed
26
30
  /******/ exports: {}
27
31
  /******/ };
28
32
  /******/
29
33
  /******/ // Execute the module function
30
- /******/ e[o](a, a.exports, t);
34
+ /******/ e[o](u, u.exports, t);
31
35
  /******/
32
36
  /******/ // Return the exports of the module
33
- /******/ return a.exports;
37
+ /******/ return u.exports;
34
38
  /******/ }
35
39
  /******/
36
40
  /************************************************************************/
41
+ /******/ /* webpack/runtime/compat get default export */
42
+ /******/ (() => {
43
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
44
+ /******/ t.n = e => {
45
+ /******/ var r = e && e.__esModule ?
46
+ /******/ () => e["default"]
47
+ /******/ : () => e
48
+ /******/;
49
+ t.d(r, {
50
+ a: r
51
+ });
52
+ /******/ return r;
53
+ /******/ };
54
+ /******/ })();
55
+ /******/
37
56
  /******/ /* webpack/runtime/define property getters */
38
57
  /******/ (() => {
39
58
  /******/ // define getter functions for harmony exports
@@ -77,10 +96,13 @@
77
96
  t.r(o);
78
97
  // EXPORTS
79
98
  t.d(o, {
80
- default: () => /* reexport */ u
99
+ default: () => /* reexport */ n
81
100
  });
82
101
  // EXTERNAL MODULE: external "react"
83
102
  var e = t(9497);
103
+ // EXTERNAL MODULE: external "lodash/has"
104
+ var r = t(5919);
105
+ var a = t.n(r);
84
106
  // CONCATENATED MODULE: ./src/useControlled/useControlled.tsx
85
107
  /**
86
108
  * This is a private component not intended for use outside @splunk/react-ui
@@ -92,20 +114,20 @@
92
114
  *
93
115
  * Return the controlled state of the component.
94
116
  */
95
- function r(r) {
96
- var t = r.defaultValue, o = r.value, u = r.componentName, a = u === void 0 ? "this component" : u, f = r.defaultValuePropName, n = f === void 0 ? "defaultValue" : f, l = r.valuePropName, i = l === void 0 ? "value" : l;
97
- var d = (0, e.useRef)(o != null);
98
- var s = (0, e.useRef)(t);
117
+ function u(r) {
118
+ var t = r.componentProps, o = r.componentName, u = o === void 0 ? "this component" : o, n = r.defaultValuePropName, f = n === void 0 ? "defaultValue" : n, i = r.valuePropName, l = i === void 0 ? "value" : i;
119
+ var s = (0, e.useRef)(a()(t, l));
120
+ var d = (0, e.useRef)(t[f]);
99
121
  (0, e.useEffect)((function() {
100
122
  if (false) {}
101
- }), [ a, t, n, i ]);
123
+ }), [ u, t, f, l ]);
102
124
  (0, e.useEffect)((function() {
103
125
  if (false) {}
104
126
  if (false) {}
105
- }), [ a, t, n, o, i ]);
106
- return d.current;
127
+ }), [ u, t, f, l ]);
128
+ return s.current;
107
129
  }
108
- /* harmony default export */ const u = r;
130
+ /* harmony default export */ const n = u;
109
131
  }) // CONCATENATED MODULE: ./src/useControlled/index.ts
110
132
  ();
111
133
  module.exports = o;
package/usePrevious.js CHANGED
@@ -1,19 +1,48 @@
1
1
  /******/ (() => {
2
2
  // webpackBootstrap
3
3
  /******/ "use strict";
4
- /******/ // The require scope
5
- /******/ var e = {};
4
+ /******/ var e = {
5
+ /***/ 9497:
6
+ /***/ e => {
7
+ e.exports = require("react");
8
+ /***/
9
+ /******/ }
10
+ };
11
+ /************************************************************************/
12
+ /******/ // The module cache
13
+ /******/ var r = {};
14
+ /******/
15
+ /******/ // The require function
16
+ /******/ function t(o) {
17
+ /******/ // Check if module is in cache
18
+ /******/ var n = r[o];
19
+ /******/ if (n !== undefined) {
20
+ /******/ return n.exports;
21
+ /******/ }
22
+ /******/ // Create a new module (and put it into the cache)
23
+ /******/ var u = r[o] = {
24
+ /******/ // no module.id needed
25
+ /******/ // no module.loaded needed
26
+ /******/ exports: {}
27
+ /******/ };
28
+ /******/
29
+ /******/ // Execute the module function
30
+ /******/ e[o](u, u.exports, t);
31
+ /******/
32
+ /******/ // Return the exports of the module
33
+ /******/ return u.exports;
34
+ /******/ }
6
35
  /******/
7
36
  /************************************************************************/
8
37
  /******/ /* webpack/runtime/define property getters */
9
38
  /******/ (() => {
10
39
  /******/ // define getter functions for harmony exports
11
- /******/ e.d = (r, t) => {
12
- /******/ for (var o in t) {
13
- /******/ if (e.o(t, o) && !e.o(r, o)) {
14
- /******/ Object.defineProperty(r, o, {
40
+ /******/ t.d = (e, r) => {
41
+ /******/ for (var o in r) {
42
+ /******/ if (t.o(r, o) && !t.o(e, o)) {
43
+ /******/ Object.defineProperty(e, o, {
15
44
  enumerable: true,
16
- get: t[o]
45
+ get: r[o]
17
46
  });
18
47
  /******/ }
19
48
  /******/ }
@@ -22,14 +51,14 @@
22
51
  /******/
23
52
  /******/ /* webpack/runtime/hasOwnProperty shorthand */
24
53
  /******/ (() => {
25
- /******/ e.o = (e, r) => Object.prototype.hasOwnProperty.call(e, r)
54
+ /******/ t.o = (e, r) => Object.prototype.hasOwnProperty.call(e, r)
26
55
  /******/;
27
56
  })();
28
57
  /******/
29
58
  /******/ /* webpack/runtime/make namespace object */
30
59
  /******/ (() => {
31
60
  /******/ // define __esModule on exports
32
- /******/ e.r = e => {
61
+ /******/ t.r = e => {
33
62
  /******/ if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
34
63
  /******/ Object.defineProperty(e, Symbol.toStringTag, {
35
64
  value: "Module"
@@ -41,17 +70,19 @@
41
70
  /******/ };
42
71
  /******/ })();
43
72
  /******/
44
- /************************************************************************/ var r = {};
45
- // ESM COMPAT FLAG
46
- e.r(r);
47
- // EXPORTS
48
- e.d(r, {
49
- default: () => /* reexport */ n
50
- });
51
- // CONCATENATED MODULE: external "react"
52
- const t = require("react");
53
- // CONCATENATED MODULE: ./src/usePrevious/usePrevious.tsx
54
- /**
73
+ /************************************************************************/ var o = {};
74
+ // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
75
+ (() => {
76
+ // ESM COMPAT FLAG
77
+ t.r(o);
78
+ // EXPORTS
79
+ t.d(o, {
80
+ default: () => /* reexport */ n
81
+ });
82
+ // EXTERNAL MODULE: external "react"
83
+ var e = t(9497);
84
+ // CONCATENATED MODULE: ./src/usePrevious/usePrevious.tsx
85
+ /**
55
86
  * This is a private component not intended for use outside @splunk/react-ui
56
87
  *
57
88
  * Keeps the previous version of a value. Useful for emulating the "prevState"
@@ -60,14 +91,15 @@
60
91
  *
61
92
  * @param value - The value to store
62
93
  */
63
- function o(e) {
64
- var r = (0, t.useRef)();
65
- (0, t.useEffect)((function() {
66
- r.current = e;
67
- }), [ e ]);
68
- return r.current;
69
- }
70
- /* harmony default export */ const n = o;
71
- // CONCATENATED MODULE: ./src/usePrevious/index.ts
72
- module.exports = r;
94
+ function r(r) {
95
+ var t = (0, e.useRef)();
96
+ (0, e.useEffect)((function() {
97
+ t.current = r;
98
+ }), [ r ]);
99
+ return t.current;
100
+ }
101
+ /* harmony default export */ const n = r;
102
+ }) // CONCATENATED MODULE: ./src/usePrevious/index.ts
103
+ ();
104
+ module.exports = o;
73
105
  /******/})();
@@ -1,19 +1,48 @@
1
1
  /******/ (() => {
2
2
  // webpackBootstrap
3
3
  /******/ "use strict";
4
- /******/ // The require scope
5
- /******/ var e = {};
4
+ /******/ var e = {
5
+ /***/ 9497:
6
+ /***/ e => {
7
+ e.exports = require("react");
8
+ /***/
9
+ /******/ }
10
+ };
11
+ /************************************************************************/
12
+ /******/ // The module cache
13
+ /******/ var r = {};
14
+ /******/
15
+ /******/ // The require function
16
+ /******/ function t(n) {
17
+ /******/ // Check if module is in cache
18
+ /******/ var o = r[n];
19
+ /******/ if (o !== undefined) {
20
+ /******/ return o.exports;
21
+ /******/ }
22
+ /******/ // Create a new module (and put it into the cache)
23
+ /******/ var i = r[n] = {
24
+ /******/ // no module.id needed
25
+ /******/ // no module.loaded needed
26
+ /******/ exports: {}
27
+ /******/ };
28
+ /******/
29
+ /******/ // Execute the module function
30
+ /******/ e[n](i, i.exports, t);
31
+ /******/
32
+ /******/ // Return the exports of the module
33
+ /******/ return i.exports;
34
+ /******/ }
6
35
  /******/
7
36
  /************************************************************************/
8
37
  /******/ /* webpack/runtime/define property getters */
9
38
  /******/ (() => {
10
39
  /******/ // define getter functions for harmony exports
11
- /******/ e.d = (r, t) => {
12
- /******/ for (var n in t) {
13
- /******/ if (e.o(t, n) && !e.o(r, n)) {
14
- /******/ Object.defineProperty(r, n, {
40
+ /******/ t.d = (e, r) => {
41
+ /******/ for (var n in r) {
42
+ /******/ if (t.o(r, n) && !t.o(e, n)) {
43
+ /******/ Object.defineProperty(e, n, {
15
44
  enumerable: true,
16
- get: t[n]
45
+ get: r[n]
17
46
  });
18
47
  /******/ }
19
48
  /******/ }
@@ -22,14 +51,14 @@
22
51
  /******/
23
52
  /******/ /* webpack/runtime/hasOwnProperty shorthand */
24
53
  /******/ (() => {
25
- /******/ e.o = (e, r) => Object.prototype.hasOwnProperty.call(e, r)
54
+ /******/ t.o = (e, r) => Object.prototype.hasOwnProperty.call(e, r)
26
55
  /******/;
27
56
  })();
28
57
  /******/
29
58
  /******/ /* webpack/runtime/make namespace object */
30
59
  /******/ (() => {
31
60
  /******/ // define __esModule on exports
32
- /******/ e.r = e => {
61
+ /******/ t.r = e => {
33
62
  /******/ if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
34
63
  /******/ Object.defineProperty(e, Symbol.toStringTag, {
35
64
  value: "Module"
@@ -41,97 +70,100 @@
41
70
  /******/ };
42
71
  /******/ })();
43
72
  /******/
44
- /************************************************************************/ var r = {};
45
- // ESM COMPAT FLAG
46
- e.r(r);
47
- // EXPORTS
48
- e.d(r, {
49
- default: () => /* reexport */ c
50
- });
51
- // CONCATENATED MODULE: external "react"
52
- const t = require("react");
53
- // CONCATENATED MODULE: ./src/useResizeObserver/useResizeObserver.ts
54
- function n(e, r) {
55
- return a(e) || l(e, r) || i(e, r) || o();
56
- }
57
- function o() {
58
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
59
- }
60
- function i(e, r) {
61
- if (e) {
62
- if ("string" == typeof e) return u(e, r);
63
- var t = {}.toString.call(e).slice(8, -1);
64
- return "Object" === t && e.constructor && (t = e.constructor.name), "Map" === t || "Set" === t ? Array.from(e) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? u(e, r) : void 0;
73
+ /************************************************************************/ var n = {};
74
+ // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
75
+ (() => {
76
+ // ESM COMPAT FLAG
77
+ t.r(n);
78
+ // EXPORTS
79
+ t.d(n, {
80
+ default: () => /* reexport */ c
81
+ });
82
+ // EXTERNAL MODULE: external "react"
83
+ var e = t(9497);
84
+ // CONCATENATED MODULE: ./src/useResizeObserver/useResizeObserver.ts
85
+ function r(e, r) {
86
+ return a(e) || l(e, r) || i(e, r) || o();
65
87
  }
66
- }
67
- function u(e, r) {
68
- (null == r || r > e.length) && (r = e.length);
69
- for (var t = 0, n = Array(r); t < r; t++) {
70
- n[t] = e[t];
88
+ function o() {
89
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
71
90
  }
72
- return n;
73
- }
74
- function l(e, r) {
75
- var t = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
76
- if (null != t) {
77
- var n, o, i, u, l = [], a = !0, f = !1;
78
- try {
79
- if (i = (t = t.call(e)).next, 0 === r) {
80
- if (Object(t) !== t) return;
81
- a = !1;
82
- } else for (;!(a = (n = i.call(t)).done) && (l.push(n.value), l.length !== r); a = !0) {
83
- }
84
- } catch (e) {
85
- f = !0, o = e;
86
- } finally {
91
+ function i(e, r) {
92
+ if (e) {
93
+ if ("string" == typeof e) return u(e, r);
94
+ var t = {}.toString.call(e).slice(8, -1);
95
+ return "Object" === t && e.constructor && (t = e.constructor.name), "Map" === t || "Set" === t ? Array.from(e) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? u(e, r) : void 0;
96
+ }
97
+ }
98
+ function u(e, r) {
99
+ (null == r || r > e.length) && (r = e.length);
100
+ for (var t = 0, n = Array(r); t < r; t++) {
101
+ n[t] = e[t];
102
+ }
103
+ return n;
104
+ }
105
+ function l(e, r) {
106
+ var t = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
107
+ if (null != t) {
108
+ var n, o, i, u, l = [], a = !0, f = !1;
87
109
  try {
88
- if (!a && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
110
+ if (i = (t = t.call(e)).next, 0 === r) {
111
+ if (Object(t) !== t) return;
112
+ a = !1;
113
+ } else for (;!(a = (n = i.call(t)).done) && (l.push(n.value), l.length !== r); a = !0) {
114
+ }
115
+ } catch (e) {
116
+ f = !0, o = e;
89
117
  } finally {
90
- if (f) throw o;
118
+ try {
119
+ if (!a && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
120
+ } finally {
121
+ if (f) throw o;
122
+ }
91
123
  }
124
+ return l;
92
125
  }
93
- return l;
94
126
  }
95
- }
96
- function a(e) {
97
- if (Array.isArray(e)) return e;
98
- }
99
- /**
127
+ function a(e) {
128
+ if (Array.isArray(e)) return e;
129
+ }
130
+ /**
100
131
  * Watches a React ref element for changes in size.
101
132
  *
102
133
  * @param ref - The React ref to observe size changes on
103
- */ var f = function e(r) {
104
- var o = (0, t.useState)({
105
- width: 0,
106
- height: 0
107
- }), i = n(o, 2), u = i[0], l = i[1];
108
- (0, t.useEffect)((function() {
109
- var e = r.current;
110
- if (typeof window !== "undefined" && window.ResizeObserver) {
111
- var t = new ResizeObserver((function(e) {
112
- if (e[0]) {
113
- var t, n;
114
- l({
115
- width: (r === null || r === void 0 ? void 0 : (t = r.current) === null || t === void 0 ? void 0 : t.getBoundingClientRect().width) || 0,
116
- height: (r === null || r === void 0 ? void 0 : (n = r.current) === null || n === void 0 ? void 0 : n.getBoundingClientRect().height) || 0
117
- });
118
- }
119
- }));
120
- if (e) {
121
- t.observe(e);
122
- }
123
- return function() {
134
+ */ var f = function t(n) {
135
+ var o = (0, e.useState)({
136
+ width: 0,
137
+ height: 0
138
+ }), i = r(o, 2), u = i[0], l = i[1];
139
+ (0, e.useEffect)((function() {
140
+ var e = n.current;
141
+ if (typeof window !== "undefined" && window.ResizeObserver) {
142
+ var r = new ResizeObserver((function(e) {
143
+ if (e[0]) {
144
+ var r, t;
145
+ l({
146
+ width: (n === null || n === void 0 ? void 0 : (r = n.current) === null || r === void 0 ? void 0 : r.getBoundingClientRect().width) || 0,
147
+ height: (n === null || n === void 0 ? void 0 : (t = n.current) === null || t === void 0 ? void 0 : t.getBoundingClientRect().height) || 0
148
+ });
149
+ }
150
+ }));
124
151
  if (e) {
125
- t.unobserve(e);
152
+ r.observe(e);
126
153
  }
127
- };
128
- }
129
- // Return a no-op function to satisfy consistent-return rule
130
- return function() {};
131
- }), [ r ]);
132
- return u;
133
- };
134
- /* harmony default export */ const c = f;
135
- // CONCATENATED MODULE: ./src/useResizeObserver/index.ts
136
- module.exports = r;
154
+ return function() {
155
+ if (e) {
156
+ r.unobserve(e);
157
+ }
158
+ };
159
+ }
160
+ // Return a no-op function to satisfy consistent-return rule
161
+ return function() {};
162
+ }), [ n ]);
163
+ return u;
164
+ };
165
+ /* harmony default export */ const c = f;
166
+ }) // CONCATENATED MODULE: ./src/useResizeObserver/index.ts
167
+ ();
168
+ module.exports = n;
137
169
  /******/})();
package/useRovingFocus.js CHANGED
@@ -108,10 +108,11 @@
108
108
  }
109
109
  };
110
110
  var f = function e(r) {
111
- if (r.nativeEvent.target instanceof HTMLElement) {
112
- var u = t.current.indexOf(r.nativeEvent.target);
113
- var i = (0, a.keycode)(r.nativeEvent);
114
- (0, n.handleFocus)(i, t.current, u, o);
111
+ var u = t.current.includes(r.nativeEvent.target);
112
+ /* Only apply focus if we are among the navigable items in this container */ if (r.nativeEvent.target instanceof HTMLElement && u) {
113
+ var i = t.current.indexOf(r.nativeEvent.target);
114
+ var c = (0, a.keycode)(r.nativeEvent);
115
+ (0, n.handleFocus)(c, t.current, i, o);
115
116
  }
116
117
  };
117
118
  return {
@@ -1,2 +0,0 @@
1
- declare function OtherToggles(): JSX.Element;
2
- export default OtherToggles;
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- interface PopoverContextValue {
3
- retainFocus?: boolean;
4
- }
5
- declare const PopoverContext: import("react").Context<PopoverContextValue>;
6
- export { PopoverContext };
@@ -1,6 +0,0 @@
1
- interface ExpansionRowIconProps {
2
- className?: string;
3
- expanded?: boolean;
4
- }
5
- declare const StyledExpansionRowIcon: import("styled-components").StyledComponent<({ className, expanded }: ExpansionRowIconProps) => JSX.Element, any, {}, never>;
6
- export default StyledExpansionRowIcon;
@@ -1,2 +0,0 @@
1
- declare function CustomContent(): JSX.Element;
2
- export default CustomContent;