@apify/ui-library 1.140.2 → 1.141.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.
- package/dist/src/components/{action_link.d.ts → action_link/action_link.d.ts} +2 -2
- package/dist/src/components/action_link/action_link.d.ts.map +1 -0
- package/dist/src/components/{action_link.js → action_link/action_link.js} +4 -4
- package/dist/src/components/action_link/action_link.js.map +1 -0
- package/dist/src/components/action_link/index.d.ts +2 -0
- package/dist/src/components/action_link/index.d.ts.map +1 -0
- package/dist/src/components/action_link/index.js +2 -0
- package/dist/src/components/action_link/index.js.map +1 -0
- package/dist/src/components/actor_template_card/actor_template_card.d.ts.map +1 -0
- package/dist/src/components/{actor_template_card.js → actor_template_card/actor_template_card.js} +4 -4
- package/dist/src/components/actor_template_card/actor_template_card.js.map +1 -0
- package/dist/src/components/actor_template_card/index.d.ts +2 -0
- package/dist/src/components/actor_template_card/index.d.ts.map +1 -0
- package/dist/src/components/actor_template_card/index.js +2 -0
- package/dist/src/components/actor_template_card/index.js.map +1 -0
- package/dist/src/components/{badge.d.ts → badge/badge.d.ts} +2 -2
- package/dist/src/components/badge/badge.d.ts.map +1 -0
- package/dist/src/components/{badge.js → badge/badge.js} +3 -3
- package/dist/src/components/badge/badge.js.map +1 -0
- package/dist/src/components/badge/index.d.ts +2 -0
- package/dist/src/components/badge/index.d.ts.map +1 -0
- package/dist/src/components/badge/index.js +2 -0
- package/dist/src/components/badge/index.js.map +1 -0
- package/dist/src/components/banner/banner.d.ts.map +1 -0
- package/dist/src/components/{banner.js → banner/banner.js} +1 -1
- package/dist/src/components/banner/banner.js.map +1 -0
- package/dist/src/components/banner/index.d.ts +2 -0
- package/dist/src/components/banner/index.d.ts.map +1 -0
- package/dist/src/components/banner/index.js +2 -0
- package/dist/src/components/banner/index.js.map +1 -0
- package/dist/src/components/blog_article/blog_article.d.ts.map +1 -0
- package/dist/src/components/{blog_article.js → blog_article/blog_article.js} +1 -1
- package/dist/src/components/blog_article/blog_article.js.map +1 -0
- package/dist/src/components/blog_article/index.d.ts +2 -0
- package/dist/src/components/blog_article/index.d.ts.map +1 -0
- package/dist/src/components/blog_article/index.js +2 -0
- package/dist/src/components/blog_article/index.js.map +1 -0
- package/dist/src/components/{box.d.ts → box/box.d.ts} +1 -1
- package/dist/src/components/box/box.d.ts.map +1 -0
- package/dist/src/components/{box.js → box/box.js} +1 -1
- package/dist/src/components/box/box.js.map +1 -0
- package/dist/src/components/box/index.d.ts +2 -0
- package/dist/src/components/box/index.d.ts.map +1 -0
- package/dist/src/components/box/index.js +2 -0
- package/dist/src/components/box/index.js.map +1 -0
- package/dist/src/components/breadcrumb/breadcrumb.js +3 -3
- package/dist/src/components/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/src/components/browser_window/browser_window.js +1 -1
- package/dist/src/components/browser_window/browser_window.js.map +1 -1
- package/dist/src/components/{button.d.ts → button/button.d.ts} +3 -3
- package/dist/src/components/button/button.d.ts.map +1 -0
- package/dist/src/components/{button.js → button/button.js} +5 -5
- package/dist/src/components/button/button.js.map +1 -0
- package/dist/src/components/button/index.d.ts +2 -0
- package/dist/src/components/button/index.d.ts.map +1 -0
- package/dist/src/components/button/index.js +2 -0
- package/dist/src/components/button/index.js.map +1 -0
- package/dist/src/components/{to_consolidate → card}/card.d.ts +2 -2
- package/dist/src/components/card/card.d.ts.map +1 -0
- package/dist/src/components/{to_consolidate → card}/card.js +2 -2
- package/dist/src/components/card/card.js.map +1 -0
- package/dist/src/components/card/index.d.ts +2 -0
- package/dist/src/components/card/index.d.ts.map +1 -0
- package/dist/src/components/card/index.js +2 -0
- package/dist/src/components/card/index.js.map +1 -0
- package/dist/src/components/{card_container.d.ts → card_container/card_container.d.ts} +2 -2
- package/dist/src/components/card_container/card_container.d.ts.map +1 -0
- package/dist/src/components/{card_container.js → card_container/card_container.js} +2 -2
- package/dist/src/components/card_container/card_container.js.map +1 -0
- package/dist/src/components/card_container/index.d.ts +2 -0
- package/dist/src/components/card_container/index.d.ts.map +1 -0
- package/dist/src/components/card_container/index.js +2 -0
- package/dist/src/components/card_container/index.js.map +1 -0
- package/dist/src/components/{chip.d.ts → chip/chip.d.ts} +1 -1
- package/dist/src/components/chip/chip.d.ts.map +1 -0
- package/dist/src/components/{chip.js → chip/chip.js} +1 -1
- package/dist/src/components/chip/chip.js.map +1 -0
- package/dist/src/components/chip/index.d.ts +2 -0
- package/dist/src/components/chip/index.d.ts.map +1 -0
- package/dist/src/components/chip/index.js +2 -0
- package/dist/src/components/chip/index.js.map +1 -0
- package/dist/src/components/code/action_button.js +2 -2
- package/dist/src/components/code/action_button.js.map +1 -1
- package/dist/src/components/code/code_block/code_block.d.ts +2 -2
- package/dist/src/components/code/code_block/code_block.d.ts.map +1 -1
- package/dist/src/components/code/code_block/code_block.js +3 -3
- package/dist/src/components/code/code_block/code_block.js.map +1 -1
- package/dist/src/components/code/code_block/code_block.styled.d.ts +3 -3
- package/dist/src/components/code/code_block/code_block.styled.d.ts.map +1 -1
- package/dist/src/components/code/code_block/code_block.styled.js +1 -1
- package/dist/src/components/code/code_block/code_block.styled.js.map +1 -1
- package/dist/src/components/code/code_block/code_block_with_tabs.d.ts +2 -2
- package/dist/src/components/code/code_block/code_block_with_tabs.d.ts.map +1 -1
- package/dist/src/components/code/code_block/code_block_with_tabs.js +2 -2
- package/dist/src/components/code/code_block/code_block_with_tabs.js.map +1 -1
- package/dist/src/components/code/inline_code/inline_code.d.ts +2 -2
- package/dist/src/components/code/inline_code/inline_code.d.ts.map +1 -1
- package/dist/src/components/code/inline_code/inline_code.js +1 -1
- package/dist/src/components/code/inline_code/inline_code.js.map +1 -1
- package/dist/src/components/code/one_line_code/one_line_code.d.ts +2 -2
- package/dist/src/components/code/one_line_code/one_line_code.d.ts.map +1 -1
- package/dist/src/components/code/one_line_code/one_line_code.js +1 -1
- package/dist/src/components/code/one_line_code/one_line_code.js.map +1 -1
- package/dist/src/components/code/prism_highlighter.d.ts +4 -4
- package/dist/src/components/code/prism_highlighter.d.ts.map +1 -1
- package/dist/src/components/code/prism_highlighter.js +1 -1
- package/dist/src/components/code/prism_highlighter.js.map +1 -1
- package/dist/src/components/collapsible_card/collapsible_card.js +1 -1
- package/dist/src/components/collapsible_card/collapsible_card.js.map +1 -1
- package/dist/src/components/color_wheel_gradient/color_wheel_gradient.d.ts.map +1 -0
- package/dist/src/components/color_wheel_gradient/color_wheel_gradient.js.map +1 -0
- package/dist/src/components/color_wheel_gradient/index.d.ts +2 -0
- package/dist/src/components/color_wheel_gradient/index.d.ts.map +1 -0
- package/dist/src/components/color_wheel_gradient/index.js +2 -0
- package/dist/src/components/color_wheel_gradient/index.js.map +1 -0
- package/dist/src/components/floating/menu.d.ts +8 -4
- package/dist/src/components/floating/menu.d.ts.map +1 -1
- package/dist/src/components/floating/menu.js +26 -19
- package/dist/src/components/floating/menu.js.map +1 -1
- package/dist/src/components/floating/menu_components.d.ts +17 -5
- package/dist/src/components/floating/menu_components.d.ts.map +1 -1
- package/dist/src/components/floating/menu_components.js +20 -2
- package/dist/src/components/floating/menu_components.js.map +1 -1
- package/dist/src/components/floating/tooltip_content.d.ts +1 -1
- package/dist/src/components/floating/tooltip_content.d.ts.map +1 -1
- package/dist/src/components/floating/tooltip_content.js +1 -1
- package/dist/src/components/floating/tooltip_content.js.map +1 -1
- package/dist/src/components/{icon_button.d.ts → icon_button/icon_button.d.ts} +3 -3
- package/dist/src/components/icon_button/icon_button.d.ts.map +1 -0
- package/dist/src/components/{icon_button.js → icon_button/icon_button.js} +5 -5
- package/dist/src/components/icon_button/icon_button.js.map +1 -0
- package/dist/src/components/icon_button/index.d.ts +2 -0
- package/dist/src/components/icon_button/index.d.ts.map +1 -0
- package/dist/src/components/icon_button/index.js +2 -0
- package/dist/src/components/icon_button/index.js.map +1 -0
- package/dist/src/components/{image.d.ts → image/image.d.ts} +2 -2
- package/dist/src/components/image/image.d.ts.map +1 -0
- package/dist/src/components/{image.js → image/image.js} +2 -2
- package/dist/src/components/image/image.js.map +1 -0
- package/dist/src/components/image/index.d.ts +2 -0
- package/dist/src/components/image/index.d.ts.map +1 -0
- package/dist/src/components/image/index.js +2 -0
- package/dist/src/components/image/index.js.map +1 -0
- package/dist/src/components/index.d.ts +39 -35
- package/dist/src/components/index.d.ts.map +1 -1
- package/dist/src/components/index.js +39 -35
- package/dist/src/components/index.js.map +1 -1
- package/dist/src/components/link/index.d.ts +2 -0
- package/dist/src/components/link/index.d.ts.map +1 -0
- package/dist/src/components/link/index.js +2 -0
- package/dist/src/components/link/index.js.map +1 -0
- package/dist/src/components/{link.d.ts → link/link.d.ts} +1 -1
- package/dist/src/components/link/link.d.ts.map +1 -0
- package/dist/src/components/{link.js → link/link.js} +3 -3
- package/dist/src/components/link/link.js.map +1 -0
- package/dist/src/components/markdown/index.d.ts +2 -0
- package/dist/src/components/markdown/index.d.ts.map +1 -0
- package/dist/src/components/markdown/index.js +2 -0
- package/dist/src/components/markdown/index.js.map +1 -0
- package/dist/src/components/{to_consolidate → markdown}/markdown.d.ts +1 -1
- package/dist/src/components/markdown/markdown.d.ts.map +1 -0
- package/dist/src/components/{to_consolidate → markdown}/markdown.js +5 -5
- package/dist/src/components/markdown/markdown.js.map +1 -0
- package/dist/src/components/message/index.d.ts +2 -0
- package/dist/src/components/message/index.d.ts.map +1 -0
- package/dist/src/components/message/index.js +2 -0
- package/dist/src/components/message/index.js.map +1 -0
- package/dist/src/components/{message.d.ts → message/message.d.ts} +2 -2
- package/dist/src/components/message/message.d.ts.map +1 -0
- package/dist/src/components/{message.js → message/message.js} +4 -4
- package/dist/src/components/message/message.js.map +1 -0
- package/dist/src/components/pagination/index.d.ts +2 -0
- package/dist/src/components/pagination/index.d.ts.map +1 -0
- package/dist/src/components/pagination/index.js +2 -0
- package/dist/src/components/pagination/index.js.map +1 -0
- package/dist/src/components/pagination/pagination.d.ts.map +1 -0
- package/dist/src/components/{to_consolidate → pagination}/pagination.js +2 -2
- package/dist/src/components/pagination/pagination.js.map +1 -0
- package/dist/src/components/radio_button/index.d.ts +2 -0
- package/dist/src/components/radio_button/index.d.ts.map +1 -0
- package/dist/src/components/radio_button/index.js +2 -0
- package/dist/src/components/radio_button/index.js.map +1 -0
- package/dist/src/components/radio_button/radio_button.d.ts +13 -0
- package/dist/src/components/radio_button/radio_button.d.ts.map +1 -0
- package/dist/src/components/radio_button/radio_button.js +15 -0
- package/dist/src/components/radio_button/radio_button.js.map +1 -0
- package/dist/src/components/radio_button/radio_button.style.d.ts +2 -0
- package/dist/src/components/radio_button/radio_button.style.d.ts.map +1 -0
- package/dist/src/components/radio_button/radio_button.style.js +47 -0
- package/dist/src/components/radio_button/radio_button.style.js.map +1 -0
- package/dist/src/components/rating/index.d.ts +2 -0
- package/dist/src/components/rating/index.d.ts.map +1 -0
- package/dist/src/components/rating/index.js +2 -0
- package/dist/src/components/rating/index.js.map +1 -0
- package/dist/src/components/{rating.d.ts → rating/rating.d.ts} +1 -1
- package/dist/src/components/rating/rating.d.ts.map +1 -0
- package/dist/src/components/{rating.js → rating/rating.js} +3 -3
- package/dist/src/components/rating/rating.js.map +1 -0
- package/dist/src/components/readme_renderer/table_of_contents.js +3 -3
- package/dist/src/components/readme_renderer/table_of_contents.js.map +1 -1
- package/dist/src/components/select/select.js +2 -2
- package/dist/src/components/select/select.js.map +1 -1
- package/dist/src/components/shortcut/index.d.ts +2 -0
- package/dist/src/components/shortcut/index.d.ts.map +1 -0
- package/dist/src/components/shortcut/index.js +2 -0
- package/dist/src/components/shortcut/index.js.map +1 -0
- package/dist/src/components/shortcut/shortcut.d.ts.map +1 -0
- package/dist/src/components/{shortcut.js → shortcut/shortcut.js} +2 -2
- package/dist/src/components/shortcut/shortcut.js.map +1 -0
- package/dist/src/components/simple_markdown/simple_markdown.js +5 -5
- package/dist/src/components/simple_markdown/simple_markdown.js.map +1 -1
- package/dist/src/components/simple_markdown/simple_markdown_components.d.ts +6 -6
- package/dist/src/components/simple_markdown/simple_markdown_components.d.ts.map +1 -1
- package/dist/src/components/simple_markdown/simple_markdown_components.js +6 -6
- package/dist/src/components/simple_markdown/simple_markdown_components.js.map +1 -1
- package/dist/src/components/spinner/index.d.ts +2 -0
- package/dist/src/components/spinner/index.d.ts.map +1 -0
- package/dist/src/components/spinner/index.js +2 -0
- package/dist/src/components/spinner/index.js.map +1 -0
- package/dist/src/components/spinner/spinner.d.ts.map +1 -0
- package/dist/src/components/{spinner.js → spinner/spinner.js} +1 -1
- package/dist/src/components/spinner/spinner.js.map +1 -0
- package/dist/src/components/store/store_actor_header.d.ts +1 -1
- package/dist/src/components/store/store_actor_header.d.ts.map +1 -1
- package/dist/src/components/store/store_actor_header.js +2 -2
- package/dist/src/components/store/store_actor_header.js.map +1 -1
- package/dist/src/components/tab_number_chip/index.d.ts +2 -0
- package/dist/src/components/tab_number_chip/index.d.ts.map +1 -0
- package/dist/src/components/tab_number_chip/index.js +2 -0
- package/dist/src/components/tab_number_chip/index.js.map +1 -0
- package/dist/src/components/tab_number_chip/tab_number_chip.d.ts.map +1 -0
- package/dist/src/components/{to_consolidate → tab_number_chip}/tab_number_chip.js +1 -1
- package/dist/src/components/tab_number_chip/tab_number_chip.js.map +1 -0
- package/dist/src/components/table/index.d.ts +2 -2
- package/dist/src/components/table/index.d.ts.map +1 -1
- package/dist/src/components/table/index.js +1 -1
- package/dist/src/components/table/table.context.d.ts +1 -1
- package/dist/src/components/table/table.context.d.ts.map +1 -1
- package/dist/src/components/table/table.js +1 -1
- package/dist/src/components/table/table.styled.d.ts +2 -2
- package/dist/src/components/table/table.styled.d.ts.map +1 -1
- package/dist/src/components/table/table.styled.js +1 -1
- package/dist/src/components/table/table.styled.js.map +1 -1
- package/dist/src/components/table/{table_test_ids.d.ts → table.test_ids.d.ts} +1 -1
- package/dist/src/components/table/table.test_ids.d.ts.map +1 -0
- package/dist/src/components/table/table.test_ids.js +16 -0
- package/dist/src/components/table/table.test_ids.js.map +1 -0
- package/dist/src/components/table/{types.d.ts → table.types.d.ts} +2 -2
- package/dist/src/components/table/table.types.d.ts.map +1 -0
- package/dist/src/components/table/table.types.js +2 -0
- package/dist/src/components/table/table.types.js.map +1 -0
- package/dist/src/components/table/table_body.js +1 -1
- package/dist/src/components/table/table_cell.d.ts +1 -1
- package/dist/src/components/table/table_cell.d.ts.map +1 -1
- package/dist/src/components/table/table_cell.js +2 -2
- package/dist/src/components/table/table_cell.js.map +1 -1
- package/dist/src/components/table/table_empty_row.js +1 -1
- package/dist/src/components/table/table_error_row.js +2 -2
- package/dist/src/components/table/table_error_row.js.map +1 -1
- package/dist/src/components/table/table_expansion_row.d.ts +1 -1
- package/dist/src/components/table/table_expansion_row.d.ts.map +1 -1
- package/dist/src/components/table/table_expansion_row.js +1 -1
- package/dist/src/components/table/table_foot.js +1 -1
- package/dist/src/components/table/table_head.js +1 -1
- package/dist/src/components/table/table_head_cell.js +1 -1
- package/dist/src/components/table/table_head_row.js +1 -1
- package/dist/src/components/table/table_loading_row.js +2 -2
- package/dist/src/components/table/table_loading_row.js.map +1 -1
- package/dist/src/components/table/table_row.d.ts +1 -1
- package/dist/src/components/table/table_row.d.ts.map +1 -1
- package/dist/src/components/table/table_row.js +1 -1
- package/dist/src/components/table/table_wrapper.d.ts +1 -1
- package/dist/src/components/table/table_wrapper.d.ts.map +1 -1
- package/dist/src/components/table/table_wrapper.js +2 -2
- package/dist/src/components/table/table_wrapper.js.map +1 -1
- package/dist/src/components/tabs/tab.d.ts +2 -2
- package/dist/src/components/tabs/tab.d.ts.map +1 -1
- package/dist/src/components/tabs/tab.js +3 -3
- package/dist/src/components/tabs/tab.js.map +1 -1
- package/dist/src/components/tabs/tabs.d.ts +2 -2
- package/dist/src/components/tabs/tabs.d.ts.map +1 -1
- package/dist/src/components/tabs/tabs.js +1 -1
- package/dist/src/components/tabs/tabs.js.map +1 -1
- package/dist/src/components/tag/index.d.ts +2 -0
- package/dist/src/components/tag/index.d.ts.map +1 -0
- package/dist/src/components/tag/index.js +2 -0
- package/dist/src/components/tag/index.js.map +1 -0
- package/dist/src/components/tag/tag.d.ts +44 -0
- package/dist/src/components/tag/tag.d.ts.map +1 -0
- package/dist/src/components/tag/tag.js +136 -0
- package/dist/src/components/tag/tag.js.map +1 -0
- package/dist/src/components/tag.d.ts +1 -42
- package/dist/src/components/tag.d.ts.map +1 -1
- package/dist/src/components/tag.js +1 -135
- package/dist/src/components/tag.js.map +1 -1
- package/dist/src/components/text/heading_content.d.ts +1 -1
- package/dist/src/components/text/heading_content.d.ts.map +1 -1
- package/dist/src/components/text/heading_marketing.d.ts +1 -1
- package/dist/src/components/text/heading_marketing.d.ts.map +1 -1
- package/dist/src/components/text/heading_shared.d.ts +1 -1
- package/dist/src/components/text/heading_shared.d.ts.map +1 -1
- package/dist/src/components/text/index.d.ts +4 -2
- package/dist/src/components/text/index.d.ts.map +1 -1
- package/dist/src/components/text/index.js +1 -1
- package/dist/src/components/text/index.js.map +1 -1
- package/dist/src/components/text/text_base.d.ts +2 -2
- package/dist/src/components/text/text_base.d.ts.map +1 -1
- package/dist/src/components/text/text_base.js +1 -1
- package/dist/src/components/text/text_base.js.map +1 -1
- package/dist/src/components/text/text_content.d.ts +1 -1
- package/dist/src/components/text/text_content.d.ts.map +1 -1
- package/dist/src/components/text/text_marketing.d.ts +1 -1
- package/dist/src/components/text/text_marketing.d.ts.map +1 -1
- package/dist/src/components/text/text_shared.d.ts +1 -1
- package/dist/src/components/text/text_shared.d.ts.map +1 -1
- package/dist/src/components/tile/horizontal_tile.d.ts +1 -1
- package/dist/src/components/tile/horizontal_tile.d.ts.map +1 -1
- package/dist/src/components/tile/vertical_tile.d.ts +1 -1
- package/dist/src/components/tile/vertical_tile.d.ts.map +1 -1
- package/dist/src/design_system/theme.js +2 -2
- package/dist/src/design_system/theme.js.map +1 -1
- package/dist/src/index.d.ts +4 -4
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +4 -4
- package/dist/src/index.js.map +1 -1
- package/dist/src/ui_dependency_provider.d.ts +1 -1
- package/dist/src/ui_dependency_provider.d.ts.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +4 -3
- package/src/components/{action_link.tsx → action_link/action_link.tsx} +4 -4
- package/src/components/action_link/index.ts +1 -0
- package/src/components/{actor_template_card.tsx → actor_template_card/actor_template_card.tsx} +4 -4
- package/src/components/actor_template_card/index.ts +1 -0
- package/src/components/{badge.stories.jsx → badge/badge.stories.jsx} +1 -1
- package/src/components/{badge.tsx → badge/badge.tsx} +6 -6
- package/src/components/badge/index.ts +1 -0
- package/src/components/{banner.tsx → banner/banner.tsx} +1 -1
- package/src/components/banner/index.ts +1 -0
- package/src/components/{blog_article.tsx → blog_article/blog_article.tsx} +1 -1
- package/src/components/blog_article/index.ts +1 -0
- package/src/components/box/box.stories.tsx +87 -0
- package/src/components/{box.tsx → box/box.tsx} +3 -3
- package/src/components/box/index.ts +1 -0
- package/src/components/breadcrumb/breadcrumb.tsx +3 -3
- package/src/components/browser_window/browser_window.tsx +1 -1
- package/src/components/{button.stories.tsx → button/button.stories.tsx} +1 -1
- package/src/components/{button.tsx → button/button.tsx} +5 -5
- package/src/components/button/index.ts +1 -0
- package/src/components/{to_consolidate → card}/card.stories.tsx +1 -1
- package/src/components/{to_consolidate → card}/card.tsx +4 -4
- package/src/components/card/index.ts +1 -0
- package/src/components/{card_container.stories.tsx → card_container/card_container.stories.tsx} +1 -1
- package/src/components/{card_container.tsx → card_container/card_container.tsx} +3 -3
- package/src/components/card_container/index.ts +1 -0
- package/src/components/{chip.tsx → chip/chip.tsx} +2 -2
- package/src/components/chip/index.ts +1 -0
- package/src/components/code/action_button.tsx +2 -2
- package/src/components/code/code_block/code_block.styled.tsx +2 -2
- package/src/components/code/code_block/code_block.tsx +5 -5
- package/src/components/code/code_block/code_block_with_tabs.tsx +2 -2
- package/src/components/code/inline_code/inline_code.stories.tsx +1 -1
- package/src/components/code/inline_code/inline_code.tsx +3 -3
- package/src/components/code/one_line_code/one_line_code.tsx +4 -4
- package/src/components/code/prism_highlighter.tsx +2 -2
- package/src/components/collapsible_card/collapsible_card.tsx +2 -2
- package/src/components/color_wheel_gradient/index.ts +1 -0
- package/src/components/floating/menu.tsx +50 -36
- package/src/components/floating/menu_components.tsx +53 -3
- package/src/components/floating/tooltip_content.tsx +2 -2
- package/src/components/{icon_button.tsx → icon_button/icon_button.tsx} +6 -6
- package/src/components/icon_button/index.ts +1 -0
- package/src/components/image/image.stories.tsx +77 -0
- package/src/components/{image.tsx → image/image.tsx} +3 -3
- package/src/components/image/index.ts +1 -0
- package/src/components/index.ts +39 -35
- package/src/components/link/index.ts +1 -0
- package/src/components/{link.tsx → link/link.tsx} +3 -3
- package/src/components/markdown/index.ts +1 -0
- package/src/components/{to_consolidate → markdown}/markdown.tsx +6 -6
- package/src/components/message/index.ts +1 -0
- package/src/components/{message.stories.jsx → message/message.stories.jsx} +1 -1
- package/src/components/{message.tsx → message/message.tsx} +5 -5
- package/src/components/pagination/index.ts +1 -0
- package/src/components/{to_consolidate → pagination}/pagination.tsx +2 -2
- package/src/components/radio_button/index.ts +1 -0
- package/src/components/radio_button/radio_button.stories.tsx +57 -0
- package/src/components/radio_button/radio_button.style.ts +48 -0
- package/src/components/radio_button/radio_button.tsx +43 -0
- package/src/components/rating/index.ts +1 -0
- package/src/components/{rating.tsx → rating/rating.tsx} +4 -4
- package/src/components/readme_renderer/table_of_contents.tsx +3 -3
- package/src/components/select/select.tsx +2 -2
- package/src/components/shortcut/index.ts +1 -0
- package/src/components/{shortcut.stories.jsx → shortcut/shortcut.stories.jsx} +1 -1
- package/src/components/{shortcut.tsx → shortcut/shortcut.tsx} +2 -2
- package/src/components/simple_markdown/simple_markdown.stories.tsx +1 -1
- package/src/components/simple_markdown/simple_markdown.tsx +5 -5
- package/src/components/simple_markdown/simple_markdown_components.tsx +11 -11
- package/src/components/spinner/index.ts +1 -0
- package/src/components/{spinner.tsx → spinner/spinner.tsx} +2 -2
- package/src/components/store/store_actor_header.tsx +2 -2
- package/src/components/tab_number_chip/index.ts +1 -0
- package/src/components/{to_consolidate → tab_number_chip}/tab_number_chip.tsx +1 -1
- package/src/components/table/index.ts +2 -2
- package/src/components/table/table.context.ts +1 -1
- package/src/components/table/table.stories.tsx +16 -13
- package/src/components/table/table.styled.ts +1 -1
- package/src/components/table/table.test_ids.ts +15 -0
- package/src/components/table/table.tsx +1 -1
- package/src/components/table/{types.ts → table.types.ts} +1 -1
- package/src/components/table/table_body.tsx +1 -1
- package/src/components/table/table_cell.tsx +2 -2
- package/src/components/table/table_empty_row.tsx +1 -1
- package/src/components/table/table_error_row.tsx +2 -2
- package/src/components/table/table_expansion_row.tsx +2 -2
- package/src/components/table/table_foot.tsx +1 -1
- package/src/components/table/table_head.tsx +1 -1
- package/src/components/table/table_head_cell.tsx +1 -1
- package/src/components/table/table_head_row.tsx +1 -1
- package/src/components/table/table_loading_row.tsx +2 -2
- package/src/components/table/table_row.tsx +2 -2
- package/src/components/table/table_wrapper.tsx +3 -3
- package/src/components/tabs/tab.tsx +9 -9
- package/src/components/tabs/tabs.tsx +5 -5
- package/src/components/tag/index.ts +1 -0
- package/src/components/{tag.stories.jsx → tag/tag.stories.jsx} +1 -1
- package/src/components/tag/tag.tsx +203 -0
- package/src/components/tag.tsx +1 -202
- package/src/components/text/heading_content.tsx +2 -2
- package/src/components/text/heading_marketing.tsx +2 -2
- package/src/components/text/heading_shared.tsx +2 -2
- package/src/components/text/index.ts +4 -1
- package/src/components/text/text_base.tsx +3 -3
- package/src/components/text/text_content.tsx +3 -3
- package/src/components/text/text_marketing.tsx +3 -3
- package/src/components/text/text_shared.tsx +2 -2
- package/src/components/tile/horizontal_tile.stories.tsx +1 -1
- package/src/components/tile/horizontal_tile.tsx +1 -1
- package/src/components/tile/vertical_tile.stories.tsx +2 -2
- package/src/components/tile/vertical_tile.tsx +1 -1
- package/src/design_system/theme.ts +2 -2
- package/src/index.ts +4 -4
- package/src/ui_dependency_provider.tsx +1 -1
- package/dist/src/components/action_link.d.ts.map +0 -1
- package/dist/src/components/action_link.js.map +0 -1
- package/dist/src/components/actor_template_card.d.ts.map +0 -1
- package/dist/src/components/actor_template_card.js.map +0 -1
- package/dist/src/components/badge.d.ts.map +0 -1
- package/dist/src/components/badge.js.map +0 -1
- package/dist/src/components/banner.d.ts.map +0 -1
- package/dist/src/components/banner.js.map +0 -1
- package/dist/src/components/blog_article.d.ts.map +0 -1
- package/dist/src/components/blog_article.js.map +0 -1
- package/dist/src/components/box.d.ts.map +0 -1
- package/dist/src/components/box.js.map +0 -1
- package/dist/src/components/button.d.ts.map +0 -1
- package/dist/src/components/button.js.map +0 -1
- package/dist/src/components/card_container.d.ts.map +0 -1
- package/dist/src/components/card_container.js.map +0 -1
- package/dist/src/components/chip.d.ts.map +0 -1
- package/dist/src/components/chip.js.map +0 -1
- package/dist/src/components/color_wheel_gradient.d.ts.map +0 -1
- package/dist/src/components/color_wheel_gradient.js.map +0 -1
- package/dist/src/components/icon_button.d.ts.map +0 -1
- package/dist/src/components/icon_button.js.map +0 -1
- package/dist/src/components/image.d.ts.map +0 -1
- package/dist/src/components/image.js.map +0 -1
- package/dist/src/components/link.d.ts.map +0 -1
- package/dist/src/components/link.js.map +0 -1
- package/dist/src/components/message.d.ts.map +0 -1
- package/dist/src/components/message.js.map +0 -1
- package/dist/src/components/rating.d.ts.map +0 -1
- package/dist/src/components/rating.js.map +0 -1
- package/dist/src/components/shortcut.d.ts.map +0 -1
- package/dist/src/components/shortcut.js.map +0 -1
- package/dist/src/components/spinner.d.ts.map +0 -1
- package/dist/src/components/spinner.js.map +0 -1
- package/dist/src/components/table/table_test_ids.d.ts.map +0 -1
- package/dist/src/components/table/table_test_ids.js +0 -16
- package/dist/src/components/table/table_test_ids.js.map +0 -1
- package/dist/src/components/table/types.d.ts.map +0 -1
- package/dist/src/components/table/types.js +0 -2
- package/dist/src/components/table/types.js.map +0 -1
- package/dist/src/components/to_consolidate/card.d.ts.map +0 -1
- package/dist/src/components/to_consolidate/card.js.map +0 -1
- package/dist/src/components/to_consolidate/index.d.ts +0 -5
- package/dist/src/components/to_consolidate/index.d.ts.map +0 -1
- package/dist/src/components/to_consolidate/index.js +0 -5
- package/dist/src/components/to_consolidate/index.js.map +0 -1
- package/dist/src/components/to_consolidate/markdown.d.ts.map +0 -1
- package/dist/src/components/to_consolidate/markdown.js.map +0 -1
- package/dist/src/components/to_consolidate/pagination.d.ts.map +0 -1
- package/dist/src/components/to_consolidate/pagination.js.map +0 -1
- package/dist/src/components/to_consolidate/tab_number_chip.d.ts.map +0 -1
- package/dist/src/components/to_consolidate/tab_number_chip.js.map +0 -1
- package/src/components/table/table_test_ids.ts +0 -15
- package/src/components/to_consolidate/index.ts +0 -4
- /package/dist/src/components/{actor_template_card.d.ts → actor_template_card/actor_template_card.d.ts} +0 -0
- /package/dist/src/components/{banner.d.ts → banner/banner.d.ts} +0 -0
- /package/dist/src/components/{blog_article.d.ts → blog_article/blog_article.d.ts} +0 -0
- /package/dist/src/components/{color_wheel_gradient.d.ts → color_wheel_gradient/color_wheel_gradient.d.ts} +0 -0
- /package/dist/src/components/{color_wheel_gradient.js → color_wheel_gradient/color_wheel_gradient.js} +0 -0
- /package/dist/src/components/{to_consolidate → pagination}/pagination.d.ts +0 -0
- /package/dist/src/components/{shortcut.d.ts → shortcut/shortcut.d.ts} +0 -0
- /package/dist/src/components/{spinner.d.ts → spinner/spinner.d.ts} +0 -0
- /package/dist/src/components/{to_consolidate → tab_number_chip}/tab_number_chip.d.ts +0 -0
- /package/src/components/{action_link.stories.tsx → action_link/action_link.stories.tsx} +0 -0
- /package/src/components/{actor_template_card.stories.tsx → actor_template_card/actor_template_card.stories.tsx} +0 -0
- /package/src/components/{badge.doc.mdx → badge/badge.doc.mdx} +0 -0
- /package/src/components/{banner.stories.tsx → banner/banner.stories.tsx} +0 -0
- /package/src/components/{blog_article.stories.tsx → blog_article/blog_article.stories.tsx} +0 -0
- /package/src/components/{chip.stories.tsx → chip/chip.stories.tsx} +0 -0
- /package/src/components/{color_wheel_gradient.stories.tsx → color_wheel_gradient/color_wheel_gradient.stories.tsx} +0 -0
- /package/src/components/{color_wheel_gradient.tsx → color_wheel_gradient/color_wheel_gradient.tsx} +0 -0
- /package/src/components/{icon_button.stories.tsx → icon_button/icon_button.stories.tsx} +0 -0
- /package/src/components/{link.stories.tsx → link/link.stories.tsx} +0 -0
- /package/src/components/{to_consolidate → markdown}/markdown.stories.tsx +0 -0
- /package/src/components/{to_consolidate → pagination}/pagination.stories.tsx +0 -0
- /package/src/components/{rating.stories.tsx → rating/rating.stories.tsx} +0 -0
- /package/src/components/{spinner.stories.tsx → spinner/spinner.stories.tsx} +0 -0
- /package/src/components/{to_consolidate → tab_number_chip}/tab_number_chip.stories.tsx +0 -0
- /package/src/components/{tag.doc.mdx → tag/tag.doc.mdx} +0 -0
|
@@ -13,8 +13,8 @@ import clsx from 'clsx';
|
|
|
13
13
|
import type React from 'react';
|
|
14
14
|
import { useCallback, useMemo, useRef, useState } from 'react';
|
|
15
15
|
|
|
16
|
-
import { Box, type BoxProps } from '../box
|
|
17
|
-
import { Text } from '../text
|
|
16
|
+
import { Box, type BoxProps } from '../box';
|
|
17
|
+
import { Text } from '../text';
|
|
18
18
|
import { useFloatingMenu } from './menu_common.js';
|
|
19
19
|
import { DropdownMenuBaseComponent, ListMenuComponent, ListMenuItemComponent } from './menu_components.js';
|
|
20
20
|
|
|
@@ -37,12 +37,16 @@ export interface MenuOption {
|
|
|
37
37
|
export interface MenuProps<T = MenuOption> {
|
|
38
38
|
ariaLabel?: string;
|
|
39
39
|
options: T[];
|
|
40
|
-
value?: string;
|
|
40
|
+
value?: string | string[];
|
|
41
41
|
onSelect: (newValue: string, selectedBy: SelectActionType) => void;
|
|
42
42
|
onMenuOpen?: (isOpen: boolean) => void;
|
|
43
|
+
/**
|
|
44
|
+
* Overrides default label, which is selected value || defaultLabel
|
|
45
|
+
*/
|
|
46
|
+
label?: string;
|
|
43
47
|
defaultLabel?: React.ReactNode;
|
|
44
48
|
closeOnSelect?: boolean;
|
|
45
|
-
renderOption?: (option: T) => React.ReactNode;
|
|
49
|
+
renderOption?: (option: T, isSelected: boolean) => React.ReactNode;
|
|
46
50
|
placement?: Placement;
|
|
47
51
|
components?: {
|
|
48
52
|
MenuBase?: React.ElementType;
|
|
@@ -51,7 +55,7 @@ export interface MenuProps<T = MenuOption> {
|
|
|
51
55
|
};
|
|
52
56
|
}
|
|
53
57
|
|
|
54
|
-
const defaultRenderOption = ({ label }: MenuOption) => <Text as="span">{label}</Text>;
|
|
58
|
+
const defaultRenderOption = ({ label }: MenuOption, _isSelected: boolean) => <Text as="span">{label}</Text>;
|
|
55
59
|
|
|
56
60
|
/**
|
|
57
61
|
* This example is a Select taken from https://floating-ui.com/docs/react-examples
|
|
@@ -64,6 +68,7 @@ export const Menu = <T extends MenuOption>({
|
|
|
64
68
|
onSelect,
|
|
65
69
|
onMenuOpen,
|
|
66
70
|
closeOnSelect = true,
|
|
71
|
+
label,
|
|
67
72
|
defaultLabel,
|
|
68
73
|
components,
|
|
69
74
|
renderOption,
|
|
@@ -88,10 +93,16 @@ export const Menu = <T extends MenuOption>({
|
|
|
88
93
|
});
|
|
89
94
|
|
|
90
95
|
const selectedIndex = useMemo(() => {
|
|
96
|
+
if (Array.isArray(value)) return null;
|
|
91
97
|
const foundIndex = options.findIndex((option) => option.value === value);
|
|
92
98
|
return foundIndex < 0 ? null : foundIndex;
|
|
93
99
|
}, [options, value]);
|
|
94
100
|
|
|
101
|
+
const selectedValuesSet = useMemo(() => new Set(Array.isArray(value) ? value : []), [value]);
|
|
102
|
+
|
|
103
|
+
const isItemSelected = (index: number): boolean =>
|
|
104
|
+
Array.isArray(value) ? selectedValuesSet.has(options[index].value) : index === selectedIndex;
|
|
105
|
+
|
|
95
106
|
const [activeIndex, setActiveIndex] = useState<number | null>(null);
|
|
96
107
|
const handleSelect = (newIndex: number, selectedBy: SelectActionType) => {
|
|
97
108
|
onSelect(options[newIndex].value, selectedBy);
|
|
@@ -147,7 +158,7 @@ export const Menu = <T extends MenuOption>({
|
|
|
147
158
|
className={menuClassNames.BASE}
|
|
148
159
|
tabindex="0"
|
|
149
160
|
>
|
|
150
|
-
{selectedIndex !== null ? options[selectedIndex].label : defaultLabel}
|
|
161
|
+
{label ?? (selectedIndex !== null ? options[selectedIndex].label : defaultLabel)}
|
|
151
162
|
</MenuBaseComponent>
|
|
152
163
|
{isOpen && (
|
|
153
164
|
<FloatingPortal>
|
|
@@ -158,36 +169,39 @@ export const Menu = <T extends MenuOption>({
|
|
|
158
169
|
{...getFloatingProps()}
|
|
159
170
|
className={menuClassNames.LIST}
|
|
160
171
|
>
|
|
161
|
-
{options.map((option, i) =>
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
172
|
+
{options.map((option, i) => {
|
|
173
|
+
const isSelected = isItemSelected(i);
|
|
174
|
+
return (
|
|
175
|
+
<MenuItemComponent
|
|
176
|
+
key={option.value}
|
|
177
|
+
$isSelected={isSelected}
|
|
178
|
+
$isActive={i === activeIndex}
|
|
179
|
+
ref={(node: HTMLElement | null) => {
|
|
180
|
+
listRef.current[i] = node;
|
|
181
|
+
}}
|
|
182
|
+
role="option"
|
|
183
|
+
tabIndex={i === activeIndex ? 0 : -1}
|
|
184
|
+
className={menuClassNames.ITEM}
|
|
185
|
+
aria-selected={isSelected && i === activeIndex}
|
|
186
|
+
{...getItemProps({
|
|
187
|
+
onClick: () => handleSelect(i, 'click'), // Handles mouse click
|
|
188
|
+
onKeyDown: (event) => {
|
|
189
|
+
if (event.key === 'Enter') {
|
|
190
|
+
event.preventDefault();
|
|
191
|
+
handleSelect(i, 'enter'); // Handles enter press
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
if (event.key === ' ' && !isTypingRef.current) {
|
|
195
|
+
event.preventDefault();
|
|
196
|
+
handleSelect(i, 'space');
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
})}
|
|
200
|
+
>
|
|
201
|
+
{effectiveRenderOption(option, isSelected)}
|
|
202
|
+
</MenuItemComponent>
|
|
203
|
+
);
|
|
204
|
+
})}
|
|
191
205
|
</MenuComponent>
|
|
192
206
|
</FloatingFocusManager>
|
|
193
207
|
</FloatingPortal>
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { type ReferenceType, type UseFloatingReturn } from '@floating-ui/react';
|
|
2
|
+
import type React from 'react';
|
|
2
3
|
import { forwardRef } from 'react';
|
|
3
4
|
import styled, { css } from 'styled-components';
|
|
4
5
|
|
|
5
|
-
import { ChevronDownIcon } from '@apify/ui-icons';
|
|
6
|
+
import { ChevronDownIcon, CrossIcon } from '@apify/ui-icons';
|
|
6
7
|
|
|
7
8
|
import { theme } from '../../design_system/theme.js';
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
9
|
+
import { Badge } from '../badge';
|
|
10
|
+
import type { BoxProps } from '../box';
|
|
11
|
+
import { Box } from '../box';
|
|
10
12
|
|
|
11
13
|
export type FloatingContext = Pick<UseFloatingReturn<ReferenceType>, 'context'>['context'];
|
|
12
14
|
|
|
@@ -97,3 +99,51 @@ export const DropdownMenuBaseComponent = forwardRef<HTMLElement, DropdownMenuBas
|
|
|
97
99
|
);
|
|
98
100
|
},
|
|
99
101
|
);
|
|
102
|
+
|
|
103
|
+
const VerticalDivider = styled.div`
|
|
104
|
+
width: 1px;
|
|
105
|
+
align-self: stretch;
|
|
106
|
+
background: ${theme.color.neutral.separatorSubtle};
|
|
107
|
+
`;
|
|
108
|
+
|
|
109
|
+
type DropdownMenuBaseComponentWithCountProps = {
|
|
110
|
+
children: React.ReactNode;
|
|
111
|
+
onClear?: () => void;
|
|
112
|
+
selectedCount?: number;
|
|
113
|
+
} & BoxProps;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Menu base component WITH dropdown icon and a selected-count badge.
|
|
117
|
+
* Use this variant when the menu supports multi-select and you want to
|
|
118
|
+
* display how many items are selected.
|
|
119
|
+
*/
|
|
120
|
+
export const DropdownMenuBaseComponentWithCount = forwardRef<HTMLElement, DropdownMenuBaseComponentWithCountProps>(
|
|
121
|
+
({ children, onClear, selectedCount, ...props }, ref) => {
|
|
122
|
+
const showCount = onClear && selectedCount !== undefined;
|
|
123
|
+
|
|
124
|
+
return (
|
|
125
|
+
<PlainMenuBaseComponent {...props} ref={ref}>
|
|
126
|
+
{children}
|
|
127
|
+
{showCount && (
|
|
128
|
+
<Badge variant="primary_black" size="extra_small">
|
|
129
|
+
{selectedCount}
|
|
130
|
+
</Badge>
|
|
131
|
+
)}
|
|
132
|
+
{showCount && <VerticalDivider />}
|
|
133
|
+
{onClear ? (
|
|
134
|
+
<CrossIcon
|
|
135
|
+
size="16"
|
|
136
|
+
color={theme.color.neutral.icon}
|
|
137
|
+
onMouseDown={(e: React.MouseEvent) => e.stopPropagation()}
|
|
138
|
+
onClick={(e: React.MouseEvent) => {
|
|
139
|
+
e.stopPropagation();
|
|
140
|
+
onClear();
|
|
141
|
+
}}
|
|
142
|
+
/>
|
|
143
|
+
) : (
|
|
144
|
+
<ChevronDownIcon size="16" color={theme.color.neutral.icon} />
|
|
145
|
+
)}
|
|
146
|
+
</PlainMenuBaseComponent>
|
|
147
|
+
);
|
|
148
|
+
},
|
|
149
|
+
);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import styled, { css } from 'styled-components';
|
|
2
2
|
|
|
3
3
|
import { theme } from '../../design_system/theme.js';
|
|
4
|
-
import { Shortcut } from '../shortcut
|
|
5
|
-
import type { TooltipProps, TooltipSize, TooltipTextAlign } from './tooltip
|
|
4
|
+
import { Shortcut } from '../shortcut';
|
|
5
|
+
import type { TooltipProps, TooltipSize, TooltipTextAlign } from './tooltip';
|
|
6
6
|
import { TOOLTIP_SIZES, TOOLTIP_TEXT_ALIGNS } from './tooltip.js';
|
|
7
7
|
|
|
8
8
|
type ContentProps = Pick<TooltipProps, 'content' | 'shortcuts' | 'imageUrl' | 'subtleText' | 'size' | 'textAlign'>;
|
|
@@ -5,18 +5,18 @@ import type { IconComponent, IconSize } from '@apify/ui-icons';
|
|
|
5
5
|
|
|
6
6
|
import type { ValueOf } from '@apify-packages/types';
|
|
7
7
|
|
|
8
|
-
import { theme } from '
|
|
9
|
-
import type { RegularBoxProps } from '
|
|
8
|
+
import { theme } from '../../design_system/theme.js';
|
|
9
|
+
import type { RegularBoxProps } from '../box';
|
|
10
10
|
import {
|
|
11
11
|
Button,
|
|
12
12
|
BUTTON_SIZE_VARIANTS_CSS,
|
|
13
13
|
type ButtonSize,
|
|
14
14
|
type RegularButtonProps,
|
|
15
15
|
type TransientButtonProps,
|
|
16
|
-
} from '
|
|
17
|
-
import { Tooltip } from '
|
|
18
|
-
import { Link, type RegularLinkProps } from '
|
|
19
|
-
import { InlineSpinner, spinnerClassNames } from '
|
|
16
|
+
} from '../button';
|
|
17
|
+
import { Tooltip } from '../floating';
|
|
18
|
+
import { Link, type RegularLinkProps } from '../link';
|
|
19
|
+
import { InlineSpinner, spinnerClassNames } from '../spinner';
|
|
20
20
|
|
|
21
21
|
export const ICON_BUTTON_VARIANTS = {
|
|
22
22
|
DEFAULT: 'DEFAULT',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './icon_button.js';
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
|
|
3
|
+
import { Image } from './image.js';
|
|
4
|
+
|
|
5
|
+
const meta: Meta<typeof Image> = {
|
|
6
|
+
title: 'UI-Library/Image',
|
|
7
|
+
component: Image,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'padded',
|
|
10
|
+
docs: {
|
|
11
|
+
description: {
|
|
12
|
+
component:
|
|
13
|
+
"Wrapper around `<img>` that uses the host app's `InternalImage` (e.g. for image proxy / CDN). Also accepts all spacing props from `Box`.",
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
argTypes: {
|
|
18
|
+
src: { control: 'text' },
|
|
19
|
+
alt: { control: 'text' },
|
|
20
|
+
width: { control: 'number' },
|
|
21
|
+
height: { control: 'number' },
|
|
22
|
+
loading: {
|
|
23
|
+
control: 'select',
|
|
24
|
+
options: ['eager', 'lazy'],
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export default meta;
|
|
30
|
+
|
|
31
|
+
type Story = StoryObj<typeof Image>;
|
|
32
|
+
|
|
33
|
+
const PLACEHOLDER_SRC = 'https://console.apify.com/img/logos_apify/logo_apify_full_dark_text.svg';
|
|
34
|
+
|
|
35
|
+
/** Basic image with src and alt. */
|
|
36
|
+
export const Default: Story = {
|
|
37
|
+
args: {
|
|
38
|
+
src: PLACEHOLDER_SRC,
|
|
39
|
+
alt: 'Apify logo',
|
|
40
|
+
width: 160,
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/** With explicit dimensions. */
|
|
45
|
+
export const WithDimensions: Story = {
|
|
46
|
+
args: {
|
|
47
|
+
src: PLACEHOLDER_SRC,
|
|
48
|
+
alt: 'Apify logo',
|
|
49
|
+
width: 240,
|
|
50
|
+
height: 64,
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/** Lazy loading — the browser defers the request until the image is near the viewport. */
|
|
55
|
+
export const LazyLoading: Story = {
|
|
56
|
+
args: {
|
|
57
|
+
src: PLACEHOLDER_SRC,
|
|
58
|
+
alt: 'Apify logo (lazy)',
|
|
59
|
+
width: 200,
|
|
60
|
+
loading: 'lazy',
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
/** Box spacing props work on Image too. */
|
|
65
|
+
export const WithSpacing: Story = {
|
|
66
|
+
args: {
|
|
67
|
+
src: PLACEHOLDER_SRC,
|
|
68
|
+
alt: 'Apify logo',
|
|
69
|
+
width: 200,
|
|
70
|
+
m: 'space24',
|
|
71
|
+
},
|
|
72
|
+
render: (args) => (
|
|
73
|
+
<div style={{ background: '#f5f5f5', display: 'inline-block', borderRadius: '0.4rem' }}>
|
|
74
|
+
<Image {...args} />
|
|
75
|
+
</div>
|
|
76
|
+
),
|
|
77
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { forwardRef } from 'react';
|
|
2
2
|
|
|
3
|
-
import type { ImageProxyOptions } from '
|
|
4
|
-
import { useSharedUiDependencies } from '
|
|
5
|
-
import { Box, type BoxProps } from '
|
|
3
|
+
import type { ImageProxyOptions } from '../../ui_dependency_provider';
|
|
4
|
+
import { useSharedUiDependencies } from '../../ui_dependency_provider.js';
|
|
5
|
+
import { Box, type BoxProps } from '../box';
|
|
6
6
|
|
|
7
7
|
type ImageProps = {
|
|
8
8
|
src: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './image.js';
|
package/src/components/index.ts
CHANGED
|
@@ -1,35 +1,39 @@
|
|
|
1
|
-
export * from './text
|
|
2
|
-
export * from './box
|
|
3
|
-
export * from './avatar
|
|
4
|
-
export * from './card_container
|
|
5
|
-
export * from './message
|
|
6
|
-
export * from './floating
|
|
7
|
-
export * from './button
|
|
8
|
-
export * from './link
|
|
9
|
-
export * from './action_link
|
|
10
|
-
export * from './simple_markdown
|
|
11
|
-
export * from './code
|
|
12
|
-
export * from './color_wheel_gradient
|
|
13
|
-
export * from './readme_renderer
|
|
14
|
-
export * from './
|
|
15
|
-
export * from './
|
|
16
|
-
export * from './
|
|
17
|
-
export * from './
|
|
18
|
-
export * from './
|
|
19
|
-
export * from './
|
|
20
|
-
export * from './
|
|
21
|
-
export * from './
|
|
22
|
-
export * from './
|
|
23
|
-
export * from './
|
|
24
|
-
export * from './
|
|
25
|
-
export * from './
|
|
26
|
-
export * from './
|
|
27
|
-
export * from './
|
|
28
|
-
export * from './
|
|
29
|
-
export * from './
|
|
30
|
-
export * from './
|
|
31
|
-
export * from './
|
|
32
|
-
export * from './
|
|
33
|
-
export * from './
|
|
34
|
-
export * from './
|
|
35
|
-
export * from './
|
|
1
|
+
export * from './text';
|
|
2
|
+
export * from './box';
|
|
3
|
+
export * from './avatar';
|
|
4
|
+
export * from './card_container';
|
|
5
|
+
export * from './message';
|
|
6
|
+
export * from './floating';
|
|
7
|
+
export * from './button';
|
|
8
|
+
export * from './link';
|
|
9
|
+
export * from './action_link';
|
|
10
|
+
export * from './simple_markdown';
|
|
11
|
+
export * from './code';
|
|
12
|
+
export * from './color_wheel_gradient';
|
|
13
|
+
export * from './readme_renderer';
|
|
14
|
+
export * from './card';
|
|
15
|
+
export * from './markdown';
|
|
16
|
+
export * from './pagination';
|
|
17
|
+
export * from './tab_number_chip';
|
|
18
|
+
export * from './tile';
|
|
19
|
+
export * from './blog_article';
|
|
20
|
+
export * from './banner';
|
|
21
|
+
export * from './actor_template_card';
|
|
22
|
+
export * from './chip';
|
|
23
|
+
export * from './image';
|
|
24
|
+
export * from './rating';
|
|
25
|
+
export * from './badge';
|
|
26
|
+
export * from './tag';
|
|
27
|
+
export * from './tabs';
|
|
28
|
+
export * from './shortcut';
|
|
29
|
+
export * from './icon_button';
|
|
30
|
+
export * from './spinner';
|
|
31
|
+
export * from './store';
|
|
32
|
+
export * from './checkbox';
|
|
33
|
+
export * from './radio_button';
|
|
34
|
+
export * from './browser_window';
|
|
35
|
+
export * from './collapsible_card';
|
|
36
|
+
export * from './select';
|
|
37
|
+
export * from './switch';
|
|
38
|
+
export * from './table';
|
|
39
|
+
export * from './breadcrumb';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './link.js';
|
|
@@ -6,9 +6,9 @@ import styled from 'styled-components';
|
|
|
6
6
|
|
|
7
7
|
import { ExternalLinkIcon } from '@apify/ui-icons';
|
|
8
8
|
|
|
9
|
-
import { theme } from '
|
|
10
|
-
import { useSharedUiDependencies } from '
|
|
11
|
-
import { Box, type BoxProps } from '
|
|
9
|
+
import { theme } from '../../design_system/theme.js';
|
|
10
|
+
import { useSharedUiDependencies } from '../../ui_dependency_provider.js';
|
|
11
|
+
import { Box, type BoxProps } from '../box';
|
|
12
12
|
|
|
13
13
|
export type To = string | Partial<Path>;
|
|
14
14
|
export interface RegularLinkProps {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './markdown.js';
|
|
@@ -10,13 +10,13 @@ import styled from 'styled-components';
|
|
|
10
10
|
|
|
11
11
|
import { LinkIcon } from '@apify/ui-icons';
|
|
12
12
|
|
|
13
|
-
import
|
|
13
|
+
import { Box } from '..';
|
|
14
|
+
import type { UiThemeOption } from '../../design_system/theme';
|
|
14
15
|
import { theme } from '../../design_system/theme.js';
|
|
15
|
-
import { useCopyToClipboard } from '../../utils
|
|
16
|
-
import { CodeBlock, inlineCodeStyles, OneLineCode } from '../code
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { cleanMarkdown, slugifyHeadingChildren } from '../readme_renderer/utils.js';
|
|
16
|
+
import { useCopyToClipboard } from '../../utils';
|
|
17
|
+
import { CodeBlock, inlineCodeStyles, OneLineCode } from '../code';
|
|
18
|
+
import { Link as SharedLink, type LinkProps } from '../link';
|
|
19
|
+
import { cleanMarkdown, slugifyHeadingChildren } from '../readme_renderer';
|
|
20
20
|
|
|
21
21
|
interface StyledReadmeProps {
|
|
22
22
|
$scrollMarginTopPx: number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './message.js';
|
|
@@ -6,11 +6,11 @@ import styled, { css } from 'styled-components';
|
|
|
6
6
|
import type { IconComponent as IconComponentType } from '@apify/ui-icons';
|
|
7
7
|
import { CheckIcon, CrossIcon, InfoIcon, WarningTriangleIcon, XCircleIcon } from '@apify/ui-icons';
|
|
8
8
|
|
|
9
|
-
import { theme } from '
|
|
10
|
-
import { Box, type BoxProps } from '
|
|
11
|
-
import type { ButtonProps } from '
|
|
12
|
-
import { Button } from '
|
|
13
|
-
import { Text } from '
|
|
9
|
+
import { theme } from '../../design_system/theme.js';
|
|
10
|
+
import { Box, type BoxProps } from '../box';
|
|
11
|
+
import type { ButtonProps } from '../button';
|
|
12
|
+
import { Button } from '../button';
|
|
13
|
+
import { Text } from '../text';
|
|
14
14
|
|
|
15
15
|
export const messageClassNames = {
|
|
16
16
|
main: 'Message',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './pagination.js';
|
|
@@ -5,8 +5,8 @@ import styled from 'styled-components';
|
|
|
5
5
|
import { ChevronLeftIcon, ChevronRightIcon } from '@apify/ui-icons';
|
|
6
6
|
|
|
7
7
|
import { theme } from '../../design_system/theme.js';
|
|
8
|
-
import { Box } from '../box
|
|
9
|
-
import { Button } from '../button
|
|
8
|
+
import { Box } from '../box';
|
|
9
|
+
import { Button } from '../button';
|
|
10
10
|
|
|
11
11
|
const LEADING_THREE_DOTS_PAGE_KEY = -1;
|
|
12
12
|
const TRAILING_THREE_DOTS_PAGE_KEY = -2;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './radio_button.js';
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { type ComponentProps, useState } from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
import { RadioButtonPrimitive } from './radio_button.js';
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: 'UI-Library/Inputs/RadioButtonPrimitive',
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
const Grid = styled.div`
|
|
11
|
+
margin: 5rem 3rem;
|
|
12
|
+
display: grid;
|
|
13
|
+
grid-template-columns: repeat(1, auto);
|
|
14
|
+
gap: 1.4rem;
|
|
15
|
+
`;
|
|
16
|
+
|
|
17
|
+
const Row = styled.div`
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
gap: 0.8rem;
|
|
21
|
+
`;
|
|
22
|
+
|
|
23
|
+
type ControlledRadioButtonProps = { initialValue?: boolean } & Omit<
|
|
24
|
+
ComponentProps<typeof RadioButtonPrimitive>,
|
|
25
|
+
'value' | 'setValue'
|
|
26
|
+
>;
|
|
27
|
+
|
|
28
|
+
const ControlledRadioButton = ({ initialValue = false, ...props }: ControlledRadioButtonProps) => {
|
|
29
|
+
const [value, setValue] = useState(initialValue);
|
|
30
|
+
return <RadioButtonPrimitive value={value} setValue={setValue} {...props} />;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export const States = () => (
|
|
34
|
+
<Grid>
|
|
35
|
+
<Row>
|
|
36
|
+
<ControlledRadioButton /> Unchecked
|
|
37
|
+
</Row>
|
|
38
|
+
<Row>
|
|
39
|
+
<ControlledRadioButton initialValue /> Checked
|
|
40
|
+
</Row>
|
|
41
|
+
<Row>
|
|
42
|
+
<ControlledRadioButton disabled /> Disabled
|
|
43
|
+
</Row>
|
|
44
|
+
<Row>
|
|
45
|
+
<ControlledRadioButton initialValue disabled /> Checked & disabled
|
|
46
|
+
</Row>
|
|
47
|
+
<Row>
|
|
48
|
+
<ControlledRadioButton readOnly initialValue /> Checked & readonly
|
|
49
|
+
</Row>
|
|
50
|
+
<Row>
|
|
51
|
+
<ControlledRadioButton error="Some error" /> Error
|
|
52
|
+
</Row>
|
|
53
|
+
<Row>
|
|
54
|
+
<ControlledRadioButton initialValue error="Some error" /> Checked + error
|
|
55
|
+
</Row>
|
|
56
|
+
</Grid>
|
|
57
|
+
);
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { css } from 'styled-components';
|
|
2
|
+
|
|
3
|
+
import { theme } from '../../design_system/theme.js';
|
|
4
|
+
|
|
5
|
+
export const radioButtonStyle = css`
|
|
6
|
+
all: unset;
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
border: 1px solid ${theme.color.neutral.border};
|
|
9
|
+
border-radius: 50%;
|
|
10
|
+
background-color: ${theme.color.neutral.background};
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
width: 16px;
|
|
15
|
+
height: 16px;
|
|
16
|
+
position: relative;
|
|
17
|
+
flex-shrink: 0;
|
|
18
|
+
|
|
19
|
+
&:hover,
|
|
20
|
+
&:focus {
|
|
21
|
+
border-color: ${theme.color.primary.action};
|
|
22
|
+
cursor: pointer;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&.disabled {
|
|
26
|
+
background-color: ${theme.color.neutral.textDisabled};
|
|
27
|
+
border-color: ${theme.color.neutral.border};
|
|
28
|
+
cursor: not-allowed;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&.error {
|
|
32
|
+
border-color: ${theme.color.danger.action};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&[data-state='checked'] {
|
|
36
|
+
border-color: ${theme.color.primary.action};
|
|
37
|
+
border-width: 4px;
|
|
38
|
+
|
|
39
|
+
&.error {
|
|
40
|
+
border-color: ${theme.color.danger.action};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&.disabled {
|
|
44
|
+
border-color: ${theme.color.neutral.border};
|
|
45
|
+
background-color: ${theme.color.neutral.textDisabled};
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
`;
|