@enact/ui 4.6.1 → 4.6.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 (163) hide show
  1. package/AnnounceDecorator/Announce.js +4 -2
  2. package/AnnounceDecorator/AnnounceDecorator.d.ts +64 -0
  3. package/AnnounceDecorator/AnnounceDecorator.js +3 -1
  4. package/BodyText/BodyText.d.ts +66 -0
  5. package/BodyText/BodyText.js +3 -1
  6. package/Button/Button.d.ts +125 -0
  7. package/Button/Button.js +3 -1
  8. package/CHANGELOG.md +4 -0
  9. package/Cancelable/Cancelable.d.ts +64 -0
  10. package/Cancelable/Cancelable.js +4 -2
  11. package/Cancelable/tests/Cancelable-specs.js +3 -1
  12. package/Changeable/Changeable.d.ts +54 -0
  13. package/Changeable/Changeable.js +4 -2
  14. package/ComponentOverride/ComponentOverride.d.ts +52 -0
  15. package/ComponentOverride/ComponentOverride.js +3 -1
  16. package/FloatingLayer/FloatingLayer.js +4 -2
  17. package/FloatingLayer/FloatingLayerContainer.js +3 -1
  18. package/FloatingLayer/FloatingLayerDecorator.js +3 -1
  19. package/FloatingLayer/Scrim.js +4 -2
  20. package/FloatingLayer/index.d.ts +100 -0
  21. package/FloatingLayer/tests/useFloatingLayerDecorator-specs.js +3 -1
  22. package/FloatingLayer/useFloatingLayer.js +2 -2
  23. package/ForwardRef/ForwardRef.d.ts +22 -0
  24. package/ForwardRef/ForwardRef.js +3 -1
  25. package/GridListImageItem/GridListImageItem.d.ts +85 -0
  26. package/GridListImageItem/GridListImageItem.js +3 -1
  27. package/Group/Group.d.ts +107 -0
  28. package/Group/Group.js +3 -1
  29. package/Group/GroupItem.js +3 -1
  30. package/Heading/Heading.d.ts +89 -0
  31. package/Heading/Heading.js +3 -1
  32. package/Icon/Icon.d.ts +88 -0
  33. package/Icon/Icon.js +3 -1
  34. package/IconButton/IconButton.d.ts +115 -0
  35. package/IconButton/IconButton.js +4 -2
  36. package/Image/Image.d.ts +113 -0
  37. package/Image/Image.js +3 -1
  38. package/ImageItem/ImageItem.d.ts +83 -0
  39. package/ImageItem/ImageItem.js +3 -1
  40. package/ImageItem/tests/ImageItem-specs.js +3 -1
  41. package/Item/Item.d.ts +64 -0
  42. package/Item/Item.js +3 -1
  43. package/LabeledIcon/LabeledIcon.d.ts +130 -0
  44. package/LabeledIcon/LabeledIcon.js +3 -1
  45. package/Layout/Cell.js +3 -1
  46. package/Layout/Layout.d.ts +267 -0
  47. package/Layout/Layout.js +28 -5
  48. package/Layout/tests/Layout-specs.js +5 -3
  49. package/Marquee/MarqueeBase.js +3 -1
  50. package/Marquee/MarqueeController.js +4 -2
  51. package/Marquee/MarqueeDecorator.js +4 -2
  52. package/Marquee/index.d.ts +258 -0
  53. package/Marquee/tests/Marquee-specs.js +3 -1
  54. package/Measurable/Measurable.d.ts +26 -0
  55. package/Measurable/Measurable.js +5 -3
  56. package/Measurable/tests/Measurable-specs.js +8 -6
  57. package/Media/Media.d.ts +99 -0
  58. package/Media/Media.js +6 -4
  59. package/Placeholder/PlaceholderControllerDecorator.js +4 -2
  60. package/Placeholder/PlaceholderDecorator.js +4 -2
  61. package/Placeholder/index.d.ts +53 -0
  62. package/ProgressBar/ProgressBar.d.ts +92 -0
  63. package/ProgressBar/ProgressBar.js +3 -1
  64. package/README.md +1 -1
  65. package/RadioDecorator/RadioControllerDecorator.js +4 -2
  66. package/RadioDecorator/RadioDecorator.d.ts +35 -0
  67. package/RadioDecorator/RadioDecorator.js +4 -2
  68. package/Repeater/Repeater.d.ts +82 -0
  69. package/Repeater/Repeater.js +3 -1
  70. package/Repeater/tests/Repeater-specs.js +3 -1
  71. package/Resizable/Resizable.d.ts +31 -0
  72. package/Resizable/Resizable.js +4 -2
  73. package/Routable/Link.js +4 -2
  74. package/Routable/Routable.d.ts +148 -0
  75. package/Routable/Routable.js +3 -1
  76. package/Routable/Router.js +4 -2
  77. package/Routable/tests/Routable-specs.js +5 -3
  78. package/Scrollable/ScrollAnimator.js +3 -1
  79. package/Scrollable/ScrollThumb.js +3 -1
  80. package/Scrollable/Scrollable.d.ts +0 -0
  81. package/Scrollable/Scrollable.js +4 -2
  82. package/Scrollable/ScrollableNative.js +4 -2
  83. package/Scrollable/Scrollbar.js +4 -2
  84. package/Scroller/Scroller.d.ts +276 -0
  85. package/Scroller/Scroller.js +3 -1
  86. package/Scroller/ScrollerBasic.js +4 -2
  87. package/Scroller/UiScrollerBase.js +4 -2
  88. package/Skinnable/Skinnable.d.ts +94 -0
  89. package/Skinnable/Skinnable.js +3 -1
  90. package/Skinnable/tests/Skinnable-specs.js +3 -1
  91. package/Skinnable/tests/useSkins-specs.js +3 -1
  92. package/Slider/Knob.js +3 -1
  93. package/Slider/PositionDecorator.js +4 -2
  94. package/Slider/Slider.d.ts +202 -0
  95. package/Slider/Slider.js +3 -1
  96. package/SlotItem/SlotItem.d.ts +118 -0
  97. package/SlotItem/SlotItem.js +3 -1
  98. package/Slottable/Slottable.d.ts +22 -0
  99. package/Slottable/Slottable.js +3 -1
  100. package/Slottable/useSlots.js +3 -1
  101. package/Spinner/Spinner.d.ts +95 -0
  102. package/Spinner/Spinner.js +3 -1
  103. package/ToggleIcon/ToggleIcon.d.ts +90 -0
  104. package/ToggleIcon/ToggleIcon.js +3 -1
  105. package/ToggleItem/ToggleItem.d.ts +132 -0
  106. package/ToggleItem/ToggleItem.js +3 -1
  107. package/ToggleItem/tests/ToggleItem-specs.js +3 -1
  108. package/Toggleable/Toggle.js +4 -2
  109. package/Toggleable/Toggleable.d.ts +103 -0
  110. package/Toggleable/Toggleable.js +3 -1
  111. package/Toggleable/useToggle.js +1 -1
  112. package/Touchable/ClickAllow.js +3 -1
  113. package/Touchable/Drag.js +4 -2
  114. package/Touchable/Flick.js +4 -2
  115. package/Touchable/Hold.js +4 -2
  116. package/Touchable/Pinch.js +4 -2
  117. package/Touchable/Touch.js +3 -1
  118. package/Touchable/Touchable.d.ts +217 -0
  119. package/Touchable/Touchable.js +3 -1
  120. package/Touchable/config.js +3 -1
  121. package/Touchable/tests/useTouch-specs.js +3 -1
  122. package/Touchable/useTouch.js +5 -3
  123. package/Transition/Transition.d.ts +194 -0
  124. package/Transition/Transition.js +4 -2
  125. package/Transition/tests/Transition-specs.js +5 -3
  126. package/ViewManager/Arranger.js +3 -1
  127. package/ViewManager/TransitionGroup.js +3 -1
  128. package/ViewManager/View.js +4 -2
  129. package/ViewManager/ViewManager.d.ts +191 -0
  130. package/ViewManager/ViewManager.js +4 -2
  131. package/ViewManager/tests/ViewManager-specs.js +3 -1
  132. package/VirtualList/UiVirtualListBase.js +5 -3
  133. package/VirtualList/VirtualList.d.ts +528 -0
  134. package/VirtualList/VirtualList.js +3 -1
  135. package/VirtualList/VirtualListBasic.js +5 -3
  136. package/VirtualList/tests/VirtualGridList-native-specs.js +3 -1
  137. package/VirtualList/tests/VirtualGridList-specs.js +3 -1
  138. package/VirtualList/tests/VirtualList-native-specs.js +3 -1
  139. package/VirtualList/tests/VirtualList-specs.js +3 -1
  140. package/index.d.ts +0 -0
  141. package/internal/IdProvider/IdProvider.d.ts +0 -0
  142. package/internal/IdProvider/IdProvider.js +3 -1
  143. package/internal/IdProvider/Provider.js +3 -1
  144. package/internal/IdProvider/tests/IdProvider-specs.js +3 -1
  145. package/internal/IdProvider/tests/useId-specs.js +4 -3
  146. package/internal/Pure/Pure.d.ts +0 -0
  147. package/internal/Pure/Pure.js +4 -2
  148. package/internal/Pure/tests/Pure-specs.js +4 -2
  149. package/internal/localized-fonts/localized-fonts.d.ts +53 -0
  150. package/internal/localized-fonts/localized-fonts.js +2 -2
  151. package/internal/selection/selection.d.ts +0 -0
  152. package/internal/validators/validators.d.ts +0 -0
  153. package/package.json +2 -2
  154. package/resolution/ResolutionDecorator.js +4 -2
  155. package/resolution/index.d.ts +187 -0
  156. package/useControlledState/tests/useControlledState-specs.js +2 -2
  157. package/useControlledState/useControlledState.d.ts +0 -0
  158. package/useControlledState/useControlledState.js +2 -2
  159. package/useScroll/ScrollAnimator.js +3 -1
  160. package/useScroll/Scrollbar.js +6 -4
  161. package/useScroll/ScrollbarTrack.js +3 -1
  162. package/useScroll/useScroll.d.ts +0 -0
  163. package/useScroll/useScroll.js +64 -52
