@enact/ui 4.5.2 → 4.5.4

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 (167) hide show
  1. package/AnnounceDecorator/Announce.js +1 -40
  2. package/AnnounceDecorator/AnnounceDecorator.js +3 -21
  3. package/AnnounceDecorator/tests/Announce-specs.js +2 -7
  4. package/AnnounceDecorator/tests/AnnounceDecorator-specs.js +2 -6
  5. package/AnnounceDecorator/tests/useAnnounce-specs.js +8 -19
  6. package/AnnounceDecorator/useAnnounce.js +0 -6
  7. package/BodyText/BodyText.js +6 -26
  8. package/BodyText/tests/BodyText-specs.js +0 -19
  9. package/Button/Button.js +26 -56
  10. package/Button/tests/Button-specs.js +0 -26
  11. package/CHANGELOG.md +10 -0
  12. package/Cancelable/Cancelable.js +8 -47
  13. package/Cancelable/cancelHandler.js +5 -12
  14. package/Cancelable/modalHandler.js +3 -11
  15. package/Cancelable/tests/Cancelable-specs.js +3 -57
  16. package/Changeable/Changeable.js +2 -34
  17. package/Changeable/tests/Changeable-specs.js +20 -66
  18. package/ComponentOverride/ComponentOverride.js +1 -13
  19. package/FloatingLayer/FloatingLayer.js +17 -73
  20. package/FloatingLayer/FloatingLayerContainer.js +0 -15
  21. package/FloatingLayer/FloatingLayerDecorator.js +4 -17
  22. package/FloatingLayer/Scrim.js +9 -53
  23. package/FloatingLayer/index.js +0 -4
  24. package/FloatingLayer/tests/FloatingLayer-specs.js +8 -22
  25. package/FloatingLayer/tests/Scrim-specs.js +0 -9
  26. package/FloatingLayer/tests/useFloatingLayerDecorator-specs.js +0 -13
  27. package/FloatingLayer/useFloatingLayer.js +3 -14
  28. package/FloatingLayer/useFloatingLayerDecorator.js +3 -11
  29. package/ForwardRef/ForwardRef.js +1 -10
  30. package/GridListImageItem/GridListImageItem.js +17 -50
  31. package/Group/Group.js +4 -35
  32. package/Group/GroupItem.js +15 -32
  33. package/Group/tests/Group-specs.js +0 -32
  34. package/Heading/Heading.js +7 -35
  35. package/Heading/tests/Heading-specs.js +81 -14
  36. package/Icon/Icon.js +14 -48
  37. package/Icon/tests/Icon-specs.js +0 -22
  38. package/IconButton/IconButton.js +12 -50
  39. package/IconButton/tests/IconButton-specs.js +0 -7
  40. package/Image/Image.js +16 -45
  41. package/Image/tests/Image-specs.js +0 -14
  42. package/ImageItem/ImageItem.js +17 -46
  43. package/ImageItem/tests/ImageItem-specs.js +0 -25
  44. package/Item/Item.js +8 -32
  45. package/Item/tests/Item-specs.js +0 -24
  46. package/LabeledIcon/LabeledIcon.js +19 -50
  47. package/LabeledIcon/tests/LabeledIcon-specs.js +0 -14
  48. package/Layout/Cell.js +11 -37
  49. package/Layout/Layout.js +14 -37
  50. package/Layout/tests/Layout-specs.js +10 -39
  51. package/Marquee/MarqueeBase.js +29 -63
  52. package/Marquee/MarqueeController.js +11 -72
  53. package/Marquee/MarqueeDecorator.js +62 -196
  54. package/Marquee/index.js +1 -5
  55. package/Marquee/tests/Marquee-specs.js +258 -87
  56. package/Measurable/Measurable.js +12 -34
  57. package/Measurable/tests/Measurable-specs.js +115 -0
  58. package/Media/Media.js +15 -65
  59. package/Media/tests/Media-specs.js +168 -0
  60. package/Placeholder/PlaceholderControllerDecorator.js +7 -43
  61. package/Placeholder/PlaceholderDecorator.js +7 -38
  62. package/Placeholder/index.js +0 -4
  63. package/Placeholder/tests/PlaceholderControllerDecorator-specs.js +25 -0
  64. package/Placeholder/tests/PlaceholderDecorator-specs.js +28 -0
  65. package/ProgressBar/ProgressBar.js +13 -44
  66. package/ProgressBar/tests/ProgressBar-specs.js +0 -17
  67. package/RadioDecorator/RadioControllerDecorator.js +1 -29
  68. package/RadioDecorator/RadioDecorator.js +4 -42
  69. package/RadioDecorator/tests/RadioDecorator-specs.js +12 -49
  70. package/Repeater/Repeater.js +9 -33
  71. package/Repeater/tests/Repeater-specs.js +0 -38
  72. package/Resizable/Resizable.js +7 -35
  73. package/Resizable/tests/Resizable-specs.js +34 -0
  74. package/Routable/Link.js +8 -44
  75. package/Routable/Routable.js +10 -33
  76. package/Routable/Route.js +0 -6
  77. package/Routable/Router.js +13 -56
  78. package/Routable/tests/Routable-specs.js +7 -33
  79. package/Routable/tests/Router-specs.js +18 -44
  80. package/Routable/useLink.js +4 -8
  81. package/Routable/util.js +18 -24
  82. package/Scrollable/ScrollAnimator.js +49 -65
  83. package/Scrollable/ScrollThumb.js +2 -13
  84. package/Scrollable/Scrollable.js +179 -386
  85. package/Scrollable/ScrollableNative.js +188 -391
  86. package/Scrollable/Scrollbar.js +28 -100
  87. package/Scroller/Scroller.js +15 -39
  88. package/Scroller/ScrollerBasic.js +34 -89
  89. package/Scroller/UiScrollerBase.js +31 -84
  90. package/Skinnable/Skinnable.js +11 -38
  91. package/Skinnable/tests/Skinnable-specs.js +3 -74
  92. package/Skinnable/tests/useSkins-specs.js +1 -13
  93. package/Skinnable/tests/util-specs.js +0 -14
  94. package/Skinnable/useSkins.js +8 -15
  95. package/Skinnable/util.js +9 -20
  96. package/Slider/Knob.js +5 -24
  97. package/Slider/PositionDecorator.js +16 -54
  98. package/Slider/Slider.js +26 -64
  99. package/Slider/tests/Slider-specs.js +94 -7
  100. package/Slider/utils.js +0 -2
  101. package/SlotItem/SlotItem.js +15 -41
  102. package/SlotItem/tests/SlotItem-specs.js +0 -5
  103. package/Slottable/Slottable.js +4 -12
  104. package/Slottable/tests/Slottable-specs.js +19 -46
  105. package/Slottable/tests/useSlots-specs.js +27 -65
  106. package/Slottable/useSlots.js +8 -33
  107. package/Spinner/Spinner.js +15 -42
  108. package/Spinner/tests/Spinner-specs.js +0 -15
  109. package/ToggleIcon/ToggleIcon.js +10 -36
  110. package/ToggleIcon/tests/ToggleIcon-specs.js +0 -16
  111. package/ToggleItem/ToggleItem.js +15 -52
  112. package/ToggleItem/tests/ToggleItem-specs.js +0 -30
  113. package/Toggleable/Toggle.js +1 -15
  114. package/Toggleable/Toggleable.js +12 -45
  115. package/Toggleable/tests/Toggleable-specs.js +28 -96
  116. package/Toggleable/useToggle.js +3 -19
  117. package/Touchable/ClickAllow.js +5 -14
  118. package/Touchable/Drag.js +16 -54
  119. package/Touchable/Flick.js +11 -42
  120. package/Touchable/Hold.js +21 -68
  121. package/Touchable/Touch.js +37 -65
  122. package/Touchable/Touchable.js +32 -71
  123. package/Touchable/config.js +8 -22
  124. package/Touchable/tests/Touchable-specs.js +270 -119
  125. package/Touchable/tests/useTouch-specs.js +6 -80
  126. package/Touchable/useTouch.js +17 -34
  127. package/Transition/Transition.js +37 -118
  128. package/Transition/tests/Transition-specs.js +20 -60
  129. package/ViewManager/Arranger.js +10 -22
  130. package/ViewManager/TransitionGroup.js +31 -106
  131. package/ViewManager/View.js +35 -91
  132. package/ViewManager/ViewManager.js +19 -83
  133. package/ViewManager/tests/View-specs.js +0 -17
  134. package/ViewManager/tests/ViewManager-specs.js +236 -305
  135. package/ViewManager/tests/test-utils.js +0 -8
  136. package/VirtualList/UiVirtualListBase.js +256 -406
  137. package/VirtualList/VirtualList.js +29 -69
  138. package/VirtualList/VirtualListBase.js +0 -3
  139. package/VirtualList/VirtualListBasic.js +270 -428
  140. package/VirtualList/tests/VirtualList-specs.js +9 -37
  141. package/internal/IdProvider/IdProvider.js +7 -21
  142. package/internal/IdProvider/Provider.js +4 -17
  143. package/internal/IdProvider/tests/IdProvider-specs.js +44 -0
  144. package/internal/IdProvider/tests/useId-specs.js +7 -22
  145. package/internal/IdProvider/useId.js +0 -6
  146. package/internal/Pure/Pure.js +3 -30
  147. package/internal/Pure/tests/Pure-specs.js +88 -0
  148. package/internal/localized-fonts/localized-fonts.js +33 -62
  149. package/internal/localized-fonts/tests/localized-fonts-specs.js +33 -0
  150. package/internal/selection/selection.js +1 -6
  151. package/internal/selection/tests/selection-specs.js +6 -4
  152. package/internal/validators/tests/validators-specs.js +80 -0
  153. package/internal/validators/validators.js +14 -34
  154. package/package.json +8 -2
  155. package/resolution/ResolutionDecorator.js +4 -40
  156. package/resolution/index.js +0 -7
  157. package/resolution/resolution.js +42 -80
  158. package/resolution/tests/ResolutionDecorator-specs.js +4 -11
  159. package/resolution/tests/resolution-specs.js +2 -2
  160. package/useControlledState/tests/useControlledState-specs.js +15 -46
  161. package/useControlledState/useControlledState.js +11 -22
  162. package/useScroll/ScrollAnimator.js +49 -65
  163. package/useScroll/Scrollbar.js +22 -58
  164. package/useScroll/ScrollbarTrack.js +3 -19
  165. package/useScroll/useScroll.js +325 -502
  166. package/useScroll/utilDOM.js +8 -14
  167. package/useScroll/utilEvent.js +0 -4
