@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,7 @@ export const oneLineCodeClassNames = {
23
23
  buttons: 'OneLineCode-Buttons',
24
24
  };
25
25
 
26
- type ThemeType = keyof Pick<
27
- (typeof theme)['color'],
28
- 'primary' | 'success' | 'warning' | 'danger' | 'neutral'
29
- >;
26
+ type ThemeType = keyof Pick<(typeof theme)['color'], 'primary' | 'success' | 'warning' | 'danger' | 'neutral'>;
30
27
 
31
28
  const HTML_METHOD_CHIP_STYLES: Record<HttpMethod, ThemeType> = {
32
29
  GET: 'primary',
@@ -56,14 +53,18 @@ type OneLineCodeWrapperProps = SyntaxHighlighterBaseStylesWrapperProps & {
56
53
  const OneLineCodeWrapper = styled(SyntaxHighlighterBaseStylesWrapper)<OneLineCodeWrapperProps>`
57
54
  display: flex;
58
55
  padding-right: ${theme.space.space16} !important;
59
- ${({ $fitContent }) => $fitContent && css`
60
- width: fit-content;
61
- `}
62
-
63
- ${({ $disabled }) => $disabled && css`
64
- opacity: 0.5;
65
- cursor: not-allowed;
66
- `}
56
+ ${({ $fitContent }) =>
57
+ $fitContent &&
58
+ css`
59
+ width: fit-content;
60
+ `}
61
+
62
+ ${({ $disabled }) =>
63
+ $disabled &&
64
+ css`
65
+ opacity: 0.5;
66
+ cursor: not-allowed;
67
+ `}
67
68
 
68
69
  height: 4.6rem;
69
70
 
@@ -95,11 +96,7 @@ const OneLineCodeWrapper = styled(SyntaxHighlighterBaseStylesWrapper)<OneLineCod
95
96
  bottom: 0;
96
97
  width: 4rem;
97
98
  z-index: 5;
98
- background: linear-gradient(
99
- to right,
100
- transparent,
101
- ${theme.color.neutral.backgroundMuted} 3rem
102
- );
99
+ background: linear-gradient(to right, transparent, ${theme.color.neutral.backgroundMuted} 3rem);
103
100
  }
104
101
  }
105
102
 
@@ -117,7 +114,6 @@ const OneLineCodeWrapper = styled(SyntaxHighlighterBaseStylesWrapper)<OneLineCod
117
114
  scrollbar-width: thin;
118
115
  scrollbar-color: ${theme.color.neutral.border} transparent;
119
116
 
120
-
121
117
  pre {
122
118
  display: flex;
123
119
  flex: 1;
@@ -142,10 +138,7 @@ export type TrackingBundleDataObject = {
142
138
  trackingData?: Record<string, unknown>;
143
139
  };
144
140
 
145
- export type OneLineCodeTrackingBundle = Record<
146
- 'secret' | 'copy' | 'action',
147
- TrackingBundleDataObject
148
- >;
141
+ export type OneLineCodeTrackingBundle = Record<'secret' | 'copy' | 'action', TrackingBundleDataObject>;
149
142
 
150
143
  export type OneLineCodeProps = Omit<BoxProps, 'children'> & {
151
144
  children: string;
@@ -203,7 +196,7 @@ export function OneLineCode({
203
196
  <div className={oneLineCodeClassNames.gradientWrapper}>
204
197
  <div className={oneLineCodeClassNames.scrollableWrapper}>
205
198
  {httpMethod && (
206
- <Text className={oneLineCodeClassNames.methodChip} as='div'>
199
+ <Text className={oneLineCodeClassNames.methodChip} as="div">
207
200
  {httpMethod}
208
201
  </Text>
209
202
  )}
@@ -223,13 +216,9 @@ export function OneLineCode({
223
216
  onClick={() => setShowSecret((prev) => !prev)}
224
217
  trackingId={trackingBundle?.secret?.trackingId}
225
218
  trackingData={trackingBundle?.secret?.trackingData}
226
- data-test='toggle-visibility-button'
219
+ data-test="toggle-visibility-button"
227
220
  >
228
- {showSecret ? (
229
- <EyeOffIcon size="16" />
230
- ) : (
231
- <EyeIcon size="16" />
232
- )}
221
+ {showSecret ? <EyeOffIcon size="16" /> : <EyeIcon size="16" />}
233
222
  </ActionButton>
234
223
  )}
235
224
  {!hideCopyButton && (
@@ -249,6 +238,6 @@ export function OneLineCode({
249
238
  </ActionButton>
250
239
  )}
251
240
  </div>
252
- </OneLineCodeWrapper >
241
+ </OneLineCodeWrapper>
253
242
  );
254
243
  }
@@ -51,38 +51,39 @@ void loadLanguages();
51
51
  * Detects the language of the code based on common keywords. We need it for user-generated content
52
52
  * @param code The code to analyze.
53
53
  */
54
- const useDetectedLanguage = (code: string, passedLanguage?: string) => useMemo(() => {
55
- if (passedLanguage) return passedLanguage;
56
- const tests = [
57
- { lang: 'rust', keywords: ['fn main()', 'let mut', 'println!', 'pub struct', 'use std::'] },
58
- { lang: 'http', keywords: ['GET /', 'POST /', 'HTTP/1.1', 'Host:', 'Content-Type:'] },
59
- { lang: 'bash', keywords: ['#!/bin/bash', 'echo ', 'cd ', 'ls'] },
60
- { lang: 'markup', keywords: ['<div', '<span', '<html', '<!DOCTYPE', '</'] },
61
- { lang: 'xml-doc', keywords: ['<?xml', '<doc', '<summary', '</doc>'] },
62
- { lang: 'yaml', keywords: ['version:', 'services:', 'name:'] },
63
- { lang: 'docker', keywords: ['FROM ', 'RUN ', 'CMD ', 'ENTRYPOINT', 'EXPOSE'] },
64
- { lang: 'python', keywords: ['def ', 'import ', 'print(', 'self', 'None'] },
65
- { lang: 'javascript', keywords: ['function', 'const', 'let', '=>', 'console.log', 'var'] },
66
- { lang: 'typescript', keywords: ['interface ', 'type ', ': string', ': number', 'as const'] },
67
- ];
68
-
69
- const scored = tests.map((test) => {
70
- let score = 0;
71
- for (const kw of test.keywords) {
72
- if (code.includes(kw)) score += 1;
73
- }
74
- return { lang: test.lang, score };
75
- });
54
+ const useDetectedLanguage = (code: string, passedLanguage?: string) =>
55
+ useMemo(() => {
56
+ if (passedLanguage) return passedLanguage;
57
+ const tests = [
58
+ { lang: 'rust', keywords: ['fn main()', 'let mut', 'println!', 'pub struct', 'use std::'] },
59
+ { lang: 'http', keywords: ['GET /', 'POST /', 'HTTP/1.1', 'Host:', 'Content-Type:'] },
60
+ { lang: 'bash', keywords: ['#!/bin/bash', 'echo ', 'cd ', 'ls'] },
61
+ { lang: 'markup', keywords: ['<div', '<span', '<html', '<!DOCTYPE', '</'] },
62
+ { lang: 'xml-doc', keywords: ['<?xml', '<doc', '<summary', '</doc>'] },
63
+ { lang: 'yaml', keywords: ['version:', 'services:', 'name:'] },
64
+ { lang: 'docker', keywords: ['FROM ', 'RUN ', 'CMD ', 'ENTRYPOINT', 'EXPOSE'] },
65
+ { lang: 'python', keywords: ['def ', 'import ', 'print(', 'self', 'None'] },
66
+ { lang: 'javascript', keywords: ['function', 'const', 'let', '=>', 'console.log', 'var'] },
67
+ { lang: 'typescript', keywords: ['interface ', 'type ', ': string', ': number', 'as const'] },
68
+ ];
69
+
70
+ const scored = tests.map((test) => {
71
+ let score = 0;
72
+ for (const kw of test.keywords) {
73
+ if (code.includes(kw)) score += 1;
74
+ }
75
+ return { lang: test.lang, score };
76
+ });
76
77
 
77
- const max = _.maxBy(scored, 'score');
78
+ const max = _.maxBy(scored, 'score');
78
79
 
79
- if (max?.score && max.score > 0) return max.lang;
80
- return undefined;
81
- }, [code, passedLanguage]);
80
+ if (max?.score && max.score > 0) return max.lang;
81
+ return undefined;
82
+ }, [code, passedLanguage]);
82
83
 
83
84
  type PreWrapperProps = {
84
- $hasLinePrefixes: boolean,
85
- $isSingleLine: boolean
85
+ $hasLinePrefixes: boolean;
86
+ $isSingleLine: boolean;
86
87
  };
87
88
 
88
89
  const PreWrapper = styled.pre<PreWrapperProps>`
@@ -99,13 +100,16 @@ const PreWrapper = styled.pre<PreWrapperProps>`
99
100
  vertical-align: middle;
100
101
 
101
102
  /* The following CSS deal with https://github.com/apify/apify-core/issues/20920 */
102
- ${({ $isSingleLine }) => ($isSingleLine ? css`
103
- overflow-y: hidden;
104
- scrollbar-width: none;
105
- ` : css`
106
- scrollbar-width: thin;
107
- overflow: hidden;
108
- `)};
103
+ ${({ $isSingleLine }) =>
104
+ $isSingleLine
105
+ ? css`
106
+ overflow-y: hidden;
107
+ scrollbar-width: none;
108
+ `
109
+ : css`
110
+ scrollbar-width: thin;
111
+ overflow: hidden;
112
+ `};
109
113
 
110
114
  *,
111
115
  *::before,
@@ -128,27 +132,33 @@ const PreWrapper = styled.pre<PreWrapperProps>`
128
132
  padding-left: ${({ $hasLinePrefixes }) => ($hasLinePrefixes ? '0.2' : '1')}rem;
129
133
  }
130
134
 
131
- ${({ $isSingleLine }) => !$isSingleLine && css<{ $hasLinePrefixes: boolean }>`
132
- &:hover {
133
- background-color: ${HIGHLIGHT_BACKGROUND_COLOR} !important;
134
- border-left: 6px solid ${theme.color.neutral.border} !important;
135
- padding-left: ${({ $hasLinePrefixes }) => ($hasLinePrefixes ? '0.2' : '1')}rem;
136
- }
137
- `}
138
-
139
- ${({ $isSingleLine }) => ($isSingleLine ? css<PreWrapperProps>`
140
- white-space: nowrap;
141
- vertical-align: text-top;
142
- ` : css<PreWrapperProps>`
143
- padding-left: ${({ $hasLinePrefixes }) => ($hasLinePrefixes ? theme.space.space8 : theme.space.space16)};
144
- padding-right: ${theme.space.space16};
145
-
146
- &:hover {
147
- background-color: ${HIGHLIGHT_BACKGROUND_COLOR} !important;
148
- border-left: 6px solid ${theme.color.neutral.border} !important;
149
- padding-left: ${({ $hasLinePrefixes }) => ($hasLinePrefixes ? '0.2' : '1')}rem;
150
- }
151
- `)}
135
+ ${({ $isSingleLine }) =>
136
+ !$isSingleLine &&
137
+ css<{ $hasLinePrefixes: boolean }>`
138
+ &:hover {
139
+ background-color: ${HIGHLIGHT_BACKGROUND_COLOR} !important;
140
+ border-left: 6px solid ${theme.color.neutral.border} !important;
141
+ padding-left: ${({ $hasLinePrefixes }) => ($hasLinePrefixes ? '0.2' : '1')}rem;
142
+ }
143
+ `}
144
+
145
+ ${({ $isSingleLine }) =>
146
+ $isSingleLine
147
+ ? css<PreWrapperProps>`
148
+ white-space: nowrap;
149
+ vertical-align: text-top;
150
+ `
151
+ : css<PreWrapperProps>`
152
+ padding-left: ${({ $hasLinePrefixes }) =>
153
+ $hasLinePrefixes ? theme.space.space8 : theme.space.space16};
154
+ padding-right: ${theme.space.space16};
155
+
156
+ &:hover {
157
+ background-color: ${HIGHLIGHT_BACKGROUND_COLOR} !important;
158
+ border-left: 6px solid ${theme.color.neutral.border} !important;
159
+ padding-left: ${({ $hasLinePrefixes }) => ($hasLinePrefixes ? '0.2' : '1')}rem;
160
+ }
161
+ `}
152
162
  }
