@pega/cosmos-react-core 7.0.0-build.9.1 → 7.0.0-rc.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 (750) hide show
  1. package/lib/components/AIButton/AIButton.d.ts +30 -2
  2. package/lib/components/AIButton/AIButton.d.ts.map +1 -1
  3. package/lib/components/AIButton/AIButton.js +7 -6
  4. package/lib/components/AIButton/AIButton.js.map +1 -1
  5. package/lib/components/Actions/Actions.d.ts +1 -1
  6. package/lib/components/Actions/Actions.d.ts.map +1 -1
  7. package/lib/components/Actions/Actions.js +6 -3
  8. package/lib/components/Actions/Actions.js.map +1 -1
  9. package/lib/components/AppShell/AppHeader.d.ts.map +1 -1
  10. package/lib/components/AppShell/AppHeader.js +9 -7
  11. package/lib/components/AppShell/AppHeader.js.map +1 -1
  12. package/lib/components/AppShell/AppHeader.styles.d.ts.map +1 -1
  13. package/lib/components/AppShell/AppHeader.styles.js +26 -19
  14. package/lib/components/AppShell/AppHeader.styles.js.map +1 -1
  15. package/lib/components/AppShell/AppShell.d.ts.map +1 -1
  16. package/lib/components/AppShell/AppShell.js +17 -5
  17. package/lib/components/AppShell/AppShell.js.map +1 -1
  18. package/lib/components/AppShell/AppShell.styles.d.ts +5 -1
  19. package/lib/components/AppShell/AppShell.styles.d.ts.map +1 -1
  20. package/lib/components/AppShell/AppShell.styles.js +50 -11
  21. package/lib/components/AppShell/AppShell.styles.js.map +1 -1
  22. package/lib/components/AppShell/AppShell.types.d.ts +4 -0
  23. package/lib/components/AppShell/AppShell.types.d.ts.map +1 -1
  24. package/lib/components/AppShell/AppShell.types.js.map +1 -1
  25. package/lib/components/AppShell/AppShellContext.d.ts +3 -1
  26. package/lib/components/AppShell/AppShellContext.d.ts.map +1 -1
  27. package/lib/components/AppShell/AppShellContext.js +3 -1
  28. package/lib/components/AppShell/AppShellContext.js.map +1 -1
  29. package/lib/components/AppShell/AppShellList.styles.d.ts.map +1 -1
  30. package/lib/components/AppShell/AppShellList.styles.js +1 -0
  31. package/lib/components/AppShell/AppShellList.styles.js.map +1 -1
  32. package/lib/components/AppShell/AppShellSearch.styles.d.ts.map +1 -1
  33. package/lib/components/AppShell/AppShellSearch.styles.js +2 -0
  34. package/lib/components/AppShell/AppShellSearch.styles.js.map +1 -1
  35. package/lib/components/AppShell/NavigationList.d.ts.map +1 -1
  36. package/lib/components/AppShell/NavigationList.js +3 -3
  37. package/lib/components/AppShell/NavigationList.js.map +1 -1
  38. package/lib/components/AppShell/NavigationListItemWrapper.d.ts.map +1 -1
  39. package/lib/components/AppShell/NavigationListItemWrapper.js +1 -0
  40. package/lib/components/AppShell/NavigationListItemWrapper.js.map +1 -1
  41. package/lib/components/AppShell/Operator.d.ts +1 -1
  42. package/lib/components/AppShell/style-utils.d.ts +3 -0
  43. package/lib/components/AppShell/style-utils.d.ts.map +1 -1
  44. package/lib/components/AppShell/style-utils.js +40 -1
  45. package/lib/components/AppShell/style-utils.js.map +1 -1
  46. package/lib/components/Avatar/Avatar.d.ts +2 -2
  47. package/lib/components/Avatar/Avatar.d.ts.map +1 -1
  48. package/lib/components/Avatar/Avatar.js +19 -19
  49. package/lib/components/Avatar/Avatar.js.map +1 -1
  50. package/lib/components/Avatar/Avatar.test-ids.d.ts +1 -1
  51. package/lib/components/Avatar/Avatar.test-ids.d.ts.map +1 -1
  52. package/lib/components/Backdrop/Backdrop.d.ts +1 -1
  53. package/lib/components/Backdrop/Backdrop.test-ids.d.ts +1 -1
  54. package/lib/components/Backdrop/Backdrop.test-ids.d.ts.map +1 -1
  55. package/lib/components/Badges/Alert.d.ts +1 -1
  56. package/lib/components/Badges/Badges.test-ids.d.ts +6 -6
  57. package/lib/components/Badges/Badges.test-ids.d.ts.map +1 -1
  58. package/lib/components/Badges/Count.d.ts +1 -1
  59. package/lib/components/Badges/Keyboard.d.ts +1 -1
  60. package/lib/components/Badges/Selection.d.ts +1 -1
  61. package/lib/components/Badges/Selection.d.ts.map +1 -1
  62. package/lib/components/Badges/Selection.js +23 -20
  63. package/lib/components/Badges/Selection.js.map +1 -1
  64. package/lib/components/Badges/Status.d.ts +1 -1
  65. package/lib/components/Badges/Status.d.ts.map +1 -1
  66. package/lib/components/Badges/Status.js +0 -1
  67. package/lib/components/Badges/Status.js.map +1 -1
  68. package/lib/components/Badges/Tag.d.ts +1 -1
  69. package/lib/components/Banner/Banner.d.ts +1 -1
  70. package/lib/components/Banner/Banner.d.ts.map +1 -1
  71. package/lib/components/Banner/Banner.js +3 -1
  72. package/lib/components/Banner/Banner.js.map +1 -1
  73. package/lib/components/Banner/Banner.test-ids.d.ts +1 -1
  74. package/lib/components/Banner/Banner.test-ids.d.ts.map +1 -1
  75. package/lib/components/Button/Button.d.ts +1 -1
  76. package/lib/components/Button/Button.d.ts.map +1 -1
  77. package/lib/components/Button/Button.js +87 -58
  78. package/lib/components/Button/Button.js.map +1 -1
  79. package/lib/components/Card/Card.d.ts.map +1 -1
  80. package/lib/components/Card/Card.js +8 -0
  81. package/lib/components/Card/Card.js.map +1 -1
  82. package/lib/components/Checkbox/Checkbox.d.ts +3 -33
  83. package/lib/components/Checkbox/Checkbox.d.ts.map +1 -1
  84. package/lib/components/Checkbox/Checkbox.js +1 -5
  85. package/lib/components/Checkbox/Checkbox.js.map +1 -1
  86. package/lib/components/ColorPicker/ColorPicker.d.ts +6 -23
  87. package/lib/components/ColorPicker/ColorPicker.d.ts.map +1 -1
  88. package/lib/components/ColorPicker/ColorPicker.js +3 -4
  89. package/lib/components/ColorPicker/ColorPicker.js.map +1 -1
  90. package/lib/components/ColorPicker/ColorPicker.test-ids.d.ts +1 -1
  91. package/lib/components/ColorPicker/ColorPicker.test-ids.d.ts.map +1 -1
  92. package/lib/components/ComboBox/ComboBox.d.ts +2 -4
  93. package/lib/components/ComboBox/ComboBox.d.ts.map +1 -1
  94. package/lib/components/ComboBox/ComboBox.js +8 -5
  95. package/lib/components/ComboBox/ComboBox.js.map +1 -1
  96. package/lib/components/ComboBox/ComboBox.styles.d.ts.map +1 -1
  97. package/lib/components/ComboBox/ComboBox.styles.js +7 -1
  98. package/lib/components/ComboBox/ComboBox.styles.js.map +1 -1
  99. package/lib/components/ComboBox/ComboBox.types.d.ts +8 -26
  100. package/lib/components/ComboBox/ComboBox.types.d.ts.map +1 -1
  101. package/lib/components/ComboBox/ComboBox.types.js.map +1 -1
  102. package/lib/components/ComboBox/ComboxBox.test-ids.d.ts +1 -1
  103. package/lib/components/ComboBox/ComboxBox.test-ids.d.ts.map +1 -1
  104. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.d.ts.map +1 -1
  105. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.js +21 -32
  106. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.js.map +1 -1
  107. package/lib/components/CompositeInput/CompositeInput.d.ts +2 -3
  108. package/lib/components/CompositeInput/CompositeInput.d.ts.map +1 -1
  109. package/lib/components/CompositeInput/CompositeInput.js +2 -3
  110. package/lib/components/CompositeInput/CompositeInput.js.map +1 -1
  111. package/lib/components/CompositeInput/CompositeInput.test-ids.d.ts +1 -1
  112. package/lib/components/CompositeInput/CompositeInput.test-ids.d.ts.map +1 -1
  113. package/lib/components/CompositeInput/CompositeInput.types.d.ts +4 -13
  114. package/lib/components/CompositeInput/CompositeInput.types.d.ts.map +1 -1
  115. package/lib/components/CompositeInput/CompositeInput.types.js.map +1 -1
  116. package/lib/components/Configuration/Configuration.d.ts +1 -0
  117. package/lib/components/Configuration/Configuration.d.ts.map +1 -1
  118. package/lib/components/Configuration/Configuration.js +58 -30
  119. package/lib/components/Configuration/Configuration.js.map +1 -1
  120. package/lib/components/Configuration/ThemeOverride.d.ts +11 -0
  121. package/lib/components/Configuration/ThemeOverride.d.ts.map +1 -0
  122. package/lib/components/Configuration/ThemeOverride.js +23 -0
  123. package/lib/components/Configuration/ThemeOverride.js.map +1 -0
  124. package/lib/components/Configuration/connected-watcher.d.ts +17 -0
  125. package/lib/components/Configuration/connected-watcher.d.ts.map +1 -0
  126. package/lib/components/Configuration/connected-watcher.js +13 -0
  127. package/lib/components/Configuration/connected-watcher.js.map +1 -0
  128. package/lib/components/Configuration/index.d.ts +1 -0
  129. package/lib/components/Configuration/index.d.ts.map +1 -1
  130. package/lib/components/Configuration/index.js +1 -0
  131. package/lib/components/Configuration/index.js.map +1 -1
  132. package/lib/components/Configuration/withConfiguration.d.ts.map +1 -1
  133. package/lib/components/Configuration/withConfiguration.js.map +1 -1
  134. package/lib/components/CreditCard/CreditCard.types.d.ts +5 -25
  135. package/lib/components/CreditCard/CreditCard.types.d.ts.map +1 -1
  136. package/lib/components/CreditCard/CreditCard.types.js.map +1 -1
  137. package/lib/components/CreditCard/CreditCardDisplay.d.ts +2 -4
  138. package/lib/components/CreditCard/CreditCardDisplay.d.ts.map +1 -1
  139. package/lib/components/CreditCard/CreditCardDisplay.js +1 -2
  140. package/lib/components/CreditCard/CreditCardDisplay.js.map +1 -1
  141. package/lib/components/CreditCard/CreditCardInput.d.ts +15 -5
  142. package/lib/components/CreditCard/CreditCardInput.d.ts.map +1 -1
  143. package/lib/components/CreditCard/CreditCardInput.js +1 -2
  144. package/lib/components/CreditCard/CreditCardInput.js.map +1 -1
  145. package/lib/components/Currency/Currency.test-ids.d.ts +1 -1
  146. package/lib/components/Currency/Currency.test-ids.d.ts.map +1 -1
  147. package/lib/components/Currency/CurrencyInput.d.ts +1 -1
  148. package/lib/components/Currency/CurrencyInput.js +1 -1
  149. package/lib/components/Currency/CurrencyInput.js.map +1 -1
  150. package/lib/components/Currency/CurrencyInput.types.d.ts +1 -1
  151. package/lib/components/Currency/CurrencyInput.types.d.ts.map +1 -1
  152. package/lib/components/Currency/CurrencyInput.types.js.map +1 -1
  153. package/lib/components/DangerButton/DangerButton.js +2 -2
  154. package/lib/components/DangerButton/DangerButton.js.map +1 -1
  155. package/lib/components/DateTime/DateTime.test-ids.d.ts +11 -11
  156. package/lib/components/DateTime/DateTime.test-ids.d.ts.map +1 -1
  157. package/lib/components/DateTime/DateTime.test-ids.js +5 -1
  158. package/lib/components/DateTime/DateTime.test-ids.js.map +1 -1
  159. package/lib/components/DateTime/Input/DateInput.d.ts +1 -1
  160. package/lib/components/DateTime/Input/DateInput.d.ts.map +1 -1
  161. package/lib/components/DateTime/Input/DateInput.js +30 -27
  162. package/lib/components/DateTime/Input/DateInput.js.map +1 -1
  163. package/lib/components/DateTime/Input/DateRangeInput.d.ts +1 -1
  164. package/lib/components/DateTime/Input/DateRangeInput.js +2 -2
  165. package/lib/components/DateTime/Input/DateRangeInput.js.map +1 -1
  166. package/lib/components/DateTime/Input/DateTime.styles.d.ts +1 -0
  167. package/lib/components/DateTime/Input/DateTime.styles.d.ts.map +1 -1
  168. package/lib/components/DateTime/Input/DateTime.styles.js +24 -16
  169. package/lib/components/DateTime/Input/DateTime.styles.js.map +1 -1
  170. package/lib/components/DateTime/Input/DateTimeInput.d.ts +1 -1
  171. package/lib/components/DateTime/Input/DateTimeInput.d.ts.map +1 -1
  172. package/lib/components/DateTime/Input/DateTimeInput.js +26 -25
  173. package/lib/components/DateTime/Input/DateTimeInput.js.map +1 -1
  174. package/lib/components/DateTime/Input/DayOfWeekInput.d.ts +1 -1
  175. package/lib/components/DateTime/Input/Duration/DurationInput.d.ts +1 -1
  176. package/lib/components/DateTime/Input/MonthInput.d.ts +1 -1
  177. package/lib/components/DateTime/Input/MonthInput.d.ts.map +1 -1
  178. package/lib/components/DateTime/Input/MonthInput.js +21 -10
  179. package/lib/components/DateTime/Input/MonthInput.js.map +1 -1
  180. package/lib/components/DateTime/Input/PartInput.d.ts +1 -1
  181. package/lib/components/DateTime/Input/PartInput.d.ts.map +1 -1
  182. package/lib/components/DateTime/Input/PartInput.js +13 -7
  183. package/lib/components/DateTime/Input/PartInput.js.map +1 -1
  184. package/lib/components/DateTime/Input/QuarterInput.d.ts +1 -1
  185. package/lib/components/DateTime/Input/TimeInput.d.ts +1 -1
  186. package/lib/components/DateTime/Input/TimeInput.d.ts.map +1 -1
  187. package/lib/components/DateTime/Input/TimeInput.js +2 -7
  188. package/lib/components/DateTime/Input/TimeInput.js.map +1 -1
  189. package/lib/components/DateTime/Input/TimeRangeInput.d.ts +1 -1
  190. package/lib/components/DateTime/Input/TimeRangeInput.js +3 -3
  191. package/lib/components/DateTime/Input/TimeRangeInput.js.map +1 -1
  192. package/lib/components/DateTime/Input/WeekInput.d.ts +1 -1
  193. package/lib/components/DateTime/Input/WeekInput.d.ts.map +1 -1
  194. package/lib/components/DateTime/Input/WeekInput.js +17 -6
  195. package/lib/components/DateTime/Input/WeekInput.js.map +1 -1
  196. package/lib/components/DateTime/Input/utils.d.ts +2 -2
  197. package/lib/components/DateTime/Input/utils.d.ts.map +1 -1
  198. package/lib/components/DateTime/Input/utils.js +5 -2
  199. package/lib/components/DateTime/Input/utils.js.map +1 -1
  200. package/lib/components/DateTime/Picker/DatePicker.d.ts +1 -1
  201. package/lib/components/DateTime/Picker/DatePicker.d.ts.map +1 -1
  202. package/lib/components/DateTime/Picker/DatePicker.js +28 -17
  203. package/lib/components/DateTime/Picker/DatePicker.js.map +1 -1
  204. package/lib/components/DateTime/Picker/DatePicker.styles.d.ts +1 -0
  205. package/lib/components/DateTime/Picker/DatePicker.styles.d.ts.map +1 -1
  206. package/lib/components/DateTime/Picker/DatePicker.styles.js +13 -5
  207. package/lib/components/DateTime/Picker/DatePicker.styles.js.map +1 -1
  208. package/lib/components/DateTime/Picker/DateRangePicker.d.ts.map +1 -1
  209. package/lib/components/DateTime/Picker/DateRangePicker.js +18 -11
  210. package/lib/components/DateTime/Picker/DateRangePicker.js.map +1 -1
  211. package/lib/components/DateTime/Picker/TimePicker.d.ts.map +1 -1
  212. package/lib/components/DateTime/Picker/TimePicker.js +2 -1
  213. package/lib/components/DateTime/Picker/TimePicker.js.map +1 -1
  214. package/lib/components/DateTime/Picker/utils.d.ts +9 -0
  215. package/lib/components/DateTime/Picker/utils.d.ts.map +1 -1
  216. package/lib/components/DateTime/Picker/utils.js +16 -0
  217. package/lib/components/DateTime/Picker/utils.js.map +1 -1
  218. package/lib/components/DateTime/index.d.ts +1 -1
  219. package/lib/components/DateTime/index.d.ts.map +1 -1
  220. package/lib/components/DateTime/index.js +1 -1
  221. package/lib/components/DateTime/index.js.map +1 -1
  222. package/lib/components/DateTime/utils.d.ts +1 -0
  223. package/lib/components/DateTime/utils.d.ts.map +1 -1
  224. package/lib/components/DateTime/utils.js +13 -11
  225. package/lib/components/DateTime/utils.js.map +1 -1
  226. package/lib/components/Email/EmailDisplay.d.ts.map +1 -1
  227. package/lib/components/Email/EmailDisplay.js +2 -2
  228. package/lib/components/Email/EmailDisplay.js.map +1 -1
  229. package/lib/components/EmptyState/EmptyState.d.ts.map +1 -1
  230. package/lib/components/EmptyState/EmptyState.js +5 -2
  231. package/lib/components/EmptyState/EmptyState.js.map +1 -1
  232. package/lib/components/FieldGroup/FieldGroup.d.ts +6 -0
  233. package/lib/components/FieldGroup/FieldGroup.d.ts.map +1 -1
  234. package/lib/components/FieldGroup/FieldGroup.js +37 -15
  235. package/lib/components/FieldGroup/FieldGroup.js.map +1 -1
  236. package/lib/components/FieldGroup/FieldGroupList.d.ts.map +1 -1
  237. package/lib/components/FieldGroup/FieldGroupList.js +39 -20
  238. package/lib/components/FieldGroup/FieldGroupList.js.map +1 -1
  239. package/lib/components/FieldValueList/FieldValueList.d.ts +14 -10
  240. package/lib/components/FieldValueList/FieldValueList.d.ts.map +1 -1
  241. package/lib/components/FieldValueList/FieldValueList.js +13 -5
  242. package/lib/components/FieldValueList/FieldValueList.js.map +1 -1
  243. package/lib/components/FieldValueList/FieldValueList.test-ids.d.ts +2 -2
  244. package/lib/components/FieldValueList/FieldValueList.test-ids.d.ts.map +1 -1
  245. package/lib/components/FieldValueList/index.d.ts +1 -1
  246. package/lib/components/FieldValueList/index.d.ts.map +1 -1
  247. package/lib/components/FieldValueList/index.js.map +1 -1
  248. package/lib/components/File/CompactList.d.ts +15 -0
  249. package/lib/components/File/CompactList.d.ts.map +1 -0
  250. package/lib/components/File/CompactList.js +21 -0
  251. package/lib/components/File/CompactList.js.map +1 -0
  252. package/lib/components/File/File.test-ids.d.ts +1 -1
  253. package/lib/components/File/File.test-ids.d.ts.map +1 -1
  254. package/lib/components/File/FileDisplay.d.ts +5 -0
  255. package/lib/components/File/FileDisplay.d.ts.map +1 -1
  256. package/lib/components/File/FileDisplay.js +2 -2
  257. package/lib/components/File/FileDisplay.js.map +1 -1
  258. package/lib/components/File/FileDisplayList.d.ts +4 -2
  259. package/lib/components/File/FileDisplayList.d.ts.map +1 -1
  260. package/lib/components/File/FileDisplayList.js +9 -3
  261. package/lib/components/File/FileDisplayList.js.map +1 -1
  262. package/lib/components/File/FileInput.d.ts +32 -8
  263. package/lib/components/File/FileInput.d.ts.map +1 -1
  264. package/lib/components/File/FileInput.js +169 -74
  265. package/lib/components/File/FileInput.js.map +1 -1
  266. package/lib/components/File/FileInput.styles.d.ts +26 -0
  267. package/lib/components/File/FileInput.styles.d.ts.map +1 -0
  268. package/lib/components/File/FileInput.styles.js +166 -0
  269. package/lib/components/File/FileInput.styles.js.map +1 -0
  270. package/lib/components/File/FileItem.d.ts +16 -0
  271. package/lib/components/File/FileItem.d.ts.map +1 -1
  272. package/lib/components/File/FileItem.js +82 -27
  273. package/lib/components/File/FileItem.js.map +1 -1
  274. package/lib/components/File/FileList.d.ts +9 -3
  275. package/lib/components/File/FileList.d.ts.map +1 -1
  276. package/lib/components/File/FileList.js +53 -9
  277. package/lib/components/File/FileList.js.map +1 -1
  278. package/lib/components/File/FileUploadItem.d.ts +4 -0
  279. package/lib/components/File/FileUploadItem.d.ts.map +1 -1
  280. package/lib/components/File/FileUploadItem.js +42 -38
  281. package/lib/components/File/FileUploadItem.js.map +1 -1
  282. package/lib/components/Flex/Flex.js.map +1 -1
  283. package/lib/components/Form/Form.d.ts +1 -1
  284. package/lib/components/Form/Form.test-ids.d.ts +1 -1
  285. package/lib/components/Form/Form.test-ids.d.ts.map +1 -1
  286. package/lib/components/FormField/FormField.d.ts +2 -2
  287. package/lib/components/FormField/FormField.d.ts.map +1 -1
  288. package/lib/components/FormField/FormField.js +62 -64
  289. package/lib/components/FormField/FormField.js.map +1 -1
  290. package/lib/components/FormField/FormField.test-ids.d.ts +1 -1
  291. package/lib/components/FormField/FormField.test-ids.d.ts.map +1 -1
  292. package/lib/components/Fullscreen/Fullscreen.d.ts +18 -0
  293. package/lib/components/Fullscreen/Fullscreen.d.ts.map +1 -0
  294. package/lib/components/Fullscreen/Fullscreen.js +56 -0
  295. package/lib/components/Fullscreen/Fullscreen.js.map +1 -0
  296. package/lib/components/Fullscreen/Fullscreen.test-ids.d.ts +2 -0
  297. package/lib/components/Fullscreen/Fullscreen.test-ids.d.ts.map +1 -0
  298. package/lib/components/Fullscreen/Fullscreen.test-ids.js +3 -0
  299. package/lib/components/Fullscreen/Fullscreen.test-ids.js.map +1 -0
  300. package/lib/components/Fullscreen/FullscreenButton.d.ts +6 -0
  301. package/lib/components/Fullscreen/FullscreenButton.d.ts.map +1 -0
  302. package/lib/components/Fullscreen/FullscreenButton.js +33 -0
  303. package/lib/components/Fullscreen/FullscreenButton.js.map +1 -0
  304. package/lib/components/Fullscreen/index.d.ts +4 -0
  305. package/lib/components/Fullscreen/index.d.ts.map +1 -0
  306. package/lib/components/Fullscreen/index.js +4 -0
  307. package/lib/components/Fullscreen/index.js.map +1 -0
  308. package/lib/components/HTML/HTML.d.ts +1 -1
  309. package/lib/components/HTML/HTML.test-ids.d.ts +1 -1
  310. package/lib/components/HTML/HTML.test-ids.d.ts.map +1 -1
  311. package/lib/components/Icon/Icon.d.ts.map +1 -1
  312. package/lib/components/Icon/Icon.js +2 -2
  313. package/lib/components/Icon/Icon.js.map +1 -1
  314. package/lib/components/Icon/iconNames.d.ts +1 -1
  315. package/lib/components/Icon/iconNames.d.ts.map +1 -1
  316. package/lib/components/Icon/iconNames.js +2 -0
  317. package/lib/components/Icon/iconNames.js.map +1 -1
  318. package/lib/components/Icon/icons/calendar-now.icon.d.ts +5 -0
  319. package/lib/components/Icon/icons/calendar-now.icon.d.ts.map +1 -0
  320. package/lib/components/Icon/icons/calendar-now.icon.js +7 -0
  321. package/lib/components/Icon/icons/calendar-now.icon.js.map +1 -0
  322. package/lib/components/Icon/icons/preview.icon.d.ts +5 -0
  323. package/lib/components/Icon/icons/preview.icon.d.ts.map +1 -0
  324. package/lib/components/Icon/icons/preview.icon.js +7 -0
  325. package/lib/components/Icon/icons/preview.icon.js.map +1 -0
  326. package/lib/components/Icon/streamline-icons/arrow-down.icon.d.ts.map +1 -1
  327. package/lib/components/Icon/streamline-icons/arrow-down.icon.js +1 -1
  328. package/lib/components/Icon/streamline-icons/arrow-down.icon.js.map +1 -1
  329. package/lib/components/Icon/streamline-icons/arrow-left.icon.d.ts.map +1 -1
  330. package/lib/components/Icon/streamline-icons/arrow-left.icon.js +1 -1
  331. package/lib/components/Icon/streamline-icons/arrow-left.icon.js.map +1 -1
  332. package/lib/components/Icon/streamline-icons/arrow-right.icon.d.ts.map +1 -1
  333. package/lib/components/Icon/streamline-icons/arrow-right.icon.js +1 -1
  334. package/lib/components/Icon/streamline-icons/arrow-right.icon.js.map +1 -1
  335. package/lib/components/Icon/streamline-icons/arrow-up.icon.d.ts.map +1 -1
  336. package/lib/components/Icon/streamline-icons/arrow-up.icon.js +1 -1
  337. package/lib/components/Icon/streamline-icons/arrow-up.icon.js.map +1 -1
  338. package/lib/components/Icon/streamline-icons/calendar-now.icon.d.ts +5 -0
  339. package/lib/components/Icon/streamline-icons/calendar-now.icon.d.ts.map +1 -0
  340. package/lib/components/Icon/streamline-icons/calendar-now.icon.js +7 -0
  341. package/lib/components/Icon/streamline-icons/calendar-now.icon.js.map +1 -0
  342. package/lib/components/Icon/streamline-icons/caret-down.icon.d.ts.map +1 -1
  343. package/lib/components/Icon/streamline-icons/caret-down.icon.js +1 -1
  344. package/lib/components/Icon/streamline-icons/caret-down.icon.js.map +1 -1
  345. package/lib/components/Icon/streamline-icons/caret-left.icon.d.ts.map +1 -1
  346. package/lib/components/Icon/streamline-icons/caret-left.icon.js +1 -1
  347. package/lib/components/Icon/streamline-icons/caret-left.icon.js.map +1 -1
  348. package/lib/components/Icon/streamline-icons/caret-right.icon.d.ts.map +1 -1
  349. package/lib/components/Icon/streamline-icons/caret-right.icon.js +1 -1
  350. package/lib/components/Icon/streamline-icons/caret-right.icon.js.map +1 -1
  351. package/lib/components/Icon/streamline-icons/caret-up.icon.d.ts.map +1 -1
  352. package/lib/components/Icon/streamline-icons/caret-up.icon.js +1 -1
  353. package/lib/components/Icon/streamline-icons/caret-up.icon.js.map +1 -1
  354. package/lib/components/Icon/streamline-icons/case-solid.icon.js +1 -1
  355. package/lib/components/Icon/streamline-icons/case-solid.icon.js.map +1 -1
  356. package/lib/components/Icon/streamline-icons/clipboard-pencil-solid.icon.js +1 -1
  357. package/lib/components/Icon/streamline-icons/clipboard-pencil-solid.icon.js.map +1 -1
  358. package/lib/components/Icon/streamline-icons/clock-solid.icon.js +1 -1
  359. package/lib/components/Icon/streamline-icons/clock-solid.icon.js.map +1 -1
  360. package/lib/components/Icon/streamline-icons/disc-stack-solid.icon.d.ts.map +1 -1
  361. package/lib/components/Icon/streamline-icons/disc-stack-solid.icon.js +1 -1
  362. package/lib/components/Icon/streamline-icons/disc-stack-solid.icon.js.map +1 -1
  363. package/lib/components/Icon/streamline-icons/dock.icon.d.ts +5 -0
  364. package/lib/components/Icon/streamline-icons/dock.icon.d.ts.map +1 -0
  365. package/lib/components/Icon/streamline-icons/dock.icon.js +7 -0
  366. package/lib/components/Icon/streamline-icons/dock.icon.js.map +1 -0
  367. package/lib/components/Icon/streamline-icons/expression.icon.d.ts +5 -0
  368. package/lib/components/Icon/streamline-icons/expression.icon.d.ts.map +1 -0
  369. package/lib/components/Icon/streamline-icons/expression.icon.js +7 -0
  370. package/lib/components/Icon/streamline-icons/expression.icon.js.map +1 -0
  371. package/lib/components/Icon/streamline-icons/indent.icon.d.ts +5 -0
  372. package/lib/components/Icon/streamline-icons/indent.icon.d.ts.map +1 -0
  373. package/lib/components/Icon/streamline-icons/indent.icon.js +7 -0
  374. package/lib/components/Icon/streamline-icons/indent.icon.js.map +1 -0
  375. package/lib/components/Icon/streamline-icons/information-solid.icon.js +1 -1
  376. package/lib/components/Icon/streamline-icons/information-solid.icon.js.map +1 -1
  377. package/lib/components/Icon/streamline-icons/list-number.icon.d.ts +5 -0
  378. package/lib/components/Icon/streamline-icons/list-number.icon.d.ts.map +1 -0
  379. package/lib/components/Icon/streamline-icons/list-number.icon.js +7 -0
  380. package/lib/components/Icon/streamline-icons/list-number.icon.js.map +1 -0
  381. package/lib/components/Icon/streamline-icons/open.icon.d.ts.map +1 -1
  382. package/lib/components/Icon/streamline-icons/open.icon.js +1 -1
  383. package/lib/components/Icon/streamline-icons/open.icon.js.map +1 -1
  384. package/lib/components/Icon/streamline-icons/rule-library-solid.icon.js +1 -1
  385. package/lib/components/Icon/streamline-icons/rule-library-solid.icon.js.map +1 -1
  386. package/lib/components/Icon/streamline-icons/search-analytics-solid.icon.js +1 -1
  387. package/lib/components/Icon/streamline-icons/search-analytics-solid.icon.js.map +1 -1
  388. package/lib/components/Icon/streamline-icons/undock.icon.d.ts +5 -0
  389. package/lib/components/Icon/streamline-icons/undock.icon.d.ts.map +1 -0
  390. package/lib/components/Icon/streamline-icons/undock.icon.js +7 -0
  391. package/lib/components/Icon/streamline-icons/undock.icon.js.map +1 -0
  392. package/lib/components/Icon/streamline-icons/unindent.icon.d.ts +5 -0
  393. package/lib/components/Icon/streamline-icons/unindent.icon.d.ts.map +1 -0
  394. package/lib/components/Icon/streamline-icons/unindent.icon.js +7 -0
  395. package/lib/components/Icon/streamline-icons/unindent.icon.js.map +1 -0
  396. package/lib/components/Icon/streamline-icons/warn-solid.icon.js +1 -1
  397. package/lib/components/Icon/streamline-icons/warn-solid.icon.js.map +1 -1
  398. package/lib/components/Icon/streamlineIconNames.d.ts +1 -1
  399. package/lib/components/Icon/streamlineIconNames.d.ts.map +1 -1
  400. package/lib/components/Icon/streamlineIconNames.js +7 -0
  401. package/lib/components/Icon/streamlineIconNames.js.map +1 -1
  402. package/lib/components/IconPicker/IconPicker.d.ts +7 -1
  403. package/lib/components/IconPicker/IconPicker.d.ts.map +1 -1
  404. package/lib/components/IconPicker/IconPicker.js +20 -14
  405. package/lib/components/IconPicker/IconPicker.js.map +1 -1
  406. package/lib/components/Input/Input.d.ts +5 -8
  407. package/lib/components/Input/Input.d.ts.map +1 -1
  408. package/lib/components/Input/Input.js +2 -3
  409. package/lib/components/Input/Input.js.map +1 -1
  410. package/lib/components/Input/Input.test-ids.d.ts +1 -1
  411. package/lib/components/Input/Input.test-ids.d.ts.map +1 -1
  412. package/lib/components/Lightbox/Lightbox.d.ts +1 -1
  413. package/lib/components/Lightbox/Lightbox.d.ts.map +1 -1
  414. package/lib/components/Lightbox/Lightbox.js +13 -6
  415. package/lib/components/Lightbox/Lightbox.js.map +1 -1
  416. package/lib/components/Lightbox/Lightbox.styles.d.ts +1 -1
  417. package/lib/components/Lightbox/Lightbox.test-ids.d.ts +1 -1
  418. package/lib/components/Lightbox/Lightbox.test-ids.d.ts.map +1 -1
  419. package/lib/components/Lightbox/Lightbox.types.d.ts +1 -1
  420. package/lib/components/Lightbox/Lightbox.types.d.ts.map +1 -1
  421. package/lib/components/Lightbox/Lightbox.types.js.map +1 -1
  422. package/lib/components/Link/Link.d.ts +5 -2
  423. package/lib/components/Link/Link.d.ts.map +1 -1
  424. package/lib/components/Link/Link.js +45 -17
  425. package/lib/components/Link/Link.js.map +1 -1
  426. package/lib/components/Link/Link.test-ids.d.ts +1 -1
  427. package/lib/components/Link/Link.test-ids.d.ts.map +1 -1
  428. package/lib/components/ListToolbar/ListToolbar.d.ts +1 -1
  429. package/lib/components/ListToolbar/ListToolbar.d.ts.map +1 -1
  430. package/lib/components/ListToolbar/ListToolbar.js +8 -7
  431. package/lib/components/ListToolbar/ListToolbar.js.map +1 -1
  432. package/lib/components/ListToolbar/ListToolbar.styles.d.ts.map +1 -1
  433. package/lib/components/ListToolbar/ListToolbar.styles.js +5 -5
  434. package/lib/components/ListToolbar/ListToolbar.styles.js.map +1 -1
  435. package/lib/components/ListToolbar/ListToolbar.test-ids.d.ts +1 -1
  436. package/lib/components/ListToolbar/ListToolbar.test-ids.d.ts.map +1 -1
  437. package/lib/components/ListToolbar/ListToolbar.test-ids.js +4 -1
  438. package/lib/components/ListToolbar/ListToolbar.test-ids.js.map +1 -1
  439. package/lib/components/ListToolbar/ListToolbar.types.d.ts +7 -3
  440. package/lib/components/ListToolbar/ListToolbar.types.d.ts.map +1 -1
  441. package/lib/components/ListToolbar/ListToolbar.types.js.map +1 -1
  442. package/lib/components/ListToolbar/PresetMenuPopover.d.ts.map +1 -1
  443. package/lib/components/ListToolbar/PresetMenuPopover.js +2 -2
  444. package/lib/components/ListToolbar/PresetMenuPopover.js.map +1 -1
  445. package/lib/components/ListToolbar/helpers.d.ts.map +1 -1
  446. package/lib/components/ListToolbar/helpers.js.map +1 -1
  447. package/lib/components/Location/CurrentLocationButton.d.ts +1 -6
  448. package/lib/components/Location/CurrentLocationButton.d.ts.map +1 -1
  449. package/lib/components/Location/CurrentLocationButton.js +10 -20
  450. package/lib/components/Location/CurrentLocationButton.js.map +1 -1
  451. package/lib/components/Location/Location.test-ids.d.ts +1 -1
  452. package/lib/components/Location/Location.test-ids.d.ts.map +1 -1
  453. package/lib/components/Location/Location.types.d.ts +49 -17
  454. package/lib/components/Location/Location.types.d.ts.map +1 -1
  455. package/lib/components/Location/Location.types.js +9 -1
  456. package/lib/components/Location/Location.types.js.map +1 -1
  457. package/lib/components/Location/LocationDisplay.d.ts +5 -4
  458. package/lib/components/Location/LocationDisplay.d.ts.map +1 -1
  459. package/lib/components/Location/LocationDisplay.js +17 -4
  460. package/lib/components/Location/LocationDisplay.js.map +1 -1
  461. package/lib/components/Location/LocationInput.d.ts +23 -18
  462. package/lib/components/Location/LocationInput.d.ts.map +1 -1
  463. package/lib/components/Location/LocationInput.js +37 -15
  464. package/lib/components/Location/LocationInput.js.map +1 -1
  465. package/lib/components/Location/LocationView.d.ts +26 -12
  466. package/lib/components/Location/LocationView.d.ts.map +1 -1
  467. package/lib/components/Location/LocationView.js +103 -50
  468. package/lib/components/Location/LocationView.js.map +1 -1
  469. package/lib/components/Location/index.d.ts +2 -2
  470. package/lib/components/Location/index.d.ts.map +1 -1
  471. package/lib/components/Location/index.js +1 -1
  472. package/lib/components/Location/index.js.map +1 -1
  473. package/lib/components/Location/utils.d.ts +2 -2
  474. package/lib/components/Location/utils.d.ts.map +1 -1
  475. package/lib/components/Location/utils.js +67 -38
  476. package/lib/components/Location/utils.js.map +1 -1
  477. package/lib/components/Menu/Menu.context.d.ts.map +1 -1
  478. package/lib/components/Menu/Menu.context.js +1 -0
  479. package/lib/components/Menu/Menu.context.js.map +1 -1
  480. package/lib/components/Menu/Menu.d.ts +1 -1
  481. package/lib/components/Menu/Menu.d.ts.map +1 -1
  482. package/lib/components/Menu/Menu.js +6 -2
  483. package/lib/components/Menu/Menu.js.map +1 -1
  484. package/lib/components/Menu/Menu.styles.d.ts +0 -1
  485. package/lib/components/Menu/Menu.styles.d.ts.map +1 -1
  486. package/lib/components/Menu/Menu.styles.js +2 -9
  487. package/lib/components/Menu/Menu.styles.js.map +1 -1
  488. package/lib/components/Menu/Menu.test-ids.d.ts +2 -2
  489. package/lib/components/Menu/Menu.test-ids.d.ts.map +1 -1
  490. package/lib/components/Menu/Menu.types.d.ts +14 -2
  491. package/lib/components/Menu/Menu.types.d.ts.map +1 -1
  492. package/lib/components/Menu/Menu.types.js.map +1 -1
  493. package/lib/components/Menu/Menu.utils.d.ts +4 -0
  494. package/lib/components/Menu/Menu.utils.d.ts.map +1 -0
  495. package/lib/components/Menu/Menu.utils.js +6 -0
  496. package/lib/components/Menu/Menu.utils.js.map +1 -0
  497. package/lib/components/Menu/MenuGroup.js +2 -2
  498. package/lib/components/Menu/MenuGroup.js.map +1 -1
  499. package/lib/components/Menu/MenuItem.d.ts +1 -1
  500. package/lib/components/Menu/MenuItem.d.ts.map +1 -1
  501. package/lib/components/Menu/MenuItem.js +3 -3
  502. package/lib/components/Menu/MenuItem.js.map +1 -1
  503. package/lib/components/Menu/MenuList.d.ts.map +1 -1
  504. package/lib/components/Menu/MenuList.js +3 -3
  505. package/lib/components/Menu/MenuList.js.map +1 -1
  506. package/lib/components/Menu/NavItemsList.d.ts.map +1 -1
  507. package/lib/components/Menu/NavItemsList.js +1 -3
  508. package/lib/components/Menu/NavItemsList.js.map +1 -1
  509. package/lib/components/Menu/index.d.ts +1 -0
  510. package/lib/components/Menu/index.d.ts.map +1 -1
  511. package/lib/components/Menu/index.js +1 -0
  512. package/lib/components/Menu/index.js.map +1 -1
  513. package/lib/components/MenuButton/MenuButton.d.ts +8 -1
  514. package/lib/components/MenuButton/MenuButton.d.ts.map +1 -1
  515. package/lib/components/MenuButton/MenuButton.js +24 -14
  516. package/lib/components/MenuButton/MenuButton.js.map +1 -1
  517. package/lib/components/MenuButton/MenuButton.test-ids.d.ts +1 -1
  518. package/lib/components/MenuButton/MenuButton.test-ids.d.ts.map +1 -1
  519. package/lib/components/MetaList/MetaList.d.ts +1 -1
  520. package/lib/components/MetaList/MetaList.test-ids.d.ts +1 -1
  521. package/lib/components/MetaList/MetaList.test-ids.d.ts.map +1 -1
  522. package/lib/components/Modal/Modal.d.ts.map +1 -1
  523. package/lib/components/Modal/Modal.js +31 -7
  524. package/lib/components/Modal/Modal.js.map +1 -1
  525. package/lib/components/Modal/Modal.styles.d.ts +3 -1
  526. package/lib/components/Modal/Modal.styles.d.ts.map +1 -1
  527. package/lib/components/Modal/Modal.styles.js +34 -17
  528. package/lib/components/Modal/Modal.styles.js.map +1 -1
  529. package/lib/components/Modal/ModalManager.d.ts.map +1 -1
  530. package/lib/components/Modal/ModalManager.js +5 -1
  531. package/lib/components/Modal/ModalManager.js.map +1 -1
  532. package/lib/components/MultiStepForm/MultiStepForm.d.ts.map +1 -1
  533. package/lib/components/MultiStepForm/MultiStepForm.js +28 -1
  534. package/lib/components/MultiStepForm/MultiStepForm.js.map +1 -1
  535. package/lib/components/Number/Number.test-ids.d.ts +2 -2
  536. package/lib/components/Number/Number.test-ids.d.ts.map +1 -1
  537. package/lib/components/Number/NumberDisplay.d.ts +5 -8
  538. package/lib/components/Number/NumberDisplay.d.ts.map +1 -1
  539. package/lib/components/Number/NumberDisplay.js +1 -2
  540. package/lib/components/Number/NumberDisplay.js.map +1 -1
  541. package/lib/components/Number/NumberInput.d.ts +2 -4
  542. package/lib/components/Number/NumberInput.d.ts.map +1 -1
  543. package/lib/components/Number/NumberInput.js +15 -7
  544. package/lib/components/Number/NumberInput.js.map +1 -1
  545. package/lib/components/Number/NumberInput.types.d.ts +12 -30
  546. package/lib/components/Number/NumberInput.types.d.ts.map +1 -1
  547. package/lib/components/Number/NumberInput.types.js.map +1 -1
  548. package/lib/components/Number/NumberRangeInput.d.ts +2 -4
  549. package/lib/components/Number/NumberRangeInput.d.ts.map +1 -1
  550. package/lib/components/Number/NumberRangeInput.js +7 -72
  551. package/lib/components/Number/NumberRangeInput.js.map +1 -1
  552. package/lib/components/PageTemplates/CategorySubPage.styles.d.ts +3 -1
  553. package/lib/components/PageTemplates/CategorySubPage.styles.d.ts.map +1 -1
  554. package/lib/components/PageTemplates/CategorySubPage.styles.js +2 -0
  555. package/lib/components/PageTemplates/CategorySubPage.styles.js.map +1 -1
  556. package/lib/components/PageTemplates/DashboardPage.d.ts.map +1 -1
  557. package/lib/components/PageTemplates/DashboardPage.js +41 -6
  558. package/lib/components/PageTemplates/DashboardPage.js.map +1 -1
  559. package/lib/components/PageTemplates/PageTemplates.d.ts +1 -0
  560. package/lib/components/PageTemplates/PageTemplates.d.ts.map +1 -1
  561. package/lib/components/PageTemplates/PageTemplates.js +85 -31
  562. package/lib/components/PageTemplates/PageTemplates.js.map +1 -1
  563. package/lib/components/Phone/Phone.test-ids.d.ts +1 -1
  564. package/lib/components/Phone/Phone.test-ids.d.ts.map +1 -1
  565. package/lib/components/Phone/PhoneDisplay.d.ts.map +1 -1
  566. package/lib/components/Phone/PhoneDisplay.js +2 -2
  567. package/lib/components/Phone/PhoneDisplay.js.map +1 -1
  568. package/lib/components/Phone/PhoneInput.d.ts +1 -1
  569. package/lib/components/Phone/PhoneInput.d.ts.map +1 -1
  570. package/lib/components/Phone/PhoneInput.js +20 -5
  571. package/lib/components/Phone/PhoneInput.js.map +1 -1
  572. package/lib/components/Popover/Popover.d.ts +2 -0
  573. package/lib/components/Popover/Popover.d.ts.map +1 -1
  574. package/lib/components/Popover/Popover.js +20 -3
  575. package/lib/components/Popover/Popover.js.map +1 -1
  576. package/lib/components/Popover/Popover.styles.d.ts.map +1 -1
  577. package/lib/components/Popover/Popover.styles.js +2 -2
  578. package/lib/components/Popover/Popover.styles.js.map +1 -1
  579. package/lib/components/Popover/modifiers.d.ts.map +1 -1
  580. package/lib/components/Popover/modifiers.js +11 -5
  581. package/lib/components/Popover/modifiers.js.map +1 -1
  582. package/lib/components/Progress/Progress.d.ts.map +1 -1
  583. package/lib/components/Progress/Progress.js +2 -2
  584. package/lib/components/Progress/Progress.js.map +1 -1
  585. package/lib/components/Progress/Progress.styles.d.ts +1 -1
  586. package/lib/components/Progress/Progress.styles.d.ts.map +1 -1
  587. package/lib/components/Progress/Progress.styles.js +7 -7
  588. package/lib/components/Progress/Progress.styles.js.map +1 -1
  589. package/lib/components/Progress/Progress.types.d.ts +4 -0
  590. package/lib/components/Progress/Progress.types.d.ts.map +1 -1
  591. package/lib/components/Progress/Progress.types.js.map +1 -1
  592. package/lib/components/RadioCheck/RadioCheck.d.ts +6 -30
  593. package/lib/components/RadioCheck/RadioCheck.d.ts.map +1 -1
  594. package/lib/components/RadioCheck/RadioCheck.js +1 -2
  595. package/lib/components/RadioCheck/RadioCheck.js.map +1 -1
  596. package/lib/components/RadioCheckGroup/RadioCheckGroup.d.ts.map +1 -1
  597. package/lib/components/RadioCheckGroup/RadioCheckGroup.js +1 -1
  598. package/lib/components/RadioCheckGroup/RadioCheckGroup.js.map +1 -1
  599. package/lib/components/SearchInput/SearchInput.d.ts +19 -6
  600. package/lib/components/SearchInput/SearchInput.d.ts.map +1 -1
  601. package/lib/components/SearchInput/SearchInput.js +5 -1
  602. package/lib/components/SearchInput/SearchInput.js.map +1 -1
  603. package/lib/components/SearchInput/SearchInput.styles.d.ts +3 -3
  604. package/lib/components/SearchInput/SearchInput.styles.d.ts.map +1 -1
  605. package/lib/components/SearchInput/SearchInput.styles.js +15 -15
  606. package/lib/components/SearchInput/SearchInput.styles.js.map +1 -1
  607. package/lib/components/Select/Select.d.ts +1 -1
  608. package/lib/components/Select/Select.test-ids.d.ts +1 -1
  609. package/lib/components/Select/Select.test-ids.d.ts.map +1 -1
  610. package/lib/components/Slider/Slider.d.ts +1 -1
  611. package/lib/components/Slider/Slider.js +1 -1
  612. package/lib/components/Slider/Slider.js.map +1 -1
  613. package/lib/components/Slider/Slider.styles.d.ts +1 -1
  614. package/lib/components/Slider/Slider.test-ids.d.ts +1 -1
  615. package/lib/components/Slider/Slider.test-ids.d.ts.map +1 -1
  616. package/lib/components/SummaryItem/SummaryItem.d.ts +6 -1
  617. package/lib/components/SummaryItem/SummaryItem.d.ts.map +1 -1
  618. package/lib/components/SummaryItem/SummaryItem.js +13 -5
  619. package/lib/components/SummaryItem/SummaryItem.js.map +1 -1
  620. package/lib/components/SummaryItem/SummaryItem.test-ids.d.ts +1 -1
  621. package/lib/components/SummaryItem/SummaryItem.test-ids.d.ts.map +1 -1
  622. package/lib/components/SummaryList/SummaryList.d.ts.map +1 -1
  623. package/lib/components/SummaryList/SummaryList.js +9 -9
  624. package/lib/components/SummaryList/SummaryList.js.map +1 -1
  625. package/lib/components/Tabs/Tab.d.ts +7 -3
  626. package/lib/components/Tabs/Tab.d.ts.map +1 -1
  627. package/lib/components/Tabs/Tab.js +83 -23
  628. package/lib/components/Tabs/Tab.js.map +1 -1
  629. package/lib/components/Tabs/TabPanel.d.ts +13 -2
  630. package/lib/components/Tabs/TabPanel.d.ts.map +1 -1
  631. package/lib/components/Tabs/TabPanel.js +60 -5
  632. package/lib/components/Tabs/TabPanel.js.map +1 -1
  633. package/lib/components/Tabs/Tabs.d.ts +0 -1
  634. package/lib/components/Tabs/Tabs.d.ts.map +1 -1
  635. package/lib/components/Tabs/Tabs.js +97 -35
  636. package/lib/components/Tabs/Tabs.js.map +1 -1
  637. package/lib/components/Tabs/Tabs.styles.d.ts +17 -0
  638. package/lib/components/Tabs/Tabs.styles.d.ts.map +1 -0
  639. package/lib/components/Tabs/Tabs.styles.js +110 -0
  640. package/lib/components/Tabs/Tabs.styles.js.map +1 -0
  641. package/lib/components/Tabs/TabsContext.d.ts +6 -0
  642. package/lib/components/Tabs/TabsContext.d.ts.map +1 -0
  643. package/lib/components/Tabs/TabsContext.js +6 -0
  644. package/lib/components/Tabs/TabsContext.js.map +1 -0
  645. package/lib/components/Tabs/index.d.ts +1 -0
  646. package/lib/components/Tabs/index.d.ts.map +1 -1
  647. package/lib/components/Tabs/index.js +1 -0
  648. package/lib/components/Tabs/index.js.map +1 -1
  649. package/lib/components/Text/Text.js +1 -1
  650. package/lib/components/Text/Text.js.map +1 -1
  651. package/lib/components/TextArea/TextArea.d.ts +1 -1
  652. package/lib/components/TextArea/TextArea.test-ids.d.ts +1 -1
  653. package/lib/components/TextArea/TextArea.test-ids.d.ts.map +1 -1
  654. package/lib/components/Toaster/Toaster.d.ts +1 -1
  655. package/lib/components/Toaster/Toaster.d.ts.map +1 -1
  656. package/lib/components/Toaster/Toaster.js +117 -21
  657. package/lib/components/Toaster/Toaster.js.map +1 -1
  658. package/lib/components/Toaster/Toaster.test-ids.d.ts +1 -1
  659. package/lib/components/Toaster/Toaster.test-ids.d.ts.map +1 -1
  660. package/lib/components/Toaster/Toaster.types.d.ts +17 -4
  661. package/lib/components/Toaster/Toaster.types.d.ts.map +1 -1
  662. package/lib/components/Toaster/Toaster.types.js.map +1 -1
  663. package/lib/components/Tooltip/Tooltip.d.ts +8 -3
  664. package/lib/components/Tooltip/Tooltip.d.ts.map +1 -1
  665. package/lib/components/Tooltip/Tooltip.js +20 -5
  666. package/lib/components/Tooltip/Tooltip.js.map +1 -1
  667. package/lib/components/Tooltip/Tooltip.test-ids.d.ts +1 -1
  668. package/lib/components/Tooltip/Tooltip.test-ids.d.ts.map +1 -1
  669. package/lib/components/Tree/StandardTree.styles.d.ts +1 -1
  670. package/lib/components/Tree/Tree.d.ts +1 -1
  671. package/lib/components/Tree/Tree.test-ids.d.ts +2 -2
  672. package/lib/components/Tree/Tree.test-ids.d.ts.map +1 -1
  673. package/lib/hooks/index.d.ts +2 -0
  674. package/lib/hooks/index.d.ts.map +1 -1
  675. package/lib/hooks/index.js +2 -0
  676. package/lib/hooks/index.js.map +1 -1
  677. package/lib/hooks/useArrows.d.ts.map +1 -1
  678. package/lib/hooks/useArrows.js +3 -1
  679. package/lib/hooks/useArrows.js.map +1 -1
  680. package/lib/hooks/useEvent.d.ts +5 -0
  681. package/lib/hooks/useEvent.d.ts.map +1 -1
  682. package/lib/hooks/useEvent.js.map +1 -1
  683. package/lib/hooks/useFocusWithin.d.ts.map +1 -1
  684. package/lib/hooks/useFocusWithin.js +14 -8
  685. package/lib/hooks/useFocusWithin.js.map +1 -1
  686. package/lib/hooks/useI18n.d.ts +155 -4
  687. package/lib/hooks/useI18n.d.ts.map +1 -1
  688. package/lib/hooks/useRefMap.d.ts +8 -0
  689. package/lib/hooks/useRefMap.d.ts.map +1 -0
  690. package/lib/hooks/useRefMap.js +27 -0
  691. package/lib/hooks/useRefMap.js.map +1 -0
  692. package/lib/hooks/useScrollToggle.d.ts.map +1 -1
  693. package/lib/hooks/useScrollToggle.js +1 -0
  694. package/lib/hooks/useScrollToggle.js.map +1 -1
  695. package/lib/hooks/useSimpleStoreInstance.d.ts +9 -0
  696. package/lib/hooks/useSimpleStoreInstance.d.ts.map +1 -0
  697. package/lib/hooks/useSimpleStoreInstance.js +13 -0
  698. package/lib/hooks/useSimpleStoreInstance.js.map +1 -0
  699. package/lib/hooks/useTestIds.d.ts +1 -1
  700. package/lib/hooks/useTestIds.d.ts.map +1 -1
  701. package/lib/hooks/useTestIds.js +1 -1
  702. package/lib/hooks/useTestIds.js.map +1 -1
  703. package/lib/i18n/default.d.ts +155 -4
  704. package/lib/i18n/default.d.ts.map +1 -1
  705. package/lib/i18n/default.js +178 -11
  706. package/lib/i18n/default.js.map +1 -1
  707. package/lib/i18n/i18n.d.ts +155 -4
  708. package/lib/i18n/i18n.d.ts.map +1 -1
  709. package/lib/index.d.ts +2 -0
  710. package/lib/index.d.ts.map +1 -1
  711. package/lib/index.js +2 -0
  712. package/lib/index.js.map +1 -1
  713. package/lib/styles/GlobalStyle.d.ts +1 -1
  714. package/lib/styles/GlobalStyle.d.ts.map +1 -1
  715. package/lib/styles/GlobalStyle.js +6 -1
  716. package/lib/styles/GlobalStyle.js.map +1 -1
  717. package/lib/styles/mixins.d.ts +3 -0
  718. package/lib/styles/mixins.d.ts.map +1 -0
  719. package/lib/styles/mixins.js +14 -0
  720. package/lib/styles/mixins.js.map +1 -0
  721. package/lib/theme/ThemeMachine.d.ts.map +1 -1
  722. package/lib/theme/ThemeMachine.js.map +1 -1
  723. package/lib/theme/theme.d.ts +18 -24
  724. package/lib/theme/theme.d.ts.map +1 -1
  725. package/lib/theme/themeDefinition.json +9 -14
  726. package/lib/theme/themeOverrides.schema.json +13 -18
  727. package/lib/types/types.d.ts +6 -4
  728. package/lib/types/types.d.ts.map +1 -1
  729. package/lib/types/types.js.map +1 -1
  730. package/lib/utils/createStringMatcher.d.ts +1 -1
  731. package/lib/utils/createStringMatcher.d.ts.map +1 -1
  732. package/lib/utils/createStringMatcher.js +4 -1
  733. package/lib/utils/createStringMatcher.js.map +1 -1
  734. package/lib/utils/formatListToLocaleString.d.ts.map +1 -1
  735. package/lib/utils/formatListToLocaleString.js +5 -2
  736. package/lib/utils/formatListToLocaleString.js.map +1 -1
  737. package/lib/utils/index.d.ts +1 -0
  738. package/lib/utils/index.d.ts.map +1 -1
  739. package/lib/utils/index.js +1 -0
  740. package/lib/utils/index.js.map +1 -1
  741. package/lib/utils/isPositionWithinRect.d.ts +12 -0
  742. package/lib/utils/isPositionWithinRect.d.ts.map +1 -0
  743. package/lib/utils/isPositionWithinRect.js +11 -0
  744. package/lib/utils/isPositionWithinRect.js.map +1 -0
  745. package/lib/utils/withTestIds.d.ts +1 -1
  746. package/package.json +10 -7
  747. package/lib/components/Location/types.d.ts +0 -45
  748. package/lib/components/Location/types.d.ts.map +0 -1
  749. package/lib/components/Location/types.js +0 -10
  750. package/lib/components/Location/types.js.map +0 -1
