@apify/ui-library 1.138.0 → 1.138.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (339) hide show
  1. package/README.md +3 -3
  2. package/dist/src/components/action_link.d.ts.map +1 -1
  3. package/dist/src/components/action_link.js +3 -3
  4. package/dist/src/components/action_link.js.map +1 -1
  5. package/dist/src/components/actor_template_card.d.ts.map +1 -1
  6. package/dist/src/components/actor_template_card.js +3 -3
  7. package/dist/src/components/actor_template_card.js.map +1 -1
  8. package/dist/src/components/avatar/actor_avatar.d.ts.map +1 -1
  9. package/dist/src/components/avatar/actor_avatar.js +3 -3
  10. package/dist/src/components/avatar/actor_avatar.js.map +1 -1
  11. package/dist/src/components/avatar/boring_avatar.d.ts.map +1 -1
  12. package/dist/src/components/avatar/boring_avatar.js +8 -7
  13. package/dist/src/components/avatar/boring_avatar.js.map +1 -1
  14. package/dist/src/components/avatar/user_avatar.d.ts.map +1 -1
  15. package/dist/src/components/avatar/user_avatar.js +1 -1
  16. package/dist/src/components/avatar/user_avatar.js.map +1 -1
  17. package/dist/src/components/badge.d.ts.map +1 -1
  18. package/dist/src/components/badge.js +10 -3
  19. package/dist/src/components/badge.js.map +1 -1
  20. package/dist/src/components/banner.d.ts.map +1 -1
  21. package/dist/src/components/banner.js +4 -3
  22. package/dist/src/components/banner.js.map +1 -1
  23. package/dist/src/components/blog_article.d.ts.map +1 -1
  24. package/dist/src/components/blog_article.js +2 -3
  25. package/dist/src/components/blog_article.js.map +1 -1
  26. package/dist/src/components/box.d.ts.map +1 -1
  27. package/dist/src/components/box.js +32 -24
  28. package/dist/src/components/box.js.map +1 -1
  29. package/dist/src/components/breadcrumb/breadcrumb.d.ts.map +1 -1
  30. package/dist/src/components/breadcrumb/breadcrumb.js +1 -1
  31. package/dist/src/components/breadcrumb/breadcrumb.js.map +1 -1
  32. package/dist/src/components/button.d.ts.map +1 -1
  33. package/dist/src/components/button.js +12 -9
  34. package/dist/src/components/button.js.map +1 -1
  35. package/dist/src/components/card_container.d.ts.map +1 -1
  36. package/dist/src/components/card_container.js +5 -3
  37. package/dist/src/components/card_container.js.map +1 -1
  38. package/dist/src/components/checkbox/checkbox.d.ts.map +1 -1
  39. package/dist/src/components/checkbox/checkbox.js +1 -1
  40. package/dist/src/components/checkbox/checkbox.js.map +1 -1
  41. package/dist/src/components/checkbox/checkbox.style.d.ts.map +1 -1
  42. package/dist/src/components/checkbox/checkbox.style.js +7 -4
  43. package/dist/src/components/checkbox/checkbox.style.js.map +1 -1
  44. package/dist/src/components/chip.d.ts.map +1 -1
  45. package/dist/src/components/chip.js +1 -1
  46. package/dist/src/components/chip.js.map +1 -1
  47. package/dist/src/components/code/action_button.d.ts.map +1 -1
  48. package/dist/src/components/code/action_button.js +5 -5
  49. package/dist/src/components/code/action_button.js.map +1 -1
  50. package/dist/src/components/code/code_block/code_block.d.ts.map +1 -1
  51. package/dist/src/components/code/code_block/code_block.js +19 -8
  52. package/dist/src/components/code/code_block/code_block.js.map +1 -1
  53. package/dist/src/components/code/code_block/code_block.styled.d.ts.map +1 -1
  54. package/dist/src/components/code/code_block/code_block.styled.js +18 -15
  55. package/dist/src/components/code/code_block/code_block.styled.js.map +1 -1
  56. package/dist/src/components/code/code_block/code_block_with_tabs.d.ts.map +1 -1
  57. package/dist/src/components/code/code_block/code_block_with_tabs.js +10 -8
  58. package/dist/src/components/code/code_block/code_block_with_tabs.js.map +1 -1
  59. package/dist/src/components/code/code_block/utils.d.ts.map +1 -1
  60. package/dist/src/components/code/code_block/utils.js.map +1 -1
  61. package/dist/src/components/code/inline_code/inline_code.d.ts.map +1 -1
  62. package/dist/src/components/code/inline_code/inline_code.js +2 -2
  63. package/dist/src/components/code/inline_code/inline_code.js.map +1 -1
  64. package/dist/src/components/code/one_light_theme.d.ts.map +1 -1
  65. package/dist/src/components/code/one_light_theme.js +2 -17
  66. package/dist/src/components/code/one_light_theme.js.map +1 -1
  67. package/dist/src/components/code/one_line_code/one_line_code.d.ts.map +1 -1
  68. package/dist/src/components/code/one_line_code/one_line_code.js +11 -14
  69. package/dist/src/components/code/one_line_code/one_line_code.js.map +1 -1
  70. package/dist/src/components/code/prism_highlighter.d.ts.map +1 -1
  71. package/dist/src/components/code/prism_highlighter.js +35 -27
  72. package/dist/src/components/code/prism_highlighter.js.map +1 -1
  73. package/dist/src/components/code/prism_python.js.map +1 -1
  74. package/dist/src/components/collapsible_card/collapsible_card.d.ts.map +1 -1
  75. package/dist/src/components/collapsible_card/collapsible_card.js +7 -6
  76. package/dist/src/components/collapsible_card/collapsible_card.js.map +1 -1
  77. package/dist/src/components/color_wheel_gradient.d.ts.map +1 -1
  78. package/dist/src/components/color_wheel_gradient.js +4 -2
  79. package/dist/src/components/color_wheel_gradient.js.map +1 -1
  80. package/dist/src/components/floating/floating_component_base.d.ts +1 -1
  81. package/dist/src/components/floating/floating_component_base.d.ts.map +1 -1
  82. package/dist/src/components/floating/floating_component_base.js +3 -5
  83. package/dist/src/components/floating/floating_component_base.js.map +1 -1
  84. package/dist/src/components/floating/menu.d.ts.map +1 -1
  85. package/dist/src/components/floating/menu.js +11 -5
  86. package/dist/src/components/floating/menu.js.map +1 -1
  87. package/dist/src/components/floating/menu_common.d.ts +4 -4
  88. package/dist/src/components/floating/menu_common.d.ts.map +1 -1
  89. package/dist/src/components/floating/menu_common.js +1 -1
  90. package/dist/src/components/floating/menu_common.js.map +1 -1
  91. package/dist/src/components/floating/menu_components.d.ts.map +1 -1
  92. package/dist/src/components/floating/menu_components.js +9 -7
  93. package/dist/src/components/floating/menu_components.js.map +1 -1
  94. package/dist/src/components/floating/tooltip.d.ts +2 -2
  95. package/dist/src/components/floating/tooltip.d.ts.map +1 -1
  96. package/dist/src/components/floating/tooltip.js +10 -9
  97. package/dist/src/components/floating/tooltip.js.map +1 -1
  98. package/dist/src/components/floating/tooltip_content.d.ts.map +1 -1
  99. package/dist/src/components/floating/tooltip_content.js +3 -3
  100. package/dist/src/components/floating/tooltip_content.js.map +1 -1
  101. package/dist/src/components/icon_button.d.ts.map +1 -1
  102. package/dist/src/components/icon_button.js +10 -8
  103. package/dist/src/components/icon_button.js.map +1 -1
  104. package/dist/src/components/image.d.ts.map +1 -1
  105. package/dist/src/components/image.js +1 -1
  106. package/dist/src/components/image.js.map +1 -1
  107. package/dist/src/components/link.d.ts.map +1 -1
  108. package/dist/src/components/link.js +5 -5
  109. package/dist/src/components/link.js.map +1 -1
  110. package/dist/src/components/message.d.ts.map +1 -1
  111. package/dist/src/components/message.js +21 -21
  112. package/dist/src/components/message.js.map +1 -1
  113. package/dist/src/components/rating.d.ts.map +1 -1
  114. package/dist/src/components/rating.js +5 -6
  115. package/dist/src/components/rating.js.map +1 -1
  116. package/dist/src/components/readme_renderer/pythonize_value.d.ts.map +1 -1
  117. package/dist/src/components/readme_renderer/pythonize_value.js +10 -6
  118. package/dist/src/components/readme_renderer/pythonize_value.js.map +1 -1
  119. package/dist/src/components/readme_renderer/table_of_contents.d.ts.map +1 -1
  120. package/dist/src/components/readme_renderer/table_of_contents.js +16 -15
  121. package/dist/src/components/readme_renderer/table_of_contents.js.map +1 -1
  122. package/dist/src/components/readme_renderer/utils.d.ts.map +1 -1
  123. package/dist/src/components/readme_renderer/utils.js +6 -6
  124. package/dist/src/components/readme_renderer/utils.js.map +1 -1
  125. package/dist/src/components/select/select.d.ts.map +1 -1
  126. package/dist/src/components/select/select.js +14 -13
  127. package/dist/src/components/select/select.js.map +1 -1
  128. package/dist/src/components/shortcut.d.ts +1 -1
  129. package/dist/src/components/shortcut.d.ts.map +1 -1
  130. package/dist/src/components/shortcut.js +2 -2
  131. package/dist/src/components/shortcut.js.map +1 -1
  132. package/dist/src/components/simple_markdown/simple_markdown.d.ts.map +1 -1
  133. package/dist/src/components/simple_markdown/simple_markdown.js +32 -35
  134. package/dist/src/components/simple_markdown/simple_markdown.js.map +1 -1
  135. package/dist/src/components/simple_markdown/simple_markdown_components.d.ts.map +1 -1
  136. package/dist/src/components/simple_markdown/simple_markdown_components.js +26 -12
  137. package/dist/src/components/simple_markdown/simple_markdown_components.js.map +1 -1
  138. package/dist/src/components/spinner.d.ts.map +1 -1
  139. package/dist/src/components/spinner.js +3 -1
  140. package/dist/src/components/spinner.js.map +1 -1
  141. package/dist/src/components/store/store_actor_header.d.ts.map +1 -1
  142. package/dist/src/components/store/store_actor_header.js +1 -1
  143. package/dist/src/components/store/store_actor_header.js.map +1 -1
  144. package/dist/src/components/switch/switch.d.ts.map +1 -1
  145. package/dist/src/components/switch/switch.js +1 -1
  146. package/dist/src/components/switch/switch.js.map +1 -1
  147. package/dist/src/components/switch/switch.style.d.ts.map +1 -1
  148. package/dist/src/components/switch/switch.style.js +5 -3
  149. package/dist/src/components/switch/switch.style.js.map +1 -1
  150. package/dist/src/components/table/table.styled.js +3 -3
  151. package/dist/src/components/table/table.styled.js.map +1 -1
  152. package/dist/src/components/table/table_error_row.d.ts.map +1 -1
  153. package/dist/src/components/table/table_error_row.js +1 -1
  154. package/dist/src/components/table/table_error_row.js.map +1 -1
  155. package/dist/src/components/table/table_row.d.ts.map +1 -1
  156. package/dist/src/components/table/table_row.js +1 -1
  157. package/dist/src/components/table/table_row.js.map +1 -1
  158. package/dist/src/components/table/table_wrapper.d.ts.map +1 -1
  159. package/dist/src/components/table/table_wrapper.js +3 -3
  160. package/dist/src/components/table/table_wrapper.js.map +1 -1
  161. package/dist/src/components/tabs/tab.d.ts.map +1 -1
  162. package/dist/src/components/tabs/tab.js +7 -5
  163. package/dist/src/components/tabs/tab.js.map +1 -1
  164. package/dist/src/components/tabs/tabs.d.ts.map +1 -1
  165. package/dist/src/components/tabs/tabs.js +3 -3
  166. package/dist/src/components/tabs/tabs.js.map +1 -1
  167. package/dist/src/components/tag.d.ts +1 -1
  168. package/dist/src/components/tag.d.ts.map +1 -1
  169. package/dist/src/components/tag.js +1 -1
  170. package/dist/src/components/tag.js.map +1 -1
  171. package/dist/src/components/text/heading_content.d.ts.map +1 -1
  172. package/dist/src/components/text/heading_content.js +1 -1
  173. package/dist/src/components/text/heading_content.js.map +1 -1
  174. package/dist/src/components/text/heading_marketing.d.ts.map +1 -1
  175. package/dist/src/components/text/heading_marketing.js +1 -1
  176. package/dist/src/components/text/heading_marketing.js.map +1 -1
  177. package/dist/src/components/text/heading_shared.d.ts.map +1 -1
  178. package/dist/src/components/text/heading_shared.js +1 -1
  179. package/dist/src/components/text/heading_shared.js.map +1 -1
  180. package/dist/src/components/text/index.d.ts +1 -1
  181. package/dist/src/components/text/index.d.ts.map +1 -1
  182. package/dist/src/components/text/text_base.d.ts.map +1 -1
  183. package/dist/src/components/text/text_base.js +16 -12
  184. package/dist/src/components/text/text_base.js.map +1 -1
  185. package/dist/src/components/text/text_content.d.ts.map +1 -1
  186. package/dist/src/components/text/text_content.js +1 -1
  187. package/dist/src/components/text/text_content.js.map +1 -1
  188. package/dist/src/components/text/text_marketing.d.ts.map +1 -1
  189. package/dist/src/components/text/text_marketing.js +1 -1
  190. package/dist/src/components/text/text_marketing.js.map +1 -1
  191. package/dist/src/components/text/text_shared.d.ts +1 -1
  192. package/dist/src/components/text/text_shared.d.ts.map +1 -1
  193. package/dist/src/components/text/text_shared.js +1 -1
  194. package/dist/src/components/text/text_shared.js.map +1 -1
  195. package/dist/src/components/tile/horizontal_tile.d.ts.map +1 -1
  196. package/dist/src/components/tile/horizontal_tile.js +3 -2
  197. package/dist/src/components/tile/horizontal_tile.js.map +1 -1
  198. package/dist/src/components/tile/shared.d.ts +1 -1
  199. package/dist/src/components/tile/shared.d.ts.map +1 -1
  200. package/dist/src/components/tile/vertical_tile.d.ts.map +1 -1
  201. package/dist/src/components/tile/vertical_tile.js +3 -2
  202. package/dist/src/components/tile/vertical_tile.js.map +1 -1
  203. package/dist/src/components/to_consolidate/card.d.ts.map +1 -1
  204. package/dist/src/components/to_consolidate/card.js +20 -15
  205. package/dist/src/components/to_consolidate/card.js.map +1 -1
  206. package/dist/src/components/to_consolidate/markdown.d.ts.map +1 -1
  207. package/dist/src/components/to_consolidate/markdown.js +36 -20
  208. package/dist/src/components/to_consolidate/markdown.js.map +1 -1
  209. package/dist/src/components/to_consolidate/pagination.d.ts.map +1 -1
  210. package/dist/src/components/to_consolidate/pagination.js +6 -6
  211. package/dist/src/components/to_consolidate/pagination.js.map +1 -1
  212. package/dist/src/components/to_consolidate/tab_number_chip.d.ts.map +1 -1
  213. package/dist/src/components/to_consolidate/tab_number_chip.js +1 -1
  214. package/dist/src/components/to_consolidate/tab_number_chip.js.map +1 -1
  215. package/dist/src/design_system/theme.d.ts.map +1 -1
  216. package/dist/src/design_system/theme.js +1 -1
  217. package/dist/src/design_system/theme.js.map +1 -1
  218. package/dist/src/design_system/typography_theme.d.ts.map +1 -1
  219. package/dist/src/design_system/typography_theme.js.map +1 -1
  220. package/dist/src/ui_dependency_provider.d.ts.map +1 -1
  221. package/dist/src/ui_dependency_provider.js +2 -2
  222. package/dist/src/ui_dependency_provider.js.map +1 -1
  223. package/dist/tsconfig.build.tsbuildinfo +1 -1
  224. package/package.json +8 -6
  225. package/src/codemods/generate_typograpy_tokens_files.mjs +23 -28
  226. package/src/components/action_link.tsx +13 -23
  227. package/src/components/actor_template_card.stories.tsx +20 -14
  228. package/src/components/actor_template_card.tsx +4 -21
  229. package/src/components/avatar/actor_avatar.tsx +3 -4
  230. package/src/components/avatar/boring_avatar.tsx +134 -167
  231. package/src/components/avatar/user_avatar.stories.tsx +1 -5
  232. package/src/components/avatar/user_avatar.tsx +6 -20
  233. package/src/components/badge.stories.jsx +26 -40
  234. package/src/components/badge.tsx +37 -26
  235. package/src/components/banner.stories.tsx +10 -28
  236. package/src/components/banner.tsx +11 -14
  237. package/src/components/blog_article.tsx +6 -4
  238. package/src/components/box.tsx +90 -89
  239. package/src/components/breadcrumb/breadcrumb.stories.tsx +2 -8
  240. package/src/components/breadcrumb/breadcrumb.tsx +7 -5
  241. package/src/components/button.stories.tsx +70 -66
  242. package/src/components/button.tsx +33 -39
  243. package/src/components/card_container.stories.tsx +28 -29
  244. package/src/components/card_container.tsx +15 -10
  245. package/src/components/checkbox/checkbox.stories.tsx +52 -17
  246. package/src/components/checkbox/checkbox.style.ts +7 -4
  247. package/src/components/checkbox/checkbox.tsx +6 -9
  248. package/src/components/chip.stories.tsx +15 -5
  249. package/src/components/chip.tsx +26 -16
  250. package/src/components/code/action_button.tsx +10 -12
  251. package/src/components/code/code_block/code_block.stories.jsx +7 -25
  252. package/src/components/code/code_block/code_block.styled.tsx +26 -19
  253. package/src/components/code/code_block/code_block.tsx +26 -24
  254. package/src/components/code/code_block/code_block_with_tabs.stories.tsx +12 -18
  255. package/src/components/code/code_block/code_block_with_tabs.tsx +30 -16
  256. package/src/components/code/code_block/utils.tsx +23 -15
  257. package/src/components/code/inline_code/inline_code.stories.tsx +18 -10
  258. package/src/components/code/inline_code/inline_code.tsx +16 -21
  259. package/src/components/code/one_light_theme.ts +2 -17
  260. package/src/components/code/one_line_code/one_line_code.stories.tsx +31 -19
  261. package/src/components/code/one_line_code/one_line_code.tsx +19 -30
  262. package/src/components/code/prism_highlighter.tsx +117 -109
  263. package/src/components/code/prism_python.ts +4 -2
  264. package/src/components/collapsible_card/collapsible_card.stories.tsx +2 -1
  265. package/src/components/collapsible_card/collapsible_card.tsx +30 -15
  266. package/src/components/color_wheel_gradient.tsx +9 -7
  267. package/src/components/floating/floating_component_base.tsx +16 -9
  268. package/src/components/floating/menu.tsx +37 -46
  269. package/src/components/floating/menu_common.tsx +24 -30
  270. package/src/components/floating/menu_components.tsx +24 -24
  271. package/src/components/floating/tooltip.stories.jsx +85 -68
  272. package/src/components/floating/tooltip.tsx +32 -39
  273. package/src/components/floating/tooltip_content.tsx +8 -16
  274. package/src/components/icon_button.stories.tsx +176 -188
  275. package/src/components/icon_button.tsx +72 -58
  276. package/src/components/image.tsx +5 -11
  277. package/src/components/link.stories.tsx +4 -2
  278. package/src/components/link.tsx +70 -70
  279. package/src/components/message.stories.jsx +35 -33
  280. package/src/components/message.tsx +45 -45
  281. package/src/components/rating.tsx +37 -44
  282. package/src/components/readme_renderer/pythonize_value.ts +19 -7
  283. package/src/components/readme_renderer/table_of_contents.stories.tsx +40 -15
  284. package/src/components/readme_renderer/table_of_contents.tsx +87 -85
  285. package/src/components/readme_renderer/utils.tsx +17 -13
  286. package/src/components/select/select.stories.tsx +19 -46
  287. package/src/components/select/select.tsx +103 -101
  288. package/src/components/shortcut.stories.jsx +23 -14
  289. package/src/components/shortcut.tsx +2 -13
  290. package/src/components/simple_markdown/simple_markdown.stories.tsx +5 -10
  291. package/src/components/simple_markdown/simple_markdown.tsx +152 -55
  292. package/src/components/simple_markdown/simple_markdown_components.tsx +49 -59
  293. package/src/components/spinner.stories.tsx +14 -8
  294. package/src/components/spinner.tsx +5 -3
  295. package/src/components/store/store_actor_header.stories.tsx +2 -11
  296. package/src/components/store/store_actor_header.tsx +20 -16
  297. package/src/components/switch/switch.stories.jsx +4 -12
  298. package/src/components/switch/switch.style.ts +5 -3
  299. package/src/components/switch/switch.tsx +3 -13
  300. package/src/components/table/table.stories.tsx +5 -2
  301. package/src/components/table/table.styled.ts +3 -3
  302. package/src/components/table/table_error_row.tsx +5 -1
  303. package/src/components/table/table_row.tsx +1 -5
  304. package/src/components/table/table_wrapper.tsx +12 -12
  305. package/src/components/tabs/tab.stories.tsx +1 -5
  306. package/src/components/tabs/tab.tsx +33 -13
  307. package/src/components/tabs/tabs.tsx +14 -18
  308. package/src/components/tag.stories.jsx +35 -45
  309. package/src/components/tag.tsx +18 -22
  310. package/src/components/text/heading_content.stories.tsx +13 -24
  311. package/src/components/text/heading_content.tsx +3 -7
  312. package/src/components/text/heading_marketing.stories.tsx +4 -3
  313. package/src/components/text/heading_marketing.tsx +12 -8
  314. package/src/components/text/heading_shared.stories.tsx +3 -2
  315. package/src/components/text/heading_shared.tsx +3 -7
  316. package/src/components/text/index.ts +1 -3
  317. package/src/components/text/text_base.tsx +29 -35
  318. package/src/components/text/text_content.stories.tsx +17 -13
  319. package/src/components/text/text_content.tsx +20 -23
  320. package/src/components/text/text_marketing.stories.tsx +4 -3
  321. package/src/components/text/text_marketing.tsx +20 -23
  322. package/src/components/text/text_shared.stories.tsx +4 -3
  323. package/src/components/text/text_shared.tsx +23 -27
  324. package/src/components/tile/horizontal_tile.stories.tsx +6 -2
  325. package/src/components/tile/horizontal_tile.tsx +5 -15
  326. package/src/components/tile/shared.ts +5 -5
  327. package/src/components/tile/vertical_tile.stories.tsx +10 -18
  328. package/src/components/tile/vertical_tile.tsx +4 -9
  329. package/src/components/to_consolidate/card.stories.tsx +3 -1
  330. package/src/components/to_consolidate/card.tsx +67 -58
  331. package/src/components/to_consolidate/markdown.tsx +76 -62
  332. package/src/components/to_consolidate/pagination.tsx +11 -15
  333. package/src/components/to_consolidate/tab_number_chip.tsx +5 -6
  334. package/src/design_system/colors/build_color_tokens.js +7 -15
  335. package/src/design_system/theme.ts +1 -8
  336. package/src/design_system/tokens/radiuses.stories.tsx +9 -1
  337. package/src/design_system/tokens/shadows.stories.tsx +3 -1
  338. package/src/design_system/typography_theme.ts +78 -39
  339. package/src/ui_dependency_provider.tsx +16 -23
