@enact/ui 4.5.0-alpha.1 → 4.5.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -4
- package/Marquee/MarqueeDecorator.js +35 -3
- package/Marquee/index.d.ts +12 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
The following is a curated list of changes in the Enact ui module, newest changes on the top.
|
|
4
4
|
|
|
5
|
+
## [4.5.0-alpha.2] - 2022-05-09
|
|
6
|
+
|
|
7
|
+
### Deprecated
|
|
8
|
+
|
|
9
|
+
- `ui/Marquee.MarqueeDecorator` config `className` to be removed in 5.0.0
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- `ui/Marquee.MarqueeDecorator` config `css` to support customizing the marquee styles
|
|
14
|
+
|
|
5
15
|
## [4.5.0-alpha.1] - 2022-04-15
|
|
6
16
|
|
|
7
17
|
### Fixed
|
|
@@ -16,7 +26,7 @@ The following is a curated list of changes in the Enact ui module, newest change
|
|
|
16
26
|
|
|
17
27
|
### Added
|
|
18
28
|
|
|
19
|
-
- `ui/MarqueeDecorator` `locale` type for `forceDirection` prop not to override the direction depending on contents
|
|
29
|
+
- `ui/Marquee.MarqueeDecorator` `locale` type for `forceDirection` prop not to override the direction depending on contents
|
|
20
30
|
|
|
21
31
|
### Fixed
|
|
22
32
|
|
|
@@ -42,13 +52,13 @@ No significant changes.
|
|
|
42
52
|
|
|
43
53
|
### Fixed
|
|
44
54
|
|
|
45
|
-
- `ui/MarqueeDecorator` to restart animation when text changed while focus retained
|
|
55
|
+
- `ui/Marquee.MarqueeDecorator` to restart animation when text changed while focus retained
|
|
46
56
|
|
|
47
57
|
## [4.0.8] - 2021-10-21
|
|
48
58
|
|
|
49
59
|
### Fixed
|
|
50
60
|
|
|
51
|
-
- `ui/MarqueeDecorator` style to render text properly when starting animation
|
|
61
|
+
- `ui/Marquee.MarqueeDecorator` style to render text properly when starting animation
|
|
52
62
|
|
|
53
63
|
## [4.0.7] - 2021-09-28
|
|
54
64
|
|
|
@@ -66,7 +76,7 @@ No significant changes.
|
|
|
66
76
|
|
|
67
77
|
### Fixed
|
|
68
78
|
|
|
69
|
-
- `ui/MarqueeDecorator` to stop marquee properly after hiding pointer when `marqueeOn` is `hover`
|
|
79
|
+
- `ui/Marquee.MarqueeDecorator` to stop marquee properly after hiding pointer when `marqueeOn` is `hover`
|
|
70
80
|
|
|
71
81
|
## [4.0.3] - 2021-06-18
|
|
72
82
|
|
|
@@ -13,6 +13,8 @@ var _handle = require("@enact/core/handle");
|
|
|
13
13
|
|
|
14
14
|
var _hoc = _interopRequireDefault(require("@enact/core/hoc"));
|
|
15
15
|
|
|
16
|
+
var _deprecate = _interopRequireDefault(require("@enact/core/internal/deprecate"));
|
|
17
|
+
|
|
16
18
|
var _keymap = require("@enact/core/keymap");
|
|
17
19
|
|
|
18
20
|
var _util = require("@enact/core/util");
|
|
@@ -92,6 +94,7 @@ var defaultConfig = {
|
|
|
92
94
|
* @type {String}
|
|
93
95
|
* @default null
|
|
94
96
|
* @memberof ui/Marquee.MarqueeDecorator.defaultConfig
|
|
97
|
+
* @deprecated Will be removed in 5.0.0. Use {@link ui/Marquee.MarqueeDecorator.defaultConfig.css} instead.
|
|
95
98
|
*/
|
|
96
99
|
className: null,
|
|
97
100
|
|
|
@@ -104,6 +107,24 @@ var defaultConfig = {
|
|
|
104
107
|
*/
|
|
105
108
|
component: _MarqueeBase["default"],
|
|
106
109
|
|
|
110
|
+
/**
|
|
111
|
+
* Customizes the component by mapping the supplied collection of CSS class names to the
|
|
112
|
+
* corresponding internal elements and states of this component.
|
|
113
|
+
*
|
|
114
|
+
* The following classes are supported:
|
|
115
|
+
*
|
|
116
|
+
* * `marquee` - The root component class
|
|
117
|
+
* * `animate` - Applied to the inner content node when the text is animating
|
|
118
|
+
* * `spacing` - The spacing node used between the repeated content
|
|
119
|
+
* * `text` - The inner content node
|
|
120
|
+
* * `willAnimate` - Applied to the inner content node shortly before animation
|
|
121
|
+
*
|
|
122
|
+
* @type {Object}
|
|
123
|
+
* @default null
|
|
124
|
+
* @memberof ui/Marquee.MarqueeDecorator.defaultConfig
|
|
125
|
+
*/
|
|
126
|
+
css: null,
|
|
127
|
+
|
|
107
128
|
/**
|
|
108
129
|
* Property containing the callback to start the animation when `marqueeOn` is `'hover'`
|
|
109
130
|
*
|
|
@@ -204,13 +225,24 @@ var MarqueeDecorator = (0, _hoc["default"])(defaultConfig, function (config, Wra
|
|
|
204
225
|
var _class;
|
|
205
226
|
|
|
206
227
|
var blur = config.blur,
|
|
207
|
-
configClassName = config.className,
|
|
208
228
|
MarqueeComponent = config.component,
|
|
209
229
|
enter = config.enter,
|
|
210
230
|
focus = config.focus,
|
|
211
231
|
invalidateProps = config.invalidateProps,
|
|
212
232
|
leave = config.leave,
|
|
213
|
-
marqueeDirection = config.marqueeDirection;
|
|
233
|
+
marqueeDirection = config.marqueeDirection;
|
|
234
|
+
|
|
235
|
+
if (config.className) {
|
|
236
|
+
(0, _deprecate["default"])({
|
|
237
|
+
name: 'ui/MarqueeDecorator.config.className',
|
|
238
|
+
replacedBy: 'ui/MarqueeDecorator.config.css',
|
|
239
|
+
until: '5.0.0'
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
var css = typeof config.css === 'object' && config.css || {
|
|
244
|
+
marquee: config.className
|
|
245
|
+
}; // Generate functions to forward events to containers
|
|
214
246
|
|
|
215
247
|
var forwardBlur = (0, _handle.forward)(blur);
|
|
216
248
|
var forwardFocus = (0, _handle.forward)(focus);
|
|
@@ -830,8 +862,8 @@ var MarqueeDecorator = (0, _hoc["default"])(defaultConfig, function (config, Wra
|
|
|
830
862
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(MarqueeComponent, {
|
|
831
863
|
alignment: alignment,
|
|
832
864
|
animating: this.state.animating,
|
|
833
|
-
className: configClassName,
|
|
834
865
|
clientRef: this.cacheNode,
|
|
866
|
+
css: css,
|
|
835
867
|
distance: this.distance,
|
|
836
868
|
onMarqueeComplete: this.handleMarqueeComplete,
|
|
837
869
|
overflow: this.state.overflow,
|
package/Marquee/index.d.ts
CHANGED
|
@@ -120,6 +120,18 @@ export interface MarqueeDecoratorConfig extends Object {
|
|
|
120
120
|
* The base marquee component wrapping the content.
|
|
121
121
|
*/
|
|
122
122
|
component?: React.ComponentType;
|
|
123
|
+
/**
|
|
124
|
+
* Customizes the component by mapping the supplied collection of CSS class names to the
|
|
125
|
+
corresponding internal elements and states of this component.
|
|
126
|
+
*
|
|
127
|
+
* The following classes are supported:
|
|
128
|
+
* * `marquee` - The root component class
|
|
129
|
+
* * `animate` - Applied to the inner content node when the text is animating
|
|
130
|
+
* * `spacing` - The spacing node used between the repeated content
|
|
131
|
+
* * `text` - The inner content node
|
|
132
|
+
* * `willAnimate` - Applied to the inner content node shortly before animation
|
|
133
|
+
*/
|
|
134
|
+
css?: object;
|
|
123
135
|
/**
|
|
124
136
|
* Property containing the callback to start the animation when `marqueeOn` is `'hover'`
|
|
125
137
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enact/ui",
|
|
3
|
-
"version": "4.5.0-alpha.
|
|
3
|
+
"version": "4.5.0-alpha.2",
|
|
4
4
|
"description": "A collection of simplified unstyled cross-platform UI components for Enact",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@enact/core": "^4.5.0-alpha.
|
|
28
|
+
"@enact/core": "^4.5.0-alpha.2",
|
|
29
29
|
"classnames": "^2.3.1",
|
|
30
30
|
"direction": "^1.0.4",
|
|
31
31
|
"invariant": "^2.2.4",
|