@innovaccer/design-system 2.5.0-4 → 2.6.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 (264) hide show
  1. package/.all-contributorsrc +1 -1
  2. package/.eslintrc.json +53 -0
  3. package/.github/workflows/jira.yml +1 -2
  4. package/.github/workflows/main.yml +2 -2
  5. package/.github/workflows/pull_request.yml +1 -1
  6. package/.github/workflows/test.yml +1 -1
  7. package/.husky/commit-msg +4 -0
  8. package/.prettierrc +2 -2
  9. package/CHANGELOG.md +38 -88
  10. package/CONTRIBUTING.md +173 -97
  11. package/README.md +1 -1
  12. package/commitlint.config.js +1 -0
  13. package/core/accessibility/utils/index.ts +5 -0
  14. package/core/accessibility/utils/isEnterKey.ts +5 -0
  15. package/core/accessibility/utils/isSpaceKey.ts +5 -0
  16. package/core/accessibility/utils/useAccessibilityProps.ts +31 -0
  17. package/core/components/atoms/_chip/__tests__/__snapshots__/_chip.test.tsx.snap +8 -0
  18. package/core/components/atoms/_chip/index.tsx +2 -0
  19. package/core/components/atoms/button/__stories__/Alert.story.tsx +8 -1
  20. package/core/components/atoms/button/__stories__/Cancel.story.tsx +4 -1
  21. package/core/components/atoms/button/__stories__/IconButtonGroup.story.tsx +12 -3
  22. package/core/components/atoms/button/__stories__/IconButtonSecondary.story.tsx +6 -1
  23. package/core/components/atoms/button/__stories__/IconLeftSecondary.story.tsx +4 -1
  24. package/core/components/atoms/button/__stories__/IconRightSecondary.story.tsx +4 -1
  25. package/core/components/atoms/button/__stories__/IconTransparent.story.tsx +4 -1
  26. package/core/components/atoms/button/__stories__/LabelButtonGroup.story.tsx +14 -3
  27. package/core/components/atoms/button/__stories__/LargeIconExpanded.story.tsx +4 -1
  28. package/core/components/atoms/button/__stories__/LoadingPrimary.story.tsx +4 -1
  29. package/core/components/atoms/button/__stories__/Primary.story.tsx +5 -2
  30. package/core/components/atoms/button/__stories__/SplitButton.story.tsx +6 -1
  31. package/core/components/atoms/button/__stories__/Transparent.story.tsx +8 -1
  32. package/core/components/atoms/button/__stories__/index.story.tsx +11 -1
  33. package/core/components/atoms/button/__stories__/variants/Appearance.story.tsx +4 -0
  34. package/core/components/atoms/button/__stories__/variants/Expanded.story.tsx +4 -0
  35. package/core/components/atoms/button/__stories__/variants/Size.story.tsx +4 -0
  36. package/core/components/atoms/button/__stories__/variants/icon/Icon.story.tsx +15 -0
  37. package/core/components/atoms/button/__stories__/variants/icon/IconLeft.story.tsx +4 -0
  38. package/core/components/atoms/button/__stories__/variants/icon/IconRight.story.tsx +4 -0
  39. package/core/components/atoms/button/__stories__/variants/state/Alert.story.tsx +7 -17
  40. package/core/components/atoms/button/__stories__/variants/state/Basic.story.tsx +9 -17
  41. package/core/components/atoms/button/__stories__/variants/state/Primary.story.tsx +7 -17
  42. package/core/components/atoms/button/__stories__/variants/state/Success.story.tsx +7 -17
  43. package/core/components/atoms/button/__stories__/variants/state/Transparent.story.tsx +13 -17
  44. package/core/components/atoms/chipGroup/__tests__/__snapshots__/chipGroup.test.tsx.snap +6 -0
  45. package/core/components/atoms/collapsible/__stories__/index.story.tsx +2 -2
  46. package/core/components/atoms/collapsible/__tests__/__snapshots__/Collapsible.test.tsx.snap +8 -0
  47. package/core/components/atoms/divider/Divider.tsx +44 -0
  48. package/core/components/atoms/divider/__stories__/BasicDividerInCard.story.tsx +74 -0
  49. package/core/components/atoms/divider/__stories__/HeaderDividerInCard.story.tsx +35 -0
  50. package/core/components/atoms/divider/__stories__/IndentedDivider.story.tsx +49 -0
  51. package/core/components/atoms/divider/__stories__/Vertical.story.tsx +51 -0
  52. package/core/components/atoms/divider/__stories__/index.story.tsx +91 -0
  53. package/core/components/atoms/divider/__stories__/variants/HorizontalDivider.story.tsx +27 -0
  54. package/core/components/atoms/divider/__tests__/Divider.test.tsx +50 -0
  55. package/core/components/atoms/divider/__tests__/__snapshots__/Divider.test.tsx.snap +53 -0
  56. package/core/components/atoms/divider/index.tsx +2 -0
  57. package/core/components/atoms/dropdown/DropdownList.tsx +8 -2
  58. package/core/components/atoms/dropdown/__stories__/variants/controlledDropdown/MultiSelect.story.tsx +27 -17
  59. package/core/components/atoms/dropdown/option/DefaultOption.tsx +3 -0
  60. package/core/components/atoms/dropdown/option/IconOption.tsx +3 -0
  61. package/core/components/atoms/dropdown/option/IconWithMetaOption.tsx +3 -0
  62. package/core/components/atoms/dropdown/option/MetaOption.tsx +3 -0
  63. package/core/components/atoms/editable/Editable.tsx +3 -0
  64. package/core/components/atoms/icon/Icon.tsx +14 -3
  65. package/core/components/atoms/icon/__stories__/variants/Image.story.tsx +6 -1
  66. package/core/components/atoms/icon/__tests__/__snapshots__/Icon.test.tsx.snap +74 -0
  67. package/core/components/atoms/input/Input.tsx +14 -4
  68. package/core/components/atoms/input/__stories__/BasicInput.story.tsx +2 -1
  69. package/core/components/atoms/input/__stories__/InputWithCaption.story.tsx +29 -9
  70. package/core/components/atoms/input/__stories__/InputWithLabel.story.tsx +11 -3
  71. package/core/components/atoms/input/__stories__/LabelPosition.story.tsx +8 -4
  72. package/core/components/atoms/input/__stories__/RequiredVsOptional.story.tsx +12 -8
  73. package/core/components/atoms/input/__tests__/__snapshots__/Input.test.tsx.snap +19 -0
  74. package/core/components/atoms/legend/Legend.tsx +3 -0
  75. package/core/components/atoms/message/__stories__/CustomDescription.tsx +25 -0
  76. package/core/components/atoms/metricInput/MetricInput.tsx +12 -2
  77. package/core/components/atoms/metricInput/__stories__/DefaultMetric.story.tsx +8 -2
  78. package/core/components/atoms/metricInput/__stories__/WithPrefix.story.tsx +6 -2
  79. package/core/components/atoms/metricInput/__stories__/index.story.tsx +1 -0
  80. package/core/components/atoms/metricInput/__stories__/variants/Controlled.story.tsx +2 -0
  81. package/core/components/atoms/metricInput/__stories__/variants/Size.story.tsx +2 -2
  82. package/core/components/atoms/metricInput/__stories__/withSuffix.story.tsx +6 -2
  83. package/core/components/atoms/metricInput/__tests__/__snapshots__/MetricInput.test.tsx.snap +20 -4
  84. package/core/components/atoms/multiSlider/Handle.tsx +3 -0
  85. package/core/components/atoms/multiSlider/index.tsx +6 -0
  86. package/core/components/atoms/outsideClick/__stories__/index.story.tsx +1 -1
  87. package/core/components/atoms/statusHint/StatusHint.tsx +3 -0
  88. package/core/components/atoms/switchInput/Switch.tsx +10 -4
  89. package/core/components/atoms/switchInput/__stories__/DefaultSwitch.story.tsx +4 -1
  90. package/core/components/atoms/switchInput/__stories__/OffState.story.tsx +4 -1
  91. package/core/components/atoms/switchInput/__stories__/index.story.tsx +26 -3
  92. package/core/components/atoms/switchInput/__stories__/variants/Size.story.tsx +10 -1
  93. package/core/components/atoms/switchInput/__stories__/variants/State.story.tsx +9 -2
  94. package/core/components/atoms/textarea/__stories__/TextareaWithCaption.story.tsx +9 -3
  95. package/core/components/atoms/textarea/__stories__/defaultTextarea.story.tsx +10 -2
  96. package/core/components/atoms/textarea/__stories__/index.story.tsx +1 -0
  97. package/core/components/atoms/textarea/__stories__/variants/Disable.story.tsx +1 -0
  98. package/core/components/atoms/toast/__tests__/__snapshots__/Toast.test.tsx.snap +30 -0
  99. package/core/components/css-utilities/Align/Align.story.tsx +1 -1
  100. package/core/components/css-utilities/Background/Background.story.tsx +1 -1
  101. package/core/components/css-utilities/Border/Border.story.tsx +1 -1
  102. package/core/components/css-utilities/Display/Display.story.tsx +1 -1
  103. package/core/components/css-utilities/Flex/Flex.story.tsx +1 -1
  104. package/core/components/css-utilities/Miscellaneous/Miscellaneous.story.tsx +1 -1
  105. package/core/components/css-utilities/Overflow/Overflow.story.tsx +1 -1
  106. package/core/components/css-utilities/Position/Position.story.tsx +1 -1
  107. package/core/components/css-utilities/Sizing/Sizing.story.tsx +1 -1
  108. package/core/components/css-utilities/Spacing/Spacing.story.tsx +1 -1
  109. package/core/components/molecules/chatMessage/Box.tsx +3 -0
  110. package/core/components/molecules/chipInput/ChipInput.tsx +3 -0
  111. package/core/components/molecules/chipInput/__tests__/__snapshots__/ChipInput.test.tsx.snap +12 -0
  112. package/core/components/molecules/dropzone/Dropzone.tsx +3 -0
  113. package/core/components/molecules/dropzone/FileSelectorUtils.tsx +1 -1
  114. package/core/components/molecules/editableChipInput/EditableChipInput.tsx +9 -5
  115. package/core/components/molecules/editableChipInput/__stories__/Uncontrolled.story.tsx +1 -1
  116. package/core/components/molecules/editableChipInput/__tests__/__snapshots__/EditableChipInput.test.tsx.snap +8 -0
  117. package/core/components/molecules/editableDropdown/EditableDropdown.tsx +2 -2
  118. package/core/components/molecules/editableInput/EditableInput.tsx +13 -4
  119. package/core/components/molecules/emptyState/EmptyState.tsx +5 -1
  120. package/core/components/molecules/fileList/FileListItem.tsx +2 -0
  121. package/core/components/molecules/fileUploader/FileUploaderItem.tsx +2 -0
  122. package/core/components/molecules/fileUploader/__stories__/index.story.tsx +156 -21
  123. package/core/components/molecules/inputMask/InputMask.tsx +1 -1
  124. package/core/components/molecules/inputMask/__tests__/__snapshots__/InputMask.test.tsx.snap +1 -0
  125. package/core/components/molecules/pagination/__tests__/__snapshots__/Pagination.test.tsx.snap +5 -1
  126. package/core/components/molecules/stepper/Step.tsx +2 -0
  127. package/core/components/molecules/tabs/Tabs.tsx +2 -0
  128. package/core/components/molecules/tabs/TabsWrapper.tsx +2 -0
  129. package/core/components/molecules/tabs/__stories__/CustomLabels.story.tsx +1 -1
  130. package/core/components/molecules/verificationCodeInput/VerificationCodeInput.tsx +8 -4
  131. package/core/components/molecules/verificationCodeInput/__stories__/index.story.tsx +3 -1
  132. package/core/components/molecules/verificationCodeInput/__tests__/__snapshots__/VerificationCodeInput.test.tsx.snap +1 -0
  133. package/core/components/organisms/calendar/Calendar.tsx +130 -8
  134. package/core/components/organisms/calendar/__tests__/Calendar.test.tsx +27 -0
  135. package/core/components/organisms/choiceList/ChoiceList.tsx +1 -1
  136. package/core/components/organisms/datePicker/DatePicker.tsx +30 -15
  137. package/core/components/organisms/datePicker/__tests__/DatePicker.test.tsx +136 -46
  138. package/core/components/organisms/datePicker/__tests__/__snapshots__/DatePicker.test.tsx.snap +4388 -1857
  139. package/core/components/organisms/dateRangePicker/__tests__/__snapshots__/DateRangePicker.test.tsx.snap +112 -40
  140. package/core/components/organisms/grid/Cell.tsx +4 -0
  141. package/core/components/organisms/grid/GridRow.tsx +4 -0
  142. package/core/components/organisms/grid/__stories__/_common_/fetchData.ts +2 -2
  143. package/core/components/organisms/horizontalNav/HorizontalNav.tsx +2 -0
  144. package/core/components/organisms/inlineMessage/InlineMessage.tsx +3 -5
  145. package/core/components/organisms/inlineMessage/__tests__/__snapshots__/InlineMessage.test.tsx.snap +30 -40
  146. package/core/components/organisms/navigation/VerticalNavigation.tsx +4 -0
  147. package/core/components/organisms/table/Table.tsx +1 -0
  148. package/core/components/organisms/table/__stories__/NestedTableWithNestedCard.story.tsx +4 -1
  149. package/core/components/organisms/table/__stories__/ResourceTable.story.tsx +3 -2
  150. package/core/components/organisms/table/__stories__/Selection.story.tsx +2 -2
  151. package/core/components/organisms/table/__stories__/TableAsDescriptionList.story.tsx +1 -1
  152. package/core/components/organisms/table/__stories__/TableAsOptionList.story.tsx +1 -1
  153. package/core/components/organisms/table/__stories__/syncTable.story.tsx +14 -6
  154. package/core/components/organisms/table/__stories__/variants/nestedRows.story.tsx +5 -2
  155. package/core/components/organisms/table/__stories__/variants/withHeader.story.tsx +0 -2
  156. package/core/components/organisms/timePicker/TimePicker.tsx +1 -1
  157. package/core/components/organisms/timePicker/__tests__/__snapshots__/TimePicker.test.tsx.snap +14 -2
  158. package/core/components/organisms/verticalNav/MenuItem.tsx +2 -0
  159. package/core/components/patterns/datePicker/datePickerWithPresets.story.tsx +126 -0
  160. package/core/components/patterns/dateRangePicker/withCustomPopover.story.tsx +8 -8
  161. package/core/components/patterns/forms/CreatePassword.story.tsx +1 -1
  162. package/core/components/patterns/forms/VerificationCodeInput.story.tsx +2 -2
  163. package/core/components/patterns/table/Table with Header/tableWithHeader.story.jsx +7 -7
  164. package/core/index.tsx +1 -0
  165. package/core/index.type.tsx +1 -0
  166. package/core/utils/Keys.ts +4 -0
  167. package/core/utils/__tests__/__snapshots__/TS.test.tsx.snap +544 -536
  168. package/core/utils/docPage/index.tsx +22 -17
  169. package/core/utils/testHelper.ts +1 -1
  170. package/core/utils/validators.ts +37 -34
  171. package/css/dist/index.css +1523 -1402
  172. package/css/dist/index.css.map +1 -1
  173. package/css/src/components/Legend.css +7 -7
  174. package/css/src/components/ProgressBar.css +1 -1
  175. package/css/src/components/avatarGroup.css +1 -1
  176. package/css/src/components/backdrop.css +12 -6
  177. package/css/src/components/badge.css +52 -52
  178. package/css/src/components/button.css +99 -94
  179. package/css/src/components/calendar.css +137 -126
  180. package/css/src/components/card.css +0 -1
  181. package/css/src/components/cardSubdued.css +3 -5
  182. package/css/src/components/chat.css +1 -1
  183. package/css/src/components/checkbox.css +71 -70
  184. package/css/src/components/chip.css +14 -13
  185. package/css/src/components/chipGroup.css +5 -5
  186. package/css/src/components/chipInput.css +1 -1
  187. package/css/src/components/choiceList.css +4 -4
  188. package/css/src/components/dateRangePicker.css +13 -13
  189. package/css/src/components/divider.css +20 -0
  190. package/css/src/components/dropdown.css +61 -61
  191. package/css/src/components/dropdownButton.css +36 -36
  192. package/css/src/components/dropzone.css +16 -20
  193. package/css/src/components/editableChipInput.css +10 -9
  194. package/css/src/components/editableDropdown.css +1 -1
  195. package/css/src/components/editableInput.css +1 -1
  196. package/css/src/components/emptyState.css +15 -15
  197. package/css/src/components/fileList.css +44 -45
  198. package/css/src/components/grid.css +217 -199
  199. package/css/src/components/horizontalNav.css +0 -1
  200. package/css/src/components/icon.css +1 -7
  201. package/css/src/components/inlineMessage.css +2 -1
  202. package/css/src/components/input.css +62 -62
  203. package/css/src/components/link.css +1 -1
  204. package/css/src/components/list.css +10 -10
  205. package/css/src/components/message.css +69 -70
  206. package/css/src/components/metaList.css +26 -26
  207. package/css/src/components/metricInput.css +3 -4
  208. package/css/src/components/modal.css +1 -1
  209. package/css/src/components/navigation.css +3 -3
  210. package/css/src/components/pageHeader.css +1 -2
  211. package/css/src/components/pagination.css +36 -36
  212. package/css/src/components/pills.css +19 -19
  213. package/css/src/components/placeholder.css +10 -5
  214. package/css/src/components/popover.css +2 -2
  215. package/css/src/components/progressRing.css +1 -1
  216. package/css/src/components/radio.css +74 -74
  217. package/css/src/components/slider.css +5 -5
  218. package/css/src/components/statusHints.css +15 -15
  219. package/css/src/components/switch.css +45 -41
  220. package/css/src/components/table.css +15 -15
  221. package/css/src/components/tabs.css +53 -53
  222. package/css/src/components/textarea.css +1 -1
  223. package/css/src/components/toast.css +53 -53
  224. package/css/src/components/verificationCodeInput.css +5 -6
  225. package/css/src/components/verticalNav.css +1 -2
  226. package/css/src/core/base.css +3 -0
  227. package/css/src/core/typography.css +1 -1
  228. package/css/src/core/utilities.css +1 -1
  229. package/css/src/tokens/index.css +63 -63
  230. package/css/src/utils/align.css +1 -1
  231. package/css/src/utils/background.css +1 -1
  232. package/css/src/utils/cursor.css +1 -1
  233. package/css/src/utils/display.css +1 -1
  234. package/css/src/utils/flex.css +1 -1
  235. package/css/src/utils/grid.css +1 -1
  236. package/css/src/utils/overflow.css +1 -1
  237. package/css/src/utils/position.css +1 -1
  238. package/css/src/utils/spacing.css +1 -1
  239. package/css/src/utils/utility.css +13 -13
  240. package/css/src/variables/index.css +1 -1
  241. package/dist/core/accessibility/utils/index.d.ts +4 -0
  242. package/dist/core/accessibility/utils/isEnterKey.d.ts +3 -0
  243. package/dist/core/accessibility/utils/isSpaceKey.d.ts +3 -0
  244. package/dist/core/accessibility/utils/useAccessibilityProps.d.ts +15 -0
  245. package/dist/core/components/atoms/divider/Divider.d.ts +15 -0
  246. package/dist/core/components/atoms/divider/index.d.ts +2 -0
  247. package/dist/core/components/atoms/icon/Icon.d.ts +3 -1
  248. package/dist/core/components/atoms/input/Input.d.ts +1 -1
  249. package/dist/core/components/atoms/popperWrapper/PopperWrapper.d.ts +50 -49
  250. package/dist/core/components/atoms/switchInput/Switch.d.ts +2 -1
  251. package/dist/core/components/organisms/calendar/Calendar.d.ts +31 -0
  252. package/dist/core/components/organisms/datePicker/DatePicker.d.ts +2 -0
  253. package/dist/core/components/patterns/datePicker/datePickerWithPresets.story.d.ts +15 -0
  254. package/dist/core/index.d.ts +1 -0
  255. package/dist/core/index.type.d.ts +1 -0
  256. package/dist/index.esm.js +829 -495
  257. package/dist/index.js +313 -144
  258. package/dist/index.js.map +1 -1
  259. package/dist/index.umd.js +1 -1
  260. package/dist/index.umd.js.br +0 -0
  261. package/dist/index.umd.js.gz +0 -0
  262. package/package.json +17 -14
  263. package/.husky/prepare-commit-msg +0 -6
  264. package/tslint.json +0 -30
