@enact/ui 4.8.0 → 4.9.0-alpha.2

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 (53) hide show
  1. package/AnnounceDecorator/Announce.js +1 -1
  2. package/CHANGELOG.md +18 -0
  3. package/Cancelable/Cancelable.js +1 -1
  4. package/Changeable/Changeable.js +1 -1
  5. package/FloatingLayer/FloatingLayer.js +1 -1
  6. package/FloatingLayer/Scrim.js +1 -1
  7. package/Layout/Cell.js +14 -2
  8. package/Layout/Layout.d.ts +8 -1
  9. package/Marquee/MarqueeController.js +23 -284
  10. package/Marquee/MarqueeDecorator.js +1 -1
  11. package/Marquee/index.d.ts +18 -18
  12. package/Marquee/useMarqueeController.js +273 -0
  13. package/Media/Media.js +1 -1
  14. package/Placeholder/PlaceholderControllerDecorator.js +1 -1
  15. package/Placeholder/PlaceholderDecorator.js +1 -1
  16. package/RadioDecorator/RadioControllerDecorator.js +1 -1
  17. package/RadioDecorator/RadioDecorator.js +1 -1
  18. package/Repeater/Repeater.js +7 -3
  19. package/Routable/Link.js +1 -1
  20. package/Routable/Router.js +1 -1
  21. package/Scrollable/Scrollable.js +1 -1
  22. package/Scrollable/ScrollableNative.js +2 -2
  23. package/Scrollable/Scrollbar.js +1 -1
  24. package/Scroller/Scroller.js +20 -18
  25. package/Scroller/Scroller.module.css +3 -0
  26. package/Scroller/ScrollerBasic.js +2 -2
  27. package/Scroller/UiScroller.module.css +3 -0
  28. package/Scroller/UiScrollerBase.js +2 -2
  29. package/Slider/PositionDecorator.js +1 -1
  30. package/Slottable/tests/Slottable-specs.js +2 -4
  31. package/Toggleable/Toggleable.js +11 -5
  32. package/Touchable/ClickAllow.js +1 -1
  33. package/Touchable/Touch.js +3 -3
  34. package/Touchable/Touchable.js +11 -6
  35. package/Transition/Transition.js +1 -1
  36. package/ViewManager/TransitionGroup.js +1 -1
  37. package/ViewManager/View.js +1 -1
  38. package/ViewManager/ViewManager.js +1 -1
  39. package/ViewManager/tests/ViewManager-specs.js +1 -1
  40. package/VirtualList/UiVirtualList.module.css +3 -0
  41. package/VirtualList/UiVirtualListBase.js +2 -2
  42. package/VirtualList/VirtualList.d.ts +13 -13
  43. package/VirtualList/VirtualList.js +25 -21
  44. package/VirtualList/VirtualList.module.css +3 -0
  45. package/VirtualList/VirtualListBasic.js +2 -2
  46. package/internal/Pure/Pure.js +1 -1
  47. package/internal/Pure/tests/Pure-specs.js +1 -1
  48. package/package.json +5 -5
  49. package/resolution/ResolutionDecorator.js +1 -1
  50. package/resolution/tests/resolution-specs.js +503 -13
  51. package/useScroll/Scrollbar.js +18 -8
  52. package/useScroll/ScrollbarTrack.js +7 -8
  53. package/useScroll/useScroll.js +1 -1
@@ -51,7 +51,7 @@ var ClickAllow = exports.ClickAllow = /*#__PURE__*/function () {
51
51
  var timeStamp = ev.timeStamp;
52
52
 
53
53
  // iOS Safari sends both touch and mouse events (with differing timestamps)
54
- return !_platform.platform.ios && this.lastTouchEndTime !== timeStamp && shouldAllowMouseDown(ev);
54
+ return !(_platform.platform.browserName === 'safari' && _platform.platform.type === 'mobile') && this.lastTouchEndTime !== timeStamp && shouldAllowMouseDown(ev);
55
55
  }
