@splunk/react-ui 4.37.0 → 4.39.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 (142) hide show
  1. package/Accordion.js +131 -153
  2. package/Anchor.js +50 -58
  3. package/Animation.js +64 -59
  4. package/AnimationToggle.js +59 -61
  5. package/Box.js +59 -67
  6. package/Breadcrumbs.js +113 -127
  7. package/Button.js +208 -219
  8. package/ButtonGroup.js +41 -49
  9. package/ButtonSimple.js +264 -295
  10. package/CHANGELOG.md +50 -1
  11. package/Calendar.js +353 -414
  12. package/Card.js +183 -243
  13. package/CardLayout.js +86 -83
  14. package/Chip.js +104 -122
  15. package/Clickable.js +180 -198
  16. package/CloseButton.js +52 -60
  17. package/Code.js +24 -31
  18. package/CollapsiblePanel.js +172 -202
  19. package/Color.js +1107 -980
  20. package/ColumnLayout.js +72 -96
  21. package/ComboBox.js +267 -305
  22. package/Concertina.js +406 -454
  23. package/ControlGroup.js +165 -194
  24. package/Date.js +116 -131
  25. package/DefinitionList.js +125 -149
  26. package/Divider.js +81 -79
  27. package/Dropdown.js +226 -237
  28. package/DualListbox.js +150 -186
  29. package/EventListener.js +4 -1
  30. package/File.js +1032 -955
  31. package/FormRows.js +281 -334
  32. package/Heading.js +27 -35
  33. package/Image.js +101 -116
  34. package/JSONTree.js +301 -344
  35. package/Layer.js +118 -126
  36. package/Link.js +141 -159
  37. package/List.js +61 -77
  38. package/MIGRATION.mdx +92 -38
  39. package/Markdown.js +288 -347
  40. package/Menu.js +512 -530
  41. package/Message.js +173 -196
  42. package/MessageBar.js +58 -66
  43. package/Modal.js +241 -290
  44. package/ModalLayer.js +130 -148
  45. package/Monogram.js +138 -138
  46. package/Multiselect.js +1600 -1923
  47. package/Number.js +159 -178
  48. package/Paginator.js +296 -335
  49. package/Paragraph.js +24 -32
  50. package/Popover.js +448 -441
  51. package/Progress.js +65 -75
  52. package/RadioBar.js +301 -303
  53. package/RadioList.js +77 -119
  54. package/Resize.js +105 -127
  55. package/ResultsMenu.js +373 -385
  56. package/ScreenReaderContent.js +130 -94
  57. package/Scroll.js +209 -244
  58. package/Search.js +375 -384
  59. package/Select.js +1076 -1354
  60. package/SidePanel.js +122 -142
  61. package/Slider.js +192 -222
  62. package/SlidingPanels.js +238 -270
  63. package/SplitButton.js +222 -245
  64. package/StaticContent.js +68 -76
  65. package/StepBar.js +206 -205
  66. package/Switch.js +211 -236
  67. package/TabBar.js +222 -258
  68. package/TabLayout.js +114 -139
  69. package/Table.js +2017 -2180
  70. package/Text.js +401 -512
  71. package/TextArea.js +411 -441
  72. package/Tooltip.js +116 -132
  73. package/TransitionOpen.js +160 -178
  74. package/Tree.js +268 -287
  75. package/Typography.js +48 -52
  76. package/WaitSpinner.js +60 -68
  77. package/cypress/support/commands.ts +9 -0
  78. package/cypress/support/index.d.ts +6 -0
  79. package/cypress/tsconfig.cypress.json +1 -0
  80. package/docker-compose.yml +0 -1
  81. package/package.json +17 -17
  82. package/types/src/Button/Button.d.ts +20 -6
  83. package/types/src/ButtonSimple/ButtonSimple.d.ts +2 -2
  84. package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +1 -1
  85. package/types/src/Color/Color.d.ts +5 -2
  86. package/types/src/Color/Palette.d.ts +6 -2
  87. package/types/src/ComboBox/Option.d.ts +1 -1
  88. package/types/src/ControlGroup/ControlGroup.d.ts +1 -2
  89. package/types/src/Date/Date.d.ts +2 -3
  90. package/types/src/File/File.d.ts +2 -3
  91. package/types/src/File/Retry.d.ts +1 -2
  92. package/types/src/Link/Link.d.ts +3 -4
  93. package/types/src/Menu/Item.d.ts +24 -8
  94. package/types/src/Menu/Menu.d.ts +3 -3
  95. package/types/src/Menu/docs/examples/Adornments.d.ts +2 -0
  96. package/types/src/Menu/docs/examples/SelectableWithAdornments.d.ts +2 -0
  97. package/types/src/ModalLayer/ModalLayer.d.ts +1 -1
  98. package/types/src/Multiselect/Option.d.ts +2 -0
  99. package/types/src/Number/Number.d.ts +3 -3
  100. package/types/src/Popover/Popover.d.ts +3 -4
  101. package/types/src/RadioBar/RadioBar.d.ts +2 -2
  102. package/types/src/ResultsMenu/VirtualizedResultsMenu/VirtualizedResultsMenu.d.ts +1 -1
  103. package/types/src/ScrollContainerContext/ScrollContainerContext.d.ts +2 -2
  104. package/types/src/Search/Option.d.ts +16 -3
  105. package/types/src/Select/Option.d.ts +3 -1
  106. package/types/src/Select/OptionBase.d.ts +7 -5
  107. package/types/src/Select/Select.d.ts +2 -2
  108. package/types/src/Select/SelectAllOption.d.ts +4 -4
  109. package/types/src/Select/SelectBase.d.ts +0 -1
  110. package/types/src/SidePanel/SidePanel.d.ts +1 -1
  111. package/types/src/Slider/Slider.d.ts +2 -3
  112. package/types/src/Slider/docs/examples/Error.d.ts +2 -0
  113. package/types/src/SlidingPanels/SlidingPanels.d.ts +1 -1
  114. package/types/src/StepBar/Step.d.ts +1 -2
  115. package/types/src/TabBar/Tab.d.ts +1 -1
  116. package/types/src/TabBar/TabBar.d.ts +3 -1
  117. package/types/src/TabLayout/TabLayout.d.ts +2 -0
  118. package/types/src/Table/HeadDropdownCell.d.ts +2 -0
  119. package/types/src/Table/Table.d.ts +0 -1
  120. package/types/src/Table/docs/examples/StripeRows.d.ts +2 -0
  121. package/types/src/Text/IconOutlinedHide.d.ts +1 -2
  122. package/types/src/Text/IconOutlinedView.d.ts +1 -2
  123. package/types/src/Text/Text.d.ts +6 -4
  124. package/types/src/Text/docs/examples/Dimmed.d.ts +2 -0
  125. package/types/src/TextArea/TextArea.d.ts +2 -2
  126. package/types/src/Tooltip/Tooltip.d.ts +4 -4
  127. package/types/src/TransitionOpen/TransitionOpen.d.ts +1 -1
  128. package/useForceUpdate.js +30 -32
  129. package/useKeyPress.js +1 -1
  130. package/types/src/Button/docs/examples/Selected.d.ts +0 -2
  131. package/types/src/ButtonGroup/docs/examples/prisma/Basic.d.ts +0 -1
  132. package/types/src/File/docs/examples/prisma/Error.d.ts +0 -1
  133. package/types/src/Menu/docs/examples/Icons.d.ts +0 -2
  134. package/types/src/Menu/docs/examples/SelectableWithIcons.d.ts +0 -2
  135. package/types/src/Slider/docs/examples/prisma/Error.d.ts +0 -2
  136. package/types/src/TabBar/docs/examples/prisma/Context.d.ts +0 -2
  137. package/types/src/TabLayout/docs/examples/prisma/Context.d.ts +0 -2
  138. package/types/src/Table/docs/examples/prisma/Basic.d.ts +0 -2
  139. /package/types/src/Date/docs/examples/{prisma/WithoutCalendar.d.ts → WithoutCalendar.d.ts} +0 -0
  140. /package/types/src/Message/docs/examples/{prisma/Title.d.ts → Title.d.ts} +0 -0
  141. /package/types/src/StepBar/docs/examples/{prisma/Error.d.ts → Error.d.ts} +0 -0
  142. /package/types/src/TabBar/docs/examples/{prisma/Disabled.d.ts → Disabled.d.ts} +0 -0