@@ -0,0 +1,267 @@
1
+ // Type definitions for ui/Layout
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 CellBaseProps {
10
+ /**
11
+ * The alignment of `Cell` .
12
+ *
13
+ * Aligns this `Cell` vertically in the case of a horizontal layout or
14
+ horizontally in the case of a vertical layout. `"start"` , `"center"` and
15
+ `"end"` are the most commonly used, although all values of `align-self` are supported.
16
+ `"start"` refers to the top in a horizontal layout, and left in a vertical LTR layout
17
+ `"end"` refers to the bottom in a horizontal layout, and right in a vertical LTR layout
18
+ `"start"` and `"end"` reverse places when in a vertical layout in a RTL locale.
19
+ */
20
+ align?: string;
21
+ /**
22
+ * Any valid that should be positioned in this `Cell` .
23
+ */
24
+ children?: Any;
25
+ /**
26
+ * The type of component to use to render as the `Cell` . May be a DOM node name (e.g 'div',
27
+ 'span', etc.) or a custom component.
28
+ */
29
+ component?: string | React.ComponentType;
30
+ /**
31
+ * Called with a reference to the root component.
32
+ *
33
+ * When using , the `ref` prop is forwarded to this component
34
+ as `componentRef` .
35
+ */
36
+ componentRef?: object | Function;
37
+ /**
38
+ * Sizes `Cell` to its contents.
39
+ *
40
+ * A `shrink` able cell will contract to its minimum size, according to the dimensions of its
41
+ contents. This is used when you want the size of this Cell's content to influence the
42
+ dimensions of this cell. `shrink` will not allow the contents of the Layout to be pushed
43
+ beyond its boundaries (overflowing). See the property
44
+ for more details.
45
+ */
46
+ shrink?: boolean;
47
+ /**
48
+ * Sets the desired size of the Cell using any valid CSS measurement value.
49
+ *
50
+ * When used in conjunction with , the size will be
51
+ the maximum size, shrinking as necessary, to fit the content.
52
+ *
53
+ * E.g.
54
+ * * `size="400px"` -> cell will be 400px, regardless of the dimensions of your content
55
+ * * `size="400px" shrink` -> cell will be 400px if your content is greater than 400px,
56
+ and will match your contents size if it's smaller
57
+ *
58
+ * This accepts any valid CSS measurement value string. If a numeric value is used, it will
59
+ be treated as a pixel value and converted to a
60
+ based on the rules of
61
+ .
62
+ */
63
+ size?: string | number;
64
+ }
65
+ /**
66
+ * A stateless component that provides a space for your content in a
67
+ , without applied.
68
+ */
69
+
70
+ export class CellBase extends React.Component<
71
+ Merge<React.HTMLProps<HTMLElement>, CellBaseProps>
72
+ > {}
73
+
74
+ export interface CellDecoratorProps extends ui_ForwardRef_ForwardRefProps {}
75
+ export function CellDecorator<P>(
76
+ Component: React.ComponentType<P> | string
77
+ ): React.ComponentType<P & CellDecoratorProps>;
78
+
79
+ export interface LayoutBaseProps {
80
+ /**
81
+ * The alignment of children.
82
+ *
83
+ * Aligns the children vertically in the case of a horizontal
84
+ layout or horizontally in the case of a vertical layout. `"start"` , `"center"` and
85
+ `"end"` are the most commonly used, although all values of `align-items` are supported.
86
+ `"start"` refers to the top in a horizontal layout, and left in a vertical LTR layout
87
+ `"end"` refers to the bottom in a horizontal layout, and right in a vertical LTR layout
88
+ `"start"` and `"end"` reverse places when in a vertical layout in a RTL locale.
89
+ This includes support shorthand for combining `align-items` and `justify-content` into
90
+ a single property, separated by a space, in that order. This allows you to specify both
91
+ the horizontal and vertical alignment in one property, separated by a space.
92
+ *
93
+ * For example, `align="center space-between"` means `align-items: center` and
94
+ `justify-content: space-between` for each. `justify-content` property can be used to
95
+ align the Cells on the main axis and adjust gaps among the Cells. To declare the
96
+ `justify-content` property only, just add a heading space for `align` prop string like
97
+ `align=" space-between"` . The default value for `align-items` is `stretch` . It can be
98
+ also used for `align` prop like `align="stretch space-between"` . All values of
99
+ `justify-content` are supported, like `start` , `end` , `center` , `space-between` ,
100
+ `space-around` , and `space-evenly` .
101
+ * ```
102
+ <Layout align="center space-around">
103
+ <Cell>Left Column</Cell>
104
+ <Cell>Right Column</Cell>
105
+ </Layout>
106
+ ```
107
+ ```
108
+ <Layout align=" space-between">
109
+ <Cell>Left Column</Cell>
110
+ <Cell>Right Column</Cell>
111
+ </Layout>
112
+ ```
113
+ */
114
+ align?: string;
115
+ /**
116
+ * Only components are supported as children.
117
+ */
118
+ children?: Cell | Cell[];
119
+ /**
120
+ * The type of component to use to render as the `Layout` . May be a DOM node name (e.g 'div',
121
+ 'span', etc.) or a custom component.
122
+ */
123
+ component?: string | React.ComponentType;
124
+ /**
125
+ * Called with a reference to the root component.
126
+ *
127
+ * When using , the `ref` prop is forwarded to this component
128
+ as `componentRef` .
129
+ */
130
+ componentRef?: object | Function;
131
+ /**
132
+ * Allows this `Layout` to have following siblings drawn on the same line as itself
133
+ instead of carving out the entire horizontal space for itself.
134
+ */
135
+ inline?: boolean;
136
+ /**
137
+ * The orientation of the `Layout` , i.e. how the children are
138
+ positioned on the screen. Must be either `'horizontal'` or `'vertical'` .
139
+ */
140
+ orientation?: string;
141
+ /**
142
+ * Sets the Layout's `flex-wrap` values.
143
+ *
144
+ * Determines how a Layout handles its cells if there are more than fit in the available
145
+ space. This works like a normal `Boolean` prop, but also accepts strings for customization
146
+ beyond the basic on/off support. In addition to `true` and `false` , the following strings
147
+ are supported: 'wrap', 'nowrap', 'reverse'. 'reverse' performs standard line wrapping but
148
+ additional lines are placed above/before the preceding line instead of below/after.
149
+ */
150
+ wrap?: boolean | string;
151
+ }
152
+ /**
153
+ * A container for `Cell` s.
154
+ *
155
+ * A stateless component that acts as a containing area for to be
156
+ positioned in a row or a column (horizontally or vertically, respectively. It supports an
157
+ property for laying-out its contents
158
+ ( `Cells` ) in an organized, readable way.
159
+ *
160
+ * Example:
161
+ * ```
162
+ import Input from '@enact/moonstone/Input';
163
+ import css from './LayoutExample.less';
164
+ ...
165
+ <fieldset>
166
+ <Layout align="center">
167
+ <Cell component="label" size="40%" className={css.label} shrink>First Name</Cell>
168
+ <Cell component={Input} placeholder="First" className={css.input} />
169
+ </Layout>
170
+ <Layout align="center">
171
+ <Cell component="label" size="40%" className={css.label} shrink>Last Name</Cell>
172
+ <Cell component={Input} placeholder="Last" className={css.input} />
173
+ </Layout>
174
+ </fieldset>
175
+ ```
176
+ */
177
+
178
+ export class LayoutBase extends React.Component<
179
+ Merge<React.HTMLProps<HTMLElement>, LayoutBaseProps>
180
+ > {}
181
+
182
+ export interface CellProps
183
+ extends Omit<Merge<CellBaseProps, CellDecoratorProps>, "componentRef"> {}
184
+ /**
185
+ * A stateless component that provides a space for your content in a
186
+ .
187
+ */
188
+
189
+ export class Cell extends React.Component<
190
+ Merge<React.HTMLProps<HTMLElement>, CellProps>
191
+ > {}
192
+
193
+ export interface LayoutDecoratorProps extends ui_ForwardRef_ForwardRefProps {}
194
+ export function LayoutDecorator<P>(
195
+ Component: React.ComponentType<P> | string
196
+ ): React.ComponentType<P & LayoutDecoratorProps>;
197
+
198
+ export interface LayoutProps
199
+ extends Omit<
200
+ Merge<LayoutBaseProps, ui_ForwardRef_ForwardRefProps>,
201
+ "componentRef"
202
+ > {}
203
+ /**
204
+ * A container for `Cell` s.
205
+ *
206
+ * A stateless component that acts as a containing area for to be
207
+ positioned in a row or a column (horizontally or vertically, respectively. It supports an
208
+ property for laying-out its contents
209
+ ( `Cells` ) in an organized, readable way.
210
+ *
211
+ * Example:
212
+ * ```
213
+ import Input from '@enact/moonstone/Input';
214
+ import css from './LayoutExample.less';
215
+ ...
216
+ <fieldset>
217
+ <Layout align="center">
218
+ <Cell component="label" size="40%" className={css.label} shrink>First Name</Cell>
219
+ <Cell component={Input} placeholder="First" className={css.input} />
220
+ </Layout>
221
+ <Layout align="center">
222
+ <Cell component="label" size="40%" className={css.label} shrink>Last Name</Cell>
223
+ <Cell component={Input} placeholder="Last" className={css.input} />
224
+ </Layout>
225
+ </fieldset>
226
+ ```
227
+ */
228
+
229
+ export class Layout extends React.Component<
230
+ Merge<React.HTMLProps<HTMLElement>, LayoutProps>
231
+ > {}
232
+
233
+ export interface ColumnProps
234
+ extends Merge<LayoutProps, ui_ForwardRef_ForwardRefProps> {}
235
+ /**
236
+ * Shorthand for `<Layout orientation="vertical">` , which positions its
237
+ vertically.
238
+ * ```
239
+ ┌────┐
240
+ ├────┤
241
+ ├────┤
242
+ ├────┤
243
+ └────┘
244
+ ```
245
+ */
246
+
247
+ export class Column extends React.Component<
248
+ Merge<React.HTMLProps<HTMLElement>, ColumnProps>
249
+ > {}
250
+
251
+ export interface RowProps
252
+ extends Merge<LayoutProps, ui_ForwardRef_ForwardRefProps> {}
253
+ /**
254
+ * Shorthand for `<Layout orientation="horizontal">` , which positions its
255
+ horizontally.
256
+ * ```
257
+ ┌─┬─┬─┬─┐
258
+ │ │ │ │ │
259
+ └─┴─┴─┴─┘
260
+ ```
261
+ */
262
+
263
+ export class Row extends React.Component<
264
+ Merge<React.HTMLProps<HTMLElement>, RowProps>
265
+ > {}
266
+
267
+ export default Layout;
package/Layout/Layout.js CHANGED
@@ -35,7 +35,9 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
35
35
  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; }
