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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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,6 +1,6 @@
1
- import { ComponentType, Ref } from 'react';
2
- import { BaseProps, DeferInfer, NoChildrenProp, TestIdProp } from '../../types';
3
- import { FormControlProps } from '../FormControl';
1
+ import type { ComponentType, Ref } from 'react';
2
+ import type { BaseProps, DeferInfer, NoChildrenProp, TestIdProp } from '../../types';
3
+ import type { FormControlProps } from '../FormControl';
4
4
  export interface CompositeInputProps<P extends object = object> extends BaseProps, NoChildrenProp, TestIdProp {
5
5
  /**
6
6
  * Sets DOM id for the control and associates label element via 'for' attribute.
@@ -1 +1 @@
1
- {"version":3,"file":"CompositeInput.types.d.ts","sourceRoot":"","sources":["../../../src/components/CompositeInput/CompositeInput.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAChF,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,mBAAmB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CAC5D,SAAQ,SAAS,EACf,cAAc,EACd,UAAU;IACZ;;;OAGG;IACH,EAAE,CAAC,EAAE,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAC5B,oDAAoD;IACpD,MAAM,CAAC,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IACpC,2DAA2D;IAC3D,KAAK,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAClC,uCAAuC;IACvC,WAAW,CAAC,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAC;IAC9C,6GAA6G;IAC7G,IAAI,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAChC,wEAA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AAK,IAAI,CAAC;KACrD,CAAC;IACF,6CAA6C;IAC7C,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B"}
@@ -1 +1 @@
1
- {"version":3,"file":"CompositeInput.types.js","sourceRoot":"","sources":["../../../src/components/CompositeInput/CompositeInput.types.ts"],"names":[],"mappings":"","sourcesContent":["import { ComponentType, Ref } from 'react';\n\nimport { BaseProps, DeferInfer, NoChildrenProp, TestIdProp } from '../../types';\nimport { FormControlProps } from '../FormControl';\n\nexport interface CompositeInputProps<P extends object = object>\n extends BaseProps,\n NoChildrenProp,\n TestIdProp {\n /**\n * Sets DOM id for the control and associates label element via 'for' attribute.\n * If an id is not pass, a random id will be generated for any render.\n */\n id?: FormControlProps['id'];\n /** Set visual state based on a validation state. */\n status?: FormControlProps['status'];\n /** Pass a string or a fragment with an Icon and string. */\n label?: FormControlProps['label'];\n /** Visually hides the label region. */\n labelHidden?: FormControlProps['labelHidden'];\n /** It is recommended to pass a simple string to offer guidance. Text will be styled based on status prop. */\n info?: FormControlProps['info'];\n /** Indicate if the field is required. The browser defaults to false. */\n required?: FormControlProps['required'];\n /** Disable the control. The browser defaults to false. */\n disabled?: FormControlProps['disabled'];\n /** Callback when clear button is clicked. */\n onClear: () => void;\n /** String representation of the complex value. */\n value?: string;\n /** Text visible when on value has been set. */\n placeholder?: FormControlProps['placeholder'];\n /** Button when clicked will show additional information for the composite input */\n additionalInfo?: FormControlProps['additionalInfo'];\n /** Value form options. */\n dialog: {\n /** A component to render the main portion of the form. */\n renderer: ComponentType<P>;\n /** A props object that will be passed to the form renderer. */\n rendererProps?: DeferInfer<P>;\n /** Callback when cancel button is clicked. */\n onCancel: ({ close }: { close: () => void }) => void;\n /** Callback when apply button is clicked. */\n onApply: ({ close }: { close: () => void }) => void;\n };\n /** Ref forwarded to the wrapping element. */\n ref?: Ref<HTMLDivElement>;\n}\n"]}
1
+ {"version":3,"file":"CompositeInput.types.js","sourceRoot":"","sources":["../../../src/components/CompositeInput/CompositeInput.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentType, Ref } from 'react';\n\nimport type { BaseProps, DeferInfer, NoChildrenProp, TestIdProp } from '../../types';\nimport type { FormControlProps } from '../FormControl';\n\nexport interface CompositeInputProps<P extends object = object>\n extends BaseProps,\n NoChildrenProp,\n TestIdProp {\n /**\n * Sets DOM id for the control and associates label element via 'for' attribute.\n * If an id is not pass, a random id will be generated for any render.\n */\n id?: FormControlProps['id'];\n /** Set visual state based on a validation state. */\n status?: FormControlProps['status'];\n /** Pass a string or a fragment with an Icon and string. */\n label?: FormControlProps['label'];\n /** Visually hides the label region. */\n labelHidden?: FormControlProps['labelHidden'];\n /** It is recommended to pass a simple string to offer guidance. Text will be styled based on status prop. */\n info?: FormControlProps['info'];\n /** Indicate if the field is required. The browser defaults to false. */\n required?: FormControlProps['required'];\n /** Disable the control. The browser defaults to false. */\n disabled?: FormControlProps['disabled'];\n /** Callback when clear button is clicked. */\n onClear: () => void;\n /** String representation of the complex value. */\n value?: string;\n /** Text visible when on value has been set. */\n placeholder?: FormControlProps['placeholder'];\n /** Button when clicked will show additional information for the composite input */\n additionalInfo?: FormControlProps['additionalInfo'];\n /** Value form options. */\n dialog: {\n /** A component to render the main portion of the form. */\n renderer: ComponentType<P>;\n /** A props object that will be passed to the form renderer. */\n rendererProps?: DeferInfer<P>;\n /** Callback when cancel button is clicked. */\n onCancel: ({ close }: { close: () => void }) => void;\n /** Callback when apply button is clicked. */\n onApply: ({ close }: { close: () => void }) => void;\n };\n /** Ref forwarded to the wrapping element. */\n ref?: Ref<HTMLDivElement>;\n}\n"]}
@@ -1,9 +1,9 @@
1
- import { FunctionComponent, ReactNode, Context, MutableRefObject } from 'react';
1
+ import type { FunctionComponent, ReactNode, Context, MutableRefObject } from 'react';
2
2
  import { createPortal } from 'react-dom';
3
3
  import type { StyleSheetManagerProps } from 'styled-components';
4
4
  import '../../init';
5
- import { ThemeMachineLike, DefaultSettableTheme, DefaultThemeDefinition } from '../../theme';
6
- import { Translation, TranslationPack } from '../../i18n';
5
+ import type { ThemeMachineLike, DefaultSettableTheme, DefaultThemeDefinition } from '../../theme';
6
+ import type { Translation, TranslationPack } from '../../i18n';
7
7
  export interface ConfigurationProps {
8
8
  /** Any components or nodes that should be impacted by the settings applied by this Configuration component. */
9
9
  children: ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"Configuration.d.ts","sourceRoot":"","sources":["../../../src/components/Configuration/Configuration.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,iBAAiB,EACjB,SAAS,EAGT,OAAO,EACP,gBAAgB,EACjB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAEhE,OAAO,YAAY,CAAC;AAEpB,OAAO,EAEL,gBAAgB,EAEhB,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,aAAa,CAAC;AACrB,OAAO,EAEL,WAAW,EACX,eAAe,EAGhB,MAAM,YAAY,CAAC;AAKpB,MAAM,WAAW,kBAAkB;IACjC,+GAA+G;IAC/G,QAAQ,EAAE,SAAS,CAAC;IACpB,6FAA6F;IAC7F,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,2GAA2G;IAC3G,SAAS,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IAC1B,0CAA0C;IAC1C,YAAY,CAAC,EAAE,WAAW,CAAC;IAC3B,wEAAwE;IACxE,KAAK,CAAC,EAAE,oBAAoB,CAAC;IAC7B,0GAA0G;IAC1G,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,4DAA4D;IAC5D,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,sBAAsB,CAAC,QAAQ,CAAC,CAAC;IACpD;;;OAGG;IACH,YAAY,CAAC,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,CA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gBACZ,YAAY;gBACZ,gBAAgB,EAAE,wBAAwB;gBAC1C,YAAY,EAAE,oBAAoB;gBAClC,SAAS,EAAE,GAAG,CAAC,SAAS;gBACxB,oBAAoB,EAAE,oBAAoB,IAAI,GAAG,CAAC,oBAAoB;gBACtE,OAAO,EAAE,OAAO,IAAI,GAAG,CAAC,OAAO;gBAC/B,WAAW,EAAE,IAAI;aAClB,YAED,MAAC,aAAa,IAAC,KAAK,EAAE,YAAY,CAAC,KAAK,aACrC,cAAc;wBACb,wBAAwB;wBACxB,YAAY,CACV,cAAc,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CACxB,eAAM,GAAG,EAAC,YAAY,EAAC,IAAI,EAAE,GAAG,sCAAO,GAAG,CAA6B,CACxE,CAAC,EACF,wBAAwB,CACzB,EACF,eAAe,IACF,GACC,GACQ,CAC9B,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import {\n createContext,\n useContext,\n FunctionComponent,\n ReactNode,\n useMemo,\n useEffect,\n Context,\n MutableRefObject\n} from 'react';\nimport { createPortal } from 'react-dom';\nimport styled, { ThemeProvider, StyleSheetManager } from 'styled-components';\nimport type { StyleSheetManagerProps } from 'styled-components';\n\nimport '../../init';\nimport { GlobalStyle } from '../../styles';\nimport {\n ThemeMachine,\n ThemeMachineLike,\n BaseThemeMachine,\n DefaultSettableTheme,\n DefaultThemeDefinition\n} from '../../theme';\nimport {\n createTranslationPack,\n Translation,\n TranslationPack,\n DefaultTranslation,\n direction as directionOfLocale\n} from '../../i18n';\nimport { windowIsAvailable, navigatorIsAvailable, documentIsAvailable } from '../../utils';\nimport pkg from '../../../package.json';\nimport useElement from '../../hooks/useElement';\n\nexport interface ConfigurationProps {\n /** Any components or nodes that should be impacted by the settings applied by this Configuration component. */\n children: ReactNode;\n /** User locale as defined in [BCP-47](https://www.techonthenet.com/js/language_tags.php). */\n locale?: string;\n /** Override rendering direction of the document. Direction will be based on the locale if now provided. */\n direction?: 'ltr' | 'rtl';\n /** Object with (partial) translations. */\n translations?: Translation;\n /** Theme object used to override any or all Cosmos theme properties. */\n theme?: DefaultSettableTheme;\n /** Disables loading Open Sans or Inter from Google Fonts. Only takes effect on the root configuration. */\n disableDefaultFontLoading?: boolean;\n /** List of style sheets to inject in style sheet target. */\n styleSheets?: string[];\n /**\n * Target element for loading styles related to `styled-components`.\n * @deprecated\n */\n styleSheetTarget?: StyleSheetManagerProps['target'];\n /**\n * Target element for rendering a `ReactDOM` portal.\n * @deprecated\n */\n portalTarget?: Parameters<typeof createPortal>[1];\n /**\n * Use native HTML5 controls for inputs instead of rich ones.\n * @default false\n */\n renderNativeControls?: boolean;\n /** String to identify this configuration instance. */\n id?: string;\n /**\n * Enable/disable testId attribute rendering for all components.\n * @default true\n */\n testIds?: boolean;\n}\n\nexport interface ConfigurationContextValue {\n locale: string;\n direction: NonNullable<ConfigurationProps['direction']>;\n translations: TranslationPack;\n themeMachine: ThemeMachineLike<DefaultThemeDefinition>;\n styleSheetTarget: ConfigurationProps['styleSheetTarget'];\n portalTarget: ConfigurationProps['portalTarget'];\n loadedRef: MutableRefObject<boolean>;\n renderNativeControls: boolean;\n testIds: NonNullable<ConfigurationProps['testIds']>;\n /** @internal */\n initialized: boolean;\n}\n\nconst defaultLocale = navigatorIsAvailable ? navigator.language : 'en';\n\nexport const ConfigurationContext = createContext<ConfigurationContextValue>({\n locale: defaultLocale,\n direction: directionOfLocale(defaultLocale),\n translations: DefaultTranslation,\n themeMachine: BaseThemeMachine,\n styleSheetTarget: documentIsAvailable ? document.head : undefined,\n portalTarget: documentIsAvailable ? document.body : undefined,\n loadedRef: { current: false },\n renderNativeControls: false,\n testIds: true,\n initialized: false\n});\n\nconst legacyMetaKey = Symbol.for('@pega/cosmos-react-core.metadata');\n\ninterface LegacyCosmosInstace {\n version: string;\n}\n\ndeclare global {\n interface Window {\n [legacyMetaKey]?: {\n push: (instance: LegacyCosmosInstace) => void;\n };\n }\n}\n\nconst mountedConfigs = new Set<symbol>();\n\ninterface CosmosInstance extends LegacyCosmosInstace {\n mountedConfigs: string[];\n mountOrder: string[];\n mountCount: Record<string, number>;\n}\n\nconst instance: CosmosInstance = {\n version: pkg.version,\n mountedConfigs: [],\n mountOrder: [],\n mountCount: {}\n};\n\nconst mountConfig = (sym: symbol) => {\n mountedConfigs.add(sym);\n instance.mountedConfigs = [...mountedConfigs].map(i => i.description ?? 'Unknown');\n\n const description = sym.description ?? 'Unknown';\n\n instance.mountOrder.push(description);\n\n if (!(description in instance.mountCount)) {\n instance.mountCount[description] = 0;\n }\n instance.mountCount[description] += 1;\n};\n\nconst unmountConfig = (sym: symbol) => {\n mountedConfigs.delete(sym);\n instance.mountedConfigs = [...mountedConfigs].map(i => i.description ?? 'Unknown');\n};\n\ndeclare module '../../init' {\n export interface CosmosGlobals {\n instances?: (CosmosInstance | LegacyCosmosInstace)[];\n configurationContext?: Context<ConfigurationContextValue>;\n }\n}\n\nif (windowIsAvailable) {\n if (!window.cosmos.instances) {\n window.cosmos.instances = [];\n }\n\n window.cosmos.instances.push(instance);\n\n if (Array.isArray(window[legacyMetaKey])) {\n window.cosmos.instances.push(...window[legacyMetaKey]);\n delete window[legacyMetaKey];\n }\n\n if (!window[legacyMetaKey]) {\n window[legacyMetaKey] = {\n push: inst => {\n window.cosmos.instances?.push(inst);\n }\n };\n }\n}\n\nconst StyledConfigurationWrapper = styled.div`\n display: contents;\n`;\n\nconst Configuration: FunctionComponent<ConfigurationProps> = ({\n children,\n locale,\n direction,\n translations: customTranslations,\n theme,\n disableDefaultFontLoading,\n styleSheets: styleSheetURLs,\n styleSheetTarget,\n portalTarget,\n renderNativeControls,\n testIds,\n id\n}: ConfigurationProps) => {\n const context = windowIsAvailable\n ? window.cosmos.configurationContext ?? ConfigurationContext\n : ConfigurationContext;\n const ctx = useContext(context);\n const themeMachine = theme\n ? new ThemeMachine<DefaultThemeDefinition>({ theme, parent: ctx.themeMachine })\n : ctx.themeMachine;\n const translations = useMemo(\n () => createTranslationPack({ ...ctx.translations, ...customTranslations }),\n [ctx.translations, customTranslations]\n );\n\n const [wrapperEl, setWrapperEl] = useElement<HTMLDivElement>();\n\n // Determine valid style sheet and portal target with ShadowDOM handling.\n const [resolvedStyleSheetTarget, resolvedPortalTarget] = useMemo(() => {\n // When rendering on the server, or before the wrapper is in the DOM, just bail.\n if (!documentIsAvailable || !wrapperEl) return [undefined, undefined];\n\n const rootNode = wrapperEl.getRootNode();\n\n // When within the ShadowDOM, the default target is the ShadowRoot, otherwise default to head/body element.\n const defaultStyleSheetTarget = rootNode instanceof ShadowRoot ? rootNode : document.head;\n const defaultPortalTarget = rootNode instanceof ShadowRoot ? rootNode : document.body;\n\n // Currently passed prop or previous context value\n const requestedStyleSheetTarget = styleSheetTarget ?? ctx.styleSheetTarget;\n const requestedPortalTarget = portalTarget ?? ctx.portalTarget;\n\n // If the \"requested\" target is within the root node, it is valid, so use that, otherwise fallback to the default.\n return [\n rootNode.contains(requestedStyleSheetTarget ?? null)\n ? requestedStyleSheetTarget\n : defaultStyleSheetTarget,\n rootNode.contains(requestedPortalTarget ?? null) ? requestedPortalTarget : defaultPortalTarget\n ];\n }, [wrapperEl, styleSheetTarget, portalTarget, ctx.styleSheetTarget, ctx.portalTarget]);\n\n useEffect(() => {\n const sym = Symbol(id);\n mountConfig(sym);\n\n return () => {\n unmountConfig(sym);\n };\n }, [id]);\n\n const wrappedChildren = ctx.initialized ? (\n children\n ) : (\n <StyleSheetManager disableVendorPrefixes target={resolvedStyleSheetTarget}>\n <>\n {!disableDefaultFontLoading &&\n resolvedStyleSheetTarget &&\n createPortal(\n <link\n rel='stylesheet'\n href='https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400..700;1,400..700&family=Inter:wght@400..700&display=swap'\n data-cosmos-global-style\n />,\n resolvedStyleSheetTarget\n )}\n <GlobalStyle />\n {children}\n </>\n </StyleSheetManager>\n );\n\n return (\n <StyledConfigurationWrapper ref={setWrapperEl}>\n <context.Provider\n // eslint-disable-next-line react/jsx-no-constructed-context-values\n value={{\n locale: locale ?? ctx.locale,\n direction:\n direction ?? (locale !== undefined ? directionOfLocale(locale) : ctx.direction),\n translations,\n themeMachine,\n styleSheetTarget: resolvedStyleSheetTarget,\n portalTarget: resolvedPortalTarget,\n loadedRef: ctx.loadedRef,\n renderNativeControls: renderNativeControls ?? ctx.renderNativeControls,\n testIds: testIds ?? ctx.testIds,\n initialized: true\n }}\n >\n <ThemeProvider theme={themeMachine.theme}>\n {styleSheetURLs &&\n resolvedStyleSheetTarget &&\n createPortal(\n styleSheetURLs.map(url => (\n <link rel='stylesheet' href={url} key={url} data-cosmos-global-style />\n )),\n resolvedStyleSheetTarget\n )}\n {wrappedChildren}\n </ThemeProvider>\n </context.Provider>\n </StyledConfigurationWrapper>\n );\n};\n\nexport default Configuration;\n"]}