package/dist/index.esm.js CHANGED
@@ -1,8 +1,8 @@
1
1
 
2
2
  /**
3
- * Generated on: 1634409812540
3
+ * Generated on: 1639036105831
4
4
  * Package: @innovaccer/design-system
5
- * Version: v2.5.0-4
5
+ * Version: v2.6.0
6
6
  * License: MIT
7
7
  * Docs: https://innovaccer.github.io/design-system
8
8
  */
@@ -569,46 +569,80 @@ var date$1 = function date(val, format) {
569
569
 
570
570
  switch (format) {
571
571
  case 'dd/mm/yyyy':
572
- var p = val.split('/');
573
- var date = +p[0] || 1;
574
- var month = +p[1] || 1;
575
- var year = +p[2] || 1900;
576
- return validate(date, month, year);
572
+ {
573
+ var p = val.split('/');
574
+
575
+ var _date = +p[0] || 1;
576
+
577
+ var month = +p[1] || 1;
578
+ var year = +p[2] || 1900;
579
+ return validate(_date, month, year);
580
+ }
577
581
 
578
582
  case 'mm/dd/yyyy':
579
- var p = val.split('/');
580
- var date = +p[1] || 1;
581
- var month = +p[0] || 1;
582
- var year = +p[2] || 1900;
583
- return validate(date, month, year);
583
+ {
584
+ var _p = val.split('/');
585
+
586
+ var _date2 = +_p[1] || 1;
587
+
588
+ var _month = +_p[0] || 1;
589
+
590
+ var _year = +_p[2] || 1900;
591
+
592
+ return validate(_date2, _month, _year);
593
+ }
584
594
 
585
595
  case 'yyyy/mm/dd':
586
- var p = val.split('/');
587
- var date = +p[2] || 1;
588
- var month = +p[1] || 1;
589
- var year = +p[0] || 1900;
590
- return validate(date, month, year);
596
+ {
597
+ var _p2 = val.split('/');
598
+
599
+ var _date3 = +_p2[2] || 1;
600
+
601
+ var _month2 = +_p2[1] || 1;
602
+
603
+ var _year2 = +_p2[0] || 1900;
604
+
605
+ return validate(_date3, _month2, _year2);
606
+ }
591
607
 
592
608
  case 'dd-mm-yyyy':
593
- var p = val.split('-');
594
- var date = +p[0] || 1;
595
- var month = +p[1] || 1;
596
- var year = +p[2] || 1900;
597
- return validate(date, month, year);
609
+ {
610
+ var _p3 = val.split('-');
611
+
612
+ var _date4 = +_p3[0] || 1;
613
+
614
+ var _month3 = +_p3[1] || 1;
615
+
616
+ var _year3 = +_p3[2] || 1900;
617
+
618
+ return validate(_date4, _month3, _year3);
619
+ }
598
620
 
599
621
  case 'mm-dd-yyyy':
600
- var p = val.split('-');
601
- var date = +p[1] || 1;
602
- var month = +p[0] || 1;
603
- var year = +p[2] || 1900;
604
- return validate(date, month, year);
622
+ {
623
+ var _p4 = val.split('-');
624
+
625
+ var _date5 = +_p4[1] || 1;
626
+
627
+ var _month4 = +_p4[0] || 1;
628
+
629
+ var _year4 = +_p4[2] || 1900;
630
+
631
+ return validate(_date5, _month4, _year4);
632
+ }
605
633
 
606
634
  case 'yyyy-mm-dd':
607
- var p = val.split('-');
608
- var date = +p[2] || 1;
609
- var month = +p[1] || 1;
610
- var year = +p[0] || 1900;
611
- return validate(date, month, year);
635
+ {
636
+ var _p5 = val.split('-');
637
+
638
+ var _date6 = +_p5[2] || 1;
639
+
640
+ var _month5 = +_p5[1] || 1;
641
+
642
+ var _year5 = +_p5[0] || 1900;
643
+
644
+ return validate(_date6, _month5, _year5);
645
+ }
612
646
 
613
647
  default:
614
648
  return false;
@@ -1308,6 +1342,38 @@ Text.defaultProps = {
1308
1342
  size: 'regular'
1309
1343
  };
1310
1344
 
1345
+ var isEnterKey = function isEnterKey(e) {
1346
+ return e.key === 'Enter';
1347
+ };
1348
+
1349
+ var isSpaceKey = function isSpaceKey(e) {
1350
+ return e.key === 'Space';
1351
+ };
1352
+
1353
+ var useAccessibilityProps = function useAccessibilityProps(_ref) {
1354
+ var onClick = _ref.onClick,
1355
+ _onKeyDown = _ref.onKeyDown,
1356
+ role = _ref.role;
1357
+ return _objectSpread2({}, onClick ? {
1358
+ onClick: onClick,
1359
+ role: role || 'button',
1360
+ tabIndex: 0,
1361
+ onKeyDown: function onKeyDown(e) {
1362
+ if (_onKeyDown) {
1363
+ _onKeyDown(e);
1364
+
1365
+ return;
1366
+ }
1367
+
1368
+ if (isEnterKey(e) && onClick) {
1369
+ onClick(e);
1370
+ }
1371
+ }
1372
+ } : {
1373
+ role: role
1374
+ });
1375
+ };
1376
+
1311
1377
  var Icon = function Icon(props) {
1312
1378
  var _classNames;
1313
1379
 
@@ -1315,8 +1381,8 @@ var Icon = function Icon(props) {
1315
1381
  className = props.className,
1316
1382
  name = props.name,
1317
1383
  size = props.size,
1318
- onClick = props.onClick,
1319
1384
  children = props.children;
1385
+ var accessibilityProps = useAccessibilityProps(props);
1320
1386
  var baseProps = extractBaseProps(props);
1321
1387
 
1322
1388
  var mapper = function mapper(val) {
@@ -1346,10 +1412,10 @@ var Icon = function Icon(props) {
1346
1412
  }
1347
1413
 
1348
1414
  return /*#__PURE__*/React.createElement("i", _extends$3({}, baseProps, {
1415
+ role: "alert",
1349
1416
  className: iconClass,
1350
- style: styles,
1351
- onClick: onClick
1352
- }), type ? "".concat(name, "_").concat(type) : name);
1417
+ style: styles
1418
+ }, accessibilityProps), type ? "".concat(name, "_").concat(type) : name);
1353
1419
  };
1354
1420
  Icon.displayName = 'Icon';
1355
1421
  Icon.defaultProps = {
@@ -1512,18 +1578,24 @@ var DefaultOption = function DefaultOption(props) {
1512
1578
  dataTest = props.dataTest;
1513
1579
  var label = optionData.label,
1514
1580
  disabled = optionData.disabled;
1515
- return /*#__PURE__*/React.createElement("div", {
1516
- className: className,
1517
- onClick: onClickHandler,
1518
- onMouseEnter: onUpdateActiveOption,
1519
- "data-test": dataTest,
1520
- "data-disabled": disabled
1521
- }, /*#__PURE__*/React.createElement("div", {
1522
- className: 'Option-label'
1523
- }, /*#__PURE__*/React.createElement(Text, {
1524
- className: textClassName,
1525
- appearance: appearance
1526
- }, label)));
1581
+ return (
1582
+ /*#__PURE__*/
1583
+ // TODO(a11y): fix accessibility
1584
+
1585
+ /* eslint-disable */
1586
+ React.createElement("div", {
1587
+ className: className,
1588
+ onClick: onClickHandler,
1589
+ onMouseEnter: onUpdateActiveOption,
1590
+ "data-test": dataTest,
1591
+ "data-disabled": disabled
1592
+ }, /*#__PURE__*/React.createElement("div", {
1593
+ className: 'Option-label'
1594
+ }, /*#__PURE__*/React.createElement(Text, {
1595
+ className: textClassName,
1596
+ appearance: appearance
1597
+ }, label)))
1598
+ );
1527
1599
  };
1528
1600
 
1529
1601
  var MetaOption = function MetaOption(props) {
@@ -1538,18 +1610,24 @@ var MetaOption = function MetaOption(props) {
1538
1610
  var subInfo = optionData.subInfo,
1539
1611
  label = optionData.label,
1540
1612
  disabled = optionData.disabled;
1541
- return /*#__PURE__*/React.createElement("div", {
1542
- className: className,
1543
- onClick: onClickHandler,
1544
- onMouseEnter: onUpdateActiveOption,
1545
- "data-test": dataTest,
1546
- "data-disabled": disabled
1547
- }, /*#__PURE__*/React.createElement("div", {
1548
- className: 'Option-label'
1549
- }, /*#__PURE__*/React.createElement(Text, {
1550
- className: textClassName,
1551
- appearance: appearance
1552
- }, label), subInfo && renderSubInfo(subInfo)));
1613
+ return (
1614
+ /*#__PURE__*/
1615
+ // TODO(a11y): fix accessibility
1616
+
1617
+ /* eslint-disable */
1618
+ React.createElement("div", {
1619
+ className: className,
1620
+ onClick: onClickHandler,
1621
+ onMouseEnter: onUpdateActiveOption,
1622
+ "data-test": dataTest,
1623
+ "data-disabled": disabled
1624
+ }, /*#__PURE__*/React.createElement("div", {
1625
+ className: 'Option-label'
1626
+ }, /*#__PURE__*/React.createElement(Text, {
1627
+ className: textClassName,
1628
+ appearance: appearance
1629
+ }, label), subInfo && renderSubInfo(subInfo)))
1630
+ );
1553
1631
  };
1554
1632
 
1555
1633
  var IconOption = function IconOption(props) {
@@ -1566,23 +1644,29 @@ var IconOption = function IconOption(props) {
1566
1644
  icon = optionData.icon,
1567
1645
  disabled = optionData.disabled;
1568
1646
  var OptionClass = classnames((_classNames = {}, _defineProperty$2(_classNames, "".concat(className), true), _defineProperty$2(_classNames, 'Option--icon', icon), _classNames));
1569
- return /*#__PURE__*/React.createElement("div", {
1570
- className: OptionClass,
1571
- onClick: onClickHandler,
1572
- onMouseEnter: onUpdateActiveOption,
1573
- "data-test": dataTest,
1574
- "data-disabled": disabled
1575
- }, icon && /*#__PURE__*/React.createElement(Icon, {
1576
- className: "Option-icon mr-4",
1577
- "data-test": "".concat(dataTest, "--Icon"),
1578
- name: icon,
1579
- appearance: appearance
1580
- }), /*#__PURE__*/React.createElement("div", {
1581
- className: 'Option-label'
1582
- }, /*#__PURE__*/React.createElement(Text, {
1583
- className: textClassName,
1584
- appearance: appearance
1585
- }, label)));
1647
+ return (
1648
+ /*#__PURE__*/
1649
+ // TODO(a11y): fix accessibility
1650
+
1651
+ /* eslint-disable */
1652
+ React.createElement("div", {
1653
+ className: OptionClass,
1654
+ onClick: onClickHandler,
1655
+ onMouseEnter: onUpdateActiveOption,
1656
+ "data-test": dataTest,
1657
+ "data-disabled": disabled
1658
+ }, icon && /*#__PURE__*/React.createElement(Icon, {
1659
+ className: "Option-icon mr-4",
1660
+ "data-test": "".concat(dataTest, "--Icon"),
1661
+ name: icon,
1662
+ appearance: appearance
1663
+ }), /*#__PURE__*/React.createElement("div", {
1664
+ className: 'Option-label'
1665
+ }, /*#__PURE__*/React.createElement(Text, {
1666
+ className: textClassName,
1667
+ appearance: appearance
1668
+ }, label)))
1669
+ );
1586
1670
  };
1587
1671
 
1588
1672
  var IconWithMetaOption = function IconWithMetaOption(props) {
@@ -1601,23 +1685,29 @@ var IconWithMetaOption = function IconWithMetaOption(props) {
1601
1685
  icon = optionData.icon,
1602
1686
  disabled = optionData.disabled;
1603
1687
  var OptionClass = classnames((_classNames = {}, _defineProperty$2(_classNames, "".concat(className), true), _defineProperty$2(_classNames, 'Option--icon', icon), _classNames));
1604
- return /*#__PURE__*/React.createElement("div", {
1605
- className: OptionClass,
1606
- onClick: onClickHandler,
1607
- onMouseEnter: onUpdateActiveOption,
1608
- "data-test": dataTest,
1609
- "data-disabled": disabled
1610
- }, icon && /*#__PURE__*/React.createElement(Icon, {
1611
- "data-test": "".concat(dataTest, "--Icon"),
1612
- className: "Option-icon mr-4",
1613
- name: icon,
1614
- appearance: appearance
1615
- }), /*#__PURE__*/React.createElement("div", {
1616
- className: 'Option-label'
1617
- }, /*#__PURE__*/React.createElement(Text, {
1618
- className: textClassName,
1619
- appearance: appearance
1620
- }, label), subInfo && renderSubInfo(subInfo)));
1688
+ return (
1689
+ /*#__PURE__*/
1690
+ // TODO(a11y): fix accessibility
1691
+
1692
+ /* eslint-disable */
1693
+ React.createElement("div", {
1694
+ className: OptionClass,
1695
+ onClick: onClickHandler,
1696
+ onMouseEnter: onUpdateActiveOption,
1697
+ "data-test": dataTest,
1698
+ "data-disabled": disabled
1699
+ }, icon && /*#__PURE__*/React.createElement(Icon, {
1700
+ "data-test": "".concat(dataTest, "--Icon"),
1701
+ className: "Option-icon mr-4",
1702
+ name: icon,
1703
+ appearance: appearance
1704
+ }), /*#__PURE__*/React.createElement("div", {
1705
+ className: 'Option-label'
1706
+ }, /*#__PURE__*/React.createElement(Text, {
1707
+ className: textClassName,
1708
+ appearance: appearance
1709
+ }, label), subInfo && renderSubInfo(subInfo)))
1710
+ );
1621
1711
  };
1622
1712
 
1623
1713
  var _OptionTypeMapping;
@@ -2088,7 +2178,9 @@ var DropdownList = function DropdownList(props) {
2088
2178
  name: "Dropdown-search",
2089
2179
  icon: 'search',
2090
2180
  value: searchTerm,
2091
- placeholder: 'Search..',
2181
+ placeholder: 'Search..' // TODO(a11y): research more on this.
2182
+ // eslint-disable-next-line jsx-a11y/no-autofocus
2183
+ ,
2092
2184
  autoFocus: true,
2093
2185
  onChange: searchHandler,
2094
2186
  onClear: searchClearHandler,
@@ -2237,8 +2329,6 @@ var DropdownList = function DropdownList(props) {
2237
2329
  };
2238
2330
 
2239
2331
  var onkeydown = function onkeydown(event) {
2240
- var _dropdownApplyButtonR;
2241
-
2242
2332
  var optionClass = '.OptionWrapper';
2243
2333
 
2244
2334
  switch (event.key) {
@@ -2253,67 +2343,78 @@ var DropdownList = function DropdownList(props) {
2253
2343
  break;
2254
2344
 
2255
2345
  case 'Enter':
2256
- var activeElement = document.activeElement;
2257
-
2258
- if (dropdownOpen && (inputRef.current === activeElement || dropdownTriggerRef.current === activeElement)) {
2259
- event.preventDefault();
2260
- var classes = withCheckbox ? "".concat(optionClass, " .Checkbox-input") : optionClass;
2261
- var elements = document.querySelectorAll(classes);
2262
- var element = elements[cursor];
2263
- if (element) element.click();
2264
- }
2346
+ {
2347
+ var activeElement = document.activeElement;
2348
+
2349
+ if (dropdownOpen && (inputRef.current === activeElement || dropdownTriggerRef.current === activeElement)) {
2350
+ event.preventDefault();
2351
+ var classes = withCheckbox ? "".concat(optionClass, " .Checkbox-input") : optionClass;
2352
+ var elements = document.querySelectorAll(classes);
2353
+ var element = elements[cursor];
2354
+ if (element) element.click();
2355
+ }
2265
2356
 
2266
- if (!dropdownOpen) onToggleDropdown(!dropdownOpen);
2267
- break;
2357
+ if (!dropdownOpen) onToggleDropdown(!dropdownOpen);
2358
+ break;
2359
+ }
2268
2360
 
2269
2361
  case 'Tab':
2270
- if (!showApplyButton && dropdownOpen) {
2271
- event.preventDefault();
2272
- onToggleDropdown(false, 'onClick');
2273
- return;
2274
- }
2362
+ {
2363
+ var _dropdownApplyButtonR;
2364
+
2365
+ if (!showApplyButton && dropdownOpen) {
2366
+ event.preventDefault();
2367
+ onToggleDropdown(false, 'onClick');
2368
+ return;
2369
+ }
2275
2370
 
2276
- var currentElement = document.activeElement;
2277
- var disabledApplyButton = (_dropdownApplyButtonR = dropdownApplyButtonRef.current) === null || _dropdownApplyButtonR === void 0 ? void 0 : _dropdownApplyButtonR.disabled;
2371
+ var currentElement = document.activeElement;
2372
+ var disabledApplyButton = (_dropdownApplyButtonR = dropdownApplyButtonRef.current) === null || _dropdownApplyButtonR === void 0 ? void 0 : _dropdownApplyButtonR.disabled;
2278
2373
 
2279
- if ((currentElement === dropdownCancelButtonRef.current && disabledApplyButton || currentElement === dropdownApplyButtonRef.current) && dropdownOpen) {
2280
- event.preventDefault();
2281
- onToggleDropdown(false, 'onClick');
2282
- return;
2283
- }
2374
+ if ((currentElement === dropdownCancelButtonRef.current && disabledApplyButton || currentElement === dropdownApplyButtonRef.current) && dropdownOpen) {
2375
+ event.preventDefault();
2376
+ onToggleDropdown(false, 'onClick');
2377
+ return;
2378
+ }
2284
2379
 
2285
- if (showApplyButton && dropdownOpen) {
2286
- event.preventDefault();
2380
+ if (showApplyButton && dropdownOpen) {
2381
+ event.preventDefault();
2287
2382
 
2288
- if (currentElement === dropdownCancelButtonRef.current) {
2289
- var _dropdownApplyButtonR2;
2383
+ if (currentElement === dropdownCancelButtonRef.current) {
2384
+ var _dropdownApplyButtonR2;
2290
2385
 
2291
- (_dropdownApplyButtonR2 = dropdownApplyButtonRef.current) === null || _dropdownApplyButtonR2 === void 0 ? void 0 : _dropdownApplyButtonR2.focus();
2292
- } else {
2293
- var _dropdownCancelButton;
2386
+ (_dropdownApplyButtonR2 = dropdownApplyButtonRef.current) === null || _dropdownApplyButtonR2 === void 0 ? void 0 : _dropdownApplyButtonR2.focus();
2387
+ } else {
2388
+ var _dropdownCancelButton;
2294
2389
 
2295
- (_dropdownCancelButton = dropdownCancelButtonRef.current) === null || _dropdownCancelButton === void 0 ? void 0 : _dropdownCancelButton.focus();
2390
+ (_dropdownCancelButton = dropdownCancelButtonRef.current) === null || _dropdownCancelButton === void 0 ? void 0 : _dropdownCancelButton.focus();
2391
+ }
2296
2392
  }
2297
- }
2298
2393
 
2299
- break;
2394
+ break;
2395
+ }
2300
2396
  }
2301
2397
  };
2302
2398
 
2303
- return /*#__PURE__*/React.createElement("div", _extends$3({}, baseProps, {
2304
- className: dropdownClass,
2305
- ref: triggerRef,
2306
- onKeyDown: onkeydown
2307
- }), /*#__PURE__*/React.createElement(Popover, _extends$3({
2308
- onToggle: onToggleDropdown,
2309
- trigger: trigger,
2310
- triggerClass: !menu ? 'w-100' : '',
2311
- open: dropdownOpen,
2312
- customStyle: popoverStyle,
2313
- position: alignmentMapping[align]
2314
- }, popoverOptions, {
2315
- "data-test": "DesignSystem-Dropdown--Popover"
2316
- }), (withSearch || props.async) && renderSearch(), renderDropdownSection(), showApplyButton && withCheckbox && renderApplyButton()));
2399
+ return (
2400
+ /*#__PURE__*/
2401
+ //TODO(a11y)
2402
+ //eslint-disable-next-line
2403
+ React.createElement("div", _extends$3({}, baseProps, {
2404
+ className: dropdownClass,
2405
+ ref: triggerRef,
2406
+ onKeyDown: onkeydown
2407
+ }), /*#__PURE__*/React.createElement(Popover, _extends$3({
2408
+ onToggle: onToggleDropdown,
2409
+ trigger: trigger,
2410
+ triggerClass: !menu ? 'w-100' : '',
2411
+ open: dropdownOpen,
2412
+ customStyle: popoverStyle,
2413
+ position: alignmentMapping[align]
2414
+ }, popoverOptions, {
2415
+ "data-test": "DesignSystem-Dropdown--Popover"
2416
+ }), (withSearch || props.async) && renderSearch(), renderDropdownSection(), showApplyButton && withCheckbox && renderApplyButton()))
2417
+ );
2317
2418
  };
2318
2419
 
2319
2420
  DropdownList.displayName = 'DropdownList';
@@ -3422,6 +3523,17 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
3422
3523
  };
3423
3524
  });
3424
3525
 
3526
+ _defineProperty$2(_assertThisInitialized$2(_this), "yearMouseOverHandler", function (year, isCurrentYear, isDisabled, ev) {
3527
+ var onYearHover = _this.props.onYearHover;
3528
+ var yearData = {
3529
+ value: year,
3530
+ year: year,
3531
+ isCurrentYear: isCurrentYear,
3532
+ isDisabled: isDisabled
3533
+ };
3534
+ if (onYearHover) onYearHover(yearData, ev);
3535
+ });
3536
+
3425
3537
  _defineProperty$2(_assertThisInitialized$2(_this), "selectMonth", function (month) {
3426
3538
  return function () {
3427
3539
  _this.updateState(_this.state.yearNav, month);
@@ -3432,7 +3544,28 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
3432
3544
  };
3433
3545
  });
3434
3546
 
3547
+ _defineProperty$2(_assertThisInitialized$2(_this), "monthMouseOverHandler", function (month, isCurrentMonth, isDisabled, ev) {
3548
+ var months = config.months;
3549
+ var onMonthHover = _this.props.onMonthHover;
3550
+ var monthData = {
3551
+ value: months[month],
3552
+ month: months[month],
3553
+ year: _this.state.year,
3554
+ isCurrentMonth: isCurrentMonth,
3555
+ isDisabled: isDisabled
3556
+ };
3557
+ if (onMonthHover) onMonthHover(monthData, ev);
3558
+ });
3559
+
3435
3560
  _defineProperty$2(_assertThisInitialized$2(_this), "selectDate", function (index, date, prevMonthDayRange, dayRange) {
3561
+ var d = _this.calculateDate(index, date, prevMonthDayRange, dayRange, false);
3562
+
3563
+ _this.setState({
3564
+ currDate: d
3565
+ });
3566
+ });
3567
+
3568
+ _defineProperty$2(_assertThisInitialized$2(_this), "calculateDate", function (index, date, prevMonthDayRange, dayRange, isDateHovered) {
3436
3569
  var neighbouringMonthIndex;
3437
3570
  var neighbouringMonthDate;
3438
3571
  var type = '';
@@ -3454,15 +3587,15 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
3454
3587
  year = _this$getNavDateInfo.year,
3455
3588
  month = _this$getNavDateInfo.month;
3456
3589
 
3457
- _this.updateState(year, month, neighbouringMonthDate);
3590
+ if (isDateHovered === false) {
3591
+ _this.updateState(year, month, neighbouringMonthDate);
3458
3592
 
3459
- _this.onNavIconClickHandler(type)();
3593
+ _this.onNavIconClickHandler(type)();
3594
+ }
3460
3595
 
3461
3596
  var d = _this.getDateValue(year, month, neighbouringMonthDate);
3462
3597
 
3463
- _this.setState({
3464
- currDate: d
3465
- });
3598
+ return d;
3466
3599
  });
3467
3600
 
3468
3601
  _defineProperty$2(_assertThisInitialized$2(_this), "onNavIconClickHandler", function (type) {
@@ -3649,7 +3782,11 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
3649
3782
 
3650
3783
  return /*#__PURE__*/React.createElement("div", {
3651
3784
  className: headerContentClass
3652
- }, view !== 'date' && /*#__PURE__*/React.createElement("div", {
3785
+ }, view !== 'date' &&
3786
+ /*#__PURE__*/
3787
+ // TODO(a11y)
3788
+ // eslint-disable-next-line
3789
+ React.createElement("div", {
3653
3790
  className: "d-flex justify-content-center align-items-center",
3654
3791
  onClick: _this.onNavHeadingClickHandler(view)
3655
3792
  }, renderHeading(headerContent)), view === 'date' && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
@@ -3700,15 +3837,21 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
3700
3837
  'Calendar-value--disabled': disabled,
3701
3838
  'Calendar-yearValue': true
3702
3839
  }, _defineProperty$2(_classNames2, "Calendar-yearValue--".concat(size), size), _defineProperty$2(_classNames2, 'Calendar-value--currDateMonthYear', isCurrentYear()), _classNames2));
3703
- return /*#__PURE__*/React.createElement("div", {
3704
- key: "".concat(row, "-").concat(col),
3705
- "data-test": "DesignSystem-Calendar--yearValue",
3706
- className: valueClass,
3707
- onClick: _this.selectYear(year)
3708
- }, /*#__PURE__*/React.createElement(Text, {
3709
- size: size === 'small' ? 'small' : 'regular',
3710
- appearance: active ? 'white' : disabled ? 'disabled' : isCurrentYear() ? 'link' : 'default'
3711
- }, year));
3840
+ return (
3841
+ /*#__PURE__*/
3842
+ // TODO(a11y)
3843
+ // eslint-disable-next-line
3844
+ React.createElement("div", {
3845
+ key: "".concat(row, "-").concat(col),
3846
+ "data-test": "DesignSystem-Calendar--yearValue",
3847
+ className: valueClass,
3848
+ onClick: _this.selectYear(year),
3849
+ onMouseOver: _this.yearMouseOverHandler.bind(_assertThisInitialized$2(_this), year, isCurrentYear(), disabled)
3850
+ }, /*#__PURE__*/React.createElement(Text, {
3851
+ size: size === 'small' ? 'small' : 'regular',
3852
+ appearance: active ? 'white' : disabled ? 'disabled' : isCurrentYear() ? 'link' : 'default'
3853
+ }, year))
3854
+ );
3712
3855
  }));
3713
3856
  });
