@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
package/Card/Card.js
CHANGED
|
@@ -9,17 +9,20 @@ var _kind = _interopRequireDefault(require("@enact/core/kind"));
|
|
|
9
9
|
var _Spottable = _interopRequireDefault(require("@enact/spotlight/Spottable"));
|
|
10
10
|
var _Card = require("@enact/ui/Card");
|
|
11
11
|
var _Layout = require("@enact/ui/Layout");
|
|
12
|
+
var _Touchable = _interopRequireDefault(require("@enact/ui/Touchable"));
|
|
12
13
|
var _resolution = _interopRequireDefault(require("@enact/ui/resolution"));
|
|
13
14
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
15
|
var _compose = _interopRequireDefault(require("ramda/src/compose"));
|
|
15
16
|
var _Icon = _interopRequireDefault(require("../Icon"));
|
|
16
17
|
var _Image = _interopRequireDefault(require("../Image"));
|
|
18
|
+
var _$L = _interopRequireDefault(require("../internal/$L"));
|
|
17
19
|
var _AsyncRenderChildren = _interopRequireDefault(require("../internal/AsyncRenderChildren"));
|
|
18
20
|
var _Marquee = require("../Marquee");
|
|
21
|
+
var _ProgressBar = _interopRequireDefault(require("../ProgressBar"));
|
|
19
22
|
var _Skinnable = _interopRequireDefault(require("../Skinnable"));
|
|
20
23
|
var _CardModule = _interopRequireDefault(require("./Card.module.css"));
|
|
21
24
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
|
-
var _excluded = ["css", "imageSize", "primaryBadgeSrc", "secondaryBadgeSrc", "style"];
|
|
25
|
+
var _excluded = ["css", "disabled", "icon", "imageSize", "primaryBadgeSrc", "secondaryBadgeSrc", "style"];
|
|
23
26
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
24
27
|
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; }
|
|
25
28
|
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; }
|
|
@@ -69,14 +72,6 @@ var getDefaultImageSize = function getDefaultImageSize(orientation) {
|
|
|
69
72
|
var CardBase = exports.CardBase = (0, _kind["default"])({
|
|
70
73
|
name: 'Card',
|
|
71
74
|
propTypes: /** @lends limestone/Card.CardBase.prototype */{
|
|
72
|
-
/**
|
|
73
|
-
* The primary caption displayed with the image.
|
|
74
|
-
*
|
|
75
|
-
* @type {String}
|
|
76
|
-
* @required
|
|
77
|
-
* @public
|
|
78
|
-
*/
|
|
79
|
-
children: _propTypes["default"].string.isRequired,
|
|
80
75
|
/**
|
|
81
76
|
* Source for the image.
|
|
82
77
|
* String value or Object of values used to determine which image will appear on
|
|
@@ -87,6 +82,13 @@ var CardBase = exports.CardBase = (0, _kind["default"])({
|
|
|
87
82
|
* @public
|
|
88
83
|
*/
|
|
89
84
|
src: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].object]).isRequired,
|
|
85
|
+
/**
|
|
86
|
+
* The "aria-label" for the Card.
|
|
87
|
+
*
|
|
88
|
+
* @type {String}
|
|
89
|
+
* @public
|
|
90
|
+
*/
|
|
91
|
+
'aria-label': _propTypes["default"].string,
|
|
90
92
|
/**
|
|
91
93
|
* Determines whether the caption will be placed over the image or not.
|
|
92
94
|
* It only applies when `orientation` is `'vertical'`.
|
|
@@ -110,6 +112,13 @@ var CardBase = exports.CardBase = (0, _kind["default"])({
|
|
|
110
112
|
* @public
|
|
111
113
|
*/
|
|
112
114
|
centered: _propTypes["default"].bool,
|
|
115
|
+
/**
|
|
116
|
+
* The primary caption displayed with the image.
|
|
117
|
+
*
|
|
118
|
+
* @type {String}
|
|
119
|
+
* @public
|
|
120
|
+
*/
|
|
121
|
+
children: _propTypes["default"].string,
|
|
113
122
|
/**
|
|
114
123
|
* Customizes the component by mapping the supplied collection of CSS class names to the
|
|
115
124
|
* corresponding internal elements and states of this component.
|
|
@@ -132,6 +141,13 @@ var CardBase = exports.CardBase = (0, _kind["default"])({
|
|
|
132
141
|
* @public
|
|
133
142
|
*/
|
|
134
143
|
disabled: _propTypes["default"].bool,
|
|
144
|
+
/**
|
|
145
|
+
* Fits the image to its height and width and positions it on the center of the Card.
|
|
146
|
+
*
|
|
147
|
+
* @type {Boolean}
|
|
148
|
+
* @public
|
|
149
|
+
*/
|
|
150
|
+
fitImage: _propTypes["default"].bool,
|
|
135
151
|
/**
|
|
136
152
|
* Set to `true` to display a container with background color.
|
|
137
153
|
* When `orientation` is `'horizontal'`, this prop is always `true` and provided value will be ignored.
|
|
@@ -140,6 +156,14 @@ var CardBase = exports.CardBase = (0, _kind["default"])({
|
|
|
140
156
|
* @public
|
|
141
157
|
*/
|
|
142
158
|
hasContainer: _propTypes["default"].bool,
|
|
159
|
+
/**
|
|
160
|
+
* Icon used when `selected` is `true`
|
|
161
|
+
*
|
|
162
|
+
* @type {String}
|
|
163
|
+
* @default 'check'
|
|
164
|
+
* @public
|
|
165
|
+
*/
|
|
166
|
+
icon: _propTypes["default"].string,
|
|
143
167
|
/**
|
|
144
168
|
* Source for the image icon.
|
|
145
169
|
*
|
|
@@ -186,6 +210,14 @@ var CardBase = exports.CardBase = (0, _kind["default"])({
|
|
|
186
210
|
* @public
|
|
187
211
|
*/
|
|
188
212
|
placeholder: _propTypes["default"].string,
|
|
213
|
+
/**
|
|
214
|
+
* Indicates if the component is pressed.
|
|
215
|
+
*
|
|
216
|
+
* @type {Boolean}
|
|
217
|
+
* @default false
|
|
218
|
+
* @private
|
|
219
|
+
*/
|
|
220
|
+
pressed: _propTypes["default"].bool,
|
|
189
221
|
/**
|
|
190
222
|
* The primary badge image source.
|
|
191
223
|
*
|
|
@@ -193,6 +225,13 @@ var CardBase = exports.CardBase = (0, _kind["default"])({
|
|
|
193
225
|
* @public
|
|
194
226
|
*/
|
|
195
227
|
primaryBadgeSrc: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].object]),
|
|
228
|
+
/**
|
|
229
|
+
* The progress displayed inside the ProgressBar
|
|
230
|
+
*
|
|
231
|
+
* @type {Number}
|
|
232
|
+
* @public
|
|
233
|
+
*/
|
|
234
|
+
progress: _propTypes["default"].number,
|
|
196
235
|
/**
|
|
197
236
|
* Set to `true` to display the image with rounded corners.
|
|
198
237
|
*
|
|
@@ -220,10 +259,34 @@ var CardBase = exports.CardBase = (0, _kind["default"])({
|
|
|
220
259
|
* @type {Boolean}
|
|
221
260
|
* @public
|
|
222
261
|
*/
|
|
223
|
-
selected: _propTypes["default"].bool
|
|
262
|
+
selected: _propTypes["default"].bool,
|
|
263
|
+
/**
|
|
264
|
+
* Activates the 'ProgressBar'.
|
|
265
|
+
*
|
|
266
|
+
* @type {Boolean}
|
|
267
|
+
* @public
|
|
268
|
+
*/
|
|
269
|
+
showProgressBar: _propTypes["default"].bool,
|
|
270
|
+
/**
|
|
271
|
+
* Splits the captions in two sections. This prop is only used when
|
|
272
|
+
* `captionOverlayOnFocus` or `captionOverlay` is `true` and `orientation` is `'vertical'`.
|
|
273
|
+
*
|
|
274
|
+
* @type {Boolean}
|
|
275
|
+
* @public
|
|
276
|
+
*/
|
|
277
|
+
splitCaption: _propTypes["default"].bool,
|
|
278
|
+
/**
|
|
279
|
+
* Removes the marquee effect of caption and label text.
|
|
280
|
+
* @type {Boolean}
|
|
281
|
+
* @public
|
|
282
|
+
*/
|
|
283
|
+
withoutMarquee: _propTypes["default"].bool
|
|
224
284
|
},
|
|
225
285
|
defaultProps: {
|
|
226
|
-
|
|
286
|
+
icon: 'check',
|
|
287
|
+
orientation: 'vertical',
|
|
288
|
+
pressed: false,
|
|
289
|
+
withoutMarquee: false
|
|
227
290
|
},
|
|
228
291
|
styles: {
|
|
229
292
|
css: _CardModule["default"],
|
|
@@ -231,15 +294,16 @@ var CardBase = exports.CardBase = (0, _kind["default"])({
|
|
|
231
294
|
},
|
|
232
295
|
handlers: {
|
|
233
296
|
onClick: (0, _handle.handle)((0, _handle.not)((0, _handle.forProp)('disabled', true)), (0, _handle.forward)('onClick')),
|
|
234
|
-
|
|
297
|
+
onKeyDown: (0, _handle.handle)((0, _handle.not)((0, _handle.forProp)('disabled', true)), (0, _handle.forward)('onKeyDown'))
|
|
235
298
|
},
|
|
236
299
|
computed: {
|
|
237
300
|
'aria-label': function ariaLabel(_ref) {
|
|
238
|
-
var
|
|
301
|
+
var _ariaLabel = _ref['aria-label'],
|
|
302
|
+
children = _ref.children,
|
|
239
303
|
label = _ref.label,
|
|
240
304
|
secondaryLabel = _ref.secondaryLabel,
|
|
241
305
|
selected = _ref.selected;
|
|
242
|
-
return "".concat(children || '').concat(label ? " ".concat(label) : '').concat(secondaryLabel ? " ".concat(secondaryLabel) : '').concat(selected ? '
|
|
306
|
+
return _ariaLabel || "".concat(children || '').concat(label ? " ".concat(label) : '').concat(secondaryLabel ? " ".concat(secondaryLabel) : '').concat(selected ? ' ' + (0, _$L["default"])('Selected') : '');
|
|
243
307
|
},
|
|
244
308
|
captionOverlay: function captionOverlay(_ref2) {
|
|
245
309
|
var _captionOverlay = _ref2.captionOverlay,
|
|
@@ -247,14 +311,20 @@ var CardBase = exports.CardBase = (0, _kind["default"])({
|
|
|
247
311
|
return _captionOverlay || captionOverlayOnFocus;
|
|
248
312
|
},
|
|
249
313
|
children: function children(_ref3) {
|
|
250
|
-
var
|
|
314
|
+
var captionOverlay = _ref3.captionOverlay,
|
|
315
|
+
captionOverlayOnFocus = _ref3.captionOverlayOnFocus,
|
|
316
|
+
centered = _ref3.centered,
|
|
251
317
|
_children = _ref3.children,
|
|
252
318
|
css = _ref3.css,
|
|
253
319
|
index = _ref3['data-index'],
|
|
254
320
|
imageIconSrc = _ref3.imageIconSrc,
|
|
255
321
|
label = _ref3.label,
|
|
256
322
|
orientation = _ref3.orientation,
|
|
257
|
-
|
|
323
|
+
progress = _ref3.progress,
|
|
324
|
+
secondaryLabel = _ref3.secondaryLabel,
|
|
325
|
+
showProgressBar = _ref3.showProgressBar,
|
|
326
|
+
splitCaption = _ref3.splitCaption,
|
|
327
|
+
withoutMarquee = _ref3.withoutMarquee;
|
|
258
328
|
var hasImageIcon = imageIconSrc && orientation === 'vertical';
|
|
259
329
|
var alignment = centered && !imageIconSrc ? {
|
|
260
330
|
alignment: 'center'
|
|
@@ -266,7 +336,29 @@ var CardBase = exports.CardBase = (0, _kind["default"])({
|
|
|
266
336
|
component: _Image["default"],
|
|
267
337
|
shrink: true,
|
|
268
338
|
src: imageIconSrc
|
|
269
|
-
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Layout.Cell, {
|
|
339
|
+
}) : null, withoutMarquee ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Layout.Cell, {
|
|
340
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
341
|
+
style: {
|
|
342
|
+
textAlign: alignment === null || alignment === void 0 ? void 0 : alignment.alignment
|
|
343
|
+
},
|
|
344
|
+
className: css.caption,
|
|
345
|
+
children: _children
|
|
346
|
+
}), typeof label !== 'undefined' ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
347
|
+
style: {
|
|
348
|
+
textAlign: alignment === null || alignment === void 0 ? void 0 : alignment.alignment
|
|
349
|
+
},
|
|
350
|
+
className: css.label,
|
|
351
|
+
children: label
|
|
352
|
+
}) : null, typeof secondaryLabel !== 'undefined' ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
353
|
+
style: {
|
|
354
|
+
textAlign: alignment === null || alignment === void 0 ? void 0 : alignment.alignment
|
|
355
|
+
},
|
|
356
|
+
className: css.label,
|
|
357
|
+
children: secondaryLabel
|
|
358
|
+
}) : null, showProgressBar ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ProgressBar["default"], {
|
|
359
|
+
progress: progress
|
|
360
|
+
}) : null]
|
|
361
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Layout.Cell, {
|
|
270
362
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Marquee.Marquee, _objectSpread(_objectSpread({}, alignment), {}, {
|
|
271
363
|
className: css.caption,
|
|
272
364
|
marqueeOn: "hover",
|
|
@@ -279,9 +371,32 @@ var CardBase = exports.CardBase = (0, _kind["default"])({
|
|
|
279
371
|
className: css.label,
|
|
280
372
|
marqueeOn: "hover",
|
|
281
373
|
children: secondaryLabel
|
|
374
|
+
})) : null, showProgressBar ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ProgressBar["default"], {
|
|
375
|
+
progress: progress
|
|
376
|
+
}) : null]
|
|
377
|
+
})]
|
|
378
|
+
});
|
|
379
|
+
var splitCaptions = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
380
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Layout.Cell, {
|
|
381
|
+
className: css.captions,
|
|
382
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Marquee.Marquee, _objectSpread(_objectSpread({}, alignment), {}, {
|
|
383
|
+
className: css.caption,
|
|
384
|
+
marqueeOn: "hover",
|
|
385
|
+
children: _children
|
|
386
|
+
}))
|
|
387
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Layout.Cell, {
|
|
388
|
+
children: [typeof label !== 'undefined' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Marquee.Marquee, _objectSpread(_objectSpread({}, alignment), {}, {
|
|
389
|
+
className: css.label,
|
|
390
|
+
marqueeOn: "hover",
|
|
391
|
+
children: label
|
|
392
|
+
})) : null, typeof secondaryLabel !== 'undefined' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Marquee.Marquee, _objectSpread(_objectSpread({}, alignment), {}, {
|
|
393
|
+
className: css.label,
|
|
394
|
+
marqueeOn: "hover",
|
|
395
|
+
children: secondaryLabel
|
|
282
396
|
})) : null]
|
|
283
397
|
})]
|
|
284
398
|
});
|
|
399
|
+
var selectedCaptions = (captionOverlay || captionOverlayOnFocus) && splitCaption && orientation === 'vertical' ? splitCaptions : captions;
|
|
285
400
|
return typeof index !== 'undefined' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_AsyncRenderChildren["default"], {
|
|
286
401
|
fallback: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Layout.Row, {
|
|
287
402
|
className: css.captions,
|
|
@@ -296,12 +411,14 @@ var CardBase = exports.CardBase = (0, _kind["default"])({
|
|
|
296
411
|
})]
|
|
297
412
|
}),
|
|
298
413
|
index: index,
|
|
299
|
-
children:
|
|
300
|
-
}) :
|
|
414
|
+
children: selectedCaptions
|
|
415
|
+
}) : selectedCaptions;
|
|
301
416
|
},
|
|
302
417
|
className: function className(_ref4) {
|
|
303
418
|
var captionOverlay = _ref4.captionOverlay,
|
|
304
419
|
captionOverlayOnFocus = _ref4.captionOverlayOnFocus,
|
|
420
|
+
icon = _ref4.icon,
|
|
421
|
+
pressed = _ref4.pressed,
|
|
305
422
|
roundedImage = _ref4.roundedImage,
|
|
306
423
|
hasContainer = _ref4.hasContainer,
|
|
307
424
|
orientation = _ref4.orientation,
|
|
@@ -309,29 +426,46 @@ var CardBase = exports.CardBase = (0, _kind["default"])({
|
|
|
309
426
|
return styler.append({
|
|
310
427
|
captionOverlay: captionOverlay && orientation === 'vertical',
|
|
311
428
|
captionOverlayOnFocus: !captionOverlay && captionOverlayOnFocus && orientation === 'vertical',
|
|
429
|
+
pressed: pressed,
|
|
312
430
|
roundedImage: roundedImage,
|
|
313
|
-
hasContainer: orientation === 'horizontal' || hasContainer && !captionOverlay
|
|
431
|
+
hasContainer: orientation === 'horizontal' || hasContainer && !captionOverlay,
|
|
432
|
+
isCheckIcon: icon === 'check'
|
|
314
433
|
});
|
|
434
|
+
},
|
|
435
|
+
splitCaption: function splitCaption(_ref5) {
|
|
436
|
+
var captionOverlay = _ref5.captionOverlay,
|
|
437
|
+
captionOverlayOnFocus = _ref5.captionOverlayOnFocus,
|
|
438
|
+
_splitCaption = _ref5.splitCaption;
|
|
439
|
+
return (captionOverlay || captionOverlayOnFocus) && _splitCaption;
|
|
315
440
|
}
|
|
316
441
|
},
|
|
317
|
-
render: function render(
|
|
442
|
+
render: function render(_ref6) {
|
|
318
443
|
var _imageSize$height, _imageSize$width;
|
|
319
|
-
var css =
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
444
|
+
var css = _ref6.css,
|
|
445
|
+
disabled = _ref6.disabled,
|
|
446
|
+
icon = _ref6.icon,
|
|
447
|
+
imageSize = _ref6.imageSize,
|
|
448
|
+
primaryBadgeSrc = _ref6.primaryBadgeSrc,
|
|
449
|
+
secondaryBadgeSrc = _ref6.secondaryBadgeSrc,
|
|
450
|
+
style = _ref6.style,
|
|
451
|
+
rest = _objectWithoutProperties(_ref6, _excluded);
|
|
325
452
|
delete rest.captionOverlayOnFocus;
|
|
326
453
|
delete rest.centered;
|
|
327
454
|
delete rest.label;
|
|
455
|
+
delete rest.progress;
|
|
328
456
|
delete rest.secondaryLabel;
|
|
457
|
+
delete rest.showProgressBar;
|
|
329
458
|
delete rest.imageIconSrc;
|
|
330
459
|
delete rest.hasContainer;
|
|
460
|
+
delete rest.pressed;
|
|
331
461
|
delete rest.roundedImage;
|
|
462
|
+
delete rest.withoutMarquee;
|
|
332
463
|
var defaultImageSize = getDefaultImageSize(rest.orientation);
|
|
333
464
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Card.Card, _objectSpread(_objectSpread({}, rest), {}, {
|
|
465
|
+
"aria-disabled": disabled,
|
|
334
466
|
css: css,
|
|
467
|
+
"data-webos-voice-intent": "Select",
|
|
468
|
+
disabled: disabled,
|
|
335
469
|
imageComponent: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Image["default"], {
|
|
336
470
|
children: [primaryBadgeSrc ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Image["default"], {
|
|
337
471
|
className: css.primaryBadge,
|
|
@@ -343,7 +477,7 @@ var CardBase = exports.CardBase = (0, _kind["default"])({
|
|
|
343
477
|
className: css.selectionContainer,
|
|
344
478
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon["default"], {
|
|
345
479
|
className: css.selectionIcon,
|
|
346
|
-
children:
|
|
480
|
+
children: icon
|
|
347
481
|
})
|
|
348
482
|
})]
|
|
349
483
|
}),
|
|
@@ -368,6 +502,8 @@ var CardBase = exports.CardBase = (0, _kind["default"])({
|
|
|
368
502
|
*/
|
|
369
503
|
var CardDecorator = exports.CardDecorator = (0, _compose["default"])((0, _Marquee.MarqueeController)({
|
|
370
504
|
marqueeOnFocus: true
|
|
505
|
+
}), (0, _Touchable["default"])({
|
|
506
|
+
activeProp: 'pressed'
|
|
371
507
|
}), _Spottable["default"], _Skinnable["default"]);
|
|
372
508
|
|
|
373
509
|
/**
|