@@ -4,47 +4,26 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.wrapWithView = exports["default"] = exports.View = void 0;
7
-
8
7
  var _util = require("@enact/core/util");
9
-
10
8
  var _react = require("react");
11
-
12
9
  var _propTypes = _interopRequireDefault(require("prop-types"));
13
-
14
10
  var _reactDom = _interopRequireDefault(require("react-dom"));
15
-
16
11
  var _Arranger = require("./Arranger");
17
-
18
12
  var _jsxRuntime = require("react/jsx-runtime");
19
-
20
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
21
-
22
14
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
23
-
24
15
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
25
-
26
16
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
27
-
28
17
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
29
-
30
18
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
31
-
32
19
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
33
-
34
20
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
35
-
36
21
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
37
-
38
22
  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); }; }
39
-
40
23
  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); }
41
-
42
24
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
43
-
44
25
  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; } }
45
-
46
26
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
47
-
48
27
  // If the View was "appearing", then entering will always be false and this will not result in a
49
28
  // re-render. If the view should enter, state.enter will be true and this will toggle it to false
50
29
  // causing a re-render.
@@ -54,6 +33,7 @@ var clearEntering = function clearEntering(_ref) {
54
33
  entering: false
55
34
  } : null;
56
35
  };
36
+
57
37
  /**
58
38
  * A `View` wraps a set of children for {@link ui/ViewManager.ViewManager}.
59
39
  * It is not intended to be used directly
@@ -62,36 +42,29 @@ var clearEntering = function clearEntering(_ref) {
62
42
  * @memberof ui/ViewManager
63
43
  * @private
64
44
  */
