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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (739) hide show
  1. package/lib/components/AIButton/AIButton.d.ts.map +1 -1
  2. package/lib/components/AIButton/AIButton.js.map +1 -1
  3. package/lib/components/Actions/Actions.d.ts +5 -2
  4. package/lib/components/Actions/Actions.d.ts.map +1 -1
  5. package/lib/components/Actions/Actions.js +3 -3
  6. package/lib/components/Actions/Actions.js.map +1 -1
  7. package/lib/components/AdditionalInfo/AdditionalInfo.d.ts +3 -3
  8. package/lib/components/AdditionalInfo/AdditionalInfo.d.ts.map +1 -1
  9. package/lib/components/AdditionalInfo/AdditionalInfo.js.map +1 -1
  10. package/lib/components/AppShell/AppHeader.d.ts +3 -3
  11. package/lib/components/AppShell/AppHeader.d.ts.map +1 -1
  12. package/lib/components/AppShell/AppHeader.js.map +1 -1
  13. package/lib/components/AppShell/AppHeader.styles.d.ts +1 -1
  14. package/lib/components/AppShell/AppHeader.styles.d.ts.map +1 -1
  15. package/lib/components/AppShell/AppHeader.styles.js.map +1 -1
  16. package/lib/components/AppShell/AppShell.d.ts +2 -2
  17. package/lib/components/AppShell/AppShell.d.ts.map +1 -1
  18. package/lib/components/AppShell/AppShell.js.map +1 -1
  19. package/lib/components/AppShell/AppShellContext.d.ts +3 -3
  20. package/lib/components/AppShell/AppShellContext.d.ts.map +1 -1
  21. package/lib/components/AppShell/AppShellContext.js.map +1 -1
  22. package/lib/components/AppShell/AppShellList.d.ts +2 -2
  23. package/lib/components/AppShell/AppShellList.d.ts.map +1 -1
  24. package/lib/components/AppShell/AppShellList.js.map +1 -1
  25. package/lib/components/AppShell/AppShellSearch.d.ts +2 -2
  26. package/lib/components/AppShell/AppShellSearch.d.ts.map +1 -1
  27. package/lib/components/AppShell/AppShellSearch.js.map +1 -1
  28. package/lib/components/AppShell/ContextSwitcher.d.ts +3 -3
  29. package/lib/components/AppShell/ContextSwitcher.d.ts.map +1 -1
  30. package/lib/components/AppShell/ContextSwitcher.js.map +1 -1
  31. package/lib/components/AppShell/Drawer.d.ts +1 -1
  32. package/lib/components/AppShell/Drawer.d.ts.map +1 -1
  33. package/lib/components/AppShell/Drawer.js.map +1 -1
  34. package/lib/components/AppShell/Drawer.styles.d.ts +1 -1
  35. package/lib/components/AppShell/Drawer.styles.d.ts.map +1 -1
  36. package/lib/components/AppShell/Drawer.styles.js.map +1 -1
  37. package/lib/components/AppShell/NavigationList.d.ts +2 -2
  38. package/lib/components/AppShell/NavigationList.d.ts.map +1 -1
  39. package/lib/components/AppShell/NavigationList.js.map +1 -1
  40. package/lib/components/AppShell/NavigationListItemWrapper.d.ts +2 -2
  41. package/lib/components/AppShell/NavigationListItemWrapper.d.ts.map +1 -1
  42. package/lib/components/AppShell/NavigationListItemWrapper.js.map +1 -1
  43. package/lib/components/AppShell/Operator.d.ts +1 -1
  44. package/lib/components/AppShell/Operator.d.ts.map +1 -1
  45. package/lib/components/AppShell/Operator.js.map +1 -1
  46. package/lib/components/AppShell/style-utils.d.ts +1 -1
  47. package/lib/components/AppShell/style-utils.d.ts.map +1 -1
  48. package/lib/components/AppShell/style-utils.js.map +1 -1
  49. package/lib/components/Avatar/Avatar.d.ts +2 -2
  50. package/lib/components/Avatar/Avatar.d.ts.map +1 -1
  51. package/lib/components/Avatar/Avatar.js.map +1 -1
  52. package/lib/components/Backdrop/Backdrop.d.ts +2 -2
  53. package/lib/components/Backdrop/Backdrop.d.ts.map +1 -1
  54. package/lib/components/Backdrop/Backdrop.js.map +1 -1
  55. package/lib/components/Badges/Alert.d.ts +1 -1
  56. package/lib/components/Badges/Alert.d.ts.map +1 -1
  57. package/lib/components/Badges/Alert.js.map +1 -1
  58. package/lib/components/Badges/Count.d.ts +1 -1
  59. package/lib/components/Badges/Count.d.ts.map +1 -1
  60. package/lib/components/Badges/Count.js.map +1 -1
  61. package/lib/components/Badges/Keyboard.d.ts +1 -1
  62. package/lib/components/Badges/Keyboard.d.ts.map +1 -1
  63. package/lib/components/Badges/Keyboard.js.map +1 -1
  64. package/lib/components/Badges/Selection.d.ts +2 -2
  65. package/lib/components/Badges/Selection.d.ts.map +1 -1
  66. package/lib/components/Badges/Selection.js.map +1 -1
  67. package/lib/components/Badges/Status.d.ts +2 -2
  68. package/lib/components/Badges/Status.d.ts.map +1 -1
  69. package/lib/components/Badges/Status.js.map +1 -1
  70. package/lib/components/Badges/Tag.d.ts +2 -2
  71. package/lib/components/Badges/Tag.d.ts.map +1 -1
  72. package/lib/components/Badges/Tag.js.map +1 -1
  73. package/lib/components/Banner/Banner.d.ts +2 -2
  74. package/lib/components/Banner/Banner.d.ts.map +1 -1
  75. package/lib/components/Banner/Banner.js.map +1 -1
  76. package/lib/components/Boolean/BooleanDisplay.d.ts +1 -1
  77. package/lib/components/Boolean/BooleanDisplay.d.ts.map +1 -1
  78. package/lib/components/Boolean/BooleanDisplay.js.map +1 -1
  79. package/lib/components/Breadcrumbs/Breadcrumbs.d.ts +4 -4
  80. package/lib/components/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
  81. package/lib/components/Breadcrumbs/Breadcrumbs.js.map +1 -1
  82. package/lib/components/Button/BareButton.d.ts +3 -3
  83. package/lib/components/Button/BareButton.d.ts.map +1 -1
  84. package/lib/components/Button/BareButton.js.map +1 -1
  85. package/lib/components/Button/BareRoleButton.d.ts +2 -2
  86. package/lib/components/Button/BareRoleButton.d.ts.map +1 -1
  87. package/lib/components/Button/BareRoleButton.js.map +1 -1
  88. package/lib/components/Button/Button.d.ts +3 -3
  89. package/lib/components/Button/Button.d.ts.map +1 -1
  90. package/lib/components/Button/Button.js.map +1 -1
  91. package/lib/components/Card/Card.d.ts +2 -2
  92. package/lib/components/Card/Card.d.ts.map +1 -1
  93. package/lib/components/Card/Card.js.map +1 -1
  94. package/lib/components/Card/CardContent.d.ts +3 -3
  95. package/lib/components/Card/CardContent.d.ts.map +1 -1
  96. package/lib/components/Card/CardContent.js.map +1 -1
  97. package/lib/components/Card/CardFooter.d.ts +3 -3
  98. package/lib/components/Card/CardFooter.d.ts.map +1 -1
  99. package/lib/components/Card/CardFooter.js.map +1 -1
  100. package/lib/components/Card/CardHeader.d.ts +2 -2
  101. package/lib/components/Card/CardHeader.d.ts.map +1 -1
  102. package/lib/components/Card/CardHeader.js.map +1 -1
  103. package/lib/components/Card/CardMedia.d.ts +2 -2
  104. package/lib/components/Card/CardMedia.d.ts.map +1 -1
  105. package/lib/components/Card/CardMedia.js.map +1 -1
  106. package/lib/components/Card/CollapsibleCard.d.ts +2 -2
  107. package/lib/components/Card/CollapsibleCard.d.ts.map +1 -1
  108. package/lib/components/Card/CollapsibleCard.js.map +1 -1
  109. package/lib/components/Checkbox/Checkbox.d.ts +4 -4
  110. package/lib/components/Checkbox/Checkbox.d.ts.map +1 -1
  111. package/lib/components/Checkbox/Checkbox.js.map +1 -1
  112. package/lib/components/ColorPicker/ColorPicker.d.ts +4 -4
  113. package/lib/components/ColorPicker/ColorPicker.d.ts.map +1 -1
  114. package/lib/components/ColorPicker/ColorPicker.js.map +1 -1
  115. package/lib/components/ComboBox/ComboBox.d.ts +1 -1
  116. package/lib/components/ComboBox/ComboBox.d.ts.map +1 -1
  117. package/lib/components/ComboBox/ComboBox.js.map +1 -1
  118. package/lib/components/ComboBox/ComboBox.types.d.ts +3 -3
  119. package/lib/components/ComboBox/ComboBox.types.d.ts.map +1 -1
  120. package/lib/components/ComboBox/ComboBox.types.js.map +1 -1
  121. package/lib/components/ComboBox/ComboBoxInput.d.ts +5 -4
  122. package/lib/components/ComboBox/ComboBoxInput.d.ts.map +1 -1
  123. package/lib/components/ComboBox/ComboBoxInput.js.map +1 -1
  124. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.d.ts +3 -3
  125. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.d.ts.map +1 -1
  126. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.js +1 -0
  127. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.js.map +1 -1
  128. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.types.d.ts +4 -4
  129. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.types.d.ts.map +1 -1
  130. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.types.js.map +1 -1
  131. package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.d.ts +3 -3
  132. package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.d.ts.map +1 -1
  133. package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.js.map +1 -1
  134. package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.types.d.ts +4 -3
  135. package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.types.d.ts.map +1 -1
  136. package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.types.js.map +1 -1
  137. package/lib/components/CompositeInput/CompositeInput.d.ts +2 -2
  138. package/lib/components/CompositeInput/CompositeInput.d.ts.map +1 -1
  139. package/lib/components/CompositeInput/CompositeInput.js.map +1 -1
  140. package/lib/components/CompositeInput/CompositeInput.types.d.ts +3 -3
  141. package/lib/components/CompositeInput/CompositeInput.types.d.ts.map +1 -1
  142. package/lib/components/CompositeInput/CompositeInput.types.js.map +1 -1
  143. package/lib/components/Configuration/Configuration.d.ts +3 -3
  144. package/lib/components/Configuration/Configuration.d.ts.map +1 -1
  145. package/lib/components/Configuration/Configuration.js.map +1 -1
  146. package/lib/components/CreditCard/CreditCard.types.d.ts +3 -3
  147. package/lib/components/CreditCard/CreditCard.types.d.ts.map +1 -1
  148. package/lib/components/CreditCard/CreditCard.types.js.map +1 -1
  149. package/lib/components/CreditCard/CreditCardDisplay.d.ts +3 -3
  150. package/lib/components/CreditCard/CreditCardDisplay.d.ts.map +1 -1
  151. package/lib/components/CreditCard/CreditCardDisplay.js.map +1 -1
  152. package/lib/components/CreditCard/CreditCardInput.d.ts +3 -3
  153. package/lib/components/CreditCard/CreditCardInput.d.ts.map +1 -1
  154. package/lib/components/CreditCard/CreditCardInput.js.map +1 -1
  155. package/lib/components/Currency/CurrencyDisplay.d.ts +2 -2
  156. package/lib/components/Currency/CurrencyDisplay.d.ts.map +1 -1
  157. package/lib/components/Currency/CurrencyDisplay.js.map +1 -1
  158. package/lib/components/Currency/CurrencyInput.d.ts +3 -3
  159. package/lib/components/Currency/CurrencyInput.d.ts.map +1 -1
  160. package/lib/components/Currency/CurrencyInput.js.map +1 -1
  161. package/lib/components/Currency/CurrencyInput.types.d.ts +1 -1
  162. package/lib/components/Currency/CurrencyInput.types.d.ts.map +1 -1
  163. package/lib/components/Currency/CurrencyInput.types.js.map +1 -1
  164. package/lib/components/DangerButton/DangerButton.d.ts.map +1 -1
  165. package/lib/components/DangerButton/DangerButton.js.map +1 -1
  166. package/lib/components/DateTime/DateTime.types.d.ts +3 -3
  167. package/lib/components/DateTime/DateTime.types.d.ts.map +1 -1
  168. package/lib/components/DateTime/DateTime.types.js.map +1 -1
  169. package/lib/components/DateTime/DateTimeDisplay.d.ts +4 -4
  170. package/lib/components/DateTime/DateTimeDisplay.d.ts.map +1 -1
  171. package/lib/components/DateTime/DateTimeDisplay.js.map +1 -1
  172. package/lib/components/DateTime/DurationDisplay.d.ts +2 -2
  173. package/lib/components/DateTime/DurationDisplay.d.ts.map +1 -1
  174. package/lib/components/DateTime/DurationDisplay.js.map +1 -1
  175. package/lib/components/DateTime/Input/DateInput.d.ts +4 -4
  176. package/lib/components/DateTime/Input/DateInput.d.ts.map +1 -1
  177. package/lib/components/DateTime/Input/DateInput.js.map +1 -1
  178. package/lib/components/DateTime/Input/DateRangeInput.d.ts +4 -4
  179. package/lib/components/DateTime/Input/DateRangeInput.d.ts.map +1 -1
  180. package/lib/components/DateTime/Input/DateRangeInput.js.map +1 -1
  181. package/lib/components/DateTime/Input/DateTimeInput.d.ts +6 -6
  182. package/lib/components/DateTime/Input/DateTimeInput.d.ts.map +1 -1
  183. package/lib/components/DateTime/Input/DateTimeInput.js +1 -0
  184. package/lib/components/DateTime/Input/DateTimeInput.js.map +1 -1
  185. package/lib/components/DateTime/Input/DayOfWeekInput.d.ts +3 -3
  186. package/lib/components/DateTime/Input/DayOfWeekInput.d.ts.map +1 -1
  187. package/lib/components/DateTime/Input/DayOfWeekInput.js.map +1 -1
  188. package/lib/components/DateTime/Input/Duration/DurationInput.d.ts +3 -3
  189. package/lib/components/DateTime/Input/Duration/DurationInput.d.ts.map +1 -1
  190. package/lib/components/DateTime/Input/Duration/DurationInput.js.map +1 -1
  191. package/lib/components/DateTime/Input/Duration/DurationInput.types.d.ts +2 -2
  192. package/lib/components/DateTime/Input/Duration/DurationInput.types.d.ts.map +1 -1
  193. package/lib/components/DateTime/Input/Duration/DurationInput.types.js.map +1 -1
  194. package/lib/components/DateTime/Input/Duration/NumberUnit.d.ts +3 -3
  195. package/lib/components/DateTime/Input/Duration/NumberUnit.d.ts.map +1 -1
  196. package/lib/components/DateTime/Input/Duration/NumberUnit.js.map +1 -1
  197. package/lib/components/DateTime/Input/Duration/Time.d.ts +3 -3
  198. package/lib/components/DateTime/Input/Duration/Time.d.ts.map +1 -1
  199. package/lib/components/DateTime/Input/Duration/Time.js.map +1 -1
  200. package/lib/components/DateTime/Input/MonthInput.d.ts +4 -4
  201. package/lib/components/DateTime/Input/MonthInput.d.ts.map +1 -1
  202. package/lib/components/DateTime/Input/MonthInput.js.map +1 -1
  203. package/lib/components/DateTime/Input/PartInput.d.ts +3 -3
  204. package/lib/components/DateTime/Input/PartInput.d.ts.map +1 -1
  205. package/lib/components/DateTime/Input/PartInput.js.map +1 -1
  206. package/lib/components/DateTime/Input/QuarterInput.d.ts +4 -4
  207. package/lib/components/DateTime/Input/QuarterInput.d.ts.map +1 -1
  208. package/lib/components/DateTime/Input/QuarterInput.js.map +1 -1
  209. package/lib/components/DateTime/Input/TimeInput.d.ts +5 -5
  210. package/lib/components/DateTime/Input/TimeInput.d.ts.map +1 -1
  211. package/lib/components/DateTime/Input/TimeInput.js.map +1 -1
  212. package/lib/components/DateTime/Input/TimeRangeInput.d.ts +7 -6
  213. package/lib/components/DateTime/Input/TimeRangeInput.d.ts.map +1 -1
  214. package/lib/components/DateTime/Input/TimeRangeInput.js.map +1 -1
  215. package/lib/components/DateTime/Input/WeekInput.d.ts +4 -4
  216. package/lib/components/DateTime/Input/WeekInput.d.ts.map +1 -1
  217. package/lib/components/DateTime/Input/WeekInput.js.map +1 -1
  218. package/lib/components/DateTime/Input/useAutoFocusNextInput.d.ts +1 -1
  219. package/lib/components/DateTime/Input/useAutoFocusNextInput.d.ts.map +1 -1
  220. package/lib/components/DateTime/Input/useAutoFocusNextInput.js.map +1 -1
  221. package/lib/components/DateTime/Input/usePickerButton.d.ts +1 -1
  222. package/lib/components/DateTime/Input/usePickerButton.d.ts.map +1 -1
  223. package/lib/components/DateTime/Input/usePickerButton.js.map +1 -1
  224. package/lib/components/DateTime/Input/utils.d.ts +1 -1
  225. package/lib/components/DateTime/Input/utils.d.ts.map +1 -1
  226. package/lib/components/DateTime/Input/utils.js.map +1 -1
  227. package/lib/components/DateTime/Picker/Calendar.d.ts +3 -3
  228. package/lib/components/DateTime/Picker/Calendar.d.ts.map +1 -1
  229. package/lib/components/DateTime/Picker/Calendar.js.map +1 -1
  230. package/lib/components/DateTime/Picker/DatePicker.d.ts +2 -2
  231. package/lib/components/DateTime/Picker/DatePicker.d.ts.map +1 -1
  232. package/lib/components/DateTime/Picker/DatePicker.js.map +1 -1
  233. package/lib/components/DateTime/Picker/DatePicker.types.d.ts +2 -2
  234. package/lib/components/DateTime/Picker/DatePicker.types.d.ts.map +1 -1
  235. package/lib/components/DateTime/Picker/DatePicker.types.js.map +1 -1
  236. package/lib/components/DateTime/Picker/DateRangePicker.d.ts +2 -2
  237. package/lib/components/DateTime/Picker/DateRangePicker.d.ts.map +1 -1
  238. package/lib/components/DateTime/Picker/DateRangePicker.js.map +1 -1
  239. package/lib/components/DateTime/Picker/TimePicker.d.ts +3 -3
  240. package/lib/components/DateTime/Picker/TimePicker.d.ts.map +1 -1
  241. package/lib/components/DateTime/Picker/TimePicker.js.map +1 -1
  242. package/lib/components/DateTime/Picker/Weeks.d.ts +3 -3
  243. package/lib/components/DateTime/Picker/Weeks.d.ts.map +1 -1
  244. package/lib/components/DateTime/Picker/Weeks.js.map +1 -1
  245. package/lib/components/DateTime/utils.d.ts +4 -4
  246. package/lib/components/DateTime/utils.d.ts.map +1 -1
  247. package/lib/components/DateTime/utils.js.map +1 -1
  248. package/lib/components/Dialog/Dialog.d.ts +2 -2
  249. package/lib/components/Dialog/Dialog.d.ts.map +1 -1
  250. package/lib/components/Dialog/Dialog.js.map +1 -1
  251. package/lib/components/Dialog/Dialog.types.d.ts +4 -4
  252. package/lib/components/Dialog/Dialog.types.d.ts.map +1 -1
  253. package/lib/components/Dialog/Dialog.types.js.map +1 -1
  254. package/lib/components/Dialog/FormDialog.d.ts +3 -3
  255. package/lib/components/Dialog/FormDialog.d.ts.map +1 -1
  256. package/lib/components/Dialog/FormDialog.js.map +1 -1
  257. package/lib/components/Dialog/InfoDialog.d.ts +2 -2
  258. package/lib/components/Dialog/InfoDialog.d.ts.map +1 -1
  259. package/lib/components/Dialog/InfoDialog.js.map +1 -1
  260. package/lib/components/Drawer/Drawer.d.ts +2 -2
  261. package/lib/components/Drawer/Drawer.d.ts.map +1 -1
  262. package/lib/components/Drawer/Drawer.js.map +1 -1
  263. package/lib/components/Email/EmailDisplay.d.ts +2 -2
  264. package/lib/components/Email/EmailDisplay.d.ts.map +1 -1
  265. package/lib/components/Email/EmailDisplay.js.map +1 -1
  266. package/lib/components/EmojiPicker/EmojiDisplay.d.ts +2 -2
  267. package/lib/components/EmojiPicker/EmojiDisplay.d.ts.map +1 -1
  268. package/lib/components/EmojiPicker/EmojiDisplay.js.map +1 -1
  269. package/lib/components/EmojiPicker/EmojiPicker.d.ts +4 -4
  270. package/lib/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
  271. package/lib/components/EmojiPicker/EmojiPicker.js +28 -21
  272. package/lib/components/EmojiPicker/EmojiPicker.js.map +1 -1
  273. package/lib/components/EmptyState/EmptyState.d.ts +2 -2
  274. package/lib/components/EmptyState/EmptyState.d.ts.map +1 -1
  275. package/lib/components/EmptyState/EmptyState.js.map +1 -1
  276. package/lib/components/ErrorState/ErrorState.d.ts +2 -2
  277. package/lib/components/ErrorState/ErrorState.d.ts.map +1 -1
  278. package/lib/components/ErrorState/ErrorState.js.map +1 -1
  279. package/lib/components/ExpandCollapse/ExpandCollapse.d.ts +2 -2
  280. package/lib/components/ExpandCollapse/ExpandCollapse.d.ts.map +1 -1
  281. package/lib/components/ExpandCollapse/ExpandCollapse.js.map +1 -1
  282. package/lib/components/FieldGroup/FieldGroup.d.ts +4 -4
  283. package/lib/components/FieldGroup/FieldGroup.d.ts.map +1 -1
  284. package/lib/components/FieldGroup/FieldGroup.js.map +1 -1
  285. package/lib/components/FieldGroup/FieldGroupList.d.ts +3 -3
  286. package/lib/components/FieldGroup/FieldGroupList.d.ts.map +1 -1
  287. package/lib/components/FieldGroup/FieldGroupList.js.map +1 -1
  288. package/lib/components/FieldValueList/FieldValueList.d.ts +2 -2
  289. package/lib/components/FieldValueList/FieldValueList.d.ts.map +1 -1
  290. package/lib/components/FieldValueList/FieldValueList.js.map +1 -1
  291. package/lib/components/File/FileDisplay.d.ts +3 -3
  292. package/lib/components/File/FileDisplay.d.ts.map +1 -1
  293. package/lib/components/File/FileDisplay.js.map +1 -1
  294. package/lib/components/File/FileInput.d.ts +4 -4
  295. package/lib/components/File/FileInput.d.ts.map +1 -1
  296. package/lib/components/File/FileInput.js +1 -1
  297. package/lib/components/File/FileInput.js.map +1 -1
  298. package/lib/components/File/FileItem.d.ts +3 -3
  299. package/lib/components/File/FileItem.d.ts.map +1 -1
  300. package/lib/components/File/FileItem.js +3 -2
  301. package/lib/components/File/FileItem.js.map +1 -1
  302. package/lib/components/File/FileUploadItem.d.ts +4 -2
  303. package/lib/components/File/FileUploadItem.d.ts.map +1 -1
  304. package/lib/components/File/FileUploadItem.js +15 -6
  305. package/lib/components/File/FileUploadItem.js.map +1 -1
  306. package/lib/components/File/FileVisual.d.ts +4 -4
  307. package/lib/components/File/FileVisual.d.ts.map +1 -1
  308. package/lib/components/File/FileVisual.js.map +1 -1
  309. package/lib/components/Flex/Flex.d.ts +2 -2
  310. package/lib/components/Flex/Flex.d.ts.map +1 -1
  311. package/lib/components/Flex/Flex.js.map +1 -1
  312. package/lib/components/Form/Form.d.ts +3 -3
  313. package/lib/components/Form/Form.d.ts.map +1 -1
  314. package/lib/components/Form/Form.js.map +1 -1
  315. package/lib/components/FormControl/FormControl.d.ts +3 -3
  316. package/lib/components/FormControl/FormControl.d.ts.map +1 -1
  317. package/lib/components/FormControl/FormControl.js.map +1 -1
  318. package/lib/components/FormField/FormField.d.ts +6 -6
  319. package/lib/components/FormField/FormField.d.ts.map +1 -1
  320. package/lib/components/FormField/FormField.js.map +1 -1
  321. package/lib/components/Grid/Grid.d.ts +3 -3
  322. package/lib/components/Grid/Grid.d.ts.map +1 -1
  323. package/lib/components/Grid/Grid.js.map +1 -1
  324. package/lib/components/Grid/Grid.types.d.ts +3 -3
  325. package/lib/components/Grid/Grid.types.d.ts.map +1 -1
  326. package/lib/components/Grid/Grid.types.js.map +1 -1
  327. package/lib/components/HTML/HTML.d.ts +3 -3
  328. package/lib/components/HTML/HTML.d.ts.map +1 -1
  329. package/lib/components/HTML/HTML.js.map +1 -1
  330. package/lib/components/Icon/Icon.d.ts +2 -2
  331. package/lib/components/Icon/Icon.d.ts.map +1 -1
  332. package/lib/components/Icon/Icon.js +10 -2
  333. package/lib/components/Icon/Icon.js.map +1 -1
  334. package/lib/components/IconPicker/IconPicker.d.ts +4 -4
  335. package/lib/components/IconPicker/IconPicker.d.ts.map +1 -1
  336. package/lib/components/IconPicker/IconPicker.js.map +1 -1
  337. package/lib/components/Image/Image.d.ts +2 -2
  338. package/lib/components/Image/Image.d.ts.map +1 -1
  339. package/lib/components/Image/Image.js.map +1 -1
  340. package/lib/components/Input/Input.d.ts +3 -3
  341. package/lib/components/Input/Input.d.ts.map +1 -1
  342. package/lib/components/Input/Input.js.map +1 -1
  343. package/lib/components/Label/Label.d.ts +2 -2
  344. package/lib/components/Label/Label.d.ts.map +1 -1
  345. package/lib/components/Label/Label.js.map +1 -1
  346. package/lib/components/Lightbox/Lightbox.d.ts +3 -3
  347. package/lib/components/Lightbox/Lightbox.d.ts.map +1 -1
  348. package/lib/components/Lightbox/Lightbox.js.map +1 -1
  349. package/lib/components/Lightbox/Lightbox.types.d.ts +4 -4
  350. package/lib/components/Lightbox/Lightbox.types.d.ts.map +1 -1
  351. package/lib/components/Lightbox/Lightbox.types.js.map +1 -1
  352. package/lib/components/Link/Link.d.ts +3 -3
  353. package/lib/components/Link/Link.d.ts.map +1 -1
  354. package/lib/components/Link/Link.js.map +1 -1
  355. package/lib/components/List/CommaSeparatedList.d.ts +2 -2
  356. package/lib/components/List/CommaSeparatedList.d.ts.map +1 -1
  357. package/lib/components/List/CommaSeparatedList.js.map +1 -1
  358. package/lib/components/List/List.d.ts +2 -2
  359. package/lib/components/List/List.d.ts.map +1 -1
  360. package/lib/components/List/List.js.map +1 -1
  361. package/lib/components/List/OrderedList.d.ts +3 -3
  362. package/lib/components/List/OrderedList.d.ts.map +1 -1
  363. package/lib/components/List/OrderedList.js.map +1 -1
  364. package/lib/components/List/UnorderedList.d.ts +3 -3
  365. package/lib/components/List/UnorderedList.d.ts.map +1 -1
  366. package/lib/components/List/UnorderedList.js.map +1 -1
  367. package/lib/components/ListToolbar/ListToolbar.d.ts +1 -1
  368. package/lib/components/ListToolbar/ListToolbar.d.ts.map +1 -1
  369. package/lib/components/ListToolbar/ListToolbar.js.map +1 -1
  370. package/lib/components/ListToolbar/ListToolbar.styles.d.ts.map +1 -1
  371. package/lib/components/ListToolbar/ListToolbar.styles.js.map +1 -1
  372. package/lib/components/ListToolbar/ListToolbar.types.d.ts +6 -6
  373. package/lib/components/ListToolbar/ListToolbar.types.d.ts.map +1 -1
  374. package/lib/components/ListToolbar/ListToolbar.types.js.map +1 -1
  375. package/lib/components/ListToolbar/PresetMenuPopover.d.ts +1 -1
  376. package/lib/components/ListToolbar/PresetMenuPopover.d.ts.map +1 -1
  377. package/lib/components/ListToolbar/PresetMenuPopover.js.map +1 -1
  378. package/lib/components/ListToolbar/helpers.d.ts +1 -1
  379. package/lib/components/ListToolbar/helpers.d.ts.map +1 -1
  380. package/lib/components/ListToolbar/helpers.js.map +1 -1
  381. package/lib/components/LiveLog/LiveLog.d.ts +1 -1
  382. package/lib/components/LiveLog/LiveLog.d.ts.map +1 -1
  383. package/lib/components/LiveLog/LiveLog.js.map +1 -1
  384. package/lib/components/LiveLog/LiveLog.types.d.ts +1 -1
  385. package/lib/components/LiveLog/LiveLog.types.d.ts.map +1 -1
  386. package/lib/components/LiveLog/LiveLog.types.js.map +1 -1
  387. package/lib/components/Location/CurrentLocationButton.d.ts +1 -1
  388. package/lib/components/Location/CurrentLocationButton.d.ts.map +1 -1
  389. package/lib/components/Location/CurrentLocationButton.js.map +1 -1
  390. package/lib/components/Location/Location.types.d.ts +2 -2
  391. package/lib/components/Location/Location.types.d.ts.map +1 -1
  392. package/lib/components/Location/Location.types.js.map +1 -1
  393. package/lib/components/Location/LocationDisplay.d.ts +3 -3
  394. package/lib/components/Location/LocationDisplay.d.ts.map +1 -1
  395. package/lib/components/Location/LocationDisplay.js.map +1 -1
  396. package/lib/components/Location/LocationInput.d.ts +6 -6
  397. package/lib/components/Location/LocationInput.d.ts.map +1 -1
  398. package/lib/components/Location/LocationInput.js.map +1 -1
  399. package/lib/components/Location/LocationView.d.ts +4 -4
  400. package/lib/components/Location/LocationView.d.ts.map +1 -1
  401. package/lib/components/Location/LocationView.js.map +1 -1
  402. package/lib/components/Location/utils.d.ts +1 -1
  403. package/lib/components/Location/utils.d.ts.map +1 -1
  404. package/lib/components/Location/utils.js.map +1 -1
  405. package/lib/components/Mark/Mark.d.ts +2 -2
  406. package/lib/components/Mark/Mark.d.ts.map +1 -1
  407. package/lib/components/Mark/Mark.js.map +1 -1
  408. package/lib/components/Menu/FlyoutMenuList.d.ts +3 -3
  409. package/lib/components/Menu/FlyoutMenuList.d.ts.map +1 -1
  410. package/lib/components/Menu/FlyoutMenuList.js.map +1 -1
  411. package/lib/components/Menu/Menu.context.d.ts +1 -1
  412. package/lib/components/Menu/Menu.context.d.ts.map +1 -1
  413. package/lib/components/Menu/Menu.context.js.map +1 -1
  414. package/lib/components/Menu/Menu.d.ts +3 -3
  415. package/lib/components/Menu/Menu.d.ts.map +1 -1
  416. package/lib/components/Menu/Menu.js.map +1 -1
  417. package/lib/components/Menu/Menu.styles.d.ts +1 -1
  418. package/lib/components/Menu/Menu.styles.d.ts.map +1 -1
  419. package/lib/components/Menu/Menu.styles.js.map +1 -1
  420. package/lib/components/Menu/Menu.types.d.ts +3 -3
  421. package/lib/components/Menu/Menu.types.d.ts.map +1 -1
  422. package/lib/components/Menu/Menu.types.js.map +1 -1
  423. package/lib/components/Menu/MenuGroup.d.ts +1 -1
  424. package/lib/components/Menu/MenuGroup.d.ts.map +1 -1
  425. package/lib/components/Menu/MenuGroup.js.map +1 -1
  426. package/lib/components/Menu/MenuItem.d.ts +3 -3
  427. package/lib/components/Menu/MenuItem.d.ts.map +1 -1
  428. package/lib/components/Menu/MenuItem.js.map +1 -1
  429. package/lib/components/Menu/MenuList.d.ts +2 -2
  430. package/lib/components/Menu/MenuList.d.ts.map +1 -1
  431. package/lib/components/Menu/MenuList.js.map +1 -1
  432. package/lib/components/Menu/MenuListHeader.d.ts +3 -3
  433. package/lib/components/Menu/MenuListHeader.d.ts.map +1 -1
  434. package/lib/components/Menu/MenuListHeader.js.map +1 -1
  435. package/lib/components/Menu/helpers.d.ts +1 -1
  436. package/lib/components/Menu/helpers.d.ts.map +1 -1
  437. package/lib/components/Menu/helpers.js.map +1 -1
  438. package/lib/components/MenuButton/MenuButton.d.ts +3 -3
  439. package/lib/components/MenuButton/MenuButton.d.ts.map +1 -1
  440. package/lib/components/MenuButton/MenuButton.js.map +1 -1
  441. package/lib/components/MetaList/MetaList.d.ts +2 -2
  442. package/lib/components/MetaList/MetaList.d.ts.map +1 -1
  443. package/lib/components/MetaList/MetaList.js.map +1 -1
  444. package/lib/components/Modal/Contexts.d.ts +1 -1
  445. package/lib/components/Modal/Contexts.d.ts.map +1 -1
  446. package/lib/components/Modal/Contexts.js.map +1 -1
  447. package/lib/components/Modal/DockedModals.d.ts +2 -2
  448. package/lib/components/Modal/DockedModals.d.ts.map +1 -1
  449. package/lib/components/Modal/DockedModals.js.map +1 -1
  450. package/lib/components/Modal/MinimizedModal.d.ts +3 -3
  451. package/lib/components/Modal/MinimizedModal.d.ts.map +1 -1
  452. package/lib/components/Modal/MinimizedModal.js.map +1 -1
  453. package/lib/components/Modal/Modal.d.ts +2 -2
  454. package/lib/components/Modal/Modal.d.ts.map +1 -1
  455. package/lib/components/Modal/Modal.js.map +1 -1
  456. package/lib/components/Modal/Modal.styles.d.ts +1 -1
  457. package/lib/components/Modal/Modal.styles.d.ts.map +1 -1
  458. package/lib/components/Modal/Modal.styles.js.map +1 -1
  459. package/lib/components/Modal/ModalManager.d.ts +2 -2
  460. package/lib/components/Modal/ModalManager.d.ts.map +1 -1
  461. package/lib/components/Modal/ModalManager.js.map +1 -1
  462. package/lib/components/MultiStepForm/FormProgress.styles.d.ts +1 -1
  463. package/lib/components/MultiStepForm/FormProgress.styles.d.ts.map +1 -1
  464. package/lib/components/MultiStepForm/FormProgress.styles.js.map +1 -1
  465. package/lib/components/MultiStepForm/HorizontalFormProgress.d.ts +2 -2
  466. package/lib/components/MultiStepForm/HorizontalFormProgress.d.ts.map +1 -1
  467. package/lib/components/MultiStepForm/HorizontalFormProgress.js.map +1 -1
  468. package/lib/components/MultiStepForm/MultiStepForm.d.ts +3 -3
  469. package/lib/components/MultiStepForm/MultiStepForm.d.ts.map +1 -1
  470. package/lib/components/MultiStepForm/MultiStepForm.js.map +1 -1
  471. package/lib/components/MultiStepForm/MultiStepForm.types.d.ts +3 -3
  472. package/lib/components/MultiStepForm/MultiStepForm.types.d.ts.map +1 -1
  473. package/lib/components/MultiStepForm/MultiStepForm.types.js.map +1 -1
  474. package/lib/components/MultiStepForm/VerticalFormProgress.d.ts +2 -2
  475. package/lib/components/MultiStepForm/VerticalFormProgress.d.ts.map +1 -1
  476. package/lib/components/MultiStepForm/VerticalFormProgress.js.map +1 -1
  477. package/lib/components/Number/NumberDisplay.d.ts +1 -1
  478. package/lib/components/Number/NumberDisplay.d.ts.map +1 -1
  479. package/lib/components/Number/NumberDisplay.js.map +1 -1
  480. package/lib/components/Number/NumberInput.d.ts +3 -3
  481. package/lib/components/Number/NumberInput.d.ts.map +1 -1
  482. package/lib/components/Number/NumberInput.js.map +1 -1
  483. package/lib/components/Number/NumberInput.types.d.ts +3 -3
  484. package/lib/components/Number/NumberInput.types.d.ts.map +1 -1
  485. package/lib/components/Number/NumberInput.types.js.map +1 -1
  486. package/lib/components/Number/NumberRangeInput.d.ts +1 -1
  487. package/lib/components/Number/NumberRangeInput.d.ts.map +1 -1
  488. package/lib/components/Number/NumberRangeInput.js.map +1 -1
  489. package/lib/components/PageTemplates/CategorySubPage.d.ts +3 -3
  490. package/lib/components/PageTemplates/CategorySubPage.d.ts.map +1 -1
  491. package/lib/components/PageTemplates/CategorySubPage.js.map +1 -1
  492. package/lib/components/PageTemplates/CategorySubPage.styles.d.ts.map +1 -1
  493. package/lib/components/PageTemplates/CategorySubPage.styles.js.map +1 -1
  494. package/lib/components/PageTemplates/DashboardPage.d.ts +3 -3
  495. package/lib/components/PageTemplates/DashboardPage.d.ts.map +1 -1
  496. package/lib/components/PageTemplates/DashboardPage.js.map +1 -1
  497. package/lib/components/PageTemplates/PageTemplates.d.ts +5 -4
  498. package/lib/components/PageTemplates/PageTemplates.d.ts.map +1 -1
  499. package/lib/components/PageTemplates/PageTemplates.js.map +1 -1
  500. package/lib/components/Pagination/Pagination.d.ts +1 -1
  501. package/lib/components/Pagination/Pagination.d.ts.map +1 -1
  502. package/lib/components/Pagination/Pagination.js.map +1 -1
  503. package/lib/components/Paragraph/ParagraphDisplay.d.ts +2 -2
  504. package/lib/components/Paragraph/ParagraphDisplay.d.ts.map +1 -1
  505. package/lib/components/Paragraph/ParagraphDisplay.js.map +1 -1
  506. package/lib/components/Phone/PhoneDisplay.d.ts +1 -1
  507. package/lib/components/Phone/PhoneDisplay.d.ts.map +1 -1
  508. package/lib/components/Phone/PhoneDisplay.js.map +1 -1
  509. package/lib/components/Phone/PhoneInput.d.ts +3 -3
  510. package/lib/components/Phone/PhoneInput.d.ts.map +1 -1
  511. package/lib/components/Phone/PhoneInput.js.map +1 -1
  512. package/lib/components/Popover/Popover.d.ts +5 -5
  513. package/lib/components/Popover/Popover.d.ts.map +1 -1
  514. package/lib/components/Popover/Popover.js.map +1 -1
  515. package/lib/components/Popover/PopoverManager.d.ts +1 -1
  516. package/lib/components/Popover/PopoverManager.d.ts.map +1 -1
  517. package/lib/components/Popover/PopoverManager.js.map +1 -1
  518. package/lib/components/Popover/modifiers.d.ts +1 -1
  519. package/lib/components/Popover/modifiers.d.ts.map +1 -1
  520. package/lib/components/Popover/modifiers.js.map +1 -1
  521. package/lib/components/Progress/Bar.d.ts +3 -3
  522. package/lib/components/Progress/Bar.d.ts.map +1 -1
  523. package/lib/components/Progress/Bar.js.map +1 -1
  524. package/lib/components/Progress/Ellipsis.d.ts +3 -3
  525. package/lib/components/Progress/Ellipsis.d.ts.map +1 -1
  526. package/lib/components/Progress/Ellipsis.js.map +1 -1
  527. package/lib/components/Progress/Progress.d.ts +3 -3
  528. package/lib/components/Progress/Progress.d.ts.map +1 -1
  529. package/lib/components/Progress/Progress.js.map +1 -1
  530. package/lib/components/Progress/Progress.styles.d.ts +1 -1
  531. package/lib/components/Progress/Progress.styles.d.ts.map +1 -1
  532. package/lib/components/Progress/Progress.styles.js.map +1 -1
  533. package/lib/components/Progress/Progress.types.d.ts +3 -3
  534. package/lib/components/Progress/Progress.types.d.ts.map +1 -1
  535. package/lib/components/Progress/Progress.types.js.map +1 -1
  536. package/lib/components/Progress/Ring.d.ts +3 -3
  537. package/lib/components/Progress/Ring.d.ts.map +1 -1
  538. package/lib/components/Progress/Ring.js.map +1 -1
  539. package/lib/components/QRCode/QRCode.d.ts +2 -2
  540. package/lib/components/QRCode/QRCode.d.ts.map +1 -1
  541. package/lib/components/QRCode/QRCode.js.map +1 -1
  542. package/lib/components/RadioButton/RadioButton.d.ts +3 -3
  543. package/lib/components/RadioButton/RadioButton.d.ts.map +1 -1
  544. package/lib/components/RadioButton/RadioButton.js.map +1 -1
  545. package/lib/components/RadioCheck/RadioCheck.d.ts +3 -3
  546. package/lib/components/RadioCheck/RadioCheck.d.ts.map +1 -1
  547. package/lib/components/RadioCheck/RadioCheck.js.map +1 -1
  548. package/lib/components/RadioCheckGroup/RadioCheckGroup.d.ts +5 -5
  549. package/lib/components/RadioCheckGroup/RadioCheckGroup.d.ts.map +1 -1
  550. package/lib/components/RadioCheckGroup/RadioCheckGroup.js.map +1 -1
  551. package/lib/components/Rating/Rating.d.ts +1 -1
  552. package/lib/components/Rating/Rating.d.ts.map +1 -1
  553. package/lib/components/Rating/Rating.js.map +1 -1
  554. package/lib/components/SearchInput/SearchInput.d.ts +3 -3
  555. package/lib/components/SearchInput/SearchInput.d.ts.map +1 -1
  556. package/lib/components/SearchInput/SearchInput.js.map +1 -1
  557. package/lib/components/Select/Option.d.ts +2 -2
  558. package/lib/components/Select/Option.d.ts.map +1 -1
  559. package/lib/components/Select/Option.js.map +1 -1
  560. package/lib/components/Select/Select.d.ts +3 -3
  561. package/lib/components/Select/Select.d.ts.map +1 -1
  562. package/lib/components/Select/Select.js.map +1 -1
  563. package/lib/components/Sentiment/Sentiment.d.ts +2 -2
  564. package/lib/components/Sentiment/Sentiment.d.ts.map +1 -1
  565. package/lib/components/Sentiment/Sentiment.js.map +1 -1
  566. package/lib/components/ShortcutManager/ShortcutManager.d.ts +1 -1
  567. package/lib/components/ShortcutManager/ShortcutManager.d.ts.map +1 -1
  568. package/lib/components/ShortcutManager/ShortcutManager.js.map +1 -1
  569. package/lib/components/ShortcutManager/ShortcutManager.types.d.ts +1 -1
  570. package/lib/components/ShortcutManager/ShortcutManager.types.d.ts.map +1 -1
  571. package/lib/components/ShortcutManager/ShortcutManager.types.js.map +1 -1
  572. package/lib/components/ShowMoreLess/ShowMoreLess.d.ts +1 -1
  573. package/lib/components/ShowMoreLess/ShowMoreLess.d.ts.map +1 -1
  574. package/lib/components/ShowMoreLess/ShowMoreLess.js.map +1 -1
  575. package/lib/components/Skeleton/LineSkeleton.d.ts +2 -2
  576. package/lib/components/Skeleton/LineSkeleton.d.ts.map +1 -1
  577. package/lib/components/Skeleton/LineSkeleton.js.map +1 -1
  578. package/lib/components/Skeleton/ParagraphSkeleton.d.ts +2 -2
  579. package/lib/components/Skeleton/ParagraphSkeleton.d.ts.map +1 -1
  580. package/lib/components/Skeleton/ParagraphSkeleton.js.map +1 -1
  581. package/lib/components/Skeleton/RectangleSkeleton.d.ts +2 -2
  582. package/lib/components/Skeleton/RectangleSkeleton.d.ts.map +1 -1
  583. package/lib/components/Skeleton/RectangleSkeleton.js.map +1 -1
  584. package/lib/components/SkipLinks/SkipLinks.d.ts +1 -1
  585. package/lib/components/SkipLinks/SkipLinks.d.ts.map +1 -1
  586. package/lib/components/SkipLinks/SkipLinks.js.map +1 -1
  587. package/lib/components/Slider/Slider.d.ts +3 -3
  588. package/lib/components/Slider/Slider.d.ts.map +1 -1
  589. package/lib/components/Slider/Slider.js.map +1 -1
  590. package/lib/components/Slider/Slider.styles.d.ts +3 -3
  591. package/lib/components/Slider/Slider.styles.d.ts.map +1 -1
  592. package/lib/components/Slider/Slider.styles.js.map +1 -1
  593. package/lib/components/Slider/Slider.types.d.ts +2 -2
  594. package/lib/components/Slider/Slider.types.d.ts.map +1 -1
  595. package/lib/components/Slider/Slider.types.js.map +1 -1
  596. package/lib/components/Slider/SliderTicks.d.ts +2 -2
  597. package/lib/components/Slider/SliderTicks.d.ts.map +1 -1
  598. package/lib/components/Slider/SliderTicks.js.map +1 -1
  599. package/lib/components/Slider/utils.d.ts +2 -1
  600. package/lib/components/Slider/utils.d.ts.map +1 -1
  601. package/lib/components/Slider/utils.js.map +1 -1
  602. package/lib/components/SummaryItem/SummaryItem.d.ts +3 -3
  603. package/lib/components/SummaryItem/SummaryItem.d.ts.map +1 -1
  604. package/lib/components/SummaryItem/SummaryItem.js.map +1 -1
  605. package/lib/components/SummaryList/SummaryList.d.ts +6 -5
  606. package/lib/components/SummaryList/SummaryList.d.ts.map +1 -1
  607. package/lib/components/SummaryList/SummaryList.js.map +1 -1
  608. package/lib/components/SummaryList/ViewAll.d.ts +3 -3
  609. package/lib/components/SummaryList/ViewAll.d.ts.map +1 -1
  610. package/lib/components/SummaryList/ViewAll.js.map +1 -1
  611. package/lib/components/Switch/Switch.d.ts +2 -2
  612. package/lib/components/Switch/Switch.d.ts.map +1 -1
  613. package/lib/components/Switch/Switch.js.map +1 -1
  614. package/lib/components/Table/Table.d.ts +1 -1
  615. package/lib/components/Table/Table.d.ts.map +1 -1
  616. package/lib/components/Table/Table.js.map +1 -1
  617. package/lib/components/Tabs/Tab.d.ts +3 -3
  618. package/lib/components/Tabs/Tab.d.ts.map +1 -1
  619. package/lib/components/Tabs/Tab.js.map +1 -1
  620. package/lib/components/Tabs/TabPanel.d.ts +2 -2
  621. package/lib/components/Tabs/TabPanel.d.ts.map +1 -1
  622. package/lib/components/Tabs/TabPanel.js.map +1 -1
  623. package/lib/components/Tabs/Tabs.d.ts +3 -3
  624. package/lib/components/Tabs/Tabs.d.ts.map +1 -1
  625. package/lib/components/Tabs/Tabs.js.map +1 -1
  626. package/lib/components/Tabs/Tabs.types.d.ts +1 -1
  627. package/lib/components/Tabs/Tabs.types.d.ts.map +1 -1
  628. package/lib/components/Tabs/Tabs.types.js.map +1 -1
  629. package/lib/components/Text/Text.d.ts +2 -2
  630. package/lib/components/Text/Text.d.ts.map +1 -1
  631. package/lib/components/Text/Text.js.map +1 -1
  632. package/lib/components/TextArea/TextArea.d.ts +3 -3
  633. package/lib/components/TextArea/TextArea.d.ts.map +1 -1
  634. package/lib/components/TextArea/TextArea.js.map +1 -1
  635. package/lib/components/Toaster/Context.d.ts +1 -1
  636. package/lib/components/Toaster/Context.d.ts.map +1 -1
  637. package/lib/components/Toaster/Context.js.map +1 -1
  638. package/lib/components/Toaster/Toaster.d.ts +3 -3
  639. package/lib/components/Toaster/Toaster.d.ts.map +1 -1
  640. package/lib/components/Toaster/Toaster.js.map +1 -1
  641. package/lib/components/Toaster/Toaster.types.d.ts +2 -2
  642. package/lib/components/Toaster/Toaster.types.d.ts.map +1 -1
  643. package/lib/components/Toaster/Toaster.types.js.map +1 -1
  644. package/lib/components/Tooltip/Tooltip.d.ts +3 -3
  645. package/lib/components/Tooltip/Tooltip.d.ts.map +1 -1
  646. package/lib/components/Tooltip/Tooltip.js.map +1 -1
  647. package/lib/components/Tree/StandardTree.d.ts.map +1 -1
  648. package/lib/components/Tree/StandardTree.js.map +1 -1
  649. package/lib/components/Tree/StandardTree.styles.d.ts +1 -1
  650. package/lib/components/Tree/StandardTree.styles.d.ts.map +1 -1
  651. package/lib/components/Tree/StandardTree.styles.js.map +1 -1
  652. package/lib/components/Tree/Tree.d.ts +2 -2
  653. package/lib/components/Tree/Tree.d.ts.map +1 -1
  654. package/lib/components/Tree/Tree.js.map +1 -1
  655. package/lib/components/URL/URLDisplay.d.ts +2 -2
  656. package/lib/components/URL/URLDisplay.d.ts.map +1 -1
  657. package/lib/components/URL/URLDisplay.js.map +1 -1
  658. package/lib/components/VisuallyHiddenText/VisuallyHiddenText.d.ts +2 -2
  659. package/lib/components/VisuallyHiddenText/VisuallyHiddenText.d.ts.map +1 -1
  660. package/lib/components/VisuallyHiddenText/VisuallyHiddenText.js.map +1 -1
  661. package/lib/hooks/index.d.ts +2 -1
  662. package/lib/hooks/index.d.ts.map +1 -1
  663. package/lib/hooks/index.js.map +1 -1
  664. package/lib/hooks/useActiveDescendant.d.ts +2 -2
  665. package/lib/hooks/useActiveDescendant.d.ts.map +1 -1
  666. package/lib/hooks/useActiveDescendant.js.map +1 -1
  667. package/lib/hooks/useAfterInitialEffect.d.ts +1 -1
  668. package/lib/hooks/useAfterInitialEffect.d.ts.map +1 -1
  669. package/lib/hooks/useAfterInitialEffect.js.map +1 -1
  670. package/lib/hooks/useArrows.d.ts +1 -1
  671. package/lib/hooks/useArrows.d.ts.map +1 -1
  672. package/lib/hooks/useArrows.js.map +1 -1
  673. package/lib/hooks/useAutoResize.d.ts +1 -1
  674. package/lib/hooks/useAutoResize.d.ts.map +1 -1
  675. package/lib/hooks/useAutoResize.js.map +1 -1
  676. package/lib/hooks/useBreakpoint.d.ts +1 -1
  677. package/lib/hooks/useBreakpoint.d.ts.map +1 -1
  678. package/lib/hooks/useBreakpoint.js.map +1 -1
  679. package/lib/hooks/useConsolidatedRef.d.ts +1 -1
  680. package/lib/hooks/useConsolidatedRef.d.ts.map +1 -1
  681. package/lib/hooks/useConsolidatedRef.js.map +1 -1
  682. package/lib/hooks/useDraggable.d.ts +1 -1
  683. package/lib/hooks/useDraggable.d.ts.map +1 -1
  684. package/lib/hooks/useDraggable.js.map +1 -1
  685. package/lib/hooks/useElement.d.ts +1 -1
  686. package/lib/hooks/useElement.d.ts.map +1 -1
  687. package/lib/hooks/useElement.js.map +1 -1
  688. package/lib/hooks/useEscape.d.ts +1 -1
  689. package/lib/hooks/useEscape.d.ts.map +1 -1
  690. package/lib/hooks/useEscape.js.map +1 -1
  691. package/lib/hooks/useEvent.d.ts +1 -1
  692. package/lib/hooks/useEvent.d.ts.map +1 -1
  693. package/lib/hooks/useEvent.js.map +1 -1
  694. package/lib/hooks/useFocusTrap.d.ts +1 -1
  695. package/lib/hooks/useFocusTrap.d.ts.map +1 -1
  696. package/lib/hooks/useFocusTrap.js.map +1 -1
  697. package/lib/hooks/useFocusWithin.d.ts +1 -1
  698. package/lib/hooks/useFocusWithin.d.ts.map +1 -1
  699. package/lib/hooks/useFocusWithin.js.map +1 -1
  700. package/lib/hooks/useI18n.d.ts +4 -0
  701. package/lib/hooks/useI18n.d.ts.map +1 -1
  702. package/lib/hooks/useInputFormatter.d.ts +1 -1
  703. package/lib/hooks/useInputFormatter.d.ts.map +1 -1
  704. package/lib/hooks/useInputFormatter.js.map +1 -1
  705. package/lib/hooks/useItemIntersection.d.ts +1 -1
  706. package/lib/hooks/useItemIntersection.d.ts.map +1 -1
  707. package/lib/hooks/useItemIntersection.js.map +1 -1
  708. package/lib/hooks/useOuterEvent.d.ts +1 -1
  709. package/lib/hooks/useOuterEvent.d.ts.map +1 -1
  710. package/lib/hooks/useOuterEvent.js.map +1 -1
  711. package/lib/hooks/useTestIds.d.ts +1 -1
  712. package/lib/hooks/useTestIds.d.ts.map +1 -1
  713. package/lib/hooks/useTestIds.js.map +1 -1
  714. package/lib/hooks/useTheme.d.ts +1 -1
  715. package/lib/hooks/useTheme.d.ts.map +1 -1
  716. package/lib/hooks/useTheme.js.map +1 -1
  717. package/lib/hooks/useTransitionState.d.ts +1 -1
  718. package/lib/hooks/useTransitionState.d.ts.map +1 -1
  719. package/lib/hooks/useTransitionState.js.map +1 -1
  720. package/lib/i18n/default.d.ts +4 -0
  721. package/lib/i18n/default.d.ts.map +1 -1
  722. package/lib/i18n/default.js +4 -0
  723. package/lib/i18n/default.js.map +1 -1
  724. package/lib/i18n/i18n.d.ts +4 -0
  725. package/lib/i18n/i18n.d.ts.map +1 -1
  726. package/lib/i18n/translate.js.map +1 -1
  727. package/lib/styles/GlobalStyle.d.ts +1 -1
  728. package/lib/styles/GlobalStyle.d.ts.map +1 -1
  729. package/lib/styles/GlobalStyle.js.map +1 -1
  730. package/lib/styles/utils.d.ts +2 -2
  731. package/lib/styles/utils.d.ts.map +1 -1
  732. package/lib/styles/utils.js.map +1 -1
  733. package/lib/theme/ThemeMachine.d.ts +1 -1
  734. package/lib/theme/ThemeMachine.d.ts.map +1 -1
  735. package/lib/theme/ThemeMachine.js.map +1 -1
  736. package/lib/theme/theme.d.ts +2 -1
  737. package/lib/theme/theme.d.ts.map +1 -1
  738. package/lib/theme/theme.js.map +1 -1
  739. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"FileVisual.js","sourceRoot":"","sources":["../../../src/components/File/FileVisual.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAA2D,MAAM,OAAO,CAAC;AAC5F,OAAO,MAAM,EAAE,EAAE,GAAG,EAAgB,MAAM,mBAAmB,CAAC;AAE9D,OAAO,IAAI,MAAM,SAAS,CAAC;AAE3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAmBvC,MAAM,OAAO,GAMT;IACF,OAAO,EAAE;QACP,QAAQ,EAAE,YAAY;QACtB,eAAe,EAAE,YAAY;KAC9B;IACD,KAAK,EAAE;QACL,QAAQ,EAAE,YAAY;QACtB,eAAe,EAAE,YAAY;KAC9B;IACD,KAAK,EAAE;QACL,QAAQ,EAAE,kBAAkB;QAC5B,eAAe,EAAE,YAAY;KAC9B;IACD,QAAQ,EAAE;QACR,QAAQ,EAAE,eAAe;QACzB,eAAe,EAAE,aAAa;KAC/B;IACD,OAAO,EAAE;QACP,QAAQ,EAAE,YAAY;QACtB,eAAe,EAAE,WAAW;KAC7B;IACD,GAAG,EAAE;QACH,IAAI,EAAE,KAAK;QACX,eAAe,EAAE,YAAY;KAC9B;IACD,WAAW,EAAE;QACX,QAAQ,EAAE,YAAY;QACtB,eAAe,EAAE,cAAc;KAChC;IACD,YAAY,EAAE;QACZ,QAAQ,EAAE,iBAAiB;QAC3B,eAAe,EAAE,eAAe;KACjC;IACD,IAAI,EAAE;QACJ,QAAQ,EAAE,OAAO;QACjB,eAAe,EAAE,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YAElD,YAAY,CAAC,IAAI,GACb,CACR,GACA,CACJ,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,UAAU,CAAC","sourcesContent":["import { forwardRef, PropsWithoutRef, FC, Ref, CSSProperties, SyntheticEvent } from 'react';\nimport styled, { css, DefaultTheme } from 'styled-components';\n\nimport Icon from '../Icon';\nimport { ForwardProps, BaseProps, OmitStrict } from '../../types';\nimport { defaultThemeProp } from '../../theme';\nimport Flex from '../Flex';\nimport Image, { StyledImage } from '../Image';\nimport { useTheme } from '../../hooks';\n\nimport { AttachmentType } from './utils';\n\nexport interface FileVisualProps extends BaseProps {\n /** Attachment/File type, it has an impact on background color and icon rendered. */\n type: AttachmentType;\n /** A string to be used as an image src for a attachment thumbnail. */\n thumbnail?: string;\n /** Called when a thumbnail encounters an error while loading. */\n onThumbnailError?: (e: SyntheticEvent<HTMLImageElement>) => void;\n /** Reference to a button element. */\n ref?: Ref<HTMLDivElement>;\n}\ntype ThemeColor = keyof OmitStrict<DefaultTheme['base']['colors'], 'white' | 'black'>;\ntype ThemeColorVariant = 'extra-light' | 'light' | 'medium' | 'dark' | 'extra-dark';\n\ntype BackgroundColor = `${ThemeColor}.${ThemeColorVariant}`;\n\nconst mapping: Record<\n AttachmentType,\n { backgroundColor: BackgroundColor } & (\n | { iconName: string; text?: never }\n | { iconName?: never; text: string }\n )\n> = {\n generic: {\n iconName: 'paper-clip',\n backgroundColor: 'slate.dark'\n },\n video: {\n iconName: 'play-solid',\n backgroundColor: 'slate.dark'\n },\n audio: {\n iconName: 'speaker-on-solid',\n backgroundColor: 'slate.dark'\n },\n document: {\n iconName: 'filetype-text',\n backgroundColor: 'blue.medium'\n },\n message: {\n iconName: 'mail-solid',\n backgroundColor: 'blue.dark'\n },\n pdf: {\n text: 'PDF',\n backgroundColor: 'red.medium'\n },\n spreadsheet: {\n iconName: 'grid-solid',\n backgroundColor: 'green.medium'\n },\n presentation: {\n iconName: 'slideshow-solid',\n backgroundColor: 'orange.medium'\n },\n link: {\n iconName: 'chain',\n backgroundColor: 'purple.dark'\n },\n archive: {\n iconName: 'archive-solid',\n backgroundColor: 'slate.dark'\n },\n database: {\n iconName: 'disc-stack-solid',\n backgroundColor: 'slate.dark'\n },\n image: {\n iconName: 'picture-solid',\n backgroundColor: 'slate.dark'\n },\n text: {\n iconName: 'filetype-text',\n backgroundColor: 'slate.dark'\n }\n} as const;\n\nexport const StyledFileVisual = styled.div``;\n\nexport const StyledTextFrame = styled(StyledFileVisual)(({ theme }) => {\n const {\n base: {\n palette: { light },\n 'border-radius': baseBorderRadius,\n 'font-size': baseFontSize,\n 'font-weight': { 'semi-bold': semiBoldWeight }\n },\n components: {\n icon: {\n size: { m: iconSize },\n 'border-radius-multiplier': borderRadiusMultiplier\n }\n }\n } = theme;\n return css`\n background-color: var(--bg);\n color: ${light};\n height: ${iconSize};\n width: ${iconSize};\n border-radius: calc(${borderRadiusMultiplier} * ${baseBorderRadius});\n font-size: calc(0.7 * ${baseFontSize});\n font-weight: ${semiBoldWeight};\n user-select: none;\n -webkit-user-select: none;\n `;\n});\n\nStyledTextFrame.defaultProps = defaultThemeProp;\n\nconst StyledThumbnailFrame = styled(StyledFileVisual)(({ theme }) => {\n return css`\n background-color: ${theme.base.palette['app-background']};\n height: 100%;\n width: 100%;\n\n ${StyledImage} {\n margin: auto;\n height: unset;\n width: unset;\n max-height: 100%;\n max-width: 100%;\n }\n `;\n});\n\nStyledThumbnailFrame.defaultProps = defaultThemeProp;\n\nconst FileVisual: FC<FileVisualProps & ForwardProps> = forwardRef(function FileVisual(\n { type, thumbnail, onThumbnailError, ...restProps }: PropsWithoutRef<FileVisualProps>,\n ref: FileVisualProps['ref']\n) {\n const visualConfig = mapping[type];\n\n const [color, lightness] = visualConfig.backgroundColor.split('.', 2) as [\n ThemeColor,\n ThemeColorVariant\n ];\n\n const {\n base: {\n colors: {\n [color]: { [lightness]: backgroundColor }\n },\n palette: { light: foregroundColor }\n }\n } = useTheme();\n\n if (thumbnail) {\n return (\n <Flex {...restProps} as={StyledThumbnailFrame} container>\n <Image src={thumbnail} onError={onThumbnailError} alt='' />\n </Flex>\n );\n }\n\n return (\n <>\n {visualConfig.iconName ? (\n <Icon\n {...restProps}\n ref={ref}\n name={visualConfig.iconName}\n background={backgroundColor}\n foreground={foregroundColor}\n />\n ) : (\n <Flex\n {...restProps}\n as={StyledTextFrame}\n ref={ref}\n container={{ justify: 'center', alignItems: 'center' }}\n style={{ '--bg': backgroundColor } as CSSProperties}\n >\n {visualConfig.text}\n </Flex>\n )}\n </>\n );\n});\n\nexport default FileVisual;\n"]}