153
163
  }
154
164
  `;
@@ -168,59 +178,57 @@ export const CodeHighlighterLineBashPrefix = styled(CodeHighlighterLinePrefix)<{
168
178
  `;
169
179
 
170
180
  type SyntaxHighlighterProps = Omit<HighlightProps, 'children' | 'language'> & {
171
- size?: SharedTextSize,
172
- linePrefixes?: Record<string, ReactNode>,
173
- highlightLines?: number[],
174
- language?: string,
175
- className?: string,
176
- isSingleLine: boolean,
181
+ size?: SharedTextSize;
182
+ linePrefixes?: Record<string, ReactNode>;
183
+ highlightLines?: number[];
184
+ language?: string;
185
+ className?: string;
186
+ isSingleLine: boolean;
177
187
  };
178
188
 
179
- export const PrismSyntaxHighlighter = forwardRef<HTMLPreElement, SyntaxHighlighterProps>(({
180
- size = 'regular',
181
- linePrefixes = {},
182
- highlightLines = [],
183
- language,
184
- className,
185
- isSingleLine,
186
- ...rest
187
- }, ref) => {
188
- const { uiTheme } = useSharedUiDependencies();
189
- const hasLinePrefixes = !_.isEmpty(linePrefixes);
190
- const highlightedLinesObject = useRef<Record<number, boolean>>(Object.fromEntries(highlightLines.map((e) => [e, true])));
191
-
192
- const effectiveLanguage = useDetectedLanguage(rest.code || '', language) ?? 'javascript';
193
-
194
- return (
195
- <Highlight
196
- theme={uiTheme === 'DARK' ? themes.nightOwl : oneLightTheme}
197
- language={effectiveLanguage}
198
- {...rest}
199
- >
200
- {({ className: prismClassName, tokens, getLineProps, getTokenProps }) => (
201
- <PreWrapper
202
- tabIndex={0}
203
- className={clsx(className, prismClassName)}
204
- $hasLinePrefixes={hasLinePrefixes}
205
- $isSingleLine={isSingleLine}
206
- ref={ref}
207
- >
208
- <Text
209
- size={size}
210
- type='code'
211
- as='code'
189
+ export const PrismSyntaxHighlighter = forwardRef<HTMLPreElement, SyntaxHighlighterProps>(
190
+ ({ size = 'regular', linePrefixes = {}, highlightLines = [], language, className, isSingleLine, ...rest }, ref) => {
191
+ const { uiTheme } = useSharedUiDependencies();
192
+ const hasLinePrefixes = !_.isEmpty(linePrefixes);
193
+ const highlightedLinesObject = useRef<Record<number, boolean>>(
194
+ Object.fromEntries(highlightLines.map((e) => [e, true])),
195
+ );
196
+
197
+ const effectiveLanguage = useDetectedLanguage(rest.code || '', language) ?? 'javascript';
198
+
199
+ return (
200
+ <Highlight
201
+ theme={uiTheme === 'DARK' ? themes.nightOwl : oneLightTheme}
202
+ language={effectiveLanguage}
203
+ {...rest}
204
+ >
205
+ {({ className: prismClassName, tokens, getLineProps, getTokenProps }) => (
206
+ <PreWrapper
207
+ tabIndex={0}
208
+ className={clsx(className, prismClassName)}
209
+ $hasLinePrefixes={hasLinePrefixes}
210
+ $isSingleLine={isSingleLine}
211
+ ref={ref}
212
212
  >
213
- {tokens.map((line, i) => (
214
- <div key={i} {...getLineProps({ line, className: highlightedLinesObject.current[i + 1] ? 'highlighted' : '' })}>
215
- {hasLinePrefixes && (linePrefixes[i + 1] || <CodeHighlighterLinePrefix />)}
216
- {line.map((token, key) => (
217
- <span key={key} {...getTokenProps({ token })} />
218
- ))}
219
- </div>
220
- ))}
221
- </Text>
222
- </PreWrapper>
223
- )}
224
- </Highlight>
225
- );
226
- });
213
+ <Text size={size} type="code" as="code">
214
+ {tokens.map((line, i) => (
215
+ <div
216
+ key={i}
217
+ {...getLineProps({
218
+ line,
219
+ className: highlightedLinesObject.current[i + 1] ? 'highlighted' : '',
220
+ })}
221
+ >
222
+ {hasLinePrefixes && (linePrefixes[i + 1] || <CodeHighlighterLinePrefix />)}
223
+ {line.map((token, key) => (
224
+ <span key={key} {...getTokenProps({ token })} />
225
+ ))}
226
+ </div>
227
+ ))}
228
+ </Text>
229
+ </PreWrapper>
230
+ )}
231
+ </Highlight>
232
+ );
233
+ },
234
+ );
@@ -61,9 +61,11 @@ Prism.languages.python = {
61
61
  },
