@pega/cosmos-react-core 2.0.0-dev.9.2 → 2.0.0-rc.2

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 (810) hide show
  1. package/README.md +3 -3
  2. package/lib/components/Actions/Actions.js +1 -1
  3. package/lib/components/Actions/Actions.js.map +1 -1
  4. package/lib/components/AppShell/AppHeader.d.ts +2 -1
  5. package/lib/components/AppShell/AppHeader.d.ts.map +1 -1
  6. package/lib/components/AppShell/AppHeader.js +4 -9
  7. package/lib/components/AppShell/AppHeader.js.map +1 -1
  8. package/lib/components/AppShell/AppShell.d.ts.map +1 -1
  9. package/lib/components/AppShell/AppShell.js +89 -62
  10. package/lib/components/AppShell/AppShell.js.map +1 -1
  11. package/lib/components/AppShell/AppShell.styles.d.ts +19 -16
  12. package/lib/components/AppShell/AppShell.styles.d.ts.map +1 -1
  13. package/lib/components/AppShell/AppShell.styles.js +227 -173
  14. package/lib/components/AppShell/AppShell.styles.js.map +1 -1
  15. package/lib/components/AppShell/AppShell.types.d.ts +7 -7
  16. package/lib/components/AppShell/AppShell.types.d.ts.map +1 -1
  17. package/lib/components/AppShell/AppShell.types.js.map +1 -1
  18. package/lib/components/AppShell/AppShellContext.d.ts +3 -0
  19. package/lib/components/AppShell/AppShellContext.d.ts.map +1 -1
  20. package/lib/components/AppShell/AppShellContext.js +3 -1
  21. package/lib/components/AppShell/AppShellContext.js.map +1 -1
  22. package/lib/components/AppShell/AppShellList.d.ts +4 -3
  23. package/lib/components/AppShell/AppShellList.d.ts.map +1 -1
  24. package/lib/components/AppShell/AppShellList.js +24 -19
  25. package/lib/components/AppShell/AppShellList.js.map +1 -1
  26. package/lib/components/AppShell/Drawer.d.ts.map +1 -1
  27. package/lib/components/AppShell/Drawer.js +7 -8
  28. package/lib/components/AppShell/Drawer.js.map +1 -1
  29. package/lib/components/AppShell/Operator.js +3 -5
  30. package/lib/components/AppShell/Operator.js.map +1 -1
  31. package/lib/components/AppShell/SkipNavigation.d.ts.map +1 -1
  32. package/lib/components/AppShell/SkipNavigation.js +30 -39
  33. package/lib/components/AppShell/SkipNavigation.js.map +1 -1
  34. package/lib/components/Avatar/Avatar.d.ts.map +1 -1
  35. package/lib/components/Avatar/Avatar.js +5 -4
  36. package/lib/components/Avatar/Avatar.js.map +1 -1
  37. package/lib/components/Backdrop/Backdrop.d.ts +1 -1
  38. package/lib/components/Backdrop/Backdrop.d.ts.map +1 -1
  39. package/lib/components/Backdrop/Backdrop.js +7 -6
  40. package/lib/components/Backdrop/Backdrop.js.map +1 -1
  41. package/lib/components/Badges/Alert.d.ts +2 -2
  42. package/lib/components/Badges/Alert.d.ts.map +1 -1
  43. package/lib/components/Badges/Alert.js +1 -1
  44. package/lib/components/Badges/Alert.js.map +1 -1
  45. package/lib/components/Badges/Count.js +1 -1
  46. package/lib/components/Badges/Count.js.map +1 -1
  47. package/lib/components/Badges/Selection.d.ts.map +1 -1
  48. package/lib/components/Badges/Selection.js +10 -9
  49. package/lib/components/Badges/Selection.js.map +1 -1
  50. package/lib/components/Badges/Status.d.ts +2 -2
  51. package/lib/components/Badges/Status.d.ts.map +1 -1
  52. package/lib/components/Badges/Status.js +1 -1
  53. package/lib/components/Badges/Status.js.map +1 -1
  54. package/lib/components/Badges/Tag.js +1 -1
  55. package/lib/components/Badges/Tag.js.map +1 -1
  56. package/lib/components/Banner/Banner.d.ts +2 -2
  57. package/lib/components/Banner/Banner.d.ts.map +1 -1
  58. package/lib/components/Banner/Banner.js +6 -8
  59. package/lib/components/Banner/Banner.js.map +1 -1
  60. package/lib/components/Boolean/BooleanDisplay.d.ts +2 -2
  61. package/lib/components/Boolean/BooleanDisplay.d.ts.map +1 -1
  62. package/lib/components/Boolean/BooleanDisplay.js +1 -2
  63. package/lib/components/Boolean/BooleanDisplay.js.map +1 -1
  64. package/lib/components/Breadcrumbs/Breadcrumbs.d.ts +2 -2
  65. package/lib/components/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
  66. package/lib/components/Breadcrumbs/Breadcrumbs.js +13 -11
  67. package/lib/components/Breadcrumbs/Breadcrumbs.js.map +1 -1
  68. package/lib/components/Button/BareButton.d.ts.map +1 -1
  69. package/lib/components/Button/BareButton.js +21 -2
  70. package/lib/components/Button/BareButton.js.map +1 -1
  71. package/lib/components/Button/BareRoleButton.d.ts +12 -0
  72. package/lib/components/Button/BareRoleButton.d.ts.map +1 -0
  73. package/lib/components/Button/BareRoleButton.js +20 -0
  74. package/lib/components/Button/BareRoleButton.js.map +1 -0
  75. package/lib/components/Button/Button.d.ts +5 -0
  76. package/lib/components/Button/Button.d.ts.map +1 -1
  77. package/lib/components/Button/Button.js +34 -10
  78. package/lib/components/Button/Button.js.map +1 -1
  79. package/lib/components/Card/Card.d.ts.map +1 -1
  80. package/lib/components/Card/Card.js +3 -2
  81. package/lib/components/Card/Card.js.map +1 -1
  82. package/lib/components/Card/CardContent.d.ts.map +1 -1
  83. package/lib/components/Card/CardContent.js +5 -4
  84. package/lib/components/Card/CardContent.js.map +1 -1
  85. package/lib/components/Card/CardFooter.d.ts.map +1 -1
  86. package/lib/components/Card/CardFooter.js +5 -4
  87. package/lib/components/Card/CardFooter.js.map +1 -1
  88. package/lib/components/Card/CardHeader.d.ts +3 -1
  89. package/lib/components/Card/CardHeader.d.ts.map +1 -1
  90. package/lib/components/Card/CardHeader.js +9 -7
  91. package/lib/components/Card/CardHeader.js.map +1 -1
  92. package/lib/components/Card/CardMedia.js +1 -1
  93. package/lib/components/Card/CardMedia.js.map +1 -1
  94. package/lib/components/Card/CollapsibleCard.d.ts.map +1 -1
  95. package/lib/components/Card/CollapsibleCard.js +5 -7
  96. package/lib/components/Card/CollapsibleCard.js.map +1 -1
  97. package/lib/components/Card/SelectableCard.js +1 -1
  98. package/lib/components/Card/SelectableCard.js.map +1 -1
  99. package/lib/components/Checkbox/Checkbox.d.ts +2 -2
  100. package/lib/components/Checkbox/Checkbox.d.ts.map +1 -1
  101. package/lib/components/Checkbox/Checkbox.js +1 -1
  102. package/lib/components/Checkbox/Checkbox.js.map +1 -1
  103. package/lib/components/ColorPicker/ColorPicker.d.ts +2 -2
  104. package/lib/components/ColorPicker/ColorPicker.d.ts.map +1 -1
  105. package/lib/components/ColorPicker/ColorPicker.js +8 -11
  106. package/lib/components/ColorPicker/ColorPicker.js.map +1 -1
  107. package/lib/components/ComboBox/ComboBox.d.ts +1 -1
  108. package/lib/components/ComboBox/ComboBox.d.ts.map +1 -1
  109. package/lib/components/ComboBox/ComboBox.js +30 -33
  110. package/lib/components/ComboBox/ComboBox.js.map +1 -1
  111. package/lib/components/ComboBox/ComboBox.types.d.ts +2 -1
  112. package/lib/components/ComboBox/ComboBox.types.d.ts.map +1 -1
  113. package/lib/components/ComboBox/ComboBox.types.js.map +1 -1
  114. package/lib/components/ComboBox/ComboBoxInput.js +4 -4
  115. package/lib/components/ComboBox/ComboBoxInput.js.map +1 -1
  116. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.d.ts.map +1 -1
  117. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.js +23 -29
  118. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.js.map +1 -1
  119. package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.d.ts.map +1 -1
  120. package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.js +16 -12
  121. package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.js.map +1 -1
  122. package/lib/components/Configuration/Configuration.js +11 -13
  123. package/lib/components/Configuration/Configuration.js.map +1 -1
  124. package/lib/components/Currency/CurrencyDisplay.d.ts +6 -2
  125. package/lib/components/Currency/CurrencyDisplay.d.ts.map +1 -1
  126. package/lib/components/Currency/CurrencyDisplay.js +11 -7
  127. package/lib/components/Currency/CurrencyDisplay.js.map +1 -1
  128. package/lib/components/Currency/CurrencyInput.d.ts.map +1 -1
  129. package/lib/components/Currency/CurrencyInput.js +16 -16
  130. package/lib/components/Currency/CurrencyInput.js.map +1 -1
  131. package/lib/components/Currency/CurrencyInput.types.d.ts +6 -2
  132. package/lib/components/Currency/CurrencyInput.types.d.ts.map +1 -1
  133. package/lib/components/Currency/CurrencyInput.types.js.map +1 -1
  134. package/lib/components/Currency/utils.d.ts +12 -1
  135. package/lib/components/Currency/utils.d.ts.map +1 -1
  136. package/lib/components/Currency/utils.js +30 -2
  137. package/lib/components/Currency/utils.js.map +1 -1
  138. package/lib/components/DateTime/DateTime.types.d.ts +2 -1
  139. package/lib/components/DateTime/DateTime.types.d.ts.map +1 -1
  140. package/lib/components/DateTime/DateTime.types.js.map +1 -1
  141. package/lib/components/DateTime/DateTimeDisplay.d.ts +1 -1
  142. package/lib/components/DateTime/DateTimeDisplay.d.ts.map +1 -1
  143. package/lib/components/DateTime/DateTimeDisplay.js +14 -3
  144. package/lib/components/DateTime/DateTimeDisplay.js.map +1 -1
  145. package/lib/components/DateTime/DurationDisplay.d.ts.map +1 -1
  146. package/lib/components/DateTime/DurationDisplay.js +11 -6
  147. package/lib/components/DateTime/DurationDisplay.js.map +1 -1
  148. package/lib/components/DateTime/Input/DateInput.d.ts.map +1 -1
  149. package/lib/components/DateTime/Input/DateInput.js +25 -27
  150. package/lib/components/DateTime/Input/DateInput.js.map +1 -1
  151. package/lib/components/DateTime/Input/DateRangeInput.d.ts.map +1 -1
  152. package/lib/components/DateTime/Input/DateRangeInput.js +10 -16
  153. package/lib/components/DateTime/Input/DateRangeInput.js.map +1 -1
  154. package/lib/components/DateTime/Input/DateTime.styles.d.ts.map +1 -1
  155. package/lib/components/DateTime/Input/DateTime.styles.js +14 -3
  156. package/lib/components/DateTime/Input/DateTime.styles.js.map +1 -1
  157. package/lib/components/DateTime/Input/DateTimeInput.d.ts.map +1 -1
  158. package/lib/components/DateTime/Input/DateTimeInput.js +42 -42
  159. package/lib/components/DateTime/Input/DateTimeInput.js.map +1 -1
  160. package/lib/components/DateTime/Input/DayOfWeekInput.d.ts +2 -0
  161. package/lib/components/DateTime/Input/DayOfWeekInput.d.ts.map +1 -1
  162. package/lib/components/DateTime/Input/DayOfWeekInput.js +7 -5
  163. package/lib/components/DateTime/Input/DayOfWeekInput.js.map +1 -1
  164. package/lib/components/DateTime/Input/Duration/DurationInput.d.ts.map +1 -1
  165. package/lib/components/DateTime/Input/Duration/DurationInput.js +3 -3
  166. package/lib/components/DateTime/Input/Duration/DurationInput.js.map +1 -1
  167. package/lib/components/DateTime/Input/Duration/NumberUnit.js +4 -5
  168. package/lib/components/DateTime/Input/Duration/NumberUnit.js.map +1 -1
  169. package/lib/components/DateTime/Input/Duration/Time.d.ts.map +1 -1
  170. package/lib/components/DateTime/Input/Duration/Time.js +12 -15
  171. package/lib/components/DateTime/Input/Duration/Time.js.map +1 -1
  172. package/lib/components/DateTime/Input/MonthInput.d.ts.map +1 -1
  173. package/lib/components/DateTime/Input/MonthInput.js +12 -17
  174. package/lib/components/DateTime/Input/MonthInput.js.map +1 -1
  175. package/lib/components/DateTime/Input/PartInput.js +3 -4
  176. package/lib/components/DateTime/Input/PartInput.js.map +1 -1
  177. package/lib/components/DateTime/Input/QuarterInput.d.ts +9 -0
  178. package/lib/components/DateTime/Input/QuarterInput.d.ts.map +1 -0
  179. package/lib/components/DateTime/Input/QuarterInput.js +102 -0
  180. package/lib/components/DateTime/Input/QuarterInput.js.map +1 -0
  181. package/lib/components/DateTime/Input/TimeInput.d.ts.map +1 -1
  182. package/lib/components/DateTime/Input/TimeInput.js +26 -30
  183. package/lib/components/DateTime/Input/TimeInput.js.map +1 -1
  184. package/lib/components/DateTime/Input/WeekInput.d.ts.map +1 -1
  185. package/lib/components/DateTime/Input/WeekInput.js +22 -23
  186. package/lib/components/DateTime/Input/WeekInput.js.map +1 -1
  187. package/lib/components/DateTime/Input/useAutoFocusNextInput.d.ts.map +1 -1
  188. package/lib/components/DateTime/Input/useAutoFocusNextInput.js +8 -9
  189. package/lib/components/DateTime/Input/useAutoFocusNextInput.js.map +1 -1
  190. package/lib/components/DateTime/Input/usePickerButton.js +4 -4
  191. package/lib/components/DateTime/Input/usePickerButton.js.map +1 -1
  192. package/lib/components/DateTime/Input/utils.d.ts +7 -0
  193. package/lib/components/DateTime/Input/utils.d.ts.map +1 -1
  194. package/lib/components/DateTime/Input/utils.js +52 -10
  195. package/lib/components/DateTime/Input/utils.js.map +1 -1
  196. package/lib/components/DateTime/Picker/Calendar.d.ts.map +1 -1
  197. package/lib/components/DateTime/Picker/Calendar.js +47 -72
  198. package/lib/components/DateTime/Picker/Calendar.js.map +1 -1
  199. package/lib/components/DateTime/Picker/Calendar.styles.d.ts +2 -2
  200. package/lib/components/DateTime/Picker/Calendar.styles.d.ts.map +1 -1
  201. package/lib/components/DateTime/Picker/Calendar.styles.js +16 -7
  202. package/lib/components/DateTime/Picker/Calendar.styles.js.map +1 -1
  203. package/lib/components/DateTime/Picker/DatePicker.d.ts.map +1 -1
  204. package/lib/components/DateTime/Picker/DatePicker.js +13 -17
  205. package/lib/components/DateTime/Picker/DatePicker.js.map +1 -1
  206. package/lib/components/DateTime/Picker/DateRangePicker.d.ts.map +1 -1
  207. package/lib/components/DateTime/Picker/DateRangePicker.js +13 -17
  208. package/lib/components/DateTime/Picker/DateRangePicker.js.map +1 -1
  209. package/lib/components/DateTime/Picker/TimePicker.js +9 -10
  210. package/lib/components/DateTime/Picker/TimePicker.js.map +1 -1
  211. package/lib/components/DateTime/Picker/Weeks.js +9 -11
  212. package/lib/components/DateTime/Picker/Weeks.js.map +1 -1
  213. package/lib/components/DateTime/Picker/utils.d.ts +1 -0
  214. package/lib/components/DateTime/Picker/utils.d.ts.map +1 -1
  215. package/lib/components/DateTime/Picker/utils.js +3 -0
  216. package/lib/components/DateTime/Picker/utils.js.map +1 -1
  217. package/lib/components/DateTime/index.d.ts +2 -0
  218. package/lib/components/DateTime/index.d.ts.map +1 -1
  219. package/lib/components/DateTime/index.js +1 -0
  220. package/lib/components/DateTime/index.js.map +1 -1
  221. package/lib/components/Drawer/Drawer.js +6 -6
  222. package/lib/components/Drawer/Drawer.js.map +1 -1
  223. package/lib/components/Email/EmailDisplay.d.ts +2 -2
  224. package/lib/components/Email/EmailDisplay.d.ts.map +1 -1
  225. package/lib/components/Email/EmailDisplay.js +2 -2
  226. package/lib/components/Email/EmailDisplay.js.map +1 -1
  227. package/lib/components/EmojiPicker/EmojiDisplay.d.ts.map +1 -1
  228. package/lib/components/EmojiPicker/EmojiDisplay.js +1 -1
  229. package/lib/components/EmojiPicker/EmojiDisplay.js.map +1 -1
  230. package/lib/components/EmojiPicker/EmojiPicker.js +3 -4
  231. package/lib/components/EmojiPicker/EmojiPicker.js.map +1 -1
  232. package/lib/components/EmptyState/EmptyState.d.ts +14 -0
  233. package/lib/components/EmptyState/EmptyState.d.ts.map +1 -0
  234. package/lib/components/{NoItems/NoItems.js → EmptyState/EmptyState.js} +11 -8
  235. package/lib/components/EmptyState/EmptyState.js.map +1 -0
  236. package/lib/components/EmptyState/index.d.ts +4 -0
  237. package/lib/components/EmptyState/index.d.ts.map +1 -0
  238. package/lib/components/EmptyState/index.js +3 -0
  239. package/lib/components/EmptyState/index.js.map +1 -0
  240. package/lib/components/ErrorState/ErrorState.d.ts +16 -0
  241. package/lib/components/ErrorState/ErrorState.d.ts.map +1 -0
  242. package/lib/components/ErrorState/ErrorState.js +31 -0
  243. package/lib/components/ErrorState/ErrorState.js.map +1 -0
  244. package/lib/components/ErrorState/index.d.ts +4 -0
  245. package/lib/components/ErrorState/index.d.ts.map +1 -0
  246. package/lib/components/ErrorState/index.js +3 -0
  247. package/lib/components/ErrorState/index.js.map +1 -0
  248. package/lib/components/ExpandCollapse/ExpandCollapse.js +5 -5
  249. package/lib/components/ExpandCollapse/ExpandCollapse.js.map +1 -1
  250. package/lib/components/FieldGroup/FieldGroup.d.ts.map +1 -1
  251. package/lib/components/FieldGroup/FieldGroup.js +6 -7
  252. package/lib/components/FieldGroup/FieldGroup.js.map +1 -1
  253. package/lib/components/FieldGroup/FieldGroupList.d.ts.map +1 -1
  254. package/lib/components/FieldGroup/FieldGroupList.js +7 -6
  255. package/lib/components/FieldGroup/FieldGroupList.js.map +1 -1
  256. package/lib/components/FieldValueList/FieldValueList.d.ts +2 -2
  257. package/lib/components/FieldValueList/FieldValueList.d.ts.map +1 -1
  258. package/lib/components/FieldValueList/FieldValueList.js +5 -7
  259. package/lib/components/FieldValueList/FieldValueList.js.map +1 -1
  260. package/lib/components/File/FileDisplay.d.ts +6 -3
  261. package/lib/components/File/FileDisplay.d.ts.map +1 -1
  262. package/lib/components/File/FileDisplay.js +7 -7
  263. package/lib/components/File/FileDisplay.js.map +1 -1
  264. package/lib/components/File/FileInput.d.ts +3 -3
  265. package/lib/components/File/FileInput.d.ts.map +1 -1
  266. package/lib/components/File/FileInput.js +18 -19
  267. package/lib/components/File/FileInput.js.map +1 -1
  268. package/lib/components/File/FileItem.d.ts +0 -2
  269. package/lib/components/File/FileItem.d.ts.map +1 -1
  270. package/lib/components/File/FileItem.js +3 -4
  271. package/lib/components/File/FileItem.js.map +1 -1
  272. package/lib/components/File/FileUploadItem.d.ts +4 -2
  273. package/lib/components/File/FileUploadItem.d.ts.map +1 -1
  274. package/lib/components/File/FileUploadItem.js +58 -20
  275. package/lib/components/File/FileUploadItem.js.map +1 -1
  276. package/lib/components/File/FileVisual.d.ts +7 -16
  277. package/lib/components/File/FileVisual.d.ts.map +1 -1
  278. package/lib/components/File/FileVisual.js +44 -47
  279. package/lib/components/File/FileVisual.js.map +1 -1
  280. package/lib/components/File/utils.js +2 -3
  281. package/lib/components/File/utils.js.map +1 -1
  282. package/lib/components/Flex/Flex.d.ts +17 -7
  283. package/lib/components/Flex/Flex.d.ts.map +1 -1
  284. package/lib/components/Flex/Flex.js +25 -9
  285. package/lib/components/Flex/Flex.js.map +1 -1
  286. package/lib/components/Form/Form.d.ts +7 -1
  287. package/lib/components/Form/Form.d.ts.map +1 -1
  288. package/lib/components/Form/Form.js +5 -4
  289. package/lib/components/Form/Form.js.map +1 -1
  290. package/lib/components/FormControl/FormControl.d.ts +1 -1
  291. package/lib/components/FormControl/FormControl.d.ts.map +1 -1
  292. package/lib/components/FormControl/FormControl.js +1 -1
  293. package/lib/components/FormControl/FormControl.js.map +1 -1
  294. package/lib/components/FormField/FormField.d.ts +5 -7
  295. package/lib/components/FormField/FormField.d.ts.map +1 -1
  296. package/lib/components/FormField/FormField.js +9 -19
  297. package/lib/components/FormField/FormField.js.map +1 -1
  298. package/lib/components/Grid/Grid.d.ts +1 -1
  299. package/lib/components/Grid/Grid.d.ts.map +1 -1
  300. package/lib/components/Grid/Grid.js +17 -21
  301. package/lib/components/Grid/Grid.js.map +1 -1
  302. package/lib/components/Icon/Icon.js +3 -5
  303. package/lib/components/Icon/Icon.js.map +1 -1
  304. package/lib/components/Icon/iconNames.d.ts +1 -1
  305. package/lib/components/Icon/iconNames.d.ts.map +1 -1
  306. package/lib/components/Icon/iconNames.js +2 -0
  307. package/lib/components/Icon/iconNames.js.map +1 -1
  308. package/lib/components/Icon/icons/compass-solid.icon.js +1 -2
  309. package/lib/components/Icon/icons/compass-solid.icon.js.map +1 -1
  310. package/lib/components/Icon/icons/dataviz-table-with-bars.icon.js +1 -4
  311. package/lib/components/Icon/icons/dataviz-table-with-bars.icon.js.map +1 -1
  312. package/lib/components/Icon/icons/dataviz-table-with-cross.icon.js +1 -2
  313. package/lib/components/Icon/icons/dataviz-table-with-cross.icon.js.map +1 -1
  314. package/lib/components/Icon/icons/dataviz-waterfall.icon.js +1 -5
  315. package/lib/components/Icon/icons/dataviz-waterfall.icon.js.map +1 -1
  316. package/lib/components/Icon/icons/dock.icon.d.ts +4 -0
  317. package/lib/components/Icon/icons/dock.icon.d.ts.map +1 -0
  318. package/lib/components/Icon/icons/dock.icon.js +6 -0
  319. package/lib/components/Icon/icons/dock.icon.js.map +1 -0
  320. package/lib/components/Icon/icons/filetype-text.icon.js +1 -4
  321. package/lib/components/Icon/icons/filetype-text.icon.js.map +1 -1
  322. package/lib/components/Icon/icons/folder-dollar.icon.js +1 -2
  323. package/lib/components/Icon/icons/folder-dollar.icon.js.map +1 -1
  324. package/lib/components/Icon/icons/freeze-column.icon.js +1 -2
  325. package/lib/components/Icon/icons/freeze-column.icon.js.map +1 -1
  326. package/lib/components/Icon/icons/galaxy.icon.js +1 -3
  327. package/lib/components/Icon/icons/galaxy.icon.js.map +1 -1
  328. package/lib/components/Icon/icons/grad-solid.icon.js +1 -2
  329. package/lib/components/Icon/icons/grad-solid.icon.js.map +1 -1
  330. package/lib/components/Icon/icons/grad.icon.js +1 -5
  331. package/lib/components/Icon/icons/grad.icon.js.map +1 -1
  332. package/lib/components/Icon/icons/list-number.icon.js +1 -6
  333. package/lib/components/Icon/icons/list-number.icon.js.map +1 -1
  334. package/lib/components/Icon/icons/list.icon.js +1 -6
  335. package/lib/components/Icon/icons/list.icon.js.map +1 -1
  336. package/lib/components/Icon/icons/pin.icon.js +1 -2
  337. package/lib/components/Icon/icons/pin.icon.js.map +1 -1
  338. package/lib/components/Icon/icons/search-solid.icon.js +1 -2
  339. package/lib/components/Icon/icons/search-solid.icon.js.map +1 -1
  340. package/lib/components/Icon/icons/tracer.icon.js +1 -2
  341. package/lib/components/Icon/icons/tracer.icon.js.map +1 -1
  342. package/lib/components/Icon/icons/tribox-solid.icon.js +1 -3
  343. package/lib/components/Icon/icons/tribox-solid.icon.js.map +1 -1
  344. package/lib/components/Icon/icons/tribox.icon.js +1 -3
  345. package/lib/components/Icon/icons/tribox.icon.js.map +1 -1
  346. package/lib/components/Icon/icons/undock.icon.d.ts +4 -0
  347. package/lib/components/Icon/icons/undock.icon.d.ts.map +1 -0
  348. package/lib/components/Icon/icons/undock.icon.js +6 -0
  349. package/lib/components/Icon/icons/undock.icon.js.map +1 -0
  350. package/lib/components/Image/Image.js +1 -1
  351. package/lib/components/Image/Image.js.map +1 -1
  352. package/lib/components/Image/index.d.ts +1 -1
  353. package/lib/components/Image/index.d.ts.map +1 -1
  354. package/lib/components/Image/index.js +1 -0
  355. package/lib/components/Image/index.js.map +1 -1
  356. package/lib/components/Input/Input.d.ts +2 -2
  357. package/lib/components/Input/Input.d.ts.map +1 -1
  358. package/lib/components/Input/Input.js +13 -13
  359. package/lib/components/Input/Input.js.map +1 -1
  360. package/lib/components/Input/Input.styles.js +2 -2
  361. package/lib/components/Input/Input.styles.js.map +1 -1
  362. package/lib/components/Label/Label.js +1 -1
  363. package/lib/components/Label/Label.js.map +1 -1
  364. package/lib/components/Lightbox/Lightbox.d.ts +6 -0
  365. package/lib/components/Lightbox/Lightbox.d.ts.map +1 -0
  366. package/lib/components/Lightbox/Lightbox.js +129 -0
  367. package/lib/components/Lightbox/Lightbox.js.map +1 -0
  368. package/lib/components/Lightbox/Lightbox.styles.d.ts +11 -0
  369. package/lib/components/Lightbox/Lightbox.styles.d.ts.map +1 -0
  370. package/lib/components/Lightbox/Lightbox.styles.js +166 -0
  371. package/lib/components/Lightbox/Lightbox.styles.js.map +1 -0
  372. package/lib/components/Lightbox/Lightbox.types.d.ts +42 -0
  373. package/lib/components/Lightbox/Lightbox.types.d.ts.map +1 -0
  374. package/lib/components/Lightbox/Lightbox.types.js +2 -0
  375. package/lib/components/Lightbox/Lightbox.types.js.map +1 -0
  376. package/lib/components/Lightbox/index.d.ts +3 -0
  377. package/lib/components/Lightbox/index.d.ts.map +1 -0
  378. package/lib/components/Lightbox/index.js +2 -0
  379. package/lib/components/Lightbox/index.js.map +1 -0
  380. package/lib/components/Link/Link.js +5 -8
  381. package/lib/components/Link/Link.js.map +1 -1
  382. package/lib/components/List/CommaSeparatedList.d.ts +15 -0
  383. package/lib/components/List/CommaSeparatedList.d.ts.map +1 -0
  384. package/lib/components/List/CommaSeparatedList.js +61 -0
  385. package/lib/components/List/CommaSeparatedList.js.map +1 -0
  386. package/lib/components/List/List.d.ts +30 -0
  387. package/lib/components/List/List.d.ts.map +1 -0
  388. package/lib/components/List/List.js +56 -0
  389. package/lib/components/List/List.js.map +1 -0
  390. package/lib/components/List/OrderedList.d.ts +6 -0
  391. package/lib/components/List/OrderedList.d.ts.map +1 -0
  392. package/lib/components/List/OrderedList.js +6 -0
  393. package/lib/components/List/OrderedList.js.map +1 -0
  394. package/lib/components/List/UnorderedList.d.ts +6 -0
  395. package/lib/components/List/UnorderedList.d.ts.map +1 -0
  396. package/lib/components/List/UnorderedList.js +6 -0
  397. package/lib/components/List/UnorderedList.js.map +1 -0
  398. package/lib/components/List/index.d.ts +5 -0
  399. package/lib/components/List/index.d.ts.map +1 -0
  400. package/lib/components/List/index.js +4 -0
  401. package/lib/components/List/index.js.map +1 -0
  402. package/lib/components/Location/CurrentLocationButton.d.ts.map +1 -1
  403. package/lib/components/Location/CurrentLocationButton.js +7 -7
  404. package/lib/components/Location/CurrentLocationButton.js.map +1 -1
  405. package/lib/components/Location/Location.types.d.ts +2 -1
  406. package/lib/components/Location/Location.types.d.ts.map +1 -1
  407. package/lib/components/Location/Location.types.js.map +1 -1
  408. package/lib/components/Location/LocationDisplay.js +8 -9
  409. package/lib/components/Location/LocationDisplay.js.map +1 -1
  410. package/lib/components/Location/LocationInput.js +27 -28
  411. package/lib/components/Location/LocationInput.js.map +1 -1
  412. package/lib/components/Location/LocationView.js +8 -13
  413. package/lib/components/Location/LocationView.js.map +1 -1
  414. package/lib/components/Location/utils.js +11 -15
  415. package/lib/components/Location/utils.js.map +1 -1
  416. package/lib/components/Menu/FlyoutMenuList.d.ts.map +1 -1
  417. package/lib/components/Menu/FlyoutMenuList.js +12 -15
  418. package/lib/components/Menu/FlyoutMenuList.js.map +1 -1
  419. package/lib/components/Menu/Menu.context.d.ts.map +1 -1
  420. package/lib/components/Menu/Menu.context.js +2 -0
  421. package/lib/components/Menu/Menu.context.js.map +1 -1
  422. package/lib/components/Menu/Menu.d.ts.map +1 -1
  423. package/lib/components/Menu/Menu.js +89 -46
  424. package/lib/components/Menu/Menu.js.map +1 -1
  425. package/lib/components/Menu/Menu.styles.d.ts +11 -0
  426. package/lib/components/Menu/Menu.styles.d.ts.map +1 -1
  427. package/lib/components/Menu/Menu.styles.js +202 -3
  428. package/lib/components/Menu/Menu.styles.js.map +1 -1
  429. package/lib/components/Menu/Menu.types.d.ts +30 -12
  430. package/lib/components/Menu/Menu.types.d.ts.map +1 -1
  431. package/lib/components/Menu/Menu.types.js.map +1 -1
  432. package/lib/components/Menu/MenuGroup.d.ts +6 -0
  433. package/lib/components/Menu/MenuGroup.d.ts.map +1 -0
  434. package/lib/components/Menu/MenuGroup.js +17 -0
  435. package/lib/components/Menu/MenuGroup.js.map +1 -0
  436. package/lib/components/Menu/MenuItem.d.ts +0 -3
  437. package/lib/components/Menu/MenuItem.d.ts.map +1 -1
  438. package/lib/components/Menu/MenuItem.js +57 -164
  439. package/lib/components/Menu/MenuItem.js.map +1 -1
  440. package/lib/components/Menu/MenuList.d.ts +1 -1
  441. package/lib/components/Menu/MenuList.d.ts.map +1 -1
  442. package/lib/components/Menu/MenuList.js +28 -30
  443. package/lib/components/Menu/MenuList.js.map +1 -1
  444. package/lib/components/Menu/MenuListHeader.d.ts +0 -1
  445. package/lib/components/Menu/MenuListHeader.d.ts.map +1 -1
  446. package/lib/components/Menu/MenuListHeader.js +7 -55
  447. package/lib/components/Menu/MenuListHeader.js.map +1 -1
  448. package/lib/components/Menu/NavItemsList.d.ts.map +1 -1
  449. package/lib/components/Menu/NavItemsList.js +2 -3
  450. package/lib/components/Menu/NavItemsList.js.map +1 -1
  451. package/lib/components/Menu/helpers.d.ts +13 -12
  452. package/lib/components/Menu/helpers.d.ts.map +1 -1
  453. package/lib/components/Menu/helpers.js +40 -36
  454. package/lib/components/Menu/helpers.js.map +1 -1
  455. package/lib/components/Menu/index.d.ts +2 -3
  456. package/lib/components/Menu/index.d.ts.map +1 -1
  457. package/lib/components/Menu/index.js +1 -2
  458. package/lib/components/Menu/index.js.map +1 -1
  459. package/lib/components/MenuButton/MenuButton.d.ts +3 -1
  460. package/lib/components/MenuButton/MenuButton.d.ts.map +1 -1
  461. package/lib/components/MenuButton/MenuButton.js +13 -14
  462. package/lib/components/MenuButton/MenuButton.js.map +1 -1
  463. package/lib/components/MetaList/MetaList.d.ts +13 -4
  464. package/lib/components/MetaList/MetaList.d.ts.map +1 -1
  465. package/lib/components/MetaList/MetaList.js +34 -20
  466. package/lib/components/MetaList/MetaList.js.map +1 -1
  467. package/lib/components/Modal/Contexts.d.ts.map +1 -1
  468. package/lib/components/Modal/Contexts.js +3 -0
  469. package/lib/components/Modal/Contexts.js.map +1 -1
  470. package/lib/components/Modal/DockedModals.d.ts.map +1 -1
  471. package/lib/components/Modal/DockedModals.js +5 -4
  472. package/lib/components/Modal/DockedModals.js.map +1 -1
  473. package/lib/components/Modal/MinimizedModal.d.ts.map +1 -1
  474. package/lib/components/Modal/MinimizedModal.js +53 -38
  475. package/lib/components/Modal/MinimizedModal.js.map +1 -1
  476. package/lib/components/Modal/Modal.d.ts +1 -6
  477. package/lib/components/Modal/Modal.d.ts.map +1 -1
  478. package/lib/components/Modal/Modal.js +82 -134
  479. package/lib/components/Modal/Modal.js.map +1 -1
  480. package/lib/components/Modal/Modal.styles.d.ts +9 -0
  481. package/lib/components/Modal/Modal.styles.d.ts.map +1 -0
  482. package/lib/components/Modal/Modal.styles.js +135 -0
  483. package/lib/components/Modal/Modal.styles.js.map +1 -0
  484. package/lib/components/Modal/Modal.types.d.ts +56 -5
  485. package/lib/components/Modal/Modal.types.d.ts.map +1 -1
  486. package/lib/components/Modal/Modal.types.js.map +1 -1
  487. package/lib/components/Modal/ModalManager.d.ts.map +1 -1
  488. package/lib/components/Modal/ModalManager.js +74 -65
  489. package/lib/components/Modal/ModalManager.js.map +1 -1
  490. package/lib/components/MultiStep/MultiStep.d.ts.map +1 -1
  491. package/lib/components/MultiStep/MultiStep.js +10 -12
  492. package/lib/components/MultiStep/MultiStep.js.map +1 -1
  493. package/lib/components/MultiStep/MultiStep.styles.js +1 -1
  494. package/lib/components/MultiStep/MultiStep.styles.js.map +1 -1
  495. package/lib/components/MultiStep/MultiStep.types.d.ts +4 -2
  496. package/lib/components/MultiStep/MultiStep.types.d.ts.map +1 -1
  497. package/lib/components/MultiStep/MultiStep.types.js.map +1 -1
  498. package/lib/components/Number/NumberDisplay.d.ts +2 -2
  499. package/lib/components/Number/NumberDisplay.d.ts.map +1 -1
  500. package/lib/components/Number/NumberDisplay.js +1 -1
  501. package/lib/components/Number/NumberDisplay.js.map +1 -1
  502. package/lib/components/Number/NumberInput.d.ts.map +1 -1
  503. package/lib/components/Number/NumberInput.js +18 -25
  504. package/lib/components/Number/NumberInput.js.map +1 -1
  505. package/lib/components/Number/NumberInput.styles.d.ts +2 -2
  506. package/lib/components/Number/NumberInput.styles.d.ts.map +1 -1
  507. package/lib/components/Number/NumberInput.types.d.ts +2 -2
  508. package/lib/components/Number/NumberInput.types.d.ts.map +1 -1
  509. package/lib/components/Number/NumberInput.types.js.map +1 -1
  510. package/lib/components/Number/utils.js +2 -3
  511. package/lib/components/Number/utils.js.map +1 -1
  512. package/lib/components/PageTemplates/CategorySubPage.d.ts +1 -1
  513. package/lib/components/PageTemplates/CategorySubPage.d.ts.map +1 -1
  514. package/lib/components/PageTemplates/CategorySubPage.js +8 -18
  515. package/lib/components/PageTemplates/CategorySubPage.js.map +1 -1
  516. package/lib/components/PageTemplates/CategorySubPage.styles.d.ts +1 -1
  517. package/lib/components/PageTemplates/CategorySubPage.styles.d.ts.map +1 -1
  518. package/lib/components/PageTemplates/DashboardPage.d.ts +7 -1
  519. package/lib/components/PageTemplates/DashboardPage.d.ts.map +1 -1
  520. package/lib/components/PageTemplates/DashboardPage.js +48 -28
  521. package/lib/components/PageTemplates/DashboardPage.js.map +1 -1
  522. package/lib/components/PageTemplates/PageTemplates.d.ts +15 -6
  523. package/lib/components/PageTemplates/PageTemplates.d.ts.map +1 -1
  524. package/lib/components/PageTemplates/PageTemplates.js +89 -79
  525. package/lib/components/PageTemplates/PageTemplates.js.map +1 -1
  526. package/lib/components/PageTemplates/index.d.ts +3 -0
  527. package/lib/components/PageTemplates/index.d.ts.map +1 -1
  528. package/lib/components/PageTemplates/index.js +1 -0
  529. package/lib/components/PageTemplates/index.js.map +1 -1
  530. package/lib/components/Pagination/Pagination.d.ts +2 -2
  531. package/lib/components/Pagination/Pagination.d.ts.map +1 -1
  532. package/lib/components/Pagination/Pagination.js +7 -6
  533. package/lib/components/Pagination/Pagination.js.map +1 -1
  534. package/lib/components/Paragraph/ParagraphDisplay.d.ts +11 -0
  535. package/lib/components/Paragraph/ParagraphDisplay.d.ts.map +1 -0
  536. package/lib/components/Paragraph/ParagraphDisplay.js +11 -0
  537. package/lib/components/Paragraph/ParagraphDisplay.js.map +1 -0
  538. package/lib/components/Paragraph/index.d.ts +3 -0
  539. package/lib/components/Paragraph/index.d.ts.map +1 -0
  540. package/lib/components/Paragraph/index.js +2 -0
  541. package/lib/components/Paragraph/index.js.map +1 -0
  542. package/lib/components/Phone/PhoneDisplay.d.ts +2 -2
  543. package/lib/components/Phone/PhoneDisplay.d.ts.map +1 -1
  544. package/lib/components/Phone/PhoneDisplay.js +2 -3
  545. package/lib/components/Phone/PhoneDisplay.js.map +1 -1
  546. package/lib/components/Phone/PhoneInput.d.ts +2 -2
  547. package/lib/components/Phone/PhoneInput.d.ts.map +1 -1
  548. package/lib/components/Phone/PhoneInput.js +18 -17
  549. package/lib/components/Phone/PhoneInput.js.map +1 -1
  550. package/lib/components/Phone/utils.js +2 -3
  551. package/lib/components/Phone/utils.js.map +1 -1
  552. package/lib/components/Popover/Popover.d.ts +0 -4
  553. package/lib/components/Popover/Popover.d.ts.map +1 -1
  554. package/lib/components/Popover/Popover.js +11 -122
  555. package/lib/components/Popover/Popover.js.map +1 -1
  556. package/lib/components/Popover/Popover.styles.d.ts +5 -0
  557. package/lib/components/Popover/Popover.styles.d.ts.map +1 -0
  558. package/lib/components/Popover/Popover.styles.js +116 -0
  559. package/lib/components/Popover/Popover.styles.js.map +1 -0
  560. package/lib/components/Popover/PopoverManager.js +2 -2
  561. package/lib/components/Popover/PopoverManager.js.map +1 -1
  562. package/lib/components/Popover/index.d.ts +1 -1
  563. package/lib/components/Popover/index.d.ts.map +1 -1
  564. package/lib/components/Popover/index.js +1 -1
  565. package/lib/components/Popover/index.js.map +1 -1
  566. package/lib/components/Progress/Bar.js +2 -2
  567. package/lib/components/Progress/Bar.js.map +1 -1
  568. package/lib/components/Progress/Ellipsis.d.ts +1 -1
  569. package/lib/components/Progress/Ellipsis.d.ts.map +1 -1
  570. package/lib/components/Progress/Ellipsis.js +48 -50
  571. package/lib/components/Progress/Ellipsis.js.map +1 -1
  572. package/lib/components/Progress/Progress.js +3 -4
  573. package/lib/components/Progress/Progress.js.map +1 -1
  574. package/lib/components/Progress/Progress.types.d.ts +2 -2
  575. package/lib/components/Progress/Progress.types.d.ts.map +1 -1
  576. package/lib/components/Progress/Progress.types.js.map +1 -1
  577. package/lib/components/Progress/Ring.d.ts +1 -1
  578. package/lib/components/Progress/Ring.d.ts.map +1 -1
  579. package/lib/components/Progress/Ring.js +40 -40
  580. package/lib/components/Progress/Ring.js.map +1 -1
  581. package/lib/components/RadioButton/RadioButton.d.ts +2 -2
  582. package/lib/components/RadioButton/RadioButton.d.ts.map +1 -1
  583. package/lib/components/RadioButton/RadioButton.js +1 -1
  584. package/lib/components/RadioButton/RadioButton.js.map +1 -1
  585. package/lib/components/RadioCheck/RadioCheck.d.ts +2 -2
  586. package/lib/components/RadioCheck/RadioCheck.d.ts.map +1 -1
  587. package/lib/components/RadioCheck/RadioCheck.js +7 -8
  588. package/lib/components/RadioCheck/RadioCheck.js.map +1 -1
  589. package/lib/components/RadioCheckGroup/RadioCheckGroup.d.ts +4 -0
  590. package/lib/components/RadioCheckGroup/RadioCheckGroup.d.ts.map +1 -1
  591. package/lib/components/RadioCheckGroup/RadioCheckGroup.js +19 -18
  592. package/lib/components/RadioCheckGroup/RadioCheckGroup.js.map +1 -1
  593. package/lib/components/Rating/Rating.d.ts +2 -2
  594. package/lib/components/Rating/Rating.d.ts.map +1 -1
  595. package/lib/components/Rating/Rating.js +6 -7
  596. package/lib/components/Rating/Rating.js.map +1 -1
  597. package/lib/components/SearchInput/SearchInput.d.ts +4 -4
  598. package/lib/components/SearchInput/SearchInput.d.ts.map +1 -1
  599. package/lib/components/SearchInput/SearchInput.js +14 -14
  600. package/lib/components/SearchInput/SearchInput.js.map +1 -1
  601. package/lib/components/Select/Option.js +1 -1
  602. package/lib/components/Select/Option.js.map +1 -1
  603. package/lib/components/Select/Select.d.ts.map +1 -1
  604. package/lib/components/Select/Select.js +15 -16
  605. package/lib/components/Select/Select.js.map +1 -1
  606. package/lib/components/Sentiment/Sentiment.d.ts +2 -2
  607. package/lib/components/Sentiment/Sentiment.d.ts.map +1 -1
  608. package/lib/components/Sentiment/Sentiment.js +1 -2
  609. package/lib/components/Sentiment/Sentiment.js.map +1 -1
  610. package/lib/components/Skeleton/LineSkeleton.js +1 -1
  611. package/lib/components/Skeleton/LineSkeleton.js.map +1 -1
  612. package/lib/components/Skeleton/ParagraphSkeleton.js +1 -1
  613. package/lib/components/Skeleton/ParagraphSkeleton.js.map +1 -1
  614. package/lib/components/Skeleton/RectangleSkeleton.js +1 -1
  615. package/lib/components/Skeleton/RectangleSkeleton.js.map +1 -1
  616. package/lib/components/Slider/Slider.d.ts.map +1 -1
  617. package/lib/components/Slider/Slider.js +12 -19
  618. package/lib/components/Slider/Slider.js.map +1 -1
  619. package/lib/components/Slider/Slider.styles.d.ts +4 -1
  620. package/lib/components/Slider/Slider.styles.d.ts.map +1 -1
  621. package/lib/components/Slider/Slider.styles.js +17 -5
  622. package/lib/components/Slider/Slider.styles.js.map +1 -1
  623. package/lib/components/Slider/Slider.types.d.ts +2 -2
  624. package/lib/components/Slider/Slider.types.d.ts.map +1 -1
  625. package/lib/components/Slider/Slider.types.js.map +1 -1
  626. package/lib/components/Slider/SliderTicks.d.ts +1 -0
  627. package/lib/components/Slider/SliderTicks.d.ts.map +1 -1
  628. package/lib/components/Slider/SliderTicks.js +19 -12
  629. package/lib/components/Slider/SliderTicks.js.map +1 -1
  630. package/lib/components/Slider/utils.d.ts +10 -11
  631. package/lib/components/Slider/utils.d.ts.map +1 -1
  632. package/lib/components/Slider/utils.js +24 -18
  633. package/lib/components/Slider/utils.js.map +1 -1
  634. package/lib/components/SummaryItem/SummaryItem.d.ts +5 -5
  635. package/lib/components/SummaryItem/SummaryItem.d.ts.map +1 -1
  636. package/lib/components/SummaryItem/SummaryItem.js +3 -5
  637. package/lib/components/SummaryItem/SummaryItem.js.map +1 -1
  638. package/lib/components/SummaryList/SummaryList.d.ts +8 -2
  639. package/lib/components/SummaryList/SummaryList.d.ts.map +1 -1
  640. package/lib/components/SummaryList/SummaryList.js +10 -11
  641. package/lib/components/SummaryList/SummaryList.js.map +1 -1
  642. package/lib/components/SummaryList/ViewAll.d.ts +1 -1
  643. package/lib/components/SummaryList/ViewAll.d.ts.map +1 -1
  644. package/lib/components/SummaryList/ViewAll.js +14 -10
  645. package/lib/components/SummaryList/ViewAll.js.map +1 -1
  646. package/lib/components/Switch/Switch.d.ts +2 -2
  647. package/lib/components/Switch/Switch.d.ts.map +1 -1
  648. package/lib/components/Switch/Switch.js +41 -30
  649. package/lib/components/Switch/Switch.js.map +1 -1
  650. package/lib/components/Table/Table.d.ts +2 -2
  651. package/lib/components/Table/Table.d.ts.map +1 -1
  652. package/lib/components/Table/Table.js +14 -13
  653. package/lib/components/Table/Table.js.map +1 -1
  654. package/lib/components/Tabs/Tab.d.ts +1 -1
  655. package/lib/components/Tabs/Tab.d.ts.map +1 -1
  656. package/lib/components/Tabs/Tab.js +9 -7
  657. package/lib/components/Tabs/Tab.js.map +1 -1
  658. package/lib/components/Tabs/TabPanel.d.ts +10 -2
  659. package/lib/components/Tabs/TabPanel.d.ts.map +1 -1
  660. package/lib/components/Tabs/TabPanel.js +24 -8
  661. package/lib/components/Tabs/TabPanel.js.map +1 -1
  662. package/lib/components/Tabs/Tabs.d.ts +1 -0
  663. package/lib/components/Tabs/Tabs.d.ts.map +1 -1
  664. package/lib/components/Tabs/Tabs.js +22 -18
  665. package/lib/components/Tabs/Tabs.js.map +1 -1
  666. package/lib/components/Tabs/Tabs.types.d.ts +2 -2
  667. package/lib/components/Tabs/Tabs.types.d.ts.map +1 -1
  668. package/lib/components/Tabs/Tabs.types.js.map +1 -1
  669. package/lib/components/Text/Text.d.ts +1 -1
  670. package/lib/components/Text/Text.d.ts.map +1 -1
  671. package/lib/components/Text/Text.js +2 -2
  672. package/lib/components/Text/Text.js.map +1 -1
  673. package/lib/components/TextArea/TextArea.d.ts +2 -2
  674. package/lib/components/TextArea/TextArea.d.ts.map +1 -1
  675. package/lib/components/TextArea/TextArea.js +31 -30
  676. package/lib/components/TextArea/TextArea.js.map +1 -1
  677. package/lib/components/Toaster/Toaster.d.ts +8 -36
  678. package/lib/components/Toaster/Toaster.d.ts.map +1 -1
  679. package/lib/components/Toaster/Toaster.js +97 -102
  680. package/lib/components/Toaster/Toaster.js.map +1 -1
  681. package/lib/components/Tooltip/Tooltip.d.ts +6 -1
  682. package/lib/components/Tooltip/Tooltip.d.ts.map +1 -1
  683. package/lib/components/Tooltip/Tooltip.js +6 -13
  684. package/lib/components/Tooltip/Tooltip.js.map +1 -1
  685. package/lib/components/Tree/StandardTree.d.ts +6 -0
  686. package/lib/components/Tree/StandardTree.d.ts.map +1 -0
  687. package/lib/components/Tree/StandardTree.js +175 -0
  688. package/lib/components/Tree/StandardTree.js.map +1 -0
  689. package/lib/components/Tree/StandardTree.styles.d.ts +13 -0
  690. package/lib/components/Tree/StandardTree.styles.d.ts.map +1 -0
  691. package/lib/components/Tree/StandardTree.styles.js +155 -0
  692. package/lib/components/Tree/StandardTree.styles.js.map +1 -0
  693. package/lib/components/Tree/StandardTree.types.d.ts +25 -0
  694. package/lib/components/Tree/StandardTree.types.d.ts.map +1 -0
  695. package/lib/components/Tree/StandardTree.types.js +2 -0
  696. package/lib/components/Tree/StandardTree.types.js.map +1 -0
  697. package/lib/components/Tree/Tree.d.ts +35 -49
  698. package/lib/components/Tree/Tree.d.ts.map +1 -1
  699. package/lib/components/Tree/Tree.js +18 -56
  700. package/lib/components/Tree/Tree.js.map +1 -1
  701. package/lib/components/Tree/helpers.d.ts +19 -0
  702. package/lib/components/Tree/helpers.d.ts.map +1 -0
  703. package/lib/components/Tree/helpers.js +180 -0
  704. package/lib/components/Tree/helpers.js.map +1 -0
  705. package/lib/components/Tree/index.d.ts +4 -2
  706. package/lib/components/Tree/index.d.ts.map +1 -1
  707. package/lib/components/Tree/index.js +3 -1
  708. package/lib/components/Tree/index.js.map +1 -1
  709. package/lib/components/URL/URLDisplay.d.ts +2 -2
  710. package/lib/components/URL/URLDisplay.d.ts.map +1 -1
  711. package/lib/components/URL/URLDisplay.js +2 -2
  712. package/lib/components/URL/URLDisplay.js.map +1 -1
  713. package/lib/hooks/index.d.ts +7 -4
  714. package/lib/hooks/index.d.ts.map +1 -1
  715. package/lib/hooks/index.js +7 -3
  716. package/lib/hooks/index.js.map +1 -1
  717. package/lib/hooks/useActiveDescendant.d.ts +17 -3
  718. package/lib/hooks/useActiveDescendant.d.ts.map +1 -1
  719. package/lib/hooks/useActiveDescendant.js +86 -64
  720. package/lib/hooks/useActiveDescendant.js.map +1 -1
  721. package/lib/hooks/useAutoResize.d.ts.map +1 -1
  722. package/lib/hooks/useAutoResize.js +6 -7
  723. package/lib/hooks/useAutoResize.js.map +1 -1
  724. package/lib/hooks/useBreakpoint.js +2 -4
  725. package/lib/hooks/useBreakpoint.js.map +1 -1
  726. package/lib/hooks/useDraggable.d.ts +8 -0
  727. package/lib/hooks/useDraggable.d.ts.map +1 -0
  728. package/lib/hooks/useDraggable.js +64 -0
  729. package/lib/hooks/useDraggable.js.map +1 -0
  730. package/lib/hooks/useFocusWithin.d.ts +1 -1
  731. package/lib/hooks/useFocusWithin.d.ts.map +1 -1
  732. package/lib/hooks/useFocusWithin.js +29 -24
  733. package/lib/hooks/useFocusWithin.js.map +1 -1
  734. package/lib/hooks/useI18n.d.ts +505 -170
  735. package/lib/hooks/useI18n.d.ts.map +1 -1
  736. package/lib/hooks/useI18n.js +2 -2
  737. package/lib/hooks/useI18n.js.map +1 -1
  738. package/lib/hooks/useLongPress.d.ts +16 -0
  739. package/lib/hooks/useLongPress.d.ts.map +1 -0
  740. package/lib/hooks/useLongPress.js +59 -0
  741. package/lib/hooks/useLongPress.js.map +1 -0
  742. package/lib/hooks/useOuterEvent.js +1 -1
  743. package/lib/hooks/useOuterEvent.js.map +1 -1
  744. package/lib/hooks/useOverride.js +1 -1
  745. package/lib/hooks/useOverride.js.map +1 -1
  746. package/lib/hooks/useScrollStick.js +14 -3
  747. package/lib/hooks/useScrollStick.js.map +1 -1
  748. package/lib/hooks/useScrollToggle.d.ts +6 -0
  749. package/lib/hooks/useScrollToggle.d.ts.map +1 -0
  750. package/lib/hooks/useScrollToggle.js +40 -0
  751. package/lib/hooks/useScrollToggle.js.map +1 -0
  752. package/lib/hooks/useTransitionState.d.ts +39 -0
  753. package/lib/hooks/useTransitionState.d.ts.map +1 -0
  754. package/lib/hooks/useTransitionState.js +56 -0
  755. package/lib/hooks/useTransitionState.js.map +1 -0
  756. package/lib/i18n/default.d.ts +583 -0
  757. package/lib/i18n/default.d.ts.map +1 -0
  758. package/lib/i18n/default.js +627 -0
  759. package/lib/i18n/default.js.map +1 -0
  760. package/lib/i18n/i18n.d.ts +988 -318
  761. package/lib/i18n/i18n.d.ts.map +1 -1
  762. package/lib/i18n/i18n.js +1 -1
  763. package/lib/i18n/i18n.js.map +1 -1
  764. package/lib/i18n/index.d.ts +1 -0
  765. package/lib/i18n/index.d.ts.map +1 -1
  766. package/lib/i18n/index.js.map +1 -1
  767. package/lib/i18n/translate.d.ts +29 -4
  768. package/lib/i18n/translate.d.ts.map +1 -1
  769. package/lib/i18n/translate.js +21 -8
  770. package/lib/i18n/translate.js.map +1 -1
  771. package/lib/index.d.ts +8 -2
  772. package/lib/index.d.ts.map +1 -1
  773. package/lib/index.js +8 -2
  774. package/lib/index.js.map +1 -1
  775. package/lib/styles/GlobalStyle.d.ts.map +1 -1
  776. package/lib/styles/GlobalStyle.js +2 -26
  777. package/lib/styles/GlobalStyle.js.map +1 -1
  778. package/lib/theme/ThemeMachine.js +7 -1
  779. package/lib/theme/ThemeMachine.js.map +1 -1
  780. package/lib/theme/index.d.ts +1 -0
  781. package/lib/theme/index.d.ts.map +1 -1
  782. package/lib/theme/index.js +1 -0
  783. package/lib/theme/index.js.map +1 -1
  784. package/lib/theme/theme.d.ts +83 -53
  785. package/lib/theme/theme.d.ts.map +1 -1
  786. package/lib/theme/themeDefinition.json +50 -30
  787. package/lib/theme/themeOverrides.schema.json +24 -3
  788. package/lib/theme/themes/buildTheme.json +3 -39
  789. package/lib/theme/themes/darkTheme.json +6 -0
  790. package/lib/theme/themes/legacyBuildTheme.json +50 -0
  791. package/lib/types/types.d.ts +6 -1
  792. package/lib/types/types.d.ts.map +1 -1
  793. package/lib/types/types.js.map +1 -1
  794. package/lib/utils/utils.d.ts +41 -4
  795. package/lib/utils/utils.d.ts.map +1 -1
  796. package/lib/utils/utils.js +55 -9
  797. package/lib/utils/utils.js.map +1 -1
  798. package/package.json +10 -11
  799. package/lib/components/DateTime/Input/useButtonAriaLabel.d.ts +0 -3
  800. package/lib/components/DateTime/Input/useButtonAriaLabel.d.ts.map +0 -1
  801. package/lib/components/DateTime/Input/useButtonAriaLabel.js +0 -33
  802. package/lib/components/DateTime/Input/useButtonAriaLabel.js.map +0 -1
  803. package/lib/components/NoItems/NoItems.d.ts +0 -14
  804. package/lib/components/NoItems/NoItems.d.ts.map +0 -1
  805. package/lib/components/NoItems/NoItems.js.map +0 -1
  806. package/lib/components/NoItems/index.d.ts +0 -4
  807. package/lib/components/NoItems/index.d.ts.map +0 -1
  808. package/lib/components/NoItems/index.js +0 -3
  809. package/lib/components/NoItems/index.js.map +0 -1
  810. package/lib/i18n/default.json +0 -246
