@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
@@ -1 +1 @@
1
- {"version":3,"file":"Link.js","sourceRoot":"","sources":["../../../src/components/Link/Link.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EAKV,QAAQ,EACR,MAAM,EAEP,MAAM,OAAO,CAAC;AACf,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,MAAuB,MAAM,WAAW,CAAC;AAChD,OAAO,OAAO,MAAM,YAAY,CAAC;AACjC,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAE9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AA2BjD,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,GAAG,CAAA;sBACrB,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,kBAAkB,C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,EAAE,IAAI,EAAE,CAAC,CAAC;IACxB,CAAC,CAAC;IAEF,OAAO,CACL,8BACE,KAAC,UAAU,kBACT,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,OAAc,IACf,SAAS,IACb,YAAY,EAAE,WAAW,EACzB,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,YAAY,YACpB;YAEF,MAAC,OAAO,kBACN,IAAI,EAAE,OAAO,EACb,OAAO,EAAC,cAAc,EACtB,SAAS,EAAC,OAAO,EACjB,SAAS,EAAC,OAAO,EACjB,SAAS,EAAC,QAAQ,EAClB,MAAM,EAAE,OAAO,CAAC,OAAO,EACvB,YAAY,EAAE,WAAW,EACzB,YAAY,EAAE,YAAY,EAC1B,EAAE,EAAE,iBAAiB,EACrB,KAAK,uBAEL,KAAC,oBAAoB,kBACnB,OAAO,QACP,IAAI,EAAC,QAAQ,EACb,GAAG,EAAE,aAAa,EAClB,OAAO,EAAE,cAAc,EACvB,QAAQ,EAAE,CAAC,EACX,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,OAAO,gBAEf,CAAC,CAAC,cAAc,CAAC,YACG;oBACvB,KAAC,oBAAoB,kBACnB,WAAW,EAAC,GAAG,EACf,IAAI,EAAE,IAAI,EACV,GAAG,EAAE,eAAe,EACpB,MAAM,EAAC,QAAQ,EACf,GAAG,EAAC,YAAY,EAChB,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,OAAO,gBAEf,CAAC,CAAC,kBAAkB,CAAC,YACD,aACf,YACT,CACJ,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,IAAI,CAAC","sourcesContent":["import {\n forwardRef,\n ReactNode,\n FunctionComponent,\n Ref,\n PropsWithoutRef,\n useState,\n useRef,\n KeyboardEvent\n} from 'react';\nimport styled, { css } from 'styled-components';\nimport { readableColor } from 'polished';\n\nimport Button, { ButtonProps } from '../Button';\nimport Popover from '../Popover';\nimport BareButton from '../Button/BareButton';\nimport { BaseProps, ForwardProps } from '../../types';\nimport { defaultThemeProp } from '../../theme';\nimport { useBreakpoint, useConsolidatedRef, useI18n } from '../../hooks';\nimport { tryCatch } from '../../utils';\nimport { calculateFontSize } from '../../styles';\n\nexport interface LinkProps extends BaseProps {\n /** Text or content for the Link. */\n children: ReactNode;\n /** URL or DOM id to navigate to. */\n href: string;\n /**\n * Controls the styling of the Link.\n * @default \"link\"\n */\n variant?: ButtonProps['variant'];\n /**\n * Set the Icon prop to `true` if you're using just an Icon in your Link. Make sure to pass an Icon as children if `true`.\n * @default false\n */\n icon?: ButtonProps['icon'];\n /** Determines if the Link should render a popover when focused or hovered over. */\n previewable?: boolean;\n /** Callback function that is run when the preview popover is interacted with. */\n onPreview?: (e: { href: string }) => void;\n /** Specifies where to open the link href. */\n target?: string;\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLAnchorElement>;\n}\n\nexport const StyledLinkPopover = styled.div`\n background-color: ${props => props.theme.components.tooltip['background-color']};\n`;\n\nStyledLinkPopover.defaultProps = defaultThemeProp;\n\nexport const StyledLinkPopoverBtn = styled(BareButton)(({ theme }) => {\n const contrastColor = tryCatch(() => readableColor(theme.base.palette.interactive));\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n return css`\n position: relative;\n display: inline-flex;\n align-items: center;\n z-index: 1;\n padding: 0 ${theme.base.spacing};\n min-height: 1.5rem;\n line-height: 1;\n color: ${contrastColor};\n font-size: ${fontSize.xs};\n text-decoration: none;\n\n /* FIXME: Button selector specificity... */\n & + & {\n margin: 0;\n }\n\n &:nth-child(2)::after {\n content: '';\n position: absolute;\n right: 0;\n top: 0;\n bottom: 0;\n width: 1px; /* stylelint-disable-line unit-allowed-list */\n background-color: ${contrastColor};\n opacity: ${theme.base.transparency['transparent-3']};\n }\n\n &:nth-child(2) {\n /* stylelint-disable-next-line unit-allowed-list */\n margin-inline-start: -1px;\n }\n\n &:hover,\n &:active {\n text-decoration: underline;\n }\n\n &:focus {\n box-shadow: inset 0 0 0 0.0625rem ${theme.base.palette.light},\n 0 0 0.125rem 0.0625rem ${theme.base.palette.interactive};\n }\n `;\n});\n\nStyledLinkPopoverBtn.defaultProps = defaultThemeProp;\n\nexport const StyledLink = styled(Button)``;\n\nStyledLink.defaultProps = defaultThemeProp;\n\nconst Link: FunctionComponent<LinkProps & ForwardProps> = forwardRef(\n (\n { href, variant = 'link', previewable, onPreview, ...restProps }: PropsWithoutRef<LinkProps>,\n ref: LinkProps['ref']\n ) => {\n const linkRef = useConsolidatedRef(ref);\n const [popover, setPopover] = useState(false);\n const previewBtnRef = useRef<HTMLButtonElement>(null);\n const openInTabBtnRef = useRef<HTMLAnchorElement>(null);\n const isSmallOrAbove = useBreakpoint('sm');\n const t = useI18n();\n\n const openPopover = () => {\n if (isSmallOrAbove) setPopover(true);\n };\n\n const closePopover = () => {\n setPopover(false);\n };\n\n const onKeyUp = (event: KeyboardEvent) => {\n if (event.keyCode === 27) {\n closePopover();\n }\n\n if (event.keyCode === 38 || event.keyCode === 40) {\n previewBtnRef?.current?.focus();\n }\n\n if (event.keyCode === 37 || event.keyCode === 39) {\n if (previewBtnRef.current === document.activeElement) {\n openInTabBtnRef?.current?.focus();\n } else {\n previewBtnRef?.current?.focus();\n }\n }\n };\n\n const onEnterLink = () => {\n if (previewable) openPopover();\n };\n\n const onPreviewClick = () => {\n onPreview?.({ href });\n };\n\n return (\n <>\n <StyledLink\n href={href}\n variant={variant}\n ref={linkRef as any}\n {...restProps}\n onMouseEnter={onEnterLink}\n onMouseLeave={closePopover}\n onFocus={onEnterLink}\n onKeyUp={onKeyUp}\n onBlur={closePopover}\n />\n\n <Popover\n show={popover}\n groupId='link_preview'\n showDelay='short'\n hideDelay='short'\n placement='bottom'\n target={linkRef.current}\n onMouseEnter={openPopover}\n onMouseLeave={closePopover}\n as={StyledLinkPopover}\n arrow\n >\n <StyledLinkPopoverBtn\n preview\n type='button'\n ref={previewBtnRef}\n onClick={onPreviewClick}\n tabIndex={0}\n onFocus={openPopover}\n onKeyUp={onKeyUp}\n >\n {t('link_preview')}\n </StyledLinkPopoverBtn>\n <StyledLinkPopoverBtn\n forwardedAs='a'\n href={href}\n ref={openInTabBtnRef}\n target='_blank'\n rel='noreferrer'\n onBlur={closePopover}\n onKeyUp={onKeyUp}\n >\n {t('link_open_in_tab')}\n </StyledLinkPopoverBtn>\n </Popover>\n </>\n );\n }\n);\n\nexport default Link;\n"]}
1
+ {"version":3,"file":"Link.js","sourceRoot":"","sources":["../../../src/components/Link/Link.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EAKV,QAAQ,EACR,MAAM,EAEN,UAAU,EACX,MAAM,OAAO,CAAC;AACf,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,MAAuB,MAAM,WAAW,CAAC;AAChD,OAAO,OAAO,MAAM,YAAY,CAAC;AACjC,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAC9C,OAAO,kBAAkB,MAAM,uBAAuB,CAAC;AAEvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,eAAe,MAAM,6BAA6B,CAAC;AA2B1D,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,GAAG,CAAA;sBACrB,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAA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AM,EAAC,QAAQ,EACf,GAAG,EAAC,YAAY,EAChB,QAAQ,EAAC,IAAI,EACb,OAAO,EAAE,WAAW,EACpB,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,OAAO,YAEf,CAAC,CAAC,uBAAuB,CAAC,WACN,YACf,EAET,WAAW,IAAI,CACd,KAAC,kBAAkB,IAAC,EAAE,EAAE,GAAG,GAAG,uBAAuB,YAClD,CAAC,CAAC,+BAA+B,CAAC,WAChB,CACtB,YACA,CACJ,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,IAAI,CAAC","sourcesContent":["import {\n forwardRef,\n ReactNode,\n FunctionComponent,\n Ref,\n PropsWithoutRef,\n useState,\n useRef,\n KeyboardEvent,\n useContext\n} from 'react';\nimport styled, { css } from 'styled-components';\nimport { readableColor } from 'polished';\n\nimport Button, { ButtonProps } from '../Button';\nimport Popover from '../Popover';\nimport BareButton from '../Button/BareButton';\nimport VisuallyHiddenText from '../VisuallyHiddenText';\nimport { BaseProps, ForwardProps } from '../../types';\nimport { defaultThemeProp } from '../../theme';\nimport { useBreakpoint, useConsolidatedRef, useI18n, useUID } from '../../hooks';\nimport { tryCatch } from '../../utils';\nimport { calculateFontSize } from '../../styles';\nimport { ModalManagerContext } from '../Modal';\nimport { modalInitializedKey } from '../Modal/Modal.types';\nimport AppShellContext from '../AppShell/AppShellContext';\n\nexport interface LinkProps extends BaseProps {\n /** Text or content for the Link. */\n children: ReactNode;\n /** URL or DOM id to navigate to. */\n href: string;\n /**\n * Controls the styling of the Link.\n * @default \"link\"\n */\n variant?: ButtonProps['variant'];\n /**\n * Set the Icon prop to `true` if you're using just an Icon in your Link. Make sure to pass an Icon as children if `true`.\n * @default false\n */\n icon?: ButtonProps['icon'];\n /** Determines if the Link should render a popover when focused or hovered over. */\n previewable?: boolean;\n /** Callback function that is run when the preview popover is interacted with. */\n onPreview?: (e: { href: string }) => void;\n /** Specifies where to open the link href. */\n target?: string;\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLAnchorElement>;\n}\n\nexport const StyledLinkPopover = styled.div`\n background-color: ${props => props.theme.components.tooltip['background-color']};\n`;\n\nStyledLinkPopover.defaultProps = defaultThemeProp;\n\nexport const StyledLinkPopoverBtn = styled(BareButton)(({ theme }) => {\n const contrastColor = tryCatch(() => readableColor(theme.base.palette.interactive));\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n return css`\n position: relative;\n display: inline-flex;\n align-items: center;\n z-index: 1;\n padding: 0 ${theme.base.spacing};\n min-height: 1.5rem;\n line-height: 1;\n color: ${contrastColor};\n font-size: ${fontSize.xs};\n text-decoration: none;\n\n /* FIXME: Button selector specificity... */\n & + & {\n margin: 0;\n }\n\n & + &::before {\n content: '';\n position: absolute;\n inset-inline-start: 0;\n inset-block: 0;\n width: 1px; /* stylelint-disable-line unit-allowed-list */\n background-color: ${contrastColor};\n opacity: ${theme.base.transparency['transparent-3']};\n }\n\n &:hover,\n &:active {\n text-decoration: underline;\n }\n\n &:focus {\n box-shadow: inset 0 0 0 0.0625rem ${theme.base.palette.light},\n 0 0 0.125rem 0.0625rem ${theme.base.palette.interactive};\n }\n `;\n});\n\nStyledLinkPopoverBtn.defaultProps = defaultThemeProp;\n\nexport const StyledLink = styled(Button)``;\n\nStyledLink.defaultProps = defaultThemeProp;\n\nconst Link: FunctionComponent<LinkProps & ForwardProps> = forwardRef(\n (\n { href, variant = 'link', previewable, onPreview, ...restProps }: PropsWithoutRef<LinkProps>,\n ref: LinkProps['ref']\n ) => {\n const { ModalContext } = useContext(ModalManagerContext);\n const { [modalInitializedKey]: inModal } = useContext(ModalContext);\n const { previewTriggerRef } = useContext(AppShellContext);\n const uid = useUID();\n const linkRef = useConsolidatedRef(ref);\n const [popover, setPopover] = useState(false);\n const previewBtnRef = useRef<HTMLButtonElement>(null);\n const openInTabBtnRef = useRef<HTMLAnchorElement>(null);\n const isSmallOrAbove = useBreakpoint('sm');\n const t = useI18n();\n\n const openPopover = () => {\n if (isSmallOrAbove) setPopover(true);\n };\n\n const closePopover = () => {\n setPopover(false);\n };\n\n const onKeyUp = (event: KeyboardEvent) => {\n if (event.keyCode === 27) {\n closePopover();\n }\n\n if (event.keyCode === 38 || event.keyCode === 40) {\n previewBtnRef?.current?.focus();\n }\n\n if (event.keyCode === 37 || event.keyCode === 39) {\n if (previewBtnRef.current === document.activeElement) {\n openInTabBtnRef?.current?.focus();\n } else {\n previewBtnRef?.current?.focus();\n }\n }\n };\n\n const onEnterLink = () => {\n if (previewable) openPopover();\n };\n\n const onPreviewClick = () => {\n previewTriggerRef.current = linkRef.current;\n onPreview?.({ href });\n };\n\n return (\n <>\n <StyledLink\n href={href}\n variant={variant}\n ref={linkRef as any}\n {...restProps}\n onMouseEnter={onEnterLink}\n onMouseLeave={closePopover}\n onFocus={onEnterLink}\n onKeyUp={onKeyUp}\n onBlur={closePopover}\n aria-describedby={previewable ? `${uid}-preview-instructions` : undefined}\n />\n\n <Popover\n show={popover}\n groupId='link_preview'\n showDelay='short'\n hideDelay='short'\n placement='bottom'\n target={linkRef.current}\n onMouseEnter={openPopover}\n onMouseLeave={closePopover}\n as={StyledLinkPopover}\n arrow\n >\n {!inModal && (\n <StyledLinkPopoverBtn\n preview\n type='button'\n ref={previewBtnRef}\n onClick={onPreviewClick}\n tabIndex='-1'\n onFocus={openPopover}\n onBlur={closePopover}\n onKeyUp={onKeyUp}\n >\n {t('preview')}\n </StyledLinkPopoverBtn>\n )}\n <StyledLinkPopoverBtn\n forwardedAs='a'\n href={href}\n ref={openInTabBtnRef}\n target='_blank'\n rel='noreferrer'\n tabIndex='-1'\n onFocus={openPopover}\n onBlur={closePopover}\n onKeyUp={onKeyUp}\n >\n {t('link_open_in_tab_text')}\n </StyledLinkPopoverBtn>\n </Popover>\n\n {previewable && (\n <VisuallyHiddenText id={`${uid}-preview-instructions`}>\n {t('preview_link_arrow_navigation')}\n </VisuallyHiddenText>\n )}\n </>\n );\n }\n);\n\nexport default Link;\n"]}
@@ -0,0 +1,15 @@
1
+ import { FunctionComponent, ReactNode, Ref } from 'react';
2
+ import { BaseProps, ForwardProps } from '../../types';
3
+ export interface CommaSeparatedListProps extends BaseProps {
4
+ /** List content. */
5
+ items: ReactNode[];
6
+ /** List Heading. */
7
+ heading?: string;
8
+ /** Ref forwarded to the wrapping element. */
9
+ ref?: Ref<HTMLDivElement>;
10
+ }
11
+ export declare const StyledCommaSeparatedList: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
12
+ export declare const StyledCommaSeparatedListItem: import("styled-components").StyledComponent<"li", import("styled-components").DefaultTheme, {}, never>;
13
+ declare const CommaSeparatedList: FunctionComponent<CommaSeparatedListProps & ForwardProps>;
14
+ export default CommaSeparatedList;
15
+ //# sourceMappingURL=CommaSeparatedList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommaSeparatedList.d.ts","sourceRoot":"","sources":["../../../src/components/List/CommaSeparatedList.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,SAAS,EAIT,GAAG,EAIJ,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAQtD,MAAM,WAAW,uBAAwB,SAAQ,SAAS;IACxD,oBAAoB;IACpB,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6CAA6C;IAC7C,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B;AAED,eAAO,MAAM,wBAAwB,yGAOnC,CAAC;AAIH,eAAO,MAAM,4BAA4B,wGAMxC,CAAC;AAyDF,QAAA,MAAM,kBAAkB,EAAE,iBAAiB,CAAC,uBAAuB,GAAG,YAAY,CAmBjF,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,61 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { forwardRef, useState, useLayoutEffect, useMemo, useRef } from 'react';
3
+ import styled, { css } from 'styled-components';
4
+ import { defaultThemeProp } from '../../theme';
5
+ import { useI18n } from '../../hooks';
6
+ import Button from '../Button';
7
+ import Text from '../Text';
8
+ import ExpandCollapse from '../ExpandCollapse';
9
+ import { windowIsAvailable } from '../../utils';
10
+ export const StyledCommaSeparatedList = styled.div(({ theme }) => {
11
+ return css `
12
+ padding: ${theme.base.spacing};
13
+ h3 {
14
+ padding-block-end: calc(2 * ${theme.base.spacing});
15
+ }
16
+ `;
17
+ });
18
+ StyledCommaSeparatedList.defaultProps = defaultThemeProp;
19
+ export const StyledCommaSeparatedListItem = styled.li `
20
+ display: inline;
21
+
22
+ &:not(:last-child)::after {
23
+ content: ', ';
24
+ }
25
+ `;
26
+ const DynamicHeightValue = ({ children }) => {
27
+ const [collapsed, setCollapsed] = useState(true);
28
+ const [exceedsMaxHeight, setExceedsMaxHeight] = useState(false);
29
+ const textRef = useRef(null);
30
+ const t = useI18n();
31
+ const maxTextHeight = useMemo(() => {
32
+ if (!windowIsAvailable)
33
+ return Infinity;
34
+ const computedLineHeight = Number.parseInt(window.getComputedStyle(document.documentElement).getPropertyValue('font-size'), 10) * 1.25;
35
+ return 3 * computedLineHeight;
36
+ }, []);
37
+ useLayoutEffect(() => {
38
+ if (!textRef.current)
39
+ return;
40
+ const observer = new ResizeObserver(entries => {
41
+ const exceedsHeight = entries.some(({ target, contentRect }) => {
42
+ if (target !== textRef.current)
43
+ return;
44
+ return contentRect.height > maxTextHeight;
45
+ });
46
+ setExceedsMaxHeight(exceedsHeight);
47
+ });
48
+ observer.observe(textRef.current);
49
+ return () => {
50
+ observer.disconnect();
51
+ };
52
+ }, [textRef.current, maxTextHeight]);
53
+ return (_jsxs(_Fragment, { children: [_jsx(ExpandCollapse, { collapsed: collapsed, min: exceedsMaxHeight ? `${maxTextHeight}px` : 'max-content', children: _jsx("div", { ref: textRef, children: children }, void 0) }, void 0), exceedsMaxHeight && (_jsx(Button, { variant: 'link', onClick: () => setCollapsed(current => !current), children: collapsed ? t('show_more') : t('show_less') }, void 0))] }, void 0));
54
+ };
55
+ const CommaSeparatedList = forwardRef(({ items, heading }, ref) => {
56
+ return (_jsxs(StyledCommaSeparatedList, { ref: ref, children: [heading && _jsx(Text, { variant: 'h3', children: heading }, void 0), _jsx(DynamicHeightValue, { children: _jsx("ul", { style: { listStyle: 'none' }, children: items.map((value, i) => (
57
+ // eslint-disable-next-line react/no-array-index-key
58
+ _jsx(StyledCommaSeparatedListItem, { children: value }, i))) }, void 0) }, void 0)] }, void 0));
59
+ });
60
+ export default CommaSeparatedList;
61
+ //# sourceMappingURL=CommaSeparatedList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommaSeparatedList.js","sourceRoot":"","sources":["../../../src/components/List/CommaSeparatedList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAGL,UAAU,EACV,QAAQ,EAGR,eAAe,EACf,OAAO,EACP,MAAM,EACP,MAAM,OAAO,CAAC;AACf,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAWhD,MAAM,CAAC,MAAM,wBAAwB,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IAC/D,OAAO,GAAG,CAAA;eACG,KAAK,CAAC,IAAI,CAAC,OAAO;;oCAEG,KAAK,CAAC,IAAI,CAAC,OAAO;;GAEnD,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,wBAAwB,CAAC,YAAY,GAAG,gBAAgB,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Component,\n ReactNode,\n forwardRef,\n useState,\n PropsWithoutRef,\n Ref,\n useLayoutEffect,\n useMemo,\n useRef\n} from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { BaseProps, ForwardProps } from '../../types';\nimport { defaultThemeProp } from '../../theme';\nimport { useI18n } from '../../hooks';\nimport Button from '../Button';\nimport Text from '../Text';\nimport ExpandCollapse from '../ExpandCollapse';\nimport { windowIsAvailable } from '../../utils';\n\nexport interface CommaSeparatedListProps extends BaseProps {\n /** List content. */\n items: ReactNode[];\n /** List Heading. */\n heading?: string;\n /** Ref forwarded to the wrapping element. */\n ref?: Ref<HTMLDivElement>;\n}\n\nexport const StyledCommaSeparatedList = styled.div(({ theme }) => {\n return css`\n padding: ${theme.base.spacing};\n h3 {\n padding-block-end: calc(2 * ${theme.base.spacing});\n }\n `;\n});\n\nStyledCommaSeparatedList.defaultProps = defaultThemeProp;\n\nexport const StyledCommaSeparatedListItem = styled.li`\n display: inline;\n\n &:not(:last-child)::after {\n content: ', ';\n }\n`;\n\nconst DynamicHeightValue = ({ children }: { children: ReactNode }): JSX.Element => {\n const [collapsed, setCollapsed] = useState(true);\n const [exceedsMaxHeight, setExceedsMaxHeight] = useState(false);\n const textRef = useRef<HTMLDivElement>(null);\n const t = useI18n();\n\n const maxTextHeight = useMemo(() => {\n if (!windowIsAvailable) return Infinity;\n\n const computedLineHeight =\n Number.parseInt(\n window.getComputedStyle(document.documentElement).getPropertyValue('font-size'),\n 10\n ) * 1.25;\n\n return 3 * computedLineHeight;\n }, []);\n\n useLayoutEffect(() => {\n if (!textRef.current) return;\n\n const observer = new ResizeObserver(entries => {\n const exceedsHeight = entries.some(({ target, contentRect }) => {\n if (target !== textRef.current) return;\n\n return contentRect.height > maxTextHeight;\n });\n\n setExceedsMaxHeight(exceedsHeight);\n });\n\n observer.observe(textRef.current);\n\n return () => {\n observer.disconnect();\n };\n }, [textRef.current, maxTextHeight]);\n\n return (\n <>\n <ExpandCollapse\n collapsed={collapsed}\n min={exceedsMaxHeight ? `${maxTextHeight}px` : 'max-content'}\n >\n <div ref={textRef}>{children}</div>\n </ExpandCollapse>\n {exceedsMaxHeight && (\n <Button variant='link' onClick={() => setCollapsed(current => !current)}>\n {collapsed ? t('show_more') : t('show_less')}\n </Button>\n )}\n </>\n );\n};\n\nconst CommaSeparatedList: FunctionComponent<CommaSeparatedListProps & ForwardProps> = forwardRef(\n (\n { items, heading }: PropsWithoutRef<CommaSeparatedListProps>,\n ref: CommaSeparatedListProps['ref']\n ) => {\n return (\n <StyledCommaSeparatedList ref={ref}>\n {heading && <Text variant='h3'>{heading}</Text>}\n <DynamicHeightValue>\n <ul style={{ listStyle: 'none' }}>\n {items.map((value, i) => (\n // eslint-disable-next-line react/no-array-index-key\n <StyledCommaSeparatedListItem key={i}>{value}</StyledCommaSeparatedListItem>\n ))}\n </ul>\n </DynamicHeightValue>\n </StyledCommaSeparatedList>\n );\n }\n);\n\nexport default CommaSeparatedList;\n"]}
@@ -0,0 +1,30 @@
1
+ import { FunctionComponent, ReactNode, Ref } from 'react';
2
+ import { BaseProps, ForwardProps, NoChildrenProp } from '../../types';
3
+ export interface ListProps extends BaseProps, NoChildrenProp {
4
+ /** List content. */
5
+ items: ReactNode[];
6
+ /** List Heading. */
7
+ heading?: string;
8
+ /** Number of list items that need to be shown. */
9
+ count?: number;
10
+ /** Callback to display more/less items. */
11
+ onToggleShow?: () => void;
12
+ /** Ref forwarded to the wrapping element. */
13
+ ref?: Ref<HTMLDivElement>;
14
+ }
15
+ interface VisualListProps extends ListProps {
16
+ /** Type of list. */
17
+ variant: 'ordered' | 'unordered';
18
+ /** Depth of list (used for recursion). */
19
+ depth?: number;
20
+ }
21
+ declare const olTypes: readonly ["decimal", "lower-alpha", "lower-roman"];
22
+ declare const ulTypes: readonly ["disc", "circle", "square"];
23
+ export declare const StyledList: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
24
+ depth: number;
25
+ listType: typeof olTypes[number] | typeof ulTypes[number];
26
+ }, never>;
27
+ export declare const StyledSublistItem: import("styled-components").StyledComponent<"li", import("styled-components").DefaultTheme, {}, never>;
28
+ declare const List: FunctionComponent<VisualListProps & ForwardProps>;
29
+ export default List;
30
+ //# sourceMappingURL=List.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../src/components/List/List.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAA+B,GAAG,EAAE,MAAM,OAAO,CAAC;AAGvF,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAOtE,MAAM,WAAW,SAAU,SAAQ,SAAS,EAAE,cAAc;IAC1D,oBAAoB;IACpB,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2CAA2C;IAC3C,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,6CAA6C;IAC7C,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B;AAED,UAAU,eAAgB,SAAQ,SAAS;IACzC,oBAAoB;IACpB,OAAO,EAAE,SAAS,GAAG,WAAW,CAAC;IACjC,0CAA0C;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,QAAA,MAAM,OAAO,oDAAqD,CAAC;AACnE,QAAA,MAAM,OAAO,uCAAwC,CAAC;AAEtD,eAAO,MAAM,UAAU;WACd,MAAM;cACH,cAAc,CAAC,MAAM,CAAC,GAAG,cAAc,CAAC,MAAM,CAAC;SAgCzD,CAAC;AAIH,eAAO,MAAM,iBAAiB,wGAE7B,CAAC;AAEF,QAAA,MAAM,IAAI,EAAE,iBAAiB,CAAC,eAAe,GAAG,YAAY,CA2C3D,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -0,0 +1,56 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { forwardRef } from 'react';
3
+ import styled, { css } from 'styled-components';
4
+ import { defaultThemeProp } from '../../theme';
5
+ import { calculateFontSize } from '../../styles';
6
+ import Button from '../Button';
7
+ import Text from '../Text';
8
+ import { useI18n } from '../../hooks';
9
+ const olTypes = ['decimal', 'lower-alpha', 'lower-roman'];
10
+ const ulTypes = ['disc', 'circle', 'square'];
11
+ export const StyledList = styled.div(({ theme, depth, listType }) => {
12
+ const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);
13
+ return css `
14
+ padding-inline-start: calc(2 * ${theme.base.spacing});
15
+ list-style-position: inside;
16
+ h3 {
17
+ margin-block-end: calc(2 * ${theme.base.spacing});
18
+ }
19
+
20
+ & > ol,
21
+ & > ul {
22
+ list-style-type: ${listType};
23
+
24
+ & > li {
25
+ &:not(:last-child) {
26
+ margin-block-end: calc(0.5 * ${theme.base.spacing});
27
+ }
28
+
29
+ ${depth > 0
30
+ ? css `
31
+ font-size: ${fontSize.xs};
32
+ `
33
+ : css `
34
+ &::marker {
35
+ font-weight: ${theme.base['font-weight'].bold};
36
+ }
37
+ `}
38
+ }
39
+ }
40
+ `;
41
+ });
42
+ StyledList.defaultProps = defaultThemeProp;
43
+ export const StyledSublistItem = styled.li `
44
+ list-style: none;
45
+ `;
46
+ const List = forwardRef(({ items, variant, count, onToggleShow, depth = 0, heading, ...restProps }, ref) => {
47
+ const t = useI18n();
48
+ const listContent = items.map((value, idx) => Array.isArray(value) ? (
49
+ // eslint-disable-next-line react/no-array-index-key
50
+ _jsx(StyledSublistItem, { children: _jsx(List, { depth: depth + 1, variant: variant, items: value }, void 0) }, idx)) : (
51
+ // eslint-disable-next-line react/no-array-index-key
52
+ _jsx("li", { children: value }, idx)));
53
+ return (_jsxs(StyledList, { ...restProps, ref: ref, depth: depth, listType: (variant === 'ordered' ? olTypes : ulTypes)[depth % 3], children: [heading && _jsx(Text, { variant: 'h3', children: heading }, void 0), variant === 'ordered' ? _jsx("ol", { children: listContent }, void 0) : _jsx("ul", { children: listContent }, void 0), count && onToggleShow && (_jsx(Button, { variant: 'link', onClick: onToggleShow, children: count > items.flat().length ? t('show_more') : t('show_less') }, void 0))] }, void 0));
54
+ });
55
+ export default List;
56
+ //# sourceMappingURL=List.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"List.js","sourceRoot":"","sources":["../../../src/components/List/List.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAgC,UAAU,EAAwB,MAAM,OAAO,CAAC;AACvF,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAsBtC,MAAM,OAAO,GAAG,CAAC,SAAS,EAAE,aAAa,EAAE,aAAa,CAAU,CAAC;AACnE,MAAM,OAAO,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,CAAU,CAAC;AAEtD,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAGjC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE;IAChC,MAAM,QAAQ,GAAG,iBAAiB,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;IAEtF,OAAO,GAAG,CAAA;qCACyB,KAAK,CAAC,IAAI,CAAC,OAAO;;;mCAGpB,KAAK,CAAC,IAAI,CAAC,OAAO;;;;;yBAK5B,QAAQ;;;;yCAIQ,KAAK,CAAC,IAAI,CAAC,OAAO;;;UAGjD,KAAK,GAAG,CAAC;QACT,CAAC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AC,CAAC,CAAC,uBAAK,WAAW,WAAM,CAAC,CAAC,CAAC,uBAAK,WAAW,WAAM,EACvE,KAAK,IAAI,YAAY,IAAI,CACxB,KAAC,MAAM,IAAC,OAAO,EAAC,MAAM,EAAC,OAAO,EAAE,YAAY,YACzC,KAAK,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,WACvD,CACV,YACU,CACd,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,IAAI,CAAC","sourcesContent":["import { FunctionComponent, ReactNode, forwardRef, PropsWithoutRef, Ref } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { BaseProps, ForwardProps, NoChildrenProp } from '../../types';\nimport { defaultThemeProp } from '../../theme';\nimport { calculateFontSize } from '../../styles';\nimport Button from '../Button';\nimport Text from '../Text';\nimport { useI18n } from '../../hooks';\n\nexport interface ListProps extends BaseProps, NoChildrenProp {\n /** List content. */\n items: ReactNode[];\n /** List Heading. */\n heading?: string;\n /** Number of list items that need to be shown. */\n count?: number;\n /** Callback to display more/less items. */\n onToggleShow?: () => void;\n /** Ref forwarded to the wrapping element. */\n ref?: Ref<HTMLDivElement>;\n}\n\ninterface VisualListProps extends ListProps {\n /** Type of list. */\n variant: 'ordered' | 'unordered';\n /** Depth of list (used for recursion). */\n depth?: number;\n}\n\nconst olTypes = ['decimal', 'lower-alpha', 'lower-roman'] as const;\nconst ulTypes = ['disc', 'circle', 'square'] as const;\n\nexport const StyledList = styled.div<{\n depth: number;\n listType: typeof olTypes[number] | typeof ulTypes[number];\n}>(({ theme, depth, listType }) => {\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n return css`\n padding-inline-start: calc(2 * ${theme.base.spacing});\n list-style-position: inside;\n h3 {\n margin-block-end: calc(2 * ${theme.base.spacing});\n }\n\n & > ol,\n & > ul {\n list-style-type: ${listType};\n\n & > li {\n &:not(:last-child) {\n margin-block-end: calc(0.5 * ${theme.base.spacing});\n }\n\n ${depth > 0\n ? css`\n font-size: ${fontSize.xs};\n `\n : css`\n &::marker {\n font-weight: ${theme.base['font-weight'].bold};\n }\n `}\n }\n }\n `;\n});\n\nStyledList.defaultProps = defaultThemeProp;\n\nexport const StyledSublistItem = styled.li`\n list-style: none;\n`;\n\nconst List: FunctionComponent<VisualListProps & ForwardProps> = forwardRef(\n (\n {\n items,\n variant,\n count,\n onToggleShow,\n depth = 0,\n heading,\n ...restProps\n }: PropsWithoutRef<VisualListProps>,\n ref: VisualListProps['ref']\n ) => {\n const t = useI18n();\n const listContent = items.map((value, idx) =>\n Array.isArray(value) ? (\n // eslint-disable-next-line react/no-array-index-key\n <StyledSublistItem key={idx}>\n <List depth={depth + 1} variant={variant} items={value} />\n </StyledSublistItem>\n ) : (\n // eslint-disable-next-line react/no-array-index-key\n <li key={idx}>{value}</li>\n )\n );\n\n return (\n <StyledList\n {...restProps}\n ref={ref}\n depth={depth}\n listType={(variant === 'ordered' ? olTypes : ulTypes)[depth % 3]}\n >\n {heading && <Text variant='h3'>{heading}</Text>}\n {variant === 'ordered' ? <ol>{listContent}</ol> : <ul>{listContent}</ul>}\n {count && onToggleShow && (\n <Button variant='link' onClick={onToggleShow}>\n {count > items.flat().length ? t('show_more') : t('show_less')}\n </Button>\n )}\n </StyledList>\n );\n }\n);\n\nexport default List;\n"]}
@@ -0,0 +1,6 @@
1
+ import { FC } from 'react';
2
+ import { ForwardProps } from '../../types';
3
+ import { ListProps } from './List';
4
+ declare const OrderedList: FC<ListProps & ForwardProps>;
5
+ export default OrderedList;
6
+ //# sourceMappingURL=OrderedList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OrderedList.d.ts","sourceRoot":"","sources":["../../../src/components/List/OrderedList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAc,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAa,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEzC,QAAA,MAAM,WAAW,EAAE,EAAE,CAAC,SAAS,GAAG,YAAY,CAE7C,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from 'react';
3
+ import List from './List';
4
+ const OrderedList = forwardRef((props, ref) => _jsx(List, { ...props, variant: 'ordered', ref: ref }, void 0));
5
+ export default OrderedList;
6
+ //# sourceMappingURL=OrderedList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OrderedList.js","sourceRoot":"","sources":["../../../src/components/List/OrderedList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAM,UAAU,EAAE,MAAM,OAAO,CAAC;AAIvC,OAAO,IAAmB,MAAM,QAAQ,CAAC;AAEzC,MAAM,WAAW,GAAiC,UAAU,CAC1D,CAAC,KAAgB,EAAE,GAAqB,EAAE,EAAE,CAAC,KAAC,IAAI,OAAK,KAAK,EAAE,OAAO,EAAC,SAAS,EAAC,GAAG,EAAE,GAAG,WAAI,CAC7F,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import { FC, forwardRef } from 'react';\n\nimport { ForwardProps } from '../../types';\n\nimport List, { ListProps } from './List';\n\nconst OrderedList: FC<ListProps & ForwardProps> = forwardRef(\n (props: ListProps, ref: ListProps['ref']) => <List {...props} variant='ordered' ref={ref} />\n);\n\nexport default OrderedList;\n"]}
@@ -0,0 +1,6 @@
1
+ import { FC } from 'react';
2
+ import { ForwardProps } from '../../types';
3
+ import { ListProps } from './List';
4
+ declare const UnorderedList: FC<ListProps & ForwardProps>;
5
+ export default UnorderedList;
6
+ //# sourceMappingURL=UnorderedList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnorderedList.d.ts","sourceRoot":"","sources":["../../../src/components/List/UnorderedList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAc,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAa,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEzC,QAAA,MAAM,aAAa,EAAE,EAAE,CAAC,SAAS,GAAG,YAAY,CAE/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from 'react';
3
+ import List from './List';
4
+ const UnorderedList = forwardRef((props, ref) => _jsx(List, { ...props, variant: 'unordered', ref: ref }, void 0));
5
+ export default UnorderedList;
6
+ //# sourceMappingURL=UnorderedList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnorderedList.js","sourceRoot":"","sources":["../../../src/components/List/UnorderedList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAM,UAAU,EAAE,MAAM,OAAO,CAAC;AAIvC,OAAO,IAAmB,MAAM,QAAQ,CAAC;AAEzC,MAAM,aAAa,GAAiC,UAAU,CAC5D,CAAC,KAAgB,EAAE,GAAqB,EAAE,EAAE,CAAC,KAAC,IAAI,OAAK,KAAK,EAAE,OAAO,EAAC,WAAW,EAAC,GAAG,EAAE,GAAG,WAAI,CAC/F,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import { FC, forwardRef } from 'react';\n\nimport { ForwardProps } from '../../types';\n\nimport List, { ListProps } from './List';\n\nconst UnorderedList: FC<ListProps & ForwardProps> = forwardRef(\n (props: ListProps, ref: ListProps['ref']) => <List {...props} variant='unordered' ref={ref} />\n);\n\nexport default UnorderedList;\n"]}
@@ -0,0 +1,5 @@
1
+ export { default as UnorderedList } from './UnorderedList';
2
+ export { default as OrderedList } from './OrderedList';
3
+ export { ListProps as UnorderedListProps, ListProps as OrderedListProps } from './List';
4
+ export { default as CommaSeparatedList, CommaSeparatedListProps } from './CommaSeparatedList';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/List/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,SAAS,IAAI,kBAAkB,EAAE,SAAS,IAAI,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AACxF,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { default as UnorderedList } from './UnorderedList';
2
+ export { default as OrderedList } from './OrderedList';
3
+ export { default as CommaSeparatedList } from './CommaSeparatedList';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/List/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AAEvD,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAA2B,MAAM,sBAAsB,CAAC","sourcesContent":["export { default as UnorderedList } from './UnorderedList';\nexport { default as OrderedList } from './OrderedList';\nexport { ListProps as UnorderedListProps, ListProps as OrderedListProps } from './List';\nexport { default as CommaSeparatedList, CommaSeparatedListProps } from './CommaSeparatedList';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"CurrentLocationButton.d.ts","sourceRoot":"","sources":["../../../src/components/Location/CurrentLocationButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAgD,MAAM,OAAO,CAAC;AAYzE,oBAAY,0BAA0B,GAAG;IACvC,sFAAsF;IACtF,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE;QACjB,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,KAAK,IAAI,CAAC;IACX,2CAA2C;IAC3C,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,qDAAqD;IACrD,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACpC,CAAC;AAEF,eAAO,MAAM,2BAA2B;6BAA6C,OAAO;SAa3F,CAAC;AAIF,QAAA,MAAM,qBAAqB,EAAE,EAAE,CAAC,0BAA0B,CAoDzD,CAAC;AACF,eAAe,qBAAqB,CAAC"}
1
+ {"version":3,"file":"CurrentLocationButton.d.ts","sourceRoot":"","sources":["../../../src/components/Location/CurrentLocationButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAgD,MAAM,OAAO,CAAC;AAezE,oBAAY,0BAA0B,GAAG;IACvC,sFAAsF;IACtF,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE;QACjB,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,KAAK,IAAI,CAAC;IACX,2CAA2C;IAC3C,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,qDAAqD;IACrD,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACpC,CAAC;AAEF,eAAO,MAAM,2BAA2B;6BAA6C,OAAO;SAa3F,CAAC;AAIF,QAAA,MAAM,qBAAqB,EAAE,EAAE,CAAC,0BAA0B,CAoDzD,CAAC;AACF,eAAe,qBAAqB,CAAC"}
@@ -3,11 +3,13 @@ import { useCallback, useContext, useEffect, useState } from 'react';
3
3
  import styled, { css } from 'styled-components';
4
4
  import Tooltip from '../Tooltip';
5
5
  import { useElement, useI18n } from '../../hooks';
6
- import Icon from '../Icon';
6
+ import Icon, { registerIcon } from '../Icon';
7
+ import * as locationIcon from '../Icon/icons/location.icon';
7
8
  import Button from '../Button';
8
9
  import { defaultThemeProp } from '../../theme';
9
10
  import MapsContext from './MapsContext';
10
11
  import { getNavigatorPosition, getAddress, loadMapsAPI } from './utils';
12
+ registerIcon(locationIcon);
11
13
  export const StyledCurrentLocationButton = styled(Button)(({ currentLocationDisabled, theme: { base: { 'disabled-opacity': disabledOpacity } } }) => css `
12
14
  ${currentLocationDisabled &&
13
15
  css `
@@ -28,12 +30,11 @@ const CurrentLocationButton = ({ onChange, onError, defaultToCurrentLocation })
28
30
  throw error;
29
31
  })
