@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
|
@@ -1,6 +1,89 @@
|
|
|
1
|
+
/* ---------------------------------------
|
|
2
|
+
Animations
|
|
3
|
+
------------------------------------------ */
|
|
4
|
+
:root {
|
|
5
|
+
/* Bounce
|
|
6
|
+
------------------------------------------ */
|
|
7
|
+
--lime-bounce-motion: var(--lime-bounce-animation-name) var(--lime-bounce-motion-duration) var(--lime-bounce-motion-easing-function);
|
|
8
|
+
--lime-check-motion: var(--lime-check-animation-name) var(--lime-check-motion-duration) forwards;
|
|
9
|
+
}
|
|
10
|
+
/* ---------------------------------------
|
|
11
|
+
Animations properties
|
|
12
|
+
------------------------------------------ */
|
|
13
|
+
:root {
|
|
14
|
+
/* ---------------------------------------
|
|
15
|
+
Durations
|
|
16
|
+
------------------------------------------ */
|
|
17
|
+
--lime-motion-default-duration: 200ms;
|
|
18
|
+
--lime-motion-medium1-duration: 250ms;
|
|
19
|
+
--lime-motion-medium2-duration: 300ms;
|
|
20
|
+
--lime-motion-medium4-duration: 400ms;
|
|
21
|
+
--lime-motion-long2-duration: 500ms;
|
|
22
|
+
--lime-bounce-motion-duration: var(--lime-motion-medium2-duration);
|
|
23
|
+
--lime-check-motion-duration: var(--lime-motion-medium4-duration);
|
|
24
|
+
--lime-focus-in-motion-duration: var(--lime-motion-medium2-duration);
|
|
25
|
+
--lime-focus-out-motion-duration: var(--lime-motion-long2-duration);
|
|
26
|
+
--lime-press-motion-duration: var(--lime-motion-medium1-duration);
|
|
27
|
+
--lime-release-motion-duration: var(--lime-motion-medium2-duration);
|
|
28
|
+
/* ---------------------------------------
|
|
29
|
+
Easing functions
|
|
30
|
+
------------------------------------------ */
|
|
31
|
+
--lime-default-motion-easing-function: ease-out;
|
|
32
|
+
--lime-EIO-motion-easing-function: cubic-bezier(0.2, 0, 0.05, 1);
|
|
33
|
+
--lime-EO-motion-easing-function: cubic-bezier(0.1, 0.6, 0.15, 1);
|
|
34
|
+
--lime-bounce-motion-easing-function: var(--lime-default-motion-easing-function);
|
|
35
|
+
--lime-focus-in-motion-easing-function: var(--lime-EIO-motion-easing-function);
|
|
36
|
+
--lime-focus-out-motion-easing-function: var(--lime-EO-motion-easing-function);
|
|
37
|
+
--lime-press-motion-easing-function: var(--lime-EIO-motion-easing-function);
|
|
38
|
+
--lime-release-motion-easing-function: var(--lime-EO-motion-easing-function);
|
|
39
|
+
/* ---------------------------------------
|
|
40
|
+
Keyframes names
|
|
41
|
+
------------------------------------------ */
|
|
42
|
+
--lime-bounce-animation-name: bounce-motion;
|
|
43
|
+
--lime-check-animation-name: check-motion;
|
|
44
|
+
/* ---------------------------------------
|
|
45
|
+
Keyframes values
|
|
46
|
+
------------------------------------------ */
|
|
47
|
+
--lime-bounce-motion-offset-default-value: 0.125rem;
|
|
48
|
+
}
|
|
49
|
+
/* ---------------------------------------
|
|
50
|
+
Keyframes
|
|
51
|
+
------------------------------------------ */
|
|
52
|
+
/* Bounce
|
|
53
|
+
------------------------------------------ */
|
|
54
|
+
@keyframes bounce-motion {
|
|
55
|
+
0% {
|
|
56
|
+
transform: translateX(0);
|
|
57
|
+
}
|
|
58
|
+
50% {
|
|
59
|
+
transform: translateX(var(--lime-bounce-motion-offset-value, --lime-bounce-motion-offset-default-value));
|
|
60
|
+
}
|
|
61
|
+
80% {
|
|
62
|
+
transform: translateX(calc(var(--lime-bounce-motion-offset-value, --lime-bounce-motion-offset-default-value) / -2));
|
|
63
|
+
}
|
|
64
|
+
100% {
|
|
65
|
+
transform: translateX(0);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/* Check
|
|
69
|
+
------------------------------------------ */
|
|
70
|
+
@keyframes check-motion {
|
|
71
|
+
0% {
|
|
72
|
+
transform: translateX(0);
|
|
73
|
+
}
|
|
74
|
+
100% {
|
|
75
|
+
transform: translateX(100%);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
/* ---------------------------------------
|
|
79
|
+
Motion Variables
|
|
80
|
+
------------------------------------------ */
|
|
81
|
+
/* ---------------------------------------
|
|
82
|
+
Motion Mixins
|
|
83
|
+
------------------------------------------ */
|
|
1
84
|
.iconItem {
|
|
2
85
|
position: relative;
|
|
3
|
-
transition: transform
|
|
86
|
+
transition: transform var(--lime-focus-out-motion-duration) var(--lime-focus-out-motion-easing-function);
|
|
4
87
|
will-change: transform;
|
|
5
88
|
height: 5.33333rem;
|
|
6
89
|
width: 6.95833rem;
|
|
@@ -57,6 +140,7 @@
|
|
|
57
140
|
:global(.spotlight-input-key) .iconItem:global(.spottable):focus,
|
|
58
141
|
:global(.spotlight-input-mouse) .iconItem:global(.spottable):focus {
|
|
59
142
|
transform: scale(1.1);
|
|
143
|
+
transition: transform var(--lime-focus-in-motion-duration) var(--lime-focus-in-motion-easing-function);
|
|
60
144
|
}
|
|
61
145
|
:global(.spotlight-input-key) .iconItem:global(.spottable):focus.labelOnFocus .label,
|
|
62
146
|
:global(.spotlight-input-mouse) .iconItem:global(.spottable):focus.labelOnFocus .label,
|
|
@@ -70,6 +154,7 @@
|
|
|
70
154
|
}
|
|
71
155
|
:global(.spotlight-input-touch) .iconItem:global(.spottable):active {
|
|
72
156
|
transform: scale(1.1);
|
|
157
|
+
transition: transform var(--lime-focus-in-motion-duration) var(--lime-focus-in-motion-easing-function);
|
|
73
158
|
}
|
|
74
159
|
:global(.spotlight-input-touch) .iconItem:global(.spottable):active.labelOnFocus .label,
|
|
75
160
|
:global(.spotlight-input-touch) .iconItem:global(.spottable):active.labelOnFocus .labelContainer {
|
|
@@ -78,6 +163,27 @@
|
|
|
78
163
|
:global(.spotlight-input-touch) .iconItem:global(.spottable):active.titleOnFocus .title {
|
|
79
164
|
visibility: visible;
|
|
80
165
|
}
|
|
166
|
+
:global(.spotlight-input-key) .iconItem:not([disabled]):global(.spottable):focus.pressed,
|
|
167
|
+
:global(.spotlight-input-mouse) .iconItem:not([disabled]):global(.spottable):focus.pressed,
|
|
168
|
+
:global(.spotlight-input-key) .iconItem:not([disabled]):global(.spottable):focus:active,
|
|
169
|
+
:global(.spotlight-input-mouse) .iconItem:not([disabled]):global(.spottable):focus:active {
|
|
170
|
+
transform: scale(1.05);
|
|
171
|
+
transition: transform var(--lime-press-motion-duration) var(--lime-press-motion-easing-function);
|
|
172
|
+
}
|
|
173
|
+
:global(.spotlight-input-key) .iconItem:not([disabled]):global(.spottable):focus:not(:pressed),
|
|
174
|
+
:global(.spotlight-input-mouse) .iconItem:not([disabled]):global(.spottable):focus:not(:pressed) {
|
|
175
|
+
transform: scale(1.1);
|
|
176
|
+
transition: transform var(--lime-release-motion-duration) var(--lime-release-motion-easing-function);
|
|
177
|
+
}
|
|
178
|
+
:global(.spotlight-input-touch) .iconItem:not([disabled]):global(.spottable):active.pressed,
|
|
179
|
+
:global(.spotlight-input-touch) .iconItem:not([disabled]):global(.spottable):active:active {
|
|
180
|
+
transform: scale(1.05);
|
|
181
|
+
transition: transform var(--lime-press-motion-duration) var(--lime-press-motion-easing-function);
|
|
182
|
+
}
|
|
183
|
+
:global(.spotlight-input-touch) .iconItem:not([disabled]):global(.spottable):active:not(:pressed) {
|
|
184
|
+
transform: scale(1.1);
|
|
185
|
+
transition: transform var(--lime-release-motion-duration) var(--lime-release-motion-easing-function);
|
|
186
|
+
}
|
|
81
187
|
:global(.noAnimation) .iconItem {
|
|
82
188
|
transition: none;
|
|
83
189
|
}
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
require("@testing-library/jest-dom");
|
|
4
4
|
var _react = require("@testing-library/react");
|
|
5
|
-
var _IconItem = require("../IconItem");
|
|
5
|
+
var _IconItem = _interopRequireWildcard(require("../IconItem"));
|
|
6
6
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
7
8
|
describe('IconItem', function () {
|
|
8
9
|
test('should support `background` prop', function () {
|
|
9
10
|
var background = '#ffffff';
|
|
@@ -103,4 +104,32 @@ describe('IconItem', function () {
|
|
|
103
104
|
var actual = _react.screen.getByTestId('iconitem');
|
|
104
105
|
expect(actual).toHaveClass(expected);
|
|
105
106
|
});
|
|
107
|
+
test('should be pressed when selected', function () {
|
|
108
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_IconItem["default"], {
|
|
109
|
+
"data-testid": "iconitem"
|
|
110
|
+
}));
|
|
111
|
+
var iconItem = _react.screen.getByTestId('iconitem');
|
|
112
|
+
|
|
113
|
+
// Select by key
|
|
114
|
+
_react.fireEvent.keyDown(iconItem, {
|
|
115
|
+
key: 'Enter',
|
|
116
|
+
code: 'Enter',
|
|
117
|
+
keyCode: 13,
|
|
118
|
+
which: 13
|
|
119
|
+
});
|
|
120
|
+
expect(iconItem).toHaveClass('pressed');
|
|
121
|
+
_react.fireEvent.keyUp(iconItem, {
|
|
122
|
+
key: 'Enter',
|
|
123
|
+
code: 'Enter',
|
|
124
|
+
keyCode: 13,
|
|
125
|
+
which: 13
|
|
126
|
+
});
|
|
127
|
+
expect(iconItem).not.toHaveClass('pressed');
|
|
128
|
+
|
|
129
|
+
// Select by pointer
|
|
130
|
+
_react.fireEvent.mouseDown(iconItem);
|
|
131
|
+
expect(iconItem).toHaveClass('pressed');
|
|
132
|
+
_react.fireEvent.mouseUp(iconItem);
|
|
133
|
+
expect(iconItem).not.toHaveClass('pressed');
|
|
134
|
+
});
|
|
106
135
|
});
|
package/Image/Image.d.ts
CHANGED
|
@@ -32,14 +32,15 @@ export class ImageBase extends React.Component<
|
|
|
32
32
|
Merge<React.HTMLProps<HTMLElement>, ImageBaseProps>
|
|
33
33
|
> {}
|
|
34
34
|
|
|
35
|
-
export interface ImageDecoratorProps
|
|
36
|
-
extends limestone_Skinnable_SkinnableProps {}
|
|
35
|
+
export interface ImageDecoratorProps extends limestone_Skinnable_SkinnableProps {}
|
|
37
36
|
export function ImageDecorator<P>(
|
|
38
37
|
Component: React.ComponentType<P> | string,
|
|
39
38
|
): React.ComponentType<P & ImageDecoratorProps>;
|
|
40
39
|
|
|
41
|
-
export interface ImageProps
|
|
42
|
-
|
|
40
|
+
export interface ImageProps extends Merge<
|
|
41
|
+
ImageBaseProps,
|
|
42
|
+
ImageDecoratorProps
|
|
43
|
+
> {}
|
|
43
44
|
/**
|
|
44
45
|
* A Limestone-styled image component
|
|
45
46
|
* ```
|
package/Image/Image.js
CHANGED
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = exports.ImageDecorator = exports.ImageBase = exports.Image = void 0;
|
|
7
7
|
var _kind = _interopRequireDefault(require("@enact/core/kind"));
|
|
8
8
|
var _hoc = _interopRequireDefault(require("@enact/core/hoc"));
|
|
9
|
+
var _util = require("@enact/core/util");
|
|
9
10
|
var _Image = require("@enact/ui/Image");
|
|
10
11
|
var _propTypes = _interopRequireDefault(require("@enact/core/internal/prop-types"));
|
|
11
12
|
var _ForwardRef = _interopRequireDefault(require("@enact/ui/ForwardRef"));
|
|
@@ -106,7 +107,8 @@ var ImageBase = exports.ImageBase = (0, _kind["default"])({
|
|
|
106
107
|
// another time. -B 2018-05-01
|
|
107
108
|
var ResponsiveImageDecorator = (0, _hoc["default"])(function (config, Wrapped) {
|
|
108
109
|
// eslint-disable-next-line no-shadow
|
|
109
|
-
var
|
|
110
|
+
var _ResponsiveImageDecorator = function ResponsiveImageDecorator(props) {
|
|
111
|
+
(0, _util.checkPropTypes)(_ResponsiveImageDecorator, props);
|
|
110
112
|
var _useState = (0, _react.useState)((0, _resolution.selectSrc)(props.src)),
|
|
111
113
|
_useState2 = _slicedToArray(_useState, 2),
|
|
112
114
|
setSrc = _useState2[1];
|
|
@@ -122,11 +124,11 @@ var ResponsiveImageDecorator = (0, _hoc["default"])(function (config, Wrapped) {
|
|
|
122
124
|
|
|
123
125
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Wrapped, _objectSpread({}, props));
|
|
124
126
|
};
|
|
125
|
-
|
|
126
|
-
|
|
127
|
+
_ResponsiveImageDecorator.displayName = 'ResponsiveImageDecorator';
|
|
128
|
+
_ResponsiveImageDecorator.propTypes = {
|
|
127
129
|
src: _propTypes2["default"].oneOfType([_propTypes2["default"].string, _propTypes2["default"].object])
|
|
128
130
|
};
|
|
129
|
-
return
|
|
131
|
+
return _ResponsiveImageDecorator;
|
|
130
132
|
});
|
|
131
133
|
|
|
132
134
|
/**
|
package/ImageItem/ImageItem.d.ts
CHANGED
|
@@ -99,20 +99,21 @@ export class ImageItemBase extends React.Component<
|
|
|
99
99
|
Merge<React.HTMLProps<HTMLElement>, ImageItemBaseProps>
|
|
100
100
|
> {}
|
|
101
101
|
|
|
102
|
-
export interface ImageItemDecoratorProps
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
> {}
|
|
102
|
+
export interface ImageItemDecoratorProps extends Merge<
|
|
103
|
+
Merge<
|
|
104
|
+
limestone_Marquee_MarqueeControllerProps,
|
|
105
|
+
spotlight_Spottable_SpottableProps
|
|
106
|
+
>,
|
|
107
|
+
limestone_Skinnable_SkinnableProps
|
|
108
|
+
> {}
|
|
110
109
|
export function ImageItemDecorator<P>(
|
|
111
110
|
Component: React.ComponentType<P> | string,
|
|
112
111
|
): React.ComponentType<P & ImageItemDecoratorProps>;
|
|
113
112
|
|
|
114
|
-
export interface ImageItemProps
|
|
115
|
-
|
|
113
|
+
export interface ImageItemProps extends Merge<
|
|
114
|
+
ImageItemBaseProps,
|
|
115
|
+
ImageItemDecoratorProps
|
|
116
|
+
> {}
|
|
116
117
|
/**
|
|
117
118
|
* A limestone-styled image item, Marquee and Spottable applied.
|
|
118
119
|
*
|
package/ImageItem/ImageItem.js
CHANGED
|
@@ -11,6 +11,7 @@ var _ImageItem = require("@enact/ui/ImageItem");
|
|
|
11
11
|
var _Layout = require("@enact/ui/Layout");
|
|
12
12
|
var _propTypes2 = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
var _compose = _interopRequireDefault(require("ramda/src/compose"));
|
|
14
|
+
var _$L = _interopRequireDefault(require("../internal/$L"));
|
|
14
15
|
var _Checkbox = require("../Checkbox");
|
|
15
16
|
var _Icon = _interopRequireDefault(require("../Icon"));
|
|
16
17
|
var _Image = _interopRequireDefault(require("../Image"));
|
|
@@ -225,15 +226,24 @@ var ImageItemBase = exports.ImageItemBase = (0, _kind["default"])({
|
|
|
225
226
|
publicClassNames: ['imageItem', 'caption', 'fullImage', 'horizontal', 'image', 'imageIcon', 'label', 'selected', 'selectionIcon', 'vertical']
|
|
226
227
|
},
|
|
227
228
|
computed: {
|
|
228
|
-
|
|
229
|
-
var
|
|
230
|
-
|
|
231
|
-
css = _ref.css,
|
|
232
|
-
index = _ref['data-index'],
|
|
233
|
-
imageIconComponent = _ref.imageIconComponent,
|
|
234
|
-
imageIconSrc = _ref.imageIconSrc,
|
|
229
|
+
'aria-label': function ariaLabel(_ref) {
|
|
230
|
+
var customAriaLabel = _ref['aria-label'],
|
|
231
|
+
children = _ref.children,
|
|
235
232
|
label = _ref.label,
|
|
236
|
-
|
|
233
|
+
selected = _ref.selected,
|
|
234
|
+
showSelection = _ref.showSelection;
|
|
235
|
+
var defaultAriaLabel = "".concat(children || '').concat(label ? " ".concat(label) : '');
|
|
236
|
+
return "".concat(customAriaLabel || defaultAriaLabel).concat(selected && showSelection ? ' ' + (0, _$L["default"])('Selected') : '');
|
|
237
|
+
},
|
|
238
|
+
children: function children(_ref2) {
|
|
239
|
+
var centered = _ref2.centered,
|
|
240
|
+
_children = _ref2.children,
|
|
241
|
+
css = _ref2.css,
|
|
242
|
+
index = _ref2['data-index'],
|
|
243
|
+
imageIconComponent = _ref2.imageIconComponent,
|
|
244
|
+
imageIconSrc = _ref2.imageIconSrc,
|
|
245
|
+
label = _ref2.label,
|
|
246
|
+
orientation = _ref2.orientation;
|
|
237
247
|
var hasImageIcon = imageIconSrc && orientation === 'vertical';
|
|
238
248
|
if (!hasImageIcon && !_children && !label) return;
|
|
239
249
|
var alignment = orientation === 'vertical' && centered ? {
|
|
@@ -270,23 +280,23 @@ var ImageItemBase = exports.ImageItemBase = (0, _kind["default"])({
|
|
|
270
280
|
children: captions
|
|
271
281
|
}) : captions;
|
|
272
282
|
},
|
|
273
|
-
className: function className(
|
|
274
|
-
var children =
|
|
275
|
-
imageIconSrc =
|
|
276
|
-
label =
|
|
277
|
-
orientation =
|
|
278
|
-
styler =
|
|
279
|
-
wideImage =
|
|
283
|
+
className: function className(_ref3) {
|
|
284
|
+
var children = _ref3.children,
|
|
285
|
+
imageIconSrc = _ref3.imageIconSrc,
|
|
286
|
+
label = _ref3.label,
|
|
287
|
+
orientation = _ref3.orientation,
|
|
288
|
+
styler = _ref3.styler,
|
|
289
|
+
wideImage = _ref3.wideImage;
|
|
280
290
|
return styler.append({
|
|
281
291
|
fullImage: orientation === 'vertical' && !children && !label && !imageIconSrc,
|
|
282
292
|
wideImage: orientation === 'horizontal' && wideImage
|
|
283
293
|
});
|
|
284
294
|
},
|
|
285
|
-
selectionComponent: function selectionComponent(
|
|
286
|
-
var css =
|
|
287
|
-
orientation =
|
|
288
|
-
selected =
|
|
289
|
-
SelectionComponent =
|
|
295
|
+
selectionComponent: function selectionComponent(_ref4) {
|
|
296
|
+
var css = _ref4.css,
|
|
297
|
+
orientation = _ref4.orientation,
|
|
298
|
+
selected = _ref4.selected,
|
|
299
|
+
SelectionComponent = _ref4.selectionComponent;
|
|
290
300
|
if (SelectionComponent) {
|
|
291
301
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(SelectionComponent, {});
|
|
292
302
|
} else if (orientation === 'vertical') {
|
|
@@ -303,23 +313,19 @@ var ImageItemBase = exports.ImageItemBase = (0, _kind["default"])({
|
|
|
303
313
|
}
|
|
304
314
|
}
|
|
305
315
|
},
|
|
306
|
-
render: function render(
|
|
307
|
-
var css =
|
|
308
|
-
disabled =
|
|
309
|
-
orientation =
|
|
310
|
-
SelectionComponent =
|
|
311
|
-
showSelection =
|
|
312
|
-
rest = _objectWithoutProperties(
|
|
316
|
+
render: function render(_ref5) {
|
|
317
|
+
var css = _ref5.css,
|
|
318
|
+
disabled = _ref5.disabled,
|
|
319
|
+
orientation = _ref5.orientation,
|
|
320
|
+
SelectionComponent = _ref5.selectionComponent,
|
|
321
|
+
showSelection = _ref5.showSelection,
|
|
322
|
+
rest = _objectWithoutProperties(_ref5, _excluded);
|
|
313
323
|
var isSlotBefore = orientation === 'horizontal' && showSelection;
|
|
314
324
|
delete rest.centered;
|
|
315
325
|
delete rest.imageIconComponent;
|
|
316
326
|
delete rest.imageIconSrc;
|
|
317
327
|
delete rest.label;
|
|
318
328
|
delete rest.wideImage;
|
|
319
|
-
if (showSelection) {
|
|
320
|
-
rest['role'] = 'checkbox';
|
|
321
|
-
rest['aria-checked'] = rest.selected;
|
|
322
|
-
}
|
|
323
329
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ImageItem.ImageItem, _objectSpread(_objectSpread({}, rest), {}, {
|
|
324
330
|
"aria-disabled": disabled,
|
|
325
331
|
css: css,
|
|
@@ -20,16 +20,16 @@
|
|
|
20
20
|
line-height: 1.75rem;
|
|
21
21
|
}
|
|
22
22
|
:global(.enact-locale-km) .imageItem .caption {
|
|
23
|
-
font-size:
|
|
23
|
+
font-size: var(--primitive-font-size-54);
|
|
24
24
|
}
|
|
25
25
|
:global(.enact-locale-si) .imageItem .caption {
|
|
26
|
-
font-size:
|
|
26
|
+
font-size: var(--primitive-font-size-54);
|
|
27
27
|
}
|
|
28
28
|
:global(.enact-locale-th) .imageItem .caption {
|
|
29
|
-
font-size:
|
|
29
|
+
font-size: var(--primitive-font-size-54);
|
|
30
30
|
}
|
|
31
31
|
:global(.enact-locale-vi) .imageItem .caption {
|
|
32
|
-
font-size:
|
|
32
|
+
font-size: var(--primitive-font-size-54);
|
|
33
33
|
}
|
|
34
34
|
.imageItem .label {
|
|
35
35
|
font-size: var(--primitive-font-size-48);
|
|
@@ -37,20 +37,20 @@
|
|
|
37
37
|
line-height: 1.25rem;
|
|
38
38
|
}
|
|
39
39
|
:global(.enact-locale-km) .imageItem .label {
|
|
40
|
-
font-size:
|
|
40
|
+
font-size: var(--primitive-font-size-36);
|
|
41
41
|
}
|
|
42
42
|
:global(.enact-locale-si) .imageItem .label {
|
|
43
|
-
font-size:
|
|
43
|
+
font-size: var(--primitive-font-size-36);
|
|
44
44
|
}
|
|
45
45
|
:global(.enact-locale-th) .imageItem .label {
|
|
46
|
-
font-size:
|
|
46
|
+
font-size: var(--primitive-font-size-36);
|
|
47
47
|
}
|
|
48
48
|
:global(.enact-locale-vi) .imageItem .label {
|
|
49
|
-
font-size:
|
|
49
|
+
font-size: var(--primitive-font-size-36);
|
|
50
50
|
}
|
|
51
51
|
.imageItem.vertical.fullImage {
|
|
52
52
|
border-radius: 0;
|
|
53
|
-
padding:
|
|
53
|
+
padding: var(--primitive-spacing-60);
|
|
54
54
|
}
|
|
55
55
|
.imageItem.vertical.fullImage .image {
|
|
56
56
|
transition: transform 200ms ease-in-out, box-shadow 200ms ease-in-out;
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
}
|
|
72
72
|
.imageItem.vertical:not(.fullImage) {
|
|
73
73
|
padding: var(--primitive-spacing-24) var(--primitive-spacing-24) var(--primitive-spacing-30);
|
|
74
|
-
margin: 0
|
|
74
|
+
margin: 0 var(--primitive-spacing-36) var(--primitive-spacing-30) var(--primitive-spacing-36);
|
|
75
75
|
}
|
|
76
76
|
.imageItem.vertical .selectionContainer {
|
|
77
77
|
background-color: transparent;
|
|
@@ -123,9 +123,9 @@
|
|
|
123
123
|
height: 1.375rem;
|
|
124
124
|
}
|
|
125
125
|
.imageItem.horizontal {
|
|
126
|
-
padding:
|
|
126
|
+
padding: var(--primitive-spacing-30) 1rem;
|
|
127
127
|
align-items: center;
|
|
128
|
-
margin: 0
|
|
128
|
+
margin: 0 var(--primitive-spacing-36) var(--primitive-spacing-30) var(--primitive-spacing-36);
|
|
129
129
|
}
|
|
130
130
|
.imageItem.horizontal .image {
|
|
131
131
|
width: 3.75rem;
|
|
@@ -180,7 +180,7 @@
|
|
|
180
180
|
border-color: color(from var(--semantic-color-on-surface-main-selected) srgb r g b / 0.7);
|
|
181
181
|
}
|
|
182
182
|
.imageItem:global(.neutral).selected.vertical .selectionIcon {
|
|
183
|
-
background-color: var(--semantic-color-surface-
|
|
183
|
+
background-color: var(--semantic-color-surface-highlight);
|
|
184
184
|
color: var(--semantic-color-on-surface-white);
|
|
185
185
|
}
|
|
186
186
|
.imageItem:global(.neutral).vertical.fullImage .selectionContainer::after {
|
|
@@ -248,7 +248,7 @@
|
|
|
248
248
|
}
|
|
249
249
|
:global(.spotlight-input-key) .imageItem:global(.neutral):global(.spottable):focus.vertical.selected .selectionIcon,
|
|
250
250
|
:global(.spotlight-input-mouse) .imageItem:global(.neutral):global(.spottable):focus.vertical.selected .selectionIcon {
|
|
251
|
-
background-color: var(--semantic-color-surface-
|
|
251
|
+
background-color: var(--semantic-color-surface-highlight);
|
|
252
252
|
color: var(--semantic-color-on-surface-white);
|
|
253
253
|
}
|
|
254
254
|
:global(.spotlight-input-touch) .imageItem:global(.neutral):global(.spottable):active {
|
|
@@ -284,7 +284,7 @@
|
|
|
284
284
|
box-shadow: 0 0.75rem 0.75rem color(from var(--semantic-color-on-background-black) srgb r g b / 0.35);
|
|
285
285
|
}
|
|
286
286
|
:global(.spotlight-input-touch) .imageItem:global(.neutral):global(.spottable):active.vertical.selected .selectionIcon {
|
|
287
|
-
background-color: var(--semantic-color-surface-
|
|
287
|
+
background-color: var(--semantic-color-surface-highlight);
|
|
288
288
|
color: var(--semantic-color-on-surface-white);
|
|
289
289
|
}
|
|
290
290
|
:global(.noAnimation) .imageItem:global(.neutral).vertical.fullImage .image {
|
|
@@ -332,7 +332,7 @@
|
|
|
332
332
|
border-color: color(from var(--semantic-color-on-surface-main-selected) srgb r g b / 0.7);
|
|
333
333
|
}
|
|
334
334
|
:global(.enact-a11y-high-contrast) .imageItem:global(.neutral):global(.highContrast).selected.vertical .selectionIcon {
|
|
335
|
-
background-color: var(--semantic-color-surface-
|
|
335
|
+
background-color: var(--semantic-color-surface-highlight);
|
|
336
336
|
color: var(--semantic-color-on-surface-white);
|
|
337
337
|
}
|
|
338
338
|
:global(.enact-a11y-high-contrast) .imageItem:global(.neutral):global(.highContrast).vertical.fullImage .selectionContainer::after {
|
|
@@ -400,7 +400,7 @@
|
|
|
400
400
|
}
|
|
401
401
|
:global(.spotlight-input-key) :global(.enact-a11y-high-contrast) .imageItem:global(.neutral):global(.highContrast):global(.spottable):focus.vertical.selected .selectionIcon,
|
|
402
402
|
:global(.spotlight-input-mouse) :global(.enact-a11y-high-contrast) .imageItem:global(.neutral):global(.highContrast):global(.spottable):focus.vertical.selected .selectionIcon {
|
|
403
|
-
background-color: var(--semantic-color-surface-
|
|
403
|
+
background-color: var(--semantic-color-surface-highlight);
|
|
404
404
|
color: var(--semantic-color-on-surface-white);
|
|
405
405
|
}
|
|
406
406
|
:global(.spotlight-input-touch) :global(.enact-a11y-high-contrast) .imageItem:global(.neutral):global(.highContrast):global(.spottable):active {
|
|
@@ -436,7 +436,7 @@
|
|
|
436
436
|
box-shadow: 0 0.75rem 0.75rem color(from var(--semantic-color-on-background-black) srgb r g b / 0.35);
|
|
437
437
|
}
|
|
438
438
|
:global(.spotlight-input-touch) :global(.enact-a11y-high-contrast) .imageItem:global(.neutral):global(.highContrast):global(.spottable):active.vertical.selected .selectionIcon {
|
|
439
|
-
background-color: var(--semantic-color-surface-
|
|
439
|
+
background-color: var(--semantic-color-surface-highlight);
|
|
440
440
|
color: var(--semantic-color-on-surface-white);
|
|
441
441
|
}
|
|
442
442
|
:global(.noAnimation) :global(.enact-a11y-high-contrast) .imageItem:global(.neutral):global(.highContrast).vertical.fullImage .image {
|
|
@@ -484,7 +484,7 @@
|
|
|
484
484
|
border-color: color(from var(--semantic-color-on-surface-main-selected) srgb r g b / 0.7);
|
|
485
485
|
}
|
|
486
486
|
.imageItem:global(.light).selected.vertical .selectionIcon {
|
|
487
|
-
background-color: var(--semantic-color-surface-
|
|
487
|
+
background-color: var(--semantic-color-surface-highlight);
|
|
488
488
|
color: var(--semantic-color-on-surface-white);
|
|
489
489
|
}
|
|
490
490
|
.imageItem:global(.light).vertical.fullImage .selectionContainer::after {
|
|
@@ -552,7 +552,7 @@
|
|
|
552
552
|
}
|
|
553
553
|
:global(.spotlight-input-key) .imageItem:global(.light):global(.spottable):focus.vertical.selected .selectionIcon,
|
|
554
554
|
:global(.spotlight-input-mouse) .imageItem:global(.light):global(.spottable):focus.vertical.selected .selectionIcon {
|
|
555
|
-
background-color: var(--semantic-color-surface-
|
|
555
|
+
background-color: var(--semantic-color-surface-highlight);
|
|
556
556
|
color: var(--semantic-color-on-surface-white);
|
|
557
557
|
}
|
|
558
558
|
:global(.spotlight-input-touch) .imageItem:global(.light):global(.spottable):active {
|
|
@@ -588,7 +588,7 @@
|
|
|
588
588
|
box-shadow: 0 0.75rem 0.75rem color(from var(--semantic-color-on-background-black) srgb r g b / 0.35);
|
|
589
589
|
}
|
|
590
590
|
:global(.spotlight-input-touch) .imageItem:global(.light):global(.spottable):active.vertical.selected .selectionIcon {
|
|
591
|
-
background-color: var(--semantic-color-surface-
|
|
591
|
+
background-color: var(--semantic-color-surface-highlight);
|
|
592
592
|
color: var(--semantic-color-on-surface-white);
|
|
593
593
|
}
|
|
594
594
|
:global(.noAnimation) .imageItem:global(.light).vertical.fullImage .image {
|
|
@@ -641,7 +641,7 @@
|
|
|
641
641
|
border-color: color(from var(--semantic-color-on-surface-main-selected) srgb r g b / 0.7);
|
|
642
642
|
}
|
|
643
643
|
.imageItem:global(.game).selected.vertical .selectionIcon {
|
|
644
|
-
background-color: var(--semantic-color-surface-
|
|
644
|
+
background-color: var(--semantic-color-surface-highlight);
|
|
645
645
|
color: var(--semantic-color-on-surface-white);
|
|
646
646
|
}
|
|
647
647
|
.imageItem:global(.game).vertical.fullImage .selectionContainer::after {
|
|
@@ -709,7 +709,7 @@
|
|
|
709
709
|
}
|
|
710
710
|
:global(.spotlight-input-key) .imageItem:global(.game):global(.spottable):focus.vertical.selected .selectionIcon,
|
|
711
711
|
:global(.spotlight-input-mouse) .imageItem:global(.game):global(.spottable):focus.vertical.selected .selectionIcon {
|
|
712
|
-
background-color: var(--semantic-color-surface-
|
|
712
|
+
background-color: var(--semantic-color-surface-highlight);
|
|
713
713
|
color: var(--semantic-color-on-surface-white);
|
|
714
714
|
}
|
|
715
715
|
:global(.spotlight-input-touch) .imageItem:global(.game):global(.spottable):active {
|
|
@@ -745,7 +745,7 @@
|
|
|
745
745
|
box-shadow: 0 0.75rem 0.75rem color(from var(--semantic-color-on-background-black) srgb r g b / 0.35);
|
|
746
746
|
}
|
|
747
747
|
:global(.spotlight-input-touch) .imageItem:global(.game):global(.spottable):active.vertical.selected .selectionIcon {
|
|
748
|
-
background-color: var(--semantic-color-surface-
|
|
748
|
+
background-color: var(--semantic-color-surface-highlight);
|
|
749
749
|
color: var(--semantic-color-on-surface-white);
|
|
750
750
|
}
|
|
751
751
|
:global(.noAnimation) .imageItem:global(.game).vertical.fullImage .image {
|
|
@@ -797,7 +797,7 @@
|
|
|
797
797
|
border-color: color(from var(--semantic-color-on-surface-main-selected) srgb r g b / 0.7);
|
|
798
798
|
}
|
|
799
799
|
:global(.green) .imageItem:global(.game).selected.vertical .selectionIcon {
|
|
800
|
-
background-color: var(--semantic-color-surface-
|
|
800
|
+
background-color: var(--semantic-color-surface-highlight);
|
|
801
801
|
color: var(--semantic-color-on-surface-white);
|
|
802
802
|
}
|
|
803
803
|
:global(.green) .imageItem:global(.game).vertical.fullImage .selectionContainer::after {
|
|
@@ -865,7 +865,7 @@
|
|
|
865
865
|
}
|
|
866
866
|
:global(.spotlight-input-key) :global(.green) .imageItem:global(.game):global(.spottable):focus.vertical.selected .selectionIcon,
|
|
867
867
|
:global(.spotlight-input-mouse) :global(.green) .imageItem:global(.game):global(.spottable):focus.vertical.selected .selectionIcon {
|
|
868
|
-
background-color: var(--semantic-color-surface-
|
|
868
|
+
background-color: var(--semantic-color-surface-highlight);
|
|
869
869
|
color: var(--semantic-color-on-surface-white);
|
|
870
870
|
}
|
|
871
871
|
:global(.spotlight-input-touch) :global(.green) .imageItem:global(.game):global(.spottable):active {
|
|
@@ -901,7 +901,7 @@
|
|
|
901
901
|
box-shadow: 0 0.75rem 0.75rem color(from var(--semantic-color-on-background-black) srgb r g b / 0.35);
|
|
902
902
|
}
|
|
903
903
|
:global(.spotlight-input-touch) :global(.green) .imageItem:global(.game):global(.spottable):active.vertical.selected .selectionIcon {
|
|
904
|
-
background-color: var(--semantic-color-surface-
|
|
904
|
+
background-color: var(--semantic-color-surface-highlight);
|
|
905
905
|
color: var(--semantic-color-on-surface-white);
|
|
906
906
|
}
|
|
907
907
|
:global(.noAnimation) :global(.green) .imageItem:global(.game).vertical.fullImage .image {
|
|
@@ -953,7 +953,7 @@
|
|
|
953
953
|
border-color: color(from var(--semantic-color-on-surface-main-selected) srgb r g b / 0.7);
|
|
954
954
|
}
|
|
955
955
|
:global(.orange) .imageItem:global(.game).selected.vertical .selectionIcon {
|
|
956
|
-
background-color: var(--semantic-color-surface-
|
|
956
|
+
background-color: var(--semantic-color-surface-highlight);
|
|
957
957
|
color: var(--semantic-color-on-surface-white);
|
|
958
958
|
}
|
|
959
959
|
:global(.orange) .imageItem:global(.game).vertical.fullImage .selectionContainer::after {
|
|
@@ -1021,7 +1021,7 @@
|
|
|
1021
1021
|
}
|
|
1022
1022
|
:global(.spotlight-input-key) :global(.orange) .imageItem:global(.game):global(.spottable):focus.vertical.selected .selectionIcon,
|
|
1023
1023
|
:global(.spotlight-input-mouse) :global(.orange) .imageItem:global(.game):global(.spottable):focus.vertical.selected .selectionIcon {
|
|
1024
|
-
background-color: var(--semantic-color-surface-
|
|
1024
|
+
background-color: var(--semantic-color-surface-highlight);
|
|
1025
1025
|
color: var(--semantic-color-on-surface-white);
|
|
1026
1026
|
}
|
|
1027
1027
|
:global(.spotlight-input-touch) :global(.orange) .imageItem:global(.game):global(.spottable):active {
|
|
@@ -1057,7 +1057,7 @@
|
|
|
1057
1057
|
box-shadow: 0 0.75rem 0.75rem color(from var(--semantic-color-on-background-black) srgb r g b / 0.35);
|
|
1058
1058
|
}
|
|
1059
1059
|
:global(.spotlight-input-touch) :global(.orange) .imageItem:global(.game):global(.spottable):active.vertical.selected .selectionIcon {
|
|
1060
|
-
background-color: var(--semantic-color-surface-
|
|
1060
|
+
background-color: var(--semantic-color-surface-highlight);
|
|
1061
1061
|
color: var(--semantic-color-on-surface-white);
|
|
1062
1062
|
}
|
|
1063
1063
|
:global(.noAnimation) :global(.orange) .imageItem:global(.game).vertical.fullImage .image {
|
|
@@ -169,20 +169,13 @@ describe('ImageItem', function () {
|
|
|
169
169
|
var actual = _react.screen.getAllByRole('img')[0].children.item(0);
|
|
170
170
|
expect(actual).toHaveClass(expected);
|
|
171
171
|
});
|
|
172
|
-
test('should have `
|
|
173
|
-
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_ImageItem.ImageItemBase, {
|
|
174
|
-
showSelection: true
|
|
175
|
-
}));
|
|
176
|
-
var actual = _react.screen.getByRole('checkbox');
|
|
177
|
-
expect(actual).toBeInTheDocument();
|
|
178
|
-
});
|
|
179
|
-
test('should be `checked` when `showSelection` and `selected` props are true', function () {
|
|
172
|
+
test('should have "Selected" in `aria-label` when `showSelection` and `selected` is true', function () {
|
|
180
173
|
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_ImageItem.ImageItemBase, {
|
|
181
174
|
selected: true,
|
|
182
175
|
showSelection: true
|
|
183
176
|
}));
|
|
184
|
-
var actual = _react.screen.
|
|
185
|
-
expect(actual).
|
|
177
|
+
var actual = _react.screen.getByLabelText('Selected');
|
|
178
|
+
expect(actual).toBeInTheDocument();
|
|
186
179
|
});
|
|
187
180
|
test('should support `wideImage` prop', function () {
|
|
188
181
|
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_ImageItem.ImageItemBase, {
|