@@ -1 +1 @@
1
- {"version":3,"file":"Menu.js","sourceRoot":"","sources":["../../../src/components/Menu/Menu.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EAGV,WAAW,EACX,SAAS,EACT,QAAQ,EACR,MAAM,EACN,OAA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,CAAC,cAAc,IAAI,CAClB,MAAC,qBAAqB,kBAAC,EAAE,EAAE,GAAG,EAAE,kBAAkB,iBAC/C,CAAC,CAAC,6BAA6B,CAAC,OAAG,eAAe,IAAI,IAAI,eAAe,EAAE,aACtD,CACzB;YAEA,MAAM,IAAI,2BAAS,MAAM,WAAU;YAEpC,KAAC,qBAAqB,cACpB,KAAC,WAAW,CAAC,QAAQ,kBACnB,KAAK,EAAE;wBACL,WAAW,EAAE,EAAE;wBACf,IAAI;wBACJ,0BAA0B;wBAC1B,WAAW;wBACX,YAAY;wBACZ,cAAc;wBACd,MAAM;wBACN,QAAQ;wBACR,SAAS;wBACT,SAAS;wBACT,QAAQ;wBACR,OAAO;wBACP,OAAO;wBACP,uBAAuB;wBACvB,gBAAgB;wBAChB,eAAe;wBACf,YAAY;wBACZ,mBAAmB;qBACpB,gBAEA,OAAO,KAAK,YAAY,CAAC,CAAC,CAAC,CAC1B,KAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,WAAI,CAC3B,CAAC,CAAC,CAAC,CACF,KAAC,cAAc,IAAC,KAAK,EAAE,KAAK,WAAI,CACjC,YACoB,WACD;YACvB,MAAM,IAAI,2BAAS,MAAM,WAAU,aACzB,CACd,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,IAAI,CAAC","sourcesContent":["import {\n forwardRef,\n FunctionComponent,\n PropsWithoutRef,\n useCallback,\n useEffect,\n useState,\n useRef,\n useMemo\n} from 'react';\n\nimport { useConsolidatedRef, useUID, useActiveDescendant, useI18n, usePrevious } from '../../hooks';\nimport { ForwardProps } from '../../types';\n\nimport FlyoutMenuList from './FlyoutMenuList';\nimport MenuContext from './Menu.context';\nimport { StyledAriaDescription, StyledMenu, StyledMenuListWrapper } from './Menu.styles';\nimport { MenuContextProps, MenuProps } from './Menu.types';\nimport MenuList from './MenuList';\n\nconst Menu: FunctionComponent<MenuProps & ForwardProps> = forwardRef(\n (props: PropsWithoutRef<MenuProps>, ref: MenuProps['ref']) => {\n const uid = useUID();\n const {\n id = uid,\n items = [],\n mode = 'action',\n accent,\n scrollAt = 7,\n emptyText,\n onItemClick,\n onItemExpand,\n loadMore,\n onItemCollapse,\n loading = false,\n currentItemId,\n header,\n footer,\n variant = 'drill-down',\n focusControlEl,\n arrowNavigationUnsupported,\n 'aria-describedby': ariaDescribedBy,\n ...restProps\n } = props;\n\n const t = useI18n();\n\n const radioName = useUID();\n const menuRef = useConsolidatedRef(ref);\n const previousItemCount = useRef(0);\n const [activeDescendantUpdateId, setActiveDescendantUpdateId] = useState(0);\n const [flyOutActiveIdStack, setFlyoutActiveIdStack] = useState([id]);\n const [focusReturnEl, setFocusReturnEl] = useState<HTMLElement | null>();\n const [preventInitialScroll, setPreventInitialScroll] = useState(false);\n const activeFlyoutSelector = useMemo(\n () =>\n `fieldset[data-flyout-menu-id=\"${flyOutActiveIdStack[flyOutActiveIdStack.length - 1]}\"]`,\n [flyOutActiveIdStack]\n );\n const focusControl = useMemo(() => {\n return focusControlEl || menuRef.current;\n }, [focusControlEl, menuRef.current]);\n\n const pushFlyoutId = useCallback(\n (flyoutId: string) => {\n setFlyoutActiveIdStack([...flyOutActiveIdStack, flyoutId]);\n },\n [flyOutActiveIdStack]\n );\n\n const getScopedItemId = useCallback(\n (itemId: string) => {\n return `${id}-item-${itemId}`;\n },\n [id]\n );\n\n const updateActiveDescendants: MenuContextProps['updateActiveDescendants'] = useCallback(\n ({ preventScroll = false } = {}) => {\n setPreventInitialScroll(preventScroll);\n setActiveDescendantUpdateId(Math.random());\n },\n []\n );\n\n const uadConfig = useMemo(\n () => ({\n focusEl: focusControl,\n scope: menuRef.current,\n scopeSelector:\n variant === 'drill-down'\n ? ('fieldset[aria-hidden=\"false\"]' as keyof HTMLElementTagNameMap)\n : activeFlyoutSelector,\n selector: '[role=\"menuitem\"], legend button' as keyof HTMLElementTagNameMap,\n focusReturnEl,\n clearFocusReturn: () => {\n setFocusReturnEl(null);\n },\n currentDescendantId: currentItemId ? getScopedItemId(currentItemId) : undefined,\n preventInitialScroll,\n clearPreventScroll: () => {\n setPreventInitialScroll(false);\n }\n }),\n [\n focusControl,\n menuRef.current,\n activeFlyoutSelector,\n focusReturnEl,\n currentItemId,\n preventInitialScroll\n ]\n );\n\n const { activeDescendant, descendants } = useActiveDescendant(uadConfig, [\n activeDescendantUpdateId\n ]);\n\n const previousActiveDescendant = usePrevious(activeDescendant);\n\n // ## Bind Menu-specific navigation keyDown.\n useEffect(() => {\n const expandOrCollapse = () => {\n if (activeDescendant) {\n if (activeDescendant.dataset.expand === 'true') {\n (activeDescendant!.querySelector('button') as HTMLElement)?.click();\n\n return;\n }\n\n if (activeDescendant.dataset.collapse === 'true') {\n activeDescendant.click();\n }\n }\n };\n\n const additionalKeydown = (e: KeyboardEvent) => {\n switch (e.key) {\n case 'ArrowRight': {\n if (arrowNavigationUnsupported) break;\n expandOrCollapse();\n break;\n }\n case 'ArrowLeft': {\n if (arrowNavigationUnsupported) break;\n expandOrCollapse();\n break;\n }\n case 'Escape': {\n if (variant === 'flyout' && flyOutActiveIdStack.length > 1) {\n e.preventDefault();\n e.stopPropagation();\n\n const newStack = [...flyOutActiveIdStack];\n newStack.pop();\n setFlyoutActiveIdStack(newStack);\n }\n break;\n }\n default:\n break;\n }\n\n if (arrowNavigationUnsupported && (e.key === ' ' || e.key === 'Spacebar') && e.shiftKey) {\n e.preventDefault();\n expandOrCollapse();\n }\n };\n\n focusControl?.addEventListener('keydown', additionalKeydown);\n\n return () => focusControl?.removeEventListener('keydown', additionalKeydown);\n }, [focusControl, activeDescendant]);\n\n // ## Update useActiveDescendant on change of items, not selection of items.\n useEffect(() => {\n // Next tick for DOM updates.\n setTimeout(() => {\n if (items.length === previousItemCount.current) {\n const previousDescendantIds = descendants?.map(node => node.id);\n const newDescendants = uadConfig.scope\n ?.querySelector(uadConfig.scopeSelector)\n ?.querySelectorAll(uadConfig.selector);\n\n if (!newDescendants) {\n updateActiveDescendants();\n return;\n }\n\n const scopedDescendants = Array.from(newDescendants);\n\n if (scopedDescendants?.length !== previousDescendantIds?.length) {\n updateActiveDescendants();\n return;\n }\n\n const itemsUnchanged = scopedDescendants.every(\n (node, index) => node.id === previousDescendantIds[index]\n );\n\n if (!itemsUnchanged) {\n updateActiveDescendants();\n }\n\n return;\n }\n\n previousItemCount.current = items.length;\n updateActiveDescendants();\n }, 0);\n }, [items]);\n\n // ## Bump scroll & set return element when descendant focused in loading state.\n useEffect(() => {\n const activeDescendantChanged = previousActiveDescendant?.id !== activeDescendant?.id;\n if (!activeDescendantChanged) return;\n\n if (loading && descendants && descendants.length && activeDescendant) {\n const descendantList = [...descendants];\n const lastItem = descendantList.pop();\n const lastId = lastItem?.id || undefined;\n\n if (lastId === activeDescendant.id) {\n const scrollRegion = uadConfig.scope\n ?.querySelector(uadConfig.scopeSelector)\n ?.querySelector('ul');\n\n if (scrollRegion) {\n scrollRegion.scrollTop = scrollRegion.scrollHeight - scrollRegion.offsetHeight;\n }\n\n if (focusReturnEl?.id !== activeDescendant.id) {\n // Set focus return on 'nextTick' and avoid looping calls with immediate siblings.\n setTimeout(() => {\n setFocusReturnEl(lastItem);\n }, 0);\n }\n } else if (focusReturnEl?.id !== activeDescendant.id) {\n // Set focus return on 'nextTick' and avoid looping calls with immediate siblings.\n setTimeout(() => {\n setFocusReturnEl(activeDescendant);\n }, 0);\n }\n }\n }, [\n loading,\n descendants,\n previousActiveDescendant,\n activeDescendant,\n uadConfig,\n focusReturnEl\n ]);\n\n return (\n <StyledMenu\n id={id}\n role='menu'\n aria-describedby={!focusControlEl ? `${id}-menuDescription` : undefined}\n {...restProps}\n ref={menuRef}\n >\n {!focusControlEl && (\n <StyledAriaDescription id={`${id}-menuDescription`}>\n {t('menu_selection_instructions')} {ariaDescribedBy && ` ${ariaDescribedBy}`}\n </StyledAriaDescription>\n )}\n\n {header && <header>{header}</header>}\n\n <StyledMenuListWrapper>\n <MenuContext.Provider\n value={{\n componentId: id,\n mode,\n arrowNavigationUnsupported,\n onItemClick,\n onItemExpand,\n onItemCollapse,\n accent,\n scrollAt,\n emptyText,\n radioName,\n loadMore,\n loading,\n variant,\n updateActiveDescendants,\n setFocusReturnEl,\n getScopedItemId,\n pushFlyoutId,\n flyOutActiveIdStack\n }}\n >\n {variant === 'drill-down' ? (\n <MenuList items={items} />\n ) : (\n <FlyoutMenuList items={items} />\n )}\n </MenuContext.Provider>\n </StyledMenuListWrapper>\n {footer && <footer>{footer}</footer>}\n </StyledMenu>\n );\n }\n);\n\nexport default Menu;\n"]}
1
+ {"version":3,"file":"Menu.js","sourceRoot":"","sources":["../../../src/components/Menu/Menu.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EAGV,WAAW,EACX,SAAS,EACT,QAAQ,EACR,MAAM,EACN,OAAO,EACR,MAAM,OAAO,CAAC;AAEf,OAAO,EACL,kBAAkB,EAClB,MAAM,EACN,mBAAmB,EACnB,OAAO,EACP,WAAW,EACX,YAAY,EACb,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAEzF,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,MAAM,IAAI,GAAgD,UAAU,CAClE,CAAC,KAAiC,EAAE,GAAqB,EAAE,EAAE;IAC3D,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC;IACrB,MAAM,EACJ,EAAE,GAAG,GAAG,EACR,KAAK,GAAG,EAAE,EACV,IAAI,GAAG,QAAQ,EACf,MAAM,EACN,QAAQ,GAAG,CAAC,EACZ,SAAS,EACT,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,cAAc,EACd,OAAO,GAAG,KAAK,EACf,aAAa,EACb,MAAM,EACN,MAAM,EACN,OAAO,GAAG,YAAY,EACtB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,0BAA0B;QAC1B,WAAW;QACX,YAAY;QACZ,YAAY;QACZ,cAAc;QACd,MAAM;QACN,QAAQ;QACR,SAAS;QACT,SAAS;QACT,QAAQ;QACR,OAAO;QACP,OAAO;QACP,YAAY;QACZ,uBAAuB;QACvB,gBAAgB;QAChB,kBAAkB;QAClB,eAAe;QACf,YAAY;QACZ,mBAAmB;KACpB,CAAC,CAAC;IAEH,OAAO,CACL,MAAC,UAAU,IACT,EAAE,EAAE,EAAE,EACN,IAAI,EAAC,MAAM,sBACO,CAAC,cAAc,CAAC,CAAC,CAAC,GAAG,EAAE,kBAAkB,CAAC,CAAC,CAAC,SAAS,KACnE,SAAS,EACb,GAAG,EAAE,OAAO,aAEX,CAAC,cAAc,IAAI,CAClB,MAAC,qBAAqB,IAAC,EAAE,EAAE,GAAG,EAAE,kBAAkB,aAC/C,CAAC,CAAC,6BAA6B,CAAC,OAAG,eAAe,IAAI,IAAI,eAAe,EAAE,YACtD,CACzB,EAEA,MAAM,IAAI,2BAAS,MAAM,WAAU,EAEpC,KAAC,qBAAqB,cACpB,KAAC,WAAW,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,YACtC,OAAO,KAAK,YAAY,CAAC,CAAC,CAAC,CAC1B,KAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,WAAI,CAC3B,CAAC,CAAC,CAAC,CACF,KAAC,cAAc,IAAC,KAAK,EAAE,KAAK,WAAI,CACjC,WACoB,WACD,EACvB,MAAM,IAAI,2BAAS,MAAM,WAAU,YACzB,CACd,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,IAAI,CAAC","sourcesContent":["import {\n forwardRef,\n FunctionComponent,\n PropsWithoutRef,\n useCallback,\n useEffect,\n useState,\n useRef,\n useMemo\n} from 'react';\n\nimport {\n useConsolidatedRef,\n useUID,\n useActiveDescendant,\n useI18n,\n usePrevious,\n useDirection\n} from '../../hooks';\nimport { ForwardProps } from '../../types';\nimport { cap } from '../../utils';\n\nimport FlyoutMenuList from './FlyoutMenuList';\nimport MenuContext from './Menu.context';\nimport { StyledAriaDescription, StyledMenu, StyledMenuListWrapper } from './Menu.styles';\nimport { MenuContextProps, MenuProps } from './Menu.types';\nimport MenuList from './MenuList';\n\nconst Menu: FunctionComponent<MenuProps & ForwardProps> = forwardRef(\n (props: PropsWithoutRef<MenuProps>, ref: MenuProps['ref']) => {\n const uid = useUID();\n const {\n id = uid,\n items = [],\n mode = 'action',\n accent,\n scrollAt = 7,\n emptyText,\n onItemClick,\n onItemActive,\n onItemExpand,\n loadMore,\n onItemCollapse,\n loading = false,\n currentItemId,\n header,\n footer,\n variant = 'drill-down',\n focusControlEl,\n focusElOnClose = true,\n arrowNavigationUnsupported,\n 'aria-describedby': ariaDescribedBy,\n ...restProps\n } = props;\n\n const t = useI18n();\n\n const { end: endDirection, start: startDirection } = useDirection();\n const radioName = useUID();\n const menuRef = useConsolidatedRef(ref);\n const previousItemCount = useRef(0);\n const [activeDescendantUpdateId, setActiveDescendantUpdateId] = useState(0);\n const [focusDescendant, setFocusDescendant] = useState<HTMLElement | null>(null);\n const [flyOutActiveIdStack, setFlyoutActiveIdStack] = useState([id]);\n const [focusReturnEl, setFocusReturnEl] = useState<HTMLElement | null>();\n const [preventInitialScroll, setPreventInitialScroll] = useState(false);\n const activeFlyoutSelector = useMemo(\n () =>\n `fieldset[data-flyout-menu-id=\"${flyOutActiveIdStack[flyOutActiveIdStack.length - 1]}\"]`,\n [flyOutActiveIdStack]\n );\n const focusControl = useMemo(() => {\n return focusControlEl || menuRef.current;\n }, [focusControlEl, menuRef.current]);\n\n const pushFlyoutId = useCallback(\n (flyoutId: string) => {\n setFlyoutActiveIdStack([...flyOutActiveIdStack, flyoutId]);\n },\n [flyOutActiveIdStack]\n );\n\n const getScopedItemId = useCallback(\n (itemId: string) => {\n return `${id}-item-${itemId}`;\n },\n [id]\n );\n\n const getUnscopedItemId = useCallback(\n (itemId: string) => {\n return itemId.split(`${id}-item-`)[1];\n },\n [id]\n );\n\n const updateActiveDescendants: MenuContextProps['updateActiveDescendants'] = useCallback(\n ({ preventScroll = false } = {}) => {\n setPreventInitialScroll(preventScroll);\n setActiveDescendantUpdateId(Math.random());\n },\n []\n );\n\n const uadConfig = useMemo(\n () => ({\n focusEl: focusControl,\n scope: menuRef.current,\n scopeSelector:\n variant === 'drill-down'\n ? ('fieldset[aria-hidden=\"false\"]' as keyof HTMLElementTagNameMap)\n : activeFlyoutSelector,\n selector: '[role=\"menuitem\"], legend button' as keyof HTMLElementTagNameMap,\n focusDescendantEl: focusDescendant,\n clearFocusDescendant: () => {\n setFocusDescendant(null);\n if (focusElOnClose) focusControl?.focus();\n },\n focusReturnEl,\n clearFocusReturn: () => {\n setFocusReturnEl(null);\n },\n currentDescendantId: currentItemId ? getScopedItemId(currentItemId) : undefined,\n preventInitialScroll,\n clearPreventScroll: () => {\n setPreventInitialScroll(false);\n }\n }),\n [\n focusControl,\n menuRef.current,\n activeFlyoutSelector,\n focusReturnEl,\n focusDescendant,\n currentItemId,\n preventInitialScroll\n ]\n );\n\n const { activeDescendant, descendants } = useActiveDescendant(uadConfig, [\n activeDescendantUpdateId\n ]);\n\n const previousActiveDescendant = usePrevious(activeDescendant);\n\n // ## Bind Menu-specific navigation keyDown.\n useEffect(() => {\n const expandOrCollapse: (action?: 'collapse' | 'expand' | null) => void = (action = null) => {\n if (activeDescendant) {\n // expand\n if (activeDescendant.dataset.expand === 'true' && action !== 'collapse') {\n (activeDescendant!.querySelector('button') as HTMLElement)?.click();\n\n return;\n }\n\n // collapse\n if (activeDescendant.dataset.collapse === 'true' && action !== 'expand') {\n activeDescendant.click();\n }\n }\n };\n\n const additionalKeydown = (e: KeyboardEvent) => {\n switch (e.key) {\n case `Arrow${cap(endDirection)}`: {\n if (arrowNavigationUnsupported) break;\n expandOrCollapse('expand');\n break;\n }\n case `Arrow${cap(startDirection)}`: {\n if (arrowNavigationUnsupported) break;\n expandOrCollapse('collapse');\n break;\n }\n case 'Escape': {\n if (variant === 'flyout' && flyOutActiveIdStack.length > 1) {\n e.preventDefault();\n e.stopPropagation();\n\n const newStack = [...flyOutActiveIdStack];\n newStack.pop();\n setFlyoutActiveIdStack(newStack);\n }\n break;\n }\n default:\n break;\n }\n\n if (arrowNavigationUnsupported && (e.key === ' ' || e.key === 'Spacebar') && e.shiftKey) {\n e.preventDefault();\n expandOrCollapse();\n }\n };\n\n if (activeDescendant) onItemActive?.(getUnscopedItemId(activeDescendant.id));\n\n focusControl?.addEventListener('keydown', additionalKeydown);\n\n return () => focusControl?.removeEventListener('keydown', additionalKeydown);\n }, [focusControl, activeDescendant]);\n\n // ## Update useActiveDescendant on change of items, not selection of items.\n useEffect(() => {\n // Next tick for DOM updates.\n setTimeout(() => {\n if (items.length === previousItemCount.current) {\n const previousDescendantIds = descendants?.map(node => node.id);\n const newDescendants = uadConfig.scope\n ?.querySelector(uadConfig.scopeSelector)\n ?.querySelectorAll(uadConfig.selector);\n\n if (!newDescendants) {\n updateActiveDescendants();\n return;\n }\n\n const scopedDescendants = Array.from(newDescendants);\n\n if (scopedDescendants?.length !== previousDescendantIds?.length) {\n updateActiveDescendants();\n return;\n }\n\n const itemsUnchanged = scopedDescendants.every(\n (node, index) => node.id === previousDescendantIds[index]\n );\n\n if (!itemsUnchanged) {\n updateActiveDescendants();\n }\n\n return;\n }\n\n previousItemCount.current = items.length;\n updateActiveDescendants();\n }, 0);\n }, [items]);\n\n // ## Bump scroll & set return element when descendant focused in loading state.\n useEffect(() => {\n const activeDescendantChanged = previousActiveDescendant?.id !== activeDescendant?.id;\n if (!activeDescendantChanged) return;\n\n if (loading && descendants && descendants.length && activeDescendant) {\n const descendantList = [...descendants];\n const lastItem = descendantList.pop();\n const lastId = lastItem?.id || undefined;\n\n if (lastId === activeDescendant.id) {\n const scrollRegion = uadConfig.scope\n ?.querySelector(uadConfig.scopeSelector)\n ?.querySelector('ul');\n\n if (scrollRegion) {\n scrollRegion.scrollTop = scrollRegion.scrollHeight - scrollRegion.offsetHeight;\n }\n\n if (focusReturnEl?.id !== activeDescendant.id) {\n // Set focus return on 'nextTick' and avoid looping calls with immediate siblings.\n setTimeout(() => {\n setFocusReturnEl(lastItem);\n }, 0);\n }\n } else if (focusReturnEl?.id !== activeDescendant.id) {\n // Set focus return on 'nextTick' and avoid looping calls with immediate siblings.\n setTimeout(() => {\n setFocusReturnEl(activeDescendant);\n }, 0);\n }\n }\n }, [\n loading,\n descendants,\n previousActiveDescendant,\n activeDescendant,\n uadConfig,\n focusReturnEl\n ]);\n\n const contextValue = useMemo(() => {\n return {\n componentId: id,\n mode,\n arrowNavigationUnsupported,\n onItemClick,\n onItemActive,\n onItemExpand,\n onItemCollapse,\n accent,\n scrollAt,\n emptyText,\n radioName,\n loadMore,\n loading,\n variant,\n focusControl,\n updateActiveDescendants,\n setFocusReturnEl,\n setFocusDescendant,\n getScopedItemId,\n pushFlyoutId,\n flyOutActiveIdStack\n };\n }, [\n id,\n mode,\n arrowNavigationUnsupported,\n onItemClick,\n onItemActive,\n onItemExpand,\n onItemCollapse,\n accent,\n scrollAt,\n emptyText,\n radioName,\n loadMore,\n loading,\n variant,\n focusControl,\n updateActiveDescendants,\n setFocusReturnEl,\n setFocusDescendant,\n getScopedItemId,\n pushFlyoutId,\n flyOutActiveIdStack\n ]);\n\n return (\n <StyledMenu\n id={id}\n role='menu'\n aria-describedby={!focusControlEl ? `${id}-menuDescription` : undefined}\n {...restProps}\n ref={menuRef}\n >\n {!focusControlEl && (\n <StyledAriaDescription id={`${id}-menuDescription`}>\n {t('menu_selection_instructions')} {ariaDescribedBy && ` ${ariaDescribedBy}`}\n </StyledAriaDescription>\n )}\n\n {header && <header>{header}</header>}\n\n <StyledMenuListWrapper>\n <MenuContext.Provider value={contextValue}>\n {variant === 'drill-down' ? (\n <MenuList items={items} />\n ) : (\n <FlyoutMenuList items={items} />\n )}\n </MenuContext.Provider>\n </StyledMenuListWrapper>\n {footer && <footer>{footer}</footer>}\n </StyledMenu>\n );\n }\n);\n\nexport default Menu;\n"]}
@@ -1,3 +1,14 @@
1
+ export declare const StyledExpandButton: import("styled-components").StyledComponent<import("react").FunctionComponent<import("../Button").ButtonProps & import("../..").ForwardProps>, import("styled-components").DefaultTheme, {}, never>;
2
+ export declare const StyledItemLabel: import("styled-components").StyledComponent<"label", import("styled-components").DefaultTheme, {}, never>;
3
+ export declare const StyledMenuItem: import("styled-components").StyledComponent<"li", import("styled-components").DefaultTheme, {
4
+ isParentItem: boolean;
5
+ }, never>;
6
+ export declare const StyledAncestors: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
7
+ export declare const StyledVisibilityHidden: import("styled-components").StyledComponent<"p", import("styled-components").DefaultTheme, {}, never>;
8
+ export declare const StyledSeparator: import("styled-components").StyledComponent<"li", import("styled-components").DefaultTheme, {}, never>;
9
+ export declare const StyledMenuGroupList: import("styled-components").StyledComponent<"ul", import("styled-components").DefaultTheme, {}, never>;
10
+ export declare const StyledMenuGroupHeader: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
11
+ export declare const StyledMenuListHeader: import("styled-components").StyledComponent<"legend", import("styled-components").DefaultTheme, {}, never>;
1
12
  export declare const StyledMenuList: import("styled-components").StyledComponent<"ul", import("styled-components").DefaultTheme, {}, never>;
2
13
  export declare const StyledMenuListContainer: import("styled-components").StyledComponent<"fieldset", import("styled-components").DefaultTheme, {}, never>;
3
14
  export declare const StyledFlyoutMenuListContainer: import("styled-components").StyledComponent<"fieldset", import("styled-components").DefaultTheme, {}, never>;
@@ -1 +1 @@
1
- {"version":3,"file":"Menu.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/Menu.styles.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc,wGAY1B,CAAC;AAIF,eAAO,MAAM,uBAAuB,8GAMlC,CAAC;AAIH,eAAO,MAAM,6BAA6B,8GAEzC,CAAC;AAEF,eAAO,MAAM,iBAAiB,wGAI7B,CAAC;AAEF,eAAO,MAAM,qBAAqB,yGAqBjC,CAAC;AAIF,eAAO,MAAM,qBAAqB,uGAEjC,CAAC;AAEF,eAAO,MAAM,UAAU,yGAiCrB,CAAC"}
1
+ {"version":3,"file":"Menu.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/Menu.styles.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,kBAAkB,qMAE9B,CAAC;AAEF,eAAO,MAAM,eAAe,2GA8D1B,CAAC;AAIH,eAAO,MAAM,cAAc;kBAA6B,OAAO;SA0C9D,CAAC;AAIF,eAAO,MAAM,eAAe,yGAW3B,CAAC;AAEF,eAAO,MAAM,sBAAsB,uGAElC,CAAC;AAEF,eAAO,MAAM,eAAe,wGAM1B,CAAC;AAIH,eAAO,MAAM,mBAAmB,wGAM9B,CAAC;AAIH,eAAO,MAAM,qBAAqB,yGAUhC,CAAC;AAIH,eAAO,MAAM,oBAAoB,4GAgD/B,CAAC;AAIH,eAAO,MAAM,cAAc,wGAgB1B,CAAC;AAIF,eAAO,MAAM,uBAAuB,8GAMlC,CAAC;AAIH,eAAO,MAAM,6BAA6B,8GAEzC,CAAC;AAEF,eAAO,MAAM,iBAAiB,wGAI7B,CAAC;AAEF,eAAO,MAAM,qBAAqB,yGAqBjC,CAAC;AAIF,eAAO,MAAM,qBAAqB,uGAEjC,CAAC;AAEF,eAAO,MAAM,UAAU,yGAiCrB,CAAC"}
@@ -1,7 +1,202 @@
1
- import { hideVisually } from 'polished';
1
+ import { hideVisually, mix, readableColor, rgba } from 'polished';
2
2
  import styled, { css } from 'styled-components';
3
3
  import { defaultThemeProp } from '../../theme';
4
- import { StyledNoItems } from '../NoItems';
4
+ import { StyledEmptyState } from '../EmptyState';
5
+ import { StyledIcon } from '../Icon';
6
+ import { StyledGrid } from '../Grid';
7
+ import { StyledBareButton } from '../Button/BareButton';
8
+ import { tryCatch } from '../../utils';
9
+ import { StyledText } from '../Text';
10
+ import Button from '../Button';
11
+ export const StyledExpandButton = styled(Button) `
12
+ align-self: center;
13
+ `;
14
+ export const StyledItemLabel = styled.label(({ theme }) => {
15
+ const hoverCheckColor = tryCatch(() => rgba(theme.components['radio-check'][':checked']['background-color'], theme.base.transparency['transparent-5']));
16
+ const checkedBackground = theme.components['radio-check'][':checked']['background-color'];
17
+ const checkedForeground = tryCatch(() => readableColor(checkedBackground));
18
+ return css `
19
+ padding: calc(0.5 * ${theme.base.spacing}) ${theme.base.spacing};
20
+ cursor: pointer;
21
+
22
+ &:hover {
23
+ & > input[type='radio']:not(:checked) + ${StyledIcon} {
24
+ color: ${hoverCheckColor};
25
+ }
26
+
27
+ & > input[type='checkbox'] + ${StyledIcon} {
28
+ border-color: ${theme.components['form-control'][':hover']['border-color']};
29
+ }
30
+ }
31
+
32
+ > ${StyledGrid} {
33
+ flex-grow: 1;
34
+ }
35
+
36
+ > input {
37
+ ${hideVisually}
38
+
39
+ & + ${StyledIcon} {
40
+ margin-inline-start: 0;
41
+ flex-shrink: 0;
42
+ }
43
+
44
+ &[type='radio'] + ${StyledIcon} {
45
+ color: transparent;
46
+ }
47
+
48
+ &[type='radio']:checked + ${StyledIcon} {
49
+ color: ${checkedBackground};
50
+ }
51
+
52
+ &[type='checkbox'] + ${StyledIcon} {
53
+ border: 0.0625rem solid ${theme.components['radio-check']['border-color']};
54
+ border-radius: min(
55
+ calc(${theme.base['border-radius']} * ${theme.components.checkbox['border-radius']}),
56
+ 0.25rem
57
+ );
58
+ color: transparent;
59
+ background-color: ${theme.components['radio-check']['background-color']};
60
+ }
61
+
62
+ &[type='checkbox']:checked + ${StyledIcon} {
63
+ background-color: ${checkedBackground};
64
+ border-color: ${theme.components['radio-check'][':checked']['border-color']};
65
+ color: ${checkedForeground};
66
+ }
67
+ }
68
+ `;
69
+ });
70
+ StyledItemLabel.defaultProps = defaultThemeProp;
71
+ export const StyledMenuItem = styled.li(({ theme: { base, components }, isParentItem }) => {
72
+ const hoverColor = tryCatch(() => mix(0.85, base.palette['primary-background'], base.palette.interactive));
73
+ return css `
74
+ min-height: ${base['hit-area']['mouse-min']};
75
+
76
+ @media (pointer: coarse) {
77
+ min-height: ${base['hit-area']['finger-min']};
78
+ }
79
+
80
+ &:focus-within,
81
+ &:hover:not([aria-disabled='true']),
82
+ &[data-current='true'] {
83
+ background-color: ${hoverColor};
84
+ }
85
+
86
+ > button:first-child,
87
+ > a:first-child {
88
+ display: block;
89
+ width: 100%;
90
+ padding: calc(0.5 * ${base.spacing}) ${base.spacing};
91
+ text-align: start;
92
+ text-decoration: none;
93
+ color: inherit;
94
+ ${isParentItem &&
95
+ css `
96
+ padding-inline-start: calc(1.125rem + 2 * ${base.spacing});
97
+ `}
98
+ }
99
+
100
+ &[aria-disabled='true'] {
101
+ label,
102
+ ${StyledBareButton} {
103
+ background-color: ${components['form-control'][':disabled']['background-color']};
104
+ opacity: ${base['disabled-opacity']};
105
+ }
106
+ }
107
+ `;
108
+ });
109
+ StyledMenuItem.defaultProps = defaultThemeProp;
110
+ export const StyledAncestors = styled.div `
111
+ ${StyledIcon} {
112
+ width: 1em;
113
+ height: 1em;
114
+ }
115
+
116
+ & > ${StyledText} {
117
+ white-space: nowrap;
118
+ overflow: hidden;
119
+ text-overflow: ellipsis;
120
+ }
121
+ `;
122
+ export const StyledVisibilityHidden = styled.p `
123
+ ${hideVisually}
124
+ `;
125
+ export const StyledSeparator = styled.li(({ theme }) => {
126
+ return css `
127
+ height: 0.0625rem;
128
+ background-color: ${theme.base.palette['border-line']};
129
+ margin: ${theme.base.spacing} 0;
130
+ `;
131
+ });
132
+ StyledSeparator.defaultProps = defaultThemeProp;
133
+ export const StyledMenuGroupList = styled.ul(({ theme }) => {
134
+ return css `
135
+ ${StyledMenuItem} button {
136
+ padding-inline-start: calc(1.5 * ${theme.base.spacing});
137
+ }
138
+ `;
139
+ });
140
+ StyledMenuGroupList.defaultProps = defaultThemeProp;
141
+ export const StyledMenuGroupHeader = styled.div(({ theme }) => {
142
+ return css `
143
+ min-height: ${theme.base['hit-area']['mouse-min']};
144
+ font-weight: ${theme.base['font-weight']['semi-bold']};
145
+ background-color: ${theme.base.palette['secondary-background']};
146
+
147
+ @media (pointer: coarse) {
148
+ min-height: ${theme.base['hit-area']['finger-min']};
149
+ }
150
+ `;
151
+ });
152
+ StyledMenuGroupHeader.defaultProps = defaultThemeProp;
153
+ export const StyledMenuListHeader = styled.legend(({ theme: { base } }) => {
154
+ const hoverColor = tryCatch(() => mix(0.85, base.palette['primary-background'], base.palette.interactive));
155
+ return css `
156
+ width: 100%;
157
+ background-color: ${base.palette['primary-background']};
158
+
159
+ &:first-child {
160
+ border-top-left-radius: inherit;
161
+ border-top-right-radius: inherit;
162
+ }
163
+ &:last-child {
164
+ border-bottom-left-radius: inherit;
165
+ border-bottom-right-radius: inherit;
166
+ }
167
+
168
+ &:focus-within {
169
+ box-shadow: inset ${base.shadow.focus};
170
+ background-color: ${hoverColor};
171
+ }
172
+
173
+ &:hover {
174
+ background-color: ${hoverColor};
175
+ }
176
+
177
+ & > ${StyledBareButton}, & > button {
178
+ color: ${base.palette['foreground-color']};
179
+ width: 100%;
180
+ padding: calc(0.5 * ${base.spacing}) ${base.spacing};
181
+ text-align: start;
182
+ border-radius: inherit;
183
+
184
+ > ${StyledGrid} {
185
+ grid-column-gap: ${base.spacing};
186
+ }
187
+
188
+ ${StyledIcon} {
189
+ /* Fixes vertical align issue increasing box size beyond square */
190
+ display: block;
191
+ }
192
+ }
193
+
194
+ > button[data-current='true'] {
195
+ background-color: ${hoverColor};
196
+ }
197
+ `;
198
+ });
199
+ StyledMenuListHeader.defaultProps = defaultThemeProp;
5
200
  export const StyledMenuList = styled.ul(({ theme }) => css `
6
201
  overflow-x: hidden;
7
202
  overflow-y: auto;
@@ -9,9 +204,13 @@ export const StyledMenuList = styled.ul(({ theme }) => css `
9
204
  height: 100%;
10
205
  border-radius: inherit;
11
206
 
12
- ${StyledNoItems} {
207
+ ${StyledEmptyState} {
13
208
  padding: ${theme.base.spacing};
14
209
  }
210
+
211
+ li:not(:first-child) > ${StyledMenuGroupHeader} {
212
+ margin-block-start: ${theme.base.spacing};
213
+ }
15
214
  `);
16
215
  StyledMenuList.defaultProps = defaultThemeProp;
17
216
  export const StyledMenuListContainer = styled.fieldset(({ theme }) => {
@@ -1 +1 @@
1
- {"version":3,"file":"Menu.styles.js","sourceRoot":"","sources":["../../../src/components/Menu/Menu.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,EAAE,CACrC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,GAAG,CAAA;;;;;;;MAOd,aAAa;iBACF,KAAK,CAAC,IAAI,CAAC,OAAO;;GAEhC,CACF,CAAC;AAEF,cAAc,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE/C,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACnE,OAAO,GAAG,CAAA;wBACY,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC;;;GAG7D,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,uBAAuB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAExD,MAAM,CAAC,MAAM,6BAA6B,GAAG,MAAM,CAAC,uBAAuB,CAAC,CAAA;;CAE3E,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,EAAE,CAAA;;;;CAIzC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,GAAG,CAC7C,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,GAAG,CAAA;;;yBAGK,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI;;;;;;;;;;;;;;;;GAgBpF,CACF,CAAC;AAEF,qBAAqB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEtD,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,CAAC,CAAA;IACzC,YAAY;CACf,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACjD,MAAM,WAAW,GAAG,mBAAmB,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,CAAC;IAC3E,OAAO,GAAG,CAAA;;;;;;MAMN,qBAAqB;UACjB,qBAAqB;;;;;;;;;;;;;iBAad,KAAK,CAAC,IAAI,CAAC,OAAO;;;;uBAIZ,WAAW;;;;oBAId,WAAW;;GAE5B,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,UAAU,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import { hideVisually } from 'polished';\nimport styled, { css } from 'styled-components';\n\nimport { defaultThemeProp } from '../../theme';\nimport { StyledNoItems } from '../NoItems';\n\nexport const StyledMenuList = styled.ul(\n ({ theme }) => css`\n overflow-x: hidden;\n overflow-y: auto;\n list-style: none;\n height: 100%;\n border-radius: inherit;\n\n ${StyledNoItems} {\n padding: ${theme.base.spacing};\n }\n `\n);\n\nStyledMenuList.defaultProps = defaultThemeProp;\n\nexport const StyledMenuListContainer = styled.fieldset(({ theme }) => {\n return css`\n background-color: ${theme.base.palette['primary-background']};\n border: 0;\n border-radius: inherit;\n `;\n});\n\nStyledMenuListContainer.defaultProps = defaultThemeProp;\n\nexport const StyledFlyoutMenuListContainer = styled(StyledMenuListContainer)`\n min-width: 10rem;\n`;\n\nexport const StyledLoadingItem = styled.li`\n display: block;\n position: relative;\n height: 2.8rem;\n`;\n\nexport const StyledMenuListWrapper = styled.div(\n ({ theme }) => css`\n position: relative;\n overflow: hidden;\n transition: height ${theme.base.animation.speed} ${theme.base.animation.timing.ease};\n max-height: 50vh;\n\n & > fieldset:first-child {\n position: relative;\n }\n\n &:first-child {\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n }\n\n &:last-child {\n border-bottom-left-radius: inherit;\n border-bottom-right-radius: inherit;\n }\n `\n);\n\nStyledMenuListWrapper.defaultProps = defaultThemeProp;\n\nexport const StyledAriaDescription = styled.p`\n ${hideVisually}\n`;\n\nexport const StyledMenu = styled.div(({ theme }) => {\n const borderStyle = `0.0625rem solid ${theme.base.palette['border-line']}`;\n return css`\n &:first-child {\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n }\n\n ${StyledAriaDescription}:first-child {\n + ${StyledMenuListWrapper}, + header {\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n }\n }\n\n &:last-child {\n border-bottom-left-radius: inherit;\n border-bottom-right-radius: inherit;\n }\n\n > header,\n > footer {\n padding: ${theme.base.spacing};\n }\n\n > header {\n border-bottom: ${borderStyle};\n }\n\n > footer {\n border-top: ${borderStyle};\n }\n `;\n});\n\nStyledMenu.defaultProps = defaultThemeProp;\n"]}
1
+ {"version":3,"file":"Menu.styles.js","sourceRoot":"","sources":["../../../src/components/Menu/Menu.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAClE,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;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E,CAAA;;;;CAIzC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,GAAG,CAC7C,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,GAAG,CAAA;;;yBAGK,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI;;;;;;;;;;;;;;;;GAgBpF,CACF,CAAC;AAEF,qBAAqB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEtD,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,CAAC,CAAA;IACzC,YAAY;CACf,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACjD,MAAM,WAAW,GAAG,mBAAmB,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,CAAC;IAC3E,OAAO,GAAG,CAAA;;;;;;MAMN,qBAAqB;UACjB,qBAAqB;;;;;;;;;;;;;iBAad,KAAK,CAAC,IAAI,CAAC,OAAO;;;;uBAIZ,WAAW;;;;oBAId,WAAW;;GAE5B,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,UAAU,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import { hideVisually, mix, readableColor, rgba } from 'polished';\nimport styled, { css } from 'styled-components';\n\nimport { defaultThemeProp } from '../../theme';\nimport { StyledEmptyState } from '../EmptyState';\nimport { StyledIcon } from '../Icon';\nimport { StyledGrid } from '../Grid';\nimport { StyledBareButton } from '../Button/BareButton';\nimport { tryCatch } from '../../utils';\nimport { StyledText } from '../Text';\nimport Button from '../Button';\n\nexport const StyledExpandButton = styled(Button)`\n align-self: center;\n`;\n\nexport const StyledItemLabel = styled.label(({ theme }) => {\n const hoverCheckColor = tryCatch(() =>\n rgba(\n theme.components['radio-check'][':checked']['background-color'],\n theme.base.transparency['transparent-5']\n )\n );\n\n const checkedBackground = theme.components['radio-check'][':checked']['background-color'];\n const checkedForeground = tryCatch(() => readableColor(checkedBackground));\n\n return css`\n padding: calc(0.5 * ${theme.base.spacing}) ${theme.base.spacing};\n cursor: pointer;\n\n &:hover {\n & > input[type='radio']:not(:checked) + ${StyledIcon} {\n color: ${hoverCheckColor};\n }\n\n & > input[type='checkbox'] + ${StyledIcon} {\n border-color: ${theme.components['form-control'][':hover']['border-color']};\n }\n }\n\n > ${StyledGrid} {\n flex-grow: 1;\n }\n\n > input {\n ${hideVisually}\n\n & + ${StyledIcon} {\n margin-inline-start: 0;\n flex-shrink: 0;\n }\n\n &[type='radio'] + ${StyledIcon} {\n color: transparent;\n }\n\n &[type='radio']:checked + ${StyledIcon} {\n color: ${checkedBackground};\n }\n\n &[type='checkbox'] + ${StyledIcon} {\n border: 0.0625rem solid ${theme.components['radio-check']['border-color']};\n border-radius: min(\n calc(${theme.base['border-radius']} * ${theme.components.checkbox['border-radius']}),\n 0.25rem\n );\n color: transparent;\n background-color: ${theme.components['radio-check']['background-color']};\n }\n\n &[type='checkbox']:checked + ${StyledIcon} {\n background-color: ${checkedBackground};\n border-color: ${theme.components['radio-check'][':checked']['border-color']};\n color: ${checkedForeground};\n }\n }\n `;\n});\n\nStyledItemLabel.defaultProps = defaultThemeProp;\n\nexport const StyledMenuItem = styled.li<{ isParentItem: boolean }>(\n ({ theme: { base, components }, isParentItem }) => {\n const hoverColor = tryCatch(() =>\n mix(0.85, base.palette['primary-background'], base.palette.interactive)\n );\n\n return css`\n min-height: ${base['hit-area']['mouse-min']};\n\n @media (pointer: coarse) {\n min-height: ${base['hit-area']['finger-min']};\n }\n\n &:focus-within,\n &:hover:not([aria-disabled='true']),\n &[data-current='true'] {\n background-color: ${hoverColor};\n }\n\n > button:first-child,\n > a:first-child {\n display: block;\n width: 100%;\n padding: calc(0.5 * ${base.spacing}) ${base.spacing};\n text-align: start;\n text-decoration: none;\n color: inherit;\n ${isParentItem &&\n css`\n padding-inline-start: calc(1.125rem + 2 * ${base.spacing});\n `}\n }\n\n &[aria-disabled='true'] {\n label,\n ${StyledBareButton} {\n background-color: ${components['form-control'][':disabled']['background-color']};\n opacity: ${base['disabled-opacity']};\n }\n }\n `;\n }\n);\n\nStyledMenuItem.defaultProps = defaultThemeProp;\n\nexport const StyledAncestors = styled.div`\n ${StyledIcon} {\n width: 1em;\n height: 1em;\n }\n\n & > ${StyledText} {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n`;\n\nexport const StyledVisibilityHidden = styled.p`\n ${hideVisually}\n`;\n\nexport const StyledSeparator = styled.li(({ theme }) => {\n return css`\n height: 0.0625rem;\n background-color: ${theme.base.palette['border-line']};\n margin: ${theme.base.spacing} 0;\n `;\n});\n\nStyledSeparator.defaultProps = defaultThemeProp;\n\nexport const StyledMenuGroupList = styled.ul(({ theme }) => {\n return css`\n ${StyledMenuItem} button {\n padding-inline-start: calc(1.5 * ${theme.base.spacing});\n }\n `;\n});\n\nStyledMenuGroupList.defaultProps = defaultThemeProp;\n\nexport const StyledMenuGroupHeader = styled.div(({ theme }) => {\n return css`\n min-height: ${theme.base['hit-area']['mouse-min']};\n font-weight: ${theme.base['font-weight']['semi-bold']};\n background-color: ${theme.base.palette['secondary-background']};\n\n @media (pointer: coarse) {\n min-height: ${theme.base['hit-area']['finger-min']};\n }\n `;\n});\n\nStyledMenuGroupHeader.defaultProps = defaultThemeProp;\n\nexport const StyledMenuListHeader = styled.legend(({ theme: { base } }) => {\n const hoverColor = tryCatch(() =>\n mix(0.85, base.palette['primary-background'], base.palette.interactive)\n );\n\n return css`\n width: 100%;\n background-color: ${base.palette['primary-background']};\n\n &:first-child {\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n }\n &:last-child {\n border-bottom-left-radius: inherit;\n border-bottom-right-radius: inherit;\n }\n\n &:focus-within {\n box-shadow: inset ${base.shadow.focus};\n background-color: ${hoverColor};\n }\n\n &:hover {\n background-color: ${hoverColor};\n }\n\n & > ${StyledBareButton}, & > button {\n color: ${base.palette['foreground-color']};\n width: 100%;\n padding: calc(0.5 * ${base.spacing}) ${base.spacing};\n text-align: start;\n border-radius: inherit;\n\n > ${StyledGrid} {\n grid-column-gap: ${base.spacing};\n }\n\n ${StyledIcon} {\n /* Fixes vertical align issue increasing box size beyond square */\n display: block;\n }\n }\n\n > button[data-current='true'] {\n background-color: ${hoverColor};\n }\n `;\n});\n\nStyledMenuListHeader.defaultProps = defaultThemeProp;\n\nexport const StyledMenuList = styled.ul(\n ({ theme }) => css`\n overflow-x: hidden;\n overflow-y: auto;\n list-style: none;\n height: 100%;\n border-radius: inherit;\n\n ${StyledEmptyState} {\n padding: ${theme.base.spacing};\n }\n\n li:not(:first-child) > ${StyledMenuGroupHeader} {\n margin-block-start: ${theme.base.spacing};\n }\n `\n);\n\nStyledMenuList.defaultProps = defaultThemeProp;\n\nexport const StyledMenuListContainer = styled.fieldset(({ theme }) => {\n return css`\n background-color: ${theme.base.palette['primary-background']};\n border: 0;\n border-radius: inherit;\n `;\n});\n\nStyledMenuListContainer.defaultProps = defaultThemeProp;\n\nexport const StyledFlyoutMenuListContainer = styled(StyledMenuListContainer)`\n min-width: 10rem;\n`;\n\nexport const StyledLoadingItem = styled.li`\n display: block;\n position: relative;\n height: 2.8rem;\n`;\n\nexport const StyledMenuListWrapper = styled.div(\n ({ theme }) => css`\n position: relative;\n overflow: hidden;\n transition: height ${theme.base.animation.speed} ${theme.base.animation.timing.ease};\n max-height: 50vh;\n\n & > fieldset:first-child {\n position: relative;\n }\n\n &:first-child {\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n }\n\n &:last-child {\n border-bottom-left-radius: inherit;\n border-bottom-right-radius: inherit;\n }\n `\n);\n\nStyledMenuListWrapper.defaultProps = defaultThemeProp;\n\nexport const StyledAriaDescription = styled.p`\n ${hideVisually}\n`;\n\nexport const StyledMenu = styled.div(({ theme }) => {\n const borderStyle = `0.0625rem solid ${theme.base.palette['border-line']}`;\n return css`\n &:first-child {\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n }\n\n ${StyledAriaDescription}:first-child {\n + ${StyledMenuListWrapper}, + header {\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n }\n }\n\n &:last-child {\n border-bottom-left-radius: inherit;\n border-bottom-right-radius: inherit;\n }\n\n > header,\n > footer {\n padding: ${theme.base.spacing};\n }\n\n > header {\n border-bottom: ${borderStyle};\n }\n\n > footer {\n border-top: ${borderStyle};\n }\n `;\n});\n\nStyledMenu.defaultProps = defaultThemeProp;\n"]}
@@ -1,21 +1,20 @@
1
1
  import { Dispatch, ReactNode, Ref, RefObject, SetStateAction, MouseEvent } from 'react';
2
- import { BaseProps, OmitStrict, PropsWithDefaults } from '../../types';
2
+ import { BaseProps, NoChildrenProp, OmitStrict, PropsWithDefaults } from '../../types';
3
+ import { MetaListProps } from '../MetaList';
3
4
  export declare type AcceptedMouseEventElement = HTMLButtonElement | HTMLAnchorElement | HTMLInputElement;
4
- export interface MenuItemProps {
5
- /** A unique id within the entire tree of menu items. This will be passed back to an item's onClick handler. */
6
- id: string;
5
+ export interface MenuItemProps extends MenuObjectProps {
7
6
  /** The primary piece of item information as a string. */
8
7
  primary: string;
9
8
  /** Secondary info about an item. Useful for additional metadata or context. Will be overridden when ancestors are passed as a prop. */
10
- secondary?: string[];
9
+ secondary?: MetaListProps['items'];
11
10
  /** A visual to assist identifying an item. e.g. Avatar or Icon. */
12
11
  visual?: ReactNode;
13
12
  /** A count to assist with number of associated items. */
14
13
  count?: number;
15
14
  /** An array of MenuItemProps to identify an item's ancestors by their primary value. Useful for flattened tree search results. */
16
- ancestors?: MenuItemProps[];
17
- /** An array of MenuItemProps children. */
18
- items?: MenuItemProps[];
15
+ ancestors?: (MenuItemProps | MenuGroupProps)[];
16
+ /** An array of either MenuItemProps or MenuGroupProps children. */
17
+ items?: (MenuItemProps | MenuGroupProps)[];
19
18
  /**
20
19
  * For single or multi select menus, selected must be set true|false to render an item's radiobutton or checkbox.
21
20
  * May be set on parent or leaf items.
@@ -32,21 +31,31 @@ export interface MenuItemProps {
32
31
  * This should be used only for VERY SPECIFIC UX scenarios.
33
32
  */
34
33
  tooltip?: string;
35
- /** Use this function to identify and set item selections. Recommend leveraging top level Menu onClick handler. */
34
+ /** Use this function to identify and set item selections. Recommend leveraging top level Menu onItemClick handler. */
36
35
  onClick?: (id: MenuItemProps['id'], e: MouseEvent<AcceptedMouseEventElement>) => void;
37
36
  onExpand?: MenuItemProps['onClick'];
38
37
  /** Determines if the MenuItem will be disabled. */
39
38
  disabled?: boolean;
40
39
  }
40
+ export interface MenuGroupProps extends MenuObjectProps {
41
+ /** Label of the group. */
42
+ label: string;
43
+ /** An array of MenuItemProps children. */
44
+ items: MenuItemProps[];
45
+ }
41
46
  export declare type ParentMenuItemProps = MenuItemProps & {
42
47
  items: NonNullable<MenuItemProps['items']>;
43
48
  };
44
49
  export interface MenuListHeaderProps {
45
50
  /** Text used to indicate an expanded parent item. */
46
- text?: string;
51
+ text: string;
47
52
  /** Internal handler. */
48
53
  onClick: () => void;
49
54
  }
55
+ export interface MenuObjectProps {
56
+ /** A unique id within the entire tree of menu items. */
57
+ id: string;
58
+ }
50
59
  export interface MenuListProps {
51
60
  items: ParentMenuItemProps['items'];
52
61
  ref?: Ref<HTMLFieldSetElement>;
@@ -58,9 +67,9 @@ export interface MenuListProps {
58
67
  returnFocusRef: RefObject<HTMLButtonElement>;
59
68
  };
60
69
  }
61
- export interface MenuProps extends BaseProps {
70
+ export interface MenuProps extends BaseProps, NoChildrenProp {
62
71
  /** An array of MenuItemProps. */
63
- items: MenuItemProps[];
72
+ items: (MenuItemProps | MenuGroupProps)[];
64
73
  /**
65
74
  * Indicates intent for the menu.
66
75
  * As of now item types can not be mixed.
@@ -93,6 +102,11 @@ export interface MenuProps extends BaseProps {
93
102
  * Both an item's onClick and this will be called if both are passed.
94
103
  */
95
104
  onItemClick?: MenuItemProps['onClick'];
105
+ /**
106
+ * A top level handler for all item pseudo focus events.
107
+ * This is convenient way to detect which item is active to react by updating state or performing an action.
108
+ */
109
+ onItemActive?: (id: MenuItemProps['id']) => void;
96
110
  /**
97
111
  * A top level handler for clicks on parent items to expand their child items.
98
112
  * This is convenient way to detect when an item is expanded.
@@ -123,6 +137,8 @@ export interface MenuProps extends BaseProps {
123
137
  currentItemId?: string;
124
138
  /** Override for default active-descendant focus control element in menu */
125
139
  focusControlEl?: HTMLElement | undefined;
140
+ /** Override whether the menu automatically focuses the control element on close */
141
+ focusElOnClose?: boolean;
126
142
  /** Header region. */
127
143
  header?: ReactNode;
128
144
  /** Footer region. */
@@ -143,9 +159,11 @@ export interface MenuContextProps extends OmitStrict<MenuPropsWithDefaults, 'ref
143
159
  componentId: string;
144
160
  pushFlyoutId: (id: string) => void;
145
161
  flyOutActiveIdStack: string[];
162
+ focusControl: HTMLElement | null;
146
163
  updateActiveDescendants: (options?: {
147
164
  preventScroll?: boolean;
148
165
  }) => void;
166
+ setFocusDescendant: Dispatch<SetStateAction<HTMLElement | null>>;
149
167
  setFocusReturnEl: Dispatch<SetStateAction<HTMLElement | null | undefined>>;
150
168
  getScopedItemId: (itemId: string) => string;
151
169
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Menu.types.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/Menu.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAExF,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEvE,oBAAY,yBAAyB,GAAG,iBAAiB,GAAG,iBAAiB,GAAG,gBAAgB,CAAC;AAEjG,MAAM,WAAW,aAAa;IAC5B,+GAA+G;IAC/G,EAAE,EAAE,MAAM,CAAC;IACX,yDAAyD;IACzD,OAAO,EAAE,MAAM,CAAC;IAChB,uIAAuI;IACvI,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,CAAC;IACjC,uBAAuB,EAAE,CAAC,OAAO,CAAC,EAAE;QAAE,aAAa,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAC;IACzE,kBAAkB,EAAE,QAAQ,CAAC,cAAc,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC,CAAC;IACjE,gBAAgB,EAAE,QAAQ,CAAC,cAAc,CAAC,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC,CAAC;IAC3E,eAAe,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;CAC7C;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,SAAS,CAAC,gBAAgB,CAAC,CAAC;IACrC,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB"}
@@ -1 +1 @@
1
- {"version":3,"file":"Menu.types.js","sourceRoot":"","sources":["../../../src/components/Menu/Menu.types.ts"],"names":[],"mappings":"","sourcesContent":["import { Dispatch, ReactNode, Ref, RefObject, SetStateAction, MouseEvent } from 'react';\n\nimport { BaseProps, OmitStrict, PropsWithDefaults } from '../../types';\n\nexport type AcceptedMouseEventElement = HTMLButtonElement | HTMLAnchorElement | HTMLInputElement;\n\nexport interface MenuItemProps {\n /** A unique id within the entire tree of menu items. This will be passed back to an item's onClick handler. */\n id: string;\n /** The primary piece of item information as a string. */\n primary: string;\n /** Secondary info about an item. Useful for additional metadata or context. Will be overridden when ancestors are passed as a prop. */\n secondary?: string[];\n /** A visual to assist identifying an item. e.g. Avatar or Icon. */\n visual?: ReactNode;\n /** A count to assist with number of associated items. */\n count?: number;\n /** An array of MenuItemProps to identify an item's ancestors by their primary value. Useful for flattened tree search results. */\n ancestors?: MenuItemProps[];\n /** An array of MenuItemProps children. */\n items?: MenuItemProps[];\n /**\n * For single or multi select menus, selected must be set true|false to render an item's radiobutton or checkbox.\n * May be set on parent or leaf items.\n */\n selected?: boolean;\n /**\n * FUTURE SUPPORT: Use to indicate an item has a partial selection, some but not all of its descendants are selected.\n */\n partial?: boolean;\n /** Will render the action item as link. Only use for leaf items. */\n href?: string;\n /**\n * Provide a description for an item that will render in a Tooltip when hovering that item.\n * This should be used only for VERY SPECIFIC UX scenarios.\n */\n tooltip?: string;\n /** Use this function to identify and set item selections. Recommend leveraging top level Menu onClick handler. */\n onClick?: (id: MenuItemProps['id'], e: MouseEvent<AcceptedMouseEventElement>) => void;\n onExpand?: MenuItemProps['onClick'];\n /** Determines if the MenuItem will be disabled. */\n disabled?: boolean;\n}\n\nexport type ParentMenuItemProps = MenuItemProps & { items: NonNullable<MenuItemProps['items']> };\n\nexport interface MenuListHeaderProps {\n /** Text used to indicate an expanded parent item. */\n text?: string;\n /** Internal handler. */\n onClick: () => void;\n}\n\nexport interface MenuListProps {\n items: ParentMenuItemProps['items'];\n ref?: Ref<HTMLFieldSetElement>;\n parent?: {\n el: HTMLFieldSetElement;\n item: ParentMenuItemProps;\n siblingItems: ParentMenuItemProps['items'];\n setExpandedItem: Dispatch<SetStateAction<ParentMenuItemProps | undefined>>;\n returnFocusRef: RefObject<HTMLButtonElement>;\n };\n}\n\nexport interface MenuProps extends BaseProps {\n /** An array of MenuItemProps. */\n items: MenuItemProps[];\n /**\n * Indicates intent for the menu.\n * As of now item types can not be mixed.\n * @default \"action\"\n */\n mode?: 'action' | 'multi-select' | 'single-select';\n /**\n * Always recommended to go for default drill-down variant for better accessibility.\n * When flyout variant is selected, its recommended not to have more than 1 nested level\n * @default \"drill-down\"\n */\n variant?: 'drill-down' | 'flyout';\n /**\n * Use to accent(make bold) portions of the primary text.\n * Useful for filter/search results.\n * If passed a function, that function will be passed each items primary text.\n */\n accent?: RegExp | ((primary: string) => RegExp);\n /**\n * Item height will grow or shrink based on item count.\n * Use this indicate at which item the menu should begin its scroll.\n * @default 7\n */\n scrollAt?: number;\n /** A simple message to display when there are no items. */\n emptyText?: string;\n /**\n * A top level handler for all item clicks.\n * This is convenient way to detect which item was clicked to react by updating state or performing an action.\n * Both an item's onClick and this will be called if both are passed.\n */\n onItemClick?: MenuItemProps['onClick'];\n /**\n * A top level handler for clicks on parent items to expand their child items.\n * This is convenient way to detect when an item is expanded.\n * For lazy loading this would be a good time to set an item's items.\n * Both an item's onExpand and this will be called if both are passed.\n */\n onItemExpand?: MenuProps['onItemClick'];\n /**\n * A top level handler for capturing when nested items have been collapsed / \"back\" button clicks.\n */\n onItemCollapse?: (id: MenuItemProps['id']) => void;\n /**\n * Show a Progress indicator at the end of a list where newly loaded items will be appended.\n * @default false\n */\n loading?: boolean;\n /** Callback to fetch more items */\n loadMore?: (id?: MenuItemProps['id']) => void;\n /** Ref placed on the root menu element. */\n ref?: Ref<HTMLDivElement>;\n /** HTML ID. */\n id?: string;\n /**\n * Currently highlighted item.\n * Setting currentItemId assumes synthetic focus is being controlled entirely by the containing component,\n * and unbinds menu useActiveDescendant keydown controls.\n * */\n currentItemId?: string;\n /** Override for default active-descendant focus control element in menu */\n focusControlEl?: HTMLElement | undefined;\n /** Header region. */\n header?: ReactNode;\n /** Footer region. */\n footer?: ReactNode;\n /**\n * Flag to indicate that Right/Left arrow navigation for expand/collapse parent items is not available.\n * Will accept enter if not selectable parent, otherwise falls back to shift + space.\n */\n arrowNavigationUnsupported?: boolean;\n /**\n * Additional information to announce to screen reader users. Read before menu navigation instructions.\n */\n 'aria-describedby'?: string;\n}\n\ntype MenuPropsWithDefaults = PropsWithDefaults<\n MenuProps,\n 'mode' | 'variant' | 'scrollAt' | 'loading'\n>;\nexport interface MenuContextProps extends OmitStrict<MenuPropsWithDefaults, 'ref' | 'items'> {\n radioName?: string;\n componentId: string;\n pushFlyoutId: (id: string) => void;\n flyOutActiveIdStack: string[];\n updateActiveDescendants: (options?: { preventScroll?: boolean }) => void;\n setFocusReturnEl: Dispatch<SetStateAction<HTMLElement | null | undefined>>;\n getScopedItemId: (itemId: string) => string;\n}\n\nexport interface NavItemsListProps {\n listRef: RefObject<HTMLUListElement>;\n cycle?: boolean;\n}\n"]}
1
+ {"version":3,"file":"Menu.types.js","sourceRoot":"","sources":["../../../src/components/Menu/Menu.types.ts"],"names":[],"mappings":"","sourcesContent":["import { Dispatch, ReactNode, Ref, RefObject, SetStateAction, MouseEvent } from 'react';\n\nimport { BaseProps, NoChildrenProp, OmitStrict, PropsWithDefaults } from '../../types';\nimport { MetaListProps } from '../MetaList';\n\nexport type AcceptedMouseEventElement = HTMLButtonElement | HTMLAnchorElement | HTMLInputElement;\n\nexport interface MenuItemProps extends MenuObjectProps {\n /** The primary piece of item information as a string. */\n primary: string;\n /** Secondary info about an item. Useful for additional metadata or context. Will be overridden when ancestors are passed as a prop. */\n secondary?: MetaListProps['items'];\n /** A visual to assist identifying an item. e.g. Avatar or Icon. */\n visual?: ReactNode;\n /** A count to assist with number of associated items. */\n count?: number;\n /** An array of MenuItemProps to identify an item's ancestors by their primary value. Useful for flattened tree search results. */\n ancestors?: (MenuItemProps | MenuGroupProps)[];\n /** An array of either MenuItemProps or MenuGroupProps children. */\n items?: (MenuItemProps | MenuGroupProps)[];\n /**\n * For single or multi select menus, selected must be set true|false to render an item's radiobutton or checkbox.\n * May be set on parent or leaf items.\n */\n selected?: boolean;\n /**\n * FUTURE SUPPORT: Use to indicate an item has a partial selection, some but not all of its descendants are selected.\n */\n partial?: boolean;\n /** Will render the action item as link. Only use for leaf items. */\n href?: string;\n /**\n * Provide a description for an item that will render in a Tooltip when hovering that item.\n * This should be used only for VERY SPECIFIC UX scenarios.\n */\n tooltip?: string;\n /** Use this function to identify and set item selections. Recommend leveraging top level Menu onItemClick handler. */\n onClick?: (id: MenuItemProps['id'], e: MouseEvent<AcceptedMouseEventElement>) => void;\n onExpand?: MenuItemProps['onClick'];\n /** Determines if the MenuItem will be disabled. */\n disabled?: boolean;\n}\n\nexport interface MenuGroupProps extends MenuObjectProps {\n /** Label of the group. */\n label: string;\n /** An array of MenuItemProps children. */\n items: MenuItemProps[];\n}\n\nexport type ParentMenuItemProps = MenuItemProps & { items: NonNullable<MenuItemProps['items']> };\n\nexport interface MenuListHeaderProps {\n /** Text used to indicate an expanded parent item. */\n text: string;\n /** Internal handler. */\n onClick: () => void;\n}\n\nexport interface MenuObjectProps {\n /** A unique id within the entire tree of menu items. */\n id: string;\n}\n\nexport interface MenuListProps {\n items: ParentMenuItemProps['items'];\n ref?: Ref<HTMLFieldSetElement>;\n parent?: {\n el: HTMLFieldSetElement;\n item: ParentMenuItemProps;\n siblingItems: ParentMenuItemProps['items'];\n setExpandedItem: Dispatch<SetStateAction<ParentMenuItemProps | undefined>>;\n returnFocusRef: RefObject<HTMLButtonElement>;\n };\n}\n\nexport interface MenuProps extends BaseProps, NoChildrenProp {\n /** An array of MenuItemProps. */\n items: (MenuItemProps | MenuGroupProps)[];\n /**\n * Indicates intent for the menu.\n * As of now item types can not be mixed.\n * @default \"action\"\n */\n mode?: 'action' | 'multi-select' | 'single-select';\n /**\n * Always recommended to go for default drill-down variant for better accessibility.\n * When flyout variant is selected, its recommended not to have more than 1 nested level\n * @default \"drill-down\"\n */\n variant?: 'drill-down' | 'flyout';\n /**\n * Use to accent(make bold) portions of the primary text.\n * Useful for filter/search results.\n * If passed a function, that function will be passed each items primary text.\n */\n accent?: RegExp | ((primary: string) => RegExp);\n /**\n * Item height will grow or shrink based on item count.\n * Use this indicate at which item the menu should begin its scroll.\n * @default 7\n */\n scrollAt?: number;\n /** A simple message to display when there are no items. */\n emptyText?: string;\n /**\n * A top level handler for all item clicks.\n * This is convenient way to detect which item was clicked to react by updating state or performing an action.\n * Both an item's onClick and this will be called if both are passed.\n */\n onItemClick?: MenuItemProps['onClick'];\n /**\n * A top level handler for all item pseudo focus events.\n * This is convenient way to detect which item is active to react by updating state or performing an action.\n */\n onItemActive?: (id: MenuItemProps['id']) => void;\n /**\n * A top level handler for clicks on parent items to expand their child items.\n * This is convenient way to detect when an item is expanded.\n * For lazy loading this would be a good time to set an item's items.\n * Both an item's onExpand and this will be called if both are passed.\n */\n onItemExpand?: MenuProps['onItemClick'];\n /**\n * A top level handler for capturing when nested items have been collapsed / \"back\" button clicks.\n */\n onItemCollapse?: (id: MenuItemProps['id']) => void;\n /**\n * Show a Progress indicator at the end of a list where newly loaded items will be appended.\n * @default false\n */\n loading?: boolean;\n /** Callback to fetch more items */\n loadMore?: (id?: MenuItemProps['id']) => void;\n /** Ref placed on the root menu element. */\n ref?: Ref<HTMLDivElement>;\n /** HTML ID. */\n id?: string;\n /**\n * Currently highlighted item.\n * Setting currentItemId assumes synthetic focus is being controlled entirely by the containing component,\n * and unbinds menu useActiveDescendant keydown controls.\n * */\n currentItemId?: string;\n /** Override for default active-descendant focus control element in menu */\n focusControlEl?: HTMLElement | undefined;\n /** Override whether the menu automatically focuses the control element on close */\n focusElOnClose?: boolean;\n /** Header region. */\n header?: ReactNode;\n /** Footer region. */\n footer?: ReactNode;\n /**\n * Flag to indicate that Right/Left arrow navigation for expand/collapse parent items is not available.\n * Will accept enter if not selectable parent, otherwise falls back to shift + space.\n */\n arrowNavigationUnsupported?: boolean;\n /**\n * Additional information to announce to screen reader users. Read before menu navigation instructions.\n */\n 'aria-describedby'?: string;\n}\n\ntype MenuPropsWithDefaults = PropsWithDefaults<\n MenuProps,\n 'mode' | 'variant' | 'scrollAt' | 'loading'\n>;\nexport interface MenuContextProps extends OmitStrict<MenuPropsWithDefaults, 'ref' | 'items'> {\n radioName?: string;\n componentId: string;\n pushFlyoutId: (id: string) => void;\n flyOutActiveIdStack: string[];\n focusControl: HTMLElement | null;\n updateActiveDescendants: (options?: { preventScroll?: boolean }) => void;\n setFocusDescendant: Dispatch<SetStateAction<HTMLElement | null>>;\n setFocusReturnEl: Dispatch<SetStateAction<HTMLElement | null | undefined>>;\n getScopedItemId: (itemId: string) => string;\n}\n\nexport interface NavItemsListProps {\n listRef: RefObject<HTMLUListElement>;\n cycle?: boolean;\n}\n"]}
@@ -0,0 +1,6 @@
1
+ import { FunctionComponent } from 'react';
2
+ import type { ForwardProps } from '../../types';
3
+ import type { MenuGroupProps } from './Menu.types';
4
+ declare const MenuGroup: FunctionComponent<MenuGroupProps & ForwardProps>;
5
+ export default MenuGroup;
6
+ //# sourceMappingURL=MenuGroup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuGroup.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/MenuGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAc,MAAM,OAAO,CAAC;AAEtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAKhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAGnD,QAAA,MAAM,SAAS,EAAE,iBAAiB,CAAC,cAAc,GAAG,YAAY,CAyB/D,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { createElement as _createElement } from "react";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useContext } from 'react';
4
+ import Flex from '../Flex';
5
+ import MenuContext from './Menu.context';
6
+ import { StyledMenuGroupHeader, StyledMenuGroupList } from './Menu.styles';
7
+ import MenuItem from './MenuItem';
8
+ const MenuGroup = ({ id, label, items }) => {
9
+ const { componentId } = useContext(MenuContext);
10
+ const groupId = `${componentId}-${id}`;
11
+ return (_jsxs("li", { children: [_jsx(Flex, { container: { alignItems: 'center', pad: [0.5, 1] }, as: StyledMenuGroupHeader, id: groupId, children: label }, void 0), _jsx(StyledMenuGroupList, { role: 'group', "aria-labelledby": `#${groupId}`, children: items.length > 0 &&
12
+ items.map(item => {
13
+ return _createElement(MenuItem, { ...item, key: item.id });
14
+ }) }, void 0)] }, void 0));
15
+ };
16
+ export default MenuGroup;
17
+ //# sourceMappingURL=MenuGroup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuGroup.js","sourceRoot":"","sources":["../../../src/components/Menu/MenuGroup.tsx"],"names":[],"mappings":";;AAAA,OAAO,EAAqB,UAAU,EAAE,MAAM,OAAO,CAAC;AAGtD,OAAO,IAAI,MAAM,SAAS,CAAC;AAE3B,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAE3E,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,MAAM,SAAS,GAAqD,CAAC,EACnE,EAAE,EACF,KAAK,EACL,KAAK,EACyB,EAAE,EAAE;IAClC,MAAM,EAAE,WAAW,EAAE,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;IAEhD,MAAM,OAAO,GAAG,GAAG,WAAW,IAAI,EAAE,EAAE,CAAC;IACvC,OAAO,CACL,yBACE,KAAC,IAAI,IACH,SAAS,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,EAClD,EAAE,EAAE,qBAAqB,EACzB,EAAE,EAAE,OAAO,YAEV,KAAK,WACD,EACP,KAAC,mBAAmB,IAAC,IAAI,EAAC,OAAO,qBAAkB,IAAI,OAAO,EAAE,YAC7D,KAAK,CAAC,MAAM,GAAG,CAAC;oBACf,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;wBACf,OAAO,eAAC,QAAQ,OAAK,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,GAAI,CAAC;oBAC9C,CAAC,CAAC,WACgB,YACnB,CACN,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["import { FunctionComponent, useContext } from 'react';\n\nimport type { ForwardProps } from '../../types';\nimport Flex from '../Flex';\n\nimport MenuContext from './Menu.context';\nimport { StyledMenuGroupHeader, StyledMenuGroupList } from './Menu.styles';\nimport type { MenuGroupProps } from './Menu.types';\nimport MenuItem from './MenuItem';\n\nconst MenuGroup: FunctionComponent<MenuGroupProps & ForwardProps> = ({\n id,\n label,\n items\n}: MenuGroupProps & ForwardProps) => {\n const { componentId } = useContext(MenuContext);\n\n const groupId = `${componentId}-${id}`;\n return (\n <li>\n <Flex\n container={{ alignItems: 'center', pad: [0.5, 1] }}\n as={StyledMenuGroupHeader}\n id={groupId}\n >\n {label}\n </Flex>\n <StyledMenuGroupList role='group' aria-labelledby={`#${groupId}`}>\n {items.length > 0 &&\n items.map(item => {\n return <MenuItem {...item} key={item.id} />;\n })}\n </StyledMenuGroupList>\n </li>\n );\n};\n\nexport default MenuGroup;\n"]}
@@ -1,9 +1,6 @@
1
1
  import { FunctionComponent } from 'react';
