@elastic/eui 93.3.0 → 93.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eui_charts_theme.d.ts +9 -0
- package/dist/eui_charts_theme.js +56 -14
- package/dist/eui_charts_theme.js.map +1 -1
- package/dist/eui_theme_dark.css +3 -0
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +3 -0
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/breadcrumbs/_breadcrumb_content.js +362 -0
- package/es/components/breadcrumbs/_breadcrumb_content.styles.js +48 -0
- package/es/components/breadcrumbs/breadcrumb.js +10 -327
- package/es/components/breadcrumbs/breadcrumb.styles.js +5 -27
- package/es/components/breadcrumbs/breadcrumbs.js +4 -4
- package/es/components/breadcrumbs/types.js +1 -0
- package/es/components/button/button_group/button_group.js +16 -2
- package/es/components/button/button_group/button_group.styles.js +1 -1
- package/es/components/button/button_group/button_group_button.js +59 -5
- package/es/components/button/button_group/button_group_button.styles.js +39 -3
- package/es/components/datagrid/body/cell/data_grid_cell.js +97 -58
- package/es/components/datagrid/body/cell/data_grid_cell_actions.js +24 -18
- package/es/components/datagrid/body/cell/data_grid_cell_popover.js +64 -56
- package/es/components/datagrid/body/cell/data_grid_cell_wrapper.js +32 -31
- package/es/components/datagrid/body/cell/index.js +1 -1
- package/es/components/datagrid/body/data_grid_body.js +13 -0
- package/es/components/datagrid/body/data_grid_body_custom.js +52 -36
- package/es/components/datagrid/body/data_grid_body_virtualized.js +84 -56
- package/es/components/datagrid/body/data_grid_row_manager.js +6 -4
- package/es/components/datagrid/body/footer/use_data_grid_footer.js +1 -2
- package/es/components/datagrid/body/header/data_grid_control_header_cell.js +5 -4
- package/es/components/datagrid/body/header/data_grid_header_cell.js +73 -53
- package/es/components/datagrid/body/header/data_grid_header_row.js +15 -551
- package/es/components/datagrid/body/header/use_data_grid_header.js +7 -6
- package/es/components/datagrid/controls/column_selector.js +126 -123
- package/es/components/datagrid/controls/column_sorting.js +605 -103
- package/es/components/datagrid/controls/column_sorting_draggable.js +24 -22
- package/es/components/datagrid/controls/display_selector.js +109 -107
- package/es/components/datagrid/data_grid.a11y.js +13 -12
- package/es/components/datagrid/data_grid.js +45 -22
- package/es/components/datagrid/utils/col_widths.js +12 -8
- package/es/components/datagrid/utils/focus.js +10 -8
- package/es/components/datagrid/utils/grid_height_width.js +31 -30
- package/es/components/datagrid/utils/ref.js +1 -1
- package/es/components/datagrid/utils/row_heights.js +2 -2
- package/es/components/datagrid/utils/sorting.js +29 -27
- package/es/components/date_picker/super_date_picker/super_date_picker.js +9 -0
- package/es/components/date_picker/super_date_picker/super_update_button.js +57 -29
- package/es/components/flex/flex_grid.js +22 -8
- package/es/components/flex/flex_grid.styles.js +13 -6
- package/es/components/flex/flex_group.js +10 -11
- package/es/components/flex/flex_item.js +9 -11
- package/es/components/flex/flex_item.styles.js +107 -122
- package/es/components/flyout/flyout.js +16 -18
- package/es/components/header/header_breadcrumbs/header_breadcrumbs.js +3 -5
- package/es/components/header/header_links/header_links.js +10 -2
- package/es/components/icon/icon.js +3 -3
- package/es/components/modal/confirm_modal.js +2 -1
- package/es/components/modal/modal.js +12 -3
- package/es/components/observer/resize_observer/resize_observer.js +15 -24
- package/es/components/panel/panel.js +2 -3
- package/es/components/resizable_container/resizable_button.js +2 -3
- package/es/components/resizable_container/resizable_collapse_button.js +2 -3
- package/es/components/resizable_container/resizable_container.js +1 -2
- package/es/components/resizable_container/resizable_container.styles.js +11 -14
- package/es/components/resizable_container/resizable_panel.js +6 -8
- package/es/components/resizable_container/resizable_panel.styles.js +18 -29
- package/es/components/selectable/selectable_list/selectable_list.js +26 -6
- package/es/components/spacer/spacer.js +2 -3
- package/es/components/toast/global_toast_list.js +70 -73
- package/es/components/toast/toast.js +27 -42
- package/es/components/toast/toast.styles.js +2 -17
- package/es/components/tool_tip/icon_tip.js +4 -3
- package/es/global_styling/mixins/_color.js +60 -32
- package/es/global_styling/mixins/_padding.js +60 -16
- package/es/services/color/eui_palettes.js +21 -13
- package/es/services/color/index.js +1 -1
- package/es/services/hooks/index.js +1 -0
- package/es/services/hooks/useDeepEqual.js +23 -0
- package/es/services/index.js +1 -1
- package/es/services/theme/style_memoization.js +1 -3
- package/eui.d.ts +2558 -2470
- package/i18ntokens.json +297 -279
- package/lib/components/breadcrumbs/_breadcrumb_content.js +372 -0
- package/lib/components/breadcrumbs/_breadcrumb_content.styles.js +55 -0
- package/lib/components/breadcrumbs/breadcrumb.js +11 -331
- package/lib/components/breadcrumbs/breadcrumb.styles.js +5 -29
- package/lib/components/breadcrumbs/breadcrumbs.js +3 -3
- package/lib/components/breadcrumbs/types.js +5 -0
- package/lib/components/button/button_group/button_group.js +16 -2
- package/lib/components/button/button_group/button_group.styles.js +1 -1
- package/lib/components/button/button_group/button_group_button.js +59 -5
- package/lib/components/button/button_group/button_group_button.styles.js +45 -11
- package/lib/components/datagrid/body/cell/data_grid_cell.js +95 -57
- package/lib/components/datagrid/body/cell/data_grid_cell_actions.js +24 -18
- package/lib/components/datagrid/body/cell/data_grid_cell_popover.js +63 -55
- package/lib/components/datagrid/body/cell/data_grid_cell_wrapper.js +32 -31
- package/lib/components/datagrid/body/cell/index.js +2 -2
- package/lib/components/datagrid/body/data_grid_body.js +13 -0
- package/lib/components/datagrid/body/data_grid_body_custom.js +51 -35
- package/lib/components/datagrid/body/data_grid_body_virtualized.js +83 -55
- package/lib/components/datagrid/body/data_grid_row_manager.js +5 -3
- package/lib/components/datagrid/body/footer/use_data_grid_footer.js +1 -2
- package/lib/components/datagrid/body/header/data_grid_control_header_cell.js +8 -4
- package/lib/components/datagrid/body/header/data_grid_header_cell.js +72 -52
- package/lib/components/datagrid/body/header/data_grid_header_row.js +14 -550
- package/lib/components/datagrid/body/header/use_data_grid_header.js +7 -6
- package/lib/components/datagrid/controls/column_selector.js +126 -123
- package/lib/components/datagrid/controls/column_sorting.js +615 -110
- package/lib/components/datagrid/controls/column_sorting_draggable.js +27 -22
- package/lib/components/datagrid/controls/display_selector.js +109 -107
- package/lib/components/datagrid/data_grid.a11y.js +13 -12
- package/lib/components/datagrid/data_grid.js +43 -20
- package/lib/components/datagrid/utils/col_widths.js +12 -8
- package/lib/components/datagrid/utils/focus.js +10 -8
- package/lib/components/datagrid/utils/grid_height_width.js +29 -28
- package/lib/components/datagrid/utils/ref.js +1 -1
- package/lib/components/datagrid/utils/row_heights.js +1 -1
- package/lib/components/datagrid/utils/sorting.js +31 -29
- package/lib/components/date_picker/super_date_picker/super_date_picker.js +9 -0
- package/lib/components/date_picker/super_date_picker/super_update_button.js +57 -29
- package/lib/components/flex/flex_grid.js +23 -7
- package/lib/components/flex/flex_grid.styles.js +13 -6
- package/lib/components/flex/flex_group.js +10 -10
- package/lib/components/flex/flex_item.js +13 -13
- package/lib/components/flex/flex_item.styles.js +107 -122
- package/lib/components/flyout/flyout.js +16 -18
- package/lib/components/header/header_breadcrumbs/header_breadcrumbs.js +3 -5
- package/lib/components/header/header_links/header_links.js +10 -2
- package/lib/components/icon/icon.js +3 -3
- package/lib/components/modal/confirm_modal.js +2 -1
- package/lib/components/modal/modal.js +12 -3
- package/lib/components/observer/resize_observer/resize_observer.js +15 -24
- package/lib/components/panel/panel.js +1 -2
- package/lib/components/resizable_container/resizable_button.js +1 -2
- package/lib/components/resizable_container/resizable_collapse_button.js +1 -2
- package/lib/components/resizable_container/resizable_container.js +1 -2
- package/lib/components/resizable_container/resizable_container.styles.js +11 -14
- package/lib/components/resizable_container/resizable_panel.js +3 -5
- package/lib/components/resizable_container/resizable_panel.styles.js +17 -28
- package/lib/components/selectable/selectable_list/selectable_list.js +26 -6
- package/lib/components/spacer/spacer.js +1 -2
- package/lib/components/toast/global_toast_list.js +68 -71
- package/lib/components/toast/toast.js +25 -40
- package/lib/components/toast/toast.styles.js +11 -25
- package/lib/components/tool_tip/icon_tip.js +4 -3
- package/lib/global_styling/mixins/_color.js +65 -40
- package/lib/global_styling/mixins/_padding.js +66 -25
- package/lib/services/color/eui_palettes.js +24 -14
- package/lib/services/color/index.js +14 -0
- package/lib/services/hooks/index.js +11 -0
- package/lib/services/hooks/useDeepEqual.js +30 -0
- package/lib/services/index.js +15 -1
- package/lib/services/theme/style_memoization.js +1 -3
- package/optimize/es/components/breadcrumbs/_breadcrumb_content.js +153 -0
- package/optimize/es/components/breadcrumbs/_breadcrumb_content.styles.js +48 -0
- package/optimize/es/components/breadcrumbs/breadcrumb.js +10 -110
- package/optimize/es/components/breadcrumbs/breadcrumb.styles.js +5 -27
- package/optimize/es/components/breadcrumbs/breadcrumbs.js +4 -4
- package/optimize/es/components/breadcrumbs/types.js +1 -0
- package/optimize/es/components/button/button_group/button_group.js +2 -2
- package/optimize/es/components/button/button_group/button_group.styles.js +1 -1
- package/optimize/es/components/button/button_group/button_group_button.js +36 -4
- package/optimize/es/components/button/button_group/button_group_button.styles.js +39 -3
- package/optimize/es/components/datagrid/body/cell/data_grid_cell.js +80 -55
- package/optimize/es/components/datagrid/body/cell/data_grid_cell_actions.js +24 -18
- package/optimize/es/components/datagrid/body/cell/data_grid_cell_popover.js +64 -56
- package/optimize/es/components/datagrid/body/cell/data_grid_cell_wrapper.js +32 -31
- package/optimize/es/components/datagrid/body/cell/index.js +1 -1
- package/optimize/es/components/datagrid/body/data_grid_body_custom.js +39 -36
- package/optimize/es/components/datagrid/body/data_grid_body_virtualized.js +69 -49
- package/optimize/es/components/datagrid/body/data_grid_row_manager.js +6 -4
- package/optimize/es/components/datagrid/body/footer/use_data_grid_footer.js +1 -2
- package/optimize/es/components/datagrid/body/header/data_grid_control_header_cell.js +4 -3
- package/optimize/es/components/datagrid/body/header/data_grid_header_cell.js +65 -49
- package/optimize/es/components/datagrid/body/header/data_grid_header_row.js +15 -13
- package/optimize/es/components/datagrid/body/header/use_data_grid_header.js +7 -6
- package/optimize/es/components/datagrid/controls/column_selector.js +126 -123
- package/optimize/es/components/datagrid/controls/column_sorting.js +121 -103
- package/optimize/es/components/datagrid/controls/column_sorting_draggable.js +24 -22
- package/optimize/es/components/datagrid/controls/display_selector.js +109 -107
- package/optimize/es/components/datagrid/data_grid.a11y.js +13 -12
- package/optimize/es/components/datagrid/data_grid.js +45 -22
- package/optimize/es/components/datagrid/utils/col_widths.js +9 -5
- package/optimize/es/components/datagrid/utils/focus.js +10 -8
- package/optimize/es/components/datagrid/utils/grid_height_width.js +31 -30
- package/optimize/es/components/datagrid/utils/ref.js +1 -1
- package/optimize/es/components/datagrid/utils/row_heights.js +2 -2
- package/optimize/es/components/datagrid/utils/sorting.js +29 -27
- package/optimize/es/components/date_picker/super_date_picker/super_update_button.js +49 -29
- package/optimize/es/components/flex/flex_grid.js +19 -8
- package/optimize/es/components/flex/flex_grid.styles.js +13 -6
- package/optimize/es/components/flex/flex_group.js +9 -10
- package/optimize/es/components/flex/flex_item.js +9 -11
- package/optimize/es/components/flex/flex_item.styles.js +107 -122
- package/optimize/es/components/flyout/flyout.js +16 -18
- package/optimize/es/components/header/header_breadcrumbs/header_breadcrumbs.js +3 -5
- package/optimize/es/components/header/header_links/header_links.js +3 -2
- package/optimize/es/components/icon/icon.js +3 -3
- package/optimize/es/components/modal/confirm_modal.js +2 -1
- package/optimize/es/components/modal/modal.js +6 -2
- package/optimize/es/components/observer/resize_observer/resize_observer.js +15 -24
- package/optimize/es/components/panel/panel.js +2 -3
- package/optimize/es/components/resizable_container/resizable_button.js +2 -3
- package/optimize/es/components/resizable_container/resizable_collapse_button.js +2 -3
- package/optimize/es/components/resizable_container/resizable_container.js +1 -2
- package/optimize/es/components/resizable_container/resizable_container.styles.js +11 -14
- package/optimize/es/components/resizable_container/resizable_panel.js +6 -8
- package/optimize/es/components/resizable_container/resizable_panel.styles.js +18 -26
- package/optimize/es/components/selectable/selectable_list/selectable_list.js +26 -6
- package/optimize/es/components/spacer/spacer.js +2 -3
- package/optimize/es/components/toast/global_toast_list.js +70 -73
- package/optimize/es/components/toast/toast.js +27 -42
- package/optimize/es/components/toast/toast.styles.js +2 -17
- package/optimize/es/components/tool_tip/icon_tip.js +4 -3
- package/optimize/es/global_styling/mixins/_color.js +57 -32
- package/optimize/es/global_styling/mixins/_padding.js +52 -16
- package/optimize/es/services/color/eui_palettes.js +21 -13
- package/optimize/es/services/color/index.js +1 -1
- package/optimize/es/services/hooks/index.js +1 -0
- package/optimize/es/services/hooks/useDeepEqual.js +23 -0
- package/optimize/es/services/index.js +1 -1
- package/optimize/es/services/theme/style_memoization.js +1 -3
- package/optimize/lib/components/breadcrumbs/_breadcrumb_content.js +163 -0
- package/optimize/lib/components/breadcrumbs/_breadcrumb_content.styles.js +55 -0
- package/optimize/lib/components/breadcrumbs/breadcrumb.js +10 -113
- package/optimize/lib/components/breadcrumbs/breadcrumb.styles.js +5 -29
- package/optimize/lib/components/breadcrumbs/breadcrumbs.js +3 -3
- package/optimize/lib/components/breadcrumbs/types.js +5 -0
- package/optimize/lib/components/button/button_group/button_group.js +2 -2
- package/optimize/lib/components/button/button_group/button_group.styles.js +1 -1
- package/optimize/lib/components/button/button_group/button_group_button.js +37 -5
- package/optimize/lib/components/button/button_group/button_group_button.styles.js +45 -11
- package/optimize/lib/components/datagrid/body/cell/data_grid_cell.js +78 -54
- package/optimize/lib/components/datagrid/body/cell/data_grid_cell_actions.js +24 -18
- package/optimize/lib/components/datagrid/body/cell/data_grid_cell_popover.js +63 -55
- package/optimize/lib/components/datagrid/body/cell/data_grid_cell_wrapper.js +32 -31
- package/optimize/lib/components/datagrid/body/cell/index.js +2 -2
- package/optimize/lib/components/datagrid/body/data_grid_body_custom.js +38 -35
- package/optimize/lib/components/datagrid/body/data_grid_body_virtualized.js +70 -50
- package/optimize/lib/components/datagrid/body/data_grid_row_manager.js +5 -3
- package/optimize/lib/components/datagrid/body/footer/use_data_grid_footer.js +1 -2
- package/optimize/lib/components/datagrid/body/header/data_grid_control_header_cell.js +8 -4
- package/optimize/lib/components/datagrid/body/header/data_grid_header_cell.js +65 -49
- package/optimize/lib/components/datagrid/body/header/data_grid_header_row.js +14 -12
- package/optimize/lib/components/datagrid/body/header/use_data_grid_header.js +7 -6
- package/optimize/lib/components/datagrid/controls/column_selector.js +126 -123
- package/optimize/lib/components/datagrid/controls/column_sorting.js +125 -107
- package/optimize/lib/components/datagrid/controls/column_sorting_draggable.js +27 -22
- package/optimize/lib/components/datagrid/controls/display_selector.js +109 -107
- package/optimize/lib/components/datagrid/data_grid.a11y.js +13 -12
- package/optimize/lib/components/datagrid/data_grid.js +43 -20
- package/optimize/lib/components/datagrid/utils/col_widths.js +9 -5
- package/optimize/lib/components/datagrid/utils/focus.js +10 -8
- package/optimize/lib/components/datagrid/utils/grid_height_width.js +29 -28
- package/optimize/lib/components/datagrid/utils/ref.js +1 -1
- package/optimize/lib/components/datagrid/utils/row_heights.js +1 -1
- package/optimize/lib/components/datagrid/utils/sorting.js +31 -29
- package/optimize/lib/components/date_picker/super_date_picker/super_update_button.js +49 -29
- package/optimize/lib/components/flex/flex_grid.js +21 -7
- package/optimize/lib/components/flex/flex_grid.styles.js +13 -6
- package/optimize/lib/components/flex/flex_group.js +9 -9
- package/optimize/lib/components/flex/flex_item.js +13 -13
- package/optimize/lib/components/flex/flex_item.styles.js +107 -122
- package/optimize/lib/components/flyout/flyout.js +16 -18
- package/optimize/lib/components/header/header_breadcrumbs/header_breadcrumbs.js +3 -5
- package/optimize/lib/components/header/header_links/header_links.js +3 -2
- package/optimize/lib/components/icon/icon.js +3 -3
- package/optimize/lib/components/modal/confirm_modal.js +2 -1
- package/optimize/lib/components/modal/modal.js +6 -2
- package/optimize/lib/components/observer/resize_observer/resize_observer.js +15 -24
- package/optimize/lib/components/panel/panel.js +1 -2
- package/optimize/lib/components/resizable_container/resizable_button.js +1 -2
- package/optimize/lib/components/resizable_container/resizable_collapse_button.js +1 -2
- package/optimize/lib/components/resizable_container/resizable_container.js +1 -2
- package/optimize/lib/components/resizable_container/resizable_container.styles.js +11 -14
- package/optimize/lib/components/resizable_container/resizable_panel.js +3 -5
- package/optimize/lib/components/resizable_container/resizable_panel.styles.js +17 -26
- package/optimize/lib/components/selectable/selectable_list/selectable_list.js +26 -6
- package/optimize/lib/components/spacer/spacer.js +1 -2
- package/optimize/lib/components/toast/global_toast_list.js +68 -71
- package/optimize/lib/components/toast/toast.js +25 -40
- package/optimize/lib/components/toast/toast.styles.js +11 -25
- package/optimize/lib/components/tool_tip/icon_tip.js +4 -3
- package/optimize/lib/global_styling/mixins/_color.js +63 -40
- package/optimize/lib/global_styling/mixins/_padding.js +59 -25
- package/optimize/lib/services/color/eui_palettes.js +24 -14
- package/optimize/lib/services/color/index.js +14 -0
- package/optimize/lib/services/hooks/index.js +11 -0
- package/optimize/lib/services/hooks/useDeepEqual.js +30 -0
- package/optimize/lib/services/index.js +15 -1
- package/optimize/lib/services/theme/style_memoization.js +1 -3
- package/package.json +8 -11
- package/src/components/form/text_area/_text_area.scss +5 -0
- package/src/components/selectable/selectable_list/_selectable_list.scss +2 -0
- package/test-env/components/breadcrumbs/_breadcrumb_content.js +363 -0
- package/test-env/components/breadcrumbs/_breadcrumb_content.styles.js +55 -0
- package/test-env/components/breadcrumbs/breadcrumb.js +11 -326
- package/test-env/components/breadcrumbs/breadcrumb.styles.js +5 -29
- package/test-env/components/breadcrumbs/breadcrumbs.js +3 -3
- package/test-env/components/breadcrumbs/types.js +5 -0
- package/test-env/components/button/button_group/button_group.js +16 -2
- package/test-env/components/button/button_group/button_group.styles.js +1 -1
- package/test-env/components/button/button_group/button_group_button.js +56 -5
- package/test-env/components/button/button_group/button_group_button.styles.js +45 -11
- package/test-env/components/datagrid/body/cell/data_grid_cell.js +95 -57
- package/test-env/components/datagrid/body/cell/data_grid_cell_actions.js +24 -18
- package/test-env/components/datagrid/body/cell/data_grid_cell_popover.js +63 -55
- package/test-env/components/datagrid/body/cell/data_grid_cell_wrapper.js +32 -31
- package/test-env/components/datagrid/body/cell/index.js +2 -2
- package/test-env/components/datagrid/body/data_grid_body.js +13 -0
- package/test-env/components/datagrid/body/data_grid_body_custom.js +51 -35
- package/test-env/components/datagrid/body/data_grid_body_virtualized.js +83 -55
- package/test-env/components/datagrid/body/data_grid_row_manager.js +5 -3
- package/test-env/components/datagrid/body/footer/use_data_grid_footer.js +1 -2
- package/test-env/components/datagrid/body/header/data_grid_control_header_cell.js +8 -4
- package/test-env/components/datagrid/body/header/data_grid_header_cell.js +72 -52
- package/test-env/components/datagrid/body/header/data_grid_header_row.js +14 -550
- package/test-env/components/datagrid/body/header/use_data_grid_header.js +7 -6
- package/test-env/components/datagrid/controls/column_selector.js +126 -123
- package/test-env/components/datagrid/controls/column_sorting.js +607 -106
- package/test-env/components/datagrid/controls/column_sorting_draggable.js +27 -22
- package/test-env/components/datagrid/controls/display_selector.js +109 -107
- package/test-env/components/datagrid/data_grid.a11y.js +13 -12
- package/test-env/components/datagrid/data_grid.js +43 -20
- package/test-env/components/datagrid/utils/col_widths.js +9 -5
- package/test-env/components/datagrid/utils/focus.js +10 -8
- package/test-env/components/datagrid/utils/grid_height_width.js +29 -28
- package/test-env/components/datagrid/utils/ref.js +1 -1
- package/test-env/components/datagrid/utils/row_heights.js +1 -1
- package/test-env/components/datagrid/utils/sorting.js +31 -29
- package/test-env/components/date_picker/super_date_picker/super_date_picker.js +9 -0
- package/test-env/components/date_picker/super_date_picker/super_update_button.js +57 -29
- package/test-env/components/flex/flex_grid.js +21 -7
- package/test-env/components/flex/flex_grid.styles.js +13 -6
- package/test-env/components/flex/flex_group.js +10 -10
- package/test-env/components/flex/flex_item.js +13 -13
- package/test-env/components/flex/flex_item.styles.js +107 -122
- package/test-env/components/header/header_breadcrumbs/header_breadcrumbs.js +3 -5
- package/test-env/components/header/header_links/header_links.js +10 -2
- package/test-env/components/modal/confirm_modal.js +2 -1
- package/test-env/components/modal/modal.js +12 -3
- package/test-env/components/panel/panel.js +1 -2
- package/test-env/components/resizable_container/resizable_button.js +1 -2
- package/test-env/components/resizable_container/resizable_collapse_button.js +1 -2
- package/test-env/components/resizable_container/resizable_container.js +1 -2
- package/test-env/components/resizable_container/resizable_container.styles.js +11 -14
- package/test-env/components/resizable_container/resizable_panel.js +3 -5
- package/test-env/components/resizable_container/resizable_panel.styles.js +17 -26
- package/test-env/components/selectable/selectable_list/selectable_list.js +26 -6
- package/test-env/components/spacer/spacer.js +1 -2
- package/test-env/components/toast/global_toast_list.js +68 -71
- package/test-env/components/toast/toast.js +25 -40
- package/test-env/components/toast/toast.styles.js +11 -25
- package/test-env/components/tool_tip/icon_tip.js +4 -3
- package/test-env/global_styling/mixins/_color.js +63 -40
- package/test-env/global_styling/mixins/_padding.js +59 -25
- package/test-env/services/color/eui_palettes.js +24 -14
- package/test-env/services/color/index.js +14 -0
- package/test-env/services/hooks/index.js +11 -0
- package/test-env/services/hooks/useDeepEqual.js +30 -0
- package/test-env/services/index.js +15 -1
- package/test-env/services/theme/style_memoization.js +1 -3
- package/src/themes/charts/theme.scss +0 -5
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { css } from '@emotion/react';
|
|
10
|
+
import { transparentize } from '../../services/color';
|
|
11
|
+
import { euiFontSize, euiTextTruncate, euiFocusRing, logicalCSS, logicalBorderRadiusCSS, mathWithUnits } from '../../global_styling';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Styles cast to inner <a>, <button>, <span> elements
|
|
15
|
+
*/
|
|
16
|
+
export var euiBreadcrumbContentStyles = function euiBreadcrumbContentStyles(euiThemeContext) {
|
|
17
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
18
|
+
return {
|
|
19
|
+
euiBreadcrumb__content: /*#__PURE__*/css("font-weight:", euiTheme.font.weight.medium, ";text-align:center;vertical-align:baseline;;label:euiBreadcrumb__content;"),
|
|
20
|
+
// Truncation styles
|
|
21
|
+
isTruncated: /*#__PURE__*/css(euiTextTruncate(mathWithUnits(euiTheme.size.base, function (x) {
|
|
22
|
+
return x * 10;
|
|
23
|
+
})), ";;label:isTruncated;"),
|
|
24
|
+
isTruncatedLast: /*#__PURE__*/css(euiTextTruncate('none'), ";;label:isTruncatedLast;"),
|
|
25
|
+
// Types
|
|
26
|
+
page: /*#__PURE__*/css("&:is(a):focus{", euiFocusRing(euiThemeContext, 'inset'), ";}&:is(button):focus{", euiFocusRing(euiThemeContext, 'center'), ";};label:page;"),
|
|
27
|
+
application: /*#__PURE__*/css(euiFontSize(euiThemeContext, 'xs'), " background-color:", transparentize(euiTheme.colors.darkestShade, 0.2), ";clip-path:polygon(\n 0 0,\n calc(100% - ", euiTheme.size.s, ") 0,\n 100% 50%,\n calc(100% - ", euiTheme.size.s, ") 100%,\n 0 100%,\n ", euiTheme.size.s, " 50%\n );color:", euiTheme.colors.darkestShade, ";line-height:", euiTheme.size.base, ";", logicalCSS('padding-vertical', euiTheme.size.xs), " ", logicalCSS('padding-horizontal', euiTheme.size.base), " &:is(a),&:is(button){background-color:", transparentize(euiTheme.colors.primary, 0.2), ";color:", euiTheme.colors.link, ";:focus{", euiFocusRing(euiThemeContext, 'inset'), " :focus-visible{border-radius:", euiTheme.border.radius.medium, ";clip-path:none;}}};label:application;"),
|
|
28
|
+
applicationStyles: {
|
|
29
|
+
onlyChild: /*#__PURE__*/css("border-radius:", euiTheme.border.radius.medium, ";clip-path:none;", logicalCSS('padding-horizontal', euiTheme.size.m), ";;label:onlyChild;"),
|
|
30
|
+
firstChild: /*#__PURE__*/css(logicalBorderRadiusCSS("".concat(euiTheme.border.radius.medium, " 0 0 ").concat(euiTheme.border.radius.medium), true), " clip-path:polygon(\n 0 0,\n calc(100% - ", euiTheme.size.s, ") 0,\n 100% 50%,\n calc(100% - ", euiTheme.size.s, ") 100%,\n 0 100%\n );", logicalCSS('padding-left', euiTheme.size.m), ";;label:firstChild;"),
|
|
31
|
+
lastChild: /*#__PURE__*/css(logicalBorderRadiusCSS("0 ".concat(euiTheme.border.radius.medium, " ").concat(euiTheme.border.radius.medium, " 0"), true), " clip-path:polygon(\n 0 0,\n 100% 0,\n 100% 100%,\n 0 100%,\n ", euiTheme.size.s, " 50%\n );", logicalCSS('padding-right', euiTheme.size.m), ";;label:lastChild;")
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export var euiBreadcrumbPopoverStyles = function euiBreadcrumbPopoverStyles(_ref) {
|
|
36
|
+
var euiTheme = _ref.euiTheme;
|
|
37
|
+
return {
|
|
38
|
+
euiBreadcrumb__popoverButton: /*#__PURE__*/css("max-inline-size:100%;display:inline-flex;align-items:center;gap:", euiTheme.size.xs, ";;label:euiBreadcrumb__popoverButton;"),
|
|
39
|
+
euiBreadcrumb__popoverTruncation: /*#__PURE__*/css(";label:euiBreadcrumb__popoverTruncation;"),
|
|
40
|
+
popoverWrapper: {
|
|
41
|
+
euiBreadcrumb__popoverWrapper: /*#__PURE__*/css(";label:euiBreadcrumb__popoverWrapper;"),
|
|
42
|
+
page: /*#__PURE__*/css("max-inline-size:calc(\n 100% - ", mathWithUnits(euiTheme.size.base, function (x) {
|
|
43
|
+
return x + 1;
|
|
44
|
+
}), "\n );;label:page;"),
|
|
45
|
+
application: null
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["children", "className", "type", "truncate"]
|
|
5
|
-
_excluded2 = ["text", "truncate", "type", "href", "rel", "onClick", "popoverContent", "popoverProps", "className", "color", "isFirstBreadcrumb", "isLastBreadcrumb", "isOnlyBreadcrumb", "highlightLastBreadcrumb", "truncateLastBreadcrumb"];
|
|
3
|
+
var _excluded = ["children", "className", "type", "truncate"];
|
|
6
4
|
/*
|
|
7
5
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
8
6
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -11,18 +9,12 @@ var _excluded = ["children", "className", "type", "truncate"],
|
|
|
11
9
|
* Side Public License, v 1.
|
|
12
10
|
*/
|
|
13
11
|
|
|
14
|
-
import React
|
|
12
|
+
import React from 'react';
|
|
15
13
|
import classNames from 'classnames';
|
|
16
|
-
import {
|
|
17
|
-
import { EuiInnerText } from '../inner_text';
|
|
18
|
-
import { EuiTextColor } from '../text';
|
|
19
|
-
import { EuiLink } from '../link';
|
|
20
|
-
import { EuiPopover } from '../popover';
|
|
21
|
-
import { EuiIcon } from '../icon';
|
|
14
|
+
import { useEuiMemoizedStyles } from '../../services';
|
|
22
15
|
import { useEuiI18n } from '../i18n';
|
|
23
|
-
import {
|
|
24
|
-
|
|
25
|
-
// Used internally only by the parent EuiBreadcrumbs
|
|
16
|
+
import { EuiBreadcrumbContent } from './_breadcrumb_content';
|
|
17
|
+
import { euiBreadcrumbStyles } from './breadcrumb.styles';
|
|
26
18
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
27
19
|
export var EuiBreadcrumb = function EuiBreadcrumb(_ref) {
|
|
28
20
|
var children = _ref.children,
|
|
@@ -31,8 +23,7 @@ export var EuiBreadcrumb = function EuiBreadcrumb(_ref) {
|
|
|
31
23
|
truncate = _ref.truncate,
|
|
32
24
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
33
25
|
var classes = classNames('euiBreadcrumb', className);
|
|
34
|
-
var
|
|
35
|
-
var styles = euiBreadcrumbStyles(euiTheme);
|
|
26
|
+
var styles = useEuiMemoizedStyles(euiBreadcrumbStyles);
|
|
36
27
|
var cssStyles = [styles.euiBreadcrumb, styles[type], truncate && styles.isTruncated];
|
|
37
28
|
return ___EmotionJSX("li", _extends({
|
|
38
29
|
className: classes,
|
|
@@ -40,102 +31,11 @@ export var EuiBreadcrumb = function EuiBreadcrumb(_ref) {
|
|
|
40
31
|
"data-test-subj": "euiBreadcrumb"
|
|
41
32
|
}, rest), children);
|
|
42
33
|
};
|
|
43
|
-
export var
|
|
44
|
-
var
|
|
45
|
-
truncate = _ref2.truncate,
|
|
46
|
-
type = _ref2.type,
|
|
47
|
-
href = _ref2.href,
|
|
48
|
-
rel = _ref2.rel,
|
|
49
|
-
onClick = _ref2.onClick,
|
|
50
|
-
popoverContent = _ref2.popoverContent,
|
|
51
|
-
popoverProps = _ref2.popoverProps,
|
|
52
|
-
className = _ref2.className,
|
|
53
|
-
color = _ref2.color,
|
|
34
|
+
export var EuiBreadcrumbCollapsed = function EuiBreadcrumbCollapsed(_ref2) {
|
|
35
|
+
var children = _ref2.children,
|
|
54
36
|
isFirstBreadcrumb = _ref2.isFirstBreadcrumb,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
highlightLastBreadcrumb = _ref2.highlightLastBreadcrumb,
|
|
58
|
-
truncateLastBreadcrumb = _ref2.truncateLastBreadcrumb,
|
|
59
|
-
rest = _objectWithoutProperties(_ref2, _excluded2);
|
|
60
|
-
var classes = classNames('euiBreadcrumb__content', className);
|
|
61
|
-
var euiTheme = useEuiTheme();
|
|
62
|
-
var styles = euiBreadcrumbContentStyles(euiTheme);
|
|
63
|
-
var cssStyles = [styles.euiBreadcrumb__content, styles[type], truncate && !truncateLastBreadcrumb && styles.isTruncated, truncateLastBreadcrumb && styles.isTruncatedLast];
|
|
64
|
-
if (type === 'application') {
|
|
65
|
-
if (isOnlyBreadcrumb) {
|
|
66
|
-
cssStyles.push(styles.applicationStyles.onlyChild);
|
|
67
|
-
} else if (isFirstBreadcrumb) {
|
|
68
|
-
cssStyles.push(styles.applicationStyles.firstChild);
|
|
69
|
-
} else if (isLastBreadcrumb) {
|
|
70
|
-
cssStyles.push(styles.applicationStyles.lastChild);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
var isInteractiveBreadcrumb = href || onClick;
|
|
74
|
-
var linkColor = color || (highlightLastBreadcrumb ? 'text' : 'subdued');
|
|
75
|
-
var plainTextColor = highlightLastBreadcrumb ? 'default' : 'subdued'; // Does not inherit `color` prop
|
|
76
|
-
var ariaCurrent = highlightLastBreadcrumb ? 'page' : undefined;
|
|
77
|
-
var isPopoverBreadcrumb = !!popoverContent;
|
|
78
|
-
var _useState = useState(false),
|
|
79
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
80
|
-
isPopoverOpen = _useState2[0],
|
|
81
|
-
setIsPopoverOpen = _useState2[1];
|
|
82
|
-
var popoverAriaLabel = useEuiI18n('euiBreadcrumb.popoverAriaLabel', 'Clicking this button will toggle a popover dialog.');
|
|
83
|
-
return ___EmotionJSX(EuiInnerText, null, function (ref, innerText) {
|
|
84
|
-
var title = innerText === '' ? undefined : innerText;
|
|
85
|
-
var baseProps = {
|
|
86
|
-
ref: ref,
|
|
87
|
-
title: title,
|
|
88
|
-
'aria-current': ariaCurrent
|
|
89
|
-
};
|
|
90
|
-
var styleProps = {
|
|
91
|
-
className: classes,
|
|
92
|
-
css: cssStyles
|
|
93
|
-
};
|
|
94
|
-
if (isPopoverBreadcrumb) {
|
|
95
|
-
var _closePopover = function _closePopover() {
|
|
96
|
-
return setIsPopoverOpen(false);
|
|
97
|
-
};
|
|
98
|
-
return ___EmotionJSX(EuiPopover, _extends({}, popoverProps, {
|
|
99
|
-
isOpen: isPopoverOpen,
|
|
100
|
-
closePopover: _closePopover,
|
|
101
|
-
css: !isLastBreadcrumb && styles.euiBreadcrumb__popoverWrapper,
|
|
102
|
-
button: ___EmotionJSX(EuiLink, _extends({}, baseProps, {
|
|
103
|
-
color: linkColor,
|
|
104
|
-
css: styles.euiBreadcrumb__popoverButton
|
|
105
|
-
// Avoid passing href and onClick - should only toggle the popover
|
|
106
|
-
,
|
|
107
|
-
onClick: function onClick() {
|
|
108
|
-
return setIsPopoverOpen(function (isOpen) {
|
|
109
|
-
return !isOpen;
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
}, rest), ___EmotionJSX("span", styleProps, text), ___EmotionJSX(EuiIcon, {
|
|
113
|
-
type: "arrowDown",
|
|
114
|
-
size: "s",
|
|
115
|
-
"aria-label": " - ".concat(popoverAriaLabel)
|
|
116
|
-
}))
|
|
117
|
-
}), typeof popoverContent === 'function' ? popoverContent(_closePopover) : popoverContent);
|
|
118
|
-
} else if (isInteractiveBreadcrumb) {
|
|
119
|
-
return ___EmotionJSX(EuiLink, _extends({}, baseProps, styleProps, {
|
|
120
|
-
color: linkColor,
|
|
121
|
-
onClick: onClick,
|
|
122
|
-
href: href,
|
|
123
|
-
rel: rel
|
|
124
|
-
}, rest), text);
|
|
125
|
-
} else {
|
|
126
|
-
return ___EmotionJSX(EuiTextColor, {
|
|
127
|
-
color: plainTextColor,
|
|
128
|
-
cloneElement: true
|
|
129
|
-
}, ___EmotionJSX("span", _extends({}, baseProps, styleProps, rest), text));
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
};
|
|
133
|
-
export var EuiBreadcrumbCollapsed = function EuiBreadcrumbCollapsed(_ref3) {
|
|
134
|
-
var children = _ref3.children,
|
|
135
|
-
isFirstBreadcrumb = _ref3.isFirstBreadcrumb,
|
|
136
|
-
type = _ref3.type;
|
|
137
|
-
var euiTheme = useEuiTheme();
|
|
138
|
-
var styles = euiBreadcrumbStyles(euiTheme);
|
|
37
|
+
type = _ref2.type;
|
|
38
|
+
var styles = useEuiMemoizedStyles(euiBreadcrumbStyles);
|
|
139
39
|
var cssStyles = [styles.isCollapsed];
|
|
140
40
|
var ariaLabel = useEuiI18n('euiBreadcrumb.collapsedBadge.ariaLabel', 'See collapsed breadcrumbs');
|
|
141
41
|
return ___EmotionJSX(EuiBreadcrumb, {
|
|
@@ -8,8 +8,11 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { css } from '@emotion/react';
|
|
11
|
-
import {
|
|
12
|
-
|
|
11
|
+
import { logicalCSS } from '../../global_styling';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Styles cast to <li> element
|
|
15
|
+
*/
|
|
13
16
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
14
17
|
name: "1k7t4ns-isCollapsed",
|
|
15
18
|
styles: "flex-shrink:0;label:isCollapsed;"
|
|
@@ -27,7 +30,6 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
|
27
30
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
28
31
|
};
|
|
29
32
|
export var euiBreadcrumbStyles = function euiBreadcrumbStyles(euiThemeContext) {
|
|
30
|
-
// Styles cast to <li> element
|
|
31
33
|
var euiTheme = euiThemeContext.euiTheme;
|
|
32
34
|
return {
|
|
33
35
|
euiBreadcrumb: /*#__PURE__*/css("align-items:center;display:flex;", logicalCSS(
|
|
@@ -39,28 +41,4 @@ export var euiBreadcrumbStyles = function euiBreadcrumbStyles(euiThemeContext) {
|
|
|
39
41
|
page: /*#__PURE__*/css("&:not(:last-of-type){&::after{background:", euiTheme.colors.lightShade, ";content:'';flex-shrink:0;", logicalCSS('margin-top', euiTheme.size.xs), " ", logicalCSS('margin-bottom', 0), " ", logicalCSS('margin-horizontal', euiTheme.size.s), " ", logicalCSS('height', euiTheme.size.base), " ", logicalCSS('width', '1px'), " transform:translateY(-1px) rotate(15deg);}};label:page;"),
|
|
40
42
|
application: /*#__PURE__*/css("&:not(:last-of-type){", logicalCSS('margin-right', "-".concat(euiTheme.size.xs)), ";};label:application;")
|
|
41
43
|
};
|
|
42
|
-
};
|
|
43
|
-
export var euiBreadcrumbContentStyles = function euiBreadcrumbContentStyles(euiThemeContext) {
|
|
44
|
-
// Styles cast to <a>, <span>, or collapsed <button> elements
|
|
45
|
-
var euiTheme = euiThemeContext.euiTheme;
|
|
46
|
-
return {
|
|
47
|
-
euiBreadcrumb__content: /*#__PURE__*/css("font-weight:", euiTheme.font.weight.medium, ";text-align:center;vertical-align:baseline;;label:euiBreadcrumb__content;"),
|
|
48
|
-
isTruncated: /*#__PURE__*/css(euiTextTruncate(mathWithUnits(euiTheme.size.base, function (x) {
|
|
49
|
-
return x * 10;
|
|
50
|
-
})), ";;label:isTruncated;"),
|
|
51
|
-
isTruncatedLast: /*#__PURE__*/css(euiTextTruncate('none'), ";;label:isTruncatedLast;"),
|
|
52
|
-
// Popover styles
|
|
53
|
-
euiBreadcrumb__popoverButton: /*#__PURE__*/css("max-inline-size:100%;display:inline-flex;align-items:center;gap:", euiTheme.size.xs, ";;label:euiBreadcrumb__popoverButton;"),
|
|
54
|
-
euiBreadcrumb__popoverWrapper: /*#__PURE__*/css("max-inline-size:calc(\n 100% - ", mathWithUnits(euiTheme.size.base, function (x) {
|
|
55
|
-
return x + 1;
|
|
56
|
-
}), "\n );;label:euiBreadcrumb__popoverWrapper;"),
|
|
57
|
-
// Types
|
|
58
|
-
page: /*#__PURE__*/css("&:is(a):focus{", euiFocusRing(euiThemeContext, 'inset'), ";}&:is(button):focus{", euiFocusRing(euiThemeContext, 'center'), ";};label:page;"),
|
|
59
|
-
application: /*#__PURE__*/css(euiFontSize(euiThemeContext, 'xs'), " background-color:", transparentize(euiTheme.colors.darkestShade, 0.2), ";clip-path:polygon(\n 0 0,\n calc(100% - ", euiTheme.size.s, ") 0,\n 100% 50%,\n calc(100% - ", euiTheme.size.s, ") 100%,\n 0 100%,\n ", euiTheme.size.s, " 50%\n );color:", euiTheme.colors.darkestShade, ";line-height:", euiTheme.size.base, ";", logicalCSS('padding-vertical', euiTheme.size.xs), " ", logicalCSS('padding-horizontal', euiTheme.size.base), " &:is(a),&:is(button){background-color:", transparentize(euiTheme.colors.primary, 0.2), ";color:", euiTheme.colors.link, ";:focus{", euiFocusRing(euiThemeContext, 'inset'), " :focus-visible{border-radius:", euiTheme.border.radius.medium, ";clip-path:none;}}};label:application;"),
|
|
60
|
-
applicationStyles: {
|
|
61
|
-
onlyChild: /*#__PURE__*/css("border-radius:", euiTheme.border.radius.medium, ";clip-path:none;", logicalCSS('padding-horizontal', euiTheme.size.m), ";;label:onlyChild;"),
|
|
62
|
-
firstChild: /*#__PURE__*/css(logicalBorderRadiusCSS("".concat(euiTheme.border.radius.medium, " 0 0 ").concat(euiTheme.border.radius.medium), true), " clip-path:polygon(\n 0 0,\n calc(100% - ", euiTheme.size.s, ") 0,\n 100% 50%,\n calc(100% - ", euiTheme.size.s, ") 100%,\n 0 100%\n );", logicalCSS('padding-left', euiTheme.size.m), ";;label:firstChild;"),
|
|
63
|
-
lastChild: /*#__PURE__*/css(logicalBorderRadiusCSS("0 ".concat(euiTheme.border.radius.medium, " ").concat(euiTheme.border.radius.medium, " 0"), true), " clip-path:polygon(\n 0 0,\n 100% 0,\n 100% 100%,\n 0 100%,\n ", euiTheme.size.s, " 50%\n );", logicalCSS('padding-right', euiTheme.size.m), ";;label:lastChild;")
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
44
|
};
|
|
@@ -13,8 +13,9 @@ var _excluded = ["breadcrumbs", "className", "responsive", "truncate", "max", "t
|
|
|
13
13
|
import React, { useMemo } from 'react';
|
|
14
14
|
import classNames from 'classnames';
|
|
15
15
|
import { useEuiI18n } from '../i18n';
|
|
16
|
-
import {
|
|
17
|
-
import { EuiBreadcrumb,
|
|
16
|
+
import { useEuiMemoizedStyles, useCurrentEuiBreakpoint } from '../../services';
|
|
17
|
+
import { EuiBreadcrumb, EuiBreadcrumbCollapsed } from './breadcrumb';
|
|
18
|
+
import { EuiBreadcrumbContent } from './_breadcrumb_content';
|
|
18
19
|
import { euiBreadcrumbsListStyles } from './breadcrumbs.styles';
|
|
19
20
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
20
21
|
var responsiveDefault = {
|
|
@@ -37,8 +38,7 @@ export var EuiBreadcrumbs = function EuiBreadcrumbs(_ref) {
|
|
|
37
38
|
lastBreadcrumbIsCurrentPage = _ref$lastBreadcrumbIs === void 0 ? true : _ref$lastBreadcrumbIs,
|
|
38
39
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
39
40
|
var ariaLabel = useEuiI18n('euiBreadcrumbs.nav.ariaLabel', 'Breadcrumbs');
|
|
40
|
-
var
|
|
41
|
-
var breadcrumbsListStyles = euiBreadcrumbsListStyles(euiTheme);
|
|
41
|
+
var breadcrumbsListStyles = useEuiMemoizedStyles(euiBreadcrumbsListStyles);
|
|
42
42
|
var cssBreadcrumbsListStyles = [breadcrumbsListStyles.euiBreadcrumbs__list, truncate && breadcrumbsListStyles.isTruncated];
|
|
43
43
|
var responsiveMax = useResponsiveMax(responsive, max);
|
|
44
44
|
var visibleBreadcrumbs = useMemo(function () {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -55,9 +55,9 @@ export var EuiButtonGroup = function EuiButtonGroup(_ref) {
|
|
|
55
55
|
}), ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("legend", null, legend)), ___EmotionJSX("div", {
|
|
56
56
|
css: cssStyles,
|
|
57
57
|
className: "euiButtonGroup__buttons"
|
|
58
|
-
}, options.map(function (option
|
|
58
|
+
}, options.map(function (option) {
|
|
59
59
|
return ___EmotionJSX(EuiButtonGroupButton, _extends({
|
|
60
|
-
key:
|
|
60
|
+
key: option.id,
|
|
61
61
|
isDisabled: isDisabled
|
|
62
62
|
}, option, {
|
|
63
63
|
onClick: typeIsSingle ? function () {
|
|
@@ -31,7 +31,7 @@ export var euiButtonGroupButtonsStyles = function euiButtonGroupButtonsStyles(eu
|
|
|
31
31
|
return {
|
|
32
32
|
// Base
|
|
33
33
|
euiButtonGroup__buttons: /*#__PURE__*/css(logicalCSS('max-width', '100%'), " display:flex;;label:euiButtonGroup__buttons;"),
|
|
34
|
-
fullWidth: /*#__PURE__*/css(logicalCSS('width', '100%'), " .euiButtonGroupButton{flex:1;};label:fullWidth;"),
|
|
34
|
+
fullWidth: /*#__PURE__*/css(logicalCSS('width', '100%'), " .euiButtonGroupButton,.euiButtonGroup__tooltipWrapper{flex:1;", logicalCSS('width', '100%'), ";};label:fullWidth;"),
|
|
35
35
|
// Sizes
|
|
36
36
|
m: /*#__PURE__*/css("border-radius:", euiTheme.border.radius.medium, ";;label:m;"),
|
|
37
37
|
s: /*#__PURE__*/css("border-radius:", euiTheme.border.radius.small, ";;label:s;"),
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
1
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["className", "id", "isDisabled", "isIconOnly", "isSelected", "label", "value", "size", "color"];
|
|
5
|
+
var _excluded = ["className", "id", "isDisabled", "isIconOnly", "isSelected", "label", "value", "size", "color", "toolTipContent", "toolTipProps"];
|
|
6
|
+
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; }
|
|
7
|
+
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
8
|
/*
|
|
6
9
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
7
10
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -17,6 +20,7 @@ import { useEuiButtonColorCSS } from '../../../themes/amsterdam/global_styling/m
|
|
|
17
20
|
import { useInnerText } from '../../inner_text';
|
|
18
21
|
import { EuiButtonDisplay } from '../button_display/_button_display';
|
|
19
22
|
import { euiButtonGroupButtonStyles, _compressedButtonFocusColor, _uncompressedButtonFocus } from './button_group_button.styles';
|
|
23
|
+
import { EuiToolTip } from '../../../components/tool_tip';
|
|
20
24
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
21
25
|
export var EuiButtonGroupButton = function EuiButtonGroupButton(_ref) {
|
|
22
26
|
var className = _ref.className,
|
|
@@ -30,17 +34,21 @@ export var EuiButtonGroupButton = function EuiButtonGroupButton(_ref) {
|
|
|
30
34
|
size = _ref.size,
|
|
31
35
|
_ref$color = _ref.color,
|
|
32
36
|
_color = _ref$color === void 0 ? 'primary' : _ref$color,
|
|
37
|
+
toolTipContent = _ref.toolTipContent,
|
|
38
|
+
toolTipProps = _ref.toolTipProps,
|
|
33
39
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
34
40
|
var isCompressed = size === 'compressed';
|
|
35
41
|
var color = isDisabled ? 'disabled' : _color;
|
|
36
42
|
var display = isSelected ? 'fill' : isCompressed ? 'empty' : 'base';
|
|
43
|
+
var hasToolTip = !!toolTipContent;
|
|
37
44
|
var euiTheme = useEuiTheme();
|
|
38
45
|
var buttonColorStyles = useEuiButtonColorCSS({
|
|
39
46
|
display: display
|
|
40
47
|
})[color];
|
|
41
48
|
var focusColorStyles = isCompressed ? _compressedButtonFocusColor(euiTheme, color) : _uncompressedButtonFocus(euiTheme);
|
|
42
49
|
var styles = euiButtonGroupButtonStyles(euiTheme);
|
|
43
|
-
var cssStyles = [styles.euiButtonGroupButton, isIconOnly && styles.iconOnly, styles[size],
|
|
50
|
+
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];
|
|
51
|
+
var tooltipWrapperStyles = [styles.tooltipWrapper, !isCompressed && styles.uncompressed[size]];
|
|
44
52
|
var contentStyles = [styles.content.euiButtonGroupButton__content, isCompressed && styles.content.compressed];
|
|
45
53
|
var textStyles = [isIconOnly ? styles.text.euiButtonGroupButton__iconOnly : styles.text.euiButtonGroupButton__text];
|
|
46
54
|
var buttonClasses = classNames('euiButtonGroupButton', {
|
|
@@ -57,7 +65,12 @@ export var EuiButtonGroupButton = function EuiButtonGroupButton(_ref) {
|
|
|
57
65
|
_useInnerText2 = _slicedToArray(_useInnerText, 2),
|
|
58
66
|
buttonTextRef = _useInnerText2[0],
|
|
59
67
|
innerText = _useInnerText2[1];
|
|
60
|
-
return ___EmotionJSX(
|
|
68
|
+
return ___EmotionJSX(EuiButtonGroupButtonWithToolTip, {
|
|
69
|
+
toolTipContent: toolTipContent,
|
|
70
|
+
toolTipProps: toolTipProps,
|
|
71
|
+
wrapperCss: tooltipWrapperStyles,
|
|
72
|
+
isSelected: isSelected
|
|
73
|
+
}, ___EmotionJSX(EuiButtonDisplay, _extends({
|
|
61
74
|
css: cssStyles,
|
|
62
75
|
className: buttonClasses,
|
|
63
76
|
isDisabled: isDisabled,
|
|
@@ -73,5 +86,24 @@ export var EuiButtonGroupButton = function EuiButtonGroupButton(_ref) {
|
|
|
73
86
|
title: innerText,
|
|
74
87
|
"data-test-subj": id,
|
|
75
88
|
isSelected: isSelected
|
|
76
|
-
}, rest), label);
|
|
89
|
+
}, rest), label));
|
|
90
|
+
};
|
|
91
|
+
var EuiButtonGroupButtonWithToolTip = function EuiButtonGroupButtonWithToolTip(_ref2) {
|
|
92
|
+
var _toolTipProps$anchorP, _toolTipProps$anchorP2;
|
|
93
|
+
var toolTipContent = _ref2.toolTipContent,
|
|
94
|
+
toolTipProps = _ref2.toolTipProps,
|
|
95
|
+
wrapperCss = _ref2.wrapperCss,
|
|
96
|
+
isSelected = _ref2.isSelected,
|
|
97
|
+
children = _ref2.children;
|
|
98
|
+
return toolTipContent ? ___EmotionJSX(EuiToolTip, _extends({
|
|
99
|
+
content: toolTipContent,
|
|
100
|
+
position: "top"
|
|
101
|
+
}, toolTipProps, {
|
|
102
|
+
anchorProps: _objectSpread(_objectSpread({}, toolTipProps === null || toolTipProps === void 0 ? void 0 : toolTipProps.anchorProps), {}, {
|
|
103
|
+
className: classNames('euiButtonGroup__tooltipWrapper', {
|
|
104
|
+
'euiButtonGroup__tooltipWrapper-isSelected': isSelected
|
|
105
|
+
}, toolTipProps === null || toolTipProps === void 0 ? void 0 : (_toolTipProps$anchorP = toolTipProps.anchorProps) === null || _toolTipProps$anchorP === void 0 ? void 0 : _toolTipProps$anchorP.className),
|
|
106
|
+
css: [wrapperCss, toolTipProps === null || toolTipProps === void 0 ? void 0 : (_toolTipProps$anchorP2 = toolTipProps.anchorProps) === null || _toolTipProps$anchorP2 === void 0 ? void 0 : _toolTipProps$anchorP2.css]
|
|
107
|
+
})
|
|
108
|
+
}), children) : children;
|
|
77
109
|
};
|
|
@@ -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;"),
|