@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
|
@@ -26,16 +26,19 @@ var _excluded = ["target", "external"];
|
|
|
26
26
|
* DRY util for indicating external links both via icon and to
|
|
27
27
|
* screen readers. Used internally by at EuiLink and EuiListGroupItem
|
|
28
28
|
*/
|
|
29
|
-
var
|
|
30
|
-
var
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
var iconStyle = function iconStyle(_ref) {
|
|
30
|
+
var euiTheme = _ref.euiTheme;
|
|
31
|
+
return (0, _global_styling.logicalStyle)('margin-left', euiTheme.size.xs);
|
|
32
|
+
};
|
|
33
|
+
var EuiExternalLinkIcon = function EuiExternalLinkIcon(_ref2) {
|
|
34
|
+
var target = _ref2.target,
|
|
35
|
+
external = _ref2.external,
|
|
36
|
+
rest = (0, _objectWithoutProperties2.default)(_ref2, _excluded);
|
|
37
|
+
var iconCssStyle = (0, _services.useEuiMemoizedStyles)(iconStyle);
|
|
35
38
|
var showExternalLinkIcon = target === '_blank' && external !== false || external === true;
|
|
36
39
|
var iconAriaLabel = (0, _i18n.useEuiI18n)('euiExternalLinkIcon.ariaLabel', 'External link');
|
|
37
40
|
return (0, _react2.jsx)(_react.default.Fragment, null, showExternalLinkIcon && (0, _react2.jsx)(_icon.EuiIcon, (0, _extends2.default)({
|
|
38
|
-
css:
|
|
41
|
+
css: iconCssStyle,
|
|
39
42
|
"aria-label": iconAriaLabel,
|
|
40
43
|
size: "s",
|
|
41
44
|
type: "popout"
|
|
@@ -44,8 +44,7 @@ var EuiLink = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
44
44
|
onClick = _ref.onClick,
|
|
45
45
|
_disabled = _ref.disabled,
|
|
46
46
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
47
|
-
var
|
|
48
|
-
var styles = (0, _link.euiLinkStyles)(euiTheme);
|
|
47
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_link.euiLinkStyles);
|
|
49
48
|
var cssStyles = [styles.euiLink];
|
|
50
49
|
var isHrefValid = !href || (0, _href_validator.validateHref)(href);
|
|
51
50
|
var disabled = _disabled || !isHrefValid;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.euiLinkStyles = exports.
|
|
6
|
+
exports.euiLinkStyles = exports.euiLinkCSS = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _global_styling = require("../../global_styling");
|
|
9
9
|
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)."; } /*
|
|
@@ -13,20 +13,9 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
13
13
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
14
14
|
* Side Public License, v 1.
|
|
15
15
|
*/
|
|
16
|
-
var _colorCSS = function _colorCSS(color) {
|
|
17
|
-
return "\n color: ".concat(color, ";\n\n &:target {\n color: darken(").concat(color, ", 10%);\n }\n ");
|
|
18
|
-
};
|
|
19
|
-
var euiLinkHoverCSS = function euiLinkHoverCSS() {
|
|
20
|
-
return "\n text-decoration: underline;\n ";
|
|
21
|
-
};
|
|
22
|
-
exports.euiLinkHoverCSS = euiLinkHoverCSS;
|
|
23
|
-
var euiLinkFocusCSS = function euiLinkFocusCSS(euiTheme) {
|
|
24
|
-
return "\n text-decoration: underline;\n text-decoration-thickness: ".concat(euiTheme.border.width.thick, ";\n ");
|
|
25
|
-
};
|
|
26
|
-
exports.euiLinkFocusCSS = euiLinkFocusCSS;
|
|
27
16
|
var euiLinkCSS = function euiLinkCSS(euiThemeContext) {
|
|
28
17
|
var euiTheme = euiThemeContext.euiTheme;
|
|
29
|
-
return "\n font-weight: ".concat(euiTheme.font.weight.medium, ";\n ").concat((0, _global_styling.logicalTextAlignCSS)('left'), "\n\n &:hover {\n
|
|
18
|
+
return "\n font-weight: ".concat(euiTheme.font.weight.medium, ";\n ").concat((0, _global_styling.logicalTextAlignCSS)('left'), "\n\n &:hover {\n text-decoration: underline;\n }\n\n &:focus {\n ").concat((0, _global_styling.euiFocusRing)(euiThemeContext, 'outset'), "\n text-decoration: underline;\n text-decoration-thickness: ").concat(euiTheme.border.width.thick, ";\n }\n ");
|
|
30
19
|
};
|
|
31
20
|
exports.euiLinkCSS = euiLinkCSS;
|
|
32
21
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
@@ -53,4 +42,7 @@ var euiLinkStyles = function euiLinkStyles(euiThemeContext) {
|
|
|
53
42
|
text: /*#__PURE__*/(0, _react.css)(_colorCSS(euiTheme.colors.text), ";label:text;")
|
|
54
43
|
};
|
|
55
44
|
};
|
|
56
|
-
exports.euiLinkStyles = euiLinkStyles;
|
|
45
|
+
exports.euiLinkStyles = euiLinkStyles;
|
|
46
|
+
var _colorCSS = function _colorCSS(color) {
|
|
47
|
+
return "\n color: ".concat(color, ";\n\n &:target {\n color: darken(").concat(color, ", 10%);\n }\n ");
|
|
48
|
+
};
|
|
@@ -83,7 +83,8 @@ var EuiConfirmModal = function EuiConfirmModal(_ref) {
|
|
|
83
83
|
return (0, _react2.jsx)(_modal.EuiModal, (0, _extends2.default)({
|
|
84
84
|
className: classes,
|
|
85
85
|
css: cssStyles,
|
|
86
|
-
onClose: onCancel
|
|
86
|
+
onClose: onCancel,
|
|
87
|
+
role: "alertdialog"
|
|
87
88
|
}, rest), modalTitle, message && (0, _react2.jsx)(_modal_body.EuiModalBody, null, (0, _react2.jsx)(_text.EuiText, {
|
|
88
89
|
"data-test-subj": "confirmModalBodyText"
|
|
89
90
|
}, message)), (0, _react2.jsx)(_modal_footer.EuiModalFooter, null, (0, _react2.jsx)(_button.EuiButtonEmpty, {
|
|
@@ -17,7 +17,7 @@ var _overlay_mask = require("../overlay_mask");
|
|
|
17
17
|
var _i18n = require("../i18n");
|
|
18
18
|
var _modal = require("./modal.styles");
|
|
19
19
|
var _react2 = require("@emotion/react");
|
|
20
|
-
var _excluded = ["className", "children", "initialFocus", "onClose", "maxWidth", "style"];
|
|
20
|
+
var _excluded = ["className", "children", "initialFocus", "onClose", "maxWidth", "role", "style"];
|
|
21
21
|
/*
|
|
22
22
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
23
23
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -34,6 +34,8 @@ var EuiModal = function EuiModal(_ref) {
|
|
|
34
34
|
onClose = _ref.onClose,
|
|
35
35
|
_ref$maxWidth = _ref.maxWidth,
|
|
36
36
|
maxWidth = _ref$maxWidth === void 0 ? true : _ref$maxWidth,
|
|
37
|
+
_ref$role = _ref.role,
|
|
38
|
+
role = _ref$role === void 0 ? 'dialog' : _ref$role,
|
|
37
39
|
style = _ref.style,
|
|
38
40
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
39
41
|
var onKeyDown = function onKeyDown(event) {
|
|
@@ -63,7 +65,9 @@ var EuiModal = function EuiModal(_ref) {
|
|
|
63
65
|
className: classes,
|
|
64
66
|
onKeyDown: onKeyDown,
|
|
65
67
|
tabIndex: 0,
|
|
66
|
-
style: newStyle
|
|
68
|
+
style: newStyle,
|
|
69
|
+
role: role,
|
|
70
|
+
"aria-modal": true
|
|
67
71
|
}, rest), (0, _react2.jsx)(_i18n.EuiI18n, {
|
|
68
72
|
token: "euiModal.closeModal",
|
|
69
73
|
default: "Closes this modal window"
|
|
@@ -40,14 +40,13 @@ var EuiResizeObserver = /*#__PURE__*/function (_EuiObserver) {
|
|
|
40
40
|
height: 0,
|
|
41
41
|
width: 0
|
|
42
42
|
});
|
|
43
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onResize", function () {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
width = _this$childNode$getBo.width;
|
|
43
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onResize", function (_ref) {
|
|
44
|
+
var _ref2 = (0, _slicedToArray2.default)(_ref, 1),
|
|
45
|
+
entry = _ref2[0];
|
|
46
|
+
var _entry$borderBoxSize$ = entry.borderBoxSize[0],
|
|
47
|
+
width = _entry$borderBoxSize$.inlineSize,
|
|
48
|
+
height = _entry$borderBoxSize$.blockSize;
|
|
49
|
+
|
|
51
50
|
// Check for actual resize event
|
|
52
51
|
if (_this.state.height === height && _this.state.width === width) {
|
|
53
52
|
return;
|
|
@@ -102,23 +101,15 @@ var useResizeObserver = function useResizeObserver(container, dimension) {
|
|
|
102
101
|
}, [dimension]);
|
|
103
102
|
(0, _react.useEffect)(function () {
|
|
104
103
|
if (container != null) {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
});
|
|
112
|
-
var observer = makeResizeObserver(container, function () {
|
|
113
|
-
// `entry.contentRect` provides incomplete `height` and `width` data.
|
|
114
|
-
// Use `getBoundingClientRect` to account for padding and border.
|
|
115
|
-
// https://developer.mozilla.org/en-US/docs/Web/API/DOMRectReadOnly
|
|
116
|
-
var _container$getBoundin = container.getBoundingClientRect(),
|
|
117
|
-
height = _container$getBoundin.height,
|
|
118
|
-
width = _container$getBoundin.width;
|
|
104
|
+
var observer = makeResizeObserver(container, function (_ref3) {
|
|
105
|
+
var _ref4 = (0, _slicedToArray2.default)(_ref3, 1),
|
|
106
|
+
entry = _ref4[0];
|
|
107
|
+
var _entry$borderBoxSize$2 = entry.borderBoxSize[0],
|
|
108
|
+
inlineSize = _entry$borderBoxSize$2.inlineSize,
|
|
109
|
+
blockSize = _entry$borderBoxSize$2.blockSize;
|
|
119
110
|
setSize({
|
|
120
|
-
width:
|
|
121
|
-
height:
|
|
111
|
+
width: inlineSize,
|
|
112
|
+
height: blockSize
|
|
122
113
|
});
|
|
123
114
|
});
|
|
124
115
|
return function () {
|
|
@@ -67,7 +67,7 @@ var euiProgressStyles = function euiProgressStyles(_ref3, isNative) {
|
|
|
67
67
|
// https://css-tricks.com/html5-progress-element/
|
|
68
68
|
// Good resource if you need to work in here. There's some gotchas with
|
|
69
69
|
// dealing with cross-browser progress bars.
|
|
70
|
-
native: /*#__PURE__*/(0, _react.css)("display:block;", (0, _global_styling.logicalCSS)('width', '100%'), " appearance:none;border:none;border-radius:", euiTheme.size.s, ";&::-webkit-progress-bar{background-color:", euiTheme.colors.lightShade, ";}", crossBrowserProgressValue(
|
|
70
|
+
native: /*#__PURE__*/(0, _react.css)("display:block;", (0, _global_styling.logicalCSS)('width', '100%'), " appearance:none;border:none;border-radius:", euiTheme.size.s, ";&::-webkit-progress-bar{background-color:", euiTheme.colors.lightShade, ";}", _global_styling.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;"),
|
|
71
71
|
// An indeterminate bar has an unreliable end time. Because of a Firefox animation issue,
|
|
72
72
|
// we apply this style to a <div> instead of a <progress> element.
|
|
73
73
|
// See https://css-tricks.com/html5-progress-element/ for more info.
|
|
@@ -36,8 +36,7 @@ var EuiSkeletonCircle = function EuiSkeletonCircle(_ref) {
|
|
|
36
36
|
ariaWrapperProps = _ref.ariaWrapperProps,
|
|
37
37
|
children = _ref.children,
|
|
38
38
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
39
|
-
var
|
|
40
|
-
var styles = (0, _skeleton_circle.euiSkeletonCircleStyles)(euiTheme);
|
|
39
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_skeleton_circle.euiSkeletonCircleStyles);
|
|
41
40
|
var cssStyles = [styles.euiSkeletonCircle, styles[size]];
|
|
42
41
|
return (0, _react2.jsx)(_skeleton_loading.EuiSkeletonLoading, (0, _extends2.default)({
|
|
43
42
|
isLoading: isLoading,
|
|
@@ -45,8 +45,7 @@ var EuiSkeletonRectangle = function EuiSkeletonRectangle(_ref) {
|
|
|
45
45
|
ariaWrapperProps = _ref.ariaWrapperProps,
|
|
46
46
|
children = _ref.children,
|
|
47
47
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
48
|
-
var
|
|
49
|
-
var styles = (0, _skeleton_rectangle.euiSkeletonRectangleStyles)(euiTheme);
|
|
48
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_skeleton_rectangle.euiSkeletonRectangleStyles);
|
|
50
49
|
var cssStyles = [styles.euiSkeletonRectangle, styles[borderRadius]];
|
|
51
50
|
return (0, _react2.jsx)(_skeleton_loading.EuiSkeletonLoading, (0, _extends2.default)({
|
|
52
51
|
isLoading: isLoading,
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.LINES = exports.EuiSkeletonText = void 0;
|
|
8
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
|
-
var _react =
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
13
|
var _services = require("../../services");
|
|
13
14
|
var _skeleton_loading = require("./skeleton_loading");
|
|
@@ -21,6 +22,8 @@ var _excluded = ["isLoading", "lines", "size", "className", "contentAriaLabel",
|
|
|
21
22
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
22
23
|
* Side Public License, v 1.
|
|
23
24
|
*/
|
|
25
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
26
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
24
27
|
var LINES = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
|
25
28
|
exports.LINES = LINES;
|
|
26
29
|
var EuiSkeletonText = function EuiSkeletonText(_ref) {
|
|
@@ -38,16 +41,20 @@ var EuiSkeletonText = function EuiSkeletonText(_ref) {
|
|
|
38
41
|
ariaWrapperProps = _ref.ariaWrapperProps,
|
|
39
42
|
children = _ref.children,
|
|
40
43
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
41
|
-
var
|
|
42
|
-
var
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
lineElements
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
44
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_skeleton_text.euiSkeletonTextStyles);
|
|
45
|
+
var cssStyles = (0, _react.useMemo)(function () {
|
|
46
|
+
return [styles.euiSkeletonText, styles[size]];
|
|
47
|
+
}, [styles, size]);
|
|
48
|
+
var lineElements = (0, _react.useMemo)(function () {
|
|
49
|
+
var lineElements = [];
|
|
50
|
+
for (var i = 0; i < lines; i++) {
|
|
51
|
+
lineElements.push((0, _react2.jsx)("span", {
|
|
52
|
+
key: i,
|
|
53
|
+
css: cssStyles
|
|
54
|
+
}));
|
|
55
|
+
}
|
|
56
|
+
return lineElements;
|
|
57
|
+
}, [lines, cssStyles]);
|
|
51
58
|
return (0, _react2.jsx)(_skeleton_loading.EuiSkeletonLoading, (0, _extends2.default)({
|
|
52
59
|
isLoading: isLoading,
|
|
53
60
|
loadingContent: (0, _react2.jsx)("span", (0, _extends2.default)({
|
|
@@ -34,8 +34,7 @@ var EuiSkeletonTitle = function EuiSkeletonTitle(_ref) {
|
|
|
34
34
|
ariaWrapperProps = _ref.ariaWrapperProps,
|
|
35
35
|
children = _ref.children,
|
|
36
36
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
37
|
-
var
|
|
38
|
-
var styles = (0, _skeleton_title.euiSkeletonTitleStyles)(euiTheme);
|
|
37
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_skeleton_title.euiSkeletonTitleStyles);
|
|
39
38
|
var cssStyles = [styles.euiSkeletonTitle, styles[size]];
|
|
40
39
|
return (0, _react2.jsx)(_skeleton_loading.EuiSkeletonLoading, (0, _extends2.default)({
|
|
41
40
|
isLoading: isLoading,
|
|
@@ -28,8 +28,7 @@ var EuiSpacer = function EuiSpacer(_ref) {
|
|
|
28
28
|
_ref$size = _ref.size,
|
|
29
29
|
size = _ref$size === void 0 ? 'l' : _ref$size,
|
|
30
30
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
31
|
-
var
|
|
32
|
-
var styles = (0, _spacer.euiSpacerStyles)(euiTheme);
|
|
31
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_spacer.euiSpacerStyles);
|
|
33
32
|
var classes = (0, _classnames.default)('euiSpacer', (0, _defineProperty2.default)({}, "euiSpacer--".concat(size), size), className);
|
|
34
33
|
var cssStyles = [styles.euiSpacer, styles[size]];
|
|
35
34
|
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
@@ -34,8 +34,7 @@ var EuiText = function EuiText(_ref) {
|
|
|
34
34
|
children = _ref.children,
|
|
35
35
|
className = _ref.className,
|
|
36
36
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
37
|
-
var
|
|
38
|
-
var styles = (0, _text.euiTextStyles)(euiTheme);
|
|
37
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_text.euiTextStyles);
|
|
39
38
|
var cssStyles = [styles.euiText, !grow ? styles.constrainedWidth : undefined, styles[size]];
|
|
40
39
|
var classes = (0, _classnames.default)('euiText', className);
|
|
41
40
|
var text = (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
@@ -33,8 +33,7 @@ var EuiTextAlign = function EuiTextAlign(_ref) {
|
|
|
33
33
|
_ref$cloneElement = _ref.cloneElement,
|
|
34
34
|
cloneElement = _ref$cloneElement === void 0 ? false : _ref$cloneElement,
|
|
35
35
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
36
|
-
var
|
|
37
|
-
var cssStyles = [styles.euiTextAlign, styles[textAlign]];
|
|
36
|
+
var cssStyles = [_text_align.euiTextAlignStyles.euiTextAlign, _text_align.euiTextAlignStyles[textAlign]];
|
|
38
37
|
var props = _objectSpread({
|
|
39
38
|
css: cssStyles
|
|
40
39
|
}, rest);
|
|
@@ -14,12 +14,10 @@ var _global_styling = require("../../global_styling");
|
|
|
14
14
|
* Side Public License, v 1.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
var euiTextAlignStyles =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
center: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('center'), ";;label:center;")
|
|
23
|
-
};
|
|
17
|
+
var euiTextAlignStyles = {
|
|
18
|
+
euiTextAlign: /*#__PURE__*/(0, _react.css)(";label:euiTextAlign;"),
|
|
19
|
+
left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('left'), ";;label:left;"),
|
|
20
|
+
right: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('right'), ";;label:right;"),
|
|
21
|
+
center: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('center'), ";;label:center;")
|
|
24
22
|
};
|
|
25
23
|
exports.euiTextAlignStyles = euiTextAlignStyles;
|
|
@@ -37,8 +37,7 @@ var EuiTextColor = function EuiTextColor(_ref) {
|
|
|
37
37
|
style = _ref.style,
|
|
38
38
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
39
39
|
var isNamedColor = COLORS.includes(color);
|
|
40
|
-
var
|
|
41
|
-
var styles = (0, _text_color.euiTextColorStyles)(euiTheme);
|
|
40
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_text_color.euiTextColorStyles);
|
|
42
41
|
var cssStyles = [styles.euiTextColor, isNamedColor ? styles[color] : styles.customColor];
|
|
43
42
|
|
|
44
43
|
// We're checking if is a custom color.
|
|
@@ -31,8 +31,7 @@ var EuiTitle = function EuiTitle(_ref) {
|
|
|
31
31
|
className = _ref.className,
|
|
32
32
|
textTransform = _ref.textTransform,
|
|
33
33
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
34
|
-
var
|
|
35
|
-
var styles = (0, _title.euiTitleStyles)(euiTheme);
|
|
34
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_title.euiTitleStyles);
|
|
36
35
|
var cssStyles = [styles.euiTitle, textTransform ? styles[textTransform] : undefined, styles[size]];
|
|
37
36
|
var classes = (0, _classnames.default)('euiTitle', className, children.props.className);
|
|
38
37
|
var props = _objectSpread({
|
|
@@ -4,10 +4,9 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.
|
|
7
|
+
exports.euiTitleStyles = exports.euiTitle = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
|
-
var _services = require("../../services");
|
|
11
10
|
var _global_styling = require("../../global_styling");
|
|
12
11
|
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; }
|
|
13
12
|
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) { (0, _defineProperty2.default)(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; }
|
|
@@ -40,17 +39,10 @@ var euiTitle = function euiTitle(euiThemeContext) {
|
|
|
40
39
|
});
|
|
41
40
|
};
|
|
42
41
|
|
|
43
|
-
// Hook version
|
|
44
|
-
exports.euiTitle = euiTitle;
|
|
45
|
-
var useEuiTitle = function useEuiTitle(scale, options) {
|
|
46
|
-
var euiTheme = (0, _services.useEuiTheme)();
|
|
47
|
-
return euiTitle(euiTheme, scale, options);
|
|
48
|
-
};
|
|
49
|
-
|
|
50
42
|
/**
|
|
51
43
|
* Styles
|
|
52
44
|
*/
|
|
53
|
-
exports.
|
|
45
|
+
exports.euiTitle = euiTitle;
|
|
54
46
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
55
47
|
name: "1x2qsb1-uppercase",
|
|
56
48
|
styles: "text-transform:uppercase;label:uppercase;"
|
|
@@ -76,10 +76,9 @@ var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
|
|
|
76
76
|
var isScrollingAnimationFrame = (0, _react.useRef)(0);
|
|
77
77
|
var startScrollingAnimationFrame = (0, _react.useRef)(0);
|
|
78
78
|
var listElement = (0, _react.useRef)(null);
|
|
79
|
-
var
|
|
80
|
-
var styles = (0, _global_toast_list.euiGlobalToastListStyles)(euiTheme);
|
|
79
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_global_toast_list.euiGlobalToastListStyles);
|
|
81
80
|
var cssStyles = [styles.euiGlobalToastList, styles[side]];
|
|
82
|
-
var startScrollingToBottom = function
|
|
81
|
+
var startScrollingToBottom = (0, _react.useCallback)(function () {
|
|
83
82
|
isScrollingToBottom.current = true;
|
|
84
83
|
var scrollToBottom = function scrollToBottom() {
|
|
85
84
|
// Although we cancel the requestAnimationFrame in componentWillUnmount,
|
|
@@ -102,8 +101,8 @@ var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
|
|
|
102
101
|
}
|
|
103
102
|
};
|
|
104
103
|
startScrollingAnimationFrame.current = window.requestAnimationFrame(scrollToBottom);
|
|
105
|
-
};
|
|
106
|
-
var onMouseEnter = function
|
|
104
|
+
}, []);
|
|
105
|
+
var onMouseEnter = (0, _react.useCallback)(function () {
|
|
107
106
|
// Stop scrolling to bottom if we're in mid-scroll, because the user wants to interact with
|
|
108
107
|
// the list.
|
|
109
108
|
isScrollingToBottom.current = false;
|
|
@@ -116,8 +115,8 @@ var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
|
|
|
116
115
|
timer.pause();
|
|
117
116
|
}
|
|
118
117
|
}
|
|
119
|
-
};
|
|
120
|
-
var onMouseLeave = function
|
|
118
|
+
}, []);
|
|
119
|
+
var onMouseLeave = (0, _react.useCallback)(function () {
|
|
121
120
|
isUserInteracting.current = false;
|
|
122
121
|
for (var _toastId2 in toastIdToTimerMap.current) {
|
|
123
122
|
if (toastIdToTimerMap.current.hasOwnProperty(_toastId2)) {
|
|
@@ -125,8 +124,8 @@ var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
|
|
|
125
124
|
timer.resume();
|
|
126
125
|
}
|
|
127
126
|
}
|
|
128
|
-
};
|
|
129
|
-
var onScroll = function
|
|
127
|
+
}, []);
|
|
128
|
+
var onScroll = (0, _react.useCallback)(function () {
|
|
130
129
|
// Given that this method also gets invoked by the synthetic scroll that happens when a new toast gets added,
|
|
131
130
|
// we want to evaluate if the scroll bottom has been reached only when the user is interacting with the toast,
|
|
132
131
|
// this way we always retain the scroll position the user has set despite adding in new toasts.
|
|
@@ -134,7 +133,7 @@ var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
|
|
|
134
133
|
if (listElement.current && isUserInteracting.current) {
|
|
135
134
|
isScrolledToBottom.current = listElement.current.scrollHeight - listElement.current.scrollTop === listElement.current.clientHeight;
|
|
136
135
|
}
|
|
137
|
-
};
|
|
136
|
+
}, []);
|
|
138
137
|
var dismissToast = (0, _react.useCallback)(function (toast) {
|
|
139
138
|
// Remove the toast after it's done fading out.
|
|
140
139
|
dismissTimeoutIds.current.push(window.setTimeout(function () {
|
|
@@ -157,34 +156,29 @@ var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
|
|
|
157
156
|
}
|
|
158
157
|
});
|
|
159
158
|
}, [scheduleToastForDismissal, toasts]);
|
|
160
|
-
var addListeners = function addListeners() {
|
|
161
|
-
if (listElement.current) {
|
|
162
|
-
listElement.current.addEventListener('scroll', onScroll);
|
|
163
|
-
listElement.current.addEventListener('mouseenter', onMouseEnter);
|
|
164
|
-
listElement.current.addEventListener('mouseleave', onMouseLeave);
|
|
165
|
-
}
|
|
166
|
-
};
|
|
167
|
-
var removeListeners = function removeListeners() {
|
|
168
|
-
if (listElement.current) {
|
|
169
|
-
listElement.current.removeEventListener('scroll', onScroll);
|
|
170
|
-
listElement.current.removeEventListener('mouseenter', onMouseEnter);
|
|
171
|
-
listElement.current.removeEventListener('mouseleave', onMouseLeave);
|
|
172
|
-
}
|
|
173
|
-
};
|
|
174
159
|
|
|
175
160
|
// componentDidMount
|
|
176
161
|
(0, _react.useEffect)(function () {
|
|
177
|
-
|
|
162
|
+
var listenerEl = listElement.current;
|
|
163
|
+
if (listenerEl) {
|
|
164
|
+
listenerEl.addEventListener('scroll', onScroll);
|
|
165
|
+
listenerEl.addEventListener('mouseenter', onMouseEnter);
|
|
166
|
+
listenerEl.addEventListener('mouseleave', onMouseLeave);
|
|
167
|
+
}
|
|
178
168
|
|
|
179
169
|
// componentWillUnmount
|
|
180
170
|
return function () {
|
|
171
|
+
if (listenerEl) {
|
|
172
|
+
listenerEl.removeEventListener('scroll', onScroll);
|
|
173
|
+
listenerEl.removeEventListener('mouseenter', onMouseEnter);
|
|
174
|
+
listenerEl.removeEventListener('mouseleave', onMouseLeave);
|
|
175
|
+
}
|
|
181
176
|
if (isScrollingAnimationFrame.current !== 0) {
|
|
182
177
|
window.cancelAnimationFrame(isScrollingAnimationFrame.current);
|
|
183
178
|
}
|
|
184
179
|
if (startScrollingAnimationFrame.current !== 0) {
|
|
185
180
|
window.cancelAnimationFrame(startScrollingAnimationFrame.current);
|
|
186
181
|
}
|
|
187
|
-
removeListeners();
|
|
188
182
|
dismissTimeoutIds.current.forEach(clearTimeout); // eslint-disable-line react-hooks/exhaustive-deps
|
|
189
183
|
for (var _toastId3 in toastIdToTimerMap.current) {
|
|
190
184
|
if (toastIdToTimerMap.current.hasOwnProperty(_toastId3)) {
|
|
@@ -193,7 +187,7 @@ var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
|
|
|
193
187
|
}
|
|
194
188
|
}
|
|
195
189
|
};
|
|
196
|
-
}, []);
|
|
190
|
+
}, [onMouseEnter, onMouseLeave, onScroll]);
|
|
197
191
|
|
|
198
192
|
// componentDidUpdate
|
|
199
193
|
(0, _react.useEffect)(function () {
|
|
@@ -208,7 +202,7 @@ var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
|
|
|
208
202
|
}
|
|
209
203
|
}
|
|
210
204
|
prevToasts.current = toasts;
|
|
211
|
-
}, [toasts, scheduleAllToastsForDismissal]);
|
|
205
|
+
}, [toasts, scheduleAllToastsForDismissal, startScrollingToBottom]);
|
|
212
206
|
|
|
213
207
|
// Toast dismissal side effect
|
|
214
208
|
// Ensure the callback has correct state by not enclosing it in `setTimeout`
|
|
@@ -229,49 +223,52 @@ var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
|
|
|
229
223
|
});
|
|
230
224
|
}
|
|
231
225
|
}, [toastToDismiss, dismissToastProp]);
|
|
232
|
-
var renderedToasts =
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
key: toast.id,
|
|
241
|
-
isDismissed: toastIdToDismissedMap[toast.id]
|
|
242
|
-
}, (0, _react2.jsx)(_toast.EuiToast, (0, _extends2.default)({
|
|
243
|
-
onClose: onClose,
|
|
244
|
-
onFocus: onMouseEnter,
|
|
245
|
-
onBlur: onMouseLeave
|
|
246
|
-
}, rest), text));
|
|
247
|
-
});
|
|
248
|
-
if (showClearAllButtonAt && toasts.length >= showClearAllButtonAt) {
|
|
249
|
-
var dismissAllToasts = function dismissAllToasts() {
|
|
250
|
-
toasts.forEach(function (toast) {
|
|
251
|
-
return dismissToastProp(toast);
|
|
252
|
-
});
|
|
253
|
-
onClearAllToasts === null || onClearAllToasts === void 0 ? void 0 : onClearAllToasts();
|
|
254
|
-
};
|
|
255
|
-
renderedToasts.push((0, _react2.jsx)(_i18n.EuiI18n, {
|
|
256
|
-
key: "euiClearAllToasts",
|
|
257
|
-
tokens: ['euiGlobalToastList.clearAllToastsButtonAriaLabel', 'euiGlobalToastList.clearAllToastsButtonDisplayText'],
|
|
258
|
-
defaults: ['Clear all toast notifications', 'Clear all']
|
|
259
|
-
}, function (_ref2) {
|
|
260
|
-
var _ref3 = (0, _slicedToArray2.default)(_ref2, 2),
|
|
261
|
-
clearAllToastsButtonAriaLabel = _ref3[0],
|
|
262
|
-
clearAllToastsButtonDisplayText = _ref3[1];
|
|
226
|
+
var renderedToasts = (0, _react.useMemo)(function () {
|
|
227
|
+
return toasts.map(function (toast) {
|
|
228
|
+
var text = toast.text,
|
|
229
|
+
toastLifeTimeMs = toast.toastLifeTimeMs,
|
|
230
|
+
rest = (0, _objectWithoutProperties2.default)(toast, _excluded2);
|
|
231
|
+
var onClose = function onClose() {
|
|
232
|
+
return dismissToast(toast);
|
|
233
|
+
};
|
|
263
234
|
return (0, _react2.jsx)(_global_toast_list_item.EuiGlobalToastListItem, {
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
235
|
+
key: toast.id,
|
|
236
|
+
isDismissed: toastIdToDismissedMap[toast.id]
|
|
237
|
+
}, (0, _react2.jsx)(_toast.EuiToast, (0, _extends2.default)({
|
|
238
|
+
onClose: onClose,
|
|
239
|
+
onFocus: onMouseEnter,
|
|
240
|
+
onBlur: onMouseLeave
|
|
241
|
+
}, rest), text));
|
|
242
|
+
});
|
|
243
|
+
}, [toasts, toastIdToDismissedMap, dismissToast, onMouseEnter, onMouseLeave]);
|
|
244
|
+
var clearAllButton = (0, _react.useMemo)(function () {
|
|
245
|
+
if (toasts.length && showClearAllButtonAt && toasts.length >= showClearAllButtonAt) {
|
|
246
|
+
return (0, _react2.jsx)(_i18n.EuiI18n, {
|
|
247
|
+
key: "euiClearAllToasts",
|
|
248
|
+
tokens: ['euiGlobalToastList.clearAllToastsButtonAriaLabel', 'euiGlobalToastList.clearAllToastsButtonDisplayText'],
|
|
249
|
+
defaults: ['Clear all toast notifications', 'Clear all']
|
|
250
|
+
}, function (_ref2) {
|
|
251
|
+
var _ref3 = (0, _slicedToArray2.default)(_ref2, 2),
|
|
252
|
+
clearAllToastsButtonAriaLabel = _ref3[0],
|
|
253
|
+
clearAllToastsButtonDisplayText = _ref3[1];
|
|
254
|
+
return (0, _react2.jsx)(_global_toast_list_item.EuiGlobalToastListItem, {
|
|
255
|
+
isDismissed: false
|
|
256
|
+
}, (0, _react2.jsx)(_button.EuiButton, {
|
|
257
|
+
fill: true,
|
|
258
|
+
color: "text",
|
|
259
|
+
onClick: function onClick() {
|
|
260
|
+
toasts.forEach(function (toast) {
|
|
261
|
+
return dismissToastProp(toast);
|
|
262
|
+
});
|
|
263
|
+
onClearAllToasts === null || onClearAllToasts === void 0 ? void 0 : onClearAllToasts();
|
|
264
|
+
},
|
|
265
|
+
css: styles.euiGlobalToastListDismissButton,
|
|
266
|
+
"aria-label": clearAllToastsButtonAriaLabel,
|
|
267
|
+
"data-test-subj": "euiClearAllToastsButton"
|
|
268
|
+
}, clearAllToastsButtonDisplayText));
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
}, [showClearAllButtonAt, onClearAllToasts, toasts, dismissToastProp, styles]);
|
|
275
272
|
var classes = (0, _classnames.default)('euiGlobalToastList', className);
|
|
276
273
|
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
277
274
|
"aria-live": "polite",
|
|
@@ -279,6 +276,6 @@ var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
|
|
|
279
276
|
ref: listElement,
|
|
280
277
|
css: cssStyles,
|
|
281
278
|
className: classes
|
|
282
|
-
}, rest), renderedToasts);
|
|
279
|
+
}, rest), renderedToasts, clearAllButton);
|
|
283
280
|
};
|
|
284
281
|
exports.EuiGlobalToastList = EuiGlobalToastList;
|