@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
|
@@ -11,6 +11,8 @@ exports.LAYOUT_ALIGNMENTS = exports.EuiCard = exports.ALIGNMENTS = void 0;
|
|
|
11
11
|
|
|
12
12
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
13
|
|
|
14
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
|
+
|
|
14
16
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
15
17
|
|
|
16
18
|
var _react = _interopRequireWildcard(require("react"));
|
|
@@ -35,14 +37,23 @@ var _href_validator = require("../../services/security/href_validator");
|
|
|
35
37
|
|
|
36
38
|
var _panel = require("../panel");
|
|
37
39
|
|
|
40
|
+
var _spacer = require("../spacer");
|
|
41
|
+
|
|
42
|
+
var _card = require("./card.styles");
|
|
43
|
+
|
|
38
44
|
var _react2 = require("@emotion/react");
|
|
39
45
|
|
|
40
|
-
var _excluded = ["className", "description", "isDisabled", "title", "titleElement", "titleSize", "icon", "image", "children", "footer", "onClick", "href", "rel", "target", "textAlign", "betaBadgeProps", "layout", "selectable", "display", "paddingSize"]
|
|
46
|
+
var _excluded = ["className", "description", "isDisabled", "title", "titleElement", "titleSize", "icon", "image", "children", "footer", "onClick", "href", "rel", "target", "textAlign", "betaBadgeProps", "layout", "selectable", "display", "paddingSize"],
|
|
47
|
+
_excluded2 = ["anchorProps"];
|
|
41
48
|
|
|
42
49
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
43
50
|
|
|
44
51
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
45
52
|
|
|
53
|
+
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; }
|
|
54
|
+
|
|
55
|
+
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) { (0, _defineProperty2.default)(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; }
|
|
56
|
+
|
|
46
57
|
var textAlignToClassNameMap = {
|
|
47
58
|
left: 'euiCard--leftAligned',
|
|
48
59
|
center: 'euiCard--centerAligned',
|
|
@@ -67,7 +78,7 @@ var EuiCard = function EuiCard(_ref) {
|
|
|
67
78
|
_isDisabled = _ref.isDisabled,
|
|
68
79
|
title = _ref.title,
|
|
69
80
|
_ref$titleElement = _ref.titleElement,
|
|
70
|
-
titleElement = _ref$titleElement === void 0 ? '
|
|
81
|
+
titleElement = _ref$titleElement === void 0 ? 'p' : _ref$titleElement,
|
|
71
82
|
_ref$titleSize = _ref.titleSize,
|
|
72
83
|
titleSize = _ref$titleSize === void 0 ? 's' : _ref$titleSize,
|
|
73
84
|
icon = _ref.icon,
|
|
@@ -85,11 +96,20 @@ var EuiCard = function EuiCard(_ref) {
|
|
|
85
96
|
layout = _ref$layout === void 0 ? 'vertical' : _ref$layout,
|
|
86
97
|
selectable = _ref.selectable,
|
|
87
98
|
display = _ref.display,
|
|
88
|
-
paddingSize = _ref.paddingSize,
|
|
99
|
+
_ref$paddingSize = _ref.paddingSize,
|
|
100
|
+
paddingSize = _ref$paddingSize === void 0 ? 'm' : _ref$paddingSize,
|
|
89
101
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
90
102
|
var isHrefValid = !href || (0, _href_validator.validateHref)(href);
|
|
91
103
|
var isDisabled = _isDisabled || !isHrefValid;
|
|
92
104
|
var isClickable = !isDisabled && (onClick || href || selectable && !selectable.isDisabled);
|
|
105
|
+
var euiThemeContext = (0, _services.useEuiTheme)();
|
|
106
|
+
var styles = (0, _card.euiCardStyles)(euiThemeContext, paddingSize, display);
|
|
107
|
+
var cardStyles = [styles.card.euiCard, // Text alignment should always be left when horizontal
|
|
108
|
+
styles.card.aligned[layout === 'horizontal' ? 'left' : textAlign], styles.card.layout[layout], isDisabled && styles.card.disabled];
|
|
109
|
+
var contentStyles = [styles.content.euiCard__content, styles.content.layout[layout]];
|
|
110
|
+
var textStyles = (0, _card.euiCardTextStyles)(euiThemeContext);
|
|
111
|
+
var textCSS = [textStyles.euiCard__text, // Text alignment should always be left when horizontal
|
|
112
|
+
textStyles.aligned[layout === 'horizontal' ? 'left' : textAlign], isClickable && textStyles.interactive, isDisabled && textStyles.disabled];
|
|
93
113
|
/**
|
|
94
114
|
* For a11y, we simulate the same click that's provided on the title when clicking the whole card
|
|
95
115
|
* without having to make the whole card a button or anchor tag.
|
|
@@ -129,8 +149,10 @@ var EuiCard = function EuiCard(_ref) {
|
|
|
129
149
|
|
|
130
150
|
if (image && layout === 'vertical') {
|
|
131
151
|
if ( /*#__PURE__*/(0, _react.isValidElement)(image) || typeof image === 'string') {
|
|
152
|
+
var imageStyles = [styles.euiCard__image];
|
|
132
153
|
imageNode = (0, _react2.jsx)("div", {
|
|
133
|
-
className: "euiCard__image"
|
|
154
|
+
className: "euiCard__image",
|
|
155
|
+
css: imageStyles
|
|
134
156
|
}, /*#__PURE__*/(0, _react.isValidElement)(image) ? image : (0, _react2.jsx)("img", {
|
|
135
157
|
src: image,
|
|
136
158
|
alt: ""
|
|
@@ -143,16 +165,20 @@ var EuiCard = function EuiCard(_ref) {
|
|
|
143
165
|
var iconNode;
|
|
144
166
|
|
|
145
167
|
if (icon) {
|
|
168
|
+
var iconStyles = [styles.icon.euiCard__icon, styles.icon.layout[layout], imageNode && styles.icon.withImage];
|
|
146
169
|
iconNode = /*#__PURE__*/_react.default.cloneElement(icon, {
|
|
147
|
-
className: (0, _classnames.default)(icon.props.className, 'euiCard__icon')
|
|
170
|
+
className: (0, _classnames.default)(icon.props.className, 'euiCard__icon'),
|
|
171
|
+
css: iconStyles
|
|
148
172
|
});
|
|
149
173
|
}
|
|
150
174
|
|
|
151
175
|
var optionalCardTop;
|
|
152
176
|
|
|
153
177
|
if (imageNode || iconNode) {
|
|
178
|
+
var topStyles = [styles.top.euiCard__top, styles.top.layout[layout], isDisabled && styles.top.disabled];
|
|
154
179
|
optionalCardTop = (0, _react2.jsx)("div", {
|
|
155
|
-
className: "euiCard__top"
|
|
180
|
+
className: "euiCard__top",
|
|
181
|
+
css: topStyles
|
|
156
182
|
}, imageNode, iconNode);
|
|
157
183
|
}
|
|
158
184
|
/**
|
|
@@ -162,18 +188,26 @@ var EuiCard = function EuiCard(_ref) {
|
|
|
162
188
|
|
|
163
189
|
var optionalBetaBadge;
|
|
164
190
|
var optionalBetaBadgeID = '';
|
|
191
|
+
var optionalBetaCSS;
|
|
165
192
|
|
|
166
193
|
if (betaBadgeProps !== null && betaBadgeProps !== void 0 && betaBadgeProps.label) {
|
|
194
|
+
var betaStyles = (0, _card.euiCardBetaBadgeStyles)(euiThemeContext, paddingSize);
|
|
195
|
+
optionalBetaCSS = betaStyles.hasBetaBadge;
|
|
196
|
+
var anchorCSS = [betaStyles.euiCard__betaBadgeAnchor];
|
|
197
|
+
var badgeCSS = [betaStyles.euiCard__betaBadge];
|
|
198
|
+
var anchorProps = betaBadgeProps.anchorProps,
|
|
199
|
+
cleanedBetaBadgeProps = (0, _objectWithoutProperties2.default)(betaBadgeProps, _excluded2);
|
|
167
200
|
optionalBetaBadgeID = "".concat(ariaId, "BetaBadge");
|
|
168
|
-
optionalBetaBadge = (0, _react2.jsx)(
|
|
169
|
-
|
|
170
|
-
|
|
201
|
+
optionalBetaBadge = (0, _react2.jsx)(_beta_badge.EuiBetaBadge, (0, _extends2.default)({
|
|
202
|
+
css: badgeCSS,
|
|
203
|
+
color: isDisabled && !betaBadgeProps.onClick && !betaBadgeProps.href ? 'subdued' : 'hollow'
|
|
204
|
+
}, cleanedBetaBadgeProps, {
|
|
205
|
+
anchorProps: _objectSpread({
|
|
206
|
+
css: anchorCSS
|
|
207
|
+
}, anchorProps),
|
|
171
208
|
id: optionalBetaBadgeID
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
}))); // Increase padding size when there is a beta badge unless it's already determined
|
|
175
|
-
|
|
176
|
-
paddingSize = paddingSize || 'l';
|
|
209
|
+
})); // Increase padding size when there is a beta badge unless it's already determined
|
|
210
|
+
// paddingSize = paddingSize || 'l';
|
|
177
211
|
}
|
|
178
212
|
/**
|
|
179
213
|
* Optional selectable button
|
|
@@ -187,25 +221,29 @@ var EuiCard = function EuiCard(_ref) {
|
|
|
187
221
|
var optionalSelectButton;
|
|
188
222
|
|
|
189
223
|
if (selectable) {
|
|
190
|
-
optionalSelectButton = (0, _react2.jsx)(
|
|
224
|
+
optionalSelectButton = (0, _react2.jsx)(_react.default.Fragment, null, paddingSize !== 'none' && (0, _react2.jsx)(_spacer.EuiSpacer, {
|
|
225
|
+
size: paddingSize || 'm'
|
|
226
|
+
}), (0, _react2.jsx)(_card_select.EuiCardSelect, (0, _extends2.default)({
|
|
191
227
|
"aria-describedby": "".concat(ariaId, "Title ").concat(ariaDesc)
|
|
192
228
|
}, selectable, {
|
|
193
229
|
buttonRef: function buttonRef(node) {
|
|
194
230
|
link = node;
|
|
195
231
|
}
|
|
196
|
-
}));
|
|
232
|
+
})));
|
|
197
233
|
}
|
|
234
|
+
|
|
235
|
+
var TitleElement = titleElement;
|
|
198
236
|
/**
|
|
199
237
|
* Wraps the title with the link (<a>) or button.
|
|
200
238
|
* This makes the title element a11y friendly and gets described by its content if its interactable.
|
|
201
239
|
*/
|
|
202
240
|
|
|
203
|
-
|
|
204
241
|
var theTitle;
|
|
205
242
|
|
|
206
243
|
if (!isDisabled && href) {
|
|
207
244
|
theTitle = (0, _react2.jsx)("a", {
|
|
208
245
|
className: "euiCard__titleAnchor",
|
|
246
|
+
css: textCSS,
|
|
209
247
|
onClick: onClick,
|
|
210
248
|
href: href,
|
|
211
249
|
target: target,
|
|
@@ -222,6 +260,7 @@ var EuiCard = function EuiCard(_ref) {
|
|
|
222
260
|
} else if (isDisabled || onClick) {
|
|
223
261
|
theTitle = (0, _react2.jsx)("button", {
|
|
224
262
|
className: "euiCard__titleButton",
|
|
263
|
+
css: textCSS,
|
|
225
264
|
onClick: onClick,
|
|
226
265
|
disabled: isDisabled,
|
|
227
266
|
"aria-describedby": "".concat(optionalBetaBadgeID, " ").concat(ariaDesc),
|
|
@@ -230,37 +269,65 @@ var EuiCard = function EuiCard(_ref) {
|
|
|
230
269
|
}
|
|
231
270
|
}, title);
|
|
232
271
|
} else {
|
|
233
|
-
theTitle =
|
|
272
|
+
theTitle = (0, _react2.jsx)("span", {
|
|
273
|
+
css: textCSS
|
|
274
|
+
}, title);
|
|
234
275
|
}
|
|
235
276
|
/**
|
|
236
|
-
*
|
|
277
|
+
* Children and/or Description content
|
|
237
278
|
*/
|
|
238
279
|
|
|
239
280
|
|
|
240
|
-
var
|
|
281
|
+
var optionalChildren;
|
|
282
|
+
|
|
283
|
+
if (children) {
|
|
284
|
+
var childrenStyles = [styles.euiCard__children];
|
|
285
|
+
optionalChildren = (0, _react2.jsx)("div", {
|
|
286
|
+
css: childrenStyles
|
|
287
|
+
}, children);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
var optionalDescription;
|
|
291
|
+
|
|
292
|
+
if (description) {
|
|
293
|
+
var descriptionStyles = [styles.euiCard__description];
|
|
294
|
+
optionalDescription = (0, _react2.jsx)(_text.EuiText, {
|
|
295
|
+
id: ariaDesc,
|
|
296
|
+
size: "s",
|
|
297
|
+
css: descriptionStyles
|
|
298
|
+
}, (0, _react2.jsx)("p", null, description));
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Footer content
|
|
302
|
+
*/
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
var optionalFooter;
|
|
306
|
+
|
|
307
|
+
if (layout === 'vertical' && footer) {
|
|
308
|
+
var footerStyles = [styles.euiCard__footer];
|
|
309
|
+
optionalFooter = (0, _react2.jsx)("div", {
|
|
310
|
+
css: footerStyles
|
|
311
|
+
}, footer);
|
|
312
|
+
}
|
|
313
|
+
|
|
241
314
|
return (0, _react2.jsx)(_panel.EuiPanel, (0, _extends2.default)({
|
|
242
315
|
element: "div",
|
|
243
316
|
className: classes,
|
|
317
|
+
css: [].concat(cardStyles, [optionalBetaCSS]),
|
|
244
318
|
onClick: isClickable ? outerOnClick : undefined,
|
|
245
319
|
color: isDisabled ? 'subdued' : display,
|
|
246
320
|
hasShadow: isDisabled || display ? false : true,
|
|
247
321
|
hasBorder: display ? false : undefined,
|
|
248
322
|
paddingSize: paddingSize
|
|
249
323
|
}, rest), optionalCardTop, (0, _react2.jsx)("div", {
|
|
250
|
-
className: "euiCard__content"
|
|
324
|
+
className: "euiCard__content",
|
|
325
|
+
css: contentStyles
|
|
251
326
|
}, (0, _react2.jsx)(_title.EuiTitle, {
|
|
252
327
|
id: "".concat(ariaId, "Title"),
|
|
253
328
|
className: "euiCard__title",
|
|
254
329
|
size: titleSize
|
|
255
|
-
}, (0, _react2.jsx)(TitleElement, null, theTitle)),
|
|
256
|
-
id: ariaDesc,
|
|
257
|
-
size: "s",
|
|
258
|
-
className: "euiCard__description"
|
|
259
|
-
}, (0, _react2.jsx)("p", null, description)), children && (0, _react2.jsx)("div", {
|
|
260
|
-
className: "euiCard__children"
|
|
261
|
-
}, children)), optionalBetaBadge, layout === 'vertical' && footer && (0, _react2.jsx)("div", {
|
|
262
|
-
className: "euiCard__footer"
|
|
263
|
-
}, footer), optionalSelectButton);
|
|
330
|
+
}, (0, _react2.jsx)(TitleElement, null, theTitle)), optionalDescription, optionalChildren), optionalBetaBadge, optionalFooter, optionalSelectButton);
|
|
264
331
|
};
|
|
265
332
|
|
|
266
333
|
exports.EuiCard = EuiCard;
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.euiCardTextStyles = exports.euiCardStyles = exports.euiCardBetaBadgeStyles = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = require("@emotion/react");
|
|
9
|
+
|
|
10
|
+
var _global_styling = require("../../global_styling");
|
|
11
|
+
|
|
12
|
+
var _mixins = require("../../themes/amsterdam/global_styling/mixins");
|
|
13
|
+
|
|
14
|
+
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)."; }
|
|
15
|
+
|
|
16
|
+
var paddingKey = 'm';
|
|
17
|
+
var halfPaddingKey = 's';
|
|
18
|
+
/**
|
|
19
|
+
* 1. Footer is always at the bottom.
|
|
20
|
+
* 3. Horizontal layouts should always top left align no matter the textAlign prop
|
|
21
|
+
* 4. Ensures the contents always stretch no matter the flex layout
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
25
|
+
name: "reymun-disabled",
|
|
26
|
+
styles: "filter:grayscale(100%);label:disabled;"
|
|
27
|
+
} : {
|
|
28
|
+
name: "reymun-disabled",
|
|
29
|
+
styles: "filter:grayscale(100%);label:disabled;",
|
|
30
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
var _ref3 = process.env.NODE_ENV === "production" ? {
|
|
34
|
+
name: "cr3wz7-euiCard__content",
|
|
35
|
+
styles: "flex-grow:1;label:euiCard__content;"
|
|
36
|
+
} : {
|
|
37
|
+
name: "cr3wz7-euiCard__content",
|
|
38
|
+
styles: "flex-grow:1;label:euiCard__content;",
|
|
39
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
var _ref4 = process.env.NODE_ENV === "production" ? {
|
|
43
|
+
name: "1kw0yxn-horizontal",
|
|
44
|
+
styles: "flex-direction:row;align-items:flex-start;label:horizontal;"
|
|
45
|
+
} : {
|
|
46
|
+
name: "1kw0yxn-horizontal",
|
|
47
|
+
styles: "flex-direction:row;align-items:flex-start;label:horizontal;",
|
|
48
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
var _ref5 = process.env.NODE_ENV === "production" ? {
|
|
52
|
+
name: "omnk2l-vertical",
|
|
53
|
+
styles: "flex-direction:column;label:vertical;"
|
|
54
|
+
} : {
|
|
55
|
+
name: "omnk2l-vertical",
|
|
56
|
+
styles: "flex-direction:column;label:vertical;",
|
|
57
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
var euiCardStyles = function euiCardStyles(euiThemeContext, paddingSize, color) {
|
|
61
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
62
|
+
var paddingAmount = (0, _global_styling.euiPaddingSize)(euiThemeContext, paddingSize);
|
|
63
|
+
var spacing = (0, _global_styling.euiPaddingSize)(euiThemeContext, paddingKey);
|
|
64
|
+
var halfSpacing = (0, _global_styling.euiPaddingSize)(euiThemeContext, halfPaddingKey);
|
|
65
|
+
return {
|
|
66
|
+
card: {
|
|
67
|
+
euiCard: /*#__PURE__*/(0, _react.css)("display:flex;&:has([class*='euiCard__text'][class*='-interactive']:focus:focus-visible){outline:", euiTheme.focus.width, " solid currentColor;};label:euiCard;"),
|
|
68
|
+
aligned: {
|
|
69
|
+
center: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('center'), ";align-items:center;;label:center;"),
|
|
70
|
+
left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('left'), ";align-items:flex-start;;label:left;"),
|
|
71
|
+
right: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('right'), ";align-items:flex-end;;label:right;")
|
|
72
|
+
},
|
|
73
|
+
layout: {
|
|
74
|
+
vertical: _ref5,
|
|
75
|
+
horizontal: _ref4
|
|
76
|
+
},
|
|
77
|
+
disabled: /*#__PURE__*/(0, _react.css)("cursor:not-allowed;background-color:", (0, _mixins.euiButtonColor)(euiThemeContext, 'disabled'), ";color:", euiTheme.colors.disabledText, ";;label:disabled;")
|
|
78
|
+
},
|
|
79
|
+
content: {
|
|
80
|
+
euiCard__content: _ref3,
|
|
81
|
+
layout: {
|
|
82
|
+
vertical: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', '100%'), ";;label:vertical;"),
|
|
83
|
+
horizontal: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', 'auto'), ";;label:horizontal;")
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
euiCard__children: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('margin-top', halfSpacing), ";;label:euiCard__children;"),
|
|
87
|
+
euiCard__description: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('margin-top', halfSpacing), ";;label:euiCard__description;"),
|
|
88
|
+
euiCard__footer: /*#__PURE__*/(0, _react.css)("flex-grow:0;", (0, _global_styling.logicalCSS)('width', '100%'), ";", (0, _global_styling.logicalCSS)('margin-top', spacing), ";;label:euiCard__footer;"),
|
|
89
|
+
top: {
|
|
90
|
+
euiCard__top: /*#__PURE__*/(0, _react.css)("flex-grow:0;font-size:0;position:relative;", (0, _global_styling.logicalCSS)('min-height', '1px'), ";", (0, _global_styling.logicalCSS)('margin-bottom', spacing), ";;label:euiCard__top;"),
|
|
91
|
+
layout: {
|
|
92
|
+
vertical: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', '100%'), ";;label:vertical;"),
|
|
93
|
+
horizontal: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', 'auto'), ";;label:horizontal;")
|
|
94
|
+
},
|
|
95
|
+
disabled: _ref2
|
|
96
|
+
},
|
|
97
|
+
euiCard__image: /*#__PURE__*/(0, _react.css)("position:relative;overflow:hidden;", (0, _global_styling.logicalCSS)('width', "calc(100% + (".concat(paddingAmount, " * 2))")), ";", (0, _global_styling.logicalCSS)('left', "-".concat(paddingAmount)), ";", (0, _global_styling.logicalCSS)('top', "-".concat(paddingAmount)), ";", (0, _global_styling.logicalCSS)('margin-bottom', "-".concat(paddingAmount)), ";", _global_styling.logicals['border-top-left-radius'], ":calc(", euiTheme.border.radius.medium, " - 1px);", _global_styling.logicals['border-top-right-radius'], ":calc(", euiTheme.border.radius.medium, " - 1px);", color === 'transparent' ? "border-radius: ".concat(euiTheme.border.radius.medium, ";") : undefined, " img{", (0, _global_styling.logicalCSS)('width', '100%'), ";};label:euiCard__image;"),
|
|
98
|
+
icon: {
|
|
99
|
+
euiCard__icon: /*#__PURE__*/(0, _react.css)(";label:euiCard__icon;"),
|
|
100
|
+
withImage: /*#__PURE__*/(0, _react.css)("position:absolute;", (0, _global_styling.logicalCSS)('top', '50%'), ";", (0, _global_styling.logicalCSS)('left', '50%'), ";transform:translate(-50%, calc(-50% + -", paddingAmount, "))!important;;label:withImage;"),
|
|
101
|
+
layout: {
|
|
102
|
+
vertical: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('margin-top', halfSpacing), ";;label:vertical;"),
|
|
103
|
+
horizontal: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('margin-right', spacing), ";;label:horizontal;")
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
exports.euiCardStyles = euiCardStyles;
|
|
110
|
+
|
|
111
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
112
|
+
name: "r8agzg-euiCard__text",
|
|
113
|
+
styles: "font:inherit;color:inherit;cursor:inherit;label:euiCard__text;"
|
|
114
|
+
} : {
|
|
115
|
+
name: "r8agzg-euiCard__text",
|
|
116
|
+
styles: "font:inherit;color:inherit;cursor:inherit;label:euiCard__text;",
|
|
117
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
var euiCardTextStyles = function euiCardTextStyles(euiThemeContext) {
|
|
121
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
122
|
+
return {
|
|
123
|
+
euiCard__text: _ref,
|
|
124
|
+
interactive: /*#__PURE__*/(0, _react.css)("outline-offset:", euiTheme.size.xxs, ";.euiCard:hover &,.euiCard:focus &,&:hover,&:focus{text-decoration:underline;}", _global_styling.euiSupportsHas, "{outline:none!important;};label:interactive;"),
|
|
125
|
+
aligned: {
|
|
126
|
+
center: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('center'), ";;label:center;"),
|
|
127
|
+
left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('left'), ";;label:left;"),
|
|
128
|
+
right: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('right'), ";;label:right;")
|
|
129
|
+
},
|
|
130
|
+
disabled: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.disabledText, ";;label:disabled;")
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
exports.euiCardTextStyles = euiCardTextStyles;
|
|
135
|
+
|
|
136
|
+
var euiCardBetaBadgeStyles = function euiCardBetaBadgeStyles(euiThemeContext, paddingSize) {
|
|
137
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
138
|
+
var padding = (0, _global_styling.euiPaddingSize)(euiThemeContext, paddingSize);
|
|
139
|
+
return {
|
|
140
|
+
hasBetaBadge: /*#__PURE__*/(0, _react.css)("position:relative;overflow:visible;", (0, _global_styling.logicalCSS)('padding-top', "calc(".concat(padding, " + ").concat(euiTheme.size.s, ")")), ";;label:hasBetaBadge;"),
|
|
141
|
+
euiCard__betaBadgeAnchor: /*#__PURE__*/(0, _react.css)("line-height:0;position:absolute;", (0, _global_styling.logicalCSS)('top', '0'), ";", (0, _global_styling.logicalCSS)('left', '50%'), ";transform:translateX(-50%) translateY(-50%);z-index:3;", (0, _global_styling.logicalCSS)('min-width', 'min(30%, 112px)'), ";", (0, _global_styling.logicalCSS)('max-width', "calc(100% - (".concat(padding, " * 2))")), ";;label:euiCard__betaBadgeAnchor;"),
|
|
142
|
+
euiCard__betaBadge: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', '100%'), ";;label:euiCard__betaBadge;")
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
exports.euiCardBetaBadgeStyles = euiCardBetaBadgeStyles;
|
|
@@ -14,34 +14,36 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
14
14
|
|
|
15
15
|
var _react = _interopRequireDefault(require("react"));
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _i18n = require("../../i18n");
|
|
18
18
|
|
|
19
|
-
var
|
|
19
|
+
var _button = require("../../button/button");
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _card_select = require("./card_select.styles");
|
|
22
22
|
|
|
23
23
|
var _react2 = require("@emotion/react");
|
|
24
24
|
|
|
25
|
-
var _excluded = ["
|
|
25
|
+
var _excluded = ["isSelected", "isDisabled", "disabled", "color", "children"];
|
|
26
26
|
|
|
27
27
|
var EuiCardSelect = function EuiCardSelect(_ref) {
|
|
28
|
-
var
|
|
29
|
-
_ref$isSelected = _ref.isSelected,
|
|
28
|
+
var _ref$isSelected = _ref.isSelected,
|
|
30
29
|
isSelected = _ref$isSelected === void 0 ? false : _ref$isSelected,
|
|
31
30
|
isDisabled = _ref.isDisabled,
|
|
31
|
+
disabled = _ref.disabled,
|
|
32
32
|
color = _ref.color,
|
|
33
33
|
children = _ref.children,
|
|
34
34
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
35
|
-
var
|
|
36
|
-
var
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
var styles = (0, _card_select.euiCardSelectStyles)();
|
|
36
|
+
var baseCSS = [styles.euiCardSelect];
|
|
37
|
+
var child = euiCardSelectableText(isSelected, isDisabled || disabled, children);
|
|
38
|
+
return (0, _react2.jsx)(_button.EuiButton, (0, _extends2.default)({
|
|
39
|
+
css: baseCSS,
|
|
40
|
+
color: euiCardSelectableColor(color, isSelected),
|
|
41
|
+
size: "m",
|
|
42
|
+
isDisabled: isDisabled || disabled,
|
|
42
43
|
iconType: isSelected ? 'check' : undefined,
|
|
43
44
|
role: "switch",
|
|
44
|
-
"aria-checked": isSelected
|
|
45
|
+
"aria-checked": isSelected,
|
|
46
|
+
fullWidth: true
|
|
45
47
|
}, rest), child);
|
|
46
48
|
};
|
|
47
49
|
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.euiCardSelectStyles = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = require("@emotion/react");
|
|
9
|
+
|
|
10
|
+
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)."; }
|
|
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
|
+
var euiCardSelectStyles = function euiCardSelectStyles() {
|
|
22
|
+
return {
|
|
23
|
+
euiCardSelect: _ref
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
exports.euiCardSelectStyles = euiCardSelectStyles;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "EuiCardSelect", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _card_select.EuiCardSelect;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "euiCardSelectableColor", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _card_select.euiCardSelectableColor;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
var _card_select = require("./card_select");
|
|
@@ -21,6 +21,10 @@ var _form = require("../../form");
|
|
|
21
21
|
|
|
22
22
|
var _panel = require("../../panel");
|
|
23
23
|
|
|
24
|
+
var _services = require("../../../services");
|
|
25
|
+
|
|
26
|
+
var _checkable_card = require("./checkable_card.styles");
|
|
27
|
+
|
|
24
28
|
var _react2 = require("@emotion/react");
|
|
25
29
|
|
|
26
30
|
var _excluded = ["children", "className", "checkableType", "label", "checked", "disabled", "hasShadow", "hasBorder"];
|
|
@@ -41,12 +45,14 @@ var EuiCheckableCard = function EuiCheckableCard(_ref) {
|
|
|
41
45
|
_ref$hasBorder = _ref.hasBorder,
|
|
42
46
|
hasBorder = _ref$hasBorder === void 0 ? true : _ref$hasBorder,
|
|
43
47
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
48
|
+
var euiThemeContext = (0, _services.useEuiTheme)();
|
|
49
|
+
var styles = (0, _checkable_card.euiCheckableCardStyles)(euiThemeContext);
|
|
50
|
+
var baseStyles = [styles.euiCheckableCard, checked && !disabled && styles.isChecked];
|
|
51
|
+
var labelStyles = [styles.label.euiCheckableCard__label, disabled && styles.label.isDisabled];
|
|
52
|
+
var childStyles = [styles.euiCheckableCard__children];
|
|
44
53
|
var id = rest.id;
|
|
45
54
|
var labelEl = (0, _react.useRef)(null);
|
|
46
|
-
var classes = (0, _classnames.default)('euiCheckableCard',
|
|
47
|
-
'euiCheckableCard-isChecked': checked,
|
|
48
|
-
'euiCheckableCard-isDisabled': disabled
|
|
49
|
-
}, className);
|
|
55
|
+
var classes = (0, _classnames.default)('euiCheckableCard', className);
|
|
50
56
|
var checkableElement;
|
|
51
57
|
|
|
52
58
|
if (checkableType === 'radio') {
|
|
@@ -61,9 +67,7 @@ var EuiCheckableCard = function EuiCheckableCard(_ref) {
|
|
|
61
67
|
}, rest));
|
|
62
68
|
}
|
|
63
69
|
|
|
64
|
-
var labelClasses = (0, _classnames.default)('euiCheckableCard__label'
|
|
65
|
-
'euiCheckableCard__label-isDisabled': disabled
|
|
66
|
-
});
|
|
70
|
+
var labelClasses = (0, _classnames.default)('euiCheckableCard__label');
|
|
67
71
|
|
|
68
72
|
var onChangeAffordance = function onChangeAffordance() {
|
|
69
73
|
if (labelEl.current) {
|
|
@@ -76,7 +80,8 @@ var EuiCheckableCard = function EuiCheckableCard(_ref) {
|
|
|
76
80
|
hasShadow: hasShadow,
|
|
77
81
|
hasBorder: hasBorder,
|
|
78
82
|
direction: "row",
|
|
79
|
-
className: classes
|
|
83
|
+
className: classes,
|
|
84
|
+
css: baseStyles
|
|
80
85
|
}, (0, _react2.jsx)(_panel.EuiSplitPanel.Inner, {
|
|
81
86
|
// Bubbles up the change event when clicking on the whole div for extra affordance
|
|
82
87
|
onClick: disabled ? undefined : onChangeAffordance,
|
|
@@ -85,11 +90,13 @@ var EuiCheckableCard = function EuiCheckableCard(_ref) {
|
|
|
85
90
|
}, checkableElement), (0, _react2.jsx)(_panel.EuiSplitPanel.Inner, null, (0, _react2.jsx)("label", {
|
|
86
91
|
ref: labelEl,
|
|
87
92
|
className: labelClasses,
|
|
93
|
+
css: labelStyles,
|
|
88
94
|
htmlFor: id,
|
|
89
95
|
"aria-describedby": children ? "".concat(id, "-details") : undefined
|
|
90
96
|
}, label), children && (0, _react2.jsx)("div", {
|
|
91
97
|
id: "".concat(id, "-details"),
|
|
92
|
-
className: "euiCheckableCard__children"
|
|
98
|
+
className: "euiCheckableCard__children",
|
|
99
|
+
css: childStyles
|
|
93
100
|
}, children)));
|
|
94
101
|
};
|
|
95
102
|
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.euiCheckableCardStyles = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = require("@emotion/react");
|
|
9
|
+
|
|
10
|
+
var _global_styling = require("../../../global_styling");
|
|
11
|
+
|
|
12
|
+
/*
|
|
13
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
14
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
15
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
16
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
17
|
+
* Side Public License, v 1.
|
|
18
|
+
*/
|
|
19
|
+
var euiCheckableCardStyles = function euiCheckableCardStyles(euiThemeContext) {
|
|
20
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
21
|
+
var padding = (0, _global_styling.euiPaddingSize)(euiThemeContext, 'm');
|
|
22
|
+
return {
|
|
23
|
+
euiCheckableCard: /*#__PURE__*/(0, _react.css)(_global_styling.euiCanAnimate, "{transition:border-color ", euiTheme.animation.normal, " ease-in;};label:euiCheckableCard;"),
|
|
24
|
+
isChecked: /*#__PURE__*/(0, _react.css)("border-color:", euiTheme.colors.primary, ";;label:isChecked;"),
|
|
25
|
+
label: {
|
|
26
|
+
euiCheckableCard__label: /*#__PURE__*/(0, _react.css)("cursor:pointer;display:block;", _global_styling.logicals.width, ":calc(100% + (", padding, " * 2));padding:", padding, ";margin:-", padding, ";;label:euiCheckableCard__label;"),
|
|
27
|
+
isDisabled: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.disabledText, ";cursor:not-allowed;;label:isDisabled;")
|
|
28
|
+
},
|
|
29
|
+
euiCheckableCard__children: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('margin-top', euiTheme.size.base), ";;label:euiCheckableCard__children;")
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
exports.euiCheckableCardStyles = euiCheckableCardStyles;
|
|
@@ -56,7 +56,7 @@ var euiCommentEventHeaderStyles = function euiCommentEventHeaderStyles(_ref5) {
|
|
|
56
56
|
return {
|
|
57
57
|
euiCommentEvent__header: /*#__PURE__*/(0, _react.css)(";label:euiCommentEvent__header;"),
|
|
58
58
|
// types
|
|
59
|
-
regular: /*#__PURE__*/(0, _react.css)("background:", euiTheme.colors.lightestShade, ";border-bottom
|
|
59
|
+
regular: /*#__PURE__*/(0, _react.css)("background:", euiTheme.colors.lightestShade, ";", (0, _global_styling.logicalCSS)('border-bottom', euiTheme.border.thin), " padding:", euiTheme.size.s, ";;label:regular;"),
|
|
60
60
|
// variants
|
|
61
61
|
hasEventColor: _ref2,
|
|
62
62
|
// Children
|