@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.
Files changed (163) 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 +4 -2
  7. package/Alert/Alert.js +4 -1
  8. package/Alert/Alert.module.css +36 -0
  9. package/BodyText/BodyText.d.ts +5 -4
  10. package/BodyText/BodyText.module.css +7 -7
  11. package/Button/Button.d.ts +17 -12
  12. package/Button/Button.js +1 -1
  13. package/Button/Button.module.css +195 -268
  14. package/CHANGELOG.md +220 -0
  15. package/Card/Card.d.ts +36 -8
  16. package/Card/Card.js +157 -20
  17. package/Card/Card.module.css +277 -58
  18. package/Card/tests/Card-specs.js +30 -0
  19. package/Checkbox/Checkbox.d.ts +8 -7
  20. package/Checkbox/Checkbox.js +3 -1
  21. package/Checkbox/Checkbox.module.css +213 -120
  22. package/Checkbox/tests/Checkbox-specs.js +1 -1
  23. package/CheckboxItem/CheckboxItem.d.ts +22 -7
  24. package/CheckboxItem/CheckboxItem.js +69 -4
  25. package/Chips/Chip.js +60 -7
  26. package/Chips/Chip.module.css +3 -3
  27. package/Chips/Chips.js +26 -12
  28. package/Chips/Chips.module.css +1 -1
  29. package/Chips/tests/Chip-specs.js +19 -9
  30. package/Chips/tests/Chips-specs.js +19 -19
  31. package/ContextualMenuDecorator/ContextualMenuDecorator.d.ts +4 -5
  32. package/ContextualPopupDecorator/ContextualPopup.module.css +34 -34
  33. package/ContextualPopupDecorator/ContextualPopupDecorator.js +557 -549
  34. package/DatePicker/DatePicker.d.ts +4 -5
  35. package/DayPicker/DayPicker.d.ts +8 -7
  36. package/Dropdown/Dropdown.d.ts +11 -13
  37. package/Dropdown/Dropdown.module.css +9 -9
  38. package/Dropdown/DropdownList.js +16 -11
  39. package/FixedPopupPanels/FixedPopupPanels.d.ts +4 -2
  40. package/FixedPopupPanels/FixedPopupPanels.module.css +18 -18
  41. package/FlexiblePopupPanels/FlexiblePopupPanels.module.css +23 -23
  42. package/FormCheckboxItem/FormCheckboxItem.d.ts +5 -4
  43. package/Heading/Heading.d.ts +8 -7
  44. package/Heading/Heading.module.css +5 -5
  45. package/Icon/Icon.d.ts +14 -4
  46. package/Icon/Icon.js +48 -2
  47. package/Icon/Icon.module.css +1 -1
  48. package/Icon/IconList.js +25 -1
  49. package/IconItem/IconItem.d.ts +13 -12
  50. package/IconItem/IconItem.js +15 -0
  51. package/IconItem/IconItem.module.css +107 -1
  52. package/Image/Image.d.ts +5 -4
  53. package/ImageItem/ImageItem.d.ts +11 -10
  54. package/ImageItem/ImageItem.js +37 -31
  55. package/ImageItem/ImageItem.module.css +30 -30
  56. package/ImageItem/tests/ImageItem-specs.js +3 -10
  57. package/Input/Input.js +9 -2
  58. package/Input/Input.module.css +37 -8
  59. package/Input/InputField.js +5 -1
  60. package/Input/InputField.module.css +17 -2
  61. package/Input/InputFieldSpotlightDecorator.js +213 -229
  62. package/Input/index.d.ts +15 -18
  63. package/Input/tests/InputField-specs.js +21 -0
  64. package/Item/Item.d.ts +16 -9
  65. package/Item/Item.js +20 -2
  66. package/Item/Item.module.css +1 -1
  67. package/KeyGuide/KeyGuide.d.ts +8 -7
  68. package/KeyGuide/KeyGuide.module.css +25 -1
  69. package/Marquee/Marquee.d.ts +2 -4
  70. package/MediaOverlay/MediaOverlay.d.ts +12 -11
  71. package/MediaOverlay/MediaOverlay.js +43 -21
  72. package/MediaOverlay/MediaOverlay.module.css +114 -15
  73. package/MediaPlayer/MediaControls.js +195 -13
  74. package/MediaPlayer/MediaControls.module.css +3 -2
  75. package/MediaPlayer/MediaSlider.module.css +7 -20
  76. package/MediaPlayer/index.d.ts +59 -7
  77. package/PageViews/PageViews.js +165 -80
  78. package/PageViews/PageViewsRouter.js +9 -0
  79. package/PageViews/tests/PageViews-specs.js +84 -0
  80. package/Panels/Header.js +48 -30
  81. package/Panels/Header.module.css +83 -31
  82. package/Panels/Panel.module.css +1 -1
  83. package/Panels/index.d.ts +7 -8
  84. package/Picker/Picker.d.ts +4 -5
  85. package/Picker/Picker.module.css +2 -2
  86. package/Popup/Popup.js +242 -240
  87. package/Popup/Popup.module.css +24 -24
  88. package/PopupTabLayout/PopupTabLayout.d.ts +5 -7
  89. package/PopupTabLayout/PopupTabLayout.js +15 -9
  90. package/PopupTabLayout/PopupTabLayout.module.css +53 -16
  91. package/PopupTabLayout/PopupTabLayoutStateContext.js +8 -0
  92. package/ProgressBar/ProgressBar.d.ts +5 -4
  93. package/ProgressBar/ProgressBarTooltip.module.css +12 -12
  94. package/ProgressButton/ProgressButton.d.ts +4 -5
  95. package/QuickGuidePanels/QuickGuidePanels.module.css +2 -2
  96. package/RadioItem/RadioItem.d.ts +18 -5
  97. package/RadioItem/RadioItem.js +67 -2
  98. package/RadioItem/RadioItem.module.css +36 -36
  99. package/RangePicker/RangePicker.module.css +2 -2
  100. package/Scroller/EditableWrapper.js +11 -4
  101. package/Scroller/Scroller.d.ts +20 -16
  102. package/Scroller/Scroller.js +9 -3
  103. package/Scroller/Scroller.module.css +4 -4
  104. package/Slider/Slider.d.ts +16 -14
  105. package/Slider/Slider.js +37 -4
  106. package/Slider/Slider.module.css +314 -91
  107. package/Slider/tests/Slider-specs.js +2 -1
  108. package/Spinner/Spinner.d.ts +5 -4
  109. package/Spinner/Spinner.module.css +9 -9
  110. package/Steps/Steps.d.ts +5 -4
  111. package/Steps/Steps.js +9 -5
  112. package/Switch/Switch.d.ts +8 -7
  113. package/Switch/Switch.module.css +100 -13
  114. package/SwitchItem/SwitchItem.d.ts +9 -6
  115. package/TabLayout/RefocusDecorator.js +15 -9
  116. package/TabLayout/TabGroup.js +3 -2
  117. package/TabLayout/TabGroup.module.css +2 -2
  118. package/TabLayout/TabLayout.d.ts +6 -0
  119. package/TabLayout/TabLayout.js +11 -1
  120. package/TabLayout/TabLayout.module.css +18 -0
  121. package/TabLayout/tests/TabLayout-specs.js +52 -0
  122. package/ThemeDecorator/ThemeDecorator.d.ts +9 -10
  123. package/ThemeDecorator/fontGenerator.js +1 -1
  124. package/ThemeDecorator/screenTypes.json +1 -0
  125. package/TimePicker/TimePicker.module.css +1 -1
  126. package/TooltipDecorator/Tooltip.module.css +1 -2
  127. package/TooltipDecorator/tests/util-specs.js +12 -0
  128. package/TooltipDecorator/useTooltip.js +1 -1
  129. package/TooltipDecorator/util.js +18 -11
  130. package/VideoPlayer/Feedback.js +3 -0
  131. package/VideoPlayer/Feedback.module.css +5 -9
  132. package/VideoPlayer/FeedbackIcons.js +1 -1
  133. package/VideoPlayer/FeedbackTooltip.module.css +55 -11
  134. package/VideoPlayer/VideoPlayer.d.ts +44 -18
  135. package/VideoPlayer/VideoPlayer.js +128 -23
  136. package/VideoPlayer/VideoPlayer.module.css +28 -11
  137. package/VirtualList/VirtualList.d.ts +9 -2
  138. package/VirtualList/VirtualList.js +31 -6
  139. package/VirtualList/tests/VirtualGridList-translate-specs.js +3 -0
  140. package/VirtualList/tests/VirtualList-specs.js +28 -1
  141. package/VirtualList/tests/VirtualList-translate-specs.js +4 -1
  142. package/WizardPanels/WizardPanels.module.css +2 -2
  143. package/WizardPanels/index.d.ts +4 -2
  144. package/fonts/Limestone_Icons.ttf +0 -0
  145. package/internal/$L/$L.js +3 -3
  146. package/internal/DateComponentPicker/DateComponentPicker.module.css +2 -2
  147. package/internal/DateTime/DateTime.module.css +1 -0
  148. package/internal/Panels/PanelsRouter.js +16 -5
  149. package/internal/Picker/Picker.module.css +2 -2
  150. package/internal/SharedStateDecorator/SharedStateDecorator.js +76 -99
  151. package/internal/validators/validators.js +21 -2
  152. package/package.json +14 -14
  153. package/styles/colors-highcontrast.less +9 -1
  154. package/styles/colors.less +11 -7
  155. package/styles/motion-mixins.less +66 -0
  156. package/styles/motions.less +78 -0
  157. package/styles/variables.less +176 -150
  158. package/useScroll/HoverToScroll.js +8 -5
  159. package/useScroll/ScrollbarTrack.module.css +8 -8
  160. package/useScroll/useEvent.js +7 -1
  161. package/useScroll/useScroll.js +2 -0
  162. package/useScroll/useScroll.module.css +6 -6
  163. package/.travis.yml +0 -40
