@enact/limestone 1.3.0 → 1.9.3

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 (163) hide show
  1. package/.github/workflows/ci-branch.yml +21 -0
  2. package/.github/workflows/ci-pull-request.yml +16 -0
  3. package/.github/workflows/ci-reusable.yml +73 -0
  4. package/ActionGuide/ActionGuide.d.ts +5 -4
  5. package/ActionGuide/ActionGuide.module.css +1 -1
  6. package/Alert/Alert.d.ts +4 -2
  7. package/Alert/Alert.js +4 -1
  8. package/Alert/Alert.module.css +36 -0
  9. package/BodyText/BodyText.d.ts +5 -4
  10. package/BodyText/BodyText.module.css +7 -7
  11. package/Button/Button.d.ts +17 -12
  12. package/Button/Button.js +1 -1
  13. package/Button/Button.module.css +195 -268
  14. package/CHANGELOG.md +220 -0
  15. package/Card/Card.d.ts +36 -8
  16. package/Card/Card.js +157 -20
  17. package/Card/Card.module.css +277 -58
  18. package/Card/tests/Card-specs.js +30 -0
  19. package/Checkbox/Checkbox.d.ts +8 -7
  20. package/Checkbox/Checkbox.js +3 -1
  21. package/Checkbox/Checkbox.module.css +213 -120
  22. package/Checkbox/tests/Checkbox-specs.js +1 -1
  23. package/CheckboxItem/CheckboxItem.d.ts +22 -7
  24. package/CheckboxItem/CheckboxItem.js +69 -4
  25. package/Chips/Chip.js +60 -7
  26. package/Chips/Chip.module.css +3 -3
  27. package/Chips/Chips.js +26 -12
  28. package/Chips/Chips.module.css +1 -1
  29. package/Chips/tests/Chip-specs.js +19 -9
  30. package/Chips/tests/Chips-specs.js +19 -19
  31. package/ContextualMenuDecorator/ContextualMenuDecorator.d.ts +4 -5
  32. package/ContextualPopupDecorator/ContextualPopup.module.css +34 -34
  33. package/ContextualPopupDecorator/ContextualPopupDecorator.js +557 -549
  34. package/DatePicker/DatePicker.d.ts +4 -5
  35. package/DayPicker/DayPicker.d.ts +8 -7
  36. package/Dropdown/Dropdown.d.ts +11 -13
  37. package/Dropdown/Dropdown.module.css +9 -9
  38. package/Dropdown/DropdownList.js +16 -11
  39. package/FixedPopupPanels/FixedPopupPanels.d.ts +4 -2
  40. package/FixedPopupPanels/FixedPopupPanels.module.css +18 -18
  41. package/FlexiblePopupPanels/FlexiblePopupPanels.module.css +23 -23
  42. package/FormCheckboxItem/FormCheckboxItem.d.ts +5 -4
  43. package/Heading/Heading.d.ts +8 -7
  44. package/Heading/Heading.module.css +5 -5
  45. package/Icon/Icon.d.ts +14 -4
  46. package/Icon/Icon.js +48 -2
  47. package/Icon/Icon.module.css +1 -1
  48. package/Icon/IconList.js +25 -1
  49. package/IconItem/IconItem.d.ts +13 -12
  50. package/IconItem/IconItem.js +15 -0
  51. package/IconItem/IconItem.module.css +107 -1
  52. package/Image/Image.d.ts +5 -4
  53. package/ImageItem/ImageItem.d.ts +11 -10
  54. package/ImageItem/ImageItem.js +37 -31
  55. package/ImageItem/ImageItem.module.css +30 -30
  56. package/ImageItem/tests/ImageItem-specs.js +3 -10
  57. package/Input/Input.js +9 -2
  58. package/Input/Input.module.css +37 -8
  59. package/Input/InputField.js +5 -1
  60. package/Input/InputField.module.css +17 -2
  61. package/Input/InputFieldSpotlightDecorator.js +213 -229
  62. package/Input/index.d.ts +15 -18
  63. package/Input/tests/InputField-specs.js +21 -0
  64. package/Item/Item.d.ts +16 -9
  65. package/Item/Item.js +20 -2
  66. package/Item/Item.module.css +1 -1
  67. package/KeyGuide/KeyGuide.d.ts +8 -7
  68. package/KeyGuide/KeyGuide.module.css +25 -1
  69. package/Marquee/Marquee.d.ts +2 -4
  70. package/MediaOverlay/MediaOverlay.d.ts +12 -11
  71. package/MediaOverlay/MediaOverlay.js +43 -21
  72. package/MediaOverlay/MediaOverlay.module.css +114 -15
  73. package/MediaPlayer/MediaControls.js +195 -13
  74. package/MediaPlayer/MediaControls.module.css +3 -2
  75. package/MediaPlayer/MediaSlider.module.css +7 -20
  76. package/MediaPlayer/index.d.ts +59 -7
  77. package/PageViews/PageViews.js +165 -80
  78. package/PageViews/PageViewsRouter.js +9 -0
  79. package/PageViews/tests/PageViews-specs.js +84 -0
  80. package/Panels/Header.js +48 -30
  81. package/Panels/Header.module.css +83 -31
  82. package/Panels/Panel.module.css +1 -1
  83. package/Panels/index.d.ts +7 -8
  84. package/Picker/Picker.d.ts +4 -5
  85. package/Picker/Picker.module.css +2 -2
  86. package/Popup/Popup.js +242 -240
  87. package/Popup/Popup.module.css +24 -24
  88. package/PopupTabLayout/PopupTabLayout.d.ts +5 -7
  89. package/PopupTabLayout/PopupTabLayout.js +15 -9
  90. package/PopupTabLayout/PopupTabLayout.module.css +53 -16
  91. package/PopupTabLayout/PopupTabLayoutStateContext.js +8 -0
  92. package/ProgressBar/ProgressBar.d.ts +5 -4
  93. package/ProgressBar/ProgressBarTooltip.module.css +12 -12
  94. package/ProgressButton/ProgressButton.d.ts +4 -5
  95. package/QuickGuidePanels/QuickGuidePanels.module.css +2 -2
  96. package/RadioItem/RadioItem.d.ts +18 -5
  97. package/RadioItem/RadioItem.js +67 -2
  98. package/RadioItem/RadioItem.module.css +36 -36
  99. package/RangePicker/RangePicker.module.css +2 -2
  100. package/Scroller/EditableWrapper.js +11 -4
  101. package/Scroller/Scroller.d.ts +20 -16
  102. package/Scroller/Scroller.js +9 -3
  103. package/Scroller/Scroller.module.css +4 -4
  104. package/Slider/Slider.d.ts +16 -14
  105. package/Slider/Slider.js +37 -4
  106. package/Slider/Slider.module.css +314 -91
  107. package/Slider/tests/Slider-specs.js +2 -1
  108. package/Spinner/Spinner.d.ts +5 -4
  109. package/Spinner/Spinner.module.css +9 -9
  110. package/Steps/Steps.d.ts +5 -4
  111. package/Steps/Steps.js +9 -5
  112. package/Switch/Switch.d.ts +8 -7
  113. package/Switch/Switch.module.css +100 -13
  114. package/SwitchItem/SwitchItem.d.ts +9 -6
  115. package/TabLayout/RefocusDecorator.js +15 -9
  116. package/TabLayout/TabGroup.js +3 -2
  117. package/TabLayout/TabGroup.module.css +2 -2
  118. package/TabLayout/TabLayout.d.ts +6 -0
  119. package/TabLayout/TabLayout.js +11 -1
  120. package/TabLayout/TabLayout.module.css +18 -0
  121. package/TabLayout/tests/TabLayout-specs.js +52 -0
  122. package/ThemeDecorator/ThemeDecorator.d.ts +9 -10
  123. package/ThemeDecorator/fontGenerator.js +1 -1
  124. package/ThemeDecorator/screenTypes.json +1 -0
  125. package/TimePicker/TimePicker.module.css +1 -1
  126. package/TooltipDecorator/Tooltip.module.css +1 -2
  127. package/TooltipDecorator/tests/util-specs.js +12 -0
  128. package/TooltipDecorator/useTooltip.js +1 -1
  129. package/TooltipDecorator/util.js +18 -11
  130. package/VideoPlayer/Feedback.js +3 -0
  131. package/VideoPlayer/Feedback.module.css +5 -9
  132. package/VideoPlayer/FeedbackIcons.js +1 -1
  133. package/VideoPlayer/FeedbackTooltip.module.css +55 -11
  134. package/VideoPlayer/VideoPlayer.d.ts +44 -18
  135. package/VideoPlayer/VideoPlayer.js +128 -23
  136. package/VideoPlayer/VideoPlayer.module.css +28 -11
  137. package/VirtualList/VirtualList.d.ts +9 -2
  138. package/VirtualList/VirtualList.js +31 -6
  139. package/VirtualList/tests/VirtualGridList-translate-specs.js +3 -0
  140. package/VirtualList/tests/VirtualList-specs.js +28 -1
  141. package/VirtualList/tests/VirtualList-translate-specs.js +4 -1
  142. package/WizardPanels/WizardPanels.module.css +2 -2
  143. package/WizardPanels/index.d.ts +4 -2
  144. package/fonts/Limestone_Icons.ttf +0 -0
  145. package/internal/$L/$L.js +3 -3
  146. package/internal/DateComponentPicker/DateComponentPicker.module.css +2 -2
  147. package/internal/DateTime/DateTime.module.css +1 -0
  148. package/internal/Panels/PanelsRouter.js +16 -5
  149. package/internal/Picker/Picker.module.css +2 -2
  150. package/internal/SharedStateDecorator/SharedStateDecorator.js +76 -99
  151. package/internal/validators/validators.js +21 -2
  152. package/package.json +14 -14
  153. package/styles/colors-highcontrast.less +9 -1
  154. package/styles/colors.less +11 -7
  155. package/styles/motion-mixins.less +66 -0
  156. package/styles/motions.less +78 -0
  157. package/styles/variables.less +176 -150
  158. package/useScroll/HoverToScroll.js +8 -5
  159. package/useScroll/ScrollbarTrack.module.css +8 -8
  160. package/useScroll/useEvent.js +7 -1
  161. package/useScroll/useScroll.js +2 -0
  162. package/useScroll/useScroll.module.css +6 -6
  163. package/.travis.yml +0 -40
