@enact/ui 5.0.0-alpha.4 → 5.0.0-alpha.5

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 (58) hide show
  1. package/AnnounceDecorator/AnnounceDecorator.js +2 -2
  2. package/BodyText/BodyText.js +2 -2
  3. package/Button/Button.js +2 -2
  4. package/CHANGELOG.md +10 -0
  5. package/Cancelable/tests/Cancelable-specs.js +2 -2
  6. package/Card/Card.d.ts +77 -0
  7. package/Card/Card.js +215 -0
  8. package/Card/Card.module.css +31 -0
  9. package/Card/package.json +3 -0
  10. package/Card/tests/Card-specs.js +90 -0
  11. package/ComponentOverride/ComponentOverride.js +2 -2
  12. package/FloatingLayer/FloatingLayer.js +2 -2
  13. package/FloatingLayer/FloatingLayerDecorator.js +2 -2
  14. package/FloatingLayer/Scrim.js +2 -2
  15. package/Group/Group.js +2 -2
  16. package/Group/GroupItem.js +2 -2
  17. package/Heading/Heading.js +2 -2
  18. package/Icon/Icon.js +3 -2
  19. package/Image/Image.js +2 -2
  20. package/ImageItem/ImageItem.js +2 -2
  21. package/Item/Item.js +2 -2
  22. package/LabeledIcon/LabeledIcon.js +2 -2
  23. package/Layout/Cell.js +2 -2
  24. package/Layout/Layout.js +2 -2
  25. package/Marquee/MarqueeBase.js +2 -2
  26. package/Marquee/MarqueeDecorator.js +2 -2
  27. package/Media/Media.js +2 -2
  28. package/ProgressBar/ProgressBar.js +2 -2
  29. package/Repeater/Repeater.js +2 -2
  30. package/Routable/Link.js +2 -2
  31. package/Routable/Routable.js +2 -2
  32. package/Routable/Router.js +2 -2
  33. package/Scroller/ScrollerBasic.js +2 -2
  34. package/Skinnable/Skinnable.js +2 -2
  35. package/Slider/Knob.js +2 -2
  36. package/Slider/Slider.js +2 -2
  37. package/Slottable/useSlots.js +2 -2
  38. package/Spinner/Spinner.js +2 -2
  39. package/ToggleIcon/ToggleIcon.js +2 -2
  40. package/Toggleable/Toggleable.js +2 -2
  41. package/Toggleable/useToggle.js +2 -2
  42. package/Touchable/Touchable.js +2 -2
  43. package/Touchable/tests/Touchable-specs.js +2 -2
  44. package/Touchable/tests/useTouch-specs.js +2 -2
  45. package/Transition/Transition.js +2 -2
  46. package/ViewManager/ViewManager.js +2 -2
  47. package/VirtualList/VirtualListBasic.js +2 -2
  48. package/VirtualList/tests/VirtualGridList-native-specs.js +2 -2
  49. package/VirtualList/tests/VirtualGridList-specs.js +2 -2
  50. package/VirtualList/tests/VirtualList-native-specs.js +2 -2
  51. package/VirtualList/tests/VirtualList-specs.js +2 -2
  52. package/package.json +4 -4
  53. package/resolution/index.d.ts +5 -1
  54. package/resolution/resolution.js +5 -1
  55. package/resolution/tests/resolution-specs.js +46 -19
  56. package/useScroll/Scrollbar.js +2 -2
  57. package/useScroll/ScrollbarTrack.js +2 -2
  58. package/useScroll/useScroll.js +2 -2
@@ -20,6 +20,12 @@ describe('Resolution Specs', function () {
20
20
  width: 1280,
21
21
  height: 720,
22
22
  aspectRatioName: 'hdtv'
23
+ }, {
24
+ name: 'uw-hd',
25
+ pxPerRem: 16,
26
+ width: 1920,
27
+ height: 804,
28
+ aspectRatioName: 'cinema'
23
29
  }, {
24
30
  name: 'fhd',
25
31
  pxPerRem: 24,
@@ -70,6 +76,10 @@ describe('Resolution Specs', function () {
70
76
  width: 1280,
71
77
  height: 720
72
78
  };
79
+ var UWHD = {
80
+ width: 1920,
81
+ height: 804
82
+ };
73
83
  var FHD = {
74
84
  width: 1920,
75
85
  height: 1080
@@ -100,6 +110,7 @@ describe('Resolution Specs', function () {
100
110
  expect((0, _resolution.getScreenType)(VGA)).toBe('vga');
101
111
  expect((0, _resolution.getScreenType)(XGA)).toBe('xga');
102
112
  expect((0, _resolution.getScreenType)(HD)).toBe('hd');
113
+ expect((0, _resolution.getScreenType)(UWHD)).toBe('uw-hd');
103
114
  expect((0, _resolution.getScreenType)(FHD)).toBe('fhd');
104
115
  expect((0, _resolution.getScreenType)(UWUXGA)).toBe('uw-uxga');
105
116
  expect((0, _resolution.getScreenType)(QHD)).toBe('qhd');
@@ -209,22 +220,28 @@ describe('Resolution Specs', function () {
209
220
  width: FHD.width - 1,
210
221
  height: FHD.height - 1
211
222
  })).toBe('hd');
212
- expect((0, _resolution.getScreenType)({
213
- width: FHD.width + 1,
214
- height: FHD.height - 1
215
- })).toBe('hd');
216
223
  expect((0, _resolution.getScreenType)({
217
224
  width: FHD.width - 1,
218
225
  height: FHD.height + 1
219
226
  })).toBe('hd');
227
+
228
+ // UWHD
229
+ expect((0, _resolution.getScreenType)({
230
+ width: UWHD.width + 1,
231
+ height: UWHD.height + 1
232
+ })).toBe('uw-hd');
233
+ expect((0, _resolution.getScreenType)({
234
+ width: FHD.width + 1,
235
+ height: FHD.height - 1
236
+ })).toBe('uw-hd');
220
237
  expect((0, _resolution.getScreenType)({
221
238
  width: UWUXGA.width - 1,
222
239
  height: UWUXGA.height - 1
223
- })).toBe('hd'); // {height: FHD.height - 1, width: UWUXGA.width - 1}
240
+ })).toBe('uw-hd');
224
241
  expect((0, _resolution.getScreenType)({
225
242
  width: UWUXGA.width + 1,
226
243
  height: UWUXGA.height - 1
227
- })).toBe('hd'); // {height: FHD.height - 1, width: UWUXGA.width + 1}
244
+ })).toBe('uw-hd');
228
245
 
