@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.
Files changed (166) hide show
  1. package/.github/workflows/ci-branch.yml +21 -0
  2. package/.github/workflows/ci-pull-request.yml +16 -0
  3. package/.github/workflows/ci-reusable.yml +73 -0
  4. package/ActionGuide/ActionGuide.d.ts +5 -4
  5. package/ActionGuide/ActionGuide.module.css +1 -1
  6. package/Alert/Alert.d.ts +4 -2
  7. package/Alert/Alert.js +4 -1
  8. package/Alert/Alert.module.css +36 -0
  9. package/BodyText/BodyText.d.ts +5 -4
  10. package/BodyText/BodyText.module.css +7 -7
  11. package/Button/Button.d.ts +17 -12
  12. package/Button/Button.js +1 -1
  13. package/Button/Button.module.css +195 -268
  14. package/CHANGELOG.md +226 -0
  15. package/Card/Card.d.ts +36 -8
  16. package/Card/Card.js +157 -20
  17. package/Card/Card.module.css +277 -58
  18. package/Card/tests/Card-specs.js +30 -0
  19. package/Checkbox/Checkbox.d.ts +8 -7
  20. package/Checkbox/Checkbox.js +3 -1
  21. package/Checkbox/Checkbox.module.css +213 -120
  22. package/Checkbox/tests/Checkbox-specs.js +1 -1
  23. package/CheckboxItem/CheckboxItem.d.ts +22 -7
  24. package/CheckboxItem/CheckboxItem.js +69 -4
  25. package/Chips/Chip.js +60 -7
  26. package/Chips/Chip.module.css +3 -3
  27. package/Chips/Chips.js +26 -12
  28. package/Chips/Chips.module.css +1 -1
  29. package/Chips/tests/Chip-specs.js +19 -9
  30. package/Chips/tests/Chips-specs.js +19 -19
  31. package/ContextualMenuDecorator/ContextualMenuDecorator.d.ts +4 -5
  32. package/ContextualPopupDecorator/ContextualPopup.module.css +34 -34
  33. package/ContextualPopupDecorator/ContextualPopupDecorator.js +557 -549
  34. package/DatePicker/DatePicker.d.ts +4 -5
  35. package/DayPicker/DayPicker.d.ts +8 -7
  36. package/Dropdown/Dropdown.d.ts +11 -13
  37. package/Dropdown/Dropdown.module.css +9 -9
  38. package/Dropdown/DropdownList.js +16 -11
  39. package/FixedPopupPanels/FixedPopupPanels.d.ts +4 -2
  40. package/FixedPopupPanels/FixedPopupPanels.module.css +18 -18
  41. package/FlexiblePopupPanels/FlexiblePopupPanels.module.css +23 -23
  42. package/FormCheckboxItem/FormCheckboxItem.d.ts +5 -4
  43. package/Heading/Heading.d.ts +8 -7
  44. package/Heading/Heading.module.css +5 -5
  45. package/Icon/Icon.d.ts +14 -4
  46. package/Icon/Icon.js +48 -2
  47. package/Icon/Icon.module.css +1 -1
  48. package/Icon/IconList.js +25 -1
  49. package/IconItem/IconItem.d.ts +13 -12
  50. package/IconItem/IconItem.js +15 -0
  51. package/IconItem/IconItem.module.css +107 -1
  52. package/Image/Image.d.ts +5 -4
  53. package/ImageItem/ImageItem.d.ts +11 -10
  54. package/ImageItem/ImageItem.js +37 -31
  55. package/ImageItem/ImageItem.module.css +30 -30
  56. package/ImageItem/tests/ImageItem-specs.js +3 -10
  57. package/Input/Input.js +9 -2
  58. package/Input/Input.module.css +37 -8
  59. package/Input/InputField.js +5 -1
  60. package/Input/InputField.module.css +17 -2
  61. package/Input/InputFieldSpotlightDecorator.js +213 -229
  62. package/Input/index.d.ts +15 -18
  63. package/Input/tests/InputField-specs.js +21 -0
  64. package/Item/Item.d.ts +16 -9
  65. package/Item/Item.js +20 -2
  66. package/Item/Item.module.css +1 -1
  67. package/KeyGuide/KeyGuide.d.ts +8 -7
  68. package/KeyGuide/KeyGuide.module.css +25 -1
  69. package/Marquee/Marquee.d.ts +2 -4
  70. package/MediaOverlay/MediaOverlay.d.ts +12 -11
  71. package/MediaOverlay/MediaOverlay.js +43 -21
  72. package/MediaOverlay/MediaOverlay.module.css +114 -15
  73. package/MediaPlayer/MediaControls.js +195 -13
  74. package/MediaPlayer/MediaControls.module.css +3 -2
  75. package/MediaPlayer/MediaSlider.module.css +7 -20
  76. package/MediaPlayer/index.d.ts +59 -7
  77. package/PageViews/PageViews.js +165 -80
  78. package/PageViews/PageViewsRouter.js +9 -0
  79. package/PageViews/tests/PageViews-specs.js +84 -0
  80. package/Panels/Header.js +48 -30
  81. package/Panels/Header.module.css +83 -31
  82. package/Panels/Panel.module.css +1 -1
  83. package/Panels/index.d.ts +7 -8
  84. package/Picker/Picker.d.ts +4 -5
  85. package/Picker/Picker.module.css +2 -2
  86. package/Popup/Popup.js +242 -240
  87. package/Popup/Popup.module.css +24 -24
  88. package/PopupTabLayout/PopupTabLayout.d.ts +5 -7
  89. package/PopupTabLayout/PopupTabLayout.js +15 -9
  90. package/PopupTabLayout/PopupTabLayout.module.css +53 -16
  91. package/PopupTabLayout/PopupTabLayoutStateContext.js +8 -0
  92. package/ProgressBar/ProgressBar.d.ts +5 -4
  93. package/ProgressBar/ProgressBarTooltip.module.css +12 -12
  94. package/ProgressButton/ProgressButton.d.ts +4 -5
  95. package/QuickGuidePanels/QuickGuidePanels.module.css +2 -2
  96. package/RadioItem/RadioItem.d.ts +18 -5
  97. package/RadioItem/RadioItem.js +67 -2
  98. package/RadioItem/RadioItem.module.css +36 -36
  99. package/RangePicker/RangePicker.module.css +2 -2
  100. package/Scroller/EditableWrapper.js +11 -4
  101. package/Scroller/Scroller.d.ts +20 -16
  102. package/Scroller/Scroller.js +9 -3
  103. package/Scroller/Scroller.module.css +4 -4
  104. package/Slider/Slider.d.ts +16 -14
  105. package/Slider/Slider.js +37 -4
  106. package/Slider/Slider.module.css +314 -91
  107. package/Slider/tests/Slider-specs.js +2 -1
  108. package/Spinner/Spinner.d.ts +5 -4
  109. package/Spinner/Spinner.module.css +9 -9
  110. package/Steps/Steps.d.ts +5 -4
  111. package/Steps/Steps.js +9 -5
  112. package/Switch/Switch.d.ts +8 -7
  113. package/Switch/Switch.module.css +100 -13
  114. package/SwitchItem/SwitchItem.d.ts +9 -6
  115. package/TabLayout/RefocusDecorator.js +15 -9
  116. package/TabLayout/TabGroup.js +3 -2
  117. package/TabLayout/TabGroup.module.css +2 -2
  118. package/TabLayout/TabLayout.d.ts +6 -0
  119. package/TabLayout/TabLayout.js +11 -1
  120. package/TabLayout/TabLayout.module.css +18 -0
  121. package/TabLayout/tests/TabLayout-specs.js +52 -0
  122. package/ThemeDecorator/ThemeDecorator.d.ts +9 -10
  123. package/ThemeDecorator/fontGenerator.js +1 -1
  124. package/ThemeDecorator/screenTypes.json +1 -0
  125. package/TimePicker/TimePicker.module.css +1 -1
  126. package/TooltipDecorator/Tooltip.module.css +1 -2
  127. package/TooltipDecorator/tests/util-specs.js +12 -0
  128. package/TooltipDecorator/useTooltip.js +1 -1
  129. package/TooltipDecorator/util.js +18 -11
  130. package/VideoPlayer/Feedback.js +3 -0
  131. package/VideoPlayer/Feedback.module.css +5 -9
  132. package/VideoPlayer/FeedbackIcons.js +1 -1
  133. package/VideoPlayer/FeedbackTooltip.module.css +55 -11
  134. package/VideoPlayer/VideoPlayer.d.ts +44 -18
  135. package/VideoPlayer/VideoPlayer.js +128 -23
  136. package/VideoPlayer/VideoPlayer.module.css +28 -11
  137. package/VirtualList/VirtualList.d.ts +9 -2
  138. package/VirtualList/VirtualList.js +31 -6
  139. package/VirtualList/tests/VirtualGridList-translate-specs.js +3 -0
  140. package/VirtualList/tests/VirtualList-specs.js +28 -1
  141. package/VirtualList/tests/VirtualList-translate-specs.js +4 -1
  142. package/VirtualList/tests/useEvent-specs.js +39 -0
  143. package/VirtualList/useEvent.js +45 -10
  144. package/VirtualList/useThemeVirtualList.js +3 -0
  145. package/WizardPanels/WizardPanels.module.css +2 -2
  146. package/WizardPanels/index.d.ts +4 -2
  147. package/fonts/Limestone_Icons.ttf +0 -0
  148. package/internal/$L/$L.js +3 -3
  149. package/internal/DateComponentPicker/DateComponentPicker.module.css +2 -2
  150. package/internal/DateTime/DateTime.module.css +1 -0
  151. package/internal/Panels/PanelsRouter.js +16 -5
  152. package/internal/Picker/Picker.module.css +2 -2
  153. package/internal/SharedStateDecorator/SharedStateDecorator.js +76 -99
  154. package/internal/validators/validators.js +21 -2
  155. package/package.json +14 -14
  156. package/styles/colors-highcontrast.less +9 -1
  157. package/styles/colors.less +11 -7
  158. package/styles/motion-mixins.less +66 -0
  159. package/styles/motions.less +78 -0
  160. package/styles/variables.less +176 -150
  161. package/useScroll/HoverToScroll.js +8 -5
  162. package/useScroll/ScrollbarTrack.module.css +8 -8
  163. package/useScroll/useEvent.js +7 -1
  164. package/useScroll/useScroll.js +2 -0
  165. package/useScroll/useScroll.module.css +6 -6
  166. package/.travis.yml +0 -40