@@ -15,8 +15,8 @@
15
15
  }
16
16
  .radioItem:global(.neutral).selected .icon {
17
17
  color: var(--semantic-color-on-surface-main-selected);
18
- background-color: var(--semantic-color-surface-accent);
19
- box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-accent);
18
+ background-color: var(--semantic-color-surface-highlight);
19
+ box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-highlight);
20
20
  }
21
21
  .radioItem:global(.neutral).selected .bg {
22
22
  background-color: transparent;
@@ -30,8 +30,8 @@
30
30
  :global(.spotlight-input-key) .radioItem:global(.neutral):global(.spottable):focus.selected .icon,
31
31
  :global(.spotlight-input-mouse) .radioItem:global(.neutral):global(.spottable):focus.selected .icon {
32
32
  color: var(--semantic-color-on-surface-main-selected);
33
- background-color: var(--semantic-color-surface-accent);
34
- box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-accent);
33
+ background-color: var(--semantic-color-surface-highlight);
34
+ box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-highlight);
35
35
  }
36
36
  :global(.spotlight-input-touch) .radioItem:global(.neutral):global(.spottable):active .icon {
37
37
  color: transparent;
@@ -40,8 +40,8 @@
40
40
  }
41
41
  :global(.spotlight-input-touch) .radioItem:global(.neutral):global(.spottable):active.selected .icon {
42
42
  color: var(--semantic-color-on-surface-main-selected);
43
- background-color: var(--semantic-color-surface-accent);
44
- box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-accent);
43
+ background-color: var(--semantic-color-surface-highlight);
44
+ box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-highlight);
45
45
  }
