@pega/cosmos-react-core 9.0.0-build.9.8 → 9.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1414) hide show
  1. package/lib/components/AIButton/AIButton.d.ts +3 -1
  2. package/lib/components/AIButton/AIButton.d.ts.map +1 -1
  3. package/lib/components/AIRewrite/AIRewrite.d.ts +4 -0
  4. package/lib/components/AIRewrite/AIRewrite.d.ts.map +1 -0
  5. package/lib/components/AIRewrite/AIRewrite.js +39 -0
  6. package/lib/components/AIRewrite/AIRewrite.js.map +1 -0
  7. package/lib/components/AIRewrite/AIRewrite.styles.d.ts +24 -0
  8. package/lib/components/AIRewrite/AIRewrite.styles.d.ts.map +1 -0
  9. package/lib/components/AIRewrite/AIRewrite.styles.js +24 -0
  10. package/lib/components/AIRewrite/AIRewrite.styles.js.map +1 -0
  11. package/lib/components/AIRewrite/AIRewrite.test-ids.d.ts +2 -0
  12. package/lib/components/AIRewrite/AIRewrite.test-ids.d.ts.map +1 -0
  13. package/lib/components/AIRewrite/AIRewrite.test-ids.js +10 -0
  14. package/lib/components/AIRewrite/AIRewrite.test-ids.js.map +1 -0
  15. package/lib/components/AIRewrite/AIRewrite.types.d.ts +21 -0
  16. package/lib/components/AIRewrite/AIRewrite.types.d.ts.map +1 -0
  17. package/lib/components/AIRewrite/AIRewrite.types.js +2 -0
  18. package/lib/components/AIRewrite/AIRewrite.types.js.map +1 -0
  19. package/lib/components/AIRewrite/index.d.ts +4 -0
  20. package/lib/components/AIRewrite/index.d.ts.map +1 -0
  21. package/lib/components/AIRewrite/index.js +3 -0
  22. package/lib/components/AIRewrite/index.js.map +1 -0
  23. package/lib/components/Actions/Actions.d.ts +2 -0
  24. package/lib/components/Actions/Actions.d.ts.map +1 -1
  25. package/lib/components/Actions/Actions.js +34 -8
  26. package/lib/components/Actions/Actions.js.map +1 -1
  27. package/lib/components/AdditionalInfo/AdditionalInfo.d.ts +1 -1
  28. package/lib/components/AdditionalInfo/AdditionalInfo.d.ts.map +1 -1
  29. package/lib/components/AppShell/AppHeader.d.ts.map +1 -1
  30. package/lib/components/AppShell/AppHeader.js +11 -2
  31. package/lib/components/AppShell/AppHeader.js.map +1 -1
  32. package/lib/components/AppShell/AppHeader.styles.d.ts +14 -12
  33. package/lib/components/AppShell/AppHeader.styles.d.ts.map +1 -1
  34. package/lib/components/AppShell/AppHeader.styles.js +36 -16
  35. package/lib/components/AppShell/AppHeader.styles.js.map +1 -1
  36. package/lib/components/AppShell/AppNavigationPanel.d.ts +14 -0
  37. package/lib/components/AppShell/AppNavigationPanel.d.ts.map +1 -0
  38. package/lib/components/AppShell/AppNavigationPanel.js +173 -0
  39. package/lib/components/AppShell/AppNavigationPanel.js.map +1 -0
  40. package/lib/components/AppShell/AppNavigationPanel.types.d.ts +28 -0
  41. package/lib/components/AppShell/AppNavigationPanel.types.d.ts.map +1 -0
  42. package/lib/components/AppShell/AppNavigationPanel.types.js +2 -0
  43. package/lib/components/AppShell/AppNavigationPanel.types.js.map +1 -0
  44. package/lib/components/AppShell/AppShell.d.ts +2 -5
  45. package/lib/components/AppShell/AppShell.d.ts.map +1 -1
  46. package/lib/components/AppShell/AppShell.js +213 -202
  47. package/lib/components/AppShell/AppShell.js.map +1 -1
  48. package/lib/components/AppShell/AppShell.styles.d.ts +243 -31
  49. package/lib/components/AppShell/AppShell.styles.d.ts.map +1 -1
  50. package/lib/components/AppShell/AppShell.styles.js +574 -128
  51. package/lib/components/AppShell/AppShell.styles.js.map +1 -1
  52. package/lib/components/AppShell/AppShell.types.d.ts +42 -5
  53. package/lib/components/AppShell/AppShell.types.d.ts.map +1 -1
  54. package/lib/components/AppShell/AppShell.types.js.map +1 -1
  55. package/lib/components/AppShell/AppShellContext.d.ts +6 -2
  56. package/lib/components/AppShell/AppShellContext.d.ts.map +1 -1
  57. package/lib/components/AppShell/AppShellContext.js +5 -9
  58. package/lib/components/AppShell/AppShellContext.js.map +1 -1
  59. package/lib/components/AppShell/AppShellList.styles.d.ts +14 -14
  60. package/lib/components/AppShell/AppShellList.styles.d.ts.map +1 -1
  61. package/lib/components/AppShell/AppShellList.styles.js +0 -1
  62. package/lib/components/AppShell/AppShellList.styles.js.map +1 -1
  63. package/lib/components/AppShell/AppShellSearch.d.ts.map +1 -1
  64. package/lib/components/AppShell/AppShellSearch.js +2 -4
  65. package/lib/components/AppShell/AppShellSearch.js.map +1 -1
  66. package/lib/components/AppShell/AppShellSearch.styles.d.ts +7 -5
  67. package/lib/components/AppShell/AppShellSearch.styles.d.ts.map +1 -1
  68. package/lib/components/AppShell/AppShellSearch.styles.js +3 -3
  69. package/lib/components/AppShell/AppShellSearch.styles.js.map +1 -1
  70. package/lib/components/AppShell/AppTopNav.d.ts +4 -0
  71. package/lib/components/AppShell/AppTopNav.d.ts.map +1 -0
  72. package/lib/components/AppShell/AppTopNav.js +183 -0
  73. package/lib/components/AppShell/AppTopNav.js.map +1 -0
  74. package/lib/components/AppShell/AppTopNav.styles.d.ts +946 -0
  75. package/lib/components/AppShell/AppTopNav.styles.d.ts.map +1 -0
  76. package/lib/components/AppShell/AppTopNav.styles.js +184 -0
  77. package/lib/components/AppShell/AppTopNav.styles.js.map +1 -0
  78. package/lib/components/AppShell/AppTopNav.types.d.ts +16 -0
  79. package/lib/components/AppShell/AppTopNav.types.d.ts.map +1 -0
  80. package/lib/components/AppShell/AppTopNav.types.js +2 -0
  81. package/lib/components/AppShell/AppTopNav.types.js.map +1 -0
  82. package/lib/components/AppShell/Drawer.d.ts +2 -1
  83. package/lib/components/AppShell/Drawer.d.ts.map +1 -1
  84. package/lib/components/AppShell/Drawer.js +15 -14
  85. package/lib/components/AppShell/Drawer.js.map +1 -1
  86. package/lib/components/AppShell/Drawer.styles.d.ts +22 -11
  87. package/lib/components/AppShell/Drawer.styles.d.ts.map +1 -1
  88. package/lib/components/AppShell/Drawer.styles.js +37 -40
  89. package/lib/components/AppShell/Drawer.styles.js.map +1 -1
  90. package/lib/components/AppShell/NavigationList.d.ts.map +1 -1
  91. package/lib/components/AppShell/NavigationList.js +17 -13
  92. package/lib/components/AppShell/NavigationList.js.map +1 -1
  93. package/lib/components/AppShell/NavigationListItemWrapper.d.ts.map +1 -1
  94. package/lib/components/AppShell/NavigationListItemWrapper.js +125 -65
  95. package/lib/components/AppShell/NavigationListItemWrapper.js.map +1 -1
  96. package/lib/components/AppShell/ThemeSwitcher.d.ts +11 -0
  97. package/lib/components/AppShell/ThemeSwitcher.d.ts.map +1 -0
  98. package/lib/components/AppShell/ThemeSwitcher.js +58 -0
  99. package/lib/components/AppShell/ThemeSwitcher.js.map +1 -0
  100. package/lib/components/AppShell/ThemeSwitcher.test-ids.d.ts +2 -0
  101. package/lib/components/AppShell/ThemeSwitcher.test-ids.d.ts.map +1 -0
  102. package/lib/components/AppShell/ThemeSwitcher.test-ids.js +3 -0
  103. package/lib/components/AppShell/ThemeSwitcher.test-ids.js.map +1 -0
  104. package/lib/components/AppShell/TopNavMoreMenu.d.ts +9 -0
  105. package/lib/components/AppShell/TopNavMoreMenu.d.ts.map +1 -0
  106. package/lib/components/AppShell/TopNavMoreMenu.js +73 -0
  107. package/lib/components/AppShell/TopNavMoreMenu.js.map +1 -0
  108. package/lib/components/AppShell/index.d.ts +2 -1
  109. package/lib/components/AppShell/index.d.ts.map +1 -1
  110. package/lib/components/AppShell/index.js +1 -0
  111. package/lib/components/AppShell/index.js.map +1 -1
  112. package/lib/components/AppShell/style-utils.d.ts +0 -1
  113. package/lib/components/AppShell/style-utils.d.ts.map +1 -1
  114. package/lib/components/AppShell/style-utils.js +0 -1
  115. package/lib/components/AppShell/style-utils.js.map +1 -1
  116. package/lib/components/AppShell/useTopNavOverflow.d.ts +17 -0
  117. package/lib/components/AppShell/useTopNavOverflow.d.ts.map +1 -0
  118. package/lib/components/AppShell/useTopNavOverflow.js +73 -0
  119. package/lib/components/AppShell/useTopNavOverflow.js.map +1 -0
  120. package/lib/components/AppShell/utils.d.ts +9 -0
  121. package/lib/components/AppShell/utils.d.ts.map +1 -1
  122. package/lib/components/AppShell/utils.js +16 -1
  123. package/lib/components/AppShell/utils.js.map +1 -1
  124. package/lib/components/Avatar/Avatar.d.ts +9 -5
  125. package/lib/components/Avatar/Avatar.d.ts.map +1 -1
  126. package/lib/components/Avatar/Avatar.js +13 -8
  127. package/lib/components/Avatar/Avatar.js.map +1 -1
  128. package/lib/components/Backdrop/Backdrop.d.ts +186 -3
  129. package/lib/components/Backdrop/Backdrop.d.ts.map +1 -1
  130. package/lib/components/Backdrop/Backdrop.js +20 -21
  131. package/lib/components/Backdrop/Backdrop.js.map +1 -1
  132. package/lib/components/Badges/Alert.d.ts +1 -1
  133. package/lib/components/Badges/Alert.d.ts.map +1 -1
  134. package/lib/components/Badges/Count.d.ts +4 -2
  135. package/lib/components/Badges/Count.d.ts.map +1 -1
  136. package/lib/components/Badges/Count.js +9 -3
  137. package/lib/components/Badges/Count.js.map +1 -1
  138. package/lib/components/Badges/Keyboard.d.ts +1 -1
  139. package/lib/components/Badges/Keyboard.d.ts.map +1 -1
  140. package/lib/components/Badges/Keyboard.js +8 -2
  141. package/lib/components/Badges/Keyboard.js.map +1 -1
  142. package/lib/components/Badges/Selection.d.ts +8 -4
  143. package/lib/components/Badges/Selection.d.ts.map +1 -1
  144. package/lib/components/Badges/Selection.js +23 -7
  145. package/lib/components/Badges/Selection.js.map +1 -1
  146. package/lib/components/Badges/Status.d.ts +2 -2
  147. package/lib/components/Badges/Status.d.ts.map +1 -1
  148. package/lib/components/Badges/Tag.d.ts +10 -2
  149. package/lib/components/Badges/Tag.d.ts.map +1 -1
  150. package/lib/components/Badges/Tag.js.map +1 -1
  151. package/lib/components/Banner/Banner.d.ts +10 -13
  152. package/lib/components/Banner/Banner.d.ts.map +1 -1
  153. package/lib/components/Banner/Banner.js +49 -102
  154. package/lib/components/Banner/Banner.js.map +1 -1
  155. package/lib/components/Banner/Banner.styles.d.ts +22 -0
  156. package/lib/components/Banner/Banner.styles.d.ts.map +1 -0
  157. package/lib/components/Banner/Banner.styles.js +84 -0
  158. package/lib/components/Banner/Banner.styles.js.map +1 -0
  159. package/lib/components/Breadcrumbs/Breadcrumbs.d.ts +2 -3
  160. package/lib/components/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
  161. package/lib/components/Button/BareButton.d.ts +1 -1
  162. package/lib/components/Button/BareButton.d.ts.map +1 -1
  163. package/lib/components/Button/BareButton.js +4 -1
  164. package/lib/components/Button/BareButton.js.map +1 -1
  165. package/lib/components/Button/BareRoleButton.d.ts +1 -1
  166. package/lib/components/Button/BareRoleButton.d.ts.map +1 -1
  167. package/lib/components/Button/Button.d.ts +7 -3
  168. package/lib/components/Button/Button.d.ts.map +1 -1
  169. package/lib/components/Button/Button.js +22 -8
  170. package/lib/components/Button/Button.js.map +1 -1
  171. package/lib/components/Card/Card.d.ts +3 -3
  172. package/lib/components/Card/Card.d.ts.map +1 -1
  173. package/lib/components/Card/Card.js +25 -25
  174. package/lib/components/Card/Card.js.map +1 -1
  175. package/lib/components/Card/Card.test-ids.d.ts +2 -0
  176. package/lib/components/Card/Card.test-ids.d.ts.map +1 -0
  177. package/lib/components/Card/Card.test-ids.js +3 -0
  178. package/lib/components/Card/Card.test-ids.js.map +1 -0
  179. package/lib/components/Card/CardContent.d.ts +1 -1
  180. package/lib/components/Card/CardContent.d.ts.map +1 -1
  181. package/lib/components/Card/CardContent.js +6 -1
  182. package/lib/components/Card/CardContent.js.map +1 -1
  183. package/lib/components/Card/CardFooter.d.ts +1 -1
  184. package/lib/components/Card/CardFooter.d.ts.map +1 -1
  185. package/lib/components/Card/CardFooter.js +4 -0
  186. package/lib/components/Card/CardFooter.js.map +1 -1
  187. package/lib/components/Card/CardHeader.d.ts +1 -1
  188. package/lib/components/Card/CardHeader.d.ts.map +1 -1
  189. package/lib/components/Card/CardHeader.js +19 -3
  190. package/lib/components/Card/CardHeader.js.map +1 -1
  191. package/lib/components/Card/CardMedia.d.ts +1 -1
  192. package/lib/components/Card/CardMedia.d.ts.map +1 -1
  193. package/lib/components/Checkbox/Checkbox.test-ids.d.ts +1 -1
  194. package/lib/components/Checkbox/Checkbox.test-ids.d.ts.map +1 -1
  195. package/lib/components/Checkbox/CheckboxCard.d.ts +11 -3
  196. package/lib/components/Checkbox/CheckboxCard.d.ts.map +1 -1
  197. package/lib/components/Checkbox/CheckboxCard.js +5 -22
  198. package/lib/components/Checkbox/CheckboxCard.js.map +1 -1
  199. package/lib/components/CheckboxGroup/CheckboxGroup.d.ts +7 -0
  200. package/lib/components/CheckboxGroup/CheckboxGroup.d.ts.map +1 -0
  201. package/lib/components/CheckboxGroup/CheckboxGroup.js +10 -0
  202. package/lib/components/CheckboxGroup/CheckboxGroup.js.map +1 -0
  203. package/lib/components/CheckboxGroup/index.d.ts +2 -1
  204. package/lib/components/CheckboxGroup/index.d.ts.map +1 -1
  205. package/lib/components/CheckboxGroup/index.js +1 -1
  206. package/lib/components/CheckboxGroup/index.js.map +1 -1
  207. package/lib/components/ClassificationMarking/ClassificationMarking.d.ts +6 -0
  208. package/lib/components/ClassificationMarking/ClassificationMarking.d.ts.map +1 -0
  209. package/lib/components/ClassificationMarking/ClassificationMarking.js +11 -0
  210. package/lib/components/ClassificationMarking/ClassificationMarking.js.map +1 -0
  211. package/lib/components/ClassificationMarking/ClassificationMarking.styles.d.ts +19 -0
  212. package/lib/components/ClassificationMarking/ClassificationMarking.styles.d.ts.map +1 -0
  213. package/lib/components/ClassificationMarking/ClassificationMarking.styles.js +66 -0
  214. package/lib/components/ClassificationMarking/ClassificationMarking.styles.js.map +1 -0
  215. package/lib/components/ClassificationMarking/ClassificationMarking.test-ids.d.ts +2 -0
  216. package/lib/components/ClassificationMarking/ClassificationMarking.test-ids.d.ts.map +1 -0
  217. package/lib/components/ClassificationMarking/ClassificationMarking.test-ids.js +7 -0
  218. package/lib/components/ClassificationMarking/ClassificationMarking.test-ids.js.map +1 -0
  219. package/lib/components/ClassificationMarking/ClassificationMarking.types.d.ts +19 -0
  220. package/lib/components/ClassificationMarking/ClassificationMarking.types.d.ts.map +1 -0
  221. package/lib/components/ClassificationMarking/ClassificationMarking.types.js +2 -0
  222. package/lib/components/ClassificationMarking/ClassificationMarking.types.js.map +1 -0
  223. package/lib/components/ClassificationMarking/index.d.ts +3 -0
  224. package/lib/components/ClassificationMarking/index.d.ts.map +1 -0
  225. package/lib/components/ClassificationMarking/index.js +2 -0
  226. package/lib/components/ClassificationMarking/index.js.map +1 -0
  227. package/lib/components/ComboBox/ComboBox.d.ts.map +1 -1
  228. package/lib/components/ComboBox/ComboBox.js +9 -8
  229. package/lib/components/ComboBox/ComboBox.js.map +1 -1
  230. package/lib/components/ComboBox/ComboBox.styles.d.ts +8 -3
  231. package/lib/components/ComboBox/ComboBox.styles.d.ts.map +1 -1
  232. package/lib/components/ComboBox/ComboBox.styles.js +33 -16
  233. package/lib/components/ComboBox/ComboBox.styles.js.map +1 -1
  234. package/lib/components/ComboBox/ComboBox.types.d.ts +1 -0
  235. package/lib/components/ComboBox/ComboBox.types.d.ts.map +1 -1
  236. package/lib/components/ComboBox/ComboBox.types.js.map +1 -1
  237. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.d.ts +3 -1
  238. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.d.ts.map +1 -1
  239. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.js +84 -10
  240. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.js.map +1 -1
  241. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.types.d.ts +2 -0
  242. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.types.d.ts.map +1 -1
  243. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.types.js.map +1 -1
  244. package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.d.ts +3 -1
  245. package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.d.ts.map +1 -1
  246. package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.js +33 -4
  247. package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.js.map +1 -1
  248. package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.types.d.ts +2 -0
  249. package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.types.d.ts.map +1 -1
  250. package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.types.js.map +1 -1
  251. package/lib/components/ComboBox/index.d.ts +1 -0
  252. package/lib/components/ComboBox/index.d.ts.map +1 -1
  253. package/lib/components/ComboBox/index.js +1 -0
  254. package/lib/components/ComboBox/index.js.map +1 -1
  255. package/lib/components/CompositeInput/CompositeInput.d.ts.map +1 -1
  256. package/lib/components/CompositeInput/CompositeInput.js +7 -9
  257. package/lib/components/CompositeInput/CompositeInput.js.map +1 -1
  258. package/lib/components/CompositeInput/CompositeInput.styles.d.ts +8 -3
  259. package/lib/components/CompositeInput/CompositeInput.styles.d.ts.map +1 -1
  260. package/lib/components/CompositeInput/CompositeInput.styles.js +31 -1
  261. package/lib/components/CompositeInput/CompositeInput.styles.js.map +1 -1
  262. package/lib/components/Configuration/Configuration.d.ts +8 -3
  263. package/lib/components/Configuration/Configuration.d.ts.map +1 -1
  264. package/lib/components/Configuration/Configuration.js +17 -3
  265. package/lib/components/Configuration/Configuration.js.map +1 -1
  266. package/lib/components/Configuration/LocaleOverride.d.ts +10 -0
  267. package/lib/components/Configuration/LocaleOverride.d.ts.map +1 -0
  268. package/lib/components/Configuration/LocaleOverride.js +23 -0
  269. package/lib/components/Configuration/LocaleOverride.js.map +1 -0
  270. package/lib/components/Configuration/index.d.ts +2 -0
  271. package/lib/components/Configuration/index.d.ts.map +1 -1
  272. package/lib/components/Configuration/index.js +1 -0
  273. package/lib/components/Configuration/index.js.map +1 -1
  274. package/lib/components/CreditCard/CreditCard.types.d.ts +4 -0
  275. package/lib/components/CreditCard/CreditCard.types.d.ts.map +1 -1
  276. package/lib/components/CreditCard/CreditCard.types.js.map +1 -1
  277. package/lib/components/CreditCard/CreditCardInput.d.ts +2 -1
  278. package/lib/components/CreditCard/CreditCardInput.d.ts.map +1 -1
  279. package/lib/components/CreditCard/CreditCardInput.js +1 -1
  280. package/lib/components/CreditCard/CreditCardInput.js.map +1 -1
  281. package/lib/components/Currency/CurrencyInput.js +1 -1
  282. package/lib/components/Currency/CurrencyInput.js.map +1 -1
  283. package/lib/components/Currency/CurrencyInput.styles.d.ts +4 -2
  284. package/lib/components/Currency/CurrencyInput.styles.d.ts.map +1 -1
  285. package/lib/components/DangerButton/DangerButton.d.ts +3 -1
  286. package/lib/components/DangerButton/DangerButton.d.ts.map +1 -1
  287. package/lib/components/DateTime/DateTime.types.d.ts +7 -1
  288. package/lib/components/DateTime/DateTime.types.d.ts.map +1 -1
  289. package/lib/components/DateTime/DateTime.types.js.map +1 -1
  290. package/lib/components/DateTime/DateTimeDisplay.d.ts +1 -1
  291. package/lib/components/DateTime/DateTimeDisplay.d.ts.map +1 -1
  292. package/lib/components/DateTime/Input/DateInput.d.ts +7 -2
  293. package/lib/components/DateTime/Input/DateInput.d.ts.map +1 -1
  294. package/lib/components/DateTime/Input/DateInput.js +16 -8
  295. package/lib/components/DateTime/Input/DateInput.js.map +1 -1
  296. package/lib/components/DateTime/Input/DateRangeInput.d.ts.map +1 -1
  297. package/lib/components/DateTime/Input/DateRangeInput.js +10 -4
  298. package/lib/components/DateTime/Input/DateRangeInput.js.map +1 -1
  299. package/lib/components/DateTime/Input/DateTime.styles.d.ts +11 -7
  300. package/lib/components/DateTime/Input/DateTime.styles.d.ts.map +1 -1
  301. package/lib/components/DateTime/Input/DateTime.styles.js +5 -2
  302. package/lib/components/DateTime/Input/DateTime.styles.js.map +1 -1
  303. package/lib/components/DateTime/Input/DateTimeInput.d.ts +4 -2
  304. package/lib/components/DateTime/Input/DateTimeInput.d.ts.map +1 -1
  305. package/lib/components/DateTime/Input/DateTimeInput.js +20 -14
  306. package/lib/components/DateTime/Input/DateTimeInput.js.map +1 -1
  307. package/lib/components/DateTime/Input/DayOfWeekInput.d.ts.map +1 -1
  308. package/lib/components/DateTime/Input/DayOfWeekInput.js.map +1 -1
  309. package/lib/components/DateTime/Input/Duration/DurationInput.d.ts.map +1 -1
  310. package/lib/components/DateTime/Input/Duration/DurationInput.js +2 -4
  311. package/lib/components/DateTime/Input/Duration/DurationInput.js.map +1 -1
  312. package/lib/components/DateTime/Input/Duration/NumberUnit.d.ts +3 -1
  313. package/lib/components/DateTime/Input/Duration/NumberUnit.d.ts.map +1 -1
  314. package/lib/components/DateTime/Input/MonthInput.d.ts +3 -1
  315. package/lib/components/DateTime/Input/MonthInput.d.ts.map +1 -1
  316. package/lib/components/DateTime/Input/MonthInput.js +6 -8
  317. package/lib/components/DateTime/Input/MonthInput.js.map +1 -1
  318. package/lib/components/DateTime/Input/PartInput.d.ts.map +1 -1
  319. package/lib/components/DateTime/Input/PartInput.js +21 -12
  320. package/lib/components/DateTime/Input/PartInput.js.map +1 -1
  321. package/lib/components/DateTime/Input/QuarterInput.d.ts +3 -1
  322. package/lib/components/DateTime/Input/QuarterInput.d.ts.map +1 -1
  323. package/lib/components/DateTime/Input/QuarterInput.js +2 -2
  324. package/lib/components/DateTime/Input/QuarterInput.js.map +1 -1
  325. package/lib/components/DateTime/Input/TimeInput.d.ts +3 -1
  326. package/lib/components/DateTime/Input/TimeInput.d.ts.map +1 -1
  327. package/lib/components/DateTime/Input/TimeInput.js +3 -3
  328. package/lib/components/DateTime/Input/TimeInput.js.map +1 -1
  329. package/lib/components/DateTime/Input/TimeRangeInput.d.ts.map +1 -1
  330. package/lib/components/DateTime/Input/TimeRangeInput.js +9 -4
  331. package/lib/components/DateTime/Input/TimeRangeInput.js.map +1 -1
  332. package/lib/components/DateTime/Input/WeekInput.d.ts +3 -1
  333. package/lib/components/DateTime/Input/WeekInput.d.ts.map +1 -1
  334. package/lib/components/DateTime/Input/WeekInput.js +23 -12
  335. package/lib/components/DateTime/Input/WeekInput.js.map +1 -1
  336. package/lib/components/DateTime/Input/local.d.ts +10 -9
  337. package/lib/components/DateTime/Input/local.d.ts.map +1 -1
  338. package/lib/components/DateTime/Input/local.js.map +1 -1
  339. package/lib/components/DateTime/Input/utils.d.ts +11 -11
  340. package/lib/components/DateTime/Input/utils.d.ts.map +1 -1
  341. package/lib/components/DateTime/Input/utils.js +77 -48
  342. package/lib/components/DateTime/Input/utils.js.map +1 -1
  343. package/lib/components/DateTime/Picker/Calendar.d.ts +4 -1
  344. package/lib/components/DateTime/Picker/Calendar.d.ts.map +1 -1
  345. package/lib/components/DateTime/Picker/Calendar.js +28 -26
  346. package/lib/components/DateTime/Picker/Calendar.js.map +1 -1
  347. package/lib/components/DateTime/Picker/Calendar.styles.d.ts +14 -8
  348. package/lib/components/DateTime/Picker/Calendar.styles.d.ts.map +1 -1
  349. package/lib/components/DateTime/Picker/Calendar.styles.js +6 -1
  350. package/lib/components/DateTime/Picker/Calendar.styles.js.map +1 -1
  351. package/lib/components/DateTime/Picker/DatePicker.d.ts.map +1 -1
  352. package/lib/components/DateTime/Picker/DatePicker.js +15 -15
  353. package/lib/components/DateTime/Picker/DatePicker.js.map +1 -1
  354. package/lib/components/DateTime/Picker/DatePicker.styles.d.ts +8 -4
  355. package/lib/components/DateTime/Picker/DatePicker.styles.d.ts.map +1 -1
  356. package/lib/components/DateTime/Picker/DatePicker.styles.js +5 -4
  357. package/lib/components/DateTime/Picker/DatePicker.styles.js.map +1 -1
  358. package/lib/components/DateTime/Picker/DatePicker.types.d.ts +11 -1
  359. package/lib/components/DateTime/Picker/DatePicker.types.d.ts.map +1 -1
  360. package/lib/components/DateTime/Picker/DatePicker.types.js.map +1 -1
  361. package/lib/components/DateTime/Picker/DateRangePicker.d.ts.map +1 -1
  362. package/lib/components/DateTime/Picker/DateRangePicker.js +15 -15
  363. package/lib/components/DateTime/Picker/DateRangePicker.js.map +1 -1
  364. package/lib/components/DateTime/Picker/TimePicker.d.ts +2 -0
  365. package/lib/components/DateTime/Picker/TimePicker.d.ts.map +1 -1
  366. package/lib/components/DateTime/Picker/TimePicker.js +19 -11
  367. package/lib/components/DateTime/Picker/TimePicker.js.map +1 -1
  368. package/lib/components/DateTime/Picker/Weeks.d.ts +3 -2
  369. package/lib/components/DateTime/Picker/Weeks.d.ts.map +1 -1
  370. package/lib/components/DateTime/Picker/Weeks.js +7 -7
  371. package/lib/components/DateTime/Picker/Weeks.js.map +1 -1
  372. package/lib/components/DateTime/Picker/utils.d.ts +4 -3
  373. package/lib/components/DateTime/Picker/utils.d.ts.map +1 -1
  374. package/lib/components/DateTime/Picker/utils.js.map +1 -1
  375. package/lib/components/DateTime/utils.d.ts +8 -1
  376. package/lib/components/DateTime/utils.d.ts.map +1 -1
  377. package/lib/components/DateTime/utils.js +86 -82
  378. package/lib/components/DateTime/utils.js.map +1 -1
  379. package/lib/components/Dialog/Dialog.styles.d.ts +5 -5
  380. package/lib/components/Dialog/Dialog.styles.d.ts.map +1 -1
  381. package/lib/components/Dialog/Dialog.styles.js +7 -0
  382. package/lib/components/Dialog/Dialog.styles.js.map +1 -1
  383. package/lib/components/Dialog/Dialog.types.d.ts +5 -2
  384. package/lib/components/Dialog/Dialog.types.d.ts.map +1 -1
  385. package/lib/components/Dialog/Dialog.types.js.map +1 -1
  386. package/lib/components/Dialog/FormDialog.d.ts +3 -1
  387. package/lib/components/Dialog/FormDialog.d.ts.map +1 -1
  388. package/lib/components/Dialog/FormDialog.js +20 -15
  389. package/lib/components/Dialog/FormDialog.js.map +1 -1
  390. package/lib/components/Dialog/InfoDialog.d.ts.map +1 -1
  391. package/lib/components/Dialog/InfoDialog.js +15 -14
  392. package/lib/components/Dialog/InfoDialog.js.map +1 -1
  393. package/lib/components/Dialog/InfoDialog.styles.d.ts +6 -2
  394. package/lib/components/Dialog/InfoDialog.styles.d.ts.map +1 -1
  395. package/lib/components/Drawer/Drawer.d.ts +2 -2
  396. package/lib/components/Drawer/Drawer.d.ts.map +1 -1
  397. package/lib/components/Drawer/Drawer.js +9 -0
  398. package/lib/components/Drawer/Drawer.js.map +1 -1
  399. package/lib/components/Drawer/ResizeHandle.d.ts +2 -1
  400. package/lib/components/Drawer/ResizeHandle.d.ts.map +1 -1
  401. package/lib/components/Drawer/ResizeHandle.js +3 -2
  402. package/lib/components/Drawer/ResizeHandle.js.map +1 -1
  403. package/lib/components/EmojiPicker/EmojiPicker.styles.d.ts +2 -2
  404. package/lib/components/EmojiPicker/EmojiPicker.styles.d.ts.map +1 -1
  405. package/lib/components/EmojiPicker/EmojiPicker.styles.js +1 -1
  406. package/lib/components/EmojiPicker/EmojiPicker.styles.js.map +1 -1
  407. package/lib/components/EmptyState/EmptyState.d.ts +1 -1
  408. package/lib/components/EmptyState/EmptyState.d.ts.map +1 -1
  409. package/lib/components/ErrorState/ErrorState.d.ts +1 -1
  410. package/lib/components/ErrorState/ErrorState.d.ts.map +1 -1
  411. package/lib/components/ExpandCollapse/ExpandCollapseButton.d.ts +32 -0
  412. package/lib/components/ExpandCollapse/ExpandCollapseButton.d.ts.map +1 -0
  413. package/lib/components/ExpandCollapse/ExpandCollapseButton.js +81 -0
  414. package/lib/components/ExpandCollapse/ExpandCollapseButton.js.map +1 -0
  415. package/lib/components/ExpandCollapse/index.d.ts +2 -0
  416. package/lib/components/ExpandCollapse/index.d.ts.map +1 -1
  417. package/lib/components/ExpandCollapse/index.js +1 -0
  418. package/lib/components/ExpandCollapse/index.js.map +1 -1
  419. package/lib/components/FieldGroup/FieldGroup.d.ts +381 -8
  420. package/lib/components/FieldGroup/FieldGroup.d.ts.map +1 -1
  421. package/lib/components/FieldGroup/FieldGroup.js +27 -22
  422. package/lib/components/FieldGroup/FieldGroup.js.map +1 -1
  423. package/lib/components/FieldGroup/FieldGroupList.d.ts +2 -2
  424. package/lib/components/FieldGroup/FieldGroupList.d.ts.map +1 -1
  425. package/lib/components/FieldGroup/FieldGroupList.js +61 -48
  426. package/lib/components/FieldGroup/FieldGroupList.js.map +1 -1
  427. package/lib/components/FieldValueList/FieldValueList.d.ts +13 -4
  428. package/lib/components/FieldValueList/FieldValueList.d.ts.map +1 -1
  429. package/lib/components/FieldValueList/FieldValueList.js +20 -9
  430. package/lib/components/FieldValueList/FieldValueList.js.map +1 -1
  431. package/lib/components/FieldValueList/index.d.ts +1 -1
  432. package/lib/components/FieldValueList/index.d.ts.map +1 -1
  433. package/lib/components/FieldValueList/index.js +1 -1
  434. package/lib/components/FieldValueList/index.js.map +1 -1
  435. package/lib/components/File/FileDisplay.d.ts +1 -1
  436. package/lib/components/File/FileDisplay.d.ts.map +1 -1
  437. package/lib/components/File/FileDisplay.js +2 -2
  438. package/lib/components/File/FileDisplay.js.map +1 -1
  439. package/lib/components/File/FileInput.d.ts.map +1 -1
  440. package/lib/components/File/FileInput.js +11 -21
  441. package/lib/components/File/FileInput.js.map +1 -1
  442. package/lib/components/File/FileInput.styles.d.ts +753 -17
  443. package/lib/components/File/FileInput.styles.d.ts.map +1 -1
  444. package/lib/components/File/FileInput.styles.js +16 -18
  445. package/lib/components/File/FileInput.styles.js.map +1 -1
  446. package/lib/components/File/FileItem.d.ts +11 -3
  447. package/lib/components/File/FileItem.d.ts.map +1 -1
  448. package/lib/components/File/FileItem.js +29 -12
  449. package/lib/components/File/FileItem.js.map +1 -1
  450. package/lib/components/File/FileList.d.ts +184 -2
  451. package/lib/components/File/FileList.d.ts.map +1 -1
  452. package/lib/components/File/FileList.js.map +1 -1
  453. package/lib/components/File/FileUploadItem.js +1 -1
  454. package/lib/components/File/FileUploadItem.js.map +1 -1
  455. package/lib/components/File/FileVisual.d.ts +4 -3
  456. package/lib/components/File/FileVisual.d.ts.map +1 -1
  457. package/lib/components/Flex/Flex.d.ts +1 -1
  458. package/lib/components/Flex/Flex.d.ts.map +1 -1
  459. package/lib/components/Flex/Flex.js +1 -1
  460. package/lib/components/Flex/Flex.js.map +1 -1
  461. package/lib/components/FormControl/FormControl.d.ts +2 -2
  462. package/lib/components/FormControl/FormControl.d.ts.map +1 -1
  463. package/lib/components/FormControl/FormControl.js +65 -54
  464. package/lib/components/FormControl/FormControl.js.map +1 -1
  465. package/lib/components/FormField/FormField.d.ts +12 -5
  466. package/lib/components/FormField/FormField.d.ts.map +1 -1
  467. package/lib/components/FormField/FormField.js +98 -61
  468. package/lib/components/FormField/FormField.js.map +1 -1
  469. package/lib/components/FormField/index.d.ts +1 -1
  470. package/lib/components/FormField/index.d.ts.map +1 -1
  471. package/lib/components/FormField/index.js +1 -1
  472. package/lib/components/FormField/index.js.map +1 -1
  473. package/lib/components/Fullscreen/Fullscreen.d.ts +3 -5
  474. package/lib/components/Fullscreen/Fullscreen.d.ts.map +1 -1
  475. package/lib/components/Fullscreen/Fullscreen.js +12 -8
  476. package/lib/components/Fullscreen/Fullscreen.js.map +1 -1
  477. package/lib/components/Fullscreen/FullscreenButton.d.ts +3 -1
  478. package/lib/components/Fullscreen/FullscreenButton.d.ts.map +1 -1
  479. package/lib/components/Grid/Grid.d.ts +1 -1
  480. package/lib/components/Grid/Grid.d.ts.map +1 -1
  481. package/lib/components/HTML/HTML.d.ts +3 -3
  482. package/lib/components/HTML/HTML.d.ts.map +1 -1
  483. package/lib/components/HTML/HTML.js +11 -5
  484. package/lib/components/HTML/HTML.js.map +1 -1
  485. package/lib/components/HiddenText/HiddenText.d.ts +1 -1
  486. package/lib/components/HiddenText/HiddenText.d.ts.map +1 -1
  487. package/lib/components/Icon/Icon.d.ts +4 -4
  488. package/lib/components/Icon/Icon.d.ts.map +1 -1
  489. package/lib/components/Icon/Icon.js +7 -2
  490. package/lib/components/Icon/Icon.js.map +1 -1
  491. package/lib/components/Icon/iconNames.d.ts +1 -1
  492. package/lib/components/Icon/iconNames.d.ts.map +1 -1
  493. package/lib/components/Icon/iconNames.js +17 -0
  494. package/lib/components/Icon/iconNames.js.map +1 -1
  495. package/lib/components/Icon/icons/arrow-micro-left-right-reverse.icon.d.ts +5 -0
  496. package/lib/components/Icon/icons/arrow-micro-left-right-reverse.icon.d.ts.map +1 -0
  497. package/lib/components/Icon/icons/arrow-micro-left-right-reverse.icon.js +7 -0
  498. package/lib/components/Icon/icons/arrow-micro-left-right-reverse.icon.js.map +1 -0
  499. package/lib/components/Icon/icons/arrow-micro-left-right.icon.d.ts +5 -0
  500. package/lib/components/Icon/icons/arrow-micro-left-right.icon.d.ts.map +1 -0
  501. package/lib/components/Icon/icons/arrow-micro-left-right.icon.js +7 -0
  502. package/lib/components/Icon/icons/arrow-micro-left-right.icon.js.map +1 -0
  503. package/lib/components/Icon/icons/brain.icon.d.ts +5 -0
  504. package/lib/components/Icon/icons/brain.icon.d.ts.map +1 -0
  505. package/lib/components/Icon/icons/brain.icon.js +7 -0
  506. package/lib/components/Icon/icons/brain.icon.js.map +1 -0
  507. package/lib/components/Icon/icons/chats-ai.icon.d.ts +5 -0
  508. package/lib/components/Icon/icons/chats-ai.icon.d.ts.map +1 -0
  509. package/lib/components/Icon/icons/chats-ai.icon.js +7 -0
  510. package/lib/components/Icon/icons/chats-ai.icon.js.map +1 -0
  511. package/lib/components/Icon/icons/check-solid.icon.d.ts +5 -0
  512. package/lib/components/Icon/icons/check-solid.icon.d.ts.map +1 -0
  513. package/lib/components/Icon/icons/check-solid.icon.js +7 -0
  514. package/lib/components/Icon/icons/check-solid.icon.js.map +1 -0
  515. package/lib/components/Icon/icons/clock-sla.icon.d.ts +5 -0
  516. package/lib/components/Icon/icons/clock-sla.icon.d.ts.map +1 -0
  517. package/lib/components/Icon/icons/clock-sla.icon.js +7 -0
  518. package/lib/components/Icon/icons/clock-sla.icon.js.map +1 -0
  519. package/lib/components/Icon/icons/csr-connected.icon.d.ts +5 -0
  520. package/lib/components/Icon/icons/csr-connected.icon.d.ts.map +1 -0
  521. package/lib/components/Icon/icons/csr-connected.icon.js +7 -0
  522. package/lib/components/Icon/icons/csr-connected.icon.js.map +1 -0
  523. package/lib/components/Icon/icons/dataviz-string-field.icon.d.ts.map +1 -1
  524. package/lib/components/Icon/icons/dataviz-string-field.icon.js +1 -1
  525. package/lib/components/Icon/icons/dataviz-string-field.icon.js.map +1 -1
  526. package/lib/components/Icon/icons/gear-box-dotted.icon.d.ts +5 -0
  527. package/lib/components/Icon/icons/gear-box-dotted.icon.d.ts.map +1 -0
  528. package/lib/components/Icon/icons/gear-box-dotted.icon.js +7 -0
  529. package/lib/components/Icon/icons/gear-box-dotted.icon.js.map +1 -0
  530. package/lib/components/Icon/icons/information-solid.icon.js +1 -1
  531. package/lib/components/Icon/icons/information-solid.icon.js.map +1 -1
  532. package/lib/components/Icon/icons/information.icon.js +1 -1
  533. package/lib/components/Icon/icons/information.icon.js.map +1 -1
  534. package/lib/components/Icon/icons/input-pen.icon.d.ts +5 -0
  535. package/lib/components/Icon/icons/input-pen.icon.d.ts.map +1 -0
  536. package/lib/components/Icon/icons/input-pen.icon.js +7 -0
  537. package/lib/components/Icon/icons/input-pen.icon.js.map +1 -0
  538. package/lib/components/Icon/icons/mcp.icon.d.ts +5 -0
  539. package/lib/components/Icon/icons/mcp.icon.d.ts.map +1 -0
  540. package/lib/components/Icon/icons/mcp.icon.js +7 -0
  541. package/lib/components/Icon/icons/mcp.icon.js.map +1 -0
  542. package/lib/components/Icon/icons/open.icon.d.ts.map +1 -1
  543. package/lib/components/Icon/icons/open.icon.js +2 -2
  544. package/lib/components/Icon/icons/open.icon.js.map +1 -1
  545. package/lib/components/Icon/icons/preview-bottom.icon.d.ts +5 -0
  546. package/lib/components/Icon/icons/preview-bottom.icon.d.ts.map +1 -0
  547. package/lib/components/Icon/icons/preview-bottom.icon.js +7 -0
  548. package/lib/components/Icon/icons/preview-bottom.icon.js.map +1 -0
  549. package/lib/components/Icon/icons/preview-collapse.icon.d.ts +5 -0
  550. package/lib/components/Icon/icons/preview-collapse.icon.d.ts.map +1 -0
  551. package/lib/components/Icon/icons/preview-collapse.icon.js +7 -0
  552. package/lib/components/Icon/icons/preview-collapse.icon.js.map +1 -0
  553. package/lib/components/Icon/icons/preview-expand.icon.d.ts +5 -0
  554. package/lib/components/Icon/icons/preview-expand.icon.d.ts.map +1 -0
  555. package/lib/components/Icon/icons/preview-expand.icon.js +7 -0
  556. package/lib/components/Icon/icons/preview-expand.icon.js.map +1 -0
  557. package/lib/components/Icon/icons/preview-hide.icon.d.ts +5 -0
  558. package/lib/components/Icon/icons/preview-hide.icon.d.ts.map +1 -0
  559. package/lib/components/Icon/icons/preview-hide.icon.js +7 -0
  560. package/lib/components/Icon/icons/preview-hide.icon.js.map +1 -0
  561. package/lib/components/Icon/icons/preview-rtl.icon.d.ts +5 -0
  562. package/lib/components/Icon/icons/preview-rtl.icon.d.ts.map +1 -0
  563. package/lib/components/Icon/icons/preview-rtl.icon.js +7 -0
  564. package/lib/components/Icon/icons/preview-rtl.icon.js.map +1 -0
  565. package/lib/components/Icon/icons/script-solid.icon.d.ts +5 -0
  566. package/lib/components/Icon/icons/script-solid.icon.d.ts.map +1 -0
  567. package/lib/components/Icon/icons/script-solid.icon.js +7 -0
  568. package/lib/components/Icon/icons/script-solid.icon.js.map +1 -0
  569. package/lib/components/Icon/icons/user-laptop.icon.d.ts +5 -0
  570. package/lib/components/Icon/icons/user-laptop.icon.d.ts.map +1 -0
  571. package/lib/components/Icon/icons/user-laptop.icon.js +7 -0
  572. package/lib/components/Icon/icons/user-laptop.icon.js.map +1 -0
  573. package/lib/components/Icon/index.d.ts +1 -1
  574. package/lib/components/Icon/index.d.ts.map +1 -1
  575. package/lib/components/Icon/index.js +1 -1
  576. package/lib/components/Icon/index.js.map +1 -1
  577. package/lib/components/Icon/streamline-icons/animal-print.icon.d.ts +5 -0
  578. package/lib/components/Icon/streamline-icons/animal-print.icon.d.ts.map +1 -0
  579. package/lib/components/Icon/streamline-icons/animal-print.icon.js +7 -0
  580. package/lib/components/Icon/streamline-icons/animal-print.icon.js.map +1 -0
  581. package/lib/components/Icon/streamline-icons/boat-cargo.icon.d.ts +5 -0
  582. package/lib/components/Icon/streamline-icons/boat-cargo.icon.d.ts.map +1 -0
  583. package/lib/components/Icon/streamline-icons/boat-cargo.icon.js +7 -0
  584. package/lib/components/Icon/streamline-icons/boat-cargo.icon.js.map +1 -0
  585. package/lib/components/Icon/streamline-icons/bolt-solid.icon.d.ts +5 -0
  586. package/lib/components/Icon/streamline-icons/bolt-solid.icon.d.ts.map +1 -0
  587. package/lib/components/Icon/streamline-icons/bolt-solid.icon.js +7 -0
  588. package/lib/components/Icon/streamline-icons/bolt-solid.icon.js.map +1 -0
  589. package/lib/components/Icon/streamline-icons/bolt.icon.d.ts +5 -0
  590. package/lib/components/Icon/streamline-icons/bolt.icon.d.ts.map +1 -0
  591. package/lib/components/Icon/streamline-icons/bolt.icon.js +7 -0
  592. package/lib/components/Icon/streamline-icons/bolt.icon.js.map +1 -0
  593. package/lib/components/Icon/streamline-icons/browser-site.icon.d.ts +5 -0
  594. package/lib/components/Icon/streamline-icons/browser-site.icon.d.ts.map +1 -0
  595. package/lib/components/Icon/streamline-icons/browser-site.icon.js +7 -0
  596. package/lib/components/Icon/streamline-icons/browser-site.icon.js.map +1 -0
  597. package/lib/components/Icon/streamline-icons/building-globe.icon.d.ts +5 -0
  598. package/lib/components/Icon/streamline-icons/building-globe.icon.d.ts.map +1 -0
  599. package/lib/components/Icon/streamline-icons/building-globe.icon.js +7 -0
  600. package/lib/components/Icon/streamline-icons/building-globe.icon.js.map +1 -0
  601. package/lib/components/Icon/streamline-icons/check-polaris-solid.icon.d.ts +5 -0
  602. package/lib/components/Icon/streamline-icons/check-polaris-solid.icon.d.ts.map +1 -0
  603. package/lib/components/Icon/streamline-icons/check-polaris-solid.icon.js +7 -0
  604. package/lib/components/Icon/streamline-icons/check-polaris-solid.icon.js.map +1 -0
  605. package/lib/components/Icon/streamline-icons/chess.icon.d.ts +5 -0
  606. package/lib/components/Icon/streamline-icons/chess.icon.d.ts.map +1 -0
  607. package/lib/components/Icon/streamline-icons/chess.icon.js +7 -0
  608. package/lib/components/Icon/streamline-icons/chess.icon.js.map +1 -0
  609. package/lib/components/Icon/streamline-icons/clock-sla.icon.d.ts +5 -0
  610. package/lib/components/Icon/streamline-icons/clock-sla.icon.d.ts.map +1 -0
  611. package/lib/components/Icon/streamline-icons/clock-sla.icon.js +7 -0
  612. package/lib/components/Icon/streamline-icons/clock-sla.icon.js.map +1 -0
  613. package/lib/components/Icon/streamline-icons/cloud-nodes.icon.d.ts +5 -0
  614. package/lib/components/Icon/streamline-icons/cloud-nodes.icon.d.ts.map +1 -0
  615. package/lib/components/Icon/streamline-icons/cloud-nodes.icon.js +7 -0
  616. package/lib/components/Icon/streamline-icons/cloud-nodes.icon.js.map +1 -0
  617. package/lib/components/Icon/streamline-icons/confetti.icon.d.ts +5 -0
  618. package/lib/components/Icon/streamline-icons/confetti.icon.d.ts.map +1 -0
  619. package/lib/components/Icon/streamline-icons/confetti.icon.js +7 -0
  620. package/lib/components/Icon/streamline-icons/confetti.icon.js.map +1 -0
  621. package/lib/components/Icon/streamline-icons/conveyor-cargo.icon.d.ts +5 -0
  622. package/lib/components/Icon/streamline-icons/conveyor-cargo.icon.d.ts.map +1 -0
  623. package/lib/components/Icon/streamline-icons/conveyor-cargo.icon.js +7 -0
  624. package/lib/components/Icon/streamline-icons/conveyor-cargo.icon.js.map +1 -0
  625. package/lib/components/Icon/streamline-icons/cpu-chip.icon.d.ts +5 -0
  626. package/lib/components/Icon/streamline-icons/cpu-chip.icon.d.ts.map +1 -0
  627. package/lib/components/Icon/streamline-icons/cpu-chip.icon.js +7 -0
  628. package/lib/components/Icon/streamline-icons/cpu-chip.icon.js.map +1 -0
  629. package/lib/components/Icon/streamline-icons/desktop-pencil.icon.d.ts +5 -0
  630. package/lib/components/Icon/streamline-icons/desktop-pencil.icon.d.ts.map +1 -0
  631. package/lib/components/Icon/streamline-icons/desktop-pencil.icon.js +7 -0
  632. package/lib/components/Icon/streamline-icons/desktop-pencil.icon.js.map +1 -0
  633. package/lib/components/Icon/streamline-icons/disc-document.icon.d.ts +5 -0
  634. package/lib/components/Icon/streamline-icons/disc-document.icon.d.ts.map +1 -0
  635. package/lib/components/Icon/streamline-icons/disc-document.icon.js +7 -0
  636. package/lib/components/Icon/streamline-icons/disc-document.icon.js.map +1 -0
  637. package/lib/components/Icon/streamline-icons/disc-nodes.icon.d.ts +5 -0
  638. package/lib/components/Icon/streamline-icons/disc-nodes.icon.d.ts.map +1 -0
  639. package/lib/components/Icon/streamline-icons/disc-nodes.icon.js +7 -0
  640. package/lib/components/Icon/streamline-icons/disc-nodes.icon.js.map +1 -0
  641. package/lib/components/Icon/streamline-icons/doc-ai.icon.d.ts +5 -0
  642. package/lib/components/Icon/streamline-icons/doc-ai.icon.d.ts.map +1 -0
  643. package/lib/components/Icon/streamline-icons/doc-ai.icon.js +7 -0
  644. package/lib/components/Icon/streamline-icons/doc-ai.icon.js.map +1 -0
  645. package/lib/components/Icon/streamline-icons/document-json.icon.d.ts +5 -0
  646. package/lib/components/Icon/streamline-icons/document-json.icon.d.ts.map +1 -0
  647. package/lib/components/Icon/streamline-icons/document-json.icon.js +7 -0
  648. package/lib/components/Icon/streamline-icons/document-json.icon.js.map +1 -0
  649. package/lib/components/Icon/streamline-icons/exchange-case-user.icon.d.ts +5 -0
  650. package/lib/components/Icon/streamline-icons/exchange-case-user.icon.d.ts.map +1 -0
  651. package/lib/components/Icon/streamline-icons/exchange-case-user.icon.js +7 -0
  652. package/lib/components/Icon/streamline-icons/exchange-case-user.icon.js.map +1 -0
  653. package/lib/components/Icon/streamline-icons/exchange-cases.icon.d.ts +5 -0
  654. package/lib/components/Icon/streamline-icons/exchange-cases.icon.d.ts.map +1 -0
  655. package/lib/components/Icon/streamline-icons/exchange-cases.icon.js +7 -0
  656. package/lib/components/Icon/streamline-icons/exchange-cases.icon.js.map +1 -0
  657. package/lib/components/Icon/streamline-icons/factory.icon.d.ts +5 -0
  658. package/lib/components/Icon/streamline-icons/factory.icon.d.ts.map +1 -0
  659. package/lib/components/Icon/streamline-icons/factory.icon.js +7 -0
  660. package/lib/components/Icon/streamline-icons/factory.icon.js.map +1 -0
  661. package/lib/components/Icon/streamline-icons/fast-food.icon.d.ts +5 -0
  662. package/lib/components/Icon/streamline-icons/fast-food.icon.d.ts.map +1 -0
  663. package/lib/components/Icon/streamline-icons/fast-food.icon.js +7 -0
  664. package/lib/components/Icon/streamline-icons/fast-food.icon.js.map +1 -0
  665. package/lib/components/Icon/streamline-icons/field-cursor.icon.js +1 -1
  666. package/lib/components/Icon/streamline-icons/field-cursor.icon.js.map +1 -1
  667. package/lib/components/Icon/streamline-icons/field-group.icon.d.ts +5 -0
  668. package/lib/components/Icon/streamline-icons/field-group.icon.d.ts.map +1 -0
  669. package/lib/components/Icon/streamline-icons/field-group.icon.js +7 -0
  670. package/lib/components/Icon/streamline-icons/field-group.icon.js.map +1 -0
  671. package/lib/components/Icon/streamline-icons/gear-nodes.icon.d.ts +5 -0
  672. package/lib/components/Icon/streamline-icons/gear-nodes.icon.d.ts.map +1 -0
  673. package/lib/components/Icon/streamline-icons/gear-nodes.icon.js +7 -0
  674. package/lib/components/Icon/streamline-icons/gear-nodes.icon.js.map +1 -0
  675. package/lib/components/Icon/streamline-icons/heart-rate.icon.d.ts +5 -0
  676. package/lib/components/Icon/streamline-icons/heart-rate.icon.d.ts.map +1 -0
  677. package/lib/components/Icon/streamline-icons/heart-rate.icon.js +7 -0
  678. package/lib/components/Icon/streamline-icons/heart-rate.icon.js.map +1 -0
  679. package/lib/components/Icon/streamline-icons/hexagons.icon.d.ts +5 -0
  680. package/lib/components/Icon/streamline-icons/hexagons.icon.d.ts.map +1 -0
  681. package/lib/components/Icon/streamline-icons/hexagons.icon.js +7 -0
  682. package/lib/components/Icon/streamline-icons/hexagons.icon.js.map +1 -0
  683. package/lib/components/Icon/streamline-icons/language-pack.icon.d.ts +5 -0
  684. package/lib/components/Icon/streamline-icons/language-pack.icon.d.ts.map +1 -0
  685. package/lib/components/Icon/streamline-icons/language-pack.icon.js +7 -0
  686. package/lib/components/Icon/streamline-icons/language-pack.icon.js.map +1 -0
  687. package/lib/components/Icon/streamline-icons/layout.icon.d.ts +5 -0
  688. package/lib/components/Icon/streamline-icons/layout.icon.d.ts.map +1 -0
  689. package/lib/components/Icon/streamline-icons/layout.icon.js +7 -0
  690. package/lib/components/Icon/streamline-icons/layout.icon.js.map +1 -0
  691. package/lib/components/Icon/streamline-icons/mcp.icon.d.ts +5 -0
  692. package/lib/components/Icon/streamline-icons/mcp.icon.d.ts.map +1 -0
  693. package/lib/components/Icon/streamline-icons/mcp.icon.js +7 -0
  694. package/lib/components/Icon/streamline-icons/mcp.icon.js.map +1 -0
  695. package/lib/components/Icon/streamline-icons/motherboard.icon.d.ts +5 -0
  696. package/lib/components/Icon/streamline-icons/motherboard.icon.d.ts.map +1 -0
  697. package/lib/components/Icon/streamline-icons/motherboard.icon.js +7 -0
  698. package/lib/components/Icon/streamline-icons/motherboard.icon.js.map +1 -0
  699. package/lib/components/Icon/streamline-icons/oil-tower.icon.d.ts +5 -0
  700. package/lib/components/Icon/streamline-icons/oil-tower.icon.d.ts.map +1 -0
  701. package/lib/components/Icon/streamline-icons/oil-tower.icon.js +7 -0
  702. package/lib/components/Icon/streamline-icons/oil-tower.icon.js.map +1 -0
  703. package/lib/components/Icon/streamline-icons/phone-stethescope.icon.d.ts +5 -0
  704. package/lib/components/Icon/streamline-icons/phone-stethescope.icon.d.ts.map +1 -0
  705. package/lib/components/Icon/streamline-icons/phone-stethescope.icon.js +7 -0
  706. package/lib/components/Icon/streamline-icons/phone-stethescope.icon.js.map +1 -0
  707. package/lib/components/Icon/streamline-icons/piggybank.icon.d.ts +5 -0
  708. package/lib/components/Icon/streamline-icons/piggybank.icon.d.ts.map +1 -0
  709. package/lib/components/Icon/streamline-icons/piggybank.icon.js +7 -0
  710. package/lib/components/Icon/streamline-icons/piggybank.icon.js.map +1 -0
  711. package/lib/components/Icon/streamline-icons/plug-connect.icon.d.ts +5 -0
  712. package/lib/components/Icon/streamline-icons/plug-connect.icon.d.ts.map +1 -0
  713. package/lib/components/Icon/streamline-icons/plug-connect.icon.js +7 -0
  714. package/lib/components/Icon/streamline-icons/plug-connect.icon.js.map +1 -0
  715. package/lib/components/Icon/streamline-icons/prescription.icon.d.ts +5 -0
  716. package/lib/components/Icon/streamline-icons/prescription.icon.d.ts.map +1 -0
  717. package/lib/components/Icon/streamline-icons/prescription.icon.js +7 -0
  718. package/lib/components/Icon/streamline-icons/prescription.icon.js.map +1 -0
  719. package/lib/components/Icon/streamline-icons/preview-bottom.icon.d.ts +5 -0
  720. package/lib/components/Icon/streamline-icons/preview-bottom.icon.d.ts.map +1 -0
  721. package/lib/components/Icon/streamline-icons/preview-bottom.icon.js +7 -0
  722. package/lib/components/Icon/streamline-icons/preview-bottom.icon.js.map +1 -0
  723. package/lib/components/Icon/streamline-icons/preview-hide.icon.d.ts +5 -0
  724. package/lib/components/Icon/streamline-icons/preview-hide.icon.d.ts.map +1 -0
  725. package/lib/components/Icon/streamline-icons/preview-hide.icon.js +7 -0
  726. package/lib/components/Icon/streamline-icons/preview-hide.icon.js.map +1 -0
  727. package/lib/components/Icon/streamline-icons/preview-rtl.icon.d.ts +5 -0
  728. package/lib/components/Icon/streamline-icons/preview-rtl.icon.d.ts.map +1 -0
  729. package/lib/components/Icon/streamline-icons/preview-rtl.icon.js +7 -0
  730. package/lib/components/Icon/streamline-icons/preview-rtl.icon.js.map +1 -0
  731. package/lib/components/Icon/streamline-icons/preview.icon.d.ts +5 -0
  732. package/lib/components/Icon/streamline-icons/preview.icon.d.ts.map +1 -0
  733. package/lib/components/Icon/streamline-icons/preview.icon.js +7 -0
  734. package/lib/components/Icon/streamline-icons/preview.icon.js.map +1 -0
  735. package/lib/components/Icon/streamline-icons/return.icon.d.ts +5 -0
  736. package/lib/components/Icon/streamline-icons/return.icon.d.ts.map +1 -0
  737. package/lib/components/Icon/streamline-icons/return.icon.js +7 -0
  738. package/lib/components/Icon/streamline-icons/return.icon.js.map +1 -0
  739. package/lib/components/Icon/streamline-icons/robot-assembly.icon.d.ts +5 -0
  740. package/lib/components/Icon/streamline-icons/robot-assembly.icon.d.ts.map +1 -0
  741. package/lib/components/Icon/streamline-icons/robot-assembly.icon.js +7 -0
  742. package/lib/components/Icon/streamline-icons/robot-assembly.icon.js.map +1 -0
  743. package/lib/components/Icon/streamline-icons/scale-unequal.icon.d.ts +5 -0
  744. package/lib/components/Icon/streamline-icons/scale-unequal.icon.d.ts.map +1 -0
  745. package/lib/components/Icon/streamline-icons/scale-unequal.icon.js +7 -0
  746. package/lib/components/Icon/streamline-icons/scale-unequal.icon.js.map +1 -0
  747. package/lib/components/Icon/streamline-icons/selection-cursor.icon.d.ts +5 -0
  748. package/lib/components/Icon/streamline-icons/selection-cursor.icon.d.ts.map +1 -0
  749. package/lib/components/Icon/streamline-icons/selection-cursor.icon.js +7 -0
  750. package/lib/components/Icon/streamline-icons/selection-cursor.icon.js.map +1 -0
  751. package/lib/components/Icon/streamline-icons/send-solid.icon.d.ts +5 -0
  752. package/lib/components/Icon/streamline-icons/send-solid.icon.d.ts.map +1 -0
  753. package/lib/components/Icon/streamline-icons/send-solid.icon.js +7 -0
  754. package/lib/components/Icon/streamline-icons/send-solid.icon.js.map +1 -0
  755. package/lib/components/Icon/streamline-icons/sewing-machine.icon.d.ts +5 -0
  756. package/lib/components/Icon/streamline-icons/sewing-machine.icon.d.ts.map +1 -0
  757. package/lib/components/Icon/streamline-icons/sewing-machine.icon.js +7 -0
  758. package/lib/components/Icon/streamline-icons/sewing-machine.icon.js.map +1 -0
  759. package/lib/components/Icon/streamline-icons/shapes.icon.d.ts +5 -0
  760. package/lib/components/Icon/streamline-icons/shapes.icon.d.ts.map +1 -0
  761. package/lib/components/Icon/streamline-icons/shapes.icon.js +7 -0
  762. package/lib/components/Icon/streamline-icons/shapes.icon.js.map +1 -0
  763. package/lib/components/Icon/streamline-icons/share-case.icon.d.ts +5 -0
  764. package/lib/components/Icon/streamline-icons/share-case.icon.d.ts.map +1 -0
  765. package/lib/components/Icon/streamline-icons/share-case.icon.js +7 -0
  766. package/lib/components/Icon/streamline-icons/share-case.icon.js.map +1 -0
  767. package/lib/components/Icon/streamline-icons/share-document.icon.d.ts +5 -0
  768. package/lib/components/Icon/streamline-icons/share-document.icon.d.ts.map +1 -0
  769. package/lib/components/Icon/streamline-icons/share-document.icon.js +7 -0
  770. package/lib/components/Icon/streamline-icons/share-document.icon.js.map +1 -0
  771. package/lib/components/Icon/streamline-icons/shield-currency.icon.d.ts +5 -0
  772. package/lib/components/Icon/streamline-icons/shield-currency.icon.d.ts.map +1 -0
  773. package/lib/components/Icon/streamline-icons/shield-currency.icon.js +7 -0
  774. package/lib/components/Icon/streamline-icons/shield-currency.icon.js.map +1 -0
  775. package/lib/components/Icon/streamline-icons/shield-lock.icon.d.ts +5 -0
  776. package/lib/components/Icon/streamline-icons/shield-lock.icon.d.ts.map +1 -0
  777. package/lib/components/Icon/streamline-icons/shield-lock.icon.js +7 -0
  778. package/lib/components/Icon/streamline-icons/shield-lock.icon.js.map +1 -0
  779. package/lib/components/Icon/streamline-icons/table-disc.icon.d.ts +5 -0
  780. package/lib/components/Icon/streamline-icons/table-disc.icon.d.ts.map +1 -0
  781. package/lib/components/Icon/streamline-icons/table-disc.icon.js +7 -0
  782. package/lib/components/Icon/streamline-icons/table-disc.icon.js.map +1 -0
  783. package/lib/components/Icon/streamline-icons/tablet-rate.icon.d.ts +5 -0
  784. package/lib/components/Icon/streamline-icons/tablet-rate.icon.d.ts.map +1 -0
  785. package/lib/components/Icon/streamline-icons/tablet-rate.icon.js +7 -0
  786. package/lib/components/Icon/streamline-icons/tablet-rate.icon.js.map +1 -0
  787. package/lib/components/Icon/streamline-icons/ticket-movie.icon.d.ts +5 -0
  788. package/lib/components/Icon/streamline-icons/ticket-movie.icon.d.ts.map +1 -0
  789. package/lib/components/Icon/streamline-icons/ticket-movie.icon.js +7 -0
  790. package/lib/components/Icon/streamline-icons/ticket-movie.icon.js.map +1 -0
  791. package/lib/components/Icon/streamline-icons/train.icon.d.ts +5 -0
  792. package/lib/components/Icon/streamline-icons/train.icon.d.ts.map +1 -0
  793. package/lib/components/Icon/streamline-icons/train.icon.js +7 -0
  794. package/lib/components/Icon/streamline-icons/train.icon.js.map +1 -0
  795. package/lib/components/Icon/streamline-icons/translate.icon.d.ts +5 -0
  796. package/lib/components/Icon/streamline-icons/translate.icon.d.ts.map +1 -0
  797. package/lib/components/Icon/streamline-icons/translate.icon.js +7 -0
  798. package/lib/components/Icon/streamline-icons/translate.icon.js.map +1 -0
  799. package/lib/components/Icon/streamline-icons/truck-cargo.icon.d.ts +5 -0
  800. package/lib/components/Icon/streamline-icons/truck-cargo.icon.d.ts.map +1 -0
  801. package/lib/components/Icon/streamline-icons/truck-cargo.icon.js +7 -0
  802. package/lib/components/Icon/streamline-icons/truck-cargo.icon.js.map +1 -0
  803. package/lib/components/Icon/streamline-icons/truck-clock.icon.d.ts +5 -0
  804. package/lib/components/Icon/streamline-icons/truck-clock.icon.d.ts.map +1 -0
  805. package/lib/components/Icon/streamline-icons/truck-clock.icon.js +7 -0
  806. package/lib/components/Icon/streamline-icons/truck-clock.icon.js.map +1 -0
  807. package/lib/components/Icon/streamline-icons/truck.icon.d.ts +5 -0
  808. package/lib/components/Icon/streamline-icons/truck.icon.d.ts.map +1 -0
  809. package/lib/components/Icon/streamline-icons/truck.icon.js +7 -0
  810. package/lib/components/Icon/streamline-icons/truck.icon.js.map +1 -0
  811. package/lib/components/Icon/streamline-icons/user-laptop.icon.d.ts +5 -0
  812. package/lib/components/Icon/streamline-icons/user-laptop.icon.d.ts.map +1 -0
  813. package/lib/components/Icon/streamline-icons/user-laptop.icon.js +7 -0
  814. package/lib/components/Icon/streamline-icons/user-laptop.icon.js.map +1 -0
  815. package/lib/components/Icon/streamline-icons/user-plane.icon.d.ts +5 -0
  816. package/lib/components/Icon/streamline-icons/user-plane.icon.d.ts.map +1 -0
  817. package/lib/components/Icon/streamline-icons/user-plane.icon.js +7 -0
  818. package/lib/components/Icon/streamline-icons/user-plane.icon.js.map +1 -0
  819. package/lib/components/Icon/streamline-icons/user-polaris-solid.icon.d.ts +5 -0
  820. package/lib/components/Icon/streamline-icons/user-polaris-solid.icon.d.ts.map +1 -0
  821. package/lib/components/Icon/streamline-icons/user-polaris-solid.icon.js +7 -0
  822. package/lib/components/Icon/streamline-icons/user-polaris-solid.icon.js.map +1 -0
  823. package/lib/components/Icon/streamline-icons/veterinarian-dog.icon.d.ts +5 -0
  824. package/lib/components/Icon/streamline-icons/veterinarian-dog.icon.d.ts.map +1 -0
  825. package/lib/components/Icon/streamline-icons/veterinarian-dog.icon.js +7 -0
  826. package/lib/components/Icon/streamline-icons/veterinarian-dog.icon.js.map +1 -0
  827. package/lib/components/Icon/streamline-icons/video-player.icon.d.ts +5 -0
  828. package/lib/components/Icon/streamline-icons/video-player.icon.d.ts.map +1 -0
  829. package/lib/components/Icon/streamline-icons/video-player.icon.js +7 -0
  830. package/lib/components/Icon/streamline-icons/video-player.icon.js.map +1 -0
  831. package/lib/components/Icon/streamlineIconNames.d.ts +1 -1
  832. package/lib/components/Icon/streamlineIconNames.d.ts.map +1 -1
  833. package/lib/components/Icon/streamlineIconNames.js +63 -0
  834. package/lib/components/Icon/streamlineIconNames.js.map +1 -1
  835. package/lib/components/Image/Image.d.ts +1 -1
  836. package/lib/components/Image/Image.d.ts.map +1 -1
  837. package/lib/components/Image/Image.js +1 -0
  838. package/lib/components/Image/Image.js.map +1 -1
  839. package/lib/components/InlineEdit/InlineEdit.d.ts +26 -0
  840. package/lib/components/InlineEdit/InlineEdit.d.ts.map +1 -0
  841. package/lib/components/InlineEdit/InlineEdit.js +21 -0
  842. package/lib/components/InlineEdit/InlineEdit.js.map +1 -0
  843. package/lib/components/InlineEdit/InlineEdit.styles.d.ts +27 -0
  844. package/lib/components/InlineEdit/InlineEdit.styles.d.ts.map +1 -0
  845. package/lib/components/InlineEdit/InlineEdit.styles.js +49 -0
  846. package/lib/components/InlineEdit/InlineEdit.styles.js.map +1 -0
  847. package/lib/components/InlineEdit/InlineEdit.test-ids.d.ts +3 -0
  848. package/lib/components/InlineEdit/InlineEdit.test-ids.d.ts.map +1 -0
  849. package/lib/components/InlineEdit/InlineEdit.test-ids.js +4 -0
  850. package/lib/components/InlineEdit/InlineEdit.test-ids.js.map +1 -0
  851. package/lib/components/InlineEdit/index.d.ts +3 -0
  852. package/lib/components/InlineEdit/index.d.ts.map +1 -0
  853. package/lib/components/InlineEdit/index.js +2 -0
  854. package/lib/components/InlineEdit/index.js.map +1 -0
  855. package/lib/components/Input/Input.js +3 -3
  856. package/lib/components/Input/Input.js.map +1 -1
  857. package/lib/components/Input/Input.styles.d.ts +2 -2
  858. package/lib/components/Input/Input.styles.d.ts.map +1 -1
  859. package/lib/components/KeyboardCommands/KeyboardCommands.d.ts +6 -0
  860. package/lib/components/KeyboardCommands/KeyboardCommands.d.ts.map +1 -0
  861. package/lib/components/KeyboardCommands/KeyboardCommands.js +73 -0
  862. package/lib/components/KeyboardCommands/KeyboardCommands.js.map +1 -0
  863. package/lib/components/KeyboardCommands/index.d.ts +3 -0
  864. package/lib/components/KeyboardCommands/index.d.ts.map +1 -0
  865. package/lib/components/KeyboardCommands/index.js +3 -0
  866. package/lib/components/KeyboardCommands/index.js.map +1 -0
  867. package/lib/components/Label/Label.d.ts +4 -2
  868. package/lib/components/Label/Label.d.ts.map +1 -1
  869. package/lib/components/Label/Label.js +5 -1
  870. package/lib/components/Label/Label.js.map +1 -1
  871. package/lib/components/Lightbox/Lightbox.d.ts.map +1 -1
  872. package/lib/components/Lightbox/Lightbox.js +44 -20
  873. package/lib/components/Lightbox/Lightbox.js.map +1 -1
  874. package/lib/components/Lightbox/Lightbox.styles.d.ts +24 -11
  875. package/lib/components/Lightbox/Lightbox.styles.d.ts.map +1 -1
  876. package/lib/components/Lightbox/Lightbox.styles.js +33 -5
  877. package/lib/components/Lightbox/Lightbox.styles.js.map +1 -1
  878. package/lib/components/Lightbox/Lightbox.types.d.ts +13 -0
  879. package/lib/components/Lightbox/Lightbox.types.d.ts.map +1 -1
  880. package/lib/components/Lightbox/Lightbox.types.js.map +1 -1
  881. package/lib/components/Lightbox/index.d.ts +1 -1
  882. package/lib/components/Lightbox/index.d.ts.map +1 -1
  883. package/lib/components/Lightbox/index.js.map +1 -1
  884. package/lib/components/Link/Link.d.ts +17 -6
  885. package/lib/components/Link/Link.d.ts.map +1 -1
  886. package/lib/components/Link/Link.js +9 -7
  887. package/lib/components/Link/Link.js.map +1 -1
  888. package/lib/components/List/CommaSeparatedList.d.ts +2 -2
  889. package/lib/components/List/CommaSeparatedList.d.ts.map +1 -1
  890. package/lib/components/List/List.d.ts +3 -3
  891. package/lib/components/List/List.d.ts.map +1 -1
  892. package/lib/components/ListToolbar/ListToolbar.d.ts +1 -1
  893. package/lib/components/ListToolbar/ListToolbar.d.ts.map +1 -1
  894. package/lib/components/ListToolbar/ListToolbar.js +53 -81
  895. package/lib/components/ListToolbar/ListToolbar.js.map +1 -1
  896. package/lib/components/ListToolbar/ListToolbar.styles.d.ts +405 -15
  897. package/lib/components/ListToolbar/ListToolbar.styles.d.ts.map +1 -1
  898. package/lib/components/ListToolbar/ListToolbar.styles.js +58 -36
  899. package/lib/components/ListToolbar/ListToolbar.styles.js.map +1 -1
  900. package/lib/components/ListToolbar/ListToolbar.test-ids.d.ts +1 -1
  901. package/lib/components/ListToolbar/ListToolbar.test-ids.d.ts.map +1 -1
  902. package/lib/components/ListToolbar/ListToolbar.test-ids.js +0 -1
  903. package/lib/components/ListToolbar/ListToolbar.test-ids.js.map +1 -1
  904. package/lib/components/ListToolbar/ListToolbar.types.d.ts +9 -6
  905. package/lib/components/ListToolbar/ListToolbar.types.d.ts.map +1 -1
  906. package/lib/components/ListToolbar/ListToolbar.types.js.map +1 -1
  907. package/lib/components/LiveLog/LiveLog.js +2 -2
  908. package/lib/components/LiveLog/LiveLog.js.map +1 -1
  909. package/lib/components/LiveLog/LiveLog.styles.d.ts +1 -1
  910. package/lib/components/LiveLog/LiveLog.styles.d.ts.map +1 -1
  911. package/lib/components/LiveLog/LiveLog.types.d.ts +1 -1
  912. package/lib/components/LiveLog/LiveLog.types.js.map +1 -1
  913. package/lib/components/Location/GoogleMapsAPI.d.ts +4 -5
  914. package/lib/components/Location/GoogleMapsAPI.d.ts.map +1 -1
  915. package/lib/components/Location/GoogleMapsAPI.js +66 -69
  916. package/lib/components/Location/GoogleMapsAPI.js.map +1 -1
  917. package/lib/components/Location/LocationAPI.types.d.ts +2 -3
  918. package/lib/components/Location/LocationAPI.types.d.ts.map +1 -1
  919. package/lib/components/Location/LocationAPI.types.js.map +1 -1
  920. package/lib/components/Location/LocationInput.d.ts.map +1 -1
  921. package/lib/components/Location/LocationInput.js +72 -48
  922. package/lib/components/Location/LocationInput.js.map +1 -1
  923. package/lib/components/Location/LocationView.d.ts +2 -0
  924. package/lib/components/Location/LocationView.d.ts.map +1 -1
  925. package/lib/components/Location/LocationView.js +3 -3
  926. package/lib/components/Location/LocationView.js.map +1 -1
  927. package/lib/components/Location/LocationView.styles.d.ts +8 -6
  928. package/lib/components/Location/LocationView.styles.d.ts.map +1 -1
  929. package/lib/components/Mark/Mark.d.ts +5 -1
  930. package/lib/components/Mark/Mark.d.ts.map +1 -1
  931. package/lib/components/Mark/Mark.js +8 -7
  932. package/lib/components/Mark/Mark.js.map +1 -1
  933. package/lib/components/Menu/Menu.d.ts.map +1 -1
  934. package/lib/components/Menu/Menu.js +59 -7
  935. package/lib/components/Menu/Menu.js.map +1 -1
  936. package/lib/components/Menu/Menu.styles.d.ts +21 -15
  937. package/lib/components/Menu/Menu.styles.d.ts.map +1 -1
  938. package/lib/components/Menu/Menu.styles.js +138 -6
  939. package/lib/components/Menu/Menu.styles.js.map +1 -1
  940. package/lib/components/Menu/Menu.types.d.ts +10 -1
  941. package/lib/components/Menu/Menu.types.d.ts.map +1 -1
  942. package/lib/components/Menu/Menu.types.js.map +1 -1
  943. package/lib/components/Menu/MenuItem.d.ts.map +1 -1
  944. package/lib/components/Menu/MenuItem.js +19 -20
  945. package/lib/components/Menu/MenuItem.js.map +1 -1
  946. package/lib/components/MenuButton/MenuButton.d.ts +2 -6
  947. package/lib/components/MenuButton/MenuButton.d.ts.map +1 -1
  948. package/lib/components/MenuButton/MenuButton.js +64 -11
  949. package/lib/components/MenuButton/MenuButton.js.map +1 -1
  950. package/lib/components/MetaList/MetaList.d.ts +4 -4
  951. package/lib/components/MetaList/MetaList.d.ts.map +1 -1
  952. package/lib/components/Modal/Contexts.d.ts.map +1 -1
  953. package/lib/components/Modal/Contexts.js +2 -1
  954. package/lib/components/Modal/Contexts.js.map +1 -1
  955. package/lib/components/Modal/DockedModals.d.ts.map +1 -1
  956. package/lib/components/Modal/DockedModals.js +2 -1
  957. package/lib/components/Modal/DockedModals.js.map +1 -1
  958. package/lib/components/Modal/MinimizedModal.d.ts.map +1 -1
  959. package/lib/components/Modal/MinimizedModal.js +30 -8
  960. package/lib/components/Modal/MinimizedModal.js.map +1 -1
  961. package/lib/components/Modal/Modal.d.ts.map +1 -1
  962. package/lib/components/Modal/Modal.js +54 -17
  963. package/lib/components/Modal/Modal.js.map +1 -1
  964. package/lib/components/Modal/Modal.styles.d.ts +5 -6
  965. package/lib/components/Modal/Modal.styles.d.ts.map +1 -1
  966. package/lib/components/Modal/Modal.styles.js +66 -15
  967. package/lib/components/Modal/Modal.styles.js.map +1 -1
  968. package/lib/components/Modal/Modal.types.d.ts +19 -3
  969. package/lib/components/Modal/Modal.types.d.ts.map +1 -1
  970. package/lib/components/Modal/Modal.types.js.map +1 -1
  971. package/lib/components/Modal/ModalManager.d.ts.map +1 -1
  972. package/lib/components/Modal/ModalManager.js +28 -9
  973. package/lib/components/Modal/ModalManager.js.map +1 -1
  974. package/lib/components/Modal/useModalMove.d.ts +30 -0
  975. package/lib/components/Modal/useModalMove.d.ts.map +1 -0
  976. package/lib/components/Modal/useModalMove.js +148 -0
  977. package/lib/components/Modal/useModalMove.js.map +1 -0
  978. package/lib/components/MultiStepForm/FormProgress.styles.d.ts +208 -12
  979. package/lib/components/MultiStepForm/FormProgress.styles.d.ts.map +1 -1
  980. package/lib/components/MultiStepForm/FormProgress.styles.js +199 -69
  981. package/lib/components/MultiStepForm/FormProgress.styles.js.map +1 -1
  982. package/lib/components/MultiStepForm/HorizontalFormProgress.d.ts +2 -1
  983. package/lib/components/MultiStepForm/HorizontalFormProgress.d.ts.map +1 -1
  984. package/lib/components/MultiStepForm/HorizontalFormProgress.js +44 -25
  985. package/lib/components/MultiStepForm/HorizontalFormProgress.js.map +1 -1
  986. package/lib/components/MultiStepForm/MultiStepForm.d.ts +190 -5
  987. package/lib/components/MultiStepForm/MultiStepForm.d.ts.map +1 -1
  988. package/lib/components/MultiStepForm/MultiStepForm.js +40 -11
  989. package/lib/components/MultiStepForm/MultiStepForm.js.map +1 -1
  990. package/lib/components/MultiStepForm/MultiStepForm.types.d.ts +20 -6
  991. package/lib/components/MultiStepForm/MultiStepForm.types.d.ts.map +1 -1
  992. package/lib/components/MultiStepForm/MultiStepForm.types.js.map +1 -1
  993. package/lib/components/MultiStepForm/VerticalFormProgress.d.ts +1 -1
  994. package/lib/components/MultiStepForm/VerticalFormProgress.d.ts.map +1 -1
  995. package/lib/components/MultiStepForm/VerticalFormProgress.js +7 -4
  996. package/lib/components/MultiStepForm/VerticalFormProgress.js.map +1 -1
  997. package/lib/components/MultiStepForm/useFormProgressOverflow.d.ts +6 -0
  998. package/lib/components/MultiStepForm/useFormProgressOverflow.d.ts.map +1 -0
  999. package/lib/components/MultiStepForm/useFormProgressOverflow.js +35 -0
  1000. package/lib/components/MultiStepForm/useFormProgressOverflow.js.map +1 -0
  1001. package/lib/components/Number/NumberInput.d.ts.map +1 -1
  1002. package/lib/components/Number/NumberInput.js +1 -3
  1003. package/lib/components/Number/NumberInput.js.map +1 -1
  1004. package/lib/components/Number/NumberInput.styles.d.ts +8 -4
  1005. package/lib/components/Number/NumberInput.styles.d.ts.map +1 -1
  1006. package/lib/components/Number/NumberInput.types.d.ts +4 -0
  1007. package/lib/components/Number/NumberInput.types.d.ts.map +1 -1
  1008. package/lib/components/Number/NumberInput.types.js.map +1 -1
  1009. package/lib/components/Number/NumberRangeInput.d.ts.map +1 -1
  1010. package/lib/components/Number/NumberRangeInput.js +2 -5
  1011. package/lib/components/Number/NumberRangeInput.js.map +1 -1
  1012. package/lib/components/PageTemplates/CategorySubPage.styles.d.ts +22 -18
  1013. package/lib/components/PageTemplates/CategorySubPage.styles.d.ts.map +1 -1
  1014. package/lib/components/PageTemplates/CategorySubPage.styles.js +24 -5
  1015. package/lib/components/PageTemplates/CategorySubPage.styles.js.map +1 -1
  1016. package/lib/components/PageTemplates/DashboardPage.d.ts +12 -6
  1017. package/lib/components/PageTemplates/DashboardPage.d.ts.map +1 -1
  1018. package/lib/components/PageTemplates/DashboardPage.js +1 -1
  1019. package/lib/components/PageTemplates/DashboardPage.js.map +1 -1
  1020. package/lib/components/PageTemplates/GridLayout/EditorBackground.d.ts.map +1 -1
  1021. package/lib/components/PageTemplates/GridLayout/EditorBackground.js +1 -0
  1022. package/lib/components/PageTemplates/GridLayout/EditorBackground.js.map +1 -1
  1023. package/lib/components/PageTemplates/GridLayout/EditorGridItem.d.ts.map +1 -1
  1024. package/lib/components/PageTemplates/GridLayout/EditorGridItem.js +6 -0
  1025. package/lib/components/PageTemplates/GridLayout/EditorGridItem.js.map +1 -1
  1026. package/lib/components/PageTemplates/GridLayout/GridLayoutEditor.d.ts +6 -0
  1027. package/lib/components/PageTemplates/GridLayout/GridLayoutEditor.d.ts.map +1 -1
  1028. package/lib/components/PageTemplates/GridLayout/GridLayoutEditor.js +2 -2
  1029. package/lib/components/PageTemplates/GridLayout/GridLayoutEditor.js.map +1 -1
  1030. package/lib/components/PageTemplates/GridLayout/GridLayoutViewer.d.ts +6 -0
  1031. package/lib/components/PageTemplates/GridLayout/GridLayoutViewer.d.ts.map +1 -1
  1032. package/lib/components/PageTemplates/GridLayout/GridLayoutViewer.js +2 -2
  1033. package/lib/components/PageTemplates/GridLayout/GridLayoutViewer.js.map +1 -1
  1034. package/lib/components/PageTemplates/GridLayout/ReactGridLayoutStyles.d.ts +1 -1
  1035. package/lib/components/PageTemplates/GridLayout/ReactGridLayoutStyles.d.ts.map +1 -1
  1036. package/lib/components/PageTemplates/GridLayout/ReactResizableStyles.d.ts +1 -1
  1037. package/lib/components/PageTemplates/GridLayout/ReactResizableStyles.d.ts.map +1 -1
  1038. package/lib/components/PageTemplates/GridLayout/utils.d.ts +2 -1
  1039. package/lib/components/PageTemplates/GridLayout/utils.d.ts.map +1 -1
  1040. package/lib/components/PageTemplates/GridLayout/utils.js +4 -3
  1041. package/lib/components/PageTemplates/GridLayout/utils.js.map +1 -1
  1042. package/lib/components/PageTemplates/PageTemplates.d.ts +191 -9
  1043. package/lib/components/PageTemplates/PageTemplates.d.ts.map +1 -1
  1044. package/lib/components/PageTemplates/PageTemplates.js +31 -16
  1045. package/lib/components/PageTemplates/PageTemplates.js.map +1 -1
  1046. package/lib/components/Phone/PhoneInput.d.ts +3 -0
  1047. package/lib/components/Phone/PhoneInput.d.ts.map +1 -1
  1048. package/lib/components/Phone/PhoneInput.js +8 -4
  1049. package/lib/components/Phone/PhoneInput.js.map +1 -1
  1050. package/lib/components/Phone/utils.d.ts +1 -1
  1051. package/lib/components/Phone/utils.d.ts.map +1 -1
  1052. package/lib/components/Phone/utils.js +5 -2
  1053. package/lib/components/Phone/utils.js.map +1 -1
  1054. package/lib/components/Popover/Popover.d.ts.map +1 -1
  1055. package/lib/components/Popover/Popover.js +18 -10
  1056. package/lib/components/Popover/Popover.js.map +1 -1
  1057. package/lib/components/Popover/Popover.styles.d.ts +3 -3
  1058. package/lib/components/Popover/Popover.styles.d.ts.map +1 -1
  1059. package/lib/components/Popover/Popover.styles.js +13 -9
  1060. package/lib/components/Popover/Popover.styles.js.map +1 -1
  1061. package/lib/components/Popover/modifiers.js +1 -1
  1062. package/lib/components/Popover/modifiers.js.map +1 -1
  1063. package/lib/components/Preview/Contexts.d.ts +5 -0
  1064. package/lib/components/Preview/Contexts.d.ts.map +1 -0
  1065. package/lib/components/Preview/Contexts.js +19 -0
  1066. package/lib/components/Preview/Contexts.js.map +1 -0
  1067. package/lib/components/Preview/Preview.types.d.ts +46 -0
  1068. package/lib/components/Preview/Preview.types.d.ts.map +1 -0
  1069. package/lib/components/Preview/Preview.types.js +2 -0
  1070. package/lib/components/Preview/Preview.types.js.map +1 -0
  1071. package/lib/components/Preview/PreviewManager.d.ts +11 -0
  1072. package/lib/components/Preview/PreviewManager.d.ts.map +1 -0
  1073. package/lib/components/Preview/PreviewManager.js +125 -0
  1074. package/lib/components/Preview/PreviewManager.js.map +1 -0
  1075. package/lib/components/Preview/PreviewPanel.d.ts +7 -0
  1076. package/lib/components/Preview/PreviewPanel.d.ts.map +1 -0
  1077. package/lib/components/Preview/PreviewPanel.js +110 -0
  1078. package/lib/components/Preview/PreviewPanel.js.map +1 -0
  1079. package/lib/components/Preview/PreviewPanel.test-ids.d.ts +2 -0
  1080. package/lib/components/Preview/PreviewPanel.test-ids.d.ts.map +1 -0
  1081. package/lib/components/Preview/PreviewPanel.test-ids.js +6 -0
  1082. package/lib/components/Preview/PreviewPanel.test-ids.js.map +1 -0
  1083. package/lib/components/Preview/index.d.ts +5 -0
  1084. package/lib/components/Preview/index.d.ts.map +1 -0
  1085. package/lib/components/Preview/index.js +4 -0
  1086. package/lib/components/Preview/index.js.map +1 -0
  1087. package/lib/components/Progress/Progress.js +1 -1
  1088. package/lib/components/Progress/Progress.js.map +1 -1
  1089. package/lib/components/Progress/Progress.styles.d.ts +199 -9
  1090. package/lib/components/Progress/Progress.styles.d.ts.map +1 -1
  1091. package/lib/components/Progress/Progress.styles.js +1 -1
  1092. package/lib/components/Progress/Progress.styles.js.map +1 -1
  1093. package/lib/components/QRCode/QRCode.d.ts +1 -1
  1094. package/lib/components/QRCode/QRCode.d.ts.map +1 -1
  1095. package/lib/components/RadioButton/RadioButton.test-ids.d.ts +1 -1
  1096. package/lib/components/RadioButton/RadioButton.test-ids.d.ts.map +1 -1
  1097. package/lib/components/RadioButton/RadioButtonCard.d.ts +11 -3
  1098. package/lib/components/RadioButton/RadioButtonCard.d.ts.map +1 -1
  1099. package/lib/components/RadioButton/RadioButtonCard.js +5 -22
  1100. package/lib/components/RadioButton/RadioButtonCard.js.map +1 -1
  1101. package/lib/components/RadioButtonGroup/RadioButtonGroup.d.ts +7 -0
  1102. package/lib/components/RadioButtonGroup/RadioButtonGroup.d.ts.map +1 -0
  1103. package/lib/components/RadioButtonGroup/RadioButtonGroup.js +10 -0
  1104. package/lib/components/RadioButtonGroup/RadioButtonGroup.js.map +1 -0
  1105. package/lib/components/RadioButtonGroup/index.d.ts +2 -1
  1106. package/lib/components/RadioButtonGroup/index.d.ts.map +1 -1
  1107. package/lib/components/RadioButtonGroup/index.js +1 -1
  1108. package/lib/components/RadioButtonGroup/index.js.map +1 -1
  1109. package/lib/components/RadioCheck/RadioCheck.d.ts +9 -4
  1110. package/lib/components/RadioCheck/RadioCheck.d.ts.map +1 -1
  1111. package/lib/components/RadioCheck/RadioCheck.js +97 -75
  1112. package/lib/components/RadioCheck/RadioCheck.js.map +1 -1
  1113. package/lib/components/RadioCheckGroup/RadioCheckGroup.d.ts +11 -5
  1114. package/lib/components/RadioCheckGroup/RadioCheckGroup.d.ts.map +1 -1
  1115. package/lib/components/RadioCheckGroup/RadioCheckGroup.js +70 -19
  1116. package/lib/components/RadioCheckGroup/RadioCheckGroup.js.map +1 -1
  1117. package/lib/components/Rating/Rating.d.ts +1 -1
  1118. package/lib/components/Rating/Rating.d.ts.map +1 -1
  1119. package/lib/components/ResponsiveActions/ResponsiveActions.d.ts +2 -2
  1120. package/lib/components/ResponsiveActions/ResponsiveActions.d.ts.map +1 -1
  1121. package/lib/components/ResponsiveActions/ResponsiveActions.js +12 -15
  1122. package/lib/components/ResponsiveActions/ResponsiveActions.js.map +1 -1
  1123. package/lib/components/SearchInput/SearchInput.d.ts +7 -7
  1124. package/lib/components/SearchInput/SearchInput.d.ts.map +1 -1
  1125. package/lib/components/SearchInput/SearchInput.js +41 -29
  1126. package/lib/components/SearchInput/SearchInput.js.map +1 -1
  1127. package/lib/components/SearchInput/SearchInput.styles.d.ts +21 -13
  1128. package/lib/components/SearchInput/SearchInput.styles.d.ts.map +1 -1
  1129. package/lib/components/SearchInput/SearchInput.styles.js +3 -5
  1130. package/lib/components/SearchInput/SearchInput.styles.js.map +1 -1
  1131. package/lib/components/Select/Select.d.ts +3 -3
  1132. package/lib/components/Select/Select.d.ts.map +1 -1
  1133. package/lib/components/Select/Select.js +14 -11
  1134. package/lib/components/Select/Select.js.map +1 -1
  1135. package/lib/components/SelectionCard/SelectionCard.d.ts +1 -1
  1136. package/lib/components/SelectionCard/SelectionCard.d.ts.map +1 -1
  1137. package/lib/components/SelectionCard/SelectionCard.js +50 -29
  1138. package/lib/components/SelectionCard/SelectionCard.js.map +1 -1
  1139. package/lib/components/SelectionCard/SelectionCard.styles.d.ts +36 -11
  1140. package/lib/components/SelectionCard/SelectionCard.styles.d.ts.map +1 -1
  1141. package/lib/components/SelectionCard/SelectionCard.styles.js +226 -62
  1142. package/lib/components/SelectionCard/SelectionCard.styles.js.map +1 -1
  1143. package/lib/components/SelectionCard/SelectionCard.test-ids.d.ts +2 -2
  1144. package/lib/components/SelectionCard/SelectionCard.test-ids.d.ts.map +1 -1
  1145. package/lib/components/SelectionCard/SelectionCard.test-ids.js +1 -1
  1146. package/lib/components/SelectionCard/SelectionCard.test-ids.js.map +1 -1
  1147. package/lib/components/SelectionCard/SelectionCard.types.d.ts +24 -6
  1148. package/lib/components/SelectionCard/SelectionCard.types.d.ts.map +1 -1
  1149. package/lib/components/SelectionCard/SelectionCard.types.js.map +1 -1
  1150. package/lib/components/SelectionCard/SelectionCardActions.d.ts +8 -0
  1151. package/lib/components/SelectionCard/SelectionCardActions.d.ts.map +1 -0
  1152. package/lib/components/SelectionCard/SelectionCardActions.js +48 -0
  1153. package/lib/components/SelectionCard/SelectionCardActions.js.map +1 -0
  1154. package/lib/components/SelectionCard/SelectionCardDisplay.d.ts +12 -4
  1155. package/lib/components/SelectionCard/SelectionCardDisplay.d.ts.map +1 -1
  1156. package/lib/components/SelectionCard/SelectionCardDisplay.js +6 -3
  1157. package/lib/components/SelectionCard/SelectionCardDisplay.js.map +1 -1
  1158. package/lib/components/SelectionCard/index.d.ts +1 -1
  1159. package/lib/components/SelectionCard/index.d.ts.map +1 -1
  1160. package/lib/components/SelectionCard/index.js.map +1 -1
  1161. package/lib/components/Sentiment/Sentiment.d.ts +1 -1
  1162. package/lib/components/Sentiment/Sentiment.d.ts.map +1 -1
  1163. package/lib/components/ShowMoreLess/ShowMoreLess.d.ts +3 -1
  1164. package/lib/components/ShowMoreLess/ShowMoreLess.d.ts.map +1 -1
  1165. package/lib/components/Skeleton/LineSkeleton.d.ts +1 -1
  1166. package/lib/components/Skeleton/LineSkeleton.d.ts.map +1 -1
  1167. package/lib/components/Skeleton/RectangleSkeleton.d.ts +1 -1
  1168. package/lib/components/Skeleton/RectangleSkeleton.d.ts.map +1 -1
  1169. package/lib/components/SkipLinks/SkipLinks.d.ts +0 -1
  1170. package/lib/components/SkipLinks/SkipLinks.d.ts.map +1 -1
  1171. package/lib/components/SkipLinks/SkipLinks.js +10 -53
  1172. package/lib/components/SkipLinks/SkipLinks.js.map +1 -1
  1173. package/lib/components/SkipLinks/SkipLinks.styles.d.ts +6 -0
  1174. package/lib/components/SkipLinks/SkipLinks.styles.d.ts.map +1 -0
  1175. package/lib/components/SkipLinks/SkipLinks.styles.js +61 -0
  1176. package/lib/components/SkipLinks/SkipLinks.styles.js.map +1 -0
  1177. package/lib/components/SkipLinks/index.d.ts +1 -1
  1178. package/lib/components/SkipLinks/index.d.ts.map +1 -1
  1179. package/lib/components/SkipLinks/index.js +1 -1
  1180. package/lib/components/SkipLinks/index.js.map +1 -1
  1181. package/lib/components/Slider/Slider.d.ts.map +1 -1
  1182. package/lib/components/Slider/Slider.js +18 -3
  1183. package/lib/components/Slider/Slider.js.map +1 -1
  1184. package/lib/components/Slider/Slider.styles.d.ts +15 -13
  1185. package/lib/components/Slider/Slider.styles.d.ts.map +1 -1
  1186. package/lib/components/Slider/Slider.styles.js +2 -2
  1187. package/lib/components/Slider/Slider.styles.js.map +1 -1
  1188. package/lib/components/SpeechToTextButton/SpeechToTextButton.d.ts +13 -0
  1189. package/lib/components/SpeechToTextButton/SpeechToTextButton.d.ts.map +1 -0
  1190. package/lib/components/SpeechToTextButton/SpeechToTextButton.js +29 -0
  1191. package/lib/components/SpeechToTextButton/SpeechToTextButton.js.map +1 -0
  1192. package/lib/components/SpeechToTextButton/SpeechToTextButton.test-ids.d.ts +2 -0
  1193. package/lib/components/SpeechToTextButton/SpeechToTextButton.test-ids.d.ts.map +1 -0
  1194. package/lib/components/SpeechToTextButton/SpeechToTextButton.test-ids.js +3 -0
  1195. package/lib/components/SpeechToTextButton/SpeechToTextButton.test-ids.js.map +1 -0
  1196. package/lib/components/SpeechToTextButton/index.d.ts +3 -0
  1197. package/lib/components/SpeechToTextButton/index.d.ts.map +1 -0
  1198. package/lib/components/SpeechToTextButton/index.js +2 -0
  1199. package/lib/components/SpeechToTextButton/index.js.map +1 -0
  1200. package/lib/components/SummaryItem/SummaryItem.d.ts +371 -7
  1201. package/lib/components/SummaryItem/SummaryItem.d.ts.map +1 -1
  1202. package/lib/components/SummaryItem/SummaryItem.js +3 -1
  1203. package/lib/components/SummaryItem/SummaryItem.js.map +1 -1
  1204. package/lib/components/SummaryList/SummaryList.d.ts +26 -8
  1205. package/lib/components/SummaryList/SummaryList.d.ts.map +1 -1
  1206. package/lib/components/SummaryList/SummaryList.js +54 -9
  1207. package/lib/components/SummaryList/SummaryList.js.map +1 -1
  1208. package/lib/components/SummaryList/ViewAll.d.ts +10 -4
  1209. package/lib/components/SummaryList/ViewAll.d.ts.map +1 -1
  1210. package/lib/components/SummaryList/ViewAll.js +23 -3
  1211. package/lib/components/SummaryList/ViewAll.js.map +1 -1
  1212. package/lib/components/SummaryList/index.d.ts +1 -0
  1213. package/lib/components/SummaryList/index.d.ts.map +1 -1
  1214. package/lib/components/SummaryList/index.js.map +1 -1
  1215. package/lib/components/Switch/Switch.d.ts +3 -3
  1216. package/lib/components/Switch/Switch.d.ts.map +1 -1
  1217. package/lib/components/Switch/Switch.js +14 -5
  1218. package/lib/components/Switch/Switch.js.map +1 -1
  1219. package/lib/components/Table/Table.d.ts +2 -1
  1220. package/lib/components/Table/Table.d.ts.map +1 -1
  1221. package/lib/components/Table/Table.js +1 -0
  1222. package/lib/components/Table/Table.js.map +1 -1
  1223. package/lib/components/Tabs/Tab.d.ts +3 -4
  1224. package/lib/components/Tabs/Tab.d.ts.map +1 -1
  1225. package/lib/components/Tabs/Tab.js +111 -106
  1226. package/lib/components/Tabs/Tab.js.map +1 -1
  1227. package/lib/components/Tabs/TabPanel.d.ts +184 -2
  1228. package/lib/components/Tabs/TabPanel.d.ts.map +1 -1
  1229. package/lib/components/Tabs/TabPanel.js +4 -2
  1230. package/lib/components/Tabs/TabPanel.js.map +1 -1
  1231. package/lib/components/Tabs/Tabs.d.ts.map +1 -1
  1232. package/lib/components/Tabs/Tabs.js +24 -1
  1233. package/lib/components/Tabs/Tabs.js.map +1 -1
  1234. package/lib/components/Tabs/Tabs.styles.d.ts +12 -10
  1235. package/lib/components/Tabs/Tabs.styles.d.ts.map +1 -1
  1236. package/lib/components/Tabs/Tabs.styles.js +126 -11
  1237. package/lib/components/Tabs/Tabs.styles.js.map +1 -1
  1238. package/lib/components/Text/Text.d.ts +1 -1
  1239. package/lib/components/Text/Text.d.ts.map +1 -1
  1240. package/lib/components/TextArea/TextArea.d.ts +3 -1
  1241. package/lib/components/TextArea/TextArea.d.ts.map +1 -1
  1242. package/lib/components/TextArea/TextArea.js +95 -28
  1243. package/lib/components/TextArea/TextArea.js.map +1 -1
  1244. package/lib/components/TextArea/TextArea.styles.d.ts +3 -2
  1245. package/lib/components/TextArea/TextArea.styles.d.ts.map +1 -1
  1246. package/lib/components/TextArea/TextArea.styles.js +2 -0
  1247. package/lib/components/TextArea/TextArea.styles.js.map +1 -1
  1248. package/lib/components/Toaster/Toaster.d.ts +1 -1
  1249. package/lib/components/Toaster/Toaster.d.ts.map +1 -1
  1250. package/lib/components/Toaster/Toaster.js +5 -5
  1251. package/lib/components/Toaster/Toaster.js.map +1 -1
  1252. package/lib/components/Toaster/Toaster.types.d.ts +0 -13
  1253. package/lib/components/Toaster/Toaster.types.d.ts.map +1 -1
  1254. package/lib/components/Toaster/Toaster.types.js.map +1 -1
  1255. package/lib/components/Tooltip/Tooltip.d.ts +1 -1
  1256. package/lib/components/Tooltip/Tooltip.d.ts.map +1 -1
  1257. package/lib/components/Tooltip/Tooltip.js +5 -0
  1258. package/lib/components/Tooltip/Tooltip.js.map +1 -1
  1259. package/lib/components/Tree/StandardTree.d.ts.map +1 -1
  1260. package/lib/components/Tree/StandardTree.js +4 -3
  1261. package/lib/components/Tree/StandardTree.js.map +1 -1
  1262. package/lib/components/Tree/StandardTree.styles.d.ts +20 -16
  1263. package/lib/components/Tree/StandardTree.styles.d.ts.map +1 -1
  1264. package/lib/components/Tree/StandardTree.styles.js +11 -10
  1265. package/lib/components/Tree/StandardTree.styles.js.map +1 -1
  1266. package/lib/components/Tree/StandardTree.types.d.ts +2 -2
  1267. package/lib/components/Tree/StandardTree.types.d.ts.map +1 -1
  1268. package/lib/components/Tree/StandardTree.types.js.map +1 -1
  1269. package/lib/components/Tree/Tree.d.ts +2 -2
  1270. package/lib/components/Tree/Tree.d.ts.map +1 -1
  1271. package/lib/components/VisuallyHiddenText/VisuallyHiddenText.d.ts +1 -1
  1272. package/lib/components/VisuallyHiddenText/VisuallyHiddenText.d.ts.map +1 -1
  1273. package/lib/hooks/index.d.ts +5 -0
  1274. package/lib/hooks/index.d.ts.map +1 -1
  1275. package/lib/hooks/index.js +5 -0
  1276. package/lib/hooks/index.js.map +1 -1
  1277. package/lib/hooks/useActiveDescendant.d.ts +6 -1
  1278. package/lib/hooks/useActiveDescendant.d.ts.map +1 -1
  1279. package/lib/hooks/useActiveDescendant.js +5 -5
  1280. package/lib/hooks/useActiveDescendant.js.map +1 -1
  1281. package/lib/hooks/useAnimatedText.d.ts +3 -1
  1282. package/lib/hooks/useAnimatedText.d.ts.map +1 -1
  1283. package/lib/hooks/useAnimatedText.js +66 -46
  1284. package/lib/hooks/useAnimatedText.js.map +1 -1
  1285. package/lib/hooks/useArrows.d.ts +27 -7
  1286. package/lib/hooks/useArrows.d.ts.map +1 -1
  1287. package/lib/hooks/useArrows.js +50 -26
  1288. package/lib/hooks/useArrows.js.map +1 -1
  1289. package/lib/hooks/useContentTabIndex.d.ts +17 -0
  1290. package/lib/hooks/useContentTabIndex.d.ts.map +1 -0
  1291. package/lib/hooks/useContentTabIndex.js +48 -0
  1292. package/lib/hooks/useContentTabIndex.js.map +1 -0
  1293. package/lib/hooks/useFocusTrap.d.ts.map +1 -1
  1294. package/lib/hooks/useFocusTrap.js +1 -0
  1295. package/lib/hooks/useFocusTrap.js.map +1 -1
  1296. package/lib/hooks/useFocusWithin.d.ts.map +1 -1
  1297. package/lib/hooks/useFocusWithin.js +11 -6
  1298. package/lib/hooks/useFocusWithin.js.map +1 -1
  1299. package/lib/hooks/useHighlight.d.ts +12 -0
  1300. package/lib/hooks/useHighlight.d.ts.map +1 -0
  1301. package/lib/hooks/useHighlight.js +55 -0
  1302. package/lib/hooks/useHighlight.js.map +1 -0
  1303. package/lib/hooks/useI18n.d.ts +331 -16
  1304. package/lib/hooks/useI18n.d.ts.map +1 -1
  1305. package/lib/hooks/useOS.d.ts +1 -1
  1306. package/lib/hooks/usePreviewContext.d.ts +7 -0
  1307. package/lib/hooks/usePreviewContext.d.ts.map +1 -0
  1308. package/lib/hooks/usePreviewContext.js +12 -0
  1309. package/lib/hooks/usePreviewContext.js.map +1 -0
  1310. package/lib/hooks/usePreviewManager.d.ts +8 -0
  1311. package/lib/hooks/usePreviewManager.d.ts.map +1 -0
  1312. package/lib/hooks/usePreviewManager.js +16 -0
  1313. package/lib/hooks/usePreviewManager.js.map +1 -0
  1314. package/lib/hooks/useScrollStick.js +1 -1
  1315. package/lib/hooks/useScrollStick.js.map +1 -1
  1316. package/lib/hooks/useSpeechRecognition.d.ts +21 -0
  1317. package/lib/hooks/useSpeechRecognition.d.ts.map +1 -0
  1318. package/lib/hooks/useSpeechRecognition.js +123 -0
  1319. package/lib/hooks/useSpeechRecognition.js.map +1 -0
  1320. package/lib/hooks/useThemeMode.d.ts +10 -0
  1321. package/lib/hooks/useThemeMode.d.ts.map +1 -0
  1322. package/lib/hooks/useThemeMode.js +11 -0
  1323. package/lib/hooks/useThemeMode.js.map +1 -0
  1324. package/lib/hooks/useTransitionState.d.ts +3 -2
  1325. package/lib/hooks/useTransitionState.d.ts.map +1 -1
  1326. package/lib/hooks/useTransitionState.js.map +1 -1
  1327. package/lib/i18n/default.d.ts +340 -17
  1328. package/lib/i18n/default.d.ts.map +1 -1
  1329. package/lib/i18n/default.js +379 -36
  1330. package/lib/i18n/default.js.map +1 -1
  1331. package/lib/i18n/i18n.d.ts +331 -16
  1332. package/lib/i18n/i18n.d.ts.map +1 -1
  1333. package/lib/i18n/translate.d.ts +0 -1
  1334. package/lib/i18n/translate.d.ts.map +1 -1
  1335. package/lib/i18n/translate.js +0 -1
  1336. package/lib/i18n/translate.js.map +1 -1
  1337. package/lib/index.d.ts +13 -0
  1338. package/lib/index.d.ts.map +1 -1
  1339. package/lib/index.js +13 -0
  1340. package/lib/index.js.map +1 -1
  1341. package/lib/styles/GlobalStyle.d.ts +3 -3
  1342. package/lib/styles/GlobalStyle.d.ts.map +1 -1
  1343. package/lib/styles/GlobalStyle.js +22 -4
  1344. package/lib/styles/GlobalStyle.js.map +1 -1
  1345. package/lib/styles/animations.d.ts +8 -8
  1346. package/lib/styles/animations.d.ts.map +1 -1
  1347. package/lib/styles/animations.js +71 -53
  1348. package/lib/styles/animations.js.map +1 -1
  1349. package/lib/styles/constants.d.ts +4 -0
  1350. package/lib/styles/constants.d.ts.map +1 -1
  1351. package/lib/styles/constants.js +12 -0
  1352. package/lib/styles/constants.js.map +1 -1
  1353. package/lib/styles/mixins.d.ts +3 -3
  1354. package/lib/styles/mixins.d.ts.map +1 -1
  1355. package/lib/styles/utils.d.ts +35 -4
  1356. package/lib/styles/utils.d.ts.map +1 -1
  1357. package/lib/styles/utils.js +93 -11
  1358. package/lib/styles/utils.js.map +1 -1
  1359. package/lib/theme/index.d.ts +4 -0
  1360. package/lib/theme/index.d.ts.map +1 -1
  1361. package/lib/theme/index.js +4 -0
  1362. package/lib/theme/index.js.map +1 -1
  1363. package/lib/theme/theme.d.ts +348 -0
  1364. package/lib/theme/theme.d.ts.map +1 -1
  1365. package/lib/theme/themeDefinition.json +212 -4
  1366. package/lib/theme/themeOverrides.schema.json +346 -170
  1367. package/lib/theme/themes/andromeda2025Theme.json +2 -2
  1368. package/lib/theme/themes/aries2023DarkTheme.json +22 -0
  1369. package/lib/theme/themes/bootes2025DarkTheme.json +32 -1
  1370. package/lib/theme/themes/bootes2025Theme.json +11 -2
  1371. package/lib/theme/themes/darkTheme.json +22 -0
  1372. package/lib/theme/themes/orionDarkTheme.json +175 -0
  1373. package/lib/theme/themes/orionTheme.json +155 -0
  1374. package/lib/theme/themes/studioDarkTheme.json +25 -7
  1375. package/lib/theme/themes/studioTheme.json +37 -19
  1376. package/lib/theme/themes/virgoDarkTheme.json +206 -0
  1377. package/lib/theme/themes/virgoTheme.json +166 -0
  1378. package/lib/utils/focusHeadingOrContainer.d.ts.map +1 -1
  1379. package/lib/utils/focusHeadingOrContainer.js +2 -17
  1380. package/lib/utils/focusHeadingOrContainer.js.map +1 -1
  1381. package/lib/utils/focusNonInteractiveElement.d.ts +1 -1
  1382. package/lib/utils/focusNonInteractiveElement.d.ts.map +1 -1
  1383. package/lib/utils/focusNonInteractiveElement.js.map +1 -1
  1384. package/lib/utils/formatListToLocaleString.d.ts +0 -1
  1385. package/lib/utils/formatListToLocaleString.d.ts.map +1 -1
  1386. package/lib/utils/formatListToLocaleString.js +0 -1
  1387. package/lib/utils/formatListToLocaleString.js.map +1 -1
  1388. package/lib/utils/getAllPopovers.d.ts.map +1 -1
  1389. package/lib/utils/getAllPopovers.js +2 -1
  1390. package/lib/utils/getAllPopovers.js.map +1 -1
  1391. package/lib/utils/getEffectiveRect.d.ts +13 -0
  1392. package/lib/utils/getEffectiveRect.d.ts.map +1 -0
  1393. package/lib/utils/getEffectiveRect.js +93 -0
  1394. package/lib/utils/getEffectiveRect.js.map +1 -0
  1395. package/lib/utils/getFocusables.d.ts.map +1 -1
  1396. package/lib/utils/getFocusables.js +2 -1
  1397. package/lib/utils/getFocusables.js.map +1 -1
  1398. package/lib/utils/getParentWindow.d.ts +3 -0
  1399. package/lib/utils/getParentWindow.d.ts.map +1 -0
  1400. package/lib/utils/getParentWindow.js +12 -0
  1401. package/lib/utils/getParentWindow.js.map +1 -0
  1402. package/lib/utils/handleLinkClick.d.ts +33 -0
  1403. package/lib/utils/handleLinkClick.d.ts.map +1 -0
  1404. package/lib/utils/handleLinkClick.js +41 -0
  1405. package/lib/utils/handleLinkClick.js.map +1 -0
  1406. package/lib/utils/index.d.ts +3 -0
  1407. package/lib/utils/index.d.ts.map +1 -1
  1408. package/lib/utils/index.js +3 -0
  1409. package/lib/utils/index.js.map +1 -1
  1410. package/lib/utils/markdownTokenizer.d.ts +4 -1
  1411. package/lib/utils/markdownTokenizer.d.ts.map +1 -1
  1412. package/lib/utils/markdownTokenizer.js +46 -13
  1413. package/lib/utils/markdownTokenizer.js.map +1 -1
  1414. package/package.json +6 -5