@@ -1,41 +1,60 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { forwardRef } from 'react';
2
+ import { forwardRef, useEffect, useRef } from 'react';
3
3
  import styled, { css } from 'styled-components';
4
4
  import Button from '../Button';
5
5
  import Icon, { registerIcon } from '../Icon';
6
6
  import * as plusIcon from '../Icon/icons/plus.icon';
7
7
  import { useI18n } from '../../hooks';
8
8
  import { defaultThemeProp } from '../../theme';
9
+ import { getActiveElement, getFocusables } from '../../utils';
9
10
  import FieldGroup, { StyledFieldGroup } from './FieldGroup';
10
11
  registerIcon(plusIcon);
11
12
  const StyledFieldGroupList = styled.div(({ theme }) => css `
12
- margin-block-start: ${theme.base.spacing};
13
+ margin-block-start: ${theme.base.spacing};
13
14
 
14
- ${StyledFieldGroup} {
15
- margin-block-start: 0;
16
- }
17
- `);
15
+ ${StyledFieldGroup} {
16
+ margin-block-start: 0;
17
+ }
18
+ `);
18
19
  StyledFieldGroupList.defaultProps = defaultThemeProp;
19
20
  export const StyledListItem = styled(FieldGroup)(({ theme }) => css `
20
- padding: ${theme.base.spacing} 0 calc(2 * ${theme.base.spacing});
21
+ padding: ${theme.base.spacing} 0 calc(2 * ${theme.base.spacing});
21
22
 
