@enact/ui 5.0.0-alpha.3 → 5.0.0-alpha.5

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 (107) hide show
  1. package/AnnounceDecorator/AnnounceDecorator.js +2 -2
  2. package/AnnounceDecorator/tests/Announce-specs.js +2 -2
  3. package/AnnounceDecorator/tests/AnnounceDecorator-specs.js +2 -2
  4. package/AnnounceDecorator/tests/useAnnounce-specs.js +3 -3
  5. package/BodyText/BodyText.js +2 -2
  6. package/BodyText/tests/BodyText-specs.js +6 -6
  7. package/Button/Button.js +2 -2
  8. package/Button/tests/Button-specs.js +10 -10
  9. package/CHANGELOG.md +22 -1
  10. package/Cancelable/tests/Cancelable-specs.js +19 -19
  11. package/Card/Card.d.ts +77 -0
  12. package/Card/Card.js +215 -0
  13. package/Card/Card.module.css +31 -0
  14. package/Card/package.json +3 -0
  15. package/Card/tests/Card-specs.js +90 -0
  16. package/Changeable/tests/Changeable-specs.js +25 -25
  17. package/ComponentOverride/ComponentOverride.js +3 -3
  18. package/FloatingLayer/FloatingLayer.js +3 -3
  19. package/FloatingLayer/FloatingLayerDecorator.js +3 -3
  20. package/FloatingLayer/Scrim.js +2 -2
  21. package/FloatingLayer/tests/FloatingLayer-specs.js +6 -6
  22. package/FloatingLayer/tests/Scrim-specs.js +2 -2
  23. package/FloatingLayer/tests/useFloatingLayerDecorator-specs.js +3 -3
  24. package/Group/Group.js +2 -2
  25. package/Group/GroupItem.js +2 -2
  26. package/Group/tests/Group-specs.js +11 -11
  27. package/Heading/Heading.js +2 -2
  28. package/Heading/tests/Heading-specs.js +14 -14
  29. package/Icon/Icon.js +3 -2
  30. package/Icon/tests/Icon-specs.js +9 -9
  31. package/Image/Image.js +2 -2
  32. package/Image/tests/Image-specs.js +5 -5
  33. package/ImageItem/ImageItem.js +2 -2
  34. package/ImageItem/tests/ImageItem-specs.js +11 -11
  35. package/Item/Item.js +2 -2
  36. package/Item/tests/Item-specs.js +7 -7
  37. package/LabeledIcon/LabeledIcon.js +3 -3
  38. package/LabeledIcon/tests/LabeledIcon-specs.js +4 -4
  39. package/Layout/Cell.js +2 -2
  40. package/Layout/Layout.js +2 -2
  41. package/Layout/tests/Layout-specs.js +10 -10
  42. package/Marquee/MarqueeBase.js +2 -2
  43. package/Marquee/MarqueeController.js +1 -1
  44. package/Marquee/MarqueeDecorator.js +2 -2
  45. package/Marquee/tests/Marquee-specs.js +44 -44
  46. package/Measurable/tests/Measurable-specs.js +3 -3
  47. package/Media/Media.js +3 -3
  48. package/Media/tests/Media-specs.js +12 -12
  49. package/Placeholder/tests/PlaceholderControllerDecorator-specs.js +1 -1
  50. package/Placeholder/tests/PlaceholderDecorator-specs.js +1 -1
  51. package/ProgressBar/ProgressBar.js +2 -2
  52. package/ProgressBar/tests/ProgressBar-specs.js +7 -7
  53. package/Repeater/Repeater.js +2 -2
  54. package/Repeater/tests/Repeater-specs.js +14 -14
  55. package/Resizable/tests/Resizable-specs.js +1 -1
  56. package/Resizable/tests/useResize-specs.js +1 -1
  57. package/Routable/Link.js +2 -2
  58. package/Routable/Routable.js +2 -2
  59. package/Routable/Router.js +2 -2
  60. package/Routable/tests/Routable-specs.js +1 -1
  61. package/Routable/tests/Router-specs.js +10 -10
  62. package/Routable/util.js +3 -3
  63. package/Scroller/ScrollerBasic.js +2 -2
  64. package/Scroller/tests/Scroller-specs.js +3 -3
  65. package/Skinnable/Skinnable.js +3 -3
  66. package/Skinnable/tests/Skinnable-specs.js +19 -19
  67. package/Skinnable/tests/useSkins-specs.js +14 -14
  68. package/Slider/Knob.js +2 -2
  69. package/Slider/Slider.js +2 -2
  70. package/Slider/tests/Slider-specs.js +7 -7
  71. package/Slottable/tests/Slottable-specs.js +10 -10
  72. package/Slottable/tests/useSlots-specs.js +10 -10
  73. package/Slottable/useSlots.js +2 -2
  74. package/Spinner/Spinner.js +2 -2
  75. package/Spinner/tests/Spinner-specs.js +5 -5
  76. package/ToggleIcon/ToggleIcon.js +2 -2
  77. package/ToggleIcon/tests/ToggleIcon-specs.js +5 -5
  78. package/Toggleable/Toggleable.js +2 -2
  79. package/Toggleable/tests/Toggleable-specs.js +41 -41
  80. package/Toggleable/useToggle.js +2 -2
  81. package/Touchable/Touchable.js +2 -2
  82. package/Touchable/tests/Touchable-specs.js +38 -38
  83. package/Touchable/tests/useTouch-specs.js +17 -17
  84. package/Transition/Transition.js +2 -2
  85. package/Transition/tests/Transition-specs.js +11 -11
  86. package/ViewManager/ViewManager.js +2 -2
  87. package/ViewManager/tests/View-specs.js +13 -13
  88. package/ViewManager/tests/ViewManager-specs.js +50 -50
  89. package/VirtualList/VirtualListBasic.js +3 -3
  90. package/VirtualList/tests/VirtualGridList-native-specs.js +8 -8
  91. package/VirtualList/tests/VirtualGridList-specs.js +25 -25
  92. package/VirtualList/tests/VirtualList-native-specs.js +9 -9
  93. package/VirtualList/tests/VirtualList-specs.js +31 -31
  94. package/internal/IdProvider/tests/IdProvider-specs.js +2 -2
  95. package/internal/IdProvider/tests/useId-specs.js +6 -6
  96. package/internal/Pure/tests/Pure-specs.js +5 -5
  97. package/package.json +7 -7
  98. package/resolution/index.d.ts +5 -1
  99. package/resolution/resolution.js +5 -1
  100. package/resolution/tests/ResolutionDecorator-specs.js +2 -2
  101. package/resolution/tests/resolution-specs.js +46 -19
  102. package/styles/mixins.less +0 -2
  103. package/useControlledState/tests/useControlledState-specs.js +10 -10
  104. package/useScroll/ScrollAnimator.js +3 -3
  105. package/useScroll/Scrollbar.js +2 -2
  106. package/useScroll/ScrollbarTrack.js +2 -2
  107. package/useScroll/useScroll.js +5 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enact/ui",
