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