@enact/ui 4.9.2 → 5.0.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.
Files changed (181) hide show
  1. package/AnnounceDecorator/Announce.js +20 -22
  2. package/AnnounceDecorator/AnnounceDecorator.js +5 -5
  3. package/AnnounceDecorator/tests/Announce-specs.js +1 -1
  4. package/AnnounceDecorator/tests/AnnounceDecorator-specs.js +1 -1
  5. package/AnnounceDecorator/tests/useAnnounce-specs.js +1 -1
  6. package/AnnounceDecorator/useAnnounce.js +1 -1
  7. package/BodyText/BodyText.js +5 -5
  8. package/BodyText/tests/BodyText-specs.js +1 -1
  9. package/Button/Button.js +5 -5
  10. package/Button/tests/Button-specs.js +3 -3
  11. package/CHANGELOG.md +33 -0
  12. package/Cancelable/Cancelable.js +22 -24
  13. package/Cancelable/tests/Cancelable-specs.js +4 -4
  14. package/Changeable/Changeable.js +22 -24
  15. package/Changeable/tests/Changeable-specs.js +1 -1
  16. package/ComponentOverride/ComponentOverride.js +4 -4
  17. package/FloatingLayer/FloatingLayer.js +20 -22
  18. package/FloatingLayer/FloatingLayerContainer.js +6 -7
  19. package/FloatingLayer/FloatingLayerDecorator.js +5 -5
  20. package/FloatingLayer/Scrim.js +18 -20
  21. package/FloatingLayer/tests/FloatingLayer-specs.js +1 -1
  22. package/FloatingLayer/tests/Scrim-specs.js +1 -1
  23. package/FloatingLayer/tests/useFloatingLayerDecorator-specs.js +2 -2
  24. package/FloatingLayer/useFloatingLayer.js +4 -4
  25. package/FloatingLayer/useFloatingLayerDecorator.js +1 -1
  26. package/ForwardRef/ForwardRef.js +3 -3
  27. package/Group/Group.js +5 -5
  28. package/Group/GroupItem.js +5 -5
  29. package/Group/tests/Group-specs.js +4 -4
  30. package/Heading/Heading.js +5 -5
  31. package/Heading/tests/Heading-specs.js +1 -1
  32. package/Icon/Icon.js +5 -5
  33. package/Icon/tests/Icon-specs.js +1 -1
  34. package/Image/Image.js +5 -5
  35. package/Image/tests/Image-specs.js +1 -1
  36. package/ImageItem/ImageItem.js +5 -5
  37. package/ImageItem/tests/ImageItem-specs.js +3 -3
  38. package/Item/Item.js +5 -5
  39. package/Item/tests/Item-specs.js +3 -3
  40. package/LabeledIcon/LabeledIcon.js +5 -5
  41. package/LabeledIcon/tests/LabeledIcon-specs.js +1 -1
  42. package/Layout/Cell.js +5 -5
  43. package/Layout/Layout.js +5 -5
  44. package/Layout/tests/Layout-specs.js +7 -7
  45. package/Marquee/MarqueeBase.js +5 -5
  46. package/Marquee/MarqueeController.js +3 -3
  47. package/Marquee/MarqueeDecorator.js +30 -51
  48. package/Marquee/index.d.ts +10 -14
  49. package/Marquee/index.js +1 -1
  50. package/Marquee/tests/Marquee-specs.js +5 -6
  51. package/Marquee/useMarqueeController.js +2 -2
  52. package/Measurable/Measurable.js +8 -8
  53. package/Measurable/tests/Measurable-specs.js +8 -10
  54. package/Media/Media.js +17 -19
  55. package/Placeholder/PlaceholderControllerDecorator.js +22 -24
  56. package/Placeholder/PlaceholderDecorator.js +20 -22
  57. package/Placeholder/index.js +1 -1
  58. package/Placeholder/tests/PlaceholderControllerDecorator-specs.js +2 -2
  59. package/Placeholder/tests/PlaceholderDecorator-specs.js +1 -1
  60. package/ProgressBar/ProgressBar.js +5 -5
  61. package/ProgressBar/tests/ProgressBar-specs.js +1 -1
  62. package/Repeater/Repeater.js +5 -5
  63. package/Repeater/tests/Repeater-specs.js +3 -3
  64. package/Resizable/Resizable.js +3 -3
  65. package/Resizable/tests/Resizable-specs.js +2 -2
  66. package/Resizable/tests/useResize-specs.js +3 -3
  67. package/Resizable/useResize.js +3 -3
  68. package/Routable/Link.js +17 -19
  69. package/Routable/Routable.js +5 -5
  70. package/Routable/Route.js +1 -1
  71. package/Routable/Router.js +22 -24
  72. package/Routable/tests/Routable-specs.js +9 -9
  73. package/Routable/tests/Router-specs.js +1 -1
  74. package/Routable/util.js +1 -1
  75. package/Scroller/Scroller.d.ts +0 -120
  76. package/Scroller/Scroller.js +3 -11
  77. package/Scroller/ScrollerBasic.js +19 -21
  78. package/Scroller/tests/Scroller-specs.js +1 -1
  79. package/Skinnable/Skinnable.js +5 -5
  80. package/Skinnable/tests/Skinnable-specs.js +3 -3
  81. package/Skinnable/tests/useSkins-specs.js +3 -3
  82. package/Skinnable/util.js +1 -1
  83. package/Slider/Knob.js +5 -5
  84. package/Slider/PositionDecorator.js +25 -27
  85. package/Slider/Slider.js +5 -5
  86. package/Slider/tests/Slider-specs.js +1 -1
  87. package/Slottable/Slottable.js +3 -5
  88. package/Slottable/tests/Slottable-specs.js +1 -1
  89. package/Slottable/tests/useSlots-specs.js +1 -1
  90. package/Slottable/useSlots.js +5 -5
  91. package/Spinner/Spinner.js +5 -5
  92. package/ToggleIcon/ToggleIcon.js +5 -5
  93. package/ToggleIcon/tests/ToggleIcon-specs.js +3 -3
  94. package/Toggleable/Toggle.js +6 -7
  95. package/Toggleable/Toggleable.js +6 -6
  96. package/Toggleable/tests/Toggleable-specs.js +1 -1
  97. package/Toggleable/useToggle.js +8 -8
  98. package/Touchable/ClickAllow.js +5 -6
  99. package/Touchable/Drag.js +6 -6
  100. package/Touchable/Flick.js +7 -8
  101. package/Touchable/Hold.js +7 -8
  102. package/Touchable/Pinch.js +6 -6
  103. package/Touchable/Touch.js +6 -7
  104. package/Touchable/Touchable.js +5 -5
  105. package/Touchable/config.js +2 -2
  106. package/Touchable/tests/Touchable-specs.js +3 -3
  107. package/Touchable/tests/useTouch-specs.js +5 -5
  108. package/Touchable/useTouch.js +7 -7
  109. package/Transition/Transition.js +17 -19
  110. package/Transition/tests/Transition-specs.js +7 -7
  111. package/ViewManager/Arranger.js +3 -3
  112. package/ViewManager/TransitionGroup.js +18 -20
  113. package/ViewManager/View.js +15 -17
  114. package/ViewManager/ViewManager.js +25 -27
  115. package/ViewManager/tests/View-specs.js +1 -1
  116. package/ViewManager/tests/ViewManager-specs.js +16 -18
  117. package/VirtualList/VirtualList.d.ts +0 -158
  118. package/VirtualList/VirtualList.js +3 -17
  119. package/VirtualList/VirtualListBasic.js +42 -43
  120. package/VirtualList/tests/VirtualGridList-native-specs.js +4 -4
  121. package/VirtualList/tests/VirtualGridList-specs.js +6 -6
  122. package/VirtualList/tests/VirtualList-native-specs.js +5 -5
  123. package/VirtualList/tests/VirtualList-specs.js +7 -7
  124. package/internal/IdProvider/IdProvider.js +3 -3
  125. package/internal/IdProvider/Provider.js +5 -6
  126. package/internal/IdProvider/tests/IdProvider-specs.js +3 -3
  127. package/internal/IdProvider/tests/useId-specs.js +3 -3
  128. package/internal/IdProvider/useId.js +1 -1
  129. package/internal/Pure/Pure.js +20 -22
  130. package/internal/Pure/tests/Pure-specs.js +15 -17
  131. package/internal/localized-fonts/localized-fonts.js +4 -4
  132. package/internal/selection/selection.js +1 -1
  133. package/package.json +5 -4
  134. package/resolution/ResolutionDecorator.js +21 -23
  135. package/resolution/index.js +2 -2
  136. package/resolution/tests/ResolutionDecorator-specs.js +1 -1
  137. package/useControlledState/tests/useControlledState-specs.js +5 -5
  138. package/useControlledState/useControlledState.js +4 -4
  139. package/useScroll/ScrollAnimator.js +6 -7
  140. package/useScroll/Scrollbar.js +5 -5
  141. package/useScroll/ScrollbarTrack.js +5 -5
  142. package/useScroll/useScroll.js +9 -9
  143. package/useScroll/utilDOM.js +1 -1
  144. package/GridListImageItem/GridListImageItem.d.ts +0 -85
  145. package/GridListImageItem/GridListImageItem.js +0 -250
  146. package/GridListImageItem/GridListImageItem.module.css +0 -28
  147. package/GridListImageItem/package.json +0 -3
  148. package/IconButton/IconButton.d.ts +0 -115
  149. package/IconButton/IconButton.js +0 -253
  150. package/IconButton/IconButton.module.css +0 -11
  151. package/IconButton/package.json +0 -3
  152. package/IconButton/tests/IconButton-specs.js +0 -29
  153. package/RadioDecorator/RadioControllerDecorator.js +0 -101
  154. package/RadioDecorator/RadioDecorator.d.ts +0 -35
  155. package/RadioDecorator/RadioDecorator.js +0 -177
  156. package/RadioDecorator/package.json +0 -3
  157. package/RadioDecorator/tests/RadioDecorator-specs.js +0 -247
  158. package/Scrollable/ScrollAnimator.js +0 -130
  159. package/Scrollable/ScrollThumb.js +0 -57
  160. package/Scrollable/ScrollThumb.module.css +0 -34
  161. package/Scrollable/Scrollable.js +0 -1430
  162. package/Scrollable/Scrollable.module.css +0 -36
  163. package/Scrollable/ScrollableNative.js +0 -1429
  164. package/Scrollable/Scrollbar.js +0 -281
  165. package/Scrollable/Scrollbar.module.css +0 -24
  166. package/Scrollable/package.json +0 -3
  167. package/Scroller/UiScroller.module.css +0 -10
  168. package/Scroller/UiScrollerBase.js +0 -372
  169. package/SlotItem/SlotItem.d.ts +0 -118
  170. package/SlotItem/SlotItem.js +0 -248
  171. package/SlotItem/SlotItem.module.css +0 -12
  172. package/SlotItem/package.json +0 -3
  173. package/SlotItem/tests/SlotItem-specs.js +0 -24
  174. package/ToggleItem/ToggleItem.d.ts +0 -132
  175. package/ToggleItem/ToggleItem.js +0 -301
  176. package/ToggleItem/ToggleItem.module.css +0 -9
  177. package/ToggleItem/package.json +0 -3
  178. package/ToggleItem/tests/ToggleItem-specs.js +0 -120
  179. package/VirtualList/UiVirtualList.module.css +0 -26
  180. package/VirtualList/UiVirtualListBase.js +0 -1410
  181. package/VirtualList/VirtualListBase.js +0 -33
