@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
|
@@ -27,7 +27,7 @@ var _resize_observer = require("../observer/resize_observer");
|
|
|
27
27
|
|
|
28
28
|
var _react3 = require("@emotion/react");
|
|
29
29
|
|
|
30
|
-
var _excluded = ["children", "className", "anchorClassName", "content", "title", "delay", "display"];
|
|
30
|
+
var _excluded = ["children", "className", "anchorClassName", "anchorProps", "content", "title", "delay", "display"];
|
|
31
31
|
|
|
32
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
33
33
|
|
|
@@ -291,6 +291,7 @@ var EuiToolTip = /*#__PURE__*/function (_Component) {
|
|
|
291
291
|
children = _this$props.children,
|
|
292
292
|
className = _this$props.className,
|
|
293
293
|
anchorClassName = _this$props.anchorClassName,
|
|
294
|
+
anchorProps = _this$props.anchorProps,
|
|
294
295
|
content = _this$props.content,
|
|
295
296
|
title = _this$props.title,
|
|
296
297
|
delay = _this$props.delay,
|
|
@@ -303,7 +304,7 @@ var EuiToolTip = /*#__PURE__*/function (_Component) {
|
|
|
303
304
|
toolTipStyles = _this$state.toolTipStyles,
|
|
304
305
|
visible = _this$state.visible;
|
|
305
306
|
var classes = (0, _classnames.default)('euiToolTip', positionsToClassNameMap[this.state.calculatedPosition], className);
|
|
306
|
-
var anchorClasses = (0, _classnames.default)('euiToolTipAnchor', display ? displayToClassNameMap[display] : null, anchorClassName);
|
|
307
|
+
var anchorClasses = (0, _classnames.default)('euiToolTipAnchor', display ? displayToClassNameMap[display] : null, anchorClassName, anchorProps === null || anchorProps === void 0 ? void 0 : anchorProps.className);
|
|
307
308
|
var tooltip;
|
|
308
309
|
|
|
309
310
|
if (visible && (content || title)) {
|
|
@@ -328,14 +329,15 @@ var EuiToolTip = /*#__PURE__*/function (_Component) {
|
|
|
328
329
|
}
|
|
329
330
|
|
|
330
331
|
var anchor = // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
|
|
331
|
-
(0, _react3.jsx)("span", {
|
|
332
|
+
(0, _react3.jsx)("span", _extends({
|
|
332
333
|
ref: function ref(anchor) {
|
|
333
334
|
return _this2.anchor = anchor;
|
|
334
|
-
}
|
|
335
|
+
}
|
|
336
|
+
}, anchorProps, {
|
|
335
337
|
className: anchorClasses,
|
|
336
338
|
onMouseOver: this.showToolTip,
|
|
337
339
|
onMouseOut: this.onMouseOut
|
|
338
|
-
}, /*#__PURE__*/(0, _react.cloneElement)(children, _objectSpread({
|
|
340
|
+
}), /*#__PURE__*/(0, _react.cloneElement)(children, _objectSpread({
|
|
339
341
|
onFocus: function onFocus(e) {
|
|
340
342
|
_this2.onFocus();
|
|
341
343
|
|
|
@@ -366,10 +368,20 @@ _defineProperty(EuiToolTip, "defaultProps", {
|
|
|
366
368
|
|
|
367
369
|
EuiToolTip.propTypes = {
|
|
368
370
|
/**
|
|
369
|
-
* Passes onto the the trigger.
|
|
371
|
+
* Passes onto the span wrapping the trigger.
|
|
370
372
|
*/
|
|
371
373
|
anchorClassName: _propTypes.default.string,
|
|
372
374
|
|
|
375
|
+
/**
|
|
376
|
+
* Passes onto the span wrapping the trigger.
|
|
377
|
+
*/
|
|
378
|
+
anchorProps: _propTypes.default.shape({
|
|
379
|
+
className: _propTypes.default.string,
|
|
380
|
+
"aria-label": _propTypes.default.string,
|
|
381
|
+
"data-test-subj": _propTypes.default.string,
|
|
382
|
+
css: _propTypes.default.any
|
|
383
|
+
}),
|
|
384
|
+
|
|
373
385
|
/**
|
|
374
386
|
* The in-view trigger for your tooltip.
|
|
375
387
|
*/
|
|
@@ -7,9 +7,9 @@ exports.logicals = exports.logicalTextAlignStyle = exports.logicalTextAlignCSS =
|
|
|
7
7
|
|
|
8
8
|
var _common = require("../../components/common");
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
var _logicals = _interopRequireDefault(require("./logicals.json"));
|
|
11
11
|
|
|
12
|
-
function
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
|
|
14
14
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
15
15
|
|
|
@@ -30,76 +30,7 @@ var logicalSide = {
|
|
|
30
30
|
exports.logicalSide = logicalSide;
|
|
31
31
|
var LOGICAL_SIDES = (0, _common.keysOf)(logicalSide);
|
|
32
32
|
exports.LOGICAL_SIDES = LOGICAL_SIDES;
|
|
33
|
-
var
|
|
34
|
-
'margin-left': 'margin-inline-start',
|
|
35
|
-
'margin-right': 'margin-inline-end',
|
|
36
|
-
'margin-top': 'margin-block-start',
|
|
37
|
-
'margin-bottom': 'margin-block-end',
|
|
38
|
-
'margin-horizontal': 'margin-inline',
|
|
39
|
-
'margin-vertical': 'margin-block'
|
|
40
|
-
};
|
|
41
|
-
var logicalPaddings = {
|
|
42
|
-
'padding-left': 'padding-inline-start',
|
|
43
|
-
'padding-right': 'padding-inline-end',
|
|
44
|
-
'padding-top': 'padding-block-start',
|
|
45
|
-
'padding-bottom': 'padding-block-end',
|
|
46
|
-
'padding-horizontal': 'padding-inline',
|
|
47
|
-
'padding-vertical': 'padding-block'
|
|
48
|
-
};
|
|
49
|
-
var logicalPosition = {
|
|
50
|
-
top: 'inset-block-start',
|
|
51
|
-
right: 'inset-inline-end',
|
|
52
|
-
bottom: 'inset-block-end',
|
|
53
|
-
left: 'inset-inline-start',
|
|
54
|
-
horizontal: 'inset-block',
|
|
55
|
-
vertical: 'inset-inline',
|
|
56
|
-
inset: 'inset'
|
|
57
|
-
};
|
|
58
|
-
var logicalSize = {
|
|
59
|
-
height: 'block-size',
|
|
60
|
-
width: 'inline-size',
|
|
61
|
-
'max-height': 'max-block-size',
|
|
62
|
-
'max-width': 'max-inline-size',
|
|
63
|
-
'min-height': 'min-block-size',
|
|
64
|
-
'min-width': 'min-inline-size'
|
|
65
|
-
};
|
|
66
|
-
var logicalOverflow = {
|
|
67
|
-
'overflow-x': 'overflow-inline',
|
|
68
|
-
'overflow-y': 'overflow-block'
|
|
69
|
-
};
|
|
70
|
-
var logicalBorders = {
|
|
71
|
-
'border-horizontal': 'border-inline',
|
|
72
|
-
'border-horizontal-color': 'border-inline-color',
|
|
73
|
-
'border-horizontal-width': 'border-inline-width',
|
|
74
|
-
'border-horizontal-style': 'border-inline-style',
|
|
75
|
-
'border-vertical': 'border-block',
|
|
76
|
-
'border-vertical-color': 'border-block-color',
|
|
77
|
-
'border-vertical-width': 'border-block-width',
|
|
78
|
-
'border-vertical-style': 'border-block-style',
|
|
79
|
-
'border-bottom': 'border-block-end',
|
|
80
|
-
'border-bottom-color': 'border-block-end-color',
|
|
81
|
-
'border-bottom-style': 'border-block-end-style',
|
|
82
|
-
'border-bottom-width': 'border-block-end-width',
|
|
83
|
-
'border-top': 'border-block-start',
|
|
84
|
-
'border-top-color': 'border-block-start-color',
|
|
85
|
-
'border-top-style': 'border-block-start-style',
|
|
86
|
-
'border-top-width': 'border-block-start-width',
|
|
87
|
-
'border-right': 'border-inline-end',
|
|
88
|
-
'border-right-color': 'border-inline-end-color',
|
|
89
|
-
'border-right-style': 'border-inline-end-style',
|
|
90
|
-
'border-right-width': 'border-inline-end-width',
|
|
91
|
-
'border-left': 'border-inline-start',
|
|
92
|
-
'border-left-color': 'border-inline-start-color',
|
|
93
|
-
'border-left-style': 'border-inline-start-style',
|
|
94
|
-
'border-left-width': 'border-inline-start-width',
|
|
95
|
-
'border-top-left-radius': 'border-start-start-radius',
|
|
96
|
-
'border-top-right-radius': 'border-start-end-radius',
|
|
97
|
-
'border-bottom-left-radius': 'border-end-start-radius',
|
|
98
|
-
'border-bottom-right-radius': 'border-end-end-radius'
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
var logicals = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, logicalMargins), logicalPaddings), logicalPosition), logicalSize), logicalOverflow), logicalBorders);
|
|
102
|
-
|
|
33
|
+
var logicals = _logicals.default;
|
|
103
34
|
exports.logicals = logicals;
|
|
104
35
|
var LOGICAL_PROPERTIES = (0, _common.keysOf)(logicals);
|
|
105
36
|
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;
|
|
@@ -11,6 +11,8 @@ var _react2 = require("@emotion/react");
|
|
|
11
11
|
|
|
12
12
|
var _mixins = require("../mixins");
|
|
13
13
|
|
|
14
|
+
var _functions = require("../functions");
|
|
15
|
+
|
|
14
16
|
var _color = require("../../services/color");
|
|
15
17
|
|
|
16
18
|
var _theme = require("../../services/theme");
|
|
@@ -49,7 +51,7 @@ var EuiGlobalStyles = function EuiGlobalStyles(_ref) {
|
|
|
49
51
|
* Final styles
|
|
50
52
|
*/
|
|
51
53
|
|
|
52
|
-
var styles = /*#__PURE__*/(0, _react2.css)(_reset.resetStyles, " html{", scrollbarStyles, " ", fontReset, " text-size-adjust:100%;font-kerning:normal;height
|
|
54
|
+
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;");
|
|
53
55
|
return (0, _react2.jsx)(_react2.Global, {
|
|
54
56
|
styles: styles
|
|
55
57
|
});
|
|
@@ -3,55 +3,209 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.useEuiButtonColorCSS = exports.euiButtonColor = exports.BUTTON_COLORS = void 0;
|
|
6
|
+
exports.useEuiButtonRadiusCSS = exports.useEuiButtonFocusCSS = exports.useEuiButtonColorCSS = exports.euiButtonFillColor = exports.euiButtonEmptyColor = exports.euiButtonColor = exports.BUTTON_COLORS = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = require("@emotion/react");
|
|
9
9
|
|
|
10
|
+
var _global_styling = require("../../../../global_styling");
|
|
11
|
+
|
|
10
12
|
var _services = require("../../../../services");
|
|
11
13
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
15
|
+
|
|
16
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
17
|
+
|
|
18
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
19
|
+
|
|
20
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
21
|
+
|
|
22
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
23
|
+
|
|
24
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
25
|
+
|
|
26
|
+
var BUTTON_COLORS = ['text', 'accent', 'primary', 'success', 'warning', 'danger'];
|
|
20
27
|
exports.BUTTON_COLORS = BUTTON_COLORS;
|
|
21
28
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
29
|
+
/**
|
|
30
|
+
* Creates the `base` version of button styles with proper text contrast.
|
|
31
|
+
* @param euiThemeContext
|
|
32
|
+
* @param color One of the named button colors or 'disabled'
|
|
33
|
+
* @returns Style object `{ backgroundColor, color }`
|
|
34
|
+
*/
|
|
35
|
+
var euiButtonColor = function euiButtonColor(euiThemeContext, color) {
|
|
36
|
+
var euiTheme = euiThemeContext.euiTheme,
|
|
37
|
+
colorMode = euiThemeContext.colorMode;
|
|
25
38
|
|
|
26
39
|
function tintOrShade(color) {
|
|
27
40
|
return colorMode === 'DARK' ? (0, _services.shade)(color, 0.7) : (0, _services.tint)(color, 0.8);
|
|
28
41
|
}
|
|
29
42
|
|
|
43
|
+
var foreground;
|
|
44
|
+
var background;
|
|
45
|
+
|
|
30
46
|
switch (color) {
|
|
31
47
|
case 'disabled':
|
|
32
|
-
return
|
|
48
|
+
return {
|
|
49
|
+
color: euiTheme.colors.disabledText,
|
|
50
|
+
backgroundColor: (0, _services.transparentize)(euiTheme.colors.lightShade, 0.15)
|
|
51
|
+
};
|
|
33
52
|
|
|
34
53
|
case 'text':
|
|
35
|
-
|
|
54
|
+
foreground = euiTheme.colors[color];
|
|
55
|
+
background = colorMode === 'DARK' ? (0, _services.shade)(euiTheme.colors.lightShade, 0.2) : (0, _services.tint)(euiTheme.colors.lightShade, 0.5);
|
|
56
|
+
break;
|
|
36
57
|
|
|
37
58
|
default:
|
|
38
|
-
|
|
59
|
+
foreground = euiTheme.colors["".concat(color, "Text")];
|
|
60
|
+
background = tintOrShade(euiTheme.colors[color]);
|
|
61
|
+
break;
|
|
39
62
|
}
|
|
63
|
+
|
|
64
|
+
return {
|
|
65
|
+
color: (0, _services.makeHighContrastColor)(foreground)(background),
|
|
66
|
+
backgroundColor: background
|
|
67
|
+
};
|
|
40
68
|
};
|
|
69
|
+
/**
|
|
70
|
+
* Creates the `fill` version of buttons styles with proper text contrast.
|
|
71
|
+
* @param euiThemeContext
|
|
72
|
+
* @param color One of the named button colors or 'disabled'
|
|
73
|
+
* @returns Style object `{ backgroundColor, color }`
|
|
74
|
+
*/
|
|
75
|
+
|
|
41
76
|
|
|
42
77
|
exports.euiButtonColor = euiButtonColor;
|
|
43
78
|
|
|
79
|
+
var euiButtonFillColor = function euiButtonFillColor(euiThemeContext, color) {
|
|
80
|
+
var euiTheme = euiThemeContext.euiTheme,
|
|
81
|
+
colorMode = euiThemeContext.colorMode;
|
|
82
|
+
var background;
|
|
83
|
+
var foreground;
|
|
84
|
+
|
|
85
|
+
switch (color) {
|
|
86
|
+
case 'disabled':
|
|
87
|
+
background = euiButtonColor(euiThemeContext, color).backgroundColor;
|
|
88
|
+
foreground = euiButtonColor(euiThemeContext, color).color;
|
|
89
|
+
break;
|
|
90
|
+
|
|
91
|
+
case 'text':
|
|
92
|
+
background = colorMode === 'DARK' ? euiTheme.colors.text : euiTheme.colors.darkShade;
|
|
93
|
+
foreground = _services.isColorDark.apply(void 0, _toConsumableArray((0, _services.hexToRgb)(background))) ? euiTheme.colors.ghost : euiTheme.colors.ink;
|
|
94
|
+
break;
|
|
95
|
+
|
|
96
|
+
default:
|
|
97
|
+
background = euiTheme.colors[color];
|
|
98
|
+
foreground = _services.isColorDark.apply(void 0, _toConsumableArray((0, _services.hexToRgb)(euiTheme.colors[color]))) ? euiTheme.colors.ghost : euiTheme.colors.ink;
|
|
99
|
+
break;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
return {
|
|
103
|
+
color: foreground,
|
|
104
|
+
backgroundColor: background
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* Creates the `empty` version of button styles using the text-variant and adding interactive styles.
|
|
109
|
+
* @param euiThemeContext
|
|
110
|
+
* @param color One of the named button colors or 'disabled'
|
|
111
|
+
* @returns Style object `{ backgroundColor, color }` where `background` is typically used for interactive states
|
|
112
|
+
*/
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
exports.euiButtonFillColor = euiButtonFillColor;
|
|
116
|
+
|
|
117
|
+
var euiButtonEmptyColor = function euiButtonEmptyColor(euiThemeContext, color) {
|
|
118
|
+
var foreground;
|
|
119
|
+
var background;
|
|
120
|
+
|
|
121
|
+
switch (color) {
|
|
122
|
+
case 'disabled':
|
|
123
|
+
foreground = euiButtonColor(euiThemeContext, color).color;
|
|
124
|
+
background = 'transparent';
|
|
125
|
+
break;
|
|
126
|
+
|
|
127
|
+
case 'text':
|
|
128
|
+
foreground = euiButtonColor(euiThemeContext, color).color;
|
|
129
|
+
background = (0, _global_styling.euiBackgroundColor)(euiThemeContext, 'subdued', {
|
|
130
|
+
method: 'transparent'
|
|
131
|
+
});
|
|
132
|
+
break;
|
|
133
|
+
|
|
134
|
+
default:
|
|
135
|
+
foreground = euiButtonColor(euiThemeContext, color).color;
|
|
136
|
+
background = (0, _global_styling.euiBackgroundColor)(euiThemeContext, color, {
|
|
137
|
+
method: 'transparent'
|
|
138
|
+
});
|
|
139
|
+
break;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
return {
|
|
143
|
+
color: foreground,
|
|
144
|
+
backgroundColor: background
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
/**
|
|
148
|
+
* Given the button display type, returns the Emotion based color keys.
|
|
149
|
+
* @param options Button display type
|
|
150
|
+
* @returns An object of `_EuiButtonColor` keys including `disabled`
|
|
151
|
+
*/
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
exports.euiButtonEmptyColor = euiButtonEmptyColor;
|
|
155
|
+
|
|
44
156
|
var useEuiButtonColorCSS = function useEuiButtonColorCSS() {
|
|
45
|
-
var
|
|
157
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
158
|
+
var euiThemeContext = (0, _services.useEuiTheme)();
|
|
159
|
+
|
|
160
|
+
function stylesByDisplay(color) {
|
|
161
|
+
return {
|
|
162
|
+
base: /*#__PURE__*/(0, _react.css)(euiButtonColor(euiThemeContext, color), ";;label:base;"),
|
|
163
|
+
fill: /*#__PURE__*/(0, _react.css)(euiButtonFillColor(euiThemeContext, color), "outline-color:", euiThemeContext.colorMode === 'DARK' && color === 'text' ? 'currentColor' : euiThemeContext.euiTheme.colors.fullShade, ";;label:fill;"),
|
|
164
|
+
empty: /*#__PURE__*/(0, _react.css)("color:", euiButtonEmptyColor(euiThemeContext, color).color, ";&:focus,&:active{background-color:", euiButtonEmptyColor(euiThemeContext, color).backgroundColor, ";};label:empty;")
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
return {
|
|
169
|
+
text: /*#__PURE__*/(0, _react.css)(stylesByDisplay('text')[options.display || 'base'], ";label:text;"),
|
|
170
|
+
accent: /*#__PURE__*/(0, _react.css)(stylesByDisplay('accent')[options.display || 'base'], ";label:accent;"),
|
|
171
|
+
primary: /*#__PURE__*/(0, _react.css)(stylesByDisplay('primary')[options.display || 'base'], ";label:primary;"),
|
|
172
|
+
success: /*#__PURE__*/(0, _react.css)(stylesByDisplay('success')[options.display || 'base'], ";label:success;"),
|
|
173
|
+
warning: /*#__PURE__*/(0, _react.css)(stylesByDisplay('warning')[options.display || 'base'], ";label:warning;"),
|
|
174
|
+
danger: /*#__PURE__*/(0, _react.css)(stylesByDisplay('danger')[options.display || 'base'], ";label:danger;"),
|
|
175
|
+
disabled: /*#__PURE__*/(0, _react.css)(stylesByDisplay('disabled')[options.display || 'base'], ";label:disabled;")
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
/**
|
|
179
|
+
* Based on the button size, creates the style properties.
|
|
180
|
+
* @returns An object of button size keys with Emption styles for `border-radius`
|
|
181
|
+
*/
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
exports.useEuiButtonColorCSS = useEuiButtonColorCSS;
|
|
185
|
+
|
|
186
|
+
var useEuiButtonRadiusCSS = function useEuiButtonRadiusCSS() {
|
|
187
|
+
var _useEuiTheme = (0, _services.useEuiTheme)(),
|
|
188
|
+
euiTheme = _useEuiTheme.euiTheme;
|
|
189
|
+
|
|
46
190
|
return {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
success: /*#__PURE__*/(0, _react.css)("background-color:", euiButtonColor('success', euiTheme), ";;label:success;"),
|
|
51
|
-
warning: /*#__PURE__*/(0, _react.css)("background-color:", euiButtonColor('warning', euiTheme), ";;label:warning;"),
|
|
52
|
-
danger: /*#__PURE__*/(0, _react.css)("background-color:", euiButtonColor('danger', euiTheme), ";;label:danger;"),
|
|
53
|
-
disabled: /*#__PURE__*/(0, _react.css)("background-color:", euiButtonColor('disabled', euiTheme), ";;label:disabled;")
|
|
191
|
+
xs: /*#__PURE__*/(0, _react.css)("border-radius:", euiTheme.border.radius.small, ";;label:xs;"),
|
|
192
|
+
s: /*#__PURE__*/(0, _react.css)("border-radius:", euiTheme.border.radius.small, ";;label:s;"),
|
|
193
|
+
m: /*#__PURE__*/(0, _react.css)("border-radius:", euiTheme.border.radius.medium, ";;label:m;")
|
|
54
194
|
};
|
|
55
195
|
};
|
|
196
|
+
/**
|
|
197
|
+
* Creates the translate animation when button is in focus.
|
|
198
|
+
* @returns string
|
|
199
|
+
*/
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
exports.useEuiButtonRadiusCSS = useEuiButtonRadiusCSS;
|
|
203
|
+
|
|
204
|
+
var useEuiButtonFocusCSS = function useEuiButtonFocusCSS() {
|
|
205
|
+
var _useEuiTheme2 = (0, _services.useEuiTheme)(),
|
|
206
|
+
euiTheme = _useEuiTheme2.euiTheme;
|
|
207
|
+
|
|
208
|
+
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 ");
|
|
209
|
+
};
|
|
56
210
|
|
|
57
|
-
exports.
|
|
211
|
+
exports.useEuiButtonFocusCSS = useEuiButtonFocusCSS;
|
package/optimize/es/components/accessibility/screen_reader_only/screen_reader_only.styles.js
CHANGED
|
@@ -6,13 +6,14 @@
|
|
|
6
6
|
* Side Public License, v 1.
|
|
7
7
|
*/
|
|
8
8
|
import { css } from '@emotion/react';
|
|
9
|
+
import { logicalCSS, logicalSizeCSS } from '../../../global_styling';
|
|
9
10
|
/*
|
|
10
11
|
* Mixin that hides elements offscreen to only be read by screen reader
|
|
11
12
|
* See https://github.com/elastic/eui/pull/5130 and https://github.com/elastic/eui/pull/5152 for more info
|
|
12
13
|
*/
|
|
13
14
|
|
|
14
15
|
export var euiScreenReaderOnly = function euiScreenReaderOnly() {
|
|
15
|
-
return "\n // Take the element out of the layout\n position: absolute;\n // Keep it vertically inline\n top
|
|
16
|
+
return "\n // Take the element out of the layout\n position: absolute;\n // Keep it vertically inline\n ".concat(logicalCSS('top', 'auto'), "\n // Chrome requires a left value, and Selenium (used by Kibana's FTR) requires an off-screen position for its .getVisibleText() to not register SR-only text\n ").concat(logicalCSS('left', '-10000px'), "\n // The element must have a size (for some screen readers)\n ").concat(logicalSizeCSS('1px', '1px'), "\n // But reduce the visible size to nothing\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n // And ensure no overflows occur\n overflow: hidden;\n // Chrome requires the negative margin to not cause overflows of parent containers\n margin: -1px;\n");
|
|
16
17
|
};
|
|
17
18
|
/*
|
|
18
19
|
* Styles
|
|
@@ -30,6 +30,7 @@ import { EuiI18n } from '../i18n';
|
|
|
30
30
|
import { htmlIdGenerator, withEuiTheme } from '../../services';
|
|
31
31
|
import { EuiButtonIcon } from '../button';
|
|
32
32
|
import { euiAccordionButtonStyles, euiAccordionChildrenStyles, euiAccordionChildWrapperStyles, euiAccordionIconButtonStyles, euiAccordionOptionalActionStyles, euiAccordionSpinnerStyles, euiAccordionTriggerWrapperStyles } from './accordion.styles';
|
|
33
|
+
import { logicalCSS } from '../../global_styling';
|
|
33
34
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
34
35
|
var paddingSizeToClassNameMap = {
|
|
35
36
|
none: '',
|
|
@@ -68,7 +69,7 @@ export var EuiAccordionClass = /*#__PURE__*/function (_Component) {
|
|
|
68
69
|
var forceState = _this.props.forceState;
|
|
69
70
|
requestAnimationFrame(function () {
|
|
70
71
|
var height = _this.childContent && (forceState ? forceState === 'open' : _this.state.isOpen) ? _this.childContent.clientHeight : 0;
|
|
71
|
-
_this.childWrapper && _this.childWrapper.setAttribute('style',
|
|
72
|
+
_this.childWrapper && _this.childWrapper.setAttribute('style', logicalCSS('height', "".concat(height, "px")));
|
|
72
73
|
});
|
|
73
74
|
});
|
|
74
75
|
|
|
@@ -8,18 +8,18 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
8
8
|
* Side Public License, v 1.
|
|
9
9
|
*/
|
|
10
10
|
import { css } from '@emotion/react';
|
|
11
|
-
import { euiFontSize } from '../../global_styling
|
|
11
|
+
import { euiFontSize, logicals, logicalCSS, logicalTextAlignCSS } from '../../global_styling';
|
|
12
12
|
export var euiAccordionButtonStyles = function euiAccordionButtonStyles(euiThemeContext) {
|
|
13
13
|
var euiTheme = euiThemeContext.euiTheme;
|
|
14
14
|
return {
|
|
15
|
-
euiAccordion__button: /*#__PURE__*/css(euiFontSize(euiThemeContext, 's'), ";align-items:center;display:flex;flex-grow:1;line-height:", euiTheme.size.l, ";
|
|
15
|
+
euiAccordion__button: /*#__PURE__*/css(euiFontSize(euiThemeContext, 's'), ";align-items:center;display:flex;flex-grow:1;line-height:", euiTheme.size.l, ";", logicalTextAlignCSS('left'), " ", logicalCSS('width', '100%'), " &:hover,&:focus{cursor:pointer;text-decoration:underline;};label:euiAccordion__button;"),
|
|
16
16
|
// Triggering button needs separate `disabled` key because the element that renders may not support `:disabled`;
|
|
17
17
|
// Hover pseudo selector for specificity
|
|
18
18
|
disabled: /*#__PURE__*/css("&,&:hover{cursor:not-allowed;color:", euiTheme.colors.disabledText, ";text-decoration:none;};label:disabled;")
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _ref4 = process.env.NODE_ENV === "production" ? {
|
|
23
23
|
name: "1xvjonu-isLoading",
|
|
24
24
|
styles: "align-items:center;display:flex;label:isLoading;"
|
|
25
25
|
} : {
|
|
@@ -28,11 +28,11 @@ var _ref5 = process.env.NODE_ENV === "production" ? {
|
|
|
28
28
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
-
export var euiAccordionChildrenStyles = function euiAccordionChildrenStyles(
|
|
32
|
-
var euiTheme =
|
|
31
|
+
export var euiAccordionChildrenStyles = function euiAccordionChildrenStyles(_ref5) {
|
|
32
|
+
var euiTheme = _ref5.euiTheme;
|
|
33
33
|
return {
|
|
34
34
|
euiAccordion__children: /*#__PURE__*/css(";label:euiAccordion__children;"),
|
|
35
|
-
isLoading:
|
|
35
|
+
isLoading: _ref4,
|
|
36
36
|
xs: /*#__PURE__*/css("padding:", euiTheme.size.xs, ";;label:xs;"),
|
|
37
37
|
s: /*#__PURE__*/css("padding:", euiTheme.size.s, ";;label:s;"),
|
|
38
38
|
m: /*#__PURE__*/css("padding:", euiTheme.size.base, ";;label:m;"),
|
|
@@ -40,21 +40,11 @@ export var euiAccordionChildrenStyles = function euiAccordionChildrenStyles(_ref
|
|
|
40
40
|
xl: /*#__PURE__*/css("padding:", euiTheme.size.xl, ";;label:xl;")
|
|
41
41
|
};
|
|
42
42
|
};
|
|
43
|
-
|
|
44
|
-
var
|
|
45
|
-
name: "xodlxj-isOpen",
|
|
46
|
-
styles: "height:auto;opacity:1;visibility:visible;label:isOpen;"
|
|
47
|
-
} : {
|
|
48
|
-
name: "xodlxj-isOpen",
|
|
49
|
-
styles: "height:auto;opacity:1;visibility:visible;label:isOpen;",
|
|
50
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
export var euiAccordionChildWrapperStyles = function euiAccordionChildWrapperStyles(_ref7) {
|
|
54
|
-
var euiTheme = _ref7.euiTheme;
|
|
43
|
+
export var euiAccordionChildWrapperStyles = function euiAccordionChildWrapperStyles(_ref6) {
|
|
44
|
+
var euiTheme = _ref6.euiTheme;
|
|
55
45
|
return {
|
|
56
|
-
euiAccordion__childWrapper: /*#__PURE__*/css(
|
|
57
|
-
isOpen:
|
|
46
|
+
euiAccordion__childWrapper: /*#__PURE__*/css(logicalCSS('height', 0), " opacity:0;overflow:hidden;transition:", logicals.height, " ", euiTheme.animation.normal, " ", euiTheme.animation.resistance, ",opacity ", euiTheme.animation.normal, " ", euiTheme.animation.resistance, ";visibility:hidden;will-change:opacity,visibility,", logicals.height, ";&:focus{outline:none;};label:euiAccordion__childWrapper;"),
|
|
47
|
+
isOpen: /*#__PURE__*/css(logicalCSS('height', 'auto'), " opacity:1;visibility:visible;;label:isOpen;")
|
|
58
48
|
};
|
|
59
49
|
};
|
|
60
50
|
|
|
@@ -67,12 +57,12 @@ var _ref3 = process.env.NODE_ENV === "production" ? {
|
|
|
67
57
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
68
58
|
};
|
|
69
59
|
|
|
70
|
-
export var euiAccordionIconButtonStyles = function euiAccordionIconButtonStyles(
|
|
71
|
-
var euiTheme =
|
|
60
|
+
export var euiAccordionIconButtonStyles = function euiAccordionIconButtonStyles(_ref7) {
|
|
61
|
+
var euiTheme = _ref7.euiTheme;
|
|
72
62
|
return {
|
|
73
|
-
euiAccordion__iconButton: /*#__PURE__*/css("flex-shrink:0;margin-
|
|
63
|
+
euiAccordion__iconButton: /*#__PURE__*/css("flex-shrink:0;", logicalCSS('margin-right', euiTheme.size.xs), " transform:rotate(0deg)!important;;label:euiAccordion__iconButton;"),
|
|
74
64
|
isOpen: _ref3,
|
|
75
|
-
arrowRight: /*#__PURE__*/css(
|
|
65
|
+
arrowRight: /*#__PURE__*/css(logicalCSS('margin-left', euiTheme.size.xs), " ", logicalCSS('margin-right', 0), ";;label:arrowRight;")
|
|
76
66
|
};
|
|
77
67
|
};
|
|
78
68
|
|
|
@@ -90,10 +80,10 @@ export var euiAccordionOptionalActionStyles = function euiAccordionOptionalActio
|
|
|
90
80
|
euiAccordion__optionalAction: _ref2
|
|
91
81
|
};
|
|
92
82
|
};
|
|
93
|
-
export var euiAccordionSpinnerStyles = function euiAccordionSpinnerStyles(
|
|
94
|
-
var euiTheme =
|
|
83
|
+
export var euiAccordionSpinnerStyles = function euiAccordionSpinnerStyles(_ref8) {
|
|
84
|
+
var euiTheme = _ref8.euiTheme;
|
|
95
85
|
return {
|
|
96
|
-
euiAccordion__spinner: /*#__PURE__*/css(
|
|
86
|
+
euiAccordion__spinner: /*#__PURE__*/css(logicalCSS('margin-right', euiTheme.size.xs), ";;label:euiAccordion__spinner;")
|
|
97
87
|
};
|
|
98
88
|
};
|
|
99
89
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["className", "label", "color", "tooltipContent", "tooltipPosition", "title", "iconType", "onClick", "onClickAriaLabel", "href", "rel", "target", "size"];
|
|
4
|
+
var _excluded = ["className", "label", "color", "tooltipContent", "tooltipPosition", "anchorProps", "title", "iconType", "onClick", "onClickAriaLabel", "href", "rel", "target", "size"];
|
|
5
5
|
|
|
6
6
|
/*
|
|
7
7
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -36,6 +36,7 @@ export var EuiBetaBadge = function EuiBetaBadge(_ref) {
|
|
|
36
36
|
tooltipContent = _ref.tooltipContent,
|
|
37
37
|
_ref$tooltipPosition = _ref.tooltipPosition,
|
|
38
38
|
tooltipPosition = _ref$tooltipPosition === void 0 ? 'top' : _ref$tooltipPosition,
|
|
39
|
+
anchorProps = _ref.anchorProps,
|
|
39
40
|
title = _ref.title,
|
|
40
41
|
iconType = _ref.iconType,
|
|
41
42
|
onClick = _ref.onClick,
|
|
@@ -101,7 +102,8 @@ export var EuiBetaBadge = function EuiBetaBadge(_ref) {
|
|
|
101
102
|
return ___EmotionJSX(EuiToolTip, {
|
|
102
103
|
position: tooltipPosition,
|
|
103
104
|
content: tooltipContent,
|
|
104
|
-
title: title || label
|
|
105
|
+
title: title || label,
|
|
106
|
+
anchorProps: anchorProps
|
|
105
107
|
}, content);
|
|
106
108
|
} else {
|
|
107
109
|
return ___EmotionJSX(Fragment, null, content);
|
|
@@ -111,7 +113,8 @@ export var EuiBetaBadge = function EuiBetaBadge(_ref) {
|
|
|
111
113
|
return ___EmotionJSX(EuiToolTip, {
|
|
112
114
|
position: tooltipPosition,
|
|
113
115
|
content: tooltipContent,
|
|
114
|
-
title: title || label
|
|
116
|
+
title: title || label,
|
|
117
|
+
anchorProps: anchorProps
|
|
115
118
|
}, ___EmotionJSX("span", _extends({
|
|
116
119
|
tabIndex: 0,
|
|
117
120
|
className: classes,
|