@enact/ui 4.5.2 → 4.6.1

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 (222) 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 +8 -28
  8. package/BodyText/tests/BodyText-specs.js +0 -19
  9. package/Button/Button.js +33 -63
  10. package/Button/tests/Button-specs.js +0 -26
  11. package/CHANGELOG.md +45 -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/package.json +3 -0
  25. package/FloatingLayer/tests/FloatingLayer-specs.js +8 -22
  26. package/FloatingLayer/tests/Scrim-specs.js +0 -9
  27. package/FloatingLayer/tests/useFloatingLayerDecorator-specs.js +0 -13
  28. package/FloatingLayer/useFloatingLayer.js +3 -14
  29. package/FloatingLayer/useFloatingLayerDecorator.js +3 -11
  30. package/ForwardRef/ForwardRef.js +1 -10
  31. package/GridListImageItem/GridListImageItem.js +18 -51
  32. package/Group/Group.js +5 -36
  33. package/Group/GroupItem.js +16 -33
  34. package/Group/tests/Group-specs.js +0 -32
  35. package/Heading/Heading.js +8 -36
  36. package/Heading/tests/Heading-specs.js +81 -14
  37. package/Icon/Icon.js +19 -53
  38. package/Icon/tests/Icon-specs.js +0 -22
  39. package/IconButton/IconButton.js +24 -57
  40. package/IconButton/tests/IconButton-specs.js +0 -7
  41. package/Image/Image.js +17 -46
  42. package/Image/tests/Image-specs.js +0 -14
  43. package/ImageItem/ImageItem.js +18 -47
  44. package/ImageItem/tests/ImageItem-specs.js +0 -25
  45. package/Item/Item.js +9 -33
  46. package/Item/tests/Item-specs.js +0 -24
  47. package/LabeledIcon/LabeledIcon.js +22 -53
  48. package/LabeledIcon/tests/LabeledIcon-specs.js +0 -14
  49. package/Layout/Cell.js +18 -44
  50. package/Layout/Layout.js +23 -46
  51. package/Layout/tests/Layout-specs.js +10 -39
  52. package/Marquee/MarqueeBase.js +29 -63
  53. package/Marquee/MarqueeController.js +11 -72
  54. package/Marquee/MarqueeDecorator.js +70 -196
  55. package/Marquee/index.js +1 -5
  56. package/Marquee/tests/Marquee-specs.js +295 -87
  57. package/Measurable/Measurable.js +12 -34
  58. package/Measurable/tests/Measurable-specs.js +115 -0
  59. package/Media/Media.js +15 -65
  60. package/Media/tests/Media-specs.js +168 -0
  61. package/Placeholder/PlaceholderControllerDecorator.js +7 -43
  62. package/Placeholder/PlaceholderDecorator.js +7 -38
  63. package/Placeholder/index.js +1 -5
  64. package/Placeholder/tests/PlaceholderControllerDecorator-specs.js +25 -0
  65. package/Placeholder/tests/PlaceholderDecorator-specs.js +28 -0
  66. package/ProgressBar/ProgressBar.js +14 -45
  67. package/ProgressBar/tests/ProgressBar-specs.js +0 -17
  68. package/RadioDecorator/RadioControllerDecorator.js +7 -29
  69. package/RadioDecorator/RadioDecorator.js +9 -42
  70. package/RadioDecorator/tests/RadioDecorator-specs.js +12 -49
  71. package/Repeater/Repeater.js +9 -33
  72. package/Repeater/tests/Repeater-specs.js +0 -38
  73. package/Resizable/Resizable.js +9 -37
  74. package/Resizable/tests/Resizable-specs.js +34 -0
  75. package/Routable/Link.js +11 -47
  76. package/Routable/Routable.js +12 -35
  77. package/Routable/Route.js +0 -6
  78. package/Routable/Router.js +15 -58
  79. package/Routable/tests/Routable-specs.js +7 -33
  80. package/Routable/tests/Router-specs.js +18 -44
  81. package/Routable/useLink.js +4 -8
  82. package/Routable/util.js +18 -24
  83. package/Scrollable/ScrollAnimator.js +49 -65
  84. package/Scrollable/ScrollThumb.js +2 -13
  85. package/Scrollable/Scrollable.js +180 -387
  86. package/Scrollable/ScrollableNative.js +189 -392
  87. package/Scrollable/Scrollbar.js +30 -102
  88. package/Scroller/Scroller.js +15 -39
  89. package/Scroller/ScrollerBasic.js +34 -89
  90. package/Scroller/UiScrollerBase.js +37 -84
  91. package/Scroller/tests/Scroller-specs.js +56 -0
  92. package/Skinnable/Skinnable.js +11 -38
  93. package/Skinnable/tests/Skinnable-specs.js +3 -74
  94. package/Skinnable/tests/useSkins-specs.js +1 -13
  95. package/Skinnable/tests/util-specs.js +0 -14
  96. package/Skinnable/useSkins.js +8 -15
  97. package/Skinnable/util.js +9 -20
  98. package/Slider/Knob.js +5 -24
  99. package/Slider/PositionDecorator.js +16 -54
  100. package/Slider/Slider.js +29 -67
  101. package/Slider/tests/Slider-specs.js +94 -7
  102. package/Slider/utils.js +0 -2
  103. package/SlotItem/SlotItem.js +23 -45
  104. package/SlotItem/tests/SlotItem-specs.js +0 -5
  105. package/Slottable/Slottable.js +4 -12
  106. package/Slottable/tests/Slottable-specs.js +19 -46
  107. package/Slottable/tests/useSlots-specs.js +27 -65
  108. package/Slottable/useSlots.js +8 -33
  109. package/Spinner/Spinner.js +16 -43
  110. package/Spinner/tests/Spinner-specs.js +0 -15
  111. package/ToggleIcon/ToggleIcon.js +10 -36
  112. package/ToggleIcon/tests/ToggleIcon-specs.js +0 -16
  113. package/ToggleItem/ToggleItem.js +24 -57
  114. package/ToggleItem/tests/ToggleItem-specs.js +0 -30
  115. package/Toggleable/Toggle.js +1 -15
  116. package/Toggleable/Toggleable.js +12 -45
  117. package/Toggleable/tests/Toggleable-specs.js +28 -96
  118. package/Toggleable/useToggle.js +3 -19
  119. package/Touchable/ClickAllow.js +5 -14
  120. package/Touchable/Drag.js +16 -54
  121. package/Touchable/Flick.js +11 -42
  122. package/Touchable/Hold.js +21 -68
  123. package/Touchable/Pinch.js +185 -0
  124. package/Touchable/Touch.js +71 -76
  125. package/Touchable/Touchable.js +95 -75
  126. package/Touchable/config.js +27 -24
  127. package/Touchable/tests/Touchable-specs.js +360 -119
  128. package/Touchable/tests/useTouch-specs.js +6 -80
  129. package/Touchable/useTouch.js +57 -65
  130. package/Transition/Transition.js +37 -118
  131. package/Transition/tests/Transition-specs.js +20 -60
  132. package/ViewManager/Arranger.js +10 -22
  133. package/ViewManager/TransitionGroup.js +32 -107
  134. package/ViewManager/View.js +35 -91
  135. package/ViewManager/ViewManager.js +20 -84
  136. package/ViewManager/tests/View-specs.js +0 -17
  137. package/ViewManager/tests/ViewManager-specs.js +236 -305
  138. package/ViewManager/tests/test-utils.js +0 -8
  139. package/VirtualList/UiVirtualListBase.js +265 -409
  140. package/VirtualList/VirtualList.js +29 -69
  141. package/VirtualList/VirtualListBase.js +0 -3
  142. package/VirtualList/VirtualListBasic.js +273 -431
  143. package/VirtualList/tests/VirtualGridList-native-specs.js +161 -0
  144. package/VirtualList/tests/VirtualGridList-specs.js +614 -0
  145. package/VirtualList/tests/VirtualList-native-specs.js +152 -0
  146. package/VirtualList/tests/VirtualList-specs.js +423 -95
  147. package/internal/IdProvider/IdProvider.js +7 -21
  148. package/internal/IdProvider/Provider.js +4 -17
  149. package/internal/IdProvider/tests/IdProvider-specs.js +44 -0
  150. package/internal/IdProvider/tests/useId-specs.js +6 -20
  151. package/internal/IdProvider/useId.js +0 -6
  152. package/internal/Pure/Pure.js +3 -30
  153. package/internal/Pure/tests/Pure-specs.js +88 -0
  154. package/internal/localized-fonts/localized-fonts.js +33 -62
  155. package/internal/localized-fonts/tests/localized-fonts-specs.js +33 -0
  156. package/internal/selection/selection.js +1 -6
  157. package/internal/selection/tests/selection-specs.js +6 -4
  158. package/internal/validators/tests/validators-specs.js +80 -0
  159. package/internal/validators/validators.js +14 -34
  160. package/package.json +9 -3
  161. package/resolution/ResolutionDecorator.js +4 -40
  162. package/resolution/index.js +0 -7
  163. package/resolution/resolution.js +42 -80
  164. package/resolution/tests/ResolutionDecorator-specs.js +4 -11
  165. package/resolution/tests/resolution-specs.js +2 -2
  166. package/useControlledState/tests/useControlledState-specs.js +15 -46
  167. package/useControlledState/useControlledState.js +11 -22
  168. package/useScroll/ScrollAnimator.js +49 -65
  169. package/useScroll/Scrollbar.js +22 -58
  170. package/useScroll/ScrollbarTrack.js +3 -19
  171. package/useScroll/useScroll.js +267 -454
  172. package/useScroll/utilDOM.js +8 -14
  173. package/useScroll/utilEvent.js +0 -4
  174. package/AnnounceDecorator/AnnounceDecorator.d.ts +0 -64
  175. package/BodyText/BodyText.d.ts +0 -66
  176. package/Button/Button.d.ts +0 -125
  177. package/Cancelable/Cancelable.d.ts +0 -64
  178. package/Changeable/Changeable.d.ts +0 -54
  179. package/ComponentOverride/ComponentOverride.d.ts +0 -52
  180. package/ForwardRef/ForwardRef.d.ts +0 -22
  181. package/GridListImageItem/GridListImageItem.d.ts +0 -85
  182. package/Group/Group.d.ts +0 -107
  183. package/Heading/Heading.d.ts +0 -90
  184. package/Icon/Icon.d.ts +0 -88
  185. package/IconButton/IconButton.d.ts +0 -115
  186. package/Image/Image.d.ts +0 -113
  187. package/ImageItem/ImageItem.d.ts +0 -83
  188. package/Item/Item.d.ts +0 -64
  189. package/LabeledIcon/LabeledIcon.d.ts +0 -130
  190. package/Layout/Layout.d.ts +0 -247
  191. package/Marquee/index.d.ts +0 -258
  192. package/Measurable/Measurable.d.ts +0 -26
  193. package/Media/Media.d.ts +0 -99
  194. package/Placeholder/index.d.ts +0 -53
  195. package/ProgressBar/ProgressBar.d.ts +0 -92
  196. package/RadioDecorator/RadioDecorator.d.ts +0 -35
  197. package/Repeater/Repeater.d.ts +0 -83
  198. package/Resizable/Resizable.d.ts +0 -31
  199. package/Routable/Routable.d.ts +0 -148
  200. package/Scrollable/Scrollable.d.ts +0 -0
  201. package/Scroller/Scroller.d.ts +0 -276
  202. package/Skinnable/Skinnable.d.ts +0 -94
  203. package/Slider/Slider.d.ts +0 -202
  204. package/SlotItem/SlotItem.d.ts +0 -118
  205. package/Slottable/Slottable.d.ts +0 -22
  206. package/Spinner/Spinner.d.ts +0 -95
  207. package/ToggleIcon/ToggleIcon.d.ts +0 -90
  208. package/ToggleItem/ToggleItem.d.ts +0 -134
  209. package/Toggleable/Toggleable.d.ts +0 -103
  210. package/Touchable/Touchable.d.ts +0 -175
  211. package/Transition/Transition.d.ts +0 -196
  212. package/ViewManager/ViewManager.d.ts +0 -191
  213. package/VirtualList/VirtualList.d.ts +0 -530
  214. package/index.d.ts +0 -0
  215. package/internal/IdProvider/IdProvider.d.ts +0 -0
  216. package/internal/Pure/Pure.d.ts +0 -0
  217. package/internal/localized-fonts/localized-fonts.d.ts +0 -53
  218. package/internal/selection/selection.d.ts +0 -0
  219. package/internal/validators/validators.d.ts +0 -0
  220. package/resolution/index.d.ts +0 -187
  221. package/useControlledState/useControlledState.d.ts +0 -0
  222. package/useScroll/useScroll.d.ts +0 -0
