@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
@@ -9,19 +9,12 @@ var _exportNames = {
9
9
  ViewManagerDecorator: true
10
10
  };
11
11
  exports["default"] = exports.ViewManagerDecorator = exports.ViewManagerBase = exports.ViewManager = void 0;
12
-
13
12
  var _propTypes = _interopRequireDefault(require("@enact/core/internal/prop-types"));
14
-
15
13
  var _handle = _interopRequireWildcard(require("@enact/core/handle"));
16
-
17
14
  var _propTypes2 = _interopRequireDefault(require("prop-types"));
18
-
19
15
  var _react = require("react");
20
-
21
16
  var _ForwardRef = _interopRequireDefault(require("../ForwardRef"));
22
-
23
17
  var _Arranger = require("./Arranger");
24
-
25
18
  Object.keys(_Arranger).forEach(function (key) {
26
19
  if (key === "default" || key === "__esModule") return;
27
20
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -33,53 +26,29 @@ Object.keys(_Arranger).forEach(function (key) {
33
26
  }
34
27
  });
35
28
  });
36
-
37
29
  var _TransitionGroup = _interopRequireDefault(require("./TransitionGroup"));
38
-
39
30
  var _View = require("./View");
40
-
41
31
  var _jsxRuntime = require("react/jsx-runtime");
42
-
43
32
  var _excluded = ["arranger", "childProps", "children", "duration", "index", "noAnimation", "enteringDelay", "enteringProp", "rtl"];
44
-
45
33
  var _class;
46
-
47
34
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
48
-
49
35
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
50
-
51
36
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
52
-
53
37
  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; }
54
-
55
38
  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; }
56
-
57
39
  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; }
58
-
59
40
  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; }
60
-
61
41
  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; }
62
-
63
42
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
64
-
65
43
  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); } }
66
-
67
44
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
68
-
69
45
  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); }
70
-
71
46
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
72
-
73
47
  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); }; }
74
-
75
48
  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); }
76
-
77
49
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
78
-
79
50
  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; } }
80
-
81
51
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
82
-
83
52
  /**
84
53
  * The base `ViewManager` component, without
85
54
  * [ViewManagerDecorator]{@link ui/ViewManager.ViewManagerDecorator} applied.
@@ -91,23 +60,17 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
91
60
  */
