@elastic/eui 93.3.0 → 93.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eui_charts_theme.d.ts +9 -0
- package/dist/eui_charts_theme.js +56 -14
- package/dist/eui_charts_theme.js.map +1 -1
- package/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/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/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/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/eui.d.ts +2442 -2337
- package/i18ntokens.json +259 -259
- 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/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/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/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/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/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/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/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/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/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/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/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/package.json +2 -2
- 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/modal/confirm_modal.js +2 -1
- package/test-env/components/modal/modal.js +12 -3
- 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/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/src/themes/charts/theme.scss +0 -5
|
@@ -1,28 +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 =
|
|
13
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
14
11
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
12
|
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
13
|
var _i18n = require("../i18n");
|
|
14
|
+
var _breadcrumb_content = require("./_breadcrumb_content");
|
|
22
15
|
var _breadcrumb = require("./breadcrumb.styles");
|
|
23
16
|
var _react2 = require("@emotion/react");
|
|
24
|
-
var _excluded = ["children", "className", "type", "truncate"]
|
|
25
|
-
_excluded2 = ["text", "truncate", "type", "href", "rel", "onClick", "popoverContent", "popoverProps", "className", "color", "isFirstBreadcrumb", "isLastBreadcrumb", "isOnlyBreadcrumb", "highlightLastBreadcrumb", "truncateLastBreadcrumb"];
|
|
17
|
+
var _excluded = ["children", "className", "type", "truncate"];
|
|
26
18
|
/*
|
|
27
19
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
28
20
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -30,9 +22,6 @@ var _excluded = ["children", "className", "type", "truncate"],
|
|
|
30
22
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
31
23
|
* Side Public License, v 1.
|
|
32
24
|
*/
|
|
33
|
-
// Used internally only by the parent EuiBreadcrumbs
|
|
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
25
|
var EuiBreadcrumb = function EuiBreadcrumb(_ref) {
|
|
37
26
|
var children = _ref.children,
|
|
38
27
|
className = _ref.className,
|
|
@@ -40,8 +29,7 @@ var EuiBreadcrumb = function EuiBreadcrumb(_ref) {
|
|
|
40
29
|
truncate = _ref.truncate,
|
|
41
30
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
42
31
|
var classes = (0, _classnames.default)('euiBreadcrumb', className);
|
|
43
|
-
var
|
|
44
|
-
var styles = (0, _breadcrumb.euiBreadcrumbStyles)(euiTheme);
|
|
32
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_breadcrumb.euiBreadcrumbStyles);
|
|
45
33
|
var cssStyles = [styles.euiBreadcrumb, styles[type], truncate && styles.isTruncated];
|
|
46
34
|
return (0, _react2.jsx)("li", (0, _extends2.default)({
|
|
47
35
|
className: classes,
|
|
@@ -50,312 +38,17 @@ var EuiBreadcrumb = function EuiBreadcrumb(_ref) {
|
|
|
50
38
|
}, rest), children);
|
|
51
39
|
};
|
|
52
40
|
exports.EuiBreadcrumb = EuiBreadcrumb;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
isFirstBreadcrumb: _propTypes.default.bool,
|
|
56
|
-
isLastBreadcrumb: _propTypes.default.bool,
|
|
57
|
-
isOnlyBreadcrumb: _propTypes.default.bool,
|
|
58
|
-
highlightLastBreadcrumb: _propTypes.default.bool,
|
|
59
|
-
truncateLastBreadcrumb: _propTypes.default.bool
|
|
60
|
-
};
|
|
61
|
-
var EuiBreadcrumbContent = function EuiBreadcrumbContent(_ref2) {
|
|
62
|
-
var text = _ref2.text,
|
|
63
|
-
truncate = _ref2.truncate,
|
|
64
|
-
type = _ref2.type,
|
|
65
|
-
href = _ref2.href,
|
|
66
|
-
rel = _ref2.rel,
|
|
67
|
-
onClick = _ref2.onClick,
|
|
68
|
-
popoverContent = _ref2.popoverContent,
|
|
69
|
-
popoverProps = _ref2.popoverProps,
|
|
70
|
-
className = _ref2.className,
|
|
71
|
-
color = _ref2.color,
|
|
41
|
+
var EuiBreadcrumbCollapsed = function EuiBreadcrumbCollapsed(_ref2) {
|
|
42
|
+
var children = _ref2.children,
|
|
72
43
|
isFirstBreadcrumb = _ref2.isFirstBreadcrumb,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
highlightLastBreadcrumb = _ref2.highlightLastBreadcrumb,
|
|
76
|
-
truncateLastBreadcrumb = _ref2.truncateLastBreadcrumb,
|
|
77
|
-
rest = (0, _objectWithoutProperties2.default)(_ref2, _excluded2);
|
|
78
|
-
var classes = (0, _classnames.default)('euiBreadcrumb__content', className);
|
|
79
|
-
var euiTheme = (0, _services.useEuiTheme)();
|
|
80
|
-
var styles = (0, _breadcrumb.euiBreadcrumbContentStyles)(euiTheme);
|
|
81
|
-
var cssStyles = [styles.euiBreadcrumb__content, styles[type], truncate && !truncateLastBreadcrumb && styles.isTruncated, truncateLastBreadcrumb && styles.isTruncatedLast];
|
|
82
|
-
if (type === 'application') {
|
|
83
|
-
if (isOnlyBreadcrumb) {
|
|
84
|
-
cssStyles.push(styles.applicationStyles.onlyChild);
|
|
85
|
-
} else if (isFirstBreadcrumb) {
|
|
86
|
-
cssStyles.push(styles.applicationStyles.firstChild);
|
|
87
|
-
} else if (isLastBreadcrumb) {
|
|
88
|
-
cssStyles.push(styles.applicationStyles.lastChild);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
var isInteractiveBreadcrumb = href || onClick;
|
|
92
|
-
var linkColor = color || (highlightLastBreadcrumb ? 'text' : 'subdued');
|
|
93
|
-
var plainTextColor = highlightLastBreadcrumb ? 'default' : 'subdued'; // Does not inherit `color` prop
|
|
94
|
-
var ariaCurrent = highlightLastBreadcrumb ? 'page' : undefined;
|
|
95
|
-
var isPopoverBreadcrumb = !!popoverContent;
|
|
96
|
-
var _useState = (0, _react.useState)(false),
|
|
97
|
-
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
98
|
-
isPopoverOpen = _useState2[0],
|
|
99
|
-
setIsPopoverOpen = _useState2[1];
|
|
100
|
-
var popoverAriaLabel = (0, _i18n.useEuiI18n)('euiBreadcrumb.popoverAriaLabel', 'Clicking this button will toggle a popover dialog.');
|
|
101
|
-
return (0, _react2.jsx)(_inner_text.EuiInnerText, null, function (ref, innerText) {
|
|
102
|
-
var title = innerText === '' ? undefined : innerText;
|
|
103
|
-
var baseProps = {
|
|
104
|
-
ref: ref,
|
|
105
|
-
title: title,
|
|
106
|
-
'aria-current': ariaCurrent
|
|
107
|
-
};
|
|
108
|
-
var styleProps = {
|
|
109
|
-
className: classes,
|
|
110
|
-
css: cssStyles
|
|
111
|
-
};
|
|
112
|
-
if (isPopoverBreadcrumb) {
|
|
113
|
-
var _closePopover = function _closePopover() {
|
|
114
|
-
return setIsPopoverOpen(false);
|
|
115
|
-
};
|
|
116
|
-
return (0, _react2.jsx)(_popover.EuiPopover, (0, _extends2.default)({}, popoverProps, {
|
|
117
|
-
isOpen: isPopoverOpen,
|
|
118
|
-
closePopover: _closePopover,
|
|
119
|
-
css: !isLastBreadcrumb && styles.euiBreadcrumb__popoverWrapper,
|
|
120
|
-
button: (0, _react2.jsx)(_link.EuiLink, (0, _extends2.default)({}, baseProps, {
|
|
121
|
-
color: linkColor,
|
|
122
|
-
css: styles.euiBreadcrumb__popoverButton
|
|
123
|
-
// Avoid passing href and onClick - should only toggle the popover
|
|
124
|
-
,
|
|
125
|
-
onClick: function onClick() {
|
|
126
|
-
return setIsPopoverOpen(function (isOpen) {
|
|
127
|
-
return !isOpen;
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
}, rest), (0, _react2.jsx)("span", styleProps, text), (0, _react2.jsx)(_icon.EuiIcon, {
|
|
131
|
-
type: "arrowDown",
|
|
132
|
-
size: "s",
|
|
133
|
-
"aria-label": " - ".concat(popoverAriaLabel)
|
|
134
|
-
}))
|
|
135
|
-
}), typeof popoverContent === 'function' ? popoverContent(_closePopover) : popoverContent);
|
|
136
|
-
} else if (isInteractiveBreadcrumb) {
|
|
137
|
-
return (0, _react2.jsx)(_link.EuiLink, (0, _extends2.default)({}, baseProps, styleProps, {
|
|
138
|
-
color: linkColor,
|
|
139
|
-
onClick: onClick,
|
|
140
|
-
href: href,
|
|
141
|
-
rel: rel
|
|
142
|
-
}, rest), text);
|
|
143
|
-
} else {
|
|
144
|
-
return (0, _react2.jsx)(_text.EuiTextColor, {
|
|
145
|
-
color: plainTextColor,
|
|
146
|
-
cloneElement: true
|
|
147
|
-
}, (0, _react2.jsx)("span", (0, _extends2.default)({}, baseProps, styleProps, rest), text));
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
};
|
|
151
|
-
exports.EuiBreadcrumbContent = EuiBreadcrumbContent;
|
|
152
|
-
EuiBreadcrumbContent.propTypes = {
|
|
153
|
-
className: _propTypes.default.string,
|
|
154
|
-
"aria-label": _propTypes.default.string,
|
|
155
|
-
"data-test-subj": _propTypes.default.string,
|
|
156
|
-
css: _propTypes.default.any,
|
|
157
|
-
href: _propTypes.default.string,
|
|
158
|
-
rel: _propTypes.default.string,
|
|
159
|
-
onClick: _propTypes.default.func,
|
|
160
|
-
/**
|
|
161
|
-
* Visible label of the breadcrumb
|
|
162
|
-
*/
|
|
163
|
-
text: _propTypes.default.node.isRequired,
|
|
164
|
-
/**
|
|
165
|
-
* Force a max-width on the breadcrumb text
|
|
166
|
-
*/
|
|
167
|
-
truncate: _propTypes.default.bool,
|
|
168
|
-
/**
|
|
169
|
-
* Accepts any EuiLink `color` when rendered as one (has `href`, `onClick`, or `popoverContent`)
|
|
170
|
-
*/
|
|
171
|
-
color: _propTypes.default.any,
|
|
172
|
-
/**
|
|
173
|
-
* Override the existing `aria-current` which defaults to `page` for the last breadcrumb
|
|
174
|
-
*/
|
|
175
|
-
"aria-current": _propTypes.default.any,
|
|
176
|
-
/**
|
|
177
|
-
* Creates a breadcrumb that toggles a popover dialog. Takes any rendered node(s),
|
|
178
|
-
* or a render function that will pass callback allowing you to close the
|
|
179
|
-
* breadcrumb popover from within your popover content.
|
|
180
|
-
*
|
|
181
|
-
* If passed, both `href` and `onClick` will be ignored - the breadcrumb's
|
|
182
|
-
* click behavior should only trigger a popover.
|
|
183
|
-
*/
|
|
184
|
-
popoverContent: _propTypes.default.oneOfType([_propTypes.default.node.isRequired, _propTypes.default.func.isRequired]),
|
|
185
|
-
/**
|
|
186
|
-
* Allows customizing the popover if necessary. Accepts any props that
|
|
187
|
-
* [EuiPopover](/#/layout/popover) accepts, except for props that control state.
|
|
188
|
-
*/
|
|
189
|
-
popoverProps: _propTypes.default.shape({
|
|
190
|
-
/**
|
|
191
|
-
* Alignment of the popover and arrow relative to the button
|
|
192
|
-
*/
|
|
193
|
-
anchorPosition: _propTypes.default.any,
|
|
194
|
-
/**
|
|
195
|
-
* Style and position alteration for arrow-less attachment.
|
|
196
|
-
* Intended for use with inputs as anchors, e.g. EuiInputPopover
|
|
197
|
-
*/
|
|
198
|
-
attachToAnchor: _propTypes.default.bool,
|
|
199
|
-
/**
|
|
200
|
-
* Restrict the popover's position within this element
|
|
201
|
-
*/
|
|
202
|
-
container: _propTypes.default.any,
|
|
203
|
-
/**
|
|
204
|
-
* CSS display type for both the popover and anchor
|
|
205
|
-
*/
|
|
206
|
-
display: _propTypes.default.any,
|
|
207
|
-
/**
|
|
208
|
-
* Object of props passed to EuiFocusTrap
|
|
209
|
-
*/
|
|
210
|
-
focusTrapProps: _propTypes.default.any,
|
|
211
|
-
/**
|
|
212
|
-
* Show arrow indicating to originating button
|
|
213
|
-
*/
|
|
214
|
-
hasArrow: _propTypes.default.bool,
|
|
215
|
-
/**
|
|
216
|
-
* Specifies what element should initially have focus; Can be a DOM
|
|
217
|
-
* node, or a selector string (which will be passed to
|
|
218
|
-
* document.querySelector() to find the DOM node), or a function that
|
|
219
|
-
* returns a DOM node.
|
|
220
|
-
*
|
|
221
|
-
* If not passed, initial focus defaults to the popover panel.
|
|
222
|
-
*/
|
|
223
|
-
initialFocus: _propTypes.default.any,
|
|
224
|
-
/**
|
|
225
|
-
* Passed directly to EuiPortal for DOM positioning. Both properties are
|
|
226
|
-
* required if prop is specified
|
|
227
|
-
*/
|
|
228
|
-
insert: _propTypes.default.shape({
|
|
229
|
-
sibling: _propTypes.default.any.isRequired,
|
|
230
|
-
position: _propTypes.default.oneOf(["before", "after"]).isRequired
|
|
231
|
-
}),
|
|
232
|
-
/**
|
|
233
|
-
* Traps tab focus within the popover contents
|
|
234
|
-
*/
|
|
235
|
-
ownFocus: _propTypes.default.bool,
|
|
236
|
-
/**
|
|
237
|
-
* Custom class added to the EuiPanel containing the popover contents
|
|
238
|
-
*/
|
|
239
|
-
panelClassName: _propTypes.default.string,
|
|
240
|
-
/**
|
|
241
|
-
* EuiPanel padding on all sides
|
|
242
|
-
*/
|
|
243
|
-
panelPaddingSize: _propTypes.default.any,
|
|
244
|
-
/**
|
|
245
|
-
* Standard DOM `style` attribute. Passed to the EuiPanel
|
|
246
|
-
*/
|
|
247
|
-
panelStyle: _propTypes.default.any,
|
|
248
|
-
/**
|
|
249
|
-
* Object of props passed to EuiPanel. See #EuiPopoverPanelProps
|
|
250
|
-
*/
|
|
251
|
-
panelProps: _propTypes.default.shape({
|
|
252
|
-
element: _propTypes.default.oneOf(["div"]),
|
|
253
|
-
/**
|
|
254
|
-
* Padding for all four sides
|
|
255
|
-
*/
|
|
256
|
-
paddingSize: _propTypes.default.any,
|
|
257
|
-
/**
|
|
258
|
-
* Corner border radius
|
|
259
|
-
*/
|
|
260
|
-
borderRadius: _propTypes.default.any,
|
|
261
|
-
/**
|
|
262
|
-
* When true the panel will grow in height to match `EuiFlexItem`
|
|
263
|
-
*/
|
|
264
|
-
grow: _propTypes.default.bool,
|
|
265
|
-
panelRef: _propTypes.default.any,
|
|
266
|
-
className: _propTypes.default.string,
|
|
267
|
-
"aria-label": _propTypes.default.string,
|
|
268
|
-
"data-test-subj": _propTypes.default.string,
|
|
269
|
-
css: _propTypes.default.any
|
|
270
|
-
}),
|
|
271
|
-
panelRef: _propTypes.default.any,
|
|
272
|
-
/**
|
|
273
|
-
* Optional screen reader instructions to announce upon popover open,
|
|
274
|
-
* in addition to EUI's default popover instructions for Escape on close.
|
|
275
|
-
* Useful for popovers that may have additional keyboard capabilities such as
|
|
276
|
-
* arrow navigation.
|
|
277
|
-
*/
|
|
278
|
-
popoverScreenReaderText: _propTypes.default.oneOfType([_propTypes.default.string.isRequired, _propTypes.default.node.isRequired]),
|
|
279
|
-
popoverRef: _propTypes.default.any,
|
|
280
|
-
/**
|
|
281
|
-
* When `true`, the popover's position is re-calculated when the user
|
|
282
|
-
* scrolls, this supports having fixed-position popover anchors. When nesting
|
|
283
|
-
* an `EuiPopover` in a scrollable container, `repositionOnScroll` should be `true`
|
|
284
|
-
*/
|
|
285
|
-
repositionOnScroll: _propTypes.default.bool,
|
|
286
|
-
/**
|
|
287
|
-
* By default, popovers will attempt to position themselves along the initial
|
|
288
|
-
* axis specified. If there is not enough room either vertically or horizontally
|
|
289
|
-
* however, the popover will attempt to reposition itself along the secondary
|
|
290
|
-
* cross axis if there is room there instead.
|
|
291
|
-
*
|
|
292
|
-
* If you do not not want this repositioning to occur (and it is acceptable for
|
|
293
|
-
* the popover to appear offscreen), set this to false to disable this behavior.
|
|
294
|
-
*
|
|
295
|
-
* @default true
|
|
296
|
-
*/
|
|
297
|
-
repositionToCrossAxis: _propTypes.default.bool,
|
|
298
|
-
/**
|
|
299
|
-
* Must be set to true if using `EuiDragDropContext` within a popover,
|
|
300
|
-
* otherwise your nested drag & drop will have incorrect positioning
|
|
301
|
-
*/
|
|
302
|
-
hasDragDrop: _propTypes.default.bool,
|
|
303
|
-
/**
|
|
304
|
-
* By default, popover content inherits the z-index of the anchor
|
|
305
|
-
* component; pass `zIndex` to override
|
|
306
|
-
*/
|
|
307
|
-
zIndex: _propTypes.default.number,
|
|
308
|
-
/**
|
|
309
|
-
* Distance away from the anchor that the popover will render
|
|
310
|
-
*/
|
|
311
|
-
offset: _propTypes.default.number,
|
|
312
|
-
/**
|
|
313
|
-
* Minimum distance between the popover and the bounding container;
|
|
314
|
-
* Pass an array of 4 values to adjust each side differently: `[top, right, bottom, left]`
|
|
315
|
-
* Default is 16
|
|
316
|
-
*/
|
|
317
|
-
buffer: _propTypes.default.oneOfType([_propTypes.default.number.isRequired, _propTypes.default.any.isRequired]),
|
|
318
|
-
/**
|
|
319
|
-
* Element to pass as the child element of the arrow;
|
|
320
|
-
* Use case is typically limited to an accompanying `EuiBeacon`
|
|
321
|
-
*/
|
|
322
|
-
arrowChildren: _propTypes.default.node,
|
|
323
|
-
/**
|
|
324
|
-
* Provide a name to the popover panel
|
|
325
|
-
*/
|
|
326
|
-
"aria-label": _propTypes.default.string,
|
|
327
|
-
/**
|
|
328
|
-
* Alternative option to `aria-label` that takes an `id`.
|
|
329
|
-
* Usually takes the `id` of the popover title
|
|
330
|
-
*/
|
|
331
|
-
"aria-labelledby": _propTypes.default.string,
|
|
332
|
-
/**
|
|
333
|
-
* Function callback for when the popover positon changes
|
|
334
|
-
*/
|
|
335
|
-
onPositionChange: _propTypes.default.func,
|
|
336
|
-
className: _propTypes.default.string,
|
|
337
|
-
"data-test-subj": _propTypes.default.string,
|
|
338
|
-
css: _propTypes.default.any
|
|
339
|
-
}),
|
|
340
|
-
type: _propTypes.default.oneOf(["page", "application"]).isRequired,
|
|
341
|
-
isFirstBreadcrumb: _propTypes.default.bool,
|
|
342
|
-
isLastBreadcrumb: _propTypes.default.bool,
|
|
343
|
-
isOnlyBreadcrumb: _propTypes.default.bool,
|
|
344
|
-
highlightLastBreadcrumb: _propTypes.default.bool,
|
|
345
|
-
truncateLastBreadcrumb: _propTypes.default.bool
|
|
346
|
-
};
|
|
347
|
-
var EuiBreadcrumbCollapsed = function EuiBreadcrumbCollapsed(_ref3) {
|
|
348
|
-
var children = _ref3.children,
|
|
349
|
-
isFirstBreadcrumb = _ref3.isFirstBreadcrumb,
|
|
350
|
-
type = _ref3.type;
|
|
351
|
-
var euiTheme = (0, _services.useEuiTheme)();
|
|
352
|
-
var styles = (0, _breadcrumb.euiBreadcrumbStyles)(euiTheme);
|
|
44
|
+
type = _ref2.type;
|
|
45
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_breadcrumb.euiBreadcrumbStyles);
|
|
353
46
|
var cssStyles = [styles.isCollapsed];
|
|
354
47
|
var ariaLabel = (0, _i18n.useEuiI18n)('euiBreadcrumb.collapsedBadge.ariaLabel', 'See collapsed breadcrumbs');
|
|
355
48
|
return (0, _react2.jsx)(EuiBreadcrumb, {
|
|
356
49
|
css: cssStyles,
|
|
357
50
|
type: type
|
|
358
|
-
}, (0, _react2.jsx)(EuiBreadcrumbContent, {
|
|
51
|
+
}, (0, _react2.jsx)(_breadcrumb_content.EuiBreadcrumbContent, {
|
|
359
52
|
popoverContent: children,
|
|
360
53
|
text: (0, _react2.jsx)("span", {
|
|
361
54
|
"aria-label": ariaLabel
|
|
@@ -366,12 +59,4 @@ var EuiBreadcrumbCollapsed = function EuiBreadcrumbCollapsed(_ref3) {
|
|
|
366
59
|
type: type
|
|
367
60
|
}));
|
|
368
61
|
};
|
|
369
|
-
exports.EuiBreadcrumbCollapsed = EuiBreadcrumbCollapsed;
|
|
370
|
-
EuiBreadcrumbCollapsed.propTypes = {
|
|
371
|
-
type: _propTypes.default.oneOf(["page", "application"]).isRequired,
|
|
372
|
-
isFirstBreadcrumb: _propTypes.default.bool,
|
|
373
|
-
isLastBreadcrumb: _propTypes.default.bool,
|
|
374
|
-
isOnlyBreadcrumb: _propTypes.default.bool,
|
|
375
|
-
highlightLastBreadcrumb: _propTypes.default.bool,
|
|
376
|
-
truncateLastBreadcrumb: _propTypes.default.bool
|
|
377
|
-
};
|
|
62
|
+
exports.EuiBreadcrumbCollapsed = EuiBreadcrumbCollapsed;
|
|
@@ -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;
|
|
@@ -15,6 +15,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
15
15
|
var _i18n = require("../i18n");
|
|
16
16
|
var _services = require("../../services");
|
|
17
17
|
var _breadcrumb = require("./breadcrumb");
|
|
18
|
+
var _breadcrumb_content = require("./_breadcrumb_content");
|
|
18
19
|
var _breadcrumbs = require("./breadcrumbs.styles");
|
|
19
20
|
var _react2 = require("@emotion/react");
|
|
20
21
|
var _excluded = ["breadcrumbs", "className", "responsive", "truncate", "max", "type", "lastBreadcrumbIsCurrentPage"];
|
|
@@ -47,8 +48,7 @@ var EuiBreadcrumbs = function EuiBreadcrumbs(_ref) {
|
|
|
47
48
|
lastBreadcrumbIsCurrentPage = _ref$lastBreadcrumbIs === void 0 ? true : _ref$lastBreadcrumbIs,
|
|
48
49
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
49
50
|
var ariaLabel = (0, _i18n.useEuiI18n)('euiBreadcrumbs.nav.ariaLabel', 'Breadcrumbs');
|
|
50
|
-
var
|
|
51
|
-
var breadcrumbsListStyles = (0, _breadcrumbs.euiBreadcrumbsListStyles)(euiTheme);
|
|
51
|
+
var breadcrumbsListStyles = (0, _services.useEuiMemoizedStyles)(_breadcrumbs.euiBreadcrumbsListStyles);
|
|
52
52
|
var cssBreadcrumbsListStyles = [breadcrumbsListStyles.euiBreadcrumbs__list, truncate && breadcrumbsListStyles.isTruncated];
|
|
53
53
|
var responsiveMax = useResponsiveMax(responsive, max);
|
|
54
54
|
var visibleBreadcrumbs = (0, _react.useMemo)(function () {
|
|
@@ -77,7 +77,7 @@ var EuiBreadcrumbs = function EuiBreadcrumbs(_ref) {
|
|
|
77
77
|
max: 0
|
|
78
78
|
})) : (0, _react2.jsx)(_breadcrumb.EuiBreadcrumb, (0, _extends2.default)({
|
|
79
79
|
key: index
|
|
80
|
-
}, sharedProps), (0, _react2.jsx)(
|
|
80
|
+
}, sharedProps), (0, _react2.jsx)(_breadcrumb_content.EuiBreadcrumbContent, (0, _extends2.default)({}, breadcrumb, sharedProps, {
|
|
81
81
|
isFirstBreadcrumb: isFirstBreadcrumb,
|
|
82
82
|
isLastBreadcrumb: isLastBreadcrumb,
|
|
83
83
|
isOnlyBreadcrumb: isOnlyBreadcrumb,
|
|
@@ -62,9 +62,9 @@ var EuiButtonGroup = function EuiButtonGroup(_ref) {
|
|
|
62
62
|
}), (0, _react2.jsx)(_accessibility.EuiScreenReaderOnly, null, (0, _react2.jsx)("legend", null, legend)), (0, _react2.jsx)("div", {
|
|
63
63
|
css: cssStyles,
|
|
64
64
|
className: "euiButtonGroup__buttons"
|
|
65
|
-
}, options.map(function (option
|
|
65
|
+
}, options.map(function (option) {
|
|
66
66
|
return (0, _react2.jsx)(_button_group_button.EuiButtonGroupButton, (0, _extends2.default)({
|
|
67
|
-
key:
|
|
67
|
+
key: option.id,
|
|
68
68
|
isDisabled: isDisabled
|
|
69
69
|
}, option, {
|
|
70
70
|
onClick: typeIsSingle ? function () {
|
|
@@ -139,6 +139,20 @@ EuiButtonGroup.propTypes = {
|
|
|
139
139
|
* The type of the underlying HTML button
|
|
140
140
|
*/
|
|
141
141
|
type: _propTypes.default.any,
|
|
142
|
+
/**
|
|
143
|
+
* By default, will use the button text for the native browser title.
|
|
144
|
+
*
|
|
145
|
+
* This can be either customized or unset via `title: ''` if necessary.
|
|
146
|
+
*/
|
|
147
|
+
title: _propTypes.default.any,
|
|
148
|
+
/**
|
|
149
|
+
* Optional custom tooltip content for the button
|
|
150
|
+
*/
|
|
151
|
+
toolTipContent: _propTypes.default.node,
|
|
152
|
+
/**
|
|
153
|
+
* Optional props to pass to the underlying **[EuiToolTip](/#/display/tooltip)**
|
|
154
|
+
*/
|
|
155
|
+
toolTipProps: _propTypes.default.any,
|
|
142
156
|
/**
|
|
143
157
|
* Any `type` accepted by EuiIcon
|
|
144
158
|
*/
|
|
@@ -36,7 +36,7 @@ var euiButtonGroupButtonsStyles = function euiButtonGroupButtonsStyles(euiThemeC
|
|
|
36
36
|
return {
|
|
37
37
|
// Base
|
|
38
38
|
euiButtonGroup__buttons: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-width', '100%'), " display:flex;;label:euiButtonGroup__buttons;"),
|
|
39
|
-
fullWidth: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', '100%'), " .euiButtonGroupButton{flex:1;};label:fullWidth;"),
|
|
39
|
+
fullWidth: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', '100%'), " .euiButtonGroupButton,.euiButtonGroup__tooltipWrapper{flex:1;", (0, _global_styling.logicalCSS)('width', '100%'), ";};label:fullWidth;"),
|
|
40
40
|
// Sizes
|
|
41
41
|
m: /*#__PURE__*/(0, _react.css)("border-radius:", euiTheme.border.radius.medium, ";;label:m;"),
|
|
42
42
|
s: /*#__PURE__*/(0, _react.css)("border-radius:", euiTheme.border.radius.small, ";;label:s;"),
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.EuiButtonGroupButton = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
8
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
11
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
@@ -16,8 +17,9 @@ var _button = require("../../../themes/amsterdam/global_styling/mixins/button");
|
|
|
16
17
|
var _inner_text = require("../../inner_text");
|
|
17
18
|
var _button_display = require("../button_display/_button_display");
|
|
18
19
|
var _button_group_button = require("./button_group_button.styles");
|
|
20
|
+
var _tool_tip = require("../../../components/tool_tip");
|
|
19
21
|
var _react2 = require("@emotion/react");
|
|
20
|
-
var _excluded = ["className", "id", "isDisabled", "isIconOnly", "isSelected", "label", "value", "size", "color"];
|
|
22
|
+
var _excluded = ["className", "id", "isDisabled", "isIconOnly", "isSelected", "label", "value", "size", "color", "toolTipContent", "toolTipProps"];
|
|
21
23
|
/*
|
|
22
24
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
23
25
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -25,6 +27,8 @@ var _excluded = ["className", "id", "isDisabled", "isIconOnly", "isSelected", "l
|
|
|
25
27
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
26
28
|
* Side Public License, v 1.
|
|
27
29
|
*/
|
|
30
|
+
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; }
|
|
31
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
28
32
|
var EuiButtonGroupButton = function EuiButtonGroupButton(_ref) {
|
|
29
33
|
var className = _ref.className,
|
|
30
34
|
id = _ref.id,
|
|
@@ -37,17 +41,21 @@ var EuiButtonGroupButton = function EuiButtonGroupButton(_ref) {
|
|
|
37
41
|
size = _ref.size,
|
|
38
42
|
_ref$color = _ref.color,
|
|
39
43
|
_color = _ref$color === void 0 ? 'primary' : _ref$color,
|
|
44
|
+
toolTipContent = _ref.toolTipContent,
|
|
45
|
+
toolTipProps = _ref.toolTipProps,
|
|
40
46
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
41
47
|
var isCompressed = size === 'compressed';
|
|
42
48
|
var color = isDisabled ? 'disabled' : _color;
|
|
43
49
|
var display = isSelected ? 'fill' : isCompressed ? 'empty' : 'base';
|
|
50
|
+
var hasToolTip = !!toolTipContent;
|
|
44
51
|
var euiTheme = (0, _services.useEuiTheme)();
|
|
45
52
|
var buttonColorStyles = (0, _button.useEuiButtonColorCSS)({
|
|
46
53
|
display: display
|
|
47
54
|
})[color];
|
|
48
55
|
var focusColorStyles = isCompressed ? (0, _button_group_button._compressedButtonFocusColor)(euiTheme, color) : (0, _button_group_button._uncompressedButtonFocus)(euiTheme);
|
|
49
56
|
var styles = (0, _button_group_button.euiButtonGroupButtonStyles)(euiTheme);
|
|
50
|
-
var cssStyles = [styles.euiButtonGroupButton, isIconOnly && styles.iconOnly, styles[size],
|
|
57
|
+
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];
|
|
58
|
+
var tooltipWrapperStyles = [styles.tooltipWrapper, !isCompressed && styles.uncompressed[size]];
|
|
51
59
|
var contentStyles = [styles.content.euiButtonGroupButton__content, isCompressed && styles.content.compressed];
|
|
52
60
|
var textStyles = [isIconOnly ? styles.text.euiButtonGroupButton__iconOnly : styles.text.euiButtonGroupButton__text];
|
|
53
61
|
var buttonClasses = (0, _classnames.default)('euiButtonGroupButton', {
|
|
@@ -64,7 +72,12 @@ var EuiButtonGroupButton = function EuiButtonGroupButton(_ref) {
|
|
|
64
72
|
_useInnerText2 = (0, _slicedToArray2.default)(_useInnerText, 2),
|
|
65
73
|
buttonTextRef = _useInnerText2[0],
|
|
66
74
|
innerText = _useInnerText2[1];
|
|
67
|
-
return (0, _react2.jsx)(
|
|
75
|
+
return (0, _react2.jsx)(EuiButtonGroupButtonWithToolTip, {
|
|
76
|
+
toolTipContent: toolTipContent,
|
|
77
|
+
toolTipProps: toolTipProps,
|
|
78
|
+
wrapperCss: tooltipWrapperStyles,
|
|
79
|
+
isSelected: isSelected
|
|
80
|
+
}, (0, _react2.jsx)(_button_display.EuiButtonDisplay, (0, _extends2.default)({
|
|
68
81
|
css: cssStyles,
|
|
69
82
|
className: buttonClasses,
|
|
70
83
|
isDisabled: isDisabled,
|
|
@@ -80,7 +93,7 @@ var EuiButtonGroupButton = function EuiButtonGroupButton(_ref) {
|
|
|
80
93
|
title: innerText,
|
|
81
94
|
"data-test-subj": id,
|
|
82
95
|
isSelected: isSelected
|
|
83
|
-
}, rest), label);
|
|
96
|
+
}, rest), label));
|
|
84
97
|
};
|
|
85
98
|
exports.EuiButtonGroupButton = EuiButtonGroupButton;
|
|
86
99
|
EuiButtonGroupButton.propTypes = {
|
|
@@ -101,6 +114,20 @@ EuiButtonGroupButton.propTypes = {
|
|
|
101
114
|
* The type of the underlying HTML button
|
|
102
115
|
*/
|
|
103
116
|
type: _propTypes.default.any,
|
|
117
|
+
/**
|
|
118
|
+
* By default, will use the button text for the native browser title.
|
|
119
|
+
*
|
|
120
|
+
* This can be either customized or unset via `title: ''` if necessary.
|
|
121
|
+
*/
|
|
122
|
+
title: _propTypes.default.any,
|
|
123
|
+
/**
|
|
124
|
+
* Optional custom tooltip content for the button
|
|
125
|
+
*/
|
|
126
|
+
toolTipContent: _propTypes.default.node,
|
|
127
|
+
/**
|
|
128
|
+
* Optional props to pass to the underlying **[EuiToolTip](/#/display/tooltip)**
|
|
129
|
+
*/
|
|
130
|
+
toolTipProps: _propTypes.default.any,
|
|
104
131
|
/**
|
|
105
132
|
* Any `type` accepted by EuiIcon
|
|
106
133
|
*/
|
|
@@ -139,7 +166,7 @@ EuiButtonGroupButton.propTypes = {
|
|
|
139
166
|
/**
|
|
140
167
|
* Inherit from EuiButtonGroup
|
|
141
168
|
*/
|
|
142
|
-
size: _propTypes.default.
|
|
169
|
+
size: _propTypes.default.any.isRequired,
|
|
143
170
|
/**
|
|
144
171
|
* Inherit from EuiButtonGroup
|
|
145
172
|
*/
|
|
@@ -148,4 +175,28 @@ EuiButtonGroupButton.propTypes = {
|
|
|
148
175
|
* Inherit from EuiButtonGroup
|
|
149
176
|
*/
|
|
150
177
|
onClick: _propTypes.default.func.isRequired
|
|
178
|
+
};
|
|
179
|
+
var EuiButtonGroupButtonWithToolTip = function EuiButtonGroupButtonWithToolTip(_ref2) {
|
|
180
|
+
var _toolTipProps$anchorP, _toolTipProps$anchorP2;
|
|
181
|
+
var toolTipContent = _ref2.toolTipContent,
|
|
182
|
+
toolTipProps = _ref2.toolTipProps,
|
|
183
|
+
wrapperCss = _ref2.wrapperCss,
|
|
184
|
+
isSelected = _ref2.isSelected,
|
|
185
|
+
children = _ref2.children;
|
|
186
|
+
return toolTipContent ? (0, _react2.jsx)(_tool_tip.EuiToolTip, (0, _extends2.default)({
|
|
187
|
+
content: toolTipContent,
|
|
188
|
+
position: "top"
|
|
189
|
+
}, toolTipProps, {
|
|
190
|
+
anchorProps: _objectSpread(_objectSpread({}, toolTipProps === null || toolTipProps === void 0 ? void 0 : toolTipProps.anchorProps), {}, {
|
|
191
|
+
className: (0, _classnames.default)('euiButtonGroup__tooltipWrapper', {
|
|
192
|
+
'euiButtonGroup__tooltipWrapper-isSelected': isSelected
|
|
193
|
+
}, toolTipProps === null || toolTipProps === void 0 ? void 0 : (_toolTipProps$anchorP = toolTipProps.anchorProps) === null || _toolTipProps$anchorP === void 0 ? void 0 : _toolTipProps$anchorP.className),
|
|
194
|
+
css: [wrapperCss, toolTipProps === null || toolTipProps === void 0 ? void 0 : (_toolTipProps$anchorP2 = toolTipProps.anchorProps) === null || _toolTipProps$anchorP2 === void 0 ? void 0 : _toolTipProps$anchorP2.css]
|
|
195
|
+
})
|
|
196
|
+
}), children) : children;
|
|
197
|
+
};
|
|
198
|
+
EuiButtonGroupButtonWithToolTip.propTypes = {
|
|
199
|
+
children: _propTypes.default.element.isRequired,
|
|
200
|
+
wrapperCss: _propTypes.default.any.isRequired,
|
|
201
|
+
isSelected: _propTypes.default.bool.isRequired
|
|
151
202
|
};
|