@enact/ui 4.7.8 → 4.8.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 +6 -8
- package/AnnounceDecorator/AnnounceDecorator.js +6 -8
- package/AnnounceDecorator/useAnnounce.js +1 -2
- package/BodyText/BodyText.js +8 -12
- package/BodyText/tests/BodyText-specs.js +2 -2
- package/Button/Button.js +22 -26
- package/CHANGELOG.md +20 -0
- package/Cancelable/Cancelable.js +18 -20
- package/Cancelable/cancelHandler.js +4 -7
- package/Cancelable/modalHandler.js +3 -5
- package/Cancelable/tests/Cancelable-specs.js +4 -4
- package/Changeable/Changeable.js +18 -20
- package/ComponentOverride/ComponentOverride.js +7 -9
- package/FloatingLayer/FloatingLayer.js +16 -19
- package/FloatingLayer/FloatingLayerContainer.js +4 -6
- package/FloatingLayer/FloatingLayerDecorator.js +6 -8
- package/FloatingLayer/Scrim.js +6 -8
- package/FloatingLayer/index.js +1 -2
- package/FloatingLayer/tests/useFloatingLayerDecorator-specs.js +4 -4
- package/FloatingLayer/useFloatingLayer.js +2 -3
- package/FloatingLayer/useFloatingLayerDecorator.js +2 -4
- package/ForwardRef/ForwardRef.js +17 -19
- package/GridListImageItem/GridListImageItem.js +6 -8
- package/Group/Group.js +9 -13
- package/Group/GroupItem.js +21 -25
- package/Group/tests/Group-specs.js +2 -2
- package/Heading/Heading.js +27 -31
- package/Icon/Icon.js +8 -12
- package/Icon/tests/Icon-specs.js +2 -2
- package/IconButton/IconButton.js +8 -12
- package/Image/Image.js +8 -12
- package/Image/tests/Image-specs.js +2 -2
- package/ImageItem/ImageItem.js +8 -12
- package/ImageItem/tests/ImageItem-specs.js +6 -6
- package/Item/Item.js +8 -12
- package/LabeledIcon/LabeledIcon.js +8 -12
- package/Layout/Cell.js +9 -14
- package/Layout/Layout.js +162 -168
- package/Layout/tests/Layout-specs.js +7 -7
- package/Marquee/MarqueeBase.js +6 -8
- package/Marquee/MarqueeController.js +7 -11
- package/Marquee/MarqueeDecorator.js +6 -8
- package/Marquee/index.js +2 -4
- package/Marquee/tests/Marquee-specs.js +4 -19
- package/Measurable/Measurable.js +20 -25
- package/Measurable/tests/Measurable-specs.js +6 -6
- package/Media/Media.js +38 -42
- package/Placeholder/PlaceholderControllerDecorator.js +13 -16
- package/Placeholder/PlaceholderDecorator.js +12 -14
- package/Placeholder/index.js +1 -2
- package/ProgressBar/ProgressBar.js +20 -25
- package/README.md +1 -1
- package/RadioDecorator/RadioControllerDecorator.js +7 -10
- package/RadioDecorator/RadioDecorator.js +18 -20
- package/Repeater/Repeater.js +21 -24
- package/Repeater/tests/Repeater-specs.js +6 -6
- package/Resizable/Resizable.js +16 -18
- package/Resizable/ResizeContext.js +1 -2
- package/Resizable/tests/Resizable-specs.js +2 -2
- package/Resizable/tests/useResize-specs.js +4 -4
- package/Resizable/useResize.js +4 -4
- package/Routable/Link.js +8 -12
- package/Routable/Routable.js +20 -22
- package/Routable/Route.js +2 -4
- package/Routable/Router.js +8 -11
- package/Routable/tests/Routable-specs.js +5 -5
- package/Routable/useLink.js +1 -2
- package/Routable/util.js +7 -12
- package/Scrollable/ScrollAnimator.js +4 -6
- package/Scrollable/ScrollThumb.js +13 -15
- package/Scrollable/Scrollable.js +18 -22
- package/Scrollable/ScrollableNative.js +10 -15
- package/Scrollable/Scrollbar.js +7 -10
- package/Scroller/Scroller.js +13 -15
- package/Scroller/ScrollerBasic.js +13 -15
- package/Scroller/UiScrollerBase.js +16 -18
- package/Skinnable/Skinnable.js +6 -8
- package/Skinnable/tests/Skinnable-specs.js +4 -4
- package/Skinnable/tests/useSkins-specs.js +4 -4
- package/Skinnable/useSkins.js +1 -2
- package/Skinnable/util.js +2 -4
- package/Slider/Knob.js +6 -8
- package/Slider/PositionDecorator.js +6 -8
- package/Slider/Slider.js +24 -27
- package/Slider/utils.js +2 -3
- package/SlotItem/SlotItem.js +8 -12
- package/Slottable/Slottable.js +19 -21
- package/Slottable/useSlots.js +5 -6
- package/Spinner/Spinner.js +8 -12
- package/ToggleIcon/ToggleIcon.js +8 -12
- package/ToggleItem/ToggleItem.js +8 -12
- package/ToggleItem/tests/ToggleItem-specs.js +6 -6
- package/Toggleable/Toggle.js +6 -8
- package/Toggleable/Toggleable.js +19 -22
- package/Toggleable/useToggle.js +2 -2
- package/Touchable/ClickAllow.js +4 -6
- package/Touchable/Drag.js +8 -12
- package/Touchable/Flick.js +8 -12
- package/Touchable/Hold.js +8 -12
- package/Touchable/Pinch.js +8 -12
- package/Touchable/Touch.js +4 -6
- package/Touchable/Touchable.js +6 -8
- package/Touchable/config.js +9 -14
- package/Touchable/state.js +2 -3
- package/Touchable/tests/useTouch-specs.js +4 -4
- package/Touchable/useTouch.js +7 -7
- package/Transition/Transition.js +23 -26
- package/Transition/tests/Transition-specs.js +7 -7
- package/ViewManager/Arranger.js +15 -22
- package/ViewManager/TransitionGroup.js +8 -9
- package/ViewManager/View.js +9 -12
- package/ViewManager/ViewManager.js +10 -14
- package/ViewManager/tests/ViewManager-specs.js +2 -3
- package/ViewManager/tests/test-utils.js +2 -3
- package/VirtualList/UiVirtualListBase.js +7 -10
- package/VirtualList/VirtualList.js +17 -20
- package/VirtualList/VirtualListBase.js +1 -2
- package/VirtualList/VirtualListBasic.js +18 -12
- package/VirtualList/tests/VirtualGridList-native-specs.js +4 -4
- package/VirtualList/tests/VirtualGridList-specs.js +4 -4
- package/VirtualList/tests/VirtualList-native-specs.js +4 -4
- package/VirtualList/tests/VirtualList-specs.js +70 -4
- package/internal/IdProvider/IdProvider.js +11 -13
- package/internal/IdProvider/Provider.js +4 -6
- package/internal/IdProvider/tests/IdProvider-specs.js +4 -4
- package/internal/IdProvider/tests/useId-specs.js +4 -4
- package/internal/IdProvider/useId.js +3 -4
- package/internal/Pure/Pure.js +16 -18
- package/internal/Pure/tests/Pure-specs.js +4 -4
- package/internal/localized-fonts/localized-fonts.js +1 -1
- package/internal/localized-fonts/tests/localized-fonts-specs.js +0 -1
- package/internal/selection/selection.js +3 -5
- package/internal/validators/validators.js +6 -11
- package/package.json +5 -4
- package/resolution/ResolutionDecorator.js +15 -17
- package/resolution/index.js +3 -4
- package/resolution/resolution.js +2 -5
- package/useControlledState/tests/useControlledState-specs.js +1 -1
- package/useControlledState/useControlledState.js +2 -3
- package/useScroll/ScrollAnimator.js +4 -6
- package/useScroll/Scrollbar.js +7 -10
- package/useScroll/ScrollbarTrack.js +6 -8
- package/useScroll/useScroll.js +11 -18
- package/useScroll/utilDOM.js +2 -4
- package/useScroll/utilEvent.js +2 -4
package/Layout/Layout.js
CHANGED
|
@@ -33,164 +33,164 @@ var _excluded = ["component", "componentRef"];
|
|
|
33
33
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
34
34
|
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; }
|
|
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
|
-
function ownKeys(
|
|
37
|
-
function _objectSpread(
|
|
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
|
+
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
|
-
|
|
193
|
-
var LayoutBase = (0, _kind["default"])({
|
|
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
|
+
var LayoutBase = exports.LayoutBase = (0, _kind["default"])({
|
|
194
194
|
name: 'LayoutBase',
|
|
195
195
|
propTypes: /** @lends ui/Layout.LayoutBase.prototype */{
|
|
196
196
|
/**
|
|
@@ -349,8 +349,7 @@ var LayoutBase = (0, _kind["default"])({
|
|
|
349
349
|
* @mixes ui/ForwardRef.ForwardRef
|
|
350
350
|
* @public
|
|
351
351
|
*/
|
|
352
|
-
exports.
|
|
353
|
-
var LayoutDecorator = (0, _ForwardRef["default"])({
|
|
352
|
+
var LayoutDecorator = exports.LayoutDecorator = (0, _ForwardRef["default"])({
|
|
354
353
|
prop: 'componentRef'
|
|
355
354
|
});
|
|
356
355
|
|
|
@@ -387,8 +386,7 @@ var LayoutDecorator = (0, _ForwardRef["default"])({
|
|
|
387
386
|
* @ui
|
|
388
387
|
* @public
|
|
389
388
|
*/
|
|
390
|
-
exports.
|
|
391
|
-
var Layout = LayoutDecorator(LayoutBase);
|
|
389
|
+
var Layout = exports.Layout = LayoutDecorator(LayoutBase);
|
|
392
390
|
|
|
393
391
|
/**
|
|
394
392
|
* Shorthand for `<Layout orientation="vertical">`, which positions its
|
|
@@ -408,13 +406,11 @@ var Layout = LayoutDecorator(LayoutBase);
|
|
|
408
406
|
* @ui
|
|
409
407
|
* @public
|
|
410
408
|
*/
|
|
411
|
-
exports.
|
|
412
|
-
var Column = LayoutDecorator(function (props) {
|
|
409
|
+
var Column = exports.Column = LayoutDecorator(function (props) {
|
|
413
410
|
return LayoutBase.inline(_objectSpread(_objectSpread({}, props), {}, {
|
|
414
411
|
orientation: 'vertical'
|
|
415
412
|
}));
|
|
416
413
|
});
|
|
417
|
-
exports.Column = Column;
|
|
418
414
|
Column.displayName = 'Column';
|
|
419
415
|
|
|
420
416
|
/**
|
|
@@ -433,12 +429,10 @@ Column.displayName = 'Column';
|
|
|
433
429
|
* @ui
|
|
434
430
|
* @public
|
|
435
431
|
*/
|
|
436
|
-
var Row = LayoutDecorator(function (props) {
|
|
432
|
+
var Row = exports.Row = LayoutDecorator(function (props) {
|
|
437
433
|
return LayoutBase.inline(_objectSpread(_objectSpread({}, props), {}, {
|
|
438
434
|
orientation: 'horizontal'
|
|
439
435
|
}));
|
|
440
436
|
});
|
|
441
|
-
exports.Row = Row;
|
|
442
437
|
Row.displayName = 'Row';
|
|
443
|
-
var _default = Layout;
|
|
444
|
-
exports["default"] = _default;
|
|
438
|
+
var _default = exports["default"] = Layout;
|
|
@@ -4,18 +4,18 @@ 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(
|
|
9
|
-
function ownKeys(
|
|
10
|
-
function _objectSpread(
|
|
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
|
+
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
|
+
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); }
|
|
17
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(
|
|
18
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
19
19
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
20
20
|
describe('Layout Specs', function () {
|
|
21
21
|
var layoutPropAlign = [['baseline', 'baseline'], ['center', 'center'], ['end', 'flex-end'], ['start', 'flex-start']];
|
package/Marquee/MarqueeBase.js
CHANGED
|
@@ -13,11 +13,11 @@ var _MarqueeModule = _interopRequireDefault(require("./Marquee.module.css"));
|
|
|
13
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
14
|
var _excluded = ["applyOffset", "children", "clientClassName", "clientRef", "clientStyle", "css", "duplicate", "onMarqueeComplete", "rtl"];
|
|
15
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
16
|
-
function ownKeys(
|
|
17
|
-
function _objectSpread(
|
|
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
|
+
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) {
|
|
@@ -34,7 +34,7 @@ var isEventSource = function isEventSource(ev) {
|
|
|
34
34
|
* @ui
|
|
35
35
|
* @public
|
|
36
36
|
*/
|
|
37
|
-
var MarqueeBase = (0, _kind["default"])({
|
|
37
|
+
var MarqueeBase = exports.MarqueeBase = (0, _kind["default"])({
|
|
38
38
|
name: 'ui:Marquee',
|
|
39
39
|
propTypes: /** @lends ui/Marquee.MarqueeBase.prototype */{
|
|
40
40
|
/**
|
|
@@ -285,6 +285,4 @@ var MarqueeBase = (0, _kind["default"])({
|
|
|
285
285
|
}));
|
|
286
286
|
}
|
|
287
287
|
});
|
|
288
|
-
exports
|
|
289
|
-
var _default = MarqueeBase;
|
|
290
|
-
exports["default"] = _default;
|
|
288
|
+
var _default = exports["default"] = MarqueeBase;
|