@pega/cosmos-react-core 7.0.0-build.3.4 → 7.0.0-build.30.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 (777) 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 +27 -20
  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 +16 -4
  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 +52 -13
  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/NavigationList.d.ts.map +1 -1
  33. package/lib/components/AppShell/NavigationList.js +3 -3
  34. package/lib/components/AppShell/NavigationList.js.map +1 -1
  35. package/lib/components/AppShell/NavigationListItemWrapper.d.ts.map +1 -1
  36. package/lib/components/AppShell/NavigationListItemWrapper.js +1 -0
  37. package/lib/components/AppShell/NavigationListItemWrapper.js.map +1 -1
  38. package/lib/components/AppShell/Operator.d.ts +1 -1
  39. package/lib/components/AppShell/style-utils.d.ts +3 -0
  40. package/lib/components/AppShell/style-utils.d.ts.map +1 -1
  41. package/lib/components/AppShell/style-utils.js +42 -3
  42. package/lib/components/AppShell/style-utils.js.map +1 -1
  43. package/lib/components/Avatar/Avatar.d.ts +2 -2
  44. package/lib/components/Avatar/Avatar.d.ts.map +1 -1
  45. package/lib/components/Avatar/Avatar.js +21 -20
  46. package/lib/components/Avatar/Avatar.js.map +1 -1
  47. package/lib/components/Avatar/Avatar.test-ids.d.ts +1 -1
  48. package/lib/components/Avatar/Avatar.test-ids.d.ts.map +1 -1
  49. package/lib/components/Backdrop/Backdrop.d.ts +1 -1
  50. package/lib/components/Backdrop/Backdrop.test-ids.d.ts +1 -1
  51. package/lib/components/Backdrop/Backdrop.test-ids.d.ts.map +1 -1
  52. package/lib/components/Badges/Alert.d.ts +1 -1
  53. package/lib/components/Badges/Badges.test-ids.d.ts +6 -6
  54. package/lib/components/Badges/Badges.test-ids.d.ts.map +1 -1
  55. package/lib/components/Badges/Count.d.ts +1 -1
  56. package/lib/components/Badges/Keyboard.d.ts +1 -1
  57. package/lib/components/Badges/Keyboard.d.ts.map +1 -1
  58. package/lib/components/Badges/Keyboard.js +9 -8
  59. package/lib/components/Badges/Keyboard.js.map +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 +3 -1
  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 +5 -2
  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 +142 -53
  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 +10 -2
  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/DangerButton/DangerButton.js +2 -2
  151. package/lib/components/DangerButton/DangerButton.js.map +1 -1
  152. package/lib/components/DateTime/DateTime.test-ids.d.ts +11 -11
  153. package/lib/components/DateTime/DateTime.test-ids.d.ts.map +1 -1
  154. package/lib/components/DateTime/DateTime.test-ids.js +5 -1
  155. package/lib/components/DateTime/DateTime.test-ids.js.map +1 -1
  156. package/lib/components/DateTime/Input/DateInput.d.ts +1 -1
  157. package/lib/components/DateTime/Input/DateInput.d.ts.map +1 -1
  158. package/lib/components/DateTime/Input/DateInput.js +30 -30
  159. package/lib/components/DateTime/Input/DateInput.js.map +1 -1
  160. package/lib/components/DateTime/Input/DateRangeInput.d.ts +1 -1
  161. package/lib/components/DateTime/Input/DateRangeInput.js +2 -2
  162. package/lib/components/DateTime/Input/DateRangeInput.js.map +1 -1
  163. package/lib/components/DateTime/Input/DateTime.styles.d.ts +1 -0
  164. package/lib/components/DateTime/Input/DateTime.styles.d.ts.map +1 -1
  165. package/lib/components/DateTime/Input/DateTime.styles.js +24 -16
  166. package/lib/components/DateTime/Input/DateTime.styles.js.map +1 -1
  167. package/lib/components/DateTime/Input/DateTimeInput.d.ts +1 -1
  168. package/lib/components/DateTime/Input/DateTimeInput.d.ts.map +1 -1
  169. package/lib/components/DateTime/Input/DateTimeInput.js +28 -22
  170. package/lib/components/DateTime/Input/DateTimeInput.js.map +1 -1
  171. package/lib/components/DateTime/Input/DayOfWeekInput.d.ts +1 -1
  172. package/lib/components/DateTime/Input/Duration/DurationInput.d.ts +1 -1
  173. package/lib/components/DateTime/Input/MonthInput.d.ts +1 -1
  174. package/lib/components/DateTime/Input/MonthInput.d.ts.map +1 -1
  175. package/lib/components/DateTime/Input/MonthInput.js +23 -12
  176. package/lib/components/DateTime/Input/MonthInput.js.map +1 -1
  177. package/lib/components/DateTime/Input/PartInput.d.ts +1 -1
  178. package/lib/components/DateTime/Input/PartInput.d.ts.map +1 -1
  179. package/lib/components/DateTime/Input/PartInput.js +13 -7
  180. package/lib/components/DateTime/Input/PartInput.js.map +1 -1
  181. package/lib/components/DateTime/Input/QuarterInput.d.ts +1 -1
  182. package/lib/components/DateTime/Input/TimeInput.d.ts +1 -1
  183. package/lib/components/DateTime/Input/TimeRangeInput.d.ts +1 -1
  184. package/lib/components/DateTime/Input/TimeRangeInput.js +3 -3
  185. package/lib/components/DateTime/Input/TimeRangeInput.js.map +1 -1
  186. package/lib/components/DateTime/Input/WeekInput.d.ts +1 -1
  187. package/lib/components/DateTime/Input/WeekInput.d.ts.map +1 -1
  188. package/lib/components/DateTime/Input/WeekInput.js +17 -6
  189. package/lib/components/DateTime/Input/WeekInput.js.map +1 -1
  190. package/lib/components/DateTime/Input/utils.d.ts +3 -2
  191. package/lib/components/DateTime/Input/utils.d.ts.map +1 -1
  192. package/lib/components/DateTime/Input/utils.js +9 -2
  193. package/lib/components/DateTime/Input/utils.js.map +1 -1
  194. package/lib/components/DateTime/Picker/Calendar.d.ts.map +1 -1
  195. package/lib/components/DateTime/Picker/Calendar.js +5 -4
  196. package/lib/components/DateTime/Picker/Calendar.js.map +1 -1
  197. package/lib/components/DateTime/Picker/Calendar.styles.d.ts.map +1 -1
  198. package/lib/components/DateTime/Picker/Calendar.styles.js +2 -1
  199. package/lib/components/DateTime/Picker/Calendar.styles.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 +31 -19
  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 +5 -0
  223. package/lib/components/DateTime/utils.d.ts.map +1 -1
  224. package/lib/components/DateTime/utils.js +21 -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 +36 -14
  235. package/lib/components/FieldGroup/FieldGroup.js.map +1 -1
  236. package/lib/components/FieldGroup/FieldGroupList.d.ts +1 -0
  237. package/lib/components/FieldGroup/FieldGroupList.d.ts.map +1 -1
  238. package/lib/components/FieldGroup/FieldGroupList.js +18 -18
  239. package/lib/components/FieldGroup/FieldGroupList.js.map +1 -1
  240. package/lib/components/FieldValueList/FieldValueList.d.ts +14 -10
  241. package/lib/components/FieldValueList/FieldValueList.d.ts.map +1 -1
  242. package/lib/components/FieldValueList/FieldValueList.js +13 -5
  243. package/lib/components/FieldValueList/FieldValueList.js.map +1 -1
  244. package/lib/components/FieldValueList/FieldValueList.test-ids.d.ts +2 -2
  245. package/lib/components/FieldValueList/FieldValueList.test-ids.d.ts.map +1 -1
  246. package/lib/components/FieldValueList/index.d.ts +1 -1
  247. package/lib/components/FieldValueList/index.d.ts.map +1 -1
  248. package/lib/components/FieldValueList/index.js.map +1 -1
  249. package/lib/components/File/CompactList.d.ts +15 -0
  250. package/lib/components/File/CompactList.d.ts.map +1 -0
  251. package/lib/components/File/CompactList.js +21 -0
  252. package/lib/components/File/CompactList.js.map +1 -0
  253. package/lib/components/File/File.test-ids.d.ts +1 -1
  254. package/lib/components/File/File.test-ids.d.ts.map +1 -1
  255. package/lib/components/File/FileDisplay.d.ts +5 -0
  256. package/lib/components/File/FileDisplay.d.ts.map +1 -1
  257. package/lib/components/File/FileDisplay.js +2 -2
  258. package/lib/components/File/FileDisplay.js.map +1 -1
  259. package/lib/components/File/FileDisplayList.d.ts +10 -0
  260. package/lib/components/File/FileDisplayList.d.ts.map +1 -0
  261. package/lib/components/File/FileDisplayList.js +14 -0
  262. package/lib/components/File/FileDisplayList.js.map +1 -0
  263. package/lib/components/File/FileInput.d.ts +38 -9
  264. package/lib/components/File/FileInput.d.ts.map +1 -1
  265. package/lib/components/File/FileInput.js +183 -72
  266. package/lib/components/File/FileInput.js.map +1 -1
  267. package/lib/components/File/FileInput.styles.d.ts +26 -0
  268. package/lib/components/File/FileInput.styles.d.ts.map +1 -0
  269. package/lib/components/File/FileInput.styles.js +166 -0
  270. package/lib/components/File/FileInput.styles.js.map +1 -0
  271. package/lib/components/File/FileItem.d.ts +18 -4
  272. package/lib/components/File/FileItem.d.ts.map +1 -1
  273. package/lib/components/File/FileItem.js +84 -30
  274. package/lib/components/File/FileItem.js.map +1 -1
  275. package/lib/components/File/FileList.d.ts +20 -0
  276. package/lib/components/File/FileList.d.ts.map +1 -0
  277. package/lib/components/File/FileList.js +66 -0
  278. package/lib/components/File/FileList.js.map +1 -0
  279. package/lib/components/File/FileUploadItem.d.ts +4 -0
  280. package/lib/components/File/FileUploadItem.d.ts.map +1 -1
  281. package/lib/components/File/FileUploadItem.js +42 -38
  282. package/lib/components/File/FileUploadItem.js.map +1 -1
  283. package/lib/components/File/index.d.ts +4 -0
  284. package/lib/components/File/index.d.ts.map +1 -1
  285. package/lib/components/File/index.js +2 -0
  286. package/lib/components/File/index.js.map +1 -1
  287. package/lib/components/Flex/Flex.js.map +1 -1
  288. package/lib/components/Form/Form.d.ts +1 -1
  289. package/lib/components/Form/Form.test-ids.d.ts +1 -1
  290. package/lib/components/Form/Form.test-ids.d.ts.map +1 -1
  291. package/lib/components/FormField/FormField.d.ts +2 -2
  292. package/lib/components/FormField/FormField.d.ts.map +1 -1
  293. package/lib/components/FormField/FormField.js +45 -60
  294. package/lib/components/FormField/FormField.js.map +1 -1
  295. package/lib/components/FormField/FormField.test-ids.d.ts +1 -1
  296. package/lib/components/FormField/FormField.test-ids.d.ts.map +1 -1
  297. package/lib/components/Fullscreen/Fullscreen.d.ts +18 -0
  298. package/lib/components/Fullscreen/Fullscreen.d.ts.map +1 -0
  299. package/lib/components/Fullscreen/Fullscreen.js +56 -0
  300. package/lib/components/Fullscreen/Fullscreen.js.map +1 -0
  301. package/lib/components/Fullscreen/Fullscreen.test-ids.d.ts +2 -0
  302. package/lib/components/Fullscreen/Fullscreen.test-ids.d.ts.map +1 -0
  303. package/lib/components/Fullscreen/Fullscreen.test-ids.js +3 -0
  304. package/lib/components/Fullscreen/Fullscreen.test-ids.js.map +1 -0
  305. package/lib/components/Fullscreen/FullscreenButton.d.ts +6 -0
  306. package/lib/components/Fullscreen/FullscreenButton.d.ts.map +1 -0
  307. package/lib/components/Fullscreen/FullscreenButton.js +33 -0
  308. package/lib/components/Fullscreen/FullscreenButton.js.map +1 -0
  309. package/lib/components/Fullscreen/index.d.ts +4 -0
  310. package/lib/components/Fullscreen/index.d.ts.map +1 -0
  311. package/lib/components/Fullscreen/index.js +4 -0
  312. package/lib/components/Fullscreen/index.js.map +1 -0
  313. package/lib/components/HTML/HTML.d.ts +1 -1
  314. package/lib/components/HTML/HTML.test-ids.d.ts +1 -1
  315. package/lib/components/HTML/HTML.test-ids.d.ts.map +1 -1
  316. package/lib/components/Icon/Icon.d.ts.map +1 -1
  317. package/lib/components/Icon/Icon.js +1 -1
  318. package/lib/components/Icon/Icon.js.map +1 -1
  319. package/lib/components/Icon/iconNames.d.ts +1 -1
  320. package/lib/components/Icon/iconNames.d.ts.map +1 -1
  321. package/lib/components/Icon/iconNames.js +2 -0
  322. package/lib/components/Icon/iconNames.js.map +1 -1
  323. package/lib/components/Icon/icons/calendar-now.icon.d.ts +5 -0
  324. package/lib/components/Icon/icons/calendar-now.icon.d.ts.map +1 -0
  325. package/lib/components/Icon/icons/calendar-now.icon.js +7 -0
  326. package/lib/components/Icon/icons/calendar-now.icon.js.map +1 -0
  327. package/lib/components/Icon/icons/preview.icon.d.ts +5 -0
  328. package/lib/components/Icon/icons/preview.icon.d.ts.map +1 -0
  329. package/lib/components/Icon/icons/preview.icon.js +7 -0
  330. package/lib/components/Icon/icons/preview.icon.js.map +1 -0
  331. package/lib/components/Icon/streamline-icons/arrow-down.icon.js +1 -1
  332. package/lib/components/Icon/streamline-icons/arrow-down.icon.js.map +1 -1
  333. package/lib/components/Icon/streamline-icons/arrow-left.icon.js +1 -1
  334. package/lib/components/Icon/streamline-icons/arrow-left.icon.js.map +1 -1
  335. package/lib/components/Icon/streamline-icons/arrow-micro-down.icon.js +1 -1
  336. package/lib/components/Icon/streamline-icons/arrow-micro-down.icon.js.map +1 -1
  337. package/lib/components/Icon/streamline-icons/arrow-micro-left.icon.js +1 -1
  338. package/lib/components/Icon/streamline-icons/arrow-micro-left.icon.js.map +1 -1
  339. package/lib/components/Icon/streamline-icons/arrow-micro-right.icon.js +1 -1
  340. package/lib/components/Icon/streamline-icons/arrow-micro-right.icon.js.map +1 -1
  341. package/lib/components/Icon/streamline-icons/arrow-micro-up.icon.js +1 -1
  342. package/lib/components/Icon/streamline-icons/arrow-micro-up.icon.js.map +1 -1
  343. package/lib/components/Icon/streamline-icons/arrow-right.icon.js +1 -1
  344. package/lib/components/Icon/streamline-icons/arrow-right.icon.js.map +1 -1
  345. package/lib/components/Icon/streamline-icons/arrow-up.icon.js +1 -1
  346. package/lib/components/Icon/streamline-icons/arrow-up.icon.js.map +1 -1
  347. package/lib/components/Icon/streamline-icons/calendar-now.icon.d.ts +5 -0
  348. package/lib/components/Icon/streamline-icons/calendar-now.icon.d.ts.map +1 -0
  349. package/lib/components/Icon/streamline-icons/calendar-now.icon.js +7 -0
  350. package/lib/components/Icon/streamline-icons/calendar-now.icon.js.map +1 -0
  351. package/lib/components/Icon/streamline-icons/caret-down.icon.js +1 -1
  352. package/lib/components/Icon/streamline-icons/caret-down.icon.js.map +1 -1
  353. package/lib/components/Icon/streamline-icons/caret-left.icon.js +1 -1
  354. package/lib/components/Icon/streamline-icons/caret-left.icon.js.map +1 -1
  355. package/lib/components/Icon/streamline-icons/caret-right.icon.js +1 -1
  356. package/lib/components/Icon/streamline-icons/caret-right.icon.js.map +1 -1
  357. package/lib/components/Icon/streamline-icons/caret-up.icon.js +1 -1
  358. package/lib/components/Icon/streamline-icons/caret-up.icon.js.map +1 -1
  359. package/lib/components/Icon/streamline-icons/case-solid.icon.d.ts +1 -1
  360. package/lib/components/Icon/streamline-icons/case-solid.icon.d.ts.map +1 -1
  361. package/lib/components/Icon/streamline-icons/case-solid.icon.js +2 -2
  362. package/lib/components/Icon/streamline-icons/case-solid.icon.js.map +1 -1
  363. package/lib/components/Icon/streamline-icons/clipboard-pencil-solid.icon.d.ts.map +1 -1
  364. package/lib/components/Icon/streamline-icons/clipboard-pencil-solid.icon.js +2 -2
  365. package/lib/components/Icon/streamline-icons/clipboard-pencil-solid.icon.js.map +1 -1
  366. package/lib/components/Icon/streamline-icons/clock-solid.icon.d.ts.map +1 -1
  367. package/lib/components/Icon/streamline-icons/clock-solid.icon.js +2 -2
  368. package/lib/components/Icon/streamline-icons/clock-solid.icon.js.map +1 -1
  369. package/lib/components/Icon/streamline-icons/disc-stack-solid.icon.d.ts.map +1 -1
  370. package/lib/components/Icon/streamline-icons/disc-stack-solid.icon.js +2 -2
  371. package/lib/components/Icon/streamline-icons/disc-stack-solid.icon.js.map +1 -1
  372. package/lib/components/Icon/streamline-icons/dock.icon.d.ts +5 -0
  373. package/lib/components/Icon/streamline-icons/dock.icon.d.ts.map +1 -0
  374. package/lib/components/Icon/streamline-icons/dock.icon.js +7 -0
  375. package/lib/components/Icon/streamline-icons/dock.icon.js.map +1 -0
  376. package/lib/components/Icon/streamline-icons/drag.icon.js +1 -1
  377. package/lib/components/Icon/streamline-icons/drag.icon.js.map +1 -1
  378. package/lib/components/Icon/streamline-icons/expression.icon.d.ts +5 -0
  379. package/lib/components/Icon/streamline-icons/expression.icon.d.ts.map +1 -0
  380. package/lib/components/Icon/streamline-icons/expression.icon.js +7 -0
  381. package/lib/components/Icon/streamline-icons/expression.icon.js.map +1 -0
  382. package/lib/components/Icon/streamline-icons/indent.icon.d.ts +5 -0
  383. package/lib/components/Icon/streamline-icons/indent.icon.d.ts.map +1 -0
  384. package/lib/components/Icon/streamline-icons/indent.icon.js +7 -0
  385. package/lib/components/Icon/streamline-icons/indent.icon.js.map +1 -0
  386. package/lib/components/Icon/streamline-icons/information-solid.icon.d.ts +5 -0
  387. package/lib/components/Icon/streamline-icons/information-solid.icon.d.ts.map +1 -0
  388. package/lib/components/Icon/streamline-icons/information-solid.icon.js +7 -0
  389. package/lib/components/Icon/streamline-icons/information-solid.icon.js.map +1 -0
  390. package/lib/components/Icon/streamline-icons/list-number.icon.d.ts +5 -0
  391. package/lib/components/Icon/streamline-icons/list-number.icon.d.ts.map +1 -0
  392. package/lib/components/Icon/streamline-icons/list-number.icon.js +7 -0
  393. package/lib/components/Icon/streamline-icons/list-number.icon.js.map +1 -0
  394. package/lib/components/Icon/streamline-icons/micro-arrow-down.icon.d.ts +5 -0
  395. package/lib/components/Icon/streamline-icons/micro-arrow-down.icon.d.ts.map +1 -0
  396. package/lib/components/Icon/streamline-icons/micro-arrow-down.icon.js +7 -0
  397. package/lib/components/Icon/streamline-icons/micro-arrow-down.icon.js.map +1 -0
  398. package/lib/components/Icon/streamline-icons/micro-arrow-left.icon.d.ts +5 -0
  399. package/lib/components/Icon/streamline-icons/micro-arrow-left.icon.d.ts.map +1 -0
  400. package/lib/components/Icon/streamline-icons/micro-arrow-left.icon.js +7 -0
  401. package/lib/components/Icon/streamline-icons/micro-arrow-left.icon.js.map +1 -0
  402. package/lib/components/Icon/streamline-icons/micro-arrow-right.icon.d.ts +5 -0
  403. package/lib/components/Icon/streamline-icons/micro-arrow-right.icon.d.ts.map +1 -0
  404. package/lib/components/Icon/streamline-icons/micro-arrow-right.icon.js +7 -0
  405. package/lib/components/Icon/streamline-icons/micro-arrow-right.icon.js.map +1 -0
  406. package/lib/components/Icon/streamline-icons/micro-arrow-up.icon.d.ts +5 -0
  407. package/lib/components/Icon/streamline-icons/micro-arrow-up.icon.d.ts.map +1 -0
  408. package/lib/components/Icon/streamline-icons/micro-arrow-up.icon.js +7 -0
  409. package/lib/components/Icon/streamline-icons/micro-arrow-up.icon.js.map +1 -0
  410. package/lib/components/Icon/streamline-icons/minus.icon.d.ts.map +1 -1
  411. package/lib/components/Icon/streamline-icons/minus.icon.js +1 -1
  412. package/lib/components/Icon/streamline-icons/minus.icon.js.map +1 -1
  413. package/lib/components/Icon/streamline-icons/open.icon.js +1 -1
  414. package/lib/components/Icon/streamline-icons/open.icon.js.map +1 -1
  415. package/lib/components/Icon/streamline-icons/plus.icon.d.ts.map +1 -1
  416. package/lib/components/Icon/streamline-icons/plus.icon.js +1 -1
  417. package/lib/components/Icon/streamline-icons/plus.icon.js.map +1 -1
  418. package/lib/components/Icon/streamline-icons/rule-library-solid.icon.d.ts.map +1 -1
  419. package/lib/components/Icon/streamline-icons/rule-library-solid.icon.js +2 -2
  420. package/lib/components/Icon/streamline-icons/rule-library-solid.icon.js.map +1 -1
  421. package/lib/components/Icon/streamline-icons/search-analytics-solid.icon.d.ts.map +1 -1
  422. package/lib/components/Icon/streamline-icons/search-analytics-solid.icon.js +2 -2
  423. package/lib/components/Icon/streamline-icons/search-analytics-solid.icon.js.map +1 -1
  424. package/lib/components/Icon/streamline-icons/times.icon.d.ts.map +1 -1
  425. package/lib/components/Icon/streamline-icons/times.icon.js +1 -1
  426. package/lib/components/Icon/streamline-icons/times.icon.js.map +1 -1
  427. package/lib/components/Icon/streamline-icons/undock.icon.d.ts +5 -0
  428. package/lib/components/Icon/streamline-icons/undock.icon.d.ts.map +1 -0
  429. package/lib/components/Icon/streamline-icons/undock.icon.js +7 -0
  430. package/lib/components/Icon/streamline-icons/undock.icon.js.map +1 -0
  431. package/lib/components/Icon/streamline-icons/unindent.icon.d.ts +5 -0
  432. package/lib/components/Icon/streamline-icons/unindent.icon.d.ts.map +1 -0
  433. package/lib/components/Icon/streamline-icons/unindent.icon.js +7 -0
  434. package/lib/components/Icon/streamline-icons/unindent.icon.js.map +1 -0
  435. package/lib/components/Icon/streamline-icons/warn-solid.icon.d.ts.map +1 -1
  436. package/lib/components/Icon/streamline-icons/warn-solid.icon.js +2 -2
  437. package/lib/components/Icon/streamline-icons/warn-solid.icon.js.map +1 -1
  438. package/lib/components/Icon/streamlineIconNames.d.ts +1 -1
  439. package/lib/components/Icon/streamlineIconNames.d.ts.map +1 -1
  440. package/lib/components/Icon/streamlineIconNames.js +12 -0
  441. package/lib/components/Icon/streamlineIconNames.js.map +1 -1
  442. package/lib/components/IconPicker/IconPicker.d.ts +7 -1
  443. package/lib/components/IconPicker/IconPicker.d.ts.map +1 -1
  444. package/lib/components/IconPicker/IconPicker.js +20 -14
  445. package/lib/components/IconPicker/IconPicker.js.map +1 -1
  446. package/lib/components/Input/Input.d.ts +5 -8
  447. package/lib/components/Input/Input.d.ts.map +1 -1
  448. package/lib/components/Input/Input.js +2 -3
  449. package/lib/components/Input/Input.js.map +1 -1
  450. package/lib/components/Input/Input.test-ids.d.ts +1 -1
  451. package/lib/components/Input/Input.test-ids.d.ts.map +1 -1
  452. package/lib/components/Label/Label.js +2 -2
  453. package/lib/components/Label/Label.js.map +1 -1
  454. package/lib/components/Lightbox/Lightbox.d.ts +1 -1
  455. package/lib/components/Lightbox/Lightbox.d.ts.map +1 -1
  456. package/lib/components/Lightbox/Lightbox.js +21 -12
  457. package/lib/components/Lightbox/Lightbox.js.map +1 -1
  458. package/lib/components/Lightbox/Lightbox.styles.d.ts +1 -1
  459. package/lib/components/Lightbox/Lightbox.test-ids.d.ts +1 -1
  460. package/lib/components/Lightbox/Lightbox.test-ids.d.ts.map +1 -1
  461. package/lib/components/Lightbox/Lightbox.types.d.ts +1 -1
  462. package/lib/components/Lightbox/Lightbox.types.d.ts.map +1 -1
  463. package/lib/components/Lightbox/Lightbox.types.js.map +1 -1
  464. package/lib/components/Link/Link.d.ts +5 -2
  465. package/lib/components/Link/Link.d.ts.map +1 -1
  466. package/lib/components/Link/Link.js +28 -16
  467. package/lib/components/Link/Link.js.map +1 -1
  468. package/lib/components/Link/Link.test-ids.d.ts +1 -1
  469. package/lib/components/Link/Link.test-ids.d.ts.map +1 -1
  470. package/lib/components/ListToolbar/ListToolbar.d.ts +1 -1
  471. package/lib/components/ListToolbar/ListToolbar.d.ts.map +1 -1
  472. package/lib/components/ListToolbar/ListToolbar.js +9 -8
  473. package/lib/components/ListToolbar/ListToolbar.js.map +1 -1
  474. package/lib/components/ListToolbar/ListToolbar.styles.d.ts.map +1 -1
  475. package/lib/components/ListToolbar/ListToolbar.styles.js +6 -9
  476. package/lib/components/ListToolbar/ListToolbar.styles.js.map +1 -1
  477. package/lib/components/ListToolbar/ListToolbar.test-ids.d.ts +1 -1
  478. package/lib/components/ListToolbar/ListToolbar.test-ids.d.ts.map +1 -1
  479. package/lib/components/ListToolbar/ListToolbar.test-ids.js +4 -1
  480. package/lib/components/ListToolbar/ListToolbar.test-ids.js.map +1 -1
  481. package/lib/components/ListToolbar/ListToolbar.types.d.ts +7 -3
  482. package/lib/components/ListToolbar/ListToolbar.types.d.ts.map +1 -1
  483. package/lib/components/ListToolbar/ListToolbar.types.js.map +1 -1
  484. package/lib/components/ListToolbar/PresetMenuPopover.d.ts.map +1 -1
  485. package/lib/components/ListToolbar/PresetMenuPopover.js +2 -2
  486. package/lib/components/ListToolbar/PresetMenuPopover.js.map +1 -1
  487. package/lib/components/ListToolbar/helpers.d.ts.map +1 -1
  488. package/lib/components/ListToolbar/helpers.js.map +1 -1
  489. package/lib/components/Location/CurrentLocationButton.d.ts +1 -6
  490. package/lib/components/Location/CurrentLocationButton.d.ts.map +1 -1
  491. package/lib/components/Location/CurrentLocationButton.js +10 -20
  492. package/lib/components/Location/CurrentLocationButton.js.map +1 -1
  493. package/lib/components/Location/Location.test-ids.d.ts +1 -1
  494. package/lib/components/Location/Location.test-ids.d.ts.map +1 -1
  495. package/lib/components/Location/Location.types.d.ts +49 -17
  496. package/lib/components/Location/Location.types.d.ts.map +1 -1
  497. package/lib/components/Location/Location.types.js +9 -1
  498. package/lib/components/Location/Location.types.js.map +1 -1
  499. package/lib/components/Location/LocationDisplay.d.ts +5 -4
  500. package/lib/components/Location/LocationDisplay.d.ts.map +1 -1
  501. package/lib/components/Location/LocationDisplay.js +17 -4
  502. package/lib/components/Location/LocationDisplay.js.map +1 -1
  503. package/lib/components/Location/LocationInput.d.ts +23 -18
  504. package/lib/components/Location/LocationInput.d.ts.map +1 -1
  505. package/lib/components/Location/LocationInput.js +37 -15
  506. package/lib/components/Location/LocationInput.js.map +1 -1
  507. package/lib/components/Location/LocationView.d.ts +26 -12
  508. package/lib/components/Location/LocationView.d.ts.map +1 -1
  509. package/lib/components/Location/LocationView.js +103 -50
  510. package/lib/components/Location/LocationView.js.map +1 -1
  511. package/lib/components/Location/index.d.ts +2 -2
  512. package/lib/components/Location/index.d.ts.map +1 -1
  513. package/lib/components/Location/index.js +1 -1
  514. package/lib/components/Location/index.js.map +1 -1
  515. package/lib/components/Location/utils.d.ts +20 -2
  516. package/lib/components/Location/utils.d.ts.map +1 -1
  517. package/lib/components/Location/utils.js +184 -41
  518. package/lib/components/Location/utils.js.map +1 -1
  519. package/lib/components/Menu/Menu.context.d.ts.map +1 -1
  520. package/lib/components/Menu/Menu.context.js +1 -0
  521. package/lib/components/Menu/Menu.context.js.map +1 -1
  522. package/lib/components/Menu/Menu.d.ts +1 -1
  523. package/lib/components/Menu/Menu.d.ts.map +1 -1
  524. package/lib/components/Menu/Menu.js +6 -2
  525. package/lib/components/Menu/Menu.js.map +1 -1
  526. package/lib/components/Menu/Menu.styles.d.ts +0 -1
  527. package/lib/components/Menu/Menu.styles.d.ts.map +1 -1
  528. package/lib/components/Menu/Menu.styles.js +5 -12
  529. package/lib/components/Menu/Menu.styles.js.map +1 -1
  530. package/lib/components/Menu/Menu.test-ids.d.ts +2 -2
  531. package/lib/components/Menu/Menu.test-ids.d.ts.map +1 -1
  532. package/lib/components/Menu/Menu.types.d.ts +14 -2
  533. package/lib/components/Menu/Menu.types.d.ts.map +1 -1
  534. package/lib/components/Menu/Menu.types.js.map +1 -1
  535. package/lib/components/Menu/Menu.utils.d.ts +4 -0
  536. package/lib/components/Menu/Menu.utils.d.ts.map +1 -0
  537. package/lib/components/Menu/Menu.utils.js +6 -0
  538. package/lib/components/Menu/Menu.utils.js.map +1 -0
  539. package/lib/components/Menu/MenuGroup.js +2 -2
  540. package/lib/components/Menu/MenuGroup.js.map +1 -1
  541. package/lib/components/Menu/MenuItem.d.ts +1 -1
  542. package/lib/components/Menu/MenuItem.d.ts.map +1 -1
  543. package/lib/components/Menu/MenuItem.js +3 -3
  544. package/lib/components/Menu/MenuItem.js.map +1 -1
  545. package/lib/components/Menu/MenuList.d.ts.map +1 -1
  546. package/lib/components/Menu/MenuList.js +3 -3
  547. package/lib/components/Menu/MenuList.js.map +1 -1
  548. package/lib/components/Menu/NavItemsList.d.ts.map +1 -1
  549. package/lib/components/Menu/NavItemsList.js +1 -3
  550. package/lib/components/Menu/NavItemsList.js.map +1 -1
  551. package/lib/components/Menu/index.d.ts +1 -0
  552. package/lib/components/Menu/index.d.ts.map +1 -1
  553. package/lib/components/Menu/index.js +1 -0
  554. package/lib/components/Menu/index.js.map +1 -1
  555. package/lib/components/MenuButton/MenuButton.d.ts +8 -1
  556. package/lib/components/MenuButton/MenuButton.d.ts.map +1 -1
  557. package/lib/components/MenuButton/MenuButton.js +15 -5
  558. package/lib/components/MenuButton/MenuButton.js.map +1 -1
  559. package/lib/components/MenuButton/MenuButton.test-ids.d.ts +1 -1
  560. package/lib/components/MenuButton/MenuButton.test-ids.d.ts.map +1 -1
  561. package/lib/components/MetaList/MetaList.d.ts +1 -1
  562. package/lib/components/MetaList/MetaList.test-ids.d.ts +1 -1
  563. package/lib/components/MetaList/MetaList.test-ids.d.ts.map +1 -1
  564. package/lib/components/Modal/Modal.d.ts.map +1 -1
  565. package/lib/components/Modal/Modal.js +10 -3
  566. package/lib/components/Modal/Modal.js.map +1 -1
  567. package/lib/components/Modal/Modal.styles.d.ts.map +1 -1
  568. package/lib/components/Modal/Modal.styles.js +24 -3
  569. package/lib/components/Modal/Modal.styles.js.map +1 -1
  570. package/lib/components/Modal/ModalManager.d.ts.map +1 -1
  571. package/lib/components/Modal/ModalManager.js +5 -1
  572. package/lib/components/Modal/ModalManager.js.map +1 -1
  573. package/lib/components/Number/Number.test-ids.d.ts +2 -2
  574. package/lib/components/Number/Number.test-ids.d.ts.map +1 -1
  575. package/lib/components/Number/NumberInput.d.ts +1 -1
  576. package/lib/components/Number/NumberInput.d.ts.map +1 -1
  577. package/lib/components/Number/NumberInput.js +11 -3
  578. package/lib/components/Number/NumberInput.js.map +1 -1
  579. package/lib/components/Number/NumberRangeInput.d.ts +1 -1
  580. package/lib/components/Number/NumberRangeInput.d.ts.map +1 -1
  581. package/lib/components/Number/NumberRangeInput.js +5 -69
  582. package/lib/components/Number/NumberRangeInput.js.map +1 -1
  583. package/lib/components/PageTemplates/CategorySubPage.styles.d.ts +3 -1
  584. package/lib/components/PageTemplates/CategorySubPage.styles.d.ts.map +1 -1
  585. package/lib/components/PageTemplates/CategorySubPage.styles.js +3 -2
  586. package/lib/components/PageTemplates/CategorySubPage.styles.js.map +1 -1
  587. package/lib/components/PageTemplates/DashboardPage.d.ts.map +1 -1
  588. package/lib/components/PageTemplates/DashboardPage.js +41 -6
  589. package/lib/components/PageTemplates/DashboardPage.js.map +1 -1
  590. package/lib/components/PageTemplates/PageTemplates.d.ts +1 -0
  591. package/lib/components/PageTemplates/PageTemplates.d.ts.map +1 -1
  592. package/lib/components/PageTemplates/PageTemplates.js +84 -31
  593. package/lib/components/PageTemplates/PageTemplates.js.map +1 -1
  594. package/lib/components/Phone/Phone.test-ids.d.ts +1 -1
  595. package/lib/components/Phone/Phone.test-ids.d.ts.map +1 -1
  596. package/lib/components/Phone/PhoneDisplay.d.ts.map +1 -1
  597. package/lib/components/Phone/PhoneDisplay.js +2 -2
  598. package/lib/components/Phone/PhoneDisplay.js.map +1 -1
  599. package/lib/components/Phone/PhoneInput.d.ts +1 -1
  600. package/lib/components/Phone/PhoneInput.d.ts.map +1 -1
  601. package/lib/components/Phone/PhoneInput.js +8 -3
  602. package/lib/components/Phone/PhoneInput.js.map +1 -1
  603. package/lib/components/Popover/Popover.d.ts +2 -0
  604. package/lib/components/Popover/Popover.d.ts.map +1 -1
  605. package/lib/components/Popover/Popover.js +20 -3
  606. package/lib/components/Popover/Popover.js.map +1 -1
  607. package/lib/components/Popover/Popover.styles.d.ts.map +1 -1
  608. package/lib/components/Popover/Popover.styles.js +2 -2
  609. package/lib/components/Popover/Popover.styles.js.map +1 -1
  610. package/lib/components/Popover/modifiers.d.ts.map +1 -1
  611. package/lib/components/Popover/modifiers.js +11 -5
  612. package/lib/components/Popover/modifiers.js.map +1 -1
  613. package/lib/components/Progress/Progress.d.ts.map +1 -1
  614. package/lib/components/Progress/Progress.js +2 -2
  615. package/lib/components/Progress/Progress.js.map +1 -1
  616. package/lib/components/Progress/Progress.styles.d.ts +1 -1
  617. package/lib/components/Progress/Progress.styles.d.ts.map +1 -1
  618. package/lib/components/Progress/Progress.styles.js +9 -9
  619. package/lib/components/Progress/Progress.styles.js.map +1 -1
  620. package/lib/components/Progress/Progress.types.d.ts +4 -0
  621. package/lib/components/Progress/Progress.types.d.ts.map +1 -1
  622. package/lib/components/Progress/Progress.types.js.map +1 -1
  623. package/lib/components/RadioCheck/RadioCheck.d.ts +6 -30
  624. package/lib/components/RadioCheck/RadioCheck.d.ts.map +1 -1
  625. package/lib/components/RadioCheck/RadioCheck.js +3 -4
  626. package/lib/components/RadioCheck/RadioCheck.js.map +1 -1
  627. package/lib/components/SearchInput/SearchInput.d.ts +19 -6
  628. package/lib/components/SearchInput/SearchInput.d.ts.map +1 -1
  629. package/lib/components/SearchInput/SearchInput.js +5 -1
  630. package/lib/components/SearchInput/SearchInput.js.map +1 -1
  631. package/lib/components/SearchInput/SearchInput.styles.d.ts +3 -3
  632. package/lib/components/SearchInput/SearchInput.styles.d.ts.map +1 -1
  633. package/lib/components/SearchInput/SearchInput.styles.js +15 -15
  634. package/lib/components/SearchInput/SearchInput.styles.js.map +1 -1
  635. package/lib/components/Select/Select.d.ts +1 -1
  636. package/lib/components/Select/Select.test-ids.d.ts +1 -1
  637. package/lib/components/Select/Select.test-ids.d.ts.map +1 -1
  638. package/lib/components/Slider/Slider.d.ts +1 -1
  639. package/lib/components/Slider/Slider.test-ids.d.ts +1 -1
  640. package/lib/components/Slider/Slider.test-ids.d.ts.map +1 -1
  641. package/lib/components/SummaryItem/SummaryItem.d.ts +6 -1
  642. package/lib/components/SummaryItem/SummaryItem.d.ts.map +1 -1
  643. package/lib/components/SummaryItem/SummaryItem.js +13 -5
  644. package/lib/components/SummaryItem/SummaryItem.js.map +1 -1
  645. package/lib/components/SummaryItem/SummaryItem.test-ids.d.ts +1 -1
  646. package/lib/components/SummaryItem/SummaryItem.test-ids.d.ts.map +1 -1
  647. package/lib/components/SummaryList/SummaryList.d.ts.map +1 -1
  648. package/lib/components/SummaryList/SummaryList.js +9 -9
  649. package/lib/components/SummaryList/SummaryList.js.map +1 -1
  650. package/lib/components/Switch/Switch.js +2 -2
  651. package/lib/components/Switch/Switch.js.map +1 -1
  652. package/lib/components/Tabs/Tab.d.ts +7 -3
  653. package/lib/components/Tabs/Tab.d.ts.map +1 -1
  654. package/lib/components/Tabs/Tab.js +83 -23
  655. package/lib/components/Tabs/Tab.js.map +1 -1
  656. package/lib/components/Tabs/TabPanel.d.ts +13 -2
  657. package/lib/components/Tabs/TabPanel.d.ts.map +1 -1
  658. package/lib/components/Tabs/TabPanel.js +60 -5
  659. package/lib/components/Tabs/TabPanel.js.map +1 -1
  660. package/lib/components/Tabs/Tabs.d.ts +0 -1
  661. package/lib/components/Tabs/Tabs.d.ts.map +1 -1
  662. package/lib/components/Tabs/Tabs.js +97 -35
  663. package/lib/components/Tabs/Tabs.js.map +1 -1
  664. package/lib/components/Tabs/Tabs.styles.d.ts +17 -0
  665. package/lib/components/Tabs/Tabs.styles.d.ts.map +1 -0
  666. package/lib/components/Tabs/Tabs.styles.js +110 -0
  667. package/lib/components/Tabs/Tabs.styles.js.map +1 -0
  668. package/lib/components/Tabs/TabsContext.d.ts +6 -0
  669. package/lib/components/Tabs/TabsContext.d.ts.map +1 -0
  670. package/lib/components/Tabs/TabsContext.js +6 -0
  671. package/lib/components/Tabs/TabsContext.js.map +1 -0
  672. package/lib/components/Tabs/index.d.ts +1 -0
  673. package/lib/components/Tabs/index.d.ts.map +1 -1
  674. package/lib/components/Tabs/index.js +1 -0
  675. package/lib/components/Tabs/index.js.map +1 -1
  676. package/lib/components/Text/Text.js +1 -1
  677. package/lib/components/Text/Text.js.map +1 -1
  678. package/lib/components/TextArea/TextArea.d.ts +1 -1
  679. package/lib/components/TextArea/TextArea.test-ids.d.ts +1 -1
  680. package/lib/components/TextArea/TextArea.test-ids.d.ts.map +1 -1
  681. package/lib/components/Toaster/Toaster.d.ts +1 -1
  682. package/lib/components/Toaster/Toaster.d.ts.map +1 -1
  683. package/lib/components/Toaster/Toaster.js +88 -19
  684. package/lib/components/Toaster/Toaster.js.map +1 -1
  685. package/lib/components/Toaster/Toaster.test-ids.d.ts +1 -1
  686. package/lib/components/Toaster/Toaster.test-ids.d.ts.map +1 -1
  687. package/lib/components/Toaster/Toaster.types.d.ts +17 -4
  688. package/lib/components/Toaster/Toaster.types.d.ts.map +1 -1
  689. package/lib/components/Toaster/Toaster.types.js.map +1 -1
  690. package/lib/components/Tooltip/Tooltip.d.ts +3 -3
  691. package/lib/components/Tooltip/Tooltip.d.ts.map +1 -1
  692. package/lib/components/Tooltip/Tooltip.js +19 -4
  693. package/lib/components/Tooltip/Tooltip.js.map +1 -1
  694. package/lib/components/Tooltip/Tooltip.test-ids.d.ts +1 -1
  695. package/lib/components/Tooltip/Tooltip.test-ids.d.ts.map +1 -1
  696. package/lib/components/Tree/StandardTree.styles.d.ts +1 -1
  697. package/lib/components/Tree/Tree.d.ts +1 -1
  698. package/lib/components/Tree/Tree.test-ids.d.ts +2 -2
  699. package/lib/components/Tree/Tree.test-ids.d.ts.map +1 -1
  700. package/lib/hooks/index.d.ts +1 -0
  701. package/lib/hooks/index.d.ts.map +1 -1
  702. package/lib/hooks/index.js +1 -0
  703. package/lib/hooks/index.js.map +1 -1
  704. package/lib/hooks/useArrows.d.ts.map +1 -1
  705. package/lib/hooks/useArrows.js +3 -1
  706. package/lib/hooks/useArrows.js.map +1 -1
  707. package/lib/hooks/useEvent.d.ts +5 -0
  708. package/lib/hooks/useEvent.d.ts.map +1 -1
  709. package/lib/hooks/useEvent.js.map +1 -1
  710. package/lib/hooks/useFocusWithin.d.ts.map +1 -1
  711. package/lib/hooks/useFocusWithin.js +14 -8
  712. package/lib/hooks/useFocusWithin.js.map +1 -1
  713. package/lib/hooks/useI18n.d.ts +146 -3
  714. package/lib/hooks/useI18n.d.ts.map +1 -1
  715. package/lib/hooks/useScrollStick.d.ts +3 -3
  716. package/lib/hooks/useScrollStick.d.ts.map +1 -1
  717. package/lib/hooks/useScrollStick.js +6 -5
  718. package/lib/hooks/useScrollStick.js.map +1 -1
  719. package/lib/hooks/useScrollToggle.d.ts.map +1 -1
  720. package/lib/hooks/useScrollToggle.js +1 -0
  721. package/lib/hooks/useScrollToggle.js.map +1 -1
  722. package/lib/hooks/useSimpleStoreInstance.d.ts +9 -0
  723. package/lib/hooks/useSimpleStoreInstance.d.ts.map +1 -0
  724. package/lib/hooks/useSimpleStoreInstance.js +13 -0
  725. package/lib/hooks/useSimpleStoreInstance.js.map +1 -0
  726. package/lib/hooks/useTestIds.d.ts +1 -1
  727. package/lib/hooks/useTestIds.d.ts.map +1 -1
  728. package/lib/hooks/useTestIds.js +1 -1
  729. package/lib/hooks/useTestIds.js.map +1 -1
  730. package/lib/i18n/default.d.ts +146 -3
  731. package/lib/i18n/default.d.ts.map +1 -1
  732. package/lib/i18n/default.js +169 -11
  733. package/lib/i18n/default.js.map +1 -1
  734. package/lib/i18n/i18n.d.ts +146 -3
  735. package/lib/i18n/i18n.d.ts.map +1 -1
  736. package/lib/index.d.ts +2 -0
  737. package/lib/index.d.ts.map +1 -1
  738. package/lib/index.js +2 -0
  739. package/lib/index.js.map +1 -1
  740. package/lib/styles/GlobalStyle.d.ts +1 -1
  741. package/lib/styles/GlobalStyle.d.ts.map +1 -1
  742. package/lib/styles/GlobalStyle.js +6 -1
  743. package/lib/styles/GlobalStyle.js.map +1 -1
  744. package/lib/styles/mixins.d.ts +3 -0
  745. package/lib/styles/mixins.d.ts.map +1 -0
  746. package/lib/styles/mixins.js +14 -0
  747. package/lib/styles/mixins.js.map +1 -0
  748. package/lib/styles/utils.d.ts +11 -5
  749. package/lib/styles/utils.d.ts.map +1 -1
  750. package/lib/styles/utils.js +28 -12
  751. package/lib/styles/utils.js.map +1 -1
  752. package/lib/theme/ThemeMachine.d.ts.map +1 -1
  753. package/lib/theme/ThemeMachine.js.map +1 -1
  754. package/lib/theme/theme.d.ts +18 -0
  755. package/lib/theme/theme.d.ts.map +1 -1
  756. package/lib/theme/themeDefinition.json +9 -2
  757. package/lib/theme/themeOverrides.schema.json +13 -0
  758. package/lib/types/types.d.ts +4 -2
  759. package/lib/types/types.d.ts.map +1 -1
  760. package/lib/types/types.js.map +1 -1
  761. package/lib/utils/formatListToLocaleString.d.ts.map +1 -1
  762. package/lib/utils/formatListToLocaleString.js +5 -2
  763. package/lib/utils/formatListToLocaleString.js.map +1 -1
  764. package/lib/utils/index.d.ts +1 -0
  765. package/lib/utils/index.d.ts.map +1 -1
  766. package/lib/utils/index.js +1 -0
  767. package/lib/utils/index.js.map +1 -1
  768. package/lib/utils/isPositionWithinRect.d.ts +12 -0
  769. package/lib/utils/isPositionWithinRect.d.ts.map +1 -0
  770. package/lib/utils/isPositionWithinRect.js +11 -0
  771. package/lib/utils/isPositionWithinRect.js.map +1 -0
  772. package/lib/utils/withTestIds.d.ts +1 -1
  773. package/package.json +9 -6
  774. package/lib/components/Location/types.d.ts +0 -45
  775. package/lib/components/Location/types.d.ts.map +0 -1
  776. package/lib/components/Location/types.js +0 -10
  777. package/lib/components/Location/types.js.map +0 -1
