@dxc-technology/halstack-react 0.0.0-c9c1158 → 0.0.0-c9efd3e

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 (216) hide show
  1. package/BackgroundColorContext.d.ts +1 -10
  2. package/BackgroundColorContext.js +2 -7
  3. package/HalstackContext.d.ts +29 -133
  4. package/HalstackContext.js +1 -1
  5. package/accordion/Accordion.accessibility.test.js +71 -0
  6. package/accordion/Accordion.js +10 -26
  7. package/accordion/Accordion.stories.tsx +4 -36
  8. package/accordion/types.d.ts +1 -1
  9. package/accordion-group/AccordionGroup.accessibility.test.js +88 -0
  10. package/accordion-group/AccordionGroup.d.ts +2 -3
  11. package/accordion-group/AccordionGroup.js +3 -3
  12. package/accordion-group/AccordionGroupAccordion.js +2 -2
  13. package/accordion-group/AccordionGroupContext.d.ts +3 -0
  14. package/accordion-group/AccordionGroupContext.js +8 -0
  15. package/accordion-group/types.d.ts +1 -1
  16. package/action-icon/ActionIcon.accessibility.test.js +63 -0
  17. package/action-icon/ActionIcon.d.ts +4 -0
  18. package/action-icon/ActionIcon.js +48 -0
  19. package/action-icon/ActionIcon.stories.tsx +41 -0
  20. package/action-icon/ActionIcon.test.js +64 -0
  21. package/action-icon/types.d.ts +26 -0
  22. package/action-icon/types.js +5 -0
  23. package/alert/Alert.accessibility.test.js +95 -0
  24. package/alert/Alert.js +15 -72
  25. package/badge/Badge.accessibility.test.js +129 -0
  26. package/badge/Badge.d.ts +1 -1
  27. package/badge/Badge.js +141 -28
  28. package/badge/Badge.stories.tsx +210 -0
  29. package/badge/Badge.test.js +30 -0
  30. package/badge/types.d.ts +52 -3
  31. package/box/Box.accessibility.test.js +33 -0
  32. package/box/Box.js +1 -4
  33. package/bulleted-list/BulletedList.accessibility.test.js +107 -0
  34. package/bulleted-list/BulletedList.js +15 -22
  35. package/bulleted-list/BulletedList.stories.tsx +1 -2
  36. package/button/Button.accessibility.test.js +127 -0
  37. package/button/Button.js +15 -15
  38. package/button/Button.stories.tsx +32 -51
  39. package/button/Button.test.js +3 -1
  40. package/button/types.d.ts +1 -1
  41. package/card/Card.accessibility.test.js +36 -0
  42. package/checkbox/Checkbox.accessibility.test.js +87 -0
  43. package/checkbox/Checkbox.js +26 -31
  44. package/chip/Chip.accessibility.test.js +67 -0
  45. package/chip/Chip.js +8 -5
  46. package/chip/Chip.stories.tsx +5 -24
  47. package/chip/Chip.test.js +4 -4
  48. package/common/coreTokens.d.ts +1 -1
  49. package/common/coreTokens.js +3 -3
  50. package/common/variables.d.ts +29 -133
  51. package/common/variables.js +38 -142
  52. package/container/Container.js +3 -7
  53. package/container/Container.stories.tsx +10 -25
  54. package/contextual-menu/ContextualMenu.accessibility.test.js +86 -0
  55. package/contextual-menu/ContextualMenu.d.ts +7 -0
  56. package/contextual-menu/ContextualMenu.js +71 -0
  57. package/contextual-menu/ContextualMenu.stories.tsx +182 -0
  58. package/contextual-menu/ContextualMenu.test.js +71 -0
  59. package/contextual-menu/MenuItemAction.d.ts +4 -0
  60. package/contextual-menu/MenuItemAction.js +46 -0
  61. package/contextual-menu/types.d.ts +22 -0
  62. package/contextual-menu/types.js +5 -0
  63. package/date-input/DateInput.accessibility.test.js +216 -0
  64. package/date-input/types.d.ts +2 -2
  65. package/dialog/Dialog.accessibility.test.js +69 -0
  66. package/dialog/Dialog.js +2 -5
  67. package/dialog/Dialog.stories.tsx +170 -0
  68. package/dialog/Dialog.test.js +1 -1
  69. package/divider/Divider.accessibility.test.js +33 -0
  70. package/divider/Divider.d.ts +4 -0
  71. package/divider/Divider.js +36 -0
  72. package/divider/Divider.stories.tsx +223 -0
  73. package/divider/Divider.test.js +38 -0
  74. package/divider/types.d.ts +21 -0
  75. package/divider/types.js +5 -0
  76. package/dropdown/Dropdown.accessibility.test.js +180 -0
  77. package/dropdown/Dropdown.js +21 -36
  78. package/dropdown/Dropdown.stories.tsx +5 -16
  79. package/dropdown/DropdownMenuItem.js +6 -3
  80. package/dropdown/types.d.ts +3 -5
  81. package/file-input/FileInput.accessibility.test.js +160 -0
  82. package/file-input/FileInput.js +3 -39
  83. package/file-input/FileInput.test.js +7 -84
  84. package/file-input/FileItem.js +13 -27
  85. package/footer/Footer.accessibility.test.js +117 -0
  86. package/footer/Footer.d.ts +1 -1
  87. package/footer/Footer.js +36 -31
  88. package/footer/Footer.stories.tsx +46 -2
  89. package/footer/Icons.d.ts +1 -0
  90. package/footer/Icons.js +65 -1
  91. package/footer/types.d.ts +8 -8
  92. package/header/Header.accessibility.test.js +84 -0
  93. package/header/Header.js +18 -40
  94. package/header/types.d.ts +4 -3
  95. package/heading/Heading.accessibility.test.js +33 -0
  96. package/icon/Icon.accessibility.test.js +30 -0
  97. package/icon/Icon.d.ts +4 -0
  98. package/icon/Icon.js +33 -0
  99. package/icon/Icon.stories.tsx +28 -0
  100. package/icon/types.d.ts +4 -0
  101. package/icon/types.js +5 -0
  102. package/image/Image.accessibility.test.js +56 -0
  103. package/image/Image.stories.tsx +3 -1
  104. package/layout/ApplicationLayout.d.ts +1 -1
  105. package/layout/ApplicationLayout.js +1 -1
  106. package/layout/Icons.js +0 -2
  107. package/link/Link.accessibility.test.js +112 -0
  108. package/link/Link.js +7 -5
  109. package/link/Link.stories.tsx +2 -2
  110. package/link/types.d.ts +1 -1
  111. package/main.d.ts +5 -3
  112. package/main.js +22 -8
  113. package/nav-tabs/NavTabs.accessibility.test.js +52 -0
  114. package/nav-tabs/NavTabs.d.ts +1 -2
  115. package/nav-tabs/NavTabs.js +9 -6
  116. package/nav-tabs/NavTabs.stories.tsx +6 -4
  117. package/nav-tabs/NavTabs.test.js +3 -2
  118. package/nav-tabs/NavTabsContext.d.ts +3 -0
  119. package/nav-tabs/NavTabsContext.js +8 -0
  120. package/nav-tabs/Tab.js +8 -7
  121. package/number-input/NumberInput.accessibility.test.js +228 -0
  122. package/number-input/NumberInput.d.ts +0 -7
  123. package/number-input/NumberInput.js +24 -5
  124. package/number-input/NumberInput.test.js +165 -6
  125. package/number-input/NumberInputContext.d.ts +3 -0
  126. package/number-input/NumberInputContext.js +8 -0
  127. package/number-input/types.d.ts +6 -0
  128. package/package.json +12 -12
  129. package/paginator/Paginator.accessibility.test.js +79 -0
  130. package/paginator/Paginator.js +1 -4
  131. package/paragraph/Paragraph.accessibility.test.js +28 -0
  132. package/paragraph/Paragraph.js +2 -7
  133. package/password-input/PasswordInput.accessibility.test.js +153 -0
  134. package/password-input/PasswordInput.stories.tsx +0 -1
  135. package/progress-bar/ProgressBar.accessibility.test.js +35 -0
  136. package/progress-bar/ProgressBar.js +5 -11
  137. package/quick-nav/QuickNav.accessibility.test.js +57 -0
  138. package/radio-group/RadioGroup.accessibility.test.js +97 -0
  139. package/radio-group/RadioGroup.js +1 -1
  140. package/resultset-table/ResultsetTable.accessibility.test.js +274 -0
  141. package/resultset-table/ResultsetTable.d.ts +4 -1
  142. package/resultset-table/ResultsetTable.js +23 -12
  143. package/resultset-table/ResultsetTable.stories.tsx +106 -5
  144. package/resultset-table/ResultsetTable.test.js +76 -0
  145. package/resultset-table/types.d.ts +40 -7
  146. package/select/Option.js +8 -1
  147. package/select/Select.accessibility.test.js +217 -0
  148. package/select/Select.js +35 -27
  149. package/select/Select.stories.tsx +0 -1
  150. package/select/Select.test.js +498 -462
  151. package/select/types.d.ts +2 -2
  152. package/sidenav/Sidenav.accessibility.test.js +59 -0
  153. package/sidenav/Sidenav.js +20 -18
  154. package/sidenav/Sidenav.stories.tsx +4 -9
  155. package/sidenav/types.d.ts +2 -2
  156. package/slider/Slider.accessibility.test.js +104 -0
  157. package/slider/Slider.js +37 -46
  158. package/spinner/Spinner.accessibility.test.js +96 -0
  159. package/spinner/Spinner.js +6 -14
  160. package/status-light/StatusLight.accessibility.test.js +157 -0
  161. package/status-light/StatusLight.d.ts +4 -0
  162. package/status-light/StatusLight.js +51 -0
  163. package/status-light/StatusLight.stories.tsx +74 -0
  164. package/status-light/StatusLight.test.js +25 -0
  165. package/status-light/types.d.ts +17 -0
  166. package/status-light/types.js +5 -0
  167. package/switch/Switch.accessibility.test.js +89 -0
  168. package/switch/Switch.js +23 -28
  169. package/table/DropdownTheme.js +62 -0
  170. package/table/Table.accessibility.test.js +82 -0
  171. package/table/Table.d.ts +6 -2
  172. package/table/Table.js +73 -11
  173. package/table/Table.stories.tsx +297 -2
  174. package/table/Table.test.js +92 -0
  175. package/table/types.d.ts +28 -0
  176. package/tabs/Tab.js +7 -4
  177. package/tabs/Tabs.accessibility.test.js +56 -0
  178. package/tabs/Tabs.js +4 -5
  179. package/tabs/Tabs.stories.tsx +1 -1
  180. package/tag/Tag.accessibility.test.js +69 -0
  181. package/tag/Tag.js +6 -6
  182. package/tag/Tag.stories.tsx +4 -7
  183. package/tag/Tag.test.js +4 -12
  184. package/tag/types.d.ts +2 -2
  185. package/text-input/Suggestions.js +7 -10
  186. package/text-input/TextInput.accessibility.test.js +321 -0
  187. package/text-input/TextInput.js +77 -102
  188. package/text-input/TextInput.stories.tsx +1 -1
  189. package/text-input/TextInput.test.js +96 -79
  190. package/textarea/Textarea.accessibility.test.js +155 -0
  191. package/textarea/Textarea.js +10 -16
  192. package/textarea/Textarea.stories.tsx +0 -1
  193. package/toggle-group/ToggleGroup.accessibility.test.js +107 -0
  194. package/toggle-group/ToggleGroup.js +1 -4
  195. package/typography/Typography.accessibility.test.js +339 -0
  196. package/useTheme.d.ts +29 -133
  197. package/utils/FocusLock.js +15 -5
  198. package/wizard/Wizard.accessibility.test.js +55 -0
  199. package/wizard/types.d.ts +1 -1
  200. package/common/OpenSans.css +0 -69
  201. package/common/fonts/OpenSans-Bold.ttf +0 -0
  202. package/common/fonts/OpenSans-BoldItalic.ttf +0 -0
  203. package/common/fonts/OpenSans-ExtraBold.ttf +0 -0
  204. package/common/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
  205. package/common/fonts/OpenSans-Italic.ttf +0 -0
  206. package/common/fonts/OpenSans-Light.ttf +0 -0
  207. package/common/fonts/OpenSans-LightItalic.ttf +0 -0
  208. package/common/fonts/OpenSans-Regular.ttf +0 -0
  209. package/common/fonts/OpenSans-SemiBold.ttf +0 -0
  210. package/common/fonts/OpenSans-SemiBoldItalic.ttf +0 -0
  211. package/sidenav/Icons.d.ts +0 -7
  212. package/sidenav/Icons.js +0 -47
  213. package/text-input/Icons.d.ts +0 -8
  214. package/text-input/Icons.js +0 -56
  215. /package/{layout → sidenav}/SidenavContext.d.ts +0 -0
  216. /package/{layout → sidenav}/SidenavContext.js +0 -0
