@enact/limestone 1.9.3 → 1.10.1

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 (120) hide show
  1. package/.github/workflows/ci-reusable.yml +2 -2
  2. package/ActionGuide/ActionGuide.module.css +4 -0
  3. package/Alert/Alert.d.ts +9 -0
  4. package/Alert/Alert.js +35 -4
  5. package/Alert/Alert.module.css +12 -1
  6. package/Alert/tests/Alert-specs.js +91 -0
  7. package/BodyText/BodyText.module.css +21 -0
  8. package/Button/Button.module.css +72 -40
  9. package/Button/tests/Button-specs.js +26 -0
  10. package/CHANGELOG.md +74 -0
  11. package/Card/Card.d.ts +4 -4
  12. package/Card/Card.js +10 -8
  13. package/Card/Card.module.css +31 -7
  14. package/Card/tests/Card-specs.js +39 -5
  15. package/Checkbox/Checkbox.module.css +4 -0
  16. package/CheckboxItem/CheckboxItem.js +6 -4
  17. package/Chips/Chip.js +12 -6
  18. package/Chips/Chip.module.css +3 -0
  19. package/Chips/Chips.js +12 -6
  20. package/Chips/tests/Chip-specs.js +25 -5
  21. package/Chips/tests/Chips-specs.js +12 -2
  22. package/ColorPicker/ColorPicker.js +27 -25
  23. package/ContextualPopupDecorator/ContextualPopupDecorator.js +32 -22
  24. package/DayPicker/DaySelectorDecorator.js +12 -7
  25. package/Dropdown/Dropdown.module.css +4 -0
  26. package/Dropdown/DropdownList.js +74 -53
  27. package/FlexiblePopupPanels/useNavButtonFocus.js +7 -10
  28. package/Heading/Heading.d.ts +1 -1
  29. package/Heading/Heading.js +2 -2
  30. package/Heading/Heading.module.css +16 -0
  31. package/Icon/Icon.d.ts +1 -0
  32. package/Icon/Icon.js +1 -0
  33. package/Icon/Icon.module.css +12 -0
  34. package/Icon/IconList.js +2 -0
  35. package/IconItem/IconItem.module.css +19 -3
  36. package/IconItem/tests/IconItem-specs.js +30 -1
  37. package/Image/Image.js +6 -4
  38. package/ImageItem/ImageItem.module.css +17 -0
  39. package/Input/Input.js +12 -1
  40. package/Input/Input.module.css +25 -9
  41. package/Input/InputField.js +75 -24
  42. package/Input/InputField.module.css +280 -45
  43. package/Input/InputFieldDecoratorIcon.js +1 -0
  44. package/Input/InputFieldSpotlightDecorator.js +53 -8
  45. package/Input/index.d.ts +105 -93
  46. package/Input/tests/Input-specs.js +26 -0
  47. package/Input/tests/InputField-specs.js +149 -3
  48. package/Input/tests/InputPopup-specs.js +1 -1
  49. package/Item/Item.module.css +2 -1
  50. package/KeyGuide/KeyGuide.js +29 -27
  51. package/KeyGuide/KeyGuide.module.css +10 -0
  52. package/MediaOverlay/MediaOverlay.module.css +16 -4
  53. package/MediaOverlay/tests/MediaOverlay-specs.js +29 -0
  54. package/MediaPlayer/MediaControls.module.css +3 -0
  55. package/MediaPlayer/Times.module.css +4 -0
  56. package/MediaPlayer/tests/util-specs.js +4 -1
  57. package/PageViews/PageViews.js +134 -69
  58. package/PageViews/PageViews.module.css +7 -0
  59. package/PageViews/PageViewsRouter.js +91 -42
  60. package/PageViews/tests/PageViews-specs.js +87 -0
  61. package/Panels/Header.js +6 -4
  62. package/Panels/Header.module.css +37 -31
  63. package/Popup/Popup.js +5 -4
  64. package/PopupTabLayout/PopupTabLayout.js +11 -9
  65. package/PopupTabLayout/PopupTabLayout.module.css +18 -0
  66. package/RadioItem/RadioItem.js +7 -5
  67. package/RadioItem/RadioItem.module.css +5 -0
  68. package/Scroller/EditableWrapper.js +19 -15
  69. package/Scroller/Scroller.js +11 -10
  70. package/Scroller/Scroller.module.css +10 -0
  71. package/Scroller/tests/Scroller-specs.js +91 -2
  72. package/Scroller/useThemeScroller.js +6 -3
  73. package/Slider/Slider.d.ts +4 -0
  74. package/Slider/Slider.js +40 -16
  75. package/Slider/Slider.module.css +150 -3
  76. package/Slider/SliderBehaviorDecorator.js +16 -14
  77. package/Slider/tests/Slider-specs.js +51 -0
  78. package/Slider/utils.js +23 -7
  79. package/Spinner/Spinner.js +10 -8
  80. package/Steps/Steps.module.css +3 -0
  81. package/Switch/Switch.module.css +15 -1
  82. package/TabLayout/RefocusDecorator.js +14 -12
  83. package/TabLayout/TabGroup.module.css +1 -1
  84. package/TabLayout/tests/TabGroup-specs.js +1 -1
  85. package/ThemeDecorator/AccessibilityDecorator.js +12 -11
  86. package/ThemeDecorator/I18nFontDecorator.js +6 -4
  87. package/ThemeDecorator/ThemeDecorator.d.ts +7 -0
  88. package/ThemeDecorator/ThemeDecorator.js +24 -9
  89. package/TimePicker/TimePicker.module.css +3 -0
  90. package/TimePicker/TimePickerBase.js +5 -3
  91. package/TooltipDecorator/Tooltip.module.css +4 -0
  92. package/TooltipDecorator/TooltipDecorator.js +12 -7
  93. package/TooltipDecorator/tests/useTooltip-specs.js +5 -2
  94. package/VideoPlayer/Feedback.module.css +3 -0
  95. package/VideoPlayer/FeedbackTooltip.module.css +7 -0
  96. package/VideoPlayer/MediaTitle.module.css +8 -0
  97. package/VideoPlayer/VideoPlayer.js +25 -24
  98. package/VirtualList/VirtualList.js +20 -18
  99. package/VirtualList/useSpotlight.js +1 -1
  100. package/fonts/Limestone_Icons.ttf +0 -0
  101. package/internal/AsyncRenderChildren/AsyncRenderChildren.js +9 -5
  102. package/internal/AsyncRenderChildren/tests/AsyncRenderChildren-specs.js +4 -1
  103. package/internal/DateTime/DateTime.module.css +3 -0
  104. package/internal/DateTime/DateTimeDecorator.js +5 -4
  105. package/internal/Panels/PanelsRouter.js +35 -29
  106. package/internal/Panels/useAutoFocus.js +10 -6
  107. package/internal/Panels/useFocusOnTransition.js +4 -3
  108. package/internal/Picker/Picker.js +7 -5
  109. package/internal/Picker/Picker.module.css +22 -0
  110. package/internal/Picker/SpottablePicker.js +15 -13
  111. package/internal/SharedStateDecorator/SharedStateDecorator.js +6 -4
  112. package/package.json +15 -12
  113. package/styles/colors.less +1 -0
  114. package/styles/variables.less +118 -26
  115. package/useScroll/HoverToScroll.js +15 -12
  116. package/useScroll/Scrollbar.js +14 -10
  117. package/useScroll/ScrollbarPlaceholder.js +4 -1
  118. package/useScroll/ScrollbarTrack.js +7 -5
  119. package/useScroll/useEvent.js +7 -2
  120. package/useScroll/useScroll.js +10 -2