@@ -23,10 +23,10 @@ export interface TransientButtonProps {
23
23
  }
24
24
 
25
25
  export interface RegularButtonProps {
26
- trackingId?: string,
27
- trackingData?: Record<string, unknown>,
28
- LeftIcon?: React.ElementType,
29
- RightIcon?: React.ElementType,
26
+ trackingId?: string;
27
+ trackingData?: Record<string, unknown>;
28
+ LeftIcon?: React.ElementType;
29
+ RightIcon?: React.ElementType;
30
30
  disabled?: boolean;
31
31
  type?: ButtonType;
32
32
  }
@@ -48,34 +48,34 @@ function isAnchorButton(props: ButtonProps | AnchorButtonProps): props is Anchor
48
48
  type ButtonColorCombinations = {
49
49
  [Type in ButtonVariant]: {
50
50
  [Size in ButtonColor]: {
51
- textColor: string,
52
- borderColor: string
53
- backgroundColor: string,
51
+ textColor: string;
52
+ borderColor: string;
53
+ backgroundColor: string;
54
54
 
55
55
  // hover & active state effects
56
- actionTextColor?: string,
56
+ actionTextColor?: string;
57
57
  // only exception is primary outlined button
58
- actionBorderColor?: string
58
+ actionBorderColor?: string;
59
59
 
60
60
  // hover state effects override
61
- hoverColor?: string,
61
+ hoverColor?: string;
62
62
  // Optional gradient overlay on hover (e.g., for primaryBlack)
63
- hoverGradient?: string,
63
+ hoverGradient?: string;
64
64
 
65
65
  // active state effects override
66
- activeColor?: string,
67
- activeTextColor?: string,
68
- }
66
+ activeColor?: string;
67
+ activeTextColor?: string;
68
+ };
69
69
  };
