@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,24 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
|
-
exports.
|
|
8
|
-
var _react =
|
|
9
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
6
|
+
exports.EuiBreadcrumbCollapsed = exports.EuiBreadcrumb = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
8
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
9
|
var _services = require("../../services");
|
|
12
|
-
var _inner_text = require("../inner_text");
|
|
13
|
-
var _text = require("../text");
|
|
14
|
-
var _link = require("../link");
|
|
15
|
-
var _popover = require("../popover");
|
|
16
|
-
var _icon = require("../icon");
|
|
17
10
|
var _i18n = require("../i18n");
|
|
11
|
+
var _breadcrumb_content = require("./_breadcrumb_content");
|
|
18
12
|
var _breadcrumb = require("./breadcrumb.styles");
|
|
19
13
|
var _react2 = require("@emotion/react");
|
|
20
|
-
var _excluded = ["children", "className", "type", "truncate"]
|
|
21
|
-
_excluded2 = ["text", "truncate", "type", "href", "rel", "onClick", "popoverContent", "popoverProps", "className", "color", "isFirstBreadcrumb", "isLastBreadcrumb", "isOnlyBreadcrumb", "highlightLastBreadcrumb", "truncateLastBreadcrumb"];
|
|
14
|
+
var _excluded = ["children", "className", "type", "truncate"];
|
|
22
15
|
/*
|
|
23
16
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
24
17
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -26,16 +19,7 @@ var _excluded = ["children", "className", "type", "truncate"],
|
|
|
26
19
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
27
20
|
* Side Public License, v 1.
|
|
28
21
|
*/
|
|
29
|
-
// Used internally only by the parent EuiBreadcrumbs
|
|
30
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
|
-
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); }
|
|
32
|
-
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; }
|
|
33
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
34
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
35
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
36
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
37
|
-
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
38
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
39
23
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
40
24
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
41
25
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -46,8 +30,7 @@ var EuiBreadcrumb = function EuiBreadcrumb(_ref) {
|
|
|
46
30
|
truncate = _ref.truncate,
|
|
47
31
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
48
32
|
var classes = (0, _classnames.default)('euiBreadcrumb', className);
|
|
49
|
-
var
|
|
50
|
-
var styles = (0, _breadcrumb.euiBreadcrumbStyles)(euiTheme);
|
|
33
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_breadcrumb.euiBreadcrumbStyles);
|
|
51
34
|
var cssStyles = [styles.euiBreadcrumb, styles[type], truncate && styles.isTruncated];
|
|
52
35
|
return (0, _react2.jsx)("li", _extends({
|
|
53
36
|
className: classes,
|
|
@@ -56,312 +39,17 @@ var EuiBreadcrumb = function EuiBreadcrumb(_ref) {
|
|
|
56
39
|
}, rest), children);
|
|
57
40
|
};
|
|
58
41
|
exports.EuiBreadcrumb = EuiBreadcrumb;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
isFirstBreadcrumb: _propTypes.default.bool,
|
|
62
|
-
isLastBreadcrumb: _propTypes.default.bool,
|
|
63
|
-
isOnlyBreadcrumb: _propTypes.default.bool,
|
|
64
|
-
highlightLastBreadcrumb: _propTypes.default.bool,
|
|
65
|
-
truncateLastBreadcrumb: _propTypes.default.bool
|
|
66
|
-
};
|
|
67
|
-
var EuiBreadcrumbContent = function EuiBreadcrumbContent(_ref2) {
|
|
68
|
-
var text = _ref2.text,
|
|
69
|
-
truncate = _ref2.truncate,
|
|
70
|
-
type = _ref2.type,
|
|
71
|
-
href = _ref2.href,
|
|
72
|
-
rel = _ref2.rel,
|
|
73
|
-
onClick = _ref2.onClick,
|
|
74
|
-
popoverContent = _ref2.popoverContent,
|
|
75
|
-
popoverProps = _ref2.popoverProps,
|
|
76
|
-
className = _ref2.className,
|
|
77
|
-
color = _ref2.color,
|
|
42
|
+
var EuiBreadcrumbCollapsed = function EuiBreadcrumbCollapsed(_ref2) {
|
|
43
|
+
var children = _ref2.children,
|
|
78
44
|
isFirstBreadcrumb = _ref2.isFirstBreadcrumb,
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
highlightLastBreadcrumb = _ref2.highlightLastBreadcrumb,
|
|
82
|
-
truncateLastBreadcrumb = _ref2.truncateLastBreadcrumb,
|
|
83
|
-
rest = _objectWithoutProperties(_ref2, _excluded2);
|
|
84
|
-
var classes = (0, _classnames.default)('euiBreadcrumb__content', className);
|
|
85
|
-
var euiTheme = (0, _services.useEuiTheme)();
|
|
86
|
-
var styles = (0, _breadcrumb.euiBreadcrumbContentStyles)(euiTheme);
|
|
87
|
-
var cssStyles = [styles.euiBreadcrumb__content, styles[type], truncate && !truncateLastBreadcrumb && styles.isTruncated, truncateLastBreadcrumb && styles.isTruncatedLast];
|
|
88
|
-
if (type === 'application') {
|
|
89
|
-
if (isOnlyBreadcrumb) {
|
|
90
|
-
cssStyles.push(styles.applicationStyles.onlyChild);
|
|
91
|
-
} else if (isFirstBreadcrumb) {
|
|
92
|
-
cssStyles.push(styles.applicationStyles.firstChild);
|
|
93
|
-
} else if (isLastBreadcrumb) {
|
|
94
|
-
cssStyles.push(styles.applicationStyles.lastChild);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
var isInteractiveBreadcrumb = href || onClick;
|
|
98
|
-
var linkColor = color || (highlightLastBreadcrumb ? 'text' : 'subdued');
|
|
99
|
-
var plainTextColor = highlightLastBreadcrumb ? 'default' : 'subdued'; // Does not inherit `color` prop
|
|
100
|
-
var ariaCurrent = highlightLastBreadcrumb ? 'page' : undefined;
|
|
101
|
-
var isPopoverBreadcrumb = !!popoverContent;
|
|
102
|
-
var _useState = (0, _react.useState)(false),
|
|
103
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
104
|
-
isPopoverOpen = _useState2[0],
|
|
105
|
-
setIsPopoverOpen = _useState2[1];
|
|
106
|
-
var popoverAriaLabel = (0, _i18n.useEuiI18n)('euiBreadcrumb.popoverAriaLabel', 'Clicking this button will toggle a popover dialog.');
|
|
107
|
-
return (0, _react2.jsx)(_inner_text.EuiInnerText, null, function (ref, innerText) {
|
|
108
|
-
var title = innerText === '' ? undefined : innerText;
|
|
109
|
-
var baseProps = {
|
|
110
|
-
ref: ref,
|
|
111
|
-
title: title,
|
|
112
|
-
'aria-current': ariaCurrent
|
|
113
|
-
};
|
|
114
|
-
var styleProps = {
|
|
115
|
-
className: classes,
|
|
116
|
-
css: cssStyles
|
|
117
|
-
};
|
|
118
|
-
if (isPopoverBreadcrumb) {
|
|
119
|
-
var _closePopover = function _closePopover() {
|
|
120
|
-
return setIsPopoverOpen(false);
|
|
121
|
-
};
|
|
122
|
-
return (0, _react2.jsx)(_popover.EuiPopover, _extends({}, popoverProps, {
|
|
123
|
-
isOpen: isPopoverOpen,
|
|
124
|
-
closePopover: _closePopover,
|
|
125
|
-
css: !isLastBreadcrumb && styles.euiBreadcrumb__popoverWrapper,
|
|
126
|
-
button: (0, _react2.jsx)(_link.EuiLink, _extends({}, baseProps, {
|
|
127
|
-
color: linkColor,
|
|
128
|
-
css: styles.euiBreadcrumb__popoverButton
|
|
129
|
-
// Avoid passing href and onClick - should only toggle the popover
|
|
130
|
-
,
|
|
131
|
-
onClick: function onClick() {
|
|
132
|
-
return setIsPopoverOpen(function (isOpen) {
|
|
133
|
-
return !isOpen;
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
}, rest), (0, _react2.jsx)("span", styleProps, text), (0, _react2.jsx)(_icon.EuiIcon, {
|
|
137
|
-
type: "arrowDown",
|
|
138
|
-
size: "s",
|
|
139
|
-
"aria-label": " - ".concat(popoverAriaLabel)
|
|
140
|
-
}))
|
|
141
|
-
}), typeof popoverContent === 'function' ? popoverContent(_closePopover) : popoverContent);
|
|
142
|
-
} else if (isInteractiveBreadcrumb) {
|
|
143
|
-
return (0, _react2.jsx)(_link.EuiLink, _extends({}, baseProps, styleProps, {
|
|
144
|
-
color: linkColor,
|
|
145
|
-
onClick: onClick,
|
|
146
|
-
href: href,
|
|
147
|
-
rel: rel
|
|
148
|
-
}, rest), text);
|
|
149
|
-
} else {
|
|
150
|
-
return (0, _react2.jsx)(_text.EuiTextColor, {
|
|
151
|
-
color: plainTextColor,
|
|
152
|
-
cloneElement: true
|
|
153
|
-
}, (0, _react2.jsx)("span", _extends({}, baseProps, styleProps, rest), text));
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
};
|
|
157
|
-
exports.EuiBreadcrumbContent = EuiBreadcrumbContent;
|
|
158
|
-
EuiBreadcrumbContent.propTypes = {
|
|
159
|
-
className: _propTypes.default.string,
|
|
160
|
-
"aria-label": _propTypes.default.string,
|
|
161
|
-
"data-test-subj": _propTypes.default.string,
|
|
162
|
-
css: _propTypes.default.any,
|
|
163
|
-
href: _propTypes.default.string,
|
|
164
|
-
rel: _propTypes.default.string,
|
|
165
|
-
onClick: _propTypes.default.func,
|
|
166
|
-
/**
|
|
167
|
-
* Visible label of the breadcrumb
|
|
168
|
-
*/
|
|
169
|
-
text: _propTypes.default.node.isRequired,
|
|
170
|
-
/**
|
|
171
|
-
* Force a max-width on the breadcrumb text
|
|
172
|
-
*/
|
|
173
|
-
truncate: _propTypes.default.bool,
|
|
174
|
-
/**
|
|
175
|
-
* Accepts any EuiLink `color` when rendered as one (has `href`, `onClick`, or `popoverContent`)
|
|
176
|
-
*/
|
|
177
|
-
color: _propTypes.default.any,
|
|
178
|
-
/**
|
|
179
|
-
* Override the existing `aria-current` which defaults to `page` for the last breadcrumb
|
|
180
|
-
*/
|
|
181
|
-
"aria-current": _propTypes.default.any,
|
|
182
|
-
/**
|
|
183
|
-
* Creates a breadcrumb that toggles a popover dialog. Takes any rendered node(s),
|
|
184
|
-
* or a render function that will pass callback allowing you to close the
|
|
185
|
-
* breadcrumb popover from within your popover content.
|
|
186
|
-
*
|
|
187
|
-
* If passed, both `href` and `onClick` will be ignored - the breadcrumb's
|
|
188
|
-
* click behavior should only trigger a popover.
|
|
189
|
-
*/
|
|
190
|
-
popoverContent: _propTypes.default.oneOfType([_propTypes.default.node.isRequired, _propTypes.default.func.isRequired]),
|
|
191
|
-
/**
|
|
192
|
-
* Allows customizing the popover if necessary. Accepts any props that
|
|
193
|
-
* [EuiPopover](/#/layout/popover) accepts, except for props that control state.
|
|
194
|
-
*/
|
|
195
|
-
popoverProps: _propTypes.default.shape({
|
|
196
|
-
/**
|
|
197
|
-
* Alignment of the popover and arrow relative to the button
|
|
198
|
-
*/
|
|
199
|
-
anchorPosition: _propTypes.default.any,
|
|
200
|
-
/**
|
|
201
|
-
* Style and position alteration for arrow-less attachment.
|
|
202
|
-
* Intended for use with inputs as anchors, e.g. EuiInputPopover
|
|
203
|
-
*/
|
|
204
|
-
attachToAnchor: _propTypes.default.bool,
|
|
205
|
-
/**
|
|
206
|
-
* Restrict the popover's position within this element
|
|
207
|
-
*/
|
|
208
|
-
container: _propTypes.default.any,
|
|
209
|
-
/**
|
|
210
|
-
* CSS display type for both the popover and anchor
|
|
211
|
-
*/
|
|
212
|
-
display: _propTypes.default.any,
|
|
213
|
-
/**
|
|
214
|
-
* Object of props passed to EuiFocusTrap
|
|
215
|
-
*/
|
|
216
|
-
focusTrapProps: _propTypes.default.any,
|
|
217
|
-
/**
|
|
218
|
-
* Show arrow indicating to originating button
|
|
219
|
-
*/
|
|
220
|
-
hasArrow: _propTypes.default.bool,
|
|
221
|
-
/**
|
|
222
|
-
* Specifies what element should initially have focus; Can be a DOM
|
|
223
|
-
* node, or a selector string (which will be passed to
|
|
224
|
-
* document.querySelector() to find the DOM node), or a function that
|
|
225
|
-
* returns a DOM node.
|
|
226
|
-
*
|
|
227
|
-
* If not passed, initial focus defaults to the popover panel.
|
|
228
|
-
*/
|
|
229
|
-
initialFocus: _propTypes.default.any,
|
|
230
|
-
/**
|
|
231
|
-
* Passed directly to EuiPortal for DOM positioning. Both properties are
|
|
232
|
-
* required if prop is specified
|
|
233
|
-
*/
|
|
234
|
-
insert: _propTypes.default.shape({
|
|
235
|
-
sibling: _propTypes.default.any.isRequired,
|
|
236
|
-
position: _propTypes.default.oneOf(["before", "after"]).isRequired
|
|
237
|
-
}),
|
|
238
|
-
/**
|
|
239
|
-
* Traps tab focus within the popover contents
|
|
240
|
-
*/
|
|
241
|
-
ownFocus: _propTypes.default.bool,
|
|
242
|
-
/**
|
|
243
|
-
* Custom class added to the EuiPanel containing the popover contents
|
|
244
|
-
*/
|
|
245
|
-
panelClassName: _propTypes.default.string,
|
|
246
|
-
/**
|
|
247
|
-
* EuiPanel padding on all sides
|
|
248
|
-
*/
|
|
249
|
-
panelPaddingSize: _propTypes.default.any,
|
|
250
|
-
/**
|
|
251
|
-
* Standard DOM `style` attribute. Passed to the EuiPanel
|
|
252
|
-
*/
|
|
253
|
-
panelStyle: _propTypes.default.any,
|
|
254
|
-
/**
|
|
255
|
-
* Object of props passed to EuiPanel. See #EuiPopoverPanelProps
|
|
256
|
-
*/
|
|
257
|
-
panelProps: _propTypes.default.shape({
|
|
258
|
-
element: _propTypes.default.oneOf(["div"]),
|
|
259
|
-
/**
|
|
260
|
-
* Padding for all four sides
|
|
261
|
-
*/
|
|
262
|
-
paddingSize: _propTypes.default.any,
|
|
263
|
-
/**
|
|
264
|
-
* Corner border radius
|
|
265
|
-
*/
|
|
266
|
-
borderRadius: _propTypes.default.any,
|
|
267
|
-
/**
|
|
268
|
-
* When true the panel will grow in height to match `EuiFlexItem`
|
|
269
|
-
*/
|
|
270
|
-
grow: _propTypes.default.bool,
|
|
271
|
-
panelRef: _propTypes.default.any,
|
|
272
|
-
className: _propTypes.default.string,
|
|
273
|
-
"aria-label": _propTypes.default.string,
|
|
274
|
-
"data-test-subj": _propTypes.default.string,
|
|
275
|
-
css: _propTypes.default.any
|
|
276
|
-
}),
|
|
277
|
-
panelRef: _propTypes.default.any,
|
|
278
|
-
/**
|
|
279
|
-
* Optional screen reader instructions to announce upon popover open,
|
|
280
|
-
* in addition to EUI's default popover instructions for Escape on close.
|
|
281
|
-
* Useful for popovers that may have additional keyboard capabilities such as
|
|
282
|
-
* arrow navigation.
|
|
283
|
-
*/
|
|
284
|
-
popoverScreenReaderText: _propTypes.default.oneOfType([_propTypes.default.string.isRequired, _propTypes.default.node.isRequired]),
|
|
285
|
-
popoverRef: _propTypes.default.any,
|
|
286
|
-
/**
|
|
287
|
-
* When `true`, the popover's position is re-calculated when the user
|
|
288
|
-
* scrolls, this supports having fixed-position popover anchors. When nesting
|
|
289
|
-
* an `EuiPopover` in a scrollable container, `repositionOnScroll` should be `true`
|
|
290
|
-
*/
|
|
291
|
-
repositionOnScroll: _propTypes.default.bool,
|
|
292
|
-
/**
|
|
293
|
-
* By default, popovers will attempt to position themselves along the initial
|
|
294
|
-
* axis specified. If there is not enough room either vertically or horizontally
|
|
295
|
-
* however, the popover will attempt to reposition itself along the secondary
|
|
296
|
-
* cross axis if there is room there instead.
|
|
297
|
-
*
|
|
298
|
-
* If you do not not want this repositioning to occur (and it is acceptable for
|
|
299
|
-
* the popover to appear offscreen), set this to false to disable this behavior.
|
|
300
|
-
*
|
|
301
|
-
* @default true
|
|
302
|
-
*/
|
|
303
|
-
repositionToCrossAxis: _propTypes.default.bool,
|
|
304
|
-
/**
|
|
305
|
-
* Must be set to true if using `EuiDragDropContext` within a popover,
|
|
306
|
-
* otherwise your nested drag & drop will have incorrect positioning
|
|
307
|
-
*/
|
|
308
|
-
hasDragDrop: _propTypes.default.bool,
|
|
309
|
-
/**
|
|
310
|
-
* By default, popover content inherits the z-index of the anchor
|
|
311
|
-
* component; pass `zIndex` to override
|
|
312
|
-
*/
|
|
313
|
-
zIndex: _propTypes.default.number,
|
|
314
|
-
/**
|
|
315
|
-
* Distance away from the anchor that the popover will render
|
|
316
|
-
*/
|
|
317
|
-
offset: _propTypes.default.number,
|
|
318
|
-
/**
|
|
319
|
-
* Minimum distance between the popover and the bounding container;
|
|
320
|
-
* Pass an array of 4 values to adjust each side differently: `[top, right, bottom, left]`
|
|
321
|
-
* Default is 16
|
|
322
|
-
*/
|
|
323
|
-
buffer: _propTypes.default.oneOfType([_propTypes.default.number.isRequired, _propTypes.default.any.isRequired]),
|
|
324
|
-
/**
|
|
325
|
-
* Element to pass as the child element of the arrow;
|
|
326
|
-
* Use case is typically limited to an accompanying `EuiBeacon`
|
|
327
|
-
*/
|
|
328
|
-
arrowChildren: _propTypes.default.node,
|
|
329
|
-
/**
|
|
330
|
-
* Provide a name to the popover panel
|
|
331
|
-
*/
|
|
332
|
-
"aria-label": _propTypes.default.string,
|
|
333
|
-
/**
|
|
334
|
-
* Alternative option to `aria-label` that takes an `id`.
|
|
335
|
-
* Usually takes the `id` of the popover title
|
|
336
|
-
*/
|
|
337
|
-
"aria-labelledby": _propTypes.default.string,
|
|
338
|
-
/**
|
|
339
|
-
* Function callback for when the popover positon changes
|
|
340
|
-
*/
|
|
341
|
-
onPositionChange: _propTypes.default.func,
|
|
342
|
-
className: _propTypes.default.string,
|
|
343
|
-
"data-test-subj": _propTypes.default.string,
|
|
344
|
-
css: _propTypes.default.any
|
|
345
|
-
}),
|
|
346
|
-
type: _propTypes.default.oneOf(["page", "application"]).isRequired,
|
|
347
|
-
isFirstBreadcrumb: _propTypes.default.bool,
|
|
348
|
-
isLastBreadcrumb: _propTypes.default.bool,
|
|
349
|
-
isOnlyBreadcrumb: _propTypes.default.bool,
|
|
350
|
-
highlightLastBreadcrumb: _propTypes.default.bool,
|
|
351
|
-
truncateLastBreadcrumb: _propTypes.default.bool
|
|
352
|
-
};
|
|
353
|
-
var EuiBreadcrumbCollapsed = function EuiBreadcrumbCollapsed(_ref3) {
|
|
354
|
-
var children = _ref3.children,
|
|
355
|
-
isFirstBreadcrumb = _ref3.isFirstBreadcrumb,
|
|
356
|
-
type = _ref3.type;
|
|
357
|
-
var euiTheme = (0, _services.useEuiTheme)();
|
|
358
|
-
var styles = (0, _breadcrumb.euiBreadcrumbStyles)(euiTheme);
|
|
45
|
+
type = _ref2.type;
|
|
46
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_breadcrumb.euiBreadcrumbStyles);
|
|
359
47
|
var cssStyles = [styles.isCollapsed];
|
|
360
48
|
var ariaLabel = (0, _i18n.useEuiI18n)('euiBreadcrumb.collapsedBadge.ariaLabel', 'See collapsed breadcrumbs');
|
|
361
49
|
return (0, _react2.jsx)(EuiBreadcrumb, {
|
|
362
50
|
css: cssStyles,
|
|
363
51
|
type: type
|
|
364
|
-
}, (0, _react2.jsx)(EuiBreadcrumbContent, {
|
|
52
|
+
}, (0, _react2.jsx)(_breadcrumb_content.EuiBreadcrumbContent, {
|
|
365
53
|
popoverContent: children,
|
|
366
54
|
text: (0, _react2.jsx)("span", {
|
|
367
55
|
"aria-label": ariaLabel
|
|
@@ -372,12 +60,4 @@ var EuiBreadcrumbCollapsed = function EuiBreadcrumbCollapsed(_ref3) {
|
|
|
372
60
|
type: type
|
|
373
61
|
}));
|
|
374
62
|
};
|
|
375
|
-
exports.EuiBreadcrumbCollapsed = EuiBreadcrumbCollapsed;
|
|
376
|
-
EuiBreadcrumbCollapsed.propTypes = {
|
|
377
|
-
type: _propTypes.default.oneOf(["page", "application"]).isRequired,
|
|
378
|
-
isFirstBreadcrumb: _propTypes.default.bool,
|
|
379
|
-
isLastBreadcrumb: _propTypes.default.bool,
|
|
380
|
-
isOnlyBreadcrumb: _propTypes.default.bool,
|
|
381
|
-
highlightLastBreadcrumb: _propTypes.default.bool,
|
|
382
|
-
truncateLastBreadcrumb: _propTypes.default.bool
|
|
383
|
-
};
|
|
63
|
+
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;
|
|
@@ -10,6 +10,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
10
10
|
var _i18n = require("../i18n");
|
|
11
11
|
var _services = require("../../services");
|
|
12
12
|
var _breadcrumb = require("./breadcrumb");
|
|
13
|
+
var _breadcrumb_content = require("./_breadcrumb_content");
|
|
13
14
|
var _breadcrumbs = require("./breadcrumbs.styles");
|
|
14
15
|
var _react2 = require("@emotion/react");
|
|
15
16
|
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 = _objectWithoutProperties(_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, _extends({
|
|
79
79
|
key: index
|
|
80
|
-
}, sharedProps), (0, _react2.jsx)(
|
|
80
|
+
}, sharedProps), (0, _react2.jsx)(_breadcrumb_content.EuiBreadcrumbContent, _extends({}, breadcrumb, sharedProps, {
|
|
81
81
|
isFirstBreadcrumb: isFirstBreadcrumb,
|
|
82
82
|
isLastBreadcrumb: isLastBreadcrumb,
|
|
83
83
|
isOnlyBreadcrumb: isOnlyBreadcrumb,
|
|
@@ -63,9 +63,9 @@ var EuiButtonGroup = function EuiButtonGroup(_ref) {
|
|
|
63
63
|
}), (0, _react2.jsx)(_accessibility.EuiScreenReaderOnly, null, (0, _react2.jsx)("legend", null, legend)), (0, _react2.jsx)("div", {
|
|
64
64
|
css: cssStyles,
|
|
65
65
|
className: "euiButtonGroup__buttons"
|
|
66
|
-
}, options.map(function (option
|
|
66
|
+
}, options.map(function (option) {
|
|
67
67
|
return (0, _react2.jsx)(_button_group_button.EuiButtonGroupButton, _extends({
|
|
68
|
-
key:
|
|
68
|
+
key: option.id,
|
|
69
69
|
isDisabled: isDisabled
|
|
70
70
|
}, option, {
|
|
71
71
|
onClick: typeIsSingle ? function () {
|
|
@@ -140,6 +140,20 @@ EuiButtonGroup.propTypes = {
|
|
|
140
140
|
* The type of the underlying HTML button
|
|
141
141
|
*/
|
|
142
142
|
type: _propTypes.default.any,
|
|
143
|
+
/**
|
|
144
|
+
* By default, will use the button text for the native browser title.
|
|
145
|
+
*
|
|
146
|
+
* This can be either customized or unset via `title: ''` if necessary.
|
|
147
|
+
*/
|
|
148
|
+
title: _propTypes.default.any,
|
|
149
|
+
/**
|
|
150
|
+
* Optional custom tooltip content for the button
|
|
151
|
+
*/
|
|
152
|
+
toolTipContent: _propTypes.default.node,
|
|
153
|
+
/**
|
|
154
|
+
* Optional props to pass to the underlying **[EuiToolTip](/#/display/tooltip)**
|
|
155
|
+
*/
|
|
156
|
+
toolTipProps: _propTypes.default.any,
|
|
143
157
|
/**
|
|
144
158
|
* Any `type` accepted by EuiIcon
|
|
145
159
|
*/
|
|
@@ -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;"),
|