3714
3857
  });
@@ -3752,15 +3895,21 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
3752
3895
  'Calendar-value--dummy': disabled,
3753
3896
  'Calendar-monthValue': true
3754
3897
  }, _defineProperty$2(_classNames3, "Calendar-monthValue--".concat(size), size), _defineProperty$2(_classNames3, 'Calendar-value--currDateMonthYear', isCurrentMonth()), _classNames3));
3755
- return /*#__PURE__*/React.createElement("div", {
3756
- key: "".concat(row, "-").concat(col),
3757
- "data-test": "DesignSystem-Calendar--monthValue",
3758
- className: valueClass,
3759
- onClick: _this.selectMonth(month)
3760
- }, /*#__PURE__*/React.createElement(Text, {
3761
- size: size === 'small' ? 'small' : 'regular',
3762
- appearance: active ? 'white' : disabled ? 'disabled' : isCurrentMonth() ? 'link' : 'default'
3763
- }, months[month]));
3898
+ return (
3899
+ /*#__PURE__*/
3900
+ //TODO(a11y)
3901
+ //eslint-disable-next-line
3902
+ React.createElement("div", {
3903
+ key: "".concat(row, "-").concat(col),
3904
+ "data-test": "DesignSystem-Calendar--monthValue",
3905
+ className: valueClass,
3906
+ onClick: _this.selectMonth(month),
3907
+ onMouseOver: _this.monthMouseOverHandler.bind(_assertThisInitialized$2(_this), month, isCurrentMonth(), disabled)
3908
+ }, /*#__PURE__*/React.createElement(Text, {
3909
+ size: size === 'small' ? 'small' : 'regular',
3910
+ appearance: active ? 'white' : disabled ? 'disabled' : isCurrentMonth() ? 'link' : 'default'
3911
+ }, months[month]))
3912
+ );
3764
3913
  }));