package/Scroll.js CHANGED
@@ -61,7 +61,7 @@
61
61
  e.r(t);
62
62
  // EXPORTS
63
63
  e.d(t, {
64
- default: () => /* reexport */ ne
64
+ default: () => /* reexport */ ae
65
65
  });
66
66
  // CONCATENATED MODULE: external "react"
67
67
  const r = require("react");
@@ -71,12 +71,12 @@
71
71
  var l = e.n(o);
72
72
  // CONCATENATED MODULE: external "lodash/isFinite"
73
73
  const i = require("lodash/isFinite");
74
- var u = e.n(i);
74
+ var a = e.n(i);
75
75
  // CONCATENATED MODULE: external "@splunk/react-ui/Animation"
76
- const f = require("@splunk/react-ui/Animation");
76
+ const u = require("@splunk/react-ui/Animation");
77
77
  // CONCATENATED MODULE: external "styled-components"
78
78
  const c = require("styled-components");
79
- var a = e.n(c);
79
+ var f = e.n(c);
80
80
  // CONCATENATED MODULE: external "@splunk/themes"
81
81
  const s = require("@splunk/themes");
82
82
  // CONCATENATED MODULE: external "lodash/keys"
@@ -86,12 +86,12 @@
86
86
  const y = require("lodash/omit");
