@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/Input/Input.js
CHANGED
|
@@ -29,7 +29,7 @@ var _InputField = _interopRequireDefault(require("./InputField"));
|
|
|
29
29
|
var _util2 = require("./util");
|
|
30
30
|
var _InputModule = _interopRequireDefault(require("./Input.module.css"));
|
|
31
31
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
32
|
-
var _excluded = ["announce", "backButtonAriaLabel", "buttons", "children", "css", "defaultValue", "disabled", "inputAreaClassName", "inputFieldSpotlightId", "noBackButton", "noSubmitButton", "numberInputField", "onBeforeChange", "onClose", "onNumberComplete", "onInputKeyDown", "onShow", "open", "placeholder", "popupAriaLabel", "popupClassName", "popupType", "size", "subtitle", "title", "type", "maxLength", "minLength"],
|
|
32
|
+
var _excluded = ["announce", "backButtonAriaLabel", "buttons", "children", "css", "defaultValue", "disabled", "inputAreaClassName", "inputFieldSpotlightId", "marqueeInputField", "noBackButton", "noSubmitButton", "numberInputField", "onBeforeChange", "onClose", "onNumberComplete", "onInputKeyDown", "onShow", "open", "placeholder", "popupAriaLabel", "popupClassName", "popupType", "size", "subtitle", "title", "type", "maxLength", "minLength"],
|
|
33
33
|
_excluded2 = ["value"],
|
|
34
34
|
_excluded3 = ["announce", "buttonAriaLabel", "buttonLabel", "type", "size", "disabled", "value", "placeholder", "onClick", "className", "style"];
|
|
35
35
|
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); }
|
|
@@ -148,6 +148,14 @@ var InputPopupBase = exports.InputPopupBase = (0, _kind["default"])({
|
|
|
148
148
|
* @public
|
|
149
149
|
*/
|
|
150
150
|
length: _propTypes["default"].number,
|
|
151
|
+
/**
|
|
152
|
+
* Wraps the `InputField`'s value display in a marquee.
|
|
153
|
+
*
|
|
154
|
+
* @type {Boolean}
|
|
155
|
+
* @default false
|
|
156
|
+
* @public
|
|
157
|
+
*/
|
|
158
|
+
marqueeInputField: _propTypes["default"].bool,
|
|
151
159
|
/**
|
|
152
160
|
* The maximum length of number input fields.
|
|
153
161
|
*
|
|
@@ -298,6 +306,7 @@ var InputPopupBase = exports.InputPopupBase = (0, _kind["default"])({
|
|
|
298
306
|
},
|
|
299
307
|
defaultProps: {
|
|
300
308
|
defaultValue: '',
|
|
309
|
+
marqueeInputField: false,
|
|
301
310
|
popupType: 'fullscreen',
|
|
302
311
|
numberInputField: 'auto',
|
|
303
312
|
size: 'small',
|
|
@@ -337,7 +346,9 @@ var InputPopupBase = exports.InputPopupBase = (0, _kind["default"])({
|
|
|
337
346
|
return (0, _util.mapAndFilterChildren)(_buttons, function (button, index) {
|
|
338
347
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Layout.Cell, {
|
|
339
348
|
shrink: true,
|
|
340
|
-
children: button
|
|
349
|
+
children: /*#__PURE__*/(0, _react.cloneElement)(button, {
|
|
350
|
+
css: _InputModule["default"]
|
|
351
|
+
})
|
|
341
352
|
}, "button".concat(index));
|
|
342
353
|
}) || null;
|
|
343
354
|
},
|
|
@@ -357,9 +368,14 @@ var InputPopupBase = exports.InputPopupBase = (0, _kind["default"])({
|
|
|
357
368
|
},
|
|
358
369
|
popupClassName: function popupClassName(_ref6) {
|
|
359
370
|
var popupType = _ref6.popupType,
|
|
371
|
+
subtitle = _ref6.subtitle,
|
|
372
|
+
title = _ref6.title,
|
|
360
373
|
type = _ref6.type,
|
|
361
374
|
styler = _ref6.styler;
|
|
362
|
-
return styler.join('inputPopup', popupType, type
|
|
375
|
+
return styler.join('inputPopup', popupType, type, {
|
|
376
|
+
noTitle: !title,
|
|
377
|
+
noSubtitle: !subtitle
|
|
378
|
+
});
|
|
363
379
|
},
|
|
364
380
|
inputAreaClassName: function inputAreaClassName(_ref7) {
|
|
365
381
|
var buttons = _ref7.buttons,
|
|
@@ -377,6 +393,7 @@ var InputPopupBase = exports.InputPopupBase = (0, _kind["default"])({
|
|
|
377
393
|
disabled = _ref8.disabled,
|
|
378
394
|
inputAreaClassName = _ref8.inputAreaClassName,
|
|
379
395
|
inputFieldSpotlightId = _ref8.inputFieldSpotlightId,
|
|
396
|
+
marqueeInputField = _ref8.marqueeInputField,
|
|
380
397
|
noBackButton = _ref8.noBackButton,
|
|
381
398
|
noSubmitButton = _ref8.noSubmitButton,
|
|
382
399
|
numberInputField = _ref8.numberInputField,
|
|
@@ -478,6 +495,7 @@ var InputPopupBase = exports.InputPopupBase = (0, _kind["default"])({
|
|
|
478
495
|
css: css,
|
|
479
496
|
maxLength: maxLength,
|
|
480
497
|
minLength: minLength,
|
|
498
|
+
marqueeContent: marqueeInputField,
|
|
481
499
|
size: size,
|
|
482
500
|
autoFocus: true,
|
|
483
501
|
type: type,
|
package/Input/Input.module.css
CHANGED
|
@@ -93,23 +93,27 @@
|
|
|
93
93
|
font-size: var(--primitive-font-size-90);
|
|
94
94
|
}
|
|
95
95
|
.inputPopup.fullscreen .back {
|
|
96
|
-
top:
|
|
97
|
-
left:
|
|
96
|
+
top: var(--primitive-spacing-108);
|
|
97
|
+
left: var(--primitive-spacing-132);
|
|
98
98
|
right: initial;
|
|
99
99
|
}
|
|
100
100
|
:global(.enact-locale-right-to-left) .inputPopup.fullscreen .back {
|
|
101
101
|
left: initial;
|
|
102
|
-
right:
|
|
102
|
+
right: var(--primitive-spacing-132);
|
|
103
103
|
}
|
|
104
104
|
.inputPopup.fullscreen .inputBody {
|
|
105
|
-
padding:
|
|
105
|
+
padding: calc(var(--primitive-spacing-156) - var(--primitive-spacing-48)) NaNrem - var(--primitive-spacing-72)) 0 NaNrem - var(--primitive-spacing-72));
|
|
106
106
|
}
|
|
107
107
|
:global(.enact-orientation-portrait) .inputPopup.fullscreen .inputBody {
|
|
108
|
-
padding:
|
|
108
|
+
padding: calc(var(--primitive-spacing-96) - var(--primitive-spacing-48)) calc(var(--primitive-spacing-132) - var(--primitive-spacing-72)) 0 calc(var(--primitive-spacing-132) - var(--primitive-spacing-72));
|
|
109
109
|
}
|
|
110
110
|
.inputPopup.fullscreen .titles {
|
|
111
111
|
height: 4.75rem;
|
|
112
112
|
}
|
|
113
|
+
:global(.enact-orientation-portrait) .inputPopup.fullscreen .titles {
|
|
114
|
+
margin-inline: var(--primitive-spacing-132);
|
|
115
|
+
width: initial;
|
|
116
|
+
}
|
|
113
117
|
.inputPopup.fullscreen .title {
|
|
114
118
|
font-size: var(--primitive-font-size-108);
|
|
115
119
|
}
|
|
@@ -117,7 +121,7 @@
|
|
|
117
121
|
font-size: var(--primitive-font-size-108);
|
|
118
122
|
}
|
|
119
123
|
.inputPopup.fullscreen .separated {
|
|
120
|
-
gap:
|
|
124
|
+
gap: var(--primitive-spacing-60);
|
|
121
125
|
}
|
|
122
126
|
.inputPopup.fullscreen .numberCell {
|
|
123
127
|
width: 3.75rem;
|
|
@@ -188,6 +192,9 @@
|
|
|
188
192
|
.inputPopup.overlay .body {
|
|
189
193
|
padding: var(--primitive-spacing-84) var(--primitive-spacing-60);
|
|
190
194
|
}
|
|
195
|
+
.inputPopup.overlay:is(.noTitle, .noSubtitle) .titles {
|
|
196
|
+
height: 2.5rem;
|
|
197
|
+
}
|
|
191
198
|
.inputPopup.overlay .title {
|
|
192
199
|
margin: 0 var(--primitive-spacing-144) 0 var(--primitive-spacing-144);
|
|
193
200
|
font-size: var(--primitive-font-size-90);
|
|
@@ -196,11 +203,14 @@
|
|
|
196
203
|
font-size: var(--primitive-font-size-90);
|
|
197
204
|
}
|
|
198
205
|
.inputPopup.overlay .inputArea {
|
|
199
|
-
margin: var(--primitive-spacing-60) 0
|
|
206
|
+
margin: var(--primitive-spacing-60) 0 var(--primitive-spacing-24);
|
|
200
207
|
display: flex;
|
|
201
208
|
flex-direction: column;
|
|
202
209
|
align-items: center;
|
|
203
210
|
}
|
|
211
|
+
:has(.number, .passwordnumber, .withButtons) .inputPopup.overlay .inputArea {
|
|
212
|
+
margin-bottom: 0;
|
|
213
|
+
}
|
|
204
214
|
.inputPopup.overlay .inputArea .textField {
|
|
205
215
|
width: 21.5rem;
|
|
206
216
|
}
|
|
@@ -226,7 +236,7 @@
|
|
|
226
236
|
font-size: var(--primitive-font-size-40);
|
|
227
237
|
}
|
|
228
238
|
.inputPopup.overlay .keypad {
|
|
229
|
-
margin: var(--primitive-spacing-132) 4.125rem
|
|
239
|
+
margin: var(--primitive-spacing-132) 4.125rem var(--primitive-spacing-60) 4.125rem;
|
|
230
240
|
width: 13rem;
|
|
231
241
|
justify-content: flex-end;
|
|
232
242
|
column-gap: var(--primitive-spacing-60);
|
|
@@ -238,6 +248,7 @@
|
|
|
238
248
|
height: 4rem;
|
|
239
249
|
}
|
|
240
250
|
.inputPopup.overlay .buttonArea {
|
|
251
|
+
align-items: center;
|
|
241
252
|
display: flex;
|
|
242
253
|
flex-direction: column;
|
|
243
254
|
justify-content: center;
|
|
@@ -320,6 +331,9 @@
|
|
|
320
331
|
.inputPopup:global(.neutral).overlay .back .icon {
|
|
321
332
|
color: var(--semantic-color-on-background-popup-main);
|
|
322
333
|
}
|
|
334
|
+
.inputPopup:global(.neutral).overlay .button .bg {
|
|
335
|
+
background-color: var(--semantic-color-surface-popup-default);
|
|
336
|
+
}
|
|
323
337
|
:global(.enact-a11y-high-contrast) .inputPopup:global(.neutral):global(.highContrast) {
|
|
324
338
|
background-color: var(--semantic-color-background-full-default);
|
|
325
339
|
}
|
|
@@ -394,6 +408,9 @@
|
|
|
394
408
|
:global(.enact-a11y-high-contrast) .inputPopup:global(.neutral):global(.highContrast).overlay .back .icon {
|
|
395
409
|
color: var(--semantic-color-on-background-popup-main);
|
|
396
410
|
}
|
|
411
|
+
:global(.enact-a11y-high-contrast) .inputPopup:global(.neutral):global(.highContrast).overlay .button .bg {
|
|
412
|
+
background-color: var(--semantic-color-surface-popup-default);
|
|
413
|
+
}
|
|
397
414
|
.inputPopup:global(.light) {
|
|
398
415
|
background-color: var(--semantic-color-background-full-default);
|
|
399
416
|
}
|
|
@@ -468,6 +485,9 @@
|
|
|
468
485
|
.inputPopup:global(.light).overlay .back .icon {
|
|
469
486
|
color: var(--semantic-color-on-background-popup-main);
|
|
470
487
|
}
|
|
488
|
+
.inputPopup:global(.light).overlay .button .bg {
|
|
489
|
+
background-color: var(--semantic-color-surface-popup-default);
|
|
490
|
+
}
|
|
471
491
|
.inputPopup:global(.game) {
|
|
472
492
|
--semantic-color-surface-default: #2d224c;
|
|
473
493
|
--semantic-color-surface-default-focused: #6d2fa1;
|
|
@@ -545,6 +565,9 @@
|
|
|
545
565
|
.inputPopup:global(.game).overlay .back .icon {
|
|
546
566
|
color: var(--semantic-color-on-background-popup-main);
|
|
547
567
|
}
|
|
568
|
+
.inputPopup:global(.game).overlay .button .bg {
|
|
569
|
+
background-color: var(--semantic-color-surface-popup-default);
|
|
570
|
+
}
|
|
548
571
|
:global(.green) .inputPopup:global(.game) {
|
|
549
572
|
--semantic-color-surface-default: #1F2C24;
|
|
550
573
|
--semantic-color-surface-default-focused: #3ea07d;
|
|
@@ -621,6 +644,9 @@
|
|
|
621
644
|
:global(.green) .inputPopup:global(.game).overlay .back .icon {
|
|
622
645
|
color: var(--semantic-color-on-background-popup-main);
|
|
623
646
|
}
|
|
647
|
+
:global(.green) .inputPopup:global(.game).overlay .button .bg {
|
|
648
|
+
background-color: var(--semantic-color-surface-popup-default);
|
|
649
|
+
}
|
|
624
650
|
:global(.orange) .inputPopup:global(.game) {
|
|
625
651
|
--semantic-color-surface-default: #422923;
|
|
626
652
|
--semantic-color-surface-default-focused: #b85f23;
|
|
@@ -697,3 +723,6 @@
|
|
|
697
723
|
:global(.orange) .inputPopup:global(.game).overlay .back .icon {
|
|
698
724
|
color: var(--semantic-color-on-background-popup-main);
|
|
699
725
|
}
|
|
726
|
+
:global(.orange) .inputPopup:global(.game).overlay .button .bg {
|
|
727
|
+
background-color: var(--semantic-color-surface-popup-default);
|
|
728
|
+
}
|
package/Input/InputField.js
CHANGED
|
@@ -13,11 +13,12 @@ var _AnnounceDecorator = require("@enact/ui/AnnounceDecorator");
|
|
|
13
13
|
var _Changeable = _interopRequireDefault(require("@enact/ui/Changeable"));
|
|
14
14
|
var _Pure = _interopRequireDefault(require("@enact/ui/internal/Pure"));
|
|
15
15
|
var _speech = require("@enact/webos/speech");
|
|
16
|
-
var
|
|
16
|
+
var _classnames3 = _interopRequireDefault(require("classnames"));
|
|
17
17
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
18
18
|
var _compose = _interopRequireDefault(require("ramda/src/compose"));
|
|
19
19
|
var _react = require("react");
|
|
20
20
|
var _$L = _interopRequireDefault(require("../internal/$L"));
|
|
21
|
+
var _Marquee = require("../Marquee");
|
|
21
22
|
var _Skinnable = _interopRequireDefault(require("../Skinnable"));
|
|
22
23
|
var _Tooltip = _interopRequireDefault(require("../TooltipDecorator/Tooltip"));
|
|
23
24
|
var _util2 = require("../internal/util");
|
|
@@ -26,7 +27,23 @@ var _InputFieldSpotlightDecorator = _interopRequireDefault(require("./InputField
|
|
|
26
27
|
var _util3 = require("./util");
|
|
27
28
|
var _InputFieldModule = _interopRequireDefault(require("./InputField.module.css"));
|
|
28
29
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
29
|
-
var _excluded = ["css", "dir", "disabled", "iconAfter", "iconBefore", "invalidTooltip", "onChange", "placeholder", "type", "value"];
|
|
30
|
+
var _excluded = ["css", "dir", "disabled", "iconAfter", "iconBefore", "invalidTooltip", "marqueeContent", "onChange", "placeholder", "type", "value"];
|
|
31
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
32
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
33
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
34
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
35
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
36
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
37
|
+
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; }
|
|
38
|
+
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; }
|
|
39
|
+
var MarqueeText = (0, _Marquee.MarqueeDecorator)({
|
|
40
|
+
css: {
|
|
41
|
+
text: _InputFieldModule["default"].marqueeTextInner,
|
|
42
|
+
animate: _InputFieldModule["default"].marqueeTextAnimate,
|
|
43
|
+
willAnimate: _InputFieldModule["default"].marqueeTextWillAnimate
|
|
44
|
+
}
|
|
45
|
+
}, 'div');
|
|
46
|
+
|
|
30
47
|
/**
|
|
31
48
|
* A Limestone styled input component.
|
|
32
49
|
*
|
|
@@ -38,17 +55,16 @@ var _excluded = ["css", "dir", "disabled", "iconAfter", "iconBefore", "invalidTo
|
|
|
38
55
|
* @ui
|
|
39
56
|
* @public
|
|
40
57
|
*/
|
|
41
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
42
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
43
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
44
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
45
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
46
|
-
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
47
|
-
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; }
|
|
48
|
-
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; }
|
|
49
58
|
var InputFieldBase = exports.InputFieldBase = (0, _kind["default"])({
|
|
50
59
|
name: 'InputField',
|
|
51
60
|
propTypes: /** @lends limestone/Input.InputFieldBase.prototype */{
|
|
61
|
+
/**
|
|
62
|
+
* Indicates the input is currently active/focused for editing
|
|
63
|
+
*
|
|
64
|
+
* @type {Boolean}
|
|
65
|
+
* @private
|
|
66
|
+
*/
|
|
67
|
+
active: _propTypes["default"].bool,
|
|
52
68
|
/**
|
|
53
69
|
* Passed by AnnounceDecorator for accessibility.
|
|
54
70
|
*
|
|
@@ -56,6 +72,14 @@ var InputFieldBase = exports.InputFieldBase = (0, _kind["default"])({
|
|
|
56
72
|
* @public
|
|
57
73
|
*/
|
|
58
74
|
announce: _propTypes["default"].func,
|
|
75
|
+
/**
|
|
76
|
+
* Moves the caret to the end of the text when the input receives focus.
|
|
77
|
+
*
|
|
78
|
+
* @type {Boolean}
|
|
79
|
+
* @default false
|
|
80
|
+
* @public
|
|
81
|
+
*/
|
|
82
|
+
caretToEndOnFocus: _propTypes["default"].bool,
|
|
59
83
|
/**
|
|
60
84
|
* Customizes the component by mapping the supplied collection of CSS class names to the
|
|
61
85
|
* corresponding internal elements and states of this component.
|
|
@@ -128,6 +152,14 @@ var InputFieldBase = exports.InputFieldBase = (0, _kind["default"])({
|
|
|
128
152
|
* @public
|
|
129
153
|
*/
|
|
130
154
|
invalidMessage: _propTypes["default"].string,
|
|
155
|
+
/**
|
|
156
|
+
* Wraps the input's value/placeholder display in a marquee.
|
|
157
|
+
*
|
|
158
|
+
* @type {Boolean}
|
|
159
|
+
* @default false
|
|
160
|
+
* @public
|
|
161
|
+
*/
|
|
162
|
+
marqueeContent: _propTypes["default"].bool,
|
|
131
163
|
/**
|
|
132
164
|
* Called before the input value is changed.
|
|
133
165
|
*
|
|
@@ -224,9 +256,12 @@ var InputFieldBase = exports.InputFieldBase = (0, _kind["default"])({
|
|
|
224
256
|
value: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number])
|
|
225
257
|
},
|
|
226
258
|
defaultProps: {
|
|
259
|
+
active: false,
|
|
260
|
+
caretToEndOnFocus: false,
|
|
227
261
|
disabled: false,
|
|
228
262
|
dismissOnEnter: false,
|
|
229
263
|
invalid: false,
|
|
264
|
+
marqueeContent: false,
|
|
230
265
|
placeholder: '',
|
|
231
266
|
size: 'small',
|
|
232
267
|
type: 'text'
|
|
@@ -234,7 +269,7 @@ var InputFieldBase = exports.InputFieldBase = (0, _kind["default"])({
|
|
|
234
269
|
styles: {
|
|
235
270
|
css: _InputFieldModule["default"],
|
|
236
271
|
className: 'inputField',
|
|
237
|
-
publicClassNames: ['bg', 'inputField', 'input', 'inputHighlight', 'tooltip', 'tooltipLabel']
|
|
272
|
+
publicClassNames: ['bg', 'inputField', 'input', 'inputHighlight', 'inputWrapper', 'marqueeText', 'placeholderText', 'tooltip', 'tooltipLabel']
|
|
238
273
|
},
|
|
239
274
|
handlers: {
|
|
240
275
|
onChange: (0, _handle.handle)((0, _handle.forwardCustomWithPrevent)('onBeforeChange', function (ev) {
|
|
@@ -266,10 +301,18 @@ var InputFieldBase = exports.InputFieldBase = (0, _kind["default"])({
|
|
|
266
301
|
return (0, _util3.calcAriaLabel)(title, type, value);
|
|
267
302
|
},
|
|
268
303
|
className: function className(_ref3) {
|
|
269
|
-
var
|
|
304
|
+
var active = _ref3.active,
|
|
305
|
+
iconAfter = _ref3.iconAfter,
|
|
306
|
+
iconBefore = _ref3.iconBefore,
|
|
307
|
+
invalid = _ref3.invalid,
|
|
308
|
+
marqueeContent = _ref3.marqueeContent,
|
|
270
309
|
size = _ref3.size,
|
|
271
310
|
styler = _ref3.styler;
|
|
272
311
|
return styler.append({
|
|
312
|
+
active: active,
|
|
313
|
+
hasIconAfter: iconAfter,
|
|
314
|
+
hasIconBefore: iconBefore,
|
|
315
|
+
hasMarquee: marqueeContent,
|
|
273
316
|
invalid: invalid
|
|
274
317
|
}, size);
|
|
275
318
|
},
|
|
@@ -306,6 +349,7 @@ var InputFieldBase = exports.InputFieldBase = (0, _kind["default"])({
|
|
|
306
349
|
iconAfter = _ref7.iconAfter,
|
|
307
350
|
iconBefore = _ref7.iconBefore,
|
|
308
351
|
invalidTooltip = _ref7.invalidTooltip,
|
|
352
|
+
marqueeContent = _ref7.marqueeContent,
|
|
309
353
|
onChange = _ref7.onChange,
|
|
310
354
|
placeholder = _ref7.placeholder,
|
|
311
355
|
type = _ref7.type,
|
|
@@ -317,7 +361,9 @@ var InputFieldBase = exports.InputFieldBase = (0, _kind["default"])({
|
|
|
317
361
|
if (type === 'password' || type === 'passwordtel') {
|
|
318
362
|
inputProps.spellCheck = false;
|
|
319
363
|
}
|
|
364
|
+
delete rest.active;
|
|
320
365
|
delete rest.announce;
|
|
366
|
+
delete rest.caretToEndOnFocus;
|
|
321
367
|
delete rest.dismissOnEnter;
|
|
322
368
|
delete rest.invalid;
|
|
323
369
|
delete rest.invalidMessage;
|
|
@@ -337,17 +383,24 @@ var InputFieldBase = exports.InputFieldBase = (0, _kind["default"])({
|
|
|
337
383
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
338
384
|
className: css.inputHighlight,
|
|
339
385
|
children: value ? value : placeholder
|
|
340
|
-
}), /*#__PURE__*/(0, _jsxRuntime.
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
386
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
387
|
+
className: css.inputWrapper,
|
|
388
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("input", _objectSpread(_objectSpread(_objectSpread({}, inputProps), voiceProps), {}, {
|
|
389
|
+
"aria-hidden": isPasswordtel,
|
|
390
|
+
className: (0, _classnames3["default"])(css.input, _defineProperty({}, css.passwordtel, isPasswordtel)),
|
|
391
|
+
dir: dir,
|
|
392
|
+
disabled: disabled,
|
|
393
|
+
onChange: onChange,
|
|
394
|
+
placeholder: placeholder,
|
|
395
|
+
tabIndex: -1,
|
|
396
|
+
type: isPasswordtel ? 'tel' : type,
|
|
397
|
+
value: value
|
|
398
|
+
})), marqueeContent ? /*#__PURE__*/(0, _jsxRuntime.jsx)(MarqueeText, {
|
|
399
|
+
className: (0, _classnames3["default"])(css.marqueeText, _defineProperty(_defineProperty({}, css.passwordtel, isPasswordtel || type === 'password'), css.placeholderText, value === '')),
|
|
400
|
+
disabled: disabled,
|
|
401
|
+
children: value !== '' ? value : placeholder
|
|
402
|
+
}) : null]
|
|
403
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputFieldDecoratorIcon["default"], {
|
|
351
404
|
className: css.iconAfter,
|
|
352
405
|
position: "after",
|
|
353
406
|
size: "large",
|
|
@@ -383,7 +436,9 @@ var AnnounceDecorator = function AnnounceDecorator(Wrapped) {
|
|
|
383
436
|
*/
|
|
384
437
|
var InputFieldDecorator = exports.InputFieldDecorator = (0, _compose["default"])(_Pure["default"], (0, _I18nDecorator.I18nContextDecorator)({
|
|
385
438
|
rtlProp: 'rtl'
|
|
386
|
-
}), _Changeable["default"], _InputFieldSpotlightDecorator["default"], AnnounceDecorator,
|
|
439
|
+
}), _Changeable["default"], _InputFieldSpotlightDecorator["default"], AnnounceDecorator, (0, _Marquee.MarqueeController)({
|
|
440
|
+
marqueeOnFocus: true
|
|
441
|
+
}), _Skinnable["default"]);
|
|
387
442
|
|
|
388
443
|
/**
|
|
389
444
|
* A Spottable, Limestone styled input component with embedded icon support.
|