3
- "version": "5.0.0-alpha.3",
3
+ "version": "5.0.0-alpha.5",
4
4
  "description": "A collection of simplified unstyled cross-platform UI components for Enact",
5
5
  "repository": {
6
6
  "type": "git",
@@ -32,16 +32,16 @@
32
32
  }
33
33
  },
34
34
  "dependencies": {
35
- "@enact/core": "^5.0.0-alpha.3",
36
- "@enact/i18n": "^5.0.0-alpha.3",
35
+ "@enact/core": "^5.0.0-alpha.5",
36
+ "@enact/i18n": "^5.0.0-alpha.5",
37
37
  "classnames": "^2.5.1",
38
- "ilib": "^14.20.0",
38
+ "ilib": "^14.21.0",
39
39
  "invariant": "^2.2.4",
40
40
  "prop-types": "^15.8.1",
41
41
  "ramda": "^0.30.1",
42
- "react": "^18.3.1",
43
- "react-dom": "^18.3.1",
44
- "react-is": "^18.3.1",
42
+ "react": "^19.0.0",
43
+ "react-dom": "^19.0.0",
44
+ "react-is": "^19.0.0",
45
45
  "warning": "^4.0.3"
46
46
  }
47
47
  }
@@ -49,9 +49,13 @@ ri.defineScreenTypes([
49
49
  {name: 'vga', pxPerRem: 8, width: 640, height: 480, aspectRatioName: 'standard'},
50
50
  {name: 'xga', pxPerRem: 16, width: 1024, height: 768, aspectRatioName: 'standard'},
51
51
  {name: 'hd', pxPerRem: 16, width: 1280, height: 720, aspectRatioName: 'hdtv'},
52
+ {name: 'uw-hd', pxPerRem: 16, width: 1920, height: 804, aspectRatioName: 'cinema'},
52
53
  {name: 'fhd', pxPerRem: 24, width: 1920, height: 1080, aspectRatioName: 'hdtv', base: true},
53
54
  {name: 'uw-uxga', pxPerRem: 24, width: 2560, height: 1080, aspectRatioName: 'cinema'},
54
- {name: 'uhd', pxPerRem: 48, width: 3840, height: 2160, aspectRatioName: 'hdtv'}
55
+ {name: 'qhd', pxPerRem: 32, width: 2560, height: 1440, aspectRatioName: 'hdtv'},
56
+ {name: 'wqhd', pxPerRem: 32, width: 3440, height: 1440, aspectRatioName: 'cinema'},
57
+ {name: 'uhd', pxPerRem: 48, width: 3840, height: 2160, aspectRatioName: 'hdtv'},
58
+ {name: 'uhd2', pxPerRem: 96, width: 7680, height: 4320, aspectRatioName: 'hdtv'}
55
59
  ]);