70
70
  };
71
71
 
72
72
  type ButtonSizeCombinations = {
73
73
  [Size in ButtonSize]: {
74
- typography: string,
75
- size: number,
76
- horizontalPadding: number,
77
- borderRadius: string,
78
- iconSize: IconSize,
74
+ typography: string;
75
+ size: number;
76
+ horizontalPadding: number;
77
+ borderRadius: string;
78
+ iconSize: IconSize;
79
79
  };
80
80
  };
81
81
 
@@ -236,12 +236,13 @@ export const getButtonColorStyles = (variant: ButtonVariant = 'primary', color:
236
236
  &:hover {
237
237
  color: ${actionTextColor || textColor};
238
238
  ${hoverGradient
239
- ? css`
240
- background-image: ${hoverGradient};
241
- background-color: ${backgroundColor};
242
- `
243
- : css`background-color: ${hoverColor};`
244
- }
239
+ ? css`
240
+ background-image: ${hoverGradient};
241
+ background-color: ${backgroundColor};
242
+ `
243
+ : css`
244
+ background-color: ${hoverColor};
245
+ `}
245
246
  border-color: ${actionBorderColor || (hoverGradient ? borderColor : hoverColor)};
246
247
  }
247
248
 
@@ -263,12 +264,7 @@ export const getButtonColorStyles = (variant: ButtonVariant = 'primary', color:
263
264
  };