87
87
  var v = e.n(y);
88
88
  // CONCATENATED MODULE: external "react-spring"
89
- const h = require("react-spring");
89
+ const b = require("react-spring");
90
90
  // CONCATENATED MODULE: external "@splunk/react-ui/EventListener"
91
- const b = require("@splunk/react-ui/EventListener");
92
- var m = e.n(b);
91
+ const h = require("@splunk/react-ui/EventListener");
92
+ var m = e.n(h);
93
93
  // CONCATENATED MODULE: external "@splunk/react-ui/ScrollContainerContext"
94
- const g = require("@splunk/react-ui/ScrollContainerContext");
94
+ const w = require("@splunk/react-ui/ScrollContainerContext");
95
95
  // CONCATENATED MODULE: ./src/utils/updateReactRef.ts
96
96
  /**
97
97
  * Updates a React ref. Callback refs and object refs (from `createRef` and `useRef`) are supported.
@@ -99,7 +99,7 @@
99
99
  * @param ref - The React callback or object ref. Can be `null` or `undefined`.
100
100
  * @param current - The new value of the ref.
101
101
  */
102
- function w(e, t) {
102
+ function g(e, t) {
103
103
  if (e) {
104
104
  if (typeof e === "function") {
105
105
  e(t);
@@ -114,126 +114,111 @@
114
114
  // CONCATENATED MODULE: ./src/Scroll/Inner.tsx
115
115
  function O(e) {
116
116
  "@babel/helpers - typeof";
117
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
118
- O = function e(t) {
119
- return typeof t;
120
- };
121
- } else {
122
- O = function e(t) {
123
- return t && typeof Symbol === "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
124
- };
125
- }
126
- return O(e);
117
+ return O = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
118
+ return typeof e;
119
+ } : function(e) {
120
+ return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
121
+ }, O(e);
127
122
  }
128
123
  function S() {
129
- S = Object.assign || function(e) {
124
+ return S = Object.assign ? Object.assign.bind() : function(e) {
130
125
  for (var t = 1; t < arguments.length; t++) {
131
126
  var r = arguments[t];
132
127
  for (var n in r) {
133
- if (Object.prototype.hasOwnProperty.call(r, n)) {
134
- e[n] = r[n];
135
- }
128
+ ({}).hasOwnProperty.call(r, n) && (e[n] = r[n]);
136
129
  }
137
130
  }
138
131
  return e;
139
- };
140
- return S.apply(this, arguments);
141
- }
142
- function P(e, t) {
143
- if (!(e instanceof t)) {
144
- throw new TypeError("Cannot call a class as a function");
145
- }
132
+ }, S.apply(null, arguments);
146
133
  }
147
134
  function j(e, t) {
135
+ if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
136
+ }
137
+ function P(e, t) {
148
138
  for (var r = 0; r < t.length; r++) {
149
139
  var n = t[r];
150
- n.enumerable = n.enumerable || false;
151
- n.configurable = true;
152
- if ("value" in n) n.writable = true;
153
- Object.defineProperty(e, n.key, n);
140
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0),
141
+ Object.defineProperty(e, q(n.key), n);
154
142
  }
155
143
  }
156
144
  function T(e, t, r) {
157
- if (t) j(e.prototype, t);
158
- if (r) j(e, r);
159
- return e;
145
+ return t && P(e.prototype, t), r && P(e, r), Object.defineProperty(e, "prototype", {
146
+ writable: !1
147
+ }), e;
160
148
  }
161
149
  function E(e, t) {
162
- if (typeof t !== "function" && t !== null) {
163
- throw new TypeError("Super expression must either be null or a function");
164
- }
150
+ if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
165
151
  e.prototype = Object.create(t && t.prototype, {
166
152
  constructor: {
167
153
  value: e,
168
- writable: true,
169
- configurable: true
154
+ writable: !0,
155
+ configurable: !0
170
156
  }
171
- });
172
- if (t) _(e, t);
157
+ }), Object.defineProperty(e, "prototype", {
158
+ writable: !1
159
+ }), t && _(e, t);
173
160
  }
