@elastic/eui 64.0.1 → 65.0.0
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 +160 -1248
- 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 +132 -1220
- 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/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/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/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/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/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/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/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/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/expression/expression.styles.js +13 -31
- package/optimize/es/components/facet/facet_button.js +5 -3
- 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/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/expression/expression.styles.js +12 -30
- package/optimize/lib/components/facet/facet_button.js +4 -2
- 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/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/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/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/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/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
|
@@ -47,7 +47,7 @@ var _resize_observer = require("../observer/resize_observer");
|
|
|
47
47
|
|
|
48
48
|
var _react3 = require("@emotion/react");
|
|
49
49
|
|
|
50
|
-
var _excluded = ["children", "className", "anchorClassName", "content", "title", "delay", "display"];
|
|
50
|
+
var _excluded = ["children", "className", "anchorClassName", "anchorProps", "content", "title", "delay", "display"];
|
|
51
51
|
|
|
52
52
|
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); }
|
|
53
53
|
|
|
@@ -270,6 +270,7 @@ var EuiToolTip = /*#__PURE__*/function (_Component) {
|
|
|
270
270
|
children = _this$props.children,
|
|
271
271
|
className = _this$props.className,
|
|
272
272
|
anchorClassName = _this$props.anchorClassName,
|
|
273
|
+
anchorProps = _this$props.anchorProps,
|
|
273
274
|
content = _this$props.content,
|
|
274
275
|
title = _this$props.title,
|
|
275
276
|
delay = _this$props.delay,
|
|
@@ -281,7 +282,7 @@ var EuiToolTip = /*#__PURE__*/function (_Component) {
|
|
|
281
282
|
toolTipStyles = _this$state.toolTipStyles,
|
|
282
283
|
visible = _this$state.visible;
|
|
283
284
|
var classes = (0, _classnames.default)('euiToolTip', positionsToClassNameMap[this.state.calculatedPosition], className);
|
|
284
|
-
var anchorClasses = (0, _classnames.default)('euiToolTipAnchor', display ? displayToClassNameMap[display] : null, anchorClassName);
|
|
285
|
+
var anchorClasses = (0, _classnames.default)('euiToolTipAnchor', display ? displayToClassNameMap[display] : null, anchorClassName, anchorProps === null || anchorProps === void 0 ? void 0 : anchorProps.className);
|
|
285
286
|
var tooltip;
|
|
286
287
|
|
|
287
288
|
if (visible && (content || title)) {
|
|
@@ -306,14 +307,15 @@ var EuiToolTip = /*#__PURE__*/function (_Component) {
|
|
|
306
307
|
}
|
|
307
308
|
|
|
308
309
|
var anchor = // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
|
|
309
|
-
(0, _react3.jsx)("span", {
|
|
310
|
+
(0, _react3.jsx)("span", (0, _extends2.default)({
|
|
310
311
|
ref: function ref(anchor) {
|
|
311
312
|
return _this2.anchor = anchor;
|
|
312
|
-
}
|
|
313
|
+
}
|
|
314
|
+
}, anchorProps, {
|
|
313
315
|
className: anchorClasses,
|
|
314
316
|
onMouseOver: this.showToolTip,
|
|
315
317
|
onMouseOut: this.onMouseOut
|
|
316
|
-
}, /*#__PURE__*/(0, _react.cloneElement)(children, _objectSpread({
|
|
318
|
+
}), /*#__PURE__*/(0, _react.cloneElement)(children, _objectSpread({
|
|
317
319
|
onFocus: function onFocus(e) {
|
|
318
320
|
_this2.onFocus();
|
|
319
321
|
|
|
@@ -341,10 +343,20 @@ exports.EuiToolTip = EuiToolTip;
|
|
|
341
343
|
});
|
|
342
344
|
EuiToolTip.propTypes = {
|
|
343
345
|
/**
|
|
344
|
-
* Passes onto the the trigger.
|
|
346
|
+
* Passes onto the span wrapping the trigger.
|
|
345
347
|
*/
|
|
346
348
|
anchorClassName: _propTypes.default.string,
|
|
347
349
|
|
|
350
|
+
/**
|
|
351
|
+
* Passes onto the span wrapping the trigger.
|
|
352
|
+
*/
|
|
353
|
+
anchorProps: _propTypes.default.shape({
|
|
354
|
+
className: _propTypes.default.string,
|
|
355
|
+
"aria-label": _propTypes.default.string,
|
|
356
|
+
"data-test-subj": _propTypes.default.string,
|
|
357
|
+
css: _propTypes.default.any
|
|
358
|
+
}),
|
|
359
|
+
|
|
348
360
|
/**
|
|
349
361
|
* The in-view trigger for your tooltip.
|
|
350
362
|
*/
|
|
@@ -11,9 +11,15 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
11
11
|
|
|
12
12
|
var _common = require("../../components/common");
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
var _logicals = _interopRequireDefault(require("./logicals.json"));
|
|
15
|
+
|
|
16
|
+
/*
|
|
17
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
18
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
19
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
20
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
21
|
+
* Side Public License, v 1.
|
|
22
|
+
*/
|
|
17
23
|
|
|
18
24
|
/**
|
|
19
25
|
* EUI utilizes logical CSS properties to enable directional writing-modes.
|
|
@@ -32,76 +38,7 @@ var logicalSide = {
|
|
|
32
38
|
exports.logicalSide = logicalSide;
|
|
33
39
|
var LOGICAL_SIDES = (0, _common.keysOf)(logicalSide);
|
|
34
40
|
exports.LOGICAL_SIDES = LOGICAL_SIDES;
|
|
35
|
-
var
|
|
36
|
-
'margin-left': 'margin-inline-start',
|
|
37
|
-
'margin-right': 'margin-inline-end',
|
|
38
|
-
'margin-top': 'margin-block-start',
|
|
39
|
-
'margin-bottom': 'margin-block-end',
|
|
40
|
-
'margin-horizontal': 'margin-inline',
|
|
41
|
-
'margin-vertical': 'margin-block'
|
|
42
|
-
};
|
|
43
|
-
var logicalPaddings = {
|
|
44
|
-
'padding-left': 'padding-inline-start',
|
|
45
|
-
'padding-right': 'padding-inline-end',
|
|
46
|
-
'padding-top': 'padding-block-start',
|
|
47
|
-
'padding-bottom': 'padding-block-end',
|
|
48
|
-
'padding-horizontal': 'padding-inline',
|
|
49
|
-
'padding-vertical': 'padding-block'
|
|
50
|
-
};
|
|
51
|
-
var logicalPosition = {
|
|
52
|
-
top: 'inset-block-start',
|
|
53
|
-
right: 'inset-inline-end',
|
|
54
|
-
bottom: 'inset-block-end',
|
|
55
|
-
left: 'inset-inline-start',
|
|
56
|
-
horizontal: 'inset-block',
|
|
57
|
-
vertical: 'inset-inline',
|
|
58
|
-
inset: 'inset'
|
|
59
|
-
};
|
|
60
|
-
var logicalSize = {
|
|
61
|
-
height: 'block-size',
|
|
62
|
-
width: 'inline-size',
|
|
63
|
-
'max-height': 'max-block-size',
|
|
64
|
-
'max-width': 'max-inline-size',
|
|
65
|
-
'min-height': 'min-block-size',
|
|
66
|
-
'min-width': 'min-inline-size'
|
|
67
|
-
};
|
|
68
|
-
var logicalOverflow = {
|
|
69
|
-
'overflow-x': 'overflow-inline',
|
|
70
|
-
'overflow-y': 'overflow-block'
|
|
71
|
-
};
|
|
72
|
-
var logicalBorders = {
|
|
73
|
-
'border-horizontal': 'border-inline',
|
|
74
|
-
'border-horizontal-color': 'border-inline-color',
|
|
75
|
-
'border-horizontal-width': 'border-inline-width',
|
|
76
|
-
'border-horizontal-style': 'border-inline-style',
|
|
77
|
-
'border-vertical': 'border-block',
|
|
78
|
-
'border-vertical-color': 'border-block-color',
|
|
79
|
-
'border-vertical-width': 'border-block-width',
|
|
80
|
-
'border-vertical-style': 'border-block-style',
|
|
81
|
-
'border-bottom': 'border-block-end',
|
|
82
|
-
'border-bottom-color': 'border-block-end-color',
|
|
83
|
-
'border-bottom-style': 'border-block-end-style',
|
|
84
|
-
'border-bottom-width': 'border-block-end-width',
|
|
85
|
-
'border-top': 'border-block-start',
|
|
86
|
-
'border-top-color': 'border-block-start-color',
|
|
87
|
-
'border-top-style': 'border-block-start-style',
|
|
88
|
-
'border-top-width': 'border-block-start-width',
|
|
89
|
-
'border-right': 'border-inline-end',
|
|
90
|
-
'border-right-color': 'border-inline-end-color',
|
|
91
|
-
'border-right-style': 'border-inline-end-style',
|
|
92
|
-
'border-right-width': 'border-inline-end-width',
|
|
93
|
-
'border-left': 'border-inline-start',
|
|
94
|
-
'border-left-color': 'border-inline-start-color',
|
|
95
|
-
'border-left-style': 'border-inline-start-style',
|
|
96
|
-
'border-left-width': 'border-inline-start-width',
|
|
97
|
-
'border-top-left-radius': 'border-start-start-radius',
|
|
98
|
-
'border-top-right-radius': 'border-start-end-radius',
|
|
99
|
-
'border-bottom-left-radius': 'border-end-start-radius',
|
|
100
|
-
'border-bottom-right-radius': 'border-end-end-radius'
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
var logicals = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, logicalMargins), logicalPaddings), logicalPosition), logicalSize), logicalOverflow), logicalBorders);
|
|
104
|
-
|
|
41
|
+
var logicals = _logicals.default;
|
|
105
42
|
exports.logicals = logicals;
|
|
106
43
|
var LOGICAL_PROPERTIES = (0, _common.keysOf)(logicals);
|
|
107
44
|
exports.LOGICAL_PROPERTIES = LOGICAL_PROPERTIES;
|
|
@@ -7,6 +7,8 @@ exports.euiFontSizeFromScale = euiFontSizeFromScale;
|
|
|
7
7
|
exports.euiLineHeightFromBaseline = euiLineHeightFromBaseline;
|
|
8
8
|
exports.euiTextShift = void 0;
|
|
9
9
|
|
|
10
|
+
var _logicals = require("./logicals");
|
|
11
|
+
|
|
10
12
|
/*
|
|
11
13
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
12
14
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -93,7 +95,7 @@ var euiTextShift = function euiTextShift() {
|
|
|
93
95
|
var fontWeight = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'bold';
|
|
94
96
|
var attribute = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'data-text';
|
|
95
97
|
var euiTheme = arguments.length > 2 ? arguments[2] : undefined;
|
|
96
|
-
return "\n &::after {\n display: block;\n content: attr(".concat(attribute, ");\n font-weight: ").concat(euiTheme.font.weight[fontWeight], ";\n height
|
|
98
|
+
return "\n &::after {\n display: block;\n content: attr(".concat(attribute, ");\n font-weight: ").concat(euiTheme.font.weight[fontWeight], ";\n ").concat((0, _logicals.logicalCSS)('height', 0), "\n overflow: hidden;\n visibility: hidden;\n }");
|
|
97
99
|
};
|
|
98
100
|
|
|
99
101
|
exports.euiTextShift = euiTextShift;
|
|
@@ -32,7 +32,7 @@ var euiBackgroundColor = function euiBackgroundColor(_ref, color) {
|
|
|
32
32
|
if (color === 'plain') {
|
|
33
33
|
return (0, _services.transparentize)(euiTheme.colors.ghost, 0.2);
|
|
34
34
|
} else if (color === 'subdued') {
|
|
35
|
-
return (0, _services.transparentize)(euiTheme.colors.lightShade, 0.2);
|
|
35
|
+
return colorMode === 'DARK' ? (0, _services.transparentize)(euiTheme.colors.lightShade, 0.4) : (0, _services.transparentize)(euiTheme.colors.lightShade, 0.2);
|
|
36
36
|
} else {
|
|
37
37
|
return (0, _services.transparentize)(euiTheme.colors[color], 0.1);
|
|
38
38
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.useEuiYScrollWithShadows = exports.useEuiYScroll = exports.useEuiXScrollWithShadows = exports.useEuiXScroll = exports.useEuiScrollBar = exports.useEuiOverflowScroll = exports.euiYScrollWithShadows = exports.euiYScroll = exports.euiXScrollWithShadows = exports.euiXScroll = exports.euiScrollBarStyles = exports.euiOverflowScroll = exports.euiFullHeight = void 0;
|
|
6
|
+
exports.useEuiYScrollWithShadows = exports.useEuiYScroll = exports.useEuiXScrollWithShadows = exports.useEuiXScroll = exports.useEuiScrollBar = exports.useEuiOverflowScroll = exports.euiYScrollWithShadows = exports.euiYScroll = exports.euiXScrollWithShadows = exports.euiXScroll = exports.euiSupportsHas = exports.euiScrollBarStyles = exports.euiOverflowScroll = exports.euiFullHeight = void 0;
|
|
7
7
|
|
|
8
8
|
var _theme = require("../../services/theme");
|
|
9
9
|
|
|
@@ -207,5 +207,12 @@ exports.useEuiOverflowScroll = useEuiOverflowScroll;
|
|
|
207
207
|
var euiFullHeight = function euiFullHeight() {
|
|
208
208
|
return "\n ".concat((0, _functions.logicalCSS)('height', '100%'), "\n flex: 1 1 auto;\n overflow: hidden;\n");
|
|
209
209
|
};
|
|
210
|
+
/**
|
|
211
|
+
* A constant storing the support for the `:has()` selector through a
|
|
212
|
+
* media query that will only apply the content it is supported.
|
|
213
|
+
*/
|
|
214
|
+
|
|
210
215
|
|
|
211
|
-
exports.euiFullHeight = euiFullHeight;
|
|
216
|
+
exports.euiFullHeight = euiFullHeight;
|
|
217
|
+
var euiSupportsHas = '@supports(selector(:has(p)))';
|
|
218
|
+
exports.euiSupportsHas = euiSupportsHas;
|
|
@@ -15,6 +15,8 @@ var _react2 = require("@emotion/react");
|
|
|
15
15
|
|
|
16
16
|
var _mixins = require("../mixins");
|
|
17
17
|
|
|
18
|
+
var _functions = require("../functions");
|
|
19
|
+
|
|
18
20
|
var _color = require("../../services/color");
|
|
19
21
|
|
|
20
22
|
var _theme = require("../../services/theme");
|
|
@@ -55,7 +57,7 @@ var EuiGlobalStyles = function EuiGlobalStyles(_ref) {
|
|
|
55
57
|
* Final styles
|
|
56
58
|
*/
|
|
57
59
|
|
|
58
|
-
var styles = /*#__PURE__*/(0, _react2.css)(_reset.resetStyles, " html{", scrollbarStyles, " ", fontReset, " text-size-adjust:100%;font-kerning:normal;height
|
|
60
|
+
var styles = /*#__PURE__*/(0, _react2.css)(_reset.resetStyles, " html{", scrollbarStyles, " ", fontReset, " text-size-adjust:100%;font-kerning:normal;", (0, _functions.logicalCSS)('height', '100%'), " background-color:", colors.body, ";color:", colors.text, ";}code,pre,kbd,samp{font-family:", font.familyCode, ";}input,textarea,select{", fontReset, ";}button{font-family:", font.family, ";}em{font-style:italic;}strong{font-weight:", font.weight.bold, ";}*:focus{", (0, _mixins.euiFocusRing)(euiThemeContext), ";}::selection{background:", (0, _color.transparentize)(colors.primary, colorMode === 'LIGHT' ? 0.1 : 0.2), ";}a{color:", colors.primaryText, ";&,&:hover,&:focus{text-decoration:none;}}.euiBody-hasPortalContent{position:relative;};label:styles;");
|
|
59
61
|
return (0, _react2.jsx)(_react2.Global, {
|
|
60
62
|
styles: styles
|
|
61
63
|
});
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
|
-
exports.useEuiButtonColorCSS = exports.euiButtonColor = exports.BUTTON_COLORS = void 0;
|
|
8
|
+
exports.useEuiButtonRadiusCSS = exports.useEuiButtonFocusCSS = exports.useEuiButtonColorCSS = exports.euiButtonFillColor = exports.euiButtonEmptyColor = exports.euiButtonColor = exports.BUTTON_COLORS = void 0;
|
|
9
|
+
|
|
10
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
7
11
|
|
|
8
12
|
var _react = require("@emotion/react");
|
|
9
13
|
|
|
14
|
+
var _global_styling = require("../../../../global_styling");
|
|
15
|
+
|
|
10
16
|
var _services = require("../../../../services");
|
|
11
17
|
|
|
12
18
|
/*
|
|
@@ -16,42 +22,189 @@ var _services = require("../../../../services");
|
|
|
16
22
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
17
23
|
* Side Public License, v 1.
|
|
18
24
|
*/
|
|
19
|
-
var BUTTON_COLORS = ['text', 'accent', 'primary', 'success', 'warning', 'danger'
|
|
25
|
+
var BUTTON_COLORS = ['text', 'accent', 'primary', 'success', 'warning', 'danger'];
|
|
20
26
|
exports.BUTTON_COLORS = BUTTON_COLORS;
|
|
21
27
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Creates the `base` version of button styles with proper text contrast.
|
|
30
|
+
* @param euiThemeContext
|
|
31
|
+
* @param color One of the named button colors or 'disabled'
|
|
32
|
+
* @returns Style object `{ backgroundColor, color }`
|
|
33
|
+
*/
|
|
34
|
+
var euiButtonColor = function euiButtonColor(euiThemeContext, color) {
|
|
35
|
+
var euiTheme = euiThemeContext.euiTheme,
|
|
36
|
+
colorMode = euiThemeContext.colorMode;
|
|
25
37
|
|
|
26
38
|
function tintOrShade(color) {
|
|
27
39
|
return colorMode === 'DARK' ? (0, _services.shade)(color, 0.7) : (0, _services.tint)(color, 0.8);
|
|
28
40
|
}
|
|
29
41
|
|
|
42
|
+
var foreground;
|
|
43
|
+
var background;
|
|
44
|
+
|
|
30
45
|
switch (color) {
|
|
31
46
|
case 'disabled':
|
|
32
|
-
return
|
|
47
|
+
return {
|
|
48
|
+
color: euiTheme.colors.disabledText,
|
|
49
|
+
backgroundColor: (0, _services.transparentize)(euiTheme.colors.lightShade, 0.15)
|
|
50
|
+
};
|
|
33
51
|
|
|
34
52
|
case 'text':
|
|
35
|
-
|
|
53
|
+
foreground = euiTheme.colors[color];
|
|
54
|
+
background = colorMode === 'DARK' ? (0, _services.shade)(euiTheme.colors.lightShade, 0.2) : (0, _services.tint)(euiTheme.colors.lightShade, 0.5);
|
|
55
|
+
break;
|
|
36
56
|
|
|
37
57
|
default:
|
|
38
|
-
|
|
58
|
+
foreground = euiTheme.colors["".concat(color, "Text")];
|
|
59
|
+
background = tintOrShade(euiTheme.colors[color]);
|
|
60
|
+
break;
|
|
39
61
|
}
|
|
62
|
+
|
|
63
|
+
return {
|
|
64
|
+
color: (0, _services.makeHighContrastColor)(foreground)(background),
|
|
65
|
+
backgroundColor: background
|
|
66
|
+
};
|
|
40
67
|
};
|
|
68
|
+
/**
|
|
69
|
+
* Creates the `fill` version of buttons styles with proper text contrast.
|
|
70
|
+
* @param euiThemeContext
|
|
71
|
+
* @param color One of the named button colors or 'disabled'
|
|
72
|
+
* @returns Style object `{ backgroundColor, color }`
|
|
73
|
+
*/
|
|
74
|
+
|
|
41
75
|
|
|
42
76
|
exports.euiButtonColor = euiButtonColor;
|
|
43
77
|
|
|
78
|
+
var euiButtonFillColor = function euiButtonFillColor(euiThemeContext, color) {
|
|
79
|
+
var euiTheme = euiThemeContext.euiTheme,
|
|
80
|
+
colorMode = euiThemeContext.colorMode;
|
|
81
|
+
var background;
|
|
82
|
+
var foreground;
|
|
83
|
+
|
|
84
|
+
switch (color) {
|
|
85
|
+
case 'disabled':
|
|
86
|
+
background = euiButtonColor(euiThemeContext, color).backgroundColor;
|
|
87
|
+
foreground = euiButtonColor(euiThemeContext, color).color;
|
|
88
|
+
break;
|
|
89
|
+
|
|
90
|
+
case 'text':
|
|
91
|
+
background = colorMode === 'DARK' ? euiTheme.colors.text : euiTheme.colors.darkShade;
|
|
92
|
+
foreground = _services.isColorDark.apply(void 0, (0, _toConsumableArray2.default)((0, _services.hexToRgb)(background))) ? euiTheme.colors.ghost : euiTheme.colors.ink;
|
|
93
|
+
break;
|
|
94
|
+
|
|
95
|
+
default:
|
|
96
|
+
background = euiTheme.colors[color];
|
|
97
|
+
foreground = _services.isColorDark.apply(void 0, (0, _toConsumableArray2.default)((0, _services.hexToRgb)(euiTheme.colors[color]))) ? euiTheme.colors.ghost : euiTheme.colors.ink;
|
|
98
|
+
break;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return {
|
|
102
|
+
color: foreground,
|
|
103
|
+
backgroundColor: background
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* Creates the `empty` version of button styles using the text-variant and adding interactive styles.
|
|
108
|
+
* @param euiThemeContext
|
|
109
|
+
* @param color One of the named button colors or 'disabled'
|
|
110
|
+
* @returns Style object `{ backgroundColor, color }` where `background` is typically used for interactive states
|
|
111
|
+
*/
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
exports.euiButtonFillColor = euiButtonFillColor;
|
|
115
|
+
|
|
116
|
+
var euiButtonEmptyColor = function euiButtonEmptyColor(euiThemeContext, color) {
|
|
117
|
+
var foreground;
|
|
118
|
+
var background;
|
|
119
|
+
|
|
120
|
+
switch (color) {
|
|
121
|
+
case 'disabled':
|
|
122
|
+
foreground = euiButtonColor(euiThemeContext, color).color;
|
|
123
|
+
background = 'transparent';
|
|
124
|
+
break;
|
|
125
|
+
|
|
126
|
+
case 'text':
|
|
127
|
+
foreground = euiButtonColor(euiThemeContext, color).color;
|
|
128
|
+
background = (0, _global_styling.euiBackgroundColor)(euiThemeContext, 'subdued', {
|
|
129
|
+
method: 'transparent'
|
|
130
|
+
});
|
|
131
|
+
break;
|
|
132
|
+
|
|
133
|
+
default:
|
|
134
|
+
foreground = euiButtonColor(euiThemeContext, color).color;
|
|
135
|
+
background = (0, _global_styling.euiBackgroundColor)(euiThemeContext, color, {
|
|
136
|
+
method: 'transparent'
|
|
137
|
+
});
|
|
138
|
+
break;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
return {
|
|
142
|
+
color: foreground,
|
|
143
|
+
backgroundColor: background
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
/**
|
|
147
|
+
* Given the button display type, returns the Emotion based color keys.
|
|
148
|
+
* @param options Button display type
|
|
149
|
+
* @returns An object of `_EuiButtonColor` keys including `disabled`
|
|
150
|
+
*/
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
exports.euiButtonEmptyColor = euiButtonEmptyColor;
|
|
154
|
+
|
|
44
155
|
var useEuiButtonColorCSS = function useEuiButtonColorCSS() {
|
|
45
|
-
var
|
|
156
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
157
|
+
var euiThemeContext = (0, _services.useEuiTheme)();
|
|
158
|
+
|
|
159
|
+
function stylesByDisplay(color) {
|
|
160
|
+
return {
|
|
161
|
+
base: /*#__PURE__*/(0, _react.css)(euiButtonColor(euiThemeContext, color), ";;label:base;"),
|
|
162
|
+
fill: /*#__PURE__*/(0, _react.css)(euiButtonFillColor(euiThemeContext, color), "outline-color:", euiThemeContext.colorMode === 'DARK' && color === 'text' ? 'currentColor' : euiThemeContext.euiTheme.colors.fullShade, ";;label:fill;"),
|
|
163
|
+
empty: /*#__PURE__*/(0, _react.css)("color:", euiButtonEmptyColor(euiThemeContext, color).color, ";&:focus,&:active{background-color:", euiButtonEmptyColor(euiThemeContext, color).backgroundColor, ";};label:empty;")
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
|
|
46
167
|
return {
|
|
47
|
-
text: /*#__PURE__*/(0, _react.css)(
|
|
48
|
-
accent: /*#__PURE__*/(0, _react.css)(
|
|
49
|
-
primary: /*#__PURE__*/(0, _react.css)(
|
|
50
|
-
success: /*#__PURE__*/(0, _react.css)(
|
|
51
|
-
warning: /*#__PURE__*/(0, _react.css)(
|
|
52
|
-
danger: /*#__PURE__*/(0, _react.css)(
|
|
53
|
-
disabled: /*#__PURE__*/(0, _react.css)(
|
|
168
|
+
text: /*#__PURE__*/(0, _react.css)(stylesByDisplay('text')[options.display || 'base'], ";label:text;"),
|
|
169
|
+
accent: /*#__PURE__*/(0, _react.css)(stylesByDisplay('accent')[options.display || 'base'], ";label:accent;"),
|
|
170
|
+
primary: /*#__PURE__*/(0, _react.css)(stylesByDisplay('primary')[options.display || 'base'], ";label:primary;"),
|
|
171
|
+
success: /*#__PURE__*/(0, _react.css)(stylesByDisplay('success')[options.display || 'base'], ";label:success;"),
|
|
172
|
+
warning: /*#__PURE__*/(0, _react.css)(stylesByDisplay('warning')[options.display || 'base'], ";label:warning;"),
|
|
173
|
+
danger: /*#__PURE__*/(0, _react.css)(stylesByDisplay('danger')[options.display || 'base'], ";label:danger;"),
|
|
174
|
+
disabled: /*#__PURE__*/(0, _react.css)(stylesByDisplay('disabled')[options.display || 'base'], ";label:disabled;")
|
|
54
175
|
};
|
|
55
176
|
};
|
|
177
|
+
/**
|
|
178
|
+
* Based on the button size, creates the style properties.
|
|
179
|
+
* @returns An object of button size keys with Emption styles for `border-radius`
|
|
180
|
+
*/
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
exports.useEuiButtonColorCSS = useEuiButtonColorCSS;
|
|
184
|
+
|
|
185
|
+
var useEuiButtonRadiusCSS = function useEuiButtonRadiusCSS() {
|
|
186
|
+
var _useEuiTheme = (0, _services.useEuiTheme)(),
|
|
187
|
+
euiTheme = _useEuiTheme.euiTheme;
|
|
188
|
+
|
|
189
|
+
return {
|
|
190
|
+
xs: /*#__PURE__*/(0, _react.css)("border-radius:", euiTheme.border.radius.small, ";;label:xs;"),
|
|
191
|
+
s: /*#__PURE__*/(0, _react.css)("border-radius:", euiTheme.border.radius.small, ";;label:s;"),
|
|
192
|
+
m: /*#__PURE__*/(0, _react.css)("border-radius:", euiTheme.border.radius.medium, ";;label:m;")
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
/**
|
|
196
|
+
* Creates the translate animation when button is in focus.
|
|
197
|
+
* @returns string
|
|
198
|
+
*/
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
exports.useEuiButtonRadiusCSS = useEuiButtonRadiusCSS;
|
|
202
|
+
|
|
203
|
+
var useEuiButtonFocusCSS = function useEuiButtonFocusCSS() {
|
|
204
|
+
var _useEuiTheme2 = (0, _services.useEuiTheme)(),
|
|
205
|
+
euiTheme = _useEuiTheme2.euiTheme;
|
|
206
|
+
|
|
207
|
+
return "\n ".concat(_global_styling.euiCanAnimate, " {\n transition: transform ").concat(euiTheme.animation.normal, " ease-in-out,\n background-color ").concat(euiTheme.animation.normal, " ease-in-out;\n\n &:hover:not(:disabled) {\n transform: translateY(-1px);\n }\n\n &:focus {\n animation: euiButtonActive ").concat(euiTheme.animation.normal, "\n ").concat(euiTheme.animation.bounce, ";\n }\n\n &:active:not(:disabled) {\n transform: translateY(1px);\n }\n }\n ");
|
|
208
|
+
};
|
|
56
209
|
|
|
57
|
-
exports.
|
|
210
|
+
exports.useEuiButtonFocusCSS = useEuiButtonFocusCSS;
|
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
var _excluded = ["className", "isSelected", "isDisabled", "color", "children"];
|
|
2
|
-
|
|
3
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
-
|
|
5
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
6
|
-
|
|
7
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
8
|
-
|
|
9
|
-
/*
|
|
10
|
-
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
11
|
-
* or more contributor license agreements. Licensed under the Elastic License
|
|
12
|
-
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
13
|
-
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
14
|
-
* Side Public License, v 1.
|
|
15
|
-
*/
|
|
16
|
-
import React from 'react';
|
|
17
|
-
import PropTypes from "prop-types";
|
|
18
|
-
import classNames from 'classnames';
|
|
19
|
-
import { EuiButtonEmpty } from '../button/button_empty';
|
|
20
|
-
import { EuiI18n } from '../i18n';
|
|
21
|
-
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
22
|
-
export var EuiCardSelect = function EuiCardSelect(_ref) {
|
|
23
|
-
var className = _ref.className,
|
|
24
|
-
_ref$isSelected = _ref.isSelected,
|
|
25
|
-
isSelected = _ref$isSelected === void 0 ? false : _ref$isSelected,
|
|
26
|
-
isDisabled = _ref.isDisabled,
|
|
27
|
-
color = _ref.color,
|
|
28
|
-
children = _ref.children,
|
|
29
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
30
|
-
|
|
31
|
-
var child = euiCardSelectableText(isSelected, isDisabled, children);
|
|
32
|
-
var selectClasses = classNames('euiCardSelect', "euiCardSelect--".concat(euiCardSelectableColor(color, isSelected)), className);
|
|
33
|
-
return ___EmotionJSX(EuiButtonEmpty, _extends({
|
|
34
|
-
className: selectClasses,
|
|
35
|
-
color: color || 'text',
|
|
36
|
-
size: "xs",
|
|
37
|
-
isDisabled: isDisabled,
|
|
38
|
-
iconType: isSelected ? 'check' : undefined,
|
|
39
|
-
role: "switch",
|
|
40
|
-
"aria-checked": isSelected
|
|
41
|
-
}, rest), child);
|
|
42
|
-
};
|
|
43
|
-
EuiCardSelect.propTypes = {
|
|
44
|
-
href: PropTypes.string,
|
|
45
|
-
onClick: PropTypes.func,
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Any of our named colors
|
|
49
|
-
*/
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Any of our named colors
|
|
53
|
-
*/
|
|
54
|
-
color: PropTypes.oneOf(["primary", "danger", "text", "ghost", "success", "warning"]),
|
|
55
|
-
size: PropTypes.oneOf(["xs", "s", "m"]),
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Ensure the text of the button sits flush to the left, right, or both sides of its container
|
|
59
|
-
*/
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Ensure the text of the button sits flush to the left, right, or both sides of its container
|
|
63
|
-
*/
|
|
64
|
-
flush: PropTypes.oneOf(["left", "right", "both"]),
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* `disabled` is also allowed
|
|
68
|
-
*/
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* `disabled` is also allowed
|
|
72
|
-
*/
|
|
73
|
-
isDisabled: PropTypes.bool,
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Force disables the button and changes the icon to a loading spinner
|
|
77
|
-
*/
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* Force disables the button and changes the icon to a loading spinner
|
|
81
|
-
*/
|
|
82
|
-
isLoading: PropTypes.bool,
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Is in the selected state
|
|
86
|
-
*/
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Applies the boolean state as the `aria-pressed` property to create a toggle button.
|
|
90
|
-
* *Only use when the readable text does not change between states.*
|
|
91
|
-
*/
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Applies the boolean state as the `aria-pressed` property to create a toggle button.
|
|
95
|
-
* *Only use when the readable text does not change between states.*
|
|
96
|
-
*/
|
|
97
|
-
isSelected: PropTypes.bool,
|
|
98
|
-
target: PropTypes.string,
|
|
99
|
-
rel: PropTypes.string,
|
|
100
|
-
type: PropTypes.oneOf(["button", "submit"]),
|
|
101
|
-
buttonRef: PropTypes.any,
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Object of props passed to the <span/> wrapping the button's content
|
|
105
|
-
*/
|
|
106
|
-
contentProps: PropTypes.any,
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* Any `type` accepted by EuiIcon
|
|
110
|
-
*/
|
|
111
|
-
iconType: PropTypes.oneOfType([PropTypes.oneOf(["accessibility", "addDataApp", "advancedSettingsApp", "agentApp", "aggregate", "alert", "analyzeEvent", "annotation", "apmApp", "apmTrace", "appSearchApp", "apps", "arrowDown", "arrowLeft", "arrowRight", "arrowUp", "arrowStart", "arrowEnd", "asterisk", "auditbeatApp", "beaker", "bell", "bellSlash", "bolt", "boxesHorizontal", "boxesVertical", "branch", "branchUser", "broom", "brush", "bug", "bullseye", "calendar", "canvasApp", "casesApp", "check", "checkInCircleFilled", "cheer", "classificationJob", "clock", "cloudDrizzle", "cloudStormy", "cloudSunny", "cluster", "codeApp", "color", "compute", "console", "consoleApp", "container", "continuityAbove", "continuityAboveBelow", "continuityBelow", "continuityWithin", "controlsHorizontal", "controlsVertical", "copy", "copyClipboard", "createAdvancedJob", "createMultiMetricJob", "createPopulationJob", "createSingleMetricJob", "cross", "crossClusterReplicationApp", "crossInACircleFilled", "crosshairs", "currency", "cut", "dashboardApp", "dataVisualizer", "database", "desktop", "devToolsApp", "discoverApp", "document", "documentEdit", "documentation", "documents", "dot", "doubleArrowLeft", "doubleArrowRight", "download", "editorAlignCenter", "editorAlignLeft", "editorAlignRight", "editorBold", "editorChecklist", "editorCodeBlock", "editorComment", "editorDistributeHorizontal", "editorDistributeVertical", "editorHeading", "editorItalic", "editorItemAlignBottom", "editorItemAlignCenter", "editorItemAlignLeft", "editorItemAlignMiddle", "editorItemAlignRight", "editorItemAlignTop", "editorLink", "editorOrderedList", "editorPositionBottomLeft", "editorPositionBottomRight", "editorPositionTopLeft", "editorPositionTopRight", "editorRedo", "editorStrike", "editorTable", "editorUnderline", "editorUndo", "editorUnorderedList", "email", "empty", "emsApp", "eql", "eraser", "exit", "expand", "expandMini", "exportAction", "eye", "eyeClosed", "faceHappy", "faceNeutral", "faceSad", "filebeatApp", "filter", "flag", "fleetApp", "fold", "folderCheck", "folderClosed", "folderExclamation", "folderOpen", "frameNext", "framePrevious", "fullScreen", "fullScreenExit", "function", "gear", "gisApp", "glasses", "globe", "grab", "grabHorizontal", "graphApp", "grid", "grokApp", "heart", "heartbeatApp", "heatmap", "help", "home", "iInCircle", "image", "importAction", "indexClose", "indexEdit", "indexFlush", "indexManagementApp", "indexMapping", "indexOpen", "indexPatternApp", "indexRollupApp", "indexRuntime", "indexSettings", "inputOutput", "inspect", "invert", "ip", "keyboard", "kqlField", "kqlFunction", "kqlOperand", "kqlSelector", "kqlValue", "kubernetesNode", "kubernetesPod", "layers", "lensApp", "lettering", "lineDashed", "lineDotted", "lineSolid", "link", "list", "listAdd", "lock", "lockOpen", "logoAWS", "logoAWSMono", "logoAerospike", "logoApache", "logoAppSearch", "logoAzure", "logoAzureMono", "logoBeats", "logoBusinessAnalytics", "logoCeph", "logoCloud", "logoCloudEnterprise", "logoCode", "logoCodesandbox", "logoCouchbase", "logoDocker", "logoDropwizard", "logoElastic", "logoElasticStack", "logoElasticsearch", "logoEnterpriseSearch", "logoEtcd", "logoGCP", "logoGCPMono", "logoGithub", "logoGmail", "logoGolang", "logoGoogleG", "logoHAproxy", "logoIBM", "logoIBMMono", "logoKafka", "logoKibana", "logoKubernetes", "logoLogging", "logoLogstash", "logoMaps", "logoMemcached", "logoMetrics", "logoMongodb", "logoMySQL", "logoNginx", "logoObservability", "logoOsquery", "logoPhp", "logoPostgres", "logoPrometheus", "logoRabbitmq", "logoRedis", "logoSecurity", "logoSiteSearch", "logoSketch", "logoSlack", "logoUptime", "logoWebhook", "logoWindows", "logoWorkplaceSearch", "logsApp", "logstashFilter", "logstashIf", "logstashInput", "logstashOutput", "logstashQueue", "machineLearningApp", "magnet", "magnifyWithExclamation", "magnifyWithMinus", "magnifyWithPlus", "managementApp", "mapMarker", "memory", "menu", "menuDown", "menuLeft", "menuRight", "menuUp", "merge", "metricbeatApp", "metricsApp", "minimize", "minus", "minusInCircle", "minusInCircleFilled", "mobile", "monitoringApp", "moon", "namespace", "nested", "node", "notebookApp", "number", "offline", "online", "outlierDetectionJob", "package", "packetbeatApp", "pageSelect", "pagesSelect", "paperClip", "partial", "pause", "payment", "pencil", "percent", "pin", "pinFilled", "pipelineApp", "play", "playFilled", "plus", "plusInCircle", "plusInCircleFilled", "popout", "push", "questionInCircle", "quote", "recentlyViewedApp", "refresh", "regressionJob", "reporter", "reportingApp", "returnKey", "save", "savedObjectsApp", "scale", "search", "searchProfilerApp", "securityAnalyticsApp", "securityApp", "securitySignal", "securitySignalDetected", "securitySignalResolved", "sessionViewer", "shard", "share", "snowflake", "sortDown", "sortLeft", "sortRight", "sortUp", "sortable", "spacesApp", "sqlApp", "starEmpty", "starEmptySpace", "starFilled", "starFilledSpace", "starMinusEmpty", "starMinusFilled", "starPlusEmpty", "starPlusFilled", "stats", "stop", "stopFilled", "stopSlash", "storage", "string", "submodule", "sun", "swatchInput", "symlink", "tableDensityCompact", "tableDensityExpanded", "tableDensityNormal", "tableOfContents", "tag", "tear", "temperature", "timeline", "timelionApp", "timeRefresh", "timeslider", "training", "trash", "unfold", "unlink", "upgradeAssistantApp", "uptimeApp", "user", "userAvatar", "users", "usersRolesApp", "vector", "videoPlayer", "visArea", "visAreaStacked", "visBarHorizontal", "visBarHorizontalStacked", "visBarVertical", "visBarVerticalStacked", "visGauge", "visGoal", "visLine", "visMapCoordinate", "visMapRegion", "visMetric", "visPie", "visTable", "visTagCloud", "visText", "visTimelion", "visVega", "visVisualBuilder", "visualizeApp", "watchesApp", "wordWrap", "wordWrapDisabled", "workplaceSearchApp", "wrench", "tokenAlias", "tokenAnnotation", "tokenArray", "tokenBinary", "tokenBoolean", "tokenClass", "tokenCompletionSuggester", "tokenConstant", "tokenDate", "tokenDenseVector", "tokenElement", "tokenEnum", "tokenEnumMember", "tokenEvent", "tokenException", "tokenField", "tokenFile", "tokenFlattened", "tokenFunction", "tokenGeo", "tokenHistogram", "tokenInterface", "tokenIP", "tokenJoin", "tokenKey", "tokenKeyword", "tokenMethod", "tokenMetricCounter", "tokenMetricGauge", "tokenModule", "tokenNamespace", "tokenNested", "tokenNull", "tokenNumber", "tokenObject", "tokenOperator", "tokenPackage", "tokenParameter", "tokenPercolator", "tokenProperty", "tokenRange", "tokenRankFeature", "tokenRankFeatures", "tokenRepo", "tokenSearchType", "tokenShape", "tokenString", "tokenStruct", "tokenSymbol", "tokenTag", "tokenText", "tokenTokenCount", "tokenVariable"]).isRequired, PropTypes.string.isRequired, PropTypes.elementType.isRequired]),
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* Can only be one side `left` or `right`
|
|
115
|
-
*/
|
|
116
|
-
iconSide: PropTypes.oneOf(["left", "right"]),
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* Object of props passed to the <span/> wrapping the content's text (only if the children is a `string`)
|
|
120
|
-
* It doesn't apply to the icon.
|
|
121
|
-
*/
|
|
122
|
-
textProps: PropTypes.shape({
|
|
123
|
-
className: PropTypes.string,
|
|
124
|
-
"aria-label": PropTypes.string,
|
|
125
|
-
"data-test-subj": PropTypes.string,
|
|
126
|
-
css: PropTypes.any,
|
|
127
|
-
ref: PropTypes.any,
|
|
128
|
-
"data-text": PropTypes.string
|
|
129
|
-
}),
|
|
130
|
-
iconSize: PropTypes.oneOf(["s", "m"]),
|
|
131
|
-
className: PropTypes.string,
|
|
132
|
-
"aria-label": PropTypes.string,
|
|
133
|
-
"data-test-subj": PropTypes.string,
|
|
134
|
-
css: PropTypes.any
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
function euiCardSelectableText(isSelected, isDisabled, children) {
|
|
138
|
-
if (children) {
|
|
139
|
-
return children;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
var text;
|
|
143
|
-
|
|
144
|
-
if (isSelected) {
|
|
145
|
-
text = ___EmotionJSX(EuiI18n, {
|
|
146
|
-
token: "euiCardSelect.selected",
|
|
147
|
-
default: "Selected"
|
|
148
|
-
});
|
|
149
|
-
} else if (isDisabled) {
|
|
150
|
-
text = ___EmotionJSX(EuiI18n, {
|
|
151
|
-
token: "euiCardSelect.unavailable",
|
|
152
|
-
default: "Unavailable"
|
|
153
|
-
});
|
|
154
|
-
} else {
|
|
155
|
-
text = ___EmotionJSX(EuiI18n, {
|
|
156
|
-
token: "euiCardSelect.select",
|
|
157
|
-
default: "Select"
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
return text;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
export function euiCardSelectableColor(color, isSelected) {
|
|
165
|
-
var calculatedColor;
|
|
166
|
-
|
|
167
|
-
if (color) {
|
|
168
|
-
calculatedColor = color;
|
|
169
|
-
} else if (isSelected) {
|
|
170
|
-
calculatedColor = 'success';
|
|
171
|
-
} else {
|
|
172
|
-
calculatedColor = 'text';
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
return calculatedColor;
|
|
176
|
-
}
|