@enact/ui 4.7.9 → 4.7.11
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 +2 -2
- package/AnnounceDecorator/AnnounceDecorator.js +2 -2
- package/BodyText/BodyText.js +2 -2
- package/BodyText/tests/BodyText-specs.js +2 -2
- package/Button/Button.js +16 -16
- package/CHANGELOG.md +20 -0
- package/Cancelable/Cancelable.js +14 -14
- package/Cancelable/tests/Cancelable-specs.js +2 -2
- package/Changeable/Changeable.js +14 -14
- package/ComponentOverride/ComponentOverride.js +3 -3
- package/FloatingLayer/FloatingLayer.js +11 -11
- package/FloatingLayer/FloatingLayerContainer.js +2 -2
- package/FloatingLayer/FloatingLayerDecorator.js +2 -2
- package/FloatingLayer/Scrim.js +2 -2
- package/FloatingLayer/tests/useFloatingLayerDecorator-specs.js +2 -2
- package/ForwardRef/ForwardRef.js +12 -12
- package/GridListImageItem/GridListImageItem.js +2 -2
- package/Group/Group.js +2 -2
- package/Group/GroupItem.js +16 -17
- package/Group/tests/Group-specs.js +2 -2
- package/Heading/Heading.js +21 -21
- package/Icon/Icon.js +2 -2
- package/Icon/tests/Icon-specs.js +2 -2
- package/IconButton/IconButton.js +2 -2
- package/Image/Image.js +2 -2
- package/Image/tests/Image-specs.js +2 -2
- package/ImageItem/ImageItem.js +2 -2
- package/ImageItem/tests/ImageItem-specs.js +4 -4
- package/Item/Item.js +2 -2
- package/LabeledIcon/LabeledIcon.js +2 -2
- package/Layout/Cell.js +2 -2
- package/Layout/Layout.js +154 -154
- package/Layout/tests/Layout-specs.js +4 -4
- package/Marquee/MarqueeBase.js +2 -2
- package/Marquee/MarqueeController.js +2 -3
- package/Marquee/MarqueeDecorator.js +2 -2
- package/Marquee/tests/Marquee-specs.js +2 -2
- package/Measurable/Measurable.js +13 -15
- package/Measurable/tests/Measurable-specs.js +4 -4
- package/Media/Media.js +31 -31
- package/Placeholder/PlaceholderControllerDecorator.js +8 -8
- package/Placeholder/PlaceholderDecorator.js +8 -8
- package/ProgressBar/ProgressBar.js +14 -15
- package/README.md +1 -1
- package/RadioDecorator/RadioControllerDecorator.js +2 -2
- package/RadioDecorator/RadioDecorator.js +14 -14
- package/Repeater/Repeater.js +15 -15
- package/Repeater/tests/Repeater-specs.js +4 -4
- package/Resizable/Resizable.js +12 -12
- package/Resizable/tests/Resizable-specs.js +2 -2
- package/Resizable/tests/useResize-specs.js +2 -2
- package/Resizable/useResize.js +3 -2
- package/Routable/Link.js +2 -2
- package/Routable/Routable.js +15 -15
- package/Routable/Router.js +2 -2
- package/Routable/tests/Routable-specs.js +2 -2
- package/Scrollable/ScrollAnimator.js +2 -2
- package/Scrollable/ScrollThumb.js +9 -9
- package/Scrollable/Scrollable.js +12 -12
- package/Scrollable/ScrollableNative.js +4 -5
- package/Scrollable/Scrollbar.js +2 -2
- package/Scroller/Scroller.js +9 -9
- package/Scroller/ScrollerBasic.js +9 -9
- package/Scroller/UiScrollerBase.js +12 -12
- package/Skinnable/Skinnable.js +2 -2
- package/Skinnable/tests/Skinnable-specs.js +2 -2
- package/Skinnable/tests/useSkins-specs.js +2 -2
- package/Slider/Knob.js +2 -2
- package/Slider/PositionDecorator.js +2 -2
- package/Slider/Slider.js +17 -17
- package/SlotItem/SlotItem.js +2 -2
- package/Slottable/Slottable.js +15 -15
- package/Slottable/useSlots.js +2 -2
- package/Spinner/Spinner.js +2 -2
- package/ToggleIcon/ToggleIcon.js +2 -2
- package/ToggleItem/ToggleItem.js +2 -2
- package/ToggleItem/tests/ToggleItem-specs.js +4 -4
- package/Toggleable/Toggle.js +2 -2
- package/Toggleable/Toggleable.js +15 -16
- package/Toggleable/useToggle.js +1 -0
- package/Touchable/ClickAllow.js +2 -2
- package/Touchable/Drag.js +2 -2
- package/Touchable/Flick.js +2 -2
- package/Touchable/Hold.js +2 -2
- package/Touchable/Pinch.js +2 -2
- package/Touchable/Touch.js +2 -2
- package/Touchable/Touchable.js +2 -2
- package/Touchable/config.js +2 -2
- package/Touchable/tests/useTouch-specs.js +2 -2
- package/Touchable/useTouch.js +3 -2
- package/Transition/Transition.js +18 -18
- package/Transition/tests/Transition-specs.js +4 -4
- package/ViewManager/Arranger.js +5 -5
- package/ViewManager/TransitionGroup.js +6 -5
- package/ViewManager/View.js +4 -4
- package/ViewManager/ViewManager.js +4 -4
- package/ViewManager/tests/ViewManager-specs.js +2 -3
- package/VirtualList/UiVirtualListBase.js +2 -2
- package/VirtualList/VirtualList.js +12 -12
- package/VirtualList/VirtualListBasic.js +2 -2
- package/VirtualList/tests/VirtualGridList-native-specs.js +2 -2
- package/VirtualList/tests/VirtualGridList-specs.js +2 -2
- package/VirtualList/tests/VirtualList-native-specs.js +2 -2
- package/VirtualList/tests/VirtualList-specs.js +2 -2
- package/internal/IdProvider/IdProvider.js +7 -7
- package/internal/IdProvider/Provider.js +2 -2
- package/internal/IdProvider/tests/IdProvider-specs.js +2 -2
- package/internal/IdProvider/tests/useId-specs.js +2 -2
- package/internal/IdProvider/useId.js +1 -0
- package/internal/Pure/Pure.js +12 -12
- package/internal/Pure/tests/Pure-specs.js +2 -2
- package/internal/localized-fonts/tests/localized-fonts-specs.js +0 -1
- package/package.json +2 -2
- package/resolution/ResolutionDecorator.js +11 -11
- package/resolution/index.js +2 -2
- package/resolution/tests/resolution-specs.js +503 -13
- package/useScroll/ScrollAnimator.js +2 -2
- package/useScroll/Scrollbar.js +2 -2
- package/useScroll/ScrollbarTrack.js +2 -2
- package/useScroll/useScroll.js +2 -4
package/Layout/Layout.js
CHANGED
|
@@ -36,160 +36,160 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
36
36
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
37
37
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
38
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(
|
|
40
|
-
function _toPrimitive(
|
|
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
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
39
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
40
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
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
|
+
*/
|
|
193
193
|
var LayoutBase = exports.LayoutBase = (0, _kind["default"])({
|
|
194
194
|
name: 'LayoutBase',
|
|
195
195
|
propTypes: /** @lends ui/Layout.LayoutBase.prototype */{
|
|
@@ -4,13 +4,13 @@ require("@testing-library/jest-dom");
|
|
|
4
4
|
var _react = require("@testing-library/react");
|
|
5
5
|
var _Layout = _interopRequireWildcard(require("../Layout"));
|
|
6
6
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
|
-
function _getRequireWildcardCache(
|
|
8
|
-
function _interopRequireWildcard(
|
|
7
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
8
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
9
9
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10
10
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
11
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(
|
|
13
|
-
function _toPrimitive(
|
|
12
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
13
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
14
14
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
15
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."); }
|
|
16
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); }
|
package/Marquee/MarqueeBase.js
CHANGED
|
@@ -16,8 +16,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
16
16
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17
17
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18
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(
|
|
20
|
-
function _toPrimitive(
|
|
19
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
20
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
21
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; }
|
|
22
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; }
|
|
23
23
|
var isEventSource = function isEventSource(ev) {
|
|
@@ -16,8 +16,8 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
16
16
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
17
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(
|
|
20
|
-
function _toPrimitive(
|
|
19
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
20
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
21
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); }
|
|
22
22
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
23
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); }; }
|
|
@@ -32,7 +32,6 @@ var STATE = {
|
|
|
32
32
|
// Marquee in progress, awaiting complete
|
|
33
33
|
ready: 2 // Marquee completed or not needed, but state is active
|
|
34
34
|
};
|
|
35
|
-
|
|
36
35
|
var MarqueeControllerContext = exports.MarqueeControllerContext = /*#__PURE__*/(0, _react.createContext)(null);
|
|
37
36
|
|
|
38
37
|
/**
|
|
@@ -31,8 +31,8 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
31
31
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
32
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(
|
|
35
|
-
function _toPrimitive(
|
|
34
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
35
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
36
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); }
|
|
37
37
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
38
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); }; }
|
|
@@ -7,8 +7,8 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
7
7
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
8
8
|
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); } }
|
|
9
9
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
10
|
-
function _toPropertyKey(
|
|
11
|
-
function _toPrimitive(
|
|
10
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
11
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
12
12
|
var ltrText = 'This is some fine latin text.',
|
|
13
13
|
rtlText = 'العربية - العراق',
|
|
14
14
|
ltrArray = ['The first quick brown fox jumped over the first lazy dog. The bean bird flies at sundown.', 'The second quick brown fox jumped over the second lazy dog. The bean bird flies at sundown.'];
|