174
161
  function _(e, t) {
175
- _ = Object.setPrototypeOf || function e(t, r) {
176
- t.__proto__ = r;
177
- return t;
178
- };
179
- return _(e, t);
162
+ return _ = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
163
+ return e.__proto__ = t, e;
164
+ }, _(e, t);
180
165
  }
181
- function R(e) {
182
- var t = k();
183
- return function r() {
184
- var n = M(e), o;
166
+ function L(e) {
167
+ var t = M();
168
+ return function() {
169
+ var r, n = k(e);
185
170
  if (t) {
186
- var l = M(this).constructor;
187
- o = Reflect.construct(n, arguments, l);
188
- } else {
189
- o = n.apply(this, arguments);
190
- }
191
- return L(this, o);
171
+ var o = k(this).constructor;
172
+ r = Reflect.construct(n, arguments, o);
173
+ } else r = n.apply(this, arguments);
174
+ return R(this, r);
192
175
  };
193
176
  }
194
- function L(e, t) {
195
- if (t && (O(t) === "object" || typeof t === "function")) {
196
- return t;
197
- }
177
+ function R(e, t) {
178
+ if (t && ("object" == O(t) || "function" == typeof t)) return t;
179
+ if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined");
198
180
  return W(e);
199
181
  }
200
182
  function W(e) {
201
- if (e === void 0) {
202
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
203
- }
183
+ if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
204
184
  return e;
205
185
  }
206
- function k() {
207
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
208
- if (Reflect.construct.sham) return false;
209
- if (typeof Proxy === "function") return true;
186
+ function M() {
210
187
  try {
211
- Date.prototype.toString.call(Reflect.construct(Date, [], (function() {})));
212
- return true;
213
- } catch (e) {
214
- return false;
215
- }
188
+ var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
189
+ } catch (e) {}
190
+ return (M = function t() {
191
+ return !!e;
192
+ })();
216
193
  }
217
- function M(e) {
218
- M = Object.setPrototypeOf ? Object.getPrototypeOf : function e(t) {
219
- return t.__proto__ || Object.getPrototypeOf(t);
220
- };
221
- return M(e);
194
+ function k(e) {
195
+ return k = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
196
+ return e.__proto__ || Object.getPrototypeOf(e);
197
+ }, k(e);
222
198
  }
223
199
  function C(e, t, r) {
224
- if (t in e) {
225
- Object.defineProperty(e, t, {
226
- value: r,
227
- enumerable: true,
228
- configurable: true,
229
- writable: true
230
- });
231
- } else {
232
- e[t] = r;
200
+ return (t = q(t)) in e ? Object.defineProperty(e, t, {
201
+ value: r,
202
+ enumerable: !0,
203
+ configurable: !0,
204
+ writable: !0
205
+ }) : e[t] = r, e;
206
+ }
207
+ function q(e) {
208
+ var t = X(e, "string");
209
+ return "symbol" == O(t) ? t : t + "";
210
+ }
211
+ function X(e, t) {
212
+ if ("object" != O(e) || !e) return e;
213
+ var r = e[Symbol.toPrimitive];
214
+ if (void 0 !== r) {
215
+ var n = r.call(e, t || "default");
216
+ if ("object" != O(n)) return n;
217
+ throw new TypeError("@@toPrimitive must return a primitive value.");
233
218
  }
234
- return e;
219
+ return ("string" === t ? String : Number)(e);
235
220
  }
236
- var q = {
221
+ var Y = {
237
222
  children: l().node,
238
223
  defaultLeft: l().number,
239
224
  defaultTop: l().number,
@@ -244,17 +229,17 @@
244
229
  tagName: l().string,
245
230
  top: l().object
246
231
  };
247
- var x = {
232
+ var N = {
248
233
  defaultLeft: 0,
249
234
  defaultTop: 0,
250
235
  tagName: "div"
251
236
  };
252
- var X = function(e) {
237
+ var x = function(e) {
253
238
  E(r, e);
254
- var t = R(r);
239
+ var t = L(r);
255
240
  function r(e) {
256
241
  var n;
257
- P(this, r);
242
+ j(this, r);
258
243
  n = t.call(this, e);
259
244
  C(W(n), "defaultWindowOverflowX", "visible");
260
245
  C(W(n), "defaultWindowOverflowY", "visible");
@@ -263,7 +248,7 @@
263
248
  if (!t) {
264
249
  return;
265
250
  }
266
- // if the element is scrollable in both directions, it's not safe to stop propagation.
251
+ // if the element is scrollable in both directions, it's not safe to stop propagation.
267
252
  if (t.clientWidth !== t.scrollWidth && t.clientHeight !== t.scrollHeight) {
268
253
  return;
269
254
  }
@@ -300,7 +285,7 @@
300
285
  n.setState({
301
286
  containerEl: e
302
287
  });
303
- w(n.props.elementRef, e);
288
+ g(n.props.elementRef, e);
304
289
  }));
305
290
  C(W(n), "handleMouseEnter", (function() {
306
291
  n.defaultWindowOverflowX = document.body.style.overflowX;
@@ -325,11 +310,11 @@
325
310
  this.state.containerEl.scrollTop = this.props.defaultTop;
326
311
  this.state.containerEl.scrollLeft = this.props.defaultLeft;
327
312
  }
328
- if (u()(this.props.top)) {
313
+ if (a()(this.props.top)) {
329
314
  var n;
330
315
  this.state.containerEl.scrollTop = ((n = this.props.top) === null || n === void 0 ? void 0 : n.get()) || 0;
331
316
  }
332
- if (u()(this.props.left)) {
317
+ if (a()(this.props.left)) {
333
318
  var o;
334
319
  this.state.containerEl.scrollLeft = ((o = this.props.left) === null || o === void 0 ? void 0 : o.get()) || 0;
335
320
  }
@@ -338,18 +323,18 @@
338
323
  }, {
339
324
  key: "render",
340
325
  value: function e() {
341
- var t = this.props, o = t.children, l = t.onScroll, i = t.stopScrollPropagation, u = t.top, f = t.left;
326
+ var t = this.props, o = t.children, l = t.onScroll, i = t.stopScrollPropagation, a = t.top, u = t.left;
342
327
  var c = this.state.containerEl;
343
- var a = h.animated[this.props.tagName];
328
+ var f = b.animated[this.props.tagName];
344
329
 
345
- return n().createElement(n().Fragment, null, n().createElement(a, S({}, v()(this.props, d()(r.propTypes)), {
330
+ return n().createElement(n().Fragment, null, n().createElement(f, S({}, v()(this.props, d()(r.propTypes)), {
346
331
  ref: this.handleMount,
347
332
  onMouseEnter: i === "window" ? this.handleMouseEnter : undefined,
348
333
  onMouseLeave: i === "window" ? this.handleMouseLeave : undefined,
349
334
  onScroll: l,
350
- scrollTop: u,
351
- scrollLeft: f
352
- }), n().createElement(g.ScrollContainerProvider, {
335
+ scrollTop: a,
336
+ scrollLeft: u
337
+ }), n().createElement(w.ScrollContainerProvider, {
353
338
  value: c
354
339
  }, o)), i === true && c && n().createElement(m(), {
355
340
  target: c,
@@ -363,164 +348,144 @@
363
348
  } ]);
364
349
  return r;
365
350
  }(r.Component);
366
- C(X, "propTypes", q);
367
- C(X, "defaultProps", x);
368
- /* harmony default export */ const Y = X;
351
+ C(x, "propTypes", Y);
352
+ C(x, "defaultProps", N);
353
+ /* harmony default export */ const D = x;
369
354
  // CONCATENATED MODULE: ./src/Scroll/ScrollStyles.ts
370
- var D = a()(Y).withConfig({
355
+ var H = f()(D).withConfig({
371
356
  displayName: "ScrollStyles__StyledInner",
372
357
  componentId: "sc-1xspttf-0"
373
358
  })([ "", ";overflow:auto;overflow-y:auto;overflow-x:hidden;" ], s.mixins.reset("block"));
374
359
  // CONCATENATED MODULE: ./src/Scroll/Scroll.tsx
375
- function H(e) {
360
+ function I(e) {
376
361
  "@babel/helpers - typeof";
377
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
378
- H = function e(t) {
379
- return typeof t;
380
- };
381
- } else {
382
- H = function e(t) {
383
- return t && typeof Symbol === "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
384
- };
385
- }
386
- return H(e);
362
+ return I = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
363
+ return typeof e;
364
+ } : function(e) {
365
+ return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
366
+ }, I(e);
387
367
  }
388
- function N() {
389
- N = Object.assign || function(e) {
368
+ function B() {
369
+ return B = Object.assign ? Object.assign.bind() : function(e) {
390
370
  for (var t = 1; t < arguments.length; t++) {
391
371
  var r = arguments[t];
392
372
  for (var n in r) {
393
- if (Object.prototype.hasOwnProperty.call(r, n)) {
394
- e[n] = r[n];
395
- }
373
+ ({}).hasOwnProperty.call(r, n) && (e[n] = r[n]);
396
374
  }
397
375
  }
398
376
  return e;
399
- };
400
- return N.apply(this, arguments);
377
+ }, B.apply(null, arguments);
401
378
  }
402
- function I(e, t) {
403
- if (e == null) return {};
404
- var r = F(e, t);
405
- var n, o;
379
+ function F(e, t) {
380
+ if (null == e) return {};
381
+ var r, n, o = A(e, t);
406
382
  if (Object.getOwnPropertySymbols) {
407
383
  var l = Object.getOwnPropertySymbols(e);
408
- for (o = 0; o < l.length; o++) {
409
- n = l[o];
410
- if (t.indexOf(n) >= 0) continue;
411
- if (!Object.prototype.propertyIsEnumerable.call(e, n)) continue;
412
- r[n] = e[n];
384
+ for (n = 0; n < l.length; n++) {
385
+ r = l[n], t.includes(r) || {}.propertyIsEnumerable.call(e, r) && (o[r] = e[r]);
413
386
  }
414
387
  }
415
- return r;
388
+ return o;
416
389
  }
417
- function F(e, t) {
418
- if (e == null) return {};
390
+ function A(e, t) {
391
+ if (null == e) return {};
419
392
  var r = {};
420
- var n = Object.keys(e);
421
- var o, l;
422
- for (l = 0; l < n.length; l++) {
423
- o = n[l];
424
- if (t.indexOf(o) >= 0) continue;
425
- r[o] = e[o];
393
+ for (var n in e) {
394
+ if ({}.hasOwnProperty.call(e, n)) {
395
+ if (t.includes(n)) continue;
396
+ r[n] = e[n];
397
+ }
426
398
  }
427
399
  return r;
428
400
  }
429
- function A(e, t) {
430
- if (!(e instanceof t)) {
431
- throw new TypeError("Cannot call a class as a function");
432
- }
433
- }
434
401
  function U(e, t) {
402
+ if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
403
+ }
404
+ function z(e, t) {
435
405
  for (var r = 0; r < t.length; r++) {
436
406
  var n = t[r];
437
- n.enumerable = n.enumerable || false;
438
- n.configurable = true;
439
- if ("value" in n) n.writable = true;
440
- Object.defineProperty(e, n.key, n);
407
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0),
408
+ Object.defineProperty(e, re(n.key), n);
441
409
  }
442
410
  }
443
- function z(e, t, r) {
444
- if (t) U(e.prototype, t);
445
- if (r) U(e, r);
446
- return e;
411
+ function G(e, t, r) {
412
+ return t && z(e.prototype, t), r && z(e, r), Object.defineProperty(e, "prototype", {
413
+ writable: !1
414
+ }), e;
447
415
  }
448
- function B(e, t) {
449
- if (typeof t !== "function" && t !== null) {
450
- throw new TypeError("Super expression must either be null or a function");
451
- }
416
+ function J(e, t) {
417
+ if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
452
418
  e.prototype = Object.create(t && t.prototype, {
453
419
  constructor: {
454
420
  value: e,
455
- writable: true,
456
- configurable: true
421
+ writable: !0,
422
+ configurable: !0
457
423
  }
458
- });
459
- if (t) G(e, t);
424
+ }), Object.defineProperty(e, "prototype", {
425
+ writable: !1
426
+ }), t && K(e, t);
460
427
  }
461
- function G(e, t) {
462
- G = Object.setPrototypeOf || function e(t, r) {
463
- t.__proto__ = r;
464
- return t;
465
- };
466
- return G(e, t);
428
+ function K(e, t) {
429
+ return K = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
430
+ return e.__proto__ = t, e;
431
+ }, K(e, t);
467
432
  }
468
- function J(e) {
469
- var t = V();
470
- return function r() {
471
- var n = Z(e), o;
433
+ function Q(e) {
434
+ var t = $();
435
+ return function() {
436
+ var r, n = ee(e);
472
437
  if (t) {
473
- var l = Z(this).constructor;
474
- o = Reflect.construct(n, arguments, l);
475
- } else {
476
- o = n.apply(this, arguments);
477
- }
478
- return K(this, o);
438
+ var o = ee(this).constructor;
439
+ r = Reflect.construct(n, arguments, o);
440
+ } else r = n.apply(this, arguments);
441
+ return V(this, r);
479
442
  };
480
443
  }
481
- function K(e, t) {
482
- if (t && (H(t) === "object" || typeof t === "function")) {
483
- return t;
484
- }
485
- return Q(e);
444
+ function V(e, t) {
445
+ if (t && ("object" == I(t) || "function" == typeof t)) return t;
446
+ if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined");
447
+ return Z(e);
486
448
  }
487
- function Q(e) {
488
- if (e === void 0) {
489
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
490
- }
449
+ function Z(e) {
450
+ if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
491
451
  return e;
492
452
  }
493
- function V() {
494
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
495
- if (Reflect.construct.sham) return false;
496
- if (typeof Proxy === "function") return true;
453
+ function $() {
497
454
  try {
498
- Date.prototype.toString.call(Reflect.construct(Date, [], (function() {})));
499
- return true;
500
- } catch (e) {
501
- return false;
502
- }
455
+ var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
456
+ } catch (e) {}
457
+ return ($ = function t() {
458
+ return !!e;
459
+ })();
503
460
  }
504
- function Z(e) {
505
- Z = Object.setPrototypeOf ? Object.getPrototypeOf : function e(t) {
506
- return t.__proto__ || Object.getPrototypeOf(t);
507
- };
508
- return Z(e);
461
+ function ee(e) {
462
+ return ee = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
463
+ return e.__proto__ || Object.getPrototypeOf(e);
464
+ }, ee(e);
509
465
  }
510
- function $(e, t, r) {
511
- if (t in e) {
512
- Object.defineProperty(e, t, {
513
- value: r,
514
- enumerable: true,
515
- configurable: true,
516
- writable: true
517
- });
518
- } else {
519
- e[t] = r;
466
+ function te(e, t, r) {
467
+ return (t = re(t)) in e ? Object.defineProperty(e, t, {
468
+ value: r,
469
+ enumerable: !0,
470
+ configurable: !0,
471
+ writable: !0
472
+ }) : e[t] = r, e;
473
+ }
474
+ function re(e) {
475
+ var t = ne(e, "string");
476
+ return "symbol" == I(t) ? t : t + "";
477
+ }
478
+ function ne(e, t) {
479
+ if ("object" != I(e) || !e) return e;
480
+ var r = e[Symbol.toPrimitive];
481
+ if (void 0 !== r) {
482
+ var n = r.call(e, t || "default");
483
+ if ("object" != I(n)) return n;
484
+ throw new TypeError("@@toPrimitive must return a primitive value.");
520
485
  }
521
- return e;
486
+ return ("string" === t ? String : Number)(e);
522
487
  }
523
- var ee = {
488
+ var oe = {
524
489
  children: l().node,
525
490
  elementRef: l().oneOfType([ l().func, l().object ]),
526
491
  left: l().number,
@@ -530,23 +495,23 @@
530
495
  tagName: l().string,
531
496
  top: l().number
532
497
  };
533
- var te = {
498
+ var le = {
534
499
  stopScrollPropagation: false,
535
500
  tagName: "div"
536
501
  };
537
- var re = function(e) {
538
- B(r, e);
539
- var t = J(r);
502
+ var ie = function(e) {
503
+ J(r, e);
504
+ var t = Q(r);
540
505
  // @docs-props-type ScrollPropsBase
541
506
  function r(e) {
542
507
  var o;
543
- A(this, r);
508
+ U(this, r);
544
509
  o = t.call(this, e);
545
- $(Q(o), "handleRest", (function() {
510
+ te(Z(o), "handleRest", (function() {
546
511
  var e, t;
547
512
  (e = (t = o.props).onScrollComplete) === null || e === void 0 ? void 0 : e.call(t);
548
513
  }));
549
- $(Q(o), "handleScroll", (function(e) {
514
+ te(Z(o), "handleScroll", (function(e) {
550
515
  var t, r;
551
516
  o.setState({
552
517
  currentLeft: e.currentTarget.scrollLeft,
@@ -554,15 +519,15 @@
554
519
  });
555
520
  (t = (r = o.props).onScroll) === null || t === void 0 ? void 0 : t.call(r, e);
556
521
  }));
557
- $(Q(o), "renderInner", (function(e) {
558
- var t = o.props, r = t.children, l = t.elementRef, i = t.left, f = t.top, c = t.onScrollComplete, a = I(t, [ "children", "elementRef", "left", "top", "onScrollComplete" ]);
522
+ te(Z(o), "renderInner", (function(e) {
523
+ var t = o.props, r = t.children, l = t.elementRef, i = t.left, u = t.top, c = t.onScrollComplete, f = F(t, [ "children", "elementRef", "left", "top", "onScrollComplete" ]);
559
524
 
560
- return n().createElement(D, N({
525
+ return n().createElement(H, B({
561
526
  "data-test": "scroll"
562
- }, a, {
527
+ }, f, {
563
528
  key: "inner",
564
- top: u()(f) ? e.top : undefined,
565
- left: u()(i) ? e.left : undefined,
529
+ top: a()(u) ? e.top : undefined,
530
+ left: a()(i) ? e.left : undefined,
566
531
  elementRef: l,
567
532
  onScroll: o.handleScroll
568
533
  }), r);
@@ -573,30 +538,30 @@
573
538
  };
574
539
  return o;
575
540
  }
576
- z(r, [ {
541
+ G(r, [ {
577
542
  key: "render",
578
543
  value: function e() {
579
544
  var t = this.props, r = t.left, o = t.top;
580
545
  var l = this.state, i = l.currentLeft, c = l.currentTop;
581
- var a = {};
582
- // When isFinite, the prop is defined and therefore animating.
583
- if (u()(r)) {
584
- a.left = r;
546
+ var f = {};
547
+ // When isFinite, the prop is defined and therefore animating.
548
+ if (a()(r)) {
549
+ f.left = r;
585
550
  } else {
586
- a.left = i;
551
+ f.left = i;
587
552
  }
588
- if (u()(o)) {
589
- a.top = o;
553
+ if (a()(o)) {
554
+ f.top = o;
590
555
  } else {
591
- a.top = c;
556
+ f.top = c;
592
557
  }
593
558
 
594
- return n().createElement(f.Spring, {
559
+ return n().createElement(u.Spring, {
595
560
  from: {
596
561
  left: 0,
597
562
  top: 0
598
563
  },
599
- to: a,
564
+ to: f,
600
565
  onRest: this.handleRest,
601
566
  config: {
602
567
  precision: 10
@@ -606,9 +571,9 @@
606
571
  } ]);
607
572
  return r;
608
573
  }(r.Component);
609
- $(re, "propTypes", ee);
610
- $(re, "defaultProps", te);
611
- /* harmony default export */ const ne = re;
574
+ te(ie, "propTypes", oe);
575
+ te(ie, "defaultProps", le);
576
+ /* harmony default export */ const ae = ie;
612
577
  // CONCATENATED MODULE: ./src/Scroll/index.ts
613
578
  module.exports = t;
614
579
  /******/})();