92
61
  var ViewManagerBase = (_class = /*#__PURE__*/function (_Component) {
93
62
  _inherits(ViewManagerBase, _Component);
94
-
95
63
  var _super = _createSuper(ViewManagerBase);
96
-
97
64
  function ViewManagerBase(props) {
98
65
  var _this;
99
-
100
66
  _classCallCheck(this, ViewManagerBase);
101
-
102
67
  _this = _super.call(this, props);
103
-
104
68
  _this.makeTransitionEvent = function () {
105
69
  return {
106
70
  index: _this.props.index,
107
71
  previousIndex: _this.state.prevIndex
108
72
  };
109
73
  };
110
-
111
74
  _this.handleTransition = (0, _handle["default"])((0, _handle.forwardCustom)('onTransition', _this.makeTransitionEvent)).bindAs(_assertThisInitialized(_this), 'handleTransition');
112
75
  _this.handleWillTransition = (0, _handle["default"])((0, _handle.forwardCustom)('onWillTransition', _this.makeTransitionEvent)).bindAs(_assertThisInitialized(_this), 'handleWillTransition');
113
76
  _this.state = {
@@ -116,33 +79,29 @@ var ViewManagerBase = (_class = /*#__PURE__*/function (_Component) {
116
79
  };
117
80
  return _this;
118
81
  }
119
-
120
82
  _createClass(ViewManagerBase, [{
121
83
  key: "render",
122
84
  value: function render() {
123
85
  var _this$props = this.props,
124
- arranger = _this$props.arranger,
125
- childProps = _this$props.childProps,
126
- children = _this$props.children,
127
- duration = _this$props.duration,
128
- index = _this$props.index,
129
- noAnimation = _this$props.noAnimation,
130
- enteringDelay = _this$props.enteringDelay,
131
- enteringProp = _this$props.enteringProp,
132
- rtl = _this$props.rtl,
133
- rest = _objectWithoutProperties(_this$props, _excluded);
134
-
86
+ arranger = _this$props.arranger,
87
+ childProps = _this$props.childProps,
88
+ children = _this$props.children,
89
+ duration = _this$props.duration,
90
+ index = _this$props.index,
91
+ noAnimation = _this$props.noAnimation,
92
+ enteringDelay = _this$props.enteringDelay,
93
+ enteringProp = _this$props.enteringProp,
94
+ rtl = _this$props.rtl,
95
+ rest = _objectWithoutProperties(_this$props, _excluded);
135
96
  var _this$props2 = this.props,
136
- _this$props2$end = _this$props2.end,
137
- end = _this$props2$end === void 0 ? index : _this$props2$end,
138
- _this$props2$start = _this$props2.start,
139
- start = _this$props2$start === void 0 ? index : _this$props2$start;
97
+ _this$props2$end = _this$props2.end,
98
+ end = _this$props2$end === void 0 ? index : _this$props2$end,
99
+ _this$props2$start = _this$props2.start,
100
+ start = _this$props2$start === void 0 ? index : _this$props2$start;
140
101
  var _this$state = this.state,
141
- previousIndex = _this$state.prevIndex,
142
- reverseTransition = _this$state.reverseTransition;
143
-
102
+ previousIndex = _this$state.prevIndex,
103
+ reverseTransition = _this$state.reverseTransition;
144
104
  var childrenList = _react.Children.toArray(children);
145
-
146
105
  if (index > end) end = index;
147
106
  if (index < start) start = index;
148
107
  var childCount = end - start + 1;
@@ -186,22 +145,17 @@ var ViewManagerBase = (_class = /*#__PURE__*/function (_Component) {
186
145
  reverseTransition: state.index > props.index
187
146
  };
188
147
  }
189
-
190
148
  return null;
191
149
  }
192
150
  }]);
193
-
194
151
  return ViewManagerBase;
195
- }(_react.Component), _class.displayName = 'ViewManager', _class.propTypes =
196
- /** @lends ui/ViewManager.ViewManagerBase.prototype */
197
- {
152
+ }(_react.Component), _class.displayName = 'ViewManager', _class.propTypes = /** @lends ui/ViewManager.ViewManagerBase.prototype */{
198
153
  /**
199
154
  * Arranger to control the animation
200
155
  *
201
156
  * @type {Arranger}
202
157
  */
203
158
  arranger: _Arranger.shape,
204
-
205
159
  /**
206
160
  * An object containing properties to be passed to each child.
207
161
  *
@@ -209,7 +163,6 @@ var ViewManagerBase = (_class = /*#__PURE__*/function (_Component) {
209
163
  * @public
210
164
  */
211
165
  childProps: _propTypes2["default"].object,
212
-
213
166
  /**
214
167
  * Views to be managed.
215
168
  *
@@ -218,7 +171,6 @@ var ViewManagerBase = (_class = /*#__PURE__*/function (_Component) {
218
171
  * @type {Node}
219
172
  */
220
173
  children: _propTypes2["default"].node,
221
-
222
174
  /**
223
175
  * Type of component wrapping the children. May be a DOM node or a custom React component.
224
176
  *
@@ -226,7 +178,6 @@ var ViewManagerBase = (_class = /*#__PURE__*/function (_Component) {
226
178
  * @default 'div'
227
179
  */
228
180
  component: _propTypes["default"].renderable,
229
-
230
181
  /**
231
182
  * Called with a reference to the root component.
232
183
  *
@@ -237,7 +188,6 @@ var ViewManagerBase = (_class = /*#__PURE__*/function (_Component) {
237
188
  * @public
238
189
  */
239
190
  componentRef: _propTypes["default"].ref,
240
-
241
191
  /**
242
192
  * Time in milliseconds to complete a transition
243
193
  *
@@ -245,7 +195,6 @@ var ViewManagerBase = (_class = /*#__PURE__*/function (_Component) {
245
195
  * @default 300
246
196
  */
247
197
  duration: _propTypes2["default"].number,
248
-
249
198
  /**
250
199
  * Index of last visible view.
251
200
  *
@@ -255,7 +204,6 @@ var ViewManagerBase = (_class = /*#__PURE__*/function (_Component) {
255
204
  * @default value of index
256
205
  */
257
206
  end: _propTypes2["default"].number,
258
-
259
207
  /**
260
208
  * Time, in milliseconds, to wait after a view has entered to inform it by pass the
261
209
  * `enteringProp` as false.
@@ -264,7 +212,6 @@ var ViewManagerBase = (_class = /*#__PURE__*/function (_Component) {
264
212
  * @default 0
265
213
  */
266
214
  enteringDelay: _propTypes2["default"].number,
267
-
268
215
  /**
269
216
  * Name of the property to pass to the wrapped view to indicate when it is entering the
270
217
  * viewport.
@@ -278,7 +225,6 @@ var ViewManagerBase = (_class = /*#__PURE__*/function (_Component) {
278
225
  * @type {String}
279
226
  */
280
227
  enteringProp: _propTypes2["default"].string,
281
-
282
228
  /**
283
229
  * Index of active view
284
230
  *
@@ -286,7 +232,6 @@ var ViewManagerBase = (_class = /*#__PURE__*/function (_Component) {
286
232
  * @default 0
287
233
  */
288
234
  index: _propTypes2["default"].number,
289
-
290
235
  /**
291
236
  * Indicates if the transition should be animated
292
237
  *
@@ -294,49 +239,42 @@ var ViewManagerBase = (_class = /*#__PURE__*/function (_Component) {
294
239
  * @default false
295
240
  */
296
241
  noAnimation: _propTypes2["default"].bool,
297
-
298
242
  /**
299
243
  * Called when each view is rendered during initial construction.
300
244
  *
301
245
  * @type {Function}
302
246
  */
303
247
  onAppear: _propTypes2["default"].func,
304
-
305
248
  /**
306
249
  * Called when each view completes its transition into the viewport.
307
250
  *
308
251
  * @type {Function}
309
252
  */
310
253
  onEnter: _propTypes2["default"].func,
311
-
312
254
  /**
313
255
  * Called when each view completes its transition out of the viewport.
314
256
  *
315
257
  * @type {Function}
316
258
  */
317
259
  onLeave: _propTypes2["default"].func,
318
-
319
260
  /**
320
261
  * Called when each view completes its transition within the viewport.
321
262
  *
322
263
  * @type {Function}
323
264
  */
324
265
  onStay: _propTypes2["default"].func,
325
-
326
266
  /**
327
267
  * Called once when all views have completed their transition.
328
268
  *
329
269
  * @type {Function}
330
270
  */
331
271
  onTransition: _propTypes2["default"].func,
332
-
333
272
  /**
334
273
  * Called once before views begin their transition.
335
274
  *
336
275
  * @type {Function}
337
276
  */
338
277
  onWillTransition: _propTypes2["default"].func,
339
-
340
278
  /**
341
279
  * Explicitly sets the transition direction.
342
280
  *
@@ -346,7 +284,6 @@ var ViewManagerBase = (_class = /*#__PURE__*/function (_Component) {
346
284
  * @type {Boolean}
347
285
  */
348
286
  reverseTransition: _propTypes2["default"].bool,
349
-
350
287
  /**
351
288
  * Indicates the current locale uses right-to-left reading order.
352
289
  *
@@ -356,7 +293,6 @@ var ViewManagerBase = (_class = /*#__PURE__*/function (_Component) {
356
293
  * @type {Boolean}
357
294
  */
358
295
  rtl: _propTypes2["default"].bool,
359
-
360
296
  /**
361
297
  * Index of first visible view. Defaults to the current value of `index`.
362
298
  *
@@ -369,6 +305,7 @@ var ViewManagerBase = (_class = /*#__PURE__*/function (_Component) {
369
305
  duration: 300,
370
306
  index: 0
371
307
  }, _class);
308
+
372
309
  /**
373
310
  * Applies ViewManager behaviors.
374
311
  *
@@ -377,11 +314,11 @@ var ViewManagerBase = (_class = /*#__PURE__*/function (_Component) {
377
314
  * @mixes ui/ForwardRef.ForwardRef
378
315
  * @public
379
316
  */
380
-
381
317
  exports.ViewManagerBase = ViewManagerBase;
382
318
  var ViewManagerDecorator = (0, _ForwardRef["default"])({
383
319
  prop: 'componentRef'
384
320
  });
321
+
385
322
  /**
386
323
  * A `ViewManager` controls the visibility of a configurable number of views, allowing for them to be
387
324
  * transitioned on and off the viewport.
@@ -394,7 +331,6 @@ var ViewManagerDecorator = (0, _ForwardRef["default"])({
394
331
  * @ui
395
332
  * @public
396
333
  */
397
-
398
334
  exports.ViewManagerDecorator = ViewManagerDecorator;
399
335
  var ViewManager = ViewManagerDecorator(ViewManagerBase);
400
336
  exports.ViewManager = ViewManager;
@@ -1,19 +1,12 @@
1
1
  "use strict";
2
2
 
3
3
  require("@testing-library/jest-dom");
4
-
5
4
  var _react = require("@testing-library/react");
6
-
7
5
  var _react2 = require("react");
8
-
9
6
  var _testUtils = require("./test-utils");
10
-
11
7
  var _View = _interopRequireDefault(require("../View"));
12
-
13
8
  var _jsxRuntime = require("react/jsx-runtime");
14
-
15
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
16
-
17
10
  describe('View', function () {
18
11
  test('should render its child when neither enteringProp or childProps is specified', function () {
19
12
  (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_View["default"], {
@@ -22,9 +15,7 @@ describe('View', function () {
22
15
  "data-testid": "span"
23
16
  })
24
17
  }));
25
-
26
18
  var actual = _react.screen.getByTestId('span');
27
-
28
19
  expect(actual).toBeInTheDocument();
29
20
  });
30
21
  test('should pass the value of entering to its child in enteringProp', function () {
@@ -36,9 +27,7 @@ describe('View', function () {
36
27
  })
37
28
  }));
38
29
  var expected = 'true';
39
-
40
30
  var actual = _react.screen.getByTestId('span');
41
-
42
31
  expect(actual).toHaveAttribute('data-entering', expected);
43
32
  });
44
33
  test('should pass enteringProp as false for an appearing view', function () {
@@ -52,9 +41,7 @@ describe('View', function () {
52
41
  "data-testid": "span"
53
42
  })
54
43
  }));
55
-
56
44
  var actual = _react.screen.getByTestId('span');
57
-
58
45
  expect(actual).toHaveAttribute('data-entering', 'false');
59
46
  });
60
47
  describe('imperative API without arranger', function () {
@@ -116,17 +103,13 @@ describe('View', function () {
116
103
  return ref.current.componentDidAppear(spy);
117
104
  });
118
105
  var firstExpected = 'false';
119
-
120
106
  var firstSpan = _react.screen.getByTestId('span');
121
-
122
107
  expect(firstSpan).toHaveAttribute('data-entering', firstExpected);
123
108
  (0, _react.act)(function () {
124
109
  return ref.current.componentWillEnter(spy);
125
110
  });
126
111
  var secondExpected = 'true';
127
-
128
112
  var secondSpan = _react.screen.getByTestId('span');
129
-
130
113
  expect(secondSpan).toHaveAttribute('data-entering', secondExpected);
131
114
  });
132
115
  });