@enact/ui 5.2.0 → 5.3.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/CHANGELOG.md +10 -0
- package/Card/Card.d.ts +4 -0
- package/Card/Card.js +10 -0
- package/Card/Card.module.css +4 -0
- package/package.json +6 -6
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
|
+
## [5.3.0] - 2025-09-24
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- `ui/Card` `fitImage` prop to allow developers to center the image
|
|
10
|
+
|
|
11
|
+
## [5.2.1] - 2025-09-02
|
|
12
|
+
|
|
13
|
+
No significant changes.
|
|
14
|
+
|
|
5
15
|
## [5.2.0] - 2025-08-08
|
|
6
16
|
|
|
7
17
|
### Fixed
|
package/Card/Card.d.ts
CHANGED
|
@@ -29,6 +29,10 @@ corresponding internal elements and states of this component.
|
|
|
29
29
|
* The following classes are supported.
|
|
30
30
|
*/
|
|
31
31
|
css?: object;
|
|
32
|
+
/**
|
|
33
|
+
* Fits the image to its height and width and positions it on the center of the Card
|
|
34
|
+
*/
|
|
35
|
+
fitImage?: boolean;
|
|
32
36
|
/**
|
|
33
37
|
* The component used to render the image component.
|
|
34
38
|
*/
|
package/Card/Card.js
CHANGED
|
@@ -85,6 +85,13 @@ var CardBase = exports.CardBase = (0, _kind["default"])({
|
|
|
85
85
|
* @public
|
|
86
86
|
*/
|
|
87
87
|
css: _propTypes2["default"].object,
|
|
88
|
+
/**
|
|
89
|
+
* Fits the image to its height and width and positions it on the center of the Card
|
|
90
|
+
*
|
|
91
|
+
* @type {Boolean}
|
|
92
|
+
* @public
|
|
93
|
+
*/
|
|
94
|
+
fitImage: _propTypes2["default"].bool,
|
|
88
95
|
/**
|
|
89
96
|
* The component used to render the image component.
|
|
90
97
|
*
|
|
@@ -137,12 +144,14 @@ var CardBase = exports.CardBase = (0, _kind["default"])({
|
|
|
137
144
|
computed: {
|
|
138
145
|
className: function className(_ref2) {
|
|
139
146
|
var captionOverlay = _ref2.captionOverlay,
|
|
147
|
+
fitImage = _ref2.fitImage,
|
|
140
148
|
orientation = _ref2.orientation,
|
|
141
149
|
selected = _ref2.selected,
|
|
142
150
|
styler = _ref2.styler;
|
|
143
151
|
return styler.append({
|
|
144
152
|
captionOverlay: captionOverlay && orientation === 'vertical',
|
|
145
153
|
selected: selected,
|
|
154
|
+
fitImage: fitImage,
|
|
146
155
|
horizontal: orientation === 'horizontal',
|
|
147
156
|
vertical: orientation === 'vertical'
|
|
148
157
|
});
|
|
@@ -158,6 +167,7 @@ var CardBase = exports.CardBase = (0, _kind["default"])({
|
|
|
158
167
|
placeholder = _ref3.placeholder,
|
|
159
168
|
src = _ref3.src,
|
|
160
169
|
rest = _objectWithoutProperties(_ref3, _excluded2);
|
|
170
|
+
delete rest.fitImage;
|
|
161
171
|
var isHorizontal = orientation === 'horizontal';
|
|
162
172
|
var isCaptionOverlay = captionOverlay && !isHorizontal;
|
|
163
173
|
var Component = isHorizontal ? _Layout.Row : _Layout.Column;
|
package/Card/Card.module.css
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enact/ui",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.3.0",
|
|
4
4
|
"description": "A collection of simplified unstyled cross-platform UI components for Enact",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -32,16 +32,16 @@
|
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@enact/core": "^5.
|
|
36
|
-
"@enact/i18n": "^5.
|
|
35
|
+
"@enact/core": "^5.3.0",
|
|
36
|
+
"@enact/i18n": "^5.3.0",
|
|
37
37
|
"classnames": "^2.5.1",
|
|
38
38
|
"ilib": "^14.21.1",
|
|
39
39
|
"invariant": "^2.2.4",
|
|
40
40
|
"prop-types": "^15.8.1",
|
|
41
41
|
"ramda": "^0.31.3",
|
|
42
|
-
"react": "^19.1.
|
|
43
|
-
"react-dom": "^19.1.
|
|
44
|
-
"react-is": "^19.1.
|
|
42
|
+
"react": "^19.1.1",
|
|
43
|
+
"react-dom": "^19.1.1",
|
|
44
|
+
"react-is": "^19.1.1",
|
|
45
45
|
"warning": "^4.0.3"
|
|
46
46
|
}
|
|
47
47
|
}
|