1
+ {"version":3,"file":"Configuration.js","sourceRoot":"","sources":["../../../src/components/Configuration/Configuration.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtE,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,MAAM,EAAE,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAG7E,OAAO,YAAY,CAAC;AACpB,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE7D,OAAO,EACL,qBAAqB,EACrB,kBAAkB,EAClB,SAAS,IAAI,iBAAiB,EAC/B,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC3F,OAAO,GAAG,MAAM,uBAAuB,CAAC;AACxC,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAuDhD,MAAM,aAAa,GAAG,oBAAoB,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KAAC,OAAO,CAAC,QAAQ;QACf,mEAAmE;;YAAnE,mEAAmE;YACnE,KAAK,EAAE;gBACL,MAAM,EAAE,MAAM,IAAI,GAAG,CAAC,MAAM;gBAC5B,SAAS,EACP,SAAS,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC;gBACjF,YAAY;gBACZ,YAAY;gBACZ,gBAAgB,EAAE,wBAAwB;gBAC1C,YAAY,EAAE,oBAAoB;gBAClC,SAAS,EAAE,GAAG,CAAC,SAAS;gBACxB,oBAAoB,EAAE,oBAAoB,IAAI,GAAG,CAAC,oBAAoB;gBACtE,OAAO,EAAE,OAAO,IAAI,GAAG,CAAC,OAAO;gBAC/B,WAAW,EAAE,IAAI;aAClB,YAED,MAAC,aAAa,IAAC,KAAK,EAAE,YAAY,CAAC,KAAK,aACrC,cAAc;wBACb,wBAAwB;wBACxB,YAAY,CACV,cAAc,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CACxB,eAAM,GAAG,EAAC,YAAY,EAAC,IAAI,EAAE,GAAG,sCAAO,GAAG,CAA6B,CACxE,CAAC,EACF,wBAAwB,CACzB,EACF,eAAe,IACF,GACC,GACQ,CAC9B,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import { createContext, useContext, useMemo, useEffect } from 'react';\nimport type { FunctionComponent, ReactNode, Context, MutableRefObject } from 'react';\nimport { createPortal } from 'react-dom';\nimport styled, { ThemeProvider, StyleSheetManager } from 'styled-components';\nimport type { StyleSheetManagerProps } from 'styled-components';\n\nimport '../../init';\nimport { GlobalStyle } from '../../styles';\nimport { ThemeMachine, BaseThemeMachine } from '../../theme';\nimport type { ThemeMachineLike, DefaultSettableTheme, DefaultThemeDefinition } from '../../theme';\nimport {\n createTranslationPack,\n DefaultTranslation,\n direction as directionOfLocale\n} from '../../i18n';\nimport type { Translation, TranslationPack } from '../../i18n';\nimport { windowIsAvailable, navigatorIsAvailable, documentIsAvailable } from '../../utils';\nimport pkg from '../../../package.json';\nimport useElement from '../../hooks/useElement';\n\nexport interface ConfigurationProps {\n /** Any components or nodes that should be impacted by the settings applied by this Configuration component. */\n children: ReactNode;\n /** User locale as defined in [BCP-47](https://www.techonthenet.com/js/language_tags.php). */\n locale?: string;\n /** Override rendering direction of the document. Direction will be based on the locale if now provided. */\n direction?: 'ltr' | 'rtl';\n /** Object with (partial) translations. */\n translations?: Translation;\n /** Theme object used to override any or all Cosmos theme properties. */\n theme?: DefaultSettableTheme;\n /** Disables loading Open Sans or Inter from Google Fonts. Only takes effect on the root configuration. */\n disableDefaultFontLoading?: boolean;\n /** List of style sheets to inject in style sheet target. */\n styleSheets?: string[];\n /**\n * Target element for loading styles related to `styled-components`.\n * @deprecated\n */\n styleSheetTarget?: StyleSheetManagerProps['target'];\n /**\n * Target element for rendering a `ReactDOM` portal.\n * @deprecated\n */\n portalTarget?: Parameters<typeof createPortal>[1];\n /**\n * Use native HTML5 controls for inputs instead of rich ones.\n * @default false\n */\n renderNativeControls?: boolean;\n /** String to identify this configuration instance. */\n id?: string;\n /**\n * Enable/disable testId attribute rendering for all components.\n * @default true\n */\n testIds?: boolean;\n}\n\nexport interface ConfigurationContextValue {\n locale: string;\n direction: NonNullable<ConfigurationProps['direction']>;\n translations: TranslationPack;\n themeMachine: ThemeMachineLike<DefaultThemeDefinition>;\n styleSheetTarget: ConfigurationProps['styleSheetTarget'];\n portalTarget: ConfigurationProps['portalTarget'];\n loadedRef: MutableRefObject<boolean>;\n renderNativeControls: boolean;\n testIds: NonNullable<ConfigurationProps['testIds']>;\n /** @internal */\n initialized: boolean;\n}\n\nconst defaultLocale = navigatorIsAvailable ? navigator.language : 'en';\n\nexport const ConfigurationContext = createContext<ConfigurationContextValue>({\n locale: defaultLocale,\n direction: directionOfLocale(defaultLocale),\n translations: DefaultTranslation,\n themeMachine: BaseThemeMachine,\n styleSheetTarget: documentIsAvailable ? document.head : undefined,\n portalTarget: documentIsAvailable ? document.body : undefined,\n loadedRef: { current: false },\n renderNativeControls: false,\n testIds: true,\n initialized: false\n});\n\nconst legacyMetaKey = Symbol.for('@pega/cosmos-react-core.metadata');\n\ninterface LegacyCosmosInstace {\n version: string;\n}\n\ndeclare global {\n interface Window {\n [legacyMetaKey]?: {\n push: (instance: LegacyCosmosInstace) => void;\n };\n }\n}\n\nconst mountedConfigs = new Set<symbol>();\n\ninterface CosmosInstance extends LegacyCosmosInstace {\n mountedConfigs: string[];\n mountOrder: string[];\n mountCount: Record<string, number>;\n}\n\nconst instance: CosmosInstance = {\n version: pkg.version,\n mountedConfigs: [],\n mountOrder: [],\n mountCount: {}\n};\n\nconst mountConfig = (sym: symbol) => {\n mountedConfigs.add(sym);\n instance.mountedConfigs = [...mountedConfigs].map(i => i.description ?? 'Unknown');\n\n const description = sym.description ?? 'Unknown';\n\n instance.mountOrder.push(description);\n\n if (!(description in instance.mountCount)) {\n instance.mountCount[description] = 0;\n }\n instance.mountCount[description] += 1;\n};\n\nconst unmountConfig = (sym: symbol) => {\n mountedConfigs.delete(sym);\n instance.mountedConfigs = [...mountedConfigs].map(i => i.description ?? 'Unknown');\n};\n\ndeclare module '../../init' {\n export interface CosmosGlobals {\n instances?: (CosmosInstance | LegacyCosmosInstace)[];\n configurationContext?: Context<ConfigurationContextValue>;\n }\n}\n\nif (windowIsAvailable) {\n if (!window.cosmos.instances) {\n window.cosmos.instances = [];\n }\n\n window.cosmos.instances.push(instance);\n\n if (Array.isArray(window[legacyMetaKey])) {\n window.cosmos.instances.push(...window[legacyMetaKey]);\n delete window[legacyMetaKey];\n }\n\n if (!window[legacyMetaKey]) {\n window[legacyMetaKey] = {\n push: inst => {\n window.cosmos.instances?.push(inst);\n }\n };\n }\n}\n\nconst StyledConfigurationWrapper = styled.div`\n display: contents;\n`;\n\nconst Configuration: FunctionComponent<ConfigurationProps> = ({\n children,\n locale,\n direction,\n translations: customTranslations,\n theme,\n disableDefaultFontLoading,\n styleSheets: styleSheetURLs,\n styleSheetTarget,\n portalTarget,\n renderNativeControls,\n testIds,\n id\n}: ConfigurationProps) => {\n const context = windowIsAvailable\n ? window.cosmos.configurationContext ?? ConfigurationContext\n : ConfigurationContext;\n const ctx = useContext(context);\n const themeMachine = theme\n ? new ThemeMachine<DefaultThemeDefinition>({ theme, parent: ctx.themeMachine })\n : ctx.themeMachine;\n const translations = useMemo(\n () => createTranslationPack({ ...ctx.translations, ...customTranslations }),\n [ctx.translations, customTranslations]\n );\n\n const [wrapperEl, setWrapperEl] = useElement<HTMLDivElement>();\n\n // Determine valid style sheet and portal target with ShadowDOM handling.\n const [resolvedStyleSheetTarget, resolvedPortalTarget] = useMemo(() => {\n // When rendering on the server, or before the wrapper is in the DOM, just bail.\n if (!documentIsAvailable || !wrapperEl) return [undefined, undefined];\n\n const rootNode = wrapperEl.getRootNode();\n\n // When within the ShadowDOM, the default target is the ShadowRoot, otherwise default to head/body element.\n const defaultStyleSheetTarget = rootNode instanceof ShadowRoot ? rootNode : document.head;\n const defaultPortalTarget = rootNode instanceof ShadowRoot ? rootNode : document.body;\n\n // Currently passed prop or previous context value\n const requestedStyleSheetTarget = styleSheetTarget ?? ctx.styleSheetTarget;\n const requestedPortalTarget = portalTarget ?? ctx.portalTarget;\n\n // If the \"requested\" target is within the root node, it is valid, so use that, otherwise fallback to the default.\n return [\n rootNode.contains(requestedStyleSheetTarget ?? null)\n ? requestedStyleSheetTarget\n : defaultStyleSheetTarget,\n rootNode.contains(requestedPortalTarget ?? null) ? requestedPortalTarget : defaultPortalTarget\n ];\n }, [wrapperEl, styleSheetTarget, portalTarget, ctx.styleSheetTarget, ctx.portalTarget]);\n\n useEffect(() => {\n const sym = Symbol(id);\n mountConfig(sym);\n\n return () => {\n unmountConfig(sym);\n };\n }, [id]);\n\n const wrappedChildren = ctx.initialized ? (\n children\n ) : (\n <StyleSheetManager disableVendorPrefixes target={resolvedStyleSheetTarget}>\n <>\n {!disableDefaultFontLoading &&\n resolvedStyleSheetTarget &&\n createPortal(\n <link\n rel='stylesheet'\n href='https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400..700;1,400..700&family=Inter:wght@400..700&display=swap'\n data-cosmos-global-style\n />,\n resolvedStyleSheetTarget\n )}\n <GlobalStyle />\n {children}\n </>\n </StyleSheetManager>\n );\n\n return (\n <StyledConfigurationWrapper ref={setWrapperEl}>\n <context.Provider\n // eslint-disable-next-line react/jsx-no-constructed-context-values\n value={{\n locale: locale ?? ctx.locale,\n direction:\n direction ?? (locale !== undefined ? directionOfLocale(locale) : ctx.direction),\n translations,\n themeMachine,\n styleSheetTarget: resolvedStyleSheetTarget,\n portalTarget: resolvedPortalTarget,\n loadedRef: ctx.loadedRef,\n renderNativeControls: renderNativeControls ?? ctx.renderNativeControls,\n testIds: testIds ?? ctx.testIds,\n initialized: true\n }}\n >\n <ThemeProvider theme={themeMachine.theme}>\n {styleSheetURLs &&\n resolvedStyleSheetTarget &&\n createPortal(\n styleSheetURLs.map(url => (\n <link rel='stylesheet' href={url} key={url} data-cosmos-global-style />\n )),\n resolvedStyleSheetTarget\n )}\n {wrappedChildren}\n </ThemeProvider>\n </context.Provider>\n </StyledConfigurationWrapper>\n );\n};\n\nexport default Configuration;\n"]}
@@ -1,6 +1,6 @@
1
- import { Ref } from 'react';
2
- import { BaseProps, NoChildrenProp } from '../../types';
3
- import { FormControlProps } from '../FormControl';
1
+ import type { Ref } from 'react';
2
+ import type { BaseProps, NoChildrenProp } from '../../types';
3
+ import type { FormControlProps } from '../FormControl';
4
4
  export type ObfuscationMode = 'none' | 'partial' | 'full';
