@elastic/eui 103.0.0 → 103.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/dist/eui_theme_amsterdam_dark.json +8 -8
- package/dist/eui_theme_amsterdam_light.json +8 -8
- package/es/components/card/checkable_card/checkable_card.js +4 -2
- package/es/components/combo_box/combo_box.js +4 -2
- package/es/components/combo_box/combo_box_input/combo_box_input.js +4 -1
- package/es/components/datagrid/controls/fullscreen_selector.js +11 -6
- package/es/components/datagrid/data_grid.js +3 -2
- package/es/components/form/checkbox/checkbox.js +1 -1
- package/es/themes/amsterdam/global_styling/variables/_colors.js +200 -216
- package/es/themes/amsterdam/global_styling/variables/_colors_vis.js +1 -1
- package/es/themes/json/eui_theme_amsterdam_dark.json +8 -8
- package/es/themes/json/eui_theme_amsterdam_light.json +8 -8
- package/eui.d.ts +8 -3
- package/lib/components/card/checkable_card/checkable_card.js +4 -2
- package/lib/components/combo_box/combo_box.js +4 -2
- package/lib/components/combo_box/combo_box_input/combo_box_input.js +4 -1
- package/lib/components/datagrid/controls/fullscreen_selector.js +11 -6
- package/lib/components/datagrid/data_grid.js +3 -2
- package/lib/components/form/checkbox/checkbox.js +1 -1
- package/lib/themes/amsterdam/global_styling/variables/_colors.js +200 -216
- package/lib/themes/amsterdam/global_styling/variables/_colors_vis.js +5 -5
- package/lib/themes/json/eui_theme_amsterdam_dark.json +8 -8
- package/lib/themes/json/eui_theme_amsterdam_light.json +8 -8
- package/optimize/es/components/card/checkable_card/checkable_card.js +4 -2
- package/optimize/es/components/combo_box/combo_box.js +4 -2
- package/optimize/es/components/combo_box/combo_box_input/combo_box_input.js +3 -1
- package/optimize/es/components/datagrid/controls/fullscreen_selector.js +11 -6
- package/optimize/es/components/datagrid/data_grid.js +3 -2
- package/optimize/es/themes/amsterdam/global_styling/variables/_colors.js +200 -216
- package/optimize/es/themes/amsterdam/global_styling/variables/_colors_vis.js +1 -1
- package/optimize/es/themes/json/eui_theme_amsterdam_dark.json +8 -8
- package/optimize/es/themes/json/eui_theme_amsterdam_light.json +8 -8
- package/optimize/lib/components/card/checkable_card/checkable_card.js +4 -2
- package/optimize/lib/components/combo_box/combo_box.js +4 -2
- package/optimize/lib/components/combo_box/combo_box_input/combo_box_input.js +3 -1
- package/optimize/lib/components/datagrid/controls/fullscreen_selector.js +11 -6
- package/optimize/lib/components/datagrid/data_grid.js +3 -2
- package/optimize/lib/themes/amsterdam/global_styling/variables/_colors.js +200 -216
- package/optimize/lib/themes/amsterdam/global_styling/variables/_colors_vis.js +5 -5
- package/optimize/lib/themes/json/eui_theme_amsterdam_dark.json +8 -8
- package/optimize/lib/themes/json/eui_theme_amsterdam_light.json +8 -8
- package/package.json +2 -2
- package/src/themes/amsterdam/_colors_dark.scss +8 -8
- package/src/themes/amsterdam/_colors_light.scss +8 -8
- package/test-env/components/card/checkable_card/checkable_card.js +4 -2
- package/test-env/components/combo_box/combo_box.js +4 -2
- package/test-env/components/combo_box/combo_box_input/combo_box_input.js +4 -1
- package/test-env/components/datagrid/controls/fullscreen_selector.js +11 -6
- package/test-env/components/datagrid/data_grid.js +3 -2
- package/test-env/components/form/checkbox/checkbox.js +1 -1
- package/test-env/themes/amsterdam/global_styling/variables/_colors.js +200 -216
- package/test-env/themes/amsterdam/global_styling/variables/_colors_vis.js +5 -5
- package/test-env/themes/json/eui_theme_amsterdam_dark.json +8 -8
- package/test-env/themes/json/eui_theme_amsterdam_light.json +8 -8
- package/package/eui.d.ts +0 -29802
- package/temp/package/eui.d.ts +0 -29802
|
@@ -416,12 +416,12 @@
|
|
|
416
416
|
"euiColorBorderBaseFloating": "transparent",
|
|
417
417
|
"euiColorBorderBaseFormsColorSwatch": "rgba(255,255,255,0.1)",
|
|
418
418
|
"euiColorBorderBaseFormsControl": "#69696f",
|
|
419
|
-
"euiColorBorderStrongPrimary": "#
|
|
420
|
-
"euiColorBorderStrongAccent": "#
|
|
421
|
-
"euiColorBorderStrongAccentSecondary": "#
|
|
422
|
-
"euiColorBorderStrongNeutral": "#
|
|
423
|
-
"euiColorBorderStrongSuccess": "#
|
|
424
|
-
"euiColorBorderStrongWarning": "#
|
|
425
|
-
"euiColorBorderStrongRisk": "#
|
|
426
|
-
"euiColorBorderStrongDanger": "#
|
|
419
|
+
"euiColorBorderStrongPrimary": "#36A2EF",
|
|
420
|
+
"euiColorBorderStrongAccent": "#F68FBE",
|
|
421
|
+
"euiColorBorderStrongAccentSecondary": "#7DDED8",
|
|
422
|
+
"euiColorBorderStrongNeutral": "#B9CFE3",
|
|
423
|
+
"euiColorBorderStrongSuccess": "#7DDED8",
|
|
424
|
+
"euiColorBorderStrongWarning": "#F3D371",
|
|
425
|
+
"euiColorBorderStrongRisk": "#E1A26A",
|
|
426
|
+
"euiColorBorderStrongDanger": "#F86B63"
|
|
427
427
|
}
|
|
@@ -416,12 +416,12 @@
|
|
|
416
416
|
"euiColorBorderBaseFloating": "transparent",
|
|
417
417
|
"euiColorBorderBaseFormsColorSwatch": "rgba(0,0,0,0.1)",
|
|
418
418
|
"euiColorBorderBaseFormsControl": "#919296",
|
|
419
|
-
"euiColorBorderStrongPrimary": "#
|
|
420
|
-
"euiColorBorderStrongAccent": "#
|
|
421
|
-
"euiColorBorderStrongAccentSecondary": "#
|
|
422
|
-
"euiColorBorderStrongNeutral": "#
|
|
423
|
-
"euiColorBorderStrongSuccess": "#
|
|
424
|
-
"euiColorBorderStrongWarning": "#
|
|
425
|
-
"euiColorBorderStrongRisk": "#
|
|
426
|
-
"euiColorBorderStrongDanger": "#
|
|
419
|
+
"euiColorBorderStrongPrimary": "#0077CC",
|
|
420
|
+
"euiColorBorderStrongAccent": "#F04E98",
|
|
421
|
+
"euiColorBorderStrongAccentSecondary": "#00BFB3",
|
|
422
|
+
"euiColorBorderStrongNeutral": "#94A6B6",
|
|
423
|
+
"euiColorBorderStrongSuccess": "#00BFB3",
|
|
424
|
+
"euiColorBorderStrongWarning": "#FEC514",
|
|
425
|
+
"euiColorBorderStrongRisk": "#DA8B45",
|
|
426
|
+
"euiColorBorderStrongDanger": "#BD271E"
|
|
427
427
|
}
|
|
@@ -43,6 +43,7 @@ export var EuiCheckableCard = function EuiCheckableCard(_ref) {
|
|
|
43
43
|
var childStyles = [styles.euiCheckableCard__children];
|
|
44
44
|
var id = rest.id;
|
|
45
45
|
var labelEl = useRef(null);
|
|
46
|
+
var inputEl = useRef(null);
|
|
46
47
|
var classes = classNames('euiCheckableCard', className);
|
|
47
48
|
var checkableElement;
|
|
48
49
|
if (checkableType === 'radio') {
|
|
@@ -52,13 +53,14 @@ export var EuiCheckableCard = function EuiCheckableCard(_ref) {
|
|
|
52
53
|
}, rest));
|
|
53
54
|
} else {
|
|
54
55
|
checkableElement = ___EmotionJSX(EuiCheckbox, _extends({
|
|
56
|
+
inputRef: inputEl,
|
|
55
57
|
checked: checked,
|
|
56
58
|
disabled: disabled
|
|
57
59
|
}, rest));
|
|
58
60
|
}
|
|
59
61
|
var labelClasses = classNames('euiCheckableCard__label');
|
|
60
|
-
var onChangeAffordance = function onChangeAffordance() {
|
|
61
|
-
if (labelEl.current) {
|
|
62
|
+
var onChangeAffordance = function onChangeAffordance(e) {
|
|
63
|
+
if (labelEl.current && e.target !== inputEl.current) {
|
|
62
64
|
labelEl.current.click();
|
|
63
65
|
}
|
|
64
66
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["data-test-subj", "async", "className", "compressed", "customOptionText", "fullWidth", "id", "inputRef", "isCaseSensitive", "isClearable", "isDisabled", "isInvalid", "isLoading", "noSuggestions", "onBlur", "onChange", "onCreateOption", "onSearchChange", "options", "placeholder", "renderOption", "rowHeight", "selectedOptions", "singleSelection", "prepend", "sortMatchesBy", "delimiter", "append", "autoFocus", "truncationProps", "inputPopoverProps", "optionMatcher", "aria-label", "aria-labelledby"];
|
|
1
|
+
var _excluded = ["data-test-subj", "async", "className", "compressed", "customOptionText", "fullWidth", "id", "inputRef", "isCaseSensitive", "isClearable", "isDisabled", "isInvalid", "isLoading", "noSuggestions", "onBlur", "onChange", "onCreateOption", "onSearchChange", "options", "placeholder", "renderOption", "rowHeight", "selectedOptions", "singleSelection", "prepend", "sortMatchesBy", "delimiter", "append", "autoFocus", "truncationProps", "inputPopoverProps", "optionMatcher", "aria-label", "aria-labelledby", "aria-describedby"];
|
|
2
2
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
3
3
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
4
4
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
@@ -490,6 +490,7 @@ export var EuiComboBox = /*#__PURE__*/function (_Component) {
|
|
|
490
490
|
optionMatcher = _this$props11.optionMatcher,
|
|
491
491
|
ariaLabel = _this$props11['aria-label'],
|
|
492
492
|
ariaLabelledby = _this$props11['aria-labelledby'],
|
|
493
|
+
ariaDescribedby = _this$props11['aria-describedby'],
|
|
493
494
|
rest = _objectWithoutProperties(_this$props11, _excluded);
|
|
494
495
|
var _this$state2 = this.state,
|
|
495
496
|
activeOptionIndex = _this$state2.activeOptionIndex,
|
|
@@ -609,7 +610,8 @@ export var EuiComboBox = /*#__PURE__*/function (_Component) {
|
|
|
609
610
|
isInvalid: markAsInvalid,
|
|
610
611
|
autoFocus: autoFocus,
|
|
611
612
|
"aria-label": ariaLabel,
|
|
612
|
-
"aria-labelledby": ariaLabelledby
|
|
613
|
+
"aria-labelledby": ariaLabelledby,
|
|
614
|
+
"aria-describedby": ariaDescribedby
|
|
613
615
|
})
|
|
614
616
|
}), optionsList));
|
|
615
617
|
})
|
|
@@ -206,7 +206,8 @@ export var EuiComboBoxInput = /*#__PURE__*/function (_Component) {
|
|
|
206
206
|
isInvalid = _this$props5.isInvalid,
|
|
207
207
|
autoFocus = _this$props5.autoFocus,
|
|
208
208
|
ariaLabel = _this$props5['aria-label'],
|
|
209
|
-
ariaLabelledby = _this$props5['aria-labelledby']
|
|
209
|
+
ariaLabelledby = _this$props5['aria-labelledby'],
|
|
210
|
+
ariaDescribedby = _this$props5['aria-describedby'];
|
|
210
211
|
var removeOptionMessage;
|
|
211
212
|
var removeOptionMessageId;
|
|
212
213
|
if (this.state.hasFocus) {
|
|
@@ -280,6 +281,7 @@ export var EuiComboBoxInput = /*#__PURE__*/function (_Component) {
|
|
|
280
281
|
"aria-expanded": isListOpen,
|
|
281
282
|
"aria-label": ariaLabel,
|
|
282
283
|
"aria-labelledby": ariaLabelledby,
|
|
284
|
+
"aria-describedby": ariaDescribedby,
|
|
283
285
|
"aria-invalid": isInvalid,
|
|
284
286
|
"aria-haspopup": "listbox",
|
|
285
287
|
css: styles.euiComboBoxInput,
|
|
@@ -386,6 +388,7 @@ EuiComboBoxInput.propTypes = {
|
|
|
386
388
|
autoFocus: PropTypes.bool,
|
|
387
389
|
"aria-label": PropTypes.string,
|
|
388
390
|
"aria-labelledby": PropTypes.string,
|
|
391
|
+
"aria-describedby": PropTypes.string,
|
|
389
392
|
className: PropTypes.string,
|
|
390
393
|
"data-test-subj": PropTypes.string,
|
|
391
394
|
css: PropTypes.any
|
|
@@ -20,11 +20,17 @@ import { useEuiI18n } from '../../i18n';
|
|
|
20
20
|
import { euiDataGridFullScreenStyles } from './fullscreen_selector.styles';
|
|
21
21
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
22
22
|
var GRID_IS_FULLSCREEN_CLASSNAME = 'euiDataGrid__restrictBody';
|
|
23
|
-
export var useDataGridFullScreenSelector = function useDataGridFullScreenSelector() {
|
|
23
|
+
export var useDataGridFullScreenSelector = function useDataGridFullScreenSelector(onFullScreenChange) {
|
|
24
24
|
var _useState = useState(false),
|
|
25
25
|
_useState2 = _slicedToArray(_useState, 2),
|
|
26
26
|
isFullScreen = _useState2[0],
|
|
27
27
|
setIsFullScreen = _useState2[1];
|
|
28
|
+
var toggleFullScreen = useCallback(function () {
|
|
29
|
+
setIsFullScreen(function (prevValue) {
|
|
30
|
+
onFullScreenChange === null || onFullScreenChange === void 0 || onFullScreenChange(!prevValue);
|
|
31
|
+
return !prevValue;
|
|
32
|
+
});
|
|
33
|
+
}, [onFullScreenChange]);
|
|
28
34
|
var _useEuiI18n = useEuiI18n(['euiFullscreenSelector.fullscreenButton', 'euiFullscreenSelector.fullscreenButtonActive'], ['Enter fullscreen', 'Exit fullscreen']),
|
|
29
35
|
_useEuiI18n2 = _slicedToArray(_useEuiI18n, 2),
|
|
30
36
|
fullScreenButton = _useEuiI18n2[0],
|
|
@@ -39,22 +45,21 @@ export var useDataGridFullScreenSelector = function useDataGridFullScreenSelecto
|
|
|
39
45
|
color: "text",
|
|
40
46
|
"aria-pressed": isFullScreen,
|
|
41
47
|
"data-test-subj": "dataGridFullScreenButton",
|
|
42
|
-
onClick:
|
|
43
|
-
return setIsFullScreen(!isFullScreen);
|
|
44
|
-
},
|
|
48
|
+
onClick: toggleFullScreen,
|
|
45
49
|
"aria-label": isFullScreen ? fullScreenButtonActive : fullScreenButton
|
|
46
50
|
}));
|
|
47
|
-
}, [isFullScreen, fullScreenButton,
|
|
51
|
+
}, [isFullScreen, fullScreenButtonActive, fullScreenButton, toggleFullScreen]);
|
|
48
52
|
var handleGridKeyDown = useCallback(function (event) {
|
|
49
53
|
switch (event.key) {
|
|
50
54
|
case keys.ESCAPE:
|
|
51
55
|
if (isFullScreen) {
|
|
52
56
|
event.preventDefault();
|
|
53
57
|
setIsFullScreen(false);
|
|
58
|
+
onFullScreenChange === null || onFullScreenChange === void 0 || onFullScreenChange(false);
|
|
54
59
|
}
|
|
55
60
|
break;
|
|
56
61
|
}
|
|
57
|
-
}, [isFullScreen]);
|
|
62
|
+
}, [isFullScreen, onFullScreenChange]);
|
|
58
63
|
var styles = useEuiMemoizedStyles(euiDataGridFullScreenStyles);
|
|
59
64
|
useEffect(function () {
|
|
60
65
|
// When the data grid is fullscreen, we add a class to the body to remove the extra scrollbar and stay above any fixed headers
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _excluded = ["leadingControlColumns", "trailingControlColumns", "columns", "columnVisibility", "schemaDetectors", "rowCount", "renderCellValue", "cellContext", "renderCellPopover", "renderFooterCellValue", "className", "gridStyle", "toolbarVisibility", "pagination", "sorting", "inMemory", "onColumnResize", "minSizeForControls", "height", "width", "rowHeightsOptions", "virtualizationOptions", "renderCustomGridBody", "renderCustomToolbar"];
|
|
2
|
+
var _excluded = ["leadingControlColumns", "trailingControlColumns", "columns", "columnVisibility", "schemaDetectors", "rowCount", "renderCellValue", "cellContext", "renderCellPopover", "renderFooterCellValue", "className", "gridStyle", "toolbarVisibility", "pagination", "sorting", "inMemory", "onColumnResize", "minSizeForControls", "height", "width", "rowHeightsOptions", "virtualizationOptions", "renderCustomGridBody", "renderCustomToolbar", "onFullScreenChange"];
|
|
3
3
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
4
4
|
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
5
5
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -106,6 +106,7 @@ export var EuiDataGrid = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (pr
|
|
|
106
106
|
virtualizationOptions = props.virtualizationOptions,
|
|
107
107
|
renderCustomGridBody = props.renderCustomGridBody,
|
|
108
108
|
renderCustomToolbar = props.renderCustomToolbar,
|
|
109
|
+
onFullScreenChange = props.onFullScreenChange,
|
|
109
110
|
rest = _objectWithoutProperties(props, _excluded);
|
|
110
111
|
|
|
111
112
|
/**
|
|
@@ -248,7 +249,7 @@ export var EuiDataGrid = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (pr
|
|
|
248
249
|
var showToolbar = !!toolbarVisibility;
|
|
249
250
|
var _useDataGridKeyboardS = useDataGridKeyboardShortcuts(),
|
|
250
251
|
keyboardShortcuts = _useDataGridKeyboardS.keyboardShortcuts;
|
|
251
|
-
var _useDataGridFullScree = useDataGridFullScreenSelector(),
|
|
252
|
+
var _useDataGridFullScree = useDataGridFullScreenSelector(onFullScreenChange),
|
|
252
253
|
isFullScreen = _useDataGridFullScree.isFullScreen,
|
|
253
254
|
setIsFullScreen = _useDataGridFullScree.setIsFullScreen,
|
|
254
255
|
fullScreenSelector = _useDataGridFullScree.fullScreenSelector,
|
|
@@ -76,7 +76,7 @@ EuiCheckbox.propTypes = {
|
|
|
76
76
|
checked: PropTypes.bool,
|
|
77
77
|
onChange: PropTypes.any.isRequired,
|
|
78
78
|
// overriding to make it required
|
|
79
|
-
inputRef: PropTypes.func,
|
|
79
|
+
inputRef: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.func.isRequired]),
|
|
80
80
|
label: PropTypes.node,
|
|
81
81
|
disabled: PropTypes.bool,
|
|
82
82
|
indeterminate: PropTypes.bool,
|