@@ -13,7 +13,7 @@ import { FormDialog } from '../Dialog';
13
13
  import { StyledCompositeInput, StyledInputButton, StyledInputContainer } from './CompositeInput.styles';
14
14
  import { getCompositeInputTestIds } from './CompositeInput.test-ids';
15
15
  registerIcon(caretDownIcon, timesIcon);
16
- const CompositeInput = forwardRef(function CompositeInput(props, ref) {
16
+ export default withTestIds(forwardRef(function CompositeInput(props, ref) {
17
17
  const uid = useUID();
18
18
  const { testId, id = uid, disabled, value, onClear, required, status, info, label, labelHidden, additionalInfo, dialog: { renderer: Renderer, rendererProps, onApply, onCancel }, ...restProps } = props;
19
19
  const testIds = useTestIds(testId, getCompositeInputTestIds);
@@ -53,6 +53,5 @@ const CompositeInput = forwardRef(function CompositeInput(props, ref) {
53
53
  handler: () => onApply({ close: closePopover })
54
54
  }, children: _jsx(Flex, { container: { direction: 'column' }, ref: formContentRef, children: _jsx(Renderer, { ...rendererProps }) }) }))] }));
55
55
  return label ? (_jsx(FormField, { testId: testIds, label: label, labelHidden: labelHidden, id: id, info: info, status: status, required: required, disabled: disabled, labelId: labelId, additionalInfo: additionalInfo, children: Comp })) : (Comp);
