@apify/ui-library 0.51.6-featurepublishuilibrary-0a4729.38266

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 (349) hide show
  1. package/.eslintrc +39 -0
  2. package/.stylelintrc +12 -0
  3. package/CHANGELOG.md +2804 -0
  4. package/README.md +15 -0
  5. package/dist/src/components/action_link.d.ts +5 -0
  6. package/dist/src/components/action_link.d.ts.map +1 -0
  7. package/dist/src/components/action_link.jsx +35 -0
  8. package/dist/src/components/action_link.jsx.map +1 -0
  9. package/dist/src/components/actor_template_card.d.ts +10 -0
  10. package/dist/src/components/actor_template_card.d.ts.map +1 -0
  11. package/dist/src/components/actor_template_card.jsx +73 -0
  12. package/dist/src/components/actor_template_card.jsx.map +1 -0
  13. package/dist/src/components/badge.d.ts +26 -0
  14. package/dist/src/components/badge.d.ts.map +1 -0
  15. package/dist/src/components/badge.jsx +96 -0
  16. package/dist/src/components/badge.jsx.map +1 -0
  17. package/dist/src/components/banner.d.ts +11 -0
  18. package/dist/src/components/banner.d.ts.map +1 -0
  19. package/dist/src/components/banner.jsx +73 -0
  20. package/dist/src/components/banner.jsx.map +1 -0
  21. package/dist/src/components/blog_article.d.ts +9 -0
  22. package/dist/src/components/blog_article.d.ts.map +1 -0
  23. package/dist/src/components/blog_article.jsx +73 -0
  24. package/dist/src/components/blog_article.jsx.map +1 -0
  25. package/dist/src/components/box.d.ts +41 -0
  26. package/dist/src/components/box.d.ts.map +1 -0
  27. package/dist/src/components/box.jsx +48 -0
  28. package/dist/src/components/box.jsx.map +1 -0
  29. package/dist/src/components/button.d.ts +35 -0
  30. package/dist/src/components/button.d.ts.map +1 -0
  31. package/dist/src/components/button.jsx +193 -0
  32. package/dist/src/components/button.jsx.map +1 -0
  33. package/dist/src/components/chip.d.ts +52 -0
  34. package/dist/src/components/chip.d.ts.map +1 -0
  35. package/dist/src/components/chip.jsx +89 -0
  36. package/dist/src/components/chip.jsx.map +1 -0
  37. package/dist/src/components/code/action_button.d.ts +11 -0
  38. package/dist/src/components/code/action_button.d.ts.map +1 -0
  39. package/dist/src/components/code/action_button.jsx +67 -0
  40. package/dist/src/components/code/action_button.jsx.map +1 -0
  41. package/dist/src/components/code/code_block/code_block.d.ts +38 -0
  42. package/dist/src/components/code/code_block/code_block.d.ts.map +1 -0
  43. package/dist/src/components/code/code_block/code_block.jsx +99 -0
  44. package/dist/src/components/code/code_block/code_block.jsx.map +1 -0
  45. package/dist/src/components/code/code_block/code_block.styled.d.ts +13 -0
  46. package/dist/src/components/code/code_block/code_block.styled.d.ts.map +1 -0
  47. package/dist/src/components/code/code_block/code_block.styled.jsx +215 -0
  48. package/dist/src/components/code/code_block/code_block.styled.jsx.map +1 -0
  49. package/dist/src/components/code/code_block/utils.d.ts +2 -0
  50. package/dist/src/components/code/code_block/utils.d.ts.map +1 -0
  51. package/dist/src/components/code/code_block/utils.js +20 -0
  52. package/dist/src/components/code/code_block/utils.js.map +1 -0
  53. package/dist/src/components/code/index.d.ts +4 -0
  54. package/dist/src/components/code/index.d.ts.map +1 -0
  55. package/dist/src/components/code/index.js +4 -0
  56. package/dist/src/components/code/index.js.map +1 -0
  57. package/dist/src/components/code/inline_code/inline_code.d.ts +11 -0
  58. package/dist/src/components/code/inline_code/inline_code.d.ts.map +1 -0
  59. package/dist/src/components/code/inline_code/inline_code.jsx +24 -0
  60. package/dist/src/components/code/inline_code/inline_code.jsx.map +1 -0
  61. package/dist/src/components/code/one_line_code/one_line_code.d.ts +27 -0
  62. package/dist/src/components/code/one_line_code/one_line_code.d.ts.map +1 -0
  63. package/dist/src/components/code/one_line_code/one_line_code.jsx +157 -0
  64. package/dist/src/components/code/one_line_code/one_line_code.jsx.map +1 -0
  65. package/dist/src/components/code/syntax_highlighter.d.ts +16 -0
  66. package/dist/src/components/code/syntax_highlighter.d.ts.map +1 -0
  67. package/dist/src/components/code/syntax_highlighter.jsx +94 -0
  68. package/dist/src/components/code/syntax_highlighter.jsx.map +1 -0
  69. package/dist/src/components/color_wheel_gradient.d.ts +9 -0
  70. package/dist/src/components/color_wheel_gradient.d.ts.map +1 -0
  71. package/dist/src/components/color_wheel_gradient.jsx +23 -0
  72. package/dist/src/components/color_wheel_gradient.jsx.map +1 -0
  73. package/dist/src/components/floating/index.d.ts +4 -0
  74. package/dist/src/components/floating/index.d.ts.map +1 -0
  75. package/dist/src/components/floating/index.js +4 -0
  76. package/dist/src/components/floating/index.js.map +1 -0
  77. package/dist/src/components/floating/menu.d.ts +33 -0
  78. package/dist/src/components/floating/menu.d.ts.map +1 -0
  79. package/dist/src/components/floating/menu.jsx +95 -0
  80. package/dist/src/components/floating/menu.jsx.map +1 -0
  81. package/dist/src/components/floating/menu_common.d.ts +42 -0
  82. package/dist/src/components/floating/menu_common.d.ts.map +1 -0
  83. package/dist/src/components/floating/menu_common.jsx +20 -0
  84. package/dist/src/components/floating/menu_common.jsx.map +1 -0
  85. package/dist/src/components/floating/menu_components.d.ts +29 -0
  86. package/dist/src/components/floating/menu_components.d.ts.map +1 -0
  87. package/dist/src/components/floating/menu_components.jsx +73 -0
  88. package/dist/src/components/floating/menu_components.jsx.map +1 -0
  89. package/dist/src/components/image.d.ts +12 -0
  90. package/dist/src/components/image.d.ts.map +1 -0
  91. package/dist/src/components/image.jsx +8 -0
  92. package/dist/src/components/image.jsx.map +1 -0
  93. package/dist/src/components/index.d.ts +21 -0
  94. package/dist/src/components/index.d.ts.map +1 -0
  95. package/dist/src/components/index.js +21 -0
  96. package/dist/src/components/index.js.map +1 -0
  97. package/dist/src/components/link.d.ts +24 -0
  98. package/dist/src/components/link.d.ts.map +1 -0
  99. package/dist/src/components/link.jsx +67 -0
  100. package/dist/src/components/link.jsx.map +1 -0
  101. package/dist/src/components/message.d.ts +31 -0
  102. package/dist/src/components/message.d.ts.map +1 -0
  103. package/dist/src/components/message.jsx +105 -0
  104. package/dist/src/components/message.jsx.map +1 -0
  105. package/dist/src/components/readme_renderer/index.d.ts +4 -0
  106. package/dist/src/components/readme_renderer/index.d.ts.map +1 -0
  107. package/dist/src/components/readme_renderer/index.js +4 -0
  108. package/dist/src/components/readme_renderer/index.js.map +1 -0
  109. package/dist/src/components/readme_renderer/pythonize_value.d.ts +3 -0
  110. package/dist/src/components/readme_renderer/pythonize_value.d.ts.map +1 -0
  111. package/dist/src/components/readme_renderer/pythonize_value.js +81 -0
  112. package/dist/src/components/readme_renderer/pythonize_value.js.map +1 -0
  113. package/dist/src/components/readme_renderer/table_of_contents.d.ts +10 -0
  114. package/dist/src/components/readme_renderer/table_of_contents.d.ts.map +1 -0
  115. package/dist/src/components/readme_renderer/table_of_contents.jsx +197 -0
  116. package/dist/src/components/readme_renderer/table_of_contents.jsx.map +1 -0
  117. package/dist/src/components/readme_renderer/utils.d.ts +6 -0
  118. package/dist/src/components/readme_renderer/utils.d.ts.map +1 -0
  119. package/dist/src/components/readme_renderer/utils.jsx +42 -0
  120. package/dist/src/components/readme_renderer/utils.jsx.map +1 -0
  121. package/dist/src/components/simple_markdown/index.d.ts +3 -0
  122. package/dist/src/components/simple_markdown/index.d.ts.map +1 -0
  123. package/dist/src/components/simple_markdown/index.jsx +3 -0
  124. package/dist/src/components/simple_markdown/index.jsx.map +1 -0
  125. package/dist/src/components/simple_markdown/simple_markdown.d.ts +16 -0
  126. package/dist/src/components/simple_markdown/simple_markdown.d.ts.map +1 -0
  127. package/dist/src/components/simple_markdown/simple_markdown.jsx +137 -0
  128. package/dist/src/components/simple_markdown/simple_markdown.jsx.map +1 -0
  129. package/dist/src/components/simple_markdown/simple_markdown_components.d.ts +26 -0
  130. package/dist/src/components/simple_markdown/simple_markdown_components.d.ts.map +1 -0
  131. package/dist/src/components/simple_markdown/simple_markdown_components.jsx +193 -0
  132. package/dist/src/components/simple_markdown/simple_markdown_components.jsx.map +1 -0
  133. package/dist/src/components/tag.d.ts +38 -0
  134. package/dist/src/components/tag.d.ts.map +1 -0
  135. package/dist/src/components/tag.jsx +126 -0
  136. package/dist/src/components/tag.jsx.map +1 -0
  137. package/dist/src/components/text/heading_content.d.ts +10 -0
  138. package/dist/src/components/text/heading_content.d.ts.map +1 -0
  139. package/dist/src/components/text/heading_content.jsx +31 -0
  140. package/dist/src/components/text/heading_content.jsx.map +1 -0
  141. package/dist/src/components/text/heading_marketing.d.ts +10 -0
  142. package/dist/src/components/text/heading_marketing.d.ts.map +1 -0
  143. package/dist/src/components/text/heading_marketing.jsx +31 -0
  144. package/dist/src/components/text/heading_marketing.jsx.map +1 -0
  145. package/dist/src/components/text/heading_shared.d.ts +10 -0
  146. package/dist/src/components/text/heading_shared.d.ts.map +1 -0
  147. package/dist/src/components/text/heading_shared.jsx +32 -0
  148. package/dist/src/components/text/heading_shared.jsx.map +1 -0
  149. package/dist/src/components/text/index.d.ts +12 -0
  150. package/dist/src/components/text/index.d.ts.map +1 -0
  151. package/dist/src/components/text/index.js +11 -0
  152. package/dist/src/components/text/index.js.map +1 -0
  153. package/dist/src/components/text/text_base.d.ts +13 -0
  154. package/dist/src/components/text/text_base.d.ts.map +1 -0
  155. package/dist/src/components/text/text_base.jsx +23 -0
  156. package/dist/src/components/text/text_base.jsx.map +1 -0
  157. package/dist/src/components/text/text_content.d.ts +11 -0
  158. package/dist/src/components/text/text_content.d.ts.map +1 -0
  159. package/dist/src/components/text/text_content.jsx +68 -0
  160. package/dist/src/components/text/text_content.jsx.map +1 -0
  161. package/dist/src/components/text/text_marketing.d.ts +11 -0
  162. package/dist/src/components/text/text_marketing.d.ts.map +1 -0
  163. package/dist/src/components/text/text_marketing.jsx +116 -0
  164. package/dist/src/components/text/text_marketing.jsx.map +1 -0
  165. package/dist/src/components/text/text_shared.d.ts +14 -0
  166. package/dist/src/components/text/text_shared.d.ts.map +1 -0
  167. package/dist/src/components/text/text_shared.jsx +55 -0
  168. package/dist/src/components/text/text_shared.jsx.map +1 -0
  169. package/dist/src/components/tile/horizontal_tile.d.ts +9 -0
  170. package/dist/src/components/tile/horizontal_tile.d.ts.map +1 -0
  171. package/dist/src/components/tile/horizontal_tile.jsx +43 -0
  172. package/dist/src/components/tile/horizontal_tile.jsx.map +1 -0
  173. package/dist/src/components/tile/index.d.ts +3 -0
  174. package/dist/src/components/tile/index.d.ts.map +1 -0
  175. package/dist/src/components/tile/index.js +3 -0
  176. package/dist/src/components/tile/index.js.map +1 -0
  177. package/dist/src/components/tile/shared.d.ts +17 -0
  178. package/dist/src/components/tile/shared.d.ts.map +1 -0
  179. package/dist/src/components/tile/shared.js +12 -0
  180. package/dist/src/components/tile/shared.js.map +1 -0
  181. package/dist/src/components/tile/vertical_tile.d.ts +10 -0
  182. package/dist/src/components/tile/vertical_tile.d.ts.map +1 -0
  183. package/dist/src/components/tile/vertical_tile.jsx +32 -0
  184. package/dist/src/components/tile/vertical_tile.jsx.map +1 -0
  185. package/dist/src/components/to_consolidate/card.d.ts +27 -0
  186. package/dist/src/components/to_consolidate/card.d.ts.map +1 -0
  187. package/dist/src/components/to_consolidate/card.jsx +93 -0
  188. package/dist/src/components/to_consolidate/card.jsx.map +1 -0
  189. package/dist/src/components/to_consolidate/index.d.ts +5 -0
  190. package/dist/src/components/to_consolidate/index.d.ts.map +1 -0
  191. package/dist/src/components/to_consolidate/index.js +5 -0
  192. package/dist/src/components/to_consolidate/index.js.map +1 -0
  193. package/dist/src/components/to_consolidate/markdown.d.ts +40 -0
  194. package/dist/src/components/to_consolidate/markdown.d.ts.map +1 -0
  195. package/dist/src/components/to_consolidate/markdown.jsx +454 -0
  196. package/dist/src/components/to_consolidate/markdown.jsx.map +1 -0
  197. package/dist/src/components/to_consolidate/pagination.d.ts +8 -0
  198. package/dist/src/components/to_consolidate/pagination.d.ts.map +1 -0
  199. package/dist/src/components/to_consolidate/pagination.jsx +88 -0
  200. package/dist/src/components/to_consolidate/pagination.jsx.map +1 -0
  201. package/dist/src/components/to_consolidate/tab_number_chip.d.ts +7 -0
  202. package/dist/src/components/to_consolidate/tab_number_chip.d.ts.map +1 -0
  203. package/dist/src/components/to_consolidate/tab_number_chip.jsx +22 -0
  204. package/dist/src/components/to_consolidate/tab_number_chip.jsx.map +1 -0
  205. package/dist/src/design_system/colors_theme.d.ts +213 -0
  206. package/dist/src/design_system/colors_theme.d.ts.map +1 -0
  207. package/dist/src/design_system/colors_theme.js +213 -0
  208. package/dist/src/design_system/colors_theme.js.map +1 -0
  209. package/dist/src/design_system/properties_theme.d.ts +175 -0
  210. package/dist/src/design_system/properties_theme.d.ts.map +1 -0
  211. package/dist/src/design_system/properties_theme.js +315 -0
  212. package/dist/src/design_system/properties_theme.js.map +1 -0
  213. package/dist/src/design_system/theme.d.ts +630 -0
  214. package/dist/src/design_system/theme.d.ts.map +1 -0
  215. package/dist/src/design_system/theme.js +17 -0
  216. package/dist/src/design_system/theme.js.map +1 -0
  217. package/dist/src/design_system/tokens/index.d.ts +6 -0
  218. package/dist/src/design_system/tokens/index.d.ts.map +1 -0
  219. package/dist/src/design_system/tokens/index.js +6 -0
  220. package/dist/src/design_system/tokens/index.js.map +1 -0
  221. package/dist/src/design_system/tokens/layouts.d.ts +29 -0
  222. package/dist/src/design_system/tokens/layouts.d.ts.map +1 -0
  223. package/dist/src/design_system/tokens/layouts.js +29 -0
  224. package/dist/src/design_system/tokens/layouts.js.map +1 -0
  225. package/dist/src/design_system/tokens/radiuses.d.ts +23 -0
  226. package/dist/src/design_system/tokens/radiuses.d.ts.map +1 -0
  227. package/dist/src/design_system/tokens/radiuses.js +23 -0
  228. package/dist/src/design_system/tokens/radiuses.js.map +1 -0
  229. package/dist/src/design_system/tokens/shadows.d.ts +23 -0
  230. package/dist/src/design_system/tokens/shadows.d.ts.map +1 -0
  231. package/dist/src/design_system/tokens/shadows.js +23 -0
  232. package/dist/src/design_system/tokens/shadows.js.map +1 -0
  233. package/dist/src/design_system/tokens/spaces.d.ts +15 -0
  234. package/dist/src/design_system/tokens/spaces.d.ts.map +1 -0
  235. package/dist/src/design_system/tokens/spaces.js +14 -0
  236. package/dist/src/design_system/tokens/spaces.js.map +1 -0
  237. package/dist/src/design_system/tokens/transitions.d.ts +20 -0
  238. package/dist/src/design_system/tokens/transitions.d.ts.map +1 -0
  239. package/dist/src/design_system/tokens/transitions.js +20 -0
  240. package/dist/src/design_system/tokens/transitions.js.map +1 -0
  241. package/dist/src/design_system/typography_theme.d.ts +189 -0
  242. package/dist/src/design_system/typography_theme.d.ts.map +1 -0
  243. package/dist/src/design_system/typography_theme.js +190 -0
  244. package/dist/src/design_system/typography_theme.js.map +1 -0
  245. package/dist/src/index.d.ts +7 -0
  246. package/dist/src/index.d.ts.map +1 -0
  247. package/dist/src/index.js +7 -0
  248. package/dist/src/index.js.map +1 -0
  249. package/dist/src/type_utils.d.ts +6 -0
  250. package/dist/src/type_utils.d.ts.map +1 -0
  251. package/dist/src/type_utils.js +2 -0
  252. package/dist/src/type_utils.js.map +1 -0
  253. package/dist/src/ui_dependency_provider.d.ts +29 -0
  254. package/dist/src/ui_dependency_provider.d.ts.map +1 -0
  255. package/dist/src/ui_dependency_provider.jsx +14 -0
  256. package/dist/src/ui_dependency_provider.jsx.map +1 -0
  257. package/dist/src/utils/copy_to_clipboard.d.ts +7 -0
  258. package/dist/src/utils/copy_to_clipboard.d.ts.map +1 -0
  259. package/dist/src/utils/copy_to_clipboard.js +16 -0
  260. package/dist/src/utils/copy_to_clipboard.js.map +1 -0
  261. package/dist/src/utils/image_color.d.ts +7 -0
  262. package/dist/src/utils/image_color.d.ts.map +1 -0
  263. package/dist/src/utils/image_color.js +35 -0
  264. package/dist/src/utils/image_color.js.map +1 -0
  265. package/dist/src/utils/index.d.ts +4 -0
  266. package/dist/src/utils/index.d.ts.map +1 -0
  267. package/dist/src/utils/index.js +4 -0
  268. package/dist/src/utils/index.js.map +1 -0
  269. package/dist/src/utils/sanitization.d.ts +11 -0
  270. package/dist/src/utils/sanitization.d.ts.map +1 -0
  271. package/dist/src/utils/sanitization.js +16 -0
  272. package/dist/src/utils/sanitization.js.map +1 -0
  273. package/dist/tsconfig.build.tsbuildinfo +1 -0
  274. package/package.json +71 -0
  275. package/src/codemods/generate_color_property_tokens.mjs +97 -0
  276. package/src/codemods/generate_color_theme_files.mjs +46 -0
  277. package/src/codemods/generate_typograpy_tokens_files.mjs +136 -0
  278. package/src/components/action_link.tsx +59 -0
  279. package/src/components/actor_template_card.tsx +99 -0
  280. package/src/components/badge.tsx +144 -0
  281. package/src/components/banner.tsx +95 -0
  282. package/src/components/blog_article.tsx +85 -0
  283. package/src/components/box.tsx +127 -0
  284. package/src/components/button.tsx +303 -0
  285. package/src/components/chip.tsx +121 -0
  286. package/src/components/code/action_button.tsx +96 -0
  287. package/src/components/code/code_block/code_block.styled.tsx +228 -0
  288. package/src/components/code/code_block/code_block.tsx +235 -0
  289. package/src/components/code/code_block/utils.ts +19 -0
  290. package/src/components/code/index.ts +3 -0
  291. package/src/components/code/inline_code/inline_code.tsx +44 -0
  292. package/src/components/code/one_line_code/one_line_code.tsx +232 -0
  293. package/src/components/code/syntax_highlighter.tsx +125 -0
  294. package/src/components/color_wheel_gradient.tsx +31 -0
  295. package/src/components/floating/index.ts +3 -0
  296. package/src/components/floating/menu.tsx +191 -0
  297. package/src/components/floating/menu_common.tsx +31 -0
  298. package/src/components/floating/menu_components.tsx +94 -0
  299. package/src/components/image.tsx +23 -0
  300. package/src/components/index.ts +20 -0
  301. package/src/components/link.tsx +114 -0
  302. package/src/components/message.tsx +157 -0
  303. package/src/components/readme_renderer/index.ts +3 -0
  304. package/src/components/readme_renderer/pythonize_value.ts +78 -0
  305. package/src/components/readme_renderer/table_of_contents.tsx +257 -0
  306. package/src/components/readme_renderer/utils.tsx +46 -0
  307. package/src/components/simple_markdown/index.tsx +2 -0
  308. package/src/components/simple_markdown/simple_markdown.tsx +181 -0
  309. package/src/components/simple_markdown/simple_markdown_components.tsx +295 -0
  310. package/src/components/tag.tsx +185 -0
  311. package/src/components/text/heading_content.tsx +56 -0
  312. package/src/components/text/heading_marketing.tsx +55 -0
  313. package/src/components/text/heading_shared.tsx +57 -0
  314. package/src/components/text/index.ts +18 -0
  315. package/src/components/text/text_base.tsx +52 -0
  316. package/src/components/text/text_content.tsx +104 -0
  317. package/src/components/text/text_marketing.tsx +152 -0
  318. package/src/components/text/text_shared.tsx +96 -0
  319. package/src/components/tile/horizontal_tile.tsx +76 -0
  320. package/src/components/tile/index.ts +2 -0
  321. package/src/components/tile/shared.ts +27 -0
  322. package/src/components/tile/vertical_tile.tsx +58 -0
  323. package/src/components/to_consolidate/card.tsx +141 -0
  324. package/src/components/to_consolidate/index.ts +4 -0
  325. package/src/components/to_consolidate/markdown.tsx +593 -0
  326. package/src/components/to_consolidate/pagination.tsx +139 -0
  327. package/src/components/to_consolidate/tab_number_chip.tsx +31 -0
  328. package/src/design_system/colors_theme.ts +213 -0
  329. package/src/design_system/generate_color_definitions.js +43 -0
  330. package/src/design_system/properties_theme.ts +453 -0
  331. package/src/design_system/supernova_color_tokens.json +1766 -0
  332. package/src/design_system/supernova_typography_tokens.json +657 -0
  333. package/src/design_system/theme.ts +26 -0
  334. package/src/design_system/tokens/index.ts +5 -0
  335. package/src/design_system/tokens/layouts.ts +29 -0
  336. package/src/design_system/tokens/radiuses.ts +22 -0
  337. package/src/design_system/tokens/shadows.ts +22 -0
  338. package/src/design_system/tokens/spaces.ts +15 -0
  339. package/src/design_system/tokens/transitions.ts +19 -0
  340. package/src/design_system/typography_theme.ts +197 -0
  341. package/src/index.ts +7 -0
  342. package/src/type_utils.ts +7 -0
  343. package/src/ui_dependency_provider.tsx +50 -0
  344. package/src/utils/copy_to_clipboard.ts +24 -0
  345. package/src/utils/image_color.ts +44 -0
  346. package/src/utils/index.ts +3 -0
  347. package/src/utils/sanitization.ts +14 -0
  348. package/tsconfig.build.json +18 -0
  349. package/tsconfig.json +10 -0