46
46
  :global(.enact-a11y-high-contrast) .radioItem:global(.neutral):global(.highContrast) .icon {
47
47
  color: transparent;
@@ -50,8 +50,8 @@
50
50
  }
51
51
  :global(.enact-a11y-high-contrast) .radioItem:global(.neutral):global(.highContrast).selected .icon {
52
52
  color: var(--semantic-color-on-surface-main-selected);
53
- background-color: var(--semantic-color-surface-accent);
54
- box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-accent);
53
+ background-color: var(--semantic-color-surface-highlight);
54
+ box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-highlight);
55
55
  }
56
56
  :global(.enact-a11y-high-contrast) .radioItem:global(.neutral):global(.highContrast).selected .bg {
57
57
  background-color: transparent;
@@ -65,8 +65,8 @@
65
65
  :global(.spotlight-input-key) :global(.enact-a11y-high-contrast) .radioItem:global(.neutral):global(.highContrast):global(.spottable):focus.selected .icon,
66
66
  :global(.spotlight-input-mouse) :global(.enact-a11y-high-contrast) .radioItem:global(.neutral):global(.highContrast):global(.spottable):focus.selected .icon {
67
67
  color: var(--semantic-color-on-surface-main-selected);
68
- background-color: var(--semantic-color-surface-accent);
69
- box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-accent);
68
+ background-color: var(--semantic-color-surface-highlight);
69
+ box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-highlight);
70
70
  }
71
71
  :global(.spotlight-input-touch) :global(.enact-a11y-high-contrast) .radioItem:global(.neutral):global(.highContrast):global(.spottable):active .icon {
72
72
  color: transparent;
@@ -75,8 +75,8 @@
75
75
  }
76
76
  :global(.spotlight-input-touch) :global(.enact-a11y-high-contrast) .radioItem:global(.neutral):global(.highContrast):global(.spottable):active.selected .icon {
77
77
  color: var(--semantic-color-on-surface-main-selected);
78
- background-color: var(--semantic-color-surface-accent);
79
- box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-accent);
78
+ background-color: var(--semantic-color-surface-highlight);
79
+ box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-highlight);
80
80
  }
81
81
  .radioItem:global(.light) .icon {
82
82
  color: transparent;
@@ -85,8 +85,8 @@
85
85
  }
86
86
  .radioItem:global(.light).selected .icon {
87
87
  color: var(--semantic-color-on-surface-main-selected);
88
- background-color: var(--semantic-color-surface-accent);
89
- box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-accent);
88
+ background-color: var(--semantic-color-surface-highlight);
89
+ box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-highlight);
90
90
  }
