@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
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.EuiDescriptionList = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
@@ -15,7 +15,11 @@ var _description_list_title = require("./description_list_title");
|
|
|
15
15
|
|
|
16
16
|
var _description_list_description = require("./description_list_description");
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _services = require("../../services");
|
|
19
|
+
|
|
20
|
+
var _description_list = require("./description_list.styles");
|
|
21
|
+
|
|
22
|
+
var _description_list_context = require("./description_list_context");
|
|
19
23
|
|
|
20
24
|
var _react2 = require("@emotion/react");
|
|
21
25
|
|
|
@@ -29,27 +33,6 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
29
33
|
|
|
30
34
|
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; }
|
|
31
35
|
|
|
32
|
-
var typesToClassNameMap = {
|
|
33
|
-
row: 'euiDescriptionList--row',
|
|
34
|
-
inline: 'euiDescriptionList--inline',
|
|
35
|
-
column: 'euiDescriptionList--column',
|
|
36
|
-
responsiveColumn: 'euiDescriptionList--responsiveColumn'
|
|
37
|
-
};
|
|
38
|
-
var TYPES = (0, _common.keysOf)(typesToClassNameMap);
|
|
39
|
-
exports.TYPES = TYPES;
|
|
40
|
-
var alignmentsToClassNameMap = {
|
|
41
|
-
center: 'euiDescriptionList--center',
|
|
42
|
-
left: ''
|
|
43
|
-
};
|
|
44
|
-
var ALIGNMENTS = (0, _common.keysOf)(alignmentsToClassNameMap);
|
|
45
|
-
exports.ALIGNMENTS = ALIGNMENTS;
|
|
46
|
-
var textStylesToClassNameMap = {
|
|
47
|
-
normal: '',
|
|
48
|
-
reverse: 'euiDescriptionList--reverse'
|
|
49
|
-
};
|
|
50
|
-
var TEXT_STYLES = (0, _common.keysOf)(textStylesToClassNameMap);
|
|
51
|
-
exports.TEXT_STYLES = TEXT_STYLES;
|
|
52
|
-
|
|
53
36
|
var EuiDescriptionList = function EuiDescriptionList(_ref) {
|
|
54
37
|
var _ref$align = _ref.align,
|
|
55
38
|
align = _ref$align === void 0 ? 'left' : _ref$align,
|
|
@@ -66,9 +49,10 @@ var EuiDescriptionList = function EuiDescriptionList(_ref) {
|
|
|
66
49
|
type = _ref$type === void 0 ? 'row' : _ref$type,
|
|
67
50
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
68
51
|
|
|
69
|
-
var
|
|
70
|
-
|
|
71
|
-
|
|
52
|
+
var euiTheme = (0, _services.useEuiTheme)();
|
|
53
|
+
var styles = (0, _description_list.euiDescriptionListStyles)(euiTheme);
|
|
54
|
+
var cssStyles = [styles.euiDescriptionList, styles[type], styles[align]];
|
|
55
|
+
var classes = (0, _classnames.default)('euiDescriptionList', className);
|
|
72
56
|
var childrenOrListItems = null;
|
|
73
57
|
|
|
74
58
|
if (listItems) {
|
|
@@ -83,9 +67,19 @@ var EuiDescriptionList = function EuiDescriptionList(_ref) {
|
|
|
83
67
|
childrenOrListItems = children;
|
|
84
68
|
}
|
|
85
69
|
|
|
86
|
-
return (0, _react2.jsx)(
|
|
87
|
-
|
|
88
|
-
|
|
70
|
+
return (0, _react2.jsx)(_description_list_context.EuiDescriptionListContext.Provider, {
|
|
71
|
+
value: {
|
|
72
|
+
type: type,
|
|
73
|
+
compressed: compressed,
|
|
74
|
+
textStyle: textStyle,
|
|
75
|
+
align: align
|
|
76
|
+
}
|
|
77
|
+
}, (0, _react2.jsx)("dl", _extends({
|
|
78
|
+
className: classes,
|
|
79
|
+
css: cssStyles
|
|
80
|
+
}, rest, {
|
|
81
|
+
"data-type": type
|
|
82
|
+
}), childrenOrListItems));
|
|
89
83
|
};
|
|
90
84
|
|
|
91
85
|
exports.EuiDescriptionList = EuiDescriptionList;
|
|
@@ -101,7 +95,7 @@ EuiDescriptionList.propTypes = {
|
|
|
101
95
|
/**
|
|
102
96
|
* Text alignment
|
|
103
97
|
*/
|
|
104
|
-
align: _propTypes.default.
|
|
98
|
+
align: _propTypes.default.any,
|
|
105
99
|
|
|
106
100
|
/**
|
|
107
101
|
* Smaller text and condensed spacing
|
|
@@ -117,7 +111,7 @@ EuiDescriptionList.propTypes = {
|
|
|
117
111
|
/**
|
|
118
112
|
* How each item should be laid out
|
|
119
113
|
*/
|
|
120
|
-
type: _propTypes.default.
|
|
114
|
+
type: _propTypes.default.any,
|
|
121
115
|
|
|
122
116
|
/**
|
|
123
117
|
* Props object to be passed to `EuiDescriptionListTitle`
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.euiDescriptionListStyles = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = require("@emotion/react");
|
|
9
|
+
|
|
10
|
+
var _global_styling = require("../../global_styling");
|
|
11
|
+
|
|
12
|
+
/*
|
|
13
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
14
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
15
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
16
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
17
|
+
* Side Public License, v 1.
|
|
18
|
+
*/
|
|
19
|
+
var euiDescriptionListStyles = function euiDescriptionListStyles(euiThemeContext) {
|
|
20
|
+
// Flex display for column and responsive column
|
|
21
|
+
var columnDisplay = "\n display: flex;\n align-items: baseline;\n flex-wrap: wrap; \n ";
|
|
22
|
+
return {
|
|
23
|
+
euiDescriptionList: /*#__PURE__*/(0, _react.css)(";label:euiDescriptionList;"),
|
|
24
|
+
// Types
|
|
25
|
+
row: /*#__PURE__*/(0, _react.css)(";label:row;"),
|
|
26
|
+
inline: /*#__PURE__*/(0, _react.css)(";label:inline;"),
|
|
27
|
+
column: /*#__PURE__*/(0, _react.css)(columnDisplay, ";;label:column;"),
|
|
28
|
+
// Responsive columns behave as a row on breakpoints xs-s
|
|
29
|
+
responsiveColumn: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiBreakpoint)(euiThemeContext, ['m', 'xl']), "{", columnDisplay, ";};label:responsiveColumn;"),
|
|
30
|
+
// Alignment
|
|
31
|
+
center: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('center'), ";;label:center;"),
|
|
32
|
+
left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('left'), ";;label:left;")
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
exports.euiDescriptionListStyles = euiDescriptionListStyles;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.contextDefaults = exports.EuiDescriptionListContext = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
|
|
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
|
+
var contextDefaults = {
|
|
18
|
+
type: 'row',
|
|
19
|
+
textStyle: 'normal',
|
|
20
|
+
align: 'left'
|
|
21
|
+
};
|
|
22
|
+
exports.contextDefaults = contextDefaults;
|
|
23
|
+
var EuiDescriptionListContext = /*#__PURE__*/(0, _react.createContext)(contextDefaults);
|
|
24
|
+
exports.EuiDescriptionListContext = EuiDescriptionListContext;
|
|
@@ -1,24 +1,48 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
8
|
exports.EuiDescriptionListDescription = void 0;
|
|
7
9
|
|
|
8
|
-
var _react =
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
11
|
|
|
10
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
13
|
|
|
12
14
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
15
|
|
|
16
|
+
var _services = require("../../services");
|
|
17
|
+
|
|
18
|
+
var _description_list_description = require("./description_list_description.styles");
|
|
19
|
+
|
|
20
|
+
var _description_list_context = require("./description_list_context");
|
|
21
|
+
|
|
14
22
|
var _react2 = require("@emotion/react");
|
|
15
23
|
|
|
16
24
|
var _excluded = ["children", "className"];
|
|
17
25
|
|
|
18
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
27
|
|
|
28
|
+
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); }
|
|
29
|
+
|
|
30
|
+
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; }
|
|
31
|
+
|
|
20
32
|
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); }
|
|
21
33
|
|
|
34
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
35
|
+
|
|
36
|
+
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."); }
|
|
37
|
+
|
|
38
|
+
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); }
|
|
39
|
+
|
|
40
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
41
|
+
|
|
42
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
43
|
+
|
|
44
|
+
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; }
|
|
45
|
+
|
|
22
46
|
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; }
|
|
23
47
|
|
|
24
48
|
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; }
|
|
@@ -28,9 +52,35 @@ var EuiDescriptionListDescription = function EuiDescriptionListDescription(_ref)
|
|
|
28
52
|
className = _ref.className,
|
|
29
53
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
30
54
|
|
|
55
|
+
var _useContext = (0, _react.useContext)(_description_list_context.EuiDescriptionListContext),
|
|
56
|
+
type = _useContext.type,
|
|
57
|
+
textStyle = _useContext.textStyle,
|
|
58
|
+
compressed = _useContext.compressed,
|
|
59
|
+
align = _useContext.align;
|
|
60
|
+
|
|
61
|
+
var theme = (0, _services.useEuiTheme)();
|
|
62
|
+
var styles = (0, _description_list_description.euiDescriptionListDescriptionStyles)(theme);
|
|
63
|
+
var conditionalStyles = compressed && textStyle === 'reverse' ? [styles.fontStyles.compressed] : [styles.fontStyles[textStyle]];
|
|
64
|
+
|
|
65
|
+
switch (type) {
|
|
66
|
+
case 'inline':
|
|
67
|
+
conditionalStyles = compressed ? [styles.inlineStyles.compressed] : [styles.inlineStyles.normal];
|
|
68
|
+
break;
|
|
69
|
+
|
|
70
|
+
case 'responsiveColumn':
|
|
71
|
+
case 'column':
|
|
72
|
+
if (align === 'center') {
|
|
73
|
+
conditionalStyles.push(styles.left);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
var cssStyles = [styles.euiDescriptionList__description, styles[type]].concat(_toConsumableArray(conditionalStyles));
|
|
31
80
|
var classes = (0, _classnames.default)('euiDescriptionList__description', className);
|
|
32
81
|
return (0, _react2.jsx)("dd", _extends({
|
|
33
|
-
className: classes
|
|
82
|
+
className: classes,
|
|
83
|
+
css: cssStyles
|
|
34
84
|
}, rest), children);
|
|
35
85
|
};
|
|
36
86
|
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.euiDescriptionListDescriptionStyles = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = require("@emotion/react");
|
|
9
|
+
|
|
10
|
+
var _global_styling = require("../../global_styling");
|
|
11
|
+
|
|
12
|
+
var _title = require("../title/title.styles");
|
|
13
|
+
|
|
14
|
+
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)."; }
|
|
15
|
+
|
|
16
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
17
|
+
name: "1yn9gig-inline",
|
|
18
|
+
styles: "display:inline;label:inline;"
|
|
19
|
+
} : {
|
|
20
|
+
name: "1yn9gig-inline",
|
|
21
|
+
styles: "display:inline;label:inline;",
|
|
22
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
var euiDescriptionListDescriptionStyles = function euiDescriptionListDescriptionStyles(euiThemeContext) {
|
|
26
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
27
|
+
var columnDisplay = "\n ".concat((0, _global_styling.logicalCSS)('width', '50%'), " // Flex-basis doesn't work in IE with padding\n ").concat((0, _global_styling.logicalCSS)('padding-left', euiTheme.size.s), "\n &:not(:first-of-type) {\n ").concat((0, _global_styling.logicalCSS)('margin-top', euiTheme.size.base), "\n }\n ");
|
|
28
|
+
return {
|
|
29
|
+
euiDescriptionList__description: /*#__PURE__*/(0, _react.css)(";label:euiDescriptionList__description;"),
|
|
30
|
+
// Types
|
|
31
|
+
row: /*#__PURE__*/(0, _react.css)(";label:row;"),
|
|
32
|
+
column: /*#__PURE__*/(0, _react.css)(columnDisplay, ";;label:column;"),
|
|
33
|
+
responsiveColumn: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs', 's']), "{", (0, _global_styling.logicalCSS)('width', '100%'), " padding:0;}", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['m', 'xl']), "{", columnDisplay, ";};label:responsiveColumn;"),
|
|
34
|
+
inline: _ref,
|
|
35
|
+
// This nested block handles just the font styling based on compressed and reverse
|
|
36
|
+
fontStyles: {
|
|
37
|
+
normal: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiFontSize)(euiThemeContext, 's'), ";;label:normal;"),
|
|
38
|
+
reverse: /*#__PURE__*/(0, _react.css)((0, _title.euiTitle)(euiThemeContext, 'xs'), ";;label:reverse;"),
|
|
39
|
+
compressed: /*#__PURE__*/(0, _react.css)((0, _title.euiTitle)(euiThemeContext, 'xxs'), ";;label:compressed;")
|
|
40
|
+
},
|
|
41
|
+
// Nested inline styles for type and font
|
|
42
|
+
inlineStyles: {
|
|
43
|
+
compressed: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiFontSize)(euiThemeContext, 'xs'), ";;label:compressed;"),
|
|
44
|
+
normal: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiFontSize)(euiThemeContext, 's'), ";;label:normal;")
|
|
45
|
+
},
|
|
46
|
+
// Column types should align description text to the left when EuiDecriptionList is centered
|
|
47
|
+
left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('left'), ";;label:left;")
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
exports.euiDescriptionListDescriptionStyles = euiDescriptionListDescriptionStyles;
|
|
@@ -1,24 +1,48 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
8
|
exports.EuiDescriptionListTitle = void 0;
|
|
7
9
|
|
|
8
|
-
var _react =
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
11
|
|
|
10
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
13
|
|
|
12
14
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
15
|
|
|
16
|
+
var _services = require("../../services");
|
|
17
|
+
|
|
18
|
+
var _description_list_title = require("./description_list_title.styles");
|
|
19
|
+
|
|
20
|
+
var _description_list_context = require("./description_list_context");
|
|
21
|
+
|
|
14
22
|
var _react2 = require("@emotion/react");
|
|
15
23
|
|
|
16
24
|
var _excluded = ["children", "className"];
|
|
17
25
|
|
|
18
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
27
|
|
|
28
|
+
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); }
|
|
29
|
+
|
|
30
|
+
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; }
|
|
31
|
+
|
|
20
32
|
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); }
|
|
21
33
|
|
|
34
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
35
|
+
|
|
36
|
+
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."); }
|
|
37
|
+
|
|
38
|
+
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); }
|
|
39
|
+
|
|
40
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
41
|
+
|
|
42
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
43
|
+
|
|
44
|
+
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; }
|
|
45
|
+
|
|
22
46
|
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; }
|
|
23
47
|
|
|
24
48
|
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; }
|
|
@@ -28,9 +52,35 @@ var EuiDescriptionListTitle = function EuiDescriptionListTitle(_ref) {
|
|
|
28
52
|
className = _ref.className,
|
|
29
53
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
30
54
|
|
|
55
|
+
var _useContext = (0, _react.useContext)(_description_list_context.EuiDescriptionListContext),
|
|
56
|
+
type = _useContext.type,
|
|
57
|
+
textStyle = _useContext.textStyle,
|
|
58
|
+
compressed = _useContext.compressed,
|
|
59
|
+
align = _useContext.align;
|
|
60
|
+
|
|
61
|
+
var theme = (0, _services.useEuiTheme)();
|
|
62
|
+
var styles = (0, _description_list_title.euiDescriptionListTitleStyles)(theme);
|
|
63
|
+
var conditionalStyles = compressed && textStyle === 'reverse' ? [styles.fontStyles.compressed] : [styles.fontStyles[textStyle]];
|
|
64
|
+
|
|
65
|
+
switch (type) {
|
|
66
|
+
case 'inline':
|
|
67
|
+
conditionalStyles = compressed ? [styles.inlineStyles.compressed] : [styles.inlineStyles.normal];
|
|
68
|
+
break;
|
|
69
|
+
|
|
70
|
+
case 'responsiveColumn':
|
|
71
|
+
case 'column':
|
|
72
|
+
if (align === 'center') {
|
|
73
|
+
conditionalStyles.push(styles.right);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
var cssStyles = [styles.euiDescriptionList__title, styles[type]].concat(_toConsumableArray(conditionalStyles));
|
|
31
80
|
var classes = (0, _classnames.default)('euiDescriptionList__title', className);
|
|
32
81
|
return (0, _react2.jsx)("dt", _extends({
|
|
33
|
-
className: classes
|
|
82
|
+
className: classes,
|
|
83
|
+
css: cssStyles
|
|
34
84
|
}, rest), children);
|
|
35
85
|
};
|
|
36
86
|
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.euiDescriptionListTitleStyles = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = require("@emotion/react");
|
|
9
|
+
|
|
10
|
+
var _global_styling = require("../../global_styling");
|
|
11
|
+
|
|
12
|
+
var _services = require("../../services");
|
|
13
|
+
|
|
14
|
+
var _title = require("../title/title.styles");
|
|
15
|
+
|
|
16
|
+
/*
|
|
17
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
18
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
19
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
20
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
21
|
+
* Side Public License, v 1.
|
|
22
|
+
*/
|
|
23
|
+
var euiDescriptionListTitleStyles = function euiDescriptionListTitleStyles(euiThemeContext) {
|
|
24
|
+
var euiTheme = euiThemeContext.euiTheme,
|
|
25
|
+
colorMode = euiThemeContext.colorMode;
|
|
26
|
+
var columnDisplay = "\n ".concat((0, _global_styling.logicalCSS)('width', '50%'), " // Flex-basis doesn't work in IE with padding\n ").concat((0, _global_styling.logicalCSS)('padding-right', euiTheme.size.s), "\n ");
|
|
27
|
+
return {
|
|
28
|
+
euiDescriptionList__title: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextBreakWord)(), "&:not(:first-of-type){", (0, _global_styling.logicalCSS)('margin-top', euiTheme.size.base), ";};label:euiDescriptionList__title;"),
|
|
29
|
+
// Types
|
|
30
|
+
row: /*#__PURE__*/(0, _react.css)(";label:row;"),
|
|
31
|
+
column: /*#__PURE__*/(0, _react.css)(columnDisplay, ";;label:column;"),
|
|
32
|
+
responsiveColumn: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs', 's']), "{", (0, _global_styling.logicalCSS)('width', '100%'), " padding:0;}", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['m', 'xl']), "{", columnDisplay, ";};label:responsiveColumn;"),
|
|
33
|
+
inline: /*#__PURE__*/(0, _react.css)("display:inline;border-radius:", euiTheme.border.radius.small, ";font-weight:", euiTheme.font.weight.medium, ";background-color:", colorMode === 'DARK' ? (0, _services.tint)(euiTheme.colors.lightestShade, 0.5) : euiTheme.colors.lightestShade, ";", (0, _global_styling.logicalCSS)('margin-vertical', '0'), " ", (0, _global_styling.logicalCSS)('margin-horizontal', euiTheme.size.xs), "&:first-of-type{", (0, _global_styling.logicalCSS)('margin-left', '0'), ";};label:inline;"),
|
|
34
|
+
// This nested block handles just the font styling based on compressed and reverse
|
|
35
|
+
fontStyles: {
|
|
36
|
+
normal: /*#__PURE__*/(0, _react.css)((0, _title.euiTitle)(euiThemeContext, 'xs'), ";;label:normal;"),
|
|
37
|
+
reverse: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiFontSize)(euiThemeContext, 's'), ";;label:reverse;"),
|
|
38
|
+
compressed: /*#__PURE__*/(0, _react.css)((0, _title.euiTitle)(euiThemeContext, 'xxs'), ";;label:compressed;")
|
|
39
|
+
},
|
|
40
|
+
// Inline types
|
|
41
|
+
inlineStyles: {
|
|
42
|
+
normal: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiFontSize)(euiThemeContext, 's'), ";", (0, _global_styling.logicalCSS)('padding-vertical', '1px'), " ", (0, _global_styling.logicalCSS)('padding-horizontal', euiTheme.size.xs), ";;label:normal;"),
|
|
43
|
+
compressed: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiFontSize)(euiThemeContext, 'xs'), ";", (0, _global_styling.logicalCSS)('padding-vertical', '0'), " ", (0, _global_styling.logicalCSS)('padding-horizontal', euiTheme.size.xs), ";;label:compressed;")
|
|
44
|
+
},
|
|
45
|
+
// Alignment
|
|
46
|
+
right: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('right'), ";;label:right;")
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
exports.euiDescriptionListTitleStyles = euiDescriptionListTitleStyles;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TYPES = exports.TEXT_STYLES = exports.ALIGNMENTS = void 0;
|
|
7
|
+
|
|
8
|
+
/*
|
|
9
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
10
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
11
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
12
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
13
|
+
* Side Public License, v 1.
|
|
14
|
+
*/
|
|
15
|
+
var TYPES = ['row', 'inline', 'column', 'responsiveColumn'];
|
|
16
|
+
exports.TYPES = TYPES;
|
|
17
|
+
var ALIGNMENTS = ['center', 'left'];
|
|
18
|
+
exports.ALIGNMENTS = ALIGNMENTS;
|
|
19
|
+
var TEXT_STYLES = ['normal', 'reverse'];
|
|
20
|
+
exports.TEXT_STYLES = TEXT_STYLES;
|
|
@@ -135,33 +135,7 @@ EuiHeader.propTypes = {
|
|
|
135
135
|
* Breadcrumbs in the header cannot be wrapped in a #EuiHeaderSection in order for truncation to work.
|
|
136
136
|
* Simply pass the array of EuiBreadcrumb objects
|
|
137
137
|
*/
|
|
138
|
-
breadcrumbs: _propTypes.default.arrayOf(_propTypes.default.
|
|
139
|
-
className: _propTypes.default.string,
|
|
140
|
-
"aria-label": _propTypes.default.string,
|
|
141
|
-
"data-test-subj": _propTypes.default.string,
|
|
142
|
-
href: _propTypes.default.string,
|
|
143
|
-
onClick: _propTypes.default.func,
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* Visible label of the breadcrumb
|
|
147
|
-
*/
|
|
148
|
-
text: _propTypes.default.node.isRequired,
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* Force a max-width on the breadcrumb text
|
|
152
|
-
*/
|
|
153
|
-
truncate: _propTypes.default.bool,
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* Accepts any EuiLink `color` when rendered as one (has `href` or `onClick`)
|
|
157
|
-
*/
|
|
158
|
-
color: _propTypes.default.any,
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* Override the existing `aria-current` which defaults to `page` for the last breadcrumb
|
|
162
|
-
*/
|
|
163
|
-
"aria-current": _propTypes.default.any
|
|
164
|
-
}).isRequired),
|
|
138
|
+
breadcrumbs: _propTypes.default.arrayOf(_propTypes.default.any.isRequired),
|
|
165
139
|
|
|
166
140
|
/**
|
|
167
141
|
* Other props to pass to #EuiHeaderBreadcrumbs
|
|
@@ -13,6 +13,10 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
13
13
|
|
|
14
14
|
var _breadcrumbs = require("../../breadcrumbs");
|
|
15
15
|
|
|
16
|
+
var _header_breadcrumbs = require("./header_breadcrumbs.styles");
|
|
17
|
+
|
|
18
|
+
var _services = require("../../../services");
|
|
19
|
+
|
|
16
20
|
var _react2 = require("@emotion/react");
|
|
17
21
|
|
|
18
22
|
var _excluded = ["className", "breadcrumbs"];
|
|
@@ -31,11 +35,16 @@ var EuiHeaderBreadcrumbs = function EuiHeaderBreadcrumbs(_ref) {
|
|
|
31
35
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
32
36
|
|
|
33
37
|
var classes = (0, _classnames.default)('euiHeaderBreadcrumbs', className);
|
|
38
|
+
var euiTheme = (0, _services.useEuiTheme)();
|
|
39
|
+
var styles = (0, _header_breadcrumbs.euiHeaderBreadcrumbsStyles)(euiTheme);
|
|
40
|
+
var cssHeaderBreadcrumbStyles = [styles.euiHeaderBreadcrumbs];
|
|
34
41
|
return (0, _react2.jsx)(_breadcrumbs.EuiBreadcrumbs, _extends({
|
|
35
42
|
max: 4,
|
|
36
43
|
truncate: true,
|
|
37
44
|
breadcrumbs: breadcrumbs,
|
|
38
|
-
className: classes
|
|
45
|
+
className: classes,
|
|
46
|
+
css: cssHeaderBreadcrumbStyles,
|
|
47
|
+
type: "application"
|
|
39
48
|
}, rest));
|
|
40
49
|
};
|
|
41
50
|
|
|
@@ -77,6 +86,7 @@ EuiHeaderBreadcrumbs.propTypes = {
|
|
|
77
86
|
"aria-label": _propTypes.default.string,
|
|
78
87
|
"data-test-subj": _propTypes.default.string,
|
|
79
88
|
href: _propTypes.default.string,
|
|
89
|
+
rel: _propTypes.default.string,
|
|
80
90
|
onClick: _propTypes.default.func,
|
|
81
91
|
|
|
82
92
|
/**
|
|
@@ -98,5 +108,17 @@ EuiHeaderBreadcrumbs.propTypes = {
|
|
|
98
108
|
* Override the existing `aria-current` which defaults to `page` for the last breadcrumb
|
|
99
109
|
*/
|
|
100
110
|
"aria-current": _propTypes.default.any
|
|
101
|
-
}).isRequired).isRequired
|
|
111
|
+
}).isRequired).isRequired,
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Determines breadcrumbs appearance, with `page` being the default styling.
|
|
115
|
+
* Application breadcrumbs should only be once per page, in (e.g.) EuiHeader
|
|
116
|
+
*/
|
|
117
|
+
type: _propTypes.default.oneOf(["page", "application"]),
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Whether the last breadcrumb should visually (and accessibly, to screen readers)
|
|
121
|
+
* be highlighted as the current page. Defaults to true.
|
|
122
|
+
*/
|
|
123
|
+
lastBreadcrumbIsCurrentPage: _propTypes.default.bool
|
|
102
124
|
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.euiHeaderBreadcrumbsStyles = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = require("@emotion/react");
|
|
9
|
+
|
|
10
|
+
var _global_styling = require("../../../global_styling");
|
|
11
|
+
|
|
12
|
+
/*
|
|
13
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
14
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
15
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
16
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
17
|
+
* Side Public License, v 1.
|
|
18
|
+
*/
|
|
19
|
+
var euiHeaderBreadcrumbsStyles = function euiHeaderBreadcrumbsStyles(_ref) {
|
|
20
|
+
var euiTheme = _ref.euiTheme;
|
|
21
|
+
return {
|
|
22
|
+
euiHeaderBreadcrumbs: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextTruncate)(), ";align-items:center;display:flex;flex-grow:1;", (0, _global_styling.logicalCSS)('margin-horizontal', euiTheme.size.s), ";;label:euiHeaderBreadcrumbs;")
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
exports.euiHeaderBreadcrumbsStyles = euiHeaderBreadcrumbsStyles;
|
|
@@ -85,15 +85,15 @@ var EuiHeaderLinks = function EuiHeaderLinks(_ref) {
|
|
|
85
85
|
mobileMenuIsOpen = _useState2[0],
|
|
86
86
|
setMobileMenuIsOpen = _useState2[1];
|
|
87
87
|
|
|
88
|
-
var onMenuButtonClick = function
|
|
88
|
+
var onMenuButtonClick = (0, _react.useCallback)(function (e) {
|
|
89
89
|
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
90
|
-
setMobileMenuIsOpen(
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
90
|
+
setMobileMenuIsOpen(function (mobileMenuIsOpen) {
|
|
91
|
+
return !mobileMenuIsOpen;
|
|
92
|
+
});
|
|
93
|
+
}, [onClick]);
|
|
94
|
+
var closeMenu = (0, _react.useCallback)(function () {
|
|
94
95
|
setMobileMenuIsOpen(false);
|
|
95
|
-
};
|
|
96
|
-
|
|
96
|
+
}, []);
|
|
97
97
|
(0, _react.useEffect)(function () {
|
|
98
98
|
window.addEventListener('resize', closeMenu);
|
|
99
99
|
return function () {
|
|
@@ -152,7 +152,7 @@ EuiHeaderLinks.propTypes = {
|
|
|
152
152
|
/**
|
|
153
153
|
* A list of named breakpoints at which to show the popover version
|
|
154
154
|
*/
|
|
155
|
-
popoverBreakpoints: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.
|
|
155
|
+
popoverBreakpoints: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.any.isRequired).isRequired, _propTypes.default.oneOf(["all", "none"])]),
|
|
156
156
|
|
|
157
157
|
/**
|
|
158
158
|
* Extend the functionality of the EuiPopover.button which is a EuiHeaderSectionItemButton.
|
|
@@ -38,7 +38,7 @@ var EuiIconTokenStruct = function EuiIconTokenStruct(_ref) {
|
|
|
38
38
|
id: titleId
|
|
39
39
|
}, title) : null, (0, _react2.jsx)("path", {
|
|
40
40
|
fillRule: "evenodd",
|
|
41
|
-
d: "M4.
|
|
41
|
+
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"
|
|
42
42
|
}));
|
|
43
43
|
};
|
|
44
44
|
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
|
2
|
-
<path fill-rule="evenodd" d="M4.
|
|
2
|
+
<path fill-rule="evenodd" 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 0 1 2 12.667V3.333C2 2.597 2.597 2 3.333 2Z"/>
|
|
3
3
|
</svg>
|