56
60
  ```
57
61
  */
@@ -126,9 +126,13 @@ function getScreenTypeObject(type) {
126
126
  * {name: 'vga', pxPerRem: 8, width: 640, height: 480, aspectRatioName: 'standard'},
127
127
  * {name: 'xga', pxPerRem: 16, width: 1024, height: 768, aspectRatioName: 'standard'},
128
128
  * {name: 'hd', pxPerRem: 16, width: 1280, height: 720, aspectRatioName: 'hdtv'},
129
+ * {name: 'uw-hd', pxPerRem: 16, width: 1920, height: 804, aspectRatioName: 'cinema'},
129
130
  * {name: 'fhd', pxPerRem: 24, width: 1920, height: 1080, aspectRatioName: 'hdtv', base: true},
130
131
  * {name: 'uw-uxga', pxPerRem: 24, width: 2560, height: 1080, aspectRatioName: 'cinema'},
131
- * {name: 'uhd', pxPerRem: 48, width: 3840, height: 2160, aspectRatioName: 'hdtv'}
132
+ * {name: 'qhd', pxPerRem: 32, width: 2560, height: 1440, aspectRatioName: 'hdtv'},
133
+ * {name: 'wqhd', pxPerRem: 32, width: 3440, height: 1440, aspectRatioName: 'cinema'},
134
+ * {name: 'uhd', pxPerRem: 48, width: 3840, height: 2160, aspectRatioName: 'hdtv'},
135
+ * {name: 'uhd2', pxPerRem: 96, width: 7680, height: 4320, aspectRatioName: 'hdtv'}
132
136
  * ]);
133
137
  * ```
134
138
  *