@@ -1,196 +0,0 @@
1
- // Type definitions for ui/Transition
2
-
3
- import * as React from "react";
4
-
5
- type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
6
- type Merge<M, N> = Omit<M, Extract<keyof M, keyof N>> & N;
7
-
8
- export interface TransitionBaseProps {
9
- /**
10
- * Provide a function to get the reference to the child node (the one with the content) at
11
- render time.
12
- *
13
- * Useful if you need to measure or interact with the node directly.
14
- */
15
- childRef?: object | Function;
16
- /**
17
- * The node to be transitioned.
18
- */
19
- children?: React.ReactNode;
20
- /**
21
- * The height of the transition when `type` is set to `'clip'` , used when direction is
22
- 'left' or 'right'.
23
- */
24
- clipHeight?: number;
25
- /**
26
- * The width of the transition when `type` is set to `'clip'` , used when direction is 'left'
27
- or 'right'.
28
- */
29
- clipWidth?: number;
30
- /**
31
- * Customizes the component by mapping the supplied collection of CSS class names to the
32
- corresponding internal elements and states of this component.
33
- *
34
- * The following classes are supported:
35
- * * `transition` - The root component class
36
- * * `inner` - The element inside the transition. This is the container for the transitioning content.
37
- * * `shown` - Applied when content is present (visible), related to the `visible` prop/state
38
- * * `hidden` - Applied when content is not present (hiding), related to the `visible` prop/state
39
- * * `slide` - Applied when the `slide` `type` is set
40
- * * `fade` - Applied when the `fade` `type` is set
41
- * * `clip` - Applied when the `clip` `type` is set
42
- * * `up` - Applied when the `direction` `up` is set
43
- * * `right` - Applied when the `direction` `right` is set
44
- * * `down` - Applied when the `direction` `down` is set
45
- * * `left` - Applied when the `direction` `left` is set
46
- * * `short` - Applied when the `duration` `short` is set
47
- * * `medium` - Applied when the `duration` `medium` is set
48
- * * `long` - Applied when the `duration` `long` is set
49
- * * `ease` - Applied when the `timingFunction` `ease` is set
50
- * * `ease-in` - Applied when the `timingFunction` `ease-in` is set
51
- * * `ease-out` - Applied when the `timingFunction` `ease-out` is set
52
- * * `ease-in-out` - Applied when the `timingFunction` `ease-in-out` is set
53
- * * `ease-in-quart` - Applied when the `timingFunction` `ease-in-quart` is set
54
- * * `ease-out-quart` - Applied when the `timingFunction` `ease-out-quart` is set
55
- * * `linear` - Applied when the `timingFunction` `linear` is set
56
- */
57
- css?: object;
58
- /**
59
- * Sets the direction of transition. Where the component will move _to_ ; the destination.
60
- Supported directions are: `'up'` , `'right'` , `'down'` , `'left'` .
61
- */
62
- direction?: string;
63
- /**
64
- * Controls how long the transition should take.
65
- Supported preset durations are: `'short'` (250ms), `'medium'` (500ms), and `'long'` (1s).
66
- `'medium'` (500ms) is default when no others are specified.
67
- Any valid CSS duration value is also accepted, e.g. "200ms" or "3s". Pure numeric values
68
- are also supported and treated as milliseconds.
69
- */
70
- duration?: string | number;
71
- /**
72
- * Disables transition animation.
73
- *
74
- * When `false` , visibility changes animate.
75
- */
76
- noAnimation?: boolean;
77
- /**
78
- * The transition timing function.
79
- * * Supported function names are: `ease` , `ease-in` , `ease-out` , `ease-in-out` , `ease-in-quart` ,
80
- *
81
- * `ease-out-quart` , and `linear` .
82
- */
83
- timingFunction?: string;
84
- /**
85
- * The type of transition to affect the content.
86
- * * Supported types are: `'slide'` , `'clip'` , and `'fade'` .
87
- *
88
- * Details on types:
89
- * * `'slide'` - Typically used for bringing something which is off the edge of the screen,
90
- and not visible, onto the screen. Think of a popup, toast, notification, dialog, or
91
- an overlaying menu. This requires no re-rendering or repainting of the screen during
92
- the transition, making it very performant. However, this does not affect layout at
93
- all, which makes it less useful for transitioning from a place already on the
94
- screen.
95
- * * `'clip'` - This is useful for showing a component that transitions-in from a location
96
- that is already on the screen. Examples would be an expanding header or an
97
- accordion. This type does affects layout, its current size will push other sibling
98
- elements to make room for itself. Because of this, repainting the layout does happen
99
- during transition.
100
- * * `'fade'` - Fade the components onto the screen, from 0 opacity (completely invisible)
101
- to 1 (full visibility). Pretty basic, but useful for fading on/off a tooltip, a
102
- menu, a panel, or even view contents. This does not affect layout at all.
103
- */
104
- type?: string;
105
- /**
106
- * Sets the visibility of the component, which determines whether it's on screen or off.
107
- */
108
- visible?: boolean;
109
- }
110
- /**
111
- * The stateless structure of the component.
112
- *
113
- * In case you want to provide all of the state yourself.
114
- In general, you'll probably want to use the `Transition` instead of `TransitionBase` .
115
- */
116
-
117
- export class TransitionBase extends React.Component<
118
- Merge<React.HTMLProps<HTMLElement>, TransitionBaseProps>
119
- > {}
120
-
121
- export interface TransitionProps {
122
- /**
123
- * The node to be transitioned.
124
- */
125
- children?: React.ReactNode;
126
- /**
127
- * The direction of transition (i.e. where the component will move _to_ ; the destination).
128
- * * Supported directions are: `'up'` , `'right'` , `'down'` , `'left'` .
129
- */
130
- direction?: string;
131
- /**
132
- * Controls how long the transition should take.
133
- * * Supported preset durations are: `'short'` (250ms), `'medium'` (500ms), and `'long'` (1s).
134
- *
135
- * `'medium'` (500ms) is default when no others are specified.
136
- *
137
- * Any valid CSS duration value is also accepted, e.g. "200ms" or "3s". Pure numeric values
138
- are also supported and treated as miliseconds.
139
- */
140
- duration?: string | number;
141
- /**
142
- * Disables transition animation.
143
- *
144
- * When `false` , visibility changes animate.
145
- */
146
- noAnimation?: boolean;
147
- /**
148
- * Called after transition for hiding is finished.
149
- */
150
- onHide?: Function;
151
- /**
152
- * Called after transition for showing is finished.
153
- */
154
- onShow?: Function;
155
- /**
156
- * The transition timing function.
157
- Supported function names are: `ease` , `ease-in` , `ease-out` , `ease-in-out` , `ease-in-quart` ,
158
- `ease-out-quart` , and `linear` .
159
- */
160
- timingFunction?: string;
161
- /**
162
- * The type of transition to affect the content.
163
- * * Supported types are: `'slide'` , `'clip'` , and `'fade'` .
164
- *
165
- * Details on types:
166
- * * `'slide'` - Typically used for bringing something which is off the edge of the screen,
167
- and not visible, onto the screen. Think of a popup, toast, notification, dialog, or
168
- an overlaying menu. This requires no re-rendering or repainting of the screen during
169
- the transition, making it very performant. However, this does not affect layout at
170
- all, which makes it less useful for transitioning from a place already on the
171
- screen.
172
- * * `'clip'` - This is useful for showing a component that transitions-in from a location
173
- that is already on the screen. Examples would be an expanding header or an
174
- accordion. This type does affects layout, its current size will push other sibling
175
- elements to make room for itself. Because of this, repainting the layout does happen
176
- during transition.
177
- * * `'fade'` - Fade the components onto the screen, from 0 opacity (completely invisible)
178
- to 1 (full visibility). Pretty basic, but useful for fading on/off a tooltip, a
179
- menu, a panel, or even view contents. This does not affect layout at all.
180
- */
181
- type?: string;
182
- /**
183
- * The visibility of the component, which determines whether it's on the screen or off.
184
- */
185
- visible?: boolean;
186
- }
187
- /**
188
- * A stateful component that allows for applying transitions to its child items via configurable
189
- properties and events.
190
- */
191
-
192
- export class Transition extends React.Component<
193
- Merge<React.HTMLProps<HTMLElement>, TransitionProps>
194
- > {}
195
-
196
- export default Transition;
@@ -1,191 +0,0 @@
1
- // Type definitions for ui/ViewManager
2
-
3
- import * as React from "react";
4
- import { ForwardRefProps as ui_ForwardRef_ForwardRefProps } from "@enact/ui/ForwardRef";
5
-
6
- type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
7
- type Merge<M, N> = Omit<M, Extract<keyof M, keyof N>> & N;
8
-
9
- export interface ViewManagerBaseProps {
10
- /**
11
- * Arranger to control the animation
12
- */
13
- arranger?: Arranger;
14
- /**
15
- * An object containing properties to be passed to each child.
16
- */
17
- childProps?: object;
18
- /**
19
- * Views to be managed.
20
- *
21
- * May be any renderable component including custom React components or primitive DOM nodes.
22
- */
23
- children?: React.ReactNode;
24
- /**
25
- * Type of component wrapping the children. May be a DOM node or a custom React component.
26
- */
27
- component?: string | React.ComponentType;
28
- /**
29
- * Called with a reference to the root component.
30
- *
31
- * When using , the `ref` prop is forwarded to this
32
- component as `componentRef` .
33
- */
34
- componentRef?: object | Function;
35
- /**
36
- * Time in milliseconds to complete a transition
37
- */
38
- duration?: number;
39
- /**
40
- * Index of last visible view.
41
- *
42
- * Defaults to the current value of `index` .
43
- */
44
- end?: number;
45
- /**
46
- * Time, in milliseconds, to wait after a view has entered to inform it by pass the
47
- `enteringProp` as false.
48
- */
49
- enteringDelay?: number;
50
- /**
51
- * Name of the property to pass to the wrapped view to indicate when it is entering the
52
- viewport.
53
- *
54
- * When `true` , the view has been created but has not transitioned into place.
55
- When `false` , the view has finished its transition.
56
- *
57
- * The notification can be delayed by setting `enteringDelay` . If not set, the view will not
58
- be notified of the change in transition.
59
- */
60
- enteringProp?: string;
61
- /**
62
- * Index of active view
63
- */
64
- index?: number;
65
- /**
66
- * Indicates if the transition should be animated
67
- */
68
- noAnimation?: boolean;
69
- /**
70
- * Called when each view is rendered during initial construction.
71
- */
72
- onAppear?: Function;
73
- /**
74
- * Called when each view completes its transition into the viewport.
75
- */
76
- onEnter?: Function;
77
- /**
78
- * Called when each view completes its transition out of the viewport.
79
- */
80
- onLeave?: Function;
81
- /**
82
- * Called when each view completes its transition within the viewport.
83
- */
84
- onStay?: Function;
85
- /**
86
- * Called once when all views have completed their transition.
87
- */
88
- onTransition?: Function;
89
- /**
90
- * Called once before views begin their transition.
91
- */
92
- onWillTransition?: Function;
93
- /**
94
- * Explicitly sets the transition direction.
95
- *
96
- * If omitted, the direction is determined automatically based on the change of index or a
97
- string comparison of the first child's key.
98
- */
99
- reverseTransition?: boolean;
100
- /**
101
- * Indicates the current locale uses right-to-left reading order.
102
- *
103
- * `rtl` is passed to the `arranger` in order to alter the animation (e.g. reversing the
104
- horizontal direction).
105
- */
106
- rtl?: boolean;
107
- /**
108
- * Index of first visible view. Defaults to the current value of `index` .
109
- */
110
- start?: number;
111
- }
112
- /**
113
- * The base `ViewManager` component, without
114
- [ViewManagerDecorator] applied.
115
- */
116
-
117
- export class ViewManagerBase extends React.Component<
118
- Merge<React.HTMLProps<HTMLElement>, ViewManagerBaseProps>
119
- > {}
120
-
121
- /**
122
- * A function that generates an animation for a given transition configuration
123
- */
124
- export interface ArrangerCallback {
125
- (
126
- /**
127
- * Animation configuration object.
128
- */
129
- config: object
130
- ): any;
131
- }
132
- /**
133
- * An object with callback functions to arrange views within .
134
- */
135
- export interface Arranger {
136
- /**
137
- * Returns an array of keyframes describing the animation when
138
- a view is entering the viewport.
139
- */
140
- enter: ArrangerCallback /**
141
- * Returns an array of keyframes describing the animation when
142
- a view is leaving the viewport.
143
- */;
144
- leave: ArrangerCallback /**
145
- * Returns an array of keyframes describing the animation when
146
- a view is remaining in the viewport.
147
- */;
148
- stay?: ArrangerCallback;
149
- }
150
- /**
151
- * A basic arranger factory that must be configured with `direction` and optionally an `amount` .
152
- */
153
- export function SlideArranger(config: object): Arranger;
154
- /**
155
- * An arranger that enters from the left and leaves to the right.
156
- */
157
- export declare const SlideRightArranger: Arranger;
158
- /**
159
- * An arranger that enters from the right and leaves to the left..
160
- */
161
- export declare const SlideLeftArranger: Arranger;
162
- /**
163
- * An arranger that enters from the bottom and leaves to the top..
164
- */
165
- export declare const SlideTopArranger: Arranger;
166
- /**
167
- * An arranger that enters from the top and leaves to the bottom..
168
- */
169
- export declare const SlideBottomArranger: Arranger;
170
-
171
- export interface ViewManagerDecoratorProps
172
- extends ui_ForwardRef_ForwardRefProps {}
173
- export function ViewManagerDecorator<P>(
174
- Component: React.ComponentType<P> | string
175
- ): React.ComponentType<P & ViewManagerDecoratorProps>;
176
-
177
- export interface ViewManagerProps
178
- extends Omit<
179
- Merge<ViewManagerBaseProps, ViewManagerDecoratorProps>,
180
- "componentRef"
181
- > {}
182
- /**
183
- * A `ViewManager` controls the visibility of a configurable number of views, allowing for them to be
184
- transitioned on and off the viewport.
185
- */
186
-
187
- export class ViewManager extends React.Component<
188
- Merge<React.HTMLProps<HTMLElement>, ViewManagerProps>
189
- > {}
190
-
191
- export default ViewManager;