@elastic/eui 59.1.0 → 60.1.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/README.md +7 -0
- package/dist/eui_theme_dark.css +0 -493
- package/dist/eui_theme_dark.json +7 -44
- package/dist/eui_theme_dark.json.d.ts +7 -44
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +0 -493
- package/dist/eui_theme_light.json +7 -44
- package/dist/eui_theme_light.json.d.ts +7 -44
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/accessibility/screen_reader_live/screen_reader_live.js +30 -7
- package/es/components/accessibility/screen_reader_only/screen_reader_only.js +14 -19
- package/es/components/accessibility/screen_reader_only/screen_reader_only.styles.js +11 -1
- package/es/components/accessibility/skip_link/skip_link.js +20 -4
- package/es/components/avatar/avatar.js +2 -2
- package/es/components/badge/badge.js +1 -1
- package/es/components/button/button_icon/button_icon.js +1 -1
- package/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +2 -2
- package/es/components/combo_box/matching_options.js +3 -2
- package/es/components/datagrid/body/data_grid_body.js +6 -6
- package/es/components/datagrid/body/data_grid_cell.js +12 -12
- package/es/components/datagrid/body/header/data_grid_header_cell.js +6 -6
- package/es/components/datagrid/body/header/data_grid_header_row.js +6 -6
- package/es/components/datagrid/data_grid.js +6 -6
- package/es/components/datagrid/utils/in_memory.js +6 -6
- package/es/components/date_picker/date_picker.js +1 -1
- package/es/components/empty_prompt/empty_prompt.js +1 -1
- package/es/components/form/field_text/field_text.js +1 -1
- package/es/components/form/form_control_layout/form_control_layout.js +1 -1
- package/es/components/form/form_control_layout/form_control_layout_icons.js +1 -1
- package/es/components/health/health.js +1 -1
- package/es/components/icon/icon.js +43 -495
- package/es/components/icon/icon.styles.js +75 -0
- package/es/components/icon/icon_map.js +455 -0
- package/es/components/icon/named_colors.js +2 -13
- package/es/components/list_group/list_group.js +1 -1
- package/es/components/list_group/list_group_item.js +1 -1
- package/es/components/list_group/pinnable_list_group/pinnable_list_group.js +2 -2
- package/es/components/notification/notification_event.js +2 -2
- package/es/components/notification/notification_event_meta.js +1 -1
- package/es/components/notification/notification_event_read_button.js +1 -1
- package/es/components/progress/progress.js +34 -87
- package/es/components/progress/progress.styles.js +155 -0
- package/es/components/provider/cache/cache_provider.js +17 -0
- package/es/components/provider/cache/index.js +8 -0
- package/es/components/provider/provider.js +35 -5
- package/es/components/selectable/selectable.js +39 -22
- package/es/components/selectable/selectable_list/selectable_list.js +1 -1
- package/es/components/selectable/selectable_list/selectable_list_item.js +1 -1
- package/es/components/selectable/selectable_templates/selectable_template_sitewide.js +2 -2
- package/es/components/stat/stat.js +28 -35
- package/es/components/stat/stat.styles.js +38 -0
- package/es/components/timeline/timeline.js +15 -8
- package/es/components/timeline/timeline.styles.js +29 -0
- package/es/components/timeline/timeline_item.js +4 -16
- package/es/components/timeline/timeline_item.styles.js +18 -3
- package/es/components/timeline/timeline_item_icon.styles.js +14 -4
- package/es/components/tool_tip/icon_tip.js +1 -1
- package/es/global_styling/functions/logicals.js +2 -2
- package/es/global_styling/utility/utility.js +17 -0
- package/es/services/theme/hooks.js +4 -2
- package/es/services/theme/provider.js +1 -5
- package/es/test/emotion-prefix.js +29 -0
- package/es/test/index.d.ts +5 -0
- package/es/test/index.js +2 -1
- package/eui.d.ts +450 -454
- package/i18ntokens.json +18 -18
- package/lib/components/accessibility/screen_reader_live/screen_reader_live.js +29 -6
- package/lib/components/accessibility/screen_reader_only/screen_reader_only.js +22 -19
- package/lib/components/accessibility/screen_reader_only/screen_reader_only.styles.js +16 -2
- package/lib/components/accessibility/skip_link/skip_link.js +21 -4
- package/lib/components/avatar/avatar.js +2 -2
- package/lib/components/badge/badge.js +1 -1
- package/lib/components/button/button_icon/button_icon.js +1 -1
- package/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +2 -2
- package/lib/components/combo_box/matching_options.js +3 -2
- package/lib/components/datagrid/body/data_grid_body.js +6 -6
- package/lib/components/datagrid/body/data_grid_cell.js +12 -12
- package/lib/components/datagrid/body/header/data_grid_header_cell.js +6 -6
- package/lib/components/datagrid/body/header/data_grid_header_row.js +6 -6
- package/lib/components/datagrid/data_grid.js +6 -6
- package/lib/components/datagrid/utils/in_memory.js +6 -6
- package/lib/components/date_picker/date_picker.js +1 -1
- package/lib/components/empty_prompt/empty_prompt.js +1 -1
- package/lib/components/form/field_text/field_text.js +1 -1
- package/lib/components/form/form_control_layout/form_control_layout.js +1 -1
- package/lib/components/form/form_control_layout/form_control_layout_icons.js +1 -1
- package/lib/components/health/health.js +1 -1
- package/lib/components/icon/icon.js +54 -499
- package/lib/components/icon/icon.styles.js +79 -0
- package/lib/components/icon/icon_map.js +463 -0
- package/lib/components/icon/named_colors.js +4 -15
- package/lib/components/list_group/list_group.js +1 -1
- package/lib/components/list_group/list_group_item.js +1 -1
- package/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +2 -2
- package/lib/components/notification/notification_event.js +2 -2
- package/lib/components/notification/notification_event_meta.js +1 -1
- package/lib/components/notification/notification_event_read_button.js +1 -1
- package/lib/components/progress/progress.js +36 -88
- package/lib/components/progress/progress.styles.js +166 -0
- package/lib/components/provider/cache/cache_provider.js +29 -0
- package/lib/components/provider/cache/index.js +18 -0
- package/lib/components/provider/provider.js +36 -5
- package/lib/components/selectable/selectable.js +39 -22
- package/lib/components/selectable/selectable_list/selectable_list.js +1 -1
- package/lib/components/selectable/selectable_list/selectable_list_item.js +1 -1
- package/lib/components/selectable/selectable_templates/selectable_template_sitewide.js +3 -3
- package/lib/components/stat/stat.js +30 -40
- package/lib/components/stat/stat.styles.js +45 -0
- package/lib/components/timeline/timeline.js +20 -9
- package/lib/components/timeline/timeline.styles.js +39 -0
- package/lib/components/timeline/timeline_item.js +4 -17
- package/lib/components/timeline/timeline_item.styles.js +17 -10
- package/lib/components/timeline/timeline_item_icon.styles.js +15 -4
- package/lib/components/tool_tip/icon_tip.js +1 -1
- package/lib/global_styling/functions/logicals.js +2 -2
- package/lib/global_styling/utility/utility.js +31 -0
- package/lib/services/theme/hooks.js +4 -2
- package/lib/services/theme/provider.js +3 -6
- package/lib/test/emotion-prefix.js +38 -0
- package/lib/test/index.d.ts +5 -0
- package/lib/test/index.js +23 -1
- package/optimize/es/components/accessibility/screen_reader_live/screen_reader_live.js +21 -6
- package/optimize/es/components/accessibility/screen_reader_only/screen_reader_only.js +11 -17
- package/optimize/es/components/accessibility/screen_reader_only/screen_reader_only.styles.js +11 -1
- package/optimize/es/components/accessibility/skip_link/skip_link.js +20 -4
- package/optimize/es/components/combo_box/matching_options.js +3 -2
- package/optimize/es/components/icon/icon.js +40 -492
- package/optimize/es/components/icon/icon.styles.js +75 -0
- package/optimize/es/components/icon/icon_map.js +455 -0
- package/optimize/es/components/icon/named_colors.js +2 -13
- package/optimize/es/components/progress/progress.js +31 -84
- package/optimize/es/components/progress/progress.styles.js +155 -0
- package/optimize/es/components/provider/cache/cache_provider.js +17 -0
- package/optimize/es/components/provider/cache/index.js +8 -0
- package/optimize/es/components/provider/provider.js +35 -5
- package/optimize/es/components/selectable/selectable.js +33 -22
- package/optimize/es/components/stat/stat.js +25 -33
- package/optimize/es/components/stat/stat.styles.js +38 -0
- package/optimize/es/components/timeline/timeline.js +10 -1
- package/optimize/es/components/timeline/timeline.styles.js +29 -0
- package/optimize/es/components/timeline/timeline_item.js +4 -9
- package/optimize/es/components/timeline/timeline_item.styles.js +18 -3
- package/optimize/es/components/timeline/timeline_item_icon.styles.js +14 -4
- package/optimize/es/global_styling/functions/logicals.js +2 -2
- package/optimize/es/global_styling/utility/utility.js +17 -0
- package/optimize/es/services/theme/hooks.js +4 -2
- package/optimize/es/services/theme/provider.js +1 -5
- package/optimize/es/test/emotion-prefix.js +27 -0
- package/optimize/es/test/index.d.ts +5 -0
- package/optimize/es/test/index.js +2 -1
- package/optimize/lib/components/accessibility/screen_reader_live/screen_reader_live.js +20 -5
- package/optimize/lib/components/accessibility/screen_reader_only/screen_reader_only.js +18 -16
- package/optimize/lib/components/accessibility/screen_reader_only/screen_reader_only.styles.js +16 -2
- package/optimize/lib/components/accessibility/skip_link/skip_link.js +21 -4
- package/optimize/lib/components/combo_box/matching_options.js +3 -2
- package/optimize/lib/components/icon/icon.js +49 -494
- package/optimize/lib/components/icon/icon.styles.js +81 -0
- package/optimize/lib/components/icon/icon_map.js +463 -0
- package/optimize/lib/components/icon/named_colors.js +4 -15
- package/optimize/lib/components/progress/progress.js +33 -85
- package/optimize/lib/components/progress/progress.styles.js +168 -0
- package/optimize/lib/components/provider/cache/cache_provider.js +29 -0
- package/optimize/lib/components/provider/cache/index.js +18 -0
- package/optimize/lib/components/provider/provider.js +36 -5
- package/optimize/lib/components/selectable/selectable.js +33 -22
- package/optimize/lib/components/stat/stat.js +27 -37
- package/optimize/lib/components/stat/stat.styles.js +47 -0
- package/optimize/lib/components/timeline/timeline.js +14 -2
- package/optimize/lib/components/timeline/timeline.styles.js +39 -0
- package/optimize/lib/components/timeline/timeline_item.js +4 -10
- package/optimize/lib/components/timeline/timeline_item.styles.js +17 -10
- package/optimize/lib/components/timeline/timeline_item_icon.styles.js +15 -4
- package/optimize/lib/global_styling/functions/logicals.js +2 -2
- package/optimize/lib/global_styling/utility/utility.js +31 -0
- package/optimize/lib/services/theme/hooks.js +4 -2
- package/optimize/lib/services/theme/provider.js +3 -6
- package/optimize/lib/test/emotion-prefix.js +40 -0
- package/optimize/lib/test/index.d.ts +5 -0
- package/optimize/lib/test/index.js +23 -1
- package/package.json +2 -2
- package/src/components/form/form_control_layout/_form_control_layout.scss +2 -4
- package/src/components/index.scss +0 -4
- package/src/global_styling/variables/_form.scss +9 -0
- package/src/themes/amsterdam/overrides/_index.scss +0 -1
- package/test-env/components/accessibility/screen_reader_live/screen_reader_live.js +29 -6
- package/test-env/components/accessibility/screen_reader_only/screen_reader_only.js +21 -18
- package/test-env/components/accessibility/screen_reader_only/screen_reader_only.styles.js +16 -2
- package/test-env/components/accessibility/skip_link/skip_link.js +21 -4
- package/test-env/components/avatar/avatar.js +2 -2
- package/test-env/components/badge/badge.js +1 -1
- package/test-env/components/button/button_icon/button_icon.js +1 -1
- package/test-env/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +2 -2
- package/test-env/components/combo_box/matching_options.js +3 -2
- package/test-env/components/datagrid/body/data_grid_body.js +6 -6
- package/test-env/components/datagrid/body/data_grid_cell.js +12 -12
- package/test-env/components/datagrid/body/header/data_grid_header_cell.js +6 -6
- package/test-env/components/datagrid/body/header/data_grid_header_row.js +6 -6
- package/test-env/components/datagrid/data_grid.js +6 -6
- package/test-env/components/datagrid/utils/in_memory.js +6 -6
- package/test-env/components/date_picker/date_picker.js +1 -1
- package/test-env/components/empty_prompt/empty_prompt.js +1 -1
- package/test-env/components/form/field_text/field_text.js +1 -1
- package/test-env/components/form/form_control_layout/form_control_layout.js +1 -1
- package/test-env/components/form/form_control_layout/form_control_layout_icons.js +1 -1
- package/test-env/components/health/health.js +1 -1
- package/test-env/components/icon/icon.styles.js +81 -0
- package/test-env/components/icon/icon_map.js +463 -0
- package/test-env/components/icon/named_colors.js +4 -15
- package/test-env/components/list_group/list_group.js +1 -1
- package/test-env/components/list_group/list_group_item.js +1 -1
- package/test-env/components/list_group/pinnable_list_group/pinnable_list_group.js +2 -2
- package/test-env/components/notification/notification_event.js +2 -2
- package/test-env/components/notification/notification_event_meta.js +1 -1
- package/test-env/components/notification/notification_event_read_button.js +1 -1
- package/test-env/components/progress/progress.js +36 -88
- package/test-env/components/progress/progress.styles.js +168 -0
- package/test-env/components/provider/cache/cache_provider.js +29 -0
- package/test-env/components/provider/cache/index.js +18 -0
- package/test-env/components/provider/provider.js +36 -5
- package/test-env/components/selectable/selectable.js +39 -22
- package/test-env/components/selectable/selectable_list/selectable_list.js +1 -1
- package/test-env/components/selectable/selectable_list/selectable_list_item.js +1 -1
- package/test-env/components/selectable/selectable_templates/selectable_template_sitewide.js +3 -3
- package/test-env/components/stat/stat.js +29 -39
- package/test-env/components/stat/stat.styles.js +47 -0
- package/test-env/components/timeline/timeline.js +19 -9
- package/test-env/components/timeline/timeline.styles.js +39 -0
- package/test-env/components/timeline/timeline_item.js +4 -17
- package/test-env/components/timeline/timeline_item.styles.js +17 -10
- package/test-env/components/timeline/timeline_item_icon.styles.js +15 -4
- package/test-env/components/tool_tip/icon_tip.js +1 -1
- package/test-env/global_styling/functions/logicals.js +2 -2
- package/test-env/global_styling/utility/utility.js +31 -0
- package/test-env/services/theme/hooks.js +4 -2
- package/test-env/services/theme/provider.js +3 -6
- package/test-env/test/emotion-prefix.js +40 -0
- package/test-env/test/index.js +23 -1
- package/src/components/accessibility/_index.scss +0 -1
- package/src/components/accessibility/screen_reader_only/_screen_reader_only.scss +0 -5
- package/src/components/icon/_icon.scss +0 -87
- package/src/components/icon/_index.scss +0 -2
- package/src/components/icon/_variables.scss +0 -22
- package/src/components/progress/_index.scss +0 -2
- package/src/components/progress/_progress.scss +0 -166
- package/src/components/progress/_variables.scss +0 -21
- package/src/components/stat/_index.scss +0 -1
- package/src/components/stat/_stat.scss +0 -50
- package/src/themes/amsterdam/overrides/_progress.scss +0 -3
|
@@ -18,64 +18,13 @@ import PropTypes from "prop-types";
|
|
|
18
18
|
import classNames from 'classnames';
|
|
19
19
|
import { EuiI18n } from '../i18n';
|
|
20
20
|
import { EuiInnerText } from '../inner_text';
|
|
21
|
-
import { keysOf } from '../common';
|
|
22
21
|
import { isNil } from '../../services/predicate';
|
|
22
|
+
import { useEuiTheme, makeHighContrastColor } from '../../services';
|
|
23
|
+
import { euiProgressStyles, euiProgressDataStyles, euiProgressLabelStyles, euiProgressValueTextStyles } from './progress.styles';
|
|
23
24
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
24
|
-
var
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
m: 'euiProgress--m',
|
|
28
|
-
l: 'euiProgress--l'
|
|
29
|
-
};
|
|
30
|
-
export var SIZES = keysOf(sizeToClassNameMap);
|
|
31
|
-
var colorToClassNameMap = {
|
|
32
|
-
primary: 'euiProgress--primary',
|
|
33
|
-
success: 'euiProgress--success',
|
|
34
|
-
warning: 'euiProgress--warning',
|
|
35
|
-
danger: 'euiProgress--danger',
|
|
36
|
-
subdued: 'euiProgress--subdued',
|
|
37
|
-
accent: 'euiProgress--accent',
|
|
38
|
-
vis0: 'euiProgress--vis0',
|
|
39
|
-
vis1: 'euiProgress--vis1',
|
|
40
|
-
vis2: 'euiProgress--vis2',
|
|
41
|
-
vis3: 'euiProgress--vis3',
|
|
42
|
-
vis4: 'euiProgress--vis4',
|
|
43
|
-
vis5: 'euiProgress--vis5',
|
|
44
|
-
vis6: 'euiProgress--vis6',
|
|
45
|
-
vis7: 'euiProgress--vis7',
|
|
46
|
-
vis8: 'euiProgress--vis8',
|
|
47
|
-
vis9: 'euiProgress--vis9'
|
|
48
|
-
};
|
|
49
|
-
export var COLORS = keysOf(colorToClassNameMap);
|
|
50
|
-
|
|
51
|
-
function isNamedColor(name) {
|
|
52
|
-
return colorToClassNameMap.hasOwnProperty(name);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
var dataColorToClassNameMap = {
|
|
56
|
-
primary: 'euiProgress__data--primary',
|
|
57
|
-
success: 'euiProgress__data--success',
|
|
58
|
-
warning: 'euiProgress__data--warning',
|
|
59
|
-
danger: 'euiProgress__data--danger',
|
|
60
|
-
subdued: 'euiProgress__data--subdued',
|
|
61
|
-
accent: 'euiProgress__data--accent',
|
|
62
|
-
vis0: 'euiProgress__data--vis0',
|
|
63
|
-
vis1: 'euiProgress__data--vis1',
|
|
64
|
-
vis2: 'euiProgress__data--vis2',
|
|
65
|
-
vis3: 'euiProgress__data--vis3',
|
|
66
|
-
vis4: 'euiProgress__data--vis4',
|
|
67
|
-
vis5: 'euiProgress__data--vis5',
|
|
68
|
-
vis6: 'euiProgress__data--vis6',
|
|
69
|
-
vis7: 'euiProgress__data--vis7',
|
|
70
|
-
vis8: 'euiProgress__data--vis8',
|
|
71
|
-
vis9: 'euiProgress__data--vis9'
|
|
72
|
-
};
|
|
73
|
-
var positionsToClassNameMap = {
|
|
74
|
-
fixed: 'euiProgress--fixed',
|
|
75
|
-
absolute: 'euiProgress--absolute',
|
|
76
|
-
static: ''
|
|
77
|
-
};
|
|
78
|
-
export var POSITIONS = keysOf(positionsToClassNameMap);
|
|
25
|
+
export var SIZES = ['xs', 's', 'm', 'l'];
|
|
26
|
+
export var COLORS = ['primary', 'success', 'warning', 'danger', 'subdued', 'accent', 'vis0', 'vis1', 'vis2', 'vis3', 'vis4', 'vis5', 'vis6', 'vis7', 'vis8', 'vis9'];
|
|
27
|
+
export var POSITIONS = ['fixed', 'absolute', 'static'];
|
|
79
28
|
export var EuiProgress = function EuiProgress(_ref) {
|
|
80
29
|
var className = _ref.className,
|
|
81
30
|
_ref$color = _ref.color,
|
|
@@ -93,30 +42,23 @@ export var EuiProgress = function EuiProgress(_ref) {
|
|
|
93
42
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
94
43
|
|
|
95
44
|
var determinate = !isNil(max);
|
|
96
|
-
var
|
|
97
|
-
var
|
|
98
|
-
var
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
var
|
|
113
|
-
'euiProgress--indeterminate': !determinate,
|
|
114
|
-
'euiProgress--native': determinate
|
|
115
|
-
}, sizeToClassNameMap[size], colorClass, positionsToClassNameMap[position], className);
|
|
116
|
-
var dataClasses = classNames('euiProgress__data', {
|
|
117
|
-
'euiProgress__data--l': size === 'l'
|
|
118
|
-
}, dataColorClass);
|
|
119
|
-
var labelClasses = classNames('euiProgress__label', labelProps && labelProps.className);
|
|
45
|
+
var isNamedColor = COLORS.includes(color);
|
|
46
|
+
var euiTheme = useEuiTheme();
|
|
47
|
+
var customColorStyles = !isNamedColor ? {
|
|
48
|
+
color: color
|
|
49
|
+
} : {};
|
|
50
|
+
var customTextColorStyles = !isNamedColor ? {
|
|
51
|
+
color: makeHighContrastColor(color)(euiTheme.euiTheme)
|
|
52
|
+
} : {};
|
|
53
|
+
var styles = euiProgressStyles(euiTheme, determinate);
|
|
54
|
+
var cssStyles = [styles.euiProgress, determinate && styles.native, !determinate && styles.indeterminate, styles[size], styles[position], isNamedColor ? styles[color] : styles.customColor];
|
|
55
|
+
var dataStyles = euiProgressDataStyles(euiTheme);
|
|
56
|
+
var dataCssStyles = [dataStyles.euiProgress__data, size === 'l' && dataStyles[size]];
|
|
57
|
+
var labelCssStyles = [euiProgressLabelStyles.euiProgress__label];
|
|
58
|
+
var valueTextStyles = euiProgressValueTextStyles(euiTheme);
|
|
59
|
+
var valueTextCssStyles = [valueTextStyles.euiProgress__valueText, isNamedColor ? valueTextStyles[color] : styles.customColor];
|
|
60
|
+
var classes = classNames('euiProgress', className);
|
|
61
|
+
var labelClasses = classNames('euiProgress__label', labelProps === null || labelProps === void 0 ? void 0 : labelProps.className);
|
|
120
62
|
var valueRender;
|
|
121
63
|
|
|
122
64
|
if (valueText === true) {
|
|
@@ -137,31 +79,36 @@ export var EuiProgress = function EuiProgress(_ref) {
|
|
|
137
79
|
|
|
138
80
|
if (determinate) {
|
|
139
81
|
return ___EmotionJSX(Fragment, null, label || valueText ? ___EmotionJSX("div", {
|
|
140
|
-
|
|
82
|
+
css: dataCssStyles,
|
|
83
|
+
className: "euiProgress__data"
|
|
141
84
|
}, label && ___EmotionJSX(EuiInnerText, null, function (ref, innerText) {
|
|
142
85
|
return ___EmotionJSX("span", _extends({
|
|
143
86
|
title: innerText,
|
|
144
87
|
ref: ref
|
|
145
88
|
}, labelProps, {
|
|
89
|
+
css: labelCssStyles,
|
|
146
90
|
className: labelClasses
|
|
147
91
|
}), label);
|
|
148
92
|
}), valueRender && ___EmotionJSX(EuiInnerText, null, function (ref, innerText) {
|
|
149
93
|
return ___EmotionJSX("span", {
|
|
150
94
|
title: innerText,
|
|
151
95
|
ref: ref,
|
|
152
|
-
style:
|
|
96
|
+
style: customTextColorStyles,
|
|
97
|
+
css: valueTextCssStyles,
|
|
153
98
|
className: "euiProgress__valueText"
|
|
154
99
|
}, valueRender);
|
|
155
100
|
})) : undefined, ___EmotionJSX("progress", _extends({
|
|
101
|
+
css: cssStyles,
|
|
156
102
|
className: classes,
|
|
157
|
-
style:
|
|
103
|
+
style: customColorStyles,
|
|
158
104
|
max: max,
|
|
159
105
|
value: value,
|
|
160
106
|
"aria-hidden": label && valueText ? true : false
|
|
161
107
|
}, rest)));
|
|
162
108
|
} else {
|
|
163
109
|
return ___EmotionJSX("div", _extends({
|
|
164
|
-
|
|
110
|
+
css: cssStyles,
|
|
111
|
+
style: customColorStyles,
|
|
165
112
|
className: classes
|
|
166
113
|
}, rest));
|
|
167
114
|
}
|
|
@@ -170,7 +117,7 @@ EuiProgress.propTypes = {
|
|
|
170
117
|
className: PropTypes.string,
|
|
171
118
|
"aria-label": PropTypes.string,
|
|
172
119
|
"data-test-subj": PropTypes.string,
|
|
173
|
-
size: PropTypes.
|
|
120
|
+
size: PropTypes.any,
|
|
174
121
|
|
|
175
122
|
/**
|
|
176
123
|
* One of EUI's color palette, vis colors or a valid CSS color value https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
|
|
@@ -179,8 +126,8 @@ EuiProgress.propTypes = {
|
|
|
179
126
|
/**
|
|
180
127
|
* One of EUI's color palette, vis colors or a valid CSS color value https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
|
|
181
128
|
*/
|
|
182
|
-
color: PropTypes.oneOfType([PropTypes.
|
|
183
|
-
position: PropTypes.
|
|
129
|
+
color: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.any.isRequired]),
|
|
130
|
+
position: PropTypes.any,
|
|
184
131
|
max: PropTypes.number,
|
|
185
132
|
|
|
186
133
|
/*
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
var _templateObject;
|
|
2
|
+
|
|
3
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
4
|
+
|
|
5
|
+
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)."; }
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
9
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
10
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
11
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
12
|
+
* Side Public License, v 1.
|
|
13
|
+
*/
|
|
14
|
+
import { css, keyframes } from '@emotion/react';
|
|
15
|
+
import { logicalCSS, logicalTextAlignCSS, euiCantAnimate, euiFontSize, euiTextTruncate } from '../../global_styling';
|
|
16
|
+
import { euiPaletteColorBlind, makeHighContrastColor } from '../../services';
|
|
17
|
+
import { euiText } from '../text/text.styles';
|
|
18
|
+
/**
|
|
19
|
+
* DRY utilities for native/determinate progress components vs non-native indeterminate
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
var crossBrowserProgressValue = function crossBrowserProgressValue(cssProperties) {
|
|
23
|
+
return "\n &::-webkit-progress-value {\n ".concat(cssProperties, "\n }\n &::-moz-progress-bar {\n ").concat(cssProperties, "\n }\n");
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
var indeterminateProgressValue = function indeterminateProgressValue(cssProperties) {
|
|
27
|
+
return "\n &:before {\n ".concat(cssProperties, "\n }\n");
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Color utilities
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
var visColors = euiPaletteColorBlind();
|
|
35
|
+
|
|
36
|
+
var nativeVsIndeterminateColor = function nativeVsIndeterminateColor(color, isNative) {
|
|
37
|
+
var selectors = isNative ? crossBrowserProgressValue : indeterminateProgressValue;
|
|
38
|
+
return selectors("background-color: ".concat(color, ";"));
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* DRY utils for non-static positions
|
|
42
|
+
*/
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
var nonStaticPositioning = function nonStaticPositioning(isNative) {
|
|
46
|
+
return "\n top: 0;\n left: 0;\n right: 0;\n background-color: transparent;\n ".concat(isNative ? "\n &::-webkit-progress-bar {\n background-color: transparent;\n }" : '', "\n");
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Animations
|
|
50
|
+
*/
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
var euiIndeterminateAnimation = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% {\n transform: scaleX(1) translateX(-100%);\n }\n 100% {\n transform: scaleX(1) translateX(100%);\n }\n"])));
|
|
54
|
+
/**
|
|
55
|
+
* Emotion styles
|
|
56
|
+
*/
|
|
57
|
+
|
|
58
|
+
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
59
|
+
name: "187h6sp-static",
|
|
60
|
+
styles: "position:relative;label:static;"
|
|
61
|
+
} : {
|
|
62
|
+
name: "187h6sp-static",
|
|
63
|
+
styles: "position:relative;label:static;",
|
|
64
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export var euiProgressStyles = function euiProgressStyles(_ref3, isNative) {
|
|
68
|
+
var euiTheme = _ref3.euiTheme;
|
|
69
|
+
return {
|
|
70
|
+
euiProgress: /*#__PURE__*/css("overflow:hidden;background-color:", euiTheme.colors.lightShade, ";;label:euiProgress;"),
|
|
71
|
+
// https://css-tricks.com/html5-progress-element/
|
|
72
|
+
// Good resource if you need to work in here. There's some gotchas with
|
|
73
|
+
// dealing with cross-browser progress bars.
|
|
74
|
+
native: /*#__PURE__*/css("display:block;", logicalCSS('width', '100%'), " appearance:none;border:none;border-radius:", euiTheme.size.s, ";&::-webkit-progress-bar{background-color:", euiTheme.colors.lightShade, ";}", crossBrowserProgressValue("transition: width ".concat(euiTheme.animation.normal, " linear;")), ";;label:native;"),
|
|
75
|
+
// An indeterminate bar has an unreliable end time. Because of a Firefox animation issue,
|
|
76
|
+
// we apply this style to a <div> instead of a <progress> element.
|
|
77
|
+
// See https://css-tricks.com/html5-progress-element/ for more info.
|
|
78
|
+
indeterminate: /*#__PURE__*/css("&:before{position:absolute;content:'';", logicalCSS('width', '100%'), " top:0;bottom:0;left:0;transform:scaleX(0) translateX(0%);animation:", euiIndeterminateAnimation, " 1s ", euiTheme.animation.resistance, " infinite;", euiCantAnimate, "{animation-duration:2s;animation-timing-function:linear;}};label:indeterminate;"),
|
|
79
|
+
// Sizes
|
|
80
|
+
xs: /*#__PURE__*/css(logicalCSS('height', euiTheme.size.xxs), ";;label:xs;"),
|
|
81
|
+
s: /*#__PURE__*/css(logicalCSS('height', euiTheme.size.xs), ";;label:s;"),
|
|
82
|
+
m: /*#__PURE__*/css(logicalCSS('height', euiTheme.size.s), ";;label:m;"),
|
|
83
|
+
l: /*#__PURE__*/css(logicalCSS('height', euiTheme.size.m), ";;label:l;"),
|
|
84
|
+
// Positioning
|
|
85
|
+
fixed: /*#__PURE__*/css("position:fixed;z-index:", Number(euiTheme.levels.header) + 1, ";", nonStaticPositioning(isNative), ";;label:fixed;"),
|
|
86
|
+
absolute: /*#__PURE__*/css("position:absolute;", nonStaticPositioning(isNative), ";;label:absolute;"),
|
|
87
|
+
static: _ref2,
|
|
88
|
+
// Colors
|
|
89
|
+
primary: /*#__PURE__*/css(nativeVsIndeterminateColor(euiTheme.colors.primary, isNative), ";;label:primary;"),
|
|
90
|
+
success: /*#__PURE__*/css(nativeVsIndeterminateColor(euiTheme.colors.success, isNative), ";;label:success;"),
|
|
91
|
+
warning: /*#__PURE__*/css(nativeVsIndeterminateColor(euiTheme.colors.warning, isNative), ";;label:warning;"),
|
|
92
|
+
danger: /*#__PURE__*/css(nativeVsIndeterminateColor(euiTheme.colors.danger, isNative), ";;label:danger;"),
|
|
93
|
+
subdued: /*#__PURE__*/css(nativeVsIndeterminateColor(euiTheme.colors.subduedText, isNative), ";;label:subdued;"),
|
|
94
|
+
accent: /*#__PURE__*/css(nativeVsIndeterminateColor(euiTheme.colors.accent, isNative), ";;label:accent;"),
|
|
95
|
+
vis0: /*#__PURE__*/css(nativeVsIndeterminateColor(visColors[0], isNative), ";;label:vis0;"),
|
|
96
|
+
vis1: /*#__PURE__*/css(nativeVsIndeterminateColor(visColors[1], isNative), ";;label:vis1;"),
|
|
97
|
+
vis2: /*#__PURE__*/css(nativeVsIndeterminateColor(visColors[2], isNative), ";;label:vis2;"),
|
|
98
|
+
vis3: /*#__PURE__*/css(nativeVsIndeterminateColor(visColors[3], isNative), ";;label:vis3;"),
|
|
99
|
+
vis4: /*#__PURE__*/css(nativeVsIndeterminateColor(visColors[4], isNative), ";;label:vis4;"),
|
|
100
|
+
vis5: /*#__PURE__*/css(nativeVsIndeterminateColor(visColors[5], isNative), ";;label:vis5;"),
|
|
101
|
+
vis6: /*#__PURE__*/css(nativeVsIndeterminateColor(visColors[6], isNative), ";;label:vis6;"),
|
|
102
|
+
vis7: /*#__PURE__*/css(nativeVsIndeterminateColor(visColors[7], isNative), ";;label:vis7;"),
|
|
103
|
+
vis8: /*#__PURE__*/css(nativeVsIndeterminateColor(visColors[8], isNative), ";;label:vis8;"),
|
|
104
|
+
vis9: /*#__PURE__*/css(nativeVsIndeterminateColor(visColors[9], isNative), ";;label:vis9;"),
|
|
105
|
+
customColor: /*#__PURE__*/css(nativeVsIndeterminateColor('currentColor', isNative), ";;label:customColor;")
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* Data styles
|
|
110
|
+
*/
|
|
111
|
+
|
|
112
|
+
export var euiProgressDataStyles = function euiProgressDataStyles(euiThemeContext) {
|
|
113
|
+
return {
|
|
114
|
+
euiProgress__data: /*#__PURE__*/css("display:flex;justify-content:space-between;gap:", euiThemeContext.euiTheme.size.xs, ";", euiText(euiThemeContext.euiTheme), " ", euiFontSize(euiThemeContext, 'xs'), ";;label:euiProgress__data;"),
|
|
115
|
+
// Sizes
|
|
116
|
+
l: /*#__PURE__*/css(euiFontSize(euiThemeContext, 's'), ";;label:l;")
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
export var euiProgressLabelStyles = {
|
|
120
|
+
euiProgress__label: /*#__PURE__*/css("flex-grow:1;", euiTextTruncate(), ";;label:euiProgress__label;")
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
124
|
+
name: "15ioh86-customColor",
|
|
125
|
+
styles: "color:currentColor;label:customColor;"
|
|
126
|
+
} : {
|
|
127
|
+
name: "15ioh86-customColor",
|
|
128
|
+
styles: "color:currentColor;label:customColor;",
|
|
129
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
export var euiProgressValueTextStyles = function euiProgressValueTextStyles(_ref4) {
|
|
133
|
+
var euiTheme = _ref4.euiTheme;
|
|
134
|
+
return {
|
|
135
|
+
euiProgress__valueText: /*#__PURE__*/css("flex-grow:1;flex-shrink:0;font-feature-settings:'tnum' 1;", logicalTextAlignCSS('right'), " ", euiTextTruncate(), ";;label:euiProgress__valueText;"),
|
|
136
|
+
// Colors
|
|
137
|
+
primary: /*#__PURE__*/css("color:", euiTheme.colors.primaryText, ";;label:primary;"),
|
|
138
|
+
success: /*#__PURE__*/css("color:", euiTheme.colors.successText, ";;label:success;"),
|
|
139
|
+
warning: /*#__PURE__*/css("color:", euiTheme.colors.warningText, ";;label:warning;"),
|
|
140
|
+
danger: /*#__PURE__*/css("color:", euiTheme.colors.dangerText, ";;label:danger;"),
|
|
141
|
+
subdued: /*#__PURE__*/css("color:", euiTheme.colors.subduedText, ";;label:subdued;"),
|
|
142
|
+
accent: /*#__PURE__*/css("color:", euiTheme.colors.accentText, ";;label:accent;"),
|
|
143
|
+
vis0: /*#__PURE__*/css("color:", makeHighContrastColor(visColors[0])(euiTheme), ";;label:vis0;"),
|
|
144
|
+
vis1: /*#__PURE__*/css("color:", makeHighContrastColor(visColors[1])(euiTheme), ";;label:vis1;"),
|
|
145
|
+
vis2: /*#__PURE__*/css("color:", makeHighContrastColor(visColors[2])(euiTheme), ";;label:vis2;"),
|
|
146
|
+
vis3: /*#__PURE__*/css("color:", makeHighContrastColor(visColors[3])(euiTheme), ";;label:vis3;"),
|
|
147
|
+
vis4: /*#__PURE__*/css("color:", makeHighContrastColor(visColors[4])(euiTheme), ";;label:vis4;"),
|
|
148
|
+
vis5: /*#__PURE__*/css("color:", makeHighContrastColor(visColors[5])(euiTheme), ";;label:vis5;"),
|
|
149
|
+
vis6: /*#__PURE__*/css("color:", makeHighContrastColor(visColors[6])(euiTheme), ";;label:vis6;"),
|
|
150
|
+
vis7: /*#__PURE__*/css("color:", makeHighContrastColor(visColors[7])(euiTheme), ";;label:vis7;"),
|
|
151
|
+
vis8: /*#__PURE__*/css("color:", makeHighContrastColor(visColors[8])(euiTheme), ";;label:vis8;"),
|
|
152
|
+
vis9: /*#__PURE__*/css("color:", makeHighContrastColor(visColors[9])(euiTheme), ";;label:vis9;"),
|
|
153
|
+
customColor: _ref
|
|
154
|
+
};
|
|
155
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import { CacheProvider } from '@emotion/react';
|
|
10
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
11
|
+
export var EuiCacheProvider = function EuiCacheProvider(_ref) {
|
|
12
|
+
var cache = _ref.cache,
|
|
13
|
+
children = _ref.children;
|
|
14
|
+
return children && cache ? ___EmotionJSX(CacheProvider, {
|
|
15
|
+
value: cache
|
|
16
|
+
}, children) : ___EmotionJSX(React.Fragment, null, children);
|
|
17
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
export * from './cache_provider';
|
|
@@ -7,22 +7,52 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import { EuiGlobalStyles } from '../../global_styling/reset/global_styles';
|
|
10
|
+
import { EuiUtilityClasses } from '../../global_styling/utility/utility';
|
|
10
11
|
import { EuiThemeProvider } from '../../services';
|
|
11
12
|
import { EuiThemeAmsterdam } from '../../themes';
|
|
13
|
+
import { EuiCacheProvider } from './cache';
|
|
12
14
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
15
|
+
|
|
16
|
+
var isEmotionCacheObject = function isEmotionCacheObject(obj) {
|
|
17
|
+
return obj.hasOwnProperty('key');
|
|
18
|
+
};
|
|
19
|
+
|
|
13
20
|
export var EuiProvider = function EuiProvider(_ref) {
|
|
14
21
|
var cache = _ref.cache,
|
|
15
22
|
_ref$theme = _ref.theme,
|
|
16
23
|
theme = _ref$theme === void 0 ? EuiThemeAmsterdam : _ref$theme,
|
|
17
24
|
_ref$globalStyles = _ref.globalStyles,
|
|
18
|
-
|
|
25
|
+
Globals = _ref$globalStyles === void 0 ? EuiGlobalStyles : _ref$globalStyles,
|
|
26
|
+
_ref$utilityClasses = _ref.utilityClasses,
|
|
27
|
+
Utilities = _ref$utilityClasses === void 0 ? EuiUtilityClasses : _ref$utilityClasses,
|
|
19
28
|
colorMode = _ref.colorMode,
|
|
20
29
|
modify = _ref.modify,
|
|
21
30
|
children = _ref.children;
|
|
22
|
-
|
|
31
|
+
var defaultCache;
|
|
32
|
+
var globalCache;
|
|
33
|
+
var utilityCache;
|
|
34
|
+
|
|
35
|
+
if (cache) {
|
|
36
|
+
if (isEmotionCacheObject(cache)) {
|
|
37
|
+
defaultCache = cache;
|
|
38
|
+
} else {
|
|
39
|
+
defaultCache = cache.default;
|
|
40
|
+
globalCache = cache.global;
|
|
41
|
+
utilityCache = cache.utility;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return ___EmotionJSX(EuiCacheProvider, {
|
|
46
|
+
cache: defaultCache
|
|
47
|
+
}, ___EmotionJSX(EuiThemeProvider, {
|
|
23
48
|
theme: theme !== null && theme !== void 0 ? theme : undefined,
|
|
24
49
|
colorMode: colorMode,
|
|
25
|
-
modify: modify
|
|
26
|
-
|
|
27
|
-
|
|
50
|
+
modify: modify
|
|
51
|
+
}, theme && ___EmotionJSX(React.Fragment, null, ___EmotionJSX(EuiCacheProvider, {
|
|
52
|
+
cache: globalCache,
|
|
53
|
+
children: Globals && ___EmotionJSX(Globals, null)
|
|
54
|
+
}), ___EmotionJSX(EuiCacheProvider, {
|
|
55
|
+
cache: utilityCache,
|
|
56
|
+
children: Utilities && ___EmotionJSX(Utilities, null)
|
|
57
|
+
})), children));
|
|
28
58
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
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); }
|
|
2
2
|
|
|
3
|
-
var _excluded = ["children", "className", "options", "onChange", "searchable", "searchProps", "singleSelection", "isLoading", "listProps", "renderOption", "height", "allowExclusions", "aria-label", "aria-describedby", "loadingMessage", "noMatchesMessage", "emptyMessage", "errorMessage", "isPreFiltered"],
|
|
3
|
+
var _excluded = ["children", "className", "options", "onChange", "onActiveOptionChange", "searchable", "searchProps", "singleSelection", "isLoading", "listProps", "renderOption", "height", "allowExclusions", "aria-label", "aria-describedby", "loadingMessage", "noMatchesMessage", "emptyMessage", "errorMessage", "isPreFiltered"],
|
|
4
4
|
_excluded2 = ["aria-label", "aria-describedby", "onChange", "defaultValue", "inputRef"],
|
|
5
5
|
_excluded3 = ["aria-label", "aria-describedby", "isVirtualized", "rowHeight"];
|
|
6
6
|
|
|
@@ -337,31 +337,42 @@ export var EuiSelectable = /*#__PURE__*/function (_Component) {
|
|
|
337
337
|
}
|
|
338
338
|
|
|
339
339
|
_createClass(EuiSelectable, [{
|
|
340
|
+
key: "componentDidUpdate",
|
|
341
|
+
value: function componentDidUpdate(prevProps, prevState) {
|
|
342
|
+
if (prevState.activeOptionIndex !== this.state.activeOptionIndex) {
|
|
343
|
+
var _this$props$onActiveO, _this$props2;
|
|
344
|
+
|
|
345
|
+
var activeOption = this.state.activeOptionIndex != null ? this.state.visibleOptions[this.state.activeOptionIndex] : null;
|
|
346
|
+
(_this$props$onActiveO = (_this$props2 = this.props).onActiveOptionChange) === null || _this$props$onActiveO === void 0 ? void 0 : _this$props$onActiveO.call(_this$props2, activeOption);
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}, {
|
|
340
350
|
key: "render",
|
|
341
351
|
value: function render() {
|
|
342
352
|
var _this2 = this;
|
|
343
353
|
|
|
344
|
-
var _this$
|
|
345
|
-
children = _this$
|
|
346
|
-
className = _this$
|
|
347
|
-
options = _this$
|
|
348
|
-
onChange = _this$
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
354
|
+
var _this$props3 = this.props,
|
|
355
|
+
children = _this$props3.children,
|
|
356
|
+
className = _this$props3.className,
|
|
357
|
+
options = _this$props3.options,
|
|
358
|
+
onChange = _this$props3.onChange,
|
|
359
|
+
onActiveOptionChange = _this$props3.onActiveOptionChange,
|
|
360
|
+
searchable = _this$props3.searchable,
|
|
361
|
+
searchProps = _this$props3.searchProps,
|
|
362
|
+
singleSelection = _this$props3.singleSelection,
|
|
363
|
+
isLoading = _this$props3.isLoading,
|
|
364
|
+
listProps = _this$props3.listProps,
|
|
365
|
+
renderOption = _this$props3.renderOption,
|
|
366
|
+
height = _this$props3.height,
|
|
367
|
+
allowExclusions = _this$props3.allowExclusions,
|
|
368
|
+
ariaLabel = _this$props3['aria-label'],
|
|
369
|
+
ariaDescribedby = _this$props3['aria-describedby'],
|
|
370
|
+
loadingMessage = _this$props3.loadingMessage,
|
|
371
|
+
noMatchesMessage = _this$props3.noMatchesMessage,
|
|
372
|
+
emptyMessage = _this$props3.emptyMessage,
|
|
373
|
+
errorMessage = _this$props3.errorMessage,
|
|
374
|
+
isPreFiltered = _this$props3.isPreFiltered,
|
|
375
|
+
rest = _objectWithoutProperties(_this$props3, _excluded);
|
|
365
376
|
|
|
366
377
|
var _this$state = this.state,
|
|
367
378
|
searchValue = _this$state.searchValue,
|
|
@@ -710,6 +721,12 @@ EuiSelectable.propTypes = {
|
|
|
710
721
|
*/
|
|
711
722
|
onChange: PropTypes.func,
|
|
712
723
|
|
|
724
|
+
/**
|
|
725
|
+
* Passes back the current active option whenever the user changes the currently
|
|
726
|
+
* highlighted option via keyboard navigation or searching.
|
|
727
|
+
*/
|
|
728
|
+
onActiveOptionChange: PropTypes.func,
|
|
729
|
+
|
|
713
730
|
/**
|
|
714
731
|
* Sets the single selection policy of
|
|
715
732
|
* `false`: allows multiple selection
|
|
@@ -440,7 +440,7 @@ EuiSelectableList.propTypes = {
|
|
|
440
440
|
/**
|
|
441
441
|
* Accepts either our palette colors (primary, success ..etc) or a hex value `#FFFFFF`, `#000`.
|
|
442
442
|
*/
|
|
443
|
-
color: PropTypes.oneOfType([PropTypes.string.isRequired, PropTypes.
|
|
443
|
+
color: PropTypes.oneOfType([PropTypes.string.isRequired, PropTypes.any.isRequired]),
|
|
444
444
|
|
|
445
445
|
/**
|
|
446
446
|
* Will override any color passed through the `color` prop.
|
|
@@ -276,7 +276,7 @@ EuiSelectableListItem.propTypes = {
|
|
|
276
276
|
/**
|
|
277
277
|
* Accepts either our palette colors (primary, success ..etc) or a hex value `#FFFFFF`, `#000`.
|
|
278
278
|
*/
|
|
279
|
-
color: PropTypes.oneOfType([PropTypes.string.isRequired, PropTypes.
|
|
279
|
+
color: PropTypes.oneOfType([PropTypes.string.isRequired, PropTypes.any.isRequired]),
|
|
280
280
|
|
|
281
281
|
/**
|
|
282
282
|
* Will override any color passed through the `color` prop.
|
|
@@ -339,12 +339,12 @@ EuiSelectableTemplateSitewide.propTypes = {
|
|
|
339
339
|
/**
|
|
340
340
|
* Manually change icon size
|
|
341
341
|
*/
|
|
342
|
-
iconSize: PropTypes.
|
|
342
|
+
iconSize: PropTypes.any,
|
|
343
343
|
|
|
344
344
|
/**
|
|
345
345
|
* Manually change icon color
|
|
346
346
|
*/
|
|
347
|
-
iconColor: PropTypes.oneOfType([PropTypes.oneOfType([PropTypes.string.isRequired, PropTypes.
|
|
347
|
+
iconColor: PropTypes.oneOfType([PropTypes.oneOfType([PropTypes.string.isRequired, PropTypes.any.isRequired]).isRequired, PropTypes.oneOf([null])]),
|
|
348
348
|
|
|
349
349
|
/**
|
|
350
350
|
* Full name of avatar for title attribute and calculating initial if not provided
|