@elastic/eui 64.0.1 → 65.0.2
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/eui_charts_theme.js +330 -330
- package/dist/eui_charts_theme.js.map +1 -1
- package/dist/eui_theme_dark.css +164 -1249
- package/dist/eui_theme_dark.json +0 -32
- package/dist/eui_theme_dark.json.d.ts +0 -32
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +136 -1221
- package/dist/eui_theme_light.json +0 -32
- package/dist/eui_theme_light.json.d.ts +0 -32
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/accessibility/screen_reader_only/screen_reader_only.styles.js +2 -1
- package/es/components/accessibility/skip_link/skip_link.js +4 -54
- package/es/components/accordion/accordion.js +2 -1
- package/es/components/accordion/accordion.styles.js +17 -27
- package/es/components/badge/beta_badge/beta_badge.js +16 -3
- package/es/components/basic_table/basic_table.js +1 -1
- package/es/components/basic_table/collapsed_item_actions.js +1 -1
- package/es/components/basic_table/in_memory_table.js +1 -1
- package/es/components/beacon/beacon.styles.js +2 -2
- package/es/components/button/button.js +112 -215
- package/es/components/button/button_display/_button_display.js +90 -40
- package/es/components/button/button_display/_button_display.styles.js +7 -16
- package/es/components/button/button_display/_button_display_content.js +6 -3
- package/es/components/button/button_display/_button_display_content.styles.js +7 -17
- package/es/components/button/button_empty/button_empty.js +63 -53
- package/es/components/button/button_empty/index.js +1 -1
- package/es/components/button/button_group/button_group.js +4 -12
- package/es/components/button/button_group/button_group_button.js +14 -4
- package/es/components/button/button_icon/button_icon.js +61 -42
- package/es/components/call_out/call_out.styles.js +2 -1
- package/es/components/card/card.js +173 -89
- package/es/components/card/card.styles.js +136 -0
- package/es/components/card/card_select/card_select.js +133 -0
- package/es/components/card/card_select/card_select.styles.js +25 -0
- package/es/components/card/card_select/index.js +8 -0
- package/es/components/card/checkable_card/checkable_card.js +14 -9
- package/es/components/card/checkable_card/checkable_card.styles.js +22 -0
- package/es/components/comment_list/comment_event.styles.js +1 -1
- package/es/components/datagrid/body/data_grid_body.js +7 -6
- package/es/components/datagrid/body/data_grid_cell.js +13 -12
- package/es/components/datagrid/body/header/data_grid_header_cell.js +7 -6
- package/es/components/datagrid/body/header/data_grid_header_row.js +7 -6
- package/es/components/datagrid/data_grid.js +7 -6
- package/es/components/datagrid/utils/in_memory.js +7 -6
- package/es/components/date_picker/auto_refresh/auto_refresh.js +3 -2
- package/es/components/date_picker/react-datepicker/original.package.json +124 -0
- package/es/components/date_picker/super_date_picker/super_date_picker.js +17 -1
- package/es/components/date_picker/super_date_picker/super_update_button.js +11 -1
- package/es/components/description_list/description_list_title.js +1 -1
- package/es/components/expression/expression.styles.js +13 -31
- package/es/components/facet/facet_button.js +5 -4
- package/es/components/header/header_links/header_link.js +5 -3
- package/es/components/icon/icon.js +2 -1
- package/es/components/image/image_button.styles.js +1 -1
- package/es/components/image/image_wrapper.styles.js +3 -3
- package/es/components/link/link.styles.js +2 -2
- package/es/components/list_group/list_group.js +2 -1
- package/es/components/list_group/list_group_item.js +2 -1
- package/es/components/list_group/pinnable_list_group/pinnable_list_group.js +3 -2
- package/es/components/loading/loading_chart.styles.js +16 -26
- package/es/components/loading/loading_content.styles.js +2 -2
- package/es/components/loading/loading_logo.styles.js +4 -4
- package/es/components/loading/loading_spinner.styles.js +6 -6
- package/es/components/markdown_editor/markdown_editor_toolbar.js +2 -0
- package/es/components/modal/confirm_modal.js +1 -1
- package/es/components/notification/notification_event.js +5 -3
- package/es/components/notification/notification_event_read_button.js +2 -1
- package/es/components/page/page_template.js +2 -2
- package/es/components/page_template/inner/page_inner.styles.js +2 -2
- package/es/components/page_template/outer/page_outer.styles.js +3 -1
- package/es/components/pagination/pagination_button.js +5 -3
- package/es/components/panel/panel.js +1 -1
- package/es/components/panel/{panel.style.js → panel.styles.js} +2 -2
- package/es/components/progress/progress.styles.js +2 -2
- package/es/components/title/title.styles.js +2 -2
- package/es/components/toast/toast.styles.js +4 -4
- package/es/components/tool_tip/icon_tip.js +11 -1
- package/es/components/tool_tip/tool_tip.js +18 -6
- package/es/global_styling/functions/logicals.js +2 -72
- package/es/global_styling/functions/logicals.json +56 -0
- package/es/global_styling/functions/typography.js +2 -1
- package/es/global_styling/mixins/_color.js +1 -1
- package/es/global_styling/mixins/_helpers.js +7 -1
- package/es/global_styling/reset/global_styles.js +2 -1
- package/es/themes/amsterdam/global_styling/mixins/button.js +165 -16
- package/eui.d.ts +1062 -936
- package/i18ntokens.json +15 -15
- package/lib/components/accessibility/screen_reader_only/screen_reader_only.styles.js +3 -1
- package/lib/components/accessibility/skip_link/skip_link.js +4 -54
- package/lib/components/accordion/accordion.js +3 -1
- package/lib/components/accordion/accordion.styles.js +17 -26
- package/lib/components/badge/beta_badge/beta_badge.js +16 -3
- package/lib/components/basic_table/basic_table.js +1 -1
- package/lib/components/basic_table/collapsed_item_actions.js +1 -1
- package/lib/components/basic_table/in_memory_table.js +1 -1
- package/lib/components/beacon/beacon.styles.js +1 -1
- package/lib/components/button/button.js +124 -229
- package/lib/components/button/button_display/_button_display.js +94 -33
- package/lib/components/button/button_display/_button_display.styles.js +7 -16
- package/lib/components/button/button_display/_button_display_content.js +7 -3
- package/lib/components/button/button_display/_button_display_content.styles.js +7 -17
- package/lib/components/button/button_empty/button_empty.js +64 -54
- package/lib/components/button/button_empty/index.js +0 -6
- package/lib/components/button/button_group/button_group.js +4 -12
- package/lib/components/button/button_group/button_group_button.js +15 -4
- package/lib/components/button/button_icon/button_icon.js +61 -43
- package/lib/components/call_out/call_out.styles.js +2 -1
- package/lib/components/card/card.js +174 -88
- package/lib/components/card/card.styles.js +146 -0
- package/lib/components/card/card_select/card_select.js +144 -0
- package/lib/components/card/card_select/card_select.styles.js +27 -0
- package/lib/components/card/card_select/index.js +19 -0
- package/lib/components/card/checkable_card/checkable_card.js +16 -9
- package/lib/components/card/checkable_card/checkable_card.styles.js +33 -0
- package/lib/components/comment_list/comment_event.styles.js +1 -1
- package/lib/components/datagrid/body/data_grid_body.js +7 -6
- package/lib/components/datagrid/body/data_grid_cell.js +13 -12
- package/lib/components/datagrid/body/header/data_grid_header_cell.js +7 -6
- package/lib/components/datagrid/body/header/data_grid_header_row.js +7 -6
- package/lib/components/datagrid/data_grid.js +7 -6
- package/lib/components/datagrid/utils/in_memory.js +7 -6
- package/lib/components/date_picker/auto_refresh/auto_refresh.js +3 -2
- package/lib/components/date_picker/react-datepicker/original.package.json +124 -0
- package/lib/components/date_picker/super_date_picker/super_date_picker.js +17 -1
- package/lib/components/date_picker/super_date_picker/super_update_button.js +11 -1
- package/lib/components/description_list/description_list_title.js +1 -1
- package/lib/components/expression/expression.styles.js +12 -30
- package/lib/components/facet/facet_button.js +4 -3
- package/lib/components/header/header_links/header_link.js +5 -3
- package/lib/components/icon/icon.js +2 -1
- package/lib/components/image/image_button.styles.js +1 -1
- package/lib/components/image/image_wrapper.styles.js +2 -2
- package/lib/components/link/link.styles.js +1 -1
- package/lib/components/list_group/list_group.js +2 -1
- package/lib/components/list_group/list_group_item.js +2 -1
- package/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +3 -2
- package/lib/components/loading/loading_chart.styles.js +16 -25
- package/lib/components/loading/loading_content.styles.js +1 -1
- package/lib/components/loading/loading_logo.styles.js +4 -4
- package/lib/components/loading/loading_spinner.styles.js +5 -5
- package/lib/components/markdown_editor/markdown_editor_toolbar.js +2 -0
- package/lib/components/modal/confirm_modal.js +1 -1
- package/lib/components/notification/notification_event.js +5 -3
- package/lib/components/notification/notification_event_read_button.js +2 -1
- package/lib/components/page/page_template.js +1 -1
- package/lib/components/page_template/inner/page_inner.styles.js +2 -2
- package/lib/components/page_template/outer/page_outer.styles.js +4 -1
- package/lib/components/panel/panel.js +1 -1
- package/{optimize/lib/components/panel/panel.style.js → lib/components/panel/panel.styles.js} +1 -1
- package/lib/components/progress/progress.styles.js +2 -2
- package/lib/components/title/title.styles.js +1 -1
- package/lib/components/toast/toast.styles.js +4 -4
- package/lib/components/tool_tip/icon_tip.js +11 -1
- package/lib/components/tool_tip/tool_tip.js +18 -6
- package/lib/global_styling/functions/logicals.js +3 -72
- package/lib/global_styling/functions/logicals.json +56 -0
- package/lib/global_styling/functions/typography.js +3 -1
- package/lib/global_styling/mixins/_color.js +1 -1
- package/lib/global_styling/mixins/_helpers.js +9 -2
- package/lib/global_styling/reset/global_styles.js +3 -1
- package/lib/themes/amsterdam/global_styling/mixins/button.js +178 -24
- package/optimize/es/components/accessibility/screen_reader_only/screen_reader_only.styles.js +2 -1
- package/optimize/es/components/accordion/accordion.js +2 -1
- package/optimize/es/components/accordion/accordion.styles.js +17 -27
- package/optimize/es/components/badge/beta_badge/beta_badge.js +6 -3
- package/optimize/es/components/beacon/beacon.styles.js +2 -2
- package/optimize/es/components/button/button.js +88 -100
- package/optimize/es/components/button/button_display/_button_display.js +67 -32
- package/optimize/es/components/button/button_display/_button_display.styles.js +7 -16
- package/optimize/es/components/button/button_display/_button_display_content.js +5 -2
- package/optimize/es/components/button/button_display/_button_display_content.styles.js +7 -17
- package/optimize/es/components/button/button_empty/button_empty.js +55 -47
- package/optimize/es/components/button/button_empty/index.js +1 -1
- package/optimize/es/components/button/button_group/button_group.js +2 -10
- package/optimize/es/components/button/button_group/button_group_button.js +13 -3
- package/optimize/es/components/button/button_icon/button_icon.js +54 -41
- package/optimize/es/components/call_out/call_out.styles.js +2 -1
- package/optimize/es/components/card/card.js +97 -31
- package/optimize/es/components/card/card.styles.js +136 -0
- package/optimize/es/components/card/{card_select.js → card_select/card_select.js} +16 -14
- package/optimize/es/components/card/card_select/card_select.styles.js +25 -0
- package/optimize/es/components/card/card_select/index.js +8 -0
- package/optimize/es/components/card/checkable_card/checkable_card.js +14 -9
- package/optimize/es/components/card/checkable_card/checkable_card.styles.js +22 -0
- package/optimize/es/components/comment_list/comment_event.styles.js +1 -1
- package/optimize/es/components/date_picker/react-datepicker/original.package.json +124 -0
- package/optimize/es/components/description_list/description_list_title.js +1 -1
- package/optimize/es/components/expression/expression.styles.js +13 -31
- package/optimize/es/components/facet/facet_button.js +5 -3
- package/optimize/es/components/icon/icon.js +2 -1
- package/optimize/es/components/image/image_button.styles.js +1 -1
- package/optimize/es/components/image/image_wrapper.styles.js +3 -3
- package/optimize/es/components/link/link.styles.js +2 -2
- package/optimize/es/components/loading/loading_chart.styles.js +16 -26
- package/optimize/es/components/loading/loading_content.styles.js +2 -2
- package/optimize/es/components/loading/loading_logo.styles.js +4 -4
- package/optimize/es/components/loading/loading_spinner.styles.js +6 -6
- package/optimize/es/components/markdown_editor/markdown_editor_toolbar.js +2 -0
- package/optimize/es/components/page/page_template.js +2 -2
- package/optimize/es/components/page_template/inner/page_inner.styles.js +2 -2
- package/optimize/es/components/page_template/outer/page_outer.styles.js +3 -1
- package/optimize/es/components/panel/panel.js +1 -1
- package/optimize/es/components/panel/{panel.style.js → panel.styles.js} +2 -2
- package/optimize/es/components/progress/progress.styles.js +2 -2
- package/optimize/es/components/title/title.styles.js +2 -2
- package/optimize/es/components/toast/toast.styles.js +4 -4
- package/optimize/es/components/tool_tip/tool_tip.js +7 -5
- package/optimize/es/global_styling/functions/logicals.js +2 -72
- package/optimize/es/global_styling/functions/logicals.json +56 -0
- package/optimize/es/global_styling/functions/typography.js +2 -1
- package/optimize/es/global_styling/mixins/_color.js +1 -1
- package/optimize/es/global_styling/mixins/_helpers.js +7 -1
- package/optimize/es/global_styling/reset/global_styles.js +2 -1
- package/optimize/es/themes/amsterdam/global_styling/mixins/button.js +155 -16
- package/optimize/lib/components/accessibility/screen_reader_only/screen_reader_only.styles.js +3 -1
- package/optimize/lib/components/accordion/accordion.js +3 -1
- package/optimize/lib/components/accordion/accordion.styles.js +17 -26
- package/optimize/lib/components/badge/beta_badge/beta_badge.js +6 -3
- package/optimize/lib/components/beacon/beacon.styles.js +1 -1
- package/optimize/lib/components/button/button.js +92 -103
- package/optimize/lib/components/button/button_display/_button_display.js +71 -25
- package/optimize/lib/components/button/button_display/_button_display.styles.js +7 -16
- package/optimize/lib/components/button/button_display/_button_display_content.js +6 -2
- package/optimize/lib/components/button/button_display/_button_display_content.styles.js +7 -17
- package/optimize/lib/components/button/button_empty/button_empty.js +59 -50
- package/optimize/lib/components/button/button_empty/index.js +0 -6
- package/optimize/lib/components/button/button_group/button_group.js +2 -10
- package/optimize/lib/components/button/button_group/button_group_button.js +15 -3
- package/optimize/lib/components/button/button_icon/button_icon.js +54 -41
- package/optimize/lib/components/call_out/call_out.styles.js +2 -1
- package/optimize/lib/components/card/card.js +97 -30
- package/optimize/lib/components/card/card.styles.js +146 -0
- package/optimize/lib/components/card/{card_select.js → card_select/card_select.js} +16 -14
- package/optimize/lib/components/card/card_select/card_select.styles.js +27 -0
- package/optimize/lib/components/card/card_select/index.js +19 -0
- package/optimize/lib/components/card/checkable_card/checkable_card.js +16 -9
- package/optimize/lib/components/card/checkable_card/checkable_card.styles.js +33 -0
- package/optimize/lib/components/comment_list/comment_event.styles.js +1 -1
- package/optimize/lib/components/date_picker/react-datepicker/original.package.json +124 -0
- package/optimize/lib/components/description_list/description_list_title.js +1 -1
- package/optimize/lib/components/expression/expression.styles.js +12 -30
- package/optimize/lib/components/facet/facet_button.js +4 -2
- package/optimize/lib/components/icon/icon.js +2 -1
- package/optimize/lib/components/image/image_button.styles.js +1 -1
- package/optimize/lib/components/image/image_wrapper.styles.js +2 -2
- package/optimize/lib/components/link/link.styles.js +1 -1
- package/optimize/lib/components/loading/loading_chart.styles.js +16 -25
- package/optimize/lib/components/loading/loading_content.styles.js +1 -1
- package/optimize/lib/components/loading/loading_logo.styles.js +4 -4
- package/optimize/lib/components/loading/loading_spinner.styles.js +5 -5
- package/optimize/lib/components/markdown_editor/markdown_editor_toolbar.js +2 -0
- package/optimize/lib/components/page/page_template.js +1 -1
- package/optimize/lib/components/page_template/inner/page_inner.styles.js +2 -2
- package/optimize/lib/components/page_template/outer/page_outer.styles.js +4 -1
- package/optimize/lib/components/panel/panel.js +1 -1
- package/{test-env/components/panel/panel.style.js → optimize/lib/components/panel/panel.styles.js} +1 -1
- package/optimize/lib/components/progress/progress.styles.js +2 -2
- package/optimize/lib/components/title/title.styles.js +1 -1
- package/optimize/lib/components/toast/toast.styles.js +4 -4
- package/optimize/lib/components/tool_tip/tool_tip.js +7 -5
- package/optimize/lib/global_styling/functions/logicals.js +10 -73
- package/optimize/lib/global_styling/functions/logicals.json +56 -0
- package/optimize/lib/global_styling/functions/typography.js +3 -1
- package/optimize/lib/global_styling/mixins/_color.js +1 -1
- package/optimize/lib/global_styling/mixins/_helpers.js +9 -2
- package/optimize/lib/global_styling/reset/global_styles.js +3 -1
- package/optimize/lib/themes/amsterdam/global_styling/mixins/button.js +170 -17
- package/package.json +2 -2
- package/src/components/badge/beta_badge/_beta_badge.scss +5 -1
- package/src/components/button/_index.scss +0 -1
- package/src/components/button/button_empty/_button_empty.scss +4 -48
- package/src/components/button/button_group/_button_group.scss +0 -1
- package/src/components/button/button_group/_button_group_button.scss +55 -83
- package/src/components/button/button_icon/_button_icon.scss +3 -103
- package/src/components/control_bar/_control_bar.scss +2 -6
- package/src/components/datagrid/_data_grid_data_row.scss +7 -0
- package/src/components/flyout/_flyout.scss +4 -1
- package/src/components/index.scss +0 -1
- package/src/global_styling/mixins/_button.scss +55 -11
- package/src/global_styling/mixins/_index.scss +0 -1
- package/src/themes/amsterdam/global_styling/mixins/_index.scss +0 -2
- package/src/themes/amsterdam/overrides/_header.scss +0 -2
- package/src/themes/amsterdam/overrides/_index.scss +0 -4
- package/test-env/components/accessibility/screen_reader_only/screen_reader_only.styles.js +3 -1
- package/test-env/components/accessibility/skip_link/skip_link.js +4 -54
- package/test-env/components/accordion/accordion.js +3 -1
- package/test-env/components/accordion/accordion.styles.js +17 -26
- package/test-env/components/badge/beta_badge/beta_badge.js +16 -3
- package/test-env/components/basic_table/basic_table.js +1 -1
- package/test-env/components/basic_table/collapsed_item_actions.js +1 -1
- package/test-env/components/basic_table/in_memory_table.js +1 -1
- package/test-env/components/beacon/beacon.styles.js +1 -1
- package/test-env/components/button/button.js +111 -225
- package/test-env/components/button/button_display/_button_display.js +93 -32
- package/test-env/components/button/button_display/_button_display.styles.js +7 -16
- package/test-env/components/button/button_display/_button_display_content.js +7 -3
- package/test-env/components/button/button_display/_button_display_content.styles.js +7 -17
- package/test-env/components/button/button_empty/button_empty.js +64 -53
- package/test-env/components/button/button_empty/index.js +0 -6
- package/test-env/components/button/button_group/button_group.js +4 -12
- package/test-env/components/button/button_group/button_group_button.js +16 -4
- package/test-env/components/button/button_icon/button_icon.js +61 -42
- package/test-env/components/call_out/call_out.styles.js +2 -1
- package/test-env/components/card/card.js +172 -88
- package/test-env/components/card/card.styles.js +146 -0
- package/test-env/components/card/card_select/card_select.js +141 -0
- package/test-env/components/card/card_select/card_select.styles.js +27 -0
- package/test-env/components/card/card_select/index.js +19 -0
- package/test-env/components/card/checkable_card/checkable_card.js +16 -9
- package/test-env/components/card/checkable_card/checkable_card.styles.js +33 -0
- package/test-env/components/comment_list/comment_event.styles.js +1 -1
- package/test-env/components/datagrid/body/data_grid_body.js +7 -6
- package/test-env/components/datagrid/body/data_grid_cell.js +13 -12
- package/test-env/components/datagrid/body/header/data_grid_header_cell.js +7 -6
- package/test-env/components/datagrid/body/header/data_grid_header_row.js +7 -6
- package/test-env/components/datagrid/data_grid.js +7 -6
- package/test-env/components/datagrid/utils/in_memory.js +7 -6
- package/test-env/components/date_picker/auto_refresh/auto_refresh.js +3 -2
- package/test-env/components/date_picker/react-datepicker/original.package.json +124 -0
- package/test-env/components/date_picker/super_date_picker/super_date_picker.js +17 -1
- package/test-env/components/date_picker/super_date_picker/super_update_button.js +11 -1
- package/test-env/components/description_list/description_list_title.js +1 -1
- package/test-env/components/expression/expression.styles.js +12 -30
- package/test-env/components/facet/facet_button.js +4 -3
- package/test-env/components/header/header_links/header_link.js +5 -3
- package/test-env/components/image/image_button.styles.js +1 -1
- package/test-env/components/image/image_wrapper.styles.js +2 -2
- package/test-env/components/link/link.styles.js +1 -1
- package/test-env/components/list_group/list_group.js +2 -1
- package/test-env/components/list_group/list_group_item.js +2 -1
- package/test-env/components/list_group/pinnable_list_group/pinnable_list_group.js +3 -2
- package/test-env/components/loading/loading_chart.styles.js +16 -25
- package/test-env/components/loading/loading_content.styles.js +1 -1
- package/test-env/components/loading/loading_logo.styles.js +4 -4
- package/test-env/components/loading/loading_spinner.styles.js +5 -5
- package/test-env/components/markdown_editor/markdown_editor_toolbar.js +2 -0
- package/test-env/components/modal/confirm_modal.js +1 -1
- package/test-env/components/notification/notification_event.js +5 -3
- package/test-env/components/notification/notification_event_read_button.js +2 -1
- package/test-env/components/page/page_template.js +1 -1
- package/test-env/components/page_template/inner/page_inner.styles.js +2 -2
- package/test-env/components/page_template/outer/page_outer.styles.js +4 -1
- package/test-env/components/panel/panel.js +1 -1
- package/{lib/components/panel/panel.style.js → test-env/components/panel/panel.styles.js} +1 -1
- package/test-env/components/progress/progress.styles.js +2 -2
- package/test-env/components/title/title.styles.js +1 -1
- package/test-env/components/toast/toast.styles.js +4 -4
- package/test-env/components/tool_tip/icon_tip.js +11 -1
- package/test-env/components/tool_tip/tool_tip.js +18 -6
- package/test-env/global_styling/functions/logicals.js +10 -73
- package/test-env/global_styling/functions/logicals.json +56 -0
- package/test-env/global_styling/functions/typography.js +3 -1
- package/test-env/global_styling/mixins/_color.js +1 -1
- package/test-env/global_styling/mixins/_helpers.js +9 -2
- package/test-env/global_styling/reset/global_styles.js +3 -1
- package/test-env/themes/amsterdam/global_styling/mixins/button.js +170 -17
- package/es/components/card/card_select.js +0 -176
- package/lib/components/card/card_select.js +0 -187
- package/src/components/button/_button.scss +0 -143
- package/src/components/button/button_icon/_variables.scss +0 -11
- package/src/components/card/_card.scss +0 -239
- package/src/components/card/_card_select.scss +0 -21
- package/src/components/card/_index.scss +0 -5
- package/src/components/card/_mixins.scss +0 -11
- package/src/components/card/_variables.scss +0 -25
- package/src/components/card/checkable_card/_checkable_card.scss +0 -29
- package/src/components/card/checkable_card/_index.scss +0 -1
- package/src/global_styling/mixins/_beta_badge.scss +0 -30
- package/src/themes/amsterdam/global_styling/mixins/_button.scss +0 -60
- package/src/themes/amsterdam/overrides/_button.scss +0 -119
- package/src/themes/amsterdam/overrides/_button_empty.scss +0 -20
- package/src/themes/amsterdam/overrides/_button_group.scss +0 -91
- package/src/themes/amsterdam/overrides/_card.scss +0 -6
- package/test-env/components/card/card_select.js +0 -184
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
var _excluded = ["className", "description", "isDisabled", "title", "titleElement", "titleSize", "icon", "image", "children", "footer", "onClick", "href", "rel", "target", "textAlign", "betaBadgeProps", "layout", "selectable", "display", "paddingSize"]
|
|
1
|
+
var _excluded = ["className", "description", "isDisabled", "title", "titleElement", "titleSize", "icon", "image", "children", "footer", "onClick", "href", "rel", "target", "textAlign", "betaBadgeProps", "layout", "selectable", "display", "paddingSize"],
|
|
2
|
+
_excluded2 = ["anchorProps"];
|
|
2
3
|
|
|
3
4
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
5
|
|
|
6
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
7
|
+
|
|
8
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
9
|
+
|
|
10
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
11
|
+
|
|
5
12
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
6
13
|
|
|
7
14
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -17,7 +24,7 @@ import React, { isValidElement } from 'react';
|
|
|
17
24
|
import PropTypes from "prop-types";
|
|
18
25
|
import classNames from 'classnames';
|
|
19
26
|
import { keysOf } from '../common';
|
|
20
|
-
import { getSecureRelForTarget } from '../../services';
|
|
27
|
+
import { getSecureRelForTarget, useEuiTheme } from '../../services';
|
|
21
28
|
import { EuiText } from '../text';
|
|
22
29
|
import { EuiTitle } from '../title';
|
|
23
30
|
import { EuiBetaBadge } from '../badge/beta_badge';
|
|
@@ -25,6 +32,8 @@ import { EuiCardSelect, euiCardSelectableColor } from './card_select';
|
|
|
25
32
|
import { useGeneratedHtmlId } from '../../services/accessibility';
|
|
26
33
|
import { validateHref } from '../../services/security/href_validator';
|
|
27
34
|
import { EuiPanel } from '../panel';
|
|
35
|
+
import { EuiSpacer } from '../spacer';
|
|
36
|
+
import { euiCardBetaBadgeStyles, euiCardStyles, euiCardTextStyles } from './card.styles';
|
|
28
37
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
29
38
|
var textAlignToClassNameMap = {
|
|
30
39
|
left: 'euiCard--leftAligned',
|
|
@@ -47,7 +56,7 @@ export var EuiCard = function EuiCard(_ref) {
|
|
|
47
56
|
_isDisabled = _ref.isDisabled,
|
|
48
57
|
title = _ref.title,
|
|
49
58
|
_ref$titleElement = _ref.titleElement,
|
|
50
|
-
titleElement = _ref$titleElement === void 0 ? '
|
|
59
|
+
titleElement = _ref$titleElement === void 0 ? 'p' : _ref$titleElement,
|
|
51
60
|
_ref$titleSize = _ref.titleSize,
|
|
52
61
|
titleSize = _ref$titleSize === void 0 ? 's' : _ref$titleSize,
|
|
53
62
|
icon = _ref.icon,
|
|
@@ -65,12 +74,21 @@ export var EuiCard = function EuiCard(_ref) {
|
|
|
65
74
|
layout = _ref$layout === void 0 ? 'vertical' : _ref$layout,
|
|
66
75
|
selectable = _ref.selectable,
|
|
67
76
|
display = _ref.display,
|
|
68
|
-
paddingSize = _ref.paddingSize,
|
|
77
|
+
_ref$paddingSize = _ref.paddingSize,
|
|
78
|
+
paddingSize = _ref$paddingSize === void 0 ? 'm' : _ref$paddingSize,
|
|
69
79
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
70
80
|
|
|
71
81
|
var isHrefValid = !href || validateHref(href);
|
|
72
82
|
var isDisabled = _isDisabled || !isHrefValid;
|
|
73
83
|
var isClickable = !isDisabled && (onClick || href || selectable && !selectable.isDisabled);
|
|
84
|
+
var euiThemeContext = useEuiTheme();
|
|
85
|
+
var styles = euiCardStyles(euiThemeContext, paddingSize, display);
|
|
86
|
+
var cardStyles = [styles.card.euiCard, // Text alignment should always be left when horizontal
|
|
87
|
+
styles.card.aligned[layout === 'horizontal' ? 'left' : textAlign], styles.card.layout[layout], isDisabled && styles.card.disabled];
|
|
88
|
+
var contentStyles = [styles.content.euiCard__content, styles.content.layout[layout]];
|
|
89
|
+
var textStyles = euiCardTextStyles(euiThemeContext);
|
|
90
|
+
var textCSS = [textStyles.euiCard__text, // Text alignment should always be left when horizontal
|
|
91
|
+
textStyles.aligned[layout === 'horizontal' ? 'left' : textAlign], isClickable && textStyles.interactive, isDisabled && textStyles.disabled];
|
|
74
92
|
/**
|
|
75
93
|
* For a11y, we simulate the same click that's provided on the title when clicking the whole card
|
|
76
94
|
* without having to make the whole card a button or anchor tag.
|
|
@@ -110,8 +128,10 @@ export var EuiCard = function EuiCard(_ref) {
|
|
|
110
128
|
|
|
111
129
|
if (image && layout === 'vertical') {
|
|
112
130
|
if ( /*#__PURE__*/isValidElement(image) || typeof image === 'string') {
|
|
131
|
+
var imageStyles = [styles.euiCard__image];
|
|
113
132
|
imageNode = ___EmotionJSX("div", {
|
|
114
|
-
className: "euiCard__image"
|
|
133
|
+
className: "euiCard__image",
|
|
134
|
+
css: imageStyles
|
|
115
135
|
}, /*#__PURE__*/isValidElement(image) ? image : ___EmotionJSX("img", {
|
|
116
136
|
src: image,
|
|
117
137
|
alt: ""
|
|
@@ -124,16 +144,20 @@ export var EuiCard = function EuiCard(_ref) {
|
|
|
124
144
|
var iconNode;
|
|
125
145
|
|
|
126
146
|
if (icon) {
|
|
147
|
+
var iconStyles = [styles.icon.euiCard__icon, styles.icon.layout[layout], imageNode && styles.icon.withImage];
|
|
127
148
|
iconNode = /*#__PURE__*/React.cloneElement(icon, {
|
|
128
|
-
className: classNames(icon.props.className, 'euiCard__icon')
|
|
149
|
+
className: classNames(icon.props.className, 'euiCard__icon'),
|
|
150
|
+
css: iconStyles
|
|
129
151
|
});
|
|
130
152
|
}
|
|
131
153
|
|
|
132
154
|
var optionalCardTop;
|
|
133
155
|
|
|
134
156
|
if (imageNode || iconNode) {
|
|
157
|
+
var topStyles = [styles.top.euiCard__top, styles.top.layout[layout], isDisabled && styles.top.disabled];
|
|
135
158
|
optionalCardTop = ___EmotionJSX("div", {
|
|
136
|
-
className: "euiCard__top"
|
|
159
|
+
className: "euiCard__top",
|
|
160
|
+
css: topStyles
|
|
137
161
|
}, imageNode, iconNode);
|
|
138
162
|
}
|
|
139
163
|
/**
|
|
@@ -143,18 +167,28 @@ export var EuiCard = function EuiCard(_ref) {
|
|
|
143
167
|
|
|
144
168
|
var optionalBetaBadge;
|
|
145
169
|
var optionalBetaBadgeID = '';
|
|
170
|
+
var optionalBetaCSS;
|
|
146
171
|
|
|
147
172
|
if (betaBadgeProps !== null && betaBadgeProps !== void 0 && betaBadgeProps.label) {
|
|
173
|
+
var betaStyles = euiCardBetaBadgeStyles(euiThemeContext, paddingSize);
|
|
174
|
+
optionalBetaCSS = betaStyles.hasBetaBadge;
|
|
175
|
+
var anchorCSS = [betaStyles.euiCard__betaBadgeAnchor];
|
|
176
|
+
var badgeCSS = [betaStyles.euiCard__betaBadge];
|
|
177
|
+
|
|
178
|
+
var anchorProps = betaBadgeProps.anchorProps,
|
|
179
|
+
cleanedBetaBadgeProps = _objectWithoutProperties(betaBadgeProps, _excluded2);
|
|
180
|
+
|
|
148
181
|
optionalBetaBadgeID = "".concat(ariaId, "BetaBadge");
|
|
149
|
-
optionalBetaBadge = ___EmotionJSX(
|
|
150
|
-
|
|
151
|
-
|
|
182
|
+
optionalBetaBadge = ___EmotionJSX(EuiBetaBadge, _extends({
|
|
183
|
+
css: badgeCSS,
|
|
184
|
+
color: isDisabled && !betaBadgeProps.onClick && !betaBadgeProps.href ? 'subdued' : 'hollow'
|
|
185
|
+
}, cleanedBetaBadgeProps, {
|
|
186
|
+
anchorProps: _objectSpread({
|
|
187
|
+
css: anchorCSS
|
|
188
|
+
}, anchorProps),
|
|
152
189
|
id: optionalBetaBadgeID
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
}))); // Increase padding size when there is a beta badge unless it's already determined
|
|
156
|
-
|
|
157
|
-
paddingSize = paddingSize || 'l';
|
|
190
|
+
})); // Increase padding size when there is a beta badge unless it's already determined
|
|
191
|
+
// paddingSize = paddingSize || 'l';
|
|
158
192
|
}
|
|
159
193
|
/**
|
|
160
194
|
* Optional selectable button
|
|
@@ -168,25 +202,29 @@ export var EuiCard = function EuiCard(_ref) {
|
|
|
168
202
|
var optionalSelectButton;
|
|
169
203
|
|
|
170
204
|
if (selectable) {
|
|
171
|
-
optionalSelectButton = ___EmotionJSX(
|
|
205
|
+
optionalSelectButton = ___EmotionJSX(React.Fragment, null, paddingSize !== 'none' && ___EmotionJSX(EuiSpacer, {
|
|
206
|
+
size: paddingSize || 'm'
|
|
207
|
+
}), ___EmotionJSX(EuiCardSelect, _extends({
|
|
172
208
|
"aria-describedby": "".concat(ariaId, "Title ").concat(ariaDesc)
|
|
173
209
|
}, selectable, {
|
|
174
210
|
buttonRef: function buttonRef(node) {
|
|
175
211
|
link = node;
|
|
176
212
|
}
|
|
177
|
-
}));
|
|
213
|
+
})));
|
|
178
214
|
}
|
|
215
|
+
|
|
216
|
+
var TitleElement = titleElement;
|
|
179
217
|
/**
|
|
180
218
|
* Wraps the title with the link (<a>) or button.
|
|
181
219
|
* This makes the title element a11y friendly and gets described by its content if its interactable.
|
|
182
220
|
*/
|
|
183
221
|
|
|
184
|
-
|
|
185
222
|
var theTitle;
|
|
186
223
|
|
|
187
224
|
if (!isDisabled && href) {
|
|
188
225
|
theTitle = ___EmotionJSX("a", {
|
|
189
226
|
className: "euiCard__titleAnchor",
|
|
227
|
+
css: textCSS,
|
|
190
228
|
onClick: onClick,
|
|
191
229
|
href: href,
|
|
192
230
|
target: target,
|
|
@@ -203,6 +241,7 @@ export var EuiCard = function EuiCard(_ref) {
|
|
|
203
241
|
} else if (isDisabled || onClick) {
|
|
204
242
|
theTitle = ___EmotionJSX("button", {
|
|
205
243
|
className: "euiCard__titleButton",
|
|
244
|
+
css: textCSS,
|
|
206
245
|
onClick: onClick,
|
|
207
246
|
disabled: isDisabled,
|
|
208
247
|
"aria-describedby": "".concat(optionalBetaBadgeID, " ").concat(ariaDesc),
|
|
@@ -211,37 +250,65 @@ export var EuiCard = function EuiCard(_ref) {
|
|
|
211
250
|
}
|
|
212
251
|
}, title);
|
|
213
252
|
} else {
|
|
214
|
-
theTitle =
|
|
253
|
+
theTitle = ___EmotionJSX("span", {
|
|
254
|
+
css: textCSS
|
|
255
|
+
}, title);
|
|
215
256
|
}
|
|
216
257
|
/**
|
|
217
|
-
*
|
|
258
|
+
* Children and/or Description content
|
|
218
259
|
*/
|
|
219
260
|
|
|
220
261
|
|
|
221
|
-
var
|
|
262
|
+
var optionalChildren;
|
|
263
|
+
|
|
264
|
+
if (children) {
|
|
265
|
+
var childrenStyles = [styles.euiCard__children];
|
|
266
|
+
optionalChildren = ___EmotionJSX("div", {
|
|
267
|
+
css: childrenStyles
|
|
268
|
+
}, children);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
var optionalDescription;
|
|
272
|
+
|
|
273
|
+
if (description) {
|
|
274
|
+
var descriptionStyles = [styles.euiCard__description];
|
|
275
|
+
optionalDescription = ___EmotionJSX(EuiText, {
|
|
276
|
+
id: ariaDesc,
|
|
277
|
+
size: "s",
|
|
278
|
+
css: descriptionStyles
|
|
279
|
+
}, ___EmotionJSX("p", null, description));
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Footer content
|
|
283
|
+
*/
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
var optionalFooter;
|
|
287
|
+
|
|
288
|
+
if (layout === 'vertical' && footer) {
|
|
289
|
+
var footerStyles = [styles.euiCard__footer];
|
|
290
|
+
optionalFooter = ___EmotionJSX("div", {
|
|
291
|
+
css: footerStyles
|
|
292
|
+
}, footer);
|
|
293
|
+
}
|
|
294
|
+
|
|
222
295
|
return ___EmotionJSX(EuiPanel, _extends({
|
|
223
296
|
element: "div",
|
|
224
297
|
className: classes,
|
|
298
|
+
css: [].concat(cardStyles, [optionalBetaCSS]),
|
|
225
299
|
onClick: isClickable ? outerOnClick : undefined,
|
|
226
300
|
color: isDisabled ? 'subdued' : display,
|
|
227
301
|
hasShadow: isDisabled || display ? false : true,
|
|
228
302
|
hasBorder: display ? false : undefined,
|
|
229
303
|
paddingSize: paddingSize
|
|
230
304
|
}, rest), optionalCardTop, ___EmotionJSX("div", {
|
|
231
|
-
className: "euiCard__content"
|
|
305
|
+
className: "euiCard__content",
|
|
306
|
+
css: contentStyles
|
|
232
307
|
}, ___EmotionJSX(EuiTitle, {
|
|
233
308
|
id: "".concat(ariaId, "Title"),
|
|
234
309
|
className: "euiCard__title",
|
|
235
310
|
size: titleSize
|
|
236
|
-
}, ___EmotionJSX(TitleElement, null, theTitle)),
|
|
237
|
-
id: ariaDesc,
|
|
238
|
-
size: "s",
|
|
239
|
-
className: "euiCard__description"
|
|
240
|
-
}, ___EmotionJSX("p", null, description)), children && ___EmotionJSX("div", {
|
|
241
|
-
className: "euiCard__children"
|
|
242
|
-
}, children)), optionalBetaBadge, layout === 'vertical' && footer && ___EmotionJSX("div", {
|
|
243
|
-
className: "euiCard__footer"
|
|
244
|
-
}, footer), optionalSelectButton);
|
|
311
|
+
}, ___EmotionJSX(TitleElement, null, theTitle)), optionalDescription, optionalChildren), optionalBetaBadge, optionalFooter, optionalSelectButton);
|
|
245
312
|
};
|
|
246
313
|
EuiCard.propTypes = {
|
|
247
314
|
/**
|
|
@@ -273,15 +340,13 @@ EuiCard.propTypes = {
|
|
|
273
340
|
/**
|
|
274
341
|
* Determines the title's heading element
|
|
275
342
|
*/
|
|
276
|
-
titleElement: PropTypes.oneOf(["h2", "h3", "h4", "h5", "h6", "span"]),
|
|
343
|
+
titleElement: PropTypes.oneOf(["h2", "h3", "h4", "h5", "h6", "span", "p"]),
|
|
277
344
|
|
|
278
345
|
/**
|
|
279
346
|
* Determines the title's size, matching that of EuiTitle.
|
|
280
347
|
* Though, card titles can't be too large or small relative to the description text.
|
|
281
348
|
*/
|
|
282
349
|
titleSize: PropTypes.oneOf(["s", "xs"]),
|
|
283
|
-
// description is required if children is omitted
|
|
284
|
-
// description becomes optional when children is present
|
|
285
350
|
|
|
286
351
|
/**
|
|
287
352
|
* Placed within a small EuiText `<p>` tag
|
|
@@ -311,115 +376,134 @@ EuiCard.propTypes = {
|
|
|
311
376
|
* Adds a badge to top of the card to label it as "Beta" or other non-GA state.
|
|
312
377
|
* Accepts all the props of [EuiBetaBadge](#/display/badge#beta-badge-type), where `label` is required.
|
|
313
378
|
*/
|
|
314
|
-
betaBadgeProps: PropTypes.
|
|
379
|
+
betaBadgeProps: PropTypes.shape({
|
|
380
|
+
className: PropTypes.string,
|
|
381
|
+
"aria-label": PropTypes.string,
|
|
382
|
+
"data-test-subj": PropTypes.string,
|
|
383
|
+
css: PropTypes.any,
|
|
315
384
|
|
|
316
|
-
|
|
317
|
-
*
|
|
318
|
-
* Leave as `undefined` to display as a default panel.
|
|
319
|
-
* Selectable cards will always display as a default panel.
|
|
385
|
+
/**
|
|
386
|
+
* Will apply an onclick to the badge itself
|
|
320
387
|
*/
|
|
321
|
-
|
|
388
|
+
onClick: PropTypes.func,
|
|
322
389
|
|
|
323
|
-
|
|
324
|
-
*
|
|
390
|
+
/**
|
|
391
|
+
* Aria label applied to the onClick button
|
|
325
392
|
*/
|
|
326
|
-
|
|
393
|
+
onClickAriaLabel: PropTypes.any,
|
|
394
|
+
href: PropTypes.string,
|
|
395
|
+
target: PropTypes.string,
|
|
396
|
+
rel: PropTypes.string,
|
|
327
397
|
|
|
328
|
-
|
|
329
|
-
*
|
|
398
|
+
/**
|
|
399
|
+
* Supply an icon type if the badge should just be an icon
|
|
330
400
|
*/
|
|
331
|
-
|
|
332
|
-
href: PropTypes.string,
|
|
333
|
-
onClick: PropTypes.func,
|
|
401
|
+
iconType: PropTypes.oneOfType([PropTypes.oneOf(["accessibility", "addDataApp", "advancedSettingsApp", "agentApp", "aggregate", "alert", "analyzeEvent", "annotation", "apmApp", "apmTrace", "appSearchApp", "apps", "arrowDown", "arrowLeft", "arrowRight", "arrowUp", "arrowStart", "arrowEnd", "asterisk", "auditbeatApp", "beaker", "bell", "bellSlash", "bolt", "boxesHorizontal", "boxesVertical", "branch", "branchUser", "broom", "brush", "bug", "bullseye", "calendar", "canvasApp", "casesApp", "check", "checkInCircleFilled", "cheer", "classificationJob", "clock", "cloudDrizzle", "cloudStormy", "cloudSunny", "cluster", "codeApp", "color", "compute", "console", "consoleApp", "container", "continuityAbove", "continuityAboveBelow", "continuityBelow", "continuityWithin", "controlsHorizontal", "controlsVertical", "copy", "copyClipboard", "createAdvancedJob", "createMultiMetricJob", "createPopulationJob", "createSingleMetricJob", "cross", "crossClusterReplicationApp", "crossInACircleFilled", "crosshairs", "currency", "cut", "dashboardApp", "dataVisualizer", "database", "desktop", "devToolsApp", "discoverApp", "document", "documentEdit", "documentation", "documents", "dot", "doubleArrowLeft", "doubleArrowRight", "download", "editorAlignCenter", "editorAlignLeft", "editorAlignRight", "editorBold", "editorChecklist", "editorCodeBlock", "editorComment", "editorDistributeHorizontal", "editorDistributeVertical", "editorHeading", "editorItalic", "editorItemAlignBottom", "editorItemAlignCenter", "editorItemAlignLeft", "editorItemAlignMiddle", "editorItemAlignRight", "editorItemAlignTop", "editorLink", "editorOrderedList", "editorPositionBottomLeft", "editorPositionBottomRight", "editorPositionTopLeft", "editorPositionTopRight", "editorRedo", "editorStrike", "editorTable", "editorUnderline", "editorUndo", "editorUnorderedList", "email", "empty", "emsApp", "eql", "eraser", "exit", "expand", "expandMini", "exportAction", "eye", "eyeClosed", "faceHappy", "faceNeutral", "faceSad", "filebeatApp", "filter", "flag", "fleetApp", "fold", "folderCheck", "folderClosed", "folderExclamation", "folderOpen", "frameNext", "framePrevious", "fullScreen", "fullScreenExit", "function", "gear", "gisApp", "glasses", "globe", "grab", "grabHorizontal", "graphApp", "grid", "grokApp", "heart", "heartbeatApp", "heatmap", "help", "home", "iInCircle", "image", "importAction", "indexClose", "indexEdit", "indexFlush", "indexManagementApp", "indexMapping", "indexOpen", "indexPatternApp", "indexRollupApp", "indexRuntime", "indexSettings", "inputOutput", "inspect", "invert", "ip", "keyboard", "kqlField", "kqlFunction", "kqlOperand", "kqlSelector", "kqlValue", "kubernetesNode", "kubernetesPod", "layers", "lensApp", "lettering", "lineDashed", "lineDotted", "lineSolid", "link", "list", "listAdd", "lock", "lockOpen", "logoAWS", "logoAWSMono", "logoAerospike", "logoApache", "logoAppSearch", "logoAzure", "logoAzureMono", "logoBeats", "logoBusinessAnalytics", "logoCeph", "logoCloud", "logoCloudEnterprise", "logoCode", "logoCodesandbox", "logoCouchbase", "logoDocker", "logoDropwizard", "logoElastic", "logoElasticStack", "logoElasticsearch", "logoEnterpriseSearch", "logoEtcd", "logoGCP", "logoGCPMono", "logoGithub", "logoGmail", "logoGolang", "logoGoogleG", "logoHAproxy", "logoIBM", "logoIBMMono", "logoKafka", "logoKibana", "logoKubernetes", "logoLogging", "logoLogstash", "logoMaps", "logoMemcached", "logoMetrics", "logoMongodb", "logoMySQL", "logoNginx", "logoObservability", "logoOsquery", "logoPhp", "logoPostgres", "logoPrometheus", "logoRabbitmq", "logoRedis", "logoSecurity", "logoSiteSearch", "logoSketch", "logoSlack", "logoUptime", "logoWebhook", "logoWindows", "logoWorkplaceSearch", "logsApp", "logstashFilter", "logstashIf", "logstashInput", "logstashOutput", "logstashQueue", "machineLearningApp", "magnet", "magnifyWithExclamation", "magnifyWithMinus", "magnifyWithPlus", "managementApp", "mapMarker", "memory", "menu", "menuDown", "menuLeft", "menuRight", "menuUp", "merge", "metricbeatApp", "metricsApp", "minimize", "minus", "minusInCircle", "minusInCircleFilled", "mobile", "monitoringApp", "moon", "namespace", "nested", "node", "notebookApp", "number", "offline", "online", "outlierDetectionJob", "package", "packetbeatApp", "pageSelect", "pagesSelect", "paperClip", "partial", "pause", "payment", "pencil", "percent", "pin", "pinFilled", "pipelineApp", "play", "playFilled", "plus", "plusInCircle", "plusInCircleFilled", "popout", "push", "questionInCircle", "quote", "recentlyViewedApp", "refresh", "regressionJob", "reporter", "reportingApp", "returnKey", "save", "savedObjectsApp", "scale", "search", "searchProfilerApp", "securityAnalyticsApp", "securityApp", "securitySignal", "securitySignalDetected", "securitySignalResolved", "sessionViewer", "shard", "share", "snowflake", "sortDown", "sortLeft", "sortRight", "sortUp", "sortable", "spacesApp", "sqlApp", "starEmpty", "starEmptySpace", "starFilled", "starFilledSpace", "starMinusEmpty", "starMinusFilled", "starPlusEmpty", "starPlusFilled", "stats", "stop", "stopFilled", "stopSlash", "storage", "string", "submodule", "sun", "swatchInput", "symlink", "tableDensityCompact", "tableDensityExpanded", "tableDensityNormal", "tableOfContents", "tag", "tear", "temperature", "timeline", "timelionApp", "timeRefresh", "timeslider", "training", "trash", "unfold", "unlink", "upgradeAssistantApp", "uptimeApp", "user", "userAvatar", "users", "usersRolesApp", "vector", "videoPlayer", "visArea", "visAreaStacked", "visBarHorizontal", "visBarHorizontalStacked", "visBarVertical", "visBarVerticalStacked", "visGauge", "visGoal", "visLine", "visMapCoordinate", "visMapRegion", "visMetric", "visPie", "visTable", "visTagCloud", "visText", "visTimelion", "visVega", "visVisualBuilder", "visualizeApp", "watchesApp", "wordWrap", "wordWrapDisabled", "workplaceSearchApp", "wrench", "tokenAlias", "tokenAnnotation", "tokenArray", "tokenBinary", "tokenBoolean", "tokenClass", "tokenCompletionSuggester", "tokenConstant", "tokenDate", "tokenDenseVector", "tokenElement", "tokenEnum", "tokenEnumMember", "tokenEvent", "tokenException", "tokenField", "tokenFile", "tokenFlattened", "tokenFunction", "tokenGeo", "tokenHistogram", "tokenInterface", "tokenIP", "tokenJoin", "tokenKey", "tokenKeyword", "tokenMethod", "tokenMetricCounter", "tokenMetricGauge", "tokenModule", "tokenNamespace", "tokenNested", "tokenNull", "tokenNumber", "tokenObject", "tokenOperator", "tokenPackage", "tokenParameter", "tokenPercolator", "tokenProperty", "tokenRange", "tokenRankFeature", "tokenRankFeatures", "tokenRepo", "tokenSearchType", "tokenShape", "tokenString", "tokenStruct", "tokenSymbol", "tokenTag", "tokenText", "tokenTokenCount", "tokenVariable"]).isRequired, PropTypes.string.isRequired, PropTypes.elementType.isRequired]),
|
|
334
402
|
|
|
335
403
|
/**
|
|
336
|
-
*
|
|
404
|
+
* One word label like "Beta" or "Lab"
|
|
337
405
|
*/
|
|
338
406
|
|
|
339
407
|
/**
|
|
340
|
-
*
|
|
408
|
+
* One word label like "Beta" or "Lab"
|
|
341
409
|
*/
|
|
342
|
-
|
|
343
|
-
size: PropTypes.oneOf(["xs", "s", "m"]),
|
|
410
|
+
label: PropTypes.oneOfType([PropTypes.node.isRequired, PropTypes.oneOfType([PropTypes.node.isRequired, PropTypes.string.isRequired]).isRequired]).isRequired,
|
|
344
411
|
|
|
345
412
|
/**
|
|
346
|
-
*
|
|
413
|
+
* Content for the tooltip
|
|
347
414
|
*/
|
|
415
|
+
tooltipContent: PropTypes.oneOfType([PropTypes.node, PropTypes.oneOfType([PropTypes.node, PropTypes.node.isRequired])]),
|
|
348
416
|
|
|
349
417
|
/**
|
|
350
|
-
*
|
|
418
|
+
* Custom position of the tooltip
|
|
351
419
|
*/
|
|
352
|
-
|
|
420
|
+
tooltipPosition: PropTypes.oneOf(["top", "right", "bottom", "left"]),
|
|
353
421
|
|
|
354
422
|
/**
|
|
355
|
-
*
|
|
423
|
+
* Passes onto the span wrapping the badge
|
|
356
424
|
*/
|
|
425
|
+
anchorProps: PropTypes.shape({
|
|
426
|
+
className: PropTypes.string,
|
|
427
|
+
"aria-label": PropTypes.string,
|
|
428
|
+
"data-test-subj": PropTypes.string,
|
|
429
|
+
css: PropTypes.any
|
|
430
|
+
}),
|
|
357
431
|
|
|
358
432
|
/**
|
|
359
|
-
*
|
|
433
|
+
* Optional title will be supplied as tooltip title or title attribute
|
|
434
|
+
* otherwise the label will be used
|
|
360
435
|
*/
|
|
361
|
-
|
|
436
|
+
title: PropTypes.oneOfType([PropTypes.string, PropTypes.oneOfType([PropTypes.string.isRequired, PropTypes.string])]),
|
|
362
437
|
|
|
363
438
|
/**
|
|
364
|
-
*
|
|
439
|
+
* Accepts accent, subdued and hollow.
|
|
440
|
+
*/
|
|
441
|
+
color: PropTypes.oneOf(["accent", "subdued", "hollow"]),
|
|
442
|
+
size: PropTypes.oneOf(["s", "m"])
|
|
443
|
+
}),
|
|
444
|
+
|
|
445
|
+
/**
|
|
446
|
+
* Matches to the color property of EuiPanel. If defined, removes any border & shadow.
|
|
447
|
+
* Leave as `undefined` to display as a default panel.
|
|
448
|
+
* Selectable cards will always display as a default panel.
|
|
449
|
+
*/
|
|
450
|
+
display: PropTypes.any,
|
|
451
|
+
|
|
452
|
+
/**
|
|
453
|
+
* Padding applied around the content of the card
|
|
365
454
|
*/
|
|
455
|
+
paddingSize: PropTypes.any,
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* Adds a button to the bottom of the card to allow for in-place selection
|
|
459
|
+
*/
|
|
460
|
+
selectable: PropTypes.shape({
|
|
461
|
+
href: PropTypes.string,
|
|
462
|
+
onClick: PropTypes.func,
|
|
463
|
+
children: PropTypes.node,
|
|
366
464
|
|
|
367
465
|
/**
|
|
368
|
-
*
|
|
466
|
+
* Make button a solid color for prominence
|
|
369
467
|
*/
|
|
370
|
-
isLoading: PropTypes.bool,
|
|
371
468
|
|
|
372
469
|
/**
|
|
373
|
-
*
|
|
470
|
+
* Make button a solid color for prominence
|
|
374
471
|
*/
|
|
472
|
+
fill: PropTypes.bool,
|
|
375
473
|
|
|
376
474
|
/**
|
|
377
|
-
*
|
|
378
|
-
*
|
|
475
|
+
* Any of the named color palette options.
|
|
476
|
+
* **`'ghost'` is set for deprecation. Use EuiThemeProvide.colorMode = 'dark' instead.**
|
|
379
477
|
*/
|
|
380
478
|
|
|
381
479
|
/**
|
|
382
|
-
*
|
|
383
|
-
*
|
|
480
|
+
* Any of the named color palette options.
|
|
481
|
+
* **`'ghost'` is set for deprecation. Use EuiThemeProvide.colorMode = 'dark' instead.**
|
|
384
482
|
*/
|
|
385
|
-
|
|
386
|
-
target: PropTypes.string,
|
|
387
|
-
rel: PropTypes.string,
|
|
388
|
-
type: PropTypes.oneOf(["button", "submit"]),
|
|
389
|
-
buttonRef: PropTypes.any,
|
|
483
|
+
color: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.oneOf(["ghost"])]),
|
|
390
484
|
|
|
391
485
|
/**
|
|
392
|
-
*
|
|
486
|
+
* Use size `s` in confined spaces
|
|
393
487
|
*/
|
|
394
|
-
contentProps: PropTypes.any,
|
|
395
488
|
|
|
396
489
|
/**
|
|
397
|
-
*
|
|
490
|
+
* Use size `s` in confined spaces
|
|
398
491
|
*/
|
|
399
|
-
|
|
492
|
+
size: PropTypes.any,
|
|
400
493
|
|
|
401
494
|
/**
|
|
402
|
-
*
|
|
495
|
+
* `disabled` is also allowed
|
|
403
496
|
*/
|
|
404
|
-
iconSide: PropTypes.oneOf(["left", "right"]),
|
|
405
497
|
|
|
406
498
|
/**
|
|
407
|
-
*
|
|
408
|
-
* It doesn't apply to the icon.
|
|
499
|
+
* `disabled` is also allowed
|
|
409
500
|
*/
|
|
410
|
-
|
|
411
|
-
className: PropTypes.string,
|
|
412
|
-
"aria-label": PropTypes.string,
|
|
413
|
-
"data-test-subj": PropTypes.string,
|
|
414
|
-
css: PropTypes.any,
|
|
415
|
-
ref: PropTypes.any,
|
|
416
|
-
"data-text": PropTypes.string
|
|
417
|
-
}),
|
|
418
|
-
iconSize: PropTypes.oneOf(["s", "m"]),
|
|
501
|
+
isDisabled: PropTypes.bool,
|
|
419
502
|
className: PropTypes.string,
|
|
420
503
|
"aria-label": PropTypes.string,
|
|
421
504
|
"data-test-subj": PropTypes.string,
|
|
422
|
-
css: PropTypes.any
|
|
505
|
+
css: PropTypes.any,
|
|
506
|
+
buttonRef: PropTypes.any
|
|
423
507
|
}),
|
|
424
508
|
|
|
425
509
|
/**
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
5
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
6
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
7
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
8
|
+
* Side Public License, v 1.
|
|
9
|
+
*/
|
|
10
|
+
import { css } from '@emotion/react';
|
|
11
|
+
import { euiPaddingSize, euiSupportsHas, logicalCSS, logicals, logicalTextAlignCSS } from '../../global_styling';
|
|
12
|
+
import { euiButtonColor } from '../../themes/amsterdam/global_styling/mixins';
|
|
13
|
+
var paddingKey = 'm';
|
|
14
|
+
var halfPaddingKey = 's';
|
|
15
|
+
/**
|
|
16
|
+
* 1. Footer is always at the bottom.
|
|
17
|
+
* 3. Horizontal layouts should always top left align no matter the textAlign prop
|
|
18
|
+
* 4. Ensures the contents always stretch no matter the flex layout
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
22
|
+
name: "reymun-disabled",
|
|
23
|
+
styles: "filter:grayscale(100%);label:disabled;"
|
|
24
|
+
} : {
|
|
25
|
+
name: "reymun-disabled",
|
|
26
|
+
styles: "filter:grayscale(100%);label:disabled;",
|
|
27
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
var _ref3 = process.env.NODE_ENV === "production" ? {
|
|
31
|
+
name: "cr3wz7-euiCard__content",
|
|
32
|
+
styles: "flex-grow:1;label:euiCard__content;"
|
|
33
|
+
} : {
|
|
34
|
+
name: "cr3wz7-euiCard__content",
|
|
35
|
+
styles: "flex-grow:1;label:euiCard__content;",
|
|
36
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
var _ref4 = process.env.NODE_ENV === "production" ? {
|
|
40
|
+
name: "1kw0yxn-horizontal",
|
|
41
|
+
styles: "flex-direction:row;align-items:flex-start;label:horizontal;"
|
|
42
|
+
} : {
|
|
43
|
+
name: "1kw0yxn-horizontal",
|
|
44
|
+
styles: "flex-direction:row;align-items:flex-start;label:horizontal;",
|
|
45
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
var _ref5 = process.env.NODE_ENV === "production" ? {
|
|
49
|
+
name: "omnk2l-vertical",
|
|
50
|
+
styles: "flex-direction:column;label:vertical;"
|
|
51
|
+
} : {
|
|
52
|
+
name: "omnk2l-vertical",
|
|
53
|
+
styles: "flex-direction:column;label:vertical;",
|
|
54
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export var euiCardStyles = function euiCardStyles(euiThemeContext, paddingSize, color) {
|
|
58
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
59
|
+
var paddingAmount = euiPaddingSize(euiThemeContext, paddingSize);
|
|
60
|
+
var spacing = euiPaddingSize(euiThemeContext, paddingKey);
|
|
61
|
+
var halfSpacing = euiPaddingSize(euiThemeContext, halfPaddingKey);
|
|
62
|
+
return {
|
|
63
|
+
card: {
|
|
64
|
+
euiCard: /*#__PURE__*/css("display:flex;&:has([class*='euiCard__text'][class*='-interactive']:focus:focus-visible){outline:", euiTheme.focus.width, " solid currentColor;};label:euiCard;"),
|
|
65
|
+
aligned: {
|
|
66
|
+
center: /*#__PURE__*/css(logicalTextAlignCSS('center'), ";align-items:center;;label:center;"),
|
|
67
|
+
left: /*#__PURE__*/css(logicalTextAlignCSS('left'), ";align-items:flex-start;;label:left;"),
|
|
68
|
+
right: /*#__PURE__*/css(logicalTextAlignCSS('right'), ";align-items:flex-end;;label:right;")
|
|
69
|
+
},
|
|
70
|
+
layout: {
|
|
71
|
+
vertical: _ref5,
|
|
72
|
+
horizontal: _ref4
|
|
73
|
+
},
|
|
74
|
+
disabled: /*#__PURE__*/css("cursor:not-allowed;background-color:", euiButtonColor(euiThemeContext, 'disabled'), ";color:", euiTheme.colors.disabledText, ";;label:disabled;")
|
|
75
|
+
},
|
|
76
|
+
content: {
|
|
77
|
+
euiCard__content: _ref3,
|
|
78
|
+
layout: {
|
|
79
|
+
vertical: /*#__PURE__*/css(logicalCSS('width', '100%'), ";;label:vertical;"),
|
|
80
|
+
horizontal: /*#__PURE__*/css(logicalCSS('width', 'auto'), ";;label:horizontal;")
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
euiCard__children: /*#__PURE__*/css(logicalCSS('margin-top', halfSpacing), ";;label:euiCard__children;"),
|
|
84
|
+
euiCard__description: /*#__PURE__*/css(logicalCSS('margin-top', halfSpacing), ";;label:euiCard__description;"),
|
|
85
|
+
euiCard__footer: /*#__PURE__*/css("flex-grow:0;", logicalCSS('width', '100%'), ";", logicalCSS('margin-top', spacing), ";;label:euiCard__footer;"),
|
|
86
|
+
top: {
|
|
87
|
+
euiCard__top: /*#__PURE__*/css("flex-grow:0;font-size:0;position:relative;", logicalCSS('min-height', '1px'), ";", logicalCSS('margin-bottom', spacing), ";;label:euiCard__top;"),
|
|
88
|
+
layout: {
|
|
89
|
+
vertical: /*#__PURE__*/css(logicalCSS('width', '100%'), ";;label:vertical;"),
|
|
90
|
+
horizontal: /*#__PURE__*/css(logicalCSS('width', 'auto'), ";;label:horizontal;")
|
|
91
|
+
},
|
|
92
|
+
disabled: _ref2
|
|
93
|
+
},
|
|
94
|
+
euiCard__image: /*#__PURE__*/css("position:relative;overflow:hidden;", logicalCSS('width', "calc(100% + (".concat(paddingAmount, " * 2))")), ";", logicalCSS('left', "-".concat(paddingAmount)), ";", logicalCSS('top', "-".concat(paddingAmount)), ";", logicalCSS('margin-bottom', "-".concat(paddingAmount)), ";", logicals['border-top-left-radius'], ":calc(", euiTheme.border.radius.medium, " - 1px);", logicals['border-top-right-radius'], ":calc(", euiTheme.border.radius.medium, " - 1px);", color === 'transparent' ? "border-radius: ".concat(euiTheme.border.radius.medium, ";") : undefined, " img{", logicalCSS('width', '100%'), ";};label:euiCard__image;"),
|
|
95
|
+
icon: {
|
|
96
|
+
euiCard__icon: /*#__PURE__*/css(";label:euiCard__icon;"),
|
|
97
|
+
withImage: /*#__PURE__*/css("position:absolute;", logicalCSS('top', '50%'), ";", logicalCSS('left', '50%'), ";transform:translate(-50%, calc(-50% + -", paddingAmount, "))!important;;label:withImage;"),
|
|
98
|
+
layout: {
|
|
99
|
+
vertical: /*#__PURE__*/css(logicalCSS('margin-top', halfSpacing), ";;label:vertical;"),
|
|
100
|
+
horizontal: /*#__PURE__*/css(logicalCSS('margin-right', spacing), ";;label:horizontal;")
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
107
|
+
name: "r8agzg-euiCard__text",
|
|
108
|
+
styles: "font:inherit;color:inherit;cursor:inherit;label:euiCard__text;"
|
|
109
|
+
} : {
|
|
110
|
+
name: "r8agzg-euiCard__text",
|
|
111
|
+
styles: "font:inherit;color:inherit;cursor:inherit;label:euiCard__text;",
|
|
112
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
export var euiCardTextStyles = function euiCardTextStyles(euiThemeContext) {
|
|
116
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
117
|
+
return {
|
|
118
|
+
euiCard__text: _ref,
|
|
119
|
+
interactive: /*#__PURE__*/css("outline-offset:", euiTheme.size.xxs, ";.euiCard:hover &,.euiCard:focus &,&:hover,&:focus{text-decoration:underline;}", euiSupportsHas, "{outline:none!important;};label:interactive;"),
|
|
120
|
+
aligned: {
|
|
121
|
+
center: /*#__PURE__*/css(logicalTextAlignCSS('center'), ";;label:center;"),
|
|
122
|
+
left: /*#__PURE__*/css(logicalTextAlignCSS('left'), ";;label:left;"),
|
|
123
|
+
right: /*#__PURE__*/css(logicalTextAlignCSS('right'), ";;label:right;")
|
|
124
|
+
},
|
|
125
|
+
disabled: /*#__PURE__*/css("color:", euiTheme.colors.disabledText, ";;label:disabled;")
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
export var euiCardBetaBadgeStyles = function euiCardBetaBadgeStyles(euiThemeContext, paddingSize) {
|
|
129
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
130
|
+
var padding = euiPaddingSize(euiThemeContext, paddingSize);
|
|
131
|
+
return {
|
|
132
|
+
hasBetaBadge: /*#__PURE__*/css("position:relative;overflow:visible;", logicalCSS('padding-top', "calc(".concat(padding, " + ").concat(euiTheme.size.s, ")")), ";;label:hasBetaBadge;"),
|
|
133
|
+
euiCard__betaBadgeAnchor: /*#__PURE__*/css("line-height:0;position:absolute;", logicalCSS('top', '0'), ";", logicalCSS('left', '50%'), ";transform:translateX(-50%) translateY(-50%);z-index:3;", logicalCSS('min-width', 'min(30%, 112px)'), ";", logicalCSS('max-width', "calc(100% - (".concat(padding, " * 2))")), ";;label:euiCard__betaBadgeAnchor;"),
|
|
134
|
+
euiCard__betaBadge: /*#__PURE__*/css(logicalCSS('width', '100%'), ";;label:euiCard__betaBadge;")
|
|
135
|
+
};
|
|
136
|
+
};
|