@@ -6,11 +6,11 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports["default"] = exports.ScrollAnimator = void 0;
7
7
  var _util = require("@enact/core/util");
8
8
  var _clamp = _interopRequireDefault(require("ramda/src/clamp"));
9
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
10
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
11
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
12
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
13
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
11
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
12
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
13
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
14
14
  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); }
15
15
  var
16
16
  // Use eases library
@@ -70,7 +70,7 @@ var ScrollAnimator = exports.ScrollAnimator = /*#__PURE__*/function () {
70
70
  this.type = 'ease-out';
71
71
  this.timingFunction = timingFunctions[type || this.type];
72
72
  }
73
- _createClass(ScrollAnimator, [{
73
+ return _createClass(ScrollAnimator, [{
74
74
  key: "simulate",
75
75
  value: function simulate(sourceX, sourceY, velocityX, velocityY) {
76
76
  var stepX = clampVelocity(velocityX * frameTime),
@@ -125,6 +125,5 @@ var ScrollAnimator = exports.ScrollAnimator = /*#__PURE__*/function () {
125
125
  }
126
126
  }
127
127
  }]);
128
- return ScrollAnimator;
129
128
  }();
130
129
  var _default = exports["default"] = ScrollAnimator;
@@ -21,14 +21,14 @@ var _ScrollbarModule = _interopRequireDefault(require("./Scrollbar.module.css"))
21
21
  var _jsxRuntime = require("react/jsx-runtime");
22
22
  var _excluded = ["className", "clientSize", "corner", "css", "minThumbSize", "scrollbarHandle", "vertical"],
23
23
  _excluded2 = ["corner", "css", "minThumbSize", "vertical"];
24
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
24
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
25
25
  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; }
26
26
  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; }
