@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.
Files changed (200) 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 +13 -2
  7. package/Alert/Alert.js +39 -5
  8. package/Alert/Alert.module.css +48 -1
  9. package/Alert/tests/Alert-specs.js +91 -0
  10. package/BodyText/BodyText.d.ts +5 -4
  11. package/BodyText/BodyText.module.css +7 -7
  12. package/Button/Button.d.ts +17 -12
  13. package/Button/Button.js +1 -1
  14. package/Button/Button.module.css +195 -268
  15. package/Button/tests/Button-specs.js +26 -0
  16. package/CHANGELOG.md +254 -0
  17. package/Card/Card.d.ts +40 -12
  18. package/Card/Card.js +164 -28
  19. package/Card/Card.module.css +277 -58
  20. package/Card/tests/Card-specs.js +67 -3
  21. package/Checkbox/Checkbox.d.ts +8 -7
  22. package/Checkbox/Checkbox.js +3 -1
  23. package/Checkbox/Checkbox.module.css +213 -120
  24. package/Checkbox/tests/Checkbox-specs.js +1 -1
  25. package/CheckboxItem/CheckboxItem.d.ts +22 -7
  26. package/CheckboxItem/CheckboxItem.js +71 -4
  27. package/Chips/Chip.js +72 -13
  28. package/Chips/Chip.module.css +3 -3
  29. package/Chips/Chips.js +37 -17
  30. package/Chips/Chips.module.css +1 -1
  31. package/Chips/tests/Chip-specs.js +43 -13
  32. package/Chips/tests/Chips-specs.js +31 -21
  33. package/ColorPicker/ColorPicker.js +27 -25
  34. package/ContextualMenuDecorator/ContextualMenuDecorator.d.ts +4 -5
  35. package/ContextualPopupDecorator/ContextualPopup.module.css +34 -34
  36. package/ContextualPopupDecorator/ContextualPopupDecorator.js +567 -549
  37. package/DatePicker/DatePicker.d.ts +4 -5
  38. package/DayPicker/DayPicker.d.ts +8 -7
  39. package/DayPicker/DaySelectorDecorator.js +12 -7
  40. package/Dropdown/Dropdown.d.ts +11 -13
  41. package/Dropdown/Dropdown.module.css +13 -9
  42. package/Dropdown/DropdownList.js +80 -54
  43. package/FixedPopupPanels/FixedPopupPanels.d.ts +4 -2
  44. package/FixedPopupPanels/FixedPopupPanels.module.css +18 -18
  45. package/FlexiblePopupPanels/FlexiblePopupPanels.module.css +23 -23
  46. package/FlexiblePopupPanels/useNavButtonFocus.js +7 -10
  47. package/FormCheckboxItem/FormCheckboxItem.d.ts +5 -4
  48. package/Heading/Heading.d.ts +9 -8
  49. package/Heading/Heading.js +2 -2
  50. package/Heading/Heading.module.css +5 -5
  51. package/Icon/Icon.d.ts +15 -4
  52. package/Icon/Icon.js +49 -2
  53. package/Icon/Icon.module.css +1 -1
  54. package/Icon/IconList.js +27 -1
  55. package/IconItem/IconItem.d.ts +13 -12
  56. package/IconItem/IconItem.js +15 -0
  57. package/IconItem/IconItem.module.css +107 -1
  58. package/IconItem/tests/IconItem-specs.js +30 -1
  59. package/Image/Image.d.ts +5 -4
  60. package/Image/Image.js +6 -4
  61. package/ImageItem/ImageItem.d.ts +11 -10
  62. package/ImageItem/ImageItem.js +37 -31
  63. package/ImageItem/ImageItem.module.css +30 -30
  64. package/ImageItem/tests/ImageItem-specs.js +3 -10
  65. package/Input/Input.js +21 -3
  66. package/Input/Input.module.css +37 -8
  67. package/Input/InputField.js +79 -24
  68. package/Input/InputField.module.css +273 -41
  69. package/Input/InputFieldDecoratorIcon.js +1 -0
  70. package/Input/InputFieldSpotlightDecorator.js +257 -228
  71. package/Input/index.d.ts +120 -111
  72. package/Input/tests/Input-specs.js +26 -0
  73. package/Input/tests/InputField-specs.js +170 -3
  74. package/Input/tests/InputPopup-specs.js +1 -1
  75. package/Item/Item.d.ts +16 -9
  76. package/Item/Item.js +20 -2
  77. package/Item/Item.module.css +1 -1
  78. package/KeyGuide/KeyGuide.d.ts +8 -7
  79. package/KeyGuide/KeyGuide.js +29 -27
  80. package/KeyGuide/KeyGuide.module.css +25 -1
  81. package/Marquee/Marquee.d.ts +2 -4
  82. package/MediaOverlay/MediaOverlay.d.ts +12 -11
  83. package/MediaOverlay/MediaOverlay.js +43 -21
  84. package/MediaOverlay/MediaOverlay.module.css +114 -15
  85. package/MediaOverlay/tests/MediaOverlay-specs.js +29 -0
  86. package/MediaPlayer/MediaControls.js +195 -13
  87. package/MediaPlayer/MediaControls.module.css +3 -2
  88. package/MediaPlayer/MediaSlider.module.css +7 -20
  89. package/MediaPlayer/index.d.ts +59 -7
  90. package/MediaPlayer/tests/util-specs.js +4 -1
  91. package/PageViews/PageViews.js +232 -82
  92. package/PageViews/PageViews.module.css +3 -0
  93. package/PageViews/PageViewsRouter.js +100 -42
  94. package/PageViews/tests/PageViews-specs.js +171 -0
  95. package/Panels/Header.js +54 -34
  96. package/Panels/Header.module.css +83 -31
  97. package/Panels/Panel.module.css +1 -1
  98. package/Panels/index.d.ts +7 -8
  99. package/Picker/Picker.d.ts +4 -5
  100. package/Picker/Picker.module.css +2 -2
  101. package/Popup/Popup.js +245 -242
  102. package/Popup/Popup.module.css +24 -24
  103. package/PopupTabLayout/PopupTabLayout.d.ts +5 -7
  104. package/PopupTabLayout/PopupTabLayout.js +26 -18
  105. package/PopupTabLayout/PopupTabLayout.module.css +53 -16
  106. package/PopupTabLayout/PopupTabLayoutStateContext.js +8 -0
  107. package/ProgressBar/ProgressBar.d.ts +5 -4
  108. package/ProgressBar/ProgressBarTooltip.module.css +12 -12
  109. package/ProgressButton/ProgressButton.d.ts +4 -5
  110. package/QuickGuidePanels/QuickGuidePanels.module.css +2 -2
  111. package/RadioItem/RadioItem.d.ts +18 -5
  112. package/RadioItem/RadioItem.js +69 -2
  113. package/RadioItem/RadioItem.module.css +36 -36
  114. package/RangePicker/RangePicker.module.css +2 -2
  115. package/Scroller/EditableWrapper.js +28 -18
  116. package/Scroller/Scroller.d.ts +20 -16
  117. package/Scroller/Scroller.js +20 -13
  118. package/Scroller/Scroller.module.css +4 -4
  119. package/Scroller/useThemeScroller.js +3 -3
  120. package/Slider/Slider.d.ts +20 -14
  121. package/Slider/Slider.js +71 -14
  122. package/Slider/Slider.module.css +464 -91
  123. package/Slider/SliderBehaviorDecorator.js +16 -14
  124. package/Slider/tests/Slider-specs.js +53 -1
  125. package/Slider/utils.js +23 -7
  126. package/Spinner/Spinner.d.ts +5 -4
  127. package/Spinner/Spinner.js +10 -8
  128. package/Spinner/Spinner.module.css +9 -9
  129. package/Steps/Steps.d.ts +5 -4
  130. package/Steps/Steps.js +9 -5
  131. package/Switch/Switch.d.ts +8 -7
  132. package/Switch/Switch.module.css +100 -13
  133. package/SwitchItem/SwitchItem.d.ts +9 -6
  134. package/TabLayout/RefocusDecorator.js +26 -18
  135. package/TabLayout/TabGroup.js +3 -2
  136. package/TabLayout/TabGroup.module.css +2 -2
  137. package/TabLayout/TabLayout.d.ts +6 -0
  138. package/TabLayout/TabLayout.js +11 -1
  139. package/TabLayout/TabLayout.module.css +18 -0
  140. package/TabLayout/tests/TabGroup-specs.js +1 -1
  141. package/TabLayout/tests/TabLayout-specs.js +52 -0
  142. package/ThemeDecorator/AccessibilityDecorator.js +12 -11
  143. package/ThemeDecorator/I18nFontDecorator.js +6 -4
  144. package/ThemeDecorator/ThemeDecorator.d.ts +16 -10
  145. package/ThemeDecorator/ThemeDecorator.js +24 -9
  146. package/ThemeDecorator/fontGenerator.js +1 -1
  147. package/ThemeDecorator/screenTypes.json +1 -0
  148. package/TimePicker/TimePicker.module.css +1 -1
  149. package/TimePicker/TimePickerBase.js +5 -3
  150. package/TooltipDecorator/Tooltip.module.css +1 -2
  151. package/TooltipDecorator/TooltipDecorator.js +12 -7
  152. package/TooltipDecorator/tests/useTooltip-specs.js +5 -2
  153. package/TooltipDecorator/tests/util-specs.js +12 -0
  154. package/TooltipDecorator/useTooltip.js +1 -1
  155. package/TooltipDecorator/util.js +18 -11
  156. package/VideoPlayer/Feedback.js +3 -0
  157. package/VideoPlayer/Feedback.module.css +5 -9
  158. package/VideoPlayer/FeedbackIcons.js +1 -1
  159. package/VideoPlayer/FeedbackTooltip.module.css +55 -11
  160. package/VideoPlayer/VideoPlayer.d.ts +44 -18
  161. package/VideoPlayer/VideoPlayer.js +153 -47
  162. package/VideoPlayer/VideoPlayer.module.css +28 -11
  163. package/VirtualList/VirtualList.d.ts +9 -2
  164. package/VirtualList/VirtualList.js +51 -24
  165. package/VirtualList/tests/VirtualGridList-translate-specs.js +3 -0
  166. package/VirtualList/tests/VirtualList-specs.js +28 -1
  167. package/VirtualList/tests/VirtualList-translate-specs.js +4 -1
  168. package/VirtualList/useSpotlight.js +1 -1
  169. package/WizardPanels/WizardPanels.module.css +2 -2
  170. package/WizardPanels/index.d.ts +4 -2
  171. package/fonts/Limestone_Icons.ttf +0 -0
  172. package/internal/$L/$L.js +3 -3
  173. package/internal/AsyncRenderChildren/AsyncRenderChildren.js +9 -5
  174. package/internal/AsyncRenderChildren/tests/AsyncRenderChildren-specs.js +4 -1
  175. package/internal/DateComponentPicker/DateComponentPicker.module.css +2 -2
  176. package/internal/DateTime/DateTime.module.css +1 -0
  177. package/internal/DateTime/DateTimeDecorator.js +5 -4
  178. package/internal/Panels/PanelsRouter.js +48 -31
  179. package/internal/Panels/useAutoFocus.js +10 -6
  180. package/internal/Panels/useFocusOnTransition.js +4 -3
  181. package/internal/Picker/Picker.js +7 -5
  182. package/internal/Picker/Picker.module.css +2 -2
  183. package/internal/Picker/SpottablePicker.js +15 -13
  184. package/internal/SharedStateDecorator/SharedStateDecorator.js +78 -99
  185. package/internal/validators/validators.js +21 -2
  186. package/package.json +18 -15
  187. package/styles/colors-highcontrast.less +9 -1
  188. package/styles/colors.less +12 -7
  189. package/styles/motion-mixins.less +66 -0
  190. package/styles/motions.less +78 -0
  191. package/styles/variables.less +176 -150
  192. package/useScroll/HoverToScroll.js +23 -17
  193. package/useScroll/Scrollbar.js +14 -10
  194. package/useScroll/ScrollbarPlaceholder.js +3 -5
  195. package/useScroll/ScrollbarTrack.js +7 -5
  196. package/useScroll/ScrollbarTrack.module.css +8 -8
  197. package/useScroll/useEvent.js +14 -3
  198. package/useScroll/useScroll.js +12 -2
  199. package/useScroll/useScroll.module.css +6 -6
  200. 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,
