@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
|
@@ -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;
|
|
@@ -10,9 +10,9 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
var _services = require("../../../services");
|
|
13
14
|
var _breadcrumbs = require("../../breadcrumbs");
|
|
14
15
|
var _header_breadcrumbs = require("./header_breadcrumbs.styles");
|
|
15
|
-
var _services = require("../../../services");
|
|
16
16
|
var _react2 = require("@emotion/react");
|
|
17
17
|
var _excluded = ["className", "breadcrumbs"];
|
|
18
18
|
/*
|
|
@@ -27,15 +27,13 @@ var EuiHeaderBreadcrumbs = function EuiHeaderBreadcrumbs(_ref) {
|
|
|
27
27
|
breadcrumbs = _ref.breadcrumbs,
|
|
28
28
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
29
29
|
var classes = (0, _classnames.default)('euiHeaderBreadcrumbs', className);
|
|
30
|
-
var
|
|
31
|
-
var styles = (0, _header_breadcrumbs.euiHeaderBreadcrumbsStyles)(euiTheme);
|
|
32
|
-
var cssHeaderBreadcrumbStyles = [styles.euiHeaderBreadcrumbs];
|
|
30
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_header_breadcrumbs.euiHeaderBreadcrumbsStyles);
|
|
33
31
|
return (0, _react2.jsx)(_breadcrumbs.EuiBreadcrumbs, (0, _extends2.default)({
|
|
34
32
|
max: 4,
|
|
35
33
|
truncate: true,
|
|
36
34
|
breadcrumbs: breadcrumbs,
|
|
37
35
|
className: classes,
|
|
38
|
-
css:
|
|
36
|
+
css: styles.euiHeaderBreadcrumbs,
|
|
39
37
|
type: "application"
|
|
40
38
|
}, rest));
|
|
41
39
|
};
|
|
@@ -84,7 +84,8 @@ var EuiConfirmModal = function EuiConfirmModal(_ref) {
|
|
|
84
84
|
return (0, _react2.jsx)(_modal.EuiModal, (0, _extends2.default)({
|
|
85
85
|
className: classes,
|
|
86
86
|
css: cssStyles,
|
|
87
|
-
onClose: onCancel
|
|
87
|
+
onClose: onCancel,
|
|
88
|
+
role: "alertdialog"
|
|
88
89
|
}, rest), modalTitle, message && (0, _react2.jsx)(_modal_body.EuiModalBody, null, (0, _react2.jsx)(_text.EuiText, {
|
|
89
90
|
"data-test-subj": "confirmModalBodyText"
|
|
90
91
|
}, message)), (0, _react2.jsx)(_modal_footer.EuiModalFooter, null, (0, _react2.jsx)(_button.EuiButtonEmpty, {
|
|
@@ -18,7 +18,7 @@ var _overlay_mask = require("../overlay_mask");
|
|
|
18
18
|
var _i18n = require("../i18n");
|
|
19
19
|
var _modal = require("./modal.styles");
|
|
20
20
|
var _react2 = require("@emotion/react");
|
|
21
|
-
var _excluded = ["className", "children", "initialFocus", "onClose", "maxWidth", "style"];
|
|
21
|
+
var _excluded = ["className", "children", "initialFocus", "onClose", "maxWidth", "role", "style"];
|
|
22
22
|
/*
|
|
23
23
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
24
24
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -35,6 +35,8 @@ var EuiModal = function EuiModal(_ref) {
|
|
|
35
35
|
onClose = _ref.onClose,
|
|
36
36
|
_ref$maxWidth = _ref.maxWidth,
|
|
37
37
|
maxWidth = _ref$maxWidth === void 0 ? true : _ref$maxWidth,
|
|
38
|
+
_ref$role = _ref.role,
|
|
39
|
+
role = _ref$role === void 0 ? 'dialog' : _ref$role,
|
|
38
40
|
style = _ref.style,
|
|
39
41
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
40
42
|
var onKeyDown = function onKeyDown(event) {
|
|
@@ -64,7 +66,9 @@ var EuiModal = function EuiModal(_ref) {
|
|
|
64
66
|
className: classes,
|
|
65
67
|
onKeyDown: onKeyDown,
|
|
66
68
|
tabIndex: 0,
|
|
67
|
-
style: newStyle
|
|
69
|
+
style: newStyle,
|
|
70
|
+
role: role,
|
|
71
|
+
"aria-modal": true
|
|
68
72
|
}, rest), (0, _react2.jsx)(_i18n.EuiI18n, {
|
|
69
73
|
token: "euiModal.closeModal",
|
|
70
74
|
default: "Closes this modal window"
|
|
@@ -99,5 +103,10 @@ EuiModal.propTypes = {
|
|
|
99
103
|
* Specifies what element should initially have focus.
|
|
100
104
|
* Can be a DOM node, or a selector string (which will be passed to document.querySelector() to find the DOM node), or a function that returns a DOM node.
|
|
101
105
|
*/
|
|
102
|
-
initialFocus: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.func.isRequired, _propTypes.default.string.isRequired])
|
|
106
|
+
initialFocus: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.func.isRequired, _propTypes.default.string.isRequired]),
|
|
107
|
+
/**
|
|
108
|
+
* Identifies a modal dialog to screen readers. Modal dialogs that confirm destructive actions
|
|
109
|
+
* or need a user's attention should use "alertdialog".
|
|
110
|
+
*/
|
|
111
|
+
role: _propTypes.default.oneOf(["dialog", "alertdialog"])
|
|
103
112
|
};
|
|
@@ -29,8 +29,7 @@ var EuiSpacer = function EuiSpacer(_ref) {
|
|
|
29
29
|
_ref$size = _ref.size,
|
|
30
30
|
size = _ref$size === void 0 ? 'l' : _ref$size,
|
|
31
31
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
32
|
-
var
|
|
33
|
-
var styles = (0, _spacer.euiSpacerStyles)(euiTheme);
|
|
32
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_spacer.euiSpacerStyles);
|
|
34
33
|
var classes = (0, _classnames.default)('euiSpacer', (0, _defineProperty2.default)({}, "euiSpacer--".concat(size), size), className);
|
|
35
34
|
var cssStyles = [styles.euiSpacer, styles[size]];
|
|
36
35
|
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
@@ -77,10 +77,9 @@ var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
|
|
|
77
77
|
var isScrollingAnimationFrame = (0, _react.useRef)(0);
|
|
78
78
|
var startScrollingAnimationFrame = (0, _react.useRef)(0);
|
|
79
79
|
var listElement = (0, _react.useRef)(null);
|
|
80
|
-
var
|
|
81
|
-
var styles = (0, _global_toast_list.euiGlobalToastListStyles)(euiTheme);
|
|
80
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_global_toast_list.euiGlobalToastListStyles);
|
|
82
81
|
var cssStyles = [styles.euiGlobalToastList, styles[side]];
|
|
83
|
-
var startScrollingToBottom = function
|
|
82
|
+
var startScrollingToBottom = (0, _react.useCallback)(function () {
|
|
84
83
|
isScrollingToBottom.current = true;
|
|
85
84
|
var scrollToBottom = function scrollToBottom() {
|
|
86
85
|
// Although we cancel the requestAnimationFrame in componentWillUnmount,
|
|
@@ -103,8 +102,8 @@ var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
|
|
|
103
102
|
}
|
|
104
103
|
};
|
|
105
104
|
startScrollingAnimationFrame.current = window.requestAnimationFrame(scrollToBottom);
|
|
106
|
-
};
|
|
107
|
-
var onMouseEnter = function
|
|
105
|
+
}, []);
|
|
106
|
+
var onMouseEnter = (0, _react.useCallback)(function () {
|
|
108
107
|
// Stop scrolling to bottom if we're in mid-scroll, because the user wants to interact with
|
|
109
108
|
// the list.
|
|
110
109
|
isScrollingToBottom.current = false;
|
|
@@ -117,8 +116,8 @@ var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
|
|
|
117
116
|
timer.pause();
|
|
118
117
|
}
|
|
119
118
|
}
|
|
120
|
-
};
|
|
121
|
-
var onMouseLeave = function
|
|
119
|
+
}, []);
|
|
120
|
+
var onMouseLeave = (0, _react.useCallback)(function () {
|
|
122
121
|
isUserInteracting.current = false;
|
|
123
122
|
for (var _toastId2 in toastIdToTimerMap.current) {
|
|
124
123
|
if (toastIdToTimerMap.current.hasOwnProperty(_toastId2)) {
|
|
@@ -126,8 +125,8 @@ var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
|
|
|
126
125
|
timer.resume();
|
|
127
126
|
}
|
|
128
127
|
}
|
|
129
|
-
};
|
|
130
|
-
var onScroll = function
|
|
128
|
+
}, []);
|
|
129
|
+
var onScroll = (0, _react.useCallback)(function () {
|
|
131
130
|
// Given that this method also gets invoked by the synthetic scroll that happens when a new toast gets added,
|
|
132
131
|
// we want to evaluate if the scroll bottom has been reached only when the user is interacting with the toast,
|
|
133
132
|
// this way we always retain the scroll position the user has set despite adding in new toasts.
|
|
@@ -135,7 +134,7 @@ var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
|
|
|
135
134
|
if (listElement.current && isUserInteracting.current) {
|
|
136
135
|
isScrolledToBottom.current = listElement.current.scrollHeight - listElement.current.scrollTop === listElement.current.clientHeight;
|
|
137
136
|
}
|
|
138
|
-
};
|
|
137
|
+
}, []);
|
|
139
138
|
var dismissToast = (0, _react.useCallback)(function (toast) {
|
|
140
139
|
// Remove the toast after it's done fading out.
|
|
141
140
|
dismissTimeoutIds.current.push(window.setTimeout(function () {
|
|
@@ -158,34 +157,29 @@ var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
|
|
|
158
157
|
}
|
|
159
158
|
});
|
|
160
159
|
}, [scheduleToastForDismissal, toasts]);
|
|
161
|
-
var addListeners = function addListeners() {
|
|
162
|
-
if (listElement.current) {
|
|
163
|
-
listElement.current.addEventListener('scroll', onScroll);
|
|
164
|
-
listElement.current.addEventListener('mouseenter', onMouseEnter);
|
|
165
|
-
listElement.current.addEventListener('mouseleave', onMouseLeave);
|
|
166
|
-
}
|
|
167
|
-
};
|
|
168
|
-
var removeListeners = function removeListeners() {
|
|
169
|
-
if (listElement.current) {
|
|
170
|
-
listElement.current.removeEventListener('scroll', onScroll);
|
|
171
|
-
listElement.current.removeEventListener('mouseenter', onMouseEnter);
|
|
172
|
-
listElement.current.removeEventListener('mouseleave', onMouseLeave);
|
|
173
|
-
}
|
|
174
|
-
};
|
|
175
160
|
|
|
176
161
|
// componentDidMount
|
|
177
162
|
(0, _react.useEffect)(function () {
|
|
178
|
-
|
|
163
|
+
var listenerEl = listElement.current;
|
|
164
|
+
if (listenerEl) {
|
|
165
|
+
listenerEl.addEventListener('scroll', onScroll);
|
|
166
|
+
listenerEl.addEventListener('mouseenter', onMouseEnter);
|
|
167
|
+
listenerEl.addEventListener('mouseleave', onMouseLeave);
|
|
168
|
+
}
|
|
179
169
|
|
|
180
170
|
// componentWillUnmount
|
|
181
171
|
return function () {
|
|
172
|
+
if (listenerEl) {
|
|
173
|
+
listenerEl.removeEventListener('scroll', onScroll);
|
|
174
|
+
listenerEl.removeEventListener('mouseenter', onMouseEnter);
|
|
175
|
+
listenerEl.removeEventListener('mouseleave', onMouseLeave);
|
|
176
|
+
}
|
|
182
177
|
if (isScrollingAnimationFrame.current !== 0) {
|
|
183
178
|
window.cancelAnimationFrame(isScrollingAnimationFrame.current);
|
|
184
179
|
}
|
|
185
180
|
if (startScrollingAnimationFrame.current !== 0) {
|
|
186
181
|
window.cancelAnimationFrame(startScrollingAnimationFrame.current);
|
|
187
182
|
}
|
|
188
|
-
removeListeners();
|
|
189
183
|
dismissTimeoutIds.current.forEach(clearTimeout); // eslint-disable-line react-hooks/exhaustive-deps
|
|
190
184
|
for (var _toastId3 in toastIdToTimerMap.current) {
|
|
191
185
|
if (toastIdToTimerMap.current.hasOwnProperty(_toastId3)) {
|
|
@@ -194,7 +188,7 @@ var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
|
|
|
194
188
|
}
|
|
195
189
|
}
|
|
196
190
|
};
|
|
197
|
-
}, []);
|
|
191
|
+
}, [onMouseEnter, onMouseLeave, onScroll]);
|
|
198
192
|
|
|
199
193
|
// componentDidUpdate
|
|
200
194
|
(0, _react.useEffect)(function () {
|
|
@@ -209,7 +203,7 @@ var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
|
|
|
209
203
|
}
|
|
210
204
|
}
|
|
211
205
|
prevToasts.current = toasts;
|
|
212
|
-
}, [toasts, scheduleAllToastsForDismissal]);
|
|
206
|
+
}, [toasts, scheduleAllToastsForDismissal, startScrollingToBottom]);
|
|
213
207
|
|
|
214
208
|
// Toast dismissal side effect
|
|
215
209
|
// Ensure the callback has correct state by not enclosing it in `setTimeout`
|
|
@@ -230,49 +224,52 @@ var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
|
|
|
230
224
|
});
|
|
231
225
|
}
|
|
232
226
|
}, [toastToDismiss, dismissToastProp]);
|
|
233
|
-
var renderedToasts =
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
key: toast.id,
|
|
242
|
-
isDismissed: toastIdToDismissedMap[toast.id]
|
|
243
|
-
}, (0, _react2.jsx)(_toast.EuiToast, (0, _extends2.default)({
|
|
244
|
-
onClose: onClose,
|
|
245
|
-
onFocus: onMouseEnter,
|
|
246
|
-
onBlur: onMouseLeave
|
|
247
|
-
}, rest), text));
|
|
248
|
-
});
|
|
249
|
-
if (showClearAllButtonAt && toasts.length >= showClearAllButtonAt) {
|
|
250
|
-
var dismissAllToasts = function dismissAllToasts() {
|
|
251
|
-
toasts.forEach(function (toast) {
|
|
252
|
-
return dismissToastProp(toast);
|
|
253
|
-
});
|
|
254
|
-
onClearAllToasts === null || onClearAllToasts === void 0 ? void 0 : onClearAllToasts();
|
|
255
|
-
};
|
|
256
|
-
renderedToasts.push((0, _react2.jsx)(_i18n.EuiI18n, {
|
|
257
|
-
key: "euiClearAllToasts",
|
|
258
|
-
tokens: ['euiGlobalToastList.clearAllToastsButtonAriaLabel', 'euiGlobalToastList.clearAllToastsButtonDisplayText'],
|
|
259
|
-
defaults: ['Clear all toast notifications', 'Clear all']
|
|
260
|
-
}, function (_ref2) {
|
|
261
|
-
var _ref3 = (0, _slicedToArray2.default)(_ref2, 2),
|
|
262
|
-
clearAllToastsButtonAriaLabel = _ref3[0],
|
|
263
|
-
clearAllToastsButtonDisplayText = _ref3[1];
|
|
227
|
+
var renderedToasts = (0, _react.useMemo)(function () {
|
|
228
|
+
return toasts.map(function (toast) {
|
|
229
|
+
var text = toast.text,
|
|
230
|
+
toastLifeTimeMs = toast.toastLifeTimeMs,
|
|
231
|
+
rest = (0, _objectWithoutProperties2.default)(toast, _excluded2);
|
|
232
|
+
var onClose = function onClose() {
|
|
233
|
+
return dismissToast(toast);
|
|
234
|
+
};
|
|
264
235
|
return (0, _react2.jsx)(_global_toast_list_item.EuiGlobalToastListItem, {
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
236
|
+
key: toast.id,
|
|
237
|
+
isDismissed: toastIdToDismissedMap[toast.id]
|
|
238
|
+
}, (0, _react2.jsx)(_toast.EuiToast, (0, _extends2.default)({
|
|
239
|
+
onClose: onClose,
|
|
240
|
+
onFocus: onMouseEnter,
|
|
241
|
+
onBlur: onMouseLeave
|
|
242
|
+
}, rest), text));
|
|
243
|
+
});
|
|
244
|
+
}, [toasts, toastIdToDismissedMap, dismissToast, onMouseEnter, onMouseLeave]);
|
|
245
|
+
var clearAllButton = (0, _react.useMemo)(function () {
|
|
246
|
+
if (toasts.length && showClearAllButtonAt && toasts.length >= showClearAllButtonAt) {
|
|
247
|
+
return (0, _react2.jsx)(_i18n.EuiI18n, {
|
|
248
|
+
key: "euiClearAllToasts",
|
|
249
|
+
tokens: ['euiGlobalToastList.clearAllToastsButtonAriaLabel', 'euiGlobalToastList.clearAllToastsButtonDisplayText'],
|
|
250
|
+
defaults: ['Clear all toast notifications', 'Clear all']
|
|
251
|
+
}, function (_ref2) {
|
|
252
|
+
var _ref3 = (0, _slicedToArray2.default)(_ref2, 2),
|
|
253
|
+
clearAllToastsButtonAriaLabel = _ref3[0],
|
|
254
|
+
clearAllToastsButtonDisplayText = _ref3[1];
|
|
255
|
+
return (0, _react2.jsx)(_global_toast_list_item.EuiGlobalToastListItem, {
|
|
256
|
+
isDismissed: false
|
|
257
|
+
}, (0, _react2.jsx)(_button.EuiButton, {
|
|
258
|
+
fill: true,
|
|
259
|
+
color: "text",
|
|
260
|
+
onClick: function onClick() {
|
|
261
|
+
toasts.forEach(function (toast) {
|
|
262
|
+
return dismissToastProp(toast);
|
|
263
|
+
});
|
|
264
|
+
onClearAllToasts === null || onClearAllToasts === void 0 ? void 0 : onClearAllToasts();
|
|
265
|
+
},
|
|
266
|
+
css: styles.euiGlobalToastListDismissButton,
|
|
267
|
+
"aria-label": clearAllToastsButtonAriaLabel,
|
|
268
|
+
"data-test-subj": "euiClearAllToastsButton"
|
|
269
|
+
}, clearAllToastsButtonDisplayText));
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
}, [showClearAllButtonAt, onClearAllToasts, toasts, dismissToastProp, styles]);
|
|
276
273
|
var classes = (0, _classnames.default)('euiGlobalToastList', className);
|
|
277
274
|
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
278
275
|
"aria-live": "polite",
|
|
@@ -280,7 +277,7 @@ var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
|
|
|
280
277
|
ref: listElement,
|
|
281
278
|
css: cssStyles,
|
|
282
279
|
className: classes
|
|
283
|
-
}, rest), renderedToasts);
|
|
280
|
+
}, rest), renderedToasts, clearAllButton);
|
|
284
281
|
};
|
|
285
282
|
exports.EuiGlobalToastList = EuiGlobalToastList;
|
|
286
283
|
EuiGlobalToastList.propTypes = {
|
|
@@ -36,47 +36,11 @@ var EuiToast = function EuiToast(_ref) {
|
|
|
36
36
|
children = _ref.children,
|
|
37
37
|
className = _ref.className,
|
|
38
38
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
39
|
-
var
|
|
40
|
-
var baseStyles = (0, _toast.euiToastStyles)(euiTheme);
|
|
39
|
+
var baseStyles = (0, _services.useEuiMemoizedStyles)(_toast.euiToastStyles);
|
|
41
40
|
var baseCss = [baseStyles.euiToast, color && baseStyles[color]];
|
|
42
|
-
var
|
|
43
|
-
var headerStyles = (0, _toast.euiToastHeaderStyles)(euiTheme);
|
|
41
|
+
var headerStyles = (0, _services.useEuiMemoizedStyles)(_toast.euiToastHeaderStyles);
|
|
44
42
|
var headerCss = [headerStyles.euiToastHeader, children && headerStyles.withBody];
|
|
45
43
|
var classes = (0, _classnames.default)('euiToast', className);
|
|
46
|
-
var headerIcon;
|
|
47
|
-
if (iconType) {
|
|
48
|
-
headerIcon = (0, _react2.jsx)(_icon.EuiIcon, {
|
|
49
|
-
css: headerStyles.euiToastHeader__icon,
|
|
50
|
-
type: iconType,
|
|
51
|
-
size: "m",
|
|
52
|
-
"aria-hidden": "true"
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
var closeButton;
|
|
56
|
-
if (onClose) {
|
|
57
|
-
closeButton = (0, _react2.jsx)(_i18n.EuiI18n, {
|
|
58
|
-
token: "euiToast.dismissToast",
|
|
59
|
-
default: "Dismiss toast"
|
|
60
|
-
}, function (dismissToast) {
|
|
61
|
-
return (0, _react2.jsx)(_button.EuiButtonIcon, {
|
|
62
|
-
css: baseStyles.euiToast__closeButton,
|
|
63
|
-
iconType: "cross",
|
|
64
|
-
color: "text",
|
|
65
|
-
size: "xs",
|
|
66
|
-
"aria-label": dismissToast,
|
|
67
|
-
onClick: onClose,
|
|
68
|
-
"data-test-subj": "toastCloseButton"
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
var optionalBody;
|
|
73
|
-
if (children) {
|
|
74
|
-
optionalBody = (0, _react2.jsx)(_text.EuiText, {
|
|
75
|
-
css: bodyStyles.euiToastBody,
|
|
76
|
-
size: "s",
|
|
77
|
-
"data-test-subj": "euiToastBody"
|
|
78
|
-
}, children);
|
|
79
|
-
}
|
|
80
44
|
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
81
45
|
css: baseCss,
|
|
82
46
|
className: classes
|
|
@@ -91,11 +55,32 @@ var EuiToast = function EuiToast(_ref) {
|
|
|
91
55
|
css: headerCss,
|
|
92
56
|
"aria-label": notification,
|
|
93
57
|
"data-test-subj": "euiToastHeader"
|
|
94
|
-
},
|
|
58
|
+
}, iconType && (0, _react2.jsx)(_icon.EuiIcon, {
|
|
59
|
+
css: headerStyles.euiToastHeader__icon,
|
|
60
|
+
type: iconType,
|
|
61
|
+
size: "m",
|
|
62
|
+
"aria-hidden": "true"
|
|
63
|
+
}), (0, _react2.jsx)("span", {
|
|
95
64
|
css: headerStyles.euiToastHeader__title,
|
|
96
65
|
"data-test-subj": "euiToastHeader__title"
|
|
97
66
|
}, title));
|
|
98
|
-
}),
|
|
67
|
+
}), onClose && (0, _react2.jsx)(_i18n.EuiI18n, {
|
|
68
|
+
token: "euiToast.dismissToast",
|
|
69
|
+
default: "Dismiss toast"
|
|
70
|
+
}, function (dismissToast) {
|
|
71
|
+
return (0, _react2.jsx)(_button.EuiButtonIcon, {
|
|
72
|
+
css: baseStyles.euiToast__closeButton,
|
|
73
|
+
iconType: "cross",
|
|
74
|
+
color: "text",
|
|
75
|
+
size: "xs",
|
|
76
|
+
"aria-label": dismissToast,
|
|
77
|
+
onClick: onClose,
|
|
78
|
+
"data-test-subj": "toastCloseButton"
|
|
79
|
+
});
|
|
80
|
+
}), children && (0, _react2.jsx)(_text.EuiText, {
|
|
81
|
+
size: "s",
|
|
82
|
+
"data-test-subj": "euiToastBody"
|
|
83
|
+
}, children));
|
|
99
84
|
};
|
|
100
85
|
exports.EuiToast = EuiToast;
|
|
101
86
|
EuiToast.propTypes = {
|