@enact/ui 4.5.0-beta.1 → 4.5.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 CHANGED
@@ -2,8 +2,26 @@
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] - 2022-07-19
6
+
7
+ No significant changes.
8
+
9
+ ## [4.5.0-rc.2] - 2022-07-06
10
+
11
+ ### Fixed
12
+
13
+ - `ui/Scroller` and `ui/VirtualList` to rerender property when `clientSize` is changed
14
+
15
+ ## [4.5.0-rc.1] - 2022-06-23
16
+
17
+ No significant changes.
18
+
5
19
  ## [4.5.0-beta.1] - 2022-05-31
6
20
 
21
+ ### Deprecated
22
+
23
+ - `ui/GridListImageItem`, to be removed in 5.0.0. Use `ui/ImageItem` instead
24
+
7
25
  ### Added
8
26
 
9
27
  - `ui/FloatingLayer` to add `detail` property containing `inputType` in `onDismiss` event payload
@@ -253,7 +253,8 @@ FloatingLayerBase.propTypes =
253
253
  floatLayerId: _propTypes["default"].string,
254
254
 
255
255
  /**
256
- * Prevents FloatingLayer from hiding when the user presses `ESC` key.
256
+ * Prevents FloatingLayer from hiding when the user presses cancel/back (e.g. `ESC`) key or
257
+ * clicks outside the floating layer.
257
258
  *
258
259
  * @type {Boolean}
259
260
  * @default false
@@ -268,7 +268,7 @@ var GridListImageItem = (0, _kind["default"])({
268
268
  }, {
269
269
  name: 'ui/GridListImageItem',
270
270
  replacedBy: 'ui/ImageItem',
271
- until: '4.0.0'
271
+ until: '5.0.0'
272
272
  })
273
273
  });
274
274
  exports.GridListImageItem = GridListImageItem;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enact/ui",
3
- "version": "4.5.0-beta.1",
3
+ "version": "4.5.0",
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-beta.1",
28
+ "@enact/core": "^4.5.0",
29
29
  "classnames": "^2.3.1",
30
30
  "direction": "^1.0.4",
31
31
  "invariant": "^2.2.4",
@@ -20,8 +20,6 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
20
20
 
21
21
  var _react = require("react");
22
22
 
23
- var _reactDom = _interopRequireDefault(require("react-dom"));
24
-
25
23
  var _resolution = _interopRequireDefault(require("../resolution"));
26
24
 
27
25
  var _ScrollbarTrack = _interopRequireDefault(require("./ScrollbarTrack"));
@@ -47,20 +45,14 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
47
45
  var scrollbarTrackHidingDelay = 900; // 900ms + 100ms(fade out duration) = 1000ms.
48
46
 
49
47
  var addClass = function addClass(element, className) {
50
- var node = _reactDom["default"].findDOMNode(element); // eslint-disable-line react/no-find-dom-node
51
-
52
-
53
- if (node) {
54
- node.classList.add(className);
48
+ if (element) {
49
+ element.classList.add(className);
55
50
  }
56
51
  };
57
52
 
58
53
  var removeClass = function removeClass(element, className) {
59
- var node = _reactDom["default"].findDOMNode(element); // eslint-disable-line react/no-find-dom-node
60
-
61
-
62
- if (node) {
63
- node.classList.remove(className);
54
+ if (element) {
55
+ element.classList.remove(className);
64
56
  }
65
57
  };
66
58
  /*
@@ -74,8 +66,7 @@ var removeClass = function removeClass(element, className) {
74
66
 
75
67
 
76
68
  var setCSSVariable = function setCSSVariable(element, variable, value) {
77
- _reactDom["default"].findDOMNode(element).style.setProperty(variable, value); // eslint-disable-line react/no-find-dom-node
78
-
69
+ element.style.setProperty(variable, value);
79
70
  };
80
71
  /**
81
72
  * A custom hook that passes scrollbar behavior information as its render prop.
@@ -436,20 +436,20 @@ var useScrollBase = function useScrollBase(props) {
436
436
  var propsHandleResizeWindow = props.handleResizeWindow; // `handleSize` in `ui/resolution.ResolutionDecorator` should be executed first.
437
437
 
438
438
  setTimeout(function () {
439
- if (propsHandleResizeWindow) {
440
- propsHandleResizeWindow();
441
- }
442
-
443
- if (scrollMode === 'translate') {
444
- scrollTo({
445
- position: {
446
- x: 0,
447
- y: 0
448
- },
449
- animate: false
450
- });
451
- } else {
452
- scrollContentHandle.current.scrollToPosition(0, 0, 'instant');
439
+ var handleResizeResult = propsHandleResizeWindow === null || propsHandleResizeWindow === void 0 ? void 0 : propsHandleResizeWindow();
440
+
441
+ if (handleResizeResult) {
442
+ if (scrollMode === 'translate') {
443
+ scrollTo({
444
+ position: {
445
+ x: 0,
446
+ y: 0
447
+ },
448
+ animate: false
449
+ });
450
+ } else {
451
+ scrollContentHandle.current.scrollToPosition(0, 0, 'instant');
452
+ }
453
453
  }
454
454
 
455
455
  enqueueForceUpdate();
@@ -485,7 +485,7 @@ var useScrollBase = function useScrollBase(props) {
485
485
  };
486
486
  }, [direction, isHorizontalScrollbarVisible, isVerticalScrollbarVisible, rtl, scrollMode, spotlightContainerDisabled]); // eslint-disable-line react-hooks/exhaustive-deps
487
487
 
488
- (0, _react.useEffect)(function () {
488
+ (0, _react.useLayoutEffect)(function () {
489
489
  var hasDataSizeChanged = scrollContentHandle.current.hasDataSizeChanged,
490
490
  _mutableRef$current2 = mutableRef.current,
491
491
  prevState = _mutableRef$current2.prevState,