3765
3914
  });
3766
3915
  });
@@ -3813,7 +3962,8 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
3813
3962
  firstDayOfWeek = _this$props7.firstDayOfWeek,
3814
3963
  disabledBefore = _this$props7.disabledBefore,
3815
3964
  disabledAfter = _this$props7.disabledAfter,
3816
- monthsInView = _this$props7.monthsInView;
3965
+ monthsInView = _this$props7.monthsInView,
3966
+ onDateHover = _this$props7.onDateHover;
3817
3967
  var _this$state8 = _this.state,
3818
3968
  startDate = _this$state8.startDate,
3819
3969
  endDate = _this$state8.endDate,
@@ -3835,13 +3985,10 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
3835
3985
  var dayRange = getDaysInMonth(yearNavVal, monthNavVal);
3836
3986
  var dayDiff = getFirstDayOfMonth(yearNavVal, monthNavVal) - getIndexOfDay(firstDayOfWeek);
3837
3987
  var dummyDays = Math.abs(dayDiff);
3838
- var noOfRows = Math.ceil((dayRange + dummyDays) / daysInRow);
3988
+ var noOfRows = Math.ceil((dayRange + dummyDays) / daysInRow); // TODO: @veekays
3989
+ // if(noOfRows !== 6 && monthsInView <= 1) ?
3839
3990
 
3840
- if (noOfRows === 6) {
3841
- noOfRows = noOfRows;
3842
- } else if (monthsInView > 1) {
3843
- noOfRows = noOfRows;
3844
- } else {
3991
+ if (noOfRows === 6) ; else if (monthsInView > 1) ; else {
3845
3992
  noOfRows = noOfRows + 1;
3846
3993
  }
3847
3994
 
@@ -3877,6 +4024,25 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
3877
4024
  };
3878
4025
  };
3879
4026
 
4027
+ var onMouseEnterHandler = function onMouseEnterHandler(date, isToday, isDisabled, ev) {
4028
+ var d = _this.calculateDate(index, date, prevMonthDayRange, dayRange, true) || new Date();
4029
+ var months = config.months,
4030
+ days = config.days;
4031
+ var dayName = days.large[d.getDay()];
4032
+ var dateData = {
4033
+ value: d.getDate(),
4034
+ isToday: isToday,
4035
+ isDisabled: isDisabled,
4036
+ todayDate: _this.state.currDate,
4037
+ fullDate: d,
4038
+ date: d.getDate(),
4039
+ month: months[d.getMonth()],
4040
+ year: d.getFullYear(),
4041
+ dayName: dayName
4042
+ };
4043
+ if (onDateHover) onDateHover(dateData, ev);
4044
+ };
4045
+
3880
4046
  return Array.from({
3881
4047
  length: noOfRows
3882
4048
  }, function (_y, row) {
@@ -3976,14 +4142,16 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
3976
4142
  "data-test": "DesignSystem-Calendar--dateValue",
3977
4143
  className: valueClass,
3978
4144
  onClick: onClickHandler(date),
3979
- onMouseOver: onMouseOverHandler(date)
4145
+ onMouseOver: onMouseOverHandler(date),
4146
+ onMouseEnter: onMouseEnterHandler.bind(_assertThisInitialized$2(_this), date, today(), disabled)
3980
4147
  }, date), isEventExist && _this.renderEventsIndicator(size, active)), (dummy && date > 0 && index === monthsInView - 1 || dummy && date <= 0 && index === 0) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Text, {
3981
4148
  appearance: active ? 'white' : disabled ? 'disabled' : today() ? 'link' : 'default',
3982
4149
  size: size === 'small' ? 'small' : 'regular',
3983
4150
  "data-test": "DesignSystem-Calendar--dateValue",
3984
4151
  className: valueClass,
3985
4152
  onClick: onClickHandler(date),
3986
- onMouseOver: onMouseOverHandler(date)
4153
+ onMouseOver: onMouseOverHandler(date),
4154
+ onMouseEnter: onMouseEnterHandler.bind(_assertThisInitialized$2(_this), date, today(), disabled)
3987
4155
  }, date <= 0 ? prevMonthDayRange + date : date - dayRange), isEventExist && _this.renderEventsIndicator(size, active)));
3988
4156
  }));
3989
4157
  });
@@ -4365,26 +4533,31 @@ var GenericChip = function GenericChip(props) {
4365
4533
  if (onClick) onClick();
4366
4534
  };
4367
4535
 
4368
- return /*#__PURE__*/React.createElement("div", _extends$3({
4369
- "data-test": "DesignSystem-GenericChip--GenericChipWrapper"
4370
- }, baseProps, {
4371
- className: "Chip-wrapper ".concat(className),
4372
- onClick: onClickHandler
4373
- }), icon && /*#__PURE__*/React.createElement(Icon, {
4374
- "data-test": "DesignSystem-GenericChip--Icon",
4375
- name: icon,
4376
- appearance: disabled ? 'disabled' : selected ? 'info' : 'default',
4377
- className: iconClass('left')
4378
- }), /*#__PURE__*/React.createElement(Text, {
4379
- "data-test": "DesignSystem-GenericChip--Text",
4380
- appearance: disabled ? 'disabled' : 'default'
4381
- }, label), clearButton && /*#__PURE__*/React.createElement(Icon, {
4382
- "data-test": "DesignSystem-GenericChip--clearButton",
4383
- name: "clear",
4384
- appearance: disabled ? 'disabled' : selected ? 'info' : 'subtle',
4385
- className: iconClass('right'),
4386
- onClick: onCloseHandler
4387
- }));
4536
+ return (
4537
+ /*#__PURE__*/
4538
+ // TODO(a11y)
4539
+ // eslint-disable-next-line
4540
+ React.createElement("div", _extends$3({
4541
+ "data-test": "DesignSystem-GenericChip--GenericChipWrapper"
4542
+ }, baseProps, {
4543
+ className: "Chip-wrapper ".concat(className),
4544
+ onClick: onClickHandler
4545
+ }), icon && /*#__PURE__*/React.createElement(Icon, {
4546
+ "data-test": "DesignSystem-GenericChip--Icon",
4547
+ name: icon,
4548
+ appearance: disabled ? 'disabled' : selected ? 'info' : 'default',
4549
+ className: iconClass('left')
4550
+ }), /*#__PURE__*/React.createElement(Text, {
4551
+ "data-test": "DesignSystem-GenericChip--Text",
4552
+ appearance: disabled ? 'disabled' : 'default'
4553
+ }, label), clearButton && /*#__PURE__*/React.createElement(Icon, {
4554
+ "data-test": "DesignSystem-GenericChip--clearButton",
4555
+ name: "clear",
4556
+ appearance: disabled ? 'disabled' : selected ? 'info' : 'subtle',
4557
+ className: iconClass('right'),
4558
+ onClick: onCloseHandler
4559
+ }))
4560
+ );
4388
4561
  };
