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