27
- 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; }
28
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
27
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
28
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
29
29
  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); }
30
- 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; }
31
- 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; }
30
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
31
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
32
32
  var scrollbarTrackHidingDelay = 900; // 900ms + 100ms(fade out duration) = 1000ms.
33
33
 
34
34
  var addClass = function addClass(element, className) {
@@ -18,14 +18,14 @@ var _excluded = ["vertical"];
18
18
  * @ui
19
19
  * @private
20
20
  */
21
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
21
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
22
22
  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; }
23
23
  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; }
24
- 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; }
25
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
24
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
25
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
26
26
  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); }
27
- 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; }
28
- 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; }
27
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
28
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
29
29
  var ScrollbarTrack = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
30
30
  var _props$vertical = props.vertical,
31
31
  vertical = _props$vertical === void 0 ? true : _props$vertical,
@@ -36,20 +36,20 @@ var _excluded = ["componentRef"],
36
36
  * @private
37
37
  */
38
38
  // scrollMode 'native'
39
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
40
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
39
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
40
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
41
41
  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."); }
42
- 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); }
43
- 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; }
42
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
43
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
44
44
  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; } }
45
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
45
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
46
46
  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; }
47
47
  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; }
48
- 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; }
49
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
48
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
49
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
50
50
  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); }