package/useTheme.d.ts CHANGED
@@ -36,7 +36,7 @@ declare const useTheme: () => {
36
36
  disabledIconColor: string;
37
37
  iconSize: string;
38
38
  iconMarginLeft: string;
39
- iconMarginRigth: string;
39
+ iconMarginRight: string;
40
40
  accordionGroupSeparatorBorderColor: string;
41
41
  accordionGroupSeparatorBorderThickness: string;
42
42
  accordionGroupSeparatorBorderRadius: string;
@@ -109,7 +109,6 @@ declare const useTheme: () => {
109
109
  }>;
110
110
  bulletedList?: Partial<{
111
111
  fontColor: string;
112
- fontColorOnDark: string;
113
112
  bulletIconHeight: string;
114
113
  bulletIconWidth: string;
115
114
  bulletHeight: string;
@@ -124,19 +123,12 @@ declare const useTheme: () => {
124
123
  paddingTop: string;
125
124
  paddingBottom: string;
126
125
  focusBorderColor: string;
127
- focusBorderColorOnDark: string;
128
126
  primaryBackgroundColor: string;
129
- primaryBackgroundColorOnDark: string;
130
127
  primaryFontColor: string;
131
- primaryFontColorOnDark: string;
132
128
  primaryHoverBackgroundColor: string;
133
- primaryHoverBackgroundColorOnDark: string;
134
129
  primaryActiveBackgroundColor: string;
135
- primaryActiveBackgroundColorOnDark: string;
136
130
  primaryDisabledBackgroundColor: string;
137
- primaryDisabledBackgroundColorOnDark: string;
138
131
  primaryDisabledFontColor: string;
139
- primaryDisabledFontColorOnDark: string;
140
132
  primaryBorderThickness: string;
141
133
  primaryBorderStyle: string;
142
134
  primaryBorderRadius: string;
@@ -144,23 +136,14 @@ declare const useTheme: () => {
144
136
  primaryFontSize: string;
145
137
  primaryFontWeight: string;
146
138
  secondaryBackgroundColor: string;
147
- secondaryBackgroundColorOnDark: string;
148
139
  secondaryFontColor: string;
149
- secondaryFontColorOnDark: string;
150
140
  secondaryHoverFontColor: string;
151
- secondaryHoverFontColorOnDark: string;
152
141
  secondaryBorderColor: string;
153
- secondaryBorderColorOnDark: string;
154
142
  secondaryHoverBackgroundColor: string;
155
- secondaryHoverBackgroundColorOnDark: string;
156
143
  secondaryActiveBackgroundColor: string;
157
- secondaryActiveBackgroundColorOnDark: string;
158
144
  secondaryDisabledBackgroundColor: string;
159
- secondaryDisabledBackgroundColorOnDark: string;
160
145
  secondaryDisabledFontColor: string;
161
- secondaryDisabledFontColorOnDark: string;
162
146
  secondaryDisabledBorderColor: string;
163
- secondaryDisabledBorderColorOnDark: string;
164
147
  secondaryBorderThickness: string;
165
148
  secondaryBorderStyle: string;
166
149
  secondaryBorderRadius: string;
@@ -168,17 +151,11 @@ declare const useTheme: () => {
168
151
  secondaryFontSize: string;
169
152
  secondaryFontWeight: string;
170
153
  textBackgroundColor: string;
171
- textBackgroundColorOnDark: string;
172
154
  textFontColor: string;
173
- textFontColorOnDark: string;
174
155
  textHoverBackgroundColor: string;
175
- textHoverBackgroundColorOnDark: string;
176
156
  textActiveBackgroundColor: string;
177
- textActiveBackgroundColorOnDark: string;
178
157
  textDisabledBackgroundColor: string;
179
- textDisabledBackgroundColorOnDark: string;
180
158
  textDisabledFontColor: string;
181
- textDisabledFontColorOnDark: string;
182
159
  textBorderThickness: string;
183
160
  textBorderStyle: string;
184
161
  textBorderRadius: string;
@@ -192,35 +169,24 @@ declare const useTheme: () => {
192
169
  }>;
193
170
  checkbox?: Partial<{
194
171
  backgroundColorChecked: string;
195
- backgroundColorCheckedOnDark: string;
196
172
  hoverBackgroundColorChecked: string;
197
- hoverBackgroundColorCheckedOnDark: string;
198
173
  disabledBackgroundColorChecked: string;
199
- disabledBackgroundColorCheckedOnDark: string;
200
174
  readOnlyBackgroundColorChecked: string;
201
175
  hoverReadOnlyBackgroundColorChecked: string;
202
176
  borderColor: string;
203
- borderColorOnDark: string;
204
177
  hoverBorderColor: string;
205
- hoverBorderColorOnDark: string;
206
178
  disabledBorderColor: string;
207
- disabledBorderColorOnDark: string;
208
179
  readOnlyBorderColor: string;
209
180
  hoverReadOnlyBorderColor: string;
210
181
  checkColor: string;
211
- checkColorOnDark: string;
212
182
  disabledCheckColor: string;
213
- disabledCheckColorOnDark: string;
214
183
  readOnlyCheckColor: string;
215
184
  fontFamily: string;
216
185
  fontSize: string;
217
186
  fontWeight: string;
218
187
  fontColor: string;
219
- fontColorOnDark: string;
220
188
  disabledFontColor: string;
221
- disabledFontColorOnDark: string;
222
189
  focusColor: string;
223
- focusColorOnDark: string;
224
190
  checkLabelSpacing: string;
225
191
  }>;
226
192
  chip?: Partial<{
@@ -316,8 +282,14 @@ declare const useTheme: () => {
316
282
  buttonPaddingBottom: string;
317
283
  buttonPaddingLeft: string;
318
284
  buttonPaddingRight: string;
285
+ buttonHeight: string;
286
+ buttonBorderRadius: string;
287
+ buttonBorderStyle: string;
288
+ buttonBorderThickness: string;
289
+ buttonBorderColor: string;
319
290
  disabledColor: string;
320
291
  disabledButtonBackgroundColor: string;
292
+ disabledButtonBorderColor: string;
321
293
  disabledBorderColor: string;
322
294
  optionBackgroundColor: string;
323
295
  hoverOptionBackgroundColor: string;
@@ -454,7 +426,6 @@ declare const useTheme: () => {
454
426
  underlinedThickness: string;
455
427
  underlinedStyle: string;
456
428
  contentColor: string;
457
- contentColorOnDark: string;
458
429
  }>;
459
430
  heading?: Partial<{
460
431
  level1FontColor: string;
@@ -561,31 +532,26 @@ declare const useTheme: () => {
561
532
  }>;
562
533
  paragraph?: Partial<{
563
534
  fontColor: string;
564
- fontColorOnDark: string;
565
535
  display: string;
566
536
  fontSize: string;
567
537
  fontWeight: string;
568
538
  }>;
569
539
  progressBar?: Partial<{
570
540
  trackLineColor: string;
571
- trackLineColorOnDark: string;
572
541
  totalLineColor: string;
573
542
  labelFontFamily: string;
574
543
  labelFontSize: string;
575
544
  labelFontStyle: string;
576
545
  labelFontWeight: string;
577
546
  labelFontColor: string;
578
- labelFontColorOnDark: string;
579
547
  labelFontTextTransform: string;
580
548
  valueFontFamily: string;
581
549
  valueFontSize: string;
582
550
  valueFontStyle: string;
583
551
  valueFontWeight: string;
584
552
  valueFontColor: string;
585
- valueFontColorOnDark: string;
586
553
  valueFontTextTransform: string;
587
554
  helperTextFontColor: string;
588
- helperTextFontColorOnDark: string;
589
555
  helperTextFontSize: string;
590
556
  helperTextFontStyle: string;
591
557
  helperTextFontWeight: string;
@@ -763,7 +729,6 @@ declare const useTheme: () => {
763
729
  slider?: Partial<{
764
730
  fontFamily: string;
765
731
  limitValuesFontColor: string;
766
- limitValuesFontColorOnDark: string;
767
732
  limitValuesFontSize: string;
768
733
  limitValuesFontStyle: string;
769
734
  limitValuesFontWeight: string;
@@ -780,15 +745,10 @@ declare const useTheme: () => {
780
745
  helperTextFontWeight: string;
781
746
  helperTextLineHeight: string;
782
747
  fontColor: string;
783
- fontColorOnDark: string;
784
748
  labelFontColor: string;
785
- labelFontColorOnDark: string;
786
749
  helperTextFontColor: string;
787
- helperTextFontColorOnDark: string;
788
750
  disabledLabelFontColor: string;
789
- disabledLabelFontColorOnDark: string;
790
751
  disabledHelperTextFontColor: string;
791
- disabledHelperTextFontColorOnDark: string;
792
752
  thumbHeight: string;
793
753
  thumbWidth: string;
794
754
  hoverThumbHeight: string;
@@ -796,40 +756,28 @@ declare const useTheme: () => {
796
756
  thumbVerticalPosition: string;
797
757
  hoverThumbVerticalPosition: string;
798
758
  thumbBackgroundColor: string;
799
- thumbBackgroundColorOnDark: string;
800
759
  hoverThumbScale: string;
801
760
  hoverThumbBackgroundColor: string;
802
- hoverThumbBackgroundColorOnDark: string;
803
761
  activeThumbScale: string;
804
762
  activeThumbBackgroundColor: string;
805
- activeThumbBackgroundColorOnDark: string;
806
763
  focusThumbBackgroundColor: string;
807
- focusThumbBackgroundColorOnDark: string;
808
764
  tickHeight: string;
809
765
  tickWidth: string;
810
766
  tickVerticalPosition: string;
811
767
  tickBackgroundColor: string;
812
- tickBackgroundColorOnDark: string;
813
768
  trackLineThickness: string;
814
769
  trackLineVerticalPosition: string;
815
770
  trackLineColor: string;
816
- trackLineColorOnDark: string;
817
771
  totalLineThickness: string;
818
772
  totalLineVerticalPosition: string;
819
773
  totalLineColor: string;
820
- totalLineColorOnDark: string;
821
774
  disabledThumbVerticalPosition: string;
822
775
  disabledThumbBackgroundColor: string;
823
- disabledThumbBackgroundColorOnDark: string;
824
776
  disabledTickVerticalPosition: string;
825
777
  disabledTickBackgroundColor: string;
826
- disabledTickBackgroundColorOnDark: string;
827
778
  disabledTrackLineColor: string;
828
- disabledTrackLineColorOnDark: string;
829
779
  disabledTotalLineColor: string;
830
- disabledTotalLineColorOnDark: string;
831
780
  focusColor: string;
832
- focusColorOnDark: string;
833
781
  floorLabelMarginRight: string;
834
782
  ceilLabelMarginLeft: string;
835
783
  inputMarginLeft: string;
@@ -843,14 +791,12 @@ declare const useTheme: () => {
843
791
  labelFontStyle: string;
844
792
  labelFontWeight: string;
845
793
  labelFontColor: string;
846
- labelFontColorOnDark: string;
847
794
  labelTextAlign: string;
848
795
  progressValueFontFamily: string;
849
796
  progressValueFontSize: string;
850
797
  progressValueFontStyle: string;
851
798
  progressValueFontWeight: string;
852
799
  progressValueFontColor: string;
853
- progressValueFontColorOnDark: string;
854
800
  progressValueTextAlign: string;
855
801
  overlayBackgroundColor: string;
856
802
  overlayOpacity: string;
@@ -869,32 +815,21 @@ declare const useTheme: () => {
869
815
  }>;
870
816
  switch?: Partial<{
871
817
  checkedTrackBackgroundColor: string;
872
- checkedTrackBackgroundColorOnDark: string;
873
818
  checkedThumbBackgroundColor: string;
874
- checkedThumbBackgroundColorOnDark: string;
875
819
  uncheckedTrackBackgroundColor: string;
876
- uncheckedTrackBackgroundColorOnDark: string;
877
820
  uncheckedThumbBackgroundColor: string;
878
- uncheckedThumbBackgroundColorOnDark: string;
879
821
  disabledCheckedTrackBackgroundColor: string;
880
- disabledCheckedTrackBackgroundColorOnDark: string;
881
822
  disabledCheckedThumbBackgroundColor: string;
882
- disabledCheckedThumbBackgroundColorOnDark: string;
883
823
  disabledUncheckedTrackBackgroundColor: string;
884
- disabledUncheckedTrackBackgroundColorOnDark: string;
885
824
  disabledUncheckedThumbBackgroundColor: string;
886
- disabledUncheckedThumbBackgroundColorOnDark: string;
887
825
  disabledLabelFontColor: string;
888
- disabledLabelFontColorOnDark: string;
889
826
  disabledLabelFontStyle: string;
890
827
  labelFontFamily: string;
891
828
  labelFontSize: string;
892
829
  labelFontStyle: string;
893
830
  labelFontWeight: string;
894
831
  labelFontColor: string;
895
- labelFontColorOnDark: string;
896
832
  thumbFocusColor: string;
897
- thumbFocusColorOnDark: string;
898
833
  thumbHeight: string;
899
834
  thumbWidth: string;
900
835
  thumbShift: string;
@@ -917,8 +852,16 @@ declare const useTheme: () => {
917
852
  dataPaddingBottom: string;
918
853
  dataPaddingRight: string;
919
854
  dataPaddingLeft: string;
855
+ dataPaddingTopReduced: string;
856
+ dataPaddingBottomReduced: string;
857
+ dataPaddingRightReduced: string;
858
+ dataPaddingLeftReduced: string;
920
859
  dataTextAlign: string;
921
860
  dataTextLineHeight: string;
861
+ firstChildPaddingLeft: string;
862
+ lastChildPaddingRight: string;
863
+ firstChildPaddingLeftReduced: string;
864
+ lastChildPaddingRightReduced: string;
922
865
  headerBackgroundColor: string;
923
866
  headerBorderRadius: string;
924
867
  headerFontFamily: string;
@@ -931,11 +874,25 @@ declare const useTheme: () => {
931
874
  headerPaddingBottom: string;
932
875
  headerPaddingRight: string;
933
876
  headerPaddingLeft: string;
877
+ headerPaddingTopReduced: string;
878
+ headerPaddingBottomReduced: string;
879
+ headerPaddingRightReduced: string;
880
+ headerPaddingLeftReduced: string;
934
881
  headerTextAlign: string;
935
882
  headerTextLineHeight: string;
936
883
  scrollBarThumbColor: string;
937
884
  scrollBarTrackColor: string;
938
885
  sortIconColor: string;
886
+ actionIconColor: string;
887
+ disabledActionIconColor: string;
888
+ hoverActionIconColor: string;
889
+ focusActionIconColor: string;
890
+ activeActionIconColor: string;
891
+ actionBackgroundColor: string;
892
+ disabledActionBackgroundColor: string;
893
+ hoverActionBackgroundColor: string;
894
+ focusActionBorderColor: string;
895
+ activeActionBackgroundColor: string;
939
896
  }>;
940
897
  tabs?: Partial<{
941
898
  fontFamily: string;
@@ -954,7 +911,6 @@ declare const useTheme: () => {
954
911
  disabledFontColor: string;
955
912
  disabledIconColor: string;
956
913
  disabledFontStyle: string;
957
- disabledBadgeBackgroundColor: string;
958
914
  hoverBackgroundColor: string;
959
915
  pressedBackgroundColor: string;
960
916
  pressedFontWeight: string;
@@ -962,19 +918,6 @@ declare const useTheme: () => {
962
918
  dividerThickness: string;
963
919
  focusOutline: string;
964
920
  scrollButtonsWidth: string;
965
- badgeBackgroundColor: string;
966
- badgeFontFamily: string;
967
- badgeFontSize: string;
968
- badgeFontStyle: string;
969
- badgeFontWeight: string;
970
- badgeFontColor: string;
971
- badgeLetterSpacing: string;
972
- badgeWidth: string;
973
- badgeHeight: string;
974
- badgeRadius: string;
975
- badgeWidthWithNotificationNumber: string;
976
- badgeHeightWithNotificationNumber: string;
977
- badgeRadiusWithNotificationNumber: string;
978
921
  }>;
979
922
  tag?: Partial<{
980
923
  fontFamily: string;
@@ -996,134 +939,87 @@ declare const useTheme: () => {
996
939
  textarea?: Partial<{
997
940
  fontFamily: string;
998
941
  enabledBorderColor: string;
999
- enabledBorderColorOnDark: string;
1000
942
  hoverBorderColor: string;
1001
- hoverBorderColorOnDark: string;
1002
943
  focusBorderColor: string;
1003
- focusBorderColorOnDark: string;
1004
944
  disabledBorderColor: string;
1005
- disabledBorderColorOnDark: string;
1006
945
  disabledContainerFillColor: string;
1007
- disabledContainerFillColorOnDark: string;
1008
946
  readOnlyBorderColor: string;
1009
947
  hoverReadOnlyBorderColor: string;
1010
948
  errorBorderColor: string;
1011
- errorBorderColorOnDark: string;
1012
949
  hoverErrorBorderColor: string;
1013
- hoverErrorBorderColorOnDark: string;
1014
950
  inputMarginTop: string;
1015
951
  inputMarginBottom: string;
1016
952
  errorMessageColor: string;
1017
- errorMessageColorOnDark: string;
1018
953
  labelFontColor: string;
1019
- labelFontColorOnDark: string;
1020
954
  labelFontSize: string;
1021
955
  labelFontStyle: string;
1022
956
  labelFontWeight: string;
1023
957
  labelLineHeight: string;
1024
958
  disabledLabelFontColor: string;
1025
- disabledLabelFontColorOnDark: string;
1026
959
  optionalLabelFontWeight: string;
1027
960
  helperTextFontColor: string;
1028
- helperTextFontColorOnDark: string;
1029
961
  helperTextFontSize: string;
1030
962
  helperTextFontStyle: string;
1031
963
  helperTextFontWeight: string;
1032
964
  helperTextLineHeight: string;
1033
965
  disabledHelperTextFontColor: string;
1034
- disabledHelperTextFontColorOnDark: string;
1035
966
  placeholderFontColor: string;
1036
- placeholderFontColorOnDark: string;
1037
967
  disabledPlaceholderFontColor: string;
1038
- disabledPlaceholderFontColorOnDark: string;
1039
968
  valueFontColor: string;
1040
- valueFontColorOnDark: string;
1041
969
  valueFontSize: string;
1042
970
  valueFontStyle: string;
1043
971
  valueFontWeight: string;
1044
972
  disabledValueFontColor: string;
1045
- disabledValueFontColorOnDark: string;
1046
973
  }>;
1047
974
  textInput?: Partial<{
1048
975
  fontFamily: string;
1049
976
  enabledBorderColor: string;
1050
- enabledBorderColorOnDark: string;
1051
977
  hoverBorderColor: string;
1052
- hoverBorderColorOnDark: string;
1053
978
  focusBorderColor: string;
1054
- focusBorderColorOnDark: string;
1055
979
  disabledBorderColor: string;
1056
- disabledBorderColorOnDark: string;
1057
980
  disabledContainerFillColor: string;
1058
- disabledContainerFillColorOnDark: string;
1059
981
  readOnlyBorderColor: string;
1060
982
  hoverReadOnlyBorderColor: string;
1061
983
  errorBorderColor: string;
1062
- errorBorderColorOnDark: string;
1063
984
  hoverErrorBorderColor: string;
1064
- hoverErrorBorderColorOnDark: string;
1065
985
  inputMarginTop: string;
1066
986
  inputMarginBottom: string;
1067
987
  errorMessageColor: string;
1068
- errorMessageColorOnDark: string;
1069
988
  errorIconColor: string;
1070
- errorIconColorOnDark: string;
1071
989
  labelFontColor: string;
1072
- labelFontColorOnDark: string;
1073
990
  labelFontSize: string;
1074
991
  labelFontStyle: string;
1075
992
  labelFontWeight: string;
1076
993
  labelLineHeight: string;
1077
994
  disabledLabelFontColor: string;
1078
- disabledLabelFontColorOnDark: string;
1079
995
  optionalLabelFontWeight: string;
1080
996
  helperTextFontColor: string;
1081
- helperTextFontColorOnDark: string;
1082
997
  helperTextFontSize: string;
1083
998
  helperTextFontStyle: string;
1084
999
  helperTextFontWeight: string;
1085
1000
  helperTextLineHeight: string;
1086
1001
  disabledHelperTextFontColor: string;
1087
- disabledHelperTextFontColorOnDark: string;
1088
1002
  prefixColor: string;
1089
- prefixColorOnDark: string;
1090
1003
  suffixColor: string;
1091
- suffixColorOnDark: string;
1092
1004
  disabledPrefixColor: string;
1093
1005
  disabledSuffixColor: string;
1094
- disabledPrefixColorOnDark: string;
1095
- disabledSuffixColorOnDark: string;
1096
1006
  placeholderFontColor: string;
1097
- placeholderFontColorOnDark: string;
1098
1007
  disabledPlaceholderFontColor: string;
1099
- disabledPlaceholderFontColorOnDark: string;
1100
1008
  valueFontColor: string;
1101
- valueFontColorOnDark: string;
1102
1009
  valueFontSize: string;
1103
1010
  valueFontStyle: string;
1104
1011
  valueFontWeight: string;
1105
1012
  disabledValueFontColor: string;
1106
- disabledValueFontColorOnDark: string;
1107
1013
  actionIconColor: string;
1108
- actionIconColorOnDark: string;
1109
1014
  disabledActionIconColor: string;
1110
- disabledActionIconColorOnDark: string;
1111
1015
  hoverActionIconColor: string;
1112
- hoverActionIconColorOnDark: string;
1113
1016
  focusActionIconColor: string;
1114
- focusActionIconColorOnDark: string;
1115
1017
  activeActionIconColor: string;
1116
- activeActionIconColorOnDark: string;
1117
1018
  actionBackgroundColor: string;
1118
- actionBackgroundColorOnDark: string;
1119
1019
  disabledActionBackgroundColor: string;
1120
- disabledActionBackgroundColorOnDark: string;
1121
1020
  hoverActionBackgroundColor: string;
1122
- hoverActionBackgroundColorOnDark: string;
1123
1021
  focusActionBorderColor: string;
1124
- focusActionBorderColorOnDark: string;
1125
1022
  activeActionBackgroundColor: string;
1126
- activeActionBackgroundColorOnDark: string;
1127
1023
  listDialogBackgroundColor: string;
1128
1024
  listDialogBorderColor: string;
1129
1025
  listOptionDividerColor: string;
@@ -28,7 +28,7 @@ var getFocusableElements = function getFocusableElements(container) {
28
28
  * @param element: HTMLElement
29
29
  * @returns
30
30
  */
31
- var attempFocus = function attempFocus(element) {
31
+ var attemptFocus = function attemptFocus(element) {
32
32
  element === null || element === void 0 ? void 0 : element.focus();
33
33
  return document.activeElement === element;
34
34
  };
@@ -39,8 +39,11 @@ var attempFocus = function attempFocus(element) {
39
39
  */
40
40
  var radixPortalContains = function radixPortalContains(activeElement) {
41
41
  var radixPortals = document.querySelectorAll("[data-radix-portal]");
42
+ var radixPoppers = document.querySelectorAll("[data-radix-popper-content-wrapper]");
42
43
  return Array.prototype.slice.call(radixPortals).some(function (portal) {
43
44
  return portal.contains(activeElement);
45
+ }) || Array.prototype.slice.call(radixPoppers).some(function (popper) {
46
+ return popper.contains(activeElement);
44
47
  });
45
48
  };
46
49
 
@@ -87,13 +90,17 @@ var FocusLock = function FocusLock(_ref) {
87
90
  var focusableElements = useFocusableElements(childrenContainerRef);
88
91
  var focusFirst = (0, _react.useCallback)(function () {
89
92
  var _childrenContainerRef;
90
- if ((focusableElements === null || focusableElements === void 0 ? void 0 : focusableElements.length) === 0) (_childrenContainerRef = childrenContainerRef.current) === null || _childrenContainerRef === void 0 ? void 0 : _childrenContainerRef.focus();else if ((focusableElements === null || focusableElements === void 0 ? void 0 : focusableElements.length) > 0) for (var i = 0; i < focusableElements.length; i++) if (attempFocus(focusableElements[i])) return;
93
+ if ((focusableElements === null || focusableElements === void 0 ? void 0 : focusableElements.length) === 0) (_childrenContainerRef = childrenContainerRef.current) === null || _childrenContainerRef === void 0 ? void 0 : _childrenContainerRef.focus();else if ((focusableElements === null || focusableElements === void 0 ? void 0 : focusableElements.length) > 0) focusableElements.some(function (element) {
94
+ return attemptFocus(element);
95
+ });
91
96
  }, [focusableElements]);
92
97
  var focusLast = function focusLast() {
93
- for (var i = focusableElements.length - 1; i >= 0; i--) if (attempFocus(focusableElements[i])) return;
98
+ focusableElements.reverse().some(function (element) {
99
+ return attemptFocus(element);
100
+ });
94
101
  };
95
102
  var focusLock = function focusLock(event) {
96
- if (event.key === "Tab") focusableElements.length === 0 && event.preventDefault();else if (event.key === "Tab" && event.key === "Shift") focusableElements.length === 0 && event.preventDefault();
103
+ if (event.key === "Tab") focusableElements.length === 0 && event.preventDefault();
97
104
  };
98
105
  (0, _react.useEffect)(function () {
99
106
  var _childrenContainerRef2;
@@ -105,7 +112,10 @@ var FocusLock = function FocusLock(_ref) {
105
112
  }), /*#__PURE__*/_react["default"].createElement("div", {
106
113
  onKeyDown: focusLock,
107
114
  ref: childrenContainerRef,
108
- tabIndex: (focusableElements === null || focusableElements === void 0 ? void 0 : focusableElements.length) === 0 ? 0 : -1
115
+ tabIndex: (focusableElements === null || focusableElements === void 0 ? void 0 : focusableElements.length) === 0 ? 0 : -1,
116
+ style: {
117
+ outline: "none"
118
+ }
109
119
  }, children), /*#__PURE__*/_react["default"].createElement("div", {
110
120
  onFocus: focusFirst,
111
121
  tabIndex: 0
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
5
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
6
+ var _react = _interopRequireDefault(require("react"));
7
+ var _react2 = require("@testing-library/react");
8
+ var _jestAxe = require("jest-axe");
9
+ var _Wizard = _interopRequireDefault(require("./Wizard.tsx"));
10
+ var favoriteSVG = /*#__PURE__*/_react["default"].createElement("svg", {
11
+ viewBox: "0 0 24 24",
12
+ fill: "currentColor"
13
+ }, /*#__PURE__*/_react["default"].createElement("path", {
14
+ d: "M0 0h24v24H0z",
15
+ fill: "none"
16
+ }), /*#__PURE__*/_react["default"].createElement("path", {
17
+ d: "M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"
18
+ }));
19
+ describe("Wizard component accessibility tests", function () {
20
+ it("Should not have basic accessibility issues", /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
21
+ var _render, container, results;
22
+ return _regenerator["default"].wrap(function _callee$(_context) {
23
+ while (1) switch (_context.prev = _context.next) {
24
+ case 0:
25
+ _render = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Wizard["default"], {
26
+ steps: [{
27
+ label: "first-step",
28
+ description: "Description",
29
+ icon: favoriteSVG
30
+ }, {
31
+ label: "second-step",
32
+ description: "Description"
33
+ }, {
34
+ label: "valid-step",
35
+ valid: true
36
+ }, {
37
+ label: "disabled-step",
38
+ disabled: true
39
+ }],
40
+ mode: "vertical",
41
+ defaultCurrentStep: 1,
42
+ margin: "medium"
43
+ })), container = _render.container;
44
+ _context.next = 3;
45
+ return (0, _jestAxe.axe)(container);
46
+ case 3:
47
+ results = _context.sent;
48
+ expect(results).toHaveNoViolations();
49
+ case 5:
50
+ case "end":
51
+ return _context.stop();
52
+ }
53
+ }, _callee);
54
+ })));
55
+ });
package/wizard/types.d.ts CHANGED
@@ -31,7 +31,7 @@ export type StepProps = {
31
31
  };
32
32
  type Props = {
33
33
  /**
34
- * The wizard can be showed in horizontal or vertical.
34
+ * The wizard can be shown in horizontal or vertical.
35
35
  */
36
36
  mode?: "horizontal" | "vertical";
37
37
  /**
@@ -1,69 +0,0 @@
1
- @font-face {
2
- font-family: "Open Sans";
3
- src: url("./fonts/OpenSans-Light.ttf") format("truetype");
4
- font-style: normal;
5
- font-weight: 200;
6
- }
7
-
8
- @font-face {
9
- font-family: "Open Sans";
10
- src: url("./fonts/OpenSans-Regular.ttf") format("truetype");
11
- font-style: normal;
12
- font-weight: 400;
13
- }
14
-
15
- @font-face {
16
- font-family: "Open Sans";
17
- src: url("./fonts/OpenSans-SemiBold.ttf") format("truetype");
18
- font-style: normal;
19
- font-weight: 600;
20
- }
21
-
22
- @font-face {
23
- font-family: "Open Sans";
24
- src: url("./fonts/OpenSans-Bold.ttf") format("truetype");
25
- font-style: normal;
26
- font-weight: 700;
27
- }
28
-
29
- @font-face {
30
- font-family: "Open Sans";
31
- src: url("./fonts/OpenSans-ExtraBold.ttf") format("truetype");
32
- font-style: normal;
33
- font-weight: 800;
34
- }
35
-
36
- @font-face {
37
- font-family: "Open Sans";
38
- src: url("./fonts/OpenSans-LightItalic.ttf") format("truetype");
39
- font-style: italic;
40
- font-weight: 200;
41
- }
42
-
43
- @font-face {
44
- font-family: "Open Sans";
45
- src: url("./fonts/OpenSans-Italic.ttf") format("truetype");
46
- font-style: italic;
47
- font-weight: 400;
48
- }
49
-
50
- @font-face {
51
- font-family: "Open Sans";
52
- src: url("./fonts/OpenSans-SemiBoldItalic.ttf") format("truetype");
53
- font-style: italic;
54
- font-weight: 600;
55
- }
56
-
57
- @font-face {
58
- font-family: "Open Sans";
59
- src: url("./fonts/OpenSans-BoldItalic.ttf") format("truetype");
60
- font-style: italic;
61
- font-weight: 700;
62
- }
63
-
64
- @font-face {
65
- font-family: "Open Sans";
66
- src: url("./fonts/OpenSans-ExtraBoldItalic.ttf") format("truetype");
67
- font-style: italic;
68
- font-weight: 800;
69
- }
Binary file
Binary file
Binary file
Binary file