4389
4562
  GenericChip.displayName = 'GenericChip';
4390
4563
 
@@ -4580,7 +4753,7 @@ var Trigger$1 = function Trigger(props) {
4580
4753
  }));
4581
4754
  };
4582
4755
 
4583
- var _excluded$q = ["date", "open", "position", "inputFormat", "outputFormat", "inputOptions", "validators", "withInput", "disabledBefore", "disabledAfter", "onDateChange", "closeOnSelect", "size"];
4756
+ var _excluded$q = ["date", "open", "position", "inputFormat", "outputFormat", "inputOptions", "validators", "withInput", "disabledBefore", "disabledAfter", "onDateChange", "closeOnSelect", "size", "showTodayDate", "children"];
4584
4757
  var DatePicker = /*#__PURE__*/function (_React$Component) {
4585
4758
  _inherits$1(DatePicker, _React$Component);
4586
4759
 
@@ -4718,6 +4891,10 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
4718
4891
  _this$props4.onDateChange;
4719
4892
  _this$props4.closeOnSelect;
4720
4893
  var size = _this$props4.size,
4894
+ _this$props4$showToda = _this$props4.showTodayDate,
4895
+ showTodayDate = _this$props4$showToda === void 0 ? true : _this$props4$showToda,
4896
+ _this$props4$children = _this$props4.children,
4897
+ children = _this$props4$children === void 0 ? /*#__PURE__*/React.createElement(React.Fragment, null) : _this$props4$children,
4721
4898
  rest = _objectWithoutProperties$1(_this$props4, _excluded$q);
4722
4899
 
4723
4900
  var date = this.state.date;
@@ -4742,13 +4919,15 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
4742
4919
  return !isTodayDateDisabled;
4743
4920
  };
4744
4921
 
4745
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Calendar, _extends$3({}, rest, {
4922
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
4923
+ className: "d-flex"
4924
+ }, children, /*#__PURE__*/React.createElement(Calendar, _extends$3({}, rest, {
4746
4925
  size: size,
4747
4926
  date: currDate,
4748
4927
  disabledBefore: dateDisabledBefore,
4749
4928
  disabledAfter: dateDisabledAfter,
4750
4929
  onDateChange: this.onDateChangeHandler
4751
- })), /*#__PURE__*/React.createElement("div", {
4930
+ }))), showTodayDate && /*#__PURE__*/React.createElement("div", {
4752
4931
  className: "d-flex justify-content-center pb-6",
4753
4932
  "data-test": "DesignSystem-Select--TodaysDate-wrapper"
4754
4933
  }, /*#__PURE__*/React.createElement(Chip, {
@@ -4994,7 +5173,8 @@ var Input = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {
4994
5173
  var _ref$current2;
4995
5174
 
4996
5175
  return (_ref$current2 = ref.current) === null || _ref$current2 === void 0 ? void 0 : _ref$current2.focus();
4997
- }
5176
+ },
5177
+ role: "presentation"
4998
5178
  }, inlineLabel && /*#__PURE__*/React.createElement("div", {
4999
5179
  className: "Input-inlineLabel"
5000
5180
  }, /*#__PURE__*/React.createElement(Text, {
@@ -5025,12 +5205,17 @@ var Input = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {
5025
5205
  position: "top",
5026
5206
  tooltip: info
5027
5207
  }, trigger) : actionIcon && (value || defaultValue) ? actionIcon : onClear && (value || defaultValue) && /*#__PURE__*/React.createElement("div", {
5028
- className: rightIconClass,
5208
+ className: rightIconClass
5209
+ }, /*#__PURE__*/React.createElement(Icon, {
5210
+ "data-test": "DesignSystem-Input--closeIcon",
5029
5211
  onClick: function onClick(e) {
5030
- return onClear(e);
5212
+ var _ref$current3;
5213
+
5214
+ (_ref$current3 = ref.current) === null || _ref$current3 === void 0 ? void 0 : _ref$current3.focus({
5215
+ preventScroll: true
5216
+ });
5217
+ onClear(e);
5031
5218
  },
5032
- "data-test": "DesignSystem-Input--closeIcon"
5033
- }, /*#__PURE__*/React.createElement(Icon, {
5034
5219
  name: 'close',
5035
5220
  size: sizeMapping$1[size]
5036
5221
  })));
@@ -5175,7 +5360,14 @@ var MetricInput = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {
5175
5360
  var _ref$current2;
5176
5361
 
5177
5362
  return (_ref$current2 = ref.current) === null || _ref$current2 === void 0 ? void 0 : _ref$current2.focus();
5178
- }
5363
+ },
5364
+ onFocus: function onFocus() {
5365
+ var _ref$current3;
5366
+
5367
+ return (_ref$current3 = ref.current) === null || _ref$current3 === void 0 ? void 0 : _ref$current3.focus();
5368
+ },
5369
+ onKeyDown: function onKeyDown() {},
5370
+ role: "presentation"
5179
5371
  }, icon && /*#__PURE__*/React.createElement(Icon, {
5180
5372
  "data-test": "DesignSystem-MetricInput--icon",
5181
5373
  name: icon,
@@ -5210,9 +5402,9 @@ var MetricInput = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {
5210
5402
  size: size,
5211
5403
  appearance: "subtle"
5212
5404
  }, suffix), /*#__PURE__*/React.createElement("div", {
5213
- className: "MetricInput-arrowIcons",
5214
- tabIndex: 0
5405
+ className: "MetricInput-arrowIcons"
5215
5406
  }, /*#__PURE__*/React.createElement(Icon, {
5407
+ tabIndex: -1,
5216
5408
  className: getArrowClass('up'),
5217
5409
  size: iconSize,
5218
5410
  name: "keyboard_arrow_up",
@@ -5221,6 +5413,7 @@ var MetricInput = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {
5221
5413
  },
5222
5414
  "data-test": "DesignSystem-MetricInput--upIcon"
5223
5415
  }), /*#__PURE__*/React.createElement(Icon, {
5416
+ tabIndex: -1,
5224
5417
  className: getArrowClass('down'),
5225
5418
  size: iconSize,
5226
5419
  name: "keyboard_arrow_down",
@@ -5622,7 +5815,10 @@ var Legend = function Legend(props) {
5622
5815
  background: "var(--".concat(iconAppearance, ")"),
5623
5816
  height: "".concat(iconSize, "px"),
5624
5817
  width: "".concat(iconSize, "px")
5625
- };
5818
+ }; // TODO(a11y): fix accessibility
5819
+
5820
+ /* eslint-disable */
5821
+
5626
5822
  return /*#__PURE__*/React.createElement("div", _extends$3({}, baseProps, {
5627
5823
  className: legendClass,
5628
5824
  onClick: function onClick(e) {
@@ -5715,14 +5911,14 @@ var EditableDropdown = function EditableDropdown(props) {
5715
5911
  switch (eventType) {
5716
5912
  case 'edit':
5717
5913
  setEditing(true);
5914
+ break;
5718
5915
 
5719
5916
  case 'hover':
5720
5917
  setShowComponent(true);
5721
- return;
5918
+ break;
5722
5919
 
5723
5920
  case 'default':
5724
5921
  setShowComponent(false);
5725
- return;
5726
5922
  }
5727
5923
  };
5728
5924
 
@@ -5927,6 +6123,9 @@ MetaList.defaultProps = {
5927
6123
  labelAppearance: 'subtle'
5928
6124
  };
5929
6125
 
6126
+ /**
6127
+ * Key codes are deprecated, soon major browser support will end.
6128
+ */
5930
6129
  var ARROW_LEFT = 37;
5931
6130
  var ARROW_RIGHT = 39;
5932
6131
 
@@ -6206,21 +6405,27 @@ var Handle = /*#__PURE__*/function (_React$Component) {
6206
6405
  };
6207
6406
  var className = classnames((_classNames = {}, _defineProperty$2(_classNames, 'Slider-handle', true), _defineProperty$2(_classNames, 'Slider-handle--disabled', disabled), _defineProperty$2(_classNames, 'Slider-handle--active', isHandleMoving), _classNames));
6208
6407
  var TooltipClass = classnames((_classNames2 = {}, _defineProperty$2(_classNames2, 'Slider-tooltip', true), _defineProperty$2(_classNames2, 'Tooltip', true), _defineProperty$2(_classNames2, 'd-none', !showTootlip), _classNames2));
6209
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
6210
- className: className,
6211
- onMouseOver: this.handleMouseOver,
6212
- onMouseLeave: this.handleMouseLeave,
6213
- onMouseDown: this.beginHandleMovement,
6214
- onKeyDown: this.handleKeyDown,
6215
- onKeyUp: this.handleKeyUp,
6216
- ref: this.refHandlers.handle,
6217
- style: style,
6218
- tabIndex: 1,
6219
- "data-test": "DesignSystem-MultiSlider-Handle"
6220
- }), /*#__PURE__*/React.createElement("div", {
6221
- className: TooltipClass,
6222
- style: style
6223
- }, label));
6408
+ return (
6409
+ /*#__PURE__*/
6410
+ // TODO(a11y): fix accessibility
6411
+
6412
+ /* eslint-disable */
6413
+ React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
6414
+ className: className,
6415
+ onMouseOver: this.handleMouseOver,
6416
+ onMouseLeave: this.handleMouseLeave,
6417
+ onMouseDown: this.beginHandleMovement,
6418
+ onKeyDown: this.handleKeyDown,
6419
+ onKeyUp: this.handleKeyUp,
6420
+ ref: this.refHandlers.handle,
6421
+ style: style,
6422
+ tabIndex: 1,
6423
+ "data-test": "DesignSystem-MultiSlider-Handle"
6424
+ }), /*#__PURE__*/React.createElement("div", {
6425
+ className: TooltipClass,
6426
+ style: style
6427
+ }, label))
6428
+ );
6224
6429
  }
6225
6430
  }]);
6226
6431
 
@@ -6478,7 +6683,10 @@ var MultiSlider = /*#__PURE__*/function (_React$Component) {
6478
6683
  foundHandle.changeValue(i);
6479
6684
  }
6480
6685
  }
6481
- };
6686
+ }; // TODO(a11y): fix accessibility
6687
+
6688
+ /* eslint-disable */
6689
+
6482
6690
 
