@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
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
|
|
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
|
+
var _excluded = ["className", "id", "isDisabled", "isIconOnly", "isSelected", "label", "value", "size", "color", "toolTipContent", "toolTipProps"];
|
|
3
|
+
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; }
|
|
4
|
+
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; }
|
|
5
|
+
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; }
|
|
6
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
|
+
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); }
|
|
2
8
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
9
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
10
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -24,6 +30,7 @@ import { useEuiButtonColorCSS } from '../../../themes/amsterdam/global_styling/m
|
|
|
24
30
|
import { useInnerText } from '../../inner_text';
|
|
25
31
|
import { EuiButtonDisplay } from '../button_display/_button_display';
|
|
26
32
|
import { euiButtonGroupButtonStyles, _compressedButtonFocusColor, _uncompressedButtonFocus } from './button_group_button.styles';
|
|
33
|
+
import { EuiToolTip } from '../../../components/tool_tip';
|
|
27
34
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
28
35
|
export var EuiButtonGroupButton = function EuiButtonGroupButton(_ref) {
|
|
29
36
|
var className = _ref.className,
|
|
@@ -37,17 +44,21 @@ export var EuiButtonGroupButton = function EuiButtonGroupButton(_ref) {
|
|
|
37
44
|
size = _ref.size,
|
|
38
45
|
_ref$color = _ref.color,
|
|
39
46
|
_color = _ref$color === void 0 ? 'primary' : _ref$color,
|
|
47
|
+
toolTipContent = _ref.toolTipContent,
|
|
48
|
+
toolTipProps = _ref.toolTipProps,
|
|
40
49
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
41
50
|
var isCompressed = size === 'compressed';
|
|
42
51
|
var color = isDisabled ? 'disabled' : _color;
|
|
43
52
|
var display = isSelected ? 'fill' : isCompressed ? 'empty' : 'base';
|
|
53
|
+
var hasToolTip = !!toolTipContent;
|
|
44
54
|
var euiTheme = useEuiTheme();
|
|
45
55
|
var buttonColorStyles = useEuiButtonColorCSS({
|
|
46
56
|
display: display
|
|
47
57
|
})[color];
|
|
48
58
|
var focusColorStyles = isCompressed ? _compressedButtonFocusColor(euiTheme, color) : _uncompressedButtonFocus(euiTheme);
|
|
49
59
|
var styles = euiButtonGroupButtonStyles(euiTheme);
|
|
50
|
-
var cssStyles = [styles.euiButtonGroupButton, isIconOnly && styles.iconOnly, styles[size],
|
|
60
|
+
var cssStyles = [styles.euiButtonGroupButton, isIconOnly && styles.iconOnly, !isCompressed && (hasToolTip ? styles.uncompressed.hasToolTip : styles.uncompressed[size]), isCompressed ? styles.compressed : styles.uncompressed.uncompressed, isDisabled && isSelected ? styles.disabledAndSelected : buttonColorStyles, !isDisabled && focusColorStyles];
|
|
61
|
+
var tooltipWrapperStyles = [styles.tooltipWrapper, !isCompressed && styles.uncompressed[size]];
|
|
51
62
|
var contentStyles = [styles.content.euiButtonGroupButton__content, isCompressed && styles.content.compressed];
|
|
52
63
|
var textStyles = [isIconOnly ? styles.text.euiButtonGroupButton__iconOnly : styles.text.euiButtonGroupButton__text];
|
|
53
64
|
var buttonClasses = classNames('euiButtonGroupButton', {
|
|
@@ -64,7 +75,12 @@ export var EuiButtonGroupButton = function EuiButtonGroupButton(_ref) {
|
|
|
64
75
|
_useInnerText2 = _slicedToArray(_useInnerText, 2),
|
|
65
76
|
buttonTextRef = _useInnerText2[0],
|
|
66
77
|
innerText = _useInnerText2[1];
|
|
67
|
-
return ___EmotionJSX(
|
|
78
|
+
return ___EmotionJSX(EuiButtonGroupButtonWithToolTip, {
|
|
79
|
+
toolTipContent: toolTipContent,
|
|
80
|
+
toolTipProps: toolTipProps,
|
|
81
|
+
wrapperCss: tooltipWrapperStyles,
|
|
82
|
+
isSelected: isSelected
|
|
83
|
+
}, ___EmotionJSX(EuiButtonDisplay, _extends({
|
|
68
84
|
css: cssStyles,
|
|
69
85
|
className: buttonClasses,
|
|
70
86
|
isDisabled: isDisabled,
|
|
@@ -80,7 +96,7 @@ export var EuiButtonGroupButton = function EuiButtonGroupButton(_ref) {
|
|
|
80
96
|
title: innerText,
|
|
81
97
|
"data-test-subj": id,
|
|
82
98
|
isSelected: isSelected
|
|
83
|
-
}, rest), label);
|
|
99
|
+
}, rest), label));
|
|
84
100
|
};
|
|
85
101
|
EuiButtonGroupButton.propTypes = {
|
|
86
102
|
/**
|
|
@@ -100,6 +116,20 @@ EuiButtonGroupButton.propTypes = {
|
|
|
100
116
|
* The type of the underlying HTML button
|
|
101
117
|
*/
|
|
102
118
|
type: PropTypes.any,
|
|
119
|
+
/**
|
|
120
|
+
* By default, will use the button text for the native browser title.
|
|
121
|
+
*
|
|
122
|
+
* This can be either customized or unset via `title: ''` if necessary.
|
|
123
|
+
*/
|
|
124
|
+
title: PropTypes.any,
|
|
125
|
+
/**
|
|
126
|
+
* Optional custom tooltip content for the button
|
|
127
|
+
*/
|
|
128
|
+
toolTipContent: PropTypes.node,
|
|
129
|
+
/**
|
|
130
|
+
* Optional props to pass to the underlying **[EuiToolTip](/#/display/tooltip)**
|
|
131
|
+
*/
|
|
132
|
+
toolTipProps: PropTypes.any,
|
|
103
133
|
/**
|
|
104
134
|
* Any `type` accepted by EuiIcon
|
|
105
135
|
*/
|
|
@@ -138,7 +168,7 @@ EuiButtonGroupButton.propTypes = {
|
|
|
138
168
|
/**
|
|
139
169
|
* Inherit from EuiButtonGroup
|
|
140
170
|
*/
|
|
141
|
-
size: PropTypes.
|
|
171
|
+
size: PropTypes.any.isRequired,
|
|
142
172
|
/**
|
|
143
173
|
* Inherit from EuiButtonGroup
|
|
144
174
|
*/
|
|
@@ -147,4 +177,28 @@ EuiButtonGroupButton.propTypes = {
|
|
|
147
177
|
* Inherit from EuiButtonGroup
|
|
148
178
|
*/
|
|
149
179
|
onClick: PropTypes.func.isRequired
|
|
180
|
+
};
|
|
181
|
+
var EuiButtonGroupButtonWithToolTip = function EuiButtonGroupButtonWithToolTip(_ref2) {
|
|
182
|
+
var _toolTipProps$anchorP, _toolTipProps$anchorP2;
|
|
183
|
+
var toolTipContent = _ref2.toolTipContent,
|
|
184
|
+
toolTipProps = _ref2.toolTipProps,
|
|
185
|
+
wrapperCss = _ref2.wrapperCss,
|
|
186
|
+
isSelected = _ref2.isSelected,
|
|
187
|
+
children = _ref2.children;
|
|
188
|
+
return toolTipContent ? ___EmotionJSX(EuiToolTip, _extends({
|
|
189
|
+
content: toolTipContent,
|
|
190
|
+
position: "top"
|
|
191
|
+
}, toolTipProps, {
|
|
192
|
+
anchorProps: _objectSpread(_objectSpread({}, toolTipProps === null || toolTipProps === void 0 ? void 0 : toolTipProps.anchorProps), {}, {
|
|
193
|
+
className: classNames('euiButtonGroup__tooltipWrapper', {
|
|
194
|
+
'euiButtonGroup__tooltipWrapper-isSelected': isSelected
|
|
195
|
+
}, toolTipProps === null || toolTipProps === void 0 ? void 0 : (_toolTipProps$anchorP = toolTipProps.anchorProps) === null || _toolTipProps$anchorP === void 0 ? void 0 : _toolTipProps$anchorP.className),
|
|
196
|
+
css: [wrapperCss, toolTipProps === null || toolTipProps === void 0 ? void 0 : (_toolTipProps$anchorP2 = toolTipProps.anchorProps) === null || _toolTipProps$anchorP2 === void 0 ? void 0 : _toolTipProps$anchorP2.css]
|
|
197
|
+
})
|
|
198
|
+
}), children) : children;
|
|
199
|
+
};
|
|
200
|
+
EuiButtonGroupButtonWithToolTip.propTypes = {
|
|
201
|
+
children: PropTypes.element.isRequired,
|
|
202
|
+
wrapperCss: PropTypes.any.isRequired,
|
|
203
|
+
isSelected: PropTypes.bool.isRequired
|
|
150
204
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
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)."; }
|
|
1
2
|
/*
|
|
2
3
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
4
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -12,6 +13,22 @@ import { mathWithUnits, logicalCSS, logicalShorthandCSS, euiTextShift, euiOutlin
|
|
|
12
13
|
import { euiButtonFillColor } from '../../../themes/amsterdam/global_styling/mixins/button';
|
|
13
14
|
import { euiScreenReaderOnly } from '../../accessibility';
|
|
14
15
|
import { euiFormVariables } from '../../form/form.styles';
|
|
16
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
17
|
+
name: "nwv4a2-tooltipWrapper",
|
|
18
|
+
styles: "overflow:hidden;label:tooltipWrapper;"
|
|
19
|
+
} : {
|
|
20
|
+
name: "nwv4a2-tooltipWrapper",
|
|
21
|
+
styles: "overflow:hidden;label:tooltipWrapper;",
|
|
22
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
23
|
+
};
|
|
24
|
+
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
25
|
+
name: "1u3o7zy-hasToolTip",
|
|
26
|
+
styles: "border-radius:inherit;label:hasToolTip;"
|
|
27
|
+
} : {
|
|
28
|
+
name: "1u3o7zy-hasToolTip",
|
|
29
|
+
styles: "border-radius:inherit;label:hasToolTip;",
|
|
30
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
31
|
+
};
|
|
15
32
|
export var euiButtonGroupButtonStyles = function euiButtonGroupButtonStyles(euiThemeContext) {
|
|
16
33
|
var euiTheme = euiThemeContext.euiTheme;
|
|
17
34
|
var _euiFormVariables = euiFormVariables(euiThemeContext),
|
|
@@ -28,9 +45,26 @@ export var euiButtonGroupButtonStyles = function euiButtonGroupButtonStyles(euiT
|
|
|
28
45
|
euiButtonGroupButton: /*#__PURE__*/css(logicalCSS('min-width', 0), " flex-shrink:1;flex-grow:0;", euiCanAnimate, "{transition:background-color ", euiTheme.animation.normal, " ease-in-out,color ", euiTheme.animation.normal, " ease-in-out;};label:euiButtonGroupButton;"),
|
|
29
46
|
iconOnly: /*#__PURE__*/css("padding-inline:", euiTheme.size.s, ";;label:iconOnly;"),
|
|
30
47
|
// Sizes
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
48
|
+
uncompressed: {
|
|
49
|
+
uncompressed: /*#__PURE__*/css("&:is(.euiButtonGroupButton-isSelected){font-weight:", euiTheme.font.weight.bold, ";};label:uncompressed;"),
|
|
50
|
+
get borders() {
|
|
51
|
+
var selectors = '.euiButtonGroupButton-isSelected, .euiButtonGroup__tooltipWrapper-isSelected';
|
|
52
|
+
var selectedColor = transparentize(euiTheme.colors.emptyShade, 0.2);
|
|
53
|
+
var unselectedColor = transparentize(euiTheme.colors.fullShade, 0.1);
|
|
54
|
+
var borderWidth = euiTheme.border.width.thin;
|
|
55
|
+
|
|
56
|
+
// "Borders" between buttons should be present between two of the same colored buttons,
|
|
57
|
+
// and absent between selected vs non-selected buttons (different colors)
|
|
58
|
+
return "\n &:not(".concat(selectors, ") + *:not(").concat(selectors, ") {\n box-shadow: -").concat(borderWidth, " 0 0 0 ").concat(unselectedColor, ";\n }\n &:is(").concat(selectors, ") + *:is(").concat(selectors, ") {\n box-shadow: -").concat(borderWidth, " 0 0 0 ").concat(selectedColor, ";\n }\n ");
|
|
59
|
+
},
|
|
60
|
+
get s() {
|
|
61
|
+
return /*#__PURE__*/css(this.borders, " ", uncompressedBorderRadii(euiTheme.border.radius.small), ";;label:s;");
|
|
62
|
+
},
|
|
63
|
+
get m() {
|
|
64
|
+
return /*#__PURE__*/css(this.borders, " ", uncompressedBorderRadii(euiTheme.border.radius.medium), ";;label:m;");
|
|
65
|
+
},
|
|
66
|
+
hasToolTip: _ref2
|
|
67
|
+
},
|
|
34
68
|
compressed: /*#__PURE__*/css(logicalCSS('height', compressedButtonHeight), " line-height:", compressedButtonHeight, ";padding:", mathWithUnits(euiTheme.border.width.thin, function (x) {
|
|
35
69
|
return x * 2;
|
|
36
70
|
}), ";background-clip:content-box;border-radius:", mathWithUnits([controlCompressedBorderRadius, euiTheme.border.width.thin], function (x, y) {
|
|
@@ -38,6 +72,8 @@ export var euiButtonGroupButtonStyles = function euiButtonGroupButtonStyles(euiT
|
|
|
38
72
|
}), ";font-weight:", euiTheme.font.weight.regular, ";&:is(.euiButtonGroupButton-isSelected){font-weight:", euiTheme.font.weight.semiBold, ";};label:compressed;"),
|
|
39
73
|
// States
|
|
40
74
|
disabledAndSelected: /*#__PURE__*/css("color:", makeDisabledContrastColor(euiTheme.colors.disabledText)(euiTheme.colors.disabled), ";background-color:", euiTheme.colors.disabled, ";;label:disabledAndSelected;"),
|
|
75
|
+
// Tooltip anchor wrapper
|
|
76
|
+
tooltipWrapper: _ref,
|
|
41
77
|
// Content wrapper
|
|
42
78
|
content: {
|
|
43
79
|
euiButtonGroupButton__content: /*#__PURE__*/css(";label:euiButtonGroupButton__content;"),
|
|
@@ -13,7 +13,7 @@ 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 { getSecureRelForTarget,
|
|
16
|
+
import { getSecureRelForTarget, useEuiMemoizedStyles } from '../../../services';
|
|
17
17
|
import { EuiIcon } from '../../icon';
|
|
18
18
|
import { EuiLoadingSpinner } from '../../loading';
|
|
19
19
|
import { useEuiButtonColorCSS, useEuiButtonFocusCSS } from '../../../themes/amsterdam/global_styling/mixins/button';
|
|
@@ -44,7 +44,6 @@ export var EuiButtonIcon = function EuiButtonIcon(_ref) {
|
|
|
44
44
|
isSelected = _ref.isSelected,
|
|
45
45
|
isLoading = _ref.isLoading,
|
|
46
46
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
47
|
-
var euiThemeContext = useEuiTheme();
|
|
48
47
|
var isDisabled = isButtonDisabled({
|
|
49
48
|
isDisabled: _isDisabled || disabled,
|
|
50
49
|
href: href,
|
|
@@ -59,9 +58,9 @@ export var EuiButtonIcon = function EuiButtonIcon(_ref) {
|
|
|
59
58
|
display: display
|
|
60
59
|
});
|
|
61
60
|
var buttonFocusStyle = useEuiButtonFocusCSS();
|
|
62
|
-
var emptyHoverStyles =
|
|
63
|
-
var styles = euiButtonIconStyles
|
|
64
|
-
var cssStyles = [styles.euiButtonIcon, styles[size], buttonColorStyles[isDisabled ? 'disabled' : color], buttonFocusStyle, emptyHoverStyles, isDisabled && styles.isDisabled];
|
|
61
|
+
var emptyHoverStyles = useEuiMemoizedStyles(_emptyHoverStyles);
|
|
62
|
+
var styles = useEuiMemoizedStyles(euiButtonIconStyles);
|
|
63
|
+
var cssStyles = [styles.euiButtonIcon, styles[size], buttonColorStyles[isDisabled ? 'disabled' : color], buttonFocusStyle, display === 'empty' && !isDisabled && emptyHoverStyles[color], isDisabled && styles.isDisabled];
|
|
65
64
|
var classes = classNames('euiButtonIcon', className);
|
|
66
65
|
|
|
67
66
|
// Add an icon to the button if one exists.
|
|
@@ -1,3 +1,9 @@
|
|
|
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); }
|
|
1
7
|
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
8
|
/*
|
|
3
9
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -9,7 +15,7 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
9
15
|
|
|
10
16
|
import { css } from '@emotion/react';
|
|
11
17
|
import { logicalSizeCSS } from '../../../global_styling';
|
|
12
|
-
import { euiButtonEmptyColor, euiButtonSizeMap } from '../../../themes/amsterdam/global_styling/mixins/button';
|
|
18
|
+
import { BUTTON_COLORS, euiButtonEmptyColor, euiButtonSizeMap } from '../../../themes/amsterdam/global_styling/mixins/button';
|
|
13
19
|
import { euiButtonBaseCSS } from '../button_display/_button_display.styles';
|
|
14
20
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
15
21
|
name: "8595p9-isDisabled",
|
|
@@ -30,6 +36,8 @@ export var euiButtonIconStyles = function euiButtonIconStyles(euiThemeContext) {
|
|
|
30
36
|
m: /*#__PURE__*/css(logicalSizeCSS(sizes.m.height), " border-radius:", sizes.m.radius, ";;label:m;")
|
|
31
37
|
};
|
|
32
38
|
};
|
|
33
|
-
export var _emptyHoverStyles = function _emptyHoverStyles(euiThemeContext
|
|
34
|
-
return
|
|
39
|
+
export var _emptyHoverStyles = function _emptyHoverStyles(euiThemeContext) {
|
|
40
|
+
return BUTTON_COLORS.reduce(function (styles, color) {
|
|
41
|
+
return _objectSpread(_objectSpread({}, styles), {}, _defineProperty({}, color, /*#__PURE__*/css("&:hover{background-color:", euiButtonEmptyColor(euiThemeContext, color).backgroundColor, ";}")));
|
|
42
|
+
}, {});
|
|
35
43
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
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
|
-
var _excluded = ["renderCellValue", "column", "setCellContentsRef", "rowIndex", "colIndex", "ariaRowIndex", "rowHeight", "rowHeightUtils", "isControlColumn", "isFocused", "
|
|
2
|
+
var _excluded = ["renderCellValue", "cellContext", "column", "setCellContentsRef", "rowIndex", "colIndex", "ariaRowIndex", "rowHeight", "rowHeightUtils", "isControlColumn", "isFocused", "showCellActions", "onExpandClick", "popoverAnchorRef"],
|
|
3
3
|
_excluded2 = ["width", "popoverContext", "interactiveCellId", "columnType", "className", "column", "style", "rowHeightUtils", "rowHeightsOptions", "rowManager", "pagination"],
|
|
4
4
|
_excluded3 = ["isExpandable", "style", "className", "data-test-subj"];
|
|
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; }
|
|
@@ -30,7 +30,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
30
30
|
|
|
31
31
|
import classNames from 'classnames';
|
|
32
32
|
import PropTypes from "prop-types";
|
|
33
|
-
import React, { Component, createRef, memo } from 'react';
|
|
33
|
+
import React, { Component, createRef, memo, useMemo } from 'react';
|
|
34
34
|
import { createPortal } from 'react-dom';
|
|
35
35
|
import { IS_JEST_ENVIRONMENT } from '../../../../utils';
|
|
36
36
|
import { keys } from '../../../../services';
|
|
@@ -45,6 +45,7 @@ import { HandleInteractiveChildren } from './focus_utils';
|
|
|
45
45
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
46
46
|
var EuiDataGridCellContent = /*#__PURE__*/memo(function (_ref) {
|
|
47
47
|
var renderCellValue = _ref.renderCellValue,
|
|
48
|
+
cellContext = _ref.cellContext,
|
|
48
49
|
column = _ref.column,
|
|
49
50
|
setCellContentsRef = _ref.setCellContentsRef,
|
|
50
51
|
rowIndex = _ref.rowIndex,
|
|
@@ -54,16 +55,25 @@ var EuiDataGridCellContent = /*#__PURE__*/memo(function (_ref) {
|
|
|
54
55
|
rowHeightUtils = _ref.rowHeightUtils,
|
|
55
56
|
isControlColumn = _ref.isControlColumn,
|
|
56
57
|
isFocused = _ref.isFocused,
|
|
57
|
-
|
|
58
|
+
showCellActions = _ref.showCellActions,
|
|
59
|
+
onExpandClick = _ref.onExpandClick,
|
|
60
|
+
popoverAnchorRef = _ref.popoverAnchorRef,
|
|
58
61
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
59
|
-
// React is more
|
|
62
|
+
// React is more permissive than the TS types indicate
|
|
60
63
|
var CellElement = renderCellValue;
|
|
61
|
-
var cellHeightType = (
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
var cellHeightType = useMemo(function () {
|
|
65
|
+
return (rowHeightUtils === null || rowHeightUtils === void 0 ? void 0 : rowHeightUtils.getHeightType(rowHeight)) || 'default';
|
|
66
|
+
}, [rowHeightUtils, rowHeight]);
|
|
67
|
+
var classes = useMemo(function () {
|
|
68
|
+
return classNames('euiDataGridRowCell__content', "euiDataGridRowCell__content--".concat(cellHeightType, "Height"), !isControlColumn && {
|
|
69
|
+
'eui-textBreakWord': cellHeightType !== 'default',
|
|
70
|
+
'eui-textTruncate': cellHeightType === 'default'
|
|
71
|
+
});
|
|
72
|
+
}, [cellHeightType, isControlColumn]);
|
|
73
|
+
return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(RenderTruncatedCellContent, {
|
|
74
|
+
hasLineCountTruncation: cellHeightType === 'lineCount' && !isControlColumn,
|
|
75
|
+
rowHeight: rowHeight
|
|
76
|
+
}, ___EmotionJSX("div", {
|
|
67
77
|
ref: setCellContentsRef,
|
|
68
78
|
"data-datagrid-cellcontent": true,
|
|
69
79
|
className: classes
|
|
@@ -73,15 +83,7 @@ var EuiDataGridCellContent = /*#__PURE__*/memo(function (_ref) {
|
|
|
73
83
|
rowIndex: rowIndex,
|
|
74
84
|
colIndex: colIndex,
|
|
75
85
|
schema: (column === null || column === void 0 ? void 0 : column.schema) || rest.columnType
|
|
76
|
-
}, rest)))
|
|
77
|
-
if (cellHeightType === 'lineCount' && !isControlColumn) {
|
|
78
|
-
var lines = rowHeightUtils.getLineCount(rowHeight);
|
|
79
|
-
cellContent = ___EmotionJSX(EuiTextBlockTruncate, {
|
|
80
|
-
lines: lines,
|
|
81
|
-
cloneElement: true
|
|
82
|
-
}, cellContent);
|
|
83
|
-
}
|
|
84
|
-
var screenReaderText = ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("p", {
|
|
86
|
+
}, cellContext, rest)))), ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("p", {
|
|
85
87
|
hidden: !isFocused
|
|
86
88
|
}, '- ', ___EmotionJSX(EuiI18n, {
|
|
87
89
|
token: "euiDataGridCell.position",
|
|
@@ -91,11 +93,16 @@ var EuiDataGridCellContent = /*#__PURE__*/memo(function (_ref) {
|
|
|
91
93
|
col: colIndex + 1,
|
|
92
94
|
row: ariaRowIndex
|
|
93
95
|
}
|
|
94
|
-
}),
|
|
96
|
+
}), showCellActions && ___EmotionJSX(React.Fragment, null, '. ', ___EmotionJSX(EuiI18n, {
|
|
95
97
|
token: "euiDataGridCell.expansionEnterPrompt",
|
|
96
98
|
default: "Press the Enter key to expand this cell."
|
|
97
|
-
}))))
|
|
98
|
-
|
|
99
|
+
})))), showCellActions && ___EmotionJSX(EuiDataGridCellActions, {
|
|
100
|
+
rowIndex: rowIndex,
|
|
101
|
+
colIndex: colIndex,
|
|
102
|
+
column: column,
|
|
103
|
+
onExpandClick: onExpandClick,
|
|
104
|
+
popoverAnchorRef: popoverAnchorRef
|
|
105
|
+
}));
|
|
99
106
|
});
|
|
100
107
|
EuiDataGridCellContent.propTypes = {
|
|
101
108
|
rowIndex: PropTypes.number.isRequired,
|
|
@@ -529,6 +536,7 @@ EuiDataGridCellContent.propTypes = {
|
|
|
529
536
|
isExpandable: PropTypes.bool.isRequired,
|
|
530
537
|
className: PropTypes.string,
|
|
531
538
|
renderCellValue: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,
|
|
539
|
+
cellContext: PropTypes.any,
|
|
532
540
|
renderCellPopover: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]),
|
|
533
541
|
setRowHeight: PropTypes.func,
|
|
534
542
|
getRowHeight: PropTypes.func,
|
|
@@ -568,16 +576,18 @@ EuiDataGridCellContent.propTypes = {
|
|
|
568
576
|
rowHeightUtils: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.any.isRequired]),
|
|
569
577
|
pagination: PropTypes.any,
|
|
570
578
|
setCellProps: PropTypes.func.isRequired,
|
|
571
|
-
setCellContentsRef: PropTypes.
|
|
579
|
+
setCellContentsRef: PropTypes.func.isRequired,
|
|
580
|
+
showCellActions: PropTypes.bool.isRequired,
|
|
572
581
|
isExpanded: PropTypes.bool.isRequired,
|
|
582
|
+
onExpandClick: PropTypes.func.isRequired,
|
|
583
|
+
popoverAnchorRef: PropTypes.any.isRequired,
|
|
573
584
|
isControlColumn: PropTypes.bool.isRequired,
|
|
574
585
|
isFocused: PropTypes.bool.isRequired,
|
|
575
586
|
ariaRowIndex: PropTypes.number.isRequired,
|
|
576
587
|
rowHeight: PropTypes.oneOfType([PropTypes.number.isRequired, PropTypes.oneOf(["auto"]), PropTypes.shape({
|
|
577
588
|
lineCount: PropTypes.number,
|
|
578
589
|
height: PropTypes.number
|
|
579
|
-
}).isRequired])
|
|
580
|
-
cellActions: PropTypes.node
|
|
590
|
+
}).isRequired])
|
|
581
591
|
};
|
|
582
592
|
EuiDataGridCellContent.displayName = 'EuiDataGridCellContent';
|
|
583
593
|
export var EuiDataGridCell = /*#__PURE__*/function (_Component) {
|
|
@@ -738,6 +748,7 @@ export var EuiDataGridCell = /*#__PURE__*/function (_Component) {
|
|
|
738
748
|
var _this$props5 = _this.props,
|
|
739
749
|
renderCellPopover = _this$props5.renderCellPopover,
|
|
740
750
|
renderCellValue = _this$props5.renderCellValue,
|
|
751
|
+
cellContext = _this$props5.cellContext,
|
|
741
752
|
rowIndex = _this$props5.rowIndex,
|
|
742
753
|
colIndex = _this$props5.colIndex,
|
|
743
754
|
column = _this$props5.column,
|
|
@@ -758,7 +769,7 @@ export var EuiDataGridCell = /*#__PURE__*/function (_Component) {
|
|
|
758
769
|
})),
|
|
759
770
|
DefaultCellPopover: DefaultCellPopover,
|
|
760
771
|
setCellPopoverProps: setCellPopoverProps
|
|
761
|
-
}), ___EmotionJSX(CellElement, _extends({}, sharedProps, {
|
|
772
|
+
}), ___EmotionJSX(CellElement, _extends({}, cellContext, sharedProps, {
|
|
762
773
|
setCellProps: _this.setCellProps,
|
|
763
774
|
isExpandable: true,
|
|
764
775
|
isExpanded: true,
|
|
@@ -903,6 +914,7 @@ export var EuiDataGridCell = /*#__PURE__*/function (_Component) {
|
|
|
903
914
|
if (nextProps.style.height !== this.props.style.height) return true;
|
|
904
915
|
if (nextProps.style.width !== this.props.style.width) return true;
|
|
905
916
|
}
|
|
917
|
+
if (nextProps.cellContext !== this.props.cellContext) return true;
|
|
906
918
|
if (nextState.cellProps !== this.state.cellProps) return true;
|
|
907
919
|
if (nextState.isFocused !== this.state.isFocused) return true;
|
|
908
920
|
if (nextState.isHovered !== this.state.isHovered) return true;
|
|
@@ -952,21 +964,16 @@ export var EuiDataGridCell = /*#__PURE__*/function (_Component) {
|
|
|
952
964
|
lineHeight: (_rowHeightsOptions$li = rowHeightsOptions === null || rowHeightsOptions === void 0 ? void 0 : rowHeightsOptions.lineHeight) !== null && _rowHeightsOptions$li !== void 0 ? _rowHeightsOptions$li : undefined
|
|
953
965
|
}, cellPropsStyle);
|
|
954
966
|
var rowHeight = rowHeightUtils === null || rowHeightUtils === void 0 ? void 0 : rowHeightUtils.getRowHeightOption(rowIndex, rowHeightsOptions);
|
|
955
|
-
var
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
rowHeightUtils: rowHeightUtils,
|
|
966
|
-
isControlColumn: cellClasses.includes('euiDataGridRowCell--controlColumn'),
|
|
967
|
-
ariaRowIndex: ariaRowIndex
|
|
968
|
-
});
|
|
969
|
-
var cell = ___EmotionJSX("div", _extends({
|
|
967
|
+
var row = rowManager && !IS_JEST_ENVIRONMENT ? rowManager.getRow({
|
|
968
|
+
rowIndex: rowIndex,
|
|
969
|
+
visibleRowIndex: visibleRowIndex,
|
|
970
|
+
top: style.top,
|
|
971
|
+
// comes in as a `{float}px` string from react-window
|
|
972
|
+
height: style.height // comes in as an integer from react-window
|
|
973
|
+
}) : undefined;
|
|
974
|
+
return ___EmotionJSX(RenderCellInRow, {
|
|
975
|
+
row: row
|
|
976
|
+
}, ___EmotionJSX("div", _extends({
|
|
970
977
|
role: "gridcell",
|
|
971
978
|
"aria-rowindex": ariaRowIndex,
|
|
972
979
|
tabIndex: this.state.isFocused ? 0 : -1,
|
|
@@ -990,28 +997,33 @@ export var EuiDataGridCell = /*#__PURE__*/function (_Component) {
|
|
|
990
997
|
cellEl: this.cellRef.current,
|
|
991
998
|
updateCellFocusContext: this.updateCellFocusContext,
|
|
992
999
|
renderFocusTrap: !isExpandable
|
|
993
|
-
}, ___EmotionJSX(EuiDataGridCellContent, _extends({},
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1000
|
+
}, ___EmotionJSX(EuiDataGridCellContent, _extends({}, rest, {
|
|
1001
|
+
setCellProps: this.setCellProps,
|
|
1002
|
+
column: column,
|
|
1003
|
+
columnType: columnType,
|
|
1004
|
+
isExpandable: isExpandable,
|
|
1005
|
+
isExpanded: popoverIsOpen,
|
|
1006
|
+
onExpandClick: this.handleCellExpansionClick,
|
|
1007
|
+
popoverAnchorRef: this.popoverAnchorRef,
|
|
1008
|
+
showCellActions: showCellActions,
|
|
1009
|
+
isFocused: this.state.isFocused,
|
|
1010
|
+
setCellContentsRef: this.setCellContentsRef,
|
|
1011
|
+
rowHeight: rowHeight,
|
|
1012
|
+
rowHeightUtils: rowHeightUtils,
|
|
1013
|
+
isControlColumn: cellClasses.includes('euiDataGridRowCell--controlColumn'),
|
|
1014
|
+
ariaRowIndex: ariaRowIndex,
|
|
1005
1015
|
rowIndex: rowIndex,
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
// comes in as a `{float}px` string from react-window
|
|
1009
|
-
height: style.height // comes in as an integer from react-window
|
|
1010
|
-
})) : cell;
|
|
1016
|
+
colIndex: colIndex
|
|
1017
|
+
})))));
|
|
1011
1018
|
}
|
|
1012
1019
|
}]);
|
|
1013
1020
|
return EuiDataGridCell;
|
|
1014
1021
|
}(Component);
|
|
1022
|
+
|
|
1023
|
+
/**
|
|
1024
|
+
* Function component utilities for conditional rendering.
|
|
1025
|
+
* Used for DRYness and performance
|
|
1026
|
+
*/
|
|
1015
1027
|
_defineProperty(EuiDataGridCell, "contextType", DataGridFocusContext);
|
|
1016
1028
|
EuiDataGridCell.propTypes = {
|
|
1017
1029
|
rowIndex: PropTypes.number.isRequired,
|
|
@@ -1376,6 +1388,7 @@ EuiDataGridCell.propTypes = {
|
|
|
1376
1388
|
setCellPopoverProps: PropTypes.func.isRequired
|
|
1377
1389
|
}).isRequired,
|
|
1378
1390
|
renderCellValue: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,
|
|
1391
|
+
cellContext: PropTypes.any,
|
|
1379
1392
|
renderCellPopover: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]),
|
|
1380
1393
|
setRowHeight: PropTypes.func,
|
|
1381
1394
|
getRowHeight: PropTypes.func,
|
|
@@ -1417,4 +1430,34 @@ EuiDataGridCell.propTypes = {
|
|
|
1417
1430
|
getRow: PropTypes.func.isRequired
|
|
1418
1431
|
}),
|
|
1419
1432
|
pagination: PropTypes.any
|
|
1420
|
-
};
|
|
1433
|
+
};
|
|
1434
|
+
var RenderCellInRow = /*#__PURE__*/memo(function (_ref2) {
|
|
1435
|
+
var row = _ref2.row,
|
|
1436
|
+
children = _ref2.children;
|
|
1437
|
+
return row ? /*#__PURE__*/createPortal(children, row) : children;
|
|
1438
|
+
});
|
|
1439
|
+
RenderCellInRow.propTypes = {
|
|
1440
|
+
children: PropTypes.element.isRequired,
|
|
1441
|
+
row: PropTypes.any
|
|
1442
|
+
};
|
|
1443
|
+
RenderCellInRow.displayName = 'RenderCellInRow';
|
|
1444
|
+
var RenderTruncatedCellContent = /*#__PURE__*/memo(function (_ref3) {
|
|
1445
|
+
var children = _ref3.children,
|
|
1446
|
+
hasLineCountTruncation = _ref3.hasLineCountTruncation,
|
|
1447
|
+
rowHeight = _ref3.rowHeight;
|
|
1448
|
+
// If `hasLineCountTruncation` is true, we can rely on rowHeight being the correct type
|
|
1449
|
+
var lines = hasLineCountTruncation ? rowHeight.lineCount : undefined;
|
|
1450
|
+
return lines ? ___EmotionJSX(EuiTextBlockTruncate, {
|
|
1451
|
+
lines: lines,
|
|
1452
|
+
cloneElement: true
|
|
1453
|
+
}, children) : children;
|
|
1454
|
+
});
|
|
1455
|
+
RenderTruncatedCellContent.propTypes = {
|
|
1456
|
+
children: PropTypes.element.isRequired,
|
|
1457
|
+
hasLineCountTruncation: PropTypes.bool.isRequired,
|
|
1458
|
+
rowHeight: PropTypes.oneOfType([PropTypes.number.isRequired, PropTypes.oneOf(["auto"]), PropTypes.shape({
|
|
1459
|
+
lineCount: PropTypes.number,
|
|
1460
|
+
height: PropTypes.number
|
|
1461
|
+
}).isRequired])
|
|
1462
|
+
};
|
|
1463
|
+
RenderTruncatedCellContent.displayName = 'RenderTruncatedCellContent';
|
|
@@ -26,6 +26,7 @@ import { EuiPopoverFooter } from '../../../popover';
|
|
|
26
26
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
27
27
|
export var EuiDataGridCellActions = function EuiDataGridCellActions(_ref) {
|
|
28
28
|
var onExpandClick = _ref.onExpandClick,
|
|
29
|
+
popoverAnchorRef = _ref.popoverAnchorRef,
|
|
29
30
|
column = _ref.column,
|
|
30
31
|
rowIndex = _ref.rowIndex,
|
|
31
32
|
colIndex = _ref.colIndex;
|
|
@@ -33,23 +34,25 @@ export var EuiDataGridCellActions = function EuiDataGridCellActions(_ref) {
|
|
|
33
34
|
// column.cellActions is present (regardless of column.isExpandable).
|
|
34
35
|
// This is because cell actions are not otherwise accessible to keyboard
|
|
35
36
|
// or screen reader users
|
|
36
|
-
var expandButton =
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
37
|
+
var expandButton = useMemo(function () {
|
|
38
|
+
return ___EmotionJSX(EuiI18n, {
|
|
39
|
+
key: 'expand',
|
|
40
|
+
token: "euiDataGridCellActions.expandButtonTitle",
|
|
41
|
+
default: "Click or hit enter to interact with cell content"
|
|
42
|
+
}, function (expandButtonTitle) {
|
|
43
|
+
return ___EmotionJSX(EuiButtonIcon, {
|
|
44
|
+
className: "euiDataGridRowCell__actionButtonIcon euiDataGridRowCell__expandCell",
|
|
45
|
+
"data-test-subj": "euiDataGridCellExpandButton",
|
|
46
|
+
display: "fill",
|
|
47
|
+
color: "primary",
|
|
48
|
+
iconSize: "m",
|
|
49
|
+
iconType: "expandMini",
|
|
50
|
+
"aria-hidden": true,
|
|
51
|
+
onClick: onExpandClick,
|
|
52
|
+
title: expandButtonTitle
|
|
53
|
+
});
|
|
51
54
|
});
|
|
52
|
-
});
|
|
55
|
+
}, [onExpandClick]);
|
|
53
56
|
var additionalButtons = useMemo(function () {
|
|
54
57
|
if (!column || !Array.isArray(column === null || column === void 0 ? void 0 : column.cellActions)) return [];
|
|
55
58
|
var ButtonComponent = function ButtonComponent(props) {
|
|
@@ -80,9 +83,12 @@ export var EuiDataGridCellActions = function EuiDataGridCellActions(_ref) {
|
|
|
80
83
|
});
|
|
81
84
|
});
|
|
82
85
|
}, [column, colIndex, rowIndex]);
|
|
83
|
-
return ___EmotionJSX("div", {
|
|
86
|
+
return ___EmotionJSX(React.Fragment, null, ___EmotionJSX("div", {
|
|
84
87
|
className: "euiDataGridRowCell__actions"
|
|
85
|
-
}, [].concat(_toConsumableArray(additionalButtons), [expandButton]))
|
|
88
|
+
}, [].concat(_toConsumableArray(additionalButtons), [expandButton])), ___EmotionJSX("div", {
|
|
89
|
+
ref: popoverAnchorRef,
|
|
90
|
+
"data-test-subject": "cellPopoverAnchor"
|
|
91
|
+
}));
|
|
86
92
|
};
|
|
87
93
|
export var EuiDataGridCellPopoverActions = function EuiDataGridCellPopoverActions(_ref2) {
|
|
88
94
|
var rowIndex = _ref2.rowIndex,
|