@@ -348,10 +348,12 @@ var useEventMonitor = exports.useEventMonitor = function useEventMonitor(props,
348
348
  scrollByPageOnPointerMode: scrollByPageOnPointerMode
349
349
  }
350
350
  });
351
- lastPointer = lastPointerProp;
352
351
 
353
352
  // Hooks
354
353
 
354
+ (0, _react.useEffect)(function () {
355
+ lastPointer = lastPointerProp;
356
+ }, [lastPointerProp]);
355
357
  (0, _react.useEffect)(function () {
356
358
  var setMonitorEventTarget = function setMonitorEventTarget(target) {
357
359
  scrollers.set(mutableRef.current.pageKeyHandlerObj, target);
@@ -516,7 +518,10 @@ var useEventVoice = exports.useEventVoice = function useEventVoice(props, instan
516
518
  scrollVertically = verticalDirection.includes(scroll),
517
519
  direction = directionFactor ? -1 : 1,
518
520
  pageDistance = direction * (scrollVertically ? bounds.clientHeight : bounds.clientWidth) * paginationPageMultiplier;
519
- scrollContainerHandle.current.lastInputType = 'pageKey';
521
+ var handleRef = scrollContainerHandle;
522
+ if (handleRef.current) {
523
+ handleRef.current.lastInputType = 'pageKey';
524
+ }
520
525
  if (direction !== scrollContainerHandle.current.wheelDirection) {
521
526
  scrollContainerHandle.current.isScrollAnimationTargetAccumulated = false;
522
527
  scrollContainerHandle.current.wheelDirection = direction;
@@ -182,7 +182,10 @@ var useThemeScroll = function useThemeScroll(props, instances) {
182
182
  direction = isForward ? 1 : -1,
183
183
  pageSize = isVerticalScrollBar ? bounds.clientHeight : bounds.clientWidth,
184
184
  distance = pageSize * (isPagination ? paginationPageMultiplier : arrowKeyMultiplier);
185
- scrollContainerHandle.current.lastInputType = inputType;
185
+ var handleRef = scrollContainerHandle;
186
+ if (handleRef.current) {
187
+ handleRef.current.lastInputType = inputType;
188
+ }
186
189
  if (direction !== wheelDirection) {
187
190
  scrollContainerHandle.current.isScrollAnimationTargetAccumulated = false;
188
191
  scrollContainerHandle.current.wheelDirection = direction;
@@ -258,7 +261,10 @@ var useThemeScroll = function useThemeScroll(props, instances) {
258
261
  // oddly, Scroller manages scrollContainerHandle.current.bounds so if we don't update it here (it is also
259
262
  // updated in calculateAndScrollTo, but we might not have made it to that point), it will be
260
263
  // out of date when we land back in this method next time.
261
- scrollContainerHandle.current.bounds.scrollHeight = scrollContainerHandle.current.getScrollBounds().scrollHeight;
264
+ var handleRef = scrollContainerHandle;
265
+ if (handleRef.current) {
266
+ handleRef.current.bounds.scrollHeight = scrollContainerHandle.current.getScrollBounds().scrollHeight;
267
+ }
262
268
  }
263
269
  function handleResizeWindow() {
264
270
  var focusedItem = _spotlight["default"].getCurrent();
@@ -468,6 +474,7 @@ var useScroll = exports.useScroll = function useScroll(props) {
468
474
  scrollContentWrapper = _useScrollBase.scrollContentWrapper,
469
475
  scrollObserver = _useScrollBase.scrollObserver;
470
476
  assignProperties('scrollContainerProps', {
477
+ // eslint-disable-line react-hooks/refs
471
478
  className: [className, _useScrollModule["default"].scroll, _OverscrollEffectModule["default"].scroll, focusableScrollbar ? _useScrollModule["default"].focusableScrollbar : null, focusableScrollbar && isVerticalScrollbarVisible ? _useScrollModule["default"].verticalPadding : null, isVerticalScrollbarVisible && isHorizontalScrollbarVisible ? _useScrollModule["default"].bidirectional : null],
472
479
  style: style,
473
480
  'data-spotlight-container': spotlightContainer,
@@ -512,6 +519,7 @@ var useScroll = exports.useScroll = function useScroll(props) {
512
519
  scrollbarHandle: verticalScrollbarHandle
513
520
  }));
514
521
  assignProperties('hoverToScrollProps', {
522
+ // eslint-disable-line react-hooks/refs
515
523
  scrollContainerHandle: scrollContainerHandle,
516
524
  scrollObserver: scrollObserver
517
525
  });