@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["className", "children", "
|
|
3
|
+
var _excluded = ["className", "children", "headerZindexLocation", "maskRef", "css"];
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -14,87 +14,54 @@ var _excluded = ["className", "children", "onClick", "headerZindexLocation", "ma
|
|
|
14
14
|
* NOTE: We can't test this component because Enzyme doesn't support rendering
|
|
15
15
|
* into portals.
|
|
16
16
|
*/
|
|
17
|
-
import React, { useEffect,
|
|
18
|
-
import { createPortal } from 'react-dom';
|
|
17
|
+
import React, { useEffect, useState } from 'react';
|
|
19
18
|
import classNames from 'classnames';
|
|
19
|
+
import { Global } from '@emotion/react';
|
|
20
20
|
import { keysOf } from '../common';
|
|
21
|
-
import { useCombinedRefs } from '../../services';
|
|
21
|
+
import { useCombinedRefs, useEuiTheme } from '../../services';
|
|
22
|
+
import { EuiPortal } from '../portal';
|
|
23
|
+
import { euiOverlayMaskStyles, euiOverlayMaskBodyStyles } from './overlay_mask.styles';
|
|
22
24
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
23
25
|
export var EuiOverlayMask = function EuiOverlayMask(_ref) {
|
|
24
26
|
var className = _ref.className,
|
|
25
27
|
children = _ref.children,
|
|
26
|
-
onClick = _ref.onClick,
|
|
27
28
|
_ref$headerZindexLoca = _ref.headerZindexLocation,
|
|
28
29
|
headerZindexLocation = _ref$headerZindexLoca === void 0 ? 'above' : _ref$headerZindexLoca,
|
|
29
30
|
maskRef = _ref.maskRef,
|
|
30
31
|
css = _ref.css,
|
|
31
32
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
32
33
|
|
|
33
|
-
var
|
|
34
|
-
var combinedMaskRef = useCombinedRefs([overlayMaskNode, maskRef]);
|
|
35
|
-
|
|
36
|
-
var _useState = useState(false),
|
|
34
|
+
var _useState = useState(null),
|
|
37
35
|
_useState2 = _slicedToArray(_useState, 2),
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
useEffect(function () {
|
|
42
|
-
document.body.classList.add('euiBody-hasOverlayMask');
|
|
43
|
-
return function () {
|
|
44
|
-
document.body.classList.remove('euiBody-hasOverlayMask');
|
|
45
|
-
};
|
|
46
|
-
}, []);
|
|
47
|
-
useEffect(function () {
|
|
48
|
-
if (typeof document !== 'undefined') {
|
|
49
|
-
combinedMaskRef(document.createElement('div'));
|
|
50
|
-
}
|
|
51
|
-
}, []); // eslint-disable-line react-hooks/exhaustive-deps
|
|
52
|
-
|
|
53
|
-
useEffect(function () {
|
|
54
|
-
var portalTarget = overlayMaskNode.current;
|
|
36
|
+
overlayMaskNode = _useState2[0],
|
|
37
|
+
setOverlayMaskNode = _useState2[1];
|
|
55
38
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
setIsPortalTargetReady(true);
|
|
61
|
-
return function () {
|
|
62
|
-
if (portalTarget) {
|
|
63
|
-
document.body.removeChild(portalTarget);
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
}, []);
|
|
39
|
+
var combinedMaskRef = useCombinedRefs([setOverlayMaskNode, maskRef]);
|
|
40
|
+
var euiTheme = useEuiTheme();
|
|
41
|
+
var styles = euiOverlayMaskStyles(euiTheme);
|
|
42
|
+
var cssStyles = [styles.euiOverlayMask, styles["".concat(headerZindexLocation, "Header")]];
|
|
67
43
|
useEffect(function () {
|
|
68
|
-
if (!overlayMaskNode
|
|
44
|
+
if (!overlayMaskNode) return;
|
|
69
45
|
keysOf(rest).forEach(function (key) {
|
|
70
46
|
if (typeof rest[key] !== 'string') {
|
|
71
47
|
throw new Error("Unhandled property type. EuiOverlayMask property ".concat(key, " is not a string."));
|
|
72
48
|
}
|
|
73
49
|
|
|
74
|
-
if (overlayMaskNode
|
|
75
|
-
overlayMaskNode.
|
|
50
|
+
if (overlayMaskNode) {
|
|
51
|
+
overlayMaskNode.setAttribute(key, rest[key]);
|
|
76
52
|
}
|
|
77
53
|
});
|
|
78
|
-
}, []); // eslint-disable-line react-hooks/exhaustive-deps
|
|
54
|
+
}, [overlayMaskNode]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
79
55
|
|
|
80
56
|
useEffect(function () {
|
|
81
|
-
if (!overlayMaskNode
|
|
82
|
-
overlayMaskNode.
|
|
83
|
-
}, [
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
portalTarget.addEventListener('click', listener);
|
|
95
|
-
return function () {
|
|
96
|
-
portalTarget.removeEventListener('click', listener);
|
|
97
|
-
};
|
|
98
|
-
}, [onClick]);
|
|
99
|
-
return isPortalTargetReady ? ___EmotionJSX(React.Fragment, null, /*#__PURE__*/createPortal(children, overlayMaskNode.current)) : null;
|
|
57
|
+
if (!overlayMaskNode) return;
|
|
58
|
+
overlayMaskNode.className = classNames('euiOverlayMask', className);
|
|
59
|
+
}, [overlayMaskNode, className]);
|
|
60
|
+
return ___EmotionJSX(EuiPortal, {
|
|
61
|
+
portalRef: combinedMaskRef
|
|
62
|
+
}, ___EmotionJSX(Global, {
|
|
63
|
+
styles: euiOverlayMaskBodyStyles
|
|
64
|
+
}), ___EmotionJSX(Global, {
|
|
65
|
+
styles: cssStyles
|
|
66
|
+
}), children);
|
|
100
67
|
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
5
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
6
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
7
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
8
|
+
* Side Public License, v 1.
|
|
9
|
+
*/
|
|
10
|
+
import { css } from '@emotion/react';
|
|
11
|
+
import { logicalCSS, euiAnimFadeIn } from '../../global_styling';
|
|
12
|
+
import { transparentize } from '../../services';
|
|
13
|
+
export var euiOverlayMaskStyles = function euiOverlayMaskStyles(_ref) {
|
|
14
|
+
var euiTheme = _ref.euiTheme;
|
|
15
|
+
return {
|
|
16
|
+
euiOverlayMask: /*#__PURE__*/css(".euiOverlayMask{position:fixed;", logicalCSS('top', 0), " ", logicalCSS('left', 0), " ", logicalCSS('right', 0), " ", logicalCSS('bottom', 0), " display:flex;align-items:center;justify-content:center;", logicalCSS('padding-bottom', '10vh'), ";animation:", euiAnimFadeIn, " ", euiTheme.animation.fast, " ease-in;background:", transparentize(euiTheme.colors.ink, 0.5), ";};label:euiOverlayMask;"),
|
|
17
|
+
aboveHeader: /*#__PURE__*/css(".euiOverlayMask{z-index:", euiTheme.levels.mask, ";};label:aboveHeader;"),
|
|
18
|
+
belowHeader: /*#__PURE__*/css(".euiOverlayMask{z-index:", euiTheme.levels.maskBelowHeader, ";", logicalCSS('top', "".concat(euiTheme.base * 3, "px")), ";};label:belowHeader;")
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export var euiOverlayMaskBodyStyles = process.env.NODE_ENV === "production" ? {
|
|
22
|
+
name: "131160-euiOverlayMaskBodyStyles",
|
|
23
|
+
styles: "body{overflow:hidden;};label:euiOverlayMaskBodyStyles;"
|
|
24
|
+
} : {
|
|
25
|
+
name: "131160-euiOverlayMaskBodyStyles",
|
|
26
|
+
styles: "body{overflow:hidden;};label:euiOverlayMaskBodyStyles;",
|
|
27
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
28
|
+
};
|
|
@@ -21,8 +21,7 @@ var horizontalPositionToClassNameMap = {
|
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
25
|
-
* Use EuiPageSection instead
|
|
24
|
+
* @deprecated Use EuiPageSection instead
|
|
26
25
|
*/
|
|
27
26
|
export var EuiPageContent_Deprecated = function EuiPageContent_Deprecated(_ref) {
|
|
28
27
|
var verticalPosition = _ref.verticalPosition,
|
|
@@ -24,8 +24,7 @@ var paddingSizeToClassNameMap = {
|
|
|
24
24
|
export var PADDING_SIZES = keysOf(paddingSizeToClassNameMap);
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
28
|
-
* Use EuiPageSection instead
|
|
27
|
+
* @deprecated Use EuiPageSection instead
|
|
29
28
|
*/
|
|
30
29
|
export var EuiPageContentBody_Deprecated = function EuiPageContentBody_Deprecated(_ref) {
|
|
31
30
|
var children = _ref.children,
|
|
@@ -14,8 +14,7 @@ import classNames from 'classnames';
|
|
|
14
14
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
18
|
-
* Use EuiPageHeader instead
|
|
17
|
+
* @deprecated Use EuiPageHeader instead
|
|
19
18
|
*/
|
|
20
19
|
export var EuiPageContentHeader_Deprecated = function EuiPageContentHeader_Deprecated(_ref) {
|
|
21
20
|
var children = _ref.children,
|
|
@@ -14,8 +14,7 @@ import classNames from 'classnames';
|
|
|
14
14
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
18
|
-
* Use EuiPageHeader instead
|
|
17
|
+
* @deprecated Use EuiPageHeader instead
|
|
19
18
|
*/
|
|
20
19
|
export var EuiPageContentHeaderSection_Deprecated = function EuiPageContentHeaderSection_Deprecated(_ref) {
|
|
21
20
|
var children = _ref.children,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["children", "alignment", "restrictWidth", "bottomBorder", "paddingSize", "color", "grow", "contentProps"];
|
|
3
|
+
var _excluded = ["children", "alignment", "restrictWidth", "bottomBorder", "paddingSize", "color", "grow", "contentProps", "component"];
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -29,6 +29,8 @@ export var EuiPageSection = function EuiPageSection(_ref) {
|
|
|
29
29
|
_ref$grow = _ref.grow,
|
|
30
30
|
grow = _ref$grow === void 0 ? false : _ref$grow,
|
|
31
31
|
contentProps = _ref.contentProps,
|
|
32
|
+
_ref$component = _ref.component,
|
|
33
|
+
Component = _ref$component === void 0 ? 'section' : _ref$component,
|
|
32
34
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
33
35
|
|
|
34
36
|
// Set max-width as a style prop
|
|
@@ -41,7 +43,7 @@ export var EuiPageSection = function EuiPageSection(_ref) {
|
|
|
41
43
|
var cssStyles = [styles.euiPageSection, grow && styles.grow, inlinePadding[paddingSize], bottomBorder === 'extended' && styles.border, alignment && styles[alignment], colors[color]];
|
|
42
44
|
var contentStyles = euiPageSectionContentStyles();
|
|
43
45
|
var cssContentStyles = [contentStyles.euiPageSection__content, blockPadding[paddingSize], bottomBorder === true && styles.border, alignment.toLowerCase().includes('center') && contentStyles.center, restrictWidth && contentStyles.restrictWidth];
|
|
44
|
-
return ___EmotionJSX(
|
|
46
|
+
return ___EmotionJSX(Component, _extends({
|
|
45
47
|
css: cssStyles
|
|
46
48
|
}, rest), ___EmotionJSX("div", _extends({
|
|
47
49
|
css: cssContentStyles
|
|
@@ -22,8 +22,7 @@ var paddingSizeToClassNameMap = {
|
|
|
22
22
|
export var PADDING_SIZES = keysOf(paddingSizeToClassNameMap);
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
26
|
-
* Use the new EuiPageSidebar instead
|
|
25
|
+
* @deprecated Use the new EuiPageSidebar in page/page_sidebar instead
|
|
27
26
|
*/
|
|
28
27
|
export var EuiPageSideBar_Deprecated = function EuiPageSideBar_Deprecated(_ref) {
|
|
29
28
|
var children = _ref.children,
|
|
@@ -46,13 +46,17 @@ export var EuiPageSidebar = function EuiPageSidebar(_ref) {
|
|
|
46
46
|
setInlineStyles = _useState2[1];
|
|
47
47
|
|
|
48
48
|
useEffect(function () {
|
|
49
|
+
var updatedStyles = _objectSpread(_objectSpread({}, style), logicalStyle('min-width', isResponding ? '100%' : minWidth));
|
|
50
|
+
|
|
49
51
|
if (sticky) {
|
|
50
52
|
var _document$body$datase;
|
|
51
53
|
|
|
52
54
|
var euiHeaderFixedCounter = Number((_document$body$datase = document.body.dataset.fixedHeaders) !== null && _document$body$datase !== void 0 ? _document$body$datase : 0);
|
|
53
55
|
var offset = _typeof(sticky) === 'object' ? sticky === null || sticky === void 0 ? void 0 : sticky.offset : themeContext.euiTheme.base * 3 * euiHeaderFixedCounter;
|
|
54
|
-
|
|
56
|
+
updatedStyles = _objectSpread(_objectSpread(_objectSpread({}, updatedStyles), logicalStyle('top', offset)), logicalStyle('max-height', "calc(100vh - ".concat(offset, "px)")));
|
|
55
57
|
}
|
|
58
|
+
|
|
59
|
+
setInlineStyles(updatedStyles);
|
|
56
60
|
}, [style, sticky, themeContext.euiTheme.base, isResponding, minWidth]);
|
|
57
61
|
return ___EmotionJSX("div", _extends({
|
|
58
62
|
className: className,
|
|
@@ -32,7 +32,9 @@ export var TEMPLATES = ['default', 'centeredBody', 'centeredContent', 'empty'];
|
|
|
32
32
|
/**
|
|
33
33
|
* This component has been deprecated in favor of the new
|
|
34
34
|
* namespaced version. You can still import this component
|
|
35
|
-
*
|
|
35
|
+
* until August 2023 by importing `as EuiPageTemplate`.
|
|
36
|
+
*
|
|
37
|
+
* @deprecated use EuiPageTemplate from page_template/page_template instead
|
|
36
38
|
*/
|
|
37
39
|
export var EuiPageTemplate_Deprecated = function EuiPageTemplate_Deprecated(_ref) {
|
|
38
40
|
var _pageBodyProps2;
|
|
@@ -20,8 +20,10 @@ import { EuiPaginationButton } from './pagination_button';
|
|
|
20
20
|
import { EuiI18n, useEuiI18n } from '../i18n';
|
|
21
21
|
import { EuiText } from '../text';
|
|
22
22
|
import { EuiPaginationButtonArrow } from './pagination_button_arrow';
|
|
23
|
-
import { useIsWithinBreakpoints } from '../../services';
|
|
23
|
+
import { useIsWithinBreakpoints, useEuiTheme } from '../../services';
|
|
24
24
|
import { EuiScreenReaderOnly } from '../accessibility';
|
|
25
|
+
import { euiPaginationStyles } from './pagination.styles';
|
|
26
|
+
import { euiPaginationButtonStyles } from './pagination_button.styles';
|
|
25
27
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
26
28
|
var MAX_VISIBLE_PAGES = 5;
|
|
27
29
|
var NUMBER_SURROUNDING_PAGES = Math.floor(MAX_VISIBLE_PAGES * 0.5);
|
|
@@ -39,7 +41,13 @@ export var EuiPagination = function EuiPagination(_ref) {
|
|
|
39
41
|
responsive = _ref$responsive === void 0 ? ['xs', 's'] : _ref$responsive,
|
|
40
42
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
41
43
|
|
|
42
|
-
var isResponsive = useIsWithinBreakpoints(responsive, !!responsive);
|
|
44
|
+
var isResponsive = useIsWithinBreakpoints(responsive, !!responsive);
|
|
45
|
+
var euiTheme = useEuiTheme();
|
|
46
|
+
var paginationStyles = euiPaginationStyles(euiTheme);
|
|
47
|
+
|
|
48
|
+
var _euiPaginationButtonS = euiPaginationButtonStyles(euiTheme),
|
|
49
|
+
isPlaceholder = _euiPaginationButtonS.isPlaceholder; // Force to `compressed` version if specified or within the responsive breakpoints
|
|
50
|
+
|
|
43
51
|
|
|
44
52
|
var compressed = _compressed || isResponsive;
|
|
45
53
|
|
|
@@ -108,6 +116,7 @@ export var EuiPagination = function EuiPagination(_ref) {
|
|
|
108
116
|
if (compressed) {
|
|
109
117
|
centerPageCount = ___EmotionJSX(EuiText, {
|
|
110
118
|
size: "s",
|
|
119
|
+
css: paginationStyles.euiPagination__compressedText,
|
|
111
120
|
className: "euiPagination__compressedText"
|
|
112
121
|
}, ___EmotionJSX(EuiI18n, {
|
|
113
122
|
token: "euiPagination.pageOfTotalCompressed",
|
|
@@ -148,7 +157,8 @@ export var EuiPagination = function EuiPagination(_ref) {
|
|
|
148
157
|
}, function (firstRangeAriaLabel) {
|
|
149
158
|
return ___EmotionJSX("li", {
|
|
150
159
|
"aria-label": firstRangeAriaLabel,
|
|
151
|
-
className: "
|
|
160
|
+
className: "euiPagination__item",
|
|
161
|
+
css: isPlaceholder
|
|
152
162
|
}, "\u2026");
|
|
153
163
|
}));
|
|
154
164
|
} else if (firstPageInRange === 2) {
|
|
@@ -179,7 +189,8 @@ export var EuiPagination = function EuiPagination(_ref) {
|
|
|
179
189
|
}, function (lastRangeAriaLabel) {
|
|
180
190
|
return ___EmotionJSX("li", {
|
|
181
191
|
"aria-label": lastRangeAriaLabel,
|
|
182
|
-
className: "
|
|
192
|
+
className: "euiPagination__item",
|
|
193
|
+
css: isPlaceholder
|
|
183
194
|
}, "\u2026");
|
|
184
195
|
}));
|
|
185
196
|
}
|
|
@@ -199,6 +210,7 @@ export var EuiPagination = function EuiPagination(_ref) {
|
|
|
199
210
|
});
|
|
200
211
|
|
|
201
212
|
centerPageCount = ___EmotionJSX("ul", _extends({}, accessibleName, {
|
|
213
|
+
css: paginationStyles.euiPagination__list,
|
|
202
214
|
className: "euiPagination__list"
|
|
203
215
|
}), firstPageButtons, selectablePages, lastPageButtons);
|
|
204
216
|
}
|
|
@@ -223,6 +235,7 @@ export var EuiPagination = function EuiPagination(_ref) {
|
|
|
223
235
|
|
|
224
236
|
var accessiblePageCount = "".concat(accessiblePageString(), " ").concat(ofLabel, " ").concat(accessibleCollectionString);
|
|
225
237
|
return ___EmotionJSX("nav", _extends({
|
|
238
|
+
css: [paginationStyles.euiPagination, ";label:EuiPagination;"],
|
|
226
239
|
className: classes
|
|
227
240
|
}, rest), ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("span", {
|
|
228
241
|
"aria-atomic": "true",
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
5
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
6
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
7
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
8
|
+
* Side Public License, v 1.
|
|
9
|
+
*/
|
|
10
|
+
import { css } from '@emotion/react';
|
|
11
|
+
import { logicalCSS, logicalCSSWithFallback, euiScrollBarStyles } from '../../global_styling';
|
|
12
|
+
|
|
13
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
14
|
+
name: "1dbd2rc-euiPagination__list",
|
|
15
|
+
styles: "display:flex;align-items:baseline;label:euiPagination__list;"
|
|
16
|
+
} : {
|
|
17
|
+
name: "1dbd2rc-euiPagination__list",
|
|
18
|
+
styles: "display:flex;align-items:baseline;label:euiPagination__list;",
|
|
19
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export var euiPaginationStyles = function euiPaginationStyles(euiThemeContext) {
|
|
23
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
24
|
+
return {
|
|
25
|
+
// Base
|
|
26
|
+
euiPagination: /*#__PURE__*/css(euiScrollBarStyles(euiThemeContext), ";display:flex;align-items:center;", logicalCSSWithFallback('overflow-y', 'hidden'), ";", logicalCSSWithFallback('overflow-x', 'auto'), ";;label:euiPagination;"),
|
|
27
|
+
// Elements
|
|
28
|
+
euiPagination__compressedText: /*#__PURE__*/css("display:inline-flex;align-items:center;line-height:1!important;>span{", logicalCSS('margin-horizontal', euiTheme.size.s), ";font-weight:", euiTheme.font.weight.semiBold, ";&:first-of-type{color:", euiTheme.colors.primaryText, ";}};label:euiPagination__compressedText;"),
|
|
29
|
+
euiPagination__list: _ref
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -18,6 +18,8 @@ import React from 'react';
|
|
|
18
18
|
import classNames from 'classnames';
|
|
19
19
|
import { EuiButtonEmpty } from '../button';
|
|
20
20
|
import { EuiI18n } from '../i18n';
|
|
21
|
+
import { useEuiTheme } from '../../services';
|
|
22
|
+
import { euiPaginationButtonStyles } from './pagination_button.styles';
|
|
21
23
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
22
24
|
export var EuiPaginationButton = function EuiPaginationButton(_ref) {
|
|
23
25
|
var className = _ref.className,
|
|
@@ -27,12 +29,13 @@ export var EuiPaginationButton = function EuiPaginationButton(_ref) {
|
|
|
27
29
|
totalPages = _ref.totalPages,
|
|
28
30
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
29
31
|
|
|
30
|
-
var
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
var euiTheme = useEuiTheme();
|
|
33
|
+
var styles = euiPaginationButtonStyles(euiTheme);
|
|
34
|
+
var paginationButtonCss = [styles.euiPaginationButton, isActive && styles.isActive, isPlaceholder && styles.isPlaceholder];
|
|
35
|
+
var classes = classNames('euiPaginationButton', className);
|
|
34
36
|
|
|
35
37
|
var props = _objectSpread(_objectSpread(_objectSpread({
|
|
38
|
+
css: paginationButtonCss,
|
|
36
39
|
className: classes,
|
|
37
40
|
size: 's',
|
|
38
41
|
color: 'text',
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
import { css } from '@emotion/react';
|
|
9
|
+
import { logicalCSS, logicalTextAlignCSS, euiFontSize } from '../../global_styling';
|
|
10
|
+
import { euiButtonEmptyColor } from '../../themes/amsterdam/global_styling/mixins';
|
|
11
|
+
export var euiPaginationButtonStyles = function euiPaginationButtonStyles(euiThemeContext) {
|
|
12
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
13
|
+
var fontSizeS = euiFontSize(euiThemeContext, 's');
|
|
14
|
+
var halfSizeM = parseInt(euiTheme.size.m.replace('px', '')) / 2;
|
|
15
|
+
var disabled = euiButtonEmptyColor(euiThemeContext, 'disabled'); // && to increase specificity. Can likely be removed once EuiButtonEmpty has been converted.
|
|
16
|
+
|
|
17
|
+
return {
|
|
18
|
+
// Base
|
|
19
|
+
euiPaginationButton: /*#__PURE__*/css("&&{", fontSizeS, ";padding:0;", logicalTextAlignCSS('center'), " border-radius:", euiTheme.border.radius.medium, ";outline-offset:-", euiTheme.focus.width, ";};label:euiPaginationButton;"),
|
|
20
|
+
// States
|
|
21
|
+
isActive: /*#__PURE__*/css("&&{font-weight:", euiTheme.font.weight.bold, ";color:", euiTheme.colors.primary, ";.euiButtonEmpty__content{cursor:default;}&&,&&:hover{text-decoration:underline;}};label:isActive;"),
|
|
22
|
+
isPlaceholder: /*#__PURE__*/css("&&{align-items:baseline;color:", disabled.color, ";", fontSizeS, ";", logicalCSS('padding-top', "".concat(halfSizeM, "px")), ";", logicalCSS('padding-bottom', 0), ";", logicalCSS('padding-horizontal', euiTheme.size.s), ";", logicalCSS('height', euiTheme.size.l), ";};label:isPlaceholder;")
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export var euiPaginationButtonArrowStyles = function euiPaginationButtonArrowStyles(_ref) {
|
|
26
|
+
var euiTheme = _ref.euiTheme;
|
|
27
|
+
return {
|
|
28
|
+
euiPaginationArrowButton: /*#__PURE__*/css("outline-offset:-", euiTheme.focus.width, ";;label:euiPaginationArrowButton;")
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -12,6 +12,8 @@ import classNames from 'classnames';
|
|
|
12
12
|
import { EuiButtonIcon } from '../button/button_icon';
|
|
13
13
|
import { keysOf } from '../common';
|
|
14
14
|
import { useEuiI18n } from '../i18n';
|
|
15
|
+
import { useEuiTheme } from '../../services';
|
|
16
|
+
import { euiPaginationButtonArrowStyles } from './pagination_button.styles';
|
|
15
17
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
16
18
|
var typeToIconTypeMap = {
|
|
17
19
|
first: 'arrowStart',
|
|
@@ -26,6 +28,8 @@ export var EuiPaginationButtonArrow = function EuiPaginationButtonArrow(_ref) {
|
|
|
26
28
|
disabled = _ref.disabled,
|
|
27
29
|
ariaControls = _ref.ariaControls,
|
|
28
30
|
onClick = _ref.onClick;
|
|
31
|
+
var euiTheme = useEuiTheme();
|
|
32
|
+
var styles = euiPaginationButtonArrowStyles(euiTheme);
|
|
29
33
|
var labels = {
|
|
30
34
|
first: useEuiI18n('euiPaginationButtonArrow.firstPage', 'First page'),
|
|
31
35
|
previous: useEuiI18n('euiPaginationButtonArrow.previousPage', 'Previous page'),
|
|
@@ -40,6 +44,7 @@ export var EuiPaginationButtonArrow = function EuiPaginationButtonArrow(_ref) {
|
|
|
40
44
|
}
|
|
41
45
|
|
|
42
46
|
return ___EmotionJSX(EuiButtonIcon, _extends({
|
|
47
|
+
css: styles.euiPaginationArrowButton,
|
|
43
48
|
className: classNames('euiPaginationArrowButton', className),
|
|
44
49
|
color: "text",
|
|
45
50
|
"aria-label": labels[type],
|
|
@@ -6,18 +6,12 @@
|
|
|
6
6
|
* Side Public License, v 1.
|
|
7
7
|
*/
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import createCache from '@emotion/cache';
|
|
10
9
|
import { CacheProvider } from '@emotion/react';
|
|
11
10
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
12
|
-
var defaultCache = createCache({
|
|
13
|
-
key: 'css'
|
|
14
|
-
});
|
|
15
|
-
defaultCache.compat = true;
|
|
16
11
|
export var EuiCacheProvider = function EuiCacheProvider(_ref) {
|
|
17
|
-
var
|
|
18
|
-
cache = _ref$cache === void 0 ? defaultCache : _ref$cache,
|
|
12
|
+
var cache = _ref.cache,
|
|
19
13
|
children = _ref.children;
|
|
20
|
-
return ___EmotionJSX(CacheProvider, {
|
|
14
|
+
return children && cache ? ___EmotionJSX(CacheProvider, {
|
|
21
15
|
value: cache
|
|
22
|
-
}, children);
|
|
16
|
+
}, children) : ___EmotionJSX(React.Fragment, null, children);
|
|
23
17
|
};
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* Side Public License, v 1.
|
|
7
7
|
*/
|
|
8
8
|
import React from 'react';
|
|
9
|
+
import createCache from '@emotion/cache';
|
|
9
10
|
import { EuiGlobalStyles } from '../../global_styling/reset/global_styles';
|
|
10
11
|
import { EuiUtilityClasses } from '../../global_styling/utility/utility';
|
|
11
12
|
import { EuiThemeProvider, CurrentEuiBreakpointProvider } from '../../services';
|
|
@@ -17,8 +18,15 @@ var isEmotionCacheObject = function isEmotionCacheObject(obj) {
|
|
|
17
18
|
return obj.hasOwnProperty('key');
|
|
18
19
|
};
|
|
19
20
|
|
|
21
|
+
var fallbackCache = createCache({
|
|
22
|
+
key: 'css'
|
|
23
|
+
});
|
|
24
|
+
fallbackCache.compat = true;
|
|
20
25
|
export var EuiProvider = function EuiProvider(_ref) {
|
|
21
|
-
var
|
|
26
|
+
var _defaultCache;
|
|
27
|
+
|
|
28
|
+
var _ref$cache = _ref.cache,
|
|
29
|
+
cache = _ref$cache === void 0 ? fallbackCache : _ref$cache,
|
|
22
30
|
_ref$theme = _ref.theme,
|
|
23
31
|
theme = _ref$theme === void 0 ? EuiThemeAmsterdam : _ref$theme,
|
|
24
32
|
_ref$globalStyles = _ref.globalStyles,
|
|
@@ -34,16 +42,31 @@ export var EuiProvider = function EuiProvider(_ref) {
|
|
|
34
42
|
|
|
35
43
|
if (cache) {
|
|
36
44
|
if (isEmotionCacheObject(cache)) {
|
|
45
|
+
cache.compat = true;
|
|
37
46
|
defaultCache = cache;
|
|
38
47
|
} else {
|
|
48
|
+
if (cache.default) {
|
|
49
|
+
cache.default.compat = true;
|
|
50
|
+
}
|
|
51
|
+
|
|
39
52
|
defaultCache = cache.default;
|
|
53
|
+
|
|
54
|
+
if (cache.global) {
|
|
55
|
+
cache.global.compat = true;
|
|
56
|
+
}
|
|
57
|
+
|
|
40
58
|
globalCache = cache.global;
|
|
59
|
+
|
|
60
|
+
if (cache.utility) {
|
|
61
|
+
cache.utility.compat = true;
|
|
62
|
+
}
|
|
63
|
+
|
|
41
64
|
utilityCache = cache.utility;
|
|
42
65
|
}
|
|
43
66
|
}
|
|
44
67
|
|
|
45
68
|
return ___EmotionJSX(EuiCacheProvider, {
|
|
46
|
-
cache: defaultCache
|
|
69
|
+
cache: (_defaultCache = defaultCache) !== null && _defaultCache !== void 0 ? _defaultCache : fallbackCache
|
|
47
70
|
}, ___EmotionJSX(EuiThemeProvider, {
|
|
48
71
|
theme: theme !== null && theme !== void 0 ? theme : undefined,
|
|
49
72
|
colorMode: colorMode,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["onItemClick", "onBlur", "onFocus", "onInput", "onSearch", "status", "append", "tooltipContent", "suggestions", "id", "aria-label", "aria-labelledby", "isVirtualized", "fullWidth", "maxHeight"];
|
|
4
|
+
var _excluded = ["onItemClick", "onBlur", "onFocus", "onInput", "onSearch", "status", "append", "tooltipContent", "suggestions", "id", "aria-label", "aria-labelledby", "isPreFiltered", "isVirtualized", "fullWidth", "maxHeight"];
|
|
5
5
|
|
|
6
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
7
|
|
|
@@ -56,6 +56,8 @@ export var EuiSuggest = function EuiSuggest(_ref) {
|
|
|
56
56
|
id = _ref.id,
|
|
57
57
|
ariaLabel = _ref['aria-label'],
|
|
58
58
|
labelId = _ref['aria-labelledby'],
|
|
59
|
+
_ref$isPreFiltered = _ref.isPreFiltered,
|
|
60
|
+
isPreFiltered = _ref$isPreFiltered === void 0 ? false : _ref$isPreFiltered,
|
|
59
61
|
_ref$isVirtualized = _ref.isVirtualized,
|
|
60
62
|
isVirtualized = _ref$isVirtualized === void 0 ? false : _ref$isVirtualized,
|
|
61
63
|
_ref$fullWidth = _ref.fullWidth,
|
|
@@ -222,6 +224,7 @@ export var EuiSuggest = function EuiSuggest(_ref) {
|
|
|
222
224
|
isVirtualized: isVirtualized
|
|
223
225
|
},
|
|
224
226
|
searchable: true,
|
|
227
|
+
isPreFiltered: isPreFiltered,
|
|
225
228
|
searchProps: _objectSpread({
|
|
226
229
|
id: id,
|
|
227
230
|
append: appendArray.length ? appendArray : undefined,
|
|
@@ -118,24 +118,6 @@ export var EuiTabbedContent = /*#__PURE__*/function (_Component) {
|
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
_createClass(EuiTabbedContent, [{
|
|
121
|
-
key: "componentDidMount",
|
|
122
|
-
value: function componentDidMount() {
|
|
123
|
-
// IE11 doesn't support the `relatedTarget` event property for blur events
|
|
124
|
-
// but does add it for focusout. React doesn't support `onFocusOut` so here we are.
|
|
125
|
-
if (this.tabsRef.current) {
|
|
126
|
-
// Current short-term solution for event listener (see https://github.com/elastic/eui/pull/2717)
|
|
127
|
-
this.tabsRef.current.addEventListener('focusout', this.removeFocus);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
}, {
|
|
131
|
-
key: "componentWillUnmount",
|
|
132
|
-
value: function componentWillUnmount() {
|
|
133
|
-
if (this.tabsRef.current) {
|
|
134
|
-
// Current short-term solution for event listener (see https://github.com/elastic/eui/pull/2717)
|
|
135
|
-
this.tabsRef.current.removeEventListener('focusout', this.removeFocus);
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}, {
|
|
139
121
|
key: "render",
|
|
140
122
|
value: function render() {
|
|
141
123
|
var _this2 = this;
|
|
@@ -164,7 +146,8 @@ export var EuiTabbedContent = /*#__PURE__*/function (_Component) {
|
|
|
164
146
|
ref: this.tabsRef,
|
|
165
147
|
expand: expand,
|
|
166
148
|
size: size,
|
|
167
|
-
onFocus: this.initializeFocus
|
|
149
|
+
onFocus: this.initializeFocus,
|
|
150
|
+
onBlur: this.removeFocus
|
|
168
151
|
}, tabs.map(function (tab) {
|
|
169
152
|
var id = tab.id,
|
|
170
153
|
name = tab.name,
|