package/Item/Item.js CHANGED
@@ -20,7 +20,7 @@ var _Skinnable = _interopRequireDefault(require("../Skinnable"));
20
20
  var _ItemModule = _interopRequireDefault(require("./Item.module.css"));
21
21
  var _jsxRuntime = require("react/jsx-runtime");
22
22
  var _excluded = ["componentRef", "content", "contentSize", "css", "label", "labelPosition", "marqueeOn"],
23
- _excluded2 = ["centered", "children", "componentRef", "contentRef", "contentSize", "css", "inline", "label", "labelPosition", "marqueeOn", "slotAfter", "slotBefore"];
23
+ _excluded2 = ["centered", "children", "componentRef", "contentRef", "contentSize", "css", "inline", "label", "labelPosition", "marqueeOn", "slotAfter", "slotAfterAria", "slotBefore", "slotBeforeAria"];
24
24
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
25
25
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
26
26
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
@@ -217,6 +217,13 @@ var ItemBase = exports.ItemBase = (0, _kind["default"])({
217
217
  * @public
218
218
  */
219
219
  slotAfter: _propTypes2["default"].node,
220
+ /**
221
+ * Aria-label for slotAfter icon.
222
+ *
223
+ * @type {String}
224
+ * @public
225
+ */
226
+ slotAfterAria: _propTypes2["default"].string,
220
227
  /**
221
228
  * Nodes to be inserted before `children` and `label`.
222
229
  *
@@ -227,7 +234,14 @@ var ItemBase = exports.ItemBase = (0, _kind["default"])({
227
234
  * @type {Node}
228
235
  * @public
229
236
  */
230
- slotBefore: _propTypes2["default"].node
237
+ slotBefore: _propTypes2["default"].node,
238
+ /**
239
+ * Aria-label for slotBefore icon.
240
+ *
241
+ * @type {String}
242
+ * @public
243
+ */
244
+ slotBeforeAria: _propTypes2["default"].string
231
245
  },
232
246
  defaultProps: {
233
247
  labelPosition: 'below',
@@ -267,7 +281,9 @@ var ItemBase = exports.ItemBase = (0, _kind["default"])({
267
281
  labelPosition = _ref5.labelPosition,
268
282
  marqueeOn = _ref5.marqueeOn,
269
283
  slotAfter = _ref5.slotAfter,
284
+ slotAfterAria = _ref5.slotAfterAria,
270
285
  slotBefore = _ref5.slotBefore,
286
+ slotBeforeAria = _ref5.slotBeforeAria,
271
287
  rest = _objectWithoutProperties(_ref5, _excluded2);
272
288
  delete rest.size;
273
289
  var keys = Object.keys(rest);
@@ -286,6 +302,7 @@ var ItemBase = exports.ItemBase = (0, _kind["default"])({
286
302
  className: css.bg
287
303
  }), slotBefore ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Layout.Cell, {
288
304
  className: css.slotBefore,
305
+ "aria-label": slotBeforeAria,
289
306
  shrink: true,
290
307
  children: slotBefore
291
308
  }) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(ItemContent, {
@@ -299,6 +316,7 @@ var ItemBase = exports.ItemBase = (0, _kind["default"])({
299
316
  shrink: inline
300
317
  }), slotAfter ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Layout.Cell, {
301
318
  className: css.slotAfter,
319
+ "aria-label": slotAfterAria,
302
320
  shrink: true,
303
321
  children: slotAfter
304
322
  }) : null]
@@ -7,7 +7,7 @@
7
7
  display: flex;
8
8
  position: relative;
9
9
  color: inherit;
10
- margin: 0 0.75rem 0.625rem 0.75rem;
10
+ margin: 0 var(--primitive-spacing-36) var(--primitive-spacing-30) var(--primitive-spacing-36);
11
11
  }
12
12
  .item.selected {
13
13
  /* Available for customization */
@@ -66,17 +66,18 @@ export class KeyGuideBase extends React.Component<
66
66
  Merge<React.HTMLProps<HTMLElement>, KeyGuideBaseProps>
67
67
  > {}
68
68
 
69
- export interface KeyGuideDecoratorProps
70
- extends Merge<
71
- limestone_Marquee_MarqueeControllerProps,
72
- limestone_Skinnable_SkinnableProps
73
- > {}
69
+ export interface KeyGuideDecoratorProps extends Merge<
70
+ limestone_Marquee_MarqueeControllerProps,
71
+ limestone_Skinnable_SkinnableProps
72
+ > {}
74
73
  export function KeyGuideDecorator<P>(
75
74
  Component: React.ComponentType<P> | string,
76
75
  ): React.ComponentType<P & KeyGuideDecoratorProps>;
77
76
 
78
- export interface KeyGuideProps
79
- extends Merge<KeyGuideBaseProps, KeyGuideDecoratorProps> {}
77
+ export interface KeyGuideProps extends Merge<
78
+ KeyGuideBaseProps,
79
+ KeyGuideDecoratorProps
80
+ > {}
80
81
  /**
81
82
  * A Key Guide component, ready to use in Limestone applications.
82
83
  *
@@ -7,7 +7,7 @@
7
7
  flex-direction: column;
8
8
  width: 15.625rem;
9
9
  right: 3.125rem;
10
- bottom: 2.5rem;
10
+ bottom: var(--primitive-spacing-120);
11
11
  padding: var(--primitive-spacing-48);
12
12
  gap: var(--primitive-spacing-42);
13
13
  }
@@ -64,6 +64,10 @@
64
64
  }
65
65
  .keyGuide:global(.neutral) {
66
66
  background: var(--semantic-color-surface-overlay-default);
67
+ outline-color: transparent;
68
+ outline-width: 0.063rem;
69
+ outline-style: solid;
70
+ outline-offset: -0.063rem;
67
71
  }
68
72
  .keyGuide:global(.neutral) .red {
69
73
  background-color: #ff6d78;
@@ -124,6 +128,10 @@
124
128
  }
125
129
  :global(.enact-a11y-high-contrast) .keyGuide:global(.neutral):global(.highContrast) {
126
130
  background: var(--semantic-color-surface-overlay-default);
131
+ outline-color: var(--semantic-color-stroke-main);
132
+ outline-width: 0.063rem;
133
+ outline-style: solid;
134
+ outline-offset: -0.063rem;
127
135
  }
128
136
  :global(.enact-a11y-high-contrast) .keyGuide:global(.neutral):global(.highContrast) .red {
129
137
  background-color: #ff6d78;
@@ -184,6 +192,10 @@
184
192
  }
185
193
  .keyGuide:global(.light) {
186
194
  background: var(--semantic-color-surface-overlay-default);
195
+ outline-color: transparent;
196
+ outline-width: 0.063rem;
197
+ outline-style: solid;
198
+ outline-offset: -0.063rem;
187
199
  }
188
200
  .keyGuide:global(.light) .red {
189
201
  background-color: #ff6d78;
@@ -247,6 +259,10 @@
247
259
  --semantic-color-surface-default-focused: #6d2fa1;
248
260
  --semantic-color-on-surface-main-focused: #e6e6e6;
249
261
  background: var(--semantic-color-surface-overlay-default);
262
+ outline-color: transparent;
263
+ outline-width: 0.063rem;
264
+ outline-style: solid;
265
+ outline-offset: -0.063rem;
250
266
  }
251
267
  .keyGuide:global(.game) .red {
252
268
  background-color: #ff6d78;
@@ -309,6 +325,10 @@
309
325
  --semantic-color-surface-default: #1F2C24;
310
326
  --semantic-color-surface-default-focused: #3ea07d;
311
327
  background: var(--semantic-color-surface-overlay-default);
328
+ outline-color: transparent;
329
+ outline-width: 0.063rem;
330
+ outline-style: solid;
331
+ outline-offset: -0.063rem;
312
332
  }
313
333
  :global(.green) .keyGuide:global(.game) .red {
314
334
  background-color: #ff6d78;
@@ -371,6 +391,10 @@
371
391
  --semantic-color-surface-default: #422923;
372
392
  --semantic-color-surface-default-focused: #b85f23;
373
393
  background: var(--semantic-color-surface-overlay-default);
394
+ outline-color: transparent;
395
+ outline-width: 0.063rem;
396
+ outline-style: solid;
397
+ outline-offset: -0.063rem;
374
398
  }
375
399
  :global(.orange) .keyGuide:global(.game) .red {
376
400
  background-color: #ff6d78;
@@ -27,14 +27,12 @@ export class MarqueeBase extends React.Component<
27
27
  Merge<React.HTMLProps<HTMLElement>, MarqueeBaseProps>
28
28
  > {}
29
29
 
30
- export interface MarqueeControllerProps
31
- extends ui_Marquee_MarqueeControllerProps {}
30
+ export interface MarqueeControllerProps extends ui_Marquee_MarqueeControllerProps {}
32
31
  export function MarqueeController<P>(
33
32
  Component: React.ComponentType<P> | string,
34
33
  ): React.ComponentType<P & MarqueeControllerProps>;
35
34
 
36
- export interface MarqueeDecoratorProps
37
- extends ui_Marquee_MarqueeDecoratorProps {}
35
+ export interface MarqueeDecoratorProps extends ui_Marquee_MarqueeDecoratorProps {}
38
36
  export function MarqueeDecorator<P>(
39
37
  Component: React.ComponentType<P> | string,
40
38
  ): React.ComponentType<P & MarqueeDecoratorProps>;
@@ -99,23 +99,24 @@ export class MediaOverlayBase extends React.Component<
99
99
  Merge<React.HTMLProps<HTMLElement>, MediaOverlayBaseProps>
100
100
  > {}
101
101
 
102
- export interface MediaOverlayDecoratorProps
103
- extends Merge<
102
+ export interface MediaOverlayDecoratorProps extends Merge<
103
+ Merge<
104
104
  Merge<
105
- Merge<
106
- limestone_Marquee_MarqueeControllerProps,
107
- spotlight_Spottable_SpottableProps
108
- >,
109
- ui_Slottable_SlottableProps
105
+ limestone_Marquee_MarqueeControllerProps,
106
+ spotlight_Spottable_SpottableProps
110
107
  >,
111
- limestone_Skinnable_SkinnableProps
112
- > {}
108
+ ui_Slottable_SlottableProps
109
+ >,
110
+ limestone_Skinnable_SkinnableProps
111
+ > {}
113
112
  export function MediaOverlayDecorator<P>(
114
113
  Component: React.ComponentType<P> | string,
115
114
  ): React.ComponentType<P & MediaOverlayDecoratorProps>;
116
115
 
117
- export interface MediaOverlayProps
118
- extends Merge<MediaOverlayBaseProps, MediaOverlayDecoratorProps> {}
116
+ export interface MediaOverlayProps extends Merge<
117
+ MediaOverlayBaseProps,
118
+ MediaOverlayDecoratorProps
119
+ > {}
119
120
  /**
120
121
  * A Limestone-styled `Media` component.
121
122
  *
@@ -4,11 +4,12 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports["default"] = exports.MediaOverlayDecorator = exports.MediaOverlayBase = exports.MediaOverlay = void 0;
7
+ var _propTypes = _interopRequireDefault(require("@enact/core/internal/prop-types"));
7
8
  var _kind = _interopRequireDefault(require("@enact/core/kind"));
8
9
  var _Spottable = _interopRequireDefault(require("@enact/spotlight/Spottable"));
9
10
  var _Layout = require("@enact/ui/Layout");
10
11
  var _Media = _interopRequireDefault(require("@enact/ui/Media"));
11
- var _propTypes = _interopRequireDefault(require("@enact/core/internal/prop-types"));
12
+ var _Touchable = _interopRequireDefault(require("@enact/ui/Touchable"));
12
13
  var _Pure = _interopRequireDefault(require("@enact/ui/internal/Pure"));
13
14
  var _Slottable = _interopRequireDefault(require("@enact/ui/Slottable"));
14
15
  var _propTypes2 = _interopRequireDefault(require("prop-types"));
@@ -138,6 +139,14 @@ var MediaOverlayBase = exports.MediaOverlayBase = (0, _kind["default"])({
138
139
  * @public
139
140
  */
140
141
  placeholder: _propTypes2["default"].string,
142
+ /**
143
+ * Indicates if the component is pressed.
144
+ *
145
+ * @type {Boolean}
146
+ * @default false
147
+ * @private
148
+ */
149
+ pressed: _propTypes2["default"].bool,
141
150
  /**
142
151
  * A number between `0` and `1` indicating the proportion of the filled portion of the bar.
143
152
  *
@@ -187,32 +196,43 @@ var MediaOverlayBase = exports.MediaOverlayBase = (0, _kind["default"])({
187
196
  },
188
197
  defaultProps: {
189
198
  mediaComponent: 'video',
199
+ pressed: false,
190
200
  progress: 0,
191
201
  textAlign: 'end'
192
202
  },
193
203
  styles: {
194
204
  css: _MediaOverlayModule["default"],
195
205
  className: 'mediaOverlay',
196
- publicClassNames: ['mediaOverlay', 'image', 'text']
206
+ publicClassNames: ['mediaOverlay', 'image', 'pressed', 'text']
207
+ },
208
+ computed: {
209
+ className: function className(_ref) {
210
+ var pressed = _ref.pressed,
211
+ styler = _ref.styler;
212
+ return styler.append({
213
+ pressed: pressed
214
+ });
215
+ }
197
216
  },
198
- render: function render(_ref) {
199
- var caption = _ref.caption,
200
- css = _ref.css,
201
- imageOverlay = _ref.imageOverlay,
202
- loop = _ref.loop,
203
- marqueeOn = _ref.marqueeOn,
204
- mediaComponent = _ref.mediaComponent,
205
- muted = _ref.muted,
206
- noAutoPlay = _ref.noAutoPlay,
207
- placeholder = _ref.placeholder,
208
- progress = _ref.progress,
209
- showProgress = _ref.showProgress,
210
- source = _ref.source,
211
- title = _ref.title,
212
- subtitle = _ref.subtitle,
213
- text = _ref.text,
214
- textAlign = _ref.textAlign,
215
- rest = _objectWithoutProperties(_ref, _excluded);
217
+ render: function render(_ref2) {
218
+ var caption = _ref2.caption,
219
+ css = _ref2.css,
220
+ imageOverlay = _ref2.imageOverlay,
221
+ loop = _ref2.loop,
222
+ marqueeOn = _ref2.marqueeOn,
223
+ mediaComponent = _ref2.mediaComponent,
224
+ muted = _ref2.muted,
225
+ noAutoPlay = _ref2.noAutoPlay,
226
+ placeholder = _ref2.placeholder,
227
+ progress = _ref2.progress,
228
+ showProgress = _ref2.showProgress,
229
+ source = _ref2.source,
230
+ title = _ref2.title,
231
+ subtitle = _ref2.subtitle,
232
+ text = _ref2.text,
233
+ textAlign = _ref2.textAlign,
234
+ rest = _objectWithoutProperties(_ref2, _excluded);
235
+ delete rest.pressed;
216
236
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", _objectSpread(_objectSpread({}, rest), {}, {
217
237
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
218
238
  className: css.bg
@@ -279,7 +299,9 @@ var MediaOverlayBase = exports.MediaOverlayBase = (0, _kind["default"])({
279
299
  */
280
300
  var MediaOverlayDecorator = exports.MediaOverlayDecorator = (0, _compose["default"])((0, _Marquee.MarqueeController)({
281
301
  marqueeOnFocus: true
282
- }), _Pure["default"], _Spottable["default"], (0, _Slottable["default"])({
302
+ }), _Pure["default"], (0, _Touchable["default"])({
303
+ activeProp: 'pressed'
304
+ }), _Spottable["default"], (0, _Slottable["default"])({
283
305
  slots: ['source']
284
306
  }), _Skinnable["default"]);
285
307
 
@@ -1,3 +1,86 @@
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
  .mediaOverlay {
2
85
  display: block;
3
86
  position: relative;
@@ -16,6 +99,37 @@
16
99
  }
17
100
  .mediaOverlay .mediaContainer {
18
101
  position: relative;
102
+ transition: transform var(--lime-focus-out-motion-duration) var(--lime-focus-out-motion-easing-function);
103
+ }
104
+ :global(.spotlight-input-key) .mediaOverlay:global(.spottable):focus .mediaContainer,
105
+ :global(.spotlight-input-mouse) .mediaOverlay:global(.spottable):focus .mediaContainer {
106
+ transform: scale(1.1);
107
+ transition: transform var(--lime-focus-in-motion-duration) var(--lime-focus-in-motion-easing-function);
108
+ }
109
+ :global(.spotlight-input-touch) .mediaOverlay:global(.spottable):active .mediaContainer {
110
+ transform: scale(1.1);
111
+ transition: transform var(--lime-focus-in-motion-duration) var(--lime-focus-in-motion-easing-function);
112
+ }
113
+ :global(.spotlight-input-key) .mediaOverlay:not([disabled]):global(.spottable):focus.pressed .mediaContainer,
114
+ :global(.spotlight-input-mouse) .mediaOverlay:not([disabled]):global(.spottable):focus.pressed .mediaContainer,
115
+ :global(.spotlight-input-key) .mediaOverlay:not([disabled]):global(.spottable):focus:active .mediaContainer,
116
+ :global(.spotlight-input-mouse) .mediaOverlay:not([disabled]):global(.spottable):focus:active .mediaContainer {
117
+ transform: scale(1.05);
118
+ transition: transform var(--lime-press-motion-duration) var(--lime-press-motion-easing-function);
119
+ }
120
+ :global(.spotlight-input-key) .mediaOverlay:not([disabled]):global(.spottable):focus:not(.pressed) .mediaContainer,
121
+ :global(.spotlight-input-mouse) .mediaOverlay:not([disabled]):global(.spottable):focus:not(.pressed) .mediaContainer {
122
+ transform: scale(1.1);
123
+ transition: transform var(--lime-release-motion-duration) var(--lime-release-motion-easing-function);
124
+ }
125
+ :global(.spotlight-input-touch) .mediaOverlay:not([disabled]):global(.spottable):active.pressed .mediaContainer,
126
+ :global(.spotlight-input-touch) .mediaOverlay:not([disabled]):global(.spottable):active:active .mediaContainer {
127
+ transform: scale(1.05);
128
+ transition: transform var(--lime-press-motion-duration) var(--lime-press-motion-easing-function);
129
+ }
130
+ :global(.spotlight-input-touch) .mediaOverlay:not([disabled]):global(.spottable):active:not(.pressed) .mediaContainer {
131
+ transform: scale(1.1);
132
+ transition: transform var(--lime-release-motion-duration) var(--lime-release-motion-easing-function);
19
133
  }
20
134
  .mediaOverlay .media {
21
135
  display: block;
@@ -88,21 +202,6 @@
88
202
  font-size: var(--primitive-font-size-48);
89
203
  line-height: 1.3em;
90
204
  }
91
- :global(.spotlight-input-key) .mediaOverlay:global(.spottable):focus .image,
92
- :global(.spotlight-input-mouse) .mediaOverlay:global(.spottable):focus .image,
93
- :global(.spotlight-input-key) .mediaOverlay:global(.spottable):focus .media,
94
- :global(.spotlight-input-mouse) .mediaOverlay:global(.spottable):focus .media,
95
- :global(.spotlight-input-key) .mediaOverlay:global(.spottable):focus .progressBar,
96
- :global(.spotlight-input-mouse) .mediaOverlay:global(.spottable):focus .progressBar {
97
- transform: scale(1.1);
98
- transition: transform 200ms ease-in-out;
99
- }
100
- :global(.spotlight-input-touch) .mediaOverlay:global(.spottable):active .image,
101
- :global(.spotlight-input-touch) .mediaOverlay:global(.spottable):active .media,
102
- :global(.spotlight-input-touch) .mediaOverlay:global(.spottable):active .progressBar {
103
- transform: scale(1.1);
104
- transition: transform 200ms ease-in-out;
105
- }
106
205
  .mediaOverlay:global(.neutral) .bg {
107
206
  opacity: 0;
108
207
  background-color: var(--semantic-color-surface-default-focused);