5
5
  export interface FormattingOptions {
6
6
  obfuscation?: ObfuscationMode;
@@ -1 +1 @@
1
- {"version":3,"file":"CreditCard.types.d.ts","sourceRoot":"","sources":["../../../src/components/CreditCard/CreditCard.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,OAAO,EAA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ditCard/CreditCard.types.ts"],"names":[],"mappings":"","sourcesContent":["import { Ref } from 'react';\n\nimport { BaseProps, NoChildrenProp } from '../../types';\nimport { FormControlProps } from '../FormControl';\n\nexport type ObfuscationMode = 'none' | 'partial' | 'full';\n\nexport interface FormattingOptions {\n obfuscation?: ObfuscationMode;\n}\n\nexport interface CreditCardDisplayProps extends BaseProps, NoChildrenProp {\n /** Number value. */\n value?: string;\n /** Options to define formatting. */\n formattingOptions?: {\n /**\n * Defines if the obfuscation (replacing digits with bullets) should be applied.\n * This is only visual obfuscation, the real one should be applied on the server side.\n * Characters that are going to be obfuscated may be random characters or even missing.\n * @default 'none'\n */\n obfuscation?: ObfuscationMode;\n };\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLSpanElement>;\n}\n\nexport interface CreditCardInputProps extends BaseProps, NoChildrenProp {\n /**\n * Sets DOM id for the control and associates label element via 'for' attribute.\n * If an id is not pass, a random id will be generated for any render.\n */\n id?: FormControlProps['id'];\n /** Set visual state based on a validation state. */\n status?: FormControlProps['status'];\n /** Pass a string or a fragment with an Icon and string. */\n label?: FormControlProps['label'];\n /**\n * Visually hides the label region.\n * @default false\n */\n labelHidden?: FormControlProps['labelHidden'];\n /** It is recommended to pass a simple string to offer guidance. Text will be styled based on status prop. */\n info?: FormControlProps['info'];\n /** Indicate if the field is required. The browser defaults to false. */\n required?: FormControlProps['required'];\n /** Placeholder text. The browser defaults to an empty string. */\n placeholder?: string;\n /** Disable the control. The browser defaults to false. */\n disabled?: FormControlProps['disabled'];\n /** Makes the component non editable and non clickable. The browser defaults to false. */\n readOnly?: FormControlProps['readOnly'];\n /** Sets html name attribute for the underlying control. Useful for mapping to a data field. */\n name?: FormControlProps['name'];\n /**\n * CurrencyInput input value.\n * Requires an onChange handler to update value.\n * @default ''\n */\n value?: string;\n /** Callback fired when input value changes. */\n onChange: (value?: string) => void;\n /** Callback fired when the component loses focus. */\n onFocus?: (value?: string) => void;\n /** Callback fired when the component loses focus. */\n onBlur?: (value?: string) => void;\n /** Pass a heading and content to show additional information on the field. */\n additionalInfo?: FormControlProps['additionalInfo'];\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLInputElement>;\n}\n"]}
1
+ {"version":3,"file":"CreditCard.types.js","sourceRoot":"","sources":["../../../src/components/CreditCard/CreditCard.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Ref } from 'react';\n\nimport type { BaseProps, NoChildrenProp } from '../../types';\nimport type { FormControlProps } from '../FormControl';\n\nexport type ObfuscationMode = 'none' | 'partial' | 'full';\n\nexport interface FormattingOptions {\n obfuscation?: ObfuscationMode;\n}\n\nexport interface CreditCardDisplayProps extends BaseProps, NoChildrenProp {\n /** Number value. */\n value?: string;\n /** Options to define formatting. */\n formattingOptions?: {\n /**\n * Defines if the obfuscation (replacing digits with bullets) should be applied.\n * This is only visual obfuscation, the real one should be applied on the server side.\n * Characters that are going to be obfuscated may be random characters or even missing.\n * @default 'none'\n */\n obfuscation?: ObfuscationMode;\n };\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLSpanElement>;\n}\n\nexport interface CreditCardInputProps extends BaseProps, NoChildrenProp {\n /**\n * Sets DOM id for the control and associates label element via 'for' attribute.\n * If an id is not pass, a random id will be generated for any render.\n */\n id?: FormControlProps['id'];\n /** Set visual state based on a validation state. */\n status?: FormControlProps['status'];\n /** Pass a string or a fragment with an Icon and string. */\n label?: FormControlProps['label'];\n /**\n * Visually hides the label region.\n * @default false\n */\n labelHidden?: FormControlProps['labelHidden'];\n /** It is recommended to pass a simple string to offer guidance. Text will be styled based on status prop. */\n info?: FormControlProps['info'];\n /** Indicate if the field is required. The browser defaults to false. */\n required?: FormControlProps['required'];\n /** Placeholder text. The browser defaults to an empty string. */\n placeholder?: string;\n /** Disable the control. The browser defaults to false. */\n disabled?: FormControlProps['disabled'];\n /** Makes the component non editable and non clickable. The browser defaults to false. */\n readOnly?: FormControlProps['readOnly'];\n /** Sets html name attribute for the underlying control. Useful for mapping to a data field. */\n name?: FormControlProps['name'];\n /**\n * CurrencyInput input value.\n * Requires an onChange handler to update value.\n * @default ''\n */\n value?: string;\n /** Callback fired when input value changes. */\n onChange: (value?: string) => void;\n /** Callback fired when the component loses focus. */\n onFocus?: (value?: string) => void;\n /** Callback fired when the component loses focus. */\n onBlur?: (value?: string) => void;\n /** Pass a heading and content to show additional information on the field. */\n additionalInfo?: FormControlProps['additionalInfo'];\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLInputElement>;\n}\n"]}
@@ -1,6 +1,6 @@
1
- import { FunctionComponent } from 'react';
2
- import { ForwardProps } from '../../types';
3
- import { CreditCardDisplayProps } from './CreditCard.types';
1
+ import type { FunctionComponent } from 'react';
2
+ import type { ForwardProps } from '../../types';
3
+ import type { CreditCardDisplayProps } from './CreditCard.types';
4
4
  declare const CreditCardDisplay: FunctionComponent<CreditCardDisplayProps & ForwardProps>;
5
5
  export default CreditCardDisplay;
6
6
  //# sourceMappingURL=CreditCardDisplay.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CreditCardDisplay.d.ts","sourceRoot":"","sources":["../../../src/components/CreditCard/CreditCardDisplay.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAAmB,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAI3C,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAG5D,QAAA,MAAM,iBAAiB,EAAE,iBAAiB,CAAC,sBAAsB,GAAG,YAAY,CAyB/E,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"CreditCardDisplay.d.ts","sourceRoot":"","sources":["../../../src/components/CreditCard/CreditCardDisplay.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAmB,MAAM,OAAO,CAAC;AAEhE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAIhD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAGjE,QAAA,MAAM,iBAAiB,EAAE,iBAAiB,CAAC,sBAAsB,GAAG,YAAY,CAyB/E,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"CreditCardDisplay.js","sourceRoot":"","sources":["../../../src/components/CreditCard/CreditCardDisplay.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAsC,MAAM,OAAO,CAAC;AAGvE,OAAO,kBAAkB,MAAM,uBAAuB,CAAC;AACvD,OAAO,OAAO,MAAM,oBAAoB,CAAC;AAGzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,iBAAiB,GAA6D,UAAU,CAC5F,SAAS,iBAAiB,CACxB,EAAE,KAAK,EAAE,iBAAiB,GAAG,EAAE,EAAE,GAAG,SAAS,EAA2C,EACxF,GAAkC;IAElC,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAEjF,OAAO,CACL,eAAM,GAAG,EAAE,GAAG,KAAM,SAAS,YAC1B,SAAS,CAAC,CAAC,CAAC,CACX,8BACE,8BAAkB,MAAM,YAAE,SAAS,GAAQ,EAC3C,KAAC,kBAAkB,cAChB,SAAS;yBACP,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;yBACpB,OAAO,CAAC,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,GAAG,KAAK,GAAG,CAAC;yBAC7C,IAAI,EAAE,GACU,IACpB,CACJ,CAAC,CAAC,CAAC,CACF,KAAC,OAAO,KAAG,CACZ,GACI,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,iBAAiB,CAAC","sourcesContent":["import { forwardRef, FunctionComponent, PropsWithoutRef } from 'react';\n\nimport { ForwardProps } from '../../types';\nimport VisuallyHiddenText from '../VisuallyHiddenText';\nimport NoValue from '../NoValue/NoValue';\n\nimport { CreditCardDisplayProps } from './CreditCard.types';\nimport { formatCreditCard } from './utils';\n\nconst CreditCardDisplay: FunctionComponent<CreditCardDisplayProps & ForwardProps> = forwardRef(\n function CreditCardDisplay(\n { value, formattingOptions = {}, ...restProps }: PropsWithoutRef<CreditCardDisplayProps>,\n ref: CreditCardDisplayProps['ref']\n ) {\n const formatted = value ? formatCreditCard(value, formattingOptions) : undefined;\n\n return (\n <span ref={ref} {...restProps}>\n {formatted ? (\n <>\n <span aria-hidden='true'>{formatted}</span>\n <VisuallyHiddenText>\n {formatted\n .replace(/\\s+/g, '.')\n .replace(/([0-9•]\\.?)/g, digit => `${digit} `)\n .trim()}\n </VisuallyHiddenText>\n </>\n ) : (\n <NoValue />\n )}\n </span>\n );\n }\n);\n\nexport default CreditCardDisplay;\n"]}
1
+ {"version":3,"file":"CreditCardDisplay.js","sourceRoot":"","sources":["../../../src/components/CreditCard/CreditCardDisplay.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAInC,OAAO,kBAAkB,MAAM,uBAAuB,CAAC;AACvD,OAAO,OAAO,MAAM,oBAAoB,CAAC;AAGzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,iBAAiB,GAA6D,UAAU,CAC5F,SAAS,iBAAiB,CACxB,EAAE,KAAK,EAAE,iBAAiB,GAAG,EAAE,EAAE,GAAG,SAAS,EAA2C,EACxF,GAAkC;IAElC,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAEjF,OAAO,CACL,eAAM,GAAG,EAAE,GAAG,KAAM,SAAS,YAC1B,SAAS,CAAC,CAAC,CAAC,CACX,8BACE,8BAAkB,MAAM,YAAE,SAAS,GAAQ,EAC3C,KAAC,kBAAkB,cAChB,SAAS;yBACP,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;yBACpB,OAAO,CAAC,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,GAAG,KAAK,GAAG,CAAC;yBAC7C,IAAI,EAAE,GACU,IACpB,CACJ,CAAC,CAAC,CAAC,CACF,KAAC,OAAO,KAAG,CACZ,GACI,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,iBAAiB,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { FunctionComponent, PropsWithoutRef } from 'react';\n\nimport type { ForwardProps } from '../../types';\nimport VisuallyHiddenText from '../VisuallyHiddenText';\nimport NoValue from '../NoValue/NoValue';\n\nimport type { CreditCardDisplayProps } from './CreditCard.types';\nimport { formatCreditCard } from './utils';\n\nconst CreditCardDisplay: FunctionComponent<CreditCardDisplayProps & ForwardProps> = forwardRef(\n function CreditCardDisplay(\n { value, formattingOptions = {}, ...restProps }: PropsWithoutRef<CreditCardDisplayProps>,\n ref: CreditCardDisplayProps['ref']\n ) {\n const formatted = value ? formatCreditCard(value, formattingOptions) : undefined;\n\n return (\n <span ref={ref} {...restProps}>\n {formatted ? (\n <>\n <span aria-hidden='true'>{formatted}</span>\n <VisuallyHiddenText>\n {formatted\n .replace(/\\s+/g, '.')\n .replace(/([0-9•]\\.?)/g, digit => `${digit} `)\n .trim()}\n </VisuallyHiddenText>\n </>\n ) : (\n <NoValue />\n )}\n </span>\n );\n }\n);\n\nexport default CreditCardDisplay;\n"]}
@@ -1,6 +1,6 @@
1
- import { FunctionComponent } from 'react';
2
- import { ForwardProps } from '../../types';
3
- import { CreditCardInputProps } from './CreditCard.types';
1
+ import type { FunctionComponent } from 'react';
2
+ import type { ForwardProps } from '../../types';
3
+ import type { CreditCardInputProps } from './CreditCard.types';
4
4
  declare const CreditCardInput: FunctionComponent<CreditCardInputProps & ForwardProps>;
5
5
  export default CreditCardInput;
6
6
  //# sourceMappingURL=CreditCardInput.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CreditCardInput.d.ts","sourceRoot":"","sources":["../../../src/components/CreditCard/CreditCardInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EAMlB,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAI3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAG1D,QAAA,MAAM,eAAe,EAAE,iBAAiB,CAAC,oBAAoB,GAAG,YAAY,CA2D3E,CAAC;AAEF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"CreditCardInput.d.ts","sourceRoot":"","sources":["../../../src/components/CreditCard/CreditCardInput.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,iBAAiB,EAKlB,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAIhD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAG/D,QAAA,MAAM,eAAe,EAAE,iBAAiB,CAAC,oBAAoB,GAAG,YAAY,CA2D3E,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"CreditCardInput.js","sourceRoot":"","sources":["../../../src/components/CreditCard/CreditCardInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAEL,UAAU,EAKX,MAAM,OAAO,CAAC;AACf,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAG9C,OAAO,KAAK,MAAM,UAAU,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGpE,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEjE,MAAM,eAAe,GAA2D,UAAU,CACxF,SAAS,eAAe,CACtB,EAAE,KAAK,GAAG,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,SAAS,EAAyC,EAC9F,GAAgC;IAEhC,MAAM,cAAc,GAAG,CAAC,CAA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outRef,\n ChangeEvent,\n ClipboardEvent,\n KeyboardEvent\n} from 'react';\nimport creditCardType from 'credit-card-type';\n\nimport { ForwardProps } from '../../types';\nimport Input from '../Input';\nimport { useConsolidatedRef, useInputFormatter } from '../../hooks';\n\nimport { CreditCardInputProps } from './CreditCard.types';\nimport { formatCreditCard, isPossibleCardNumber } from './utils';\n\nconst CreditCardInput: FunctionComponent<CreditCardInputProps & ForwardProps> = forwardRef(\n function CreditCardInput(\n { value = '', onChange, onBlur, onFocus, ...restProps }: PropsWithoutRef<CreditCardInputProps>,\n ref: CreditCardInputProps['ref']\n ) {\n const onInputKeyDown = (e: KeyboardEvent) => {\n if (value && !isPossibleCardNumber(value) && Number.isFinite(Number.parseInt(e.key, 10))) {\n (e.target as HTMLInputElement).value = '';\n }\n };\n\n const onInputChange = (e: ChangeEvent<HTMLInputElement>) => {\n onChange(e.target.value ? e.target.value.replace(/\\D+/g, '') : undefined);\n };\n\n const onInputBlur = (e: FocusEvent) => {\n const inputValue = (e.target as HTMLInputElement).value;\n onBlur?.(inputValue ? inputValue.replace(/\\D+/g, '') : undefined);\n };\n\n const onInputFocus = (e: FocusEvent) => {\n const inputValue = (e.target as HTMLInputElement).value;\n onFocus?.(inputValue ? inputValue.replace(/\\D+/g, '') : undefined);\n };\n\n const onPaste = (e: ClipboardEvent) => {\n const text = e.clipboardData.getData('text').replace(/\\D+/g, '');\n const [{ lengths: [inferredLength] = [] } = {}] = creditCardType(text);\n if (text.length > inferredLength) {\n onChange(Number(text).toString());\n e.preventDefault();\n }\n };\n\n const maxLength = value ? Math.max(...(creditCardType(value)[0]?.lengths || [16])) : undefined;\n\n const obfuscation = /\\D/.test(value) ? 'partial' : 'none';\n\n const inputRef = useConsolidatedRef(ref);\n const formatted = useInputFormatter(inputRef, value, (input: string) =>\n formatCreditCard(input.replace(/\\D+/g, ''), { obfuscation })\n );\n\n return (\n <Input\n {...restProps}\n inputMode='numeric'\n ref={inputRef}\n value={formatted}\n onChange={onInputChange}\n onBlur={onInputBlur}\n onFocus={onInputFocus}\n onPaste={onPaste}\n onKeyDown={onInputKeyDown}\n maxLength={maxLength}\n autoComplete='cc-number'\n />\n );\n }\n);\n\nexport default CreditCardInput;\n"]}
1
+ {"version":3,"file":"CreditCardInput.js","sourceRoot":"","sources":["../../../src/components/CreditCard/CreditCardInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAQnC,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAG9C,OAAO,KAAK,MAAM,UAAU,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGpE,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEjE,MAAM,eAAe,GAA2D,UAAU,CACxF,SAAS,eAAe,CACtB,EAAE,KAAK,GAAG,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,SAAS,EAAyC,EAC9F,GAAgC;IAEhC,MAAM,cAAc,GAAG,CAAC,CAAgB,EAAE,EAAE;QAC1C,IAAI,KAAK,IAAI,CAAC,oBAAoB,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,EAAE;YACvF,CAAC,CAAC,MAA2B,CAAC,KAAK,GAAG,EAAE,CAAC;SAC3C;IACH,CAAC,CAAC;IAEF,MAAM,aAAa,GAAG,CAAC,CAAgC,EAAE,EAAE;QACzD,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAC5E,CAAC,CAAC;IAEF,MAAM,WAAW,GAAG,CAAC,CAAa,EAAE,EAAE;QACpC,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,CAAC,CAAC,CAAC,MAAM,CAAC;IAE1D,MAAM,QAAQ,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC;IACzC,MAAM,SAAS,GAAG,iBAAiB,CAAC,QAAQ,EAAE,KAAK,EAAE,CAAC,KAAa,EAAE,EAAE,CACrE,gBAAgB,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,EAAE,WAAW,EAAE,CAAC,CAC7D,CAAC;IAEF,OAAO,CACL,KAAC,KAAK,OACA,SAAS,EACb,SAAS,EAAC,SAAS,EACnB,GAAG,EAAE,QAAQ,EACb,KAAK,EAAE,SAAS,EAChB,QAAQ,EAAE,aAAa,EACvB,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,YAAY,EACrB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,cAAc,EACzB,SAAS,EAAE,SAAS,EACpB,YAAY,EAAC,WAAW,GACxB,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type {\n FunctionComponent,\n PropsWithoutRef,\n ChangeEvent,\n ClipboardEvent,\n KeyboardEvent\n} from 'react';\nimport creditCardType from 'credit-card-type';\n\nimport type { ForwardProps } from '../../types';\nimport Input from '../Input';\nimport { useConsolidatedRef, useInputFormatter } from '../../hooks';\n\nimport type { CreditCardInputProps } from './CreditCard.types';\nimport { formatCreditCard, isPossibleCardNumber } from './utils';\n\nconst CreditCardInput: FunctionComponent<CreditCardInputProps & ForwardProps> = forwardRef(\n function CreditCardInput(\n { value = '', onChange, onBlur, onFocus, ...restProps }: PropsWithoutRef<CreditCardInputProps>,\n ref: CreditCardInputProps['ref']\n ) {\n const onInputKeyDown = (e: KeyboardEvent) => {\n if (value && !isPossibleCardNumber(value) && Number.isFinite(Number.parseInt(e.key, 10))) {\n (e.target as HTMLInputElement).value = '';\n }\n };\n\n const onInputChange = (e: ChangeEvent<HTMLInputElement>) => {\n onChange(e.target.value ? e.target.value.replace(/\\D+/g, '') : undefined);\n };\n\n const onInputBlur = (e: FocusEvent) => {\n const inputValue = (e.target as HTMLInputElement).value;\n onBlur?.(inputValue ? inputValue.replace(/\\D+/g, '') : undefined);\n };\n\n const onInputFocus = (e: FocusEvent) => {\n const inputValue = (e.target as HTMLInputElement).value;\n onFocus?.(inputValue ? inputValue.replace(/\\D+/g, '') : undefined);\n };\n\n const onPaste = (e: ClipboardEvent) => {\n const text = e.clipboardData.getData('text').replace(/\\D+/g, '');\n const [{ lengths: [inferredLength] = [] } = {}] = creditCardType(text);\n if (text.length > inferredLength) {\n onChange(Number(text).toString());\n e.preventDefault();\n }\n };\n\n const maxLength = value ? Math.max(...(creditCardType(value)[0]?.lengths || [16])) : undefined;\n\n const obfuscation = /\\D/.test(value) ? 'partial' : 'none';\n\n const inputRef = useConsolidatedRef(ref);\n const formatted = useInputFormatter(inputRef, value, (input: string) =>\n formatCreditCard(input.replace(/\\D+/g, ''), { obfuscation })\n );\n\n return (\n <Input\n {...restProps}\n inputMode='numeric'\n ref={inputRef}\n value={formatted}\n onChange={onInputChange}\n onBlur={onInputBlur}\n onFocus={onInputFocus}\n onPaste={onPaste}\n onKeyDown={onInputKeyDown}\n maxLength={maxLength}\n autoComplete='cc-number'\n />\n );\n }\n);\n\nexport default CreditCardInput;\n"]}
@@ -1,5 +1,5 @@
1
- import { FunctionComponent, Ref } from 'react';
2
- import { BaseProps, ForwardProps, NoChildrenProp } from '../../types';
1
+ import type { FunctionComponent, Ref } from 'react';
2
+ import type { BaseProps, ForwardProps, NoChildrenProp } from '../../types';
3
3
  export interface CurrencyDisplayProps extends BaseProps, NoChildrenProp {
4
4
  /** Number value. */
5
5
  value?: number | bigint;
@@ -1 +1 @@
1
- {"version":3,"file":"CurrencyDisplay.d.ts","sourceRoot":"","sources":["../../../src/components/Currency/CurrencyDisplay.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAAmB,GAAG,EAAE,MAAM,OAAO,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UAAU;YACjB,QAAQ,EAAE,eAAe;YACzB,eAAe,EAAE,QAAQ;YACzB,WAAW,EAAE,eAAe;YAC5B,QAAQ;YACR,YAAY,EAAE,QAAQ,KAAK,aAAa,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,UAAU;YACpE,qBAAqB,EAAE,cAAc;YACrC,qBAAqB,EAAE,cAAc;SACT;QAChC,CAAC,CAAC,SAAS,CAAC;IAEhB,MAAM,SAAS,GAAG;QAChB,GAAG,OAAO;QACV,WAAW,EAAE,KAAK;QAClB,YAAY,EAAE,UAAU;QACxB,eAAe,EAAE,MAAM;KACxB,CAAC;IAEF,OAAO,CACL,eAAM,GAAG,EAAE,GAAG,KAAM,SAAS,YAC1B,KAAK,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CACtB,8BACE,8BAAkB,MAAM,YAAE,cAAc,CAAC,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,GAAQ,EAC5E,KAAC,kBAAkB,cAChB,cAAc,CAAC,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,GACnC,IACpB,CACJ,CAAC,CAAC,CAAC,CACF,KAAC,OAAO,KAAG,CACZ,GACI,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["import { forwardRef, FunctionComponent, PropsWithoutRef, Ref } from 'react';\n\nimport { BaseProps, ForwardProps, NoChildrenProp } from '../../types';\nimport { useConfiguration } from '../../hooks';\nimport VisuallyHiddenText from '../VisuallyHiddenText';\nimport NoValue from '../NoValue/NoValue';\n\nimport { formatCurrency, isValidCurrency } from './utils';\n\nexport interface CurrencyDisplayProps extends BaseProps, NoChildrenProp {\n /** Number value. */\n value?: number | bigint;\n /** Three letter currency shorthand ISO code. If not provided or invalid, component renders only the number. */\n currencyISOCode?: string;\n /** Options to define formatting. */\n formattingOptions?: {\n currency?: 'symbol' | 'code' | 'name';\n /**\n * Determines negative value notation: using minus sign or parentheses.\n * @default 'minus-sign'\n */\n negative?: 'minus-sign' | 'parentheses';\n /**\n * Value display notation.\n * @default 'standard'\n */\n notation?: 'standard' | 'compact';\n /**\n * Fixed number of fraction digits. Maximum is 20, default is currency dependant.\n * @default variable\n */\n fractionDigits?: number;\n /** Determines whether group separators should be shown.\n * @default true\n */\n groupSeparators?: boolean;\n };\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLAnchorElement>;\n}\n\nconst CurrencyDisplay: FunctionComponent<CurrencyDisplayProps & ForwardProps> = forwardRef(\n function CurrencyDisplay(\n {\n value,\n currencyISOCode,\n formattingOptions: {\n currency = 'symbol',\n negative = 'minus-sign',\n notation = 'standard',\n groupSeparators = true,\n fractionDigits\n } = {},\n ...restProps\n }: PropsWithoutRef<CurrencyDisplayProps>,\n ref: CurrencyDisplayProps['ref']\n ) {\n const { locale } = useConfiguration();\n\n const options =\n currencyISOCode && isValidCurrency(currencyISOCode)\n ? ({\n style: 'currency',\n currency: currencyISOCode,\n currencyDisplay: currency,\n useGrouping: groupSeparators,\n notation,\n currencySign: negative === 'parentheses' ? 'accounting' : 'standard',\n minimumFractionDigits: fractionDigits,\n maximumFractionDigits: fractionDigits\n } as Intl.NumberFormatOptions)\n : undefined;\n\n const srOptions = {\n ...options,\n useGrouping: false,\n currencySign: 'standard',\n currencyDisplay: 'name'\n };\n\n return (\n <span ref={ref} {...restProps}>\n {value || value === 0 ? (\n <>\n <span aria-hidden='true'>{formatCurrency(value, { locale, options })}</span>\n <VisuallyHiddenText>\n {formatCurrency(value, { locale, options: srOptions })}\n </VisuallyHiddenText>\n </>\n ) : (\n <NoValue />\n )}\n </span>\n );\n }\n);\n\nexport default CurrencyDisplay;\n"]}
1
+ {"version":3,"file":"CurrencyDisplay.js","sourceRoot":"","sources":["../../../src/components/Currency/CurrencyDisplay.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAInC,OAAO,EAAE,gBA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AAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,GACnC,IACpB,CACJ,CAAC,CAAC,CAAC,CACF,KAAC,OAAO,KAAG,CACZ,GACI,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { FunctionComponent, PropsWithoutRef, Ref } from 'react';\n\nimport type { BaseProps, ForwardProps, NoChildrenProp } from '../../types';\nimport { useConfiguration } from '../../hooks';\nimport VisuallyHiddenText from '../VisuallyHiddenText';\nimport NoValue from '../NoValue/NoValue';\n\nimport { formatCurrency, isValidCurrency } from './utils';\n\nexport interface CurrencyDisplayProps extends BaseProps, NoChildrenProp {\n /** Number value. */\n value?: number | bigint;\n /** Three letter currency shorthand ISO code. If not provided or invalid, component renders only the number. */\n currencyISOCode?: string;\n /** Options to define formatting. */\n formattingOptions?: {\n currency?: 'symbol' | 'code' | 'name';\n /**\n * Determines negative value notation: using minus sign or parentheses.\n * @default 'minus-sign'\n */\n negative?: 'minus-sign' | 'parentheses';\n /**\n * Value display notation.\n * @default 'standard'\n */\n notation?: 'standard' | 'compact';\n /**\n * Fixed number of fraction digits. Maximum is 20, default is currency dependant.\n * @default variable\n */\n fractionDigits?: number;\n /** Determines whether group separators should be shown.\n * @default true\n */\n groupSeparators?: boolean;\n };\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLAnchorElement>;\n}\n\nconst CurrencyDisplay: FunctionComponent<CurrencyDisplayProps & ForwardProps> = forwardRef(\n function CurrencyDisplay(\n {\n value,\n currencyISOCode,\n formattingOptions: {\n currency = 'symbol',\n negative = 'minus-sign',\n notation = 'standard',\n groupSeparators = true,\n fractionDigits\n } = {},\n ...restProps\n }: PropsWithoutRef<CurrencyDisplayProps>,\n ref: CurrencyDisplayProps['ref']\n ) {\n const { locale } = useConfiguration();\n\n const options =\n currencyISOCode && isValidCurrency(currencyISOCode)\n ? ({\n style: 'currency',\n currency: currencyISOCode,\n currencyDisplay: currency,\n useGrouping: groupSeparators,\n notation,\n currencySign: negative === 'parentheses' ? 'accounting' : 'standard',\n minimumFractionDigits: fractionDigits,\n maximumFractionDigits: fractionDigits\n } as Intl.NumberFormatOptions)\n : undefined;\n\n const srOptions = {\n ...options,\n useGrouping: false,\n currencySign: 'standard',\n currencyDisplay: 'name'\n };\n\n return (\n <span ref={ref} {...restProps}>\n {value || value === 0 ? (\n <>\n <span aria-hidden='true'>{formatCurrency(value, { locale, options })}</span>\n <VisuallyHiddenText>\n {formatCurrency(value, { locale, options: srOptions })}\n </VisuallyHiddenText>\n </>\n ) : (\n <NoValue />\n )}\n </span>\n );\n }\n);\n\nexport default CurrencyDisplay;\n"]}
@@ -1,6 +1,6 @@
1
- import { FunctionComponent } from 'react';
2
- import { ForwardProps } from '../../types';
3
- import CurrencyInputProps from './CurrencyInput.types';
1
+ import type { FunctionComponent } from 'react';
2
+ import type { ForwardProps } from '../../types';
3
+ import type CurrencyInputProps from './CurrencyInput.types';
4
4
  declare const _default: FunctionComponent<CurrencyInputProps & ForwardProps> & {
5
5
  getTestIds: (testIdProp?: string | undefined) => import("../../types").TestIdsRecord<readonly ["control", "label", "info", "additional-info", "suggestion-accept", "suggestion-reject"]>;
6
6
  };
@@ -1 +1 @@
1
- {"version":3,"file":"CurrencyInput.d.ts","sourceRoot":"","sources":["../../../src/components/Currency/CurrencyInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAOlB,MAAM,OAAO,CAAC;AAIf,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAmB3C,OAAO,kBAAkB,MAAM,uBAAuB,CAAC;;;;AAgMvD,wBAAmE"}
1
+ {"version":3,"file":"CurrencyInput.d.ts","sourceRoot":"","sources":["../../../src/components/Currency/CurrencyInput.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,iBAAiB,EAKlB,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAmBhD,OAAO,KAAK,kBAAkB,MAAM,uBAAuB,CAAC;;;;AAgM5D,wBAAmE"}
@@ -1 +1 @@
1
- {"version":3,"file":"CurrencyInput.js","sourceRoot":"","sources":["../../../src/components/Currency/CurrencyInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EAGV,WAAW,EACX,OAAO,EAIR,MAAM,OAAO,CAAC;AAEf,OAAO,kBAAkB,MAAM,uBAAuB,CAAC;AACvD,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,OAAO,EACP,iBAAiB,EACjB,WAAW,EACX,UAAU,EACV,MAAM,EACP,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,eAAe,EACf,cAAc,EACd,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,MAAM,UAAU,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG1C,OAAO,EAAE,gCAAgC,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/F,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAE9D,MAAM,aAAa,GAAyD,UAAU,CACpF,SAAS,aAAa,CACpB,KAA0C,EAC1C,GAA8B;IAE9B,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC;IACrB,MAAM,EACJ,MAAM,EACN,EAAE,GAAG,GAAG,EACR,MAAM,EACN,KAAK,EACL,WAAW,EACX,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,cAAc,EACd,KAAK,EAAE,SAAS,GAAG,EAAE,EACrB,QAAQ,EACR,MAAM,EACN,OAAO,EACP,mBAAmB,EACnB,eAAe,EACf,WAAW,GAAG,IAAI,EAClB,mBAAmB,GAAG,IAAI,EAC1B,GAAG,GAAG,MAAM,CAAC,gBAAgB,EAC7B,GAAG,GAAG,MAAM,CA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,KAAC,SAAS,IACR,MAAM,EAAE,OAAO,EACf,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,cAAc,EAAE,cAAc,EAC9B,mBAAmB,EAAE,mBAAmB,YAEvC,IAAI,GACK,CACb,CAAC,CAAC,CAAC,CACF,IAAI,CACL,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC,aAAa,EAAE,uBAAuB,CAAC,CAAC","sourcesContent":["import {\n forwardRef,\n FunctionComponent,\n PropsWithoutRef,\n useCallback,\n useMemo,\n KeyboardEvent,\n ChangeEvent,\n FocusEvent\n} from 'react';\n\nimport VisuallyHiddenText from '../VisuallyHiddenText';\nimport FormField from '../FormField';\nimport { ForwardProps } from '../../types';\nimport {\n useConfiguration,\n useConsolidatedRef,\n useI18n,\n useInputFormatter,\n usePrevious,\n useTestIds,\n useUID\n} from '../../hooks';\nimport {\n getCleanedValue,\n getDecimalSign,\n getDecrementedValue,\n getIncrementedValue\n} from '../Number/utils';\nimport Input from '../Input';\nimport { withTestIds } from '../../utils';\n\nimport CurrencyInputProps from './CurrencyInput.types';\nimport { getCurrencyMinimumFractionDigits, getFormattedValue, isValidCurrency } from './utils';\nimport { getCurrencyInputTestIds } from './Currency.test-ids';\n\nconst CurrencyInput: FunctionComponent<CurrencyInputProps & ForwardProps> = forwardRef(\n function CurrencyInput(\n props: PropsWithoutRef<CurrencyInputProps>,\n ref: CurrencyInputProps['ref']\n ) {\n const uid = useUID();\n const {\n testId,\n id = uid,\n status,\n label,\n labelHidden,\n info,\n required,\n disabled,\n readOnly,\n additionalInfo,\n value: valueProp = '',\n onChange,\n onBlur,\n onFocus,\n onResolveSuggestion,\n currencyISOCode,\n showDecimal = true,\n showGroupSeparators = true,\n min = Number.MIN_SAFE_INTEGER,\n max = Number.MAX_SAFE_INTEGER,\n step = 1,\n alwaysShowISOCode = false,\n maximumFractionDigits = 0,\n ...restProps\n } = props;\n\n const descriptionId = useUID();\n const testIds = useTestIds(testId, getCurrencyInputTestIds);\n\n const { locale } = useConfiguration();\n\n const t = useI18n();\n const inputRef = useConsolidatedRef(ref);\n\n const validCurrencyISOCode = useMemo(\n () => (currencyISOCode && isValidCurrency(currencyISOCode) ? currencyISOCode : undefined),\n [currencyISOCode]\n );\n\n const minimumFractionDigits = useMemo(\n () => getCurrencyMinimumFractionDigits(locale, validCurrencyISOCode),\n [locale, validCurrencyISOCode]\n );\n\n const numberOfDecimals = showDecimal\n ? Math.max(maximumFractionDigits, minimumFractionDigits)\n : 0;\n\n const decimalSign = useMemo(() => getDecimalSign(locale), [locale]);\n\n // on initial render only pad the value with 0 if necessary\n const rendered = usePrevious(true);\n let value = valueProp;\n if (!rendered && validCurrencyISOCode && !Number.isNaN(parseFloat(value))) {\n const [integer, fraction = ''] = value.split('.');\n value = `${integer}.${fraction.padEnd(numberOfDecimals, '0')}`;\n }\n\n const formatValue = useCallback(\n number => {\n return getFormattedValue(number, locale, validCurrencyISOCode, {\n showGroupSeparators,\n showAs: alwaysShowISOCode ? 'code' : 'symbol',\n numberOfDecimals\n });\n },\n [alwaysShowISOCode, numberOfDecimals, showGroupSeparators, locale, validCurrencyISOCode]\n );\n\n const onInputChange = (e: ChangeEvent<HTMLInputElement>) => {\n const inputValue = e.target.value;\n const cleanedInputValue = getCleanedValue(inputValue, decimalSign, numberOfDecimals);\n if (cleanedInputValue === value) return;\n onChange(cleanedInputValue);\n };\n\n const onKeyDown = (e: KeyboardEvent<HTMLInputElement>) => {\n if (readOnly) return;\n const input = e.currentTarget;\n switch (e.key) {\n case 'ArrowUp':\n e.preventDefault();\n onChange(getIncrementedValue(value, min, max, step));\n break;\n case 'ArrowDown':\n e.preventDefault();\n onChange(getDecrementedValue(value, min, max, step));\n break;\n case decimalSign:\n if (!showDecimal) e.preventDefault();\n if (input.value.includes(decimalSign)) {\n if (input.selectionStart && input.value.charAt(input.selectionStart) === decimalSign) {\n input.setSelectionRange(input.selectionStart + 1, input.selectionStart + 1);\n }\n e.preventDefault();\n } else if (\n input.selectionStart !== null &&\n !input.value.charAt(input.selectionStart - 1).match(/\\d/)\n ) {\n onChange(\n getCleanedValue(`${input.value}0${decimalSign}`, decimalSign, numberOfDecimals)\n );\n e.preventDefault();\n }\n break;\n case '-':\n if (value.startsWith('-')) e.preventDefault();\n break;\n default:\n }\n };\n\n const onInputFocusEvent = (e: FocusEvent<HTMLInputElement>) => {\n let parsableValue = value;\n if (validCurrencyISOCode && !Number.isNaN(parseFloat(value))) {\n const [integer, fraction = ''] = value.split('.');\n parsableValue = `${integer}.${fraction.padEnd(numberOfDecimals, '0')}`;\n }\n\n if (e.type === 'focus') onFocus?.(parsableValue);\n else {\n if (parsableValue !== value) {\n onChange(parsableValue);\n }\n\n onBlur?.(parsableValue);\n }\n };\n\n const formattedValue = useInputFormatter(inputRef, value, formatValue, `\\\\p{N}${decimalSign}-`);\n\n const Comp = (\n <>\n <Input\n data-testid={testIds.control}\n onChange={onInputChange}\n id={id}\n readOnly={readOnly}\n required={required}\n disabled={disabled}\n status={status}\n {...restProps}\n hasSuggestion={status === 'pending' && !!onResolveSuggestion}\n inputMode='numeric'\n ref={inputRef}\n value={formattedValue}\n onKeyDown={onKeyDown}\n onFocus={onInputFocusEvent}\n onBlur={onInputFocusEvent}\n aria-describedby={validCurrencyISOCode ? descriptionId : undefined}\n maxLength={16}\n />\n {validCurrencyISOCode && (\n <VisuallyHiddenText id={descriptionId} aria-hidden>\n {t('measured_in', [validCurrencyISOCode])}\n </VisuallyHiddenText>\n )}\n </>\n );\n\n return label ? (\n <FormField\n testId={testIds}\n label={label}\n labelHidden={labelHidden}\n id={id}\n info={info}\n status={status}\n required={required}\n disabled={disabled}\n additionalInfo={additionalInfo}\n onResolveSuggestion={onResolveSuggestion}\n >\n {Comp}\n </FormField>\n ) : (\n Comp\n );\n }\n);\n\nexport default withTestIds(CurrencyInput, getCurrencyInputTestIds);\n"]}
1
+ {"version":3,"file":"CurrencyInput.js","sourceRoot":"","sources":["../../../src/components/Currency/CurrencyInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AASzD,OAAO,kBAAkB,MAAM,uBAAuB,CAAC;AACvD,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,OAAO,EACP,iBAAiB,EACjB,WAAW,EACX,UAAU,EACV,MAAM,EACP,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,eAAe,EACf,cAAc,EACd,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,MAAM,UAAU,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG1C,OAAO,EAAE,gCAAgC,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/F,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAE9D,MAAM,aAAa,GAAyD,UAAU,CACpF,SAAS,aAAa,CACpB,KAA0C,EAC1C,GAA8B;IAE9B,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC;IACrB,MAAM,EACJ,MAAM,EACN,EAAE,GAAG,GAAG,EACR,MAAM,EACN,KAAK,EACL,WAAW,EACX,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,cAAc,EACd,KAAK,EAAE,SAAS,GAAG,EAAE,EACrB,QAAQ,EACR,MAAM,EACN,OAAO,EACP,mBAAmB,EACnB,eAAe,EACf,WAAW,GAAG,IAAI,EAClB,mBAAmB,GAAG,IAAI,EAC1B,GAAG,GAAG,MAAM,CAAC,gBAAgB,EAC7B,GAAG,GAAG,MAAM,CAAC,gBAAgB,EAC7B,IAAI,GAAG,CAAC,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ACf,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,cAAc,EAAE,cAAc,EAC9B,mBAAmB,EAAE,mBAAmB,YAEvC,IAAI,GACK,CACb,CAAC,CAAC,CAAC,CACF,IAAI,CACL,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC,aAAa,EAAE,uBAAuB,CAAC,CAAC","sourcesContent":["import { forwardRef, useCallback, useMemo } from 'react';\nimport type {\n FunctionComponent,\n PropsWithoutRef,\n KeyboardEvent,\n ChangeEvent,\n FocusEvent\n} from 'react';\n\nimport VisuallyHiddenText from '../VisuallyHiddenText';\nimport FormField from '../FormField';\nimport type { ForwardProps } from '../../types';\nimport {\n useConfiguration,\n useConsolidatedRef,\n useI18n,\n useInputFormatter,\n usePrevious,\n useTestIds,\n useUID\n} from '../../hooks';\nimport {\n getCleanedValue,\n getDecimalSign,\n getDecrementedValue,\n getIncrementedValue\n} from '../Number/utils';\nimport Input from '../Input';\nimport { withTestIds } from '../../utils';\n\nimport type CurrencyInputProps from './CurrencyInput.types';\nimport { getCurrencyMinimumFractionDigits, getFormattedValue, isValidCurrency } from './utils';\nimport { getCurrencyInputTestIds } from './Currency.test-ids';\n\nconst CurrencyInput: FunctionComponent<CurrencyInputProps & ForwardProps> = forwardRef(\n function CurrencyInput(\n props: PropsWithoutRef<CurrencyInputProps>,\n ref: CurrencyInputProps['ref']\n ) {\n const uid = useUID();\n const {\n testId,\n id = uid,\n status,\n label,\n labelHidden,\n info,\n required,\n disabled,\n readOnly,\n additionalInfo,\n value: valueProp = '',\n onChange,\n onBlur,\n onFocus,\n onResolveSuggestion,\n currencyISOCode,\n showDecimal = true,\n showGroupSeparators = true,\n min = Number.MIN_SAFE_INTEGER,\n max = Number.MAX_SAFE_INTEGER,\n step = 1,\n alwaysShowISOCode = false,\n maximumFractionDigits = 0,\n ...restProps\n } = props;\n\n const descriptionId = useUID();\n const testIds = useTestIds(testId, getCurrencyInputTestIds);\n\n const { locale } = useConfiguration();\n\n const t = useI18n();\n const inputRef = useConsolidatedRef(ref);\n\n const validCurrencyISOCode = useMemo(\n () => (currencyISOCode && isValidCurrency(currencyISOCode) ? currencyISOCode : undefined),\n [currencyISOCode]\n );\n\n const minimumFractionDigits = useMemo(\n () => getCurrencyMinimumFractionDigits(locale, validCurrencyISOCode),\n [locale, validCurrencyISOCode]\n );\n\n const numberOfDecimals = showDecimal\n ? Math.max(maximumFractionDigits, minimumFractionDigits)\n : 0;\n\n const decimalSign = useMemo(() => getDecimalSign(locale), [locale]);\n\n // on initial render only pad the value with 0 if necessary\n const rendered = usePrevious(true);\n let value = valueProp;\n if (!rendered && validCurrencyISOCode && !Number.isNaN(parseFloat(value))) {\n const [integer, fraction = ''] = value.split('.');\n value = `${integer}.${fraction.padEnd(numberOfDecimals, '0')}`;\n }\n\n const formatValue = useCallback(\n number => {\n return getFormattedValue(number, locale, validCurrencyISOCode, {\n showGroupSeparators,\n showAs: alwaysShowISOCode ? 'code' : 'symbol',\n numberOfDecimals\n });\n },\n [alwaysShowISOCode, numberOfDecimals, showGroupSeparators, locale, validCurrencyISOCode]\n );\n\n const onInputChange = (e: ChangeEvent<HTMLInputElement>) => {\n const inputValue = e.target.value;\n const cleanedInputValue = getCleanedValue(inputValue, decimalSign, numberOfDecimals);\n if (cleanedInputValue === value) return;\n onChange(cleanedInputValue);\n };\n\n const onKeyDown = (e: KeyboardEvent<HTMLInputElement>) => {\n if (readOnly) return;\n const input = e.currentTarget;\n switch (e.key) {\n case 'ArrowUp':\n e.preventDefault();\n onChange(getIncrementedValue(value, min, max, step));\n break;\n case 'ArrowDown':\n e.preventDefault();\n onChange(getDecrementedValue(value, min, max, step));\n break;\n case decimalSign:\n if (!showDecimal) e.preventDefault();\n if (input.value.includes(decimalSign)) {\n if (input.selectionStart && input.value.charAt(input.selectionStart) === decimalSign) {\n input.setSelectionRange(input.selectionStart + 1, input.selectionStart + 1);\n }\n e.preventDefault();\n } else if (\n input.selectionStart !== null &&\n !input.value.charAt(input.selectionStart - 1).match(/\\d/)\n ) {\n onChange(\n getCleanedValue(`${input.value}0${decimalSign}`, decimalSign, numberOfDecimals)\n );\n e.preventDefault();\n }\n break;\n case '-':\n if (value.startsWith('-')) e.preventDefault();\n break;\n default:\n }\n };\n\n const onInputFocusEvent = (e: FocusEvent<HTMLInputElement>) => {\n let parsableValue = value;\n if (validCurrencyISOCode && !Number.isNaN(parseFloat(value))) {\n const [integer, fraction = ''] = value.split('.');\n parsableValue = `${integer}.${fraction.padEnd(numberOfDecimals, '0')}`;\n }\n\n if (e.type === 'focus') onFocus?.(parsableValue);\n else {\n if (parsableValue !== value) {\n onChange(parsableValue);\n }\n\n onBlur?.(parsableValue);\n }\n };\n\n const formattedValue = useInputFormatter(inputRef, value, formatValue, `\\\\p{N}${decimalSign}-`);\n\n const Comp = (\n <>\n <Input\n data-testid={testIds.control}\n onChange={onInputChange}\n id={id}\n readOnly={readOnly}\n required={required}\n disabled={disabled}\n status={status}\n {...restProps}\n hasSuggestion={status === 'pending' && !!onResolveSuggestion}\n inputMode='numeric'\n ref={inputRef}\n value={formattedValue}\n onKeyDown={onKeyDown}\n onFocus={onInputFocusEvent}\n onBlur={onInputFocusEvent}\n aria-describedby={validCurrencyISOCode ? descriptionId : undefined}\n maxLength={16}\n />\n {validCurrencyISOCode && (\n <VisuallyHiddenText id={descriptionId} aria-hidden>\n {t('measured_in', [validCurrencyISOCode])}\n </VisuallyHiddenText>\n )}\n </>\n );\n\n return label ? (\n <FormField\n testId={testIds}\n label={label}\n labelHidden={labelHidden}\n id={id}\n info={info}\n status={status}\n required={required}\n disabled={disabled}\n additionalInfo={additionalInfo}\n onResolveSuggestion={onResolveSuggestion}\n >\n {Comp}\n </FormField>\n ) : (\n Comp\n );\n }\n);\n\nexport default withTestIds(CurrencyInput, getCurrencyInputTestIds);\n"]}
@@ -1,4 +1,4 @@
1
- import { NoChildrenProp, OmitStrict, TestIdProp } from '../../types';
1
+ import type { NoChildrenProp, OmitStrict, TestIdProp } from '../../types';
2
2
  import type { NumberInputProps } from '../Number/NumberInput.types';
3
3
  export default interface CurrencyInputProps extends OmitStrict<NumberInputProps, 'numberOfDecimals'>, NoChildrenProp, TestIdProp {
4
4
  /** Callback fired when the component gets focus */
@@ -1 +1 @@
1
- {"version":3,"file":"CurrencyInput.types.d.ts","sourceRoot":"","sources":["../../../src/components/Currency/CurrencyInput.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAEpE,MAAM,CAAC,OAAO,WAAW,kBACvB,SAAQ,UAAU,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,EACtD,cAAc,EACd,UAAU;IACZ,mDAAmD;IACnD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,qDAAqD;IACrD,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,6GAA6G;IAC7G,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,0CAA0C;IAC1C,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,+CAA+C;IAC/C,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC"}
1
+ {"version":3,"file":"CurrencyInput.types.d.ts","sourceRoot":"","sources":["../../../src/components/Currency/CurrencyInput.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAEpE,MAAM,CAAC,OAAO,WAAW,kBACvB,SAAQ,UAAU,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,EACtD,cAAc,EACd,UAAU;IACZ,mDAAmD;IACnD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,qDAAqD;IACrD,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,6GAA6G;IAC7G,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,0CAA0C;IAC1C,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,+CAA+C;IAC/C,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC"}
@@ -1 +1 @@
1
- {"version":3,"file":"CurrencyInput.types.js","sourceRoot":"","sources":["../../../src/components/Currency/CurrencyInput.types.ts"],"names":[],"mappings":"","sourcesContent":["import { NoChildrenProp, OmitStrict, TestIdProp } from '../../types';\nimport type { NumberInputProps } from '../Number/NumberInput.types';\n\nexport default interface CurrencyInputProps\n extends OmitStrict<NumberInputProps, 'numberOfDecimals'>,\n NoChildrenProp,\n TestIdProp {\n /** Callback fired when the component gets focus */\n onFocus?: (value: string) => void;\n /** Callback fired when the component loses focus. */\n onBlur?: (value: string) => void;\n /** Three letter currency shorthand ISO code. If not provided or invalid, component renders as NumberInput */\n currencyISOCode?: string;\n /** Always show ISO code\n * @default false\n */\n alwaysShowISOCode?: boolean;\n /** Fraction digits consistent with ISO */\n minimumFractionDigits?: number;\n /** Fixed number of maximum fraction digits. */\n maximumFractionDigits?: number;\n}\n"]}
1
+ {"version":3,"file":"CurrencyInput.types.js","sourceRoot":"","sources":["../../../src/components/Currency/CurrencyInput.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { NoChildrenProp, OmitStrict, TestIdProp } from '../../types';\nimport type { NumberInputProps } from '../Number/NumberInput.types';\n\nexport default interface CurrencyInputProps\n extends OmitStrict<NumberInputProps, 'numberOfDecimals'>,\n NoChildrenProp,\n TestIdProp {\n /** Callback fired when the component gets focus */\n onFocus?: (value: string) => void;\n /** Callback fired when the component loses focus. */\n onBlur?: (value: string) => void;\n /** Three letter currency shorthand ISO code. If not provided or invalid, component renders as NumberInput */\n currencyISOCode?: string;\n /** Always show ISO code\n * @default false\n */\n alwaysShowISOCode?: boolean;\n /** Fraction digits consistent with ISO */\n minimumFractionDigits?: number;\n /** Fixed number of maximum fraction digits. */\n maximumFractionDigits?: number;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"DangerButton.d.ts","sourceRoot":"","sources":["../../../src/components/DangerButton/DangerButton.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAc,cAAc,EAAE,MAAM,aAAa,CAAC;AAK9E,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAC5C,QAAQ,EACR,cAAc,GAAG;IACf,mCAAmC;IACnC,KAAK,EAAE,WAAW,CAAC,iBAAiB,CAAC,aAAa,CAAC,CAAC,CAAC;IACrD;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CACF,CAAC;AAEF,eAAO,MAAM,kBAAkB,2MAAmB,CAAC;;AAInD,wBAoBE"}
1
+ {"version":3,"file":"DangerButton.d.ts","sourceRoot":"","sources":["../../../src/components/DangerButton/DangerButton.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAc,cAAc,EAAE,MAAM,aAAa,CAAC;AAK9E,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAC5C,QAAQ,EACR,cAAc,GAAG;IACf,mCAAmC;IACnC,KAAK,EAAE,WAAW,CAAC,iBAAiB,CAAC,aAAa,CAAC,CAAC,CAAC;IACrD;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CACF,CAAC;AAEF,eAAO,MAAM,kBAAkB,2MAAmB,CAAC;;AAInD,wBAoBE"}
@@ -1 +1 @@
1
- {"version":3,"file":"DangerButton.js","sourceRoot":"","sources":["../../../src/components/DangerButton/DangerButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAmB,MAAM,OAAO,CAAC;AACpD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAevC,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,CAAC,CAAA,EAAE,CAAC;AAEnD,kBAAkB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEnD,eAAe,UAAU,CACvB,SAAS,YAAY,CAAC,EAAE,KAAK,EAAE,OAAO,GAAG,KAAK,EAAE,GAAG,SAAS,EAAE,EAAE,GAAG;IACjE,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IAEzB,OAAO,CACL,KAAC,aAAa,IACZ,KAAK,EAAE;YACL,IAAI,EAAE;gBACJ,OAAO,EAAE;oBACP,WAAW,EAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM;iBACvC;aACF;SACF,YAED,KAAC,kBAAkB,OAAK,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,EAAE,GAAG,EAAE,GAAG,YAClF,KAAK,GACa,GACP,CACjB,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["import { forwardRef, PropsWithoutRef } from 'react';\nimport styled from 'styled-components';\n\nimport { defaultThemeProp } from '../../theme';\nimport type { NoChildrenProp, RefElement, WithAttributes } from '../../types';\nimport Button from '../Button';\nimport Configuration from '../Configuration';\nimport { useTheme } from '../../hooks';\n\nexport type DangerButtonProps = WithAttributes<\n 'button',\n NoChildrenProp & {\n /** Text content for the button. */\n label: NonNullable<HTMLButtonElement['textContent']>;\n /**\n * Elevates emphasis for button style.\n * @default false\n */\n primary?: boolean;\n }\n>;\n\nexport const StyledDangerButton = styled(Button)``;\n\nStyledDangerButton.defaultProps = defaultThemeProp;\n\nexport default forwardRef<RefElement<DangerButtonProps>, PropsWithoutRef<DangerButtonProps>>(\n function DangerButton({ label, primary = false, ...restProps }, ref) {\n const theme = useTheme();\n\n return (\n <Configuration\n theme={{\n base: {\n palette: {\n interactive: theme.base.palette.urgent\n }\n }\n }}\n >\n <StyledDangerButton {...restProps} variant={primary ? 'primary' : undefined} ref={ref}>\n {label}\n </StyledDangerButton>\n </Configuration>\n );\n }\n);\n"]}
1
+ {"version":3,"file":"DangerButton.js","sourceRoot":"","sources":["../../../src/components/DangerButton/DangerButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAevC,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,CAAC,CAAA,EAAE,CAAC;AAEnD,kBAAkB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEnD,eAAe,UAAU,CACvB,SAAS,YAAY,CAAC,EAAE,KAAK,EAAE,OAAO,GAAG,KAAK,EAAE,GAAG,SAAS,EAAE,EAAE,GAAG;IACjE,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IAEzB,OAAO,CACL,KAAC,aAAa,IACZ,KAAK,EAAE;YACL,IAAI,EAAE;gBACJ,OAAO,EAAE;oBACP,WAAW,EAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM;iBACvC;aACF;SACF,YAED,KAAC,kBAAkB,OAAK,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,EAAE,GAAG,EAAE,GAAG,YAClF,KAAK,GACa,GACP,CACjB,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { PropsWithoutRef } from 'react';\nimport styled from 'styled-components';\n\nimport { defaultThemeProp } from '../../theme';\nimport type { NoChildrenProp, RefElement, WithAttributes } from '../../types';\nimport Button from '../Button';\nimport Configuration from '../Configuration';\nimport { useTheme } from '../../hooks';\n\nexport type DangerButtonProps = WithAttributes<\n 'button',\n NoChildrenProp & {\n /** Text content for the button. */\n label: NonNullable<HTMLButtonElement['textContent']>;\n /**\n * Elevates emphasis for button style.\n * @default false\n */\n primary?: boolean;\n }\n>;\n\nexport const StyledDangerButton = styled(Button)``;\n\nStyledDangerButton.defaultProps = defaultThemeProp;\n\nexport default forwardRef<RefElement<DangerButtonProps>, PropsWithoutRef<DangerButtonProps>>(\n function DangerButton({ label, primary = false, ...restProps }, ref) {\n const theme = useTheme();\n\n return (\n <Configuration\n theme={{\n base: {\n palette: {\n interactive: theme.base.palette.urgent\n }\n }\n }}\n >\n <StyledDangerButton {...restProps} variant={primary ? 'primary' : undefined} ref={ref}>\n {label}\n </StyledDangerButton>\n </Configuration>\n );\n }\n);\n"]}
@@ -1,6 +1,6 @@
1
- import { Ref } from 'react';
2
- import { NoChildrenProp, TestIdProp } from '../../types';
3
- import { FormControlProps, HandleValue } from '../FormControl';
1
+ import type { Ref } from 'react';
2
+ import type { NoChildrenProp, TestIdProp } from '../../types';
3
+ import type { FormControlProps, HandleValue } from '../FormControl';
4
4
  export interface DateTimeProperties extends TestIdProp {
5
5
  /** Date as ISO8601 string, timestamp or native Date object. Defines minimum available value that can be set by the user. */
6
6
  min?: string | number | Date;
@@ -1 +1 @@
1
- {"version":3,"file":"DateTime.types.d.ts","sourceRoot":"","sources":["../../../src/components/Date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AE/D,MAAM,MAAM,yBAAyB,GAAG;IACtC,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,KAAK,CAAC,EAAE,uBAAuB,CAAC;CACjC,CAAC;AAEF,MAAM,WAAW,iBAAiB;IAChC,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;IACtD,sDAAsD;IACtD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;IACrD,qDAAqD;IACrD,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;IACpD,6DAA6D;IAC7D,mBAAmB,CAAC,EAAE,gBAAgB,CAAC,qBAAqB,CAAC,CAAC;CAC/D;AAED,MAAM,CAAC,OAAO,WAAW,aACvB,SAAQ,kBAAkB,EACxB,iBAAiB,EACjB,cAAc;IAChB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;CAChC;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC,KAAK,EAAE,yBAAyB,CAAC;IACjC,GAAG,EAAE,yBAAyB,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,eAAe,GACvB,MAAM,GACN,UAAU,GACV,MAAM,GACN,MAAM,GACN,OAAO,GACP,MAAM,GACN,WAAW,GACX,aAAa,CAAC;AAClB,MAAM,MAAM,eAAe,GAAG,eAAe,GAAG,UAAU,CAAC;AAC3D,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC"}
1
+ {"version":3,"file":"DateTime.types.d.ts","sourceRoot":"","sources":["../../../src/components/DateTime/DateTime.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,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,CAAC;IACrC,KAAK,CAAC,EAAE,uBAAuB,CAAC;CACjC,CAAC;AAEF,MAAM,WAAW,iBAAiB;IAChC,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;IACtD,sDAAsD;IACtD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;IACrD,qDAAqD;IACrD,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;IACpD,6DAA6D;IAC7D,mBAAmB,CAAC,EAAE,gBAAgB,CAAC,qBAAqB,CAAC,CAAC;CAC/D;AAED,MAAM,CAAC,OAAO,WAAW,aACvB,SAAQ,kBAAkB,EACxB,iBAAiB,EACjB,cAAc;IAChB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;CAChC;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC,KAAK,EAAE,yBAAyB,CAAC;IACjC,GAAG,EAAE,yBAAyB,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,eAAe,GACvB,MAAM,GACN,UAAU,GACV,MAAM,GACN,MAAM,GACN,OAAO,GACP,MAAM,GACN,WAAW,GACX,aAAa,CAAC;AAClB,MAAM,MAAM,eAAe,GAAG,eAAe,GAAG,UAAU,CAAC;AAC3D,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"DateTime.types.js","sourceRoot":"","sources":["../../../src/components/DateTime/DateTime.types.ts"],"names":[],"mappings":"","sourcesContent":["import { Ref } from 'react';\n\nimport { NoChildrenProp, TestIdProp } from '../../types';\nimport { FormControlProps, HandleValue } from '../FormControl';\n\nexport interface DateTimeProperties extends TestIdProp {\n /** Date as ISO8601 string, timestamp or native Date object. Defines minimum available value that can be set by the user. */\n min?: string | number | Date;\n /** Date as ISO8601 string, timestamp or native Date object. Defines maximum available value that can be set by the user. */\n max?: string | number | Date;\n /**\n * Sets DOM id for the control and associates label element via 'for' attribute.\n * If an id is not pass, a random id will be generated for any render.\n */\n id?: FormControlProps['id'];\n /** Set visual state based on a validation state. */\n status?: FormControlProps['status'];\n /** Pass a string or a fragment with an Icon and string. */\n label?: FormControlProps['label'];\n /** Visually hides the label region. */\n labelHidden?: FormControlProps['labelHidden'];\n /** It is recommended to pass a simple string to offer guidance. Text will be styled based on status prop. */\n info?: FormControlProps['info'];\n /** Indicate if the field is required. The browser defaults to false. */\n required?: FormControlProps['required'];\n /** Disable the control. The browser defaults to false. */\n disabled?: FormControlProps['disabled'];\n /** Makes the input non editable and non clickable. The browser defaults to false. */\n readOnly?: FormControlProps['readOnly'];\n /** Sets html name attribute for the underlying control. Useful for mapping to a data field. */\n name?: FormControlProps['name'];\n /** Automatically focuses the input on render. */\n autoFocus?: boolean;\n /** Imperative handle */\n handle?: Ref<HandleValue>;\n}\n\nexport type DateTimeValueErrorState = 'incomplete' | 'invalid';\n\nexport type DateTimeCallbackParameter = {\n valueAsISOString: string | undefined;\n valueAsTimestamp: number | undefined;\n state?: DateTimeValueErrorState;\n};\n\nexport interface DateTimeCallbacks {\n /** Callback fired when input value changes. */\n onChange?: (value: DateTimeCallbackParameter) => void;\n /** Callback fired when the component gets focused. */\n onFocus?: (value: DateTimeCallbackParameter) => void;\n /** Callback fired when the component loses focus. */\n onBlur?: (value: DateTimeCallbackParameter) => void;\n /** Callback fired when AI suggestion is accepted/rejected */\n onResolveSuggestion?: FormControlProps['onResolveSuggestion'];\n}\n\nexport default interface DateTimeProps\n extends DateTimeProperties,\n DateTimeCallbacks,\n NoChildrenProp {\n /**\n * Date as ISO8601 string, timestamp or native Date object.\n * Requires onChange prop to update value for controlled inputs.\n */\n value?: string | number | Date;\n}\n\nexport type DateRangeCallbackParameter = {\n start: DateTimeCallbackParameter;\n end: DateTimeCallbackParameter;\n};\n\nexport type AbsoluteVariant =\n | 'date'\n | 'datetime'\n | 'time'\n | 'week'\n | 'month'\n | 'year'\n | 'monthyear'\n | 'quarteryear';\nexport type DateTimeVariant = AbsoluteVariant | 'relative';\nexport type DateTimeFormat = 'short' | 'long' | 'numeric';\n"]}
1
+ {"version":3,"file":"DateTime.types.js","sourceRoot":"","sources":["../../../src/components/DateTime/DateTime.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Ref } from 'react';\n\nimport type { NoChildrenProp, TestIdProp } from '../../types';\nimport type { FormControlProps, HandleValue } from '../FormControl';\n\nexport interface DateTimeProperties extends TestIdProp {\n /** Date as ISO8601 string, timestamp or native Date object. Defines minimum available value that can be set by the user. */\n min?: string | number | Date;\n /** Date as ISO8601 string, timestamp or native Date object. Defines maximum available value that can be set by the user. */\n max?: string | number | Date;\n /**\n * Sets DOM id for the control and associates label element via 'for' attribute.\n * If an id is not pass, a random id will be generated for any render.\n */\n id?: FormControlProps['id'];\n /** Set visual state based on a validation state. */\n status?: FormControlProps['status'];\n /** Pass a string or a fragment with an Icon and string. */\n label?: FormControlProps['label'];\n /** Visually hides the label region. */\n labelHidden?: FormControlProps['labelHidden'];\n /** It is recommended to pass a simple string to offer guidance. Text will be styled based on status prop. */\n info?: FormControlProps['info'];\n /** Indicate if the field is required. The browser defaults to false. */\n required?: FormControlProps['required'];\n /** Disable the control. The browser defaults to false. */\n disabled?: FormControlProps['disabled'];\n /** Makes the input non editable and non clickable. The browser defaults to false. */\n readOnly?: FormControlProps['readOnly'];\n /** Sets html name attribute for the underlying control. Useful for mapping to a data field. */\n name?: FormControlProps['name'];\n /** Automatically focuses the input on render. */\n autoFocus?: boolean;\n /** Imperative handle */\n handle?: Ref<HandleValue>;\n}\n\nexport type DateTimeValueErrorState = 'incomplete' | 'invalid';\n\nexport type DateTimeCallbackParameter = {\n valueAsISOString: string | undefined;\n valueAsTimestamp: number | undefined;\n state?: DateTimeValueErrorState;\n};\n\nexport interface DateTimeCallbacks {\n /** Callback fired when input value changes. */\n onChange?: (value: DateTimeCallbackParameter) => void;\n /** Callback fired when the component gets focused. */\n onFocus?: (value: DateTimeCallbackParameter) => void;\n /** Callback fired when the component loses focus. */\n onBlur?: (value: DateTimeCallbackParameter) => void;\n /** Callback fired when AI suggestion is accepted/rejected */\n onResolveSuggestion?: FormControlProps['onResolveSuggestion'];\n}\n\nexport default interface DateTimeProps\n extends DateTimeProperties,\n DateTimeCallbacks,\n NoChildrenProp {\n /**\n * Date as ISO8601 string, timestamp or native Date object.\n * Requires onChange prop to update value for controlled inputs.\n */\n value?: string | number | Date;\n}\n\nexport type DateRangeCallbackParameter = {\n start: DateTimeCallbackParameter;\n end: DateTimeCallbackParameter;\n};\n\nexport type AbsoluteVariant =\n | 'date'\n | 'datetime'\n | 'time'\n | 'week'\n | 'month'\n | 'year'\n | 'monthyear'\n | 'quarteryear';\nexport type DateTimeVariant = AbsoluteVariant | 'relative';\nexport type DateTimeFormat = 'short' | 'long' | 'numeric';\n"]}
@@ -1,7 +1,7 @@
1
- import { FunctionComponent, Ref } from 'react';
2
- import { BaseProps, ForwardProps } from '../../types';
3
- import { DateTimeFormat, DateTimeVariant } from './DateTime.types';
4
- import { ClockFormat } from './Input/utils';
1
+ import type { FunctionComponent, Ref } from 'react';
2
+ import type { BaseProps, ForwardProps } from '../../types';
3
+ import type { DateTimeFormat, DateTimeVariant } from './DateTime.types';
4
+ import type { ClockFormat } from './Input/utils';
5
5
  export interface DateTimeDisplayProps extends BaseProps {
6
6
  /** Date as ISO8601 string, timestamp or native Date object. */
7
7
  value?: Date | string | number;
@@ -1 +1 @@
1
- {"version":3,"file":"DateTimeDisplay.d.ts","sourceRoot":"","sources":["../../../src/components/DateTime/DateTimeDisplay.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAAmB,GAAG,EAAE,MAAM,OAAO,CAAC;AAG5E,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAItD,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,kBA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EAAE,KAAK;SAChB,CAAC,CACH,CAAC,CAAC,CAAC,CACF,KAAC,OAAO,KAAG,CACZ,GACqB,CACzB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["import { forwardRef, FunctionComponent, PropsWithoutRef, Ref } from 'react';\nimport styled from 'styled-components';\n\nimport { BaseProps, ForwardProps } from '../../types';\nimport { useConfiguration, useI18n } from '../../hooks';\nimport NoValue from '../NoValue/NoValue';\n\nimport { DateTimeFormat, DateTimeVariant } from './DateTime.types';\nimport { ClockFormat, parseToDate } from './Input/utils';\nimport { isValidDate } from './Picker/utils';\nimport { formatDateTime } from './utils';\n\nexport interface DateTimeDisplayProps extends BaseProps {\n /** Date as ISO8601 string, timestamp or native Date object. */\n value?: Date | string | number;\n /** Controls date time variant. */\n variant: DateTimeVariant;\n /**\n * Controls display format.\n * @default 'short'\n */\n format?: DateTimeFormat;\n /** Defines clock format that overrides locale based format */\n clockFormat?: ClockFormat;\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLSpanElement>;\n}\n\nexport const StyledDateTimeDisplay = styled.span``;\n\nconst DateTimeDisplay: FunctionComponent<DateTimeDisplayProps & ForwardProps> = forwardRef(\n function DateTimeDisplay(\n {\n value,\n variant,\n format = 'short',\n clockFormat,\n ...restProps\n }: PropsWithoutRef<DateTimeDisplayProps>,\n ref: DateTimeDisplayProps['ref']\n ) {\n const { locale } = useConfiguration();\n const t = useI18n();\n\n return (\n <StyledDateTimeDisplay ref={ref} {...restProps}>\n {(value || value === 0) && isValidDate(parseToDate(value)) ? (\n formatDateTime(parseToDate(value), {\n t,\n locale,\n format,\n variant,\n clockFormat,\n timeZone: 'UTC'\n })\n ) : (\n <NoValue />\n )}\n </StyledDateTimeDisplay>\n );\n }\n);\n\nexport default DateTimeDisplay;\n"]}
1
+ {"version":3,"file":"DateTimeDisplay.js","sourceRoot":"","sources":["../../../src/components/DateTime/DateTimeDisplay.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAGvC,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,OAAO,MAAM,oBAAoB,CAAC;AAGzC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAkBzC,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,IAAI,CAAA,EAAE,CAAC;AAEnD,MAAM,eAAe,GAA2D,UAAU,CACxF,SAAS,eAAe,CACtB,EACE,KAAK,EACL,OAAO,EACP,MAAM,GAAG,OAAO,EAChB,WAAW,EACX,GAAG,SAAS,EAC0B,EACxC,GAAgC;IAEhC,MAAM,EAAE,MAAM,EAAE,GAAG,gBAAgB,EAAE,CAAC;IACtC,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;IAEpB,OAAO,CACL,KAAC,qBAAqB,IAAC,GAAG,EAAE,GAAG,KAAM,SAAS,YAC3C,CAAC,KAAK,IAAI,KAAK,KAAK,CAAC,CAAC,IAAI,WAAW,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAC3D,cAAc,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE;YACjC,CAAC;YACD,MAAM;YACN,MAAM;YACN,OAAO;YACP,WAAW;YACX,QAAQ,EAAE,KAAK;SAChB,CAAC,CACH,CAAC,CAAC,CAAC,CACF,KAAC,OAAO,KAAG,CACZ,GACqB,CACzB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { FunctionComponent, PropsWithoutRef, Ref } from 'react';\nimport styled from 'styled-components';\n\nimport type { BaseProps, ForwardProps } from '../../types';\nimport { useConfiguration, useI18n } from '../../hooks';\nimport NoValue from '../NoValue/NoValue';\n\nimport type { DateTimeFormat, DateTimeVariant } from './DateTime.types';\nimport { parseToDate } from './Input/utils';\nimport type { ClockFormat } from './Input/utils';\nimport { isValidDate } from './Picker/utils';\nimport { formatDateTime } from './utils';\n\nexport interface DateTimeDisplayProps extends BaseProps {\n /** Date as ISO8601 string, timestamp or native Date object. */\n value?: Date | string | number;\n /** Controls date time variant. */\n variant: DateTimeVariant;\n /**\n * Controls display format.\n * @default 'short'\n */\n format?: DateTimeFormat;\n /** Defines clock format that overrides locale based format */\n clockFormat?: ClockFormat;\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLSpanElement>;\n}\n\nexport const StyledDateTimeDisplay = styled.span``;\n\nconst DateTimeDisplay: FunctionComponent<DateTimeDisplayProps & ForwardProps> = forwardRef(\n function DateTimeDisplay(\n {\n value,\n variant,\n format = 'short',\n clockFormat,\n ...restProps\n }: PropsWithoutRef<DateTimeDisplayProps>,\n ref: DateTimeDisplayProps['ref']\n ) {\n const { locale } = useConfiguration();\n const t = useI18n();\n\n return (\n <StyledDateTimeDisplay ref={ref} {...restProps}>\n {(value || value === 0) && isValidDate(parseToDate(value)) ? (\n formatDateTime(parseToDate(value), {\n t,\n locale,\n format,\n variant,\n clockFormat,\n timeZone: 'UTC'\n })\n ) : (\n <NoValue />\n )}\n </StyledDateTimeDisplay>\n );\n }\n);\n\nexport default DateTimeDisplay;\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 interface DurationDisplayProps extends BaseProps {
4
4
  /** Number of milliseconds value for controlled input. */
5
5
  value?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"DurationDisplay.d.ts","sourceRoot":"","sources":["../../../src/components/DateTime/DurationDisplay.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAA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file":"DurationDisplay.js","sourceRoot":"","sources":["../../../src/components/DateTime/DurationDisplay.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAA2C,MAAM,OAAO,CAAC;AAE5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,OAAO,MAAM,oBAAoB,CAAC;AAEzC,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAiBzC,MAAM,eAAe,GAA2D,UAAU,CACxF,SAAS,eAAe,CACtB,EACE,KAAK,EACL,gBAAgB,GAAG,CAAC,EACpB,WAAW,GAAG,QAAQ,EACtB,GAAG,SAAS,EAC0B,EACxC,GAAgC;IAEhC,MAAM,EAAE,MAAM,EAAE,GAAG,gBAAgB,EAAE,CAAC;IAEtC,OAAO,CACL,KAAC,IAAI,IAAC,GAAG,EAAE,GAAG,KAAM,SAAS,YAC1B,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,CAC3B,cAAc,CAAC,KAAK,EAAE,EAAE,MAAM,EAAE,gBAAgB,EAAE,WAAW,EAAE,CAAC,CACjE,CAAC,CAAC,CAAC,CACF,KAAC,OAAO,KAAG,CACZ,GACI,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["import { forwardRef, FunctionComponent, PropsWithoutRef, Ref } from 'react';\n\nimport { useConfiguration } from '../../hooks';\nimport { BaseProps, ForwardProps } from '../../types';\nimport Text from '../Text';\nimport NoValue from '../NoValue/NoValue';\n\nimport { formatDuration } from './utils';\n\nexport interface DurationDisplayProps extends BaseProps {\n /** Number of milliseconds value for controlled input. */\n value?: number;\n /** Determines number of units to be displayed.\n * @default 4\n */\n significantUnits?: 4 | 3 | 2 | 1;\n /** Unit formatting style\n * @default \"narrow\"\n */\n unitDisplay?: Intl.NumberFormatOptions['unitDisplay'];\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLSpanElement>;\n}\n\nconst DurationDisplay: FunctionComponent<DurationDisplayProps & ForwardProps> = forwardRef(\n function DurationDisplay(\n {\n value,\n significantUnits = 4,\n unitDisplay = 'narrow',\n ...restProps\n }: PropsWithoutRef<DurationDisplayProps>,\n ref: DurationDisplayProps['ref']\n ) {\n const { locale } = useConfiguration();\n\n return (\n <Text ref={ref} {...restProps}>\n {typeof value === 'number' ? (\n formatDuration(value, { locale, significantUnits, unitDisplay })\n ) : (\n <NoValue />\n )}\n </Text>\n );\n }\n);\n\nexport default DurationDisplay;\n"]}
1
+ {"version":3,"file":"DurationDisplay.js","sourceRoot":"","sources":["../../../src/components/DateTime/DurationDisplay.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,OAAO,MAAM,oBAAoB,CAAC;AAEzC,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAiBzC,MAAM,eAAe,GAA2D,UAAU,CACxF,SAAS,eAAe,CACtB,EACE,KAAK,EACL,gBAAgB,GAAG,CAAC,EACpB,WAAW,GAAG,QAAQ,EACtB,GAAG,SAAS,EAC0B,EACxC,GAAgC;IAEhC,MAAM,EAAE,MAAM,EAAE,GAAG,gBAAgB,EAAE,CAAC;IAEtC,OAAO,CACL,KAAC,IAAI,IAAC,GAAG,EAAE,GAAG,KAAM,SAAS,YAC1B,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,CAC3B,cAAc,CAAC,KAAK,EAAE,EAAE,MAAM,EAAE,gBAAgB,EAAE,WAAW,EAAE,CAAC,CACjE,CAAC,CAAC,CAAC,CACF,KAAC,OAAO,KAAG,CACZ,GACI,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { FunctionComponent, PropsWithoutRef, Ref } from 'react';\n\nimport { useConfiguration } from '../../hooks';\nimport type { BaseProps, ForwardProps } from '../../types';\nimport Text from '../Text';\nimport NoValue from '../NoValue/NoValue';\n\nimport { formatDuration } from './utils';\n\nexport interface DurationDisplayProps extends BaseProps {\n /** Number of milliseconds value for controlled input. */\n value?: number;\n /** Determines number of units to be displayed.\n * @default 4\n */\n significantUnits?: 4 | 3 | 2 | 1;\n /** Unit formatting style\n * @default \"narrow\"\n */\n unitDisplay?: Intl.NumberFormatOptions['unitDisplay'];\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLSpanElement>;\n}\n\nconst DurationDisplay: FunctionComponent<DurationDisplayProps & ForwardProps> = forwardRef(\n function DurationDisplay(\n {\n value,\n significantUnits = 4,\n unitDisplay = 'narrow',\n ...restProps\n }: PropsWithoutRef<DurationDisplayProps>,\n ref: DurationDisplayProps['ref']\n ) {\n const { locale } = useConfiguration();\n\n return (\n <Text ref={ref} {...restProps}>\n {typeof value === 'number' ? (\n formatDuration(value, { locale, significantUnits, unitDisplay })\n ) : (\n <NoValue />\n )}\n </Text>\n );\n }\n);\n\nexport default DurationDisplay;\n"]}
@@ -1,8 +1,8 @@
1
- import { FunctionComponent, Ref, Dispatch, SetStateAction, ComponentType } from 'react';
2
- import { ForwardProps } from '../../../types';
1
+ import type { FunctionComponent, Ref, Dispatch, SetStateAction, ComponentType } from 'react';
2
+ import type { ForwardProps } from '../../../types';
3
3
  import type DatePickerProps from '../Picker/DatePicker.types';
4
- import { FormControlProps, HandleValue } from '../../FormControl';
5
- import DateTimeProps from '../DateTime.types';
4
+ import type { FormControlProps, HandleValue } from '../../FormControl';
5
+ import type DateTimeProps from '../DateTime.types';
6
6
  export interface DateInputHandleValue extends HandleValue {
7
7
  readonly value: Date | undefined;
8
8
  setOpen: Dispatch<SetStateAction<boolean>>;