6483
6691
  labels.push( /*#__PURE__*/React.createElement("div", {
6484
6692
  onClick: onClickHandler,
@@ -6828,26 +7036,32 @@ var StatusHint = function StatusHint(props) {
6828
7036
  var baseProps = extractBaseProps(props);
6829
7037
  var StatusHintClass = classnames(_defineProperty$2({}, 'StatusHint', true), className);
6830
7038
  var StatusHintIconClass = classnames((_classNames2 = {}, _defineProperty$2(_classNames2, 'StatusHint-icon', true), _defineProperty$2(_classNames2, "StatusHint--".concat(appearance), appearance), _classNames2));
6831
- return /*#__PURE__*/React.createElement("div", _extends$3({
6832
- "data-test": "DesignSystem-StatusHint"
6833
- }, baseProps, {
6834
- className: StatusHintClass,
6835
- onClick: function onClick(e) {
6836
- return _onClick && _onClick(e);
6837
- },
6838
- onMouseEnter: function onMouseEnter(e) {
6839
- return _onMouseEnter && _onMouseEnter(e);
6840
- },
6841
- onMouseLeave: function onMouseLeave(e) {
6842
- return _onMouseLeave && _onMouseLeave(e);
6843
- }
6844
- }), /*#__PURE__*/React.createElement("span", {
6845
- "data-test": "DesignSystem-StatusHint--Icon",
6846
- className: StatusHintIconClass
6847
- }), /*#__PURE__*/React.createElement(Text, {
6848
- "data-test": "DesignSystem-StatusHint--Text",
6849
- weight: 'medium'
6850
- }, children));
7039
+ return (
7040
+ /*#__PURE__*/
7041
+ // TODO(a11y): fix accessibility
7042
+
7043
+ /* eslint-disable */
7044
+ React.createElement("div", _extends$3({
7045
+ "data-test": "DesignSystem-StatusHint"
7046
+ }, baseProps, {
7047
+ className: StatusHintClass,
7048
+ onClick: function onClick(e) {
7049
+ return _onClick && _onClick(e);
7050
+ },
7051
+ onMouseEnter: function onMouseEnter(e) {
7052
+ return _onMouseEnter && _onMouseEnter(e);
7053
+ },
7054
+ onMouseLeave: function onMouseLeave(e) {
7055
+ return _onMouseLeave && _onMouseLeave(e);
7056
+ }
7057
+ }), /*#__PURE__*/React.createElement("span", {
7058
+ "data-test": "DesignSystem-StatusHint--Icon",
7059
+ className: StatusHintIconClass
7060
+ }), /*#__PURE__*/React.createElement(Text, {
7061
+ "data-test": "DesignSystem-StatusHint--Text",
7062
+ weight: 'medium'
7063
+ }, children))
7064
+ );
6851
7065
  };
6852
7066
  StatusHint.displayName = 'StatusHint';
6853
7067
  StatusHint.defaultProps = {
@@ -7054,8 +7268,10 @@ var Switch = /*#__PURE__*/React.forwardRef(function (props, ref) {
7054
7268
  var SwitchWrapper = classnames((_classNames2 = {}, _defineProperty$2(_classNames2, 'Switch-wrapper', true), _defineProperty$2(_classNames2, 'Switch-wrapper--disabled', disabled), _defineProperty$2(_classNames2, "Switch-wrapper--".concat(size), size), _defineProperty$2(_classNames2, 'Switch-wrapper--checked', checked), _defineProperty$2(_classNames2, 'Switch-wrapper--checkedDisabled', checked && disabled), _classNames2));
7055
7269
 
7056
7270
  var onChangeHandler = function onChangeHandler(event) {
7057
- if (checkedProp === undefined) setChecked(!checked);
7058
- if (onChange) onChange(event, !checked);
7271
+ if (event.type == 'change' || isSpaceKey(event)) {
7272
+ if (checkedProp === undefined) setChecked(!checked);
7273
+ if (onChange) onChange(event, !checked);
7274
+ }
7059
7275
  };
7060
7276
 
7061
7277
  return /*#__PURE__*/React.createElement("div", {
@@ -7069,7 +7285,8 @@ var Switch = /*#__PURE__*/React.forwardRef(function (props, ref) {
7069
7285
  ref: ref,
7070
7286
  name: name,
7071
7287
  value: value,
7072
- className: "Switch-input"
7288
+ className: "Switch-input",
7289
+ onKeyUp: onChangeHandler
7073
7290
  })), /*#__PURE__*/React.createElement("span", {
7074
7291
  className: SwitchWrapper
7075
7292
  }));
@@ -12322,32 +12539,39 @@ var ChipInput = function ChipInput(props) {
12322
12539
  }
12323
12540
  }, rest));
12324
12541
  });
12325
- return /*#__PURE__*/React.createElement("div", _extends$3({
12326
- "data-test": "DesignSystem-ChipInput"
12327
- }, baseProps, {
12328
- className: ChipInputClass,
12329
- onClick: onClickHandler
12330
- }), /*#__PURE__*/React.createElement("div", {
12331
- className: "ChipInput-wrapper"
12332
- }, chips && chips.length > 0 && chipComponents, /*#__PURE__*/React.createElement("input", {
12333
- "data-test": "DesignSystem-ChipInput--Input",
12334
- ref: inputRef,
12335
- className: "ChipInput-input",
12336
- autoFocus: autoFocus,
12337
- placeholder: placeholder,
12338
- disabled: disabled,
12339
- value: inputValue,
12340
- onBlur: onBlur,
12341
- onFocus: onFocus,
12342
- onChange: onInputChangeHandler,
12343
- onKeyDown: onKeyDownHandler
12344
- })), chips.length > 0 && /*#__PURE__*/React.createElement(Icon, {
12345
- "data-test": "DesignSystem-ChipInput--Icon",
12346
- name: "close",
12347
- appearance: "subtle",
12348
- className: "ChipInput-icon",
12349
- onClick: onDeleteAllHandler
12350
- }));
12542
+ return (
12543
+ /*#__PURE__*/
12544
+
12545
+ /* TODO(a11y): fix accessibility */
12546
+
12547
+ /* eslint-disable */
12548
+ React.createElement("div", _extends$3({
12549
+ "data-test": "DesignSystem-ChipInput"
12550
+ }, baseProps, {
12551
+ className: ChipInputClass,
12552
+ onClick: onClickHandler
12553
+ }), /*#__PURE__*/React.createElement("div", {
12554
+ className: "ChipInput-wrapper"
12555
+ }, chips && chips.length > 0 && chipComponents, /*#__PURE__*/React.createElement("input", {
12556
+ "data-test": "DesignSystem-ChipInput--Input",
12557
+ ref: inputRef,
12558
+ className: "ChipInput-input",
12559
+ autoFocus: autoFocus,
12560
+ placeholder: placeholder,
12561
+ disabled: disabled,
12562
+ value: inputValue,
12563
+ onBlur: onBlur,
12564
+ onFocus: onFocus,
12565
+ onChange: onInputChangeHandler,
12566
+ onKeyDown: onKeyDownHandler
12567
+ })), chips.length > 0 && /*#__PURE__*/React.createElement(Icon, {
12568
+ "data-test": "DesignSystem-ChipInput--Icon",
12569
+ name: "close",
12570
+ appearance: "subtle",
12571
+ className: "ChipInput-icon",
12572
+ onClick: onDeleteAllHandler
12573
+ }))
12574
+ );
12351
12575
  };
12352
12576
  ChipInput.displayName = 'ChipInput';
12353
12577
  ChipInput.defaultProps = {
@@ -12447,21 +12671,26 @@ var MenuItem = function MenuItem(props) {
12447
12671
  };
12448
12672
 
12449
12673
  if (!expanded && !menu.icon) return null;
12450
- return /*#__PURE__*/React.createElement("div", _extends$3({
12451
- className: ItemClass
12452
- }, baseProps, {
12453
- onClick: onClickHandler
12454
- }), /*#__PURE__*/React.createElement("div", {
12455
- className: "d-flex align-items-center overflow-hidden"
12456
- }, menu.icon && /*#__PURE__*/React.createElement(Icon, {
12457
- "data-test": "DesignSystem-VerticalNav--Icon",
12458
- className: expanded ? 'mr-4' : '',
12459
- name: menu.icon,
12460
- appearance: getIconAppearance(isActive, menu.disabled)
12461
- }), expanded && /*#__PURE__*/React.createElement(Text, {
12462
- "data-test": "DesignSystem-VerticalNav--Text",
12463
- appearance: getTextAppearance(isActive, menu.disabled)
12464
- }, menu.label)), expanded && renderSubMenu());
12674
+ return (
12675
+ /*#__PURE__*/
12676
+ // TODO(a11y)
12677
+ // eslint-disable-next-line
12678
+ React.createElement("div", _extends$3({
12679
+ className: ItemClass
12680
+ }, baseProps, {
12681
+ onClick: onClickHandler
12682
+ }), /*#__PURE__*/React.createElement("div", {
12683
+ className: "d-flex align-items-center overflow-hidden"
12684
+ }, menu.icon && /*#__PURE__*/React.createElement(Icon, {
12685
+ "data-test": "DesignSystem-VerticalNav--Icon",
12686
+ className: expanded ? 'mr-4' : '',
12687
+ name: menu.icon,
12688
+ appearance: getIconAppearance(isActive, menu.disabled)
12689
+ }), expanded && /*#__PURE__*/React.createElement(Text, {
12690
+ "data-test": "DesignSystem-VerticalNav--Text",
12691
+ appearance: getTextAppearance(isActive, menu.disabled)
12692
+ }, menu.label)), expanded && renderSubMenu())
12693
+ );
12465
12694
  };
12466
12695
  MenuItem.defaultProps = {
12467
12696
  isActive: false
@@ -12634,16 +12863,21 @@ var HorizontalNav = function HorizontalNav(props) {
12634
12863
  var menuClasses = classnames((_classNames3 = {
12635
12864
  'HorizontalNav-menu': true
12636
12865
  }, _defineProperty$2(_classNames3, 'HorizontalNav-menu--active', isActive), _defineProperty$2(_classNames3, 'HorizontalNav-menu--disabled', menu.disabled), _classNames3));
12637
- return /*#__PURE__*/React.createElement("div", {
12638
- "data-test": "DesignSystem-HorizontalNav",
12639
- key: index,
12640
- className: menuClasses,
12641
- onClick: onClickHandler(menu)
12642
- }, renderIcon(menu, isActive), /*#__PURE__*/React.createElement(Text, {
12643
- appearance: getTextAppearance(isActive, menu.disabled),
12644
- "data-test": "DesignSystem-HorizontalNav--Text",
12645
- className: "HorizontalNav-menuText"
12646
- }, menu.label));
12866
+ return (
12867
+ /*#__PURE__*/
12868
+ // TODO(a11y)
12869
+ // eslint-disable-next-line
12870
+ React.createElement("div", {
12871
+ "data-test": "DesignSystem-HorizontalNav",
12872
+ key: index,
12873
+ className: menuClasses,
12874
+ onClick: onClickHandler(menu)
12875
+ }, renderIcon(menu, isActive), /*#__PURE__*/React.createElement(Text, {
12876
+ appearance: getTextAppearance(isActive, menu.disabled),
12877
+ "data-test": "DesignSystem-HorizontalNav--Text",
12878
+ className: "HorizontalNav-menuText"
12879
+ }, menu.label))
12880
+ );
12647
12881
  });
