@enact/limestone 1.3.0 → 1.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/ci-branch.yml +21 -0
- package/.github/workflows/ci-pull-request.yml +16 -0
- package/.github/workflows/ci-reusable.yml +73 -0
- package/ActionGuide/ActionGuide.d.ts +5 -4
- package/ActionGuide/ActionGuide.module.css +1 -1
- package/Alert/Alert.d.ts +4 -2
- package/Alert/Alert.js +4 -1
- package/Alert/Alert.module.css +36 -0
- package/BodyText/BodyText.d.ts +5 -4
- package/BodyText/BodyText.module.css +7 -7
- package/Button/Button.d.ts +17 -12
- package/Button/Button.js +1 -1
- package/Button/Button.module.css +195 -268
- package/CHANGELOG.md +220 -0
- package/Card/Card.d.ts +36 -8
- package/Card/Card.js +157 -20
- package/Card/Card.module.css +277 -58
- package/Card/tests/Card-specs.js +30 -0
- package/Checkbox/Checkbox.d.ts +8 -7
- package/Checkbox/Checkbox.js +3 -1
- package/Checkbox/Checkbox.module.css +213 -120
- package/Checkbox/tests/Checkbox-specs.js +1 -1
- package/CheckboxItem/CheckboxItem.d.ts +22 -7
- package/CheckboxItem/CheckboxItem.js +69 -4
- package/Chips/Chip.js +60 -7
- package/Chips/Chip.module.css +3 -3
- package/Chips/Chips.js +26 -12
- package/Chips/Chips.module.css +1 -1
- package/Chips/tests/Chip-specs.js +19 -9
- package/Chips/tests/Chips-specs.js +19 -19
- package/ContextualMenuDecorator/ContextualMenuDecorator.d.ts +4 -5
- package/ContextualPopupDecorator/ContextualPopup.module.css +34 -34
- package/ContextualPopupDecorator/ContextualPopupDecorator.js +557 -549
- package/DatePicker/DatePicker.d.ts +4 -5
- package/DayPicker/DayPicker.d.ts +8 -7
- package/Dropdown/Dropdown.d.ts +11 -13
- package/Dropdown/Dropdown.module.css +9 -9
- package/Dropdown/DropdownList.js +16 -11
- package/FixedPopupPanels/FixedPopupPanels.d.ts +4 -2
- package/FixedPopupPanels/FixedPopupPanels.module.css +18 -18
- package/FlexiblePopupPanels/FlexiblePopupPanels.module.css +23 -23
- package/FormCheckboxItem/FormCheckboxItem.d.ts +5 -4
- package/Heading/Heading.d.ts +8 -7
- package/Heading/Heading.module.css +5 -5
- package/Icon/Icon.d.ts +14 -4
- package/Icon/Icon.js +48 -2
- package/Icon/Icon.module.css +1 -1
- package/Icon/IconList.js +25 -1
- package/IconItem/IconItem.d.ts +13 -12
- package/IconItem/IconItem.js +15 -0
- package/IconItem/IconItem.module.css +107 -1
- package/Image/Image.d.ts +5 -4
- package/ImageItem/ImageItem.d.ts +11 -10
- package/ImageItem/ImageItem.js +37 -31
- package/ImageItem/ImageItem.module.css +30 -30
- package/ImageItem/tests/ImageItem-specs.js +3 -10
- package/Input/Input.js +9 -2
- package/Input/Input.module.css +37 -8
- package/Input/InputField.js +5 -1
- package/Input/InputField.module.css +17 -2
- package/Input/InputFieldSpotlightDecorator.js +213 -229
- package/Input/index.d.ts +15 -18
- package/Input/tests/InputField-specs.js +21 -0
- package/Item/Item.d.ts +16 -9
- package/Item/Item.js +20 -2
- package/Item/Item.module.css +1 -1
- package/KeyGuide/KeyGuide.d.ts +8 -7
- package/KeyGuide/KeyGuide.module.css +25 -1
- package/Marquee/Marquee.d.ts +2 -4
- package/MediaOverlay/MediaOverlay.d.ts +12 -11
- package/MediaOverlay/MediaOverlay.js +43 -21
- package/MediaOverlay/MediaOverlay.module.css +114 -15
- package/MediaPlayer/MediaControls.js +195 -13
- package/MediaPlayer/MediaControls.module.css +3 -2
- package/MediaPlayer/MediaSlider.module.css +7 -20
- package/MediaPlayer/index.d.ts +59 -7
- package/PageViews/PageViews.js +165 -80
- package/PageViews/PageViewsRouter.js +9 -0
- package/PageViews/tests/PageViews-specs.js +84 -0
- package/Panels/Header.js +48 -30
- package/Panels/Header.module.css +83 -31
- package/Panels/Panel.module.css +1 -1
- package/Panels/index.d.ts +7 -8
- package/Picker/Picker.d.ts +4 -5
- package/Picker/Picker.module.css +2 -2
- package/Popup/Popup.js +242 -240
- package/Popup/Popup.module.css +24 -24
- package/PopupTabLayout/PopupTabLayout.d.ts +5 -7
- package/PopupTabLayout/PopupTabLayout.js +15 -9
- package/PopupTabLayout/PopupTabLayout.module.css +53 -16
- package/PopupTabLayout/PopupTabLayoutStateContext.js +8 -0
- package/ProgressBar/ProgressBar.d.ts +5 -4
- package/ProgressBar/ProgressBarTooltip.module.css +12 -12
- package/ProgressButton/ProgressButton.d.ts +4 -5
- package/QuickGuidePanels/QuickGuidePanels.module.css +2 -2
- package/RadioItem/RadioItem.d.ts +18 -5
- package/RadioItem/RadioItem.js +67 -2
- package/RadioItem/RadioItem.module.css +36 -36
- package/RangePicker/RangePicker.module.css +2 -2
- package/Scroller/EditableWrapper.js +11 -4
- package/Scroller/Scroller.d.ts +20 -16
- package/Scroller/Scroller.js +9 -3
- package/Scroller/Scroller.module.css +4 -4
- package/Slider/Slider.d.ts +16 -14
- package/Slider/Slider.js +37 -4
- package/Slider/Slider.module.css +314 -91
- package/Slider/tests/Slider-specs.js +2 -1
- package/Spinner/Spinner.d.ts +5 -4
- package/Spinner/Spinner.module.css +9 -9
- package/Steps/Steps.d.ts +5 -4
- package/Steps/Steps.js +9 -5
- package/Switch/Switch.d.ts +8 -7
- package/Switch/Switch.module.css +100 -13
- package/SwitchItem/SwitchItem.d.ts +9 -6
- package/TabLayout/RefocusDecorator.js +15 -9
- package/TabLayout/TabGroup.js +3 -2
- package/TabLayout/TabGroup.module.css +2 -2
- package/TabLayout/TabLayout.d.ts +6 -0
- package/TabLayout/TabLayout.js +11 -1
- package/TabLayout/TabLayout.module.css +18 -0
- package/TabLayout/tests/TabLayout-specs.js +52 -0
- package/ThemeDecorator/ThemeDecorator.d.ts +9 -10
- package/ThemeDecorator/fontGenerator.js +1 -1
- package/ThemeDecorator/screenTypes.json +1 -0
- package/TimePicker/TimePicker.module.css +1 -1
- package/TooltipDecorator/Tooltip.module.css +1 -2
- package/TooltipDecorator/tests/util-specs.js +12 -0
- package/TooltipDecorator/useTooltip.js +1 -1
- package/TooltipDecorator/util.js +18 -11
- package/VideoPlayer/Feedback.js +3 -0
- package/VideoPlayer/Feedback.module.css +5 -9
- package/VideoPlayer/FeedbackIcons.js +1 -1
- package/VideoPlayer/FeedbackTooltip.module.css +55 -11
- package/VideoPlayer/VideoPlayer.d.ts +44 -18
- package/VideoPlayer/VideoPlayer.js +128 -23
- package/VideoPlayer/VideoPlayer.module.css +28 -11
- package/VirtualList/VirtualList.d.ts +9 -2
- package/VirtualList/VirtualList.js +31 -6
- package/VirtualList/tests/VirtualGridList-translate-specs.js +3 -0
- package/VirtualList/tests/VirtualList-specs.js +28 -1
- package/VirtualList/tests/VirtualList-translate-specs.js +4 -1
- package/WizardPanels/WizardPanels.module.css +2 -2
- package/WizardPanels/index.d.ts +4 -2
- package/fonts/Limestone_Icons.ttf +0 -0
- package/internal/$L/$L.js +3 -3
- package/internal/DateComponentPicker/DateComponentPicker.module.css +2 -2
- package/internal/DateTime/DateTime.module.css +1 -0
- package/internal/Panels/PanelsRouter.js +16 -5
- package/internal/Picker/Picker.module.css +2 -2
- package/internal/SharedStateDecorator/SharedStateDecorator.js +76 -99
- package/internal/validators/validators.js +21 -2
- package/package.json +14 -14
- package/styles/colors-highcontrast.less +9 -1
- package/styles/colors.less +11 -7
- package/styles/motion-mixins.less +66 -0
- package/styles/motions.less +78 -0
- package/styles/variables.less +176 -150
- package/useScroll/HoverToScroll.js +8 -5
- package/useScroll/ScrollbarTrack.module.css +8 -8
- package/useScroll/useEvent.js +7 -1
- package/useScroll/useScroll.js +2 -0
- package/useScroll/useScroll.module.css +6 -6
- package/.travis.yml +0 -40
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "Video", {
|
|
|
12
12
|
exports["default"] = exports.VideoPlayerBase = exports.VideoPlayer = void 0;
|
|
13
13
|
var _ApiDecorator = _interopRequireDefault(require("@enact/core/internal/ApiDecorator"));
|
|
14
14
|
var _dispatcher = require("@enact/core/dispatcher");
|
|
15
|
+
var _deprecate = _interopRequireDefault(require("@enact/core/internal/deprecate"));
|
|
15
16
|
var _util = require("@enact/core/util");
|
|
16
17
|
var _handle = require("@enact/core/handle");
|
|
17
18
|
var _keymap = require("@enact/core/keymap");
|
|
@@ -167,6 +168,10 @@ var forwardJumpBackward = forwardWithState('onJumpBackward');
|
|
|
167
168
|
var forwardWillJumpBackward = forwardWithState('onWillJumpBackward');
|
|
168
169
|
var forwardJumpForward = forwardWithState('onJumpForward');
|
|
169
170
|
var forwardWillJumpForward = forwardWithState('onWillJumpForward');
|
|
171
|
+
var forwardPrevious = forwardWithState('onPrevious');
|
|
172
|
+
var forwardWillPrevious = forwardWithState('onWillPrevious');
|
|
173
|
+
var forwardNext = forwardWithState('onNext');
|
|
174
|
+
var forwardWillNext = forwardWithState('onWillNext');
|
|
170
175
|
var AnnounceState = {
|
|
171
176
|
// Video is loaded but additional announcements have not been made
|
|
172
177
|
READY: 0,
|
|
@@ -179,6 +184,10 @@ var AnnounceState = {
|
|
|
179
184
|
// All announcements have been made
|
|
180
185
|
DONE: 4
|
|
181
186
|
};
|
|
187
|
+
var warnedOnJumpBackward = false;
|
|
188
|
+
var warnedOnJumpForward = false;
|
|
189
|
+
var warnedOnWillJumpBackward = false;
|
|
190
|
+
var warnedOnWillJumpForward = false;
|
|
182
191
|
|
|
183
192
|
/**
|
|
184
193
|
* Every callback sent by {@link limestone/VideoPlayer|VideoPlayer} receives a status package,
|
|
@@ -502,31 +511,31 @@ var VideoPlayerBase = exports.VideoPlayerBase = (_Class = /*#__PURE__*/function
|
|
|
502
511
|
_this.handleControlsHandleAboveHold = function () {
|
|
503
512
|
if (shouldJump(_this.props, _this.state)) {
|
|
504
513
|
_this.handleJump({
|
|
505
|
-
keyCode: _this.
|
|
514
|
+
keyCode: _this.jumpKeyPressed === -1 ? jumpBackKeyCode : jumpForwardKeyCode
|
|
506
515
|
});
|
|
507
516
|
}
|
|
508
517
|
};
|
|
509
518
|
_this.handleControlsHandleAboveKeyDown = function (_ref9) {
|
|
510
519
|
var keyCode = _ref9.keyCode;
|
|
511
520
|
if (isEnter(keyCode)) {
|
|
512
|
-
_this.
|
|
521
|
+
_this.jumpKeyPressed = 0;
|
|
513
522
|
} else if (isLeft(keyCode)) {
|
|
514
|
-
_this.
|
|
523
|
+
_this.jumpKeyPressed = -1;
|
|
515
524
|
} else if (isRight(keyCode)) {
|
|
516
|
-
_this.
|
|
525
|
+
_this.jumpKeyPressed = 1;
|
|
517
526
|
}
|
|
518
527
|
};
|
|
519
528
|
_this.handleControlsHandleAboveKeyUp = function (_ref0) {
|
|
520
529
|
var keyCode = _ref0.keyCode;
|
|
521
530
|
if (isEnter(keyCode) || isLeft(keyCode) || isRight(keyCode)) {
|
|
522
|
-
_this.
|
|
531
|
+
_this.jumpKeyPressed = null;
|
|
523
532
|
}
|
|
524
533
|
};
|
|
525
534
|
_this.handleControlsHandleAboveDown = function () {
|
|
526
|
-
if (_this.
|
|
535
|
+
if (_this.jumpKeyPressed === 0) {
|
|
527
536
|
_this.showControls();
|
|
528
|
-
} else if (_this.
|
|
529
|
-
var keyCode = _this.
|
|
537
|
+
} else if (_this.jumpKeyPressed === -1 || _this.jumpKeyPressed === 1) {
|
|
538
|
+
var keyCode = _this.jumpKeyPressed === -1 ? jumpBackKeyCode : jumpForwardKeyCode;
|
|
530
539
|
if (shouldJump(_this.props, _this.state)) {
|
|
531
540
|
_this.handleJump({
|
|
532
541
|
keyCode: keyCode
|
|
@@ -694,6 +703,14 @@ var VideoPlayerBase = exports.VideoPlayerBase = (_Class = /*#__PURE__*/function
|
|
|
694
703
|
_this.startDelayedMiniFeedbackHide();
|
|
695
704
|
return true;
|
|
696
705
|
};
|
|
706
|
+
_this.next = function () {
|
|
707
|
+
// next api will be implemented in 2.0.0.
|
|
708
|
+
return true;
|
|
709
|
+
};
|
|
710
|
+
_this.previous = function () {
|
|
711
|
+
// previous api will be implemented in 2.0.0.
|
|
712
|
+
return true;
|
|
713
|
+
};
|
|
697
714
|
/**
|
|
698
715
|
* Fast forwards the current media for seeking.
|
|
699
716
|
* This function changes the playback rate.
|
|
@@ -1066,6 +1083,12 @@ var VideoPlayerBase = exports.VideoPlayerBase = (_Class = /*#__PURE__*/function
|
|
|
1066
1083
|
_this.onJumpForward = _this.handle(forwardWillJumpForward, function () {
|
|
1067
1084
|
return _this.jump(_this.props.jumpBy);
|
|
1068
1085
|
}, forwardJumpForward);
|
|
1086
|
+
_this.onNext = _this.props.onWillNext || _this.props.onNext ? _this.handle(forwardWillNext,
|
|
1087
|
+
// () => this.next(),
|
|
1088
|
+
forwardNext) : null;
|
|
1089
|
+
_this.onPrevious = _this.props.onWillPrevious || _this.props.onPrevious ? _this.handle(forwardWillPrevious,
|
|
1090
|
+
// () => this.previous(),
|
|
1091
|
+
forwardPrevious) : null;
|
|
1069
1092
|
_this.handleToggleMore = function (ev) {
|
|
1070
1093
|
var showMoreComponents = ev.showMoreComponents,
|
|
1071
1094
|
liftDistance = ev.liftDistance;
|
|
@@ -1112,7 +1135,7 @@ var VideoPlayerBase = exports.VideoPlayerBase = (_Class = /*#__PURE__*/function
|
|
|
1112
1135
|
_this.selectPlaybackRates('fastForward');
|
|
1113
1136
|
_this.sliderKnobProportion = 0;
|
|
1114
1137
|
_this.mediaControlsSpotlightId = _props.spotlightId + '_mediaControls';
|
|
1115
|
-
_this.
|
|
1138
|
+
_this.jumpKeyPressed = null;
|
|
1116
1139
|
_this.playerRef = /*#__PURE__*/(0, _react.createRef)();
|
|
1117
1140
|
_this.playbackRate = 1;
|
|
1118
1141
|
|
|
@@ -1221,8 +1244,8 @@ var VideoPlayerBase = exports.VideoPlayerBase = (_Class = /*#__PURE__*/function
|
|
|
1221
1244
|
var _current = _spotlight.Spotlight.getCurrent();
|
|
1222
1245
|
if (!_current || this.playerRef.current.contains(_current)) {
|
|
1223
1246
|
// Set focus within media controls when they become visible.
|
|
1224
|
-
if (_spotlight.Spotlight.focus(this.mediaControlsSpotlightId) && this.
|
|
1225
|
-
this.
|
|
1247
|
+
if (_spotlight.Spotlight.focus(this.mediaControlsSpotlightId) && this.jumpKeyPressed === 0) {
|
|
1248
|
+
this.jumpKeyPressed = null;
|
|
1226
1249
|
}
|
|
1227
1250
|
}
|
|
1228
1251
|
}
|
|
@@ -1327,6 +1350,38 @@ var VideoPlayerBase = exports.VideoPlayerBase = (_Class = /*#__PURE__*/function
|
|
|
1327
1350
|
title = _this$props.title,
|
|
1328
1351
|
VideoComponent = _this$props.videoComponent,
|
|
1329
1352
|
mediaProps = _objectWithoutProperties(_this$props, _excluded2);
|
|
1353
|
+
if (!warnedOnJumpBackward && mediaProps.onJumpBackward) {
|
|
1354
|
+
(0, _deprecate["default"])({
|
|
1355
|
+
name: '`onJumpBackward`',
|
|
1356
|
+
until: '2.0.0',
|
|
1357
|
+
message: 'Use `onPrevious` instead'
|
|
1358
|
+
});
|
|
1359
|
+
warnedOnJumpBackward = true;
|
|
1360
|
+
}
|
|
1361
|
+
if (!warnedOnJumpForward && mediaProps.onJumpForward) {
|
|
1362
|
+
(0, _deprecate["default"])({
|
|
1363
|
+
name: '`onJumpForward`',
|
|
1364
|
+
until: '2.0.0',
|
|
1365
|
+
message: 'Use `onNext` instead'
|
|
1366
|
+
});
|
|
1367
|
+
warnedOnJumpForward = true;
|
|
1368
|
+
}
|
|
1369
|
+
if (!warnedOnWillJumpBackward && mediaProps.onWillJumpBackward) {
|
|
1370
|
+
(0, _deprecate["default"])({
|
|
1371
|
+
name: '`onWillJumpBackward`',
|
|
1372
|
+
until: '2.0.0',
|
|
1373
|
+
message: 'Use `onWillPrevious` instead'
|
|
1374
|
+
});
|
|
1375
|
+
warnedOnWillJumpBackward = true;
|
|
1376
|
+
}
|
|
1377
|
+
if (!warnedOnWillJumpForward && mediaProps.onWillJumpForward) {
|
|
1378
|
+
(0, _deprecate["default"])({
|
|
1379
|
+
name: '`onWillJumpForward`',
|
|
1380
|
+
until: '2.0.0',
|
|
1381
|
+
message: 'Use `onWillPrevious` instead'
|
|
1382
|
+
});
|
|
1383
|
+
warnedOnWillJumpForward = true;
|
|
1384
|
+
}
|
|
1330
1385
|
delete mediaProps.announce;
|
|
1331
1386
|
delete mediaProps.autoCloseTimeout;
|
|
1332
1387
|
delete mediaProps.children;
|
|
@@ -1340,14 +1395,18 @@ var VideoPlayerBase = exports.VideoPlayerBase = (_Class = /*#__PURE__*/function
|
|
|
1340
1395
|
delete mediaProps.onFastForward;
|
|
1341
1396
|
delete mediaProps.onJumpBackward;
|
|
1342
1397
|
delete mediaProps.onJumpForward;
|
|
1398
|
+
delete mediaProps.onNext;
|
|
1343
1399
|
delete mediaProps.onPause;
|
|
1344
1400
|
delete mediaProps.onPlay;
|
|
1401
|
+
delete mediaProps.onPrevious;
|
|
1345
1402
|
delete mediaProps.onRewind;
|
|
1346
1403
|
delete mediaProps.onWillFastForward;
|
|
1347
1404
|
delete mediaProps.onWillJumpBackward;
|
|
1348
1405
|
delete mediaProps.onWillJumpForward;
|
|
1406
|
+
delete mediaProps.onWillNext;
|
|
1349
1407
|
delete mediaProps.onWillPause;
|
|
1350
1408
|
delete mediaProps.onWillPlay;
|
|
1409
|
+
delete mediaProps.onWillPrevious;
|
|
1351
1410
|
delete mediaProps.onWillRewind;
|
|
1352
1411
|
delete mediaProps.onScrub;
|
|
1353
1412
|
delete mediaProps.onSeekFailed;
|
|
@@ -1402,19 +1461,20 @@ var VideoPlayerBase = exports.VideoPlayerBase = (_Class = /*#__PURE__*/function
|
|
|
1402
1461
|
className: _VideoPlayerModule["default"].back,
|
|
1403
1462
|
icon: "arrowhookleft",
|
|
1404
1463
|
iconFlip: "auto",
|
|
1405
|
-
onClick: this.handleBack
|
|
1406
|
-
|
|
1464
|
+
onClick: this.handleBack,
|
|
1465
|
+
size: "small"
|
|
1466
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_FeedbackContent["default"], {
|
|
1467
|
+
className: _VideoPlayerModule["default"].miniFeedback,
|
|
1468
|
+
playbackRate: this.pulsedPlaybackRate || this.selectPlaybackRate(this.speedIndex),
|
|
1469
|
+
playbackState: this.pulsedPlaybackState || this.prevCommand,
|
|
1470
|
+
visible: this.state.miniFeedbackVisible && !noMiniFeedback,
|
|
1471
|
+
children: (0, _MediaPlayer.secondsToTime)(this.state.sliderTooltipTime, durFmt, {
|
|
1472
|
+
includeHour: false
|
|
1473
|
+
})
|
|
1474
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(ControlsContainer, {
|
|
1407
1475
|
className: _VideoPlayerModule["default"].bottom + (this.state.mediaControlsVisible ? '' : ' ' + _VideoPlayerModule["default"].hidden) + (this.state.infoVisible ? ' ' + _VideoPlayerModule["default"].lift : ''),
|
|
1408
1476
|
spotlightDisabled: spotlightDisabled || !this.state.mediaControlsVisible,
|
|
1409
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.
|
|
1410
|
-
className: _VideoPlayerModule["default"].miniFeedback,
|
|
1411
|
-
playbackRate: this.pulsedPlaybackRate || this.selectPlaybackRate(this.speedIndex),
|
|
1412
|
-
playbackState: this.pulsedPlaybackState || this.prevCommand,
|
|
1413
|
-
visible: this.state.miniFeedbackVisible && !noMiniFeedback,
|
|
1414
|
-
children: (0, _MediaPlayer.secondsToTime)(this.state.sliderTooltipTime, durFmt, {
|
|
1415
|
-
includeHour: true
|
|
1416
|
-
})
|
|
1417
|
-
}), this.state.mediaSliderVisible ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
1477
|
+
children: [this.state.mediaSliderVisible ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
1418
1478
|
className: _VideoPlayerModule["default"].infoFrame,
|
|
1419
1479
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_MediaTitle["default"], {
|
|
1420
1480
|
id: "".concat(this.id, "_mediaTitle"),
|
|
@@ -1437,6 +1497,7 @@ var VideoPlayerBase = exports.VideoPlayerBase = (_Class = /*#__PURE__*/function
|
|
|
1437
1497
|
formatter: durFmt,
|
|
1438
1498
|
includeHour: includeTimeHour
|
|
1439
1499
|
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_MediaPlayer.MediaSlider, {
|
|
1500
|
+
"aria-valuetext": " ",
|
|
1440
1501
|
backgroundProgress: this.state.proportionLoaded,
|
|
1441
1502
|
disabled: disabled || this.state.sourceUnavailable,
|
|
1442
1503
|
forcePressed: this.state.slider5WayPressed,
|
|
@@ -1477,8 +1538,10 @@ var VideoPlayerBase = exports.VideoPlayerBase = (_Class = /*#__PURE__*/function
|
|
|
1477
1538
|
onFastForward: this.handleFastForward,
|
|
1478
1539
|
onJumpBackwardButtonClick: this.onJumpBackward,
|
|
1479
1540
|
onJumpForwardButtonClick: this.onJumpForward,
|
|
1541
|
+
onNextButtonClick: this.onNext,
|
|
1480
1542
|
onPause: this.handlePause,
|
|
1481
1543
|
onPlay: this.handlePlay,
|
|
1544
|
+
onPreviousButtonClick: this.onPrevious,
|
|
1482
1545
|
onRewind: this.handleRewind,
|
|
1483
1546
|
onToggleMore: this.handleToggleMore,
|
|
1484
1547
|
paused: this.state.paused,
|
|
@@ -1627,8 +1690,10 @@ var VideoPlayerBase = exports.VideoPlayerBase = (_Class = /*#__PURE__*/function
|
|
|
1627
1690
|
* * `onJumpBackwardButtonClick` - Called when the jump backward button is pressed
|
|
1628
1691
|
* * `onJumpForwardButtonClick` - Called when the jump forward button is pressed
|
|
1629
1692
|
* * `onKeyDown` - Called when a key is pressed
|
|
1693
|
+
* * `onNextButtonClick` - Called when the next button is pressed
|
|
1630
1694
|
* * `onPause` - Called when the media is paused via a key event
|
|
1631
1695
|
* * `onPlay` - Called when the media is played via a key event
|
|
1696
|
+
* * `onPreviousButtonClick` - Called when the previous button is pressed
|
|
1632
1697
|
* * `onRewind` - Called when the media is rewound via a key event
|
|
1633
1698
|
* * `onToggleMore` - Called when the more components are hidden or shown
|
|
1634
1699
|
* * `paused` - `true` when the media is paused
|
|
@@ -1748,6 +1813,7 @@ var VideoPlayerBase = exports.VideoPlayerBase = (_Class = /*#__PURE__*/function
|
|
|
1748
1813
|
* Is passed a {@link limestone/VideoPlayer.videoStatus} as the first argument.
|
|
1749
1814
|
*
|
|
1750
1815
|
* @type {Function}
|
|
1816
|
+
* @deprecated Will be removed in 2.0.0. Use `onPrevious` instead.
|
|
1751
1817
|
* @public
|
|
1752
1818
|
*/
|
|
1753
1819
|
onJumpBackward: _propTypes2["default"].func,
|
|
@@ -1757,9 +1823,19 @@ var VideoPlayerBase = exports.VideoPlayerBase = (_Class = /*#__PURE__*/function
|
|
|
1757
1823
|
* Is passed a {@link limestone/VideoPlayer.videoStatus} as the first argument.
|
|
1758
1824
|
*
|
|
1759
1825
|
* @type {Function}
|
|
1826
|
+
* @deprecated Will be removed in 2.0.0. Use `onNext` instead.
|
|
1760
1827
|
* @public
|
|
1761
1828
|
*/
|
|
1762
1829
|
onJumpForward: _propTypes2["default"].func,
|
|
1830
|
+
/**
|
|
1831
|
+
* Called when the user clicks the next button.
|
|
1832
|
+
*
|
|
1833
|
+
* Is passed a {@link limestone/VideoPlayer.videoStatus} as the first argument.
|
|
1834
|
+
*
|
|
1835
|
+
* @type {Function}
|
|
1836
|
+
* @public
|
|
1837
|
+
*/
|
|
1838
|
+
onNext: _propTypes2["default"].func,
|
|
1763
1839
|
/**
|
|
1764
1840
|
* Called when the video has been paused.
|
|
1765
1841
|
*
|
|
@@ -1774,6 +1850,15 @@ var VideoPlayerBase = exports.VideoPlayerBase = (_Class = /*#__PURE__*/function
|
|
|
1774
1850
|
* @public
|
|
1775
1851
|
*/
|
|
1776
1852
|
onPlay: _propTypes2["default"].func,
|
|
1853
|
+
/**
|
|
1854
|
+
* Called when the user clicks the previous button.
|
|
1855
|
+
*
|
|
1856
|
+
* Is passed a {@link limestone/VideoPlayer.videoStatus} as the first argument.
|
|
1857
|
+
*
|
|
1858
|
+
* @type {Function}
|
|
1859
|
+
* @public
|
|
1860
|
+
*/
|
|
1861
|
+
onPrevious: _propTypes2["default"].func,
|
|
1777
1862
|
/**
|
|
1778
1863
|
* Called when the video has been rewound.
|
|
1779
1864
|
*
|
|
@@ -1835,6 +1920,7 @@ var VideoPlayerBase = exports.VideoPlayerBase = (_Class = /*#__PURE__*/function
|
|
|
1835
1920
|
* Is passed a {@link limestone/VideoPlayer.videoStatus} as the first argument.
|
|
1836
1921
|
*
|
|
1837
1922
|
* @type {Function}
|
|
1923
|
+
* @deprecated Will be removed in 2.0.0. Use `onWillPrevious` instead.
|
|
1838
1924
|
* @public
|
|
1839
1925
|
*/
|
|
1840
1926
|
onWillJumpBackward: _propTypes2["default"].func,
|
|
@@ -1844,9 +1930,19 @@ var VideoPlayerBase = exports.VideoPlayerBase = (_Class = /*#__PURE__*/function
|
|
|
1844
1930
|
* Is passed a {@link limestone/VideoPlayer.videoStatus} as the first argument.
|
|
1845
1931
|
*
|
|
1846
1932
|
* @type {Function}
|
|
1933
|
+
* @deprecated Will be removed in 2.0.0. Use `onWillNext` instead.
|
|
1847
1934
|
* @public
|
|
1848
1935
|
*/
|
|
1849
1936
|
onWillJumpForward: _propTypes2["default"].func,
|
|
1937
|
+
/**
|
|
1938
|
+
* Called once before playing the next video in the playlist.
|
|
1939
|
+
*
|
|
1940
|
+
* Is passed a {@link limestone/VideoPlayer.videoStatus} as the first argument.
|
|
1941
|
+
*
|
|
1942
|
+
* @type {Function}
|
|
1943
|
+
* @public
|
|
1944
|
+
*/
|
|
1945
|
+
onWillNext: _propTypes2["default"].func,
|
|
1850
1946
|
/**
|
|
1851
1947
|
* Called once before the video is paused.
|
|
1852
1948
|
*
|
|
@@ -1861,6 +1957,15 @@ var VideoPlayerBase = exports.VideoPlayerBase = (_Class = /*#__PURE__*/function
|
|
|
1861
1957
|
* @public
|
|
1862
1958
|
*/
|
|
1863
1959
|
onWillPlay: _propTypes2["default"].func,
|
|
1960
|
+
/**
|
|
1961
|
+
* Called once before playing the previous video in the playlist.
|
|
1962
|
+
*
|
|
1963
|
+
* Is passed a {@link limestone/VideoPlayer.videoStatus} as the first argument.
|
|
1964
|
+
*
|
|
1965
|
+
* @type {Function}
|
|
1966
|
+
* @public
|
|
1967
|
+
*/
|
|
1968
|
+
onWillPrevious: _propTypes2["default"].func,
|
|
1864
1969
|
/**
|
|
1865
1970
|
* Called once before the video is rewound.
|
|
1866
1971
|
*
|
|
@@ -2105,7 +2210,7 @@ var VideoPlayerBase = exports.VideoPlayerBase = (_Class = /*#__PURE__*/function
|
|
|
2105
2210
|
* @public
|
|
2106
2211
|
*/
|
|
2107
2212
|
var VideoPlayer = exports.VideoPlayer = (0, _ApiDecorator["default"])({
|
|
2108
|
-
api: ['areControlsVisible', 'fastForward', 'getMediaState', 'getVideoNode', 'hideControls', 'jump', 'pause', 'play', 'rewind', 'seek', 'setPlaybackSpeed', 'showControls', 'showFeedback', 'toggleControls']
|
|
2213
|
+
api: ['areControlsVisible', 'fastForward', 'getMediaState', 'getVideoNode', 'hideControls', 'jump', 'next', 'pause', 'play', 'previous', 'rewind', 'seek', 'setPlaybackSpeed', 'showControls', 'showFeedback', 'toggleControls']
|
|
2109
2214
|
}, (0, _I18nDecorator.I18nContextDecorator)({
|
|
2110
2215
|
localeProp: 'locale'
|
|
2111
2216
|
}, (0, _Slottable["default"])({
|
|
@@ -27,34 +27,45 @@
|
|
|
27
27
|
transform-origin: bottom;
|
|
28
28
|
}
|
|
29
29
|
.videoPlayer .fullscreen .miniFeedback {
|
|
30
|
+
position: absolute;
|
|
30
31
|
display: inline-flex;
|
|
31
32
|
align-items: center;
|
|
32
|
-
|
|
33
|
+
justify-content: center;
|
|
34
|
+
font-size: var(--primitive-font-size-66);
|
|
33
35
|
font-weight: var(--primitive-font-weight-regular);
|
|
34
|
-
height:
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
height: 1.75rem;
|
|
37
|
+
padding: var(--primitive-spacing-18) var(--primitive-spacing-60);
|
|
38
|
+
line-height: 1.75rem;
|
|
39
|
+
margin-bottom: var(--primitive-spacing-72);
|
|
40
|
+
z-index: 100;
|
|
41
|
+
top: var(--primitive-spacing-102);
|
|
38
42
|
bottom: auto;
|
|
39
43
|
pointer-events: none;
|
|
44
|
+
left: 5.75rem;
|
|
45
|
+
right: initial;
|
|
46
|
+
}
|
|
47
|
+
:global(.enact-locale-right-to-left) .videoPlayer .fullscreen .miniFeedback {
|
|
48
|
+
left: initial;
|
|
49
|
+
right: 5.75rem;
|
|
40
50
|
}
|
|
41
51
|
.videoPlayer .fullscreen .back {
|
|
52
|
+
margin: 0;
|
|
42
53
|
position: absolute;
|
|
43
54
|
z-index: 100;
|
|
44
|
-
top:
|
|
45
|
-
left:
|
|
55
|
+
top: var(--primitive-spacing-102);
|
|
56
|
+
left: var(--primitive-spacing-132);
|
|
46
57
|
right: initial;
|
|
47
58
|
}
|
|
48
59
|
:global(.enact-locale-right-to-left) .videoPlayer .fullscreen .back {
|
|
49
60
|
left: initial;
|
|
50
|
-
right:
|
|
61
|
+
right: var(--primitive-spacing-132);
|
|
51
62
|
}
|
|
52
63
|
.videoPlayer .fullscreen .bottom {
|
|
53
64
|
position: absolute;
|
|
54
65
|
z-index: 100;
|
|
55
66
|
bottom: 0;
|
|
56
|
-
left:
|
|
57
|
-
right:
|
|
67
|
+
left: var(--primitive-spacing-132);
|
|
68
|
+
right: var(--primitive-spacing-132);
|
|
58
69
|
}
|
|
59
70
|
.videoPlayer .fullscreen .bottom.lift {
|
|
60
71
|
transform: translateY(calc(var(--liftDistance) * -1));
|
|
@@ -73,7 +84,7 @@
|
|
|
73
84
|
.videoPlayer .fullscreen .bottom .infoFrame {
|
|
74
85
|
display: flex;
|
|
75
86
|
padding: var(--primitive-spacing-72) var(--primitive-spacing-48) 0;
|
|
76
|
-
margin-bottom:
|
|
87
|
+
margin-bottom: var(--primitive-spacing-60);
|
|
77
88
|
}
|
|
78
89
|
.videoPlayer .fullscreen .bottom .sliderContainer {
|
|
79
90
|
display: flex;
|
|
@@ -96,6 +107,7 @@
|
|
|
96
107
|
left: 0;
|
|
97
108
|
}
|
|
98
109
|
.videoPlayer:global(.neutral) .fullscreen .miniFeedback {
|
|
110
|
+
background-color: color(from var(--semantic-color-surface-overlay-default) srgb r g b / 0.5);
|
|
99
111
|
color: var(--semantic-color-on-background-main);
|
|
100
112
|
}
|
|
101
113
|
.videoPlayer:global(.neutral) .fullscreen .bottom {
|
|
@@ -105,6 +117,7 @@
|
|
|
105
117
|
background: linear-gradient(180deg, transparent 0%, #000 100%);
|
|
106
118
|
}
|
|
107
119
|
:global(.enact-a11y-high-contrast) .videoPlayer:global(.neutral):global(.highContrast) .fullscreen .miniFeedback {
|
|
120
|
+
background-color: color(from var(--semantic-color-surface-overlay-default) srgb r g b / 0.5);
|
|
108
121
|
color: var(--semantic-color-on-background-main);
|
|
109
122
|
}
|
|
110
123
|
:global(.enact-a11y-high-contrast) .videoPlayer:global(.neutral):global(.highContrast) .fullscreen .bottom {
|
|
@@ -114,6 +127,7 @@
|
|
|
114
127
|
background: linear-gradient(180deg, transparent 0%, #000 100%);
|
|
115
128
|
}
|
|
116
129
|
.videoPlayer:global(.light) .fullscreen .miniFeedback {
|
|
130
|
+
background-color: color(from var(--semantic-color-surface-overlay-default) srgb r g b / 0.5);
|
|
117
131
|
color: var(--semantic-color-on-background-main);
|
|
118
132
|
}
|
|
119
133
|
.videoPlayer:global(.light) .fullscreen .bottom {
|
|
@@ -128,6 +142,7 @@
|
|
|
128
142
|
--semantic-color-on-surface-main-focused: #e6e6e6;
|
|
129
143
|
}
|
|
130
144
|
.videoPlayer:global(.game) .fullscreen .miniFeedback {
|
|
145
|
+
background-color: color(from var(--semantic-color-surface-overlay-default) srgb r g b / 0.5);
|
|
131
146
|
color: var(--semantic-color-on-background-main);
|
|
132
147
|
}
|
|
133
148
|
.videoPlayer:global(.game) .fullscreen .bottom {
|
|
@@ -141,6 +156,7 @@
|
|
|
141
156
|
--semantic-color-surface-default-focused: #3ea07d;
|
|
142
157
|
}
|
|
143
158
|
:global(.green) .videoPlayer:global(.game) .fullscreen .miniFeedback {
|
|
159
|
+
background-color: color(from var(--semantic-color-surface-overlay-default) srgb r g b / 0.5);
|
|
144
160
|
color: var(--semantic-color-on-background-main);
|
|
145
161
|
}
|
|
146
162
|
:global(.green) .videoPlayer:global(.game) .fullscreen .bottom {
|
|
@@ -154,6 +170,7 @@
|
|
|
154
170
|
--semantic-color-surface-default-focused: #b85f23;
|
|
155
171
|
}
|
|
156
172
|
:global(.orange) .videoPlayer:global(.game) .fullscreen .miniFeedback {
|
|
173
|
+
background-color: color(from var(--semantic-color-surface-overlay-default) srgb r g b / 0.5);
|
|
157
174
|
color: var(--semantic-color-on-background-main);
|
|
158
175
|
}
|
|
159
176
|
:global(.orange) .videoPlayer:global(.game) .fullscreen .bottom {
|
|
@@ -50,6 +50,10 @@ this.scrollTo({align: 'top'}); // scroll to the top
|
|
|
50
50
|
```
|
|
51
51
|
*/
|
|
52
52
|
cbScrollTo?: Function;
|
|
53
|
+
/**
|
|
54
|
+
* When this value is `true` , scrolling in a VirtualList with holding a 5-way key continues to outer Scoller.
|
|
55
|
+
*/
|
|
56
|
+
continue5WayHold?: boolean;
|
|
53
57
|
/**
|
|
54
58
|
* Disable voice control feature of component.
|
|
55
59
|
*/
|
|
@@ -201,8 +205,7 @@ export class VirtualList extends React.Component<
|
|
|
201
205
|
Merge<React.HTMLProps<HTMLElement>, VirtualListProps>
|
|
202
206
|
> {}
|
|
203
207
|
|
|
204
|
-
export interface VirtualGridListProps
|
|
205
|
-
extends ui_VirtualList_VirtualListBasicProps {
|
|
208
|
+
export interface VirtualGridListProps extends ui_VirtualList_VirtualListBasicProps {
|
|
206
209
|
/**
|
|
207
210
|
* Size of an item for the VirtualGridList; valid value is an object that has `minWidth`
|
|
208
211
|
and `minHeight` as properties.
|
|
@@ -247,6 +250,10 @@ this.scrollTo({align: 'top'}); // scroll to the top
|
|
|
247
250
|
```
|
|
248
251
|
*/
|
|
249
252
|
cbScrollTo?: Function;
|
|
253
|
+
/**
|
|
254
|
+
* When this value is `true` , scrolling in a VirtualGridList with holding a 5-way key continues to outer Scroller.
|
|
255
|
+
*/
|
|
256
|
+
continue5WayHold?: boolean;
|
|
250
257
|
/**
|
|
251
258
|
* Disable voice control feature of component.
|
|
252
259
|
*/
|
|
@@ -6,12 +6,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = exports.VirtualList = exports.VirtualGridList = void 0;
|
|
7
7
|
var _util = require("@enact/core/util");
|
|
8
8
|
var _I18nDecorator = require("@enact/i18n/I18nDecorator");
|
|
9
|
+
var _spotlight = _interopRequireDefault(require("@enact/spotlight"));
|
|
9
10
|
var _SpotlightContainerDecorator = _interopRequireDefault(require("@enact/spotlight/SpotlightContainerDecorator"));
|
|
10
11
|
var _Resizable = require("@enact/ui/Resizable");
|
|
11
12
|
var _VirtualList = require("@enact/ui/VirtualList");
|
|
12
13
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
14
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
|
-
var
|
|
15
|
+
var _validators = require("../internal/validators");
|
|
15
16
|
var _useScroll3 = _interopRequireDefault(require("../useScroll"));
|
|
16
17
|
var _HoverToScroll = _interopRequireDefault(require("../useScroll/HoverToScroll"));
|
|
17
18
|
var _Scrollbar = _interopRequireDefault(require("../useScroll/Scrollbar"));
|
|
@@ -19,9 +20,9 @@ var _Skinnable = _interopRequireDefault(require("../Skinnable"));
|
|
|
19
20
|
var _useThemeVirtualList = require("./useThemeVirtualList");
|
|
20
21
|
var _VirtualListModule = _interopRequireDefault(require("./VirtualList.module.css"));
|
|
21
22
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
|
-
var _excluded = ["itemSize", "hoverToScroll"],
|
|
23
|
+
var _excluded = ["continue5WayHold", "itemSize", "hoverToScroll"],
|
|
23
24
|
_excluded2 = ["className"],
|
|
24
|
-
_excluded3 = ["hoverToScroll"],
|
|
25
|
+
_excluded3 = ["continue5WayHold", "hoverToScroll"],
|
|
25
26
|
_excluded4 = ["className"];
|
|
26
27
|
/**
|
|
27
28
|
* Provides Limestone-themed virtual list components and behaviors.
|
|
@@ -42,6 +43,7 @@ var nop = function nop() {};
|
|
|
42
43
|
var virtualListDefaultProps = {
|
|
43
44
|
'data-spotlight-container-disabled': false,
|
|
44
45
|
cbScrollTo: nop,
|
|
46
|
+
continue5WayHold: false,
|
|
45
47
|
direction: 'vertical',
|
|
46
48
|
horizontalScrollbar: 'auto',
|
|
47
49
|
noAffordance: false,
|
|
@@ -84,16 +86,20 @@ var VirtualList = exports.VirtualList = function VirtualList(props) {
|
|
|
84
86
|
wheel: false
|
|
85
87
|
};
|
|
86
88
|
}
|
|
87
|
-
var
|
|
89
|
+
var continue5WayHold = virtualListProps.continue5WayHold,
|
|
90
|
+
itemSize = virtualListProps.itemSize,
|
|
88
91
|
hoverToScroll = virtualListProps.hoverToScroll,
|
|
89
92
|
rest = _objectWithoutProperties(virtualListProps, _excluded);
|
|
93
|
+
_spotlight["default"].set(props.id, {
|
|
94
|
+
continue5WayHold: continue5WayHold
|
|
95
|
+
});
|
|
90
96
|
var itemSizeProps = itemSize && itemSize.minSize ? {
|
|
91
97
|
itemSize: itemSize.minSize,
|
|
92
98
|
itemSizes: itemSize.size
|
|
93
99
|
} : {
|
|
94
100
|
itemSize: itemSize
|
|
95
101
|
};
|
|
96
|
-
process.env.NODE_ENV !== "production" ? (0,
|
|
102
|
+
process.env.NODE_ENV !== "production" ? (0, _validators.warning)(itemSizeProps.itemSizes && rest.cbScrollTo !== nop, 'VirtualList with `minSize` in `itemSize` prop does not support `cbScrollTo` prop') : void 0;
|
|
97
103
|
|
|
98
104
|
// Hooks
|
|
99
105
|
|
|
@@ -175,6 +181,13 @@ VirtualList.propTypes = /** @lends limestone/VirtualList.VirtualList.prototype *
|
|
|
175
181
|
* @public
|
|
176
182
|
*/
|
|
177
183
|
cbScrollTo: _propTypes["default"].func,
|
|
184
|
+
/**
|
|
185
|
+
* When this value is `true`, scrolling in a VirtualList with holding a 5-way key continues to outer Scoller.
|
|
186
|
+
*
|
|
187
|
+
* @type {Boolean}
|
|
188
|
+
* @public
|
|
189
|
+
*/
|
|
190
|
+
continue5WayHold: _propTypes["default"].bool,
|
|
178
191
|
/**
|
|
179
192
|
* This is set to `true` by SpotlightContainerDecorator
|
|
180
193
|
*
|
|
@@ -491,6 +504,7 @@ VirtualList.defaultPropValues = virtualListDefaultProps;
|
|
|
491
504
|
var virtualGridListDefaultProps = {
|
|
492
505
|
'data-spotlight-container-disabled': false,
|
|
493
506
|
cbScrollTo: nop,
|
|
507
|
+
continue5WayHold: false,
|
|
494
508
|
direction: 'vertical',
|
|
495
509
|
horizontalScrollbar: 'auto',
|
|
496
510
|
noAffordance: false,
|
|
@@ -533,8 +547,12 @@ var VirtualGridList = exports.VirtualGridList = function VirtualGridList(props)
|
|
|
533
547
|
wheel: false
|
|
534
548
|
};
|
|
535
549
|
}
|
|
536
|
-
var
|
|
550
|
+
var continue5WayHold = virtualGridListProps.continue5WayHold,
|
|
551
|
+
hoverToScroll = virtualGridListProps.hoverToScroll,
|
|
537
552
|
rest = _objectWithoutProperties(virtualGridListProps, _excluded3);
|
|
553
|
+
_spotlight["default"].set(props.id, {
|
|
554
|
+
continue5WayHold: continue5WayHold
|
|
555
|
+
});
|
|
538
556
|
var _useScroll2 = (0, _useScroll3["default"])(rest),
|
|
539
557
|
ScrollContentWrapper = _useScroll2.scrollContentWrapper,
|
|
540
558
|
scrollContentHandle = _useScroll2.scrollContentHandle,
|
|
@@ -612,6 +630,13 @@ VirtualGridList.propTypes = /** @lends limestone/VirtualList.VirtualGridList.pro
|
|
|
612
630
|
* @public
|
|
613
631
|
*/
|
|
614
632
|
cbScrollTo: _propTypes["default"].func,
|
|
633
|
+
/**
|
|
634
|
+
* When this value is `true`, scrolling in a VirtualGridList with holding a 5-way key continues to outer Scroller.
|
|
635
|
+
*
|
|
636
|
+
* @type {Boolean}
|
|
637
|
+
* @public
|
|
638
|
+
*/
|
|
639
|
+
continue5WayHold: _propTypes["default"].bool,
|
|
615
640
|
/**
|
|
616
641
|
* This is set to `true` by SpotlightContainerDecorator
|
|
617
642
|
*
|
|
@@ -530,6 +530,9 @@ describe('VirtualGridList with translate \'scrollMode\'', function () {
|
|
|
530
530
|
expect(startScrollTop).toBe(0);
|
|
531
531
|
expect(onScrollStartCount).toBe(1);
|
|
532
532
|
expect(resultScrollTop).toBe(0);
|
|
533
|
+
(0, _react.act)(function () {
|
|
534
|
+
return jest.advanceTimersByTime(200);
|
|
535
|
+
});
|
|
533
536
|
var listRoot = _react.screen.getByRole('list').parentElement;
|
|
534
537
|
expect(listRoot).toHaveStyle({
|
|
535
538
|
'--scroll-overscroll-translate-vertical': 'translateY(0px)'
|
|
@@ -162,7 +162,7 @@ describe('VirtualList', function () {
|
|
|
162
162
|
});
|
|
163
163
|
describe('ScrollTo', function () {
|
|
164
164
|
test('should warn if both \'minSize\' in \'itemSize\' prop and \'cbScrollTo\' prop are given', function () {
|
|
165
|
-
var consoleSpy = jest.spyOn(console, '
|
|
165
|
+
var consoleSpy = jest.spyOn(console, 'warn').mockImplementation(function () {});
|
|
166
166
|
var variableItemSize = {
|
|
167
167
|
minSize: itemSize,
|
|
168
168
|
size: [100, 200, 300, 400, 100, 200, 300, 400, 100, 200]
|
|
@@ -179,6 +179,33 @@ describe('VirtualList', function () {
|
|
|
179
179
|
expect(consoleSpy).toHaveBeenCalled();
|
|
180
180
|
expect(consoleSpy.mock.calls[0][0]).toBe(expectedErrorMsg);
|
|
181
181
|
});
|
|
182
|
+
test('should not warn if \'minSize\' in \'itemSize\' prop is given without \'cbScrollTo\' prop', function () {
|
|
183
|
+
var consoleSpy = jest.spyOn(console, 'warn').mockImplementation(function () {});
|
|
184
|
+
var variableItemSize = {
|
|
185
|
+
minSize: itemSize,
|
|
186
|
+
size: [100, 200, 300, 400, 100, 200, 300, 400, 100, 200]
|
|
187
|
+
};
|
|
188
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_VirtualList["default"], {
|
|
189
|
+
clientSize: clientSize,
|
|
190
|
+
dataSize: 10,
|
|
191
|
+
itemRenderer: renderItem,
|
|
192
|
+
itemSize: variableItemSize,
|
|
193
|
+
scrollMode: "translate"
|
|
194
|
+
}));
|
|
195
|
+
expect(consoleSpy).not.toHaveBeenCalled();
|
|
196
|
+
});
|
|
197
|
+
test('should not warn if \'cbScrollTo\' prop is given without \'minSize\' in \'itemSize\' prop', function () {
|
|
198
|
+
var consoleSpy = jest.spyOn(console, 'warn').mockImplementation(function () {});
|
|
199
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_VirtualList["default"], {
|
|
200
|
+
cbScrollTo: function cbScrollTo() {},
|
|
201
|
+
clientSize: clientSize,
|
|
202
|
+
dataSize: 10,
|
|
203
|
+
itemRenderer: renderItem,
|
|
204
|
+
itemSize: itemSize,
|
|
205
|
+
scrollMode: "translate"
|
|
206
|
+
}));
|
|
207
|
+
expect(consoleSpy).not.toHaveBeenCalled();
|
|
208
|
+
});
|
|
182
209
|
});
|
|
183
210
|
describe('Adding an item', function () {
|
|
184
211
|
test('should render an added item named \'Password 0\' as the first item', function (done) {
|
|
@@ -397,7 +397,7 @@ describe('VirtualList with translate \'scrollMode\'', function () {
|
|
|
397
397
|
});
|
|
398
398
|
});
|
|
399
399
|
test('should warn if both \'minSize\' in \'itemSize\' prop and \'cbScrollTo\' prop are given', function () {
|
|
400
|
-
var consoleSpy = jest.spyOn(console, '
|
|
400
|
+
var consoleSpy = jest.spyOn(console, 'warn').mockImplementation(function () {});
|
|
401
401
|
var variableItemSize = {
|
|
402
402
|
minSize: itemSize,
|
|
403
403
|
size: [100, 200, 300, 400, 100, 200, 300, 400, 100, 200]
|
|
@@ -523,6 +523,9 @@ describe('VirtualList with translate \'scrollMode\'', function () {
|
|
|
523
523
|
expect(startScrollTop).toBe(0);
|
|
524
524
|
expect(onScrollStartCount).toBe(1);
|
|
525
525
|
expect(resultScrollTop).toBe(0);
|
|
526
|
+
(0, _react.act)(function () {
|
|
527
|
+
return jest.advanceTimersByTime(200);
|
|
528
|
+
});
|
|
526
529
|
var listRoot = _react.screen.getByRole('list').parentElement;
|
|
527
530
|
expect(listRoot).toHaveStyle({
|
|
528
531
|
'--scroll-overscroll-translate-vertical': 'translateY(0px)'
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
.wizardPanels .steps {
|
|
5
5
|
height: 1.25rem;
|
|
6
6
|
line-height: 1.25rem;
|
|
7
|
-
margin-top: calc(
|
|
7
|
+
margin-top: calc(var(--primitive-spacing-84) * -1);
|
|
8
8
|
}
|
|
9
9
|
.wizardPanels .content {
|
|
10
|
-
margin: var(--primitive-spacing-60)
|
|
10
|
+
margin: var(--primitive-spacing-60) NaNrem - NaNrem - var(--primitive-spacing-36)));
|
|
11
11
|
}
|
|
12
12
|
.wizardPanels .footer {
|
|
13
13
|
text-align: center;
|