@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
@@ -35,9 +35,7 @@ export type SelectOption = {
35
35
  export const withReactSelectTheme = (Component: FC<any>) => {
36
36
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
37
37
  const EnhancedComponent = (props: any) => {
38
- return (
39
- <Component {...props} theme={defaultTheme} />
40
- );
38
+ return <Component {...props} theme={defaultTheme} />;
41
39
  };
42
40
  const displayName = Component.name || (Component as { displayName?: string }).displayName;
43
41
  EnhancedComponent.displayName = `withReactSelectTheme${displayName}`;
@@ -174,7 +172,7 @@ export const selectDefaultGetIsSelected: GetIsSelectedFn = (options, value, isMu
174
172
  };
175
173
 
176
174
  const StyledIndicatorsContainer = styled(withReactSelectTheme(selectComponents.IndicatorsContainer))`
177
- & > div{
175
+ & > div {
178
176
  padding: 6px !important;
179
177
  }
180
178
 
@@ -183,7 +181,7 @@ const StyledIndicatorsContainer = styled(withReactSelectTheme(selectComponents.I
183
181
  display: flex;
184
182
  align-items: center;
185
183
 
186
- svg:not(.error-svg){
184
+ svg:not(.error-svg) {
187
185
  color: ${theme.color.neutral.icon};
188
186
  }
189
187
  }
@@ -193,7 +191,7 @@ const StyledIndicatorsContainer = styled(withReactSelectTheme(selectComponents.I
193
191
  type ReactSelectStyledProps = Record<string, any>;
194
192
 
195
193
  const getMenuPortalZIndex = (props: ReactSelectStyledProps) => props.selectProps?.menuPortalZIndex;
196
- const getMenuPortalMinWidth = (props: ReactSelectStyledProps) => (props.selectProps?.menuMinWidth || 0);
194
+ const getMenuPortalMinWidth = (props: ReactSelectStyledProps) => props.selectProps?.menuMinWidth || 0;
197
195
 
198
196
  const StyledMenuPortal = styled(withReactSelectTheme(selectComponents.MenuPortal))`
199
197
  z-index: ${getMenuPortalZIndex} !important;
@@ -205,14 +203,16 @@ const StyledControl = styled(withReactSelectTheme(selectComponents.Control))`
205
203
  background-color: ${theme.color.neutral.fieldBackground} !important;
206
204
  border: 1px solid ${theme.color.neutral.fieldBorder} !important;
207
205
  border-radius: 6px !important;
208
- transition: border-color 120ms ease-out, background-color 120ms ease-out !important;
206
+ transition:
207
+ border-color 120ms ease-out,
208
+ background-color 120ms ease-out !important;
209
209
  padding: 0 6px;
210
210
 
211
211
  &:hover {
212
212
  background-color: ${theme.color.neutral.hover} !important;
213
213
  }
214
214
 
215
- &:focus-within{
215
+ &:focus-within {
216
216
  border-color: ${theme.color.primary.fieldBorderActive} !important;
217
217
  background-color: ${theme.color.neutral.background} !important;
218
218
  box-shadow: var(--shadow-active) !important;
@@ -241,9 +241,7 @@ const StyledOption = styled(withReactSelectTheme(selectComponents.Option))`
241
241
  const Option: FC<OptionProps<SelectOption>> = ({ children, data: { description }, ...props }) => (
242
242
  <StyledOption {...props}>
243
243
  {children}
244
- {description && (
245
- <Text size="small">{description}</Text>
246
- )}
244
+ {description && <Text size="small">{description}</Text>}
247
245
  </StyledOption>
248
246
  );
249
247
 
@@ -252,12 +250,14 @@ type SelectIndicatorsContainerProps = IndicatorsContainerProps<SelectOption> & {
252
250
  };
253
251
 
254
252
  const IndicatorsContainer: FC<SelectIndicatorsContainerProps> = ({
255
- selectProps: { indicator, suffix }, children, ...props
253
+ selectProps: { indicator, suffix },
254
+ children,
255
+ ...props
256
256
  }) => {
257
257
  return (
258
258
  <StyledIndicatorsContainer {...props}>
259
259
  {(indicator || suffix) && (
260
- <div className='indicator-slot'>
260
+ <div className="indicator-slot">
261
261
  <Text color={theme.color.neutral.textSubtle}>{suffix}</Text>
262
262
  {indicator}
263
263
  </div>
@@ -271,7 +271,7 @@ const IndicatorsContainer: FC<SelectIndicatorsContainerProps> = ({
271
271
  const DropdownIndicator: FC<DropdownIndicatorProps<SelectOption>> = ({ innerProps, selectProps }) => (
272
272
  <IconButton
273
273
  Icon={selectProps.menuIsOpen ? CaretUpIcon : CaretDownIcon}
274
- {...innerProps as React.HTMLAttributes<Element>}
274
+ {...(innerProps as React.HTMLAttributes<Element>)}
275
275
  />
276
276
  );
277
277
 
@@ -280,7 +280,7 @@ const ClearIndicator: FC<ClearIndicatorProps<SelectOption>> = ({ innerProps, sel
280
280
  <IconButton
281
281
  Icon={CrossIcon}
282
282
  data-test={`${selectProps?.id ?? selectProps?.name}--clear`}
283
- {...innerProps as React.HTMLAttributes<Element>}
283
+ {...(innerProps as React.HTMLAttributes<Element>)}
284
284
  />
285
285
  );
286
286
  };
@@ -294,10 +294,7 @@ const MultiValueRemoveButton = styled(IconButton)`
294
294
  `;
295
295
 
296
296
  export const SelectMultiValueRemove: FC<Pick<MultiValueRemoveProps<SelectOption>, 'innerProps'>> = ({ innerProps }) => (
297
- <MultiValueRemoveButton
298
- Icon={CrossIcon}
299
- {...innerProps as React.HTMLAttributes<Element>}
300
- />
297
+ <MultiValueRemoveButton Icon={CrossIcon} {...(innerProps as React.HTMLAttributes<Element>)} />
301
298
  );
302
299
 
303
300
  const IndicatorSeparator = () => null; // we don't display anything
@@ -311,92 +308,97 @@ const IndicatorSeparator = () => null; // we don't display anything
311
308
  * In the console frontend, prefer using the `Select` wrapper from `primitives/select` which
312
309
  * automatically injects these props via `ModalContext`.
313
310
  */
314
- export const SelectPrimitive = forwardRef<unknown, SelectPrimitiveProps>(({
315
- options,
316
- value,
317
- setValue,
318
- disabled,
319
- readOnly,
320
- error,
321
- suffix,
322
- className,
323
- components,
324
- isMulti,
325
- isClearable = true,
326
- menuPosition,
327
- getIsSelected,
328
- as,
329
- isRenderedInsideModal = false,
330
- menuPortalZIndex,
331
- ...props
332
- }, ref) => {
333
- const selectedOptions = useMemo(
334
- // this enables to override default selection mechanism (which compares option.value)
335
- () => (getIsSelected
336
- ? getIsSelected(options, value, isMulti)
337
- : selectDefaultGetIsSelected(options, value, isMulti)),
338
- [getIsSelected, options, value, isMulti],
339
- );
311
+ export const SelectPrimitive = forwardRef<unknown, SelectPrimitiveProps>(
312
+ (
313
+ {
314
+ options,
315
+ value,
316
+ setValue,
317
+ disabled,
318
+ readOnly,
319
+ error,
320
+ suffix,
321
+ className,
322
+ components,
323
+ isMulti,
324
+ isClearable = true,
325
+ menuPosition,
326
+ getIsSelected,
327
+ as,
328
+ isRenderedInsideModal = false,
329
+ menuPortalZIndex,
330
+ ...props
331
+ },
332
+ ref,
333
+ ) => {
334
+ const selectedOptions = useMemo(
335
+ // this enables to override default selection mechanism (which compares option.value)
336
+ () =>
337
+ getIsSelected
338
+ ? getIsSelected(options, value, isMulti)
339
+ : selectDefaultGetIsSelected(options, value, isMulti),
340
+ [getIsSelected, options, value, isMulti],
341
+ );
340
342
 
341
- const onSelect = useCallback((selected: SelectOption | SelectOption[] | null) => {
342
- if (!isMulti) {
343
- // We use empty string instead of null for empty values. The reason is that SimpleSchema field type
344
- // is usually string so for initial values, we set '' as initial value.
345
- // If we select & cancel some value, it should go back to ''
346
- setValue(selected ? (selected as SelectOption).value : '');
347
- return;
348
- }
349
- setValue((selected as SelectOption[]).map((option) => option.value));
350
- }, [setValue, isMulti]);
343
+ const onSelect = useCallback(
344
+ (selected: SelectOption | SelectOption[] | null) => {
345
+ if (!isMulti) {
346
+ // We use empty string instead of null for empty values. The reason is that SimpleSchema field type
347
+ // is usually string so for initial values, we set '' as initial value.
348
+ // If we select & cancel some value, it should go back to ''
349
+ setValue(selected ? (selected as SelectOption).value : '');
350
+ return;
351
+ }
352
+ setValue((selected as SelectOption[]).map((option) => option.value));
353
+ },
354
+ [setValue, isMulti],
355
+ );
351
356
 
352
- const effectiveMenuPosition = menuPosition || (isRenderedInsideModal ? 'fixed' : 'absolute');
353
- const resolvedMenuPortalZIndex = menuPortalZIndex
354
- ?? (isRenderedInsideModal ? DEFAULT_Z_INDEX_IN_MODAL : DEFAULT_Z_INDEX_OUTSIDE_MODAL);
357
+ const effectiveMenuPosition = menuPosition || (isRenderedInsideModal ? 'fixed' : 'absolute');
358
+ const resolvedMenuPortalZIndex =
359
+ menuPortalZIndex ?? (isRenderedInsideModal ? DEFAULT_Z_INDEX_IN_MODAL : DEFAULT_Z_INDEX_OUTSIDE_MODAL);
355
360
 
356
- const indicator = error && <XCircleIcon size="16" color={theme.color.danger.icon} className='error-svg' />;
361
+ const indicator = error && <XCircleIcon size="16" color={theme.color.danger.icon} className="error-svg" />;
357
362
 
358
- const Component = as || SelectComponent;
363
+ const Component = as || SelectComponent;
359
364
 
360
- return (
361
- <Component
362
- components={{
363
- DropdownIndicator,
364
- ClearIndicator,
365
- IndicatorSeparator,
366
- MultiValueRemove: SelectMultiValueRemove, // react-select slot name
367
- IndicatorsContainer,
368
- Option,
369
- Control: StyledControl,
370
- MenuPortal: StyledMenuPortal,
371
- ...components,
372
- }}
373
- ref={ref}
374
- openMenuOnFocus
375
- isDisabled={disabled || readOnly}
376
- error={error}
377
- options={options}
378
- closeMenuOnSelect={!isMulti}
379
- value={selectedOptions}
380
- isMulti={isMulti}
381
- isClearable={isClearable}
382
- onChange={onSelect}
383
- isRenderedInsideModal={isRenderedInsideModal}
384
- // Used by getMenuPortalZIndex fnc of StyledMenuPortal to determine z-index of the menu portal
385
- menuPortalZIndex={resolvedMenuPortalZIndex}
386
- menuPosition={effectiveMenuPosition}
387
- // If someone decides to debug this behavior, 'overflow: auto' on .Modal-content has huge effect on how menu renders
388
- menuShouldBlockScroll={isRenderedInsideModal} // Otherwise menu scrolls away in big modal
389
- indicator={indicator}
390
- suffix={suffix}
391
- styles={selectStyles}
392
- {...props}
393
- className={clsx(
394
- className,
395
- error && 'error',
396
- (disabled || readOnly) && 'disabled',
397
- )}
398
- />
399
- );
400
- });
365
+ return (
366
+ <Component
367
+ components={{
368
+ DropdownIndicator,
369
+ ClearIndicator,
370
+ IndicatorSeparator,
371
+ MultiValueRemove: SelectMultiValueRemove, // react-select slot name
372
+ IndicatorsContainer,
373
+ Option,
374
+ Control: StyledControl,
375
+ MenuPortal: StyledMenuPortal,
376
+ ...components,
377
+ }}
378
+ ref={ref}
379
+ openMenuOnFocus
380
+ isDisabled={disabled || readOnly}
381
+ error={error}
382
+ options={options}
383
+ closeMenuOnSelect={!isMulti}
384
+ value={selectedOptions}
385
+ isMulti={isMulti}
386
+ isClearable={isClearable}
387
+ onChange={onSelect}
388
+ isRenderedInsideModal={isRenderedInsideModal}
389
+ // Used by getMenuPortalZIndex fnc of StyledMenuPortal to determine z-index of the menu portal
390
+ menuPortalZIndex={resolvedMenuPortalZIndex}
391
+ menuPosition={effectiveMenuPosition}
392
+ // If someone decides to debug this behavior, 'overflow: auto' on .Modal-content has huge effect on how menu renders
393
+ menuShouldBlockScroll={isRenderedInsideModal} // Otherwise menu scrolls away in big modal
394
+ indicator={indicator}
395
+ suffix={suffix}
396
+ styles={selectStyles}
397
+ {...props}
398
+ className={clsx(className, error && 'error', (disabled || readOnly) && 'disabled')}
399
+ />
400
+ );
401
+ },
402
+ );
401
403
 
402
404
  SelectPrimitive.displayName = 'SelectPrimitive';
@@ -15,24 +15,33 @@ export default {
15
15
  };
16
16
 
17
17
  export const ShortcutComponent = () => {
18
- return (<div style={{ display: 'flex', flexDirection: 'column', gap: '8px' }}>
19
- Default:
20
- <div style={{ display: 'flex', gap: '4px', padding: '16px' }}>
21
- <Shortcut>F</Shortcut>
22
- <Shortcut>Ctrl / ⌘</Shortcut>
23
- <Shortcut>Shift</Shortcut>
18
+ return (
19
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '8px' }}>
20
+ Default:
21
+ <div style={{ display: 'flex', gap: '4px', padding: '16px' }}>
22
+ <Shortcut>F</Shortcut>
23
+ <Shortcut>Ctrl / ⌘</Shortcut>
24
+ <Shortcut>Shift</Shortcut>
25
+ </div>
26
+ Dark:
27
+ <div
28
+ style={{
29
+ display: 'flex',
30
+ gap: '4px',
31
+ backgroundColor: theme.colorPalette.dark.neutral950,
32
+ padding: '16px',
33
+ }}
34
+ >
35
+ <Shortcut dark>F</Shortcut>
36
+ <Shortcut dark>Ctrl / ⌘</Shortcut>
37
+ <Shortcut dark>Shift</Shortcut>
38
+ </div>
24
39
  </div>
25
- Dark:
26
- <div style={{ display: 'flex', gap: '4px', backgroundColor: theme.colorPalette.dark.neutral950, padding: '16px' }}>
27
- <Shortcut dark>F</Shortcut>
28
- <Shortcut dark>Ctrl / ⌘</Shortcut>
29
- <Shortcut dark>Shift</Shortcut>
30
- </div>
31
- </div>);
40
+ );
32
41
  };
33
42
 
34
43
  export const Playground = (args) => {
35
- return (<Shortcut {...args}/>);
44
+ return <Shortcut {...args} />;
36
45
  };
37
46
  Playground.args = {
38
47
  children: 'F',
@@ -36,20 +36,9 @@ const StyledShortcut = styled(Text)<{ $dark?: boolean }>`
36
36
  ${({ $dark }) => ($dark ? darkColors : adaptiveColors)}
37
37
  `;
38
38
 
39
- export const Shortcut = ({
40
- as,
41
- className,
42
- children,
43
- dark = false,
44
- }: ShortcutProps) => {
39
+ export const Shortcut = ({ as, className, children, dark = false }: ShortcutProps) => {
45
40
  return (
46
- <StyledShortcut
47
- forwardedAs={as}
48
- className={className}
49
- $dark={dark}
50
- type='code'
51
- size='small'
52
- weight='medium'>
41
+ <StyledShortcut forwardedAs={as} className={className} $dark={dark} type="code" size="small" weight="medium">
53
42
  {children}
54
43
  </StyledShortcut>
55
44
  );
@@ -1,10 +1,5 @@
1
- import {
2
- Box,
3
- } from '../box.js';
4
- import {
5
- SimpleMarkdown,
6
- type SimpleMarkdownProps,
7
- } from './simple_markdown.js';
1
+ import { Box } from '../box.js';
2
+ import { SimpleMarkdown, type SimpleMarkdownProps } from './simple_markdown.js';
8
3
 
9
4
  const testMarkdown = `
10
5
  Lorem ipsum **with bold** text and some *italic text*.
@@ -55,7 +50,7 @@ https://youtu.be/K76Hib0cY0k
55
50
 
56
51
  const Template = (props: SimpleMarkdownProps) => {
57
52
  return (
58
- <Box px='space32' py='space40' style={{ maxWidth: '850px' }}>
53
+ <Box px="space32" py="space40" style={{ maxWidth: '850px' }}>
59
54
  <SimpleMarkdown {...props} />
60
55
  </Box>
61
56
  );
@@ -67,5 +62,5 @@ export default {
67
62
  component: SimpleMarkdown as any,
68
63
  };
69
64
 
70
- export const MarkdownRegular = () => <Template size='regular'>{testMarkdown}</Template>;
71
- export const MarkdownSmall = () => <Template size='small'>{testMarkdown}</Template>;
65
+ export const MarkdownRegular = () => <Template size="regular">{testMarkdown}</Template>;
66
+ export const MarkdownSmall = () => <Template size="small">{testMarkdown}</Template>;