@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,6 +1,12 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["className", "description", "isDisabled", "title", "titleElement", "titleSize", "icon", "image", "children", "footer", "onClick", "href", "rel", "target", "textAlign", "betaBadgeProps", "layout", "selectable", "display", "paddingSize"]
|
|
4
|
+
var _excluded = ["className", "description", "isDisabled", "title", "titleElement", "titleSize", "icon", "image", "children", "footer", "onClick", "href", "rel", "target", "textAlign", "betaBadgeProps", "layout", "selectable", "display", "paddingSize"],
|
|
5
|
+
_excluded2 = ["anchorProps"];
|
|
6
|
+
|
|
7
|
+
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; }
|
|
8
|
+
|
|
9
|
+
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; }
|
|
4
10
|
|
|
5
11
|
/*
|
|
6
12
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -12,7 +18,7 @@ var _excluded = ["className", "description", "isDisabled", "title", "titleElemen
|
|
|
12
18
|
import React, { isValidElement } from 'react';
|
|
13
19
|
import classNames from 'classnames';
|
|
14
20
|
import { keysOf } from '../common';
|
|
15
|
-
import { getSecureRelForTarget } from '../../services';
|
|
21
|
+
import { getSecureRelForTarget, useEuiTheme } from '../../services';
|
|
16
22
|
import { EuiText } from '../text';
|
|
17
23
|
import { EuiTitle } from '../title';
|
|
18
24
|
import { EuiBetaBadge } from '../badge/beta_badge';
|
|
@@ -20,6 +26,8 @@ import { EuiCardSelect, euiCardSelectableColor } from './card_select';
|
|
|
20
26
|
import { useGeneratedHtmlId } from '../../services/accessibility';
|
|
21
27
|
import { validateHref } from '../../services/security/href_validator';
|
|
22
28
|
import { EuiPanel } from '../panel';
|
|
29
|
+
import { EuiSpacer } from '../spacer';
|
|
30
|
+
import { euiCardBetaBadgeStyles, euiCardStyles, euiCardTextStyles } from './card.styles';
|
|
23
31
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
24
32
|
var textAlignToClassNameMap = {
|
|
25
33
|
left: 'euiCard--leftAligned',
|
|
@@ -42,7 +50,7 @@ export var EuiCard = function EuiCard(_ref) {
|
|
|
42
50
|
_isDisabled = _ref.isDisabled,
|
|
43
51
|
title = _ref.title,
|
|
44
52
|
_ref$titleElement = _ref.titleElement,
|
|
45
|
-
titleElement = _ref$titleElement === void 0 ? '
|
|
53
|
+
titleElement = _ref$titleElement === void 0 ? 'p' : _ref$titleElement,
|
|
46
54
|
_ref$titleSize = _ref.titleSize,
|
|
47
55
|
titleSize = _ref$titleSize === void 0 ? 's' : _ref$titleSize,
|
|
48
56
|
icon = _ref.icon,
|
|
@@ -60,12 +68,21 @@ export var EuiCard = function EuiCard(_ref) {
|
|
|
60
68
|
layout = _ref$layout === void 0 ? 'vertical' : _ref$layout,
|
|
61
69
|
selectable = _ref.selectable,
|
|
62
70
|
display = _ref.display,
|
|
63
|
-
paddingSize = _ref.paddingSize,
|
|
71
|
+
_ref$paddingSize = _ref.paddingSize,
|
|
72
|
+
paddingSize = _ref$paddingSize === void 0 ? 'm' : _ref$paddingSize,
|
|
64
73
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
65
74
|
|
|
66
75
|
var isHrefValid = !href || validateHref(href);
|
|
67
76
|
var isDisabled = _isDisabled || !isHrefValid;
|
|
68
77
|
var isClickable = !isDisabled && (onClick || href || selectable && !selectable.isDisabled);
|
|
78
|
+
var euiThemeContext = useEuiTheme();
|
|
79
|
+
var styles = euiCardStyles(euiThemeContext, paddingSize, display);
|
|
80
|
+
var cardStyles = [styles.card.euiCard, // Text alignment should always be left when horizontal
|
|
81
|
+
styles.card.aligned[layout === 'horizontal' ? 'left' : textAlign], styles.card.layout[layout], isDisabled && styles.card.disabled];
|
|
82
|
+
var contentStyles = [styles.content.euiCard__content, styles.content.layout[layout]];
|
|
83
|
+
var textStyles = euiCardTextStyles(euiThemeContext);
|
|
84
|
+
var textCSS = [textStyles.euiCard__text, // Text alignment should always be left when horizontal
|
|
85
|
+
textStyles.aligned[layout === 'horizontal' ? 'left' : textAlign], isClickable && textStyles.interactive, isDisabled && textStyles.disabled];
|
|
69
86
|
/**
|
|
70
87
|
* For a11y, we simulate the same click that's provided on the title when clicking the whole card
|
|
71
88
|
* without having to make the whole card a button or anchor tag.
|
|
@@ -105,8 +122,10 @@ export var EuiCard = function EuiCard(_ref) {
|
|
|
105
122
|
|
|
106
123
|
if (image && layout === 'vertical') {
|
|
107
124
|
if ( /*#__PURE__*/isValidElement(image) || typeof image === 'string') {
|
|
125
|
+
var imageStyles = [styles.euiCard__image];
|
|
108
126
|
imageNode = ___EmotionJSX("div", {
|
|
109
|
-
className: "euiCard__image"
|
|
127
|
+
className: "euiCard__image",
|
|
128
|
+
css: imageStyles
|
|
110
129
|
}, /*#__PURE__*/isValidElement(image) ? image : ___EmotionJSX("img", {
|
|
111
130
|
src: image,
|
|
112
131
|
alt: ""
|
|
@@ -119,16 +138,20 @@ export var EuiCard = function EuiCard(_ref) {
|
|
|
119
138
|
var iconNode;
|
|
120
139
|
|
|
121
140
|
if (icon) {
|
|
141
|
+
var iconStyles = [styles.icon.euiCard__icon, styles.icon.layout[layout], imageNode && styles.icon.withImage];
|
|
122
142
|
iconNode = /*#__PURE__*/React.cloneElement(icon, {
|
|
123
|
-
className: classNames(icon.props.className, 'euiCard__icon')
|
|
143
|
+
className: classNames(icon.props.className, 'euiCard__icon'),
|
|
144
|
+
css: iconStyles
|
|
124
145
|
});
|
|
125
146
|
}
|
|
126
147
|
|
|
127
148
|
var optionalCardTop;
|
|
128
149
|
|
|
129
150
|
if (imageNode || iconNode) {
|
|
151
|
+
var topStyles = [styles.top.euiCard__top, styles.top.layout[layout], isDisabled && styles.top.disabled];
|
|
130
152
|
optionalCardTop = ___EmotionJSX("div", {
|
|
131
|
-
className: "euiCard__top"
|
|
153
|
+
className: "euiCard__top",
|
|
154
|
+
css: topStyles
|
|
132
155
|
}, imageNode, iconNode);
|
|
133
156
|
}
|
|
134
157
|
/**
|
|
@@ -138,18 +161,28 @@ export var EuiCard = function EuiCard(_ref) {
|
|
|
138
161
|
|
|
139
162
|
var optionalBetaBadge;
|
|
140
163
|
var optionalBetaBadgeID = '';
|
|
164
|
+
var optionalBetaCSS;
|
|
141
165
|
|
|
142
166
|
if (betaBadgeProps !== null && betaBadgeProps !== void 0 && betaBadgeProps.label) {
|
|
167
|
+
var betaStyles = euiCardBetaBadgeStyles(euiThemeContext, paddingSize);
|
|
168
|
+
optionalBetaCSS = betaStyles.hasBetaBadge;
|
|
169
|
+
var anchorCSS = [betaStyles.euiCard__betaBadgeAnchor];
|
|
170
|
+
var badgeCSS = [betaStyles.euiCard__betaBadge];
|
|
171
|
+
|
|
172
|
+
var anchorProps = betaBadgeProps.anchorProps,
|
|
173
|
+
cleanedBetaBadgeProps = _objectWithoutProperties(betaBadgeProps, _excluded2);
|
|
174
|
+
|
|
143
175
|
optionalBetaBadgeID = "".concat(ariaId, "BetaBadge");
|
|
144
|
-
optionalBetaBadge = ___EmotionJSX(
|
|
145
|
-
|
|
146
|
-
|
|
176
|
+
optionalBetaBadge = ___EmotionJSX(EuiBetaBadge, _extends({
|
|
177
|
+
css: badgeCSS,
|
|
178
|
+
color: isDisabled && !betaBadgeProps.onClick && !betaBadgeProps.href ? 'subdued' : 'hollow'
|
|
179
|
+
}, cleanedBetaBadgeProps, {
|
|
180
|
+
anchorProps: _objectSpread({
|
|
181
|
+
css: anchorCSS
|
|
182
|
+
}, anchorProps),
|
|
147
183
|
id: optionalBetaBadgeID
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
}))); // Increase padding size when there is a beta badge unless it's already determined
|
|
151
|
-
|
|
152
|
-
paddingSize = paddingSize || 'l';
|
|
184
|
+
})); // Increase padding size when there is a beta badge unless it's already determined
|
|
185
|
+
// paddingSize = paddingSize || 'l';
|
|
153
186
|
}
|
|
154
187
|
/**
|
|
155
188
|
* Optional selectable button
|
|
@@ -163,25 +196,29 @@ export var EuiCard = function EuiCard(_ref) {
|
|
|
163
196
|
var optionalSelectButton;
|
|
164
197
|
|
|
165
198
|
if (selectable) {
|
|
166
|
-
optionalSelectButton = ___EmotionJSX(
|
|
199
|
+
optionalSelectButton = ___EmotionJSX(React.Fragment, null, paddingSize !== 'none' && ___EmotionJSX(EuiSpacer, {
|
|
200
|
+
size: paddingSize || 'm'
|
|
201
|
+
}), ___EmotionJSX(EuiCardSelect, _extends({
|
|
167
202
|
"aria-describedby": "".concat(ariaId, "Title ").concat(ariaDesc)
|
|
168
203
|
}, selectable, {
|
|
169
204
|
buttonRef: function buttonRef(node) {
|
|
170
205
|
link = node;
|
|
171
206
|
}
|
|
172
|
-
}));
|
|
207
|
+
})));
|
|
173
208
|
}
|
|
209
|
+
|
|
210
|
+
var TitleElement = titleElement;
|
|
174
211
|
/**
|
|
175
212
|
* Wraps the title with the link (<a>) or button.
|
|
176
213
|
* This makes the title element a11y friendly and gets described by its content if its interactable.
|
|
177
214
|
*/
|
|
178
215
|
|
|
179
|
-
|
|
180
216
|
var theTitle;
|
|
181
217
|
|
|
182
218
|
if (!isDisabled && href) {
|
|
183
219
|
theTitle = ___EmotionJSX("a", {
|
|
184
220
|
className: "euiCard__titleAnchor",
|
|
221
|
+
css: textCSS,
|
|
185
222
|
onClick: onClick,
|
|
186
223
|
href: href,
|
|
187
224
|
target: target,
|
|
@@ -198,6 +235,7 @@ export var EuiCard = function EuiCard(_ref) {
|
|
|
198
235
|
} else if (isDisabled || onClick) {
|
|
199
236
|
theTitle = ___EmotionJSX("button", {
|
|
200
237
|
className: "euiCard__titleButton",
|
|
238
|
+
css: textCSS,
|
|
201
239
|
onClick: onClick,
|
|
202
240
|
disabled: isDisabled,
|
|
203
241
|
"aria-describedby": "".concat(optionalBetaBadgeID, " ").concat(ariaDesc),
|
|
@@ -206,35 +244,63 @@ export var EuiCard = function EuiCard(_ref) {
|
|
|
206
244
|
}
|
|
207
245
|
}, title);
|
|
208
246
|
} else {
|
|
209
|
-
theTitle =
|
|
247
|
+
theTitle = ___EmotionJSX("span", {
|
|
248
|
+
css: textCSS
|
|
249
|
+
}, title);
|
|
210
250
|
}
|
|
211
251
|
/**
|
|
212
|
-
*
|
|
252
|
+
* Children and/or Description content
|
|
213
253
|
*/
|
|
214
254
|
|
|
215
255
|
|
|
216
|
-
var
|
|
256
|
+
var optionalChildren;
|
|
257
|
+
|
|
258
|
+
if (children) {
|
|
259
|
+
var childrenStyles = [styles.euiCard__children];
|
|
260
|
+
optionalChildren = ___EmotionJSX("div", {
|
|
261
|
+
css: childrenStyles
|
|
262
|
+
}, children);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
var optionalDescription;
|
|
266
|
+
|
|
267
|
+
if (description) {
|
|
268
|
+
var descriptionStyles = [styles.euiCard__description];
|
|
269
|
+
optionalDescription = ___EmotionJSX(EuiText, {
|
|
270
|
+
id: ariaDesc,
|
|
271
|
+
size: "s",
|
|
272
|
+
css: descriptionStyles
|
|
273
|
+
}, ___EmotionJSX("p", null, description));
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* Footer content
|
|
277
|
+
*/
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
var optionalFooter;
|
|
281
|
+
|
|
282
|
+
if (layout === 'vertical' && footer) {
|
|
283
|
+
var footerStyles = [styles.euiCard__footer];
|
|
284
|
+
optionalFooter = ___EmotionJSX("div", {
|
|
285
|
+
css: footerStyles
|
|
286
|
+
}, footer);
|
|
287
|
+
}
|
|
288
|
+
|
|
217
289
|
return ___EmotionJSX(EuiPanel, _extends({
|
|
218
290
|
element: "div",
|
|
219
291
|
className: classes,
|
|
292
|
+
css: [].concat(cardStyles, [optionalBetaCSS]),
|
|
220
293
|
onClick: isClickable ? outerOnClick : undefined,
|
|
221
294
|
color: isDisabled ? 'subdued' : display,
|
|
222
295
|
hasShadow: isDisabled || display ? false : true,
|
|
223
296
|
hasBorder: display ? false : undefined,
|
|
224
297
|
paddingSize: paddingSize
|
|
225
298
|
}, rest), optionalCardTop, ___EmotionJSX("div", {
|
|
226
|
-
className: "euiCard__content"
|
|
299
|
+
className: "euiCard__content",
|
|
300
|
+
css: contentStyles
|
|
227
301
|
}, ___EmotionJSX(EuiTitle, {
|
|
228
302
|
id: "".concat(ariaId, "Title"),
|
|
229
303
|
className: "euiCard__title",
|
|
230
304
|
size: titleSize
|
|
231
|
-
}, ___EmotionJSX(TitleElement, null, theTitle)),
|
|
232
|
-
id: ariaDesc,
|
|
233
|
-
size: "s",
|
|
234
|
-
className: "euiCard__description"
|
|
235
|
-
}, ___EmotionJSX("p", null, description)), children && ___EmotionJSX("div", {
|
|
236
|
-
className: "euiCard__children"
|
|
237
|
-
}, children)), optionalBetaBadge, layout === 'vertical' && footer && ___EmotionJSX("div", {
|
|
238
|
-
className: "euiCard__footer"
|
|
239
|
-
}, footer), optionalSelectButton);
|
|
305
|
+
}, ___EmotionJSX(TitleElement, null, theTitle)), optionalDescription, optionalChildren), optionalBetaBadge, optionalFooter, optionalSelectButton);
|
|
240
306
|
};
|
|
@@ -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
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["
|
|
3
|
+
var _excluded = ["isSelected", "isDisabled", "disabled", "color", "children"];
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -10,29 +10,31 @@ var _excluded = ["className", "isSelected", "isDisabled", "color", "children"];
|
|
|
10
10
|
* Side Public License, v 1.
|
|
11
11
|
*/
|
|
12
12
|
import React from 'react';
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
13
|
+
import { EuiI18n } from '../../i18n';
|
|
14
|
+
import { EuiButton } from '../../button/button';
|
|
15
|
+
import { euiCardSelectStyles } from './card_select.styles';
|
|
16
16
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
17
17
|
export var EuiCardSelect = function EuiCardSelect(_ref) {
|
|
18
|
-
var
|
|
19
|
-
_ref$isSelected = _ref.isSelected,
|
|
18
|
+
var _ref$isSelected = _ref.isSelected,
|
|
20
19
|
isSelected = _ref$isSelected === void 0 ? false : _ref$isSelected,
|
|
21
20
|
isDisabled = _ref.isDisabled,
|
|
21
|
+
disabled = _ref.disabled,
|
|
22
22
|
color = _ref.color,
|
|
23
23
|
children = _ref.children,
|
|
24
24
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
25
25
|
|
|
26
|
-
var
|
|
27
|
-
var
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
var styles = euiCardSelectStyles();
|
|
27
|
+
var baseCSS = [styles.euiCardSelect];
|
|
28
|
+
var child = euiCardSelectableText(isSelected, isDisabled || disabled, children);
|
|
29
|
+
return ___EmotionJSX(EuiButton, _extends({
|
|
30
|
+
css: baseCSS,
|
|
31
|
+
color: euiCardSelectableColor(color, isSelected),
|
|
32
|
+
size: "m",
|
|
33
|
+
isDisabled: isDisabled || disabled,
|
|
33
34
|
iconType: isSelected ? 'check' : undefined,
|
|
34
35
|
role: "switch",
|
|
35
|
-
"aria-checked": isSelected
|
|
36
|
+
"aria-checked": isSelected,
|
|
37
|
+
fullWidth: true
|
|
36
38
|
}, rest), child);
|
|
37
39
|
};
|
|
38
40
|
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
|
|
12
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
13
|
+
name: "g3lgnd-euiCardSelect",
|
|
14
|
+
styles: "transform:none!important;label:euiCardSelect;"
|
|
15
|
+
} : {
|
|
16
|
+
name: "g3lgnd-euiCardSelect",
|
|
17
|
+
styles: "transform:none!important;label:euiCardSelect;",
|
|
18
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export var euiCardSelectStyles = function euiCardSelectStyles() {
|
|
22
|
+
return {
|
|
23
|
+
euiCardSelect: _ref
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
export { EuiCardSelect, euiCardSelectableColor } from './card_select';
|
|
@@ -13,6 +13,8 @@ import React, { useRef } from 'react';
|
|
|
13
13
|
import classNames from 'classnames';
|
|
14
14
|
import { EuiRadio, EuiCheckbox } from '../../form';
|
|
15
15
|
import { EuiSplitPanel } from '../../panel';
|
|
16
|
+
import { useEuiTheme } from '../../../services';
|
|
17
|
+
import { euiCheckableCardStyles } from './checkable_card.styles';
|
|
16
18
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
17
19
|
export var EuiCheckableCard = function EuiCheckableCard(_ref) {
|
|
18
20
|
var children = _ref.children,
|
|
@@ -27,12 +29,14 @@ export var EuiCheckableCard = function EuiCheckableCard(_ref) {
|
|
|
27
29
|
hasBorder = _ref$hasBorder === void 0 ? true : _ref$hasBorder,
|
|
28
30
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
29
31
|
|
|
32
|
+
var euiThemeContext = useEuiTheme();
|
|
33
|
+
var styles = euiCheckableCardStyles(euiThemeContext);
|
|
34
|
+
var baseStyles = [styles.euiCheckableCard, checked && !disabled && styles.isChecked];
|
|
35
|
+
var labelStyles = [styles.label.euiCheckableCard__label, disabled && styles.label.isDisabled];
|
|
36
|
+
var childStyles = [styles.euiCheckableCard__children];
|
|
30
37
|
var id = rest.id;
|
|
31
38
|
var labelEl = useRef(null);
|
|
32
|
-
var classes = classNames('euiCheckableCard',
|
|
33
|
-
'euiCheckableCard-isChecked': checked,
|
|
34
|
-
'euiCheckableCard-isDisabled': disabled
|
|
35
|
-
}, className);
|
|
39
|
+
var classes = classNames('euiCheckableCard', className);
|
|
36
40
|
var checkableElement;
|
|
37
41
|
|
|
38
42
|
if (checkableType === 'radio') {
|
|
@@ -47,9 +51,7 @@ export var EuiCheckableCard = function EuiCheckableCard(_ref) {
|
|
|
47
51
|
}, rest));
|
|
48
52
|
}
|
|
49
53
|
|
|
50
|
-
var labelClasses = classNames('euiCheckableCard__label'
|
|
51
|
-
'euiCheckableCard__label-isDisabled': disabled
|
|
52
|
-
});
|
|
54
|
+
var labelClasses = classNames('euiCheckableCard__label');
|
|
53
55
|
|
|
54
56
|
var onChangeAffordance = function onChangeAffordance() {
|
|
55
57
|
if (labelEl.current) {
|
|
@@ -62,7 +64,8 @@ export var EuiCheckableCard = function EuiCheckableCard(_ref) {
|
|
|
62
64
|
hasShadow: hasShadow,
|
|
63
65
|
hasBorder: hasBorder,
|
|
64
66
|
direction: "row",
|
|
65
|
-
className: classes
|
|
67
|
+
className: classes,
|
|
68
|
+
css: baseStyles
|
|
66
69
|
}, ___EmotionJSX(EuiSplitPanel.Inner, {
|
|
67
70
|
// Bubbles up the change event when clicking on the whole div for extra affordance
|
|
68
71
|
onClick: disabled ? undefined : onChangeAffordance,
|
|
@@ -71,10 +74,12 @@ export var EuiCheckableCard = function EuiCheckableCard(_ref) {
|
|
|
71
74
|
}, checkableElement), ___EmotionJSX(EuiSplitPanel.Inner, null, ___EmotionJSX("label", {
|
|
72
75
|
ref: labelEl,
|
|
73
76
|
className: labelClasses,
|
|
77
|
+
css: labelStyles,
|
|
74
78
|
htmlFor: id,
|
|
75
79
|
"aria-describedby": children ? "".concat(id, "-details") : undefined
|
|
76
80
|
}, label), children && ___EmotionJSX("div", {
|
|
77
81
|
id: "".concat(id, "-details"),
|
|
78
|
-
className: "euiCheckableCard__children"
|
|
82
|
+
className: "euiCheckableCard__children",
|
|
83
|
+
css: childStyles
|
|
79
84
|
}, children)));
|
|
80
85
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
import { css } from '@emotion/react';
|
|
9
|
+
import { euiCanAnimate, euiPaddingSize, logicalCSS, logicals } from '../../../global_styling';
|
|
10
|
+
export var euiCheckableCardStyles = function euiCheckableCardStyles(euiThemeContext) {
|
|
11
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
12
|
+
var padding = euiPaddingSize(euiThemeContext, 'm');
|
|
13
|
+
return {
|
|
14
|
+
euiCheckableCard: /*#__PURE__*/css(euiCanAnimate, "{transition:border-color ", euiTheme.animation.normal, " ease-in;};label:euiCheckableCard;"),
|
|
15
|
+
isChecked: /*#__PURE__*/css("border-color:", euiTheme.colors.primary, ";;label:isChecked;"),
|
|
16
|
+
label: {
|
|
17
|
+
euiCheckableCard__label: /*#__PURE__*/css("cursor:pointer;display:block;", logicals.width, ":calc(100% + (", padding, " * 2));padding:", padding, ";margin:-", padding, ";;label:euiCheckableCard__label;"),
|
|
18
|
+
isDisabled: /*#__PURE__*/css("color:", euiTheme.colors.disabledText, ";cursor:not-allowed;;label:isDisabled;")
|
|
19
|
+
},
|
|
20
|
+
euiCheckableCard__children: /*#__PURE__*/css(logicalCSS('margin-top', euiTheme.size.base), ";;label:euiCheckableCard__children;")
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -53,7 +53,7 @@ export var euiCommentEventHeaderStyles = function euiCommentEventHeaderStyles(_r
|
|
|
53
53
|
return {
|
|
54
54
|
euiCommentEvent__header: /*#__PURE__*/css(";label:euiCommentEvent__header;"),
|
|
55
55
|
// types
|
|
56
|
-
regular: /*#__PURE__*/css("background:", euiTheme.colors.lightestShade, ";border-bottom
|
|
56
|
+
regular: /*#__PURE__*/css("background:", euiTheme.colors.lightestShade, ";", logicalCSS('border-bottom', euiTheme.border.thin), " padding:", euiTheme.size.s, ";;label:regular;"),
|
|
57
57
|
// variants
|
|
58
58
|
hasEventColor: _ref2,
|
|
59
59
|
// Children
|