package/README.md ADDED
@@ -0,0 +1,15 @@
1
+ # Shared UI components library
2
+
3
+ The principle of this library is to provide a set of components that can be used across multiple projects, and to ensure that the components are consistent in terms of design and functionality. The components are built using React and styled-components.
4
+
5
+ ## Development
6
+
7
+ 1. **This is a public package** - it shouldn't have any relation or dependency to Apify internal logic - we want to use it across our repositories and some of them might be public.
8
+
9
+ 2. **Shared logic with web and docs** - If you’re changing any shared logic with the web that might affect the behavior, performance, or SEO, you need to always test it on both applications before it’s merged and published as a new version of the packages and after it’s done it’s your duty to make sure there are the latest versions within both repositories.
10
+
11
+ 3. **Purpose and documentation** - there should be a clear purpose for each component and the component should be properly documented - both code and storybook.
12
+
13
+ 4. **Architecture design and dependencies** - No technology-specific logic. We don’t want to use anything technology or codebase-specific (such as Meteor, React router, Next …) as there might be different approaches for the technology where the component is used (examples as linking logic - in Next.js there is Next Link component, same of Next Image instead of using normal <img /> tag). This kind of behavior should not happen on the component level. Browser vs. server - some of the components might be used on the web with SSR (Server Side Renderings) and such a component can’t be using browser-specific features (such as accessing window.location)
14
+
15
+ 5. **Supernova tokens update** - New supernova tokens are available in `supernova_color_tokens.ts` and `supernova_typography_tokens.json`, specific code is generated with `npm run generate-theme` command
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { type LinkProps } from './link';
3
+ export declare const ActionLink: React.FC<LinkProps>;
4
+ export declare const BackLink: React.FC<LinkProps>;
5
+ //# sourceMappingURL=action_link.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action_link.d.ts","sourceRoot":"","sources":["../../../src/components/action_link.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAC;AAmB9C,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAe1C,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAexC,CAAC"}
@@ -0,0 +1,35 @@
1
+ import React from 'react';
2
+ import styled from 'styled-components';
3
+ import { ArrowLeft16, ArrowRight16 } from '@apify/icons';
4
+ import { theme } from '../design_system/theme';
5
+ import { Box } from './box';
6
+ import { Link } from './link';
7
+ import { Heading } from './text';
8
+ const StyledGuidepost = styled(Box) `
9
+ display: inline-flex;
10
+ align-items: center;
11
+ color: ${theme.color.neutral.text};
12
+
13
+ svg {
14
+ transition: transform 0.2s ease-in-out;
15
+ }
16
+
17
+ &:hover {
18
+ svg {
19
+ transform: translate(${({ $isBackLink }) => ($isBackLink ? -3 : 3)}px, 0);
20
+ }
21
+ }
22
+ `;
23
+ export const ActionLink = ({ children, as, ...rest }) => {
24
+ return (<StyledGuidepost forwardedAs={as || Link} $isBackLink={false} {...rest}>
25
+ <Heading as='span' type='titleM'>{children}</Heading>
26
+ <ArrowRight16 />
27
+ </StyledGuidepost>);
28
+ };
29
+ export const BackLink = ({ children, as, ...rest }) => {
30
+ return (<StyledGuidepost forwardedAs={as || Link} $isBackLink={true} {...rest}>
31
+ <ArrowLeft16 />
32
+ <Heading as='span' type='titleM'>{children}</Heading>
33
+ </StyledGuidepost>);
34
+ };
35
+ //# sourceMappingURL=action_link.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action_link.jsx","sourceRoot":"","sources":["../../../src/components/action_link.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEzD,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,IAAI,EAAkB,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEjC,MAAM,eAAe,GAAG,MAAM,CAAC,GAAG,CAAC,CAA0B;;;aAGhD,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI;;;;;;;;mCAQF,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;;;CAG7E,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAwB,CAAC,EAC5C,QAAQ,EACR,EAAE,EACF,GAAG,IAAI,EACV,EAAE,EAAE;IACD,OAAO,CACH,CAAC,eAAe,CACZ,WAAW,CAAC,CAAC,EAAE,IAAI,IAAI,CAAC,CACxB,WAAW,CAAC,CAAC,KAAK,CAAC,CACnB,IAAI,IAAI,CAAC,CAET;YAAA,CAAC,OAAO,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,EAAE,OAAO,CACpD;YAAA,CAAC,YAAY,CAAC,AAAD,EACjB;QAAA,EAAE,eAAe,CAAC,CACrB,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAwB,CAAC,EAC1C,QAAQ,EACR,EAAE,EACF,GAAG,IAAI,EACV,EAAE,EAAE;IACD,OAAO,CACH,CAAC,eAAe,CACZ,WAAW,CAAC,CAAC,EAAE,IAAI,IAAI,CAAC,CACxB,WAAW,CAAC,CAAC,IAAI,CAAC,CAClB,IAAI,IAAI,CAAC,CAET;YAAA,CAAC,WAAW,CAAC,AAAD,EACZ;YAAA,CAAC,OAAO,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,EAAE,OAAO,CACxD;QAAA,EAAE,eAAe,CAAC,CACrB,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ interface ActorTemplateCardProps {
3
+ id: string;
4
+ label: string;
5
+ description: string;
6
+ icons: React.ReactNode[];
7
+ }
8
+ export declare const ActorTemplateCard: React.FC<ActorTemplateCardProps>;
9
+ export {};
10
+ //# sourceMappingURL=actor_template_card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actor_template_card.d.ts","sourceRoot":"","sources":["../../../src/components/actor_template_card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,UAAU,sBAAsB;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC;CAC5B;AA6DD,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAyB9D,CAAC"}
@@ -0,0 +1,73 @@
1
+ import React from 'react';
2
+ import styled from 'styled-components';
3
+ import { theme } from '../design_system/theme';
4
+ import { TextBaseComponent } from './text/text_base';
5
+ import { VerticalTile } from './tile';
6
+ const WrapperClasses = {
7
+ TEMPLATE_CARD_IMAGES: 'TemplateCard-Images',
8
+ TEMPLATE_CARD_TEXT: 'TemplateCard-Text',
9
+ };
10
+ const Text = styled(TextBaseComponent) `
11
+ ${theme.typography.marketing.mobile.bodyM}
12
+ color: ${theme.color.neutral.textMuted};
13
+ overflow: hidden;
14
+ text-overflow: ellipsis;
15
+ display: -webkit-box;
16
+ -webkit-line-clamp: 3;
17
+ -webkit-box-orient: vertical;
18
+
19
+ @media ${theme.layout.tablet} {
20
+ ${theme.typography.marketing.tablet.bodyM}
21
+ }
22
+
23
+ @media ${theme.layout.desktop} {
24
+ ${theme.typography.marketing.desktop.bodyM}
25
+ }
26
+ `;
27
+ const Heading = styled(TextBaseComponent) `
28
+ ${theme.typography.marketing.mobile.titleXs}
29
+ color: ${theme.color.neutral.text};
30
+
31
+ @media ${theme.layout.tablet} {
32
+ ${theme.typography.marketing.tablet.titleXs}
33
+ }
34
+
35
+ @media ${theme.layout.desktop} {
36
+ ${theme.typography.marketing.desktop.titleXs}
37
+ }
38
+ `;
39
+ const TemplateCardContentWrapper = styled.div `
40
+ display: flex;
41
+ flex-direction: column;
42
+ align-items: flex-start;
43
+ align-self: stretch;
44
+ flex: 1 0 0;
45
+ gap: ${theme.space.space16};
46
+
47
+ .${WrapperClasses.TEMPLATE_CARD_IMAGES} {
48
+ display: flex;
49
+ align-items: flex-start;
50
+ gap: ${theme.space.space16};
51
+ }
52
+
53
+ .${WrapperClasses.TEMPLATE_CARD_TEXT} {
54
+ display: flex;
55
+ flex-direction: column;
56
+ align-items: flex-start;
57
+ align-self: stretch;
58
+ gap: ${theme.space.space4};
59
+ }
60
+ `;
61
+ export const ActorTemplateCard = ({ id, label, description, icons, }) => {
62
+ const templateCardContent = (<TemplateCardContentWrapper>
63
+ <div className={WrapperClasses.TEMPLATE_CARD_IMAGES}>
64
+ {icons}
65
+ </div>
66
+ <div className={WrapperClasses.TEMPLATE_CARD_TEXT}>
67
+ <Heading>{label}</Heading>
68
+ <Text>{description}</Text>
69
+ </div>
70
+ </TemplateCardContentWrapper>);
71
+ return (<VerticalTile id={`actor-template-card-${id}`} content={templateCardContent} isClickable/>);
72
+ };
73
+ //# sourceMappingURL=actor_template_card.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actor_template_card.jsx","sourceRoot":"","sources":["../../../src/components/actor_template_card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAStC,MAAM,cAAc,GAAG;IACnB,oBAAoB,EAAE,qBAAqB;IAC3C,kBAAkB,EAAE,mBAAmB;CAC1C,CAAC;AAEF,MAAM,IAAI,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAA;MAChC,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK;aAChC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS;;;;;;;aAO7B,KAAK,CAAC,MAAM,CAAC,MAAM;UACtB,KAAK,CAAC,UAAU,CAA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,EAAE,IAAI,CAC7B;YAAA,EAAE,GAAG,CACT;QAAA,EAAE,0BAA0B,CAAC,CAChC,CAAC;IAEF,OAAO,CACH,CAAC,YAAY,CACT,EAAE,CAAC,CAAC,uBAAuB,EAAE,EAAE,CAAC,CAChC,OAAO,CAAC,CAAC,mBAAmB,CAAC,CAC7B,WAAW,EACb,CACL,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ import type { IconComponent } from '@apify/ui-icons';
3
+ import { type RegularBoxProps, type MarginSpacingProps } from './box';
4
+ type BadgeSize = typeof BADGE_SIZES[number];
5
+ export declare const BADGE_SIZES: readonly ["medium", "small"];
6
+ type BadgeVariant = typeof BADGE_VARIANTS[number];
7
+ export declare const BADGE_VARIANTS: readonly ["neutral", "neutral_muted", "neutral_subtle", "primary_black", "primary_blue", "success", "warning", "danger"];
8
+ export type BadgeProps = Omit<RegularBoxProps, 'onClick'> & MarginSpacingProps & {
9
+ as?: Exclude<React.ElementType, 'a' | 'button'>;
10
+ size?: BadgeSize;
11
+ variant?: BadgeVariant;
12
+ LeadingIcon?: IconComponent;
13
+ code?: boolean;
14
+ };
15
+ /**
16
+ * Component for displaying non-interactive chip descendant.
17
+ */
18
+ export declare const Badge: React.ForwardRefExoticComponent<Omit<RegularBoxProps, "onClick"> & MarginSpacingProps & {
19
+ as?: Exclude<React.ElementType, "a" | "button">;
20
+ size?: BadgeSize;
21
+ variant?: BadgeVariant;
22
+ LeadingIcon?: IconComponent;
23
+ code?: boolean;
24
+ } & React.RefAttributes<unknown>>;
25
+ export {};
26
+ //# sourceMappingURL=badge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../src/components/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAG1C,OAAO,KAAK,EAAE,aAAa,EAAY,MAAM,iBAAiB,CAAC;AAI/D,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,kBAAkB,EAAO,MAAM,OAAO,CAAC;AAE3E,KAAK,SAAS,GAAG,OAAO,WAAW,CAAC,MAAM,CAAC,CAAC;AAE5C,eAAO,MAAM,WAAW,8BAA+B,CAAC;AA2BxD,KAAK,YAAY,GAAG,OAAO,cAAc,CAAC,MAAM,CAAC,CAAC;AAElD,eAAO,MAAM,cAAc,0HAA2H,CAAC;AAkEvJ,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,GAAG,kBAAkB,GAAG;IAC/E,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,WAAW,EAAE,GAAG,GAAG,QAAQ,CAAC,CAAC;IAChD,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,WAAW,CAAC,EAAE,aAAa,CAAC;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,KAAK;SAVX,OAAO,CAAC,KAAK,CAAC,WAAW,EAAE,GAAG,GAAG,QAAQ,CAAC;WACxC,SAAS;cACN,YAAY;kBACR,aAAa;WACpB,OAAO;iCA8Bf,CAAC"}
@@ -0,0 +1,96 @@
1
+ import React, { forwardRef } from 'react';
2
+ import styled, { css } from 'styled-components';
3
+ import { theme } from '../design_system/theme';
4
+ import { Box } from './box';
5
+ export const BADGE_SIZES = ['medium', 'small'];
6
+ const BADGE_ICON_SIZES = {
7
+ medium: '16',
8
+ small: '12',
9
+ };
10
+ const badgeSizeStyle = {
11
+ medium: ($code) => css `
12
+ padding: ${theme.space.space4} ${theme.space.space8};
13
+ border-radius: ${theme.radius.radius6};
14
+ ${$code
15
+ ? theme.typography.shared.desktop.codeMMedium
16
+ : theme.typography.shared.desktop.bodyMMedium}
17
+ `,
18
+ small: ($code) => css `
19
+ height: 2rem;
20
+ padding: ${theme.space.space2} ${theme.space.space6};
21
+ border-radius: ${theme.radius.radius4};
22
+ ${$code
23
+ ? theme.typography.shared.desktop.codeSMedium
24
+ : theme.typography.shared.desktop.bodySMedium}
25
+ `,
26
+ };
27
+ export const BADGE_VARIANTS = ['neutral', 'neutral_muted', 'neutral_subtle', 'primary_black', 'primary_blue', 'success', 'warning', 'danger'];
28
+ const badgeVariantStyle = {
29
+ neutral: css `
30
+ color: ${theme.color.neutral.text};
31
+ fill: ${theme.color.neutral.text};
32
+ background: ${theme.color.neutral.background};
33
+ box-shadow: inset 0 0 0 1px ${theme.color.neutral.border};
34
+ `,
35
+ neutral_muted: css `
36
+ color: ${theme.color.neutral.text};
37
+ fill: ${theme.color.neutral.text};
38
+ background: ${theme.color.neutral.chipBackground};
39
+ `,
40
+ neutral_subtle: css `
41
+ color: ${theme.color.neutral.textSubtle};
42
+ fill: ${theme.color.neutral.textSubtle};
43
+ background: ${theme.color.neutral.backgroundSubtle};
44
+ `,
45
+ primary_black: css `
46
+ color: ${theme.color.primaryBlack.chipText};
47
+ fill: ${theme.color.primaryBlack.chipText};
48
+ background: ${theme.color.primaryBlack.background};
49
+ `,
50
+ primary_blue: css `
51
+ color: ${theme.color.primary.chipText};
52
+ fill: ${theme.color.primaryBlack.chipText};
53
+ background: ${theme.color.primary.background};
54
+ `,
55
+ success: css `
56
+ color: ${theme.color.success.chipText};
57
+ fill: ${theme.color.success.chipText};
58
+ background: ${theme.color.success.background};
59
+ `,
60
+ warning: css `
61
+ color: ${theme.color.warning.chipText};
62
+ fill: ${theme.color.warning.chipText};
63
+ background: ${theme.color.warning.background};
64
+ `,
65
+ danger: css `
66
+ color: ${theme.color.danger.chipText};
67
+ fill: ${theme.color.danger.chipText};
68
+ background: ${theme.color.danger.background};
69
+ `,
70
+ };
71
+ const StyledBadge = styled(Box) `
72
+ ${({ $size, $code }) => badgeSizeStyle[$size]($code)};
73
+ ${({ $variant }) => badgeVariantStyle[$variant]};
74
+
75
+ /* Static styles */
76
+ width: fit-content;
77
+ border: none;
78
+ outline: none;
79
+ display: flex;
80
+ flex-direction: row;
81
+ justify-content: center;
82
+ align-items: center;
83
+ white-space: nowrap;
84
+ gap: ${theme.space.space4};
85
+ `;
86
+ /**
87
+ * Component for displaying non-interactive chip descendant.
88
+ */
89
+ export const Badge = forwardRef(({ size = 'small', variant = 'neutral', LeadingIcon, children, code = false, ...props }, ref) => {
90
+ return (<StyledBadge ref={ref} $size={size} $variant={variant} $code={code} {...props}>
91
+ {LeadingIcon && <LeadingIcon size={BADGE_ICON_SIZES[size]}/>}
92
+ {children}
93
+ </StyledBadge>);
94
+ });
95
+ Badge.displayName = 'Badge';
96
+ //# sourceMappingURL=badge.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"badge.jsx","sourceRoot":"","sources":["../../../src/components/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,MAAM,EAAE,EAAE,GAAG,EAAmC,MAAM,mBAAmB,CAAC;AAIjF,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE/C,OAAO,EAAiD,GAAG,EAAE,MAAM,OAAO,CAAC;AAI3E,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAU,CAAC;AAExD,MAAM,gBAAgB,GAAG;IACrB,MAAM,EAAE,IAAI;IACZ,KAAK,EAAE,IAAI;CACwB,CAAC;AAExC,MAAM,cAAc,GAAG;IACnB,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,GAAG,CAAA;mBACP,KAAK,CAAC,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM;yBAClC,KAAK,CAAC,MAAM,CAAC,OAAO;UACnC,KAAK;QACP,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,WAAW;QAC7C,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,WAClC;KACH;IACD,KAAK,EAAE,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AAQ,EACR,IAAI,GAAG,KAAK,EACZ,GAAG,KAAK,EACC,EACb,GAAG,EACD,EAAE;IACA,OAAO,CACH,CAAC,WAAW,CACR,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,KAAK,CAAC,CAAC,IAAI,CAAC,CACZ,QAAQ,CAAC,CAAC,OAAO,CAAC,CAClB,KAAK,CAAC,CAAC,IAAI,CAAC,CACZ,IAAI,KAAK,CAAC,CAEV;gBAAA,CAAC,WAAW,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,EAAG,CAC7D;gBAAA,CAAC,QAAQ,CACb;YAAA,EAAE,WAAW,CAAC,CACjB,CAAC;AACN,CAAC,CACJ,CAAC;AAEF,KAAK,CAAC,WAAW,GAAG,OAAO,CAAC"}
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ interface BannerProps {
3
+ background?: string;
4
+ useGradientBackground?: boolean;
5
+ width?: string;
6
+ className?: string;
7
+ children: React.ReactNode;
8
+ }
9
+ export declare const Banner: React.FC<BannerProps>;
10
+ export {};
11
+ //# sourceMappingURL=banner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"banner.d.ts","sourceRoot":"","sources":["../../../src/components/banner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAqD1B,UAAU,WAAW;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B;AAsBD,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAaxC,CAAC"}
@@ -0,0 +1,73 @@
1
+ import React from 'react';
2
+ import styled, { css } from 'styled-components';
3
+ import { theme } from '../design_system/theme';
4
+ /* eslint-disable max-len */
5
+ const BANNER_GRADIENT_BACKGROUND_SVG = `<svg width="1200" height="148" viewBox="0 0 1200 148" fill="none" xmlns="http://www.w3.org/2000/svg">
6
+ <g clip-path="url(#clip0_2285_34756)">
7
+ <g filter="url(#filter0_f_2285_34756)">
8
+ <path d="M-39.7702 191.085C-55.0622 193.205 -68.8864 201.311 -78.2029 213.621C-87.5194 225.932 -91.5654 241.438 -89.4512 256.731L-55.0077 502.652L89.8852 173L-39.7702 191.085Z" fill="url(#paint0_linear_2285_34756)"/>
9
+ </g>
10
+ <g filter="url(#filter1_f_2285_34756)">
11
+ <path d="M1267.53 398.062L1253.99 209.002C1252.85 193.626 1245.67 179.327 1234.01 169.234C1222.36 159.14 1207.18 154.073 1191.8 155.14C1190.5 155.19 1189.2 155.331 1187.92 155.564L1132 163.289L1254.84 438.685C1264.05 427.236 1268.59 412.721 1267.53 398.062Z" fill="url(#paint1_linear_2285_34756)"/>
12
+ </g>
13
+ <g filter="url(#filter2_f_2285_34756)">
14
+ <path d="M561 29.7691C570.917 30.4746 580.956 29.5571 590.142 27.1057L801.075 -28.7862L700.682 -170L561 29.7691Z" fill="url(#paint2_linear_2285_34756)"/>
15
+ </g>
16
+ </g>
17
+ <defs>
18
+ <filter id="filter0_f_2285_34756" x="-170" y="93" width="339.885" height="489.652" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
19
+ <feFlood flood-opacity="0" result="BackgroundImageFix"/>
20
+ <feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
21
+ <feGaussianBlur stdDeviation="40" result="effect1_foregroundBlur_2285_34756"/>
22
+ </filter>
23
+ <filter id="filter1_f_2285_34756" x="1052" y="75" width="295.683" height="443.686" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
24
+ <feFlood flood-opacity="0" result="BackgroundImageFix"/>
25
+ <feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
26
+ <feGaussianBlur stdDeviation="40" result="effect1_foregroundBlur_2285_34756"/>
27
+ </filter>
28
+ <filter id="filter2_f_2285_34756" x="481" y="-250" width="400.074" height="360" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
29
+ <feFlood flood-opacity="0" result="BackgroundImageFix"/>
30
+ <feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
31
+ <feGaussianBlur stdDeviation="40" result="effect1_foregroundBlur_2285_34756"/>
32
+ </filter>
33
+ <linearGradient id="paint0_linear_2285_34756" x1="-0.0574112" y1="173" x2="-0.0574112" y2="502.652" gradientUnits="userSpaceOnUse">
34
+ <stop stop-color="#00FF85"/>
35
+ <stop offset="1" stop-color="#00FF47" stop-opacity="0"/>
36
+ </linearGradient>
37
+ <linearGradient id="paint1_linear_2285_34756" x1="1146.02" y1="174.549" x2="1333.1" y2="293.915" gradientUnits="userSpaceOnUse">
38
+ <stop stop-color="#00FFF0"/>
39
+ <stop offset="1" stop-color="#1672EB"/>
40
+ </linearGradient>
41
+ <linearGradient id="paint2_linear_2285_34756" x1="681.037" y1="-170" x2="681.037" y2="30" gradientUnits="userSpaceOnUse">
42
+ <stop stop-color="#F5B315"/>
43
+ <stop offset="1" stop-color="#FF2CC4"/>
44
+ </linearGradient>
45
+ <clipPath id="clip0_2285_34756">
46
+ <rect width="1200" height="1791.08" rx="16" fill="white"/>
47
+ </clipPath>
48
+ </defs>
49
+ </svg>
50
+ `;
51
+ ;
52
+ const getBannerBackground = (background, useGradientBackground) => {
53
+ return css `
54
+ background-color: ${background || theme.color.neutral.backgroundSubtle};
55
+ ${useGradientBackground && `
56
+ background-image: url("data:image/svg+xml,${encodeURIComponent(BANNER_GRADIENT_BACKGROUND_SVG)}");
57
+ background-position: center;
58
+ background-repeat: no-repeat;
59
+ background-size: cover;
60
+ `}
61
+ `;
62
+ };
63
+ const StyledBanner = styled.div `
64
+ width: ${(props) => props.width || '100%'};
65
+ padding: ${theme.space.space40} ${theme.space.space80};
66
+ border-radius: ${theme.radius.radius16};
67
+
68
+ ${({ $background, $useGradientBackground }) => getBannerBackground($background, $useGradientBackground)};
69
+ `;
70
+ export const Banner = ({ useGradientBackground = true, background, children, ...otherProps }) => (<StyledBanner $background={background} $useGradientBackground={useGradientBackground} {...otherProps}>
71
+ {children}
72
+ </StyledBanner>);
73
+ //# sourceMappingURL=banner.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"banner.jsx","sourceRoot":"","sources":["../../../src/components/banner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE/C,4BAA4B;AAC5B,MAAM,8BAA8B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6CtC,CAAC;AAQD,CAAC;AAEF,MAAM,mBAAmB,GAAG,CAAC,UAAmB,EAAE,qBAA+B,EAAE,EAAE;IACjF,OAAO,GAAG,CAAA;gCACkB,UAAU,IAAI,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,gBAAgB;cACpE,qBAAqB,IAAI;wDACiB,kBAAkB,CAAC,8BAA8B,CAAC;;;;aAI7F;SACJ,CAAC;AACV,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAA4E;aAC9F,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,IAAI,MAAM;eAC9B,KAAK,CAAC,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,KAAK,CAAC,OAAO;qBACpC,KAAK,CAAC,MAAM,CAAC,QAAQ;;MAEpC,CAAC,EAAE,WAAW,EAAE,sBAAsB,EAAE,EAAE,EAAE,CAAC,mBAAmB,CAAC,WAAW,EAAE,sBAAsB,CAAC;CAC1G,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAA0B,CAAC,EAC1C,qBAAqB,GAAG,IAAI,EAC5B,UAAU,EACV,QAAQ,EACR,GAAG,UAAU,EAChB,EAAE,EAAE,CAAC,CACF,CAAC,YAAY,CACT,WAAW,CAAC,CAAC,UAAU,CAAC,CACxB,sBAAsB,CAAC,CAAC,qBAAqB,CAAC,CAC9C,IAAI,UAAU,CAAC,CAEf;QAAA,CAAC,QAAQ,CACb;IAAA,EAAE,YAAY,CAAC,CAClB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ interface BlogArticleProps {
3
+ imageNode: React.ReactNode;
4
+ title: string;
5
+ ctaTitle?: string;
6
+ }
7
+ export declare function BlogArticle({ imageNode, title, ctaTitle }: BlogArticleProps): React.JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=blog_article.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blog_article.d.ts","sourceRoot":"","sources":["../../../src/components/blog_article.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAsE1B,UAAU,gBAAgB;IACtB,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,WAAW,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,QAAsB,EAAE,EAAE,gBAAgB,qBAQzF"}
@@ -0,0 +1,73 @@
1
+ import React from 'react';
2
+ import styled from 'styled-components';
3
+ import { ArrowRight16 } from '@apify/icons';
4
+ import { theme } from '../design_system/theme';
5
+ const classNames = {
6
+ IMAGE_WRAPPER: 'ImageWrapper',
7
+ TEXT: 'Text',
8
+ READ_POST: 'ReadPost',
9
+ };
10
+ const BlogArticleWrapper = styled.div `
11
+ display: flex;
12
+ flex-direction: column;
13
+
14
+ &:hover {
15
+ .${classNames.READ_POST} {
16
+ color: ${theme.color.primary.action};
17
+ }
18
+ }
19
+
20
+ .${classNames.IMAGE_WRAPPER} {
21
+ margin-bottom: ${theme.space.space16};
22
+ border-radius: ${theme.radius.radius12};
23
+ border: 1px solid ${theme.color.neutral.backgroundSubtle};
24
+ aspect-ratio: 16/9;
25
+ }
26
+
27
+ .${classNames.TEXT} {
28
+ padding-bottom: ${theme.space.space16};
29
+ color: ${theme.color.neutral.text};
30
+ ${theme.typography.shared.mobile.titleL}
31
+
32
+ @media (min-width: ${theme.layout.tablet}) {
33
+ ${theme.typography.shared.tablet.titleL}
34
+ }
35
+
36
+ @media (min-width: ${theme.layout.desktop}) {
37
+ ${theme.typography.shared.desktop.titleL}
38
+ }
39
+ }
40
+
41
+ .${classNames.READ_POST} {
42
+ display: flex;
43
+ align-items: center;
44
+ gap: ${theme.space.space4};
45
+ color: ${theme.color.neutral.textMuted};
46
+ ${theme.typography.shared.mobile.titleM}
47
+
48
+ @media (min-width: ${theme.layout.tablet}) {
49
+ ${theme.typography.shared.tablet.titleM}
50
+ }
51
+
52
+ @media (min-width: ${theme.layout.desktop}) {
53
+ ${theme.typography.shared.desktop.titleM}
54
+ }
55
+
56
+
57
+ svg {
58
+ transition: margin-right .5s;
59
+ }
60
+
61
+ &:hover svg {
62
+ margin-right: ${theme.space.space4};
63
+ }
64
+ }
65
+ `;
66
+ export function BlogArticle({ imageNode, title, ctaTitle = 'Read more' }) {
67
+ return (<BlogArticleWrapper>
68
+ <div className={classNames.IMAGE_WRAPPER}>{imageNode}</div>
69
+ <div className={classNames.TEXT}>{title}</div>
70
+ <div className={classNames.READ_POST}>{ctaTitle}<ArrowRight16 title="" titleId=""/></div>
71
+ </BlogArticleWrapper>);
72
+ }
73
+ //# sourceMappingURL=blog_article.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blog_article.jsx","sourceRoot":"","sources":["../../../src/components/blog_article.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,EAAE,KAAK,E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AC;AAQF,MAAM,UAAU,WAAW,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,GAAG,WAAW,EAAoB;IACtF,OAAO,CACH,CAAC,kBAAkB,CACf;YAAA,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,GAAG,CAC1D;YAAA,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,GAAG,CAC7C;YAAA,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,EAAG,EAAE,GAAG,CAC7F;QAAA,EAAE,kBAAkB,CAAC,CACxB,CAAC;AACN,CAAC"}
@@ -0,0 +1,41 @@
1
+ import React from 'react';
2
+ import type { Size } from '../design_system/tokens';
3
+ type ExtendedSize = Size | 'none' | 'auto';
4
+ export interface MarginSpacingProps {
5
+ m?: ExtendedSize;
6
+ mt?: ExtendedSize;
7
+ mb?: ExtendedSize;
8
+ ml?: ExtendedSize;
9
+ mr?: ExtendedSize;
10
+ mx?: ExtendedSize;
11
+ my?: ExtendedSize;
12
+ }
13
+ export interface PaddingSpacingProps {
14
+ p?: ExtendedSize;
15
+ pt?: ExtendedSize;
16
+ pb?: ExtendedSize;
17
+ pl?: ExtendedSize;
18
+ pr?: ExtendedSize;
19
+ px?: ExtendedSize;
20
+ py?: ExtendedSize;
21
+ }
22
+ type SharedBoxProps = {
23
+ children?: React.ReactNode;
24
+ className?: string;
25
+ style?: React.CSSProperties;
26
+ onClick?: (e: React.MouseEvent) => void;
27
+ id?: string;
28
+ };
29
+ export type RegularBoxProps = SharedBoxProps & {
30
+ as?: React.ElementType;
31
+ };
32
+ type OlBoxProps = SharedBoxProps & {
33
+ as: 'ol';
34
+ start?: number;
35
+ };
36
+ /** Combines together RegularBoxProps and props for specific elements. */
37
+ type AnyBoxProps = RegularBoxProps | OlBoxProps;
38
+ export type BoxProps = MarginSpacingProps & PaddingSpacingProps & AnyBoxProps;
39
+ export declare const Box: React.ForwardRefExoticComponent<BoxProps & React.RefAttributes<HTMLElement>>;
40
+ export {};
41
+ //# sourceMappingURL=box.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"box.d.ts","sourceRoot":"","sources":["../../../src/components/box.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAI1C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAGpD,KAAK,YAAY,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;AAE3C,MAAM,WAAW,kBAAkB;IAC/B,CAAC,CAAC,EAAE,YAAY,CAAC;IACjB,EAAE,CAAC,EAAE,YAAY,CAAC;IAClB,EAAE,CAAC,EAAE,YAAY,CAAC;IAClB,EAAE,CAAC,EAAE,YAAY,CAAC;IAClB,EAAE,CAAC,EAAE,YAAY,CAAC;IAClB,EAAE,CAAC,EAAE,YAAY,CAAC;IAClB,EAAE,CAAC,EAAE,YAAY,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB;IAChC,CAAC,CAAC,EAAE,YAAY,CAAC;IACjB,EAAE,CAAC,EAAE,YAAY,CAAC;IAClB,EAAE,CAAC,EAAE,YAAY,CAAC;IAClB,EAAE,CAAC,EAAE,YAAY,CAAC;IAClB,EAAE,CAAC,EAAE,YAAY,CAAC;IAClB,EAAE,CAAC,EAAE,YAAY,CAAC;IAClB,EAAE,CAAC,EAAE,YAAY,CAAC;CACrB;AAED,KAAK,cAAc,GAAG;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IAC3B,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IACxC,EAAE,CAAC,EAAE,MAAM,CAAC;CACf,CAAA;AAGD,MAAM,MAAM,eAAe,GAAG,cAAc,GAAG;IAAE,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAA;CAAE,CAAC;AAE1E,KAAK,UAAU,GAAG,cAAc,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhE,yEAAyE;AACzE,KAAK,WAAW,GAAG,eAAe,GAAG,UAAU,CAAC;AAEhD,MAAM,MAAM,QAAQ,GAAG,kBAAkB,GAAG,mBAAmB,GAAG,WAAW,CAAC;AA4C9E,eAAO,MAAM,GAAG,8EAqCd,CAAC"}
@@ -0,0 +1,48 @@
1
+ import React, { forwardRef } from 'react';
2
+ import styled, { css } from 'styled-components';
3
+ import { theme } from '../design_system/theme';
4
+ const getSizeValue = (token) => {
5
+ if (!token || token === 'none')
6
+ return 0;
7
+ if (token === 'auto')
8
+ return 'auto';
9
+ return theme.space[token] || 0;
10
+ };
11
+ const StyledBox = styled.div `
12
+ ${({ $mt, $my, $m }) => ($mt || $my || $m) && css `
13
+ margin-top: ${getSizeValue($mt || $my || $m)};
14
+ `}
15
+
16
+ ${({ $mb, $my, $m }) => ($mb || $my || $m) && css `
17
+ margin-bottom: ${getSizeValue($mb || $my || $m)};
18
+ `}
19
+
20
+ ${({ $mr, $mx, $m }) => ($mr || $mx || $m) && css `
21
+ margin-right: ${getSizeValue($mr || $mx || $m)};
22
+ `}
23
+
24
+ ${({ $ml, $mx, $m }) => ($ml || $mx || $m) && css `
25
+ margin-left: ${getSizeValue($ml || $mx || $m)};
26
+ `}
27
+
28
+ ${({ $pt, $py, $p }) => ($pt || $py || $p) && css `
29
+ padding-top: ${getSizeValue($pt || $py || $p)};
30
+ `}
31
+
32
+ ${({ $pb, $py, $p }) => ($pb || $py || $p) && css `
33
+ padding-bottom: ${getSizeValue($pb || $py || $p)};
34
+ `}
35
+
36
+ ${({ $pr, $px, $p }) => ($pr || $px || $p) && css `
37
+ padding-right: ${getSizeValue($pr || $px || $p)};
38
+ `}
39
+
40
+ ${({ $pl, $px, $p }) => ($pl || $px || $p) && css `
41
+ padding-left: ${getSizeValue($pl || $px || $p)};
42
+ `}
43
+ `;
44
+ // This component should work as a base component for all low level components (Heading, Message, Card, ...) to make it easy to define spacing.
45
+ // Right now, it's quite common to define some sort of spacing on these components already using css. Card = styled.div`margin-bottom: theme.space.space8`
46
+ // We should get rid of it and define it using props for Box component Card = styled(Box).attrs({mb: 'space8'})
47
+ export const Box = forwardRef(({ m, mt, mb, ml, mr, mx, my, p, pt, pb, pl, pr, px, py, as, ...rest }, ref) => (<StyledBox $m={m} $mt={mt} $mb={mb} $ml={ml} $mr={mr} $mx={mx} $my={my} $p={p} $pt={pt} $pb={pb} $pl={pl} $pr={pr} $px={px} $py={py} as={as} ref={ref} {...rest}/>));
48
+ //# sourceMappingURL=box.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"box.jsx","sourceRoot":"","sources":["../../../src/components/box.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AA4C/C,MAAM,YAAY,GAAG,CAAC,KAAoB,EAAE,EAAE;IAC1C,IAAI,CAAC,KAAK,IAAI,KAAK,KAAK,MAAM;QAAE,OAAO,CAAC,CAAC;IACzC,IAAI,KAAK,KAAK,MAAM;QAAE,OAAO,MAAM,CAAC;IACpC,OAAO,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AACnC,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAA8D;MACpF,CAAC,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T,IAAI,IAAI,CAAC,EACX,CACL,CAAC,CAAC"}
@@ -0,0 +1,35 @@
1
+ import React from 'react';
2
+ import { type WithRequired } from '../type_utils';
3
+ import { type RegularBoxProps, type MarginSpacingProps } from './box';
4
+ import { type LinkProps } from './link';
5
+ type ButtonSize = 'medium' | 'small';
6
+ type ButtonColor = 'default' | 'success' | 'danger';
7
+ type ButtonVariant = 'primary' | 'secondary' | 'text';
8
+ export interface TransientButtonProps {
9
+ size?: ButtonSize;
10
+ color?: ButtonColor;
11
+ variant?: ButtonVariant;
12
+ }
13
+ export interface RegularButtonProps {
14
+ trackingId?: string;
15
+ trackingData?: object;
16
+ LeftIcon?: React.ElementType;
17
+ RightIcon?: React.ElementType;
18
+ disabled?: boolean;
19
+ }
20
+ export type CommonButtonProps = RegularButtonProps & TransientButtonProps & MarginSpacingProps;
21
+ export type ButtonProps = CommonButtonProps & WithRequired<RegularBoxProps, 'onClick'>;
22
+ export type AnchorButtonProps = CommonButtonProps & RegularBoxProps & LinkProps;
23
+ type ButtonSizeCombinations = {
24
+ [Size in ButtonSize]: {
25
+ fontSize: number;
26
+ horizontalPadding: number;
27
+ height: number;
28
+ };
29
+ };
30
+ export declare const BUTTON_SIZE_VARIANTS_CSS: ButtonSizeCombinations;
31
+ export declare const getButtonColorStyles: (variant?: ButtonVariant, color?: ButtonColor) => import("styled-components").FlattenSimpleInterpolation;
32
+ export declare const getButtonSizeStyles: (size?: ButtonSize) => import("styled-components").FlattenSimpleInterpolation;
33
+ export declare const Button: React.ForwardRefExoticComponent<(ButtonProps | AnchorButtonProps) & React.RefAttributes<HTMLElement>>;
34
+ export {};
35
+ //# sourceMappingURL=button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAM1C,OAAO,EAAE,KAAK,YAAY,EAA2B,MAAM,eAAe,CAAC;AAE3E,OAAO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