1
+ {"version":3,"file":"FileVisual.js","sourceRoot":"","sources":["../../../src/components/File/FileVisual.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,IAAI,MAAM,SAAS,CAAC;AAE3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAmBvC,MAAM,OAAO,GAMT;IACF,OAAO,EAAE;QACP,QAAQ,EAAE,YAAY;QACtB,eAAe,EAAE,YAAY;KAC9B;IACD,KAAK,EAAE;QACL,QAAQ,EAAE,YAAY;QACtB,eAAe,EAAE,YAAY;KAC9B;IACD,KAAK,EAAE;QACL,QAAQ,EAAE,kBAAkB;QAC5B,eAAe,EAAE,YAAY;KAC9B;IACD,QAAQ,EAAE;QACR,QAAQ,EAAE,eAAe;QACzB,eAAe,EAAE,aAAa;KAC/B;IACD,OAAO,EAAE;QACP,QAAQ,EAAE,YAAY;QACtB,eAAe,EAAE,WAAW;KAC7B;IACD,GAAG,EAAE;QACH,IAAI,EAAE,KAAK;QAC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,eAAe,GAC3B,CACH,CAAC,CAAC,CAAC,CACF,KAAC,IAAI,OACC,SAAS,EACb,EAAE,EAAE,eAAe,EACnB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,EACtD,KAAK,EAAE,EAAE,MAAM,EAAE,eAAe,EAAmB,YAElD,YAAY,CAAC,IAAI,GACb,CACR,GACA,CACJ,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,UAAU,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { PropsWithoutRef, FC, Ref, CSSProperties, SyntheticEvent } from 'react';\nimport styled, { css } from 'styled-components';\nimport type { DefaultTheme } from 'styled-components';\n\nimport Icon from '../Icon';\nimport type { ForwardProps, BaseProps, OmitStrict } from '../../types';\nimport { defaultThemeProp } from '../../theme';\nimport Flex from '../Flex';\nimport Image, { StyledImage } from '../Image';\nimport { useTheme } from '../../hooks';\n\nimport type { AttachmentType } from './utils';\n\nexport interface FileVisualProps extends BaseProps {\n /** Attachment/File type, it has an impact on background color and icon rendered. */\n type: AttachmentType;\n /** A string to be used as an image src for a attachment thumbnail. */\n thumbnail?: string;\n /** Called when a thumbnail encounters an error while loading. */\n onThumbnailError?: (e: SyntheticEvent<HTMLImageElement>) => void;\n /** Reference to a button element. */\n ref?: Ref<HTMLDivElement>;\n}\ntype ThemeColor = keyof OmitStrict<DefaultTheme['base']['colors'], 'white' | 'black'>;\ntype ThemeColorVariant = 'extra-light' | 'light' | 'medium' | 'dark' | 'extra-dark';\n\ntype BackgroundColor = `${ThemeColor}.${ThemeColorVariant}`;\n\nconst mapping: Record<\n AttachmentType,\n { backgroundColor: BackgroundColor } & (\n | { iconName: string; text?: never }\n | { iconName?: never; text: string }\n )\n> = {\n generic: {\n iconName: 'paper-clip',\n backgroundColor: 'slate.dark'\n },\n video: {\n iconName: 'play-solid',\n backgroundColor: 'slate.dark'\n },\n audio: {\n iconName: 'speaker-on-solid',\n backgroundColor: 'slate.dark'\n },\n document: {\n iconName: 'filetype-text',\n backgroundColor: 'blue.medium'\n },\n message: {\n iconName: 'mail-solid',\n backgroundColor: 'blue.dark'\n },\n pdf: {\n text: 'PDF',\n backgroundColor: 'red.medium'\n },\n spreadsheet: {\n iconName: 'grid-solid',\n backgroundColor: 'green.medium'\n },\n presentation: {\n iconName: 'slideshow-solid',\n backgroundColor: 'orange.medium'\n },\n link: {\n iconName: 'chain',\n backgroundColor: 'purple.dark'\n },\n archive: {\n iconName: 'archive-solid',\n backgroundColor: 'slate.dark'\n },\n database: {\n iconName: 'disc-stack-solid',\n backgroundColor: 'slate.dark'\n },\n image: {\n iconName: 'picture-solid',\n backgroundColor: 'slate.dark'\n },\n text: {\n iconName: 'filetype-text',\n backgroundColor: 'slate.dark'\n }\n} as const;\n\nexport const StyledFileVisual = styled.div``;\n\nexport const StyledTextFrame = styled(StyledFileVisual)(({ theme }) => {\n const {\n base: {\n palette: { light },\n 'border-radius': baseBorderRadius,\n 'font-size': baseFontSize,\n 'font-weight': { 'semi-bold': semiBoldWeight }\n },\n components: {\n icon: {\n size: { m: iconSize },\n 'border-radius-multiplier': borderRadiusMultiplier\n }\n }\n } = theme;\n return css`\n background-color: var(--bg);\n color: ${light};\n height: ${iconSize};\n width: ${iconSize};\n border-radius: calc(${borderRadiusMultiplier} * ${baseBorderRadius});\n font-size: calc(0.7 * ${baseFontSize});\n font-weight: ${semiBoldWeight};\n user-select: none;\n -webkit-user-select: none;\n `;\n});\n\nStyledTextFrame.defaultProps = defaultThemeProp;\n\nconst StyledThumbnailFrame = styled(StyledFileVisual)(({ theme }) => {\n return css`\n background-color: ${theme.base.palette['app-background']};\n height: 100%;\n width: 100%;\n\n ${StyledImage} {\n margin: auto;\n height: unset;\n width: unset;\n max-height: 100%;\n max-width: 100%;\n }\n `;\n});\n\nStyledThumbnailFrame.defaultProps = defaultThemeProp;\n\nconst FileVisual: FC<FileVisualProps & ForwardProps> = forwardRef(function FileVisual(\n { type, thumbnail, onThumbnailError, ...restProps }: PropsWithoutRef<FileVisualProps>,\n ref: FileVisualProps['ref']\n) {\n const visualConfig = mapping[type];\n\n const [color, lightness] = visualConfig.backgroundColor.split('.', 2) as [\n ThemeColor,\n ThemeColorVariant\n ];\n\n const {\n base: {\n colors: {\n [color]: { [lightness]: backgroundColor }\n },\n palette: { light: foregroundColor }\n }\n } = useTheme();\n\n if (thumbnail) {\n return (\n <Flex {...restProps} as={StyledThumbnailFrame} container>\n <Image src={thumbnail} onError={onThumbnailError} alt='' />\n </Flex>\n );\n }\n\n return (\n <>\n {visualConfig.iconName ? (\n <Icon\n {...restProps}\n ref={ref}\n name={visualConfig.iconName}\n background={backgroundColor}\n foreground={foregroundColor}\n />\n ) : (\n <Flex\n {...restProps}\n as={StyledTextFrame}\n ref={ref}\n container={{ justify: 'center', alignItems: 'center' }}\n style={{ '--bg': backgroundColor } as CSSProperties}\n >\n {visualConfig.text}\n </Flex>\n )}\n </>\n );\n});\n\nexport default FileVisual;\n"]}
@@ -1,5 +1,5 @@
1
- import { FunctionComponent, Ref, ReactNode } from 'react';
2
- import { ForwardProps, BaseProps, AsProp, RequireAtLeastOne } from '../../types';
1
+ import type { FunctionComponent, Ref, ReactNode } from 'react';
2
+ import type { ForwardProps, BaseProps, AsProp, RequireAtLeastOne } from '../../types';
3
3
  type PaddingValue = number | undefined;
