@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,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["className", "children", "
|
|
1
|
+
var _excluded = ["className", "children", "headerZindexLocation", "maskRef", "css"];
|
|
2
2
|
|
|
3
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
4
|
|
|
@@ -28,90 +28,57 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
28
28
|
* NOTE: We can't test this component because Enzyme doesn't support rendering
|
|
29
29
|
* into portals.
|
|
30
30
|
*/
|
|
31
|
-
import React, { useEffect,
|
|
31
|
+
import React, { useEffect, useState } from 'react';
|
|
32
32
|
import PropTypes from "prop-types";
|
|
33
|
-
import { createPortal } from 'react-dom';
|
|
34
33
|
import classNames from 'classnames';
|
|
34
|
+
import { Global } from '@emotion/react';
|
|
35
35
|
import { keysOf } from '../common';
|
|
36
|
-
import { useCombinedRefs } from '../../services';
|
|
36
|
+
import { useCombinedRefs, useEuiTheme } from '../../services';
|
|
37
|
+
import { EuiPortal } from '../portal';
|
|
38
|
+
import { euiOverlayMaskStyles, euiOverlayMaskBodyStyles } from './overlay_mask.styles';
|
|
37
39
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
38
40
|
export var EuiOverlayMask = function EuiOverlayMask(_ref) {
|
|
39
41
|
var className = _ref.className,
|
|
40
42
|
children = _ref.children,
|
|
41
|
-
onClick = _ref.onClick,
|
|
42
43
|
_ref$headerZindexLoca = _ref.headerZindexLocation,
|
|
43
44
|
headerZindexLocation = _ref$headerZindexLoca === void 0 ? 'above' : _ref$headerZindexLoca,
|
|
44
45
|
maskRef = _ref.maskRef,
|
|
45
46
|
css = _ref.css,
|
|
46
47
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
47
48
|
|
|
48
|
-
var
|
|
49
|
-
var combinedMaskRef = useCombinedRefs([overlayMaskNode, maskRef]);
|
|
50
|
-
|
|
51
|
-
var _useState = useState(false),
|
|
49
|
+
var _useState = useState(null),
|
|
52
50
|
_useState2 = _slicedToArray(_useState, 2),
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
useEffect(function () {
|
|
57
|
-
document.body.classList.add('euiBody-hasOverlayMask');
|
|
58
|
-
return function () {
|
|
59
|
-
document.body.classList.remove('euiBody-hasOverlayMask');
|
|
60
|
-
};
|
|
61
|
-
}, []);
|
|
62
|
-
useEffect(function () {
|
|
63
|
-
if (typeof document !== 'undefined') {
|
|
64
|
-
combinedMaskRef(document.createElement('div'));
|
|
65
|
-
}
|
|
66
|
-
}, []); // eslint-disable-line react-hooks/exhaustive-deps
|
|
67
|
-
|
|
68
|
-
useEffect(function () {
|
|
69
|
-
var portalTarget = overlayMaskNode.current;
|
|
70
|
-
|
|
71
|
-
if (portalTarget) {
|
|
72
|
-
document.body.appendChild(portalTarget);
|
|
73
|
-
}
|
|
51
|
+
overlayMaskNode = _useState2[0],
|
|
52
|
+
setOverlayMaskNode = _useState2[1];
|
|
74
53
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
}, []);
|
|
54
|
+
var combinedMaskRef = useCombinedRefs([setOverlayMaskNode, maskRef]);
|
|
55
|
+
var euiTheme = useEuiTheme();
|
|
56
|
+
var styles = euiOverlayMaskStyles(euiTheme);
|
|
57
|
+
var cssStyles = [styles.euiOverlayMask, styles["".concat(headerZindexLocation, "Header")]];
|
|
82
58
|
useEffect(function () {
|
|
83
|
-
if (!overlayMaskNode
|
|
59
|
+
if (!overlayMaskNode) return;
|
|
84
60
|
keysOf(rest).forEach(function (key) {
|
|
85
61
|
if (typeof rest[key] !== 'string') {
|
|
86
62
|
throw new Error("Unhandled property type. EuiOverlayMask property ".concat(key, " is not a string."));
|
|
87
63
|
}
|
|
88
64
|
|
|
89
|
-
if (overlayMaskNode
|
|
90
|
-
overlayMaskNode.
|
|
65
|
+
if (overlayMaskNode) {
|
|
66
|
+
overlayMaskNode.setAttribute(key, rest[key]);
|
|
91
67
|
}
|
|
92
68
|
});
|
|
93
|
-
}, []); // eslint-disable-line react-hooks/exhaustive-deps
|
|
69
|
+
}, [overlayMaskNode]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
94
70
|
|
|
95
71
|
useEffect(function () {
|
|
96
|
-
if (!overlayMaskNode
|
|
97
|
-
overlayMaskNode.
|
|
98
|
-
}, [
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
portalTarget.addEventListener('click', listener);
|
|
110
|
-
return function () {
|
|
111
|
-
portalTarget.removeEventListener('click', listener);
|
|
112
|
-
};
|
|
113
|
-
}, [onClick]);
|
|
114
|
-
return isPortalTargetReady ? ___EmotionJSX(React.Fragment, null, /*#__PURE__*/createPortal(children, overlayMaskNode.current)) : null;
|
|
72
|
+
if (!overlayMaskNode) return;
|
|
73
|
+
overlayMaskNode.className = classNames('euiOverlayMask', className);
|
|
74
|
+
}, [overlayMaskNode, className]);
|
|
75
|
+
return ___EmotionJSX(EuiPortal, {
|
|
76
|
+
portalRef: combinedMaskRef
|
|
77
|
+
}, ___EmotionJSX(Global, {
|
|
78
|
+
styles: euiOverlayMaskBodyStyles
|
|
79
|
+
}), ___EmotionJSX(Global, {
|
|
80
|
+
styles: cssStyles
|
|
81
|
+
}), children);
|
|
115
82
|
};
|
|
116
83
|
EuiOverlayMask.propTypes = {
|
|
117
84
|
className: PropTypes.string,
|
|
@@ -119,11 +86,6 @@ EuiOverlayMask.propTypes = {
|
|
|
119
86
|
"data-test-subj": PropTypes.string,
|
|
120
87
|
css: PropTypes.any,
|
|
121
88
|
|
|
122
|
-
/**
|
|
123
|
-
* Function that applies to clicking the mask itself and not the children
|
|
124
|
-
*/
|
|
125
|
-
onClick: PropTypes.func,
|
|
126
|
-
|
|
127
89
|
/**
|
|
128
90
|
* ReactNode to render as this component's content
|
|
129
91
|
*/
|
|
@@ -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
|
+
};
|
|
@@ -26,8 +26,7 @@ var horizontalPositionToClassNameMap = {
|
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
30
|
-
* Use EuiPageSection instead
|
|
29
|
+
* @deprecated Use EuiPageSection instead
|
|
31
30
|
*/
|
|
32
31
|
export var EuiPageContent_Deprecated = function EuiPageContent_Deprecated(_ref) {
|
|
33
32
|
var verticalPosition = _ref.verticalPosition,
|
|
@@ -30,8 +30,7 @@ var paddingSizeToClassNameMap = {
|
|
|
30
30
|
export var PADDING_SIZES = keysOf(paddingSizeToClassNameMap);
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
34
|
-
* Use EuiPageSection instead
|
|
33
|
+
* @deprecated Use EuiPageSection instead
|
|
35
34
|
*/
|
|
36
35
|
export var EuiPageContentBody_Deprecated = function EuiPageContentBody_Deprecated(_ref) {
|
|
37
36
|
var children = _ref.children,
|
|
@@ -19,8 +19,7 @@ import classNames from 'classnames';
|
|
|
19
19
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
23
|
-
* Use EuiPageHeader instead
|
|
22
|
+
* @deprecated Use EuiPageHeader instead
|
|
24
23
|
*/
|
|
25
24
|
export var EuiPageContentHeader_Deprecated = function EuiPageContentHeader_Deprecated(_ref) {
|
|
26
25
|
var children = _ref.children,
|
|
@@ -19,8 +19,7 @@ import classNames from 'classnames';
|
|
|
19
19
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
23
|
-
* Use EuiPageHeader instead
|
|
22
|
+
* @deprecated Use EuiPageHeader instead
|
|
24
23
|
*/
|
|
25
24
|
export var EuiPageContentHeaderSection_Deprecated = function EuiPageContentHeaderSection_Deprecated(_ref) {
|
|
26
25
|
var children = _ref.children,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["children", "alignment", "restrictWidth", "bottomBorder", "paddingSize", "color", "grow", "contentProps"];
|
|
1
|
+
var _excluded = ["children", "alignment", "restrictWidth", "bottomBorder", "paddingSize", "color", "grow", "contentProps", "component"];
|
|
2
2
|
|
|
3
3
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
|
|
@@ -34,6 +34,8 @@ export var EuiPageSection = function EuiPageSection(_ref) {
|
|
|
34
34
|
_ref$grow = _ref.grow,
|
|
35
35
|
grow = _ref$grow === void 0 ? false : _ref$grow,
|
|
36
36
|
contentProps = _ref.contentProps,
|
|
37
|
+
_ref$component = _ref.component,
|
|
38
|
+
Component = _ref$component === void 0 ? 'section' : _ref$component,
|
|
37
39
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
38
40
|
|
|
39
41
|
// Set max-width as a style prop
|
|
@@ -46,7 +48,7 @@ export var EuiPageSection = function EuiPageSection(_ref) {
|
|
|
46
48
|
var cssStyles = [styles.euiPageSection, grow && styles.grow, inlinePadding[paddingSize], bottomBorder === 'extended' && styles.border, alignment && styles[alignment], colors[color]];
|
|
47
49
|
var contentStyles = euiPageSectionContentStyles();
|
|
48
50
|
var cssContentStyles = [contentStyles.euiPageSection__content, blockPadding[paddingSize], bottomBorder === true && styles.border, alignment.toLowerCase().includes('center') && contentStyles.center, restrictWidth && contentStyles.restrictWidth];
|
|
49
|
-
return ___EmotionJSX(
|
|
51
|
+
return ___EmotionJSX(Component, _extends({
|
|
50
52
|
css: cssStyles
|
|
51
53
|
}, rest), ___EmotionJSX("div", _extends({
|
|
52
54
|
css: cssContentStyles
|
|
@@ -99,5 +101,15 @@ EuiPageSection.propTypes = {
|
|
|
99
101
|
/**
|
|
100
102
|
* Passed down to the div wrapper of the section contents
|
|
101
103
|
*/
|
|
102
|
-
contentProps: PropTypes.
|
|
104
|
+
contentProps: PropTypes.shape({
|
|
105
|
+
className: PropTypes.string,
|
|
106
|
+
"aria-label": PropTypes.string,
|
|
107
|
+
"data-test-subj": PropTypes.string,
|
|
108
|
+
css: PropTypes.any
|
|
109
|
+
}),
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Sets which HTML element to render.
|
|
113
|
+
*/
|
|
114
|
+
component: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.elementType.isRequired])
|
|
103
115
|
};
|
|
@@ -27,8 +27,7 @@ var paddingSizeToClassNameMap = {
|
|
|
27
27
|
export var PADDING_SIZES = keysOf(paddingSizeToClassNameMap);
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
31
|
-
* Use the new EuiPageSidebar instead
|
|
30
|
+
* @deprecated Use the new EuiPageSidebar in page/page_sidebar instead
|
|
32
31
|
*/
|
|
33
32
|
export var EuiPageSideBar_Deprecated = function EuiPageSideBar_Deprecated(_ref) {
|
|
34
33
|
var children = _ref.children,
|
|
@@ -64,13 +64,17 @@ export var EuiPageSidebar = function EuiPageSidebar(_ref) {
|
|
|
64
64
|
setInlineStyles = _useState2[1];
|
|
65
65
|
|
|
66
66
|
useEffect(function () {
|
|
67
|
+
var updatedStyles = _objectSpread(_objectSpread({}, style), logicalStyle('min-width', isResponding ? '100%' : minWidth));
|
|
68
|
+
|
|
67
69
|
if (sticky) {
|
|
68
70
|
var _document$body$datase;
|
|
69
71
|
|
|
70
72
|
var euiHeaderFixedCounter = Number((_document$body$datase = document.body.dataset.fixedHeaders) !== null && _document$body$datase !== void 0 ? _document$body$datase : 0);
|
|
71
73
|
var offset = _typeof(sticky) === 'object' ? sticky === null || sticky === void 0 ? void 0 : sticky.offset : themeContext.euiTheme.base * 3 * euiHeaderFixedCounter;
|
|
72
|
-
|
|
74
|
+
updatedStyles = _objectSpread(_objectSpread(_objectSpread({}, updatedStyles), logicalStyle('top', offset)), logicalStyle('max-height', "calc(100vh - ".concat(offset, "px)")));
|
|
73
75
|
}
|
|
76
|
+
|
|
77
|
+
setInlineStyles(updatedStyles);
|
|
74
78
|
}, [style, sticky, themeContext.euiTheme.base, isResponding, minWidth]);
|
|
75
79
|
return ___EmotionJSX("div", _extends({
|
|
76
80
|
className: className,
|
|
@@ -38,7 +38,9 @@ export var TEMPLATES = ['default', 'centeredBody', 'centeredContent', 'empty'];
|
|
|
38
38
|
/**
|
|
39
39
|
* This component has been deprecated in favor of the new
|
|
40
40
|
* namespaced version. You can still import this component
|
|
41
|
-
*
|
|
41
|
+
* until August 2023 by importing `as EuiPageTemplate`.
|
|
42
|
+
*
|
|
43
|
+
* @deprecated use EuiPageTemplate from page_template/page_template instead
|
|
42
44
|
*/
|
|
43
45
|
export var EuiPageTemplate_Deprecated = function EuiPageTemplate_Deprecated(_ref) {
|
|
44
46
|
var _pageBodyProps2;
|
|
@@ -103,6 +103,16 @@ _EuiPageEmptyPrompt.propTypes = {
|
|
|
103
103
|
/**
|
|
104
104
|
* Passed down to the div wrapper of the section contents
|
|
105
105
|
*/
|
|
106
|
-
contentProps: PropTypes.
|
|
106
|
+
contentProps: PropTypes.shape({
|
|
107
|
+
className: PropTypes.string,
|
|
108
|
+
"aria-label": PropTypes.string,
|
|
109
|
+
"data-test-subj": PropTypes.string,
|
|
110
|
+
css: PropTypes.any
|
|
111
|
+
}),
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Sets which HTML element to render.
|
|
115
|
+
*/
|
|
116
|
+
component: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.elementType.isRequired]),
|
|
107
117
|
panelled: PropTypes.bool
|
|
108
118
|
};
|
|
@@ -299,7 +299,17 @@ _EuiPageSection.propTypes = {
|
|
|
299
299
|
/**
|
|
300
300
|
* Passed down to the div wrapper of the section contents
|
|
301
301
|
*/
|
|
302
|
-
contentProps: PropTypes.
|
|
302
|
+
contentProps: PropTypes.shape({
|
|
303
|
+
className: PropTypes.string,
|
|
304
|
+
"aria-label": PropTypes.string,
|
|
305
|
+
"data-test-subj": PropTypes.string,
|
|
306
|
+
css: PropTypes.any
|
|
307
|
+
}),
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* Sets which HTML element to render.
|
|
311
|
+
*/
|
|
312
|
+
component: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.elementType.isRequired])
|
|
303
313
|
};
|
|
304
314
|
|
|
305
315
|
var _EuiPageHeader = function _EuiPageHeader(props) {
|
|
@@ -348,7 +358,13 @@ _EuiPageEmptyPrompt.propTypes = {
|
|
|
348
358
|
paddingSize: PropTypes.any,
|
|
349
359
|
alignment: PropTypes.any,
|
|
350
360
|
grow: PropTypes.bool,
|
|
351
|
-
contentProps: PropTypes.
|
|
361
|
+
contentProps: PropTypes.shape({
|
|
362
|
+
className: PropTypes.string,
|
|
363
|
+
"aria-label": PropTypes.string,
|
|
364
|
+
"data-test-subj": PropTypes.string,
|
|
365
|
+
css: PropTypes.any
|
|
366
|
+
}),
|
|
367
|
+
component: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.elementType.isRequired]),
|
|
352
368
|
panelled: PropTypes.bool
|
|
353
369
|
};
|
|
354
370
|
|
|
@@ -26,8 +26,10 @@ import { EuiPaginationButton } from './pagination_button';
|
|
|
26
26
|
import { EuiI18n, useEuiI18n } from '../i18n';
|
|
27
27
|
import { EuiText } from '../text';
|
|
28
28
|
import { EuiPaginationButtonArrow } from './pagination_button_arrow';
|
|
29
|
-
import { useIsWithinBreakpoints } from '../../services';
|
|
29
|
+
import { useIsWithinBreakpoints, useEuiTheme } from '../../services';
|
|
30
30
|
import { EuiScreenReaderOnly } from '../accessibility';
|
|
31
|
+
import { euiPaginationStyles } from './pagination.styles';
|
|
32
|
+
import { euiPaginationButtonStyles } from './pagination_button.styles';
|
|
31
33
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
32
34
|
var MAX_VISIBLE_PAGES = 5;
|
|
33
35
|
var NUMBER_SURROUNDING_PAGES = Math.floor(MAX_VISIBLE_PAGES * 0.5);
|
|
@@ -45,7 +47,13 @@ export var EuiPagination = function EuiPagination(_ref) {
|
|
|
45
47
|
responsive = _ref$responsive === void 0 ? ['xs', 's'] : _ref$responsive,
|
|
46
48
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
47
49
|
|
|
48
|
-
var isResponsive = useIsWithinBreakpoints(responsive, !!responsive);
|
|
50
|
+
var isResponsive = useIsWithinBreakpoints(responsive, !!responsive);
|
|
51
|
+
var euiTheme = useEuiTheme();
|
|
52
|
+
var paginationStyles = euiPaginationStyles(euiTheme);
|
|
53
|
+
|
|
54
|
+
var _euiPaginationButtonS = euiPaginationButtonStyles(euiTheme),
|
|
55
|
+
isPlaceholder = _euiPaginationButtonS.isPlaceholder; // Force to `compressed` version if specified or within the responsive breakpoints
|
|
56
|
+
|
|
49
57
|
|
|
50
58
|
var compressed = _compressed || isResponsive;
|
|
51
59
|
|
|
@@ -114,6 +122,7 @@ export var EuiPagination = function EuiPagination(_ref) {
|
|
|
114
122
|
if (compressed) {
|
|
115
123
|
centerPageCount = ___EmotionJSX(EuiText, {
|
|
116
124
|
size: "s",
|
|
125
|
+
css: paginationStyles.euiPagination__compressedText,
|
|
117
126
|
className: "euiPagination__compressedText"
|
|
118
127
|
}, ___EmotionJSX(EuiI18n, {
|
|
119
128
|
token: "euiPagination.pageOfTotalCompressed",
|
|
@@ -154,7 +163,8 @@ export var EuiPagination = function EuiPagination(_ref) {
|
|
|
154
163
|
}, function (firstRangeAriaLabel) {
|
|
155
164
|
return ___EmotionJSX("li", {
|
|
156
165
|
"aria-label": firstRangeAriaLabel,
|
|
157
|
-
className: "
|
|
166
|
+
className: "euiPagination__item",
|
|
167
|
+
css: isPlaceholder
|
|
158
168
|
}, "\u2026");
|
|
159
169
|
}));
|
|
160
170
|
} else if (firstPageInRange === 2) {
|
|
@@ -185,7 +195,8 @@ export var EuiPagination = function EuiPagination(_ref) {
|
|
|
185
195
|
}, function (lastRangeAriaLabel) {
|
|
186
196
|
return ___EmotionJSX("li", {
|
|
187
197
|
"aria-label": lastRangeAriaLabel,
|
|
188
|
-
className: "
|
|
198
|
+
className: "euiPagination__item",
|
|
199
|
+
css: isPlaceholder
|
|
189
200
|
}, "\u2026");
|
|
190
201
|
}));
|
|
191
202
|
}
|
|
@@ -205,6 +216,7 @@ export var EuiPagination = function EuiPagination(_ref) {
|
|
|
205
216
|
});
|
|
206
217
|
|
|
207
218
|
centerPageCount = ___EmotionJSX("ul", _extends({}, accessibleName, {
|
|
219
|
+
css: paginationStyles.euiPagination__list,
|
|
208
220
|
className: "euiPagination__list"
|
|
209
221
|
}), firstPageButtons, selectablePages, lastPageButtons);
|
|
210
222
|
}
|
|
@@ -229,6 +241,7 @@ export var EuiPagination = function EuiPagination(_ref) {
|
|
|
229
241
|
|
|
230
242
|
var accessiblePageCount = "".concat(accessiblePageString(), " ").concat(ofLabel, " ").concat(accessibleCollectionString);
|
|
231
243
|
return ___EmotionJSX("nav", _extends({
|
|
244
|
+
css: [paginationStyles.euiPagination, ";label:EuiPagination;"],
|
|
232
245
|
className: classes
|
|
233
246
|
}, rest), ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("span", {
|
|
234
247
|
"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
|
+
};
|
|
@@ -24,6 +24,8 @@ import PropTypes from "prop-types";
|
|
|
24
24
|
import classNames from 'classnames';
|
|
25
25
|
import { EuiButtonEmpty } from '../button';
|
|
26
26
|
import { EuiI18n } from '../i18n';
|
|
27
|
+
import { useEuiTheme } from '../../services';
|
|
28
|
+
import { euiPaginationButtonStyles } from './pagination_button.styles';
|
|
27
29
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
28
30
|
export var EuiPaginationButton = function EuiPaginationButton(_ref) {
|
|
29
31
|
var className = _ref.className,
|
|
@@ -33,12 +35,13 @@ export var EuiPaginationButton = function EuiPaginationButton(_ref) {
|
|
|
33
35
|
totalPages = _ref.totalPages,
|
|
34
36
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
35
37
|
|
|
36
|
-
var
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
var euiTheme = useEuiTheme();
|
|
39
|
+
var styles = euiPaginationButtonStyles(euiTheme);
|
|
40
|
+
var paginationButtonCss = [styles.euiPaginationButton, isActive && styles.isActive, isPlaceholder && styles.isPlaceholder];
|
|
41
|
+
var classes = classNames('euiPaginationButton', className);
|
|
40
42
|
|
|
41
43
|
var props = _objectSpread(_objectSpread(_objectSpread({
|
|
44
|
+
css: paginationButtonCss,
|
|
42
45
|
className: classes,
|
|
43
46
|
size: 's',
|
|
44
47
|
color: 'text',
|
|
@@ -133,7 +136,16 @@ EuiPaginationButton.propTypes = {
|
|
|
133
136
|
/**
|
|
134
137
|
* Object of props passed to the <span/> wrapping the button's content
|
|
135
138
|
*/
|
|
136
|
-
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Object of props passed to the <span/> wrapping the button's content
|
|
142
|
+
*/
|
|
143
|
+
contentProps: PropTypes.shape({
|
|
144
|
+
className: PropTypes.string,
|
|
145
|
+
"aria-label": PropTypes.string,
|
|
146
|
+
"data-test-subj": PropTypes.string,
|
|
147
|
+
css: PropTypes.any
|
|
148
|
+
}),
|
|
137
149
|
|
|
138
150
|
/**
|
|
139
151
|
* Any `type` accepted by EuiIcon
|
|
@@ -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
|
+
};
|
|
@@ -13,6 +13,8 @@ import classNames from 'classnames';
|
|
|
13
13
|
import { EuiButtonIcon } from '../button/button_icon';
|
|
14
14
|
import { keysOf } from '../common';
|
|
15
15
|
import { useEuiI18n } from '../i18n';
|
|
16
|
+
import { useEuiTheme } from '../../services';
|
|
17
|
+
import { euiPaginationButtonArrowStyles } from './pagination_button.styles';
|
|
16
18
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
17
19
|
var typeToIconTypeMap = {
|
|
18
20
|
first: 'arrowStart',
|
|
@@ -27,6 +29,8 @@ export var EuiPaginationButtonArrow = function EuiPaginationButtonArrow(_ref) {
|
|
|
27
29
|
disabled = _ref.disabled,
|
|
28
30
|
ariaControls = _ref.ariaControls,
|
|
29
31
|
onClick = _ref.onClick;
|
|
32
|
+
var euiTheme = useEuiTheme();
|
|
33
|
+
var styles = euiPaginationButtonArrowStyles(euiTheme);
|
|
30
34
|
var labels = {
|
|
31
35
|
first: useEuiI18n('euiPaginationButtonArrow.firstPage', 'First page'),
|
|
32
36
|
previous: useEuiI18n('euiPaginationButtonArrow.previousPage', 'Previous page'),
|
|
@@ -41,6 +45,7 @@ export var EuiPaginationButtonArrow = function EuiPaginationButtonArrow(_ref) {
|
|
|
41
45
|
}
|
|
42
46
|
|
|
43
47
|
return ___EmotionJSX(EuiButtonIcon, _extends({
|
|
48
|
+
css: styles.euiPaginationArrowButton,
|
|
44
49
|
className: classNames('euiPaginationArrowButton', className),
|
|
45
50
|
color: "text",
|
|
46
51
|
"aria-label": labels[type],
|
|
@@ -140,5 +140,10 @@ EuiProgress.propTypes = {
|
|
|
140
140
|
/**
|
|
141
141
|
* Object of props passed to the <span/> wrapping the determinate progress's label
|
|
142
142
|
*/
|
|
143
|
-
labelProps: PropTypes.
|
|
143
|
+
labelProps: PropTypes.shape({
|
|
144
|
+
className: PropTypes.string,
|
|
145
|
+
"aria-label": PropTypes.string,
|
|
146
|
+
"data-test-subj": PropTypes.string,
|
|
147
|
+
css: PropTypes.any
|
|
148
|
+
})
|
|
144
149
|
};
|
|
@@ -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,
|