@@ -8,7 +8,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default":
8
8
  describe('ResolutionDecorator Specs', function () {
9
9
  test('should apply resolution classes to the wrapped component', function () {
10
10
  var Component = (0, _ResolutionDecorator["default"])('div');
11
- (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
11
+ (0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
12
12
  "data-testid": "component"
13
13
  }));
14
14
  var div = _react.screen.getByTestId('component').className;
@@ -29,7 +29,7 @@ describe('ResolutionDecorator Specs', function () {
29
29
  var Component = (0, _ResolutionDecorator["default"])({
30
30
  screenTypes: screens
31
31
  }, 'div');
32
- (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
32
+ (0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
33
33
  "data-testid": "component"
34
34
  }));
35
35
  var div = _react.screen.getByTestId('component');
@@ -20,6 +20,12 @@ describe('Resolution Specs', function () {
20
20
  width: 1280,
21
21
  height: 720,
22
22
  aspectRatioName: 'hdtv'
23
+ }, {
24
+ name: 'uw-hd',
25
+ pxPerRem: 16,
26
+ width: 1920,
27
+ height: 804,
28
+ aspectRatioName: 'cinema'
23
29
  }, {
24
30
  name: 'fhd',
25
31
  pxPerRem: 24,
@@ -70,6 +76,10 @@ describe('Resolution Specs', function () {
70
76
  width: 1280,
71
77
  height: 720
72
78
  };
79
+ var UWHD = {
80
+ width: 1920,
81
+ height: 804
82
+ };
73
83
  var FHD = {
74
84
  width: 1920,
75
85
  height: 1080
@@ -100,6 +110,7 @@ describe('Resolution Specs', function () {
100
110
  expect((0, _resolution.getScreenType)(VGA)).toBe('vga');
101
111
  expect((0, _resolution.getScreenType)(XGA)).toBe('xga');
102
112
  expect((0, _resolution.getScreenType)(HD)).toBe('hd');
113
+ expect((0, _resolution.getScreenType)(UWHD)).toBe('uw-hd');
103
114
  expect((0, _resolution.getScreenType)(FHD)).toBe('fhd');
104
115
  expect((0, _resolution.getScreenType)(UWUXGA)).toBe('uw-uxga');
105
116
  expect((0, _resolution.getScreenType)(QHD)).toBe('qhd');
@@ -209,22 +220,28 @@ describe('Resolution Specs', function () {
209
220
  width: FHD.width - 1,
210
221
  height: FHD.height - 1
211
222
  })).toBe('hd');
212
- expect((0, _resolution.getScreenType)({
213
- width: FHD.width + 1,
214
- height: FHD.height - 1
215
- })).toBe('hd');
216
223
  expect((0, _resolution.getScreenType)({
217
224
  width: FHD.width - 1,
218
225
  height: FHD.height + 1
219
226
  })).toBe('hd');
227
+
228
+ // UWHD
229
+ expect((0, _resolution.getScreenType)({
230
+ width: UWHD.width + 1,
231
+ height: UWHD.height + 1
232
+ })).toBe('uw-hd');
233
+ expect((0, _resolution.getScreenType)({
234
+ width: FHD.width + 1,
235
+ height: FHD.height - 1
236
+ })).toBe('uw-hd');
220
237
  expect((0, _resolution.getScreenType)({
221
238
  width: UWUXGA.width - 1,
222
239
  height: UWUXGA.height - 1
223
- })).toBe('hd'); // {height: FHD.height - 1, width: UWUXGA.width - 1}
240
+ })).toBe('uw-hd');
224
241
  expect((0, _resolution.getScreenType)({
225
242
  width: UWUXGA.width + 1,
226
243
  height: UWUXGA.height - 1
227
- })).toBe('hd'); // {height: FHD.height - 1, width: UWUXGA.width + 1}
244
+ })).toBe('uw-hd');
228
245
 
229
246
  // FHD
230
247
  expect((0, _resolution.getScreenType)({
@@ -368,55 +385,65 @@ describe('Resolution Specs', function () {
368
385
  height: HD.height - 1
369
386
  })).toBe('hd');
370
387
 
371
- // FHD
388
+ // UWHD
389
+ expect((0, _resolution.getScreenType)({
390
+ width: UWHD.width - 1,
391
+ height: UWHD.height - 1
392
+ })).toBe('uw-hd');
372
393
  expect((0, _resolution.getScreenType)({
373
394
  width: XGA.width + 1,
374
395
  height: XGA.height - 1
375
- })).toBe('fhd');
396
+ })).toBe('uw-hd');
376
397
  expect((0, _resolution.getScreenType)({
377
398
  width: XGA.width - 1,
378
399
  height: XGA.height + 1
379
- })).toBe('fhd');
400
+ })).toBe('uw-hd');
380
401
  expect((0, _resolution.getScreenType)({
381
402
  width: XGA.width + 1,
382
403
  height: XGA.height + 1
383
- })).toBe('fhd');
404
+ })).toBe('uw-hd');
384
405
  expect((0, _resolution.getScreenType)({
385
406
  width: HD.width,
386
407
  height: XGA.height
387
- })).toBe('fhd');
408
+ })).toBe('uw-hd');
388
409
  expect((0, _resolution.getScreenType)({
389
410
  width: HD.width - 1,
390
411
  height: XGA.height - 1
391
- })).toBe('fhd');
412
+ })).toBe('uw-hd');
392
413
  expect((0, _resolution.getScreenType)({
393
414
  width: HD.width + 1,
394
415
  height: XGA.height - 1
395
- })).toBe('fhd');
416
+ })).toBe('uw-hd');
396
417
  expect((0, _resolution.getScreenType)({
397
418
  width: HD.width - 1,
398
419
  height: XGA.height + 1
399
- })).toBe('fhd');
420
+ })).toBe('uw-hd');
400
421
  expect((0, _resolution.getScreenType)({
401
422
  width: HD.width + 1,
402
423
  height: XGA.height + 1
403
- })).toBe('fhd');
424
+ })).toBe('uw-hd');
404
425
  expect((0, _resolution.getScreenType)({
405
426
  width: XGA.width + 1,
406
427
  height: HD.height + 1
407
- })).toBe('fhd');
428
+ })).toBe('uw-hd');
408
429
  expect((0, _resolution.getScreenType)({
409
430
  width: HD.width + 1,
410
431
  height: HD.height - 1
411
- })).toBe('fhd');
432
+ })).toBe('uw-hd');
412
433
  expect((0, _resolution.getScreenType)({
413
434
  width: HD.width - 1,
414
435
  height: HD.height + 1
415
- })).toBe('fhd');
436
+ })).toBe('uw-hd');
416
437
  expect((0, _resolution.getScreenType)({
417
438
  width: HD.width + 1,
418
439
  height: HD.height + 1
419
- })).toBe('fhd');
440
+ })).toBe('uw-hd');
441
+ expect((0, _resolution.getScreenType)({
442
+ width: HD.width + 1,
443
+ height: UWHD.height - 1
444
+ })).toBe('uw-hd');
445
+
446
+ // FHD
420
447
  expect((0, _resolution.getScreenType)({
421
448
  width: FHD.width - 1,
422
449
  height: FHD.height - 1
@@ -154,9 +154,7 @@
154
154
  }
155
155
 
156
156
  .vendor-opacity(@opacity) {
157
- @opacity-ie: (@opacity * 100); // Less doesn't like math inside `alpha`
158
157
  opacity: @opacity;
159
- filter: alpha(opacity=@opacity-ie);
160
158
  }
161
159
 
162
160
  // Shorthand for positioning code
@@ -28,29 +28,29 @@ describe('useControlledState', function () {
28
28
  });
29
29
  }
30
30
  test('should use the default value when the value is undefined', function () {
31
- (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
31
+ (0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
32
32
  defaultValue: "abc"
33
33
  }));
34
34
  var actual = _react.screen.queryByText('abc');
35
35
  expect(actual).toBeInTheDocument();
36
36
  });