56
- });
57
- export default withTestIds(CompositeInput, getCompositeInputTestIds);
56
+ }), getCompositeInputTestIds);
58
57
  //# sourceMappingURL=CompositeInput.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Comp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AAC,CACF,KAAC,IAAI,IAAC,IAAI,EAAC,YAAY,GAAG,CAC3B,GACI,IACF,EAEN,IAAI,IAAI,YAAY,CAAC,OAAO,IAAI,CAC/B,KAAC,UAAU,IACT,KAAK,EAAE,KAAK;gBACZ,wEAAwE;gBACxE,SAAS,EAAE,KAAe,EAC1B,GAAG,EAAE,YAAY,EACjB,MAAM,EAAE,YAAY,CAAC,OAAO,EAC5B,SAAS,EAAC,cAAc,EACxB,QAAQ,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,EACjD,QAAQ,EAAE;oBACR,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC;oBAChB,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC;iBAChD,YAED,KAAC,IAAI,IAAC,SAAS,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,GAAG,EAAE,cAAc,YAC3D,KAAC,QAAQ,OAAK,aAAa,GAAI,GAC1B,GACI,CACd,IACI,CACR,CAAC;IAEF,OAAO,KAAK,CAAC,CAAC,CAAC,CACb,KAAC,SAAS,IACR,MAAM,EAAE,OAAO,EACf,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,EAAE,EAAE,EAAE,EACN,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,cAAc,EAAE,cAAc,YAE7B,IAAI,GACK,CACb,CAAC,CAAC,CAAC,CACF,IAAI,CACL,CAAC;AACJ,CAAC,CAA2F,CAAC;AAE7F,eAAe,WAAW,CAAC,cAAc,EAAE,wBAAwB,CAAC,CAAC","sourcesContent":["import { forwardRef, useEffect, useRef, useState } from 'react';\nimport type { PropsWithoutRef } from 'react';\n\nimport Icon, { registerIcon } from '../Icon';\nimport * as caretDownIcon from '../Icon/icons/caret-down.icon';\nimport * as timesIcon from '../Icon/icons/times.icon';\nimport type { ForwardProps } from '../../types';\nimport {\n useConsolidatedRef,\n useElement,\n useI18n,\n useOuterEvent,\n useTestIds,\n useUID\n} from '../../hooks';\nimport { StyledFormControl } from '../FormControl';\nimport { getFocusables, withTestIds } from '../../utils';\nimport Flex from '../Flex';\nimport Button from '../Button';\nimport FormField from '../FormField';\nimport { FormDialog } from '../Dialog';\n\nimport {\n StyledCompositeInput,\n StyledInputButton,\n StyledInputContainer\n} from './CompositeInput.styles';\nimport type { CompositeInputProps } from './CompositeInput.types';\nimport { getCompositeInputTestIds } from './CompositeInput.test-ids';\n\nregisterIcon(caretDownIcon, timesIcon);\n\nconst CompositeInput = forwardRef(function CompositeInput(\n props: PropsWithoutRef<CompositeInputProps>,\n ref: CompositeInputProps['ref']\n) {\n const uid = useUID();\n const {\n testId,\n id = uid,\n disabled,\n value,\n onClear,\n required,\n status,\n info,\n label,\n labelHidden,\n additionalInfo,\n dialog: { renderer: Renderer, rendererProps, onApply, onCancel },\n ...restProps\n } = props;\n\n const testIds = useTestIds(testId, getCompositeInputTestIds);\n const t = useI18n();\n\n const [open, setOpen] = useState(false);\n\n const [popoverEl, setPopoverEl] = useElement<HTMLElement>(null);\n const containerRef = useConsolidatedRef<HTMLDivElement>(ref);\n const buttonRef = useRef<HTMLInputElement>(null);\n const formContentRef = useRef<HTMLElement>(null);\n\n const closePopover = () => {\n setOpen(false);\n buttonRef.current?.focus();\n };\n\n useOuterEvent('mousedown', [popoverEl, buttonRef], () => {\n if (open) onCancel({ close: closePopover });\n });\n\n useEffect(() => {\n if (open) {\n getFocusables(formContentRef)[0]?.focus();\n }\n }, [open, formContentRef.current]);\n\n const labelId = `${id}-label`;\n\n const Comp = (\n <Flex\n as={StyledCompositeInput}\n forwardedAs={StyledFormControl}\n container={{ alignItems: 'center' }}\n status={status}\n disabled={disabled}\n ref={containerRef}\n >\n <Flex container={{ alignItems: 'center' }} item={{ grow: 1 }} as={StyledInputContainer}>\n <StyledInputButton\n data-testid={testIds.control}\n {...restProps}\n id={id}\n disabled={disabled}\n aria-haspopup='dialog'\n aria-expanded={!disabled && open}\n aria-describedby={info ? `${id}-info` : undefined}\n readOnly\n required={required}\n onClick={() => {\n if (!disabled) {\n setOpen(true);\n }\n }}\n onKeyDown={e => {\n if (e.key === 'Enter') {\n e.preventDefault();\n setOpen(true);\n }\n }}\n value={value ?? ''}\n ref={buttonRef}\n />\n <Flex\n container={{ justify: 'center', alignItems: 'center' }}\n style={{ pointerEvents: value ? '' : 'none' }}\n >\n {value && !open ? (\n <Button icon compact variant='simple' label={t('clear')} onClick={onClear}>\n <Icon name='times' />\n </Button>\n ) : (\n <Icon name='caret-down' />\n )}\n </Flex>\n </Flex>\n\n {open && containerRef.current && (\n <FormDialog\n arrow={false}\n // FIXME: The wrath of optional labels, as a ReactNode, strikes again...\n ariaLabel={label as string}\n ref={setPopoverEl}\n target={containerRef.current}\n placement='bottom-start'\n onCancel={() => onCancel({ close: closePopover })}\n onSubmit={{\n text: t('apply'),\n handler: () => onApply({ close: closePopover })\n }}\n >\n <Flex container={{ direction: 'column' }} ref={formContentRef}>\n <Renderer {...rendererProps} />\n </Flex>\n </FormDialog>\n )}\n </Flex>\n );\n\n return label ? (\n <FormField\n testId={testIds}\n label={label}\n labelHidden={labelHidden}\n id={id}\n info={info}\n status={status}\n required={required}\n disabled={disabled}\n labelId={labelId}\n additionalInfo={additionalInfo}\n >\n {Comp}\n </FormField>\n ) : (\n Comp\n );\n}) as <P extends object>(props: CompositeInputProps<P> & ForwardProps) => JSX.Element | null;\n\nexport default withTestIds(CompositeInput, getCompositeInputTestIds);\n"]}
