@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.
- 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 +13 -2
- package/Alert/Alert.js +39 -5
- package/Alert/Alert.module.css +48 -1
- package/Alert/tests/Alert-specs.js +91 -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/Button/tests/Button-specs.js +26 -0
- package/CHANGELOG.md +254 -0
- package/Card/Card.d.ts +40 -12
- package/Card/Card.js +164 -28
- package/Card/Card.module.css +277 -58
- package/Card/tests/Card-specs.js +67 -3
- 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 +71 -4
- package/Chips/Chip.js +72 -13
- package/Chips/Chip.module.css +3 -3
- package/Chips/Chips.js +37 -17
- package/Chips/Chips.module.css +1 -1
- package/Chips/tests/Chip-specs.js +43 -13
- package/Chips/tests/Chips-specs.js +31 -21
- package/ColorPicker/ColorPicker.js +27 -25
- package/ContextualMenuDecorator/ContextualMenuDecorator.d.ts +4 -5
- package/ContextualPopupDecorator/ContextualPopup.module.css +34 -34
- package/ContextualPopupDecorator/ContextualPopupDecorator.js +567 -549
- package/DatePicker/DatePicker.d.ts +4 -5
- package/DayPicker/DayPicker.d.ts +8 -7
- package/DayPicker/DaySelectorDecorator.js +12 -7
- package/Dropdown/Dropdown.d.ts +11 -13
- package/Dropdown/Dropdown.module.css +13 -9
- package/Dropdown/DropdownList.js +80 -54
- package/FixedPopupPanels/FixedPopupPanels.d.ts +4 -2
- package/FixedPopupPanels/FixedPopupPanels.module.css +18 -18
- package/FlexiblePopupPanels/FlexiblePopupPanels.module.css +23 -23
- package/FlexiblePopupPanels/useNavButtonFocus.js +7 -10
- package/FormCheckboxItem/FormCheckboxItem.d.ts +5 -4
- package/Heading/Heading.d.ts +9 -8
- package/Heading/Heading.js +2 -2
- package/Heading/Heading.module.css +5 -5
- package/Icon/Icon.d.ts +15 -4
- package/Icon/Icon.js +49 -2
- package/Icon/Icon.module.css +1 -1
- package/Icon/IconList.js +27 -1
- package/IconItem/IconItem.d.ts +13 -12
- package/IconItem/IconItem.js +15 -0
- package/IconItem/IconItem.module.css +107 -1
- package/IconItem/tests/IconItem-specs.js +30 -1
- package/Image/Image.d.ts +5 -4
- package/Image/Image.js +6 -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 +21 -3
- package/Input/Input.module.css +37 -8
- package/Input/InputField.js +79 -24
- package/Input/InputField.module.css +273 -41
- package/Input/InputFieldDecoratorIcon.js +1 -0
- package/Input/InputFieldSpotlightDecorator.js +257 -228
- package/Input/index.d.ts +120 -111
- package/Input/tests/Input-specs.js +26 -0
- package/Input/tests/InputField-specs.js +170 -3
- package/Input/tests/InputPopup-specs.js +1 -1
- 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.js +29 -27
- 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/MediaOverlay/tests/MediaOverlay-specs.js +29 -0
- 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/MediaPlayer/tests/util-specs.js +4 -1
- package/PageViews/PageViews.js +232 -82
- package/PageViews/PageViews.module.css +3 -0
- package/PageViews/PageViewsRouter.js +100 -42
- package/PageViews/tests/PageViews-specs.js +171 -0
- package/Panels/Header.js +54 -34
- 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 +245 -242
- package/Popup/Popup.module.css +24 -24
- package/PopupTabLayout/PopupTabLayout.d.ts +5 -7
- package/PopupTabLayout/PopupTabLayout.js +26 -18
- 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 +69 -2
- package/RadioItem/RadioItem.module.css +36 -36
- package/RangePicker/RangePicker.module.css +2 -2
- package/Scroller/EditableWrapper.js +28 -18
- package/Scroller/Scroller.d.ts +20 -16
- package/Scroller/Scroller.js +20 -13
- package/Scroller/Scroller.module.css +4 -4
- package/Scroller/useThemeScroller.js +3 -3
- package/Slider/Slider.d.ts +20 -14
- package/Slider/Slider.js +71 -14
- package/Slider/Slider.module.css +464 -91
- package/Slider/SliderBehaviorDecorator.js +16 -14
- package/Slider/tests/Slider-specs.js +53 -1
- package/Slider/utils.js +23 -7
- package/Spinner/Spinner.d.ts +5 -4
- package/Spinner/Spinner.js +10 -8
- 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 +26 -18
- 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/TabGroup-specs.js +1 -1
- package/TabLayout/tests/TabLayout-specs.js +52 -0
- package/ThemeDecorator/AccessibilityDecorator.js +12 -11
- package/ThemeDecorator/I18nFontDecorator.js +6 -4
- package/ThemeDecorator/ThemeDecorator.d.ts +16 -10
- package/ThemeDecorator/ThemeDecorator.js +24 -9
- package/ThemeDecorator/fontGenerator.js +1 -1
- package/ThemeDecorator/screenTypes.json +1 -0
- package/TimePicker/TimePicker.module.css +1 -1
- package/TimePicker/TimePickerBase.js +5 -3
- package/TooltipDecorator/Tooltip.module.css +1 -2
- package/TooltipDecorator/TooltipDecorator.js +12 -7
- package/TooltipDecorator/tests/useTooltip-specs.js +5 -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 +153 -47
- package/VideoPlayer/VideoPlayer.module.css +28 -11
- package/VirtualList/VirtualList.d.ts +9 -2
- package/VirtualList/VirtualList.js +51 -24
- 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/useSpotlight.js +1 -1
- package/WizardPanels/WizardPanels.module.css +2 -2
- package/WizardPanels/index.d.ts +4 -2
- package/fonts/Limestone_Icons.ttf +0 -0
- package/internal/$L/$L.js +3 -3
- package/internal/AsyncRenderChildren/AsyncRenderChildren.js +9 -5
- package/internal/AsyncRenderChildren/tests/AsyncRenderChildren-specs.js +4 -1
- package/internal/DateComponentPicker/DateComponentPicker.module.css +2 -2
- package/internal/DateTime/DateTime.module.css +1 -0
- package/internal/DateTime/DateTimeDecorator.js +5 -4
- package/internal/Panels/PanelsRouter.js +48 -31
- package/internal/Panels/useAutoFocus.js +10 -6
- package/internal/Panels/useFocusOnTransition.js +4 -3
- package/internal/Picker/Picker.js +7 -5
- package/internal/Picker/Picker.module.css +2 -2
- package/internal/Picker/SpottablePicker.js +15 -13
- package/internal/SharedStateDecorator/SharedStateDecorator.js +78 -99
- package/internal/validators/validators.js +21 -2
- package/package.json +18 -15
- package/styles/colors-highcontrast.less +9 -1
- package/styles/colors.less +12 -7
- package/styles/motion-mixins.less +66 -0
- package/styles/motions.less +78 -0
- package/styles/variables.less +176 -150
- package/useScroll/HoverToScroll.js +23 -17
- package/useScroll/Scrollbar.js +14 -10
- package/useScroll/ScrollbarPlaceholder.js +3 -5
- package/useScroll/ScrollbarTrack.js +7 -5
- package/useScroll/ScrollbarTrack.module.css +8 -8
- package/useScroll/useEvent.js +14 -3
- package/useScroll/useScroll.js +12 -2
- package/useScroll/useScroll.module.css +6 -6
- 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-
|
|
19
|
-
box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-
|
|
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-
|
|
34
|
-
box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-
|
|
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-
|
|
44
|
-
box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-
|
|
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-
|
|
54
|
-
box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-
|
|
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-
|
|
69
|
-
box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-
|
|
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-
|
|
79
|
-
box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-
|
|
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-
|
|
89
|
-
box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-
|
|
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-
|
|
104
|
-
box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-
|
|
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-
|
|
114
|
-
box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-
|
|
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-
|
|
129
|
-
box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-
|
|
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-
|
|
144
|
-
box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-
|
|
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-
|
|
154
|
-
box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-
|
|
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-
|
|
168
|
-
box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-
|
|
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-
|
|
183
|
-
box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-
|
|
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-
|
|
193
|
-
box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-
|
|
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-
|
|
207
|
-
box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-
|
|
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-
|
|
222
|
-
box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-
|
|
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-
|
|
232
|
-
box-shadow: 0 0 0 0.08333rem var(--semantic-color-surface-
|
|
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:
|
|
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:
|
|
16
|
+
margin-right: calc(var(--primitive-spacing-36) + var(--primitive-spacing-36) + 18px);
|
|
17
17
|
}
|
|
18
18
|
.title.inlineTitle {
|
|
19
19
|
display: inline-block;
|
|
@@ -8,6 +8,7 @@ var _handle = require("@enact/core/handle");
|
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("@enact/core/internal/prop-types"));
|
|
9
9
|
var _keymap = require("@enact/core/keymap");
|
|
10
10
|
var _usePublicClassNames = require("@enact/core/usePublicClassNames");
|
|
11
|
+
var _util = require("@enact/core/util");
|
|
11
12
|
var _spotlight = _interopRequireWildcard(require("@enact/spotlight"));
|
|
12
13
|
var _container = require("@enact/spotlight/src/container");
|
|
13
14
|
var _target = require("@enact/spotlight/src/target");
|
|
@@ -89,21 +90,22 @@ var holdConfig = {
|
|
|
89
90
|
* @ui
|
|
90
91
|
* @public
|
|
91
92
|
*/
|
|
92
|
-
var
|
|
93
|
+
var _EditableWrapper = exports.EditableWrapper = function EditableWrapper(props) {
|
|
93
94
|
var _editable$hideIndex;
|
|
95
|
+
(0, _util.checkPropTypes)(_EditableWrapper, props);
|
|
94
96
|
var children = props.children,
|
|
95
97
|
editable = props.editable,
|
|
96
98
|
scrollContainerHandle = props.scrollContainerHandle,
|
|
97
99
|
scrollContainerRef = props.scrollContainerRef,
|
|
98
100
|
scrollContentRef = props.scrollContentRef;
|
|
99
|
-
var centered = (editable === null || editable === void 0 ? void 0 : editable.centered) != null ? editable.centered : true;
|
|
100
|
-
var selectItemBy = (editable === null || editable === void 0 ? void 0 : editable.selectItemBy) || 'longPress';
|
|
101
|
-
var customCss = (editable === null || editable === void 0 ? void 0 : editable.css) || {};
|
|
102
101
|
var removeItemFuncRef = editable === null || editable === void 0 ? void 0 : editable.removeItemFuncRef;
|
|
103
102
|
var hideItemFuncRef = editable === null || editable === void 0 ? void 0 : editable.hideItemFuncRef;
|
|
104
103
|
var showItemFuncRef = editable === null || editable === void 0 ? void 0 : editable.showItemFuncRef;
|
|
105
104
|
var focusItemFuncRef = editable === null || editable === void 0 ? void 0 : editable.focusItemFuncRef;
|
|
106
105
|
var blurItemFuncRef = editable === null || editable === void 0 ? void 0 : editable.blurItemFuncRef;
|
|
106
|
+
var centered = (editable === null || editable === void 0 ? void 0 : editable.centered) != null ? editable.centered : true;
|
|
107
|
+
var selectItemBy = (editable === null || editable === void 0 ? void 0 : editable.selectItemBy) || 'longPress';
|
|
108
|
+
var customCss = (editable === null || editable === void 0 ? void 0 : editable.css) || {};
|
|
107
109
|
var mergedCss = (0, _usePublicClassNames.usePublicClassNames)({
|
|
108
110
|
componentCss: _EditableWrapperModule["default"],
|
|
109
111
|
customCss: customCss,
|
|
@@ -126,7 +128,7 @@ var EditableWrapper = exports.EditableWrapper = function EditableWrapper(props)
|
|
|
126
128
|
// Indices
|
|
127
129
|
fromIndex: null,
|
|
128
130
|
prevToIndex: null,
|
|
129
|
-
hideIndex: null,
|
|
131
|
+
hideIndex: (_editable$hideIndex = editable === null || editable === void 0 ? void 0 : editable.hideIndex) !== null && _editable$hideIndex !== void 0 ? _editable$hideIndex : dataSize,
|
|
130
132
|
// Position for restoring focus after removing item
|
|
131
133
|
nextSpotlightRect: null,
|
|
132
134
|
// Move direction from the starting position to the current position
|
|
@@ -146,7 +148,6 @@ var EditableWrapper = exports.EditableWrapper = function EditableWrapper(props)
|
|
|
146
148
|
initialSelected: editable === null || editable === void 0 ? void 0 : editable.initialSelected
|
|
147
149
|
});
|
|
148
150
|
var announceRef = (0, _react.useRef)({});
|
|
149
|
-
mutableRef.current.hideIndex = (_editable$hideIndex = editable === null || editable === void 0 ? void 0 : editable.hideIndex) !== null && _editable$hideIndex !== void 0 ? _editable$hideIndex : dataSize;
|
|
150
151
|
|
|
151
152
|
// Functions
|
|
152
153
|
|
|
@@ -228,9 +229,6 @@ var EditableWrapper = exports.EditableWrapper = function EditableWrapper(props)
|
|
|
228
229
|
mutableRef.current.prevToIndex = mutableRef.current.fromIndex;
|
|
229
230
|
updateArrowIcon(mutableRef.current.fromIndex);
|
|
230
231
|
setTimeout(function () {
|
|
231
|
-
if (item !== null && item !== void 0 && item.children[1]) {
|
|
232
|
-
item.children[1].ariaLabel = '';
|
|
233
|
-
}
|
|
234
232
|
if (!mutableRef.current.initialSelected) {
|
|
235
233
|
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
234
|
}
|
|
@@ -615,8 +613,8 @@ var EditableWrapper = exports.EditableWrapper = function EditableWrapper(props)
|
|
|
615
613
|
if (selectItemBy === 'press') {
|
|
616
614
|
if ((0, _pointer.getPointerMode)()) {
|
|
617
615
|
_spotlight["default"].setPointerMode(false);
|
|
618
|
-
_spotlight["default"].focus(focusTarget);
|
|
619
616
|
}
|
|
617
|
+
_spotlight["default"].focus(focusTarget);
|
|
620
618
|
focusItem(focusTarget);
|
|
621
619
|
}
|
|
622
620
|
setTimeout(function () {
|
|
@@ -889,27 +887,27 @@ var EditableWrapper = exports.EditableWrapper = function EditableWrapper(props)
|
|
|
889
887
|
}, [handleMouseLeave, handleTouchMove, scrollContainerRef]);
|
|
890
888
|
(0, _react.useLayoutEffect)(function () {
|
|
891
889
|
if (removeItemFuncRef) {
|
|
892
|
-
removeItemFuncRef.current = removeItem;
|
|
890
|
+
removeItemFuncRef.current = removeItem; // eslint-disable-line react-hooks/immutability
|
|
893
891
|
}
|
|
894
892
|
}, [removeItem, removeItemFuncRef]);
|
|
895
893
|
(0, _react.useLayoutEffect)(function () {
|
|
896
894
|
if (hideItemFuncRef) {
|
|
897
|
-
hideItemFuncRef.current = hideItem;
|
|
895
|
+
hideItemFuncRef.current = hideItem; // eslint-disable-line react-hooks/immutability
|
|
898
896
|
}
|
|
899
897
|
}, [hideItem, hideItemFuncRef]);
|
|
900
898
|
(0, _react.useLayoutEffect)(function () {
|
|
901
899
|
if (showItemFuncRef) {
|
|
902
|
-
showItemFuncRef.current = showItem;
|
|
900
|
+
showItemFuncRef.current = showItem; // eslint-disable-line react-hooks/immutability
|
|
903
901
|
}
|
|
904
902
|
}, [showItem, showItemFuncRef]);
|
|
905
903
|
(0, _react.useLayoutEffect)(function () {
|
|
906
904
|
if (focusItemFuncRef) {
|
|
907
|
-
focusItemFuncRef.current = focusItem;
|
|
905
|
+
focusItemFuncRef.current = focusItem; // eslint-disable-line react-hooks/immutability
|
|
908
906
|
}
|
|
909
907
|
}, [focusItem, focusItemFuncRef]);
|
|
910
908
|
(0, _react.useLayoutEffect)(function () {
|
|
911
909
|
if (blurItemFuncRef) {
|
|
912
|
-
blurItemFuncRef.current = blurItem;
|
|
910
|
+
blurItemFuncRef.current = blurItem; // eslint-disable-line react-hooks/immutability
|
|
913
911
|
}
|
|
914
912
|
}, [blurItem, blurItemFuncRef]);
|
|
915
913
|
(0, _react.useEffect)(function () {
|
|
@@ -982,6 +980,18 @@ var EditableWrapper = exports.EditableWrapper = function EditableWrapper(props)
|
|
|
982
980
|
});
|
|
983
981
|
}, []); // eslint-disable-line react-hooks/exhaustive-deps
|
|
984
982
|
|
|
983
|
+
// We set 'data-is-hiding' for all hidden items at component mount
|
|
984
|
+
(0, _react.useEffect)(function () {
|
|
985
|
+
var _editable$hideIndex2;
|
|
986
|
+
mutableRef.current.hideIndex = (_editable$hideIndex2 = editable === null || editable === void 0 ? void 0 : editable.hideIndex) !== null && _editable$hideIndex2 !== void 0 ? _editable$hideIndex2 : dataSize;
|
|
987
|
+
children.map(function (child, index) {
|
|
988
|
+
if (index >= mutableRef.current.hideIndex) {
|
|
989
|
+
var hiddenElement = document.querySelector('[aria-label="' + child.props['aria-label'] + '"]');
|
|
990
|
+
hiddenElement.setAttribute('data-is-hiding', true);
|
|
991
|
+
}
|
|
992
|
+
});
|
|
993
|
+
}, []); // eslint-disable-line react-hooks/exhaustive-deps
|
|
994
|
+
|
|
985
995
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(TouchableDiv, {
|
|
986
996
|
holdConfig: holdConfig,
|
|
987
997
|
className: (0, _classnames["default"])(mergedCss.wrapper, _defineProperty({}, mergedCss.centered, centered)),
|
|
@@ -1000,8 +1010,8 @@ var EditableWrapper = exports.EditableWrapper = function EditableWrapper(props)
|
|
|
1000
1010
|
}, "editable-wrapper-announce")]
|
|
1001
1011
|
});
|
|
1002
1012
|
};
|
|
1003
|
-
|
|
1004
|
-
|
|
1013
|
+
_EditableWrapper.displayName = 'EditableWrapper';
|
|
1014
|
+
_EditableWrapper.propTypes = /** @lends limestone/Scroller.EditableWrapper.prototype */{
|
|
1005
1015
|
/**
|
|
1006
1016
|
* Enables editing items in the scroller.
|
|
1007
1017
|
* You can specify props for editable scroller as an object.
|
|
@@ -1033,4 +1043,4 @@ EditableWrapper.propTypes = /** @lends limestone/Scroller.EditableWrapper.protot
|
|
|
1033
1043
|
*/
|
|
1034
1044
|
scrollContentRef: _propTypes["default"].ref
|
|
1035
1045
|
};
|
|
1036
|
-
var _default = exports["default"] =
|
|
1046
|
+
var _default = exports["default"] = _EditableWrapper;
|
package/Scroller/Scroller.d.ts
CHANGED
|
@@ -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
|
*/
|
package/Scroller/Scroller.js
CHANGED
|
@@ -15,7 +15,7 @@ var _I18nDecorator = require("@enact/i18n/I18nDecorator");
|
|
|
15
15
|
var _SpotlightContainerDecorator = _interopRequireDefault(require("@enact/spotlight/SpotlightContainerDecorator"));
|
|
16
16
|
var _Spottable = _interopRequireDefault(require("@enact/spotlight/Spottable"));
|
|
17
17
|
var _Resizable = require("@enact/ui/Resizable");
|
|
18
|
-
var
|
|
18
|
+
var _Scroller2 = require("@enact/ui/Scroller");
|
|
19
19
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
20
20
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
21
21
|
var _react = require("react");
|
|
@@ -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
|
};
|
|
@@ -96,8 +97,9 @@ var scrollerDefaultProps = {
|
|
|
96
97
|
* @ui
|
|
97
98
|
* @public
|
|
98
99
|
*/
|
|
99
|
-
var
|
|
100
|
+
var _Scroller = exports.Scroller = function Scroller(props) {
|
|
100
101
|
var scrollerProps = (0, _util.setDefaultProps)(props, scrollerDefaultProps);
|
|
102
|
+
(0, _util.checkPropTypes)(_Scroller, scrollerProps);
|
|
101
103
|
if (typeof ENACT_PACK_NO_ANIMATION !== 'undefined' && ENACT_PACK_NO_ANIMATION) {
|
|
102
104
|
scrollerProps.overscrollEffectOn = {
|
|
103
105
|
arrowKey: false,
|
|
@@ -114,9 +116,7 @@ var Scroller = exports.Scroller = function Scroller(props) {
|
|
|
114
116
|
|
|
115
117
|
// Hooks
|
|
116
118
|
|
|
117
|
-
var _useScroll = (0, _useScroll2["default"])(_objectSpread(
|
|
118
|
-
scrollToContentContainerOnFocus: true
|
|
119
|
-
})),
|
|
119
|
+
var _useScroll = (0, _useScroll2["default"])(_objectSpread({}, rest)),
|
|
120
120
|
ScrollContentWrapper = _useScroll.scrollContentWrapper,
|
|
121
121
|
scrollContentHandle = _useScroll.scrollContentHandle,
|
|
122
122
|
isHorizontalScrollbarVisible = _useScroll.isHorizontalScrollbarVisible,
|
|
@@ -147,7 +147,7 @@ var Scroller = exports.Scroller = function Scroller(props) {
|
|
|
147
147
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Resizable.ResizeContext, _objectSpread(_objectSpread({}, resizeContextProps), {}, {
|
|
148
148
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(ScrollContentWrapper, _objectSpread(_objectSpread(_objectSpread({}, scrollContainerProps), scrollContentWrapperRest), {}, {
|
|
149
149
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(ScrollBody, _objectSpread(_objectSpread({}, focusableBodyProps), {}, {
|
|
150
|
-
children: [rest.focusableScrollbar ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScrollbarPlaceholder["default"], {}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
150
|
+
children: [rest.focusableScrollbar ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScrollbarPlaceholder["default"], {}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_Scroller2.ScrollerBasic, _objectSpread(_objectSpread({}, themeScrollContentProps), {}, {
|
|
151
151
|
"aria-label": ariaLabel,
|
|
152
152
|
id: id,
|
|
153
153
|
ref: scrollContentHandle,
|
|
@@ -157,8 +157,8 @@ var Scroller = exports.Scroller = function Scroller(props) {
|
|
|
157
157
|
}))
|
|
158
158
|
}));
|
|
159
159
|
};
|
|
160
|
-
|
|
161
|
-
|
|
160
|
+
_Scroller.displayName = 'Scroller';
|
|
161
|
+
_Scroller.propTypes = /** @lends limestone/Scroller.Scroller.prototype */{
|
|
162
162
|
/**
|
|
163
163
|
* The "aria-label" for the Scroller.
|
|
164
164
|
*
|
|
@@ -441,6 +441,13 @@ Scroller.propTypes = /** @lends limestone/Scroller.Scroller.prototype */{
|
|
|
441
441
|
* @public
|
|
442
442
|
*/
|
|
443
443
|
scrollMode: _propTypes["default"].oneOf(['native', 'translate']),
|
|
444
|
+
/**
|
|
445
|
+
* Scrolls to the container created by {@link limestone/Scroller.ContentContainerDecorator} when descendants get focused.
|
|
446
|
+
* @type {Boolean}
|
|
447
|
+
* @default true
|
|
448
|
+
* @public
|
|
449
|
+
*/
|
|
450
|
+
scrollToContentContainerOnFocus: _propTypes["default"].bool,
|
|
444
451
|
/**
|
|
445
452
|
* Specifies how to show vertical scrollbar.
|
|
446
453
|
*
|
|
@@ -458,13 +465,13 @@ Scroller.propTypes = /** @lends limestone/Scroller.Scroller.prototype */{
|
|
|
458
465
|
*/
|
|
459
466
|
verticalScrollThumbAriaLabel: _propTypes["default"].string
|
|
460
467
|
};
|
|
461
|
-
var ScrollerBase = exports.ScrollerBase =
|
|
462
|
-
exports.Scroller =
|
|
468
|
+
var ScrollerBase = exports.ScrollerBase = _Scroller;
|
|
469
|
+
exports.Scroller = _Scroller = (0, _Skinnable["default"])((0, _SpotlightContainerDecorator["default"])({
|
|
463
470
|
overflow: true,
|
|
464
471
|
preserveId: true,
|
|
465
472
|
restrict: 'self-first'
|
|
466
473
|
}, (0, _I18nDecorator.I18nContextDecorator)({
|
|
467
474
|
rtlProp: 'rtl'
|
|
468
|
-
},
|
|
469
|
-
|
|
470
|
-
var _default = exports["default"] =
|
|
475
|
+
}, _Scroller)));
|
|
476
|
+
_Scroller.defaultPropValues = scrollerDefaultProps;
|
|
477
|
+
var _default = exports["default"] = _Scroller;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
right: 0;
|
|
13
13
|
bottom: 0;
|
|
14
14
|
left: 0;
|
|
15
|
-
border-radius:
|
|
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:
|
|
33
|
-
mask-image: linear-gradient(transparent
|
|
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:
|
|
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;
|
|
@@ -128,12 +128,12 @@ var useSpottable = function useSpottable(props, instances) {
|
|
|
128
128
|
var _useEventKey = (0, _useEvent.useEventKey)(),
|
|
129
129
|
addGlobalKeyDownEventListener = _useEventKey.addGlobalKeyDownEventListener,
|
|
130
130
|
removeGlobalKeyDownEventListener = _useEventKey.removeGlobalKeyDownEventListener;
|
|
131
|
-
var setContainerDisabled = (0, _react.useCallback)(function (bool) {
|
|
131
|
+
var setContainerDisabled = (0, _react.useCallback)(function self(bool) {
|
|
132
132
|
if (scrollContainerRef.current) {
|
|
133
133
|
scrollContainerRef.current.dataset.spotlightContainerDisabled = bool;
|
|
134
134
|
if (bool) {
|
|
135
135
|
addGlobalKeyDownEventListener(function () {
|
|
136
|
-
|
|
136
|
+
self(false);
|
|
137
137
|
});
|
|
138
138
|
} else {
|
|
139
139
|
removeGlobalKeyDownEventListener();
|
|
@@ -384,7 +384,7 @@ var useThemeScroller = exports.useThemeScroller = function useThemeScroller(prop
|
|
|
384
384
|
filterTarget: 'body'
|
|
385
385
|
});
|
|
386
386
|
}
|
|
387
|
-
}, [props.focusableScrollbar, scrollContainerRef
|
|
387
|
+
}, [props.focusableScrollbar, scrollContainerRef]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
388
388
|
|
|
389
389
|
scrollContentProps.setThemeScrollContentHandle({
|
|
390
390
|
calculatePositionOnFocus: calculatePositionOnFocus,
|
package/Slider/Slider.d.ts
CHANGED
|
@@ -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
|
-
|
|
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.
|
|
@@ -22,6 +24,10 @@ input keys.
|
|
|
22
24
|
* Sets the knob to selected state and allows it to move via 5-way controls.
|
|
23
25
|
*/
|
|
24
26
|
active?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Indicates if this component will be used as a colorPicker.
|
|
29
|
+
*/
|
|
30
|
+
colorPicker?: boolean;
|
|
25
31
|
/**
|
|
26
32
|
* Customizes the component by mapping the supplied collection of CSS class names to the
|
|
27
33
|
corresponding internal elements and states of this component.
|
|
@@ -104,6 +110,10 @@ this callback.
|
|
|
104
110
|
* Displays an anchor at `progressAnchor` .
|
|
105
111
|
*/
|
|
106
112
|
showAnchor?: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Displays the min and max values at the edges of the slider.
|
|
115
|
+
*/
|
|
116
|
+
showMinMax?: boolean;
|
|
107
117
|
/**
|
|
108
118
|
* The amount to increment or decrement the value.
|
|
109
119
|
*
|
|
@@ -162,20 +172,16 @@ export class SliderBase extends React.Component<
|
|
|
162
172
|
Merge<React.HTMLProps<HTMLElement>, SliderBaseProps>
|
|
163
173
|
> {}
|
|
164
174
|
|
|
165
|
-
export interface SliderDecoratorProps
|
|
166
|
-
|
|
175
|
+
export interface SliderDecoratorProps extends Merge<
|
|
176
|
+
Merge<
|
|
167
177
|
Merge<
|
|
168
|
-
Merge<
|
|
169
|
-
|
|
170
|
-
ui_Changeable_ChangeableProps,
|
|
171
|
-
spotlight_Spottable_SpottableProps
|
|
172
|
-
>,
|
|
173
|
-
limestone_Skinnable_SkinnableProps
|
|
174
|
-
>,
|
|
175
|
-
ui_Slottable_SlottableProps
|
|
178
|
+
Merge<ui_Changeable_ChangeableProps, spotlight_Spottable_SpottableProps>,
|
|
179
|
+
limestone_Skinnable_SkinnableProps
|
|
176
180
|
>,
|
|
177
|
-
|
|
178
|
-
|
|
181
|
+
ui_Slottable_SlottableProps
|
|
182
|
+
>,
|
|
183
|
+
ui_Slider_SliderDecoratorProps
|
|
184
|
+
> {}
|
|
179
185
|
export function SliderDecorator<P>(
|
|
180
186
|
Component: React.ComponentType<P> | string,
|
|
181
187
|
): React.ComponentType<P & SliderDecoratorProps>;
|