@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
@@ -17,14 +17,22 @@ export const SyntaxHighlighterBaseStylesWrapper = styled(Box)<SyntaxHighlighterB
17
17
  overflow: hidden;
18
18
 
19
19
  width: 100%;
20
- ${({ $fullWidth }) => !$fullWidth && css`max-width: 860px;`}
21
- ${({ $fullHeight }) => !$fullHeight && css`max-height: 600px;`}
20
+ ${({ $fullWidth }) =>
21
+ !$fullWidth &&
22
+ css`
23
+ max-width: 860px;
24
+ `}
25
+ ${({ $fullHeight }) =>
26
+ !$fullHeight &&
27
+ css`
28
+ max-height: 600px;
29
+ `}
22
30
 
23
31
  background-color: transparent;
24
32
  position: relative;
25
33
  `;
26
34
 
27
- export const CodeBlockWrapper = styled(SyntaxHighlighterBaseStylesWrapper) <{
35
+ export const CodeBlockWrapper = styled(SyntaxHighlighterBaseStylesWrapper)<{
28
36
  $hasHeader: boolean;
29
37
  $gradientRotation?: number;
30
38
  $highlightLines?: number[];
@@ -33,7 +41,7 @@ export const CodeBlockWrapper = styled(SyntaxHighlighterBaseStylesWrapper) <{
33
41
  $fullWidth?: boolean;
34
42
  $showLineNumbers?: boolean;
35
43
  $fullHeight?: boolean;
36
- size?: SharedTextSize,
44
+ size?: SharedTextSize;
37
45
  }>`
38
46
  position: relative;
39
47
  display: flex;
@@ -91,7 +99,6 @@ export const CodeBlockWrapper = styled(SyntaxHighlighterBaseStylesWrapper) <{
91
99
  overflow: hidden;
92
100
  }
93
101
 
94
-
95
102
  &.selected {
96
103
  color: ${theme.color.neutral.text};
97
104
  border: 1px solid ${theme.color.neutral.border};
@@ -124,31 +131,31 @@ export const CodeBlockWrapper = styled(SyntaxHighlighterBaseStylesWrapper) <{
124
131
  }
125
132
  }
126
133
 
