@pega/cosmos-react-core 5.0.0-dev.5.0 → 5.0.0-dev.6.1

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 (739) hide show
  1. package/lib/components/AIButton/AIButton.d.ts.map +1 -1
  2. package/lib/components/AIButton/AIButton.js.map +1 -1
  3. package/lib/components/Actions/Actions.d.ts +5 -2
  4. package/lib/components/Actions/Actions.d.ts.map +1 -1
  5. package/lib/components/Actions/Actions.js +3 -3
  6. package/lib/components/Actions/Actions.js.map +1 -1
  7. package/lib/components/AdditionalInfo/AdditionalInfo.d.ts +3 -3
  8. package/lib/components/AdditionalInfo/AdditionalInfo.d.ts.map +1 -1
  9. package/lib/components/AdditionalInfo/AdditionalInfo.js.map +1 -1
  10. package/lib/components/AppShell/AppHeader.d.ts +3 -3
  11. package/lib/components/AppShell/AppHeader.d.ts.map +1 -1
  12. package/lib/components/AppShell/AppHeader.js.map +1 -1
  13. package/lib/components/AppShell/AppHeader.styles.d.ts +1 -1
  14. package/lib/components/AppShell/AppHeader.styles.d.ts.map +1 -1
  15. package/lib/components/AppShell/AppHeader.styles.js.map +1 -1
  16. package/lib/components/AppShell/AppShell.d.ts +2 -2
  17. package/lib/components/AppShell/AppShell.d.ts.map +1 -1
  18. package/lib/components/AppShell/AppShell.js.map +1 -1
  19. package/lib/components/AppShell/AppShellContext.d.ts +3 -3
  20. package/lib/components/AppShell/AppShellContext.d.ts.map +1 -1
  21. package/lib/components/AppShell/AppShellContext.js.map +1 -1
  22. package/lib/components/AppShell/AppShellList.d.ts +2 -2
  23. package/lib/components/AppShell/AppShellList.d.ts.map +1 -1
  24. package/lib/components/AppShell/AppShellList.js.map +1 -1
  25. package/lib/components/AppShell/AppShellSearch.d.ts +2 -2
  26. package/lib/components/AppShell/AppShellSearch.d.ts.map +1 -1
  27. package/lib/components/AppShell/AppShellSearch.js.map +1 -1
  28. package/lib/components/AppShell/ContextSwitcher.d.ts +3 -3
  29. package/lib/components/AppShell/ContextSwitcher.d.ts.map +1 -1
  30. package/lib/components/AppShell/ContextSwitcher.js.map +1 -1
  31. package/lib/components/AppShell/Drawer.d.ts +1 -1
  32. package/lib/components/AppShell/Drawer.d.ts.map +1 -1
  33. package/lib/components/AppShell/Drawer.js.map +1 -1
  34. package/lib/components/AppShell/Drawer.styles.d.ts +1 -1
  35. package/lib/components/AppShell/Drawer.styles.d.ts.map +1 -1
  36. package/lib/components/AppShell/Drawer.styles.js.map +1 -1
  37. package/lib/components/AppShell/NavigationList.d.ts +2 -2
  38. package/lib/components/AppShell/NavigationList.d.ts.map +1 -1
  39. package/lib/components/AppShell/NavigationList.js.map +1 -1
  40. package/lib/components/AppShell/NavigationListItemWrapper.d.ts +2 -2
  41. package/lib/components/AppShell/NavigationListItemWrapper.d.ts.map +1 -1
  42. package/lib/components/AppShell/NavigationListItemWrapper.js.map +1 -1
  43. package/lib/components/AppShell/Operator.d.ts +1 -1
  44. package/lib/components/AppShell/Operator.d.ts.map +1 -1
  45. package/lib/components/AppShell/Operator.js.map +1 -1
  46. package/lib/components/AppShell/style-utils.d.ts +1 -1
  47. package/lib/components/AppShell/style-utils.d.ts.map +1 -1
  48. package/lib/components/AppShell/style-utils.js.map +1 -1
  49. package/lib/components/Avatar/Avatar.d.ts +2 -2
  50. package/lib/components/Avatar/Avatar.d.ts.map +1 -1
  51. package/lib/components/Avatar/Avatar.js.map +1 -1
  52. package/lib/components/Backdrop/Backdrop.d.ts +2 -2
  53. package/lib/components/Backdrop/Backdrop.d.ts.map +1 -1
  54. package/lib/components/Backdrop/Backdrop.js.map +1 -1
  55. package/lib/components/Badges/Alert.d.ts +1 -1
  56. package/lib/components/Badges/Alert.d.ts.map +1 -1
  57. package/lib/components/Badges/Alert.js.map +1 -1
  58. package/lib/components/Badges/Count.d.ts +1 -1
  59. package/lib/components/Badges/Count.d.ts.map +1 -1
  60. package/lib/components/Badges/Count.js.map +1 -1
  61. package/lib/components/Badges/Keyboard.d.ts +1 -1
  62. package/lib/components/Badges/Keyboard.d.ts.map +1 -1
  63. package/lib/components/Badges/Keyboard.js.map +1 -1
  64. package/lib/components/Badges/Selection.d.ts +2 -2
  65. package/lib/components/Badges/Selection.d.ts.map +1 -1
  66. package/lib/components/Badges/Selection.js.map +1 -1
  67. package/lib/components/Badges/Status.d.ts +2 -2
  68. package/lib/components/Badges/Status.d.ts.map +1 -1
  69. package/lib/components/Badges/Status.js.map +1 -1
  70. package/lib/components/Badges/Tag.d.ts +2 -2
  71. package/lib/components/Badges/Tag.d.ts.map +1 -1
  72. package/lib/components/Badges/Tag.js.map +1 -1
  73. package/lib/components/Banner/Banner.d.ts +2 -2
  74. package/lib/components/Banner/Banner.d.ts.map +1 -1
  75. package/lib/components/Banner/Banner.js.map +1 -1
  76. package/lib/components/Boolean/BooleanDisplay.d.ts +1 -1
  77. package/lib/components/Boolean/BooleanDisplay.d.ts.map +1 -1
  78. package/lib/components/Boolean/BooleanDisplay.js.map +1 -1
  79. package/lib/components/Breadcrumbs/Breadcrumbs.d.ts +4 -4
  80. package/lib/components/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
  81. package/lib/components/Breadcrumbs/Breadcrumbs.js.map +1 -1
  82. package/lib/components/Button/BareButton.d.ts +3 -3
  83. package/lib/components/Button/BareButton.d.ts.map +1 -1
  84. package/lib/components/Button/BareButton.js.map +1 -1
  85. package/lib/components/Button/BareRoleButton.d.ts +2 -2
  86. package/lib/components/Button/BareRoleButton.d.ts.map +1 -1
  87. package/lib/components/Button/BareRoleButton.js.map +1 -1
  88. package/lib/components/Button/Button.d.ts +3 -3
  89. package/lib/components/Button/Button.d.ts.map +1 -1
  90. package/lib/components/Button/Button.js.map +1 -1
  91. package/lib/components/Card/Card.d.ts +2 -2
  92. package/lib/components/Card/Card.d.ts.map +1 -1
  93. package/lib/components/Card/Card.js.map +1 -1
  94. package/lib/components/Card/CardContent.d.ts +3 -3
  95. package/lib/components/Card/CardContent.d.ts.map +1 -1
  96. package/lib/components/Card/CardContent.js.map +1 -1
  97. package/lib/components/Card/CardFooter.d.ts +3 -3
  98. package/lib/components/Card/CardFooter.d.ts.map +1 -1
  99. package/lib/components/Card/CardFooter.js.map +1 -1
  100. package/lib/components/Card/CardHeader.d.ts +2 -2
  101. package/lib/components/Card/CardHeader.d.ts.map +1 -1
  102. package/lib/components/Card/CardHeader.js.map +1 -1
  103. package/lib/components/Card/CardMedia.d.ts +2 -2
  104. package/lib/components/Card/CardMedia.d.ts.map +1 -1
  105. package/lib/components/Card/CardMedia.js.map +1 -1
  106. package/lib/components/Card/CollapsibleCard.d.ts +2 -2
  107. package/lib/components/Card/CollapsibleCard.d.ts.map +1 -1
  108. package/lib/components/Card/CollapsibleCard.js.map +1 -1
  109. package/lib/components/Checkbox/Checkbox.d.ts +4 -4
  110. package/lib/components/Checkbox/Checkbox.d.ts.map +1 -1
  111. package/lib/components/Checkbox/Checkbox.js.map +1 -1
  112. package/lib/components/ColorPicker/ColorPicker.d.ts +4 -4
  113. package/lib/components/ColorPicker/ColorPicker.d.ts.map +1 -1
  114. package/lib/components/ColorPicker/ColorPicker.js.map +1 -1
  115. package/lib/components/ComboBox/ComboBox.d.ts +1 -1
  116. package/lib/components/ComboBox/ComboBox.d.ts.map +1 -1
  117. package/lib/components/ComboBox/ComboBox.js.map +1 -1
  118. package/lib/components/ComboBox/ComboBox.types.d.ts +3 -3
  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.d.ts +5 -4
  122. package/lib/components/ComboBox/ComboBoxInput.d.ts.map +1 -1
  123. package/lib/components/ComboBox/ComboBoxInput.js.map +1 -1
  124. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.d.ts +3 -3
  125. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.d.ts.map +1 -1
  126. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.js +1 -0
  127. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.js.map +1 -1
  128. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.types.d.ts +4 -4
  129. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.types.d.ts.map +1 -1
  130. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.types.js.map +1 -1
  131. package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.d.ts +3 -3
  132. package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.d.ts.map +1 -1
  133. package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.js.map +1 -1
  134. package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.types.d.ts +4 -3
  135. package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.types.d.ts.map +1 -1
  136. package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.types.js.map +1 -1
  137. package/lib/components/CompositeInput/CompositeInput.d.ts +2 -2
  138. package/lib/components/CompositeInput/CompositeInput.d.ts.map +1 -1
  139. package/lib/components/CompositeInput/CompositeInput.js.map +1 -1
  140. package/lib/components/CompositeInput/CompositeInput.types.d.ts +3 -3
  141. package/lib/components/CompositeInput/CompositeInput.types.d.ts.map +1 -1
  142. package/lib/components/CompositeInput/CompositeInput.types.js.map +1 -1
  143. package/lib/components/Configuration/Configuration.d.ts +3 -3
  144. package/lib/components/Configuration/Configuration.d.ts.map +1 -1
  145. package/lib/components/Configuration/Configuration.js.map +1 -1
  146. package/lib/components/CreditCard/CreditCard.types.d.ts +3 -3
  147. package/lib/components/CreditCard/CreditCard.types.d.ts.map +1 -1
  148. package/lib/components/CreditCard/CreditCard.types.js.map +1 -1
  149. package/lib/components/CreditCard/CreditCardDisplay.d.ts +3 -3
  150. package/lib/components/CreditCard/CreditCardDisplay.d.ts.map +1 -1
  151. package/lib/components/CreditCard/CreditCardDisplay.js.map +1 -1
  152. package/lib/components/CreditCard/CreditCardInput.d.ts +3 -3
  153. package/lib/components/CreditCard/CreditCardInput.d.ts.map +1 -1
  154. package/lib/components/CreditCard/CreditCardInput.js.map +1 -1
  155. package/lib/components/Currency/CurrencyDisplay.d.ts +2 -2
  156. package/lib/components/Currency/CurrencyDisplay.d.ts.map +1 -1
  157. package/lib/components/Currency/CurrencyDisplay.js.map +1 -1
  158. package/lib/components/Currency/CurrencyInput.d.ts +3 -3
  159. package/lib/components/Currency/CurrencyInput.d.ts.map +1 -1
  160. package/lib/components/Currency/CurrencyInput.js.map +1 -1
  161. package/lib/components/Currency/CurrencyInput.types.d.ts +1 -1
  162. package/lib/components/Currency/CurrencyInput.types.d.ts.map +1 -1
  163. package/lib/components/Currency/CurrencyInput.types.js.map +1 -1
  164. package/lib/components/DangerButton/DangerButton.d.ts.map +1 -1
  165. package/lib/components/DangerButton/DangerButton.js.map +1 -1
  166. package/lib/components/DateTime/DateTime.types.d.ts +3 -3
  167. package/lib/components/DateTime/DateTime.types.d.ts.map +1 -1
  168. package/lib/components/DateTime/DateTime.types.js.map +1 -1
  169. package/lib/components/DateTime/DateTimeDisplay.d.ts +4 -4
  170. package/lib/components/DateTime/DateTimeDisplay.d.ts.map +1 -1
  171. package/lib/components/DateTime/DateTimeDisplay.js.map +1 -1
  172. package/lib/components/DateTime/DurationDisplay.d.ts +2 -2
  173. package/lib/components/DateTime/DurationDisplay.d.ts.map +1 -1
  174. package/lib/components/DateTime/DurationDisplay.js.map +1 -1
  175. package/lib/components/DateTime/Input/DateInput.d.ts +4 -4
  176. package/lib/components/DateTime/Input/DateInput.d.ts.map +1 -1
  177. package/lib/components/DateTime/Input/DateInput.js.map +1 -1
  178. package/lib/components/DateTime/Input/DateRangeInput.d.ts +4 -4
  179. package/lib/components/DateTime/Input/DateRangeInput.d.ts.map +1 -1
  180. package/lib/components/DateTime/Input/DateRangeInput.js.map +1 -1
  181. package/lib/components/DateTime/Input/DateTimeInput.d.ts +6 -6
  182. package/lib/components/DateTime/Input/DateTimeInput.d.ts.map +1 -1
  183. package/lib/components/DateTime/Input/DateTimeInput.js +1 -0
  184. package/lib/components/DateTime/Input/DateTimeInput.js.map +1 -1
  185. package/lib/components/DateTime/Input/DayOfWeekInput.d.ts +3 -3
  186. package/lib/components/DateTime/Input/DayOfWeekInput.d.ts.map +1 -1
  187. package/lib/components/DateTime/Input/DayOfWeekInput.js.map +1 -1
  188. package/lib/components/DateTime/Input/Duration/DurationInput.d.ts +3 -3
  189. package/lib/components/DateTime/Input/Duration/DurationInput.d.ts.map +1 -1
  190. package/lib/components/DateTime/Input/Duration/DurationInput.js.map +1 -1
  191. package/lib/components/DateTime/Input/Duration/DurationInput.types.d.ts +2 -2
  192. package/lib/components/DateTime/Input/Duration/DurationInput.types.d.ts.map +1 -1
  193. package/lib/components/DateTime/Input/Duration/DurationInput.types.js.map +1 -1
  194. package/lib/components/DateTime/Input/Duration/NumberUnit.d.ts +3 -3
  195. package/lib/components/DateTime/Input/Duration/NumberUnit.d.ts.map +1 -1
  196. package/lib/components/DateTime/Input/Duration/NumberUnit.js.map +1 -1
  197. package/lib/components/DateTime/Input/Duration/Time.d.ts +3 -3
  198. package/lib/components/DateTime/Input/Duration/Time.d.ts.map +1 -1
  199. package/lib/components/DateTime/Input/Duration/Time.js.map +1 -1
  200. package/lib/components/DateTime/Input/MonthInput.d.ts +4 -4
  201. package/lib/components/DateTime/Input/MonthInput.d.ts.map +1 -1
  202. package/lib/components/DateTime/Input/MonthInput.js.map +1 -1
  203. package/lib/components/DateTime/Input/PartInput.d.ts +3 -3
  204. package/lib/components/DateTime/Input/PartInput.d.ts.map +1 -1
  205. package/lib/components/DateTime/Input/PartInput.js.map +1 -1
  206. package/lib/components/DateTime/Input/QuarterInput.d.ts +4 -4
  207. package/lib/components/DateTime/Input/QuarterInput.d.ts.map +1 -1
  208. package/lib/components/DateTime/Input/QuarterInput.js.map +1 -1
  209. package/lib/components/DateTime/Input/TimeInput.d.ts +5 -5
  210. package/lib/components/DateTime/Input/TimeInput.d.ts.map +1 -1
  211. package/lib/components/DateTime/Input/TimeInput.js.map +1 -1
  212. package/lib/components/DateTime/Input/TimeRangeInput.d.ts +7 -6
  213. package/lib/components/DateTime/Input/TimeRangeInput.d.ts.map +1 -1
  214. package/lib/components/DateTime/Input/TimeRangeInput.js.map +1 -1
  215. package/lib/components/DateTime/Input/WeekInput.d.ts +4 -4
  216. package/lib/components/DateTime/Input/WeekInput.d.ts.map +1 -1
  217. package/lib/components/DateTime/Input/WeekInput.js.map +1 -1
  218. package/lib/components/DateTime/Input/useAutoFocusNextInput.d.ts +1 -1
  219. package/lib/components/DateTime/Input/useAutoFocusNextInput.d.ts.map +1 -1
  220. package/lib/components/DateTime/Input/useAutoFocusNextInput.js.map +1 -1
  221. package/lib/components/DateTime/Input/usePickerButton.d.ts +1 -1
  222. package/lib/components/DateTime/Input/usePickerButton.d.ts.map +1 -1
  223. package/lib/components/DateTime/Input/usePickerButton.js.map +1 -1
  224. package/lib/components/DateTime/Input/utils.d.ts +1 -1
  225. package/lib/components/DateTime/Input/utils.d.ts.map +1 -1
  226. package/lib/components/DateTime/Input/utils.js.map +1 -1
  227. package/lib/components/DateTime/Picker/Calendar.d.ts +3 -3
  228. package/lib/components/DateTime/Picker/Calendar.d.ts.map +1 -1
  229. package/lib/components/DateTime/Picker/Calendar.js.map +1 -1
  230. package/lib/components/DateTime/Picker/DatePicker.d.ts +2 -2
  231. package/lib/components/DateTime/Picker/DatePicker.d.ts.map +1 -1
  232. package/lib/components/DateTime/Picker/DatePicker.js.map +1 -1
  233. package/lib/components/DateTime/Picker/DatePicker.types.d.ts +2 -2
  234. package/lib/components/DateTime/Picker/DatePicker.types.d.ts.map +1 -1
  235. package/lib/components/DateTime/Picker/DatePicker.types.js.map +1 -1
  236. package/lib/components/DateTime/Picker/DateRangePicker.d.ts +2 -2
  237. package/lib/components/DateTime/Picker/DateRangePicker.d.ts.map +1 -1
  238. package/lib/components/DateTime/Picker/DateRangePicker.js.map +1 -1
  239. package/lib/components/DateTime/Picker/TimePicker.d.ts +3 -3
  240. package/lib/components/DateTime/Picker/TimePicker.d.ts.map +1 -1
  241. package/lib/components/DateTime/Picker/TimePicker.js.map +1 -1
  242. package/lib/components/DateTime/Picker/Weeks.d.ts +3 -3
  243. package/lib/components/DateTime/Picker/Weeks.d.ts.map +1 -1
  244. package/lib/components/DateTime/Picker/Weeks.js.map +1 -1
  245. package/lib/components/DateTime/utils.d.ts +4 -4
  246. package/lib/components/DateTime/utils.d.ts.map +1 -1
  247. package/lib/components/DateTime/utils.js.map +1 -1
  248. package/lib/components/Dialog/Dialog.d.ts +2 -2
  249. package/lib/components/Dialog/Dialog.d.ts.map +1 -1
  250. package/lib/components/Dialog/Dialog.js.map +1 -1
  251. package/lib/components/Dialog/Dialog.types.d.ts +4 -4
  252. package/lib/components/Dialog/Dialog.types.d.ts.map +1 -1
  253. package/lib/components/Dialog/Dialog.types.js.map +1 -1
  254. package/lib/components/Dialog/FormDialog.d.ts +3 -3
  255. package/lib/components/Dialog/FormDialog.d.ts.map +1 -1
  256. package/lib/components/Dialog/FormDialog.js.map +1 -1
  257. package/lib/components/Dialog/InfoDialog.d.ts +2 -2
  258. package/lib/components/Dialog/InfoDialog.d.ts.map +1 -1
  259. package/lib/components/Dialog/InfoDialog.js.map +1 -1
  260. package/lib/components/Drawer/Drawer.d.ts +2 -2
  261. package/lib/components/Drawer/Drawer.d.ts.map +1 -1
  262. package/lib/components/Drawer/Drawer.js.map +1 -1
  263. package/lib/components/Email/EmailDisplay.d.ts +2 -2
  264. package/lib/components/Email/EmailDisplay.d.ts.map +1 -1
  265. package/lib/components/Email/EmailDisplay.js.map +1 -1
  266. package/lib/components/EmojiPicker/EmojiDisplay.d.ts +2 -2
  267. package/lib/components/EmojiPicker/EmojiDisplay.d.ts.map +1 -1
  268. package/lib/components/EmojiPicker/EmojiDisplay.js.map +1 -1
  269. package/lib/components/EmojiPicker/EmojiPicker.d.ts +4 -4
  270. package/lib/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
  271. package/lib/components/EmojiPicker/EmojiPicker.js +28 -21
  272. package/lib/components/EmojiPicker/EmojiPicker.js.map +1 -1
  273. package/lib/components/EmptyState/EmptyState.d.ts +2 -2
  274. package/lib/components/EmptyState/EmptyState.d.ts.map +1 -1
  275. package/lib/components/EmptyState/EmptyState.js.map +1 -1
  276. package/lib/components/ErrorState/ErrorState.d.ts +2 -2
  277. package/lib/components/ErrorState/ErrorState.d.ts.map +1 -1
  278. package/lib/components/ErrorState/ErrorState.js.map +1 -1
  279. package/lib/components/ExpandCollapse/ExpandCollapse.d.ts +2 -2
  280. package/lib/components/ExpandCollapse/ExpandCollapse.d.ts.map +1 -1
  281. package/lib/components/ExpandCollapse/ExpandCollapse.js.map +1 -1
  282. package/lib/components/FieldGroup/FieldGroup.d.ts +4 -4
  283. package/lib/components/FieldGroup/FieldGroup.d.ts.map +1 -1
  284. package/lib/components/FieldGroup/FieldGroup.js.map +1 -1
  285. package/lib/components/FieldGroup/FieldGroupList.d.ts +3 -3
  286. package/lib/components/FieldGroup/FieldGroupList.d.ts.map +1 -1
  287. package/lib/components/FieldGroup/FieldGroupList.js.map +1 -1
  288. package/lib/components/FieldValueList/FieldValueList.d.ts +2 -2
  289. package/lib/components/FieldValueList/FieldValueList.d.ts.map +1 -1
  290. package/lib/components/FieldValueList/FieldValueList.js.map +1 -1
  291. package/lib/components/File/FileDisplay.d.ts +3 -3
  292. package/lib/components/File/FileDisplay.d.ts.map +1 -1
  293. package/lib/components/File/FileDisplay.js.map +1 -1
  294. package/lib/components/File/FileInput.d.ts +4 -4
  295. package/lib/components/File/FileInput.d.ts.map +1 -1
  296. package/lib/components/File/FileInput.js +1 -1
  297. package/lib/components/File/FileInput.js.map +1 -1
  298. package/lib/components/File/FileItem.d.ts +3 -3
  299. package/lib/components/File/FileItem.d.ts.map +1 -1
  300. package/lib/components/File/FileItem.js +3 -2
  301. package/lib/components/File/FileItem.js.map +1 -1
  302. package/lib/components/File/FileUploadItem.d.ts +4 -2
  303. package/lib/components/File/FileUploadItem.d.ts.map +1 -1
  304. package/lib/components/File/FileUploadItem.js +15 -6
  305. package/lib/components/File/FileUploadItem.js.map +1 -1
  306. package/lib/components/File/FileVisual.d.ts +4 -4
  307. package/lib/components/File/FileVisual.d.ts.map +1 -1
  308. package/lib/components/File/FileVisual.js.map +1 -1
  309. package/lib/components/Flex/Flex.d.ts +2 -2
  310. package/lib/components/Flex/Flex.d.ts.map +1 -1
  311. package/lib/components/Flex/Flex.js.map +1 -1
  312. package/lib/components/Form/Form.d.ts +3 -3
  313. package/lib/components/Form/Form.d.ts.map +1 -1
  314. package/lib/components/Form/Form.js.map +1 -1
  315. package/lib/components/FormControl/FormControl.d.ts +3 -3
  316. package/lib/components/FormControl/FormControl.d.ts.map +1 -1
  317. package/lib/components/FormControl/FormControl.js.map +1 -1
  318. package/lib/components/FormField/FormField.d.ts +6 -6
  319. package/lib/components/FormField/FormField.d.ts.map +1 -1
  320. package/lib/components/FormField/FormField.js.map +1 -1
  321. package/lib/components/Grid/Grid.d.ts +3 -3
  322. package/lib/components/Grid/Grid.d.ts.map +1 -1
  323. package/lib/components/Grid/Grid.js.map +1 -1
  324. package/lib/components/Grid/Grid.types.d.ts +3 -3
  325. package/lib/components/Grid/Grid.types.d.ts.map +1 -1
  326. package/lib/components/Grid/Grid.types.js.map +1 -1
  327. package/lib/components/HTML/HTML.d.ts +3 -3
  328. package/lib/components/HTML/HTML.d.ts.map +1 -1
  329. package/lib/components/HTML/HTML.js.map +1 -1
  330. package/lib/components/Icon/Icon.d.ts +2 -2
  331. package/lib/components/Icon/Icon.d.ts.map +1 -1
  332. package/lib/components/Icon/Icon.js +10 -2
  333. package/lib/components/Icon/Icon.js.map +1 -1
  334. package/lib/components/IconPicker/IconPicker.d.ts +4 -4
  335. package/lib/components/IconPicker/IconPicker.d.ts.map +1 -1
  336. package/lib/components/IconPicker/IconPicker.js.map +1 -1
  337. package/lib/components/Image/Image.d.ts +2 -2
  338. package/lib/components/Image/Image.d.ts.map +1 -1
  339. package/lib/components/Image/Image.js.map +1 -1
  340. package/lib/components/Input/Input.d.ts +3 -3
  341. package/lib/components/Input/Input.d.ts.map +1 -1
  342. package/lib/components/Input/Input.js.map +1 -1
  343. package/lib/components/Label/Label.d.ts +2 -2
  344. package/lib/components/Label/Label.d.ts.map +1 -1
  345. package/lib/components/Label/Label.js.map +1 -1
  346. package/lib/components/Lightbox/Lightbox.d.ts +3 -3
  347. package/lib/components/Lightbox/Lightbox.d.ts.map +1 -1
  348. package/lib/components/Lightbox/Lightbox.js.map +1 -1
  349. package/lib/components/Lightbox/Lightbox.types.d.ts +4 -4
  350. package/lib/components/Lightbox/Lightbox.types.d.ts.map +1 -1
  351. package/lib/components/Lightbox/Lightbox.types.js.map +1 -1
  352. package/lib/components/Link/Link.d.ts +3 -3
  353. package/lib/components/Link/Link.d.ts.map +1 -1
  354. package/lib/components/Link/Link.js.map +1 -1
  355. package/lib/components/List/CommaSeparatedList.d.ts +2 -2
  356. package/lib/components/List/CommaSeparatedList.d.ts.map +1 -1
  357. package/lib/components/List/CommaSeparatedList.js.map +1 -1
  358. package/lib/components/List/List.d.ts +2 -2
  359. package/lib/components/List/List.d.ts.map +1 -1
  360. package/lib/components/List/List.js.map +1 -1
  361. package/lib/components/List/OrderedList.d.ts +3 -3
  362. package/lib/components/List/OrderedList.d.ts.map +1 -1
  363. package/lib/components/List/OrderedList.js.map +1 -1
  364. package/lib/components/List/UnorderedList.d.ts +3 -3
  365. package/lib/components/List/UnorderedList.d.ts.map +1 -1
  366. package/lib/components/List/UnorderedList.js.map +1 -1
  367. package/lib/components/ListToolbar/ListToolbar.d.ts +1 -1
  368. package/lib/components/ListToolbar/ListToolbar.d.ts.map +1 -1
  369. package/lib/components/ListToolbar/ListToolbar.js.map +1 -1
  370. package/lib/components/ListToolbar/ListToolbar.styles.d.ts.map +1 -1
  371. package/lib/components/ListToolbar/ListToolbar.styles.js.map +1 -1
  372. package/lib/components/ListToolbar/ListToolbar.types.d.ts +6 -6
  373. package/lib/components/ListToolbar/ListToolbar.types.d.ts.map +1 -1
  374. package/lib/components/ListToolbar/ListToolbar.types.js.map +1 -1
  375. package/lib/components/ListToolbar/PresetMenuPopover.d.ts +1 -1
  376. package/lib/components/ListToolbar/PresetMenuPopover.d.ts.map +1 -1
  377. package/lib/components/ListToolbar/PresetMenuPopover.js.map +1 -1
  378. package/lib/components/ListToolbar/helpers.d.ts +1 -1
  379. package/lib/components/ListToolbar/helpers.d.ts.map +1 -1
  380. package/lib/components/ListToolbar/helpers.js.map +1 -1
  381. package/lib/components/LiveLog/LiveLog.d.ts +1 -1
  382. package/lib/components/LiveLog/LiveLog.d.ts.map +1 -1
  383. package/lib/components/LiveLog/LiveLog.js.map +1 -1
  384. package/lib/components/LiveLog/LiveLog.types.d.ts +1 -1
  385. package/lib/components/LiveLog/LiveLog.types.d.ts.map +1 -1
  386. package/lib/components/LiveLog/LiveLog.types.js.map +1 -1
  387. package/lib/components/Location/CurrentLocationButton.d.ts +1 -1
  388. package/lib/components/Location/CurrentLocationButton.d.ts.map +1 -1
  389. package/lib/components/Location/CurrentLocationButton.js.map +1 -1
  390. package/lib/components/Location/Location.types.d.ts +2 -2
  391. package/lib/components/Location/Location.types.d.ts.map +1 -1
  392. package/lib/components/Location/Location.types.js.map +1 -1
  393. package/lib/components/Location/LocationDisplay.d.ts +3 -3
  394. package/lib/components/Location/LocationDisplay.d.ts.map +1 -1
  395. package/lib/components/Location/LocationDisplay.js.map +1 -1
  396. package/lib/components/Location/LocationInput.d.ts +6 -6
  397. package/lib/components/Location/LocationInput.d.ts.map +1 -1
  398. package/lib/components/Location/LocationInput.js.map +1 -1
  399. package/lib/components/Location/LocationView.d.ts +4 -4
  400. package/lib/components/Location/LocationView.d.ts.map +1 -1
  401. package/lib/components/Location/LocationView.js.map +1 -1
  402. package/lib/components/Location/utils.d.ts +1 -1
  403. package/lib/components/Location/utils.d.ts.map +1 -1
  404. package/lib/components/Location/utils.js.map +1 -1
  405. package/lib/components/Mark/Mark.d.ts +2 -2
  406. package/lib/components/Mark/Mark.d.ts.map +1 -1
  407. package/lib/components/Mark/Mark.js.map +1 -1
  408. package/lib/components/Menu/FlyoutMenuList.d.ts +3 -3
  409. package/lib/components/Menu/FlyoutMenuList.d.ts.map +1 -1
  410. package/lib/components/Menu/FlyoutMenuList.js.map +1 -1
  411. package/lib/components/Menu/Menu.context.d.ts +1 -1
  412. package/lib/components/Menu/Menu.context.d.ts.map +1 -1
  413. package/lib/components/Menu/Menu.context.js.map +1 -1
  414. package/lib/components/Menu/Menu.d.ts +3 -3
  415. package/lib/components/Menu/Menu.d.ts.map +1 -1
  416. package/lib/components/Menu/Menu.js.map +1 -1
  417. package/lib/components/Menu/Menu.styles.d.ts +1 -1
  418. package/lib/components/Menu/Menu.styles.d.ts.map +1 -1
  419. package/lib/components/Menu/Menu.styles.js.map +1 -1
  420. package/lib/components/Menu/Menu.types.d.ts +3 -3
  421. package/lib/components/Menu/Menu.types.d.ts.map +1 -1
  422. package/lib/components/Menu/Menu.types.js.map +1 -1
  423. package/lib/components/Menu/MenuGroup.d.ts +1 -1
  424. package/lib/components/Menu/MenuGroup.d.ts.map +1 -1
  425. package/lib/components/Menu/MenuGroup.js.map +1 -1
  426. package/lib/components/Menu/MenuItem.d.ts +3 -3
  427. package/lib/components/Menu/MenuItem.d.ts.map +1 -1
  428. package/lib/components/Menu/MenuItem.js.map +1 -1
  429. package/lib/components/Menu/MenuList.d.ts +2 -2
  430. package/lib/components/Menu/MenuList.d.ts.map +1 -1
  431. package/lib/components/Menu/MenuList.js.map +1 -1
  432. package/lib/components/Menu/MenuListHeader.d.ts +3 -3
  433. package/lib/components/Menu/MenuListHeader.d.ts.map +1 -1
  434. package/lib/components/Menu/MenuListHeader.js.map +1 -1
  435. package/lib/components/Menu/helpers.d.ts +1 -1
  436. package/lib/components/Menu/helpers.d.ts.map +1 -1
  437. package/lib/components/Menu/helpers.js.map +1 -1
  438. package/lib/components/MenuButton/MenuButton.d.ts +3 -3
  439. package/lib/components/MenuButton/MenuButton.d.ts.map +1 -1
  440. package/lib/components/MenuButton/MenuButton.js.map +1 -1
  441. package/lib/components/MetaList/MetaList.d.ts +2 -2
  442. package/lib/components/MetaList/MetaList.d.ts.map +1 -1
  443. package/lib/components/MetaList/MetaList.js.map +1 -1
  444. package/lib/components/Modal/Contexts.d.ts +1 -1
  445. package/lib/components/Modal/Contexts.d.ts.map +1 -1
  446. package/lib/components/Modal/Contexts.js.map +1 -1
  447. package/lib/components/Modal/DockedModals.d.ts +2 -2
  448. package/lib/components/Modal/DockedModals.d.ts.map +1 -1
  449. package/lib/components/Modal/DockedModals.js.map +1 -1
  450. package/lib/components/Modal/MinimizedModal.d.ts +3 -3
  451. package/lib/components/Modal/MinimizedModal.d.ts.map +1 -1
  452. package/lib/components/Modal/MinimizedModal.js.map +1 -1
  453. package/lib/components/Modal/Modal.d.ts +2 -2
  454. package/lib/components/Modal/Modal.d.ts.map +1 -1
  455. package/lib/components/Modal/Modal.js.map +1 -1
  456. package/lib/components/Modal/Modal.styles.d.ts +1 -1
  457. package/lib/components/Modal/Modal.styles.d.ts.map +1 -1
  458. package/lib/components/Modal/Modal.styles.js.map +1 -1
  459. package/lib/components/Modal/ModalManager.d.ts +2 -2
  460. package/lib/components/Modal/ModalManager.d.ts.map +1 -1
  461. package/lib/components/Modal/ModalManager.js.map +1 -1
  462. package/lib/components/MultiStepForm/FormProgress.styles.d.ts +1 -1
  463. package/lib/components/MultiStepForm/FormProgress.styles.d.ts.map +1 -1
  464. package/lib/components/MultiStepForm/FormProgress.styles.js.map +1 -1
  465. package/lib/components/MultiStepForm/HorizontalFormProgress.d.ts +2 -2
  466. package/lib/components/MultiStepForm/HorizontalFormProgress.d.ts.map +1 -1
  467. package/lib/components/MultiStepForm/HorizontalFormProgress.js.map +1 -1
  468. package/lib/components/MultiStepForm/MultiStepForm.d.ts +3 -3
  469. package/lib/components/MultiStepForm/MultiStepForm.d.ts.map +1 -1
  470. package/lib/components/MultiStepForm/MultiStepForm.js.map +1 -1
  471. package/lib/components/MultiStepForm/MultiStepForm.types.d.ts +3 -3
  472. package/lib/components/MultiStepForm/MultiStepForm.types.d.ts.map +1 -1
  473. package/lib/components/MultiStepForm/MultiStepForm.types.js.map +1 -1
  474. package/lib/components/MultiStepForm/VerticalFormProgress.d.ts +2 -2
  475. package/lib/components/MultiStepForm/VerticalFormProgress.d.ts.map +1 -1
  476. package/lib/components/MultiStepForm/VerticalFormProgress.js.map +1 -1
  477. package/lib/components/Number/NumberDisplay.d.ts +1 -1
  478. package/lib/components/Number/NumberDisplay.d.ts.map +1 -1
  479. package/lib/components/Number/NumberDisplay.js.map +1 -1
  480. package/lib/components/Number/NumberInput.d.ts +3 -3
  481. package/lib/components/Number/NumberInput.d.ts.map +1 -1
  482. package/lib/components/Number/NumberInput.js.map +1 -1
  483. package/lib/components/Number/NumberInput.types.d.ts +3 -3
  484. package/lib/components/Number/NumberInput.types.d.ts.map +1 -1
  485. package/lib/components/Number/NumberInput.types.js.map +1 -1
  486. package/lib/components/Number/NumberRangeInput.d.ts +1 -1
  487. package/lib/components/Number/NumberRangeInput.d.ts.map +1 -1
  488. package/lib/components/Number/NumberRangeInput.js.map +1 -1
  489. package/lib/components/PageTemplates/CategorySubPage.d.ts +3 -3
  490. package/lib/components/PageTemplates/CategorySubPage.d.ts.map +1 -1
  491. package/lib/components/PageTemplates/CategorySubPage.js.map +1 -1
  492. package/lib/components/PageTemplates/CategorySubPage.styles.d.ts.map +1 -1
  493. package/lib/components/PageTemplates/CategorySubPage.styles.js.map +1 -1
  494. package/lib/components/PageTemplates/DashboardPage.d.ts +3 -3
  495. package/lib/components/PageTemplates/DashboardPage.d.ts.map +1 -1
  496. package/lib/components/PageTemplates/DashboardPage.js.map +1 -1
  497. package/lib/components/PageTemplates/PageTemplates.d.ts +5 -4
  498. package/lib/components/PageTemplates/PageTemplates.d.ts.map +1 -1
  499. package/lib/components/PageTemplates/PageTemplates.js.map +1 -1
  500. package/lib/components/Pagination/Pagination.d.ts +1 -1
  501. package/lib/components/Pagination/Pagination.d.ts.map +1 -1
  502. package/lib/components/Pagination/Pagination.js.map +1 -1
  503. package/lib/components/Paragraph/ParagraphDisplay.d.ts +2 -2
  504. package/lib/components/Paragraph/ParagraphDisplay.d.ts.map +1 -1
  505. package/lib/components/Paragraph/ParagraphDisplay.js.map +1 -1
  506. package/lib/components/Phone/PhoneDisplay.d.ts +1 -1
  507. package/lib/components/Phone/PhoneDisplay.d.ts.map +1 -1
  508. package/lib/components/Phone/PhoneDisplay.js.map +1 -1
  509. package/lib/components/Phone/PhoneInput.d.ts +3 -3
  510. package/lib/components/Phone/PhoneInput.d.ts.map +1 -1
  511. package/lib/components/Phone/PhoneInput.js.map +1 -1
  512. package/lib/components/Popover/Popover.d.ts +5 -5
  513. package/lib/components/Popover/Popover.d.ts.map +1 -1
  514. package/lib/components/Popover/Popover.js.map +1 -1
  515. package/lib/components/Popover/PopoverManager.d.ts +1 -1
  516. package/lib/components/Popover/PopoverManager.d.ts.map +1 -1
  517. package/lib/components/Popover/PopoverManager.js.map +1 -1
  518. package/lib/components/Popover/modifiers.d.ts +1 -1
  519. package/lib/components/Popover/modifiers.d.ts.map +1 -1
  520. package/lib/components/Popover/modifiers.js.map +1 -1
  521. package/lib/components/Progress/Bar.d.ts +3 -3
  522. package/lib/components/Progress/Bar.d.ts.map +1 -1
  523. package/lib/components/Progress/Bar.js.map +1 -1
  524. package/lib/components/Progress/Ellipsis.d.ts +3 -3
  525. package/lib/components/Progress/Ellipsis.d.ts.map +1 -1
  526. package/lib/components/Progress/Ellipsis.js.map +1 -1
  527. package/lib/components/Progress/Progress.d.ts +3 -3
  528. package/lib/components/Progress/Progress.d.ts.map +1 -1
  529. package/lib/components/Progress/Progress.js.map +1 -1
  530. package/lib/components/Progress/Progress.styles.d.ts +1 -1
  531. package/lib/components/Progress/Progress.styles.d.ts.map +1 -1
  532. package/lib/components/Progress/Progress.styles.js.map +1 -1
  533. package/lib/components/Progress/Progress.types.d.ts +3 -3
  534. package/lib/components/Progress/Progress.types.d.ts.map +1 -1
  535. package/lib/components/Progress/Progress.types.js.map +1 -1
  536. package/lib/components/Progress/Ring.d.ts +3 -3
  537. package/lib/components/Progress/Ring.d.ts.map +1 -1
  538. package/lib/components/Progress/Ring.js.map +1 -1
  539. package/lib/components/QRCode/QRCode.d.ts +2 -2
  540. package/lib/components/QRCode/QRCode.d.ts.map +1 -1
  541. package/lib/components/QRCode/QRCode.js.map +1 -1
  542. package/lib/components/RadioButton/RadioButton.d.ts +3 -3
  543. package/lib/components/RadioButton/RadioButton.d.ts.map +1 -1
  544. package/lib/components/RadioButton/RadioButton.js.map +1 -1
  545. package/lib/components/RadioCheck/RadioCheck.d.ts +3 -3
  546. package/lib/components/RadioCheck/RadioCheck.d.ts.map +1 -1
  547. package/lib/components/RadioCheck/RadioCheck.js.map +1 -1
  548. package/lib/components/RadioCheckGroup/RadioCheckGroup.d.ts +5 -5
  549. package/lib/components/RadioCheckGroup/RadioCheckGroup.d.ts.map +1 -1
  550. package/lib/components/RadioCheckGroup/RadioCheckGroup.js.map +1 -1
  551. package/lib/components/Rating/Rating.d.ts +1 -1
  552. package/lib/components/Rating/Rating.d.ts.map +1 -1
  553. package/lib/components/Rating/Rating.js.map +1 -1
  554. package/lib/components/SearchInput/SearchInput.d.ts +3 -3
  555. package/lib/components/SearchInput/SearchInput.d.ts.map +1 -1
  556. package/lib/components/SearchInput/SearchInput.js.map +1 -1
  557. package/lib/components/Select/Option.d.ts +2 -2
  558. package/lib/components/Select/Option.d.ts.map +1 -1
  559. package/lib/components/Select/Option.js.map +1 -1
  560. package/lib/components/Select/Select.d.ts +3 -3
  561. package/lib/components/Select/Select.d.ts.map +1 -1
  562. package/lib/components/Select/Select.js.map +1 -1
  563. package/lib/components/Sentiment/Sentiment.d.ts +2 -2
  564. package/lib/components/Sentiment/Sentiment.d.ts.map +1 -1
  565. package/lib/components/Sentiment/Sentiment.js.map +1 -1
  566. package/lib/components/ShortcutManager/ShortcutManager.d.ts +1 -1
  567. package/lib/components/ShortcutManager/ShortcutManager.d.ts.map +1 -1
  568. package/lib/components/ShortcutManager/ShortcutManager.js.map +1 -1
  569. package/lib/components/ShortcutManager/ShortcutManager.types.d.ts +1 -1
  570. package/lib/components/ShortcutManager/ShortcutManager.types.d.ts.map +1 -1
  571. package/lib/components/ShortcutManager/ShortcutManager.types.js.map +1 -1
  572. package/lib/components/ShowMoreLess/ShowMoreLess.d.ts +1 -1
  573. package/lib/components/ShowMoreLess/ShowMoreLess.d.ts.map +1 -1
  574. package/lib/components/ShowMoreLess/ShowMoreLess.js.map +1 -1
  575. package/lib/components/Skeleton/LineSkeleton.d.ts +2 -2
  576. package/lib/components/Skeleton/LineSkeleton.d.ts.map +1 -1
  577. package/lib/components/Skeleton/LineSkeleton.js.map +1 -1
  578. package/lib/components/Skeleton/ParagraphSkeleton.d.ts +2 -2
  579. package/lib/components/Skeleton/ParagraphSkeleton.d.ts.map +1 -1
  580. package/lib/components/Skeleton/ParagraphSkeleton.js.map +1 -1
  581. package/lib/components/Skeleton/RectangleSkeleton.d.ts +2 -2
  582. package/lib/components/Skeleton/RectangleSkeleton.d.ts.map +1 -1
  583. package/lib/components/Skeleton/RectangleSkeleton.js.map +1 -1
  584. package/lib/components/SkipLinks/SkipLinks.d.ts +1 -1
  585. package/lib/components/SkipLinks/SkipLinks.d.ts.map +1 -1
  586. package/lib/components/SkipLinks/SkipLinks.js.map +1 -1
  587. package/lib/components/Slider/Slider.d.ts +3 -3
  588. package/lib/components/Slider/Slider.d.ts.map +1 -1
  589. package/lib/components/Slider/Slider.js.map +1 -1
  590. package/lib/components/Slider/Slider.styles.d.ts +3 -3
  591. package/lib/components/Slider/Slider.styles.d.ts.map +1 -1
  592. package/lib/components/Slider/Slider.styles.js.map +1 -1
  593. package/lib/components/Slider/Slider.types.d.ts +2 -2
  594. package/lib/components/Slider/Slider.types.d.ts.map +1 -1
  595. package/lib/components/Slider/Slider.types.js.map +1 -1
  596. package/lib/components/Slider/SliderTicks.d.ts +2 -2
  597. package/lib/components/Slider/SliderTicks.d.ts.map +1 -1
  598. package/lib/components/Slider/SliderTicks.js.map +1 -1
  599. package/lib/components/Slider/utils.d.ts +2 -1
  600. package/lib/components/Slider/utils.d.ts.map +1 -1
  601. package/lib/components/Slider/utils.js.map +1 -1
  602. package/lib/components/SummaryItem/SummaryItem.d.ts +3 -3
  603. package/lib/components/SummaryItem/SummaryItem.d.ts.map +1 -1
  604. package/lib/components/SummaryItem/SummaryItem.js.map +1 -1
  605. package/lib/components/SummaryList/SummaryList.d.ts +6 -5
  606. package/lib/components/SummaryList/SummaryList.d.ts.map +1 -1
  607. package/lib/components/SummaryList/SummaryList.js.map +1 -1
  608. package/lib/components/SummaryList/ViewAll.d.ts +3 -3
  609. package/lib/components/SummaryList/ViewAll.d.ts.map +1 -1
  610. package/lib/components/SummaryList/ViewAll.js.map +1 -1
  611. package/lib/components/Switch/Switch.d.ts +2 -2
  612. package/lib/components/Switch/Switch.d.ts.map +1 -1
  613. package/lib/components/Switch/Switch.js.map +1 -1
  614. package/lib/components/Table/Table.d.ts +1 -1
  615. package/lib/components/Table/Table.d.ts.map +1 -1
  616. package/lib/components/Table/Table.js.map +1 -1
  617. package/lib/components/Tabs/Tab.d.ts +3 -3
  618. package/lib/components/Tabs/Tab.d.ts.map +1 -1
  619. package/lib/components/Tabs/Tab.js.map +1 -1
  620. package/lib/components/Tabs/TabPanel.d.ts +2 -2
  621. package/lib/components/Tabs/TabPanel.d.ts.map +1 -1
  622. package/lib/components/Tabs/TabPanel.js.map +1 -1
  623. package/lib/components/Tabs/Tabs.d.ts +3 -3
  624. package/lib/components/Tabs/Tabs.d.ts.map +1 -1
  625. package/lib/components/Tabs/Tabs.js.map +1 -1
  626. package/lib/components/Tabs/Tabs.types.d.ts +1 -1
  627. package/lib/components/Tabs/Tabs.types.d.ts.map +1 -1
  628. package/lib/components/Tabs/Tabs.types.js.map +1 -1
  629. package/lib/components/Text/Text.d.ts +2 -2
  630. package/lib/components/Text/Text.d.ts.map +1 -1
  631. package/lib/components/Text/Text.js.map +1 -1
  632. package/lib/components/TextArea/TextArea.d.ts +3 -3
  633. package/lib/components/TextArea/TextArea.d.ts.map +1 -1
  634. package/lib/components/TextArea/TextArea.js.map +1 -1
  635. package/lib/components/Toaster/Context.d.ts +1 -1
  636. package/lib/components/Toaster/Context.d.ts.map +1 -1
  637. package/lib/components/Toaster/Context.js.map +1 -1
  638. package/lib/components/Toaster/Toaster.d.ts +3 -3
  639. package/lib/components/Toaster/Toaster.d.ts.map +1 -1
  640. package/lib/components/Toaster/Toaster.js.map +1 -1
  641. package/lib/components/Toaster/Toaster.types.d.ts +2 -2
  642. package/lib/components/Toaster/Toaster.types.d.ts.map +1 -1
  643. package/lib/components/Toaster/Toaster.types.js.map +1 -1
  644. package/lib/components/Tooltip/Tooltip.d.ts +3 -3
  645. package/lib/components/Tooltip/Tooltip.d.ts.map +1 -1
  646. package/lib/components/Tooltip/Tooltip.js.map +1 -1
  647. package/lib/components/Tree/StandardTree.d.ts.map +1 -1
  648. package/lib/components/Tree/StandardTree.js.map +1 -1
  649. package/lib/components/Tree/StandardTree.styles.d.ts +1 -1
  650. package/lib/components/Tree/StandardTree.styles.d.ts.map +1 -1
  651. package/lib/components/Tree/StandardTree.styles.js.map +1 -1
  652. package/lib/components/Tree/Tree.d.ts +2 -2
  653. package/lib/components/Tree/Tree.d.ts.map +1 -1
  654. package/lib/components/Tree/Tree.js.map +1 -1
  655. package/lib/components/URL/URLDisplay.d.ts +2 -2
  656. package/lib/components/URL/URLDisplay.d.ts.map +1 -1
  657. package/lib/components/URL/URLDisplay.js.map +1 -1
  658. package/lib/components/VisuallyHiddenText/VisuallyHiddenText.d.ts +2 -2
  659. package/lib/components/VisuallyHiddenText/VisuallyHiddenText.d.ts.map +1 -1
  660. package/lib/components/VisuallyHiddenText/VisuallyHiddenText.js.map +1 -1
  661. package/lib/hooks/index.d.ts +2 -1
  662. package/lib/hooks/index.d.ts.map +1 -1
  663. package/lib/hooks/index.js.map +1 -1
  664. package/lib/hooks/useActiveDescendant.d.ts +2 -2
  665. package/lib/hooks/useActiveDescendant.d.ts.map +1 -1
  666. package/lib/hooks/useActiveDescendant.js.map +1 -1
  667. package/lib/hooks/useAfterInitialEffect.d.ts +1 -1
  668. package/lib/hooks/useAfterInitialEffect.d.ts.map +1 -1
  669. package/lib/hooks/useAfterInitialEffect.js.map +1 -1
  670. package/lib/hooks/useArrows.d.ts +1 -1
  671. package/lib/hooks/useArrows.d.ts.map +1 -1
  672. package/lib/hooks/useArrows.js.map +1 -1
  673. package/lib/hooks/useAutoResize.d.ts +1 -1
  674. package/lib/hooks/useAutoResize.d.ts.map +1 -1
  675. package/lib/hooks/useAutoResize.js.map +1 -1
  676. package/lib/hooks/useBreakpoint.d.ts +1 -1
  677. package/lib/hooks/useBreakpoint.d.ts.map +1 -1
  678. package/lib/hooks/useBreakpoint.js.map +1 -1
  679. package/lib/hooks/useConsolidatedRef.d.ts +1 -1
  680. package/lib/hooks/useConsolidatedRef.d.ts.map +1 -1
  681. package/lib/hooks/useConsolidatedRef.js.map +1 -1
  682. package/lib/hooks/useDraggable.d.ts +1 -1
  683. package/lib/hooks/useDraggable.d.ts.map +1 -1
  684. package/lib/hooks/useDraggable.js.map +1 -1
  685. package/lib/hooks/useElement.d.ts +1 -1
  686. package/lib/hooks/useElement.d.ts.map +1 -1
  687. package/lib/hooks/useElement.js.map +1 -1
  688. package/lib/hooks/useEscape.d.ts +1 -1
  689. package/lib/hooks/useEscape.d.ts.map +1 -1
  690. package/lib/hooks/useEscape.js.map +1 -1
  691. package/lib/hooks/useEvent.d.ts +1 -1
  692. package/lib/hooks/useEvent.d.ts.map +1 -1
  693. package/lib/hooks/useEvent.js.map +1 -1
  694. package/lib/hooks/useFocusTrap.d.ts +1 -1
  695. package/lib/hooks/useFocusTrap.d.ts.map +1 -1
  696. package/lib/hooks/useFocusTrap.js.map +1 -1
  697. package/lib/hooks/useFocusWithin.d.ts +1 -1
  698. package/lib/hooks/useFocusWithin.d.ts.map +1 -1
  699. package/lib/hooks/useFocusWithin.js.map +1 -1
  700. package/lib/hooks/useI18n.d.ts +4 -0
  701. package/lib/hooks/useI18n.d.ts.map +1 -1
  702. package/lib/hooks/useInputFormatter.d.ts +1 -1
  703. package/lib/hooks/useInputFormatter.d.ts.map +1 -1
  704. package/lib/hooks/useInputFormatter.js.map +1 -1
  705. package/lib/hooks/useItemIntersection.d.ts +1 -1
  706. package/lib/hooks/useItemIntersection.d.ts.map +1 -1
  707. package/lib/hooks/useItemIntersection.js.map +1 -1
  708. package/lib/hooks/useOuterEvent.d.ts +1 -1
  709. package/lib/hooks/useOuterEvent.d.ts.map +1 -1
  710. package/lib/hooks/useOuterEvent.js.map +1 -1
  711. package/lib/hooks/useTestIds.d.ts +1 -1
  712. package/lib/hooks/useTestIds.d.ts.map +1 -1
  713. package/lib/hooks/useTestIds.js.map +1 -1
  714. package/lib/hooks/useTheme.d.ts +1 -1
  715. package/lib/hooks/useTheme.d.ts.map +1 -1
  716. package/lib/hooks/useTheme.js.map +1 -1
  717. package/lib/hooks/useTransitionState.d.ts +1 -1
  718. package/lib/hooks/useTransitionState.d.ts.map +1 -1
  719. package/lib/hooks/useTransitionState.js.map +1 -1
  720. package/lib/i18n/default.d.ts +4 -0
  721. package/lib/i18n/default.d.ts.map +1 -1
  722. package/lib/i18n/default.js +4 -0
  723. package/lib/i18n/default.js.map +1 -1
  724. package/lib/i18n/i18n.d.ts +4 -0
  725. package/lib/i18n/i18n.d.ts.map +1 -1
  726. package/lib/i18n/translate.js.map +1 -1
  727. package/lib/styles/GlobalStyle.d.ts +1 -1
  728. package/lib/styles/GlobalStyle.d.ts.map +1 -1
  729. package/lib/styles/GlobalStyle.js.map +1 -1
  730. package/lib/styles/utils.d.ts +2 -2
  731. package/lib/styles/utils.d.ts.map +1 -1
  732. package/lib/styles/utils.js.map +1 -1
  733. package/lib/theme/ThemeMachine.d.ts +1 -1
  734. package/lib/theme/ThemeMachine.d.ts.map +1 -1
  735. package/lib/theme/ThemeMachine.js.map +1 -1
  736. package/lib/theme/theme.d.ts +2 -1
  737. package/lib/theme/theme.d.ts.map +1 -1
  738. package/lib/theme/theme.js.map +1 -1
  739. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"PhoneInput.js","sourceRoot":"","sources":["../../../src/components/Phone/PhoneInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAEL,UAAU,EAIV,WAAW,EACX,MAAM,EACP,MAAM,OAAO,CAAC;AACf,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,OAAO,EACP,iBAAiB,EACjB,UAAU,EACX,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAQ/C,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,EAAoB,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACrE,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,KAAK,MAAM,UAAU,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,0BAA0B,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAC7F,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAsBxD,MAAM,gBAAgB,GAAG,MAAM,CAAC,GAAG,CAA8B,GAAG,EAAE;IACpE,OAAO,GAAG,CAAA;;QAEJ,YAAY;;;;;;;QAOZ,YAAY,MAAM,WAAW;;;;GAIlC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,gBAAgB,CAAC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AY,EAAC,kBAAkB,EAC/B,aAAa,EAAE,MAAM,KAAK,SAAS,IAAI,CAAC,CAAC,mBAAmB,YAE3D,YAAY,GACN,CACV,EACD,KAAC,KAAK,mBACS,OAAO,CAAC,OAAO,KACxB,SAAS,EACb,SAAS,EAAC,KAAK,EACf,GAAG,EAAE,QAAQ,EACb,KAAK,EAAE,SAAS,gBACJ,CAAC,CAAC,gBAAgB,CAAC,EAC/B,QAAQ,EAAE,aAAa,EACvB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAC,cAAc,EAC3B,aAAa,EAAE,MAAM,KAAK,SAAS,IAAI,CAAC,CAAC,mBAAmB,GAC5D,IACe,CACpB,CAAC;IAEF,OAAO,KAAK,CAAC,CAAC,CAAC,CACb,KAAC,SAAS,IACR,MAAM,EAAE,OAAO,EACf,EAAE,EAAC,UAAU,EACb,OAAO,EAAC,QAAQ,EAChB,cAAc,EAAE,cAAc,EAC9B,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,EAAE,EAAE,EAAE,EACN,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,mBAAmB,EAAE,mBAAmB,YAEvC,IAAI,GACK,CACb,CAAC,CAAC,CAAC,CACF,IAAI,CACL,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC,UAAU,EAAE,oBAAoB,CAAC,CAAC","sourcesContent":["import {\n ChangeEvent,\n forwardRef,\n FunctionComponent,\n PropsWithoutRef,\n Ref,\n useCallback,\n useRef\n} from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n useConsolidatedRef,\n useFocusWithin,\n useI18n,\n useInputFormatter,\n useTestIds\n} from '../../hooks';\nimport { defaultThemeProp } from '../../theme';\nimport {\n BaseProps,\n ForwardProps,\n NoChildrenProp,\n PropsWithDefaults,\n TestIdProp\n} from '../../types';\nimport FormField from '../FormField';\nimport { FormControlProps, StyledFormControl } from '../FormControl';\nimport StyledInput from '../Input/Input.styles';\nimport Select, { Option } from '../Select';\nimport Input from '../Input';\nimport { StyledSelect } from '../Select/Select';\nimport Flex from '../Flex';\nimport { withTestIds } from '../../utils';\n\nimport callingCodes from './callingCodes';\nimport { convertToCallbackParameter, formatPhoneNumber, getPhoneNumberParts } from './utils';\nimport { getPhoneInputTestIds } from './Phone.test-ids';\n\nexport interface PhoneInputProps extends FormControlProps, BaseProps, NoChildrenProp, TestIdProp {\n /**\n * Display select with countries calling codes\n * @default false\n */\n showCountryCode?: boolean;\n /** Changes lists of countries calling codes */\n callingCodesList?: string[];\n /** Callback fired on input value change */\n onChange?: (value: string) => void;\n /** Callback fired when the component loses focus */\n onBlur?: (value: string) => void;\n /** CCallback fired when the component gets focus */\n onFocus?: (value: string) => void;\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLInputElement>;\n}\n\ntype PhoneInputPropsWithDefaults = PropsWithDefaults<PhoneInputProps>;\n\nconst StyledPhoneInput = styled.div<PhoneInputPropsWithDefaults>(() => {\n return css`\n border: 0;\n > ${StyledSelect} {\n max-width: max-content;\n border-inline-end: none;\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n }\n\n > ${StyledSelect} + ${StyledInput} {\n border-start-start-radius: 0;\n border-end-start-radius: 0;\n }\n `;\n});\n\nStyledPhoneInput.defaultProps = defaultThemeProp;\n\nconst PhoneInput: FunctionComponent<PhoneInputProps & ForwardProps> = forwardRef(\n function PhoneInput(props: PropsWithoutRef<PhoneInputProps>, ref: PhoneInputProps['ref']) {\n const {\n testId,\n value,\n id,\n label,\n labelHidden,\n info,\n status,\n required,\n readOnly,\n disabled,\n showCountryCode = false,\n callingCodesList = callingCodes,\n onChange,\n onBlur,\n onFocus,\n onResolveSuggestion,\n additionalInfo,\n ...restProps\n } = props;\n\n const testIds = useTestIds(testId, getPhoneInputTestIds);\n\n const t = useI18n();\n\n const [countryCode = callingCodesList[0], subscriberNumber = ''] = value\n ? getPhoneNumberParts(value, callingCodesList)\n : [];\n\n const onFocusChange = (focused: boolean) => {\n const callbackParam = convertToCallbackParameter(countryCode, subscriberNumber);\n if (focused) onFocus?.(callbackParam);\n else onBlur?.(callbackParam);\n };\n\n const onInputChange = (e: ChangeEvent<HTMLInputElement>) => {\n onChange?.(convertToCallbackParameter(countryCode, e.target.value));\n };\n\n const onSelectChange = (e: ChangeEvent<HTMLSelectElement>) => {\n onChange?.(convertToCallbackParameter(e.target.value, subscriberNumber));\n };\n\n const inputRef = useConsolidatedRef<HTMLInputElement>(ref);\n const containerRef = useRef<HTMLElement>(null);\n useFocusWithin([containerRef], onFocusChange);\n\n const formatter = useCallback(\n number => {\n return formatPhoneNumber(number.replace(/\\D+/g, ''), countryCode);\n },\n [countryCode]\n );\n\n const formatted = useInputFormatter(inputRef, subscriberNumber, formatter);\n\n const codesOptions = (\n <>\n {callingCodesList.map(code => (\n <Option key={code} value={code}>\n {code}\n </Option>\n ))}\n </>\n );\n\n const Comp = (\n <StyledPhoneInput\n data-testid={testIds.root}\n as={StyledFormControl}\n forwardedAs={Flex as any}\n container={{ alignItems: 'center', wrap: 'nowrap' }}\n ref={containerRef}\n status={status}\n readOnly={readOnly}\n disabled={disabled}\n >\n {showCountryCode && (\n <Select\n data-testid={testIds.countryCode}\n value={countryCode}\n aria-label={t('select_country_code')}\n onChange={onSelectChange}\n required={required}\n status={status}\n readOnly={readOnly}\n disabled={disabled}\n autoComplete='tel-country-code'\n hasSuggestion={status === 'pending' && !!onResolveSuggestion}\n >\n {codesOptions}\n </Select>\n )}\n <Input\n data-testid={testIds.control}\n {...restProps}\n inputMode='tel'\n ref={inputRef}\n value={formatted}\n aria-label={t('enter_a_number')}\n onChange={onInputChange}\n required={required}\n status={status}\n readOnly={readOnly}\n disabled={disabled}\n autoComplete='tel-national'\n hasSuggestion={status === 'pending' && !!onResolveSuggestion}\n />\n </StyledPhoneInput>\n );\n\n return label ? (\n <FormField\n testId={testIds}\n as='fieldset'\n labelAs='legend'\n additionalInfo={additionalInfo}\n label={label}\n labelHidden={labelHidden}\n id={id}\n info={info}\n status={status}\n required={required}\n disabled={disabled}\n onResolveSuggestion={onResolveSuggestion}\n >\n {Comp}\n </FormField>\n ) : (\n Comp\n );\n }\n);\n\nexport default withTestIds(PhoneInput, getPhoneInputTestIds);\n"]}