1
+ {"version":3,"file":"CompositeInput.js","sourceRoot":"","sources":["../../../src/components/CompositeInput/CompositeInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGhE,OAAO,IAAI,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S,EAAE,KAAe,EAC1B,GAAG,EAAE,YAAY,EACjB,MAAM,EAAE,YAAY,CAAC,OAAO,EAC5B,SAAS,EAAC,cAAc,EACxB,QAAQ,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,EACjD,QAAQ,EAAE;oBACR,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC;oBAChB,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC;iBAChD,YAED,KAAC,IAAI,IAAC,SAAS,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,GAAG,EAAE,cAAc,YAC3D,KAAC,QAAQ,OAAK,aAAa,GAAI,GAC1B,GACI,CACd,IACI,CACR,CAAC;IAEF,OAAO,KAAK,CAAC,CAAC,CAAC,CACb,KAAC,SAAS,IACR,MAAM,EAAE,OAAO,EACf,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,EAAE,EAAE,EAAE,EACN,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,cAAc,EAAE,cAAc,YAE7B,IAAI,GACK,CACb,CAAC,CAAC,CAAC,CACF,IAAI,CACL,CAAC;AACJ,CAAC,CACyE,EAC5E,wBAAwB,CACzB,CAAC","sourcesContent":["import { forwardRef, useEffect, useRef, useState } from 'react';\nimport type { PropsWithoutRef } from 'react';\n\nimport Icon, { registerIcon } from '../Icon';\nimport * as caretDownIcon from '../Icon/icons/caret-down.icon';\nimport * as timesIcon from '../Icon/icons/times.icon';\nimport type { RefElement } from '../../types';\nimport {\n useConsolidatedRef,\n useElement,\n useI18n,\n useOuterEvent,\n useTestIds,\n useUID\n} from '../../hooks';\nimport { StyledFormControl } from '../FormControl';\nimport { getFocusables, withTestIds } from '../../utils';\nimport Flex from '../Flex';\nimport Button from '../Button';\nimport FormField from '../FormField';\nimport { FormDialog } from '../Dialog';\n\nimport {\n StyledCompositeInput,\n StyledInputButton,\n StyledInputContainer\n} from './CompositeInput.styles';\nimport type { CompositeInputProps } from './CompositeInput.types';\nimport { getCompositeInputTestIds } from './CompositeInput.test-ids';\n\nregisterIcon(caretDownIcon, timesIcon);\n\nexport default withTestIds(\n forwardRef<RefElement<CompositeInputProps>, PropsWithoutRef<CompositeInputProps>>(\n function CompositeInput(props, ref) {\n const uid = useUID();\n const {\n testId,\n id = uid,\n disabled,\n value,\n onClear,\n required,\n status,\n info,\n label,\n labelHidden,\n additionalInfo,\n dialog: { renderer: Renderer, rendererProps, onApply, onCancel },\n ...restProps\n } = props;\n\n const testIds = useTestIds(testId, getCompositeInputTestIds);\n const t = useI18n();\n\n const [open, setOpen] = useState(false);\n\n const [popoverEl, setPopoverEl] = useElement<HTMLElement>(null);\n const containerRef = useConsolidatedRef<HTMLDivElement>(ref);\n const buttonRef = useRef<HTMLInputElement>(null);\n const formContentRef = useRef<HTMLElement>(null);\n\n const closePopover = () => {\n setOpen(false);\n buttonRef.current?.focus();\n };\n\n useOuterEvent('mousedown', [popoverEl, buttonRef], () => {\n if (open) onCancel({ close: closePopover });\n });\n\n useEffect(() => {\n if (open) {\n getFocusables(formContentRef)[0]?.focus();\n }\n }, [open, formContentRef.current]);\n\n const labelId = `${id}-label`;\n\n const Comp = (\n <Flex\n as={StyledCompositeInput}\n forwardedAs={StyledFormControl}\n container={{ alignItems: 'center' }}\n status={status}\n disabled={disabled}\n ref={containerRef}\n >\n <Flex container={{ alignItems: 'center' }} item={{ grow: 1 }} as={StyledInputContainer}>\n <StyledInputButton\n data-testid={testIds.control}\n {...restProps}\n id={id}\n disabled={disabled}\n aria-haspopup='dialog'\n aria-expanded={!disabled && open}\n aria-describedby={info ? `${id}-info` : undefined}\n readOnly\n required={required}\n onClick={() => {\n if (!disabled) {\n setOpen(true);\n }\n }}\n onKeyDown={e => {\n if (e.key === 'Enter') {\n e.preventDefault();\n setOpen(true);\n }\n }}\n value={value ?? ''}\n ref={buttonRef}\n />\n <Flex\n container={{ justify: 'center', alignItems: 'center' }}\n style={{ pointerEvents: value ? '' : 'none' }}\n >\n {value && !open ? (\n <Button icon compact variant='simple' label={t('clear')} onClick={onClear}>\n <Icon name='times' />\n </Button>\n ) : (\n <Icon name='caret-down' />\n )}\n </Flex>\n </Flex>\n\n {open && containerRef.current && (\n <FormDialog\n arrow={false}\n // FIXME: The wrath of optional labels, as a ReactNode, strikes again...\n ariaLabel={label as string}\n ref={setPopoverEl}\n target={containerRef.current}\n placement='bottom-start'\n onCancel={() => onCancel({ close: closePopover })}\n onSubmit={{\n text: t('apply'),\n handler: () => onApply({ close: closePopover })\n }}\n >\n <Flex container={{ direction: 'column' }} ref={formContentRef}>\n <Renderer {...rendererProps} />\n </Flex>\n </FormDialog>\n )}\n </Flex>\n );\n\n return label ? (\n <FormField\n testId={testIds}\n label={label}\n labelHidden={labelHidden}\n id={id}\n info={info}\n status={status}\n required={required}\n disabled={disabled}\n labelId={labelId}\n additionalInfo={additionalInfo}\n >\n {Comp}\n </FormField>\n ) : (\n Comp\n );\n }\n ) as <P extends object>(props: CompositeInputProps<P>) => JSX.Element | null,\n getCompositeInputTestIds\n);\n"]}
@@ -1,2 +1,2 @@
1
- export declare const getCompositeInputTestIds: (testIdProp?: string | undefined) => import("../..").TestIdsRecord<readonly ["control", "label", "info", "additional-info", "suggestion-accept", "suggestion-reject"]>;
1
+ export declare const getCompositeInputTestIds: (testIdProp?: string | null | undefined) => import("../..").TestIdsRecord<readonly ["control", "label", "info", "additional-info", "suggestion-accept", "suggestion-reject"]>;
2
2
  //# sourceMappingURL=CompositeInput.test-ids.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CompositeInput.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/CompositeInput/CompositeInput.test-ids.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,wBAAwB,wKAG1B,CAAC"}
1
+ {"version":3,"file":"CompositeInput.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/CompositeInput/CompositeInput.test-ids.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,wBAAwB,+KAG1B,CAAC"}
@@ -1,12 +1,7 @@
1
- import type { ComponentType, Ref } from 'react';
2
- import type { BaseProps, DeferInfer, NoChildrenProp, TestIdProp } from '../../types';
1
+ import type { ComponentType } from 'react';
2
+ import type { DeferInfer, NoChildrenProp, TestIdProp, WithAttributes } from '../../types';
3
3
  import type { FormControlProps } from '../FormControl';
4
- export interface CompositeInputProps<P extends object = object> extends BaseProps, NoChildrenProp, TestIdProp {
5
- /**
6
- * Sets DOM id for the control and associates label element via 'for' attribute.
7
- * If an id is not pass, a random id will be generated for any render.
8
- */
9
- id?: FormControlProps['id'];
4
+ export type CompositeInputProps<P extends object = object> = WithAttributes<'div', TestIdProp & NoChildrenProp & {
10
5
  /** Set visual state based on a validation state. */
11
6
  status?: FormControlProps['status'];
12
7
  /** Pass a string or a fragment with an Icon and string. */
@@ -23,8 +18,6 @@ export interface CompositeInputProps<P extends object = object> extends BaseProp
23
18
  onClear: () => void;
24
19
  /** String representation of the complex value. */
25
20
  value?: string;
26
- /** Text visible when on value has been set. */
27
- placeholder?: FormControlProps['placeholder'];
28
21
  /** Button when clicked will show additional information for the composite input */
29
22
  additionalInfo?: FormControlProps['additionalInfo'];
30
23
  /** Value form options. */
@@ -42,7 +35,5 @@ export interface CompositeInputProps<P extends object = object> extends BaseProp
42
35
  close: () => void;
43
36
  }) => void;
44
37
  };
