@datalayer/primer-addons 1.0.54 → 1.0.56

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 (504) hide show
  1. package/README.md +18 -0
  2. package/lib/components/animated-text/AnimatedText.d.ts +56 -0
  3. package/lib/components/animated-text/AnimatedText.js +100 -0
  4. package/lib/components/animated-text/AnimatedText.stories.d.ts +14 -0
  5. package/lib/components/animated-text/AnimatedText.stories.js +21 -0
  6. package/lib/components/animated-text/index.d.ts +1 -0
  7. package/lib/components/animated-text/index.js +5 -0
  8. package/lib/components/appearance/ColorModeCircle.js +3 -1
  9. package/lib/components/buttons/Buttons.stories.d.ts +14 -0
  10. package/lib/components/buttons/Buttons.stories.js +24 -0
  11. package/lib/components/buttons/CopyToClipboardButton.d.ts +13 -0
  12. package/lib/components/buttons/CopyToClipboardButton.js +73 -0
  13. package/lib/components/buttons/DownloadCSVButton.d.ts +8 -0
  14. package/lib/components/buttons/DownloadCSVButton.js +12 -0
  15. package/lib/components/buttons/DownloadJsonButton.d.ts +9 -0
  16. package/lib/components/buttons/DownloadJsonButton.js +12 -0
  17. package/lib/components/buttons/LongActionButton.d.ts +29 -0
  18. package/lib/components/buttons/LongActionButton.js +23 -0
  19. package/lib/components/buttons/UploadButton.d.ts +35 -0
  20. package/lib/components/buttons/UploadButton.js +35 -0
  21. package/lib/components/buttons/VariantType.d.ts +1 -0
  22. package/lib/components/buttons/VariantType.js +5 -0
  23. package/lib/components/buttons/index.d.ts +6 -0
  24. package/lib/components/buttons/index.js +10 -0
  25. package/lib/components/display/AvatarSkeleton.d.ts +5 -0
  26. package/lib/components/display/AvatarSkeleton.js +11 -0
  27. package/lib/components/display/BusyDots.d.ts +9 -0
  28. package/lib/components/display/BusyDots.js +31 -0
  29. package/lib/components/display/CenteredSpinner.d.ts +11 -0
  30. package/lib/components/display/CenteredSpinner.js +11 -0
  31. package/lib/components/display/CodePreview.d.ts +4 -0
  32. package/lib/components/display/CodePreview.js +15 -0
  33. package/lib/components/display/Display.stories.d.ts +17 -0
  34. package/lib/components/display/Display.stories.js +27 -0
  35. package/lib/components/display/HorizontalCenter.d.ts +6 -0
  36. package/lib/components/display/HorizontalCenter.js +10 -0
  37. package/lib/components/display/NotebookSkeleton.d.ts +2 -0
  38. package/lib/components/display/NotebookSkeleton.js +11 -0
  39. package/lib/components/display/Placeholder.d.ts +2 -0
  40. package/lib/components/display/Placeholder.js +9 -0
  41. package/lib/components/display/VisuallyHidden.d.ts +5 -0
  42. package/lib/components/display/VisuallyHidden.js +24 -0
  43. package/lib/components/display/index.d.ts +8 -0
  44. package/lib/components/display/index.js +12 -0
  45. package/lib/components/emoji/FluentEmoji.d.ts +33 -0
  46. package/lib/components/emoji/FluentEmoji.js +66 -0
  47. package/lib/components/emoji/FluentEmoji.stories.d.ts +14 -0
  48. package/lib/components/emoji/FluentEmoji.stories.js +19 -0
  49. package/lib/components/emoji/faceEmojis.d.ts +24 -0
  50. package/lib/components/emoji/faceEmojis.js +229 -0
  51. package/lib/components/emoji/fluent/loaders.d.ts +12 -0
  52. package/lib/components/emoji/fluent/loaders.js +200 -0
  53. package/lib/components/emoji/fluent/svg/1f304.d.ts +2 -0
  54. package/lib/components/emoji/fluent/svg/1f304.js +9 -0
  55. package/lib/components/emoji/fluent/svg/1f308.d.ts +2 -0
  56. package/lib/components/emoji/fluent/svg/1f308.js +9 -0
  57. package/lib/components/emoji/fluent/svg/1f30a.d.ts +2 -0
  58. package/lib/components/emoji/fluent/svg/1f30a.js +9 -0
  59. package/lib/components/emoji/fluent/svg/1f30d.d.ts +2 -0
  60. package/lib/components/emoji/fluent/svg/1f30d.js +9 -0
  61. package/lib/components/emoji/fluent/svg/1f30f.d.ts +2 -0
  62. package/lib/components/emoji/fluent/svg/1f30f.js +9 -0
  63. package/lib/components/emoji/fluent/svg/1f310.d.ts +2 -0
  64. package/lib/components/emoji/fluent/svg/1f310.js +9 -0
  65. package/lib/components/emoji/fluent/svg/1f31f.d.ts +2 -0
  66. package/lib/components/emoji/fluent/svg/1f31f.js +9 -0
  67. package/lib/components/emoji/fluent/svg/1f324.d.ts +2 -0
  68. package/lib/components/emoji/fluent/svg/1f324.js +9 -0
  69. package/lib/components/emoji/fluent/svg/1f326.d.ts +2 -0
  70. package/lib/components/emoji/fluent/svg/1f326.js +9 -0
  71. package/lib/components/emoji/fluent/svg/1f327.d.ts +2 -0
  72. package/lib/components/emoji/fluent/svg/1f327.js +9 -0
  73. package/lib/components/emoji/fluent/svg/1f331.d.ts +2 -0
  74. package/lib/components/emoji/fluent/svg/1f331.js +9 -0
  75. package/lib/components/emoji/fluent/svg/1f33e.d.ts +2 -0
  76. package/lib/components/emoji/fluent/svg/1f33e.js +9 -0
  77. package/lib/components/emoji/fluent/svg/1f340.d.ts +2 -0
  78. package/lib/components/emoji/fluent/svg/1f340.js +9 -0
  79. package/lib/components/emoji/fluent/svg/1f355.d.ts +2 -0
  80. package/lib/components/emoji/fluent/svg/1f355.js +9 -0
  81. package/lib/components/emoji/fluent/svg/1f372.d.ts +2 -0
  82. package/lib/components/emoji/fluent/svg/1f372.js +9 -0
  83. package/lib/components/emoji/fluent/svg/1f373.d.ts +2 -0
  84. package/lib/components/emoji/fluent/svg/1f373.js +9 -0
  85. package/lib/components/emoji/fluent/svg/1f381.d.ts +2 -0
  86. package/lib/components/emoji/fluent/svg/1f381.js +9 -0
  87. package/lib/components/emoji/fluent/svg/1f385.d.ts +2 -0
  88. package/lib/components/emoji/fluent/svg/1f385.js +9 -0
  89. package/lib/components/emoji/fluent/svg/1f386.d.ts +2 -0
  90. package/lib/components/emoji/fluent/svg/1f386.js +9 -0
  91. package/lib/components/emoji/fluent/svg/1f387.d.ts +2 -0
  92. package/lib/components/emoji/fluent/svg/1f387.js +9 -0
  93. package/lib/components/emoji/fluent/svg/1f389.d.ts +2 -0
  94. package/lib/components/emoji/fluent/svg/1f389.js +9 -0
  95. package/lib/components/emoji/fluent/svg/1f393.d.ts +2 -0
  96. package/lib/components/emoji/fluent/svg/1f393.js +9 -0
  97. package/lib/components/emoji/fluent/svg/1f399.d.ts +2 -0
  98. package/lib/components/emoji/fluent/svg/1f399.js +9 -0
  99. package/lib/components/emoji/fluent/svg/1f39b.d.ts +2 -0
  100. package/lib/components/emoji/fluent/svg/1f39b.js +9 -0
  101. package/lib/components/emoji/fluent/svg/1f3a8.d.ts +2 -0
  102. package/lib/components/emoji/fluent/svg/1f3a8.js +9 -0
  103. package/lib/components/emoji/fluent/svg/1f3ab.d.ts +2 -0
  104. package/lib/components/emoji/fluent/svg/1f3ab.js +9 -0
  105. package/lib/components/emoji/fluent/svg/1f3ac.d.ts +2 -0
  106. package/lib/components/emoji/fluent/svg/1f3ac.js +9 -0
  107. package/lib/components/emoji/fluent/svg/1f3af.d.ts +2 -0
  108. package/lib/components/emoji/fluent/svg/1f3af.js +9 -0
  109. package/lib/components/emoji/fluent/svg/1f3b5.d.ts +2 -0
  110. package/lib/components/emoji/fluent/svg/1f3b5.js +9 -0
  111. package/lib/components/emoji/fluent/svg/1f3c4.d.ts +2 -0
  112. package/lib/components/emoji/fluent/svg/1f3c4.js +9 -0
  113. package/lib/components/emoji/fluent/svg/1f3c6.d.ts +2 -0
  114. package/lib/components/emoji/fluent/svg/1f3c6.js +9 -0
  115. package/lib/components/emoji/fluent/svg/1f3ca.d.ts +2 -0
  116. package/lib/components/emoji/fluent/svg/1f3ca.js +9 -0
  117. package/lib/components/emoji/fluent/svg/1f3d7.d.ts +2 -0
  118. package/lib/components/emoji/fluent/svg/1f3d7.js +9 -0
  119. package/lib/components/emoji/fluent/svg/1f3db.d.ts +2 -0
  120. package/lib/components/emoji/fluent/svg/1f3db.js +9 -0
  121. package/lib/components/emoji/fluent/svg/1f3e0.d.ts +2 -0
  122. package/lib/components/emoji/fluent/svg/1f3e0.js +9 -0
  123. package/lib/components/emoji/fluent/svg/1f3e2.d.ts +2 -0
  124. package/lib/components/emoji/fluent/svg/1f3e2.js +9 -0
  125. package/lib/components/emoji/fluent/svg/1f3e5.d.ts +2 -0
  126. package/lib/components/emoji/fluent/svg/1f3e5.js +9 -0
  127. package/lib/components/emoji/fluent/svg/1f3e6.d.ts +2 -0
  128. package/lib/components/emoji/fluent/svg/1f3e6.js +9 -0
  129. package/lib/components/emoji/fluent/svg/1f3f7.d.ts +2 -0
  130. package/lib/components/emoji/fluent/svg/1f3f7.js +9 -0
  131. package/lib/components/emoji/fluent/svg/1f409.d.ts +2 -0
  132. package/lib/components/emoji/fluent/svg/1f409.js +9 -0
  133. package/lib/components/emoji/fluent/svg/1f419.d.ts +2 -0
  134. package/lib/components/emoji/fluent/svg/1f419.js +9 -0
  135. package/lib/components/emoji/fluent/svg/1f41b.d.ts +2 -0
  136. package/lib/components/emoji/fluent/svg/1f41b.js +9 -0
  137. package/lib/components/emoji/fluent/svg/1f41d.d.ts +2 -0
  138. package/lib/components/emoji/fluent/svg/1f41d.js +9 -0
  139. package/lib/components/emoji/fluent/svg/1f427.d.ts +2 -0
  140. package/lib/components/emoji/fluent/svg/1f427.js +9 -0
  141. package/lib/components/emoji/fluent/svg/1f431.d.ts +2 -0
  142. package/lib/components/emoji/fluent/svg/1f431.js +9 -0
  143. package/lib/components/emoji/fluent/svg/1f432.d.ts +2 -0
  144. package/lib/components/emoji/fluent/svg/1f432.js +9 -0
  145. package/lib/components/emoji/fluent/svg/1f433.d.ts +2 -0
  146. package/lib/components/emoji/fluent/svg/1f433.js +9 -0
  147. package/lib/components/emoji/fluent/svg/1f436.d.ts +2 -0
  148. package/lib/components/emoji/fluent/svg/1f436.js +9 -0
  149. package/lib/components/emoji/fluent/svg/1f440.d.ts +2 -0
  150. package/lib/components/emoji/fluent/svg/1f440.js +9 -0
  151. package/lib/components/emoji/fluent/svg/1f441.d.ts +2 -0
  152. package/lib/components/emoji/fluent/svg/1f441.js +9 -0
  153. package/lib/components/emoji/fluent/svg/1f44b.d.ts +2 -0
  154. package/lib/components/emoji/fluent/svg/1f44b.js +9 -0
  155. package/lib/components/emoji/fluent/svg/1f450.d.ts +2 -0
  156. package/lib/components/emoji/fluent/svg/1f450.js +9 -0
  157. package/lib/components/emoji/fluent/svg/1f465.d.ts +2 -0
  158. package/lib/components/emoji/fluent/svg/1f465.js +9 -0
  159. package/lib/components/emoji/fluent/svg/1f477.d.ts +2 -0
  160. package/lib/components/emoji/fluent/svg/1f477.js +9 -0
  161. package/lib/components/emoji/fluent/svg/1f47d.d.ts +2 -0
  162. package/lib/components/emoji/fluent/svg/1f47d.js +9 -0
  163. package/lib/components/emoji/fluent/svg/1f47e.d.ts +2 -0
  164. package/lib/components/emoji/fluent/svg/1f47e.js +9 -0
  165. package/lib/components/emoji/fluent/svg/1f4a1.d.ts +2 -0
  166. package/lib/components/emoji/fluent/svg/1f4a1.js +9 -0
  167. package/lib/components/emoji/fluent/svg/1f4ac.d.ts +2 -0
  168. package/lib/components/emoji/fluent/svg/1f4ac.js +9 -0
  169. package/lib/components/emoji/fluent/svg/1f4b0.d.ts +2 -0
  170. package/lib/components/emoji/fluent/svg/1f4b0.js +9 -0
  171. package/lib/components/emoji/fluent/svg/1f4b3.d.ts +2 -0
  172. package/lib/components/emoji/fluent/svg/1f4b3.js +9 -0
  173. package/lib/components/emoji/fluent/svg/1f4b9.d.ts +2 -0
  174. package/lib/components/emoji/fluent/svg/1f4b9.js +9 -0
  175. package/lib/components/emoji/fluent/svg/1f4bc.d.ts +2 -0
  176. package/lib/components/emoji/fluent/svg/1f4bc.js +9 -0
  177. package/lib/components/emoji/fluent/svg/1f4be.d.ts +2 -0
  178. package/lib/components/emoji/fluent/svg/1f4be.js +9 -0
  179. package/lib/components/emoji/fluent/svg/1f4c1.d.ts +2 -0
  180. package/lib/components/emoji/fluent/svg/1f4c1.js +9 -0
  181. package/lib/components/emoji/fluent/svg/1f4c2.d.ts +2 -0
  182. package/lib/components/emoji/fluent/svg/1f4c2.js +9 -0
  183. package/lib/components/emoji/fluent/svg/1f4c4.d.ts +2 -0
  184. package/lib/components/emoji/fluent/svg/1f4c4.js +9 -0
  185. package/lib/components/emoji/fluent/svg/1f4c5.d.ts +2 -0
  186. package/lib/components/emoji/fluent/svg/1f4c5.js +9 -0
  187. package/lib/components/emoji/fluent/svg/1f4c8.d.ts +2 -0
  188. package/lib/components/emoji/fluent/svg/1f4c8.js +9 -0
  189. package/lib/components/emoji/fluent/svg/1f4ca.d.ts +2 -0
  190. package/lib/components/emoji/fluent/svg/1f4ca.js +9 -0
  191. package/lib/components/emoji/fluent/svg/1f4cb.d.ts +2 -0
  192. package/lib/components/emoji/fluent/svg/1f4cb.js +9 -0
  193. package/lib/components/emoji/fluent/svg/1f4cc.d.ts +2 -0
  194. package/lib/components/emoji/fluent/svg/1f4cc.js +9 -0
  195. package/lib/components/emoji/fluent/svg/1f4d1.d.ts +2 -0
  196. package/lib/components/emoji/fluent/svg/1f4d1.js +9 -0
  197. package/lib/components/emoji/fluent/svg/1f4d3.d.ts +2 -0
  198. package/lib/components/emoji/fluent/svg/1f4d3.js +9 -0
  199. package/lib/components/emoji/fluent/svg/1f4d6.d.ts +2 -0
  200. package/lib/components/emoji/fluent/svg/1f4d6.js +9 -0
  201. package/lib/components/emoji/fluent/svg/1f4da.d.ts +2 -0
  202. package/lib/components/emoji/fluent/svg/1f4da.js +9 -0
  203. package/lib/components/emoji/fluent/svg/1f4dc.d.ts +2 -0
  204. package/lib/components/emoji/fluent/svg/1f4dc.js +9 -0
  205. package/lib/components/emoji/fluent/svg/1f4dd.d.ts +2 -0
  206. package/lib/components/emoji/fluent/svg/1f4dd.js +9 -0
  207. package/lib/components/emoji/fluent/svg/1f4de.d.ts +2 -0
  208. package/lib/components/emoji/fluent/svg/1f4de.js +9 -0
  209. package/lib/components/emoji/fluent/svg/1f4e1.d.ts +2 -0
  210. package/lib/components/emoji/fluent/svg/1f4e1.js +9 -0
  211. package/lib/components/emoji/fluent/svg/1f4e2.d.ts +2 -0
  212. package/lib/components/emoji/fluent/svg/1f4e2.js +9 -0
  213. package/lib/components/emoji/fluent/svg/1f4e3.d.ts +2 -0
  214. package/lib/components/emoji/fluent/svg/1f4e3.js +9 -0
  215. package/lib/components/emoji/fluent/svg/1f4e6.d.ts +2 -0
  216. package/lib/components/emoji/fluent/svg/1f4e6.js +9 -0
  217. package/lib/components/emoji/fluent/svg/1f4e7.d.ts +2 -0
  218. package/lib/components/emoji/fluent/svg/1f4e7.js +9 -0
  219. package/lib/components/emoji/fluent/svg/1f4ec.d.ts +2 -0
  220. package/lib/components/emoji/fluent/svg/1f4ec.js +9 -0
  221. package/lib/components/emoji/fluent/svg/1f4f0.d.ts +2 -0
  222. package/lib/components/emoji/fluent/svg/1f4f0.js +9 -0
  223. package/lib/components/emoji/fluent/svg/1f4f7.d.ts +2 -0
  224. package/lib/components/emoji/fluent/svg/1f4f7.js +9 -0
  225. package/lib/components/emoji/fluent/svg/1f500.d.ts +2 -0
  226. package/lib/components/emoji/fluent/svg/1f500.js +9 -0
  227. package/lib/components/emoji/fluent/svg/1f501.d.ts +2 -0
  228. package/lib/components/emoji/fluent/svg/1f501.js +9 -0
  229. package/lib/components/emoji/fluent/svg/1f504.d.ts +2 -0
  230. package/lib/components/emoji/fluent/svg/1f504.js +9 -0
  231. package/lib/components/emoji/fluent/svg/1f50d.d.ts +2 -0
  232. package/lib/components/emoji/fluent/svg/1f50d.js +9 -0
  233. package/lib/components/emoji/fluent/svg/1f50e.d.ts +2 -0
  234. package/lib/components/emoji/fluent/svg/1f50e.js +9 -0
  235. package/lib/components/emoji/fluent/svg/1f511.d.ts +2 -0
  236. package/lib/components/emoji/fluent/svg/1f511.js +9 -0
  237. package/lib/components/emoji/fluent/svg/1f512.d.ts +2 -0
  238. package/lib/components/emoji/fluent/svg/1f512.js +9 -0
  239. package/lib/components/emoji/fluent/svg/1f514.d.ts +2 -0
  240. package/lib/components/emoji/fluent/svg/1f514.js +9 -0
  241. package/lib/components/emoji/fluent/svg/1f525.d.ts +2 -0
  242. package/lib/components/emoji/fluent/svg/1f525.js +9 -0
  243. package/lib/components/emoji/fluent/svg/1f527.d.ts +2 -0
  244. package/lib/components/emoji/fluent/svg/1f527.js +9 -0
  245. package/lib/components/emoji/fluent/svg/1f52c.d.ts +2 -0
  246. package/lib/components/emoji/fluent/svg/1f52c.js +9 -0
  247. package/lib/components/emoji/fluent/svg/1f52d.d.ts +2 -0
  248. package/lib/components/emoji/fluent/svg/1f52d.js +9 -0
  249. package/lib/components/emoji/fluent/svg/1f552.d.ts +2 -0
  250. package/lib/components/emoji/fluent/svg/1f552.js +9 -0
  251. package/lib/components/emoji/fluent/svg/1f58a.d.ts +2 -0
  252. package/lib/components/emoji/fluent/svg/1f58a.js +9 -0
  253. package/lib/components/emoji/fluent/svg/1f58b.d.ts +2 -0
  254. package/lib/components/emoji/fluent/svg/1f58b.js +9 -0
  255. package/lib/components/emoji/fluent/svg/1f5b2.d.ts +2 -0
  256. package/lib/components/emoji/fluent/svg/1f5b2.js +9 -0
  257. package/lib/components/emoji/fluent/svg/1f5bc.d.ts +2 -0
  258. package/lib/components/emoji/fluent/svg/1f5bc.js +9 -0
  259. package/lib/components/emoji/fluent/svg/1f5c2.d.ts +2 -0
  260. package/lib/components/emoji/fluent/svg/1f5c2.js +9 -0
  261. package/lib/components/emoji/fluent/svg/1f5c3.d.ts +2 -0
  262. package/lib/components/emoji/fluent/svg/1f5c3.js +9 -0
  263. package/lib/components/emoji/fluent/svg/1f5d1.d.ts +2 -0
  264. package/lib/components/emoji/fluent/svg/1f5d1.js +9 -0
  265. package/lib/components/emoji/fluent/svg/1f5d3.d.ts +2 -0
  266. package/lib/components/emoji/fluent/svg/1f5d3.js +9 -0
  267. package/lib/components/emoji/fluent/svg/1f5dc.d.ts +2 -0
  268. package/lib/components/emoji/fluent/svg/1f5dc.js +9 -0
  269. package/lib/components/emoji/fluent/svg/1f5fa.d.ts +2 -0
  270. package/lib/components/emoji/fluent/svg/1f5fa.js +9 -0
  271. package/lib/components/emoji/fluent/svg/1f600.d.ts +2 -0
  272. package/lib/components/emoji/fluent/svg/1f600.js +9 -0
  273. package/lib/components/emoji/fluent/svg/1f604.d.ts +2 -0
  274. package/lib/components/emoji/fluent/svg/1f604.js +9 -0
  275. package/lib/components/emoji/fluent/svg/1f60e.d.ts +2 -0
  276. package/lib/components/emoji/fluent/svg/1f60e.js +9 -0
  277. package/lib/components/emoji/fluent/svg/1f642.d.ts +2 -0
  278. package/lib/components/emoji/fluent/svg/1f642.js +9 -0
  279. package/lib/components/emoji/fluent/svg/1f680.d.ts +2 -0
  280. package/lib/components/emoji/fluent/svg/1f680.js +9 -0
  281. package/lib/components/emoji/fluent/svg/1f69a.d.ts +2 -0
  282. package/lib/components/emoji/fluent/svg/1f69a.js +9 -0
  283. package/lib/components/emoji/fluent/svg/1f6a2.d.ts +2 -0
  284. package/lib/components/emoji/fluent/svg/1f6a2.js +9 -0
  285. package/lib/components/emoji/fluent/svg/1f6a7.d.ts +2 -0
  286. package/lib/components/emoji/fluent/svg/1f6a7.js +9 -0
  287. package/lib/components/emoji/fluent/svg/1f6b2.d.ts +2 -0
  288. package/lib/components/emoji/fluent/svg/1f6b2.js +9 -0
  289. package/lib/components/emoji/fluent/svg/1f6cd.d.ts +2 -0
  290. package/lib/components/emoji/fluent/svg/1f6cd.js +9 -0
  291. package/lib/components/emoji/fluent/svg/1f6d2.d.ts +2 -0
  292. package/lib/components/emoji/fluent/svg/1f6d2.js +9 -0
  293. package/lib/components/emoji/fluent/svg/1f6df.d.ts +2 -0
  294. package/lib/components/emoji/fluent/svg/1f6df.js +9 -0
  295. package/lib/components/emoji/fluent/svg/1f6e0.d.ts +2 -0
  296. package/lib/components/emoji/fluent/svg/1f6e0.js +9 -0
  297. package/lib/components/emoji/fluent/svg/1f6e1.d.ts +2 -0
  298. package/lib/components/emoji/fluent/svg/1f6e1.js +9 -0
  299. package/lib/components/emoji/fluent/svg/1f6eb.d.ts +2 -0
  300. package/lib/components/emoji/fluent/svg/1f6eb.js +9 -0
  301. package/lib/components/emoji/fluent/svg/1f6f0.d.ts +2 -0
  302. package/lib/components/emoji/fluent/svg/1f6f0.js +9 -0
  303. package/lib/components/emoji/fluent/svg/1f6f8.d.ts +2 -0
  304. package/lib/components/emoji/fluent/svg/1f6f8.js +9 -0
  305. package/lib/components/emoji/fluent/svg/1f913.d.ts +2 -0
  306. package/lib/components/emoji/fluent/svg/1f913.js +9 -0
  307. package/lib/components/emoji/fluent/svg/1f916.d.ts +2 -0
  308. package/lib/components/emoji/fluent/svg/1f916.js +9 -0
  309. package/lib/components/emoji/fluent/svg/1f917.d.ts +2 -0
  310. package/lib/components/emoji/fluent/svg/1f917.js +9 -0
  311. package/lib/components/emoji/fluent/svg/1f91d.d.ts +2 -0
  312. package/lib/components/emoji/fluent/svg/1f91d.js +9 -0
  313. package/lib/components/emoji/fluent/svg/1f920.d.ts +2 -0
  314. package/lib/components/emoji/fluent/svg/1f920.js +9 -0
  315. package/lib/components/emoji/fluent/svg/1f977.d.ts +2 -0
  316. package/lib/components/emoji/fluent/svg/1f977.js +9 -0
  317. package/lib/components/emoji/fluent/svg/1f984.d.ts +2 -0
  318. package/lib/components/emoji/fluent/svg/1f984.js +9 -0
  319. package/lib/components/emoji/fluent/svg/1f988.d.ts +2 -0
  320. package/lib/components/emoji/fluent/svg/1f988.js +9 -0
  321. package/lib/components/emoji/fluent/svg/1f989.d.ts +2 -0
  322. package/lib/components/emoji/fluent/svg/1f989.js +9 -0
  323. package/lib/components/emoji/fluent/svg/1f98a.d.ts +2 -0
  324. package/lib/components/emoji/fluent/svg/1f98a.js +9 -0
  325. package/lib/components/emoji/fluent/svg/1f98e.d.ts +2 -0
  326. package/lib/components/emoji/fluent/svg/1f98e.js +9 -0
  327. package/lib/components/emoji/fluent/svg/1f9d0.d.ts +2 -0
  328. package/lib/components/emoji/fluent/svg/1f9d0.js +9 -0
  329. package/lib/components/emoji/fluent/svg/1f9d1-200d-1f33e.d.ts +2 -0
  330. package/lib/components/emoji/fluent/svg/1f9d1-200d-1f33e.js +9 -0
  331. package/lib/components/emoji/fluent/svg/1f9d1-200d-1f373.d.ts +2 -0
  332. package/lib/components/emoji/fluent/svg/1f9d1-200d-1f373.js +9 -0
  333. package/lib/components/emoji/fluent/svg/1f9d1-200d-1f393.d.ts +2 -0
  334. package/lib/components/emoji/fluent/svg/1f9d1-200d-1f393.js +9 -0
  335. package/lib/components/emoji/fluent/svg/1f9d1-200d-1f3eb.d.ts +2 -0
  336. package/lib/components/emoji/fluent/svg/1f9d1-200d-1f3eb.js +9 -0
  337. package/lib/components/emoji/fluent/svg/1f9d1-200d-1f4bb.d.ts +2 -0
  338. package/lib/components/emoji/fluent/svg/1f9d1-200d-1f4bb.js +9 -0
  339. package/lib/components/emoji/fluent/svg/1f9d1-200d-1f4bc.d.ts +2 -0
  340. package/lib/components/emoji/fluent/svg/1f9d1-200d-1f4bc.js +9 -0
  341. package/lib/components/emoji/fluent/svg/1f9d1-200d-1f52c.d.ts +2 -0
  342. package/lib/components/emoji/fluent/svg/1f9d1-200d-1f52c.js +9 -0
  343. package/lib/components/emoji/fluent/svg/1f9d1-200d-1f680.d.ts +2 -0
  344. package/lib/components/emoji/fluent/svg/1f9d1-200d-1f680.js +9 -0
  345. package/lib/components/emoji/fluent/svg/1f9d1-200d-2695.d.ts +2 -0
  346. package/lib/components/emoji/fluent/svg/1f9d1-200d-2695.js +9 -0
  347. package/lib/components/emoji/fluent/svg/1f9d1-200d-2696.d.ts +2 -0
  348. package/lib/components/emoji/fluent/svg/1f9d1-200d-2696.js +9 -0
  349. package/lib/components/emoji/fluent/svg/1f9dd.d.ts +2 -0
  350. package/lib/components/emoji/fluent/svg/1f9dd.js +9 -0
  351. package/lib/components/emoji/fluent/svg/1f9e0.d.ts +2 -0
  352. package/lib/components/emoji/fluent/svg/1f9e0.js +9 -0
  353. package/lib/components/emoji/fluent/svg/1f9e9.d.ts +2 -0
  354. package/lib/components/emoji/fluent/svg/1f9e9.js +9 -0
  355. package/lib/components/emoji/fluent/svg/1f9ea.d.ts +2 -0
  356. package/lib/components/emoji/fluent/svg/1f9ea.js +9 -0
  357. package/lib/components/emoji/fluent/svg/1f9ec.d.ts +2 -0
  358. package/lib/components/emoji/fluent/svg/1f9ec.js +9 -0
  359. package/lib/components/emoji/fluent/svg/1f9ed.d.ts +2 -0
  360. package/lib/components/emoji/fluent/svg/1f9ed.js +9 -0
  361. package/lib/components/emoji/fluent/svg/1f9ee.d.ts +2 -0
  362. package/lib/components/emoji/fluent/svg/1f9ee.js +9 -0
  363. package/lib/components/emoji/fluent/svg/1f9f0.d.ts +2 -0
  364. package/lib/components/emoji/fluent/svg/1f9f0.js +9 -0
  365. package/lib/components/emoji/fluent/svg/1f9f9.d.ts +2 -0
  366. package/lib/components/emoji/fluent/svg/1f9f9.js +9 -0
  367. package/lib/components/emoji/fluent/svg/1f9fe.d.ts +2 -0
  368. package/lib/components/emoji/fluent/svg/1f9fe.js +9 -0
  369. package/lib/components/emoji/fluent/svg/1fa79.d.ts +2 -0
  370. package/lib/components/emoji/fluent/svg/1fa79.js +9 -0
  371. package/lib/components/emoji/fluent/svg/1fa84.d.ts +2 -0
  372. package/lib/components/emoji/fluent/svg/1fa84.js +9 -0
  373. package/lib/components/emoji/fluent/svg/1fa90.d.ts +2 -0
  374. package/lib/components/emoji/fluent/svg/1fa90.js +9 -0
  375. package/lib/components/emoji/fluent/svg/1fa9d.d.ts +2 -0
  376. package/lib/components/emoji/fluent/svg/1fa9d.js +9 -0
  377. package/lib/components/emoji/fluent/svg/1fa9f.d.ts +2 -0
  378. package/lib/components/emoji/fluent/svg/1fa9f.js +9 -0
  379. package/lib/components/emoji/fluent/svg/23f0.d.ts +2 -0
  380. package/lib/components/emoji/fluent/svg/23f0.js +9 -0
  381. package/lib/components/emoji/fluent/svg/23f3.d.ts +2 -0
  382. package/lib/components/emoji/fluent/svg/23f3.js +9 -0
  383. package/lib/components/emoji/fluent/svg/2600.d.ts +2 -0
  384. package/lib/components/emoji/fluent/svg/2600.js +9 -0
  385. package/lib/components/emoji/fluent/svg/2601.d.ts +2 -0
  386. package/lib/components/emoji/fluent/svg/2601.js +9 -0
  387. package/lib/components/emoji/fluent/svg/2603.d.ts +2 -0
  388. package/lib/components/emoji/fluent/svg/2603.js +9 -0
  389. package/lib/components/emoji/fluent/svg/2611.d.ts +2 -0
  390. package/lib/components/emoji/fluent/svg/2611.js +9 -0
  391. package/lib/components/emoji/fluent/svg/2615.d.ts +2 -0
  392. package/lib/components/emoji/fluent/svg/2615.js +9 -0
  393. package/lib/components/emoji/fluent/svg/262f.d.ts +2 -0
  394. package/lib/components/emoji/fluent/svg/262f.js +9 -0
  395. package/lib/components/emoji/fluent/svg/2696.d.ts +2 -0
  396. package/lib/components/emoji/fluent/svg/2696.js +9 -0
  397. package/lib/components/emoji/fluent/svg/2699.d.ts +2 -0
  398. package/lib/components/emoji/fluent/svg/2699.js +9 -0
  399. package/lib/components/emoji/fluent/svg/269b.d.ts +2 -0
  400. package/lib/components/emoji/fluent/svg/269b.js +9 -0
  401. package/lib/components/emoji/fluent/svg/26a1.d.ts +2 -0
  402. package/lib/components/emoji/fluent/svg/26a1.js +9 -0
  403. package/lib/components/emoji/fluent/svg/2702.d.ts +2 -0
  404. package/lib/components/emoji/fluent/svg/2702.js +9 -0
  405. package/lib/components/emoji/fluent/svg/2705.d.ts +2 -0
  406. package/lib/components/emoji/fluent/svg/2705.js +9 -0
  407. package/lib/components/emoji/fluent/svg/2709.d.ts +2 -0
  408. package/lib/components/emoji/fluent/svg/2709.js +9 -0
  409. package/lib/components/emoji/fluent/svg/270d.d.ts +2 -0
  410. package/lib/components/emoji/fluent/svg/270d.js +9 -0
  411. package/lib/components/emoji/fluent/svg/270f.d.ts +2 -0
  412. package/lib/components/emoji/fluent/svg/270f.js +9 -0
  413. package/lib/components/emoji/fluent/svg/2712.d.ts +2 -0
  414. package/lib/components/emoji/fluent/svg/2712.js +9 -0
  415. package/lib/components/emoji/fluent/svg/2728.d.ts +2 -0
  416. package/lib/components/emoji/fluent/svg/2728.js +9 -0
  417. package/lib/components/emoji/fluent/svg/2764.d.ts +2 -0
  418. package/lib/components/emoji/fluent/svg/2764.js +9 -0
  419. package/lib/components/emoji/fluent/svg/2b1c.d.ts +2 -0
  420. package/lib/components/emoji/fluent/svg/2b1c.js +9 -0
  421. package/lib/components/emoji/fluent/svg/2b50.d.ts +2 -0
  422. package/lib/components/emoji/fluent/svg/2b50.js +9 -0
  423. package/lib/components/emoji/index.d.ts +3 -0
  424. package/lib/components/emoji/index.js +7 -0
  425. package/lib/components/index.d.ts +11 -0
  426. package/lib/components/index.js +11 -0
  427. package/lib/components/labels/StatusLabels.d.ts +55 -0
  428. package/lib/components/labels/StatusLabels.js +77 -0
  429. package/lib/components/labels/StatusLabels.stories.d.ts +14 -0
  430. package/lib/components/labels/StatusLabels.stories.js +19 -0
  431. package/lib/components/labels/VisibilityLabel.d.ts +4 -0
  432. package/lib/components/labels/VisibilityLabel.js +14 -0
  433. package/lib/components/labels/index.d.ts +2 -0
  434. package/lib/components/labels/index.js +6 -0
  435. package/lib/components/progress/Progress.stories.d.ts +14 -0
  436. package/lib/components/progress/Progress.stories.js +20 -0
  437. package/lib/components/progress/ProgressRing.d.ts +37 -0
  438. package/lib/components/progress/ProgressRing.js +31 -0
  439. package/lib/components/progress/SpinnerBar.d.ts +2 -0
  440. package/lib/components/progress/SpinnerBar.js +21 -0
  441. package/lib/components/progress/Timer.d.ts +10 -0
  442. package/lib/components/progress/Timer.js +24 -0
  443. package/lib/components/progress/index.d.ts +3 -0
  444. package/lib/components/progress/index.js +7 -0
  445. package/lib/components/scroll-area/ScrollArea.d.ts +7 -7
  446. package/lib/components/sparklines/Sparklines.d.ts +16 -0
  447. package/lib/components/sparklines/Sparklines.js +68 -0
  448. package/lib/components/sparklines/Sparklines.stories.d.ts +12 -0
  449. package/lib/components/sparklines/Sparklines.stories.js +15 -0
  450. package/lib/components/sparklines/SparklinesLine.d.ts +8 -0
  451. package/lib/components/sparklines/SparklinesLine.js +37 -0
  452. package/lib/components/sparklines/dataProcessing.d.ts +23 -0
  453. package/lib/components/sparklines/dataProcessing.js +35 -0
  454. package/lib/components/sparklines/index.d.ts +5 -0
  455. package/lib/components/sparklines/index.js +7 -0
  456. package/lib/components/sparklines/types.d.ts +36 -0
  457. package/lib/components/sparklines/types.js +5 -0
  458. package/lib/components/tabs/ViewTabs.d.ts +48 -0
  459. package/lib/components/tabs/ViewTabs.js +40 -0
  460. package/lib/components/tabs/ViewTabs.stories.d.ts +13 -0
  461. package/lib/components/tabs/ViewTabs.stories.js +30 -0
  462. package/lib/components/tabs/index.d.ts +1 -0
  463. package/lib/components/tabs/index.js +5 -0
  464. package/lib/components/timeline/Timeline.d.ts +20 -0
  465. package/lib/components/timeline/Timeline.js +58 -0
  466. package/lib/components/timeline/Timeline.stories.d.ts +12 -0
  467. package/lib/components/timeline/Timeline.stories.js +22 -0
  468. package/lib/components/timeline/index.d.ts +1 -0
  469. package/lib/components/timeline/index.js +5 -0
  470. package/lib/components/toast/ToastPanel.d.ts +11 -0
  471. package/lib/components/toast/ToastPanel.js +43 -0
  472. package/lib/components/toast/ToastPanel.stories.d.ts +12 -0
  473. package/lib/components/toast/ToastPanel.stories.js +16 -0
  474. package/lib/components/toast/index.d.ts +2 -0
  475. package/lib/components/toast/index.js +6 -0
  476. package/lib/components/toast/toastQueue.d.ts +35 -0
  477. package/lib/components/toast/toastQueue.js +47 -0
  478. package/lib/components/toolbar/Toolbar.d.ts +14 -2
  479. package/lib/components/toolbar/Toolbar.js +102 -8
  480. package/lib/components/toolbar/ToolbarRenderer.d.ts +2 -0
  481. package/lib/components/toolbar/ToolbarRenderer.js +3 -1
  482. package/lib/components/toolbar/types.d.ts +6 -0
  483. package/lib/components/truncate/Truncate.d.ts +44 -0
  484. package/lib/components/truncate/Truncate.js +46 -0
  485. package/lib/components/truncate/Truncate.stories.d.ts +13 -0
  486. package/lib/components/truncate/Truncate.stories.js +19 -0
  487. package/lib/components/truncate/index.d.ts +1 -0
  488. package/lib/components/truncate/index.js +5 -0
  489. package/lib/theme/themes/agentThemeStyles.d.ts +1 -1
  490. package/lib/theme/themes/datalayerThemeStyles.d.ts +1 -1
  491. package/lib/theme/themes/earthThemeStyles.d.ts +1 -1
  492. package/lib/theme/themes/ivoryThemeStyles.d.ts +1 -1
  493. package/lib/theme/themes/lovelyThemeStyles.d.ts +1 -1
  494. package/lib/theme/themes/matrixThemeStyles.d.ts +1 -1
  495. package/lib/theme/themes/metalThemeStyles.d.ts +1 -1
  496. package/lib/theme/themes/sandThemeStyles.d.ts +1 -1
  497. package/lib/theme/themes/spatialThemeStyles.d.ts +1 -1
  498. package/lib/theme/themes/sunThemeStyles.d.ts +1 -1
  499. package/lib/theme/themes/vscodeThemeStyles.d.ts +1 -1
  500. package/lib/utils/Download.d.ts +3 -0
  501. package/lib/utils/Download.js +50 -0
  502. package/lib/utils/index.d.ts +1 -0
  503. package/lib/utils/index.js +1 -0
  504. package/package.json +4 -1
