@pega/cosmos-react-core 2.0.0-dev.9.4 → 2.0.0-rc.4

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 (865) 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.map +1 -1
  5. package/lib/components/AppShell/AppHeader.js +1 -6
  6. package/lib/components/AppShell/AppHeader.js.map +1 -1
  7. package/lib/components/AppShell/AppShell.d.ts.map +1 -1
  8. package/lib/components/AppShell/AppShell.js +88 -63
  9. package/lib/components/AppShell/AppShell.js.map +1 -1
  10. package/lib/components/AppShell/AppShell.styles.d.ts +19 -16
  11. package/lib/components/AppShell/AppShell.styles.d.ts.map +1 -1
  12. package/lib/components/AppShell/AppShell.styles.js +227 -173
  13. package/lib/components/AppShell/AppShell.styles.js.map +1 -1
  14. package/lib/components/AppShell/AppShell.types.d.ts +7 -7
  15. package/lib/components/AppShell/AppShell.types.d.ts.map +1 -1
  16. package/lib/components/AppShell/AppShell.types.js.map +1 -1
  17. package/lib/components/AppShell/AppShellContext.d.ts +3 -0
  18. package/lib/components/AppShell/AppShellContext.d.ts.map +1 -1
  19. package/lib/components/AppShell/AppShellContext.js +9 -1
  20. package/lib/components/AppShell/AppShellContext.js.map +1 -1
  21. package/lib/components/AppShell/AppShellList.d.ts +4 -3
  22. package/lib/components/AppShell/AppShellList.d.ts.map +1 -1
  23. package/lib/components/AppShell/AppShellList.js +24 -19
  24. package/lib/components/AppShell/AppShellList.js.map +1 -1
  25. package/lib/components/AppShell/Drawer.d.ts.map +1 -1
  26. package/lib/components/AppShell/Drawer.js +7 -8
  27. package/lib/components/AppShell/Drawer.js.map +1 -1
  28. package/lib/components/AppShell/Operator.js +3 -5
  29. package/lib/components/AppShell/Operator.js.map +1 -1
  30. package/lib/components/AppShell/SkipNavigation.d.ts.map +1 -1
  31. package/lib/components/AppShell/SkipNavigation.js +30 -39
  32. package/lib/components/AppShell/SkipNavigation.js.map +1 -1
  33. package/lib/components/AppShell/index.d.ts +1 -0
  34. package/lib/components/AppShell/index.d.ts.map +1 -1
  35. package/lib/components/AppShell/index.js +1 -0
  36. package/lib/components/AppShell/index.js.map +1 -1
  37. package/lib/components/Avatar/Avatar.d.ts.map +1 -1
  38. package/lib/components/Avatar/Avatar.js +5 -4
  39. package/lib/components/Avatar/Avatar.js.map +1 -1
  40. package/lib/components/Backdrop/Backdrop.d.ts +1 -1
  41. package/lib/components/Backdrop/Backdrop.d.ts.map +1 -1
  42. package/lib/components/Backdrop/Backdrop.js +7 -6
  43. package/lib/components/Backdrop/Backdrop.js.map +1 -1
  44. package/lib/components/Backdrop/index.d.ts +1 -2
  45. package/lib/components/Backdrop/index.d.ts.map +1 -1
  46. package/lib/components/Backdrop/index.js +1 -2
  47. package/lib/components/Backdrop/index.js.map +1 -1
  48. package/lib/components/Badges/Alert.d.ts +2 -2
  49. package/lib/components/Badges/Alert.d.ts.map +1 -1
  50. package/lib/components/Badges/Alert.js +1 -1
  51. package/lib/components/Badges/Alert.js.map +1 -1
  52. package/lib/components/Badges/Count.js +1 -1
  53. package/lib/components/Badges/Count.js.map +1 -1
  54. package/lib/components/Badges/Selection.d.ts.map +1 -1
  55. package/lib/components/Badges/Selection.js +10 -9
  56. package/lib/components/Badges/Selection.js.map +1 -1
  57. package/lib/components/Badges/Status.d.ts +2 -2
  58. package/lib/components/Badges/Status.d.ts.map +1 -1
  59. package/lib/components/Badges/Status.js +1 -1
  60. package/lib/components/Badges/Status.js.map +1 -1
  61. package/lib/components/Badges/Tag.js +1 -1
  62. package/lib/components/Badges/Tag.js.map +1 -1
  63. package/lib/components/Banner/Banner.d.ts +2 -2
  64. package/lib/components/Banner/Banner.d.ts.map +1 -1
  65. package/lib/components/Banner/Banner.js +6 -8
  66. package/lib/components/Banner/Banner.js.map +1 -1
  67. package/lib/components/Boolean/BooleanDisplay.d.ts +2 -2
  68. package/lib/components/Boolean/BooleanDisplay.d.ts.map +1 -1
  69. package/lib/components/Boolean/BooleanDisplay.js +1 -2
  70. package/lib/components/Boolean/BooleanDisplay.js.map +1 -1
  71. package/lib/components/Breadcrumbs/Breadcrumbs.d.ts +2 -2
  72. package/lib/components/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
  73. package/lib/components/Breadcrumbs/Breadcrumbs.js +13 -11
  74. package/lib/components/Breadcrumbs/Breadcrumbs.js.map +1 -1
  75. package/lib/components/Button/BareButton.d.ts.map +1 -1
  76. package/lib/components/Button/BareButton.js +21 -2
  77. package/lib/components/Button/BareButton.js.map +1 -1
  78. package/lib/components/Button/BareRoleButton.d.ts +12 -0
  79. package/lib/components/Button/BareRoleButton.d.ts.map +1 -0
  80. package/lib/components/Button/BareRoleButton.js +20 -0
  81. package/lib/components/Button/BareRoleButton.js.map +1 -0
  82. package/lib/components/Button/Button.d.ts +5 -0
  83. package/lib/components/Button/Button.d.ts.map +1 -1
  84. package/lib/components/Button/Button.js +34 -10
  85. package/lib/components/Button/Button.js.map +1 -1
  86. package/lib/components/Card/Card.d.ts.map +1 -1
  87. package/lib/components/Card/Card.js +3 -2
  88. package/lib/components/Card/Card.js.map +1 -1
  89. package/lib/components/Card/CardContent.d.ts.map +1 -1
  90. package/lib/components/Card/CardContent.js +5 -4
  91. package/lib/components/Card/CardContent.js.map +1 -1
  92. package/lib/components/Card/CardFooter.d.ts.map +1 -1
  93. package/lib/components/Card/CardFooter.js +5 -4
  94. package/lib/components/Card/CardFooter.js.map +1 -1
  95. package/lib/components/Card/CardHeader.d.ts +3 -1
  96. package/lib/components/Card/CardHeader.d.ts.map +1 -1
  97. package/lib/components/Card/CardHeader.js +9 -7
  98. package/lib/components/Card/CardHeader.js.map +1 -1
  99. package/lib/components/Card/CardMedia.js +1 -1
  100. package/lib/components/Card/CardMedia.js.map +1 -1
  101. package/lib/components/Card/CollapsibleCard.d.ts.map +1 -1
  102. package/lib/components/Card/CollapsibleCard.js +5 -7
  103. package/lib/components/Card/CollapsibleCard.js.map +1 -1
  104. package/lib/components/Card/SelectableCard.js +1 -1
  105. package/lib/components/Card/SelectableCard.js.map +1 -1
  106. package/lib/components/Checkbox/Checkbox.d.ts +2 -2
  107. package/lib/components/Checkbox/Checkbox.d.ts.map +1 -1
  108. package/lib/components/Checkbox/Checkbox.js +1 -1
  109. package/lib/components/Checkbox/Checkbox.js.map +1 -1
  110. package/lib/components/ColorPicker/ColorPicker.d.ts +2 -2
  111. package/lib/components/ColorPicker/ColorPicker.d.ts.map +1 -1
  112. package/lib/components/ColorPicker/ColorPicker.js +8 -11
  113. package/lib/components/ColorPicker/ColorPicker.js.map +1 -1
  114. package/lib/components/ComboBox/ComboBox.d.ts +1 -1
  115. package/lib/components/ComboBox/ComboBox.d.ts.map +1 -1
  116. package/lib/components/ComboBox/ComboBox.js +43 -63
  117. package/lib/components/ComboBox/ComboBox.js.map +1 -1
  118. package/lib/components/ComboBox/ComboBox.types.d.ts +2 -1
  119. package/lib/components/ComboBox/ComboBox.types.d.ts.map +1 -1
  120. package/lib/components/ComboBox/ComboBox.types.js.map +1 -1
  121. package/lib/components/ComboBox/ComboBoxInput.js +4 -4
  122. package/lib/components/ComboBox/ComboBoxInput.js.map +1 -1
  123. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.d.ts.map +1 -1
  124. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.js +23 -29
  125. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.js.map +1 -1
  126. package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.d.ts.map +1 -1
  127. package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.js +16 -12
  128. package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.js.map +1 -1
  129. package/lib/components/Configuration/Configuration.js +11 -13
  130. package/lib/components/Configuration/Configuration.js.map +1 -1
  131. package/lib/components/Currency/CurrencyDisplay.d.ts +6 -2
  132. package/lib/components/Currency/CurrencyDisplay.d.ts.map +1 -1
  133. package/lib/components/Currency/CurrencyDisplay.js +11 -7
  134. package/lib/components/Currency/CurrencyDisplay.js.map +1 -1
  135. package/lib/components/Currency/CurrencyInput.d.ts.map +1 -1
  136. package/lib/components/Currency/CurrencyInput.js +16 -16
  137. package/lib/components/Currency/CurrencyInput.js.map +1 -1
  138. package/lib/components/Currency/CurrencyInput.types.d.ts +6 -2
  139. package/lib/components/Currency/CurrencyInput.types.d.ts.map +1 -1
  140. package/lib/components/Currency/CurrencyInput.types.js.map +1 -1
  141. package/lib/components/Currency/utils.d.ts +12 -1
  142. package/lib/components/Currency/utils.d.ts.map +1 -1
  143. package/lib/components/Currency/utils.js +30 -2
  144. package/lib/components/Currency/utils.js.map +1 -1
  145. package/lib/components/DateTime/DateTime.types.d.ts +2 -1
  146. package/lib/components/DateTime/DateTime.types.d.ts.map +1 -1
  147. package/lib/components/DateTime/DateTime.types.js.map +1 -1
  148. package/lib/components/DateTime/DateTimeDisplay.d.ts +1 -1
  149. package/lib/components/DateTime/DateTimeDisplay.d.ts.map +1 -1
  150. package/lib/components/DateTime/DateTimeDisplay.js +10 -2
  151. package/lib/components/DateTime/DateTimeDisplay.js.map +1 -1
  152. package/lib/components/DateTime/DurationDisplay.d.ts.map +1 -1
  153. package/lib/components/DateTime/DurationDisplay.js +11 -6
  154. package/lib/components/DateTime/DurationDisplay.js.map +1 -1
  155. package/lib/components/DateTime/Input/DateInput.d.ts.map +1 -1
  156. package/lib/components/DateTime/Input/DateInput.js +26 -28
  157. package/lib/components/DateTime/Input/DateInput.js.map +1 -1
  158. package/lib/components/DateTime/Input/DateRangeInput.d.ts.map +1 -1
  159. package/lib/components/DateTime/Input/DateRangeInput.js +10 -16
  160. package/lib/components/DateTime/Input/DateRangeInput.js.map +1 -1
  161. package/lib/components/DateTime/Input/DateTime.styles.d.ts.map +1 -1
  162. package/lib/components/DateTime/Input/DateTime.styles.js +14 -3
  163. package/lib/components/DateTime/Input/DateTime.styles.js.map +1 -1
  164. package/lib/components/DateTime/Input/DateTimeInput.d.ts.map +1 -1
  165. package/lib/components/DateTime/Input/DateTimeInput.js +37 -44
  166. package/lib/components/DateTime/Input/DateTimeInput.js.map +1 -1
  167. package/lib/components/DateTime/Input/DayOfWeekInput.d.ts +2 -0
  168. package/lib/components/DateTime/Input/DayOfWeekInput.d.ts.map +1 -1
  169. package/lib/components/DateTime/Input/DayOfWeekInput.js +7 -5
  170. package/lib/components/DateTime/Input/DayOfWeekInput.js.map +1 -1
  171. package/lib/components/DateTime/Input/Duration/DurationInput.d.ts.map +1 -1
  172. package/lib/components/DateTime/Input/Duration/DurationInput.js +3 -3
  173. package/lib/components/DateTime/Input/Duration/DurationInput.js.map +1 -1
  174. package/lib/components/DateTime/Input/Duration/NumberUnit.js +4 -5
  175. package/lib/components/DateTime/Input/Duration/NumberUnit.js.map +1 -1
  176. package/lib/components/DateTime/Input/Duration/Time.d.ts.map +1 -1
  177. package/lib/components/DateTime/Input/Duration/Time.js +12 -15
  178. package/lib/components/DateTime/Input/Duration/Time.js.map +1 -1
  179. package/lib/components/DateTime/Input/MonthInput.js +12 -16
  180. package/lib/components/DateTime/Input/MonthInput.js.map +1 -1
  181. package/lib/components/DateTime/Input/PartInput.js +3 -4
  182. package/lib/components/DateTime/Input/PartInput.js.map +1 -1
  183. package/lib/components/DateTime/Input/QuarterInput.d.ts +9 -0
  184. package/lib/components/DateTime/Input/QuarterInput.d.ts.map +1 -0
  185. package/lib/components/DateTime/Input/QuarterInput.js +102 -0
  186. package/lib/components/DateTime/Input/QuarterInput.js.map +1 -0
  187. package/lib/components/DateTime/Input/TimeInput.d.ts.map +1 -1
  188. package/lib/components/DateTime/Input/TimeInput.js +29 -39
  189. package/lib/components/DateTime/Input/TimeInput.js.map +1 -1
  190. package/lib/components/DateTime/Input/WeekInput.d.ts.map +1 -1
  191. package/lib/components/DateTime/Input/WeekInput.js +23 -24
  192. package/lib/components/DateTime/Input/WeekInput.js.map +1 -1
  193. package/lib/components/DateTime/Input/useAutoFocusNextInput.d.ts.map +1 -1
  194. package/lib/components/DateTime/Input/useAutoFocusNextInput.js +8 -9
  195. package/lib/components/DateTime/Input/useAutoFocusNextInput.js.map +1 -1
  196. package/lib/components/DateTime/Input/usePickerButton.js +4 -4
  197. package/lib/components/DateTime/Input/usePickerButton.js.map +1 -1
  198. package/lib/components/DateTime/Input/utils.d.ts +7 -0
  199. package/lib/components/DateTime/Input/utils.d.ts.map +1 -1
  200. package/lib/components/DateTime/Input/utils.js +52 -10
  201. package/lib/components/DateTime/Input/utils.js.map +1 -1
  202. package/lib/components/DateTime/Picker/Calendar.d.ts.map +1 -1
  203. package/lib/components/DateTime/Picker/Calendar.js +32 -34
  204. package/lib/components/DateTime/Picker/Calendar.js.map +1 -1
  205. package/lib/components/DateTime/Picker/Calendar.styles.d.ts +2 -2
  206. package/lib/components/DateTime/Picker/Calendar.styles.d.ts.map +1 -1
  207. package/lib/components/DateTime/Picker/Calendar.styles.js +16 -7
  208. package/lib/components/DateTime/Picker/Calendar.styles.js.map +1 -1
  209. package/lib/components/DateTime/Picker/DatePicker.d.ts.map +1 -1
  210. package/lib/components/DateTime/Picker/DatePicker.js +13 -17
  211. package/lib/components/DateTime/Picker/DatePicker.js.map +1 -1
  212. package/lib/components/DateTime/Picker/DateRangePicker.d.ts.map +1 -1
  213. package/lib/components/DateTime/Picker/DateRangePicker.js +13 -17
  214. package/lib/components/DateTime/Picker/DateRangePicker.js.map +1 -1
  215. package/lib/components/DateTime/Picker/TimePicker.js +9 -10
  216. package/lib/components/DateTime/Picker/TimePicker.js.map +1 -1
  217. package/lib/components/DateTime/Picker/Weeks.js +9 -11
  218. package/lib/components/DateTime/Picker/Weeks.js.map +1 -1
  219. package/lib/components/DateTime/Picker/utils.d.ts +1 -0
  220. package/lib/components/DateTime/Picker/utils.d.ts.map +1 -1
  221. package/lib/components/DateTime/Picker/utils.js +3 -0
  222. package/lib/components/DateTime/Picker/utils.js.map +1 -1
  223. package/lib/components/DateTime/index.d.ts +3 -0
  224. package/lib/components/DateTime/index.d.ts.map +1 -1
  225. package/lib/components/DateTime/index.js +2 -0
  226. package/lib/components/DateTime/index.js.map +1 -1
  227. package/lib/components/Drawer/Drawer.d.ts.map +1 -1
  228. package/lib/components/Drawer/Drawer.js +10 -7
  229. package/lib/components/Drawer/Drawer.js.map +1 -1
  230. package/lib/components/Email/EmailDisplay.d.ts +2 -2
  231. package/lib/components/Email/EmailDisplay.d.ts.map +1 -1
  232. package/lib/components/Email/EmailDisplay.js +2 -2
  233. package/lib/components/Email/EmailDisplay.js.map +1 -1
  234. package/lib/components/EmojiPicker/EmojiDisplay.d.ts.map +1 -1
  235. package/lib/components/EmojiPicker/EmojiDisplay.js +1 -1
  236. package/lib/components/EmojiPicker/EmojiDisplay.js.map +1 -1
  237. package/lib/components/EmojiPicker/EmojiPicker.js +3 -4
  238. package/lib/components/EmojiPicker/EmojiPicker.js.map +1 -1
  239. package/lib/components/EmptyState/EmptyState.d.ts +14 -0
  240. package/lib/components/EmptyState/EmptyState.d.ts.map +1 -0
  241. package/lib/components/{NoItems/NoItems.js → EmptyState/EmptyState.js} +11 -8
  242. package/lib/components/EmptyState/EmptyState.js.map +1 -0
  243. package/lib/components/EmptyState/index.d.ts +4 -0
  244. package/lib/components/EmptyState/index.d.ts.map +1 -0
  245. package/lib/components/EmptyState/index.js +3 -0
  246. package/lib/components/EmptyState/index.js.map +1 -0
  247. package/lib/components/ErrorState/ErrorState.d.ts +16 -0
  248. package/lib/components/ErrorState/ErrorState.d.ts.map +1 -0
  249. package/lib/components/ErrorState/ErrorState.js +31 -0
  250. package/lib/components/ErrorState/ErrorState.js.map +1 -0
  251. package/lib/components/ErrorState/index.d.ts +4 -0
  252. package/lib/components/ErrorState/index.d.ts.map +1 -0
  253. package/lib/components/ErrorState/index.js +3 -0
  254. package/lib/components/ErrorState/index.js.map +1 -0
  255. package/lib/components/ExpandCollapse/ExpandCollapse.js +6 -6
  256. package/lib/components/ExpandCollapse/ExpandCollapse.js.map +1 -1
  257. package/lib/components/FieldGroup/FieldGroup.d.ts.map +1 -1
  258. package/lib/components/FieldGroup/FieldGroup.js +6 -7
  259. package/lib/components/FieldGroup/FieldGroup.js.map +1 -1
  260. package/lib/components/FieldGroup/FieldGroupList.d.ts +1 -1
  261. package/lib/components/FieldGroup/FieldGroupList.d.ts.map +1 -1
  262. package/lib/components/FieldGroup/FieldGroupList.js +8 -7
  263. package/lib/components/FieldGroup/FieldGroupList.js.map +1 -1
  264. package/lib/components/FieldGroup/index.d.ts +1 -0
  265. package/lib/components/FieldGroup/index.d.ts.map +1 -1
  266. package/lib/components/FieldGroup/index.js +1 -0
  267. package/lib/components/FieldGroup/index.js.map +1 -1
  268. package/lib/components/FieldValueList/FieldValueList.d.ts +2 -2
  269. package/lib/components/FieldValueList/FieldValueList.d.ts.map +1 -1
  270. package/lib/components/FieldValueList/FieldValueList.js +5 -7
  271. package/lib/components/FieldValueList/FieldValueList.js.map +1 -1
  272. package/lib/components/File/FileDisplay.d.ts +6 -3
  273. package/lib/components/File/FileDisplay.d.ts.map +1 -1
  274. package/lib/components/File/FileDisplay.js +7 -7
  275. package/lib/components/File/FileDisplay.js.map +1 -1
  276. package/lib/components/File/FileInput.d.ts +3 -3
  277. package/lib/components/File/FileInput.d.ts.map +1 -1
  278. package/lib/components/File/FileInput.js +18 -19
  279. package/lib/components/File/FileInput.js.map +1 -1
  280. package/lib/components/File/FileItem.d.ts +0 -2
  281. package/lib/components/File/FileItem.d.ts.map +1 -1
  282. package/lib/components/File/FileItem.js +3 -4
  283. package/lib/components/File/FileItem.js.map +1 -1
  284. package/lib/components/File/FileUploadItem.d.ts +4 -2
  285. package/lib/components/File/FileUploadItem.d.ts.map +1 -1
  286. package/lib/components/File/FileUploadItem.js +58 -20
  287. package/lib/components/File/FileUploadItem.js.map +1 -1
  288. package/lib/components/File/FileVisual.d.ts +7 -16
  289. package/lib/components/File/FileVisual.d.ts.map +1 -1
  290. package/lib/components/File/FileVisual.js +44 -47
  291. package/lib/components/File/FileVisual.js.map +1 -1
  292. package/lib/components/File/index.d.ts +1 -0
  293. package/lib/components/File/index.d.ts.map +1 -1
  294. package/lib/components/File/index.js +1 -0
  295. package/lib/components/File/index.js.map +1 -1
  296. package/lib/components/File/utils.js +2 -3
  297. package/lib/components/File/utils.js.map +1 -1
  298. package/lib/components/Flex/Flex.d.ts +17 -7
  299. package/lib/components/Flex/Flex.d.ts.map +1 -1
  300. package/lib/components/Flex/Flex.js +25 -9
  301. package/lib/components/Flex/Flex.js.map +1 -1
  302. package/lib/components/Form/Form.d.ts +7 -1
  303. package/lib/components/Form/Form.d.ts.map +1 -1
  304. package/lib/components/Form/Form.js +5 -4
  305. package/lib/components/Form/Form.js.map +1 -1
  306. package/lib/components/FormControl/FormControl.d.ts +1 -1
  307. package/lib/components/FormControl/FormControl.d.ts.map +1 -1
  308. package/lib/components/FormControl/FormControl.js +1 -1
  309. package/lib/components/FormControl/FormControl.js.map +1 -1
  310. package/lib/components/FormField/FormField.d.ts +5 -7
  311. package/lib/components/FormField/FormField.d.ts.map +1 -1
  312. package/lib/components/FormField/FormField.js +9 -19
  313. package/lib/components/FormField/FormField.js.map +1 -1
  314. package/lib/components/Grid/Grid.d.ts +1 -1
  315. package/lib/components/Grid/Grid.d.ts.map +1 -1
  316. package/lib/components/Grid/Grid.js +17 -21
  317. package/lib/components/Grid/Grid.js.map +1 -1
  318. package/lib/components/Icon/Icon.js +3 -5
  319. package/lib/components/Icon/Icon.js.map +1 -1
  320. package/lib/components/Icon/iconNames.d.ts +1 -1
  321. package/lib/components/Icon/iconNames.d.ts.map +1 -1
  322. package/lib/components/Icon/iconNames.js +2 -0
  323. package/lib/components/Icon/iconNames.js.map +1 -1
  324. package/lib/components/Icon/icons/compass-solid.icon.js +1 -2
  325. package/lib/components/Icon/icons/compass-solid.icon.js.map +1 -1
  326. package/lib/components/Icon/icons/dataviz-table-with-bars.icon.js +1 -4
  327. package/lib/components/Icon/icons/dataviz-table-with-bars.icon.js.map +1 -1
  328. package/lib/components/Icon/icons/dataviz-table-with-cross.icon.js +1 -2
  329. package/lib/components/Icon/icons/dataviz-table-with-cross.icon.js.map +1 -1
  330. package/lib/components/Icon/icons/dataviz-waterfall.icon.js +1 -5
  331. package/lib/components/Icon/icons/dataviz-waterfall.icon.js.map +1 -1
  332. package/lib/components/Icon/icons/dock.icon.d.ts +4 -0
  333. package/lib/components/Icon/icons/dock.icon.d.ts.map +1 -0
  334. package/lib/components/Icon/icons/dock.icon.js +6 -0
  335. package/lib/components/Icon/icons/dock.icon.js.map +1 -0
  336. package/lib/components/Icon/icons/filetype-text.icon.js +1 -4
  337. package/lib/components/Icon/icons/filetype-text.icon.js.map +1 -1
  338. package/lib/components/Icon/icons/folder-dollar.icon.js +1 -2
  339. package/lib/components/Icon/icons/folder-dollar.icon.js.map +1 -1
  340. package/lib/components/Icon/icons/freeze-column.icon.js +1 -2
  341. package/lib/components/Icon/icons/freeze-column.icon.js.map +1 -1
  342. package/lib/components/Icon/icons/galaxy.icon.js +1 -3
  343. package/lib/components/Icon/icons/galaxy.icon.js.map +1 -1
  344. package/lib/components/Icon/icons/grad-solid.icon.js +1 -2
  345. package/lib/components/Icon/icons/grad-solid.icon.js.map +1 -1
  346. package/lib/components/Icon/icons/grad.icon.js +1 -5
  347. package/lib/components/Icon/icons/grad.icon.js.map +1 -1
  348. package/lib/components/Icon/icons/list-number.icon.js +1 -6
  349. package/lib/components/Icon/icons/list-number.icon.js.map +1 -1
  350. package/lib/components/Icon/icons/list.icon.js +1 -6
  351. package/lib/components/Icon/icons/list.icon.js.map +1 -1
  352. package/lib/components/Icon/icons/pin.icon.js +1 -2
  353. package/lib/components/Icon/icons/pin.icon.js.map +1 -1
  354. package/lib/components/Icon/icons/search-solid.icon.js +1 -2
  355. package/lib/components/Icon/icons/search-solid.icon.js.map +1 -1
  356. package/lib/components/Icon/icons/tracer.icon.js +1 -2
  357. package/lib/components/Icon/icons/tracer.icon.js.map +1 -1
  358. package/lib/components/Icon/icons/tribox-solid.icon.js +1 -3
  359. package/lib/components/Icon/icons/tribox-solid.icon.js.map +1 -1
  360. package/lib/components/Icon/icons/tribox.icon.js +1 -3
  361. package/lib/components/Icon/icons/tribox.icon.js.map +1 -1
  362. package/lib/components/Icon/icons/undock.icon.d.ts +4 -0
  363. package/lib/components/Icon/icons/undock.icon.d.ts.map +1 -0
  364. package/lib/components/Icon/icons/undock.icon.js +6 -0
  365. package/lib/components/Icon/icons/undock.icon.js.map +1 -0
  366. package/lib/components/Icon/index.d.ts +1 -0
  367. package/lib/components/Icon/index.d.ts.map +1 -1
  368. package/lib/components/Icon/index.js +1 -0
  369. package/lib/components/Icon/index.js.map +1 -1
  370. package/lib/components/Image/Image.js +1 -1
  371. package/lib/components/Image/Image.js.map +1 -1
  372. package/lib/components/Image/index.d.ts +1 -1
  373. package/lib/components/Image/index.d.ts.map +1 -1
  374. package/lib/components/Image/index.js +1 -0
  375. package/lib/components/Image/index.js.map +1 -1
  376. package/lib/components/Input/Input.d.ts +2 -2
  377. package/lib/components/Input/Input.d.ts.map +1 -1
  378. package/lib/components/Input/Input.js +13 -13
  379. package/lib/components/Input/Input.js.map +1 -1
  380. package/lib/components/Input/Input.styles.js +2 -2
  381. package/lib/components/Input/Input.styles.js.map +1 -1
  382. package/lib/components/Input/index.d.ts +1 -1
  383. package/lib/components/Input/index.d.ts.map +1 -1
  384. package/lib/components/Input/index.js.map +1 -1
  385. package/lib/components/Label/Label.d.ts +2 -2
  386. package/lib/components/Label/Label.d.ts.map +1 -1
  387. package/lib/components/Label/Label.js +1 -1
  388. package/lib/components/Label/Label.js.map +1 -1
  389. package/lib/components/Lightbox/Lightbox.d.ts +6 -0
  390. package/lib/components/Lightbox/Lightbox.d.ts.map +1 -0
  391. package/lib/components/Lightbox/Lightbox.js +129 -0
  392. package/lib/components/Lightbox/Lightbox.js.map +1 -0
  393. package/lib/components/Lightbox/Lightbox.styles.d.ts +11 -0
  394. package/lib/components/Lightbox/Lightbox.styles.d.ts.map +1 -0
  395. package/lib/components/Lightbox/Lightbox.styles.js +166 -0
  396. package/lib/components/Lightbox/Lightbox.styles.js.map +1 -0
  397. package/lib/components/Lightbox/Lightbox.types.d.ts +42 -0
  398. package/lib/components/Lightbox/Lightbox.types.d.ts.map +1 -0
  399. package/lib/components/Lightbox/Lightbox.types.js +2 -0
  400. package/lib/components/Lightbox/Lightbox.types.js.map +1 -0
  401. package/lib/components/Lightbox/index.d.ts +3 -0
  402. package/lib/components/Lightbox/index.d.ts.map +1 -0
  403. package/lib/components/Lightbox/index.js +2 -0
  404. package/lib/components/Lightbox/index.js.map +1 -0
  405. package/lib/components/Link/Link.d.ts.map +1 -1
  406. package/lib/components/Link/Link.js +19 -19
  407. package/lib/components/Link/Link.js.map +1 -1
  408. package/lib/components/List/CommaSeparatedList.d.ts +15 -0
  409. package/lib/components/List/CommaSeparatedList.d.ts.map +1 -0
  410. package/lib/components/List/CommaSeparatedList.js +61 -0
  411. package/lib/components/List/CommaSeparatedList.js.map +1 -0
  412. package/lib/components/List/List.d.ts +30 -0
  413. package/lib/components/List/List.d.ts.map +1 -0
  414. package/lib/components/List/List.js +56 -0
  415. package/lib/components/List/List.js.map +1 -0
  416. package/lib/components/List/OrderedList.d.ts +6 -0
  417. package/lib/components/List/OrderedList.d.ts.map +1 -0
  418. package/lib/components/List/OrderedList.js +6 -0
  419. package/lib/components/List/OrderedList.js.map +1 -0
  420. package/lib/components/List/UnorderedList.d.ts +6 -0
  421. package/lib/components/List/UnorderedList.d.ts.map +1 -0
  422. package/lib/components/List/UnorderedList.js +6 -0
  423. package/lib/components/List/UnorderedList.js.map +1 -0
  424. package/lib/components/List/index.d.ts +5 -0
  425. package/lib/components/List/index.d.ts.map +1 -0
  426. package/lib/components/List/index.js +4 -0
  427. package/lib/components/List/index.js.map +1 -0
  428. package/lib/components/Location/CurrentLocationButton.d.ts.map +1 -1
  429. package/lib/components/Location/CurrentLocationButton.js +7 -7
  430. package/lib/components/Location/CurrentLocationButton.js.map +1 -1
  431. package/lib/components/Location/Location.types.d.ts +2 -1
  432. package/lib/components/Location/Location.types.d.ts.map +1 -1
  433. package/lib/components/Location/Location.types.js.map +1 -1
  434. package/lib/components/Location/LocationDisplay.js +8 -9
  435. package/lib/components/Location/LocationDisplay.js.map +1 -1
  436. package/lib/components/Location/LocationInput.js +27 -28
  437. package/lib/components/Location/LocationInput.js.map +1 -1
  438. package/lib/components/Location/LocationView.js +8 -13
  439. package/lib/components/Location/LocationView.js.map +1 -1
  440. package/lib/components/Location/index.d.ts +4 -4
  441. package/lib/components/Location/index.d.ts.map +1 -1
  442. package/lib/components/Location/index.js.map +1 -1
  443. package/lib/components/Location/utils.js +11 -15
  444. package/lib/components/Location/utils.js.map +1 -1
  445. package/lib/components/Menu/FlyoutMenuList.d.ts.map +1 -1
  446. package/lib/components/Menu/FlyoutMenuList.js +12 -15
  447. package/lib/components/Menu/FlyoutMenuList.js.map +1 -1
  448. package/lib/components/Menu/Menu.context.d.ts.map +1 -1
  449. package/lib/components/Menu/Menu.context.js +2 -0
  450. package/lib/components/Menu/Menu.context.js.map +1 -1
  451. package/lib/components/Menu/Menu.d.ts.map +1 -1
  452. package/lib/components/Menu/Menu.js +92 -48
  453. package/lib/components/Menu/Menu.js.map +1 -1
  454. package/lib/components/Menu/Menu.styles.d.ts +11 -1
  455. package/lib/components/Menu/Menu.styles.d.ts.map +1 -1
  456. package/lib/components/Menu/Menu.styles.js +208 -7
  457. package/lib/components/Menu/Menu.styles.js.map +1 -1
  458. package/lib/components/Menu/Menu.types.d.ts +30 -12
  459. package/lib/components/Menu/Menu.types.d.ts.map +1 -1
  460. package/lib/components/Menu/Menu.types.js.map +1 -1
  461. package/lib/components/Menu/MenuGroup.d.ts +6 -0
  462. package/lib/components/Menu/MenuGroup.d.ts.map +1 -0
  463. package/lib/components/Menu/MenuGroup.js +17 -0
  464. package/lib/components/Menu/MenuGroup.js.map +1 -0
  465. package/lib/components/Menu/MenuItem.d.ts +0 -3
  466. package/lib/components/Menu/MenuItem.d.ts.map +1 -1
  467. package/lib/components/Menu/MenuItem.js +57 -164
  468. package/lib/components/Menu/MenuItem.js.map +1 -1
  469. package/lib/components/Menu/MenuList.d.ts +1 -1
  470. package/lib/components/Menu/MenuList.d.ts.map +1 -1
  471. package/lib/components/Menu/MenuList.js +28 -30
  472. package/lib/components/Menu/MenuList.js.map +1 -1
  473. package/lib/components/Menu/MenuListHeader.d.ts +0 -1
  474. package/lib/components/Menu/MenuListHeader.d.ts.map +1 -1
  475. package/lib/components/Menu/MenuListHeader.js +7 -55
  476. package/lib/components/Menu/MenuListHeader.js.map +1 -1
  477. package/lib/components/Menu/NavItemsList.d.ts.map +1 -1
  478. package/lib/components/Menu/NavItemsList.js +2 -3
  479. package/lib/components/Menu/NavItemsList.js.map +1 -1
  480. package/lib/components/Menu/helpers.d.ts +13 -12
  481. package/lib/components/Menu/helpers.d.ts.map +1 -1
  482. package/lib/components/Menu/helpers.js +40 -36
  483. package/lib/components/Menu/helpers.js.map +1 -1
  484. package/lib/components/Menu/index.d.ts +2 -3
  485. package/lib/components/Menu/index.d.ts.map +1 -1
  486. package/lib/components/Menu/index.js +1 -2
  487. package/lib/components/Menu/index.js.map +1 -1
  488. package/lib/components/MenuButton/MenuButton.d.ts +3 -1
  489. package/lib/components/MenuButton/MenuButton.d.ts.map +1 -1
  490. package/lib/components/MenuButton/MenuButton.js +13 -14
  491. package/lib/components/MenuButton/MenuButton.js.map +1 -1
  492. package/lib/components/MetaList/MetaList.d.ts +13 -4
  493. package/lib/components/MetaList/MetaList.d.ts.map +1 -1
  494. package/lib/components/MetaList/MetaList.js +34 -20
  495. package/lib/components/MetaList/MetaList.js.map +1 -1
  496. package/lib/components/Modal/Contexts.d.ts.map +1 -1
  497. package/lib/components/Modal/Contexts.js +6 -2
  498. package/lib/components/Modal/Contexts.js.map +1 -1
  499. package/lib/components/Modal/DockedModals.d.ts.map +1 -1
  500. package/lib/components/Modal/DockedModals.js +5 -4
  501. package/lib/components/Modal/DockedModals.js.map +1 -1
  502. package/lib/components/Modal/MinimizedModal.d.ts.map +1 -1
  503. package/lib/components/Modal/MinimizedModal.js +53 -38
  504. package/lib/components/Modal/MinimizedModal.js.map +1 -1
  505. package/lib/components/Modal/Modal.d.ts +1 -6
  506. package/lib/components/Modal/Modal.d.ts.map +1 -1
  507. package/lib/components/Modal/Modal.js +89 -136
  508. package/lib/components/Modal/Modal.js.map +1 -1
  509. package/lib/components/Modal/Modal.styles.d.ts +9 -0
  510. package/lib/components/Modal/Modal.styles.d.ts.map +1 -0
  511. package/lib/components/Modal/Modal.styles.js +134 -0
  512. package/lib/components/Modal/Modal.styles.js.map +1 -0
  513. package/lib/components/Modal/Modal.types.d.ts +60 -7
  514. package/lib/components/Modal/Modal.types.d.ts.map +1 -1
  515. package/lib/components/Modal/Modal.types.js +2 -1
  516. package/lib/components/Modal/Modal.types.js.map +1 -1
  517. package/lib/components/Modal/ModalManager.d.ts.map +1 -1
  518. package/lib/components/Modal/ModalManager.js +78 -68
  519. package/lib/components/Modal/ModalManager.js.map +1 -1
  520. package/lib/components/MultiStep/MultiStep.d.ts.map +1 -1
  521. package/lib/components/MultiStep/MultiStep.js +10 -12
  522. package/lib/components/MultiStep/MultiStep.js.map +1 -1
  523. package/lib/components/MultiStep/MultiStep.styles.d.ts.map +1 -1
  524. package/lib/components/MultiStep/MultiStep.styles.js +5 -2
  525. package/lib/components/MultiStep/MultiStep.styles.js.map +1 -1
  526. package/lib/components/MultiStep/MultiStep.types.d.ts +4 -2
  527. package/lib/components/MultiStep/MultiStep.types.d.ts.map +1 -1
  528. package/lib/components/MultiStep/MultiStep.types.js.map +1 -1
  529. package/lib/components/MultiStep/index.d.ts +1 -1
  530. package/lib/components/MultiStep/index.d.ts.map +1 -1
  531. package/lib/components/MultiStep/index.js.map +1 -1
  532. package/lib/components/Number/NumberDisplay.d.ts +2 -2
  533. package/lib/components/Number/NumberDisplay.d.ts.map +1 -1
  534. package/lib/components/Number/NumberDisplay.js +1 -1
  535. package/lib/components/Number/NumberDisplay.js.map +1 -1
  536. package/lib/components/Number/NumberInput.d.ts.map +1 -1
  537. package/lib/components/Number/NumberInput.js +18 -25
  538. package/lib/components/Number/NumberInput.js.map +1 -1
  539. package/lib/components/Number/NumberInput.styles.d.ts +2 -2
  540. package/lib/components/Number/NumberInput.styles.d.ts.map +1 -1
  541. package/lib/components/Number/NumberInput.types.d.ts +2 -2
  542. package/lib/components/Number/NumberInput.types.d.ts.map +1 -1
  543. package/lib/components/Number/NumberInput.types.js.map +1 -1
  544. package/lib/components/Number/utils.js +2 -3
  545. package/lib/components/Number/utils.js.map +1 -1
  546. package/lib/components/PageTemplates/CategorySubPage.d.ts +1 -1
  547. package/lib/components/PageTemplates/CategorySubPage.d.ts.map +1 -1
  548. package/lib/components/PageTemplates/CategorySubPage.js +8 -18
  549. package/lib/components/PageTemplates/CategorySubPage.js.map +1 -1
  550. package/lib/components/PageTemplates/CategorySubPage.styles.d.ts +1 -1
  551. package/lib/components/PageTemplates/CategorySubPage.styles.d.ts.map +1 -1
  552. package/lib/components/PageTemplates/DashboardPage.d.ts +7 -1
  553. package/lib/components/PageTemplates/DashboardPage.d.ts.map +1 -1
  554. package/lib/components/PageTemplates/DashboardPage.js +48 -28
  555. package/lib/components/PageTemplates/DashboardPage.js.map +1 -1
  556. package/lib/components/PageTemplates/PageTemplates.d.ts +15 -6
  557. package/lib/components/PageTemplates/PageTemplates.d.ts.map +1 -1
  558. package/lib/components/PageTemplates/PageTemplates.js +89 -79
  559. package/lib/components/PageTemplates/PageTemplates.js.map +1 -1
  560. package/lib/components/PageTemplates/index.d.ts +5 -3
  561. package/lib/components/PageTemplates/index.d.ts.map +1 -1
  562. package/lib/components/PageTemplates/index.js +2 -1
  563. package/lib/components/PageTemplates/index.js.map +1 -1
  564. package/lib/components/Pagination/Pagination.d.ts +2 -2
  565. package/lib/components/Pagination/Pagination.d.ts.map +1 -1
  566. package/lib/components/Pagination/Pagination.js +7 -6
  567. package/lib/components/Pagination/Pagination.js.map +1 -1
  568. package/lib/components/Paragraph/ParagraphDisplay.d.ts +11 -0
  569. package/lib/components/Paragraph/ParagraphDisplay.d.ts.map +1 -0
  570. package/lib/components/Paragraph/ParagraphDisplay.js +11 -0
  571. package/lib/components/Paragraph/ParagraphDisplay.js.map +1 -0
  572. package/lib/components/Paragraph/index.d.ts +3 -0
  573. package/lib/components/Paragraph/index.d.ts.map +1 -0
  574. package/lib/components/Paragraph/index.js +2 -0
  575. package/lib/components/Paragraph/index.js.map +1 -0
  576. package/lib/components/Phone/PhoneDisplay.d.ts +2 -2
  577. package/lib/components/Phone/PhoneDisplay.d.ts.map +1 -1
  578. package/lib/components/Phone/PhoneDisplay.js +2 -3
  579. package/lib/components/Phone/PhoneDisplay.js.map +1 -1
  580. package/lib/components/Phone/PhoneInput.d.ts +2 -2
  581. package/lib/components/Phone/PhoneInput.d.ts.map +1 -1
  582. package/lib/components/Phone/PhoneInput.js +18 -17
  583. package/lib/components/Phone/PhoneInput.js.map +1 -1
  584. package/lib/components/Phone/utils.js +2 -3
  585. package/lib/components/Phone/utils.js.map +1 -1
  586. package/lib/components/Popover/Popover.d.ts +0 -4
  587. package/lib/components/Popover/Popover.d.ts.map +1 -1
  588. package/lib/components/Popover/Popover.js +17 -122
  589. package/lib/components/Popover/Popover.js.map +1 -1
  590. package/lib/components/Popover/Popover.styles.d.ts +5 -0
  591. package/lib/components/Popover/Popover.styles.d.ts.map +1 -0
  592. package/lib/components/Popover/Popover.styles.js +131 -0
  593. package/lib/components/Popover/Popover.styles.js.map +1 -0
  594. package/lib/components/Popover/PopoverManager.js +2 -2
  595. package/lib/components/Popover/PopoverManager.js.map +1 -1
  596. package/lib/components/Popover/index.d.ts +1 -1
  597. package/lib/components/Popover/index.d.ts.map +1 -1
  598. package/lib/components/Popover/index.js +1 -1
  599. package/lib/components/Popover/index.js.map +1 -1
  600. package/lib/components/Popover/modifiers.d.ts +3 -0
  601. package/lib/components/Popover/modifiers.d.ts.map +1 -0
  602. package/lib/components/Popover/modifiers.js +11 -0
  603. package/lib/components/Popover/modifiers.js.map +1 -0
  604. package/lib/components/Progress/Bar.js +2 -2
  605. package/lib/components/Progress/Bar.js.map +1 -1
  606. package/lib/components/Progress/Ellipsis.d.ts +1 -1
  607. package/lib/components/Progress/Ellipsis.d.ts.map +1 -1
  608. package/lib/components/Progress/Ellipsis.js +48 -50
  609. package/lib/components/Progress/Ellipsis.js.map +1 -1
  610. package/lib/components/Progress/Progress.js +3 -4
  611. package/lib/components/Progress/Progress.js.map +1 -1
  612. package/lib/components/Progress/Progress.types.d.ts +2 -2
  613. package/lib/components/Progress/Progress.types.d.ts.map +1 -1
  614. package/lib/components/Progress/Progress.types.js.map +1 -1
  615. package/lib/components/Progress/Ring.d.ts +1 -1
  616. package/lib/components/Progress/Ring.d.ts.map +1 -1
  617. package/lib/components/Progress/Ring.js +40 -40
  618. package/lib/components/Progress/Ring.js.map +1 -1
  619. package/lib/components/RadioButton/RadioButton.d.ts +2 -2
  620. package/lib/components/RadioButton/RadioButton.d.ts.map +1 -1
  621. package/lib/components/RadioButton/RadioButton.js +1 -1
  622. package/lib/components/RadioButton/RadioButton.js.map +1 -1
  623. package/lib/components/RadioCheck/RadioCheck.d.ts +2 -2
  624. package/lib/components/RadioCheck/RadioCheck.d.ts.map +1 -1
  625. package/lib/components/RadioCheck/RadioCheck.js +7 -8
  626. package/lib/components/RadioCheck/RadioCheck.js.map +1 -1
  627. package/lib/components/RadioCheckGroup/RadioCheckGroup.d.ts +4 -0
  628. package/lib/components/RadioCheckGroup/RadioCheckGroup.d.ts.map +1 -1
  629. package/lib/components/RadioCheckGroup/RadioCheckGroup.js +19 -18
  630. package/lib/components/RadioCheckGroup/RadioCheckGroup.js.map +1 -1
  631. package/lib/components/Rating/Rating.d.ts +2 -2
  632. package/lib/components/Rating/Rating.d.ts.map +1 -1
  633. package/lib/components/Rating/Rating.js +6 -7
  634. package/lib/components/Rating/Rating.js.map +1 -1
  635. package/lib/components/SearchInput/SearchInput.d.ts +5 -5
  636. package/lib/components/SearchInput/SearchInput.d.ts.map +1 -1
  637. package/lib/components/SearchInput/SearchInput.js +14 -14
  638. package/lib/components/SearchInput/SearchInput.js.map +1 -1
  639. package/lib/components/Select/Option.js +1 -1
  640. package/lib/components/Select/Option.js.map +1 -1
  641. package/lib/components/Select/Select.d.ts.map +1 -1
  642. package/lib/components/Select/Select.js +15 -16
  643. package/lib/components/Select/Select.js.map +1 -1
  644. package/lib/components/Select/index.d.ts +2 -3
  645. package/lib/components/Select/index.d.ts.map +1 -1
  646. package/lib/components/Select/index.js.map +1 -1
  647. package/lib/components/Sentiment/Sentiment.d.ts +2 -2
  648. package/lib/components/Sentiment/Sentiment.d.ts.map +1 -1
  649. package/lib/components/Sentiment/Sentiment.js +1 -2
  650. package/lib/components/Sentiment/Sentiment.js.map +1 -1
  651. package/lib/components/Skeleton/LineSkeleton.js +1 -1
  652. package/lib/components/Skeleton/LineSkeleton.js.map +1 -1
  653. package/lib/components/Skeleton/ParagraphSkeleton.js +1 -1
  654. package/lib/components/Skeleton/ParagraphSkeleton.js.map +1 -1
  655. package/lib/components/Skeleton/RectangleSkeleton.js +1 -1
  656. package/lib/components/Skeleton/RectangleSkeleton.js.map +1 -1
  657. package/lib/components/Slider/Slider.d.ts.map +1 -1
  658. package/lib/components/Slider/Slider.js +12 -19
  659. package/lib/components/Slider/Slider.js.map +1 -1
  660. package/lib/components/Slider/Slider.styles.d.ts +4 -1
  661. package/lib/components/Slider/Slider.styles.d.ts.map +1 -1
  662. package/lib/components/Slider/Slider.styles.js +17 -5
  663. package/lib/components/Slider/Slider.styles.js.map +1 -1
  664. package/lib/components/Slider/Slider.types.d.ts +2 -2
  665. package/lib/components/Slider/Slider.types.d.ts.map +1 -1
  666. package/lib/components/Slider/Slider.types.js.map +1 -1
  667. package/lib/components/Slider/SliderTicks.d.ts +1 -0
  668. package/lib/components/Slider/SliderTicks.d.ts.map +1 -1
  669. package/lib/components/Slider/SliderTicks.js +19 -12
  670. package/lib/components/Slider/SliderTicks.js.map +1 -1
  671. package/lib/components/Slider/utils.d.ts +10 -11
  672. package/lib/components/Slider/utils.d.ts.map +1 -1
  673. package/lib/components/Slider/utils.js +24 -18
  674. package/lib/components/Slider/utils.js.map +1 -1
  675. package/lib/components/SummaryItem/SummaryItem.d.ts +5 -5
  676. package/lib/components/SummaryItem/SummaryItem.d.ts.map +1 -1
  677. package/lib/components/SummaryItem/SummaryItem.js +3 -5
  678. package/lib/components/SummaryItem/SummaryItem.js.map +1 -1
  679. package/lib/components/SummaryList/SummaryList.d.ts +8 -2
  680. package/lib/components/SummaryList/SummaryList.d.ts.map +1 -1
  681. package/lib/components/SummaryList/SummaryList.js +10 -11
  682. package/lib/components/SummaryList/SummaryList.js.map +1 -1
  683. package/lib/components/SummaryList/ViewAll.d.ts +1 -1
  684. package/lib/components/SummaryList/ViewAll.d.ts.map +1 -1
  685. package/lib/components/SummaryList/ViewAll.js +14 -10
  686. package/lib/components/SummaryList/ViewAll.js.map +1 -1
  687. package/lib/components/Switch/Switch.d.ts +2 -2
  688. package/lib/components/Switch/Switch.d.ts.map +1 -1
  689. package/lib/components/Switch/Switch.js +41 -30
  690. package/lib/components/Switch/Switch.js.map +1 -1
  691. package/lib/components/Table/Table.d.ts +2 -2
  692. package/lib/components/Table/Table.d.ts.map +1 -1
  693. package/lib/components/Table/Table.js +14 -13
  694. package/lib/components/Table/Table.js.map +1 -1
  695. package/lib/components/Table/index.d.ts +1 -2
  696. package/lib/components/Table/index.d.ts.map +1 -1
  697. package/lib/components/Table/index.js.map +1 -1
  698. package/lib/components/Tabs/Tab.d.ts +1 -1
  699. package/lib/components/Tabs/Tab.d.ts.map +1 -1
  700. package/lib/components/Tabs/Tab.js +9 -7
  701. package/lib/components/Tabs/Tab.js.map +1 -1
  702. package/lib/components/Tabs/TabPanel.d.ts +10 -2
  703. package/lib/components/Tabs/TabPanel.d.ts.map +1 -1
  704. package/lib/components/Tabs/TabPanel.js +24 -8
  705. package/lib/components/Tabs/TabPanel.js.map +1 -1
  706. package/lib/components/Tabs/Tabs.d.ts +1 -0
  707. package/lib/components/Tabs/Tabs.d.ts.map +1 -1
  708. package/lib/components/Tabs/Tabs.js +22 -18
  709. package/lib/components/Tabs/Tabs.js.map +1 -1
  710. package/lib/components/Tabs/Tabs.types.d.ts +2 -2
  711. package/lib/components/Tabs/Tabs.types.d.ts.map +1 -1
  712. package/lib/components/Tabs/Tabs.types.js.map +1 -1
  713. package/lib/components/Text/Text.d.ts +1 -1
  714. package/lib/components/Text/Text.d.ts.map +1 -1
  715. package/lib/components/Text/Text.js +2 -2
  716. package/lib/components/Text/Text.js.map +1 -1
  717. package/lib/components/TextArea/TextArea.d.ts +2 -2
  718. package/lib/components/TextArea/TextArea.d.ts.map +1 -1
  719. package/lib/components/TextArea/TextArea.js +31 -30
  720. package/lib/components/TextArea/TextArea.js.map +1 -1
  721. package/lib/components/TextArea/index.d.ts +1 -1
  722. package/lib/components/TextArea/index.d.ts.map +1 -1
  723. package/lib/components/TextArea/index.js.map +1 -1
  724. package/lib/components/Toaster/Toaster.d.ts +8 -36
  725. package/lib/components/Toaster/Toaster.d.ts.map +1 -1
  726. package/lib/components/Toaster/Toaster.js +97 -102
  727. package/lib/components/Toaster/Toaster.js.map +1 -1
  728. package/lib/components/Tooltip/Tooltip.d.ts +6 -1
  729. package/lib/components/Tooltip/Tooltip.d.ts.map +1 -1
  730. package/lib/components/Tooltip/Tooltip.js +6 -13
  731. package/lib/components/Tooltip/Tooltip.js.map +1 -1
  732. package/lib/components/Tree/StandardTree.d.ts +6 -0
  733. package/lib/components/Tree/StandardTree.d.ts.map +1 -0
  734. package/lib/components/Tree/StandardTree.js +175 -0
  735. package/lib/components/Tree/StandardTree.js.map +1 -0
  736. package/lib/components/Tree/StandardTree.styles.d.ts +13 -0
  737. package/lib/components/Tree/StandardTree.styles.d.ts.map +1 -0
  738. package/lib/components/Tree/StandardTree.styles.js +155 -0
  739. package/lib/components/Tree/StandardTree.styles.js.map +1 -0
  740. package/lib/components/Tree/StandardTree.types.d.ts +25 -0
  741. package/lib/components/Tree/StandardTree.types.d.ts.map +1 -0
  742. package/lib/components/Tree/StandardTree.types.js +2 -0
  743. package/lib/components/Tree/StandardTree.types.js.map +1 -0
  744. package/lib/components/Tree/Tree.d.ts +35 -49
  745. package/lib/components/Tree/Tree.d.ts.map +1 -1
  746. package/lib/components/Tree/Tree.js +18 -56
  747. package/lib/components/Tree/Tree.js.map +1 -1
  748. package/lib/components/Tree/helpers.d.ts +19 -0
  749. package/lib/components/Tree/helpers.d.ts.map +1 -0
  750. package/lib/components/Tree/helpers.js +180 -0
  751. package/lib/components/Tree/helpers.js.map +1 -0
  752. package/lib/components/Tree/index.d.ts +4 -2
  753. package/lib/components/Tree/index.d.ts.map +1 -1
  754. package/lib/components/Tree/index.js +3 -1
  755. package/lib/components/Tree/index.js.map +1 -1
  756. package/lib/components/URL/URLDisplay.d.ts +2 -2
  757. package/lib/components/URL/URLDisplay.d.ts.map +1 -1
  758. package/lib/components/URL/URLDisplay.js +2 -2
  759. package/lib/components/URL/URLDisplay.js.map +1 -1
  760. package/lib/components/VisuallyHiddenText/VisuallyHiddenText.d.ts +10 -0
  761. package/lib/components/VisuallyHiddenText/VisuallyHiddenText.d.ts.map +1 -0
  762. package/lib/components/VisuallyHiddenText/VisuallyHiddenText.js +10 -0
  763. package/lib/components/VisuallyHiddenText/VisuallyHiddenText.js.map +1 -0
  764. package/lib/components/VisuallyHiddenText/index.d.ts +2 -0
  765. package/lib/components/VisuallyHiddenText/index.d.ts.map +1 -0
  766. package/lib/components/VisuallyHiddenText/index.js +2 -0
  767. package/lib/components/VisuallyHiddenText/index.js.map +1 -0
  768. package/lib/hooks/index.d.ts +7 -4
  769. package/lib/hooks/index.d.ts.map +1 -1
  770. package/lib/hooks/index.js +7 -3
  771. package/lib/hooks/index.js.map +1 -1
  772. package/lib/hooks/useActiveDescendant.d.ts +17 -3
  773. package/lib/hooks/useActiveDescendant.d.ts.map +1 -1
  774. package/lib/hooks/useActiveDescendant.js +86 -64
  775. package/lib/hooks/useActiveDescendant.js.map +1 -1
  776. package/lib/hooks/useAutoResize.d.ts.map +1 -1
  777. package/lib/hooks/useAutoResize.js +6 -7
  778. package/lib/hooks/useAutoResize.js.map +1 -1
  779. package/lib/hooks/useBreakpoint.js +2 -4
  780. package/lib/hooks/useBreakpoint.js.map +1 -1
  781. package/lib/hooks/useDraggable.d.ts +8 -0
  782. package/lib/hooks/useDraggable.d.ts.map +1 -0
  783. package/lib/hooks/useDraggable.js +64 -0
  784. package/lib/hooks/useDraggable.js.map +1 -0
  785. package/lib/hooks/useFocusWithin.d.ts +1 -1
  786. package/lib/hooks/useFocusWithin.d.ts.map +1 -1
  787. package/lib/hooks/useFocusWithin.js +29 -24
  788. package/lib/hooks/useFocusWithin.js.map +1 -1
  789. package/lib/hooks/useI18n.d.ts +511 -170
  790. package/lib/hooks/useI18n.d.ts.map +1 -1
  791. package/lib/hooks/useI18n.js +2 -2
  792. package/lib/hooks/useI18n.js.map +1 -1
  793. package/lib/hooks/useLongPress.d.ts +16 -0
  794. package/lib/hooks/useLongPress.d.ts.map +1 -0
  795. package/lib/hooks/useLongPress.js +59 -0
  796. package/lib/hooks/useLongPress.js.map +1 -0
  797. package/lib/hooks/useOuterEvent.js +1 -1
  798. package/lib/hooks/useOuterEvent.js.map +1 -1
  799. package/lib/hooks/useOverride.js +1 -1
  800. package/lib/hooks/useOverride.js.map +1 -1
  801. package/lib/hooks/useScrollStick.js +14 -3
  802. package/lib/hooks/useScrollStick.js.map +1 -1
  803. package/lib/hooks/useScrollToggle.d.ts +6 -0
  804. package/lib/hooks/useScrollToggle.d.ts.map +1 -0
  805. package/lib/hooks/useScrollToggle.js +40 -0
  806. package/lib/hooks/useScrollToggle.js.map +1 -0
  807. package/lib/hooks/useTransitionState.d.ts +39 -0
  808. package/lib/hooks/useTransitionState.d.ts.map +1 -0
  809. package/lib/hooks/useTransitionState.js +56 -0
  810. package/lib/hooks/useTransitionState.js.map +1 -0
  811. package/lib/i18n/default.d.ts +589 -0
  812. package/lib/i18n/default.d.ts.map +1 -0
  813. package/lib/i18n/default.js +636 -0
  814. package/lib/i18n/default.js.map +1 -0
  815. package/lib/i18n/i18n.d.ts +1000 -318
  816. package/lib/i18n/i18n.d.ts.map +1 -1
  817. package/lib/i18n/i18n.js +1 -1
  818. package/lib/i18n/i18n.js.map +1 -1
  819. package/lib/i18n/index.d.ts +1 -0
  820. package/lib/i18n/index.d.ts.map +1 -1
  821. package/lib/i18n/index.js.map +1 -1
  822. package/lib/i18n/translate.d.ts +29 -4
  823. package/lib/i18n/translate.d.ts.map +1 -1
  824. package/lib/i18n/translate.js +21 -8
  825. package/lib/i18n/translate.js.map +1 -1
  826. package/lib/index.d.ts +11 -2
  827. package/lib/index.d.ts.map +1 -1
  828. package/lib/index.js +11 -2
  829. package/lib/index.js.map +1 -1
  830. package/lib/styles/GlobalStyle.d.ts.map +1 -1
  831. package/lib/styles/GlobalStyle.js +2 -26
  832. package/lib/styles/GlobalStyle.js.map +1 -1
  833. package/lib/theme/ThemeMachine.js +7 -1
  834. package/lib/theme/ThemeMachine.js.map +1 -1
  835. package/lib/theme/index.d.ts +1 -0
  836. package/lib/theme/index.d.ts.map +1 -1
  837. package/lib/theme/index.js +1 -0
  838. package/lib/theme/index.js.map +1 -1
  839. package/lib/theme/theme.d.ts +83 -53
  840. package/lib/theme/theme.d.ts.map +1 -1
  841. package/lib/theme/themeDefinition.json +50 -30
  842. package/lib/theme/themeOverrides.schema.json +24 -3
  843. package/lib/theme/themes/buildTheme.json +3 -39
  844. package/lib/theme/themes/darkTheme.json +6 -0
  845. package/lib/theme/themes/legacyBuildTheme.json +50 -0
  846. package/lib/types/types.d.ts +6 -1
  847. package/lib/types/types.d.ts.map +1 -1
  848. package/lib/types/types.js.map +1 -1
  849. package/lib/utils/utils.d.ts +41 -4
  850. package/lib/utils/utils.d.ts.map +1 -1
  851. package/lib/utils/utils.js +55 -9
  852. package/lib/utils/utils.js.map +1 -1
  853. package/package.json +11 -12
  854. package/lib/components/DateTime/Input/useButtonAriaLabel.d.ts +0 -3
  855. package/lib/components/DateTime/Input/useButtonAriaLabel.d.ts.map +0 -1
  856. package/lib/components/DateTime/Input/useButtonAriaLabel.js +0 -33
  857. package/lib/components/DateTime/Input/useButtonAriaLabel.js.map +0 -1
  858. package/lib/components/NoItems/NoItems.d.ts +0 -14
  859. package/lib/components/NoItems/NoItems.d.ts.map +0 -1
  860. package/lib/components/NoItems/NoItems.js.map +0 -1
  861. package/lib/components/NoItems/index.d.ts +0 -4
  862. package/lib/components/NoItems/index.d.ts.map +0 -1
  863. package/lib/components/NoItems/index.js +0 -3
  864. package/lib/components/NoItems/index.js.map +0 -1
  865. package/lib/i18n/default.json +0 -246
