@pega/cosmos-react-core 4.0.0-dev.1.2 → 4.0.0-dev.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (586) hide show
  1. package/lib/components/Actions/Actions.d.ts.map +1 -1
  2. package/lib/components/Actions/Actions.js +11 -5
  3. package/lib/components/Actions/Actions.js.map +1 -1
  4. package/lib/components/AdditionalInfo/AdditionalInfo.d.ts +2 -0
  5. package/lib/components/AdditionalInfo/AdditionalInfo.d.ts.map +1 -1
  6. package/lib/components/AdditionalInfo/AdditionalInfo.js +24 -15
  7. package/lib/components/AdditionalInfo/AdditionalInfo.js.map +1 -1
  8. package/lib/components/AppShell/AppHeader.d.ts.map +1 -1
  9. package/lib/components/AppShell/AppHeader.js +4 -3
  10. package/lib/components/AppShell/AppHeader.js.map +1 -1
  11. package/lib/components/AppShell/AppHeader.styles.d.ts +2 -0
  12. package/lib/components/AppShell/AppHeader.styles.d.ts.map +1 -1
  13. package/lib/components/AppShell/AppHeader.styles.js +43 -33
  14. package/lib/components/AppShell/AppHeader.styles.js.map +1 -1
  15. package/lib/components/AppShell/AppShell.d.ts.map +1 -1
  16. package/lib/components/AppShell/AppShell.js +37 -13
  17. package/lib/components/AppShell/AppShell.js.map +1 -1
  18. package/lib/components/AppShell/AppShell.styles.d.ts +4 -1
  19. package/lib/components/AppShell/AppShell.styles.d.ts.map +1 -1
  20. package/lib/components/AppShell/AppShell.styles.js +45 -14
  21. package/lib/components/AppShell/AppShell.styles.js.map +1 -1
  22. package/lib/components/AppShell/AppShell.types.d.ts +30 -0
  23. package/lib/components/AppShell/AppShell.types.d.ts.map +1 -1
  24. package/lib/components/AppShell/AppShell.types.js.map +1 -1
  25. package/lib/components/AppShell/AppShellContext.d.ts +2 -0
  26. package/lib/components/AppShell/AppShellContext.d.ts.map +1 -1
  27. package/lib/components/AppShell/AppShellContext.js +2 -0
  28. package/lib/components/AppShell/AppShellContext.js.map +1 -1
  29. package/lib/components/AppShell/AppShellList.d.ts +1 -1
  30. package/lib/components/AppShell/AppShellList.d.ts.map +1 -1
  31. package/lib/components/AppShell/AppShellList.js +6 -2
  32. package/lib/components/AppShell/AppShellList.js.map +1 -1
  33. package/lib/components/AppShell/AppShellList.styles.d.ts +1 -1
  34. package/lib/components/AppShell/AppShellList.styles.d.ts.map +1 -1
  35. package/lib/components/AppShell/AppShellList.styles.js +21 -19
  36. package/lib/components/AppShell/AppShellList.styles.js.map +1 -1
  37. package/lib/components/AppShell/AppShellSearch.styles.js +1 -1
  38. package/lib/components/AppShell/AppShellSearch.styles.js.map +1 -1
  39. package/lib/components/AppShell/ContextSwitcher.d.ts +6 -0
  40. package/lib/components/AppShell/ContextSwitcher.d.ts.map +1 -0
  41. package/lib/components/AppShell/ContextSwitcher.js +18 -0
  42. package/lib/components/AppShell/ContextSwitcher.js.map +1 -0
  43. package/lib/components/AppShell/Drawer.d.ts.map +1 -1
  44. package/lib/components/AppShell/Drawer.js +8 -9
  45. package/lib/components/AppShell/Drawer.js.map +1 -1
  46. package/lib/components/AppShell/Drawer.styles.d.ts.map +1 -1
  47. package/lib/components/AppShell/Drawer.styles.js +7 -4
  48. package/lib/components/AppShell/Drawer.styles.js.map +1 -1
  49. package/lib/components/AppShell/NavigationList.d.ts.map +1 -1
  50. package/lib/components/AppShell/NavigationList.js +15 -12
  51. package/lib/components/AppShell/NavigationList.js.map +1 -1
  52. package/lib/components/AppShell/NavigationListItemWrapper.d.ts.map +1 -1
  53. package/lib/components/AppShell/NavigationListItemWrapper.js +4 -2
  54. package/lib/components/AppShell/NavigationListItemWrapper.js.map +1 -1
  55. package/lib/components/AppShell/index.d.ts +2 -1
  56. package/lib/components/AppShell/index.d.ts.map +1 -1
  57. package/lib/components/AppShell/index.js +1 -0
  58. package/lib/components/AppShell/index.js.map +1 -1
  59. package/lib/components/Avatar/Avatar.d.ts +1 -1
  60. package/lib/components/Avatar/Avatar.d.ts.map +1 -1
  61. package/lib/components/Backdrop/Backdrop.d.ts.map +1 -1
  62. package/lib/components/Backdrop/Backdrop.js +22 -2
  63. package/lib/components/Backdrop/Backdrop.js.map +1 -1
  64. package/lib/components/Badges/Count.d.ts +2 -2
  65. package/lib/components/Badges/Count.d.ts.map +1 -1
  66. package/lib/components/Badges/Count.js +22 -25
  67. package/lib/components/Badges/Count.js.map +1 -1
  68. package/lib/components/Badges/Selection.js +1 -1
  69. package/lib/components/Badges/Selection.js.map +1 -1
  70. package/lib/components/Badges/Tag.js +1 -1
  71. package/lib/components/Badges/Tag.js.map +1 -1
  72. package/lib/components/Banner/Banner.d.ts +28 -21
  73. package/lib/components/Banner/Banner.d.ts.map +1 -1
  74. package/lib/components/Banner/Banner.js +138 -96
  75. package/lib/components/Banner/Banner.js.map +1 -1
  76. package/lib/components/Banner/index.d.ts +1 -1
  77. package/lib/components/Banner/index.d.ts.map +1 -1
  78. package/lib/components/Banner/index.js.map +1 -1
  79. package/lib/components/Button/Button.d.ts +1 -1
  80. package/lib/components/Button/Button.d.ts.map +1 -1
  81. package/lib/components/Card/Card.d.ts +4 -7
  82. package/lib/components/Card/Card.d.ts.map +1 -1
  83. package/lib/components/Card/Card.js +2 -9
  84. package/lib/components/Card/Card.js.map +1 -1
  85. package/lib/components/ComboBox/ComboBox.styles.d.ts.map +1 -1
  86. package/lib/components/ComboBox/ComboBox.styles.js +0 -3
  87. package/lib/components/ComboBox/ComboBox.styles.js.map +1 -1
  88. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.d.ts.map +1 -1
  89. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.js +1 -3
  90. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.js.map +1 -1
  91. package/lib/components/Configuration/Configuration.d.ts +4 -1
  92. package/lib/components/Configuration/Configuration.d.ts.map +1 -1
  93. package/lib/components/Configuration/Configuration.js +2 -0
  94. package/lib/components/Configuration/Configuration.js.map +1 -1
  95. package/lib/components/CreditCard/CreditCard.types.d.ts +1 -1
  96. package/lib/components/CreditCard/CreditCard.types.d.ts.map +1 -1
  97. package/lib/components/DateTime/DateTime.types.d.ts +10 -7
  98. package/lib/components/DateTime/DateTime.types.d.ts.map +1 -1
  99. package/lib/components/DateTime/DateTime.types.js.map +1 -1
  100. package/lib/components/DateTime/Input/DateInput.d.ts.map +1 -1
  101. package/lib/components/DateTime/Input/DateInput.js +19 -4
  102. package/lib/components/DateTime/Input/DateInput.js.map +1 -1
  103. package/lib/components/DateTime/Input/DateRangeInput.d.ts +4 -2
  104. package/lib/components/DateTime/Input/DateRangeInput.d.ts.map +1 -1
  105. package/lib/components/DateTime/Input/DateRangeInput.js +71 -34
  106. package/lib/components/DateTime/Input/DateRangeInput.js.map +1 -1
  107. package/lib/components/DateTime/Input/DateTimeInput.d.ts.map +1 -1
  108. package/lib/components/DateTime/Input/DateTimeInput.js +26 -5
  109. package/lib/components/DateTime/Input/DateTimeInput.js.map +1 -1
  110. package/lib/components/DateTime/Input/DayOfWeekInput.d.ts +1 -1
  111. package/lib/components/DateTime/Input/DayOfWeekInput.d.ts.map +1 -1
  112. package/lib/components/DateTime/Input/Duration/NumberUnit.d.ts +1 -1
  113. package/lib/components/DateTime/Input/Duration/NumberUnit.d.ts.map +1 -1
  114. package/lib/components/DateTime/Input/Duration/Time.d.ts +1 -1
  115. package/lib/components/DateTime/Input/Duration/Time.d.ts.map +1 -1
  116. package/lib/components/DateTime/Input/MonthInput.d.ts.map +1 -1
  117. package/lib/components/DateTime/Input/MonthInput.js +8 -3
  118. package/lib/components/DateTime/Input/MonthInput.js.map +1 -1
  119. package/lib/components/DateTime/Input/PartInput.d.ts.map +1 -1
  120. package/lib/components/DateTime/Input/PartInput.js +2 -2
  121. package/lib/components/DateTime/Input/PartInput.js.map +1 -1
  122. package/lib/components/DateTime/Input/TimeInput.d.ts.map +1 -1
  123. package/lib/components/DateTime/Input/TimeInput.js +13 -3
  124. package/lib/components/DateTime/Input/TimeInput.js.map +1 -1
  125. package/lib/components/DateTime/Input/TimeRangeInput.d.ts +4 -2
  126. package/lib/components/DateTime/Input/TimeRangeInput.d.ts.map +1 -1
  127. package/lib/components/DateTime/Input/TimeRangeInput.js +70 -27
  128. package/lib/components/DateTime/Input/TimeRangeInput.js.map +1 -1
  129. package/lib/components/DateTime/Input/WeekInput.d.ts.map +1 -1
  130. package/lib/components/DateTime/Input/WeekInput.js +7 -2
  131. package/lib/components/DateTime/Input/WeekInput.js.map +1 -1
  132. package/lib/components/DateTime/Input/usePickerButton.d.ts.map +1 -1
  133. package/lib/components/DateTime/Input/usePickerButton.js +19 -27
  134. package/lib/components/DateTime/Input/usePickerButton.js.map +1 -1
  135. package/lib/components/DateTime/Input/utils.d.ts +2 -2
  136. package/lib/components/DateTime/Input/utils.d.ts.map +1 -1
  137. package/lib/components/DateTime/Input/utils.js +6 -17
  138. package/lib/components/DateTime/Input/utils.js.map +1 -1
  139. package/lib/components/DateTime/Picker/Calendar.d.ts.map +1 -1
  140. package/lib/components/DateTime/Picker/Calendar.js +3 -1
  141. package/lib/components/DateTime/Picker/Calendar.js.map +1 -1
  142. package/lib/components/DateTime/Picker/DatePicker.d.ts.map +1 -1
  143. package/lib/components/DateTime/Picker/DatePicker.js +2 -8
  144. package/lib/components/DateTime/Picker/DatePicker.js.map +1 -1
  145. package/lib/components/DateTime/Picker/TimePicker.d.ts +1 -1
  146. package/lib/components/DateTime/Picker/TimePicker.d.ts.map +1 -1
  147. package/lib/components/DateTime/Picker/TimePicker.js +1 -1
  148. package/lib/components/DateTime/Picker/TimePicker.js.map +1 -1
  149. package/lib/components/Dialog/Dialog.d.ts +3 -30
  150. package/lib/components/Dialog/Dialog.d.ts.map +1 -1
  151. package/lib/components/Dialog/Dialog.js +7 -147
  152. package/lib/components/Dialog/Dialog.js.map +1 -1
  153. package/lib/components/Dialog/Dialog.styles.d.ts +3 -0
  154. package/lib/components/Dialog/Dialog.styles.d.ts.map +1 -0
  155. package/lib/components/Dialog/Dialog.styles.js +18 -0
  156. package/lib/components/Dialog/Dialog.styles.js.map +1 -0
  157. package/lib/components/Dialog/Dialog.types.d.ts +87 -0
  158. package/lib/components/Dialog/Dialog.types.d.ts.map +1 -0
  159. package/lib/components/Dialog/Dialog.types.js +3 -0
  160. package/lib/components/Dialog/Dialog.types.js.map +1 -0
  161. package/lib/components/Dialog/FormDialog.d.ts +7 -0
  162. package/lib/components/Dialog/FormDialog.d.ts.map +1 -0
  163. package/lib/components/Dialog/FormDialog.js +58 -0
  164. package/lib/components/Dialog/FormDialog.js.map +1 -0
  165. package/lib/components/Dialog/InfoDialog.d.ts +6 -0
  166. package/lib/components/Dialog/InfoDialog.d.ts.map +1 -0
  167. package/lib/components/Dialog/InfoDialog.js +43 -0
  168. package/lib/components/Dialog/InfoDialog.js.map +1 -0
  169. package/lib/components/Dialog/index.d.ts +3 -2
  170. package/lib/components/Dialog/index.d.ts.map +1 -1
  171. package/lib/components/Dialog/index.js +2 -2
  172. package/lib/components/Dialog/index.js.map +1 -1
  173. package/lib/components/Drawer/Drawer.d.ts +1 -1
  174. package/lib/components/Drawer/Drawer.d.ts.map +1 -1
  175. package/lib/components/EmojiPicker/EmojiPicker.d.ts +1 -1
  176. package/lib/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
  177. package/lib/components/FieldGroup/FieldGroup.d.ts.map +1 -1
  178. package/lib/components/FieldGroup/FieldGroup.js +2 -1
  179. package/lib/components/FieldGroup/FieldGroup.js.map +1 -1
  180. package/lib/components/FieldValueList/FieldValueList.d.ts +2 -2
  181. package/lib/components/FieldValueList/FieldValueList.d.ts.map +1 -1
  182. package/lib/components/FieldValueList/FieldValueList.js +5 -36
  183. package/lib/components/FieldValueList/FieldValueList.js.map +1 -1
  184. package/lib/components/FieldValueList/index.d.ts +1 -1
  185. package/lib/components/FieldValueList/index.d.ts.map +1 -1
  186. package/lib/components/FieldValueList/index.js.map +1 -1
  187. package/lib/components/File/utils.d.ts +1 -1
  188. package/lib/components/File/utils.d.ts.map +1 -1
  189. package/lib/components/Flex/Flex.d.ts +2 -2
  190. package/lib/components/Flex/Flex.d.ts.map +1 -1
  191. package/lib/components/FormControl/FormControl.d.ts +4 -0
  192. package/lib/components/FormControl/FormControl.d.ts.map +1 -1
  193. package/lib/components/FormControl/FormControl.js +3 -1
  194. package/lib/components/FormControl/FormControl.js.map +1 -1
  195. package/lib/components/FormControl/index.d.ts +1 -0
  196. package/lib/components/FormControl/index.d.ts.map +1 -1
  197. package/lib/components/FormControl/index.js.map +1 -1
  198. package/lib/components/Grid/Grid.types.d.ts +2 -2
  199. package/lib/components/Grid/Grid.types.d.ts.map +1 -1
  200. package/lib/components/HTML/HTML.d.ts.map +1 -1
  201. package/lib/components/HTML/HTML.js +1 -0
  202. package/lib/components/HTML/HTML.js.map +1 -1
  203. package/lib/components/Icon/iconNames.d.ts +2 -2
  204. package/lib/components/Icon/iconNames.d.ts.map +1 -1
  205. package/lib/components/Icon/iconNames.js +2 -0
  206. package/lib/components/Icon/iconNames.js.map +1 -1
  207. package/lib/components/Icon/icons/user-question-mark-solid.icon.d.ts +4 -0
  208. package/lib/components/Icon/icons/user-question-mark-solid.icon.d.ts.map +1 -0
  209. package/lib/components/Icon/icons/user-question-mark-solid.icon.js +6 -0
  210. package/lib/components/Icon/icons/user-question-mark-solid.icon.js.map +1 -0
  211. package/lib/components/Icon/icons/user-question-mark.icon.d.ts +4 -0
  212. package/lib/components/Icon/icons/user-question-mark.icon.d.ts.map +1 -0
  213. package/lib/components/Icon/icons/user-question-mark.icon.js +6 -0
  214. package/lib/components/Icon/icons/user-question-mark.icon.js.map +1 -0
  215. package/lib/components/Lightbox/Lightbox.styles.js +2 -2
  216. package/lib/components/Lightbox/Lightbox.styles.js.map +1 -1
  217. package/lib/components/Link/Link.d.ts.map +1 -1
  218. package/lib/components/Link/Link.js +13 -4
  219. package/lib/components/Link/Link.js.map +1 -1
  220. package/lib/components/List/CommaSeparatedList.d.ts.map +1 -1
  221. package/lib/components/List/CommaSeparatedList.js +5 -37
  222. package/lib/components/List/CommaSeparatedList.js.map +1 -1
  223. package/lib/components/List/List.d.ts.map +1 -1
  224. package/lib/components/List/List.js +11 -1
  225. package/lib/components/List/List.js.map +1 -1
  226. package/lib/components/ListToolbar/ListToolbar.d.ts.map +1 -1
  227. package/lib/components/ListToolbar/ListToolbar.js +106 -68
  228. package/lib/components/ListToolbar/ListToolbar.js.map +1 -1
  229. package/lib/components/ListToolbar/ListToolbar.styles.d.ts +5 -1
  230. package/lib/components/ListToolbar/ListToolbar.styles.d.ts.map +1 -1
  231. package/lib/components/ListToolbar/ListToolbar.styles.js +50 -5
  232. package/lib/components/ListToolbar/ListToolbar.styles.js.map +1 -1
  233. package/lib/components/ListToolbar/ListToolbar.types.d.ts +5 -5
  234. package/lib/components/ListToolbar/ListToolbar.types.d.ts.map +1 -1
  235. package/lib/components/ListToolbar/ListToolbar.types.js.map +1 -1
  236. package/lib/components/LiveLog/Context.d.ts +3 -0
  237. package/lib/components/LiveLog/Context.d.ts.map +1 -0
  238. package/lib/components/LiveLog/Context.js +9 -0
  239. package/lib/components/LiveLog/Context.js.map +1 -0
  240. package/lib/components/LiveLog/LiveLog.d.ts +10 -0
  241. package/lib/components/LiveLog/LiveLog.d.ts.map +1 -0
  242. package/lib/components/LiveLog/LiveLog.js +99 -0
  243. package/lib/components/LiveLog/LiveLog.js.map +1 -0
  244. package/lib/components/LiveLog/LiveLog.styles.d.ts +3 -0
  245. package/lib/components/LiveLog/LiveLog.styles.d.ts.map +1 -0
  246. package/lib/components/LiveLog/LiveLog.styles.js +9 -0
  247. package/lib/components/LiveLog/LiveLog.styles.js.map +1 -0
  248. package/lib/components/LiveLog/LiveLog.types.d.ts +93 -0
  249. package/lib/components/LiveLog/LiveLog.types.d.ts.map +1 -0
  250. package/lib/components/LiveLog/LiveLog.types.js +2 -0
  251. package/lib/components/LiveLog/LiveLog.types.js.map +1 -0
  252. package/lib/components/LiveLog/index.d.ts +4 -0
  253. package/lib/components/LiveLog/index.d.ts.map +1 -0
  254. package/lib/components/LiveLog/index.js +3 -0
  255. package/lib/components/LiveLog/index.js.map +1 -0
  256. package/lib/components/Location/CurrentLocationButton.d.ts +1 -1
  257. package/lib/components/Location/CurrentLocationButton.d.ts.map +1 -1
  258. package/lib/components/Location/LocationInput.d.ts.map +1 -1
  259. package/lib/components/Location/LocationInput.js +1 -2
  260. package/lib/components/Location/LocationInput.js.map +1 -1
  261. package/lib/components/Location/LocationView.d.ts.map +1 -1
  262. package/lib/components/Location/LocationView.js +4 -4
  263. package/lib/components/Location/LocationView.js.map +1 -1
  264. package/lib/components/Location/MapsContext.d.ts +1 -1
  265. package/lib/components/Location/MapsContext.d.ts.map +1 -1
  266. package/lib/components/Location/utils.d.ts +1 -1
  267. package/lib/components/Location/utils.d.ts.map +1 -1
  268. package/lib/components/Location/utils.js.map +1 -1
  269. package/lib/components/Menu/Menu.js +3 -3
  270. package/lib/components/Menu/Menu.js.map +1 -1
  271. package/lib/components/Menu/Menu.styles.js +1 -1
  272. package/lib/components/Menu/Menu.styles.js.map +1 -1
  273. package/lib/components/Menu/Menu.types.d.ts +3 -5
  274. package/lib/components/Menu/Menu.types.d.ts.map +1 -1
  275. package/lib/components/Menu/Menu.types.js.map +1 -1
  276. package/lib/components/Menu/MenuList.d.ts.map +1 -1
  277. package/lib/components/Menu/MenuList.js +4 -3
  278. package/lib/components/Menu/MenuList.js.map +1 -1
  279. package/lib/components/MenuButton/MenuButton.d.ts.map +1 -1
  280. package/lib/components/MenuButton/MenuButton.js +18 -4
  281. package/lib/components/MenuButton/MenuButton.js.map +1 -1
  282. package/lib/components/Modal/Modal.d.ts.map +1 -1
  283. package/lib/components/Modal/Modal.js +6 -8
  284. package/lib/components/Modal/Modal.js.map +1 -1
  285. package/lib/components/Modal/Modal.types.d.ts +2 -1
  286. package/lib/components/Modal/Modal.types.d.ts.map +1 -1
  287. package/lib/components/Modal/Modal.types.js.map +1 -1
  288. package/lib/components/Number/NumberInput.types.d.ts +3 -1
  289. package/lib/components/Number/NumberInput.types.d.ts.map +1 -1
  290. package/lib/components/Number/NumberInput.types.js.map +1 -1
  291. package/lib/components/Number/NumberRangeInput.d.ts.map +1 -1
  292. package/lib/components/Number/NumberRangeInput.js +71 -4
  293. package/lib/components/Number/NumberRangeInput.js.map +1 -1
  294. package/lib/components/PageTemplates/CategorySubPage.d.ts.map +1 -1
  295. package/lib/components/PageTemplates/CategorySubPage.js +15 -4
  296. package/lib/components/PageTemplates/CategorySubPage.js.map +1 -1
  297. package/lib/components/PageTemplates/CategorySubPage.styles.d.ts.map +1 -1
  298. package/lib/components/PageTemplates/CategorySubPage.styles.js +5 -0
  299. package/lib/components/PageTemplates/CategorySubPage.styles.js.map +1 -1
  300. package/lib/components/PageTemplates/DashboardPage.d.ts.map +1 -1
  301. package/lib/components/PageTemplates/DashboardPage.js +16 -2
  302. package/lib/components/PageTemplates/DashboardPage.js.map +1 -1
  303. package/lib/components/PageTemplates/PageTemplates.d.ts.map +1 -1
  304. package/lib/components/PageTemplates/PageTemplates.js +20 -3
  305. package/lib/components/PageTemplates/PageTemplates.js.map +1 -1
  306. package/lib/components/Popover/Popover.d.ts +1 -1
  307. package/lib/components/Popover/Popover.d.ts.map +1 -1
  308. package/lib/components/Popover/Popover.js +2 -5
  309. package/lib/components/Popover/Popover.js.map +1 -1
  310. package/lib/components/Popover/Popover.styles.d.ts +0 -1
  311. package/lib/components/Popover/Popover.styles.d.ts.map +1 -1
  312. package/lib/components/Popover/Popover.styles.js +0 -6
  313. package/lib/components/Popover/Popover.styles.js.map +1 -1
  314. package/lib/components/Popover/modifiers.d.ts +0 -2
  315. package/lib/components/Popover/modifiers.d.ts.map +1 -1
  316. package/lib/components/Popover/modifiers.js +1 -32
  317. package/lib/components/Popover/modifiers.js.map +1 -1
  318. package/lib/components/Progress/Bar.d.ts +0 -3
  319. package/lib/components/Progress/Bar.d.ts.map +1 -1
  320. package/lib/components/Progress/Bar.js +1 -54
  321. package/lib/components/Progress/Bar.js.map +1 -1
  322. package/lib/components/Progress/Ellipsis.d.ts +0 -1
  323. package/lib/components/Progress/Ellipsis.d.ts.map +1 -1
  324. package/lib/components/Progress/Ellipsis.js +1 -72
  325. package/lib/components/Progress/Ellipsis.js.map +1 -1
  326. package/lib/components/Progress/Progress.d.ts.map +1 -1
  327. package/lib/components/Progress/Progress.js +99 -60
  328. package/lib/components/Progress/Progress.js.map +1 -1
  329. package/lib/components/Progress/Progress.styles.d.ts +12 -0
  330. package/lib/components/Progress/Progress.styles.d.ts.map +1 -0
  331. package/lib/components/Progress/Progress.styles.js +217 -0
  332. package/lib/components/Progress/Progress.styles.js.map +1 -0
  333. package/lib/components/Progress/Progress.types.d.ts +19 -2
  334. package/lib/components/Progress/Progress.types.d.ts.map +1 -1
  335. package/lib/components/Progress/Progress.types.js.map +1 -1
  336. package/lib/components/Progress/Ring.d.ts +0 -3
  337. package/lib/components/Progress/Ring.d.ts.map +1 -1
  338. package/lib/components/Progress/Ring.js +1 -58
  339. package/lib/components/Progress/Ring.js.map +1 -1
  340. package/lib/components/Progress/index.d.ts +1 -3
  341. package/lib/components/Progress/index.d.ts.map +1 -1
  342. package/lib/components/Progress/index.js +1 -3
  343. package/lib/components/Progress/index.js.map +1 -1
  344. package/lib/components/QRCode/QRCode.d.ts +14 -0
  345. package/lib/components/QRCode/QRCode.d.ts.map +1 -0
  346. package/lib/components/QRCode/QRCode.js +39 -0
  347. package/lib/components/QRCode/QRCode.js.map +1 -0
  348. package/lib/components/QRCode/index.d.ts +3 -0
  349. package/lib/components/QRCode/index.d.ts.map +1 -0
  350. package/lib/components/QRCode/index.js +2 -0
  351. package/lib/components/QRCode/index.js.map +1 -0
  352. package/lib/components/RadioCheck/RadioCheck.js +1 -1
  353. package/lib/components/RadioCheck/RadioCheck.js.map +1 -1
  354. package/lib/components/SearchInput/SearchInput.d.ts +2 -2
  355. package/lib/components/SearchInput/SearchInput.d.ts.map +1 -1
  356. package/lib/components/SearchInput/SearchInput.js +28 -8
  357. package/lib/components/SearchInput/SearchInput.js.map +1 -1
  358. package/lib/components/SearchInput/SearchInput.styles.js +1 -1
  359. package/lib/components/SearchInput/SearchInput.styles.js.map +1 -1
  360. package/lib/components/ShowMoreLess/ShowMoreLess.d.ts +9 -0
  361. package/lib/components/ShowMoreLess/ShowMoreLess.d.ts.map +1 -0
  362. package/lib/components/ShowMoreLess/ShowMoreLess.js +41 -0
  363. package/lib/components/ShowMoreLess/ShowMoreLess.js.map +1 -0
  364. package/lib/components/ShowMoreLess/index.d.ts +3 -0
  365. package/lib/components/ShowMoreLess/index.d.ts.map +1 -0
  366. package/lib/components/ShowMoreLess/index.js +2 -0
  367. package/lib/components/ShowMoreLess/index.js.map +1 -0
  368. package/lib/components/SkipLinks/SkipLinks.d.ts.map +1 -1
  369. package/lib/components/SkipLinks/SkipLinks.js +3 -26
  370. package/lib/components/SkipLinks/SkipLinks.js.map +1 -1
  371. package/lib/components/Slider/Slider.styles.d.ts +1 -1
  372. package/lib/components/Slider/Slider.styles.d.ts.map +1 -1
  373. package/lib/components/Tabs/Tab.js +2 -2
  374. package/lib/components/Tabs/Tab.js.map +1 -1
  375. package/lib/components/Tabs/Tabs.d.ts.map +1 -1
  376. package/lib/components/Tabs/Tabs.js +8 -10
  377. package/lib/components/Tabs/Tabs.js.map +1 -1
  378. package/lib/components/TextArea/TextArea.js +2 -2
  379. package/lib/components/TextArea/TextArea.js.map +1 -1
  380. package/lib/components/Toaster/Context.d.ts +1 -0
  381. package/lib/components/Toaster/Context.d.ts.map +1 -1
  382. package/lib/components/Toaster/Context.js.map +1 -1
  383. package/lib/components/Toaster/Toaster.d.ts.map +1 -1
  384. package/lib/components/Toaster/Toaster.js +6 -2
  385. package/lib/components/Toaster/Toaster.js.map +1 -1
  386. package/lib/components/Tree/StandardTree.d.ts.map +1 -1
  387. package/lib/components/Tree/StandardTree.js +70 -27
  388. package/lib/components/Tree/StandardTree.js.map +1 -1
  389. package/lib/components/Tree/StandardTree.styles.d.ts +1 -0
  390. package/lib/components/Tree/StandardTree.styles.d.ts.map +1 -1
  391. package/lib/components/Tree/StandardTree.styles.js +32 -18
  392. package/lib/components/Tree/StandardTree.styles.js.map +1 -1
  393. package/lib/components/Tree/StandardTree.types.d.ts +28 -1
  394. package/lib/components/Tree/StandardTree.types.d.ts.map +1 -1
  395. package/lib/components/Tree/StandardTree.types.js.map +1 -1
  396. package/lib/components/Tree/Tree.d.ts +2 -2
  397. package/lib/components/Tree/Tree.d.ts.map +1 -1
  398. package/lib/components/Tree/helpers.d.ts +11 -9
  399. package/lib/components/Tree/helpers.d.ts.map +1 -1
  400. package/lib/components/Tree/helpers.js +25 -5
  401. package/lib/components/Tree/helpers.js.map +1 -1
  402. package/lib/components/Tree/index.d.ts +1 -1
  403. package/lib/components/Tree/index.d.ts.map +1 -1
  404. package/lib/components/Tree/index.js.map +1 -1
  405. package/lib/components/URL/URLDisplay.d.ts +2 -2
  406. package/lib/components/URL/URLDisplay.d.ts.map +1 -1
  407. package/lib/components/URL/URLDisplay.js +8 -1
  408. package/lib/components/URL/URLDisplay.js.map +1 -1
  409. package/lib/hooks/index.d.ts +1 -0
  410. package/lib/hooks/index.d.ts.map +1 -1
  411. package/lib/hooks/index.js +1 -0
  412. package/lib/hooks/index.js.map +1 -1
  413. package/lib/hooks/useActiveDescendant.d.ts +2 -2
  414. package/lib/hooks/useActiveDescendant.d.ts.map +1 -1
  415. package/lib/hooks/useArrows.d.ts.map +1 -1
  416. package/lib/hooks/useArrows.js +3 -3
  417. package/lib/hooks/useArrows.js.map +1 -1
  418. package/lib/hooks/useBreakpoint.d.ts.map +1 -1
  419. package/lib/hooks/useBreakpoint.js +3 -2
  420. package/lib/hooks/useBreakpoint.js.map +1 -1
  421. package/lib/hooks/useEvent.d.ts +2 -2
  422. package/lib/hooks/useEvent.d.ts.map +1 -1
  423. package/lib/hooks/useI18n.d.ts +88 -19
  424. package/lib/hooks/useI18n.d.ts.map +1 -1
  425. package/lib/hooks/useLiveLog.d.ts +8 -0
  426. package/lib/hooks/useLiveLog.d.ts.map +1 -0
  427. package/lib/hooks/useLiveLog.js +16 -0
  428. package/lib/hooks/useLiveLog.js.map +1 -0
  429. package/lib/hooks/useOverride.d.ts +1 -1
  430. package/lib/hooks/useOverride.d.ts.map +1 -1
  431. package/lib/hooks/useScrollStick.d.ts +1 -1
  432. package/lib/hooks/useScrollStick.d.ts.map +1 -1
  433. package/lib/i18n/default.d.ts +88 -19
  434. package/lib/i18n/default.d.ts.map +1 -1
  435. package/lib/i18n/default.js +98 -27
  436. package/lib/i18n/default.js.map +1 -1
  437. package/lib/i18n/i18n.d.ts +90 -21
  438. package/lib/i18n/i18n.d.ts.map +1 -1
  439. package/lib/i18n/translate.d.ts +1 -1
  440. package/lib/i18n/translate.d.ts.map +1 -1
  441. package/lib/index.d.ts +6 -1
  442. package/lib/index.d.ts.map +1 -1
  443. package/lib/index.js +6 -1
  444. package/lib/index.js.map +1 -1
  445. package/lib/register-contexts.js +2 -0
  446. package/lib/register-contexts.js.map +1 -1
  447. package/lib/styles/gradients.d.ts +1 -1
  448. package/lib/styles/gradients.d.ts.map +1 -1
  449. package/lib/styles/utils.d.ts +1 -1
  450. package/lib/styles/utils.d.ts.map +1 -1
  451. package/lib/styles/utils.js +10 -10
  452. package/lib/styles/utils.js.map +1 -1
  453. package/lib/theme/ThemeMachine.d.ts +3 -3
  454. package/lib/theme/ThemeMachine.d.ts.map +1 -1
  455. package/lib/theme/ThemeMachine.js +30 -30
  456. package/lib/theme/ThemeMachine.js.map +1 -1
  457. package/lib/theme/theme.d.ts +45 -75
  458. package/lib/theme/theme.d.ts.map +1 -1
  459. package/lib/theme/themeDefinition.json +14 -30
  460. package/lib/theme/themeOverrides.schema.json +1 -4
  461. package/lib/theme/themes/darkTheme.json +4 -1
  462. package/lib/theme/themes/legacyBuildTheme.json +2 -3
  463. package/lib/types/types.d.ts +19 -11
  464. package/lib/types/types.d.ts.map +1 -1
  465. package/lib/types/types.js.map +1 -1
  466. package/lib/utils/bindAll.d.ts +4 -0
  467. package/lib/utils/bindAll.d.ts.map +1 -0
  468. package/lib/utils/bindAll.js +9 -0
  469. package/lib/utils/bindAll.js.map +1 -0
  470. package/lib/utils/cap.d.ts +4 -0
  471. package/lib/utils/cap.d.ts.map +1 -0
  472. package/lib/utils/cap.js +6 -0
  473. package/lib/utils/cap.js.map +1 -0
  474. package/lib/utils/createStringMatcher.d.ts +10 -0
  475. package/lib/utils/createStringMatcher.d.ts.map +1 -0
  476. package/lib/utils/createStringMatcher.js +21 -0
  477. package/lib/utils/createStringMatcher.js.map +1 -0
  478. package/lib/utils/createUID.d.ts +4 -0
  479. package/lib/utils/createUID.d.ts.map +1 -0
  480. package/lib/utils/createUID.js +6 -0
  481. package/lib/utils/createUID.js.map +1 -0
  482. package/lib/utils/debounce.d.ts +4 -0
  483. package/lib/utils/debounce.d.ts.map +1 -0
  484. package/lib/utils/debounce.js +14 -0
  485. package/lib/utils/debounce.js.map +1 -0
  486. package/lib/utils/deepGet.d.ts +3 -0
  487. package/lib/utils/deepGet.d.ts.map +1 -0
  488. package/lib/utils/deepGet.js +15 -0
  489. package/lib/utils/deepGet.js.map +1 -0
  490. package/lib/utils/deepObjectComparison.d.ts +4 -0
  491. package/lib/utils/deepObjectComparison.d.ts.map +1 -0
  492. package/lib/utils/deepObjectComparison.js +35 -0
  493. package/lib/utils/deepObjectComparison.js.map +1 -0
  494. package/lib/utils/defineSmartGetter.d.ts +3 -0
  495. package/lib/utils/defineSmartGetter.d.ts.map +1 -0
  496. package/lib/utils/defineSmartGetter.js +14 -0
  497. package/lib/utils/defineSmartGetter.js.map +1 -0
  498. package/lib/utils/documentIsAvailable.d.ts +3 -0
  499. package/lib/utils/documentIsAvailable.d.ts.map +1 -0
  500. package/lib/utils/documentIsAvailable.js +3 -0
  501. package/lib/utils/documentIsAvailable.js.map +1 -0
  502. package/lib/utils/escapeRegExp.d.ts +8 -0
  503. package/lib/utils/escapeRegExp.d.ts.map +1 -0
  504. package/lib/utils/escapeRegExp.js +8 -0
  505. package/lib/utils/escapeRegExp.js.map +1 -0
  506. package/lib/utils/focusHeadingOrContainer.d.ts +8 -0
  507. package/lib/utils/focusHeadingOrContainer.d.ts.map +1 -0
  508. package/lib/utils/focusHeadingOrContainer.js +29 -0
  509. package/lib/utils/focusHeadingOrContainer.js.map +1 -0
  510. package/lib/utils/formatListToLocaleString.d.ts +15 -0
  511. package/lib/utils/formatListToLocaleString.d.ts.map +1 -0
  512. package/lib/utils/formatListToLocaleString.js +17 -0
  513. package/lib/utils/formatListToLocaleString.js.map +1 -0
  514. package/lib/utils/getActiveElement.d.ts +8 -0
  515. package/lib/utils/getActiveElement.d.ts.map +1 -0
  516. package/lib/utils/getActiveElement.js +18 -0
  517. package/lib/utils/getActiveElement.js.map +1 -0
  518. package/lib/utils/getFocusables.d.ts +9 -0
  519. package/lib/utils/getFocusables.d.ts.map +1 -0
  520. package/lib/utils/getFocusables.js +15 -0
  521. package/lib/utils/getFocusables.js.map +1 -0
  522. package/lib/utils/getScrollbarWidth.d.ts +4 -0
  523. package/lib/utils/getScrollbarWidth.d.ts.map +1 -0
  524. package/lib/utils/getScrollbarWidth.js +17 -0
  525. package/lib/utils/getScrollbarWidth.js.map +1 -0
  526. package/lib/utils/hasProp.d.ts +4 -0
  527. package/lib/utils/hasProp.d.ts.map +1 -0
  528. package/lib/utils/hasProp.js +6 -0
  529. package/lib/utils/hasProp.js.map +1 -0
  530. package/lib/utils/index.d.ts +27 -1
  531. package/lib/utils/index.d.ts.map +1 -1
  532. package/lib/utils/index.js +27 -1
  533. package/lib/utils/index.js.map +1 -1
  534. package/lib/utils/loadScript.d.ts +3 -0
  535. package/lib/utils/loadScript.d.ts.map +1 -0
  536. package/lib/utils/loadScript.js +9 -0
  537. package/lib/utils/loadScript.js.map +1 -0
  538. package/lib/utils/navigatorIsAvailable.d.ts +3 -0
  539. package/lib/utils/navigatorIsAvailable.d.ts.map +1 -0
  540. package/lib/utils/navigatorIsAvailable.js +3 -0
  541. package/lib/utils/navigatorIsAvailable.js.map +1 -0
  542. package/lib/utils/normalizeElements.d.ts +9 -0
  543. package/lib/utils/normalizeElements.d.ts.map +1 -0
  544. package/lib/utils/normalizeElements.js +14 -0
  545. package/lib/utils/normalizeElements.js.map +1 -0
  546. package/lib/utils/range.d.ts +4 -0
  547. package/lib/utils/range.d.ts.map +1 -0
  548. package/lib/utils/range.js +8 -0
  549. package/lib/utils/range.js.map +1 -0
  550. package/lib/utils/reflow.d.ts +4 -0
  551. package/lib/utils/reflow.d.ts.map +1 -0
  552. package/lib/utils/reflow.js +7 -0
  553. package/lib/utils/reflow.js.map +1 -0
  554. package/lib/utils/replaceMatchWithElement.d.ts +4 -0
  555. package/lib/utils/replaceMatchWithElement.d.ts.map +1 -0
  556. package/lib/utils/replaceMatchWithElement.js +32 -0
  557. package/lib/utils/replaceMatchWithElement.js.map +1 -0
  558. package/lib/utils/sameOrigin.d.ts +7 -0
  559. package/lib/utils/sameOrigin.d.ts.map +1 -0
  560. package/lib/utils/sameOrigin.js +25 -0
  561. package/lib/utils/sameOrigin.js.map +1 -0
  562. package/lib/utils/testElForOverflow.d.ts +4 -0
  563. package/lib/utils/testElForOverflow.d.ts.map +1 -0
  564. package/lib/utils/testElForOverflow.js +6 -0
  565. package/lib/utils/testElForOverflow.js.map +1 -0
  566. package/lib/utils/triple.d.ts +12 -0
  567. package/lib/utils/triple.d.ts.map +1 -0
  568. package/lib/utils/triple.js +13 -0
  569. package/lib/utils/triple.js.map +1 -0
  570. package/lib/utils/tryCatch.d.ts +5 -0
  571. package/lib/utils/tryCatch.d.ts.map +1 -0
  572. package/lib/utils/tryCatch.js +16 -0
  573. package/lib/utils/tryCatch.js.map +1 -0
  574. package/lib/utils/windowIsAvailable.d.ts +3 -0
  575. package/lib/utils/windowIsAvailable.d.ts.map +1 -0
  576. package/lib/utils/windowIsAvailable.js +3 -0
  577. package/lib/utils/windowIsAvailable.js.map +1 -0
  578. package/package.json +4 -2
  579. package/lib/components/ListToolbar/QueryOptionPopover.d.ts +0 -12
  580. package/lib/components/ListToolbar/QueryOptionPopover.d.ts.map +0 -1
  581. package/lib/components/ListToolbar/QueryOptionPopover.js +0 -36
  582. package/lib/components/ListToolbar/QueryOptionPopover.js.map +0 -1
  583. package/lib/utils/utils.d.ts +0 -93
  584. package/lib/utils/utils.d.ts.map +0 -1
  585. package/lib/utils/utils.js +0 -287
  586. package/lib/utils/utils.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  import { FunctionComponent } from 'react';
