@enact/ui 4.6.1 → 4.7.0
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.
- package/AnnounceDecorator/Announce.js +27 -15
- package/AnnounceDecorator/AnnounceDecorator.d.ts +64 -0
- package/AnnounceDecorator/AnnounceDecorator.js +15 -6
- package/AnnounceDecorator/useAnnounce.js +1 -2
- package/BodyText/BodyText.d.ts +66 -0
- package/BodyText/BodyText.js +14 -6
- package/Button/Button.d.ts +125 -0
- package/Button/Button.js +18 -10
- package/CHANGELOG.md +14 -0
- package/Cancelable/Cancelable.d.ts +64 -0
- package/Cancelable/Cancelable.js +17 -9
- package/Cancelable/tests/Cancelable-specs.js +3 -1
- package/Changeable/Changeable.d.ts +54 -0
- package/Changeable/Changeable.js +15 -9
- package/ComponentOverride/ComponentOverride.d.ts +52 -0
- package/ComponentOverride/ComponentOverride.js +18 -5
- package/FloatingLayer/FloatingLayer.js +14 -13
- package/FloatingLayer/FloatingLayerContainer.js +3 -1
- package/FloatingLayer/FloatingLayerDecorator.js +11 -6
- package/FloatingLayer/Scrim.js +4 -2
- package/FloatingLayer/index.d.ts +100 -0
- package/FloatingLayer/tests/useFloatingLayerDecorator-specs.js +3 -1
- package/FloatingLayer/useFloatingLayer.js +2 -2
- package/ForwardRef/ForwardRef.d.ts +22 -0
- package/ForwardRef/ForwardRef.js +13 -7
- package/GridListImageItem/GridListImageItem.d.ts +85 -0
- package/GridListImageItem/GridListImageItem.js +16 -7
- package/Group/Group.d.ts +107 -0
- package/Group/Group.js +17 -6
- package/Group/GroupItem.js +16 -10
- package/Heading/Heading.d.ts +89 -0
- package/Heading/Heading.js +22 -9
- package/Icon/Icon.d.ts +88 -0
- package/Icon/Icon.js +15 -6
- package/IconButton/IconButton.d.ts +115 -0
- package/IconButton/IconButton.js +26 -11
- package/Image/Image.d.ts +113 -0
- package/Image/Image.js +16 -6
- package/ImageItem/ImageItem.d.ts +83 -0
- package/ImageItem/ImageItem.js +12 -2
- package/ImageItem/tests/ImageItem-specs.js +3 -1
- package/Item/Item.d.ts +64 -0
- package/Item/Item.js +17 -7
- package/LabeledIcon/LabeledIcon.d.ts +130 -0
- package/LabeledIcon/LabeledIcon.js +16 -6
- package/Layout/Cell.js +30 -5
- package/Layout/Layout.d.ts +284 -0
- package/Layout/Layout.js +181 -36
- package/Layout/Layout.module.css +8 -0
- package/Layout/tests/Layout-specs.js +44 -3
- package/Marquee/MarqueeBase.js +3 -1
- package/Marquee/MarqueeController.js +54 -2
- package/Marquee/MarqueeDecorator.js +44 -4
- package/Marquee/index.d.ts +258 -0
- package/Marquee/tests/Marquee-specs.js +3 -1
- package/Measurable/Measurable.d.ts +26 -0
- package/Measurable/Measurable.js +16 -10
- package/Measurable/tests/Measurable-specs.js +8 -6
- package/Media/Media.d.ts +99 -0
- package/Media/Media.js +36 -27
- package/Placeholder/PlaceholderControllerDecorator.js +13 -10
- package/Placeholder/PlaceholderDecorator.js +11 -10
- package/Placeholder/index.d.ts +53 -0
- package/ProgressBar/ProgressBar.d.ts +92 -0
- package/ProgressBar/ProgressBar.js +14 -1
- package/README.md +1 -1
- package/RadioDecorator/RadioControllerDecorator.js +4 -2
- package/RadioDecorator/RadioDecorator.d.ts +35 -0
- package/RadioDecorator/RadioDecorator.js +17 -9
- package/Repeater/Repeater.d.ts +82 -0
- package/Repeater/Repeater.js +16 -10
- package/Repeater/tests/Repeater-specs.js +3 -1
- package/Resizable/Resizable.d.ts +31 -0
- package/Resizable/Resizable.js +16 -10
- package/Routable/Link.js +12 -10
- package/Routable/Routable.d.ts +148 -0
- package/Routable/Routable.js +17 -8
- package/Routable/Router.js +14 -12
- package/Routable/tests/Routable-specs.js +5 -3
- package/Scrollable/ScrollAnimator.js +3 -1
- package/Scrollable/ScrollThumb.js +10 -9
- package/Scrollable/Scrollable.d.ts +0 -0
- package/Scrollable/Scrollable.js +27 -3
- package/Scrollable/ScrollableNative.js +16 -2
- package/Scrollable/Scrollbar.js +4 -2
- package/Scroller/Scroller.d.ts +276 -0
- package/Scroller/Scroller.js +10 -1
- package/Scroller/ScrollerBasic.js +12 -11
- package/Scroller/UiScrollerBase.js +15 -14
- package/Skinnable/Skinnable.d.ts +94 -0
- package/Skinnable/Skinnable.js +20 -6
- package/Skinnable/tests/Skinnable-specs.js +3 -1
- package/Skinnable/tests/useSkins-specs.js +3 -1
- package/Skinnable/useSkins.js +1 -2
- package/Slider/Knob.js +8 -6
- package/Slider/PositionDecorator.js +4 -2
- package/Slider/Slider.d.ts +202 -0
- package/Slider/Slider.js +18 -9
- package/SlotItem/SlotItem.d.ts +118 -0
- package/SlotItem/SlotItem.js +20 -6
- package/Slottable/Slottable.d.ts +22 -0
- package/Slottable/Slottable.js +16 -8
- package/Slottable/useSlots.js +3 -1
- package/Spinner/Spinner.d.ts +95 -0
- package/Spinner/Spinner.js +24 -7
- package/ToggleIcon/ToggleIcon.d.ts +90 -0
- package/ToggleIcon/ToggleIcon.js +21 -7
- package/ToggleItem/ToggleItem.d.ts +132 -0
- package/ToggleItem/ToggleItem.js +17 -2
- package/ToggleItem/tests/ToggleItem-specs.js +3 -1
- package/Toggleable/Toggle.js +4 -2
- package/Toggleable/Toggleable.d.ts +103 -0
- package/Toggleable/Toggleable.js +13 -7
- package/Toggleable/useToggle.js +1 -2
- package/Touchable/ClickAllow.js +3 -1
- package/Touchable/Drag.js +6 -3
- package/Touchable/Flick.js +6 -2
- package/Touchable/Hold.js +6 -2
- package/Touchable/Pinch.js +6 -3
- package/Touchable/Touch.js +6 -4
- package/Touchable/Touchable.d.ts +217 -0
- package/Touchable/Touchable.js +10 -1
- package/Touchable/config.js +3 -1
- package/Touchable/tests/useTouch-specs.js +3 -1
- package/Touchable/useTouch.js +5 -4
- package/Transition/Transition.d.ts +194 -0
- package/Transition/Transition.js +22 -4
- package/Transition/tests/Transition-specs.js +5 -3
- package/ViewManager/Arranger.js +6 -1
- package/ViewManager/TransitionGroup.js +8 -5
- package/ViewManager/View.js +7 -4
- package/ViewManager/ViewManager.d.ts +191 -0
- package/ViewManager/ViewManager.js +29 -11
- package/ViewManager/tests/ViewManager-specs.js +47 -1
- package/VirtualList/UiVirtualListBase.js +9 -3
- package/VirtualList/VirtualList.d.ts +528 -0
- package/VirtualList/VirtualList.js +13 -1
- package/VirtualList/VirtualListBasic.js +9 -3
- package/VirtualList/tests/VirtualGridList-native-specs.js +3 -1
- package/VirtualList/tests/VirtualGridList-specs.js +3 -1
- package/VirtualList/tests/VirtualList-native-specs.js +3 -1
- package/VirtualList/tests/VirtualList-specs.js +3 -1
- package/index.d.ts +0 -0
- package/internal/IdProvider/IdProvider.d.ts +0 -0
- package/internal/IdProvider/IdProvider.js +8 -7
- package/internal/IdProvider/Provider.js +3 -1
- package/internal/IdProvider/tests/IdProvider-specs.js +3 -1
- package/internal/IdProvider/tests/useId-specs.js +4 -3
- package/internal/IdProvider/useId.js +0 -1
- package/internal/Pure/Pure.d.ts +0 -0
- package/internal/Pure/Pure.js +15 -9
- package/internal/Pure/tests/Pure-specs.js +4 -2
- package/internal/localized-fonts/localized-fonts.d.ts +53 -0
- package/internal/localized-fonts/localized-fonts.js +2 -2
- package/internal/selection/selection.d.ts +0 -0
- package/internal/validators/validators.d.ts +0 -0
- package/package.json +2 -2
- package/resolution/ResolutionDecorator.js +40 -9
- package/resolution/index.d.ts +187 -0
- package/resolution/resolution.js +23 -7
- package/useControlledState/tests/useControlledState-specs.js +2 -2
- package/useControlledState/useControlledState.d.ts +0 -0
- package/useControlledState/useControlledState.js +2 -2
- package/useScroll/ScrollAnimator.js +3 -1
- package/useScroll/Scrollbar.js +6 -4
- package/useScroll/ScrollbarTrack.js +8 -6
- package/useScroll/useScroll.d.ts +0 -0
- package/useScroll/useScroll.js +80 -52
package/Layout/Layout.js
CHANGED
|
@@ -35,37 +35,161 @@ 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; }
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
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); } /**
|
|
41
|
+
* A convenient tool for laying-out content using `Layout`, `Cell`, `Row`, and `Column`.
|
|
42
|
+
*
|
|
43
|
+
* Layout is a powerful and versatile tool used for arranging content on the screen. On a conceptual
|
|
44
|
+
* level, it mixes the best parts of HTML tables wtih the best parts of HTML framesets, both of
|
|
45
|
+
* which were largely abandoned for their drawbacks, ignoring their strengths. A `Layout` is simply
|
|
46
|
+
* a container for `Cell`, the only "legal" child. Conversely, `Cell` may only be used in a
|
|
47
|
+
* `Layout`. Cells in a Layout can either be positioned next to each other (horizontally) or
|
|
48
|
+
* above/below each other (vertically) in what we refer to as a {@link ui/Layout.Row|Row} or
|
|
49
|
+
* {@link ui/Layout.Column|Column}, respectively.
|
|
50
|
+
*
|
|
51
|
+
* The `Row` and `Column` layout presets describe the direction of layout for their children. This
|
|
52
|
+
* can sometimes cause confusion. A `Row` of children naturally forms a _layout_ whose children can
|
|
53
|
+
* have the _appearance_ of columns. To keep things clear, think about the layout rather than the
|
|
54
|
+
* what the children themselves represent.
|
|
55
|
+
*
|
|
56
|
+
* `Layout` is an implementation of flex-box, but with built-in rails, properties, and features to
|
|
57
|
+
* help avoid common problems with flex-box; things like content overflowing, sizing quirks, and
|
|
58
|
+
* positioning problems regarding content of unknown or undefined dimension.
|
|
59
|
+
*
|
|
60
|
+
* The following scenarios are some common cases where `Layout` can truly help out. A quality of
|
|
61
|
+
* `Cell` you'll see below is that when a `Cell` has no defined size, it automatically sizes to fill
|
|
62
|
+
* any remaining space in the `Layout`. If there are multiple auto-sizing `Cell` components, they
|
|
63
|
+
* share the space, subdividing it equally among themselves. It's great to leverage this and only
|
|
64
|
+
* apply sizes to `Cell`s which must have defined sizes. `shrink` is one of the ways you can impose
|
|
65
|
+
* size guidelines on a `Cell`. It automatically fits the size of the Cell to the size of its
|
|
66
|
+
* content.
|
|
67
|
+
*
|
|
68
|
+
* A row of cells where the last one should always attach to the right side, regardless of the size
|
|
69
|
+
* of the main "content" cell:
|
|
70
|
+
* ```
|
|
71
|
+
* ┌───────┬─┐
|
|
72
|
+
* │Main │R│
|
|
73
|
+
* └───────┴─┘
|
|
74
|
+
* ```
|
|
75
|
+
*
|
|
76
|
+
* ```
|
|
77
|
+
* <Row>
|
|
78
|
+
* <Cell>Main Content</Cell>
|
|
79
|
+
* <Cell shrink>Right Side</Cell>
|
|
80
|
+
* </Row>
|
|
81
|
+
* ```
|
|
82
|
+
*
|
|
83
|
+
* A "two-column" layout with equal sized cells using `Row`:
|
|
84
|
+
* ```
|
|
85
|
+
* ┌────┬────┐
|
|
86
|
+
* │L │R │
|
|
87
|
+
* └────┴────┘
|
|
88
|
+
* ```
|
|
89
|
+
*
|
|
90
|
+
* ```
|
|
91
|
+
* <Row style={{height: '100%'}}>
|
|
92
|
+
* <Cell>Left Column</Cell>
|
|
93
|
+
* <Cell>Right Column</Cell>
|
|
94
|
+
* </Row>
|
|
95
|
+
* ```
|
|
96
|
+
* *Remember:* The cells of the `Row` are the columns in our layout. It's likely that in a complex
|
|
97
|
+
* layout `Column` would be used inside the left and right cells to arrange the components, as in
|
|
98
|
+
* the example below.
|
|
99
|
+
*
|
|
100
|
+
* A full-height sidebar with a header and body to the right:
|
|
101
|
+
* ```
|
|
102
|
+
* ┌──┬──────┐
|
|
103
|
+
* │S │HEADER│
|
|
104
|
+
* │ ├──────┤
|
|
105
|
+
* │ │Body │
|
|
106
|
+
* │ │ │
|
|
107
|
+
* └──┴──────┘
|
|
108
|
+
* ```
|
|
109
|
+
*
|
|
110
|
+
* ```
|
|
111
|
+
* <Row style={{height: '100%'}}>
|
|
112
|
+
* <Cell size="20%">Sidebar</Cell>
|
|
113
|
+
* <Cell>
|
|
114
|
+
* <Column>
|
|
115
|
+
* <Cell size={90} component="header">
|
|
116
|
+
* <h1>HEADER</h1>
|
|
117
|
+
* </Cell>
|
|
118
|
+
* <Cell>
|
|
119
|
+
* <p>Body area</p>
|
|
120
|
+
* </Cell>
|
|
121
|
+
* </Column>
|
|
122
|
+
* </Cell>
|
|
123
|
+
* </Row>
|
|
124
|
+
* ```
|
|
125
|
+
* *Note:* Here, we've set the height of `Row` so it fills the height of the screen, allowing the
|
|
126
|
+
* Sidebar Cell and content Cell to stretch from the top to the bottom. We've also leveraged the
|
|
127
|
+
* `component` prop on the header cell, which tells `Cell` to render itself as a "header" HTML tag
|
|
128
|
+
* rather than its usual "div" tag.
|
|
129
|
+
*
|
|
130
|
+
* The example below produces a layout like the following:
|
|
131
|
+
* ```
|
|
132
|
+
* ┌─┬─────┬─┐
|
|
133
|
+
* │o│Item │o│
|
|
134
|
+
* └─┴─────┴─┘
|
|
135
|
+
* ```
|
|
136
|
+
*
|
|
137
|
+
* You'll notice the use of some special classes in the example: `"debug layout"`. Adding these on
|
|
138
|
+
* any element in your DOM hierarchy will enable borders in Layout and Cell to help visualize what
|
|
139
|
+
* is happening in the layout. They automatically change color the deeper in the stack they go.
|
|
140
|
+
*
|
|
141
|
+
* @example
|
|
142
|
+
* <Layout className="debug layout">
|
|
143
|
+
* <Cell shrink>
|
|
144
|
+
* <button>First</button>
|
|
145
|
+
* </Cell>
|
|
146
|
+
* <Cell>
|
|
147
|
+
* <div>A div with some long text in it</div>
|
|
148
|
+
* </Cell>
|
|
149
|
+
* <Cell shrink>
|
|
150
|
+
* <button>Last</button>
|
|
151
|
+
* </Cell>
|
|
152
|
+
* </Layout>
|
|
153
|
+
*
|
|
154
|
+
* @module ui/Layout
|
|
155
|
+
* @exports Cell
|
|
156
|
+
* @exports CellBase
|
|
157
|
+
* @exports CellDecorator
|
|
158
|
+
* @exports Column
|
|
159
|
+
* @exports Layout
|
|
160
|
+
* @exports LayoutBase
|
|
161
|
+
* @exports LayoutDecorator
|
|
162
|
+
* @exports Row
|
|
163
|
+
*/ /**
|
|
164
|
+
* A container for `Cell`s.
|
|
165
|
+
*
|
|
166
|
+
* A stateless component that acts as a containing area for {@link ui/Layout.Cell|Cells} to be
|
|
167
|
+
* positioned in a row or a column (horizontally or vertically, respectively. It supports an
|
|
168
|
+
* {@link ui/Layout.LayoutBase.orientation|orientation} property for laying-out its contents
|
|
169
|
+
* (`Cells`) in an organized, readable way.
|
|
170
|
+
*
|
|
171
|
+
* Example:
|
|
172
|
+
* ```
|
|
173
|
+
* import Input from '@enact/moonstone/Input';
|
|
174
|
+
* import css from './LayoutExample.less';
|
|
175
|
+
* ...
|
|
176
|
+
* <fieldset>
|
|
177
|
+
* <Layout align="center">
|
|
178
|
+
* <Cell component="label" size="40%" className={css.label} shrink>First Name</Cell>
|
|
179
|
+
* <Cell component={Input} placeholder="First" className={css.input} />
|
|
180
|
+
* </Layout>
|
|
181
|
+
* <Layout align="center">
|
|
182
|
+
* <Cell component="label" size="40%" className={css.label} shrink>Last Name</Cell>
|
|
183
|
+
* <Cell component={Input} placeholder="Last" className={css.input} />
|
|
184
|
+
* </Layout>
|
|
185
|
+
* </fieldset>
|
|
186
|
+
* ```
|
|
187
|
+
*
|
|
188
|
+
* @class LayoutBase
|
|
189
|
+
* @ui
|
|
190
|
+
* @memberof ui/Layout
|
|
191
|
+
* @public
|
|
192
|
+
*/
|
|
69
193
|
var LayoutBase = (0, _kind["default"])({
|
|
70
194
|
name: 'LayoutBase',
|
|
71
195
|
propTypes: /** @lends ui/Layout.LayoutBase.prototype */{
|
|
@@ -78,10 +202,31 @@ var LayoutBase = (0, _kind["default"])({
|
|
|
78
202
|
* `"start"` refers to the top in a horizontal layout, and left in a vertical LTR layout
|
|
79
203
|
* `"end"` refers to the bottom in a horizontal layout, and right in a vertical LTR layout
|
|
80
204
|
* `"start"` and `"end"` reverse places when in a vertical layout in a RTL locale.
|
|
81
|
-
* This includes support
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
205
|
+
* This includes support shorthand for combining `align-items` and `justify-content` into
|
|
206
|
+
* a single property, separated by a space, in that order. This allows you to specify both
|
|
207
|
+
* the horizontal and vertical alignment in one property, separated by a space.
|
|
208
|
+
*
|
|
209
|
+
* For example, `align="center space-between"` means `align-items: center` and
|
|
210
|
+
* `justify-content: space-between` for each. `justify-content` property can be used to
|
|
211
|
+
* align the Cells on the main axis and adjust gaps among the Cells. To declare the
|
|
212
|
+
* `justify-content` property only, just add a heading space for `align` prop string like
|
|
213
|
+
* `align=" space-between"`. The default value for `align-items` is `stretch`. It can be
|
|
214
|
+
* also used for `align` prop like `align="stretch space-between"`. All values of
|
|
215
|
+
* `justify-content` are supported, like `start`, `end`, `center`, `space-between`,
|
|
216
|
+
* `space-around`, and `space-evenly`.
|
|
217
|
+
*
|
|
218
|
+
* ```
|
|
219
|
+
* <Layout align="center space-around">
|
|
220
|
+
* <Cell>Left Column</Cell>
|
|
221
|
+
* <Cell>Right Column</Cell>
|
|
222
|
+
* </Layout>
|
|
223
|
+
* ```
|
|
224
|
+
* ```
|
|
225
|
+
* <Layout align=" space-between">
|
|
226
|
+
* <Cell>Left Column</Cell>
|
|
227
|
+
* <Cell>Right Column</Cell>
|
|
228
|
+
* </Layout>
|
|
229
|
+
* ```
|
|
85
230
|
*
|
|
86
231
|
* @type {String}
|
|
87
232
|
* @public
|
|
@@ -214,7 +359,7 @@ var LayoutDecorator = (0, _ForwardRef["default"])({
|
|
|
214
359
|
*
|
|
215
360
|
* A stateless component that acts as a containing area for {@link ui/Layout.Cell|Cells} to be
|
|
216
361
|
* positioned in a row or a column (horizontally or vertically, respectively. It supports an
|
|
217
|
-
* {@link ui/Layout.
|
|
362
|
+
* {@link ui/Layout.LayoutBase.orientation|orientation} property for laying-out its contents
|
|
218
363
|
* (`Cells`) in an organized, readable way.
|
|
219
364
|
*
|
|
220
365
|
* Example:
|
package/Layout/Layout.module.css
CHANGED
|
@@ -22,6 +22,10 @@
|
|
|
22
22
|
.layout.horizontal > .cell.grow {
|
|
23
23
|
width: 0;
|
|
24
24
|
}
|
|
25
|
+
.layout.horizontal > .cell.grow.size {
|
|
26
|
+
max-width: none;
|
|
27
|
+
min-width: var(--cell-size);
|
|
28
|
+
}
|
|
25
29
|
.layout.vertical {
|
|
26
30
|
flex-direction: column;
|
|
27
31
|
height: 100%;
|
|
@@ -33,6 +37,10 @@
|
|
|
33
37
|
height: 0;
|
|
34
38
|
align-self: normal;
|
|
35
39
|
}
|
|
40
|
+
.layout.vertical > .cell.grow.size {
|
|
41
|
+
max-height: none;
|
|
42
|
+
min-height: var(--cell-size);
|
|
43
|
+
}
|
|
36
44
|
.layout.inline {
|
|
37
45
|
display: inline-flex;
|
|
38
46
|
}
|
|
@@ -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++)
|
|
16
|
-
function _iterableToArrayLimit(arr, i) { var _i =
|
|
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']];
|
|
@@ -102,6 +104,45 @@ describe('Layout Specs', function () {
|
|
|
102
104
|
});
|
|
103
105
|
});
|
|
104
106
|
});
|
|
107
|
+
test('should apply a class for grow', function () {
|
|
108
|
+
(0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Layout.Cell, {
|
|
109
|
+
children: "Body"
|
|
110
|
+
}));
|
|
111
|
+
var cell = _react.screen.getByText('Body');
|
|
112
|
+
var expected = 'grow';
|
|
113
|
+
expect(cell).toHaveClass(expected);
|
|
114
|
+
});
|
|
115
|
+
test('should apply classes for grow and size and flexBasis styles the size prop value 100px', function () {
|
|
116
|
+
(0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Layout["default"], {
|
|
117
|
+
style: {
|
|
118
|
+
width: "300px"
|
|
119
|
+
},
|
|
120
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Layout.Cell, {
|
|
121
|
+
grow: true,
|
|
122
|
+
size: "100px",
|
|
123
|
+
children: "Body"
|
|
124
|
+
})
|
|
125
|
+
}));
|
|
126
|
+
var cell = _react.screen.getByText('Body');
|
|
127
|
+
var expectedGrowClass = 'grow';
|
|
128
|
+
var expectedSizeClass = 'size';
|
|
129
|
+
var expectedFlexBasis = '100px';
|
|
130
|
+
expect(cell).toHaveClass(expectedGrowClass);
|
|
131
|
+
expect(cell).toHaveClass(expectedSizeClass);
|
|
132
|
+
expect(cell).toHaveStyle({
|
|
133
|
+
'flex-basis': expectedFlexBasis
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
test('should not be apply a class for grow when using shrink', function () {
|
|
137
|
+
(0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Layout.Cell, {
|
|
138
|
+
grow: true,
|
|
139
|
+
shrink: true,
|
|
140
|
+
children: "Body"
|
|
141
|
+
}));
|
|
142
|
+
var cell = _react.screen.getByText('Body');
|
|
143
|
+
var notExpected = 'grow';
|
|
144
|
+
expect(cell).not.toHaveClass(notExpected);
|
|
145
|
+
});
|
|
105
146
|
test('should return a DOM node reference for `componentRef` on `Layout`', function () {
|
|
106
147
|
var ref = jest.fn();
|
|
107
148
|
(0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Layout["default"], {
|
package/Marquee/MarqueeBase.js
CHANGED
|
@@ -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); }; }
|
|
@@ -169,6 +171,56 @@ var MarqueeController = (0, _hoc["default"])(defaultConfig, function (config, Wr
|
|
|
169
171
|
value: function componentWillUnmount() {
|
|
170
172
|
this.cancelJob.stop();
|
|
171
173
|
}
|
|
174
|
+
|
|
175
|
+
/*
|
|
176
|
+
* Registers `component` with a set of handlers for `start` and `stop`.
|
|
177
|
+
*
|
|
178
|
+
* @param {Object} component A component, typically a React component instance, on
|
|
179
|
+
* which handlers will be dispatched.
|
|
180
|
+
* @param {Object} handlers An object containing `start` and `stop` functions
|
|
181
|
+
*
|
|
182
|
+
* @returns {undefined}
|
|
183
|
+
*/
|
|
184
|
+
|
|
185
|
+
/*
|
|
186
|
+
* Unregisters `component` for synchronization
|
|
187
|
+
*
|
|
188
|
+
* @param {Object} component A previously registered component
|
|
189
|
+
*
|
|
190
|
+
* @returns {undefined}
|
|
191
|
+
*/
|
|
192
|
+
|
|
193
|
+
/*
|
|
194
|
+
* Handler for the `start` context function
|
|
195
|
+
*
|
|
196
|
+
* @param {Object} component A previously registered component
|
|
197
|
+
*
|
|
198
|
+
* @returns {undefined}
|
|
199
|
+
*/
|
|
200
|
+
|
|
201
|
+
/*
|
|
202
|
+
* Handler for the `cancel` context function
|
|
203
|
+
*
|
|
204
|
+
* @param {Object} component A previously registered component
|
|
205
|
+
*
|
|
206
|
+
* @returns {undefined}
|
|
207
|
+
*/
|
|
208
|
+
|
|
209
|
+
/*
|
|
210
|
+
* Handler for the `complete` context function
|
|
211
|
+
*
|
|
212
|
+
* @param {Object} component A previously registered component
|
|
213
|
+
*
|
|
214
|
+
* @returns {undefined}
|
|
215
|
+
*/
|
|
216
|
+
|
|
217
|
+
/*
|
|
218
|
+
* Handler for the focus event
|
|
219
|
+
*/
|
|
220
|
+
|
|
221
|
+
/*
|
|
222
|
+
* Handler for the blur event
|
|
223
|
+
*/
|
|
172
224
|
}, {
|
|
173
225
|
key: "dispatch",
|
|
174
226
|
value:
|
|
@@ -25,20 +25,21 @@ 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); }; }
|
|
37
39
|
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
38
40
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
39
41
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
40
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
41
|
-
// The minimum number of milliseconds to wait before resetting the marquee position after it finishes.
|
|
42
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } // The minimum number of milliseconds to wait before resetting the marquee position after it finishes.
|
|
42
43
|
var MINIMUM_MARQUEE_RESET_DELAY = 40;
|
|
43
44
|
|
|
44
45
|
/**
|
|
@@ -692,6 +693,45 @@ var MarqueeDecorator = (0, _hoc["default"])(defaultConfig, function (config, Wra
|
|
|
692
693
|
* @param {Number} [delay] Milliseconds to wait before animating
|
|
693
694
|
* @returns {undefined}
|
|
694
695
|
*/
|
|
696
|
+
|
|
697
|
+
/*
|
|
698
|
+
* Stops the animation
|
|
699
|
+
*
|
|
700
|
+
* @returns {undefined}
|
|
701
|
+
*/
|
|
702
|
+
|
|
703
|
+
/*
|
|
704
|
+
* Starts marquee animation with synchronization, if not already animating and a timer is
|
|
705
|
+
* not already active to start.
|
|
706
|
+
*
|
|
707
|
+
* @param {Number} [delay] Milliseconds to wait before animating
|
|
708
|
+
* @returns {undefined}
|
|
709
|
+
*/
|
|
710
|
+
|
|
711
|
+
/*
|
|
712
|
+
* Starts marquee animation with synchronization
|
|
713
|
+
*
|
|
714
|
+
* @param {Number} [delay] Milliseconds to wait before animating
|
|
715
|
+
* @returns {undefined}
|
|
716
|
+
*/
|
|
717
|
+
|
|
718
|
+
/*
|
|
719
|
+
* Resets the marquee and restarts it after `marqueeDelay` milliseconds.
|
|
720
|
+
*
|
|
721
|
+
* @returns {undefined}
|
|
722
|
+
*/
|
|
723
|
+
|
|
724
|
+
/*
|
|
725
|
+
* Resets and restarts the marquee after `marqueeResetDelay` milliseconds
|
|
726
|
+
*
|
|
727
|
+
* @returns {undefined}
|
|
728
|
+
*/
|
|
729
|
+
|
|
730
|
+
/*
|
|
731
|
+
* Cancels the marquee
|
|
732
|
+
*
|
|
733
|
+
* @returns {undefined}
|
|
734
|
+
*/
|
|
695
735
|
}, {
|
|
696
736
|
key: "handleUnhover",
|
|
697
737
|
value: function handleUnhover() {
|