30
32
  .then(getAddress)
31
- .then(address => onChange === null || onChange === void 0 ? void 0 : onChange(address))
32
- .catch(error => onError === null || onError === void 0 ? void 0 : onError(error));
33
+ .then(address => onChange?.(address))
34
+ .catch(error => onError?.(error));
33
35
  }, [onChange, onError]);
34
36
  useEffect(() => {
35
- var _a;
36
- (_a = navigator.permissions) === null || _a === void 0 ? void 0 : _a.query({ name: 'geolocation' }).then(result => {
37
+ navigator.permissions?.query({ name: 'geolocation' }).then(result => {
37
38
  if (result.state === 'denied') {
38
39
  setCurrentLocationDisabled(true);
39
40
  }
@@ -42,8 +43,7 @@ const CurrentLocationButton = ({ onChange, onError, defaultToCurrentLocation })
42
43
  loadMapsAPI(name, providerOpts).then(getCurrentLocation);
43
44
  }
44
45
  }, []);
45
- return (_jsxs(_Fragment, { children: [_jsx(Button, Object.assign({ ref: setEl, as: StyledCurrentLocationButton, variant: 'simple', icon: true, onClick: getCurrentLocation, "aria-label": t('my_current_location_button_a11y'), currentLocationDisabled: currentLocationDisabled }, { children: _jsx(Icon, { name: 'location' }, void 0) }), void 0),
46
- el && currentLocationDisabled && (_jsx(Tooltip, Object.assign({ shown: true, target: el }, { children: t('allow_location_permissions_text') }), void 0))] }, void 0));
46
+ return (_jsxs(_Fragment, { children: [_jsx(Button, { ref: setEl, as: StyledCurrentLocationButton, variant: 'simple', icon: true, onClick: getCurrentLocation, "aria-label": t('my_current_location_button_a11y'), currentLocationDisabled: currentLocationDisabled, children: _jsx(Icon, { name: 'location' }, void 0) }, void 0), el && currentLocationDisabled && (_jsx(Tooltip, { shown: true, target: el, children: t('allow_location_permissions_text') }, void 0))] }, void 0));
47
47
  };
48
48
  export default CurrentLocationButton;
49
49
  //# sourceMappingURL=CurrentLocationButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CurrentLocationButton.js","sourceRoot":"","sources":["../../../src/components/Location/CurrentLocationButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAM,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,OAAO,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAgBxE,MAAM,CAAC,MAAM,2BAA2B,GAAG,MAAM,CAAC,MAAM,CAAC,CACvD,CAAC,EACC,uBAAuB,EACvB,KAAK,EAAE,EACL,IAAI,EAAE,EAAE,kBAAkB,EAAE,eAAe,EAAE,EAC9C,EACF,EAAE,EAAE,CAAC,GAAG,CAAA;MACL,uBAAuB;IACzB,GAAG,CAAA;iBACU,eAAe;;KAE3B;GACF,CACF,CAAC;AAEF,2BAA2B,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE5D,MAAM,qBAAqB,GAAmC,CAAC,EAC7D,QAAQ,EACR,OAAO,EACP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MAAM,kBACL,GAAG,EAAE,KAAK,EACV,EAAE,EAAE,2BAA2B,EAC/B,OAAO,EAAC,QAAQ,EAChB,IAAI,QACJ,OAAO,EAAE,kBAAkB,gBACf,CAAC,CAAC,iCAAiC,CAAC,EAChD,uBAAuB,EAAE,uBAAuB,gBAEhD,KAAC,IAAI,IAAC,IAAI,EAAC,UAAU,WAAG,YACjB;YACR,EAAE,IAAI,uBAAuB,IAAI,CAChC,KAAC,OAAO,kBAAC,KAAK,QAAC,MAAM,EAAE,EAAE,gBACtB,CAAC,CAAC,iCAAiC,CAAC,YAC7B,CACX,YACA,CACJ,CAAC;AACJ,CAAC,CAAC;AACF,eAAe,qBAAqB,CAAC","sourcesContent":["import { FC, useCallback, useContext, useEffect, useState } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport Tooltip from '../Tooltip';\nimport { useElement, useI18n } from '../../hooks';\nimport Icon from '../Icon';\nimport Button from '../Button';\nimport { defaultThemeProp } from '../../theme';\n\nimport MapsContext from './MapsContext';\nimport { getNavigatorPosition, getAddress, loadMapsAPI } from './utils';\n\nexport type CurrentLocationButtonProps = {\n /** Callback fired after click on my current location button if location was found. */\n onChange?: (value: {\n name: string;\n address?: string;\n latitude?: number;\n longitude?: number;\n }) => void;\n /** Callback fired when an error occurs. */\n onError?: (error: Error) => void;\n /** Get current location on component first render */\n defaultToCurrentLocation?: boolean;\n};\n\nexport const StyledCurrentLocationButton = styled(Button)<{ currentLocationDisabled: boolean }>(\n ({\n currentLocationDisabled,\n theme: {\n base: { 'disabled-opacity': disabledOpacity }\n }\n }) => css`\n ${currentLocationDisabled &&\n css`\n opacity: ${disabledOpacity};\n cursor: auto;\n `}\n `\n);\n\nStyledCurrentLocationButton.defaultProps = defaultThemeProp;\n\nconst CurrentLocationButton: FC<CurrentLocationButtonProps> = ({\n onChange,\n onError,\n defaultToCurrentLocation\n}: CurrentLocationButtonProps) => {\n const t = useI18n();\n const { name, ...providerOpts } = useContext(MapsContext);\n const [currentLocationDisabled, setCurrentLocationDisabled] = useState(false);\n const [el, setEl] = useElement();\n\n const getCurrentLocation = useCallback(() => {\n getNavigatorPosition()\n .catch(error => {\n setCurrentLocationDisabled(true);\n throw error;\n })\n .then(getAddress)\n .then(address => onChange?.(address))\n .catch(error => onError?.(error));\n }, [onChange, onError]);\n\n useEffect(() => {\n navigator.permissions?.query({ name: 'geolocation' }).then(result => {\n if (result.state === 'denied') {\n setCurrentLocationDisabled(true);\n }\n });\n if (defaultToCurrentLocation) {\n loadMapsAPI(name, providerOpts).then(getCurrentLocation);\n }\n }, []);\n\n return (\n <>\n <Button\n ref={setEl}\n as={StyledCurrentLocationButton}\n variant='simple'\n icon\n onClick={getCurrentLocation}\n aria-label={t('my_current_location_button_a11y')}\n currentLocationDisabled={currentLocationDisabled}\n >\n <Icon name='location' />\n </Button>\n {el && currentLocationDisabled && (\n <Tooltip shown target={el}>\n {t('allow_location_permissions_text')}\n </Tooltip>\n )}\n </>\n );\n};\nexport default CurrentLocationButton;\n"]}
1
+ {"version":3,"file":"CurrentLocationButton.js","sourceRoot":"","sources":["../../../src/components/Location/CurrentLocationButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAM,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,OAAO,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,IAAI,EAAE,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,YAAY,MAAM,6BAA6B,CAAC;AAC5D,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,UAAU,EAAE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S,CAAC,WAAW,EAAE,KAAK,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;YAClE,IAAI,MAAM,CAAC,KAAK,KAAK,QAAQ,EAAE;gBAC7B,0BAA0B,CAAC,IAAI,CAAC,CAAC;aAClC;QACH,CAAC,CAAC,CAAC;QACH,IAAI,wBAAwB,EAAE;YAC5B,WAAW,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;SAC1D;IACH,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,8BACE,KAAC,MAAM,IACL,GAAG,EAAE,KAAK,EACV,EAAE,EAAE,2BAA2B,EAC/B,OAAO,EAAC,QAAQ,EAChB,IAAI,QACJ,OAAO,EAAE,kBAAkB,gBACf,CAAC,CAAC,iCAAiC,CAAC,EAChD,uBAAuB,EAAE,uBAAuB,YAEhD,KAAC,IAAI,IAAC,IAAI,EAAC,UAAU,WAAG,WACjB,EACR,EAAE,IAAI,uBAAuB,IAAI,CAChC,KAAC,OAAO,IAAC,KAAK,QAAC,MAAM,EAAE,EAAE,YACtB,CAAC,CAAC,iCAAiC,CAAC,WAC7B,CACX,YACA,CACJ,CAAC;AACJ,CAAC,CAAC;AACF,eAAe,qBAAqB,CAAC","sourcesContent":["import { FC, useCallback, useContext, useEffect, useState } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport Tooltip from '../Tooltip';\nimport { useElement, useI18n } from '../../hooks';\nimport Icon, { registerIcon } from '../Icon';\nimport * as locationIcon from '../Icon/icons/location.icon';\nimport Button from '../Button';\nimport { defaultThemeProp } from '../../theme';\n\nimport MapsContext from './MapsContext';\nimport { getNavigatorPosition, getAddress, loadMapsAPI } from './utils';\n\nregisterIcon(locationIcon);\n\nexport type CurrentLocationButtonProps = {\n /** Callback fired after click on my current location button if location was found. */\n onChange?: (value: {\n name: string;\n address?: string;\n latitude?: number;\n longitude?: number;\n }) => void;\n /** Callback fired when an error occurs. */\n onError?: (error: Error) => void;\n /** Get current location on component first render */\n defaultToCurrentLocation?: boolean;\n};\n\nexport const StyledCurrentLocationButton = styled(Button)<{ currentLocationDisabled: boolean }>(\n ({\n currentLocationDisabled,\n theme: {\n base: { 'disabled-opacity': disabledOpacity }\n }\n }) => css`\n ${currentLocationDisabled &&\n css`\n opacity: ${disabledOpacity};\n cursor: auto;\n `}\n `\n);\n\nStyledCurrentLocationButton.defaultProps = defaultThemeProp;\n\nconst CurrentLocationButton: FC<CurrentLocationButtonProps> = ({\n onChange,\n onError,\n defaultToCurrentLocation\n}: CurrentLocationButtonProps) => {\n const t = useI18n();\n const { name, ...providerOpts } = useContext(MapsContext);\n const [currentLocationDisabled, setCurrentLocationDisabled] = useState(false);\n const [el, setEl] = useElement();\n\n const getCurrentLocation = useCallback(() => {\n getNavigatorPosition()\n .catch(error => {\n setCurrentLocationDisabled(true);\n throw error;\n })\n .then(getAddress)\n .then(address => onChange?.(address))\n .catch(error => onError?.(error));\n }, [onChange, onError]);\n\n useEffect(() => {\n navigator.permissions?.query({ name: 'geolocation' }).then(result => {\n if (result.state === 'denied') {\n setCurrentLocationDisabled(true);\n }\n });\n if (defaultToCurrentLocation) {\n loadMapsAPI(name, providerOpts).then(getCurrentLocation);\n }\n }, []);\n\n return (\n <>\n <Button\n ref={setEl}\n as={StyledCurrentLocationButton}\n variant='simple'\n icon\n onClick={getCurrentLocation}\n aria-label={t('my_current_location_button_a11y')}\n currentLocationDisabled={currentLocationDisabled}\n >\n <Icon name='location' />\n </Button>\n {el && currentLocationDisabled && (\n <Tooltip shown target={el}>\n {t('allow_location_permissions_text')}\n </Tooltip>\n )}\n </>\n );\n};\nexport default CurrentLocationButton;\n"]}
@@ -1,5 +1,6 @@
1
+ import { NoChildrenProp } from '../../types';
1
2
  import { Bias, LatLng } from './types';
2
- export default interface BaseLocationProps {
3
+ export default interface BaseLocationProps extends NoChildrenProp {
3
4
  /**
4
5
  * Location in either text format (name or address) or coordinates.
5
6
  * @default 'current'
@@ -1 +1 @@
1
- {"version":3,"file":"Location.types.d.ts","sourceRoot":"","sources":["../../../src/components/Location/Location.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEvC,MAAM,CAAC,OAAO,WAAW,iBAAiB;IACxC;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACvC;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sGAAsG;IACtG,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,8DAA8D;IAC9D,IAAI,CAAC,EAAE,IAAI,CAAC;CACb"}
1
+ {"version":3,"file":"Location.types.d.ts","sourceRoot":"","sources":["../../../src/components/Location/Location.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEvC,MAAM,CAAC,OAAO,WAAW,iBAAkB,SAAQ,cAAc;IAC/D;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACvC;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sGAAsG;IACtG,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,8DAA8D;IAC9D,IAAI,CAAC,EAAE,IAAI,CAAC;CACb"}
@@ -1 +1 @@
1
- {"version":3,"file":"Location.types.js","sourceRoot":"","sources":["../../../src/components/Location/Location.types.ts"],"names":[],"mappings":"","sourcesContent":["import { Bias, LatLng } from './types';\n\nexport default interface BaseLocationProps {\n /**\n * Location in either text format (name or address) or coordinates.\n * @default 'current'\n */\n location?: LatLng | string | 'current';\n /**\n * Flag to control 'disabled' state for input.\n * @default false\n */\n disabled?: boolean;\n /** Callback fired when an error occurs. This function gets called with one argument of type Error. */\n onError?: (error: Error) => void;\n /** Biasing query results towards user location/preference. */\n bias?: Bias;\n}\n"]}
1
+ {"version":3,"file":"Location.types.js","sourceRoot":"","sources":["../../../src/components/Location/Location.types.ts"],"names":[],"mappings":"","sourcesContent":["import { NoChildrenProp } from '../../types';\n\nimport { Bias, LatLng } from './types';\n\nexport default interface BaseLocationProps extends NoChildrenProp {\n /**\n * Location in either text format (name or address) or coordinates.\n * @default 'current'\n */\n location?: LatLng | string | 'current';\n /**\n * Flag to control 'disabled' state for input.\n * @default false\n */\n disabled?: boolean;\n /** Callback fired when an error occurs. This function gets called with one argument of type Error. */\n onError?: (error: Error) => void;\n /** Biasing query results towards user location/preference. */\n bias?: Bias;\n}\n"]}
@@ -6,15 +6,14 @@ import LocationView from './LocationView';
6
6
  import MapsContext from './MapsContext';
7
7
  const LocationDisplay = forwardRef(({ value = '', displayText, variant = 'text-map', height = '25rem', zoomLevel = 13, ...restProps }, ref) => {
8
8
  const { name } = useContext(MapsContext);
9
- const valueString = typeof value === 'string' ? value : `${value === null || value === void 0 ? void 0 : value.latitude}, ${value === null || value === void 0 ? void 0 : value.longitude}`;
10
- return !value ? (_jsx(Text, Object.assign({ ref: ref }, restProps, { "aria-hidden": 'true' }, { children: _jsx("span", Object.assign({ "aria-hidden": 'true' }, { children: "\u2013\u2013" }), void 0) }), void 0)) : (_jsxs(_Fragment, { children: [(variant === 'text' || variant === 'text-map') &&
11
- (name === 'google' ? (_jsx(Link, Object.assign({ ref: ref }, restProps, { target: '_blank', rel: 'noopener noreferrer', href: `https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(typeof value === 'string' ? value : `${value === null || value === void 0 ? void 0 : value.latitude}, ${value === null || value === void 0 ? void 0 : value.longitude}`)}` }, { children: displayText || valueString }), void 0)) : (_jsx(Text, Object.assign({ ref: ref }, restProps, { children: displayText || valueString }), void 0))),
12
- (variant === 'text-map' || variant === 'map') && (_jsx(LocationView, Object.assign({}, {
13
- location: value,
14
- centerMapOnChange: true,
15
- height,
16
- zoomLevel
17
- }), void 0))] }, void 0));
9
+ const valueString = typeof value === 'string' ? value : `${value?.latitude}, ${value?.longitude}`;
10
+ return !value ? (_jsx(Text, { ref: ref, ...restProps, "aria-hidden": 'true', children: _jsx("span", { "aria-hidden": 'true', children: "\u2013\u2013" }, void 0) }, void 0)) : (_jsxs(_Fragment, { children: [(variant === 'text' || variant === 'text-map') &&
11
+ (name === 'google' ? (_jsx(Link, { ref: ref, ...restProps, target: '_blank', rel: 'noopener noreferrer', href: `https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(typeof value === 'string' ? value : `${value?.latitude}, ${value?.longitude}`)}`, children: displayText || valueString }, void 0)) : (_jsx(Text, { ref: ref, ...restProps, children: displayText || valueString }, void 0))), (variant === 'text-map' || variant === 'map') && (_jsx(LocationView, { ...{
12
+ location: value,
13
+ centerMapOnChange: true,
14
+ height,
15
+ zoomLevel
16
+ } }, void 0))] }, void 0));
18
17
  });
19
18
  export default LocationDisplay;
20
19
  //# sourceMappingURL=LocationDisplay.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LocationDisplay.js","sourceRoot":"","sources":["../../../src/components/Location/LocationDisplay.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAA2C,UAAU,EAAE,MAAM,OAAO,CAAC;AAExF,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,IAAI,MAAM,SAAS,CAAC;AAG3B,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,WAAW,MAAM,eAAe,CAAC;AA2BxC,MAAM,eAAe,GAA2D,UAAU,CACxF,CACE,EACE,KAAK,GAAG,EAAE,EACV,WAAW,EACX,OAAO,GAAG,UAAU,EACpB,MAAM,GAAG,OAAO,EAChB,SAAS,GAAG,EAAE,EACd,GAAG,SAAS,EAC0B,EACxC,GAAgC,EAChC,EAAE;IACF,MAAM,EAAE,IAAI,EAAE,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AEF,eAAe,eAAe,CAAC","sourcesContent":["import { forwardRef, FunctionComponent, PropsWithoutRef, Ref, useContext } from 'react';\n\nimport Text from '../Text';\nimport Link from '../Link';\nimport { BaseProps, ForwardProps } from '../../types';\n\nimport LocationView from './LocationView';\nimport MapsContext from './MapsContext';\nimport { LatLng } from './types';\n\nexport interface LocationDisplayProps extends BaseProps {\n /** Location address or coordinates */\n value?: string | LatLng;\n /** The text to be displayed. */\n displayText?: string;\n /**\n * Controls styling of the field.\n * @default \"text-map\"\n */\n variant?: 'text-map' | 'text' | 'map';\n /**\n * Height of the map container.\n * @default '25rem'\n */\n height?: string;\n /**\n * How much the map should zoom.\n * @default 13\n */\n zoomLevel?: number;\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLAnchorElement | HTMLSpanElement>;\n}\n\nconst LocationDisplay: FunctionComponent<LocationDisplayProps & ForwardProps> = forwardRef(\n (\n {\n value = '',\n displayText,\n variant = 'text-map',\n height = '25rem',\n zoomLevel = 13,\n ...restProps\n }: PropsWithoutRef<LocationDisplayProps>,\n ref: LocationDisplayProps['ref']\n ) => {\n const { name } = useContext(MapsContext);\n\n const valueString =\n typeof value === 'string' ? value : `${value?.latitude}, ${value?.longitude}`;\n\n return !value ? (\n <Text ref={ref as Ref<HTMLSpanElement>} {...restProps} aria-hidden='true'>\n <span aria-hidden='true'>&ndash;&ndash;</span>\n </Text>\n ) : (\n <>\n {(variant === 'text' || variant === 'text-map') &&\n (name === 'google' ? (\n <Link\n ref={ref as Ref<HTMLAnchorElement>}\n {...restProps}\n target='_blank'\n rel='noopener noreferrer'\n href={`https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(\n typeof value === 'string' ? value : `${value?.latitude}, ${value?.longitude}`\n )}`}\n >\n {displayText || valueString}\n </Link>\n ) : (\n <Text ref={ref as Ref<HTMLSpanElement>} {...restProps}>\n {displayText || valueString}\n </Text>\n ))}\n {(variant === 'text-map' || variant === 'map') && (\n <LocationView\n {...{\n location: value,\n centerMapOnChange: true,\n height,\n zoomLevel\n }}\n />\n )}\n </>\n );\n }\n);\n\nexport default LocationDisplay;\n"]}
1
+ {"version":3,"file":"LocationDisplay.js","sourceRoot":"","sources":["../../../src/components/Location/LocationDisplay.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAA2C,UAAU,EAAE,MAAM,OAAO,CAAC;AAExF,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,IAAI,MAAM,SAAS,CAAC;AAG3B,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,WAAW,MAAM,eAAe,CAAC;AA2BxC,MAAM,eAAe,GAA2D,UAAU,CACxF,CACE,EACE,KAAK,GAAG,EAAE,EACV,WAAW,EACX,OAAO,GAAG,UAAU,EACpB,MAAM,GAAG,OAAO,EAChB,SAAS,GAAG,EAAE,EACd,GAAG,SAAS,EAC0B,EACxC,GAAgC,EAChC,EAAE;IACF,MAAM,EAAE,IAAI,EAAE,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;IAEzC,MAAM,WAAW,GACf,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,EAAE,QAAQ,KAAK,KAAK,EAAE,SAAS,EAAE,CAAC;IAEhF,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CACd,KAAC,IAAI,IAAC,GAAG,EAAE,GAA2B,KAAM,SAAS,iBAAc,MAAM,YACvE,8BAAkB,MAAM,qCAAsB,WACzC,CACR,CAAC,CAAC,CAAC,CACF,8BACG,CAAC,OAAO,KAAK,MAAM,IAAI,OAAO,KAAK,UAAU,CAAC;gBAC7C,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,CACnB,KAAC,IAAI,IACH,GAAG,EAAE,GAA6B,KAC9B,SAAS,EACb,MAAM,EAAC,QAAQ,EACf,GAAG,EAAC,qBAAqB,EACzB,IAAI,EAAE,mDAAmD,kBAAkB,CACzE,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,EAAE,QAAQ,KAAK,KAAK,EAAE,SAAS,EAAE,CAC9E,EAAE,YAEF,WAAW,IAAI,WAAW,WACtB,CACR,CAAC,CAAC,CAAC,CACF,KAAC,IAAI,IAAC,GAAG,EAAE,GAA2B,KAAM,SAAS,YAClD,WAAW,IAAI,WAAW,WACtB,CACR,CAAC,EACH,CAAC,OAAO,KAAK,UAAU,IAAI,OAAO,KAAK,KAAK,CAAC,IAAI,CAChD,KAAC,YAAY,OACP;oBACF,QAAQ,EAAE,KAAK;oBACf,iBAAiB,EAAE,IAAI;oBACvB,MAAM;oBACN,SAAS;iBACV,WACD,CACH,YACA,CACJ,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["import { forwardRef, FunctionComponent, PropsWithoutRef, Ref, useContext } from 'react';\n\nimport Text from '../Text';\nimport Link from '../Link';\nimport { BaseProps, ForwardProps } from '../../types';\n\nimport LocationView from './LocationView';\nimport MapsContext from './MapsContext';\nimport { LatLng } from './types';\n\nexport interface LocationDisplayProps extends BaseProps {\n /** Location address or coordinates */\n value?: string | LatLng;\n /** The text to be displayed. */\n displayText?: string;\n /**\n * Controls styling of the field.\n * @default \"text-map\"\n */\n variant?: 'text-map' | 'text' | 'map';\n /**\n * Height of the map container.\n * @default '25rem'\n */\n height?: string;\n /**\n * How much the map should zoom.\n * @default 13\n */\n zoomLevel?: number;\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLAnchorElement | HTMLSpanElement>;\n}\n\nconst LocationDisplay: FunctionComponent<LocationDisplayProps & ForwardProps> = forwardRef(\n (\n {\n value = '',\n displayText,\n variant = 'text-map',\n height = '25rem',\n zoomLevel = 13,\n ...restProps\n }: PropsWithoutRef<LocationDisplayProps>,\n ref: LocationDisplayProps['ref']\n ) => {\n const { name } = useContext(MapsContext);\n\n const valueString =\n typeof value === 'string' ? value : `${value?.latitude}, ${value?.longitude}`;\n\n return !value ? (\n <Text ref={ref as Ref<HTMLSpanElement>} {...restProps} aria-hidden='true'>\n <span aria-hidden='true'>&ndash;&ndash;</span>\n </Text>\n ) : (\n <>\n {(variant === 'text' || variant === 'text-map') &&\n (name === 'google' ? (\n <Link\n ref={ref as Ref<HTMLAnchorElement>}\n {...restProps}\n target='_blank'\n rel='noopener noreferrer'\n href={`https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(\n typeof value === 'string' ? value : `${value?.latitude}, ${value?.longitude}`\n )}`}\n >\n {displayText || valueString}\n </Link>\n ) : (\n <Text ref={ref as Ref<HTMLSpanElement>} {...restProps}>\n {displayText || valueString}\n </Text>\n ))}\n {(variant === 'text-map' || variant === 'map') && (\n <LocationView\n {...{\n location: value,\n centerMapOnChange: true,\n height,\n zoomLevel\n }}\n />\n )}\n </>\n );\n }\n);\n\nexport default LocationDisplay;\n"]}
@@ -24,7 +24,7 @@ const LocationInput = forwardRef((props, ref) => {
24
24
  const [placePredictionMenu, setPlacePredictionMenu] = useState({ items: [] });
25
25
  const [filterValue, setFilterValue] = useState('');
26
26
  useEffect(() => {
27
- const mapApiPromise = loadMapsAPI(name, providerOpts).catch(error => onError === null || onError === void 0 ? void 0 : onError(error));
27
+ const mapApiPromise = loadMapsAPI(name, providerOpts).catch(error => onError?.(error));
28
28
  if (filterValue) {
29
29
  mapApiPromise
30
30
  .then(() => getPlacePredictions(filterValue, bias))
@@ -38,13 +38,13 @@ const LocationInput = forwardRef((props, ref) => {
38
38
  emptyText: t('location_not_found_text'),
39
39
  onItemClick: itemId => getPlaceById(itemId, token).then(arg => {
40
40
  setFilterValue('');
41
- onSelect === null || onSelect === void 0 ? void 0 : onSelect(arg);
41
+ onSelect?.(arg);
42
42
  })
43
43
  });
44
44
  })
45
45
  .catch(error => {
46
46
  setPlacePredictionMenu({ items: [] });
47
- onError === null || onError === void 0 ? void 0 : onError(error);
47
+ onError?.(error);
48
48
  });
49
49
  }
50
50
  else {
@@ -53,46 +53,45 @@ const LocationInput = forwardRef((props, ref) => {
53
53
  }, [filterValue, bias, onError, onSelect]);
54
54
  const onInputChange = useCallback((e) => {
55
55
  setFilterValue(e.target.value);
56
- onChange === null || onChange === void 0 ? void 0 : onChange(e.target.value);
56
+ onChange?.(e.target.value);
57
57
  }, [onChange]);
58
58
  const onMapClick = useCallback((placeInfo) => {
59
- onSelect === null || onSelect === void 0 ? void 0 : onSelect(placeInfo);
60
- onClick === null || onClick === void 0 ? void 0 : onClick(placeInfo);
59
+ onSelect?.(placeInfo);
60
+ onClick?.(placeInfo);
61
61
  }, [onSelect, onClick]);
62
- const Comp = (_jsxs(_Fragment, { children: [_jsx(ComboBox, Object.assign({ placeholder: t('location_input_placeholder'), menu: filterValue
62
+ const Comp = (_jsxs(_Fragment, { children: [_jsx(ComboBox, { placeholder: t('location_input_placeholder'), menu: filterValue
63
63
  ? {
64
64
  ...placePredictionMenu,
65
65
  items: placePredictionMenu.items.concat({
66
66
  id: createUID(),
67
- primary: t('use_location_input_value', `"${filterValue}"`)
67
+ primary: t('use_input_value', [filterValue])
68
68
  }),
69
69
  mode: 'action',
70
70
  emptyText: t('location_not_found_text'),
71
- footer: !showMap && (_jsx(Flex, Object.assign({ container: { justify: 'end' } }, { children: _jsx(PoweredByGoogleImage, {}, void 0) }), void 0))
71
+ footer: !showMap && (_jsx(Flex, { container: { justify: 'end' }, children: _jsx(PoweredByGoogleImage, {}, void 0) }, void 0))
72
72
  }
73
73
  : undefined, actions: !disabled &&
74
- !readOnly && (_jsx(CurrentLocationButton, Object.assign({}, { defaultToCurrentLocation, onError, onChange: onSelect }), void 0)), onChange: onInputChange, onBlur: () => {
74
+ !readOnly && (_jsx(CurrentLocationButton, { ...{ defaultToCurrentLocation, onError, onChange: onSelect } }, void 0)), onChange: onInputChange, onBlur: () => {
75
75
  setFilterValue('');
76
- onBlur === null || onBlur === void 0 ? void 0 : onBlur(value);
77
- }, value: value }, {
78
- required,
79
- disabled,
80
- readOnly,
81
- status,
82
- ...restProps
83
- }), void 0),
84
- showMap && (_jsx(StyledLocationMap, { children: _jsx(LocationView, Object.assign({}, {
85
- location,
86
- onClick: onMapClick,
87
- onError,
88
- bias,
76
+ onBlur?.(value);
77
+ }, value: value, ...{
78
+ required,
89
79
  disabled,
90
80
  readOnly,
91
- centerMapOnChange,
92
- height,
93
- zoomLevel
94
- }), void 0) }, void 0))] }, void 0));
95
- return label ? (_jsx(FormField, Object.assign({}, { label, labelHidden, id, info, status, ref, required, disabled }, { children: Comp }), void 0)) : (Comp);
81
+ status,
82
+ ...restProps
83
+ } }, void 0), showMap && (_jsx(StyledLocationMap, { children: _jsx(LocationView, { ...{
84
+ location,
85
+ onClick: onMapClick,
86
+ onError,
87
+ bias,
88
+ disabled,
89
+ readOnly,
90
+ centerMapOnChange,
91
+ height,
92
+ zoomLevel
93
+ } }, void 0) }, void 0))] }, void 0));
94
+ return label ? (_jsx(FormField, { ...{ label, labelHidden, id, info, status, ref, required, disabled }, children: Comp }, void 0)) : (Comp);
96
95
  });
97
96
  export default LocationInput;
98
97
  //# sourceMappingURL=LocationInput.js.map