264
265
 
265
266
  export const getButtonSizeStyles = (size: ButtonSize = 'medium') => {
266
- const {
267
- typography,
268
- size: height,
269
- horizontalPadding,
270
- borderRadius,
271
- } = BUTTON_SIZE_VARIANTS_CSS[size];
267
+ const { typography, size: height, horizontalPadding, borderRadius } = BUTTON_SIZE_VARIANTS_CSS[size];
272
268
 
273
269
  return css`
274
270
  ${typography};
@@ -276,7 +272,6 @@ export const getButtonSizeStyles = (size: ButtonSize = 'medium') => {
276
272
  /* We just want to ensure padding on the sides. Height is set the the hard way for simplicity */
277
273
  padding: 0 ${horizontalPadding}px;
278
274
  border-radius: ${borderRadius};
279
-
280
275
  `;
281
276
  };
282
277
 
@@ -292,7 +287,9 @@ const StyledButton = styled(Box)<WithTransientProps<Required<TransientButtonProp
292
287
  /* Basic styles */
293
288
  white-space: nowrap;
294
289
  cursor: pointer;
295
- transition: border-color ${theme.transition.fastEaseOut}, background-color ${theme.transition.fastEaseOut};
290
+ transition:
291
+ border-color ${theme.transition.fastEaseOut},
292
+ background-color ${theme.transition.fastEaseOut};
296
293
 