37
37
  test('should not change default value', function () {
38
- var _render = (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
38
+ var _render = (0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
39
39
  defaultValue: "abc"
40
40
  })),
41
41
  rerender = _render.rerender;
42
- rerender( /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
42
+ rerender(/*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
43
43
  defaultValue: "def"
44
44
  }));
45
45
  var actual = _react.screen.queryByText('abc');
46
46
  expect(actual).toBeInTheDocument();
47
47
  });
48
48
  test('should not change uncontrolled setting', function () {
49
- var _render2 = (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
49
+ var _render2 = (0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
50
50
  defaultValue: "abc"
51
51
  })),
52
52
  rerender = _render2.rerender;
53
- rerender( /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
53
+ rerender(/*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
54
54
  defaultValue: null,
55
55
  value: "def"
56
56
  }));
@@ -58,22 +58,22 @@ describe('useControlledState', function () {
58
58
  expect(actual).toBeInTheDocument();
59
59
  });
60
60
  test('should update controlled value', function () {
61
- var _render3 = (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
61
+ var _render3 = (0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
62
62
  value: "abc"
63
63
  })),
64
64
  rerender = _render3.rerender;
65
- rerender( /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
65
+ rerender(/*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
66
66
  value: "def"
67
67
  }));
68
68
  var actual = _react.screen.queryByText('def');
69
69
  expect(actual).toBeInTheDocument();
70
70
  });
71
71
  test('should not change controlled setting', function () {
72
- var _render4 = (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
72
+ var _render4 = (0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
73
73
  value: "abc"
74
74
  })),
75
75
  rerender = _render4.rerender;
76
- rerender( /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
76
+ rerender(/*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
77
77
  defaultValue: "def",
78
78
  value: "ghi"
79
79
  }));
@@ -83,7 +83,7 @@ describe('useControlledState', function () {
83
83
  test('should not allow setting a value when controlled', function () {
84
84
  var handleChange = jest.fn();
85
85
  var value = 'ghi';
86
- (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
86
+ (0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
87
87
  onChange: handleChange,
88
88
  value: "abc"
89
89
  }));
@@ -97,10 +97,10 @@ var ScrollAnimator = exports.ScrollAnimator = /*#__PURE__*/function () {
97
97
  var _this = this;
98
98
  var rAF = window.requestAnimationFrame,
99
99
  startTimeStamp = (0, _util.perfNow)(),
100
- fn = function fn() {
100
+ _fn = function fn() {
101
101
  var
102
102
  // schedule next frame
103
- rAFId = rAF(fn),
103
+ rAFId = rAF(_fn),
104
104
  // current timestamp
105
105
  curTimeStamp = (0, _util.perfNow)(),
106
106
  // current time if 0 at starting position
@@ -108,7 +108,7 @@ var ScrollAnimator = exports.ScrollAnimator = /*#__PURE__*/function () {
108
108
  _this.rAFId = rAFId;
109
109
  rAFCallbackFuntion(curTime);
110
110
  };
111
- this.rAFId = rAF(fn);
111
+ this.rAFId = rAF(_fn);
112
112
  }
113
113
  }, {
114
114
  key: "isAnimating",
@@ -27,8 +27,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
27
27
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
28
28
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
29
29
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
30
- function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
31
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
30
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
31
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
32
32
  var scrollbarTrackHidingDelay = 900; // 900ms + 100ms(fade out duration) = 1000ms.
33
33
 
34
34
  var addClass = function addClass(element, className) {
@@ -24,8 +24,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
24
24
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
25
25
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
26
26
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
27
- function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
28
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
27
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
28
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
29
29
  var ScrollbarTrack = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
30
30
  var _props$vertical = props.vertical,
31
31
  vertical = _props$vertical === void 0 ? true : _props$vertical,
@@ -48,8 +48,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
48
48
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
49
49
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
50
50
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
51
- function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
52
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
51
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
52
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
53
53
  var constants = exports.constants = {
54
54
  animationDuration: 1000,
55
55
  epsilon: 1,
@@ -156,6 +156,7 @@ var useScrollBase = exports.useScrollBase = function useScrollBase(props) {
156
156
  delete rest.onScrollStart;
157
157
  delete rest.onScrollStop;
158
158
  delete rest.onWheel;
159
+ delete rest.preventScroll; // scrollMode 'native'
159
160
  delete rest.removeEventListeners;
160
161
  delete rest.scrollStopOnScroll; // scrollMode 'native'
161
162
  delete rest.scrollTo;
@@ -815,6 +816,8 @@ var useScrollBase = exports.useScrollBase = function useScrollBase(props) {
815
816
  scrollByPage(ev.keyCode);
816
817
  }
817
818
  } else {
819
+ var _props$preventScroll;
820
+ (_props$preventScroll = props.preventScroll) === null || _props$preventScroll === void 0 || _props$preventScroll.call(props, ev);
818
821
  (0, _handle.forward)('onKeyDown', ev, props);
819
822
  }
820
823
  }