2
2
  import { ForwardProps } from '../../types';
3
3
  import { MenuItemProps } from './Menu.types';
4
- export declare const StyledMenuItem: import("styled-components").StyledComponent<"li", import("styled-components").DefaultTheme, {
5
- isParentItem: boolean;
6
- }, never>;
7
4
  declare const MenuItem: FunctionComponent<MenuItemProps & ForwardProps>;
8
5
  export default MenuItem;
9
6
  //# sourceMappingURL=MenuItem.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MenuItem.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/MenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAQlB,MAAM,OAAO,CAAC;AAOf,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAa3C,OAAO,EAA6B,aAAa,EAAE,MAAM,cAAc,CAAC;AAqExE,eAAO,MAAM,cAAc;kBAA6B,OAAO;SA0C9D,CAAC;AAoDF,QAAA,MAAM,QAAQ,EAAE,iBAAiB,CAAC,aAAa,GAAG,YAAY,CAkP7D,CAAC;AAEF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"MenuItem.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/MenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAQlB,MAAM,OAAO,CAAC;AAIf,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAc3C,OAAO,EAA6B,aAAa,EAAE,MAAM,cAAc,CAAC;AAmDxE,QAAA,MAAM,QAAQ,EAAE,iBAAiB,CAAC,aAAa,GAAG,YAAY,CAgQ7D,CAAC;AAEF,eAAe,QAAQ,CAAC"}