51
- 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; }
52
- 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; }
51
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
52
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
53
53
  var constants = exports.constants = {
54
54
  animationDuration: 1000,
55
55
  epsilon: 1,
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.utilDOM = exports["default"] = void 0;
7
7
  var _warning = _interopRequireDefault(require("warning"));
8
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
9
  // At the end, wes should not use DOM APIs as well as the APIs in the `utilDOM`. If we use them, we have to try to remove them first if possible.
10
10
 
11
11
  var utilDOM = exports.utilDOM = function () {
@@ -1,85 +0,0 @@
1
- // Type definitions for ui/GridListImageItem
2
-
3
- import * as React from "react";
4
-
5
- type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
6
- type Merge<M, N> = Omit<M, Extract<keyof M, keyof N>> & N;
7
-
8
- export interface GridListImageItemProps {
9
- /**
10
- * The primary caption to be displayed with the image.
11
- */
12
- caption?: string;
13
- /**
14
- * The component used to render the captions
15
- */
16
- captionComponent?: string | React.ComponentType;
17
- /**
18
- * Customizes the component by mapping the supplied collection of CSS class names to the
19
- corresponding internal elements and states of this component.
20
- *
21
- * The following classes are supported:
22
- * * `icon` - The icon component class for default selection overlay
23
- * * `image` - The image component class
24
- * * `selected` - Applied when `selected` prop is `true`
25
- * * `caption` - The caption component class
26
- * * `subCaption` - The subCaption component class
27
- */
28
- css?: object;
29
- /**
30
- * The component used to render the default check icon when selected.
31
- If there is custom selectionOverlay component, this icon will not be shown.
32
- */
33
- iconComponent?: React.ComponentType;
34
- /**
35
- * The component used to render the image component
36
- */
37
- imageComponent?: React.ComponentType;
38
- /**
39
- * Placeholder image used while
40
- is loaded.
41
- */
42
- placeholder?: string;
43
- /**
44
- * Applies a selected visual effect to the image, but only if `selectionOverlayShowing`
45
- is also `true` .
46
- */
47
- selected?: boolean;
48
- /**
49
- * The custom selection overlay component to render.
50
- *
51
- * A component can be a stateless functional component, `kind()` or React component.
52
- The following is an example with custom selection overlay kind.
53
- *
54
- * Example:
55
- * ```
56
- const SelectionOverlay = kind({
57
- render: () => <div>custom overlay</div>
58
- });
59
-
60
- <GridListImageItem selectionOverlay={SelectionOverlay} />
61
- ```
62
- */
63
- selectionOverlay?: Function;
64
- /**
65
- * Shows a selection overlay with a centered icon. When `selected` is true, a check mark is shown.
66
- */
67
- selectionOverlayShowing?: boolean;
68
- /**
69
- * The absolute URL path to the image.
70
- */
71
- source?: string;
72
- /**
73
- * The second caption line to be displayed with the image.
74
- */
75
- subCaption?: string;
76
- }
77
- /**
78
- * A basic grid list image item without any behavior.
79
- */
80
-
81
- export class GridListImageItem extends React.Component<
82
- Merge<React.HTMLProps<HTMLElement>, GridListImageItemProps>
83
- > {}
84
-
85
- export default GridListImageItem;
@@ -1,250 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = exports.GridListImageItem = void 0;
7
- var _deprecate = _interopRequireDefault(require("@enact/core/internal/deprecate"));
8
- var _propTypes = _interopRequireDefault(require("@enact/core/internal/prop-types"));
9
- var _kind = _interopRequireDefault(require("@enact/core/kind"));
10
- var _propTypes2 = _interopRequireDefault(require("prop-types"));
11
- var _react = require("react");
12
- var _Layout = require("../Layout");
13
- var _Icon = _interopRequireDefault(require("../Icon"));
14
- var _Image = _interopRequireDefault(require("../Image"));
15
- var _GridListImageItemModule = _interopRequireDefault(require("./GridListImageItem.module.css"));
16
- var _jsxRuntime = require("react/jsx-runtime");
17
- var _excluded = ["css", "imageComponent", "placeholder", "source", "selectionOverlay", "subComponents"];
18
- /**
19
- * Unstyled grid list image item components and behaviors to be customized by a theme or application.
20
- *
21
- * @module ui/GridListImageItem
22
- * @exports GridListImageItem
23
- * @deprecated Will be removed in 5.0.0. Use {@link ui/ImageItem} instead.
24
- */
25
- /**
26
- * A basic grid list image item without any behavior.
27
- *
28
- * @class GridListImageItem
29
- * @memberof ui/GridListImageItem
30
- * @ui
31
- * @public
32
- */
33
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
34
- 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; }
35
- 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; }
36
- 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; }
37
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
38
- 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); }
39
- 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; }
40
- 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; }
41
- var GridListImageItem = exports.GridListImageItem = (0, _kind["default"])({
42
- name: 'ui:GridListImageItem',
43
- propTypes: /** @lends ui/GridListImageItem.GridListImageItem.prototype */{
44
- /**
45
- * The primary caption to be displayed with the image.
46
- *
47
- * @type {String}
48
- * @public
49
- */
50
- caption: _propTypes2["default"].string,
51
- /**
52
- * The component used to render the captions
53
- *
54
- * @type {String|Component}
55
- * @public
56
- */
57
- captionComponent: _propTypes["default"].renderable,
58
- /**
59
- * Customizes the component by mapping the supplied collection of CSS class names to the
60
- * corresponding internal elements and states of this component.
61
- *
62
- * The following classes are supported:
63
- *
64
- * * `icon` - The icon component class for default selection overlay
65
- * * `image` - The image component class
66
- * * `selected` - Applied when `selected` prop is `true`
67
- * * `caption` - The caption component class
68
- * * `subCaption` - The subCaption component class
69
- *
70
- * @type {Object}
71
- * @public
72
- */
73
- css: _propTypes2["default"].object,
74
- /**
75
- * The component used to render the default check icon when selected.
76
- * If there is custom selectionOverlay component, this icon will not be shown.
77
- *
78
- * @type {Component}
79
- * @default ui/Icon.Icon
80
- * @public
81
- */
82
- iconComponent: _propTypes["default"].component,
83
- /**
84
- * The component used to render the image component
85
- *
86
- * @type {Component}
87
- * @default ui/Image.Image
88
- * @public
89
- */
90
- imageComponent: _propTypes["default"].component,
91
- /**
92
- * Placeholder image used while {@link ui/GridListImageItem.GridListImageItem.source|source}
93
- * is loaded.
94
- *
95
- * @type {String}
96
- * @public
97
- */
98
- placeholder: _propTypes2["default"].string,
99
- /**
100
- * Applies a selected visual effect to the image, but only if `selectionOverlayShowing`
101
- * is also `true`.
102
- *
103
- * @type {Boolean}
104
- * @default false
105
- * @public
106
- */
107
- selected: _propTypes2["default"].bool,
108
- /**
109
- * The custom selection overlay component to render.
110
- *
111
- * A component can be a stateless functional component, `kind()` or React component.
112
- * The following is an example with custom selection overlay kind.
113
- *
114
- * Example:
115
- * ```
116
- * const SelectionOverlay = kind({
117
- * render: () => <div>custom overlay</div>
118
- * });
119
- *
120
- * <GridListImageItem selectionOverlay={SelectionOverlay} />
121
- * ```
122
- *
123
- * @type {Function}
124
- * @public
125
- */
126
- selectionOverlay: _propTypes2["default"].func,
127
- /**
128
- * Shows a selection overlay with a centered icon. When `selected` is true, a check mark is shown.
129
- *
130
- * @type {Boolean}
131
- * @default false
132
- * @public
133
- */
134
- selectionOverlayShowing: _propTypes2["default"].bool,
135
- /**
136
- * The absolute URL path to the image.
137
- *
138
- * @type {String}
139
- * @public
140
- */
141
- source: _propTypes2["default"].string,
142
- /**
143
- * The second caption line to be displayed with the image.
144
- *
145
- * @type {String}
146
- * @public
147
- */
148
- subCaption: _propTypes2["default"].string,
149
- /**
150
- * The components that will be shown below the image.
151
- *
152
- * @type {Array|Element}
153
- * @private
154
- */
155
- subComponents: _propTypes2["default"].oneOfType([_propTypes2["default"].array, _propTypes2["default"].element])
156
- },
157
- defaultProps: {
158
- captionComponent: 'div',
159
- iconComponent: _Icon["default"],
160
- imageComponent: _Image["default"],
161
- selected: false,
162
- selectionOverlayShowing: false
163
- },
164
- styles: {
165
- css: _GridListImageItemModule["default"],
166
- className: 'gridListImageItem',
167
- publicClassNames: true
168
- },
169
- computed: {
170
- className: function className(_ref) {
171
- var caption = _ref.caption,
172
- selected = _ref.selected,
173
- styler = _ref.styler,
174
- subCaption = _ref.subCaption;
175
- return styler.append({
176
- selected: selected,
177
- caption: caption,
178
- subCaption: subCaption
179
- });
180
- },
181
- selectionOverlay: function selectionOverlay(_ref2) {
182
- var css = _ref2.css,
183
- IconComponent = _ref2.iconComponent,
184
- SelectionOverlay = _ref2.selectionOverlay,
185
- selectionOverlayShowing = _ref2.selectionOverlayShowing;
186
- if (selectionOverlayShowing) {
187
- return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
188
- className: css.overlayContainer,
189
- children: SelectionOverlay ? /*#__PURE__*/(0, _jsxRuntime.jsx)(SelectionOverlay, {}) : /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
190
- className: css.overlayComponent,
191
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(IconComponent, {
192
- className: css.icon,
193
- children: "check"
194
- })
195
- })
196
- });
197
- }
198
- },
199
- subComponents: function subComponents(_ref3) {
200
- var caption = _ref3.caption,
201
- Caption = _ref3.captionComponent,
202
- css = _ref3.css,
203
- subCaption = _ref3.subCaption,
204
- _subComponents = _ref3.subComponents;
205
- return _subComponents ? _subComponents : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
206
- children: [caption ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Layout.Cell, {
207
- className: css.caption,
208
- component: Caption,
209
- shrink: true,
210
- children: caption
211
- }) : null, subCaption ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Layout.Cell, {
212
- className: css.subCaption,
213
- component: Caption,
214
- shrink: true,
215
- children: subCaption
216
- }) : null]
217
- });
218
- }
219
- },
220
- render: (0, _deprecate["default"])(function (_ref4) {
221
- var css = _ref4.css,
222
- ImageComponent = _ref4.imageComponent,
223
- placeholder = _ref4.placeholder,
224
- source = _ref4.source,
225
- selectionOverlay = _ref4.selectionOverlay,
226
- subComponents = _ref4.subComponents,
227
- rest = _objectWithoutProperties(_ref4, _excluded);
228
- delete rest.caption;
229
- delete rest.captionComponent;
230
- delete rest.iconComponent;
231
- delete rest.selected;
232
- delete rest.selectionOverlayShowing;
233
- delete rest.subCaption;
234
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Layout.Column, _objectSpread(_objectSpread({}, rest), {}, {
235
- inline: true,
236
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Layout.Cell, {
237
- className: css.image,
238
- component: ImageComponent,
239
- placeholder: placeholder,
240
- src: source,
241
- children: selectionOverlay
242
- }), subComponents]
243
- }));
244
- }, {
245
- name: 'ui/GridListImageItem',
246
- replacedBy: 'ui/ImageItem',
247
- until: '5.0.0'
248
- })
249
- });
250
- var _default = exports["default"] = GridListImageItem;
@@ -1,28 +0,0 @@
1
- .gridListImageItem {
2
- box-sizing: border-box;
3
- }
4
- .gridListImageItem .icon {
5
- position: relative;
6
- }
7
- .gridListImageItem .image {
8
- display: block;
9
- width: 100%;
10
- height: 100%;
11
- margin: 0;
12
- }
13
- .gridListImageItem .overlayComponent {
14
- display: flex;
15
- align-items: center;
16
- justify-content: center;
17
- height: 100%;
18
- }
19
- .gridListImageItem .overlayContainer {
20
- background-color: transparent;
21
- pointer-events: none;
22
- height: 100%;
23
- }
24
- .gridListImageItem .caption,
25
- .gridListImageItem .selected,
26
- .gridListImageItem .subCaption {
27
- /* Public Class Names */
28
- }
@@ -1,3 +0,0 @@
1
- {
2
- "main": "GridListImageItem.js"
3
- }
@@ -1,115 +0,0 @@
1
- // Type definitions for ui/IconButton
2
-
3
- import { ForwardRefProps as ui_ForwardRef_ForwardRefProps } from "@enact/ui/ForwardRef";
4
- import { TouchableProps as ui_Touchable_TouchableProps } from "@enact/ui/Touchable";
5
- import * as React from "react";
6
-
7
- type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
8
- type Merge<M, N> = Omit<M, Extract<keyof M, keyof N>> & N;
9
-
10
- export interface IconButtonBaseProps {
11
- /**
12
- * This is the root component used to render the button and will receive all props except
13
- `icon` .
14
- */
15
- buttonComponent: React.ComponentType | JSX.Element;
16
- /**
17
- * The component used to render the .
18
- *
19
- * This component will receive the `flip` and `size` property set on the `IconButton` as well as the
20
- `icon` class to customize its styling.
21
- */
22
- iconComponent: React.ComponentType;
23
- /**
24
- * Additional children that follow the icon.
25
- *
26
- * If `icon` isn't specified but `children` is, `children` is used as the icon's value.
27
- */
28
- children?: React.ReactNode;
29
- /**
30
- * Called with a reference to the root component.
31
- *
32
- * When using , the `ref` prop is forwarded to this
33
- component as `componentRef` .
34
- */
35
- componentRef?: object | Function;
36
- /**
37
- * Customizes the component by mapping the supplied collection of CSS class names to the
38
- corresponding internal elements and states of this component.
39
- *
40
- * The following classes are supported:
41
- * * `iconButton` - The root component class
42
- * * `icon` - The class
43
- * * `large` - Applied when `size` prop is `'large'`
44
- * * `small` - Applied when `size` prop is `'small'`
45
- * * `pressed` - Applied when `pressed` prop is `true`
46
- */
47
- css?: object;
48
- /**
49
- * Disables IconButton.
50
- *
51
- * When `true` , the button is shown as disabled and does not generate
52
- `onClick` .
53
- */
54
- disabled?: boolean;
55
- /**
56
- * Flip the icon horizontally, vertically or both.
57
- */
58
- flip?: "both" | "horizontal" | "vertical";
59
- /**
60
- * The icon displayed within the IconButton.
61
- *
62
- * If not specified, `children` is used as the icon value instead.
63
- */
64
- icon?: string;
65
- /**
66
- * Applies the `pressed` CSS class.
67
- */
68
- pressed?: boolean;
69
- /**
70
- * Applies the `selected` CSS class.
71
- */
72
- selected?: boolean;
73
- /**
74
- * The size of the button.
75
- *
76
- * Applies the CSS class which can be customized by
77
- .
78
- */
79
- size?: string;
80
- }
81
- /**
82
- * A ui-styled button without any behavior.
83
- */
84
-
85
- export class IconButtonBase extends React.Component<
86
- Merge<React.HTMLProps<HTMLElement>, IconButtonBaseProps>
87
- > {}
88
-
89
- export interface IconButtonDecoratorProps
90
- extends Merge<ui_ForwardRef_ForwardRefProps, ui_Touchable_TouchableProps> {}
91
- export function IconButtonDecorator<P>(
92
- Component: React.ComponentType<P> | string,
93
- ): React.ComponentType<P & IconButtonDecoratorProps>;
94
-
95
- export interface IconButtonProps
96
- extends Omit<
97
- Merge<IconButtonBaseProps, IconButtonDecoratorProps>,
98
- "componentRef"
99
- > {}
100
- /**
101
- * A minimally styled, but interactive, Button ready for customization by a theme.
102
- *
103
- * Example:
104
- * ```
105
- <IconButton size="small">
106
- plus
107
- </IconButton>
108
- ```
109
- */
110
-
111
- export class IconButton extends React.Component<
112
- Merge<React.HTMLProps<HTMLElement>, IconButtonProps>
113
- > {}
114
-
115
- export default IconButton;