@enact/limestone 1.3.0 → 1.9.4
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 +226 -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/VirtualList/tests/useEvent-specs.js +39 -0
- package/VirtualList/useEvent.js +45 -10
- package/VirtualList/useThemeVirtualList.js +3 -0
- 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
|
@@ -8,6 +8,7 @@ var _dispatcher = require("@enact/core/dispatcher");
|
|
|
8
8
|
var _handle = require("@enact/core/handle");
|
|
9
9
|
var _kind = _interopRequireDefault(require("@enact/core/kind"));
|
|
10
10
|
var _hoc = _interopRequireDefault(require("@enact/core/hoc"));
|
|
11
|
+
var _deprecate = _interopRequireDefault(require("@enact/core/internal/deprecate"));
|
|
11
12
|
var _keymap = require("@enact/core/keymap");
|
|
12
13
|
var _util = require("@enact/core/util");
|
|
13
14
|
var _ApiDecorator = _interopRequireDefault(require("@enact/core/internal/ApiDecorator"));
|
|
@@ -28,7 +29,7 @@ var _util3 = require("./util");
|
|
|
28
29
|
var _MediaControlsModule = _interopRequireDefault(require("./MediaControls.module.css"));
|
|
29
30
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
30
31
|
var _excluded = ["mediaControlsRef"],
|
|
31
|
-
_excluded2 = ["actionGuideAriaLabel", "actionGuideButtonAriaLabel", "actionGuideDisabled", "actionGuideLabel", "actionGuideShowing", "children", "id", "jumpBackwardAriaLabel", "jumpBackwardIcon", "jumpButtonsDisabled", "jumpForwardAriaLabel", "jumpForwardIcon", "bottomComponents", "mediaControlsRef", "mediaDisabled", "moreComponentsSpotlightId", "noJumpButtons", "onActionGuideClick", "onJumpBackwardButtonClick", "onJumpForwardButtonClick", "onKeyDownFromMediaButtons", "onPlayButtonClick", "paused", "pauseIcon", "playIcon", "playPauseButtonDisabled", "showMoreComponents", "moreComponentsRendered", "moreButtonsClassName", "moreComponentsClassName", "actionGuideClassName", "spotlightDisabled", "spotlightId"];
|
|
32
|
+
_excluded2 = ["actionGuideAriaLabel", "actionGuideButtonAriaLabel", "actionGuideDisabled", "actionGuideLabel", "actionGuideShowing", "children", "id", "jumpBackwardAriaLabel", "jumpBackwardIcon", "jumpButtonsDisabled", "jumpForwardAriaLabel", "jumpForwardIcon", "bottomComponents", "mediaControlsRef", "mediaDisabled", "moreComponentsSpotlightId", "nextAriaLabel", "nextButtonDisabled", "nextIcon", "noJumpButtons", "noNextButton", "noPreviousButton", "onActionGuideClick", "onJumpBackwardButtonClick", "onJumpForwardButtonClick", "onKeyDownFromMediaButtons", "onNextButtonClick", "onPlayButtonClick", "onPreviousButtonClick", "paused", "pauseIcon", "playIcon", "playPauseButtonDisabled", "previousAriaLabel", "previousButtonDisabled", "previousIcon", "showMoreComponents", "moreComponentsRendered", "moreButtonsClassName", "moreComponentsClassName", "actionGuideClassName", "spotlightDisabled", "spotlightId"];
|
|
32
33
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
33
34
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
34
35
|
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); } }
|
|
@@ -76,6 +77,14 @@ var Container = (0, _SpotlightContainerDecorator.SpotlightContainerDecorator)({
|
|
|
76
77
|
var MediaButton = (0, _util2.onlyUpdateForProps)(_Button["default"], ['children', 'className', 'disabled', 'icon', 'onClick', 'spotlightDisabled']);
|
|
77
78
|
var forwardToggleMore = (0, _handle.forward)('onToggleMore');
|
|
78
79
|
var animationDuration = 300;
|
|
80
|
+
var warnedJumpBackwardAriaLabel = false;
|
|
81
|
+
var warnedJumpBackwardIcon = false;
|
|
82
|
+
var warnedJumpButtonsDisabled = false;
|
|
83
|
+
var warnedJumpForwardAriaLabel = false;
|
|
84
|
+
var warnedJumpForwardIcon = false;
|
|
85
|
+
var warnedNoJumpButtons = false;
|
|
86
|
+
var warnedOnJumpBackwardButtonClick = false;
|
|
87
|
+
var warnedOnJumpForwardButtonClick = false;
|
|
79
88
|
|
|
80
89
|
/**
|
|
81
90
|
* A set of components for controlling media playback and rendering additional components.
|
|
@@ -102,6 +111,9 @@ var MediaControlsBase = exports.MediaControlsBase = (0, _kind["default"])({
|
|
|
102
111
|
/**
|
|
103
112
|
* The `aria-label` for the action guide.
|
|
104
113
|
*
|
|
114
|
+
* When the media has been loaded first, this aria-label is read after media title.
|
|
115
|
+
* You can use this aria-label to guide the user to find the action guide button for more controls.
|
|
116
|
+
*
|
|
105
117
|
* @type {String}
|
|
106
118
|
* @public
|
|
107
119
|
*/
|
|
@@ -109,6 +121,8 @@ var MediaControlsBase = exports.MediaControlsBase = (0, _kind["default"])({
|
|
|
109
121
|
/**
|
|
110
122
|
* The `aria-label` for the action guide button.
|
|
111
123
|
*
|
|
124
|
+
* This aria-label is read when the action guide button is focused.
|
|
125
|
+
*
|
|
112
126
|
* @type {String}
|
|
113
127
|
* @public
|
|
114
128
|
*/
|
|
@@ -138,6 +152,7 @@ var MediaControlsBase = exports.MediaControlsBase = (0, _kind["default"])({
|
|
|
138
152
|
* The `aria-label` for the jumpBackward button.
|
|
139
153
|
*
|
|
140
154
|
* @type {String}
|
|
155
|
+
* @deprecated Will be removed in 2.0.0. Use `previousAriaLabel` instead.
|
|
141
156
|
* @public
|
|
142
157
|
*/
|
|
143
158
|
jumpBackwardAriaLabel: _propTypes2["default"].string,
|
|
@@ -147,6 +162,7 @@ var MediaControlsBase = exports.MediaControlsBase = (0, _kind["default"])({
|
|
|
147
162
|
*
|
|
148
163
|
* @type {String}
|
|
149
164
|
* @default 'jumpbackward'
|
|
165
|
+
* @deprecated Will be removed in 2.0.0. Use `previousIcon` instead.
|
|
150
166
|
* @public
|
|
151
167
|
*/
|
|
152
168
|
jumpBackwardIcon: _propTypes2["default"].string,
|
|
@@ -154,6 +170,7 @@ var MediaControlsBase = exports.MediaControlsBase = (0, _kind["default"])({
|
|
|
154
170
|
* Disables state on the media "jump" buttons; the outer pair.
|
|
155
171
|
*
|
|
156
172
|
* @type {Boolean}
|
|
173
|
+
* @deprecated Will be removed in 2.0.0. Use `previousButtonDisabled` and `nextButtonDisabled` instead.
|
|
157
174
|
* @public
|
|
158
175
|
*/
|
|
159
176
|
jumpButtonsDisabled: _propTypes2["default"].bool,
|
|
@@ -161,6 +178,7 @@ var MediaControlsBase = exports.MediaControlsBase = (0, _kind["default"])({
|
|
|
161
178
|
* The `aria-label` for the jumpForward button.
|
|
162
179
|
*
|
|
163
180
|
* @type {String}
|
|
181
|
+
* @deprecated Will be removed in 2.0.0. Use `nextAriaLabel` instead.
|
|
164
182
|
* @public
|
|
165
183
|
*/
|
|
166
184
|
jumpForwardAriaLabel: _propTypes2["default"].string,
|
|
@@ -170,6 +188,7 @@ var MediaControlsBase = exports.MediaControlsBase = (0, _kind["default"])({
|
|
|
170
188
|
*
|
|
171
189
|
* @type {String}
|
|
172
190
|
* @default 'jumpforward'
|
|
191
|
+
* @deprecated Will be removed in 2.0.0. Use `nextIcon` instead.
|
|
173
192
|
* @public
|
|
174
193
|
*/
|
|
175
194
|
jumpForwardIcon: _propTypes2["default"].string,
|
|
@@ -202,13 +221,51 @@ var MediaControlsBase = exports.MediaControlsBase = (0, _kind["default"])({
|
|
|
202
221
|
* @default 'moreComponents'
|
|
203
222
|
*/
|
|
204
223
|
moreComponentsSpotlightId: _propTypes2["default"].string,
|
|
224
|
+
/**
|
|
225
|
+
* The `aria-label` for the next button.
|
|
226
|
+
*
|
|
227
|
+
* @type {String}
|
|
228
|
+
* @public
|
|
229
|
+
*/
|
|
230
|
+
nextAriaLabel: _propTypes2["default"].string,
|
|
231
|
+
/**
|
|
232
|
+
* Disables the next button.
|
|
233
|
+
*
|
|
234
|
+
* @type {Boolean}
|
|
235
|
+
* @public
|
|
236
|
+
*/
|
|
237
|
+
nextButtonDisabled: _propTypes2["default"].bool,
|
|
238
|
+
/**
|
|
239
|
+
* Next {@link limestone/Icon.Icon|icon} name. Accepts any
|
|
240
|
+
* {@link limestone/Icon.Icon|icon} component type.
|
|
241
|
+
*
|
|
242
|
+
* @type {String}
|
|
243
|
+
* @default 'next'
|
|
244
|
+
* @public
|
|
245
|
+
*/
|
|
246
|
+
nextIcon: _propTypes2["default"].string,
|
|
205
247
|
/**
|
|
206
248
|
* Removes the "jump" buttons. The buttons that skip forward or backward in the video.
|
|
207
249
|
*
|
|
208
250
|
* @type {Boolean}
|
|
251
|
+
* @deprecated Will be removed in 2.0.0. Use `noPreviousButton` and `noNextButton` instead.
|
|
209
252
|
* @public
|
|
210
253
|
*/
|
|
211
254
|
noJumpButtons: _propTypes2["default"].bool,
|
|
255
|
+
/**
|
|
256
|
+
* Removes the next button. The button that plays the next video of the playlist.
|
|
257
|
+
*
|
|
258
|
+
* @type {Boolean}
|
|
259
|
+
* @public
|
|
260
|
+
*/
|
|
261
|
+
noNextButton: _propTypes2["default"].bool,
|
|
262
|
+
/**
|
|
263
|
+
* Removes the previous button. The button that plays the previous video of the playlist.
|
|
264
|
+
*
|
|
265
|
+
* @type {Boolean}
|
|
266
|
+
* @public
|
|
267
|
+
*/
|
|
268
|
+
noPreviousButton: _propTypes2["default"].bool,
|
|
212
269
|
/**
|
|
213
270
|
* Called when the button in ActionGuide is clicked.
|
|
214
271
|
*
|
|
@@ -228,6 +285,7 @@ var MediaControlsBase = exports.MediaControlsBase = (0, _kind["default"])({
|
|
|
228
285
|
* Called when the user clicks the JumpBackward button
|
|
229
286
|
*
|
|
230
287
|
* @type {Function}
|
|
288
|
+
* @deprecated Will be removed in 2.0.0. Use `onPreviousButtonClick` instead.
|
|
231
289
|
* @public
|
|
232
290
|
*/
|
|
233
291
|
onJumpBackwardButtonClick: _propTypes2["default"].func,
|
|
@@ -235,6 +293,7 @@ var MediaControlsBase = exports.MediaControlsBase = (0, _kind["default"])({
|
|
|
235
293
|
* Called when the user clicks the JumpForward button.
|
|
236
294
|
*
|
|
237
295
|
* @type {Function}
|
|
296
|
+
* @deprecated Will be removed in 2.0.0. Use `onNextButtonClick` instead.
|
|
238
297
|
* @public
|
|
239
298
|
*/
|
|
240
299
|
onJumpForwardButtonClick: _propTypes2["default"].func,
|
|
@@ -245,6 +304,16 @@ var MediaControlsBase = exports.MediaControlsBase = (0, _kind["default"])({
|
|
|
245
304
|
* @public
|
|
246
305
|
*/
|
|
247
306
|
onKeyDownFromMediaButtons: _propTypes2["default"].func,
|
|
307
|
+
/**
|
|
308
|
+
* Called when the user clicks the next button.
|
|
309
|
+
*
|
|
310
|
+
* If this function is not set, the button will work as the default jumpForward button.
|
|
311
|
+
* Next button will be the default in 2.0.0.
|
|
312
|
+
*
|
|
313
|
+
* @type {Function}
|
|
314
|
+
* @public
|
|
315
|
+
*/
|
|
316
|
+
onNextButtonClick: _propTypes2["default"].func,
|
|
248
317
|
/**
|
|
249
318
|
* Called when the user clicks the Play button.
|
|
250
319
|
*
|
|
@@ -252,6 +321,16 @@ var MediaControlsBase = exports.MediaControlsBase = (0, _kind["default"])({
|
|
|
252
321
|
* @public
|
|
253
322
|
*/
|
|
254
323
|
onPlayButtonClick: _propTypes2["default"].func,
|
|
324
|
+
/**
|
|
325
|
+
* Called when the user clicks the previous button
|
|
326
|
+
*
|
|
327
|
+
* If this function is not set, the button will work as the default jumpBackward button.
|
|
328
|
+
* Previous button will be the default in 2.0.0.
|
|
329
|
+
*
|
|
330
|
+
* @type {Function}
|
|
331
|
+
* @public
|
|
332
|
+
*/
|
|
333
|
+
onPreviousButtonClick: _propTypes2["default"].func,
|
|
255
334
|
/**
|
|
256
335
|
* `true` when the video is paused.
|
|
257
336
|
*
|
|
@@ -288,6 +367,29 @@ var MediaControlsBase = exports.MediaControlsBase = (0, _kind["default"])({
|
|
|
288
367
|
* @public
|
|
289
368
|
*/
|
|
290
369
|
playPauseButtonDisabled: _propTypes2["default"].bool,
|
|
370
|
+
/**
|
|
371
|
+
* The `aria-label` for the previous button.
|
|
372
|
+
*
|
|
373
|
+
* @type {String}
|
|
374
|
+
* @public
|
|
375
|
+
*/
|
|
376
|
+
previousAriaLabel: _propTypes2["default"].string,
|
|
377
|
+
/**
|
|
378
|
+
* Disables the previous button.
|
|
379
|
+
*
|
|
380
|
+
* @type {Boolean}
|
|
381
|
+
* @public
|
|
382
|
+
*/
|
|
383
|
+
previousButtonDisabled: _propTypes2["default"].bool,
|
|
384
|
+
/**
|
|
385
|
+
* Previous {@link limestone/Icon.Icon|icon} name. Accepts any
|
|
386
|
+
* {@link limestone/Icon.Icon|icon} component type.
|
|
387
|
+
*
|
|
388
|
+
* @type {String}
|
|
389
|
+
* @default 'previous'
|
|
390
|
+
* @public
|
|
391
|
+
*/
|
|
392
|
+
previousIcon: _propTypes2["default"].string,
|
|
291
393
|
/**
|
|
292
394
|
* When `true`, more components are visible.
|
|
293
395
|
*
|
|
@@ -323,9 +425,11 @@ var MediaControlsBase = exports.MediaControlsBase = (0, _kind["default"])({
|
|
|
323
425
|
jumpBackwardIcon: 'jumpbackward',
|
|
324
426
|
jumpForwardIcon: 'jumpforward',
|
|
325
427
|
moreComponentsSpotlightId: 'moreComponents',
|
|
428
|
+
nextIcon: 'next',
|
|
326
429
|
spotlightId: 'mediaControls',
|
|
327
430
|
pauseIcon: 'pause',
|
|
328
431
|
playIcon: 'play',
|
|
432
|
+
previousIcon: 'previous',
|
|
329
433
|
visible: true
|
|
330
434
|
},
|
|
331
435
|
styles: {
|
|
@@ -369,7 +473,7 @@ var MediaControlsBase = exports.MediaControlsBase = (0, _kind["default"])({
|
|
|
369
473
|
return showMoreComponents || _moreComponentsRendered;
|
|
370
474
|
}
|
|
371
475
|
},
|
|
372
|
-
render: function
|
|
476
|
+
render: (0, _deprecate["default"])(function (_ref8) {
|
|
373
477
|
var actionGuideAriaLabel = _ref8.actionGuideAriaLabel,
|
|
374
478
|
actionGuideButtonAriaLabel = _ref8.actionGuideButtonAriaLabel,
|
|
375
479
|
actionGuideDisabled = _ref8.actionGuideDisabled,
|
|
@@ -386,16 +490,26 @@ var MediaControlsBase = exports.MediaControlsBase = (0, _kind["default"])({
|
|
|
386
490
|
mediaControlsRef = _ref8.mediaControlsRef,
|
|
387
491
|
mediaDisabled = _ref8.mediaDisabled,
|
|
388
492
|
moreComponentsSpotlightId = _ref8.moreComponentsSpotlightId,
|
|
493
|
+
nextAriaLabel = _ref8.nextAriaLabel,
|
|
494
|
+
nextButtonDisabled = _ref8.nextButtonDisabled,
|
|
495
|
+
nextIcon = _ref8.nextIcon,
|
|
389
496
|
noJumpButtons = _ref8.noJumpButtons,
|
|
497
|
+
noNextButton = _ref8.noNextButton,
|
|
498
|
+
noPreviousButton = _ref8.noPreviousButton,
|
|
390
499
|
onActionGuideClick = _ref8.onActionGuideClick,
|
|
391
500
|
onJumpBackwardButtonClick = _ref8.onJumpBackwardButtonClick,
|
|
392
501
|
onJumpForwardButtonClick = _ref8.onJumpForwardButtonClick,
|
|
393
502
|
onKeyDownFromMediaButtons = _ref8.onKeyDownFromMediaButtons,
|
|
503
|
+
onNextButtonClick = _ref8.onNextButtonClick,
|
|
394
504
|
onPlayButtonClick = _ref8.onPlayButtonClick,
|
|
505
|
+
onPreviousButtonClick = _ref8.onPreviousButtonClick,
|
|
395
506
|
paused = _ref8.paused,
|
|
396
507
|
pauseIcon = _ref8.pauseIcon,
|
|
397
508
|
playIcon = _ref8.playIcon,
|
|
398
509
|
playPauseButtonDisabled = _ref8.playPauseButtonDisabled,
|
|
510
|
+
previousAriaLabel = _ref8.previousAriaLabel,
|
|
511
|
+
previousButtonDisabled = _ref8.previousButtonDisabled,
|
|
512
|
+
previousIcon = _ref8.previousIcon,
|
|
399
513
|
showMoreComponents = _ref8.showMoreComponents,
|
|
400
514
|
moreComponentsRendered = _ref8.moreComponentsRendered,
|
|
401
515
|
moreButtonsClassName = _ref8.moreButtonsClassName,
|
|
@@ -406,6 +520,70 @@ var MediaControlsBase = exports.MediaControlsBase = (0, _kind["default"])({
|
|
|
406
520
|
rest = _objectWithoutProperties(_ref8, _excluded2);
|
|
407
521
|
delete rest.onClose;
|
|
408
522
|
delete rest.visible;
|
|
523
|
+
if (!warnedJumpBackwardAriaLabel && jumpBackwardAriaLabel) {
|
|
524
|
+
(0, _deprecate["default"])({
|
|
525
|
+
name: '`jumpBackwardAriaLabel`',
|
|
526
|
+
until: '2.0.0',
|
|
527
|
+
message: 'Use `previousAriaLabel` instead'
|
|
528
|
+
});
|
|
529
|
+
warnedJumpBackwardAriaLabel = true;
|
|
530
|
+
}
|
|
531
|
+
if (!warnedJumpBackwardIcon && jumpBackwardIcon !== 'jumpbackward') {
|
|
532
|
+
(0, _deprecate["default"])({
|
|
533
|
+
name: '`jumpBackwardIcon`',
|
|
534
|
+
until: '2.0.0',
|
|
535
|
+
message: 'Use `previousIcon` instead'
|
|
536
|
+
});
|
|
537
|
+
warnedJumpBackwardIcon = true;
|
|
538
|
+
}
|
|
539
|
+
if (!warnedJumpButtonsDisabled && jumpButtonsDisabled) {
|
|
540
|
+
(0, _deprecate["default"])({
|
|
541
|
+
name: '`jumpButtonsDisabled`',
|
|
542
|
+
until: '2.0.0',
|
|
543
|
+
message: 'Use `previousButtonDisabled` and `nextButtonDisabled` instead'
|
|
544
|
+
});
|
|
545
|
+
warnedJumpButtonsDisabled = true;
|
|
546
|
+
}
|
|
547
|
+
if (!warnedJumpForwardAriaLabel && jumpForwardAriaLabel) {
|
|
548
|
+
(0, _deprecate["default"])({
|
|
549
|
+
name: '`jumpForwardAriaLabel`',
|
|
550
|
+
until: '2.0.0',
|
|
551
|
+
message: 'Use `nextAriaLabel` instead'
|
|
552
|
+
});
|
|
553
|
+
warnedJumpForwardAriaLabel = true;
|
|
554
|
+
}
|
|
555
|
+
if (!warnedJumpForwardIcon && jumpForwardIcon !== 'jumpforward') {
|
|
556
|
+
(0, _deprecate["default"])({
|
|
557
|
+
name: '`jumpForwardIcon`',
|
|
558
|
+
until: '2.0.0',
|
|
559
|
+
message: 'Use `nextIcon` instead'
|
|
560
|
+
});
|
|
561
|
+
warnedJumpForwardIcon = true;
|
|
562
|
+
}
|
|
563
|
+
if (!warnedNoJumpButtons && noJumpButtons) {
|
|
564
|
+
(0, _deprecate["default"])({
|
|
565
|
+
name: '`noJumpButtons`',
|
|
566
|
+
until: '2.0.0',
|
|
567
|
+
message: 'Use `noPreviousButton` and `noNextButton` instead'
|
|
568
|
+
});
|
|
569
|
+
warnedNoJumpButtons = true;
|
|
570
|
+
}
|
|
571
|
+
if (!warnedOnJumpBackwardButtonClick && onJumpBackwardButtonClick) {
|
|
572
|
+
(0, _deprecate["default"])({
|
|
573
|
+
name: '`onJumpBackwardButtonClick`',
|
|
574
|
+
until: '2.0.0',
|
|
575
|
+
message: 'Use `onPreviousButtonClick` instead'
|
|
576
|
+
});
|
|
577
|
+
warnedOnJumpBackwardButtonClick = true;
|
|
578
|
+
}
|
|
579
|
+
if (!warnedOnJumpForwardButtonClick && onJumpForwardButtonClick) {
|
|
580
|
+
(0, _deprecate["default"])({
|
|
581
|
+
name: '`onJumpForwardButtonClick`',
|
|
582
|
+
until: '2.0.0',
|
|
583
|
+
message: 'Use `onNextButtonClick` instead'
|
|
584
|
+
});
|
|
585
|
+
warnedOnJumpForwardButtonClick = true;
|
|
586
|
+
}
|
|
409
587
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(OuterContainer, _objectSpread(_objectSpread({}, rest), {}, {
|
|
410
588
|
id: id,
|
|
411
589
|
mediaControlsRef: mediaControlsRef,
|
|
@@ -414,13 +592,13 @@ var MediaControlsBase = exports.MediaControlsBase = (0, _kind["default"])({
|
|
|
414
592
|
className: _MediaControlsModule["default"].mediaControls,
|
|
415
593
|
spotlightDisabled: spotlightDisabled,
|
|
416
594
|
onKeyDown: onKeyDownFromMediaButtons,
|
|
417
|
-
children: [noJumpButtons ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)(MediaButton, {
|
|
418
|
-
"aria-label": jumpBackwardAriaLabel || (0, _$L["default"])('Previous'),
|
|
595
|
+
children: [noPreviousButton || noJumpButtons ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)(MediaButton, {
|
|
596
|
+
"aria-label": previousAriaLabel || jumpBackwardAriaLabel || (0, _$L["default"])('Previous'),
|
|
419
597
|
backgroundOpacity: "transparent",
|
|
420
598
|
css: _MediaControlsModule["default"],
|
|
421
|
-
disabled: mediaDisabled || jumpButtonsDisabled,
|
|
422
|
-
icon: jumpBackwardIcon,
|
|
423
|
-
onClick: onJumpBackwardButtonClick,
|
|
599
|
+
disabled: mediaDisabled || previousButtonDisabled || jumpButtonsDisabled,
|
|
600
|
+
icon: previousIcon !== 'previous' ? previousIcon : jumpBackwardIcon,
|
|
601
|
+
onClick: onPreviousButtonClick || onJumpBackwardButtonClick,
|
|
424
602
|
size: "large",
|
|
425
603
|
spotlightDisabled: spotlightDisabled
|
|
426
604
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(MediaButton, {
|
|
@@ -433,13 +611,13 @@ var MediaControlsBase = exports.MediaControlsBase = (0, _kind["default"])({
|
|
|
433
611
|
onClick: onPlayButtonClick,
|
|
434
612
|
size: "large",
|
|
435
613
|
spotlightDisabled: spotlightDisabled
|
|
436
|
-
}), noJumpButtons ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)(MediaButton, {
|
|
437
|
-
"aria-label": jumpForwardAriaLabel || (0, _$L["default"])('Next'),
|
|
614
|
+
}), noNextButton || noJumpButtons ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)(MediaButton, {
|
|
615
|
+
"aria-label": nextAriaLabel || jumpForwardAriaLabel || (0, _$L["default"])('Next'),
|
|
438
616
|
backgroundOpacity: "transparent",
|
|
439
617
|
css: _MediaControlsModule["default"],
|
|
440
|
-
disabled: mediaDisabled || jumpButtonsDisabled,
|
|
441
|
-
icon: jumpForwardIcon,
|
|
442
|
-
onClick: onJumpForwardButtonClick,
|
|
618
|
+
disabled: mediaDisabled || nextButtonDisabled || jumpButtonsDisabled,
|
|
619
|
+
icon: nextIcon !== 'next' ? nextIcon : jumpForwardIcon,
|
|
620
|
+
onClick: onNextButtonClick || onJumpForwardButtonClick,
|
|
443
621
|
size: "large",
|
|
444
622
|
spotlightDisabled: spotlightDisabled
|
|
445
623
|
})]
|
|
@@ -465,7 +643,11 @@ var MediaControlsBase = exports.MediaControlsBase = (0, _kind["default"])({
|
|
|
465
643
|
})]
|
|
466
644
|
}) : null]
|
|
467
645
|
}));
|
|
468
|
-
}
|
|
646
|
+
}, {
|
|
647
|
+
name: 'features related to `jumpBackward` and `jumpForward` buttons',
|
|
648
|
+
until: '2.0.0',
|
|
649
|
+
message: 'Will be replaced with features related to `previous` and `next` buttons that play previous/next video of the playlist'
|
|
650
|
+
})
|
|
469
651
|
});
|
|
470
652
|
|
|
471
653
|
/**
|
|
@@ -8,11 +8,12 @@
|
|
|
8
8
|
}
|
|
9
9
|
.controlsFrame .mediaControls {
|
|
10
10
|
height: 3.75rem;
|
|
11
|
+
direction: ltr;
|
|
11
12
|
display: flex;
|
|
12
13
|
justify-content: center;
|
|
13
14
|
align-items: center;
|
|
14
15
|
gap: var(--primitive-spacing-120);
|
|
15
|
-
margin-top:
|
|
16
|
+
margin-top: var(--primitive-spacing-36);
|
|
16
17
|
}
|
|
17
18
|
.controlsFrame .mediaControls .button {
|
|
18
19
|
height: 3.75rem;
|
|
@@ -51,7 +52,7 @@
|
|
|
51
52
|
}
|
|
52
53
|
.controlsFrame .moreComponents > :first-child {
|
|
53
54
|
gap: 4.25rem;
|
|
54
|
-
margin-top:
|
|
55
|
+
margin-top: var(--primitive-spacing-60);
|
|
55
56
|
}
|
|
56
57
|
.controlsFrame:global(.neutral) .button .bg {
|
|
57
58
|
border-radius: 2rem;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
opacity: 0;
|
|
7
7
|
}
|
|
8
8
|
.sliderFrame .mediaSlider {
|
|
9
|
-
margin: 0
|
|
9
|
+
margin: 0 0.75rem;
|
|
10
10
|
padding: 0.5rem 0;
|
|
11
11
|
height: 0.25rem;
|
|
12
12
|
}
|
|
@@ -14,40 +14,27 @@
|
|
|
14
14
|
content: "";
|
|
15
15
|
position: absolute;
|
|
16
16
|
top: 0;
|
|
17
|
-
right: -
|
|
17
|
+
right: calc(var(--primitive-spacing-132) * -1);
|
|
18
18
|
bottom: 0;
|
|
19
|
-
left: -
|
|
19
|
+
left: calc(var(--primitive-spacing-132) * -1);
|
|
20
20
|
}
|
|
21
21
|
:global(.spotlight-input-key) .sliderFrame .mediaSlider:global(.spottable):focus .knob::before,
|
|
22
22
|
:global(.spotlight-input-mouse) .sliderFrame .mediaSlider:global(.spottable):focus .knob::before {
|
|
23
23
|
opacity: 1;
|
|
24
24
|
}
|
|
25
|
-
:global(.spotlight-input-key) .sliderFrame .mediaSlider:global(.spottable):focus.active .knob::before,
|
|
26
|
-
:global(.spotlight-input-mouse) .sliderFrame .mediaSlider:global(.spottable):focus.active .knob::before,
|
|
27
|
-
:global(.spotlight-input-key) .sliderFrame .mediaSlider:global(.spottable):focus.pressed .knob::before,
|
|
28
|
-
:global(.spotlight-input-mouse) .sliderFrame .mediaSlider:global(.spottable):focus.pressed .knob::before {
|
|
29
|
-
transform: translate(-50%, -50%) scale(1);
|
|
30
|
-
}
|
|
31
25
|
:global(.spotlight-input-touch) .sliderFrame .mediaSlider:global(.spottable):active .knob::before {
|
|
32
26
|
opacity: 1;
|
|
33
27
|
}
|
|
34
|
-
:global(.spotlight-input-touch) .sliderFrame .mediaSlider:global(.spottable):active.active .knob::before,
|
|
35
|
-
:global(.spotlight-input-touch) .sliderFrame .mediaSlider:global(.spottable):active.pressed .knob::before {
|
|
36
|
-
transform: translate(-50%, -50%) scale(1);
|
|
37
|
-
}
|
|
38
28
|
.sliderFrame .mediaSlider:global(.spottable).pressed .knob::before {
|
|
39
|
-
transform: translate(-50%, -50%) scale(1);
|
|
40
29
|
opacity: 1;
|
|
41
30
|
}
|
|
42
31
|
.sliderFrame .knob::before {
|
|
43
|
-
width:
|
|
44
|
-
height:
|
|
32
|
+
width: 0.75rem;
|
|
33
|
+
height: 0.75rem;
|
|
45
34
|
border-width: 0;
|
|
46
|
-
border-radius:
|
|
47
|
-
transform: translate(-50%, -50%) scale(0.75);
|
|
35
|
+
border-radius: 0.75rem;
|
|
48
36
|
opacity: 0;
|
|
49
|
-
will-change:
|
|
50
|
-
transition: transform cubic-bezier(0.15, 0.85, 0.6, 1.65) 0.2s, opacity ease 0.2s;
|
|
37
|
+
will-change: opacity;
|
|
51
38
|
}
|
|
52
39
|
.sliderFrame.scrubbing .knob {
|
|
53
40
|
display: block;
|
package/MediaPlayer/index.d.ts
CHANGED
|
@@ -77,11 +77,10 @@ export class MediaSlider extends React.Component<
|
|
|
77
77
|
* Formats a duration in seconds into a human-readable time.
|
|
78
78
|
*/
|
|
79
79
|
export declare const secondsToTime: Function;
|
|
80
|
-
export interface MediaControlsProps
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
> {
|
|
80
|
+
export interface MediaControlsProps extends Merge<
|
|
81
|
+
ui_Cancelable_CancelableProps,
|
|
82
|
+
limestone_Skinnable_SkinnableProps
|
|
83
|
+
> {
|
|
85
84
|
/**
|
|
86
85
|
* DOM id for the component.
|
|
87
86
|
*
|
|
@@ -89,11 +88,16 @@ export interface MediaControlsProps
|
|
|
89
88
|
*/
|
|
90
89
|
id: string;
|
|
91
90
|
/**
|
|
92
|
-
|
|
93
|
-
|
|
91
|
+
* The `aria-label` for the action guide.
|
|
92
|
+
*
|
|
93
|
+
* When the media has been loaded first, this aria-label is read after media title.
|
|
94
|
+
You can use this aria-label to guide the user to find the action guide button for more controls.
|
|
95
|
+
*/
|
|
94
96
|
actionGuideAriaLabel?: string;
|
|
95
97
|
/**
|
|
96
98
|
* The `aria-label` for the action guide button.
|
|
99
|
+
*
|
|
100
|
+
* This aria-label is read when the action guide button is focused.
|
|
97
101
|
*/
|
|
98
102
|
actionGuideButtonAriaLabel?: string;
|
|
99
103
|
/**
|
|
@@ -146,10 +150,31 @@ export interface MediaControlsProps
|
|
|
146
150
|
* The spotlight ID for the moreComponent container.
|
|
147
151
|
*/
|
|
148
152
|
moreComponentsSpotlightId?: string;
|
|
153
|
+
/**
|
|
154
|
+
* The `aria-label` for the next button.
|
|
155
|
+
*/
|
|
156
|
+
nextAriaLabel?: string;
|
|
157
|
+
/**
|
|
158
|
+
* Disables the next button.
|
|
159
|
+
*/
|
|
160
|
+
nextButtonDisabled?: boolean;
|
|
161
|
+
/**
|
|
162
|
+
* Next name. Accepts any
|
|
163
|
+
component type.
|
|
164
|
+
*/
|
|
165
|
+
nextIcon?: string;
|
|
149
166
|
/**
|
|
150
167
|
* Removes the "jump" buttons. The buttons that skip forward or backward in the video.
|
|
151
168
|
*/
|
|
152
169
|
noJumpButtons?: boolean;
|
|
170
|
+
/**
|
|
171
|
+
* Removes the next button. The button that plays the next video of the playlist.
|
|
172
|
+
*/
|
|
173
|
+
noNextButton?: boolean;
|
|
174
|
+
/**
|
|
175
|
+
* Removes the previous button. The button that plays the previous video of the playlist.
|
|
176
|
+
*/
|
|
177
|
+
noPreviousButton?: boolean;
|
|
153
178
|
/**
|
|
154
179
|
* Called when the button in ActionGuide is clicked.
|
|
155
180
|
*/
|
|
@@ -170,10 +195,24 @@ export interface MediaControlsProps
|
|
|
170
195
|
* Called when the user presses a media control button.
|
|
171
196
|
*/
|
|
172
197
|
onKeyDownFromMediaButtons?: Function;
|
|
198
|
+
/**
|
|
199
|
+
* Called when the user clicks the next button.
|
|
200
|
+
*
|
|
201
|
+
* If this function is not set, the button will work as the default jumpForward button.
|
|
202
|
+
Next button will be the default in 2.0.0.
|
|
203
|
+
*/
|
|
204
|
+
onNextButtonClick?: Function;
|
|
173
205
|
/**
|
|
174
206
|
* Called when the user clicks the Play button.
|
|
175
207
|
*/
|
|
176
208
|
onPlayButtonClick?: Function;
|
|
209
|
+
/**
|
|
210
|
+
* Called when the user clicks the previous button
|
|
211
|
+
*
|
|
212
|
+
* If this function is not set, the button will work as the default jumpBackward button.
|
|
213
|
+
Previous button will be the default in 2.0.0.
|
|
214
|
+
*/
|
|
215
|
+
onPreviousButtonClick?: Function;
|
|
177
216
|
/**
|
|
178
217
|
* `true` when the video is paused.
|
|
179
218
|
*/
|
|
@@ -196,6 +235,19 @@ the when the
|
|
|
196
235
|
* Disables the media "play"/"pause" button.
|
|
197
236
|
*/
|
|
198
237
|
playPauseButtonDisabled?: boolean;
|
|
238
|
+
/**
|
|
239
|
+
* The `aria-label` for the previous button.
|
|
240
|
+
*/
|
|
241
|
+
previousAriaLabel?: string;
|
|
242
|
+
/**
|
|
243
|
+
* Disables the previous button.
|
|
244
|
+
*/
|
|
245
|
+
previousButtonDisabled?: boolean;
|
|
246
|
+
/**
|
|
247
|
+
* Previous name. Accepts any
|
|
248
|
+
component type.
|
|
249
|
+
*/
|
|
250
|
+
previousIcon?: string;
|
|
199
251
|
/**
|
|
200
252
|
* `true` controls are disabled from Spotlight.
|
|
201
253
|
*/
|