127
-
128
134
  .CodeBlock-TopRightActionsWrapper {
129
135
  position: absolute;
130
136
  top: 0;
131
137
  right: 0;
132
- ${({ $hasHeader }) => ($hasHeader
133
- ? css`
134
- padding-top: 6px;
135
- padding-right: ${theme.space.space8};`
136
- : css`
137
- padding-top: ${theme.space.space16};
138
- padding-right: ${theme.space.space16};`)}
138
+ ${({ $hasHeader }) =>
139
+ $hasHeader
140
+ ? css`
141
+ padding-top: 6px;
142
+ padding-right: ${theme.space.space8};
143
+ `
144
+ : css`
145
+ padding-top: ${theme.space.space16};
146
+ padding-right: ${theme.space.space16};
147
+ `}
139
148
 
140
149
  display: flex;
141
150
  gap: ${theme.space.space8};
142
151
  z-index: 3;
143
152
  height: 3.9rem;
144
153
 
145
- ${({ $hasHeader }) => $hasHeader && css`
154
+ ${({ $hasHeader }) =>
155
+ $hasHeader &&
156
+ css`
146
157
  padding-left: ${theme.space.space32};
147
- background: linear-gradient(
148
- to right,
149
- transparent,
150
- ${theme.color.neutral.backgroundSubtle} 20px
151
- );
158
+ background: linear-gradient(to right, transparent, ${theme.color.neutral.backgroundSubtle} 20px);
152
159
  `}
153
160
  }
154
161
 
@@ -31,7 +31,19 @@ type HeaderProps = {
31
31
  showBashHeader?: boolean;
32
32
  };
33
33
 
34
- const LANGUAGES_WITHOUT_LINE_NUMBERS = ['json', 'jsonp', 'jsonp', 'rss', 'yaml', 'xml', 'html', 'bash', 'text', 'dockerfile', 'http'];
34
+ const LANGUAGES_WITHOUT_LINE_NUMBERS = [
35
+ 'json',
36
+ 'jsonp',
37
+ 'jsonp',
38
+ 'rss',
39
+ 'yaml',
40
+ 'xml',
41
+ 'html',
42
+ 'bash',
43
+ 'text',
44
+ 'dockerfile',
45
+ 'http',
46
+ ];
35
47
 
36
48
  const HeaderDots = () => {
37
49
  return (
@@ -43,15 +55,9 @@ const HeaderDots = () => {
43
55
  );
44
56
  };
45
57
 
46
- const Header = ({
47
- tabs,
48
- currentTab,
49
- showBashHeader,
50
- onTabChange,
51
- title,
52
- }: HeaderProps) => {
58
+ const Header = ({ tabs, currentTab, showBashHeader, onTabChange, title }: HeaderProps) => {
53
59
  return (
54
- <div className="CodeBlock-Header">
60
+ <div className="CodeBlock-Header" data-test="code-block-header">
55
61
  {showBashHeader && <HeaderDots />}
56
62
  {title && (
57
63
  <Text weight="bold" className="CodeBlock-HeaderTitle">
@@ -63,14 +69,13 @@ const Header = ({
63
69
  const selected = tab.key === currentTab?.key;
64
70
  const props = {
65
71
  className: clsx('CodeBlock-Tab', { selected }),
72
+ 'data-test': `code-block-tab-${tab.key}`,
66
73
  onClick: (e: React.MouseEvent) => onTabChange(tab, e),
67
74
  title: tab.label,
68
75
  id: tab.id ?? tab.key,
69
76
  };
70
77
 
71
- const label = <Text weight={tab.key === currentTab?.key ? 'bold' : 'normal'}>
72
- {tab.label}
73
- </Text>;
78
+ const label = <Text weight={tab.key === currentTab?.key ? 'bold' : 'normal'}>{tab.label}</Text>;
74
79
 
75
80
  if (tab.to) {
76
81
  return (
@@ -136,15 +141,13 @@ export const CodeBlock = ({
136
141
  ...rest
137
142
  }: CodeBlockProps) => {
138
143
  const isMultiTab = content instanceof Array;
139
- const defaultTab = isMultiTab
140
- ? content.find((tab) => tab.key === defaultTabKey) ?? content[0]
141
- : null;
144
+ const defaultTab = isMultiTab ? (content.find((tab) => tab.key === defaultTabKey) ?? content[0]) : null;
142
145
  const [currentTab, setCurrentTab] = useState<CodeTab | null>(defaultTab);
143
146
  const currentCode = (isMultiTab ? currentTab?.code : content)?.trim() ?? '';
144
147
  const currentLanguage = language ?? currentTab?.language;
145
148
 
146
149
  const currentHighlightLines = useMemo(
147
- () => (isMultiTab ? currentTab?.highlightLines ?? [] : highlightLines),
150
+ () => (isMultiTab ? (currentTab?.highlightLines ?? []) : highlightLines),
148
151
  [isMultiTab, currentTab, highlightLines],
149
152
  );
150
153
 
@@ -210,16 +213,15 @@ export const CodeBlock = ({
210
213
  />
211
214
 
212
215
  <div className="CodeBlock-TopRightActionsWrapper">
213
- {showActionButton && <ActionButton successStyle onClick={onActionButtonClick}>{actionButtonLabel ?? 'Run on Apify'}</ActionButton>}
216
+ {showActionButton && (
217
+ <ActionButton successStyle onClick={onActionButtonClick}>
218
+ {actionButtonLabel ?? 'Run on Apify'}
219
+ </ActionButton>
220
+ )}
214
221
  {!hideCopyButton && <CopyButton code={currentCode} />}
215
222
  </div>
216
223
 
217
- {showGradient && (
218
- <ColorWheelGradient
219
- className="CodeBlock-Gradient"
220
- blurSize={69}
221
- />
222
- )}
223
- </CodeBlockWrapper >
224
+ {showGradient && <ColorWheelGradient className="CodeBlock-Gradient" blurSize={69} />}
225
+ </CodeBlockWrapper>
224
226
  );
225
227
  };
@@ -1,13 +1,8 @@
1
1
  import { useMemo, useState } from 'react';
2
2
  import styled from 'styled-components';
3
3
 
4
- import {
5
- theme,
6
- } from '../../../design_system/theme.js';
7
- import {
8
- type CodeBlockTabKey,
9
- CodeBlockWithTabs, type CodeBlockWithTabsProps,
10
- } from './code_block_with_tabs.js';
4
+ import { theme } from '../../../design_system/theme.js';
5
+ import { type CodeBlockTabKey, CodeBlockWithTabs, type CodeBlockWithTabsProps } from './code_block_with_tabs.js';
11
6
 
12
7
  export default {
13
8
  title: 'UI-Library/Code/CodeBlockWithTabs',
@@ -34,18 +29,18 @@ const Container = styled.div`
34
29
 
35
30
  export const Default = ({ tabs, ...args }: Omit<CodeBlockWithTabsProps, 'currentTabKey'>) => {
36
31
  const [currentTabKey, setCurrentTabKey] = useState(tabs[0]?.key);
37
- const extendedTabs = useMemo(() => tabs.map((tab) => ({
38
- ...tab,
39
- onClick: () => setCurrentTabKey(tab.key),
40
- })), [tabs]);
32
+ const extendedTabs = useMemo(
33
+ () =>
34
+ tabs.map((tab) => ({
35
+ ...tab,
36
+ onClick: () => setCurrentTabKey(tab.key),
37
+ })),
38
+ [tabs],
39
+ );
41
40
 
42
41
  return (
43
42
  <Container>
44
- <CodeBlockWithTabs
45
- currentTabKey={currentTabKey as CodeBlockTabKey}
46
- tabs={extendedTabs}
47
- {...args}
48
- />
43
+ <CodeBlockWithTabs currentTabKey={currentTabKey as CodeBlockTabKey} tabs={extendedTabs} {...args} />
49
44
  </Container>
50
45
  );
51
46
  };
@@ -74,8 +69,7 @@ console.log(c);`,
74
69
  const a: number = 1;
75
70
  const b: number = 2;
76
71
  const c: number = a + b;
77
- console.log(c);`
78
- ,
72
+ console.log(c);`,
79
73
  },
80
74
  ],
81
75
  };
@@ -64,7 +64,10 @@ export const CODE_BLOCK_TAB_CATALOG: Record<CodeBlockTabKey, CodeBlockTabConfig>
64
64
 
65
65
  type SharedBoxProps = Omit<RegularBoxProps, 'as' | 'children' | 'onClick'> & MarginSpacingProps;
66
66
 
67
- type SharedCodeBlockProps = Omit<CodeBlockProps, 'bashCommandsStart' | 'content' | 'language' | 'defaultTabKey' | 'onTabChange'>;
67
+ type SharedCodeBlockProps = Omit<
68
+ CodeBlockProps,
69
+ 'bashCommandsStart' | 'content' | 'language' | 'defaultTabKey' | 'onTabChange'
70
+ >;
68
71
  type SharedLinkProps = Pick<RegularLinkProps, 'to' | 'rel' | 'target'>;
69
72
 
70
73
  export type CodeBlockTabProps = {
@@ -105,7 +108,7 @@ const CodeBlockWithTabsWrapper = styled(Box)`
105
108
  border-top-left-radius: ${theme.radius.radius12};
106
109
  position: relative;
107
110
 
108
- & > [role="tabpanel"] {
111
+ & > [role='tabpanel'] {
109
112
  position: sticky;
110
113
  right: 0;
111
114
  top: 0;
@@ -117,7 +120,11 @@ const CodeBlockWithTabsWrapper = styled(Box)`
117
120
  right: -${theme.space.space8};
118
121
  height: 100%;
119
122
  width: ${theme.space.space16};
120
- background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, ${theme.color.neutral.backgroundSubtle} 100%);
123
+ background: linear-gradient(
124
+ 90deg,
125
+ rgba(255, 255, 255, 0) 0%,
126
+ ${theme.color.neutral.backgroundSubtle} 100%
127
+ );
121
128
  content: ' ';
122
129
  pointer-events: none;
123
130
  position: absolute;
@@ -130,7 +137,7 @@ const CodeBlockWithTabsWrapper = styled(Box)`
130
137
  gap: ${theme.space.space24};
131
138
  padding-inline: ${theme.space.space24};
132
139
 
133
- & > [role="tabpanel"] {
140
+ & > [role='tabpanel'] {
134
141
  margin-left: unset;
135
142
 
136
143
  &::after {
@@ -159,7 +166,7 @@ const CodeBlockWithTabsWrapper = styled(Box)`
159
166
  height: 20px;
160
167
  }
161
168
 
162
- [role="tabpanel"] {
169
+ [role='tabpanel'] {
163
170
  bottom: 0;
164
171
  width: 100%;
165
172
  height: 2px;
@@ -174,7 +181,7 @@ const CodeBlockWithTabsWrapper = styled(Box)`
174
181
  &.selected {
175
182
  color: ${theme.color.neutral.text};
176
183
 
177
- [role="tabpanel"] {
184
+ [role='tabpanel'] {
178
185
  display: block;
179
186
  }
180
187
  }
@@ -197,7 +204,14 @@ const IMG_RESIZE = {
197
204
  height: 20,
198
205
  };
199
206
 
200
- export const CodeBlockWithTabs = ({ className, codeBlockProps, currentTabKey, tabs, optimisticCurrentTabKey, ...props }: CodeBlockWithTabsProps) => {
207
+ export const CodeBlockWithTabs = ({
208
+ className,
209
+ codeBlockProps,
210
+ currentTabKey,
211
+ tabs,
212
+ optimisticCurrentTabKey,
213
+ ...props
214
+ }: CodeBlockWithTabsProps) => {
201
215
  const { generateProxyImageUrl } = useSharedUiDependencies();
202
216
  const currentTab = tabs.find((tab) => tab.key === currentTabKey) ?? tabs[0];
203
217
 
@@ -215,10 +229,14 @@ export const CodeBlockWithTabs = ({ className, codeBlockProps, currentTabKey, ta
215
229
  };
216
230
  const children = (
217
231
  <>
218
- {Icon
219
- ? <Icon size="20" />
220
- : <img src={src && (generateProxyImageUrl?.(src, { resize: IMG_RESIZE }) ?? src)} alt={label} />
221
- }
232
+ {Icon ? (
233
+ <Icon size="20" />
234
+ ) : (
235
+ <img
236
+ src={src && (generateProxyImageUrl?.(src, { resize: IMG_RESIZE }) ?? src)}
237
+ alt={label}
238
+ />
239
+ )}
222
240
  <HeadingShared type="titleS" as="p">
223
241
  {label}
224
242
  </HeadingShared>
@@ -236,11 +254,7 @@ export const CodeBlockWithTabs = ({ className, codeBlockProps, currentTabKey, ta
236
254
  }
237
255
 
238
256
  return (
239
- <div
240
- {...commonProps}
241
- role="button"
242
- key={tab.key}
243
- >
257
+ <div {...commonProps} role="button" key={tab.key}>
244
258
  {children}
245
259
  </div>
246
260
  );
@@ -7,10 +7,7 @@ import { CodeHighlighterLineBashPrefix, CodeHighlighterLinePrefix } from '../pri
7
7
  // returns string indicating what type of line it is (bashStartCommand, bashCommand, bashEmptyLine)
8
8
  // commands start -> bashStartCommand
9
9
  // every next line after command start until next command start or empty line -> bashCommand
10
- export const getBashLinePrefixes = (
11
- code: string,
12
- bashCommandsStart: number[] = [],
13
- isOneLine?: boolean) => {
10
+ export const getBashLinePrefixes = (code: string, bashCommandsStart: number[] = [], isOneLine?: boolean) => {
14
11
  const lines = code.split('\n').map((line) => line.trim());
15
12
 
16
13
  const bashLinePrefixesArray = lines.map((line, i) => {
@@ -21,7 +18,13 @@ export const getBashLinePrefixes = (
21
18
  return isEmptyLine ? (
22
19
  <CodeHighlighterLineBashPrefix $isOneLine={isOneLine} key={`code-highlighter-line-bash-prefix-${i}`} />
23
20
  ) : (
24
- <CodeHighlighterLineBashPrefix $isOneLine={isOneLine} color={theme.color.lavender.base} key={`code-highlighter-line-bash-prefix-${i}`}>$</CodeHighlighterLineBashPrefix>
21
+ <CodeHighlighterLineBashPrefix
22
+ $isOneLine={isOneLine}
23
+ color={theme.color.lavender.base}
24
+ key={`code-highlighter-line-bash-prefix-${i}`}
25
+ >
26
+ $
27
+ </CodeHighlighterLineBashPrefix>
25
28
  );
26
29
  }
27
30
 
@@ -31,16 +34,15 @@ export const getBashLinePrefixes = (
31
34
  $isOneLine={isOneLine}
32
35
  color={theme.color.lavender.base}
33
36
  key={`code-highlighter-line-bash-prefix-${i}`}
34
- >$</CodeHighlighterLineBashPrefix>
37
+ >
38
+ $
39
+ </CodeHighlighterLineBashPrefix>
35
40
  );
36
41
  }
37
42
 
38
43
  if (isEmptyLine) {
39
44
  return (
40
- <CodeHighlighterLineBashPrefix
41
- $isOneLine={isOneLine}
42
- key={`code-highlighter-line-bash-prefix-${i}`}
43
- />
45
+ <CodeHighlighterLineBashPrefix $isOneLine={isOneLine} key={`code-highlighter-line-bash-prefix-${i}`} />
44
46
  );
45
47
  }
46
48
 
@@ -49,7 +51,9 @@ export const getBashLinePrefixes = (
49
51
  $isOneLine={isOneLine}
50
52
  color={theme.color.lavender.base}
51
53
  key={`code-highlighter-line-bash-prefix-${i}`}
52
- >&lt;</CodeHighlighterLineBashPrefix>
54
+ >
55
+ &lt;
56
+ </CodeHighlighterLineBashPrefix>
53
57
  );
54
58
  });
55
59
 
@@ -60,8 +64,12 @@ export const getNumberLinePrefixes = (code: string): Record<number, ReactNode> =
60
64
  const numberOfLines = code.split('\n').length;
61
65
  const numbersArray = Array.from({ length: numberOfLines }, (_, i) => i + 1);
62
66
 
63
- return Object.fromEntries(numbersArray.map((number) => [
64
- number,
65
- <CodeHighlighterLinePrefix key={`code-highlighter-line-prefix-${number}`}>{number}</CodeHighlighterLinePrefix>,
66
- ]));
67
+ return Object.fromEntries(
68
+ numbersArray.map((number) => [
69
+ number,
70
+ <CodeHighlighterLinePrefix key={`code-highlighter-line-prefix-${number}`}>
71
+ {number}
72
+ </CodeHighlighterLinePrefix>,
73
+ ]),
74
+ );
67
75
  };
@@ -43,13 +43,15 @@ type Story = StoryObj<InlineCodeProps>;
43
43
  */
44
44
  export const AllVariants: Story = {
45
45
  render: () => (
46
- <div style={{
47
- display: 'grid',
48
- gridTemplateColumns: 'repeat(auto-fit, minmax(300px, 1fr))',
49
- gap: '24px',
50
- padding: '24px',
51
- maxWidth: '1200px',
52
- }}>
46
+ <div
47
+ style={{
48
+ display: 'grid',
49
+ gridTemplateColumns: 'repeat(auto-fit, minmax(300px, 1fr))',
50
+ gap: '24px',
51
+ padding: '24px',
52
+ maxWidth: '1200px',
53
+ }}
54
+ >
53
55
  {/* Size variants without copy button */}
54
56
  <div style={{ display: 'flex', flexDirection: 'column', gap: '12px' }}>
55
57
  <h3 style={{ margin: '0 0 8px 0', fontSize: '16px', fontWeight: '600' }}>Size Variants</h3>
@@ -72,15 +74,21 @@ export const AllVariants: Story = {
72
74
  <h3 style={{ margin: '0 0 8px 0', fontSize: '16px', fontWeight: '600' }}>With Copy Button</h3>
73
75
  <div>
74
76
  <p style={{ margin: '0 0 4px 0', fontSize: '14px', color: '#666' }}>Small</p>
75
- <InlineCode size="small" withCopyButton>npm install @apify/ui-library</InlineCode>
77
+ <InlineCode size="small" withCopyButton>
78
+ npm install @apify/ui-library
79
+ </InlineCode>
76
80
  </div>
77
81
  <div>
78
82
  <p style={{ margin: '0 0 4px 0', fontSize: '14px', color: '#666' }}>Regular</p>
79
- <InlineCode size="regular" withCopyButton>npm install @apify/ui-library</InlineCode>
83
+ <InlineCode size="regular" withCopyButton>
84
+ npm install @apify/ui-library
85
+ </InlineCode>
80
86
  </div>
81
87
  <div>
82
88
  <p style={{ margin: '0 0 4px 0', fontSize: '14px', color: '#666' }}>Big</p>
83
- <InlineCode size="big" withCopyButton>npm install @apify/ui-library</InlineCode>
89
+ <InlineCode size="big" withCopyButton>
90
+ npm install @apify/ui-library
91
+ </InlineCode>
84
92
  </div>
85
93
  </div>
86
94
  </div>
@@ -27,9 +27,11 @@ const CopyButtonWrapper = styled.div`
27
27
 
28
28
  const CopyButton: React.FC<{ text: string }> = ({ text }) => {
29
29
  const { isCopied, copyToClipboard } = useCopyToClipboard();
30
- return <CopyButtonWrapper role='button' onClick={async () => copyToClipboard(text)} title='Copy to clipboard'>
31
- {isCopied ? <CheckIcon size="16" /> : <CopyIcon size="16" />}
32
- </CopyButtonWrapper>;
30
+ return (
31
+ <CopyButtonWrapper role="button" onClick={async () => copyToClipboard(text)} title="Copy to clipboard">
32
+ {isCopied ? <CheckIcon size="16" /> : <CopyIcon size="16" />}
33
+ </CopyButtonWrapper>
34
+ );
33
35
  };
34
36
 
35
37
  const Wrapper = styled.span`
@@ -39,24 +41,17 @@ const Wrapper = styled.span`
39
41
  `;
40
42
 
41
43
  export type InlineCodeProps = RegularBoxProps & {
42
- children: React.ReactNode,
43
- size?: SharedTextSize,
44
- withCopyButton?: boolean,
44
+ children: React.ReactNode;
45
+ size?: SharedTextSize;
46
+ withCopyButton?: boolean;
45
47
  };
46
48
 
47
49
  // This might be just a Chip component
48
- export const InlineCode: React.FC<InlineCodeProps> = ({
49
- children,
50
- size,
51
- withCopyButton,
52
- ...props
53
- }) => <Wrapper {...props}>
54
- <Text
55
- type="code"
56
- as="code"
57
- size={size}
58
- >
59
- {children}
60
- {withCopyButton && <CopyButton text={children?.toString() ?? ''} />}
61
- </Text>
62
- </Wrapper>;
50
+ export const InlineCode: React.FC<InlineCodeProps> = ({ children, size, withCopyButton, ...props }) => (
51
+ <Wrapper {...props}>
52
+ <Text type="code" as="code" size={size}>
53
+ {children}
54
+ {withCopyButton && <CopyButton text={children?.toString() ?? ''} />}
55
+ </Text>
56
+ </Wrapper>
57
+ );
@@ -19,14 +19,7 @@ export const oneLightTheme: PrismTheme = {
19
19
  },
20
20
  },
21
21
  {
22
- types: [
23
- 'attr-name',
24
- 'class-name',
25
- 'boolean',
26
- 'constant',
27
- 'number',
28
- 'atrule',
29
- ],
22
+ types: ['attr-name', 'class-name', 'boolean', 'constant', 'number', 'atrule'],
30
23
  style: {
31
24
  color: 'hsl(35, 99%, 36%)',
32
25
  },
@@ -51,15 +44,7 @@ export const oneLightTheme: PrismTheme = {
51
44
  },
52
45
  },
53
46
  {
54
- types: [
55
- 'selector',
56
- 'string',
57
- 'char',
58
- 'builtin',
59
- 'inserted',
60
- 'regex',
61
- 'attr-value',
62
- ],
47
+ types: ['selector', 'string', 'char', 'builtin', 'inserted', 'regex', 'attr-value'],
63
48
  style: {
64
49
  color: 'hsl(119, 34%, 47%)',
65
50
  },
@@ -76,13 +76,15 @@ type Story = StoryObj<OneLineCodeProps>;
76
76
  */
77
77
  export const AllVariants: Story = {
78
78
  render: () => (
79
- <div style={{
80
- display: 'flex',
81
- flexDirection: 'column',
82
- padding: '24px',
83
- gap: '24px',
84
- maxWidth: '1200px',
85
- }}>
79
+ <div
80
+ style={{
81
+ display: 'flex',
82
+ flexDirection: 'column',
83
+ padding: '24px',
84
+ gap: '24px',
85
+ maxWidth: '1200px',
86
+ }}
87
+ >
86
88
  {/* Basic examples */}
87
89
  <div style={{ display: 'flex', flexDirection: 'column', gap: '12px' }}>
88
90
  <h3 style={{ margin: '0 0 8px 0', fontSize: '16px', fontWeight: '600' }}>Basic Examples</h3>
@@ -105,19 +107,27 @@ export const AllVariants: Story = {
105
107
  <h3 style={{ margin: '0 0 8px 0', fontSize: '16px', fontWeight: '600' }}>HTTP Methods</h3>
106
108
  <div>
107
109
  <p style={{ margin: '0 0 4px 0', fontSize: '14px', color: '#666' }}>GET</p>
108
- <OneLineCode language="http" httpMethod="GET">https://api.example.com/users</OneLineCode>
110
+ <OneLineCode language="http" httpMethod="GET">
111
+ https://api.example.com/users
112
+ </OneLineCode>
109
113
  </div>
110
114
  <div>
111
115
  <p style={{ margin: '0 0 4px 0', fontSize: '14px', color: '#666' }}>POST</p>
112
- <OneLineCode language="http" httpMethod="POST">https://api.example.com/users</OneLineCode>
116
+ <OneLineCode language="http" httpMethod="POST">
117
+ https://api.example.com/users
118
+ </OneLineCode>
113
119
  </div>
114
120
  <div>
115
121
  <p style={{ margin: '0 0 4px 0', fontSize: '14px', color: '#666' }}>PUT</p>
116
- <OneLineCode language="http" httpMethod="PUT">https://api.example.com/users/123</OneLineCode>
122
+ <OneLineCode language="http" httpMethod="PUT">
123
+ https://api.example.com/users/123
124
+ </OneLineCode>
117
125
  </div>
118
126
  <div>
119
127
  <p style={{ margin: '0 0 4px 0', fontSize: '14px', color: '#666' }}>DELETE</p>
120
- <OneLineCode language="http" httpMethod="DELETE">https://api.example.com/users/123</OneLineCode>
128
+ <OneLineCode language="http" httpMethod="DELETE">
129
+ https://api.example.com/users/123
130
+ </OneLineCode>
121
131
  </div>
122
132
  </div>
123
133
 
@@ -136,11 +146,7 @@ export const AllVariants: Story = {
136
146
  </div>
137
147
  <div>
138
148
  <p style={{ margin: '0 0 4px 0', fontSize: '14px', color: '#666' }}>With Secret</p>
139
- <OneLineCode
140
- language="http"
141
- secret="VERY_SECRET_TOKEN"
142
- httpMethod="GET"
143
- >
149
+ <OneLineCode language="http" secret="VERY_SECRET_TOKEN" httpMethod="GET">
144
150
  https://api.example.com?token=***
145
151
  </OneLineCode>
146
152
  </div>
@@ -157,15 +163,21 @@ export const AllVariants: Story = {
157
163
  <h3 style={{ margin: '0 0 8px 0', fontSize: '16px', fontWeight: '600' }}>Size Variants</h3>
158
164
  <div>
159
165
  <p style={{ margin: '0 0 4px 0', fontSize: '14px', color: '#666' }}>Small</p>
160
- <OneLineCode language="javascript" size="small">const foo = &apos;bar&apos;;</OneLineCode>
166
+ <OneLineCode language="javascript" size="small">
167
+ const foo = &apos;bar&apos;;
168
+ </OneLineCode>
161
169
  </div>
162
170
  <div>
163
171
  <p style={{ margin: '0 0 4px 0', fontSize: '14px', color: '#666' }}>Regular</p>
164
- <OneLineCode language="javascript" size="regular">const foo = &apos;bar&apos;;</OneLineCode>
172
+ <OneLineCode language="javascript" size="regular">
173
+ const foo = &apos;bar&apos;;
174
+ </OneLineCode>
165
175
  </div>
166
176
  <div>
167
177
  <p style={{ margin: '0 0 4px 0', fontSize: '14px', color: '#666' }}>Big</p>
168
- <OneLineCode language="javascript" size="big">const foo = &apos;bar&apos;;</OneLineCode>
178
+ <OneLineCode language="javascript" size="big">
179
+ const foo = &apos;bar&apos;;
180
+ </OneLineCode>
169
181
  </div>
170
182
  </div>
171
183
  </div>