@enact/ui 3.2.3 → 3.2.7

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.
Files changed (136) hide show
  1. package/A11yDecorator/A11yDecorator.js +1 -1
  2. package/A11yDecorator/tests/A11yDecorator-specs.js +9 -9
  3. package/AnnounceDecorator/Announce.js +10 -8
  4. package/AnnounceDecorator/AnnounceDecorator.d.ts +1 -1
  5. package/AnnounceDecorator/AnnounceDecorator.js +10 -8
  6. package/AnnounceDecorator/tests/Announce-specs.js +3 -3
  7. package/AnnounceDecorator/tests/AnnounceDecorator-specs.js +4 -4
  8. package/BodyText/BodyText.d.ts +3 -3
  9. package/BodyText/BodyText.js +1 -1
  10. package/BodyText/tests/BodyText-specs.js +11 -7
  11. package/Button/Button.d.ts +8 -8
  12. package/Button/Button.js +5 -5
  13. package/CHANGELOG.md +24 -0
  14. package/Cancelable/Cancelable.js +15 -11
  15. package/Cancelable/tests/Cancelable-specs.js +20 -20
  16. package/Changeable/Changeable.js +12 -8
  17. package/Changeable/tests/Changeable-specs.js +24 -22
  18. package/ComponentOverride/ComponentOverride.d.ts +1 -1
  19. package/ComponentOverride/ComponentOverride.js +1 -1
  20. package/FloatingLayer/FloatingLayer.js +12 -8
  21. package/FloatingLayer/FloatingLayerDecorator.js +15 -11
  22. package/FloatingLayer/Scrim.js +12 -8
  23. package/FloatingLayer/tests/FloatingLayer-specs.js +3 -3
  24. package/FloatingLayer/tests/Scrim-specs.js +2 -2
  25. package/ForwardRef/ForwardRef.js +4 -2
  26. package/GridListImageItem/GridListImageItem.d.ts +2 -2
  27. package/GridListImageItem/GridListImageItem.js +7 -7
  28. package/Group/Group.d.ts +4 -4
  29. package/Group/Group.js +1 -1
  30. package/Group/GroupItem.js +1 -1
  31. package/Group/tests/Group-specs.js +9 -9
  32. package/Heading/Heading.d.ts +3 -2
  33. package/Heading/Heading.js +1 -1
  34. package/Heading/tests/Heading-specs.js +4 -4
  35. package/Icon/Icon.d.ts +5 -5
  36. package/Icon/Icon.js +2 -2
  37. package/Icon/tests/Icon-specs.js +8 -8
  38. package/IconButton/IconButton.d.ts +6 -6
  39. package/IconButton/IconButton.js +12 -6
  40. package/Image/Image.d.ts +1 -1
  41. package/Image/Image.js +5 -3
  42. package/Image/tests/Image-specs.js +4 -4
  43. package/Item/Item.d.ts +2 -2
  44. package/Item/Item.js +1 -1
  45. package/Item/tests/Item-specs.js +4 -4
  46. package/LabeledIcon/LabeledIcon.d.ts +6 -6
  47. package/LabeledIcon/LabeledIcon.js +4 -2
  48. package/LabeledIcon/tests/LabeledIcon-specs.js +6 -6
  49. package/Layout/Cell.js +4 -2
  50. package/Layout/Layout.d.ts +22 -22
  51. package/Layout/Layout.js +4 -2
  52. package/Layout/tests/Layout-specs.js +19 -11
  53. package/Marquee/MarqueeBase.js +71 -39
  54. package/Marquee/MarqueeController.js +14 -8
  55. package/Marquee/MarqueeDecorator.js +15 -11
  56. package/Marquee/index.d.ts +85 -81
  57. package/Marquee/tests/Marquee-specs.js +61 -22
  58. package/Measurable/Measurable.js +20 -20
  59. package/Media/Media.d.ts +1 -1
  60. package/Media/Media.js +10 -6
  61. package/Placeholder/PlaceholderControllerDecorator.js +13 -11
  62. package/Placeholder/PlaceholderDecorator.js +11 -7
  63. package/ProgressBar/ProgressBar.d.ts +1 -1
  64. package/ProgressBar/ProgressBar.js +8 -6
  65. package/ProgressBar/tests/ProgressBar-specs.js +4 -4
  66. package/RadioDecorator/RadioControllerDecorator.js +13 -9
  67. package/RadioDecorator/RadioDecorator.js +10 -8
  68. package/RadioDecorator/tests/RadioDecorator-specs.js +23 -19
  69. package/Repeater/Repeater.d.ts +4 -3
  70. package/Repeater/Repeater.js +7 -5
  71. package/Repeater/tests/Repeater-specs.js +15 -15
  72. package/Resizable/Resizable.js +12 -10
  73. package/Routable/Link.js +4 -4
  74. package/Routable/Routable.d.ts +2 -2
  75. package/Routable/Routable.js +5 -3
  76. package/Routable/Router.js +13 -7
  77. package/Routable/tests/Router-specs.js +30 -30
  78. package/Scrollable/ScrollAnimator.js +1 -3
  79. package/Scrollable/ScrollThumb.js +1 -1
  80. package/Scrollable/Scrollable.js +30 -24
  81. package/Scrollable/ScrollableNative.js +30 -24
  82. package/Scrollable/Scrollbar.js +21 -17
  83. package/Scroller/Scroller.d.ts +3 -3
  84. package/Scroller/Scroller.js +21 -11
  85. package/Skinnable/Skinnable.js +3 -3
  86. package/Skinnable/tests/Skinnable-specs.js +34 -34
  87. package/Skinnable/util.js +1 -1
  88. package/Slider/Knob.js +1 -1
  89. package/Slider/PositionDecorator.js +12 -8
  90. package/Slider/Slider.d.ts +6 -6
  91. package/Slider/Slider.js +6 -4
  92. package/SlotItem/SlotItem.d.ts +4 -4
  93. package/SlotItem/SlotItem.js +3 -3
  94. package/Slottable/Slottable.js +4 -2
  95. package/Slottable/tests/Slottable-specs.js +25 -25
  96. package/Spinner/Spinner.d.ts +3 -3
  97. package/Spinner/Spinner.js +6 -6
  98. package/Spinner/tests/Spinner-specs.js +5 -5
  99. package/ToggleIcon/ToggleIcon.d.ts +3 -3
  100. package/ToggleIcon/ToggleIcon.js +1 -1
  101. package/ToggleIcon/tests/ToggleIcon-specs.js +4 -4
  102. package/ToggleItem/ToggleItem.d.ts +15 -13
  103. package/ToggleItem/ToggleItem.js +8 -4
  104. package/ToggleItem/tests/ToggleItem-specs.js +12 -8
  105. package/Toggleable/Toggleable.js +15 -9
  106. package/Toggleable/tests/Toggleable-specs.js +33 -31
  107. package/Touchable/ClickAllow.js +1 -3
  108. package/Touchable/Drag.js +3 -1
  109. package/Touchable/Flick.js +1 -3
  110. package/Touchable/Hold.js +5 -5
  111. package/Touchable/Touchable.d.ts +3 -3
  112. package/Touchable/Touchable.js +15 -9
  113. package/Touchable/config.js +4 -2
  114. package/Touchable/tests/Touchable-specs.js +18 -18
  115. package/Transition/Transition.d.ts +31 -29
  116. package/Transition/Transition.js +15 -9
  117. package/Transition/tests/Transition-specs.js +23 -15
  118. package/ViewManager/Arranger.js +3 -1
  119. package/ViewManager/TransitionGroup.js +11 -7
  120. package/ViewManager/View.js +12 -8
  121. package/ViewManager/ViewManager.d.ts +10 -10
  122. package/ViewManager/ViewManager.js +10 -6
  123. package/ViewManager/tests/View-specs.js +24 -24
  124. package/ViewManager/tests/ViewManager-specs.js +93 -89
  125. package/VirtualList/VirtualList.d.ts +9 -8
  126. package/VirtualList/VirtualList.js +4 -4
  127. package/VirtualList/VirtualListBase.js +40 -24
  128. package/VirtualList/tests/VirtualList-specs.js +13 -13
  129. package/internal/IdProvider/IdProvider.js +10 -6
  130. package/internal/Pure/Pure.js +10 -6
  131. package/internal/localized-fonts/localized-fonts.js +7 -3
  132. package/package.json +2 -2
  133. package/resolution/ResolutionDecorator.js +10 -6
  134. package/resolution/index.js +5 -1
  135. package/resolution/resolution.js +1 -1
  136. package/resolution/tests/ResolutionDecorator-specs.js +2 -2
