@elastic/eui 93.2.0 → 93.4.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 -324
- package/es/components/breadcrumbs/breadcrumb.styles.js +5 -27
- package/es/components/breadcrumbs/breadcrumbs.js +8 -6
- package/es/components/breadcrumbs/types.js +1 -0
- package/es/components/button/button_display/_button_display.js +2 -3
- package/es/components/button/button_empty/button_empty.js +2 -3
- package/es/components/button/button_group/button_group.js +19 -7
- package/es/components/button/button_group/button_group.styles.js +11 -14
- 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/button/button_icon/button_icon.js +4 -5
- package/es/components/button/button_icon/button_icon.styles.js +11 -3
- package/es/components/datagrid/body/cell/data_grid_cell.js +102 -59
- 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 +34 -31
- package/es/components/datagrid/body/cell/index.js +1 -1
- package/es/components/datagrid/body/data_grid_body.js +14 -0
- package/es/components/datagrid/body/data_grid_body_custom.js +54 -35
- package/es/components/datagrid/body/data_grid_body_virtualized.js +87 -56
- package/es/components/datagrid/body/data_grid_row_manager.js +7 -5
- 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 +47 -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/facet/facet_button.styles.js +1 -2
- 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 +7 -7
- package/es/components/icon/icon.js +13 -16
- package/es/components/icon/icon.styles.js +6 -9
- package/es/components/link/external_link_icon.js +11 -8
- package/es/components/link/link.js +2 -3
- package/es/components/link/link.styles.js +4 -10
- 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/page/page_header/page_header_content.js +4 -2
- package/es/components/progress/progress.styles.js +2 -2
- package/es/components/skeleton/skeleton_circle.js +2 -3
- package/es/components/skeleton/skeleton_rectangle.js +2 -3
- package/es/components/skeleton/skeleton_text.js +16 -12
- package/es/components/skeleton/skeleton_title.js +2 -3
- package/es/components/spacer/spacer.js +2 -3
- package/es/components/text/text.js +2 -3
- package/es/components/text/text_align.js +1 -2
- package/es/components/text/text_align.styles.js +5 -7
- package/es/components/text/text_color.js +2 -3
- package/es/components/title/title.js +2 -3
- package/es/components/title/title.styles.js +0 -7
- 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/global_styling/mixins/_typography.js +17 -6
- 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/index.js +1 -1
- package/es/services/theme/style_memoization.js +47 -14
- package/es/themes/amsterdam/global_styling/mixins/button.js +47 -24
- package/eui.d.ts +2862 -2748
- package/i18ntokens.json +267 -267
- 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 -328
- package/lib/components/breadcrumbs/breadcrumb.styles.js +5 -29
- package/lib/components/breadcrumbs/breadcrumbs.js +7 -5
- package/lib/components/breadcrumbs/types.js +5 -0
- package/lib/components/button/button_display/_button_display.js +1 -2
- package/lib/components/button/button_empty/button_empty.js +1 -2
- package/lib/components/button/button_group/button_group.js +18 -6
- package/lib/components/button/button_group/button_group.styles.js +11 -14
- 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/button/button_icon/button_icon.js +3 -4
- package/lib/components/button/button_icon/button_icon.styles.js +10 -2
- package/lib/components/datagrid/body/cell/data_grid_cell.js +100 -58
- 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 +34 -31
- package/lib/components/datagrid/body/cell/index.js +2 -2
- package/lib/components/datagrid/body/data_grid_body.js +14 -0
- package/lib/components/datagrid/body/data_grid_body_custom.js +53 -34
- package/lib/components/datagrid/body/data_grid_body_virtualized.js +86 -55
- package/lib/components/datagrid/body/data_grid_row_manager.js +6 -4
- 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 +45 -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/facet/facet_button.styles.js +1 -2
- 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 +7 -7
- package/lib/components/icon/icon.js +12 -15
- package/lib/components/icon/icon.styles.js +5 -8
- package/lib/components/link/external_link_icon.js +10 -7
- package/lib/components/link/link.js +1 -2
- package/lib/components/link/link.styles.js +6 -14
- 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/page/page_header/page_header_content.js +4 -2
- package/lib/components/progress/progress.styles.js +1 -1
- package/lib/components/skeleton/skeleton_circle.js +1 -2
- package/lib/components/skeleton/skeleton_rectangle.js +1 -2
- package/lib/components/skeleton/skeleton_text.js +18 -11
- package/lib/components/skeleton/skeleton_title.js +1 -2
- package/lib/components/spacer/spacer.js +1 -2
- package/lib/components/text/text.js +1 -2
- package/lib/components/text/text_align.js +1 -2
- package/lib/components/text/text_align.styles.js +5 -7
- package/lib/components/text/text_color.js +1 -2
- package/lib/components/title/title.js +1 -2
- package/lib/components/title/title.styles.js +2 -10
- 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/global_styling/mixins/_typography.js +27 -19
- 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/index.js +6 -0
- package/lib/services/theme/style_memoization.js +49 -16
- package/lib/themes/amsterdam/global_styling/mixins/button.js +49 -25
- 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 -109
- 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_display/_button_display.js +2 -3
- package/optimize/es/components/button/button_empty/button_empty.js +2 -3
- package/optimize/es/components/button/button_group/button_group.js +5 -7
- package/optimize/es/components/button/button_group/button_group.styles.js +11 -14
- 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/button/button_icon/button_icon.js +4 -5
- package/optimize/es/components/button/button_icon/button_icon.styles.js +8 -3
- package/optimize/es/components/datagrid/body/cell/data_grid_cell.js +83 -56
- 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 +34 -31
- package/optimize/es/components/datagrid/body/cell/index.js +1 -1
- package/optimize/es/components/datagrid/body/data_grid_body_custom.js +40 -35
- package/optimize/es/components/datagrid/body/data_grid_body_virtualized.js +71 -49
- package/optimize/es/components/datagrid/body/data_grid_row_manager.js +7 -5
- 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 +47 -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/facet/facet_button.styles.js +1 -2
- 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/icon/icon.js +13 -16
- package/optimize/es/components/icon/icon.styles.js +6 -9
- package/optimize/es/components/link/external_link_icon.js +11 -8
- package/optimize/es/components/link/link.js +2 -3
- package/optimize/es/components/link/link.styles.js +4 -10
- 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/progress/progress.styles.js +2 -2
- package/optimize/es/components/skeleton/skeleton_circle.js +2 -3
- package/optimize/es/components/skeleton/skeleton_rectangle.js +2 -3
- package/optimize/es/components/skeleton/skeleton_text.js +16 -12
- package/optimize/es/components/skeleton/skeleton_title.js +2 -3
- package/optimize/es/components/spacer/spacer.js +2 -3
- package/optimize/es/components/text/text.js +2 -3
- package/optimize/es/components/text/text_align.js +1 -2
- package/optimize/es/components/text/text_align.styles.js +5 -7
- package/optimize/es/components/text/text_color.js +2 -3
- package/optimize/es/components/title/title.js +2 -3
- package/optimize/es/components/title/title.styles.js +0 -7
- 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/global_styling/mixins/_typography.js +14 -6
- 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/index.js +1 -1
- package/optimize/es/services/theme/style_memoization.js +47 -14
- package/optimize/es/themes/amsterdam/global_styling/mixins/button.js +47 -24
- 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 -112
- 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_display/_button_display.js +1 -2
- package/optimize/lib/components/button/button_empty/button_empty.js +1 -2
- package/optimize/lib/components/button/button_group/button_group.js +4 -6
- package/optimize/lib/components/button/button_group/button_group.styles.js +11 -14
- 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/button/button_icon/button_icon.js +3 -4
- package/optimize/lib/components/button/button_icon/button_icon.styles.js +8 -2
- package/optimize/lib/components/datagrid/body/cell/data_grid_cell.js +81 -55
- 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 +34 -31
- package/optimize/lib/components/datagrid/body/cell/index.js +2 -2
- package/optimize/lib/components/datagrid/body/data_grid_body_custom.js +39 -34
- package/optimize/lib/components/datagrid/body/data_grid_body_virtualized.js +72 -50
- package/optimize/lib/components/datagrid/body/data_grid_row_manager.js +6 -4
- 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 +45 -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/facet/facet_button.styles.js +1 -2
- 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/icon/icon.js +12 -15
- package/optimize/lib/components/icon/icon.styles.js +5 -8
- package/optimize/lib/components/link/external_link_icon.js +10 -7
- package/optimize/lib/components/link/link.js +1 -2
- package/optimize/lib/components/link/link.styles.js +6 -14
- 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/progress/progress.styles.js +1 -1
- package/optimize/lib/components/skeleton/skeleton_circle.js +1 -2
- package/optimize/lib/components/skeleton/skeleton_rectangle.js +1 -2
- package/optimize/lib/components/skeleton/skeleton_text.js +18 -11
- package/optimize/lib/components/skeleton/skeleton_title.js +1 -2
- package/optimize/lib/components/spacer/spacer.js +1 -2
- package/optimize/lib/components/text/text.js +1 -2
- package/optimize/lib/components/text/text_align.js +1 -2
- package/optimize/lib/components/text/text_align.styles.js +5 -7
- package/optimize/lib/components/text/text_color.js +1 -2
- package/optimize/lib/components/title/title.js +1 -2
- package/optimize/lib/components/title/title.styles.js +2 -10
- 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/global_styling/mixins/_typography.js +25 -19
- 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/index.js +6 -0
- package/optimize/lib/services/theme/style_memoization.js +49 -16
- package/optimize/lib/themes/amsterdam/global_styling/mixins/button.js +49 -26
- package/package.json +3 -3
- package/src/components/datagrid/_data_grid_data_row.scss +4 -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 -323
- package/test-env/components/breadcrumbs/breadcrumb.styles.js +5 -29
- package/test-env/components/breadcrumbs/breadcrumbs.js +7 -5
- package/test-env/components/breadcrumbs/types.js +5 -0
- package/test-env/components/button/button_display/_button_display.js +1 -2
- package/test-env/components/button/button_empty/button_empty.js +1 -2
- package/test-env/components/button/button_group/button_group.js +18 -6
- package/test-env/components/button/button_group/button_group.styles.js +11 -14
- 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/button/button_icon/button_icon.js +3 -4
- package/test-env/components/button/button_icon/button_icon.styles.js +8 -2
- package/test-env/components/datagrid/body/cell/data_grid_cell.js +100 -58
- 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 +34 -31
- package/test-env/components/datagrid/body/cell/index.js +2 -2
- package/test-env/components/datagrid/body/data_grid_body.js +14 -0
- package/test-env/components/datagrid/body/data_grid_body_custom.js +53 -34
- package/test-env/components/datagrid/body/data_grid_body_virtualized.js +86 -55
- package/test-env/components/datagrid/body/data_grid_row_manager.js +6 -4
- 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 +45 -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/facet/facet_button.styles.js +1 -2
- 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 +7 -7
- package/test-env/components/icon/icon.styles.js +5 -8
- package/test-env/components/link/external_link_icon.js +10 -7
- package/test-env/components/link/link.js +1 -2
- package/test-env/components/link/link.styles.js +6 -14
- package/test-env/components/modal/confirm_modal.js +2 -1
- package/test-env/components/modal/modal.js +12 -3
- package/test-env/components/page/page_header/page_header_content.js +4 -2
- package/test-env/components/progress/progress.styles.js +1 -1
- package/test-env/components/skeleton/skeleton_circle.js +1 -2
- package/test-env/components/skeleton/skeleton_rectangle.js +1 -2
- package/test-env/components/skeleton/skeleton_text.js +18 -11
- package/test-env/components/skeleton/skeleton_title.js +1 -2
- package/test-env/components/spacer/spacer.js +1 -2
- package/test-env/components/text/text.js +1 -2
- package/test-env/components/text/text_align.js +1 -2
- package/test-env/components/text/text_align.styles.js +5 -7
- package/test-env/components/text/text_color.js +1 -2
- package/test-env/components/title/title.js +1 -2
- package/test-env/components/title/title.styles.js +2 -10
- 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/global_styling/mixins/_typography.js +25 -19
- 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/index.js +6 -0
- package/test-env/services/theme/style_memoization.js +49 -16
- package/test-env/themes/amsterdam/global_styling/mixins/button.js +49 -26
- package/src/themes/charts/theme.scss +0 -5
|
@@ -72,7 +72,8 @@ export var EuiConfirmModal = function EuiConfirmModal(_ref) {
|
|
|
72
72
|
return ___EmotionJSX(EuiModal, _extends({
|
|
73
73
|
className: classes,
|
|
74
74
|
css: cssStyles,
|
|
75
|
-
onClose: onCancel
|
|
75
|
+
onClose: onCancel,
|
|
76
|
+
role: "alertdialog"
|
|
76
77
|
}, rest), modalTitle, message && ___EmotionJSX(EuiModalBody, null, ___EmotionJSX(EuiText, {
|
|
77
78
|
"data-test-subj": "confirmModalBodyText"
|
|
78
79
|
}, message)), ___EmotionJSX(EuiModalFooter, null, ___EmotionJSX(EuiButtonEmpty, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["className", "children", "initialFocus", "onClose", "maxWidth", "style"];
|
|
4
|
+
var _excluded = ["className", "children", "initialFocus", "onClose", "maxWidth", "role", "style"];
|
|
5
5
|
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; }
|
|
6
6
|
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; }
|
|
7
7
|
/*
|
|
@@ -28,6 +28,8 @@ export var EuiModal = function EuiModal(_ref) {
|
|
|
28
28
|
onClose = _ref.onClose,
|
|
29
29
|
_ref$maxWidth = _ref.maxWidth,
|
|
30
30
|
maxWidth = _ref$maxWidth === void 0 ? true : _ref$maxWidth,
|
|
31
|
+
_ref$role = _ref.role,
|
|
32
|
+
role = _ref$role === void 0 ? 'dialog' : _ref$role,
|
|
31
33
|
style = _ref.style,
|
|
32
34
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
33
35
|
var onKeyDown = function onKeyDown(event) {
|
|
@@ -57,7 +59,9 @@ export var EuiModal = function EuiModal(_ref) {
|
|
|
57
59
|
className: classes,
|
|
58
60
|
onKeyDown: onKeyDown,
|
|
59
61
|
tabIndex: 0,
|
|
60
|
-
style: newStyle
|
|
62
|
+
style: newStyle,
|
|
63
|
+
role: role,
|
|
64
|
+
"aria-modal": true
|
|
61
65
|
}, rest), ___EmotionJSX(EuiI18n, {
|
|
62
66
|
token: "euiModal.closeModal",
|
|
63
67
|
default: "Closes this modal window"
|
|
@@ -34,14 +34,13 @@ export var EuiResizeObserver = /*#__PURE__*/function (_EuiObserver) {
|
|
|
34
34
|
height: 0,
|
|
35
35
|
width: 0
|
|
36
36
|
});
|
|
37
|
-
_defineProperty(_assertThisInitialized(_this), "onResize", function () {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
width = _this$childNode$getBo.width;
|
|
37
|
+
_defineProperty(_assertThisInitialized(_this), "onResize", function (_ref) {
|
|
38
|
+
var _ref2 = _slicedToArray(_ref, 1),
|
|
39
|
+
entry = _ref2[0];
|
|
40
|
+
var _entry$borderBoxSize$ = entry.borderBoxSize[0],
|
|
41
|
+
width = _entry$borderBoxSize$.inlineSize,
|
|
42
|
+
height = _entry$borderBoxSize$.blockSize;
|
|
43
|
+
|
|
45
44
|
// Check for actual resize event
|
|
46
45
|
if (_this.state.height === height && _this.state.width === width) {
|
|
47
46
|
return;
|
|
@@ -95,23 +94,15 @@ export var useResizeObserver = function useResizeObserver(container, dimension)
|
|
|
95
94
|
}, [dimension]);
|
|
96
95
|
useEffect(function () {
|
|
97
96
|
if (container != null) {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
});
|
|
105
|
-
var observer = makeResizeObserver(container, function () {
|
|
106
|
-
// `entry.contentRect` provides incomplete `height` and `width` data.
|
|
107
|
-
// Use `getBoundingClientRect` to account for padding and border.
|
|
108
|
-
// https://developer.mozilla.org/en-US/docs/Web/API/DOMRectReadOnly
|
|
109
|
-
var _container$getBoundin = container.getBoundingClientRect(),
|
|
110
|
-
height = _container$getBoundin.height,
|
|
111
|
-
width = _container$getBoundin.width;
|
|
97
|
+
var observer = makeResizeObserver(container, function (_ref3) {
|
|
98
|
+
var _ref4 = _slicedToArray(_ref3, 1),
|
|
99
|
+
entry = _ref4[0];
|
|
100
|
+
var _entry$borderBoxSize$2 = entry.borderBoxSize[0],
|
|
101
|
+
inlineSize = _entry$borderBoxSize$2.inlineSize,
|
|
102
|
+
blockSize = _entry$borderBoxSize$2.blockSize;
|
|
112
103
|
setSize({
|
|
113
|
-
width:
|
|
114
|
-
height:
|
|
104
|
+
width: inlineSize,
|
|
105
|
+
height: blockSize
|
|
115
106
|
});
|
|
116
107
|
});
|
|
117
108
|
return function () {
|
|
@@ -10,7 +10,7 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
import { css, keyframes } from '@emotion/react';
|
|
13
|
-
import { logicalCSS, logicalTextAlignCSS, euiCantAnimate, euiFontSize, euiTextTruncate } from '../../global_styling';
|
|
13
|
+
import { logicalCSS, logicalTextAlignCSS, euiCanAnimate, euiCantAnimate, euiFontSize, euiTextTruncate } from '../../global_styling';
|
|
14
14
|
import { euiPaletteColorBlind, makeHighContrastColor } from '../../services';
|
|
15
15
|
import { euiText } from '../text/text.styles';
|
|
16
16
|
|
|
@@ -63,7 +63,7 @@ export var euiProgressStyles = function euiProgressStyles(_ref3, isNative) {
|
|
|
63
63
|
// https://css-tricks.com/html5-progress-element/
|
|
64
64
|
// Good resource if you need to work in here. There's some gotchas with
|
|
65
65
|
// dealing with cross-browser progress bars.
|
|
66
|
-
native: /*#__PURE__*/css("display:block;", logicalCSS('width', '100%'), " appearance:none;border:none;border-radius:", euiTheme.size.s, ";&::-webkit-progress-bar{background-color:", euiTheme.colors.lightShade, ";}", crossBrowserProgressValue(
|
|
66
|
+
native: /*#__PURE__*/css("display:block;", logicalCSS('width', '100%'), " appearance:none;border:none;border-radius:", euiTheme.size.s, ";&::-webkit-progress-bar{background-color:", euiTheme.colors.lightShade, ";}", euiCanAnimate, "{/* Note: FF/Mozilla doesn't actually support animating the native progress bar\n @see https://bugzilla.mozilla.org/show_bug.cgi?id=662351 */", crossBrowserProgressValue("transition: width ".concat(euiTheme.animation.normal, " linear")), ";};label:native;"),
|
|
67
67
|
// An indeterminate bar has an unreliable end time. Because of a Firefox animation issue,
|
|
68
68
|
// we apply this style to a <div> instead of a <progress> element.
|
|
69
69
|
// See https://css-tricks.com/html5-progress-element/ for more info.
|
|
@@ -11,7 +11,7 @@ var _excluded = ["isLoading", "size", "className", "contentAriaLabel", "announce
|
|
|
11
11
|
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
|
-
import {
|
|
14
|
+
import { useEuiMemoizedStyles } from '../../services';
|
|
15
15
|
import { EuiSkeletonLoading } from './skeleton_loading';
|
|
16
16
|
import { euiSkeletonCircleStyles } from './skeleton_circle.styles';
|
|
17
17
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
@@ -29,8 +29,7 @@ export var EuiSkeletonCircle = function EuiSkeletonCircle(_ref) {
|
|
|
29
29
|
ariaWrapperProps = _ref.ariaWrapperProps,
|
|
30
30
|
children = _ref.children,
|
|
31
31
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
32
|
-
var
|
|
33
|
-
var styles = euiSkeletonCircleStyles(euiTheme);
|
|
32
|
+
var styles = useEuiMemoizedStyles(euiSkeletonCircleStyles);
|
|
34
33
|
var cssStyles = [styles.euiSkeletonCircle, styles[size]];
|
|
35
34
|
return ___EmotionJSX(EuiSkeletonLoading, _extends({
|
|
36
35
|
isLoading: isLoading,
|
|
@@ -14,7 +14,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
14
14
|
|
|
15
15
|
import React from 'react';
|
|
16
16
|
import classNames from 'classnames';
|
|
17
|
-
import {
|
|
17
|
+
import { useEuiMemoizedStyles } from '../../services';
|
|
18
18
|
import { logicalStyles } from '../../global_styling';
|
|
19
19
|
import { EuiSkeletonLoading } from './skeleton_loading';
|
|
20
20
|
import { euiSkeletonRectangleStyles } from './skeleton_rectangle.styles';
|
|
@@ -38,8 +38,7 @@ export var EuiSkeletonRectangle = function EuiSkeletonRectangle(_ref) {
|
|
|
38
38
|
ariaWrapperProps = _ref.ariaWrapperProps,
|
|
39
39
|
children = _ref.children,
|
|
40
40
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
41
|
-
var
|
|
42
|
-
var styles = euiSkeletonRectangleStyles(euiTheme);
|
|
41
|
+
var styles = useEuiMemoizedStyles(euiSkeletonRectangleStyles);
|
|
43
42
|
var cssStyles = [styles.euiSkeletonRectangle, styles[borderRadius]];
|
|
44
43
|
return ___EmotionJSX(EuiSkeletonLoading, _extends({
|
|
45
44
|
isLoading: isLoading,
|
|
@@ -9,9 +9,9 @@ var _excluded = ["isLoading", "lines", "size", "className", "contentAriaLabel",
|
|
|
9
9
|
* Side Public License, v 1.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
import React from 'react';
|
|
12
|
+
import React, { useMemo } from 'react';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
|
-
import {
|
|
14
|
+
import { useEuiMemoizedStyles } from '../../services';
|
|
15
15
|
import { EuiSkeletonLoading } from './skeleton_loading';
|
|
16
16
|
import { euiSkeletonTextStyles } from './skeleton_text.styles';
|
|
17
17
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
@@ -31,16 +31,20 @@ export var EuiSkeletonText = function EuiSkeletonText(_ref) {
|
|
|
31
31
|
ariaWrapperProps = _ref.ariaWrapperProps,
|
|
32
32
|
children = _ref.children,
|
|
33
33
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
34
|
-
var
|
|
35
|
-
var
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
lineElements
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
34
|
+
var styles = useEuiMemoizedStyles(euiSkeletonTextStyles);
|
|
35
|
+
var cssStyles = useMemo(function () {
|
|
36
|
+
return [styles.euiSkeletonText, styles[size]];
|
|
37
|
+
}, [styles, size]);
|
|
38
|
+
var lineElements = useMemo(function () {
|
|
39
|
+
var lineElements = [];
|
|
40
|
+
for (var i = 0; i < lines; i++) {
|
|
41
|
+
lineElements.push(___EmotionJSX("span", {
|
|
42
|
+
key: i,
|
|
43
|
+
css: cssStyles
|
|
44
|
+
}));
|
|
45
|
+
}
|
|
46
|
+
return lineElements;
|
|
47
|
+
}, [lines, cssStyles]);
|
|
44
48
|
return ___EmotionJSX(EuiSkeletonLoading, _extends({
|
|
45
49
|
isLoading: isLoading,
|
|
46
50
|
loadingContent: ___EmotionJSX("span", _extends({
|
|
@@ -11,7 +11,7 @@ var _excluded = ["isLoading", "size", "className", "contentAriaLabel", "announce
|
|
|
11
11
|
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
|
-
import {
|
|
14
|
+
import { useEuiMemoizedStyles } from '../../services';
|
|
15
15
|
import { EuiSkeletonLoading } from './skeleton_loading';
|
|
16
16
|
import { euiSkeletonTitleStyles } from './skeleton_title.styles';
|
|
17
17
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
@@ -28,8 +28,7 @@ export var EuiSkeletonTitle = function EuiSkeletonTitle(_ref) {
|
|
|
28
28
|
ariaWrapperProps = _ref.ariaWrapperProps,
|
|
29
29
|
children = _ref.children,
|
|
30
30
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
31
|
-
var
|
|
32
|
-
var styles = euiSkeletonTitleStyles(euiTheme);
|
|
31
|
+
var styles = useEuiMemoizedStyles(euiSkeletonTitleStyles);
|
|
33
32
|
var cssStyles = [styles.euiSkeletonTitle, styles[size]];
|
|
34
33
|
return ___EmotionJSX(EuiSkeletonLoading, _extends({
|
|
35
34
|
isLoading: isLoading,
|
|
@@ -12,7 +12,7 @@ var _excluded = ["className", "size"];
|
|
|
12
12
|
|
|
13
13
|
import React from 'react';
|
|
14
14
|
import classNames from 'classnames';
|
|
15
|
-
import {
|
|
15
|
+
import { useEuiMemoizedStyles } from '../../services';
|
|
16
16
|
import { euiSpacerStyles } from './spacer.styles';
|
|
17
17
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
18
18
|
export var SIZES = ['xs', 's', 'm', 'l', 'xl', 'xxl'];
|
|
@@ -21,8 +21,7 @@ export var EuiSpacer = function EuiSpacer(_ref) {
|
|
|
21
21
|
_ref$size = _ref.size,
|
|
22
22
|
size = _ref$size === void 0 ? 'l' : _ref$size,
|
|
23
23
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
24
|
-
var
|
|
25
|
-
var styles = euiSpacerStyles(euiTheme);
|
|
24
|
+
var styles = useEuiMemoizedStyles(euiSpacerStyles);
|
|
26
25
|
var classes = classNames('euiSpacer', _defineProperty({}, "euiSpacer--".concat(size), size), className);
|
|
27
26
|
var cssStyles = [styles.euiSpacer, styles[size]];
|
|
28
27
|
return ___EmotionJSX("div", _extends({
|
|
@@ -11,7 +11,7 @@ var _excluded = ["size", "color", "grow", "textAlign", "children", "className"];
|
|
|
11
11
|
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
|
-
import {
|
|
14
|
+
import { useEuiMemoizedStyles } from '../../services';
|
|
15
15
|
import { euiTextStyles } from './text.styles';
|
|
16
16
|
import { EuiTextColor } from './text_color';
|
|
17
17
|
import { EuiTextAlign } from './text_align';
|
|
@@ -27,8 +27,7 @@ export var EuiText = function EuiText(_ref) {
|
|
|
27
27
|
children = _ref.children,
|
|
28
28
|
className = _ref.className,
|
|
29
29
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
30
|
-
var
|
|
31
|
-
var styles = euiTextStyles(euiTheme);
|
|
30
|
+
var styles = useEuiMemoizedStyles(euiTextStyles);
|
|
32
31
|
var cssStyles = [styles.euiText, !grow ? styles.constrainedWidth : undefined, styles[size]];
|
|
33
32
|
var classes = classNames('euiText', className);
|
|
34
33
|
var text = ___EmotionJSX("div", _extends({
|
|
@@ -13,7 +13,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
13
13
|
|
|
14
14
|
import React, { isValidElement } from 'react';
|
|
15
15
|
import { cloneElementWithCss } from '../../services';
|
|
16
|
-
import { euiTextAlignStyles } from './text_align.styles';
|
|
16
|
+
import { euiTextAlignStyles as styles } from './text_align.styles';
|
|
17
17
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
18
18
|
export var ALIGNMENTS = ['left', 'right', 'center'];
|
|
19
19
|
export var EuiTextAlign = function EuiTextAlign(_ref) {
|
|
@@ -23,7 +23,6 @@ export var EuiTextAlign = function EuiTextAlign(_ref) {
|
|
|
23
23
|
_ref$cloneElement = _ref.cloneElement,
|
|
24
24
|
cloneElement = _ref$cloneElement === void 0 ? false : _ref$cloneElement,
|
|
25
25
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
26
|
-
var styles = euiTextAlignStyles();
|
|
27
26
|
var cssStyles = [styles.euiTextAlign, styles[textAlign]];
|
|
28
27
|
var props = _objectSpread({
|
|
29
28
|
css: cssStyles
|
|
@@ -8,11 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
import { css } from '@emotion/react';
|
|
10
10
|
import { logicalTextAlignCSS } from '../../global_styling';
|
|
11
|
-
export var euiTextAlignStyles =
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
center: /*#__PURE__*/css(logicalTextAlignCSS('center'), ";;label:center;")
|
|
17
|
-
};
|
|
11
|
+
export var euiTextAlignStyles = {
|
|
12
|
+
euiTextAlign: /*#__PURE__*/css(";label:euiTextAlign;"),
|
|
13
|
+
left: /*#__PURE__*/css(logicalTextAlignCSS('left'), ";;label:left;"),
|
|
14
|
+
right: /*#__PURE__*/css(logicalTextAlignCSS('right'), ";;label:right;"),
|
|
15
|
+
center: /*#__PURE__*/css(logicalTextAlignCSS('center'), ";;label:center;")
|
|
18
16
|
};
|
|
@@ -12,7 +12,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
import React, { isValidElement } from 'react';
|
|
15
|
-
import {
|
|
15
|
+
import { useEuiMemoizedStyles, cloneElementWithCss } from '../../services';
|
|
16
16
|
import { euiTextColorStyles } from './text_color.styles';
|
|
17
17
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
18
18
|
export var COLORS = ['default', 'subdued', 'success', 'accent', 'danger', 'warning', 'ghost', 'inherit'];
|
|
@@ -27,8 +27,7 @@ export var EuiTextColor = function EuiTextColor(_ref) {
|
|
|
27
27
|
style = _ref.style,
|
|
28
28
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
29
29
|
var isNamedColor = COLORS.includes(color);
|
|
30
|
-
var
|
|
31
|
-
var styles = euiTextColorStyles(euiTheme);
|
|
30
|
+
var styles = useEuiMemoizedStyles(euiTextColorStyles);
|
|
32
31
|
var cssStyles = [styles.euiTextColor, isNamedColor ? styles[color] : styles.customColor];
|
|
33
32
|
|
|
34
33
|
// We're checking if is a custom color.
|
|
@@ -12,7 +12,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
import classNames from 'classnames';
|
|
15
|
-
import {
|
|
15
|
+
import { useEuiMemoizedStyles, cloneElementWithCss } from '../../services';
|
|
16
16
|
import { euiTitleStyles } from './title.styles';
|
|
17
17
|
export var TITLE_SIZES = ['xxxs', 'xxs', 'xs', 's', 'm', 'l'];
|
|
18
18
|
export var TEXT_TRANSFORM = ['uppercase'];
|
|
@@ -23,8 +23,7 @@ export var EuiTitle = function EuiTitle(_ref) {
|
|
|
23
23
|
className = _ref.className,
|
|
24
24
|
textTransform = _ref.textTransform,
|
|
25
25
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
26
|
-
var
|
|
27
|
-
var styles = euiTitleStyles(euiTheme);
|
|
26
|
+
var styles = useEuiMemoizedStyles(euiTitleStyles);
|
|
28
27
|
var cssStyles = [styles.euiTitle, textTransform ? styles[textTransform] : undefined, styles[size]];
|
|
29
28
|
var classes = classNames('euiTitle', className, children.props.className);
|
|
30
29
|
var props = _objectSpread({
|
|
@@ -11,7 +11,6 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import { css } from '@emotion/react';
|
|
14
|
-
import { useEuiTheme } from '../../services';
|
|
15
14
|
import { euiTextBreakWord, euiFontSize, logicalCSS } from '../../global_styling';
|
|
16
15
|
|
|
17
16
|
/**
|
|
@@ -36,12 +35,6 @@ export var euiTitle = function euiTitle(euiThemeContext) {
|
|
|
36
35
|
});
|
|
37
36
|
};
|
|
38
37
|
|
|
39
|
-
// Hook version
|
|
40
|
-
export var useEuiTitle = function useEuiTitle(scale, options) {
|
|
41
|
-
var euiTheme = useEuiTheme();
|
|
42
|
-
return euiTitle(euiTheme, scale, options);
|
|
43
|
-
};
|
|
44
|
-
|
|
45
38
|
/**
|
|
46
39
|
* Styles
|
|
47
40
|
*/
|
|
@@ -14,10 +14,10 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
14
14
|
* Side Public License, v 1.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
17
|
+
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
18
18
|
import classNames from 'classnames';
|
|
19
19
|
import { keysOf } from '../common';
|
|
20
|
-
import {
|
|
20
|
+
import { useEuiMemoizedStyles } from '../../services';
|
|
21
21
|
import { Timer } from '../../services/time';
|
|
22
22
|
import { EuiGlobalToastListItem } from './global_toast_list_item';
|
|
23
23
|
import { EuiToast } from './toast';
|
|
@@ -64,10 +64,9 @@ export var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
|
|
|
64
64
|
var isScrollingAnimationFrame = useRef(0);
|
|
65
65
|
var startScrollingAnimationFrame = useRef(0);
|
|
66
66
|
var listElement = useRef(null);
|
|
67
|
-
var
|
|
68
|
-
var styles = euiGlobalToastListStyles(euiTheme);
|
|
67
|
+
var styles = useEuiMemoizedStyles(euiGlobalToastListStyles);
|
|
69
68
|
var cssStyles = [styles.euiGlobalToastList, styles[side]];
|
|
70
|
-
var startScrollingToBottom = function
|
|
69
|
+
var startScrollingToBottom = useCallback(function () {
|
|
71
70
|
isScrollingToBottom.current = true;
|
|
72
71
|
var scrollToBottom = function scrollToBottom() {
|
|
73
72
|
// Although we cancel the requestAnimationFrame in componentWillUnmount,
|
|
@@ -90,8 +89,8 @@ export var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
|
|
|
90
89
|
}
|
|
91
90
|
};
|
|
92
91
|
startScrollingAnimationFrame.current = window.requestAnimationFrame(scrollToBottom);
|
|
93
|
-
};
|
|
94
|
-
var onMouseEnter = function
|
|
92
|
+
}, []);
|
|
93
|
+
var onMouseEnter = useCallback(function () {
|
|
95
94
|
// Stop scrolling to bottom if we're in mid-scroll, because the user wants to interact with
|
|
96
95
|
// the list.
|
|
97
96
|
isScrollingToBottom.current = false;
|
|
@@ -104,8 +103,8 @@ export var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
|
|
|
104
103
|
timer.pause();
|
|
105
104
|
}
|
|
106
105
|
}
|
|
107
|
-
};
|
|
108
|
-
var onMouseLeave = function
|
|
106
|
+
}, []);
|
|
107
|
+
var onMouseLeave = useCallback(function () {
|
|
109
108
|
isUserInteracting.current = false;
|
|
110
109
|
for (var _toastId2 in toastIdToTimerMap.current) {
|
|
111
110
|
if (toastIdToTimerMap.current.hasOwnProperty(_toastId2)) {
|
|
@@ -113,8 +112,8 @@ export var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
|
|
|
113
112
|
timer.resume();
|
|
114
113
|
}
|
|
115
114
|
}
|
|
116
|
-
};
|
|
117
|
-
var onScroll = function
|
|
115
|
+
}, []);
|
|
116
|
+
var onScroll = useCallback(function () {
|
|
118
117
|
// Given that this method also gets invoked by the synthetic scroll that happens when a new toast gets added,
|
|
119
118
|
// we want to evaluate if the scroll bottom has been reached only when the user is interacting with the toast,
|
|
120
119
|
// this way we always retain the scroll position the user has set despite adding in new toasts.
|
|
@@ -122,7 +121,7 @@ export var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
|
|
|
122
121
|
if (listElement.current && isUserInteracting.current) {
|
|
123
122
|
isScrolledToBottom.current = listElement.current.scrollHeight - listElement.current.scrollTop === listElement.current.clientHeight;
|
|
124
123
|
}
|
|
125
|
-
};
|
|
124
|
+
}, []);
|
|
126
125
|
var dismissToast = useCallback(function (toast) {
|
|
127
126
|
// Remove the toast after it's done fading out.
|
|
128
127
|
dismissTimeoutIds.current.push(window.setTimeout(function () {
|
|
@@ -145,34 +144,29 @@ export var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
|
|
|
145
144
|
}
|
|
146
145
|
});
|
|
147
146
|
}, [scheduleToastForDismissal, toasts]);
|
|
148
|
-
var addListeners = function addListeners() {
|
|
149
|
-
if (listElement.current) {
|
|
150
|
-
listElement.current.addEventListener('scroll', onScroll);
|
|
151
|
-
listElement.current.addEventListener('mouseenter', onMouseEnter);
|
|
152
|
-
listElement.current.addEventListener('mouseleave', onMouseLeave);
|
|
153
|
-
}
|
|
154
|
-
};
|
|
155
|
-
var removeListeners = function removeListeners() {
|
|
156
|
-
if (listElement.current) {
|
|
157
|
-
listElement.current.removeEventListener('scroll', onScroll);
|
|
158
|
-
listElement.current.removeEventListener('mouseenter', onMouseEnter);
|
|
159
|
-
listElement.current.removeEventListener('mouseleave', onMouseLeave);
|
|
160
|
-
}
|
|
161
|
-
};
|
|
162
147
|
|
|
163
148
|
// componentDidMount
|
|
164
149
|
useEffect(function () {
|
|
165
|
-
|
|
150
|
+
var listenerEl = listElement.current;
|
|
151
|
+
if (listenerEl) {
|
|
152
|
+
listenerEl.addEventListener('scroll', onScroll);
|
|
153
|
+
listenerEl.addEventListener('mouseenter', onMouseEnter);
|
|
154
|
+
listenerEl.addEventListener('mouseleave', onMouseLeave);
|
|
155
|
+
}
|
|
166
156
|
|
|
167
157
|
// componentWillUnmount
|
|
168
158
|
return function () {
|
|
159
|
+
if (listenerEl) {
|
|
160
|
+
listenerEl.removeEventListener('scroll', onScroll);
|
|
161
|
+
listenerEl.removeEventListener('mouseenter', onMouseEnter);
|
|
162
|
+
listenerEl.removeEventListener('mouseleave', onMouseLeave);
|
|
163
|
+
}
|
|
169
164
|
if (isScrollingAnimationFrame.current !== 0) {
|
|
170
165
|
window.cancelAnimationFrame(isScrollingAnimationFrame.current);
|
|
171
166
|
}
|
|
172
167
|
if (startScrollingAnimationFrame.current !== 0) {
|
|
173
168
|
window.cancelAnimationFrame(startScrollingAnimationFrame.current);
|
|
174
169
|
}
|
|
175
|
-
removeListeners();
|
|
176
170
|
dismissTimeoutIds.current.forEach(clearTimeout); // eslint-disable-line react-hooks/exhaustive-deps
|
|
177
171
|
for (var _toastId3 in toastIdToTimerMap.current) {
|
|
178
172
|
if (toastIdToTimerMap.current.hasOwnProperty(_toastId3)) {
|
|
@@ -181,7 +175,7 @@ export var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
|
|
|
181
175
|
}
|
|
182
176
|
}
|
|
183
177
|
};
|
|
184
|
-
}, []);
|
|
178
|
+
}, [onMouseEnter, onMouseLeave, onScroll]);
|
|
185
179
|
|
|
186
180
|
// componentDidUpdate
|
|
187
181
|
useEffect(function () {
|
|
@@ -196,7 +190,7 @@ export var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
|
|
|
196
190
|
}
|
|
197
191
|
}
|
|
198
192
|
prevToasts.current = toasts;
|
|
199
|
-
}, [toasts, scheduleAllToastsForDismissal]);
|
|
193
|
+
}, [toasts, scheduleAllToastsForDismissal, startScrollingToBottom]);
|
|
200
194
|
|
|
201
195
|
// Toast dismissal side effect
|
|
202
196
|
// Ensure the callback has correct state by not enclosing it in `setTimeout`
|
|
@@ -217,49 +211,52 @@ export var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
|
|
|
217
211
|
});
|
|
218
212
|
}
|
|
219
213
|
}, [toastToDismiss, dismissToastProp]);
|
|
220
|
-
var renderedToasts =
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
key: toast.id,
|
|
229
|
-
isDismissed: toastIdToDismissedMap[toast.id]
|
|
230
|
-
}, ___EmotionJSX(EuiToast, _extends({
|
|
231
|
-
onClose: onClose,
|
|
232
|
-
onFocus: onMouseEnter,
|
|
233
|
-
onBlur: onMouseLeave
|
|
234
|
-
}, rest), text));
|
|
235
|
-
});
|
|
236
|
-
if (showClearAllButtonAt && toasts.length >= showClearAllButtonAt) {
|
|
237
|
-
var dismissAllToasts = function dismissAllToasts() {
|
|
238
|
-
toasts.forEach(function (toast) {
|
|
239
|
-
return dismissToastProp(toast);
|
|
240
|
-
});
|
|
241
|
-
onClearAllToasts === null || onClearAllToasts === void 0 ? void 0 : onClearAllToasts();
|
|
242
|
-
};
|
|
243
|
-
renderedToasts.push(___EmotionJSX(EuiI18n, {
|
|
244
|
-
key: "euiClearAllToasts",
|
|
245
|
-
tokens: ['euiGlobalToastList.clearAllToastsButtonAriaLabel', 'euiGlobalToastList.clearAllToastsButtonDisplayText'],
|
|
246
|
-
defaults: ['Clear all toast notifications', 'Clear all']
|
|
247
|
-
}, function (_ref2) {
|
|
248
|
-
var _ref3 = _slicedToArray(_ref2, 2),
|
|
249
|
-
clearAllToastsButtonAriaLabel = _ref3[0],
|
|
250
|
-
clearAllToastsButtonDisplayText = _ref3[1];
|
|
214
|
+
var renderedToasts = useMemo(function () {
|
|
215
|
+
return toasts.map(function (toast) {
|
|
216
|
+
var text = toast.text,
|
|
217
|
+
toastLifeTimeMs = toast.toastLifeTimeMs,
|
|
218
|
+
rest = _objectWithoutProperties(toast, _excluded2);
|
|
219
|
+
var onClose = function onClose() {
|
|
220
|
+
return dismissToast(toast);
|
|
221
|
+
};
|
|
251
222
|
return ___EmotionJSX(EuiGlobalToastListItem, {
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
223
|
+
key: toast.id,
|
|
224
|
+
isDismissed: toastIdToDismissedMap[toast.id]
|
|
225
|
+
}, ___EmotionJSX(EuiToast, _extends({
|
|
226
|
+
onClose: onClose,
|
|
227
|
+
onFocus: onMouseEnter,
|
|
228
|
+
onBlur: onMouseLeave
|
|
229
|
+
}, rest), text));
|
|
230
|
+
});
|
|
231
|
+
}, [toasts, toastIdToDismissedMap, dismissToast, onMouseEnter, onMouseLeave]);
|
|
232
|
+
var clearAllButton = useMemo(function () {
|
|
233
|
+
if (toasts.length && showClearAllButtonAt && toasts.length >= showClearAllButtonAt) {
|
|
234
|
+
return ___EmotionJSX(EuiI18n, {
|
|
235
|
+
key: "euiClearAllToasts",
|
|
236
|
+
tokens: ['euiGlobalToastList.clearAllToastsButtonAriaLabel', 'euiGlobalToastList.clearAllToastsButtonDisplayText'],
|
|
237
|
+
defaults: ['Clear all toast notifications', 'Clear all']
|
|
238
|
+
}, function (_ref2) {
|
|
239
|
+
var _ref3 = _slicedToArray(_ref2, 2),
|
|
240
|
+
clearAllToastsButtonAriaLabel = _ref3[0],
|
|
241
|
+
clearAllToastsButtonDisplayText = _ref3[1];
|
|
242
|
+
return ___EmotionJSX(EuiGlobalToastListItem, {
|
|
243
|
+
isDismissed: false
|
|
244
|
+
}, ___EmotionJSX(EuiButton, {
|
|
245
|
+
fill: true,
|
|
246
|
+
color: "text",
|
|
247
|
+
onClick: function onClick() {
|
|
248
|
+
toasts.forEach(function (toast) {
|
|
249
|
+
return dismissToastProp(toast);
|
|
250
|
+
});
|
|
251
|
+
onClearAllToasts === null || onClearAllToasts === void 0 ? void 0 : onClearAllToasts();
|
|
252
|
+
},
|
|
253
|
+
css: styles.euiGlobalToastListDismissButton,
|
|
254
|
+
"aria-label": clearAllToastsButtonAriaLabel,
|
|
255
|
+
"data-test-subj": "euiClearAllToastsButton"
|
|
256
|
+
}, clearAllToastsButtonDisplayText));
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
}, [showClearAllButtonAt, onClearAllToasts, toasts, dismissToastProp, styles]);
|
|
263
260
|
var classes = classNames('euiGlobalToastList', className);
|
|
264
261
|
return ___EmotionJSX("div", _extends({
|
|
265
262
|
"aria-live": "polite",
|
|
@@ -267,5 +264,5 @@ export var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
|
|
|
267
264
|
ref: listElement,
|
|
268
265
|
css: cssStyles,
|
|
269
266
|
className: classes
|
|
270
|
-
}, rest), renderedToasts);
|
|
267
|
+
}, rest), renderedToasts, clearAllButton);
|
|
271
268
|
};
|