229
246
  // FHD
230
247
  expect((0, _resolution.getScreenType)({
@@ -368,55 +385,65 @@ describe('Resolution Specs', function () {
368
385
  height: HD.height - 1
369
386
  })).toBe('hd');
370
387
 
371
- // FHD
388
+ // UWHD
389
+ expect((0, _resolution.getScreenType)({
390
+ width: UWHD.width - 1,
391
+ height: UWHD.height - 1
392
+ })).toBe('uw-hd');
372
393
  expect((0, _resolution.getScreenType)({
373
394
  width: XGA.width + 1,
374
395
  height: XGA.height - 1
375
- })).toBe('fhd');
396
+ })).toBe('uw-hd');
376
397
  expect((0, _resolution.getScreenType)({
377
398
  width: XGA.width - 1,
378
399
  height: XGA.height + 1
379
- })).toBe('fhd');
400
+ })).toBe('uw-hd');
380
401
  expect((0, _resolution.getScreenType)({
381
402
  width: XGA.width + 1,
382
403
  height: XGA.height + 1
383
- })).toBe('fhd');
404
+ })).toBe('uw-hd');
384
405
  expect((0, _resolution.getScreenType)({
385
406
  width: HD.width,
386
407
  height: XGA.height
387
- })).toBe('fhd');
408
+ })).toBe('uw-hd');
388
409
  expect((0, _resolution.getScreenType)({
389
410
  width: HD.width - 1,
390
411
  height: XGA.height - 1
391
- })).toBe('fhd');
412
+ })).toBe('uw-hd');
392
413
  expect((0, _resolution.getScreenType)({
393
414
  width: HD.width + 1,
394
415
  height: XGA.height - 1
395
- })).toBe('fhd');
416
+ })).toBe('uw-hd');
396
417
  expect((0, _resolution.getScreenType)({
397
418
  width: HD.width - 1,
398
419
  height: XGA.height + 1
399
- })).toBe('fhd');
420
+ })).toBe('uw-hd');
400
421
  expect((0, _resolution.getScreenType)({
401
422
  width: HD.width + 1,
402
423
  height: XGA.height + 1
403
- })).toBe('fhd');
424
+ })).toBe('uw-hd');
404
425
  expect((0, _resolution.getScreenType)({
405
426
  width: XGA.width + 1,
406
427
  height: HD.height + 1
407
- })).toBe('fhd');
428
+ })).toBe('uw-hd');
408
429
  expect((0, _resolution.getScreenType)({
409
430
  width: HD.width + 1,
410
431
  height: HD.height - 1
411
- })).toBe('fhd');
432
+ })).toBe('uw-hd');
412
433
  expect((0, _resolution.getScreenType)({
413
434
  width: HD.width - 1,
414
435
  height: HD.height + 1
415
- })).toBe('fhd');
436
+ })).toBe('uw-hd');
416
437
  expect((0, _resolution.getScreenType)({
417
438
  width: HD.width + 1,
418
439
  height: HD.height + 1
419
- })).toBe('fhd');
440
+ })).toBe('uw-hd');
441
+ expect((0, _resolution.getScreenType)({
442
+ width: HD.width + 1,
443
+ height: UWHD.height - 1
444
+ })).toBe('uw-hd');
445
+
446
+ // FHD
420
447
  expect((0, _resolution.getScreenType)({
421
448
  width: FHD.width - 1,
422
449
  height: FHD.height - 1
@@ -27,8 +27,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
27
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
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(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; }
30
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(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 (-1 !== e.indexOf(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) {
@@ -24,8 +24,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
24
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
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(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; }
27
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(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 (-1 !== e.indexOf(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,
@@ -48,8 +48,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
48
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
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(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; }
51
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(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 (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
53
53
  var constants = exports.constants = {
54
54
  animationDuration: 1000,
55
55
  epsilon: 1,