22
- &:not(:last-of-type) {
23
- border-bottom: 0.0625rem solid ${theme.base.palette['border-line']};
24
- margin-block-end: calc(2 * ${theme.base.spacing});
25
- }
23
+ &:not(:last-of-type) {
24
+ border-bottom: 0.0625rem solid ${theme.base.palette['border-line']};
25
+ margin-block-end: calc(2 * ${theme.base.spacing});
26
+ }
26
27
 
27
- legend {
28
- margin-block-end: 0;
29
- }
30
- `);
28
+ legend {
29
+ margin-block-end: 0;
30
+ }
31
+ `);
31
32
  StyledListItem.defaultProps = defaultThemeProp;
32
33
  const StyledAddButton = styled(Button)(({ theme }) => css `
33
- margin-top: ${theme.base.spacing};
34
- `);
34
+ margin-top: ${theme.base.spacing};
35
+ `);
35
36
  StyledAddButton.defaultProps = defaultThemeProp;
36
37
  const FieldGroupList = forwardRef(function FieldGroupList({ items, onAdd, onDelete, contextualLabel, ...restProps }, ref) {
37
38
  const t = useI18n();
38
- return (_jsxs(StyledFieldGroupList, { ref: ref, ...restProps, children: [items.map(({ id, children, name, headingTag, onDelete: itemOnDelete, ...restItemProps }) => {
39
+ const lastItemRef = useRef(null);
40
+ const addBtnRef = useRef(null);
41
+ useEffect(() => {
42
+ const currentActiveEl = getActiveElement();
43
+ if (currentActiveEl === addBtnRef.current && lastItemRef.current) {
44
+ const groupItemLegend = lastItemRef.current.querySelector(':scope > legend');
45
+ const focusables = getFocusables(lastItemRef.current);
46
+ const groupActionButtons = focusables.filter(focusable => groupItemLegend?.contains(focusable));
47
+ const groupContentFocusables = focusables.filter(focusable => !groupItemLegend?.contains(focusable));
48
+ if (groupContentFocusables.length > 0) {
49
+ groupContentFocusables[0].focus();
50
+ }
51
+ else {
52
+ groupActionButtons[0]?.focus();
53
+ }
54
+ }
55
+ }, [items.length]);
56
+ return (_jsxs(StyledFieldGroupList, { ref: ref, ...restProps, children: [items.map(({ id, children, name, headingTag, onDelete: itemOnDelete, ...restItemProps }, index) => {
57
+ const isLastItem = index === items.length - 1;
39
58
  return (_jsx(StyledListItem, { name: name, headingTag: headingTag, ...restItemProps, actions: onDelete || itemOnDelete
40
59
  ? [
41
60
  {
@@ -49,8 +68,8 @@ const FieldGroupList = forwardRef(function FieldGroupList({ items, onAdd, onDele
49
68
  }
50
69
  }
51
70
  ]
52
- : undefined, children: children }, id));
53
- }), onAdd && (_jsxs(StyledAddButton, { variant: 'link', onClick: onAdd, children: [_jsx(Icon, { name: 'plus' }), contextualLabel ? t('add_noun', [contextualLabel]) : t('add')] }))] }));
71
+ : undefined, ref: isLastItem ? lastItemRef : undefined, children: children }, id));
72
+ }), onAdd && (_jsxs(StyledAddButton, { variant: 'link', onClick: onAdd, ref: addBtnRef, children: [_jsx(Icon, { name: 'plus' }), contextualLabel ? t('add_noun', [contextualLabel]) : t('add')] }))] }));
54
73
  });
55
74
  export default FieldGroupList;
56
75
  //# sourceMappingURL=FieldGroupList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FieldGroupList.js","sourceRoot":"","sources":["../../../src/components/FieldGroup/FieldGroupList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,IAAI,EAAE,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,UAAU,EAAE,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAG5D,YAAY,CAAC,QAAQ,CAAC,CAAC;AAiBvB,MAAM,oBAAoB,GAAG,MAAM,CAAC,GAAG,CACrC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CACZ,GAAG,CAAA;4BACqB,KAAK,CAAC,IAAI,CAAC,OAAO;;QAEtC,gBAAgB;;;KAGnB,CACJ,CAAC;AAEF,oBAAoB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAErD,MAAM,CAAC,MAAM,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,GAAG,EAAE;oCACZ,YAAY,EAAE,CAAC,EAAE,CAAC,CAAC;oCACnB,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC;gCACjB,CAAC;6BACF;yBACF;wBACH,CAAC,CAAC,SAAS,YAGd,QAAQ,IArBJ,EAAE,CAsBQ,CAClB,CAAC;YACJ,CAAC,CACF,EACA,KAAK,IAAI,CACR,MAAC,eAAe,IAAC,OAAO,EAAC,MAAM,EAAC,OAAO,EAAE,KAAK,aAC5C,KAAC,IAAI,IAAC,IAAI,EAAC,MAAM,GAAG,EACnB,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAC9C,CACnB,IACoB,CACxB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { FunctionComponent, PropsWithoutRef, Ref } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport type { ForwardProps } from '../../types';\nimport Button from '../Button';\nimport Icon, { registerIcon } from '../Icon';\nimport * as plusIcon from '../Icon/icons/plus.icon';\nimport { useI18n } from '../../hooks';\nimport { defaultThemeProp } from '../../theme';\n\nimport FieldGroup, { StyledFieldGroup } from './FieldGroup';\nimport type { FieldGroupProps } from './FieldGroup';\n\nregisterIcon(plusIcon);\n\nexport type FieldGroupListItemProps = FieldGroupProps & {\n /** The ID of the field group list item */\n id: string;\n /** Item level onDelete callback. */\n onDelete?: (id: string) => void;\n};\n\nexport interface FieldGroupListProps {\n items: FieldGroupListItemProps[];\n contextualLabel?: string;\n onAdd?: () => void;\n onDelete?: (id: string) => void;\n ref?: Ref<HTMLDivElement>;\n}\n\nconst StyledFieldGroupList = styled.div(\n ({ theme }) =>\n css`\n margin-block-start: ${theme.base.spacing};\n\n ${StyledFieldGroup} {\n margin-block-start: 0;\n }\n `\n);\n\nStyledFieldGroupList.defaultProps = defaultThemeProp;\n\nexport const StyledListItem = styled(FieldGroup)(\n ({ theme }) =>\n css`\n padding: ${theme.base.spacing} 0 calc(2 * ${theme.base.spacing});\n\n &:not(:last-of-type) {\n border-bottom: 0.0625rem solid ${theme.base.palette['border-line']};\n margin-block-end: calc(2 * ${theme.base.spacing});\n }\n\n legend {\n margin-block-end: 0;\n }\n `\n);\n\nStyledListItem.defaultProps = defaultThemeProp;\n\nconst StyledAddButton = styled(Button)(\n ({ theme }) =>\n css`\n margin-top: ${theme.base.spacing};\n `\n);\n\nStyledAddButton.defaultProps = defaultThemeProp;\n\nconst FieldGroupList: FunctionComponent<FieldGroupListProps & ForwardProps> = forwardRef(\n function FieldGroupList(\n { items, onAdd, onDelete, contextualLabel, ...restProps }: PropsWithoutRef<FieldGroupListProps>,\n ref: FieldGroupListProps['ref']\n ) {\n const t = useI18n();\n\n return (\n <StyledFieldGroupList ref={ref} {...restProps}>\n {items.map(\n ({\n id,\n children,\n name,\n headingTag,\n onDelete: itemOnDelete,\n ...restItemProps\n }: FieldGroupListItemProps) => {\n return (\n <StyledListItem\n key={id}\n name={name}\n headingTag={headingTag}\n {...restItemProps}\n actions={\n onDelete || itemOnDelete\n ? [\n {\n id: 'delete',\n text: t('delete'),\n icon: 'trash',\n iconOnly: true,\n onClick: () => {\n itemOnDelete?.(id);\n onDelete?.(id);\n }\n }\n ]\n : undefined\n }\n >\n {children}\n </StyledListItem>\n );\n }\n )}\n {onAdd && (\n <StyledAddButton variant='link' onClick={onAdd}>\n <Icon name='plus' />\n {contextualLabel ? t('add_noun', [contextualLabel]) : t('add')}\n </StyledAddButton>\n )}\n </StyledFieldGroupList>\n );\n }\n);\n\nexport default FieldGroupList;\n"]}
1
+ {"version":3,"file":"FieldGroupList.js","sourceRoot":"","sources":["../../../src/components/FieldGroup/FieldGroupList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,MAAM,EA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AQ,EACR,IAAI,EACJ,UAAU,EACV,QAAQ,EAAE,YAAY,EACtB,GAAG,aAAa,EACQ,EAC1B,KAAK,EACL,EAAE;gBACF,MAAM,UAAU,GAAG,KAAK,KAAK,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;gBAC9C,OAAO,CACL,KAAC,cAAc,IAEb,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,UAAU,KAClB,aAAa,EACjB,OAAO,EACL,QAAQ,IAAI,YAAY;wBACtB,CAAC,CAAC;4BACE;gCACE,EAAE,EAAE,QAAQ;gCACZ,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC;gCACjB,IAAI,EAAE,OAAO;gCACb,QAAQ,EAAE,IAAI;gCACd,OAAO,EAAE,GAAG,EAAE;oCACZ,YAAY,EAAE,CAAC,EAAE,CAAC,CAAC;oCACnB,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC;gCACjB,CAAC;6BACF;yBACF;wBACH,CAAC,CAAC,SAAS,EAEf,GAAG,EAAE,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,YAExC,QAAQ,IAtBJ,EAAE,CAuBQ,CAClB,CAAC;YACJ,CAAC,CACF,EACA,KAAK,IAAI,CACR,MAAC,eAAe,IAAC,OAAO,EAAC,MAAM,EAAC,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,aAC5D,KAAC,IAAI,IAAC,IAAI,EAAC,MAAM,GAAG,EACnB,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAC9C,CACnB,IACoB,CACxB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import { forwardRef, useEffect, useRef } from 'react';\nimport type { FunctionComponent, PropsWithoutRef, Ref } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport type { ForwardProps } from '../../types';\nimport Button from '../Button';\nimport Icon, { registerIcon } from '../Icon';\nimport * as plusIcon from '../Icon/icons/plus.icon';\nimport { useI18n } from '../../hooks';\nimport { defaultThemeProp } from '../../theme';\nimport { getActiveElement, getFocusables } from '../../utils';\n\nimport FieldGroup, { StyledFieldGroup } from './FieldGroup';\nimport type { FieldGroupProps } from './FieldGroup';\n\nregisterIcon(plusIcon);\n\nexport type FieldGroupListItemProps = FieldGroupProps & {\n /** The ID of the field group list item */\n id: string;\n /** Item level onDelete callback. */\n onDelete?: (id: string) => void;\n};\n\nexport interface FieldGroupListProps {\n items: FieldGroupListItemProps[];\n contextualLabel?: string;\n onAdd?: () => void;\n onDelete?: (id: string) => void;\n ref?: Ref<HTMLDivElement>;\n}\n\nconst StyledFieldGroupList = styled.div(\n ({ theme }) => css`\n margin-block-start: ${theme.base.spacing};\n\n ${StyledFieldGroup} {\n margin-block-start: 0;\n }\n `\n);\n\nStyledFieldGroupList.defaultProps = defaultThemeProp;\n\nexport const StyledListItem = styled(FieldGroup)(\n ({ theme }) => css`\n padding: ${theme.base.spacing} 0 calc(2 * ${theme.base.spacing});\n\n &:not(:last-of-type) {\n border-bottom: 0.0625rem solid ${theme.base.palette['border-line']};\n margin-block-end: calc(2 * ${theme.base.spacing});\n }\n\n legend {\n margin-block-end: 0;\n }\n `\n);\n\nStyledListItem.defaultProps = defaultThemeProp;\n\nconst StyledAddButton = styled(Button)(\n ({ theme }) => css`\n margin-top: ${theme.base.spacing};\n `\n);\n\nStyledAddButton.defaultProps = defaultThemeProp;\n\nconst FieldGroupList: FunctionComponent<FieldGroupListProps & ForwardProps> = forwardRef(\n function FieldGroupList(\n { items, onAdd, onDelete, contextualLabel, ...restProps }: PropsWithoutRef<FieldGroupListProps>,\n ref: FieldGroupListProps['ref']\n ) {\n const t = useI18n();\n const lastItemRef = useRef<HTMLDivElement>(null);\n const addBtnRef = useRef<HTMLButtonElement>(null);\n\n useEffect(() => {\n const currentActiveEl = getActiveElement();\n if (currentActiveEl === addBtnRef.current && lastItemRef.current) {\n const groupItemLegend = lastItemRef.current.querySelector(':scope > legend');\n const focusables = getFocusables(lastItemRef.current);\n\n const groupActionButtons = focusables.filter(focusable =>\n groupItemLegend?.contains(focusable)\n );\n\n const groupContentFocusables = focusables.filter(\n focusable => !groupItemLegend?.contains(focusable)\n );\n\n if (groupContentFocusables.length > 0) {\n groupContentFocusables[0].focus();\n } else {\n groupActionButtons[0]?.focus();\n }\n }\n }, [items.length]);\n\n return (\n <StyledFieldGroupList ref={ref} {...restProps}>\n {items.map(\n (\n {\n id,\n children,\n name,\n headingTag,\n onDelete: itemOnDelete,\n ...restItemProps\n }: FieldGroupListItemProps,\n index\n ) => {\n const isLastItem = index === items.length - 1;\n return (\n <StyledListItem\n key={id}\n name={name}\n headingTag={headingTag}\n {...restItemProps}\n actions={\n onDelete || itemOnDelete\n ? [\n {\n id: 'delete',\n text: t('delete'),\n icon: 'trash',\n iconOnly: true,\n onClick: () => {\n itemOnDelete?.(id);\n onDelete?.(id);\n }\n }\n ]\n : undefined\n }\n ref={isLastItem ? lastItemRef : undefined}\n >\n {children}\n </StyledListItem>\n );\n }\n )}\n {onAdd && (\n <StyledAddButton variant='link' onClick={onAdd} ref={addBtnRef}>\n <Icon name='plus' />\n {contextualLabel ? t('add_noun', [contextualLabel]) : t('add')}\n </StyledAddButton>\n )}\n </StyledFieldGroupList>\n );\n }\n);\n\nexport default FieldGroupList;\n"]}
@@ -1,17 +1,21 @@
1
1
  import type { ReactNode, FunctionComponent } from 'react';
2
- import type { BaseProps, ForwardProps, NoChildrenProp, TestIdProp } from '../../types';
2
+ import type { BaseProps, ExcludeStrict, ForwardProps, NoChildrenProp, TestIdProp } from '../../types';
3
3
  export type FieldValueVariant = 'inline' | 'stacked';
4
- export interface FieldValueListItemProps extends TestIdProp {
4
+ interface BaseFieldValueListItem extends TestIdProp {
5
5
  name: string;
6
- value?: ReactNode;
7
- variant?: FieldValueVariant;
8
- }
9
- export interface FieldValueListItem extends FieldValueListItemProps {
10
6
  id?: string;
7
+ variant?: FieldValueVariant;
11
8
  }
9
+ export type FieldValueListItemProps = (BaseFieldValueListItem & {
10
+ value?: ExcludeStrict<ReactNode, 'string'>;
11
+ truncate?: never;
12
+ }) | (BaseFieldValueListItem & {
13
+ value: string;
14
+ truncate?: boolean;
15
+ });
12
16
  export interface FieldValueListProps extends BaseProps, NoChildrenProp, TestIdProp {
13
17
  /** The set of field values to render in the list. */
14
- fields: FieldValueListItem[];
18
+ fields: FieldValueListItemProps[];
15
19
  /**
16
20
  * Determines if the field and values should be displayed on the same line, or stacked with the field above the value.
17
21
  * @default 'inline'
@@ -23,11 +27,11 @@ export declare const StyledFieldValue: import("styled-components").StyledCompone
23
27
  export type StyledFieldValueListProps = Pick<FieldValueListProps, 'variant'>;
24
28
  export declare const StyledFieldValueList: import("styled-components").StyledComponent<"dl", import("styled-components").DefaultTheme, StyledFieldValueListProps, never>;
25
29
  export declare const StyledStackedFieldValue: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
26
- export declare const FieldValueItem: (({ testId, name, value, variant }: FieldValueListItemProps) => JSX.Element) & {
27
- getTestIds: (testIdProp?: string | undefined) => import("../../types").TestIdsRecord<readonly ["name", "value"]>;
30
+ export declare const FieldValueItem: (({ testId, name, value, variant, truncate }: FieldValueListItemProps) => JSX.Element) & {
31
+ getTestIds: (testIdProp?: string | null | undefined) => import("../../types").TestIdsRecord<readonly ["name", "value"]>;
28
32
  };
29
33
  declare const _default: FunctionComponent<FieldValueListProps & ForwardProps> & {
30
- getTestIds: (testIdProp?: string | undefined) => import("../../types").TestIdsRecord<readonly []>;
34
+ getTestIds: (testIdProp?: string | null | undefined) => import("../../types").TestIdsRecord<readonly []>;
31
35
  };
32
36
  export default _default;
33
37
  //# sourceMappingURL=FieldValueList.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FieldValueList.d.ts","sourceRoot":"","sources":["../../../src/components/FieldValueList/FieldValueList.tsx"],"names":[],"mappings":"AACA,O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,GAAG,QAAQ,GAAG,SAAS,CAAC;AAErD,UAAU,sBAAuB,SAAQ,UAAU;IACjD,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,iBAAiB,CAAC;CAC7B;AAED,MAAM,MAAM,uBAAuB,GAC/B,CAAC,sBAAsB,GAAG;IACxB,KAAK,CAAC,EAAE,aAAa,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAC3C,QAAQ,CAAC,EAAE,KAAK,CAAC;CAClB,CAAC,GACF,CAAC,sBAAsB,GAAG;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC,CAAC;AAEP,MAAM,WAAW,mBAAoB,SAAQ,SAAS,EAAE,cAAc,EAAE,UAAU;IAChF,qDAAqD;IACrD,MAAM,EAAE,uBAAuB,EAAE,CAAC;IAClC;;;OAGG;IACH,OAAO,CAAC,EAAE,iBAAiB,GAAG,kBAAkB,CAAC;CAClD;AAED,eAAO,MAAM,eAAe,wGAE3B,CAAC;AAEF,eAAO,MAAM,gBAAgB,wGAE5B,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAAC,mBAAmB,EAAE,SAAS,CAAC,CAAC;AAE7E,eAAO,MAAM,oBAAoB,+HAuB/B,CAAC;AAIH,eAAO,MAAM,uBAAuB,yGAAe,CAAC;AAEpD,eAAO,MAAM,cAAc,gDACsC,uBAAuB;;CA4BvF,CAAC;;;;AAsDF,wBAAqE"}
@@ -41,9 +41,9 @@ export const StyledFieldValueList = styled.dl(({ variant, theme }) => {
41
41
  });
42
42
  StyledFieldValueList.defaultProps = defaultThemeProp;
43
43
  export const StyledStackedFieldValue = styled.div ``;
44
- export const FieldValueItem = withTestIds(({ testId, name, value, variant = 'inline' }) => {
44
+ export const FieldValueItem = withTestIds(({ testId, name, value, variant = 'inline', truncate = true }) => {
45
45
  const testIds = useTestIds(testId, getFieldValueItemTestIds);
46
- const displayValue = typeof value === 'string' ? _jsx(ShowMoreLess, { lines: 3, children: value }) : value;
46
+ const displayValue = typeof value === 'string' && truncate ? (_jsx(ShowMoreLess, { lines: 3, children: value })) : (value);
47
47
  const labelAndValue = (_jsxs(_Fragment, { children: [_jsx(StyledLabel, { "data-testid": testIds.name, as: StyledFieldName, children: name }), _jsx(StyledFieldValue, { "data-testid": testIds.value, children: value ? displayValue : _jsx(NoValue, {}) })] }));
48
48
  return variant === 'stacked' ? (_jsx(StyledStackedFieldValue, { "data-testid": testIds.root, children: labelAndValue })) : (_jsx(_Fragment, { children: labelAndValue }));
49
49
  }, getFieldValueItemTestIds);
@@ -60,10 +60,18 @@ const FieldValueList = forwardRef(function FieldValueList({ testId, fields, vari
60
60
  : 'minmax(0, 1fr)',
61
61
  colGap: variant !== 'value-comparison' ? 2 : 0,
62
62
  rowGap: variant !== 'value-comparison' ? 1 : 0.5
63
- }, as: StyledFieldValueList, variant: variant, children: fields.map(({ id, name, value, variant: fieldVariant }) => {
64
- return (_jsx(FieldValueItem, { name: name, value: value, variant: (fieldVariant ?? variant) === 'stacked' || !isXSContentWidthOrAbove
63
+ }, as: StyledFieldValueList, variant: isXSContentWidthOrAbove ? variant : 'stacked', children: fields.map(({ id, name, value, truncate = true, variant: fieldVariant }) => {
64
+ const sharedProps = {
65
+ name,
66
+ variant: (fieldVariant ?? variant) === 'stacked' || !isXSContentWidthOrAbove
65
67
  ? 'stacked'
66
- : 'inline' }, id ?? name));
68
+ : 'inline',
69
+ key: id ?? name
70
+ };
71
+ if (typeof value === 'string') {
72
+ return _jsx(FieldValueItem, { ...sharedProps, value: value, truncate: truncate });
73
+ }
74
+ return _jsx(FieldValueItem, { ...sharedProps, value: value });
67
75
  }) }));
68
76
  });
69
77
  export default withTestIds(FieldValueList, getFieldValueListTestIds);
@@ -1 +1 @@
1
- {"version":3,"file":"FieldValueList.js","sourceRoot":"","sources":["../../../src/components/FieldValueList/FieldValueList.tsx"],"names":[],"m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SAAS,EACb,GAAG,EAAE,iBAAiB,EACtB,SAAS,EAAE;YACT,IAAI,EACF,CAAC,QAAQ,EAAE,kBAAkB,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,uBAAuB;gBACzE,CAAC,CAAC,qBAAqB;gBACvB,CAAC,CAAC,gBAAgB;YACtB,MAAM,EAAE,OAAO,KAAK,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC9C,MAAM,EAAE,OAAO,KAAK,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;SACjD,EACD,EAAE,EAAE,oBAAoB,EACxB,OAAO,EAAE,OAAO,YAEf,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,EAAE;YACzD,OAAO,CACL,KAAC,cAAc,IACb,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,OAAO,EACL,CAAC,YAAY,IAAI,OAAO,CAAC,KAAK,SAAS,IAAI,CAAC,uBAAuB;oBACjE,CAAC,CAAC,SAAS;oBACX,CAAC,CAAC,QAAQ,IAET,EAAE,IAAI,IAAI,CACf,CACH,CAAC;QACJ,CAAC,CAAC,GACG,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC,cAAc,EAAE,wBAAwB,CAAC,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { ReactNode, FunctionComponent, Ref } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport type { BaseProps, ForwardProps, NoChildrenProp, TestIdProp } from '../../types';\nimport Grid from '../Grid';\nimport { StyledLabel } from '../Label';\nimport { useBreakpoint, useConsolidatedRef, useTestIds } from '../../hooks';\nimport { defaultThemeProp } from '../../theme';\nimport ShowMoreLess from '../ShowMoreLess';\nimport { withTestIds } from '../../utils';\nimport NoValue from '../NoValue/NoValue';\n\nimport { getFieldValueListTestIds, getFieldValueItemTestIds } from './FieldValueList.test-ids';\n\nexport type FieldValueVariant = 'inline' | 'stacked';\n\nexport interface FieldValueListItemProps extends TestIdProp {\n name: string;\n value?: ReactNode;\n variant?: FieldValueVariant;\n}\n\nexport interface FieldValueListItem extends FieldValueListItemProps {\n id?: string;\n}\n\nexport interface FieldValueListProps extends BaseProps, NoChildrenProp, TestIdProp {\n /** The set of field values to render in the list. */\n fields: FieldValueListItem[];\n /**\n * Determines if the field and values should be displayed on the same line, or stacked with the field above the value.\n * @default 'inline'\n */\n variant?: FieldValueVariant | 'value-comparison';\n}\n\nexport const StyledFieldName = styled.dt`\n word-break: break-word;\n`;\n\nexport const StyledFieldValue = styled.dd`\n word-break: break-word;\n`;\n\nexport type StyledFieldValueListProps = Pick<FieldValueListProps, 'variant'>;\n\nexport const StyledFieldValueList = styled.dl<StyledFieldValueListProps>(({ variant, theme }) => {\n return css`\n width: 100%;\n\n ${variant === 'value-comparison' &&\n css`\n dt {\n width: 100%;\n }\n dd {\n text-align: end;\n padding-inline-start: calc(2 * ${theme.base.spacing});\n }\n ${StyledLabel} {\n max-width: unset;\n }\n dd:not(:last-of-type),\n dt:not(:last-of-type) {\n border-bottom: 0.0625rem solid ${theme.base.palette['border-line']};\n padding-bottom: calc(0.5 * ${theme.base.spacing});\n }\n `}\n `;\n});\n\nStyledFieldValueList.defaultProps = defaultThemeProp;\n\nexport const StyledStackedFieldValue = styled.div``;\n\nexport const FieldValueItem = withTestIds(\n ({ testId, name, value, variant = 'inline' }: FieldValueListItemProps) => {\n const testIds = useTestIds(testId, getFieldValueItemTestIds);\n\n const displayValue =\n typeof value === 'string' ? <ShowMoreLess lines={3}>{value}</ShowMoreLess> : value;\n\n const labelAndValue = (\n <>\n <StyledLabel data-testid={testIds.name} as={StyledFieldName}>\n {name}\n </StyledLabel>\n <StyledFieldValue data-testid={testIds.value}>\n {value ? displayValue : <NoValue />}\n </StyledFieldValue>\n </>\n );\n\n return variant === 'stacked' ? (\n <StyledStackedFieldValue data-testid={testIds.root}>{labelAndValue}</StyledStackedFieldValue>\n ) : (\n <>{labelAndValue}</>\n );\n },\n getFieldValueItemTestIds\n);\n\nconst FieldValueList: FunctionComponent<FieldValueListProps & ForwardProps> = forwardRef(\n function FieldValueList(\n { testId, fields, variant = 'inline', ...restProps }: FieldValueListProps,\n ref: Ref<HTMLDivElement>\n ) {\n const testIds = useTestIds(testId, getFieldValueListTestIds);\n\n const fieldValueListRef = useConsolidatedRef<HTMLDivElement>(ref);\n\n const isXSContentWidthOrAbove = useBreakpoint('xs', {\n breakpointRef: fieldValueListRef,\n themeProp: 'content-width'\n });\n\n return (\n <Grid\n data-testid={testIds.root}\n {...restProps}\n ref={fieldValueListRef}\n container={{\n cols:\n ['inline', 'value-comparison'].includes(variant) && isXSContentWidthOrAbove\n ? '16ch minmax(0, 1fr)'\n : 'minmax(0, 1fr)',\n colGap: variant !== 'value-comparison' ? 2 : 0,\n rowGap: variant !== 'value-comparison' ? 1 : 0.5\n }}\n as={StyledFieldValueList}\n variant={variant}\n >\n {fields.map(({ id, name, value, variant: fieldVariant }) => {\n return (\n <FieldValueItem\n name={name}\n value={value}\n variant={\n (fieldVariant ?? variant) === 'stacked' || !isXSContentWidthOrAbove\n ? 'stacked'\n : 'inline'\n }\n key={id ?? name}\n />\n );\n })}\n </Grid>\n );\n }\n);\n\nexport default withTestIds(FieldValueList, getFieldValueListTestIds);\n"]}
1
+ {"version":3,"file":"FieldValueList.js","sourceRoot":"","sources":["../../../src/components/FieldValueList/FieldValueList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAShD,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,a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,MAAM,EAAE,OAAO,KAAK,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC9C,MAAM,EAAE,OAAO,KAAK,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;SACjD,EACD,EAAE,EAAE,oBAAoB,EACxB,OAAO,EAAE,uBAAuB,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,YAErD,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,GAAG,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,EAAE;YAC1E,MAAM,WAAW,GAA6C;gBAC5D,IAAI;gBACJ,OAAO,EACL,CAAC,YAAY,IAAI,OAAO,CAAC,KAAK,SAAS,IAAI,CAAC,uBAAuB;oBACjE,CAAC,CAAC,SAAS;oBACX,CAAC,CAAC,QAAQ;gBAEd,GAAG,EAAE,EAAE,IAAI,IAAI;aAChB,CAAC;YAEF,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;gBAC7B,OAAO,KAAC,cAAc,OAAK,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,GAAI,CAAC;aAC9E;YAED,OAAO,KAAC,cAAc,OAAK,WAAW,EAAE,KAAK,EAAE,KAAK,GAAI,CAAC;QAC3D,CAAC,CAAC,GACG,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC,cAAc,EAAE,wBAAwB,CAAC,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { ReactNode, FunctionComponent, Ref } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport type {\n BaseProps,\n ExcludeStrict,\n ForwardProps,\n NoChildrenProp,\n TestIdProp\n} from '../../types';\nimport Grid from '../Grid';\nimport { StyledLabel } from '../Label';\nimport { useBreakpoint, useConsolidatedRef, useTestIds } from '../../hooks';\nimport { defaultThemeProp } from '../../theme';\nimport ShowMoreLess from '../ShowMoreLess';\nimport { withTestIds } from '../../utils';\nimport NoValue from '../NoValue/NoValue';\n\nimport { getFieldValueListTestIds, getFieldValueItemTestIds } from './FieldValueList.test-ids';\n\nexport type FieldValueVariant = 'inline' | 'stacked';\n\ninterface BaseFieldValueListItem extends TestIdProp {\n name: string;\n id?: string;\n variant?: FieldValueVariant;\n}\n\nexport type FieldValueListItemProps =\n | (BaseFieldValueListItem & {\n value?: ExcludeStrict<ReactNode, 'string'>;\n truncate?: never;\n })\n | (BaseFieldValueListItem & {\n value: string;\n truncate?: boolean;\n });\n\nexport interface FieldValueListProps extends BaseProps, NoChildrenProp, TestIdProp {\n /** The set of field values to render in the list. */\n fields: FieldValueListItemProps[];\n /**\n * Determines if the field and values should be displayed on the same line, or stacked with the field above the value.\n * @default 'inline'\n */\n variant?: FieldValueVariant | 'value-comparison';\n}\n\nexport const StyledFieldName = styled.dt`\n word-break: break-word;\n`;\n\nexport const StyledFieldValue = styled.dd`\n word-break: break-word;\n`;\n\nexport type StyledFieldValueListProps = Pick<FieldValueListProps, 'variant'>;\n\nexport const StyledFieldValueList = styled.dl<StyledFieldValueListProps>(({ variant, theme }) => {\n return css`\n width: 100%;\n\n ${variant === 'value-comparison' &&\n css`\n dt {\n width: 100%;\n }\n dd {\n text-align: end;\n padding-inline-start: calc(2 * ${theme.base.spacing});\n }\n ${StyledLabel} {\n max-width: unset;\n }\n dd:not(:last-of-type),\n dt:not(:last-of-type) {\n border-bottom: 0.0625rem solid ${theme.base.palette['border-line']};\n padding-bottom: calc(0.5 * ${theme.base.spacing});\n }\n `}\n `;\n});\n\nStyledFieldValueList.defaultProps = defaultThemeProp;\n\nexport const StyledStackedFieldValue = styled.div``;\n\nexport const FieldValueItem = withTestIds(\n ({ testId, name, value, variant = 'inline', truncate = true }: FieldValueListItemProps) => {\n const testIds = useTestIds(testId, getFieldValueItemTestIds);\n\n const displayValue =\n typeof value === 'string' && truncate ? (\n <ShowMoreLess lines={3}>{value}</ShowMoreLess>\n ) : (\n value\n );\n\n const labelAndValue = (\n <>\n <StyledLabel data-testid={testIds.name} as={StyledFieldName}>\n {name}\n </StyledLabel>\n <StyledFieldValue data-testid={testIds.value}>\n {value ? displayValue : <NoValue />}\n </StyledFieldValue>\n </>\n );\n\n return variant === 'stacked' ? (\n <StyledStackedFieldValue data-testid={testIds.root}>{labelAndValue}</StyledStackedFieldValue>\n ) : (\n <>{labelAndValue}</>\n );\n },\n getFieldValueItemTestIds\n);\n\nconst FieldValueList: FunctionComponent<FieldValueListProps & ForwardProps> = forwardRef(\n function FieldValueList(\n { testId, fields, variant = 'inline', ...restProps }: FieldValueListProps,\n ref: Ref<HTMLDivElement>\n ) {\n const testIds = useTestIds(testId, getFieldValueListTestIds);\n\n const fieldValueListRef = useConsolidatedRef<HTMLDivElement>(ref);\n\n const isXSContentWidthOrAbove = useBreakpoint('xs', {\n breakpointRef: fieldValueListRef,\n themeProp: 'content-width'\n });\n\n return (\n <Grid\n data-testid={testIds.root}\n {...restProps}\n ref={fieldValueListRef}\n container={{\n cols:\n ['inline', 'value-comparison'].includes(variant) && isXSContentWidthOrAbove\n ? '16ch minmax(0, 1fr)'\n : 'minmax(0, 1fr)',\n colGap: variant !== 'value-comparison' ? 2 : 0,\n rowGap: variant !== 'value-comparison' ? 1 : 0.5\n }}\n as={StyledFieldValueList}\n variant={isXSContentWidthOrAbove ? variant : 'stacked'}\n >\n {fields.map(({ id, name, value, truncate = true, variant: fieldVariant }) => {\n const sharedProps: BaseFieldValueListItem & { key: string } = {\n name,\n variant:\n (fieldVariant ?? variant) === 'stacked' || !isXSContentWidthOrAbove\n ? 'stacked'\n : 'inline',\n\n key: id ?? name\n };\n\n if (typeof value === 'string') {\n return <FieldValueItem {...sharedProps} value={value} truncate={truncate} />;\n }\n\n return <FieldValueItem {...sharedProps} value={value} />;\n })}\n </Grid>\n );\n }\n);\n\nexport default withTestIds(FieldValueList, getFieldValueListTestIds);\n"]}
@@ -1,3 +1,3 @@
1
- export declare const getFieldValueListTestIds: (testIdProp?: string | undefined) => import("../..").TestIdsRecord<readonly []>;
2
- export declare const getFieldValueItemTestIds: (testIdProp?: string | undefined) => import("../..").TestIdsRecord<readonly ["name", "value"]>;
1
+ export declare const getFieldValueListTestIds: (testIdProp?: string | null | undefined) => import("../..").TestIdsRecord<readonly []>;
2
+ export declare const getFieldValueItemTestIds: (testIdProp?: string | null | undefined) => import("../..").TestIdsRecord<readonly ["name", "value"]>;
3
3
  //# sourceMappingURL=FieldValueList.test-ids.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FieldValueList.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/FieldValueList/FieldValueList.test-ids.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,wBAAwB,iFAAiD,CAAC;AAEvF,eAAO,MAAM,wBAAwB,gGAG1B,CAAC"}
1
+ {"version":3,"file":"FieldValueList.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/FieldValueList/FieldValueList.test-ids.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,wBAAwB,wFAAiD,CAAC;AAEvF,eAAO,MAAM,wBAAwB,uGAG1B,CAAC"}
@@ -1,3 +1,3 @@
1
1
  export { default, FieldValueItem, StyledFieldValueList, StyledFieldName, StyledFieldValue, StyledStackedFieldValue } from './FieldValueList';
2
- export type { FieldValueListProps, FieldValueListItem, FieldValueListItemProps, StyledFieldValueListProps } from './FieldValueList';
2
+ export type { FieldValueListProps, FieldValueListItemProps, StyledFieldValueListProps } from './FieldValueList';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FieldValueList/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,uBAAuB,EACxB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,mBAAmB,EACnB,kBAAkB,EAClB,uBAAuB,EACvB,yBAAyB,EAC1B,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FieldValueList/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,uBAAuB,EACxB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,mBAAmB,EACnB,uBAAuB,EACvB,yBAAyB,EAC1B,MAAM,kBAAkB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/FieldValueList/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,uBAAuB,EACxB,MAAM,kBAAkB,CAAC","sourcesContent":["export {\n default,\n FieldValueItem,\n StyledFieldValueList,\n StyledFieldName,\n StyledFieldValue,\n StyledStackedFieldValue\n} from './FieldValueList';\nexport type {\n FieldValueListProps,\n FieldValueListItem,\n FieldValueListItemProps,\n StyledFieldValueListProps\n} from './FieldValueList';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/FieldValueList/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,uBAAuB,EACxB,MAAM,kBAAkB,CAAC","sourcesContent":["export {\n default,\n FieldValueItem,\n StyledFieldValueList,\n StyledFieldName,\n StyledFieldValue,\n StyledStackedFieldValue\n} from './FieldValueList';\nexport type {\n FieldValueListProps,\n FieldValueListItemProps,\n StyledFieldValueListProps\n} from './FieldValueList';\n"]}
@@ -0,0 +1,15 @@
1
+ import type { NoChildrenProp, WithAttributes } from '../../types';
2
+ import type { InfoDialogProps } from '../Dialog';
3
+ export type CompactListProps = WithAttributes<'div', NoChildrenProp & Pick<InfoDialogProps, 'progress'> & {
4
+ /** number representing the total count of items */
5
+ count: number;
6
+ heading: InfoDialogProps['heading'];
7
+ /** Callback that triggers when the dialog is open */
8
+ onDialogOpen?: () => void;
9
+ /** Callback that triggers when the dialog is closed */
10
+ onDialogClose?: () => void;
11
+ content?: InfoDialogProps['children'];
12
+ }>;
13
+ declare const CompactList: import("react").ForwardRefExoticComponent<Omit<CompactListProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
14
+ export default CompactList;
15
+ //# sourceMappingURL=CompactList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CompactList.d.ts","sourceRoot":"","sources":["../../../src/components/File/CompactList.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAc,cAAc,EAAE,MAAM,aAAa,CAAC;AAI9E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAGjD,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAC3C,KAAK,EACL,cAAc,GACZ,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,GAAG;IAClC,mDAAmD;IACnD,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;IACpC,qDAAqD;IACrD,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,uDAAuD;IACvD,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,OAAO,CAAC,EAAE,eAAe,CAAC,UAAU,CAAC,CAAC;CACvC,CACJ,CAAC;AAEF,QAAA,MAAM,WAAW,0HA0ChB,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { forwardRef } from 'react';
3
+ import Button from '../Button';
4
+ import { useElement, useI18n } from '../../hooks';
5
+ import InfoDialog from '../Dialog/InfoDialog';
6
+ import NoValue from '../NoValue';
7
+ const CompactList = forwardRef(function CompactList({ count, onDialogOpen, onDialogClose, progress, heading, content, ...restProps }, ref) {
8
+ const t = useI18n();
9
+ const [target, setTarget] = useElement(null);
10
+ return (_jsx("div", { ...restProps, ref: ref, children: count === 0 ? (_jsx(NoValue, {})) : (_jsxs(_Fragment, { children: [_jsx(Button, { variant: 'link', onClick: (e) => {
11
+ if (onDialogOpen && !target)
12
+ onDialogOpen();
13
+ setTarget(e.currentTarget);
14
+ }, children: t('number_of_items', [count], { count }) }), target && (_jsx(InfoDialog, { heading: heading, progress: progress, target: target, onDismiss: () => {
15
+ if (onDialogClose)
16
+ onDialogClose();
17
+ setTarget(null);
18
+ }, children: content }))] })) }));
19
+ });
20
+ export default CompactList;
21
+ //# sourceMappingURL=CompactList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CompactList.js","sourceRoot":"","sources":["../../../src/components/File/CompactList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAInC,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAE9C,OAAO,OAAO,MAAM,YAAY,CAAC;AAiBjC,MAAM,WAAW,GAAG,UAAU,CAC5B,SAAS,WAAW,CAClB,EAAE,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,SAAS,EAAE,EAChF,GAAG;IAEH,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;IACpB,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,UAAU,CAAoB,IAAI,CAAC,CAAC;IAEhE,OAAO,CACL,iBAAS,SAAS,EAAE,GAAG,EAAE,GAAG,YACzB,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CACb,KAAC,OAAO,KAAG,CACZ,CAAC,CAAC,CAAC,CACF,8BACE,KAAC,MAAM,IACL,OAAO,EAAC,MAAM,EACd,OAAO,EAAE,CAAC,CAAgC,EAAE,EAAE;wBAC5C,IAAI,YAAY,IAAI,CAAC,MAAM;4BAAE,YAAY,EAAE,CAAC;wBAC5C,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC;oBAC7B,CAAC,YAEA,CAAC,CAAC,iBAAiB,EAAE,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,EAAE,CAAC,GAClC,EAER,MAAM,IAAI,CACT,KAAC,UAAU,IACT,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,GAAG,EAAE;wBACd,IAAI,aAAa;4BAAE,aAAa,EAAE,CAAC;wBACnC,SAAS,CAAC,IAAI,CAAC,CAAC;oBAClB,CAAC,YAEA,OAAO,GACG,CACd,IACA,CACJ,GACG,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { PropsWithoutRef, MouseEvent } from 'react';\n\nimport type { NoChildrenProp, RefElement, WithAttributes } from '../../types';\nimport Button from '../Button';\nimport { useElement, useI18n } from '../../hooks';\nimport InfoDialog from '../Dialog/InfoDialog';\nimport type { InfoDialogProps } from '../Dialog';\nimport NoValue from '../NoValue';\n\nexport type CompactListProps = WithAttributes<\n 'div',\n NoChildrenProp &\n Pick<InfoDialogProps, 'progress'> & {\n /** number representing the total count of items */\n count: number;\n heading: InfoDialogProps['heading'];\n /** Callback that triggers when the dialog is open */\n onDialogOpen?: () => void;\n /** Callback that triggers when the dialog is closed */\n onDialogClose?: () => void;\n content?: InfoDialogProps['children'];\n }\n>;\n\nconst CompactList = forwardRef<RefElement<CompactListProps>, PropsWithoutRef<CompactListProps>>(\n function CompactList(\n { count, onDialogOpen, onDialogClose, progress, heading, content, ...restProps },\n ref\n ) {\n const t = useI18n();\n const [target, setTarget] = useElement<HTMLButtonElement>(null);\n\n return (\n <div {...restProps} ref={ref}>\n {count === 0 ? (\n <NoValue />\n ) : (\n <>\n <Button\n variant='link'\n onClick={(e: MouseEvent<HTMLButtonElement>) => {\n if (onDialogOpen && !target) onDialogOpen();\n setTarget(e.currentTarget);\n }}\n >\n {t('number_of_items', [count], { count })}\n </Button>\n\n {target && (\n <InfoDialog\n heading={heading}\n progress={progress}\n target={target}\n onDismiss={() => {\n if (onDialogClose) onDialogClose();\n setTarget(null);\n }}\n >\n {content}\n </InfoDialog>\n )}\n </>\n )}\n </div>\n );\n }\n);\n\nexport default CompactList;\n"]}
@@ -1,2 +1,2 @@
1
- export declare const getFileInputTestIds: (testIdProp?: string | undefined) => import("../..").TestIdsRecord<readonly ["control", "files", "label", "info", "additional-info", "suggestion-accept", "suggestion-reject"]>;
1
+ export declare const getFileInputTestIds: (testIdProp?: string | null | undefined) => import("../..").TestIdsRecord<readonly ["control", "files", "label", "info", "additional-info", "suggestion-accept", "suggestion-reject"]>;
2
2
  //# sourceMappingURL=File.test-ids.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"File.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/File/File.test-ids.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,mBAAmB,iLAIrB,CAAC"}
1
+ {"version":3,"file":"File.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/File/File.test-ids.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,mBAAmB,wLAIrB,CAAC"}
@@ -11,6 +11,11 @@ export interface FileDisplayProps extends Pick<FileItemProps, 'id' | 'onPreview'
11
11
  * @default 'file'
12
12
  */
13
13
  variant?: 'file' | 'link' | 'text';
14
+ /**
15
+ * Used for a compact version of variant 'file' type
16
+ * @default false
17
+ */
18
+ compact?: FileItemProps['compact'];
14
19
  /** Thumbnail image. */
15
20
  thumbnail?: string;
16
21
  /** Ref for the wrapping element. */
@@ -1 +1 @@
1
- {"version":3,"file":"FileDisplay.d.ts","sourceRoot":"","sources":["../../../src/components/File/FileDisplay.tsx"],"names":[],"mappings":"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C,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IACnC;;;OAGG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;IACnC,uBAAuB;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oCAAoC;IACpC,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,GAAG,iBAAiB,GAAG,eAAe,CAAC,CAAC;CACjE;AAED,QAAA,MAAM,WAAW,EAAE,iBAAiB,CAAC,gBAAgB,GAAG,YAAY,CA4CnE,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -3,13 +3,13 @@ import { forwardRef } from 'react';
3
3
  import Link from '../Link';
4
4
  import NoValue from '../NoValue/NoValue';
5
5
  import FileItem from './FileItem';
6
- const FileDisplay = forwardRef(function FileDisplay({ id, displayText, value, variant, thumbnail, onPreview, onDownload, ...restProps }, ref) {
6
+ const FileDisplay = forwardRef(function FileDisplay({ id, displayText, value, variant, thumbnail, onPreview, onDownload, compact = false, ...restProps }, ref) {
7
7
  if (variant === 'text' || !value) {
8
8
  return (_jsx("span", { ref: ref, ...restProps, children: value ? displayText || value : _jsx(NoValue, {}) }));
9
9
  }
10
10
  if (variant === 'link')
11
11
  return (_jsx(Link, { ref: ref, ...restProps, href: value, children: displayText || value }));
12
- return (_jsx(FileItem, { ...restProps, id: id, ref: ref, format: value.split('.').pop() ?? value, name: displayText || value, thumbnail: thumbnail, onDownload: onDownload, onPreview: onPreview }));
12
+ return (_jsx(FileItem, { ...restProps, id: id, ref: ref, format: value.split('.').pop() ?? value, name: displayText || value, thumbnail: thumbnail, onDownload: onDownload, onPreview: onPreview, compact: compact }));
13
13
  });
14
14
  export default FileDisplay;
15
15
  //# sourceMappingURL=FileDisplay.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FileDisplay.js","sourceRoot":"","sources":["../../../src/components/File/FileDisplay.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAInC,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,OAAO,MAAM,oBAAoB,CAAC;AAEzC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAsBlC,MAAM,WAAW,GAAuD,UAAU,CAChF,SAAS,WAAW,CAClB,EACE,EAAE,EACF,WAAW,EACX,KAAK,EACL,OAAO,EACP,SAAS,EACT,SAAS,EACT,UAAU,EACV,GAAG,SAAS,EACsB,EACpC,GAA4B;IAE5B,IAAI,OAAO,KAAK,MAAM,IAAI,CAAC,KAAK,EAAE;QAChC,OAAO,CACL,eAAM,GAAG,EAAE,GAAG,KAAM,SAAS,YAC1B,KAAK,CAAC,CAAC,CAAC,WAAW,IAAI,KAAK,CAAC,CAAC,CAAC,KAAC,OAAO,KAAG,GACtC,CACR,CAAC;KACH;IAED,IAAI,OAAO,KAAK,MAAM;QACpB,OAAO,CACL,KAAC,IAAI,IAAC,GAAG,EAAE,GAA6B,KAAM,SAAS,EAAE,IAAI,EAAE,KAAK,YACjE,WAAW,IAAI,KAAK,GAChB,CACR,CAAC;IAEJ,OAAO,CACL,KAAC,QAAQ,OACH,SAAS,EACb,EAAE,EAAE,EAAE,EACN,GAAG,EAAE,GAA0B,EAC/B,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,IAAI,KAAK,EACvC,IAAI,EAAE,WAAW,IAAI,KAAK,EAC1B,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,SAAS,GACpB,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { FunctionComponent, PropsWithoutRef, Ref } from 'react';\n\nimport type { BaseProps, ForwardProps, NoChildrenProp } from '../../types';\nimport Link from '../Link';\nimport NoValue from '../NoValue/NoValue';\n\nimport FileItem from './FileItem';\nimport type { FileItemProps } from './FileItem';\n\nexport interface FileDisplayProps\n extends Pick<FileItemProps, 'id' | 'onPreview' | 'onDownload'>,\n BaseProps,\n NoChildrenProp {\n /** URL address */\n value?: string;\n /** The text to be displayed. */\n displayText?: string;\n /**\n * Display value either as file, link only or textual representation.\n * @default 'file'\n */\n variant?: 'file' | 'link' | 'text';\n /** Thumbnail image. */\n thumbnail?: string;\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLDivElement | HTMLAnchorElement | HTMLSpanElement>;\n}\n\nconst FileDisplay: FunctionComponent<FileDisplayProps & ForwardProps> = forwardRef(\n function FileDisplay(\n {\n id,\n displayText,\n value,\n variant,\n thumbnail,\n onPreview,\n onDownload,\n ...restProps\n }: PropsWithoutRef<FileDisplayProps>,\n ref: FileDisplayProps['ref']\n ) {\n if (variant === 'text' || !value) {\n return (\n <span ref={ref} {...restProps}>\n {value ? displayText || value : <NoValue />}\n </span>\n );\n }\n\n if (variant === 'link')\n return (\n <Link ref={ref as Ref<HTMLAnchorElement>} {...restProps} href={value}>\n {displayText || value}\n </Link>\n );\n\n return (\n <FileItem\n {...restProps}\n id={id}\n ref={ref as Ref<HTMLDivElement>}\n format={value.split('.').pop() ?? value}\n name={displayText || value}\n thumbnail={thumbnail}\n onDownload={onDownload}\n onPreview={onPreview}\n />\n );\n }\n);\n\nexport default FileDisplay;\n"]}
1
+ {"version":3,"file":"FileDisplay.js","sourceRoot":"","sources":["../../../src/components/File/FileDisplay.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAInC,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,OAAO,MAAM,oBAAoB,CAAC;AAEzC,OAAO,QAAQ,MAAM,YAAY,CAAC;AA2BlC,MAAM,WAAW,GAAuD,UAAU,CAChF,SAAS,WAAW,CAClB,EACE,EAAE,EACF,WAAW,EACX,KAAK,EACL,OAAO,EACP,SAAS,EACT,SAAS,EACT,UAAU,EACV,OAAO,GAAG,KAAK,EACf,GAAG,SAAS,EACsB,EACpC,GAA4B;IAE5B,IAAI,OAAO,KAAK,MAAM,IAAI,CAAC,KAAK,EAAE;QAChC,OAAO,CACL,eAAM,GAAG,EAAE,GAAG,KAAM,SAAS,YAC1B,KAAK,CAAC,CAAC,CAAC,WAAW,IAAI,KAAK,CAAC,CAAC,CAAC,KAAC,OAAO,KAAG,GACtC,CACR,CAAC;KACH;IAED,IAAI,OAAO,KAAK,MAAM;QACpB,OAAO,CACL,KAAC,IAAI,IAAC,GAAG,EAAE,GAA6B,KAAM,SAAS,EAAE,IAAI,EAAE,KAAK,YACjE,WAAW,IAAI,KAAK,GAChB,CACR,CAAC;IAEJ,OAAO,CACL,KAAC,QAAQ,OACH,SAAS,EACb,EAAE,EAAE,EAAE,EACN,GAAG,EAAE,GAA0B,EAC/B,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,IAAI,KAAK,EACvC,IAAI,EAAE,WAAW,IAAI,KAAK,EAC1B,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,GAChB,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { FunctionComponent, PropsWithoutRef, Ref } from 'react';\n\nimport type { BaseProps, ForwardProps, NoChildrenProp } from '../../types';\nimport Link from '../Link';\nimport NoValue from '../NoValue/NoValue';\n\nimport FileItem from './FileItem';\nimport type { FileItemProps } from './FileItem';\n\nexport interface FileDisplayProps\n extends Pick<FileItemProps, 'id' | 'onPreview' | 'onDownload'>,\n BaseProps,\n NoChildrenProp {\n /** URL address */\n value?: string;\n /** The text to be displayed. */\n displayText?: string;\n /**\n * Display value either as file, link only or textual representation.\n * @default 'file'\n */\n variant?: 'file' | 'link' | 'text';\n /**\n * Used for a compact version of variant 'file' type\n * @default false\n */\n compact?: FileItemProps['compact'];\n /** Thumbnail image. */\n thumbnail?: string;\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLDivElement | HTMLAnchorElement | HTMLSpanElement>;\n}\n\nconst FileDisplay: FunctionComponent<FileDisplayProps & ForwardProps> = forwardRef(\n function FileDisplay(\n {\n id,\n displayText,\n value,\n variant,\n thumbnail,\n onPreview,\n onDownload,\n compact = false,\n ...restProps\n }: PropsWithoutRef<FileDisplayProps>,\n ref: FileDisplayProps['ref']\n ) {\n if (variant === 'text' || !value) {\n return (\n <span ref={ref} {...restProps}>\n {value ? displayText || value : <NoValue />}\n </span>\n );\n }\n\n if (variant === 'link')\n return (\n <Link ref={ref as Ref<HTMLAnchorElement>} {...restProps} href={value}>\n {displayText || value}\n </Link>\n );\n\n return (\n <FileItem\n {...restProps}\n id={id}\n ref={ref as Ref<HTMLDivElement>}\n format={value.split('.').pop() ?? value}\n name={displayText || value}\n thumbnail={thumbnail}\n onDownload={onDownload}\n onPreview={onPreview}\n compact={compact}\n />\n );\n }\n);\n\nexport default FileDisplay;\n"]}
@@ -1,7 +1,9 @@
1
1
  import type { NoChildrenProp, OmitStrict, WithAttributes } from '../../types';
2
2
  import type { FileDisplayProps } from './FileDisplay';
3
- export type FileDisplayListProps = WithAttributes<'div', Pick<FileDisplayProps, 'variant'> & NoChildrenProp & {
4
- items: OmitStrict<FileDisplayProps, 'variant'>[];
3
+ import { type FileListProps } from './FileList';
4
+ import { type CompactListProps } from './CompactList';
5
+ export type FileDisplayListProps = WithAttributes<'div', Pick<FileDisplayProps, 'variant' | 'compact'> & NoChildrenProp & Partial<Pick<CompactListProps, 'count' | 'onDialogOpen' | 'onDialogClose' | 'heading' | 'progress'>> & Pick<FileListProps, 'onDownloadAll'> & {
6
+ items?: OmitStrict<FileDisplayProps, 'variant'>[];
5
7
  }>;
6
8
  declare const FileDisplayList: import("react").ForwardRefExoticComponent<Omit<FileDisplayListProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
7
9
  export default FileDisplayList;
@@ -1 +1 @@
1
- {"version":3,"file":"FileDisplayList.d.ts","sourceRoot":"","sources":["../../../src/components/File/FileDisplayList.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAc,cAAc,EAAE,MAAM,aAAa,CAAC;AAE1F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAGtD,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAC/C,KAAK,EACL,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,GAC/B,cAAc,GAAG;IACf,KAAK,EAAE,UAAU,CAAC,gBAAgB,EAAE,SAAS,CAAC,EAAE,CAAC;CAClD,CACJ,CAAC;AAEF,QAAA,MAAM,eAAe,8HAYnB,CAAC;AAEH,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"FileDisplayList.d.ts","sourceRoot":"","sources":["../../../src/components/File/FileDisplayList.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAc,cAAc,EAAE,MAAM,aAAa,CAAC;AAE1F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAiB,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAoB,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEnE,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAC/C,KAAK,EACL,IAAI,CAAC,gBAAgB,EAAE,SAAS,GAAG,SAAS,CAAC,GAC3C,cAAc,GACd,OAAO,CACL,IAAI,CAAC,gBAAgB,EAAE,OAAO,GAAG,cAAc,GAAG,eAAe,GAAG,SAAS,GAAG,UAAU,CAAC,CAC5F,GACD,IAAI,CAAC,aAAa,EAAE,eAAe,CAAC,GAAG;IACrC,KAAK,CAAC,EAAE,UAAU,CAAC,gBAAgB,EAAE,SAAS,CAAC,EAAE,CAAC;CACnD,CACJ,CAAC;AAEF,QAAA,MAAM,eAAe,8HAsCnB,CAAC;AAEH,eAAe,eAAe,CAAC"}
@@ -1,8 +1,14 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from 'react';
3
- import FileList from './FileList';
4
- const FileDisplayList = forwardRef(function FileDisplayList({ variant, items, ...restProps }, ref) {
5
- return (_jsx(FileList, { ...restProps, type: 'display', items: items.map(item => ({ ...item, variant })), ref: ref }));
3
+ import FileList, {} from './FileList';
4
+ import CompactList, {} from './CompactList';
5
+ const FileDisplayList = forwardRef(function FileDisplayList({ variant, items = [], compact = false, heading, progress, count, onDialogOpen, onDialogClose, onDownloadAll, ...restProps }, ref) {
6
+ const fileListProps = {
7
+ type: 'display',
8
+ items: items.map(item => ({ ...item, variant })),
9
+ onDownloadAll
10
+ };
11
+ return compact ? (_jsx(CompactList, { ...restProps, count: count ?? items.length, onDialogOpen: onDialogOpen, onDialogClose: onDialogClose, heading: heading, progress: progress, content: progress ? undefined : _jsx(FileList, { ...fileListProps }), ref: ref })) : (_jsx(FileList, { ...restProps, ...fileListProps, ref: ref }));
6
12
  });
7
13
  export default FileDisplayList;
8
14
  //# sourceMappingURL=FileDisplayList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FileDisplayList.js","sourceRoot":"","sources":["../../../src/components/File/FileDisplayList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAMnC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAUlC,MAAM,eAAe,GAAG,UAAU,CAGhC,SAAS,eAAe,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,SAAS,EAAE,EAAE,GAAG;IAC9D,OAAO,CACL,KAAC,QAAQ,OACH,SAAS,EACb,IAAI,EAAC,SAAS,EACd,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC,EAChD,GAAG,EAAE,GAAG,GACR,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,eAAe,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { PropsWithoutRef } from 'react';\n\nimport type { NoChildrenProp, OmitStrict, RefElement, WithAttributes } from '../../types';\n\nimport type { FileDisplayProps } from './FileDisplay';\nimport FileList from './FileList';\n\nexport type FileDisplayListProps = WithAttributes<\n 'div',\n Pick<FileDisplayProps, 'variant'> &\n NoChildrenProp & {\n items: OmitStrict<FileDisplayProps, 'variant'>[];\n }\n>;\n\nconst FileDisplayList = forwardRef<\n RefElement<FileDisplayListProps>,\n PropsWithoutRef<FileDisplayListProps>\n>(function FileDisplayList({ variant, items, ...restProps }, ref) {\n return (\n <FileList\n {...restProps}\n type='display'\n items={items.map(item => ({ ...item, variant }))}\n ref={ref}\n />\n );\n});\n\nexport default FileDisplayList;\n"]}
1
+ {"version":3,"file":"FileDisplayList.js","sourceRoot":"","sources":["../../../src/components/File/FileDisplayList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAMnC,OAAO,QAAQ,EAAE,EAAsB,MAAM,YAAY,CAAC;AAC1D,OAAO,WAAW,EAAE,EAAyB,MAAM,eAAe,CAAC;AAcnE,MAAM,eAAe,GAAG,UAAU,CAGhC,SAAS,eAAe,CACxB,EACE,OAAO,EACP,KAAK,GAAG,EAAE,EACV,OAAO,GAAG,KAAK,EACf,OAAO,EACP,QAAQ,EACR,KAAK,EACL,YAAY,EACZ,aAAa,EACb,aAAa,EACb,GAAG,SAAS,EACb,EACD,GAAG;IAEH,MAAM,aAAa,GAAkB;QACnC,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;QAChD,aAAa;KACd,CAAC;IAEF,OAAO,OAAO,CAAC,CAAC,CAAC,CACf,KAAC,WAAW,OACN,SAAS,EACb,KAAK,EAAE,KAAK,IAAI,KAAK,CAAC,MAAM,EAC5B,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,aAAa,EAC5B,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAC,QAAQ,OAAK,aAAa,GAAI,EAC/D,GAAG,EAAE,GAAG,GACR,CACH,CAAC,CAAC,CAAC,CACF,KAAC,QAAQ,OAAK,SAAS,KAAM,aAAa,EAAE,GAAG,EAAE,GAAG,GAAI,CACzD,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,eAAe,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { PropsWithoutRef } from 'react';\n\nimport type { NoChildrenProp, OmitStrict, RefElement, WithAttributes } from '../../types';\n\nimport type { FileDisplayProps } from './FileDisplay';\nimport FileList, { type FileListProps } from './FileList';\nimport CompactList, { type CompactListProps } from './CompactList';\n\nexport type FileDisplayListProps = WithAttributes<\n 'div',\n Pick<FileDisplayProps, 'variant' | 'compact'> &\n NoChildrenProp &\n Partial<\n Pick<CompactListProps, 'count' | 'onDialogOpen' | 'onDialogClose' | 'heading' | 'progress'>\n > &\n Pick<FileListProps, 'onDownloadAll'> & {\n items?: OmitStrict<FileDisplayProps, 'variant'>[];\n }\n>;\n\nconst FileDisplayList = forwardRef<\n RefElement<FileDisplayListProps>,\n PropsWithoutRef<FileDisplayListProps>\n>(function FileDisplayList(\n {\n variant,\n items = [],\n compact = false,\n heading,\n progress,\n count,\n onDialogOpen,\n onDialogClose,\n onDownloadAll,\n ...restProps\n },\n ref\n) {\n const fileListProps: FileListProps = {\n type: 'display',\n items: items.map(item => ({ ...item, variant })),\n onDownloadAll\n };\n\n return compact ? (\n <CompactList\n {...restProps}\n count={count ?? items.length}\n onDialogOpen={onDialogOpen}\n onDialogClose={onDialogClose}\n heading={heading}\n progress={progress}\n content={progress ? undefined : <FileList {...fileListProps} />}\n ref={ref}\n />\n ) : (\n <FileList {...restProps} {...fileListProps} ref={ref} />\n );\n});\n\nexport default FileDisplayList;\n"]}
@@ -1,8 +1,27 @@
1
1
  import type { FunctionComponent, Ref } from 'react';
2
- import type { BaseProps, ForwardProps, NoChildrenProp, TestIdProp } from '../../types';
2
+ import { type FileListProps, type ModalProps } from '@pega/cosmos-react-core';
3
+ import type { BaseProps, ForwardProps, NoChildrenProp, OmitStrict, TestIdProp } from '../../types';
3
4
  import type { FormControlProps } from '../FormControl';
4
5
  import type { FileItemProps } from './FileItem';
5
- export interface FileInputProps extends BaseProps, NoChildrenProp, TestIdProp {
6
+ /** Props to be used when rendering compact variant for multiple FileInput. */
7
+ interface MultiAttachCompactProps {
8
+ /** Modal props */
9
+ modal?: Pick<ModalProps, 'onBeforeOpen'> & {
10
+ /** Callback for cancel button */
11
+ onCancel: ({ close }: {
12
+ close: () => void;
13
+ }) => void;
14
+ /** Callback for submit button */
15
+ onSubmit: ({ close }: {
16
+ close: () => void;
17
+ }) => void;
18
+ /** If true renders loading indicator inside Modal. */
19
+ loading?: boolean;
20
+ };
21
+ /** Conveys the number of files attached */
22
+ count?: number;
23
+ }
24
+ interface BaseFileInputProps extends BaseProps, NoChildrenProp, TestIdProp, Pick<FileItemProps, 'previewFromActions'>, Pick<FileListProps, 'onDownloadAll'> {
6
25
  /** Called when files are added either via the input or drop zone. */
7
26
  onFilesAdded?: (files: File[]) => void;
8
27
  /**
@@ -12,8 +31,13 @@ export interface FileInputProps extends BaseProps, NoChildrenProp, TestIdProp {
12
31
  * @default false
13
32
  */
14
33
  multiple?: boolean;
34
+ /**
35
+ * Renders compact variant.
36
+ * @default false
37
+ */
38
+ compact?: boolean;
15
39
  /** An array of files that have been uploaded. */
16
- files?: FileItemProps[];
40
+ files?: OmitStrict<FileItemProps, 'previewFromActions'>[];
17
41
  /**
18
42
  * Specify allowed file types.
19
43
  * @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept}
@@ -36,6 +60,8 @@ export interface FileInputProps extends BaseProps, NoChildrenProp, TestIdProp {
36
60
  required?: FormControlProps['required'];
37
61
  /** Disable the control. The browser defaults to false. */
38
62
  disabled?: FormControlProps['disabled'];
63
+ /** Makes the input non editable and non clickable. */
64
+ readOnly?: FormControlProps['readOnly'];
39
65
  /** Sets html name attribute for the underlying control. Useful for mapping to a data field. */
40
66
  name?: FormControlProps['name'];
41
67
  /** Pass a heading and content to show additional information on the field. */
@@ -43,12 +69,10 @@ export interface FileInputProps extends BaseProps, NoChildrenProp, TestIdProp {
43
69
  /** Ref for the input element within the component's dom structure. */
44
70
  ref?: Ref<HTMLInputElement>;
45
71
  }
46
- export declare const StyledDropZone: import("styled-components").StyledComponent<FunctionComponent<FormControlProps & ForwardProps>, import("styled-components").DefaultTheme, {
47
- dragOver: boolean;
48
- }, never>;
49
- export declare const StyledFileInput: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, Pick<FileInputProps, keyof FileInputProps> & Required<Pick<FileInputProps, never>> & ForwardProps, never>;
72
+ export interface FileInputProps extends BaseFileInputProps, MultiAttachCompactProps {
73
+ }
50
74
  declare const _default: FunctionComponent<FileInputProps & ForwardProps> & {
51
- getTestIds: (testIdProp?: string | undefined) => import("../../types").TestIdsRecord<readonly ["control", "files", "label", "info", "additional-info", "suggestion-accept", "suggestion-reject"]>;
75
+ getTestIds: (testIdProp?: string | null | undefined) => import("@pega/cosmos-react-core").TestIdsRecord<readonly ["control", "files", "label", "info", "additional-info", "suggestion-accept", "suggestion-reject"]>;
52
76
  };
53
77
  export default _default;
54
78
  //# sourceMappingURL=FileInput.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FileInput.d.ts","sourceRoot":"","sources":["../../../src/components/File/FileInput.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,GAAG,EAA2C,MAAM,OAAO,CAAC;AAI7F,OAAO,KAAK,EACV,SAAS,EACT,YAAY,EAC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