@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
@@ -39,6 +39,25 @@
39
39
  .header .titlesRow .close {
40
40
  margin-inline-end: 0;
41
41
  }
42
+ .header:not(.centered) .titlesRow {
43
+ height: 4.625rem;
44
+ }
45
+ :global(.enact-locale-km) .header:not(.centered) .titlesRow {
46
+ height: 5.125rem;
47
+ }
48
+ :global(.enact-locale-si) .header:not(.centered) .titlesRow {
49
+ height: 5.125rem;
50
+ }
51
+ :global(.enact-locale-th) .header:not(.centered) .titlesRow {
52
+ height: 5.125rem;
53
+ }
54
+ :global(.enact-locale-vi) .header:not(.centered) .titlesRow {
55
+ height: 5.125rem;
56
+ }
57
+ .header.isPopupHeader .titlesRow {
58
+ align-items: center;
59
+ height: 4.25rem;
60
+ }
42
61
  .header.wizard .titlesRow {
43
62
  padding-bottom: 70.2px;
44
63
  }
@@ -50,11 +69,38 @@
50
69
  .header .slotSizer {
51
70
  display: inline-block;
52
71
  }
53
- .header.centered .title {
72
+ .header .slotSizer > * {
73
+ margin: 0;
74
+ }
75
+ .header .slotAfter .slotSizer > *:not(:first-child) {
76
+ margin-inline-start: var(--primitive-spacing-36);
77
+ }
78
+ .header .slotBefore .slotSizer {
79
+ /* Select the children that have visible siblings right after them */
80
+ }
81
+ .header .slotBefore .slotSizer > *:not([style*="display: none"]):has( ~ *:not([style*="display: none"])) {
82
+ margin-inline-end: var(--primitive-spacing-36);
83
+ }
84
+ .header.centered:not(.isPopupHeader):not(.wizard) .titlesRow {
85
+ height: 5.875rem;
86
+ }
87
+ :global(.enact-locale-km) .header.centered:not(.isPopupHeader):not(.wizard) .titlesRow {
88
+ height: 6.375rem;
89
+ }
90
+ :global(.enact-locale-si) .header.centered:not(.isPopupHeader):not(.wizard) .titlesRow {
91
+ height: 6.375rem;
92
+ }
93
+ :global(.enact-locale-th) .header.centered:not(.isPopupHeader):not(.wizard) .titlesRow {
94
+ height: 6.375rem;
95
+ }
96
+ :global(.enact-locale-vi) .header.centered:not(.isPopupHeader):not(.wizard) .titlesRow {
97
+ height: 6.375rem;
98
+ }
99
+ .header.centered:not(.isPopupHeader):not(.wizard) .title {
54
100
  margin-top: var(--primitive-spacing-60);
55
101
  }
56
- .header.centered .slotAbove,
57
- .header.centered .slotBelow {
102
+ .header.centered:not(.isPopupHeader) .slotAbove,
103
+ .header.centered:not(.isPopupHeader) .slotBelow {
58
104
  text-align: center;
59
105
  }
60
106
  .header .title {
@@ -69,7 +115,7 @@
69
115
  margin-right: var(--primitive-spacing-6);
70
116
  }
71
117
  .header .slotAbove {
72
- margin: 0 -0.75rem var(--primitive-spacing-24) -0.75rem;
118
+ margin: 0 calc(var(--primitive-spacing-36) * -1) var(--primitive-spacing-24) calc(var(--primitive-spacing-36) * -1);
73
119
  }
74
120
  .header .slotAfter {
75
121
  text-align: right;
@@ -78,45 +124,43 @@
78
124
  text-align: left;
79
125
  }
80
126
  .header .slotBelow {
81
- margin: 0.375rem -0.75rem 0 -0.75rem;
127
+ margin: var(--primitive-spacing-18) calc(var(--primitive-spacing-36) * -1) 0 calc(var(--primitive-spacing-36) * -1);
82
128
  }
83
- .header .standard .slotBefore > *:first-child,
84
- .header .compact .slotBefore > *:first-child,
85
- .header .mini .slotBefore > *:first-child {
86
- margin-inline-start: 0;
87
- }
88
- .header .standard .slotAfter > *:last-child,
89
- .header .compact .slotAfter > *:last-child,
90
- .header .mini .slotAfter > *:last-child {
91
- margin-inline-end: 0;
92
- }
93
- .header.standard {
94
- margin: 0;
95
- padding: 2.0375rem 2.75rem 0.125rem 2.75rem;
96
- }
97
- .header.standard .subtitle,
98
- .header.standard .title {
99
- padding: 0;
100
- }
101
- .header.standard .subtitle {
102
- margin: 0.43125rem 0 0 0;
103
- }
104
- .header.standard.slotBefore:not(.centered) .slotBefore {
129
+ .header.standard.slotBefore:not(.centered) .slotBefore,
130
+ .header.mini.slotBefore:not(.centered) .slotBefore,
131
+ .header.wizard.slotBefore:not(.centered) .slotBefore {
105
132
  margin-left: 0;
106
133
  margin-right: var(--primitive-spacing-36);
107
134
  }
108
- :global(.enact-locale-right-to-left) .header.standard.slotBefore:not(.centered) .slotBefore {
135
+ :global(.enact-locale-right-to-left) .header.standard.slotBefore:not(.centered) .slotBefore,
136
+ :global(.enact-locale-right-to-left) .header.mini.slotBefore:not(.centered) .slotBefore,
137
+ :global(.enact-locale-right-to-left) .header.wizard.slotBefore:not(.centered) .slotBefore {
109
138
  margin-left: var(--primitive-spacing-36);
110
139
  margin-right: 0;
111
140
  }
112
- .header.standard.slotAfter:not(.centered) .slotAfter {
141
+ .header.standard.slotAfter:not(.centered) .slotAfter,
142
+ .header.mini.slotAfter:not(.centered) .slotAfter,
143
+ .header.wizard.slotAfter:not(.centered) .slotAfter {
113
144
  margin-left: var(--primitive-spacing-36);
114
145
  margin-right: 0;
115
146
  }
116
- :global(.enact-locale-right-to-left) .header.standard.slotAfter:not(.centered) .slotAfter {
147
+ :global(.enact-locale-right-to-left) .header.standard.slotAfter:not(.centered) .slotAfter,
148
+ :global(.enact-locale-right-to-left) .header.mini.slotAfter:not(.centered) .slotAfter,
149
+ :global(.enact-locale-right-to-left) .header.wizard.slotAfter:not(.centered) .slotAfter {
117
150
  margin-left: 0;
118
151
  margin-right: var(--primitive-spacing-36);
119
152
  }
153
+ .header.standard {
154
+ margin: 0;
155
+ padding: 2.0375rem 2.75rem 0.125rem 2.75rem;
156
+ }
157
+ .header.standard .subtitle,
158
+ .header.standard .title {
159
+ padding: 0;
160
+ }
161
+ .header.standard .subtitle {
162
+ margin: 0;
163
+ }
120
164
  .header.compact {
121
165
  margin: 0;
122
166
  padding: 1.28125rem 1.25rem 1.5px 1.25rem;
@@ -157,12 +201,20 @@
157
201
  margin-left: 0;
158
202
  margin-right: var(--primitive-spacing-30);
159
203
  }
204
+ .header.compact.isPopupHeader.slotAfter {
205
+ padding-left: 1.25rem;
206
+ padding-right: NaNrem - var(--primitive-spacing-24));
207
+ }
208
+ :global(.enact-locale-right-to-left) .header.compact.isPopupHeader.slotAfter {
209
+ padding-left: NaNrem - var(--primitive-spacing-24));
210
+ padding-right: 1.25rem;
211
+ }
160
212
  .header.wizard {
161
213
  margin: 0;
162
214
  padding: 3.2875rem 2.75rem 0.125rem 2.75rem;
163
215
  }
164
216
  .header.wizard.noSubtitle {
165
- padding-bottom: calc( 70.2px + var(--primitive-spacing-6));
217
+ padding-bottom: NaNrem + var(--primitive-spacing-6));
166
218
  }
167
219
  .header.wizard .titleContainer:nth-child(2) {
168
220
  top: 0;
@@ -12,7 +12,7 @@
12
12
  }
13
13
  .panel .body {
14
14
  position: relative;
15
- padding: 0 2rem;
15
+ padding: 0 NaNrem - var(--primitive-spacing-36));
16
16
  flex: 1;
17
17
  min-height: 0;
18
18
  opacity: 0;
package/Panels/index.d.ts CHANGED
@@ -361,14 +361,13 @@ export class Route extends React.Component<
361
361
  Merge<React.HTMLProps<HTMLElement>, RouteProps>
362
362
  > {}
363
363
 
364
- export interface PanelDecoratorProps
365
- extends Merge<
366
- Merge<
367
- spotlight_SpotlightContainerDecorator_SpotlightContainerDecoratorProps,
368
- ui_Slottable_SlottableProps
369
- >,
370
- limestone_Skinnable_SkinnableProps
371
- > {}
364
+ export interface PanelDecoratorProps extends Merge<
365
+ Merge<
366
+ spotlight_SpotlightContainerDecorator_SpotlightContainerDecoratorProps,
367
+ ui_Slottable_SlottableProps
368
+ >,
369
+ limestone_Skinnable_SkinnableProps
370
+ > {}
372
371
  export function PanelDecorator<P>(
373
372
  Component: React.ComponentType<P> | string,
374
373
  ): React.ComponentType<P & PanelDecoratorProps>;
@@ -166,11 +166,10 @@ export class PickerBase extends React.Component<
166
166
  Merge<React.HTMLProps<HTMLElement>, PickerBaseProps>
167
167
  > {}
168
168
 
169
- export interface PickerProps
170
- extends Merge<
171
- Merge<PickerBaseProps, ui_Changeable_ChangeableProps>,
172
- limestone_Marquee_MarqueeControllerProps
173
- > {
169
+ export interface PickerProps extends Merge<
170
+ Merge<PickerBaseProps, ui_Changeable_ChangeableProps>,
171
+ limestone_Marquee_MarqueeControllerProps
172
+ > {
174
173
  /**
175
174
  * Default index of the selected child.
176
175
  *
@@ -1,10 +1,10 @@
1
1
  .title {
2
- margin-left: 1.875rem;
2
+ margin-left: calc(var(--primitive-spacing-36) + var(--primitive-spacing-36) + 18px);
3
3
  margin-right: var(--primitive-spacing-24);
4
4
  }
5
5
  :global(.enact-locale-right-to-left) .title {
6
6
  margin-left: var(--primitive-spacing-24);
7
- margin-right: 1.875rem;
7
+ margin-right: calc(var(--primitive-spacing-36) + var(--primitive-spacing-36) + 18px);
8
8
  }
9
9
  .title.inlineTitle {
10
10
  display: inline-block;