91
91
  .radioItem:global(.light).selected .bg {
92
92
  background-color: transparent;
@@ -100,8 +100,8 @@
100
100
  :global(.spotlight-input-key) .radioItem:global(.light):global(.spottable):focus.selected .icon,
101
101
  :global(.spotlight-input-mouse) .radioItem:global(.light):global(.spottable):focus.selected .icon {
102
102
  color: var(--semantic-color-on-surface-main-selected);
103
- background-color: var(--semantic-color-surface-accent);
104
- box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-accent);
103
+ background-color: var(--semantic-color-surface-highlight);
104
+ box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-highlight);
105
105
  }
106
106
  :global(.spotlight-input-touch) .radioItem:global(.light):global(.spottable):active .icon {
107
107
  color: transparent;
@@ -110,8 +110,8 @@
110
110
  }
111
111
  :global(.spotlight-input-touch) .radioItem:global(.light):global(.spottable):active.selected .icon {
112
112
  color: var(--semantic-color-on-surface-main-selected);
113
- background-color: var(--semantic-color-surface-accent);
114
- box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-accent);
113
+ background-color: var(--semantic-color-surface-highlight);
114
+ box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-highlight);
115
115
  }
116
116
  .radioItem:global(.game) {
117
117
  --semantic-color-surface-default: #2d224c;
@@ -125,8 +125,8 @@
125
125
  }
126
126
  .radioItem:global(.game).selected .icon {
127
127
  color: var(--semantic-color-on-surface-main-selected);
128
- background-color: var(--semantic-color-surface-accent);
129
- box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-accent);
128
+ background-color: var(--semantic-color-surface-highlight);
129
+ box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-highlight);
130
130
  }
131
131
  .radioItem:global(.game).selected .bg {
132
132
  background-color: transparent;
@@ -140,8 +140,8 @@
140
140
  :global(.spotlight-input-key) .radioItem:global(.game):global(.spottable):focus.selected .icon,
141
141
  :global(.spotlight-input-mouse) .radioItem:global(.game):global(.spottable):focus.selected .icon {
142
142
  color: var(--semantic-color-on-surface-main-selected);
143
- background-color: var(--semantic-color-surface-accent);
144
- box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-accent);
143
+ background-color: var(--semantic-color-surface-highlight);
144
+ box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-highlight);
145
145
  }
146
146
  :global(.spotlight-input-touch) .radioItem:global(.game):global(.spottable):active .icon {
147
147
  color: transparent;
@@ -150,8 +150,8 @@
150
150
  }
151
151
  :global(.spotlight-input-touch) .radioItem:global(.game):global(.spottable):active.selected .icon {
152
152
  color: var(--semantic-color-on-surface-main-selected);
153
- background-color: var(--semantic-color-surface-accent);
154
- box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-accent);
153
+ background-color: var(--semantic-color-surface-highlight);
154
+ box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-highlight);
155
155
  }
156
156
  :global(.green) .radioItem:global(.game) {
157
157
  --semantic-color-surface-default: #1F2C24;
@@ -164,8 +164,8 @@
164
164
  }
165
165
  :global(.green) .radioItem:global(.game).selected .icon {
166
166
  color: var(--semantic-color-on-surface-main-selected);
167
- background-color: var(--semantic-color-surface-accent);
168
- box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-accent);
167
+ background-color: var(--semantic-color-surface-highlight);
168
+ box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-highlight);
169
169
  }
170
170
  :global(.green) .radioItem:global(.game).selected .bg {
171
171
  background-color: transparent;
@@ -179,8 +179,8 @@
179
179
  :global(.spotlight-input-key) :global(.green) .radioItem:global(.game):global(.spottable):focus.selected .icon,
180
180
  :global(.spotlight-input-mouse) :global(.green) .radioItem:global(.game):global(.spottable):focus.selected .icon {
181
181
  color: var(--semantic-color-on-surface-main-selected);
182
- background-color: var(--semantic-color-surface-accent);
183
- box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-accent);
182
+ background-color: var(--semantic-color-surface-highlight);
183
+ box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-highlight);
184
184
  }
185
185
  :global(.spotlight-input-touch) :global(.green) .radioItem:global(.game):global(.spottable):active .icon {
186
186
  color: transparent;
@@ -189,8 +189,8 @@
189
189
  }
190
190
  :global(.spotlight-input-touch) :global(.green) .radioItem:global(.game):global(.spottable):active.selected .icon {
191
191
  color: var(--semantic-color-on-surface-main-selected);
192
- background-color: var(--semantic-color-surface-accent);
193
- box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-accent);
192
+ background-color: var(--semantic-color-surface-highlight);
193
+ box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-highlight);
194
194
  }
195
195
  :global(.orange) .radioItem:global(.game) {
196
196
  --semantic-color-surface-default: #422923;
@@ -203,8 +203,8 @@
203
203
  }
204
204
  :global(.orange) .radioItem:global(.game).selected .icon {
205
205
  color: var(--semantic-color-on-surface-main-selected);
206
- background-color: var(--semantic-color-surface-accent);
207
- box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-accent);
206
+ background-color: var(--semantic-color-surface-highlight);
207
+ box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-highlight);
208
208
  }
