@enact/limestone 1.3.0 → 1.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/ci-branch.yml +21 -0
- package/.github/workflows/ci-pull-request.yml +16 -0
- package/.github/workflows/ci-reusable.yml +73 -0
- package/ActionGuide/ActionGuide.d.ts +5 -4
- package/ActionGuide/ActionGuide.module.css +1 -1
- package/Alert/Alert.d.ts +4 -2
- package/Alert/Alert.js +4 -1
- package/Alert/Alert.module.css +36 -0
- package/BodyText/BodyText.d.ts +5 -4
- package/BodyText/BodyText.module.css +7 -7
- package/Button/Button.d.ts +17 -12
- package/Button/Button.js +1 -1
- package/Button/Button.module.css +195 -268
- package/CHANGELOG.md +226 -0
- package/Card/Card.d.ts +36 -8
- package/Card/Card.js +157 -20
- package/Card/Card.module.css +277 -58
- package/Card/tests/Card-specs.js +30 -0
- package/Checkbox/Checkbox.d.ts +8 -7
- package/Checkbox/Checkbox.js +3 -1
- package/Checkbox/Checkbox.module.css +213 -120
- package/Checkbox/tests/Checkbox-specs.js +1 -1
- package/CheckboxItem/CheckboxItem.d.ts +22 -7
- package/CheckboxItem/CheckboxItem.js +69 -4
- package/Chips/Chip.js +60 -7
- package/Chips/Chip.module.css +3 -3
- package/Chips/Chips.js +26 -12
- package/Chips/Chips.module.css +1 -1
- package/Chips/tests/Chip-specs.js +19 -9
- package/Chips/tests/Chips-specs.js +19 -19
- package/ContextualMenuDecorator/ContextualMenuDecorator.d.ts +4 -5
- package/ContextualPopupDecorator/ContextualPopup.module.css +34 -34
- package/ContextualPopupDecorator/ContextualPopupDecorator.js +557 -549
- package/DatePicker/DatePicker.d.ts +4 -5
- package/DayPicker/DayPicker.d.ts +8 -7
- package/Dropdown/Dropdown.d.ts +11 -13
- package/Dropdown/Dropdown.module.css +9 -9
- package/Dropdown/DropdownList.js +16 -11
- package/FixedPopupPanels/FixedPopupPanels.d.ts +4 -2
- package/FixedPopupPanels/FixedPopupPanels.module.css +18 -18
- package/FlexiblePopupPanels/FlexiblePopupPanels.module.css +23 -23
- package/FormCheckboxItem/FormCheckboxItem.d.ts +5 -4
- package/Heading/Heading.d.ts +8 -7
- package/Heading/Heading.module.css +5 -5
- package/Icon/Icon.d.ts +14 -4
- package/Icon/Icon.js +48 -2
- package/Icon/Icon.module.css +1 -1
- package/Icon/IconList.js +25 -1
- package/IconItem/IconItem.d.ts +13 -12
- package/IconItem/IconItem.js +15 -0
- package/IconItem/IconItem.module.css +107 -1
- package/Image/Image.d.ts +5 -4
- package/ImageItem/ImageItem.d.ts +11 -10
- package/ImageItem/ImageItem.js +37 -31
- package/ImageItem/ImageItem.module.css +30 -30
- package/ImageItem/tests/ImageItem-specs.js +3 -10
- package/Input/Input.js +9 -2
- package/Input/Input.module.css +37 -8
- package/Input/InputField.js +5 -1
- package/Input/InputField.module.css +17 -2
- package/Input/InputFieldSpotlightDecorator.js +213 -229
- package/Input/index.d.ts +15 -18
- package/Input/tests/InputField-specs.js +21 -0
- package/Item/Item.d.ts +16 -9
- package/Item/Item.js +20 -2
- package/Item/Item.module.css +1 -1
- package/KeyGuide/KeyGuide.d.ts +8 -7
- package/KeyGuide/KeyGuide.module.css +25 -1
- package/Marquee/Marquee.d.ts +2 -4
- package/MediaOverlay/MediaOverlay.d.ts +12 -11
- package/MediaOverlay/MediaOverlay.js +43 -21
- package/MediaOverlay/MediaOverlay.module.css +114 -15
- package/MediaPlayer/MediaControls.js +195 -13
- package/MediaPlayer/MediaControls.module.css +3 -2
- package/MediaPlayer/MediaSlider.module.css +7 -20
- package/MediaPlayer/index.d.ts +59 -7
- package/PageViews/PageViews.js +165 -80
- package/PageViews/PageViewsRouter.js +9 -0
- package/PageViews/tests/PageViews-specs.js +84 -0
- package/Panels/Header.js +48 -30
- package/Panels/Header.module.css +83 -31
- package/Panels/Panel.module.css +1 -1
- package/Panels/index.d.ts +7 -8
- package/Picker/Picker.d.ts +4 -5
- package/Picker/Picker.module.css +2 -2
- package/Popup/Popup.js +242 -240
- package/Popup/Popup.module.css +24 -24
- package/PopupTabLayout/PopupTabLayout.d.ts +5 -7
- package/PopupTabLayout/PopupTabLayout.js +15 -9
- package/PopupTabLayout/PopupTabLayout.module.css +53 -16
- package/PopupTabLayout/PopupTabLayoutStateContext.js +8 -0
- package/ProgressBar/ProgressBar.d.ts +5 -4
- package/ProgressBar/ProgressBarTooltip.module.css +12 -12
- package/ProgressButton/ProgressButton.d.ts +4 -5
- package/QuickGuidePanels/QuickGuidePanels.module.css +2 -2
- package/RadioItem/RadioItem.d.ts +18 -5
- package/RadioItem/RadioItem.js +67 -2
- package/RadioItem/RadioItem.module.css +36 -36
- package/RangePicker/RangePicker.module.css +2 -2
- package/Scroller/EditableWrapper.js +11 -4
- package/Scroller/Scroller.d.ts +20 -16
- package/Scroller/Scroller.js +9 -3
- package/Scroller/Scroller.module.css +4 -4
- package/Slider/Slider.d.ts +16 -14
- package/Slider/Slider.js +37 -4
- package/Slider/Slider.module.css +314 -91
- package/Slider/tests/Slider-specs.js +2 -1
- package/Spinner/Spinner.d.ts +5 -4
- package/Spinner/Spinner.module.css +9 -9
- package/Steps/Steps.d.ts +5 -4
- package/Steps/Steps.js +9 -5
- package/Switch/Switch.d.ts +8 -7
- package/Switch/Switch.module.css +100 -13
- package/SwitchItem/SwitchItem.d.ts +9 -6
- package/TabLayout/RefocusDecorator.js +15 -9
- package/TabLayout/TabGroup.js +3 -2
- package/TabLayout/TabGroup.module.css +2 -2
- package/TabLayout/TabLayout.d.ts +6 -0
- package/TabLayout/TabLayout.js +11 -1
- package/TabLayout/TabLayout.module.css +18 -0
- package/TabLayout/tests/TabLayout-specs.js +52 -0
- package/ThemeDecorator/ThemeDecorator.d.ts +9 -10
- package/ThemeDecorator/fontGenerator.js +1 -1
- package/ThemeDecorator/screenTypes.json +1 -0
- package/TimePicker/TimePicker.module.css +1 -1
- package/TooltipDecorator/Tooltip.module.css +1 -2
- package/TooltipDecorator/tests/util-specs.js +12 -0
- package/TooltipDecorator/useTooltip.js +1 -1
- package/TooltipDecorator/util.js +18 -11
- package/VideoPlayer/Feedback.js +3 -0
- package/VideoPlayer/Feedback.module.css +5 -9
- package/VideoPlayer/FeedbackIcons.js +1 -1
- package/VideoPlayer/FeedbackTooltip.module.css +55 -11
- package/VideoPlayer/VideoPlayer.d.ts +44 -18
- package/VideoPlayer/VideoPlayer.js +128 -23
- package/VideoPlayer/VideoPlayer.module.css +28 -11
- package/VirtualList/VirtualList.d.ts +9 -2
- package/VirtualList/VirtualList.js +31 -6
- package/VirtualList/tests/VirtualGridList-translate-specs.js +3 -0
- package/VirtualList/tests/VirtualList-specs.js +28 -1
- package/VirtualList/tests/VirtualList-translate-specs.js +4 -1
- package/VirtualList/tests/useEvent-specs.js +39 -0
- package/VirtualList/useEvent.js +45 -10
- package/VirtualList/useThemeVirtualList.js +3 -0
- package/WizardPanels/WizardPanels.module.css +2 -2
- package/WizardPanels/index.d.ts +4 -2
- package/fonts/Limestone_Icons.ttf +0 -0
- package/internal/$L/$L.js +3 -3
- package/internal/DateComponentPicker/DateComponentPicker.module.css +2 -2
- package/internal/DateTime/DateTime.module.css +1 -0
- package/internal/Panels/PanelsRouter.js +16 -5
- package/internal/Picker/Picker.module.css +2 -2
- package/internal/SharedStateDecorator/SharedStateDecorator.js +76 -99
- package/internal/validators/validators.js +21 -2
- package/package.json +14 -14
- package/styles/colors-highcontrast.less +9 -1
- package/styles/colors.less +11 -7
- package/styles/motion-mixins.less +66 -0
- package/styles/motions.less +78 -0
- package/styles/variables.less +176 -150
- package/useScroll/HoverToScroll.js +8 -5
- package/useScroll/ScrollbarTrack.module.css +8 -8
- package/useScroll/useEvent.js +7 -1
- package/useScroll/useScroll.js +2 -0
- package/useScroll/useScroll.module.css +6 -6
- package/.travis.yml +0 -40
|
@@ -48,9 +48,10 @@ var getBoundsPropertyNames = function getBoundsPropertyNames(direction) {
|
|
|
48
48
|
};
|
|
49
49
|
};
|
|
50
50
|
var hoverToScrollMultiplier = {
|
|
51
|
-
horizontal: 0.
|
|
52
|
-
vertical: 0.
|
|
51
|
+
horizontal: 0.008,
|
|
52
|
+
vertical: 0.02
|
|
53
53
|
};
|
|
54
|
+
var hoverToScrollDelay = 0.7;
|
|
54
55
|
var directionToFocus = {
|
|
55
56
|
horizontal: {
|
|
56
57
|
before: 'right',
|
|
@@ -147,13 +148,15 @@ var HoverToScrollBase = function HoverToScrollBase(props) {
|
|
|
147
148
|
bounds[clientSize] *
|
|
148
149
|
// scroll page size
|
|
149
150
|
hoverToScrollMultiplier[direction]; // a scrolling speed factor
|
|
150
|
-
|
|
151
|
+
var startTime = (0, _util.perfNow)();
|
|
151
152
|
mutableRef.current.hoveredPosition = position;
|
|
152
153
|
mutableRef.current.stopScrollByHover = false;
|
|
153
|
-
var _scrollByHover = function scrollByHover() {
|
|
154
|
+
var _scrollByHover = function scrollByHover(currentTime) {
|
|
154
155
|
if (!mutableRef.current.stopScrollByHover) {
|
|
156
|
+
var elapsed = (currentTime - startTime) / 1000;
|
|
157
|
+
var distanceMultiplier = elapsed < hoverToScrollDelay ? 0 : Math.min(elapsed - hoverToScrollDelay / 1.5, 1);
|
|
155
158
|
scrollContainer.scrollTo({
|
|
156
|
-
position: _defineProperty({}, axis, (0, _util.clamp)(0, bounds[maxPosition], scrollContainer[scrollPosition] + distance)),
|
|
159
|
+
position: _defineProperty({}, axis, (0, _util.clamp)(0, bounds[maxPosition], scrollContainer[scrollPosition] + distance * distanceMultiplier)),
|
|
157
160
|
animate: false
|
|
158
161
|
});
|
|
159
162
|
startRaf(_scrollByHover);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.scrollbarTrack {
|
|
2
|
-
--scrollbar-track-margin:
|
|
2
|
+
--scrollbar-track-margin: var(--primitive-spacing-12);
|
|
3
3
|
--scrollbar-thumb-size-ratio: 1;
|
|
4
4
|
--scrollbar-thumb-progress-ratio: 0;
|
|
5
5
|
--scrollbar-thumb-size: calc(100% * var(--scrollbar-thumb-size-ratio));
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
}
|
|
21
21
|
.scrollbarTrack.focusableScrollbar {
|
|
22
22
|
opacity: 1;
|
|
23
|
-
--scrollbar-track-margin:
|
|
23
|
+
--scrollbar-track-margin: var(--primitive-spacing-24);
|
|
24
24
|
}
|
|
25
25
|
.scrollbarTrack .thumb {
|
|
26
26
|
background: var(--semantic-color-surface-scroll-handle);
|
|
@@ -87,12 +87,12 @@
|
|
|
87
87
|
}
|
|
88
88
|
.scrollbarTrack.vertical .thumb:focus .directionIndicator.backward {
|
|
89
89
|
top: calc(9px - 0.25rem);
|
|
90
|
-
left:
|
|
90
|
+
left: var(--primitive-spacing-6);
|
|
91
91
|
}
|
|
92
92
|
.scrollbarTrack.vertical .thumb:focus .directionIndicator.forward {
|
|
93
93
|
transform: rotate(180deg);
|
|
94
94
|
bottom: calc(9px - 0.25rem);
|
|
95
|
-
left:
|
|
95
|
+
left: var(--primitive-spacing-6);
|
|
96
96
|
}
|
|
97
97
|
.scrollbarTrack:not(.vertical) {
|
|
98
98
|
margin: var(--scrollbar-track-margin) 0;
|
|
@@ -113,13 +113,13 @@
|
|
|
113
113
|
:global(.spotlight-input-mouse) .scrollbarTrack:not(.vertical) .thumb:global(.spottable):focus .directionIndicator.backward {
|
|
114
114
|
transform: rotate(-90deg);
|
|
115
115
|
left: calc(9px - 0.25rem);
|
|
116
|
-
top: calc(
|
|
116
|
+
top: calc(var(--primitive-spacing-6) / 2);
|
|
117
117
|
}
|
|
118
118
|
:global(.spotlight-input-key) .scrollbarTrack:not(.vertical) .thumb:global(.spottable):focus .directionIndicator.forward,
|
|
119
119
|
:global(.spotlight-input-mouse) .scrollbarTrack:not(.vertical) .thumb:global(.spottable):focus .directionIndicator.forward {
|
|
120
120
|
transform: rotate(90deg);
|
|
121
121
|
right: calc(9px - 0.25rem);
|
|
122
|
-
top: calc(
|
|
122
|
+
top: calc(var(--primitive-spacing-6) / 2);
|
|
123
123
|
}
|
|
124
124
|
:global(.spotlight-input-touch) .scrollbarTrack:not(.vertical) .thumb:global(.spottable):active {
|
|
125
125
|
height: 0.625rem;
|
|
@@ -127,10 +127,10 @@
|
|
|
127
127
|
:global(.spotlight-input-touch) .scrollbarTrack:not(.vertical) .thumb:global(.spottable):active .directionIndicator.backward {
|
|
128
128
|
transform: rotate(-90deg);
|
|
129
129
|
left: calc(9px - 0.25rem);
|
|
130
|
-
top: calc(
|
|
130
|
+
top: calc(var(--primitive-spacing-6) / 2);
|
|
131
131
|
}
|
|
132
132
|
:global(.spotlight-input-touch) .scrollbarTrack:not(.vertical) .thumb:global(.spottable):active .directionIndicator.forward {
|
|
133
133
|
transform: rotate(90deg);
|
|
134
134
|
right: calc(9px - 0.25rem);
|
|
135
|
-
top: calc(
|
|
135
|
+
top: calc(var(--primitive-spacing-6) / 2);
|
|
136
136
|
}
|
package/useScroll/useEvent.js
CHANGED
|
@@ -164,6 +164,12 @@ var useEventKey = exports.useEventKey = function useEventKey(props, instances, c
|
|
|
164
164
|
|
|
165
165
|
// Functions
|
|
166
166
|
|
|
167
|
+
function applyLastInputType(ev) {
|
|
168
|
+
var keyCode = ev.keyCode;
|
|
169
|
+
if ((0, _spotlight.getDirection)(keyCode)) {
|
|
170
|
+
scrollContainerHandle.current.lastInputType = 'arrowKey';
|
|
171
|
+
}
|
|
172
|
+
}
|
|
167
173
|
function handleKeyDown(ev) {
|
|
168
174
|
var keyCode = ev.keyCode,
|
|
169
175
|
repeat = ev.repeat,
|
|
@@ -188,7 +194,6 @@ var useEventKey = exports.useEventKey = function useEventKey(props, instances, c
|
|
|
188
194
|
}
|
|
189
195
|
} else if ((0, _spotlight.getDirection)(keyCode) && (scrollMode === 'translate' || scrollMode === 'native' && !_spotlight["default"].getPointerMode())) {
|
|
190
196
|
var element = _spotlight["default"].getCurrent();
|
|
191
|
-
scrollContainerHandle.current.lastInputType = 'arrowKey';
|
|
192
197
|
direction = (0, _spotlight.getDirection)(keyCode);
|
|
193
198
|
if (props.overscrollEffectOn.arrowKey && !(element ? (0, _target.getTargetByDirectionFromElement)(direction, element) : null)) {
|
|
194
199
|
checkAndApplyOverscrollEffectByDirection(direction);
|
|
@@ -276,6 +281,7 @@ var useEventKey = exports.useEventKey = function useEventKey(props, instances, c
|
|
|
276
281
|
// Return
|
|
277
282
|
|
|
278
283
|
return {
|
|
284
|
+
applyLastInputType: applyLastInputType,
|
|
279
285
|
handleKeyDown: handleKeyDown,
|
|
280
286
|
lastPointer: lastPointer,
|
|
281
287
|
scrollByPageOnPointerMode: scrollByPageOnPointerMode
|
package/useScroll/useScroll.js
CHANGED
|
@@ -120,6 +120,7 @@ var useThemeScroll = function useThemeScroll(props, instances) {
|
|
|
120
120
|
hasFocus: hasFocus,
|
|
121
121
|
isContent: isContent
|
|
122
122
|
}),
|
|
123
|
+
applyLastInputType = _useEventKey.applyLastInputType,
|
|
123
124
|
handleKeyDown = _useEventKey.handleKeyDown,
|
|
124
125
|
lastPointer = _useEventKey.lastPointer,
|
|
125
126
|
scrollByPageOnPointerMode = _useEventKey.scrollByPageOnPointerMode;
|
|
@@ -272,6 +273,7 @@ var useThemeScroll = function useThemeScroll(props, instances) {
|
|
|
272
273
|
function addEventListeners(ref) {
|
|
273
274
|
// `ref` is always `scrollContentRef`.
|
|
274
275
|
(0, _utilEvent["default"])('focusin').addEventListener(ref, handleFocus);
|
|
276
|
+
(0, _utilEvent["default"])('keydown').addEventListener(document, applyLastInputType);
|
|
275
277
|
if (ref.current) {
|
|
276
278
|
addVoiceEventListener(ref);
|
|
277
279
|
}
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
.scroll .verticalScrollbar {
|
|
18
18
|
position: absolute;
|
|
19
19
|
width: var(--scroll-scrollbar-size);
|
|
20
|
-
height: calc(100% - 2 *
|
|
20
|
+
height: calc(100% - 2 * var(--primitive-spacing-12));
|
|
21
21
|
right: 0;
|
|
22
22
|
top: 0;
|
|
23
|
-
padding:
|
|
23
|
+
padding: var(--primitive-spacing-12) 0;
|
|
24
24
|
}
|
|
25
25
|
:global(.enact-locale-right-to-left) .scroll .verticalScrollbar {
|
|
26
26
|
left: 0;
|
|
@@ -28,17 +28,17 @@
|
|
|
28
28
|
}
|
|
29
29
|
.scroll .horizontalScrollbar {
|
|
30
30
|
position: absolute;
|
|
31
|
-
width: calc(100% - 2 *
|
|
31
|
+
width: calc(100% - 2 * var(--primitive-spacing-12));
|
|
32
32
|
height: var(--scroll-scrollbar-size);
|
|
33
33
|
left: 0;
|
|
34
34
|
bottom: 0;
|
|
35
|
-
padding: 0
|
|
35
|
+
padding: 0 var(--primitive-spacing-12);
|
|
36
36
|
}
|
|
37
37
|
.scroll.bidirectional .verticalScrollbar {
|
|
38
|
-
height: calc(100% - 2 *
|
|
38
|
+
height: calc(100% - 2 * var(--primitive-spacing-12) - var(--scroll-scrollbar-size));
|
|
39
39
|
}
|
|
40
40
|
.scroll.bidirectional .horizontalScrollbar {
|
|
41
|
-
width: calc(100% - 2 *
|
|
41
|
+
width: calc(100% - 2 * var(--primitive-spacing-12) - var(--scroll-scrollbar-size));
|
|
42
42
|
left: 0;
|
|
43
43
|
}
|
|
44
44
|
:global(.enact-locale-right-to-left) .scroll.bidirectional .horizontalScrollbar {
|
package/.travis.yml
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
dist: jammy
|
|
2
|
-
language: node_js
|
|
3
|
-
node_js:
|
|
4
|
-
- lts/*
|
|
5
|
-
- node
|
|
6
|
-
sudo: false
|
|
7
|
-
before_install:
|
|
8
|
-
- sudo apt-get update
|
|
9
|
-
- sudo apt-get install build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
|
|
10
|
-
install:
|
|
11
|
-
- npm config set prefer-offline false
|
|
12
|
-
- npm install -g codecov
|
|
13
|
-
- git clone --branch=develop --depth 1 https://github.com/enactjs/cli ../cli
|
|
14
|
-
- pushd ../cli
|
|
15
|
-
- npm install
|
|
16
|
-
- npm link
|
|
17
|
-
- popd
|
|
18
|
-
- git clone --branch=develop --depth 1 https://github.com/enactjs/enact ../enact
|
|
19
|
-
- pushd ../enact
|
|
20
|
-
- npm uninstall @enact/ui-test-utils --prefix packages/i18n
|
|
21
|
-
- npm install
|
|
22
|
-
- npm run lerna exec -- --ignore enact-sampler --concurrency 1 -- npm --no-package-lock install
|
|
23
|
-
- npm run lerna exec -- --ignore enact-sampler --concurrency 1 -- npm --no-package-lock link
|
|
24
|
-
- npm run interlink
|
|
25
|
-
- popd
|
|
26
|
-
- rm -fr node_modules/@enact
|
|
27
|
-
- npm uninstall @enact/ui-test-utils
|
|
28
|
-
- npm install
|
|
29
|
-
- enact link
|
|
30
|
-
script:
|
|
31
|
-
- echo -e "\x1b\x5b35;1m*** Starting tests...\x1b\x5b0m"
|
|
32
|
-
- npm test -- --runInBand --coverage
|
|
33
|
-
- codecov -t $CODECOV_TOKEN
|
|
34
|
-
- echo -e "\x1b\x5b35;1m*** Tests complete\x1b\x5b0m"
|
|
35
|
-
- echo -e "\x1b\x5b35;1m*** Starting eslint...\x1b\x5b0m"
|
|
36
|
-
- npm run lint -- -- --report-unused-disable-directives --max-warnings 0 .
|
|
37
|
-
- echo -e "\x1b\x5b35;1m*** eslint complete\x1b\x5b0m"
|
|
38
|
-
- echo -e "\x1b\x5b35;1m*** Starting docs validation...\x1b\x5b0m"
|
|
39
|
-
- npm run validate-docs
|
|
40
|
-
- echo -e "\x1b\x5b35;1m*** Docs validation complete\x1b\x5b0m"
|