@@ -120,7 +120,7 @@ var A11yDecorator = (0, _hoc["default"])(defaultConfig, function (config, Wrappe
120
120
  render: function render(props) {
121
121
  delete props.accessibilityPreHint;
122
122
  delete props.accessibilityHint;
123
- return _react["default"].createElement(Wrapped, props);
123
+ return /*#__PURE__*/_react["default"].createElement(Wrapped, props);
124
124
  }
125
125
  });
126
126
  });
@@ -11,7 +11,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
11
11
  describe('A11yDecorator', function () {
12
12
  var Component = (0, _A11yDecorator["default"])('div');
13
13
  test('should use the aria-label when set', function () {
14
- var subject = (0, _enzyme.shallow)(_react["default"].createElement(Component, {
14
+ var subject = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(Component, {
15
15
  "aria-label": "LABEL"
16
16
  }, "CONTENT"));
17
17
  var expected = 'LABEL';
@@ -19,7 +19,7 @@ describe('A11yDecorator', function () {
19
19
  expect(actual).toBe(expected);
20
20
  });
21
21
  test('should use the accessibilityPreHint when set', function () {
22
- var subject = (0, _enzyme.shallow)(_react["default"].createElement(Component, {
22
+ var subject = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(Component, {
23
23
  accessibilityPreHint: "PREHINT"
24
24
  }, "CONTENT"));
25
25
  var expected = 'PREHINT CONTENT';
@@ -27,7 +27,7 @@ describe('A11yDecorator', function () {
27
27
  expect(actual).toBe(expected);
28
28
  });
29
29
  test('should use the accessibilityHint when set', function () {
30
- var subject = (0, _enzyme.shallow)(_react["default"].createElement(Component, {
30
+ var subject = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(Component, {
31
31
  accessibilityHint: "HINT"
32
32
  }, "CONTENT"));
33
33
  var expected = 'CONTENT HINT';
@@ -35,7 +35,7 @@ describe('A11yDecorator', function () {
35
35
  expect(actual).toBe(expected);
36
36
  });
37
37
  test('should use only the aria-label when set and ignore accessibilityHint', function () {
38
- var subject = (0, _enzyme.shallow)(_react["default"].createElement(Component, {
38
+ var subject = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(Component, {
39
39
  "aria-label": "LABEL",
40
40
  accessibilityHint: "HINT"
41
41
  }, "CONTENT"));
@@ -44,7 +44,7 @@ describe('A11yDecorator', function () {
44
44
  expect(actual).toBe(expected);
45
45
  });
46
46
  test('should use only the aria-label when set and ignore accessibilityPreHint', function () {
47
- var subject = (0, _enzyme.shallow)(_react["default"].createElement(Component, {
47
+ var subject = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(Component, {
48
48
  "aria-label": "LABEL",
49
49
  accessibilityPreHint: "PREHINT"
50
50
  }, "CONTENT"));
@@ -53,7 +53,7 @@ describe('A11yDecorator', function () {
53
53
  expect(actual).toBe(expected);
54
54
  });
55
55
  test('should use the accessibilityPreHint, accessibilityHint when set', function () {
56
- var subject = (0, _enzyme.shallow)(_react["default"].createElement(Component, {
56
+ var subject = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(Component, {
57
57
  accessibilityPreHint: "PREHINT",
58
58
  accessibilityHint: "HINT"
59
59
  }, "CONTENT"));
@@ -62,7 +62,7 @@ describe('A11yDecorator', function () {
62
62
  expect(actual).toBe(expected);
63
63
  });
64
64
  test('should use the accessibilityPreHint, accessibilityHint, aria-label when set', function () {
65
- var subject = (0, _enzyme.shallow)(_react["default"].createElement(Component, {
65
+ var subject = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(Component, {
66
66
  accessibilityPreHint: "PREHINT",
67
67
  accessibilityHint: "HINT",
68
68
  "aria-label": "LABEL"
@@ -76,9 +76,9 @@ describe('A11yDecorator', function () {
76
76
  prop: 'title'
77
77
  }, function (_ref) {
78
78
  var title = _ref.title;
79
- return _react["default"].createElement("div", null, title);
79
+ return /*#__PURE__*/_react["default"].createElement("div", null, title);
80
80
  });
81
- var subject = (0, _enzyme.shallow)(_react["default"].createElement(TestComponent, {
81
+ var subject = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(TestComponent, {
82
82
  accessibilityPreHint: "PREHINT",
83
83
  accessibilityHint: "HINT",
84
84
  title: "TITLE"
@@ -13,7 +13,7 @@ var _class, _temp;
13
13
 
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
15
 
16
- function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
16
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
17
17
 
18
18
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19
19
 
@@ -21,10 +21,14 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
21
21
 
22
22
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
23
23
 
24
+ function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
25
+
24
26
  function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
25
27
 
26
28
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
27
29
 
30
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
31
+
28
32
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
29
33
 
30
34
  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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }
@@ -66,14 +70,12 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
66
70
  * @memberof ui/AnnounceDecorator
67
71
  * @public
68
72
  */
69
- var Announce = (_temp = _class =
70
- /*#__PURE__*/
71
- function (_React$Component) {
73
+ var Announce = (_temp = _class = /*#__PURE__*/function (_React$Component) {
72
74
  _inherits(Announce, _React$Component);
73
75
 
74
- function Announce() {
75
- var _getPrototypeOf2;
76
+ var _super = _createSuper(Announce);
76
77
 
78
+ function Announce() {
77
79
  var _this;
78
80
 
79
81
  _classCallCheck(this, Announce);
@@ -82,7 +84,7 @@ function (_React$Component) {
82
84
  args[_key] = arguments[_key];
83
85
  }
84
86
 
85
- _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Announce)).call.apply(_getPrototypeOf2, [this].concat(args)));
87
+ _this = _super.call.apply(_super, [this].concat(args));
86
88
 
87
89
  _this.resetAlert = function () {
88
90
  _this.alertTimeout = null;
@@ -117,7 +119,7 @@ function (_React$Component) {
117
119
  value: function render() {
118
120
  var props = Object.assign({}, this.props);
119
121
  delete props.timeout;
120
- return _react["default"].createElement("span", Object.assign({
122
+ return /*#__PURE__*/_react["default"].createElement("span", Object.assign({
121
123
  ref: this.setAlertRef,
122
124
  role: "alert"
123
125
  }, props));
@@ -58,7 +58,7 @@ class Example extends React.Component {
58
58
  */
59
59
 
60
60
  export class Announce extends React.Component<
61
- AnnounceProps & React.HTMLProps<HTMLElement>
61
+ Merge<React.HTMLProps<HTMLElement>, AnnounceProps>
62
62
  > {}
63
63
 
64
64
  export default AnnounceDecorator;
@@ -21,7 +21,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
21
21
 
22
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
23
23
 
24
- function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
24
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
25
25
 
26
26
  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; }
27
27
 
@@ -33,10 +33,14 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
33
33
 
34
34
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
35
35
 
36
+ function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
37
+
36
38
  function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
37
39
 
38
40
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
39
41
 
42
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
43
+
40
44
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
41
45
 
42
46
  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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }
@@ -102,14 +106,12 @@ var AnnounceDecorator = (0, _hoc["default"])(defaultConfig, function (_ref, Wrap
102
106
  var _class, _temp;
103
107
 
104
108
  var prop = _ref.prop;
105
- return _temp = _class =
106
- /*#__PURE__*/
107
- function (_React$Component) {
109
+ return _temp = _class = /*#__PURE__*/function (_React$Component) {
108
110
  _inherits(_class, _React$Component);
109
111
 
110
- function _class() {
111
- var _getPrototypeOf2;
112
+ var _super = _createSuper(_class);
112
113
 
114
+ function _class() {
113
115
  var _this;
114
116
 
115
117
  _classCallCheck(this, _class);
@@ -118,7 +120,7 @@ var AnnounceDecorator = (0, _hoc["default"])(defaultConfig, function (_ref, Wrap
118
120
  args[_key] = arguments[_key];
119
121
  }
120
122
 
121
- _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(_class)).call.apply(_getPrototypeOf2, [this].concat(args)));
123
+ _this = _super.call.apply(_super, [this].concat(args));
122
124
 
123
125
  _this.announce = function (message) {
124
126
  if (_this.announceRef) {
@@ -141,7 +143,7 @@ var AnnounceDecorator = (0, _hoc["default"])(defaultConfig, function (_ref, Wrap
141
143
  rest = _objectWithoutProperties(_this$props, ["children"]);
142
144
 
143
145
  rest[prop] = this.announce;
144
- return _react["default"].createElement(Wrapped, rest, children, _react["default"].createElement(_Announce["default"], {
146
+ return /*#__PURE__*/_react["default"].createElement(Wrapped, rest, children, /*#__PURE__*/_react["default"].createElement(_Announce["default"], {
145
147
  ref: this.setAnnounceRef
146
148
  }));
147
149
  }
@@ -8,11 +8,11 @@ var _Announce = _interopRequireDefault(require("../Announce"));
8
8
 
9
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
10
10
 
11
- function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
11
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
12
12
 
13
13
  describe('Announce', function () {
14
14
  test('should have an announce method on the component', function () {
15
- var subject = (0, _enzyme.shallow)(_react["default"].createElement(_Announce["default"], null));
15
+ var subject = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_Announce["default"], null));
16
16
  var node = subject.instance();
17
17
  var expected = 'function';
18
18
 
@@ -22,7 +22,7 @@ describe('Announce', function () {
22
22
  });
23
23
  test('should update the aria-label with the provided message', function () {
24
24
  var message = 'message';
25
- var subject = (0, _enzyme.mount)(_react["default"].createElement(_Announce["default"], null));
25
+ var subject = (0, _enzyme.mount)( /*#__PURE__*/_react["default"].createElement(_Announce["default"], null));
26
26
  var node = subject.instance();
27
27
  node.announce(message);
28
28
  var expected = message; // since we're manually updating the node in Announce, we have to manually check the node here
@@ -8,17 +8,17 @@ var _AnnounceDecorator = _interopRequireDefault(require("../AnnounceDecorator"))
8
8
 
9
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
10
10
 
11
- function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
11
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
12
12
 
13
13
  describe('AnnounceDecorator', function () {
14
14
  // no-op wrapper
15
15
  var Div = function Div() {
16
- return _react["default"].createElement("div", null);
16
+ return /*#__PURE__*/_react["default"].createElement("div", null);
17
17
  };
18
18
 
19
19
  test('should pass a function in the announce prop', function () {
20
20
  var Component = (0, _AnnounceDecorator["default"])(Div);
21
- var subject = (0, _enzyme.shallow)(_react["default"].createElement(Component, null));
21
+ var subject = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(Component, null));
22
22
  var expected = 'function';
23
23
 
24
24
  var actual = _typeof(subject.prop('announce'));
@@ -30,7 +30,7 @@ describe('AnnounceDecorator', function () {
30
30
  var Component = (0, _AnnounceDecorator["default"])({
31
31
  prop: prop
32
32
  }, Div);
33
- var subject = (0, _enzyme.shallow)(_react["default"].createElement(Component, null));
33
+ var subject = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(Component, null));
34
34
  var expected = 'function';
35
35
 
36
36
  var actual = _typeof(subject.prop(prop));
@@ -11,7 +11,7 @@ export interface BodyTextBaseProps {
11
11
  * Centers the contents.
12
12
  *
13
13
  * Applies the `centered` CSS class which can be customized by
14
- theming .
14
+ [theming] .
15
15
  */
16
16
  centered?: boolean;
17
17
  /**
@@ -35,7 +35,7 @@ corresponding internal Elements and states of this component.
35
35
  */
36
36
 
37
37
  export class BodyTextBase extends React.Component<
38
- BodyTextBaseProps & React.HTMLProps<HTMLElement>
38
+ Merge<React.HTMLProps<HTMLElement>, BodyTextBaseProps>
39
39
  > {}
40
40
 
41
41
  export interface BodyTextDecoratorProps extends ui_ForwardRef_ForwardRefProps {}
@@ -49,7 +49,7 @@ export interface BodyTextProps {}
49
49
  */
50
50
 
51
51
  export class BodyText extends React.Component<
52
- BodyTextProps & React.HTMLProps<HTMLElement>
52
+ Merge<React.HTMLProps<HTMLElement>, BodyTextProps>
53
53
  > {}
54
54
 
55
55
  export default BodyText;
@@ -104,7 +104,7 @@ var BodyTextBase = (0, _kind["default"])({
104
104
  rest = _objectWithoutProperties(_ref2, ["component", "componentRef"]);
105
105
 
106
106
  delete rest.centered;
107
- return _react["default"].createElement(Component, Object.assign({
107
+ return /*#__PURE__*/_react["default"].createElement(Component, Object.assign({
108
108
  ref: componentRef
109
109
  }, rest));
110
110
  }
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
 
3
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
+
3
5
  var _react = _interopRequireDefault(require("react"));
4
6
 
5
7
  var _enzyme = require("enzyme");
@@ -10,14 +12,16 @@ var _Layout = require("../../Layout");
10
12
 
11
13
  var _BodyTextModule = _interopRequireDefault(require("../BodyText.module.css"));
12
14
 
13
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj["default"] = obj; return newObj; } }
15
+ function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
16
+
17
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
14
18
 
15
19
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
16
20
 
17
21
  describe('BodyText Specs', function () {
18
22
  test('should render a single <p> tag', function () {
19
23
  var msg = 'Hello BodyText!';
20
- var bodyText = (0, _enzyme.mount)(_react["default"].createElement(_BodyText["default"], null, msg));
24
+ var bodyText = (0, _enzyme.mount)( /*#__PURE__*/_react["default"].createElement(_BodyText["default"], null, msg));
21
25
  var bodyTextTag = bodyText.find('p');
22
26
  var expected = 1;
23
27
  var actual = bodyTextTag.length;
@@ -25,19 +29,19 @@ describe('BodyText Specs', function () {
25
29
  });
26
30
  test('should render BodyText with content', function () {
27
31
  var content = 'Hello BodyText!';
28
- var bodyTextTag = (0, _enzyme.mount)(_react["default"].createElement(_BodyText["default"], null, content));
32
+ var bodyTextTag = (0, _enzyme.mount)( /*#__PURE__*/_react["default"].createElement(_BodyText["default"], null, content));
29
33
  var expected = content;
30
34
  var actual = bodyTextTag.text();
31
35
  expect(actual).toBe(expected);
32
36
  });
33
37
  test('should not include the centered class by default', function () {
34
- var subject = (0, _enzyme.shallow)(_react["default"].createElement(_BodyText.BodyTextBase, null));
38
+ var subject = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_BodyText.BodyTextBase, null));
35
39
  var expected = false;
36
40
  var actual = subject.hasClass(_BodyTextModule["default"].centered);
37
41
  expect(actual).toBe(expected);
38
42
  });
39
43
  test('should include the centered class if `centered` is true', function () {
40
- var subject = (0, _enzyme.shallow)(_react["default"].createElement(_BodyText.BodyTextBase, {
44
+ var subject = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_BodyText.BodyTextBase, {
41
45
  centered: true
42
46
  }));
43
47
  var expected = true;
@@ -46,7 +50,7 @@ describe('BodyText Specs', function () {
46
50
  });
47
51
  test('should support changing the component element to a different DOM node', function () {
48
52
  var componentTag = 'address';
49
- var subject = (0, _enzyme.shallow)(_react["default"].createElement(_BodyText.BodyTextBase, {
53
+ var subject = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_BodyText.BodyTextBase, {
50
54
  component: componentTag
51
55
  }));
52
56
  var expected = componentTag;
@@ -55,7 +59,7 @@ describe('BodyText Specs', function () {
55
59
  });
56
60
  test('should support changing the component element to a functional component', function () {
57
61
  var component = _Layout.Cell;
58
- var subject = (0, _enzyme.shallow)(_react["default"].createElement(_BodyText.BodyTextBase, {
62
+ var subject = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_BodyText.BodyTextBase, {
59
63
  component: component
60
64
  }));
61
65
  var expected = component;
@@ -44,10 +44,10 @@ locale positioning of the custom component.
44
44
  */
45
45
  icon?: React.ReactNode;
46
46
  /**
47
- * The component used to render the icon .
47
+ * The component used to render the [icon] .
48
48
  *
49
49
  * This component will receive the `size` property set on the Button as well as the `icon`
50
- class to customize its styling. If icon is not a
50
+ class to customize its styling. If [icon] is not a
51
51
  string, this property is not used.
52
52
  */
53
53
  iconComponent?: React.ComponentType;
@@ -55,28 +55,28 @@ string, this property is not used.
55
55
  * Enforces a minimum width for the component.
56
56
  *
57
57
  * Applies the `minWidth` CSS class which can be customized by
58
- theming .
58
+ [theming] .
59
59
  */
60
60
  minWidth?: boolean;
61
61
  /**
62
62
  * Indicates the component is depressed.
63
63
  *
64
64
  * Applies the `pressed` CSS class which can be customized by
65
- theming .
65
+ [theming] .
66
66
  */
67
67
  pressed?: boolean;
68
68
  /**
69
69
  * Indicates the component is selected.
70
70
  *
71
71
  * Applies the `selected` CSS class which can be customized by
72
- theming .
72
+ [theming] .
73
73
  */
74
74
  selected?: boolean;
75
75
  /**
76
76
  * The size of the button.
77
77
  *
78
78
  * Applies either the `small` or `large` CSS class which can be customized by
79
- theming .
79
+ [theming] .
80
80
  */
81
81
  size?: "small" | "large";
82
82
  }
@@ -85,7 +85,7 @@ string, this property is not used.
85
85
  */
86
86
 
87
87
  export class ButtonBase extends React.Component<
88
- ButtonBaseProps & React.HTMLProps<HTMLElement>
88
+ Merge<React.HTMLProps<HTMLElement>, ButtonBaseProps>
89
89
  > {}
90
90
 
91
91
  export interface ButtonDecoratorProps extends ui_Touchable_TouchableProps {}
@@ -100,7 +100,7 @@ export interface ButtonProps
100
100
  */
101
101
 
102
102
  export class Button extends React.Component<
103
- ButtonProps & React.HTMLProps<HTMLElement>
103
+ Merge<React.HTMLProps<HTMLElement>, ButtonProps>
104
104
  > {}
105
105
 
106
106
  export default Button;
package/Button/Button.js CHANGED
@@ -185,7 +185,7 @@ var ButtonBase = (0, _kind["default"])({
185
185
  _icon = _ref2.icon,
186
186
  Icon = _ref2.iconComponent,
187
187
  size = _ref2.size;
188
- return typeof _icon === 'string' && Icon ? _react["default"].createElement(Icon, {
188
+ return typeof _icon === 'string' && Icon ? /*#__PURE__*/_react["default"].createElement(Icon, {
189
189
  size: size,
190
190
  className: css.icon
191
191
  }, _icon) : _icon;
@@ -204,16 +204,16 @@ var ButtonBase = (0, _kind["default"])({
204
204
  delete rest.pressed;
205
205
  delete rest.selected;
206
206
  delete rest.size;
207
- return _react["default"].createElement("div", Object.assign({
207
+ return /*#__PURE__*/_react["default"].createElement("div", Object.assign({
208
208
  role: "button"
209
209
  }, rest, {
210
210
  "aria-disabled": disabled,
211
211
  disabled: disabled
212
- }), decoration ? _react["default"].createElement("div", {
212
+ }), decoration ? /*#__PURE__*/_react["default"].createElement("div", {
213
213
  className: css.decoration
214
- }, decoration) : null, _react["default"].createElement("div", {
214
+ }, decoration) : null, /*#__PURE__*/_react["default"].createElement("div", {
215
215
  className: css.bg
216
- }), _react["default"].createElement("div", {
216
+ }), /*#__PURE__*/_react["default"].createElement("div", {
217
217
  className: css.client
218
218
  }, icon, children));
219
219
  }
package/CHANGELOG.md CHANGED
@@ -2,6 +2,30 @@
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
+ ## [3.2.7] - 2022-01-17
6
+
7
+ No significant changes.
8
+
9
+ ## [3.2.6] - 2020-03-26
10
+
11
+ ### Fixed
12
+
13
+ - `ui/VirtualList.VirtualGridList` and `ui/VirtualList.VirtualList` to show items properly when reducing data size by updating `firstIndex` correctly
14
+ - `ui/VirtualList.VirtualList` and `ui/VirtualList.VirtualGridList` not to suddenly jump when pressing directional keys after wheeling
15
+ - `ui/VirtualList.VirtualList` and `ui/VirtualList.VirtualGridList` to show items properly when reducing data size
16
+
17
+ ## [3.2.5] - 2019-11-14
18
+
19
+ ### Fixed
20
+
21
+ - `ui/Marquee` to not double aria readout for marqueeing contents
22
+
23
+ ## [3.2.4] - 2019-11-07
24
+
25
+ ### Fixed
26
+
27
+ - `ui/Marquee` text alignment when content is centered
28
+
5
29
  ## [3.2.3] - 2019-11-01
6
30
 
7
31
  ### Fixed
@@ -35,7 +35,7 @@ var _modalHandler = require("./modalHandler");
35
35
 
36
36
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
37
37
 
38
- function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
38
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
39
39
 
40
40
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
41
41
 
@@ -43,12 +43,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
43
43
 
44
44
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
45
45
 
46
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
46
+ function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
47
47
 
48
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
48
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
49
49
 
50
50
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
51
51
 
52
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
53
+
54
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
55
+
52
56
  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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }
53
57
 
54
58
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
@@ -186,17 +190,17 @@ var Cancelable = (0, _hoc["default"])(defaultConfig, function (config, Wrapped)
186
190
  return stopped;
187
191
  };
188
192
 
189
- return _temp = _class =
190
- /*#__PURE__*/
191
- function (_React$Component) {
193
+ return _temp = _class = /*#__PURE__*/function (_React$Component) {
192
194
  _inherits(_class, _React$Component);
193
195
 
196
+ var _super = _createSuper(_class);
197
+
194
198
  function _class(props) {
195
199
  var _this;
196
200
 
197
201
  _classCallCheck(this, _class);
198
202
 
199
- _this = _possibleConstructorReturn(this, _getPrototypeOf(_class).call(this, props));
203
+ _this = _super.call(this, props);
200
204
  _this.handle = _handle.handle.bind(_assertThisInitialized(_this));
201
205
  _this.handleCancel = _this.handle(_cancelHandler.forCancel, (0, _handle.forward)('onCancel'), dispatchCancelToConfig, _handle.stop, _handle.stopImmediate);
202
206
  _this.handleKeyUp = _this.handle((0, _handle.forward)('onKeyUp'), // nesting handlers for DRYness. note that if any conditions return false in
@@ -216,21 +220,21 @@ var Cancelable = (0, _hoc["default"])(defaultConfig, function (config, Wrapped)
216
220
  }, {
217
221
  key: "renderWrapped",
218
222
  value: function renderWrapped(props) {
219
- return _react["default"].createElement(Component, {
223
+ return /*#__PURE__*/_react["default"].createElement(Component, {
220
224
  onKeyUp: this.handleKeyUp
221
- }, _react["default"].createElement(Wrapped, props));
225
+ }, /*#__PURE__*/_react["default"].createElement(Wrapped, props));
222
226
  }
223
227
  }, {
224
228
  key: "renderUnwrapped",
225
229
  value: function renderUnwrapped(props) {
226
- return _react["default"].createElement(Wrapped, Object.assign({}, props, {
230
+ return /*#__PURE__*/_react["default"].createElement(Wrapped, Object.assign({}, props, {
227
231
  onKeyUp: this.handleKeyUp
228
232
  }));
229
233
  }
230
234
  }, {
231
235
  key: "renderModal",
232
236
  value: function renderModal(props) {
233
- return _react["default"].createElement(Wrapped, props);
237
+ return /*#__PURE__*/_react["default"].createElement(Wrapped, props);
234
238
  }
235
239
  }, {
236
240
  key: "render",