45
- /** Ref forwarded to the wrapping element. */
46
- ref?: Ref<HTMLDivElement>;
47
- }
38
+ }>;
48
39
  //# sourceMappingURL=CompositeInput.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CompositeInput.types.d.ts","sourceRoot":"","sources":["../../../src/components/CompositeInput/CompositeInput.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,GAAG,EAAE,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CAAC,EAAE,KAAK,EAAE,EAAE;YAAE,KAAK,EAAE,MAAM,IAAI,CAAA;SAAE,KAAK,IAAI,CAAC;QACrD,6CAA6C;QAC7C,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE;YAAE,KAAK,EAAE,MAAM,IAAI,CAAA;SAAE,KAAK,IAAI,CAAC;KACrD,CAAC;IACF,6CAA6C;IAC7C,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B"}
1
+ {"version":3,"file":"CompositeInput.types.d.ts","sourceRoot":"","sources":["../../../src/components/CompositeInput/CompositeInput.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC1F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI,cAAc,CACzE,KAAK,EACL,UAAU,GACR,cAAc,GAAG;IACf,oDAAoD;IACpD,MAAM,CAAC,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IACpC,2DAA2D;IAC3D,KAAK,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAClC,uCAAuC;IACvC,WAAW,CAAC,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAC;IAC9C,6GAA6G;IAC7G,IAAI,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAChC,wEAAwE;IACxE,QAAQ,CAAC,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAC;IACxC,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAC;IACxC,6CAA6C;IAC7C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mFAAmF;IACnF,cAAc,CAAC,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IACpD,0BAA0B;IAC1B,MAAM,EAAE;QACN,0DAA0D;QAC1D,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QAC3B,+DAA+D;QAC/D,aAAa,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;QAC9B,8CAA8C;QAC9C,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE;YAAE,KAAK,EAAE,MAAM,IAAI,CAAA;SAAE,KAAK,IAAI,CAAC;QACrD,6CAA6C;QAC7C,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE;YAAE,KAAK,EAAE,MAAM,IAAI,CAAA;SAAE,KAAK,IAAI,CAAC;KACrD,CAAC;CACH,CACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"CompositeInput.types.js","sourceRoot":"","sources":["../../../src/components/CompositeInput/CompositeInput.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentType, Ref } from 'react';\n\nimport type { BaseProps, DeferInfer, NoChildrenProp, TestIdProp } from '../../types';\nimport type { FormControlProps } from '../FormControl';\n\nexport interface CompositeInputProps<P extends object = object>\n extends BaseProps,\n NoChildrenProp,\n TestIdProp {\n /**\n * Sets DOM id for the control and associates label element via 'for' attribute.\n * If an id is not pass, a random id will be generated for any render.\n */\n id?: FormControlProps['id'];\n /** Set visual state based on a validation state. */\n status?: FormControlProps['status'];\n /** Pass a string or a fragment with an Icon and string. */\n label?: FormControlProps['label'];\n /** Visually hides the label region. */\n labelHidden?: FormControlProps['labelHidden'];\n /** It is recommended to pass a simple string to offer guidance. Text will be styled based on status prop. */\n info?: FormControlProps['info'];\n /** Indicate if the field is required. The browser defaults to false. */\n required?: FormControlProps['required'];\n /** Disable the control. The browser defaults to false. */\n disabled?: FormControlProps['disabled'];\n /** Callback when clear button is clicked. */\n onClear: () => void;\n /** String representation of the complex value. */\n value?: string;\n /** Text visible when on value has been set. */\n placeholder?: FormControlProps['placeholder'];\n /** Button when clicked will show additional information for the composite input */\n additionalInfo?: FormControlProps['additionalInfo'];\n /** Value form options. */\n dialog: {\n /** A component to render the main portion of the form. */\n renderer: ComponentType<P>;\n /** A props object that will be passed to the form renderer. */\n rendererProps?: DeferInfer<P>;\n /** Callback when cancel button is clicked. */\n onCancel: ({ close }: { close: () => void }) => void;\n /** Callback when apply button is clicked. */\n onApply: ({ close }: { close: () => void }) => void;\n };\n /** Ref forwarded to the wrapping element. */\n ref?: Ref<HTMLDivElement>;\n}\n"]}
1
+ {"version":3,"file":"CompositeInput.types.js","sourceRoot":"","sources":["../../../src/components/CompositeInput/CompositeInput.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentType } from 'react';\n\nimport type { DeferInfer, NoChildrenProp, TestIdProp, WithAttributes } from '../../types';\nimport type { FormControlProps } from '../FormControl';\n\nexport type CompositeInputProps<P extends object = object> = WithAttributes<\n 'div',\n TestIdProp &\n NoChildrenProp & {\n /** Set visual state based on a validation state. */\n status?: FormControlProps['status'];\n /** Pass a string or a fragment with an Icon and string. */\n label?: FormControlProps['label'];\n /** Visually hides the label region. */\n labelHidden?: FormControlProps['labelHidden'];\n /** It is recommended to pass a simple string to offer guidance. Text will be styled based on status prop. */\n info?: FormControlProps['info'];\n /** Indicate if the field is required. The browser defaults to false. */\n required?: FormControlProps['required'];\n /** Disable the control. The browser defaults to false. */\n disabled?: FormControlProps['disabled'];\n /** Callback when clear button is clicked. */\n onClear: () => void;\n /** String representation of the complex value. */\n value?: string;\n /** Button when clicked will show additional information for the composite input */\n additionalInfo?: FormControlProps['additionalInfo'];\n /** Value form options. */\n dialog: {\n /** A component to render the main portion of the form. */\n renderer: ComponentType<P>;\n /** A props object that will be passed to the form renderer. */\n rendererProps?: DeferInfer<P>;\n /** Callback when cancel button is clicked. */\n onCancel: ({ close }: { close: () => void }) => void;\n /** Callback when apply button is clicked. */\n onApply: ({ close }: { close: () => void }) => void;\n };\n }\n>;\n"]}
@@ -5,6 +5,7 @@ import type { StyleSheetManagerProps } from 'styled-components';
5
5
  import '../../init';
6
6
  import type { ThemeMachineLike, DefaultSettableTheme, DefaultThemeDefinition } from '../../theme';
7
7
  import type { Translation, TranslationPack } from '../../i18n';
8
+ import './connected-watcher';
8
9
  export interface ConfigurationProps {
9
10
  /** Any components or nodes that should be impacted by the settings applied by this Configuration component. */
10
11
  children: ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"Configuration.d.ts","sourceRoot":"","sources":["../../../src/components/Configuration/Configuration.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AACrF,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAiB,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAEhE,OAAO,YAAY,CAAC;AAGpB,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAMlG,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAK/D,MAAM,WAAW,kBAAkB;IACjC,+GAA+G;IAC/G,QAAQ,EAAE,SAAS,CAAC;IACpB,6FAA6F;IAC7F,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,2GAA2G;IAC3G,SAAS,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IAC1B,0CAA0C;IAC1C,YAAY,CAAC,EAAE,WAAW,CAAC;IAC3B,wEAAwE;IACxE,KAAK,CAAC,EAAE,oBAAoB,CAAC;IAC7B,0GAA0G;IAC1G,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,4DAA4D;IAC5D,WAAW,CAAC,EAAE,MAAM,EAAE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B;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,CAAC,aAAa,CAAC,CAAC,EAAE;YAChB,IAAI,EAAE,CAAC,QAAQ,EAAE,mBAAmB,KAAK,IAAI,CAAC;SAC/C,CAAC;KACH;CACF;AAID,UAAU,cAAe,SAAQ,mBAAmB;IAClD,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACpC;AA4BD,OAAO,QAAQ,YAAY,CAAC;IAC1B,UAAiB,aAAa;QAC5B,SAAS,CAAC,EAAE,CAAC,cAAc,GAAG,mBAAmB,CAAC,EAAE,CAAC;QACrD,oBAAoB,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAC;KAC3D;CACF;AAuBD,QAAA,MAAM,aAAa,EAAE,iBAAiB,CAAC,kBAAkB,CAkLxD,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -1,5 +1,5 @@
1
- import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { createContext, useContext, useMemo, useEffect } from 'react';
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { createContext, useContext, useMemo, useEffect, useState } from 'react';
3
3
  import { createPortal } from 'react-dom';
4
4
  import { ThemeProvider, StyleSheetManager } from 'styled-components';
5
5
  import '../../init';
@@ -9,6 +9,7 @@ import { createTranslationPack, DefaultTranslation, direction as directionOfLoca
9
9
  import { documentIsAvailable, navigatorIsAvailable, windowIsAvailable } from '../../utils';
10
10
  import pkg from '../../../package.json';
11
11
  import useElement from '../../hooks/useElement';
12
+ import './connected-watcher';
12
13
  const defaultLocale = navigatorIsAvailable ? navigator.language : 'en';
13
14
  export const ConfigurationContext = createContext({
14
15
  locale: defaultLocale,
@@ -72,10 +73,24 @@ const Configuration = ({ children, locale, direction, translations: customTransl
72
73
  : ctx.themeMachine;
73
74
  const translations = useMemo(() => createTranslationPack({ ...ctx.translations, ...customTranslations }), [ctx.translations, customTranslations]);
74
75
  const [wrapperEl, setWrapperEl] = useElement();
76
+ const [connectedWatcherEl, setConnectedWatcherEl] = useElement();
77
+ // State tracking if the DOM nodes are connected. Only used to trigger rerenders when connected state changes.
78
+ const [, setConnected] = useState(null);
79
+ useEffect(() => {
80
+ if (!connectedWatcherEl)
81
+ return;
82
+ const connectDisconnectListener = () => {
83
+ setConnected(connectedWatcherEl.isConnected);
84
+ };
85
+ connectedWatcherEl.addEventListener('connect-disconnect', connectDisconnectListener);
86
+ return () => {
87
+ connectedWatcherEl.removeEventListener('connect-disconnect', connectDisconnectListener);
88
+ };
89
+ }, [connectedWatcherEl]);
75
90
  // Determine valid style sheet and portal target with ShadowDOM handling.
76
91
  const [resolvedStyleSheetTarget, resolvedPortalTarget] = useMemo(() => {
77
92
  // When rendering on the server, or before the wrapper is in the DOM, just bail.
78
- if (!documentIsAvailable || !wrapperEl)
93
+ if (!documentIsAvailable || !wrapperEl?.isConnected)
79
94
  return [undefined, undefined];
80
95
  const rootNode = wrapperEl.getRootNode();
81
96
  // When within the ShadowDOM, the default target is the ShadowRoot, otherwise default to head/body element.
@@ -91,9 +106,20 @@ const Configuration = ({ children, locale, direction, translations: customTransl
91
106
  : defaultStyleSheetTarget,
92
107
  rootNode.contains(requestedPortalTarget ?? null) ? requestedPortalTarget : defaultPortalTarget
93
108
  ];
94
- }, [wrapperEl, styleSheetTarget, portalTarget, ctx.styleSheetTarget, ctx.portalTarget]);
95
- // Reload global fonts and styles if this configuration instance is not within the same root node as the previous configuration instance.
96
- const reinitialize = useMemo(() => !!(wrapperEl && wrapperEl.getRootNode() !== ctx.styleSheetTarget?.getRootNode()), [wrapperEl]);
109
+ }, [
110
+ wrapperEl,
111
+ wrapperEl?.isConnected,
112
+ styleSheetTarget,
113
+ portalTarget,
114
+ ctx.styleSheetTarget,
115
+ ctx.portalTarget
116
+ ]);
117
+ // Load global fonts and styles if this configuration instance is...
118
+ const shouldInitialize = useMemo(() =>
119
+ // the first configuration instance or...
120
+ !ctx.initialized ||
121
+ // is not within the same root node as the previous configuration instance.
122
+ !!(wrapperEl && wrapperEl.getRootNode() !== ctx.styleSheetTarget?.getRootNode()), [ctx.initialized, wrapperEl]);
97
123
  // Check if this StyleSheetManager is mounted above this Configuration.
98
124
  const stylesheetManagerMounted = useMemo(() => !!ctx.mountedStyleSheetManagers?.includes(StyleSheetManager), [ctx.mountedStyleSheetManagers]);
99
125
  useEffect(() => {
@@ -103,37 +129,39 @@ const Configuration = ({ children, locale, direction, translations: customTransl
103
129
  unmountConfig(sym);
104
130
  };
105
131
  }, [id]);
106
- const wrappedChildren = ctx.initialized && !reinitialize ? (_jsx(_Fragment, { children: children })) : (_jsxs(_Fragment, { children: [!disableDefaultFontLoading &&
132
+ const wrappedChildren = shouldInitialize ? (_jsxs(_Fragment, { children: [!disableDefaultFontLoading &&
107
133
  resolvedStyleSheetTarget &&
108
- createPortal(_jsx("link", { rel: 'stylesheet', href: 'https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400..700;1,400..700&family=Inter:wght@400..700&display=swap', "data-cosmos-global-style": true }), resolvedStyleSheetTarget), _jsx(GlobalStyle, {}), children] }));
134
+ createPortal(_jsx("link", { rel: 'stylesheet', href: 'https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400..700;1,400..700&family=Inter:wght@400..700&display=swap', "data-cosmos-global-style": true }), resolvedStyleSheetTarget), _jsx(GlobalStyle, {}), children] })) : (_jsx(_Fragment, { children: children }));
109
135
  const styledWrappedChildren = stylesheetManagerMounted ? (wrappedChildren) : (_jsx(StyleSheetManager, { disableVendorPrefixes: true, target:
110
136
  // Target must be undefined in a JSDOM environment due to Styled Components server mode handling.
111
- navigatorIsAvailable && !navigator.userAgent.includes('jsdom')
137
+ navigatorIsAvailable &&
138
+ resolvedStyleSheetTarget?.isConnected &&
139
+ !navigator.userAgent.includes('jsdom')
112
140
  ? resolvedStyleSheetTarget
113
141
  : undefined, children: wrappedChildren }));
114
- return (_jsx("div", {
142
+ return (_jsxs("div", {
115
143
  // Need to use inline styles because the StyleSheetManager is configured within this div.
116
- style: { display: 'contents' }, ref: setWrapperEl, children: _jsx(context.Provider
117
- // eslint-disable-next-line react/jsx-no-constructed-context-values
118
- , {
144
+ style: { display: 'contents' }, ref: setWrapperEl, children: [_jsx(context.Provider
119
145
  // eslint-disable-next-line react/jsx-no-constructed-context-values
120
- value: {
121
- locale: locale ?? ctx.locale,
122
- direction: direction ?? (locale !== undefined ? directionOfLocale(locale) : ctx.direction),
123
- translations,
124
- themeMachine,
125
- styleSheetTarget: resolvedStyleSheetTarget,
126
- portalTarget: resolvedPortalTarget,
127
- loadedRef: ctx.loadedRef,
128
- renderNativeControls: renderNativeControls ?? ctx.renderNativeControls,
129
- testIds: testIds ?? ctx.testIds,
130
- mountedStyleSheetManagers: stylesheetManagerMounted
131
- ? ctx.mountedStyleSheetManagers
132
- : [...(ctx.mountedStyleSheetManagers ?? []), StyleSheetManager],
133
- initialized: true
134
- }, children: _jsxs(ThemeProvider, { theme: themeMachine.theme, children: [styleSheetURLs &&
135
- resolvedStyleSheetTarget &&
136
- createPortal(styleSheetURLs.map(url => (_jsx("link", { rel: 'stylesheet', href: url, "data-cosmos-global-style": true }, url))), resolvedStyleSheetTarget), styledWrappedChildren] }) }) }));
146
+ , {
147
+ // eslint-disable-next-line react/jsx-no-constructed-context-values
148
+ value: {
149
+ locale: locale ?? ctx.locale,
150
+ direction: direction ?? (locale !== undefined ? directionOfLocale(locale) : ctx.direction),
151
+ translations,
152
+ themeMachine,
153
+ styleSheetTarget: resolvedStyleSheetTarget,
154
+ portalTarget: resolvedPortalTarget,
155
+ loadedRef: ctx.loadedRef,
156
+ renderNativeControls: renderNativeControls ?? ctx.renderNativeControls,
157
+ testIds: testIds ?? ctx.testIds,
158
+ mountedStyleSheetManagers: stylesheetManagerMounted
159
+ ? ctx.mountedStyleSheetManagers
160
+ : [...(ctx.mountedStyleSheetManagers ?? []), StyleSheetManager],
161
+ initialized: true
162
+ }, children: _jsxs(ThemeProvider, { theme: themeMachine.theme, children: [styleSheetURLs &&
163
+ resolvedStyleSheetTarget &&
164
+ createPortal(styleSheetURLs.map(url => (_jsx("link", { rel: 'stylesheet', href: url, "data-cosmos-global-style": true }, url))), resolvedStyleSheetTarget), styledWrappedChildren] }) }), _jsx("pega-connected-watcher", { ref: setConnectedWatcherEl, style: { display: 'none' } })] }));
137
165
  };
138
166
  export default Configuration;
139
167
  //# sourceMappingURL=Configuration.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Configuration.js","sourceRoot":"","sources":["../../../src/components/Configuration/Configuration.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtE,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAGrE,OAAO,YAAY,CAAC;AACpB,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE7D,OAAO,EACL,qBAAqB,EACrB,kBAAkB,EAClB,SAAS,IAAI,iBAAiB,EAC/B,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC3F,OAAO,GAAG,MAAM,uBAAuB,CAAC;AACxC,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAyDhD,MAAM,aAAa,GAAG,oBAAoB,CAAC,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC;AAEvE,MAAM,CAAC,MAAM,oBAAoB,GAAG,aAAa,CAA4B;IAC3E,MAAM,EAAE,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ClB,YAED,MAAC,aAAa,IAAC,KAAK,EAAE,YAAY,CAAC,KAAK,aACrC,cAAc;wBACb,wBAAwB;wBACxB,YAAY,CACV,cAAc,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CACxB,eAAM,GAAG,EAAC,YAAY,EAAC,IAAI,EAAE,GAAG,sCAAO,GAAG,CAA6B,CACxE,CAAC,EACF,wBAAwB,CACzB,EACF,qBAAqB,IACR,GACC,GACf,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import { createContext, useContext, useMemo, useEffect } from 'react';\nimport type { FunctionComponent, ReactNode, Context, MutableRefObject } from 'react';\nimport { createPortal } from 'react-dom';\nimport { ThemeProvider, StyleSheetManager } from 'styled-components';\nimport type { StyleSheetManagerProps } from 'styled-components';\n\nimport '../../init';\nimport { GlobalStyle } from '../../styles';\nimport { ThemeMachine, BaseThemeMachine } from '../../theme';\nimport type { ThemeMachineLike, DefaultSettableTheme, DefaultThemeDefinition } from '../../theme';\nimport {\n createTranslationPack,\n DefaultTranslation,\n direction as directionOfLocale\n} from '../../i18n';\nimport type { Translation, TranslationPack } from '../../i18n';\nimport { documentIsAvailable, navigatorIsAvailable, windowIsAvailable } from '../../utils';\nimport pkg from '../../../package.json';\nimport useElement from '../../hooks/useElement';\n\nexport interface ConfigurationProps {\n /** Any components or nodes that should be impacted by the settings applied by this Configuration component. */\n children: ReactNode;\n /** User locale as defined in [BCP-47](https://www.techonthenet.com/js/language_tags.php). */\n locale?: string;\n /** Override rendering direction of the document. Direction will be based on the locale if now provided. */\n direction?: 'ltr' | 'rtl';\n /** Object with (partial) translations. */\n translations?: Translation;\n /** Theme object used to override any or all Cosmos theme properties. */\n theme?: DefaultSettableTheme;\n /** Disables loading Open Sans or Inter from Google Fonts. Only takes effect on the root configuration. */\n disableDefaultFontLoading?: boolean;\n /** List of style sheets to inject in style sheet target. */\n styleSheets?: string[];\n /**\n * Target element for loading styles related to `styled-components`.\n * @deprecated\n */\n styleSheetTarget?: StyleSheetManagerProps['target'];\n /**\n * Target element for rendering a `ReactDOM` portal.\n * @deprecated\n */\n portalTarget?: Parameters<typeof createPortal>[1];\n /**\n * Use native HTML5 controls for inputs instead of rich ones.\n * @default false\n */\n renderNativeControls?: boolean;\n /** String to identify this configuration instance. */\n id?: string;\n /**\n * Enable/disable testId attribute rendering for all components.\n * @default true\n */\n testIds?: boolean;\n}\n\nexport interface ConfigurationContextValue {\n locale: string;\n direction: NonNullable<ConfigurationProps['direction']>;\n translations: TranslationPack;\n themeMachine: ThemeMachineLike<DefaultThemeDefinition>;\n styleSheetTarget: ConfigurationProps['styleSheetTarget'];\n portalTarget: ConfigurationProps['portalTarget'];\n loadedRef: MutableRefObject<boolean>;\n renderNativeControls: boolean;\n testIds: NonNullable<ConfigurationProps['testIds']>;\n /** @internal */\n mountedStyleSheetManagers?: (typeof StyleSheetManager)[];\n /** @internal */\n initialized: boolean;\n}\n\nconst defaultLocale = navigatorIsAvailable ? navigator.language : 'en';\n\nexport const ConfigurationContext = createContext<ConfigurationContextValue>({\n locale: defaultLocale,\n direction: directionOfLocale(defaultLocale),\n translations: DefaultTranslation,\n themeMachine: BaseThemeMachine,\n styleSheetTarget: documentIsAvailable ? document.head : undefined,\n portalTarget: documentIsAvailable ? document.body : undefined,\n loadedRef: { current: false },\n renderNativeControls: false,\n testIds: true,\n mountedStyleSheetManagers: [],\n initialized: false\n});\n\nconst legacyMetaKey = Symbol.for('@pega/cosmos-react-core.metadata');\n\ninterface LegacyCosmosInstace {\n version: string;\n}\n\ndeclare global {\n interface Window {\n [legacyMetaKey]?: {\n push: (instance: LegacyCosmosInstace) => void;\n };\n }\n}\n\nconst mountedConfigs = new Set<symbol>();\n\ninterface CosmosInstance extends LegacyCosmosInstace {\n mountedConfigs: string[];\n mountOrder: string[];\n mountCount: Record<string, number>;\n}\n\nconst instance: CosmosInstance = {\n version: pkg.version,\n mountedConfigs: [],\n mountOrder: [],\n mountCount: {}\n};\n\nconst mountConfig = (sym: symbol) => {\n mountedConfigs.add(sym);\n instance.mountedConfigs = [...mountedConfigs].map(i => i.description ?? 'Unknown');\n\n const description = sym.description ?? 'Unknown';\n\n instance.mountOrder.push(description);\n\n if (!(description in instance.mountCount)) {\n instance.mountCount[description] = 0;\n }\n instance.mountCount[description] += 1;\n};\n\nconst unmountConfig = (sym: symbol) => {\n mountedConfigs.delete(sym);\n instance.mountedConfigs = [...mountedConfigs].map(i => i.description ?? 'Unknown');\n};\n\ndeclare module '../../init' {\n export interface CosmosGlobals {\n instances?: (CosmosInstance | LegacyCosmosInstace)[];\n configurationContext?: Context<ConfigurationContextValue>;\n }\n}\n\nif (windowIsAvailable) {\n if (!window.cosmos.instances) {\n window.cosmos.instances = [];\n }\n\n window.cosmos.instances.push(instance);\n\n if (Array.isArray(window[legacyMetaKey])) {\n window.cosmos.instances.push(...window[legacyMetaKey]);\n delete window[legacyMetaKey];\n }\n\n if (!window[legacyMetaKey]) {\n window[legacyMetaKey] = {\n push: inst => {\n window.cosmos.instances?.push(inst);\n }\n };\n }\n}\n\nconst Configuration: FunctionComponent<ConfigurationProps> = ({\n children,\n locale,\n direction,\n translations: customTranslations,\n theme,\n disableDefaultFontLoading,\n styleSheets: styleSheetURLs,\n styleSheetTarget,\n portalTarget,\n renderNativeControls,\n testIds,\n id\n}: ConfigurationProps) => {\n const context = windowIsAvailable\n ? window.cosmos.configurationContext ?? ConfigurationContext\n : ConfigurationContext;\n const ctx = useContext(context);\n const themeMachine = theme\n ? new ThemeMachine<DefaultThemeDefinition>({ theme, parent: ctx.themeMachine })\n : ctx.themeMachine;\n const translations = useMemo(\n () => createTranslationPack({ ...ctx.translations, ...customTranslations }),\n [ctx.translations, customTranslations]\n );\n\n const [wrapperEl, setWrapperEl] = useElement<HTMLDivElement>();\n\n // Determine valid style sheet and portal target with ShadowDOM handling.\n const [resolvedStyleSheetTarget, resolvedPortalTarget] = useMemo(() => {\n // When rendering on the server, or before the wrapper is in the DOM, just bail.\n if (!documentIsAvailable || !wrapperEl) return [undefined, undefined];\n\n const rootNode = wrapperEl.getRootNode();\n\n // When within the ShadowDOM, the default target is the ShadowRoot, otherwise default to head/body element.\n const defaultStyleSheetTarget = rootNode instanceof ShadowRoot ? rootNode : document.head;\n const defaultPortalTarget = rootNode instanceof ShadowRoot ? rootNode : document.body;\n\n // Currently passed prop or previous context value\n const requestedStyleSheetTarget = styleSheetTarget ?? ctx.styleSheetTarget;\n const requestedPortalTarget = portalTarget ?? ctx.portalTarget;\n\n // If the \"requested\" target is within the root node, it is valid, so use that, otherwise fallback to the default.\n return [\n rootNode.contains(requestedStyleSheetTarget ?? null)\n ? requestedStyleSheetTarget\n : defaultStyleSheetTarget,\n rootNode.contains(requestedPortalTarget ?? null) ? requestedPortalTarget : defaultPortalTarget\n ];\n }, [wrapperEl, styleSheetTarget, portalTarget, ctx.styleSheetTarget, ctx.portalTarget]);\n\n // Reload global fonts and styles if this configuration instance is not within the same root node as the previous configuration instance.\n const reinitialize = useMemo(\n () => !!(wrapperEl && wrapperEl.getRootNode() !== ctx.styleSheetTarget?.getRootNode()),\n [wrapperEl]\n );\n\n // Check if this StyleSheetManager is mounted above this Configuration.\n const stylesheetManagerMounted = useMemo(\n () => !!ctx.mountedStyleSheetManagers?.includes(StyleSheetManager),\n [ctx.mountedStyleSheetManagers]\n );\n\n useEffect(() => {\n const sym = Symbol(id);\n mountConfig(sym);\n\n return () => {\n unmountConfig(sym);\n };\n }, [id]);\n\n const wrappedChildren =\n ctx.initialized && !reinitialize ? (\n <>{children}</>\n ) : (\n <>\n {!disableDefaultFontLoading &&\n resolvedStyleSheetTarget &&\n createPortal(\n <link\n rel='stylesheet'\n href='https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400..700;1,400..700&family=Inter:wght@400..700&display=swap'\n data-cosmos-global-style\n />,\n resolvedStyleSheetTarget\n )}\n <GlobalStyle />\n {children}\n </>\n );\n\n const styledWrappedChildren = stylesheetManagerMounted ? (\n wrappedChildren\n ) : (\n <StyleSheetManager\n disableVendorPrefixes\n target={\n // Target must be undefined in a JSDOM environment due to Styled Components server mode handling.\n navigatorIsAvailable && !navigator.userAgent.includes('jsdom')\n ? resolvedStyleSheetTarget\n : undefined\n }\n >\n {wrappedChildren}\n </StyleSheetManager>\n );\n\n return (\n <div\n // Need to use inline styles because the StyleSheetManager is configured within this div.\n style={{ display: 'contents' }}\n ref={setWrapperEl}\n >\n <context.Provider\n // eslint-disable-next-line react/jsx-no-constructed-context-values\n value={{\n locale: locale ?? ctx.locale,\n direction:\n direction ?? (locale !== undefined ? directionOfLocale(locale) : ctx.direction),\n translations,\n themeMachine,\n styleSheetTarget: resolvedStyleSheetTarget,\n portalTarget: resolvedPortalTarget,\n loadedRef: ctx.loadedRef,\n renderNativeControls: renderNativeControls ?? ctx.renderNativeControls,\n testIds: testIds ?? ctx.testIds,\n mountedStyleSheetManagers: stylesheetManagerMounted\n ? ctx.mountedStyleSheetManagers\n : [...(ctx.mountedStyleSheetManagers ?? []), StyleSheetManager],\n initialized: true\n }}\n >\n <ThemeProvider theme={themeMachine.theme}>\n {styleSheetURLs &&\n resolvedStyleSheetTarget &&\n createPortal(\n styleSheetURLs.map(url => (\n <link rel='stylesheet' href={url} key={url} data-cosmos-global-style />\n )),\n resolvedStyleSheetTarget\n )}\n {styledWrappedChildren}\n </ThemeProvider>\n </context.Provider>\n </div>\n );\n};\n\nexport default Configuration;\n"]}
1
+ {"version":3,"file":"Configuration.js","sourceRoot":"","sources":["../../../src/components/Configuration/Configuration.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEhF,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAGrE,OAAO,YAAY,CAAC;AACpB,OAAO,EAAE,WAAW,EAAE,M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AED,MAAC,aAAa,IAAC,KAAK,EAAE,YAAY,CAAC,KAAK,aACrC,cAAc;4BACb,wBAAwB;4BACxB,YAAY,CACV,cAAc,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CACxB,eAAM,GAAG,EAAC,YAAY,EAAC,IAAI,EAAE,GAAG,sCAAO,GAAG,CAA6B,CACxE,CAAC,EACF,wBAAwB,CACzB,EACF,qBAAqB,IACR,GACC,EACnB,iCAAwB,GAAG,EAAE,qBAAqB,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,GAAI,IAC9E,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import { createContext, useContext, useMemo, useEffect, useState } from 'react';\nimport type { FunctionComponent, ReactNode, Context, MutableRefObject } from 'react';\nimport { createPortal } from 'react-dom';\nimport { ThemeProvider, StyleSheetManager } from 'styled-components';\nimport type { StyleSheetManagerProps } from 'styled-components';\n\nimport '../../init';\nimport { GlobalStyle } from '../../styles';\nimport { ThemeMachine, BaseThemeMachine } from '../../theme';\nimport type { ThemeMachineLike, DefaultSettableTheme, DefaultThemeDefinition } from '../../theme';\nimport {\n createTranslationPack,\n DefaultTranslation,\n direction as directionOfLocale\n} from '../../i18n';\nimport type { Translation, TranslationPack } from '../../i18n';\nimport { documentIsAvailable, navigatorIsAvailable, windowIsAvailable } from '../../utils';\nimport pkg from '../../../package.json';\nimport useElement from '../../hooks/useElement';\n\nimport type PegaConnectedWatcher from './connected-watcher';\nimport './connected-watcher';\n\nexport interface ConfigurationProps {\n /** Any components or nodes that should be impacted by the settings applied by this Configuration component. */\n children: ReactNode;\n /** User locale as defined in [BCP-47](https://www.techonthenet.com/js/language_tags.php). */\n locale?: string;\n /** Override rendering direction of the document. Direction will be based on the locale if now provided. */\n direction?: 'ltr' | 'rtl';\n /** Object with (partial) translations. */\n translations?: Translation;\n /** Theme object used to override any or all Cosmos theme properties. */\n theme?: DefaultSettableTheme;\n /** Disables loading Open Sans or Inter from Google Fonts. Only takes effect on the root configuration. */\n disableDefaultFontLoading?: boolean;\n /** List of style sheets to inject in style sheet target. */\n styleSheets?: string[];\n /**\n * Target element for loading styles related to `styled-components`.\n * @deprecated\n */\n styleSheetTarget?: StyleSheetManagerProps['target'];\n /**\n * Target element for rendering a `ReactDOM` portal.\n * @deprecated\n */\n portalTarget?: Parameters<typeof createPortal>[1];\n /**\n * Use native HTML5 controls for inputs instead of rich ones.\n * @default false\n */\n renderNativeControls?: boolean;\n /** String to identify this configuration instance. */\n id?: string;\n /**\n * Enable/disable testId attribute rendering for all components.\n * @default true\n */\n testIds?: boolean;\n}\n\nexport interface ConfigurationContextValue {\n locale: string;\n direction: NonNullable<ConfigurationProps['direction']>;\n translations: TranslationPack;\n themeMachine: ThemeMachineLike<DefaultThemeDefinition>;\n styleSheetTarget: ConfigurationProps['styleSheetTarget'];\n portalTarget: ConfigurationProps['portalTarget'];\n loadedRef: MutableRefObject<boolean>;\n renderNativeControls: boolean;\n testIds: NonNullable<ConfigurationProps['testIds']>;\n /** @internal */\n mountedStyleSheetManagers?: (typeof StyleSheetManager)[];\n /** @internal */\n initialized: boolean;\n}\n\nconst defaultLocale = navigatorIsAvailable ? navigator.language : 'en';\n\nexport const ConfigurationContext = createContext<ConfigurationContextValue>({\n locale: defaultLocale,\n direction: directionOfLocale(defaultLocale),\n translations: DefaultTranslation,\n themeMachine: BaseThemeMachine,\n styleSheetTarget: documentIsAvailable ? document.head : undefined,\n portalTarget: documentIsAvailable ? document.body : undefined,\n loadedRef: { current: false },\n renderNativeControls: false,\n testIds: true,\n mountedStyleSheetManagers: [],\n initialized: false\n});\n\nconst legacyMetaKey = Symbol.for('@pega/cosmos-react-core.metadata');\n\ninterface LegacyCosmosInstace {\n version: string;\n}\n\ndeclare global {\n interface Window {\n [legacyMetaKey]?: {\n push: (instance: LegacyCosmosInstace) => void;\n };\n }\n}\n\nconst mountedConfigs = new Set<symbol>();\n\ninterface CosmosInstance extends LegacyCosmosInstace {\n mountedConfigs: string[];\n mountOrder: string[];\n mountCount: Record<string, number>;\n}\n\nconst instance: CosmosInstance = {\n version: pkg.version,\n mountedConfigs: [],\n mountOrder: [],\n mountCount: {}\n};\n\nconst mountConfig = (sym: symbol) => {\n mountedConfigs.add(sym);\n instance.mountedConfigs = [...mountedConfigs].map(i => i.description ?? 'Unknown');\n\n const description = sym.description ?? 'Unknown';\n\n instance.mountOrder.push(description);\n\n if (!(description in instance.mountCount)) {\n instance.mountCount[description] = 0;\n }\n instance.mountCount[description] += 1;\n};\n\nconst unmountConfig = (sym: symbol) => {\n mountedConfigs.delete(sym);\n instance.mountedConfigs = [...mountedConfigs].map(i => i.description ?? 'Unknown');\n};\n\ndeclare module '../../init' {\n export interface CosmosGlobals {\n instances?: (CosmosInstance | LegacyCosmosInstace)[];\n configurationContext?: Context<ConfigurationContextValue>;\n }\n}\n\nif (windowIsAvailable) {\n if (!window.cosmos.instances) {\n window.cosmos.instances = [];\n }\n\n window.cosmos.instances.push(instance);\n\n if (Array.isArray(window[legacyMetaKey])) {\n window.cosmos.instances.push(...window[legacyMetaKey]);\n delete window[legacyMetaKey];\n }\n\n if (!window[legacyMetaKey]) {\n window[legacyMetaKey] = {\n push: inst => {\n window.cosmos.instances?.push(inst);\n }\n };\n }\n}\n\nconst Configuration: FunctionComponent<ConfigurationProps> = ({\n children,\n locale,\n direction,\n translations: customTranslations,\n theme,\n disableDefaultFontLoading,\n styleSheets: styleSheetURLs,\n styleSheetTarget,\n portalTarget,\n renderNativeControls,\n testIds,\n id\n}: ConfigurationProps) => {\n const context = windowIsAvailable\n ? window.cosmos.configurationContext ?? ConfigurationContext\n : ConfigurationContext;\n const ctx = useContext(context);\n const themeMachine = theme\n ? new ThemeMachine<DefaultThemeDefinition>({ theme, parent: ctx.themeMachine })\n : ctx.themeMachine;\n const translations = useMemo(\n () => createTranslationPack({ ...ctx.translations, ...customTranslations }),\n [ctx.translations, customTranslations]\n );\n\n const [wrapperEl, setWrapperEl] = useElement<HTMLDivElement>();\n const [connectedWatcherEl, setConnectedWatcherEl] = useElement<PegaConnectedWatcher>();\n // State tracking if the DOM nodes are connected. Only used to trigger rerenders when connected state changes.\n const [, setConnected] = useState<boolean | null>(null);\n\n useEffect(() => {\n if (!connectedWatcherEl) return;\n\n const connectDisconnectListener = () => {\n setConnected(connectedWatcherEl.isConnected);\n };\n\n connectedWatcherEl.addEventListener('connect-disconnect', connectDisconnectListener);\n\n return () => {\n connectedWatcherEl.removeEventListener('connect-disconnect', connectDisconnectListener);\n };\n }, [connectedWatcherEl]);\n\n // Determine valid style sheet and portal target with ShadowDOM handling.\n const [resolvedStyleSheetTarget, resolvedPortalTarget] = useMemo(() => {\n // When rendering on the server, or before the wrapper is in the DOM, just bail.\n if (!documentIsAvailable || !wrapperEl?.isConnected) return [undefined, undefined];\n\n const rootNode = wrapperEl.getRootNode();\n\n // When within the ShadowDOM, the default target is the ShadowRoot, otherwise default to head/body element.\n const defaultStyleSheetTarget = rootNode instanceof ShadowRoot ? rootNode : document.head;\n const defaultPortalTarget = rootNode instanceof ShadowRoot ? rootNode : document.body;\n\n // Currently passed prop or previous context value\n const requestedStyleSheetTarget = styleSheetTarget ?? ctx.styleSheetTarget;\n const requestedPortalTarget = portalTarget ?? ctx.portalTarget;\n\n // If the \"requested\" target is within the root node, it is valid, so use that, otherwise fallback to the default.\n return [\n rootNode.contains(requestedStyleSheetTarget ?? null)\n ? requestedStyleSheetTarget\n : defaultStyleSheetTarget,\n rootNode.contains(requestedPortalTarget ?? null) ? requestedPortalTarget : defaultPortalTarget\n ];\n }, [\n wrapperEl,\n wrapperEl?.isConnected,\n styleSheetTarget,\n portalTarget,\n ctx.styleSheetTarget,\n ctx.portalTarget\n ]);\n\n // Load global fonts and styles if this configuration instance is...\n const shouldInitialize = useMemo(\n () =>\n // the first configuration instance or...\n !ctx.initialized ||\n // is not within the same root node as the previous configuration instance.\n !!(wrapperEl && wrapperEl.getRootNode() !== ctx.styleSheetTarget?.getRootNode()),\n [ctx.initialized, wrapperEl]\n );\n\n // Check if this StyleSheetManager is mounted above this Configuration.\n const stylesheetManagerMounted = useMemo(\n () => !!ctx.mountedStyleSheetManagers?.includes(StyleSheetManager),\n [ctx.mountedStyleSheetManagers]\n );\n\n useEffect(() => {\n const sym = Symbol(id);\n mountConfig(sym);\n\n return () => {\n unmountConfig(sym);\n };\n }, [id]);\n\n const wrappedChildren = shouldInitialize ? (\n <>\n {!disableDefaultFontLoading &&\n resolvedStyleSheetTarget &&\n createPortal(\n <link\n rel='stylesheet'\n href='https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400..700;1,400..700&family=Inter:wght@400..700&display=swap'\n data-cosmos-global-style\n />,\n resolvedStyleSheetTarget\n )}\n <GlobalStyle />\n {children}\n </>\n ) : (\n <>{children}</>\n );\n\n const styledWrappedChildren = stylesheetManagerMounted ? (\n wrappedChildren\n ) : (\n <StyleSheetManager\n disableVendorPrefixes\n target={\n // Target must be undefined in a JSDOM environment due to Styled Components server mode handling.\n navigatorIsAvailable &&\n resolvedStyleSheetTarget?.isConnected &&\n !navigator.userAgent.includes('jsdom')\n ? resolvedStyleSheetTarget\n : undefined\n }\n >\n {wrappedChildren}\n </StyleSheetManager>\n );\n\n return (\n <div\n // Need to use inline styles because the StyleSheetManager is configured within this div.\n style={{ display: 'contents' }}\n ref={setWrapperEl}\n >\n <context.Provider\n // eslint-disable-next-line react/jsx-no-constructed-context-values\n value={{\n locale: locale ?? ctx.locale,\n direction:\n direction ?? (locale !== undefined ? directionOfLocale(locale) : ctx.direction),\n translations,\n themeMachine,\n styleSheetTarget: resolvedStyleSheetTarget,\n portalTarget: resolvedPortalTarget,\n loadedRef: ctx.loadedRef,\n renderNativeControls: renderNativeControls ?? ctx.renderNativeControls,\n testIds: testIds ?? ctx.testIds,\n mountedStyleSheetManagers: stylesheetManagerMounted\n ? ctx.mountedStyleSheetManagers\n : [...(ctx.mountedStyleSheetManagers ?? []), StyleSheetManager],\n initialized: true\n }}\n >\n <ThemeProvider theme={themeMachine.theme}>\n {styleSheetURLs &&\n resolvedStyleSheetTarget &&\n createPortal(\n styleSheetURLs.map(url => (\n <link rel='stylesheet' href={url} key={url} data-cosmos-global-style />\n )),\n resolvedStyleSheetTarget\n )}\n {styledWrappedChildren}\n </ThemeProvider>\n </context.Provider>\n <pega-connected-watcher ref={setConnectedWatcherEl} style={{ display: 'none' }} />\n </div>\n );\n};\n\nexport default Configuration;\n"]}
@@ -0,0 +1,11 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { DefaultSettableTheme } from '../../theme';
3
+ export interface ThemeOverrideProps {
4
+ /** Content that will inherit theming overrides. */
5
+ children: ReactNode;
6
+ /** Theme object used to override theme properties. */
7
+ theme: DefaultSettableTheme;
8
+ }
9
+ declare const ThemeOverride: ({ children, theme }: ThemeOverrideProps) => JSX.Element;
10
+ export default ThemeOverride;
11
+ //# sourceMappingURL=ThemeOverride.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThemeOverride.d.ts","sourceRoot":"","sources":["../../../src/components/Configuration/ThemeOverride.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,OAAO,KAAK,EAAE,oBAAoB,EAA0B,MAAM,aAAa,CAAC;AAKhF,MAAM,WAAW,kBAAkB;IACjC,mDAAmD;IACnD,QAAQ,EAAE,SAAS,CAAC;IACpB,sDAAsD;IACtD,KAAK,EAAE,oBAAoB,CAAC;CAC7B;AAED,QAAA,MAAM,aAAa,wBAAyB,kBAAkB,gBAoB7D,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useContext } from 'react';
3
+ import { ThemeProvider } from 'styled-components';
4
+ import { ThemeMachine } from '../../theme';
5
+ import { windowIsAvailable } from '../../utils';
6
+ import { ConfigurationContext } from './Configuration';
7
+ const ThemeOverride = ({ children, theme }) => {
8
+ const context = windowIsAvailable
9
+ ? window.cosmos.configurationContext ?? ConfigurationContext
10
+ : ConfigurationContext;
11
+ const ctx = useContext(context);
12
+ const themeMachine = new ThemeMachine({
13
+ theme,
14
+ parent: ctx.themeMachine
15
+ });
16
+ return (_jsx(context.Provider
17
+ // eslint-disable-next-line react/jsx-no-constructed-context-values
18
+ , {
19
+ // eslint-disable-next-line react/jsx-no-constructed-context-values
20
+ value: { ...ctx, themeMachine }, children: _jsx(ThemeProvider, { theme: themeMachine.theme, children: children }) }));
21
+ };
22
+ export default ThemeOverride;
23
+ //# sourceMappingURL=ThemeOverride.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThemeOverride.js","sourceRoot":"","sources":["../../../src/components/Configuration/ThemeOverride.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AASvD,MAAM,aAAa,GAAG,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAsB,EAAE,EAAE;IAChE,MAAM,OAAO,GAAG,iBAAiB;QAC/B,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,oBAAoB,IAAI,oBAAoB;QAC5D,CAAC,CAAC,oBAAoB,CAAC;IAEzB,MAAM,GAAG,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;IAEhC,MAAM,YAAY,GAAG,IAAI,YAAY,CAAyB;QAC5D,KAAK;QACL,MAAM,EAAE,GAAG,CAAC,YAAY;KACzB,CAAC,CAAC;IAEH,OAAO,CACL,KAAC,OAAO,CAAC,QAAQ;IACf,mEAAmE;;QAAnE,mEAAmE;QACnE,KAAK,EAAE,EAAE,GAAG,GAAG,EAAE,YAAY,EAAE,YAE/B,KAAC,aAAa,IAAC,KAAK,EAAE,YAAY,CAAC,KAAK,YAAG,QAAQ,GAAiB,GACnD,CACpB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import { useContext } from 'react';\nimport type { ReactNode } from 'react';\nimport { ThemeProvider } from 'styled-components';\n\nimport { ThemeMachine } from '../../theme';\nimport type { DefaultSettableTheme, DefaultThemeDefinition } from '../../theme';\nimport { windowIsAvailable } from '../../utils';\n\nimport { ConfigurationContext } from './Configuration';\n\nexport interface ThemeOverrideProps {\n /** Content that will inherit theming overrides. */\n children: ReactNode;\n /** Theme object used to override theme properties. */\n theme: DefaultSettableTheme;\n}\n\nconst ThemeOverride = ({ children, theme }: ThemeOverrideProps) => {\n const context = windowIsAvailable\n ? window.cosmos.configurationContext ?? ConfigurationContext\n : ConfigurationContext;\n\n const ctx = useContext(context);\n\n const themeMachine = new ThemeMachine<DefaultThemeDefinition>({\n theme,\n parent: ctx.themeMachine\n });\n\n return (\n <context.Provider\n // eslint-disable-next-line react/jsx-no-constructed-context-values\n value={{ ...ctx, themeMachine }}\n >\n <ThemeProvider theme={themeMachine.theme}>{children}</ThemeProvider>\n </context.Provider>\n );\n};\n\nexport default ThemeOverride;\n"]}
@@ -0,0 +1,17 @@
1
+ import type { DetailedHTMLProps, HTMLAttributes } from 'react';
2
+ declare global {
3
+ interface HTMLElementTagNameMap {
4
+ 'pega-connected-watcher': PegaConnectedWatcher;
5
+ }
6
+ namespace JSX {
7
+ interface IntrinsicElements {
8
+ 'pega-connected-watcher': DetailedHTMLProps<HTMLAttributes<PegaConnectedWatcher>, PegaConnectedWatcher>;
9
+ }
10
+ }
11
+ }
12
+ declare class PegaConnectedWatcher extends HTMLElement {
13
+ connectedCallback(): void;
14
+ disconnectedCallback(): void;
15
+ }
16
+ export default PegaConnectedWatcher;
17
+ //# sourceMappingURL=connected-watcher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connected-watcher.d.ts","sourceRoot":"","sources":["../../../src/components/Configuration/connected-watcher.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE/D,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,wBAAwB,EAAE,oBAAoB,CAAC;KAChD;IAED,UAAU,GAAG,CAAC;QACZ,UAAU,iBAAiB;YACzB,wBAAwB,EAAE,iBAAiB,CACzC,cAAc,CAAC,oBAAoB,CAAC,EACpC,oBAAoB,CACrB,CAAC;SACH;KACF;CACF;AAED,cAAM,oBAAqB,SAAQ,WAAW;IAC5C,iBAAiB;IAIjB,oBAAoB;CAGrB;AAMD,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,13 @@
1
+ class PegaConnectedWatcher extends HTMLElement {
2
+ connectedCallback() {
3
+ this.dispatchEvent(new Event('connect-disconnect', { bubbles: false }));
4
+ }
5
+ disconnectedCallback() {
6
+ this.dispatchEvent(new Event('connect-disconnect', { bubbles: false }));
7
+ }
8
+ }
9
+ if (!customElements.get('pega-connected-watcher')) {
10
+ customElements.define('pega-connected-watcher', PegaConnectedWatcher);
11
+ }
12
+ export default PegaConnectedWatcher;
13
+ //# sourceMappingURL=connected-watcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connected-watcher.js","sourceRoot":"","sources":["../../../src/components/Configuration/connected-watcher.ts"],"names":[],"mappings":"AAiBA,MAAM,oBAAqB,SAAQ,WAAW;IAC5C,iBAAiB;QACf,IAAI,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,oBAAoB,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;IAC1E,CAAC;IAED,oBAAoB;QAClB,IAAI,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,oBAAoB,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;IAC1E,CAAC;CACF;AAED,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,wBAAwB,CAAC,EAAE;IACjD,cAAc,CAAC,MAAM,CAAC,wBAAwB,EAAE,oBAAoB,CAAC,CAAC;CACvE;AAED,eAAe,oBAAoB,CAAC","sourcesContent":["import type { DetailedHTMLProps, HTMLAttributes } from 'react';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'pega-connected-watcher': PegaConnectedWatcher;\n }\n\n namespace JSX {\n interface IntrinsicElements {\n 'pega-connected-watcher': DetailedHTMLProps<\n HTMLAttributes<PegaConnectedWatcher>,\n PegaConnectedWatcher\n >;\n }\n }\n}\n\nclass PegaConnectedWatcher extends HTMLElement {\n connectedCallback() {\n this.dispatchEvent(new Event('connect-disconnect', { bubbles: false }));\n }\n\n disconnectedCallback() {\n this.dispatchEvent(new Event('connect-disconnect', { bubbles: false }));\n }\n}\n\nif (!customElements.get('pega-connected-watcher')) {\n customElements.define('pega-connected-watcher', PegaConnectedWatcher);\n}\n\nexport default PegaConnectedWatcher;\n"]}
@@ -1,4 +1,5 @@
1
1
  export { default } from './Configuration';
2
2
  export type { ConfigurationProps } from './Configuration';
3
3
  export { default as withConfiguration } from './withConfiguration';
4
+ export { default as ThemeOverride } from './ThemeOverride';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Configuration/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Configuration/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
@@ -1,3 +1,4 @@
1
1
  export { default } from './Configuration';
2
2
  export { default as withConfiguration } from './withConfiguration';
3
+ export { default as ThemeOverride } from './ThemeOverride';
3
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Configuration/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC","sourcesContent":["export { default } from './Configuration';\nexport type { ConfigurationProps } from './Configuration';\nexport { default as withConfiguration } from './withConfiguration';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Configuration/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["export { default } from './Configuration';\nexport type { ConfigurationProps } from './Configuration';\nexport { default as withConfiguration } from './withConfiguration';\nexport { default as ThemeOverride } from './ThemeOverride';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"withConfiguration.d.ts","sourceRoot":"","sources":["../../../src/components/Configuration/withConfiguration.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AAI5E;;;GAGG;AACH,QAAA,MAAM,iBAAiB,qHAOlB,CAAC;AAEN,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"withConfiguration.d.ts","sourceRoot":"","sources":["../../../src/components/Configuration/withConfiguration.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AAI5E;;;GAGG;AACH,QAAA,MAAM,iBAAiB,qHAMpB,CAAC;AAEJ,eAAe,iBAAiB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"withConfiguration.js","sourceRoot":"","sources":["../../../src/components/Configuration/withConfiguration.tsx"],"names":[],"mappings":";AAEA,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAE5C;;;GAGG;AACH,MAAM,iBAAiB,GACrB,CAAkC,SAAe,EAAE,EAAE,CACrD,CAAC,KAA4C,EAAE,EAAE,CAC/C,CACE,KAAC,aAAa,cACZ,KAAC,SAAS,OAAM,KAA8B,GAAI,GACpC,CACjB,CAAC;AAEN,eAAe,iBAAiB,CAAC","sourcesContent":["import type { ComponentType, ComponentProps, PropsWithoutRef } from 'react';\n\nimport Configuration from './Configuration';\n\n/**\n * @param Component Component to wrap.\n * @returns A component that renders the passed component wrapped in a Configuration.\n */\nconst withConfiguration =\n <Comp extends ComponentType<any>>(Component: Comp) =>\n (props: PropsWithoutRef<ComponentProps<Comp>>) =>\n (\n <Configuration>\n <Component {...(props as ComponentProps<Comp>)} />\n </Configuration>\n );\n\nexport default withConfiguration;\n"]}
1
+ {"version":3,"file":"withConfiguration.js","sourceRoot":"","sources":["../../../src/components/Configuration/withConfiguration.tsx"],"names":[],"mappings":";AAEA,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAE5C;;;GAGG;AACH,MAAM,iBAAiB,GACrB,CAAkC,SAAe,EAAE,EAAE,CACrD,CAAC,KAA4C,EAAE,EAAE,CAAC,CAChD,KAAC,aAAa,cACZ,KAAC,SAAS,OAAM,KAA8B,GAAI,GACpC,CACjB,CAAC;AAEJ,eAAe,iBAAiB,CAAC","sourcesContent":["import type { ComponentType, ComponentProps, PropsWithoutRef } from 'react';\n\nimport Configuration from './Configuration';\n\n/**\n * @param Component Component to wrap.\n * @returns A component that renders the passed component wrapped in a Configuration.\n */\nconst withConfiguration =\n <Comp extends ComponentType<any>>(Component: Comp) =>\n (props: PropsWithoutRef<ComponentProps<Comp>>) => (\n <Configuration>\n <Component {...(props as ComponentProps<Comp>)} />\n </Configuration>\n );\n\nexport default withConfiguration;\n"]}
@@ -1,11 +1,10 @@
1
- import type { Ref } from 'react';
2
- import type { BaseProps, NoChildrenProp } from '../../types';
1
+ import type { NoChildrenProp, OmitStrict, WithAttributes } from '../../types';
3
2
  import type { FormControlProps } from '../FormControl';
4
3
  export type ObfuscationMode = 'none' | 'partial' | 'full';
5
4
  export interface FormattingOptions {
6
5
  obfuscation?: ObfuscationMode;
7
6
  }
8
- export interface CreditCardDisplayProps extends BaseProps, NoChildrenProp {
7
+ export type CreditCardDisplayProps = WithAttributes<'span', NoChildrenProp & {
9
8
  /** Number value. */
10
9
  value?: string;
11
10
  /** Options to define formatting. */
@@ -18,15 +17,8 @@ export interface CreditCardDisplayProps extends BaseProps, NoChildrenProp {
18
17
  */
19
18
  obfuscation?: ObfuscationMode;
20
19
  };
21
- /** Ref for the wrapping element. */
22
- ref?: Ref<HTMLSpanElement>;
23
- }
24
- export interface CreditCardInputProps extends BaseProps, NoChildrenProp {
25
- /**
26
- * Sets DOM id for the control and associates label element via 'for' attribute.
27
- * If an id is not pass, a random id will be generated for any render.
28
- */
29
- id?: FormControlProps['id'];
20
+ }>;
21
+ export type CreditCardInputProps = OmitStrict<WithAttributes<'input', NoChildrenProp & {
30
22
  /** Set visual state based on a validation state. */
31
23
  status?: FormControlProps['status'];
32
24
  /** Pass a string or a fragment with an Icon and string. */
@@ -38,16 +30,6 @@ export interface CreditCardInputProps extends BaseProps, NoChildrenProp {
38
30
  labelHidden?: FormControlProps['labelHidden'];
39
31
  /** It is recommended to pass a simple string to offer guidance. Text will be styled based on status prop. */
40
32
  info?: FormControlProps['info'];
41
- /** Indicate if the field is required. The browser defaults to false. */
42
- required?: FormControlProps['required'];
43
- /** Placeholder text. The browser defaults to an empty string. */
44
- placeholder?: string;
45
- /** Disable the control. The browser defaults to false. */
46
- disabled?: FormControlProps['disabled'];
47
- /** Makes the component non editable and non clickable. The browser defaults to false. */
48
- readOnly?: FormControlProps['readOnly'];
49
- /** Sets html name attribute for the underlying control. Useful for mapping to a data field. */
50
- name?: FormControlProps['name'];
51
33
  /**
52
34
  * CurrencyInput input value.
53
35
  * Requires an onChange handler to update value.
@@ -62,7 +44,5 @@ export interface CreditCardInputProps extends BaseProps, NoChildrenProp {
62
44
  onBlur?: (value?: string) => void;
63
45
  /** Pass a heading and content to show additional information on the field. */
64
46
  additionalInfo?: FormControlProps['additionalInfo'];
65
- /** Ref for the wrapping element. */
66
- ref?: Ref<HTMLInputElement>;
67
- }
47
+ }>, 'type' | 'defaultValue'>;
68
48
  //# sourceMappingURL=CreditCard.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CreditCard.types.d.ts","sourceRoot":"","sources":["../../../src/components/CreditCard/CreditCard.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;AAE1D,MAAM,WAAW,iBAAiB;IAChC,WAAW,CAAC,EAAE,eAAe,CAAC;CAC/B;AAED,MAAM,WAAW,sBAAuB,SAAQ,SAAS,EAAE,cAAc;IACvE,oBAAoB;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,iBAAiB,CAAC,EAAE;QAClB;;;;;WAKG;QACH,WAAW,CAAC,EAAE,eAAe,CAAC;KAC/B,CAAC;IACF,oCAAoC;IACpC,GAAG,CAAC,EAAE,GAAG,CAAC,eAAe,CAAC,CAAC;CAC5B;A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