@enact/limestone 1.3.0 → 1.10.0

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 (200) hide show
  1. package/.github/workflows/ci-branch.yml +21 -0
  2. package/.github/workflows/ci-pull-request.yml +16 -0
  3. package/.github/workflows/ci-reusable.yml +73 -0
  4. package/ActionGuide/ActionGuide.d.ts +5 -4
  5. package/ActionGuide/ActionGuide.module.css +1 -1
  6. package/Alert/Alert.d.ts +13 -2
  7. package/Alert/Alert.js +39 -5
  8. package/Alert/Alert.module.css +48 -1
  9. package/Alert/tests/Alert-specs.js +91 -0
  10. package/BodyText/BodyText.d.ts +5 -4
  11. package/BodyText/BodyText.module.css +7 -7
  12. package/Button/Button.d.ts +17 -12
  13. package/Button/Button.js +1 -1
  14. package/Button/Button.module.css +195 -268
  15. package/Button/tests/Button-specs.js +26 -0
  16. package/CHANGELOG.md +254 -0
  17. package/Card/Card.d.ts +40 -12
  18. package/Card/Card.js +164 -28
  19. package/Card/Card.module.css +277 -58
  20. package/Card/tests/Card-specs.js +67 -3
  21. package/Checkbox/Checkbox.d.ts +8 -7
  22. package/Checkbox/Checkbox.js +3 -1
  23. package/Checkbox/Checkbox.module.css +213 -120
  24. package/Checkbox/tests/Checkbox-specs.js +1 -1
  25. package/CheckboxItem/CheckboxItem.d.ts +22 -7
  26. package/CheckboxItem/CheckboxItem.js +71 -4
  27. package/Chips/Chip.js +72 -13
  28. package/Chips/Chip.module.css +3 -3
  29. package/Chips/Chips.js +37 -17
  30. package/Chips/Chips.module.css +1 -1
  31. package/Chips/tests/Chip-specs.js +43 -13
  32. package/Chips/tests/Chips-specs.js +31 -21
  33. package/ColorPicker/ColorPicker.js +27 -25
  34. package/ContextualMenuDecorator/ContextualMenuDecorator.d.ts +4 -5
  35. package/ContextualPopupDecorator/ContextualPopup.module.css +34 -34
  36. package/ContextualPopupDecorator/ContextualPopupDecorator.js +567 -549
  37. package/DatePicker/DatePicker.d.ts +4 -5
  38. package/DayPicker/DayPicker.d.ts +8 -7
  39. package/DayPicker/DaySelectorDecorator.js +12 -7
  40. package/Dropdown/Dropdown.d.ts +11 -13
  41. package/Dropdown/Dropdown.module.css +13 -9
  42. package/Dropdown/DropdownList.js +80 -54
  43. package/FixedPopupPanels/FixedPopupPanels.d.ts +4 -2
  44. package/FixedPopupPanels/FixedPopupPanels.module.css +18 -18
  45. package/FlexiblePopupPanels/FlexiblePopupPanels.module.css +23 -23
  46. package/FlexiblePopupPanels/useNavButtonFocus.js +7 -10
  47. package/FormCheckboxItem/FormCheckboxItem.d.ts +5 -4
  48. package/Heading/Heading.d.ts +9 -8
  49. package/Heading/Heading.js +2 -2
  50. package/Heading/Heading.module.css +5 -5
  51. package/Icon/Icon.d.ts +15 -4
  52. package/Icon/Icon.js +49 -2
  53. package/Icon/Icon.module.css +1 -1
  54. package/Icon/IconList.js +27 -1
  55. package/IconItem/IconItem.d.ts +13 -12
  56. package/IconItem/IconItem.js +15 -0
  57. package/IconItem/IconItem.module.css +107 -1
  58. package/IconItem/tests/IconItem-specs.js +30 -1
  59. package/Image/Image.d.ts +5 -4
  60. package/Image/Image.js +6 -4
  61. package/ImageItem/ImageItem.d.ts +11 -10
  62. package/ImageItem/ImageItem.js +37 -31
  63. package/ImageItem/ImageItem.module.css +30 -30
  64. package/ImageItem/tests/ImageItem-specs.js +3 -10
  65. package/Input/Input.js +21 -3
  66. package/Input/Input.module.css +37 -8
  67. package/Input/InputField.js +79 -24
  68. package/Input/InputField.module.css +273 -41
  69. package/Input/InputFieldDecoratorIcon.js +1 -0
  70. package/Input/InputFieldSpotlightDecorator.js +257 -228
  71. package/Input/index.d.ts +120 -111
  72. package/Input/tests/Input-specs.js +26 -0
  73. package/Input/tests/InputField-specs.js +170 -3
  74. package/Input/tests/InputPopup-specs.js +1 -1
  75. package/Item/Item.d.ts +16 -9
  76. package/Item/Item.js +20 -2
  77. package/Item/Item.module.css +1 -1
  78. package/KeyGuide/KeyGuide.d.ts +8 -7
  79. package/KeyGuide/KeyGuide.js +29 -27
  80. package/KeyGuide/KeyGuide.module.css +25 -1
  81. package/Marquee/Marquee.d.ts +2 -4
  82. package/MediaOverlay/MediaOverlay.d.ts +12 -11
  83. package/MediaOverlay/MediaOverlay.js +43 -21
  84. package/MediaOverlay/MediaOverlay.module.css +114 -15
  85. package/MediaOverlay/tests/MediaOverlay-specs.js +29 -0
  86. package/MediaPlayer/MediaControls.js +195 -13
  87. package/MediaPlayer/MediaControls.module.css +3 -2
  88. package/MediaPlayer/MediaSlider.module.css +7 -20
  89. package/MediaPlayer/index.d.ts +59 -7
  90. package/MediaPlayer/tests/util-specs.js +4 -1
  91. package/PageViews/PageViews.js +232 -82
  92. package/PageViews/PageViews.module.css +3 -0
  93. package/PageViews/PageViewsRouter.js +100 -42
  94. package/PageViews/tests/PageViews-specs.js +171 -0
  95. package/Panels/Header.js +54 -34
  96. package/Panels/Header.module.css +83 -31
  97. package/Panels/Panel.module.css +1 -1
  98. package/Panels/index.d.ts +7 -8
  99. package/Picker/Picker.d.ts +4 -5
  100. package/Picker/Picker.module.css +2 -2
  101. package/Popup/Popup.js +245 -242
  102. package/Popup/Popup.module.css +24 -24
  103. package/PopupTabLayout/PopupTabLayout.d.ts +5 -7
  104. package/PopupTabLayout/PopupTabLayout.js +26 -18
  105. package/PopupTabLayout/PopupTabLayout.module.css +53 -16
  106. package/PopupTabLayout/PopupTabLayoutStateContext.js +8 -0
  107. package/ProgressBar/ProgressBar.d.ts +5 -4
  108. package/ProgressBar/ProgressBarTooltip.module.css +12 -12
  109. package/ProgressButton/ProgressButton.d.ts +4 -5
  110. package/QuickGuidePanels/QuickGuidePanels.module.css +2 -2
  111. package/RadioItem/RadioItem.d.ts +18 -5
  112. package/RadioItem/RadioItem.js +69 -2
  113. package/RadioItem/RadioItem.module.css +36 -36
  114. package/RangePicker/RangePicker.module.css +2 -2
  115. package/Scroller/EditableWrapper.js +28 -18
  116. package/Scroller/Scroller.d.ts +20 -16
  117. package/Scroller/Scroller.js +20 -13
  118. package/Scroller/Scroller.module.css +4 -4
  119. package/Scroller/useThemeScroller.js +3 -3
  120. package/Slider/Slider.d.ts +20 -14
  121. package/Slider/Slider.js +71 -14
  122. package/Slider/Slider.module.css +464 -91
  123. package/Slider/SliderBehaviorDecorator.js +16 -14
  124. package/Slider/tests/Slider-specs.js +53 -1
  125. package/Slider/utils.js +23 -7
  126. package/Spinner/Spinner.d.ts +5 -4
  127. package/Spinner/Spinner.js +10 -8
  128. package/Spinner/Spinner.module.css +9 -9
  129. package/Steps/Steps.d.ts +5 -4
  130. package/Steps/Steps.js +9 -5
  131. package/Switch/Switch.d.ts +8 -7
  132. package/Switch/Switch.module.css +100 -13
  133. package/SwitchItem/SwitchItem.d.ts +9 -6
  134. package/TabLayout/RefocusDecorator.js +26 -18
  135. package/TabLayout/TabGroup.js +3 -2
  136. package/TabLayout/TabGroup.module.css +2 -2
  137. package/TabLayout/TabLayout.d.ts +6 -0
  138. package/TabLayout/TabLayout.js +11 -1
  139. package/TabLayout/TabLayout.module.css +18 -0
  140. package/TabLayout/tests/TabGroup-specs.js +1 -1
  141. package/TabLayout/tests/TabLayout-specs.js +52 -0
  142. package/ThemeDecorator/AccessibilityDecorator.js +12 -11
  143. package/ThemeDecorator/I18nFontDecorator.js +6 -4
  144. package/ThemeDecorator/ThemeDecorator.d.ts +16 -10
  145. package/ThemeDecorator/ThemeDecorator.js +24 -9
  146. package/ThemeDecorator/fontGenerator.js +1 -1
  147. package/ThemeDecorator/screenTypes.json +1 -0
  148. package/TimePicker/TimePicker.module.css +1 -1
  149. package/TimePicker/TimePickerBase.js +5 -3
  150. package/TooltipDecorator/Tooltip.module.css +1 -2
  151. package/TooltipDecorator/TooltipDecorator.js +12 -7
  152. package/TooltipDecorator/tests/useTooltip-specs.js +5 -2
  153. package/TooltipDecorator/tests/util-specs.js +12 -0
  154. package/TooltipDecorator/useTooltip.js +1 -1
  155. package/TooltipDecorator/util.js +18 -11
  156. package/VideoPlayer/Feedback.js +3 -0
  157. package/VideoPlayer/Feedback.module.css +5 -9
  158. package/VideoPlayer/FeedbackIcons.js +1 -1
  159. package/VideoPlayer/FeedbackTooltip.module.css +55 -11
  160. package/VideoPlayer/VideoPlayer.d.ts +44 -18
  161. package/VideoPlayer/VideoPlayer.js +153 -47
  162. package/VideoPlayer/VideoPlayer.module.css +28 -11
  163. package/VirtualList/VirtualList.d.ts +9 -2
  164. package/VirtualList/VirtualList.js +51 -24
  165. package/VirtualList/tests/VirtualGridList-translate-specs.js +3 -0
  166. package/VirtualList/tests/VirtualList-specs.js +28 -1
  167. package/VirtualList/tests/VirtualList-translate-specs.js +4 -1
  168. package/VirtualList/useSpotlight.js +1 -1
  169. package/WizardPanels/WizardPanels.module.css +2 -2
  170. package/WizardPanels/index.d.ts +4 -2
  171. package/fonts/Limestone_Icons.ttf +0 -0
  172. package/internal/$L/$L.js +3 -3
  173. package/internal/AsyncRenderChildren/AsyncRenderChildren.js +9 -5
  174. package/internal/AsyncRenderChildren/tests/AsyncRenderChildren-specs.js +4 -1
  175. package/internal/DateComponentPicker/DateComponentPicker.module.css +2 -2
  176. package/internal/DateTime/DateTime.module.css +1 -0
  177. package/internal/DateTime/DateTimeDecorator.js +5 -4
  178. package/internal/Panels/PanelsRouter.js +48 -31
  179. package/internal/Panels/useAutoFocus.js +10 -6
  180. package/internal/Panels/useFocusOnTransition.js +4 -3
  181. package/internal/Picker/Picker.js +7 -5
  182. package/internal/Picker/Picker.module.css +2 -2
  183. package/internal/Picker/SpottablePicker.js +15 -13
  184. package/internal/SharedStateDecorator/SharedStateDecorator.js +78 -99
  185. package/internal/validators/validators.js +21 -2
  186. package/package.json +18 -15
  187. package/styles/colors-highcontrast.less +9 -1
  188. package/styles/colors.less +12 -7
  189. package/styles/motion-mixins.less +66 -0
  190. package/styles/motions.less +78 -0
  191. package/styles/variables.less +176 -150
  192. package/useScroll/HoverToScroll.js +23 -17
  193. package/useScroll/Scrollbar.js +14 -10
  194. package/useScroll/ScrollbarPlaceholder.js +3 -5
  195. package/useScroll/ScrollbarTrack.js +7 -5
  196. package/useScroll/ScrollbarTrack.module.css +8 -8
  197. package/useScroll/useEvent.js +14 -3
  198. package/useScroll/useScroll.js +12 -2
  199. package/useScroll/useScroll.module.css +6 -6
  200. 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 render(_ref8) {
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: 0.75rem;
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: 1.25rem;
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 1rem;
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: -2.75rem;
17
+ right: calc(var(--primitive-spacing-132) * -1);
18
18
  bottom: 0;
19
- left: -2.75rem;
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: 1rem;
44
- height: 1rem;
32
+ width: 0.75rem;
33
+ height: 0.75rem;
45
34
  border-width: 0;
46
- border-radius: 1rem;
47
- transform: translate(-50%, -50%) scale(0.75);
35
+ border-radius: 0.75rem;
48
36
  opacity: 0;
49
- will-change: transform, opacity;
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;
@@ -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
- extends Merge<
82
- ui_Cancelable_CancelableProps,
83
- limestone_Skinnable_SkinnableProps
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
- * The `aria-label` for the action guide.
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
  */
@@ -3,6 +3,7 @@
3
3
  var _util = require("@enact/core/util");
4
4
  var _DurationFmt = _interopRequireDefault(require("ilib/lib/DurationFmt"));
5
5
  var _react = require("@testing-library/react");
6
+ var _react2 = require("react");
6
7
  var _util2 = require("../util");
7
8
  var _jsxRuntime = require("react/jsx-runtime");
8
9
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
@@ -25,7 +26,9 @@ describe('util', function () {
25
26
  var actual;
26
27
  var Parent = function Parent(_ref) {
27
28
  var children = _ref.children;
28
- actual = (0, _util2.countReactChildren)(children);
29
+ (0, _react2.useEffect)(function () {
30
+ actual = (0, _util2.countReactChildren)(children);
31
+ }, [children]);
29
32
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("ul", {
30
33
  children: children
31
34
  });