4
4
  export interface FlexContainerProps {
5
5
  /** Display as inline-flex. */
@@ -1 +1 @@
1
- {"version":3,"file":"Flex.d.ts","sourceRoot":"","sources":["../../../src/components/Flex/Flex.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAA+B,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvF,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGjF,KAAK,YAAY,GAAG,MAAM,GAAG,SAAS,CAAC;AAEvC,MAAM,WAAW,kBAAkB;IAC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,CAAC,UAAU,CAAC;gBACxD,kBAAkB,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC;gBAC/D,aAAa,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,IAAI,CAAC;;WAEjD,CACJ;KACF,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,UAAU,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE3C,MAAM,IAAI,GAAgD,UAAU,CAAC,SAAS,IAAI,CAChF,KAAiC,EACjC,GAAqB;IAErB,OAAO,KAAC,UAAU,OAAK,KAAK,EAAE,GAAG,EAAE,GAAG,GAAI,CAAC;AAC7C,CAAC,CAAC,CAAC;AAEH,eAAe,IAAI,CAAC","sourcesContent":["import { FunctionComponent, forwardRef, PropsWithoutRef, Ref, ReactNode } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { ForwardProps, BaseProps, AsProp, RequireAtLeastOne } from '../../types';\nimport { defaultThemeProp } from '../../theme';\n\ntype PaddingValue = number | undefined;\n\nexport interface FlexContainerProps {\n /** Display as inline-flex. */\n inline?: boolean;\n /** Padding on the container represented as a multiplier or set of multipliers to the base spacing value in the theme. */\n pad?:\n | number\n | [blockInline: PaddingValue]\n | [block: PaddingValue, inline: PaddingValue]\n | [blockStart: PaddingValue, inline: PaddingValue, blockEnd: PaddingValue]\n | [\n blockStart: PaddingValue,\n inlineEnd: PaddingValue,\n inlineStart: PaddingValue,\n blockEnd: PaddingValue\n ];\n /** [flex-direction](https://css-tricks.com/almanac/properties/f/flex-direction/) */\n direction?: 'row' | 'row-reverse' | 'column' | 'column-reverse';\n /** [justify-content](https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content) */\n justify?: 'start' | 'end' | 'center' | 'between' | 'around' | 'evenly' | 'stretch';\n /** [flex-wrap](https://css-tricks.com/almanac/properties/f/flex-wrap/) */\n wrap?: 'wrap' | 'nowrap' | 'wrap-reverse';\n /** [align-items](https://css-tricks.com/almanac/properties/a/align-items/). */\n alignItems?: 'stretch' | 'start' | 'end' | 'center' | 'baseline';\n /** [align-content](https://css-tricks.com/almanac/properties/a/align-content/) */\n alignContent?: 'start' | 'end' | 'center' | 'between' | 'around' | 'stretch';\n /**\n * Defines how much equal space to place between items represented as a multiplier to the base spacing value in the theme.\n * @deprecated\n */\n itemGap?: number;\n /**\n * Defines how much equal space to place between columns represented as a multiplier to the base spacing value in the theme.\n * [column-gap](https://css-tricks.com/almanac/properties/c/column-gap/)\n */\n colGap?: number;\n /**\n * Defines how much equal space to place between rows represented as a multiplier to the base spacing value in the theme.\n * [row-gap](https://css-tricks.com/almanac/properties/r/row-gap/)\n */\n rowGap?: number;\n /**\n * Defines how much equal space to place between both rows and columns represented as a multiplier to the base spacing value in the theme.\n * [gap](https://css-tricks.com/almanac/properties/g/gap/)\n */\n gap?: number;\n}\n\nexport interface FlexItemProps {\n /** [align-self](https://css-tricks.com/almanac/properties/a/align-self/) */\n alignSelf?: 'auto' | 'start' | 'end' | 'baseline' | 'center' | 'stretch';\n /** [flex-grow](https://css-tricks.com/almanac/properties/f/flex-grow/) */\n grow?: number;\n /** [flex-shrink](https://css-tricks.com/almanac/properties/f/flex-shrink/) */\n shrink?: number;\n /** [flex-basis](https://css-tricks.com/almanac/properties/f/flex-basis/) */\n basis?: string;\n}\n\nexport interface BaseFlexProps {\n container?: FlexContainerProps | true;\n item?: FlexItemProps;\n}\n\ntype BreakpointFlexProps = RequireAtLeastOne<BaseFlexProps, 'container' | 'item'>;\n\nexport type FlexProps = RequireAtLeastOne<\n BaseFlexProps &\n BaseProps &\n AsProp & {\n /** Content for either a container or item. */\n children?: ReactNode;\n /** Ref for the flex element. */\n ref?: Ref<Element>;\n /** Override props at extra small screen sizes and above. */\n xs?: BreakpointFlexProps;\n /** Override props at small screen sizes and above. */\n sm?: BreakpointFlexProps;\n /** Override props at medium screen sizes and above. */\n md?: BreakpointFlexProps;\n /** Override props at large screen sizes and above. */\n lg?: BreakpointFlexProps;\n /** Override props at extra large screen sizes and above. */\n xl?: BreakpointFlexProps;\n },\n 'container' | 'item' | 'xs' | 'sm' | 'md' | 'lg' | 'xl'\n>;\n\nconst prefix = (value: string) => {\n if (['between', 'around', 'evenly'].includes(value)) return `space-${value}`;\n if (['start', 'end'].includes(value)) return `flex-${value}`;\n return value;\n};\n\nconst getLogicalPadding = (pad: FlexContainerProps['pad']) => {\n if (!Array.isArray(pad)) {\n return [pad, pad, pad, pad];\n }\n\n switch (pad.length) {\n case 1:\n return [pad[0], pad[0], pad[0], pad[0]];\n case 2:\n return [pad[0], pad[1], pad[0], pad[1]];\n case 3:\n return [pad[0], pad[1], pad[2], pad[1]];\n case 4:\n return pad;\n default:\n return [undefined, undefined, undefined, undefined];\n }\n};\n\nconst getContainerStyles = (container: FlexProps['container'], spacing: string) => {\n if (!container) return '';\n\n if (container === true) {\n return css`\n display: flex;\n `;\n }\n\n const paddingConfig = getLogicalPadding(container.pad);\n\n if (container && typeof container === 'object') {\n const isRow = !container.direction || container.direction.includes('row');\n const isReverse = container.direction && container.direction.includes('reverse');\n\n return css`\n display: ${container.inline ? 'inline-flex' : 'flex'};\n\n ${paddingConfig[0] !== undefined &&\n css`\n padding-block-start: calc(${paddingConfig[0]} * ${spacing});\n `}\n ${paddingConfig[1] !== undefined &&\n css`\n padding-inline-end: calc(${paddingConfig[1]} * ${spacing});\n `}\n\n ${paddingConfig[2] !== undefined &&\n css`\n padding-block-end: calc(${paddingConfig[2]} * ${spacing});\n `}\n\n ${paddingConfig[3] !== undefined &&\n css`\n padding-inline-start: calc(${paddingConfig[3]} * ${spacing});\n `}\n\n ${container.direction &&\n css`\n flex-direction: ${container.direction};\n `}\n\n ${container.justify &&\n css`\n justify-content: ${prefix(container.justify)};\n `}\n\n ${container.wrap &&\n css`\n flex-wrap: ${container.wrap};\n `}\n\n ${container.alignItems &&\n css`\n align-items: ${prefix(container.alignItems)};\n `}\n\n ${container.alignContent &&\n css`\n align-content: ${prefix(container.alignContent)};\n `}\n\n ${container.itemGap &&\n css`\n > * {\n margin-${isRow ? 'inline-start' : 'block-start'}: calc(${container.itemGap} * ${props =>\n props.theme.base.spacing});\n ${isReverse ? ':last-child' : ':first-child'} {\n margin-${isRow ? 'inline-start' : 'block-start'}: 0;\n }\n }\n `}\n\n ${container.gap !== undefined &&\n css`\n gap: calc(${container.gap} * ${props => props.theme.base.spacing});\n `}\n\n ${container.colGap !== undefined &&\n css`\n column-gap: calc(${container.colGap} * ${props => props.theme.base.spacing});\n `}\n\n ${container.rowGap !== undefined &&\n css`\n row-gap: calc(${container.rowGap} * ${props => props.theme.base.spacing});\n `}\n `;\n }\n};\n\nconst getItemStyles = (item: FlexProps['item']) => {\n return css`\n ${item &&\n css`\n max-width: 100%;\n min-width: 0;\n\n ${item.grow !== undefined &&\n css`\n flex-grow: ${item.grow};\n `}\n\n ${item.shrink !== undefined &&\n css`\n flex-shrink: ${item.shrink};\n `}\n\n ${item.alignSelf &&\n css`\n align-self: ${prefix(item.alignSelf)};\n `}\n\n ${item.basis &&\n css`\n flex-basis: ${item.basis};\n `}\n `}\n `;\n};\n\nconst breakpointOrder = ['xs', 'sm', 'md', 'lg', 'xl'] as const;\n\nexport const StyledFlex = styled.div<FlexProps>(\n ({\n container,\n item,\n theme: {\n base: { breakpoints: themeBreakpoints, spacing }\n },\n xs,\n sm,\n md,\n lg,\n xl\n }) => {\n const breakpoints = {\n xs,\n sm,\n md,\n lg,\n xl\n };\n\n return css`\n ${getContainerStyles(container, spacing)}\n ${getItemStyles(item)}\n\n ${breakpointOrder.map(\n breakpoint =>\n breakpoints[breakpoint] &&\n css`\n @media screen and (min-width: ${themeBreakpoints[breakpoint]}) {\n ${getContainerStyles(breakpoints[breakpoint]?.container, spacing)}\n ${getItemStyles(breakpoints[breakpoint]?.item)}\n }\n `\n )}\n `;\n }\n);\n\nStyledFlex.defaultProps = defaultThemeProp;\n\nconst Flex: FunctionComponent<FlexProps & ForwardProps> = forwardRef(function Flex(\n props: PropsWithoutRef<FlexProps>,\n ref: FlexProps['ref']\n) {\n return <StyledFlex {...props} ref={ref} />;\n});\n\nexport default Flex;\n"]}
1
+ {"version":3,"file":"Flex.js","sourceRoot":"","sources":["../../../src/components/Flex/Flex.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AA2F/C,MAAM,MAAM,GAAG,CAAC,KAAa,EAAE,EAAE;IAC/B,IAAI,CAAC,SAAS,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,SAAS,KAAK,EAAE,CAAC;IAC7E,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,QAAQ,KAAK,EAAE,CAAC;IAC7D,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,CAAC,GAA8B,EAAE,EAAE;IAC3D,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;QACvB,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;KAC7B;IAED,QAAQ,GAAG,CAAC,MAAM,EAAE;QAClB,KAAK,CAAC;YACJ,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1C,KAAK,CAAC;YACJ,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1C,KAAK,CAAC;YACJ,OAAO,CAAC,GAAG,CAAC,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AA;4CAC+B,gBAAgB,CAAC,UAAU,CAAC;gBACxD,kBAAkB,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC;gBAC/D,aAAa,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,IAAI,CAAC;;WAEjD,CACJ;KACF,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,UAAU,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE3C,MAAM,IAAI,GAAgD,UAAU,CAAC,SAAS,IAAI,CAChF,KAAiC,EACjC,GAAqB;IAErB,OAAO,KAAC,UAAU,OAAK,KAAK,EAAE,GAAG,EAAE,GAAG,GAAI,CAAC;AAC7C,CAAC,CAAC,CAAC;AAEH,eAAe,IAAI,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { FunctionComponent, PropsWithoutRef, Ref, ReactNode } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport type { ForwardProps, BaseProps, AsProp, RequireAtLeastOne } from '../../types';\nimport { defaultThemeProp } from '../../theme';\n\ntype PaddingValue = number | undefined;\n\nexport interface FlexContainerProps {\n /** Display as inline-flex. */\n inline?: boolean;\n /** Padding on the container represented as a multiplier or set of multipliers to the base spacing value in the theme. */\n pad?:\n | number\n | [blockInline: PaddingValue]\n | [block: PaddingValue, inline: PaddingValue]\n | [blockStart: PaddingValue, inline: PaddingValue, blockEnd: PaddingValue]\n | [\n blockStart: PaddingValue,\n inlineEnd: PaddingValue,\n inlineStart: PaddingValue,\n blockEnd: PaddingValue\n ];\n /** [flex-direction](https://css-tricks.com/almanac/properties/f/flex-direction/) */\n direction?: 'row' | 'row-reverse' | 'column' | 'column-reverse';\n /** [justify-content](https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content) */\n justify?: 'start' | 'end' | 'center' | 'between' | 'around' | 'evenly' | 'stretch';\n /** [flex-wrap](https://css-tricks.com/almanac/properties/f/flex-wrap/) */\n wrap?: 'wrap' | 'nowrap' | 'wrap-reverse';\n /** [align-items](https://css-tricks.com/almanac/properties/a/align-items/). */\n alignItems?: 'stretch' | 'start' | 'end' | 'center' | 'baseline';\n /** [align-content](https://css-tricks.com/almanac/properties/a/align-content/) */\n alignContent?: 'start' | 'end' | 'center' | 'between' | 'around' | 'stretch';\n /**\n * Defines how much equal space to place between items represented as a multiplier to the base spacing value in the theme.\n * @deprecated\n */\n itemGap?: number;\n /**\n * Defines how much equal space to place between columns represented as a multiplier to the base spacing value in the theme.\n * [column-gap](https://css-tricks.com/almanac/properties/c/column-gap/)\n */\n colGap?: number;\n /**\n * Defines how much equal space to place between rows represented as a multiplier to the base spacing value in the theme.\n * [row-gap](https://css-tricks.com/almanac/properties/r/row-gap/)\n */\n rowGap?: number;\n /**\n * Defines how much equal space to place between both rows and columns represented as a multiplier to the base spacing value in the theme.\n * [gap](https://css-tricks.com/almanac/properties/g/gap/)\n */\n gap?: number;\n}\n\nexport interface FlexItemProps {\n /** [align-self](https://css-tricks.com/almanac/properties/a/align-self/) */\n alignSelf?: 'auto' | 'start' | 'end' | 'baseline' | 'center' | 'stretch';\n /** [flex-grow](https://css-tricks.com/almanac/properties/f/flex-grow/) */\n grow?: number;\n /** [flex-shrink](https://css-tricks.com/almanac/properties/f/flex-shrink/) */\n shrink?: number;\n /** [flex-basis](https://css-tricks.com/almanac/properties/f/flex-basis/) */\n basis?: string;\n}\n\nexport interface BaseFlexProps {\n container?: FlexContainerProps | true;\n item?: FlexItemProps;\n}\n\ntype BreakpointFlexProps = RequireAtLeastOne<BaseFlexProps, 'container' | 'item'>;\n\nexport type FlexProps = RequireAtLeastOne<\n BaseFlexProps &\n BaseProps &\n AsProp & {\n /** Content for either a container or item. */\n children?: ReactNode;\n /** Ref for the flex element. */\n ref?: Ref<Element>;\n /** Override props at extra small screen sizes and above. */\n xs?: BreakpointFlexProps;\n /** Override props at small screen sizes and above. */\n sm?: BreakpointFlexProps;\n /** Override props at medium screen sizes and above. */\n md?: BreakpointFlexProps;\n /** Override props at large screen sizes and above. */\n lg?: BreakpointFlexProps;\n /** Override props at extra large screen sizes and above. */\n xl?: BreakpointFlexProps;\n },\n 'container' | 'item' | 'xs' | 'sm' | 'md' | 'lg' | 'xl'\n>;\n\nconst prefix = (value: string) => {\n if (['between', 'around', 'evenly'].includes(value)) return `space-${value}`;\n if (['start', 'end'].includes(value)) return `flex-${value}`;\n return value;\n};\n\nconst getLogicalPadding = (pad: FlexContainerProps['pad']) => {\n if (!Array.isArray(pad)) {\n return [pad, pad, pad, pad];\n }\n\n switch (pad.length) {\n case 1:\n return [pad[0], pad[0], pad[0], pad[0]];\n case 2:\n return [pad[0], pad[1], pad[0], pad[1]];\n case 3:\n return [pad[0], pad[1], pad[2], pad[1]];\n case 4:\n return pad;\n default:\n return [undefined, undefined, undefined, undefined];\n }\n};\n\nconst getContainerStyles = (container: FlexProps['container'], spacing: string) => {\n if (!container) return '';\n\n if (container === true) {\n return css`\n display: flex;\n `;\n }\n\n const paddingConfig = getLogicalPadding(container.pad);\n\n if (container && typeof container === 'object') {\n const isRow = !container.direction || container.direction.includes('row');\n const isReverse = container.direction && container.direction.includes('reverse');\n\n return css`\n display: ${container.inline ? 'inline-flex' : 'flex'};\n\n ${paddingConfig[0] !== undefined &&\n css`\n padding-block-start: calc(${paddingConfig[0]} * ${spacing});\n `}\n ${paddingConfig[1] !== undefined &&\n css`\n padding-inline-end: calc(${paddingConfig[1]} * ${spacing});\n `}\n\n ${paddingConfig[2] !== undefined &&\n css`\n padding-block-end: calc(${paddingConfig[2]} * ${spacing});\n `}\n\n ${paddingConfig[3] !== undefined &&\n css`\n padding-inline-start: calc(${paddingConfig[3]} * ${spacing});\n `}\n\n ${container.direction &&\n css`\n flex-direction: ${container.direction};\n `}\n\n ${container.justify &&\n css`\n justify-content: ${prefix(container.justify)};\n `}\n\n ${container.wrap &&\n css`\n flex-wrap: ${container.wrap};\n `}\n\n ${container.alignItems &&\n css`\n align-items: ${prefix(container.alignItems)};\n `}\n\n ${container.alignContent &&\n css`\n align-content: ${prefix(container.alignContent)};\n `}\n\n ${container.itemGap &&\n css`\n > * {\n margin-${isRow ? 'inline-start' : 'block-start'}: calc(${container.itemGap} * ${props =>\n props.theme.base.spacing});\n ${isReverse ? ':last-child' : ':first-child'} {\n margin-${isRow ? 'inline-start' : 'block-start'}: 0;\n }\n }\n `}\n\n ${container.gap !== undefined &&\n css`\n gap: calc(${container.gap} * ${props => props.theme.base.spacing});\n `}\n\n ${container.colGap !== undefined &&\n css`\n column-gap: calc(${container.colGap} * ${props => props.theme.base.spacing});\n `}\n\n ${container.rowGap !== undefined &&\n css`\n row-gap: calc(${container.rowGap} * ${props => props.theme.base.spacing});\n `}\n `;\n }\n};\n\nconst getItemStyles = (item: FlexProps['item']) => {\n return css`\n ${item &&\n css`\n max-width: 100%;\n min-width: 0;\n\n ${item.grow !== undefined &&\n css`\n flex-grow: ${item.grow};\n `}\n\n ${item.shrink !== undefined &&\n css`\n flex-shrink: ${item.shrink};\n `}\n\n ${item.alignSelf &&\n css`\n align-self: ${prefix(item.alignSelf)};\n `}\n\n ${item.basis &&\n css`\n flex-basis: ${item.basis};\n `}\n `}\n `;\n};\n\nconst breakpointOrder = ['xs', 'sm', 'md', 'lg', 'xl'] as const;\n\nexport const StyledFlex = styled.div<FlexProps>(\n ({\n container,\n item,\n theme: {\n base: { breakpoints: themeBreakpoints, spacing }\n },\n xs,\n sm,\n md,\n lg,\n xl\n }) => {\n const breakpoints = {\n xs,\n sm,\n md,\n lg,\n xl\n };\n\n return css`\n ${getContainerStyles(container, spacing)}\n ${getItemStyles(item)}\n\n ${breakpointOrder.map(\n breakpoint =>\n breakpoints[breakpoint] &&\n css`\n @media screen and (min-width: ${themeBreakpoints[breakpoint]}) {\n ${getContainerStyles(breakpoints[breakpoint]?.container, spacing)}\n ${getItemStyles(breakpoints[breakpoint]?.item)}\n }\n `\n )}\n `;\n }\n);\n\nStyledFlex.defaultProps = defaultThemeProp;\n\nconst Flex: FunctionComponent<FlexProps & ForwardProps> = forwardRef(function Flex(\n props: PropsWithoutRef<FlexProps>,\n ref: FlexProps['ref']\n) {\n return <StyledFlex {...props} ref={ref} />;\n});\n\nexport default Flex;\n"]}
@@ -1,6 +1,6 @@
1
- import { FC } from 'react';
2
- import { ForwardProps, OmitStrict, TestIdProp } from '../../types';
3
- import { type BaseFormProps } from '../MultiStepForm/MultiStepForm.types';
1
+ import type { FC } from 'react';
2
+ import type { ForwardProps, OmitStrict, TestIdProp } from '../../types';
3
+ import type { BaseFormProps } from '../MultiStepForm/MultiStepForm.types';
4
4
  export interface FormProps extends OmitStrict<BaseFormProps, 'content'>, TestIdProp {
5
5
  /** The Form content. Recommended composing form elements within a layout template such as Grid or Flex as the only child. */
6
6
  children: BaseFormProps['content'];
@@ -1 +1 @@
1
- {"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../../src/components/Form/Form.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,EAAE,EAAmB,MAAM,OAAO,CAAC;AAExD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAGnE,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAK1E,MAAM,WAAW,SAAU,SAAQ,UAAU,CAAC,aAAa,EAAE,SAAS,CAAC,EAAE,UAAU;IACjF,6HAA6H;IAC7H,QAAQ,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;CACpC;;;;AAyCD,wBAAiD"}
1
+ {"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../../src/components/Form/Form.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAmB,MAAM,OAAO,CAAC;AAEjD,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAGxE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAK1E,MAAM,WAAW,SAAU,SAAQ,UAAU,CAAC,aAAa,EAAE,SAAS,CAAC,EAAE,UAAU;IACjF,6HAA6H;IAC7H,QAAQ,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;CACpC;;;;AAyCD,wBAAiD"}
@@ -1 +1 @@
1
- {"version":3,"file":"Form.js","sourceRoot":"","sources":["../../../src/components/Form/Form.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAuB,MAAM,OAAO,CAAC;AAGxD,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAOjD,MAAM,IAAI,GAAiC,UAAU,CAAC,SAAS,IAAI,CACjE,EACE,MAAM,EACN,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,OAAO,EACP,WAAW,EACX,OAAO,EACP,GAAG,SAAS,EACe,EAC7B,GAAqB;IAErB,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC;IACxB,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAEnD,OAAO,CACL,KAAC,aAAa,mBACC,OAAO,CAAC,IAAI,KACrB,SAAS,EACb,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE;YACL;gBACE,EAAE,EAAE,MAAM;gBACV,IAAI,EAAE,EAAE;gBACR,OAAO;gBACP,OAAO,EAAE,QAAQ;gBACjB,WAAW;gBACX,OAAO;aACR;SACF,EACD,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,QAAQ,EAClB,GAAG,EAAE,GAAG,EACR,YAAY,EAAC,KAAK,GAClB,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC","sourcesContent":["import { forwardRef, FC, PropsWithoutRef } from 'react';\n\nimport { ForwardProps, OmitStrict, TestIdProp } from '../../types';\nimport { useTestIds, useUID } from '../../hooks';\nimport MultiStepForm from '../MultiStepForm';\nimport { type BaseFormProps } from '../MultiStepForm/MultiStepForm.types';\nimport { withTestIds } from '../../utils';\n\nimport { getFormTestIds } from './Form.test-ids';\n\nexport interface FormProps extends OmitStrict<BaseFormProps, 'content'>, TestIdProp {\n /** The Form content. Recommended composing form elements within a layout template such as Grid or Flex as the only child. */\n children: BaseFormProps['content'];\n}\n\nconst Form: FC<FormProps & ForwardProps> = forwardRef(function Form(\n {\n testId,\n children,\n actions,\n progress,\n heading,\n description,\n banners,\n ...restProps\n }: PropsWithoutRef<FormProps>,\n ref: FormProps['ref']\n) {\n const stepId = useUID();\n const testIds = useTestIds(testId, getFormTestIds);\n\n return (\n <MultiStepForm\n data-testid={testIds.root}\n {...restProps}\n heading={heading}\n steps={[\n {\n id: stepId,\n name: '',\n actions,\n content: children,\n description,\n banners\n }\n ]}\n currentStepId={stepId}\n progress={progress}\n ref={ref}\n autoComplete='off'\n />\n );\n});\n\nexport default withTestIds(Form, getFormTestIds);\n"]}
1
+ {"version":3,"file":"Form.js","sourceRoot":"","sources":["../../../src/components/Form/Form.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAInC,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAOjD,MAAM,IAAI,GAAiC,UAAU,CAAC,SAAS,IAAI,CACjE,EACE,MAAM,EACN,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,OAAO,EACP,WAAW,EACX,OAAO,EACP,GAAG,SAAS,EACe,EAC7B,GAAqB;IAErB,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC;IACxB,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAEnD,OAAO,CACL,KAAC,aAAa,mBACC,OAAO,CAAC,IAAI,KACrB,SAAS,EACb,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE;YACL;gBACE,EAAE,EAAE,MAAM;gBACV,IAAI,EAAE,EAAE;gBACR,OAAO;gBACP,OAAO,EAAE,QAAQ;gBACjB,WAAW;gBACX,OAAO;aACR;SACF,EACD,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,QAAQ,EAClB,GAAG,EAAE,GAAG,EACR,YAAY,EAAC,KAAK,GAClB,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { FC, PropsWithoutRef } from 'react';\n\nimport type { ForwardProps, OmitStrict, TestIdProp } from '../../types';\nimport { useTestIds, useUID } from '../../hooks';\nimport MultiStepForm from '../MultiStepForm';\nimport type { BaseFormProps } from '../MultiStepForm/MultiStepForm.types';\nimport { withTestIds } from '../../utils';\n\nimport { getFormTestIds } from './Form.test-ids';\n\nexport interface FormProps extends OmitStrict<BaseFormProps, 'content'>, TestIdProp {\n /** The Form content. Recommended composing form elements within a layout template such as Grid or Flex as the only child. */\n children: BaseFormProps['content'];\n}\n\nconst Form: FC<FormProps & ForwardProps> = forwardRef(function Form(\n {\n testId,\n children,\n actions,\n progress,\n heading,\n description,\n banners,\n ...restProps\n }: PropsWithoutRef<FormProps>,\n ref: FormProps['ref']\n) {\n const stepId = useUID();\n const testIds = useTestIds(testId, getFormTestIds);\n\n return (\n <MultiStepForm\n data-testid={testIds.root}\n {...restProps}\n heading={heading}\n steps={[\n {\n id: stepId,\n name: '',\n actions,\n content: children,\n description,\n banners\n }\n ]}\n currentStepId={stepId}\n progress={progress}\n ref={ref}\n autoComplete='off'\n />\n );\n});\n\nexport default withTestIds(Form, getFormTestIds);\n"]}
@@ -1,6 +1,6 @@
1
- import { FunctionComponent, ReactNode } from 'react';
2
- import { BaseProps, ForwardProps } from '../../types';
3
- import { AdditionalInfoProps } from '../AdditionalInfo';
1
+ import type { FunctionComponent, ReactNode } from 'react';
2
+ import type { BaseProps, ForwardProps } from '../../types';
3
+ import type { AdditionalInfoProps } from '../AdditionalInfo';
4
4
  export interface FormControlProps extends BaseProps {
5
5
  /**
6
6
  * Sets DOM id for the control and associates label element via 'for' attribute.
@@ -1 +1 @@
1
- {"version":3,"file":"FormControl.d.ts","sourceRoot":"","sources":["../../../src/components/FormControl/FormControl.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAAwB,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvF,OAAO,EAAE,SAAS,EAAE,YAAY,EAAqB,MAAM,aAAa,CAAC;AAGzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,MAAM,WAAW,gBAAiB,SAAQ,SAAS;IACjD;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,oDAAoD;IACpD,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IACrD,2DAA2D;IAC3D,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,uCAAuC;IACvC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,6GAA6G;IAC7G,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,wEAAwE;IACxE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iEAAiE;IACjE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sEAAsE;IACtE,cAAc,CAAC,EAAE;QACf,OAAO,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;QACxC,OAAO,EAAE,mBAAmB,CAAC,UAAU,CAAC,CAAC;KAC1C,CAAC;IACF;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,0DAA0D;IAC1D,QAAQ,CAAC,EA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;;UAIC,aAAa;QACf,GAAG,CAAA;8BACmB,UAAU;SAC/B;;;;UAIC,CAAC,MAAM;QACT,GAAG,CAAA;0BACe,gBAAgB;SACjC;UACC,aAAa;QACf,GAAG,CAAA;8BACmB,UAAU;uCACD,IAAI,CAAC,WAAW,EAAE,GAAG,CAAC;SACpD;;;QAGD,aAAa;QACf,GAAG,CAAA;;OAEF;;;4BAGqB,uBAAuB;wBAC3B,mBAAmB;;;;;yBAKlB,QAAQ,CAAC,CAAC;;KAE9B,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,iBAAiB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAElD,MAAM,WAAW,GAAuD,UAAU,CAChF,SAAS,WAAW,CAAC,KAAwC,EAAE,GAAwB;IACrF,OAAO,KAAC,iBAAiB,IAAC,GAAG,EAAE,GAAG,KAAM,KAAK,GAAI,CAAC;AACpD,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import { forwardRef, FunctionComponent, PropsWithoutRef, Ref, ReactNode } from 'react';\nimport styled, { css } from 'styled-components';\nimport { mix, rgba } from 'polished';\n\nimport { BaseProps, ForwardProps, PropsWithDefaults } from '../../types';\nimport { defaultThemeProp } from '../../theme';\nimport { calculateFontSize } from '../../styles';\nimport { AdditionalInfoProps } from '../AdditionalInfo';\n\nexport interface FormControlProps extends BaseProps {\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?: string;\n /** Set visual state based on a validation state. */\n status?: 'success' | 'warning' | 'error' | 'pending';\n /** Pass a string or a fragment with an Icon and string. */\n label?: ReactNode;\n /** Visually hides the label region. */\n labelHidden?: boolean;\n /** It is recommended to pass a simple string to offer guidance. Text will be styled based on status prop. */\n info?: ReactNode;\n /** Indicate if the field is required. The browser defaults to false. */\n required?: boolean;\n /** Placeholder text. The browser defaults to an empty string. */\n placeholder?: string;\n /** Button when clicked will show additional information on a field */\n additionalInfo?: {\n heading: AdditionalInfoProps['heading'];\n content: AdditionalInfoProps['children'];\n };\n /**\n * Creates a controlled input and sets the value. Requires an onChange handler to update value.\n * value + onChange is the recommended method per React team.\n */\n value?: string;\n /**\n * If you wish to use an [uncontrolled input](https://reactjs.org/docs/uncontrolled-components.html),\n * pass a defaultValue prop and a ref to access the input's native value prop or by other DOM ref means.\n */\n defaultValue?: string;\n /** Disable the control. The browser defaults to false. */\n disabled?: boolean;\n /** Makes the input non editable and non clickable. The browser defaults to false. */\n readOnly?: boolean;\n /** Sets html name attribute for the underlying control. Useful for mapping to a data field. */\n name?: string;\n /** Callback fired when AI suggestion is accepted/rejected */\n onResolveSuggestion?: (accepted: boolean) => void;\n}\n\ntype FormControlPropsWithDefaults = PropsWithDefaults<FormControlProps>;\n\nexport interface HandleValue {\n /** Used to clear component inputs with imperative handle */\n clear: () => void;\n}\n\nexport const StyledFormControl = styled.div<\n FormControlPropsWithDefaults & { hasSuggestion?: boolean }\n>(\n ({\n theme: {\n base: {\n 'border-radius': baseRadius,\n 'font-size': baseFontSize,\n 'font-scale': baseFontScale,\n animation: { speed, timing },\n palette\n },\n components: {\n 'form-field': formField,\n 'form-control': {\n 'foreground-color': foreground,\n 'background-color': background,\n 'border-color': brd,\n 'border-radius': radius,\n 'border-width': borderWidth,\n ':hover': { 'border-color': hoverBorderColor },\n ':focus': { 'border-color': focusBorderColor, 'box-shadow': shadow },\n ':disabled': {\n 'border-color': disabledBorderColor,\n 'background-color': disabledBackgroundColor\n },\n ':read-only': {\n 'border-color': readOnlyBorderColor,\n 'background-color': readOnlyBackgroundColor\n }\n }\n }\n },\n status,\n hasSuggestion\n }) => {\n const fontSize = calculateFontSize(baseFontSize, baseFontScale);\n const borderColor = status && formField[status] ? formField[status]['status-color'] : brd;\n const backgroundColor =\n hasSuggestion && status\n ? mix(0.1, formField[status]['status-color'], palette['primary-background'])\n : background;\n\n return css`\n color: ${foreground};\n background-color: ${backgroundColor};\n border-radius: calc(${baseRadius} * ${radius});\n border-color: ${borderColor};\n border-width: ${borderWidth};\n border-style: solid;\n transition-property: color, background-color, border-color;\n transition-duration: ${speed};\n transition-timing-function: ${timing.ease};\n &,\n & > select {\n outline: none;\n }\n\n &:disabled,\n &[disabled] {\n background-color: ${disabledBackgroundColor};\n border-color: ${disabledBorderColor};\n cursor: not-allowed;\n }\n\n &:focus:not([disabled]) {\n border-color: ${focusBorderColor};\n box-shadow: ${shadow};\n ${hasSuggestion &&\n css`\n background-color: ${background};\n `}\n }\n\n &:focus-within:not([disabled]) {\n ${hasSuggestion &&\n css`\n background-color: ${background};\n `}\n }\n\n &:hover:not([readonly]):not([disabled]):not(:focus, :focus-within) {\n ${!status &&\n css`\n border-color: ${hoverBorderColor};\n `}\n ${hasSuggestion &&\n css`\n background-color: ${background};\n box-shadow: 0 0 0 0.125rem ${rgba(borderColor, 0.2)};\n `}\n }\n\n ${hasSuggestion &&\n css`\n border-end-end-radius: 0;\n `}\n\n &[readonly] {\n background-color: ${readOnlyBackgroundColor};\n border-color: ${readOnlyBorderColor};\n }\n\n @media (pointer: coarse) {\n /* stylelint-disable-next-line unit-allowed-list */\n font-size: max(${fontSize.s}, 16px);\n }\n `;\n }\n);\n\nStyledFormControl.defaultProps = defaultThemeProp;\n\nconst FormControl: FunctionComponent<FormControlProps & ForwardProps> = forwardRef(\n function FormControl(props: PropsWithoutRef<FormControlProps>, ref: Ref<HTMLDivElement>) {\n return <StyledFormControl ref={ref} {...props} />;\n }\n);\n\nexport default FormControl;\n"]}
1
+ {"version":3,"file":"FormControl.js","sourceRoot":"","sources":["../../../src/components/FormControl/FormControl.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAGrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,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B,OAAO,GAAG,CAAA;eACC,UAAU;0BACC,eAAe;4BACb,UAAU,MAAM,MAAM;sBAC5B,WAAW;sBACX,WAAW;;;6BAGJ,KAAK;oCACE,MAAM,CAAC,IAAI;;;;;;;;4BAQnB,uBAAuB;wBAC3B,mBAAmB;;;;;wBAKnB,gBAAgB;sBAClB,MAAM;UAClB,aAAa;QACf,GAAG,CAAA;8BACmB,UAAU;SAC/B;;;;UAIC,aAAa;QACf,GAAG,CAAA;8BACmB,UAAU;SAC/B;;;;UAIC,CAAC,MAAM;QACT,GAAG,CAAA;0BACe,gBAAgB;SACjC;UACC,aAAa;QACf,GAAG,CAAA;8BACmB,UAAU;uCACD,IAAI,CAAC,WAAW,EAAE,GAAG,CAAC;SACpD;;;QAGD,aAAa;QACf,GAAG,CAAA;;OAEF;;;4BAGqB,uBAAuB;wBAC3B,mBAAmB;;;;;yBAKlB,QAAQ,CAAC,CAAC;;KAE9B,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,iBAAiB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAElD,MAAM,WAAW,GAAuD,UAAU,CAChF,SAAS,WAAW,CAAC,KAAwC,EAAE,GAAwB;IACrF,OAAO,KAAC,iBAAiB,IAAC,GAAG,EAAE,GAAG,KAAM,KAAK,GAAI,CAAC;AACpD,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { FunctionComponent, PropsWithoutRef, Ref, ReactNode } from 'react';\nimport styled, { css } from 'styled-components';\nimport { mix, rgba } from 'polished';\n\nimport type { BaseProps, ForwardProps, PropsWithDefaults } from '../../types';\nimport { defaultThemeProp } from '../../theme';\nimport { calculateFontSize } from '../../styles';\nimport type { AdditionalInfoProps } from '../AdditionalInfo';\n\nexport interface FormControlProps extends BaseProps {\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?: string;\n /** Set visual state based on a validation state. */\n status?: 'success' | 'warning' | 'error' | 'pending';\n /** Pass a string or a fragment with an Icon and string. */\n label?: ReactNode;\n /** Visually hides the label region. */\n labelHidden?: boolean;\n /** It is recommended to pass a simple string to offer guidance. Text will be styled based on status prop. */\n info?: ReactNode;\n /** Indicate if the field is required. The browser defaults to false. */\n required?: boolean;\n /** Placeholder text. The browser defaults to an empty string. */\n placeholder?: string;\n /** Button when clicked will show additional information on a field */\n additionalInfo?: {\n heading: AdditionalInfoProps['heading'];\n content: AdditionalInfoProps['children'];\n };\n /**\n * Creates a controlled input and sets the value. Requires an onChange handler to update value.\n * value + onChange is the recommended method per React team.\n */\n value?: string;\n /**\n * If you wish to use an [uncontrolled input](https://reactjs.org/docs/uncontrolled-components.html),\n * pass a defaultValue prop and a ref to access the input's native value prop or by other DOM ref means.\n */\n defaultValue?: string;\n /** Disable the control. The browser defaults to false. */\n disabled?: boolean;\n /** Makes the input non editable and non clickable. The browser defaults to false. */\n readOnly?: boolean;\n /** Sets html name attribute for the underlying control. Useful for mapping to a data field. */\n name?: string;\n /** Callback fired when AI suggestion is accepted/rejected */\n onResolveSuggestion?: (accepted: boolean) => void;\n}\n\ntype FormControlPropsWithDefaults = PropsWithDefaults<FormControlProps>;\n\nexport interface HandleValue {\n /** Used to clear component inputs with imperative handle */\n clear: () => void;\n}\n\nexport const StyledFormControl = styled.div<\n FormControlPropsWithDefaults & { hasSuggestion?: boolean }\n>(\n ({\n theme: {\n base: {\n 'border-radius': baseRadius,\n 'font-size': baseFontSize,\n 'font-scale': baseFontScale,\n animation: { speed, timing },\n palette\n },\n components: {\n 'form-field': formField,\n 'form-control': {\n 'foreground-color': foreground,\n 'background-color': background,\n 'border-color': brd,\n 'border-radius': radius,\n 'border-width': borderWidth,\n ':hover': { 'border-color': hoverBorderColor },\n ':focus': { 'border-color': focusBorderColor, 'box-shadow': shadow },\n ':disabled': {\n 'border-color': disabledBorderColor,\n 'background-color': disabledBackgroundColor\n },\n ':read-only': {\n 'border-color': readOnlyBorderColor,\n 'background-color': readOnlyBackgroundColor\n }\n }\n }\n },\n status,\n hasSuggestion\n }) => {\n const fontSize = calculateFontSize(baseFontSize, baseFontScale);\n const borderColor = status && formField[status] ? formField[status]['status-color'] : brd;\n const backgroundColor =\n hasSuggestion && status\n ? mix(0.1, formField[status]['status-color'], palette['primary-background'])\n : background;\n\n return css`\n color: ${foreground};\n background-color: ${backgroundColor};\n border-radius: calc(${baseRadius} * ${radius});\n border-color: ${borderColor};\n border-width: ${borderWidth};\n border-style: solid;\n transition-property: color, background-color, border-color;\n transition-duration: ${speed};\n transition-timing-function: ${timing.ease};\n &,\n & > select {\n outline: none;\n }\n\n &:disabled,\n &[disabled] {\n background-color: ${disabledBackgroundColor};\n border-color: ${disabledBorderColor};\n cursor: not-allowed;\n }\n\n &:focus:not([disabled]) {\n border-color: ${focusBorderColor};\n box-shadow: ${shadow};\n ${hasSuggestion &&\n css`\n background-color: ${background};\n `}\n }\n\n &:focus-within:not([disabled]) {\n ${hasSuggestion &&\n css`\n background-color: ${background};\n `}\n }\n\n &:hover:not([readonly]):not([disabled]):not(:focus, :focus-within) {\n ${!status &&\n css`\n border-color: ${hoverBorderColor};\n `}\n ${hasSuggestion &&\n css`\n background-color: ${background};\n box-shadow: 0 0 0 0.125rem ${rgba(borderColor, 0.2)};\n `}\n }\n\n ${hasSuggestion &&\n css`\n border-end-end-radius: 0;\n `}\n\n &[readonly] {\n background-color: ${readOnlyBackgroundColor};\n border-color: ${readOnlyBorderColor};\n }\n\n @media (pointer: coarse) {\n /* stylelint-disable-next-line unit-allowed-list */\n font-size: max(${fontSize.s}, 16px);\n }\n `;\n }\n);\n\nStyledFormControl.defaultProps = defaultThemeProp;\n\nconst FormControl: FunctionComponent<FormControlProps & ForwardProps> = forwardRef(\n function FormControl(props: PropsWithoutRef<FormControlProps>, ref: Ref<HTMLDivElement>) {\n return <StyledFormControl ref={ref} {...props} />;\n }\n);\n\nexport default FormControl;\n"]}
@@ -1,9 +1,9 @@
1
- import { FC, ReactNode, ComponentType, ReactElement } from 'react';
2
- import { Action, ExcludeStrict, ForwardProps, OmitStrict, TestIdProp } from '../../types';
3
- import { FlexProps } from '../Flex';
4
- import { FormControlProps } from '../FormControl';
5
- import { LabelProps } from '../Label';
6
- import { elements } from './FormField.test-ids';
1
+ import type { FC, ReactNode, ComponentType, ReactElement } from 'react';
2
+ import type { Action, ExcludeStrict, ForwardProps, OmitStrict, TestIdProp } from '../../types';
3
+ import type { FlexProps } from '../Flex';
4
+ import type { FormControlProps } from '../FormControl';
5
+ import type { LabelProps } from '../Label';
6
+ import type { elements } from './FormField.test-ids';
7
7
  export interface FormFieldProps extends OmitStrict<FormControlProps, 'placeholder' | 'value' | 'defaultValue'>, TestIdProp<typeof elements> {
8
8
  /** Pass a single form control component i.e. Input | TextArea | Select | etc.. */
9
9
  children: ReactElement | ReactElement[];
@@ -1 +1 @@
1
- {"version":3,"file":"FormField.d.ts","sourceRoot":"","sources":["../../../src/components/FormField/FormField.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,EAAE,EACF,SAAS,EACT,aAAa,EAEb,YAAY,EAMb,MAAM,OAAO,CAAC;AAKf,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC1F,OAAa,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAc,EAAE,UAAU,EAAe,MAAM,UAAU,CAAC;AAW1D,OAAO,EAAuB,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAIrE,MAAM,WAAW,cACf,SAAQ,UAAU,CAAC,gBAAgB,EAAE,aAAa,GAAG,OAAO,GAAG,cAAc,CAAC,EAC5E,UAAU,CAAC,OAAO,QAAQ,CAAC;IAC7B,kFAAkF;IAClF,QAAQ,EAAE,YAAY,GAAG,YAAY,EAAE,CAAC;IACxC;;;;;;;;OAQG;IACH,EAAE,CAAC,EA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,EACD,EAAE,EAAE,eAAe,EACnB,aAAa,EAAE,aAAa,EAC5B,kBAAkB,EAAE,kBAAkB,EACtC,EAAE,EAAE,GAAG,EAAE,QAAQ,EACjB,WAAW,EAAE,EAAE,EACf,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,sBAC9B,aAAa,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,EAClE,GAAG,EAAE,eAAe,aAEnB,CAAC,aAAa,IAAI,CAAC,UAAU,CAAC,IAAI,QAAQ,EAC1C,OAAO,EACP,CAAC,aAAa,IAAI,UAAU,IAAI,QAAQ,EACxC,CAAC,QAAQ,IAAI,WAAW,IACpB,CACR,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC","sourcesContent":["import {\n FC,\n ReactNode,\n ComponentType,\n cloneElement,\n ReactElement,\n useEffect,\n useState,\n PropsWithoutRef,\n forwardRef,\n Ref\n} from 'react';\nimport styled, { css } from 'styled-components';\nimport { readableColor, rgba } from 'polished';\n\nimport { defaultThemeProp } from '../../theme';\nimport { Action, ExcludeStrict, ForwardProps, OmitStrict, TestIdProp } from '../../types';\nimport Flex, { FlexProps } from '../Flex';\nimport Actions from '../Actions';\nimport { FormControlProps } from '../FormControl';\nimport { useConsolidatedRef, useDirection, useI18n, useTestIds, useUID } from '../../hooks';\nimport Label, { LabelProps, StyledLabel } from '../Label';\nimport { calculateFontSize, getHoverColors } from '../../styles';\nimport VisuallyHiddenText from '../VisuallyHiddenText';\nimport { getFocusables, tryCatch, withTestIds } from '../../utils';\nimport Button from '../Button';\nimport Icon, { registerIcon } from '../Icon';\nimport * as warnSolidIcon from '../Icon/icons/warn-solid.icon';\nimport * as flagWaveSolidIcon from '../Icon/icons/flag-wave-solid.icon';\nimport * as checkIcon from '../Icon/icons/check.icon';\nimport AdditionalInfo, { StyledAdditionalInfo } from '../AdditionalInfo';\n\nimport { getFormFieldTestIds, elements } from './FormField.test-ids';\n\nregisterIcon(warnSolidIcon, flagWaveSolidIcon, checkIcon);\n\nexport interface FormFieldProps\n extends OmitStrict<FormControlProps, 'placeholder' | 'value' | 'defaultValue'>,\n TestIdProp<typeof elements> {\n /** Pass a single form control component i.e. Input | TextArea | Select | etc.. */\n children: ReactElement | ReactElement[];\n /**\n * An id is required to connect a FormField's wrapping element, control element and info(aria-describedby) live region.\n * A random id will be generated if none is provided.\n * Since MOST FormControls should possess an id(excl. i.e RadioCheckGroup and others) this can be used.\n * The id prop will be used to generate the following:\n * - FormControl <-> Label association via a Label's htmlFor prop.\n * - FormField's wrapping element id {id}-field.\n * - FormField info element id ${id}-info.\n */\n id?: string;\n /**\n * Determines how the wrapping label should be rendered.\n * @default 'label'\n */\n labelAs?: LabelProps['as'];\n /**\n * Overrides the for attribute on the label. If this is not set it will default to the forms id.\n * @default undefined\n */\n labelFor?: LabelProps['htmlFor'];\n /**\n * Sets the id of the label.\n * @default undefined\n */\n labelId?: LabelProps['id'];\n /**\n * Visually hides the label region.\n * @default false\n */\n labelHidden?: boolean;\n /**\n * Visually places the label after the input.\n * @default false\n */\n labelAfter?: boolean;\n /**\n * Property used to check whether input type is radio to handle styling for RadioCheck\n * @default false\n */\n isRadioCheck?: boolean;\n /**\n * Wrapping HTML element tag. Renders as a fieldset for grouped elements i.e. RadioButtons/CheckboxGroup\n * @default 'div'\n */\n as?: 'div' | 'fieldset' | ComponentType<any>;\n /**\n * Layout field elements inline in a row.\n * @default false\n */\n inline?: boolean;\n /** Optionally utilized by Input or Select. */\n actions?: Action[];\n /** Enables Flex container prop pass through. */\n container?: ExcludeStrict<FlexProps['container'], true>;\n /** Character remaining count. Typically used on Textareas only */\n charLimitDisplay?: ReactNode;\n}\n\nconst StyledStatusIcon = styled(Icon)<{ status: NonNullable<FormFieldProps['status']> }>(\n ({ theme, status }) => {\n return css`\n height: 1em;\n width: 1em;\n color: ${theme.components['form-field'][status]['status-color']};\n vertical-align: baseline;\n margin-inline-end: 0.5ch;\n `;\n }\n);\n\nStyledStatusIcon.defaultProps = defaultThemeProp;\n\nexport const StyledFormFieldInfo = styled.div<Pick<FormControlProps, 'status'>>(\n ({\n status,\n theme: {\n base: { 'font-size': fontSize, 'font-scale': fontScale, spacing },\n components: { 'form-field': formField }\n }\n }) => {\n const { xxs: infoFontSize } = calculateFontSize(fontSize, fontScale);\n\n return css`\n max-width: max-content;\n margin-top: calc(0.25 * ${spacing});\n font-size: ${infoFontSize};\n word-break: break-word;\n ${status &&\n formField[status] &&\n css`\n color: ${formField[status]['status-color']};\n `}\n `;\n }\n);\n\nStyledFormFieldInfo.defaultProps = defaultThemeProp;\n\nconst StyledRequiredAsterisk = styled.span(({ theme }) => {\n const {\n base: {\n palette: { urgent }\n }\n } = theme;\n\n return css`\n vertical-align: top;\n color: ${urgent};\n `;\n});\n\nStyledRequiredAsterisk.defaultProps = defaultThemeProp;\n\nconst StyledLabelRow = styled.div`\n ${StyledRequiredAsterisk} {\n margin-inline-end: auto;\n }\n`;\n\nexport const StyledFormField = styled.div<\n FormFieldProps & { labelAsLegend: boolean; showAdditionalInfo: boolean }\n>(props => {\n const {\n labelAsLegend,\n showAdditionalInfo,\n disabled,\n required,\n theme: {\n base: { 'disabled-opacity': disabledOpacity, spacing }\n }\n } = props;\n const { ltr } = useDirection();\n\n return css`\n ${disabled &&\n css`\n opacity: ${disabledOpacity};\n -webkit-user-select: none;\n user-select: none;\n `}\n position: relative;\n border: 0;\n\n > ${StyledLabel}, > ${StyledLabelRow} {\n margin-bottom: calc(0.25 * ${spacing});\n }\n\n > ${StyledLabel}, > ${StyledLabelRow} > ${StyledLabel} {\n ${disabled &&\n css`\n cursor: not-allowed;\n `}\n }\n\n ${labelAsLegend &&\n (showAdditionalInfo || required) &&\n css`\n display: block;\n\n > legend {\n float: ${ltr ? 'left' : 'right'};\n }\n\n > ${StyledRequiredAsterisk} {\n float: ${ltr ? 'left' : 'right'};\n\n ${!showAdditionalInfo &&\n css`\n + * {\n clear: both;\n }\n `}\n }\n\n > ${StyledAdditionalInfo} {\n float: ${ltr ? 'right' : 'left'};\n\n + * {\n clear: both;\n }\n }\n `}\n `;\n});\n\nStyledFormField.defaultProps = defaultThemeProp;\n\nconst StyledSuggestionButton = styled(Button)(\n ({\n theme: {\n base: {\n 'font-size': fontSize,\n 'font-scale': fontScale,\n 'border-radius': baseRadius,\n spacing\n },\n components: {\n 'form-control': { 'border-radius': radius, 'border-width': borderWidth },\n 'form-field': formField\n }\n }\n }) => {\n const { xxs: buttonFontSize } = calculateFontSize(fontSize, fontScale);\n const backgroundColor = formField.pending['status-color'];\n const hoverColors = getHoverColors(backgroundColor);\n const color = tryCatch(() => readableColor(backgroundColor));\n const borderColor = color ? rgba(color, 0.4) : color;\n\n return css`\n background-color: ${backgroundColor};\n color: ${color};\n font-size: ${buttonFontSize};\n min-width: calc(3 * ${spacing});\n min-height: calc(3 * ${spacing});\n padding: 0 ${spacing};\n border-radius: 0;\n border: none;\n &:first-child {\n border-inline-end: ${borderWidth} solid ${borderColor};\n border-end-start-radius: calc(${baseRadius} * ${radius});\n margin-inline-start: calc(2 * ${spacing});\n }\n &:last-child {\n border-end-end-radius: calc(${baseRadius} * ${radius});\n margin-inline-start: 0;\n }\n &:hover {\n color: ${hoverColors.foreground};\n background-color: ${hoverColors.background};\n }\n\n @media (pointer: coarse) {\n min-height: 2rem;\n }\n `;\n }\n);\n\nStyledSuggestionButton.defaultProps = defaultThemeProp;\n\nconst StyledInfo = styled.span`\n display: contents;\n`;\n\nconst statusIconMap = { error: 'warn-solid', warning: 'flag-wave-solid', success: 'check' };\n\nconst FormField: FC<FormFieldProps & ForwardProps> = forwardRef(function FormField(\n props: PropsWithoutRef<FormFieldProps>,\n ref: Ref<HTMLElement>\n) {\n const uid = useUID();\n const {\n testId,\n children: controlElement,\n id = uid,\n as = 'div',\n label,\n labelAs = 'label',\n labelFor = id,\n labelId,\n labelHidden = false,\n labelAfter = false,\n info,\n status,\n isRadioCheck,\n charLimitDisplay,\n required = false,\n disabled = false,\n readOnly = false,\n inline = false,\n actions,\n container,\n additionalInfo,\n onResolveSuggestion,\n ...restProps\n } = props;\n\n const testIds = useTestIds(testId, getFormFieldTestIds);\n\n const t = useI18n();\n const labelAsLegend: boolean = labelAs === 'legend';\n const hasSuggestion = status === 'pending' && !!onResolveSuggestion;\n const consolidatedRef = useConsolidatedRef(ref);\n\n const showAdditionalInfo = !!additionalInfo && !disabled && !labelHidden;\n\n const labelContent = (\n <>\n <Label\n data-testid={testIds.label}\n id={labelId}\n as={labelAs}\n htmlFor={labelAs === 'label' ? labelFor : undefined}\n labelHidden={labelHidden}\n onClick={(e: MouseEvent) => {\n if (readOnly) e.preventDefault();\n }}\n inline={inline}\n >\n {label}\n </Label>\n\n {required && !labelHidden && (\n <StyledRequiredAsterisk aria-hidden>&nbsp;*</StyledRequiredAsterisk>\n )}\n\n {showAdditionalInfo && (\n <AdditionalInfo data-testid={testIds.additionalInfo} heading={additionalInfo.heading}>\n {additionalInfo.content}\n </AdditionalInfo>\n )}\n </>\n );\n\n const labelRow =\n !isRadioCheck && !labelAsLegend ? (\n <Flex\n as={StyledLabelRow}\n container={{ justify: 'between', alignItems: 'end' }}\n item={{ alignSelf: 'stretch' }}\n >\n {labelContent}\n </Flex>\n ) : (\n labelContent\n );\n\n // We have to use an internal state and an effect to set the text value of info after the DOM element is rendered.\n // This is to ensure screen readers will announce info on errors when role is set to alert.\n // Needs testing to confirm. Currently the expected sequence would be:\n // - FormField renders with no error and no info\n // - user input triggers an error status\n // - props passed set error status and provide info text\n // - effect runs and sets live region state which renders and is announced\n const [liveRegionInfo, setLiveRegionInfo] = useState<ReactNode>(null);\n\n useEffect(() => {\n setLiveRegionInfo(info);\n }, [info]);\n\n // fieldset or single form control element\n let content: FormFieldProps['children'] = labelAsLegend\n ? controlElement\n : cloneElement(controlElement as ReactElement, {\n 'aria-describedby': info && `${id}-info`\n });\n\n if (actions) {\n content = (\n <Flex container={{ alignItems: 'center', gap: 0.5 }}>\n {content}\n <Actions items={actions} menuAt={3} />\n </Flex>\n );\n }\n\n let infoContent = (\n // Region for additional info, help or error message.\n // Withholding aria-live=\"assertive\" to avoid iOS issue. See below.\n // https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions#Preferring_specialized_live_region_roles\n <Flex\n data-testid={testIds.info}\n status={status}\n role={status === 'error' || status === 'warning' ? 'alert' : undefined}\n as={StyledFormFieldInfo}\n container={{ alignItems: 'center' }}\n >\n {status && status !== 'pending' && typeof label === 'string' && (\n <VisuallyHiddenText aria-hidden>{label}</VisuallyHiddenText>\n )}\n <StyledInfo id={`${id}-info`}>\n {status && status !== 'pending' && (\n <>\n <StyledStatusIcon status={status} name={statusIconMap[status]} />\n <VisuallyHiddenText>{` ${t(status)} `}</VisuallyHiddenText>\n </>\n )}\n {liveRegionInfo}\n </StyledInfo>\n </Flex>\n );\n\n if (charLimitDisplay) {\n infoContent = (\n <Flex container={{ justify: infoContent ? 'between' : 'end', gap: 1 }}>\n {infoContent}\n <Flex item={{ shrink: 0 }}>{charLimitDisplay}</Flex>\n </Flex>\n );\n }\n\n if (hasSuggestion) {\n const focusables = getFocusables(consolidatedRef);\n infoContent = (\n <Flex container={{ alignItems: 'start', justify: 'between' }}>\n <StyledFormFieldInfo data-testid={testIds.info} status={status} id={`${id}-info`}>\n {t('suggestion_info')}\n <VisuallyHiddenText aria-live='polite'>{t('suggestion_assist')}</VisuallyHiddenText>\n </StyledFormFieldInfo>\n <Flex container={{ wrap: 'nowrap' }}>\n <StyledSuggestionButton\n data-testid={testIds.suggestionReject}\n onClick={() => {\n onResolveSuggestion(false);\n focusables[0]?.focus();\n }}\n aria-label={t('reject_suggestion_button_a11y')}\n >\n {t('no')}\n </StyledSuggestionButton>\n <StyledSuggestionButton\n data-testid={testIds.suggestionAccept}\n onClick={() => {\n onResolveSuggestion(true);\n focusables[0]?.focus();\n }}\n aria-label={t('accept_suggestion_button_a11y')}\n >\n {t('yes')}\n </StyledSuggestionButton>\n </Flex>\n </Flex>\n );\n }\n\n const onKeyDown = (e: KeyboardEvent) => {\n if (e.key === 'Enter') {\n const target = e.target as HTMLElement;\n if (!target.closest('button')) {\n e.preventDefault();\n onResolveSuggestion?.(true);\n }\n }\n };\n\n return (\n <Flex\n data-testid={testIds.root}\n {...restProps}\n container={{\n direction: inline ? 'row' : 'column',\n alignItems: inline ? 'center' : undefined,\n ...container\n }}\n as={StyledFormField}\n labelAsLegend={labelAsLegend}\n showAdditionalInfo={showAdditionalInfo}\n id={`${id}-field`}\n forwardedAs={as}\n required={required}\n disabled={disabled}\n readOnly={readOnly}\n onKeyDown={hasSuggestion ? onKeyDown : undefined}\n aria-describedby={labelAsLegend && info ? `${id}-info` : undefined}\n ref={consolidatedRef}\n >\n {(labelAsLegend || !labelAfter) && labelRow}\n {content}\n {!labelAsLegend && labelAfter && labelRow}\n {!readOnly && infoContent}\n </Flex>\n );\n});\n\nexport default withTestIds(FormField, getFormFieldTestIds);\n"]}
1
+ {"version":3,"file":"FormField.js","sourceRoot":"","sources":["../../../src/components/FormField/FormField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEtE,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAE/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,IAAI,MAAM,SAAS,CAAC;AAE3B,OAAO,OAAO,MAAM,YAAY,CAAC;AAEjC,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EA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,IAAI,QAAQ,EACxC,CAAC,QAAQ,IAAI,WAAW,IACpB,CACR,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC","sourcesContent":["import { cloneElement, useEffect, useState, forwardRef } from 'react';\nimport type { FC, ReactNode, ComponentType, ReactElement, PropsWithoutRef, Ref } from 'react';\nimport styled, { css } from 'styled-components';\nimport { readableColor, rgba } from 'polished';\n\nimport { defaultThemeProp } from '../../theme';\nimport type { Action, ExcludeStrict, ForwardProps, OmitStrict, TestIdProp } from '../../types';\nimport Flex from '../Flex';\nimport type { FlexProps } from '../Flex';\nimport Actions from '../Actions';\nimport type { FormControlProps } from '../FormControl';\nimport { useConsolidatedRef, useDirection, useI18n, useTestIds, useUID } from '../../hooks';\nimport Label, { StyledLabel } from '../Label';\nimport type { LabelProps } from '../Label';\nimport { calculateFontSize, getHoverColors } from '../../styles';\nimport VisuallyHiddenText from '../VisuallyHiddenText';\nimport { getFocusables, tryCatch, withTestIds } from '../../utils';\nimport Button from '../Button';\nimport Icon, { registerIcon } from '../Icon';\nimport * as warnSolidIcon from '../Icon/icons/warn-solid.icon';\nimport * as flagWaveSolidIcon from '../Icon/icons/flag-wave-solid.icon';\nimport * as checkIcon from '../Icon/icons/check.icon';\nimport AdditionalInfo, { StyledAdditionalInfo } from '../AdditionalInfo';\n\nimport { getFormFieldTestIds } from './FormField.test-ids';\nimport type { elements } from './FormField.test-ids';\n\nregisterIcon(warnSolidIcon, flagWaveSolidIcon, checkIcon);\n\nexport interface FormFieldProps\n extends OmitStrict<FormControlProps, 'placeholder' | 'value' | 'defaultValue'>,\n TestIdProp<typeof elements> {\n /** Pass a single form control component i.e. Input | TextArea | Select | etc.. */\n children: ReactElement | ReactElement[];\n /**\n * An id is required to connect a FormField's wrapping element, control element and info(aria-describedby) live region.\n * A random id will be generated if none is provided.\n * Since MOST FormControls should possess an id(excl. i.e RadioCheckGroup and others) this can be used.\n * The id prop will be used to generate the following:\n * - FormControl <-> Label association via a Label's htmlFor prop.\n * - FormField's wrapping element id {id}-field.\n * - FormField info element id ${id}-info.\n */\n id?: string;\n /**\n * Determines how the wrapping label should be rendered.\n * @default 'label'\n */\n labelAs?: LabelProps['as'];\n /**\n * Overrides the for attribute on the label. If this is not set it will default to the forms id.\n * @default undefined\n */\n labelFor?: LabelProps['htmlFor'];\n /**\n * Sets the id of the label.\n * @default undefined\n */\n labelId?: LabelProps['id'];\n /**\n * Visually hides the label region.\n * @default false\n */\n labelHidden?: boolean;\n /**\n * Visually places the label after the input.\n * @default false\n */\n labelAfter?: boolean;\n /**\n * Property used to check whether input type is radio to handle styling for RadioCheck\n * @default false\n */\n isRadioCheck?: boolean;\n /**\n * Wrapping HTML element tag. Renders as a fieldset for grouped elements i.e. RadioButtons/CheckboxGroup\n * @default 'div'\n */\n as?: 'div' | 'fieldset' | ComponentType<any>;\n /**\n * Layout field elements inline in a row.\n * @default false\n */\n inline?: boolean;\n /** Optionally utilized by Input or Select. */\n actions?: Action[];\n /** Enables Flex container prop pass through. */\n container?: ExcludeStrict<FlexProps['container'], true>;\n /** Character remaining count. Typically used on Textareas only */\n charLimitDisplay?: ReactNode;\n}\n\nconst StyledStatusIcon = styled(Icon)<{ status: NonNullable<FormFieldProps['status']> }>(\n ({ theme, status }) => {\n return css`\n height: 1em;\n width: 1em;\n color: ${theme.components['form-field'][status]['status-color']};\n vertical-align: baseline;\n margin-inline-end: 0.5ch;\n `;\n }\n);\n\nStyledStatusIcon.defaultProps = defaultThemeProp;\n\nexport const StyledFormFieldInfo = styled.div<Pick<FormControlProps, 'status'>>(\n ({\n status,\n theme: {\n base: { 'font-size': fontSize, 'font-scale': fontScale, spacing },\n components: { 'form-field': formField }\n }\n }) => {\n const { xxs: infoFontSize } = calculateFontSize(fontSize, fontScale);\n\n return css`\n max-width: max-content;\n margin-top: calc(0.25 * ${spacing});\n font-size: ${infoFontSize};\n word-break: break-word;\n ${status &&\n formField[status] &&\n css`\n color: ${formField[status]['status-color']};\n `}\n `;\n }\n);\n\nStyledFormFieldInfo.defaultProps = defaultThemeProp;\n\nconst StyledRequiredAsterisk = styled.span(({ theme }) => {\n const {\n base: {\n palette: { urgent }\n }\n } = theme;\n\n return css`\n vertical-align: top;\n color: ${urgent};\n `;\n});\n\nStyledRequiredAsterisk.defaultProps = defaultThemeProp;\n\nconst StyledLabelRow = styled.div`\n ${StyledRequiredAsterisk} {\n margin-inline-end: auto;\n }\n`;\n\nexport const StyledFormField = styled.div<\n FormFieldProps & { labelAsLegend: boolean; showAdditionalInfo: boolean }\n>(props => {\n const {\n labelAsLegend,\n showAdditionalInfo,\n disabled,\n required,\n theme: {\n base: { 'disabled-opacity': disabledOpacity, spacing }\n }\n } = props;\n const { ltr } = useDirection();\n\n return css`\n ${disabled &&\n css`\n opacity: ${disabledOpacity};\n -webkit-user-select: none;\n user-select: none;\n `}\n position: relative;\n border: 0;\n\n > ${StyledLabel}, > ${StyledLabelRow} {\n margin-bottom: calc(0.25 * ${spacing});\n }\n\n > ${StyledLabel}, > ${StyledLabelRow} > ${StyledLabel} {\n ${disabled &&\n css`\n cursor: not-allowed;\n `}\n }\n\n ${labelAsLegend &&\n (showAdditionalInfo || required) &&\n css`\n display: block;\n\n > legend {\n float: ${ltr ? 'left' : 'right'};\n }\n\n > ${StyledRequiredAsterisk} {\n float: ${ltr ? 'left' : 'right'};\n\n ${!showAdditionalInfo &&\n css`\n + * {\n clear: both;\n }\n `}\n }\n\n > ${StyledAdditionalInfo} {\n float: ${ltr ? 'right' : 'left'};\n\n + * {\n clear: both;\n }\n }\n `}\n `;\n});\n\nStyledFormField.defaultProps = defaultThemeProp;\n\nconst StyledSuggestionButton = styled(Button)(\n ({\n theme: {\n base: {\n 'font-size': fontSize,\n 'font-scale': fontScale,\n 'border-radius': baseRadius,\n spacing\n },\n components: {\n 'form-control': { 'border-radius': radius, 'border-width': borderWidth },\n 'form-field': formField\n }\n }\n }) => {\n const { xxs: buttonFontSize } = calculateFontSize(fontSize, fontScale);\n const backgroundColor = formField.pending['status-color'];\n const hoverColors = getHoverColors(backgroundColor);\n const color = tryCatch(() => readableColor(backgroundColor));\n const borderColor = color ? rgba(color, 0.4) : color;\n\n return css`\n background-color: ${backgroundColor};\n color: ${color};\n font-size: ${buttonFontSize};\n min-width: calc(3 * ${spacing});\n min-height: calc(3 * ${spacing});\n padding: 0 ${spacing};\n border-radius: 0;\n border: none;\n &:first-child {\n border-inline-end: ${borderWidth} solid ${borderColor};\n border-end-start-radius: calc(${baseRadius} * ${radius});\n margin-inline-start: calc(2 * ${spacing});\n }\n &:last-child {\n border-end-end-radius: calc(${baseRadius} * ${radius});\n margin-inline-start: 0;\n }\n &:hover {\n color: ${hoverColors.foreground};\n background-color: ${hoverColors.background};\n }\n\n @media (pointer: coarse) {\n min-height: 2rem;\n }\n `;\n }\n);\n\nStyledSuggestionButton.defaultProps = defaultThemeProp;\n\nconst StyledInfo = styled.span`\n display: contents;\n`;\n\nconst statusIconMap = { error: 'warn-solid', warning: 'flag-wave-solid', success: 'check' };\n\nconst FormField: FC<FormFieldProps & ForwardProps> = forwardRef(function FormField(\n props: PropsWithoutRef<FormFieldProps>,\n ref: Ref<HTMLElement>\n) {\n const uid = useUID();\n const {\n testId,\n children: controlElement,\n id = uid,\n as = 'div',\n label,\n labelAs = 'label',\n labelFor = id,\n labelId,\n labelHidden = false,\n labelAfter = false,\n info,\n status,\n isRadioCheck,\n charLimitDisplay,\n required = false,\n disabled = false,\n readOnly = false,\n inline = false,\n actions,\n container,\n additionalInfo,\n onResolveSuggestion,\n ...restProps\n } = props;\n\n const testIds = useTestIds(testId, getFormFieldTestIds);\n\n const t = useI18n();\n const labelAsLegend: boolean = labelAs === 'legend';\n const hasSuggestion = status === 'pending' && !!onResolveSuggestion;\n const consolidatedRef = useConsolidatedRef(ref);\n\n const showAdditionalInfo = !!additionalInfo && !disabled && !labelHidden;\n\n const labelContent = (\n <>\n <Label\n data-testid={testIds.label}\n id={labelId}\n as={labelAs}\n htmlFor={labelAs === 'label' ? labelFor : undefined}\n labelHidden={labelHidden}\n onClick={(e: MouseEvent) => {\n if (readOnly) e.preventDefault();\n }}\n inline={inline}\n >\n {label}\n </Label>\n\n {required && !labelHidden && (\n <StyledRequiredAsterisk aria-hidden>&nbsp;*</StyledRequiredAsterisk>\n )}\n\n {showAdditionalInfo && (\n <AdditionalInfo data-testid={testIds.additionalInfo} heading={additionalInfo.heading}>\n {additionalInfo.content}\n </AdditionalInfo>\n )}\n </>\n );\n\n const labelRow =\n !isRadioCheck && !labelAsLegend ? (\n <Flex\n as={StyledLabelRow}\n container={{ justify: 'between', alignItems: 'end' }}\n item={{ alignSelf: 'stretch' }}\n >\n {labelContent}\n </Flex>\n ) : (\n labelContent\n );\n\n // We have to use an internal state and an effect to set the text value of info after the DOM element is rendered.\n // This is to ensure screen readers will announce info on errors when role is set to alert.\n // Needs testing to confirm. Currently the expected sequence would be:\n // - FormField renders with no error and no info\n // - user input triggers an error status\n // - props passed set error status and provide info text\n // - effect runs and sets live region state which renders and is announced\n const [liveRegionInfo, setLiveRegionInfo] = useState<ReactNode>(null);\n\n useEffect(() => {\n setLiveRegionInfo(info);\n }, [info]);\n\n // fieldset or single form control element\n let content: FormFieldProps['children'] = labelAsLegend\n ? controlElement\n : cloneElement(controlElement as ReactElement, {\n 'aria-describedby': info && `${id}-info`\n });\n\n if (actions) {\n content = (\n <Flex container={{ alignItems: 'center', gap: 0.5 }}>\n {content}\n <Actions items={actions} menuAt={3} />\n </Flex>\n );\n }\n\n let infoContent = (\n // Region for additional info, help or error message.\n // Withholding aria-live=\"assertive\" to avoid iOS issue. See below.\n // https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions#Preferring_specialized_live_region_roles\n <Flex\n data-testid={testIds.info}\n status={status}\n role={status === 'error' || status === 'warning' ? 'alert' : undefined}\n as={StyledFormFieldInfo}\n container={{ alignItems: 'center' }}\n >\n {status && status !== 'pending' && typeof label === 'string' && (\n <VisuallyHiddenText aria-hidden>{label}</VisuallyHiddenText>\n )}\n <StyledInfo id={`${id}-info`}>\n {status && status !== 'pending' && (\n <>\n <StyledStatusIcon status={status} name={statusIconMap[status]} />\n <VisuallyHiddenText>{` ${t(status)} `}</VisuallyHiddenText>\n </>\n )}\n {liveRegionInfo}\n </StyledInfo>\n </Flex>\n );\n\n if (charLimitDisplay) {\n infoContent = (\n <Flex container={{ justify: infoContent ? 'between' : 'end', gap: 1 }}>\n {infoContent}\n <Flex item={{ shrink: 0 }}>{charLimitDisplay}</Flex>\n </Flex>\n );\n }\n\n if (hasSuggestion) {\n const focusables = getFocusables(consolidatedRef);\n infoContent = (\n <Flex container={{ alignItems: 'start', justify: 'between' }}>\n <StyledFormFieldInfo data-testid={testIds.info} status={status} id={`${id}-info`}>\n {t('suggestion_info')}\n <VisuallyHiddenText aria-live='polite'>{t('suggestion_assist')}</VisuallyHiddenText>\n </StyledFormFieldInfo>\n <Flex container={{ wrap: 'nowrap' }}>\n <StyledSuggestionButton\n data-testid={testIds.suggestionReject}\n onClick={() => {\n onResolveSuggestion(false);\n focusables[0]?.focus();\n }}\n aria-label={t('reject_suggestion_button_a11y')}\n >\n {t('no')}\n </StyledSuggestionButton>\n <StyledSuggestionButton\n data-testid={testIds.suggestionAccept}\n onClick={() => {\n onResolveSuggestion(true);\n focusables[0]?.focus();\n }}\n aria-label={t('accept_suggestion_button_a11y')}\n >\n {t('yes')}\n </StyledSuggestionButton>\n </Flex>\n </Flex>\n );\n }\n\n const onKeyDown = (e: KeyboardEvent) => {\n if (e.key === 'Enter') {\n const target = e.target as HTMLElement;\n if (!target.closest('button')) {\n e.preventDefault();\n onResolveSuggestion?.(true);\n }\n }\n };\n\n return (\n <Flex\n data-testid={testIds.root}\n {...restProps}\n container={{\n direction: inline ? 'row' : 'column',\n alignItems: inline ? 'center' : undefined,\n ...container\n }}\n as={StyledFormField}\n labelAsLegend={labelAsLegend}\n showAdditionalInfo={showAdditionalInfo}\n id={`${id}-field`}\n forwardedAs={as}\n required={required}\n disabled={disabled}\n readOnly={readOnly}\n onKeyDown={hasSuggestion ? onKeyDown : undefined}\n aria-describedby={labelAsLegend && info ? `${id}-info` : undefined}\n ref={consolidatedRef}\n >\n {(labelAsLegend || !labelAfter) && labelRow}\n {content}\n {!labelAsLegend && labelAfter && labelRow}\n {!readOnly && infoContent}\n </Flex>\n );\n});\n\nexport default withTestIds(FormField, getFormFieldTestIds);\n"]}
@@ -1,6 +1,6 @@
1
- import { FunctionComponent } from 'react';
2
- import { ForwardProps } from '../../types';
3
- import GridProps from './Grid.types';
1
+ import type { FunctionComponent } from 'react';
2
+ import type { ForwardProps } from '../../types';
3
+ import type GridProps from './Grid.types';
4
4
  export declare const StyledGrid: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {} & GridProps, never>;
5
5
  declare const Grid: FunctionComponent<GridProps & ForwardProps>;
6
6
  export default Grid;
@@ -1 +1 @@
1
- {"version":3,"file":"Grid.d.ts","sourceRoot":"","sources":["../../../src/components/Grid/Grid.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAAmB,MAAM,OAAO,CAAC;AAGvE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,OAAO,SAAS,MAAM,cAAc,CAAC;AAwLrC,eAAO,MAAM,UAAU,qHAqCtB,CAAC;AAIF,QAAA,MAAM,IAAI,EAAE,iBAAiB,CAAC,SAAS,GAAG,YAAY,CAKpD,CAAC;AAEH,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"Grid.d.ts","sourceRoot":"","sources":["../../../src/components/Grid/Grid.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAmB,MAAM,OAAO,CAAC;AAGhE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,OAAO,KAAK,SAAS,MAAM,cAAc,CAAC;AAwL1C,eAAO,MAAM,UAAU,qHAqCtB,CAAC;AAIF,QAAA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E,CACX,WAAW,CAAC,UAAU,CAAC;QACvB,GAAG,CAAA;4CAC+B,gBAAgB,CAAC,UAAU,CAAC;gBACxD,kBAAkB,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,SAAS,CAAC;gBACtD,aAAa,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,IAAI,CAAC;;WAEjD,CACJ;KACF,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,UAAU,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE3C,MAAM,IAAI,GAAgD,UAAU,CAAC,SAAS,IAAI,CAChF,KAAiC,EACjC,GAAqB;IAErB,OAAO,KAAC,UAAU,OAAK,KAAK,EAAE,GAAG,EAAE,GAAG,GAAI,CAAC;AAC7C,CAAC,CAAC,CAAC;AAEH,eAAe,IAAI,CAAC","sourcesContent":["import { forwardRef, FunctionComponent, PropsWithoutRef } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { ForwardProps } from '../../types';\nimport { defaultThemeProp } from '../../theme';\n\nimport GridProps from './Grid.types';\n\nconst prefix = (value: string) => {\n if (['between', 'around', 'evenly'].includes(value)) return `space-${value}`;\n return value;\n};\n\nconst getContainerStyles = (gridProps: GridProps['container']) => {\n if (!gridProps) return;\n\n if (gridProps === true) {\n return css`\n display: grid;\n `;\n }\n\n const {\n inline,\n pad,\n cols,\n autoCols,\n rows,\n autoRows,\n autoFlow,\n areas,\n template,\n colGap,\n rowGap,\n gap,\n justifyItems,\n justifyContent,\n alignItems,\n alignContent\n } = gridProps;\n\n return css`\n display: ${inline ? 'inline-grid' : 'grid'};\n\n ${pad !== undefined &&\n css`\n padding: ${({\n theme: {\n base: { spacing }\n }\n }) => (Array.isArray(pad) ? pad : [pad]).map(p => `calc(${p} * ${spacing})`).join(' ')};\n `}\n\n ${cols &&\n css`\n grid-template-columns: ${cols};\n `}\n\n ${autoCols &&\n css`\n grid-auto-columns: ${autoCols};\n `}\n\n ${rows &&\n css`\n grid-template-rows: ${rows};\n `}\n\n ${autoRows &&\n css`\n grid-auto-rows: ${autoRows};\n `}\n\n ${autoFlow &&\n css`\n grid-auto-flow: ${autoFlow};\n `}\n\n ${areas &&\n css`\n grid-template-areas: ${areas};\n `}\n\n ${template &&\n css`\n grid-template: ${template};\n `}\n\n ${gap !== undefined &&\n css`\n gap: calc(${gap} * ${props => props.theme.base.spacing});\n `}\n\n ${colGap !== undefined &&\n css`\n column-gap: calc(${colGap} * ${props => props.theme.base.spacing});\n `}\n\n ${rowGap !== undefined &&\n css`\n row-gap: calc(${rowGap} * ${props => props.theme.base.spacing});\n `}\n\n ${justifyItems &&\n css`\n justify-items: ${justifyItems};\n `}\n\n ${justifyContent &&\n css`\n justify-content: ${prefix(justifyContent)};\n `}\n\n ${alignItems &&\n css`\n align-items: ${alignItems};\n `}\n\n ${alignContent &&\n css`\n align-content: ${prefix(alignContent)};\n `}\n `;\n};\n\nconst getItemStyles = (props: GridProps['item']) => {\n if (!props) return;\n\n const {\n colStart,\n colEnd,\n colStartEnd,\n rowStart,\n rowEnd,\n rowStartEnd,\n area,\n justifySelf,\n alignSelf\n } = props;\n\n return css`\n ${colStart &&\n css`\n grid-column-start: ${colStart};\n `}\n\n ${colEnd &&\n css`\n grid-column-end: ${colEnd};\n `}\n\n ${colStartEnd &&\n css`\n grid-column: ${colStartEnd};\n `}\n\n ${rowStart &&\n css`\n grid-row-start: ${rowStart};\n `}\n\n ${rowEnd &&\n css`\n grid-row-end: ${rowEnd};\n `}\n\n ${rowStartEnd &&\n css`\n grid-row: ${rowStartEnd};\n `}\n\n ${area &&\n css`\n grid-area: ${area};\n `}\n\n ${justifySelf &&\n css`\n justify-self: ${justifySelf};\n `}\n\n ${alignSelf &&\n css`\n align-self: ${alignSelf};\n `}\n `;\n};\n\nconst breakpointOrder = ['xs', 'sm', 'md', 'lg', 'xl'] as const;\n\nexport const StyledGrid = styled.div<GridProps>(\n ({\n container,\n item,\n theme: {\n base: { breakpoints: themeBreakpoints }\n },\n xs,\n sm,\n md,\n lg,\n xl\n }) => {\n const breakpoints = {\n xs,\n sm,\n md,\n lg,\n xl\n };\n\n return css`\n ${getContainerStyles(container)}\n ${getItemStyles(item)}\n\n ${breakpointOrder.map(\n breakpoint =>\n breakpoints[breakpoint] &&\n css`\n @media screen and (min-width: ${themeBreakpoints[breakpoint]}) {\n ${getContainerStyles(breakpoints[breakpoint]?.container)}\n ${getItemStyles(breakpoints[breakpoint]?.item)}\n }\n `\n )}\n `;\n }\n);\n\nStyledGrid.defaultProps = defaultThemeProp;\n\nconst Grid: FunctionComponent<GridProps & ForwardProps> = forwardRef(function Grid(\n props: PropsWithoutRef<GridProps>,\n ref: GridProps['ref']\n) {\n return <StyledGrid {...props} ref={ref} />;\n});\n\nexport default Grid;\n"]}
1
+ {"version":3,"file":"Grid.js","sourceRoot":"","sources":["../../../src/components/Grid/Grid.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAI/C,MAAM,MAAM,GAAG,CAAC,KAAa,EAAE,EAAE;IAC/B,IAAI,CAAC,SAAS,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,SAAS,KAAK,EAAE,CAAC;IAC7E,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,CAAC,SAAiC,EAAE,EAAE;IAC/D,IAAI,CAAC,SAAS;QAAE,OAAO;IAEvB,IAAI,SAAS,KAAK,IAAI,EAAE;QACtB,OAAO,GAAG,CAAA;;KAET,CAAC;KACH;IAED,MAAM,EACJ,MAAM,EACN,GAAG,EACH,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,MAAM,EACN,MAAM,EACN,GAAG,E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AE,EACL,IAAI,EAAE,EAAE,WAAW,EAAE,gBAAgB,EAAE,EACxC,EACD,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACH,EAAE,EAAE;IACH,MAAM,WAAW,GAAG;QAClB,EAAE;QACF,EAAE;QACF,EAAE;QACF,EAAE;QACF,EAAE;KACH,CAAC;IAEF,OAAO,GAAG,CAAA;QACN,kBAAkB,CAAC,SAAS,CAAC;QAC7B,aAAa,CAAC,IAAI,CAAC;;MAErB,eAAe,CAAC,GAAG,CACjB,UAAU,CAAC,EAAE,CACX,WAAW,CAAC,UAAU,CAAC;QACvB,GAAG,CAAA;4CAC+B,gBAAgB,CAAC,UAAU,CAAC;gBACxD,kBAAkB,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,SAAS,CAAC;gBACtD,aAAa,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,IAAI,CAAC;;WAEjD,CACJ;KACF,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,UAAU,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE3C,MAAM,IAAI,GAAgD,UAAU,CAAC,SAAS,IAAI,CAChF,KAAiC,EACjC,GAAqB;IAErB,OAAO,KAAC,UAAU,OAAK,KAAK,EAAE,GAAG,EAAE,GAAG,GAAI,CAAC;AAC7C,CAAC,CAAC,CAAC;AAEH,eAAe,IAAI,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { FunctionComponent, PropsWithoutRef } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport type { ForwardProps } from '../../types';\nimport { defaultThemeProp } from '../../theme';\n\nimport type GridProps from './Grid.types';\n\nconst prefix = (value: string) => {\n if (['between', 'around', 'evenly'].includes(value)) return `space-${value}`;\n return value;\n};\n\nconst getContainerStyles = (gridProps: GridProps['container']) => {\n if (!gridProps) return;\n\n if (gridProps === true) {\n return css`\n display: grid;\n `;\n }\n\n const {\n inline,\n pad,\n cols,\n autoCols,\n rows,\n autoRows,\n autoFlow,\n areas,\n template,\n colGap,\n rowGap,\n gap,\n justifyItems,\n justifyContent,\n alignItems,\n alignContent\n } = gridProps;\n\n return css`\n display: ${inline ? 'inline-grid' : 'grid'};\n\n ${pad !== undefined &&\n css`\n padding: ${({\n theme: {\n base: { spacing }\n }\n }) => (Array.isArray(pad) ? pad : [pad]).map(p => `calc(${p} * ${spacing})`).join(' ')};\n `}\n\n ${cols &&\n css`\n grid-template-columns: ${cols};\n `}\n\n ${autoCols &&\n css`\n grid-auto-columns: ${autoCols};\n `}\n\n ${rows &&\n css`\n grid-template-rows: ${rows};\n `}\n\n ${autoRows &&\n css`\n grid-auto-rows: ${autoRows};\n `}\n\n ${autoFlow &&\n css`\n grid-auto-flow: ${autoFlow};\n `}\n\n ${areas &&\n css`\n grid-template-areas: ${areas};\n `}\n\n ${template &&\n css`\n grid-template: ${template};\n `}\n\n ${gap !== undefined &&\n css`\n gap: calc(${gap} * ${props => props.theme.base.spacing});\n `}\n\n ${colGap !== undefined &&\n css`\n column-gap: calc(${colGap} * ${props => props.theme.base.spacing});\n `}\n\n ${rowGap !== undefined &&\n css`\n row-gap: calc(${rowGap} * ${props => props.theme.base.spacing});\n `}\n\n ${justifyItems &&\n css`\n justify-items: ${justifyItems};\n `}\n\n ${justifyContent &&\n css`\n justify-content: ${prefix(justifyContent)};\n `}\n\n ${alignItems &&\n css`\n align-items: ${alignItems};\n `}\n\n ${alignContent &&\n css`\n align-content: ${prefix(alignContent)};\n `}\n `;\n};\n\nconst getItemStyles = (props: GridProps['item']) => {\n if (!props) return;\n\n const {\n colStart,\n colEnd,\n colStartEnd,\n rowStart,\n rowEnd,\n rowStartEnd,\n area,\n justifySelf,\n alignSelf\n } = props;\n\n return css`\n ${colStart &&\n css`\n grid-column-start: ${colStart};\n `}\n\n ${colEnd &&\n css`\n grid-column-end: ${colEnd};\n `}\n\n ${colStartEnd &&\n css`\n grid-column: ${colStartEnd};\n `}\n\n ${rowStart &&\n css`\n grid-row-start: ${rowStart};\n `}\n\n ${rowEnd &&\n css`\n grid-row-end: ${rowEnd};\n `}\n\n ${rowStartEnd &&\n css`\n grid-row: ${rowStartEnd};\n `}\n\n ${area &&\n css`\n grid-area: ${area};\n `}\n\n ${justifySelf &&\n css`\n justify-self: ${justifySelf};\n `}\n\n ${alignSelf &&\n css`\n align-self: ${alignSelf};\n `}\n `;\n};\n\nconst breakpointOrder = ['xs', 'sm', 'md', 'lg', 'xl'] as const;\n\nexport const StyledGrid = styled.div<GridProps>(\n ({\n container,\n item,\n theme: {\n base: { breakpoints: themeBreakpoints }\n },\n xs,\n sm,\n md,\n lg,\n xl\n }) => {\n const breakpoints = {\n xs,\n sm,\n md,\n lg,\n xl\n };\n\n return css`\n ${getContainerStyles(container)}\n ${getItemStyles(item)}\n\n ${breakpointOrder.map(\n breakpoint =>\n breakpoints[breakpoint] &&\n css`\n @media screen and (min-width: ${themeBreakpoints[breakpoint]}) {\n ${getContainerStyles(breakpoints[breakpoint]?.container)}\n ${getItemStyles(breakpoints[breakpoint]?.item)}\n }\n `\n )}\n `;\n }\n);\n\nStyledGrid.defaultProps = defaultThemeProp;\n\nconst Grid: FunctionComponent<GridProps & ForwardProps> = forwardRef(function Grid(\n props: PropsWithoutRef<GridProps>,\n ref: GridProps['ref']\n) {\n return <StyledGrid {...props} ref={ref} />;\n});\n\nexport default Grid;\n"]}
@@ -1,5 +1,5 @@
1
- import { ReactNode, Ref } from 'react';
2
- import { BaseProps, AsProp, RequireAtLeastOne } from '../../types';
1
+ import type { ReactNode, Ref } from 'react';
2
+ import type { BaseProps, AsProp, RequireAtLeastOne } from '../../types';
3
3
  export interface GridContainerProps {
4
4
  /**
5
5
  * Display the grid as an inline-grid.
@@ -107,5 +107,5 @@ type GridProps = RequireAtLeastOne<BaseGridProps & BaseProps & AsProp & {
107
107
  /** Override props for the grid at extra large screen size. */
108
108
  xl?: BreakpointGridProps;
109
109
  }, 'container' | 'item' | 'xs' | 'sm' | 'md' | 'lg' | 'xl'>;
110
- export default GridProps;
110
+ export type { GridProps as default };
111
111
  //# sourceMappingURL=Grid.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Grid.types.d.ts","sourceRoot":"","sources":["../../../src/components/Grid/Grid.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEnE,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,yHAAyH;IACzH,GAAG,CAAC,EACA,MAAM,GACN,CAAC,kBAAkB,EAAE,MAAM,CAAC,GAC5B,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,GACtC,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAChD,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IAC/D,wHAAwH;IACxH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gHAAgH;IAChH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qHAAqH;IACrH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6GAA6G;IAC7G,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qGAAqG;IACrG,QAAQ,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,WAAW,GAAG,cAAc,CAAC;IAC3D,8GAA8G;IAC9G,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mGAAmG;IACnG,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,GAAG,CAAC,EAAE,MA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appings":"","sourcesContent":["import { ReactNode, Ref } from 'react';\n\nimport { BaseProps, AsProp, RequireAtLeastOne } from '../../types';\n\nexport interface GridContainerProps {\n /**\n * Display the grid as an inline-grid.\n * @default false\n */\n inline?: boolean;\n /** Padding on the container represented as a multiplier or set of multipliers to the base spacing value in the theme. */\n pad?:\n | number\n | [topRightBottomLeft: number]\n | [topBottom: number, rightLeft: number]\n | [top: number, rightLeft: number, bottom: number]\n | [top: number, right: number, bottom: number, left: number];\n /** [grid-template-columns](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-grid-template-columns-rows) */\n cols?: string;\n /** [grid-auto-columns](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-grid-auto-columns-rows) */\n autoCols?: string;\n /** [grid-template-rows](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-grid-template-columns-rows) */\n rows?: string;\n /** [grid-auto-rows](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-grid-auto-columns-rows) */\n autoRows?: string;\n /** [grid-auto-flow](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-grid-auto-flow) */\n autoFlow?: 'row' | 'column' | 'row dense' | 'column dense';\n /** [grid-template-area](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-grid-template-areas) */\n areas?: string;\n /** [grid-template](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-grid-template) */\n template?: string;\n /**\n * Defines how much equal space to place between columns represented as a multiplier to the base spacing value in the theme.\n * [column-gap](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-grid-column-row-gap)\n */\n colGap?: number;\n /**\n * Defines how much equal space to place between rows represented as a multiplier to the base spacing value in the theme.\n * [row-gap](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-grid-column-row-gap)\n */\n rowGap?: number;\n /**\n * Defines how much equal space to place between both rows and columns represented as a multiplier to the base spacing value in the theme.\n * [gap](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-grid-gap)\n */\n gap?: number;\n /**\n * [justify-items](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-justify-items)\n * @default 'stretch'\n */\n justifyItems?: 'start' | 'end' | 'center' | 'stretch';\n /**\n * [justify-content](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-justify-content)\n * @default 'start'\n */\n justifyContent?: 'start' | 'end' | 'center' | 'stretch' | 'around' | 'between' | 'evenly';\n /**\n * [align-items](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-align-items)\n * @default 'stretch'\n */\n alignItems?: 'stretch' | 'start' | 'end' | 'center';\n /**\n * [align-content](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-align-content)\n * @default 'start'\n */\n alignContent?: 'start' | 'end' | 'center' | 'stretch' | 'around' | 'between' | 'evenly';\n}\n\nexport interface GridItemProps {\n /** [grid-column-start](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-grid-column-row-start-end) */\n colStart?: string;\n /** [grid-column-end](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-grid-column-row-start-end) */\n colEnd?: string;\n /** [grid-column](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-grid-column-row) */\n colStartEnd?: string;\n /** [grid-row-start](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-grid-column-row-start-end) */\n rowStart?: string;\n /** [grid-row-end](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-grid-column-row-start-end) */\n rowEnd?: string;\n /** [grid-row](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-grid-column-row) */\n rowStartEnd?: string;\n /** [grid-area](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-grid-area) */\n area?: string;\n /**\n * [justify-self](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-justify-self)\n * @default 'stretch'\n */\n justifySelf?: 'start' | 'end' | 'center' | 'stretch';\n /**\n * [align-self](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-align-self)\n * @default 'stretch'\n */\n alignSelf?: 'stretch' | 'start' | 'end' | 'center';\n}\n\nexport interface BaseGridProps {\n /** Creates a [grid container.](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-display) */\n container?: GridContainerProps | true;\n /** Designate as a Grid item to leverage grid item props. */\n item?: GridItemProps;\n}\n\ntype BreakpointGridProps = RequireAtLeastOne<BaseGridProps, 'container' | 'item'>;\n\ntype GridProps = RequireAtLeastOne<\n BaseGridProps &\n BaseProps &\n AsProp & {\n /** Any ReactNode to use as grid items. To leverage item based props, use Grid with \"item\" prop. */\n children?: ReactNode;\n /** Ref for the grid element. */\n ref?: Ref<Element>;\n /** Override props for the grid at extra small screen size. */\n xs?: BreakpointGridProps;\n /** Override props for the grid at small screen size. */\n sm?: BreakpointGridProps;\n /** Override props for the grid at medium screen size. */\n md?: BreakpointGridProps;\n /** Override props for the grid at large screen size. */\n lg?: BreakpointGridProps;\n /** Override props for the grid at extra large screen size. */\n xl?: BreakpointGridProps;\n },\n 'container' | 'item' | 'xs' | 'sm' | 'md' | 'lg' | 'xl'\n>;\n\nexport default GridProps;\n"]}
1
+ {"version":3,"file":"Grid.types.js","sourceRoot":"","sources":["../../../src/components/Grid/Grid.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode, Ref } from 'react';\n\nimport type { BaseProps, AsProp, RequireAtLeastOne } from '../../types';\n\nexport interface GridContainerProps {\n /**\n * Display the grid as an inline-grid.\n * @default false\n */\n inline?: boolean;\n /** Padding on the container represented as a multiplier or set of multipliers to the base spacing value in the theme. */\n pad?:\n | number\n | [topRightBottomLeft: number]\n | [topBottom: number, rightLeft: number]\n | [top: number, rightLeft: number, bottom: number]\n | [top: number, right: number, bottom: number, left: number];\n /** [grid-template-columns](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-grid-template-columns-rows) */\n cols?: string;\n /** [grid-auto-columns](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-grid-auto-columns-rows) */\n autoCols?: string;\n /** [grid-template-rows](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-grid-template-columns-rows) */\n rows?: string;\n /** [grid-auto-rows](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-grid-auto-columns-rows) */\n autoRows?: string;\n /** [grid-auto-flow](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-grid-auto-flow) */\n autoFlow?: 'row' | 'column' | 'row dense' | 'column dense';\n /** [grid-template-area](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-grid-template-areas) */\n areas?: string;\n /** [grid-template](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-grid-template) */\n template?: string;\n /**\n * Defines how much equal space to place between columns represented as a multiplier to the base spacing value in the theme.\n * [column-gap](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-grid-column-row-gap)\n */\n colGap?: number;\n /**\n * Defines how much equal space to place between rows represented as a multiplier to the base spacing value in the theme.\n * [row-gap](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-grid-column-row-gap)\n */\n rowGap?: number;\n /**\n * Defines how much equal space to place between both rows and columns represented as a multiplier to the base spacing value in the theme.\n * [gap](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-grid-gap)\n */\n gap?: number;\n /**\n * [justify-items](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-justify-items)\n * @default 'stretch'\n */\n justifyItems?: 'start' | 'end' | 'center' | 'stretch';\n /**\n * [justify-content](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-justify-content)\n * @default 'start'\n */\n justifyContent?: 'start' | 'end' | 'center' | 'stretch' | 'around' | 'between' | 'evenly';\n /**\n * [align-items](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-align-items)\n * @default 'stretch'\n */\n alignItems?: 'stretch' | 'start' | 'end' | 'center';\n /**\n * [align-content](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-align-content)\n * @default 'start'\n */\n alignContent?: 'start' | 'end' | 'center' | 'stretch' | 'around' | 'between' | 'evenly';\n}\n\nexport interface GridItemProps {\n /** [grid-column-start](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-grid-column-row-start-end) */\n colStart?: string;\n /** [grid-column-end](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-grid-column-row-start-end) */\n colEnd?: string;\n /** [grid-column](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-grid-column-row) */\n colStartEnd?: string;\n /** [grid-row-start](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-grid-column-row-start-end) */\n rowStart?: string;\n /** [grid-row-end](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-grid-column-row-start-end) */\n rowEnd?: string;\n /** [grid-row](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-grid-column-row) */\n rowStartEnd?: string;\n /** [grid-area](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-grid-area) */\n area?: string;\n /**\n * [justify-self](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-justify-self)\n * @default 'stretch'\n */\n justifySelf?: 'start' | 'end' | 'center' | 'stretch';\n /**\n * [align-self](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-align-self)\n * @default 'stretch'\n */\n alignSelf?: 'stretch' | 'start' | 'end' | 'center';\n}\n\nexport interface BaseGridProps {\n /** Creates a [grid container.](https://css-tricks.com/snippets/css/complete-guide-grid/#prop-display) */\n container?: GridContainerProps | true;\n /** Designate as a Grid item to leverage grid item props. */\n item?: GridItemProps;\n}\n\ntype BreakpointGridProps = RequireAtLeastOne<BaseGridProps, 'container' | 'item'>;\n\ntype GridProps = RequireAtLeastOne<\n BaseGridProps &\n BaseProps &\n AsProp & {\n /** Any ReactNode to use as grid items. To leverage item based props, use Grid with \"item\" prop. */\n children?: ReactNode;\n /** Ref for the grid element. */\n ref?: Ref<Element>;\n /** Override props for the grid at extra small screen size. */\n xs?: BreakpointGridProps;\n /** Override props for the grid at small screen size. */\n sm?: BreakpointGridProps;\n /** Override props for the grid at medium screen size. */\n md?: BreakpointGridProps;\n /** Override props for the grid at large screen size. */\n lg?: BreakpointGridProps;\n /** Override props for the grid at extra large screen size. */\n xl?: BreakpointGridProps;\n },\n 'container' | 'item' | 'xs' | 'sm' | 'md' | 'lg' | 'xl'\n>;\n\n// No way to do 'export default type GridProps = ...'\n// eslint-disable-next-line no-restricted-exports\nexport type { GridProps as default };\n"]}
@@ -1,6 +1,6 @@
1
- import { FunctionComponent, Ref } from 'react';
2
- import { DefaultTheme } from 'styled-components';
3
- import { BaseProps, ForwardProps, NoChildrenProp, TestIdProp } from '../../types';
1
+ import type { FunctionComponent, Ref } from 'react';
2
+ import type { DefaultTheme } from 'styled-components';
3
+ import type { BaseProps, ForwardProps, NoChildrenProp, TestIdProp } from '../../types';
4
4
  export interface HTMLProps extends BaseProps, NoChildrenProp, TestIdProp {
5
5
  content: string;
6
6
  customTags?: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"HTML.d.ts","sourceRoot":"","sources":["../../../src/components/HTML/HTML.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAEjB,GAAG,EAIJ,MAAM,OAAO,CAAC;AACf,OAAe,EAAO,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAM9D,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAQlF,MAAM,WAAW,SAAU,SAAQ,SAAS,EAAE,cAAc,EAAE,UAAU;IACtE,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B;AAED,eAAO,MAAM,UAAU,wDA2CtB,CAAC;AAEF,eAAO,MAAM,cAAc,UAAW,YAAY,2DA2BjD,CAAC;AAEF,eAAO,MAAM,aAAa,UAAW,YAAY,WAwDhD,CAAC;AAEF,eAAO,MAAM,UAAU,6EAqBrB,CAAC;;;;AA4EH,wBAAiD"}
1
+ {"version":3,"file":"HTML.d.ts","sourceRoot":"","sources":["../../../src/components/HTML/HTML.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAmB,GAAG,EAAE,MAAM,OAAO,CAAC;AAErE,OAAO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