12648
12882
  return /*#__PURE__*/React.createElement("div", _extends$3({}, baseProps, {
12649
12883
  className: classes
@@ -13760,11 +13994,16 @@ var Box = function Box(props) {
13760
13994
  className = props.className;
13761
13995
  var baseProps = extractBaseProps(props);
13762
13996
  var MessageClass = classnames((_classNames = {}, _defineProperty$2(_classNames, 'Box', true), _defineProperty$2(_classNames, "Box--".concat(type), type), _defineProperty$2(_classNames, 'Box--typing', isTyping), _defineProperty$2(_classNames, 'Box--urgent', statusType === 'urgent'), _defineProperty$2(_classNames, "Box-".concat(type, "--withStatus"), withStatus || isTyping), _classNames), className);
13997
+ /* TODO(a11y): fix accessibility */
13998
+
13999
+ /* eslint-disable */
14000
+
13763
14001
  return /*#__PURE__*/React.createElement("div", _extends$3({}, baseProps, {
13764
14002
  className: MessageClass,
13765
14003
  onClick: onClick,
13766
14004
  "data-test": "DesignSystem-ChatMessage--Box"
13767
14005
  }), children);
14006
+ /* eslint-enable */
13768
14007
  };
13769
14008
  Box.displayName = 'Box';
13770
14009
 
@@ -13860,7 +14099,11 @@ var EmptyState = function EmptyState(props) {
13860
14099
  style: {
13861
14100
  height: imageHeight[size]
13862
14101
  }
13863
- }, image), imageSrc && !image && /*#__PURE__*/React.createElement("img", {
14102
+ }, image), imageSrc && !image &&
14103
+ /*#__PURE__*/
14104
+ //TODO(a11y)
14105
+ //eslint-disable-next-line
14106
+ React.createElement("img", {
13864
14107
  src: imageSrc,
13865
14108
  height: imageHeight[size],
13866
14109
  "data-test": "DesignSystem-EmptyState--Img"
@@ -14083,26 +14326,36 @@ var EditableInput = function EditableInput(props) {
14083
14326
  };
14084
14327
 
14085
14328
  var onChangeHandler = function onChangeHandler(eventType) {
14086
- var _inputRef$current;
14087
-
14088
14329
  switch (eventType) {
14089
14330
  case 'edit':
14090
- (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
14091
- setEditing(true);
14331
+ {
14332
+ var _inputRef$current;
14333
+
14334
+ (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
14335
+ setEditing(true);
14336
+ setShowComponent(true);
14337
+ break;
14338
+ }
14092
14339
 
14093
14340
  case 'hover':
14094
- setShowComponent(true);
14095
- return;
14341
+ {
14342
+ setShowComponent(true);
14343
+ break;
14344
+ }
14096
14345
 
14097
14346
  case 'default':
14098
- setShowComponent(false);
14347
+ {
14348
+ setShowComponent(false);
14349
+ }
14099
14350
  }
14100
14351
  };
14101
14352
 
14102
14353
  var inputComponent = /*#__PURE__*/React.createElement(Input, _extends$3({
14103
14354
  defaultValue: inputValue,
14104
14355
  placeholder: placeholder,
14105
- className: InputClass,
14356
+ className: InputClass // TODO(a11y)
14357
+ // eslint-disable-next-line jsx-a11y/no-autofocus
14358
+ ,
14106
14359
  autoFocus: editing,
14107
14360
  size: size,
14108
14361
  onChange: onInputChangeHandler,
@@ -14149,33 +14402,38 @@ var EditableInput = function EditableInput(props) {
14149
14402
  }, value || placeholder);
14150
14403
  };
14151
14404
 
14152
- return /*#__PURE__*/React.createElement("div", _extends$3({
14153
- "data-test": "DesignSystem-EditableInput"
14154
- }, baseProps, {
14155
- className: EditableInputClass,
14156
- onKeyDown: onKeyDown
14157
- }), /*#__PURE__*/React.createElement(Editable, {
14158
- onChange: onChangeHandler,
14159
- editing: editing
14160
- }, renderChildren()), editing && /*#__PURE__*/React.createElement("div", {
14161
- className: ActionClass,
14162
- "data-test": "DesignSystem-EditableInput--Actions"
14163
- }, /*#__PURE__*/React.createElement(Button, {
14164
- icon: "clear",
14165
- className: "mr-3",
14166
- size: "tiny",
14167
- onClick: function onClick() {
14168
- setDefaultComponent(value);
14169
- },
14170
- "data-test": "DesignSystem-EditableInput--Discard"
14171
- }), /*#__PURE__*/React.createElement(Button, {
14172
- icon: "check",
14173
- appearance: "primary",
14174
- size: "tiny",
14175
- disabled: disableSaveAction,
14176
- onClick: onSaveChanges,
14177
- "data-test": "DesignSystem-EditableInput--Save"
14178
- })));
14405
+ return (
14406
+ /*#__PURE__*/
14407
+ // TODO(a11y)
14408
+ // eslint-disable-next-line jsx-a11y/no-static-element-interactions
14409
+ React.createElement("div", _extends$3({
14410
+ "data-test": "DesignSystem-EditableInput"
14411
+ }, baseProps, {
14412
+ className: EditableInputClass,
14413
+ onKeyDown: onKeyDown
14414
+ }), /*#__PURE__*/React.createElement(Editable, {
14415
+ onChange: onChangeHandler,
14416
+ editing: editing
14417
+ }, renderChildren()), editing && /*#__PURE__*/React.createElement("div", {
14418
+ className: ActionClass,
14419
+ "data-test": "DesignSystem-EditableInput--Actions"
14420
+ }, /*#__PURE__*/React.createElement(Button, {
14421
+ icon: "clear",
14422
+ className: "mr-3",
14423
+ size: "tiny",
14424
+ onClick: function onClick() {
14425
+ setDefaultComponent(value);
14426
+ },
14427
+ "data-test": "DesignSystem-EditableInput--Discard"
14428
+ }), /*#__PURE__*/React.createElement(Button, {
14429
+ icon: "check",
14430
+ appearance: "primary",
14431
+ size: "tiny",
14432
+ disabled: disableSaveAction,
14433
+ onClick: onSaveChanges,
14434
+ "data-test": "DesignSystem-EditableInput--Save"
14435
+ })))
14436
+ );
14179
14437
  };
14180
14438
  EditableInput.defaultProps = {
14181
14439
  size: 'regular',
@@ -14250,14 +14508,21 @@ var EditableChipInput = function EditableChipInput(props) {
14250
14508
  var onChangeHandler = function onChangeHandler(eventType) {
14251
14509
  switch (eventType) {
14252
14510
  case 'edit':
14253
- setShowComponent(true);
14511
+ {
14512
+ setShowComponent(true);
14513
+ break;
14514
+ }
14254
14515
 
14255
14516
  case 'hover':
14256
- return;
14517
+ {
14518
+ break;
14519
+ }
14257
14520
 
14258
14521
  case 'default':
14259
- setShowComponent(false);
14260
- return;
14522
+ {
14523
+ setShowComponent(false);
14524
+ break;
14525
+ }
14261
14526
  }
14262
14527
  };
14263
14528
 
@@ -14413,19 +14678,24 @@ var Step = function Step(props) {
14413
14678
 
14414
14679
  var iconAppearance = completed ? 'info' : disabled ? 'disabled' : active ? 'info' : 'default';
14415
14680
  var appearance = active ? 'link' : disabled ? 'disabled' : 'default';
14416
- return /*#__PURE__*/React.createElement("div", {
14417
- "data-test": "DesignSystem-Step",
14418
- className: StepClass,
14419
- onClick: onClickHandle
14420
- }, /*#__PURE__*/React.createElement(Icon, {
14421
- "data-test": "DesignSystem-Step--Icon",
14422
- name: completed ? 'check_circle' : 'radio_button_unchecked',
14423
- appearance: iconAppearance,
14424
- className: "mr-3 my-4"
14425
- }), label && /*#__PURE__*/React.createElement(Text, {
14426
- weight: "medium",
14427
- appearance: appearance
14428
- }, label));
14681
+ return (
14682
+ /*#__PURE__*/
14683
+ // TODO(a11y)
14684
+ // eslint-disable-next-line
14685
+ React.createElement("div", {
14686
+ "data-test": "DesignSystem-Step",
14687
+ className: StepClass,
14688
+ onClick: onClickHandle
14689
+ }, /*#__PURE__*/React.createElement(Icon, {
14690
+ "data-test": "DesignSystem-Step--Icon",
14691
+ name: completed ? 'check_circle' : 'radio_button_unchecked',
14692
+ appearance: iconAppearance,
14693
+ className: "mr-3 my-4"
14694
+ }), label && /*#__PURE__*/React.createElement(Text, {
14695
+ weight: "medium",
14696
+ appearance: appearance
14697
+ }, label))
14698
+ );
14429
14699
  };
14430
14700
  Step.displayName = 'Step';
14431
14701
 
@@ -15275,14 +15545,19 @@ var TabsWrapper = function TabsWrapper(props) {
15275
15545
  label = _child$props.label,
15276
15546
  disabled = _child$props.disabled;
15277
15547
  var tabHeaderClass = classnames((_classNames2 = {}, _defineProperty$2(_classNames2, 'Tab', true), _defineProperty$2(_classNames2, 'Tab--disabled', disabled), _defineProperty$2(_classNames2, 'Tab--active', !disabled && active === index), _classNames2));
15278
- return /*#__PURE__*/React.createElement("div", {
15279
- "data-test": "DesignSystem-Tabs--Header",
15280
- key: index,
15281
- className: tabHeaderClass,
15282
- onClick: function onClick() {
15283
- return !disabled && tabClickHandler(index);
15284
- }
15285
- }, label);
15548
+ return (
15549
+ /*#__PURE__*/
15550
+ // TODO(a11y)
15551
+ // eslint-disable-next-line
15552
+ React.createElement("div", {
15553
+ "data-test": "DesignSystem-Tabs--Header",
15554
+ key: index,
15555
+ className: tabHeaderClass,
15556
+ onClick: function onClick() {
15557
+ return !disabled && tabClickHandler(index);
15558
+ }
15559
+ }, label)
15560
+ );
15286
15561
  });
15287
15562
  return /*#__PURE__*/React.createElement("div", _extends$3({
15288
15563
  "data-test": "DesignSystem-TabsWrapper"
@@ -15432,21 +15707,26 @@ var Tabs = function Tabs(props) {
15432
15707
  var currentTabProp = children && 'props' in tab ? tab.props : tab;
15433
15708
  var disabled = currentTabProp.disabled;
15434
15709
  var tabHeaderClass = classnames((_classNames4 = {}, _defineProperty$2(_classNames4, 'Tab', true), _defineProperty$2(_classNames4, 'Tab--disabled', disabled), _defineProperty$2(_classNames4, 'Tab--active', !disabled && activeIndex === index), _classNames4));
15435
- return /*#__PURE__*/React.createElement("div", {
15436
- ref: function ref(element) {
15437
- return element && !disabled && tabRefs.push(element);
15438
- },
15439
- "data-test": "DesignSystem-Tabs--Tab",
15440
- key: index,
15441
- className: tabHeaderClass,
15442
- onClick: function onClick() {
15443
- return !disabled && tabClickHandler(index);
15444
- },
15445
- onKeyDown: function onKeyDown(event) {
15446
- return tabKeyDownHandler(event, index);
15447
- },
15448
- tabIndex: activeIndex === index ? 0 : -1
15449
- }, renderTab(currentTabProp, index));
15710
+ return (
15711
+ /*#__PURE__*/
15712
+ // TODO(a11y)
15713
+ // eslint-disable-next-line
15714
+ React.createElement("div", {
15715
+ ref: function ref(element) {
15716
+ return element && !disabled && tabRefs.push(element);
15717
+ },
15718
+ "data-test": "DesignSystem-Tabs--Tab",
15719
+ key: index,
15720
+ className: tabHeaderClass,
15721
+ onClick: function onClick() {
15722
+ return !disabled && tabClickHandler(index);
15723
+ },
15724
+ onKeyDown: function onKeyDown(event) {
15725
+ return tabKeyDownHandler(event, index);
15726
+ },
15727
+ tabIndex: activeIndex === index ? 0 : -1
15728
+ }, renderTab(currentTabProp, index))
15729
+ );
15450
15730
  });
15451
15731
  return /*#__PURE__*/React.createElement("div", _extends$3({
15452
15732
  "data-test": "DesignSystem-Tabs"
@@ -16597,38 +16877,43 @@ var FileUploaderItem = function FileUploaderItem(props) {
16597
16877
  var name = file.name;
16598
16878
  var baseProps = extractBaseProps(props);
16599
16879
  var FileItemClass = classnames(_defineProperty$2({}, 'FileUploaderItem', true), className);
16600
- return /*#__PURE__*/React.createElement("div", _extends$3({}, baseProps, {
16601
- "data-test": "DesignSystem-FileUploader--Item",
16602
- className: FileItemClass,
16603
- onClick: function onClick() {
16604
- return _onClick && _onClick(file, id);
16605
- }
16606
- }), /*#__PURE__*/React.createElement("div", {
16607
- className: "FileUploaderItem-file"
16608
- }, /*#__PURE__*/React.createElement(Text, {
16609
- className: "FileUploaderItem-text",
16610
- appearance: status === 'completed' ? 'default' : 'subtle'
16611
- }, name), /*#__PURE__*/React.createElement("div", {
16612
- className: "d-flex align-items-center"
16613
- }, /*#__PURE__*/React.createElement(FileUploaderStatus, {
16614
- file: file,
16615
- id: id,
16616
- status: status,
16617
- progress: progress,
16618
- onRetry: function onRetry() {
16619
- return _onRetry && _onRetry(file, id);
16620
- }
16621
- }), /*#__PURE__*/React.createElement(Button, {
16622
- "data-test": "DesignSystem-FileUploader--CancelButton",
16623
- appearance: "transparent",
16624
- size: "regular",
16625
- onClick: function onClick() {
16626
- return onDelete && onDelete(file, id);
16627
- },
16628
- icon: "close"
16629
- }))), status === 'error' && /*#__PURE__*/React.createElement(Caption, {
16630
- error: true
16631
- }, errorMessage));
16880
+ return (
16881
+ /*#__PURE__*/
16882
+ // TODO(a11y)
16883
+ // eslint-disable-next-line
16884
+ React.createElement("div", _extends$3({}, baseProps, {
16885
+ "data-test": "DesignSystem-FileUploader--Item",
16886
+ className: FileItemClass,
16887
+ onClick: function onClick() {
16888
+ return _onClick && _onClick(file, id);
16889
+ }
16890
+ }), /*#__PURE__*/React.createElement("div", {
16891
+ className: "FileUploaderItem-file"
16892
+ }, /*#__PURE__*/React.createElement(Text, {
16893
+ className: "FileUploaderItem-text",
16894
+ appearance: status === 'completed' ? 'default' : 'subtle'
16895
+ }, name), /*#__PURE__*/React.createElement("div", {
16896
+ className: "d-flex align-items-center"
16897
+ }, /*#__PURE__*/React.createElement(FileUploaderStatus, {
16898
+ file: file,
16899
+ id: id,
16900
+ status: status,
16901
+ progress: progress,
16902
+ onRetry: function onRetry() {
16903
+ return _onRetry && _onRetry(file, id);
16904
+ }
16905
+ }), /*#__PURE__*/React.createElement(Button, {
16906
+ "data-test": "DesignSystem-FileUploader--CancelButton",
16907
+ appearance: "transparent",
16908
+ size: "regular",
16909
+ onClick: function onClick() {
16910
+ return onDelete && onDelete(file, id);
16911
+ },
16912
+ icon: "close"
16913
+ }))), status === 'error' && /*#__PURE__*/React.createElement(Caption, {
16914
+ error: true
16915
+ }, errorMessage))
16916
+ );
16632
16917
  };
16633
16918
  FileUploaderItem.defaultProps = {
16634
16919
  status: 'completed',
@@ -17124,7 +17409,11 @@ var HeaderCell = function HeaderCell(props) {
17124
17409
  return onMenuChange(name, selected);
17125
17410
  },
17126
17411
  minWidth: 176
17127
- }))), schema.resizable && /*#__PURE__*/React.createElement("span", {
17412
+ }))), schema.resizable &&
17413
+ /*#__PURE__*/
17414
+ //TODO(a11y)
17415
+ //eslint-disable-next-line
17416
+ React.createElement("span", {
17128
17417
  className: "Grid-cellResize",
17129
17418
  onMouseDown: function onMouseDown() {
17130
17419
  resizeCol({
@@ -17699,10 +17988,10 @@ var VirtualScroll = /*#__PURE__*/function (_React$Component) {
17699
17988
  length = _this$props2.length,
17700
17989
  buffer = _this$props2.buffer;
17701
17990
  _this$props2.offset;
17702
- _this$props2.renderItem;
17991
+ _this$props2.renderItems;
17703
17992
  _this$props2.minItemHeight;
17704
17993
  var forwardRef = _this$props2.forwardRef,
17705
- rest = _objectWithoutProperties(_this$props2, ["totalLength", "length", "buffer", "offset", "renderItem", "minItemHeight", "forwardRef"]);
17994
+ rest = _objectWithoutProperties(_this$props2, ["totalLength", "length", "buffer", "offset", "renderItems", "minItemHeight", "forwardRef"]);
17706
17995
 
17707
17996
  var _this$state = this.state,
17708
17997
  init = _this$state.init,
@@ -17746,6 +18035,7 @@ _defineProperty(VirtualScroll, "defaultProps", {
17746
18035
 
17747
18036
  var index = /*#__PURE__*/React.forwardRef(function (props, ref) {
17748
18037
  return /*#__PURE__*/React.createElement(VirtualScroll, _extends({
18038
+ key: props.totalLength,
17749
18039
  forwardRef: ref
17750
18040
  }, props));
17751
18041
  });
@@ -17794,17 +18084,22 @@ var GridRow = function GridRow(props) {
17794
18084
 
17795
18085
  var renderCheckbox = function renderCheckbox(show) {
17796
18086
  if (!show || !withCheckbox) return null;
17797
- return /*#__PURE__*/React.createElement("div", {
17798
- className: "Grid-cell Grid-cell--body Grid-cell--checkbox",
17799
- onClick: function onClick(e) {
17800
- return e.stopPropagation();
17801
- }
17802
- }, loading ? /*#__PURE__*/React.createElement(Placeholder, null) : /*#__PURE__*/React.createElement(Checkbox, {
17803
- checked: !!data._selected,
17804
- onChange: function onChange(event) {
17805
- onSelect(rI, event.target.checked);
17806
- }
17807
- }));
18087
+ return (
18088
+ /*#__PURE__*/
18089
+ // TODO(a11y)
18090
+ // eslint-disable-next-line
18091
+ React.createElement("div", {
18092
+ className: "Grid-cell Grid-cell--body Grid-cell--checkbox",
18093
+ onClick: function onClick(e) {
18094
+ return e.stopPropagation();
18095
+ }
18096
+ }, loading ? /*#__PURE__*/React.createElement(Placeholder, null) : /*#__PURE__*/React.createElement(Checkbox, {
18097
+ checked: !!data._selected,
18098
+ onChange: function onChange(event) {
18099
+ onSelect(rI, event.target.checked);
18100
+ }
18101
+ }))
18102
+ );
17808
18103
  };
17809
18104
 
17810
18105
  var renderSchema = function renderSchema(currSchema, shouldRenderCheckbox, pinned) {
@@ -19174,6 +19469,7 @@ var Table = /*#__PURE__*/function (_React$Component) {
19174
19469
  }, headerAttr), headerChildren)), /*#__PURE__*/React.createElement("div", {
19175
19470
  className: "Table-grid"
19176
19471
  }, /*#__PURE__*/React.createElement(Grid, _extends$3({}, this.state, {
19472
+ key: this.state.searchTerm,
19177
19473
  updateData: this.updateData,
19178
19474
  updateSchema: this.updateSchema,
19179
19475
  updateSortingList: this.updateSortingList,
@@ -19331,16 +19627,21 @@ var VerticalNavigation = function VerticalNavigation(props) {
19331
19627
 
19332
19628
  var isActive = isMenuActive(menus, subMenu, active);
19333
19629
  var subMenuClasses = classnames(menuClasses, (_classNames2 = {}, _defineProperty$2(_classNames2, 'Navigation-menu--subMenu', true), _defineProperty$2(_classNames2, 'Navigation-menu--active', isActive), _classNames2));
19334
- return /*#__PURE__*/React.createElement("div", {
19335
- "data-test": "DesignSystem-Navigation-VerticalNavigation--subMenu",
19336
- key: ind,
19337
- className: subMenuClasses,
19338
- onClick: function onClick() {
19339
- return onClickHandler(subMenu);
19340
- }
19341
- }, /*#__PURE__*/React.createElement(Text, {
19342
- appearance: getTextAppearance(isActive, subMenu.disabled)
19343
- }, subMenu.label));
19630
+ return (
19631
+ /*#__PURE__*/
19632
+ // TODO(a11y)
19633
+ // eslint-disable-next-line
19634
+ React.createElement("div", {
19635
+ "data-test": "DesignSystem-Navigation-VerticalNavigation--subMenu",
19636
+ key: ind,
19637
+ className: subMenuClasses,
19638
+ onClick: function onClick() {
19639
+ return onClickHandler(subMenu);
19640
+ }
19641
+ }, /*#__PURE__*/React.createElement(Text, {
19642
+ appearance: getTextAppearance(isActive, subMenu.disabled)
19643
+ }, subMenu.label))
19644
+ );
19344
19645
  })));
19345
19646
  });
19346
19647
  var footerClasses = classnames(_defineProperty$2({
@@ -19550,32 +19851,37 @@ var FileListItem = function FileListItem(props) {
19550
19851
  }
19551
19852
  };
19552
19853
 
19553
- return /*#__PURE__*/React.createElement("div", _extends$3({}, baseProps, {
19554
- className: FileItemClass,
19555
- onClick: onClickHandler,
19556
- "data-test": "DesignSystem-FileListItem"
19557
- }), /*#__PURE__*/React.createElement("div", {
19558
- className: "FileItem-file"
19559
- }, /*#__PURE__*/React.createElement("div", {
19560
- className: "FileItem-fileContent"
19561
- }, /*#__PURE__*/React.createElement(FileIcon, {
19562
- file: file,
19563
- status: status,
19564
- progress: progress
19565
- }), /*#__PURE__*/React.createElement(Text, {
19566
- "data-test": "DesignSystem-FileListItem--Name",
19567
- className: "FileItem-text",
19568
- appearance: status === 'completed' ? 'default' : 'subtle'
19569
- }, name)), /*#__PURE__*/React.createElement("div", {
19570
- className: "FileItem-actions"
19571
- }, /*#__PURE__*/React.createElement(Text, {
19572
- className: "FileItem-size",
19573
- appearance: 'subtle',
19574
- "data-test": "DesignSystem-FileListItem--Size"
19575
- }, fileSize || file.size), !!actions && actions)), status === 'error' && /*#__PURE__*/React.createElement(Caption, {
19576
- className: 'FileItem-error',
19577
- error: true
19578
- }, errorMessage));
19854
+ return (
19855
+ /*#__PURE__*/
19856
+ // TODO(a11y)
19857
+ // eslint-disable-next-line
19858
+ React.createElement("div", _extends$3({}, baseProps, {
19859
+ className: FileItemClass,
19860
+ onClick: onClickHandler,
19861
+ "data-test": "DesignSystem-FileListItem"
19862
+ }), /*#__PURE__*/React.createElement("div", {
19863
+ className: "FileItem-file"
19864
+ }, /*#__PURE__*/React.createElement("div", {
19865
+ className: "FileItem-fileContent"
19866
+ }, /*#__PURE__*/React.createElement(FileIcon, {
19867
+ file: file,
19868
+ status: status,
19869
+ progress: progress
19870
+ }), /*#__PURE__*/React.createElement(Text, {
19871
+ "data-test": "DesignSystem-FileListItem--Name",
19872
+ className: "FileItem-text",
19873
+ appearance: status === 'completed' ? 'default' : 'subtle'
19874
+ }, name)), /*#__PURE__*/React.createElement("div", {
19875
+ className: "FileItem-actions"
19876
+ }, /*#__PURE__*/React.createElement(Text, {
19877
+ className: "FileItem-size",
19878
+ appearance: 'subtle',
19879
+ "data-test": "DesignSystem-FileListItem--Size"
19880
+ }, fileSize || file.size), !!actions && actions)), status === 'error' && /*#__PURE__*/React.createElement(Caption, {
19881
+ className: 'FileItem-error',
19882
+ error: true
19883
+ }, errorMessage))
19884
+ );
19579
19885
  };
19580
19886
  FileListItem.defaultProps = {
19581
19887
  progress: 0,
@@ -19739,54 +20045,62 @@ var VerificationCodeInput = function VerificationCodeInput(props) {
19739
20045
 
19740
20046
  switch (e.key) {
19741
20047
  case KEY_CODE.backspace:
19742
- e.preventDefault();
20048
+ {
20049
+ e.preventDefault();
19743
20050
 
19744
- var vals = _toConsumableArray(values);
20051
+ var vals = _toConsumableArray(values);
19745
20052
 
19746
- if (values[index]) {
19747
- vals[index] = '';
19748
- setValues(vals);
19749
- } else if (prev && prev.current) {
19750
- vals[prevIndex] = '';
19751
- prev.current.focus({
19752
- preventScroll: true
19753
- });
19754
- setValues(vals);
19755
- }
20053
+ if (values[index]) {
20054
+ vals[index] = '';
20055
+ setValues(vals);
20056
+ } else if (prev && prev.current) {
20057
+ vals[prevIndex] = '';
20058
+ prev.current.focus({
20059
+ preventScroll: true
20060
+ });
20061
+ setValues(vals);
20062
+ }
19756
20063
 
19757
- break;
20064
+ break;
20065
+ }
19758
20066
 
19759
20067
  case KEY_CODE.left:
19760
- e.preventDefault();
20068
+ {
20069
+ e.preventDefault();
19761
20070
 
19762
- if (prev && prev.current) {
19763
- prev.current.focus({
19764
- preventScroll: true
19765
- });
19766
- }
20071
+ if (prev && prev.current) {
20072
+ prev.current.focus({
20073
+ preventScroll: true
20074
+ });
20075
+ }
19767
20076
 
19768
- break;
20077
+ break;
20078
+ }
19769
20079
 
19770
20080
  case KEY_CODE.right:
19771
- e.preventDefault();
20081
+ {
20082
+ e.preventDefault();
19772
20083
 
19773
- if (nextRef && nextRef.current) {
19774
- nextRef.current.focus({
19775
- preventScroll: true
19776
- });
19777
- }
20084
+ if (nextRef && nextRef.current) {
20085
+ nextRef.current.focus({
20086
+ preventScroll: true
20087
+ });
20088
+ }
19778
20089
 
19779
- break;
20090
+ break;
20091
+ }
19780
20092
 
19781
20093
  case KEY_CODE.up:
19782
20094
  case KEY_CODE.down:
19783
20095
  case KEY_CODE.e:
19784
20096
  case KEY_CODE.E:
19785
- if (type === 'number') {
19786
- e.preventDefault();
19787
- }
20097
+ {
20098
+ if (type === 'number') {
20099
+ e.preventDefault();
20100
+ }
19788
20101
 
19789
- break;
20102
+ break;
20103
+ }
19790
20104
  }
19791
20105
  };
19792
20106
 
@@ -19845,10 +20159,10 @@ var InlineMessage = function InlineMessage(props) {
19845
20159
  name: IconMapping[appearance],
19846
20160
  appearance: appearance,
19847
20161
  className: IconClass
19848
- }), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Text, {
20162
+ }), /*#__PURE__*/React.createElement(Text, {
19849
20163
  "data-test": "DesignSystem-InlineMessage--Description",
19850
20164
  className: DescriptionClass
19851
- }, description)));
20165
+ }, description));
19852
20166
  };
19853
20167
  InlineMessage.displayName = 'InlineMessage';
19854
20168
  InlineMessage.defaultProps = {
@@ -19957,7 +20271,7 @@ var ChoiceList = function ChoiceList(props) {
19957
20271
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("fieldset", {
19958
20272
  className: ChoiceListClass,
19959
20273
  "data-test": "DesignSystem-ChoiceList-Wrapper"
19960
- }, title && title.trim() && /*#__PURE__*/React.createElement(Label, null, title.trim()), !!allowMultiple ? /*#__PURE__*/React.createElement("div", {
20274
+ }, title && title.trim() && /*#__PURE__*/React.createElement(Label, null, title.trim()), allowMultiple ? /*#__PURE__*/React.createElement("div", {
19961
20275
  className: "".concat(alignment === 'horizontal' ? ChoiceHorizontalClass : ChoiceListVerticalClass)
19962
20276
  }, renderCheckbox(choices, handleOnChange, disabled, size, alignment, selected)) : /*#__PURE__*/React.createElement("div", {
19963
20277
  className: "".concat(alignment === 'horizontal' ? ChoiceHorizontalClass : ChoiceListVerticalClass)
@@ -19971,6 +20285,26 @@ ChoiceList.defaultProps = {
19971
20285
  disabled: false
19972
20286
  };
19973
20287
 
19974
- var version = "2.5.0-4";
20288
+ var Divider = function Divider(props) {
20289
+ var _classNames;
20290
+
20291
+ var vertical = props.vertical,
20292
+ appearance = props.appearance,
20293
+ className = props.className;
20294
+ var baseProps = extractBaseProps(props);
20295
+ var DividerClass = classnames((_classNames = {}, _defineProperty$2(_classNames, 'Divider', true), _defineProperty$2(_classNames, 'Divider--horizontal', !vertical), _defineProperty$2(_classNames, 'Divider--vertical', vertical), _defineProperty$2(_classNames, 'Divider--basic', appearance !== 'header'), _defineProperty$2(_classNames, 'Divider--header', !vertical && appearance === 'header'), _classNames), className);
20296
+ return /*#__PURE__*/React.createElement("hr", _extends$3({
20297
+ "data-test": "DesignSystem-Divider"
20298
+ }, baseProps, {
20299
+ className: DividerClass
20300
+ }));
20301
+ };
20302
+ Divider.displayName = 'Divider';
20303
+ Divider.defaultProps = {
20304
+ appearance: 'basic',
20305
+ vertical: false
20306
+ };
20307
+
20308
+ var version = "2.6.0";
19975
20309
 
19976
- export { Avatar, AvatarGroup, Backdrop, Badge, Breadcrumbs, Button, Calendar, Caption, Card, CardBody, CardFooter, CardHeader, CardSubdued, ChatMessage, Checkbox, Chip, ChipGroup, ChipInput, ChoiceList, Collapsible, Column, DatePicker, DateRangePicker, Dialog, Dropdown, Dropzone, EditableChipInput, EditableDropdown, EditableInput, EmptyState, FileList, FileUploader, FileUploaderList, FullscreenModal, Grid, GridCell, Heading, HorizontalNav, Icon, InlineMessage, Input, InputMask, Label, Legend, Link, List, Message, MetaList, MetricInput, Modal, ModalBody, ModalDescription, ModalFooter, ModalHeader, MultiSlider, Navigation, OutsideClick, PageHeader, Pagination, Paragraph, Pills, Placeholder, PlaceholderParagraph, Popover, ProgressBar, ProgressRing, Radio, RangeSlider, Row, Sidesheet, Slider, Spinner, StatusHint, Stepper, Subheading, Switch, Tab, Table, Tabs, TabsWrapper, Text, Textarea, TimePicker, Toast, Tooltip, index$1 as Utils, VerificationCodeInput, VerticalNav, version };
20310
+ export { Avatar, AvatarGroup, Backdrop, Badge, Breadcrumbs, Button, Calendar, Caption, Card, CardBody, CardFooter, CardHeader, CardSubdued, ChatMessage, Checkbox, Chip, ChipGroup, ChipInput, ChoiceList, Collapsible, Column, DatePicker, DateRangePicker, Dialog, Divider, Dropdown, Dropzone, EditableChipInput, EditableDropdown, EditableInput, EmptyState, FileList, FileUploader, FileUploaderList, FullscreenModal, Grid, GridCell, Heading, HorizontalNav, Icon, InlineMessage, Input, InputMask, Label, Legend, Link, List, Message, MetaList, MetricInput, Modal, ModalBody, ModalDescription, ModalFooter, ModalHeader, MultiSlider, Navigation, OutsideClick, PageHeader, Pagination, Paragraph, Pills, Placeholder, PlaceholderParagraph, Popover, ProgressBar, ProgressRing, Radio, RangeSlider, Row, Sidesheet, Slider, Spinner, StatusHint, Stepper, Subheading, Switch, Tab, Table, Tabs, TabsWrapper, Text, Textarea, TimePicker, Toast, Tooltip, index$1 as Utils, VerificationCodeInput, VerticalNav, version };