package/README.md CHANGED
@@ -17,6 +17,8 @@ This project has been [shared in a discussion](https://github.com/primer/react/d
17
17
 
18
18
  ## Current Addons
19
19
 
20
+ - [x] Action buttons: Copy to Clipboard, Long Action, Upload, Download as CSV or JSON
21
+ - [x] Animated Text
20
22
  - [x] Appearance controls, menus, theme previews and collaborator palettes
21
23
  - [x] Box
22
24
  - [x] Calendar Picker
@@ -26,14 +28,30 @@ This project has been [shared in a discussion](https://github.com/primer/react/d
26
28
  - [x] Color Swatch and Color Picker
27
29
  - [x] Content Loader
28
30
  - [x] Date Picker
31
+ - [x] Display helpers: Busy Dots, Centered Spinner, Avatar and Notebook skeletons, Code Preview, Horizontal Center, Visually Hidden, Placeholder
29
32
  - [x] Entity Avatar
33
+ - [x] Fluent Emoji (and the faces offered, `FACE_EMOJIS`)
30
34
  - [x] Hover Card
31
35
  - [x] Datalayer logos and text marks
36
+ - [x] Progress Ring, Timer and Spinner Bar
32
37
  - [x] Sheet
33
38
  - [x] Side Overlay
34
39
  - [x] Slider
35
40
  - [x] Sliding Panel
41
+ - [x] Sparklines
42
+ - [x] Status Labels and Visibility Label
43
+ - [x] Timeline
44
+ - [x] Toast Panel and its queue (`toastQueue`)
36
45
  - [x] Toolbar and Floating Toolbar
46
+ - [x] Truncate
47
+ - [x] View Tabs
48
+
49
+ The action buttons, Animated Text, the display helpers, Fluent Emoji, the
50
+ progress components, Sparklines, the labels, Timeline, the toasts, Truncate
51
+ and View Tabs were Datalayer core's (`@datalayer/core/lib/components/...`)
52
+ until 29 November 2026; they are imported from `@datalayer/primer-addons`
53
+ now, with no alias left in core. Fluent Emoji's drawings are regenerated by
54
+ `scripts/generate-fluent-emoji.py`.
37
55
 
38
56
  The components use the active theme's semantic tokens rather than fixed
39
57
  visual values. For example, toolbar icon buttons and dropdown triggers read
@@ -0,0 +1,56 @@
1
+ import type { JSX } from 'react';
2
+ /**
3
+ * One piece of an animated line.
4
+ *
5
+ * A string is written as it is. An object cycles through its words, and every
6
+ * cycling piece of the same line advances together — so a sentence can name
7
+ * two things that change at once and still read as one sentence rather than
8
+ * two independent slot machines.
9
+ */
10
+ export type AnimatedTextPart = string | AnimatedTextWords;
11
+ export type AnimatedTextWords = {
12
+ /** The words this piece cycles through. */
13
+ words: string[];
14
+ /**
15
+ * The colour of the words, as a Primer foreground token name — `accent`,
16
+ * `success`, `attention`, `severe`, `done`, `muted` — or any CSS colour.
17
+ * Given a token name the colour follows the theme, light or dark, because
18
+ * it resolves to the CSS variable Primer sets.
19
+ */
20
+ color?: AnimatedTextColor;
21
+ };
22
+ export type AnimatedTextColor = 'accent' | 'success' | 'attention' | 'severe' | 'done' | 'muted' | 'default' | (string & {});
23
+ export interface AnimatedTextProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, 'children' | 'color'> {
24
+ /** Text before the cycling words. Ignored when `parts` is given. */
25
+ prefix?: string;
26
+ /** The words to cycle through. Ignored when `parts` is given. */
27
+ words?: string[];
28
+ /** Text after the cycling words. Ignored when `parts` is given. */
29
+ suffix?: string;
30
+ /**
31
+ * The line, as a sequence of fixed and cycling pieces. Every cycling piece
32
+ * advances on the same tick, so several of them stay in step.
33
+ */
34
+ parts?: AnimatedTextPart[];
35
+ /** Colour applied to cycling pieces that do not name their own. */
36
+ color?: AnimatedTextColor;
37
+ intervalMs?: number;
38
+ transitionMs?: number;
39
+ }
40
+ /**
41
+ * A line of text in which one or more words change, in step.
42
+ *
43
+ * ```tsx
44
+ * <AnimatedText
45
+ * parts={[
46
+ * 'Bring ',
47
+ * { words: ['Claude', 'Codex', 'Cursor'], color: 'accent' },
48
+ * '. Datalayer gives it a secure endpoint to your ',
49
+ * { words: ['Notebooks', 'Data', 'Code Sandboxes'], color: 'success' },
50
+ * '.',
51
+ * ]}
52
+ * />
53
+ * ```
54
+ */
55
+ export declare function AnimatedText({ prefix, words, suffix, parts, color, intervalMs, transitionMs, style, ...rest }: AnimatedTextProps): JSX.Element;
56
+ export default AnimatedText;
@@ -0,0 +1,100 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useEffect, useMemo, useState } from 'react';
3
+ /** The Primer foreground tokens, which carry the theme with them. */
4
+ const THEME_COLORS = {
5
+ accent: 'var(--fgColor-accent, var(--color-accent-fg))',
6
+ success: 'var(--fgColor-success, var(--color-success-fg))',
7
+ attention: 'var(--fgColor-attention, var(--color-attention-fg))',
8
+ severe: 'var(--fgColor-severe, var(--color-severe-fg))',
9
+ done: 'var(--fgColor-done, var(--color-done-fg))',
10
+ muted: 'var(--fgColor-muted, var(--color-fg-muted))',
11
+ default: 'inherit',
12
+ };
13
+ /**
14
+ * Resolve a colour: a known token becomes the themed CSS variable, anything
15
+ * else is passed through so a caller can still give a literal colour.
16
+ */
17
+ function resolveColor(color) {
18
+ if (!color) {
19
+ return undefined;
20
+ }
21
+ return THEME_COLORS[color] ?? color;
22
+ }
23
+ /**
24
+ * A line of text in which one or more words change, in step.
25
+ *
26
+ * ```tsx
27
+ * <AnimatedText
28
+ * parts={[
29
+ * 'Bring ',
30
+ * { words: ['Claude', 'Codex', 'Cursor'], color: 'accent' },
31
+ * '. Datalayer gives it a secure endpoint to your ',
32
+ * { words: ['Notebooks', 'Data', 'Code Sandboxes'], color: 'success' },
33
+ * '.',
34
+ * ]}
35
+ * />
36
+ * ```
37
+ */
38
+ export function AnimatedText({ prefix, words, suffix, parts, color, intervalMs = 1800, transitionMs = 240, style, ...rest }) {
39
+ // The older three-prop form is the same thing with one cycling piece.
40
+ const resolvedParts = useMemo(() => {
41
+ if (parts && parts.length > 0) {
42
+ return parts;
43
+ }
44
+ return [prefix ?? '', { words: words ?? [] }, suffix ?? ''];
45
+ }, [parts, prefix, suffix, words]);
46
+ const cyclingParts = useMemo(() => resolvedParts.filter((part) => typeof part !== 'string' &&
47
+ part.words.filter(word => word.trim().length > 0).length > 0), [resolvedParts]);
48
+ // One index for the whole line: what makes several cycling pieces change
49
+ // together rather than drifting apart.
50
+ const [step, setStep] = useState(0);
51
+ const [visible, setVisible] = useState(true);
52
+ // The tick has to run until every piece has come back round, so a line
53
+ // pairing three words with four does not repeat after three.
54
+ const cycleLength = useMemo(() => {
55
+ const lengths = cyclingParts.map(part => part.words.filter(word => word.trim().length > 0).length);
56
+ return lengths.reduce((total, length) => lowestCommonMultiple(total, length), 1);
57
+ }, [cyclingParts]);
58
+ useEffect(() => {
59
+ if (cycleLength <= 1) {
60
+ return;
61
+ }
62
+ const timer = setInterval(() => {
63
+ setVisible(false);
64
+ setTimeout(() => {
65
+ setStep(previous => (previous + 1) % cycleLength);
66
+ setVisible(true);
67
+ }, transitionMs);
68
+ }, intervalMs);
69
+ return () => {
70
+ clearInterval(timer);
71
+ };
72
+ }, [cycleLength, intervalMs, transitionMs]);
73
+ const wordStyle = (part) => ({
74
+ display: 'inline-block',
75
+ color: resolveColor(part.color ?? color),
76
+ transition: `opacity ${transitionMs}ms ease, transform ${transitionMs}ms ease`,
77
+ opacity: visible ? 1 : 0,
78
+ transform: visible ? 'translateY(0)' : 'translateY(0.25em)',
79
+ });
80
+ return (_jsx("span", { ...rest, style: style, children: resolvedParts.map((part, index) => {
81
+ if (typeof part === 'string') {
82
+ return _jsx("span", { children: part }, `fixed-${index}`);
83
+ }
84
+ const available = part.words.filter(word => word.trim().length > 0);
85
+ if (available.length === 0) {
86
+ return null;
87
+ }
88
+ return (_jsx("span", { "aria-live": "polite", style: wordStyle(part), children: available[step % available.length] }, `words-${index}`));
89
+ }) }));
90
+ }
91
+ function greatestCommonDivisor(a, b) {
92
+ return b === 0 ? a : greatestCommonDivisor(b, a % b);
93
+ }
94
+ function lowestCommonMultiple(a, b) {
95
+ if (a === 0 || b === 0) {
96
+ return Math.max(a, b);
97
+ }
98
+ return Math.abs(a * b) / greatestCommonDivisor(a, b);
99
+ }
100
+ export default AnimatedText;
@@ -0,0 +1,14 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import { AnimatedText } from './AnimatedText';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof AnimatedText;
6
+ tags: string[];
7
+ parameters: {
8
+ layout: string;
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Words: Story;
14
+ export declare const Parts: Story;
@@ -0,0 +1,21 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Box } from '../box/Box';
3
+ import { AnimatedText } from './AnimatedText';
4
+ const meta = {
5
+ title: 'Components/AnimatedText',
6
+ component: AnimatedText,
7
+ tags: ['autodocs'],
8
+ parameters: { layout: 'fullscreen' },
9
+ };
10
+ export default meta;
11
+ export const Words = {
12
+ args: { prefix: 'Agents that ', words: ['analyse', 'report', 'alert'], suffix: ' for you.', color: 'accent' },
13
+ render: args => (_jsx(Box, { p: 3, bg: "canvas.default", fontSize: 4, children: _jsx(AnimatedText, { ...args }) })),
14
+ };
15
+ export const Parts = {
16
+ args: {
17
+ parts: ['Run ', { words: ['notebooks', 'agents'], color: 'success' }, ' on ', { words: ['GPUs', 'CPUs'], color: 'done' }],
18
+ intervalMs: 1800,
19
+ },
20
+ render: args => (_jsx(Box, { p: 3, bg: "canvas.default", fontSize: 3, children: _jsx(AnimatedText, { ...args }) })),
21
+ };
@@ -0,0 +1 @@
1
+ export * from './AnimatedText';
@@ -0,0 +1,5 @@
1
+ /*
2
+ * Copyright (c) 2023-2026 Datalayer, Inc.
3
+ * Distributed under the terms of the Modified BSD License.
4
+ */
5
+ export * from './AnimatedText';
@@ -154,7 +154,9 @@ export function ColorModeCircle({ colorMode, onColorModeChange, size = 28, hover
154
154
  bg: 'canvas.overlay',
155
155
  border: '1px solid',
156
156
  borderColor: 'border.default',
157
- borderRadius: 2,
157
+ // The panel is an overlay, so its shape belongs to the active
158
+ // theme (Metal and Agent are deliberately rounder than VS Code).
159
+ borderRadius: 'var(--theme-radius-overlay, 12px)',
158
160
  boxShadow: 'shadow.large',
159
161
  opacity: isHoverOpen ? 1 : 0,
160
162
  transform: isHoverOpen ? 'none' : isRight ? 'translateX(-6px)' : 'translateY(-6px)',
@@ -0,0 +1,14 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import { CopyToClipboardButton } from './CopyToClipboardButton';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof CopyToClipboardButton;
6
+ tags: string[];
7
+ parameters: {
8
+ layout: string;
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const CopyToClipboard: Story;
14
+ export declare const AllButtons: Story;
@@ -0,0 +1,24 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { SyncIcon } from '@primer/octicons-react';
3
+ import { Box } from '../box/Box';
4
+ import { CopyToClipboardButton } from './CopyToClipboardButton';
5
+ import { DownloadCSVButton } from './DownloadCSVButton';
6
+ import { DownloadJsonButton } from './DownloadJsonButton';
7
+ import { LongActionButton } from './LongActionButton';
8
+ import { UploadButton, UploadIconButton } from './UploadButton';
9
+ const meta = {
10
+ title: 'Components/Buttons',
11
+ component: CopyToClipboardButton,
12
+ tags: ['autodocs'],
13
+ parameters: { layout: 'fullscreen' },
14
+ };
15
+ export default meta;
16
+ const wait = (ms) => new Promise(resolve => setTimeout(resolve, ms));
17
+ export const CopyToClipboard = {
18
+ args: { value: 'dla_3f9c2e7d8b1a21e', ariaLabel: 'Copy the key' },
19
+ render: args => (_jsx(Box, { p: 3, bg: "canvas.default", children: _jsx(CopyToClipboardButton, { ...args }) })),
20
+ };
21
+ export const AllButtons = {
22
+ args: { value: 'copied' },
23
+ render: args => (_jsxs(Box, { p: 3, bg: "canvas.default", display: "flex", gap: 3, alignItems: "center", children: [_jsx(CopyToClipboardButton, { ...args }), _jsx(LongActionButton, { label: "Refresh", icon: SyncIcon, onClick: () => wait(2000) }), _jsx(UploadButton, { label: "Upload", upload: () => wait(100) }), _jsx(UploadIconButton, { label: "Upload a file", upload: () => wait(100) }), _jsx(DownloadCSVButton, { data: [{ name: 'alpha', runs: 12 }], fileName: "runs" }), _jsx(DownloadJsonButton, { data: [{ name: 'alpha', runs: 12 }], fileName: "runs" })] })),
24
+ };
@@ -0,0 +1,13 @@
1
+ export type CopyToClipboardButtonProps = {
2
+ value: string;
3
+ ariaLabel?: string;
4
+ successText?: string;
5
+ errorText?: string;
6
+ direction?: 'n' | 's' | 'e' | 'w' | 'nw' | 'ne' | 'sw' | 'se';
7
+ disabled?: boolean;
8
+ size?: 'small' | 'medium';
9
+ variant?: 'default' | 'invisible' | 'primary' | 'danger';
10
+ onResult?: (copied: boolean) => void;
11
+ };
12
+ export declare function CopyToClipboardButton({ value, ariaLabel, successText, errorText, direction, disabled, size, variant, onResult, }: CopyToClipboardButtonProps): import("react").JSX.Element;
13
+ export default CopyToClipboardButton;
@@ -0,0 +1,73 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /*
3
+ * Copyright (c) 2023-2025 Datalayer, Inc.
4
+ * Distributed under the terms of the Modified BSD License.
5
+ */
6
+ /**
7
+ * A button that copies a value, its tooltip saying what it copies, then
8
+ * whether it did.
9
+ *
10
+ * @module components/buttons/CopyToClipboardButton
11
+ */
12
+ import { useMemo, useState } from 'react';
13
+ import { IconButton, Tooltip } from '@primer/react';
14
+ import { CopyIcon } from '@primer/octicons-react';
15
+ const ellipsize = (value, max = 96) => {
16
+ if (!value) {
17
+ return '';
18
+ }
19
+ if (value.length <= max) {
20
+ return value;
21
+ }
22
+ const head = Math.floor((max - 1) / 2);
23
+ const tail = max - head - 1;
24
+ return `${value.slice(0, head)}…${value.slice(-tail)}`;
25
+ };
26
+ export function CopyToClipboardButton({ value, ariaLabel = 'Copy to clipboard', successText = 'Copied', errorText = 'Unable to copy', direction = 'n', disabled = false, size = 'small', variant = 'invisible', onResult, }) {
27
+ const [status, setStatus] = useState('idle');
28
+ const hasValue = Boolean(value && value.trim());
29
+ const tooltip = useMemo(() => {
30
+ if (status === 'success') {
31
+ return successText;
32
+ }
33
+ if (status === 'error') {
34
+ return errorText;
35
+ }
36
+ return hasValue ? `Copy: ${ellipsize(value)}` : 'Nothing to copy';
37
+ }, [status, successText, errorText, hasValue, value]);
38
+ const handleClick = async () => {
39
+ if (!hasValue || disabled) {
40
+ return;
41
+ }
42
+ try {
43
+ if (!navigator?.clipboard?.writeText) {
44
+ throw new Error('Clipboard API unavailable');
45
+ }
46
+ await navigator.clipboard.writeText(value);
47
+ setStatus('success');
48
+ onResult?.(true);
49
+ window.setTimeout(() => setStatus('idle'), 1500);
50
+ }
51
+ catch {
52
+ setStatus('error');
53
+ onResult?.(false);
54
+ window.setTimeout(() => setStatus('idle'), 1800);
55
+ }
56
+ };
57
+ const isDisabled = disabled || !hasValue;
58
+ const button = (_jsx(IconButton, { "aria-label": ariaLabel, icon: CopyIcon, size: size, variant: variant, disabled: isDisabled, onClick: handleClick }));
59
+ /*
60
+ * A disabled button wears no tooltip.
61
+ *
62
+ * `Tooltip` only takes interactive content — `button:not([disabled])` — and
63
+ * throws on anything else, which is what a disabled button is. Nothing is
64
+ * lost by leaving it out: a disabled element fires no pointer event, so the
65
+ * tooltip would never have shown. `IconButton` does the same with the one
66
+ * it renders of its own.
67
+ */
68
+ if (isDisabled) {
69
+ return button;
70
+ }
71
+ return (_jsx(Tooltip, { text: tooltip, direction: direction, children: button }));
72
+ }
73
+ export default CopyToClipboardButton;
@@ -0,0 +1,8 @@
1
+ import { VariantType } from './VariantType';
2
+ type IDownloadCSVButtonProps = {
3
+ data?: object;
4
+ fileName: string;
5
+ variant?: VariantType;
6
+ };
7
+ export declare const DownloadCSVButton: ({ data, fileName, variant, }: IDownloadCSVButtonProps) => import("react").JSX.Element;
8
+ export default DownloadCSVButton;
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /*
3
+ * Copyright (c) 2023-2025 Datalayer, Inc.
4
+ * Distributed under the terms of the Modified BSD License.
5
+ */
6
+ import { Button } from '@primer/react';
7
+ import { DownloadIcon } from '@primer/octicons-react';
8
+ import { downloadCSV } from '../../utils/Download';
9
+ export const DownloadCSVButton = ({ data, fileName, variant = 'default', }) => {
10
+ return (_jsx(Button, { variant: variant, leadingVisual: DownloadIcon, onClick: () => downloadCSV(data, fileName), children: "Download" }));
11
+ };
12
+ export default DownloadCSVButton;
@@ -0,0 +1,9 @@
1
+ import { VariantType } from './VariantType';
2
+ type IDownloadJsonButtonProps = {
3
+ data?: object;
4
+ fileName: string;
5
+ extension?: string;
6
+ variant?: VariantType;
7
+ };
8
+ export declare const DownloadJsonButton: ({ data, fileName, variant, extension, }: IDownloadJsonButtonProps) => import("react").JSX.Element;
9
+ export default DownloadJsonButton;
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /*
3
+ * Copyright (c) 2023-2025 Datalayer, Inc.
4
+ * Distributed under the terms of the Modified BSD License.
5
+ */
6
+ import { Button } from '@primer/react';
7
+ import { DownloadIcon } from '@primer/octicons-react';
8
+ import { downloadJson } from '../../utils/Download';
9
+ export const DownloadJsonButton = ({ data, fileName, variant = 'default', extension = 'json', }) => {
10
+ return (_jsx(Button, { variant: variant, leadingVisual: DownloadIcon, onClick: () => downloadJson(data, fileName, extension), children: "Download" }));
11
+ };
12
+ export default DownloadJsonButton;
@@ -0,0 +1,29 @@
1
+ import type { JSX } from 'react';
2
+ import { type ElementType } from 'react';
3
+ type ILongActionButtonProps = {
4
+ /**
5
+ * Button onClick callback
6
+ */
7
+ onClick: () => Promise<void>;
8
+ /**
9
+ * Button icon
10
+ */
11
+ icon: ElementType<any>;
12
+ /**
13
+ * Force displaying button as inProgress
14
+ */
15
+ inProgress?: boolean;
16
+ /**
17
+ * Button label
18
+ */
19
+ label: string;
20
+ /**
21
+ * Button disabled state
22
+ */
23
+ disabled?: boolean;
24
+ };
25
+ /**
26
+ * Icon button displaying a spinner while its callback is running.
27
+ */
28
+ export declare function LongActionButton(props: ILongActionButtonProps): JSX.Element;
29
+ export {};
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useCallback, useState } from 'react';
3
+ import { IconButton, Spinner } from '@primer/react';
4
+ /**
5
+ * Icon button displaying a spinner while its callback is running.
6
+ */
7
+ export function LongActionButton(props) {
8
+ const { label, disabled, onClick, icon, inProgress } = props;
9
+ const [internalInProgress, setInternalInProgress] = useState(false);
10
+ const handleClick = useCallback(async () => {
11
+ setInternalInProgress(true);
12
+ try {
13
+ await onClick();
14
+ }
15
+ finally {
16
+ setInternalInProgress(false);
17
+ }
18
+ }, [onClick, setInternalInProgress]);
19
+ return (
20
+ // The label is Primer's tooltip already; a `title` beside it added the
21
+ // browser's own tooltip a second later (the user, 21 November 2026).
22
+ _jsx(IconButton, { "aria-label": label, disabled: disabled || internalInProgress || inProgress, icon: internalInProgress || inProgress ? () => _jsx(Spinner, { size: "small" }) : icon, size: "small", variant: "invisible", onClick: handleClick }));
23
+ }
@@ -0,0 +1,35 @@
1
+ import type { JSX } from 'react';
2
+ import type { VariantType } from './VariantType';
3
+ interface IUploadBaseButtonProps {
4
+ /**
5
+ * Button component factory
6
+ */
7
+ buttonFactory: (onClick: () => void) => JSX.Element;
8
+ /**
9
+ * Whether the upload support one or more files
10
+ */
11
+ multiple?: boolean;
12
+ /**
13
+ * Upload callback
14
+ */
15
+ upload: (file: File) => Promise<unknown>;
16
+ }
17
+ export interface IUploadIconButtonProps extends Omit<IUploadBaseButtonProps, 'buttonFactory'> {
18
+ /**
19
+ * Button aria-label
20
+ */
21
+ label: string;
22
+ }
23
+ export declare function UploadIconButton(props: IUploadIconButtonProps): JSX.Element;
24
+ export interface IUploadButtonProps extends Omit<IUploadBaseButtonProps, 'buttonFactory'> {
25
+ /**
26
+ * Button aria-label
27
+ */
28
+ label: string;
29
+ /**
30
+ * Button variant
31
+ */
32
+ variant?: VariantType;
33
+ }
34
+ export declare function UploadButton({ label, variant, ...others }: IUploadButtonProps): JSX.Element;
35
+ export default UploadButton;
@@ -0,0 +1,35 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useCallback, useMemo, useRef } from 'react';
3
+ import { Button, IconButton } from '@primer/react';
4
+ import { UploadIcon } from '@primer/octicons-react';
5
+ function UploadBaseButton(props) {
6
+ const { buttonFactory, multiple, upload } = props;
7
+ const inputRef = useRef(null);
8
+ const onInputChanged = useCallback(() => {
9
+ if (inputRef.current && inputRef.current.files) {
10
+ const files = Array.from(inputRef.current.files);
11
+ Promise.all(files.map(file => upload(file))).catch(reason => {
12
+ const msg = 'Failed to upload files.';
13
+ console.error(msg, reason);
14
+ });
15
+ }
16
+ }, [inputRef.current, upload]);
17
+ const onInputClick = useCallback(() => {
18
+ if (inputRef.current) {
19
+ inputRef.current.value = '';
20
+ }
21
+ }, [inputRef.current]);
22
+ return (_jsxs(_Fragment, { children: [buttonFactory(() => {
23
+ inputRef.current?.click();
24
+ }), _jsx("input", { ref: inputRef, style: { display: 'none' }, type: "file", multiple: multiple, onClick: onInputClick, onChange: onInputChanged })] }));
25
+ }
26
+ export function UploadIconButton(props) {
27
+ const { label, ...others } = props;
28
+ const factory = useMemo(() => (onClick) => (_jsx(IconButton, { "aria-label": label, icon: UploadIcon, size: "small", variant: "invisible", onClick: onClick })), [label]);
29
+ return _jsx(UploadBaseButton, { buttonFactory: factory, ...others });
30
+ }
31
+ export function UploadButton({ label, variant = 'primary', ...others }) {
32
+ const factory = useMemo(() => (onClick) => (_jsx(Button, { "aria-label": label, leadingVisual: () => _jsx(UploadIcon, { fill: "white" }), size: "small", variant: variant, onClick: onClick, children: label })), [label, variant]);
33
+ return _jsx(UploadBaseButton, { buttonFactory: factory, ...others });
34
+ }
35
+ export default UploadButton;
@@ -0,0 +1 @@
1
+ export type VariantType = 'default' | 'primary' | 'invisible' | 'danger' | 'link';
@@ -0,0 +1,5 @@
1
+ /*
2
+ * Copyright (c) 2023-2025 Datalayer, Inc.
3
+ * Distributed under the terms of the Modified BSD License.
4
+ */
5
+ export {};
@@ -0,0 +1,6 @@
1
+ export * from './CopyToClipboardButton';
2
+ export * from './DownloadCSVButton';
3
+ export * from './DownloadJsonButton';
4
+ export * from './LongActionButton';
5
+ export * from './UploadButton';
6
+ export * from './VariantType';
@@ -0,0 +1,10 @@
1
+ /*
2
+ * Copyright (c) 2023-2026 Datalayer, Inc.
3
+ * Distributed under the terms of the Modified BSD License.
4
+ */
5
+ export * from './CopyToClipboardButton';
6
+ export * from './DownloadCSVButton';
7
+ export * from './DownloadJsonButton';
8
+ export * from './LongActionButton';
9
+ export * from './UploadButton';
10
+ export * from './VariantType';
@@ -0,0 +1,5 @@
1
+ type IAvatarSkeletonProps = {
2
+ size?: number;
3
+ };
4
+ export declare const AvatarSkeleton: (props: IAvatarSkeletonProps) => import("react").JSX.Element;
5
+ export default AvatarSkeleton;
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
+ /*
3
+ * Copyright (c) 2023-2025 Datalayer, Inc.
4
+ * Distributed under the terms of the Modified BSD License.
5
+ */
6
+ import { SkeletonAvatar } from '@primer/react/experimental';
7
+ export const AvatarSkeleton = (props) => {
8
+ const { size } = props;
9
+ return (_jsx(_Fragment, { children: _jsx(SkeletonAvatar, { size: size }) }));
10
+ };
11
+ export default AvatarSkeleton;
@@ -0,0 +1,9 @@
1
+ type BusyDotsProps = {
2
+ color?: string;
3
+ fontSize?: number;
4
+ ml?: number;
5
+ ariaLabel?: string;
6
+ intervalMs?: number;
7
+ };
8
+ export declare function BusyDots({ color, fontSize, ml, ariaLabel, intervalMs, }: BusyDotsProps): import("react").JSX.Element;
9
+ export default BusyDots;
@@ -0,0 +1,31 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /*
3
+ * Copyright (c) 2023-2025 Datalayer, Inc.
4
+ * Distributed under the terms of the Modified BSD License.
5
+ */
6
+ import { useEffect, useState } from 'react';
7
+ import { Text } from '@primer/react';
8
+ const DOTS = ['.', '..', '...'];
9
+ export function BusyDots({ color = 'fg.muted', fontSize = 0, ml = 1, ariaLabel = 'In progress', intervalMs = 450, }) {
10
+ const [index, setIndex] = useState(0);
11
+ useEffect(() => {
12
+ const timer = window.setInterval(() => {
13
+ setIndex(prev => (prev + 1) % DOTS.length);
14
+ }, intervalMs);
15
+ return () => window.clearInterval(timer);
16
+ }, [intervalMs]);
17
+ return (_jsxs(Text, { as: "span", sx: {
18
+ ml,
19
+ color,
20
+ fontSize,
21
+ display: 'inline-block',
22
+ position: 'relative',
23
+ fontWeight: 'semibold',
24
+ }, "aria-label": ariaLabel, children: [_jsx(Text, { as: "span", sx: { visibility: 'hidden' }, children: "..." }), _jsx(Text, { as: "span", sx: {
25
+ position: 'absolute',
26
+ left: 0,
27
+ top: 0,
28
+ whiteSpace: 'nowrap',
29
+ }, children: DOTS[index] })] }));
30
+ }
31
+ export default BusyDots;