209
209
  :global(.orange) .radioItem:global(.game).selected .bg {
210
210
  background-color: transparent;
@@ -218,8 +218,8 @@
218
218
  :global(.spotlight-input-key) :global(.orange) .radioItem:global(.game):global(.spottable):focus.selected .icon,
219
219
  :global(.spotlight-input-mouse) :global(.orange) .radioItem:global(.game):global(.spottable):focus.selected .icon {
220
220
  color: var(--semantic-color-on-surface-main-selected);
221
- background-color: var(--semantic-color-surface-accent);
222
- box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-accent);
221
+ background-color: var(--semantic-color-surface-highlight);
222
+ box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-highlight);
223
223
  }
224
224
  :global(.spotlight-input-touch) :global(.orange) .radioItem:global(.game):global(.spottable):active .icon {
225
225
  color: transparent;
@@ -228,6 +228,6 @@
228
228
  }
229
229
  :global(.spotlight-input-touch) :global(.orange) .radioItem:global(.game):global(.spottable):active.selected .icon {
230
230
  color: var(--semantic-color-on-surface-main-selected);
231
- background-color: var(--semantic-color-surface-accent);
232
- box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-accent);
231
+ background-color: var(--semantic-color-surface-highlight);
232
+ box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-highlight);
233
233
  }
@@ -8,12 +8,12 @@
8
8
  margin-bottom: 0;
9
9
  }
10
10
  .title {
11
- margin-left: 1.875rem;
11
+ margin-left: calc(var(--primitive-spacing-36) + var(--primitive-spacing-36) + 18px);
12
12
  margin-right: var(--primitive-spacing-24);
13
13
  }
14
14
  :global(.enact-locale-right-to-left) .title {
15
15
  margin-left: var(--primitive-spacing-24);
16
- margin-right: 1.875rem;
16
+ margin-right: calc(var(--primitive-spacing-36) + var(--primitive-spacing-36) + 18px);
17
17
  }
