@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
|
@@ -118,19 +118,19 @@ export var euiPaletteForLightBackground = function euiPaletteForLightBackground(
|
|
|
118
118
|
export var euiPaletteForDarkBackground = function euiPaletteForDarkBackground() {
|
|
119
119
|
return ['#1BA9F5', '#7DE2D1', '#F990C0', '#F66', '#FFCE7A'];
|
|
120
120
|
};
|
|
121
|
-
var
|
|
122
|
-
var
|
|
123
|
-
var
|
|
121
|
+
var greenColor = '#209280';
|
|
122
|
+
var redColor = '#CC5642';
|
|
123
|
+
var lightRedColor = euiPaletteColorBlind()[9];
|
|
124
124
|
var coolArray = [euiPaletteColorBlind()[1], '#6092C0'];
|
|
125
125
|
var warmArray = [euiPaletteColorBlind()[7], euiPaletteColorBlind()[9]];
|
|
126
126
|
export var euiPaletteForStatus = function euiPaletteForStatus(steps) {
|
|
127
127
|
if (steps === 1) {
|
|
128
|
-
return [
|
|
128
|
+
return [greenColor];
|
|
129
129
|
}
|
|
130
130
|
if (steps <= 3) {
|
|
131
|
-
return euiPalette([
|
|
131
|
+
return euiPalette([greenColor, euiPaletteColorBlind()[5], redColor], steps, true);
|
|
132
132
|
}
|
|
133
|
-
return euiPalette([
|
|
133
|
+
return euiPalette([greenColor, euiPaletteColorBlind()[0], euiPaletteColorBlind()[5], lightRedColor, redColor], steps, true);
|
|
134
134
|
};
|
|
135
135
|
export var euiPaletteForTemperature = function euiPaletteForTemperature(steps) {
|
|
136
136
|
var cools = colorPalette([].concat(_toConsumableArray(coolArray.slice().reverse()), ['#EBEFF5']), 3);
|
|
@@ -138,7 +138,7 @@ export var euiPaletteForTemperature = function euiPaletteForTemperature(steps) {
|
|
|
138
138
|
if (steps === 1) {
|
|
139
139
|
return [cools[0]];
|
|
140
140
|
} else if (steps <= 3) {
|
|
141
|
-
return euiPalette([cools[0],
|
|
141
|
+
return euiPalette([cools[0], lightRedColor], steps, true);
|
|
142
142
|
}
|
|
143
143
|
return euiPalette([].concat(_toConsumableArray(cools), _toConsumableArray(warms)), steps, true);
|
|
144
144
|
};
|
|
@@ -148,18 +148,26 @@ export var euiPaletteComplementary = function euiPaletteComplementary(steps) {
|
|
|
148
148
|
}
|
|
149
149
|
return euiPalette([euiPaletteColorBlind()[1], euiPaletteColorBlind()[7]], steps, true);
|
|
150
150
|
};
|
|
151
|
-
export var
|
|
151
|
+
export var euiPaletteRed = function euiPaletteRed(steps) {
|
|
152
152
|
if (steps === 1) {
|
|
153
|
-
return [
|
|
153
|
+
return [lightRedColor];
|
|
154
154
|
}
|
|
155
|
-
return euiPalette(['white',
|
|
155
|
+
return euiPalette(['white', redColor], steps);
|
|
156
156
|
};
|
|
157
|
-
|
|
157
|
+
/**
|
|
158
|
+
* @deprecated - use `euiPaletteRed` instead
|
|
159
|
+
*/
|
|
160
|
+
export var euiPaletteNegative = euiPaletteRed;
|
|
161
|
+
export var euiPaletteGreen = function euiPaletteGreen(steps) {
|
|
158
162
|
if (steps === 1) {
|
|
159
163
|
return [euiPaletteColorBlind()[0]];
|
|
160
164
|
}
|
|
161
|
-
return euiPalette(['white',
|
|
165
|
+
return euiPalette(['white', greenColor], steps);
|
|
162
166
|
};
|
|
167
|
+
/**
|
|
168
|
+
* @deprecated - use `euiPaletteGreen` instead
|
|
169
|
+
*/
|
|
170
|
+
export var euiPalettePositive = euiPaletteGreen;
|
|
163
171
|
export var euiPaletteCool = function euiPaletteCool(steps) {
|
|
164
172
|
if (steps === 1) {
|
|
165
173
|
return [coolArray[1]];
|
|
@@ -168,7 +176,7 @@ export var euiPaletteCool = function euiPaletteCool(steps) {
|
|
|
168
176
|
};
|
|
169
177
|
export var euiPaletteWarm = function euiPaletteWarm(steps) {
|
|
170
178
|
if (steps === 1) {
|
|
171
|
-
return [
|
|
179
|
+
return [lightRedColor];
|
|
172
180
|
}
|
|
173
181
|
return euiPalette(['#FBFBDC'].concat(warmArray), steps);
|
|
174
182
|
};
|
|
@@ -17,7 +17,7 @@ export { rgbToHsv } from './rgb_to_hsv';
|
|
|
17
17
|
export { calculateContrast, calculateLuminance } from './luminance_and_contrast';
|
|
18
18
|
export { VISUALIZATION_COLORS, DEFAULT_VISUALIZATION_COLOR } from './visualization_colors';
|
|
19
19
|
export { colorPalette } from './color_palette';
|
|
20
|
-
export { euiPaletteForLightBackground, euiPaletteForDarkBackground, euiPaletteColorBlind, euiPaletteColorBlindBehindText, euiPaletteForStatus, euiPaletteForTemperature, euiPaletteComplementary, euiPaletteNegative, euiPalettePositive, euiPaletteCool, euiPaletteWarm, euiPaletteGray } from './eui_palettes';
|
|
20
|
+
export { euiPaletteForLightBackground, euiPaletteForDarkBackground, euiPaletteColorBlind, euiPaletteColorBlindBehindText, euiPaletteForStatus, euiPaletteForTemperature, euiPaletteComplementary, euiPaletteRed, euiPaletteGreen, euiPaletteNegative, euiPalettePositive, euiPaletteCool, euiPaletteWarm, euiPaletteGray } from './eui_palettes';
|
|
21
21
|
export { getSteppedGradient } from './stepped_gradient';
|
|
22
22
|
export * from './manipulation';
|
|
23
23
|
export * from './contrast';
|
|
@@ -0,0 +1,23 @@
|
|
|
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 { useRef } from 'react';
|
|
10
|
+
import isEqual from 'lodash/isEqual';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* This hook is mostly a performance concern for third-party objs/arrays that EUI
|
|
14
|
+
* has no control over and may not be correctly memoized (i.e., will create a new
|
|
15
|
+
* reference on every rerender unless passed through this hook).
|
|
16
|
+
*/
|
|
17
|
+
export var useDeepEqual = function useDeepEqual(object) {
|
|
18
|
+
var ref = useRef(object);
|
|
19
|
+
if (!isEqual(object, ref.current)) {
|
|
20
|
+
ref.current = object;
|
|
21
|
+
}
|
|
22
|
+
return ref.current;
|
|
23
|
+
};
|
|
@@ -12,7 +12,7 @@ export { htmlIdGenerator, useGeneratedHtmlId } from './accessibility';
|
|
|
12
12
|
export { CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT } from './alignment';
|
|
13
13
|
export { CurrentEuiBreakpointContext, CurrentEuiBreakpointProvider, useCurrentEuiBreakpoint, useIsWithinBreakpoints, useIsWithinMaxBreakpoint, useIsWithinMinBreakpoint } from './breakpoint';
|
|
14
14
|
export { CanvasTextUtils } from './canvas';
|
|
15
|
-
export { brighten, calculateContrast, calculateLuminance, colorPalette, darken, DEFAULT_VISUALIZATION_COLOR, desaturate, euiPaletteColorBlind, euiPaletteColorBlindBehindText, euiPaletteComplementary, euiPaletteCool, euiPaletteForDarkBackground, euiPaletteForLightBackground, euiPaletteForStatus, euiPaletteForTemperature, euiPaletteGray,
|
|
15
|
+
export { brighten, calculateContrast, calculateLuminance, colorPalette, darken, DEFAULT_VISUALIZATION_COLOR, desaturate, euiPaletteColorBlind, euiPaletteColorBlindBehindText, euiPaletteComplementary, euiPaletteCool, euiPaletteForDarkBackground, euiPaletteForLightBackground, euiPaletteForStatus, euiPaletteForTemperature, euiPaletteGray, euiPaletteRed, euiPaletteGreen, euiPalettePositive, euiPaletteNegative, euiPaletteWarm, getSteppedGradient, hexToHsv, hexToRgb, hsvToHex, hsvToRgb, isColorDark, isValidHex, lightness, makeDisabledContrastColor, makeHighContrastColor, rgbToHex, rgbToHsv, saturate, shade, shadeOrTint, tint, tintOrShade, transparentize, VISUALIZATION_COLORS, wcagContrastMin } from './color';
|
|
16
16
|
export { useColorPickerState, useColorStopsState } from './color_picker';
|
|
17
17
|
export * from './console';
|
|
18
18
|
export { copyToClipboard } from './copy_to_clipboard';
|
|
@@ -12,9 +12,7 @@ import React, { createContext, useContext, useState, useMemo, useCallback, forwa
|
|
|
12
12
|
import { useUpdateEffect } from '../hooks';
|
|
13
13
|
import { useEuiTheme } from './hooks';
|
|
14
14
|
|
|
15
|
-
//
|
|
16
|
-
// unmounted components to have their styles garbage-collected by the browser
|
|
17
|
-
// @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap
|
|
15
|
+
// Typically an object of serialized css`` styles, but can have any amount of nesting, so it's not worth it to try and strictly type this
|
|
18
16
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
19
17
|
export var EuiThemeMemoizedStylesContext = /*#__PURE__*/createContext(new WeakMap());
|
|
20
18
|
export var EuiThemeMemoizedStylesProvider = function EuiThemeMemoizedStylesProvider(_ref) {
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.EuiBreadcrumbContent = void 0;
|
|
9
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
12
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
14
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
+
var _services = require("../../services");
|
|
16
|
+
var _inner_text = require("../inner_text");
|
|
17
|
+
var _text = require("../text");
|
|
18
|
+
var _link = require("../link");
|
|
19
|
+
var _popover = require("../popover");
|
|
20
|
+
var _icon = require("../icon");
|
|
21
|
+
var _i18n = require("../i18n");
|
|
22
|
+
var _breadcrumb_content = require("./_breadcrumb_content.styles");
|
|
23
|
+
var _react2 = require("@emotion/react");
|
|
24
|
+
var _excluded = ["text", "truncate", "type", "href", "rel", "onClick", "popoverContent", "popoverProps", "className", "color", "isFirstBreadcrumb", "isLastBreadcrumb", "isOnlyBreadcrumb", "highlightLastBreadcrumb", "truncateLastBreadcrumb"],
|
|
25
|
+
_excluded2 = ["css"],
|
|
26
|
+
_excluded3 = ["popoverContent", "popoverProps", "color", "type", "title", "aria-current", "className", "isLastBreadcrumb", "breadcrumbCss", "truncationCss", "children"];
|
|
27
|
+
/*
|
|
28
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
29
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
30
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
31
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
32
|
+
* Side Public License, v 1.
|
|
33
|
+
*/
|
|
34
|
+
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); }
|
|
35
|
+
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; }
|
|
36
|
+
var EuiBreadcrumbContent = function EuiBreadcrumbContent(_ref) {
|
|
37
|
+
var text = _ref.text,
|
|
38
|
+
truncate = _ref.truncate,
|
|
39
|
+
type = _ref.type,
|
|
40
|
+
href = _ref.href,
|
|
41
|
+
rel = _ref.rel,
|
|
42
|
+
onClick = _ref.onClick,
|
|
43
|
+
popoverContent = _ref.popoverContent,
|
|
44
|
+
popoverProps = _ref.popoverProps,
|
|
45
|
+
className = _ref.className,
|
|
46
|
+
color = _ref.color,
|
|
47
|
+
isFirstBreadcrumb = _ref.isFirstBreadcrumb,
|
|
48
|
+
isLastBreadcrumb = _ref.isLastBreadcrumb,
|
|
49
|
+
isOnlyBreadcrumb = _ref.isOnlyBreadcrumb,
|
|
50
|
+
highlightLastBreadcrumb = _ref.highlightLastBreadcrumb,
|
|
51
|
+
truncateLastBreadcrumb = _ref.truncateLastBreadcrumb,
|
|
52
|
+
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
53
|
+
var classes = (0, _classnames.default)('euiBreadcrumb__content', className);
|
|
54
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_breadcrumb_content.euiBreadcrumbContentStyles);
|
|
55
|
+
var cssStyles = [styles.euiBreadcrumb__content, styles[type]];
|
|
56
|
+
if (type === 'application') {
|
|
57
|
+
if (isOnlyBreadcrumb) {
|
|
58
|
+
cssStyles.push(styles.applicationStyles.onlyChild);
|
|
59
|
+
} else if (isFirstBreadcrumb) {
|
|
60
|
+
cssStyles.push(styles.applicationStyles.firstChild);
|
|
61
|
+
} else if (isLastBreadcrumb) {
|
|
62
|
+
cssStyles.push(styles.applicationStyles.lastChild);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
var truncationStyles = [truncate && !truncateLastBreadcrumb && styles.isTruncated, truncateLastBreadcrumb && styles.isTruncatedLast];
|
|
66
|
+
var isBreadcrumbWithPopover = !!popoverContent;
|
|
67
|
+
var isInteractiveBreadcrumb = href || onClick;
|
|
68
|
+
var linkColor = color || (highlightLastBreadcrumb ? 'text' : 'subdued');
|
|
69
|
+
var plainTextColor = highlightLastBreadcrumb ? 'default' : 'subdued'; // Does not inherit `color` prop
|
|
70
|
+
var ariaCurrent = highlightLastBreadcrumb ? 'page' : undefined;
|
|
71
|
+
return (0, _react2.jsx)(_inner_text.EuiInnerText, null, function (ref, innerText) {
|
|
72
|
+
var title = innerText === '' ? undefined : innerText;
|
|
73
|
+
var baseProps = {
|
|
74
|
+
ref: ref,
|
|
75
|
+
title: title,
|
|
76
|
+
'aria-current': ariaCurrent,
|
|
77
|
+
className: classes,
|
|
78
|
+
css: [].concat(cssStyles, truncationStyles)
|
|
79
|
+
};
|
|
80
|
+
if (isBreadcrumbWithPopover) {
|
|
81
|
+
var _ = baseProps.css,
|
|
82
|
+
popoverButtonProps = (0, _objectWithoutProperties2.default)(baseProps, _excluded2);
|
|
83
|
+
return (0, _react2.jsx)(EuiBreadcrumbPopover, (0, _extends2.default)({}, popoverButtonProps, {
|
|
84
|
+
breadcrumbCss: cssStyles,
|
|
85
|
+
truncationCss: truncationStyles,
|
|
86
|
+
isLastBreadcrumb: isLastBreadcrumb,
|
|
87
|
+
type: type,
|
|
88
|
+
color: linkColor,
|
|
89
|
+
popoverContent: popoverContent,
|
|
90
|
+
popoverProps: popoverProps
|
|
91
|
+
}, rest), text);
|
|
92
|
+
} else if (isInteractiveBreadcrumb) {
|
|
93
|
+
return (0, _react2.jsx)(_link.EuiLink, (0, _extends2.default)({}, baseProps, {
|
|
94
|
+
color: linkColor,
|
|
95
|
+
onClick: onClick,
|
|
96
|
+
href: href,
|
|
97
|
+
rel: rel
|
|
98
|
+
}, rest), text);
|
|
99
|
+
} else {
|
|
100
|
+
return (0, _react2.jsx)(_text.EuiTextColor, {
|
|
101
|
+
color: plainTextColor,
|
|
102
|
+
cloneElement: true
|
|
103
|
+
}, (0, _react2.jsx)("span", (0, _extends2.default)({}, baseProps, rest), text));
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
};
|
|
107
|
+
exports.EuiBreadcrumbContent = EuiBreadcrumbContent;
|
|
108
|
+
var EuiBreadcrumbPopover = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
|
|
109
|
+
var popoverContent = _ref2.popoverContent,
|
|
110
|
+
popoverProps = _ref2.popoverProps,
|
|
111
|
+
color = _ref2.color,
|
|
112
|
+
type = _ref2.type,
|
|
113
|
+
title = _ref2.title,
|
|
114
|
+
ariaCurrent = _ref2['aria-current'],
|
|
115
|
+
className = _ref2.className,
|
|
116
|
+
isLastBreadcrumb = _ref2.isLastBreadcrumb,
|
|
117
|
+
breadcrumbCss = _ref2.breadcrumbCss,
|
|
118
|
+
truncationCss = _ref2.truncationCss,
|
|
119
|
+
children = _ref2.children,
|
|
120
|
+
rest = (0, _objectWithoutProperties2.default)(_ref2, _excluded3);
|
|
121
|
+
var _useState = (0, _react.useState)(false),
|
|
122
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
123
|
+
isPopoverOpen = _useState2[0],
|
|
124
|
+
setIsPopoverOpen = _useState2[1];
|
|
125
|
+
var closePopover = (0, _react.useCallback)(function () {
|
|
126
|
+
return setIsPopoverOpen(false);
|
|
127
|
+
}, []);
|
|
128
|
+
var togglePopover = (0, _react.useCallback)(function () {
|
|
129
|
+
return setIsPopoverOpen(function (isOpen) {
|
|
130
|
+
return !isOpen;
|
|
131
|
+
});
|
|
132
|
+
}, []);
|
|
133
|
+
var popoverAriaLabel = (0, _i18n.useEuiI18n)(
|
|
134
|
+
// This component was moved into another file for organization/dev readability,
|
|
135
|
+
// but we're keeping the i18n token the same as before for consumer consistency
|
|
136
|
+
// eslint-disable-next-line local/i18n
|
|
137
|
+
'euiBreadcrumb.popoverAriaLabel', 'Clicking this button will toggle a popover dialog.');
|
|
138
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_breadcrumb_content.euiBreadcrumbPopoverStyles);
|
|
139
|
+
var wrapperStyles = [styles.popoverWrapper.euiBreadcrumb__popoverWrapper, !isLastBreadcrumb && styles.popoverWrapper[type]];
|
|
140
|
+
var buttonStyles = [styles.euiBreadcrumb__popoverButton].concat((0, _toConsumableArray2.default)(breadcrumbCss));
|
|
141
|
+
var truncationStyles = [styles.euiBreadcrumb__popoverTruncation].concat((0, _toConsumableArray2.default)(truncationCss));
|
|
142
|
+
return (0, _react2.jsx)(_popover.EuiPopover, (0, _extends2.default)({}, popoverProps, {
|
|
143
|
+
isOpen: isPopoverOpen,
|
|
144
|
+
closePopover: closePopover,
|
|
145
|
+
css: wrapperStyles,
|
|
146
|
+
button: (0, _react2.jsx)(_link.EuiLink, (0, _extends2.default)({
|
|
147
|
+
ref: ref,
|
|
148
|
+
title: title,
|
|
149
|
+
"aria-current": ariaCurrent,
|
|
150
|
+
className: className,
|
|
151
|
+
css: buttonStyles,
|
|
152
|
+
color: color,
|
|
153
|
+
onClick: togglePopover
|
|
154
|
+
}, rest), (0, _react2.jsx)("span", {
|
|
155
|
+
css: truncationStyles
|
|
156
|
+
}, children), (0, _react2.jsx)(_icon.EuiIcon, {
|
|
157
|
+
type: "arrowDown",
|
|
158
|
+
size: "s",
|
|
159
|
+
"aria-label": " - ".concat(popoverAriaLabel)
|
|
160
|
+
}))
|
|
161
|
+
}), typeof popoverContent === 'function' ? popoverContent(closePopover) : popoverContent);
|
|
162
|
+
});
|
|
163
|
+
EuiBreadcrumbPopover.displayName = 'EuiBreadcrumbPopover';
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.euiBreadcrumbPopoverStyles = exports.euiBreadcrumbContentStyles = void 0;
|
|
7
|
+
var _react = require("@emotion/react");
|
|
8
|
+
var _color = require("../../services/color");
|
|
9
|
+
var _global_styling = require("../../global_styling");
|
|
10
|
+
/*
|
|
11
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
12
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
13
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
14
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
15
|
+
* Side Public License, v 1.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Styles cast to inner <a>, <button>, <span> elements
|
|
20
|
+
*/
|
|
21
|
+
var euiBreadcrumbContentStyles = function euiBreadcrumbContentStyles(euiThemeContext) {
|
|
22
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
23
|
+
return {
|
|
24
|
+
euiBreadcrumb__content: /*#__PURE__*/(0, _react.css)("font-weight:", euiTheme.font.weight.medium, ";text-align:center;vertical-align:baseline;;label:euiBreadcrumb__content;"),
|
|
25
|
+
// Truncation styles
|
|
26
|
+
isTruncated: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextTruncate)((0, _global_styling.mathWithUnits)(euiTheme.size.base, function (x) {
|
|
27
|
+
return x * 10;
|
|
28
|
+
})), ";;label:isTruncated;"),
|
|
29
|
+
isTruncatedLast: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextTruncate)('none'), ";;label:isTruncatedLast;"),
|
|
30
|
+
// Types
|
|
31
|
+
page: /*#__PURE__*/(0, _react.css)("&:is(a):focus{", (0, _global_styling.euiFocusRing)(euiThemeContext, 'inset'), ";}&:is(button):focus{", (0, _global_styling.euiFocusRing)(euiThemeContext, 'center'), ";};label:page;"),
|
|
32
|
+
application: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiFontSize)(euiThemeContext, 'xs'), " background-color:", (0, _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, ";", (0, _global_styling.logicalCSS)('padding-vertical', euiTheme.size.xs), " ", (0, _global_styling.logicalCSS)('padding-horizontal', euiTheme.size.base), " &:is(a),&:is(button){background-color:", (0, _color.transparentize)(euiTheme.colors.primary, 0.2), ";color:", euiTheme.colors.link, ";:focus{", (0, _global_styling.euiFocusRing)(euiThemeContext, 'inset'), " :focus-visible{border-radius:", euiTheme.border.radius.medium, ";clip-path:none;}}};label:application;"),
|
|
33
|
+
applicationStyles: {
|
|
34
|
+
onlyChild: /*#__PURE__*/(0, _react.css)("border-radius:", euiTheme.border.radius.medium, ";clip-path:none;", (0, _global_styling.logicalCSS)('padding-horizontal', euiTheme.size.m), ";;label:onlyChild;"),
|
|
35
|
+
firstChild: /*#__PURE__*/(0, _react.css)((0, _global_styling.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 );", (0, _global_styling.logicalCSS)('padding-left', euiTheme.size.m), ";;label:firstChild;"),
|
|
36
|
+
lastChild: /*#__PURE__*/(0, _react.css)((0, _global_styling.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 );", (0, _global_styling.logicalCSS)('padding-right', euiTheme.size.m), ";;label:lastChild;")
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
exports.euiBreadcrumbContentStyles = euiBreadcrumbContentStyles;
|
|
41
|
+
var euiBreadcrumbPopoverStyles = function euiBreadcrumbPopoverStyles(_ref) {
|
|
42
|
+
var euiTheme = _ref.euiTheme;
|
|
43
|
+
return {
|
|
44
|
+
euiBreadcrumb__popoverButton: /*#__PURE__*/(0, _react.css)("max-inline-size:100%;display:inline-flex;align-items:center;gap:", euiTheme.size.xs, ";;label:euiBreadcrumb__popoverButton;"),
|
|
45
|
+
euiBreadcrumb__popoverTruncation: /*#__PURE__*/(0, _react.css)(";label:euiBreadcrumb__popoverTruncation;"),
|
|
46
|
+
popoverWrapper: {
|
|
47
|
+
euiBreadcrumb__popoverWrapper: /*#__PURE__*/(0, _react.css)(";label:euiBreadcrumb__popoverWrapper;"),
|
|
48
|
+
page: /*#__PURE__*/(0, _react.css)("max-inline-size:calc(\n 100% - ", (0, _global_styling.mathWithUnits)(euiTheme.size.base, function (x) {
|
|
49
|
+
return x + 1;
|
|
50
|
+
}), "\n );;label:page;"),
|
|
51
|
+
application: null
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
exports.euiBreadcrumbPopoverStyles = euiBreadcrumbPopoverStyles;
|
|
@@ -1,27 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
|
-
exports.
|
|
9
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
7
|
+
exports.EuiBreadcrumbCollapsed = exports.EuiBreadcrumb = void 0;
|
|
10
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
9
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
12
|
-
var _react =
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
13
11
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
14
12
|
var _services = require("../../services");
|
|
15
|
-
var _inner_text = require("../inner_text");
|
|
16
|
-
var _text = require("../text");
|
|
17
|
-
var _link = require("../link");
|
|
18
|
-
var _popover = require("../popover");
|
|
19
|
-
var _icon = require("../icon");
|
|
20
13
|
var _i18n = require("../i18n");
|
|
14
|
+
var _breadcrumb_content = require("./_breadcrumb_content");
|
|
21
15
|
var _breadcrumb = require("./breadcrumb.styles");
|
|
22
16
|
var _react2 = require("@emotion/react");
|
|
23
|
-
var _excluded = ["children", "className", "type", "truncate"]
|
|
24
|
-
_excluded2 = ["text", "truncate", "type", "href", "rel", "onClick", "popoverContent", "popoverProps", "className", "color", "isFirstBreadcrumb", "isLastBreadcrumb", "isOnlyBreadcrumb", "highlightLastBreadcrumb", "truncateLastBreadcrumb"];
|
|
17
|
+
var _excluded = ["children", "className", "type", "truncate"];
|
|
25
18
|
/*
|
|
26
19
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
27
20
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -29,9 +22,6 @@ var _excluded = ["children", "className", "type", "truncate"],
|
|
|
29
22
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
30
23
|
* Side Public License, v 1.
|
|
31
24
|
*/
|
|
32
|
-
// Used internally only by the parent EuiBreadcrumbs
|
|
33
|
-
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); }
|
|
34
|
-
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; }
|
|
35
25
|
var EuiBreadcrumb = function EuiBreadcrumb(_ref) {
|
|
36
26
|
var children = _ref.children,
|
|
37
27
|
className = _ref.className,
|
|
@@ -39,8 +29,7 @@ var EuiBreadcrumb = function EuiBreadcrumb(_ref) {
|
|
|
39
29
|
truncate = _ref.truncate,
|
|
40
30
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
41
31
|
var classes = (0, _classnames.default)('euiBreadcrumb', className);
|
|
42
|
-
var
|
|
43
|
-
var styles = (0, _breadcrumb.euiBreadcrumbStyles)(euiTheme);
|
|
32
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_breadcrumb.euiBreadcrumbStyles);
|
|
44
33
|
var cssStyles = [styles.euiBreadcrumb, styles[type], truncate && styles.isTruncated];
|
|
45
34
|
return (0, _react2.jsx)("li", (0, _extends2.default)({
|
|
46
35
|
className: classes,
|
|
@@ -49,109 +38,17 @@ var EuiBreadcrumb = function EuiBreadcrumb(_ref) {
|
|
|
49
38
|
}, rest), children);
|
|
50
39
|
};
|
|
51
40
|
exports.EuiBreadcrumb = EuiBreadcrumb;
|
|
52
|
-
var
|
|
53
|
-
var
|
|
54
|
-
truncate = _ref2.truncate,
|
|
55
|
-
type = _ref2.type,
|
|
56
|
-
href = _ref2.href,
|
|
57
|
-
rel = _ref2.rel,
|
|
58
|
-
onClick = _ref2.onClick,
|
|
59
|
-
popoverContent = _ref2.popoverContent,
|
|
60
|
-
popoverProps = _ref2.popoverProps,
|
|
61
|
-
className = _ref2.className,
|
|
62
|
-
color = _ref2.color,
|
|
41
|
+
var EuiBreadcrumbCollapsed = function EuiBreadcrumbCollapsed(_ref2) {
|
|
42
|
+
var children = _ref2.children,
|
|
63
43
|
isFirstBreadcrumb = _ref2.isFirstBreadcrumb,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
highlightLastBreadcrumb = _ref2.highlightLastBreadcrumb,
|
|
67
|
-
truncateLastBreadcrumb = _ref2.truncateLastBreadcrumb,
|
|
68
|
-
rest = (0, _objectWithoutProperties2.default)(_ref2, _excluded2);
|
|
69
|
-
var classes = (0, _classnames.default)('euiBreadcrumb__content', className);
|
|
70
|
-
var euiTheme = (0, _services.useEuiTheme)();
|
|
71
|
-
var styles = (0, _breadcrumb.euiBreadcrumbContentStyles)(euiTheme);
|
|
72
|
-
var cssStyles = [styles.euiBreadcrumb__content, styles[type], truncate && !truncateLastBreadcrumb && styles.isTruncated, truncateLastBreadcrumb && styles.isTruncatedLast];
|
|
73
|
-
if (type === 'application') {
|
|
74
|
-
if (isOnlyBreadcrumb) {
|
|
75
|
-
cssStyles.push(styles.applicationStyles.onlyChild);
|
|
76
|
-
} else if (isFirstBreadcrumb) {
|
|
77
|
-
cssStyles.push(styles.applicationStyles.firstChild);
|
|
78
|
-
} else if (isLastBreadcrumb) {
|
|
79
|
-
cssStyles.push(styles.applicationStyles.lastChild);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
var isInteractiveBreadcrumb = href || onClick;
|
|
83
|
-
var linkColor = color || (highlightLastBreadcrumb ? 'text' : 'subdued');
|
|
84
|
-
var plainTextColor = highlightLastBreadcrumb ? 'default' : 'subdued'; // Does not inherit `color` prop
|
|
85
|
-
var ariaCurrent = highlightLastBreadcrumb ? 'page' : undefined;
|
|
86
|
-
var isPopoverBreadcrumb = !!popoverContent;
|
|
87
|
-
var _useState = (0, _react.useState)(false),
|
|
88
|
-
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
89
|
-
isPopoverOpen = _useState2[0],
|
|
90
|
-
setIsPopoverOpen = _useState2[1];
|
|
91
|
-
var popoverAriaLabel = (0, _i18n.useEuiI18n)('euiBreadcrumb.popoverAriaLabel', 'Clicking this button will toggle a popover dialog.');
|
|
92
|
-
return (0, _react2.jsx)(_inner_text.EuiInnerText, null, function (ref, innerText) {
|
|
93
|
-
var title = innerText === '' ? undefined : innerText;
|
|
94
|
-
var baseProps = {
|
|
95
|
-
ref: ref,
|
|
96
|
-
title: title,
|
|
97
|
-
'aria-current': ariaCurrent
|
|
98
|
-
};
|
|
99
|
-
var styleProps = {
|
|
100
|
-
className: classes,
|
|
101
|
-
css: cssStyles
|
|
102
|
-
};
|
|
103
|
-
if (isPopoverBreadcrumb) {
|
|
104
|
-
var _closePopover = function _closePopover() {
|
|
105
|
-
return setIsPopoverOpen(false);
|
|
106
|
-
};
|
|
107
|
-
return (0, _react2.jsx)(_popover.EuiPopover, (0, _extends2.default)({}, popoverProps, {
|
|
108
|
-
isOpen: isPopoverOpen,
|
|
109
|
-
closePopover: _closePopover,
|
|
110
|
-
css: !isLastBreadcrumb && styles.euiBreadcrumb__popoverWrapper,
|
|
111
|
-
button: (0, _react2.jsx)(_link.EuiLink, (0, _extends2.default)({}, baseProps, {
|
|
112
|
-
color: linkColor,
|
|
113
|
-
css: styles.euiBreadcrumb__popoverButton
|
|
114
|
-
// Avoid passing href and onClick - should only toggle the popover
|
|
115
|
-
,
|
|
116
|
-
onClick: function onClick() {
|
|
117
|
-
return setIsPopoverOpen(function (isOpen) {
|
|
118
|
-
return !isOpen;
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
}, rest), (0, _react2.jsx)("span", styleProps, text), (0, _react2.jsx)(_icon.EuiIcon, {
|
|
122
|
-
type: "arrowDown",
|
|
123
|
-
size: "s",
|
|
124
|
-
"aria-label": " - ".concat(popoverAriaLabel)
|
|
125
|
-
}))
|
|
126
|
-
}), typeof popoverContent === 'function' ? popoverContent(_closePopover) : popoverContent);
|
|
127
|
-
} else if (isInteractiveBreadcrumb) {
|
|
128
|
-
return (0, _react2.jsx)(_link.EuiLink, (0, _extends2.default)({}, baseProps, styleProps, {
|
|
129
|
-
color: linkColor,
|
|
130
|
-
onClick: onClick,
|
|
131
|
-
href: href,
|
|
132
|
-
rel: rel
|
|
133
|
-
}, rest), text);
|
|
134
|
-
} else {
|
|
135
|
-
return (0, _react2.jsx)(_text.EuiTextColor, {
|
|
136
|
-
color: plainTextColor,
|
|
137
|
-
cloneElement: true
|
|
138
|
-
}, (0, _react2.jsx)("span", (0, _extends2.default)({}, baseProps, styleProps, rest), text));
|
|
139
|
-
}
|
|
140
|
-
});
|
|
141
|
-
};
|
|
142
|
-
exports.EuiBreadcrumbContent = EuiBreadcrumbContent;
|
|
143
|
-
var EuiBreadcrumbCollapsed = function EuiBreadcrumbCollapsed(_ref3) {
|
|
144
|
-
var children = _ref3.children,
|
|
145
|
-
isFirstBreadcrumb = _ref3.isFirstBreadcrumb,
|
|
146
|
-
type = _ref3.type;
|
|
147
|
-
var euiTheme = (0, _services.useEuiTheme)();
|
|
148
|
-
var styles = (0, _breadcrumb.euiBreadcrumbStyles)(euiTheme);
|
|
44
|
+
type = _ref2.type;
|
|
45
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_breadcrumb.euiBreadcrumbStyles);
|
|
149
46
|
var cssStyles = [styles.isCollapsed];
|
|
150
47
|
var ariaLabel = (0, _i18n.useEuiI18n)('euiBreadcrumb.collapsedBadge.ariaLabel', 'See collapsed breadcrumbs');
|
|
151
48
|
return (0, _react2.jsx)(EuiBreadcrumb, {
|
|
152
49
|
css: cssStyles,
|
|
153
50
|
type: type
|
|
154
|
-
}, (0, _react2.jsx)(EuiBreadcrumbContent, {
|
|
51
|
+
}, (0, _react2.jsx)(_breadcrumb_content.EuiBreadcrumbContent, {
|
|
155
52
|
popoverContent: children,
|
|
156
53
|
text: (0, _react2.jsx)("span", {
|
|
157
54
|
"aria-label": ariaLabel
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.euiBreadcrumbStyles =
|
|
6
|
+
exports.euiBreadcrumbStyles = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
|
-
var _color = require("../../services/color");
|
|
9
8
|
var _global_styling = require("../../global_styling");
|
|
10
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)."; } /*
|
|
11
10
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -14,6 +13,9 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
14
13
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
15
14
|
* Side Public License, v 1.
|
|
16
15
|
*/
|
|
16
|
+
/**
|
|
17
|
+
* Styles cast to <li> element
|
|
18
|
+
*/
|
|
17
19
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
18
20
|
name: "1k7t4ns-isCollapsed",
|
|
19
21
|
styles: "flex-shrink:0;label:isCollapsed;"
|
|
@@ -31,7 +33,6 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
|
31
33
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
32
34
|
};
|
|
33
35
|
var euiBreadcrumbStyles = function euiBreadcrumbStyles(euiThemeContext) {
|
|
34
|
-
// Styles cast to <li> element
|
|
35
36
|
var euiTheme = euiThemeContext.euiTheme;
|
|
36
37
|
return {
|
|
37
38
|
euiBreadcrumb: /*#__PURE__*/(0, _react.css)("align-items:center;display:flex;", (0, _global_styling.logicalCSS)(
|
|
@@ -44,29 +45,4 @@ var euiBreadcrumbStyles = function euiBreadcrumbStyles(euiThemeContext) {
|
|
|
44
45
|
application: /*#__PURE__*/(0, _react.css)("&:not(:last-of-type){", (0, _global_styling.logicalCSS)('margin-right', "-".concat(euiTheme.size.xs)), ";};label:application;")
|
|
45
46
|
};
|
|
46
47
|
};
|
|
47
|
-
exports.euiBreadcrumbStyles = euiBreadcrumbStyles;
|
|
48
|
-
var euiBreadcrumbContentStyles = function euiBreadcrumbContentStyles(euiThemeContext) {
|
|
49
|
-
// Styles cast to <a>, <span>, or collapsed <button> elements
|
|
50
|
-
var euiTheme = euiThemeContext.euiTheme;
|
|
51
|
-
return {
|
|
52
|
-
euiBreadcrumb__content: /*#__PURE__*/(0, _react.css)("font-weight:", euiTheme.font.weight.medium, ";text-align:center;vertical-align:baseline;;label:euiBreadcrumb__content;"),
|
|
53
|
-
isTruncated: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextTruncate)((0, _global_styling.mathWithUnits)(euiTheme.size.base, function (x) {
|
|
54
|
-
return x * 10;
|
|
55
|
-
})), ";;label:isTruncated;"),
|
|
56
|
-
isTruncatedLast: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextTruncate)('none'), ";;label:isTruncatedLast;"),
|
|
57
|
-
// Popover styles
|
|
58
|
-
euiBreadcrumb__popoverButton: /*#__PURE__*/(0, _react.css)("max-inline-size:100%;display:inline-flex;align-items:center;gap:", euiTheme.size.xs, ";;label:euiBreadcrumb__popoverButton;"),
|
|
59
|
-
euiBreadcrumb__popoverWrapper: /*#__PURE__*/(0, _react.css)("max-inline-size:calc(\n 100% - ", (0, _global_styling.mathWithUnits)(euiTheme.size.base, function (x) {
|
|
60
|
-
return x + 1;
|
|
61
|
-
}), "\n );;label:euiBreadcrumb__popoverWrapper;"),
|
|
62
|
-
// Types
|
|
63
|
-
page: /*#__PURE__*/(0, _react.css)("&:is(a):focus{", (0, _global_styling.euiFocusRing)(euiThemeContext, 'inset'), ";}&:is(button):focus{", (0, _global_styling.euiFocusRing)(euiThemeContext, 'center'), ";};label:page;"),
|
|
64
|
-
application: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiFontSize)(euiThemeContext, 'xs'), " background-color:", (0, _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, ";", (0, _global_styling.logicalCSS)('padding-vertical', euiTheme.size.xs), " ", (0, _global_styling.logicalCSS)('padding-horizontal', euiTheme.size.base), " &:is(a),&:is(button){background-color:", (0, _color.transparentize)(euiTheme.colors.primary, 0.2), ";color:", euiTheme.colors.link, ";:focus{", (0, _global_styling.euiFocusRing)(euiThemeContext, 'inset'), " :focus-visible{border-radius:", euiTheme.border.radius.medium, ";clip-path:none;}}};label:application;"),
|
|
65
|
-
applicationStyles: {
|
|
66
|
-
onlyChild: /*#__PURE__*/(0, _react.css)("border-radius:", euiTheme.border.radius.medium, ";clip-path:none;", (0, _global_styling.logicalCSS)('padding-horizontal', euiTheme.size.m), ";;label:onlyChild;"),
|
|
67
|
-
firstChild: /*#__PURE__*/(0, _react.css)((0, _global_styling.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 );", (0, _global_styling.logicalCSS)('padding-left', euiTheme.size.m), ";;label:firstChild;"),
|
|
68
|
-
lastChild: /*#__PURE__*/(0, _react.css)((0, _global_styling.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 );", (0, _global_styling.logicalCSS)('padding-right', euiTheme.size.m), ";;label:lastChild;")
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
};
|
|
72
|
-
exports.euiBreadcrumbContentStyles = euiBreadcrumbContentStyles;
|
|
48
|
+
exports.euiBreadcrumbStyles = euiBreadcrumbStyles;
|
|
@@ -14,6 +14,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
14
14
|
var _i18n = require("../i18n");
|
|
15
15
|
var _services = require("../../services");
|
|
16
16
|
var _breadcrumb = require("./breadcrumb");
|
|
17
|
+
var _breadcrumb_content = require("./_breadcrumb_content");
|
|
17
18
|
var _breadcrumbs = require("./breadcrumbs.styles");
|
|
18
19
|
var _react2 = require("@emotion/react");
|
|
19
20
|
var _excluded = ["breadcrumbs", "className", "responsive", "truncate", "max", "type", "lastBreadcrumbIsCurrentPage"];
|
|
@@ -46,8 +47,7 @@ var EuiBreadcrumbs = function EuiBreadcrumbs(_ref) {
|
|
|
46
47
|
lastBreadcrumbIsCurrentPage = _ref$lastBreadcrumbIs === void 0 ? true : _ref$lastBreadcrumbIs,
|
|
47
48
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
48
49
|
var ariaLabel = (0, _i18n.useEuiI18n)('euiBreadcrumbs.nav.ariaLabel', 'Breadcrumbs');
|
|
49
|
-
var
|
|
50
|
-
var breadcrumbsListStyles = (0, _breadcrumbs.euiBreadcrumbsListStyles)(euiTheme);
|
|
50
|
+
var breadcrumbsListStyles = (0, _services.useEuiMemoizedStyles)(_breadcrumbs.euiBreadcrumbsListStyles);
|
|
51
51
|
var cssBreadcrumbsListStyles = [breadcrumbsListStyles.euiBreadcrumbs__list, truncate && breadcrumbsListStyles.isTruncated];
|
|
52
52
|
var responsiveMax = useResponsiveMax(responsive, max);
|
|
53
53
|
var visibleBreadcrumbs = (0, _react.useMemo)(function () {
|
|
@@ -76,7 +76,7 @@ var EuiBreadcrumbs = function EuiBreadcrumbs(_ref) {
|
|
|
76
76
|
max: 0
|
|
77
77
|
})) : (0, _react2.jsx)(_breadcrumb.EuiBreadcrumb, (0, _extends2.default)({
|
|
78
78
|
key: index
|
|
79
|
-
}, sharedProps), (0, _react2.jsx)(
|
|
79
|
+
}, sharedProps), (0, _react2.jsx)(_breadcrumb_content.EuiBreadcrumbContent, (0, _extends2.default)({}, breadcrumb, sharedProps, {
|
|
80
80
|
isFirstBreadcrumb: isFirstBreadcrumb,
|
|
81
81
|
isLastBreadcrumb: isLastBreadcrumb,
|
|
82
82
|
isOnlyBreadcrumb: isOnlyBreadcrumb,
|
|
@@ -61,9 +61,9 @@ var EuiButtonGroup = function EuiButtonGroup(_ref) {
|
|
|
61
61
|
}), (0, _react2.jsx)(_accessibility.EuiScreenReaderOnly, null, (0, _react2.jsx)("legend", null, legend)), (0, _react2.jsx)("div", {
|
|
62
62
|
css: cssStyles,
|
|
63
63
|
className: "euiButtonGroup__buttons"
|
|
64
|
-
}, options.map(function (option
|
|
64
|
+
}, options.map(function (option) {
|
|
65
65
|
return (0, _react2.jsx)(_button_group_button.EuiButtonGroupButton, (0, _extends2.default)({
|
|
66
|
-
key:
|
|
66
|
+
key: option.id,
|
|
67
67
|
isDisabled: isDisabled
|
|
68
68
|
}, option, {
|
|
69
69
|
onClick: typeIsSingle ? function () {
|