@@ -93,23 +93,27 @@
93
93
  font-size: var(--primitive-font-size-90);
94
94
  }
95
95
  .inputPopup.fullscreen .back {
96
- top: 2.25rem;
97
- left: 2.75rem;
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: 2.75rem;
102
+ right: var(--primitive-spacing-132);
103
103
  }
104
104
  .inputPopup.fullscreen .inputBody {
105
- padding: 2.25rem 5.25rem 0 5.25rem;
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: 1rem 1.25rem 0 1.25rem;
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: 1.25rem;
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 0 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 1.25rem 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
+ }
@@ -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 _classnames2 = _interopRequireDefault(require("classnames"));
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 invalid = _ref3.invalid,
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.jsx)("input", _objectSpread(_objectSpread(_objectSpread({}, inputProps), voiceProps), {}, {
341
- "aria-hidden": isPasswordtel,
342
- className: (0, _classnames2["default"])(css.input, _defineProperty({}, css.passwordtel, isPasswordtel)),
343
- dir: dir,
344
- disabled: disabled,
345
- onChange: onChange,
346
- placeholder: placeholder,
347
- tabIndex: -1,
348
- type: isPasswordtel ? 'tel' : type,
349
- value: value
350
- })), /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputFieldDecoratorIcon["default"], {
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, _Skinnable["default"]);
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.