18
18
  .title.inlineTitle {
19
19
  display: inline-block;
@@ -228,9 +228,6 @@ var EditableWrapper = exports.EditableWrapper = function EditableWrapper(props)
228
228
  mutableRef.current.prevToIndex = mutableRef.current.fromIndex;
229
229
  updateArrowIcon(mutableRef.current.fromIndex);
230
230
  setTimeout(function () {
231
- if (item !== null && item !== void 0 && item.children[1]) {
232
- item.children[1].ariaLabel = '';
233
- }
234
231
  if (!mutableRef.current.initialSelected) {
235
232
  announceRef.current.announce(mutableRef.current.selectedItemLabel + (0, _$L["default"])('Press the left/right button to move or press the up button to select other options.'));
236
233
  }
@@ -615,8 +612,8 @@ var EditableWrapper = exports.EditableWrapper = function EditableWrapper(props)
615
612
  if (selectItemBy === 'press') {
616
613
  if ((0, _pointer.getPointerMode)()) {
617
614
  _spotlight["default"].setPointerMode(false);
618
- _spotlight["default"].focus(focusTarget);
619
615
  }
616
+ _spotlight["default"].focus(focusTarget);
620
617
  focusItem(focusTarget);
621
618
  }
622
619
  setTimeout(function () {
@@ -982,6 +979,16 @@ var EditableWrapper = exports.EditableWrapper = function EditableWrapper(props)
982
979
  });
983
980
  }, []); // eslint-disable-line react-hooks/exhaustive-deps
984
981
 
982
+ // We set 'data-is-hiding' for all hidden items at component mount
983
+ (0, _react.useEffect)(function () {
984
+ children.map(function (child, index) {
985
+ if (index >= mutableRef.current.hideIndex) {
986
+ var hiddenElement = document.querySelector('[aria-label="' + child.props['aria-label'] + '"]');
987
+ hiddenElement.setAttribute('data-is-hiding', true);
988
+ }
989
+ });
990
+ }, []); // eslint-disable-line react-hooks/exhaustive-deps
991
+
985
992
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(TouchableDiv, {
986
993
  holdConfig: holdConfig,
987
994
  className: (0, _classnames["default"])(mergedCss.wrapper, _defineProperty({}, mergedCss.centered, centered)),
@@ -19,43 +19,43 @@ export interface EditableShape {
19
19
  * The callback function called when editing is finished.
20
20
  It has an event object contains `orders` array which app can use for repopulate items.
21
21
  */
22
- onComplete: Function /**
22
+ onComplete: Function; /**
23
23
  * Obtains a reference to `blurItem` function.
24
24
  If you would like to remove `focused` CSS class to an item, you can get the reference to `blurItem` function via `useRef` .
25
25
  `blurItem` function needs to be called with an item node when an item is blurred.
26
- */;
27
- blurItemFuncRef?: Function | object /**
26
+ */
27
+ blurItemFuncRef?: Function | object; /**
28
28
  * Centers the contents of the scroller.
29
- */;
30
- centered?: boolean /**
29
+ */
30
+ centered?: boolean; /**
31
31
  * Customizes the component by mapping the supplied collection of CSS class names to the
32
32
  corresponding internal elements and states of this component.
33
33
  The following classes are supported:
34
34
  * * `wrapper` - The content wrapper component class
35
35
  * * `selected` - The selected item class
36
36
  * * `focused` - The focused item class
37
- */;
38
- css?: object /**
37
+ */
38
+ css?: object; /**
39
39
  * Obtains a reference to `focusItem` function.
40
40
  If you would like to use `focused` CSS class to an item, you can get the reference to `focusItem` function via `useRef` .
41
41
  `focusItem` function needs to be called with an item node when an item is focused.
42
- */;
43
- focusItemFuncRef?: Function | object /**
42
+ */
43
+ focusItemFuncRef?: Function | object; /**
44
44
  * Obtains a reference to `hideItem` function.
45
45
  If you would like to hide an item, you can get the reference to `hideItem` function via `useRef` .
46
- */;
47
- hideItemFuncRef?: Function | object /**
46
+ */
47
+ hideItemFuncRef?: Function | object; /**
48
48
  * Obtains a reference to `removeItem` function.
49
49
  If you would like to remove an item, you can get the reference to `removeItem` function via `useRef` .
50
- */;
51
- removeItemFuncRef?: Function | object /**
50
+ */
51
+ removeItemFuncRef?: Function | object; /**
52
52
  * Decides how to start editing items.
53
53
  It can be either `'press'` or `'longPress'` . If unset, it defaults to `'longPress'` .
54
- */;
55
- selectItemBy?: string /**
54
+ */
55
+ selectItemBy?: string; /**
56
56
  * Obtains a reference to `showItem` function.
57
57
  If you would like to show an item, you can get the reference to `showItem` function via `useRef` .
58
- */;
58
+ */
59
59
  showItemFuncRef?: Function | object;
60
60
  }
61
61
  export interface ScrollerProps extends ui_Scroller_ScrollerBasicProps {
@@ -217,6 +217,10 @@ corresponding internal elements and states of this component.
217
217
  * Specifies how to scroll.
218
218
  */
219
219
  scrollMode?: "native" | "translate";
220
+ /**
221
+ * Scrolls to the container created by when descendants get focused.
222
+ */
223
+ scrollToContentContainerOnFocus?: boolean;
220
224
  /**
221
225
  * Specifies how to show vertical scrollbar.
222
226
  */
@@ -78,6 +78,7 @@ var scrollerDefaultProps = {
78
78
  track: false,
79
79
  wheel: true
80
80
  },
81
+ scrollToContentContainerOnFocus: true,
81
82
  scrollMode: 'native',
82
83
  verticalScrollbar: 'auto'
83
84
  };
@@ -114,9 +115,7 @@ var Scroller = exports.Scroller = function Scroller(props) {
114
115
 
115
116
  // Hooks
116
117
 
117
- var _useScroll = (0, _useScroll2["default"])(_objectSpread(_objectSpread({}, rest), {}, {
118
- scrollToContentContainerOnFocus: true
119
- })),
118
+ var _useScroll = (0, _useScroll2["default"])(_objectSpread({}, rest)),
120
119
  ScrollContentWrapper = _useScroll.scrollContentWrapper,
121
120
  scrollContentHandle = _useScroll.scrollContentHandle,
122
121
  isHorizontalScrollbarVisible = _useScroll.isHorizontalScrollbarVisible,
@@ -441,6 +440,13 @@ Scroller.propTypes = /** @lends limestone/Scroller.Scroller.prototype */{
441
440
  * @public
442
441
  */
443
442
  scrollMode: _propTypes["default"].oneOf(['native', 'translate']),
443
+ /**
444
+ * Scrolls to the container created by {@link limestone/Scroller.ContentContainerDecorator} when descendants get focused.
445
+ * @type {Boolean}
446
+ * @default true
447
+ * @public
448
+ */
449
+ scrollToContentContainerOnFocus: _propTypes["default"].bool,
444
450
  /**
445
451
  * Specifies how to show vertical scrollbar.
446
452
  *
@@ -12,7 +12,7 @@
12
12
  right: 0;
13
13
  bottom: 0;
14
14
  left: 0;
15
- border-radius: 0.25rem;
15
+ border-radius: var(--primitive-radius-12);
16
16
  opacity: 0;
17
17
  }
18
18
  :global(.spotlight-input-key):global(.spotlight-input-key) .focusableBody:global(.spottable):focus::before,
@@ -29,11 +29,11 @@
29
29
  mask-image: linear-gradient(transparent, #000 1rem, #000 calc(100% - 1rem), transparent 100%);
30
30
  }
31
31
  .focusableBody .verticalFadeout {
32
- padding: 1.5rem 1rem 1.5rem 1.875rem;
33
- mask-image: linear-gradient(transparent 0.5rem, #000 calc(0.5rem + 1rem), #000 calc(100% - 1rem - 0.5rem), transparent calc(100% - 0.5rem));
32
+ padding: var(--primitive-spacing-72) var(--primitive-spacing-48) var(--primitive-spacing-72) var(--primitive-spacing-90);
33
+ mask-image: linear-gradient(transparent var(--primitive-spacing-24), #000 calc(var(--primitive-spacing-24) + 1rem), #000 calc(100% - 1rem - var(--primitive-spacing-24)), transparent calc(100% - var(--primitive-spacing-24)));
34
34
  }
35
35
  :global(.enact-locale-right-to-left) .focusableBody .verticalFadeout {
36
- padding: 1.5rem 1.875rem 1.5rem 1rem;
36
+ padding: var(--primitive-spacing-72) var(--primitive-spacing-90) var(--primitive-spacing-72) var(--primitive-spacing-48);
37
37
  }
38
38
  .horizontalFadeout {
39
39
  padding: 0 1rem;
@@ -11,8 +11,10 @@ import { SliderBaseProps as ui_Slider_SliderBaseProps } from "@enact/ui/Slider";
11
11
  type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
12
12
  type Merge<M, N> = Omit<M, Extract<keyof M, keyof N>> & N;
13
13
 
14
- export interface SliderBaseProps
15
- extends Omit<ui_Slider_SliderBaseProps, "progressBarComponent"> {
14
+ export interface SliderBaseProps extends Omit<
15
+ ui_Slider_SliderBaseProps,
16
+ "progressBarComponent"
17
+ > {
16
18
  /**
17
19
  * Activates the component when selected so that it may be manipulated via the directional
18
20
  input keys.
@@ -104,6 +106,10 @@ this callback.
104
106
  * Displays an anchor at `progressAnchor` .
105
107
  */
106
108
  showAnchor?: boolean;
109
+ /**
110
+ * Displays the min and max values at the edges of the slider.
111
+ */
112
+ showMinMax?: boolean;
107
113
  /**
108
114
  * The amount to increment or decrement the value.
109
115
  *
@@ -162,20 +168,16 @@ export class SliderBase extends React.Component<
162
168
  Merge<React.HTMLProps<HTMLElement>, SliderBaseProps>
163
169
  > {}
164
170
 
165
- export interface SliderDecoratorProps
166
- extends Merge<
171
+ export interface SliderDecoratorProps extends Merge<
172
+ Merge<
167
173
  Merge<
168
- Merge<
169
- Merge<
170
- ui_Changeable_ChangeableProps,
171
- spotlight_Spottable_SpottableProps
172
- >,
173
- limestone_Skinnable_SkinnableProps
174
- >,
175
- ui_Slottable_SlottableProps
174
+ Merge<ui_Changeable_ChangeableProps, spotlight_Spottable_SpottableProps>,
175
+ limestone_Skinnable_SkinnableProps
176
176
  >,
177
- ui_Slider_SliderDecoratorProps
178
- > {}
177
+ ui_Slottable_SlottableProps
178
+ >,
179
+ ui_Slider_SliderDecoratorProps
180
+ > {}
179
181
  export function SliderDecorator<P>(
180
182
  Component: React.ComponentType<P> | string,
181
183
  ): React.ComponentType<P & SliderDecoratorProps>;
package/Slider/Slider.js CHANGED
@@ -23,6 +23,7 @@ var _ProgressBar = _interopRequireDefault(require("@enact/ui/ProgressBar"));
23
23
  var _Pure = _interopRequireDefault(require("@enact/ui/internal/Pure"));
24
24
  var _Slottable = _interopRequireDefault(require("@enact/ui/Slottable"));
25
25
  var _Slider = _interopRequireDefault(require("@enact/ui/Slider"));
26
+ var _Touchable = _interopRequireDefault(require("@enact/ui/Touchable"));
26
27
  var _classnames2 = _interopRequireDefault(require("classnames"));
27
28
  var _propTypes = _interopRequireDefault(require("prop-types"));
28
29
  var _anyPass = _interopRequireDefault(require("ramda/src/anyPass"));
@@ -35,7 +36,7 @@ var _SliderBehaviorDecorator = _interopRequireDefault(require("./SliderBehaviorD
35
36
  var _utils = require("./utils");
36
37
  var _SliderModule = _interopRequireDefault(require("./Slider.module.css"));
37
38
  var _jsxRuntime = require("react/jsx-runtime");
38
- var _excluded = ["active", "className", "css", "disabled", "focused", "keyFrequency", "showAnchor"];
39
+ var _excluded = ["active", "className", "css", "disabled", "focused", "keyFrequency", "max", "min", "pressed", "showAnchor", "showMinMax"];
39
40
  /**
40
41
  * Provides Limestone-themed slider components and behaviors.
41
42
  *
@@ -70,6 +71,7 @@ var sliderDefaultProps = {
70
71
  max: 100,
71
72
  min: 0,
72
73
  orientation: 'horizontal',
74
+ pressed: false,
73
75
  step: 1,
74
76
  wheelInterval: 0
75
77
  };
@@ -92,7 +94,11 @@ var SliderBase = exports.SliderBase = function SliderBase(props) {
92
94
  disabled = sliderProps.disabled,
93
95
  focused = sliderProps.focused,
94
96
  keyFrequency = sliderProps.keyFrequency,
97
+ max = sliderProps.max,
98
+ min = sliderProps.min,
99
+ pressed = sliderProps.pressed,
95
100
  showAnchor = sliderProps.showAnchor,
101
+ showMinMax = sliderProps.showMinMax,
96
102
  rest = _objectWithoutProperties(sliderProps, _excluded);
97
103
  (0, _validators.validateSteppedOnce)(function (p) {
98
104
  return p.knobStep;
@@ -129,7 +135,7 @@ var SliderBase = exports.SliderBase = function SliderBase(props) {
129
135
  customCss: css,
130
136
  publicClassNames: true
131
137
  });
132
- var componentClassName = (0, _classnames2["default"])(_SliderModule["default"].slider, className, _defineProperty(_defineProperty({}, mergedCss.active, active), mergedCss.showAnchor, showAnchor), css && css.slider);
138
+ var componentClassName = (0, _classnames2["default"])(_SliderModule["default"].slider, className, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, mergedCss.active, active), mergedCss.hasMinMax, showMinMax), mergedCss.pressed, pressed), mergedCss.showAnchor, showAnchor), css && css.slider);
133
139
  (0, _react.useEffect)(function () {
134
140
  spotlightAccelerator.current = new _Accelerator["default"](keyFrequency);
135
141
  }, [keyFrequency]);
@@ -160,6 +166,8 @@ var SliderBase = exports.SliderBase = function SliderBase(props) {
160
166
  className: componentClassName,
161
167
  css: mergedCss,
162
168
  disabled: disabled,
169
+ max: max,
170
+ min: min,
163
171
  progressBarComponent: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ProgressBar["default"], {
164
172
  css: mergedCss
165
173
  }),
@@ -169,7 +177,15 @@ var SliderBase = exports.SliderBase = function SliderBase(props) {
169
177
  component: tooltip,
170
178
  css: mergedCss,
171
179
  visible: focused
172
- })
180
+ }),
181
+ minMaxComponent: showMinMax ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
182
+ className: mergedCss.minMax,
183
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
184
+ children: min
185
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
186
+ children: max
187
+ })]
188
+ }) : null
173
189
  }));
174
190
  };
175
191
  SliderBase.displayName = 'Slider';
@@ -304,6 +320,14 @@ SliderBase.propTypes = /** @lends limestone/Slider.SliderBase.prototype */{
304
320
  * @public
305
321
  */
306
322
  onKeyUp: _propTypes["default"].func,
323
+ /**
324
+ * Indicates if the component is pressed.
325
+ *
326
+ * @type {Boolean}
327
+ * @default false
328
+ * @private
329
+ */
330
+ pressed: _propTypes["default"].bool,
307
331
  /**
308
332
  * Displays an anchor at `progressAnchor`.
309
333
  *
@@ -311,6 +335,13 @@ SliderBase.propTypes = /** @lends limestone/Slider.SliderBase.prototype */{
311
335
  * @public
312
336
  */
313
337
  showAnchor: _propTypes["default"].bool,
338
+ /**
339
+ * Displays the min and max values at the edges of the slider.
340
+ *
341
+ * @type {Boolean}
342
+ * @public
343
+ */
344
+ showMinMax: _propTypes["default"].bool,
314
345
  /**
315
346
  * The amount to increment or decrement the value.
316
347
  *
@@ -391,7 +422,9 @@ SliderBase.propTypes = /** @lends limestone/Slider.SliderBase.prototype */{
391
422
  * @mixes ui/Slider.SliderDecorator
392
423
  * @public
393
424
  */
394
- var SliderDecorator = exports.SliderDecorator = (0, _compose["default"])(_Pure["default"], _Changeable["default"], _SliderBehaviorDecorator["default"], _Spottable["default"], (0, _Slottable["default"])({
425
+ var SliderDecorator = exports.SliderDecorator = (0, _compose["default"])(_Pure["default"], (0, _Touchable["default"])({
426
+ activeProp: 'pressed'
427
+ }), _Changeable["default"], _SliderBehaviorDecorator["default"], _Spottable["default"], (0, _Slottable["default"])({
395
428
  slots: ['knob', 'tooltip']
396
429
  }), _Skinnable["default"]);
397
430