@elastic/eui 65.0.1 → 67.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 +28 -444
- package/dist/eui_theme_dark.json +0 -6
- package/dist/eui_theme_dark.json.d.ts +0 -6
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +28 -444
- package/dist/eui_theme_light.json +0 -6
- package/dist/eui_theme_light.json.d.ts +0 -6
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/basic_table/basic_table.js +13 -2
- package/es/components/basic_table/in_memory_table.js +13 -2
- package/es/components/button/button_display/_button_display.js +10 -1
- package/es/components/button/button_empty/button_empty.js +10 -1
- package/es/components/card/card.styles.js +2 -2
- package/es/components/collapsible_nav/collapsible_nav.js +0 -5
- package/es/components/combo_box/combo_box.js +2 -15
- package/es/components/datagrid/body/data_grid_body.js +17 -6
- package/es/components/datagrid/body/data_grid_cell.js +29 -12
- package/es/components/datagrid/body/header/data_grid_header_cell.js +17 -6
- package/es/components/datagrid/body/header/data_grid_header_row.js +17 -6
- package/es/components/datagrid/data_grid.js +17 -6
- package/es/components/datagrid/utils/in_memory.js +17 -6
- package/es/components/date_picker/auto_refresh/auto_refresh.js +6 -1
- package/es/components/date_picker/react-datepicker/original.package.json +124 -0
- package/es/components/date_picker/super_date_picker/date_popover/date_popover_button.js +6 -2
- package/es/components/description_list/description_list.js +11 -3
- package/es/components/description_list/description_list_context.js +2 -1
- package/es/components/description_list/description_list_description.js +3 -1
- package/es/components/description_list/description_list_description.styles.js +5 -2
- package/es/components/description_list/description_list_title.js +3 -2
- package/es/components/description_list/description_list_title.styles.js +7 -3
- package/es/components/description_list/description_list_types.js +2 -1
- package/es/components/expression/expression.js +12 -2
- package/es/components/form/field_search/field_search.js +6 -16
- package/es/components/form/range/range_input.js +1 -1
- package/es/components/header/header_links/header_link.js +10 -1
- package/es/components/header/header_section/header_section_item.js +4 -3
- package/es/components/icon/icon.js +3 -10
- package/es/components/image/image.js +6 -1
- package/es/components/image/image_fullscreen_wrapper.js +2 -3
- package/es/components/list_group/list_group.js +7 -1
- package/es/components/list_group/list_group_item.js +10 -3
- package/es/components/list_group/pinnable_list_group/pinnable_list_group.js +13 -1
- package/es/components/modal/modal.js +1 -3
- package/es/components/notification/notification_event.js +24 -5
- package/es/components/observer/mutation_observer/mutation_observer.js +1 -1
- package/es/components/overlay_mask/overlay_mask.js +27 -65
- package/es/components/overlay_mask/overlay_mask.styles.js +28 -0
- package/es/components/page/page_content/page_content.js +1 -2
- package/es/components/page/page_content/page_content_body.js +1 -2
- package/es/components/page/page_content/page_content_header.js +1 -2
- package/es/components/page/page_content/page_content_header_section.js +1 -2
- package/es/components/page/page_section/page_section.js +15 -3
- package/es/components/page/page_side_bar/page_side_bar.js +1 -2
- package/es/components/page/page_sidebar/page_sidebar.js +5 -1
- package/es/components/page/page_template.js +3 -1
- package/es/components/page_template/empty_prompt/page_empty_prompt.js +11 -1
- package/es/components/page_template/page_template.js +18 -2
- package/es/components/pagination/pagination.js +17 -4
- package/es/components/pagination/pagination.styles.js +31 -0
- package/es/components/pagination/pagination_button.js +17 -5
- package/es/components/pagination/pagination_button.styles.js +30 -0
- package/es/components/pagination/pagination_button_arrow.js +5 -0
- package/es/components/progress/progress.js +6 -1
- package/es/components/provider/cache/cache_provider.js +3 -9
- package/es/components/provider/provider.js +25 -2
- package/es/components/resizable_container/resizable_panel.js +6 -1
- package/es/components/side_nav/side_nav.js +5 -0
- package/es/components/suggest/suggest.js +10 -1
- package/es/components/table/table_row_cell.js +4 -6
- package/es/components/tabs/tabbed_content/tabbed_content.js +2 -19
- package/es/components/tool_tip/tool_tip.js +42 -66
- package/es/components/tool_tip/tool_tip.styles.js +107 -0
- package/es/components/tool_tip/tool_tip_anchor.js +73 -0
- package/es/components/tool_tip/tool_tip_arrow.js +20 -0
- package/es/components/tool_tip/tool_tip_popover.js +48 -101
- package/es/global_styling/functions/logicals.json +56 -0
- package/es/global_styling/index.js +2 -1
- package/es/global_styling/mixins/_typography.js +1 -1
- package/es/global_styling/utility/animations.js +13 -0
- package/es/services/theme/hooks.js +11 -16
- package/eui.d.ts +157 -61
- package/i18ntokens.json +72 -72
- package/lib/components/basic_table/basic_table.js +13 -2
- package/lib/components/basic_table/in_memory_table.js +13 -2
- package/lib/components/button/button_display/_button_display.js +10 -1
- package/lib/components/button/button_empty/button_empty.js +10 -1
- package/lib/components/card/card.styles.js +2 -2
- package/lib/components/collapsible_nav/collapsible_nav.js +0 -5
- package/lib/components/combo_box/combo_box.js +2 -15
- package/lib/components/datagrid/body/data_grid_body.js +17 -6
- package/lib/components/datagrid/body/data_grid_cell.js +29 -12
- package/lib/components/datagrid/body/header/data_grid_header_cell.js +17 -6
- package/lib/components/datagrid/body/header/data_grid_header_row.js +17 -6
- package/lib/components/datagrid/data_grid.js +17 -6
- package/lib/components/datagrid/utils/in_memory.js +17 -6
- package/lib/components/date_picker/auto_refresh/auto_refresh.js +6 -1
- package/lib/components/date_picker/react-datepicker/original.package.json +124 -0
- package/lib/components/date_picker/super_date_picker/date_popover/date_popover_button.js +6 -1
- package/lib/components/description_list/description_list.js +11 -3
- package/lib/components/description_list/description_list_context.js +2 -1
- package/lib/components/description_list/description_list_description.js +3 -1
- package/lib/components/description_list/description_list_description.styles.js +5 -2
- package/lib/components/description_list/description_list_title.js +3 -2
- package/lib/components/description_list/description_list_title.styles.js +7 -3
- package/lib/components/description_list/description_list_types.js +4 -2
- package/lib/components/expression/expression.js +12 -2
- package/lib/components/form/field_search/field_search.js +6 -16
- package/lib/components/form/range/range_input.js +1 -1
- package/lib/components/header/header_links/header_link.js +10 -1
- package/lib/components/header/header_section/header_section_item.js +4 -3
- package/lib/components/icon/icon.js +3 -10
- package/lib/components/image/image.js +6 -1
- package/lib/components/image/image_fullscreen_wrapper.js +2 -3
- package/lib/components/list_group/list_group.js +7 -1
- package/lib/components/list_group/list_group_item.js +10 -3
- package/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +13 -1
- package/lib/components/modal/modal.js +1 -3
- package/lib/components/notification/notification_event.js +27 -8
- package/lib/components/observer/mutation_observer/mutation_observer.js +1 -1
- package/lib/components/overlay_mask/overlay_mask.js +27 -65
- package/lib/components/overlay_mask/overlay_mask.styles.js +34 -0
- package/lib/components/page/page_content/page_content.js +1 -2
- package/lib/components/page/page_content/page_content_body.js +1 -2
- package/lib/components/page/page_content/page_content_header.js +1 -2
- package/lib/components/page/page_content/page_content_header_section.js +1 -2
- package/lib/components/page/page_section/page_section.js +15 -3
- package/lib/components/page/page_side_bar/page_side_bar.js +1 -2
- package/lib/components/page/page_sidebar/page_sidebar.js +5 -1
- package/lib/components/page/page_template.js +3 -1
- package/lib/components/page_template/empty_prompt/page_empty_prompt.js +11 -1
- package/lib/components/page_template/page_template.js +18 -2
- package/lib/components/pagination/pagination.js +18 -3
- package/lib/components/pagination/pagination.styles.js +34 -0
- package/lib/components/pagination/pagination_button.js +9 -4
- package/lib/components/pagination/pagination_button.styles.js +45 -0
- package/lib/components/pagination/pagination_button_arrow.js +7 -0
- package/lib/components/progress/progress.js +6 -1
- package/lib/components/provider/cache/cache_provider.js +3 -11
- package/lib/components/provider/provider.js +31 -6
- package/lib/components/resizable_container/resizable_panel.js +6 -1
- package/lib/components/side_nav/side_nav.js +5 -0
- package/lib/components/suggest/suggest.js +10 -1
- package/lib/components/table/table_row_cell.js +4 -6
- package/lib/components/tabs/tabbed_content/tabbed_content.js +2 -19
- package/lib/components/tool_tip/tool_tip.js +43 -64
- package/lib/components/tool_tip/tool_tip.styles.js +123 -0
- package/lib/components/tool_tip/tool_tip_anchor.js +87 -0
- package/lib/components/tool_tip/tool_tip_arrow.js +28 -0
- package/lib/components/tool_tip/tool_tip_popover.js +49 -98
- package/lib/global_styling/functions/logicals.json +56 -0
- package/lib/global_styling/index.js +13 -0
- package/lib/global_styling/mixins/_typography.js +1 -1
- package/lib/global_styling/utility/animations.js +15 -0
- package/lib/services/theme/hooks.js +10 -15
- package/optimize/es/components/card/card.styles.js +2 -2
- package/optimize/es/components/combo_box/combo_box.js +2 -15
- package/optimize/es/components/date_picker/react-datepicker/original.package.json +124 -0
- package/optimize/es/components/date_picker/super_date_picker/date_popover/date_popover_button.js +0 -1
- package/optimize/es/components/description_list/description_list.js +5 -2
- package/optimize/es/components/description_list/description_list_context.js +2 -1
- package/optimize/es/components/description_list/description_list_description.js +3 -1
- package/optimize/es/components/description_list/description_list_description.styles.js +5 -2
- package/optimize/es/components/description_list/description_list_title.js +3 -2
- package/optimize/es/components/description_list/description_list_title.styles.js +7 -3
- package/optimize/es/components/description_list/description_list_types.js +2 -1
- package/optimize/es/components/form/field_search/field_search.js +6 -16
- package/optimize/es/components/form/range/range_input.js +1 -1
- package/optimize/es/components/header/header_section/header_section_item.js +4 -3
- package/optimize/es/components/icon/icon.js +3 -10
- package/optimize/es/components/image/image_fullscreen_wrapper.js +2 -3
- package/optimize/es/components/list_group/list_group_item.js +3 -2
- package/optimize/es/components/modal/modal.js +1 -3
- package/optimize/es/components/notification/notification_event.js +10 -4
- package/optimize/es/components/observer/mutation_observer/mutation_observer.js +1 -1
- package/optimize/es/components/overlay_mask/overlay_mask.js +27 -60
- package/optimize/es/components/overlay_mask/overlay_mask.styles.js +28 -0
- package/optimize/es/components/page/page_content/page_content.js +1 -2
- package/optimize/es/components/page/page_content/page_content_body.js +1 -2
- package/optimize/es/components/page/page_content/page_content_header.js +1 -2
- package/optimize/es/components/page/page_content/page_content_header_section.js +1 -2
- package/optimize/es/components/page/page_section/page_section.js +4 -2
- package/optimize/es/components/page/page_side_bar/page_side_bar.js +1 -2
- package/optimize/es/components/page/page_sidebar/page_sidebar.js +5 -1
- package/optimize/es/components/page/page_template.js +3 -1
- package/optimize/es/components/pagination/pagination.js +17 -4
- package/optimize/es/components/pagination/pagination.styles.js +31 -0
- package/optimize/es/components/pagination/pagination_button.js +7 -4
- package/optimize/es/components/pagination/pagination_button.styles.js +30 -0
- package/optimize/es/components/pagination/pagination_button_arrow.js +5 -0
- package/optimize/es/components/provider/cache/cache_provider.js +3 -9
- package/optimize/es/components/provider/provider.js +25 -2
- package/optimize/es/components/suggest/suggest.js +4 -1
- package/optimize/es/components/tabs/tabbed_content/tabbed_content.js +2 -19
- package/optimize/es/components/tool_tip/tool_tip.js +42 -66
- package/optimize/es/components/tool_tip/tool_tip.styles.js +107 -0
- package/optimize/es/components/tool_tip/tool_tip_anchor.js +60 -0
- package/optimize/es/components/tool_tip/tool_tip_arrow.js +20 -0
- package/optimize/es/components/tool_tip/tool_tip_popover.js +46 -87
- package/optimize/es/global_styling/functions/logicals.json +56 -0
- package/optimize/es/global_styling/index.js +2 -1
- package/optimize/es/global_styling/mixins/_typography.js +1 -1
- package/optimize/es/global_styling/utility/animations.js +13 -0
- package/optimize/es/services/theme/hooks.js +11 -16
- package/optimize/lib/components/card/card.styles.js +2 -2
- package/optimize/lib/components/combo_box/combo_box.js +2 -15
- package/optimize/lib/components/date_picker/react-datepicker/original.package.json +124 -0
- package/optimize/lib/components/description_list/description_list.js +5 -2
- package/optimize/lib/components/description_list/description_list_context.js +2 -1
- package/optimize/lib/components/description_list/description_list_description.js +3 -1
- package/optimize/lib/components/description_list/description_list_description.styles.js +5 -2
- package/optimize/lib/components/description_list/description_list_title.js +3 -2
- package/optimize/lib/components/description_list/description_list_title.styles.js +7 -3
- package/optimize/lib/components/description_list/description_list_types.js +4 -2
- package/optimize/lib/components/form/field_search/field_search.js +6 -16
- package/optimize/lib/components/form/range/range_input.js +1 -1
- package/optimize/lib/components/header/header_section/header_section_item.js +4 -3
- package/optimize/lib/components/icon/icon.js +3 -10
- package/optimize/lib/components/image/image_fullscreen_wrapper.js +2 -3
- package/optimize/lib/components/list_group/list_group_item.js +3 -2
- package/optimize/lib/components/modal/modal.js +1 -3
- package/optimize/lib/components/notification/notification_event.js +11 -11
- package/optimize/lib/components/observer/mutation_observer/mutation_observer.js +1 -1
- package/optimize/lib/components/overlay_mask/overlay_mask.js +27 -59
- package/optimize/lib/components/overlay_mask/overlay_mask.styles.js +34 -0
- package/optimize/lib/components/page/page_content/page_content.js +1 -2
- package/optimize/lib/components/page/page_content/page_content_body.js +1 -2
- package/optimize/lib/components/page/page_content/page_content_header.js +1 -2
- package/optimize/lib/components/page/page_content/page_content_header_section.js +1 -2
- package/optimize/lib/components/page/page_section/page_section.js +4 -2
- package/optimize/lib/components/page/page_side_bar/page_side_bar.js +1 -2
- package/optimize/lib/components/page/page_sidebar/page_sidebar.js +5 -1
- package/optimize/lib/components/page/page_template.js +3 -1
- package/optimize/lib/components/pagination/pagination.js +18 -3
- package/optimize/lib/components/pagination/pagination.styles.js +34 -0
- package/optimize/lib/components/pagination/pagination_button.js +9 -4
- package/optimize/lib/components/pagination/pagination_button.styles.js +45 -0
- package/optimize/lib/components/pagination/pagination_button_arrow.js +7 -0
- package/optimize/lib/components/provider/cache/cache_provider.js +3 -11
- package/optimize/lib/components/provider/provider.js +31 -6
- package/optimize/lib/components/suggest/suggest.js +4 -1
- package/optimize/lib/components/tabs/tabbed_content/tabbed_content.js +2 -19
- package/optimize/lib/components/tool_tip/tool_tip.js +42 -64
- package/optimize/lib/components/tool_tip/tool_tip.styles.js +125 -0
- package/optimize/lib/components/tool_tip/tool_tip_anchor.js +75 -0
- package/optimize/lib/components/tool_tip/tool_tip_arrow.js +35 -0
- package/optimize/lib/components/tool_tip/tool_tip_popover.js +47 -88
- package/optimize/lib/global_styling/functions/logicals.json +56 -0
- package/optimize/lib/global_styling/index.js +13 -0
- package/optimize/lib/global_styling/mixins/_typography.js +1 -1
- package/optimize/lib/global_styling/utility/animations.js +17 -0
- package/optimize/lib/services/theme/hooks.js +10 -15
- package/package.json +2 -2
- package/src/components/badge/_badge.scss +0 -5
- package/src/components/datagrid/_data_grid_data_row.scss +7 -0
- package/src/components/datagrid/body/header/_data_grid_header_row.scss +1 -1
- package/src/components/filter_group/_filter_group.scss +3 -1
- package/src/components/flex/_flex_group.scss +2 -11
- package/src/components/flex/_flex_item.scss +0 -6
- package/src/components/form/field_search/_field_search.scss +0 -5
- package/src/components/form/form_control_layout/_form_control_layout_delimited.scss +0 -3
- package/src/components/form/form_row/_form_row.scss +0 -1
- package/src/components/header/header_section/_header_section_item.scss +1 -1
- package/src/components/index.scss +0 -4
- package/src/components/list_group/_list_group_item.scss +3 -25
- package/src/components/modal/_modal.scss +5 -20
- package/src/components/page/page_content/_page_content.scss +0 -1
- package/src/components/table/_responsive.scss +0 -1
- package/src/components/table/_table.scss +0 -5
- package/src/global_styling/mixins/_form.scss +0 -4
- package/src/global_styling/mixins/_helpers.scss +0 -8
- package/src/global_styling/mixins/_tool_tip.scss +3 -6
- package/src/global_styling/mixins/_typography.scss +1 -5
- package/src/global_styling/utility/_index.scss +0 -1
- package/src/themes/amsterdam/overrides/_index.scss +0 -2
- package/test-env/components/basic_table/basic_table.js +13 -2
- package/test-env/components/basic_table/in_memory_table.js +13 -2
- package/test-env/components/button/button_display/_button_display.js +10 -1
- package/test-env/components/button/button_empty/button_empty.js +10 -1
- package/test-env/components/card/card.styles.js +2 -2
- package/test-env/components/collapsible_nav/collapsible_nav.js +0 -5
- package/test-env/components/combo_box/combo_box.js +2 -15
- package/test-env/components/datagrid/body/data_grid_body.js +17 -6
- package/test-env/components/datagrid/body/data_grid_cell.js +29 -12
- package/test-env/components/datagrid/body/header/data_grid_header_cell.js +17 -6
- package/test-env/components/datagrid/body/header/data_grid_header_row.js +17 -6
- package/test-env/components/datagrid/data_grid.js +17 -6
- package/test-env/components/datagrid/utils/in_memory.js +17 -6
- package/test-env/components/date_picker/auto_refresh/auto_refresh.js +6 -1
- package/test-env/components/date_picker/react-datepicker/original.package.json +124 -0
- package/test-env/components/date_picker/super_date_picker/date_popover/date_popover_button.js +6 -1
- package/test-env/components/description_list/description_list.js +11 -3
- package/test-env/components/description_list/description_list_context.js +2 -1
- package/test-env/components/description_list/description_list_description.js +3 -1
- package/test-env/components/description_list/description_list_description.styles.js +5 -2
- package/test-env/components/description_list/description_list_title.js +3 -2
- package/test-env/components/description_list/description_list_title.styles.js +7 -3
- package/test-env/components/description_list/description_list_types.js +4 -2
- package/test-env/components/expression/expression.js +12 -2
- package/test-env/components/form/field_search/field_search.js +6 -16
- package/test-env/components/form/range/range_input.js +1 -1
- package/test-env/components/header/header_links/header_link.js +10 -1
- package/test-env/components/header/header_section/header_section_item.js +4 -3
- package/test-env/components/image/image.js +6 -1
- package/test-env/components/image/image_fullscreen_wrapper.js +2 -3
- package/test-env/components/list_group/list_group.js +7 -1
- package/test-env/components/list_group/list_group_item.js +10 -3
- package/test-env/components/list_group/pinnable_list_group/pinnable_list_group.js +13 -1
- package/test-env/components/modal/modal.js +1 -3
- package/test-env/components/notification/notification_event.js +24 -15
- package/test-env/components/observer/mutation_observer/mutation_observer.js +1 -1
- package/test-env/components/overlay_mask/overlay_mask.js +27 -64
- package/test-env/components/overlay_mask/overlay_mask.styles.js +34 -0
- package/test-env/components/page/page_content/page_content.js +1 -2
- package/test-env/components/page/page_content/page_content_body.js +1 -2
- package/test-env/components/page/page_content/page_content_header.js +1 -2
- package/test-env/components/page/page_content/page_content_header_section.js +1 -2
- package/test-env/components/page/page_section/page_section.js +15 -3
- package/test-env/components/page/page_side_bar/page_side_bar.js +1 -2
- package/test-env/components/page/page_sidebar/page_sidebar.js +5 -1
- package/test-env/components/page/page_template.js +3 -1
- package/test-env/components/page_template/empty_prompt/page_empty_prompt.js +11 -1
- package/test-env/components/page_template/page_template.js +18 -2
- package/test-env/components/pagination/pagination.js +18 -3
- package/test-env/components/pagination/pagination.styles.js +34 -0
- package/test-env/components/pagination/pagination_button.js +9 -4
- package/test-env/components/pagination/pagination_button.styles.js +45 -0
- package/test-env/components/pagination/pagination_button_arrow.js +7 -0
- package/test-env/components/progress/progress.js +6 -1
- package/test-env/components/provider/cache/cache_provider.js +3 -11
- package/test-env/components/provider/provider.js +31 -6
- package/test-env/components/resizable_container/resizable_panel.js +6 -1
- package/test-env/components/side_nav/side_nav.js +5 -0
- package/test-env/components/suggest/suggest.js +10 -1
- package/test-env/components/table/table_row_cell.js +4 -6
- package/test-env/components/tabs/tabbed_content/tabbed_content.js +2 -19
- package/test-env/components/tool_tip/tool_tip.js +42 -64
- package/test-env/components/tool_tip/tool_tip.styles.js +125 -0
- package/test-env/components/tool_tip/tool_tip_anchor.js +84 -0
- package/test-env/components/tool_tip/tool_tip_arrow.js +35 -0
- package/test-env/components/tool_tip/tool_tip_popover.js +49 -89
- package/test-env/global_styling/functions/logicals.json +56 -0
- package/test-env/global_styling/index.js +13 -0
- package/test-env/global_styling/mixins/_typography.js +1 -1
- package/test-env/global_styling/utility/animations.js +17 -0
- package/test-env/services/theme/hooks.js +10 -15
- package/src/components/call_out/_index.scss +0 -3
- package/src/components/call_out/_mixins.scss +0 -23
- package/src/components/call_out/_variables.scss +0 -7
- package/src/components/overlay_mask/_index.scss +0 -1
- package/src/components/overlay_mask/_overlay_mask.scss +0 -33
- package/src/components/pagination/_index.scss +0 -2
- package/src/components/pagination/_pagination.scss +0 -30
- package/src/components/pagination/_pagination_button.scss +0 -37
- package/src/components/tool_tip/_index.scss +0 -1
- package/src/components/tool_tip/_tool_tip.scss +0 -121
- package/src/global_styling/utility/_utility.scss +0 -15
- package/src/themes/amsterdam/overrides/_overlay_mask.scss +0 -3
- package/src/themes/amsterdam/overrides/_tooltip.scss +0 -7
|
@@ -9,10 +9,6 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
|
9
9
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
10
10
|
var _excluded = ["children", "className", "anchorClassName", "anchorProps", "content", "title", "delay", "display"];
|
|
11
11
|
|
|
12
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
13
|
-
|
|
14
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
15
|
-
|
|
16
12
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
17
13
|
|
|
18
14
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
@@ -24,10 +20,12 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
24
20
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
25
21
|
* Side Public License, v 1.
|
|
26
22
|
*/
|
|
27
|
-
import React, { Component
|
|
23
|
+
import React, { Component } from 'react';
|
|
28
24
|
import classNames from 'classnames';
|
|
29
25
|
import { keysOf } from '../common';
|
|
30
26
|
import { EuiPortal } from '../portal';
|
|
27
|
+
import { EuiToolTipAnchor } from './tool_tip_anchor';
|
|
28
|
+
import { EuiToolTipArrow } from './tool_tip_arrow';
|
|
31
29
|
import { EuiToolTipPopover } from './tool_tip_popover';
|
|
32
30
|
import { enqueueStateChange } from '../../services/react';
|
|
33
31
|
import { findPopoverPosition, htmlIdGenerator } from '../../services';
|
|
@@ -114,16 +112,12 @@ export var EuiToolTip = /*#__PURE__*/function (_Component) {
|
|
|
114
112
|
}
|
|
115
113
|
});
|
|
116
114
|
|
|
115
|
+
_defineProperty(_assertThisInitialized(_this), "setAnchorRef", function (ref) {
|
|
116
|
+
return _this.anchor = ref;
|
|
117
|
+
});
|
|
118
|
+
|
|
117
119
|
_defineProperty(_assertThisInitialized(_this), "setPopoverRef", function (ref) {
|
|
118
|
-
_this.popover = ref;
|
|
119
|
-
// any previous knowledge about its size
|
|
120
|
-
|
|
121
|
-
if (ref == null) {
|
|
122
|
-
_this.setState({
|
|
123
|
-
toolTipStyles: DEFAULT_TOOLTIP_STYLES,
|
|
124
|
-
arrowStyles: undefined
|
|
125
|
-
});
|
|
126
|
-
}
|
|
120
|
+
return _this.popover = ref;
|
|
127
121
|
});
|
|
128
122
|
|
|
129
123
|
_defineProperty(_assertThisInitialized(_this), "showToolTip", function () {
|
|
@@ -189,7 +183,9 @@ export var EuiToolTip = /*#__PURE__*/function (_Component) {
|
|
|
189
183
|
enqueueStateChange(function () {
|
|
190
184
|
if (_this._isMounted) {
|
|
191
185
|
_this.setState({
|
|
192
|
-
visible: false
|
|
186
|
+
visible: false,
|
|
187
|
+
toolTipStyles: DEFAULT_TOOLTIP_STYLES,
|
|
188
|
+
arrowStyles: undefined
|
|
193
189
|
});
|
|
194
190
|
}
|
|
195
191
|
});
|
|
@@ -249,8 +245,6 @@ export var EuiToolTip = /*#__PURE__*/function (_Component) {
|
|
|
249
245
|
}, {
|
|
250
246
|
key: "render",
|
|
251
247
|
value: function render() {
|
|
252
|
-
var _this2 = this;
|
|
253
|
-
|
|
254
248
|
var _this$props = this.props,
|
|
255
249
|
children = _this$props.children,
|
|
256
250
|
className = _this$props.className,
|
|
@@ -266,57 +260,39 @@ export var EuiToolTip = /*#__PURE__*/function (_Component) {
|
|
|
266
260
|
arrowStyles = _this$state.arrowStyles,
|
|
267
261
|
id = _this$state.id,
|
|
268
262
|
toolTipStyles = _this$state.toolTipStyles,
|
|
269
|
-
visible = _this$state.visible
|
|
263
|
+
visible = _this$state.visible,
|
|
264
|
+
calculatedPosition = _this$state.calculatedPosition;
|
|
270
265
|
var classes = classNames('euiToolTip', positionsToClassNameMap[this.state.calculatedPosition], className);
|
|
271
|
-
var anchorClasses = classNames(
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
className: classes,
|
|
277
|
-
style: toolTipStyles,
|
|
278
|
-
positionToolTip: this.positionToolTip,
|
|
279
|
-
popoverRef: this.setPopoverRef,
|
|
280
|
-
title: title,
|
|
281
|
-
id: id,
|
|
282
|
-
role: "tooltip"
|
|
283
|
-
}, rest), ___EmotionJSX("div", {
|
|
284
|
-
style: arrowStyles,
|
|
285
|
-
className: "euiToolTip__arrow"
|
|
286
|
-
}), ___EmotionJSX(EuiResizeObserver, {
|
|
287
|
-
onResize: this.positionToolTip
|
|
288
|
-
}, function (resizeRef) {
|
|
289
|
-
return ___EmotionJSX("div", {
|
|
290
|
-
ref: resizeRef
|
|
291
|
-
}, content);
|
|
292
|
-
})));
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
var anchor = // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
|
|
296
|
-
___EmotionJSX("span", _extends({
|
|
297
|
-
ref: function ref(anchor) {
|
|
298
|
-
return _this2.anchor = anchor;
|
|
299
|
-
}
|
|
300
|
-
}, anchorProps, {
|
|
301
|
-
className: anchorClasses,
|
|
266
|
+
var anchorClasses = classNames(anchorClassName, anchorProps === null || anchorProps === void 0 ? void 0 : anchorProps.className);
|
|
267
|
+
return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(EuiToolTipAnchor, _extends({}, anchorProps, {
|
|
268
|
+
ref: this.setAnchorRef,
|
|
269
|
+
onBlur: this.onBlur,
|
|
270
|
+
onFocus: this.onFocus,
|
|
302
271
|
onMouseOver: this.showToolTip,
|
|
303
|
-
onMouseOut: this.onMouseOut
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
})
|
|
318
|
-
|
|
319
|
-
|
|
272
|
+
onMouseOut: this.onMouseOut,
|
|
273
|
+
id: this.state.id,
|
|
274
|
+
className: anchorClasses,
|
|
275
|
+
display: display,
|
|
276
|
+
isVisible: visible
|
|
277
|
+
}), children), visible && (content || title) && ___EmotionJSX(EuiPortal, null, ___EmotionJSX(EuiToolTipPopover, _extends({
|
|
278
|
+
className: classes,
|
|
279
|
+
style: toolTipStyles,
|
|
280
|
+
positionToolTip: this.positionToolTip,
|
|
281
|
+
popoverRef: this.setPopoverRef,
|
|
282
|
+
title: title,
|
|
283
|
+
id: id,
|
|
284
|
+
role: "tooltip",
|
|
285
|
+
calculatedPosition: calculatedPosition
|
|
286
|
+
}, rest), ___EmotionJSX(EuiToolTipArrow, {
|
|
287
|
+
style: arrowStyles,
|
|
288
|
+
className: "euiToolTip__arrow"
|
|
289
|
+
}), ___EmotionJSX(EuiResizeObserver, {
|
|
290
|
+
onResize: this.positionToolTip
|
|
291
|
+
}, function (resizeRef) {
|
|
292
|
+
return ___EmotionJSX("div", {
|
|
293
|
+
ref: resizeRef
|
|
294
|
+
}, content);
|
|
295
|
+
}))));
|
|
320
296
|
}
|
|
321
297
|
}]);
|
|
322
298
|
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
|
|
3
|
+
var _templateObject, _templateObject2;
|
|
4
|
+
|
|
5
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
9
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
10
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
11
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
12
|
+
* Side Public License, v 1.
|
|
13
|
+
*/
|
|
14
|
+
import { css, keyframes } from '@emotion/react';
|
|
15
|
+
import { logicalCSS, logicalSizeCSS, euiFontSize } from '../../global_styling';
|
|
16
|
+
import { COLOR_MODES_STANDARD, tint, shade } from '../../services';
|
|
17
|
+
import { euiShadow } from '../../themes/amsterdam';
|
|
18
|
+
export var euiToolTipBackgroundColor = function euiToolTipBackgroundColor(euiTheme, colorMode) {
|
|
19
|
+
return colorMode === COLOR_MODES_STANDARD.dark ? shade(euiTheme.colors.emptyShade, 1) : tint(euiTheme.colors.fullShade, 0.25);
|
|
20
|
+
};
|
|
21
|
+
export var euiToolTipBorderColor = function euiToolTipBorderColor(euiTheme, colorMode) {
|
|
22
|
+
return colorMode === COLOR_MODES_STANDARD.dark ? shade(euiTheme.colors.fullShade, 0.8) : tint(euiTheme.colors.fullShade, 0.35);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
var euiToolTipAnimationVertical = function euiToolTipAnimationVertical(size) {
|
|
26
|
+
return keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% {\n opacity: 0;\n transform: translateY(", ");\n }\n\n 100% {\n opacity: 1;\n transform: translateY(0);\n }\n"])), size);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
var euiToolTipAnimationHorizontal = function euiToolTipAnimationHorizontal(size) {
|
|
30
|
+
return keyframes(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n 0% {\n opacity: 0;\n transform: translateX(", ");\n }\n\n 100% {\n opacity: 1;\n transform: translateX(0);\n }\n"])), size);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export var euiToolTipStyles = function euiToolTipStyles(euiThemeContext) {
|
|
34
|
+
var euiTheme = euiThemeContext.euiTheme,
|
|
35
|
+
colorMode = euiThemeContext.colorMode;
|
|
36
|
+
var animationTiming = "".concat(euiTheme.animation.slow, " ease-out 0s forwards");
|
|
37
|
+
/*
|
|
38
|
+
* 1. Shift arrow 1px more than half its size to account for border radius
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
var arrowSize = euiTheme.size.m;
|
|
42
|
+
var arrowSizeInt = parseInt(arrowSize, 10);
|
|
43
|
+
var arrowPlusSize = "".concat((arrowSizeInt / 2 + 1) * -1, "px");
|
|
44
|
+
/* 1 */
|
|
45
|
+
|
|
46
|
+
var arrowMinusSize = "".concat((arrowSizeInt / 2 - 1) * -1, "px");
|
|
47
|
+
/* 1 */
|
|
48
|
+
|
|
49
|
+
return {
|
|
50
|
+
// Base
|
|
51
|
+
euiToolTip: /*#__PURE__*/css(euiShadow(euiThemeContext), ";border-radius:", euiTheme.border.radius.medium, ";background-color:", euiToolTipBackgroundColor(euiTheme, colorMode), ";color:", euiTheme.colors.ghost, ";z-index:", euiTheme.levels.toast, ";", logicalCSS('max-width', '256px'), " overflow-wrap:break-word;padding:", euiTheme.size.s, ";", euiFontSize(euiThemeContext, 's'), ";position:absolute;[class*='euiHorizontalRule']{background-color:", euiToolTipBorderColor(euiTheme, colorMode), ";};label:euiToolTip;"),
|
|
52
|
+
// Sizes
|
|
53
|
+
s: /*#__PURE__*/css(euiFontSize(euiThemeContext, 'xs'), ";;label:s;"),
|
|
54
|
+
// Positions
|
|
55
|
+
top: /*#__PURE__*/css("animation:", euiToolTipAnimationVertical("-".concat(euiTheme.size.base)), " ", animationTiming, ";;label:top;"),
|
|
56
|
+
bottom: /*#__PURE__*/css("animation:", euiToolTipAnimationVertical(euiTheme.size.base), " ", animationTiming, ";[class*='euiToolTip__arrow']{transform:translateY(", arrowMinusSize, ") rotateZ(45deg);};label:bottom;"),
|
|
57
|
+
left: /*#__PURE__*/css("animation:", euiToolTipAnimationHorizontal("-".concat(euiTheme.size.base)), " ", animationTiming, ";[class*='euiToolTip__arrow']{transform:translateX(", arrowPlusSize, ") rotateZ(45deg);};label:left;"),
|
|
58
|
+
right: /*#__PURE__*/css("animation:", euiToolTipAnimationHorizontal(euiTheme.size.base), " ", animationTiming, ";[class*='euiToolTip__arrow']{transform:translateX(", arrowMinusSize, ") rotateZ(45deg);};label:right;"),
|
|
59
|
+
// Elements
|
|
60
|
+
euiToolTip__arrow: /*#__PURE__*/css("content:'';position:absolute;transform-origin:center;border-radius:2px;background-color:", euiToolTipBackgroundColor(euiTheme, colorMode), ";", logicalSizeCSS(arrowSize, arrowSize), ";transform:translateY(", arrowPlusSize, ") rotateZ(45deg);;label:euiToolTip__arrow;")
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
export var euiToolTipPopoverStyles = function euiToolTipPopoverStyles(_ref4) {
|
|
64
|
+
var euiTheme = _ref4.euiTheme,
|
|
65
|
+
colorMode = _ref4.colorMode;
|
|
66
|
+
return {
|
|
67
|
+
// Elements
|
|
68
|
+
euiToolTip__title: /*#__PURE__*/css("font-weight:", euiTheme.font.weight.bold, ";", logicalCSS('border-bottom', "solid ".concat(euiTheme.border.width.thin, " ").concat(euiToolTipBorderColor(euiTheme, colorMode))), ";", logicalCSS('padding-bottom', euiTheme.size.xs), ";", logicalCSS('margin-bottom', euiTheme.size.xs), ";;label:euiToolTip__title;")
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
73
|
+
name: "fzilnk-inlineBlock",
|
|
74
|
+
styles: "display:inline-block;label:inlineBlock;"
|
|
75
|
+
} : {
|
|
76
|
+
name: "fzilnk-inlineBlock",
|
|
77
|
+
styles: "display:inline-block;label:inlineBlock;",
|
|
78
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
82
|
+
name: "14aceuy-block",
|
|
83
|
+
styles: "display:block;label:block;"
|
|
84
|
+
} : {
|
|
85
|
+
name: "14aceuy-block",
|
|
86
|
+
styles: "display:block;label:block;",
|
|
87
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
var _ref3 = process.env.NODE_ENV === "production" ? {
|
|
91
|
+
name: "1s3i3p5-euiToolTipAnchor",
|
|
92
|
+
styles: "*[disabled]{pointer-events:none;};label:euiToolTipAnchor;"
|
|
93
|
+
} : {
|
|
94
|
+
name: "1s3i3p5-euiToolTipAnchor",
|
|
95
|
+
styles: "*[disabled]{pointer-events:none;};label:euiToolTipAnchor;",
|
|
96
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export var euiToolTipAnchorStyles = function euiToolTipAnchorStyles() {
|
|
100
|
+
return {
|
|
101
|
+
// Elements
|
|
102
|
+
euiToolTipAnchor: _ref3,
|
|
103
|
+
// Variants
|
|
104
|
+
block: _ref2,
|
|
105
|
+
inlineBlock: _ref
|
|
106
|
+
};
|
|
107
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
+
var _excluded = ["onBlur", "onFocus", "onMouseOver", "onMouseOut", "id", "className", "children", "display", "isVisible"];
|
|
5
|
+
|
|
6
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
7
|
+
|
|
8
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
9
|
+
|
|
10
|
+
/*
|
|
11
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
12
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
13
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
14
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
15
|
+
* Side Public License, v 1.
|
|
16
|
+
*/
|
|
17
|
+
import React, { cloneElement, forwardRef } from 'react';
|
|
18
|
+
import classNames from 'classnames';
|
|
19
|
+
import { euiToolTipAnchorStyles } from './tool_tip.styles';
|
|
20
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
21
|
+
export var EuiToolTipAnchor = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
22
|
+
var _onBlur = _ref.onBlur,
|
|
23
|
+
_onFocus = _ref.onFocus,
|
|
24
|
+
onMouseOver = _ref.onMouseOver,
|
|
25
|
+
onMouseOut = _ref.onMouseOut,
|
|
26
|
+
id = _ref.id,
|
|
27
|
+
className = _ref.className,
|
|
28
|
+
children = _ref.children,
|
|
29
|
+
display = _ref.display,
|
|
30
|
+
isVisible = _ref.isVisible,
|
|
31
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
32
|
+
|
|
33
|
+
var anchorCss = euiToolTipAnchorStyles();
|
|
34
|
+
var cssStyles = [anchorCss.euiToolTipAnchor, anchorCss[display]];
|
|
35
|
+
var classes = classNames('euiToolTipAnchor', className);
|
|
36
|
+
return (// eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
|
|
37
|
+
___EmotionJSX("span", _extends({
|
|
38
|
+
ref: ref
|
|
39
|
+
}, rest, {
|
|
40
|
+
css: cssStyles,
|
|
41
|
+
className: classes,
|
|
42
|
+
onMouseOver: onMouseOver,
|
|
43
|
+
onMouseOut: onMouseOut
|
|
44
|
+
}), /*#__PURE__*/cloneElement(children, _objectSpread({
|
|
45
|
+
onFocus: function onFocus(e) {
|
|
46
|
+
_onFocus();
|
|
47
|
+
|
|
48
|
+
children.props.onFocus && children.props.onFocus(e);
|
|
49
|
+
},
|
|
50
|
+
onBlur: function onBlur(e) {
|
|
51
|
+
_onBlur();
|
|
52
|
+
|
|
53
|
+
children.props.onBlur && children.props.onBlur(e);
|
|
54
|
+
}
|
|
55
|
+
}, isVisible && {
|
|
56
|
+
'aria-describedby': id
|
|
57
|
+
})))
|
|
58
|
+
);
|
|
59
|
+
});
|
|
60
|
+
EuiToolTipAnchor.displayName = 'EuiToolTipAnchor';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
5
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
6
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
7
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
8
|
+
* Side Public License, v 1.
|
|
9
|
+
*/
|
|
10
|
+
import React from 'react';
|
|
11
|
+
import { useEuiTheme } from '../../services';
|
|
12
|
+
import { euiToolTipStyles } from './tool_tip.styles';
|
|
13
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
14
|
+
export var EuiToolTipArrow = function EuiToolTipArrow(props) {
|
|
15
|
+
var euiTheme = useEuiTheme();
|
|
16
|
+
var toolTipCss = euiToolTipStyles(euiTheme);
|
|
17
|
+
return ___EmotionJSX("div", _extends({
|
|
18
|
+
css: [toolTipCss.euiToolTip__arrow, ";label:EuiToolTipArrow;"]
|
|
19
|
+
}, props));
|
|
20
|
+
};
|
|
@@ -1,17 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
|
|
4
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
5
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
6
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
8
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
9
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
10
|
-
var _excluded = ["children", "title", "className", "positionToolTip", "popoverRef"];
|
|
11
|
-
|
|
12
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
13
|
-
|
|
14
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
3
|
+
var _excluded = ["children", "title", "className", "positionToolTip", "popoverRef", "calculatedPosition"];
|
|
15
4
|
|
|
16
5
|
/*
|
|
17
6
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -20,85 +9,55 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
20
9
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
21
10
|
* Side Public License, v 1.
|
|
22
11
|
*/
|
|
23
|
-
import React, {
|
|
12
|
+
import React, { useEffect, useRef, useCallback } from 'react';
|
|
24
13
|
import classNames from 'classnames';
|
|
14
|
+
import { useEuiTheme } from '../../services';
|
|
15
|
+
import { euiToolTipStyles, euiToolTipPopoverStyles } from './tool_tip.styles';
|
|
25
16
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
26
|
-
export var EuiToolTipPopover =
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
requestAnimationFrame(function () {
|
|
46
|
-
// Because of this delay, sometimes `positionToolTip` becomes unavailable.
|
|
47
|
-
if (_this.popover) {
|
|
48
|
-
_this.props.positionToolTip();
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
_defineProperty(_assertThisInitialized(_this), "setPopoverRef", function (ref) {
|
|
54
|
-
_this.popover = ref;
|
|
55
|
-
|
|
56
|
-
if (_this.props.popoverRef) {
|
|
57
|
-
_this.props.popoverRef(ref);
|
|
17
|
+
export var EuiToolTipPopover = function EuiToolTipPopover(_ref) {
|
|
18
|
+
var children = _ref.children,
|
|
19
|
+
title = _ref.title,
|
|
20
|
+
className = _ref.className,
|
|
21
|
+
positionToolTip = _ref.positionToolTip,
|
|
22
|
+
popoverRef = _ref.popoverRef,
|
|
23
|
+
calculatedPosition = _ref.calculatedPosition,
|
|
24
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
25
|
+
|
|
26
|
+
var popover = useRef();
|
|
27
|
+
var euiTheme = useEuiTheme();
|
|
28
|
+
var toolTipCss = euiToolTipStyles(euiTheme);
|
|
29
|
+
var popoverStyles = euiToolTipPopoverStyles(euiTheme);
|
|
30
|
+
var titleCss = [popoverStyles.euiToolTip__title];
|
|
31
|
+
var updateDimensions = useCallback(function () {
|
|
32
|
+
requestAnimationFrame(function () {
|
|
33
|
+
// Because of this delay, sometimes `positionToolTip` becomes unavailable.
|
|
34
|
+
if (popover.current) {
|
|
35
|
+
positionToolTip();
|
|
58
36
|
}
|
|
59
37
|
});
|
|
38
|
+
}, [positionToolTip]);
|
|
60
39
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
_createClass(EuiToolTipPopover, [{
|
|
65
|
-
key: "componentDidMount",
|
|
66
|
-
value: function componentDidMount() {
|
|
67
|
-
document.body.classList.add('euiBody-hasPortalContent');
|
|
68
|
-
window.addEventListener('resize', this.updateDimensions);
|
|
40
|
+
var setPopoverRef = function setPopoverRef(ref) {
|
|
41
|
+
if (popoverRef) {
|
|
42
|
+
popoverRef(ref);
|
|
69
43
|
}
|
|
70
|
-
}
|
|
71
|
-
key: "componentWillUnmount",
|
|
72
|
-
value: function componentWillUnmount() {
|
|
73
|
-
document.body.classList.remove('euiBody-hasPortalContent');
|
|
74
|
-
window.removeEventListener('resize', this.updateDimensions);
|
|
75
|
-
}
|
|
76
|
-
}, {
|
|
77
|
-
key: "render",
|
|
78
|
-
value: function render() {
|
|
79
|
-
var _this$props = this.props,
|
|
80
|
-
children = _this$props.children,
|
|
81
|
-
title = _this$props.title,
|
|
82
|
-
className = _this$props.className,
|
|
83
|
-
positionToolTip = _this$props.positionToolTip,
|
|
84
|
-
popoverRef = _this$props.popoverRef,
|
|
85
|
-
rest = _objectWithoutProperties(_this$props, _excluded);
|
|
86
|
-
|
|
87
|
-
var classes = classNames('euiToolTipPopover', className);
|
|
88
|
-
var optionalTitle;
|
|
44
|
+
};
|
|
89
45
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
46
|
+
useEffect(function () {
|
|
47
|
+
document.body.classList.add('euiBody-hasPortalContent');
|
|
48
|
+
window.addEventListener('resize', updateDimensions);
|
|
49
|
+
return function () {
|
|
50
|
+
document.body.classList.remove('euiBody-hasPortalContent');
|
|
51
|
+
window.removeEventListener('resize', updateDimensions);
|
|
52
|
+
};
|
|
53
|
+
}, [updateDimensions]);
|
|
54
|
+
var classes = classNames('euiToolTipPopover', className);
|
|
55
|
+
return ___EmotionJSX("div", _extends({
|
|
56
|
+
css: [toolTipCss.euiToolTip, calculatedPosition && toolTipCss[calculatedPosition], ";label:EuiToolTipPopover;"],
|
|
57
|
+
className: classes,
|
|
58
|
+
ref: setPopoverRef
|
|
59
|
+
}, rest), title && ___EmotionJSX("div", {
|
|
60
|
+
css: titleCss,
|
|
61
|
+
className: "euiToolTip__title"
|
|
62
|
+
}, title), children);
|
|
63
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"height": "block-size",
|
|
3
|
+
"width": "inline-size",
|
|
4
|
+
"max-height": "max-block-size",
|
|
5
|
+
"max-width": "max-inline-size",
|
|
6
|
+
"min-height": "min-block-size",
|
|
7
|
+
"min-width": "min-inline-size",
|
|
8
|
+
"top": "inset-block-start",
|
|
9
|
+
"right": "inset-inline-end",
|
|
10
|
+
"bottom": "inset-block-end",
|
|
11
|
+
"left": "inset-inline-start",
|
|
12
|
+
"horizontal": "inset-block",
|
|
13
|
+
"vertical": "inset-inline",
|
|
14
|
+
"margin-left": "margin-inline-start",
|
|
15
|
+
"margin-right": "margin-inline-end",
|
|
16
|
+
"margin-top": "margin-block-start",
|
|
17
|
+
"margin-bottom": "margin-block-end",
|
|
18
|
+
"margin-horizontal": "margin-inline",
|
|
19
|
+
"margin-vertical": "margin-block",
|
|
20
|
+
"padding-left": "padding-inline-start",
|
|
21
|
+
"padding-right": "padding-inline-end",
|
|
22
|
+
"padding-top": "padding-block-start",
|
|
23
|
+
"padding-bottom": "padding-block-end",
|
|
24
|
+
"padding-horizontal": "padding-inline",
|
|
25
|
+
"padding-vertical": "padding-block",
|
|
26
|
+
"overflow-x": "overflow-inline",
|
|
27
|
+
"overflow-y": "overflow-block",
|
|
28
|
+
"border-horizontal": "border-inline",
|
|
29
|
+
"border-horizontal-color": "border-inline-color",
|
|
30
|
+
"border-horizontal-width": "border-inline-width",
|
|
31
|
+
"border-horizontal-style": "border-inline-style",
|
|
32
|
+
"border-vertical": "border-block",
|
|
33
|
+
"border-vertical-color": "border-block-color",
|
|
34
|
+
"border-vertical-width": "border-block-width",
|
|
35
|
+
"border-vertical-style": "border-block-style",
|
|
36
|
+
"border-bottom": "border-block-end",
|
|
37
|
+
"border-bottom-color": "border-block-end-color",
|
|
38
|
+
"border-bottom-style": "border-block-end-style",
|
|
39
|
+
"border-bottom-width": "border-block-end-width",
|
|
40
|
+
"border-top": "border-block-start",
|
|
41
|
+
"border-top-color": "border-block-start-color",
|
|
42
|
+
"border-top-style": "border-block-start-style",
|
|
43
|
+
"border-top-width": "border-block-start-width",
|
|
44
|
+
"border-right": "border-inline-end",
|
|
45
|
+
"border-right-color": "border-inline-end-color",
|
|
46
|
+
"border-right-style": "border-inline-end-style",
|
|
47
|
+
"border-right-width": "border-inline-end-width",
|
|
48
|
+
"border-left": "border-inline-start",
|
|
49
|
+
"border-left-color": "border-inline-start-color",
|
|
50
|
+
"border-left-style": "border-inline-start-style",
|
|
51
|
+
"border-left-width": "border-inline-start-width",
|
|
52
|
+
"border-top-left-radius": "border-start-start-radius",
|
|
53
|
+
"border-top-right-radius": "border-start-end-radius",
|
|
54
|
+
"border-bottom-left-radius": "border-end-start-radius",
|
|
55
|
+
"border-bottom-right-radius": "border-end-end-radius"
|
|
56
|
+
}
|
|
@@ -29,7 +29,7 @@ export var useEuiFontSize = function useEuiFontSize(scale, options) {
|
|
|
29
29
|
*/
|
|
30
30
|
|
|
31
31
|
export var euiTextBreakWord = function euiTextBreakWord() {
|
|
32
|
-
return "\n overflow-wrap: break-word !important; // makes sure the long string will wrap and not bust out of the container\n word-
|
|
32
|
+
return "\n overflow-wrap: break-word !important; // makes sure the long string will wrap and not bust out of the container\n word-break: break-word;\n";
|
|
33
33
|
};
|
|
34
34
|
/**
|
|
35
35
|
* Prevent text from wrapping onto multiple lines, and truncate with an ellipsis.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
|
|
3
|
+
var _templateObject;
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
7
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
8
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
9
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
10
|
+
* Side Public License, v 1.
|
|
11
|
+
*/
|
|
12
|
+
import { keyframes } from '@emotion/react';
|
|
13
|
+
export var euiAnimFadeIn = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n"])));
|
|
@@ -7,18 +7,21 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
7
7
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
8
8
|
* Side Public License, v 1.
|
|
9
9
|
*/
|
|
10
|
-
import React, { forwardRef, useContext } from 'react';
|
|
10
|
+
import React, { forwardRef, useContext, useMemo } from 'react';
|
|
11
11
|
import { EuiThemeContext, EuiModificationsContext, EuiColorModeContext } from './context';
|
|
12
12
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
13
13
|
export var useEuiTheme = function useEuiTheme() {
|
|
14
14
|
var theme = useContext(EuiThemeContext);
|
|
15
15
|
var colorMode = useContext(EuiColorModeContext);
|
|
16
16
|
var modifications = useContext(EuiModificationsContext);
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
var assembledTheme = useMemo(function () {
|
|
18
|
+
return {
|
|
19
|
+
euiTheme: theme,
|
|
20
|
+
colorMode: colorMode,
|
|
21
|
+
modifications: modifications
|
|
22
|
+
};
|
|
23
|
+
}, [theme, colorMode, modifications]);
|
|
24
|
+
return assembledTheme;
|
|
22
25
|
};
|
|
23
26
|
// Provide the component props interface as the generic to allow the docs props table to populate.
|
|
24
27
|
// e.g., `const EuiComponent = withEuiTheme<EuiComponentProps>(_EuiComponent)`
|
|
@@ -26,17 +29,9 @@ export var withEuiTheme = function withEuiTheme(Component) {
|
|
|
26
29
|
var componentName = Component.displayName || Component.name || 'ComponentWithTheme';
|
|
27
30
|
|
|
28
31
|
var Render = function Render(props, ref) {
|
|
29
|
-
var
|
|
30
|
-
euiTheme = _useEuiTheme.euiTheme,
|
|
31
|
-
colorMode = _useEuiTheme.colorMode,
|
|
32
|
-
modifications = _useEuiTheme.modifications;
|
|
33
|
-
|
|
32
|
+
var theme = useEuiTheme();
|
|
34
33
|
return ___EmotionJSX(Component, _extends({
|
|
35
|
-
theme:
|
|
36
|
-
euiTheme: euiTheme,
|
|
37
|
-
colorMode: colorMode,
|
|
38
|
-
modifications: modifications
|
|
39
|
-
},
|
|
34
|
+
theme: theme,
|
|
40
35
|
ref: ref
|
|
41
36
|
}, props));
|
|
42
37
|
};
|