56
56
  }, {
57
57
  key: "shouldAllowTap",
@@ -130,7 +130,7 @@ var Touch = exports.Touch = /*#__PURE__*/function () {
130
130
  onMouseLeave: handleMouseLeave.bindAs(this, 'handleMouseLeave'),
131
131
  onMouseUp: handleMouseUp.bindAs(this, 'handleMouseUp')
132
132
  };
133
- if (_platform["default"].touch) {
133
+ if (_platform["default"].touchEvent) {
134
134
  Object.assign(this.handlers, {
135
135
  onTouchStart: handleTouchStart.bindAs(this, 'handleTouchStart'),
136
136
  onTouchMove: handleTouchMove.bindAs(this, 'handleTouchMove'),
@@ -162,7 +162,7 @@ var Touch = exports.Touch = /*#__PURE__*/function () {
162
162
  key: "addGlobalHandlers",
163
163
  value: function addGlobalHandlers() {
164
164
  // ensure we clean up our internal state
165
- if (_platform["default"].touch) {
165
+ if (_platform["default"].touchEvent) {
166
166
  (0, _dispatcher.on)('touchend', this.handleGlobalUp, document);
167
167
  }
168
168
  (0, _dispatcher.on)('mouseup', this.handleGlobalUp, document);
@@ -171,7 +171,7 @@ var Touch = exports.Touch = /*#__PURE__*/function () {
171
171
  }, {
172
172
  key: "removeGlobalHandlers",
173
173
  value: function removeGlobalHandlers() {
174
- if (_platform["default"].touch) {
174
+ if (_platform["default"].touchEvent) {
175
175
  (0, _dispatcher.off)('touchend', this.handleGlobalUp, document);
176
176
  }
177
177
  (0, _dispatcher.off)('mouseup', this.handleGlobalUp, document);
@@ -27,7 +27,8 @@ var _Hold = require("./Hold");
27
27
  var _Pinch = require("./Pinch");
28
28
  var _useTouch = _interopRequireDefault(require("./useTouch"));
29
29
  var _jsxRuntime = require("react/jsx-runtime");
30
- var _excluded = ["dragConfig", "flickConfig", "holdConfig", "pinchConfig", "disabled", "noResume", "onBlur", "onClick", "onMouseDown", "onMouseEnter", "onMouseLeave", "onMouseMove", "onMouseUp", "onTouchEnd", "onTouchMove", "onTouchStart", "onDown", "onDrag", "onDragEnd", "onDragStart", "onFlick", "onHold", "onHoldEnd", "onHoldStart", "onMove", "onPinch", "onPinchEnd", "onPinchStart", "onTap", "onUp"];
30
+ var _excluded = ["dragConfig", "flickConfig", "holdConfig", "pinchConfig", "disabled", "noResume", "onBlur", "onClick", "onMouseDown", "onMouseEnter", "onMouseLeave", "onMouseMove", "onMouseUp", "onTouchEnd", "onTouchMove", "onTouchStart", "onDown", "onDrag", "onDragEnd", "onDragStart", "onFlick", "onHold", "onHoldEnd", "onHoldStart", "onMove", "onPinch", "onPinchEnd", "onPinchStart", "onTap", "onUp"],
31
+ _excluded2 = ["disabled", "noResume"];
31
32
  /**
32
33
  * Application support for gestures.
33
34
  *
@@ -153,7 +154,15 @@ var Touchable = exports.Touchable = (0, _hoc["default"])(defaultConfig, function
153
154
 
154
155
  // eslint-disable-next-line no-shadow
155
156
  var Touchable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
156
- var _selectProps = selectProps(props),
157
+ var _props$disabled = props.disabled,
158
+ disabled = _props$disabled === void 0 ? false : _props$disabled,
159
+ _props$noResume = props.noResume,
160
+ noResume = _props$noResume === void 0 ? false : _props$noResume,
161
+ rest = _objectWithoutProperties(props, _excluded2);
162
+ var _selectProps = selectProps(_objectSpread({
163
+ disabled: disabled,
164
+ noResume: noResume
165
+ }, rest)),
157
166
  configForHook = _selectProps.configForHook,
158
167
  propsForWrapped = _selectProps.propsForWrapped;
159
168
  var hook = (0, _useTouch["default"])(_objectSpread({
@@ -393,10 +402,6 @@ var Touchable = exports.Touchable = (0, _hoc["default"])(defaultConfig, function
393
402
  */
394
403
  pinchConfig: _Pinch.pinchConfigPropType
395
404
  };
396
- Touchable.defaultProps = {
397
- disabled: false,
398
- noResume: false
399
- };
400
405
  Touchable.displayName = 'Touchable';
401
406
  return Touchable;
402
407
  });
@@ -24,7 +24,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
24
24
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
25
25
  function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
26
26
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
27
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
27
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
28
28
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
29
29
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
30
30
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
@@ -27,7 +27,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
27
27
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
28
28
  function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
29
29
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
30
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
30
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
31
31
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } /*
32
32
  * Exports the {@link ui/ViewManager.TransitionGroup} component.
33
33
  */ // Using string refs from the source code of ReactTransitionGroup
@@ -24,7 +24,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
24
24
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
25
25
  function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
26
26
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
27
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
27
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
28
28
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } /*
29
29
  * Exports the {@link ui/ViewManager.View} component.
30
30
  */ // If the View was "appearing", then entering will always be false and this will not result in a
@@ -72,7 +72,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
72
72
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
73
73
  function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
74
74
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
75
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
75
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
76
76
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
77
77
  var ViewManagerBase = exports.ViewManagerBase = (_class = /*#__PURE__*/function (_Component) {
78
78
  _inherits(ViewManagerBase, _Component);
@@ -20,7 +20,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
20
20
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
21
21
  function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
22
22
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
23
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
23
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
24
24
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
25
25
  describe('ViewManager', function () {
26
26
  // Suite-wide setup
@@ -3,6 +3,8 @@
3
3
  height: 100%;
4
4
  width: 100%;
5
5
  overflow: hidden;
6
+ /* hide native scrollbar */
7
+ scrollbar-width: none;
6
8
  }
7
9
  .virtualList.vertical {
8
10
  overflow-y: scroll;
@@ -18,6 +20,7 @@
18
20
  .virtualList .content {
19
21
  will-change: transform;
20
22
  }
23
+ /* NOTE: Needs to be revisited whether it can be replaced with scrollbar-width */
21
24
  .virtualList::-webkit-scrollbar {
22
25
  display: none;
23
26
  }
@@ -36,7 +36,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
36
36
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
37
37
  function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
38
38
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
39
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
39
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
40
40
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
41
41
  var nop = function nop() {},
42
42
  JS = 'JS',
@@ -668,7 +668,7 @@ var VirtualListBaseFactory = function VirtualListBaseFactory(type) {
668
668
  this.scrollPositionTarget = x;
669
669
  }
670
670
  if (rtl) {
671
- x = _platform.platform.ios || _platform.platform.safari || _platform.platform.chrome >= 85 || _platform.platform.androidChrome >= 85 ? -x : this.scrollBounds.maxLeft - x;
671
+ x = _platform.platform.chrome < 85 ? this.scrollBounds.maxLeft - x : -x;
672
672
  }
673
673
  this.containerRef.current.scrollTo(x, y);
674
674
  }
@@ -18,6 +18,19 @@ export interface gridListItemSizeShape {
18
18
  */;
19
19
  minHeight: number;
20
20
  }
21
+ /**
22
+ * The shape for the list different item size
23
+ in a list for .
24
+ */
25
+ export interface itemSizesShape {
26
+ /**
27
+ * The minimum size of the list item.
28
+ */
29
+ minSize: number /**
30
+ * An array of the list item size. If it is not defined, the list items will render with the `minSize` size.
31
+ */;
32
+ size: number[];
33
+ }
21
34
  export interface VirtualListProps extends VirtualListBasicProps {
22
35
  /**
23
36
  * A callback function that receives a reference to the `scrollTo` feature.
@@ -153,19 +166,6 @@ export class VirtualList extends React.Component<
153
166
  Merge<React.HTMLProps<HTMLElement>, VirtualListProps>
154
167
  > {}
155
168
 
156
- /**
157
- * The shape for the list different item size
158
- in a list for .
159
- */
160
- export interface itemSizesShape {
161
- /**
162
- * The minimum size of the list item.
163
- */
164
- minSize: number /**
165
- * An array of the list item size. If it is not defined, the list items will render with the `minSize` size.
166
- */;
167
- size: number[];
168
- }
169
169
  export interface VirtualListBasicProps {
170
170
  /**
171
171
  * The rendering function called for each item in the list.
@@ -59,6 +59,24 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
59
59
  * @exports VirtualListBasic
60
60
  */
61
61
  var nop = function nop() {};
62
+ var virtualListDefaultProps = {
63
+ cbScrollTo: nop,
64
+ direction: 'vertical',
65
+ horizontalScrollbar: 'auto',
66
+ noScrollByDrag: false,
67
+ noScrollByWheel: false,
68
+ onScroll: nop,
69
+ onScrollStart: nop,
70
+ onScrollStop: nop,
71
+ overscrollEffectOn: {
72
+ drag: false,
73
+ pageKey: false,
74
+ wheel: false
75
+ },
76
+ role: 'list',
77
+ scrollMode: 'translate',
78
+ verticalScrollbar: 'auto'
79
+ };
62
80
 
63
81
  /**
64
82
  * An unstyled scrollable virtual list component with touch support.
@@ -72,7 +90,8 @@ var nop = function nop() {};
72
90
  var VirtualList = exports.VirtualList = function VirtualList(props) {
73
91
  // Hooks
74
92
 
75
- var _useScroll = (0, _useScroll3["default"])(props),
93
+ var virtualListProps = Object.assign({}, virtualListDefaultProps, props);
94
+ var _useScroll = (0, _useScroll3["default"])(virtualListProps),
76
95
  scrollContentHandle = _useScroll.scrollContentHandle,
77
96
  ScrollContentWrapper = _useScroll.scrollContentWrapper,
78
97
  isHorizontalScrollbarVisible = _useScroll.isHorizontalScrollbarVisible,
@@ -294,7 +313,8 @@ VirtualList.propTypes = /** @lends ui/VirtualList.VirtualList.prototype */{
294
313
  */
295
314
  verticalScrollbar: _propTypes["default"].oneOf(['auto', 'visible', 'hidden'])
296
315
  };
297
- VirtualList.defaultProps = {
316
+ VirtualList.defaultPropValues = virtualListDefaultProps;
317
+ var virtualGridListDefaultProps = {
298
318
  cbScrollTo: nop,
299
319
  direction: 'vertical',
300
320
  horizontalScrollbar: 'auto',
@@ -323,7 +343,8 @@ VirtualList.defaultProps = {
323
343
  * @public
324
344
  */
325
345
  var VirtualGridList = exports.VirtualGridList = function VirtualGridList(props) {
326
- var _useScroll2 = (0, _useScroll3["default"])(props),
346
+ var virtualGridListProps = Object.assign({}, virtualGridListDefaultProps, props);
347
+ var _useScroll2 = (0, _useScroll3["default"])(virtualGridListProps),
327
348
  scrollContentHandle = _useScroll2.scrollContentHandle,
328
349
  ScrollContentWrapper = _useScroll2.scrollContentWrapper,
329
350
  isHorizontalScrollbarVisible = _useScroll2.isHorizontalScrollbarVisible,
@@ -542,22 +563,5 @@ VirtualGridList.propTypes = /** @lends ui/VirtualList.VirtualGridList.prototype
542
563
  */
543
564
  verticalScrollbar: _propTypes["default"].oneOf(['auto', 'visible', 'hidden'])
544
565
  };
545
- VirtualGridList.defaultProps = {
546
- cbScrollTo: nop,
547
- direction: 'vertical',
548
- horizontalScrollbar: 'auto',
549
- noScrollByDrag: false,
550
- noScrollByWheel: false,
551
- onScroll: nop,
552
- onScrollStart: nop,
553
- onScrollStop: nop,
554
- overscrollEffectOn: {
555
- drag: false,
556
- pageKey: false,
557
- wheel: false
558
- },
559
- role: 'list',
560
- scrollMode: 'translate',
561
- verticalScrollbar: 'auto'
562
- };
566
+ VirtualGridList.defaultPropValues = virtualGridListDefaultProps;
563
567
  var _default = exports["default"] = VirtualList;
@@ -3,6 +3,8 @@
3
3
  height: 100%;
4
4
  width: 100%;
5
5
  overflow: hidden;
6
+ /* hide native scrollbar */
7
+ scrollbar-width: none;
6
8
  }
7
9
  .virtualList .content {
8
10
  will-change: transform;
@@ -23,6 +25,7 @@
23
25
  position: absolute;
24
26
  will-change: transform;
25
27
  }
28
+ /* NOTE: Needs to be revisited whether it can be replaced with scrollbar-width */
26
29
  .virtualList::-webkit-scrollbar {
27
30
  display: none;
28
31
  }
@@ -37,7 +37,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
37
37
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
38
38
  function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
39
39
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
40
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
40
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
41
41
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
42
42
  var nop = function nop() {};
43
43
 
@@ -264,7 +264,7 @@ var VirtualListBasic = exports.VirtualListBasic = /*#__PURE__*/function (_Compon
264
264
  // scrollMode 'native' only
265
265
  _this.getRtlPositionX = function (x) {
266
266
  if (_this.props.rtl) {
267
- return _platform.platform.ios || _platform.platform.safari || _platform.platform.chrome >= 85 || _platform.platform.androidChrome >= 85 ? -x : _this.scrollBounds.maxLeft - x;
267
+ return _platform.platform.chrome < 85 ? _this.scrollBounds.maxLeft - x : -x;
268
268
  }
269
269
  return x;
270
270
  };
@@ -21,7 +21,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
21
21
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
22
22
  function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
23
23
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
24
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
24
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
25
25
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } /**
26
26
  * Exports the {@link ui/internal/Pure.Pure} higher-order component (HOC).
27
27
  *
@@ -20,7 +20,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
20
20
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
21
21
  function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
22
22
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
23
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
23
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
24
24
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
25
25
  var defaultConfig = {
26
26
  propComparators: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enact/ui",
3
- "version": "4.8.0",
3
+ "version": "4.9.0-alpha.2",
4
4
  "description": "A collection of simplified unstyled cross-platform UI components for Enact",
5
5
  "repository": {
6
6
  "type": "git",
@@ -32,15 +32,15 @@
32
32
  }
33
33
  },
34
34
  "dependencies": {
35
- "@enact/core": "^4.8.0",
35
+ "@enact/core": "^4.9.0-alpha.2",
36
36
  "classnames": "^2.5.1",
37
37
  "direction": "^1.0.4",
38
38
  "invariant": "^2.2.4",
39
39
  "prop-types": "^15.8.1",
40
40
  "ramda": "^0.29.1",
41
- "react": "^18.2.0",
42
- "react-dom": "^18.2.0",
43
- "react-is": "^18.2.0",
41
+ "react": "^18.3.1",
42
+ "react-dom": "^18.3.1",
43
+ "react-is": "^18.3.1",
44
44
  "warning": "^4.0.3"
45
45
  }
46
46
  }
@@ -24,7 +24,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
24
24
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
25
25
  function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
26
26
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
27
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
27
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
28
28
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } /*
29
29
  * Exports the {@link ui/resolution.ResolutionDecorator} higher-order component (HOC).
30
30
  *