@@ -169,20 +169,13 @@ describe('ImageItem', function () {
169
169
  var actual = _react.screen.getAllByRole('img')[0].children.item(0);
170
170
  expect(actual).toHaveClass(expected);
171
171
  });
172
- test('should have `checkbox` role when `showSelection` is true', function () {
173
- (0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_ImageItem.ImageItemBase, {
174
- showSelection: true
175
- }));
176
- var actual = _react.screen.getByRole('checkbox');
177
- expect(actual).toBeInTheDocument();
178
- });
179
- test('should be `checked` when `showSelection` and `selected` props are true', function () {
172
+ test('should have "Selected" in `aria-label` when `showSelection` and `selected` is true', function () {
180
173
  (0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_ImageItem.ImageItemBase, {
181
174
  selected: true,
182
175
  showSelection: true
183
176
  }));
184
- var actual = _react.screen.getByRole('checkbox');
185
- expect(actual).toBeChecked();
177
+ var actual = _react.screen.getByLabelText('Selected');
178
+ expect(actual).toBeInTheDocument();
186
179
  });
187
180
  test('should support `wideImage` prop', function () {
188
181
  (0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_ImageItem.ImageItemBase, {
package/Input/Input.js CHANGED
@@ -337,7 +337,9 @@ var InputPopupBase = exports.InputPopupBase = (0, _kind["default"])({
337
337
  return (0, _util.mapAndFilterChildren)(_buttons, function (button, index) {
338
338
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Layout.Cell, {
339
339
  shrink: true,
340
- children: button
340
+ children: /*#__PURE__*/(0, _react.cloneElement)(button, {
341
+ css: _InputModule["default"]
342
+ })
341
343
  }, "button".concat(index));
342
344
  }) || null;
343
345
  },
@@ -357,9 +359,14 @@ var InputPopupBase = exports.InputPopupBase = (0, _kind["default"])({
357
359
  },
358
360
  popupClassName: function popupClassName(_ref6) {
359
361
  var popupType = _ref6.popupType,
362
+ subtitle = _ref6.subtitle,
363
+ title = _ref6.title,
360
364
  type = _ref6.type,
361
365
  styler = _ref6.styler;
362
- return styler.join('inputPopup', popupType, type);
366
+ return styler.join('inputPopup', popupType, type, {
367
+ noTitle: !title,
368
+ noSubtitle: !subtitle
369
+ });
363
370
  },
364
371
  inputAreaClassName: function inputAreaClassName(_ref7) {
365
372
  var buttons = _ref7.buttons,
@@ -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
+ }
@@ -266,10 +266,14 @@ var InputFieldBase = exports.InputFieldBase = (0, _kind["default"])({
266
266
  return (0, _util3.calcAriaLabel)(title, type, value);
267
267
  },
268
268
  className: function className(_ref3) {
269
- var invalid = _ref3.invalid,
269
+ var iconAfter = _ref3.iconAfter,
270
+ iconBefore = _ref3.iconBefore,
271
+ invalid = _ref3.invalid,
270
272
  size = _ref3.size,
271
273
  styler = _ref3.styler;
272
274
  return styler.append({
275
+ hasIconAfter: iconAfter,
276
+ hasIconBefore: iconBefore,
273
277
  invalid: invalid
274
278
  }, size);
275
279
  },
@@ -12,6 +12,7 @@
12
12
  text-overflow: ellipsis;
13
13
  flex-grow: 1;
14
14
  text-indent: 0.2em;
15
+ max-width: 100%;
15
16
  }
16
17
  :global(.enact-locale-non-latin) .input {
17
18
  font-family: "Limestone";
@@ -19,7 +20,7 @@
19
20
  :global(.enact-locale-non-latin) .input {
20
21
  font-family: "Limestone";
21
22
  font-weight: var(--primitive-font-weight-light);
22
- font-size: 1.125rem;
23
+ font-size: var(--primitive-font-size-54);
23
24
  font-style: normal;
24
25
  }
25
26
  :global(.enact-locale-km) .input {
@@ -85,7 +86,6 @@
85
86
  vertical-align: middle;
86
87
  align-items: center;
87
88
  height: 3.5rem;
88
- width: 32.5rem;
89
89
  }
90
90
  .inputField .iconBefore {
91
91
  margin-left: 0;
@@ -143,6 +143,14 @@
143
143
  }
144
144
  .inputField.large {
145
145
  padding: 0 var(--primitive-spacing-30);
146
+ width: 32.5rem;
147
+ }
148
+ .inputField.large.hasIconBefore .input,
149
+ .inputField.large.hasIconAfter .input {
150
+ max-width: 28.875rem;
151
+ }
152
+ .inputField.large.hasIconBefore.inputField.large.hasIconAfter .input {
153
+ max-width: 26.5rem;
146
154
  }
147
155
  .inputField.small {
148
156
  height: 2.75rem;
@@ -157,6 +165,13 @@
157
165
  line-height: 2.75rem;
158
166
  height: 2.75rem;
159
167
  }
168
+ .inputField.small.hasIconBefore .input,
169
+ .inputField.small.hasIconAfter .input {
170
+ max-width: 20.625rem;
171
+ }
172
+ .inputField.small.hasIconBefore.inputField.small.hasIconAfter .input {
173
+ max-width: 18.25rem;
174
+ }
160
175
  .inputField.multiline {
161
176
  display: block;
162
177
  padding: 0.5rem 0.75rem;