1
+ {"version":3,"file":"PhoneInput.js","sourceRoot":"","sources":["../../../src/components/Phone/PhoneInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAExD,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,OAAO,EACP,iBAAiB,EACjB,UAAU,EACX,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAQ/C,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,KAAK,MAAM,UAAU,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,0BAA0B,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAC7F,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAsBxD,MAAM,gBAAgB,GAAG,MAAM,CAAC,GAAG,C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BAAqB,CAAC,EACpC,QAAQ,EAAE,cAAc,EACxB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAC,kBAAkB,EAC/B,aAAa,EAAE,MAAM,KAAK,SAAS,IAAI,CAAC,CAAC,mBAAmB,YAE3D,YAAY,GACN,CACV,EACD,KAAC,KAAK,mBACS,OAAO,CAAC,OAAO,KACxB,SAAS,EACb,SAAS,EAAC,KAAK,EACf,GAAG,EAAE,QAAQ,EACb,KAAK,EAAE,SAAS,gBACJ,CAAC,CAAC,gBAAgB,CAAC,EAC/B,QAAQ,EAAE,aAAa,EACvB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAC,cAAc,EAC3B,aAAa,EAAE,MAAM,KAAK,SAAS,IAAI,CAAC,CAAC,mBAAmB,GAC5D,IACe,CACpB,CAAC;IAEF,OAAO,KAAK,CAAC,CAAC,CAAC,CACb,KAAC,SAAS,IACR,MAAM,EAAE,OAAO,EACf,EAAE,EAAC,UAAU,EACb,OAAO,EAAC,QAAQ,EAChB,cAAc,EAAE,cAAc,EAC9B,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,EAAE,EAAE,EAAE,EACN,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,mBAAmB,EAAE,mBAAmB,YAEvC,IAAI,GACK,CACb,CAAC,CAAC,CAAC,CACF,IAAI,CACL,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC,UAAU,EAAE,oBAAoB,CAAC,CAAC","sourcesContent":["import { forwardRef, useCallback, useRef } from 'react';\nimport type { ChangeEvent, FunctionComponent, PropsWithoutRef, Ref } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n useConsolidatedRef,\n useFocusWithin,\n useI18n,\n useInputFormatter,\n useTestIds\n} from '../../hooks';\nimport { defaultThemeProp } from '../../theme';\nimport type {\n BaseProps,\n ForwardProps,\n NoChildrenProp,\n PropsWithDefaults,\n TestIdProp\n} from '../../types';\nimport FormField from '../FormField';\nimport { StyledFormControl } from '../FormControl';\nimport type { FormControlProps } from '../FormControl';\nimport StyledInput from '../Input/Input.styles';\nimport Select, { Option } from '../Select';\nimport Input from '../Input';\nimport { StyledSelect } from '../Select/Select';\nimport Flex from '../Flex';\nimport { withTestIds } from '../../utils';\n\nimport callingCodes from './callingCodes';\nimport { convertToCallbackParameter, formatPhoneNumber, getPhoneNumberParts } from './utils';\nimport { getPhoneInputTestIds } from './Phone.test-ids';\n\nexport interface PhoneInputProps extends FormControlProps, BaseProps, NoChildrenProp, TestIdProp {\n /**\n * Display select with countries calling codes\n * @default false\n */\n showCountryCode?: boolean;\n /** Changes lists of countries calling codes */\n callingCodesList?: string[];\n /** Callback fired on input value change */\n onChange?: (value: string) => void;\n /** Callback fired when the component loses focus */\n onBlur?: (value: string) => void;\n /** CCallback fired when the component gets focus */\n onFocus?: (value: string) => void;\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLInputElement>;\n}\n\ntype PhoneInputPropsWithDefaults = PropsWithDefaults<PhoneInputProps>;\n\nconst StyledPhoneInput = styled.div<PhoneInputPropsWithDefaults>(() => {\n return css`\n border: 0;\n > ${StyledSelect} {\n max-width: max-content;\n border-inline-end: none;\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n }\n\n > ${StyledSelect} + ${StyledInput} {\n border-start-start-radius: 0;\n border-end-start-radius: 0;\n }\n `;\n});\n\nStyledPhoneInput.defaultProps = defaultThemeProp;\n\nconst PhoneInput: FunctionComponent<PhoneInputProps & ForwardProps> = forwardRef(\n function PhoneInput(props: PropsWithoutRef<PhoneInputProps>, ref: PhoneInputProps['ref']) {\n const {\n testId,\n value,\n id,\n label,\n labelHidden,\n info,\n status,\n required,\n readOnly,\n disabled,\n showCountryCode = false,\n callingCodesList = callingCodes,\n onChange,\n onBlur,\n onFocus,\n onResolveSuggestion,\n additionalInfo,\n ...restProps\n } = props;\n\n const testIds = useTestIds(testId, getPhoneInputTestIds);\n\n const t = useI18n();\n\n const [countryCode = callingCodesList[0], subscriberNumber = ''] = value\n ? getPhoneNumberParts(value, callingCodesList)\n : [];\n\n const onFocusChange = (focused: boolean) => {\n const callbackParam = convertToCallbackParameter(countryCode, subscriberNumber);\n if (focused) onFocus?.(callbackParam);\n else onBlur?.(callbackParam);\n };\n\n const onInputChange = (e: ChangeEvent<HTMLInputElement>) => {\n onChange?.(convertToCallbackParameter(countryCode, e.target.value));\n };\n\n const onSelectChange = (e: ChangeEvent<HTMLSelectElement>) => {\n onChange?.(convertToCallbackParameter(e.target.value, subscriberNumber));\n };\n\n const inputRef = useConsolidatedRef<HTMLInputElement>(ref);\n const containerRef = useRef<HTMLElement>(null);\n useFocusWithin([containerRef], onFocusChange);\n\n const formatter = useCallback(\n number => {\n return formatPhoneNumber(number.replace(/\\D+/g, ''), countryCode);\n },\n [countryCode]\n );\n\n const formatted = useInputFormatter(inputRef, subscriberNumber, formatter);\n\n const codesOptions = (\n <>\n {callingCodesList.map(code => (\n <Option key={code} value={code}>\n {code}\n </Option>\n ))}\n </>\n );\n\n const Comp = (\n <StyledPhoneInput\n data-testid={testIds.root}\n as={StyledFormControl}\n forwardedAs={Flex as any}\n container={{ alignItems: 'center', wrap: 'nowrap' }}\n ref={containerRef}\n status={status}\n readOnly={readOnly}\n disabled={disabled}\n >\n {showCountryCode && (\n <Select\n data-testid={testIds.countryCode}\n value={countryCode}\n aria-label={t('select_country_code')}\n onChange={onSelectChange}\n required={required}\n status={status}\n readOnly={readOnly}\n disabled={disabled}\n autoComplete='tel-country-code'\n hasSuggestion={status === 'pending' && !!onResolveSuggestion}\n >\n {codesOptions}\n </Select>\n )}\n <Input\n data-testid={testIds.control}\n {...restProps}\n inputMode='tel'\n ref={inputRef}\n value={formatted}\n aria-label={t('enter_a_number')}\n onChange={onInputChange}\n required={required}\n status={status}\n readOnly={readOnly}\n disabled={disabled}\n autoComplete='tel-national'\n hasSuggestion={status === 'pending' && !!onResolveSuggestion}\n />\n </StyledPhoneInput>\n );\n\n return label ? (\n <FormField\n testId={testIds}\n as='fieldset'\n labelAs='legend'\n additionalInfo={additionalInfo}\n label={label}\n labelHidden={labelHidden}\n id={id}\n info={info}\n status={status}\n required={required}\n disabled={disabled}\n onResolveSuggestion={onResolveSuggestion}\n >\n {Comp}\n </FormField>\n ) : (\n Comp\n );\n }\n);\n\nexport default withTestIds(PhoneInput, getPhoneInputTestIds);\n"]}
@@ -1,8 +1,8 @@
1
- import { Ref, ReactElement, ReactNode } from 'react';
2
- import { PopperProps } from 'react-popper';
3
- import { VirtualElement } from '@popperjs/core';
4
- import { BaseProps, ForwardProps } from '../../types';
5
- import { ConfigurationProps } from '../Configuration';
1
+ import type { Ref, ReactElement, ReactNode } from 'react';
2
+ import type { PopperProps } from 'react-popper';
3
+ import type { VirtualElement } from '@popperjs/core';
4
+ import type { BaseProps, ForwardProps } from '../../types';
5
+ import type { ConfigurationProps } from '../Configuration';
6
6
  export type Delay = 'none' | 'short' | 'long';
7
7
  export interface PopoverProps<Modifiers extends string = string> extends BaseProps {
8
8
  /** The DOM element or [virtual element](https://popper.js.org/docs/v2/virtual-elements) that the Popover is positioned in reference to. */
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,GAAG,EAEH,YAAY,EAEZ,SAAS,EAKV,MAAM,OAAO,CAAC;AAEf,OAAO,EAAa,WAAW,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAStD,OAA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ACJ,CAAC,EAAE,CAAC,MAAM,EAAE,cAAc,EAAE,SAAS,CAAC,CAAC,CAAC;IAExC,MAAM,OAAO,GAAG,CACd,MAAC,aAAa,OACR,SAAS,qBACI,SAAS,EAC1B,MAAM,EAAE,CAAC,CAAC,CAAC,MAAM,IAAI,YAAY,CAAC,EAClC,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,SAAS,EACd,KAAK,EAAE,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,KACjC,UAAU,CAAC,MAAM,aAEpB,KAAK,IAAI,KAAC,kBAAkB,IAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,GAAG,MAAM,CAAC,KAAK,EAAE,GAAI,EAC1E,QAAQ,IACK,CACjB,CAAC;IAEF,IAAI,CAAC,MAAM,IAAI,CAAC,WAAW,IAAI,CAAC,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IAEpF,OAAO,MAAM,IAAI,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;AAChF,CAAC,CAAC,CAAC;AAEH,eAAe,OAAO,CAAC","sourcesContent":["import {\n forwardRef,\n useContext,\n PropsWithoutRef,\n Ref,\n CSSProperties,\n ReactElement,\n useRef,\n ReactNode,\n useEffect,\n useMemo,\n useState,\n useLayoutEffect\n} from 'react';\nimport { createPortal } from 'react-dom';\nimport { usePopper, PopperProps } from 'react-popper';\nimport { VirtualElement } from '@popperjs/core';\nimport { OffsetModifier } from '@popperjs/core/lib/modifiers/offset';\n\nimport { BaseProps, ForwardProps } from '../../types';\nimport {\n useAfterInitialEffect,\n useConfiguration,\n useConsolidatedRef,\n useElement,\n useUID\n} from '../../hooks';\nimport { getRelativeOffset, popoverMap, windowIsAvailable } from '../../utils';\nimport { ConfigurationProps } from '../Configuration';\nimport { BackdropContext } from '../Backdrop/Backdrop';\n\nimport { PopoverManagerContext } from './PopoverContext';\nimport { StyledPopover, StyledPopoverArrow } from './Popover.styles';\nimport { placeAndContain } from './modifiers';\n\nexport type Delay = 'none' | 'short' | 'long';\nexport interface PopoverProps<Modifiers extends string = string> extends BaseProps {\n /** The DOM element or [virtual element](https://popper.js.org/docs/v2/virtual-elements) that the Popover is positioned in reference to. */\n target: Element | VirtualElement | null;\n /**\n * If true, the Popover will be visible.\n * @default true\n */\n show?: boolean;\n /**\n * If true, the Popover will render outside of the current DOM hierarchy in a [portal](https://reactjs.org/docs/portals.html).\n * @default true\n */\n portal?: boolean | ConfigurationProps['portalTarget'];\n /**\n * Delay on showing the Popover.\n * @default 'none'\n */\n showDelay?: Delay;\n /**\n * Delay on hiding the Popover.\n * @default 'none'\n */\n hideDelay?: Delay;\n /**\n * [React Popper Placement](https://popper.js.org/react-popper/v2/render-props/#placement)\n * @default 'bottom'\n */\n placement?: PopperProps<Modifiers>['placement'];\n /**\n * [React Popper Strategy](https://popper.js.org/react-popper/v2/render-props/#strategy)\n * @default 'absolute'\n */\n strategy?: PopperProps<Modifiers>['strategy'];\n /**\n * [React Popper Modifiers](https://popper.js.org/react-popper/v2/render-props/#modifiers)\n * @default []\n */\n modifiers?: PopperProps<Modifiers>['modifiers'];\n /**\n * If true, an arrow will visually identify from which element the Popover is rendered.\n * @default false\n */\n arrow?: boolean;\n /** The group that the Popover belongs to. Popovers in the same group will be closed when others open. */\n groupId?: string;\n /**\n * If true, the Popover will be visibly hidden when its target leaves the viewport.\n * @default false\n */\n hideOnTargetHidden?: boolean;\n /** Callback that runs when the popover is hidden */\n onHide?: () => void;\n /** The content of the Popover. */\n children: ReactNode;\n /** The ref of the wrapping element. */\n ref?: Ref<HTMLDivElement>;\n}\n\nconst delays = {\n none: 0,\n short: 500,\n long: 1000\n};\n\nconst Popover: <Modifiers extends string = string>(\n props: PopoverProps<Modifiers> & ForwardProps\n) => ReactElement | null = forwardRef(function Popover(\n {\n show = true,\n portal = true,\n target,\n placement = 'bottom',\n strategy = 'fixed',\n style,\n modifiers = [],\n arrow = false,\n groupId,\n showDelay = 'none',\n hideDelay = 'none',\n hideOnTargetHidden = false,\n children,\n onHide,\n ...restProps\n }: PropsWithoutRef<PopoverProps> & { style?: CSSProperties },\n ref: PopoverProps['ref']\n) {\n const { portalTarget: configurationPortal } = useConfiguration();\n const { el: backdropPortal } = useContext(BackdropContext);\n const { checkActive, setActive, popovers } = useContext(PopoverManagerContext);\n const [popperEl, setPopperEl] = useElement<HTMLDivElement>();\n const popperRef = useConsolidatedRef<HTMLDivElement>(ref, setPopperEl);\n const arrowRef = useRef<HTMLDivElement>(null);\n const forceUpdateRef = useRef<() => void>();\n const initialOffset = useRef<Pick<DOMRect, 'x' | 'y'> | null>(null);\n const [showPopover, setShowPopover] = useState(show);\n const timeout = useRef<number>();\n const uid = useUID();\n const pointerId = useUID();\n\n const resolvedTarget = target instanceof Element ? target : target?.contextElement;\n const portalTarget = typeof portal === 'boolean' ? backdropPortal ?? configurationPortal : portal;\n\n const memoedModifiers = useMemo(() => {\n const flipEnabled = !!modifiers\n .slice()\n .reverse()\n .find(modifier => modifier.name === 'flip' && modifier.enabled !== undefined)?.enabled;\n\n return [\n {\n name: 'computeStyles',\n options: {\n gpuAcceleration: false\n }\n },\n {\n name: 'offset',\n options: {\n offset: [0, arrow ? 5.5 : 2]\n }\n },\n { name: 'hide', enabled: hideOnTargetHidden },\n { name: 'arrow', enabled: arrow, options: { element: arrowRef.current } },\n {\n name: 'preventOverflow',\n options: {\n tether: !modifiers.find(m => m.name === 'sameWidth'),\n padding: 16\n }\n },\n {\n ...placeAndContain,\n enabled: !flipEnabled\n },\n ...modifiers\n ];\n }, [arrow, hideOnTargetHidden, modifiers]);\n\n const offset = useMemo(() => {\n const offsetModifier = [...memoedModifiers]\n .reverse()\n .find(m => m.name === 'offset' && m.enabled !== false) as OffsetModifier | undefined;\n return Array.isArray(offsetModifier?.options?.offset)\n ? offsetModifier?.options?.offset[1] ?? 0\n : 0;\n }, [memoedModifiers]);\n\n const { styles, attributes, forceUpdate } = usePopper(target, popperEl, {\n placement,\n strategy,\n modifiers: memoedModifiers\n });\n\n if (forceUpdate) forceUpdateRef.current = forceUpdate;\n\n // Setter-less useState to avoid re-running these constructors on every render with useRef.\n const [ac] = useState(() => new AbortController());\n const [observedSet] = useState(() => new WeakSet<Element>());\n const [ro] = useState(\n () =>\n new ResizeObserver(entries => {\n let updateQueued = false;\n\n for (const { target: resizeTarget } of entries) {\n // Ignore the first ResizeObserver event for each element since ResizeObserver always fires once when calling .observe().\n if (!observedSet.has(resizeTarget)) {\n observedSet.add(resizeTarget);\n } else if (!updateQueued) {\n updateQueued = true;\n\n if (!ac.signal.aborted) {\n forceUpdateRef.current?.();\n }\n }\n }\n })\n );\n\n useEffect(() => {\n return () => {\n ac.abort();\n ro.disconnect();\n };\n }, []);\n\n useEffect(() => {\n if (!popperEl) return;\n\n ro.observe(popperEl);\n\n return () => {\n ro.unobserve(popperEl);\n };\n }, [popperEl]);\n\n useEffect(() => {\n if (!resolvedTarget) return;\n\n ro.observe(resolvedTarget);\n\n return () => {\n ro.unobserve(resolvedTarget);\n };\n }, [resolvedTarget]);\n\n useLayoutEffect(() => {\n if (resolvedTarget) {\n initialOffset.current = getRelativeOffset(resolvedTarget, document.documentElement);\n } else {\n initialOffset.current = null;\n }\n }, [resolvedTarget]);\n\n useEffect(() => {\n if (!showPopover || !resolvedTarget) return;\n\n let rafId: ReturnType<typeof requestAnimationFrame>;\n\n const checkCoords = () => {\n if (resolvedTarget && initialOffset.current) {\n const newOffset = getRelativeOffset(resolvedTarget, document.documentElement);\n\n if (initialOffset.current.x !== newOffset.x || initialOffset.current.y !== newOffset.y) {\n initialOffset.current = newOffset;\n forceUpdateRef.current?.();\n } else {\n rafId = requestAnimationFrame(checkCoords);\n }\n }\n };\n\n rafId = requestAnimationFrame(checkCoords);\n\n return () => {\n cancelAnimationFrame(rafId);\n };\n }, [showPopover, resolvedTarget]);\n\n useEffect(() => {\n if (groupId && show) setActive(uid, groupId);\n\n if (windowIsAvailable) {\n if (timeout.current) clearTimeout(timeout.current);\n timeout.current = window.setTimeout(() => {\n setShowPopover(show);\n }, delays[show ? showDelay : hideDelay]);\n } else {\n setShowPopover(show);\n }\n }, [show]);\n\n useEffect(() => {\n return () => clearTimeout(timeout.current);\n }, []);\n\n useAfterInitialEffect(() => {\n if (!showPopover) {\n onHide?.();\n }\n }, [showPopover]);\n\n useEffect(() => {\n if (groupId && popovers[groupId] && popovers[groupId] !== uid) {\n setShowPopover(false);\n }\n }, [groupId ? popovers[groupId] : undefined]);\n\n useEffect(() => {\n if (!portal || !resolvedTarget) return;\n\n if (!popoverMap.has(resolvedTarget)) {\n popoverMap.set(resolvedTarget, new Set());\n }\n\n resolvedTarget.toggleAttribute('data-popover-target', true);\n\n popoverMap.get(resolvedTarget)!.add(pointerId);\n\n return () => {\n if (!popoverMap.has(resolvedTarget)) return;\n\n popoverMap.get(resolvedTarget)!.delete(pointerId);\n\n if (popoverMap.get(resolvedTarget)!.size === 0) {\n popoverMap.delete(resolvedTarget);\n resolvedTarget.removeAttribute('data-popover-target');\n }\n };\n }, [portal, resolvedTarget, pointerId]);\n\n const content = (\n <StyledPopover\n {...restProps}\n data-popover-id={pointerId}\n portal={!!(portal && portalTarget)}\n offset={offset}\n ref={popperRef}\n style={{ ...style, ...styles.popper }}\n {...attributes.popper}\n >\n {arrow && <StyledPopoverArrow ref={arrowRef} style={{ ...styles.arrow }} />}\n {children}\n </StyledPopover>\n );\n\n if (!target || !showPopover || (groupId && !checkActive(uid, groupId))) return null;\n\n return portal && portalTarget ? createPortal(content, portalTarget) : content;\n});\n\nexport default Popover;\n"]}
1
+ {"version":3,"file":"Popover.js","sourceRoot":"","sources":["../../../src/components/Popover/Popover.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EACV,UAAU,EACV,MAAM,EACN,SAAS,EACT,OAAO,EACP,QAAQ,EACR,eAAe,EAChB,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C;QAAE,OAAO,IAAI,CAAC;IAEpF,OAAO,MAAM,IAAI,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;AAChF,CAAC,CAAC,CAAC;AAEH,eAAe,OAAO,CAAC","sourcesContent":["import {\n forwardRef,\n useContext,\n useRef,\n useEffect,\n useMemo,\n useState,\n useLayoutEffect\n} from 'react';\nimport type { PropsWithoutRef, Ref, CSSProperties, ReactElement, ReactNode } from 'react';\nimport { createPortal } from 'react-dom';\nimport { usePopper } from 'react-popper';\nimport type { PopperProps } from 'react-popper';\nimport type { VirtualElement } from '@popperjs/core';\nimport type { OffsetModifier } from '@popperjs/core/lib/modifiers/offset';\n\nimport type { BaseProps, ForwardProps } from '../../types';\nimport {\n useAfterInitialEffect,\n useConfiguration,\n useConsolidatedRef,\n useElement,\n useUID\n} from '../../hooks';\nimport { getRelativeOffset, popoverMap, windowIsAvailable } from '../../utils';\nimport type { ConfigurationProps } from '../Configuration';\nimport { BackdropContext } from '../Backdrop/Backdrop';\n\nimport { PopoverManagerContext } from './PopoverContext';\nimport { StyledPopover, StyledPopoverArrow } from './Popover.styles';\nimport { placeAndContain } from './modifiers';\n\nexport type Delay = 'none' | 'short' | 'long';\nexport interface PopoverProps<Modifiers extends string = string> extends BaseProps {\n /** The DOM element or [virtual element](https://popper.js.org/docs/v2/virtual-elements) that the Popover is positioned in reference to. */\n target: Element | VirtualElement | null;\n /**\n * If true, the Popover will be visible.\n * @default true\n */\n show?: boolean;\n /**\n * If true, the Popover will render outside of the current DOM hierarchy in a [portal](https://reactjs.org/docs/portals.html).\n * @default true\n */\n portal?: boolean | ConfigurationProps['portalTarget'];\n /**\n * Delay on showing the Popover.\n * @default 'none'\n */\n showDelay?: Delay;\n /**\n * Delay on hiding the Popover.\n * @default 'none'\n */\n hideDelay?: Delay;\n /**\n * [React Popper Placement](https://popper.js.org/react-popper/v2/render-props/#placement)\n * @default 'bottom'\n */\n placement?: PopperProps<Modifiers>['placement'];\n /**\n * [React Popper Strategy](https://popper.js.org/react-popper/v2/render-props/#strategy)\n * @default 'absolute'\n */\n strategy?: PopperProps<Modifiers>['strategy'];\n /**\n * [React Popper Modifiers](https://popper.js.org/react-popper/v2/render-props/#modifiers)\n * @default []\n */\n modifiers?: PopperProps<Modifiers>['modifiers'];\n /**\n * If true, an arrow will visually identify from which element the Popover is rendered.\n * @default false\n */\n arrow?: boolean;\n /** The group that the Popover belongs to. Popovers in the same group will be closed when others open. */\n groupId?: string;\n /**\n * If true, the Popover will be visibly hidden when its target leaves the viewport.\n * @default false\n */\n hideOnTargetHidden?: boolean;\n /** Callback that runs when the popover is hidden */\n onHide?: () => void;\n /** The content of the Popover. */\n children: ReactNode;\n /** The ref of the wrapping element. */\n ref?: Ref<HTMLDivElement>;\n}\n\nconst delays = {\n none: 0,\n short: 500,\n long: 1000\n};\n\nconst Popover: <Modifiers extends string = string>(\n props: PopoverProps<Modifiers> & ForwardProps\n) => ReactElement | null = forwardRef(function Popover(\n {\n show = true,\n portal = true,\n target,\n placement = 'bottom',\n strategy = 'fixed',\n style,\n modifiers = [],\n arrow = false,\n groupId,\n showDelay = 'none',\n hideDelay = 'none',\n hideOnTargetHidden = false,\n children,\n onHide,\n ...restProps\n }: PropsWithoutRef<PopoverProps> & { style?: CSSProperties },\n ref: PopoverProps['ref']\n) {\n const { portalTarget: configurationPortal } = useConfiguration();\n const { el: backdropPortal } = useContext(BackdropContext);\n const { checkActive, setActive, popovers } = useContext(PopoverManagerContext);\n const [popperEl, setPopperEl] = useElement<HTMLDivElement>();\n const popperRef = useConsolidatedRef<HTMLDivElement>(ref, setPopperEl);\n const arrowRef = useRef<HTMLDivElement>(null);\n const forceUpdateRef = useRef<() => void>();\n const initialOffset = useRef<Pick<DOMRect, 'x' | 'y'> | null>(null);\n const [showPopover, setShowPopover] = useState(show);\n const timeout = useRef<number>();\n const uid = useUID();\n const pointerId = useUID();\n\n const resolvedTarget = target instanceof Element ? target : target?.contextElement;\n const portalTarget = typeof portal === 'boolean' ? backdropPortal ?? configurationPortal : portal;\n\n const memoedModifiers = useMemo(() => {\n const flipEnabled = !!modifiers\n .slice()\n .reverse()\n .find(modifier => modifier.name === 'flip' && modifier.enabled !== undefined)?.enabled;\n\n return [\n {\n name: 'computeStyles',\n options: {\n gpuAcceleration: false\n }\n },\n {\n name: 'offset',\n options: {\n offset: [0, arrow ? 5.5 : 2]\n }\n },\n { name: 'hide', enabled: hideOnTargetHidden },\n { name: 'arrow', enabled: arrow, options: { element: arrowRef.current } },\n {\n name: 'preventOverflow',\n options: {\n tether: !modifiers.find(m => m.name === 'sameWidth'),\n padding: 16\n }\n },\n {\n ...placeAndContain,\n enabled: !flipEnabled\n },\n ...modifiers\n ];\n }, [arrow, hideOnTargetHidden, modifiers]);\n\n const offset = useMemo(() => {\n const offsetModifier = [...memoedModifiers]\n .reverse()\n .find(m => m.name === 'offset' && m.enabled !== false) as OffsetModifier | undefined;\n return Array.isArray(offsetModifier?.options?.offset)\n ? offsetModifier?.options?.offset[1] ?? 0\n : 0;\n }, [memoedModifiers]);\n\n const { styles, attributes, forceUpdate } = usePopper(target, popperEl, {\n placement,\n strategy,\n modifiers: memoedModifiers\n });\n\n if (forceUpdate) forceUpdateRef.current = forceUpdate;\n\n // Setter-less useState to avoid re-running these constructors on every render with useRef.\n const [ac] = useState(() => new AbortController());\n const [observedSet] = useState(() => new WeakSet<Element>());\n const [ro] = useState(\n () =>\n new ResizeObserver(entries => {\n let updateQueued = false;\n\n for (const { target: resizeTarget } of entries) {\n // Ignore the first ResizeObserver event for each element since ResizeObserver always fires once when calling .observe().\n if (!observedSet.has(resizeTarget)) {\n observedSet.add(resizeTarget);\n } else if (!updateQueued) {\n updateQueued = true;\n\n if (!ac.signal.aborted) {\n forceUpdateRef.current?.();\n }\n }\n }\n })\n );\n\n useEffect(() => {\n return () => {\n ac.abort();\n ro.disconnect();\n };\n }, []);\n\n useEffect(() => {\n if (!popperEl) return;\n\n ro.observe(popperEl);\n\n return () => {\n ro.unobserve(popperEl);\n };\n }, [popperEl]);\n\n useEffect(() => {\n if (!resolvedTarget) return;\n\n ro.observe(resolvedTarget);\n\n return () => {\n ro.unobserve(resolvedTarget);\n };\n }, [resolvedTarget]);\n\n useLayoutEffect(() => {\n if (resolvedTarget) {\n initialOffset.current = getRelativeOffset(resolvedTarget, document.documentElement);\n } else {\n initialOffset.current = null;\n }\n }, [resolvedTarget]);\n\n useEffect(() => {\n if (!showPopover || !resolvedTarget) return;\n\n let rafId: ReturnType<typeof requestAnimationFrame>;\n\n const checkCoords = () => {\n if (resolvedTarget && initialOffset.current) {\n const newOffset = getRelativeOffset(resolvedTarget, document.documentElement);\n\n if (initialOffset.current.x !== newOffset.x || initialOffset.current.y !== newOffset.y) {\n initialOffset.current = newOffset;\n forceUpdateRef.current?.();\n } else {\n rafId = requestAnimationFrame(checkCoords);\n }\n }\n };\n\n rafId = requestAnimationFrame(checkCoords);\n\n return () => {\n cancelAnimationFrame(rafId);\n };\n }, [showPopover, resolvedTarget]);\n\n useEffect(() => {\n if (groupId && show) setActive(uid, groupId);\n\n if (windowIsAvailable) {\n if (timeout.current) clearTimeout(timeout.current);\n timeout.current = window.setTimeout(() => {\n setShowPopover(show);\n }, delays[show ? showDelay : hideDelay]);\n } else {\n setShowPopover(show);\n }\n }, [show]);\n\n useEffect(() => {\n return () => clearTimeout(timeout.current);\n }, []);\n\n useAfterInitialEffect(() => {\n if (!showPopover) {\n onHide?.();\n }\n }, [showPopover]);\n\n useEffect(() => {\n if (groupId && popovers[groupId] && popovers[groupId] !== uid) {\n setShowPopover(false);\n }\n }, [groupId ? popovers[groupId] : undefined]);\n\n useEffect(() => {\n if (!portal || !resolvedTarget) return;\n\n if (!popoverMap.has(resolvedTarget)) {\n popoverMap.set(resolvedTarget, new Set());\n }\n\n resolvedTarget.toggleAttribute('data-popover-target', true);\n\n popoverMap.get(resolvedTarget)!.add(pointerId);\n\n return () => {\n if (!popoverMap.has(resolvedTarget)) return;\n\n popoverMap.get(resolvedTarget)!.delete(pointerId);\n\n if (popoverMap.get(resolvedTarget)!.size === 0) {\n popoverMap.delete(resolvedTarget);\n resolvedTarget.removeAttribute('data-popover-target');\n }\n };\n }, [portal, resolvedTarget, pointerId]);\n\n const content = (\n <StyledPopover\n {...restProps}\n data-popover-id={pointerId}\n portal={!!(portal && portalTarget)}\n offset={offset}\n ref={popperRef}\n style={{ ...style, ...styles.popper }}\n {...attributes.popper}\n >\n {arrow && <StyledPopoverArrow ref={arrowRef} style={{ ...styles.arrow }} />}\n {children}\n </StyledPopover>\n );\n\n if (!target || !showPopover || (groupId && !checkActive(uid, groupId))) return null;\n\n return portal && portalTarget ? createPortal(content, portalTarget) : content;\n});\n\nexport default Popover;\n"]}
@@ -1,4 +1,4 @@
1
- import { FunctionComponent, ReactNode } from 'react';
1
+ import type { FunctionComponent, ReactNode } from 'react';
2
2
  declare const PopoverManager: FunctionComponent<{
3
3
  children: ReactNode;
4
4
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"PopoverManager.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/PopoverManager.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAkC,MAAM,OAAO,CAAC;AAIrF,QAAA,MAAM,cAAc,EAAE,iBAAiB,CAAC;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,CA0B9D,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"PopoverManager.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/PopoverManager.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAI1D,QAAA,MAAM,cAAc,EAAE,iBAAiB,CAAC;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,CA0B9D,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"PopoverManager.js","sourceRoot":"","sources":["../../../src/components/Popover/PopoverManager.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAgC,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAErF,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,MAAM,cAAc,GAA+C,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IAClF,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAyB,EAAE,CAAC,CAAC;IAErE,MAAM,WAAW,GAAG,WAAW,CAC7B,CAAC,EAAU,EAAE,OAAe,EAAW,EAAE;QACvC,OAAO,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;IAClC,CAAC,EACD,CAAC,QAAQ,CAAC,CACX,CAAC;IAEF,MAAM,SAAS,GAAG,WAAW,CAAC,CAAC,EAAU,EAAE,OAAe,EAAE,EAAE;QAC5D,WAAW,CAAC,IAAI,CAAC,EAAE;YACjB,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC;QACpC,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,GAAG,GAAG,OAAO,CACjB,GAAG,EAAE,CAAC,CAAC;QACL,WAAW;QACX,SAAS;QACT,QAAQ;KACT,CAAC,EACF,CAAC,WAAW,EAAE,SAAS,EAAE,QAAQ,CAAC,CACnC,CAAC;IAEF,OAAO,KAAC,qBAAqB,CAAC,QAAQ,IAAC,KAAK,EAAE,GAAG,YAAG,QAAQ,GAAkC,CAAC;AACjG,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import { FunctionComponent, ReactNode, useCallback, useMemo, useState } from 'react';\n\nimport { PopoverManagerContext } from './PopoverContext';\n\nconst PopoverManager: FunctionComponent<{ children: ReactNode }> = ({ children }) => {\n const [popovers, setPopovers] = useState<Record<string, string>>({});\n\n const checkActive = useCallback(\n (id: string, groupId: string): boolean => {\n return popovers[groupId] === id;\n },\n [popovers]\n );\n\n const setActive = useCallback((id: string, groupId: string) => {\n setPopovers(curr => {\n return { ...curr, [groupId]: id };\n });\n }, []);\n\n const ctx = useMemo(\n () => ({\n checkActive,\n setActive,\n popovers\n }),\n [checkActive, setActive, popovers]\n );\n\n return <PopoverManagerContext.Provider value={ctx}>{children}</PopoverManagerContext.Provider>;\n};\n\nexport default PopoverManager;\n"]}
1
+ {"version":3,"file":"PopoverManager.js","sourceRoot":"","sources":["../../../src/components/Popover/PopoverManager.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,MAAM,cAAc,GAA+C,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IAClF,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAyB,EAAE,CAAC,CAAC;IAErE,MAAM,WAAW,GAAG,WAAW,CAC7B,CAAC,EAAU,EAAE,OAAe,EAAW,EAAE;QACvC,OAAO,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;IAClC,CAAC,EACD,CAAC,QAAQ,CAAC,CACX,CAAC;IAEF,MAAM,SAAS,GAAG,WAAW,CAAC,CAAC,EAAU,EAAE,OAAe,EAAE,EAAE;QAC5D,WAAW,CAAC,IAAI,CAAC,EAAE;YACjB,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC;QACpC,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,GAAG,GAAG,OAAO,CACjB,GAAG,EAAE,CAAC,CAAC;QACL,WAAW;QACX,SAAS;QACT,QAAQ;KACT,CAAC,EACF,CAAC,WAAW,EAAE,SAAS,EAAE,QAAQ,CAAC,CACnC,CAAC;IAEF,OAAO,KAAC,qBAAqB,CAAC,QAAQ,IAAC,KAAK,EAAE,GAAG,YAAG,QAAQ,GAAkC,CAAC;AACjG,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import { useCallback, useMemo, useState } from 'react';\nimport type { FunctionComponent, ReactNode } from 'react';\n\nimport { PopoverManagerContext } from './PopoverContext';\n\nconst PopoverManager: FunctionComponent<{ children: ReactNode }> = ({ children }) => {\n const [popovers, setPopovers] = useState<Record<string, string>>({});\n\n const checkActive = useCallback(\n (id: string, groupId: string): boolean => {\n return popovers[groupId] === id;\n },\n [popovers]\n );\n\n const setActive = useCallback((id: string, groupId: string) => {\n setPopovers(curr => {\n return { ...curr, [groupId]: id };\n });\n }, []);\n\n const ctx = useMemo(\n () => ({\n checkActive,\n setActive,\n popovers\n }),\n [checkActive, setActive, popovers]\n );\n\n return <PopoverManagerContext.Provider value={ctx}>{children}</PopoverManagerContext.Provider>;\n};\n\nexport default PopoverManager;\n"]}
@@ -1,4 +1,4 @@
1
- import { Modifier } from '@popperjs/core';
1
+ import type { Modifier } from '@popperjs/core';
2
2
  export declare const sameWidth: Modifier<'sameWidth', object>;
3
3
  export declare const placeAndContain: Modifier<'placeAndContain', object>;
4
4
  //# sourceMappingURL=modifiers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"modifiers.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/modifiers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAI1C,eAAO,MAAM,SAAS,EAAE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAQlD,CAAC;AAIH,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CA8J9D,CAAC"}
1
+ {"version":3,"file":"modifiers.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/modifiers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,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from '../../utils';\n\nexport const sameWidth: Modifier<'sameWidth', object> = Object.freeze({\n name: 'sameWidth',\n enabled: true,\n phase: 'beforeWrite',\n fn({ state }) {\n state.styles.popper.width = `${state.rects.reference.width}px`;\n },\n requires: ['computeStyles']\n});\n\nconst scrollbarSize = documentIsAvailable ? getScrollbarWidth() : 0;\n\nexport const placeAndContain: Modifier<'placeAndContain', object> = Object.freeze({\n name: 'placeAndContain',\n enabled: true,\n phase: 'beforeWrite',\n requires: ['computeStyles', 'offset'],\n fn: ({ state }) => {\n const [requestedPrimaryPlacement, requestedSecondaryPlacement] = state.placement.split('-') as [\n primaryPlacement: 'top' | 'bottom' | 'left' | 'right' | 'auto',\n secondaryPlacement?: 'start' | 'end' | undefined\n ];\n\n const padding = {\n top: 0,\n bottom: 0,\n right: 0,\n left: 0\n };\n\n const preventOverflowPad = state.orderedModifiers.find(({ name }) => name === 'preventOverflow')\n ?.options?.padding;\n\n if (typeof preventOverflowPad === 'number') {\n padding.top = preventOverflowPad;\n padding.bottom = preventOverflowPad;\n padding.right = preventOverflowPad;\n padding.left = preventOverflowPad;\n } else if (preventOverflowPad) {\n padding.top = preventOverflowPad.top ?? padding.top;\n padding.bottom = preventOverflowPad.bottom ?? padding.bottom;\n padding.right = preventOverflowPad.right ?? padding.right;\n padding.left = preventOverflowPad.left ?? padding.left;\n }\n\n const vw = document.documentElement.clientWidth;\n const vh = document.documentElement.clientHeight;\n\n const targetRect = state.rects.reference;\n const targetRectXStart = targetRect.x;\n const targetRectXEnd = targetRectXStart + targetRect.width;\n const targetRectYStart = targetRect.y;\n const targetRectYEnd = targetRectYStart + targetRect.height;\n const targetXMid = (targetRectXStart + targetRectXEnd) / 2;\n const targetYMid = (targetRectYStart + targetRectYEnd) / 2;\n const targetIsInLeftHalfOfViewport = targetXMid < vw / 2;\n const targetIsInTopHalfOfViewport = targetYMid < vh / 2;\n\n const offsetFromTargetX = state.modifiersData.offset?.[state.placement]?.x ?? 0;\n const offsetFromTargetY = state.modifiersData.offset?.[state.placement]?.y ?? 0;\n\n let popoverMaxWidth: null | number = null;\n let popoverMaxHeight: null | number = null;\n\n const totalScrollableChildHeight = Array.from(state.elements.popper.children).reduce(\n (sum, el) => {\n if (el === state.elements.arrow) {\n return sum;\n }\n\n if (testElForOverflow(el)[0]) {\n return sum + el.scrollHeight + scrollbarSize;\n }\n\n return sum + el.scrollHeight;\n },\n 0\n );\n\n const naturalPopoverHeight = Math.max(\n state.elements.popper.scrollHeight,\n totalScrollableChildHeight\n );\n\n const naturalPopoverWidth = Math.max(\n state.elements.popper.scrollWidth,\n ...Array.from(state.elements.popper.children).map(el => {\n if (el === state.elements.arrow) {\n return -Infinity;\n }\n\n if (testElForOverflow(el)[1]) {\n return el.scrollWidth + scrollbarSize;\n }\n\n return el.scrollWidth;\n })\n );\n\n let resolvedPlacement: `${'top' | 'bottom' | 'left' | 'right' | 'auto'}${\n | ''\n | '-start'\n | '-end'}` = requestedPrimaryPlacement;\n\n if (requestedPrimaryPlacement === 'bottom') {\n popoverMaxHeight = vh - targetRectYEnd - offsetFromTargetY - padding.bottom;\n\n if (\n // If the popover will overflow the viewport bottom\n targetRectYEnd + offsetFromTargetY + naturalPopoverHeight >\n vh\n ) {\n // Choose the side with most allowance\n resolvedPlacement = targetIsInTopHalfOfViewport ? 'bottom' : 'top';\n }\n } else if (requestedPrimaryPlacement === 'top') {\n popoverMaxHeight = targetRectYStart + offsetFromTargetY - padding.top;\n\n if (\n // If the popover will overflow the viewport top\n targetRectYStart + offsetFromTargetY - naturalPopoverHeight <\n 0\n ) {\n // Choose the side with most allowance\n resolvedPlacement = targetIsInTopHalfOfViewport ? 'bottom' : 'top';\n }\n } else if (requestedPrimaryPlacement === 'left') {\n popoverMaxWidth = targetRectXStart + offsetFromTargetX - padding.left;\n\n if (\n // If the popover will overflow the viewport left\n targetRectXStart + offsetFromTargetX - naturalPopoverWidth <\n 0\n ) {\n // Choose the side with most allowance\n resolvedPlacement = targetIsInLeftHalfOfViewport ? 'right' : 'left';\n }\n } else if (requestedPrimaryPlacement === 'right') {\n popoverMaxWidth = vw - targetRectXEnd - offsetFromTargetX - padding.right;\n\n if (\n // If the popover will overflow the viewport right\n targetRectXEnd + offsetFromTargetX + naturalPopoverWidth >\n vw\n ) {\n // Choose the side with most allowance\n resolvedPlacement = targetIsInLeftHalfOfViewport ? 'right' : 'left';\n }\n }\n\n if (resolvedPlacement === 'left' || resolvedPlacement === 'right') {\n popoverMaxHeight = vh - padding.top - padding.bottom;\n }\n\n state.elements.popper.style.maxHeight = `${popoverMaxHeight}px`;\n\n state.elements.popper.style.maxWidth = popoverMaxWidth !== null ? `${popoverMaxWidth}px` : '';\n\n resolvedPlacement = `${resolvedPlacement}${\n (requestedSecondaryPlacement ? `-${requestedSecondaryPlacement}` : '') as\n | ''\n | '-start'\n | '-end'\n }`;\n\n if (state.placement !== resolvedPlacement) {\n state.placement = resolvedPlacement;\n state.reset = true;\n }\n }\n});\n"]}
1
+ {"version":3,"file":"modifiers.js","sourceRoot":"","sources":["../../../src/components/Popover/modifiers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAExF,MAAM,CAAC,MAAM,SAAS,GAAkC,MAAM,CAAC,MAAM,CAAC;IACpE,IAAI,EAAE,WAAW;IACjB,OAAO,EAAE,IAAI;IACb,KAAK,EAAE,aAAa;IACpB,EAAE,CAAC,EAAE,KAAK,EAAE;QACV,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,IAAI,CAAC;IACjE,CAAC;IACD,QAAQ,EAAE,CAAC,eAAe,CAAC;CAC5B,CAAC,CAAC;AAEH,MAAM,aAAa,GAAG,mBAAmB,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAEpE,MAAM,CAAC,MAAM,eAAe,GAAwC,MA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AI,CAAC,CAAC,CAAC,EAAE,CAAC;QAE9F,iBAAiB,GAAG,GAAG,iBAAiB,GACtC,CAAC,2BAA2B,CAAC,CAAC,CAAC,IAAI,2BAA2B,EAAE,CAAC,CAAC,CAAC,EAAE,CAIvE,EAAE,CAAC;QAEH,IAAI,KAAK,CAAC,SAAS,KAAK,iBAAiB,EAAE;YACzC,KAAK,CAAC,SAAS,GAAG,iBAAiB,CAAC;YACpC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC;SACpB;IACH,CAAC;CACF,CAAC,CAAC","sourcesContent":["import type { Modifier } from '@popperjs/core';\n\nimport { documentIsAvailable, getScrollbarWidth, testElForOverflow } from '../../utils';\n\nexport const sameWidth: Modifier<'sameWidth', object> = Object.freeze({\n name: 'sameWidth',\n enabled: true,\n phase: 'beforeWrite',\n fn({ state }) {\n state.styles.popper.width = `${state.rects.reference.width}px`;\n },\n requires: ['computeStyles']\n});\n\nconst scrollbarSize = documentIsAvailable ? getScrollbarWidth() : 0;\n\nexport const placeAndContain: Modifier<'placeAndContain', object> = Object.freeze({\n name: 'placeAndContain',\n enabled: true,\n phase: 'beforeWrite',\n requires: ['computeStyles', 'offset'],\n fn: ({ state }) => {\n const [requestedPrimaryPlacement, requestedSecondaryPlacement] = state.placement.split('-') as [\n primaryPlacement: 'top' | 'bottom' | 'left' | 'right' | 'auto',\n secondaryPlacement?: 'start' | 'end' | undefined\n ];\n\n const padding = {\n top: 0,\n bottom: 0,\n right: 0,\n left: 0\n };\n\n const preventOverflowPad = state.orderedModifiers.find(({ name }) => name === 'preventOverflow')\n ?.options?.padding;\n\n if (typeof preventOverflowPad === 'number') {\n padding.top = preventOverflowPad;\n padding.bottom = preventOverflowPad;\n padding.right = preventOverflowPad;\n padding.left = preventOverflowPad;\n } else if (preventOverflowPad) {\n padding.top = preventOverflowPad.top ?? padding.top;\n padding.bottom = preventOverflowPad.bottom ?? padding.bottom;\n padding.right = preventOverflowPad.right ?? padding.right;\n padding.left = preventOverflowPad.left ?? padding.left;\n }\n\n const vw = document.documentElement.clientWidth;\n const vh = document.documentElement.clientHeight;\n\n const targetRect = state.rects.reference;\n const targetRectXStart = targetRect.x;\n const targetRectXEnd = targetRectXStart + targetRect.width;\n const targetRectYStart = targetRect.y;\n const targetRectYEnd = targetRectYStart + targetRect.height;\n const targetXMid = (targetRectXStart + targetRectXEnd) / 2;\n const targetYMid = (targetRectYStart + targetRectYEnd) / 2;\n const targetIsInLeftHalfOfViewport = targetXMid < vw / 2;\n const targetIsInTopHalfOfViewport = targetYMid < vh / 2;\n\n const offsetFromTargetX = state.modifiersData.offset?.[state.placement]?.x ?? 0;\n const offsetFromTargetY = state.modifiersData.offset?.[state.placement]?.y ?? 0;\n\n let popoverMaxWidth: null | number = null;\n let popoverMaxHeight: null | number = null;\n\n const totalScrollableChildHeight = Array.from(state.elements.popper.children).reduce(\n (sum, el) => {\n if (el === state.elements.arrow) {\n return sum;\n }\n\n if (testElForOverflow(el)[0]) {\n return sum + el.scrollHeight + scrollbarSize;\n }\n\n return sum + el.scrollHeight;\n },\n 0\n );\n\n const naturalPopoverHeight = Math.max(\n state.elements.popper.scrollHeight,\n totalScrollableChildHeight\n );\n\n const naturalPopoverWidth = Math.max(\n state.elements.popper.scrollWidth,\n ...Array.from(state.elements.popper.children).map(el => {\n if (el === state.elements.arrow) {\n return -Infinity;\n }\n\n if (testElForOverflow(el)[1]) {\n return el.scrollWidth + scrollbarSize;\n }\n\n return el.scrollWidth;\n })\n );\n\n let resolvedPlacement: `${'top' | 'bottom' | 'left' | 'right' | 'auto'}${\n | ''\n | '-start'\n | '-end'}` = requestedPrimaryPlacement;\n\n if (requestedPrimaryPlacement === 'bottom') {\n popoverMaxHeight = vh - targetRectYEnd - offsetFromTargetY - padding.bottom;\n\n if (\n // If the popover will overflow the viewport bottom\n targetRectYEnd + offsetFromTargetY + naturalPopoverHeight >\n vh\n ) {\n // Choose the side with most allowance\n resolvedPlacement = targetIsInTopHalfOfViewport ? 'bottom' : 'top';\n }\n } else if (requestedPrimaryPlacement === 'top') {\n popoverMaxHeight = targetRectYStart + offsetFromTargetY - padding.top;\n\n if (\n // If the popover will overflow the viewport top\n targetRectYStart + offsetFromTargetY - naturalPopoverHeight <\n 0\n ) {\n // Choose the side with most allowance\n resolvedPlacement = targetIsInTopHalfOfViewport ? 'bottom' : 'top';\n }\n } else if (requestedPrimaryPlacement === 'left') {\n popoverMaxWidth = targetRectXStart + offsetFromTargetX - padding.left;\n\n if (\n // If the popover will overflow the viewport left\n targetRectXStart + offsetFromTargetX - naturalPopoverWidth <\n 0\n ) {\n // Choose the side with most allowance\n resolvedPlacement = targetIsInLeftHalfOfViewport ? 'right' : 'left';\n }\n } else if (requestedPrimaryPlacement === 'right') {\n popoverMaxWidth = vw - targetRectXEnd - offsetFromTargetX - padding.right;\n\n if (\n // If the popover will overflow the viewport right\n targetRectXEnd + offsetFromTargetX + naturalPopoverWidth >\n vw\n ) {\n // Choose the side with most allowance\n resolvedPlacement = targetIsInLeftHalfOfViewport ? 'right' : 'left';\n }\n }\n\n if (resolvedPlacement === 'left' || resolvedPlacement === 'right') {\n popoverMaxHeight = vh - padding.top - padding.bottom;\n }\n\n state.elements.popper.style.maxHeight = `${popoverMaxHeight}px`;\n\n state.elements.popper.style.maxWidth = popoverMaxWidth !== null ? `${popoverMaxWidth}px` : '';\n\n resolvedPlacement = `${resolvedPlacement}${\n (requestedSecondaryPlacement ? `-${requestedSecondaryPlacement}` : '') as\n | ''\n | '-start'\n | '-end'\n }`;\n\n if (state.placement !== resolvedPlacement) {\n state.placement = resolvedPlacement;\n state.reset = true;\n }\n }\n});\n"]}
@@ -1,6 +1,6 @@
1
- import { FC } from 'react';
2
- import { ForwardProps } from '../../types';
3
- import { ProgressProps } from './Progress.types';
1
+ import type { FC } from 'react';
2
+ import type { ForwardProps } from '../../types';
3
+ import type { ProgressProps } from './Progress.types';
4
4
  declare const Bar: FC<ProgressProps & ForwardProps>;
5
5
  export default Bar;
6
6
  //# sourceMappingURL=Bar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Bar.d.ts","sourceRoot":"","sources":["../../../src/components/Progress/Bar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAA8C,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,QAAA,MAAM,GAAG,EAAE,EAAE,CAAC,aAAa,GAAG,YAAY,CAiCxC,CAAC;AAEH,eAAe,GAAG,CAAC"}
1
+ {"version":3,"file":"Bar.d.ts","sourceRoot":"","sources":["../../../src/components/Progress/Bar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAkC,MAAM,OAAO,CAAC;AAEhE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,QAAA,MAAM,GAAG,EAAE,EAAE,CAAC,aAAa,GAAG,YAAY,CAiCxC,CAAC;AAEH,eAAe,GAAG,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Bar.js","sourceRoot":"","sources":["../../../src/components/Progress/Bar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAM,UAAU,EAAkC,MAAM,OAAO,CAAC;AAIvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAGtD,MAAM,GAAG,GAAqC,UAAU,CAAC,SAAS,GAAG,CACnE,EACE,KAAK,EACL,QAAQ,GAAG,CAAC,EACZ,QAAQ,GAAG,GAAG,EACd,OAAO,EACP,SAAS,EACT,KAAK,EACL,GAAG,SAAS,EAC+C,EAC7D,GAAyB;IAEzB,IAAI,UAAU,GAAG,KAAK,CAAC;IAEvB,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC7B,IAAI,KAAK,GAAG,QAAQ,IAAI,QAAQ,GAAG,QAAQ;YAAE,UAAU,GAAG,CAAC,CAAC;aACvD,IAAI,KAAK,GAAG,QAAQ;YAAE,UAAU,GAAG,GAAG,CAAC;;YACvC,UAAU,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC,QAAQ,GAAG,QAAQ,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;KAC3E;IAED,OAAO,CACL,KAAC,iBAAiB,IAChB,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,aAAa,mBACH,QAAQ,mBACR,QAAQ,mBACR,KAAK,EACpB,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,OAAO,KAAK,KAAK,QAAQ,EACtC,KAAK,EAAE,EAAE,GAAG,KAAK,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,UAAU,GAAG,CAAC,CAAC,CAAC,EAAE,EAAmB,KAClF,SAAS,GACb,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,GAAG,CAAC","sourcesContent":["import { FC, forwardRef, PropsWithoutRef, CSSProperties } from 'react';\n\nimport { ForwardProps } from '../../types';\n\nimport { StyledProgressBar } from './Progress.styles';\nimport { ProgressProps } from './Progress.types';\n\nconst Bar: FC<ProgressProps & ForwardProps> = forwardRef(function Bar(\n {\n value,\n minValue = 0,\n maxValue = 100,\n message,\n placement,\n style,\n ...restProps\n }: PropsWithoutRef<ProgressProps & { style?: CSSProperties }>,\n ref: ProgressProps['ref']\n) {\n let percentage = value;\n\n if (typeof value === 'number') {\n if (value > maxValue || minValue > maxValue) percentage = 0;\n else if (value < minValue) percentage = 100;\n else percentage = (1 - (value - minValue) / (maxValue - minValue)) * -100;\n }\n\n return (\n <StyledProgressBar\n ref={ref}\n role='progressbar'\n aria-valuemin={minValue}\n aria-valuemax={maxValue}\n aria-valuenow={value}\n placement={placement}\n determinate={typeof value === 'number'}\n style={{ ...style, '--progress': percentage ? `${percentage}%` : '' } as CSSProperties}\n {...restProps}\n />\n );\n});\n\nexport default Bar;\n"]}
1
+ {"version":3,"file":"Bar.js","sourceRoot":"","sources":["../../../src/components/Progress/Bar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAKnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAGtD,MAAM,GAAG,GAAqC,UAAU,CAAC,SAAS,GAAG,CACnE,EACE,KAAK,EACL,QAAQ,GAAG,CAAC,EACZ,QAAQ,GAAG,GAAG,EACd,OAAO,EACP,SAAS,EACT,KAAK,EACL,GAAG,SAAS,EAC+C,EAC7D,GAAyB;IAEzB,IAAI,UAAU,GAAG,KAAK,CAAC;IAEvB,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC7B,IAAI,KAAK,GAAG,QAAQ,IAAI,QAAQ,GAAG,QAAQ;YAAE,UAAU,GAAG,CAAC,CAAC;aACvD,IAAI,KAAK,GAAG,QAAQ;YAAE,UAAU,GAAG,GAAG,CAAC;;YACvC,UAAU,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC,QAAQ,GAAG,QAAQ,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;KAC3E;IAED,OAAO,CACL,KAAC,iBAAiB,IAChB,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,aAAa,mBACH,QAAQ,mBACR,QAAQ,mBACR,KAAK,EACpB,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,OAAO,KAAK,KAAK,QAAQ,EACtC,KAAK,EAAE,EAAE,GAAG,KAAK,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,UAAU,GAAG,CAAC,CAAC,CAAC,EAAE,EAAmB,KAClF,SAAS,GACb,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,GAAG,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { FC, PropsWithoutRef, CSSProperties } from 'react';\n\nimport type { ForwardProps } from '../../types';\n\nimport { StyledProgressBar } from './Progress.styles';\nimport type { ProgressProps } from './Progress.types';\n\nconst Bar: FC<ProgressProps & ForwardProps> = forwardRef(function Bar(\n {\n value,\n minValue = 0,\n maxValue = 100,\n message,\n placement,\n style,\n ...restProps\n }: PropsWithoutRef<ProgressProps & { style?: CSSProperties }>,\n ref: ProgressProps['ref']\n) {\n let percentage = value;\n\n if (typeof value === 'number') {\n if (value > maxValue || minValue > maxValue) percentage = 0;\n else if (value < minValue) percentage = 100;\n else percentage = (1 - (value - minValue) / (maxValue - minValue)) * -100;\n }\n\n return (\n <StyledProgressBar\n ref={ref}\n role='progressbar'\n aria-valuemin={minValue}\n aria-valuemax={maxValue}\n aria-valuenow={value}\n placement={placement}\n determinate={typeof value === 'number'}\n style={{ ...style, '--progress': percentage ? `${percentage}%` : '' } as CSSProperties}\n {...restProps}\n />\n );\n});\n\nexport default Bar;\n"]}
@@ -1,6 +1,6 @@
1
- import { FC } from 'react';
2
- import { ForwardProps } from '../../types';
3
- import { ProgressProps } from './Progress.types';
1
+ import type { FC } from 'react';
2
+ import type { ForwardProps } from '../../types';
3
+ import type { ProgressProps } from './Progress.types';
4
4
  declare const Ellipsis: FC<ProgressProps & ForwardProps>;
5
5
  export default Ellipsis;
6
6
  //# sourceMappingURL=Ellipsis.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Ellipsis.d.ts","sourceRoot":"","sources":["../../../src/components/Progress/Ellipsis.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAA+B,MAAM,OAAO,CAAC;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,QAAA,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,GAAG,YAAY,CAa7C,CAAC;AAEH,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"Ellipsis.d.ts","sourceRoot":"","sources":["../../../src/components/Progress/Ellipsis.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAmB,MAAM,OAAO,CAAC;AAEjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,QAAA,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,GAAG,YAAY,CAa7C,CAAC;AAEH,eAAe,QAAQ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Ellipsis.js","sourceRoot":"","sources":["../../../src/components/Progress/Ellipsis.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAM,UAAU,EAAmB,MAAM,OAAO,CAAC;AAIxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAG3D,MAAM,QAAQ,GAAqC,UAAU,CAAC,SAAS,QAAQ,CAC7E,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,SAAS,EAAkC,EACpE,GAAyB;IAEzB,OAAO,CACL,KAAC,sBAAsB,IAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAC,aAAa,EAAC,SAAS,EAAE,SAAS,KAAM,SAAS,YACtF,2BACE,gBAAQ,EACR,gBAAQ,EACR,gBAAQ,IACH,GACgB,CAC1B,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,QAAQ,CAAC","sourcesContent":["import { FC, forwardRef, PropsWithoutRef } from 'react';\n\nimport { ForwardProps } from '../../types';\n\nimport { StyledProgressEllipsis } from './Progress.styles';\nimport { ProgressProps } from './Progress.types';\n\nconst Ellipsis: FC<ProgressProps & ForwardProps> = forwardRef(function Ellipsis(\n { message, placement, ...restProps }: PropsWithoutRef<ProgressProps>,\n ref: ProgressProps['ref']\n) {\n return (\n <StyledProgressEllipsis ref={ref} role='progressbar' placement={placement} {...restProps}>\n <span>\n <span />\n <span />\n <span />\n </span>\n </StyledProgressEllipsis>\n );\n});\n\nexport default Ellipsis;\n"]}
1
+ {"version":3,"file":"Ellipsis.js","sourceRoot":"","sources":["../../../src/components/Progress/Ellipsis.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAKnC,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAG3D,MAAM,QAAQ,GAAqC,UAAU,CAAC,SAAS,QAAQ,CAC7E,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,SAAS,EAAkC,EACpE,GAAyB;IAEzB,OAAO,CACL,KAAC,sBAAsB,IAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAC,aAAa,EAAC,SAAS,EAAE,SAAS,KAAM,SAAS,YACtF,2BACE,gBAAQ,EACR,gBAAQ,EACR,gBAAQ,IACH,GACgB,CAC1B,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,QAAQ,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { FC, PropsWithoutRef } from 'react';\n\nimport type { ForwardProps } from '../../types';\n\nimport { StyledProgressEllipsis } from './Progress.styles';\nimport type { ProgressProps } from './Progress.types';\n\nconst Ellipsis: FC<ProgressProps & ForwardProps> = forwardRef(function Ellipsis(\n { message, placement, ...restProps }: PropsWithoutRef<ProgressProps>,\n ref: ProgressProps['ref']\n) {\n return (\n <StyledProgressEllipsis ref={ref} role='progressbar' placement={placement} {...restProps}>\n <span>\n <span />\n <span />\n <span />\n </span>\n </StyledProgressEllipsis>\n );\n});\n\nexport default Ellipsis;\n"]}
@@ -1,6 +1,6 @@
1
- import { FC } from 'react';
2
- import { ForwardProps } from '../../types';
3
- import { ProgressProps } from './Progress.types';
1
+ import type { FC } from 'react';
2
+ import type { ForwardProps } from '../../types';
3
+ import type { ProgressProps } from './Progress.types';
4
4
  declare const Progress: FC<ProgressProps & ForwardProps>;
5
5
  export default Progress;
6
6
  //# sourceMappingURL=Progress.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Progress.d.ts","sourceRoot":"","sources":["../../../src/components/Progress/Progress.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+B,EAAE,EAA+B,MAAM,OAAO,CAAC;AAGrF,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAK3C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAejD,QAAA,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,GAAG,YAAY,CA8K7C,CAAC;AAEH,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"Progress.d.ts","sourceRoot":"","sources":["../../../src/components/Progress/Progress.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAmB,EAAE,EAAE,MAAM,OAAO,CAAC;AAGjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAKhD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAetD,QAAA,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,GAAG,YAAY,CA8K7C,CAAC;AAEH,eAAe,QAAQ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Progress.js","sourceRoot":"","sources":["../../../src/components/Progress/Progress.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAuB,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACrF,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAGzC,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACxF,OAAO,IAAI,MAAM,SAAS,CAAC;AAG3B,OAAO,GAAG,MAAM,OAAO,CAAC;AACxB,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAE1F,MAAM,U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CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,EAC7D,GAAG,EAAE,UAAU,EACf,QAAQ,EAAE,CAAC,CAAC,GACZ,CACH,CAAC;IAEF,IAAI,SAAS,KAAK,QAAQ,EAAE;QAC1B,SAAS,GAAG,CACV,MAAC,IAAI,IACH,SAAS,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,EAAE,EAClE,EAAE,EAAE,cAAc,EAClB,SAAS,EAAE,SAAS,aAEnB,SAAS,EACT,OAAO,IAAI,CACV,KAAC,IAAI,IAAC,EAAE,EAAE,aAAa,EAAE,OAAO,EAAC,WAAW,iBAAa,MAAM,YAC5D,OAAO,GACH,CACR,IACI,CACR,CAAC;KACH;IAED,MAAM,OAAO,GAAG,WAAW,CAAC,CAAC,CAAC,CAC5B,KAAC,sBAAsB,IACrB,IAAI,EAAE,cAAc,EACpB,SAAS,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,EAClC,QAAQ,EAAE,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,EACvD,OAAO,EAAC,OAAO,EACf,KAAK,EAAE,GAAG,EACV,mBAAmB,EAAE,iBAAiB,EACtC,oBAAoB,EAAE,GAAG,EAAE;YACzB,aAAa,CAAC,IAAI,CAAC,CAAC;YACpB,kBAAkB,EAAE,EAAE,CAAC;QACzB,CAAC,YAEA,SAAS,GACa,CAC1B,CAAC,CAAC,CAAC,CACF,SAAS,CACV,CAAC;IAEF,OAAO,SAAS,KAAK,QAAQ,IAAI,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;AAChG,CAAC,CAAC,CAAC;AAEH,eAAe,QAAQ,CAAC","sourcesContent":["import { forwardRef, PropsWithoutRef, FC, useState, useEffect, useRef } from 'react';\nimport { createPortal } from 'react-dom';\n\nimport { ForwardProps } from '../../types';\nimport Text from '../Text';\nimport { useConfiguration, useConsolidatedRef, useI18n, useLiveLog } from '../../hooks';\nimport Flex from '../Flex';\n\nimport { ProgressProps } from './Progress.types';\nimport Bar from './Bar';\nimport Ellipsis from './Ellipsis';\nimport Ring from './Ring';\nimport { StyledMessage, StyledProgress, StyledProgressBackdrop } from './Progress.styles';\n\nconst variantMap = {\n ring: Ring,\n bar: Bar,\n ellipsis: Ellipsis\n} as const;\n\nconst delayDuration = 100;\nconst minVisibleDuration = 1000;\n\nconst Progress: FC<ProgressProps & ForwardProps> = forwardRef(function Progress(\n {\n variant = 'ring',\n placement = 'global',\n visible: visibleProp = true,\n focusOnVisible = false,\n delay = false,\n onTransitionEndIn,\n onTransitionEndOut,\n value,\n message,\n liveConfig,\n ...restProps\n }: PropsWithoutRef<ProgressProps>,\n ref: ProgressProps['ref']\n) {\n const t = useI18n();\n const { portalTarget } = useConfiguration();\n const { announcePolite } = useLiveLog();\n const progressEl = useConsolidatedRef<HTMLDivElement>(ref);\n\n // Rendering states. Both are needed due to Backdrop's transition phase where isVisibleState is false but nullRender is true until onAfterTransitionOut.\n const [isVisibleState, setIsVisibleState] = useState(delay ? false : visibleProp);\n const [nullRender, setNullRender] = useState(!isVisibleState);\n\n // Refs for timestamps and timeout ids.\n const timeBeforeVisibleRender = useRef<number>();\n const timeAfterVisibleRender = useRef<number>();\n const delayTimer = useRef<number>();\n const minVisibleTimer = useRef<number>();\n\n const hasBackdrop = placement === 'global' || placement === 'local';\n const valString = typeof value === 'number' ? `${value}%` : undefined;\n const label = message && valString ? `${message} - ${valString}` : message || valString;\n\n const renderVisible = () => {\n setIsVisibleState(true);\n setNullRender(false);\n };\n\n const renderNotVisible = () => {\n setIsVisibleState(false);\n // With a transition, setNullRender needs to be called in Backdrop's onAfterTransitionOut.\n if (!hasBackdrop) {\n setNullRender(true);\n }\n };\n\n // Handle render and visible state.\n useEffect(\n () => {\n if (visibleProp) {\n // Capture a timestamp for additional timers.\n timeBeforeVisibleRender.current = Date.now();\n\n if (delay) {\n delayTimer.current = window.setTimeout(renderVisible, delayDuration);\n } else {\n renderVisible();\n }\n } else if (\n // A timer was started to render visible either avoid it or render null.\n delayTimer.current !== undefined\n ) {\n // If a timeout has started to render visible, clear it.\n clearTimeout(delayTimer.current);\n\n // If the indicator has already rendered visible.\n if (timeAfterVisibleRender.current !== undefined) {\n const timeElapsedSinceLastVisibleRender = Date.now() - timeAfterVisibleRender.current;\n\n // If the indicator has been visible for long enough we can remove it.\n if (timeElapsedSinceLastVisibleRender >= minVisibleDuration) {\n renderNotVisible();\n } else {\n // Hold off removing until we hit the minimum visible time.\n minVisibleTimer.current = window.setTimeout(\n renderNotVisible,\n minVisibleDuration - timeElapsedSinceLastVisibleRender\n );\n }\n } else {\n renderNotVisible();\n }\n } else {\n renderNotVisible();\n }\n },\n // visibleProp is the only triggerable dependency. Others values will be captured.\n [visibleProp]\n );\n\n // Live announcement\n useEffect(\n () => {\n if (liveConfig?.contextualLabel && isVisibleState) {\n announcePolite({\n message: `${liveConfig.contextualLabel}, ${label ?? t('loading')}`,\n type: 'status'\n });\n }\n },\n // isVisibleState is the only triggerable dependency. Others values will be captured.\n [isVisibleState]\n );\n\n // Auto focusing and render timestamping.\n useEffect(\n () => {\n if (!nullRender && isVisibleState) {\n // After a visible render set a timestamp for timers above.\n timeAfterVisibleRender.current = Date.now();\n\n if (focusOnVisible) progressEl.current?.focus();\n }\n },\n // nullRender is the only triggerable dependency. Others values will be captured.\n [nullRender]\n );\n\n if (nullRender) return null;\n\n const CompVariant = variantMap[variant];\n\n let indicator = (\n <CompVariant\n aria-label={typeof value !== 'number' ? label : t('loading')}\n as={placement === 'inline' ? 'span' : undefined}\n {...restProps}\n placement={placement}\n value={value}\n aria-valuetext={typeof value === 'number' ? label : undefined}\n ref={progressEl}\n tabIndex={-1}\n />\n );\n\n if (placement !== 'inline') {\n indicator = (\n <Flex\n container={{ direction: 'column', alignItems: 'center', gap: 0.5 }}\n as={StyledProgress}\n placement={placement}\n >\n {indicator}\n {message && (\n <Text as={StyledMessage} variant='secondary' aria-hidden='true'>\n {message}\n </Text>\n )}\n </Flex>\n );\n }\n\n const content = hasBackdrop ? (\n <StyledProgressBackdrop\n open={isVisibleState}\n container={{ direction: 'column' }}\n position={placement === 'global' ? 'fixed' : 'absolute'}\n variant='light'\n alpha={0.8}\n onAfterTransitionIn={onTransitionEndIn}\n onAfterTransitionOut={() => {\n setNullRender(true);\n onTransitionEndOut?.();\n }}\n >\n {indicator}\n </StyledProgressBackdrop>\n ) : (\n indicator\n );\n\n return placement === 'global' && portalTarget ? createPortal(content, portalTarget) : content;\n});\n\nexport default Progress;\n"]}
1
+ {"version":3,"file":"Progress.js","sourceRoot":"","sources":["../../../src/components/Progress/Progress.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEhE,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAGzC,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACxF,OAAO,IAAI,MAAM,SAAS,CAAC;AAG3B,OAAO,GAAG,MAAM,OAAO,CAAC;AACxB,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAE1F,MAAM,UAAU,GAAG;IACjB,IAAI,EAAE,IAAI;IACV,GAAG,EAAE,GAAG;IACR,QAAQ,EAAE,QAAQ;CACV,CAAC;AAEX,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,kBAAkB,GAAG,IAAI,CAAC;AAEhC,MAAM,QAAQ,GAAqC,UAAU,CAAC,SAAS,QAAQ,CAC7E,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AAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,EAAE,EAClE,EAAE,EAAE,cAAc,EAClB,SAAS,EAAE,SAAS,aAEnB,SAAS,EACT,OAAO,IAAI,CACV,KAAC,IAAI,IAAC,EAAE,EAAE,aAAa,EAAE,OAAO,EAAC,WAAW,iBAAa,MAAM,YAC5D,OAAO,GACH,CACR,IACI,CACR,CAAC;KACH;IAED,MAAM,OAAO,GAAG,WAAW,CAAC,CAAC,CAAC,CAC5B,KAAC,sBAAsB,IACrB,IAAI,EAAE,cAAc,EACpB,SAAS,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,EAClC,QAAQ,EAAE,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,EACvD,OAAO,EAAC,OAAO,EACf,KAAK,EAAE,GAAG,EACV,mBAAmB,EAAE,iBAAiB,EACtC,oBAAoB,EAAE,GAAG,EAAE;YACzB,aAAa,CAAC,IAAI,CAAC,CAAC;YACpB,kBAAkB,EAAE,EAAE,CAAC;QACzB,CAAC,YAEA,SAAS,GACa,CAC1B,CAAC,CAAC,CAAC,CACF,SAAS,CACV,CAAC;IAEF,OAAO,SAAS,KAAK,QAAQ,IAAI,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;AAChG,CAAC,CAAC,CAAC;AAEH,eAAe,QAAQ,CAAC","sourcesContent":["import { forwardRef, useState, useEffect, useRef } from 'react';\nimport type { PropsWithoutRef, FC } from 'react';\nimport { createPortal } from 'react-dom';\n\nimport type { ForwardProps } from '../../types';\nimport Text from '../Text';\nimport { useConfiguration, useConsolidatedRef, useI18n, useLiveLog } from '../../hooks';\nimport Flex from '../Flex';\n\nimport type { ProgressProps } from './Progress.types';\nimport Bar from './Bar';\nimport Ellipsis from './Ellipsis';\nimport Ring from './Ring';\nimport { StyledMessage, StyledProgress, StyledProgressBackdrop } from './Progress.styles';\n\nconst variantMap = {\n ring: Ring,\n bar: Bar,\n ellipsis: Ellipsis\n} as const;\n\nconst delayDuration = 100;\nconst minVisibleDuration = 1000;\n\nconst Progress: FC<ProgressProps & ForwardProps> = forwardRef(function Progress(\n {\n variant = 'ring',\n placement = 'global',\n visible: visibleProp = true,\n focusOnVisible = false,\n delay = false,\n onTransitionEndIn,\n onTransitionEndOut,\n value,\n message,\n liveConfig,\n ...restProps\n }: PropsWithoutRef<ProgressProps>,\n ref: ProgressProps['ref']\n) {\n const t = useI18n();\n const { portalTarget } = useConfiguration();\n const { announcePolite } = useLiveLog();\n const progressEl = useConsolidatedRef<HTMLDivElement>(ref);\n\n // Rendering states. Both are needed due to Backdrop's transition phase where isVisibleState is false but nullRender is true until onAfterTransitionOut.\n const [isVisibleState, setIsVisibleState] = useState(delay ? false : visibleProp);\n const [nullRender, setNullRender] = useState(!isVisibleState);\n\n // Refs for timestamps and timeout ids.\n const timeBeforeVisibleRender = useRef<number>();\n const timeAfterVisibleRender = useRef<number>();\n const delayTimer = useRef<number>();\n const minVisibleTimer = useRef<number>();\n\n const hasBackdrop = placement === 'global' || placement === 'local';\n const valString = typeof value === 'number' ? `${value}%` : undefined;\n const label = message && valString ? `${message} - ${valString}` : message || valString;\n\n const renderVisible = () => {\n setIsVisibleState(true);\n setNullRender(false);\n };\n\n const renderNotVisible = () => {\n setIsVisibleState(false);\n // With a transition, setNullRender needs to be called in Backdrop's onAfterTransitionOut.\n if (!hasBackdrop) {\n setNullRender(true);\n }\n };\n\n // Handle render and visible state.\n useEffect(\n () => {\n if (visibleProp) {\n // Capture a timestamp for additional timers.\n timeBeforeVisibleRender.current = Date.now();\n\n if (delay) {\n delayTimer.current = window.setTimeout(renderVisible, delayDuration);\n } else {\n renderVisible();\n }\n } else if (\n // A timer was started to render visible either avoid it or render null.\n delayTimer.current !== undefined\n ) {\n // If a timeout has started to render visible, clear it.\n clearTimeout(delayTimer.current);\n\n // If the indicator has already rendered visible.\n if (timeAfterVisibleRender.current !== undefined) {\n const timeElapsedSinceLastVisibleRender = Date.now() - timeAfterVisibleRender.current;\n\n // If the indicator has been visible for long enough we can remove it.\n if (timeElapsedSinceLastVisibleRender >= minVisibleDuration) {\n renderNotVisible();\n } else {\n // Hold off removing until we hit the minimum visible time.\n minVisibleTimer.current = window.setTimeout(\n renderNotVisible,\n minVisibleDuration - timeElapsedSinceLastVisibleRender\n );\n }\n } else {\n renderNotVisible();\n }\n } else {\n renderNotVisible();\n }\n },\n // visibleProp is the only triggerable dependency. Others values will be captured.\n [visibleProp]\n );\n\n // Live announcement\n useEffect(\n () => {\n if (liveConfig?.contextualLabel && isVisibleState) {\n announcePolite({\n message: `${liveConfig.contextualLabel}, ${label ?? t('loading')}`,\n type: 'status'\n });\n }\n },\n // isVisibleState is the only triggerable dependency. Others values will be captured.\n [isVisibleState]\n );\n\n // Auto focusing and render timestamping.\n useEffect(\n () => {\n if (!nullRender && isVisibleState) {\n // After a visible render set a timestamp for timers above.\n timeAfterVisibleRender.current = Date.now();\n\n if (focusOnVisible) progressEl.current?.focus();\n }\n },\n // nullRender is the only triggerable dependency. Others values will be captured.\n [nullRender]\n );\n\n if (nullRender) return null;\n\n const CompVariant = variantMap[variant];\n\n let indicator = (\n <CompVariant\n aria-label={typeof value !== 'number' ? label : t('loading')}\n as={placement === 'inline' ? 'span' : undefined}\n {...restProps}\n placement={placement}\n value={value}\n aria-valuetext={typeof value === 'number' ? label : undefined}\n ref={progressEl}\n tabIndex={-1}\n />\n );\n\n if (placement !== 'inline') {\n indicator = (\n <Flex\n container={{ direction: 'column', alignItems: 'center', gap: 0.5 }}\n as={StyledProgress}\n placement={placement}\n >\n {indicator}\n {message && (\n <Text as={StyledMessage} variant='secondary' aria-hidden='true'>\n {message}\n </Text>\n )}\n </Flex>\n );\n }\n\n const content = hasBackdrop ? (\n <StyledProgressBackdrop\n open={isVisibleState}\n container={{ direction: 'column' }}\n position={placement === 'global' ? 'fixed' : 'absolute'}\n variant='light'\n alpha={0.8}\n onAfterTransitionIn={onTransitionEndIn}\n onAfterTransitionOut={() => {\n setNullRender(true);\n onTransitionEndOut?.();\n }}\n >\n {indicator}\n </StyledProgressBackdrop>\n ) : (\n indicator\n );\n\n return placement === 'global' && portalTarget ? createPortal(content, portalTarget) : content;\n});\n\nexport default Progress;\n"]}
@@ -1,4 +1,4 @@
1
- import { ProgressProps } from './Progress.types';
1
+ import type { ProgressProps } from './Progress.types';
2
2
  export declare const StyledProgressBackdrop: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Omit<import("../Backdrop").BackdropProps, "ref"> & import("react").RefAttributes<HTMLDivElement>> & {
3
3
  getTestIds: (testIdProp?: string | undefined) => import("../..").TestIdsRecord<readonly []>;
4
4
  }, import("styled-components").DefaultTheme, {}, never>;
@@ -1 +1 @@
1
- {"version":3,"file":"Progress.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Progress/Progress.styles.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,eAAO,MAAM,sBAAsB;;uDAAqB,CAAC;AAczD,eAAO,MAAM,kBAAkB;iBACqB,OAAO;SAkDzD,CAAC;AAIH,eAAO,MAAM,iBAAiB;iBACG,OAAO;SAwDtC,CAAC;AAIH,eAAO,MAAM,sBAAsB,uIAsEjC,CAAC;AAIH,eAAO,MAAM,aAAa,0GAexB,CAAC;AAIH,eAAO,MAAM,cAAc,+NAc1B,CAAC"}
1
+ {"version":3,"file":"Progress.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Progress/Progress.styles.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,eAAO,MAAM,sBAAsB;;uDAAqB,CAAC;AAczD,eAAO,MAAM,kBAAkB;iBACqB,OAAO;SAkDzD,CAAC;AAIH,eAAO,MAAM,iBAAiB;iBACG,OAAO;SAwDtC,CAAC;AAIH,eAAO,MAAM,sBAAs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O,CAAC,oBAAoB,CAAC,CAAC,EACvD,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,CACzC,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,MAAM,QAAQ,GAAG,iBAAiB,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;IAEtF,OAAO,GAAG,CAAA;iBACK,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,WAAW,CAAa,CAAC;mBACvD,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,WAAW,CAAC;aAC5C,KAAK;GACf,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,aAAa,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE9C,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,CACxC,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE;IACvB,OAAO,GAAG,CAAA;QACN,SAAS,KAAK,QAAQ;QACxB,GAAG,CAAA;;OAEF;;QAEC,SAAS,KAAK,OAAO;QACvB,GAAG,CAAA;iCACwB,KAAK,CAAC,IAAI,CAAC,OAAO;OAC5C;KACF,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,cAAc,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import { rgba, readableColor } from 'polished';\nimport styled, { css } from 'styled-components';\n\nimport { calculateFontSize, FontSize } from '../../styles';\nimport { defaultThemeProp } from '../../theme';\nimport { tryCatch } from '../../utils';\nimport Backdrop from '../Backdrop';\nimport Flex from '../Flex';\n\nimport { ProgressProps } from './Progress.types';\n\nexport const StyledProgressBackdrop = styled(Backdrop)``;\n\nconst StyledProgressVisual = styled.div(({ theme }) => {\n return css`\n &:focus-visible {\n box-shadow: ${theme.components.button['focus-shadow']};\n outline: none;\n border-radius: calc(9999 * ${theme.base['border-radius']});\n }\n `;\n});\n\nStyledProgressVisual.defaultProps = defaultThemeProp;\n\nexport const StyledProgressRing = styled(StyledProgressVisual)<\n Pick<ProgressProps, 'placement'> & { determinate: boolean }\n>(({ theme, placement, determinate }) => {\n const size = placement === 'inline' ? '1em' : '2rem';\n\n return css`\n position: relative;\n\n svg {\n display: block;\n width: ${size};\n height: ${size};\n\n circle {\n fill: transparent;\n stroke: ${theme.base.colors.gray['extra-light']};\n stroke-width: 2;\n r: 45%;\n cx: 50%;\n cy: 50%;\n transform: rotate(-90deg);\n transform-origin: 50% 50%;\n\n &:nth-child(2) {\n stroke: ${theme.components.progress['progress-color']};\n transition: stroke-dashoffset calc(0.5 * ${theme.base.animation.speed})\n ${theme.base.animation.timing.ease};\n\n ${!determinate &&\n css`\n @keyframes LoadingRing {\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n }\n animation: LoadingRing calc(4 * ${theme.base.animation.speed}) linear infinite;\n `}\n }\n }\n }\n\n ${placement === 'inline' &&\n css`\n display: inline-flex;\n vertical-align: top;\n `}\n `;\n});\n\nStyledProgressRing.defaultProps = defaultThemeProp;\n\nexport const StyledProgressBar = styled(StyledProgressVisual)<\n ProgressProps & { determinate: boolean }\n>(({ theme, placement, determinate }) => {\n return css`\n background-color: ${theme.base.colors.gray['extra-light']};\n border-radius: ${theme.base['border-radius']};\n ${placement === 'local'\n ? css`\n width: calc(100% - 4 * ${theme.base.spacing});\n `\n : css`\n width: 100%;\n `}\n height: 0.375rem;\n min-width: 2rem;\n max-width: min(calc(100vw - 4 * ${theme.base.spacing}), ${theme.base['content-width'].lg});\n overflow: hidden;\n\n ::before {\n content: '';\n display: block;\n height: 100%;\n width: 100%;\n left: 0;\n border-radius: ${theme.base['border-radius']};\n background-color: ${theme.components.progress['progress-color']};\n ${determinate &&\n css`\n transform: translateX(var(--progress, 0));\n transform-origin: 0 50%;\n transition: transform calc(0.5 * ${theme.base.animation.speed})\n ${theme.base.animation.timing.ease};\n `}\n\n ${!determinate &&\n css`\n @keyframes LoadingBar {\n 0% {\n transform: translateX(-100%);\n }\n\n 100% {\n transform: translateX(200%);\n }\n }\n animation: LoadingBar calc(8 * ${theme.base.animation.speed}) linear infinite;\n width: 50%;\n `}\n }\n\n ${placement === 'inline' &&\n css`\n width: 3rem;\n display: inline-block;\n position: relative;\n `}\n `;\n});\n\nStyledProgressBar.defaultProps = defaultThemeProp;\n\nexport const StyledProgressEllipsis = styled(StyledProgressVisual)<\n Pick<ProgressProps, 'placement'>\n>(({ theme, placement }) => {\n return css`\n line-height: 1;\n display: ${placement === 'inline' ? 'inline-flex' : 'block'};\n\n @keyframes LoadingEllipsis {\n 0% {\n transform: scale(0);\n opacity: 0;\n }\n\n 50% {\n transform: scale(1);\n opacity: 1;\n }\n\n 100% {\n transform: scale(0);\n opacity: 0;\n }\n }\n\n > span {\n display: flex;\n justify-content: center;\n mix-blend-mode: multiply;\n\n ${placement === 'inline' &&\n css`\n display: inline-flex;\n `}\n }\n\n > span span {\n margin: 0 0.3125rem;\n background: ${theme.components.progress['progress-color']};\n border-radius: 50%;\n animation: LoadingEllipsis calc(4 * ${theme.base.animation.speed}) infinite;\n\n ${placement === 'global' &&\n css`\n width: 1.25rem;\n height: 1.25rem;\n `}\n\n ${(placement === 'local' || placement === 'block') &&\n css`\n width: 0.625rem;\n height: 0.625rem;\n `}\n\n ${placement === 'inline' &&\n css`\n width: 0.1875rem;\n height: 0.1875rem;\n margin: 0 0.1875rem;\n animation-duration: calc(4 * ${theme.base.animation.speed});\n `}\n\n &:nth-child(2) {\n animation-delay: 0.1667s;\n }\n\n &:nth-child(3) {\n animation-delay: ${0.1667 * 2}s;\n }\n }\n `;\n});\n\nStyledProgressEllipsis.defaultProps = defaultThemeProp;\n\nexport const StyledMessage = styled.span(({ theme }) => {\n const color = tryCatch(() => {\n return rgba(\n readableColor(theme.base.palette['primary-background']),\n theme.base.transparency['transparent-3']\n );\n });\n\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n return css`\n font-size: ${fontSize[theme.components.label['font-size'] as FontSize]};\n font-weight: ${theme.base['font-weight']['semi-bold']};\n color: ${color};\n `;\n});\n\nStyledMessage.defaultProps = defaultThemeProp;\n\nexport const StyledProgress = styled(Flex)<Pick<ProgressProps, 'placement'>>(\n ({ theme, placement }) => {\n return css`\n ${placement !== 'inline' &&\n css`\n width: 100%;\n `}\n\n ${placement === 'block' &&\n css`\n margin-block: calc(2 * ${theme.base.spacing});\n `}\n `;\n }\n);\n\nStyledProgress.defaultProps = defaultThemeProp;\n"]}
1
+ {"version":3,"file":"Progress.styles.js","sourceRoot":"","sources":["../../../src/components/Progress/Progress.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,IAAI,MAAM,SAAS,CAAC;AAI3B,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA,EAAE,CAAC;AAEzD,MAAM,oBAAoB,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACpD,OAAO,GAAG,CAAA;;oBAEQ,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,cAAc,CAAC;;mCAExB,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC;;GAE3D,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,oBAAoB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAErD,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC,CAE5D,CAA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AAG,gBAAgB,CAAC;AAEvD,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACrD,MAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,EAAE;QAC1B,OAAO,IAAI,CACT,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC,EACvD,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,CACzC,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,MAAM,QAAQ,GAAG,iBAAiB,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;IAEtF,OAAO,GAAG,CAAA;iBACK,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,WAAW,CAAa,CAAC;mBACvD,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,WAAW,CAAC;aAC5C,KAAK;GACf,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,aAAa,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE9C,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,CACxC,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE;IACvB,OAAO,GAAG,CAAA;QACN,SAAS,KAAK,QAAQ;QACxB,GAAG,CAAA;;OAEF;;QAEC,SAAS,KAAK,OAAO;QACvB,GAAG,CAAA;iCACwB,KAAK,CAAC,IAAI,CAAC,OAAO;OAC5C;KACF,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,cAAc,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import { rgba, readableColor } from 'polished';\nimport styled, { css } from 'styled-components';\n\nimport { calculateFontSize } from '../../styles';\nimport type { FontSize } from '../../styles';\nimport { defaultThemeProp } from '../../theme';\nimport { tryCatch } from '../../utils';\nimport Backdrop from '../Backdrop';\nimport Flex from '../Flex';\n\nimport type { ProgressProps } from './Progress.types';\n\nexport const StyledProgressBackdrop = styled(Backdrop)``;\n\nconst StyledProgressVisual = styled.div(({ theme }) => {\n return css`\n &:focus-visible {\n box-shadow: ${theme.components.button['focus-shadow']};\n outline: none;\n border-radius: calc(9999 * ${theme.base['border-radius']});\n }\n `;\n});\n\nStyledProgressVisual.defaultProps = defaultThemeProp;\n\nexport const StyledProgressRing = styled(StyledProgressVisual)<\n Pick<ProgressProps, 'placement'> & { determinate: boolean }\n>(({ theme, placement, determinate }) => {\n const size = placement === 'inline' ? '1em' : '2rem';\n\n return css`\n position: relative;\n\n svg {\n display: block;\n width: ${size};\n height: ${size};\n\n circle {\n fill: transparent;\n stroke: ${theme.base.colors.gray['extra-light']};\n stroke-width: 2;\n r: 45%;\n cx: 50%;\n cy: 50%;\n transform: rotate(-90deg);\n transform-origin: 50% 50%;\n\n &:nth-child(2) {\n stroke: ${theme.components.progress['progress-color']};\n transition: stroke-dashoffset calc(0.5 * ${theme.base.animation.speed})\n ${theme.base.animation.timing.ease};\n\n ${!determinate &&\n css`\n @keyframes LoadingRing {\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n }\n animation: LoadingRing calc(4 * ${theme.base.animation.speed}) linear infinite;\n `}\n }\n }\n }\n\n ${placement === 'inline' &&\n css`\n display: inline-flex;\n vertical-align: top;\n `}\n `;\n});\n\nStyledProgressRing.defaultProps = defaultThemeProp;\n\nexport const StyledProgressBar = styled(StyledProgressVisual)<\n ProgressProps & { determinate: boolean }\n>(({ theme, placement, determinate }) => {\n return css`\n background-color: ${theme.base.colors.gray['extra-light']};\n border-radius: ${theme.base['border-radius']};\n ${placement === 'local'\n ? css`\n width: calc(100% - 4 * ${theme.base.spacing});\n `\n : css`\n width: 100%;\n `}\n height: 0.375rem;\n min-width: 2rem;\n max-width: min(calc(100vw - 4 * ${theme.base.spacing}), ${theme.base['content-width'].lg});\n overflow: hidden;\n\n ::before {\n content: '';\n display: block;\n height: 100%;\n width: 100%;\n left: 0;\n border-radius: ${theme.base['border-radius']};\n background-color: ${theme.components.progress['progress-color']};\n ${determinate &&\n css`\n transform: translateX(var(--progress, 0));\n transform-origin: 0 50%;\n transition: transform calc(0.5 * ${theme.base.animation.speed})\n ${theme.base.animation.timing.ease};\n `}\n\n ${!determinate &&\n css`\n @keyframes LoadingBar {\n 0% {\n transform: translateX(-100%);\n }\n\n 100% {\n transform: translateX(200%);\n }\n }\n animation: LoadingBar calc(8 * ${theme.base.animation.speed}) linear infinite;\n width: 50%;\n `}\n }\n\n ${placement === 'inline' &&\n css`\n width: 3rem;\n display: inline-block;\n position: relative;\n `}\n `;\n});\n\nStyledProgressBar.defaultProps = defaultThemeProp;\n\nexport const StyledProgressEllipsis = styled(StyledProgressVisual)<\n Pick<ProgressProps, 'placement'>\n>(({ theme, placement }) => {\n return css`\n line-height: 1;\n display: ${placement === 'inline' ? 'inline-flex' : 'block'};\n\n @keyframes LoadingEllipsis {\n 0% {\n transform: scale(0);\n opacity: 0;\n }\n\n 50% {\n transform: scale(1);\n opacity: 1;\n }\n\n 100% {\n transform: scale(0);\n opacity: 0;\n }\n }\n\n > span {\n display: flex;\n justify-content: center;\n mix-blend-mode: multiply;\n\n ${placement === 'inline' &&\n css`\n display: inline-flex;\n `}\n }\n\n > span span {\n margin: 0 0.3125rem;\n background: ${theme.components.progress['progress-color']};\n border-radius: 50%;\n animation: LoadingEllipsis calc(4 * ${theme.base.animation.speed}) infinite;\n\n ${placement === 'global' &&\n css`\n width: 1.25rem;\n height: 1.25rem;\n `}\n\n ${(placement === 'local' || placement === 'block') &&\n css`\n width: 0.625rem;\n height: 0.625rem;\n `}\n\n ${placement === 'inline' &&\n css`\n width: 0.1875rem;\n height: 0.1875rem;\n margin: 0 0.1875rem;\n animation-duration: calc(4 * ${theme.base.animation.speed});\n `}\n\n &:nth-child(2) {\n animation-delay: 0.1667s;\n }\n\n &:nth-child(3) {\n animation-delay: ${0.1667 * 2}s;\n }\n }\n `;\n});\n\nStyledProgressEllipsis.defaultProps = defaultThemeProp;\n\nexport const StyledMessage = styled.span(({ theme }) => {\n const color = tryCatch(() => {\n return rgba(\n readableColor(theme.base.palette['primary-background']),\n theme.base.transparency['transparent-3']\n );\n });\n\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n return css`\n font-size: ${fontSize[theme.components.label['font-size'] as FontSize]};\n font-weight: ${theme.base['font-weight']['semi-bold']};\n color: ${color};\n `;\n});\n\nStyledMessage.defaultProps = defaultThemeProp;\n\nexport const StyledProgress = styled(Flex)<Pick<ProgressProps, 'placement'>>(\n ({ theme, placement }) => {\n return css`\n ${placement !== 'inline' &&\n css`\n width: 100%;\n `}\n\n ${placement === 'block' &&\n css`\n margin-block: calc(2 * ${theme.base.spacing});\n `}\n `;\n }\n);\n\nStyledProgress.defaultProps = defaultThemeProp;\n"]}
@@ -1,6 +1,6 @@
1
- import { Ref } from 'react';
2
- import { BaseProps, NoChildrenProp } from '../../types';
3
- import { BackdropProps } from '../Backdrop/Backdrop';
1
+ import type { Ref } from 'react';
2
+ import type { BaseProps, NoChildrenProp } from '../../types';
3
+ import type { BackdropProps } from '../Backdrop/Backdrop';
4
4
  export interface ProgressProps extends BaseProps, NoChildrenProp {
5
5
  /**
6
6
  * Determines which variant should be rendered.
@@ -1 +1 @@
1
- {"version":3,"file":"Progress.types.d.ts","sourceRoot":"","sources":["../../../src/components/Progress/Progress.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,MAAM,WAAW,aAAc,SAAQ,SAAS,EAAE,cAAc;IAC9D;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,UAAU,CAAC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AAC,EAAE,MAAM,CAAC;IAClB,wFAAwF;IACxF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+DAA+D;IAC/D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,SAAS,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAC;IACpD;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,yDAAyD;IACzD,iBAAiB,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;IACzD,mFAAmF;IACnF,kBAAkB,CAAC,EAAE,aAAa,CAAC,sBAAsB,CAAC,CAAC;IAC3D,sEAAsE;IACtE,UAAU,CAAC,EAAE;QACX,0DAA0D;QAC1D,eAAe,EAAE,MAAM,CAAC;KACzB,CAAC;IACF,4EAA4E;IAC5E,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B"}
@@ -1 +1 @@
1
- {"version":3,"file":"Progress.types.js","sourceRoot":"","sources":["../../../src/components/Progress/Progress.types.ts"],"names":[],"mappings":"","sourcesContent":["import { Ref } from 'react';\n\nimport { BaseProps, NoChildrenProp } from '../../types';\nimport { BackdropProps } from '../Backdrop/Backdrop';\n\nexport interface ProgressProps extends BaseProps, NoChildrenProp {\n /**\n * Determines which variant should be rendered.\n * @default 'ring'\n */\n variant?: 'ring' | 'bar' | 'ellipsis';\n /**\n * Minimum possible value.\n * @default 0\n */\n minValue?: number;\n /**\n * Maximum possible value.\n * @default 100\n */\n maxValue?: number;\n /** Current progress value within the range specified, or the default range of 0-100. */\n value?: number;\n /** Provides a message to the user along with the component. */\n message?: string;\n /**\n * Determines the placement of the component.\n * @default 'global'\n */\n placement?: 'global' | 'local' | 'block' | 'inline';\n /**\n * When true, fade in occurs when component mounts.\n * When false, mounted component fades out then re-renders self and returns null, removing itself from the DOM.\n * This is technically not the same as unmounting via parent.\n * Applicable for all placements but the fade effect is only applicable to 'global' | 'local' placement.\n * @default true\n */\n visible?: boolean;\n /**\n * If true, upon visible render the indicator element will take focus.\n * @default false\n */\n focusOnVisible?: boolean;\n /**\n * If true, the indicator will not render as visible until 1sec after the visible prop is set to true.\n * This is a best estimate to avoid visual flicker where progress is resolved within 1sec.\n * @default false\n */\n delay?: boolean;\n /** Called when the css transition ends on the way in. */\n onTransitionEndIn?: BackdropProps['onAfterTransitionIn'];\n /** Called when the css transition ends on the way out...A good time to unmount! */\n onTransitionEndOut?: BackdropProps['onAfterTransitionOut'];\n /** Triggers live announcement on show and value or message change. */\n liveConfig?: {\n /** Distinguishes the source of the update on the page. */\n contextualLabel: string;\n };\n /** Ref to the visual indicator element, currently a role of progressbar. */\n ref?: Ref<HTMLDivElement>;\n}\n"]}
1
+ {"version":3,"file":"Progress.types.js","sourceRoot":"","sources":["../../../src/components/Progress/Progress.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Ref } from 'react';\n\nimport type { BaseProps, NoChildrenProp } from '../../types';\nimport type { BackdropProps } from '../Backdrop/Backdrop';\n\nexport interface ProgressProps extends BaseProps, NoChildrenProp {\n /**\n * Determines which variant should be rendered.\n * @default 'ring'\n */\n variant?: 'ring' | 'bar' | 'ellipsis';\n /**\n * Minimum possible value.\n * @default 0\n */\n minValue?: number;\n /**\n * Maximum possible value.\n * @default 100\n */\n maxValue?: number;\n /** Current progress value within the range specified, or the default range of 0-100. */\n value?: number;\n /** Provides a message to the user along with the component. */\n message?: string;\n /**\n * Determines the placement of the component.\n * @default 'global'\n */\n placement?: 'global' | 'local' | 'block' | 'inline';\n /**\n * When true, fade in occurs when component mounts.\n * When false, mounted component fades out then re-renders self and returns null, removing itself from the DOM.\n * This is technically not the same as unmounting via parent.\n * Applicable for all placements but the fade effect is only applicable to 'global' | 'local' placement.\n * @default true\n */\n visible?: boolean;\n /**\n * If true, upon visible render the indicator element will take focus.\n * @default false\n */\n focusOnVisible?: boolean;\n /**\n * If true, the indicator will not render as visible until 1sec after the visible prop is set to true.\n * This is a best estimate to avoid visual flicker where progress is resolved within 1sec.\n * @default false\n */\n delay?: boolean;\n /** Called when the css transition ends on the way in. */\n onTransitionEndIn?: BackdropProps['onAfterTransitionIn'];\n /** Called when the css transition ends on the way out...A good time to unmount! */\n onTransitionEndOut?: BackdropProps['onAfterTransitionOut'];\n /** Triggers live announcement on show and value or message change. */\n liveConfig?: {\n /** Distinguishes the source of the update on the page. */\n contextualLabel: string;\n };\n /** Ref to the visual indicator element, currently a role of progressbar. */\n ref?: Ref<HTMLDivElement>;\n}\n"]}
@@ -1,6 +1,6 @@
1
- import { FC } from 'react';
2
- import { ForwardProps } from '../../types';
3
- import { ProgressProps } from './Progress.types';
1
+ import type { FC } from 'react';
2
+ import type { ForwardProps } from '../../types';
3
+ import type { ProgressProps } from './Progress.types';
4
4
  declare const Ring: FC<ProgressProps & ForwardProps>;
5
5
  export default Ring;
6
6
  //# sourceMappingURL=Ring.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Ring.d.ts","sourceRoot":"","sources":["../../../src/components/Progress/Ring.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAA+B,MAAM,OAAO,CAAC;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,QAAA,MAAM,IAAI,EAAE,EAAE,CAAC,aAAa,GAAG,YAAY,CA6BzC,CAAC;AAEH,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"Ring.d.ts","sourceRoot":"","sources":["../../../src/components/Progress/Ring.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAmB,MAAM,OAAO,CAAC;AAEjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,OAAO,KAAK,EAAE,aAAa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V,iBAAQ,eAAe,EAAE,aAAa,EAAE,KAAK,EAAE,EAAE,gBAAgB,EAAE,GAAI,IACnE,GACa,CACtB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,IAAI,CAAC","sourcesContent":["import { FC, forwardRef, PropsWithoutRef } from 'react';\n\nimport { ForwardProps } from '../../types';\n\nimport { StyledProgressRing } from './Progress.styles';\nimport { ProgressProps } from './Progress.types';\n\nconst Ring: FC<ProgressProps & ForwardProps> = forwardRef(function Ring(\n { value, minValue = 0, maxValue = 100, placement, ...restProps }: PropsWithoutRef<ProgressProps>,\n ref: ProgressProps['ref']\n) {\n let strokeDashoffset;\n const circumference = 18 * Math.PI;\n\n if (typeof value !== 'number') strokeDashoffset = (1 - 33 / 100) * circumference;\n else if (value > maxValue || minValue > maxValue) strokeDashoffset = 0;\n else if (value < minValue) strokeDashoffset = circumference;\n else strokeDashoffset = (1 - (value - minValue) / (maxValue - minValue)) * circumference;\n\n return (\n <StyledProgressRing\n ref={ref}\n role='progressbar'\n aria-valuemin={minValue}\n aria-valuemax={maxValue}\n aria-valuenow={value}\n placement={placement}\n determinate={typeof value === 'number'}\n {...restProps}\n >\n <svg viewBox='0 0 20 20'>\n <circle />\n <circle strokeDasharray={circumference} style={{ strokeDashoffset }} />\n </svg>\n </StyledProgressRing>\n );\n});\n\nexport default Ring;\n"]}
1
+ {"version":3,"file":"Ring.js","sourceRoot":"","sources":["../../../src/components/Progress/Ring.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAKnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAGvD,MAAM,IAAI,GAAqC,UAAU,CAAC,SAAS,IAAI,CACrE,EAAE,KAAK,EAAE,QAAQ,GAAG,CAAC,EAAE,QAAQ,GAAG,GAAG,EAAE,SAAS,EAAE,GAAG,SAAS,EAAkC,EAChG,GAAyB;IAEzB,IAAI,gBAAgB,CAAC;IACrB,MAAM,aAAa,GAAG,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;IAEnC,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,gBAAgB,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,GAAG,CAAC,GAAG,aAAa,CAAC;SAC5E,IAAI,KAAK,GAAG,QAAQ,IAAI,QAAQ,GAAG,QAAQ;QAAE,gBAAgB,GAAG,CAAC,CAAC;SAClE,IAAI,KAAK,GAAG,QAAQ;QAAE,gBAAgB,GAAG,aAAa,CAAC;;QACvD,gBAAgB,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC,QAAQ,GAAG,QAAQ,CAAC,CAAC,GAAG,aAAa,CAAC;IAEzF,OAAO,CACL,KAAC,kBAAkB,IACjB,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,aAAa,mBACH,QAAQ,mBACR,QAAQ,mBACR,KAAK,EACpB,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,OAAO,KAAK,KAAK,QAAQ,KAClC,SAAS,YAEb,eAAK,OAAO,EAAC,WAAW,aACtB,kBAAU,EACV,iBAAQ,eAAe,EAAE,aAAa,EAAE,KAAK,EAAE,EAAE,gBAAgB,EAAE,GAAI,IACnE,GACa,CACtB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,IAAI,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { FC, PropsWithoutRef } from 'react';\n\nimport type { ForwardProps } from '../../types';\n\nimport { StyledProgressRing } from './Progress.styles';\nimport type { ProgressProps } from './Progress.types';\n\nconst Ring: FC<ProgressProps & ForwardProps> = forwardRef(function Ring(\n { value, minValue = 0, maxValue = 100, placement, ...restProps }: PropsWithoutRef<ProgressProps>,\n ref: ProgressProps['ref']\n) {\n let strokeDashoffset;\n const circumference = 18 * Math.PI;\n\n if (typeof value !== 'number') strokeDashoffset = (1 - 33 / 100) * circumference;\n else if (value > maxValue || minValue > maxValue) strokeDashoffset = 0;\n else if (value < minValue) strokeDashoffset = circumference;\n else strokeDashoffset = (1 - (value - minValue) / (maxValue - minValue)) * circumference;\n\n return (\n <StyledProgressRing\n ref={ref}\n role='progressbar'\n aria-valuemin={minValue}\n aria-valuemax={maxValue}\n aria-valuenow={value}\n placement={placement}\n determinate={typeof value === 'number'}\n {...restProps}\n >\n <svg viewBox='0 0 20 20'>\n <circle />\n <circle strokeDasharray={circumference} style={{ strokeDashoffset }} />\n </svg>\n </StyledProgressRing>\n );\n});\n\nexport default Ring;\n"]}
@@ -1,5 +1,5 @@
1
- import { FunctionComponent, Ref } from 'react';
2
- import { BaseProps, ForwardProps } from '../../types';
1
+ import type { FunctionComponent, Ref } from 'react';
2
+ import type { BaseProps, ForwardProps } from '../../types';
3
3
  export declare const StyledEmptyQRWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
4
4
  export interface QRCodeProps extends BaseProps {
5
5
  /** Text that need to be encoded into QR code. */
@@ -1 +1 @@
1
- {"version":3,"file":"QRCode.d.ts","sourceRoot":"","sources":["../../../src/components/QRCode/QRCode.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAEjB,GAAG,EAIJ,MAAM,OAAO,CAAC;AAIf,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAOtD,eAAO,MAAM,oBAAoB,yGAQ/B,CAAC;AAIH,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,GAAG,CAAC,EAAE,GAAG,CAAC,gBAAgB,GAAG,cAAc,CAAC,CAAC;CAC9C;AAED,QAAA,MAAM,MAAM,EAAE,iBAAiB,CAAC,WAAW,GAAG,YAAY,CA2CxD,CAAC;AAEH,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"QRCode.d.ts","sourceRoot":"","sources":["../../../src/components/QRCode/QRCode.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAmB,GAAG,EAAE,MAAM,OAAO,CAAC;AAIrE,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAO3D,eAAO,MAAM,oBAAoB,yGAQ/B,CAAC;AAIH,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,GAAG,CAAC,EAAE,GAAG,CAAC,gBAAgB,GAAG,cAAc,CAAC,CAAC;CAC9C;AAED,QAAA,MAAM,MAAM,EAAE,iBAAiB,CAAC,WAAW,GAAG,YAAY,CA2CxD,CAAC;AAEH,eAAe,MAAM,CAAC"}