@elastic/eui 93.3.0 → 93.5.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.d.ts +9 -0
- package/dist/eui_charts_theme.js +56 -14
- package/dist/eui_charts_theme.js.map +1 -1
- package/dist/eui_theme_dark.css +3 -0
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +3 -0
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/breadcrumbs/_breadcrumb_content.js +362 -0
- package/es/components/breadcrumbs/_breadcrumb_content.styles.js +48 -0
- package/es/components/breadcrumbs/breadcrumb.js +10 -327
- package/es/components/breadcrumbs/breadcrumb.styles.js +5 -27
- package/es/components/breadcrumbs/breadcrumbs.js +4 -4
- package/es/components/breadcrumbs/types.js +1 -0
- package/es/components/button/button_group/button_group.js +16 -2
- package/es/components/button/button_group/button_group.styles.js +1 -1
- package/es/components/button/button_group/button_group_button.js +59 -5
- package/es/components/button/button_group/button_group_button.styles.js +39 -3
- package/es/components/datagrid/body/cell/data_grid_cell.js +97 -58
- package/es/components/datagrid/body/cell/data_grid_cell_actions.js +24 -18
- package/es/components/datagrid/body/cell/data_grid_cell_popover.js +64 -56
- package/es/components/datagrid/body/cell/data_grid_cell_wrapper.js +32 -31
- package/es/components/datagrid/body/cell/index.js +1 -1
- package/es/components/datagrid/body/data_grid_body.js +13 -0
- package/es/components/datagrid/body/data_grid_body_custom.js +52 -36
- package/es/components/datagrid/body/data_grid_body_virtualized.js +84 -56
- package/es/components/datagrid/body/data_grid_row_manager.js +6 -4
- package/es/components/datagrid/body/footer/use_data_grid_footer.js +1 -2
- package/es/components/datagrid/body/header/data_grid_control_header_cell.js +5 -4
- package/es/components/datagrid/body/header/data_grid_header_cell.js +73 -53
- package/es/components/datagrid/body/header/data_grid_header_row.js +15 -551
- package/es/components/datagrid/body/header/use_data_grid_header.js +7 -6
- package/es/components/datagrid/controls/column_selector.js +126 -123
- package/es/components/datagrid/controls/column_sorting.js +605 -103
- package/es/components/datagrid/controls/column_sorting_draggable.js +24 -22
- package/es/components/datagrid/controls/display_selector.js +109 -107
- package/es/components/datagrid/data_grid.a11y.js +13 -12
- package/es/components/datagrid/data_grid.js +45 -22
- package/es/components/datagrid/utils/col_widths.js +12 -8
- package/es/components/datagrid/utils/focus.js +10 -8
- package/es/components/datagrid/utils/grid_height_width.js +31 -30
- package/es/components/datagrid/utils/ref.js +1 -1
- package/es/components/datagrid/utils/row_heights.js +2 -2
- package/es/components/datagrid/utils/sorting.js +29 -27
- package/es/components/date_picker/super_date_picker/super_date_picker.js +9 -0
- package/es/components/date_picker/super_date_picker/super_update_button.js +57 -29
- package/es/components/flex/flex_grid.js +22 -8
- package/es/components/flex/flex_grid.styles.js +13 -6
- package/es/components/flex/flex_group.js +10 -11
- package/es/components/flex/flex_item.js +9 -11
- package/es/components/flex/flex_item.styles.js +107 -122
- package/es/components/flyout/flyout.js +16 -18
- package/es/components/header/header_breadcrumbs/header_breadcrumbs.js +3 -5
- package/es/components/header/header_links/header_links.js +10 -2
- package/es/components/icon/icon.js +3 -3
- package/es/components/modal/confirm_modal.js +2 -1
- package/es/components/modal/modal.js +12 -3
- package/es/components/observer/resize_observer/resize_observer.js +15 -24
- package/es/components/panel/panel.js +2 -3
- package/es/components/resizable_container/resizable_button.js +2 -3
- package/es/components/resizable_container/resizable_collapse_button.js +2 -3
- package/es/components/resizable_container/resizable_container.js +1 -2
- package/es/components/resizable_container/resizable_container.styles.js +11 -14
- package/es/components/resizable_container/resizable_panel.js +6 -8
- package/es/components/resizable_container/resizable_panel.styles.js +18 -29
- package/es/components/selectable/selectable_list/selectable_list.js +26 -6
- package/es/components/spacer/spacer.js +2 -3
- package/es/components/toast/global_toast_list.js +70 -73
- package/es/components/toast/toast.js +27 -42
- package/es/components/toast/toast.styles.js +2 -17
- package/es/components/tool_tip/icon_tip.js +4 -3
- package/es/global_styling/mixins/_color.js +60 -32
- package/es/global_styling/mixins/_padding.js +60 -16
- package/es/services/color/eui_palettes.js +21 -13
- package/es/services/color/index.js +1 -1
- package/es/services/hooks/index.js +1 -0
- package/es/services/hooks/useDeepEqual.js +23 -0
- package/es/services/index.js +1 -1
- package/es/services/theme/style_memoization.js +1 -3
- package/eui.d.ts +2558 -2470
- package/i18ntokens.json +297 -279
- package/lib/components/breadcrumbs/_breadcrumb_content.js +372 -0
- package/lib/components/breadcrumbs/_breadcrumb_content.styles.js +55 -0
- package/lib/components/breadcrumbs/breadcrumb.js +11 -331
- package/lib/components/breadcrumbs/breadcrumb.styles.js +5 -29
- package/lib/components/breadcrumbs/breadcrumbs.js +3 -3
- package/lib/components/breadcrumbs/types.js +5 -0
- package/lib/components/button/button_group/button_group.js +16 -2
- package/lib/components/button/button_group/button_group.styles.js +1 -1
- package/lib/components/button/button_group/button_group_button.js +59 -5
- package/lib/components/button/button_group/button_group_button.styles.js +45 -11
- package/lib/components/datagrid/body/cell/data_grid_cell.js +95 -57
- package/lib/components/datagrid/body/cell/data_grid_cell_actions.js +24 -18
- package/lib/components/datagrid/body/cell/data_grid_cell_popover.js +63 -55
- package/lib/components/datagrid/body/cell/data_grid_cell_wrapper.js +32 -31
- package/lib/components/datagrid/body/cell/index.js +2 -2
- package/lib/components/datagrid/body/data_grid_body.js +13 -0
- package/lib/components/datagrid/body/data_grid_body_custom.js +51 -35
- package/lib/components/datagrid/body/data_grid_body_virtualized.js +83 -55
- package/lib/components/datagrid/body/data_grid_row_manager.js +5 -3
- package/lib/components/datagrid/body/footer/use_data_grid_footer.js +1 -2
- package/lib/components/datagrid/body/header/data_grid_control_header_cell.js +8 -4
- package/lib/components/datagrid/body/header/data_grid_header_cell.js +72 -52
- package/lib/components/datagrid/body/header/data_grid_header_row.js +14 -550
- package/lib/components/datagrid/body/header/use_data_grid_header.js +7 -6
- package/lib/components/datagrid/controls/column_selector.js +126 -123
- package/lib/components/datagrid/controls/column_sorting.js +615 -110
- package/lib/components/datagrid/controls/column_sorting_draggable.js +27 -22
- package/lib/components/datagrid/controls/display_selector.js +109 -107
- package/lib/components/datagrid/data_grid.a11y.js +13 -12
- package/lib/components/datagrid/data_grid.js +43 -20
- package/lib/components/datagrid/utils/col_widths.js +12 -8
- package/lib/components/datagrid/utils/focus.js +10 -8
- package/lib/components/datagrid/utils/grid_height_width.js +29 -28
- package/lib/components/datagrid/utils/ref.js +1 -1
- package/lib/components/datagrid/utils/row_heights.js +1 -1
- package/lib/components/datagrid/utils/sorting.js +31 -29
- package/lib/components/date_picker/super_date_picker/super_date_picker.js +9 -0
- package/lib/components/date_picker/super_date_picker/super_update_button.js +57 -29
- package/lib/components/flex/flex_grid.js +23 -7
- package/lib/components/flex/flex_grid.styles.js +13 -6
- package/lib/components/flex/flex_group.js +10 -10
- package/lib/components/flex/flex_item.js +13 -13
- package/lib/components/flex/flex_item.styles.js +107 -122
- package/lib/components/flyout/flyout.js +16 -18
- package/lib/components/header/header_breadcrumbs/header_breadcrumbs.js +3 -5
- package/lib/components/header/header_links/header_links.js +10 -2
- package/lib/components/icon/icon.js +3 -3
- package/lib/components/modal/confirm_modal.js +2 -1
- package/lib/components/modal/modal.js +12 -3
- package/lib/components/observer/resize_observer/resize_observer.js +15 -24
- package/lib/components/panel/panel.js +1 -2
- package/lib/components/resizable_container/resizable_button.js +1 -2
- package/lib/components/resizable_container/resizable_collapse_button.js +1 -2
- package/lib/components/resizable_container/resizable_container.js +1 -2
- package/lib/components/resizable_container/resizable_container.styles.js +11 -14
- package/lib/components/resizable_container/resizable_panel.js +3 -5
- package/lib/components/resizable_container/resizable_panel.styles.js +17 -28
- package/lib/components/selectable/selectable_list/selectable_list.js +26 -6
- package/lib/components/spacer/spacer.js +1 -2
- package/lib/components/toast/global_toast_list.js +68 -71
- package/lib/components/toast/toast.js +25 -40
- package/lib/components/toast/toast.styles.js +11 -25
- package/lib/components/tool_tip/icon_tip.js +4 -3
- package/lib/global_styling/mixins/_color.js +65 -40
- package/lib/global_styling/mixins/_padding.js +66 -25
- package/lib/services/color/eui_palettes.js +24 -14
- package/lib/services/color/index.js +14 -0
- package/lib/services/hooks/index.js +11 -0
- package/lib/services/hooks/useDeepEqual.js +30 -0
- package/lib/services/index.js +15 -1
- package/lib/services/theme/style_memoization.js +1 -3
- package/optimize/es/components/breadcrumbs/_breadcrumb_content.js +153 -0
- package/optimize/es/components/breadcrumbs/_breadcrumb_content.styles.js +48 -0
- package/optimize/es/components/breadcrumbs/breadcrumb.js +10 -110
- package/optimize/es/components/breadcrumbs/breadcrumb.styles.js +5 -27
- package/optimize/es/components/breadcrumbs/breadcrumbs.js +4 -4
- package/optimize/es/components/breadcrumbs/types.js +1 -0
- package/optimize/es/components/button/button_group/button_group.js +2 -2
- package/optimize/es/components/button/button_group/button_group.styles.js +1 -1
- package/optimize/es/components/button/button_group/button_group_button.js +36 -4
- package/optimize/es/components/button/button_group/button_group_button.styles.js +39 -3
- package/optimize/es/components/datagrid/body/cell/data_grid_cell.js +80 -55
- package/optimize/es/components/datagrid/body/cell/data_grid_cell_actions.js +24 -18
- package/optimize/es/components/datagrid/body/cell/data_grid_cell_popover.js +64 -56
- package/optimize/es/components/datagrid/body/cell/data_grid_cell_wrapper.js +32 -31
- package/optimize/es/components/datagrid/body/cell/index.js +1 -1
- package/optimize/es/components/datagrid/body/data_grid_body_custom.js +39 -36
- package/optimize/es/components/datagrid/body/data_grid_body_virtualized.js +69 -49
- package/optimize/es/components/datagrid/body/data_grid_row_manager.js +6 -4
- package/optimize/es/components/datagrid/body/footer/use_data_grid_footer.js +1 -2
- package/optimize/es/components/datagrid/body/header/data_grid_control_header_cell.js +4 -3
- package/optimize/es/components/datagrid/body/header/data_grid_header_cell.js +65 -49
- package/optimize/es/components/datagrid/body/header/data_grid_header_row.js +15 -13
- package/optimize/es/components/datagrid/body/header/use_data_grid_header.js +7 -6
- package/optimize/es/components/datagrid/controls/column_selector.js +126 -123
- package/optimize/es/components/datagrid/controls/column_sorting.js +121 -103
- package/optimize/es/components/datagrid/controls/column_sorting_draggable.js +24 -22
- package/optimize/es/components/datagrid/controls/display_selector.js +109 -107
- package/optimize/es/components/datagrid/data_grid.a11y.js +13 -12
- package/optimize/es/components/datagrid/data_grid.js +45 -22
- package/optimize/es/components/datagrid/utils/col_widths.js +9 -5
- package/optimize/es/components/datagrid/utils/focus.js +10 -8
- package/optimize/es/components/datagrid/utils/grid_height_width.js +31 -30
- package/optimize/es/components/datagrid/utils/ref.js +1 -1
- package/optimize/es/components/datagrid/utils/row_heights.js +2 -2
- package/optimize/es/components/datagrid/utils/sorting.js +29 -27
- package/optimize/es/components/date_picker/super_date_picker/super_update_button.js +49 -29
- package/optimize/es/components/flex/flex_grid.js +19 -8
- package/optimize/es/components/flex/flex_grid.styles.js +13 -6
- package/optimize/es/components/flex/flex_group.js +9 -10
- package/optimize/es/components/flex/flex_item.js +9 -11
- package/optimize/es/components/flex/flex_item.styles.js +107 -122
- package/optimize/es/components/flyout/flyout.js +16 -18
- package/optimize/es/components/header/header_breadcrumbs/header_breadcrumbs.js +3 -5
- package/optimize/es/components/header/header_links/header_links.js +3 -2
- package/optimize/es/components/icon/icon.js +3 -3
- package/optimize/es/components/modal/confirm_modal.js +2 -1
- package/optimize/es/components/modal/modal.js +6 -2
- package/optimize/es/components/observer/resize_observer/resize_observer.js +15 -24
- package/optimize/es/components/panel/panel.js +2 -3
- package/optimize/es/components/resizable_container/resizable_button.js +2 -3
- package/optimize/es/components/resizable_container/resizable_collapse_button.js +2 -3
- package/optimize/es/components/resizable_container/resizable_container.js +1 -2
- package/optimize/es/components/resizable_container/resizable_container.styles.js +11 -14
- package/optimize/es/components/resizable_container/resizable_panel.js +6 -8
- package/optimize/es/components/resizable_container/resizable_panel.styles.js +18 -26
- package/optimize/es/components/selectable/selectable_list/selectable_list.js +26 -6
- package/optimize/es/components/spacer/spacer.js +2 -3
- package/optimize/es/components/toast/global_toast_list.js +70 -73
- package/optimize/es/components/toast/toast.js +27 -42
- package/optimize/es/components/toast/toast.styles.js +2 -17
- package/optimize/es/components/tool_tip/icon_tip.js +4 -3
- package/optimize/es/global_styling/mixins/_color.js +57 -32
- package/optimize/es/global_styling/mixins/_padding.js +52 -16
- package/optimize/es/services/color/eui_palettes.js +21 -13
- package/optimize/es/services/color/index.js +1 -1
- package/optimize/es/services/hooks/index.js +1 -0
- package/optimize/es/services/hooks/useDeepEqual.js +23 -0
- package/optimize/es/services/index.js +1 -1
- package/optimize/es/services/theme/style_memoization.js +1 -3
- package/optimize/lib/components/breadcrumbs/_breadcrumb_content.js +163 -0
- package/optimize/lib/components/breadcrumbs/_breadcrumb_content.styles.js +55 -0
- package/optimize/lib/components/breadcrumbs/breadcrumb.js +10 -113
- package/optimize/lib/components/breadcrumbs/breadcrumb.styles.js +5 -29
- package/optimize/lib/components/breadcrumbs/breadcrumbs.js +3 -3
- package/optimize/lib/components/breadcrumbs/types.js +5 -0
- package/optimize/lib/components/button/button_group/button_group.js +2 -2
- package/optimize/lib/components/button/button_group/button_group.styles.js +1 -1
- package/optimize/lib/components/button/button_group/button_group_button.js +37 -5
- package/optimize/lib/components/button/button_group/button_group_button.styles.js +45 -11
- package/optimize/lib/components/datagrid/body/cell/data_grid_cell.js +78 -54
- package/optimize/lib/components/datagrid/body/cell/data_grid_cell_actions.js +24 -18
- package/optimize/lib/components/datagrid/body/cell/data_grid_cell_popover.js +63 -55
- package/optimize/lib/components/datagrid/body/cell/data_grid_cell_wrapper.js +32 -31
- package/optimize/lib/components/datagrid/body/cell/index.js +2 -2
- package/optimize/lib/components/datagrid/body/data_grid_body_custom.js +38 -35
- package/optimize/lib/components/datagrid/body/data_grid_body_virtualized.js +70 -50
- package/optimize/lib/components/datagrid/body/data_grid_row_manager.js +5 -3
- package/optimize/lib/components/datagrid/body/footer/use_data_grid_footer.js +1 -2
- package/optimize/lib/components/datagrid/body/header/data_grid_control_header_cell.js +8 -4
- package/optimize/lib/components/datagrid/body/header/data_grid_header_cell.js +65 -49
- package/optimize/lib/components/datagrid/body/header/data_grid_header_row.js +14 -12
- package/optimize/lib/components/datagrid/body/header/use_data_grid_header.js +7 -6
- package/optimize/lib/components/datagrid/controls/column_selector.js +126 -123
- package/optimize/lib/components/datagrid/controls/column_sorting.js +125 -107
- package/optimize/lib/components/datagrid/controls/column_sorting_draggable.js +27 -22
- package/optimize/lib/components/datagrid/controls/display_selector.js +109 -107
- package/optimize/lib/components/datagrid/data_grid.a11y.js +13 -12
- package/optimize/lib/components/datagrid/data_grid.js +43 -20
- package/optimize/lib/components/datagrid/utils/col_widths.js +9 -5
- package/optimize/lib/components/datagrid/utils/focus.js +10 -8
- package/optimize/lib/components/datagrid/utils/grid_height_width.js +29 -28
- package/optimize/lib/components/datagrid/utils/ref.js +1 -1
- package/optimize/lib/components/datagrid/utils/row_heights.js +1 -1
- package/optimize/lib/components/datagrid/utils/sorting.js +31 -29
- package/optimize/lib/components/date_picker/super_date_picker/super_update_button.js +49 -29
- package/optimize/lib/components/flex/flex_grid.js +21 -7
- package/optimize/lib/components/flex/flex_grid.styles.js +13 -6
- package/optimize/lib/components/flex/flex_group.js +9 -9
- package/optimize/lib/components/flex/flex_item.js +13 -13
- package/optimize/lib/components/flex/flex_item.styles.js +107 -122
- package/optimize/lib/components/flyout/flyout.js +16 -18
- package/optimize/lib/components/header/header_breadcrumbs/header_breadcrumbs.js +3 -5
- package/optimize/lib/components/header/header_links/header_links.js +3 -2
- package/optimize/lib/components/icon/icon.js +3 -3
- package/optimize/lib/components/modal/confirm_modal.js +2 -1
- package/optimize/lib/components/modal/modal.js +6 -2
- package/optimize/lib/components/observer/resize_observer/resize_observer.js +15 -24
- package/optimize/lib/components/panel/panel.js +1 -2
- package/optimize/lib/components/resizable_container/resizable_button.js +1 -2
- package/optimize/lib/components/resizable_container/resizable_collapse_button.js +1 -2
- package/optimize/lib/components/resizable_container/resizable_container.js +1 -2
- package/optimize/lib/components/resizable_container/resizable_container.styles.js +11 -14
- package/optimize/lib/components/resizable_container/resizable_panel.js +3 -5
- package/optimize/lib/components/resizable_container/resizable_panel.styles.js +17 -26
- package/optimize/lib/components/selectable/selectable_list/selectable_list.js +26 -6
- package/optimize/lib/components/spacer/spacer.js +1 -2
- package/optimize/lib/components/toast/global_toast_list.js +68 -71
- package/optimize/lib/components/toast/toast.js +25 -40
- package/optimize/lib/components/toast/toast.styles.js +11 -25
- package/optimize/lib/components/tool_tip/icon_tip.js +4 -3
- package/optimize/lib/global_styling/mixins/_color.js +63 -40
- package/optimize/lib/global_styling/mixins/_padding.js +59 -25
- package/optimize/lib/services/color/eui_palettes.js +24 -14
- package/optimize/lib/services/color/index.js +14 -0
- package/optimize/lib/services/hooks/index.js +11 -0
- package/optimize/lib/services/hooks/useDeepEqual.js +30 -0
- package/optimize/lib/services/index.js +15 -1
- package/optimize/lib/services/theme/style_memoization.js +1 -3
- package/package.json +8 -11
- package/src/components/form/text_area/_text_area.scss +5 -0
- package/src/components/selectable/selectable_list/_selectable_list.scss +2 -0
- package/test-env/components/breadcrumbs/_breadcrumb_content.js +363 -0
- package/test-env/components/breadcrumbs/_breadcrumb_content.styles.js +55 -0
- package/test-env/components/breadcrumbs/breadcrumb.js +11 -326
- package/test-env/components/breadcrumbs/breadcrumb.styles.js +5 -29
- package/test-env/components/breadcrumbs/breadcrumbs.js +3 -3
- package/test-env/components/breadcrumbs/types.js +5 -0
- package/test-env/components/button/button_group/button_group.js +16 -2
- package/test-env/components/button/button_group/button_group.styles.js +1 -1
- package/test-env/components/button/button_group/button_group_button.js +56 -5
- package/test-env/components/button/button_group/button_group_button.styles.js +45 -11
- package/test-env/components/datagrid/body/cell/data_grid_cell.js +95 -57
- package/test-env/components/datagrid/body/cell/data_grid_cell_actions.js +24 -18
- package/test-env/components/datagrid/body/cell/data_grid_cell_popover.js +63 -55
- package/test-env/components/datagrid/body/cell/data_grid_cell_wrapper.js +32 -31
- package/test-env/components/datagrid/body/cell/index.js +2 -2
- package/test-env/components/datagrid/body/data_grid_body.js +13 -0
- package/test-env/components/datagrid/body/data_grid_body_custom.js +51 -35
- package/test-env/components/datagrid/body/data_grid_body_virtualized.js +83 -55
- package/test-env/components/datagrid/body/data_grid_row_manager.js +5 -3
- package/test-env/components/datagrid/body/footer/use_data_grid_footer.js +1 -2
- package/test-env/components/datagrid/body/header/data_grid_control_header_cell.js +8 -4
- package/test-env/components/datagrid/body/header/data_grid_header_cell.js +72 -52
- package/test-env/components/datagrid/body/header/data_grid_header_row.js +14 -550
- package/test-env/components/datagrid/body/header/use_data_grid_header.js +7 -6
- package/test-env/components/datagrid/controls/column_selector.js +126 -123
- package/test-env/components/datagrid/controls/column_sorting.js +607 -106
- package/test-env/components/datagrid/controls/column_sorting_draggable.js +27 -22
- package/test-env/components/datagrid/controls/display_selector.js +109 -107
- package/test-env/components/datagrid/data_grid.a11y.js +13 -12
- package/test-env/components/datagrid/data_grid.js +43 -20
- package/test-env/components/datagrid/utils/col_widths.js +9 -5
- package/test-env/components/datagrid/utils/focus.js +10 -8
- package/test-env/components/datagrid/utils/grid_height_width.js +29 -28
- package/test-env/components/datagrid/utils/ref.js +1 -1
- package/test-env/components/datagrid/utils/row_heights.js +1 -1
- package/test-env/components/datagrid/utils/sorting.js +31 -29
- package/test-env/components/date_picker/super_date_picker/super_date_picker.js +9 -0
- package/test-env/components/date_picker/super_date_picker/super_update_button.js +57 -29
- package/test-env/components/flex/flex_grid.js +21 -7
- package/test-env/components/flex/flex_grid.styles.js +13 -6
- package/test-env/components/flex/flex_group.js +10 -10
- package/test-env/components/flex/flex_item.js +13 -13
- package/test-env/components/flex/flex_item.styles.js +107 -122
- package/test-env/components/header/header_breadcrumbs/header_breadcrumbs.js +3 -5
- package/test-env/components/header/header_links/header_links.js +10 -2
- package/test-env/components/modal/confirm_modal.js +2 -1
- package/test-env/components/modal/modal.js +12 -3
- package/test-env/components/panel/panel.js +1 -2
- package/test-env/components/resizable_container/resizable_button.js +1 -2
- package/test-env/components/resizable_container/resizable_collapse_button.js +1 -2
- package/test-env/components/resizable_container/resizable_container.js +1 -2
- package/test-env/components/resizable_container/resizable_container.styles.js +11 -14
- package/test-env/components/resizable_container/resizable_panel.js +3 -5
- package/test-env/components/resizable_container/resizable_panel.styles.js +17 -26
- package/test-env/components/selectable/selectable_list/selectable_list.js +26 -6
- package/test-env/components/spacer/spacer.js +1 -2
- package/test-env/components/toast/global_toast_list.js +68 -71
- package/test-env/components/toast/toast.js +25 -40
- package/test-env/components/toast/toast.styles.js +11 -25
- package/test-env/components/tool_tip/icon_tip.js +4 -3
- package/test-env/global_styling/mixins/_color.js +63 -40
- package/test-env/global_styling/mixins/_padding.js +59 -25
- package/test-env/services/color/eui_palettes.js +24 -14
- package/test-env/services/color/index.js +14 -0
- package/test-env/services/hooks/index.js +11 -0
- package/test-env/services/hooks/useDeepEqual.js +30 -0
- package/test-env/services/index.js +15 -1
- package/test-env/services/theme/style_memoization.js +1 -3
- package/src/themes/charts/theme.scss +0 -5
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
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)."; }
|
|
8
2
|
/*
|
|
9
3
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -14,29 +8,24 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
14
8
|
*/
|
|
15
9
|
|
|
16
10
|
import { css } from '@emotion/react';
|
|
17
|
-
import { logicalCSS, logicalCSSWithFallback, euiScrollBarStyles
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
return {
|
|
36
|
-
euiResizablePanel: _ref3,
|
|
37
|
-
collapsed: _ref2,
|
|
38
|
-
paddingSizes: _objectSpread({}, euiPaddingSizeCSS(euiThemeContext))
|
|
39
|
-
};
|
|
11
|
+
import { logicalCSS, logicalCSSWithFallback, euiScrollBarStyles } from '../../global_styling';
|
|
12
|
+
export var euiResizablePanelStyles = {
|
|
13
|
+
euiResizablePanel: process.env.NODE_ENV === "production" ? {
|
|
14
|
+
name: "15ifdgc-euiResizablePanel",
|
|
15
|
+
styles: "position:relative;label:euiResizablePanel;"
|
|
16
|
+
} : {
|
|
17
|
+
name: "15ifdgc-euiResizablePanel",
|
|
18
|
+
styles: "position:relative;label:euiResizablePanel;",
|
|
19
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
20
|
+
},
|
|
21
|
+
collapsed: process.env.NODE_ENV === "production" ? {
|
|
22
|
+
name: "11qmbh3-collapsed",
|
|
23
|
+
styles: "overflow:hidden;label:collapsed;"
|
|
24
|
+
} : {
|
|
25
|
+
name: "11qmbh3-collapsed",
|
|
26
|
+
styles: "overflow:hidden;label:collapsed;",
|
|
27
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
28
|
+
}
|
|
40
29
|
};
|
|
41
30
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
42
31
|
name: "597kt8-collapsedChildren",
|
|
@@ -422,14 +422,30 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
|
|
|
422
422
|
key: "componentDidUpdate",
|
|
423
423
|
value: function componentDidUpdate(prevProps) {
|
|
424
424
|
var _this$props9 = this.props,
|
|
425
|
+
isVirtualized = _this$props9.isVirtualized,
|
|
425
426
|
activeOptionIndex = _this$props9.activeOptionIndex,
|
|
426
427
|
visibleOptions = _this$props9.visibleOptions,
|
|
427
428
|
options = _this$props9.options;
|
|
428
|
-
if (
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
429
|
+
if (prevProps.activeOptionIndex !== activeOptionIndex) {
|
|
430
|
+
var makeOptionId = this.props.makeOptionId;
|
|
431
|
+
if (this.listBoxRef && this.props.searchable !== true) {
|
|
432
|
+
this.listBoxRef.setAttribute('aria-activedescendant', makeOptionId(activeOptionIndex));
|
|
433
|
+
}
|
|
434
|
+
if (typeof activeOptionIndex !== 'undefined') {
|
|
435
|
+
if (isVirtualized) {
|
|
436
|
+
var _this$listRef;
|
|
437
|
+
(_this$listRef = this.listRef) === null || _this$listRef === void 0 ? void 0 : _this$listRef.scrollToItem(activeOptionIndex, 'auto');
|
|
438
|
+
} else {
|
|
439
|
+
var _this$listBoxRef;
|
|
440
|
+
var activeOptionId = "#".concat(makeOptionId(activeOptionIndex));
|
|
441
|
+
var activeOptionEl = (_this$listBoxRef = this.listBoxRef) === null || _this$listBoxRef === void 0 ? void 0 : _this$listBoxRef.querySelector(activeOptionId);
|
|
442
|
+
if (activeOptionEl) {
|
|
443
|
+
activeOptionEl.scrollIntoView({
|
|
444
|
+
block: 'nearest'
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
}
|
|
433
449
|
}
|
|
434
450
|
if (prevProps.visibleOptions !== visibleOptions || prevProps.options !== options) {
|
|
435
451
|
var optionArray = visibleOptions || options;
|
|
@@ -472,14 +488,18 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
|
|
|
472
488
|
textWrap = _this$props10.textWrap,
|
|
473
489
|
truncationProps = _this$props10.truncationProps,
|
|
474
490
|
rest = _objectWithoutProperties(_this$props10, _excluded3);
|
|
491
|
+
var heightIsFull = forcedHeight === 'full';
|
|
475
492
|
var classes = classNames('euiSelectableList', {
|
|
476
|
-
'euiSelectableList-fullHeight':
|
|
493
|
+
'euiSelectableList-fullHeight': heightIsFull,
|
|
477
494
|
'euiSelectableList-bordered': bordered
|
|
478
495
|
}, className);
|
|
479
496
|
return ___EmotionJSX("div", _extends({
|
|
480
497
|
className: classes
|
|
481
498
|
}, rest), isVirtualized ? this.renderVirtualizedList() : ___EmotionJSX("div", {
|
|
482
499
|
className: "euiSelectableList__list",
|
|
500
|
+
style: !heightIsFull ? {
|
|
501
|
+
blockSize: forcedHeight
|
|
502
|
+
} : undefined,
|
|
483
503
|
ref: this.removeScrollableTabStop
|
|
484
504
|
}, ___EmotionJSX("ul", {
|
|
485
505
|
ref: this.setListBoxRef
|
|
@@ -17,7 +17,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
17
17
|
import React from 'react';
|
|
18
18
|
import PropTypes from "prop-types";
|
|
19
19
|
import classNames from 'classnames';
|
|
20
|
-
import {
|
|
20
|
+
import { useEuiMemoizedStyles } from '../../services';
|
|
21
21
|
import { euiSpacerStyles } from './spacer.styles';
|
|
22
22
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
23
23
|
export var SIZES = ['xs', 's', 'm', 'l', 'xl', 'xxl'];
|
|
@@ -26,8 +26,7 @@ export var EuiSpacer = function EuiSpacer(_ref) {
|
|
|
26
26
|
_ref$size = _ref.size,
|
|
27
27
|
size = _ref$size === void 0 ? 'l' : _ref$size,
|
|
28
28
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
29
|
-
var
|
|
30
|
-
var styles = euiSpacerStyles(euiTheme);
|
|
29
|
+
var styles = useEuiMemoizedStyles(euiSpacerStyles);
|
|
31
30
|
var classes = classNames('euiSpacer', _defineProperty({}, "euiSpacer--".concat(size), size), className);
|
|
32
31
|
var cssStyles = [styles.euiSpacer, styles[size]];
|
|
33
32
|
return ___EmotionJSX("div", _extends({
|
|
@@ -23,11 +23,11 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
23
23
|
* Side Public License, v 1.
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
26
|
+
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
27
27
|
import PropTypes from "prop-types";
|
|
28
28
|
import classNames from 'classnames';
|
|
29
29
|
import { keysOf } from '../common';
|
|
30
|
-
import {
|
|
30
|
+
import { useEuiMemoizedStyles } from '../../services';
|
|
31
31
|
import { Timer } from '../../services/time';
|
|
32
32
|
import { EuiGlobalToastListItem } from './global_toast_list_item';
|
|
33
33
|
import { EuiToast } from './toast';
|
|
@@ -74,10 +74,9 @@ export var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
|
|
|
74
74
|
var isScrollingAnimationFrame = useRef(0);
|
|
75
75
|
var startScrollingAnimationFrame = useRef(0);
|
|
76
76
|
var listElement = useRef(null);
|
|
77
|
-
var
|
|
78
|
-
var styles = euiGlobalToastListStyles(euiTheme);
|
|
77
|
+
var styles = useEuiMemoizedStyles(euiGlobalToastListStyles);
|
|
79
78
|
var cssStyles = [styles.euiGlobalToastList, styles[side]];
|
|
80
|
-
var startScrollingToBottom = function
|
|
79
|
+
var startScrollingToBottom = useCallback(function () {
|
|
81
80
|
isScrollingToBottom.current = true;
|
|
82
81
|
var scrollToBottom = function scrollToBottom() {
|
|
83
82
|
// Although we cancel the requestAnimationFrame in componentWillUnmount,
|
|
@@ -100,8 +99,8 @@ export var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
|
|
|
100
99
|
}
|
|
101
100
|
};
|
|
102
101
|
startScrollingAnimationFrame.current = window.requestAnimationFrame(scrollToBottom);
|
|
103
|
-
};
|
|
104
|
-
var onMouseEnter = function
|
|
102
|
+
}, []);
|
|
103
|
+
var onMouseEnter = useCallback(function () {
|
|
105
104
|
// Stop scrolling to bottom if we're in mid-scroll, because the user wants to interact with
|
|
106
105
|
// the list.
|
|
107
106
|
isScrollingToBottom.current = false;
|
|
@@ -114,8 +113,8 @@ export var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
|
|
|
114
113
|
timer.pause();
|
|
115
114
|
}
|
|
116
115
|
}
|
|
117
|
-
};
|
|
118
|
-
var onMouseLeave = function
|
|
116
|
+
}, []);
|
|
117
|
+
var onMouseLeave = useCallback(function () {
|
|
119
118
|
isUserInteracting.current = false;
|
|
120
119
|
for (var _toastId2 in toastIdToTimerMap.current) {
|
|
121
120
|
if (toastIdToTimerMap.current.hasOwnProperty(_toastId2)) {
|
|
@@ -123,8 +122,8 @@ export var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
|
|
|
123
122
|
timer.resume();
|
|
124
123
|
}
|
|
125
124
|
}
|
|
126
|
-
};
|
|
127
|
-
var onScroll = function
|
|
125
|
+
}, []);
|
|
126
|
+
var onScroll = useCallback(function () {
|
|
128
127
|
// Given that this method also gets invoked by the synthetic scroll that happens when a new toast gets added,
|
|
129
128
|
// we want to evaluate if the scroll bottom has been reached only when the user is interacting with the toast,
|
|
130
129
|
// this way we always retain the scroll position the user has set despite adding in new toasts.
|
|
@@ -132,7 +131,7 @@ export var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
|
|
|
132
131
|
if (listElement.current && isUserInteracting.current) {
|
|
133
132
|
isScrolledToBottom.current = listElement.current.scrollHeight - listElement.current.scrollTop === listElement.current.clientHeight;
|
|
134
133
|
}
|
|
135
|
-
};
|
|
134
|
+
}, []);
|
|
136
135
|
var dismissToast = useCallback(function (toast) {
|
|
137
136
|
// Remove the toast after it's done fading out.
|
|
138
137
|
dismissTimeoutIds.current.push(window.setTimeout(function () {
|
|
@@ -155,34 +154,29 @@ export var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
|
|
|
155
154
|
}
|
|
156
155
|
});
|
|
157
156
|
}, [scheduleToastForDismissal, toasts]);
|
|
158
|
-
var addListeners = function addListeners() {
|
|
159
|
-
if (listElement.current) {
|
|
160
|
-
listElement.current.addEventListener('scroll', onScroll);
|
|
161
|
-
listElement.current.addEventListener('mouseenter', onMouseEnter);
|
|
162
|
-
listElement.current.addEventListener('mouseleave', onMouseLeave);
|
|
163
|
-
}
|
|
164
|
-
};
|
|
165
|
-
var removeListeners = function removeListeners() {
|
|
166
|
-
if (listElement.current) {
|
|
167
|
-
listElement.current.removeEventListener('scroll', onScroll);
|
|
168
|
-
listElement.current.removeEventListener('mouseenter', onMouseEnter);
|
|
169
|
-
listElement.current.removeEventListener('mouseleave', onMouseLeave);
|
|
170
|
-
}
|
|
171
|
-
};
|
|
172
157
|
|
|
173
158
|
// componentDidMount
|
|
174
159
|
useEffect(function () {
|
|
175
|
-
|
|
160
|
+
var listenerEl = listElement.current;
|
|
161
|
+
if (listenerEl) {
|
|
162
|
+
listenerEl.addEventListener('scroll', onScroll);
|
|
163
|
+
listenerEl.addEventListener('mouseenter', onMouseEnter);
|
|
164
|
+
listenerEl.addEventListener('mouseleave', onMouseLeave);
|
|
165
|
+
}
|
|
176
166
|
|
|
177
167
|
// componentWillUnmount
|
|
178
168
|
return function () {
|
|
169
|
+
if (listenerEl) {
|
|
170
|
+
listenerEl.removeEventListener('scroll', onScroll);
|
|
171
|
+
listenerEl.removeEventListener('mouseenter', onMouseEnter);
|
|
172
|
+
listenerEl.removeEventListener('mouseleave', onMouseLeave);
|
|
173
|
+
}
|
|
179
174
|
if (isScrollingAnimationFrame.current !== 0) {
|
|
180
175
|
window.cancelAnimationFrame(isScrollingAnimationFrame.current);
|
|
181
176
|
}
|
|
182
177
|
if (startScrollingAnimationFrame.current !== 0) {
|
|
183
178
|
window.cancelAnimationFrame(startScrollingAnimationFrame.current);
|
|
184
179
|
}
|
|
185
|
-
removeListeners();
|
|
186
180
|
dismissTimeoutIds.current.forEach(clearTimeout); // eslint-disable-line react-hooks/exhaustive-deps
|
|
187
181
|
for (var _toastId3 in toastIdToTimerMap.current) {
|
|
188
182
|
if (toastIdToTimerMap.current.hasOwnProperty(_toastId3)) {
|
|
@@ -191,7 +185,7 @@ export var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
|
|
|
191
185
|
}
|
|
192
186
|
}
|
|
193
187
|
};
|
|
194
|
-
}, []);
|
|
188
|
+
}, [onMouseEnter, onMouseLeave, onScroll]);
|
|
195
189
|
|
|
196
190
|
// componentDidUpdate
|
|
197
191
|
useEffect(function () {
|
|
@@ -206,7 +200,7 @@ export var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
|
|
|
206
200
|
}
|
|
207
201
|
}
|
|
208
202
|
prevToasts.current = toasts;
|
|
209
|
-
}, [toasts, scheduleAllToastsForDismissal]);
|
|
203
|
+
}, [toasts, scheduleAllToastsForDismissal, startScrollingToBottom]);
|
|
210
204
|
|
|
211
205
|
// Toast dismissal side effect
|
|
212
206
|
// Ensure the callback has correct state by not enclosing it in `setTimeout`
|
|
@@ -227,49 +221,52 @@ export var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
|
|
|
227
221
|
});
|
|
228
222
|
}
|
|
229
223
|
}, [toastToDismiss, dismissToastProp]);
|
|
230
|
-
var renderedToasts =
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
key: toast.id,
|
|
239
|
-
isDismissed: toastIdToDismissedMap[toast.id]
|
|
240
|
-
}, ___EmotionJSX(EuiToast, _extends({
|
|
241
|
-
onClose: onClose,
|
|
242
|
-
onFocus: onMouseEnter,
|
|
243
|
-
onBlur: onMouseLeave
|
|
244
|
-
}, rest), text));
|
|
245
|
-
});
|
|
246
|
-
if (showClearAllButtonAt && toasts.length >= showClearAllButtonAt) {
|
|
247
|
-
var dismissAllToasts = function dismissAllToasts() {
|
|
248
|
-
toasts.forEach(function (toast) {
|
|
249
|
-
return dismissToastProp(toast);
|
|
250
|
-
});
|
|
251
|
-
onClearAllToasts === null || onClearAllToasts === void 0 ? void 0 : onClearAllToasts();
|
|
252
|
-
};
|
|
253
|
-
renderedToasts.push(___EmotionJSX(EuiI18n, {
|
|
254
|
-
key: "euiClearAllToasts",
|
|
255
|
-
tokens: ['euiGlobalToastList.clearAllToastsButtonAriaLabel', 'euiGlobalToastList.clearAllToastsButtonDisplayText'],
|
|
256
|
-
defaults: ['Clear all toast notifications', 'Clear all']
|
|
257
|
-
}, function (_ref2) {
|
|
258
|
-
var _ref3 = _slicedToArray(_ref2, 2),
|
|
259
|
-
clearAllToastsButtonAriaLabel = _ref3[0],
|
|
260
|
-
clearAllToastsButtonDisplayText = _ref3[1];
|
|
224
|
+
var renderedToasts = useMemo(function () {
|
|
225
|
+
return toasts.map(function (toast) {
|
|
226
|
+
var text = toast.text,
|
|
227
|
+
toastLifeTimeMs = toast.toastLifeTimeMs,
|
|
228
|
+
rest = _objectWithoutProperties(toast, _excluded2);
|
|
229
|
+
var onClose = function onClose() {
|
|
230
|
+
return dismissToast(toast);
|
|
231
|
+
};
|
|
261
232
|
return ___EmotionJSX(EuiGlobalToastListItem, {
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
233
|
+
key: toast.id,
|
|
234
|
+
isDismissed: toastIdToDismissedMap[toast.id]
|
|
235
|
+
}, ___EmotionJSX(EuiToast, _extends({
|
|
236
|
+
onClose: onClose,
|
|
237
|
+
onFocus: onMouseEnter,
|
|
238
|
+
onBlur: onMouseLeave
|
|
239
|
+
}, rest), text));
|
|
240
|
+
});
|
|
241
|
+
}, [toasts, toastIdToDismissedMap, dismissToast, onMouseEnter, onMouseLeave]);
|
|
242
|
+
var clearAllButton = useMemo(function () {
|
|
243
|
+
if (toasts.length && showClearAllButtonAt && toasts.length >= showClearAllButtonAt) {
|
|
244
|
+
return ___EmotionJSX(EuiI18n, {
|
|
245
|
+
key: "euiClearAllToasts",
|
|
246
|
+
tokens: ['euiGlobalToastList.clearAllToastsButtonAriaLabel', 'euiGlobalToastList.clearAllToastsButtonDisplayText'],
|
|
247
|
+
defaults: ['Clear all toast notifications', 'Clear all']
|
|
248
|
+
}, function (_ref2) {
|
|
249
|
+
var _ref3 = _slicedToArray(_ref2, 2),
|
|
250
|
+
clearAllToastsButtonAriaLabel = _ref3[0],
|
|
251
|
+
clearAllToastsButtonDisplayText = _ref3[1];
|
|
252
|
+
return ___EmotionJSX(EuiGlobalToastListItem, {
|
|
253
|
+
isDismissed: false
|
|
254
|
+
}, ___EmotionJSX(EuiButton, {
|
|
255
|
+
fill: true,
|
|
256
|
+
color: "text",
|
|
257
|
+
onClick: function onClick() {
|
|
258
|
+
toasts.forEach(function (toast) {
|
|
259
|
+
return dismissToastProp(toast);
|
|
260
|
+
});
|
|
261
|
+
onClearAllToasts === null || onClearAllToasts === void 0 ? void 0 : onClearAllToasts();
|
|
262
|
+
},
|
|
263
|
+
css: styles.euiGlobalToastListDismissButton,
|
|
264
|
+
"aria-label": clearAllToastsButtonAriaLabel,
|
|
265
|
+
"data-test-subj": "euiClearAllToastsButton"
|
|
266
|
+
}, clearAllToastsButtonDisplayText));
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
}, [showClearAllButtonAt, onClearAllToasts, toasts, dismissToastProp, styles]);
|
|
273
270
|
var classes = classNames('euiGlobalToastList', className);
|
|
274
271
|
return ___EmotionJSX("div", _extends({
|
|
275
272
|
"aria-live": "polite",
|
|
@@ -277,7 +274,7 @@ export var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
|
|
|
277
274
|
ref: listElement,
|
|
278
275
|
css: cssStyles,
|
|
279
276
|
className: classes
|
|
280
|
-
}, rest), renderedToasts);
|
|
277
|
+
}, rest), renderedToasts, clearAllButton);
|
|
281
278
|
};
|
|
282
279
|
EuiGlobalToastList.propTypes = {
|
|
283
280
|
toasts: PropTypes.arrayOf(PropTypes.shape({
|
|
@@ -13,13 +13,13 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
13
13
|
import React from 'react';
|
|
14
14
|
import PropTypes from "prop-types";
|
|
15
15
|
import classNames from 'classnames';
|
|
16
|
-
import {
|
|
16
|
+
import { useEuiMemoizedStyles } from '../../services';
|
|
17
17
|
import { EuiScreenReaderOnly } from '../accessibility';
|
|
18
18
|
import { EuiButtonIcon } from '../button';
|
|
19
19
|
import { EuiI18n } from '../i18n';
|
|
20
20
|
import { EuiIcon } from '../icon';
|
|
21
21
|
import { EuiText } from '../text';
|
|
22
|
-
import { euiToastStyles,
|
|
22
|
+
import { euiToastStyles, euiToastHeaderStyles } from './toast.styles';
|
|
23
23
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
24
24
|
export var COLORS = ['primary', 'success', 'warning', 'danger'];
|
|
25
25
|
export var EuiToast = function EuiToast(_ref) {
|
|
@@ -30,47 +30,11 @@ export var EuiToast = function EuiToast(_ref) {
|
|
|
30
30
|
children = _ref.children,
|
|
31
31
|
className = _ref.className,
|
|
32
32
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
33
|
-
var
|
|
34
|
-
var baseStyles = euiToastStyles(euiTheme);
|
|
33
|
+
var baseStyles = useEuiMemoizedStyles(euiToastStyles);
|
|
35
34
|
var baseCss = [baseStyles.euiToast, color && baseStyles[color]];
|
|
36
|
-
var
|
|
37
|
-
var headerStyles = euiToastHeaderStyles(euiTheme);
|
|
35
|
+
var headerStyles = useEuiMemoizedStyles(euiToastHeaderStyles);
|
|
38
36
|
var headerCss = [headerStyles.euiToastHeader, children && headerStyles.withBody];
|
|
39
37
|
var classes = classNames('euiToast', className);
|
|
40
|
-
var headerIcon;
|
|
41
|
-
if (iconType) {
|
|
42
|
-
headerIcon = ___EmotionJSX(EuiIcon, {
|
|
43
|
-
css: headerStyles.euiToastHeader__icon,
|
|
44
|
-
type: iconType,
|
|
45
|
-
size: "m",
|
|
46
|
-
"aria-hidden": "true"
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
var closeButton;
|
|
50
|
-
if (onClose) {
|
|
51
|
-
closeButton = ___EmotionJSX(EuiI18n, {
|
|
52
|
-
token: "euiToast.dismissToast",
|
|
53
|
-
default: "Dismiss toast"
|
|
54
|
-
}, function (dismissToast) {
|
|
55
|
-
return ___EmotionJSX(EuiButtonIcon, {
|
|
56
|
-
css: baseStyles.euiToast__closeButton,
|
|
57
|
-
iconType: "cross",
|
|
58
|
-
color: "text",
|
|
59
|
-
size: "xs",
|
|
60
|
-
"aria-label": dismissToast,
|
|
61
|
-
onClick: onClose,
|
|
62
|
-
"data-test-subj": "toastCloseButton"
|
|
63
|
-
});
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
var optionalBody;
|
|
67
|
-
if (children) {
|
|
68
|
-
optionalBody = ___EmotionJSX(EuiText, {
|
|
69
|
-
css: bodyStyles.euiToastBody,
|
|
70
|
-
size: "s",
|
|
71
|
-
"data-test-subj": "euiToastBody"
|
|
72
|
-
}, children);
|
|
73
|
-
}
|
|
74
38
|
return ___EmotionJSX("div", _extends({
|
|
75
39
|
css: baseCss,
|
|
76
40
|
className: classes
|
|
@@ -85,11 +49,32 @@ export var EuiToast = function EuiToast(_ref) {
|
|
|
85
49
|
css: headerCss,
|
|
86
50
|
"aria-label": notification,
|
|
87
51
|
"data-test-subj": "euiToastHeader"
|
|
88
|
-
},
|
|
52
|
+
}, iconType && ___EmotionJSX(EuiIcon, {
|
|
53
|
+
css: headerStyles.euiToastHeader__icon,
|
|
54
|
+
type: iconType,
|
|
55
|
+
size: "m",
|
|
56
|
+
"aria-hidden": "true"
|
|
57
|
+
}), ___EmotionJSX("span", {
|
|
89
58
|
css: headerStyles.euiToastHeader__title,
|
|
90
59
|
"data-test-subj": "euiToastHeader__title"
|
|
91
60
|
}, title));
|
|
92
|
-
}),
|
|
61
|
+
}), onClose && ___EmotionJSX(EuiI18n, {
|
|
62
|
+
token: "euiToast.dismissToast",
|
|
63
|
+
default: "Dismiss toast"
|
|
64
|
+
}, function (dismissToast) {
|
|
65
|
+
return ___EmotionJSX(EuiButtonIcon, {
|
|
66
|
+
css: baseStyles.euiToast__closeButton,
|
|
67
|
+
iconType: "cross",
|
|
68
|
+
color: "text",
|
|
69
|
+
size: "xs",
|
|
70
|
+
"aria-label": dismissToast,
|
|
71
|
+
onClick: onClose,
|
|
72
|
+
"data-test-subj": "toastCloseButton"
|
|
73
|
+
});
|
|
74
|
+
}), children && ___EmotionJSX(EuiText, {
|
|
75
|
+
size: "s",
|
|
76
|
+
"data-test-subj": "euiToastBody"
|
|
77
|
+
}, children));
|
|
93
78
|
};
|
|
94
79
|
EuiToast.propTypes = {
|
|
95
80
|
title: PropTypes.node,
|
|
@@ -1,4 +1,3 @@
|
|
|
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
1
|
/*
|
|
3
2
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
4
3
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -8,14 +7,14 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
8
7
|
*/
|
|
9
8
|
|
|
10
9
|
import { css } from '@emotion/react';
|
|
11
|
-
import { logicalCSS } from '../../global_styling';
|
|
10
|
+
import { euiTextBreakWord, logicalCSS } from '../../global_styling';
|
|
12
11
|
import { euiShadowLarge } from '../../themes/amsterdam';
|
|
13
12
|
import { euiTitle } from '../title/title.styles';
|
|
14
13
|
export var euiToastStyles = function euiToastStyles(euiThemeContext) {
|
|
15
14
|
var euiTheme = euiThemeContext.euiTheme;
|
|
16
15
|
return {
|
|
17
16
|
// Base
|
|
18
|
-
euiToast: /*#__PURE__*/css("border-radius:", euiTheme.border.radius.medium, ";", euiShadowLarge(euiThemeContext), " position:relative;", logicalCSS('padding-horizontal', euiTheme.size.base), " ", logicalCSS('padding-vertical', euiTheme.size.base), " background-color:", euiTheme.colors.emptyShade, ";", logicalCSS('width', '100%'), " &:hover,&:focus{[class*='euiToast__closeButton']{opacity:1;}};label:euiToast;"),
|
|
17
|
+
euiToast: /*#__PURE__*/css("border-radius:", euiTheme.border.radius.medium, ";", euiShadowLarge(euiThemeContext), " position:relative;", logicalCSS('padding-horizontal', euiTheme.size.base), " ", logicalCSS('padding-vertical', euiTheme.size.base), " background-color:", euiTheme.colors.emptyShade, ";", logicalCSS('width', '100%'), " ", euiTextBreakWord(), "&:hover,&:focus{[class*='euiToast__closeButton']{opacity:1;}};label:euiToast;"),
|
|
19
18
|
// Elements
|
|
20
19
|
euiToast__closeButton: /*#__PURE__*/css("position:absolute;", logicalCSS('top', euiTheme.size.base), " ", logicalCSS('right', euiTheme.size.base), ";;label:euiToast__closeButton;"),
|
|
21
20
|
// Variants
|
|
@@ -36,18 +35,4 @@ export var euiToastHeaderStyles = function euiToastHeaderStyles(euiThemeContext)
|
|
|
36
35
|
// Variants
|
|
37
36
|
withBody: /*#__PURE__*/css(logicalCSS('margin-bottom', euiTheme.size.s), ";;label:withBody;")
|
|
38
37
|
};
|
|
39
|
-
};
|
|
40
|
-
var _ref = process.env.NODE_ENV === "production" ? {
|
|
41
|
-
name: "1xv63y1-euiToastBody",
|
|
42
|
-
styles: "word-wrap:break-word;label:euiToastBody;"
|
|
43
|
-
} : {
|
|
44
|
-
name: "1xv63y1-euiToastBody",
|
|
45
|
-
styles: "word-wrap:break-word;label:euiToastBody;",
|
|
46
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
47
|
-
};
|
|
48
|
-
export var euiToastBodyStyles = function euiToastBodyStyles() {
|
|
49
|
-
return {
|
|
50
|
-
// Base
|
|
51
|
-
euiToastBody: _ref
|
|
52
|
-
};
|
|
53
38
|
};
|
|
@@ -12,14 +12,14 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
12
12
|
|
|
13
13
|
import React from 'react';
|
|
14
14
|
import PropTypes from "prop-types";
|
|
15
|
+
import { useEuiI18n } from '../i18n';
|
|
15
16
|
import { EuiIcon } from '../icon';
|
|
16
17
|
import { EuiToolTip } from './tool_tip';
|
|
17
18
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
18
19
|
export var EuiIconTip = function EuiIconTip(_ref) {
|
|
19
20
|
var _ref$type = _ref.type,
|
|
20
21
|
type = _ref$type === void 0 ? 'questionInCircle' : _ref$type,
|
|
21
|
-
|
|
22
|
-
ariaLabel = _ref$ariaLabel === void 0 ? 'Info' : _ref$ariaLabel,
|
|
22
|
+
ariaLabel = _ref['aria-label'],
|
|
23
23
|
color = _ref.color,
|
|
24
24
|
size = _ref.size,
|
|
25
25
|
iconProps = _ref.iconProps,
|
|
@@ -28,6 +28,7 @@ export var EuiIconTip = function EuiIconTip(_ref) {
|
|
|
28
28
|
_ref$delay = _ref.delay,
|
|
29
29
|
delay = _ref$delay === void 0 ? 'regular' : _ref$delay,
|
|
30
30
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
31
|
+
var defaultAriaLabel = useEuiI18n('euiIconTip.defaultAriaLabel', 'Info');
|
|
31
32
|
return ___EmotionJSX(EuiToolTip, _extends({
|
|
32
33
|
position: position,
|
|
33
34
|
delay: delay
|
|
@@ -36,7 +37,7 @@ export var EuiIconTip = function EuiIconTip(_ref) {
|
|
|
36
37
|
type: type,
|
|
37
38
|
color: color,
|
|
38
39
|
size: size,
|
|
39
|
-
"aria-label": ariaLabel
|
|
40
|
+
"aria-label": ariaLabel || defaultAriaLabel
|
|
40
41
|
}, iconProps)));
|
|
41
42
|
};
|
|
42
43
|
EuiIconTip.propTypes = {
|