62
62
  },
63
63
  // eslint-disable-next-line @stylistic/max-len
64
- keyword: /\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,
64
+ keyword:
65
+ /\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,
65
66
  // eslint-disable-next-line @stylistic/max-len
66
- builtin: /\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,
67
+ builtin:
68
+ /\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,
67
69
  boolean: /\b(?:False|None|True)\b/,
68
70
  number: /\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,
69
71
  operator: /[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,
@@ -109,7 +109,8 @@ export const GreyHeaderWhenClosed: Story = {
109
109
  args: {
110
110
  header: 'Muted background when closed, more prominent on hover',
111
111
  isClosedHeaderGrey: true,
112
- children: 'The header has a muted background when the card is collapsed, which becomes more prominent on hover.',
112
+ children:
113
+ 'The header has a muted background when the card is collapsed, which becomes more prominent on hover.',
113
114
  },
114
115
  };
115
116
 
@@ -34,7 +34,8 @@ export type CollapsibleCardProps = {
34
34
  isClosedHeaderGrey?: boolean;
35
35
  isHeaderGreyOnHover?: boolean;
36
36
  as?: React.ElementType;
37
- } & TransientWrapperProps & Omit<React.HTMLAttributes<HTMLElement>, 'children'>;
37
+ } & TransientWrapperProps &
38
+ Omit<React.HTMLAttributes<HTMLElement>, 'children'>;
38
39
 