65
-
66
-
67
45
  var View = /*#__PURE__*/function (_Component) {
68
46
  _inherits(View, _Component);
69
-
70
47
  var _super = _createSuper(View);
71
-
72
48
  function View(props) {
73
49
  var _this;
74
-
75
50
  _classCallCheck(this, View);
76
-
77
51
  _this = _super.call(this, props);
78
52
  _this.enteringJob = new _util.Job(function () {
79
53
  _this.setState(clearEntering);
80
54
  });
81
-
82
55
  _this.prepareTransition = function (arranger, callback, noAnimation) {
83
56
  var _this$props = _this.props,
84
- duration = _this$props.duration,
85
- index = _this$props.index,
86
- _this$props$previousI = _this$props.previousIndex,
87
- previousIndex = _this$props$previousI === void 0 ? index : _this$props$previousI,
88
- reverseTransition = _this$props.reverseTransition,
89
- rtl = _this$props.rtl; // Need to ensure that we have a valid node reference before we animation. Sometimes, React
57
+ duration = _this$props.duration,
58
+ index = _this$props.index,
59
+ _this$props$previousI = _this$props.previousIndex,
60
+ previousIndex = _this$props$previousI === void 0 ? index : _this$props$previousI,
61
+ reverseTransition = _this$props.reverseTransition,
62
+ rtl = _this$props.rtl;
63
+
64
+ // Need to ensure that we have a valid node reference before we animation. Sometimes, React
90
65
  // will replace the node after mount causing a reference cached there to be invalid.
91
66
  // eslint-disable-next-line react/no-find-dom-node
92
-
93
67
  _this.node = _reactDom["default"].findDOMNode(_assertThisInitialized(_this));
94
-
95
68
  if (_this.animation && _this.animation.playState !== 'finished' && _this.changeDirection) {
96
69
  _this.animation.reverse();
97
70
  } else {
@@ -104,31 +77,29 @@ var View = /*#__PURE__*/function (_Component) {
104
77
  fill: 'forwards',
105
78
  duration: duration
106
79
  });
107
- } // Must set a new handler here to ensure the right callback is invoked
108
-
80
+ }
109
81
 
82
+ // Must set a new handler here to ensure the right callback is invoked
110
83
  _this.animation.onfinish = function () {
111
- _this.animation = null; // Possible for the animation callback to still be fired after the node has been
84
+ _this.animation = null;
85
+ // Possible for the animation callback to still be fired after the node has been
112
86
  // unmounted if it finished before the unmount can cancel it so we check for that.
113
-
114
87
  if (_this.node) {
115
88
  callback();
116
89
  }
117
- }; // disable animation when the instance or props flag is true
118
-
90
+ };
119
91
 