36
36
  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; }
37
37
  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; }
38
- 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; }
38
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
39
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
40
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
39
41
  /**
40
42
  * A container for `Cell`s.
41
43
  *
@@ -78,10 +80,31 @@ var LayoutBase = (0, _kind["default"])({
78
80
  * `"start"` refers to the top in a horizontal layout, and left in a vertical LTR layout
79
81
  * `"end"` refers to the bottom in a horizontal layout, and right in a vertical LTR layout
80
82
  * `"start"` and `"end"` reverse places when in a vertical layout in a RTL locale.
81
- * This includes support for `align-parts` which is shorthand for combining `align-items`
82
- * and `justify-content` into a single property, separated by a space, in that order.
83
- * This allows you to specify both the horizontal and vertical alignment in one property,
84
- * separated by a space.
83
+ * This includes support shorthand for combining `align-items` and `justify-content` into
84
+ * a single property, separated by a space, in that order. This allows you to specify both
85
+ * the horizontal and vertical alignment in one property, separated by a space.
86
+ *
87
+ * For example, `align="center space-between"` means `align-items: center` and
88
+ * `justify-content: space-between` for each. `justify-content` property can be used to
89
+ * align the Cells on the main axis and adjust gaps among the Cells. To declare the
90
+ * `justify-content` property only, just add a heading space for `align` prop string like
91
+ * `align=" space-between"`. The default value for `align-items` is `stretch`. It can be
92
+ * also used for `align` prop like `align="stretch space-between"`. All values of
93
+ * `justify-content` are supported, like `start`, `end`, `center`, `space-between`,
94
+ * `space-around`, and `space-evenly`.
95
+ *
96
+ * ```
97
+ * <Layout align="center space-around">
98
+ * <Cell>Left Column</Cell>
99
+ * <Cell>Right Column</Cell>
100
+ * </Layout>
101
+ * ```
102
+ * ```
103
+ * <Layout align=" space-between">
104
+ * <Cell>Left Column</Cell>
105
+ * <Cell>Right Column</Cell>
106
+ * </Layout>
107
+ * ```
85
108
  *
86
109
  * @type {String}
87
110
  * @public
@@ -8,12 +8,14 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
8
8
  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; }
9
9
  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; }
10
10
  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; }
11
- 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; }
11
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
12
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
13
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
12
14
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
13
15
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
14
16
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
15
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
16
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
17
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
18
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
17
19
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
18
20
  describe('Layout Specs', function () {
19
21
  var layoutPropAlign = [['baseline', 'baseline'], ['center', 'center'], ['end', 'flex-end'], ['start', 'flex-start']];
@@ -15,7 +15,9 @@ var _excluded = ["applyOffset", "children", "clientClassName", "clientRef", "cli
15
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
16
16
  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; }
17
17
  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; }
18
- 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; }
18
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
19
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
20
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
19
21
  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; }
20
22
  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; }
21
23
  var isEventSource = function isEventSource(ev) {
@@ -12,10 +12,12 @@ var _jsxRuntime = require("react/jsx-runtime");
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
13
  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; }
14
14
  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; }
15
- 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; }
15
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
16
16
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
17
- 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); } }
17
+ 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, _toPropertyKey(descriptor.key), descriptor); } }
18
18
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
19
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
20
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
19
21
  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); }
20
22
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
21
23
  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,12 +25,14 @@ var _excluded = ["alignment", "children", "disabled", "marqueeOn", "marqueeSpeed
25
25
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
26
26
  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; }
27
27
  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; }
28
- 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; }
28
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
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; }
31
31
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
32
- 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); } }
32
+ 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, _toPropertyKey(descriptor.key), descriptor); } }
33
33
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
34
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
35
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
34
36
  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
37
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
36
38
  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); }; }
@@ -0,0 +1,258 @@
1
+ // Type definitions for ui/Marquee
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 MarqueeBaseProps {
9
+ /**
10
+ * Text alignment value of the marquee
11
+ *
12
+ * Valid values are:
13
+ * * `'left'` ,
14
+ * * `'right'` , and
15
+ * * `'center'`
16
+ */
17
+ alignment?: string;
18
+ /**
19
+ * Applies animating styles such as removing the ellipsis.
20
+ */
21
+ animating?: boolean;
22
+ /**
23
+ * Sets the value of the `aria-label` attribute for the wrapped component.
24
+ */
25
+ "aria-label"?: string;
26
+ /**
27
+ * The text or a set of components that should be marqueed
28
+ *
29
+ * This prop may be empty in some cases, which is OK.
30
+ */
31
+ children?: React.ReactNode;
32
+ /**
33
+ * Called when mounting or unmounting with a reference to the client node
34
+ */
35
+ clientRef?: object | Function;
36
+ /**
37
+ * Customizes the component by mapping the supplied collection of CSS class names to the
38
+ corresponding internal elements and states of this component.
39
+ *
40
+ * The following classes are supported:
41
+ * * `marquee` - The root component class
42
+ * * `animate` - Applied to the inner content node when the text is animating
43
+ * * `spacing` - The spacing node used between the repeated content
44
+ * * `text` - The inner content node
45
+ * * `willAnimate` - Applied to the inner content node shortly before animation
46
+ */
47
+ css?: object;
48
+ /**
49
+ * Distance to animate the marquee
50
+ *
51
+ * Usually, the `distance` is the width of the text minus the width of the container
52
+ */
53
+ distance?: number;
54
+ /**
55
+ * Called when the marquee completes its animation
56
+ */
57
+ onMarqueeComplete?: Function;
58
+ /**
59
+ * Text overflow setting. Either `'clip'` or `'ellipsis'`
60
+ */
61
+ overflow?: "clip" | "ellipsis";
62
+ /**
63
+ * `true` if the directionality of the content is right-to-left
64
+ */
65
+ rtl?: boolean;
66
+ /**
67
+ * Amount of spacing, in pixels, between the instances of the content
68
+ */
69
+ spacing?: number;
70
+ /**
71
+ * Speed of marquee animation in pixels/second.
72
+ */
73
+ speed?: number;
74
+ /**
75
+ * Indicates the marquee will animate soon.
76
+ *
77
+ * Should be used by the component to prepare itself for animation such as promoting
78
+ composite layers for improved performance.
79
+ */
80
+ willAnimate?: boolean;
81
+ }
82
+ /**
83
+ * Marquees the children of the component.
84
+ *
85
+ * For automated marquee calculations use .
86
+ */
87
+
88
+ export class MarqueeBase extends React.Component<
89
+ Merge<React.HTMLProps<HTMLElement>, MarqueeBaseProps>
90
+ > {}
91
+
92
+ export interface MarqueeControllerConfig extends Object {
93
+ /**
94
+ * When `true` , any `onFocus` events that bubble to the controller will start the contained
95
+ `Marquee` instances. This is useful when a component contains `Marquee` instances that need to be
96
+ started when sibling components are focused.
97
+ */
98
+ marqueeOnFocus?: boolean;
99
+ }
100
+ export interface MarqueeControllerProps {}
101
+ export function MarqueeController<P>(
102
+ config: MarqueeControllerConfig,
103
+ Component: React.ComponentType<P> | string
104
+ ): React.ComponentType<P & MarqueeControllerProps>;
105
+
106
+ export function MarqueeController<P>(
107
+ Component: React.ComponentType<P> | string
108
+ ): React.ComponentType<P & MarqueeControllerProps>;
109
+
110
+ export interface MarqueeDecoratorConfig extends Object {
111
+ /**
112
+ * Property containing the callback to stop the animation when `marqueeOn` is `'focus'`
113
+ */
114
+ blur?: string;
115
+ /**
116
+ * Optional CSS class name to customize the marquee `component`
117
+ */
118
+ className?: string;
119
+ /**
120
+ * The base marquee component wrapping the content.
121
+ */
122
+ component?: React.ComponentType;
123
+ /**
124
+ * Customizes the component by mapping the supplied collection of CSS class names to the
125
+ corresponding internal elements and states of this component.
126
+ *
127
+ * The following classes are supported:
128
+ * * `marquee` - The root component class
129
+ * * `animate` - Applied to the inner content node when the text is animating
130
+ * * `spacing` - The spacing node used between the repeated content
131
+ * * `text` - The inner content node
132
+ * * `willAnimate` - Applied to the inner content node shortly before animation
133
+ */
134
+ css?: object;
135
+ /**
136
+ * Property containing the callback to start the animation when `marqueeOn` is `'hover'`
137
+ */
138
+ enter?: string;
139
+ /**
140
+ * Property containing the callback to start the animation when `marqueeOn` is `'focus'`
141
+ */
142
+ focus?: string;
143
+ /**
144
+ * Invalidate the distance if any property (like 'inline') changes.
145
+ Expects an array of props which on change trigger invalidateMetrics.
146
+ */
147
+ invalidateProps?: string[];
148
+ /**
149
+ * Property containing the callback to stop the animation when `marqueeOn` is `'hover'`
150
+ */
151
+ leave?: string;
152
+ /**
153
+ * A function that determines the text directionality of a string.
154
+ *
155
+ * Returns:
156
+ * * `'rtl'` if the text should marquee to the right
157
+ * * `'ltr'` if the text should marquee to the left
158
+ */
159
+ marqueeDirection?: Function;
160
+ }
161
+ export interface MarqueeDecoratorProps {
162
+ /**
163
+ * Text alignment value of the marquee. Valid values are `'left'` , `'right'` and `'center'` .
164
+ */
165
+ alignment?: string;
166
+ /**
167
+ * Children to be marqueed
168
+ */
169
+ children?: React.ReactNode;
170
+ /**
171
+ * Passed through to the wrapped component.
172
+ *
173
+ * Does not affect Marquee behavior except that components that are `marqueeOn="focus"`
174
+ will be treated as if they were `marqueeOn="hover"` , to allow disabled (and thus,
175
+ unfocusable) components to marquee.
176
+ */
177
+ disabled?: boolean;
178
+ /**
179
+ * Forces the `direction` of the marquee.
180
+ *
181
+ * Valid values are `'rtl'` , `'ltr'` , and `'locale'` . This includes non-text elements as well.
182
+ The default behavior, if this prop is unset, is to evaluate the text content for
183
+ directionality using .
184
+ *
185
+ * If `'locale'` , the `direction` is determined by the locale, same as .
186
+ In other words, it will not consider the text content for determining the direction.
187
+ */
188
+ forceDirection?: string;
189
+ /**
190
+ * The current locale as a
191
+ .
192
+ */
193
+ locale?: string;
194
+ /**
195
+ * Number of milliseconds to wait before starting marquee when `marqueeOn` is `'hover'` or
196
+ `'focus'` or before restarting any marquee.
197
+ */
198
+ marqueeDelay?: number;
199
+ /**
200
+ * Disables all marquee behavior and removes supporting markup.
201
+ */
202
+ marqueeDisabled?: boolean;
203
+ /**
204
+ * Determines what triggers the marquee to start its animation.
205
+ */
206
+ marqueeOn?: "focus" | "hover" | "render";
207
+ /**
208
+ * Number of milliseconds to wait before starting marquee the first time.
209
+ *
210
+ * Has no effect if `marqueeOn` is not `'render'`
211
+ */
212
+ marqueeOnRenderDelay?: number;
213
+ /**
214
+ * Number of milliseconds to wait before resetting the marquee position after it
215
+ finishes.
216
+ *
217
+ * A minimum of 40 milliseconds is enforced.
218
+ */
219
+ marqueeResetDelay?: number;
220
+ /**
221
+ * Amount of spacing between the instances of the content when animating.
222
+ *
223
+ * May either be a number indicating the number of pixels or a string indicating the
224
+ percentage relative to the width of the component.
225
+ *
226
+ * _Note:_ When using a number, the value should be based on 1920x1080 display and
227
+ will be scaled automatically for the current resolution using .
228
+ */
229
+ marqueeSpacing?: string | number;
230
+ /**
231
+ * Rate of marquee measured in pixels/second.
232
+ */
233
+ marqueeSpeed?: number;
234
+ /**
235
+ * Indicates the text directionality of the current locale is right-to-left
236
+ */
237
+ rtl?: string;
238
+ }
239
+ export function MarqueeDecorator<P>(
240
+ config: MarqueeDecoratorConfig,
241
+ Component: React.ComponentType<P> | string
242
+ ): React.ComponentType<P & MarqueeDecoratorProps>;
243
+
244
+ export function MarqueeDecorator<P>(
245
+ Component: React.ComponentType<P> | string
246
+ ): React.ComponentType<P & MarqueeDecoratorProps>;
247
+
248
+ export interface MarqueeProps
249
+ extends Merge<MarqueeBaseProps, MarqueeDecoratorProps> {}
250
+ /**
251
+ * A minimally-styled marquee component.
252
+ */
253
+
254
+ export class Marquee extends React.Component<
255
+ Merge<React.HTMLProps<HTMLElement>, MarqueeProps>
256
+ > {}
257
+
258
+ export default Marquee;