@elastic/eui 62.0.2 → 62.2.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.js +330 -330
- package/dist/eui_charts_theme.js.map +1 -1
- package/dist/eui_theme_dark.css +1 -783
- package/dist/eui_theme_dark.json +0 -57
- package/dist/eui_theme_dark.json.d.ts +0 -57
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +1 -783
- package/dist/eui_theme_light.json +0 -57
- package/dist/eui_theme_light.json.d.ts +0 -57
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/breadcrumbs/breadcrumb.js +199 -0
- package/es/components/breadcrumbs/breadcrumb.styles.js +61 -0
- package/es/components/breadcrumbs/breadcrumbs.js +115 -187
- package/es/components/breadcrumbs/breadcrumbs.styles.js +30 -0
- package/es/components/code/code_block.js +119 -107
- package/es/components/collapsible_nav/collapsible_nav.js +2 -2
- package/es/components/control_bar/control_bar.js +13 -0
- package/es/components/datagrid/body/data_grid_body.js +12 -2
- package/es/components/datagrid/body/data_grid_cell.js +31 -3
- package/es/components/datagrid/body/header/data_grid_header_row.js +1 -1
- package/es/components/datagrid/controls/column_sorting_draggable.js +1 -1
- package/es/components/datagrid/data_grid.js +10 -2
- package/es/components/datagrid/utils/row_heights.js +33 -4
- package/es/components/date_picker/super_date_picker/super_date_picker.js +2 -2
- package/es/components/date_picker/super_date_picker/super_update_button.js +1 -1
- package/es/components/description_list/description_list.js +22 -26
- package/es/components/description_list/description_list.styles.js +25 -0
- package/es/components/description_list/description_list_context.js +14 -0
- package/es/components/description_list/description_list_description.js +43 -2
- package/es/components/description_list/description_list_description.styles.js +47 -0
- package/es/components/description_list/description_list_title.js +43 -2
- package/es/components/description_list/description_list_title.styles.js +37 -0
- package/es/components/description_list/description_list_types.js +10 -0
- package/es/components/header/header.js +1 -27
- package/es/components/header/header_breadcrumbs/header_breadcrumbs.js +22 -2
- package/es/components/header/header_breadcrumbs/header_breadcrumbs.styles.js +15 -0
- package/es/components/header/header_links/header_links.js +9 -9
- package/es/components/icon/assets/tokenStruct.js +1 -1
- package/es/components/page/page_header/page_header.js +1 -0
- package/es/components/page/page_header/page_header_content.js +2 -1
- package/es/components/page/page_template.js +1 -0
- package/es/components/pagination/pagination.js +1 -1
- package/es/components/panel/split_panel/split_panel.js +2 -2
- package/es/components/popover/wrapping_popover.js +88 -45
- package/es/components/portal/portal.js +84 -38
- package/es/components/provider/provider.js +2 -2
- package/es/components/responsive/hide_for.js +6 -38
- package/es/components/responsive/show_for.js +6 -38
- package/es/components/selectable/selectable_templates/selectable_template_sitewide.js +17 -36
- package/es/components/side_nav/side_nav.js +1 -1
- package/es/components/table/table_row_cell.js +1 -2
- package/es/components/toast/global_toast_list.js +208 -241
- package/es/components/toast/global_toast_list.styles.js +38 -0
- package/es/components/toast/global_toast_list_item.js +12 -7
- package/es/components/toast/toast.js +25 -25
- package/es/components/toast/toast.styles.js +55 -0
- package/es/components/token/index.js +2 -1
- package/es/components/token/token.js +48 -112
- package/es/components/token/token.styles.js +93 -0
- package/es/components/token/token_map.js +6 -9
- package/es/components/token/token_types.js +11 -0
- package/es/global_styling/reset/global_styles.js +1 -1
- package/es/services/{breakpoint.js → breakpoint/breakpoint.js} +4 -9
- package/es/services/{hooks/useIsWithinBreakpoints.js → breakpoint/currentEuiBreakpoint.js} +36 -28
- package/es/services/breakpoint/index.js +10 -0
- package/es/services/breakpoint/useIsWithinBreakpoints.js +24 -0
- package/es/services/hooks/index.js +0 -1
- package/es/services/index.js +1 -1
- package/es/test/rtl/component_helpers.js +60 -1
- package/eui.d.ts +1787 -1550
- package/i18ntokens.json +36 -36
- package/lib/components/breadcrumbs/breadcrumb.js +225 -0
- package/lib/components/breadcrumbs/breadcrumb.styles.js +68 -0
- package/lib/components/breadcrumbs/breadcrumbs.js +125 -188
- package/lib/components/breadcrumbs/breadcrumbs.styles.js +33 -0
- package/lib/components/code/code_block.js +118 -106
- package/lib/components/collapsible_nav/collapsible_nav.js +2 -2
- package/lib/components/control_bar/control_bar.js +13 -0
- package/lib/components/datagrid/body/data_grid_body.js +12 -2
- package/lib/components/datagrid/body/data_grid_cell.js +31 -3
- package/lib/components/datagrid/body/header/data_grid_header_row.js +1 -1
- package/lib/components/datagrid/controls/column_sorting_draggable.js +1 -1
- package/lib/components/datagrid/data_grid.js +10 -2
- package/lib/components/datagrid/utils/row_heights.js +33 -4
- package/lib/components/date_picker/super_date_picker/super_date_picker.js +2 -2
- package/lib/components/date_picker/super_date_picker/super_update_button.js +1 -1
- package/lib/components/description_list/description_list.js +25 -31
- package/lib/components/description_list/description_list.styles.js +36 -0
- package/lib/components/description_list/description_list_context.js +24 -0
- package/lib/components/description_list/description_list_description.js +52 -2
- package/lib/components/description_list/description_list_description.styles.js +51 -0
- package/lib/components/description_list/description_list_title.js +52 -2
- package/lib/components/description_list/description_list_title.styles.js +50 -0
- package/lib/components/description_list/description_list_types.js +20 -0
- package/lib/components/header/header.js +1 -27
- package/lib/components/header/header_breadcrumbs/header_breadcrumbs.js +24 -2
- package/lib/components/header/header_breadcrumbs/header_breadcrumbs.styles.js +26 -0
- package/lib/components/header/header_links/header_links.js +8 -8
- package/lib/components/icon/assets/tokenStruct.js +1 -1
- package/lib/components/icon/svgs/tokens/tokenStruct.svg +1 -1
- package/lib/components/page/page_header/page_header.js +1 -0
- package/lib/components/page/page_header/page_header_content.js +3 -2
- package/lib/components/page/page_template.js +1 -0
- package/lib/components/pagination/pagination.js +1 -1
- package/lib/components/panel/split_panel/split_panel.js +3 -3
- package/lib/components/popover/wrapping_popover.js +85 -44
- package/lib/components/portal/portal.js +87 -39
- package/lib/components/provider/provider.js +1 -1
- package/lib/components/responsive/hide_for.js +12 -44
- package/lib/components/responsive/show_for.js +12 -44
- package/lib/components/selectable/selectable_templates/selectable_template_sitewide.js +15 -35
- package/lib/components/side_nav/side_nav.js +1 -1
- package/lib/components/table/table_row_cell.js +1 -3
- package/lib/components/toast/global_toast_list.js +209 -238
- package/lib/components/toast/global_toast_list.styles.js +45 -0
- package/lib/components/toast/global_toast_list_item.js +14 -7
- package/lib/components/toast/toast.js +27 -25
- package/lib/components/toast/toast.styles.js +66 -0
- package/lib/components/token/index.js +5 -3
- package/lib/components/token/token.js +50 -120
- package/lib/components/token/token.styles.js +101 -0
- package/lib/components/token/token_map.js +6 -9
- package/lib/components/token/token_types.js +22 -0
- package/lib/global_styling/reset/global_styles.js +1 -1
- package/{test-env/services → lib/services/breakpoint}/breakpoint.js +5 -9
- package/lib/services/breakpoint/currentEuiBreakpoint.js +80 -0
- package/lib/services/breakpoint/index.js +44 -0
- package/lib/services/breakpoint/useIsWithinBreakpoints.js +34 -0
- package/lib/services/hooks/index.js +0 -13
- package/lib/services/index.js +28 -0
- package/lib/test/rtl/component_helpers.js +69 -3
- package/optimize/es/components/breadcrumbs/breadcrumb.js +136 -0
- package/optimize/es/components/breadcrumbs/breadcrumb.styles.js +61 -0
- package/optimize/es/components/breadcrumbs/breadcrumbs.js +92 -165
- package/optimize/es/components/breadcrumbs/breadcrumbs.styles.js +30 -0
- package/optimize/es/components/code/code_block.js +106 -107
- package/optimize/es/components/datagrid/body/data_grid_body.js +2 -0
- package/optimize/es/components/datagrid/body/data_grid_cell.js +13 -1
- package/optimize/es/components/datagrid/utils/row_heights.js +33 -4
- package/optimize/es/components/description_list/description_list.js +20 -24
- package/optimize/es/components/description_list/description_list.styles.js +25 -0
- package/optimize/es/components/description_list/description_list_context.js +14 -0
- package/optimize/es/components/description_list/description_list_description.js +32 -2
- package/optimize/es/components/description_list/description_list_description.styles.js +47 -0
- package/optimize/es/components/description_list/description_list_title.js +32 -2
- package/optimize/es/components/description_list/description_list_title.styles.js +37 -0
- package/optimize/es/components/description_list/description_list_types.js +10 -0
- package/optimize/es/components/header/header_breadcrumbs/header_breadcrumbs.js +8 -1
- package/optimize/es/components/header/header_breadcrumbs/header_breadcrumbs.styles.js +15 -0
- package/optimize/es/components/header/header_links/header_links.js +8 -8
- package/optimize/es/components/icon/assets/tokenStruct.js +1 -1
- package/optimize/es/components/page/page_header/page_header_content.js +1 -1
- package/optimize/es/components/panel/split_panel/split_panel.js +1 -1
- package/optimize/es/components/popover/wrapping_popover.js +79 -38
- package/optimize/es/components/portal/portal.js +66 -34
- package/optimize/es/components/provider/provider.js +2 -2
- package/optimize/es/components/responsive/hide_for.js +5 -27
- package/optimize/es/components/responsive/show_for.js +5 -27
- package/optimize/es/components/selectable/selectable_templates/selectable_template_sitewide.js +16 -35
- package/optimize/es/components/table/table_row_cell.js +1 -2
- package/optimize/es/components/toast/global_toast_list.js +199 -230
- package/optimize/es/components/toast/global_toast_list.styles.js +38 -0
- package/optimize/es/components/toast/global_toast_list_item.js +11 -6
- package/optimize/es/components/toast/toast.js +24 -24
- package/optimize/es/components/toast/toast.styles.js +55 -0
- package/optimize/es/components/token/index.js +2 -1
- package/optimize/es/components/token/token.js +46 -69
- package/optimize/es/components/token/token.styles.js +83 -0
- package/optimize/es/components/token/token_map.js +6 -9
- package/optimize/es/components/token/token_types.js +11 -0
- package/optimize/es/global_styling/reset/global_styles.js +1 -1
- package/optimize/es/services/{breakpoint.js → breakpoint/breakpoint.js} +4 -9
- package/optimize/es/services/breakpoint/currentEuiBreakpoint.js +53 -0
- package/optimize/es/services/breakpoint/index.js +10 -0
- package/optimize/es/services/breakpoint/useIsWithinBreakpoints.js +24 -0
- package/optimize/es/services/hooks/index.js +0 -1
- package/optimize/es/services/index.js +1 -1
- package/optimize/es/test/rtl/component_helpers.js +60 -1
- package/optimize/lib/components/breadcrumbs/breadcrumb.js +162 -0
- package/optimize/lib/components/breadcrumbs/breadcrumb.styles.js +68 -0
- package/optimize/lib/components/breadcrumbs/breadcrumbs.js +99 -164
- package/optimize/lib/components/breadcrumbs/breadcrumbs.styles.js +33 -0
- package/optimize/lib/components/code/code_block.js +105 -106
- package/optimize/lib/components/datagrid/body/data_grid_body.js +2 -0
- package/optimize/lib/components/datagrid/body/data_grid_cell.js +13 -1
- package/optimize/lib/components/datagrid/utils/row_heights.js +33 -4
- package/optimize/lib/components/description_list/description_list.js +23 -28
- package/optimize/lib/components/description_list/description_list.styles.js +36 -0
- package/optimize/lib/components/description_list/description_list_context.js +24 -0
- package/optimize/lib/components/description_list/description_list_description.js +43 -2
- package/optimize/lib/components/description_list/description_list_description.styles.js +51 -0
- package/optimize/lib/components/description_list/description_list_title.js +43 -2
- package/optimize/lib/components/description_list/description_list_title.styles.js +50 -0
- package/optimize/lib/components/description_list/description_list_types.js +20 -0
- package/optimize/lib/components/header/header_breadcrumbs/header_breadcrumbs.js +10 -1
- package/optimize/lib/components/header/header_breadcrumbs/header_breadcrumbs.styles.js +26 -0
- package/optimize/lib/components/header/header_links/header_links.js +7 -7
- package/optimize/lib/components/icon/assets/tokenStruct.js +1 -1
- package/optimize/lib/components/icon/svgs/tokens/tokenStruct.svg +1 -1
- package/optimize/lib/components/page/page_header/page_header_content.js +2 -2
- package/optimize/lib/components/panel/split_panel/split_panel.js +2 -2
- package/optimize/lib/components/popover/wrapping_popover.js +78 -38
- package/optimize/lib/components/portal/portal.js +65 -44
- package/optimize/lib/components/provider/provider.js +1 -1
- package/optimize/lib/components/responsive/hide_for.js +4 -33
- package/optimize/lib/components/responsive/show_for.js +4 -33
- package/optimize/lib/components/selectable/selectable_templates/selectable_template_sitewide.js +14 -34
- package/optimize/lib/components/table/table_row_cell.js +1 -3
- package/optimize/lib/components/toast/global_toast_list.js +206 -220
- package/optimize/lib/components/toast/global_toast_list.styles.js +47 -0
- package/optimize/lib/components/toast/global_toast_list_item.js +14 -7
- package/optimize/lib/components/toast/toast.js +26 -24
- package/optimize/lib/components/toast/toast.styles.js +66 -0
- package/optimize/lib/components/token/index.js +5 -3
- package/optimize/lib/components/token/token.js +50 -76
- package/optimize/lib/components/token/token.styles.js +91 -0
- package/optimize/lib/components/token/token_map.js +6 -9
- package/optimize/lib/components/token/token_types.js +22 -0
- package/optimize/lib/global_styling/reset/global_styles.js +1 -1
- package/optimize/lib/services/{breakpoint.js → breakpoint/breakpoint.js} +5 -9
- package/optimize/lib/services/breakpoint/currentEuiBreakpoint.js +81 -0
- package/optimize/lib/services/breakpoint/index.js +44 -0
- package/optimize/lib/services/breakpoint/useIsWithinBreakpoints.js +34 -0
- package/optimize/lib/services/hooks/index.js +0 -13
- package/optimize/lib/services/index.js +28 -0
- package/optimize/lib/test/rtl/component_helpers.js +69 -3
- package/package.json +2 -2
- package/src/components/control_bar/_control_bar.scss +1 -1
- package/src/components/header/_index.scss +0 -1
- package/src/components/index.scss +0 -5
- package/src/themes/amsterdam/overrides/_breadcrumbs.scss +0 -12
- package/src/themes/amsterdam/overrides/_index.scss +0 -4
- package/test-env/components/breadcrumbs/breadcrumb.js +211 -0
- package/test-env/components/breadcrumbs/breadcrumb.styles.js +68 -0
- package/test-env/components/breadcrumbs/breadcrumbs.js +122 -174
- package/test-env/components/breadcrumbs/breadcrumbs.styles.js +33 -0
- package/test-env/components/collapsible_nav/collapsible_nav.js +2 -2
- package/test-env/components/control_bar/control_bar.js +13 -0
- package/test-env/components/datagrid/body/data_grid_body.js +12 -2
- package/test-env/components/datagrid/body/data_grid_cell.js +31 -3
- package/test-env/components/datagrid/body/header/data_grid_header_row.js +1 -1
- package/test-env/components/datagrid/controls/column_sorting_draggable.js +1 -1
- package/test-env/components/datagrid/data_grid.js +10 -2
- package/test-env/components/datagrid/utils/row_heights.js +33 -4
- package/test-env/components/date_picker/super_date_picker/super_date_picker.js +2 -2
- package/test-env/components/date_picker/super_date_picker/super_update_button.js +1 -1
- package/test-env/components/description_list/description_list.js +25 -30
- package/test-env/components/description_list/description_list.styles.js +36 -0
- package/test-env/components/description_list/description_list_context.js +24 -0
- package/test-env/components/description_list/description_list_description.js +43 -2
- package/test-env/components/description_list/description_list_description.styles.js +51 -0
- package/test-env/components/description_list/description_list_title.js +43 -2
- package/test-env/components/description_list/description_list_title.styles.js +50 -0
- package/test-env/components/description_list/description_list_types.js +20 -0
- package/test-env/components/header/header.js +1 -27
- package/test-env/components/header/header_breadcrumbs/header_breadcrumbs.js +24 -2
- package/test-env/components/header/header_breadcrumbs/header_breadcrumbs.styles.js +26 -0
- package/test-env/components/header/header_links/header_links.js +8 -8
- package/test-env/components/icon/assets/tokenStruct.js +1 -1
- package/test-env/components/observer/resize_observer/resize_observer.js +43 -126
- package/test-env/components/page/page_header/page_header.js +1 -0
- package/test-env/components/page/page_header/page_header_content.js +3 -2
- package/test-env/components/page/page_template.js +1 -0
- package/test-env/components/pagination/pagination.js +1 -1
- package/test-env/components/panel/split_panel/split_panel.js +3 -3
- package/test-env/components/popover/wrapping_popover.js +78 -38
- package/test-env/components/portal/portal.js +79 -45
- package/test-env/components/provider/provider.js +1 -1
- package/test-env/components/responsive/hide_for.js +5 -34
- package/test-env/components/responsive/show_for.js +5 -34
- package/test-env/components/selectable/selectable_templates/selectable_template_sitewide.js +15 -35
- package/test-env/components/side_nav/side_nav.js +1 -1
- package/test-env/components/table/table_row_cell.js +1 -3
- package/test-env/components/toast/global_toast_list.js +206 -220
- package/test-env/components/toast/global_toast_list.styles.js +47 -0
- package/test-env/components/toast/global_toast_list_item.js +14 -7
- package/test-env/components/toast/toast.js +27 -25
- package/test-env/components/toast/toast.styles.js +66 -0
- package/test-env/components/token/index.js +5 -3
- package/test-env/components/token/token.js +51 -120
- package/test-env/components/token/token.styles.js +91 -0
- package/test-env/components/token/token_map.js +6 -9
- package/test-env/components/token/token_types.js +22 -0
- package/test-env/global_styling/reset/global_styles.js +1 -1
- package/{lib/services → test-env/services/breakpoint}/breakpoint.js +5 -9
- package/test-env/services/breakpoint/currentEuiBreakpoint.js +37 -0
- package/test-env/services/breakpoint/index.js +44 -0
- package/test-env/services/breakpoint/useIsWithinBreakpoints.js +34 -0
- package/test-env/services/hooks/index.js +0 -13
- package/test-env/services/index.js +28 -0
- package/test-env/test/rtl/component_helpers.js +69 -3
- package/lib/services/hooks/useIsWithinBreakpoints.js +0 -57
- package/optimize/es/services/hooks/useIsWithinBreakpoints.js +0 -46
- package/optimize/lib/services/hooks/useIsWithinBreakpoints.js +0 -57
- package/src/components/breadcrumbs/_breadcrumbs.scss +0 -79
- package/src/components/breadcrumbs/_index.scss +0 -2
- package/src/components/breadcrumbs/_variables.scss +0 -2
- package/src/components/description_list/_description_list.scss +0 -211
- package/src/components/description_list/_index.scss +0 -1
- package/src/components/header/header_breadcrumbs/_header_breadcrumbs.scss +0 -8
- package/src/components/header/header_breadcrumbs/_index.scss +0 -1
- package/src/components/portal/_index.scss +0 -1
- package/src/components/portal/_portal.scss +0 -6
- package/src/components/toast/_global_toast_list.scss +0 -90
- package/src/components/toast/_index.scss +0 -4
- package/src/components/toast/_toast.scss +0 -103
- package/src/components/token/_index.scss +0 -2
- package/src/components/token/_token.scss +0 -85
- package/src/components/token/_variables.scss +0 -13
- package/src/themes/amsterdam/overrides/_header_breadcrumbs.scss +0 -71
- package/src/themes/amsterdam/overrides/_toast.scss +0 -21
- package/src/themes/amsterdam/overrides/_token.scss +0 -4
- package/test-env/services/hooks/useIsWithinBreakpoints.js +0 -57
|
@@ -18,25 +18,10 @@ import PropTypes from "prop-types";
|
|
|
18
18
|
import classNames from 'classnames';
|
|
19
19
|
import { EuiDescriptionListTitle } from './description_list_title';
|
|
20
20
|
import { EuiDescriptionListDescription } from './description_list_description';
|
|
21
|
-
import {
|
|
21
|
+
import { useEuiTheme } from '../../services';
|
|
22
|
+
import { euiDescriptionListStyles } from './description_list.styles';
|
|
23
|
+
import { EuiDescriptionListContext } from './description_list_context';
|
|
22
24
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
23
|
-
var typesToClassNameMap = {
|
|
24
|
-
row: 'euiDescriptionList--row',
|
|
25
|
-
inline: 'euiDescriptionList--inline',
|
|
26
|
-
column: 'euiDescriptionList--column',
|
|
27
|
-
responsiveColumn: 'euiDescriptionList--responsiveColumn'
|
|
28
|
-
};
|
|
29
|
-
export var TYPES = keysOf(typesToClassNameMap);
|
|
30
|
-
var alignmentsToClassNameMap = {
|
|
31
|
-
center: 'euiDescriptionList--center',
|
|
32
|
-
left: ''
|
|
33
|
-
};
|
|
34
|
-
export var ALIGNMENTS = keysOf(alignmentsToClassNameMap);
|
|
35
|
-
var textStylesToClassNameMap = {
|
|
36
|
-
normal: '',
|
|
37
|
-
reverse: 'euiDescriptionList--reverse'
|
|
38
|
-
};
|
|
39
|
-
export var TEXT_STYLES = keysOf(textStylesToClassNameMap);
|
|
40
25
|
export var EuiDescriptionList = function EuiDescriptionList(_ref) {
|
|
41
26
|
var _ref$align = _ref.align,
|
|
42
27
|
align = _ref$align === void 0 ? 'left' : _ref$align,
|
|
@@ -53,9 +38,10 @@ export var EuiDescriptionList = function EuiDescriptionList(_ref) {
|
|
|
53
38
|
type = _ref$type === void 0 ? 'row' : _ref$type,
|
|
54
39
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
55
40
|
|
|
56
|
-
var
|
|
57
|
-
|
|
58
|
-
|
|
41
|
+
var euiTheme = useEuiTheme();
|
|
42
|
+
var styles = euiDescriptionListStyles(euiTheme);
|
|
43
|
+
var cssStyles = [styles.euiDescriptionList, styles[type], styles[align]];
|
|
44
|
+
var classes = classNames('euiDescriptionList', className);
|
|
59
45
|
var childrenOrListItems = null;
|
|
60
46
|
|
|
61
47
|
if (listItems) {
|
|
@@ -70,9 +56,19 @@ export var EuiDescriptionList = function EuiDescriptionList(_ref) {
|
|
|
70
56
|
childrenOrListItems = children;
|
|
71
57
|
}
|
|
72
58
|
|
|
73
|
-
return ___EmotionJSX(
|
|
74
|
-
|
|
75
|
-
|
|
59
|
+
return ___EmotionJSX(EuiDescriptionListContext.Provider, {
|
|
60
|
+
value: {
|
|
61
|
+
type: type,
|
|
62
|
+
compressed: compressed,
|
|
63
|
+
textStyle: textStyle,
|
|
64
|
+
align: align
|
|
65
|
+
}
|
|
66
|
+
}, ___EmotionJSX("dl", _extends({
|
|
67
|
+
className: classes,
|
|
68
|
+
css: cssStyles
|
|
69
|
+
}, rest, {
|
|
70
|
+
"data-type": type
|
|
71
|
+
}), childrenOrListItems));
|
|
76
72
|
};
|
|
77
73
|
EuiDescriptionList.propTypes = {
|
|
78
74
|
className: PropTypes.string,
|
|
@@ -86,7 +82,7 @@ EuiDescriptionList.propTypes = {
|
|
|
86
82
|
/**
|
|
87
83
|
* Text alignment
|
|
88
84
|
*/
|
|
89
|
-
align: PropTypes.
|
|
85
|
+
align: PropTypes.any,
|
|
90
86
|
|
|
91
87
|
/**
|
|
92
88
|
* Smaller text and condensed spacing
|
|
@@ -102,7 +98,7 @@ EuiDescriptionList.propTypes = {
|
|
|
102
98
|
/**
|
|
103
99
|
* How each item should be laid out
|
|
104
100
|
*/
|
|
105
|
-
type: PropTypes.
|
|
101
|
+
type: PropTypes.any,
|
|
106
102
|
|
|
107
103
|
/**
|
|
108
104
|
* Props object to be passed to `EuiDescriptionListTitle`
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
import { css } from '@emotion/react';
|
|
9
|
+
import { logicalTextAlignCSS, euiBreakpoint } from '../../global_styling';
|
|
10
|
+
export var euiDescriptionListStyles = function euiDescriptionListStyles(euiThemeContext) {
|
|
11
|
+
// Flex display for column and responsive column
|
|
12
|
+
var columnDisplay = "\n display: flex;\n align-items: baseline;\n flex-wrap: wrap; \n ";
|
|
13
|
+
return {
|
|
14
|
+
euiDescriptionList: /*#__PURE__*/css(";label:euiDescriptionList;"),
|
|
15
|
+
// Types
|
|
16
|
+
row: /*#__PURE__*/css(";label:row;"),
|
|
17
|
+
inline: /*#__PURE__*/css(";label:inline;"),
|
|
18
|
+
column: /*#__PURE__*/css(columnDisplay, ";;label:column;"),
|
|
19
|
+
// Responsive columns behave as a row on breakpoints xs-s
|
|
20
|
+
responsiveColumn: /*#__PURE__*/css(euiBreakpoint(euiThemeContext, ['m', 'xl']), "{", columnDisplay, ";};label:responsiveColumn;"),
|
|
21
|
+
// Alignment
|
|
22
|
+
center: /*#__PURE__*/css(logicalTextAlignCSS('center'), ";;label:center;"),
|
|
23
|
+
left: /*#__PURE__*/css(logicalTextAlignCSS('left'), ";;label:left;")
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
import { createContext } from 'react';
|
|
9
|
+
export var contextDefaults = {
|
|
10
|
+
type: 'row',
|
|
11
|
+
textStyle: 'normal',
|
|
12
|
+
align: 'left'
|
|
13
|
+
};
|
|
14
|
+
export var EuiDescriptionListContext = /*#__PURE__*/createContext(contextDefaults);
|
|
@@ -2,6 +2,18 @@ var _excluded = ["children", "className"];
|
|
|
2
2
|
|
|
3
3
|
function _extends() { _extends = Object.assign || 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); }
|
|
4
4
|
|
|
5
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
6
|
+
|
|
7
|
+
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."); }
|
|
8
|
+
|
|
9
|
+
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); }
|
|
10
|
+
|
|
11
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
12
|
+
|
|
13
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
14
|
+
|
|
15
|
+
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; }
|
|
16
|
+
|
|
5
17
|
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; }
|
|
6
18
|
|
|
7
19
|
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; }
|
|
@@ -13,18 +25,47 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
13
25
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
14
26
|
* Side Public License, v 1.
|
|
15
27
|
*/
|
|
16
|
-
import React from 'react';
|
|
28
|
+
import React, { useContext } from 'react';
|
|
17
29
|
import PropTypes from "prop-types";
|
|
18
30
|
import classNames from 'classnames';
|
|
31
|
+
import { useEuiTheme } from '../../services';
|
|
32
|
+
import { euiDescriptionListDescriptionStyles } from './description_list_description.styles';
|
|
33
|
+
import { EuiDescriptionListContext } from './description_list_context';
|
|
19
34
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
20
35
|
export var EuiDescriptionListDescription = function EuiDescriptionListDescription(_ref) {
|
|
21
36
|
var children = _ref.children,
|
|
22
37
|
className = _ref.className,
|
|
23
38
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
24
39
|
|
|
40
|
+
var _useContext = useContext(EuiDescriptionListContext),
|
|
41
|
+
type = _useContext.type,
|
|
42
|
+
textStyle = _useContext.textStyle,
|
|
43
|
+
compressed = _useContext.compressed,
|
|
44
|
+
align = _useContext.align;
|
|
45
|
+
|
|
46
|
+
var theme = useEuiTheme();
|
|
47
|
+
var styles = euiDescriptionListDescriptionStyles(theme);
|
|
48
|
+
var conditionalStyles = compressed && textStyle === 'reverse' ? [styles.fontStyles.compressed] : [styles.fontStyles[textStyle]];
|
|
49
|
+
|
|
50
|
+
switch (type) {
|
|
51
|
+
case 'inline':
|
|
52
|
+
conditionalStyles = compressed ? [styles.inlineStyles.compressed] : [styles.inlineStyles.normal];
|
|
53
|
+
break;
|
|
54
|
+
|
|
55
|
+
case 'responsiveColumn':
|
|
56
|
+
case 'column':
|
|
57
|
+
if (align === 'center') {
|
|
58
|
+
conditionalStyles.push(styles.left);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
var cssStyles = [styles.euiDescriptionList__description, styles[type]].concat(_toConsumableArray(conditionalStyles));
|
|
25
65
|
var classes = classNames('euiDescriptionList__description', className);
|
|
26
66
|
return ___EmotionJSX("dd", _extends({
|
|
27
|
-
className: classes
|
|
67
|
+
className: classes,
|
|
68
|
+
css: cssStyles
|
|
28
69
|
}, rest), children);
|
|
29
70
|
};
|
|
30
71
|
EuiDescriptionListDescription.propTypes = {
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
5
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
6
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
7
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
8
|
+
* Side Public License, v 1.
|
|
9
|
+
*/
|
|
10
|
+
import { css } from '@emotion/react';
|
|
11
|
+
import { euiFontSize, euiBreakpoint, logicalTextAlignCSS, logicalCSS } from '../../global_styling';
|
|
12
|
+
import { euiTitle } from '../title/title.styles';
|
|
13
|
+
|
|
14
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
15
|
+
name: "1yn9gig-inline",
|
|
16
|
+
styles: "display:inline;label:inline;"
|
|
17
|
+
} : {
|
|
18
|
+
name: "1yn9gig-inline",
|
|
19
|
+
styles: "display:inline;label:inline;",
|
|
20
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export var euiDescriptionListDescriptionStyles = function euiDescriptionListDescriptionStyles(euiThemeContext) {
|
|
24
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
25
|
+
var columnDisplay = "\n ".concat(logicalCSS('width', '50%'), " // Flex-basis doesn't work in IE with padding\n ").concat(logicalCSS('padding-left', euiTheme.size.s), "\n &:not(:first-of-type) {\n ").concat(logicalCSS('margin-top', euiTheme.size.base), "\n }\n ");
|
|
26
|
+
return {
|
|
27
|
+
euiDescriptionList__description: /*#__PURE__*/css(";label:euiDescriptionList__description;"),
|
|
28
|
+
// Types
|
|
29
|
+
row: /*#__PURE__*/css(";label:row;"),
|
|
30
|
+
column: /*#__PURE__*/css(columnDisplay, ";;label:column;"),
|
|
31
|
+
responsiveColumn: /*#__PURE__*/css(euiBreakpoint(euiThemeContext, ['xs', 's']), "{", logicalCSS('width', '100%'), " padding:0;}", euiBreakpoint(euiThemeContext, ['m', 'xl']), "{", columnDisplay, ";};label:responsiveColumn;"),
|
|
32
|
+
inline: _ref,
|
|
33
|
+
// This nested block handles just the font styling based on compressed and reverse
|
|
34
|
+
fontStyles: {
|
|
35
|
+
normal: /*#__PURE__*/css(euiFontSize(euiThemeContext, 's'), ";;label:normal;"),
|
|
36
|
+
reverse: /*#__PURE__*/css(euiTitle(euiThemeContext, 'xs'), ";;label:reverse;"),
|
|
37
|
+
compressed: /*#__PURE__*/css(euiTitle(euiThemeContext, 'xxs'), ";;label:compressed;")
|
|
38
|
+
},
|
|
39
|
+
// Nested inline styles for type and font
|
|
40
|
+
inlineStyles: {
|
|
41
|
+
compressed: /*#__PURE__*/css(euiFontSize(euiThemeContext, 'xs'), ";;label:compressed;"),
|
|
42
|
+
normal: /*#__PURE__*/css(euiFontSize(euiThemeContext, 's'), ";;label:normal;")
|
|
43
|
+
},
|
|
44
|
+
// Column types should align description text to the left when EuiDecriptionList is centered
|
|
45
|
+
left: /*#__PURE__*/css(logicalTextAlignCSS('left'), ";;label:left;")
|
|
46
|
+
};
|
|
47
|
+
};
|
|
@@ -2,6 +2,18 @@ var _excluded = ["children", "className"];
|
|
|
2
2
|
|
|
3
3
|
function _extends() { _extends = Object.assign || 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); }
|
|
4
4
|
|
|
5
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
6
|
+
|
|
7
|
+
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."); }
|
|
8
|
+
|
|
9
|
+
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); }
|
|
10
|
+
|
|
11
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
12
|
+
|
|
13
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
14
|
+
|
|
15
|
+
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; }
|
|
16
|
+
|
|
5
17
|
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; }
|
|
6
18
|
|
|
7
19
|
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; }
|
|
@@ -13,18 +25,47 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
13
25
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
14
26
|
* Side Public License, v 1.
|
|
15
27
|
*/
|
|
16
|
-
import React from 'react';
|
|
28
|
+
import React, { useContext } from 'react';
|
|
17
29
|
import PropTypes from "prop-types";
|
|
18
30
|
import classNames from 'classnames';
|
|
31
|
+
import { useEuiTheme } from '../../services';
|
|
32
|
+
import { euiDescriptionListTitleStyles } from './description_list_title.styles';
|
|
33
|
+
import { EuiDescriptionListContext } from './description_list_context';
|
|
19
34
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
20
35
|
export var EuiDescriptionListTitle = function EuiDescriptionListTitle(_ref) {
|
|
21
36
|
var children = _ref.children,
|
|
22
37
|
className = _ref.className,
|
|
23
38
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
24
39
|
|
|
40
|
+
var _useContext = useContext(EuiDescriptionListContext),
|
|
41
|
+
type = _useContext.type,
|
|
42
|
+
textStyle = _useContext.textStyle,
|
|
43
|
+
compressed = _useContext.compressed,
|
|
44
|
+
align = _useContext.align;
|
|
45
|
+
|
|
46
|
+
var theme = useEuiTheme();
|
|
47
|
+
var styles = euiDescriptionListTitleStyles(theme);
|
|
48
|
+
var conditionalStyles = compressed && textStyle === 'reverse' ? [styles.fontStyles.compressed] : [styles.fontStyles[textStyle]];
|
|
49
|
+
|
|
50
|
+
switch (type) {
|
|
51
|
+
case 'inline':
|
|
52
|
+
conditionalStyles = compressed ? [styles.inlineStyles.compressed] : [styles.inlineStyles.normal];
|
|
53
|
+
break;
|
|
54
|
+
|
|
55
|
+
case 'responsiveColumn':
|
|
56
|
+
case 'column':
|
|
57
|
+
if (align === 'center') {
|
|
58
|
+
conditionalStyles.push(styles.right);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
var cssStyles = [styles.euiDescriptionList__title, styles[type]].concat(_toConsumableArray(conditionalStyles));
|
|
25
65
|
var classes = classNames('euiDescriptionList__title', className);
|
|
26
66
|
return ___EmotionJSX("dt", _extends({
|
|
27
|
-
className: classes
|
|
67
|
+
className: classes,
|
|
68
|
+
css: cssStyles
|
|
28
69
|
}, rest), children);
|
|
29
70
|
};
|
|
30
71
|
EuiDescriptionListTitle.propTypes = {
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
import { css } from '@emotion/react';
|
|
9
|
+
import { euiFontSize, euiTextBreakWord, logicalTextAlignCSS, euiBreakpoint, logicalCSS } from '../../global_styling';
|
|
10
|
+
import { tint } from '../../services';
|
|
11
|
+
import { euiTitle } from '../title/title.styles';
|
|
12
|
+
export var euiDescriptionListTitleStyles = function euiDescriptionListTitleStyles(euiThemeContext) {
|
|
13
|
+
var euiTheme = euiThemeContext.euiTheme,
|
|
14
|
+
colorMode = euiThemeContext.colorMode;
|
|
15
|
+
var columnDisplay = "\n ".concat(logicalCSS('width', '50%'), " // Flex-basis doesn't work in IE with padding\n ").concat(logicalCSS('padding-right', euiTheme.size.s), "\n ");
|
|
16
|
+
return {
|
|
17
|
+
euiDescriptionList__title: /*#__PURE__*/css(euiTextBreakWord(), "&:not(:first-of-type){", logicalCSS('margin-top', euiTheme.size.base), ";};label:euiDescriptionList__title;"),
|
|
18
|
+
// Types
|
|
19
|
+
row: /*#__PURE__*/css(";label:row;"),
|
|
20
|
+
column: /*#__PURE__*/css(columnDisplay, ";;label:column;"),
|
|
21
|
+
responsiveColumn: /*#__PURE__*/css(euiBreakpoint(euiThemeContext, ['xs', 's']), "{", logicalCSS('width', '100%'), " padding:0;}", euiBreakpoint(euiThemeContext, ['m', 'xl']), "{", columnDisplay, ";};label:responsiveColumn;"),
|
|
22
|
+
inline: /*#__PURE__*/css("display:inline;border-radius:", euiTheme.border.radius.small, ";font-weight:", euiTheme.font.weight.medium, ";background-color:", colorMode === 'DARK' ? tint(euiTheme.colors.lightestShade, 0.5) : euiTheme.colors.lightestShade, ";", logicalCSS('margin-vertical', '0'), " ", logicalCSS('margin-horizontal', euiTheme.size.xs), "&:first-of-type{", logicalCSS('margin-left', '0'), ";};label:inline;"),
|
|
23
|
+
// This nested block handles just the font styling based on compressed and reverse
|
|
24
|
+
fontStyles: {
|
|
25
|
+
normal: /*#__PURE__*/css(euiTitle(euiThemeContext, 'xs'), ";;label:normal;"),
|
|
26
|
+
reverse: /*#__PURE__*/css(euiFontSize(euiThemeContext, 's'), ";;label:reverse;"),
|
|
27
|
+
compressed: /*#__PURE__*/css(euiTitle(euiThemeContext, 'xxs'), ";;label:compressed;")
|
|
28
|
+
},
|
|
29
|
+
// Inline types
|
|
30
|
+
inlineStyles: {
|
|
31
|
+
normal: /*#__PURE__*/css(euiFontSize(euiThemeContext, 's'), ";", logicalCSS('padding-vertical', '1px'), " ", logicalCSS('padding-horizontal', euiTheme.size.xs), ";;label:normal;"),
|
|
32
|
+
compressed: /*#__PURE__*/css(euiFontSize(euiThemeContext, 'xs'), ";", logicalCSS('padding-vertical', '0'), " ", logicalCSS('padding-horizontal', euiTheme.size.xs), ";;label:compressed;")
|
|
33
|
+
},
|
|
34
|
+
// Alignment
|
|
35
|
+
right: /*#__PURE__*/css(logicalTextAlignCSS('right'), ";;label:right;")
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
export var TYPES = ['row', 'inline', 'column', 'responsiveColumn'];
|
|
9
|
+
export var ALIGNMENTS = ['center', 'left'];
|
|
10
|
+
export var TEXT_STYLES = ['normal', 'reverse'];
|
|
@@ -119,33 +119,7 @@ EuiHeader.propTypes = {
|
|
|
119
119
|
* Breadcrumbs in the header cannot be wrapped in a #EuiHeaderSection in order for truncation to work.
|
|
120
120
|
* Simply pass the array of EuiBreadcrumb objects
|
|
121
121
|
*/
|
|
122
|
-
breadcrumbs: PropTypes.arrayOf(PropTypes.
|
|
123
|
-
className: PropTypes.string,
|
|
124
|
-
"aria-label": PropTypes.string,
|
|
125
|
-
"data-test-subj": PropTypes.string,
|
|
126
|
-
href: PropTypes.string,
|
|
127
|
-
onClick: PropTypes.func,
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* Visible label of the breadcrumb
|
|
131
|
-
*/
|
|
132
|
-
text: PropTypes.node.isRequired,
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* Force a max-width on the breadcrumb text
|
|
136
|
-
*/
|
|
137
|
-
truncate: PropTypes.bool,
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* Accepts any EuiLink `color` when rendered as one (has `href` or `onClick`)
|
|
141
|
-
*/
|
|
142
|
-
color: PropTypes.any,
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* Override the existing `aria-current` which defaults to `page` for the last breadcrumb
|
|
146
|
-
*/
|
|
147
|
-
"aria-current": PropTypes.any
|
|
148
|
-
}).isRequired),
|
|
122
|
+
breadcrumbs: PropTypes.arrayOf(PropTypes.any.isRequired),
|
|
149
123
|
|
|
150
124
|
/**
|
|
151
125
|
* Other props to pass to #EuiHeaderBreadcrumbs
|
|
@@ -17,6 +17,8 @@ import React from 'react';
|
|
|
17
17
|
import PropTypes from "prop-types";
|
|
18
18
|
import classNames from 'classnames';
|
|
19
19
|
import { EuiBreadcrumbs } from '../../breadcrumbs';
|
|
20
|
+
import { euiHeaderBreadcrumbsStyles } from './header_breadcrumbs.styles';
|
|
21
|
+
import { useEuiTheme } from '../../../services';
|
|
20
22
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
21
23
|
export var EuiHeaderBreadcrumbs = function EuiHeaderBreadcrumbs(_ref) {
|
|
22
24
|
var className = _ref.className,
|
|
@@ -24,11 +26,16 @@ export var EuiHeaderBreadcrumbs = function EuiHeaderBreadcrumbs(_ref) {
|
|
|
24
26
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
25
27
|
|
|
26
28
|
var classes = classNames('euiHeaderBreadcrumbs', className);
|
|
29
|
+
var euiTheme = useEuiTheme();
|
|
30
|
+
var styles = euiHeaderBreadcrumbsStyles(euiTheme);
|
|
31
|
+
var cssHeaderBreadcrumbStyles = [styles.euiHeaderBreadcrumbs];
|
|
27
32
|
return ___EmotionJSX(EuiBreadcrumbs, _extends({
|
|
28
33
|
max: 4,
|
|
29
34
|
truncate: true,
|
|
30
35
|
breadcrumbs: breadcrumbs,
|
|
31
|
-
className: classes
|
|
36
|
+
className: classes,
|
|
37
|
+
css: cssHeaderBreadcrumbStyles,
|
|
38
|
+
type: "application"
|
|
32
39
|
}, rest));
|
|
33
40
|
};
|
|
34
41
|
EuiHeaderBreadcrumbs.propTypes = {
|
|
@@ -68,6 +75,7 @@ EuiHeaderBreadcrumbs.propTypes = {
|
|
|
68
75
|
"aria-label": PropTypes.string,
|
|
69
76
|
"data-test-subj": PropTypes.string,
|
|
70
77
|
href: PropTypes.string,
|
|
78
|
+
rel: PropTypes.string,
|
|
71
79
|
onClick: PropTypes.func,
|
|
72
80
|
|
|
73
81
|
/**
|
|
@@ -89,5 +97,17 @@ EuiHeaderBreadcrumbs.propTypes = {
|
|
|
89
97
|
* Override the existing `aria-current` which defaults to `page` for the last breadcrumb
|
|
90
98
|
*/
|
|
91
99
|
"aria-current": PropTypes.any
|
|
92
|
-
}).isRequired).isRequired
|
|
100
|
+
}).isRequired).isRequired,
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Determines breadcrumbs appearance, with `page` being the default styling.
|
|
104
|
+
* Application breadcrumbs should only be once per page, in (e.g.) EuiHeader
|
|
105
|
+
*/
|
|
106
|
+
type: PropTypes.oneOf(["page", "application"]),
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Whether the last breadcrumb should visually (and accessibly, to screen readers)
|
|
110
|
+
* be highlighted as the current page. Defaults to true.
|
|
111
|
+
*/
|
|
112
|
+
lastBreadcrumbIsCurrentPage: PropTypes.bool
|
|
93
113
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
import { css } from '@emotion/react';
|
|
9
|
+
import { euiTextTruncate, logicalCSS } from '../../../global_styling';
|
|
10
|
+
export var euiHeaderBreadcrumbsStyles = function euiHeaderBreadcrumbsStyles(_ref) {
|
|
11
|
+
var euiTheme = _ref.euiTheme;
|
|
12
|
+
return {
|
|
13
|
+
euiHeaderBreadcrumbs: /*#__PURE__*/css(euiTextTruncate(), ";align-items:center;display:flex;flex-grow:1;", logicalCSS('margin-horizontal', euiTheme.size.s), ";;label:euiHeaderBreadcrumbs;")
|
|
14
|
+
};
|
|
15
|
+
};
|
|
@@ -26,7 +26,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
26
26
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
27
27
|
* Side Public License, v 1.
|
|
28
28
|
*/
|
|
29
|
-
import React, { useState, useEffect } from 'react';
|
|
29
|
+
import React, { useState, useEffect, useCallback } from 'react';
|
|
30
30
|
import PropTypes from "prop-types";
|
|
31
31
|
import classNames from 'classnames';
|
|
32
32
|
import { keysOf } from '../../common';
|
|
@@ -65,15 +65,15 @@ export var EuiHeaderLinks = function EuiHeaderLinks(_ref) {
|
|
|
65
65
|
mobileMenuIsOpen = _useState2[0],
|
|
66
66
|
setMobileMenuIsOpen = _useState2[1];
|
|
67
67
|
|
|
68
|
-
var onMenuButtonClick = function
|
|
68
|
+
var onMenuButtonClick = useCallback(function (e) {
|
|
69
69
|
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
70
|
-
setMobileMenuIsOpen(
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
70
|
+
setMobileMenuIsOpen(function (mobileMenuIsOpen) {
|
|
71
|
+
return !mobileMenuIsOpen;
|
|
72
|
+
});
|
|
73
|
+
}, [onClick]);
|
|
74
|
+
var closeMenu = useCallback(function () {
|
|
74
75
|
setMobileMenuIsOpen(false);
|
|
75
|
-
};
|
|
76
|
-
|
|
76
|
+
}, []);
|
|
77
77
|
useEffect(function () {
|
|
78
78
|
window.addEventListener('resize', closeMenu);
|
|
79
79
|
return function () {
|
|
@@ -132,7 +132,7 @@ EuiHeaderLinks.propTypes = {
|
|
|
132
132
|
/**
|
|
133
133
|
* A list of named breakpoints at which to show the popover version
|
|
134
134
|
*/
|
|
135
|
-
popoverBreakpoints: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.
|
|
135
|
+
popoverBreakpoints: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.any.isRequired).isRequired, PropTypes.oneOf(["all", "none"])]),
|
|
136
136
|
|
|
137
137
|
/**
|
|
138
138
|
* Extend the functionality of the EuiPopover.button which is a EuiHeaderSectionItemButton.
|
|
@@ -32,7 +32,7 @@ var EuiIconTokenStruct = function EuiIconTokenStruct(_ref) {
|
|
|
32
32
|
id: titleId
|
|
33
33
|
}, title) : null, ___EmotionJSX("path", {
|
|
34
34
|
fillRule: "evenodd",
|
|
35
|
-
d: "M4.
|
|
35
|
+
d: "M4.667 4.667h2.666v2.666H4.667V4.667zm0 4h2.666v2.666H4.667V8.667zm4-4h2.666v2.666H8.667V4.667zm0 4h2.666v2.666H8.667V8.667zM3.333 3.333v9.334h9.334V3.333H3.333zm0-1.333h9.334C13.403 2 14 2.597 14 3.333v9.334c0 .736-.597 1.333-1.333 1.333H3.333A1.333 1.333 0 012 12.667V3.333C2 2.597 2.597 2 3.333 2z"
|
|
36
36
|
}));
|
|
37
37
|
};
|
|
38
38
|
|
|
@@ -23,7 +23,7 @@ import { EuiFlexGroup, EuiFlexItem } from '../../flex';
|
|
|
23
23
|
import { EuiSpacer } from '../../spacer';
|
|
24
24
|
import { EuiTitle } from '../../title';
|
|
25
25
|
import { EuiText } from '../../text';
|
|
26
|
-
import { useIsWithinBreakpoints } from '../../../services
|
|
26
|
+
import { useIsWithinBreakpoints } from '../../../services';
|
|
27
27
|
import { EuiScreenReaderOnly } from '../../accessibility';
|
|
28
28
|
import { EuiBreadcrumbs } from '../../breadcrumbs';
|
|
29
29
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
@@ -243,6 +243,7 @@ EuiPageHeaderContent.propTypes = {
|
|
|
243
243
|
"aria-label": PropTypes.string,
|
|
244
244
|
"data-test-subj": PropTypes.string,
|
|
245
245
|
href: PropTypes.string,
|
|
246
|
+
rel: PropTypes.string,
|
|
246
247
|
onClick: PropTypes.func,
|
|
247
248
|
|
|
248
249
|
/**
|
|
@@ -273,7 +273,7 @@ EuiPagination.propTypes = {
|
|
|
273
273
|
* Automatically reduces to the `compressed` version on smaller screens.
|
|
274
274
|
* Remove completely with `false` or provide your own list of responsive breakpoints.
|
|
275
275
|
*/
|
|
276
|
-
responsive: PropTypes.oneOfType([PropTypes.oneOf([false]), PropTypes.arrayOf(PropTypes.
|
|
276
|
+
responsive: PropTypes.oneOfType([PropTypes.oneOf([false]), PropTypes.arrayOf(PropTypes.any.isRequired).isRequired])
|
|
277
277
|
};
|
|
278
278
|
|
|
279
279
|
var PaginationButtonWrapper = function PaginationButtonWrapper(_ref2) {
|
|
@@ -18,7 +18,7 @@ import React from 'react';
|
|
|
18
18
|
import PropTypes from "prop-types";
|
|
19
19
|
import classNames from 'classnames';
|
|
20
20
|
import { EuiPanel } from '../panel';
|
|
21
|
-
import { useIsWithinBreakpoints } from '../../../services/
|
|
21
|
+
import { useIsWithinBreakpoints } from '../../../services/breakpoint';
|
|
22
22
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
23
23
|
|
|
24
24
|
/**
|
|
@@ -103,7 +103,7 @@ _EuiSplitPanelOuter.propTypes = {
|
|
|
103
103
|
* Stacks row display on small screens.
|
|
104
104
|
* Remove completely with `false` or provide your own list of breakpoint sizes to stack on.
|
|
105
105
|
*/
|
|
106
|
-
responsive: PropTypes.oneOfType([PropTypes.oneOf([false]), PropTypes.arrayOf(PropTypes.
|
|
106
|
+
responsive: PropTypes.oneOfType([PropTypes.oneOf([false]), PropTypes.arrayOf(PropTypes.any.isRequired).isRequired])
|
|
107
107
|
};
|
|
108
108
|
export var EuiSplitPanel = {
|
|
109
109
|
Outer: _EuiSplitPanelOuter,
|