92
+ // disable animation when the instance or props flag is true
120
93
  if (noAnimation || _this.props.noAnimation) {
121
94
  _this.animation.finish();
122
95
  }
123
96
  };
124
-
125
97
  _this.animation = null;
126
98
  _this.state = {
127
99
  entering: !props.appearing
128
100
  };
129
101
  return _this;
130
102
  }
131
-
132
103
  _createClass(View, [{
133
104
  key: "shouldComponentUpdate",
134
105
  value: function shouldComponentUpdate(nextProps) {
@@ -139,7 +110,6 @@ var View = /*#__PURE__*/function (_Component) {
139
110
  this.changeDirection = this.shouldChangeDirection(this.props, nextProps);
140
111
  return false;
141
112
  }
142
-
143
113
  return true;
144
114
  }
145
115
  }, {
@@ -152,7 +122,6 @@ var View = /*#__PURE__*/function (_Component) {
152
122
  value: function componentWillUnmount() {
153
123
  this.enteringJob.stop();
154
124
  this.node = null;
155
-
156
125
  if (this.animation && typeof this.animation.cancel === 'function') {
157
126
  this.animation.cancel();
158
127
  }
@@ -166,7 +135,6 @@ var View = /*#__PURE__*/function (_Component) {
166
135
  key: "componentWillAppear",
167
136
  value: function componentWillAppear(callback) {
168
137
  var arranger = this.props.arranger;
169
-
170
138
  if (arranger && arranger.stay) {
171
139
  this.prepareTransition(arranger.stay, callback, true);
172
140
  } else {
@@ -177,26 +145,26 @@ var View = /*#__PURE__*/function (_Component) {
177
145
  key: "componentDidAppear",
178
146
  value: function componentDidAppear() {
179
147
  this.setState(clearEntering);
180
- } // This is called at the same time as componentDidMount() for components added to an existing
148
+ }
149
+
150
+ // This is called at the same time as componentDidMount() for components added to an existing
181
151
  // TransitionGroup. It will block other animations from occurring until callback is called. It
182
152
  // will not be called on the initial render of a TransitionGroup.
183
-
184
153
  }, {
185
154
  key: "componentWillEnter",
186
155
  value: function componentWillEnter(callback) {
187
156
  var _this$props2 = this.props,
188
- appearing = _this$props2.appearing,
189
- arranger = _this$props2.arranger,
190
- reverseTransition = _this$props2.reverseTransition,
191
- enteringProp = _this$props2.enteringProp; // This can happen if the panel was going to be removed and the animation was canceled,
157
+ appearing = _this$props2.appearing,
158
+ arranger = _this$props2.arranger,
159
+ reverseTransition = _this$props2.reverseTransition,
160
+ enteringProp = _this$props2.enteringProp;
161
+ // This can happen if the panel was going to be removed and the animation was canceled,
192
162
  // causing this panel to re-enter.
193
-
194
163
  if (!appearing && enteringProp && !this.state.entering) {
195
164
  this.setState({
196
165
  entering: true
197
166
  });
198
167
  }
199
-
200
168
  if (arranger) {
201
169
  this.prepareTransition(reverseTransition ? arranger.leave : arranger.enter, callback);
202
170
  } else {
@@ -207,9 +175,8 @@ var View = /*#__PURE__*/function (_Component) {
207
175
  key: "componentDidEnter",
208
176
  value: function componentDidEnter() {
209
177
  var _this$props3 = this.props,
210
- enteringDelay = _this$props3.enteringDelay,
211
- enteringProp = _this$props3.enteringProp;
212
-
178
+ enteringDelay = _this$props3.enteringDelay,
179
+ enteringProp = _this$props3.enteringProp;
213
180
  if (enteringProp) {
214
181
  // FIXME: `startRafAfter` is a temporary solution using rAF. We need a better way to handle
215
182
  // transition cycle and component life cycle to be in sync. See ENYO-4835.
@@ -222,30 +189,30 @@ var View = /*#__PURE__*/function (_Component) {
222
189
  key: "componentWillStay",
223
190
  value: function componentWillStay(callback) {
224
191
  var arranger = this.props.arranger;
225
-
226
192
  if (arranger && arranger.stay) {
227
193
  this.prepareTransition(arranger.stay, callback);
228
194
  } else {
229
195
  callback();
230
196
  }
231
- } // This is called when the child has been removed from the ReactTransitionGroup. Though the
197
+ }
198
+
199
+ // This is called when the child has been removed from the ReactTransitionGroup. Though the
232
200
  // child has been removed, ReactTransitionGroup will keep it in the DOM until callback is
233
201
  // called.
234
-
235
202
  }, {
236
203
  key: "componentWillLeave",
237
204
  value: function componentWillLeave(callback) {
238
205
  var _this$props4 = this.props,
239
- arranger = _this$props4.arranger,
240
- reverseTransition = _this$props4.reverseTransition;
206
+ arranger = _this$props4.arranger,
207
+ reverseTransition = _this$props4.reverseTransition;
241
208
  this.enteringJob.stop();
242
-
243
209
  if (arranger) {
244
210
  this.prepareTransition(reverseTransition ? arranger.enter : arranger.leave, callback);
245
211
  } else {
246
212
  callback();
247
213
  }
248
214
  }
215
+
249
216
  /**
250
217
  * Initiates a new transition
251
218
  *
@@ -255,42 +222,32 @@ var View = /*#__PURE__*/function (_Component) {
255
222
  * @returns {undefined}
256
223
  * @private
257
224
  */
258
-
259
225
  }, {
260
226
  key: "render",
261
227
  value: function render() {
262
228
  var _this$props5 = this.props,
263
- enteringProp = _this$props5.enteringProp,
264
- children = _this$props5.children,
265
- childProps = _this$props5.childProps;
266
-
229
+ enteringProp = _this$props5.enteringProp,
230
+ children = _this$props5.children,
231
+ childProps = _this$props5.childProps;
267
232
  if (enteringProp || childProps) {
268
233
  var props = Object.assign({}, childProps);
269
-
270
234
  if (enteringProp) {
271
235
  props[enteringProp] = this.state.entering;
272
236
  }
273
-
274
237
  return /*#__PURE__*/(0, _react.cloneElement)(children, props);
275
238
  } else {
276
239
  return _react.Children.only(children);
277
240
  }
278
241
  }
279
242
  }]);
280
-
281
243
  return View;
282
244
  }(_react.Component); // Not a true render method but instead a wrapper for TransitionGroup to wrap arbitrary children
283
245
  // with a TransitionGroup-compatible child that supports animation
284
246
  //
285
247
  // eslint-disable-next-line enact/display-name
286
-
287
-
288
248
  exports.View = View;
289
- View.propTypes =
290
- /** @lends ui/ViewManager.View.prototype */
291
- {
249
+ View.propTypes = /** @lends ui/ViewManager.View.prototype */{
292
250
  children: _propTypes["default"].node.isRequired,
293
-
294
251
  /**
295
252
  * Time in milliseconds to complete a transition
296
253
  *
@@ -299,7 +256,6 @@ View.propTypes =
299
256
  * @public
300
257
  */
301
258
  duration: _propTypes["default"].number.isRequired,
302
-
303
259
  /**
304
260
  * Set to `true` when the View should 'appear' without transitioning into the viewport
305
261
  *
@@ -307,7 +263,6 @@ View.propTypes =
307
263
  * @public
308
264
  */
309
265
  appearing: _propTypes["default"].bool,
310
-
311
266
  /**
312
267
  * Arranger to control the animation
313
268
  *
@@ -315,7 +270,6 @@ View.propTypes =
315
270
  * @public
316
271
  */
317
272
  arranger: _Arranger.shape,
318
-
319
273
  /**
320
274
  * An object containing properties to be passed to each child.
321
275
  *
@@ -323,7 +277,6 @@ View.propTypes =
323
277
  * @public
324
278
  */
325
279
  childProps: _propTypes["default"].object,
326
-
327
280
  /**
328
281
  * Time, in milliseconds, to wait after a view has entered to inform it by passing the
329
282
  * `enteringProp` as `false`.
@@ -333,7 +286,6 @@ View.propTypes =
333
286
  * @public
334
287
  */
335
288
  enteringDelay: _propTypes["default"].number,
336
-
337
289
  /**
338
290
  * Name of the property to pass to the wrapped view to indicate when it is entering the
339
291
  * viewport. When `true`, the view has been created but has not transitioned into place.
@@ -346,21 +298,18 @@ View.propTypes =
346
298
  * @public
347
299
  */
348
300
  enteringProp: _propTypes["default"].string,
349
-
350
301
  /**
351
302
  * Index of the currently 'active' view.
352
303
  *
353
304
  * @type {Number}
354
305
  */
355
306
  index: _propTypes["default"].number,
356
-
357
307
  /**
358
308
  * When `true`, indicates if a view is currently leaving.
359
309
  *
360
310
  * @type {Boolean}
361
311
  */
362
312
  leaving: _propTypes["default"].bool,
363
-
364
313
  /**
365
314
  * When `true`, indicates if the transition should be animated
366
315
  *
@@ -369,14 +318,12 @@ View.propTypes =
369
318
  * @public
370
319
  */
371
320
  noAnimation: _propTypes["default"].bool,
372
-
373
321
  /**
374
322
  * Index of the previously 'active' view.
375
323
  *
376
324
  * @type {Number}
377
325
  */
378
326
  previousIndex: _propTypes["default"].number,
379
-
380
327
  /**
381
328
  * When `true`, indicates if the transition should be reversed. The effect depends on how the provided
382
329
  * `arranger` handles reversal.
@@ -385,7 +332,6 @@ View.propTypes =
385
332
  * @default false
386
333
  */
387
334
  reverseTransition: _propTypes["default"].bool,
388
-
389
335
  /**
390
336
  * When `true`, indicates the current locale uses right-to-left reading order.
391
337
  *
@@ -401,7 +347,6 @@ View.defaultProps = {
401
347
  index: 0,
402
348
  reverseTransition: false
403
349
  };
404
-
405
350
  var wrapWithView = function wrapWithView(config) {
406
351
  return function (child) {
407
352
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(View, _objectSpread(_objectSpread({}, config), {}, {
@@ -409,7 +354,6 @@ var wrapWithView = function wrapWithView(config) {
409
354
  }));
410
355
  };
411
356
  };
412
-
413
357
  exports.wrapWithView = wrapWithView;
414
358
  var _default = View;
415
359
  exports["default"] = _default;