@@ -89,7 +89,7 @@ const StyledToaster = styled.div(({ theme }) => {
89
89
  width: min(40ch, calc(100% - 1rem));
90
90
  inset-inline-start: 50%;
91
91
  transform: translateX(-50%);
92
- top: 100%;
92
+ top: calc(100dvh - var(--appshell-bottom-offset, 0rem));
93
93
  `;
94
94
  });
95
95
  StyledToaster.defaultProps = defaultThemeProp;
@@ -156,7 +156,7 @@ const Toast = forwardRef(function Toast({ id, firstToast, dispatch, topLevelDism
156
156
  topLevelDismiss?.({ id, timeout });
157
157
  };
158
158
  const startTimer = () => {
159
- if (Number.isFinite(dismissAfter)) {
159
+ if (dismissAfter) {
160
160
  timeoutRef.current = window.setTimeout(dismiss(true), dismissAfter);
161
161
  }
162
162
  };
@@ -203,7 +203,7 @@ const Toast = forwardRef(function Toast({ id, firstToast, dispatch, topLevelDism
203
203
  '--scale': dismissed ? '0' : '1'
204
204
  }, onTransitionEnd: onTransitionEnd, children: [_jsxs(Flex, { item: { grow: 1 }, as: StyledToastContent, children: [content, hasProp(restProps, 'href') ? (_jsxs(_Fragment, { children: ["\u00A0", _jsx(Link, { href: restProps.href, children: restProps.caseId ? `(${restProps.caseId}): ${restProps.label}` : restProps.label })] })) : undefined] }), _jsxs(Flex, { container: { inline: true, justify: 'end', gap: 0.5 }, children: [_jsx(Keyboard, { keyName: 'Alt' }), _jsx(Keyboard, { keyName: 'Enter' })] }), _jsx(Button, { as: StyledToastButton, variant: 'simple', onClick: dismiss(false), icon: true, "aria-label": t('dismiss_label'), children: _jsx(Icon, { name: 'times' }) })] }));
205
205
  });
206
- const Toaster = ({ testId, children, dismissAfter = Infinity, onDismiss }) => {
206
+ const Toaster = ({ testId, children, onDismiss }) => {
207
207
  const { portalTarget } = useConfiguration();
208
208
  const [messages, dispatch] = useReducer(reducer, []);
209
209
  const [yOffsets, setYOffsets] = useState([]);
@@ -221,7 +221,7 @@ const Toaster = ({ testId, children, dismissAfter = Infinity, onDismiss }) => {
221
221
  const message = {
222
222
  ...incoming,
223
223
  id: incoming.id ?? createUID(),
224
- dismissAfter: hasProp(incoming, 'href') ? 10_000 : incoming.dismissAfter
224
+ dismissAfter: hasProp(incoming, 'href') ? 15_000 : 7_500
225
225
  };
226
226
  dispatch({
227
227
  type: 'push',
@@ -262,7 +262,7 @@ const Toaster = ({ testId, children, dismissAfter = Infinity, onDismiss }) => {
262
262
  }
263
263
  return (
264
264
  // Base Toast
265
- _createElement(Toast, { "data-testid": testIds.toast, ...message, ...sharedProps, dismissAfter: message.dismissAfter ?? dismissAfter, key: message.id }));
265
+ _createElement(Toast, { "data-testid": testIds.toast, ...message, ...sharedProps, key: message.id }));
266
266
  }) }), portalTarget)] }));
267
267
  };
268
268
  export default withTestIds(Toaster, getToasterTestIds);
@@ -1 +1 @@
1
- {"version":3,"file":"Toaster.js","sourceRoot":"","sources":["../../../src/components/Toaster/Toaster.tsx"],"names":[],"mappings":";;AAAA,OAAO,EACL,UAAU,EACV,UAAU,EACV,OAAO,EACP,eAAe,EACf,MAAM,EACN,QAAQ,EACR,UAAU,EACV,SAAS,EACV,MAAM,OAAO,CAAC;AAUf,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,IAAI,EAAE,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,IAAI,EAAE,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,KAAK,SAAS,MAAM,0BAA0B,CAAC;AACtD,OAAO,EACL,SAAS,EACT,iBAAiB,EACjB,WAAW,EACX,OAAO,EACP,gBAAgB,EAChB,aAAa,EACd,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,gBAAgB,EAChB,OAAO,EACP,UAAU,EACV,KAAK,EACL,WAAW,EACX,UAAU,EACV,kBAAkB,EAClB,SAAS,EACT,cAAc,EACf,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,YAAY,CAAC;AACpB,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpD,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAE3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,YAAY,CAAC,SAAS,CAAC,CAAC;AACxB,cAAc,CACZ,EAA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AC,OAAO,EAAE,MAAM,CAAC,EAAE,CAAC;4BAC7B,OAAO;4BACL,kBAAkB;4BAClB,eAAC,KAAK,mBACS,OAAO,CAAC,KAAK,KACtB,OAAO,KACP,WAAW,EACf,GAAG,EAAE,OAAO,CAAC,EAAE,GACf,CACH,CAAC;wBACJ,CAAC;wBAED,OAAO;wBACL,aAAa;wBACb,eAAC,KAAK,mBACS,OAAO,CAAC,KAAK,KACtB,OAAO,KACP,WAAW,EACf,YAAY,EAAE,OAAO,CAAC,YAAY,IAAI,YAAY,EAClD,GAAG,EAAE,OAAO,CAAC,EAAE,GACf,CACH,CAAC;oBACJ,CAAC,CAAC,GACY,EAChB,YAAY,CACb,IACF,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC","sourcesContent":["import {\n useContext,\n useReducer,\n useMemo,\n useLayoutEffect,\n useRef,\n useState,\n forwardRef,\n useEffect\n} from 'react';\nimport type {\n FunctionComponent,\n CSSProperties,\n TransitionEvent,\n Context,\n PropsWithoutRef,\n Ref,\n Dispatch\n} from 'react';\nimport { createPortal } from 'react-dom';\nimport styled, { css } from 'styled-components';\n\nimport Button from '../Button';\nimport Icon, { registerIcon } from '../Icon';\nimport Link, { StyledLink } from '../Link';\nimport * as timesIcon from '../Icon/icons/times.icon';\nimport {\n createUID,\n windowIsAvailable,\n withTestIds,\n hasProp,\n getActiveElement,\n getFocusables\n} from '../../utils';\nimport {\n useConfiguration,\n useI18n,\n useLiveLog,\n useOS,\n useShortcut,\n useTestIds,\n useConsolidatedRef,\n useEscape,\n useFocusWithin\n} from '../../hooks';\nimport { defaultThemeProp } from '../../theme';\nimport Flex from '../Flex';\nimport '../../init';\nimport { registerAction } from '../ShortcutManager';\nimport type { OmitStrict } from '../../types';\nimport { Keyboard } from '../Badges';\nimport { StyledKeyboard } from '../Badges/Keyboard';\n\nimport type { ToastMessage, ToasterProps, BaseToastMessage, CreatedMessage } from './Toaster.types';\nimport { ToasterContext } from './Context';\nimport type { ToasterContextValue } from './Context';\nimport { getToasterTestIds } from './Toaster.test-ids';\n\nregisterIcon(timesIcon);\nregisterAction(\n { id: 'JumpToToast', defaultKeyBinding: 'Alt+Enter' },\n { id: 'DismissToast', defaultKeyBinding: 'Alt+Q' }\n);\n\ntype ToastState = (\n | OmitStrict<BaseToastMessage, 'dismissAfter'>\n | OmitStrict<CreatedMessage, 'dismissAfter'>\n) & {\n id: NonNullable<ToastMessage['id']>;\n dismissAfter?: number;\n};\n\ntype ToastReducerAction =\n | { type: 'push'; payload: ToastState }\n | { type: 'unmount'; payload: ToastState['id'] };\n\ntype ToastProps = ToastState & {\n // determines if this is the first toast in the list, used to dismiss the first toast with a shortcut, not exposed outside\n firstToast: boolean;\n topLevelDismiss: ToasterProps['onDismiss'];\n translateY: number;\n dispatch: Dispatch<ToastReducerAction>;\n ref: Ref<HTMLDivElement>;\n};\n\ndeclare module '../../init' {\n export interface CosmosGlobals {\n toasterContext?: Context<ToasterContextValue>;\n }\n}\n\nconst StyledToastButton = styled.button(\n ({ theme }) => css`\n border: none;\n color: inherit;\n padding: 0;\n font-size: 1rem;\n margin-block: calc(${theme.base.spacing} / 2);\n margin-inline-end: calc(${theme.base.spacing} / 2);\n\n &:enabled:hover {\n background: #ffffff19;\n }\n\n &:enabled:focus {\n box-shadow: ${theme.base.shadow.focus};\n }\n `\n);\n\nStyledToastButton.defaultProps = defaultThemeProp;\n\nconst StyledToastContent = styled.div(({ theme }) => {\n return css`\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: clip;\n text-overflow: ellipsis;\n font-size: ${theme.base['font-size']};\n margin-inline-start: calc(${theme.base['border-radius']} / 2);\n padding-inline-start: calc(${theme.base.spacing} / 2);\n\n ${StyledLink} {\n color: ${theme.base.colors.blue.light};\n }\n `;\n});\n\nStyledToastContent.defaultProps = defaultThemeProp;\n\nconst StyledToast = styled.div(({ theme }) => {\n return css`\n position: absolute;\n inset-block-start: 0;\n inset-inline-start: 0;\n width: 100%;\n background: ${theme.base.colors.slate['extra-dark']};\n color: ${theme.base.colors.white};\n border-radius: calc(${theme.base['border-radius']} / 2);\n opacity: var(--opacity);\n transform: translateY(var(--translateY)) scale(var(--scale));\n transition-property: transform, opacity;\n transition-duration: ${theme.base.animation.speed};\n transition-timing-function: ${theme.base.animation.timing.ease};\n font-weight: ${theme.base['font-weight']['semi-bold']};\n\n :focus {\n box-shadow: ${theme.base.shadow.focus};\n }\n\n ${StyledKeyboard} {\n color: ${theme.base.palette.light};\n background-color: ${theme.base.colors.gray.dark};\n border-color: ${theme.base.colors.gray.medium};\n inset-block-start: unset;\n }\n `;\n});\n\nStyledToast.defaultProps = defaultThemeProp;\n\nconst StyledToaster = styled.div(({ theme }) => {\n return css`\n position: fixed;\n z-index: ${theme.base['z-index'].toast};\n width: min(40ch, calc(100% - 1rem));\n inset-inline-start: 50%;\n transform: translateX(-50%);\n top: 100%;\n `;\n});\n\nStyledToaster.defaultProps = defaultThemeProp;\n\nfunction reducer(current: ToastState[], action: ToastReducerAction) {\n switch (action.type) {\n case 'push':\n return [\n ...current,\n {\n ...action.payload\n }\n ];\n\n case 'unmount':\n return current.filter(m => m.id !== action.payload);\n\n default:\n return current;\n }\n}\n\nconst Toast = forwardRef(function Toast(\n {\n id,\n firstToast,\n dispatch,\n topLevelDismiss,\n translateY,\n onDismiss,\n dismissAfter,\n ...restProps\n }: PropsWithoutRef<ToastProps>,\n ref: ToastProps['ref']\n) {\n const [dismissed, setDismissed] = useState(false);\n const timeoutRef = useRef(NaN);\n const t = useI18n();\n const { macintosh } = useOS();\n const { announcePolite } = useLiveLog();\n const content = hasProp(restProps, 'href') ? t('created') : restProps.content;\n const initiatorRef = useRef<HTMLElement | null>(null);\n const containerRef = useConsolidatedRef(ref);\n\n useEffect(() => {\n let fullMessage = content;\n if (hasProp(restProps, 'href')) {\n // CreatedMessage\n fullMessage = restProps.caseId\n ? `${content} ${restProps.caseId} ${restProps.label}`\n : `${content} ${restProps.label}`;\n }\n\n const shortcutJumpMessage = t('keypress_instruction', [\n macintosh ? 'Option + Enter' : 'Alt + Enter',\n t('shortcut_JumpToToast')\n ]);\n\n const shortcutDismissMessage = t('keypress_instruction', [\n macintosh ? 'Option + Q' : 'Alt + Q',\n t('shortcut_DismissToast')\n ]);\n\n announcePolite({\n message: `${fullMessage}. ${shortcutJumpMessage}. ${shortcutDismissMessage}.`,\n type: 'acknowledgement'\n });\n }, []);\n\n const onTransitionEnd = (e: TransitionEvent<HTMLDivElement>) => {\n if (dismissed && e.propertyName === 'opacity' && e.target === e.currentTarget) {\n dispatch({ type: 'unmount', payload: id });\n }\n };\n\n const dismiss = (timeout: boolean) => () => {\n if (initiatorRef.current) {\n initiatorRef.current?.focus?.();\n initiatorRef.current = null;\n }\n clearTimeout(timeoutRef.current);\n if (dismissed) return;\n setDismissed(true);\n onDismiss?.({ id, timeout });\n topLevelDismiss?.({ id, timeout });\n };\n\n const startTimer = () => {\n if (Number.isFinite(dismissAfter)) {\n timeoutRef.current = window.setTimeout(dismiss(true), dismissAfter);\n }\n };\n\n useEffect(() => {\n startTimer();\n return () => {\n window.clearTimeout(timeoutRef.current);\n };\n }, []);\n\n // Alt+Enter focuses on the first focusable element in the first toast.\n // Tab to the next toast if there are multiple.\n useShortcut('JumpToToast', () => {\n const activeElement = getActiveElement();\n if (activeElement && activeElement !== document.body) {\n initiatorRef.current = activeElement as HTMLElement;\n }\n if (firstToast && containerRef.current) {\n getFocusables(containerRef.current)[0]?.focus();\n }\n });\n\n // Alt+Q dismisses the first toast.\n useShortcut('DismissToast', () => {\n if (firstToast) dismiss(false)();\n });\n\n // Escape dismisses the toast and focuses the initiator.\n useEscape(() => {\n const currentFocus = getActiveElement();\n if (containerRef.current?.contains(currentFocus)) {\n dismiss(false)();\n }\n });\n\n useFocusWithin([containerRef], (focused: boolean) => {\n if (focused) {\n window.clearTimeout(timeoutRef.current);\n } else {\n startTimer();\n }\n });\n\n return (\n <Flex\n {...restProps}\n data-app-region\n container={{ alignItems: 'center', gap: 0.25 }}\n as={StyledToast}\n ref={containerRef}\n style={\n {\n '--translateY': `${-translateY}px`,\n '--opacity': dismissed ? '0' : '1',\n '--scale': dismissed ? '0' : '1'\n } as CSSProperties\n }\n onTransitionEnd={onTransitionEnd}\n >\n <Flex item={{ grow: 1 }} as={StyledToastContent}>\n {content}\n {hasProp(restProps, 'href') ? (\n <>\n &nbsp;\n <Link href={restProps.href}>\n {restProps.caseId ? `(${restProps.caseId}): ${restProps.label}` : restProps.label}\n </Link>\n </>\n ) : undefined}\n </Flex>\n <Flex container={{ inline: true, justify: 'end', gap: 0.5 }}>\n <Keyboard keyName='Alt' />\n <Keyboard keyName='Enter' />\n </Flex>\n <Button\n as={StyledToastButton}\n variant='simple'\n onClick={dismiss(false)}\n icon\n aria-label={t('dismiss_label')}\n >\n <Icon name='times' />\n </Button>\n </Flex>\n );\n});\n\nconst Toaster: FunctionComponent<ToasterProps> = ({\n testId,\n children,\n dismissAfter = Infinity,\n onDismiss\n}: ToasterProps) => {\n const { portalTarget } = useConfiguration();\n const [messages, dispatch] = useReducer(reducer, []);\n const [yOffsets, setYOffsets] = useState<number[]>([]);\n const heightHashRef = useRef<{\n [id: string]: number;\n }>({});\n const testIds = useTestIds(testId, getToasterTestIds);\n\n // This effect will cause a re-render with a translateY value set for each toast.\n useLayoutEffect(() => {\n const heights = [...messages].reverse().map(({ id }) => heightHashRef.current[id]);\n\n setYOffsets(\n heights\n .map((_, i) => heights.slice(0, i + 1).reduce((sum, cur) => sum + cur + 4, 0))\n .reverse()\n );\n }, [messages.length]);\n\n const providerValue = useMemo(\n () => ({\n push(incoming: ToastMessage) {\n const message: ToastState = {\n ...incoming,\n id: incoming.id ?? createUID(),\n dismissAfter: hasProp(incoming, 'href') ? 10_000 : incoming.dismissAfter\n };\n\n dispatch({\n type: 'push',\n payload: message\n });\n },\n initialized: true\n }),\n []\n );\n\n // Don't create additional ToasterContext.Providers.\n const context = windowIsAvailable\n ? window.cosmos.toasterContext ?? ToasterContext\n : ToasterContext;\n const priorCtx = useContext(context);\n if (priorCtx.initialized) {\n return <context.Provider value={priorCtx}>{children}</context.Provider>;\n }\n\n return (\n <>\n <context.Provider value={providerValue}>{children}</context.Provider>\n {!!messages.length &&\n portalTarget &&\n createPortal(\n <StyledToaster data-testid={testIds.root}>\n {messages.map((message, i) => {\n const sharedProps = {\n translateY: yOffsets[i] ?? 0,\n firstToast: i === 0,\n topLevelDismiss: onDismiss,\n dispatch,\n ref: el => {\n if (el) {\n heightHashRef.current[message.id] = el.offsetHeight;\n } else {\n delete heightHashRef.current[message.id];\n }\n }\n } satisfies Partial<ToastProps>;\n\n if (hasProp(message, 'href')) {\n return (\n // Toast with Link\n <Toast\n data-testid={testIds.toast}\n {...message}\n {...sharedProps}\n key={message.id}\n />\n );\n }\n\n return (\n // Base Toast\n <Toast\n data-testid={testIds.toast}\n {...message}\n {...sharedProps}\n dismissAfter={message.dismissAfter ?? dismissAfter}\n key={message.id}\n />\n );\n })}\n </StyledToaster>,\n portalTarget\n )}\n </>\n );\n};\n\nexport default withTestIds(Toaster, getToasterTestIds);\n"]}
1
+ {"version":3,"file":"Toaster.js","sourceRoot":"","sources":["../../../src/components/Toaster/Toaster.tsx"],"names":[],"mappings":";;AAAA,OAAO,EACL,UAAU,EACV,UAAU,EACV,OAAO,EACP,eAAe,EACf,MAAM,EACN,QAAQ,EACR,UAAU,EACV,SAAS,EACV,MAAM,OAAO,CAAC;AAUf,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,IAAI,EAAE,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,IAAI,EAAE,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,KAAK,SAAS,MAAM,0B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AC,MAAM;gBAChB,YAAY;gBACZ,YAAY,CACV,KAAC,aAAa,mBAAc,OAAO,CAAC,IAAI,YACrC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC,EAAE,EAAE;wBAC3B,MAAM,WAAW,GAAG;4BAClB,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC;4BAC5B,UAAU,EAAE,CAAC,KAAK,CAAC;4BACnB,eAAe,EAAE,SAAS;4BAC1B,QAAQ;4BACR,GAAG,EAAE,EAAE,CAAC,EAAE;gCACR,IAAI,EAAE,EAAE,CAAC;oCACP,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC;gCACtD,CAAC;qCAAM,CAAC;oCACN,OAAO,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;gCAC3C,CAAC;4BACH,CAAC;yBAC4B,CAAC;wBAEhC,IAAI,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,CAAC;4BAC7B,OAAO;4BACL,kBAAkB;4BAClB,eAAC,KAAK,mBACS,OAAO,CAAC,KAAK,KACtB,OAAO,KACP,WAAW,EACf,GAAG,EAAE,OAAO,CAAC,EAAE,GACf,CACH,CAAC;wBACJ,CAAC;wBAED,OAAO;wBACL,aAAa;wBACb,eAAC,KAAK,mBAAc,OAAO,CAAC,KAAK,KAAM,OAAO,KAAM,WAAW,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,GAAI,CACrF,CAAC;oBACJ,CAAC,CAAC,GACY,EAChB,YAAY,CACb,IACF,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC","sourcesContent":["import {\n useContext,\n useReducer,\n useMemo,\n useLayoutEffect,\n useRef,\n useState,\n forwardRef,\n useEffect\n} from 'react';\nimport type {\n FunctionComponent,\n CSSProperties,\n TransitionEvent,\n Context,\n PropsWithoutRef,\n Ref,\n Dispatch\n} from 'react';\nimport { createPortal } from 'react-dom';\nimport styled, { css } from 'styled-components';\n\nimport Button from '../Button';\nimport Icon, { registerIcon } from '../Icon';\nimport Link, { StyledLink } from '../Link';\nimport * as timesIcon from '../Icon/icons/times.icon';\nimport {\n createUID,\n windowIsAvailable,\n withTestIds,\n hasProp,\n getActiveElement,\n getFocusables\n} from '../../utils';\nimport {\n useConfiguration,\n useI18n,\n useLiveLog,\n useOS,\n useShortcut,\n useTestIds,\n useConsolidatedRef,\n useEscape,\n useFocusWithin\n} from '../../hooks';\nimport { defaultThemeProp } from '../../theme';\nimport Flex from '../Flex';\nimport '../../init';\nimport { registerAction } from '../ShortcutManager';\nimport { Keyboard } from '../Badges';\nimport { StyledKeyboard } from '../Badges/Keyboard';\n\nimport type { ToastMessage, ToasterProps, BaseToastMessage, CreatedMessage } from './Toaster.types';\nimport { ToasterContext } from './Context';\nimport type { ToasterContextValue } from './Context';\nimport { getToasterTestIds } from './Toaster.test-ids';\n\nregisterIcon(timesIcon);\nregisterAction(\n { id: 'JumpToToast', defaultKeyBinding: 'Alt+Enter' },\n { id: 'DismissToast', defaultKeyBinding: 'Alt+Q' }\n);\n\ntype ToastState = (BaseToastMessage | CreatedMessage) & {\n id: NonNullable<ToastMessage['id']>;\n dismissAfter?: number;\n};\n\ntype ToastReducerAction =\n | { type: 'push'; payload: ToastState }\n | { type: 'unmount'; payload: ToastState['id'] };\n\ntype ToastProps = ToastState & {\n // determines if this is the first toast in the list, used to dismiss the first toast with a shortcut, not exposed outside\n firstToast: boolean;\n topLevelDismiss: ToasterProps['onDismiss'];\n translateY: number;\n dispatch: Dispatch<ToastReducerAction>;\n ref: Ref<HTMLDivElement>;\n};\n\ndeclare module '../../init' {\n export interface CosmosGlobals {\n toasterContext?: Context<ToasterContextValue>;\n }\n}\n\nconst StyledToastButton = styled.button(\n ({ theme }) => css`\n border: none;\n color: inherit;\n padding: 0;\n font-size: 1rem;\n margin-block: calc(${theme.base.spacing} / 2);\n margin-inline-end: calc(${theme.base.spacing} / 2);\n\n &:enabled:hover {\n background: #ffffff19;\n }\n\n &:enabled:focus {\n box-shadow: ${theme.base.shadow.focus};\n }\n `\n);\n\nStyledToastButton.defaultProps = defaultThemeProp;\n\nconst StyledToastContent = styled.div(({ theme }) => {\n return css`\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: clip;\n text-overflow: ellipsis;\n font-size: ${theme.base['font-size']};\n margin-inline-start: calc(${theme.base['border-radius']} / 2);\n padding-inline-start: calc(${theme.base.spacing} / 2);\n\n ${StyledLink} {\n color: ${theme.base.colors.blue.light};\n }\n `;\n});\n\nStyledToastContent.defaultProps = defaultThemeProp;\n\nconst StyledToast = styled.div(({ theme }) => {\n return css`\n position: absolute;\n inset-block-start: 0;\n inset-inline-start: 0;\n width: 100%;\n background: ${theme.base.colors.slate['extra-dark']};\n color: ${theme.base.colors.white};\n border-radius: calc(${theme.base['border-radius']} / 2);\n opacity: var(--opacity);\n transform: translateY(var(--translateY)) scale(var(--scale));\n transition-property: transform, opacity;\n transition-duration: ${theme.base.animation.speed};\n transition-timing-function: ${theme.base.animation.timing.ease};\n font-weight: ${theme.base['font-weight']['semi-bold']};\n\n :focus {\n box-shadow: ${theme.base.shadow.focus};\n }\n\n ${StyledKeyboard} {\n color: ${theme.base.palette.light};\n background-color: ${theme.base.colors.gray.dark};\n border-color: ${theme.base.colors.gray.medium};\n inset-block-start: unset;\n }\n `;\n});\n\nStyledToast.defaultProps = defaultThemeProp;\n\nconst StyledToaster = styled.div(({ theme }) => {\n return css`\n position: fixed;\n z-index: ${theme.base['z-index'].toast};\n width: min(40ch, calc(100% - 1rem));\n inset-inline-start: 50%;\n transform: translateX(-50%);\n top: calc(100dvh - var(--appshell-bottom-offset, 0rem));\n `;\n});\n\nStyledToaster.defaultProps = defaultThemeProp;\n\nfunction reducer(current: ToastState[], action: ToastReducerAction) {\n switch (action.type) {\n case 'push':\n return [\n ...current,\n {\n ...action.payload\n }\n ];\n\n case 'unmount':\n return current.filter(m => m.id !== action.payload);\n\n default:\n return current;\n }\n}\n\nconst Toast = forwardRef(function Toast(\n {\n id,\n firstToast,\n dispatch,\n topLevelDismiss,\n translateY,\n onDismiss,\n dismissAfter,\n ...restProps\n }: PropsWithoutRef<ToastProps>,\n ref: ToastProps['ref']\n) {\n const [dismissed, setDismissed] = useState(false);\n const timeoutRef = useRef(NaN);\n const t = useI18n();\n const { macintosh } = useOS();\n const { announcePolite } = useLiveLog();\n const content = hasProp(restProps, 'href') ? t('created') : restProps.content;\n const initiatorRef = useRef<HTMLElement | null>(null);\n const containerRef = useConsolidatedRef(ref);\n\n useEffect(() => {\n let fullMessage = content;\n if (hasProp(restProps, 'href')) {\n // CreatedMessage\n fullMessage = restProps.caseId\n ? `${content} ${restProps.caseId} ${restProps.label}`\n : `${content} ${restProps.label}`;\n }\n\n const shortcutJumpMessage = t('keypress_instruction', [\n macintosh ? 'Option + Enter' : 'Alt + Enter',\n t('shortcut_JumpToToast')\n ]);\n\n const shortcutDismissMessage = t('keypress_instruction', [\n macintosh ? 'Option + Q' : 'Alt + Q',\n t('shortcut_DismissToast')\n ]);\n\n announcePolite({\n message: `${fullMessage}. ${shortcutJumpMessage}. ${shortcutDismissMessage}.`,\n type: 'acknowledgement'\n });\n }, []);\n\n const onTransitionEnd = (e: TransitionEvent<HTMLDivElement>) => {\n if (dismissed && e.propertyName === 'opacity' && e.target === e.currentTarget) {\n dispatch({ type: 'unmount', payload: id });\n }\n };\n\n const dismiss = (timeout: boolean) => () => {\n if (initiatorRef.current) {\n initiatorRef.current?.focus?.();\n initiatorRef.current = null;\n }\n clearTimeout(timeoutRef.current);\n if (dismissed) return;\n setDismissed(true);\n onDismiss?.({ id, timeout });\n topLevelDismiss?.({ id, timeout });\n };\n\n const startTimer = () => {\n if (dismissAfter) {\n timeoutRef.current = window.setTimeout(dismiss(true), dismissAfter);\n }\n };\n\n useEffect(() => {\n startTimer();\n return () => {\n window.clearTimeout(timeoutRef.current);\n };\n }, []);\n\n // Alt+Enter focuses on the first focusable element in the first toast.\n // Tab to the next toast if there are multiple.\n useShortcut('JumpToToast', () => {\n const activeElement = getActiveElement();\n if (activeElement && activeElement !== document.body) {\n initiatorRef.current = activeElement as HTMLElement;\n }\n if (firstToast && containerRef.current) {\n getFocusables(containerRef.current)[0]?.focus();\n }\n });\n\n // Alt+Q dismisses the first toast.\n useShortcut('DismissToast', () => {\n if (firstToast) dismiss(false)();\n });\n\n // Escape dismisses the toast and focuses the initiator.\n useEscape(() => {\n const currentFocus = getActiveElement();\n if (containerRef.current?.contains(currentFocus)) {\n dismiss(false)();\n }\n });\n\n useFocusWithin([containerRef], (focused: boolean) => {\n if (focused) {\n window.clearTimeout(timeoutRef.current);\n } else {\n startTimer();\n }\n });\n\n return (\n <Flex\n {...restProps}\n data-app-region\n container={{ alignItems: 'center', gap: 0.25 }}\n as={StyledToast}\n ref={containerRef}\n style={\n {\n '--translateY': `${-translateY}px`,\n '--opacity': dismissed ? '0' : '1',\n '--scale': dismissed ? '0' : '1'\n } as CSSProperties\n }\n onTransitionEnd={onTransitionEnd}\n >\n <Flex item={{ grow: 1 }} as={StyledToastContent}>\n {content}\n {hasProp(restProps, 'href') ? (\n <>\n &nbsp;\n <Link href={restProps.href}>\n {restProps.caseId ? `(${restProps.caseId}): ${restProps.label}` : restProps.label}\n </Link>\n </>\n ) : undefined}\n </Flex>\n <Flex container={{ inline: true, justify: 'end', gap: 0.5 }}>\n <Keyboard keyName='Alt' />\n <Keyboard keyName='Enter' />\n </Flex>\n <Button\n as={StyledToastButton}\n variant='simple'\n onClick={dismiss(false)}\n icon\n aria-label={t('dismiss_label')}\n >\n <Icon name='times' />\n </Button>\n </Flex>\n );\n});\n\nconst Toaster: FunctionComponent<ToasterProps> = ({\n testId,\n children,\n onDismiss\n}: ToasterProps) => {\n const { portalTarget } = useConfiguration();\n const [messages, dispatch] = useReducer(reducer, []);\n const [yOffsets, setYOffsets] = useState<number[]>([]);\n const heightHashRef = useRef<{\n [id: string]: number;\n }>({});\n const testIds = useTestIds(testId, getToasterTestIds);\n\n // This effect will cause a re-render with a translateY value set for each toast.\n useLayoutEffect(() => {\n const heights = [...messages].reverse().map(({ id }) => heightHashRef.current[id]);\n\n setYOffsets(\n heights\n .map((_, i) => heights.slice(0, i + 1).reduce((sum, cur) => sum + cur + 4, 0))\n .reverse()\n );\n }, [messages.length]);\n\n const providerValue = useMemo(\n () => ({\n push(incoming: ToastMessage) {\n const message: ToastState = {\n ...incoming,\n id: incoming.id ?? createUID(),\n dismissAfter: hasProp(incoming, 'href') ? 15_000 : 7_500\n };\n\n dispatch({\n type: 'push',\n payload: message\n });\n },\n initialized: true\n }),\n []\n );\n\n // Don't create additional ToasterContext.Providers.\n const context = windowIsAvailable\n ? window.cosmos.toasterContext ?? ToasterContext\n : ToasterContext;\n const priorCtx = useContext(context);\n if (priorCtx.initialized) {\n return <context.Provider value={priorCtx}>{children}</context.Provider>;\n }\n\n return (\n <>\n <context.Provider value={providerValue}>{children}</context.Provider>\n {!!messages.length &&\n portalTarget &&\n createPortal(\n <StyledToaster data-testid={testIds.root}>\n {messages.map((message, i) => {\n const sharedProps = {\n translateY: yOffsets[i] ?? 0,\n firstToast: i === 0,\n topLevelDismiss: onDismiss,\n dispatch,\n ref: el => {\n if (el) {\n heightHashRef.current[message.id] = el.offsetHeight;\n } else {\n delete heightHashRef.current[message.id];\n }\n }\n } satisfies Partial<ToastProps>;\n\n if (hasProp(message, 'href')) {\n return (\n // Toast with Link\n <Toast\n data-testid={testIds.toast}\n {...message}\n {...sharedProps}\n key={message.id}\n />\n );\n }\n\n return (\n // Base Toast\n <Toast data-testid={testIds.toast} {...message} {...sharedProps} key={message.id} />\n );\n })}\n </StyledToaster>,\n portalTarget\n )}\n </>\n );\n};\n\nexport default withTestIds(Toaster, getToasterTestIds);\n"]}
@@ -5,12 +5,6 @@ export type BaseToastMessage = {
5
5
  id?: string;
6
6
  /** A short message to provide feedback based upon a user action. */
7
7
  content: string;
8
- /**
9
- * Time in milliseconds to automatically dismiss toast.
10
- * Can be set globally on Toaster and overridden individually at a message level.
11
- * @default Infinity
12
- */
13
- dismissAfter?: number;
14
8
  /** Called when user or timer dismisses toasts. Callback is passed the message id and boolean indicating if the dismissal was timed. */
15
9
  onDismiss?: ({ id, timeout }: {
16
10
  id: NonNullable<ToastMessage['id']>;
@@ -26,19 +20,12 @@ export type CreatedMessage = Pick<BaseToastMessage, 'onDismiss' | 'id'> & {
26
20
  href: string;
27
21
  /** Called when link is clicked. */
28
22
  onClick?: MouseEventHandler<HTMLAnchorElement>;
29
- dismissAfter?: never;
30
23
  content?: never;
31
24
  };
32
25
  export type ToastMessage = BaseToastMessage | CreatedMessage;
33
26
  export interface ToasterProps extends TestIdProp {
34
27
  /** The element(s) responsible for handling the Toaster state. */
35
28
  children: ReactNode;
36
- /**
37
- * Time in milliseconds to automatically dismiss toast.
38
- * Can be set globally on Toaster and overridden individually at a message level.
39
- * @default Infinity
40
- */
41
- dismissAfter?: ToastMessage['dismissAfter'];
42
29
  /** Called when user or timer dismisses Toasts. Callback is passed the message id and boolean indicating if the dismissal was timed. */
43
30
  onDismiss?: ToastMessage['onDismiss'];
44
31
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Toaster.types.d.ts","sourceRoot":"","sources":["../../../src/components/Toaster/Toaster.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,+EAA+E;IAC/E,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,oEAAoE;IACpE,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uIAAuI;IACvI,SAAS,CAAC,EAAE,CAAC,EAAE,EAAE,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,OAAO,EAAE,EAAE;QAAE,EAAE,EAAE,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAC;CAClG,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,gBAAgB,EAAE,WAAW,GAAG,IAAI,CAAC,GAAG;IACxE,kDAAkD;IAClD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,wBAAwB;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,OAAO,CAAC,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IAC/C,OAAO,CAAC,EAAE,KAAK,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,gBAAgB,GAAG,cAAc,CAAC;AAE7D,MAAM,WAAW,YAAa,SAAQ,UAAU;IAC9C,iEAAiE;IACjE,QAAQ,EAAE,SAAS,CAAC;IACpB,uIAAuI;IACvI,SAAS,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,CAAC;CACvC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Toaster.types.js","sourceRoot":"","sources":["../../../src/components/Toaster/Toaster.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { MouseEventHandler, ReactNode } from 'react';\n\nimport type { TestIdProp } from '../../types';\n\nexport type BaseToastMessage = {\n /** String to identify the specific message. Used as onDismiss callback arg. */\n id?: string;\n /** A short message to provide feedback based upon a user action. */\n content: string;\n /**\n * Time in milliseconds to automatically dismiss toast.\n * Can be set globally on Toaster and overridden individually at a message level.\n * @default Infinity\n */\n dismissAfter?: number;\n /** Called when user or timer dismisses toasts. Callback is passed the message id and boolean indicating if the dismissal was timed. */\n onDismiss?: ({ id, timeout }: { id: NonNullable<ToastMessage['id']>; timeout: boolean }) => void;\n};\n\nexport type CreatedMessage = Pick<BaseToastMessage, 'onDismiss' | 'id'> & {\n /** Short identifier prepended to the link text */\n caseId?: string;\n /** Text of the link. */\n label: string;\n /** Link to newly created record. */\n href: string;\n /** Called when link is clicked. */\n onClick?: MouseEventHandler<HTMLAnchorElement>;\n dismissAfter?: never;\n content?: never;\n};\n\nexport type ToastMessage = BaseToastMessage | CreatedMessage;\n\nexport interface ToasterProps extends TestIdProp {\n /** The element(s) responsible for handling the Toaster state. */\n children: ReactNode;\n /**\n * Time in milliseconds to automatically dismiss toast.\n * Can be set globally on Toaster and overridden individually at a message level.\n * @default Infinity\n */\n dismissAfter?: ToastMessage['dismissAfter'];\n /** Called when user or timer dismisses Toasts. Callback is passed the message id and boolean indicating if the dismissal was timed. */\n onDismiss?: ToastMessage['onDismiss'];\n}\n"]}
1
+ {"version":3,"file":"Toaster.types.js","sourceRoot":"","sources":["../../../src/components/Toaster/Toaster.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { MouseEventHandler, ReactNode } from 'react';\n\nimport type { TestIdProp } from '../../types';\n\nexport type BaseToastMessage = {\n /** String to identify the specific message. Used as onDismiss callback arg. */\n id?: string;\n /** A short message to provide feedback based upon a user action. */\n content: string;\n /** Called when user or timer dismisses toasts. Callback is passed the message id and boolean indicating if the dismissal was timed. */\n onDismiss?: ({ id, timeout }: { id: NonNullable<ToastMessage['id']>; timeout: boolean }) => void;\n};\n\nexport type CreatedMessage = Pick<BaseToastMessage, 'onDismiss' | 'id'> & {\n /** Short identifier prepended to the link text */\n caseId?: string;\n /** Text of the link. */\n label: string;\n /** Link to newly created record. */\n href: string;\n /** Called when link is clicked. */\n onClick?: MouseEventHandler<HTMLAnchorElement>;\n content?: never;\n};\n\nexport type ToastMessage = BaseToastMessage | CreatedMessage;\n\nexport interface ToasterProps extends TestIdProp {\n /** The element(s) responsible for handling the Toaster state. */\n children: ReactNode;\n /** Called when user or timer dismisses Toasts. Callback is passed the message id and boolean indicating if the dismissal was timed. */\n onDismiss?: ToastMessage['onDismiss'];\n}\n"]}
@@ -46,7 +46,7 @@ export interface TooltipProps extends BaseProps, TestIdProp {
46
46
  groupId?: PopoverProps['groupId'];
47
47
  ref?: Ref<HTMLDivElement>;
48
48
  }
49
- export declare const StyledTooltip: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
49
+ export declare const StyledTooltip: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
50
50
  declare const _default: ForwardRefForwardPropsComponent<TooltipProps> & {
51
51
  getTestIds: (testIdProp?: TestIdProp["testId"]) => import("../../types").TestIdsRecord<readonly []>;
52
52
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../src/components/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAqC,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAG/E,OAAO,KAAK,EAAE,SAAS,EAAE,+BAA+B,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG1F,OAAO,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAQtD,MAAM,WAAW,YAAa,SAAQ,SAAS,EAAE,UAAU;IACzD,oCAAoC;IACpC,QAAQ,EAAE,SAAS,CAAC;IACpB,gDAAgD;IAChD,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;IACvB,2DAA2D;IAC3D,eAAe,CAAC,EAAE,YAAY,CAAC,QAAQ,CAAC,EAAE,CAAC;IAC3C;;;OAGG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB;;;OAGG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB;;;OAGG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAC;IAChC;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,SAAS,CAAC,EAAE,YAAY,CAAC,WAAW,CAA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AAC;CAC3B;AAED,eAAO,MAAM,aAAa,6NAcxB,CAAC;;;;AAiMH,wBAAuD"}
@@ -132,6 +132,11 @@ const Tooltip = forwardRef(function Tooltip({ testId, children, target, ignoredE
132
132
  'foreground-color': theme.components.tooltip['foreground-color'],
133
133
  interactive: readableHue(theme.base.palette.interactive, theme.components.tooltip['background-color'])
134
134
  }
135
+ },
136
+ components: {
137
+ label: {
138
+ 'foreground-color': theme.components.tooltip['foreground-color']
139
+ }
135
140
  }
136
141
  };
137
142
  return (_jsx(ThemeOverride, { theme: tooltipTheme, children: _jsx(Popover, { "data-testid": testIds.root, id: id, groupId: groupId, ...restProps, show: show, showDelay: ignoreDelay ? 'none' : showDelay, hideDelay: ignoreDelay ? 'none' : hideDelay, onMouseOver: () => {
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.js","sourceRoot":"","sources":["../../../src/components/Tooltip/Tooltip.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE7E,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,OAAO,MAAM,YAAY,CAAC;AAEjC,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC3F,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAgDvD,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,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QAAQ,EAAC,OAAO,EAChB,EAAE,EAAE,aAAa,EACjB,IAAI,EAAE,iBAAiB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,EAC9C,MAAM,EAAE,MAAM,EACd,KAAK,QACL,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,WAAW,EACxB,kBAAkB,QAClB,GAAG,EAAE,UAAU,YAEd,QAAQ,GACD,GACI,CACjB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC","sourcesContent":["import { forwardRef, useCallback, useEffect, useRef, useState } from 'react';\nimport type { MutableRefObject, PropsWithoutRef, ReactNode, Ref } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport type { BaseProps, ForwardRefForwardPropsComponent, TestIdProp } from '../../types';\nimport { defaultThemeProp } from '../../theme';\nimport Popover from '../Popover';\nimport type { Delay, PopoverProps } from '../Popover';\nimport { useConsolidatedRef, useTestIds, useTheme, useUID } from '../../hooks';\nimport { calculateFontSize, readableHue } from '../../styles';\nimport { getActiveElement, mouseState, testElForOverflow, withTestIds } from '../../utils';\nimport { ThemeOverride } from '../Configuration';\n\nimport { getTooltipTestIds } from './Tooltip.test-ids';\n\nexport interface TooltipProps extends BaseProps, TestIdProp {\n /** Text content for the tooltip. */\n children: ReactNode;\n /** Element to serve as the tooltip's target. */\n target: Element | null;\n /** Elements to ignore from within the tooltip's target. */\n ignoredElements?: TooltipProps['target'][];\n /**\n * Delay showing the tooltip on mouseenter.\n * @default 'short'\n */\n showDelay?: Delay;\n /**\n * Delay hiding the tooltip on mouseleave.\n * @default 'long'\n */\n hideDelay?: Delay;\n /**\n * If true, the Tooltip will render outside of the current DOM hierarchy in a [portal](https://reactjs.org/docs/portals.html).\n * @default true\n */\n portal?: PopoverProps['portal'];\n /**\n * If true, the Tooltip will automatically apply an aria-describedby attribute to its target.\n * @default true\n */\n describeTarget?: boolean;\n /**\n * Sets the placement of the tooltip relative to the target.\n * @default 'bottom'\n */\n placement?: PopoverProps['placement'];\n /**\n * Conditionally renders a tooltip only if the associated element's (or its descendants) text content is truncated.\n * To work, the associated element must be be displayed as a CSS \"block box\" i.e. block, inline-block, etc...\n * @default false\n */\n smart?: boolean;\n /**\n * The group that the Popover belongs to. Popovers in the same group will be closed when others open.\n * @default 'tooltip'\n */\n groupId?: PopoverProps['groupId'];\n ref?: Ref<HTMLDivElement>;\n}\n\nexport const StyledTooltip = styled.div(({ theme }) => {\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n return css`\n background-color: ${theme.components.tooltip['background-color']};\n color: ${theme.components.tooltip['foreground-color']};\n font-size: ${fontSize.xxs};\n max-width: 40ch;\n padding: calc(${theme.base.spacing} / 2);\n white-space: pre-line;\n word-break: break-word;\n --scale-in-size: 0;\n --animation-duration: ${theme.base.animation.speed};\n `;\n});\n\nStyledTooltip.defaultProps = defaultThemeProp;\n\nconst Tooltip: ForwardRefForwardPropsComponent<TooltipProps> = forwardRef(function Tooltip(\n {\n testId,\n children,\n target,\n ignoredElements = [],\n showDelay = 'short',\n hideDelay = 'long',\n placement = 'top',\n describeTarget = true,\n smart,\n groupId = 'tooltip',\n ...restProps\n }: PropsWithoutRef<TooltipProps>,\n ref: TooltipProps['ref']\n) {\n const id = useUID();\n const [show, setShow] = useState(false);\n const [ignoreDelay, setIgnoreDelay] = useState(false);\n const tooltipRef = useConsolidatedRef(ref);\n const lastClickedRef: MutableRefObject<EventTarget | null> = useRef(null);\n const testIds = useTestIds(testId, getTooltipTestIds);\n\n const stringContentOnly =\n typeof children === 'string' ||\n (Array.isArray(children) && children.every(child => typeof child === 'string'));\n\n const onMouseDown = useCallback(\n ({ target: eTarget }: MouseEvent) => {\n lastClickedRef.current = eTarget;\n if (eTarget === tooltipRef.current || eTarget === target) return;\n setShow(false);\n },\n [target]\n );\n\n useEffect(() => {\n if (!target) return;\n\n const showTooltip = () => {\n // This approach may result in a tooltip NOT appearing 1px before it should due to browser specifics. Enhance as needed.\n // https://stackoverflow.com/a/64747288\n\n const checkTruncation = (element: Element): boolean => {\n if (\n testElForOverflow(element).some(Boolean) &&\n !['absolute', 'fixed'].includes(window.getComputedStyle(element).position)\n )\n return true;\n\n for (const child of element.children) {\n if (checkTruncation(child)) return true;\n }\n\n return false;\n };\n\n setShow(smart ? checkTruncation(target) : true);\n };\n\n const onFocusIn = () => {\n showTooltip();\n };\n\n const onFocusOut = () => {\n if (!lastClickedRef.current || lastClickedRef.current !== tooltipRef.current) {\n setShow(false);\n }\n lastClickedRef.current = null;\n };\n\n const onMouseEnter = () => {\n if (ignoredElements.some(exclusion => exclusion?.matches(':hover')) || mouseState.primary) {\n return;\n }\n\n showTooltip();\n };\n\n const onMouseLeave = () => {\n if (getActiveElement() !== target) {\n setShow(false);\n }\n };\n\n const onKeyDown = ({ key }: KeyboardEvent) => {\n if (key === 'Escape' && show) {\n setIgnoreDelay(true);\n setShow(false);\n }\n };\n\n document.addEventListener('keydown', onKeyDown);\n document.addEventListener('mousedown', onMouseDown);\n\n target.addEventListener('focusin', onFocusIn);\n target.addEventListener('focusout', onFocusOut);\n target.addEventListener('mouseenter', onMouseEnter);\n target.addEventListener('mouseleave', onMouseLeave);\n\n return () => {\n document.removeEventListener('keydown', onKeyDown);\n document.removeEventListener('mousedown', onMouseDown);\n\n target.removeEventListener('focusin', onFocusIn);\n target.removeEventListener('focusout', onFocusOut);\n target.removeEventListener('mouseenter', onMouseEnter);\n target.removeEventListener('mouseleave', onMouseLeave);\n };\n }, [target, onMouseDown, smart, show]);\n\n useEffect(() => {\n if (target && describeTarget && show) {\n const describedBy = target.getAttribute('aria-describedby');\n // Set the attribute to the old attribute plus the id\n target.setAttribute('aria-describedby', describedBy ? `${describedBy} ${id}` : id);\n } else if (target) {\n // Get the old attribute\n const describedBy = target.getAttribute('aria-describedby');\n if (describedBy) {\n // If the old attribute matches the id just remove it entirely\n if (describedBy === id) {\n target.removeAttribute('aria-describedby');\n } else {\n // Otherwise we want to just remove the id that was added and reset the attribute to what it was before\n const oldDescribedBy = describedBy.replace(new RegExp(`(?:^|\\\\s+)${id}`), '');\n target.setAttribute('aria-describedby', oldDescribedBy);\n }\n }\n }\n }, [describeTarget, target, show]);\n\n useEffect(() => {\n if (!show && ignoreDelay) {\n setIgnoreDelay(false);\n }\n }, [show, ignoreDelay]);\n\n const theme = useTheme();\n const tooltipTheme = {\n base: {\n palette: {\n 'primary-background': theme.components.tooltip['background-color'],\n 'foreground-color': theme.components.tooltip['foreground-color'],\n interactive: readableHue(\n theme.base.palette.interactive,\n theme.components.tooltip['background-color']\n )\n }\n }\n };\n\n return (\n <ThemeOverride theme={tooltipTheme}>\n <Popover\n data-testid={testIds.root}\n id={id}\n groupId={groupId}\n {...restProps}\n show={show}\n showDelay={ignoreDelay ? 'none' : showDelay}\n hideDelay={ignoreDelay ? 'none' : hideDelay}\n onMouseOver={() => {\n setShow(true);\n }}\n onMouseOut={() => {\n setShow(false);\n }}\n strategy='fixed'\n as={StyledTooltip}\n role={stringContentOnly ? 'tooltip' : 'dialog'}\n target={target}\n arrow\n placement={placement}\n onMouseDown={onMouseDown}\n hideOnTargetHidden\n ref={tooltipRef}\n >\n {children}\n </Popover>\n </ThemeOverride>\n );\n});\n\nexport default withTestIds(Tooltip, getTooltipTestIds);\n"]}
1
+ {"version":3,"file":"Tooltip.js","sourceRoot":"","sources":["../../../src/components/Tooltip/Tooltip.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE7E,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,OAAO,MAAM,YAAY,CAAC;AAEjC,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,a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EAAE,YAAY,YAChC,KAAC,OAAO,mBACO,OAAO,CAAC,IAAI,EACzB,EAAE,EAAE,EAAE,EACN,OAAO,EAAE,OAAO,KACZ,SAAS,EACb,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,EAC3C,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,EAC3C,WAAW,EAAE,GAAG,EAAE;gBAChB,OAAO,CAAC,IAAI,CAAC,CAAC;YAChB,CAAC,EACD,UAAU,EAAE,GAAG,EAAE;gBACf,OAAO,CAAC,KAAK,CAAC,CAAC;YACjB,CAAC,EACD,QAAQ,EAAC,OAAO,EAChB,EAAE,EAAE,aAAa,EACjB,IAAI,EAAE,iBAAiB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,EAC9C,MAAM,EAAE,MAAM,EACd,KAAK,QACL,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,WAAW,EACxB,kBAAkB,QAClB,GAAG,EAAE,UAAU,YAEd,QAAQ,GACD,GACI,CACjB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC","sourcesContent":["import { forwardRef, useCallback, useEffect, useRef, useState } from 'react';\nimport type { MutableRefObject, PropsWithoutRef, ReactNode, Ref } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport type { BaseProps, ForwardRefForwardPropsComponent, TestIdProp } from '../../types';\nimport { defaultThemeProp } from '../../theme';\nimport Popover from '../Popover';\nimport type { Delay, PopoverProps } from '../Popover';\nimport { useConsolidatedRef, useTestIds, useTheme, useUID } from '../../hooks';\nimport { calculateFontSize, readableHue } from '../../styles';\nimport { getActiveElement, mouseState, testElForOverflow, withTestIds } from '../../utils';\nimport { ThemeOverride } from '../Configuration';\n\nimport { getTooltipTestIds } from './Tooltip.test-ids';\n\nexport interface TooltipProps extends BaseProps, TestIdProp {\n /** Text content for the tooltip. */\n children: ReactNode;\n /** Element to serve as the tooltip's target. */\n target: Element | null;\n /** Elements to ignore from within the tooltip's target. */\n ignoredElements?: TooltipProps['target'][];\n /**\n * Delay showing the tooltip on mouseenter.\n * @default 'short'\n */\n showDelay?: Delay;\n /**\n * Delay hiding the tooltip on mouseleave.\n * @default 'long'\n */\n hideDelay?: Delay;\n /**\n * If true, the Tooltip will render outside of the current DOM hierarchy in a [portal](https://reactjs.org/docs/portals.html).\n * @default true\n */\n portal?: PopoverProps['portal'];\n /**\n * If true, the Tooltip will automatically apply an aria-describedby attribute to its target.\n * @default true\n */\n describeTarget?: boolean;\n /**\n * Sets the placement of the tooltip relative to the target.\n * @default 'bottom'\n */\n placement?: PopoverProps['placement'];\n /**\n * Conditionally renders a tooltip only if the associated element's (or its descendants) text content is truncated.\n * To work, the associated element must be be displayed as a CSS \"block box\" i.e. block, inline-block, etc...\n * @default false\n */\n smart?: boolean;\n /**\n * The group that the Popover belongs to. Popovers in the same group will be closed when others open.\n * @default 'tooltip'\n */\n groupId?: PopoverProps['groupId'];\n ref?: Ref<HTMLDivElement>;\n}\n\nexport const StyledTooltip = styled.div(({ theme }) => {\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n return css`\n background-color: ${theme.components.tooltip['background-color']};\n color: ${theme.components.tooltip['foreground-color']};\n font-size: ${fontSize.xxs};\n max-width: 40ch;\n padding: calc(${theme.base.spacing} / 2);\n white-space: pre-line;\n word-break: break-word;\n --scale-in-size: 0;\n --animation-duration: ${theme.base.animation.speed};\n `;\n});\n\nStyledTooltip.defaultProps = defaultThemeProp;\n\nconst Tooltip: ForwardRefForwardPropsComponent<TooltipProps> = forwardRef(function Tooltip(\n {\n testId,\n children,\n target,\n ignoredElements = [],\n showDelay = 'short',\n hideDelay = 'long',\n placement = 'top',\n describeTarget = true,\n smart,\n groupId = 'tooltip',\n ...restProps\n }: PropsWithoutRef<TooltipProps>,\n ref: TooltipProps['ref']\n) {\n const id = useUID();\n const [show, setShow] = useState(false);\n const [ignoreDelay, setIgnoreDelay] = useState(false);\n const tooltipRef = useConsolidatedRef(ref);\n const lastClickedRef: MutableRefObject<EventTarget | null> = useRef(null);\n const testIds = useTestIds(testId, getTooltipTestIds);\n\n const stringContentOnly =\n typeof children === 'string' ||\n (Array.isArray(children) && children.every(child => typeof child === 'string'));\n\n const onMouseDown = useCallback(\n ({ target: eTarget }: MouseEvent) => {\n lastClickedRef.current = eTarget;\n if (eTarget === tooltipRef.current || eTarget === target) return;\n setShow(false);\n },\n [target]\n );\n\n useEffect(() => {\n if (!target) return;\n\n const showTooltip = () => {\n // This approach may result in a tooltip NOT appearing 1px before it should due to browser specifics. Enhance as needed.\n // https://stackoverflow.com/a/64747288\n\n const checkTruncation = (element: Element): boolean => {\n if (\n testElForOverflow(element).some(Boolean) &&\n !['absolute', 'fixed'].includes(window.getComputedStyle(element).position)\n )\n return true;\n\n for (const child of element.children) {\n if (checkTruncation(child)) return true;\n }\n\n return false;\n };\n\n setShow(smart ? checkTruncation(target) : true);\n };\n\n const onFocusIn = () => {\n showTooltip();\n };\n\n const onFocusOut = () => {\n if (!lastClickedRef.current || lastClickedRef.current !== tooltipRef.current) {\n setShow(false);\n }\n lastClickedRef.current = null;\n };\n\n const onMouseEnter = () => {\n if (ignoredElements.some(exclusion => exclusion?.matches(':hover')) || mouseState.primary) {\n return;\n }\n\n showTooltip();\n };\n\n const onMouseLeave = () => {\n if (getActiveElement() !== target) {\n setShow(false);\n }\n };\n\n const onKeyDown = ({ key }: KeyboardEvent) => {\n if (key === 'Escape' && show) {\n setIgnoreDelay(true);\n setShow(false);\n }\n };\n\n document.addEventListener('keydown', onKeyDown);\n document.addEventListener('mousedown', onMouseDown);\n\n target.addEventListener('focusin', onFocusIn);\n target.addEventListener('focusout', onFocusOut);\n target.addEventListener('mouseenter', onMouseEnter);\n target.addEventListener('mouseleave', onMouseLeave);\n\n return () => {\n document.removeEventListener('keydown', onKeyDown);\n document.removeEventListener('mousedown', onMouseDown);\n\n target.removeEventListener('focusin', onFocusIn);\n target.removeEventListener('focusout', onFocusOut);\n target.removeEventListener('mouseenter', onMouseEnter);\n target.removeEventListener('mouseleave', onMouseLeave);\n };\n }, [target, onMouseDown, smart, show]);\n\n useEffect(() => {\n if (target && describeTarget && show) {\n const describedBy = target.getAttribute('aria-describedby');\n // Set the attribute to the old attribute plus the id\n target.setAttribute('aria-describedby', describedBy ? `${describedBy} ${id}` : id);\n } else if (target) {\n // Get the old attribute\n const describedBy = target.getAttribute('aria-describedby');\n if (describedBy) {\n // If the old attribute matches the id just remove it entirely\n if (describedBy === id) {\n target.removeAttribute('aria-describedby');\n } else {\n // Otherwise we want to just remove the id that was added and reset the attribute to what it was before\n const oldDescribedBy = describedBy.replace(new RegExp(`(?:^|\\\\s+)${id}`), '');\n target.setAttribute('aria-describedby', oldDescribedBy);\n }\n }\n }\n }, [describeTarget, target, show]);\n\n useEffect(() => {\n if (!show && ignoreDelay) {\n setIgnoreDelay(false);\n }\n }, [show, ignoreDelay]);\n\n const theme = useTheme();\n const tooltipTheme = {\n base: {\n palette: {\n 'primary-background': theme.components.tooltip['background-color'],\n 'foreground-color': theme.components.tooltip['foreground-color'],\n interactive: readableHue(\n theme.base.palette.interactive,\n theme.components.tooltip['background-color']\n )\n }\n },\n components: {\n label: {\n 'foreground-color': theme.components.tooltip['foreground-color']\n }\n }\n };\n\n return (\n <ThemeOverride theme={tooltipTheme}>\n <Popover\n data-testid={testIds.root}\n id={id}\n groupId={groupId}\n {...restProps}\n show={show}\n showDelay={ignoreDelay ? 'none' : showDelay}\n hideDelay={ignoreDelay ? 'none' : hideDelay}\n onMouseOver={() => {\n setShow(true);\n }}\n onMouseOut={() => {\n setShow(false);\n }}\n strategy='fixed'\n as={StyledTooltip}\n role={stringContentOnly ? 'tooltip' : 'dialog'}\n target={target}\n arrow\n placement={placement}\n onMouseDown={onMouseDown}\n hideOnTargetHidden\n ref={tooltipRef}\n >\n {children}\n </Popover>\n </ThemeOverride>\n );\n});\n\nexport default withTestIds(Tooltip, getTooltipTestIds);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"StandardTree.d.ts","sourceRoot":"","sources":["../../../src/components/Tree/StandardTree.tsx"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,aAAa,CAAC;AAsBnE,OAAO,KAAK,EAGV,iBAAiB,EAElB,MAAM,sBAAsB,CAAC;AA0hB9B,QAAA,MAAM,YAAY,EAAE,+BAA+B,CAAC,iBAAiB,CAIpE,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"StandardTree.d.ts","sourceRoot":"","sources":["../../../src/components/Tree/StandardTree.tsx"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,aAAa,CAAC;AAsBnE,OAAO,KAAK,EAGV,iBAAiB,EAElB,MAAM,sBAAsB,CAAC;AAgiB9B,QAAA,MAAM,YAAY,EAAE,+BAA+B,CAAC,iBAAiB,CAIpE,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -8,7 +8,7 @@ import Button from '../Button';
8
8
  import Actions from '../Actions';
9
9
  import { cap } from '../../utils';
10
10
  import VisuallyHiddenText from '../VisuallyHiddenText';
11
- import { StyledStandardTreeParent, StyledToggleIcon, StyledToggleIconWrapper, StyledStandardTreeItemSubTree, StyledStandardTreeLeaf, StyledStandardTree, StyledNodeInteraction, StyledStandardTreeNode, StyledNodeActions, StyledLabelContent, StyledNodeIcon, StyledNodeText, StyledLoadMoreButton, StyledSecondaryText, StyledLabelContainer } from './StandardTree.styles';
11
+ import { StyledStandardTreeParent, StyledToggleIcon, StyledToggleIconWrapper, StyledStandardTreeItemSubTree, StyledStandardTreeLeaf, StyledStandardTree, StyledNodeInteraction, StyledStandardTreeNode, StyledNodeActions, StyledLabelContent, StyledNodeIcon, StyledNodeText, StyledLoadMoreButton, StyledLabelContainer, StyledSecondaryMetaList } from './StandardTree.styles';
12
12
  import helpers from './helpers';
13
13
  const StandardTreeContext = createContext({
14
14
  currentNodeId: undefined,
@@ -177,9 +177,10 @@ const NodeRenderer = ({ id, label, secondary, icon, depth, hasParentSibling, nod
177
177
  changeFocusedNodeId(id);
178
178
  }, href: href, onKeyDown: onKeyDown, ref: elRef, children: content })) : (content);
179
179
  }
180
- const internal = href ? (_jsxs(Flex, { container: { alignItems: 'center', gap: 0.5 }, as: StyledLabelContent, children: [icon && _jsx(StyledNodeIcon, { name: icon }), _jsxs(Flex, { container: { direction: 'column', pad: [0, 0.5, 0, 0.5] }, children: [_jsx(Link, { forwardedAs: 'span', href: href, previewable: !!onPreview, onPreview: onPreview, children: label }), secondary && _jsx(StyledSecondaryText, { variant: 'secondary', children: secondary }), _jsx(VisuallyHiddenText, { children: t('preview_link_instruction', [macintosh ? 'option' : 'alt']) })] })] })) : (
180
+ const secondaryArray = Array.isArray(secondary) ? secondary : [secondary];
181
+ const internal = href ? (_jsxs(Flex, { container: { alignItems: 'center', gap: 0.5 }, as: StyledLabelContent, children: [icon && _jsx(StyledNodeIcon, { name: icon }), _jsxs(Flex, { container: { direction: 'column', pad: [0, 0.5, 0, 0.5] }, children: [_jsx(Link, { forwardedAs: 'span', href: href, previewable: !!onPreview, onPreview: onPreview, children: label }), secondary && secondaryArray.length > 0 && (_jsx(StyledSecondaryMetaList, { items: secondaryArray })), _jsx(VisuallyHiddenText, { children: t('preview_link_instruction', [macintosh ? 'option' : 'alt']) })] })] })) : (
181
182
  // Wrapping in a div for handling of flex space-between when there are node actions.
182
- _jsxs(Flex, { container: { alignItems: 'center', gap: 0.5 }, as: StyledLabelContent, children: [icon && _jsx(StyledNodeIcon, { name: icon }), _jsxs(Flex, { container: { direction: 'column', pad: [0, 0, 0, 0.5] }, children: [_jsx(StyledNodeText, { children: label }), secondary && _jsx(StyledSecondaryText, { variant: 'secondary', children: secondary })] })] }));
183
+ _jsxs(Flex, { container: { alignItems: 'center', gap: 0.5 }, as: StyledLabelContent, children: [icon && _jsx(StyledNodeIcon, { name: icon }), _jsxs(Flex, { container: { direction: 'column', pad: [0, 0, 0, 0.5] }, children: [_jsx(StyledNodeText, { children: label }), secondary && secondaryArray.length > 0 && (_jsx(StyledSecondaryMetaList, { items: secondaryArray }))] })] }));
183
184
  return !nodes && (onClick ?? onNodeClick) ? (_jsxs(Flex, { container: { alignItems: 'center', justify: 'between', gap: 2 }, as: StyledNodeInteraction, forwardedAs: href ? 'a' : 'div', role: 'treeitem', "aria-selected": false, "aria-current": current ? ariaCurrent : undefined, tabIndex: tabIndex, onClick: (e) => {
184
185
  onClick?.(id, e);
185
186
  onNodeClick?.(id, e);
@@ -1 +1 @@
1
- {"version":3,"file":"StandardTree.js","sourceRoot":"","sources":["../../../src/components/Tree/StandardTree.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EACV,aAAa,EACb,OAAO,EACP,UAAU,EACV,WAAW,EACX,QAAQ,EACR,SAAS,EACT,MAAM,EACP,MAAM,OAAO,CAAC;AAGf,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,EACL,kBAAkB,EAClB,YAAY,EACZ,cAAc,EACd,OAAO,EACP,KAAK,EACL,MAAM,EACP,MAAM,aAAa,CAAC;AACrB,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,OAAO,MAAM,YAAY,CAAC;AAEjC,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,kBAAkB,MAAM,uBAAuB,CAAC;AAEvD,OAAO,EACL,wBAAwB,EACxB,gBAAgB,EAChB,uBAAuB,EACvB,6BAA6B,EAC7B,sBAAsB,EACtB,kBAAkB,EAClB,qBAAqB,EACrB,sBAAsB,EACtB,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,mBAAmB,EACnB,oB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b,aAAa;YACb,UAAU;YACV,WAAW,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;YACxB,mBAAmB;YACnB,WAAW;YACX,WAAW;YACX,YAAY;YACZ,eAAe;YACf,KAAK;YACL,iBAAiB;SAClB,CAAC,EACF;YACE,aAAa;YACb,WAAW;YACX,WAAW;YACX,KAAK;YACL,aAAa;YACb,UAAU;YACV,YAAY;YACZ,eAAe;YACf,iBAAiB;SAClB,CACF,YAGD,KAAC,kBAAkB,OACb,SAAS,EACb,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,KAAK,EACZ,YAAY,EAAE,YAAY,GAC1B,GAC2B,CAChC,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,YAAY,GAAuD,UAAU,CACjF,SAAS,YAAY,CAAC,KAAyC,EAAE,GAA6B;IAC5F,OAAO,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAC,qBAAqB,OAAK,KAAK,EAAE,GAAG,EAAE,GAAG,GAAI,CAAC,CAAC,CAAC,IAAI,CAAC;AACxF,CAAC,CACF,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["import {\n forwardRef,\n createContext,\n useMemo,\n useContext,\n useCallback,\n useState,\n useEffect,\n useRef\n} from 'react';\nimport type { KeyboardEvent, PropsWithoutRef, CSSProperties, MouseEvent } from 'react';\n\nimport Progress from '../Progress';\nimport {\n useConsolidatedRef,\n useDirection,\n useFocusWithin,\n useI18n,\n useOS,\n useUID\n} from '../../hooks';\nimport Flex from '../Flex';\nimport Link from '../Link';\nimport Button from '../Button';\nimport Actions from '../Actions';\nimport type { ForwardRefForwardPropsComponent } from '../../types';\nimport { cap } from '../../utils';\nimport VisuallyHiddenText from '../VisuallyHiddenText';\n\nimport {\n StyledStandardTreeParent,\n StyledToggleIcon,\n StyledToggleIconWrapper,\n StyledStandardTreeItemSubTree,\n StyledStandardTreeLeaf,\n StyledStandardTree,\n StyledNodeInteraction,\n StyledStandardTreeNode,\n StyledNodeActions,\n StyledLabelContent,\n StyledNodeIcon,\n StyledNodeText,\n StyledLoadMoreButton,\n StyledSecondaryText,\n StyledLabelContainer\n} from './StandardTree.styles';\nimport type { TreeProps } from './Tree';\nimport type {\n StandardTreeContextProps,\n StandardTreeNode,\n StandardTreeProps,\n StandardTreePropsWithDefaults\n} from './StandardTree.types';\nimport helpers from './helpers';\n\nconst StandardTreeContext = createContext<\n Pick<\n StandardTreePropsWithDefaults,\n | 'currentNodeId'\n | 'contentRenderer'\n | 'lined'\n | 'onNodeClick'\n | 'onNodeHover'\n | 'onNodeToggle'\n | 'firstNodeId'\n | 'lastNodeId'\n | 'focusedNodeId'\n | 'changeFocusedNodeId'\n | 'selectableParents'\n >\n>({\n currentNodeId: undefined,\n lined: false,\n contentRenderer: () => undefined,\n onNodeClick: () => {},\n onNodeToggle: () => {},\n firstNodeId: undefined,\n lastNodeId: undefined,\n focusedNodeId: undefined,\n changeFocusedNodeId: () => {},\n selectableParents: true\n});\n\nconst NodeRenderer: TreeProps<StandardTreeNode>['nodeRenderer'] = ({\n id,\n label,\n secondary,\n icon,\n depth,\n hasParentSibling,\n nodes,\n expanded = false,\n loading = false,\n subTree,\n actions,\n onClick,\n onPreview,\n onLoadMore,\n href\n}) => {\n const {\n currentNodeId,\n contentRenderer,\n onNodeClick,\n onNodeToggle,\n onNodeHover,\n lined,\n focusedNodeId,\n changeFocusedNodeId,\n firstNodeId,\n lastNodeId,\n selectableParents\n } = useContext(StandardTreeContext);\n const current = currentNodeId === id;\n const focusedEl = focusedNodeId === id;\n const firstNode = firstNodeId === id;\n const lastNode = lastNodeId === id;\n const { start, end } = useDirection();\n const { macintosh } = useOS();\n const loadMoreRef = useRef<HTMLButtonElement>(null);\n const t = useI18n();\n\n const ariaCurrent = useMemo(() => {\n return href ? 'page' : true;\n }, [href]);\n\n const tabIndex = useMemo(() => {\n let index = -1;\n if (focusedNodeId) {\n index = focusedEl ? 0 : -1;\n } else if (currentNodeId && current) {\n index = 0;\n } else if (currentNodeId && nodes && helpers.getNode(nodes, currentNodeId)) {\n index = current ? 0 : -1;\n } else {\n index = firstNode ? 0 : -1;\n }\n return index;\n }, [focusedNodeId, currentNodeId, current, focusedEl]);\n\n const handleParentClick = useCallback(\n (e: MouseEvent<HTMLElement> | KeyboardEvent<HTMLElement>) => {\n onNodeClick?.(id, e);\n changeFocusedNodeId(id);\n },\n [id, onNodeClick, changeFocusedNodeId]\n );\n\n const handleParentToggle = useCallback(\n (e: MouseEvent<HTMLElement> | KeyboardEvent<HTMLElement>) => {\n e.preventDefault();\n e.stopPropagation();\n onNodeToggle?.(id, e);\n changeFocusedNodeId(id);\n },\n [id, onNodeToggle, changeFocusedNodeId]\n );\n\n const onKeyDown = useCallback(\n (e: KeyboardEvent<HTMLElement>) => {\n if (['ArrowUp', 'ArrowDown', 'Home', 'End'].includes(e.key)) e.preventDefault();\n if (e.key === 'Enter' && !href) e.preventDefault();\n if (href && onPreview && e.getModifierState('Alt') && e.code === 'KeyP') {\n onPreview({ href });\n }\n switch (e.key) {\n case 'ArrowUp':\n changeFocusedNodeId(id, 'up');\n break;\n case 'ArrowDown':\n changeFocusedNodeId(id, 'down');\n break;\n case `Arrow${cap(end)}`:\n if (nodes) {\n if (expanded) {\n changeFocusedNodeId(id, 'right');\n } else {\n onNodeToggle?.(id);\n }\n }\n break;\n case `Arrow${cap(start)}`:\n if (expanded) {\n onNodeToggle?.(id);\n } else {\n changeFocusedNodeId(id, 'left');\n }\n break;\n case 'Enter':\n case ' ':\n onLoadMore?.(id);\n onClick?.(id, e);\n if (nodes) {\n if (selectableParents) {\n handleParentClick(e);\n } else {\n handleParentToggle(e);\n }\n } else {\n onNodeClick?.(id, e);\n changeFocusedNodeId(id);\n }\n break;\n case 'Home':\n if (firstNodeId) changeFocusedNodeId(firstNodeId);\n break;\n case 'End':\n if (lastNodeId) changeFocusedNodeId(lastNodeId);\n break;\n default:\n }\n },\n [id, end, nodes, expanded, actions, firstNodeId, lastNodeId, changeFocusedNodeId]\n );\n\n const actionsJSX = useMemo(() => {\n // since Actions may render a frag of buttons and we need a wrapper for flex space-between.\n return actions ? (\n <Flex as={StyledNodeActions} container>\n <Actions\n items={actions.map(action => {\n return {\n ...action,\n compact: true,\n onKeyDown: (e: KeyboardEvent) => {\n if (e.key === 'Enter') e.stopPropagation();\n }\n };\n })}\n menuAt={4}\n menuButtonProps={{\n onClick: (e: MouseEvent) => {\n e.stopPropagation();\n e.preventDefault();\n },\n onKeyDown: (e: KeyboardEvent) => {\n e.stopPropagation();\n if (['ArrowUp', 'ArrowDown'].includes(e.key)) {\n e.preventDefault();\n }\n }\n }}\n />\n </Flex>\n ) : null;\n }, [actions]);\n\n const elRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n if (focusedEl) {\n elRef?.current?.focus();\n }\n }, [focusedEl]);\n\n const loadMoreButton = onLoadMore ? (\n <Flex container={{ alignItems: 'center' }}>\n <Button\n as={StyledLoadMoreButton}\n variant='link'\n aria-label={label}\n onClick={(e: MouseEvent<HTMLElement> | KeyboardEvent<HTMLElement>) => {\n onLoadMore?.(id);\n onClick?.(id, e);\n }}\n ref={loadMoreRef}\n >\n {t('load_more')}\n </Button>\n </Flex>\n ) : undefined;\n\n const labelContent = useMemo(() => {\n if (contentRenderer) {\n const content = contentRenderer({\n id,\n label,\n secondary,\n icon,\n nodes,\n expanded,\n loading,\n actions,\n onClick,\n onLoadMore,\n href\n });\n return !nodes && (onClick ?? onNodeClick) ? (\n <Flex\n container={{ alignItems: 'center', justify: 'between', gap: 2 }}\n as={StyledNodeInteraction}\n forwardedAs={href ? 'a' : 'div'}\n role='treeitem'\n aria-selected={false}\n aria-current={current ? ariaCurrent : undefined}\n tabIndex={tabIndex}\n onClick={(e: MouseEvent<HTMLElement>) => {\n onClick?.(id, e);\n onNodeClick?.(id, e);\n changeFocusedNodeId(id);\n }}\n href={href}\n onKeyDown={onKeyDown}\n ref={elRef}\n >\n {content}\n </Flex>\n ) : (\n content\n );\n }\n\n const internal = href ? (\n <Flex container={{ alignItems: 'center', gap: 0.5 }} as={StyledLabelContent}>\n {icon && <StyledNodeIcon name={icon} />}\n <Flex container={{ direction: 'column', pad: [0, 0.5, 0, 0.5] }}>\n <Link forwardedAs='span' href={href} previewable={!!onPreview} onPreview={onPreview}>\n {label}\n </Link>\n {secondary && <StyledSecondaryText variant='secondary'>{secondary}</StyledSecondaryText>}\n <VisuallyHiddenText>\n {t('preview_link_instruction', [macintosh ? 'option' : 'alt'])}\n </VisuallyHiddenText>\n </Flex>\n </Flex>\n ) : (\n // Wrapping in a div for handling of flex space-between when there are node actions.\n <Flex container={{ alignItems: 'center', gap: 0.5 }} as={StyledLabelContent}>\n {icon && <StyledNodeIcon name={icon} />}\n <Flex container={{ direction: 'column', pad: [0, 0, 0, 0.5] }}>\n <StyledNodeText>{label}</StyledNodeText>\n {secondary && <StyledSecondaryText variant='secondary'>{secondary}</StyledSecondaryText>}\n </Flex>\n </Flex>\n );\n\n return !nodes && (onClick ?? onNodeClick) ? (\n <Flex\n container={{ alignItems: 'center', justify: 'between', gap: 2 }}\n as={StyledNodeInteraction}\n forwardedAs={href ? 'a' : 'div'}\n role='treeitem'\n aria-selected={false}\n aria-current={current ? ariaCurrent : undefined}\n tabIndex={tabIndex}\n onClick={(e: MouseEvent<HTMLElement>) => {\n onClick?.(id, e);\n onNodeClick?.(id, e);\n changeFocusedNodeId(id);\n }}\n href={href}\n onKeyDown={onKeyDown}\n ref={elRef}\n >\n {loadMoreButton ?? internal}\n {actionsJSX}\n </Flex>\n ) : (\n internal\n );\n }, [\n id,\n label,\n icon,\n nodes,\n actions,\n onClick,\n onNodeClick,\n current,\n focusedEl,\n tabIndex,\n changeFocusedNodeId,\n onKeyDown\n ]);\n\n return (\n <StyledStandardTreeNode\n id={id}\n style={\n {\n '--depth': depth,\n '--has-parent': depth ? 1 : 0,\n '--has-parent-sibling': hasParentSibling ? 1 : 0,\n '--first-visible': firstNode ? 1 : 0,\n '--last-visible': lastNode ? 1 : 0\n } as CSSProperties\n }\n aria-busy={loading}\n >\n {nodes ? (\n <>\n <Flex\n container={{ alignItems: 'center', justify: 'between', gap: 2 }}\n as={StyledStandardTreeParent}\n forwardedAs={href ? 'a' : 'div'}\n role='treeitem'\n aria-selected={false}\n aria-current={current ? ariaCurrent : undefined}\n tabIndex={tabIndex}\n variant='text'\n onClick={selectableParents ? handleParentClick : handleParentToggle}\n onMouseOver={\n onNodeHover ? (e: MouseEvent<HTMLElement>) => onNodeHover(id, e) : undefined\n }\n href={selectableParents ? href : undefined}\n aria-expanded={expanded}\n onKeyDown={onKeyDown}\n ref={elRef}\n >\n <Flex container={{ alignItems: 'center' }} as={StyledLabelContainer}>\n {selectableParents ? (\n <Button\n as='span'\n variant='simple'\n tabIndex={-1}\n icon\n compact\n onClick={handleParentToggle}\n >\n <StyledToggleIcon name='caret-right' />\n </Button>\n ) : (\n <Flex\n as={StyledToggleIconWrapper}\n container={{ justify: 'center', alignItems: 'center' }}\n >\n <StyledToggleIcon name='caret-right' />\n </Flex>\n )}\n {labelContent}\n </Flex>\n {actionsJSX}\n </Flex>\n <StyledStandardTreeItemSubTree lined={lined} id={`${id}-subtree`}>\n {subTree}\n {loading && <Progress variant='ring' placement='inline' />}\n </StyledStandardTreeItemSubTree>\n </>\n ) : (\n <StyledStandardTreeLeaf\n onMouseOver={onNodeHover ? (e: MouseEvent<HTMLElement>) => onNodeHover(id, e) : undefined}\n >\n {labelContent}\n </StyledStandardTreeLeaf>\n )}\n </StyledStandardTreeNode>\n );\n};\n\nconst StandardTreeWithNodes: ForwardRefForwardPropsComponent<StandardTreeProps> = forwardRef(\n function StandardTreeWithNodes(\n {\n nodes: initialNodes,\n currentNodeId,\n onNodeClick,\n onNodeFocus,\n onNodeHover,\n onNodeToggle,\n onLoadMore,\n contentRenderer,\n lined = false,\n selectableParents = true,\n ...restProps\n }: PropsWithoutRef<StandardTreeProps>,\n ref: StandardTreeProps['ref']\n ) {\n const loadMoreId = useUID();\n const t = useI18n();\n\n const nodes = [\n ...helpers.mapTree(initialNodes, node => {\n if (node.onLoadMore && !node.loading) {\n return {\n ...node,\n onLoadMore: undefined,\n nodes: [\n ...(node.nodes ?? []),\n {\n id: `${loadMoreId}-${node.id}`,\n label: `${t('load_more')} - ${node.label}`,\n onLoadMore: () => {\n node.onLoadMore?.(node.id);\n }\n }\n ]\n };\n }\n return node;\n }),\n ...(onLoadMore\n ? [\n {\n id: loadMoreId,\n label: `${t('load_more')}`,\n onLoadMore\n }\n ]\n : [])\n ];\n\n const [focusedNodeId, setFocusedNodedId] = useState<string | undefined>();\n const treeRef = useConsolidatedRef(ref);\n\n const lastNodeId = useMemo(() => {\n return helpers.getDeepestNode(nodes, nodes[nodes.length - 1].id)?.id;\n }, [nodes]);\n\n const changeFocusedNodeId: StandardTreeContextProps['changeFocusedNodeId'] = useCallback(\n (id, type) => {\n switch (type) {\n case 'up': {\n const previousNode = helpers.getPreviousNode(nodes, id);\n if (previousNode) setFocusedNodedId(previousNode.id);\n break;\n }\n case 'down': {\n const nextNode = helpers.getNextNode(nodes, id);\n if (nextNode) setFocusedNodedId(nextNode.id);\n break;\n }\n case 'left': {\n const parentNode = helpers.getParentNode(nodes, id);\n if (parentNode) setFocusedNodedId(parentNode.id);\n break;\n }\n case 'right': {\n const childNode = helpers.getFirstChildNode(nodes, id);\n if (childNode) setFocusedNodedId(childNode.id);\n break;\n }\n default: {\n if (id !== focusedNodeId) setFocusedNodedId(id);\n break;\n }\n }\n },\n [nodes]\n );\n\n useEffect(() => {\n if (focusedNodeId) onNodeFocus?.(focusedNodeId);\n }, [focusedNodeId]);\n\n const onFocusChange = (focused: boolean) => {\n if (!focused) setFocusedNodedId('');\n };\n\n useFocusWithin([treeRef], onFocusChange);\n\n return (\n <StandardTreeContext.Provider\n value={useMemo(\n () => ({\n currentNodeId,\n focusedNodeId,\n lastNodeId,\n firstNodeId: nodes[0].id,\n changeFocusedNodeId,\n onNodeClick,\n onNodeHover,\n onNodeToggle,\n contentRenderer,\n lined,\n selectableParents\n }),\n [\n currentNodeId,\n onNodeClick,\n onNodeHover,\n lined,\n focusedNodeId,\n lastNodeId,\n onNodeToggle,\n contentRenderer,\n selectableParents\n ]\n )}\n >\n {/* FIXME: Types are having issues when styled(Tree) is typeof Tree. */}\n <StyledStandardTree\n {...restProps}\n ref={treeRef}\n nodes={nodes}\n nodeRenderer={NodeRenderer}\n />\n </StandardTreeContext.Provider>\n );\n }\n);\n\nconst StandardTree: ForwardRefForwardPropsComponent<StandardTreeProps> = forwardRef(\n function StandardTree(props: PropsWithoutRef<StandardTreeProps>, ref: StandardTreeProps['ref']) {\n return props.nodes.length > 0 ? <StandardTreeWithNodes {...props} ref={ref} /> : null;\n }\n);\n\nexport default StandardTree;\n"]}
1
+ {"version":3,"file":"StandardTree.js","sourceRoot":"","sources":["../../../src/components/Tree/StandardTree.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EACV,aAAa,EACb,OAAO,EACP,UAAU,EACV,WAAW,EACX,QAAQ,EACR,SAAS,EACT,MAAM,EACP,MAAM,OAAO,CAAC;AAGf,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,EACL,kBAAkB,EAClB,YAAY,EACZ,cAAc,EACd,OAAO,EACP,KAAK,EACL,MAAM,EACP,MAAM,aAAa,CAAC;AACrB,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,OAAO,MAAM,YAAY,CAAC;AAEjC,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,kBAAkB,MAAM,uBAAuB,CAAC;AAEvD,OAAO,EACL,wBAAwB,EACxB,gBAAgB,EAChB,uBAAuB,EACvB,6BAA6B,EAC7B,sBAAsB,EACtB,kBAAkB,EAClB,qBAAqB,EACrB,sBAAsB,EACtB,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,c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AAO;YAAE,iBAAiB,CAAC,EAAE,CAAC,CAAC;IACtC,CAAC,CAAC;IAEF,cAAc,CAAC,CAAC,OAAO,CAAC,EAAE,aAAa,CAAC,CAAC;IAEzC,OAAO,CACL,KAAC,mBAAmB,CAAC,QAAQ,IAC3B,KAAK,EAAE,OAAO,CACZ,GAAG,EAAE,CAAC,CAAC;YACL,aAAa;YACb,aAAa;YACb,UAAU;YACV,WAAW,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;YACxB,mBAAmB;YACnB,WAAW;YACX,WAAW;YACX,YAAY;YACZ,eAAe;YACf,KAAK;YACL,iBAAiB;SAClB,CAAC,EACF;YACE,aAAa;YACb,WAAW;YACX,WAAW;YACX,KAAK;YACL,aAAa;YACb,UAAU;YACV,YAAY;YACZ,eAAe;YACf,iBAAiB;SAClB,CACF,YAGD,KAAC,kBAAkB,OACb,SAAS,EACb,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,KAAK,EACZ,YAAY,EAAE,YAAY,GAC1B,GAC2B,CAChC,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,YAAY,GAAuD,UAAU,CACjF,SAAS,YAAY,CAAC,KAAyC,EAAE,GAA6B;IAC5F,OAAO,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAC,qBAAqB,OAAK,KAAK,EAAE,GAAG,EAAE,GAAG,GAAI,CAAC,CAAC,CAAC,IAAI,CAAC;AACxF,CAAC,CACF,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["import {\n forwardRef,\n createContext,\n useMemo,\n useContext,\n useCallback,\n useState,\n useEffect,\n useRef\n} from 'react';\nimport type { KeyboardEvent, PropsWithoutRef, CSSProperties, MouseEvent } from 'react';\n\nimport Progress from '../Progress';\nimport {\n useConsolidatedRef,\n useDirection,\n useFocusWithin,\n useI18n,\n useOS,\n useUID\n} from '../../hooks';\nimport Flex from '../Flex';\nimport Link from '../Link';\nimport Button from '../Button';\nimport Actions from '../Actions';\nimport type { ForwardRefForwardPropsComponent } from '../../types';\nimport { cap } from '../../utils';\nimport VisuallyHiddenText from '../VisuallyHiddenText';\n\nimport {\n StyledStandardTreeParent,\n StyledToggleIcon,\n StyledToggleIconWrapper,\n StyledStandardTreeItemSubTree,\n StyledStandardTreeLeaf,\n StyledStandardTree,\n StyledNodeInteraction,\n StyledStandardTreeNode,\n StyledNodeActions,\n StyledLabelContent,\n StyledNodeIcon,\n StyledNodeText,\n StyledLoadMoreButton,\n StyledLabelContainer,\n StyledSecondaryMetaList\n} from './StandardTree.styles';\nimport type { TreeProps } from './Tree';\nimport type {\n StandardTreeContextProps,\n StandardTreeNode,\n StandardTreeProps,\n StandardTreePropsWithDefaults\n} from './StandardTree.types';\nimport helpers from './helpers';\n\nconst StandardTreeContext = createContext<\n Pick<\n StandardTreePropsWithDefaults,\n | 'currentNodeId'\n | 'contentRenderer'\n | 'lined'\n | 'onNodeClick'\n | 'onNodeHover'\n | 'onNodeToggle'\n | 'firstNodeId'\n | 'lastNodeId'\n | 'focusedNodeId'\n | 'changeFocusedNodeId'\n | 'selectableParents'\n >\n>({\n currentNodeId: undefined,\n lined: false,\n contentRenderer: () => undefined,\n onNodeClick: () => {},\n onNodeToggle: () => {},\n firstNodeId: undefined,\n lastNodeId: undefined,\n focusedNodeId: undefined,\n changeFocusedNodeId: () => {},\n selectableParents: true\n});\n\nconst NodeRenderer: TreeProps<StandardTreeNode>['nodeRenderer'] = ({\n id,\n label,\n secondary,\n icon,\n depth,\n hasParentSibling,\n nodes,\n expanded = false,\n loading = false,\n subTree,\n actions,\n onClick,\n onPreview,\n onLoadMore,\n href\n}) => {\n const {\n currentNodeId,\n contentRenderer,\n onNodeClick,\n onNodeToggle,\n onNodeHover,\n lined,\n focusedNodeId,\n changeFocusedNodeId,\n firstNodeId,\n lastNodeId,\n selectableParents\n } = useContext(StandardTreeContext);\n const current = currentNodeId === id;\n const focusedEl = focusedNodeId === id;\n const firstNode = firstNodeId === id;\n const lastNode = lastNodeId === id;\n const { start, end } = useDirection();\n const { macintosh } = useOS();\n const loadMoreRef = useRef<HTMLButtonElement>(null);\n const t = useI18n();\n\n const ariaCurrent = useMemo(() => {\n return href ? 'page' : true;\n }, [href]);\n\n const tabIndex = useMemo(() => {\n let index = -1;\n if (focusedNodeId) {\n index = focusedEl ? 0 : -1;\n } else if (currentNodeId && current) {\n index = 0;\n } else if (currentNodeId && nodes && helpers.getNode(nodes, currentNodeId)) {\n index = current ? 0 : -1;\n } else {\n index = firstNode ? 0 : -1;\n }\n return index;\n }, [focusedNodeId, currentNodeId, current, focusedEl]);\n\n const handleParentClick = useCallback(\n (e: MouseEvent<HTMLElement> | KeyboardEvent<HTMLElement>) => {\n onNodeClick?.(id, e);\n changeFocusedNodeId(id);\n },\n [id, onNodeClick, changeFocusedNodeId]\n );\n\n const handleParentToggle = useCallback(\n (e: MouseEvent<HTMLElement> | KeyboardEvent<HTMLElement>) => {\n e.preventDefault();\n e.stopPropagation();\n onNodeToggle?.(id, e);\n changeFocusedNodeId(id);\n },\n [id, onNodeToggle, changeFocusedNodeId]\n );\n\n const onKeyDown = useCallback(\n (e: KeyboardEvent<HTMLElement>) => {\n if (['ArrowUp', 'ArrowDown', 'Home', 'End'].includes(e.key)) e.preventDefault();\n if (e.key === 'Enter' && !href) e.preventDefault();\n if (href && onPreview && e.getModifierState('Alt') && e.code === 'KeyP') {\n onPreview({ href });\n }\n switch (e.key) {\n case 'ArrowUp':\n changeFocusedNodeId(id, 'up');\n break;\n case 'ArrowDown':\n changeFocusedNodeId(id, 'down');\n break;\n case `Arrow${cap(end)}`:\n if (nodes) {\n if (expanded) {\n changeFocusedNodeId(id, 'right');\n } else {\n onNodeToggle?.(id);\n }\n }\n break;\n case `Arrow${cap(start)}`:\n if (expanded) {\n onNodeToggle?.(id);\n } else {\n changeFocusedNodeId(id, 'left');\n }\n break;\n case 'Enter':\n case ' ':\n onLoadMore?.(id);\n onClick?.(id, e);\n if (nodes) {\n if (selectableParents) {\n handleParentClick(e);\n } else {\n handleParentToggle(e);\n }\n } else {\n onNodeClick?.(id, e);\n changeFocusedNodeId(id);\n }\n break;\n case 'Home':\n if (firstNodeId) changeFocusedNodeId(firstNodeId);\n break;\n case 'End':\n if (lastNodeId) changeFocusedNodeId(lastNodeId);\n break;\n default:\n }\n },\n [id, end, nodes, expanded, actions, firstNodeId, lastNodeId, changeFocusedNodeId]\n );\n\n const actionsJSX = useMemo(() => {\n // since Actions may render a frag of buttons and we need a wrapper for flex space-between.\n return actions ? (\n <Flex as={StyledNodeActions} container>\n <Actions\n items={actions.map(action => {\n return {\n ...action,\n compact: true,\n onKeyDown: (e: KeyboardEvent) => {\n if (e.key === 'Enter') e.stopPropagation();\n }\n };\n })}\n menuAt={4}\n menuButtonProps={{\n onClick: (e: MouseEvent) => {\n e.stopPropagation();\n e.preventDefault();\n },\n onKeyDown: (e: KeyboardEvent) => {\n e.stopPropagation();\n if (['ArrowUp', 'ArrowDown'].includes(e.key)) {\n e.preventDefault();\n }\n }\n }}\n />\n </Flex>\n ) : null;\n }, [actions]);\n\n const elRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n if (focusedEl) {\n elRef?.current?.focus();\n }\n }, [focusedEl]);\n\n const loadMoreButton = onLoadMore ? (\n <Flex container={{ alignItems: 'center' }}>\n <Button\n as={StyledLoadMoreButton}\n variant='link'\n aria-label={label}\n onClick={(e: MouseEvent<HTMLElement> | KeyboardEvent<HTMLElement>) => {\n onLoadMore?.(id);\n onClick?.(id, e);\n }}\n ref={loadMoreRef}\n >\n {t('load_more')}\n </Button>\n </Flex>\n ) : undefined;\n\n const labelContent = useMemo(() => {\n if (contentRenderer) {\n const content = contentRenderer({\n id,\n label,\n secondary,\n icon,\n nodes,\n expanded,\n loading,\n actions,\n onClick,\n onLoadMore,\n href\n });\n return !nodes && (onClick ?? onNodeClick) ? (\n <Flex\n container={{ alignItems: 'center', justify: 'between', gap: 2 }}\n as={StyledNodeInteraction}\n forwardedAs={href ? 'a' : 'div'}\n role='treeitem'\n aria-selected={false}\n aria-current={current ? ariaCurrent : undefined}\n tabIndex={tabIndex}\n onClick={(e: MouseEvent<HTMLElement>) => {\n onClick?.(id, e);\n onNodeClick?.(id, e);\n changeFocusedNodeId(id);\n }}\n href={href}\n onKeyDown={onKeyDown}\n ref={elRef}\n >\n {content}\n </Flex>\n ) : (\n content\n );\n }\n\n const secondaryArray = Array.isArray(secondary) ? secondary : [secondary];\n\n const internal = href ? (\n <Flex container={{ alignItems: 'center', gap: 0.5 }} as={StyledLabelContent}>\n {icon && <StyledNodeIcon name={icon} />}\n <Flex container={{ direction: 'column', pad: [0, 0.5, 0, 0.5] }}>\n <Link forwardedAs='span' href={href} previewable={!!onPreview} onPreview={onPreview}>\n {label}\n </Link>\n {secondary && secondaryArray.length > 0 && (\n <StyledSecondaryMetaList items={secondaryArray} />\n )}\n <VisuallyHiddenText>\n {t('preview_link_instruction', [macintosh ? 'option' : 'alt'])}\n </VisuallyHiddenText>\n </Flex>\n </Flex>\n ) : (\n // Wrapping in a div for handling of flex space-between when there are node actions.\n <Flex container={{ alignItems: 'center', gap: 0.5 }} as={StyledLabelContent}>\n {icon && <StyledNodeIcon name={icon} />}\n <Flex container={{ direction: 'column', pad: [0, 0, 0, 0.5] }}>\n <StyledNodeText>{label}</StyledNodeText>\n {secondary && secondaryArray.length > 0 && (\n <StyledSecondaryMetaList items={secondaryArray} />\n )}\n </Flex>\n </Flex>\n );\n\n return !nodes && (onClick ?? onNodeClick) ? (\n <Flex\n container={{ alignItems: 'center', justify: 'between', gap: 2 }}\n as={StyledNodeInteraction}\n forwardedAs={href ? 'a' : 'div'}\n role='treeitem'\n aria-selected={false}\n aria-current={current ? ariaCurrent : undefined}\n tabIndex={tabIndex}\n onClick={(e: MouseEvent<HTMLElement>) => {\n onClick?.(id, e);\n onNodeClick?.(id, e);\n changeFocusedNodeId(id);\n }}\n href={href}\n onKeyDown={onKeyDown}\n ref={elRef}\n >\n {loadMoreButton ?? internal}\n {actionsJSX}\n </Flex>\n ) : (\n internal\n );\n }, [\n id,\n label,\n icon,\n nodes,\n actions,\n onClick,\n onNodeClick,\n current,\n focusedEl,\n tabIndex,\n changeFocusedNodeId,\n onKeyDown\n ]);\n\n return (\n <StyledStandardTreeNode\n id={id}\n style={\n {\n '--depth': depth,\n '--has-parent': depth ? 1 : 0,\n '--has-parent-sibling': hasParentSibling ? 1 : 0,\n '--first-visible': firstNode ? 1 : 0,\n '--last-visible': lastNode ? 1 : 0\n } as CSSProperties\n }\n aria-busy={loading}\n >\n {nodes ? (\n <>\n <Flex\n container={{ alignItems: 'center', justify: 'between', gap: 2 }}\n as={StyledStandardTreeParent}\n forwardedAs={href ? 'a' : 'div'}\n role='treeitem'\n aria-selected={false}\n aria-current={current ? ariaCurrent : undefined}\n tabIndex={tabIndex}\n variant='text'\n onClick={selectableParents ? handleParentClick : handleParentToggle}\n onMouseOver={\n onNodeHover ? (e: MouseEvent<HTMLElement>) => onNodeHover(id, e) : undefined\n }\n href={selectableParents ? href : undefined}\n aria-expanded={expanded}\n onKeyDown={onKeyDown}\n ref={elRef}\n >\n <Flex container={{ alignItems: 'center' }} as={StyledLabelContainer}>\n {selectableParents ? (\n <Button\n as='span'\n variant='simple'\n tabIndex={-1}\n icon\n compact\n onClick={handleParentToggle}\n >\n <StyledToggleIcon name='caret-right' />\n </Button>\n ) : (\n <Flex\n as={StyledToggleIconWrapper}\n container={{ justify: 'center', alignItems: 'center' }}\n >\n <StyledToggleIcon name='caret-right' />\n </Flex>\n )}\n {labelContent}\n </Flex>\n {actionsJSX}\n </Flex>\n <StyledStandardTreeItemSubTree lined={lined} id={`${id}-subtree`}>\n {subTree}\n {loading && <Progress variant='ring' placement='inline' />}\n </StyledStandardTreeItemSubTree>\n </>\n ) : (\n <StyledStandardTreeLeaf\n onMouseOver={onNodeHover ? (e: MouseEvent<HTMLElement>) => onNodeHover(id, e) : undefined}\n >\n {labelContent}\n </StyledStandardTreeLeaf>\n )}\n </StyledStandardTreeNode>\n );\n};\n\nconst StandardTreeWithNodes: ForwardRefForwardPropsComponent<StandardTreeProps> = forwardRef(\n function StandardTreeWithNodes(\n {\n nodes: initialNodes,\n currentNodeId,\n onNodeClick,\n onNodeFocus,\n onNodeHover,\n onNodeToggle,\n onLoadMore,\n contentRenderer,\n lined = false,\n selectableParents = true,\n ...restProps\n }: PropsWithoutRef<StandardTreeProps>,\n ref: StandardTreeProps['ref']\n ) {\n const loadMoreId = useUID();\n const t = useI18n();\n\n const nodes = [\n ...helpers.mapTree(initialNodes, node => {\n if (node.onLoadMore && !node.loading) {\n return {\n ...node,\n onLoadMore: undefined,\n nodes: [\n ...(node.nodes ?? []),\n {\n id: `${loadMoreId}-${node.id}`,\n label: `${t('load_more')} - ${node.label}`,\n onLoadMore: () => {\n node.onLoadMore?.(node.id);\n }\n }\n ]\n };\n }\n return node;\n }),\n ...(onLoadMore\n ? [\n {\n id: loadMoreId,\n label: `${t('load_more')}`,\n onLoadMore\n }\n ]\n : [])\n ];\n\n const [focusedNodeId, setFocusedNodedId] = useState<string | undefined>();\n const treeRef = useConsolidatedRef(ref);\n\n const lastNodeId = useMemo(() => {\n return helpers.getDeepestNode(nodes, nodes[nodes.length - 1].id)?.id;\n }, [nodes]);\n\n const changeFocusedNodeId: StandardTreeContextProps['changeFocusedNodeId'] = useCallback(\n (id, type) => {\n switch (type) {\n case 'up': {\n const previousNode = helpers.getPreviousNode(nodes, id);\n if (previousNode) setFocusedNodedId(previousNode.id);\n break;\n }\n case 'down': {\n const nextNode = helpers.getNextNode(nodes, id);\n if (nextNode) setFocusedNodedId(nextNode.id);\n break;\n }\n case 'left': {\n const parentNode = helpers.getParentNode(nodes, id);\n if (parentNode) setFocusedNodedId(parentNode.id);\n break;\n }\n case 'right': {\n const childNode = helpers.getFirstChildNode(nodes, id);\n if (childNode) setFocusedNodedId(childNode.id);\n break;\n }\n default: {\n if (id !== focusedNodeId) setFocusedNodedId(id);\n break;\n }\n }\n },\n [nodes]\n );\n\n useEffect(() => {\n if (focusedNodeId) onNodeFocus?.(focusedNodeId);\n }, [focusedNodeId]);\n\n const onFocusChange = (focused: boolean) => {\n if (!focused) setFocusedNodedId('');\n };\n\n useFocusWithin([treeRef], onFocusChange);\n\n return (\n <StandardTreeContext.Provider\n value={useMemo(\n () => ({\n currentNodeId,\n focusedNodeId,\n lastNodeId,\n firstNodeId: nodes[0].id,\n changeFocusedNodeId,\n onNodeClick,\n onNodeHover,\n onNodeToggle,\n contentRenderer,\n lined,\n selectableParents\n }),\n [\n currentNodeId,\n onNodeClick,\n onNodeHover,\n lined,\n focusedNodeId,\n lastNodeId,\n onNodeToggle,\n contentRenderer,\n selectableParents\n ]\n )}\n >\n {/* FIXME: Types are having issues when styled(Tree) is typeof Tree. */}\n <StyledStandardTree\n {...restProps}\n ref={treeRef}\n nodes={nodes}\n nodeRenderer={NodeRenderer}\n />\n </StandardTreeContext.Provider>\n );\n }\n);\n\nconst StandardTree: ForwardRefForwardPropsComponent<StandardTreeProps> = forwardRef(\n function StandardTree(props: PropsWithoutRef<StandardTreeProps>, ref: StandardTreeProps['ref']) {\n return props.nodes.length > 0 ? <StandardTreeWithNodes {...props} ref={ref} /> : null;\n }\n);\n\nexport default StandardTree;\n"]}
@@ -1,19 +1,23 @@
1
- import type { StandardTreePropsWithDefaults } from './StandardTree.types';
2
- export declare const StyledToggleIcon: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../Icon").IconProps>, import("styled-components").DefaultTheme, {}, never>;
3
- export declare const StyledNodeActions: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
4
- export declare const StyledSecondaryText: import("styled-components").StyledComponent<import("../..").ForwardRefForwardPropsComponent<import("../Text").TextProps>, import("styled-components").DefaultTheme, {}, never>;
5
- export declare const StyledLabelContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
6
- export declare const StyledNodeIcon: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../Icon").IconProps>, import("styled-components").DefaultTheme, {}, never>;
7
- export declare const StyledNodeText: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
8
- export declare const StyledToggleIconWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
9
- export declare const StyledStandardTreeItemSubTree: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, Pick<StandardTreePropsWithDefaults, "lined">, never>;
10
- export declare const StyledLoadMoreButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, Pick<import("../Button").ButtonProps, "compact" | "label" | "ref" | "className" | "href" | "aria-label" | "children" | "as" | "forwardedAs"> & Required<Pick<import("../Button").ButtonProps, "icon" | "disabled" | "type" | "loading" | "variant">>, never>;
11
- export declare const StyledNodeInteraction: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
12
- export declare const StyledStandardTreeLeaf: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
1
+ import type { StandardTreeProps, StandardTreePropsWithDefaults } from './StandardTree.types';
2
+ export declare const StyledToggleIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("../Icon").IconProps & import("styled-components/dist/types").BaseObject, import("styled-components/dist/types").BaseObject>> & string & Omit<import("react").ForwardRefExoticComponent<import("../Icon").IconProps>, keyof import("react").Component<any, {}, any>>;
3
+ export declare const StyledNodeActions: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
4
+ export declare const StyledSecondaryMetaList: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<Omit<import("../MetaList/MetaList").MetaListProps, "ref"> & import("react").RefAttributes<HTMLUListElement> & import("../..").ForwardProps, "ref"> & {
5
+ ref?: ((instance: HTMLUListElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLUListElement> | null | undefined;
6
+ }, never>> & string & Omit<import("../..").ForwardRefForwardPropsComponent<import("../MetaList/MetaList").MetaListProps> & {
7
+ getTestIds: (testIdProp?: import("../..").TestIdProp["testId"]) => import("../..").TestIdsRecord<readonly []>;
8
+ }, keyof import("react").Component<any, {}, any>>;
9
+ export declare const StyledLabelContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
10
+ export declare const StyledNodeIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("../Icon").IconProps & import("styled-components/dist/types").BaseObject, import("styled-components/dist/types").BaseObject>> & string & Omit<import("react").ForwardRefExoticComponent<import("../Icon").IconProps>, keyof import("react").Component<any, {}, any>>;
11
+ export declare const StyledNodeText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
12
+ export declare const StyledToggleIconWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
13
+ export declare const StyledStandardTreeItemSubTree: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<StandardTreePropsWithDefaults, "lined">>> & string;
14
+ export declare const StyledLoadMoreButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "compact" | "icon" | "disabled" | "label" | "ref" | "className" | "type" | "href" | "aria-disabled" | "aria-label" | "children" | "loading" | "as" | "forwardedAs" | "variant"> & Pick<import("../Button").ButtonProps, "compact" | "label" | "ref" | "className" | "href" | "aria-disabled" | "aria-label" | "children" | "as" | "forwardedAs"> & Required<Pick<import("../Button").ButtonProps, "icon" | "disabled" | "type" | "loading" | "variant">>, never>> & string;
15
+ export declare const StyledNodeInteraction: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
16
+ export declare const StyledStandardTreeLeaf: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
13
17
  export declare const StyledStandardTreeParent: typeof StyledNodeInteraction;
14
- export declare const StyledStandardTreeNode: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
15
- export declare const StyledStandardTree: import("styled-components").StyledComponent<(<T extends import("./Tree").TreeNode = import("./Tree").TreeNode>(props: import("./Tree").TreeProps<T> & import("../..").ForwardProps) => JSX.Element | null) & {
18
+ export declare const StyledStandardTreeNode: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
19
+ export declare const StyledStandardTree: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("./Tree").TreeProps<import("./Tree").TreeNode> & import("../..").ForwardProps, StandardTreeProps>> & string & Omit<(<T extends import("./Tree").TreeNode = import("./Tree").TreeNode>(props: import("./Tree").TreeProps<T> & import("../..").ForwardProps) => JSX.Element | null) & {
16
20
  getTestIds: (testIdProp?: import("../..").TestIdProp["testId"]) => import("../..").TestIdsRecord<readonly []>;
17
- }, import("styled-components").DefaultTheme, {}, never>;
18
- export declare const StyledLabelContainer: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
21
+ }, keyof import("react").Component<any, {}, any>>;
22
+ export declare const StyledLabelContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
19
23
  //# sourceMappingURL=StandardTree.styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"StandardTree.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Tree/StandardTree.styles.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAE1E,eAAO,MAAM,gBAAgB,0KAAiB,CAAC;AAE/C,eAAO,MAAM,iBAAiB,yGAAe,CAAC;AAE9C,eAAO,MAAM,mBAAmB,gLAAiB,CAAC;AAElD,eAAO,MAAM,kBAAkB,yGAW7B,CAAC;AAIH,eAAO,MAAM,cAAc,0KAAiB,CAAC;AAE7C,eAAO,MAAM,cAAc,0GAAgB,CAAC;AAE5C,eAAO,MAAM,uBAAuB,yGAKlC,CAAC;AAIH,eAAO,MAAM,6BAA6B,mJAiCxC,CAAC;AAIH,eAAO,MAAM,oBAAoB,8VAI/B,CAAC;AAIH,eAAO,MAAM,qBAAqB,yGAsDhC,CAAC;AAIH,eAAO,MAAM,sBAAsB,yGASjC,CAAC;AAIH,eAAO,MAAM,wBAAwB,EAAE,OAAO,qBA6B7C,CAAC;AAIF,eAAO,MAAM,sBAAsB,yGAclC,CAAC;AAIF,eAAO,MAAM,kBAAkB;;uDAI9B,CAAC;AAIF,eAAO,MAAM,oBAAoB,0GAEhC,CAAC"}
1
+ {"version":3,"file":"StandardTree.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Tree/StandardTree.styles.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,iBAAiB,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAE7F,eAAO,MAAM,gB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