@@ -0,0 +1,134 @@
1
+ import styled, { css } from 'styled-components';
2
+ import { StyledButton } from '../Button';
3
+ import { defaultThemeProp } from '../../theme';
4
+ import { StyledIcon } from '../Icon';
5
+ import { StyledCard } from '../Card';
6
+ export const StyledModalChildrenWrap = styled.div ``;
7
+ export const StyledModalHeader = styled.header(({ theme: { base }, hasAction }) => {
8
+ const padAdjust = hasAction ? 0.75 : 0;
9
+ return css `
10
+ padding: calc(${3 - padAdjust} * ${base.spacing}) calc(${3 - padAdjust} * ${base.spacing})
11
+ calc(${2.5 - padAdjust} * ${base.spacing}) calc(3 * ${base.spacing});
12
+ h2 > ${StyledIcon} {
13
+ margin-inline-end: ${base.spacing};
14
+ }
15
+
16
+ > h2 {
17
+ overflow-x: hidden;
18
+ > :first-child {
19
+ overflow-x: hidden;
20
+ white-space: nowrap;
21
+ text-overflow: ellipsis;
22
+ }
23
+ }
24
+
25
+ ${StyledButton} {
26
+ color: ${base.palette['foreground-color']};
27
+ }
28
+ `;
29
+ });
30
+ StyledModalHeader.defaultProps = defaultThemeProp;
31
+ export const StyledModalContent = styled.div(({ theme: { base } }) => {
32
+ return css `
33
+ position: relative;
34
+ padding: calc(0.5 * ${base.spacing}) calc(3 * ${base.spacing});
35
+ overflow-y: auto;
36
+
37
+ &:last-child {
38
+ padding-bottom: calc(3 * ${base.spacing});
39
+ }
40
+ `;
41
+ });
42
+ StyledModalContent.defaultProps = defaultThemeProp;
43
+ export const StyledModalActions = styled.footer(({ theme: { base } }) => {
44
+ return css `
45
+ padding: calc(2.5 * ${base.spacing}) calc(3 * ${base.spacing}) calc(3 * ${base.spacing});
46
+ `;
47
+ });
48
+ StyledModalActions.defaultProps = defaultThemeProp;
49
+ export const StyledModal = styled(StyledCard)(({ theme: { base }, alert, autoWidth, center, stretch, state }) => {
50
+ let defaultMinWidth = '80ch';
51
+ let defaultMaxWidth = '80ch';
52
+ if (alert) {
53
+ defaultMinWidth = '60ch';
54
+ defaultMaxWidth = '60ch';
55
+ }
56
+ else if (autoWidth) {
57
+ defaultMaxWidth = '100%';
58
+ }
59
+ return css `
60
+ position: relative;
61
+
62
+ ${!alert && stretch
63
+ ? css `
64
+ width: calc(100% - 1rem);
65
+ height: calc(100% - 1rem);
66
+
67
+ @media screen and (min-width: ${base.breakpoints.sm}) {
68
+ width: calc(100% - 2rem);
69
+ height: calc(100% - 2rem);
70
+ }
71
+
72
+ @media screen and (min-width: ${base.breakpoints.md}) {
73
+ width: calc(100% - 4rem);
74
+ height: calc(100% - 4rem);
75
+ }
76
+ `
77
+ : css `
78
+ min-width: min(calc(100% - 1rem), ${defaultMinWidth});
79
+ max-width: min(calc(100% - 1rem), ${defaultMaxWidth});
80
+ max-height: calc(100% - 1rem);
81
+ ${!center &&
82
+ css `
83
+ margin-block-start: 0.5rem;
84
+ `}
85
+
86
+ @media screen and (min-width: ${base.breakpoints.sm}) {
87
+ min-width: min(calc(100% - 2rem), ${defaultMinWidth});
88
+ max-width: min(calc(100% - 2rem), ${defaultMaxWidth});
89
+ max-height: calc(100% - 2rem);
90
+ ${!center &&
91
+ css `
92
+ margin-block-start: 1rem;
93
+ `}
94
+ }
95
+
96
+ @media screen and (min-width: ${base.breakpoints.md}) {
97
+ min-width: min(calc(100% - 4rem), ${defaultMinWidth});
98
+ max-width: min(calc(100% - 4rem), ${defaultMaxWidth});
99
+ max-height: calc(100% - 4rem);
100
+ ${!center &&
101
+ css `
102
+ margin-block-start: 2rem;
103
+ `}
104
+ }
105
+ `}
106
+ box-shadow: ${base.shadow.high};
107
+
108
+ ${state === 'docked' &&
109
+ css `
110
+ /*
111
+ * This seems like the most optimal of the suboptimal solutions.
112
+ * https://styled-components.com/docs/faqs#how-can-i-override-styles-with-higher-specificity
113
+ */
114
+ &&& {
115
+ /* Using non logical properties due to Safari 14.x support and since the inline bottom values are the same. */
116
+ border-bottom-left-radius: 0;
117
+ border-bottom-right-radius: 0;
118
+ }
119
+ `}
120
+
121
+ &[aria-busy='true'] {
122
+ ${StyledModalContent} {
123
+ min-height: 8rem;
124
+ overflow: hidden;
125
+ }
126
+
127
+ ${StyledModalChildrenWrap} {
128
+ visibility: hidden;
129
+ }
130
+ }
131
+ `;
132
+ });
133
+ StyledModal.defaultProps = defaultThemeProp;
134
+ //# sourceMappingURL=Modal.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Modal.styles.js","sourceRoot":"","sources":["../../../src/components/Modal/Modal.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAMrC,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,GAAG,CAAA,EAAE,CAAC;AAEpD,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAC5C,CAAC,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;IACjC,MAAM,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AO,EAAE,KAAK,EAAE,EAAE,EAAE;IAClE,IAAI,eAAe,GAAG,MAAM,CAAC;IAC7B,IAAI,eAAe,GAAG,MAAM,CAAC;IAE7B,IAAI,KAAK,EAAE;QACT,eAAe,GAAG,MAAM,CAAC;QACzB,eAAe,GAAG,MAAM,CAAC;KAC1B;SAAM,IAAI,SAAS,EAAE;QACpB,eAAe,GAAG,MAAM,CAAC;KAC1B;IAED,OAAO,GAAG,CAAA;;;MAGN,CAAC,KAAK,IAAI,OAAO;QACjB,CAAC,CAAC,GAAG,CAAA;;;;0CAI+B,IAAI,CAAC,WAAW,CAAC,EAAE;;;;;0CAKnB,IAAI,CAAC,WAAW,CAAC,EAAE;;;;SAIpD;QACH,CAAC,CAAC,GAAG,CAAA;8CACmC,eAAe;8CACf,eAAe;;YAEjD,CAAC,MAAM;YACT,GAAG,CAAA;;WAEF;;0CAE+B,IAAI,CAAC,WAAW,CAAC,EAAE;gDACb,eAAe;gDACf,eAAe;;cAEjD,CAAC,MAAM;YACT,GAAG,CAAA;;aAEF;;;0CAG6B,IAAI,CAAC,WAAW,CAAC,EAAE;gDACb,eAAe;gDACf,eAAe;;cAEjD,CAAC,MAAM;YACT,GAAG,CAAA;;aAEF;;SAEJ;kBACS,IAAI,CAAC,MAAM,CAAC,IAAI;;MAE5B,KAAK,KAAK,QAAQ;QACpB,GAAG,CAAA;;;;;;;;;;KAUF;;;QAGG,kBAAkB;;;;;QAKlB,uBAAuB;;;;GAI5B,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,WAAW,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\n\nimport { StyledButton } from '../Button';\nimport { PropsWithDefaults } from '../../types';\nimport { defaultThemeProp } from '../../theme';\nimport { StyledIcon } from '../Icon';\nimport { StyledCard } from '../Card';\n\nimport { ModalContextValue, ModalProps } from './Modal.types';\n\ntype ModalPropsWithDefaults = PropsWithDefaults<ModalProps, 'stretch' | 'center' | 'autoWidth'>;\n\nexport const StyledModalChildrenWrap = styled.div``;\n\nexport const StyledModalHeader = styled.header<{ hasAction?: boolean }>(\n ({ theme: { base }, hasAction }) => {\n const padAdjust = hasAction ? 0.75 : 0;\n\n return css`\n padding: calc(${3 - padAdjust} * ${base.spacing}) calc(${3 - padAdjust} * ${base.spacing})\n calc(${2.5 - padAdjust} * ${base.spacing}) calc(3 * ${base.spacing});\n h2 > ${StyledIcon} {\n margin-inline-end: ${base.spacing};\n }\n\n > h2 {\n overflow-x: hidden;\n > :first-child {\n overflow-x: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n }\n\n ${StyledButton} {\n color: ${base.palette['foreground-color']};\n }\n `;\n }\n);\n\nStyledModalHeader.defaultProps = defaultThemeProp;\n\nexport const StyledModalContent = styled.div(({ theme: { base } }) => {\n return css`\n position: relative;\n padding: calc(0.5 * ${base.spacing}) calc(3 * ${base.spacing});\n overflow-y: auto;\n\n &:last-child {\n padding-bottom: calc(3 * ${base.spacing});\n }\n `;\n});\n\nStyledModalContent.defaultProps = defaultThemeProp;\n\nexport const StyledModalActions = styled.footer(({ theme: { base } }) => {\n return css`\n padding: calc(2.5 * ${base.spacing}) calc(3 * ${base.spacing}) calc(3 * ${base.spacing});\n `;\n});\n\nStyledModalActions.defaultProps = defaultThemeProp;\n\nexport const StyledModal = styled(StyledCard)<\n ModalPropsWithDefaults & Pick<ModalContextValue, 'alert' | 'state'>\n>(({ theme: { base }, alert, autoWidth, center, stretch, state }) => {\n let defaultMinWidth = '80ch';\n let defaultMaxWidth = '80ch';\n\n if (alert) {\n defaultMinWidth = '60ch';\n defaultMaxWidth = '60ch';\n } else if (autoWidth) {\n defaultMaxWidth = '100%';\n }\n\n return css`\n position: relative;\n\n ${!alert && stretch\n ? css`\n width: calc(100% - 1rem);\n height: calc(100% - 1rem);\n\n @media screen and (min-width: ${base.breakpoints.sm}) {\n width: calc(100% - 2rem);\n height: calc(100% - 2rem);\n }\n\n @media screen and (min-width: ${base.breakpoints.md}) {\n width: calc(100% - 4rem);\n height: calc(100% - 4rem);\n }\n `\n : css`\n min-width: min(calc(100% - 1rem), ${defaultMinWidth});\n max-width: min(calc(100% - 1rem), ${defaultMaxWidth});\n max-height: calc(100% - 1rem);\n ${!center &&\n css`\n margin-block-start: 0.5rem;\n `}\n\n @media screen and (min-width: ${base.breakpoints.sm}) {\n min-width: min(calc(100% - 2rem), ${defaultMinWidth});\n max-width: min(calc(100% - 2rem), ${defaultMaxWidth});\n max-height: calc(100% - 2rem);\n ${!center &&\n css`\n margin-block-start: 1rem;\n `}\n }\n\n @media screen and (min-width: ${base.breakpoints.md}) {\n min-width: min(calc(100% - 4rem), ${defaultMinWidth});\n max-width: min(calc(100% - 4rem), ${defaultMaxWidth});\n max-height: calc(100% - 4rem);\n ${!center &&\n css`\n margin-block-start: 2rem;\n `}\n }\n `}\n box-shadow: ${base.shadow.high};\n\n ${state === 'docked' &&\n css`\n /*\n * This seems like the most optimal of the suboptimal solutions.\n * https://styled-components.com/docs/faqs#how-can-i-override-styles-with-higher-specificity\n */\n &&& {\n /* Using non logical properties due to Safari 14.x support and since the inline bottom values are the same. */\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n }\n `}\n\n &[aria-busy='true'] {\n ${StyledModalContent} {\n min-height: 8rem;\n overflow: hidden;\n }\n\n ${StyledModalChildrenWrap} {\n visibility: hidden;\n }\n }\n `;\n});\n\nStyledModal.defaultProps = defaultThemeProp;\n"]}
@@ -1,5 +1,6 @@
1
- import { ComponentType, ReactNode, RefObject, Context } from 'react';
2
- import { BaseProps, AsProp } from '../../types';
1
+ import type { ComponentType, ReactNode, RefObject, Context } from 'react';
2
+ import type { ProgressProps } from '@pega/cosmos-react-core';
3
+ import type { BaseProps, AsProp, DeferInfer } from '../../types';
3
4
  export interface ModalManagerProps {
4
5
  /** Content that will be provided modal manager context. */
5
6
  children: ReactNode;
@@ -24,6 +25,16 @@ export interface ModalOptions {
24
25
  * @default false
25
26
  */
26
27
  minimizable?: boolean;
28
+ /**
29
+ * Toggle maximize button in header thereby helping in rendering maximizable/non-maximizable Modals.
30
+ * Not valid for Modals of type alert.
31
+ * @default false
32
+ */
33
+ maximizable?: boolean;
34
+ /** Positions the modal in the right corner without backdrop
35
+ * @default false
36
+ */
37
+ dockable?: boolean;
27
38
  /**
28
39
  * If true, the Modal will initially render in a minimized state.
29
40
  * @default false
@@ -42,6 +53,14 @@ export interface ModalOptions {
42
53
  * Life cycle function that will be run when the modal is minimized.
43
54
  */
44
55
  onMinimize?: (id: string) => void;
56
+ /**
57
+ * Life cycle function that will be run when the modal is maximized.
58
+ */
59
+ onMaximize?: (id: string) => void;
60
+ /**
61
+ * Life cycle function that will be run when the modal is maximized.
62
+ */
63
+ onDock?: (id: string) => void;
45
64
  /**
46
65
  * Life cycle function that will be run when the modal is activated (un minimized).
47
66
  */
@@ -52,10 +71,19 @@ export interface ModalOptions {
52
71
  onDismiss?: (id: string) => void;
53
72
  }
54
73
  export interface ModalProps extends BaseProps, AsProp {
74
+ /**
75
+ * Place a modal into a loading state by way of a bool or an object which allows for a custom message and determinate progress.
76
+ */
77
+ progress?: boolean | Pick<ProgressProps, 'message' | 'minValue' | 'maxValue' | 'value'>;
55
78
  /**
56
79
  * Heading for the Modal.
57
80
  */
58
81
  heading: ReactNode;
82
+ /**
83
+ * Count for list data presented in the Modal.
84
+ */
85
+ count?: number;
86
+ /**
59
87
  /**
60
88
  * Content for the Modal.
61
89
  */
@@ -74,6 +102,11 @@ export interface ModalProps extends BaseProps, AsProp {
74
102
  * @default false
75
103
  */
76
104
  center?: boolean;
105
+ /**
106
+ * Automatically compute the width of the Modal based on the content.
107
+ * @default false
108
+ */
109
+ autoWidth?: boolean;
77
110
  /**
78
111
  * Takes a React Ref of the element to be focused initially on mounting Modal.
79
112
  */
@@ -104,13 +137,23 @@ export interface ModalProps extends BaseProps, AsProp {
104
137
  * If the boolean is false, the modal will not be minimized.
105
138
  */
106
139
  onRequestMinimize?: () => boolean | void;
140
+ /**
141
+ * Accepts a callback function that returns a boolean before maximizing a modal.
142
+ * If the boolean is false, the modal will not be maximized.
143
+ */
144
+ onRequestMaximize?: () => boolean | void;
145
+ /**
146
+ * Accepts a callback function that returns a boolean before docking a modal.
147
+ * If the boolean is false, the modal will not be dockable.
148
+ */
149
+ onRequestDock?: () => boolean | void;
107
150
  /**
108
151
  * Accepts a callback function that returns a boolean before activating a modal.
109
152
  * If the boolean is false, the modal will not be activated.
110
153
  */
111
154
  onRequestActivate?: () => boolean | void;
112
155
  }
113
- export declare type ModalState = 'open' | 'closed' | 'minimized';
156
+ export declare type ModalState = 'open' | 'closed' | 'minimized' | 'maximized' | 'docked';
114
157
  export interface ModalMethods<P extends object = object> {
115
158
  /**
116
159
  * Closes the referenced Modal when called.
@@ -119,11 +162,19 @@ export interface ModalMethods<P extends object = object> {
119
162
  /**
120
163
  * Updates the referenced Modal with a set of props.
121
164
  */
122
- update: (props: P) => void;
165
+ update: (props: Partial<P>) => void;
123
166
  /**
124
167
  * Minimizes the referenced Modal.
125
168
  */
126
169
  minimize: () => void;
170
+ /**
171
+ * Maximizes the referenced Modal.
172
+ */
173
+ maximize: () => void;
174
+ /**
175
+ * docks the referenced Modal.
176
+ */
177
+ dock: () => void;
127
178
  /**
128
179
  * Will reopen the referenced Modal if minimized, and minimize any open Modals that are minimizable.
129
180
  */
@@ -133,18 +184,20 @@ export interface ModalMethods<P extends object = object> {
133
184
  */
134
185
  unmount: () => void;
135
186
  }
136
- export declare const initializedKey: unique symbol;
187
+ export declare const managerInitializedKey: unique symbol;
137
188
  export interface ModalManagerContextValue {
138
189
  /**
139
190
  * The function that will create the Modal. This function accepts the component to render a Modal, props for that component, and options for that Modal.
140
191
  */
141
- create: <P extends object>(component: ComponentType<P>, props?: P, options?: ModalOptions) => ModalMethods<P>;
192
+ create: <P extends object>(component: ComponentType<P>, props?: DeferInfer<P>, options?: ModalOptions) => ModalMethods<P>;
142
193
  ModalContext: Context<ModalContextValue>;
143
- [initializedKey]: boolean;
194
+ [managerInitializedKey]: boolean;
144
195
  }
196
+ export declare const modalInitializedKey: unique symbol;
145
197
  export interface ModalContextValue extends ModalMethods, ModalOptions {
146
198
  state: ModalState;
147
199
  top: boolean;
200
+ [modalInitializedKey]: boolean;
148
201
  }
149
202
  export interface ModalObject<P extends object = object> {
150
203
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.types.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/Modal.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAErE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,WAAW,iBAAiB;IAChC,2DAA2D;IAC3D,QAAQ,EAAE,SAAS,CAAC;IACpB,4CAA4C;IAC5C,OAAO,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,CAAC;CAC7C;AAED,MAAM,WAAW,YAAY;IAC3B;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;OAGG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC;;OAEG;IACH,SAAS,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CAClC;AAED,MAAM,WAAW,UAAW,SAAQ,SAAS,EAAE,MAAM;IACnD;;OAEG;IAC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IACH,MAAM,EAAE,CAAC,CAAC,SAAS,MAAM,EACvB,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,EAC3B,KAAK,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,EACrB,OAAO,CAAC,EAAE,YAAY,KACnB,YAAY,CAAC,CAAC,CAAC,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACzC,CAAC,qBAAqB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED,eAAO,MAAM,mBAAmB,eAA0D,CAAC;AAE3F,MAAM,WAAW,iBAAkB,SAAQ,YAAY,EAAE,YAAY;IACnE,KAAK,EAAE,UAAU,CAAC;IAClB,GAAG,EAAE,OAAO,CAAC;IACb,CAAC,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,MAAM,WAAW,WAAW,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IACpD,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,UAAU,CAAC;IAClB,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IACzB,KAAK,CAAC,EAAE,CAAC,CAAC;IACV,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IAC5B,OAAO,EAAE,YAAY,CAAC;CACvB"}
@@ -1,2 +1,3 @@
1
- export const initializedKey = Symbol.for('@pega/cosmos-react-core.modal-manager.initialized');
1
+ export const managerInitializedKey = Symbol.for('@pega/cosmos-react-core.modal-manager.initialized');
2
+ export const modalInitializedKey = Symbol.for('@pega/cosmos-react-core.modal.initialized');
2
3
  //# sourceMappingURL=Modal.types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.types.js","sourceRoot":"","sources":["../../../src/components/Modal/Modal.types.ts"],"names":[],"mappings":"AA8IA,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAC,mDAAmD,CAAC,CAAC","sourcesContent":["import { ComponentType, ReactNode, RefObject, Context } from 'react';\n\nimport { BaseProps, AsProp } from '../../types';\n\nexport interface ModalManagerProps {\n /** Content that will be provided modal manager context. */\n children: ReactNode;\n /** Context to read previous values from. */\n context?: Context<ModalManagerContextValue>;\n}\n\nexport interface ModalOptions {\n /**\n * If true, the Modal will render as an alert that is not dismissible.\n * @default false\n */\n alert?: boolean;\n /**\n * Toggle Esc keypress action or clicking backdrop to dismiss Modal. Also displays dismiss button on Modal header.\n * Not valid for Modals of type alert.\n * @default alert ? false : true\n */\n dismissible?: boolean;\n /**\n * Toggle minimize button in header thereby helping in rendering minimizable/non-minimizable Modals.\n * Not valid for Modals of type alert.\n * @default false\n */\n minimizable?: boolean;\n /**\n * If true, the Modal will initially render in a minimized state.\n * @default false\n */\n defaultMinimized?: boolean;\n /**\n * If true, the Modal content will be removed from the DOM when in a minimized state.\n * @default true\n */\n unmountWhenMinimized?: boolean;\n /**\n * Used to identify the modal. Will be passed back as an argument in life cycle functions.\n */\n id?: string;\n /**\n * Life cycle function that will be run when the modal is minimized.\n */\n onMinimize?: (id: string) => void;\n /**\n * Life cycle function that will be run when the modal is activated (un minimized).\n */\n onActivate?: (id: string) => void;\n /**\n * Life cycle function that will be run when the modal is dismissed.\n */\n onDismiss?: (id: string) => void;\n}\n\nexport interface ModalProps extends BaseProps, AsProp {\n /**\n * Heading for the Modal.\n */\n heading: ReactNode;\n /**\n * Content for the Modal.\n */\n children: ReactNode;\n /**\n * Actions for the Modal.\n */\n actions?: ReactNode;\n /**\n * Render the modal in full width and height.\n * @default false\n */\n stretch?: boolean;\n /**\n * Toggle to position the Modal vertically centered or not.\n * @default false\n */\n center?: boolean;\n /**\n * Takes a React Ref of the element to be focused initially on mounting Modal.\n */\n defaultFocus?: RefObject<HTMLElement>;\n /**\n * Accepts a callback function that gets invoked before opening a Modal.\n */\n onBeforeOpen?: () => void;\n /**\n * Accepts a callback function that gets invoked after opening a Modal.\n */\n onAfterOpen?: () => void;\n /**\n * Accepts a callback function that gets invoked before closing a Modal.\n */\n onBeforeClose?: () => void;\n /**\n * Accepts a callback function that gets invoked after closing a Modal.\n */\n onAfterClose?: () => void;\n /**\n * Accepts a callback function that returns a boolean before dismissing a modal.\n * If the boolean is false, the modal will not be dismissed.\n */\n onRequestDismiss?: () => boolean | void;\n /**\n * Accepts a callback function that returns a boolean before minimizing a modal.\n * If the boolean is false, the modal will not be minimized.\n */\n onRequestMinimize?: () => boolean | void;\n /**\n * Accepts a callback function that returns a boolean before activating a modal.\n * If the boolean is false, the modal will not be activated.\n */\n onRequestActivate?: () => boolean | void;\n}\n\nexport type ModalState = 'open' | 'closed' | 'minimized';\n\nexport interface ModalMethods<P extends object = object> {\n /**\n * Closes the referenced Modal when called.\n */\n dismiss: () => void;\n /**\n * Updates the referenced Modal with a set of props.\n */\n update: (props: P) => void;\n /**\n * Minimizes the referenced Modal.\n */\n minimize: () => void;\n /**\n * Will reopen the referenced Modal if minimized, and minimize any open Modals that are minimizable.\n */\n activate: () => void;\n /**\n * Removes the referenced Modal from the DOM.\n */\n unmount: () => void;\n}\n\nexport const initializedKey = Symbol.for('@pega/cosmos-react-core.modal-manager.initialized');\n\nexport interface ModalManagerContextValue {\n /**\n * The function that will create the Modal. This function accepts the component to render a Modal, props for that component, and options for that Modal.\n */\n create: <P extends object>(\n component: ComponentType<P>,\n props?: P,\n options?: ModalOptions\n ) => ModalMethods<P>;\n ModalContext: Context<ModalContextValue>;\n [initializedKey]: boolean;\n}\n\nexport interface ModalContextValue extends ModalMethods, ModalOptions {\n state: ModalState;\n top: boolean;\n}\n\nexport interface ModalObject<P extends object = object> {\n id: string;\n state: ModalState;\n methods: ModalMethods<P>;\n props?: P;\n Component: ComponentType<P>;\n options: ModalOptions;\n}\n"]}
1
+ {"version":3,"file":"Modal.types.js","sourceRoot":"","sources":["../../../src/components/Modal/Modal.types.ts"],"names":[],"mappings":"AAkMA,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,GAAG,CAC7C,mDAAmD,CACpD,CAAC;AAeF,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,GAAG,CAAC,2CAA2C,CAAC,CAAC","sourcesContent":["import type { ComponentType, ReactNode, RefObject, Context } from 'react';\n\nimport type { ProgressProps } from '@pega/cosmos-react-core';\n\nimport type { BaseProps, AsProp, DeferInfer } from '../../types';\n\nexport interface ModalManagerProps {\n /** Content that will be provided modal manager context. */\n children: ReactNode;\n /** Context to read previous values from. */\n context?: Context<ModalManagerContextValue>;\n}\n\nexport interface ModalOptions {\n /**\n * If true, the Modal will render as an alert that is not dismissible.\n * @default false\n */\n alert?: boolean;\n /**\n * Toggle Esc keypress action or clicking backdrop to dismiss Modal. Also displays dismiss button on Modal header.\n * Not valid for Modals of type alert.\n * @default alert ? false : true\n */\n dismissible?: boolean;\n /**\n * Toggle minimize button in header thereby helping in rendering minimizable/non-minimizable Modals.\n * Not valid for Modals of type alert.\n * @default false\n */\n minimizable?: boolean;\n /**\n * Toggle maximize button in header thereby helping in rendering maximizable/non-maximizable Modals.\n * Not valid for Modals of type alert.\n * @default false\n */\n maximizable?: boolean;\n /** Positions the modal in the right corner without backdrop\n * @default false\n */\n dockable?: boolean;\n /**\n * If true, the Modal will initially render in a minimized state.\n * @default false\n */\n defaultMinimized?: boolean;\n /**\n * If true, the Modal content will be removed from the DOM when in a minimized state.\n * @default true\n */\n unmountWhenMinimized?: boolean;\n /**\n * Used to identify the modal. Will be passed back as an argument in life cycle functions.\n */\n id?: string;\n /**\n * Life cycle function that will be run when the modal is minimized.\n */\n onMinimize?: (id: string) => void;\n /**\n * Life cycle function that will be run when the modal is maximized.\n */\n onMaximize?: (id: string) => void;\n /**\n * Life cycle function that will be run when the modal is maximized.\n */\n onDock?: (id: string) => void;\n /**\n * Life cycle function that will be run when the modal is activated (un minimized).\n */\n onActivate?: (id: string) => void;\n /**\n * Life cycle function that will be run when the modal is dismissed.\n */\n onDismiss?: (id: string) => void;\n}\n\nexport interface ModalProps extends BaseProps, AsProp {\n /**\n * Place a modal into a loading state by way of a bool or an object which allows for a custom message and determinate progress.\n */\n progress?: boolean | Pick<ProgressProps, 'message' | 'minValue' | 'maxValue' | 'value'>;\n /**\n * Heading for the Modal.\n */\n heading: ReactNode;\n /**\n * Count for list data presented in the Modal.\n */\n count?: number;\n /**\n /**\n * Content for the Modal.\n */\n children: ReactNode;\n /**\n * Actions for the Modal.\n */\n actions?: ReactNode;\n /**\n * Render the modal in full width and height.\n * @default false\n */\n stretch?: boolean;\n /**\n * Toggle to position the Modal vertically centered or not.\n * @default false\n */\n center?: boolean;\n /**\n * Automatically compute the width of the Modal based on the content.\n * @default false\n */\n autoWidth?: boolean;\n /**\n * Takes a React Ref of the element to be focused initially on mounting Modal.\n */\n defaultFocus?: RefObject<HTMLElement>;\n /**\n * Accepts a callback function that gets invoked before opening a Modal.\n */\n onBeforeOpen?: () => void;\n /**\n * Accepts a callback function that gets invoked after opening a Modal.\n */\n onAfterOpen?: () => void;\n /**\n * Accepts a callback function that gets invoked before closing a Modal.\n */\n onBeforeClose?: () => void;\n /**\n * Accepts a callback function that gets invoked after closing a Modal.\n */\n onAfterClose?: () => void;\n /**\n * Accepts a callback function that returns a boolean before dismissing a modal.\n * If the boolean is false, the modal will not be dismissed.\n */\n onRequestDismiss?: () => boolean | void;\n /**\n * Accepts a callback function that returns a boolean before minimizing a modal.\n * If the boolean is false, the modal will not be minimized.\n */\n onRequestMinimize?: () => boolean | void;\n /**\n * Accepts a callback function that returns a boolean before maximizing a modal.\n * If the boolean is false, the modal will not be maximized.\n */\n onRequestMaximize?: () => boolean | void;\n /**\n * Accepts a callback function that returns a boolean before docking a modal.\n * If the boolean is false, the modal will not be dockable.\n */\n onRequestDock?: () => boolean | void;\n /**\n * Accepts a callback function that returns a boolean before activating a modal.\n * If the boolean is false, the modal will not be activated.\n */\n onRequestActivate?: () => boolean | void;\n}\n\nexport type ModalState = 'open' | 'closed' | 'minimized' | 'maximized' | 'docked';\n\nexport interface ModalMethods<P extends object = object> {\n /**\n * Closes the referenced Modal when called.\n */\n dismiss: () => void;\n /**\n * Updates the referenced Modal with a set of props.\n */\n update: (props: Partial<P>) => void;\n /**\n * Minimizes the referenced Modal.\n */\n minimize: () => void;\n /**\n * Maximizes the referenced Modal.\n */\n maximize: () => void;\n /**\n * docks the referenced Modal.\n */\n dock: () => void;\n /**\n * Will reopen the referenced Modal if minimized, and minimize any open Modals that are minimizable.\n */\n activate: () => void;\n /**\n * Removes the referenced Modal from the DOM.\n */\n unmount: () => void;\n}\n\nexport const managerInitializedKey = Symbol.for(\n '@pega/cosmos-react-core.modal-manager.initialized'\n);\n\nexport interface ModalManagerContextValue {\n /**\n * The function that will create the Modal. This function accepts the component to render a Modal, props for that component, and options for that Modal.\n */\n create: <P extends object>(\n component: ComponentType<P>,\n props?: DeferInfer<P>,\n options?: ModalOptions\n ) => ModalMethods<P>;\n ModalContext: Context<ModalContextValue>;\n [managerInitializedKey]: boolean;\n}\n\nexport const modalInitializedKey = Symbol.for('@pega/cosmos-react-core.modal.initialized');\n\nexport interface ModalContextValue extends ModalMethods, ModalOptions {\n state: ModalState;\n top: boolean;\n [modalInitializedKey]: boolean;\n}\n\nexport interface ModalObject<P extends object = object> {\n id: string;\n state: ModalState;\n methods: ModalMethods<P>;\n props?: P;\n Component: ComponentType<P>;\n options: ModalOptions;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ModalManager.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/ModalManager.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,iBAAiB,EAIlB,MAAM,OAAO,CAAC;AAQf,OAAO,EAIL,iBAAiB,EAElB,MAAM,eAAe,CAAC;AAqJvB,QAAA,MAAM,YAAY,EAAE,iBAAiB,CAAC,iBAAiB,CAyHtD,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"ModalManager.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/ModalManager.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,iBAAiB,EAGlB,MAAM,OAAO,CAAC;AAQf,OAAO,EAIL,iBAAiB,EAIlB,MAAM,eAAe,CAAC;AA2KvB,QAAA,MAAM,YAAY,EAAE,iBAAiB,CAAC,iBAAiB,CAkItD,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -1,22 +1,23 @@
1
1
  import { createElement as _createElement } from "react";
2
2
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { useReducer, useMemo, useEffect, useContext, useRef } from 'react';
3
+ import { useReducer, useMemo, useEffect, useContext } from 'react';
4
4
  import { createPortal } from 'react-dom';
5
- import { createUID, getScrollbarWidth, testElForOverflow } from '../../utils';
6
- import { useConfiguration } from '../../hooks';
5
+ import { createUID } from '../../utils';
6
+ import { useConfiguration, useScrollToggle } from '../../hooks';
7
7
  import DockedModals from './DockedModals';
8
- import { initializedKey } from './Modal.types';
8
+ import { modalInitializedKey, managerInitializedKey } from './Modal.types';
9
9
  import { ModalContext, ModalManagerContext } from './Contexts';
10
10
  const reducer = (modals, payload) => {
11
11
  switch (payload.action) {
12
12
  case 'create':
13
13
  return [
14
14
  ...modals.map(modal => {
15
- if (!payload.modal.options.alert &&
15
+ if ((!payload.modal.options.alert &&
16
16
  payload.modal.state === 'open' &&
17
17
  !modal.options.alert &&
18
18
  modal.state === 'open' &&
19
- modal.options.minimizable) {
19
+ modal.options.minimizable) ||
20
+ payload.modal.options.dockable) {
20
21
  modal.state = 'minimized';
21
22
  }
22
23
  return modal;
@@ -38,9 +39,12 @@ const reducer = (modals, payload) => {
38
39
  });
39
40
  case 'activate':
40
41
  return modals.map(modal => {
41
- if (modal.id === payload.modal.id) {
42
+ if (modal.id === payload.modal.id && !modal.options.dockable) {
42
43
  modal.state = 'open';
43
44
  }
45
+ else if (modal.id === payload.modal.id && modal.options.dockable) {
46
+ modal.state = 'docked';
47
+ }
44
48
  else if (!modal.options.alert && modal.state === 'open' && modal.options.minimizable) {
45
49
  modal.state = 'minimized';
46
50
  }
@@ -52,67 +56,94 @@ const reducer = (modals, payload) => {
52
56
  modal.id === payload.modal.id && modal.options.minimizable ? 'minimized' : modal.state;
53
57
  return modal;
54
58
  });
59
+ case 'maximize':
60
+ return modals.map(modal => {
61
+ modal.state =
62
+ modal.id === payload.modal.id && modal.options.maximizable ? 'maximized' : modal.state;
63
+ return modal;
64
+ });
65
+ case 'dock':
66
+ return modals.map(modal => {
67
+ modal.state =
68
+ modal.id === payload.modal.id && modal.options.dockable ? 'docked' : 'minimized';
69
+ return modal;
70
+ });
55
71
  default:
56
72
  return modals;
57
73
  }
58
74
  };
59
- const WrappedModal = ({ Component, id, options: { alert, dismissible, minimizable }, state, methods, props, top }) => (_jsx(ModalContext.Provider, Object.assign({ value: {
75
+ const WrappedModal = ({ Component, id, options: { alert, dismissible, dockable, minimizable, maximizable }, state, methods, props, top }) => (_jsx(ModalContext.Provider, { value: {
60
76
  id,
61
77
  alert,
62
78
  dismissible,
63
79
  minimizable,
80
+ maximizable,
81
+ dockable,
64
82
  state,
65
83
  top,
84
+ [modalInitializedKey]: true,
66
85
  ...methods
67
- } }, { children: _jsx(Component, Object.assign({}, props), void 0) }), void 0));
86
+ }, children: _jsx(Component, { ...props }, void 0) }, void 0));
68
87
  const RenderModals = ({ modals }) => {
69
88
  const { open, minimized, alerts } = modals.reduce((obj, modal) => {
70
89
  if (modal.options.alert)
71
90
  obj.alerts.push(modal);
72
- else if (modal.state === 'minimized')
91
+ else if (modal.state === 'minimized' || modal.state === 'docked') {
73
92
  obj.minimized.push(modal);
93
+ }
74
94
  else
75
95
  obj.open.push(modal);
76
96
  return obj;
77
97
  }, { open: [], minimized: [], alerts: [] });
78
- return (_jsxs(_Fragment, { children: [open.map((modal, i) => (_createElement(WrappedModal, { ...modal, top: alerts.length === 0 && i === open.length - 1, key: modal.id }))),
79
- minimized.length > 0 && (_jsx(DockedModals, { children: minimized.map(modal => (_createElement(WrappedModal, { ...modal, top: false, key: modal.id }))) }, void 0)),
80
- alerts.map((modal, i) => (_createElement(WrappedModal, { ...modal, top: i === open.length - 1, key: modal.id })))] }, void 0));
98
+ return (_jsxs(_Fragment, { children: [open.map((modal, i) => (_createElement(WrappedModal, { ...modal, top: alerts.length === 0 && i === open.length - 1, key: modal.id }))), minimized.length > 0 && (_jsx(DockedModals, { children: minimized.map(modal => (_createElement(WrappedModal, { ...modal, top: false, key: modal.id }))) }, void 0)), alerts.map((modal, i) => (_createElement(WrappedModal, { ...modal, top: i === open.length - 1, key: modal.id })))] }, void 0));
81
99
  };
82
100
  const ModalManager = ({ children, context = ModalManagerContext }) => {
83
101
  const [modals, dispatch] = useReducer(reducer, []);
84
- const styleCache = useRef('');
85
- const overflowProperty = useRef('');
102
+ const { disableScroll, enableScroll } = useScrollToggle();
86
103
  const providerValue = useMemo(() => ({
87
104
  create: (Component, props, options) => {
88
- var _a;
89
- const id = (options === null || options === void 0 ? void 0 : options.id) || createUID();
105
+ const id = options?.id || createUID();
90
106
  const methods = {
91
107
  dismiss: () => {
92
- var _a;
93
108
  dispatch({ action: 'dismiss', modal: { id } });
94
- (_a = options === null || options === void 0 ? void 0 : options.onDismiss) === null || _a === void 0 ? void 0 : _a.call(options, id);
109
+ options?.onDismiss?.(id);
95
110
  },
96
- update: (updateProps) => {
111
+ update: updateProps => {
97
112
  dispatch({
98
113
  action: 'update',
99
114
  modal: { id, props: updateProps }
100
115
  });
101
116
  },
102
117
  minimize: () => {
103
- var _a;
104
118
  dispatch({ action: 'minimize', modal: { id } });
105
- (_a = options === null || options === void 0 ? void 0 : options.onMinimize) === null || _a === void 0 ? void 0 : _a.call(options, id);
119
+ options?.onMinimize?.(id);
120
+ },
121
+ maximize: () => {
122
+ dispatch({ action: 'maximize', modal: { id } });
123
+ options?.onMaximize?.(id);
124
+ },
125
+ dock: () => {
126
+ dispatch({ action: 'dock', modal: { id } });
127
+ options?.onDock?.(id);
106
128
  },
107
129
  activate: () => {
108
- var _a;
109
130
  dispatch({ action: 'activate', modal: { id } });
110
- (_a = options === null || options === void 0 ? void 0 : options.onActivate) === null || _a === void 0 ? void 0 : _a.call(options, id);
131
+ options?.onActivate?.(id);
111
132
  },
112
133
  unmount: () => {
113
134
  dispatch({ action: 'unmount', modal: { id } });
114
135
  }
115
136
  };
137
+ let defaultState;
138
+ if (options?.defaultMinimized) {
139
+ defaultState = 'minimized';
140
+ }
141
+ else if (options?.dockable) {
142
+ defaultState = 'docked';
143
+ }
144
+ else {
145
+ defaultState = 'open';
146
+ }
116
147
  dispatch({
117
148
  action: 'create',
118
149
  modal: {
@@ -120,70 +151,49 @@ const ModalManager = ({ children, context = ModalManagerContext }) => {
120
151
  methods,
121
152
  Component,
122
153
  props,
123
- state: (options === null || options === void 0 ? void 0 : options.defaultMinimized) ? 'minimized' : 'open',
154
+ state: defaultState,
124
155
  options: {
125
156
  alert: false,
126
157
  minimizable: false,
158
+ maximizable: false,
159
+ dockable: false,
127
160
  defaultMinimized: false,
128
161
  unmountWhenMinimized: true,
129
162
  ...options,
130
- dismissible: !!((options === null || options === void 0 ? void 0 : options.alert) ? false : (_a = options === null || options === void 0 ? void 0 : options.dismissible) !== null && _a !== void 0 ? _a : true)
163
+ dismissible: !!(options?.alert ? false : options?.dismissible ?? true)
131
164
  }
132
165
  }
133
166
  });
134
167
  return methods;
135
168
  },
136
169
  ModalContext,
137
- [initializedKey]: true
170
+ [managerInitializedKey]: true
138
171
  }), []);
139
172
  useEffect(() => {
140
- if (modals.some(modal => modal.state === 'open')) {
141
- if (!overflowProperty.current) {
142
- requestAnimationFrame(() => {
143
- overflowProperty.current = 'overflow';
144
- styleCache.current = document.body.style.overflow;
145
- if (document.body.style.overflowX) {
146
- styleCache.current = document.body.style.overflowX;
147
- overflowProperty.current = 'overflowX';
148
- }
149
- else if (document.body.style.overflowY) {
150
- styleCache.current = document.body.style.overflowY;
151
- overflowProperty.current = 'overflowY';
152
- }
153
- if (testElForOverflow(document.body))
154
- document.body.style.paddingInlineEnd = `${getScrollbarWidth()}px`;
155
- document.body.style.overflow = 'hidden';
156
- });
157
- }
173
+ if (modals.some(modal => modal.state === 'open' && !modal.options.dockable)) {
174
+ disableScroll();
158
175
  }
159
- else if (overflowProperty.current) {
160
- requestAnimationFrame(() => {
161
- document.body.style.paddingInlineEnd = '';
162
- switch (overflowProperty.current) {
163
- case 'overflowX':
164
- document.body.style.overflowX = styleCache.current;
165
- break;
166
- case 'overflowY':
167
- document.body.style.overflowY = styleCache.current;
168
- break;
169
- default:
170
- document.body.style.overflow = styleCache.current;
171
- break;
172
- }
173
- styleCache.current = '';
174
- overflowProperty.current = '';
175
- });
176
+ else {
177
+ enableScroll();
176
178
  }
177
179
  }, [modals]);
178
180
  const { portalTarget } = useConfiguration();
179
- // Don't create additional Modal portals.
180
181
  const priorCtx = useContext(context);
181
- if (priorCtx[initializedKey])
182
- return _jsx(ModalManagerContext.Provider, Object.assign({ value: priorCtx }, { children: children }), void 0);
183
- return (_jsxs(ModalManagerContext.Provider, Object.assign({ value: providerValue }, { children: [children,
184
- modals.length > 0 &&
182
+ const priorCtxValue = useMemo(() => context === ModalManagerContext
183
+ ? priorCtx
184
+ : {
185
+ ...priorCtx,
186
+ create: (Comp, props, opts) => {
187
+ const WrappedComp = compProps => (_jsx(ModalManager, { context: context, children: _jsx(Comp, { ...compProps }, void 0) }, void 0));
188
+ return priorCtx.create(WrappedComp, props, opts);
189
+ }
190
+ }, [priorCtx, context]);
191
+ // Don't create additional Modal portals.
192
+ if (priorCtx[managerInitializedKey])
193
+ return (_jsx(ModalManagerContext.Provider, { value: priorCtxValue, children: children }, void 0));
194
+ return (_jsxs(ModalManagerContext.Provider, { value: providerValue, children: [children, modals.length > 0 &&
185
195
  portalTarget &&
186
- createPortal(_jsx(RenderModals, { modals: modals }, void 0), portalTarget)] }), void 0));
196
+ createPortal(_jsx(RenderModals, { modals: modals }, void 0), portalTarget)] }, void 0));
187
197
  };
188
198
  export default ModalManager;
189
199
  //# sourceMappingURL=ModalManager.js.map