@elastic/eui 93.3.0 → 93.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eui_charts_theme.d.ts +9 -0
- package/dist/eui_charts_theme.js +56 -14
- package/dist/eui_charts_theme.js.map +1 -1
- package/es/components/breadcrumbs/_breadcrumb_content.js +362 -0
- package/es/components/breadcrumbs/_breadcrumb_content.styles.js +48 -0
- package/es/components/breadcrumbs/breadcrumb.js +10 -327
- package/es/components/breadcrumbs/breadcrumb.styles.js +5 -27
- package/es/components/breadcrumbs/breadcrumbs.js +4 -4
- package/es/components/breadcrumbs/types.js +1 -0
- package/es/components/button/button_group/button_group.js +16 -2
- package/es/components/button/button_group/button_group.styles.js +1 -1
- package/es/components/button/button_group/button_group_button.js +59 -5
- package/es/components/button/button_group/button_group_button.styles.js +39 -3
- package/es/components/datagrid/body/cell/data_grid_cell.js +97 -58
- package/es/components/datagrid/body/cell/data_grid_cell_actions.js +24 -18
- package/es/components/datagrid/body/cell/data_grid_cell_popover.js +64 -56
- package/es/components/datagrid/body/cell/data_grid_cell_wrapper.js +32 -31
- package/es/components/datagrid/body/cell/index.js +1 -1
- package/es/components/datagrid/body/data_grid_body.js +13 -0
- package/es/components/datagrid/body/data_grid_body_custom.js +52 -36
- package/es/components/datagrid/body/data_grid_body_virtualized.js +84 -56
- package/es/components/datagrid/body/data_grid_row_manager.js +6 -4
- package/es/components/datagrid/body/footer/use_data_grid_footer.js +1 -2
- package/es/components/datagrid/body/header/data_grid_control_header_cell.js +5 -4
- package/es/components/datagrid/body/header/data_grid_header_cell.js +73 -53
- package/es/components/datagrid/body/header/data_grid_header_row.js +15 -551
- package/es/components/datagrid/body/header/use_data_grid_header.js +7 -6
- package/es/components/datagrid/controls/column_selector.js +126 -123
- package/es/components/datagrid/controls/column_sorting.js +605 -103
- package/es/components/datagrid/controls/column_sorting_draggable.js +24 -22
- package/es/components/datagrid/controls/display_selector.js +109 -107
- package/es/components/datagrid/data_grid.a11y.js +13 -12
- package/es/components/datagrid/data_grid.js +45 -22
- package/es/components/datagrid/utils/col_widths.js +12 -8
- package/es/components/datagrid/utils/focus.js +10 -8
- package/es/components/datagrid/utils/grid_height_width.js +31 -30
- package/es/components/datagrid/utils/ref.js +1 -1
- package/es/components/datagrid/utils/row_heights.js +2 -2
- package/es/components/datagrid/utils/sorting.js +29 -27
- package/es/components/date_picker/super_date_picker/super_date_picker.js +9 -0
- package/es/components/date_picker/super_date_picker/super_update_button.js +57 -29
- package/es/components/flex/flex_grid.js +22 -8
- package/es/components/flex/flex_grid.styles.js +13 -6
- package/es/components/flex/flex_group.js +10 -11
- package/es/components/flex/flex_item.js +9 -11
- package/es/components/flex/flex_item.styles.js +107 -122
- package/es/components/flyout/flyout.js +16 -18
- package/es/components/header/header_breadcrumbs/header_breadcrumbs.js +3 -5
- package/es/components/modal/confirm_modal.js +2 -1
- package/es/components/modal/modal.js +12 -3
- package/es/components/observer/resize_observer/resize_observer.js +15 -24
- package/es/components/spacer/spacer.js +2 -3
- package/es/components/toast/global_toast_list.js +70 -73
- package/es/components/toast/toast.js +27 -42
- package/es/components/toast/toast.styles.js +2 -17
- package/es/services/color/eui_palettes.js +21 -13
- package/es/services/color/index.js +1 -1
- package/es/services/hooks/index.js +1 -0
- package/es/services/hooks/useDeepEqual.js +23 -0
- package/es/services/index.js +1 -1
- package/eui.d.ts +2442 -2337
- package/i18ntokens.json +259 -259
- package/lib/components/breadcrumbs/_breadcrumb_content.js +372 -0
- package/lib/components/breadcrumbs/_breadcrumb_content.styles.js +55 -0
- package/lib/components/breadcrumbs/breadcrumb.js +11 -331
- package/lib/components/breadcrumbs/breadcrumb.styles.js +5 -29
- package/lib/components/breadcrumbs/breadcrumbs.js +3 -3
- package/lib/components/breadcrumbs/types.js +5 -0
- package/lib/components/button/button_group/button_group.js +16 -2
- package/lib/components/button/button_group/button_group.styles.js +1 -1
- package/lib/components/button/button_group/button_group_button.js +59 -5
- package/lib/components/button/button_group/button_group_button.styles.js +45 -11
- package/lib/components/datagrid/body/cell/data_grid_cell.js +95 -57
- package/lib/components/datagrid/body/cell/data_grid_cell_actions.js +24 -18
- package/lib/components/datagrid/body/cell/data_grid_cell_popover.js +63 -55
- package/lib/components/datagrid/body/cell/data_grid_cell_wrapper.js +32 -31
- package/lib/components/datagrid/body/cell/index.js +2 -2
- package/lib/components/datagrid/body/data_grid_body.js +13 -0
- package/lib/components/datagrid/body/data_grid_body_custom.js +51 -35
- package/lib/components/datagrid/body/data_grid_body_virtualized.js +83 -55
- package/lib/components/datagrid/body/data_grid_row_manager.js +5 -3
- package/lib/components/datagrid/body/footer/use_data_grid_footer.js +1 -2
- package/lib/components/datagrid/body/header/data_grid_control_header_cell.js +8 -4
- package/lib/components/datagrid/body/header/data_grid_header_cell.js +72 -52
- package/lib/components/datagrid/body/header/data_grid_header_row.js +14 -550
- package/lib/components/datagrid/body/header/use_data_grid_header.js +7 -6
- package/lib/components/datagrid/controls/column_selector.js +126 -123
- package/lib/components/datagrid/controls/column_sorting.js +615 -110
- package/lib/components/datagrid/controls/column_sorting_draggable.js +27 -22
- package/lib/components/datagrid/controls/display_selector.js +109 -107
- package/lib/components/datagrid/data_grid.a11y.js +13 -12
- package/lib/components/datagrid/data_grid.js +43 -20
- package/lib/components/datagrid/utils/col_widths.js +12 -8
- package/lib/components/datagrid/utils/focus.js +10 -8
- package/lib/components/datagrid/utils/grid_height_width.js +29 -28
- package/lib/components/datagrid/utils/ref.js +1 -1
- package/lib/components/datagrid/utils/row_heights.js +1 -1
- package/lib/components/datagrid/utils/sorting.js +31 -29
- package/lib/components/date_picker/super_date_picker/super_date_picker.js +9 -0
- package/lib/components/date_picker/super_date_picker/super_update_button.js +57 -29
- package/lib/components/flex/flex_grid.js +23 -7
- package/lib/components/flex/flex_grid.styles.js +13 -6
- package/lib/components/flex/flex_group.js +10 -10
- package/lib/components/flex/flex_item.js +13 -13
- package/lib/components/flex/flex_item.styles.js +107 -122
- package/lib/components/flyout/flyout.js +16 -18
- package/lib/components/header/header_breadcrumbs/header_breadcrumbs.js +3 -5
- package/lib/components/modal/confirm_modal.js +2 -1
- package/lib/components/modal/modal.js +12 -3
- package/lib/components/observer/resize_observer/resize_observer.js +15 -24
- package/lib/components/spacer/spacer.js +1 -2
- package/lib/components/toast/global_toast_list.js +68 -71
- package/lib/components/toast/toast.js +25 -40
- package/lib/components/toast/toast.styles.js +11 -25
- package/lib/services/color/eui_palettes.js +24 -14
- package/lib/services/color/index.js +14 -0
- package/lib/services/hooks/index.js +11 -0
- package/lib/services/hooks/useDeepEqual.js +30 -0
- package/lib/services/index.js +15 -1
- package/optimize/es/components/breadcrumbs/_breadcrumb_content.js +153 -0
- package/optimize/es/components/breadcrumbs/_breadcrumb_content.styles.js +48 -0
- package/optimize/es/components/breadcrumbs/breadcrumb.js +10 -110
- package/optimize/es/components/breadcrumbs/breadcrumb.styles.js +5 -27
- package/optimize/es/components/breadcrumbs/breadcrumbs.js +4 -4
- package/optimize/es/components/breadcrumbs/types.js +1 -0
- package/optimize/es/components/button/button_group/button_group.js +2 -2
- package/optimize/es/components/button/button_group/button_group.styles.js +1 -1
- package/optimize/es/components/button/button_group/button_group_button.js +36 -4
- package/optimize/es/components/button/button_group/button_group_button.styles.js +39 -3
- package/optimize/es/components/datagrid/body/cell/data_grid_cell.js +80 -55
- package/optimize/es/components/datagrid/body/cell/data_grid_cell_actions.js +24 -18
- package/optimize/es/components/datagrid/body/cell/data_grid_cell_popover.js +64 -56
- package/optimize/es/components/datagrid/body/cell/data_grid_cell_wrapper.js +32 -31
- package/optimize/es/components/datagrid/body/cell/index.js +1 -1
- package/optimize/es/components/datagrid/body/data_grid_body_custom.js +39 -36
- package/optimize/es/components/datagrid/body/data_grid_body_virtualized.js +69 -49
- package/optimize/es/components/datagrid/body/data_grid_row_manager.js +6 -4
- package/optimize/es/components/datagrid/body/footer/use_data_grid_footer.js +1 -2
- package/optimize/es/components/datagrid/body/header/data_grid_control_header_cell.js +4 -3
- package/optimize/es/components/datagrid/body/header/data_grid_header_cell.js +65 -49
- package/optimize/es/components/datagrid/body/header/data_grid_header_row.js +15 -13
- package/optimize/es/components/datagrid/body/header/use_data_grid_header.js +7 -6
- package/optimize/es/components/datagrid/controls/column_selector.js +126 -123
- package/optimize/es/components/datagrid/controls/column_sorting.js +121 -103
- package/optimize/es/components/datagrid/controls/column_sorting_draggable.js +24 -22
- package/optimize/es/components/datagrid/controls/display_selector.js +109 -107
- package/optimize/es/components/datagrid/data_grid.a11y.js +13 -12
- package/optimize/es/components/datagrid/data_grid.js +45 -22
- package/optimize/es/components/datagrid/utils/col_widths.js +9 -5
- package/optimize/es/components/datagrid/utils/focus.js +10 -8
- package/optimize/es/components/datagrid/utils/grid_height_width.js +31 -30
- package/optimize/es/components/datagrid/utils/ref.js +1 -1
- package/optimize/es/components/datagrid/utils/row_heights.js +2 -2
- package/optimize/es/components/datagrid/utils/sorting.js +29 -27
- package/optimize/es/components/date_picker/super_date_picker/super_update_button.js +49 -29
- package/optimize/es/components/flex/flex_grid.js +19 -8
- package/optimize/es/components/flex/flex_grid.styles.js +13 -6
- package/optimize/es/components/flex/flex_group.js +9 -10
- package/optimize/es/components/flex/flex_item.js +9 -11
- package/optimize/es/components/flex/flex_item.styles.js +107 -122
- package/optimize/es/components/flyout/flyout.js +16 -18
- package/optimize/es/components/header/header_breadcrumbs/header_breadcrumbs.js +3 -5
- package/optimize/es/components/modal/confirm_modal.js +2 -1
- package/optimize/es/components/modal/modal.js +6 -2
- package/optimize/es/components/observer/resize_observer/resize_observer.js +15 -24
- package/optimize/es/components/spacer/spacer.js +2 -3
- package/optimize/es/components/toast/global_toast_list.js +70 -73
- package/optimize/es/components/toast/toast.js +27 -42
- package/optimize/es/components/toast/toast.styles.js +2 -17
- package/optimize/es/services/color/eui_palettes.js +21 -13
- package/optimize/es/services/color/index.js +1 -1
- package/optimize/es/services/hooks/index.js +1 -0
- package/optimize/es/services/hooks/useDeepEqual.js +23 -0
- package/optimize/es/services/index.js +1 -1
- package/optimize/lib/components/breadcrumbs/_breadcrumb_content.js +163 -0
- package/optimize/lib/components/breadcrumbs/_breadcrumb_content.styles.js +55 -0
- package/optimize/lib/components/breadcrumbs/breadcrumb.js +10 -113
- package/optimize/lib/components/breadcrumbs/breadcrumb.styles.js +5 -29
- package/optimize/lib/components/breadcrumbs/breadcrumbs.js +3 -3
- package/optimize/lib/components/breadcrumbs/types.js +5 -0
- package/optimize/lib/components/button/button_group/button_group.js +2 -2
- package/optimize/lib/components/button/button_group/button_group.styles.js +1 -1
- package/optimize/lib/components/button/button_group/button_group_button.js +37 -5
- package/optimize/lib/components/button/button_group/button_group_button.styles.js +45 -11
- package/optimize/lib/components/datagrid/body/cell/data_grid_cell.js +78 -54
- package/optimize/lib/components/datagrid/body/cell/data_grid_cell_actions.js +24 -18
- package/optimize/lib/components/datagrid/body/cell/data_grid_cell_popover.js +63 -55
- package/optimize/lib/components/datagrid/body/cell/data_grid_cell_wrapper.js +32 -31
- package/optimize/lib/components/datagrid/body/cell/index.js +2 -2
- package/optimize/lib/components/datagrid/body/data_grid_body_custom.js +38 -35
- package/optimize/lib/components/datagrid/body/data_grid_body_virtualized.js +70 -50
- package/optimize/lib/components/datagrid/body/data_grid_row_manager.js +5 -3
- package/optimize/lib/components/datagrid/body/footer/use_data_grid_footer.js +1 -2
- package/optimize/lib/components/datagrid/body/header/data_grid_control_header_cell.js +8 -4
- package/optimize/lib/components/datagrid/body/header/data_grid_header_cell.js +65 -49
- package/optimize/lib/components/datagrid/body/header/data_grid_header_row.js +14 -12
- package/optimize/lib/components/datagrid/body/header/use_data_grid_header.js +7 -6
- package/optimize/lib/components/datagrid/controls/column_selector.js +126 -123
- package/optimize/lib/components/datagrid/controls/column_sorting.js +125 -107
- package/optimize/lib/components/datagrid/controls/column_sorting_draggable.js +27 -22
- package/optimize/lib/components/datagrid/controls/display_selector.js +109 -107
- package/optimize/lib/components/datagrid/data_grid.a11y.js +13 -12
- package/optimize/lib/components/datagrid/data_grid.js +43 -20
- package/optimize/lib/components/datagrid/utils/col_widths.js +9 -5
- package/optimize/lib/components/datagrid/utils/focus.js +10 -8
- package/optimize/lib/components/datagrid/utils/grid_height_width.js +29 -28
- package/optimize/lib/components/datagrid/utils/ref.js +1 -1
- package/optimize/lib/components/datagrid/utils/row_heights.js +1 -1
- package/optimize/lib/components/datagrid/utils/sorting.js +31 -29
- package/optimize/lib/components/date_picker/super_date_picker/super_update_button.js +49 -29
- package/optimize/lib/components/flex/flex_grid.js +21 -7
- package/optimize/lib/components/flex/flex_grid.styles.js +13 -6
- package/optimize/lib/components/flex/flex_group.js +9 -9
- package/optimize/lib/components/flex/flex_item.js +13 -13
- package/optimize/lib/components/flex/flex_item.styles.js +107 -122
- package/optimize/lib/components/flyout/flyout.js +16 -18
- package/optimize/lib/components/header/header_breadcrumbs/header_breadcrumbs.js +3 -5
- package/optimize/lib/components/modal/confirm_modal.js +2 -1
- package/optimize/lib/components/modal/modal.js +6 -2
- package/optimize/lib/components/observer/resize_observer/resize_observer.js +15 -24
- package/optimize/lib/components/spacer/spacer.js +1 -2
- package/optimize/lib/components/toast/global_toast_list.js +68 -71
- package/optimize/lib/components/toast/toast.js +25 -40
- package/optimize/lib/components/toast/toast.styles.js +11 -25
- package/optimize/lib/services/color/eui_palettes.js +24 -14
- package/optimize/lib/services/color/index.js +14 -0
- package/optimize/lib/services/hooks/index.js +11 -0
- package/optimize/lib/services/hooks/useDeepEqual.js +30 -0
- package/optimize/lib/services/index.js +15 -1
- package/package.json +2 -2
- package/test-env/components/breadcrumbs/_breadcrumb_content.js +363 -0
- package/test-env/components/breadcrumbs/_breadcrumb_content.styles.js +55 -0
- package/test-env/components/breadcrumbs/breadcrumb.js +11 -326
- package/test-env/components/breadcrumbs/breadcrumb.styles.js +5 -29
- package/test-env/components/breadcrumbs/breadcrumbs.js +3 -3
- package/test-env/components/breadcrumbs/types.js +5 -0
- package/test-env/components/button/button_group/button_group.js +16 -2
- package/test-env/components/button/button_group/button_group.styles.js +1 -1
- package/test-env/components/button/button_group/button_group_button.js +56 -5
- package/test-env/components/button/button_group/button_group_button.styles.js +45 -11
- package/test-env/components/datagrid/body/cell/data_grid_cell.js +95 -57
- package/test-env/components/datagrid/body/cell/data_grid_cell_actions.js +24 -18
- package/test-env/components/datagrid/body/cell/data_grid_cell_popover.js +63 -55
- package/test-env/components/datagrid/body/cell/data_grid_cell_wrapper.js +32 -31
- package/test-env/components/datagrid/body/cell/index.js +2 -2
- package/test-env/components/datagrid/body/data_grid_body.js +13 -0
- package/test-env/components/datagrid/body/data_grid_body_custom.js +51 -35
- package/test-env/components/datagrid/body/data_grid_body_virtualized.js +83 -55
- package/test-env/components/datagrid/body/data_grid_row_manager.js +5 -3
- package/test-env/components/datagrid/body/footer/use_data_grid_footer.js +1 -2
- package/test-env/components/datagrid/body/header/data_grid_control_header_cell.js +8 -4
- package/test-env/components/datagrid/body/header/data_grid_header_cell.js +72 -52
- package/test-env/components/datagrid/body/header/data_grid_header_row.js +14 -550
- package/test-env/components/datagrid/body/header/use_data_grid_header.js +7 -6
- package/test-env/components/datagrid/controls/column_selector.js +126 -123
- package/test-env/components/datagrid/controls/column_sorting.js +607 -106
- package/test-env/components/datagrid/controls/column_sorting_draggable.js +27 -22
- package/test-env/components/datagrid/controls/display_selector.js +109 -107
- package/test-env/components/datagrid/data_grid.a11y.js +13 -12
- package/test-env/components/datagrid/data_grid.js +43 -20
- package/test-env/components/datagrid/utils/col_widths.js +9 -5
- package/test-env/components/datagrid/utils/focus.js +10 -8
- package/test-env/components/datagrid/utils/grid_height_width.js +29 -28
- package/test-env/components/datagrid/utils/ref.js +1 -1
- package/test-env/components/datagrid/utils/row_heights.js +1 -1
- package/test-env/components/datagrid/utils/sorting.js +31 -29
- package/test-env/components/date_picker/super_date_picker/super_date_picker.js +9 -0
- package/test-env/components/date_picker/super_date_picker/super_update_button.js +57 -29
- package/test-env/components/flex/flex_grid.js +21 -7
- package/test-env/components/flex/flex_grid.styles.js +13 -6
- package/test-env/components/flex/flex_group.js +10 -10
- package/test-env/components/flex/flex_item.js +13 -13
- package/test-env/components/flex/flex_item.styles.js +107 -122
- package/test-env/components/header/header_breadcrumbs/header_breadcrumbs.js +3 -5
- package/test-env/components/modal/confirm_modal.js +2 -1
- package/test-env/components/modal/modal.js +12 -3
- package/test-env/components/spacer/spacer.js +1 -2
- package/test-env/components/toast/global_toast_list.js +68 -71
- package/test-env/components/toast/toast.js +25 -40
- package/test-env/components/toast/toast.styles.js +11 -25
- package/test-env/services/color/eui_palettes.js +24 -14
- package/test-env/services/color/index.js +14 -0
- package/test-env/services/hooks/index.js +11 -0
- package/test-env/services/hooks/useDeepEqual.js +30 -0
- package/test-env/services/index.js +15 -1
- package/src/themes/charts/theme.scss +0 -5
|
@@ -86,6 +86,14 @@ var _ref9 = process.env.NODE_ENV === "production" ? {
|
|
|
86
86
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
87
87
|
};
|
|
88
88
|
var _ref10 = process.env.NODE_ENV === "production" ? {
|
|
89
|
+
name: "1t690q7-column",
|
|
90
|
+
styles: "grid-auto-flow:column;label:column;"
|
|
91
|
+
} : {
|
|
92
|
+
name: "1t690q7-column",
|
|
93
|
+
styles: "grid-auto-flow:column;label:column;",
|
|
94
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
95
|
+
};
|
|
96
|
+
var _ref11 = process.env.NODE_ENV === "production" ? {
|
|
89
97
|
name: "1uinx0j-euiFlexGrid",
|
|
90
98
|
styles: "display:grid;label:euiFlexGrid;"
|
|
91
99
|
} : {
|
|
@@ -93,18 +101,17 @@ var _ref10 = process.env.NODE_ENV === "production" ? {
|
|
|
93
101
|
styles: "display:grid;label:euiFlexGrid;",
|
|
94
102
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
95
103
|
};
|
|
96
|
-
// Note: the only way to get column direction working with `display: grid`
|
|
97
|
-
// the same way `display: flex` works is to manually set `grid-template-rows`,
|
|
98
|
-
// calculated based on the number of children in the grid
|
|
99
104
|
var euiFlexGridStyles = function euiFlexGridStyles(euiThemeContext) {
|
|
100
|
-
var gridTemplateRows = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
101
105
|
var euiTheme = euiThemeContext.euiTheme;
|
|
102
106
|
return {
|
|
103
|
-
euiFlexGrid:
|
|
107
|
+
euiFlexGrid: _ref11,
|
|
104
108
|
responsive: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiMaxBreakpoint)(euiThemeContext, 'm'), "{grid-template-columns:repeat(1, 1fr);grid-auto-flow:row;};label:responsive;"),
|
|
105
109
|
direction: {
|
|
106
110
|
row: /*#__PURE__*/(0, _react.css)(";label:row;"),
|
|
107
|
-
|
|
111
|
+
// Note: the only way to get column direction working with `display: grid`
|
|
112
|
+
// the same way `display: flex` works is to manually set `grid-template-rows`,
|
|
113
|
+
// calculated based on the number of children in the grid
|
|
114
|
+
column: _ref10
|
|
108
115
|
},
|
|
109
116
|
columnCount: {
|
|
110
117
|
'1': _ref9,
|
|
@@ -5,7 +5,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.JUSTIFY_CONTENTS = exports.GUTTER_SIZES = exports.EuiFlexGroup = exports.DIRECTIONS = exports.ALIGN_ITEMS = void 0;
|
|
8
|
+
exports.JUSTIFY_CONTENTS = exports.GUTTER_SIZES = exports.EuiFlexGroup = exports.DIRECTIONS = exports.COMPONENT_TYPES = exports.ALIGN_ITEMS = void 0;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
@@ -31,9 +31,8 @@ var JUSTIFY_CONTENTS = ['flexStart', 'flexEnd', 'center', 'spaceBetween', 'space
|
|
|
31
31
|
exports.JUSTIFY_CONTENTS = JUSTIFY_CONTENTS;
|
|
32
32
|
var DIRECTIONS = ['row', 'rowReverse', 'column', 'columnReverse'];
|
|
33
33
|
exports.DIRECTIONS = DIRECTIONS;
|
|
34
|
-
var
|
|
35
|
-
|
|
36
|
-
};
|
|
34
|
+
var COMPONENT_TYPES = ['div', 'span'];
|
|
35
|
+
exports.COMPONENT_TYPES = COMPONENT_TYPES;
|
|
37
36
|
var EuiFlexGroup = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
38
37
|
var children = _ref.children,
|
|
39
38
|
className = _ref.className,
|
|
@@ -52,13 +51,14 @@ var EuiFlexGroup = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
52
51
|
_ref$component = _ref.component,
|
|
53
52
|
component = _ref$component === void 0 ? 'div' : _ref$component,
|
|
54
53
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
55
|
-
var
|
|
56
|
-
var styles = (0, _flex_group.euiFlexGroupStyles)(euiTheme);
|
|
54
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_flex_group.euiFlexGroupStyles);
|
|
57
55
|
var cssStyles = [styles.euiFlexGroup, responsive && !direction.includes('column') && styles.responsive, wrap && styles.wrap, styles.gutterSizes[gutterSize], styles.justifyContent[justifyContent], styles.alignItems[alignItems], styles.direction[direction]];
|
|
58
56
|
var classes = (0, _classnames.default)('euiFlexGroup', className);
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
57
|
+
(0, _react.useEffect)(function () {
|
|
58
|
+
if (!COMPONENT_TYPES.includes(component)) {
|
|
59
|
+
throw new Error("".concat(component, " is not a valid element type. Use `div` or `span`."));
|
|
60
|
+
}
|
|
61
|
+
}, [component]);
|
|
62
62
|
return component === 'span' ? (0, _react2.jsx)("span", (0, _extends2.default)({
|
|
63
63
|
css: cssStyles,
|
|
64
64
|
className: classes,
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
|
-
exports.
|
|
8
|
+
exports.EuiFlexItem = void 0;
|
|
8
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
|
-
var _react =
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
13
|
var _flex_item = require("./flex_item.styles");
|
|
13
14
|
var _react2 = require("@emotion/react");
|
|
@@ -19,6 +20,9 @@ var _excluded = ["children", "className", "grow", "component"];
|
|
|
19
20
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
20
21
|
* Side Public License, v 1.
|
|
21
22
|
*/
|
|
23
|
+
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); }
|
|
24
|
+
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; }
|
|
25
|
+
var VALID_GROW_VALUES = [null, undefined, true, false, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
|
22
26
|
var EuiFlexItem = function EuiFlexItem(_ref) {
|
|
23
27
|
var children = _ref.children,
|
|
24
28
|
className = _ref.className,
|
|
@@ -27,20 +31,16 @@ var EuiFlexItem = function EuiFlexItem(_ref) {
|
|
|
27
31
|
_ref$component = _ref.component,
|
|
28
32
|
Component = _ref$component === void 0 ? 'div' : _ref$component,
|
|
29
33
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
34
|
+
(0, _react.useEffect)(function () {
|
|
35
|
+
if (VALID_GROW_VALUES.indexOf(grow) === -1) {
|
|
36
|
+
throw new Error("Prop `grow` passed to `EuiFlexItem` must be a boolean or an integer between 0 and 10, received `".concat(grow, "`"));
|
|
37
|
+
}
|
|
38
|
+
}, [grow]);
|
|
39
|
+
var cssStyles = [_flex_item.euiFlexItemStyles.euiFlexItem, !grow ? _flex_item.euiFlexItemStyles.growZero : _flex_item.euiFlexItemStyles.grow, grow && (typeof grow === 'number' ? _flex_item.euiFlexItemStyles.growSizes[grow] : _flex_item.euiFlexItemStyles.growSizes['1'])];
|
|
33
40
|
var classes = (0, _classnames.default)('euiFlexItem', className);
|
|
34
41
|
return (0, _react2.jsx)(Component, (0, _extends2.default)({
|
|
35
42
|
css: cssStyles,
|
|
36
43
|
className: classes
|
|
37
44
|
}, rest), children);
|
|
38
45
|
};
|
|
39
|
-
exports.EuiFlexItem = EuiFlexItem;
|
|
40
|
-
var VALID_GROW_VALUES = [null, undefined, true, false, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
|
41
|
-
exports.VALID_GROW_VALUES = VALID_GROW_VALUES;
|
|
42
|
-
function validateGrowValue(value) {
|
|
43
|
-
if (VALID_GROW_VALUES.indexOf(value) === -1) {
|
|
44
|
-
throw new Error("Prop `grow` passed to `EuiFlexItem` must be a boolean or an integer between 0 and 10, received `".concat(value, "`"));
|
|
45
|
-
}
|
|
46
|
-
}
|
|
46
|
+
exports.EuiFlexItem = EuiFlexItem;
|
|
@@ -12,128 +12,113 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
12
12
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
13
13
|
* Side Public License, v 1.
|
|
14
14
|
*/
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
// 1. Allow EuiPanels to expand to fill the item.
|
|
122
|
-
euiFlexItem: _ref13,
|
|
123
|
-
growZero: _ref12,
|
|
124
|
-
grow: _ref11,
|
|
125
|
-
growSizes: {
|
|
126
|
-
'1': _ref10,
|
|
127
|
-
'2': _ref9,
|
|
128
|
-
'3': _ref8,
|
|
129
|
-
'4': _ref7,
|
|
130
|
-
'5': _ref6,
|
|
131
|
-
'6': _ref5,
|
|
132
|
-
'7': _ref4,
|
|
133
|
-
'8': _ref3,
|
|
134
|
-
'9': _ref2,
|
|
135
|
-
'10': _ref
|
|
15
|
+
var euiFlexItemStyles = {
|
|
16
|
+
// 1. Allow EuiPanels to expand to fill the item.
|
|
17
|
+
euiFlexItem: process.env.NODE_ENV === "production" ? {
|
|
18
|
+
name: "19hf44n-euiFlexItem",
|
|
19
|
+
styles: "display:flex;flex-direction:column;label:euiFlexItem;"
|
|
20
|
+
} : {
|
|
21
|
+
name: "19hf44n-euiFlexItem",
|
|
22
|
+
styles: "display:flex;flex-direction:column;label:euiFlexItem;",
|
|
23
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
24
|
+
},
|
|
25
|
+
growZero: process.env.NODE_ENV === "production" ? {
|
|
26
|
+
name: "1pat7n0-growZero",
|
|
27
|
+
styles: "flex-grow:0;flex-basis:auto;label:growZero;"
|
|
28
|
+
} : {
|
|
29
|
+
name: "1pat7n0-growZero",
|
|
30
|
+
styles: "flex-grow:0;flex-basis:auto;label:growZero;",
|
|
31
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
32
|
+
},
|
|
33
|
+
grow: process.env.NODE_ENV === "production" ? {
|
|
34
|
+
name: "tr4wer-grow",
|
|
35
|
+
styles: "flex-basis:0%;label:grow;"
|
|
36
|
+
} : {
|
|
37
|
+
name: "tr4wer-grow",
|
|
38
|
+
styles: "flex-basis:0%;label:grow;",
|
|
39
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
40
|
+
},
|
|
41
|
+
growSizes: {
|
|
42
|
+
'1': process.env.NODE_ENV === "production" ? {
|
|
43
|
+
name: "1v6uyoj-1",
|
|
44
|
+
styles: "flex-grow:1;label:1;"
|
|
45
|
+
} : {
|
|
46
|
+
name: "1v6uyoj-1",
|
|
47
|
+
styles: "flex-grow:1;label:1;",
|
|
48
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
49
|
+
},
|
|
50
|
+
'2': process.env.NODE_ENV === "production" ? {
|
|
51
|
+
name: "1l86xxh-2",
|
|
52
|
+
styles: "flex-grow:2;label:2;"
|
|
53
|
+
} : {
|
|
54
|
+
name: "1l86xxh-2",
|
|
55
|
+
styles: "flex-grow:2;label:2;",
|
|
56
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
57
|
+
},
|
|
58
|
+
'3': process.env.NODE_ENV === "production" ? {
|
|
59
|
+
name: "1sl79ay-3",
|
|
60
|
+
styles: "flex-grow:3;label:3;"
|
|
61
|
+
} : {
|
|
62
|
+
name: "1sl79ay-3",
|
|
63
|
+
styles: "flex-grow:3;label:3;",
|
|
64
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
65
|
+
},
|
|
66
|
+
'4': process.env.NODE_ENV === "production" ? {
|
|
67
|
+
name: "k4pnsg-4",
|
|
68
|
+
styles: "flex-grow:4;label:4;"
|
|
69
|
+
} : {
|
|
70
|
+
name: "k4pnsg-4",
|
|
71
|
+
styles: "flex-grow:4;label:4;",
|
|
72
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
73
|
+
},
|
|
74
|
+
'5': process.env.NODE_ENV === "production" ? {
|
|
75
|
+
name: "1cx5fxs-5",
|
|
76
|
+
styles: "flex-grow:5;label:5;"
|
|
77
|
+
} : {
|
|
78
|
+
name: "1cx5fxs-5",
|
|
79
|
+
styles: "flex-grow:5;label:5;",
|
|
80
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
81
|
+
},
|
|
82
|
+
'6': process.env.NODE_ENV === "production" ? {
|
|
83
|
+
name: "1in9iiy-6",
|
|
84
|
+
styles: "flex-grow:6;label:6;"
|
|
85
|
+
} : {
|
|
86
|
+
name: "1in9iiy-6",
|
|
87
|
+
styles: "flex-grow:6;label:6;",
|
|
88
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
89
|
+
},
|
|
90
|
+
'7': process.env.NODE_ENV === "production" ? {
|
|
91
|
+
name: "fvh3nz-7",
|
|
92
|
+
styles: "flex-grow:7;label:7;"
|
|
93
|
+
} : {
|
|
94
|
+
name: "fvh3nz-7",
|
|
95
|
+
styles: "flex-grow:7;label:7;",
|
|
96
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
97
|
+
},
|
|
98
|
+
'8': process.env.NODE_ENV === "production" ? {
|
|
99
|
+
name: "fjdgzc-8",
|
|
100
|
+
styles: "flex-grow:8;label:8;"
|
|
101
|
+
} : {
|
|
102
|
+
name: "fjdgzc-8",
|
|
103
|
+
styles: "flex-grow:8;label:8;",
|
|
104
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
105
|
+
},
|
|
106
|
+
'9': process.env.NODE_ENV === "production" ? {
|
|
107
|
+
name: "1tyr8p6-9",
|
|
108
|
+
styles: "flex-grow:9;label:9;"
|
|
109
|
+
} : {
|
|
110
|
+
name: "1tyr8p6-9",
|
|
111
|
+
styles: "flex-grow:9;label:9;",
|
|
112
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
113
|
+
},
|
|
114
|
+
'10': process.env.NODE_ENV === "production" ? {
|
|
115
|
+
name: "n7polf-10",
|
|
116
|
+
styles: "flex-grow:10;label:10;"
|
|
117
|
+
} : {
|
|
118
|
+
name: "n7polf-10",
|
|
119
|
+
styles: "flex-grow:10;label:10;",
|
|
120
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
136
121
|
}
|
|
137
|
-
}
|
|
122
|
+
}
|
|
138
123
|
};
|
|
139
124
|
exports.euiFlexItemStyles = euiFlexItemStyles;
|
|
@@ -100,33 +100,31 @@ var EuiFlyout = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
100
100
|
resizeRef = _useState2[0],
|
|
101
101
|
setResizeRef = _useState2[1];
|
|
102
102
|
var setRef = (0, _services.useCombinedRefs)([setResizeRef, ref]);
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
var _useResizeObserver = (0, _resize_observer.useResizeObserver)(isPushed ? resizeRef : null, 'width'),
|
|
104
|
+
width = _useResizeObserver.width;
|
|
105
105
|
(0, _react.useEffect)(function () {
|
|
106
|
-
// This class doesn't actually do anything by EUI, but is nice to add for consumers (JIC)
|
|
107
|
-
document.body.classList.add('euiBody--hasFlyout');
|
|
108
|
-
|
|
109
106
|
/**
|
|
110
107
|
* Accomodate for the `isPushed` state by adding padding to the body equal to the width of the element
|
|
111
108
|
*/
|
|
112
109
|
if (isPushed) {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
document.body.style
|
|
117
|
-
}
|
|
110
|
+
var paddingSide = side === 'left' ? 'paddingInlineStart' : 'paddingInlineEnd';
|
|
111
|
+
document.body.style[paddingSide] = "".concat(width, "px");
|
|
112
|
+
return function () {
|
|
113
|
+
document.body.style[paddingSide] = '';
|
|
114
|
+
};
|
|
118
115
|
}
|
|
116
|
+
}, [isPushed, side, width]);
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* This class doesn't actually do anything by EUI, but is nice to add for consumers (JIC)
|
|
120
|
+
*/
|
|
121
|
+
(0, _react.useEffect)(function () {
|
|
122
|
+
document.body.classList.add('euiBody--hasFlyout');
|
|
119
123
|
return function () {
|
|
124
|
+
// Remove the hasFlyout class when the flyout is unmounted
|
|
120
125
|
document.body.classList.remove('euiBody--hasFlyout');
|
|
121
|
-
if (isPushed) {
|
|
122
|
-
if (side === 'right') {
|
|
123
|
-
document.body.style.paddingInlineEnd = '';
|
|
124
|
-
} else if (side === 'left') {
|
|
125
|
-
document.body.style.paddingInlineStart = '';
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
126
|
};
|
|
129
|
-
}, [
|
|
127
|
+
}, []);
|
|
130
128
|
|
|
131
129
|
/**
|
|
132
130
|
* ESC key closes flyout (always?)
|
|
@@ -9,9 +9,9 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
9
9
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
|
+
var _services = require("../../../services");
|
|
12
13
|
var _breadcrumbs = require("../../breadcrumbs");
|
|
13
14
|
var _header_breadcrumbs = require("./header_breadcrumbs.styles");
|
|
14
|
-
var _services = require("../../../services");
|
|
15
15
|
var _react2 = require("@emotion/react");
|
|
16
16
|
var _excluded = ["className", "breadcrumbs"];
|
|
17
17
|
/*
|
|
@@ -26,15 +26,13 @@ var EuiHeaderBreadcrumbs = function EuiHeaderBreadcrumbs(_ref) {
|
|
|
26
26
|
breadcrumbs = _ref.breadcrumbs,
|
|
27
27
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
28
28
|
var classes = (0, _classnames.default)('euiHeaderBreadcrumbs', className);
|
|
29
|
-
var
|
|
30
|
-
var styles = (0, _header_breadcrumbs.euiHeaderBreadcrumbsStyles)(euiTheme);
|
|
31
|
-
var cssHeaderBreadcrumbStyles = [styles.euiHeaderBreadcrumbs];
|
|
29
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_header_breadcrumbs.euiHeaderBreadcrumbsStyles);
|
|
32
30
|
return (0, _react2.jsx)(_breadcrumbs.EuiBreadcrumbs, (0, _extends2.default)({
|
|
33
31
|
max: 4,
|
|
34
32
|
truncate: true,
|
|
35
33
|
breadcrumbs: breadcrumbs,
|
|
36
34
|
className: classes,
|
|
37
|
-
css:
|
|
35
|
+
css: styles.euiHeaderBreadcrumbs,
|
|
38
36
|
type: "application"
|
|
39
37
|
}, rest));
|
|
40
38
|
};
|
|
@@ -83,7 +83,8 @@ var EuiConfirmModal = function EuiConfirmModal(_ref) {
|
|
|
83
83
|
return (0, _react2.jsx)(_modal.EuiModal, (0, _extends2.default)({
|
|
84
84
|
className: classes,
|
|
85
85
|
css: cssStyles,
|
|
86
|
-
onClose: onCancel
|
|
86
|
+
onClose: onCancel,
|
|
87
|
+
role: "alertdialog"
|
|
87
88
|
}, rest), modalTitle, message && (0, _react2.jsx)(_modal_body.EuiModalBody, null, (0, _react2.jsx)(_text.EuiText, {
|
|
88
89
|
"data-test-subj": "confirmModalBodyText"
|
|
89
90
|
}, message)), (0, _react2.jsx)(_modal_footer.EuiModalFooter, null, (0, _react2.jsx)(_button.EuiButtonEmpty, {
|
|
@@ -17,7 +17,7 @@ var _overlay_mask = require("../overlay_mask");
|
|
|
17
17
|
var _i18n = require("../i18n");
|
|
18
18
|
var _modal = require("./modal.styles");
|
|
19
19
|
var _react2 = require("@emotion/react");
|
|
20
|
-
var _excluded = ["className", "children", "initialFocus", "onClose", "maxWidth", "style"];
|
|
20
|
+
var _excluded = ["className", "children", "initialFocus", "onClose", "maxWidth", "role", "style"];
|
|
21
21
|
/*
|
|
22
22
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
23
23
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -34,6 +34,8 @@ var EuiModal = function EuiModal(_ref) {
|
|
|
34
34
|
onClose = _ref.onClose,
|
|
35
35
|
_ref$maxWidth = _ref.maxWidth,
|
|
36
36
|
maxWidth = _ref$maxWidth === void 0 ? true : _ref$maxWidth,
|
|
37
|
+
_ref$role = _ref.role,
|
|
38
|
+
role = _ref$role === void 0 ? 'dialog' : _ref$role,
|
|
37
39
|
style = _ref.style,
|
|
38
40
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
39
41
|
var onKeyDown = function onKeyDown(event) {
|
|
@@ -63,7 +65,9 @@ var EuiModal = function EuiModal(_ref) {
|
|
|
63
65
|
className: classes,
|
|
64
66
|
onKeyDown: onKeyDown,
|
|
65
67
|
tabIndex: 0,
|
|
66
|
-
style: newStyle
|
|
68
|
+
style: newStyle,
|
|
69
|
+
role: role,
|
|
70
|
+
"aria-modal": true
|
|
67
71
|
}, rest), (0, _react2.jsx)(_i18n.EuiI18n, {
|
|
68
72
|
token: "euiModal.closeModal",
|
|
69
73
|
default: "Closes this modal window"
|
|
@@ -40,14 +40,13 @@ var EuiResizeObserver = /*#__PURE__*/function (_EuiObserver) {
|
|
|
40
40
|
height: 0,
|
|
41
41
|
width: 0
|
|
42
42
|
});
|
|
43
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onResize", function () {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
width = _this$childNode$getBo.width;
|
|
43
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onResize", function (_ref) {
|
|
44
|
+
var _ref2 = (0, _slicedToArray2.default)(_ref, 1),
|
|
45
|
+
entry = _ref2[0];
|
|
46
|
+
var _entry$borderBoxSize$ = entry.borderBoxSize[0],
|
|
47
|
+
width = _entry$borderBoxSize$.inlineSize,
|
|
48
|
+
height = _entry$borderBoxSize$.blockSize;
|
|
49
|
+
|
|
51
50
|
// Check for actual resize event
|
|
52
51
|
if (_this.state.height === height && _this.state.width === width) {
|
|
53
52
|
return;
|
|
@@ -102,23 +101,15 @@ var useResizeObserver = function useResizeObserver(container, dimension) {
|
|
|
102
101
|
}, [dimension]);
|
|
103
102
|
(0, _react.useEffect)(function () {
|
|
104
103
|
if (container != null) {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
});
|
|
112
|
-
var observer = makeResizeObserver(container, function () {
|
|
113
|
-
// `entry.contentRect` provides incomplete `height` and `width` data.
|
|
114
|
-
// Use `getBoundingClientRect` to account for padding and border.
|
|
115
|
-
// https://developer.mozilla.org/en-US/docs/Web/API/DOMRectReadOnly
|
|
116
|
-
var _container$getBoundin = container.getBoundingClientRect(),
|
|
117
|
-
height = _container$getBoundin.height,
|
|
118
|
-
width = _container$getBoundin.width;
|
|
104
|
+
var observer = makeResizeObserver(container, function (_ref3) {
|
|
105
|
+
var _ref4 = (0, _slicedToArray2.default)(_ref3, 1),
|
|
106
|
+
entry = _ref4[0];
|
|
107
|
+
var _entry$borderBoxSize$2 = entry.borderBoxSize[0],
|
|
108
|
+
inlineSize = _entry$borderBoxSize$2.inlineSize,
|
|
109
|
+
blockSize = _entry$borderBoxSize$2.blockSize;
|
|
119
110
|
setSize({
|
|
120
|
-
width:
|
|
121
|
-
height:
|
|
111
|
+
width: inlineSize,
|
|
112
|
+
height: blockSize
|
|
122
113
|
});
|
|
123
114
|
});
|
|
124
115
|
return function () {
|
|
@@ -28,8 +28,7 @@ var EuiSpacer = function EuiSpacer(_ref) {
|
|
|
28
28
|
_ref$size = _ref.size,
|
|
29
29
|
size = _ref$size === void 0 ? 'l' : _ref$size,
|
|
30
30
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
31
|
-
var
|
|
32
|
-
var styles = (0, _spacer.euiSpacerStyles)(euiTheme);
|
|
31
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_spacer.euiSpacerStyles);
|
|
33
32
|
var classes = (0, _classnames.default)('euiSpacer', (0, _defineProperty2.default)({}, "euiSpacer--".concat(size), size), className);
|
|
34
33
|
var cssStyles = [styles.euiSpacer, styles[size]];
|
|
35
34
|
return (0, _react2.jsx)("div", (0, _extends2.default)({
|