39
40
  export const collapsibleCardClassNames = {
40
41
  TOP_SECTION: 'CollapsibleCard-TopSection',
@@ -42,7 +43,7 @@ export const collapsibleCardClassNames = {
42
43
  CONTENT: 'Card-content',
43
44
  };
44
45
 
45
- const StyledCardWrapper = styled(Box) <StyledWrapperProps>`
46
+ const StyledCardWrapper = styled(Box)<StyledWrapperProps>`
46
47
  /* consoleStyle.partialStyle.card — TODO: reuse from Card once moved out of to_consolidate */
47
48
  background-color: ${theme.color.neutral.cardBackground};
48
49
  border: 1px solid ${theme.color.neutral.border};
@@ -50,10 +51,12 @@ const StyledCardWrapper = styled(Box) <StyledWrapperProps>`
50
51
  border-radius: ${theme.radius.radius8};
51
52
  box-sizing: border-box;
52
53
 
53
- ${({ $hideOuterBorder }) => $hideOuterBorder && css`
54
- border: none;
55
- border-radius: unset;
56
- `};
54
+ ${({ $hideOuterBorder }) =>
55
+ $hideOuterBorder &&
56
+ css`
57
+ border: none;
58
+ border-radius: unset;
59
+ `};
57
60
  /* Reset padding, it is dealt with within header and content styles */
58
61
  padding: 0;
59
62
  ${({ $hasShadow }) => ($hasShadow ? '' : 'box-shadow: initial;')}
@@ -81,7 +84,8 @@ const StyledHeader = styled.header<StyledHeaderProps>`
81
84
  ${({ $hideOuterBorder }) => ($hideOuterBorder ? '' : `border-radius: ${theme.radius.radius8};`)}
82
85
 
83
86
  &:hover {
84
- background-color: ${({ $isHeaderGrey, $isHeaderGreyOnHover }) => (($isHeaderGrey || $isHeaderGreyOnHover) ? theme.color.neutral.hover : 'initial')};
87
+ background-color: ${({ $isHeaderGrey, $isHeaderGreyOnHover }) =>
88
+ $isHeaderGrey || $isHeaderGreyOnHover ? theme.color.neutral.hover : 'initial'};
85
89
  }
86
90
 
87
91
  .chevron {
@@ -135,22 +139,33 @@ export const CollapsibleCard: FC<CollapsibleCardProps> = ({
135
139
  $hasShadow={hasShadow}
136
140
  {...rest}
137
141
  >
138
- {topSection && <StyledTopSection className={collapsibleCardClassNames.TOP_SECTION} data-test='collapsible-card-top-section'>
139
- {topSection}
140
- </StyledTopSection>}
142
+ {topSection && (
143
+ <StyledTopSection
144
+ className={collapsibleCardClassNames.TOP_SECTION}
145
+ data-test="collapsible-card-top-section"
146
+ >
147
+ {topSection}
148
+ </StyledTopSection>
149
+ )}
141
150
  <StyledHeader
142
151
  $hideOuterBorder={hideOuterBorder}
143
152
  $isHeaderGrey={isClosedHeaderGrey && !isOpen && !isExpanded}
144
153
  $isHeaderGreyOnHover={isHeaderGreyOnHover}
145
154
  onClick={onHeaderClick}
146
155
  >
147
- {!noChevron && <ChevronDownIcon size="16" className={clsx('chevron', (isExpanded ?? isOpen) ? 'chevron-open' : 'chevron-closed')} />}
156
+ {!noChevron && (
157
+ <ChevronDownIcon
158
+ size="16"
159
+ className={clsx('chevron', (isExpanded ?? isOpen) ? 'chevron-open' : 'chevron-closed')}
160
+ />
161
+ )}
148
162
  {header}
149
163
  </StyledHeader>
150
- <Collapsible.Root
151
- open={isUncontrolled ? isOpen : isExpanded}
152
- >
153
- <CollapsibleContent $noDivider={noDivider} className={collapsibleCardClassNames.COLLAPSIBLE_CONTENT_WRAPPER}>
164
+ <Collapsible.Root open={isUncontrolled ? isOpen : isExpanded}>
165
+ <CollapsibleContent
166
+ $noDivider={noDivider}
167
+ className={collapsibleCardClassNames.COLLAPSIBLE_CONTENT_WRAPPER}
168
+ >
154
169
  <StyledCardContent className={collapsibleCardClassNames.CONTENT} data-test="card-content">
155
170
  {children}
156
171
  </StyledCardContent>
@@ -1,14 +1,15 @@
1
1
  import styled from 'styled-components';
2
2
 
3
3
  export interface ColorWheelGradientProps {
4
- translateX?: number,
5
- translateY?: number,
6
- rotation?: number,
7
- radius?: number,
8
- blurSize?: number,
4
+ translateX?: number;
5
+ translateY?: number;
6
+ rotation?: number;
7
+ radius?: number;
8
+ blurSize?: number;
9
9
  }
10
10
 
11
- export const ColorWheelGradient = styled.div<ColorWheelGradientProps>`${({ radius, rotation = 0, blurSize = 40, translateX = 0, translateY = 0 }) => `
11
+ export const ColorWheelGradient = styled.div<ColorWheelGradientProps>`
12
+ ${({ radius, rotation = 0, blurSize = 40, translateX = 0, translateY = 0 }) => `
12
13
  z-index: 1;
13
14
  position: absolute;
14
15
  width: ${radius ? `${radius}px` : 'auto'};
@@ -28,4 +29,5 @@ export const ColorWheelGradient = styled.div<ColorWheelGradientProps>`${({ radiu
28
29
 
29
30
  border-radius: 50%;
30
31
  filter: blur(${blurSize}px)
31
- `}`;
32
+ `}
33
+ `;
@@ -11,7 +11,14 @@ import {
11
11
  useTransitionStyles,
12
12
  } from '@floating-ui/react';
13
13
  import clsx from 'clsx';
14
- import { type ComponentType, type CSSProperties, forwardRef, type MouseEvent, type ReactNode, type RefObject } from 'react';
14
+ import {
15
+ type ComponentType,
16
+ type CSSProperties,
17
+ forwardRef,
18
+ type MouseEvent,
19
+ type ReactNode,
20
+ type RefObject,
21
+ } from 'react';
15
22
  import styled from 'styled-components';
16
23
 
17
24
  import { theme } from '../../design_system/theme.js';
@@ -35,7 +42,7 @@ export const FLOATING_PLACEMENT = {
35
42
  LEFT_END: 'left-end',
36
43
  } as const;
37
44
 
38
- export type FloatingPlacement = typeof FLOATING_PLACEMENT[keyof typeof FLOATING_PLACEMENT];
45
+ export type FloatingPlacement = (typeof FLOATING_PLACEMENT)[keyof typeof FLOATING_PLACEMENT];
39
46
 
40
47
  interface FloatingComponentWrapProps {
41
48
  showInPortal?: boolean;
@@ -125,9 +132,7 @@ export const FloatingComponentBase = ({
125
132
  y,
126
133
  refs: { setReference, setFloating },
127
134
  strategy: effectiveStrategy,
128
- middlewareData: {
129
- hide: refHidden,
130
- },
135
+ middlewareData: { hide: refHidden },
131
136
  context,
132
137
  } = useFloating({
133
138
  open: isOpen,
@@ -169,7 +174,7 @@ export const FloatingComponentBase = ({
169
174
  <ChildrenWrap className={clsx(classNames.CHILDREN, contentWrapClassName)} ref={setReference}>
170
175
  {children}
171
176
  </ChildrenWrap>
172
- { isMounted && (
177
+ {isMounted && (
173
178
  <FloatingComponentWrap
174
179
  className={className}
175
180
  ref={setFloating}
@@ -185,12 +190,14 @@ export const FloatingComponentBase = ({
185
190
  showInPortal={showInPortal}
186
191
  >
187
192
  <div ref={triggerRef}>
188
- {CloseButtonComponent
189
- ? <StyledPopoverBox>
193
+ {CloseButtonComponent ? (
194
+ <StyledPopoverBox>
190
195
  {content}
191
196
  <CloseButtonComponent />
192
197
  </StyledPopoverBox>
193
- : content}
198
+ ) : (
199
+ content
200
+ )}
194
201
  </div>
195
202
  </FloatingComponentWrap>
196
203
  )}