297
294
  /* Border is always defined, but it can be set to transparent */
298
295
  border-style: solid;
@@ -322,10 +319,7 @@ export const Button = forwardRef<HTMLElement, ButtonProps | AnchorButtonProps>((
322
319
  ...rest
323
320
  } = props;
324
321
 
325
- const {
326
- trackClick,
327
- windowLocationHost,
328
- } = useSharedUiDependencies();
322
+ const { trackClick, windowLocationHost } = useSharedUiDependencies();
329
323
  const trackedOnClick = (e: React.MouseEvent) => {
330
324
  if (trackClick && trackingId) trackClick(trackingId, trackingData);
331
325
  if (onClick) onClick(e);
@@ -335,7 +329,7 @@ export const Button = forwardRef<HTMLElement, ButtonProps | AnchorButtonProps>((
335
329
 
336
330
  if (isAnchorButton(props)) {
337
331
  const isExternal = isUrlExternal(props.to, windowLocationHost);
338
- const EffectiveRightIcon = (isExternal && !props.hideExternalIcon) ? ExternalLinkIcon : RightIcon;
332
+ const EffectiveRightIcon = isExternal && !props.hideExternalIcon ? ExternalLinkIcon : RightIcon;
339
333
 
340
334
  return (
341
335
  <StyledButton
@@ -363,7 +357,7 @@ export const Button = forwardRef<HTMLElement, ButtonProps | AnchorButtonProps>((
363
357
  $size={size}
364
358
  $color={color}
365
359
  $variant={variant}
366
- forwardedAs={ as || 'button'}
360
+ forwardedAs={as || 'button'}
367
361
  ref={ref}
368
362
  onClick={trackedOnClick}
369
363
  type={type}
@@ -40,35 +40,34 @@ export const Default: Story = {
40
40
  header: 'Recently viewed',
41
41
  },
42
42
  render: (args: CardContainerProps) => {
43
- return <StoryWrapper>
44
- <CardContainer {...args} />
45
- <CardContainer {...args} headerPlacement='BOTTOM'/>
46
- <CardContainer
47
- {...args}
48
- header={<>
49
- <CardContainer.Heading>Test</CardContainer.Heading>
50
- <IconButton Icon={DragIndicatorIcon}/>
51
- </>}
52
- />
53
- <CardContainer
54
- {...args}
55
- header={
56
- <div>
57
- <CardContainer.Heading># Videos with this hashtag</CardContainer.Heading>
58
- <code style={{ marginLeft: 8 }}>Required</code>
59
- </div>
60
- }
61
- />
62
- <CardContainer
63
- {...args}
64
- header={<>
65
- Completely custom header content
66
- </>}
67
- />
68
- <CardContainer {...args} header={null}>
69
- Content without header
70
- </CardContainer>
71
- </StoryWrapper>;
43
+ return (
44
+ <StoryWrapper>
45
+ <CardContainer {...args} />
46
+ <CardContainer {...args} headerPlacement="BOTTOM" />
47
+ <CardContainer
48
+ {...args}
49
+ header={
50
+ <>
51
+ <CardContainer.Heading>Test</CardContainer.Heading>
52
+ <IconButton Icon={DragIndicatorIcon} />
53
+ </>
54
+ }
55
+ />
56
+ <CardContainer
57
+ {...args}
58
+ header={
59
+ <div>
60
+ <CardContainer.Heading># Videos with this hashtag</CardContainer.Heading>
61
+ <code style={{ marginLeft: 8 }}>Required</code>
62
+ </div>
63
+ }
64
+ />
65
+ <CardContainer {...args} header={<>Completely custom header content</>} />
66
+ <CardContainer {...args} header={null}>
67
+ Content without header
68
+ </CardContainer>
69
+ </StoryWrapper>
70
+ );
72
71
  },
73
72
  play: async ({ canvasElement }) => {
74
73
  const headers = canvasElement.querySelectorAll(`.${cardContainerClassNames.HEADER}`);
@@ -25,19 +25,24 @@ const getContentPadding = (contentPadding?: ContentPaddingValue) => {
25
25
  return theme.space.space16;
26
26
  };
27
27
 
28
- const Wrapper = styled(Box)<{ $headerPlacement: ValueOf<typeof HEADER_PLACEMENT>; $contentPadding?: ContentPaddingValue }>`
28
+ const Wrapper = styled(Box)<{
29
+ $headerPlacement: ValueOf<typeof HEADER_PLACEMENT>;
30
+ $contentPadding?: ContentPaddingValue;
31
+ }>`
29
32
  background-color: ${theme.color.neutral.backgroundSubtle};
30
33
  border-radius: ${theme.radius.radius12};
31
34
 
32
35
  padding: ${theme.space.space2};
33
36
 
34
37
  display: flex;
35
- flex-direction: ${({ $headerPlacement }) => ($headerPlacement === HEADER_PLACEMENT.TOP ? 'column' : 'column-reverse')};
38
+ flex-direction: ${({ $headerPlacement }) =>
39
+ $headerPlacement === HEADER_PLACEMENT.TOP ? 'column' : 'column-reverse'};
36
40
 
37
41
  .${cardContainerClassNames.CONTENT} {
38
42
  /* 11px inner radius to match Figma (outer 12px - 1px visual offset) */
39
43
  border-radius: 1.1rem;
40
- background-color: ${({ $contentPadding }) => ($contentPadding === 'none' ? 'transparent' : theme.color.neutral.background)};
44
+ background-color: ${({ $contentPadding }) =>
45
+ $contentPadding === 'none' ? 'transparent' : theme.color.neutral.background};
41
46
  ${({ $contentPadding }) => $contentPadding === 'none' && 'overflow: hidden;'}
42
47
 
43
48
  padding: ${({ $contentPadding }) => getContentPadding($contentPadding)};
@@ -52,17 +57,19 @@ const Wrapper = styled(Box)<{ $headerPlacement: ValueOf<typeof HEADER_PLACEMENT>
52
57
  }
53
58
  `;
54
59
 
55
- const CardContainerHeading = styled.span`${theme.typography.shared.desktop.bodyMMedium}`;
60
+ const CardContainerHeading = styled.span`
61
+ ${theme.typography.shared.desktop.bodyMMedium}
62
+ `;
56
63
 
57
64
  export type CardContainerProps = BoxProps & {
58
65
  /** The header can be placed on the bottom of the card or on the top. */
59
- headerPlacement?: ValueOf<typeof HEADER_PLACEMENT>,
66
+ headerPlacement?: ValueOf<typeof HEADER_PLACEMENT>;
60
67
  /**
61
68
  * If string is passed, the correct styles are applied automatically.
62
69
  * In case of custom component, use `CardContainer.Heading` component to get the same styles.
63
70
  * Pass `null` to render without a header section.
64
71
  */
65
- header: React.ReactNode,
72
+ header: React.ReactNode;
66
73
  /**
67
74
  * Controls the padding of the content area. Accepts a space token or `'none'`.
68
75
  * When set to `'none'`, padding is removed, the content background becomes transparent
@@ -70,7 +77,7 @@ export type CardContainerProps = BoxProps & {
70
77
  * Other values (e.g. `'space8'`) change the padding but keep the white background.
71
78
  * Defaults to `space16` with white background when not provided.
72
79
  */
73
- contentPadding?: ContentPaddingValue,
80
+ contentPadding?: ContentPaddingValue;
74
81
  };
75
82
 
76
83
  /**
@@ -91,9 +98,7 @@ export const CardContainer = ({
91
98
  {typeof header === 'string' ? <CardContainerHeading>{header}</CardContainerHeading> : header}
92
99
  </div>
93
100
  )}
94
- <div className={cardContainerClassNames.CONTENT}>
95
- {children}
96
- </div>
101
+ <div className={cardContainerClassNames.CONTENT}>{children}</div>
97
102
  </Wrapper>
98
103
  );
99
104
 
@@ -20,7 +20,10 @@ const Row = styled.div`
20
20
  gap: 0.8rem;
21
21
  `;
22
22
 
23
- type ControlledCheckboxProps = { initialValue?: boolean } & Omit<ComponentProps<typeof CheckboxPrimitive>, 'value' | 'setValue'>;
23
+ type ControlledCheckboxProps = { initialValue?: boolean } & Omit<
24
+ ComponentProps<typeof CheckboxPrimitive>,
25
+ 'value' | 'setValue'
26
+ >;
24
27
 
25
28
  const ControlledCheckbox = ({ initialValue = false, ...props }: ControlledCheckboxProps) => {
26
29
  const [value, setValue] = useState(initialValue);
@@ -29,13 +32,27 @@ const ControlledCheckbox = ({ initialValue = false, ...props }: ControlledCheckb
29
32
 
30
33
  export const States = () => (
31
34
  <Grid>
32
- <Row><ControlledCheckbox /> Unchecked</Row>
33
- <Row><ControlledCheckbox initialValue /> Checked</Row>
34
- <Row><ControlledCheckbox disabled /> Disabled</Row>
35
- <Row><ControlledCheckbox initialValue disabled /> Checked & disabled</Row>
36
- <Row><ControlledCheckbox readOnly initialValue /> Checked & readonly</Row>
37
- <Row><ControlledCheckbox error="Some error" /> Error</Row>
38
- <Row><ControlledCheckbox initialValue error="Some error" /> Checked + error</Row>
35
+ <Row>
36
+ <ControlledCheckbox /> Unchecked
37
+ </Row>
38
+ <Row>
39
+ <ControlledCheckbox initialValue /> Checked
40
+ </Row>
41
+ <Row>
42
+ <ControlledCheckbox disabled /> Disabled
43
+ </Row>
44
+ <Row>
45
+ <ControlledCheckbox initialValue disabled /> Checked & disabled
46
+ </Row>
47
+ <Row>
48
+ <ControlledCheckbox readOnly initialValue /> Checked & readonly
49
+ </Row>
50
+ <Row>
51
+ <ControlledCheckbox error="Some error" /> Error
52
+ </Row>
53
+ <Row>
54
+ <ControlledCheckbox initialValue error="Some error" /> Checked + error
55
+ </Row>
39
56
  </Grid>
40
57
  );
41
58
 
@@ -59,19 +76,37 @@ export const Indeterminate = () => {
59
76
  </Row>
60
77
 
61
78
  <SectionLabel>Indeterminate</SectionLabel>
62
- <Row><IndeterminateCheckbox value={null} setValue={() => {}} /> Default</Row>
63
- <Row><IndeterminateCheckbox value={null} setValue={() => {}} disabled /> Disabled</Row>
64
- <Row><IndeterminateCheckbox value={null} setValue={() => {}} error="Some error" /> Error</Row>
79
+ <Row>
80
+ <IndeterminateCheckbox value={null} setValue={() => {}} /> Default
81
+ </Row>
82
+ <Row>
83
+ <IndeterminateCheckbox value={null} setValue={() => {}} disabled /> Disabled
84
+ </Row>
85
+ <Row>
86
+ <IndeterminateCheckbox value={null} setValue={() => {}} error="Some error" /> Error
87
+ </Row>
65
88
 
66
89
  <SectionLabel>Checked</SectionLabel>
67
- <Row><IndeterminateCheckbox value={true} setValue={() => {}} /> Default</Row>
68
- <Row><IndeterminateCheckbox value={true} setValue={() => {}} disabled /> Disabled</Row>
69
- <Row><IndeterminateCheckbox value={true} setValue={() => {}} error="Some error" /> Error</Row>
90
+ <Row>
91
+ <IndeterminateCheckbox value={true} setValue={() => {}} /> Default
92
+ </Row>
93
+ <Row>
94
+ <IndeterminateCheckbox value={true} setValue={() => {}} disabled /> Disabled
95
+ </Row>
96
+ <Row>
97
+ <IndeterminateCheckbox value={true} setValue={() => {}} error="Some error" /> Error
98
+ </Row>
70
99
 
71
100
  <SectionLabel>Unchecked</SectionLabel>
72
- <Row><IndeterminateCheckbox value={false} setValue={() => {}} /> Default</Row>
73
- <Row><IndeterminateCheckbox value={false} setValue={() => {}} disabled /> Disabled</Row>
74
- <Row><IndeterminateCheckbox value={false} setValue={() => {}} error="Some error" /> Error</Row>
101
+ <Row>
102
+ <IndeterminateCheckbox value={false} setValue={() => {}} /> Default
103
+ </Row>
104
+ <Row>
105
+ <IndeterminateCheckbox value={false} setValue={() => {}} disabled /> Disabled
106
+ </Row>
107
+ <Row>
108
+ <IndeterminateCheckbox value={false} setValue={() => {}} error="Some error" /> Error
109
+ </Row>
75
110
  </Grid>
76
111
  );
77
112
  };
@@ -14,9 +14,12 @@ export const checkboxStyle = css`
14
14
  height: 16px;
15
15
  position: relative;
16
16
  box-sizing: border-box;
17
- transition: border-color 120ms ease-out, background-color 120ms ease-out !important;
17
+ transition:
18
+ border-color 120ms ease-out,
19
+ background-color 120ms ease-out !important;
18
20
 
19
- &:hover, &:focus {
21
+ &:hover,
22
+ &:focus {
20
23
  border-color: ${theme.color.primary.action};
21
24
  cursor: pointer;
22
25
  }
@@ -30,8 +33,8 @@ export const checkboxStyle = css`
30
33
  border-color: ${theme.color.danger.text};
31
34
  }
32
35
 
33
- &[data-state="indeterminate"],
34
- &[data-state="checked"] {
36
+ &[data-state='indeterminate'],
37
+ &[data-state='checked'] {
35
38
  background-color: ${theme.color.primary.action};
36
39
  border-color: ${theme.color.primary.action};
37
40
 
@@ -3,9 +3,7 @@ import clsx from 'clsx';
3
3
  import { type ComponentPropsWithoutRef, type FC } from 'react';
4
4
  import styled from 'styled-components';
5
5
 
6
- import {
7
- CheckIcon, MinusIcon,
8
- } from '@apify/ui-icons';
6
+ import { CheckIcon, MinusIcon } from '@apify/ui-icons';
9
7
 
10
8
  import { theme } from '../../design_system/theme.js';
11
9
  import { checkboxStyle } from './checkbox.style.js';
@@ -31,7 +29,10 @@ const IndeterminateIndicator = styled(StyledIndicator)`
31
29
  color: ${theme.color.neutral.textOnPrimary};
32
30
  `;
33
31
 
34
- type CheckboxBaseProps = Omit<ComponentPropsWithoutRef<typeof CheckboxPrimitiveReact.Root>, 'checked' | 'onCheckedChange' | 'value'> & {
32
+ type CheckboxBaseProps = Omit<
33
+ ComponentPropsWithoutRef<typeof CheckboxPrimitiveReact.Root>,
34
+ 'checked' | 'onCheckedChange' | 'value'
35
+ > & {
35
36
  setValue: (checked: boolean) => void;
36
37
  error?: string;
37
38
  disabled?: boolean;
@@ -56,11 +57,7 @@ const InternalCheckbox: FC<IndeterminateCheckboxProps> = ({
56
57
  checked={value == null ? 'indeterminate' : value}
57
58
  onCheckedChange={setValue}
58
59
  disabled={disabled || readOnly}
59
- className={clsx(
60
- className,
61
- error && 'error',
62
- (disabled || readOnly) && 'disabled',
63
- )}
60
+ className={clsx(className, error && 'error', (disabled || readOnly) && 'disabled')}
64
61
  >
65
62
  {children}
66
63
  </StyledCheckbox>
@@ -291,11 +291,21 @@ export const AllSizes: Story = {
291
291
  export const WithVariousIcons: Story = {
292
292
  render: () => (
293
293
  <div style={{ display: 'flex', gap: '8px', flexWrap: 'wrap' }}>
294
- <Chip type={CHIP_TYPES.SUCCESS} icon={mockIcons.check}>Approved</Chip>
295
- <Chip type={CHIP_TYPES.WARNING} icon={mockIcons.warning}>Pending</Chip>
296
- <Chip type={CHIP_TYPES.DANGER} icon={mockIcons.error}>Failed</Chip>
297
- <Chip type={CHIP_TYPES.PRIMARY} icon={mockIcons.heart}>Favorite</Chip>
298
- <Chip type={CHIP_TYPES.DEFAULT} icon={mockIcons.info}>Info</Chip>
294
+ <Chip type={CHIP_TYPES.SUCCESS} icon={mockIcons.check}>
295
+ Approved
296
+ </Chip>
297
+ <Chip type={CHIP_TYPES.WARNING} icon={mockIcons.warning}>
298
+ Pending
299
+ </Chip>
300
+ <Chip type={CHIP_TYPES.DANGER} icon={mockIcons.error}>
301
+ Failed
302
+ </Chip>
303
+ <Chip type={CHIP_TYPES.PRIMARY} icon={mockIcons.heart}>
304
+ Favorite
305
+ </Chip>
306
+ <Chip type={CHIP_TYPES.DEFAULT} icon={mockIcons.info}>
307
+ Info
308
+ </Chip>
299
309
  </div>
300
310
  ),
301
311
  };
@@ -80,7 +80,7 @@ const chipTypeStyle = {
80
80
  `,
81
81
  } satisfies Record<CHIP_TYPES, unknown>;
82
82
 
83
- const StyledChip = styled.span<{ size: CHIP_SIZES, type: CHIP_TYPES, clickable: boolean }>`
83
+ const StyledChip = styled.span<{ size: CHIP_SIZES; type: CHIP_TYPES; clickable: boolean }>`
84
84
  ${({ size }) => chipSizeStyle[size]};
85
85
  ${({ type }) => chipTypeStyle[type]};
86
86
  /* Static styles */
@@ -96,28 +96,38 @@ const StyledChip = styled.span<{ size: CHIP_SIZES, type: CHIP_TYPES, clickable:
96
96
  `;
97
97
 
98
98
  export type ChipProps = RegularBoxProps & {
99
- type?: CHIP_TYPES
100
- size?: CHIP_SIZES
101
- icon?: React.ReactNode
102
- clickable?: boolean
99
+ type?: CHIP_TYPES;
100
+ size?: CHIP_SIZES;
101
+ icon?: React.ReactNode;
102
+ clickable?: boolean;
103
103
  };
104
104
 
105
105
  /**
106
106
  * Component for displaying status and for labelling other components.
107
107
  * @deprecated Use Tag or Badge
108
108
  */
109
- export const Chip = forwardRef(({
110
- type = CHIP_TYPES.DEFAULT,
111
- size = CHIP_SIZES.MEDIUM,
112
- icon,
113
- children,
114
- className,
115
- ...passThroughProps
116
- }: ChipProps, ref) => {
117
- const otherProps = { ...passThroughProps, type, size, className: clsx(className, classNames.BODY) };
109
+ export const Chip = forwardRef(
110
+ (
111
+ {
112
+ type = CHIP_TYPES.DEFAULT,
113
+ size = CHIP_SIZES.MEDIUM,
114
+ icon,
115
+ children,
116
+ className,
117
+ ...passThroughProps
118
+ }: ChipProps,
119
+ ref,
120
+ ) => {
121
+ const otherProps = { ...passThroughProps, type, size, className: clsx(className, classNames.BODY) };
118
122
 
119
- return <StyledChip ref={ref} {...otherProps}>{children}{icon}</StyledChip>;
120
- });
123
+ return (
124
+ <StyledChip ref={ref} {...otherProps}>
125
+ {children}
126
+ {icon}
127
+ </StyledChip>
128
+ );
129
+ },
130
+ );
121
131
 
122
132
  Chip.displayName = 'Chip';
123
133
 
@@ -38,8 +38,9 @@ const StyledButton = styled.button<StyledButtonProps>`
38
38
  height: 2rem;
39
39
  }
40
40
 
41
- ${({ $hasText }) => $hasText
42
- && css`
41
+ ${({ $hasText }) =>
42
+ $hasText &&
43
+ css`
43
44
  width: auto;
44
45
  padding: ${theme.space.space4} ${theme.space.space8};
45
46
  p {
@@ -47,8 +48,9 @@ const StyledButton = styled.button<StyledButtonProps>`
47
48
  }
48
49
  `}
49
50
 
50
- ${({ $successStyle }) => $successStyle
51
- && css`
51
+ ${({ $successStyle }) =>
52
+ $successStyle &&
53
+ css`
52
54
  background-color: ${theme.color.success.action};
53
55
  color: ${theme.color.neutral.textOnPrimary};
54
56
  border: none;
@@ -86,12 +88,7 @@ export const ActionButton = ({
86
88
  };
87
89
 
88
90
  return (
89
- <StyledButton
90
- $successStyle={successStyle}
91
- $hasText={hasText}
92
- onClick={trackedOnClick}
93
- {...props}
94
- >
91
+ <StyledButton $successStyle={successStyle} $hasText={hasText} onClick={trackedOnClick} {...props}>
95
92
  {hasText ? <Text weight="bold">{children}</Text> : children}
96
93
  </StyledButton>
97
94
  );
@@ -108,9 +105,10 @@ export const CopyButton = ({ code, ...props }: CopyButtonProps) => {
108
105
  return (
109
106
  <ActionButton
110
107
  onClick={async () => copyToClipboard(code)}
111
- data-test='copy_to_clipboard'
108
+ data-test="copy_to_clipboard"
112
109
  aria-label="Copy to clipboard"
113
- {...props}>
110
+ {...props}
111
+ >
114
112
  {isCopied ? <CheckIcon size="16" /> : <CopyIcon size="16" />}
115
113
  </ActionButton>
116
114
  );
@@ -14,10 +14,9 @@ export default {
14
14
  };
15
15
 
16
16
  const Template = ({ content, ...args }) => {
17
- const longCode = `${Array.from(
18
- { length: 20 },
19
- () => content.split('\n')[1],
20
- ).join(' ')}\n${Array.from({ length: 10 }, () => content).join('\n')}`;
17
+ const longCode = `${Array.from({ length: 20 }, () => content.split('\n')[1]).join(
18
+ ' ',
19
+ )}\n${Array.from({ length: 10 }, () => content).join('\n')}`;
21
20
  const multipleCodes = Array.from({ length: 5 }, (_, i) => ({
22
21
  key: i,
23
22
  label: `Code ${i}`,
@@ -43,11 +42,7 @@ const Template = ({ content, ...args }) => {
43
42
  <h2>CodeBlock</h2>
44
43
  <CodeBlock content={content} {...args} />
45
44
  <h2>CodeBlock with title</h2>
46
- <CodeBlock title="What a code"
47
-
48
- content={content}
49
- {...args}
50
- />
45
+ <CodeBlock title="What a code" content={content} {...args} />
51
46
  <h2>CodeBlock with gradient, dots and action</h2>
52
47
  <CodeBlock
53
48
  content={content}
@@ -58,25 +53,12 @@ const Template = ({ content, ...args }) => {
58
53
  {...args}
59
54
  />
60
55
  <h2>CodeBlock with long lines, action and gradient</h2>
61
- <CodeBlock
62
- content={longCode}
63
- showGradient
64
- showActionButton
65
- {...args}
66
- />
56
+ <CodeBlock content={longCode} showGradient showActionButton {...args} />
67
57
 
68
58
  <h2>CodeBlock with multiple long codes, highlighted lines, action and gradient</h2>
69
- <CodeBlock
70
- content={multipleLongCodes}
71
- showGradient
72
- showActionButton
73
- {...args}
74
- />
59
+ <CodeBlock content={multipleLongCodes} showGradient showActionButton {...args} />
75
60
  <h2>CodeBlock with multiple codes</h2>
76
- <CodeBlock
77
- content={multipleCodes}
78
- {...args}
79
- />
61
+ <CodeBlock content={multipleCodes} {...args} />
80
62
  </div>
81
63
  );
82
64
  };