2
2
  import { BaseProps, ForwardProps } from '../../../types';
3
3
  import { ClockFormat } from '../Input/utils';
4
- export declare type MinuteInterval = 15 | 30 | 60;
4
+ export type MinuteInterval = 15 | 30 | 60;
5
5
  export interface TimePickerProps extends BaseProps {
6
6
  /**
7
7
  * Defines default time that will be selected when the Time Picker is opened.
@@ -1 +1 @@
1
- {"version":3,"file":"TimePicker.d.ts","sourceRoot":"","sources":["../../../../src/components/DateTime/Picker/TimePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAA2C,MAAM,OAAO,CAAC;AAInF,OAAO,EAAE,SAAS,EAAU,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAGjE,OAAO,EAAE,WAAW,EAAoB,MAAM,gBAAgB,CAAC;AAI/D,oBAAY,cAAc,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAE1C,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD;;;OAGG;IACH,QAAQ,CAAC,EAAE,IAAI,CAAC;IAChB,kDAAkD;IAClD,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAC/B;;;OAGG;IACH,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B;;OAEG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAqDD,QAAA,MAAM,UAAU,EAAE,iBAAiB,CAAC,eAAe,GAAG,YAAY,CA+GjE,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"TimePicker.d.ts","sourceRoot":"","sources":["../../../../src/components/DateTime/Picker/TimePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAA2C,MAAM,OAAO,CAAC;AAInF,OAAO,EAAE,SAAS,EAAU,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAGjE,OAAO,EAAE,WAAW,EAAoB,MAAM,gBAAgB,CAAC;AAI/D,MAAM,MAAM,cAAc,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAE1C,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD;;;OAGG;IACH,QAAQ,CAAC,EAAE,IAAI,CAAC;IAChB,kDAAkD;IAClD,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAC/B;;;OAGG;IACH,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B;;OAEG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAqDD,QAAA,MAAM,UAAU,EAAE,iBAAiB,CAAC,eAAe,GAAG,YAAY,CA+GjE,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -42,7 +42,7 @@ const StyledTimeButton = styled.button `
42
42
 
43
43
  &:enabled:focus,
44
44
  &:not([disabled]):focus {
45
- box-shadow: inset ${props => props.theme.base.shadow.focus};
45
+ box-shadow: ${props => props.theme.base.shadow['focus-inset']};
46
46
  }
47
47
  `;
48
48
  StyledTimeButton.defaultProps = defaultThemeProp;
@@ -1 +1 @@
1
- {"version":3,"file":"TimePicker.js","sourceRoot":"","sources":["../../../../src/components/DateTime/Picker/TimePicker.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAqB,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACnF,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,MAAM,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,UAAU,EA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from 'styled-components';\n\nimport { defaultThemeProp } from '../../../theme';\nimport { BaseProps, Action, ForwardProps } from '../../../types';\nimport Button from '../../Button';\nimport { useArrows, useConfiguration, useElement } from '../../../hooks';\nimport { ClockFormat, is12HClockFormat } from '../Input/utils';\n\nimport { getIntervalGenerator } from './utils';\n\nexport type MinuteInterval = 15 | 30 | 60;\n\nexport interface TimePickerProps extends BaseProps {\n /**\n * Defines default time that will be selected when the Time Picker is opened.\n * @default new Date()\n */\n selected?: Date;\n /** Callback fired when selected value changes. */\n onSelect: (date: Date) => void;\n /**\n * Defines interval for time picker options (in minutes).\n * @default 30\n */\n interval?: MinuteInterval;\n /**\n * Defines clock format that overrides locale based format\n */\n clockFormat?: ClockFormat;\n}\n\nconst StyledTimePicker = styled.ul`\n list-style: none;\n max-height: 10rem;\n overflow: auto;\n width: 100%;\n`;\n\nStyledTimePicker.defaultProps = defaultThemeProp;\n\nconst StyledTimeButton = styled.button<TimePickerProps>`\n color: black;\n width: 100%;\n border-radius: inherit;\n overflow: hidden;\n text-align: start;\n text-overflow: ellipsis;\n white-space: nowrap;\n border-width: 0;\n justify-content: start;\n padding: 0;\n background-color: ${props =>\n props.selected ? props.theme.base.colors.blue['extra-light'] : 'transparent'};\n\n > span {\n margin-inline-end: 0.125rem;\n &:first-child {\n margin-inline-start: ${({ theme }) => theme.components['form-control']['border-width']};\n }\n &:nth-child(2) {\n margin-inline-start: 0.125rem;\n }\n &:first-child,\n &:nth-child(3) {\n padding-inline-start: 0.5rem;\n }\n }\n\n &:enabled:focus,\n &:not([disabled]):focus {\n box-shadow: inset ${props => props.theme.base.shadow.focus};\n }\n`;\n\nStyledTimeButton.defaultProps = defaultThemeProp;\n\nconst StyledTimeItem = styled.li`\n border-radius: 0;\n`;\n\nStyledTimeItem.defaultProps = defaultThemeProp;\n\nconst TimePicker: FunctionComponent<TimePickerProps & ForwardProps> = (props: TimePickerProps) => {\n const { locale } = useConfiguration();\n const { selected = new Date(0), interval = 30, clockFormat, onSelect, ...restProps } = props;\n\n const intervalInMS = interval * 60000;\n\n const { hourCycle: defaultHourCycle } = useMemo(\n () =>\n new Intl.DateTimeFormat(locale, {\n hour: '2-digit',\n hour12: clockFormat ? clockFormat === 12 : is12HClockFormat(locale)\n }).resolvedOptions(),\n [clockFormat, locale]\n );\n\n const actionsList = Array.from(getIntervalGenerator(intervalInMS), time => {\n const date = new Date(selected);\n date.setUTCHours(time.getUTCHours(), time.getUTCMinutes());\n return {\n id: date.getTime().toString(),\n text: Intl.DateTimeFormat(locale, {\n hour: '2-digit',\n minute: '2-digit',\n timeZone: 'UTC',\n /** Use this to fix Chrome https://bugs.chromium.org/p/chromium/issues/detail?id=1045791 */\n hourCycle: defaultHourCycle === 'h24' ? 'h23' : defaultHourCycle\n }).format(date)\n };\n });\n\n const isSelected = (date: Date) => {\n return (\n selected?.getUTCHours() === date.getUTCHours() &&\n selected?.getUTCMinutes() === date.getUTCMinutes()\n );\n };\n\n const [buttonEl, setButtonEl] = useElement<HTMLElement>();\n const menuRef = useRef<HTMLUListElement>(null);\n\n useArrows(menuRef, {\n selector: 'button',\n cycle: true,\n dir: 'up-down',\n allowTabFocus: false\n });\n\n const renderTime = (text: string) => {\n const [hour, minute, meridiem] = text.split(/:| /);\n return (\n <>\n <span>{hour}</span>:<span>{minute}</span>\n {meridiem && <span>{meridiem}</span>}\n </>\n );\n };\n\n const setTabIndexes = useCallback(() => {\n const focusEl = menuRef.current;\n if (!focusEl) return;\n const focusableElements = Array.from(focusEl.querySelectorAll('button'));\n\n if (focusableElements.length > 0) {\n let isChecked = false;\n focusableElements.slice(1).forEach(item => {\n const checked = (item as HTMLInputElement).checked;\n if (checked) {\n isChecked = true;\n item.tabIndex = 0;\n } else item.tabIndex = -1;\n });\n\n if (!isChecked) {\n (focusableElements[0] as HTMLElement).tabIndex = 0;\n focusableElements[0].focus();\n }\n }\n }, [selected]);\n\n useEffect(() => {\n buttonEl?.focus();\n setTabIndexes();\n }, [buttonEl]);\n\n return (\n <StyledTimePicker role='menu' tabIndex={-1} ref={menuRef} {...restProps}>\n {actionsList.map(({ text, id }: Action) => {\n const item = new Date(Number(id));\n return (\n <StyledTimeItem role='presentation' key={id}>\n <StyledTimeButton\n role='menuitem'\n as={Button}\n variant='simple'\n ref={isSelected(item) ? setButtonEl : null}\n aria-label={text}\n selected={isSelected(item)}\n aria-current={isSelected(item) ? 'time' : undefined}\n checked={isSelected(item)}\n onClick={() => {\n onSelect?.(item);\n }}\n tabIndex='-1'\n >\n {renderTime(text)}\n </StyledTimeButton>\n </StyledTimeItem>\n );\n })}\n </StyledTimePicker>\n );\n};\n\nexport default TimePicker;\n"]}
1
+ {"version":3,"file":"TimePicker.js","sourceRoot":"","sources":["../../../../src/components/DateTime/Picker/TimePicker.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAqB,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACnF,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,MAAM,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAe,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAE/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAuB/C,MAAM,gBAAgB,GAAG,MAAM,CAAC,EAAE,CAAA;;;;;CAKjC,CAAC;AAEF,gBAAgB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEjD,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAiB;;;;;;;;;;;sBAWjC,KAAK,CAAC,EAAE,CAC1B,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,aAAa;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CAAC,EAAE,CAAC,CAAC,CAAC;YAClC,OAAO,CACL,KAAC,cAAc,IAAC,IAAI,EAAC,cAAc,YACjC,KAAC,gBAAgB,IACf,IAAI,EAAC,UAAU,EACf,EAAE,EAAE,MAAM,EACV,OAAO,EAAC,QAAQ,EAChB,GAAG,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,gBAC9B,IAAI,EAChB,QAAQ,EAAE,UAAU,CAAC,IAAI,CAAC,kBACZ,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,EACnD,OAAO,EAAE,UAAU,CAAC,IAAI,CAAC,EACzB,OAAO,EAAE,GAAG,EAAE;wBACZ,QAAQ,EAAE,CAAC,IAAI,CAAC,CAAC;oBACnB,CAAC,EACD,QAAQ,EAAC,IAAI,YAEZ,UAAU,CAAC,IAAI,CAAC,GACA,IAhBoB,EAAE,CAiB1B,CAClB,CAAC;QACJ,CAAC,CAAC,GACe,CACpB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC","sourcesContent":["import { FunctionComponent, useCallback, useEffect, useMemo, useRef } from 'react';\nimport styled from 'styled-components';\n\nimport { defaultThemeProp } from '../../../theme';\nimport { BaseProps, Action, ForwardProps } from '../../../types';\nimport Button from '../../Button';\nimport { useArrows, useConfiguration, useElement } from '../../../hooks';\nimport { ClockFormat, is12HClockFormat } from '../Input/utils';\n\nimport { getIntervalGenerator } from './utils';\n\nexport type MinuteInterval = 15 | 30 | 60;\n\nexport interface TimePickerProps extends BaseProps {\n /**\n * Defines default time that will be selected when the Time Picker is opened.\n * @default new Date()\n */\n selected?: Date;\n /** Callback fired when selected value changes. */\n onSelect: (date: Date) => void;\n /**\n * Defines interval for time picker options (in minutes).\n * @default 30\n */\n interval?: MinuteInterval;\n /**\n * Defines clock format that overrides locale based format\n */\n clockFormat?: ClockFormat;\n}\n\nconst StyledTimePicker = styled.ul`\n list-style: none;\n max-height: 10rem;\n overflow: auto;\n width: 100%;\n`;\n\nStyledTimePicker.defaultProps = defaultThemeProp;\n\nconst StyledTimeButton = styled.button<TimePickerProps>`\n color: black;\n width: 100%;\n border-radius: inherit;\n overflow: hidden;\n text-align: start;\n text-overflow: ellipsis;\n white-space: nowrap;\n border-width: 0;\n justify-content: start;\n padding: 0;\n background-color: ${props =>\n props.selected ? props.theme.base.colors.blue['extra-light'] : 'transparent'};\n\n > span {\n margin-inline-end: 0.125rem;\n &:first-child {\n margin-inline-start: ${({ theme }) => theme.components['form-control']['border-width']};\n }\n &:nth-child(2) {\n margin-inline-start: 0.125rem;\n }\n &:first-child,\n &:nth-child(3) {\n padding-inline-start: 0.5rem;\n }\n }\n\n &:enabled:focus,\n &:not([disabled]):focus {\n box-shadow: ${props => props.theme.base.shadow['focus-inset']};\n }\n`;\n\nStyledTimeButton.defaultProps = defaultThemeProp;\n\nconst StyledTimeItem = styled.li`\n border-radius: 0;\n`;\n\nStyledTimeItem.defaultProps = defaultThemeProp;\n\nconst TimePicker: FunctionComponent<TimePickerProps & ForwardProps> = (props: TimePickerProps) => {\n const { locale } = useConfiguration();\n const { selected = new Date(0), interval = 30, clockFormat, onSelect, ...restProps } = props;\n\n const intervalInMS = interval * 60000;\n\n const { hourCycle: defaultHourCycle } = useMemo(\n () =>\n new Intl.DateTimeFormat(locale, {\n hour: '2-digit',\n hour12: clockFormat ? clockFormat === 12 : is12HClockFormat(locale)\n }).resolvedOptions(),\n [clockFormat, locale]\n );\n\n const actionsList = Array.from(getIntervalGenerator(intervalInMS), time => {\n const date = new Date(selected);\n date.setUTCHours(time.getUTCHours(), time.getUTCMinutes());\n return {\n id: date.getTime().toString(),\n text: Intl.DateTimeFormat(locale, {\n hour: '2-digit',\n minute: '2-digit',\n timeZone: 'UTC',\n /** Use this to fix Chrome https://bugs.chromium.org/p/chromium/issues/detail?id=1045791 */\n hourCycle: defaultHourCycle === 'h24' ? 'h23' : defaultHourCycle\n }).format(date)\n };\n });\n\n const isSelected = (date: Date) => {\n return (\n selected?.getUTCHours() === date.getUTCHours() &&\n selected?.getUTCMinutes() === date.getUTCMinutes()\n );\n };\n\n const [buttonEl, setButtonEl] = useElement<HTMLElement>();\n const menuRef = useRef<HTMLUListElement>(null);\n\n useArrows(menuRef, {\n selector: 'button',\n cycle: true,\n dir: 'up-down',\n allowTabFocus: false\n });\n\n const renderTime = (text: string) => {\n const [hour, minute, meridiem] = text.split(/:| /);\n return (\n <>\n <span>{hour}</span>:<span>{minute}</span>\n {meridiem && <span>{meridiem}</span>}\n </>\n );\n };\n\n const setTabIndexes = useCallback(() => {\n const focusEl = menuRef.current;\n if (!focusEl) return;\n const focusableElements = Array.from(focusEl.querySelectorAll('button'));\n\n if (focusableElements.length > 0) {\n let isChecked = false;\n focusableElements.slice(1).forEach(item => {\n const checked = (item as HTMLInputElement).checked;\n if (checked) {\n isChecked = true;\n item.tabIndex = 0;\n } else item.tabIndex = -1;\n });\n\n if (!isChecked) {\n (focusableElements[0] as HTMLElement).tabIndex = 0;\n focusableElements[0].focus();\n }\n }\n }, [selected]);\n\n useEffect(() => {\n buttonEl?.focus();\n setTabIndexes();\n }, [buttonEl]);\n\n return (\n <StyledTimePicker role='menu' tabIndex={-1} ref={menuRef} {...restProps}>\n {actionsList.map(({ text, id }: Action) => {\n const item = new Date(Number(id));\n return (\n <StyledTimeItem role='presentation' key={id}>\n <StyledTimeButton\n role='menuitem'\n as={Button}\n variant='simple'\n ref={isSelected(item) ? setButtonEl : null}\n aria-label={text}\n selected={isSelected(item)}\n aria-current={isSelected(item) ? 'time' : undefined}\n checked={isSelected(item)}\n onClick={() => {\n onSelect?.(item);\n }}\n tabIndex='-1'\n >\n {renderTime(text)}\n </StyledTimeButton>\n </StyledTimeItem>\n );\n })}\n </StyledTimePicker>\n );\n};\n\nexport default TimePicker;\n"]}
@@ -1,32 +1,5 @@
1
- import { FunctionComponent, Ref, MouseEvent as ReactMouseEvent, KeyboardEvent as ReactKeyboardEvent } from 'react';
2
- import { BaseProps, ForwardProps } from '../../types';
3
- import { PopoverProps } from '../Popover';
4
- export interface DialogProps extends BaseProps {
5
- target: HTMLElement | null;
6
- placement?: PopoverProps['placement'];
7
- children: PopoverProps['children'];
8
- heading: string;
9
- headingHidden?: boolean;
10
- onSubmit?: (arg: {
11
- close: () => void;
12
- }) => void;
13
- onClose?: () => void;
14
- onOpen?: () => void;
15
- loading?: boolean;
16
- ref?: Ref<HTMLDivElement>;
17
- }
18
- export declare const StyledDialog: import("styled-components").StyledComponent<"dialog", import("styled-components").DefaultTheme, {}, never>;
19
- export declare const StyledDialogTitle: import("styled-components").StyledComponent<FunctionComponent<import("../Text").TextProps & ForwardProps>, import("styled-components").DefaultTheme, {}, never>;
20
- export declare const useDialog: () => {
21
- target: HTMLElement | null;
22
- loading: boolean;
23
- setLoading: import("react").Dispatch<import("react").SetStateAction<boolean>>;
24
- events: {
25
- onMouseDown: (e: ReactMouseEvent) => void;
26
- onKeyDown: (e: ReactKeyboardEvent) => void;
27
- };
28
- setTargetWithEvent: (e: ReactMouseEvent | ReactKeyboardEvent) => void;
29
- };
30
- declare const Dialog: FunctionComponent<DialogProps & ForwardProps>;
1
+ import { FC, HTMLAttributes } from 'react';
2
+ import { DialogProps } from './Dialog.types';
3
+ declare const Dialog: FC<DialogProps & HTMLAttributes<HTMLDivElement>>;
31
4
  export default Dialog;
32
5
  //# sourceMappingURL=Dialog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAEjB,GAAG,EAKH,UAAU,IAAI,eAAe,EAC7B,aAAa,IAAI,kBAAkB,EACpC,MAAM,OAAO,CAAC;AAcf,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAKtD,OAAgB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAKnD,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,MAAM,EAAE,WAAW,GAAG,IAAI,CAAC;IAC3B,SAAS,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,CAAC;IACtC,QAAQ,EAAE,YAAY,CAAC,UAAU,CAAC,CAAC;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE;QAAE,KAAK,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,IAAI,CAAC;IAChD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B;AAED,eAAO,MAAM,YAAY,4GAgBxB,CAAC;AAIF,eAAO,MAAM,iBAAiB,iKAsB7B,CAAC;AAIF,eAAO,MAAM,SAAS;;;;;yBAeC,eAAe;uBAGjB,kBAAkB;;4BAdN,eAAe,GAAG,kBAAkB;CAsBpE,CAAC;AAEF,QAAA,MAAM,MAAM,EAAE,iBAAiB,CAAC,WAAW,GAAG,YAAY,CAgKzD,CAAC;AAEF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+B,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAKxE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,QAAA,MAAM,MAAM,EAAE,EAAE,CAAC,WAAW,GAAG,cAAc,CAAC,cAAc,CAAC,CAkC5D,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -1,150 +1,10 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { forwardRef, useEffect, useLayoutEffect, useRef, useState } from 'react';
3
- import styled, { css } from 'styled-components';
4
- import { useConsolidatedRef, useElement, useEscape, useFocusTrap, useI18n, useOuterEvent, usePrevious, useUID } from '../../hooks';
5
- import { defaultThemeProp } from '../../theme';
6
- import { getFocusables } from '../../utils';
7
- import Button from '../Button';
8
- import { CardContent, CardFooter, CardHeader } from '../Card';
9
- import Icon from '../Icon';
10
- import Popover from '../Popover';
11
- import Progress from '../Progress';
12
- import Text from '../Text';
13
- import VisuallyHiddenText from '../VisuallyHiddenText';
14
- export const StyledDialog = styled.dialog(({ theme: { base: { 'content-width': contentWidth, palette: { 'foreground-color': foregroundColor } } } }) => {
15
- return css `
16
- border: none;
17
- min-width: ${contentWidth.sm};
18
- max-width: ${contentWidth.lg};
19
- color: ${foregroundColor};
20
- `;
21
- });
22
- StyledDialog.defaultProps = defaultThemeProp;
23
- export const StyledDialogTitle = styled(Text)(({ theme: { base: { shadow, 'border-radius': borderRadius } } }) => {
24
- return css `
25
- position: relative;
26
- ::after {
27
- content: '';
28
- border-radius: ${borderRadius};
29
- position: absolute;
30
- inset: -0.25rem;
31
- }
32
- :focus-visible {
33
- outline: none;
34
- ::after {
35
- box-shadow: ${shadow.focus}, inset ${shadow['focus-solid']};
36
- }
37
- }
38
- `;
39
- });
40
- StyledDialogTitle.defaultProps = defaultThemeProp;
41
- export const useDialog = () => {
42
- const [target, setTarget] = useState(null);
43
- const [loading, setLoading] = useState(false);
44
- const setTargetWithEvent = (e) => {
45
- if (e.target instanceof HTMLElement) {
46
- setTarget(e.target);
47
- }
48
- };
49
- return {
50
- target,
51
- loading,
52
- setLoading,
53
- events: {
54
- onMouseDown: (e) => {
55
- setTargetWithEvent(e);
56
- },
57
- onKeyDown: (e) => {
58
- if (e.key === 'Enter') {
59
- setTargetWithEvent(e);
60
- }
61
- }
62
- },
63
- setTargetWithEvent
64
- };
65
- };
66
- const Dialog = forwardRef(({ target, placement, heading, headingHidden = false, onSubmit, onClose, onOpen, loading, children, ...restProps }, ref) => {
67
- const t = useI18n();
68
- const headingId = useUID();
69
- const [popoverEl, setPopoverEl] = useElement();
70
- const popoverRef = useConsolidatedRef(ref, setPopoverEl);
71
- const headingRef = useRef(null);
72
- const [currentTarget, setCurrentTarget] = useState(() => target);
73
- const [show, setShow] = useState(false);
74
- const skipChangeShow = useRef(false);
75
- const prevTarget = usePrevious(target);
76
- useEscape(() => {
77
- if (show) {
78
- setShow(false);
79
- }
80
- }, undefined, [show, setShow]);
81
- useOuterEvent('mousedown', [target, popoverEl], () => {
82
- if (target && popoverEl && show) {
83
- setShow(false);
84
- onClose?.();
85
- }
86
- });
87
- useFocusTrap(popoverRef);
88
- useEffect(() => {
89
- if (!show) {
90
- currentTarget?.focus();
91
- }
92
- }, [show]);
93
- useEffect(() => {
94
- if (show && popoverEl) {
95
- if (headingRef.current) {
96
- headingRef.current.focus();
97
- }
98
- else {
99
- const focusables = getFocusables(popoverRef);
100
- focusables[0]?.focus();
101
- }
102
- }
103
- }, [show, popoverEl]);
104
- useLayoutEffect(() => {
105
- const onTargetClick = (e) => {
106
- setCurrentTarget(prev => (e.target ? e.target : prev));
107
- if (!skipChangeShow.current) {
108
- setShow(prev => !prev);
109
- }
110
- else {
111
- skipChangeShow.current = false;
112
- }
113
- };
114
- if (target instanceof HTMLElement) {
115
- target.addEventListener('click', onTargetClick);
116
- }
117
- return () => {
118
- if (target instanceof HTMLElement) {
119
- target.removeEventListener('click', onTargetClick);
120
- }
121
- };
122
- }, [target]);
123
- useEffect(() => {
124
- if (show) {
125
- onOpen?.();
126
- }
127
- else {
128
- onClose?.();
129
- }
130
- }, [show]);
131
- useEffect(() => {
132
- /* If our target is changing and the popover is already open we will want
133
- to skip the next change. The next show change would come from a click on the new button,
134
- the popover should stay open. */
135
- if (target !== prevTarget && show) {
136
- skipChangeShow.current = true;
137
- }
138
- }, [target, show]);
139
- const onTitleKeyDown = (e) => {
140
- const focusables = getFocusables(popoverRef);
141
- if (e.shiftKey && e.key === 'Tab') {
142
- e.preventDefault();
143
- focusables[focusables.length - 1].focus();
144
- }
145
- };
146
- const progress = loading ? _jsx(Progress, { placement: 'local' }) : null;
147
- return (_jsxs(Popover, { ...restProps, as: StyledDialog, ref: popoverRef, target: currentTarget, placement: placement, show: show, open: show, "aria-labelledby": headingId, children: [_jsx(CardHeader, { actions: !onSubmit ? (_jsx(Button, { icon: true, variant: 'simple', onClick: () => setShow(false), "aria-label": t('close'), children: _jsx(Icon, { name: 'times' }) })) : undefined, children: headingHidden ? (_jsx(VisuallyHiddenText, { id: headingId, children: heading })) : (_jsx(StyledDialogTitle, { variant: 'h2', tabIndex: -1, ref: headingRef, onKeyDown: onTitleKeyDown, id: headingId, children: heading })) }), _jsxs(CardContent, { children: [children, progress] }), onSubmit && (_jsxs(CardFooter, { justify: 'between', children: [_jsx(Button, { variant: 'secondary', onClick: () => setShow(false), children: t('cancel') }), _jsx(Button, { variant: 'primary', onClick: () => onSubmit({ close: () => setShow(false) }), disabled: loading, children: t('submit') })] }))] }));
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from 'react';
3
+ import { useConsolidatedRef } from '../../hooks';
4
+ import { StyledDialog } from './Dialog.styles';
5
+ const Dialog = forwardRef(({ target, labelledbyId, portal, strategy, placement, children, progress, ...restProps }, ref) => {
6
+ const dialogRef = useConsolidatedRef(ref);
7
+ return (_jsx(StyledDialog, { ...restProps, role: 'dialog', "aria-modal": 'false', "aria-labelledby": labelledbyId, "aria-busy": progress ? 'true' : 'false', ref: dialogRef, target: target, portal: portal, strategy: strategy, placement: placement, arrow: true, children: children }));
148
8
  });
149
9
  export default Dialog;
150
10
  //# sourceMappingURL=Dialog.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.js","sourceRoot":"","sources":["../../../src/components/Dialog/Dialog.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EAIV,SAAS,EACT,eAAe,EACf,MAAM,EACN,QAAQ,EAGT,MAAM,OAAO,CAAC;AACf,OAAO,MAAM,EAAE,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,WAAW,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,YACtD,CAAC,CAAC,QAAQ,CAAC,GACL,EACT,KAAC,MAAM,IACL,OAAO,EAAC,SAAS,EACjB,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,EACxD,QAAQ,EAAE,OAAO,YAEhB,CAAC,CAAC,QAAQ,CAAC,GACL,IACE,CACd,IACO,CACX,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,MAAM,CAAC","sourcesContent":["import {\n forwardRef,\n FunctionComponent,\n PropsWithoutRef,\n Ref,\n useEffect,\n useLayoutEffect,\n useRef,\n useState,\n MouseEvent as ReactMouseEvent,\n KeyboardEvent as ReactKeyboardEvent\n} from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n useConsolidatedRef,\n useElement,\n useEscape,\n useFocusTrap,\n useI18n,\n useOuterEvent,\n usePrevious,\n useUID\n} from '../../hooks';\nimport { defaultThemeProp } from '../../theme';\nimport { BaseProps, ForwardProps } from '../../types';\nimport { getFocusables } from '../../utils';\nimport Button from '../Button';\nimport { CardContent, CardFooter, CardHeader } from '../Card';\nimport Icon from '../Icon';\nimport Popover, { PopoverProps } from '../Popover';\nimport Progress from '../Progress';\nimport Text from '../Text';\nimport VisuallyHiddenText from '../VisuallyHiddenText';\n\nexport interface DialogProps extends BaseProps {\n target: HTMLElement | null;\n placement?: PopoverProps['placement'];\n children: PopoverProps['children'];\n heading: string;\n headingHidden?: boolean;\n onSubmit?: (arg: { close: () => void }) => void;\n onClose?: () => void;\n onOpen?: () => void;\n loading?: boolean;\n ref?: Ref<HTMLDivElement>;\n}\n\nexport const StyledDialog = styled.dialog(\n ({\n theme: {\n base: {\n 'content-width': contentWidth,\n palette: { 'foreground-color': foregroundColor }\n }\n }\n }) => {\n return css`\n border: none;\n min-width: ${contentWidth.sm};\n max-width: ${contentWidth.lg};\n color: ${foregroundColor};\n `;\n }\n);\n\nStyledDialog.defaultProps = defaultThemeProp;\n\nexport const StyledDialogTitle = styled(Text)(\n ({\n theme: {\n base: { shadow, 'border-radius': borderRadius }\n }\n }) => {\n return css`\n position: relative;\n ::after {\n content: '';\n border-radius: ${borderRadius};\n position: absolute;\n inset: -0.25rem;\n }\n :focus-visible {\n outline: none;\n ::after {\n box-shadow: ${shadow.focus}, inset ${shadow['focus-solid']};\n }\n }\n `;\n }\n);\n\nStyledDialogTitle.defaultProps = defaultThemeProp;\n\nexport const useDialog = () => {\n const [target, setTarget] = useState<HTMLElement | null>(null);\n const [loading, setLoading] = useState(false);\n\n const setTargetWithEvent = (e: ReactMouseEvent | ReactKeyboardEvent) => {\n if (e.target instanceof HTMLElement) {\n setTarget(e.target);\n }\n };\n\n return {\n target,\n loading,\n setLoading,\n events: {\n onMouseDown: (e: ReactMouseEvent) => {\n setTargetWithEvent(e);\n },\n onKeyDown: (e: ReactKeyboardEvent) => {\n if (e.key === 'Enter') {\n setTargetWithEvent(e);\n }\n }\n },\n setTargetWithEvent\n };\n};\n\nconst Dialog: FunctionComponent<DialogProps & ForwardProps> = forwardRef(\n (\n {\n target,\n placement,\n heading,\n headingHidden = false,\n onSubmit,\n onClose,\n onOpen,\n loading,\n children,\n ...restProps\n }: PropsWithoutRef<DialogProps>,\n ref: DialogProps['ref']\n ) => {\n const t = useI18n();\n const headingId = useUID();\n const [popoverEl, setPopoverEl] = useElement<HTMLDivElement>();\n const popoverRef = useConsolidatedRef(ref, setPopoverEl);\n const headingRef = useRef<HTMLSpanElement>(null);\n const [currentTarget, setCurrentTarget] = useState(() => target);\n const [show, setShow] = useState(false);\n const skipChangeShow = useRef(false);\n const prevTarget = usePrevious(target);\n useEscape(\n () => {\n if (show) {\n setShow(false);\n }\n },\n undefined,\n [show, setShow]\n );\n useOuterEvent('mousedown', [target, popoverEl], () => {\n if (target && popoverEl && show) {\n setShow(false);\n onClose?.();\n }\n });\n useFocusTrap(popoverRef);\n\n useEffect(() => {\n if (!show) {\n currentTarget?.focus();\n }\n }, [show]);\n\n useEffect(() => {\n if (show && popoverEl) {\n if (headingRef.current) {\n headingRef.current.focus();\n } else {\n const focusables = getFocusables(popoverRef);\n focusables[0]?.focus();\n }\n }\n }, [show, popoverEl]);\n\n useLayoutEffect(() => {\n const onTargetClick = (e: MouseEvent) => {\n setCurrentTarget(prev => (e.target ? (e.target as HTMLElement) : prev));\n if (!skipChangeShow.current) {\n setShow(prev => !prev);\n } else {\n skipChangeShow.current = false;\n }\n };\n if (target instanceof HTMLElement) {\n target.addEventListener('click', onTargetClick);\n }\n return () => {\n if (target instanceof HTMLElement) {\n target.removeEventListener('click', onTargetClick);\n }\n };\n }, [target]);\n\n useEffect(() => {\n if (show) {\n onOpen?.();\n } else {\n onClose?.();\n }\n }, [show]);\n\n useEffect(() => {\n /* If our target is changing and the popover is already open we will want\n to skip the next change. The next show change would come from a click on the new button,\n the popover should stay open. */\n if (target !== prevTarget && show) {\n skipChangeShow.current = true;\n }\n }, [target, show]);\n\n const onTitleKeyDown = (e: ReactKeyboardEvent) => {\n const focusables = getFocusables(popoverRef);\n if (e.shiftKey && e.key === 'Tab') {\n e.preventDefault();\n focusables[focusables.length - 1].focus();\n }\n };\n\n const progress = loading ? <Progress placement='local' /> : null;\n\n return (\n <Popover\n {...restProps}\n as={StyledDialog}\n ref={popoverRef}\n target={currentTarget}\n placement={placement}\n show={show}\n open={show}\n aria-labelledby={headingId}\n >\n <CardHeader\n actions={\n !onSubmit ? (\n <Button icon variant='simple' onClick={() => setShow(false)} aria-label={t('close')}>\n <Icon name='times' />\n </Button>\n ) : undefined\n }\n >\n {headingHidden ? (\n <VisuallyHiddenText id={headingId}>{heading}</VisuallyHiddenText>\n ) : (\n <StyledDialogTitle\n variant='h2'\n tabIndex={-1}\n ref={headingRef}\n onKeyDown={onTitleKeyDown}\n id={headingId}\n >\n {heading}\n </StyledDialogTitle>\n )}\n </CardHeader>\n <CardContent>\n {children}\n {progress}\n </CardContent>\n {onSubmit && (\n <CardFooter justify='between'>\n <Button variant='secondary' onClick={() => setShow(false)}>\n {t('cancel')}\n </Button>\n <Button\n variant='primary'\n onClick={() => onSubmit({ close: () => setShow(false) })}\n disabled={loading}\n >\n {t('submit')}\n </Button>\n </CardFooter>\n )}\n </Popover>\n );\n }\n);\n\nexport default Dialog;\n"]}
1
+ {"version":3,"file":"Dialog.js","sourceRoot":"","sources":["../../../src/components/Dialog/Dialog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAuC,MAAM,OAAO,CAAC;AAExE,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAG/C,MAAM,MAAM,GAAqD,UAAU,CACzE,CACE,EACE,MAAM,EACN,YAAY,EACZ,MAAM,EACN,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,GAAG,SAAS,EACiB,EAC/B,GAAuB,EACvB,EAAE;IACF,MAAM,SAAS,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC;IAE1C,OAAO,CACL,KAAC,YAAY,OACP,SAAS,EACb,IAAI,EAAC,QAAQ,gBACF,OAAO,qBACD,YAAY,eAClB,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EACtC,GAAG,EAAE,SAAS,EACd,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,SAAS,EACpB,KAAK,kBAEJ,QAAQ,GACI,CAChB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,MAAM,CAAC","sourcesContent":["import { forwardRef, PropsWithoutRef, FC, HTMLAttributes } from 'react';\n\nimport { useConsolidatedRef } from '../../hooks';\n\nimport { StyledDialog } from './Dialog.styles';\nimport { DialogProps } from './Dialog.types';\n\nconst Dialog: FC<DialogProps & HTMLAttributes<HTMLDivElement>> = forwardRef(\n (\n {\n target,\n labelledbyId,\n portal,\n strategy,\n placement,\n children,\n progress,\n ...restProps\n }: PropsWithoutRef<DialogProps>,\n ref: DialogProps['ref']\n ) => {\n const dialogRef = useConsolidatedRef(ref);\n\n return (\n <StyledDialog\n {...restProps}\n role='dialog'\n aria-modal='false'\n aria-labelledby={labelledbyId}\n aria-busy={progress ? 'true' : 'false'}\n ref={dialogRef}\n target={target}\n portal={portal}\n strategy={strategy}\n placement={placement}\n arrow\n >\n {children}\n </StyledDialog>\n );\n }\n);\n\nexport default Dialog;\n"]}
@@ -0,0 +1,3 @@
1
+ export declare const StyledChildrenWrap: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
2
+ export declare const StyledDialog: import("styled-components").StyledComponent<(<Modifiers extends string = string>(props: import("../Popover").PopoverProps<Modifiers> & import("../..").ForwardProps) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null), import("styled-components").DefaultTheme, {}, never>;
3
+ //# sourceMappingURL=Dialog.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dialog.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/Dialog.styles.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,kBAAkB,yGAAe,CAAC;AAE/C,eAAO,MAAM,YAAY,8TAWvB,CAAC"}
@@ -0,0 +1,18 @@
1
+ import styled, { css } from 'styled-components';
2
+ import { defaultThemeProp } from '../../theme';
3
+ import Popover from '../Popover';
4
+ export const StyledChildrenWrap = styled.div ``;
5
+ export const StyledDialog = styled(Popover)(({ theme }) => {
6
+ return css `
7
+ min-width: ${theme.base['content-width'].sm};
8
+ max-width: ${theme.base['content-width'].lg};
9
+
10
+ &[aria-busy='true'] {
11
+ ${StyledChildrenWrap} {
12
+ visibility: hidden;
13
+ }
14
+ }
15
+ `;
16
+ });
17
+ StyledDialog.defaultProps = defaultThemeProp;
18
+ //# sourceMappingURL=Dialog.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dialog.styles.js","sourceRoot":"","sources":["../../../src/components/Dialog/Dialog.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,OAAO,MAAM,YAAY,CAAC;AAEjC,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAAA,EAAE,CAAC;AAE/C,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACxD,OAAO,GAAG,CAAA;iBACK,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,EAAE;iBAC9B,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,EAAE;;;QAGvC,kBAAkB;;;;GAIvB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,YAAY,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\n\nimport { defaultThemeProp } from '../../theme';\nimport Popover from '../Popover';\n\nexport const StyledChildrenWrap = styled.div``;\n\nexport const StyledDialog = styled(Popover)(({ theme }) => {\n return css`\n min-width: ${theme.base['content-width'].sm};\n max-width: ${theme.base['content-width'].lg};\n\n &[aria-busy='true'] {\n ${StyledChildrenWrap} {\n visibility: hidden;\n }\n }\n `;\n});\n\nStyledDialog.defaultProps = defaultThemeProp;\n"]}
@@ -0,0 +1,87 @@
1
+ import { OmitStrict } from '../../types';
2
+ import { PopoverProps } from '../Popover';
3
+ import { ProgressProps } from '../Progress';
4
+ export interface BaseDialogProps {
5
+ /**
6
+ * A string to indicate context for the dialog. The dialog will be labelled by this value.
7
+ */
8
+ heading: string;
9
+ /**
10
+ * In specific circumstances the heading can be visually hidden.
11
+ * @default false
12
+ */
13
+ headingHidden?: boolean;
14
+ /**
15
+ * An element the dialog is contextually and visually associated with. Normally a triggering button.
16
+ * Components rendering Dialog should mount and unmount instances based on this value.
17
+ */
18
+ target: HTMLElement;
19
+ /**
20
+ * Content for the dialog. Avoid form control buttons within as those should be rendered by way of onCancel and onSubmit with FormDialog.
21
+ */
22
+ children: PopoverProps['children'];
23
+ /**
24
+ * If there is a progress state either on opening, or after submit, you must indicate as such. A custom message is supported as well.
25
+ */
26
+ progress?: boolean | ProgressProps['message'];
27
+ /** Optionally render the dialog element at the end of the body or within a specified element. */
28
+ portal?: PopoverProps['portal'];
29
+ /** Positioning strategy for solving rendering scenarios. */
30
+ strategy?: PopoverProps['strategy'];
31
+ /**
32
+ * Intended positioning placement for the dialog element.
33
+ * Placement may auto adjust based on screen position and other layout variables.
34
+ */
35
+ placement?: PopoverProps['placement'];
36
+ /**
37
+ * Reference to the dialog's root element.
38
+ */
39
+ ref?: PopoverProps['ref'];
40
+ }
41
+ export interface DialogProps extends OmitStrict<BaseDialogProps, 'heading' | 'headingHidden'> {
42
+ /**
43
+ * The DOM id for the dialog's labelling element.
44
+ */
45
+ labelledbyId: string;
46
+ }
47
+ /**
48
+ * A simple callback or an object to customize a subset button properties.
49
+ */
50
+ type FormAction = (() => void) | {
51
+ text?: string;
52
+ disabled?: boolean;
53
+ handler: () => void;
54
+ };
55
+ export interface FormDialogProps extends BaseDialogProps {
56
+ /**
57
+ * Called when the user presses escape or clicks away.
58
+ */
59
+ onDismiss?: () => void;
60
+ /**
61
+ * Renders a standard design system cancel button.
62
+ * If onDismiss is not provided, onCancel will be invoked when the user presses the Escape key or clicks outside of the dialog.
63
+ * Invocation of this indicates the user wishes to cancel any changes and close the dialog.
64
+ */
65
+ onCancel: FormAction;
66
+ /**
67
+ * Renders a standard design system submit button.
68
+ * Invocation of this indicates the user wishes to submit any changes and close the dialog. Please consider progress states after submit.
69
+ */
70
+ onSubmit: FormAction;
71
+ }
72
+ export interface InfoDialogProps extends BaseDialogProps {
73
+ /**
74
+ * Renders a standard design system dismiss button to close the dialog when the user clicks this button, presses escape or clicks away.
75
+ */
76
+ onDismiss: () => void;
77
+ }
78
+ /**
79
+ * Components which render Dialog internally may need to offer some control to consuming components.
80
+ * Use this interface to offer an imperative handle for shared control.
81
+ */
82
+ export interface DialogHandleValue {
83
+ open: () => void;
84
+ close: () => void;
85
+ }
86
+ export {};
87
+ //# sourceMappingURL=Dialog.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dialog.types.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/Dialog.types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;OAGG;IACH,MAAM,EAAE,WAAW,CAAC;IAEpB;;OAEG;IACH,QAAQ,EAAE,YAAY,CAAC,UAAU,CAAC,CAAC;IAEnC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,aAAa,CAAC,SAAS,CAAC,CAAC;IAE9C,iGAAiG;IACjG,MAAM,CAAC,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAC;IAEhC,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,YAAY,CAAC,UAAU,CAAC,CAAC;IAEpC;;;OAGG;IACH,SAAS,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,CAAC;IAEtC;;OAEG;IACH,GAAG,CAAC,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC;CAC3B;AAED,MAAM,WAAW,WAAY,SAAQ,UAAU,CAAC,eAAe,EAAE,SAAS,GAAG,eAAe,CAAC;IAC3F;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,KAAK,UAAU,GACX,CAAC,MAAM,IAAI,CAAC,GACZ;IACE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEN,MAAM,WAAW,eAAgB,SAAQ,eAAe;IACtD;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IAEvB;;;;OAIG;IACH,QAAQ,EAAE,UAAU,CAAC;IAErB;;;OAGG;IACH,QAAQ,EAAE,UAAU,CAAC;CACtB;AAED,MAAM,WAAW,eAAgB,SAAQ,eAAe;IACtD;;OAEG;IACH,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB"}
@@ -0,0 +1,3 @@
1
+ // cSpell:words dialog's
2
+ export {};
3
+ //# sourceMappingURL=Dialog.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dialog.types.js","sourceRoot":"","sources":["../../../src/components/Dialog/Dialog.types.ts"],"names":[],"mappings":"AAAA,wBAAwB","sourcesContent":["// cSpell:words dialog's\n\nimport { OmitStrict } from '../../types';\nimport { PopoverProps } from '../Popover';\nimport { ProgressProps } from '../Progress';\n\nexport interface BaseDialogProps {\n /**\n * A string to indicate context for the dialog. The dialog will be labelled by this value.\n */\n heading: string;\n\n /**\n * In specific circumstances the heading can be visually hidden.\n * @default false\n */\n headingHidden?: boolean;\n\n /**\n * An element the dialog is contextually and visually associated with. Normally a triggering button.\n * Components rendering Dialog should mount and unmount instances based on this value.\n */\n target: HTMLElement;\n\n /**\n * Content for the dialog. Avoid form control buttons within as those should be rendered by way of onCancel and onSubmit with FormDialog.\n */\n children: PopoverProps['children'];\n\n /**\n * If there is a progress state either on opening, or after submit, you must indicate as such. A custom message is supported as well.\n */\n progress?: boolean | ProgressProps['message'];\n\n /** Optionally render the dialog element at the end of the body or within a specified element. */\n portal?: PopoverProps['portal'];\n\n /** Positioning strategy for solving rendering scenarios. */\n strategy?: PopoverProps['strategy'];\n\n /**\n * Intended positioning placement for the dialog element.\n * Placement may auto adjust based on screen position and other layout variables.\n */\n placement?: PopoverProps['placement'];\n\n /**\n * Reference to the dialog's root element.\n */\n ref?: PopoverProps['ref'];\n}\n\nexport interface DialogProps extends OmitStrict<BaseDialogProps, 'heading' | 'headingHidden'> {\n /**\n * The DOM id for the dialog's labelling element.\n */\n labelledbyId: string;\n}\n\n/**\n * A simple callback or an object to customize a subset button properties.\n */\ntype FormAction =\n | (() => void)\n | {\n text?: string;\n disabled?: boolean;\n handler: () => void;\n };\n\nexport interface FormDialogProps extends BaseDialogProps {\n /**\n * Called when the user presses escape or clicks away.\n */\n onDismiss?: () => void;\n\n /**\n * Renders a standard design system cancel button.\n * If onDismiss is not provided, onCancel will be invoked when the user presses the Escape key or clicks outside of the dialog.\n * Invocation of this indicates the user wishes to cancel any changes and close the dialog.\n */\n onCancel: FormAction;\n\n /**\n * Renders a standard design system submit button.\n * Invocation of this indicates the user wishes to submit any changes and close the dialog. Please consider progress states after submit.\n */\n onSubmit: FormAction;\n}\n\nexport interface InfoDialogProps extends BaseDialogProps {\n /**\n * Renders a standard design system dismiss button to close the dialog when the user clicks this button, presses escape or clicks away.\n */\n onDismiss: () => void;\n}\n\n/**\n * Components which render Dialog internally may need to offer some control to consuming components.\n * Use this interface to offer an imperative handle for shared control.\n */\nexport interface DialogHandleValue {\n open: () => void;\n close: () => void;\n}\n"]}
@@ -0,0 +1,7 @@
1
+ import { FC, HTMLAttributes } from 'react';
2
+ import { OmitStrict } from '../../types';
3
+ import { FormDialogProps } from './Dialog.types';
4
+ export declare const StyledFormDialog: import("styled-components").StyledComponent<FC<import("./Dialog.types").DialogProps & HTMLAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
5
+ declare const FormDialog: FC<FormDialogProps & OmitStrict<HTMLAttributes<HTMLDivElement>, 'onSubmit'>>;
6
+ export default FormDialog;
7
+ //# sourceMappingURL=FormDialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormDialog.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/FormDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuC,EAAE,EAAa,cAAc,EAAE,MAAM,OAAO,CAAC;AAiB3F,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAGzC,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGjD,eAAO,MAAM,gBAAgB,6KAAmB,CAAC;AAEjD,QAAA,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,GAAG,UAAU,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,CA6G1F,CAAC;AAEJ,eAAe,UAAU,CAAC"}
@@ -0,0 +1,58 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { forwardRef, useRef, useEffect } from 'react';
3
+ import styled from 'styled-components';
4
+ import { useConsolidatedRef, useEscape, useFocusTrap, useI18n, useOuterEvent, useUID } from '../../hooks';
5
+ import { getFocusables } from '../../utils';
6
+ import Button from '../Button';
7
+ import Text from '../Text';
8
+ import { CardContent, CardFooter, CardHeader } from '../Card';
9
+ import Progress from '../Progress';
10
+ import VisuallyHiddenText from '../VisuallyHiddenText';
11
+ import { StyledChildrenWrap } from './Dialog.styles';
12
+ import Dialog from './Dialog';
13
+ export const StyledFormDialog = styled(Dialog) ``;
14
+ const FormDialog = forwardRef(({ target, heading, headingHidden = false, children, progress, onDismiss, onCancel, onSubmit, ...restProps }, ref) => {
15
+ const t = useI18n();
16
+ const headingId = useUID();
17
+ const dialogRef = useConsolidatedRef(ref);
18
+ const cancelButtonRef = useRef(null);
19
+ const onCancelHandler = typeof onCancel === 'function' ? onCancel : onCancel.handler;
20
+ useEscape(() => {
21
+ if (onDismiss) {
22
+ onDismiss();
23
+ }
24
+ else {
25
+ onCancelHandler();
26
+ }
27
+ });
28
+ useOuterEvent('mousedown', [target, dialogRef], () => {
29
+ if (onDismiss) {
30
+ onDismiss();
31
+ }
32
+ else {
33
+ onCancelHandler();
34
+ }
35
+ });
36
+ useFocusTrap(dialogRef);
37
+ useEffect(() => {
38
+ if (!progress) {
39
+ const focusables = getFocusables(dialogRef);
40
+ if (focusables[0])
41
+ focusables[0].focus();
42
+ }
43
+ }, [progress]);
44
+ useEffect(() => {
45
+ return () => {
46
+ if (document.contains(target)) {
47
+ target.focus();
48
+ }
49
+ };
50
+ }, []);
51
+ return (_jsxs(StyledFormDialog, { ...restProps, target: target, labelledbyId: headingId, progress: progress, ref: dialogRef, children: [_jsx(CardHeader, { forwardedAs: 'div', children: headingHidden ? (_jsx(VisuallyHiddenText, { forwardedAs: 'h2', id: headingId, children: heading })) : (_jsx(Text, { id: headingId, variant: 'h2', children: heading })) }), _jsxs(CardContent, { children: [children && _jsx(StyledChildrenWrap, { children: children }), _jsx(Progress, { visible: !!progress, focusOnVisible: true, placement: children ? 'local' : 'block', message: typeof progress === 'string' ? progress : undefined })] }), _jsxs(CardFooter, { justify: 'between', forwardedAs: 'div', children: [_jsx(Button, { onClick: () => {
52
+ onCancelHandler();
53
+ }, disabled: typeof onCancel !== 'function' ? onCancel.disabled : undefined, ref: cancelButtonRef, children: typeof onCancel !== 'function' && onCancel.text ? onCancel.text : t('cancel') }), _jsx(Button, { variant: 'primary', onClick: () => {
54
+ (typeof onSubmit !== 'function' ? onSubmit.handler : onSubmit)();
55
+ }, disabled: typeof onSubmit !== 'function' ? onSubmit.disabled : undefined, children: typeof onSubmit !== 'function' && onSubmit.text ? onSubmit.text : t('submit') })] })] }));
56
+ });
57
+ export default FormDialog;
58
+ //# sourceMappingURL=FormDialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormDialog.js","sourceRoot":"","sources":["../../../src/components/Dialog/FormDialog.tsx"],"names":[],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esContent":["import { forwardRef, PropsWithoutRef, useRef, FC, useEffect, HTMLAttributes } from 'react';\nimport styled from 'styled-components';\n\nimport {\n useConsolidatedRef,\n useEscape,\n useFocusTrap,\n useI18n,\n useOuterEvent,\n useUID\n} from '../../hooks';\nimport { getFocusables } from '../../utils';\nimport Button from '../Button';\nimport Text from '../Text';\nimport { CardContent, CardFooter, CardHeader } from '../Card';\nimport Progress from '../Progress';\nimport VisuallyHiddenText from '../VisuallyHiddenText';\nimport { OmitStrict } from '../../types';\n\nimport { StyledChildrenWrap } from './Dialog.styles';\nimport { FormDialogProps } from './Dialog.types';\nimport Dialog from './Dialog';\n\nexport const StyledFormDialog = styled(Dialog)``;\n\nconst FormDialog: FC<FormDialogProps & OmitStrict<HTMLAttributes<HTMLDivElement>, 'onSubmit'>> =\n forwardRef(\n (\n {\n target,\n heading,\n headingHidden = false,\n children,\n progress,\n onDismiss,\n onCancel,\n onSubmit,\n ...restProps\n }: PropsWithoutRef<FormDialogProps>,\n ref: FormDialogProps['ref']\n ) => {\n const t = useI18n();\n const headingId = useUID();\n const dialogRef = useConsolidatedRef(ref);\n const cancelButtonRef = useRef<HTMLButtonElement>(null);\n const onCancelHandler = typeof onCancel === 'function' ? onCancel : onCancel.handler;\n\n useEscape(() => {\n if (onDismiss) {\n onDismiss();\n } else {\n onCancelHandler();\n }\n });\n\n useOuterEvent('mousedown', [target, dialogRef], () => {\n if (onDismiss) {\n onDismiss();\n } else {\n onCancelHandler();\n }\n });\n\n useFocusTrap(dialogRef);\n\n useEffect(() => {\n if (!progress) {\n const focusables = getFocusables(dialogRef);\n if (focusables[0]) focusables[0].focus();\n }\n }, [progress]);\n\n useEffect(() => {\n return () => {\n if (document.contains(target)) {\n target.focus();\n }\n };\n }, []);\n\n return (\n <StyledFormDialog\n {...restProps}\n target={target}\n labelledbyId={headingId}\n progress={progress}\n ref={dialogRef}\n >\n <CardHeader forwardedAs='div'>\n {headingHidden ? (\n <VisuallyHiddenText forwardedAs='h2' id={headingId}>\n {heading}\n </VisuallyHiddenText>\n ) : (\n <Text id={headingId} variant='h2'>\n {heading}\n </Text>\n )}\n </CardHeader>\n\n <CardContent>\n {children && <StyledChildrenWrap>{children}</StyledChildrenWrap>}\n <Progress\n visible={!!progress}\n focusOnVisible\n placement={children ? 'local' : 'block'}\n message={typeof progress === 'string' ? progress : undefined}\n />\n </CardContent>\n\n <CardFooter justify='between' forwardedAs='div'>\n <Button\n onClick={() => {\n onCancelHandler();\n }}\n disabled={typeof onCancel !== 'function' ? onCancel.disabled : undefined}\n ref={cancelButtonRef}\n >\n {typeof onCancel !== 'function' && onCancel.text ? onCancel.text : t('cancel')}\n </Button>\n\n <Button\n variant='primary'\n onClick={() => {\n (typeof onSubmit !== 'function' ? onSubmit.handler : onSubmit)();\n }}\n disabled={typeof onSubmit !== 'function' ? onSubmit.disabled : undefined}\n >\n {typeof onSubmit !== 'function' && onSubmit.text ? onSubmit.text : t('submit')}\n </Button>\n </CardFooter>\n </StyledFormDialog>\n );\n }\n );\n\nexport default FormDialog;\n"]}
@@ -0,0 +1,6 @@
1
+ import { FC, HTMLAttributes } from 'react';
2
+ import { InfoDialogProps } from './Dialog.types';
3
+ export declare const StyledInfoDialog: import("styled-components").StyledComponent<FC<import("./Dialog.types").DialogProps & HTMLAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
4
+ declare const InfoDialog: FC<InfoDialogProps & HTMLAttributes<HTMLDivElement>>;
5
+ export default InfoDialog;
6
+ //# sourceMappingURL=InfoDialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InfoDialog.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/InfoDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuC,EAAE,EAAa,cAAc,EAAE,MAAM,OAAO,CAAC;AAoB3F,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD,eAAO,MAAM,gBAAgB,6KAAmB,CAAC;AAEjD,QAAA,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,GAAG,cAAc,CAAC,cAAc,CAAC,CAyFpE,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,43 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { forwardRef, useRef, useEffect } from 'react';
3
+ import styled from 'styled-components';
4
+ import { useConsolidatedRef, useEscape, useFocusTrap, useI18n, useOuterEvent, useUID } from '../../hooks';
5
+ import Button from '../Button';
6
+ import Text from '../Text';
7
+ import { CardContent, CardHeader } from '../Card';
8
+ import Icon from '../Icon';
9
+ import Progress from '../Progress';
10
+ import VisuallyHiddenText from '../VisuallyHiddenText';
11
+ import Dialog from './Dialog';
12
+ import { StyledChildrenWrap } from './Dialog.styles';
13
+ export const StyledInfoDialog = styled(Dialog) ``;
14
+ const InfoDialog = forwardRef(({ target, heading, headingHidden = false, children, progress, onDismiss, ...restProps }, ref) => {
15
+ const t = useI18n();
16
+ const headingId = useUID();
17
+ const dialogRef = useConsolidatedRef(ref);
18
+ const closeButtonRef = useRef(null);
19
+ useEscape(() => {
20
+ onDismiss?.();
21
+ });
22
+ useOuterEvent('mousedown', [target, dialogRef], () => {
23
+ onDismiss?.();
24
+ });
25
+ useFocusTrap(dialogRef);
26
+ useEffect(() => {
27
+ if (!progress) {
28
+ closeButtonRef.current?.focus();
29
+ }
30
+ }, [progress]);
31
+ useEffect(() => {
32
+ return () => {
33
+ if (document.contains(target)) {
34
+ target.focus();
35
+ }
36
+ };
37
+ }, []);
38
+ return (_jsxs(StyledInfoDialog, { ...restProps, target: target, labelledbyId: headingId, progress: progress, ref: dialogRef, children: [_jsx(CardHeader, { forwardedAs: 'div', actions: _jsx(Button, { icon: true, variant: 'simple', onClick: () => {
39
+ onDismiss();
40
+ }, label: t('close'), ref: closeButtonRef, children: _jsx(Icon, { name: 'times' }) }), children: headingHidden ? (_jsx(VisuallyHiddenText, { forwardedAs: 'h2', id: headingId, children: heading })) : (_jsx(Text, { id: headingId, variant: 'h2', children: heading })) }), _jsxs(CardContent, { children: [children && _jsx(StyledChildrenWrap, { children: children }), _jsx(Progress, { visible: !!progress, focusOnVisible: true, placement: children ? 'local' : 'block', message: typeof progress === 'string' ? progress : undefined })] })] }));
41
+ });
42
+ export default InfoDialog;
43
+ //# sourceMappingURL=InfoDialog.js.map